Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/DesignWaterLevelLocationsViewTest.cs =================================================================== diff -u -rcaebe0a4ed7807b5ef15ba294518529341c05900 -ree1f859cae82b4321da205d5e1fd339b021f2d7d --- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/DesignWaterLevelLocationsViewTest.cs (.../DesignWaterLevelLocationsViewTest.cs) (revision caebe0a4ed7807b5ef15ba294518529341c05900) +++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/DesignWaterLevelLocationsViewTest.cs (.../DesignWaterLevelLocationsViewTest.cs) (revision ee1f859cae82b4321da205d5e1fd339b021f2d7d) @@ -400,6 +400,7 @@ var hydraulicBoundaryDatabaseFilePathValue = ""; var preprocessorDirectoryValue = ""; HydraulicBoundaryLocation[] calculatedLocationsValue = null; + Func getCalculationFunc = null; double normValue = double.NaN; ICalculationMessageProvider messageProviderValue = null; guiService.Expect(ch => ch.CalculateDesignWaterLevels(null, null, null, null, int.MinValue, null)).IgnoreArguments().WhenCalled( @@ -408,6 +409,7 @@ hydraulicBoundaryDatabaseFilePathValue = invocation.Arguments[0].ToString(); preprocessorDirectoryValue = invocation.Arguments[1].ToString(); calculatedLocationsValue = ((IEnumerable) invocation.Arguments[2]).ToArray(); + getCalculationFunc = (Func)invocation.Arguments[3]; normValue = (double) invocation.Arguments[4]; messageProviderValue = (ICalculationMessageProvider) invocation.Arguments[5]; }); @@ -433,6 +435,7 @@ Assert.AreEqual(1, calculatedLocationsValue.Length); HydraulicBoundaryLocation expectedLocation = hydraulicBoundaryDatabase.Locations.First(); Assert.AreEqual(expectedLocation, calculatedLocationsValue.First()); + Assert.AreSame(expectedLocation.DesignWaterLevelCalculation, getCalculationFunc(expectedLocation)); } [Test] @@ -463,6 +466,7 @@ var hydraulicBoundaryDatabaseFilePathValue = ""; var preprocessorDirectoryValue = ""; HydraulicBoundaryLocation[] calculatedLocationsValue = null; + Func getCalculationFunc = null; double normValue = double.NaN; ICalculationMessageProvider messageProviderValue = null; guiService.Expect(ch => ch.CalculateDesignWaterLevels(null, null, null, null, int.MinValue, null)).IgnoreArguments().WhenCalled( @@ -471,6 +475,7 @@ hydraulicBoundaryDatabaseFilePathValue = invocation.Arguments[0].ToString(); preprocessorDirectoryValue = invocation.Arguments[1].ToString(); calculatedLocationsValue = ((IEnumerable) invocation.Arguments[2]).ToArray(); + getCalculationFunc = (Func)invocation.Arguments[3]; normValue = (double) invocation.Arguments[4]; messageProviderValue = (ICalculationMessageProvider) invocation.Arguments[5]; }); @@ -496,6 +501,7 @@ Assert.AreEqual(1, calculatedLocationsValue.Length); HydraulicBoundaryLocation expectedLocation = hydraulicBoundaryDatabase.Locations.First(); Assert.AreEqual(expectedLocation, calculatedLocationsValue.First()); + Assert.AreSame(expectedLocation.DesignWaterLevelCalculation, getCalculationFunc(expectedLocation)); } [Test] @@ -525,6 +531,7 @@ var hydraulicBoundaryDatabaseFilePathValue = ""; var preprocessorDirectoryValue = ""; HydraulicBoundaryLocation[] calculatedLocationsValue = null; + Func getCalculationFunc = null; double normValue = double.NaN; ICalculationMessageProvider messageProviderValue = null; guiService.Expect(ch => ch.CalculateDesignWaterLevels(null, null, null, null, int.MinValue, null)).IgnoreArguments().WhenCalled( @@ -533,6 +540,7 @@ hydraulicBoundaryDatabaseFilePathValue = invocation.Arguments[0].ToString(); preprocessorDirectoryValue = invocation.Arguments[1].ToString(); calculatedLocationsValue = ((IEnumerable) invocation.Arguments[2]).ToArray(); + getCalculationFunc = (Func)invocation.Arguments[3]; normValue = (double) invocation.Arguments[4]; messageProviderValue = (ICalculationMessageProvider) invocation.Arguments[5]; }); @@ -558,6 +566,7 @@ Assert.AreEqual(1, calculatedLocationsValue.Length); HydraulicBoundaryLocation expectedLocation = hydraulicBoundaryDatabase.Locations.First(); Assert.AreEqual(expectedLocation, calculatedLocationsValue.First()); + Assert.AreSame(expectedLocation.DesignWaterLevelCalculation, getCalculationFunc(expectedLocation)); } private DataGridView GetLocationsDataGridView()