Index: Riskeer/GrassCoverErosionOutwards/src/Riskeer.GrassCoverErosionOutwards.Forms/PropertyClasses/GrassCoverErosionOutwardsFailurePathProperties.cs =================================================================== diff -u -r299be933b87eea233f728ae92b0ec1bcb38087c4 -r249e7e695da47fd727932366cc0f2a9bbfa550e4 --- Riskeer/GrassCoverErosionOutwards/src/Riskeer.GrassCoverErosionOutwards.Forms/PropertyClasses/GrassCoverErosionOutwardsFailurePathProperties.cs (.../GrassCoverErosionOutwardsFailurePathProperties.cs) (revision 299be933b87eea233f728ae92b0ec1bcb38087c4) +++ Riskeer/GrassCoverErosionOutwards/src/Riskeer.GrassCoverErosionOutwards.Forms/PropertyClasses/GrassCoverErosionOutwardsFailurePathProperties.cs (.../GrassCoverErosionOutwardsFailurePathProperties.cs) (revision 249e7e695da47fd727932366cc0f2a9bbfa550e4) @@ -35,10 +35,9 @@ { private const int namePropertyIndex = 1; private const int codePropertyIndex = 2; - private const int contributionPropertyIndex = 3; - private const int inAssemblyPropertyIndex = 4; - private const int nPropertyIndex = 5; - private const int applyLengthEffectInSectionPropertyIndex = 6; + private const int inAssemblyPropertyIndex = 3; + private const int nPropertyIndex = 4; + private const int applyLengthEffectInSectionPropertyIndex = 5; /// /// Creates a new instance of . @@ -52,6 +51,22 @@ CodePropertyIndex = codePropertyIndex }) {} + #region General + + [PropertyOrder(inAssemblyPropertyIndex)] + [ResourcesCategory(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.Categories_General))] + [ResourcesDisplayName(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.FailurePath_InAssembly_DisplayName))] + [ResourcesDescription(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.FailurePath_InAssembly_Description))] + public bool InAssembly + { + get + { + return data.InAssembly; + } + } + + #endregion + [DynamicVisibleValidationMethod] public bool DynamicVisibleValidationMethod(string propertyName) { @@ -65,8 +80,7 @@ private static bool ShouldHidePropertyWhenFailureMechanismNotPartOfAssembly(string propertyName) { - return nameof(Contribution).Equals(propertyName) - || nameof(N).Equals(propertyName) + return nameof(N).Equals(propertyName) || nameof(ApplyLengthEffectInSection).Equals(propertyName); } @@ -109,34 +123,5 @@ } #endregion - - #region General - - [DynamicVisible] - [PropertyOrder(contributionPropertyIndex)] - [ResourcesCategory(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.Categories_General))] - [ResourcesDisplayName(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.FailurePath_Contribution_DisplayName))] - [ResourcesDescription(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.FailurePath_Contribution_Description))] - public double Contribution - { - get - { - return data.Contribution; - } - } - - [PropertyOrder(inAssemblyPropertyIndex)] - [ResourcesCategory(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.Categories_General))] - [ResourcesDisplayName(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.FailurePath_InAssembly_DisplayName))] - [ResourcesDescription(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.FailurePath_InAssembly_Description))] - public bool InAssembly - { - get - { - return data.InAssembly; - } - } - - #endregion } } \ No newline at end of file Index: Riskeer/GrassCoverErosionOutwards/test/Riskeer.GrassCoverErosionOutwards.Forms.Test/PropertyClasses/GrassCoverErosionOutwardsFailurePathPropertiesTest.cs =================================================================== diff -u -r299be933b87eea233f728ae92b0ec1bcb38087c4 -r249e7e695da47fd727932366cc0f2a9bbfa550e4 --- Riskeer/GrassCoverErosionOutwards/test/Riskeer.GrassCoverErosionOutwards.Forms.Test/PropertyClasses/GrassCoverErosionOutwardsFailurePathPropertiesTest.cs (.../GrassCoverErosionOutwardsFailurePathPropertiesTest.cs) (revision 299be933b87eea233f728ae92b0ec1bcb38087c4) +++ Riskeer/GrassCoverErosionOutwards/test/Riskeer.GrassCoverErosionOutwards.Forms.Test/PropertyClasses/GrassCoverErosionOutwardsFailurePathPropertiesTest.cs (.../GrassCoverErosionOutwardsFailurePathPropertiesTest.cs) (revision 249e7e695da47fd727932366cc0f2a9bbfa550e4) @@ -38,10 +38,9 @@ { private const int namePropertyIndex = 0; private const int codePropertyIndex = 1; - private const int contributionPropertyIndex = 2; - private const int inAssemblyPropertyIndex = 3; - private const int nPropertyIndex = 4; - private const int applyLengthEffectInSectionPropertyIndex = 5; + private const int inAssemblyPropertyIndex = 2; + private const int nPropertyIndex = 3; + private const int applyLengthEffectInSectionPropertyIndex = 4; [Test] public void Constructor_ExpectedValues() @@ -64,7 +63,6 @@ Assert.IsInstanceOf(properties); Assert.AreEqual(failureMechanism.Name, properties.Name); Assert.AreEqual(failureMechanism.Code, properties.Code); - Assert.AreEqual(failureMechanism.Contribution, properties.Contribution); Assert.AreEqual(failureMechanism.InAssembly, properties.InAssembly); GeneralGrassCoverErosionOutwardsInput generalInput = failureMechanism.GeneralInput; @@ -86,7 +84,7 @@ // Assert PropertyDescriptorCollection dynamicProperties = PropertiesTestHelper.GetAllVisiblePropertyDescriptors(properties); - Assert.AreEqual(6, dynamicProperties.Count); + Assert.AreEqual(5, dynamicProperties.Count); const string generalCategory = "Algemeen"; const string lengthEffectCategory = "Lengte-effect"; @@ -105,13 +103,6 @@ "Het label van het toetsspoor.", true); - PropertyDescriptor contributionProperty = dynamicProperties[contributionPropertyIndex]; - PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(contributionProperty, - generalCategory, - "Faalkansbijdrage [%]", - "Procentuele bijdrage van dit toetsspoor aan de totale overstromingskans van het traject.", - true); - PropertyDescriptor inAssemblyProperty = dynamicProperties[inAssemblyPropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(inAssemblyProperty, generalCategory, @@ -164,7 +155,7 @@ "Het label van het toetsspoor.", true); - PropertyDescriptor inAssemblyProperty = dynamicProperties[inAssemblyPropertyIndex - 1]; + PropertyDescriptor inAssemblyProperty = dynamicProperties[inAssemblyPropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(inAssemblyProperty, generalCategory, "In assemblage", @@ -265,7 +256,6 @@ Assert.IsTrue(properties.DynamicVisibleValidationMethod(nameof(properties.Code))); Assert.IsTrue(properties.DynamicVisibleValidationMethod(nameof(properties.InAssembly))); - Assert.AreEqual(inAssembly, properties.DynamicVisibleValidationMethod(nameof(properties.Contribution))); Assert.AreEqual(inAssembly, properties.DynamicVisibleValidationMethod(nameof(properties.N))); Assert.AreEqual(inAssembly, properties.DynamicVisibleValidationMethod(nameof(properties.ApplyLengthEffectInSection)));