Index: Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Forms/Properties/Resources.Designer.cs =================================================================== diff -u -re4313e642aa3af2d1f1ced4c397c421579cfb36d -r5bf3ab7f70cfc6ef3d15d590b527ade100e01235 --- Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Forms/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision e4313e642aa3af2d1f1ced4c397c421579cfb36d) +++ Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Forms/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision 5bf3ab7f70cfc6ef3d15d590b527ade100e01235) @@ -128,15 +128,6 @@ } /// - /// Looks up a localized string similar to Modelfactoren. - /// - public static string Categories_ModelSettings { - get { - return ResourceManager.GetString("Categories_ModelSettings", resourceCulture); - } - } - - /// /// Looks up a localized string similar to Kritisch overslagdebiet per strekkende meter.. /// public static string CriticalFlowRate_Description { Index: Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Forms/Properties/Resources.resx =================================================================== diff -u -re4313e642aa3af2d1f1ced4c397c421579cfb36d -r5bf3ab7f70cfc6ef3d15d590b527ade100e01235 --- Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Forms/Properties/Resources.resx (.../Resources.resx) (revision e4313e642aa3af2d1f1ced4c397c421579cfb36d) +++ Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Forms/Properties/Resources.resx (.../Resources.resx) (revision 5bf3ab7f70cfc6ef3d15d590b527ade100e01235) @@ -136,9 +136,6 @@ Toetseisen - - Modelfactoren - Eigenschappen van de dijkgeometrie. Index: Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Forms/PropertyClasses/GrassCoverErosionInwardsFailureMechanismContextProperties.cs =================================================================== diff -u -rc43715cf3e6dce0c427b10c4852d5ae54e6d668d -r5bf3ab7f70cfc6ef3d15d590b527ade100e01235 --- Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Forms/PropertyClasses/GrassCoverErosionInwardsFailureMechanismContextProperties.cs (.../GrassCoverErosionInwardsFailureMechanismContextProperties.cs) (revision c43715cf3e6dce0c427b10c4852d5ae54e6d668d) +++ Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Forms/PropertyClasses/GrassCoverErosionInwardsFailureMechanismContextProperties.cs (.../GrassCoverErosionInwardsFailureMechanismContextProperties.cs) (revision 5bf3ab7f70cfc6ef3d15d590b527ade100e01235) @@ -96,7 +96,7 @@ [PropertyOrder(frunupModelFactorPropertyIndex)] [TypeConverter(typeof(ExpandableObjectConverter))] - [ResourcesCategory(typeof(Resources), "Categories_ModelSettings")] + [ResourcesCategory(typeof(RingtoetsCommonFormsResources), "Categories_ModelSettings")] [ResourcesDisplayName(typeof(Resources), "GrassCoverErosionInwardsInput_FrunupModelFactor_DisplayName")] [ResourcesDescription(typeof(Resources), "GrassCoverErosionInwardsInput_FrunupModelFactor_Description")] public NormalDistributionProperties FrunupModelFactor @@ -112,7 +112,7 @@ [PropertyOrder(fbFactorPropertyIndex)] [TypeConverter(typeof(ExpandableObjectConverter))] - [ResourcesCategory(typeof(Resources), "Categories_ModelSettings")] + [ResourcesCategory(typeof(RingtoetsCommonFormsResources), "Categories_ModelSettings")] [ResourcesDisplayName(typeof(Resources), "GrassCoverErosionInwardsInput_FbFactor_DisplayName")] [ResourcesDescription(typeof(Resources), "GrassCoverErosionInwardsInput_FbFactor_Description")] public NormalDistributionProperties FbFactor @@ -128,7 +128,7 @@ [PropertyOrder(fnFactorPropertyIndex)] [TypeConverter(typeof(ExpandableObjectConverter))] - [ResourcesCategory(typeof(Resources), "Categories_ModelSettings")] + [ResourcesCategory(typeof(RingtoetsCommonFormsResources), "Categories_ModelSettings")] [ResourcesDisplayName(typeof(Resources), "GrassCoverErosionInwardsInput_FnFactor_DisplayName")] [ResourcesDescription(typeof(Resources), "GrassCoverErosionInwardsInput_FnFactor_Description")] public NormalDistributionProperties FnFactor @@ -144,7 +144,7 @@ [PropertyOrder(fshallowModelFactorPropertyIndex)] [TypeConverter(typeof(ExpandableObjectConverter))] - [ResourcesCategory(typeof(Resources), "Categories_ModelSettings")] + [ResourcesCategory(typeof(RingtoetsCommonFormsResources), "Categories_ModelSettings")] [ResourcesDisplayName(typeof(Resources), "GrassCoverErosionInwardsInput_FshallowModelFactor_DisplayName")] [ResourcesDescription(typeof(Resources), "GrassCoverErosionInwardsInput_FshallowModelFactor_Description")] public NormalDistributionProperties FshallowModelFactor Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/PropertyClasses/GrassCoverErosionInwardsFailureMechanismContextPropertiesTest.cs =================================================================== diff -u -r04fe7ebded76d25890b035c734edd538e63897b4 -r5bf3ab7f70cfc6ef3d15d590b527ade100e01235 --- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/PropertyClasses/GrassCoverErosionInwardsFailureMechanismContextPropertiesTest.cs (.../GrassCoverErosionInwardsFailureMechanismContextPropertiesTest.cs) (revision 04fe7ebded76d25890b035c734edd538e63897b4) +++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/PropertyClasses/GrassCoverErosionInwardsFailureMechanismContextPropertiesTest.cs (.../GrassCoverErosionInwardsFailureMechanismContextPropertiesTest.cs) (revision 5bf3ab7f70cfc6ef3d15d590b527ade100e01235) @@ -136,60 +136,64 @@ }; // Assert + var generalCategory = "Algemeen"; + var lengthEffectParameterCategory = "Lengte-effect parameters"; + var modelSettingsCategory = "Modelinstellingen"; + var dynamicPropertyBag = new DynamicPropertyBag(properties); PropertyDescriptorCollection dynamicProperties = dynamicPropertyBag.GetProperties(); Assert.AreEqual(8, dynamicProperties.Count); PropertyDescriptor nameProperty = dynamicProperties[namePropertyIndex]; Assert.IsNotNull(nameProperty); Assert.IsTrue(nameProperty.IsReadOnly); - Assert.AreEqual("Algemeen", nameProperty.Category); + Assert.AreEqual(generalCategory, nameProperty.Category); Assert.AreEqual("Naam", nameProperty.DisplayName); Assert.AreEqual("De naam van het toetsspoor.", nameProperty.Description); PropertyDescriptor codeProperty = dynamicProperties[codePropertyIndex]; Assert.IsNotNull(codeProperty); Assert.IsTrue(codeProperty.IsReadOnly); - Assert.AreEqual("Algemeen", codeProperty.Category); + Assert.AreEqual(generalCategory, codeProperty.Category); Assert.AreEqual("Label", codeProperty.DisplayName); Assert.AreEqual("Het label van het toetsspoor.", codeProperty.Description); PropertyDescriptor lengthEffectProperty = dynamicProperties[lengthEffectPropertyIndex]; Assert.IsNotNull(lengthEffectProperty); Assert.IsFalse(lengthEffectProperty.IsReadOnly); - Assert.AreEqual("Lengte-effect parameters", lengthEffectProperty.Category); + Assert.AreEqual(lengthEffectParameterCategory, lengthEffectProperty.Category); Assert.AreEqual("N [-]", lengthEffectProperty.DisplayName); Assert.AreEqual("De parameter 'N' die gebruikt wordt om het lengte-effect mee te nemen in een semi-probabilistische beoordeling.", lengthEffectProperty.Description); PropertyDescriptor frunupModelFactorProperty = dynamicProperties[frunupModelFactorPropertyIndex]; Assert.IsNotNull(frunupModelFactorProperty); Assert.IsInstanceOf(frunupModelFactorProperty.Converter); Assert.IsTrue(frunupModelFactorProperty.IsReadOnly); - Assert.AreEqual("Modelfactoren", frunupModelFactorProperty.Category); + Assert.AreEqual(modelSettingsCategory, frunupModelFactorProperty.Category); Assert.AreEqual("Modelfactor Frunup [-]", frunupModelFactorProperty.DisplayName); Assert.AreEqual("De parameter 'Frunup' die gebruikt wordt in de berekening.", frunupModelFactorProperty.Description); PropertyDescriptor fbModelProperty = dynamicProperties[fbFactorPropertyIndex]; Assert.IsNotNull(fbModelProperty); Assert.IsInstanceOf(fbModelProperty.Converter); Assert.IsTrue(fbModelProperty.IsReadOnly); - Assert.AreEqual("Modelfactoren", fbModelProperty.Category); + Assert.AreEqual(modelSettingsCategory, fbModelProperty.Category); Assert.AreEqual("Modelfactor Fb [-]", fbModelProperty.DisplayName); Assert.AreEqual("De parameter 'Fb' die gebruikt wordt in de berekening.", fbModelProperty.Description); PropertyDescriptor fnFactorProperty = dynamicProperties[fnFactorPropertyIndex]; Assert.IsNotNull(fnFactorProperty); Assert.IsInstanceOf(fnFactorProperty.Converter); Assert.IsTrue(fnFactorProperty.IsReadOnly); - Assert.AreEqual("Modelfactoren", fnFactorProperty.Category); + Assert.AreEqual(modelSettingsCategory, fnFactorProperty.Category); Assert.AreEqual("Modelfactor Fn [-]", fnFactorProperty.DisplayName); Assert.AreEqual("De parameter 'Fn' die gebruikt wordt in de berekening.", fnFactorProperty.Description); PropertyDescriptor fshallowProperty = dynamicProperties[fshallowModelFactorPropertyIndex]; Assert.IsNotNull(fshallowProperty); Assert.IsInstanceOf(fshallowProperty.Converter); Assert.IsTrue(fshallowProperty.IsReadOnly); - Assert.AreEqual("Modelfactoren", fshallowProperty.Category); + Assert.AreEqual(modelSettingsCategory, fshallowProperty.Category); Assert.AreEqual("Modelfactor Fondiep [-]", fshallowProperty.DisplayName); Assert.AreEqual("De parameter 'Fondiep' die gebruikt wordt in de berekening.", fshallowProperty.Description); Index: Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Forms/Properties/Resources.Designer.cs =================================================================== diff -u -re4313e642aa3af2d1f1ced4c397c421579cfb36d -r5bf3ab7f70cfc6ef3d15d590b527ade100e01235 --- Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Forms/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision e4313e642aa3af2d1f1ced4c397c421579cfb36d) +++ Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Forms/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision 5bf3ab7f70cfc6ef3d15d590b527ade100e01235) @@ -110,15 +110,6 @@ } /// - /// Looks up a localized string similar to Modelfactoren. - /// - public static string Categories_ModelSettings { - get { - return ResourceManager.GetString("Categories_ModelSettings", resourceCulture); - } - } - - /// /// Looks up a localized string similar to Het kritieke overslagdebiet per strekkende meter.. /// public static string CriticalOvertoppingDischarge_Description { Index: Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Forms/Properties/Resources.resx =================================================================== diff -u -re4313e642aa3af2d1f1ced4c397c421579cfb36d -r5bf3ab7f70cfc6ef3d15d590b527ade100e01235 --- Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Forms/Properties/Resources.resx (.../Resources.resx) (revision e4313e642aa3af2d1f1ced4c397c421579cfb36d) +++ Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Forms/Properties/Resources.resx (.../Resources.resx) (revision 5bf3ab7f70cfc6ef3d15d590b527ade100e01235) @@ -136,9 +136,6 @@ ..\Resources\control_equalizer_blue.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - Modelfactoren - De valversnelling van de zwaartekracht. Index: Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Forms/PropertyClasses/HeightStructuresFailureMechanismContextProperties.cs =================================================================== diff -u -rc43715cf3e6dce0c427b10c4852d5ae54e6d668d -r5bf3ab7f70cfc6ef3d15d590b527ade100e01235 --- Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Forms/PropertyClasses/HeightStructuresFailureMechanismContextProperties.cs (.../HeightStructuresFailureMechanismContextProperties.cs) (revision c43715cf3e6dce0c427b10c4852d5ae54e6d668d) +++ Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Forms/PropertyClasses/HeightStructuresFailureMechanismContextProperties.cs (.../HeightStructuresFailureMechanismContextProperties.cs) (revision 5bf3ab7f70cfc6ef3d15d590b527ade100e01235) @@ -109,7 +109,7 @@ [PropertyOrder(modelfactorOvertoppingFlowPropertyIndex)] [TypeConverter(typeof(ExpandableObjectConverter))] - [ResourcesCategory(typeof(Resources), "Categories_ModelSettings")] + [ResourcesCategory(typeof(RingtoetsCommonFormsResources), "Categories_ModelSettings")] [ResourcesDisplayName(typeof(Resources), "HeightStructuresInputFailureMechanismContext_ModelFactorOvertoppingFlow_DisplayName")] [ResourcesDescription(typeof(Resources), "HeightStructuresInputFailureMechanismContext_ModelFactorOvertoppingFlow_Description")] public LogNormalDistributionProperties ModelFactorOvertoppingFlow @@ -125,7 +125,7 @@ [PropertyOrder(modelFactorForStorageVolumePropertyIndex)] [TypeConverter(typeof(ExpandableObjectConverter))] - [ResourcesCategory(typeof(Resources), "Categories_ModelSettings")] + [ResourcesCategory(typeof(RingtoetsCommonFormsResources), "Categories_ModelSettings")] [ResourcesDisplayName(typeof(Resources), "HeightStructuresInputFailureMechanismContext_ModelFactorForStorageVolume_DisplayName")] [ResourcesDescription(typeof(Resources), "HeightStructuresInputFailureMechanismContext_ModelFactorForStorageVolume_Description")] public LogNormalDistributionProperties ModelFactorForStorageVolume Index: Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Forms/PropertyClasses/HeightStructuresInputContextProperties.cs =================================================================== diff -u -re4313e642aa3af2d1f1ced4c397c421579cfb36d -r5bf3ab7f70cfc6ef3d15d590b527ade100e01235 --- Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Forms/PropertyClasses/HeightStructuresInputContextProperties.cs (.../HeightStructuresInputContextProperties.cs) (revision e4313e642aa3af2d1f1ced4c397c421579cfb36d) +++ Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Forms/PropertyClasses/HeightStructuresInputContextProperties.cs (.../HeightStructuresInputContextProperties.cs) (revision 5bf3ab7f70cfc6ef3d15d590b527ade100e01235) @@ -60,7 +60,7 @@ [PropertyOrder(modelFactorOvertoppingSuperCriticalFlowPropertyIndex)] [TypeConverter(typeof(ExpandableObjectConverter))] - [ResourcesCategory(typeof(Resources), "Categories_ModelSettings")] + [ResourcesCategory(typeof(RingtoetsCommonFormsResources), "Categories_ModelSettings")] [ResourcesDisplayName(typeof(Resources), "ModelFactorOvertoppingSuperCriticalFlow_DisplayName")] [ResourcesDescription(typeof(Resources), "ModelFactorOvertoppingSuperCriticalFlow_Description")] public NormalDistributionProperties ModelFactorOvertoppingSuperCriticalFlow Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/PropertyClasses/HeightStructuresFailureMechanismContextPropertiesTest.cs =================================================================== diff -u -r04fe7ebded76d25890b035c734edd538e63897b4 -r5bf3ab7f70cfc6ef3d15d590b527ade100e01235 --- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/PropertyClasses/HeightStructuresFailureMechanismContextPropertiesTest.cs (.../HeightStructuresFailureMechanismContextPropertiesTest.cs) (revision 04fe7ebded76d25890b035c734edd538e63897b4) +++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/PropertyClasses/HeightStructuresFailureMechanismContextPropertiesTest.cs (.../HeightStructuresFailureMechanismContextPropertiesTest.cs) (revision 5bf3ab7f70cfc6ef3d15d590b527ade100e01235) @@ -131,51 +131,55 @@ }; // Assert + var generalCategory = "Algemeen"; + var lengthEffectCategory = "Lengte-effect parameters"; + var modelSettingsCategory = "Modelinstellingen"; + var dynamicPropertyBag = new DynamicPropertyBag(properties); PropertyDescriptorCollection dynamicProperties = dynamicPropertyBag.GetProperties(); Assert.AreEqual(7, dynamicProperties.Count); PropertyDescriptor nameProperty = dynamicProperties[namePropertyIndex]; Assert.IsNotNull(nameProperty); Assert.IsTrue(nameProperty.IsReadOnly); - Assert.AreEqual("Algemeen", nameProperty.Category); + Assert.AreEqual(generalCategory, nameProperty.Category); Assert.AreEqual("Naam", nameProperty.DisplayName); Assert.AreEqual("De naam van het toetsspoor.", nameProperty.Description); PropertyDescriptor codeProperty = dynamicProperties[codePropertyIndex]; Assert.IsNotNull(codeProperty); Assert.IsTrue(codeProperty.IsReadOnly); - Assert.AreEqual("Algemeen", nameProperty.Category); + Assert.AreEqual(generalCategory, nameProperty.Category); Assert.AreEqual("Label", codeProperty.DisplayName); Assert.AreEqual("Het label van het toetsspoor.", codeProperty.Description); PropertyDescriptor gravitationalAccelerationProperty = dynamicProperties[gravitationalAccelerationPropertyIndex]; Assert.IsNotNull(gravitationalAccelerationProperty); Assert.IsTrue(gravitationalAccelerationProperty.IsReadOnly); - Assert.AreEqual("Algemeen", gravitationalAccelerationProperty.Category); + Assert.AreEqual(generalCategory, gravitationalAccelerationProperty.Category); Assert.AreEqual("Valversnelling [m/s²]", gravitationalAccelerationProperty.DisplayName); Assert.AreEqual("De valversnelling van de zwaartekracht.", gravitationalAccelerationProperty.Description); PropertyDescriptor lengthEffectProperty = dynamicProperties[lengthEffectPropertyIndex]; Assert.IsNotNull(lengthEffectProperty); Assert.IsFalse(lengthEffectProperty.IsReadOnly); - Assert.AreEqual("Lengte-effect parameters", lengthEffectProperty.Category); + Assert.AreEqual(lengthEffectCategory, lengthEffectProperty.Category); Assert.AreEqual("N [-]", lengthEffectProperty.DisplayName); Assert.AreEqual("De parameter 'N' die gebruikt wordt om het lengte-effect mee te nemen in een semi-probabilistische beoordeling.", lengthEffectProperty.Description); PropertyDescriptor modelfactorOvertoppingFlowProperty = dynamicProperties[modelfactorOvertoppingFlowPropertyIndex]; Assert.IsNotNull(modelfactorOvertoppingFlowProperty); Assert.IsInstanceOf(modelfactorOvertoppingFlowProperty.Converter); Assert.IsTrue(modelfactorOvertoppingFlowProperty.IsReadOnly); - Assert.AreEqual("Modelfactoren", modelfactorOvertoppingFlowProperty.Category); + Assert.AreEqual(modelSettingsCategory, modelfactorOvertoppingFlowProperty.Category); Assert.AreEqual("Modelfactor overslagdebiet [-]", modelfactorOvertoppingFlowProperty.DisplayName); Assert.AreEqual("Het modelfactor overslagdebiet.", modelfactorOvertoppingFlowProperty.Description); PropertyDescriptor modelFactorForStorageVolumeProperty = dynamicProperties[modelFactorForStorageVolumePropertyIndex]; Assert.IsNotNull(modelFactorForStorageVolumeProperty); Assert.IsInstanceOf(modelFactorForStorageVolumeProperty.Converter); Assert.IsTrue(modelFactorForStorageVolumeProperty.IsReadOnly); - Assert.AreEqual("Modelfactoren", modelFactorForStorageVolumeProperty.Category); + Assert.AreEqual(modelSettingsCategory, modelFactorForStorageVolumeProperty.Category); Assert.AreEqual("Modelfactor kombergingsvolume [-]", modelFactorForStorageVolumeProperty.DisplayName); Assert.AreEqual("Het modelfactor kombergingsvolume.", modelFactorForStorageVolumeProperty.Description); Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/PropertyClasses/HeightStructuresInputContextPropertiesTest.cs =================================================================== diff -u -r24da3aa72ccc0776599628c9f971081694048d9a -r5bf3ab7f70cfc6ef3d15d590b527ade100e01235 --- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/PropertyClasses/HeightStructuresInputContextPropertiesTest.cs (.../HeightStructuresInputContextPropertiesTest.cs) (revision 24da3aa72ccc0776599628c9f971081694048d9a) +++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/PropertyClasses/HeightStructuresInputContextPropertiesTest.cs (.../HeightStructuresInputContextPropertiesTest.cs) (revision 5bf3ab7f70cfc6ef3d15d590b527ade100e01235) @@ -290,61 +290,64 @@ }; // Assert + var schematizationCategory = "Schematisatie"; + var modelSettingsCategory = "Modelinstellingen"; + var dynamicPropertyBag = new DynamicPropertyBag(properties); PropertyDescriptorCollection dynamicProperties = dynamicPropertyBag.GetProperties(); Assert.AreEqual(12, dynamicProperties.Count); PropertyDescriptor orientationOfTheNormalOfTheStructureProperty = dynamicProperties[orientationOfTheNormalOfTheStructurePropertyIndex]; Assert.IsFalse(orientationOfTheNormalOfTheStructureProperty.IsReadOnly); - Assert.AreEqual("Schematisatie", orientationOfTheNormalOfTheStructureProperty.Category); + Assert.AreEqual(schematizationCategory, orientationOfTheNormalOfTheStructureProperty.Category); Assert.AreEqual("Oriëntatie [°]", orientationOfTheNormalOfTheStructureProperty.DisplayName); Assert.AreEqual("Oriëntatie van het kunstwerk.", orientationOfTheNormalOfTheStructureProperty.Description); PropertyDescriptor levelOfCrestOfStructureProperty = dynamicProperties[levelOfCrestOfStructurePropertyIndex]; Assert.IsInstanceOf(levelOfCrestOfStructureProperty.Converter); - Assert.AreEqual("Schematisatie", levelOfCrestOfStructureProperty.Category); + Assert.AreEqual(schematizationCategory, levelOfCrestOfStructureProperty.Category); Assert.AreEqual("Kerende hoogte [m]", levelOfCrestOfStructureProperty.DisplayName); Assert.AreEqual("De kerende hoogte van het kunstwerk.", levelOfCrestOfStructureProperty.Description); PropertyDescriptor allowableIncreaseOfLevelForStorageProperty = dynamicProperties[allowableIncreaseOfLevelForStoragePropertyIndex]; Assert.IsInstanceOf(allowableIncreaseOfLevelForStorageProperty.Converter); - Assert.AreEqual("Schematisatie", allowableIncreaseOfLevelForStorageProperty.Category); + Assert.AreEqual(schematizationCategory, allowableIncreaseOfLevelForStorageProperty.Category); Assert.AreEqual("Toegestane peilverhoging komberging [m]", allowableIncreaseOfLevelForStorageProperty.DisplayName); Assert.AreEqual("De toegestane peilverhoging op het kombergend oppervlak.", allowableIncreaseOfLevelForStorageProperty.Description); PropertyDescriptor storageStructureAreaProperty = dynamicProperties[storageStructureAreaPropertyIndex]; Assert.IsInstanceOf(storageStructureAreaProperty.Converter); - Assert.AreEqual("Schematisatie", storageStructureAreaProperty.Category); + Assert.AreEqual(schematizationCategory, storageStructureAreaProperty.Category); Assert.AreEqual("Kombergend oppervlak [m²]", storageStructureAreaProperty.DisplayName); Assert.AreEqual("Het kombergend oppervlak.", storageStructureAreaProperty.Description); PropertyDescriptor flowWidthAtBottomProtectionProperty = dynamicProperties[flowWidthAtBottomProtectionPropertyIndex]; Assert.IsInstanceOf(flowWidthAtBottomProtectionProperty.Converter); - Assert.AreEqual("Schematisatie", flowWidthAtBottomProtectionProperty.Category); + Assert.AreEqual(schematizationCategory, flowWidthAtBottomProtectionProperty.Category); Assert.AreEqual("Stroomvoerende breedte bij bodembescherming [m]", flowWidthAtBottomProtectionProperty.DisplayName); Assert.AreEqual("De stroomvoerende breedte bij bodembescherming.", flowWidthAtBottomProtectionProperty.Description); PropertyDescriptor widthOfFlowAperturesProperty = dynamicProperties[widthOfFlowAperturesPropertyIndex]; Assert.IsInstanceOf(widthOfFlowAperturesProperty.Converter); - Assert.AreEqual("Schematisatie", widthOfFlowAperturesProperty.Category); + Assert.AreEqual(schematizationCategory, widthOfFlowAperturesProperty.Category); Assert.AreEqual("Breedte van de kruin van het kunstwerk [m]", widthOfFlowAperturesProperty.DisplayName); Assert.AreEqual("De breedte van de kruin van het kunstwerk.", widthOfFlowAperturesProperty.Description); PropertyDescriptor criticalOvertoppingDischargeProperty = dynamicProperties[criticalOvertoppingDischargePropertyIndex]; Assert.IsInstanceOf(criticalOvertoppingDischargeProperty.Converter); - Assert.AreEqual("Schematisatie", criticalOvertoppingDischargeProperty.Category); + Assert.AreEqual(schematizationCategory, criticalOvertoppingDischargeProperty.Category); Assert.AreEqual("Kritiek overslagdebiet [m³/s/m]", criticalOvertoppingDischargeProperty.DisplayName); Assert.AreEqual("Het kritieke overslagdebiet per strekkende meter.", criticalOvertoppingDischargeProperty.Description); PropertyDescriptor failureProbabilityOfStructureGivenErosionProperty = dynamicProperties[failureProbabilityOfStructureGivenErosionPropertyIndex]; Assert.IsFalse(failureProbabilityOfStructureGivenErosionProperty.IsReadOnly); - Assert.AreEqual("Schematisatie", failureProbabilityOfStructureGivenErosionProperty.Category); + Assert.AreEqual(schematizationCategory, failureProbabilityOfStructureGivenErosionProperty.Category); Assert.AreEqual("Faalkans kunstwerk gegeven erosie bodem [-]", failureProbabilityOfStructureGivenErosionProperty.DisplayName); Assert.AreEqual("De faalkans van het kunstwerk gegeven de erosie in de bodem.", failureProbabilityOfStructureGivenErosionProperty.Description); PropertyDescriptor modelFactorOvertoppingSuperCriticalFlowProperty = dynamicProperties[modelFactorOvertoppingSuperCriticalFlowPropertyIndex]; Assert.IsInstanceOf(modelFactorOvertoppingSuperCriticalFlowProperty.Converter); - Assert.AreEqual("Modelfactoren", modelFactorOvertoppingSuperCriticalFlowProperty.Category); + Assert.AreEqual(modelSettingsCategory, modelFactorOvertoppingSuperCriticalFlowProperty.Category); Assert.AreEqual("Modelfactor van overloopdebiet bij superkritische stroming [-]", modelFactorOvertoppingSuperCriticalFlowProperty.DisplayName); Assert.AreEqual("Het modelfactor van overloopdebiet bij superkritische stroming.", modelFactorOvertoppingSuperCriticalFlowProperty.Description); Index: Ringtoets/Piping/src/Ringtoets.Piping.Forms/Properties/Resources.Designer.cs =================================================================== diff -u -r37213b379dafd60f815fce7cb7fd70e8b85d0ec5 -r5bf3ab7f70cfc6ef3d15d590b527ade100e01235 --- Ringtoets/Piping/src/Ringtoets.Piping.Forms/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision 37213b379dafd60f815fce7cb7fd70e8b85d0ec5) +++ Ringtoets/Piping/src/Ringtoets.Piping.Forms/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision 5bf3ab7f70cfc6ef3d15d590b527ade100e01235) @@ -100,15 +100,6 @@ } /// - /// Looks up a localized string similar to Modelfactoren. - /// - public static string Categories_ModelFactors { - get { - return ResourceManager.GetString("Categories_ModelFactors", resourceCulture); - } - } - - /// /// Looks up a localized string similar to Terugschrijdende erosie (Sellmeijer). /// public static string Categories_Sellmeijer { Index: Ringtoets/Piping/src/Ringtoets.Piping.Forms/Properties/Resources.resx =================================================================== diff -u -r37213b379dafd60f815fce7cb7fd70e8b85d0ec5 -r5bf3ab7f70cfc6ef3d15d590b527ade100e01235 --- Ringtoets/Piping/src/Ringtoets.Piping.Forms/Properties/Resources.resx (.../Resources.resx) (revision 37213b379dafd60f815fce7cb7fd70e8b85d0ec5) +++ Ringtoets/Piping/src/Ringtoets.Piping.Forms/Properties/Resources.resx (.../Resources.resx) (revision 5bf3ab7f70cfc6ef3d15d590b527ade100e01235) @@ -352,9 +352,6 @@ Heave - - Modelfactoren - Terugschrijdende erosie (Sellmeijer) Index: Ringtoets/Piping/src/Ringtoets.Piping.Forms/PropertyClasses/PipingFailureMechanismContextProperties.cs =================================================================== diff -u -ref2c6cb7afd29e17ada49f5a18b9e21968122232 -r5bf3ab7f70cfc6ef3d15d590b527ade100e01235 --- Ringtoets/Piping/src/Ringtoets.Piping.Forms/PropertyClasses/PipingFailureMechanismContextProperties.cs (.../PipingFailureMechanismContextProperties.cs) (revision ef2c6cb7afd29e17ada49f5a18b9e21968122232) +++ Ringtoets/Piping/src/Ringtoets.Piping.Forms/PropertyClasses/PipingFailureMechanismContextProperties.cs (.../PipingFailureMechanismContextProperties.cs) (revision 5bf3ab7f70cfc6ef3d15d590b527ade100e01235) @@ -114,7 +114,7 @@ #region Model Factors [PropertyOrder(11)] - [ResourcesCategory(typeof(Resources), "Categories_ModelFactors")] + [ResourcesCategory(typeof(RingtoetsCommonFormsResources), "Categories_ModelSettings")] [ResourcesDisplayName(typeof(Resources), "GeneralPipingInput_UpliftModelFactor_DisplayName")] [ResourcesDescription(typeof(Resources), "GeneralPipingInput_UpliftModelFactor_Description")] public double UpliftModelFactor @@ -126,7 +126,7 @@ } [PropertyOrder(12)] - [ResourcesCategory(typeof(Resources), "Categories_ModelFactors")] + [ResourcesCategory(typeof(RingtoetsCommonFormsResources), "Categories_ModelSettings")] [ResourcesDisplayName(typeof(Resources), "GeneralPipingInput_SellmeijerModelFactor_DisplayName")] [ResourcesDescription(typeof(Resources), "GeneralPipingInput_SellmeijerModelFactor_Description")] public double SellmeijerModelFactor Index: Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/PropertyClasses/PipingFailureMechanismContextPropertiesTest.cs =================================================================== diff -u -ref2c6cb7afd29e17ada49f5a18b9e21968122232 -r5bf3ab7f70cfc6ef3d15d590b527ade100e01235 --- Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/PropertyClasses/PipingFailureMechanismContextPropertiesTest.cs (.../PipingFailureMechanismContextPropertiesTest.cs) (revision ef2c6cb7afd29e17ada49f5a18b9e21968122232) +++ Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/PropertyClasses/PipingFailureMechanismContextPropertiesTest.cs (.../PipingFailureMechanismContextPropertiesTest.cs) (revision 5bf3ab7f70cfc6ef3d15d590b527ade100e01235) @@ -109,7 +109,7 @@ var generalCategory = "Algemeen"; var heaveCategory = "Heave"; - var modelFactorCategory = "Modelfactoren"; + var modelFactorCategory = "Modelinstellingen"; var upliftCategory = "Opbarsten"; var semiProbabilisticCategory = "Semi-probabilistische parameters"; var sellmeijerCategory = "Terugschrijdende erosie (Sellmeijer)"; Index: Ringtoets/Revetment/src/Ringtoets.Revetment.Data/WaveConditionsInput.cs =================================================================== diff -u -r8efe4bdfd7e47208edb8585a8ac32ebcd56635c0 -r5bf3ab7f70cfc6ef3d15d590b527ade100e01235 --- Ringtoets/Revetment/src/Ringtoets.Revetment.Data/WaveConditionsInput.cs (.../WaveConditionsInput.cs) (revision 8efe4bdfd7e47208edb8585a8ac32ebcd56635c0) +++ Ringtoets/Revetment/src/Ringtoets.Revetment.Data/WaveConditionsInput.cs (.../WaveConditionsInput.cs) (revision 5bf3ab7f70cfc6ef3d15d590b527ade100e01235) @@ -45,12 +45,15 @@ private WaveConditionsInputStepSize stepSize; private RoundedDouble upperBoundaryWaterLevels; private RoundedDouble lowerBoundaryWaterLevels; + private RoundedDouble orientation; /// /// Creates a new instance of . /// public WaveConditionsInput() { + orientation = new RoundedDouble(2); + upperBoundaryRevetment = new RoundedDouble(2, double.NaN); lowerBoundaryRevetment = new RoundedDouble(2, double.NaN); stepSize = WaveConditionsInputStepSize.Half; @@ -94,6 +97,22 @@ } /// + /// Gets or sets the orientation of the foreshore profile geometry with respect to North + /// in degrees. A positive value equals a clockwise rotation. + /// + public RoundedDouble Orientation + { + get + { + return orientation; + } + set + { + orientation = value.ToPrecision(orientation.NumberOfDecimalPlaces); + } + } + + /// /// Gets or sets whether needs to be taken into account. /// public bool UseBreakWater { get; set; } @@ -309,12 +328,14 @@ { if (foreshoreProfile == null) { + Orientation = (RoundedDouble)0.0; UseForeshore = false; UseBreakWater = false; BreakWater = GetDefaultBreakWater(); } else { + Orientation = foreshoreProfile.Orientation; UseForeshore = foreshoreProfile.Geometry.Count() > 1; UseBreakWater = foreshoreProfile.HasBreakWater; BreakWater = foreshoreProfile.HasBreakWater Index: Ringtoets/Revetment/src/Ringtoets.Revetment.Forms/PropertyClasses/GeneralWaveConditionsInputProperties.cs =================================================================== diff -u -r37213b379dafd60f815fce7cb7fd70e8b85d0ec5 -r5bf3ab7f70cfc6ef3d15d590b527ade100e01235 --- Ringtoets/Revetment/src/Ringtoets.Revetment.Forms/PropertyClasses/GeneralWaveConditionsInputProperties.cs (.../GeneralWaveConditionsInputProperties.cs) (revision 37213b379dafd60f815fce7cb7fd70e8b85d0ec5) +++ Ringtoets/Revetment/src/Ringtoets.Revetment.Forms/PropertyClasses/GeneralWaveConditionsInputProperties.cs (.../GeneralWaveConditionsInputProperties.cs) (revision 5bf3ab7f70cfc6ef3d15d590b527ade100e01235) @@ -19,7 +19,6 @@ // Stichting Deltares and remain full property of Stichting Deltares at all times. // All rights reserved. -using System.ComponentModel; using Core.Common.Gui.PropertyBag; using Core.Common.Utils.Attributes; using Ringtoets.Revetment.Data; @@ -30,7 +29,6 @@ /// /// ViewModel of for properties panel. /// - [DisplayName("")] public class GeneralWaveConditionsInputProperties : ObjectProperties { [ResourcesDisplayName(typeof(Resources), "GeneralWaveConditionsInput_A_DisplayName")] Index: Ringtoets/Revetment/test/Ringtoets.Revetment.Data.Test/WaveConditionsInputTest.cs =================================================================== diff -u -r8efe4bdfd7e47208edb8585a8ac32ebcd56635c0 -r5bf3ab7f70cfc6ef3d15d590b527ade100e01235 --- Ringtoets/Revetment/test/Ringtoets.Revetment.Data.Test/WaveConditionsInputTest.cs (.../WaveConditionsInputTest.cs) (revision 8efe4bdfd7e47208edb8585a8ac32ebcd56635c0) +++ Ringtoets/Revetment/test/Ringtoets.Revetment.Data.Test/WaveConditionsInputTest.cs (.../WaveConditionsInputTest.cs) (revision 5bf3ab7f70cfc6ef3d15d590b527ade100e01235) @@ -114,13 +114,21 @@ Assert.AreEqual(new RoundedDouble(2), input.BreakWater.Height); Assert.IsFalse(input.UseForeshore); CollectionAssert.IsEmpty(input.ForeshoreGeometry); - Assert.AreEqual(new RoundedDouble(2, double.NaN), input.AssessmentLevel); - Assert.AreEqual(new RoundedDouble(2, double.NaN), input.UpperBoundaryDesignWaterLevel); - Assert.AreEqual(new RoundedDouble(2, double.NaN), input.LowerBoundaryRevetment); - Assert.AreEqual(new RoundedDouble(2, double.NaN), input.UpperBoundaryRevetment); + Assert.AreEqual(0, input.Orientation.Value); + Assert.AreEqual(2, input.Orientation.NumberOfDecimalPlaces); + Assert.IsNaN(input.AssessmentLevel.Value); + Assert.AreEqual(2, input.AssessmentLevel.NumberOfDecimalPlaces); + Assert.IsNaN(input.UpperBoundaryDesignWaterLevel.Value); + Assert.AreEqual(2, input.UpperBoundaryDesignWaterLevel.NumberOfDecimalPlaces); + Assert.IsNaN(input.LowerBoundaryRevetment.Value); + Assert.AreEqual(2, input.LowerBoundaryRevetment.NumberOfDecimalPlaces); + Assert.IsNaN(input.UpperBoundaryRevetment.Value); + Assert.AreEqual(2, input.UpperBoundaryRevetment.NumberOfDecimalPlaces); + Assert.IsNaN(input.LowerBoundaryWaterLevels.Value); + Assert.AreEqual(2, input.LowerBoundaryWaterLevels.NumberOfDecimalPlaces); + Assert.IsNaN(input.UpperBoundaryWaterLevels.Value); + Assert.AreEqual(2, input.UpperBoundaryWaterLevels.NumberOfDecimalPlaces); Assert.AreEqual(WaveConditionsInputStepSize.Half, input.StepSize); - Assert.AreEqual(new RoundedDouble(2, double.NaN), input.LowerBoundaryWaterLevels); - Assert.AreEqual(new RoundedDouble(2, double.NaN), input.UpperBoundaryWaterLevels); CollectionAssert.IsEmpty(input.WaterLevels); } @@ -134,7 +142,7 @@ // Call input.HydraulicBoundaryLocation = new HydraulicBoundaryLocation(0, "", 0, 0) { - DesignWaterLevel = (RoundedDouble)assessmentLevel + DesignWaterLevel = (RoundedDouble) assessmentLevel }; // Assert @@ -197,10 +205,14 @@ breakWater = new BreakWater(nonDefaultBreakWaterType, nonDefaultBreakWaterHeight); } + double orientation = 96; var foreshoreProfile = new ForeshoreProfile(new Point2D(0, 0), foreshoreGeometry.ToArray(), breakWater, - new ForeshoreProfile.ConstructionProperties()); + new ForeshoreProfile.ConstructionProperties + { + Orientation = orientation + }); // Call input.ForeshoreProfile = foreshoreProfile; @@ -213,6 +225,8 @@ Assert.AreEqual(withValidForeshore, input.UseForeshore); CollectionAssert.AreEqual(foreshoreProfile.Geometry, input.ForeshoreGeometry); Assert.AreEqual(originalHydraulicBoundaryLocation, input.HydraulicBoundaryLocation); + Assert.AreEqual(orientation, input.Orientation.Value); + Assert.AreEqual(2, input.Orientation.NumberOfDecimalPlaces); } [Test] @@ -231,7 +245,10 @@ new Point2D(5.5, 6.6) }, new BreakWater(BreakWaterType.Caisson, 2.2), - new ForeshoreProfile.ConstructionProperties()); + new ForeshoreProfile.ConstructionProperties + { + Orientation = 96 + }); input.ForeshoreProfile = foreshoreProfile; @@ -254,9 +271,30 @@ Assert.IsFalse(input.UseForeshore); CollectionAssert.IsEmpty(input.ForeshoreGeometry); Assert.AreEqual(originalHydraulicBoundaryLocation, input.HydraulicBoundaryLocation); + Assert.AreEqual(0, input.Orientation.Value); + Assert.AreEqual(2, input.Orientation.NumberOfDecimalPlaces); } [Test] + [TestCase(1233)] + [TestCase(359.994)] + [TestCase(300)] + [TestCase(0)] + [TestCase(-0.005)] + [TestCase(-23)] + public void Orientation_ValidValues_NewValueSet(double orientation) + { + // Setup + var input = new WaveConditionsInput(); + + // Call + input.Orientation = (RoundedDouble) orientation; + + // Assert + Assert.AreEqual(orientation, input.Orientation, input.Orientation.GetAccuracy()); + } + + [Test] public void UpperBoundaryDesignWaterLevel_NoHydraulicBoundaryLocation_ReturnNaN() { // Setup @@ -561,7 +599,7 @@ var input = new WaveConditionsInput { LowerBoundaryRevetment = (RoundedDouble) 1.0, - UpperBoundaryRevetment = (RoundedDouble)10.0, + UpperBoundaryRevetment = (RoundedDouble) 10.0, StepSize = WaveConditionsInputStepSize.One, LowerBoundaryWaterLevels = (RoundedDouble) 1.0, UpperBoundaryWaterLevels = (RoundedDouble) 10.0 Index: Ringtoets/StabilityStoneCover/src/Ringtoets.StabilityStoneCover.Forms/PropertyClasses/StabilityStoneCoverWaveConditionsCalculationInputContextProperties.cs =================================================================== diff -u -r37213b379dafd60f815fce7cb7fd70e8b85d0ec5 -r5bf3ab7f70cfc6ef3d15d590b527ade100e01235 --- Ringtoets/StabilityStoneCover/src/Ringtoets.StabilityStoneCover.Forms/PropertyClasses/StabilityStoneCoverWaveConditionsCalculationInputContextProperties.cs (.../StabilityStoneCoverWaveConditionsCalculationInputContextProperties.cs) (revision 37213b379dafd60f815fce7cb7fd70e8b85d0ec5) +++ Ringtoets/StabilityStoneCover/src/Ringtoets.StabilityStoneCover.Forms/PropertyClasses/StabilityStoneCoverWaveConditionsCalculationInputContextProperties.cs (.../StabilityStoneCoverWaveConditionsCalculationInputContextProperties.cs) (revision 5bf3ab7f70cfc6ef3d15d590b527ade100e01235) @@ -19,7 +19,6 @@ // Stichting Deltares and remain full property of Stichting Deltares at all times. // All rights reserved. -using System.Collections; using System.Collections.Generic; using System.ComponentModel; using System.Drawing.Design; @@ -31,14 +30,13 @@ using Core.Common.Gui.PropertyBag; using Core.Common.Utils; using Core.Common.Utils.Attributes; -using Core.Common.Utils.Reflection; using Ringtoets.Common.Data.DikeProfiles; using Ringtoets.HydraRing.Data; using Ringtoets.Revetment.Data; using Ringtoets.Revetment.Forms.PropertyClasses; using Ringtoets.StabilityStoneCover.Forms.PresentationObjects; -using Ringtoets.StabilityStoneCover.Forms.UITypeEditors; using Ringtoets.StabilityStoneCover.Forms.Properties; +using Ringtoets.StabilityStoneCover.Forms.UITypeEditors; using RingtoetsCommonFormsResources = Ringtoets.Common.Forms.Properties.Resources; namespace Ringtoets.StabilityStoneCover.Forms.PropertyClasses @@ -232,16 +230,14 @@ { get { - if (data.WrappedData.ForeshoreProfile != null && data.WrappedData.ForeshoreProfile.WorldReferencePoint != null) - { - return new Point2D( - new RoundedDouble(0, data.WrappedData.ForeshoreProfile.WorldReferencePoint.X), - new RoundedDouble(0, data.WrappedData.ForeshoreProfile.WorldReferencePoint.Y)); - } - return null; + return data.WrappedData.ForeshoreProfile == null ? null : + new Point2D( + new RoundedDouble(0, data.WrappedData.ForeshoreProfile.WorldReferencePoint.X), + new RoundedDouble(0, data.WrappedData.ForeshoreProfile.WorldReferencePoint.Y)); } } + [DynamicReadOnly] [PropertyOrder(orientationPropertyIndex)] [ResourcesCategory(typeof(RingtoetsCommonFormsResources), "Categories_Schematization")] [ResourcesDisplayName(typeof(RingtoetsCommonFormsResources), "Orientation_DisplayName")] @@ -250,15 +246,15 @@ { get { - if (data.WrappedData.ForeshoreProfile != null) - { - return data.WrappedData.ForeshoreProfile.Orientation; - } - return new RoundedDouble(2, double.NaN); + return data.WrappedData.Orientation; } + set + { + data.WrappedData.Orientation = value; + data.WrappedData.NotifyObservers(); + } } - [DynamicReadOnly] [PropertyOrder(breakWaterPropertyIndex)] [TypeConverter(typeof(ExpandableObjectConverter))] [ResourcesCategory(typeof(RingtoetsCommonFormsResources), "Categories_Schematization")] @@ -275,7 +271,6 @@ } } - [DynamicReadOnly] [PropertyOrder(foreshoreGeometryPropertyIndex)] [TypeConverter(typeof(ExpandableObjectConverter))] [ResourcesCategory(typeof(RingtoetsCommonFormsResources), "Categories_Schematization")] @@ -317,8 +312,7 @@ [DynamicReadOnlyValidationMethod] public bool DynamicReadOnlyValidationMethod(string propertyName) { - if (data.WrappedData.ForeshoreProfile == null && - propertyName.Equals(TypeUtils.GetMemberName(i => i.ForeshoreGeometry))) + if (data.WrappedData.ForeshoreProfile == null) { return true; } Index: Ringtoets/StabilityStoneCover/test/Ringtoets.StabilityStoneCover.Forms.Test/PropertyClasses/StabilityStoneCoverWaveConditionsCalculationInputContextPropertiesTest.cs =================================================================== diff -u -r8efe4bdfd7e47208edb8585a8ac32ebcd56635c0 -r5bf3ab7f70cfc6ef3d15d590b527ade100e01235 --- Ringtoets/StabilityStoneCover/test/Ringtoets.StabilityStoneCover.Forms.Test/PropertyClasses/StabilityStoneCoverWaveConditionsCalculationInputContextPropertiesTest.cs (.../StabilityStoneCoverWaveConditionsCalculationInputContextPropertiesTest.cs) (revision 8efe4bdfd7e47208edb8585a8ac32ebcd56635c0) +++ Ringtoets/StabilityStoneCover/test/Ringtoets.StabilityStoneCover.Forms.Test/PropertyClasses/StabilityStoneCoverWaveConditionsCalculationInputContextPropertiesTest.cs (.../StabilityStoneCoverWaveConditionsCalculationInputContextPropertiesTest.cs) (revision 5bf3ab7f70cfc6ef3d15d590b527ade100e01235) @@ -116,7 +116,7 @@ Assert.IsNull(properties.ForeshoreProfile); Assert.IsNull(properties.WorldReferencePoint); Assert.AreEqual(2, properties.Orientation.NumberOfDecimalPlaces); - Assert.IsNaN(properties.Orientation.Value); + Assert.AreEqual(0, properties.Orientation.Value); Assert.AreSame(input, properties.BreakWater.Data); Assert.AreSame(input, properties.ForeshoreGeometry.Data); Assert.AreEqual("Steen (blokken en zuilen)", properties.RevetmentType); @@ -197,14 +197,15 @@ { // Setup var observerMock = mockRepository.StrictMock(); - const int numberProperties = 7; + const int numberProperties = 8; observerMock.Expect(o => o.UpdateObserver()).Repeat.Times(numberProperties); var assessmentSectionMock = mockRepository.StrictMock(); mockRepository.ReplayAll(); var failureMechanism = new StabilityStoneCoverFailureMechanism(); var random = new Random(21); + var orientation = (RoundedDouble)random.NextDouble(); var assessmentLevel = (RoundedDouble)random.NextDouble(); var newLowerBoundaryRevetment = (RoundedDouble)random.NextDouble(); var newLowerBoundaryWaterLevels = (RoundedDouble)random.NextDouble(); @@ -242,6 +243,7 @@ properties.LowerBoundaryWaterLevels = newLowerBoundaryWaterLevels; properties.StepSize = newStepSize; properties.HydraulicBoundaryLocation = newHydraulicBoundaryLocation; + properties.Orientation = orientation; // Assert Assert.AreSame(input.HydraulicBoundaryLocation, properties.HydraulicBoundaryLocation); @@ -256,6 +258,8 @@ Assert.AreEqual(2, properties.UpperBoundaryWaterLevels.NumberOfDecimalPlaces); Assert.AreEqual(newLowerBoundaryWaterLevels.Value, properties.LowerBoundaryWaterLevels.Value, properties.LowerBoundaryWaterLevels.GetAccuracy()); Assert.AreEqual(2, properties.LowerBoundaryWaterLevels.NumberOfDecimalPlaces); + Assert.AreEqual(orientation, properties.Orientation.Value, properties.Orientation.GetAccuracy()); + Assert.AreEqual(2, properties.Orientation.NumberOfDecimalPlaces); Assert.AreEqual(newStepSize, properties.StepSize); mockRepository.VerifyAll(); } @@ -378,23 +382,23 @@ PropertyDescriptor orientationProperty = dynamicProperties[orientationPropertyIndex]; Assert.IsNotNull(orientationProperty); - Assert.IsTrue(orientationProperty.IsReadOnly); + Assert.AreEqual(!withForeshoreProfile, orientationProperty.IsReadOnly); Assert.AreEqual(schematizationCategory, orientationProperty.Category); Assert.AreEqual("Oriëntatie [°]", orientationProperty.DisplayName); Assert.AreEqual("Oriëntatie van het voorland.", orientationProperty.Description); PropertyDescriptor breakWaterProperty = dynamicProperties[breakWaterPropertyIndex]; Assert.IsNotNull(breakWaterProperty); Assert.IsInstanceOf(breakWaterProperty.Converter); - Assert.IsFalse(breakWaterProperty.IsReadOnly); + Assert.IsTrue(breakWaterProperty.IsReadOnly); Assert.AreEqual(schematizationCategory, breakWaterProperty.Category); Assert.AreEqual("Dam", breakWaterProperty.DisplayName); Assert.AreEqual("Eigenschappen van de dam.", breakWaterProperty.Description); PropertyDescriptor foreshoreGeometryProperty = dynamicProperties[foreshoreGeometryPropertyIndex]; Assert.IsNotNull(foreshoreGeometryProperty); Assert.IsInstanceOf(foreshoreGeometryProperty.Converter); - Assert.AreEqual(!withForeshoreProfile, foreshoreGeometryProperty.IsReadOnly); + Assert.IsTrue(foreshoreGeometryProperty.IsReadOnly); Assert.AreEqual(schematizationCategory, foreshoreGeometryProperty.Category); Assert.AreEqual("Voorlandgeometrie", foreshoreGeometryProperty.DisplayName); Assert.AreEqual("Eigenschappen van de voorlandgeometrie.", foreshoreGeometryProperty.Description);