Index: Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/PropertyClasses/GrassCoverErosionOutwardsDesignWaterLevelLocationContextPropertiesTest.cs =================================================================== diff -u -r8bb6e849266ec28412ebfe23beccd7235c4db9bf -r1413aaf4fe060785cf2f28ba1cf27c0ffb87969d --- Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/PropertyClasses/GrassCoverErosionOutwardsDesignWaterLevelLocationContextPropertiesTest.cs (.../GrassCoverErosionOutwardsDesignWaterLevelLocationContextPropertiesTest.cs) (revision 8bb6e849266ec28412ebfe23beccd7235c4db9bf) +++ Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/PropertyClasses/GrassCoverErosionOutwardsDesignWaterLevelLocationContextPropertiesTest.cs (.../GrassCoverErosionOutwardsDesignWaterLevelLocationContextPropertiesTest.cs) (revision 1413aaf4fe060785cf2f28ba1cf27c0ffb87969d) @@ -21,13 +21,16 @@ using System; using System.ComponentModel; +using System.Linq; using Core.Common.Base; using Core.Common.Base.Geometry; using Core.Common.TestUtil; using Core.Common.Utils; using NUnit.Framework; using Ringtoets.Common.Data.Hydraulics; +using Ringtoets.Common.Data.Hydraulics.IllustrationPoints; using Ringtoets.Common.Data.TestUtil; +using Ringtoets.Common.Data.TestUtil.IllustrationPoints; using Ringtoets.Common.Forms.TypeConverters; using Ringtoets.GrassCoverErosionOutwards.Forms.PresentationObjects; using Ringtoets.GrassCoverErosionOutwards.Forms.PropertyClasses; @@ -96,7 +99,9 @@ } [Test] - public void GetProperties_FullyConfiguredLocation_ReturnsExpected() + [TestCase(true)] + [TestCase(false)] + public void GetProperties_FullyConfiguredLocation_ReturnsExpected(bool withIllustrationPoints) { // Setup var random = new Random(); @@ -112,18 +117,35 @@ double designWaterLevel = random.NextDouble(); var convergence = random.NextEnumValue(); + var hydraulicBoundaryLocationOutput = new HydraulicBoundaryLocationOutput(designWaterLevel, + targetProbability, + targetReliability, + calculatedProbability, + calculatedReliability, + convergence); + + var illustrationPoints = new[] + { + new WindDirectionClosingSituationIllustrationPoint(new WindDirection("WEST", 4), "sluit", new TestIllustrationPoint()), + }; + var stochasts = new[] + { + new Stochast("a", 2, 3) + }; + var governingWindDirection = "EAST"; + + if (withIllustrationPoints) + { + hydraulicBoundaryLocationOutput.SetIllustrationPoints(new GeneralResult(new WindDirection(governingWindDirection, 2), stochasts, illustrationPoints)); + } var hydraulicBoundaryLocation = new HydraulicBoundaryLocation(id, name, x, y) { DesignWaterLevelCalculation = { - Output = new HydraulicBoundaryLocationOutput(designWaterLevel, - targetProbability, - targetReliability, - calculatedProbability, - calculatedReliability, - convergence) + Output = hydraulicBoundaryLocationOutput } }; + var locations = new ObservableList { hydraulicBoundaryLocation @@ -150,6 +172,14 @@ string convergenceValue = new EnumDisplayWrapper(convergence).DisplayName; Assert.AreEqual(convergenceValue, properties.Convergence); + + if (withIllustrationPoints) + { + CollectionAssert.AreEqual(stochasts, properties.AlphaValues); + CollectionAssert.AreEqual(stochasts, properties.Durations); + CollectionAssert.AreEqual(illustrationPoints, properties.IllustrationPoints.Select(ip => ip.Data)); + Assert.AreEqual(governingWindDirection, properties.GoverningWindDirection); + } } [Test] Index: Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/PropertyClasses/GrassCoverErosionOutwardsWaveHeightLocationContextPropertiesTest.cs =================================================================== diff -u -r8bb6e849266ec28412ebfe23beccd7235c4db9bf -r1413aaf4fe060785cf2f28ba1cf27c0ffb87969d --- Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/PropertyClasses/GrassCoverErosionOutwardsWaveHeightLocationContextPropertiesTest.cs (.../GrassCoverErosionOutwardsWaveHeightLocationContextPropertiesTest.cs) (revision 8bb6e849266ec28412ebfe23beccd7235c4db9bf) +++ Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/PropertyClasses/GrassCoverErosionOutwardsWaveHeightLocationContextPropertiesTest.cs (.../GrassCoverErosionOutwardsWaveHeightLocationContextPropertiesTest.cs) (revision 1413aaf4fe060785cf2f28ba1cf27c0ffb87969d) @@ -21,13 +21,16 @@ using System; using System.ComponentModel; +using System.Linq; using Core.Common.Base; using Core.Common.Base.Geometry; using Core.Common.TestUtil; using Core.Common.Utils; using NUnit.Framework; using Ringtoets.Common.Data.Hydraulics; +using Ringtoets.Common.Data.Hydraulics.IllustrationPoints; using Ringtoets.Common.Data.TestUtil; +using Ringtoets.Common.Data.TestUtil.IllustrationPoints; using Ringtoets.Common.Forms.TypeConverters; using Ringtoets.GrassCoverErosionOutwards.Forms.PresentationObjects; using Ringtoets.GrassCoverErosionOutwards.Forms.PropertyClasses; @@ -96,7 +99,9 @@ } [Test] - public void GetProperties_FullyConfiguredLocation_ReturnsExpectedValues() + [TestCase(true)] + [TestCase(false)] + public void GetProperties_FullyConfiguredLocation_ReturnsExpectedValues(bool withIllustrationPoints) { // Setup var random = new Random(); @@ -112,16 +117,32 @@ double waveHeight = random.NextDouble(); var convergence = random.NextEnumValue(); + var hydraulicBoundaryLocationOutput = new HydraulicBoundaryLocationOutput(waveHeight, + targetProbability, + targetReliability, + calculatedProbability, + calculatedReliability, + convergence); + + var illustrationPoints = new[] + { + new WindDirectionClosingSituationIllustrationPoint(new WindDirection("WEST", 4), "sluit", new TestIllustrationPoint()), + }; + var stochasts = new[] + { + new Stochast("a", 2, 3) + }; + var governingWindDirection = "EAST"; + + if (withIllustrationPoints) + { + hydraulicBoundaryLocationOutput.SetIllustrationPoints(new GeneralResult(new WindDirection(governingWindDirection, 2), stochasts, illustrationPoints)); + } var hydraulicBoundaryLocation = new HydraulicBoundaryLocation(id, name, x, y) { WaveHeightCalculation = { - Output = new HydraulicBoundaryLocationOutput(waveHeight, - targetProbability, - targetReliability, - calculatedProbability, - calculatedReliability, - convergence) + Output = hydraulicBoundaryLocationOutput } }; var locations = new ObservableList @@ -150,6 +171,14 @@ string convergenceValue = new EnumDisplayWrapper(convergence).DisplayName; Assert.AreEqual(convergenceValue, properties.Convergence); + + if (withIllustrationPoints) + { + CollectionAssert.AreEqual(stochasts, properties.AlphaValues); + CollectionAssert.AreEqual(stochasts, properties.Durations); + CollectionAssert.AreEqual(illustrationPoints, properties.IllustrationPoints.Select(ip => ip.Data)); + Assert.AreEqual(governingWindDirection, properties.GoverningWindDirection); + } } [Test] Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PropertyClasses/DesignWaterLevelLocationContextPropertiesTest.cs =================================================================== diff -u -r8bb6e849266ec28412ebfe23beccd7235c4db9bf -r1413aaf4fe060785cf2f28ba1cf27c0ffb87969d --- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PropertyClasses/DesignWaterLevelLocationContextPropertiesTest.cs (.../DesignWaterLevelLocationContextPropertiesTest.cs) (revision 8bb6e849266ec28412ebfe23beccd7235c4db9bf) +++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PropertyClasses/DesignWaterLevelLocationContextPropertiesTest.cs (.../DesignWaterLevelLocationContextPropertiesTest.cs) (revision 1413aaf4fe060785cf2f28ba1cf27c0ffb87969d) @@ -20,13 +20,17 @@ // All rights reserved. using System; +using System.Collections.Generic; using System.ComponentModel; +using System.Linq; using Core.Common.Base.Geometry; using Core.Common.TestUtil; using Core.Common.Utils; using NUnit.Framework; using Ringtoets.Common.Data.Hydraulics; +using Ringtoets.Common.Data.Hydraulics.IllustrationPoints; using Ringtoets.Common.Data.TestUtil; +using Ringtoets.Common.Data.TestUtil.IllustrationPoints; using Ringtoets.Common.Forms.TypeConverters; using Ringtoets.Integration.Forms.PresentationObjects; using Ringtoets.Integration.Forms.PropertyClasses; @@ -99,7 +103,9 @@ } [Test] - public void GetProperties_ValidDesignWaterLevel_ReturnsExpectedValues() + [TestCase(true)] + [TestCase(false)] + public void GetProperties_ValidDesignWaterLevel_ReturnsExpectedValues(bool withIllustrationPoints) { // Setup var random = new Random(); @@ -115,16 +121,32 @@ double designWaterLevel = random.NextDouble(); var convergence = random.NextEnumValue(); + var hydraulicBoundaryLocationOutput = new HydraulicBoundaryLocationOutput(designWaterLevel, + targetProbability, + targetReliability, + calculatedProbability, + calculatedReliability, + convergence); + + var illustrationPoints = new[] + { + new WindDirectionClosingSituationIllustrationPoint(new WindDirection("WEST", 4), "sluit", new TestIllustrationPoint()), + }; + var stochasts = new[] + { + new Stochast("a", 2, 3) + }; + var governingWindDirection = "EAST"; + + if (withIllustrationPoints) + { + hydraulicBoundaryLocationOutput.SetIllustrationPoints(new GeneralResult(new WindDirection(governingWindDirection, 2), stochasts, illustrationPoints)); + } var hydraulicBoundaryLocation = new HydraulicBoundaryLocation(id, name, x, y) { DesignWaterLevelCalculation = { - Output = new HydraulicBoundaryLocationOutput(designWaterLevel, - targetProbability, - targetReliability, - calculatedProbability, - calculatedReliability, - convergence) + Output = hydraulicBoundaryLocationOutput } }; var hydraulicBoundaryDatabase = new HydraulicBoundaryDatabase @@ -155,6 +177,14 @@ string convergenceValue = new EnumDisplayWrapper(convergence).DisplayName; Assert.AreEqual(convergenceValue, properties.Convergence); + + if (withIllustrationPoints) + { + CollectionAssert.AreEqual(stochasts, properties.AlphaValues); + CollectionAssert.AreEqual(stochasts, properties.Durations); + CollectionAssert.AreEqual(illustrationPoints, properties.IllustrationPoints.Select(ip => ip.Data)); + Assert.AreEqual(governingWindDirection, properties.GoverningWindDirection); + } } [Test] Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PropertyClasses/WaveHeightLocationContextPropertiesTest.cs =================================================================== diff -u -r8bb6e849266ec28412ebfe23beccd7235c4db9bf -r1413aaf4fe060785cf2f28ba1cf27c0ffb87969d --- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PropertyClasses/WaveHeightLocationContextPropertiesTest.cs (.../WaveHeightLocationContextPropertiesTest.cs) (revision 8bb6e849266ec28412ebfe23beccd7235c4db9bf) +++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PropertyClasses/WaveHeightLocationContextPropertiesTest.cs (.../WaveHeightLocationContextPropertiesTest.cs) (revision 1413aaf4fe060785cf2f28ba1cf27c0ffb87969d) @@ -21,11 +21,14 @@ using System; using System.ComponentModel; +using System.Linq; using Core.Common.TestUtil; using Core.Common.Utils; using NUnit.Framework; using Ringtoets.Common.Data.Hydraulics; +using Ringtoets.Common.Data.Hydraulics.IllustrationPoints; using Ringtoets.Common.Data.TestUtil; +using Ringtoets.Common.Data.TestUtil.IllustrationPoints; using Ringtoets.Common.Forms.TypeConverters; using Ringtoets.Integration.Forms.PresentationObjects; using Ringtoets.Integration.Forms.PropertyClasses; @@ -103,7 +106,9 @@ } [Test] - public void GetProperties_ValidWaveHeight_ReturnsExpectedValues() + [TestCase(true)] + [TestCase(false)] + public void GetProperties_ValidWaveHeight_ReturnsExpectedValues(bool withIllustrationPoints) { // Setup var random = new Random(); @@ -119,16 +124,32 @@ double waveHeight = random.NextDouble(); var convergence = random.NextEnumValue(); + var hydraulicBoundaryLocationOutput = new HydraulicBoundaryLocationOutput(waveHeight, + targetProbability, + targetReliability, + calculatedProbability, + calculatedReliability, + convergence); + + var illustrationPoints = new[] + { + new WindDirectionClosingSituationIllustrationPoint(new WindDirection("WEST", 4), "sluit", new TestIllustrationPoint()), + }; + var stochasts = new[] + { + new Stochast("a", 2, 3) + }; + var governingWindDirection = "EAST"; + + if (withIllustrationPoints) + { + hydraulicBoundaryLocationOutput.SetIllustrationPoints(new GeneralResult(new WindDirection(governingWindDirection, 2), stochasts, illustrationPoints)); + } var hydraulicBoundaryLocation = new HydraulicBoundaryLocation(id, name, x, y) { WaveHeightCalculation = { - Output = new HydraulicBoundaryLocationOutput(waveHeight, - targetProbability, - targetReliability, - calculatedProbability, - calculatedReliability, - convergence) + Output = hydraulicBoundaryLocationOutput } }; var hydraulicBoundaryDatabase = new HydraulicBoundaryDatabase @@ -158,6 +179,14 @@ string convergenceValue = new EnumDisplayWrapper(convergence).DisplayName; Assert.AreEqual(convergenceValue, properties.Convergence); + + if (withIllustrationPoints) + { + CollectionAssert.AreEqual(stochasts, properties.AlphaValues); + CollectionAssert.AreEqual(stochasts, properties.Durations); + CollectionAssert.AreEqual(illustrationPoints, properties.IllustrationPoints.Select(ip => ip.Data)); + Assert.AreEqual(governingWindDirection, properties.GoverningWindDirection); + } } [Test]