Index: Application/Ringtoets/test/Application.Ringtoets.Storage.TestUtil.Test/RingtoetsProjectTestHelperTest.cs =================================================================== diff -u -r2e5f2b59e81cda48f3d7ee03afa4db88abc7b1a8 -red6dd58e4765e4fa48e3843893d1ec41a2b99ec8 --- Application/Ringtoets/test/Application.Ringtoets.Storage.TestUtil.Test/RingtoetsProjectTestHelperTest.cs (.../RingtoetsProjectTestHelperTest.cs) (revision 2e5f2b59e81cda48f3d7ee03afa4db88abc7b1a8) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.TestUtil.Test/RingtoetsProjectTestHelperTest.cs (.../RingtoetsProjectTestHelperTest.cs) (revision ed6dd58e4765e4fa48e3843893d1ec41a2b99ec8) @@ -240,6 +240,7 @@ var calculationWithOutput = (StructuresCalculation) firstCalculationGroup.Children[0]; Assert.IsTrue(calculationWithOutput.HasOutput); + Assert.IsTrue(calculationWithOutput.Output.HasIllustrationPoints); var secondCalculationGroup = (CalculationGroup) failureMechanism.CalculationsGroup.Children[1]; Assert.AreEqual(0, secondCalculationGroup.Children.Count); @@ -264,6 +265,7 @@ var calculationWithOutput = (StructuresCalculation) firstCalculationGroup.Children[0]; Assert.IsTrue(calculationWithOutput.HasOutput); + Assert.IsTrue(calculationWithOutput.Output.HasIllustrationPoints); var secondCalculationGroup = (CalculationGroup) failureMechanism.CalculationsGroup.Children[1]; Assert.AreEqual(0, secondCalculationGroup.Children.Count); @@ -306,8 +308,8 @@ Assert.AreEqual(1, firstCalculationGroup.Children.Count); var calculationWithOutput = (StructuresCalculation) firstCalculationGroup.Children[0]; - Assert.AreEqual("Calculation 1", calculationWithOutput.Name); Assert.IsTrue(calculationWithOutput.HasOutput); + Assert.IsTrue(calculationWithOutput.Output.HasIllustrationPoints); var secondCalculationGroup = (CalculationGroup) failureMechanism.CalculationsGroup.Children[1]; Assert.AreEqual(0, secondCalculationGroup.Children.Count); Index: Application/Ringtoets/test/Application.Ringtoets.Storage.TestUtil/RingtoetsProjectTestHelper.cs =================================================================== diff -u -r2e5f2b59e81cda48f3d7ee03afa4db88abc7b1a8 -red6dd58e4765e4fa48e3843893d1ec41a2b99ec8 --- Application/Ringtoets/test/Application.Ringtoets.Storage.TestUtil/RingtoetsProjectTestHelper.cs (.../RingtoetsProjectTestHelper.cs) (revision 2e5f2b59e81cda48f3d7ee03afa4db88abc7b1a8) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.TestUtil/RingtoetsProjectTestHelper.cs (.../RingtoetsProjectTestHelper.cs) (revision ed6dd58e4765e4fa48e3843893d1ec41a2b99ec8) @@ -420,6 +420,51 @@ return (AssessmentLayerTwoAResult) random.Next(1, Enum.GetValues(typeof(AssessmentLayerTwoAResult)).Length + 1); } + private static StructuresOutput GetStructuresOutputWithIllustrationPoints() + { + var random = new Random(56); + var output = new StructuresOutput(new ProbabilityAssessmentOutput(random.NextDouble(), + random.NextDouble(), + random.NextDouble(), + random.NextDouble(), + random.NextDouble())); + output.SetIllustrationPoints(GetConfiguredGeneralResultFaultTreeIllustrationPoint()); + return output; + } + + private static GeneralResult GetConfiguredGeneralResultFaultTreeIllustrationPoint() + { + var random = new Random(57); + return new GeneralResult( + new WindDirection("GoverningWindDirection", + random.NextDouble()), + new[] + { + new Stochast("Stochast", + random.NextDouble(), + random.NextDouble()) + }, + new[] + { + new TopLevelFaultTreeIllustrationPoint( + new WindDirection("WindDirection", + random.NextDouble()), + "ClosingSituation", + new IllustrationPointNode( + new FaultTreeIllustrationPoint("FaultTreeIllustrationPoint", + random.NextDouble(), + new[] + { + new Stochast("Stochast", + random.NextDouble(), + random.NextDouble()) + }, random.NextEnumValue() + )) + ) + } + ); + } + #region StabilityPointStructures FailureMechanism private static void ConfigureStabilityPointStructuresFailureMechanism(StabilityPointStructuresFailureMechanism failureMechanism, @@ -477,9 +522,10 @@ { Mean = (RoundedDouble) random.NextDouble() }, - Structure = stabilityPointStructure + Structure = stabilityPointStructure, + ShouldIllustrationPointsBeCalculated = true }, - Output = new StructuresOutput(new ProbabilityAssessmentOutput(0.7, 0.85, 0.9, 0.10, 0.11)) + Output = GetStructuresOutputWithIllustrationPoints() } } }); @@ -558,9 +604,10 @@ }, Structure = closingStructure, UseBreakWater = true, - UseForeshore = true + UseForeshore = true, + ShouldIllustrationPointsBeCalculated = true }, - Output = new StructuresOutput(new ProbabilityAssessmentOutput(0.8, 0.95, 0.10, 0.11, 0.12)) + Output = GetStructuresOutputWithIllustrationPoints() } } }); @@ -686,9 +733,10 @@ { Mean = (RoundedDouble) 1.7 }, - Structure = heightStructure + Structure = heightStructure, + ShouldIllustrationPointsBeCalculated = true }, - Output = new StructuresOutput(new ProbabilityAssessmentOutput(0.8, 0.95, 0.10, 0.11, 0.12)) + Output = GetStructuresOutputWithIllustrationPoints() } } });