Index: Ringtoets/Common/test/Ringtoets.Common.Service.Test/DesignWaterLevelCalculationServiceTest.cs =================================================================== diff -u -ra42bae106b7a5afd5ffb2a405c1265828a323588 -r8d2c93e2bc5f1993b9e8e9037f015e7d366ec636 --- Ringtoets/Common/test/Ringtoets.Common.Service.Test/DesignWaterLevelCalculationServiceTest.cs (.../DesignWaterLevelCalculationServiceTest.cs) (revision a42bae106b7a5afd5ffb2a405c1265828a323588) +++ Ringtoets/Common/test/Ringtoets.Common.Service.Test/DesignWaterLevelCalculationServiceTest.cs (.../DesignWaterLevelCalculationServiceTest.cs) (revision 8d2c93e2bc5f1993b9e8e9037f015e7d366ec636) @@ -152,15 +152,11 @@ string validFilePath = Path.Combine(testDataPath, validFile); const string locationName = "punt_flw_ 1"; - const string calculationName = "locationName"; - const string calculationNotConvergedMessage = "calculationNotConvergedMessage"; const string ringId = "ringId"; const double norm = 30; var mockRepository = new MockRepository(); var calculationMessageProviderMock = mockRepository.Stub(); - calculationMessageProviderMock.Stub(calc => calc.GetCalculationName(locationName)).Return(calculationName); - calculationMessageProviderMock.Stub(calc => calc.GetCalculatedNotConvergedMessage(locationName)).Return(calculationNotConvergedMessage); mockRepository.ReplayAll(); var hydraulicBoundaryLocation = new HydraulicBoundaryLocation(1300001, locationName, 0, 0) @@ -173,21 +169,17 @@ var testFactory = (TestHydraRingCalculatorFactory) HydraRingCalculatorFactory.Instance; var testCalculator = testFactory.DesignWaterLevelCalculator; - // Call var service = new DesignWaterLevelCalculationService(); + testCalculator.CalculationFinishedHandler += (s, e) => service.Cancel(); + + // Call service.Calculate(hydraulicBoundaryLocation, validFilePath, ringId, norm, calculationMessageProviderMock); - service.Cancel(); // Assert - Assert.AreEqual(testDataPath, testCalculator.HydraulicBoundaryDatabaseDirectory); - Assert.AreEqual(ringId, testCalculator.RingId); - - var expectedInput = CreateInput(hydraulicBoundaryLocation, norm); - AssertInput(expectedInput, testCalculator.ReceivedInputs.First()); Assert.IsTrue(testCalculator.IsCanceled); } mockRepository.VerifyAll();