Index: Ringtoets/Common/test/Ringtoets.Common.Service.Test/RingtoetsCommonDataSynchronizationServicesTest.cs =================================================================== diff -u -re182f6f394aa75e739467a77e7bcacd9a8b25429 -r87aafc58782eb7ce49b1e06b1db2feda8cd85948 --- Ringtoets/Common/test/Ringtoets.Common.Service.Test/RingtoetsCommonDataSynchronizationServicesTest.cs (.../RingtoetsCommonDataSynchronizationServicesTest.cs) (revision e182f6f394aa75e739467a77e7bcacd9a8b25429) +++ Ringtoets/Common/test/Ringtoets.Common.Service.Test/RingtoetsCommonDataSynchronizationServicesTest.cs (.../RingtoetsCommonDataSynchronizationServicesTest.cs) (revision 87aafc58782eb7ce49b1e06b1db2feda8cd85948) @@ -22,7 +22,6 @@ using System; using System.Collections.Generic; using Core.Common.Base; -using Core.Common.Base.Data; using Core.Common.Base.Geometry; using NUnit.Framework; using Ringtoets.Common.Data; @@ -49,18 +48,12 @@ } [Test] - [TestCase(3.4, 5.3)] - [TestCase(3.4, double.NaN)] - [TestCase(double.NaN, 8.5)] - public void ClearHydraulicBoundaryLocationOutput_LocationWithData_ClearsDataAndReturnsTrue(double designWaterLevel, double waveHeight) + public void ClearHydraulicBoundaryLocationOutput_LocationWithData_ClearsDataAndReturnsAffectedObjects( + [Values(3.4, double.NaN)] double designWaterLevel, + [Values(5.3, double.NaN)] double waveHeight) { // Setup - var location = new HydraulicBoundaryLocation(1, string.Empty, 0, 0) - { - DesignWaterLevel = (RoundedDouble) designWaterLevel, - WaveHeight = (RoundedDouble) waveHeight - }; - + HydraulicBoundaryLocation location = new TestHydraulicBoundaryLocation(designWaterLevel, waveHeight); var locations = new ObservableList { location @@ -70,6 +63,8 @@ IEnumerable affectedObjects = RingtoetsCommonDataSynchronizationService.ClearHydraulicBoundaryLocationOutput(locations); // Assert + Assert.IsNull(location.DesignWaterLevelOutput); + Assert.IsNull(location.WaveHeightOutput); Assert.IsNaN(location.DesignWaterLevel); Assert.IsNaN(location.WaveHeight); Assert.AreEqual(CalculationConvergence.NotCalculated, location.DesignWaterLevelCalculationConvergence); @@ -82,7 +77,7 @@ } [Test] - public void ClearHydraulicBoundaryLocationOutput_HydraulicBoundaryDatabaseWithoutLocations_ReturnsFalse() + public void ClearHydraulicBoundaryLocationOutput_HydraulicBoundaryDatabaseWithoutLocations_ReturnsNoAffectedObjects() { // Setup var locations = new ObservableList(); @@ -95,7 +90,7 @@ } [Test] - public void ClearHydraulicBoundaryLocationOutput_LocationWithoutWaveHeightAndDesignWaterLevel_ReturnsFalse() + public void ClearHydraulicBoundaryLocationOutput_LocationWithoutWaveHeightAndDesignWaterLevel_ReturnsNoAffectedObjects() { // Setup var locations = new ObservableList @@ -167,7 +162,7 @@ public void ClearForeshoreProfile_CalculationsWithForeshoreProfile_ClearForeshoreProfileAndReturnAffectedInputs() { // Setup - var foreshoreProfileToBeRemoved = new TestForeshoreProfile(new Point2D(0,0)); + var foreshoreProfileToBeRemoved = new TestForeshoreProfile(new Point2D(0, 0)); var foreshoreProfile = new TestForeshoreProfile(new Point2D(1, 1)); var calculation1 = new StructuresCalculation @@ -224,10 +219,7 @@ private class SimpleStructuresInput : StructuresInputBase { - protected override void UpdateStructureParameters() - { - - } + protected override void UpdateStructureParameters() {} } } } \ No newline at end of file