Index: Ringtoets/Integration/src/Ringtoets.Integration.Forms/PropertyClasses/StandAlone/MacroStabilityOutwardsFailureMechanismProperties.cs =================================================================== diff -u -rba2c38d1315dda29a2bd0005138530b2aeb10f1f -r419f4e155d67de33512a25a7b95e2c2830429eeb --- Ringtoets/Integration/src/Ringtoets.Integration.Forms/PropertyClasses/StandAlone/MacroStabilityOutwardsFailureMechanismProperties.cs (.../MacroStabilityOutwardsFailureMechanismProperties.cs) (revision ba2c38d1315dda29a2bd0005138530b2aeb10f1f) +++ Ringtoets/Integration/src/Ringtoets.Integration.Forms/PropertyClasses/StandAlone/MacroStabilityOutwardsFailureMechanismProperties.cs (.../MacroStabilityOutwardsFailureMechanismProperties.cs) (revision 419f4e155d67de33512a25a7b95e2c2830429eeb) @@ -64,7 +64,8 @@ private bool ShouldHidePropertyWhenFailureMechanismIrrelevant(string propertyName) { - return nameof(A).Equals(propertyName) + return nameof(Contribution).Equals(propertyName) + || nameof(A).Equals(propertyName) || nameof(B).Equals(propertyName) || nameof(SectionLength).Equals(propertyName) || nameof(N).Equals(propertyName); @@ -96,8 +97,21 @@ } } + [DynamicVisible] [PropertyOrder(3)] [ResourcesCategory(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.Categories_General))] + [ResourcesDisplayName(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.FailureMechanism_Contribution_DisplayName))] + [ResourcesDescription(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.FailureMechanism_Contribution_Description))] + public double Contribution + { + get + { + return data.Contribution; + } + } + + [PropertyOrder(4)] + [ResourcesCategory(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.Categories_General))] [ResourcesDisplayName(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.FailureMechanism_IsRelevant_DisplayName))] [ResourcesDescription(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.FailureMechanism_IsRelevant_Description))] public bool IsRelevant @@ -113,7 +127,7 @@ #region Length effect parameters [DynamicVisible] - [PropertyOrder(4)] + [PropertyOrder(5)] [ResourcesCategory(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.Categories_LengthEffect))] [ResourcesDisplayName(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.FailureMechanism_ProbabilityAssessmentInput_A_DisplayName))] [ResourcesDescription(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.FailureMechanism_ProbabilityAssessmentInput_A_Description))] @@ -131,7 +145,7 @@ } [DynamicVisible] - [PropertyOrder(5)] + [PropertyOrder(6)] [ResourcesCategory(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.Categories_LengthEffect))] [ResourcesDisplayName(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.FailureMechanism_ProbabilityAssessmentInput_B_DisplayName))] [ResourcesDescription(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.FailureMechanism_ProbabilityAssessmentInput_B_Description))] @@ -144,7 +158,7 @@ } [DynamicVisible] - [PropertyOrder(6)] + [PropertyOrder(7)] [ResourcesCategory(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.Categories_LengthEffect))] [ResourcesDisplayName(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.ReferenceLine_Length_Rounded_DisplayName))] [ResourcesDescription(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.ReferenceLine_Length_Rounded_Description))] @@ -157,7 +171,7 @@ } [DynamicVisible] - [PropertyOrder(7)] + [PropertyOrder(8)] [ResourcesCategory(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.Categories_LengthEffect))] [ResourcesDisplayName(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.FailureMechanism_N_Rounded_DisplayName))] [ResourcesDescription(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.FailureMechanism_N_Rounded_Description))] Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PropertyClasses/StandAlone/MacroStabilityOutwardsFailureMechanismPropertiesTest.cs =================================================================== diff -u -r9f509058d44189f44b16a8da06a60751b17c86c3 -r419f4e155d67de33512a25a7b95e2c2830429eeb --- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PropertyClasses/StandAlone/MacroStabilityOutwardsFailureMechanismPropertiesTest.cs (.../MacroStabilityOutwardsFailureMechanismPropertiesTest.cs) (revision 9f509058d44189f44b16a8da06a60751b17c86c3) +++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PropertyClasses/StandAlone/MacroStabilityOutwardsFailureMechanismPropertiesTest.cs (.../MacroStabilityOutwardsFailureMechanismPropertiesTest.cs) (revision 419f4e155d67de33512a25a7b95e2c2830429eeb) @@ -65,6 +65,7 @@ Assert.IsInstanceOf>(properties); Assert.AreEqual(failureMechanism.Name, properties.Name); Assert.AreEqual(failureMechanism.Code, properties.Code); + Assert.AreEqual(failureMechanism.Contribution, properties.Contribution); Assert.AreEqual(isRelevant, properties.IsRelevant); MacroStabilityOutwardsProbabilityAssessmentInput probabilityAssessmentInput = failureMechanism.MacroStabilityOutwardsProbabilityAssessmentInput; @@ -94,7 +95,7 @@ // Assert PropertyDescriptorCollection dynamicProperties = PropertiesTestHelper.GetAllVisiblePropertyDescriptors(properties); - Assert.AreEqual(7, dynamicProperties.Count); + Assert.AreEqual(8, dynamicProperties.Count); const string generalCategory = "Algemeen"; const string lengthEffectCategory = "Lengte-effect parameters"; @@ -113,34 +114,41 @@ "Het label van het toetsspoor.", true); - PropertyDescriptor isRelevantProperty = dynamicProperties[2]; + PropertyDescriptor contributionProperty = dynamicProperties[2]; + PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(contributionProperty, + generalCategory, + "Faalkansbijdrage [%]", + "Procentuele bijdrage van dit toetsspoor aan de totale overstromingskans van het traject.", + true); + + PropertyDescriptor isRelevantProperty = dynamicProperties[3]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(isRelevantProperty, generalCategory, "Is relevant", "Geeft aan of dit toetsspoor relevant is of niet.", true); - PropertyDescriptor aProperty = dynamicProperties[3]; + PropertyDescriptor aProperty = dynamicProperties[4]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(aProperty, lengthEffectCategory, "a [-]", "De parameter 'a' die gebruikt wordt voor het lengte-effect in berekening van de maximaal toelaatbare faalkans."); - PropertyDescriptor bProperty = dynamicProperties[4]; + PropertyDescriptor bProperty = dynamicProperties[5]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(bProperty, lengthEffectCategory, "b [m]", "De parameter 'b' die gebruikt wordt voor het lengte-effect in berekening van de maximaal toelaatbare faalkans.", true); - PropertyDescriptor sectionLengthProperty = dynamicProperties[5]; + PropertyDescriptor sectionLengthProperty = dynamicProperties[6]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(sectionLengthProperty, lengthEffectCategory, "Lengte* [m]", "Totale lengte van het traject in meters (afgerond).", true); - PropertyDescriptor nProperty = dynamicProperties[6]; + PropertyDescriptor nProperty = dynamicProperties[7]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(nProperty, lengthEffectCategory, "N* [-]", @@ -257,6 +265,7 @@ Assert.IsTrue(properties.DynamicVisibleValidationMethod(nameof(properties.Code))); Assert.IsTrue(properties.DynamicVisibleValidationMethod(nameof(properties.IsRelevant))); + Assert.AreEqual(isRelevant, properties.DynamicVisibleValidationMethod(nameof(properties.Contribution))); Assert.AreEqual(isRelevant, properties.DynamicVisibleValidationMethod(nameof(properties.A))); Assert.AreEqual(isRelevant, properties.DynamicVisibleValidationMethod(nameof(properties.B))); Assert.AreEqual(isRelevant, properties.DynamicVisibleValidationMethod(nameof(properties.SectionLength)));