Index: Ringtoets/Common/test/Ringtoets.Common.Service.Test/WaveHeightCalculationServiceTest.cs =================================================================== diff -u -ra42bae106b7a5afd5ffb2a405c1265828a323588 -r8d2c93e2bc5f1993b9e8e9037f015e7d366ec636 --- Ringtoets/Common/test/Ringtoets.Common.Service.Test/WaveHeightCalculationServiceTest.cs (.../WaveHeightCalculationServiceTest.cs) (revision a42bae106b7a5afd5ffb2a405c1265828a323588) +++ Ringtoets/Common/test/Ringtoets.Common.Service.Test/WaveHeightCalculationServiceTest.cs (.../WaveHeightCalculationServiceTest.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.StrictMock(); - calculationMessageProviderMock.Stub(calc => calc.GetCalculationName(locationName)).Return(calculationName); - calculationMessageProviderMock.Stub(calc => calc.GetCalculatedNotConvergedMessage(locationName)).Return(calculationNotConvergedMessage); + var calculationMessageProviderMock = mockRepository.Stub(); mockRepository.ReplayAll(); var hydraulicBoundaryLocation = new HydraulicBoundaryLocation(1300001, locationName, 0, 0) @@ -174,19 +170,16 @@ var testCalculator = testFactory.WaveHeightCalculator; var service = new WaveHeightCalculationService(); + 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();