Index: Ringtoets/Common/test/Ringtoets.Common.Forms.TestUtil/MapDataTestHelper.cs =================================================================== diff -u -rcef2c97c6cfd8c14e4e71329fe505fc724935b35 -rf175dc84c19a1ed1f974a80bf6c38c2f8fb001c0 --- Ringtoets/Common/test/Ringtoets.Common.Forms.TestUtil/MapDataTestHelper.cs (.../MapDataTestHelper.cs) (revision cef2c97c6cfd8c14e4e71329fe505fc724935b35) +++ Ringtoets/Common/test/Ringtoets.Common.Forms.TestUtil/MapDataTestHelper.cs (.../MapDataTestHelper.cs) (revision f175dc84c19a1ed1f974a80bf6c38c2f8fb001c0) @@ -119,11 +119,40 @@ var hydraulicLocationsMapData = (MapPointData) mapData; HydraulicBoundaryLocation[] hydraulicBoundaryLocationsArray = hydraulicBoundaryLocations.ToArray(); + int expectedNrOfFeatures = hydraulicBoundaryLocationsArray.Length; + Assert.AreEqual(expectedNrOfFeatures, hydraulicLocationsMapData.Features.Count()); - CollectionAssert.AreEqual(hydraulicBoundaryLocationsArray.Select(hbl => hbl.DesignWaterLevel), - hydraulicLocationsMapData.Features.Select(ft => (RoundedDouble) ft.MetaData["Toetspeil"])); - CollectionAssert.AreEqual(hydraulicBoundaryLocationsArray.Select(hbl => hbl.WaveHeight), - hydraulicLocationsMapData.Features.Select(ft => (RoundedDouble) ft.MetaData["Golfhoogte"])); + for (var i = 0; i < expectedNrOfFeatures; i++) + { + HydraulicBoundaryLocation hydraulicBoundaryLocation = hydraulicBoundaryLocationsArray[i]; + MapFeature mapFeature = hydraulicLocationsMapData.Features.ElementAt(i); + + AssertHydraulicBoundaryLocationOutputResult(hydraulicBoundaryLocation.DesignWaterLevelCalculation1, + mapFeature, + "h(A+->A)"); + AssertHydraulicBoundaryLocationOutputResult(hydraulicBoundaryLocation.DesignWaterLevelCalculation2, + mapFeature, + "h(A->B)"); + AssertHydraulicBoundaryLocationOutputResult(hydraulicBoundaryLocation.DesignWaterLevelCalculation3, + mapFeature, + "h(B->C)"); + AssertHydraulicBoundaryLocationOutputResult(hydraulicBoundaryLocation.DesignWaterLevelCalculation4, + mapFeature, + "h(C->D)"); + + AssertHydraulicBoundaryLocationOutputResult(hydraulicBoundaryLocation.WaveHeightCalculation1, + mapFeature, + "Hs(A+->A)"); + AssertHydraulicBoundaryLocationOutputResult(hydraulicBoundaryLocation.WaveHeightCalculation2, + mapFeature, + "Hs(A->B)"); + AssertHydraulicBoundaryLocationOutputResult(hydraulicBoundaryLocation.WaveHeightCalculation3, + mapFeature, + "Hs(B->C)"); + AssertHydraulicBoundaryLocationOutputResult(hydraulicBoundaryLocation.WaveHeightCalculation4, + mapFeature, + "Hs(C->D)"); + } } /// @@ -311,6 +340,17 @@ structuresData.Features.SelectMany(f => f.MapGeometries.First().PointCollections.First())); } + private static void AssertHydraulicBoundaryLocationOutputResult(HydraulicBoundaryLocationCalculation calculation, MapFeature feature, string key) + { + RoundedDouble expectedValue = RoundedDouble.NaN; + if (calculation.Output != null) + { + expectedValue = calculation.Output.Result; + } + + Assert.AreEqual(expectedValue, feature.MetaData[key]); + } + private static IEnumerable GetWorldPoints(ForeshoreProfile foreshoreProfile) { return AdvancedMath2D.FromXToXY(