Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/PropertyClasses/GrassCoverErosionInwardsInputContextPropertiesTest.cs =================================================================== diff -u -r889e8e4ee8267b316e00e8f8a1035c60afb200a0 -r72e8e672bbfb506c8a9b71b8999591bae5cbafe7 --- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/PropertyClasses/GrassCoverErosionInwardsInputContextPropertiesTest.cs (.../GrassCoverErosionInwardsInputContextPropertiesTest.cs) (revision 889e8e4ee8267b316e00e8f8a1035c60afb200a0) +++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/PropertyClasses/GrassCoverErosionInwardsInputContextPropertiesTest.cs (.../GrassCoverErosionInwardsInputContextPropertiesTest.cs) (revision 72e8e672bbfb506c8a9b71b8999591bae5cbafe7) @@ -296,35 +296,24 @@ const int numberOfChangedProperties = 3; var failureMechanism = mockRepository.Stub(); var calculation = mockRepository.Stub(); - var observerMock = mockRepository.StrictMock(); - observerMock.Expect(o => o.UpdateObserver()).Repeat.Times(numberOfChangedProperties); - mockRepository.ReplayAll(); - var input = new GrassCoverErosionInwardsInput - { - DikeProfile = new TestDikeProfile(new Point2D(12.34, 56.78)), - HydraulicBoundaryLocation = new HydraulicBoundaryLocation(1, "", 0, 0) - }; + var input = new GrassCoverErosionInwardsInput(); var inputContext = new GrassCoverErosionInwardsInputContext(input, calculation, failureMechanism, assessmentSection); - - // Call var properties = new GrassCoverErosionInwardsInputContextProperties(inputContext, handler); inputContext.Attach(observerMock); - - // Call properties.ShouldDikeHeightIllustrationPointsBeCalculated = true; properties.ShouldOvertoppingOutputIllustrationPointsBeCalculated = true; properties.ShouldOvertoppingRateIllustrationPointsBeCalculated = true; // Assert - Assert.AreEqual(true, properties.ShouldDikeHeightIllustrationPointsBeCalculated); - Assert.AreEqual(true, properties.ShouldOvertoppingOutputIllustrationPointsBeCalculated); - Assert.AreEqual(true, properties.ShouldOvertoppingRateIllustrationPointsBeCalculated); + Assert.IsTrue(properties.ShouldDikeHeightIllustrationPointsBeCalculated); + Assert.IsTrue(properties.ShouldOvertoppingOutputIllustrationPointsBeCalculated); + Assert.IsTrue(properties.ShouldOvertoppingRateIllustrationPointsBeCalculated); mockRepository.VerifyAll(); } @@ -633,6 +622,12 @@ public void Constructor_Always_PropertiesHaveExpectedAttributesValues(bool withDikeProfile) { // Setup + const string schematizationCategoryName = "Schematisatie"; + const string criticalValuesCategoryName = "Toetseisen"; + const string hydraulicDataCategoryName = "Hydraulische gegevens"; + const string dikeHeightCategoryName = "HBN"; + const string overtoppingRateCategoryName = "Overslagdebiet"; + const string overtoppingOutputCategoryName = "Sterkte berekening"; mockRepository.ReplayAll(); var failureMechanism = new GrassCoverErosionInwardsFailureMechanism(); @@ -654,91 +649,91 @@ PropertyDescriptor dikeProfileProperty = dynamicProperties[dikeProfilePropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(dikeProfileProperty, - "Schematisatie", + schematizationCategoryName, "Dijkprofiel", "De schematisatie van het dijkprofiel."); PropertyDescriptor worldReferencePointProperty = dynamicProperties[worldReferencePointPropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(worldReferencePointProperty, - "Schematisatie", + schematizationCategoryName, "Locatie (RD) [m]", "De coördinaten van de locatie van de dijk in het Rijksdriehoeksstelsel.", true); PropertyDescriptor orientationProperty = dynamicProperties[orientationPropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(orientationProperty, - "Schematisatie", + schematizationCategoryName, "Oriëntatie [°]", "Oriëntatie van de dijknormaal ten opzichte van het noorden.", !withDikeProfile); PropertyDescriptor breakWaterProperty = dynamicProperties[breakWaterPropertyIndex]; Assert.IsInstanceOf(breakWaterProperty.Converter); PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(breakWaterProperty, - "Schematisatie", + schematizationCategoryName, "Dam", "Eigenschappen van de dam.", true); PropertyDescriptor foreshoreProperty = dynamicProperties[foreshorePropertyIndex]; Assert.IsInstanceOf(foreshoreProperty.Converter); PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(foreshoreProperty, - "Schematisatie", + schematizationCategoryName, "Voorlandgeometrie", "Eigenschappen van de voorlandgeometrie.", true); PropertyDescriptor dikeGeometryProperty = dynamicProperties[dikeGeometryPropertyIndex]; Assert.IsInstanceOf(dikeGeometryProperty.Converter); PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(dikeGeometryProperty, - "Schematisatie", + schematizationCategoryName, "Dijkgeometrie", "Eigenschappen van de dijkgeometrie.", true); PropertyDescriptor dikeHeightProperty = dynamicProperties[dikeHeightPropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(dikeHeightProperty, - "Schematisatie", + schematizationCategoryName, "Dijkhoogte [m+NAP]", "De hoogte van de dijk.", !withDikeProfile); PropertyDescriptor criticalFlowRateProperty = dynamicProperties[criticalFlowRatePropertyIndex]; Assert.IsInstanceOf(criticalFlowRateProperty.Converter); PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(criticalFlowRateProperty, - "Toetseisen", + criticalValuesCategoryName, "Kritiek overslagdebiet [m³/s/m]", "Kritiek overslagdebiet per strekkende meter.", true); PropertyDescriptor hydraulicBoundaryLocationProperty = dynamicProperties[hydraulicBoundaryLocationPropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(hydraulicBoundaryLocationProperty, - "Hydraulische gegevens", + hydraulicDataCategoryName, "Locatie met hydraulische randvoorwaarden", "De locatie met hydraulische randvoorwaarden."); PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(dynamicProperties[calculateDikeHeightPropertyIndex], - "HBN", + dikeHeightCategoryName, "HBN berekenen", "Geeft aan of ook het Hydraulisch Belasting Niveau (HBN) moet worden berekend."); PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(dynamicProperties[calculateOvertoppingRatePropertyIndex], - "Overslagdebiet", + overtoppingRateCategoryName, "Overslagdebiet berekenen", "Geeft aan of ook het overslagdebiet moet worden berekend."); PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(dynamicProperties[dikeHeightOutputIllustrationPointsPropertyIndex], - "HBN", + dikeHeightCategoryName, "Illustratiepunten inlezen", "Neem de informatie over de illustratiepunten op in het berekeningsresultaat."); PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(dynamicProperties[overtoppingOutputIllustrationPointsPropertyIndex], - "Overslagdebiet", + overtoppingRateCategoryName, "Illustratiepunten inlezen", "Neem de informatie over de illustratiepunten op in het berekeningsresultaat."); PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(dynamicProperties[overtoppingRateIllustrationPointsPropertyIndex], - "Sterkte berekening", + overtoppingOutputCategoryName, "Illustratiepunten inlezen", "Neem de informatie over de illustratiepunten op in het berekeningsresultaat."); mockRepository.VerifyAll();