Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/DesignWaterLevelLocationsViewTest.cs =================================================================== diff -u -r06b2840a2bb64c0960c8ac29322b5a0971c73c77 -rfe0ccc4dc7ed40356bd77aae1531d073af8d8f85 --- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/DesignWaterLevelLocationsViewTest.cs (.../DesignWaterLevelLocationsViewTest.cs) (revision 06b2840a2bb64c0960c8ac29322b5a0971c73c77) +++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/DesignWaterLevelLocationsViewTest.cs (.../DesignWaterLevelLocationsViewTest.cs) (revision fe0ccc4dc7ed40356bd77aae1531d073af8d8f85) @@ -33,8 +33,10 @@ using Ringtoets.Common.Data.Contribution; using Ringtoets.Common.Data.FailureMechanism; using Ringtoets.Common.Forms.GuiServices; +using Ringtoets.Common.Service.MessageProviders; using Ringtoets.HydraRing.Data; using Ringtoets.Integration.Forms.Views; +using Ringtoets.Integration.Service.MessageProviders; namespace Ringtoets.Integration.Forms.Test.Views { @@ -215,9 +217,14 @@ var mockRepository = new MockRepository(); var guiServiceMock = mockRepository.StrictMock(); + ICalculationMessageProvider messageProvider = null; IEnumerable locations = null; guiServiceMock.Expect(ch => ch.CalculateDesignWaterLevels(null, null, null, null, null, 1)).IgnoreArguments().WhenCalled( - invocation => { locations = (IEnumerable) invocation.Arguments[3]; }); + invocation => + { + messageProvider = (ICalculationMessageProvider) invocation.Arguments[0]; + locations = (IEnumerable) invocation.Arguments[3]; + }); mockRepository.ReplayAll(); view.CalculationGuiService = guiServiceMock; @@ -227,10 +234,12 @@ buttonTester.Click(); // Assert + Assert.IsInstanceOf(messageProvider); var hydraulicBoundaryLocations = locations.ToArray(); Assert.AreEqual(1, hydraulicBoundaryLocations.Length); HydraulicBoundaryLocation expectedLocation = assessmentSection.HydraulicBoundaryDatabase.Locations.First(); Assert.AreEqual(expectedLocation, hydraulicBoundaryLocations.First()); + mockRepository.VerifyAll(); }