Index: Ringtoets/Common/test/Ringtoets.Common.Forms.Test/PropertyClasses/StructuresOutputPropertiesTest.cs =================================================================== diff -u -rabe2b6b2a8e30fb019e06f1d0b9834d29acbe9a3 -r3a33e7253e29eb7649dcfc0f675169559b0eefb9 --- Ringtoets/Common/test/Ringtoets.Common.Forms.Test/PropertyClasses/StructuresOutputPropertiesTest.cs (.../StructuresOutputPropertiesTest.cs) (revision abe2b6b2a8e30fb019e06f1d0b9834d29acbe9a3) +++ Ringtoets/Common/test/Ringtoets.Common.Forms.Test/PropertyClasses/StructuresOutputPropertiesTest.cs (.../StructuresOutputPropertiesTest.cs) (revision 3a33e7253e29eb7649dcfc0f675169559b0eefb9) @@ -58,8 +58,8 @@ { // Setup GeneralResult generalResult = withIllustrationPoints - ? new TestGeneralResultFaultTreeIllustrationPoint() - : null; + ? new TestGeneralResultFaultTreeIllustrationPoint() + : null; var structuresOutput = new StructuresOutput(new TestProbabilityAssessmentOutput(), generalResult); @@ -100,17 +100,15 @@ factorOfSafety); var generalResult = new TestGeneralResultFaultTreeIllustrationPoint(); - var expectedFaultTreeIllustrationPointBaseProperty = new[] - { - new FaultTreeIllustrationPointBaseProperties(generalResult.TopLevelIllustrationPoints.First()) - }; var structuresOutput = new StructuresOutput(probabilityAssessmentOutput, generalResult); // Call var properties = new StructuresOutputProperties(structuresOutput); // Assert + var expectedFaultTreeIllustrationPointBaseProperty = new TopLevelFaultTreeIllustrationPointProperties(generalResult.TopLevelIllustrationPoints.First()); + Assert.AreEqual(ProbabilityFormattingHelper.Format(requiredProbability), properties.RequiredProbability); Assert.AreEqual(requiredReliability, properties.RequiredReliability, properties.RequiredReliability.GetAccuracy()); Assert.AreEqual(ProbabilityFormattingHelper.Format(probability), properties.Probability); @@ -119,18 +117,18 @@ Assert.AreEqual(generalResult.GoverningWindDirection.Name, properties.WindDirection); Assert.AreEqual(5.0, properties.AlphaValues[0].Alpha); Assert.AreEqual(10.0, properties.Durations[0].Duration); - Assert.AreEqual(expectedFaultTreeIllustrationPointBaseProperty[0].WindDirection, properties.IllustrationPoints[0].WindDirection); - Assert.AreEqual(expectedFaultTreeIllustrationPointBaseProperty[0].Reliability, properties.IllustrationPoints[0].Reliability); - Assert.AreEqual(expectedFaultTreeIllustrationPointBaseProperty[0].CalculatedProbability, properties.IllustrationPoints[0].CalculatedProbability); - Assert.AreEqual(expectedFaultTreeIllustrationPointBaseProperty[0].ClosingSituation, properties.IllustrationPoints[0].ClosingSituation); - Assert.AreEqual(expectedFaultTreeIllustrationPointBaseProperty[0].IllustrationPoints, properties.IllustrationPoints[0].IllustrationPoints); + Assert.AreEqual(expectedFaultTreeIllustrationPointBaseProperty.WindDirection, properties.IllustrationPoints[0].WindDirection); + Assert.AreEqual(expectedFaultTreeIllustrationPointBaseProperty.Reliability, properties.IllustrationPoints[0].Reliability); + Assert.AreEqual(expectedFaultTreeIllustrationPointBaseProperty.CalculatedProbability, properties.IllustrationPoints[0].CalculatedProbability); + Assert.AreEqual(expectedFaultTreeIllustrationPointBaseProperty.ClosingSituation, properties.IllustrationPoints[0].ClosingSituation); + Assert.AreEqual(expectedFaultTreeIllustrationPointBaseProperty.IllustrationPoints, properties.IllustrationPoints[0].IllustrationPoints); } [Test] public void Constructor_HasGeneralResult_PropertiesHaveExpectedAttributesValues() { // Setup - var probabilityAssessmentOutput = new ProbabilityAssessmentOutput(double.NaN, double.NaN, double.NaN, double.NaN, double.NaN); + var probabilityAssessmentOutput = new TestProbabilityAssessmentOutput(); var generalResult = new TestGeneralResultFaultTreeIllustrationPoint(); var structuresOutput = new StructuresOutput(probabilityAssessmentOutput, generalResult); @@ -201,15 +199,15 @@ PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(illustrationPointProperty, illustrationPointsCategoryName, "Illustratiepunten", - "", + "De lijst van illustratiepunten voor de berekening.", true); } [Test] public void Constructor_NoGeneralResult_PropertiesHaveExpectedAttributesValues() { // Setup - var probabilityAssessmentOutput = new ProbabilityAssessmentOutput(double.NaN, double.NaN, double.NaN, double.NaN, double.NaN); + var probabilityAssessmentOutput = new TestProbabilityAssessmentOutput(); var structuresOutput = new StructuresOutput(probabilityAssessmentOutput, null); // Call