Index: Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/ViewInfos/DesignWaterLevelLocationsViewInfoTest.cs =================================================================== diff -u -rdaad7104ad012ba7dd5526597d183b87eb7bd564 -refe8286b63e94248270dc557a1789506805e74a1 --- Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/ViewInfos/DesignWaterLevelLocationsViewInfoTest.cs (.../DesignWaterLevelLocationsViewInfoTest.cs) (revision daad7104ad012ba7dd5526597d183b87eb7bd564) +++ Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/ViewInfos/DesignWaterLevelLocationsViewInfoTest.cs (.../DesignWaterLevelLocationsViewInfoTest.cs) (revision efe8286b63e94248270dc557a1789506805e74a1) @@ -206,12 +206,15 @@ // Setup Func getNormFunc = () => 0.01; + var hydraulicBoundaryLocation = new TestHydraulicBoundaryLocation(); + var hydraulicBoundaryLocationCalculation = new HydraulicBoundaryLocationCalculation(hydraulicBoundaryLocation); var hydraulicBoundaryLocations = new ObservableList { - new TestHydraulicBoundaryLocation() + hydraulicBoundaryLocation }; - Func getCalculationFunc = hbl => new HydraulicBoundaryLocationCalculation(hbl); + Func getCalculationFunc = hbl => hydraulicBoundaryLocationCalculation; + var context = new DesignWaterLevelLocationsContext(hydraulicBoundaryLocations, new ObservableTestAssessmentSectionStub(), getNormFunc, @@ -222,12 +225,12 @@ var guiService = mockRepository.StrictMock(); double actualNormValue = double.NaN; - Func actualGetCalculationFuncValue = null; - guiService.Expect(ch => ch.CalculateDesignWaterLevels(null, null, null, null, int.MinValue, null)).IgnoreArguments().WhenCalled( + IEnumerable performedCalculations = null; + guiService.Expect(ch => ch.CalculateDesignWaterLevels(null, null, null, int.MinValue, null)).IgnoreArguments().WhenCalled( invocation => { - actualGetCalculationFuncValue = (Func) invocation.Arguments[3]; - actualNormValue = (double) invocation.Arguments[4]; + performedCalculations = (IEnumerable) invocation.Arguments[2]; + actualNormValue = (double) invocation.Arguments[3]; }); mockRepository.ReplayAll(); @@ -252,7 +255,7 @@ button.Click(); Assert.AreEqual(getNormFunc(), actualNormValue); - Assert.AreSame(getCalculationFunc, actualGetCalculationFuncValue); + Assert.AreSame(hydraulicBoundaryLocationCalculation, performedCalculations.First()); } mockRepository.VerifyAll();