Index: Ringtoets/Integration/src/Ringtoets.Integration.Forms/PropertyClasses/StandAlone/MacroStabilityOutwardsFailureMechanismProperties.cs =================================================================== diff -u -r419f4e155d67de33512a25a7b95e2c2830429eeb -r463d6edb7c7fb24d0f394dc537dd794de660c3d5 --- Ringtoets/Integration/src/Ringtoets.Integration.Forms/PropertyClasses/StandAlone/MacroStabilityOutwardsFailureMechanismProperties.cs (.../MacroStabilityOutwardsFailureMechanismProperties.cs) (revision 419f4e155d67de33512a25a7b95e2c2830429eeb) +++ Ringtoets/Integration/src/Ringtoets.Integration.Forms/PropertyClasses/StandAlone/MacroStabilityOutwardsFailureMechanismProperties.cs (.../MacroStabilityOutwardsFailureMechanismProperties.cs) (revision 463d6edb7c7fb24d0f394dc537dd794de660c3d5) @@ -97,9 +97,21 @@ } } - [DynamicVisible] [PropertyOrder(3)] [ResourcesCategory(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.Categories_General))] + [ResourcesDisplayName(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.FailureMechanism_Group_DisplayName))] + [ResourcesDescription(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.FailureMechanism_Group_Description))] + public int Group + { + get + { + return data.Group; + } + } + + [DynamicVisible] + [PropertyOrder(4)] + [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 @@ -110,7 +122,7 @@ } } - [PropertyOrder(4)] + [PropertyOrder(5)] [ResourcesCategory(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.Categories_General))] [ResourcesDisplayName(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.FailureMechanism_IsRelevant_DisplayName))] [ResourcesDescription(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.FailureMechanism_IsRelevant_Description))] @@ -127,7 +139,7 @@ #region Length effect parameters [DynamicVisible] - [PropertyOrder(5)] + [PropertyOrder(6)] [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))] @@ -145,7 +157,7 @@ } [DynamicVisible] - [PropertyOrder(6)] + [PropertyOrder(7)] [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))] @@ -158,7 +170,7 @@ } [DynamicVisible] - [PropertyOrder(7)] + [PropertyOrder(8)] [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))] @@ -171,7 +183,7 @@ } [DynamicVisible] - [PropertyOrder(8)] + [PropertyOrder(9)] [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 -r419f4e155d67de33512a25a7b95e2c2830429eeb -r463d6edb7c7fb24d0f394dc537dd794de660c3d5 --- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PropertyClasses/StandAlone/MacroStabilityOutwardsFailureMechanismPropertiesTest.cs (.../MacroStabilityOutwardsFailureMechanismPropertiesTest.cs) (revision 419f4e155d67de33512a25a7b95e2c2830429eeb) +++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PropertyClasses/StandAlone/MacroStabilityOutwardsFailureMechanismPropertiesTest.cs (.../MacroStabilityOutwardsFailureMechanismPropertiesTest.cs) (revision 463d6edb7c7fb24d0f394dc537dd794de660c3d5) @@ -65,6 +65,7 @@ Assert.IsInstanceOf>(properties); Assert.AreEqual(failureMechanism.Name, properties.Name); Assert.AreEqual(failureMechanism.Code, properties.Code); + Assert.AreEqual(failureMechanism.Group, properties.Group); Assert.AreEqual(failureMechanism.Contribution, properties.Contribution); Assert.AreEqual(isRelevant, properties.IsRelevant); @@ -95,7 +96,7 @@ // Assert PropertyDescriptorCollection dynamicProperties = PropertiesTestHelper.GetAllVisiblePropertyDescriptors(properties); - Assert.AreEqual(8, dynamicProperties.Count); + Assert.AreEqual(9, dynamicProperties.Count); const string generalCategory = "Algemeen"; const string lengthEffectCategory = "Lengte-effect parameters"; @@ -114,41 +115,48 @@ "Het label van het toetsspoor.", true); - PropertyDescriptor contributionProperty = dynamicProperties[2]; + PropertyDescriptor groupProperty = dynamicProperties[2]; + PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(groupProperty, + generalCategory, + "Groep", + "De groep waar het toetsspoor toe behoort.", + true); + + PropertyDescriptor contributionProperty = dynamicProperties[3]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(contributionProperty, generalCategory, "Faalkansbijdrage [%]", "Procentuele bijdrage van dit toetsspoor aan de totale overstromingskans van het traject.", true); - PropertyDescriptor isRelevantProperty = dynamicProperties[3]; + PropertyDescriptor isRelevantProperty = dynamicProperties[4]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(isRelevantProperty, generalCategory, "Is relevant", "Geeft aan of dit toetsspoor relevant is of niet.", true); - PropertyDescriptor aProperty = dynamicProperties[4]; + PropertyDescriptor aProperty = dynamicProperties[5]; 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[5]; + PropertyDescriptor bProperty = dynamicProperties[6]; 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[6]; + PropertyDescriptor sectionLengthProperty = dynamicProperties[7]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(sectionLengthProperty, lengthEffectCategory, "Lengte* [m]", "Totale lengte van het traject in meters (afgerond).", true); - PropertyDescriptor nProperty = dynamicProperties[7]; + PropertyDescriptor nProperty = dynamicProperties[8]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(nProperty, lengthEffectCategory, "N* [-]", @@ -170,7 +178,7 @@ // Assert PropertyDescriptorCollection dynamicProperties = PropertiesTestHelper.GetAllVisiblePropertyDescriptors(properties); - Assert.AreEqual(3, dynamicProperties.Count); + Assert.AreEqual(4, dynamicProperties.Count); const string generalCategory = "Algemeen"; @@ -188,7 +196,14 @@ "Het label van het toetsspoor.", true); - PropertyDescriptor isRelevantProperty = dynamicProperties[2]; + PropertyDescriptor groupProperty = dynamicProperties[2]; + PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(groupProperty, + generalCategory, + "Groep", + "De groep waar het toetsspoor toe behoort.", + true); + + PropertyDescriptor isRelevantProperty = dynamicProperties[3]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(isRelevantProperty, generalCategory, "Is relevant", @@ -263,6 +278,7 @@ // Call & Assert Assert.IsTrue(properties.DynamicVisibleValidationMethod(nameof(properties.Name))); Assert.IsTrue(properties.DynamicVisibleValidationMethod(nameof(properties.Code))); + Assert.IsTrue(properties.DynamicVisibleValidationMethod(nameof(properties.Group))); Assert.IsTrue(properties.DynamicVisibleValidationMethod(nameof(properties.IsRelevant))); Assert.AreEqual(isRelevant, properties.DynamicVisibleValidationMethod(nameof(properties.Contribution)));