Index: Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Forms.Test/PropertyClasses/ClosingStructuresFailureMechanismPropertiesTest.cs =================================================================== diff -u -r07da6dd4a8af30f8dc42360f19a56c9cef4bc132 -r60e5e7fd23d7d028fbf73251126ab5672d5ca8b9 --- Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Forms.Test/PropertyClasses/ClosingStructuresFailureMechanismPropertiesTest.cs (.../ClosingStructuresFailureMechanismPropertiesTest.cs) (revision 07da6dd4a8af30f8dc42360f19a56c9cef4bc132) +++ Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Forms.Test/PropertyClasses/ClosingStructuresFailureMechanismPropertiesTest.cs (.../ClosingStructuresFailureMechanismPropertiesTest.cs) (revision 60e5e7fd23d7d028fbf73251126ab5672d5ca8b9) @@ -35,6 +35,22 @@ [TestFixture] public class ClosingStructuresFailureMechanismPropertiesTest { + private const int namePropertyIndex = 0; + private const int codePropertyIndex = 1; + private const int groupPropertyIndex = 2; + private const int contributionPropertyIndex = 3; + private const int isRelevantPropertyIndex = 4; + private const int gravitationalAccelerationPropertyIndex = 5; + + private const int cPropertyIndex = 6; + private const int n2APropertyIndex = 7; + private const int nPropertyIndex = 8; + + private const int modelFactorOvertoppingFlowPropertyIndex = 9; + private const int modelFactorStorageVolumePropertyIndex = 10; + private const int modelFactorSubCriticalFlowPropertyIndex = 11; + private const int modelFactorInflowVolumePropertyIndex = 12; + [Test] public void Constructor_DataNull_ThrowArgumentNullException() { @@ -105,93 +121,93 @@ PropertyDescriptorCollection dynamicProperties = PropertiesTestHelper.GetAllVisiblePropertyDescriptors(properties); Assert.AreEqual(13, dynamicProperties.Count); - PropertyDescriptor nameProperty = dynamicProperties[0]; + PropertyDescriptor nameProperty = dynamicProperties[namePropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(nameProperty, generalCategory, "Naam", "De naam van het toetsspoor.", true); - PropertyDescriptor codeProperty = dynamicProperties[1]; + PropertyDescriptor codeProperty = dynamicProperties[codePropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(codeProperty, generalCategory, "Label", "Het label van het toetsspoor.", true); - PropertyDescriptor groupProperty = dynamicProperties[2]; + PropertyDescriptor groupProperty = dynamicProperties[groupPropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(groupProperty, generalCategory, "Groep", "De groep waar het toetsspoor toe behoort.", true); - PropertyDescriptor contributionProperty = dynamicProperties[3]; + PropertyDescriptor contributionProperty = dynamicProperties[contributionPropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(contributionProperty, generalCategory, "Faalkansbijdrage [%]", "Procentuele bijdrage van dit toetsspoor aan de totale overstromingskans van het traject.", true); - PropertyDescriptor isRelevantProperty = dynamicProperties[4]; + PropertyDescriptor isRelevantProperty = dynamicProperties[isRelevantPropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(isRelevantProperty, generalCategory, "Is relevant", "Geeft aan of dit toetsspoor relevant is of niet.", true); - PropertyDescriptor gravitationalAccelerationProperty = dynamicProperties[5]; + PropertyDescriptor gravitationalAccelerationProperty = dynamicProperties[gravitationalAccelerationPropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(gravitationalAccelerationProperty, generalCategory, "Valversnelling [m/s²]", "Valversnelling.", true); - PropertyDescriptor cProperty = dynamicProperties[6]; + PropertyDescriptor cProperty = dynamicProperties[cPropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(cProperty, lengthEffectCategory, "C [-]", "De parameter 'C' die gebruikt wordt om het lengte-effect te berekenen.", true); - PropertyDescriptor n2AProperty = dynamicProperties[7]; + PropertyDescriptor n2AProperty = dynamicProperties[n2APropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(n2AProperty, lengthEffectCategory, "2NA [-]", "De parameter '2NA' die gebruikt wordt om het lengte-effect te berekenen."); - PropertyDescriptor nProperty = dynamicProperties[8]; + PropertyDescriptor nProperty = dynamicProperties[nPropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(nProperty, lengthEffectCategory, "N* [-]", "De parameter 'N' die gebruikt wordt om het lengte-effect mee te nemen in de beoordeling (afgerond).", true); - PropertyDescriptor modelFactorOvertoppingFlowProperty = dynamicProperties[9]; + PropertyDescriptor modelFactorOvertoppingFlowProperty = dynamicProperties[modelFactorOvertoppingFlowPropertyIndex]; Assert.IsInstanceOf(modelFactorOvertoppingFlowProperty.Converter); PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(modelFactorOvertoppingFlowProperty, modelSettingsCategory, "Modelfactor overslagdebiet [-]", "Modelfactor voor het overslagdebiet.", true); - PropertyDescriptor modelFactorStorageVolumeProperty = dynamicProperties[10]; + PropertyDescriptor modelFactorStorageVolumeProperty = dynamicProperties[modelFactorStorageVolumePropertyIndex]; Assert.IsInstanceOf(modelFactorStorageVolumeProperty.Converter); PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(modelFactorStorageVolumeProperty, modelSettingsCategory, "Modelfactor kombergend vermogen [-]", "Modelfactor kombergend vermogen.", true); - PropertyDescriptor modelFactorSubCriticalFlowProperty = dynamicProperties[11]; + PropertyDescriptor modelFactorSubCriticalFlowProperty = dynamicProperties[modelFactorSubCriticalFlowPropertyIndex]; Assert.IsInstanceOf(modelFactorSubCriticalFlowProperty.Converter); PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(modelFactorSubCriticalFlowProperty, modelSettingsCategory, "Modelfactor voor onvolkomen stroming [-]", "Modelfactor voor onvolkomen stroming.", true); - PropertyDescriptor modelFactorInflowVolumeProperty = dynamicProperties[12]; + PropertyDescriptor modelFactorInflowVolumeProperty = dynamicProperties[modelFactorInflowVolumePropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(modelFactorInflowVolumeProperty, modelSettingsCategory, "Modelfactor instromend volume [-]", @@ -215,28 +231,28 @@ PropertyDescriptorCollection dynamicProperties = PropertiesTestHelper.GetAllVisiblePropertyDescriptors(properties); Assert.AreEqual(4, dynamicProperties.Count); - PropertyDescriptor nameProperty = dynamicProperties[0]; + PropertyDescriptor nameProperty = dynamicProperties[namePropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(nameProperty, generalCategory, "Naam", "De naam van het toetsspoor.", true); - PropertyDescriptor codeProperty = dynamicProperties[1]; + PropertyDescriptor codeProperty = dynamicProperties[codePropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(codeProperty, generalCategory, "Label", "Het label van het toetsspoor.", true); - PropertyDescriptor groupProperty = dynamicProperties[2]; + PropertyDescriptor groupProperty = dynamicProperties[groupPropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(groupProperty, generalCategory, "Groep", "De groep waar het toetsspoor toe behoort.", true); - PropertyDescriptor isRelevantProperty = dynamicProperties[3]; + PropertyDescriptor isRelevantProperty = dynamicProperties[isRelevantPropertyIndex - 1]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(isRelevantProperty, generalCategory, "Is relevant", Index: Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Forms/PropertyClasses/GrassCoverErosionInwardsFailureMechanismProperties.cs =================================================================== diff -u -r4517c5976cfb31aff599b4f70d97315ecda8698d -r60e5e7fd23d7d028fbf73251126ab5672d5ca8b9 --- Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Forms/PropertyClasses/GrassCoverErosionInwardsFailureMechanismProperties.cs (.../GrassCoverErosionInwardsFailureMechanismProperties.cs) (revision 4517c5976cfb31aff599b4f70d97315ecda8698d) +++ Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Forms/PropertyClasses/GrassCoverErosionInwardsFailureMechanismProperties.cs (.../GrassCoverErosionInwardsFailureMechanismProperties.cs) (revision 60e5e7fd23d7d028fbf73251126ab5672d5ca8b9) @@ -42,13 +42,13 @@ private const int namePropertyIndex = 1; private const int codePropertyIndex = 2; private const int groupPropertyIndex = 3; - private const int contributionPropertyIndex = 3; - private const int isRelevantPropertyIndex = 4; - private const int nPropertyIndex = 5; - private const int frunupModelFactorPropertyIndex = 6; - private const int fbFactorPropertyIndex = 7; - private const int fnFactorPropertyIndex = 8; - private const int fshallowModelFactorPropertyIndex = 9; + private const int contributionPropertyIndex = 4; + private const int isRelevantPropertyIndex = 5; + private const int nPropertyIndex = 6; + private const int frunupModelFactorPropertyIndex = 7; + private const int fbFactorPropertyIndex = 8; + private const int fnFactorPropertyIndex = 9; + private const int fshallowModelFactorPropertyIndex = 10; private readonly IFailureMechanismPropertyChangeHandler propertyChangeHandler; /// Index: Ringtoets/GrassCoverErosionOutwards/src/Ringtoets.GrassCoverErosionOutwards.Forms/PropertyClasses/GrassCoverErosionOutwardsFailureMechanismProperties.cs =================================================================== diff -u -r89ec1b851211eee21b1a740aadaa9487aeccb1d8 -r60e5e7fd23d7d028fbf73251126ab5672d5ca8b9 --- Ringtoets/GrassCoverErosionOutwards/src/Ringtoets.GrassCoverErosionOutwards.Forms/PropertyClasses/GrassCoverErosionOutwardsFailureMechanismProperties.cs (.../GrassCoverErosionOutwardsFailureMechanismProperties.cs) (revision 89ec1b851211eee21b1a740aadaa9487aeccb1d8) +++ Ringtoets/GrassCoverErosionOutwards/src/Ringtoets.GrassCoverErosionOutwards.Forms/PropertyClasses/GrassCoverErosionOutwardsFailureMechanismProperties.cs (.../GrassCoverErosionOutwardsFailureMechanismProperties.cs) (revision 60e5e7fd23d7d028fbf73251126ab5672d5ca8b9) @@ -38,6 +38,16 @@ /// public class GrassCoverErosionOutwardsFailureMechanismProperties : ObjectProperties { + private const int namePropertyIndex = 1; + private const int codePropertyIndex = 2; + private const int groupPropertyIndex = 3; + private const int contributionPropertyIndex = 4; + private const int isRelevantPropertyIndex = 5; + private const int nPropertyIndex = 6; + private const int aPropertyIndex = 7; + private const int bPropertyIndex = 8; + private const int cPropertyIndex = 9; + private readonly IFailureMechanismPropertyChangeHandler propertyChangeHandler; /// @@ -67,7 +77,7 @@ #region Length effect parameters [DynamicVisible] - [PropertyOrder(6)] + [PropertyOrder(nPropertyIndex)] [ResourcesCategory(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.Categories_LengthEffect))] [ResourcesDisplayName(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.FailureMechanism_N_DisplayName))] [ResourcesDescription(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.FailureMechanism_N_Description))] @@ -120,7 +130,7 @@ #region General - [PropertyOrder(1)] + [PropertyOrder(namePropertyIndex)] [ResourcesCategory(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.Categories_General))] [ResourcesDisplayName(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.FailureMechanism_Name_DisplayName))] [ResourcesDescription(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.FailureMechanism_Name_Description))] @@ -132,7 +142,7 @@ } } - [PropertyOrder(2)] + [PropertyOrder(codePropertyIndex)] [ResourcesCategory(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.Categories_General))] [ResourcesDisplayName(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.FailureMechanism_Code_DisplayName))] [ResourcesDescription(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.FailureMechanism_Code_Description))] @@ -144,7 +154,7 @@ } } - [PropertyOrder(3)] + [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))] @@ -157,7 +167,7 @@ } [DynamicVisible] - [PropertyOrder(4)] + [PropertyOrder(contributionPropertyIndex)] [ResourcesCategory(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.Categories_General))] [ResourcesDisplayName(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.FailureMechanism_Contribution_DisplayName))] [ResourcesDescription(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.FailureMechanism_Contribution_Description))] @@ -169,7 +179,7 @@ } } - [PropertyOrder(5)] + [PropertyOrder(isRelevantPropertyIndex)] [ResourcesCategory(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.Categories_General))] [ResourcesDisplayName(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.FailureMechanism_IsRelevant_DisplayName))] [ResourcesDescription(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.FailureMechanism_IsRelevant_Description))] @@ -186,7 +196,7 @@ #region Model settings [DynamicVisible] - [PropertyOrder(7)] + [PropertyOrder(aPropertyIndex)] [ResourcesCategory(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.Categories_ModelSettings))] [ResourcesDisplayName(typeof(RingtoetsRevetmentFormsResources), nameof(RingtoetsRevetmentFormsResources.GeneralWaveConditionsInput_A_DisplayName))] [ResourcesDescription(typeof(RingtoetsRevetmentFormsResources), nameof(RingtoetsRevetmentFormsResources.GeneralWaveConditionsInput_A_Description))] @@ -199,7 +209,7 @@ } [DynamicVisible] - [PropertyOrder(8)] + [PropertyOrder(bPropertyIndex)] [ResourcesCategory(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.Categories_ModelSettings))] [ResourcesDisplayName(typeof(RingtoetsRevetmentFormsResources), nameof(RingtoetsRevetmentFormsResources.GeneralWaveConditionsInput_B_DisplayName))] [ResourcesDescription(typeof(RingtoetsRevetmentFormsResources), nameof(RingtoetsRevetmentFormsResources.GeneralWaveConditionsInput_B_Description))] @@ -212,7 +222,7 @@ } [DynamicVisible] - [PropertyOrder(9)] + [PropertyOrder(cPropertyIndex)] [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/Integration/src/Ringtoets.Integration.Forms/PropertyClasses/StandAlone/MacroStabilityOutwardsFailureMechanismProperties.cs =================================================================== diff -u -r463d6edb7c7fb24d0f394dc537dd794de660c3d5 -r60e5e7fd23d7d028fbf73251126ab5672d5ca8b9 --- Ringtoets/Integration/src/Ringtoets.Integration.Forms/PropertyClasses/StandAlone/MacroStabilityOutwardsFailureMechanismProperties.cs (.../MacroStabilityOutwardsFailureMechanismProperties.cs) (revision 463d6edb7c7fb24d0f394dc537dd794de660c3d5) +++ Ringtoets/Integration/src/Ringtoets.Integration.Forms/PropertyClasses/StandAlone/MacroStabilityOutwardsFailureMechanismProperties.cs (.../MacroStabilityOutwardsFailureMechanismProperties.cs) (revision 60e5e7fd23d7d028fbf73251126ab5672d5ca8b9) @@ -36,6 +36,16 @@ /// public class MacroStabilityOutwardsFailureMechanismProperties : ObjectProperties { + private const int namePropertyIndex = 1; + private const int codePropertyIndex = 2; + private const int groupPropertyIndex = 3; + private const int contributionPropertyIndex = 4; + private const int isRelevantPropertyIndex = 5; + private const int aPropertyIndex = 6; + private const int bPropertyIndex = 7; + private const int sectionLengthPropertyIndex = 8; + private const int nPropertyIndex = 9; + /// /// Creates a new instance of . /// @@ -73,7 +83,7 @@ #region General - [PropertyOrder(1)] + [PropertyOrder(namePropertyIndex)] [ResourcesCategory(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.Categories_General))] [ResourcesDisplayName(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.FailureMechanism_Name_DisplayName))] [ResourcesDescription(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.FailureMechanism_Name_Description))] @@ -85,7 +95,7 @@ } } - [PropertyOrder(2)] + [PropertyOrder(codePropertyIndex)] [ResourcesCategory(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.Categories_General))] [ResourcesDisplayName(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.FailureMechanism_Code_DisplayName))] [ResourcesDescription(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.FailureMechanism_Code_Description))] @@ -97,7 +107,7 @@ } } - [PropertyOrder(3)] + [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))] @@ -110,7 +120,7 @@ } [DynamicVisible] - [PropertyOrder(4)] + [PropertyOrder(contributionPropertyIndex)] [ResourcesCategory(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.Categories_General))] [ResourcesDisplayName(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.FailureMechanism_Contribution_DisplayName))] [ResourcesDescription(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.FailureMechanism_Contribution_Description))] @@ -122,7 +132,7 @@ } } - [PropertyOrder(5)] + [PropertyOrder(isRelevantPropertyIndex)] [ResourcesCategory(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.Categories_General))] [ResourcesDisplayName(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.FailureMechanism_IsRelevant_DisplayName))] [ResourcesDescription(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.FailureMechanism_IsRelevant_Description))] @@ -139,7 +149,7 @@ #region Length effect parameters [DynamicVisible] - [PropertyOrder(6)] + [PropertyOrder(aPropertyIndex)] [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))] @@ -157,7 +167,7 @@ } [DynamicVisible] - [PropertyOrder(7)] + [PropertyOrder(bPropertyIndex)] [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))] @@ -170,7 +180,7 @@ } [DynamicVisible] - [PropertyOrder(8)] + [PropertyOrder(sectionLengthPropertyIndex)] [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))] @@ -183,7 +193,7 @@ } [DynamicVisible] - [PropertyOrder(9)] + [PropertyOrder(nPropertyIndex)] [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/src/Ringtoets.Integration.Forms/PropertyClasses/StandAlone/PipingStructureFailureMechanismProperties.cs =================================================================== diff -u -r09377680ef5a65687f6742abd2a3d2077d72557a -r60e5e7fd23d7d028fbf73251126ab5672d5ca8b9 --- Ringtoets/Integration/src/Ringtoets.Integration.Forms/PropertyClasses/StandAlone/PipingStructureFailureMechanismProperties.cs (.../PipingStructureFailureMechanismProperties.cs) (revision 09377680ef5a65687f6742abd2a3d2077d72557a) +++ Ringtoets/Integration/src/Ringtoets.Integration.Forms/PropertyClasses/StandAlone/PipingStructureFailureMechanismProperties.cs (.../PipingStructureFailureMechanismProperties.cs) (revision 60e5e7fd23d7d028fbf73251126ab5672d5ca8b9) @@ -34,6 +34,13 @@ /// public class PipingStructureFailureMechanismProperties : ObjectProperties { + private const int namePropertyIndex = 1; + private const int codePropertyIndex = 2; + private const int groupPropertyIndex = 3; + private const int contributionPropertyIndex = 4; + private const int isRelevantPropertyIndex = 5; + private const int nPropertyIndex = 6; + /// /// Creates a new instance of . /// @@ -52,7 +59,7 @@ #region Length effect parameters [DynamicVisible] - [PropertyOrder(6)] + [PropertyOrder(nPropertyIndex)] [ResourcesCategory(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.Categories_LengthEffect))] [ResourcesDisplayName(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.FailureMechanism_N_DisplayName))] [ResourcesDescription(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.FailureMechanism_N_Description))] @@ -89,7 +96,7 @@ #region General - [PropertyOrder(1)] + [PropertyOrder(namePropertyIndex)] [ResourcesCategory(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.Categories_General))] [ResourcesDisplayName(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.FailureMechanism_Name_DisplayName))] [ResourcesDescription(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.FailureMechanism_Name_Description))] @@ -101,7 +108,7 @@ } } - [PropertyOrder(2)] + [PropertyOrder(codePropertyIndex)] [ResourcesCategory(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.Categories_General))] [ResourcesDisplayName(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.FailureMechanism_Code_DisplayName))] [ResourcesDescription(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.FailureMechanism_Code_Description))] @@ -113,7 +120,7 @@ } } - [PropertyOrder(3)] + [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))] @@ -126,7 +133,7 @@ } [DynamicVisible] - [PropertyOrder(4)] + [PropertyOrder(contributionPropertyIndex)] [ResourcesCategory(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.Categories_General))] [ResourcesDisplayName(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.FailureMechanism_Contribution_DisplayName))] [ResourcesDescription(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.FailureMechanism_Contribution_Description))] @@ -138,7 +145,7 @@ } } - [PropertyOrder(5)] + [PropertyOrder(isRelevantPropertyIndex)] [ResourcesCategory(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.Categories_General))] [ResourcesDisplayName(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.FailureMechanism_IsRelevant_DisplayName))] [ResourcesDescription(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.FailureMechanism_IsRelevant_Description))] Index: Ringtoets/Integration/src/Ringtoets.Integration.Forms/PropertyClasses/StandAlone/StandAloneFailureMechanismProperties.cs =================================================================== diff -u -r302158276367ff19c0f16f7779a0245fe4ae8659 -r60e5e7fd23d7d028fbf73251126ab5672d5ca8b9 --- Ringtoets/Integration/src/Ringtoets.Integration.Forms/PropertyClasses/StandAlone/StandAloneFailureMechanismProperties.cs (.../StandAloneFailureMechanismProperties.cs) (revision 302158276367ff19c0f16f7779a0245fe4ae8659) +++ Ringtoets/Integration/src/Ringtoets.Integration.Forms/PropertyClasses/StandAlone/StandAloneFailureMechanismProperties.cs (.../StandAloneFailureMechanismProperties.cs) (revision 60e5e7fd23d7d028fbf73251126ab5672d5ca8b9) @@ -37,6 +37,12 @@ /// public class StandAloneFailureMechanismProperties : ObjectProperties { + private const int namePropertyIndex = 1; + private const int codePropertyIndex = 2; + private const int groupPropertyIndex = 3; + private const int contributionPropertyIndex = 4; + private const int isRelevantPropertyIndex = 5; + private readonly IAssessmentSection assessmentSection; /// @@ -80,7 +86,7 @@ #region General - [PropertyOrder(1)] + [PropertyOrder(namePropertyIndex)] [ResourcesCategory(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.Categories_General))] [ResourcesDisplayName(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.FailureMechanism_Name_DisplayName))] [ResourcesDescription(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.FailureMechanism_Name_Description))] @@ -92,7 +98,7 @@ } } - [PropertyOrder(2)] + [PropertyOrder(codePropertyIndex)] [ResourcesCategory(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.Categories_General))] [ResourcesDisplayName(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.FailureMechanism_Code_DisplayName))] [ResourcesDescription(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.FailureMechanism_Code_Description))] @@ -104,7 +110,7 @@ } } - [PropertyOrder(3)] + [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))] @@ -117,7 +123,7 @@ } [DynamicVisible] - [PropertyOrder(4)] + [PropertyOrder(contributionPropertyIndex)] [ResourcesCategory(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.Categories_General))] [ResourcesDisplayName(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.FailureMechanism_Contribution_DisplayName))] [ResourcesDescription(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.FailureMechanism_Contribution_Description))] @@ -130,7 +136,7 @@ } } - [PropertyOrder(5)] + [PropertyOrder(isRelevantPropertyIndex)] [ResourcesCategory(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.Categories_General))] [ResourcesDisplayName(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.FailureMechanism_IsRelevant_DisplayName))] [ResourcesDescription(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.FailureMechanism_IsRelevant_Description))] Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PropertyClasses/StandAlone/MacroStabilityOutwardsFailureMechanismPropertiesTest.cs =================================================================== diff -u -r463d6edb7c7fb24d0f394dc537dd794de660c3d5 -r60e5e7fd23d7d028fbf73251126ab5672d5ca8b9 --- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PropertyClasses/StandAlone/MacroStabilityOutwardsFailureMechanismPropertiesTest.cs (.../MacroStabilityOutwardsFailureMechanismPropertiesTest.cs) (revision 463d6edb7c7fb24d0f394dc537dd794de660c3d5) +++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PropertyClasses/StandAlone/MacroStabilityOutwardsFailureMechanismPropertiesTest.cs (.../MacroStabilityOutwardsFailureMechanismPropertiesTest.cs) (revision 60e5e7fd23d7d028fbf73251126ab5672d5ca8b9) @@ -36,6 +36,16 @@ { public class MacroStabilityOutwardsFailureMechanismPropertiesTest { + private const int namePropertyIndex = 0; + private const int codePropertyIndex = 1; + private const int groupPropertyIndex = 2; + private const int contributionPropertyIndex = 3; + private const int isRelevantPropertyIndex = 4; + private const int aPropertyIndex = 5; + private const int bPropertyIndex = 6; + private const int sectionLengthPropertyIndex = 7; + private const int nPropertyIndex = 8; + [Test] public void Constructor_DataIsNull_ThrowArgumentNullException() { @@ -101,62 +111,62 @@ const string generalCategory = "Algemeen"; const string lengthEffectCategory = "Lengte-effect parameters"; - PropertyDescriptor nameProperty = dynamicProperties[0]; + PropertyDescriptor nameProperty = dynamicProperties[namePropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(nameProperty, generalCategory, "Naam", "De naam van het toetsspoor.", true); - PropertyDescriptor labelProperty = dynamicProperties[1]; + PropertyDescriptor labelProperty = dynamicProperties[codePropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(labelProperty, generalCategory, "Label", "Het label van het toetsspoor.", true); - PropertyDescriptor groupProperty = dynamicProperties[2]; + PropertyDescriptor groupProperty = dynamicProperties[groupPropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(groupProperty, generalCategory, "Groep", "De groep waar het toetsspoor toe behoort.", true); - PropertyDescriptor contributionProperty = dynamicProperties[3]; + PropertyDescriptor contributionProperty = dynamicProperties[contributionPropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(contributionProperty, generalCategory, "Faalkansbijdrage [%]", "Procentuele bijdrage van dit toetsspoor aan de totale overstromingskans van het traject.", true); - PropertyDescriptor isRelevantProperty = dynamicProperties[4]; + PropertyDescriptor isRelevantProperty = dynamicProperties[isRelevantPropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(isRelevantProperty, generalCategory, "Is relevant", "Geeft aan of dit toetsspoor relevant is of niet.", true); - PropertyDescriptor aProperty = dynamicProperties[5]; + PropertyDescriptor aProperty = dynamicProperties[aPropertyIndex]; 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[6]; + PropertyDescriptor bProperty = dynamicProperties[bPropertyIndex]; 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[7]; + PropertyDescriptor sectionLengthProperty = dynamicProperties[sectionLengthPropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(sectionLengthProperty, lengthEffectCategory, "Lengte* [m]", "Totale lengte van het traject in meters (afgerond).", true); - PropertyDescriptor nProperty = dynamicProperties[8]; + PropertyDescriptor nProperty = dynamicProperties[nPropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(nProperty, lengthEffectCategory, "N* [-]", @@ -182,28 +192,28 @@ const string generalCategory = "Algemeen"; - PropertyDescriptor nameProperty = dynamicProperties[0]; + PropertyDescriptor nameProperty = dynamicProperties[namePropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(nameProperty, generalCategory, "Naam", "De naam van het toetsspoor.", true); - PropertyDescriptor labelProperty = dynamicProperties[1]; + PropertyDescriptor labelProperty = dynamicProperties[codePropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(labelProperty, generalCategory, "Label", "Het label van het toetsspoor.", true); - PropertyDescriptor groupProperty = dynamicProperties[2]; + PropertyDescriptor groupProperty = dynamicProperties[groupPropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(groupProperty, generalCategory, "Groep", "De groep waar het toetsspoor toe behoort.", true); - PropertyDescriptor isRelevantProperty = dynamicProperties[3]; + PropertyDescriptor isRelevantProperty = dynamicProperties[isRelevantPropertyIndex - 1]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(isRelevantProperty, generalCategory, "Is relevant", Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PropertyClasses/StandAlone/PipingStructureFailureMechanismPropertiesTest.cs =================================================================== diff -u -r09377680ef5a65687f6742abd2a3d2077d72557a -r60e5e7fd23d7d028fbf73251126ab5672d5ca8b9 --- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PropertyClasses/StandAlone/PipingStructureFailureMechanismPropertiesTest.cs (.../PipingStructureFailureMechanismPropertiesTest.cs) (revision 09377680ef5a65687f6742abd2a3d2077d72557a) +++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PropertyClasses/StandAlone/PipingStructureFailureMechanismPropertiesTest.cs (.../PipingStructureFailureMechanismPropertiesTest.cs) (revision 60e5e7fd23d7d028fbf73251126ab5672d5ca8b9) @@ -35,6 +35,13 @@ { public class PipingStructureFailureMechanismPropertiesTest { + private const int namePropertyIndex = 0; + private const int codePropertyIndex = 1; + private const int groupPropertyIndex = 2; + private const int contributionPropertyIndex = 3; + private const int isRelevantPropertyIndex = 4; + private const int nPropertyIndex = 5; + [Test] public void Constructor_DataIsNull_ThrowArgumentNullException() { @@ -93,42 +100,42 @@ const string generalCategory = "Algemeen"; const string lengthEffectCategory = "Lengte-effect parameters"; - PropertyDescriptor nameProperty = dynamicProperties[0]; + PropertyDescriptor nameProperty = dynamicProperties[namePropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(nameProperty, generalCategory, "Naam", "De naam van het toetsspoor.", true); - PropertyDescriptor labelProperty = dynamicProperties[1]; + PropertyDescriptor labelProperty = dynamicProperties[codePropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(labelProperty, generalCategory, "Label", "Het label van het toetsspoor.", true); - PropertyDescriptor groupProperty = dynamicProperties[2]; + PropertyDescriptor groupProperty = dynamicProperties[groupPropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(groupProperty, generalCategory, "Groep", "De groep waar het toetsspoor toe behoort.", true); - PropertyDescriptor contributionProperty = dynamicProperties[3]; + PropertyDescriptor contributionProperty = dynamicProperties[contributionPropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(contributionProperty, generalCategory, "Faalkansbijdrage [%]", "Procentuele bijdrage van dit toetsspoor aan de totale overstromingskans van het traject.", true); - PropertyDescriptor isRelevantProperty = dynamicProperties[4]; + PropertyDescriptor isRelevantProperty = dynamicProperties[isRelevantPropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(isRelevantProperty, generalCategory, "Is relevant", "Geeft aan of dit toetsspoor relevant is of niet.", true); - PropertyDescriptor nProperty = dynamicProperties[5]; + PropertyDescriptor nProperty = dynamicProperties[nPropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(nProperty, lengthEffectCategory, "N [-]", @@ -153,28 +160,28 @@ const string generalCategory = "Algemeen"; - PropertyDescriptor nameProperty = dynamicProperties[0]; + PropertyDescriptor nameProperty = dynamicProperties[namePropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(nameProperty, generalCategory, "Naam", "De naam van het toetsspoor.", true); - PropertyDescriptor labelProperty = dynamicProperties[1]; + PropertyDescriptor labelProperty = dynamicProperties[codePropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(labelProperty, generalCategory, "Label", "Het label van het toetsspoor.", true); - PropertyDescriptor groupProperty = dynamicProperties[2]; + PropertyDescriptor groupProperty = dynamicProperties[groupPropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(groupProperty, generalCategory, "Groep", "De groep waar het toetsspoor toe behoort.", true); - PropertyDescriptor isRelevantProperty = dynamicProperties[3]; + PropertyDescriptor isRelevantProperty = dynamicProperties[isRelevantPropertyIndex - 1]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(isRelevantProperty, generalCategory, "Is relevant", Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PropertyClasses/StandAlone/StandAloneFailureMechanismPropertiesTest.cs =================================================================== diff -u -r302158276367ff19c0f16f7779a0245fe4ae8659 -r60e5e7fd23d7d028fbf73251126ab5672d5ca8b9 --- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PropertyClasses/StandAlone/StandAloneFailureMechanismPropertiesTest.cs (.../StandAloneFailureMechanismPropertiesTest.cs) (revision 302158276367ff19c0f16f7779a0245fe4ae8659) +++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PropertyClasses/StandAlone/StandAloneFailureMechanismPropertiesTest.cs (.../StandAloneFailureMechanismPropertiesTest.cs) (revision 60e5e7fd23d7d028fbf73251126ab5672d5ca8b9) @@ -36,6 +36,12 @@ [TestFixture] public class StandAloneFailureMechanismPropertiesTest { + private const int namePropertyIndex = 0; + private const int codePropertyIndex = 1; + private const int groupPropertyIndex = 2; + private const int contributionPropertyIndex = 3; + private const int isRelevantPropertyIndex = 4; + [Test] public void Constructor_FailureMechanismNull_ThrowsArgumentNullException() { @@ -122,35 +128,35 @@ PropertyDescriptorCollection dynamicProperties = PropertiesTestHelper.GetAllVisiblePropertyDescriptors(properties); Assert.AreEqual(5, dynamicProperties.Count); - PropertyDescriptor nameProperty = dynamicProperties[0]; + PropertyDescriptor nameProperty = dynamicProperties[namePropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(nameProperty, generalCategory, "Naam", "De naam van het toetsspoor.", true); - PropertyDescriptor codeProperty = dynamicProperties[1]; + PropertyDescriptor codeProperty = dynamicProperties[codePropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(codeProperty, generalCategory, "Label", "Het label van het toetsspoor.", true); - PropertyDescriptor groupProperty = dynamicProperties[2]; + PropertyDescriptor groupProperty = dynamicProperties[groupPropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(groupProperty, generalCategory, "Groep", "De groep waar het toetsspoor toe behoort.", true); - PropertyDescriptor contributionProperty = dynamicProperties[3]; + PropertyDescriptor contributionProperty = dynamicProperties[contributionPropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(contributionProperty, generalCategory, "Faalkansbijdrage [%]", "Procentuele bijdrage van dit toetsspoor aan de totale overstromingskans van het traject.", true); - PropertyDescriptor isRelevantProperty = dynamicProperties[4]; + PropertyDescriptor isRelevantProperty = dynamicProperties[isRelevantPropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(isRelevantProperty, generalCategory, "Is relevant", @@ -181,28 +187,28 @@ const string generalCategory = "Algemeen"; - PropertyDescriptor nameProperty = dynamicProperties[0]; + PropertyDescriptor nameProperty = dynamicProperties[namePropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(nameProperty, generalCategory, "Naam", "De naam van het toetsspoor.", true); - PropertyDescriptor labelProperty = dynamicProperties[1]; + PropertyDescriptor labelProperty = dynamicProperties[codePropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(labelProperty, generalCategory, "Label", "Het label van het toetsspoor.", true); - PropertyDescriptor groupProperty = dynamicProperties[2]; + PropertyDescriptor groupProperty = dynamicProperties[groupPropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(groupProperty, generalCategory, "Groep", "De groep waar het toetsspoor toe behoort.", true); - PropertyDescriptor isRelevantProperty = dynamicProperties[3]; + PropertyDescriptor isRelevantProperty = dynamicProperties[isRelevantPropertyIndex - 1]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(isRelevantProperty, generalCategory, "Is relevant", Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/PropertyClasses/MacroStabilityInwardsFailureMechanismProperties.cs =================================================================== diff -u -rf61d00442e2dc931b74e78a5942c4ad686130c5f -r60e5e7fd23d7d028fbf73251126ab5672d5ca8b9 --- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/PropertyClasses/MacroStabilityInwardsFailureMechanismProperties.cs (.../MacroStabilityInwardsFailureMechanismProperties.cs) (revision f61d00442e2dc931b74e78a5942c4ad686130c5f) +++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/PropertyClasses/MacroStabilityInwardsFailureMechanismProperties.cs (.../MacroStabilityInwardsFailureMechanismProperties.cs) (revision 60e5e7fd23d7d028fbf73251126ab5672d5ca8b9) @@ -35,6 +35,16 @@ /// public class MacroStabilityInwardsFailureMechanismProperties : ObjectProperties { + private const int namePropertyIndex = 1; + private const int codePropertyIndex = 2; + private const int groupPropertyIndex = 3; + private const int contributionPropertyIndex = 4; + private const int isRelevantPropertyIndex = 5; + private const int aPropertyIndex = 6; + private const int bPropertyIndex = 7; + private const int sectionLengthPropertyIndex = 8; + private const int nPropertyIndex = 9; + /// /// Creates a new instance of . /// @@ -67,7 +77,7 @@ #region General - [PropertyOrder(1)] + [PropertyOrder(namePropertyIndex)] [ResourcesCategory(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.Categories_General))] [ResourcesDisplayName(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.FailureMechanism_Name_DisplayName))] [ResourcesDescription(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.FailureMechanism_Name_Description))] @@ -79,7 +89,7 @@ } } - [PropertyOrder(2)] + [PropertyOrder(codePropertyIndex)] [ResourcesCategory(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.Categories_General))] [ResourcesDisplayName(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.FailureMechanism_Code_DisplayName))] [ResourcesDescription(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.FailureMechanism_Code_Description))] @@ -91,7 +101,7 @@ } } - [PropertyOrder(3)] + [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))] @@ -104,7 +114,7 @@ } [DynamicVisible] - [PropertyOrder(4)] + [PropertyOrder(contributionPropertyIndex)] [ResourcesCategory(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.Categories_General))] [ResourcesDisplayName(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.FailureMechanism_Contribution_DisplayName))] [ResourcesDescription(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.FailureMechanism_Contribution_Description))] @@ -116,7 +126,7 @@ } } - [PropertyOrder(5)] + [PropertyOrder(isRelevantPropertyIndex)] [ResourcesCategory(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.Categories_General))] [ResourcesDisplayName(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.FailureMechanism_IsRelevant_DisplayName))] [ResourcesDescription(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.FailureMechanism_IsRelevant_Description))] @@ -133,7 +143,7 @@ #region Length effect parameters [DynamicVisible] - [PropertyOrder(21)] + [PropertyOrder(aPropertyIndex)] [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))] @@ -151,7 +161,7 @@ } [DynamicVisible] - [PropertyOrder(22)] + [PropertyOrder(bPropertyIndex)] [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))] @@ -164,7 +174,7 @@ } [DynamicVisible] - [PropertyOrder(23)] + [PropertyOrder(sectionLengthPropertyIndex)] [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))] @@ -177,7 +187,7 @@ } [DynamicVisible] - [PropertyOrder(24)] + [PropertyOrder(nPropertyIndex)] [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/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/PropertyClasses/MacroStabilityInwardsFailureMechanismPropertiesTest.cs =================================================================== diff -u -rf61d00442e2dc931b74e78a5942c4ad686130c5f -r60e5e7fd23d7d028fbf73251126ab5672d5ca8b9 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/PropertyClasses/MacroStabilityInwardsFailureMechanismPropertiesTest.cs (.../MacroStabilityInwardsFailureMechanismPropertiesTest.cs) (revision f61d00442e2dc931b74e78a5942c4ad686130c5f) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/PropertyClasses/MacroStabilityInwardsFailureMechanismPropertiesTest.cs (.../MacroStabilityInwardsFailureMechanismPropertiesTest.cs) (revision 60e5e7fd23d7d028fbf73251126ab5672d5ca8b9) @@ -36,6 +36,16 @@ [TestFixture] public class MacroStabilityInwardsFailureMechanismPropertiesTest { + private const int namePropertyIndex = 0; + private const int codePropertyIndex = 1; + private const int groupPropertyIndex = 2; + private const int contributionPropertyIndex = 3; + private const int isRelevantPropertyIndex = 4; + private const int aPropertyIndex = 5; + private const int bPropertyIndex = 6; + private const int sectionLengthPropertyIndex = 7; + private const int nPropertyIndex = 8; + [Test] public void Constructor_DataNull_ThrowArgumentNullException() { @@ -102,62 +112,62 @@ const string generalCategory = "Algemeen"; const string lengthEffectCategory = "Lengte-effect parameters"; - PropertyDescriptor nameProperty = dynamicProperties[0]; + PropertyDescriptor nameProperty = dynamicProperties[namePropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(nameProperty, generalCategory, "Naam", "De naam van het toetsspoor.", true); - PropertyDescriptor labelProperty = dynamicProperties[1]; + PropertyDescriptor labelProperty = dynamicProperties[codePropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(labelProperty, generalCategory, "Label", "Het label van het toetsspoor.", true); - PropertyDescriptor groupProperty = dynamicProperties[2]; + PropertyDescriptor groupProperty = dynamicProperties[groupPropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(groupProperty, generalCategory, "Groep", "De groep waar het toetsspoor toe behoort.", true); - PropertyDescriptor contributionProperty = dynamicProperties[3]; + PropertyDescriptor contributionProperty = dynamicProperties[contributionPropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(contributionProperty, generalCategory, "Faalkansbijdrage [%]", "Procentuele bijdrage van dit toetsspoor aan de totale overstromingskans van het traject.", true); - PropertyDescriptor isRelevantProperty = dynamicProperties[4]; + PropertyDescriptor isRelevantProperty = dynamicProperties[isRelevantPropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(isRelevantProperty, generalCategory, "Is relevant", "Geeft aan of dit toetsspoor relevant is of niet.", true); - PropertyDescriptor aProperty = dynamicProperties[5]; + PropertyDescriptor aProperty = dynamicProperties[aPropertyIndex]; 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[6]; + PropertyDescriptor bProperty = dynamicProperties[bPropertyIndex]; 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[7]; + PropertyDescriptor sectionLengthProperty = dynamicProperties[sectionLengthPropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(sectionLengthProperty, lengthEffectCategory, "Lengte* [m]", "Totale lengte van het traject in meters (afgerond).", true); - PropertyDescriptor nProperty = dynamicProperties[8]; + PropertyDescriptor nProperty = dynamicProperties[nPropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(nProperty, lengthEffectCategory, "N* [-]", @@ -183,28 +193,28 @@ const string generalCategory = "Algemeen"; - PropertyDescriptor nameProperty = dynamicProperties[0]; + PropertyDescriptor nameProperty = dynamicProperties[namePropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(nameProperty, generalCategory, "Naam", "De naam van het toetsspoor.", true); - PropertyDescriptor labelProperty = dynamicProperties[1]; + PropertyDescriptor labelProperty = dynamicProperties[codePropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(labelProperty, generalCategory, "Label", "Het label van het toetsspoor.", true); - PropertyDescriptor groupProperty = dynamicProperties[2]; + PropertyDescriptor groupProperty = dynamicProperties[groupPropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(groupProperty, generalCategory, "Groep", "De groep waar het toetsspoor toe behoort.", true); - PropertyDescriptor isRelevantProperty = dynamicProperties[3]; + PropertyDescriptor isRelevantProperty = dynamicProperties[isRelevantPropertyIndex - 1]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(isRelevantProperty, generalCategory, "Is relevant", Index: Ringtoets/Piping/src/Ringtoets.Piping.Forms/PropertyClasses/PipingFailureMechanismProperties.cs =================================================================== diff -u -r530541f36c86a4dce7c73c075ac2a41a9bd9f730 -r60e5e7fd23d7d028fbf73251126ab5672d5ca8b9 --- Ringtoets/Piping/src/Ringtoets.Piping.Forms/PropertyClasses/PipingFailureMechanismProperties.cs (.../PipingFailureMechanismProperties.cs) (revision 530541f36c86a4dce7c73c075ac2a41a9bd9f730) +++ Ringtoets/Piping/src/Ringtoets.Piping.Forms/PropertyClasses/PipingFailureMechanismProperties.cs (.../PipingFailureMechanismProperties.cs) (revision 60e5e7fd23d7d028fbf73251126ab5672d5ca8b9) @@ -39,6 +39,27 @@ /// public class PipingFailureMechanismProperties : ObjectProperties { + private const int namePropertyIndex = 1; + private const int codePropertyIndex = 2; + private const int groupPropertyIndex = 3; + private const int contributionPropertyIndex = 4; + private const int isRelevantPropertyIndex = 5; + private const int waterVolumetricWeightPropertyIndex = 6; + private const int upLiftModelFactorPropertyIndex = 7; + private const int sellMeijerModelFactorPropertyIndex = 8; + private const int aPropertyIndex = 9; + private const int bPropertyIndex = 10; + private const int sectionLengthPropertyIndex = 11; + private const int nPropertyIndex = 12; + private const int criticalHeaveGradientPropertyIndex = 13; + private const int sandParticlesVolumetricWeightPropertyIndex = 14; + private const int whitesDragCoefficientPropertyIndex = 15; + private const int beddingAnglePropertyIndex = 16; + private const int waterKinematicViscosityPropertyIndex = 17; + private const int gravityPropertyIndex = 18; + private const int meanDiameter70PropertyIndex = 19; + private const int sellMeijerReductionFactorPropertyIndex = 20; + private readonly IFailureMechanismPropertyChangeHandler propertyChangeHandler; /// @@ -67,7 +88,7 @@ #region Heave [DynamicVisible] - [PropertyOrder(31)] + [PropertyOrder(criticalHeaveGradientPropertyIndex)] [ResourcesCategory(typeof(Resources), nameof(Resources.Categories_Heave))] [ResourcesDisplayName(typeof(Resources), nameof(Resources.GeneralPipingInput_CriticalHeaveGradient_DisplayName))] [ResourcesDescription(typeof(Resources), nameof(Resources.GeneralPipingInput_CriticalHeaveGradient_Description))] @@ -134,7 +155,7 @@ #region General - [PropertyOrder(1)] + [PropertyOrder(namePropertyIndex)] [ResourcesCategory(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.Categories_General))] [ResourcesDisplayName(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.FailureMechanism_Name_DisplayName))] [ResourcesDescription(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.FailureMechanism_Name_Description))] @@ -146,7 +167,7 @@ } } - [PropertyOrder(2)] + [PropertyOrder(codePropertyIndex)] [ResourcesCategory(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.Categories_General))] [ResourcesDisplayName(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.FailureMechanism_Code_DisplayName))] [ResourcesDescription(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.FailureMechanism_Code_Description))] @@ -158,7 +179,7 @@ } } - [PropertyOrder(3)] + [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))] @@ -171,7 +192,7 @@ } [DynamicVisible] - [PropertyOrder(4)] + [PropertyOrder(contributionPropertyIndex)] [ResourcesCategory(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.Categories_General))] [ResourcesDisplayName(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.FailureMechanism_Contribution_DisplayName))] [ResourcesDescription(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.FailureMechanism_Contribution_Description))] @@ -183,7 +204,7 @@ } } - [PropertyOrder(5)] + [PropertyOrder(isRelevantPropertyIndex)] [ResourcesCategory(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.Categories_General))] [ResourcesDisplayName(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.FailureMechanism_IsRelevant_DisplayName))] [ResourcesDescription(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.FailureMechanism_IsRelevant_Description))] @@ -196,7 +217,7 @@ } [DynamicVisible] - [PropertyOrder(6)] + [PropertyOrder(waterVolumetricWeightPropertyIndex)] [ResourcesCategory(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.Categories_General))] [ResourcesDisplayName(typeof(Resources), nameof(Resources.GeneralPipingInput_WaterVolumetricWeight_DisplayName))] [ResourcesDescription(typeof(Resources), nameof(Resources.GeneralPipingInput_WaterVolumetricWeight_Description))] @@ -217,7 +238,7 @@ #region Length effect parameters [DynamicVisible] - [PropertyOrder(21)] + [PropertyOrder(aPropertyIndex)] [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))] @@ -235,7 +256,7 @@ } [DynamicVisible] - [PropertyOrder(22)] + [PropertyOrder(bPropertyIndex)] [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))] @@ -248,7 +269,7 @@ } [DynamicVisible] - [PropertyOrder(23)] + [PropertyOrder(sectionLengthPropertyIndex)] [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))] @@ -261,7 +282,7 @@ } [DynamicVisible] - [PropertyOrder(24)] + [PropertyOrder(nPropertyIndex)] [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))] @@ -279,7 +300,7 @@ #region Sellmeijer [DynamicVisible] - [PropertyOrder(51)] + [PropertyOrder(sandParticlesVolumetricWeightPropertyIndex)] [ResourcesCategory(typeof(Resources), nameof(Resources.Categories_Sellmeijer))] [ResourcesDisplayName(typeof(Resources), nameof(Resources.GeneralPipingInput_SandParticlesVolumicWeight_DisplayName))] [ResourcesDescription(typeof(Resources), nameof(Resources.GeneralPipingInput_SandParticlesVolumicWeight_Description))] @@ -292,7 +313,7 @@ } [DynamicVisible] - [PropertyOrder(52)] + [PropertyOrder(whitesDragCoefficientPropertyIndex)] [ResourcesCategory(typeof(Resources), nameof(Resources.Categories_Sellmeijer))] [ResourcesDisplayName(typeof(Resources), nameof(Resources.GeneralPipingInput_WhitesDragCoefficient_DisplayName))] [ResourcesDescription(typeof(Resources), nameof(Resources.GeneralPipingInput_WhitesDragCoefficient_Description))] @@ -305,7 +326,7 @@ } [DynamicVisible] - [PropertyOrder(53)] + [PropertyOrder(beddingAnglePropertyIndex)] [ResourcesCategory(typeof(Resources), nameof(Resources.Categories_Sellmeijer))] [ResourcesDisplayName(typeof(Resources), nameof(Resources.GeneralPipingInput_BeddingAngle_DisplayName))] [ResourcesDescription(typeof(Resources), nameof(Resources.GeneralPipingInput_BeddingAngle_Description))] @@ -318,7 +339,7 @@ } [DynamicVisible] - [PropertyOrder(54)] + [PropertyOrder(waterKinematicViscosityPropertyIndex)] [ResourcesCategory(typeof(Resources), nameof(Resources.Categories_Sellmeijer))] [ResourcesDisplayName(typeof(Resources), nameof(Resources.GeneralPipingInput_WaterKinematicViscosity_DisplayName))] [ResourcesDescription(typeof(Resources), nameof(Resources.GeneralPipingInput_WaterKinematicViscosity_Description))] @@ -331,7 +352,7 @@ } [DynamicVisible] - [PropertyOrder(55)] + [PropertyOrder(gravityPropertyIndex)] [ResourcesCategory(typeof(Resources), nameof(Resources.Categories_Sellmeijer))] [ResourcesDisplayName(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.GravitationalAcceleration_DisplayName))] [ResourcesDescription(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.GravitationalAcceleration_Description))] @@ -344,7 +365,7 @@ } [DynamicVisible] - [PropertyOrder(56)] + [PropertyOrder(meanDiameter70PropertyIndex)] [ResourcesCategory(typeof(Resources), nameof(Resources.Categories_Sellmeijer))] [ResourcesDisplayName(typeof(Resources), nameof(Resources.GeneralPipingInput_MeanDiameter70_DisplayName))] [ResourcesDescription(typeof(Resources), nameof(Resources.GeneralPipingInput_MeanDiameter70_Description))] @@ -357,7 +378,7 @@ } [DynamicVisible] - [PropertyOrder(57)] + [PropertyOrder(sellMeijerReductionFactorPropertyIndex)] [ResourcesCategory(typeof(Resources), nameof(Resources.Categories_Sellmeijer))] [ResourcesDisplayName(typeof(Resources), nameof(Resources.GeneralPipingInput_SellmeijerReductionFactor_DisplayName))] [ResourcesDescription(typeof(Resources), nameof(Resources.GeneralPipingInput_SellmeijerReductionFactor_Description))] @@ -374,7 +395,7 @@ #region Model factors [DynamicVisible] - [PropertyOrder(11)] + [PropertyOrder(upLiftModelFactorPropertyIndex)] [ResourcesCategory(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.Categories_ModelSettings))] [ResourcesDisplayName(typeof(Resources), nameof(Resources.GeneralPipingInput_UpliftModelFactor_DisplayName))] [ResourcesDescription(typeof(Resources), nameof(Resources.GeneralPipingInput_UpliftModelFactor_Description))] @@ -387,7 +408,7 @@ } [DynamicVisible] - [PropertyOrder(12)] + [PropertyOrder(sellMeijerModelFactorPropertyIndex)] [ResourcesCategory(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.Categories_ModelSettings))] [ResourcesDisplayName(typeof(Resources), nameof(Resources.GeneralPipingInput_SellmeijerModelFactor_DisplayName))] [ResourcesDescription(typeof(Resources), nameof(Resources.GeneralPipingInput_SellmeijerModelFactor_Description))] Index: Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/PropertyClasses/PipingFailureMechanismPropertiesTest.cs =================================================================== diff -u -r530541f36c86a4dce7c73c075ac2a41a9bd9f730 -r60e5e7fd23d7d028fbf73251126ab5672d5ca8b9 --- Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/PropertyClasses/PipingFailureMechanismPropertiesTest.cs (.../PipingFailureMechanismPropertiesTest.cs) (revision 530541f36c86a4dce7c73c075ac2a41a9bd9f730) +++ Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/PropertyClasses/PipingFailureMechanismPropertiesTest.cs (.../PipingFailureMechanismPropertiesTest.cs) (revision 60e5e7fd23d7d028fbf73251126ab5672d5ca8b9) @@ -39,6 +39,27 @@ [TestFixture] public class PipingFailureMechanismPropertiesTest { + private const int namePropertyIndex = 0; + private const int codePropertyIndex = 1; + private const int groupPropertyIndex = 2; + private const int contributionPropertyIndex = 3; + private const int isRelevantPropertyIndex = 4; + private const int waterVolumetricWeightPropertyIndex = 5; + private const int upLiftModelFactorPropertyIndex = 6; + private const int sellMeijerModelFactorPropertyIndex = 7; + private const int aPropertyIndex = 8; + private const int bPropertyIndex = 9; + private const int sectionLengthPropertyIndex = 10; + private const int nPropertyIndex = 11; + private const int criticalHeaveGradientPropertyIndex = 12; + private const int sandParticlesVolumetricWeightPropertyIndex = 13; + private const int whitesDragCoefficientPropertyIndex = 14; + private const int beddingAnglePropertyIndex = 15; + private const int waterKinematicViscosityPropertyIndex = 16; + private const int gravityPropertyIndex = 17; + private const int meanDiameter70PropertyIndex = 18; + private const int sellMeijerReductionFactorPropertyIndex = 19; + [Test] public void Constructor_DataIsNull_ThrowArgumentNullException() { @@ -158,138 +179,138 @@ const string lengthEffectCategory = "Lengte-effect parameters"; const string sellmeijerCategory = "Terugschrijdende erosie (Sellmeijer)"; - PropertyDescriptor nameProperty = dynamicProperties[0]; + PropertyDescriptor nameProperty = dynamicProperties[namePropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(nameProperty, generalCategory, "Naam", "De naam van het toetsspoor.", true); - PropertyDescriptor labelProperty = dynamicProperties[1]; + PropertyDescriptor labelProperty = dynamicProperties[codePropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(labelProperty, generalCategory, "Label", "Het label van het toetsspoor.", true); - PropertyDescriptor groupProperty = dynamicProperties[2]; + PropertyDescriptor groupProperty = dynamicProperties[groupPropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(groupProperty, generalCategory, "Groep", "De groep waar het toetsspoor toe behoort.", true); - PropertyDescriptor contributionProperty = dynamicProperties[3]; + PropertyDescriptor contributionProperty = dynamicProperties[contributionPropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(contributionProperty, generalCategory, "Faalkansbijdrage [%]", "Procentuele bijdrage van dit toetsspoor aan de totale overstromingskans van het traject.", true); - PropertyDescriptor isRelevantProperty = dynamicProperties[4]; + PropertyDescriptor isRelevantProperty = dynamicProperties[isRelevantPropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(isRelevantProperty, generalCategory, "Is relevant", "Geeft aan of dit toetsspoor relevant is of niet.", true); - PropertyDescriptor volumicWeightOfWaterProperty = dynamicProperties[5]; + PropertyDescriptor volumicWeightOfWaterProperty = dynamicProperties[waterVolumetricWeightPropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(volumicWeightOfWaterProperty, generalCategory, "Volumiek gewicht van water [kN/m³]", "Volumiek gewicht van water."); - PropertyDescriptor upliftModelFactorProperty = dynamicProperties[6]; + PropertyDescriptor upliftModelFactorProperty = dynamicProperties[upLiftModelFactorPropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(upliftModelFactorProperty, modelFactorCategory, "Modelfactor opbarsten [-]", "Rekenwaarde om de onzekerheid in het model van opbarsten in rekening te brengen.", true); - PropertyDescriptor sellmeijerModelFactorProperty = dynamicProperties[7]; + PropertyDescriptor sellmeijerModelFactorProperty = dynamicProperties[sellMeijerModelFactorPropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(sellmeijerModelFactorProperty, modelFactorCategory, "Modelfactor piping toegepast op het model van Sellmeijer [-]", "Rekenwaarde om de onzekerheid in het model van Sellmeijer in rekening te brengen.", true); - PropertyDescriptor aProperty = dynamicProperties[8]; + PropertyDescriptor aProperty = dynamicProperties[aPropertyIndex]; 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[9]; + PropertyDescriptor bProperty = dynamicProperties[bPropertyIndex]; 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[10]; + PropertyDescriptor sectionLengthProperty = dynamicProperties[sectionLengthPropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(sectionLengthProperty, lengthEffectCategory, "Lengte* [m]", "Totale lengte van het traject in meters (afgerond).", true); - PropertyDescriptor nProperty = dynamicProperties[11]; + PropertyDescriptor nProperty = dynamicProperties[nPropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(nProperty, lengthEffectCategory, "N* [-]", "De parameter 'N' die gebruikt wordt om het lengte-effect mee te nemen in de beoordeling (afgerond).", true); - PropertyDescriptor criticalHeaveGradientProperty = dynamicProperties[12]; + PropertyDescriptor criticalHeaveGradientProperty = dynamicProperties[criticalHeaveGradientPropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(criticalHeaveGradientProperty, heaveCategory, "Kritiek verhang m.b.t. heave [-]", "Kritiek verhang met betrekking tot heave.", true); - PropertyDescriptor volumetricWeightSandParticlesProperty = dynamicProperties[13]; + PropertyDescriptor volumetricWeightSandParticlesProperty = dynamicProperties[sandParticlesVolumetricWeightPropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(volumetricWeightSandParticlesProperty, sellmeijerCategory, "Volumiek gewicht van de zandkorrels onder water [kN/m³]", "Het (ondergedompelde) volumegewicht van zandkorrelmateriaal van een zandlaag.", true); - PropertyDescriptor whitesDragCoefficientProperty = dynamicProperties[14]; + PropertyDescriptor whitesDragCoefficientProperty = dynamicProperties[whitesDragCoefficientPropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(whitesDragCoefficientProperty, sellmeijerCategory, "Coëfficiënt van White [-]", "Sleepkrachtfactor volgens White.", true); - PropertyDescriptor beddingAngleProperty = dynamicProperties[15]; + PropertyDescriptor beddingAngleProperty = dynamicProperties[beddingAnglePropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(beddingAngleProperty, sellmeijerCategory, "Rolweerstandshoek [°]", "Hoek in het krachtenevenwicht die aangeeft hoeveel weerstand de korrels bieden tegen rollen; ook beddingshoek genoemd.", true); - PropertyDescriptor waterKinematicViscosityProperty = dynamicProperties[16]; + PropertyDescriptor waterKinematicViscosityProperty = dynamicProperties[waterKinematicViscosityPropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(waterKinematicViscosityProperty, sellmeijerCategory, "Kinematische viscositeit van water bij 10° C [m²/s]", "Kinematische viscositeit van water bij 10° C.", true); - PropertyDescriptor gravityProperty = dynamicProperties[17]; + PropertyDescriptor gravityProperty = dynamicProperties[gravityPropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(gravityProperty, sellmeijerCategory, "Valversnelling [m/s²]", "Valversnelling.", true); - PropertyDescriptor meanDiameter70Property = dynamicProperties[18]; + PropertyDescriptor meanDiameter70Property = dynamicProperties[meanDiameter70PropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(meanDiameter70Property, sellmeijerCategory, "Referentiewaarde voor 70%-fraktiel in Sellmeijer regel [m]", "Gemiddelde d70 van de in kleine schaalproeven toegepaste zandsoorten, waarop de formule van Sellmeijer is gefit.", true); - PropertyDescriptor reductionFactorSellmeijerProperty = dynamicProperties[19]; + PropertyDescriptor reductionFactorSellmeijerProperty = dynamicProperties[sellMeijerReductionFactorPropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(reductionFactorSellmeijerProperty, sellmeijerCategory, "Reductiefactor Sellmeijer [-]", @@ -324,28 +345,28 @@ const string generalCategory = "Algemeen"; - PropertyDescriptor nameProperty = dynamicProperties[0]; + PropertyDescriptor nameProperty = dynamicProperties[namePropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(nameProperty, generalCategory, "Naam", "De naam van het toetsspoor.", true); - PropertyDescriptor labelProperty = dynamicProperties[1]; + PropertyDescriptor labelProperty = dynamicProperties[codePropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(labelProperty, generalCategory, "Label", "Het label van het toetsspoor.", true); - PropertyDescriptor groupProperty = dynamicProperties[2]; + PropertyDescriptor groupProperty = dynamicProperties[groupPropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(groupProperty, generalCategory, "Groep", "De groep waar het toetsspoor toe behoort.", true); - PropertyDescriptor isRelevantProperty = dynamicProperties[3]; + PropertyDescriptor isRelevantProperty = dynamicProperties[isRelevantPropertyIndex - 1]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(isRelevantProperty, generalCategory, "Is relevant", @@ -515,7 +536,7 @@ 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))); Assert.AreEqual(isRelevant, properties.DynamicVisibleValidationMethod(nameof(properties.CriticalHeaveGradient))); Assert.AreEqual(isRelevant, properties.DynamicVisibleValidationMethod(nameof(properties.WaterVolumetricWeight))); Index: Ringtoets/StabilityStoneCover/src/Ringtoets.StabilityStoneCover.Forms/PropertyClasses/StabilityStoneCoverFailureMechanismProperties.cs =================================================================== diff -u -rda1301e738dff36a476de7a9cd7c853786391148 -r60e5e7fd23d7d028fbf73251126ab5672d5ca8b9 --- Ringtoets/StabilityStoneCover/src/Ringtoets.StabilityStoneCover.Forms/PropertyClasses/StabilityStoneCoverFailureMechanismProperties.cs (.../StabilityStoneCoverFailureMechanismProperties.cs) (revision da1301e738dff36a476de7a9cd7c853786391148) +++ Ringtoets/StabilityStoneCover/src/Ringtoets.StabilityStoneCover.Forms/PropertyClasses/StabilityStoneCoverFailureMechanismProperties.cs (.../StabilityStoneCoverFailureMechanismProperties.cs) (revision 60e5e7fd23d7d028fbf73251126ab5672d5ca8b9) @@ -37,6 +37,15 @@ /// public class StabilityStoneCoverFailureMechanismProperties : ObjectProperties { + private const int namePropertyIndex = 1; + private const int codePropertyIndex = 2; + private const int groupPropertyIndex = 3; + private const int contributionPropertyIndex = 4; + private const int isRelevantPropertyIndex = 5; + private const int blocksPropertyIndex = 6; + private const int columnsPropertyIndex = 7; + private const int nPropertyIndex = 8; + /// /// Creates a new instance of . /// @@ -55,7 +64,7 @@ #region Length effect parameters [DynamicVisible] - [PropertyOrder(8)] + [PropertyOrder(nPropertyIndex)] [ResourcesCategory(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.Categories_LengthEffect))] [ResourcesDisplayName(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.FailureMechanism_N_DisplayName))] [ResourcesDescription(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.FailureMechanism_N_Description))] @@ -94,7 +103,7 @@ #region General - [PropertyOrder(1)] + [PropertyOrder(namePropertyIndex)] [ResourcesCategory(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.Categories_General))] [ResourcesDisplayName(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.FailureMechanism_Name_DisplayName))] [ResourcesDescription(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.FailureMechanism_Name_Description))] @@ -106,7 +115,7 @@ } } - [PropertyOrder(2)] + [PropertyOrder(codePropertyIndex)] [ResourcesCategory(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.Categories_General))] [ResourcesDisplayName(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.FailureMechanism_Code_DisplayName))] [ResourcesDescription(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.FailureMechanism_Code_Description))] @@ -118,7 +127,7 @@ } } - [PropertyOrder(3)] + [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))] @@ -131,7 +140,7 @@ } [DynamicVisible] - [PropertyOrder(4)] + [PropertyOrder(contributionPropertyIndex)] [ResourcesCategory(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.Categories_General))] [ResourcesDisplayName(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.FailureMechanism_Contribution_DisplayName))] [ResourcesDescription(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.FailureMechanism_Contribution_Description))] @@ -143,7 +152,7 @@ } } - [PropertyOrder(5)] + [PropertyOrder(isRelevantPropertyIndex)] [ResourcesCategory(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.Categories_General))] [ResourcesDisplayName(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.FailureMechanism_IsRelevant_DisplayName))] [ResourcesDescription(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.FailureMechanism_IsRelevant_Description))] @@ -160,7 +169,7 @@ #region Model settings [DynamicVisible] - [PropertyOrder(6)] + [PropertyOrder(blocksPropertyIndex)] [TypeConverter(typeof(ExpandableObjectConverter))] [ResourcesCategory(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.Categories_ModelSettings))] [ResourcesDisplayName(typeof(Resources), nameof(Resources.StabilityStoneCoverWaveConditions_Blocks_DisplayName))] @@ -177,7 +186,7 @@ } [DynamicVisible] - [PropertyOrder(7)] + [PropertyOrder(columnsPropertyIndex)] [TypeConverter(typeof(ExpandableObjectConverter))] [ResourcesCategory(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.Categories_ModelSettings))] [ResourcesDisplayName(typeof(Resources), nameof(Resources.StabilityStoneCoverWaveConditions_Columns_DisplayName))] Index: Ringtoets/StabilityStoneCover/test/Ringtoets.StabilityStoneCover.Forms.Test/PropertyClasses/StabilityStoneCoverFailureMechanismPropertiesTest.cs =================================================================== diff -u -rda1301e738dff36a476de7a9cd7c853786391148 -r60e5e7fd23d7d028fbf73251126ab5672d5ca8b9 --- Ringtoets/StabilityStoneCover/test/Ringtoets.StabilityStoneCover.Forms.Test/PropertyClasses/StabilityStoneCoverFailureMechanismPropertiesTest.cs (.../StabilityStoneCoverFailureMechanismPropertiesTest.cs) (revision da1301e738dff36a476de7a9cd7c853786391148) +++ Ringtoets/StabilityStoneCover/test/Ringtoets.StabilityStoneCover.Forms.Test/PropertyClasses/StabilityStoneCoverFailureMechanismPropertiesTest.cs (.../StabilityStoneCoverFailureMechanismPropertiesTest.cs) (revision 60e5e7fd23d7d028fbf73251126ab5672d5ca8b9) @@ -34,6 +34,15 @@ [TestFixture] public class StabilityStoneCoverFailureMechanismPropertiesTest { + private const int namePropertyIndex = 0; + private const int codePropertyIndex = 1; + private const int groupPropertyIndex = 2; + private const int contributionPropertyIndex = 3; + private const int isRelevantPropertyIndex = 4; + private const int blocksPropertyIndex = 5; + private const int columnsPropertyIndex = 6; + private const int nPropertyIndex = 7; + [Test] public void Constructor_DataIsNull_ThrowArgumentNullException() { @@ -119,56 +128,56 @@ const string modelSettingsCateogry = "Modelinstellingen"; const string lengthEffectCategory = "Lengte-effect parameters"; - PropertyDescriptor nameProperty = dynamicProperties[0]; + PropertyDescriptor nameProperty = dynamicProperties[namePropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(nameProperty, generalCategory, "Naam", "De naam van het toetsspoor.", true); - PropertyDescriptor codeProperty = dynamicProperties[1]; + PropertyDescriptor codeProperty = dynamicProperties[codePropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(codeProperty, generalCategory, "Label", "Het label van het toetsspoor.", true); - PropertyDescriptor groupProperty = dynamicProperties[2]; + PropertyDescriptor groupProperty = dynamicProperties[groupPropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(groupProperty, generalCategory, "Groep", "De groep waar het toetsspoor toe behoort.", true); - PropertyDescriptor contributionProperty = dynamicProperties[3]; + PropertyDescriptor contributionProperty = dynamicProperties[contributionPropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(contributionProperty, generalCategory, "Faalkansbijdrage [%]", "Procentuele bijdrage van dit toetsspoor aan de totale overstromingskans van het traject.", true); - PropertyDescriptor isRelevantProperty = dynamicProperties[4]; + PropertyDescriptor isRelevantProperty = dynamicProperties[isRelevantPropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(isRelevantProperty, generalCategory, "Is relevant", "Geeft aan of dit toetsspoor relevant is of niet.", true); - PropertyDescriptor blocksProperty = dynamicProperties[5]; + PropertyDescriptor blocksProperty = dynamicProperties[blocksPropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(blocksProperty, modelSettingsCateogry, "Blokken", "De modelinstellingen voor het berekenen van golfcondities voor blokken.", true); - PropertyDescriptor columnsProperty = dynamicProperties[6]; + PropertyDescriptor columnsProperty = dynamicProperties[columnsPropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(columnsProperty, modelSettingsCateogry, "Zuilen", "De modelinstellingen voor het berekenen van golfcondities voor zuilen.", true); - PropertyDescriptor nProperty = dynamicProperties[7]; + PropertyDescriptor nProperty = dynamicProperties[nPropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(nProperty, lengthEffectCategory, "N [-]", @@ -193,28 +202,28 @@ const string generalCategory = "Algemeen"; - PropertyDescriptor nameProperty = dynamicProperties[0]; + PropertyDescriptor nameProperty = dynamicProperties[namePropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(nameProperty, generalCategory, "Naam", "De naam van het toetsspoor.", true); - PropertyDescriptor codeProperty = dynamicProperties[1]; + PropertyDescriptor codeProperty = dynamicProperties[codePropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(codeProperty, generalCategory, "Label", "Het label van het toetsspoor.", true); - PropertyDescriptor groupProperty = dynamicProperties[2]; + PropertyDescriptor groupProperty = dynamicProperties[groupPropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(groupProperty, generalCategory, "Groep", "De groep waar het toetsspoor toe behoort.", true); - PropertyDescriptor isRelevantProperty = dynamicProperties[3]; + PropertyDescriptor isRelevantProperty = dynamicProperties[isRelevantPropertyIndex - 1]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(isRelevantProperty, generalCategory, "Is relevant", Index: Ringtoets/WaveImpactAsphaltCover/src/Ringtoets.WaveImpactAsphaltCover.Forms/PropertyClasses/WaveImpactAsphaltCoverFailureMechanismProperties.cs =================================================================== diff -u -r842f9fccda61b1a87f55806e31798e3d76a7d9d1 -r60e5e7fd23d7d028fbf73251126ab5672d5ca8b9 --- Ringtoets/WaveImpactAsphaltCover/src/Ringtoets.WaveImpactAsphaltCover.Forms/PropertyClasses/WaveImpactAsphaltCoverFailureMechanismProperties.cs (.../WaveImpactAsphaltCoverFailureMechanismProperties.cs) (revision 842f9fccda61b1a87f55806e31798e3d76a7d9d1) +++ Ringtoets/WaveImpactAsphaltCover/src/Ringtoets.WaveImpactAsphaltCover.Forms/PropertyClasses/WaveImpactAsphaltCoverFailureMechanismProperties.cs (.../WaveImpactAsphaltCoverFailureMechanismProperties.cs) (revision 60e5e7fd23d7d028fbf73251126ab5672d5ca8b9) @@ -36,6 +36,18 @@ /// public class WaveImpactAsphaltCoverFailureMechanismProperties : ObjectProperties { + private const int namePropertyIndex = 1; + private const int codePropertyIndex = 2; + private const int groupPropertyIndex = 3; + private const int contributionPropertyIndex = 4; + private const int isRelevantPropertyIndex = 5; + private const int sectionLengthPropertyIndex = 6; + private const int deltaLPropertyIndex = 7; + private const int nPropertyIndex = 8; + private const int aPropertyIndex = 9; + private const int bPropertyIndex = 10; + private const int cPropertyIndex = 11; + /// /// Creates a new instance of . /// @@ -75,7 +87,7 @@ #region General - [PropertyOrder(1)] + [PropertyOrder(namePropertyIndex)] [ResourcesCategory(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.Categories_General))] [ResourcesDisplayName(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.FailureMechanism_Name_DisplayName))] [ResourcesDescription(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.FailureMechanism_Name_Description))] @@ -87,7 +99,7 @@ } } - [PropertyOrder(2)] + [PropertyOrder(codePropertyIndex)] [ResourcesCategory(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.Categories_General))] [ResourcesDisplayName(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.FailureMechanism_Code_DisplayName))] [ResourcesDescription(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.FailureMechanism_Code_Description))] @@ -99,7 +111,7 @@ } } - [PropertyOrder(3)] + [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))] @@ -112,7 +124,7 @@ } [DynamicVisible] - [PropertyOrder(4)] + [PropertyOrder(contributionPropertyIndex)] [ResourcesCategory(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.Categories_General))] [ResourcesDisplayName(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.FailureMechanism_Contribution_DisplayName))] [ResourcesDescription(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.FailureMechanism_Contribution_Description))] @@ -124,7 +136,7 @@ } } - [PropertyOrder(5)] + [PropertyOrder(isRelevantPropertyIndex)] [ResourcesCategory(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.Categories_General))] [ResourcesDisplayName(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.FailureMechanism_IsRelevant_DisplayName))] [ResourcesDescription(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.FailureMechanism_IsRelevant_Description))] @@ -141,7 +153,7 @@ #region Length effect parameters [DynamicVisible] - [PropertyOrder(6)] + [PropertyOrder(sectionLengthPropertyIndex)] [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))] @@ -154,7 +166,7 @@ } [DynamicVisible] - [PropertyOrder(7)] + [PropertyOrder(deltaLPropertyIndex)] [ResourcesCategory(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.Categories_LengthEffect))] [ResourcesDisplayName(typeof(Resources), nameof(Resources.WaveImpactAsphaltCoverFailureMechanismProperties_DeltaL_DisplayName))] [ResourcesDescription(typeof(Resources), nameof(Resources.WaveImpactAsphaltCoverFailureMechanismProperties_DeltaL_Description))] @@ -172,7 +184,7 @@ } [DynamicVisible] - [PropertyOrder(8)] + [PropertyOrder(nPropertyIndex)] [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))] @@ -189,7 +201,7 @@ #region Model settings [DynamicVisible] - [PropertyOrder(9)] + [PropertyOrder(aPropertyIndex)] [ResourcesCategory(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.Categories_ModelSettings))] [ResourcesDisplayName(typeof(RingtoetsRevetmentFormsResources), nameof(RingtoetsRevetmentFormsResources.GeneralWaveConditionsInput_A_DisplayName))] [ResourcesDescription(typeof(RingtoetsRevetmentFormsResources), nameof(RingtoetsRevetmentFormsResources.GeneralWaveConditionsInput_A_Description))] @@ -202,7 +214,7 @@ } [DynamicVisible] - [PropertyOrder(10)] + [PropertyOrder(bPropertyIndex)] [ResourcesCategory(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.Categories_ModelSettings))] [ResourcesDisplayName(typeof(RingtoetsRevetmentFormsResources), nameof(RingtoetsRevetmentFormsResources.GeneralWaveConditionsInput_B_DisplayName))] [ResourcesDescription(typeof(RingtoetsRevetmentFormsResources), nameof(RingtoetsRevetmentFormsResources.GeneralWaveConditionsInput_B_Description))] @@ -215,7 +227,7 @@ } [DynamicVisible] - [PropertyOrder(11)] + [PropertyOrder(cPropertyIndex)] [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/WaveImpactAsphaltCover/test/Ringtoets.WaveImpactAsphaltCover.Forms.Test/PropertyClasses/WaveImpactAsphaltCoverFailureMechanismPropertiesTest.cs =================================================================== diff -u -r842f9fccda61b1a87f55806e31798e3d76a7d9d1 -r60e5e7fd23d7d028fbf73251126ab5672d5ca8b9 --- Ringtoets/WaveImpactAsphaltCover/test/Ringtoets.WaveImpactAsphaltCover.Forms.Test/PropertyClasses/WaveImpactAsphaltCoverFailureMechanismPropertiesTest.cs (.../WaveImpactAsphaltCoverFailureMechanismPropertiesTest.cs) (revision 842f9fccda61b1a87f55806e31798e3d76a7d9d1) +++ Ringtoets/WaveImpactAsphaltCover/test/Ringtoets.WaveImpactAsphaltCover.Forms.Test/PropertyClasses/WaveImpactAsphaltCoverFailureMechanismPropertiesTest.cs (.../WaveImpactAsphaltCoverFailureMechanismPropertiesTest.cs) (revision 60e5e7fd23d7d028fbf73251126ab5672d5ca8b9) @@ -36,6 +36,18 @@ [TestFixture] public class WaveImpactAsphaltCoverFailureMechanismPropertiesTest { + private const int namePropertyIndex = 0; + private const int codePropertyIndex = 1; + private const int groupPropertyIndex = 2; + private const int contributionPropertyIndex = 3; + private const int isRelevantPropertyIndex = 4; + private const int sectionLengthPropertyIndex = 5; + private const int deltaLPropertyIndex = 6; + private const int nPropertyIndex = 7; + private const int aPropertyIndex = 8; + private const int bPropertyIndex = 9; + private const int cPropertyIndex = 10; + [Test] public void Constructor_DataNull_ThrowsArgumentNullException() { @@ -106,77 +118,77 @@ const string lengthEffectCategory = "Lengte-effect parameters"; const string modelSettingsCategory = "Modelinstellingen"; - PropertyDescriptor nameProperty = dynamicProperties[0]; + PropertyDescriptor nameProperty = dynamicProperties[namePropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(nameProperty, generalCategory, "Naam", "De naam van het toetsspoor.", true); - PropertyDescriptor codeProperty = dynamicProperties[1]; + PropertyDescriptor codeProperty = dynamicProperties[codePropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(codeProperty, generalCategory, "Label", "Het label van het toetsspoor.", true); - PropertyDescriptor groupProperty = dynamicProperties[2]; + PropertyDescriptor groupProperty = dynamicProperties[groupPropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(groupProperty, generalCategory, "Groep", "De groep waar het toetsspoor toe behoort.", true); - PropertyDescriptor contributionProperty = dynamicProperties[3]; + PropertyDescriptor contributionProperty = dynamicProperties[contributionPropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(contributionProperty, generalCategory, "Faalkansbijdrage [%]", "Procentuele bijdrage van dit toetsspoor aan de totale overstromingskans van het traject.", true); - PropertyDescriptor isRelevantProperty = dynamicProperties[4]; + PropertyDescriptor isRelevantProperty = dynamicProperties[isRelevantPropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(isRelevantProperty, generalCategory, "Is relevant", "Geeft aan of dit toetsspoor relevant is of niet.", true); - PropertyDescriptor sectionLength = dynamicProperties[5]; + PropertyDescriptor sectionLength = dynamicProperties[sectionLengthPropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(sectionLength, lengthEffectCategory, "Lengte* [m]", "Totale lengte van het traject in meters (afgerond).", true); - PropertyDescriptor deltaLProperty = dynamicProperties[6]; + PropertyDescriptor deltaLProperty = dynamicProperties[deltaLPropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(deltaLProperty, lengthEffectCategory, "ΔL [m]", "Lengte van onafhankelijke dijkstrekkingen voor dit toetsspoor."); - PropertyDescriptor nProperty = dynamicProperties[7]; + PropertyDescriptor nProperty = dynamicProperties[nPropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(nProperty, lengthEffectCategory, "N* [-]", "De parameter 'N' die gebruikt wordt om het lengte-effect " + "mee te nemen in de beoordeling (afgerond).", true); - PropertyDescriptor aProperty = dynamicProperties[8]; + PropertyDescriptor aProperty = dynamicProperties[aPropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(aProperty, modelSettingsCategory, "a", "De waarde van de parameter 'a' in de berekening voor golf condities.", true); - PropertyDescriptor bProperty = dynamicProperties[9]; + PropertyDescriptor bProperty = dynamicProperties[bPropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(bProperty, modelSettingsCategory, "b", "De waarde van de parameter 'b' in de berekening voor golf condities.", true); - PropertyDescriptor cProperty = dynamicProperties[10]; + PropertyDescriptor cProperty = dynamicProperties[cPropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(cProperty, modelSettingsCategory, "c", @@ -200,28 +212,28 @@ const string generalCategory = "Algemeen"; - PropertyDescriptor nameProperty = dynamicProperties[0]; + PropertyDescriptor nameProperty = dynamicProperties[namePropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(nameProperty, generalCategory, "Naam", "De naam van het toetsspoor.", true); - PropertyDescriptor codeProperty = dynamicProperties[1]; + PropertyDescriptor codeProperty = dynamicProperties[codePropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(codeProperty, generalCategory, "Label", "Het label van het toetsspoor.", true); - PropertyDescriptor groupProperty = dynamicProperties[2]; + PropertyDescriptor groupProperty = dynamicProperties[groupPropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(groupProperty, generalCategory, "Groep", "De groep waar het toetsspoor toe behoort.", true); - PropertyDescriptor isRelevantProperty = dynamicProperties[3]; + PropertyDescriptor isRelevantProperty = dynamicProperties[isRelevantPropertyIndex - 1]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(isRelevantProperty, generalCategory, "Is relevant",