Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/DesignWaterLevelLocationsViewTest.cs =================================================================== diff -u -r1042a38d3663daeda5a8e1083edbc63a4b6aae94 -r5964d4196c1f7f02df79e98ef4f876a338abef62 --- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/DesignWaterLevelLocationsViewTest.cs (.../DesignWaterLevelLocationsViewTest.cs) (revision 1042a38d3663daeda5a8e1083edbc63a4b6aae94) +++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/DesignWaterLevelLocationsViewTest.cs (.../DesignWaterLevelLocationsViewTest.cs) (revision 5964d4196c1f7f02df79e98ef4f876a338abef62) @@ -205,7 +205,9 @@ } [Test] - public void CalculateForSelectedButton_OneSelected_CallsCalculateDesignWaterLevels() + [TestCase(true)] + [TestCase(false)] + public void CalculateForSelectedButton_OneSelected_CallsCalculateDesignWaterLevels(bool isSuccessful) { // Setup DesignWaterLevelLocationsView view = ShowFullyConfiguredDesignWaterLevelLocationsView(); @@ -217,14 +219,22 @@ var mockRepository = new MockRepository(); var guiServiceMock = mockRepository.StrictMock(); + var observer = mockRepository.StrictMock(); + assessmentSection.HydraulicBoundaryDatabase.Attach(observer); + + if (isSuccessful) + { + observer.Expect(o => o.UpdateObserver()); + } + ICalculationMessageProvider messageProvider = null; IEnumerable locations = null; guiServiceMock.Expect(ch => ch.CalculateDesignWaterLevels(null, null, null, 1, null)).IgnoreArguments().WhenCalled( invocation => { - locations = (IEnumerable)invocation.Arguments[1]; + locations = (IEnumerable) invocation.Arguments[1]; messageProvider = (ICalculationMessageProvider) invocation.Arguments[4]; - }).Return(false); + }).Return(isSuccessful); mockRepository.ReplayAll(); view.CalculationGuiService = guiServiceMock;