Index: Ringtoets/GrassCoverErosionOutwards/src/Ringtoets.GrassCoverErosionOutwards.Forms/PropertyClasses/GrassCoverErosionOutwardsFailureMechanismProperties.cs =================================================================== diff -u -rba4b2874a53a4abcf53dd23584722ba2552c7a3e -r89ec1b851211eee21b1a740aadaa9487aeccb1d8 --- Ringtoets/GrassCoverErosionOutwards/src/Ringtoets.GrassCoverErosionOutwards.Forms/PropertyClasses/GrassCoverErosionOutwardsFailureMechanismProperties.cs (.../GrassCoverErosionOutwardsFailureMechanismProperties.cs) (revision ba4b2874a53a4abcf53dd23584722ba2552c7a3e) +++ Ringtoets/GrassCoverErosionOutwards/src/Ringtoets.GrassCoverErosionOutwards.Forms/PropertyClasses/GrassCoverErosionOutwardsFailureMechanismProperties.cs (.../GrassCoverErosionOutwardsFailureMechanismProperties.cs) (revision 89ec1b851211eee21b1a740aadaa9487aeccb1d8) @@ -67,7 +67,7 @@ #region Length effect parameters [DynamicVisible] - [PropertyOrder(5)] + [PropertyOrder(6)] [ResourcesCategory(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.Categories_LengthEffect))] [ResourcesDisplayName(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.FailureMechanism_N_DisplayName))] [ResourcesDescription(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.FailureMechanism_N_Description))] @@ -144,9 +144,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 @@ -157,7 +169,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))] @@ -174,7 +186,7 @@ #region Model settings [DynamicVisible] - [PropertyOrder(6)] + [PropertyOrder(7)] [ResourcesCategory(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.Categories_ModelSettings))] [ResourcesDisplayName(typeof(RingtoetsRevetmentFormsResources), nameof(RingtoetsRevetmentFormsResources.GeneralWaveConditionsInput_A_DisplayName))] [ResourcesDescription(typeof(RingtoetsRevetmentFormsResources), nameof(RingtoetsRevetmentFormsResources.GeneralWaveConditionsInput_A_Description))] @@ -187,7 +199,7 @@ } [DynamicVisible] - [PropertyOrder(7)] + [PropertyOrder(8)] [ResourcesCategory(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.Categories_ModelSettings))] [ResourcesDisplayName(typeof(RingtoetsRevetmentFormsResources), nameof(RingtoetsRevetmentFormsResources.GeneralWaveConditionsInput_B_DisplayName))] [ResourcesDescription(typeof(RingtoetsRevetmentFormsResources), nameof(RingtoetsRevetmentFormsResources.GeneralWaveConditionsInput_B_Description))] @@ -200,7 +212,7 @@ } [DynamicVisible] - [PropertyOrder(8)] + [PropertyOrder(9)] [ResourcesCategory(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.Categories_ModelSettings))] [ResourcesDisplayName(typeof(RingtoetsRevetmentFormsResources), nameof(RingtoetsRevetmentFormsResources.GeneralWaveConditionsInput_C_DisplayName))] [ResourcesDescription(typeof(RingtoetsRevetmentFormsResources), nameof(RingtoetsRevetmentFormsResources.GeneralWaveConditionsInput_C_Description))] Index: Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/PropertyClasses/GrassCoverErosionOutwardsFailureMechanismPropertiesTest.cs =================================================================== diff -u -rba4b2874a53a4abcf53dd23584722ba2552c7a3e -r89ec1b851211eee21b1a740aadaa9487aeccb1d8 --- Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/PropertyClasses/GrassCoverErosionOutwardsFailureMechanismPropertiesTest.cs (.../GrassCoverErosionOutwardsFailureMechanismPropertiesTest.cs) (revision ba4b2874a53a4abcf53dd23584722ba2552c7a3e) +++ Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/PropertyClasses/GrassCoverErosionOutwardsFailureMechanismPropertiesTest.cs (.../GrassCoverErosionOutwardsFailureMechanismPropertiesTest.cs) (revision 89ec1b851211eee21b1a740aadaa9487aeccb1d8) @@ -41,12 +41,13 @@ { private const int namePropertyIndex = 0; private const int codePropertyIndex = 1; - private const int contributionPropertyIndex = 2; - private const int isRelevantPropertyIndex = 3; - private const int nPropertyIndex = 4; - private const int aPropertyIndex = 5; - private const int bPropertyIndex = 6; - private const int cPropertyIndex = 7; + private const int groupPropertyIndex = 2; + private const int contributionPropertyIndex = 3; + private const int isRelevantPropertyIndex = 4; + private const int nPropertyIndex = 5; + private const int aPropertyIndex = 6; + private const int bPropertyIndex = 7; + private const int cPropertyIndex = 8; [Test] public void Constructor_WithoutFailureMechanism_ThrowsArgumentNullException() @@ -98,6 +99,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); @@ -126,7 +128,7 @@ // Assert PropertyDescriptorCollection dynamicProperties = PropertiesTestHelper.GetAllVisiblePropertyDescriptors(properties); - Assert.AreEqual(8, dynamicProperties.Count); + Assert.AreEqual(9, dynamicProperties.Count); const string generalCategory = "Algemeen"; const string modelSettingsCategory = "Modelinstellingen"; @@ -145,6 +147,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, @@ -207,7 +216,7 @@ // Assert PropertyDescriptorCollection dynamicProperties = PropertiesTestHelper.GetAllVisiblePropertyDescriptors(properties); - Assert.AreEqual(3, dynamicProperties.Count); + Assert.AreEqual(4, dynamicProperties.Count); const string generalCategory = "Algemeen"; @@ -225,6 +234,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, @@ -318,6 +334,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)));