Index: Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Data/HeightStructuresInput.cs =================================================================== diff -u -r0afc6984f0b40aa96f1929cb20e0be7402dd7fed -r3e79015849651b140c9b496e8f0f57fcdcac0d92 --- Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Data/HeightStructuresInput.cs (.../HeightStructuresInput.cs) (revision 0afc6984f0b40aa96f1929cb20e0be7402dd7fed) +++ Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Data/HeightStructuresInput.cs (.../HeightStructuresInput.cs) (revision 3e79015849651b140c9b496e8f0f57fcdcac0d92) @@ -19,37 +19,19 @@ // Stichting Deltares and remain full property of Stichting Deltares at all times. // All rights reserved. -using System; -using System.Linq; -using Core.Common.Base; using Core.Common.Base.Data; -using Core.Common.Base.Geometry; -using Ringtoets.Common.Data.Calculation; -using Ringtoets.Common.Data.DikeProfiles; using Ringtoets.Common.Data.Probabilistics; -using Ringtoets.HydraRing.Data; -using RingtoetsCommonDataResources = Ringtoets.Common.Data.Properties.Resources; +using Ringtoets.Common.Data.Structures; namespace Ringtoets.HeightStructures.Data { /// /// Class that holds all height structures calculation specific input parameters. /// - public class HeightStructuresInput : Observable, ICalculationInput, IUseBreakWater, IUseForeshore + public class HeightStructuresInput : StructuresInputBase { private readonly NormalDistribution levelCrestStructure; - private readonly NormalDistribution modelFactorSuperCriticalFlow; - private readonly LogNormalDistribution allowedLevelIncreaseStorage; - private readonly VariationCoefficientLogNormalDistribution storageStructureArea; - private readonly LogNormalDistribution flowWidthAtBottomProtection; - private readonly VariationCoefficientLogNormalDistribution criticalOvertoppingDischarge; - private readonly VariationCoefficientNormalDistribution widthFlowApertures; - private readonly VariationCoefficientLogNormalDistribution stormDuration; - private RoundedDouble structureNormalOrientation; private RoundedDouble deviationWaveDirection; - private double failureProbabilityStructureWithErosion; - private ForeshoreProfile foreshoreProfile; - private HeightStructure heightStructure; /// /// Creates a new instance of the class. @@ -62,91 +44,14 @@ StandardDeviation = (RoundedDouble) 0.05 }; - structureNormalOrientation = new RoundedDouble(2, double.NaN); - - modelFactorSuperCriticalFlow = new NormalDistribution(2) - { - Mean = (RoundedDouble) 1.1, - StandardDeviation = (RoundedDouble) 0.03 - }; - - allowedLevelIncreaseStorage = new LogNormalDistribution(2) - { - Mean = (RoundedDouble) double.NaN, - StandardDeviation = (RoundedDouble) 0.1 - }; - - storageStructureArea = new VariationCoefficientLogNormalDistribution(2) - { - Mean = (RoundedDouble) double.NaN, - CoefficientOfVariation = (RoundedDouble) 0.1 - }; - - flowWidthAtBottomProtection = new LogNormalDistribution(2) - { - Mean = (RoundedDouble) double.NaN, - StandardDeviation = (RoundedDouble) 0.05 - }; - - criticalOvertoppingDischarge = new VariationCoefficientLogNormalDistribution(2) - { - Mean = (RoundedDouble) double.NaN, - CoefficientOfVariation = (RoundedDouble) 0.15 - }; - - failureProbabilityStructureWithErosion = double.NaN; - - widthFlowApertures = new VariationCoefficientNormalDistribution(2) - { - Mean = (RoundedDouble) double.NaN, - CoefficientOfVariation = (RoundedDouble) 0.05 - }; - deviationWaveDirection = new RoundedDouble(2, double.NaN); - stormDuration = new VariationCoefficientLogNormalDistribution(2) - { - Mean = (RoundedDouble) 6.0, - CoefficientOfVariation = (RoundedDouble) 0.25 - }; - - UpdateHeightStructureProperties(); - UpdateForeshoreProperties(); + UpdateStructureProperties(); } - private static bool ValidProbabilityValue(double probability) - { - return !double.IsNaN(probability) && probability <= 1 && probability >= 0; - } - - #region Model factors - - /// - /// Gets or sets the model factor for super critical flow. - /// - /// Only sets the mean. - public NormalDistribution ModelFactorSuperCriticalFlow - { - get - { - return modelFactorSuperCriticalFlow; - } - set - { - modelFactorSuperCriticalFlow.Mean = value.Mean; - } - } - - #endregion - #region Hydraulic data /// - /// Gets or sets the hydraulic boundary location from which to use the assessment level. - /// - public HydraulicBoundaryLocation HydraulicBoundaryLocation { get; set; } - - /// /// Gets or sets the deviation of the wave direction. /// [degrees] /// @@ -162,23 +67,6 @@ } } - /// - /// Gets or sets the storm duration. - /// [hrs] - /// - /// Only sets the mean. - public VariationCoefficientLogNormalDistribution StormDuration - { - get - { - return stormDuration; - } - set - { - stormDuration.Mean = value.Mean; - } - } - #endregion #region Schematization @@ -199,228 +87,22 @@ levelCrestStructure.StandardDeviation = value.StandardDeviation; } } - - /// - /// Gets or sets the orientation of the normal of the structure. - /// [degrees] - /// - /// Thrown when the value for the orientation is not between [0, 360] degrees. - public RoundedDouble StructureNormalOrientation + + protected override void UpdateStructureProperties() { - get + if (Structure != null) { - return structureNormalOrientation; + StructureNormalOrientation = Structure.StructureNormalOrientation; + LevelCrestStructure = Structure.LevelCrestStructure; + FlowWidthAtBottomProtection = Structure.FlowWidthAtBottomProtection; + CriticalOvertoppingDischarge = Structure.CriticalOvertoppingDischarge; + WidthFlowApertures = Structure.WidthFlowApertures; + FailureProbabilityStructureWithErosion = Structure.FailureProbabilityStructureWithErosion; + StorageStructureArea = Structure.StorageStructureArea; + AllowedLevelIncreaseStorage = Structure.AllowedLevelIncreaseStorage; } - set - { - if (double.IsNaN(value)) - { - structureNormalOrientation = value.ToPrecision(structureNormalOrientation.NumberOfDecimalPlaces); - return; - } - - RoundedDouble newOrientationValue = value.ToPrecision(structureNormalOrientation.NumberOfDecimalPlaces); - if (newOrientationValue < 0 || newOrientationValue > 360) - { - throw new ArgumentOutOfRangeException("value", RingtoetsCommonDataResources.Orientation_Value_needs_to_be_between_0_and_360); - } - structureNormalOrientation = newOrientationValue; - } } - /// - /// Gets or sets the allowed increase of level for the storage. - /// [m] - /// - public LogNormalDistribution AllowedLevelIncreaseStorage - { - get - { - return allowedLevelIncreaseStorage; - } - set - { - allowedLevelIncreaseStorage.Mean = value.Mean; - allowedLevelIncreaseStorage.StandardDeviation = value.StandardDeviation; - } - } - - /// - /// Gets or sets the storage structure area. - /// [m^2] - /// - public VariationCoefficientLogNormalDistribution StorageStructureArea - { - get - { - return storageStructureArea; - } - set - { - storageStructureArea.Mean = value.Mean; - storageStructureArea.CoefficientOfVariation = value.CoefficientOfVariation; - } - } - - /// - /// Gets or sets the flow width at the bottom protection. - /// [m] - /// - public LogNormalDistribution FlowWidthAtBottomProtection - { - get - { - return flowWidthAtBottomProtection; - } - set - { - flowWidthAtBottomProtection.Mean = value.Mean; - flowWidthAtBottomProtection.StandardDeviation = value.StandardDeviation; - } - } - - /// - /// Gets or sets the critical overtopping discharge. - /// [m^3/s/m] - /// - public VariationCoefficientLogNormalDistribution CriticalOvertoppingDischarge - { - get - { - return criticalOvertoppingDischarge; - } - set - { - criticalOvertoppingDischarge.Mean = value.Mean; - criticalOvertoppingDischarge.CoefficientOfVariation = value.CoefficientOfVariation; - } - } - - /// - /// Gets or sets the failure probability of structure given erosion. - /// [1/year] - /// - /// Thrown when the value of the probability - /// is not between [0, 1]. - public double FailureProbabilityStructureWithErosion - { - get - { - return failureProbabilityStructureWithErosion; - } - set - { - if (!ValidProbabilityValue(value)) - { - throw new ArgumentOutOfRangeException("value", RingtoetsCommonDataResources.FailureProbability_Value_needs_to_be_between_0_and_1); - } - failureProbabilityStructureWithErosion = value; - } - } - - /// - /// Gets or sets the width of flow apertures. - /// [m] - /// - public VariationCoefficientNormalDistribution WidthFlowApertures - { - get - { - return widthFlowApertures; - } - set - { - widthFlowApertures.Mean = value.Mean; - widthFlowApertures.CoefficientOfVariation = value.CoefficientOfVariation; - } - } - - /// - /// Gets or sets the height structure. - /// - public HeightStructure HeightStructure - { - get - { - return heightStructure; - } - set - { - heightStructure = value; - UpdateHeightStructureProperties(); - } - } - - /// - /// Gets or sets the foreshore profile. - /// - public ForeshoreProfile ForeshoreProfile - { - get - { - return foreshoreProfile; - } - set - { - foreshoreProfile = value; - UpdateForeshoreProperties(); - } - } - - public bool UseBreakWater { get; set; } - - public bool UseForeshore { get; set; } - - public RoundedPoint2DCollection ForeshoreGeometry - { - get - { - return foreshoreProfile != null - ? foreshoreProfile.Geometry - : new RoundedPoint2DCollection(2, Enumerable.Empty()); - } - } - - public BreakWater BreakWater { get; private set; } - - private void UpdateHeightStructureProperties() - { - if (heightStructure != null) - { - StructureNormalOrientation = heightStructure.StructureNormalOrientation; - LevelCrestStructure = heightStructure.LevelCrestStructure; - FlowWidthAtBottomProtection = heightStructure.FlowWidthAtBottomProtection; - CriticalOvertoppingDischarge = heightStructure.CriticalOvertoppingDischarge; - WidthFlowApertures = heightStructure.WidthFlowApertures; - FailureProbabilityStructureWithErosion = heightStructure.FailureProbabilityStructureWithErosion; - StorageStructureArea = heightStructure.StorageStructureArea; - AllowedLevelIncreaseStorage = heightStructure.AllowedLevelIncreaseStorage; - } - } - - private void UpdateForeshoreProperties() - { - if (foreshoreProfile == null) - { - UseForeshore = false; - UseBreakWater = false; - BreakWater = GetDefaultBreakWater(); - } - else - { - UseForeshore = foreshoreProfile.Geometry.Count() > 1; - UseBreakWater = foreshoreProfile.HasBreakWater; - BreakWater = foreshoreProfile.HasBreakWater ? - new BreakWater(foreshoreProfile.BreakWater.Type, foreshoreProfile.BreakWater.Height) : - GetDefaultBreakWater(); - } - } - - private static BreakWater GetDefaultBreakWater() - { - return new BreakWater(BreakWaterType.Dam, 0.0); - } - #endregion } } \ No newline at end of file Index: Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Forms/PropertyClasses/HeightStructuresInputContextProperties.cs =================================================================== diff -u -r5d503cf8885ced4799e5ad44242038d99e04b162 -r3e79015849651b140c9b496e8f0f57fcdcac0d92 --- Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Forms/PropertyClasses/HeightStructuresInputContextProperties.cs (.../HeightStructuresInputContextProperties.cs) (revision 5d503cf8885ced4799e5ad44242038d99e04b162) +++ Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Forms/PropertyClasses/HeightStructuresInputContextProperties.cs (.../HeightStructuresInputContextProperties.cs) (revision 3e79015849651b140c9b496e8f0f57fcdcac0d92) @@ -126,11 +126,11 @@ { get { - return data.WrappedData.HeightStructure; + return data.WrappedData.Structure; } set { - data.WrappedData.HeightStructure = value; + data.WrappedData.Structure = value; HeightStructuresHelper.Update(data.FailureMechanism.SectionResults, data.Calculation); data.WrappedData.NotifyObservers(); } @@ -144,10 +144,10 @@ { get { - return data.WrappedData.HeightStructure == null ? null : + return data.WrappedData.Structure == null ? null : new Point2D( - new RoundedDouble(0, data.WrappedData.HeightStructure.Location.X), - new RoundedDouble(0, data.WrappedData.HeightStructure.Location.Y)); + new RoundedDouble(0, data.WrappedData.Structure.Location.X), + new RoundedDouble(0, data.WrappedData.Structure.Location.Y)); } } Index: Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Plugin/HeightStructuresPlugin.cs =================================================================== diff -u -r5d503cf8885ced4799e5ad44242038d99e04b162 -r3e79015849651b140c9b496e8f0f57fcdcac0d92 --- Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Plugin/HeightStructuresPlugin.cs (.../HeightStructuresPlugin.cs) (revision 5d503cf8885ced4799e5ad44242038d99e04b162) +++ Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Plugin/HeightStructuresPlugin.cs (.../HeightStructuresPlugin.cs) (revision 3e79015849651b140c9b496e8f0f57fcdcac0d92) @@ -481,7 +481,7 @@ Name = NamingHelper.GetUniqueName(calculations, structure.Name, c => c.Name), InputParameters = { - HeightStructure = structure + Structure = structure } }; calculations.Add(calculation); Index: Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Utils/HeightStructuresHelper.cs =================================================================== diff -u -r5d503cf8885ced4799e5ad44242038d99e04b162 -r3e79015849651b140c9b496e8f0f57fcdcac0d92 --- Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Utils/HeightStructuresHelper.cs (.../HeightStructuresHelper.cs) (revision 5d503cf8885ced4799e5ad44242038d99e04b162) +++ Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Utils/HeightStructuresHelper.cs (.../HeightStructuresHelper.cs) (revision 3e79015849651b140c9b496e8f0f57fcdcac0d92) @@ -153,11 +153,7 @@ { throw new ArgumentNullException("calculation"); } - if (calculation.InputParameters.HeightStructure == null) - { - return null; - } - return new CalculationWithLocation(calculation, calculation.InputParameters.HeightStructure.Location); + return calculation.InputParameters.Structure == null ? null : new CalculationWithLocation(calculation, calculation.InputParameters.Structure.Location); } private static SectionResultWithCalculationAssignment AsCalculationAssignment(HeightStructuresFailureMechanismSectionResult failureMechanismSectionResult) Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Data.Test/HeightStructuresInputTest.cs =================================================================== diff -u -r12e5f6a6009617b69828d1b6e31b1eb3deda96b2 -r3e79015849651b140c9b496e8f0f57fcdcac0d92 --- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Data.Test/HeightStructuresInputTest.cs (.../HeightStructuresInputTest.cs) (revision 12e5f6a6009617b69828d1b6e31b1eb3deda96b2) +++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Data.Test/HeightStructuresInputTest.cs (.../HeightStructuresInputTest.cs) (revision 3e79015849651b140c9b496e8f0f57fcdcac0d92) @@ -20,18 +20,12 @@ // All rights reserved. using System; -using System.Linq; -using Core.Common.Base; using Core.Common.Base.Data; -using Core.Common.Base.Geometry; -using Core.Common.TestUtil; using NUnit.Framework; -using Ringtoets.Common.Data.Calculation; -using Ringtoets.Common.Data.DikeProfiles; using Ringtoets.Common.Data.Probabilistics; +using Ringtoets.Common.Data.Structures; using Ringtoets.Common.Data.TestUtil; using Ringtoets.HeightStructures.Data.TestUtil; -using Ringtoets.HydraRing.Data; namespace Ringtoets.HeightStructures.Data.Test { @@ -48,120 +42,19 @@ StandardDeviation = (RoundedDouble) 0.05 }; - var modelFactorSuperCriticalFlow = new NormalDistribution(2) - { - Mean = (RoundedDouble) 1.1, - StandardDeviation = (RoundedDouble) 0.03 - }; - - var allowedLevelIncreaseStorage = new LogNormalDistribution(2) - { - Mean = (RoundedDouble) double.NaN, - StandardDeviation = (RoundedDouble) 0.1 - }; - - var storageStructureArea = new VariationCoefficientLogNormalDistribution(2) - { - Mean = (RoundedDouble) double.NaN, - CoefficientOfVariation = (RoundedDouble) 0.1 - }; - - var flowWidthAtBottomProtection = new LogNormalDistribution(2) - { - Mean = (RoundedDouble) double.NaN, - StandardDeviation = (RoundedDouble) 0.05 - }; - - var criticalOvertoppingDischarge = new VariationCoefficientLogNormalDistribution(2) - { - Mean = (RoundedDouble) double.NaN, - CoefficientOfVariation = (RoundedDouble) 0.15 - }; - - var widthFlowApertures = new VariationCoefficientNormalDistribution(2) - { - Mean = (RoundedDouble) double.NaN, - CoefficientOfVariation = (RoundedDouble) 0.05 - }; - - var stormDuration = new VariationCoefficientLogNormalDistribution(2) - { - Mean = (RoundedDouble) 6.0, - CoefficientOfVariation = (RoundedDouble) 0.25 - }; - // Call var input = new HeightStructuresInput(); // Assert - Assert.IsInstanceOf(input); - Assert.IsInstanceOf(input); - Assert.IsInstanceOf(input); - Assert.IsInstanceOf(input); + Assert.IsInstanceOf>(input); - Assert.IsNull(input.HeightStructure); - AssertForeshoreProfile(null, input); - - Assert.IsNull(input.HydraulicBoundaryLocation); - CollectionAssert.IsEmpty(input.ForeshoreGeometry); - - AssertAreEqual(double.NaN, input.StructureNormalOrientation); - Assert.AreEqual(2, input.StructureNormalOrientation.NumberOfDecimalPlaces); - DistributionAssert.AreEqual(levelCrestStructure, input.LevelCrestStructure); - DistributionAssert.AreEqual(modelFactorSuperCriticalFlow, input.ModelFactorSuperCriticalFlow); - DistributionAssert.AreEqual(allowedLevelIncreaseStorage, input.AllowedLevelIncreaseStorage); - DistributionAssert.AreEqual(storageStructureArea, input.StorageStructureArea); - DistributionAssert.AreEqual(flowWidthAtBottomProtection, input.FlowWidthAtBottomProtection); - DistributionAssert.AreEqual(criticalOvertoppingDischarge, input.CriticalOvertoppingDischarge); - DistributionAssert.AreEqual(widthFlowApertures, input.WidthFlowApertures); - DistributionAssert.AreEqual(stormDuration, input.StormDuration); - Assert.IsNaN(input.FailureProbabilityStructureWithErosion); Assert.AreEqual(2, input.DeviationWaveDirection.NumberOfDecimalPlaces); Assert.IsNaN(input.DeviationWaveDirection); } [Test] - public void Properties_ModelFactorSuperCriticalFlow_ExpectedValues() - { - // Setup - var random = new Random(22); - var input = new HeightStructuresInput(); - var mean = (RoundedDouble) (0.01 + random.NextDouble()); - var expectedDistribution = new NormalDistribution(2) - { - Mean = mean, - StandardDeviation = input.ModelFactorSuperCriticalFlow.StandardDeviation - }; - var distributionToSet = new NormalDistribution(5) - { - Mean = mean, - StandardDeviation = (RoundedDouble) random.NextDouble() - }; - - // Call - input.ModelFactorSuperCriticalFlow = distributionToSet; - - // Assert - AssertDistributionCorrectlySet(input.ModelFactorSuperCriticalFlow, distributionToSet, expectedDistribution); - } - - [Test] - public void Properties_HydraulicBoundaryLocation_ExpectedValues() - { - // Setup - var input = new HeightStructuresInput(); - var location = new HydraulicBoundaryLocation(0, "test", 0, 0); - - // Call - input.HydraulicBoundaryLocation = location; - - // Assert - Assert.AreSame(location, input.HydraulicBoundaryLocation); - } - - [Test] public void Properties_DeviationWaveDirection_ExpectedValues() { // Setup @@ -177,33 +70,8 @@ Assert.AreEqual(2, input.DeviationWaveDirection.NumberOfDecimalPlaces); AssertAreEqual(deviationWaveDirection, input.DeviationWaveDirection); } - + [Test] - public void Properties_StormDuration_ExpectedValues() - { - // Setup - var random = new Random(22); - var input = new HeightStructuresInput(); - var mean = (RoundedDouble) (0.01 + random.NextDouble()); - var expectedDistribution = new VariationCoefficientLogNormalDistribution(2) - { - Mean = mean, - CoefficientOfVariation = input.StormDuration.CoefficientOfVariation - }; - var distributionToSet = new VariationCoefficientLogNormalDistribution(5) - { - Mean = mean, - CoefficientOfVariation = (RoundedDouble) random.NextDouble() - }; - - // Call - input.StormDuration = distributionToSet; - - // Assert - AssertDistributionCorrectlySet(input.StormDuration, distributionToSet, expectedDistribution); - } - - [Test] public void Properties_LevelCrestStructure_ExpectedValues() { // Setup @@ -230,278 +98,27 @@ } [Test] - [TestCase(360.004)] - [TestCase(300)] - [TestCase(0)] - [TestCase(-0.004)] - [TestCase(double.NaN)] - public void Properties_StructureNormalOrientationValidValues_NewValueSet(double orientation) + public void Properties_StructureNull_DoesNotChangeValues() { // Setup var input = new HeightStructuresInput(); // Call - input.StructureNormalOrientation = (RoundedDouble) orientation; + input.Structure = null; // Assert - Assert.AreEqual(2, input.StructureNormalOrientation.NumberOfDecimalPlaces); - AssertAreEqual(orientation, input.StructureNormalOrientation); - } - - [Test] - [TestCase(400)] - [TestCase(360.05)] - [TestCase(-0.005)] - [TestCase(-23)] - [TestCase(double.PositiveInfinity)] - [TestCase(double.NegativeInfinity)] - public void Properties_StructureNormalOrientationInValidValues_ThrowsArgumentOutOfRangeException(double invalidValue) - { - // Setup - var input = new HeightStructuresInput(); - - // Call - TestDelegate call = () => input.StructureNormalOrientation = (RoundedDouble) invalidValue; - - // Assert - TestHelper.AssertThrowsArgumentExceptionAndTestMessage(call, "De waarde voor de oriƫntatie moet in het bereik tussen [0, 360] graden liggen."); - } - - [Test] - public void Properties_AllowedLevelIncreaseStorage_ExpectedValues() - { - // Setup - var random = new Random(22); - var input = new HeightStructuresInput(); - var mean = (RoundedDouble) (0.01 + random.NextDouble()); - var standardDeviation = (RoundedDouble) (0.01 + random.NextDouble()); - var expectedDistribution = new LogNormalDistribution(2) - { - Mean = mean, - StandardDeviation = standardDeviation - }; - var distributionToSet = new LogNormalDistribution(5) - { - Mean = mean, - StandardDeviation = standardDeviation - }; - - // Call - input.AllowedLevelIncreaseStorage = distributionToSet; - - // Assert - AssertDistributionCorrectlySet(input.AllowedLevelIncreaseStorage, distributionToSet, expectedDistribution); - } - - [Test] - public void Properties_StorageStructureArea_ExpectedValues() - { - // Setup - var random = new Random(22); - var input = new HeightStructuresInput(); - var mean = (RoundedDouble) (0.01 + random.NextDouble()); - var variation = (RoundedDouble) (0.01 + random.NextDouble()); - var expectedDistribution = new VariationCoefficientLogNormalDistribution(2) - { - Mean = mean, - CoefficientOfVariation = variation - }; - var distributionToSet = new VariationCoefficientLogNormalDistribution(5) - { - Mean = mean, - CoefficientOfVariation = variation - }; - - // Call - input.StorageStructureArea = distributionToSet; - - // Assert - AssertDistributionCorrectlySet(input.StorageStructureArea, distributionToSet, expectedDistribution); - } - - [Test] - public void Properties_FlowWidthAtBottomProtection_ExpectedValues() - { - // Setup - var random = new Random(22); - var input = new HeightStructuresInput(); - var mean = (RoundedDouble) (0.01 + random.NextDouble()); - var standardDeviation = (RoundedDouble) (0.01 + random.NextDouble()); - var expectedDistribution = new LogNormalDistribution(2) - { - Mean = mean, - StandardDeviation = standardDeviation - }; - var distributionToSet = new LogNormalDistribution(5) - { - Mean = mean, - StandardDeviation = standardDeviation - }; - - // Call - input.FlowWidthAtBottomProtection = distributionToSet; - - // Assert - AssertDistributionCorrectlySet(input.FlowWidthAtBottomProtection, distributionToSet, expectedDistribution); - } - - [Test] - public void Properties_CriticalOvertoppingDischarge_ExpectedValues() - { - // Setup - var random = new Random(22); - var input = new HeightStructuresInput(); - var mean = (RoundedDouble) (0.01 + random.NextDouble()); - var variation = (RoundedDouble) (0.01 + random.NextDouble()); - var expectedDistribution = new VariationCoefficientLogNormalDistribution(2) - { - Mean = mean, - CoefficientOfVariation = variation - }; - var distributionToSet = new VariationCoefficientLogNormalDistribution(5) - { - Mean = mean, - CoefficientOfVariation = variation - }; - - // Call - input.CriticalOvertoppingDischarge = distributionToSet; - - // Assert - AssertDistributionCorrectlySet(input.CriticalOvertoppingDischarge, distributionToSet, expectedDistribution); - } - - [Test] - [TestCase(0)] - [TestCase(0.5)] - [TestCase(1)] - public void Properties_ValidFailureProbabilityStructureWithErosion_ExpectedValues(double failureProbabilityStructureWithErosion) - { - // Setup - var input = new HeightStructuresInput(); - - // Call - input.FailureProbabilityStructureWithErosion = failureProbabilityStructureWithErosion; - - // Assert - Assert.AreEqual(failureProbabilityStructureWithErosion, input.FailureProbabilityStructureWithErosion); - } - - [Test] - [TestCase(-0.1)] - [TestCase(1.1)] - [TestCase(double.NaN)] - public void Properties_InvalidFailureProbabilityStructureWithErosion_ThrowArgumentOutOfRangeException(double failureProbabilityStructureWithErosion) - { - // Setup - var input = new HeightStructuresInput(); - - // Call - TestDelegate call = () => input.FailureProbabilityStructureWithErosion = (RoundedDouble) failureProbabilityStructureWithErosion; - - // Assert - TestHelper.AssertThrowsArgumentExceptionAndTestMessage(call, "De waarde voor de faalkans moet in het bereik tussen [0, 1] liggen."); - } - - [Test] - public void Properties_WidthFlowApertures_ExpectedValues() - { - // Setup - var random = new Random(22); - var input = new HeightStructuresInput(); - var mean = (RoundedDouble) (0.01 + random.NextDouble()); - var variation = (RoundedDouble) (0.01 + random.NextDouble()); - var expectedDistribution = new VariationCoefficientNormalDistribution(2) - { - Mean = mean, - CoefficientOfVariation = variation - }; - var distributionToSet = new VariationCoefficientNormalDistribution(5) - { - Mean = mean, - CoefficientOfVariation = variation - }; - - // Call - input.WidthFlowApertures = distributionToSet; - - // Assert - AssertDistributionCorrectlySet(input.WidthFlowApertures, distributionToSet, expectedDistribution); - } - - [Test] - public void Properties_ForeshoreProfileIsNull_ExpectedValues() - { - // Setup - var input = new HeightStructuresInput - { - UseForeshore = true, - UseBreakWater = true - }; - - // Call - input.ForeshoreProfile = null; - - // Assert - AssertForeshoreProfile(null, input); - } - - [Test] - public void Properties_ForeshoreProfileWithoutBreakwater_ExpectedValues() - { - // Setup - var foreshoreProfile = new ForeshoreProfile(new Point2D(0, 0), new[] - { - new Point2D(1, 1) - }, null, new ForeshoreProfile.ConstructionProperties()); - var input = new HeightStructuresInput(); - - // Call - input.ForeshoreProfile = foreshoreProfile; - - // Assert - AssertForeshoreProfile(foreshoreProfile, input); - } - - [Test] - public void Properties_ForeshoreProfileWithBreakwater_ExpectedValues() - { - // Setup - var foreshoreProfile = new ForeshoreProfile(new Point2D(0, 0), new[] - { - new Point2D(1, 1) - }, new BreakWater(BreakWaterType.Wall, 2), new ForeshoreProfile.ConstructionProperties()); - var input = new HeightStructuresInput(); - - // Call - input.ForeshoreProfile = foreshoreProfile; - - // Assert - AssertForeshoreProfile(foreshoreProfile, input); - } - - [Test] - public void Properties_HeightStructureNull_DoesNotChangeValues() - { - // Setup - var input = new HeightStructuresInput(); - - // Call - input.HeightStructure = null; - - // Assert AssertHeightStructure(null, input); } [Test] - public void Properties_HeightStructure_UpdateValuesAccordingly() + public void PropertiesStructure_UpdateValuesAccordingly() { // Setup var input = new HeightStructuresInput(); TestHeightStructure structure = new TestHeightStructure(); // Call - input.HeightStructure = structure; + input.Structure = structure; // Assert AssertHeightStructure(structure, input); @@ -511,7 +128,7 @@ { if (expectedHeightStructure == null) { - Assert.IsNull(input.HeightStructure); + Assert.IsNull(input.Structure); var defaultInput = new HeightStructuresInput(); AssertAreEqual(defaultInput.StructureNormalOrientation, input.StructureNormalOrientation); @@ -572,38 +189,7 @@ input.AllowedLevelIncreaseStorage.StandardDeviation); } } - - private static void AssertForeshoreProfile(ForeshoreProfile expectedForeshoreProfile, HeightStructuresInput input) - { - if (expectedForeshoreProfile == null) - { - Assert.IsNull(input.ForeshoreProfile); - Assert.IsFalse(input.UseForeshore); - - Assert.IsFalse(input.UseBreakWater); - BreakWater breakWater = GetDefaultBreakWater(); - Assert.AreEqual(breakWater.Type, input.BreakWater.Type); - AssertAreEqual(breakWater.Height, input.BreakWater.Height); - } - else - { - Assert.AreEqual(expectedForeshoreProfile, input.ForeshoreProfile); - Assert.AreEqual(expectedForeshoreProfile.Geometry.Count() > 1, input.UseForeshore); - - Assert.AreEqual(expectedForeshoreProfile.HasBreakWater, input.UseBreakWater); - BreakWater breakWater = expectedForeshoreProfile.HasBreakWater ? - new BreakWater(expectedForeshoreProfile.BreakWater.Type, expectedForeshoreProfile.BreakWater.Height) : - GetDefaultBreakWater(); - Assert.AreEqual(breakWater.Type, input.BreakWater.Type); - AssertAreEqual(breakWater.Height, input.BreakWater.Height); - } - } - - private static BreakWater GetDefaultBreakWater() - { - return new BreakWater(BreakWaterType.Dam, 0.0); - } - + private static void AssertAreEqual(double expectedValue, RoundedDouble actualValue) { Assert.AreEqual(expectedValue, actualValue, actualValue.GetAccuracy()); @@ -614,11 +200,5 @@ Assert.AreNotSame(setDistribution, distributionToAssert); DistributionAssert.AreEqual(expectedDistribution, distributionToAssert); } - - private static void AssertDistributionCorrectlySet(IVariationCoefficientDistribution distributionToAssert, IVariationCoefficientDistribution setDistribution, IVariationCoefficientDistribution expectedDistribution) - { - Assert.AreNotSame(setDistribution, distributionToAssert); - DistributionAssert.AreEqual(expectedDistribution, distributionToAssert); - } } } \ No newline at end of file Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/PropertyClasses/HeightStructuresInputContextPropertiesTest.cs =================================================================== diff -u -r5d503cf8885ced4799e5ad44242038d99e04b162 -r3e79015849651b140c9b496e8f0f57fcdcac0d92 --- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/PropertyClasses/HeightStructuresInputContextPropertiesTest.cs (.../HeightStructuresInputContextPropertiesTest.cs) (revision 5d503cf8885ced4799e5ad44242038d99e04b162) +++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/PropertyClasses/HeightStructuresInputContextPropertiesTest.cs (.../HeightStructuresInputContextPropertiesTest.cs) (revision 3e79015849651b140c9b496e8f0f57fcdcac0d92) @@ -182,7 +182,7 @@ { InputParameters = { - HeightStructure = new TestHeightStructure(), + Structure = new TestHeightStructure(), HydraulicBoundaryLocation = CreateValidHydraulicBoundaryLocation(), ForeshoreProfile = CreateValidForeshoreProfile() } @@ -197,12 +197,12 @@ // Assert var input = calculation.InputParameters; - Assert.AreSame(input.HeightStructure, properties.HeightStructure); + Assert.AreSame(input.Structure, properties.HeightStructure); - var expectedHeightStructureLocation = new Point2D(new RoundedDouble(0, input.HeightStructure.Location.X), new RoundedDouble(0, input.HeightStructure.Location.Y)); + var expectedHeightStructureLocation = new Point2D(new RoundedDouble(0, input.Structure.Location.X), new RoundedDouble(0, input.Structure.Location.Y)); Assert.AreEqual(expectedHeightStructureLocation, properties.HeightStructureLocation); - Assert.AreEqual(input.HeightStructure.StructureNormalOrientation, properties.StructureNormalOrientation); + Assert.AreEqual(input.Structure.StructureNormalOrientation, properties.StructureNormalOrientation); var levelCrestStructureProperties = new NormalDistributionProperties { Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/TreeNodeInfos/HeightStructuresCalculationContextTreeNodeInfoTest.cs =================================================================== diff -u -r6b6f344a9cf3e6c44b63320dfa3f5c828c4221d8 -r3e79015849651b140c9b496e8f0f57fcdcac0d92 --- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/TreeNodeInfos/HeightStructuresCalculationContextTreeNodeInfoTest.cs (.../HeightStructuresCalculationContextTreeNodeInfoTest.cs) (revision 6b6f344a9cf3e6c44b63320dfa3f5c828c4221d8) +++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/TreeNodeInfos/HeightStructuresCalculationContextTreeNodeInfoTest.cs (.../HeightStructuresCalculationContextTreeNodeInfoTest.cs) (revision 3e79015849651b140c9b496e8f0f57fcdcac0d92) @@ -608,7 +608,7 @@ InputParameters = { HydraulicBoundaryLocation = hydraulicBoundaryLocation, - HeightStructure = new TestHeightStructure() + Structure = new TestHeightStructure() } }; Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/TreeNodeInfos/HeightStructuresCalculationGroupContextTreeNodeInfoTest.cs =================================================================== diff -u -rd1622350f2155131233440de093850e3e7a4459f -r3e79015849651b140c9b496e8f0f57fcdcac0d92 --- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/TreeNodeInfos/HeightStructuresCalculationGroupContextTreeNodeInfoTest.cs (.../HeightStructuresCalculationGroupContextTreeNodeInfoTest.cs) (revision d1622350f2155131233440de093850e3e7a4459f) +++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/TreeNodeInfos/HeightStructuresCalculationGroupContextTreeNodeInfoTest.cs (.../HeightStructuresCalculationGroupContextTreeNodeInfoTest.cs) (revision 3e79015849651b140c9b496e8f0f57fcdcac0d92) @@ -817,7 +817,7 @@ InputParameters = { HydraulicBoundaryLocation = new HydraulicBoundaryLocation(-1, "nonExisting", 1, 2), - HeightStructure = new TestHeightStructure() + Structure = new TestHeightStructure() } }); @@ -827,7 +827,7 @@ InputParameters = { HydraulicBoundaryLocation = new HydraulicBoundaryLocation(-1, "nonExisting", 1, 2), - HeightStructure = new TestHeightStructure() + Structure = new TestHeightStructure() } }); Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/TreeNodeInfos/HeightStructuresFailureMechanismContextTreeNodeInfoTest.cs =================================================================== diff -u -rb2f617ad0d8d6457422a569685763b9718740560 -r3e79015849651b140c9b496e8f0f57fcdcac0d92 --- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/TreeNodeInfos/HeightStructuresFailureMechanismContextTreeNodeInfoTest.cs (.../HeightStructuresFailureMechanismContextTreeNodeInfoTest.cs) (revision b2f617ad0d8d6457422a569685763b9718740560) +++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/TreeNodeInfos/HeightStructuresFailureMechanismContextTreeNodeInfoTest.cs (.../HeightStructuresFailureMechanismContextTreeNodeInfoTest.cs) (revision 3e79015849651b140c9b496e8f0f57fcdcac0d92) @@ -734,7 +734,7 @@ InputParameters = { HydraulicBoundaryLocation = new HydraulicBoundaryLocation(-1, "nonExisting", 1, 2), - HeightStructure = new TestHeightStructure() + Structure = new TestHeightStructure() } }); failureMechanism.CalculationsGroup.Children.Add(new HeightStructuresCalculation @@ -743,7 +743,7 @@ InputParameters = { HydraulicBoundaryLocation = new HydraulicBoundaryLocation(-1, "nonExisting", 1, 2), - HeightStructure = new TestHeightStructure() + Structure = new TestHeightStructure() } }); Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/UITypeEditors/HeightStructuresInputContextStructureEditorTest.cs =================================================================== diff -u -r5d503cf8885ced4799e5ad44242038d99e04b162 -r3e79015849651b140c9b496e8f0f57fcdcac0d92 --- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/UITypeEditors/HeightStructuresInputContextStructureEditorTest.cs (.../HeightStructuresInputContextStructureEditorTest.cs) (revision 5d503cf8885ced4799e5ad44242038d99e04b162) +++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/UITypeEditors/HeightStructuresInputContextStructureEditorTest.cs (.../HeightStructuresInputContextStructureEditorTest.cs) (revision 3e79015849651b140c9b496e8f0f57fcdcac0d92) @@ -99,7 +99,7 @@ { InputParameters = { - HeightStructure = heightStructure + Structure = heightStructure } }, new HeightStructuresFailureMechanism Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/Views/HeightStructuresScenariosViewTest.cs =================================================================== diff -u -r5d503cf8885ced4799e5ad44242038d99e04b162 -r3e79015849651b140c9b496e8f0f57fcdcac0d92 --- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/Views/HeightStructuresScenariosViewTest.cs (.../HeightStructuresScenariosViewTest.cs) (revision 5d503cf8885ced4799e5ad44242038d99e04b162) +++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/Views/HeightStructuresScenariosViewTest.cs (.../HeightStructuresScenariosViewTest.cs) (revision 3e79015849651b140c9b496e8f0f57fcdcac0d92) @@ -224,7 +224,7 @@ var calculationA = (HeightStructuresCalculation) failureMechanism.CalculationsGroup.Children[0]; var calculationB = (HeightStructuresCalculation) failureMechanism.CalculationsGroup.Children[1]; - calculationA.InputParameters.HeightStructure = calculationB.InputParameters.HeightStructure; + calculationA.InputParameters.Structure = calculationB.InputParameters.Structure; // Call calculationA.NotifyObservers(); @@ -254,12 +254,12 @@ Name = "CalculationC", InputParameters = { - HeightStructure = calculationB.InputParameters.HeightStructure + Structure = calculationB.InputParameters.Structure } }; failureMechanism.CalculationsGroup.Children.Add(calculationC); - calculationC.InputParameters.HeightStructure = calculationC.InputParameters.HeightStructure; + calculationC.InputParameters.Structure = calculationC.InputParameters.Structure; // Call failureMechanism.CalculationsGroup.NotifyObservers(); @@ -311,15 +311,15 @@ Name = "CalculationA", InputParameters = { - HeightStructure = new TestHeightStructure(matchingPointA) + Structure = new TestHeightStructure(matchingPointA) } }; var calculationB = new HeightStructuresCalculation { Name = "CalculationB", InputParameters = { - HeightStructure = new TestHeightStructure(matchingPointB) + Structure = new TestHeightStructure(matchingPointB) } }; Point2D connectionPoint = new Point2D(10, 10); Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Integration.Test/HeightStructuresCalculationActivityIntegrationTest.cs =================================================================== diff -u -rb2f617ad0d8d6457422a569685763b9718740560 -r3e79015849651b140c9b496e8f0f57fcdcac0d92 --- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Integration.Test/HeightStructuresCalculationActivityIntegrationTest.cs (.../HeightStructuresCalculationActivityIntegrationTest.cs) (revision b2f617ad0d8d6457422a569685763b9718740560) +++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Integration.Test/HeightStructuresCalculationActivityIntegrationTest.cs (.../HeightStructuresCalculationActivityIntegrationTest.cs) (revision 3e79015849651b140c9b496e8f0f57fcdcac0d92) @@ -147,7 +147,7 @@ InputParameters = { HydraulicBoundaryLocation = assessmentSection.HydraulicBoundaryDatabase.Locations.First(hl => hl.Id == 1300001), - HeightStructure = new TestHeightStructure() + Structure = new TestHeightStructure() } }; @@ -197,7 +197,7 @@ InputParameters = { HydraulicBoundaryLocation = new HydraulicBoundaryLocation(1, "test", 1, 1), - HeightStructure = new TestHeightStructure() + Structure = new TestHeightStructure() } }; @@ -251,7 +251,7 @@ InputParameters = { HydraulicBoundaryLocation = assessmentSection.HydraulicBoundaryDatabase.Locations.First(hl => hl.Id == 1300001), - HeightStructure = new TestHeightStructure() + Structure = new TestHeightStructure() } }; @@ -299,7 +299,7 @@ InputParameters = { HydraulicBoundaryLocation = new HydraulicBoundaryLocation(1, "test", 1, 1), - HeightStructure = new TestHeightStructure() + Structure = new TestHeightStructure() } }; Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Integration.Test/HeightStructuresScenariosViewIntegrationTest.cs =================================================================== diff -u -r5d503cf8885ced4799e5ad44242038d99e04b162 -r3e79015849651b140c9b496e8f0f57fcdcac0d92 --- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Integration.Test/HeightStructuresScenariosViewIntegrationTest.cs (.../HeightStructuresScenariosViewIntegrationTest.cs) (revision 5d503cf8885ced4799e5ad44242038d99e04b162) +++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Integration.Test/HeightStructuresScenariosViewIntegrationTest.cs (.../HeightStructuresScenariosViewIntegrationTest.cs) (revision 3e79015849651b140c9b496e8f0f57fcdcac0d92) @@ -88,7 +88,7 @@ new HeightStructuresImporter(assessmentSection.HeightStructures.HeightStructures, assessmentSection.ReferenceLine, filePath) - .Import(); + .Import(); CalculationGroup calculationsGroup = assessmentSection.HeightStructures.CalculationsGroup; var view = new HeightStructuresScenariosView() @@ -101,7 +101,6 @@ var dataGridView = (DataGridView) new ControlTester("dataGridView").TheObject; - // Call foreach (var profile in assessmentSection.HeightStructures.HeightStructures) { @@ -110,7 +109,7 @@ Name = NamingHelper.GetUniqueName(((CalculationGroup) view.Data).Children, profile.Name, c => c.Name), InputParameters = { - HeightStructure = profile + Structure = profile } }); } @@ -120,7 +119,7 @@ DataGridViewCell dataGridViewCell = dataGridView.Rows[13].Cells[1]; Assert.AreEqual(2, ((DataGridViewComboBoxCell) dataGridViewCell).Items.Count); Assert.AreEqual("", ((DataGridViewComboBoxCell) dataGridViewCell).Items[0].ToString()); - Assert.AreEqual("Eerste kunstwerk 6-3", ((DataGridViewComboBoxCell)dataGridViewCell).Items[1].ToString()); + Assert.AreEqual("Eerste kunstwerk 6-3", ((DataGridViewComboBoxCell) dataGridViewCell).Items[1].ToString()); } } @@ -136,7 +135,7 @@ new HeightStructuresImporter(assessmentSection.HeightStructures.HeightStructures, assessmentSection.ReferenceLine, filePath) - .Import(); + .Import(); CalculationGroup calculationsGroup = assessmentSection.HeightStructures.CalculationsGroup; var view = new HeightStructuresScenariosView() @@ -149,15 +148,14 @@ var dataGridView = (DataGridView) new ControlTester("dataGridView").TheObject; - foreach (var profile in assessmentSection.HeightStructures.HeightStructures) { calculationsGroup.Children.Add(new HeightStructuresCalculation { Name = NamingHelper.GetUniqueName(calculationsGroup.Children, profile.Name, c => c.Name), InputParameters = { - HeightStructure = profile + Structure = profile } }); } @@ -174,7 +172,7 @@ DataGridViewCell dataGridViewCell = dataGridView.Rows[13].Cells[1]; Assert.AreEqual(2, ((DataGridViewComboBoxCell) dataGridViewCell).Items.Count); Assert.AreEqual("", ((DataGridViewComboBoxCell) dataGridViewCell).Items[0].ToString()); - Assert.AreEqual("Eerste kunstwerk 6-3_changed", ((DataGridViewComboBoxCell)dataGridViewCell).Items[1].ToString()); + Assert.AreEqual("Eerste kunstwerk 6-3_changed", ((DataGridViewComboBoxCell) dataGridViewCell).Items[1].ToString()); } } @@ -190,7 +188,7 @@ new HeightStructuresImporter(assessmentSection.HeightStructures.HeightStructures, assessmentSection.ReferenceLine, filePath) - .Import(); + .Import(); var view = new HeightStructuresScenariosView() { @@ -209,22 +207,22 @@ Name = NamingHelper.GetUniqueName(assessmentSection.HeightStructures.CalculationsGroup.Children, profile.Name + "Calculation", c => c.Name), InputParameters = { - HeightStructure = profile + Structure = profile } }); } // Call var calculationsGroup = assessmentSection.HeightStructures.CalculationsGroup; - ((HeightStructuresCalculation) calculationsGroup.Children[1]).InputParameters.HeightStructure = - ((HeightStructuresCalculation) calculationsGroup.Children[0]).InputParameters.HeightStructure; + ((HeightStructuresCalculation) calculationsGroup.Children[1]).InputParameters.Structure = + ((HeightStructuresCalculation) calculationsGroup.Children[0]).InputParameters.Structure; calculationsGroup.NotifyObservers(); // Assert DataGridViewCell dataGridViewCell = dataGridView.Rows[13].Cells[1]; Assert.AreEqual(3, ((DataGridViewComboBoxCell) dataGridViewCell).Items.Count); Assert.AreEqual("", ((DataGridViewComboBoxCell) dataGridViewCell).Items[0].ToString()); - Assert.AreEqual("Eerste kunstwerk 6-3Calculation", ((DataGridViewComboBoxCell)dataGridViewCell).Items[1].ToString()); + Assert.AreEqual("Eerste kunstwerk 6-3Calculation", ((DataGridViewComboBoxCell) dataGridViewCell).Items[1].ToString()); Assert.AreEqual("Tweede kunstwerk 6-3Calculation", ((DataGridViewComboBoxCell) dataGridViewCell).Items[2].ToString()); DataGridViewCell dataGridViewCellWithRemovedCalculation = dataGridView.Rows[56].Cells[1]; Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Utils.Test/HeightStructuresHelperTest.cs =================================================================== diff -u -r5d503cf8885ced4799e5ad44242038d99e04b162 -r3e79015849651b140c9b496e8f0f57fcdcac0d92 --- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Utils.Test/HeightStructuresHelperTest.cs (.../HeightStructuresHelperTest.cs) (revision 5d503cf8885ced4799e5ad44242038d99e04b162) +++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Utils.Test/HeightStructuresHelperTest.cs (.../HeightStructuresHelperTest.cs) (revision 3e79015849651b140c9b496e8f0f57fcdcac0d92) @@ -68,15 +68,15 @@ { InputParameters = { - HeightStructure = new TestHeightStructure(new Point2D(1.1, 2.2)) + Structure = new TestHeightStructure(new Point2D(1.1, 2.2)) } }; private readonly HeightStructuresCalculation calculationInSectionB = new HeightStructuresCalculation { InputParameters = { - HeightStructure = new TestHeightStructure(new Point2D(50.0, 66.0)) + Structure = new TestHeightStructure(new Point2D(50.0, 66.0)) } };