Index: Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Forms/PropertyClasses/HeightStructuresInputContextProperties.cs =================================================================== diff -u -re390f6a1553c21ed32ebf3426f35cc0924a9900c -rd39966fb0ba934896979db057b1d4b07dad086ed --- Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Forms/PropertyClasses/HeightStructuresInputContextProperties.cs (.../HeightStructuresInputContextProperties.cs) (revision e390f6a1553c21ed32ebf3426f35cc0924a9900c) +++ Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Forms/PropertyClasses/HeightStructuresInputContextProperties.cs (.../HeightStructuresInputContextProperties.cs) (revision d39966fb0ba934896979db057b1d4b07dad086ed) @@ -49,11 +49,11 @@ private const int heightStructurePropertyIndex = 1; private const int heightStructureLocationPropertyIndex = 2; private const int structureNormalOrientationPropertyIndex = 3; - private const int levelCrestStructurePropertyIndex = 4; - private const int allowedLevelIncreaseStoragePropertyIndex = 5; + private const int flowWidthAtBottomProtectionPropertyIndex = 4; + private const int widthFlowAperturesPropertyIndex = 5; private const int storageStructureAreaPropertyIndex = 6; - private const int flowWidthAtBottomProtectionPropertyIndex = 7; - private const int widthFlowAperturesPropertyIndex = 8; + private const int allowedLevelIncreaseStoragePropertyIndex = 7; + private const int levelCrestStructurePropertyIndex = 8; private const int criticalOvertoppingDischargePropertyIndex = 9; private const int failureProbabilityStructureWithErosionPropertyIndex = 10; private const int foreshoreProfilePropertyIndex = 11; @@ -166,34 +166,34 @@ } } - [PropertyOrder(levelCrestStructurePropertyIndex)] + [PropertyOrder(flowWidthAtBottomProtectionPropertyIndex)] [TypeConverter(typeof(ExpandableObjectConverter))] [ResourcesCategory(typeof(RingtoetsCommonFormsResources), "Categories_Schematization")] - [ResourcesDisplayName(typeof(Resources), "LevelCrestStructure_DisplayName")] - [ResourcesDescription(typeof(Resources), "LevelCrestStructure_Description")] - public NormalDistributionProperties LevelCrestStructure + [ResourcesDisplayName(typeof(RingtoetsCommonFormsResources), "Structure_FlowWidthAtBottomProtection_DisplayName")] + [ResourcesDescription(typeof(RingtoetsCommonFormsResources), "Structure_FlowWidthAtBottomProtection_Description")] + public LogNormalDistributionProperties FlowWidthAtBottomProtection { get { - return new NormalDistributionProperties(DistributionPropertiesReadOnly.None, data.WrappedData) + return new LogNormalDistributionProperties(DistributionPropertiesReadOnly.None, data.WrappedData) { - Data = data.WrappedData.LevelCrestStructure + Data = data.WrappedData.FlowWidthAtBottomProtection }; } } - [PropertyOrder(allowedLevelIncreaseStoragePropertyIndex)] + [PropertyOrder(widthFlowAperturesPropertyIndex)] [TypeConverter(typeof(ExpandableObjectConverter))] [ResourcesCategory(typeof(RingtoetsCommonFormsResources), "Categories_Schematization")] - [ResourcesDisplayName(typeof(RingtoetsCommonFormsResources), "Structure_AllowedLevelIncreaseStorage_DisplayName")] - [ResourcesDescription(typeof(RingtoetsCommonFormsResources), "Structure_AllowedLevelIncreaseStorage_Description")] - public LogNormalDistributionProperties AllowedLevelIncreaseStorage + [ResourcesDisplayName(typeof(RingtoetsCommonFormsResources), "Structure_WidthFlowApertures_DisplayName")] + [ResourcesDescription(typeof(RingtoetsCommonFormsResources), "Structure_WidthFlowApertures_Description")] + public NormalDistributionVariationProperties WidthFlowApertures { get { - return new LogNormalDistributionProperties(DistributionPropertiesReadOnly.None, data.WrappedData) + return new NormalDistributionVariationProperties(VariationCoefficientDistributionPropertiesReadOnly.None, data.WrappedData) { - Data = data.WrappedData.AllowedLevelIncreaseStorage + Data = data.WrappedData.WidthFlowApertures }; } } @@ -214,34 +214,34 @@ } } - [PropertyOrder(flowWidthAtBottomProtectionPropertyIndex)] + [PropertyOrder(allowedLevelIncreaseStoragePropertyIndex)] [TypeConverter(typeof(ExpandableObjectConverter))] [ResourcesCategory(typeof(RingtoetsCommonFormsResources), "Categories_Schematization")] - [ResourcesDisplayName(typeof(RingtoetsCommonFormsResources), "Structure_FlowWidthAtBottomProtection_DisplayName")] - [ResourcesDescription(typeof(RingtoetsCommonFormsResources), "Structure_FlowWidthAtBottomProtection_Description")] - public LogNormalDistributionProperties FlowWidthAtBottomProtection + [ResourcesDisplayName(typeof(RingtoetsCommonFormsResources), "Structure_AllowedLevelIncreaseStorage_DisplayName")] + [ResourcesDescription(typeof(RingtoetsCommonFormsResources), "Structure_AllowedLevelIncreaseStorage_Description")] + public LogNormalDistributionProperties AllowedLevelIncreaseStorage { get { return new LogNormalDistributionProperties(DistributionPropertiesReadOnly.None, data.WrappedData) { - Data = data.WrappedData.FlowWidthAtBottomProtection + Data = data.WrappedData.AllowedLevelIncreaseStorage }; } } - [PropertyOrder(widthFlowAperturesPropertyIndex)] + [PropertyOrder(levelCrestStructurePropertyIndex)] [TypeConverter(typeof(ExpandableObjectConverter))] [ResourcesCategory(typeof(RingtoetsCommonFormsResources), "Categories_Schematization")] - [ResourcesDisplayName(typeof(RingtoetsCommonFormsResources), "Structure_WidthFlowApertures_DisplayName")] - [ResourcesDescription(typeof(RingtoetsCommonFormsResources), "Structure_WidthFlowApertures_Description")] - public NormalDistributionVariationProperties WidthFlowApertures + [ResourcesDisplayName(typeof(Resources), "LevelCrestStructure_DisplayName")] + [ResourcesDescription(typeof(Resources), "LevelCrestStructure_Description")] + public NormalDistributionProperties LevelCrestStructure { get { - return new NormalDistributionVariationProperties(VariationCoefficientDistributionPropertiesReadOnly.None, data.WrappedData) + return new NormalDistributionProperties(DistributionPropertiesReadOnly.None, data.WrappedData) { - Data = data.WrappedData.WidthFlowApertures + Data = data.WrappedData.LevelCrestStructure }; } } Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/PropertyClasses/HeightStructurePropertiesTest.cs =================================================================== diff -u -r3e3087bd9c43ca5a3910438b3c9daf0defcb09bf -rd39966fb0ba934896979db057b1d4b07dad086ed --- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/PropertyClasses/HeightStructurePropertiesTest.cs (.../HeightStructurePropertiesTest.cs) (revision 3e3087bd9c43ca5a3910438b3c9daf0defcb09bf) +++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/PropertyClasses/HeightStructurePropertiesTest.cs (.../HeightStructurePropertiesTest.cs) (revision d39966fb0ba934896979db057b1d4b07dad086ed) @@ -70,21 +70,6 @@ Assert.AreEqual(structure.Location, properties.Location); Assert.AreEqual(structure.StructureNormalOrientation, properties.StructureNormalOrientation); - Assert.AreEqual("Normaal", properties.LevelCrestStructure.DistributionType); - Assert.AreEqual(structure.LevelCrestStructure, properties.LevelCrestStructure.Data); - Assert.IsTrue(properties.LevelCrestStructure.DynamicReadOnlyValidationMethod("Mean")); - Assert.IsTrue(properties.LevelCrestStructure.DynamicReadOnlyValidationMethod("StandardDeviation")); - - Assert.AreEqual("Lognormaal", properties.AllowedLevelIncreaseStorage.DistributionType); - Assert.AreEqual(structure.AllowedLevelIncreaseStorage, properties.AllowedLevelIncreaseStorage.Data); - Assert.IsTrue(properties.AllowedLevelIncreaseStorage.DynamicReadOnlyValidationMethod("Mean")); - Assert.IsTrue(properties.AllowedLevelIncreaseStorage.DynamicReadOnlyValidationMethod("StandardDeviation")); - - Assert.AreEqual("Lognormaal", properties.StorageStructureArea.DistributionType); - Assert.AreEqual(structure.StorageStructureArea, properties.StorageStructureArea.Data); - Assert.IsTrue(properties.StorageStructureArea.DynamicReadOnlyValidationMethod("Mean")); - Assert.IsTrue(properties.StorageStructureArea.DynamicReadOnlyValidationMethod("CoefficientOfVariation")); - Assert.AreEqual("Lognormaal", properties.FlowWidthAtBottomProtection.DistributionType); Assert.AreEqual(structure.FlowWidthAtBottomProtection, properties.FlowWidthAtBottomProtection.Data); Assert.IsTrue(properties.FlowWidthAtBottomProtection.DynamicReadOnlyValidationMethod("Mean")); @@ -95,6 +80,21 @@ Assert.IsTrue(properties.WidthFlowApertures.DynamicReadOnlyValidationMethod("Mean")); Assert.IsTrue(properties.WidthFlowApertures.DynamicReadOnlyValidationMethod("CoefficientOfVariation")); + Assert.AreEqual("Lognormaal", properties.StorageStructureArea.DistributionType); + Assert.AreEqual(structure.StorageStructureArea, properties.StorageStructureArea.Data); + Assert.IsTrue(properties.StorageStructureArea.DynamicReadOnlyValidationMethod("Mean")); + Assert.IsTrue(properties.StorageStructureArea.DynamicReadOnlyValidationMethod("CoefficientOfVariation")); + + Assert.AreEqual("Lognormaal", properties.AllowedLevelIncreaseStorage.DistributionType); + Assert.AreEqual(structure.AllowedLevelIncreaseStorage, properties.AllowedLevelIncreaseStorage.Data); + Assert.IsTrue(properties.AllowedLevelIncreaseStorage.DynamicReadOnlyValidationMethod("Mean")); + Assert.IsTrue(properties.AllowedLevelIncreaseStorage.DynamicReadOnlyValidationMethod("StandardDeviation")); + + Assert.AreEqual("Normaal", properties.LevelCrestStructure.DistributionType); + Assert.AreEqual(structure.LevelCrestStructure, properties.LevelCrestStructure.Data); + Assert.IsTrue(properties.LevelCrestStructure.DynamicReadOnlyValidationMethod("Mean")); + Assert.IsTrue(properties.LevelCrestStructure.DynamicReadOnlyValidationMethod("StandardDeviation")); + Assert.AreEqual("Lognormaal", properties.CriticalOvertoppingDischarge.DistributionType); Assert.AreEqual(structure.CriticalOvertoppingDischarge, properties.CriticalOvertoppingDischarge.Data); Assert.IsTrue(properties.CriticalOvertoppingDischarge.DynamicReadOnlyValidationMethod("Mean")); @@ -144,24 +144,6 @@ Assert.AreEqual("Oriëntatie [°]", structureNormalOrientationProperty.DisplayName); Assert.AreEqual("Oriëntatie van de normaal van het kunstwerk ten opzichte van het noorden.", structureNormalOrientationProperty.Description); - PropertyDescriptor levelCrestStructureProperty = dynamicProperties[levelCrestStructurePropertyIndex]; - Assert.IsInstanceOf(levelCrestStructureProperty.Converter); - Assert.AreEqual(schematizationCategory, levelCrestStructureProperty.Category); - Assert.AreEqual("Kerende hoogte [m+NAP]", levelCrestStructureProperty.DisplayName); - Assert.AreEqual("Kerende hoogte van het kunstwerk.", levelCrestStructureProperty.Description); - - PropertyDescriptor allowedLevelIncreaseStorageProperty = dynamicProperties[allowedLevelIncreaseStoragePropertyIndex]; - Assert.IsInstanceOf(allowedLevelIncreaseStorageProperty.Converter); - Assert.AreEqual(schematizationCategory, allowedLevelIncreaseStorageProperty.Category); - Assert.AreEqual("Toegestane peilverhoging komberging [m]", allowedLevelIncreaseStorageProperty.DisplayName); - Assert.AreEqual("Toegestane peilverhoging komberging.", allowedLevelIncreaseStorageProperty.Description); - - PropertyDescriptor storageStructureAreaProperty = dynamicProperties[storageStructureAreaPropertyIndex]; - Assert.IsInstanceOf(storageStructureAreaProperty.Converter); - Assert.AreEqual(schematizationCategory, storageStructureAreaProperty.Category); - Assert.AreEqual("Kombergend oppervlak [m²]", storageStructureAreaProperty.DisplayName); - Assert.AreEqual("Kombergend oppervlak.", storageStructureAreaProperty.Description); - PropertyDescriptor flowWidthAtBottomProtectionProperty = dynamicProperties[flowWidthAtBottomProtectionPropertyIndex]; Assert.IsInstanceOf(flowWidthAtBottomProtectionProperty.Converter); Assert.AreEqual(schematizationCategory, flowWidthAtBottomProtectionProperty.Category); @@ -174,6 +156,24 @@ Assert.AreEqual("Breedte van doorstroomopening [m]", widthFlowAperturesProperty.DisplayName); Assert.AreEqual("Breedte van de doorstroomopening.", widthFlowAperturesProperty.Description); + PropertyDescriptor storageStructureAreaProperty = dynamicProperties[storageStructureAreaPropertyIndex]; + Assert.IsInstanceOf(storageStructureAreaProperty.Converter); + Assert.AreEqual(schematizationCategory, storageStructureAreaProperty.Category); + Assert.AreEqual("Kombergend oppervlak [m²]", storageStructureAreaProperty.DisplayName); + Assert.AreEqual("Kombergend oppervlak.", storageStructureAreaProperty.Description); + + PropertyDescriptor allowedLevelIncreaseStorageProperty = dynamicProperties[allowedLevelIncreaseStoragePropertyIndex]; + Assert.IsInstanceOf(allowedLevelIncreaseStorageProperty.Converter); + Assert.AreEqual(schematizationCategory, allowedLevelIncreaseStorageProperty.Category); + Assert.AreEqual("Toegestane peilverhoging komberging [m]", allowedLevelIncreaseStorageProperty.DisplayName); + Assert.AreEqual("Toegestane peilverhoging komberging.", allowedLevelIncreaseStorageProperty.Description); + + PropertyDescriptor levelCrestStructureProperty = dynamicProperties[levelCrestStructurePropertyIndex]; + Assert.IsInstanceOf(levelCrestStructureProperty.Converter); + Assert.AreEqual(schematizationCategory, levelCrestStructureProperty.Category); + Assert.AreEqual("Kerende hoogte [m+NAP]", levelCrestStructureProperty.DisplayName); + Assert.AreEqual("Kerende hoogte van het kunstwerk.", levelCrestStructureProperty.Description); + PropertyDescriptor criticalOvertoppingDischargeProperty = dynamicProperties[criticalOvertoppingDischargePropertyIndex]; Assert.IsInstanceOf(criticalOvertoppingDischargeProperty.Converter); Assert.AreEqual(schematizationCategory, criticalOvertoppingDischargeProperty.Category); Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/PropertyClasses/HeightStructuresInputContextPropertiesTest.cs =================================================================== diff -u -r3e3087bd9c43ca5a3910438b3c9daf0defcb09bf -rd39966fb0ba934896979db057b1d4b07dad086ed --- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/PropertyClasses/HeightStructuresInputContextPropertiesTest.cs (.../HeightStructuresInputContextPropertiesTest.cs) (revision 3e3087bd9c43ca5a3910438b3c9daf0defcb09bf) +++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/PropertyClasses/HeightStructuresInputContextPropertiesTest.cs (.../HeightStructuresInputContextPropertiesTest.cs) (revision d39966fb0ba934896979db057b1d4b07dad086ed) @@ -52,11 +52,11 @@ private const int heightStructurePropertyIndex = 0; private const int heightStructureLocationPropertyIndex = 1; private const int structureNormalOrientationPropertyIndex = 2; - private const int levelCrestStructurePropertyIndex = 3; - private const int allowedLevelIncreaseStoragePropertyIndex = 4; + private const int flowWidthAtBottomProtectionPropertyIndex = 3; + private const int widthFlowAperturesPropertyIndex = 4; private const int storageStructureAreaPropertyIndex = 5; - private const int flowWidthAtBottomProtectionPropertyIndex = 6; - private const int widthFlowAperturesPropertyIndex = 7; + private const int allowedLevelIncreaseStoragePropertyIndex = 6; + private const int levelCrestStructurePropertyIndex = 7; private const int criticalOvertoppingDischargePropertyIndex = 8; private const int failureProbabilityStructureWithErosionPropertyIndex = 9; private const int foreshoreProfilePropertyIndex = 10; @@ -416,6 +416,7 @@ // Assert const string schematizationCategory = "Schematisatie"; + const string hydraulicDataCategory = "Hydraulische gegevens"; const string modelSettingsCategory = "Modelinstellingen"; var dynamicPropertyBag = new DynamicPropertyBag(properties); @@ -443,24 +444,6 @@ Assert.AreEqual("Oriëntatie [°]", structureNormalOrientationProperty.DisplayName); Assert.AreEqual("Oriëntatie van de normaal van het kunstwerk ten opzichte van het noorden.", structureNormalOrientationProperty.Description); - PropertyDescriptor levelCrestStructureProperty = dynamicProperties[levelCrestStructurePropertyIndex]; - Assert.IsInstanceOf(levelCrestStructureProperty.Converter); - Assert.AreEqual(schematizationCategory, levelCrestStructureProperty.Category); - Assert.AreEqual("Kerende hoogte [m+NAP]", levelCrestStructureProperty.DisplayName); - Assert.AreEqual("Kerende hoogte van het kunstwerk.", levelCrestStructureProperty.Description); - - PropertyDescriptor allowedLevelIncreaseStorageProperty = dynamicProperties[allowedLevelIncreaseStoragePropertyIndex]; - Assert.IsInstanceOf(allowedLevelIncreaseStorageProperty.Converter); - Assert.AreEqual(schematizationCategory, allowedLevelIncreaseStorageProperty.Category); - Assert.AreEqual("Toegestane peilverhoging komberging [m]", allowedLevelIncreaseStorageProperty.DisplayName); - Assert.AreEqual("Toegestane peilverhoging komberging.", allowedLevelIncreaseStorageProperty.Description); - - PropertyDescriptor storageStructureAreaProperty = dynamicProperties[storageStructureAreaPropertyIndex]; - Assert.IsInstanceOf(storageStructureAreaProperty.Converter); - Assert.AreEqual(schematizationCategory, storageStructureAreaProperty.Category); - Assert.AreEqual("Kombergend oppervlak [m²]", storageStructureAreaProperty.DisplayName); - Assert.AreEqual("Kombergend oppervlak.", storageStructureAreaProperty.Description); - PropertyDescriptor flowWidthAtBottomProtectionProperty = dynamicProperties[flowWidthAtBottomProtectionPropertyIndex]; Assert.IsInstanceOf(flowWidthAtBottomProtectionProperty.Converter); Assert.AreEqual(schematizationCategory, flowWidthAtBottomProtectionProperty.Category); @@ -473,6 +456,24 @@ Assert.AreEqual("Breedte van doorstroomopening [m]", widthFlowAperturesProperty.DisplayName); Assert.AreEqual("Breedte van de doorstroomopening.", widthFlowAperturesProperty.Description); + PropertyDescriptor storageStructureAreaProperty = dynamicProperties[storageStructureAreaPropertyIndex]; + Assert.IsInstanceOf(storageStructureAreaProperty.Converter); + Assert.AreEqual(schematizationCategory, storageStructureAreaProperty.Category); + Assert.AreEqual("Kombergend oppervlak [m²]", storageStructureAreaProperty.DisplayName); + Assert.AreEqual("Kombergend oppervlak.", storageStructureAreaProperty.Description); + + PropertyDescriptor allowedLevelIncreaseStorageProperty = dynamicProperties[allowedLevelIncreaseStoragePropertyIndex]; + Assert.IsInstanceOf(allowedLevelIncreaseStorageProperty.Converter); + Assert.AreEqual(schematizationCategory, allowedLevelIncreaseStorageProperty.Category); + Assert.AreEqual("Toegestane peilverhoging komberging [m]", allowedLevelIncreaseStorageProperty.DisplayName); + Assert.AreEqual("Toegestane peilverhoging komberging.", allowedLevelIncreaseStorageProperty.Description); + + PropertyDescriptor levelCrestStructureProperty = dynamicProperties[levelCrestStructurePropertyIndex]; + Assert.IsInstanceOf(levelCrestStructureProperty.Converter); + Assert.AreEqual(schematizationCategory, levelCrestStructureProperty.Category); + Assert.AreEqual("Kerende hoogte [m+NAP]", levelCrestStructureProperty.DisplayName); + Assert.AreEqual("Kerende hoogte van het kunstwerk.", levelCrestStructureProperty.Description); + PropertyDescriptor criticalOvertoppingDischargeProperty = dynamicProperties[criticalOvertoppingDischargePropertyIndex]; Assert.IsInstanceOf(criticalOvertoppingDischargeProperty.Converter); Assert.AreEqual(schematizationCategory, criticalOvertoppingDischargeProperty.Category); @@ -513,18 +514,18 @@ PropertyDescriptor hydraulicBoundaryLocationProperty = dynamicProperties[hydraulicBoundaryLocationPropertyIndex]; Assert.IsFalse(hydraulicBoundaryLocationProperty.IsReadOnly); - Assert.AreEqual("Hydraulische gegevens", hydraulicBoundaryLocationProperty.Category); + Assert.AreEqual(hydraulicDataCategory, hydraulicBoundaryLocationProperty.Category); Assert.AreEqual("Locatie met hydraulische randvoorwaarden", hydraulicBoundaryLocationProperty.DisplayName); Assert.AreEqual("De locatie met hydraulische randvoorwaarden.", hydraulicBoundaryLocationProperty.Description); PropertyDescriptor stormDurationProperty = dynamicProperties[stormDurationPropertyIndex]; Assert.IsInstanceOf(stormDurationProperty.Converter); - Assert.AreEqual("Hydraulische gegevens", stormDurationProperty.Category); + Assert.AreEqual(hydraulicDataCategory, stormDurationProperty.Category); Assert.AreEqual("Stormduur [uur]", stormDurationProperty.DisplayName); Assert.AreEqual("De duur van de storm.", stormDurationProperty.Description); PropertyDescriptor deviationWaveDirectionProperty = dynamicProperties[deviationWaveDirectionPropertyIndex]; - Assert.AreEqual("Hydraulische gegevens", deviationWaveDirectionProperty.Category); + Assert.AreEqual(hydraulicDataCategory, deviationWaveDirectionProperty.Category); Assert.AreEqual("Afwijking van de golfrichting [°]", deviationWaveDirectionProperty.DisplayName); Assert.AreEqual("De afwijking van de golfrichting.", deviationWaveDirectionProperty.Description);