Index: Riskeer/MacroStabilityInwards/src/Riskeer.MacroStabilityInwards.Forms/PropertyClasses/MacroStabilityInwardsFailurePathProperties.cs =================================================================== diff -u -r4075241549b94454a6ad23fc355c69be49aecc17 -r8ad64b1a03aa287717312208b0feddd63d55e402 --- Riskeer/MacroStabilityInwards/src/Riskeer.MacroStabilityInwards.Forms/PropertyClasses/MacroStabilityInwardsFailurePathProperties.cs (.../MacroStabilityInwardsFailurePathProperties.cs) (revision 4075241549b94454a6ad23fc355c69be49aecc17) +++ Riskeer/MacroStabilityInwards/src/Riskeer.MacroStabilityInwards.Forms/PropertyClasses/MacroStabilityInwardsFailurePathProperties.cs (.../MacroStabilityInwardsFailurePathProperties.cs) (revision 8ad64b1a03aa287717312208b0feddd63d55e402) @@ -44,6 +44,7 @@ private const int bPropertyIndex = 7; private const int sectionLengthPropertyIndex = 8; private const int nPropertyIndex = 9; + private const int applyLengthEffectInSectionPropertyIndex = 10; private readonly IAssessmentSection assessmentSection; @@ -81,7 +82,8 @@ || nameof(A).Equals(propertyName) || nameof(B).Equals(propertyName) || nameof(SectionLength).Equals(propertyName) - || nameof(N).Equals(propertyName); + || nameof(N).Equals(propertyName) + || nameof(ApplyLengthEffectInSection).Equals(propertyName); } #region General @@ -185,6 +187,19 @@ } } + [DynamicVisible] + [PropertyOrder(applyLengthEffectInSectionPropertyIndex)] + [ResourcesCategory(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.Categories_LengthEffect))] + [ResourcesDisplayName(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.FailurePath_Apply_LengthEffect_In_Section_DisplayName))] + [ResourcesDescription(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.FailurePath_Apply_LengthEffect_In_Section_Description))] + public bool ApplyLengthEffectInSection + { + get + { + return true; + } + } + #endregion } } \ No newline at end of file Index: Riskeer/MacroStabilityInwards/test/Riskeer.MacroStabilityInwards.Forms.Test/PropertyClasses/MacroStabilityInwardsFailurePathPropertiesTest.cs =================================================================== diff -u -rfdfcebfac58179f6b1d1e19d376342f82eaaffcd -r8ad64b1a03aa287717312208b0feddd63d55e402 --- Riskeer/MacroStabilityInwards/test/Riskeer.MacroStabilityInwards.Forms.Test/PropertyClasses/MacroStabilityInwardsFailurePathPropertiesTest.cs (.../MacroStabilityInwardsFailurePathPropertiesTest.cs) (revision fdfcebfac58179f6b1d1e19d376342f82eaaffcd) +++ Riskeer/MacroStabilityInwards/test/Riskeer.MacroStabilityInwards.Forms.Test/PropertyClasses/MacroStabilityInwardsFailurePathPropertiesTest.cs (.../MacroStabilityInwardsFailurePathPropertiesTest.cs) (revision 8ad64b1a03aa287717312208b0feddd63d55e402) @@ -45,6 +45,7 @@ private const int bPropertyIndex = 6; private const int sectionLengthPropertyIndex = 7; private const int nPropertyIndex = 8; + private const int applySectionLengthInSectionPropertyIndex = 9; [Test] public void Constructor_AssessmentSectionNull_ThrowsArgumentNullException() @@ -94,6 +95,7 @@ Assert.AreEqual(assessmentSection.ReferenceLine.Length, properties.SectionLength, properties.SectionLength.GetAccuracy()); + Assert.IsTrue(properties.ApplyLengthEffectInSection); mocks.VerifyAll(); } @@ -116,7 +118,7 @@ // Assert PropertyDescriptorCollection dynamicProperties = PropertiesTestHelper.GetAllVisiblePropertyDescriptors(properties); - Assert.AreEqual(9, dynamicProperties.Count); + Assert.AreEqual(10, dynamicProperties.Count); const string generalCategory = "Algemeen"; const string lengthEffectCategory = "Lengte-effect"; @@ -183,6 +185,13 @@ "De parameter 'N' die gebruikt wordt om het lengte-effect mee te nemen in de beoordeling (afgerond).", true); + PropertyDescriptor applySectionLengthInSectionProperty = dynamicProperties[applySectionLengthInSectionPropertyIndex]; + PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(applySectionLengthInSectionProperty, + lengthEffectCategory, + "Toepassen lengte-effect binnen vak", + "Geeft aan of het lengte-effect binnen een vak toegepast wordt.", + true); + mocks.VerifyAll(); } @@ -325,6 +334,7 @@ Assert.AreEqual(inAssembly, properties.DynamicVisibleValidationMethod(nameof(properties.B))); Assert.AreEqual(inAssembly, properties.DynamicVisibleValidationMethod(nameof(properties.SectionLength))); Assert.AreEqual(inAssembly, properties.DynamicVisibleValidationMethod(nameof(properties.N))); + Assert.AreEqual(inAssembly, properties.DynamicVisibleValidationMethod(nameof(properties.ApplyLengthEffectInSection))); Assert.IsTrue(properties.DynamicVisibleValidationMethod(null));