Index: Riskeer/Piping/src/Riskeer.Piping.Forms/PropertyClasses/RegistrationState/PipingFailureMechanismProperties.cs =================================================================== diff -u -r5447d74a2dd344fcde21e3e0b54069faa38153bd -r48a836a7ffca1cd39e89e8d88d19f849c3b498f9 --- Riskeer/Piping/src/Riskeer.Piping.Forms/PropertyClasses/RegistrationState/PipingFailureMechanismProperties.cs (.../PipingFailureMechanismProperties.cs) (revision 5447d74a2dd344fcde21e3e0b54069faa38153bd) +++ Riskeer/Piping/src/Riskeer.Piping.Forms/PropertyClasses/RegistrationState/PipingFailureMechanismProperties.cs (.../PipingFailureMechanismProperties.cs) (revision 48a836a7ffca1cd39e89e8d88d19f849c3b498f9) @@ -20,11 +20,9 @@ // All rights reserved. using System; -using Core.Common.Base.Data; using Core.Common.Util.Attributes; using Core.Gui.Attributes; using Riskeer.Common.Data.AssessmentSection; -using Riskeer.Common.Data.Probability; using Riskeer.Piping.Data; using RiskeerCommonFormsResources = Riskeer.Common.Forms.Properties.Resources; @@ -40,9 +38,6 @@ private const int inAssemblyPropertyIndex = 3; private const int aPropertyIndex = 4; private const int bPropertyIndex = 5; - private const int sectionLengthPropertyIndex = 6; - private const int nPropertyIndex = 7; - private const int applyLengthEffectInSectionPropertyIndex = 8; private readonly IAssessmentSection assessmentSection; @@ -92,10 +87,7 @@ private static bool ShouldHidePropertyWhenFailureMechanismNotPartOfAssembly(string propertyName) { return nameof(A).Equals(propertyName) - || nameof(B).Equals(propertyName) - || nameof(SectionLength).Equals(propertyName) - || nameof(ApplyLengthEffectInSection).Equals(propertyName) - || nameof(N).Equals(propertyName); + || nameof(B).Equals(propertyName); } #region Length effect parameters @@ -131,46 +123,6 @@ } } - [DynamicVisible] - [PropertyOrder(sectionLengthPropertyIndex)] - [ResourcesCategory(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.Categories_LengthEffect))] - [ResourcesDisplayName(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.ReferenceLine_Length_Rounded_DisplayName))] - [ResourcesDescription(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.ReferenceLine_Length_Rounded_Description))] - public RoundedDouble SectionLength - { - get - { - return new RoundedDouble(2, assessmentSection.ReferenceLine.Length); - } - } - - [DynamicVisible] - [PropertyOrder(nPropertyIndex)] - [ResourcesCategory(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.Categories_LengthEffect))] - [ResourcesDisplayName(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.FailureMechanism_N_Rounded_DisplayName))] - [ResourcesDescription(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.FailureMechanism_N_Rounded_Description))] - public RoundedDouble N - { - get - { - PipingProbabilityAssessmentInput probabilityAssessmentInput = data.PipingProbabilityAssessmentInput; - return new RoundedDouble(2, probabilityAssessmentInput.GetN(assessmentSection.ReferenceLine.Length)); - } - } - - [DynamicVisible] - [PropertyOrder(applyLengthEffectInSectionPropertyIndex)] - [ResourcesCategory(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.Categories_LengthEffect))] - [ResourcesDisplayName(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.FailureMechanism_ApplyLengthEffectInSection_DisplayName))] - [ResourcesDescription(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.FailureMechanism_ApplyLengthEffectInSection_Description))] - public bool ApplyLengthEffectInSection - { - get - { - return data.GeneralInput.ApplyLengthEffectInSection; - } - } - #endregion } } \ No newline at end of file Index: Riskeer/Piping/test/Riskeer.Piping.Forms.Test/PropertyClasses/RegistrationState/PipingFailureMechanismPropertiesTest.cs =================================================================== diff -u -r5447d74a2dd344fcde21e3e0b54069faa38153bd -r48a836a7ffca1cd39e89e8d88d19f849c3b498f9 --- Riskeer/Piping/test/Riskeer.Piping.Forms.Test/PropertyClasses/RegistrationState/PipingFailureMechanismPropertiesTest.cs (.../PipingFailureMechanismPropertiesTest.cs) (revision 5447d74a2dd344fcde21e3e0b54069faa38153bd) +++ Riskeer/Piping/test/Riskeer.Piping.Forms.Test/PropertyClasses/RegistrationState/PipingFailureMechanismPropertiesTest.cs (.../PipingFailureMechanismPropertiesTest.cs) (revision 48a836a7ffca1cd39e89e8d88d19f849c3b498f9) @@ -27,8 +27,6 @@ using NUnit.Framework; using Rhino.Mocks; using Riskeer.Common.Data.AssessmentSection; -using Riskeer.Common.Data.Probability; -using Riskeer.Common.Data.TestUtil; using Riskeer.Piping.Data; using Riskeer.Piping.Forms.PropertyClasses; using Riskeer.Piping.Forms.PropertyClasses.RegistrationState; @@ -43,9 +41,6 @@ private const int inAssemblyPropertyIndex = 2; private const int aPropertyIndex = 3; private const int bPropertyIndex = 4; - private const int sectionLengthPropertyIndex = 5; - private const int nPropertyIndex = 6; - private const int applyLengthEffectInSectionPropertyIndex = 7; [Test] public void Constructor_AssessmentSectionNull_ThrowsArgumentNullException() @@ -85,15 +80,6 @@ PipingProbabilityAssessmentInput probabilityAssessmentInput = failureMechanism.PipingProbabilityAssessmentInput; Assert.AreEqual(probabilityAssessmentInput.A, properties.A); Assert.AreEqual(probabilityAssessmentInput.B, properties.B); - Assert.AreEqual(2, properties.N.NumberOfDecimalPlaces); - Assert.AreEqual(probabilityAssessmentInput.GetN(assessmentSection.ReferenceLine.Length), - properties.N, - properties.N.GetAccuracy()); - Assert.AreEqual(2, properties.SectionLength.NumberOfDecimalPlaces); - Assert.AreEqual(assessmentSection.ReferenceLine.Length, - properties.SectionLength, - properties.SectionLength.GetAccuracy()); - Assert.AreEqual(failureMechanism.GeneralInput.ApplyLengthEffectInSection, properties.ApplyLengthEffectInSection); mocks.VerifyAll(); } @@ -113,7 +99,7 @@ // Assert PropertyDescriptorCollection dynamicProperties = PropertiesTestHelper.GetAllVisiblePropertyDescriptors(properties); - Assert.AreEqual(8, dynamicProperties.Count); + Assert.AreEqual(5, dynamicProperties.Count); const string generalCategory = "Algemeen"; const string lengthEffectCategory = "Lengte-effect"; @@ -152,27 +138,6 @@ "De parameter 'b' die gebruikt wordt voor het lengte-effect in berekening van de maximaal toelaatbare faalkans.", true); - PropertyDescriptor sectionLengthProperty = dynamicProperties[sectionLengthPropertyIndex]; - PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(sectionLengthProperty, - lengthEffectCategory, - "Lengte* [m]", - "Totale lengte van het traject in meters (afgerond).", - true); - - 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 applySectionLengthInSectionProperty = dynamicProperties[applyLengthEffectInSectionPropertyIndex]; - PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(applySectionLengthInSectionProperty, - lengthEffectCategory, - "Toepassen lengte-effect binnen vak", - "Geeft aan of het lengte-effect binnen een vak toegepast wordt.", - true); - mocks.VerifyAll(); } @@ -304,9 +269,6 @@ Assert.AreEqual(inAssembly, properties.DynamicVisibleValidationMethod(nameof(properties.A))); 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));