Index: Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Forms/PropertyClasses/StabilityPointStructuresFailureMechanismProperties.cs =================================================================== diff -u -re4becae1b8fb60f86df5fc6e41dc0eea20b0fe60 -r542e6889ed73c6d8a1947a0135abe955c0910037 --- Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Forms/PropertyClasses/StabilityPointStructuresFailureMechanismProperties.cs (.../StabilityPointStructuresFailureMechanismProperties.cs) (revision e4becae1b8fb60f86df5fc6e41dc0eea20b0fe60) +++ Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Forms/PropertyClasses/StabilityPointStructuresFailureMechanismProperties.cs (.../StabilityPointStructuresFailureMechanismProperties.cs) (revision 542e6889ed73c6d8a1947a0135abe955c0910037) @@ -39,14 +39,15 @@ { private const int namePropertyIndex = 1; private const int codePropertyIndex = 2; - private const int contributionPropertyIndex = 3; - private const int isRelevantPropertyIndex = 4; - private const int gravitationalAccelerationPropertyIndex = 5; - private const int nPropertyIndex = 6; - private const int modelFactorStorageVolumePropertyIndex = 7; - private const int modelFactorSubCriticalFlowPropertyIndex = 8; - private const int modelFactorCollisionLoadPropertyIndex = 9; - private const int modelFactorLoadEffectPropertyIndex = 10; + private const int groupPropertyIndex = 3; + private const int contributionPropertyIndex = 4; + private const int isRelevantPropertyIndex = 5; + private const int gravitationalAccelerationPropertyIndex = 6; + private const int nPropertyIndex = 7; + private const int modelFactorStorageVolumePropertyIndex = 8; + private const int modelFactorSubCriticalFlowPropertyIndex = 9; + private const int modelFactorCollisionLoadPropertyIndex = 10; + private const int modelFactorLoadEffectPropertyIndex = 11; /// /// Creates a new instance of . @@ -129,6 +130,18 @@ } } + [PropertyOrder(groupPropertyIndex)] + [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(contributionPropertyIndex)] [ResourcesCategory(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.Categories_General))] Index: Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Forms.Test/PropertyClasses/StabilityPointStructuresFailureMechanismPropertiesTest.cs =================================================================== diff -u -re4becae1b8fb60f86df5fc6e41dc0eea20b0fe60 -r542e6889ed73c6d8a1947a0135abe955c0910037 --- Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Forms.Test/PropertyClasses/StabilityPointStructuresFailureMechanismPropertiesTest.cs (.../StabilityPointStructuresFailureMechanismPropertiesTest.cs) (revision e4becae1b8fb60f86df5fc6e41dc0eea20b0fe60) +++ Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Forms.Test/PropertyClasses/StabilityPointStructuresFailureMechanismPropertiesTest.cs (.../StabilityPointStructuresFailureMechanismPropertiesTest.cs) (revision 542e6889ed73c6d8a1947a0135abe955c0910037) @@ -38,14 +38,15 @@ { private const int namePropertyIndex = 0; private const int codePropertyIndex = 1; - private const int contributionPropertyIndex = 2; - private const int isRelevantPropertyIndex = 3; - private const int gravitationalAccelerationPropertyIndex = 4; - private const int nPropertyIndex = 5; - private const int modelFactorStorageVolumePropertyIndex = 6; - private const int modelFactorSubCriticalFlowPropertyIndex = 7; - private const int modelFactorCollisionLoadPropertyIndex = 8; - private const int modelFactorLoadEffectPropertyIndex = 9; + private const int groupPropertyIndex = 2; + private const int contributionPropertyIndex = 3; + private const int isRelevantPropertyIndex = 4; + private const int gravitationalAccelerationPropertyIndex = 5; + private const int nPropertyIndex = 6; + private const int modelFactorStorageVolumePropertyIndex = 7; + private const int modelFactorSubCriticalFlowPropertyIndex = 8; + private const int modelFactorCollisionLoadPropertyIndex = 9; + private const int modelFactorLoadEffectPropertyIndex = 10; [Test] public void Constructor_DataIsNull_ThrowArgumentNullException() @@ -77,6 +78,7 @@ Assert.AreSame(failureMechanism, properties.Data); 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); @@ -111,7 +113,7 @@ const string modelSettingsCategory = "Modelinstellingen"; PropertyDescriptorCollection dynamicProperties = PropertiesTestHelper.GetAllVisiblePropertyDescriptors(properties); - Assert.AreEqual(10, dynamicProperties.Count); + Assert.AreEqual(11, dynamicProperties.Count); PropertyDescriptor nameProperty = dynamicProperties[namePropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(nameProperty, @@ -127,6 +129,13 @@ "Het label van het toetsspoor.", true); + PropertyDescriptor groupProperty = dynamicProperties[groupPropertyIndex]; + PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(groupProperty, + generalCategory, + "Groep", + "De groep waar het toetsspoor toe behoort.", + true); + PropertyDescriptor contributionProperty = dynamicProperties[contributionPropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(contributionProperty, generalCategory, @@ -203,7 +212,7 @@ const string generalCategory = "Algemeen"; PropertyDescriptorCollection dynamicProperties = PropertiesTestHelper.GetAllVisiblePropertyDescriptors(properties); - Assert.AreEqual(3, dynamicProperties.Count); + Assert.AreEqual(4, dynamicProperties.Count); PropertyDescriptor nameProperty = dynamicProperties[namePropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(nameProperty, @@ -219,6 +228,13 @@ "Het label van het toetsspoor.", true); + PropertyDescriptor groupProperty = dynamicProperties[groupPropertyIndex]; + PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(groupProperty, + generalCategory, + "Groep", + "De groep waar het toetsspoor toe behoort.", + true); + PropertyDescriptor isRelevantProperty = dynamicProperties[isRelevantPropertyIndex - 1]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(isRelevantProperty, generalCategory, @@ -293,6 +309,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)));