Index: Ringtoets/Common/test/Ringtoets.Common.Service.Test/WaveHeightCalculationActivityTest.cs =================================================================== diff -u -radaf11e9611d89bbe6562baf59bd17ae7b1f10a9 -rb282e7cc12bd468b577bb8afc20e3b0720d6d1be --- Ringtoets/Common/test/Ringtoets.Common.Service.Test/WaveHeightCalculationActivityTest.cs (.../WaveHeightCalculationActivityTest.cs) (revision adaf11e9611d89bbe6562baf59bd17ae7b1f10a9) +++ Ringtoets/Common/test/Ringtoets.Common.Service.Test/WaveHeightCalculationActivityTest.cs (.../WaveHeightCalculationActivityTest.cs) (revision b282e7cc12bd468b577bb8afc20e3b0720d6d1be) @@ -46,7 +46,7 @@ private MockRepository mockRepository; private static readonly string testDataPath = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.Integration.Service, "HydraRingCalculation"); private static readonly string validFilePath = Path.Combine(testDataPath, "HRD dutch coast south.sqlite"); - private static readonly string preprocessorDirectory = Path.Combine(testDataPath, "Preprocessor"); + private static readonly string validPreprocessorDirectory = TestHelper.GetScratchPadPath(); private static IEnumerable HydraulicBoundaryLocationsToCalculate { @@ -88,7 +88,7 @@ mockRepository.ReplayAll(); // Call - var activity = new WaveHeightCalculationActivity(calculation, validFilePath, preprocessorDirectory, 1, calculationMessageProvider); + var activity = new WaveHeightCalculationActivity(calculation, validFilePath, validPreprocessorDirectory, 1, calculationMessageProvider); // Assert Assert.IsInstanceOf(activity); @@ -105,7 +105,7 @@ var calculation = new WaveHeightCalculation(new TestHydraulicBoundaryLocation(string.Empty)); // Call - TestDelegate call = () => new WaveHeightCalculationActivity(calculation, validFilePath, preprocessorDirectory, 1, null); + TestDelegate call = () => new WaveHeightCalculationActivity(calculation, validFilePath, validPreprocessorDirectory, 1, null); // Assert var exception = Assert.Throws(call); @@ -120,7 +120,7 @@ mockRepository.ReplayAll(); // Call - TestDelegate call = () => new WaveHeightCalculationActivity(null, validFilePath, preprocessorDirectory, 1, calculationMessageProvider); + TestDelegate call = () => new WaveHeightCalculationActivity(null, validFilePath, validPreprocessorDirectory, 1, calculationMessageProvider); // Assert var exception = Assert.Throws(call); @@ -142,7 +142,7 @@ calculationMessageProvider.Stub(calc => calc.GetActivityDescription(locationName)).Return(activityDescription); mockRepository.ReplayAll(); - var activity = new WaveHeightCalculationActivity(calculation, invalidFilePath, preprocessorDirectory, 1, calculationMessageProvider); + var activity = new WaveHeightCalculationActivity(calculation, invalidFilePath, validPreprocessorDirectory, 1, calculationMessageProvider); // Call Action call = () => activity.Run(); @@ -212,14 +212,14 @@ }; var calculatorFactory = mockRepository.StrictMock(); - calculatorFactory.Expect(cf => cf.CreateWaveHeightCalculator(testDataPath, preprocessorDirectory)).Return(calculator); + calculatorFactory.Expect(cf => cf.CreateWaveHeightCalculator(testDataPath, validPreprocessorDirectory)).Return(calculator); var calculationMessageProvider = mockRepository.Stub(); calculationMessageProvider.Stub(calc => calc.GetActivityDescription(locationName)).Return(activityDescription); mockRepository.ReplayAll(); var activity = new WaveHeightCalculationActivity(calculation, validFilePath, - preprocessorDirectory, + validPreprocessorDirectory, norm, calculationMessageProvider); @@ -275,7 +275,7 @@ var activity = new WaveHeightCalculationActivity(calculation, validFilePath, - preprocessorDirectory, + validPreprocessorDirectory, norm, calculationMessageProvider); @@ -308,7 +308,7 @@ } var calculatorFactory = mockRepository.StrictMock(); - calculatorFactory.Expect(cf => cf.CreateWaveHeightCalculator(testDataPath, preprocessorDirectory)).Return(calculator); + calculatorFactory.Expect(cf => cf.CreateWaveHeightCalculator(testDataPath, validPreprocessorDirectory)).Return(calculator); var calculationMessageProvider = mockRepository.Stub(); calculationMessageProvider.Stub(calc => calc.GetActivityDescription(locationName)).Return(string.Empty); mockRepository.ReplayAll(); @@ -317,7 +317,7 @@ var activity = new WaveHeightCalculationActivity(calculation, validFilePath, - preprocessorDirectory, + validPreprocessorDirectory, norm, calculationMessageProvider); @@ -353,7 +353,7 @@ const string failureMessage = "Failed calculation"; var calculatorFactory = mockRepository.StrictMock(); - calculatorFactory.Expect(cf => cf.CreateWaveHeightCalculator(testDataPath, preprocessorDirectory)).Return(calculator); + calculatorFactory.Expect(cf => cf.CreateWaveHeightCalculator(testDataPath, validPreprocessorDirectory)).Return(calculator); var calculationMessageProvider = mockRepository.Stub(); calculationMessageProvider.Stub(calc => calc.GetActivityDescription(locationName)).Return(string.Empty); if (string.IsNullOrEmpty(lastErrorFileContent)) @@ -388,7 +388,7 @@ var activity = new WaveHeightCalculationActivity(calculation, validFilePath, - preprocessorDirectory, + validPreprocessorDirectory, 30, calculationMessageProvider); @@ -419,7 +419,7 @@ }; var calculatorFactory = mockRepository.StrictMock(); - calculatorFactory.Expect(cf => cf.CreateWaveHeightCalculator(testDataPath, preprocessorDirectory)).Return(calculator); + calculatorFactory.Expect(cf => cf.CreateWaveHeightCalculator(testDataPath, validPreprocessorDirectory)).Return(calculator); var calculationMessageProvider = mockRepository.Stub(); calculationMessageProvider.Stub(calc => calc.GetActivityDescription(locationName)).Return(string.Empty); calculationMessageProvider.Stub(calc => calc.GetCalculatedNotConvergedMessage(locationName)).Return(calculationNotConvergedMessage); @@ -442,7 +442,7 @@ const double norm = 1.0 / 300; var activity = new WaveHeightCalculationActivity(calculation, validFilePath, - preprocessorDirectory, + validPreprocessorDirectory, norm, calculationMessageProvider); @@ -481,7 +481,7 @@ }; var calculatorFactory = mockRepository.StrictMock(); - calculatorFactory.Expect(cf => cf.CreateWaveHeightCalculator(testDataPath, preprocessorDirectory)).Return(calculator); + calculatorFactory.Expect(cf => cf.CreateWaveHeightCalculator(testDataPath, validPreprocessorDirectory)).Return(calculator); var calculationMessageProvider = mockRepository.StrictMock(); calculationMessageProvider.Stub(calc => calc.GetActivityDescription(locationName)).Return(string.Empty); if (string.IsNullOrEmpty(lastErrorFileContent)) @@ -500,7 +500,7 @@ const double norm = 1.0 / 30; var activity = new WaveHeightCalculationActivity(calculation, validFilePath, - preprocessorDirectory, + validPreprocessorDirectory, norm, calculationMessageProvider); @@ -534,7 +534,7 @@ var activity = new TestWaveHeightCalculationActivity(calculation, validFilePath, - preprocessorDirectory, + validPreprocessorDirectory, 1.0, calculationMessageProvider, state);