Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/HydraulicLocationEntityReadExtensionsTest.cs =================================================================== diff -u -r8bb6e849266ec28412ebfe23beccd7235c4db9bf -r14a04f6f5ad2079a2dbf88db0b762a203edb82af --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/HydraulicLocationEntityReadExtensionsTest.cs (.../HydraulicLocationEntityReadExtensionsTest.cs) (revision 8bb6e849266ec28412ebfe23beccd7235c4db9bf) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/HydraulicLocationEntityReadExtensionsTest.cs (.../HydraulicLocationEntityReadExtensionsTest.cs) (revision 14a04f6f5ad2079a2dbf88db0b762a203edb82af) @@ -23,6 +23,7 @@ using Application.Ringtoets.Storage.DbContext; using Application.Ringtoets.Storage.Read; using Core.Common.Base.Data; +using Core.Common.TestUtil; using NUnit.Framework; using Ringtoets.Common.Data.Hydraulics; using Ringtoets.Common.Data.TestUtil; @@ -70,12 +71,16 @@ const string testName = "testName"; double x = random.NextDouble(); double y = random.NextDouble(); + bool shouldDesignWaterLevelIllustrationPointsBeCalculated = random.NextBoolean(); + bool shouldWaveHeightIllustrationPointsBeCalculated = random.NextBoolean(); var entity = new HydraulicLocationEntity { LocationId = testId, Name = testName, LocationX = x, - LocationY = y + LocationY = y, + ShouldWaterLevelIllustrationPointsBeCalculated = Convert.ToByte(shouldDesignWaterLevelIllustrationPointsBeCalculated), + ShouldWaveHeightIllustrationPointsBeCalculated = Convert.ToByte(shouldWaveHeightIllustrationPointsBeCalculated) }; var collector = new ReadConversionCollector(); @@ -89,6 +94,10 @@ Assert.AreEqual(testName, location.Name); Assert.AreEqual(x, location.Location.X, 1e-6); Assert.AreEqual(y, location.Location.Y, 1e-6); + + AssertHydraulicBoundaryLocationCalculation(shouldDesignWaterLevelIllustrationPointsBeCalculated, location.DesignWaterLevelCalculation); + AssertHydraulicBoundaryLocationCalculation(shouldWaveHeightIllustrationPointsBeCalculated, location.WaveHeightCalculation); + Assert.IsFalse(location.DesignWaterLevelCalculation.HasOutput); Assert.IsFalse(location.WaveHeightCalculation.HasOutput); @@ -164,6 +173,12 @@ Assert.AreSame(location1, location2); } + private static void AssertHydraulicBoundaryLocationCalculation(bool shouldDesignWaterLevelIllustrationPointsBeCalculated, + HydraulicBoundaryLocationCalculation calculation) + { + Assert.AreEqual(shouldDesignWaterLevelIllustrationPointsBeCalculated, calculation.InputParameters.ShouldIllustrationPointsBeCalculated); + } + private static void AssertHydraulicBoundaryLocationOutput(IHydraulicLocationOutputEntity expected, HydraulicBoundaryLocationOutput actual) { if (expected == null)