Index: Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Service.Test/ClosingStructuresCalculationServiceTest.cs =================================================================== diff -u -rcdc1bc16334dad7a675276648c42ac6fab5ffdfb -rb282e7cc12bd468b577bb8afc20e3b0720d6d1be --- Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Service.Test/ClosingStructuresCalculationServiceTest.cs (.../ClosingStructuresCalculationServiceTest.cs) (revision cdc1bc16334dad7a675276648c42ac6fab5ffdfb) +++ Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Service.Test/ClosingStructuresCalculationServiceTest.cs (.../ClosingStructuresCalculationServiceTest.cs) (revision b282e7cc12bd468b577bb8afc20e3b0720d6d1be) @@ -51,7 +51,7 @@ { 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(); [Test] public void Constructor_ExpectedValues() @@ -365,7 +365,7 @@ assessmentSection.FailureMechanismContribution.Norm, failureMechanism.Contribution, validFilePath, - preprocessorDirectory); + validPreprocessorDirectory); // Assert const string expectedMessage = "The value of argument 'structureInput' (100) is invalid for Enum type 'ClosingStructureInflowModelType'."; @@ -391,7 +391,7 @@ var calculator = new TestStructuresCalculator(); var calculatorFactory = mockRepository.StrictMock(); - calculatorFactory.Expect(cf => cf.CreateStructuresCalculator(testDataPath, preprocessorDirectory)) + calculatorFactory.Expect(cf => cf.CreateStructuresCalculator(testDataPath, validPreprocessorDirectory)) .Return(calculator); mockRepository.ReplayAll(); @@ -417,7 +417,7 @@ assessmentSection.FailureMechanismContribution.Norm, failureMechanism.Contribution, validFilePath, - preprocessorDirectory); + validPreprocessorDirectory); // Assert StructuresClosureCalculationInput[] calculationInputs = calculator.ReceivedInputs.ToArray(); @@ -473,7 +473,7 @@ var calculator = new TestStructuresCalculator(); var calculatorFactory = mockRepository.StrictMock(); - calculatorFactory.Expect(cf => cf.CreateStructuresCalculator(testDataPath, preprocessorDirectory)) + calculatorFactory.Expect(cf => cf.CreateStructuresCalculator(testDataPath, validPreprocessorDirectory)) .Return(calculator); mockRepository.ReplayAll(); @@ -500,7 +500,7 @@ assessmentSection.FailureMechanismContribution.Norm, failureMechanism.Contribution, validFilePath, - preprocessorDirectory); + validPreprocessorDirectory); // Assert StructuresClosureCalculationInput[] calculationInputs = calculator.ReceivedInputs.ToArray(); @@ -554,7 +554,7 @@ mockRepository); var calculator = new TestStructuresCalculator(); var calculatorFactory = mockRepository.StrictMock(); - calculatorFactory.Expect(cf => cf.CreateStructuresCalculator(testDataPath, preprocessorDirectory)) + calculatorFactory.Expect(cf => cf.CreateStructuresCalculator(testDataPath, validPreprocessorDirectory)) .Return(calculator); mockRepository.ReplayAll(); @@ -581,7 +581,7 @@ assessmentSection.FailureMechanismContribution.Norm, failureMechanism.Contribution, validFilePath, - preprocessorDirectory); + validPreprocessorDirectory); // Assert StructuresClosureCalculationInput[] calculationInputs = calculator.ReceivedInputs.ToArray(); @@ -637,7 +637,7 @@ IAssessmentSection assessmentSection = AssessmentSectionHelper.CreateAssessmentSectionStub(failureMechanism, mockRepository); var calculatorFactory = mockRepository.StrictMock(); - calculatorFactory.Expect(cf => cf.CreateStructuresCalculator(testDataPath, preprocessorDirectory)) + calculatorFactory.Expect(cf => cf.CreateStructuresCalculator(testDataPath, validPreprocessorDirectory)) .Return(new TestStructuresCalculator()); mockRepository.ReplayAll(); @@ -677,7 +677,7 @@ assessmentSection.FailureMechanismContribution.Norm, failureMechanism.Contribution, validFilePath, - preprocessorDirectory); + validPreprocessorDirectory); // Assert TestHelper.AssertLogMessages(call, messages => @@ -714,7 +714,7 @@ EndInFailure = true }; var calculatorFactory = mockRepository.StrictMock(); - calculatorFactory.Expect(cf => cf.CreateStructuresCalculator(testDataPath, preprocessorDirectory)) + calculatorFactory.Expect(cf => cf.CreateStructuresCalculator(testDataPath, validPreprocessorDirectory)) .Return(calculator); mockRepository.ReplayAll(); @@ -741,7 +741,7 @@ assessmentSection.FailureMechanismContribution.Norm, failureMechanism.Contribution, validFilePath, - preprocessorDirectory); + validPreprocessorDirectory); } catch (HydraRingCalculationException) { @@ -784,7 +784,7 @@ EndInFailure = true }; var calculatorFactory = mockRepository.StrictMock(); - calculatorFactory.Expect(cf => cf.CreateStructuresCalculator(testDataPath, preprocessorDirectory)) + calculatorFactory.Expect(cf => cf.CreateStructuresCalculator(testDataPath, validPreprocessorDirectory)) .Return(calculator); mockRepository.ReplayAll(); @@ -811,7 +811,7 @@ assessmentSection.FailureMechanismContribution.Norm, failureMechanism.Contribution, validFilePath, - preprocessorDirectory); + validPreprocessorDirectory); } catch (HydraRingCalculationException) { @@ -855,7 +855,7 @@ LastErrorFileContent = "An error occurred" }; var calculatorFactory = mockRepository.StrictMock(); - calculatorFactory.Expect(cf => cf.CreateStructuresCalculator(testDataPath, preprocessorDirectory)) + calculatorFactory.Expect(cf => cf.CreateStructuresCalculator(testDataPath, validPreprocessorDirectory)) .Return(calculator); mockRepository.ReplayAll(); @@ -883,7 +883,7 @@ assessmentSection.FailureMechanismContribution.Norm, failureMechanism.Contribution, validFilePath, - preprocessorDirectory); + validPreprocessorDirectory); } catch (HydraRingCalculationException e) { Index: Ringtoets/Common/test/Ringtoets.Common.Forms.Test/GuiServices/HydraulicBoundaryLocationCalculationGuiServiceTest.cs =================================================================== diff -u -r860a91637f3a7f747a2da8717d9fd0cae7dbf93a -rb282e7cc12bd468b577bb8afc20e3b0720d6d1be --- Ringtoets/Common/test/Ringtoets.Common.Forms.Test/GuiServices/HydraulicBoundaryLocationCalculationGuiServiceTest.cs (.../HydraulicBoundaryLocationCalculationGuiServiceTest.cs) (revision 860a91637f3a7f747a2da8717d9fd0cae7dbf93a) +++ Ringtoets/Common/test/Ringtoets.Common.Forms.Test/GuiServices/HydraulicBoundaryLocationCalculationGuiServiceTest.cs (.../HydraulicBoundaryLocationCalculationGuiServiceTest.cs) (revision b282e7cc12bd468b577bb8afc20e3b0720d6d1be) @@ -44,7 +44,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(); [Test] public void Constructor_NullMainWindow_ThrowsArgumentNullException() @@ -85,7 +85,7 @@ var guiService = new HydraulicBoundaryLocationCalculationGuiService(viewParent); // Call - TestDelegate test = () => guiService.CalculateDesignWaterLevels(validFilePath, preprocessorDirectory, Enumerable.Empty(), 1, null); + TestDelegate test = () => guiService.CalculateDesignWaterLevels(validFilePath, validPreprocessorDirectory, Enumerable.Empty(), 1, null); // Assert string paramName = Assert.Throws(test).ParamName; @@ -109,7 +109,7 @@ var guiService = new HydraulicBoundaryLocationCalculationGuiService(viewParent); // Call - TestDelegate test = () => guiService.CalculateDesignWaterLevels(validFilePath, preprocessorDirectory, null, 1, calculationMessageProvider); + TestDelegate test = () => guiService.CalculateDesignWaterLevels(validFilePath, validPreprocessorDirectory, null, 1, calculationMessageProvider); // Assert string paramName = Assert.Throws(test).ParamName; @@ -133,7 +133,7 @@ var guiService = new HydraulicBoundaryLocationCalculationGuiService(viewParent); // Call - Action call = () => guiService.CalculateDesignWaterLevels("Does not exist", preprocessorDirectory, Enumerable.Empty(), 1, calculationMessageProvider); + Action call = () => guiService.CalculateDesignWaterLevels("Does not exist", validPreprocessorDirectory, Enumerable.Empty(), 1, calculationMessageProvider); // Assert TestHelper.AssertLogMessages(call, messages => @@ -160,7 +160,7 @@ var guiService = new HydraulicBoundaryLocationCalculationGuiService(viewParent); // Call - bool successfulCalculation = guiService.CalculateDesignWaterLevels("Does not exist", preprocessorDirectory, Enumerable.Empty(), 1, calculationMessageProvider); + bool successfulCalculation = guiService.CalculateDesignWaterLevels("Does not exist", validPreprocessorDirectory, Enumerable.Empty(), 1, calculationMessageProvider); // Assert Assert.IsFalse(successfulCalculation); @@ -185,7 +185,7 @@ var guiService = new HydraulicBoundaryLocationCalculationGuiService(viewParent); // Call - Action call = () => guiService.CalculateDesignWaterLevels(validFilePath, preprocessorDirectory, Enumerable.Empty(), 1, calculationMessageProvider); + Action call = () => guiService.CalculateDesignWaterLevels(validFilePath, validPreprocessorDirectory, Enumerable.Empty(), 1, calculationMessageProvider); // Assert TestHelper.AssertLogMessagesCount(call, 0); @@ -212,7 +212,7 @@ var guiService = new HydraulicBoundaryLocationCalculationGuiService(viewParent); // Call - bool successfulCalculation = guiService.CalculateDesignWaterLevels(validFilePath, preprocessorDirectory, Enumerable.Empty(), 1, calculationMessageProvider); + bool successfulCalculation = guiService.CalculateDesignWaterLevels(validFilePath, validPreprocessorDirectory, Enumerable.Empty(), 1, calculationMessageProvider); // Assert Assert.IsTrue(successfulCalculation); @@ -229,7 +229,7 @@ const string calculatedNotConvergedMessage = "calculatedNotConvergedMessage"; var calculatorFactory = mockRepository.StrictMock(); - calculatorFactory.Expect(cf => cf.CreateDesignWaterLevelCalculator(testDataPath, preprocessorDirectory)).Return(new TestDesignWaterLevelCalculator()); + calculatorFactory.Expect(cf => cf.CreateDesignWaterLevelCalculator(testDataPath, validPreprocessorDirectory)).Return(new TestDesignWaterLevelCalculator()); var calculationMessageProvider = mockRepository.StrictMock(); calculationMessageProvider.Expect(calc => calc.GetActivityDescription(hydraulicLocationName)).Return(string.Empty); calculationMessageProvider.Expect(calc => calc.GetCalculatedNotConvergedMessage(hydraulicLocationName)).Return(calculatedNotConvergedMessage); @@ -247,7 +247,7 @@ // Call Action call = () => guiService.CalculateDesignWaterLevels(validFilePath, - preprocessorDirectory, + validPreprocessorDirectory, new List { new TestHydraulicBoundaryLocation(hydraulicLocationName) @@ -279,7 +279,7 @@ const string hydraulicLocationName = "name"; var calculatorFactory = mockRepository.StrictMock(); - calculatorFactory.Expect(cf => cf.CreateDesignWaterLevelCalculator(testDataPath, preprocessorDirectory)).Return(new TestDesignWaterLevelCalculator()); + calculatorFactory.Expect(cf => cf.CreateDesignWaterLevelCalculator(testDataPath, validPreprocessorDirectory)).Return(new TestDesignWaterLevelCalculator()); var calculationMessageProvider = mockRepository.StrictMock(); calculationMessageProvider.Expect(calc => calc.GetActivityDescription(hydraulicLocationName)).Return(string.Empty); calculationMessageProvider.Expect(calc => calc.GetCalculatedNotConvergedMessage(hydraulicLocationName)).Return(string.Empty); @@ -297,7 +297,7 @@ // Call bool successfulCalculation = guiService.CalculateDesignWaterLevels(validFilePath, - preprocessorDirectory, + validPreprocessorDirectory, new List { new TestHydraulicBoundaryLocation(hydraulicLocationName) @@ -323,7 +323,7 @@ var guiService = new HydraulicBoundaryLocationCalculationGuiService(viewParent); // Call - TestDelegate test = () => guiService.CalculateWaveHeights(validFilePath, preprocessorDirectory, Enumerable.Empty(), 1, null); + TestDelegate test = () => guiService.CalculateWaveHeights(validFilePath, validPreprocessorDirectory, Enumerable.Empty(), 1, null); // Assert string paramName = Assert.Throws(test).ParamName; @@ -347,7 +347,7 @@ var guiService = new HydraulicBoundaryLocationCalculationGuiService(viewParent); // Call - TestDelegate test = () => guiService.CalculateWaveHeights(validFilePath, preprocessorDirectory, null, 1, calculationMessageProvider); + TestDelegate test = () => guiService.CalculateWaveHeights(validFilePath, validPreprocessorDirectory, null, 1, calculationMessageProvider); // Assert string paramName = Assert.Throws(test).ParamName; @@ -371,7 +371,7 @@ var guiService = new HydraulicBoundaryLocationCalculationGuiService(viewParent); // Call - Action call = () => guiService.CalculateWaveHeights("Does not exist", preprocessorDirectory, Enumerable.Empty(), 1, calculationMessageProvider); + Action call = () => guiService.CalculateWaveHeights("Does not exist", validPreprocessorDirectory, Enumerable.Empty(), 1, calculationMessageProvider); // Assert TestHelper.AssertLogMessages(call, messages => @@ -398,7 +398,7 @@ var guiService = new HydraulicBoundaryLocationCalculationGuiService(viewParent); // Call - bool successfulCalculation = guiService.CalculateWaveHeights("Does not exist", preprocessorDirectory, Enumerable.Empty(), 1, calculationMessageProvider); + bool successfulCalculation = guiService.CalculateWaveHeights("Does not exist", validPreprocessorDirectory, Enumerable.Empty(), 1, calculationMessageProvider); // Assert Assert.IsFalse(successfulCalculation); @@ -425,7 +425,7 @@ var guiService = new HydraulicBoundaryLocationCalculationGuiService(viewParent); // Call - Action call = () => guiService.CalculateWaveHeights(validFilePath, preprocessorDirectory, Enumerable.Empty(), 1, calculationMessageProvider); + Action call = () => guiService.CalculateWaveHeights(validFilePath, validPreprocessorDirectory, Enumerable.Empty(), 1, calculationMessageProvider); // Assert TestHelper.AssertLogMessagesCount(call, 0); @@ -452,7 +452,7 @@ var guiService = new HydraulicBoundaryLocationCalculationGuiService(viewParent); // Call - bool successfulCalculation = guiService.CalculateWaveHeights(validFilePath, preprocessorDirectory, Enumerable.Empty(), 1, calculationMessageProvider); + bool successfulCalculation = guiService.CalculateWaveHeights(validFilePath, validPreprocessorDirectory, Enumerable.Empty(), 1, calculationMessageProvider); // Assert Assert.IsTrue(successfulCalculation); @@ -469,7 +469,7 @@ const string calculatedNotConvergedMessage = "calculatedNotConvergedMessage"; var calculatorFactory = mockRepository.StrictMock(); - calculatorFactory.Expect(cf => cf.CreateWaveHeightCalculator(testDataPath, preprocessorDirectory)).Return(new TestWaveHeightCalculator()); + calculatorFactory.Expect(cf => cf.CreateWaveHeightCalculator(testDataPath, validPreprocessorDirectory)).Return(new TestWaveHeightCalculator()); var calculationMessageProvider = mockRepository.StrictMock(); calculationMessageProvider.Expect(calc => calc.GetActivityDescription(hydraulicLocationName)).Return(string.Empty); calculationMessageProvider.Expect(calc => calc.GetCalculatedNotConvergedMessage(hydraulicLocationName)).Return(calculatedNotConvergedMessage); @@ -487,7 +487,7 @@ // Call Action call = () => guiService.CalculateWaveHeights(validFilePath, - preprocessorDirectory, + validPreprocessorDirectory, new List { new TestHydraulicBoundaryLocation(hydraulicLocationName) @@ -520,7 +520,7 @@ var calculatorFactory = mockRepository.StrictMock(); var calculationMessageProvider = mockRepository.StrictMock(); - calculatorFactory.Expect(cf => cf.CreateWaveHeightCalculator(testDataPath, preprocessorDirectory)).Return(new TestWaveHeightCalculator()); + calculatorFactory.Expect(cf => cf.CreateWaveHeightCalculator(testDataPath, validPreprocessorDirectory)).Return(new TestWaveHeightCalculator()); calculationMessageProvider.Expect(calc => calc.GetActivityDescription(hydraulicLocationName)).Return(string.Empty); calculationMessageProvider.Expect(calc => calc.GetCalculatedNotConvergedMessage(hydraulicLocationName)).Return(string.Empty); mockRepository.ReplayAll(); @@ -537,7 +537,7 @@ // Call bool successfulCalculation = guiService.CalculateWaveHeights(validFilePath, - preprocessorDirectory, + validPreprocessorDirectory, new List { new TestHydraulicBoundaryLocation(hydraulicLocationName) Index: Ringtoets/Common/test/Ringtoets.Common.Service.Test/DesignWaterLevelCalculationActivityTest.cs =================================================================== diff -u -rced4eb513dcf20c6a6ceaf48eb92afec1bf7a5ad -rb282e7cc12bd468b577bb8afc20e3b0720d6d1be --- Ringtoets/Common/test/Ringtoets.Common.Service.Test/DesignWaterLevelCalculationActivityTest.cs (.../DesignWaterLevelCalculationActivityTest.cs) (revision ced4eb513dcf20c6a6ceaf48eb92afec1bf7a5ad) +++ Ringtoets/Common/test/Ringtoets.Common.Service.Test/DesignWaterLevelCalculationActivityTest.cs (.../DesignWaterLevelCalculationActivityTest.cs) (revision b282e7cc12bd468b577bb8afc20e3b0720d6d1be) @@ -47,7 +47,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 { @@ -91,7 +91,7 @@ // Call var activity = new DesignWaterLevelCalculationActivity(calculation, validFilePath, - preprocessorDirectory, + validPreprocessorDirectory, 1, calculationMessageProvider); @@ -112,7 +112,7 @@ // Call TestDelegate call = () => new DesignWaterLevelCalculationActivity(calculation, validFilePath, - preprocessorDirectory, + validPreprocessorDirectory, 1, null); @@ -131,7 +131,7 @@ // Call TestDelegate call = () => new DesignWaterLevelCalculationActivity(null, validFilePath, - preprocessorDirectory, + validPreprocessorDirectory, 1, calculationMessageProvider); @@ -157,7 +157,7 @@ var activity = new DesignWaterLevelCalculationActivity(calculation, invalidFilePath, - preprocessorDirectory, + validPreprocessorDirectory, 1, calculationMessageProvider); @@ -230,14 +230,14 @@ }; var calculatorFactory = mockRepository.StrictMock(); - calculatorFactory.Expect(cf => cf.CreateDesignWaterLevelCalculator(testDataPath, preprocessorDirectory)).Return(calculator); + calculatorFactory.Expect(cf => cf.CreateDesignWaterLevelCalculator(testDataPath, validPreprocessorDirectory)).Return(calculator); var calculationMessageProvider = mockRepository.Stub(); calculationMessageProvider.Stub(calc => calc.GetActivityDescription(locationName)).Return(activityDescription); mockRepository.ReplayAll(); var activity = new DesignWaterLevelCalculationActivity(calculation, validFilePath, - preprocessorDirectory, + validPreprocessorDirectory, norm, calculationMessageProvider); @@ -294,7 +294,7 @@ var activity = new DesignWaterLevelCalculationActivity(calculation, validFilePath, - preprocessorDirectory, + validPreprocessorDirectory, norm, calculationMessageProvider); @@ -327,7 +327,7 @@ } var calculatorFactory = mockRepository.StrictMock(); - calculatorFactory.Expect(cf => cf.CreateDesignWaterLevelCalculator(testDataPath, preprocessorDirectory)).Return(calculator); + calculatorFactory.Expect(cf => cf.CreateDesignWaterLevelCalculator(testDataPath, validPreprocessorDirectory)).Return(calculator); var calculationMessageProvider = mockRepository.StrictMock(); calculationMessageProvider.Expect(calc => calc.GetActivityDescription(locationName)).Return(string.Empty); mockRepository.ReplayAll(); @@ -336,7 +336,7 @@ var activity = new DesignWaterLevelCalculationActivity(calculation, validFilePath, - preprocessorDirectory, + validPreprocessorDirectory, norm, calculationMessageProvider); @@ -372,7 +372,7 @@ const string failureMessage = "Failed calculation"; var calculatorFactory = mockRepository.StrictMock(); - calculatorFactory.Expect(cf => cf.CreateDesignWaterLevelCalculator(testDataPath, preprocessorDirectory)).Return(calculator); + calculatorFactory.Expect(cf => cf.CreateDesignWaterLevelCalculator(testDataPath, validPreprocessorDirectory)).Return(calculator); var calculationMessageProvider = mockRepository.Stub(); calculationMessageProvider.Stub(calc => calc.GetActivityDescription(locationName)).Return(string.Empty); if (string.IsNullOrEmpty(lastErrorFileContent)) @@ -406,7 +406,7 @@ var activity = new DesignWaterLevelCalculationActivity(calculation, validFilePath, - preprocessorDirectory, + validPreprocessorDirectory, 30, calculationMessageProvider); @@ -437,7 +437,7 @@ }; var calculatorFactory = mockRepository.StrictMock(); - calculatorFactory.Expect(cf => cf.CreateDesignWaterLevelCalculator(testDataPath, preprocessorDirectory)).Return(calculator); + calculatorFactory.Expect(cf => cf.CreateDesignWaterLevelCalculator(testDataPath, validPreprocessorDirectory)).Return(calculator); var calculationMessageProvider = mockRepository.StrictMock(); calculationMessageProvider.Expect(calc => calc.GetActivityDescription(locationName)).Return(string.Empty); calculationMessageProvider.Expect(calc => calc.GetCalculatedNotConvergedMessage(locationName)).Return(calculationNotConvergedMessage); @@ -460,7 +460,7 @@ const double norm = 1.0 / 300; var activity = new DesignWaterLevelCalculationActivity(calculation, validFilePath, - preprocessorDirectory, + validPreprocessorDirectory, norm, calculationMessageProvider); @@ -498,7 +498,7 @@ }; var calculatorFactory = mockRepository.StrictMock(); - calculatorFactory.Expect(cf => cf.CreateDesignWaterLevelCalculator(testDataPath, preprocessorDirectory)).Return(calculator); + calculatorFactory.Expect(cf => cf.CreateDesignWaterLevelCalculator(testDataPath, validPreprocessorDirectory)).Return(calculator); var calculationMessageProvider = mockRepository.StrictMock(); calculationMessageProvider.Stub(calc => calc.GetActivityDescription(locationName)).Return(string.Empty); calculationMessageProvider.Stub(calc => calc.GetCalculationFailedMessage(locationName)).Return(string.Empty); @@ -517,7 +517,7 @@ const double norm = 1.0 / 30; var activity = new DesignWaterLevelCalculationActivity(calculation, validFilePath, - preprocessorDirectory, + validPreprocessorDirectory, norm, calculationMessageProvider); @@ -551,7 +551,7 @@ var activity = new TestDesignWaterLevelCalculationActivity(calculation, validFilePath, - preprocessorDirectory, + validPreprocessorDirectory, 1.0, calculationMessageProvider, state); Index: Ringtoets/Common/test/Ringtoets.Common.Service.Test/DesignWaterLevelCalculationServiceTest.cs =================================================================== diff -u -r9ac0d49079a6cc44ea4d5c348a6628e234adc1d5 -rb282e7cc12bd468b577bb8afc20e3b0720d6d1be --- Ringtoets/Common/test/Ringtoets.Common.Service.Test/DesignWaterLevelCalculationServiceTest.cs (.../DesignWaterLevelCalculationServiceTest.cs) (revision 9ac0d49079a6cc44ea4d5c348a6628e234adc1d5) +++ Ringtoets/Common/test/Ringtoets.Common.Service.Test/DesignWaterLevelCalculationServiceTest.cs (.../DesignWaterLevelCalculationServiceTest.cs) (revision b282e7cc12bd468b577bb8afc20e3b0720d6d1be) @@ -45,7 +45,7 @@ { 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(); [Test] public void Validate_ValidPaths_ReturnsTrue() @@ -54,7 +54,7 @@ var valid = false; // Call - Action call = () => valid = DesignWaterLevelCalculationService.Validate(validFilePath, preprocessorDirectory); + Action call = () => valid = DesignWaterLevelCalculationService.Validate(validFilePath, validPreprocessorDirectory); // Assert TestHelper.AssertLogMessages(call, messages => @@ -75,7 +75,7 @@ var valid = true; // Call - Action call = () => valid = DesignWaterLevelCalculationService.Validate(notValidFilePath, preprocessorDirectory); + Action call = () => valid = DesignWaterLevelCalculationService.Validate(notValidFilePath, validPreprocessorDirectory); // Assert TestHelper.AssertLogMessages(call, messages => @@ -97,7 +97,7 @@ var valid = false; // Call - Action call = () => valid = DesignWaterLevelCalculationService.Validate(notValidFilePath, preprocessorDirectory); + Action call = () => valid = DesignWaterLevelCalculationService.Validate(notValidFilePath, validPreprocessorDirectory); // Assert TestHelper.AssertLogMessages(call, messages => @@ -115,11 +115,11 @@ public void Validate_InvalidPreprocessorDirectory_LogsErrorAndReturnsFalse() { // Setup - const string notValidPreprocessorDirectory = "Preprocessor"; + const string invalidPreprocessorDirectory = "Preprocessor"; var valid = true; // Call - Action call = () => valid = DesignWaterLevelCalculationService.Validate(validFilePath, notValidPreprocessorDirectory); + Action call = () => valid = DesignWaterLevelCalculationService.Validate(validFilePath, invalidPreprocessorDirectory); // Assert TestHelper.AssertLogMessages(call, messages => @@ -163,7 +163,7 @@ var mockRepository = new MockRepository(); var calculatorFactory = mockRepository.StrictMock(); - calculatorFactory.Expect(cf => cf.CreateDesignWaterLevelCalculator(testDataPath, preprocessorDirectory)).Return(calculator); + calculatorFactory.Expect(cf => cf.CreateDesignWaterLevelCalculator(testDataPath, validPreprocessorDirectory)).Return(calculator); var calculation = mockRepository.Stub(); calculation.Stub(c => c.Name).Return("punt_flw_ 1"); @@ -178,7 +178,7 @@ // Call Action call = () => new DesignWaterLevelCalculationService().Calculate(calculation, validFilePath, - preprocessorDirectory, + validPreprocessorDirectory, 1.0 / 30, calculationMessageProvider); @@ -218,7 +218,7 @@ var mockRepository = new MockRepository(); var calculatorFactory = mockRepository.StrictMock(); - calculatorFactory.Expect(cf => cf.CreateDesignWaterLevelCalculator(testDataPath, preprocessorDirectory)).Return(calculator); + calculatorFactory.Expect(cf => cf.CreateDesignWaterLevelCalculator(testDataPath, validPreprocessorDirectory)).Return(calculator); var calculation = mockRepository.Stub(); calculation.Stub(c => c.Name).Return("punt_flw_ 1"); @@ -235,7 +235,7 @@ // Call Action call = () => new DesignWaterLevelCalculationService().Calculate(calculation, validFilePath, - preprocessorDirectory, + validPreprocessorDirectory, norm, calculationMessageProvider); @@ -272,7 +272,7 @@ var mockRepository = new MockRepository(); var calculatorFactory = mockRepository.StrictMock(); - calculatorFactory.Expect(cf => cf.CreateDesignWaterLevelCalculator(testDataPath, preprocessorDirectory)).Return(calculator); + calculatorFactory.Expect(cf => cf.CreateDesignWaterLevelCalculator(testDataPath, validPreprocessorDirectory)).Return(calculator); var calculation = mockRepository.Stub(); calculation.Stub(c => c.Name).Return("punt_flw_ 1"); @@ -287,7 +287,7 @@ // Call Action call = () => new DesignWaterLevelCalculationService().Calculate(calculation, validFilePath, - preprocessorDirectory, + validPreprocessorDirectory, 1.0 / 30, calculationMessageProvider); @@ -325,7 +325,7 @@ var mockRepository = new MockRepository(); var calculatorFactory = mockRepository.StrictMock(); - calculatorFactory.Expect(cf => cf.CreateDesignWaterLevelCalculator(testDataPath, preprocessorDirectory)).Return(calculator); + calculatorFactory.Expect(cf => cf.CreateDesignWaterLevelCalculator(testDataPath, validPreprocessorDirectory)).Return(calculator); var calculation = mockRepository.Stub(); calculation.Stub(c => c.Name).Return("punt_flw_ 1"); @@ -340,7 +340,7 @@ // Call Action call = () => new DesignWaterLevelCalculationService().Calculate(calculation, validFilePath, - preprocessorDirectory, + validPreprocessorDirectory, 1.0 / 30, calculationMessageProvider); @@ -380,7 +380,7 @@ calculator.Stub(c => c.OutputDirectory).Return(string.Empty); var calculatorFactory = mockRepository.StrictMock(); - calculatorFactory.Expect(cf => cf.CreateDesignWaterLevelCalculator(testDataPath, preprocessorDirectory)).Return(calculator); + calculatorFactory.Expect(cf => cf.CreateDesignWaterLevelCalculator(testDataPath, validPreprocessorDirectory)).Return(calculator); var calculation = mockRepository.Stub(); calculation.Stub(c => c.Name).Return("punt_flw_ 1"); @@ -396,7 +396,7 @@ TestDelegate call = () => new DesignWaterLevelCalculationService() .Calculate(calculation, validFilePath, - preprocessorDirectory, + validPreprocessorDirectory, 1.0 / 30, calculationMessageProvider); @@ -420,7 +420,7 @@ }; var calculatorFactory = mockRepository.StrictMock(); - calculatorFactory.Expect(cf => cf.CreateDesignWaterLevelCalculator(testDataPath, preprocessorDirectory)).Return(calculator); + calculatorFactory.Expect(cf => cf.CreateDesignWaterLevelCalculator(testDataPath, validPreprocessorDirectory)).Return(calculator); var calculation = mockRepository.Stub(); calculation.Stub(c => c.Name).Return("punt_flw_ 1"); @@ -436,7 +436,7 @@ Action call = () => new DesignWaterLevelCalculationService() .Calculate(calculation, validFilePath, - preprocessorDirectory, + validPreprocessorDirectory, 1.0 / 30, calculationMessageProvider); @@ -468,7 +468,7 @@ }; var calculatorFactory = mockRepository.StrictMock(); - calculatorFactory.Expect(cf => cf.CreateDesignWaterLevelCalculator(testDataPath, preprocessorDirectory)).Return(calculator); + calculatorFactory.Expect(cf => cf.CreateDesignWaterLevelCalculator(testDataPath, validPreprocessorDirectory)).Return(calculator); var calculation = mockRepository.Stub(); calculation.Stub(c => c.Name).Return("punt_flw_ 1"); @@ -484,7 +484,7 @@ Action call = () => new DesignWaterLevelCalculationService() .Calculate(calculation, validFilePath, - preprocessorDirectory, + validPreprocessorDirectory, 1.0 / 30, calculationMessageProvider); @@ -510,7 +510,7 @@ var mockRepository = new MockRepository(); var calculatorFactory = mockRepository.StrictMock(); - calculatorFactory.Expect(cf => cf.CreateDesignWaterLevelCalculator(testDataPath, preprocessorDirectory)).Return(calculator); + calculatorFactory.Expect(cf => cf.CreateDesignWaterLevelCalculator(testDataPath, validPreprocessorDirectory)).Return(calculator); var calculation = mockRepository.Stub(); calculation.Stub(c => c.Name).Return("name"); @@ -529,7 +529,7 @@ // Call service.Calculate(calculation, validFilePath, - preprocessorDirectory, + validPreprocessorDirectory, norm, calculationMessageProvider); @@ -559,7 +559,7 @@ var mockRepository = new MockRepository(); var calculatorFactory = mockRepository.StrictMock(); - calculatorFactory.Expect(cf => cf.CreateDesignWaterLevelCalculator(testDataPath, preprocessorDirectory)).Return(calculator); + calculatorFactory.Expect(cf => cf.CreateDesignWaterLevelCalculator(testDataPath, validPreprocessorDirectory)).Return(calculator); var calculation = mockRepository.Stub(); calculation.Stub(c => c.Name).Return(locationName); @@ -591,7 +591,7 @@ { new DesignWaterLevelCalculationService().Calculate(calculation, validFilePath, - preprocessorDirectory, + validPreprocessorDirectory, norm, calculationMessageProvider); } Index: Ringtoets/Common/test/Ringtoets.Common.Service.Test/Structures/StructuresCalculationServiceBaseTest.cs =================================================================== diff -u -r9e17d4068926b32a4bc24f6f569cbb13059af431 -rb282e7cc12bd468b577bb8afc20e3b0720d6d1be --- Ringtoets/Common/test/Ringtoets.Common.Service.Test/Structures/StructuresCalculationServiceBaseTest.cs (.../StructuresCalculationServiceBaseTest.cs) (revision 9e17d4068926b32a4bc24f6f569cbb13059af431) +++ Ringtoets/Common/test/Ringtoets.Common.Service.Test/Structures/StructuresCalculationServiceBaseTest.cs (.../StructuresCalculationServiceBaseTest.cs) (revision b282e7cc12bd468b577bb8afc20e3b0720d6d1be) @@ -49,7 +49,7 @@ { 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(); [Test] public void Constructor_MessageProviderNull_ThrowsArgumentNullException() @@ -386,7 +386,7 @@ IllustrationPointsResult = new TestGeneralResult() }; var calculatorFactory = mocks.StrictMock(); - calculatorFactory.Expect(cf => cf.CreateStructuresCalculator(testDataPath, preprocessorDirectory)) + calculatorFactory.Expect(cf => cf.CreateStructuresCalculator(testDataPath, validPreprocessorDirectory)) .Return(calculator); const string performedCalculationMessage = "Calculation successful"; @@ -409,7 +409,7 @@ var service = new TestStructuresCalculationService(messageProvider); // Call - Action call = () => service.Calculate(calculation, new GeneralTestInput(), 1, 1, 1, validFilePath, preprocessorDirectory); + Action call = () => service.Calculate(calculation, new GeneralTestInput(), 1, 1, 1, validFilePath, validPreprocessorDirectory); // Assert TestHelper.AssertLogMessages(call, messages => @@ -446,7 +446,7 @@ IllustrationPointsParserErrorMessage = parserMessage }; var calculatorFactory = mocks.StrictMock(); - calculatorFactory.Expect(cf => cf.CreateStructuresCalculator(testDataPath, preprocessorDirectory)) + calculatorFactory.Expect(cf => cf.CreateStructuresCalculator(testDataPath, validPreprocessorDirectory)) .Return(calculator); const string performedCalculationMessage = "Calculation successful"; @@ -469,7 +469,7 @@ var service = new TestStructuresCalculationService(messageProvider); // Call - Action call = () => service.Calculate(calculation, new GeneralTestInput(), 1, 1, 1, validFilePath, preprocessorDirectory); + Action call = () => service.Calculate(calculation, new GeneralTestInput(), 1, 1, 1, validFilePath, validPreprocessorDirectory); // Assert TestHelper.AssertLogMessages(call, messages => @@ -499,7 +499,7 @@ IllustrationPointsParserErrorMessage = "Parser error" }; var calculatorFactory = mocks.StrictMock(); - calculatorFactory.Expect(cf => cf.CreateStructuresCalculator(testDataPath, preprocessorDirectory)) + calculatorFactory.Expect(cf => cf.CreateStructuresCalculator(testDataPath, validPreprocessorDirectory)) .Return(calculator); const string performedCalculationMessage = "Calculation successful"; @@ -522,7 +522,7 @@ var service = new TestStructuresCalculationService(messageProvider); // Call - Action call = () => service.Calculate(calculation, new GeneralTestInput(), 1, 1, 1, validFilePath, preprocessorDirectory); + Action call = () => service.Calculate(calculation, new GeneralTestInput(), 1, 1, 1, validFilePath, validPreprocessorDirectory); // Assert TestHelper.AssertLogMessages(call, messages => @@ -551,7 +551,7 @@ IllustrationPointsResult = TestGeneralResult.CreateGeneralResultWithSubMechanismIllustrationPoints() }; var calculatorFactory = mocks.StrictMock(); - calculatorFactory.Expect(cf => cf.CreateStructuresCalculator(testDataPath, preprocessorDirectory)) + calculatorFactory.Expect(cf => cf.CreateStructuresCalculator(testDataPath, validPreprocessorDirectory)) .Return(calculator); const string performedCalculationMessage = "Calculation successful"; @@ -574,7 +574,7 @@ var service = new TestStructuresCalculationService(messageProvider); // Call - Action call = () => service.Calculate(calculation, new GeneralTestInput(), 1, 1, 1, validFilePath, preprocessorDirectory); + Action call = () => service.Calculate(calculation, new GeneralTestInput(), 1, 1, 1, validFilePath, validPreprocessorDirectory); // Assert TestHelper.AssertLogMessagesWithLevelAndLoggedExceptions(call, messages => @@ -608,7 +608,7 @@ IllustrationPointsResult = GeneralResultTestFactory.CreateGeneralResultWithDuplicateStochasts() }; var calculatorFactory = mocks.StrictMock(); - calculatorFactory.Expect(cf => cf.CreateStructuresCalculator(testDataPath, preprocessorDirectory)) + calculatorFactory.Expect(cf => cf.CreateStructuresCalculator(testDataPath, validPreprocessorDirectory)) .Return(calculator); const string performedCalculationMessage = "Calculation successful"; @@ -631,7 +631,7 @@ var service = new TestStructuresCalculationService(messageProvider); // Call - Action call = () => service.Calculate(calculation, new GeneralTestInput(), 1, 1, 1, validFilePath, preprocessorDirectory); + Action call = () => service.Calculate(calculation, new GeneralTestInput(), 1, 1, 1, validFilePath, validPreprocessorDirectory); // Assert TestHelper.AssertLogMessagesWithLevelAndLoggedExceptions(call, messages => @@ -669,7 +669,7 @@ var mocks = new MockRepository(); var calculator = new TestStructuresCalculator(); var calculatorFactory = mocks.StrictMock(); - calculatorFactory.Expect(cf => cf.CreateStructuresCalculator(testDataPath, preprocessorDirectory)) + calculatorFactory.Expect(cf => cf.CreateStructuresCalculator(testDataPath, validPreprocessorDirectory)) .Return(calculator); var messageProvider = mocks.Stub(); @@ -681,7 +681,7 @@ calculator.CalculationFinishedHandler += (s, e) => service.Cancel(); // Call - service.Calculate(calculation, new GeneralTestInput(), 0, 0.5, 1, validFilePath, preprocessorDirectory); + service.Calculate(calculation, new GeneralTestInput(), 0, 0.5, 1, validFilePath, validPreprocessorDirectory); // Assert Assert.IsNull(calculation.Output); @@ -716,7 +716,7 @@ LastErrorFileContent = lastErrorFileContent }; var calculatorFactory = mocks.StrictMock(); - calculatorFactory.Expect(cf => cf.CreateStructuresCalculator(testDataPath, preprocessorDirectory)) + calculatorFactory.Expect(cf => cf.CreateStructuresCalculator(testDataPath, validPreprocessorDirectory)) .Return(calculator); const string calculationFailedMessage = "Calculation failed"; @@ -748,7 +748,7 @@ { try { - structuresCalculationService.Calculate(calculation, new GeneralTestInput(), 0, 0.5, 1, validFilePath, preprocessorDirectory); + structuresCalculationService.Calculate(calculation, new GeneralTestInput(), 0, 0.5, 1, validFilePath, validPreprocessorDirectory); } catch (HydraRingCalculationException) { 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); Index: Ringtoets/Common/test/Ringtoets.Common.Service.Test/WaveHeightCalculationServiceTest.cs =================================================================== diff -u -r9ac0d49079a6cc44ea4d5c348a6628e234adc1d5 -rb282e7cc12bd468b577bb8afc20e3b0720d6d1be --- Ringtoets/Common/test/Ringtoets.Common.Service.Test/WaveHeightCalculationServiceTest.cs (.../WaveHeightCalculationServiceTest.cs) (revision 9ac0d49079a6cc44ea4d5c348a6628e234adc1d5) +++ Ringtoets/Common/test/Ringtoets.Common.Service.Test/WaveHeightCalculationServiceTest.cs (.../WaveHeightCalculationServiceTest.cs) (revision b282e7cc12bd468b577bb8afc20e3b0720d6d1be) @@ -45,7 +45,7 @@ { 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(); [Test] public void Validate_ValidPaths_ReturnsTrue() @@ -54,7 +54,7 @@ var valid = false; // Call - Action call = () => valid = WaveHeightCalculationService.Validate(validFilePath, preprocessorDirectory); + Action call = () => valid = WaveHeightCalculationService.Validate(validFilePath, validPreprocessorDirectory); // Assert TestHelper.AssertLogMessages(call, messages => @@ -75,7 +75,7 @@ var valid = true; // Call - Action call = () => valid = WaveHeightCalculationService.Validate(notValidFilePath, preprocessorDirectory); + Action call = () => valid = WaveHeightCalculationService.Validate(notValidFilePath, validPreprocessorDirectory); // Assert TestHelper.AssertLogMessages(call, messages => @@ -97,7 +97,7 @@ var valid = false; // Call - Action call = () => valid = WaveHeightCalculationService.Validate(notValidFilePath, preprocessorDirectory); + Action call = () => valid = WaveHeightCalculationService.Validate(notValidFilePath, validPreprocessorDirectory); // Assert TestHelper.AssertLogMessages(call, messages => @@ -115,11 +115,11 @@ public void Validate_InvalidPreprocessorDirectory_LogsErrorAndReturnsFalse() { // Setup - const string notValidPreprocessorDirectory = "Preprocessor"; + const string invalidPreprocessorDirectory = "Preprocessor"; var valid = true; // Call - Action call = () => valid = WaveHeightCalculationService.Validate(validFilePath, notValidPreprocessorDirectory); + Action call = () => valid = WaveHeightCalculationService.Validate(validFilePath, invalidPreprocessorDirectory); // Assert TestHelper.AssertLogMessages(call, messages => @@ -142,7 +142,7 @@ mockRepository.ReplayAll(); // Call - TestDelegate test = () => new WaveHeightCalculationService().Calculate(null, testDataPath, preprocessorDirectory, 1, calculationMessageProvider); + TestDelegate test = () => new WaveHeightCalculationService().Calculate(null, testDataPath, validPreprocessorDirectory, 1, calculationMessageProvider); // Assert var exception = Assert.Throws(test); @@ -165,7 +165,7 @@ var mockRepository = new MockRepository(); var calculatorFactory = mockRepository.StrictMock(); - calculatorFactory.Expect(cf => cf.CreateWaveHeightCalculator(testDataPath, preprocessorDirectory)).Return(calculator); + calculatorFactory.Expect(cf => cf.CreateWaveHeightCalculator(testDataPath, validPreprocessorDirectory)).Return(calculator); var calculation = mockRepository.Stub(); calculation.Stub(c => c.Name).Return("punt_flw_ 1"); @@ -179,7 +179,7 @@ { Action call = () => new WaveHeightCalculationService().Calculate(calculation, validFilePath, - preprocessorDirectory, + validPreprocessorDirectory, norm, calculationMessageProvider); @@ -217,7 +217,7 @@ var mockRepository = new MockRepository(); var calculatorFactory = mockRepository.StrictMock(); - calculatorFactory.Expect(cf => cf.CreateWaveHeightCalculator(testDataPath, preprocessorDirectory)).Return(calculator); + calculatorFactory.Expect(cf => cf.CreateWaveHeightCalculator(testDataPath, validPreprocessorDirectory)).Return(calculator); var calculation = mockRepository.Stub(); calculation.Stub(c => c.Name).Return("punt_flw_ 1"); @@ -233,7 +233,7 @@ { Action call = () => new WaveHeightCalculationService().Calculate(calculation, validFilePath, - preprocessorDirectory, + validPreprocessorDirectory, 1.0 / 30, calculationMessageProvider); @@ -267,7 +267,7 @@ var mockRepository = new MockRepository(); var calculatorFactory = mockRepository.StrictMock(); - calculatorFactory.Expect(cf => cf.CreateWaveHeightCalculator(testDataPath, preprocessorDirectory)).Return(calculator); + calculatorFactory.Expect(cf => cf.CreateWaveHeightCalculator(testDataPath, validPreprocessorDirectory)).Return(calculator); var calculation = mockRepository.Stub(); calculation.Stub(c => c.Name).Return("punt_flw_ 1"); @@ -282,7 +282,7 @@ // Call Action call = () => new WaveHeightCalculationService().Calculate(calculation, validFilePath, - preprocessorDirectory, + validPreprocessorDirectory, 1.0 / 30, calculationMessageProvider); @@ -320,7 +320,7 @@ var mockRepository = new MockRepository(); var calculatorFactory = mockRepository.StrictMock(); - calculatorFactory.Expect(cf => cf.CreateWaveHeightCalculator(testDataPath, preprocessorDirectory)).Return(calculator); + calculatorFactory.Expect(cf => cf.CreateWaveHeightCalculator(testDataPath, validPreprocessorDirectory)).Return(calculator); var calculation = mockRepository.Stub(); calculation.Stub(c => c.Name).Return("punt_flw_ 1"); @@ -335,7 +335,7 @@ // Call Action call = () => new WaveHeightCalculationService().Calculate(calculation, validFilePath, - preprocessorDirectory, + validPreprocessorDirectory, 1.0 / 30, calculationMessageProvider); @@ -375,7 +375,7 @@ calculator.Stub(c => c.OutputDirectory).Return(string.Empty); var calculatorFactory = mockRepository.StrictMock(); - calculatorFactory.Expect(cf => cf.CreateWaveHeightCalculator(testDataPath, preprocessorDirectory)).Return(calculator); + calculatorFactory.Expect(cf => cf.CreateWaveHeightCalculator(testDataPath, validPreprocessorDirectory)).Return(calculator); var calculation = mockRepository.Stub(); calculation.Stub(c => c.Name).Return("punt_flw_ 1"); @@ -391,7 +391,7 @@ TestDelegate call = () => new WaveHeightCalculationService() .Calculate(calculation, validFilePath, - preprocessorDirectory, + validPreprocessorDirectory, 1.0 / 30, calculationMessageProvider); @@ -415,7 +415,7 @@ }; var calculatorFactory = mockRepository.StrictMock(); - calculatorFactory.Expect(cf => cf.CreateWaveHeightCalculator(testDataPath, preprocessorDirectory)).Return(calculator); + calculatorFactory.Expect(cf => cf.CreateWaveHeightCalculator(testDataPath, validPreprocessorDirectory)).Return(calculator); var calculation = mockRepository.Stub(); calculation.Stub(c => c.Name).Return("punt_flw_ 1"); @@ -431,7 +431,7 @@ Action call = () => new WaveHeightCalculationService() .Calculate(calculation, validFilePath, - preprocessorDirectory, + validPreprocessorDirectory, 1.0 / 30, calculationMessageProvider); @@ -463,7 +463,7 @@ }; var calculatorFactory = mockRepository.StrictMock(); - calculatorFactory.Expect(cf => cf.CreateWaveHeightCalculator(testDataPath, preprocessorDirectory)).Return(calculator); + calculatorFactory.Expect(cf => cf.CreateWaveHeightCalculator(testDataPath, validPreprocessorDirectory)).Return(calculator); var calculation = mockRepository.Stub(); calculation.Stub(c => c.Name).Return("punt_flw_ 1"); @@ -479,7 +479,7 @@ Action call = () => new WaveHeightCalculationService() .Calculate(calculation, validFilePath, - preprocessorDirectory, + validPreprocessorDirectory, 1.0 / 30, calculationMessageProvider); @@ -505,7 +505,7 @@ var mockRepository = new MockRepository(); var calculatorFactory = mockRepository.StrictMock(); - calculatorFactory.Expect(cf => cf.CreateWaveHeightCalculator(testDataPath, preprocessorDirectory)).Return(calculator); + calculatorFactory.Expect(cf => cf.CreateWaveHeightCalculator(testDataPath, validPreprocessorDirectory)).Return(calculator); var calculation = mockRepository.Stub(); calculation.Stub(c => c.Name).Return("name"); @@ -524,7 +524,7 @@ // Call service.Calculate(calculation, validFilePath, - preprocessorDirectory, + validPreprocessorDirectory, norm, calculationMessageProvider); @@ -554,7 +554,7 @@ var mockRepository = new MockRepository(); var calculatorFactory = mockRepository.StrictMock(); - calculatorFactory.Expect(cf => cf.CreateWaveHeightCalculator(testDataPath, preprocessorDirectory)).Return(calculator); + calculatorFactory.Expect(cf => cf.CreateWaveHeightCalculator(testDataPath, validPreprocessorDirectory)).Return(calculator); var calculation = mockRepository.Stub(); calculation.Stub(c => c.Name).Return(locationName); @@ -586,7 +586,7 @@ { new WaveHeightCalculationService().Calculate(calculation, validFilePath, - preprocessorDirectory, + validPreprocessorDirectory, norm, calculationMessageProvider); } Index: Ringtoets/DuneErosion/test/Ringtoets.DuneErosion.Integration.Test/DuneErosionBoundaryCalculationActivityIntegrationTest.cs =================================================================== diff -u -r3d4ee6d61a40d1e657c334cb1982729563649d42 -rb282e7cc12bd468b577bb8afc20e3b0720d6d1be --- Ringtoets/DuneErosion/test/Ringtoets.DuneErosion.Integration.Test/DuneErosionBoundaryCalculationActivityIntegrationTest.cs (.../DuneErosionBoundaryCalculationActivityIntegrationTest.cs) (revision 3d4ee6d61a40d1e657c334cb1982729563649d42) +++ Ringtoets/DuneErosion/test/Ringtoets.DuneErosion.Integration.Test/DuneErosionBoundaryCalculationActivityIntegrationTest.cs (.../DuneErosionBoundaryCalculationActivityIntegrationTest.cs) (revision b282e7cc12bd468b577bb8afc20e3b0720d6d1be) @@ -41,15 +41,15 @@ { 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(); [Test] public void Run_ValidCalculation_PerformCalculationAndLogStartAndEnd() { // Setup var mockRepository = new MockRepository(); var calculatorFactory = mockRepository.StrictMock(); - calculatorFactory.Expect(cf => cf.CreateDunesBoundaryConditionsCalculator(testDataPath, preprocessorDirectory)) + calculatorFactory.Expect(cf => cf.CreateDunesBoundaryConditionsCalculator(testDataPath, validPreprocessorDirectory)) .Return(new TestDunesBoundaryConditionsCalculator()); mockRepository.ReplayAll(); @@ -63,7 +63,7 @@ }); var activity = new DuneErosionBoundaryCalculationActivity(duneLocation, validFilePath, - preprocessorDirectory, + validPreprocessorDirectory, 1.0 / 30000); using (new HydraRingCalculatorFactoryConfig(calculatorFactory)) @@ -109,7 +109,7 @@ var mockRepository = new MockRepository(); var calculatorFactory = mockRepository.StrictMock(); - calculatorFactory.Expect(cf => cf.CreateDunesBoundaryConditionsCalculator(testDataPath, preprocessorDirectory)) + calculatorFactory.Expect(cf => cf.CreateDunesBoundaryConditionsCalculator(testDataPath, validPreprocessorDirectory)) .Return(calculator); mockRepository.ReplayAll(); @@ -123,7 +123,7 @@ }); var activity = new DuneErosionBoundaryCalculationActivity(duneLocation, validFilePath, - preprocessorDirectory, + validPreprocessorDirectory, 1.0 / 30000); using (new HydraRingCalculatorFactoryConfig(calculatorFactory)) @@ -153,7 +153,7 @@ }; var activity = new DuneErosionBoundaryCalculationActivity(duneLocation, validFilePath, - preprocessorDirectory, + validPreprocessorDirectory, 1.0 / 30000); using (new HydraRingCalculatorFactoryConfig(calculatorFactory)) Index: Ringtoets/DuneErosion/test/Ringtoets.DuneErosion.Service.Test/DuneErosionBoundaryCalculationActivityTest.cs =================================================================== diff -u -rda1a375eb46d0410043dc5797bf259dd04a38d72 -rb282e7cc12bd468b577bb8afc20e3b0720d6d1be --- Ringtoets/DuneErosion/test/Ringtoets.DuneErosion.Service.Test/DuneErosionBoundaryCalculationActivityTest.cs (.../DuneErosionBoundaryCalculationActivityTest.cs) (revision da1a375eb46d0410043dc5797bf259dd04a38d72) +++ Ringtoets/DuneErosion/test/Ringtoets.DuneErosion.Service.Test/DuneErosionBoundaryCalculationActivityTest.cs (.../DuneErosionBoundaryCalculationActivityTest.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(); [SetUp] public void SetUp() @@ -63,7 +63,7 @@ // Call var activity = new DuneErosionBoundaryCalculationActivity(duneLocation, validFilePath, - preprocessorDirectory, + validPreprocessorDirectory, 1.0 / 30000); // Assert @@ -79,7 +79,7 @@ // Call TestDelegate test = () => new DuneErosionBoundaryCalculationActivity(null, validFilePath, - preprocessorDirectory, + validPreprocessorDirectory, 1.0 / 30000); // Assert @@ -98,7 +98,7 @@ var activity = new DuneErosionBoundaryCalculationActivity(duneLocation, invalidFilePath, - preprocessorDirectory, + validPreprocessorDirectory, 0.5); // Call @@ -162,12 +162,12 @@ }; var calculatorFactory = mockRepository.StrictMock(); - calculatorFactory.Expect(cf => cf.CreateDunesBoundaryConditionsCalculator(testDataPath, preprocessorDirectory)).Return(calculator); + calculatorFactory.Expect(cf => cf.CreateDunesBoundaryConditionsCalculator(testDataPath, validPreprocessorDirectory)).Return(calculator); mockRepository.ReplayAll(); var activity = new DuneErosionBoundaryCalculationActivity(duneLocation, validFilePath, - preprocessorDirectory, + validPreprocessorDirectory, norm); using (new HydraRingCalculatorFactoryConfig(calculatorFactory)) @@ -208,7 +208,7 @@ var activity = new DuneErosionBoundaryCalculationActivity(duneLocation, validFilePath, - preprocessorDirectory, + validPreprocessorDirectory, 0.5); // Call @@ -240,12 +240,12 @@ }; var calculatorFactory = mockRepository.StrictMock(); - calculatorFactory.Expect(cf => cf.CreateDunesBoundaryConditionsCalculator(testDataPath, preprocessorDirectory)).Return(calculator); + calculatorFactory.Expect(cf => cf.CreateDunesBoundaryConditionsCalculator(testDataPath, validPreprocessorDirectory)).Return(calculator); mockRepository.ReplayAll(); var activity = new DuneErosionBoundaryCalculationActivity(duneLocation, validFilePath, - preprocessorDirectory, + validPreprocessorDirectory, norm); using (new HydraRingCalculatorFactoryConfig(calculatorFactory)) @@ -280,14 +280,14 @@ }; var calculatorFactory = mockRepository.StrictMock(); - calculatorFactory.Expect(cf => cf.CreateDunesBoundaryConditionsCalculator(testDataPath, preprocessorDirectory)).Return(calculator); + calculatorFactory.Expect(cf => cf.CreateDunesBoundaryConditionsCalculator(testDataPath, validPreprocessorDirectory)).Return(calculator); mockRepository.ReplayAll(); var duneLocation = new TestDuneLocation("dune location"); var activity = new DuneErosionBoundaryCalculationActivity(duneLocation, validFilePath, - preprocessorDirectory, + validPreprocessorDirectory, 0.5); using (new HydraRingCalculatorFactoryConfig(calculatorFactory)) @@ -312,15 +312,15 @@ }; var calculatorFactory = mockRepository.StrictMock(); - calculatorFactory.Expect(cf => cf.CreateDunesBoundaryConditionsCalculator(testDataPath, preprocessorDirectory)).Return(calculator); + calculatorFactory.Expect(cf => cf.CreateDunesBoundaryConditionsCalculator(testDataPath, validPreprocessorDirectory)).Return(calculator); mockRepository.ReplayAll(); const string locationName = "some name"; var duneLocation = new TestDuneLocation(locationName); var activity = new DuneErosionBoundaryCalculationActivity(duneLocation, validFilePath, - preprocessorDirectory, + validPreprocessorDirectory, 0.5); using (new HydraRingCalculatorFactoryConfig(calculatorFactory)) @@ -364,12 +364,12 @@ }; var calculatorFactory = mockRepository.StrictMock(); - calculatorFactory.Expect(cf => cf.CreateDunesBoundaryConditionsCalculator(testDataPath, preprocessorDirectory)).Return(calculator); + calculatorFactory.Expect(cf => cf.CreateDunesBoundaryConditionsCalculator(testDataPath, validPreprocessorDirectory)).Return(calculator); mockRepository.ReplayAll(); var activity = new DuneErosionBoundaryCalculationActivity(duneLocation, validFilePath, - preprocessorDirectory, + validPreprocessorDirectory, 0.5); using (new HydraRingCalculatorFactoryConfig(calculatorFactory)) @@ -400,7 +400,7 @@ var activity = new DuneErosionBoundaryCalculationActivityWithState(duneLocation, validFilePath, - preprocessorDirectory, + validPreprocessorDirectory, 1.0, state); Index: Ringtoets/DuneErosion/test/Ringtoets.DuneErosion.Service.Test/DuneErosionBoundaryCalculationServiceTest.cs =================================================================== diff -u -r0ce0e78f755c50e78451bab5a01d91c98d464caa -rb282e7cc12bd468b577bb8afc20e3b0720d6d1be --- Ringtoets/DuneErosion/test/Ringtoets.DuneErosion.Service.Test/DuneErosionBoundaryCalculationServiceTest.cs (.../DuneErosionBoundaryCalculationServiceTest.cs) (revision 0ce0e78f755c50e78451bab5a01d91c98d464caa) +++ Ringtoets/DuneErosion/test/Ringtoets.DuneErosion.Service.Test/DuneErosionBoundaryCalculationServiceTest.cs (.../DuneErosionBoundaryCalculationServiceTest.cs) (revision b282e7cc12bd468b577bb8afc20e3b0720d6d1be) @@ -42,7 +42,7 @@ { 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(); [Test] public void Validate_ValidPaths_ReturnsTrue() @@ -51,7 +51,7 @@ var valid = false; // Call - Action call = () => valid = DuneErosionBoundaryCalculationService.Validate(validFilePath, preprocessorDirectory); + Action call = () => valid = DuneErosionBoundaryCalculationService.Validate(validFilePath, validPreprocessorDirectory); // Assert TestHelper.AssertLogMessages(call, messages => @@ -72,7 +72,7 @@ var valid = true; // Call - Action call = () => valid = DuneErosionBoundaryCalculationService.Validate(notValidFilePath, preprocessorDirectory); + Action call = () => valid = DuneErosionBoundaryCalculationService.Validate(notValidFilePath, validPreprocessorDirectory); // Assert TestHelper.AssertLogMessages(call, messages => @@ -94,7 +94,7 @@ var valid = false; // Call - Action call = () => valid = DuneErosionBoundaryCalculationService.Validate(notValidFilePath, preprocessorDirectory); + Action call = () => valid = DuneErosionBoundaryCalculationService.Validate(notValidFilePath, validPreprocessorDirectory); // Assert TestHelper.AssertLogMessages(call, messages => @@ -138,7 +138,7 @@ null, 1, validFilePath, - preprocessorDirectory); + validPreprocessorDirectory); // Assert var exception = Assert.Throws(test); @@ -153,7 +153,7 @@ var mockRepository = new MockRepository(); var calculatorFactory = mockRepository.StrictMock(); - calculatorFactory.Expect(cf => cf.CreateDunesBoundaryConditionsCalculator(testDataPath, preprocessorDirectory)) + calculatorFactory.Expect(cf => cf.CreateDunesBoundaryConditionsCalculator(testDataPath, validPreprocessorDirectory)) .Return(calculator); mockRepository.ReplayAll(); @@ -179,7 +179,7 @@ duneLocation, mechanismSpecificNorm, validFilePath, - preprocessorDirectory); + validPreprocessorDirectory); // Assert DunesBoundaryConditionsCalculationInput expectedInput = CreateInput(duneLocation, mechanismSpecificNorm); @@ -205,7 +205,7 @@ var mockRepository = new MockRepository(); var calculatorFactory = mockRepository.StrictMock(); - calculatorFactory.Expect(cf => cf.CreateDunesBoundaryConditionsCalculator(testDataPath, preprocessorDirectory)) + calculatorFactory.Expect(cf => cf.CreateDunesBoundaryConditionsCalculator(testDataPath, validPreprocessorDirectory)) .Return(calculator); mockRepository.ReplayAll(); @@ -234,7 +234,7 @@ duneLocation, mechanismSpecificNorm, validFilePath, - preprocessorDirectory); + validPreprocessorDirectory); // Assert TestHelper.AssertLogMessages( @@ -275,7 +275,7 @@ var mockRepository = new MockRepository(); var calculatorFactory = mockRepository.StrictMock(); - calculatorFactory.Expect(cf => cf.CreateDunesBoundaryConditionsCalculator(testDataPath, preprocessorDirectory)) + calculatorFactory.Expect(cf => cf.CreateDunesBoundaryConditionsCalculator(testDataPath, validPreprocessorDirectory)) .Return(calculator); mockRepository.ReplayAll(); @@ -300,7 +300,7 @@ duneLocation, failureMechanism.GetMechanismSpecificNorm(1.0 / 200), validFilePath, - preprocessorDirectory); + validPreprocessorDirectory); // Assert TestHelper.AssertLogMessages( @@ -328,7 +328,7 @@ var mockRepository = new MockRepository(); var calculatorFactory = mockRepository.StrictMock(); - calculatorFactory.Expect(cf => cf.CreateDunesBoundaryConditionsCalculator(testDataPath, preprocessorDirectory)) + calculatorFactory.Expect(cf => cf.CreateDunesBoundaryConditionsCalculator(testDataPath, validPreprocessorDirectory)) .Return(calculator); mockRepository.ReplayAll(); @@ -356,7 +356,7 @@ duneLocation, failureMechanism.GetMechanismSpecificNorm(1.0 / 200), validFilePath, - preprocessorDirectory); + validPreprocessorDirectory); // Assert Assert.IsTrue(calculator.IsCanceled); @@ -377,7 +377,7 @@ var mockRepository = new MockRepository(); var calculatorFactory = mockRepository.StrictMock(); - calculatorFactory.Expect(cf => cf.CreateDunesBoundaryConditionsCalculator(testDataPath, preprocessorDirectory)) + calculatorFactory.Expect(cf => cf.CreateDunesBoundaryConditionsCalculator(testDataPath, validPreprocessorDirectory)) .Return(calculator); mockRepository.ReplayAll(); @@ -408,7 +408,7 @@ duneLocation, failureMechanism.GetMechanismSpecificNorm(1.0 / 200), validFilePath, - preprocessorDirectory); + validPreprocessorDirectory); } catch (HydraRingCalculationException) { @@ -447,7 +447,7 @@ var mockRepository = new MockRepository(); var calculatorFactory = mockRepository.StrictMock(); - calculatorFactory.Expect(cf => cf.CreateDunesBoundaryConditionsCalculator(testDataPath, preprocessorDirectory)) + calculatorFactory.Expect(cf => cf.CreateDunesBoundaryConditionsCalculator(testDataPath, validPreprocessorDirectory)) .Return(calculator); mockRepository.ReplayAll(); @@ -478,7 +478,7 @@ duneLocation, failureMechanism.GetMechanismSpecificNorm(1.0 / 200), validFilePath, - preprocessorDirectory); + validPreprocessorDirectory); } catch (HydraRingCalculationException) { @@ -518,7 +518,7 @@ var mockRepository = new MockRepository(); var calculatorFactory = mockRepository.StrictMock(); - calculatorFactory.Expect(cf => cf.CreateDunesBoundaryConditionsCalculator(testDataPath, preprocessorDirectory)) + calculatorFactory.Expect(cf => cf.CreateDunesBoundaryConditionsCalculator(testDataPath, validPreprocessorDirectory)) .Return(calculator); mockRepository.ReplayAll(); @@ -550,7 +550,7 @@ duneLocation, failureMechanism.GetMechanismSpecificNorm(1.0 / 200), validFilePath, - preprocessorDirectory); + validPreprocessorDirectory); } catch (HydraRingCalculationException e) { Index: Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Service.Test/GrassCoverErosionOutwardsWaveConditionsCalculationServiceTest.cs =================================================================== diff -u -r49fc2a365fb720fe921d963abe78971f589e0079 -rb282e7cc12bd468b577bb8afc20e3b0720d6d1be --- Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Service.Test/GrassCoverErosionOutwardsWaveConditionsCalculationServiceTest.cs (.../GrassCoverErosionOutwardsWaveConditionsCalculationServiceTest.cs) (revision 49fc2a365fb720fe921d963abe78971f589e0079) +++ Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Service.Test/GrassCoverErosionOutwardsWaveConditionsCalculationServiceTest.cs (.../GrassCoverErosionOutwardsWaveConditionsCalculationServiceTest.cs) (revision b282e7cc12bd468b577bb8afc20e3b0720d6d1be) @@ -50,7 +50,7 @@ { 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 validPreprocessorDirectory = Path.Combine(testDataPath, "Preprocessor"); + private static readonly string validPreprocessorDirectory = TestHelper.GetScratchPadPath(); [Test] public void Constructor_ReturnsNewInstance() Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Service.Test/HeightStructuresCalculationServiceTest.cs =================================================================== diff -u -rcdc1bc16334dad7a675276648c42ac6fab5ffdfb -rb282e7cc12bd468b577bb8afc20e3b0720d6d1be --- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Service.Test/HeightStructuresCalculationServiceTest.cs (.../HeightStructuresCalculationServiceTest.cs) (revision cdc1bc16334dad7a675276648c42ac6fab5ffdfb) +++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Service.Test/HeightStructuresCalculationServiceTest.cs (.../HeightStructuresCalculationServiceTest.cs) (revision b282e7cc12bd468b577bb8afc20e3b0720d6d1be) @@ -51,7 +51,7 @@ { 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(); [Test] public void Constructor_ExpectedValues() @@ -396,7 +396,7 @@ IAssessmentSection assessmentSection = AssessmentSectionHelper.CreateAssessmentSectionStub(failureMechanism, mockRepository); var calculatorFactory = mockRepository.StrictMock(); - calculatorFactory.Expect(cf => cf.CreateStructuresCalculator(testDataPath, preprocessorDirectory)) + calculatorFactory.Expect(cf => cf.CreateStructuresCalculator(testDataPath, validPreprocessorDirectory)) .Return(new TestStructuresCalculator()); mockRepository.ReplayAll(); @@ -435,7 +435,7 @@ assessmentSection.FailureMechanismContribution.Norm, failureMechanism.Contribution, validFilePath, - preprocessorDirectory); + validPreprocessorDirectory); // Assert TestHelper.AssertLogMessages(call, messages => @@ -471,7 +471,7 @@ IAssessmentSection assessmentSection = AssessmentSectionHelper.CreateAssessmentSectionStub(failureMechanism, mockRepository); var calculatorFactory = mockRepository.StrictMock(); - calculatorFactory.Expect(cf => cf.CreateStructuresCalculator(testDataPath, preprocessorDirectory)) + calculatorFactory.Expect(cf => cf.CreateStructuresCalculator(testDataPath, validPreprocessorDirectory)) .Return(new TestStructuresCalculator()); mockRepository.ReplayAll(); @@ -495,7 +495,7 @@ assessmentSection.FailureMechanismContribution.Norm, failureMechanism.Contribution, validFilePath, - preprocessorDirectory); + validPreprocessorDirectory); // Assert TestHelper.AssertLogMessages(call, messages => @@ -525,7 +525,7 @@ var calculator = new TestStructuresCalculator(); var calculatorFactory = mockRepository.StrictMock(); - calculatorFactory.Expect(cf => cf.CreateStructuresCalculator(testDataPath, preprocessorDirectory)) + calculatorFactory.Expect(cf => cf.CreateStructuresCalculator(testDataPath, validPreprocessorDirectory)) .Return(calculator); mockRepository.ReplayAll(); @@ -551,7 +551,7 @@ assessmentSection.FailureMechanismContribution.Norm, failureMechanism.Contribution, validFilePath, - preprocessorDirectory); + validPreprocessorDirectory); // Assert StructuresOvertoppingCalculationInput[] overtoppingCalculationInputs = calculator.ReceivedInputs.ToArray(); @@ -608,7 +608,7 @@ LastErrorFileContent = "An error occurred" }; var calculatorFactory = mockRepository.StrictMock(); - calculatorFactory.Expect(cf => cf.CreateStructuresCalculator(testDataPath, preprocessorDirectory)) + calculatorFactory.Expect(cf => cf.CreateStructuresCalculator(testDataPath, validPreprocessorDirectory)) .Return(calculator); mockRepository.ReplayAll(); @@ -635,7 +635,7 @@ assessmentSection.FailureMechanismContribution.Norm, failureMechanism.Contribution, validFilePath, - preprocessorDirectory); + validPreprocessorDirectory); } catch (HydraRingCalculationException) { @@ -679,7 +679,7 @@ EndInFailure = true }; var calculatorFactory = mockRepository.StrictMock(); - calculatorFactory.Expect(cf => cf.CreateStructuresCalculator(testDataPath, preprocessorDirectory)) + calculatorFactory.Expect(cf => cf.CreateStructuresCalculator(testDataPath, validPreprocessorDirectory)) .Return(calculator); mockRepository.ReplayAll(); @@ -706,7 +706,7 @@ assessmentSection.FailureMechanismContribution.Norm, failureMechanism.Contribution, validFilePath, - preprocessorDirectory); + validPreprocessorDirectory); } catch (HydraRingCalculationException) { @@ -750,7 +750,7 @@ LastErrorFileContent = "An error occurred" }; var calculatorFactory = mockRepository.StrictMock(); - calculatorFactory.Expect(cf => cf.CreateStructuresCalculator(testDataPath, preprocessorDirectory)) + calculatorFactory.Expect(cf => cf.CreateStructuresCalculator(testDataPath, validPreprocessorDirectory)) .Return(calculator); mockRepository.ReplayAll(); @@ -778,7 +778,7 @@ assessmentSection.FailureMechanismContribution.Norm, failureMechanism.Contribution, validFilePath, - preprocessorDirectory); + validPreprocessorDirectory); } catch (HydraRingCalculationException e) { Index: Ringtoets/Revetment/test/Ringtoets.Revetment.Service.Test/WaveConditionsCalculationServiceBaseTest.cs =================================================================== diff -u -r269fa1b16fa4ca466a910d4af69384a45ea4c0b5 -rb282e7cc12bd468b577bb8afc20e3b0720d6d1be --- Ringtoets/Revetment/test/Ringtoets.Revetment.Service.Test/WaveConditionsCalculationServiceBaseTest.cs (.../WaveConditionsCalculationServiceBaseTest.cs) (revision 269fa1b16fa4ca466a910d4af69384a45ea4c0b5) +++ Ringtoets/Revetment/test/Ringtoets.Revetment.Service.Test/WaveConditionsCalculationServiceBaseTest.cs (.../WaveConditionsCalculationServiceBaseTest.cs) (revision b282e7cc12bd468b577bb8afc20e3b0720d6d1be) @@ -47,7 +47,7 @@ { private static readonly string testDataPath = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.Integration.Service, "HydraRingCalculation"); private static readonly string validFilePath = Path.Combine(testDataPath, "HRD ijsselmeer.sqlite"); - private static readonly string validPreprocessorDirectory = Path.Combine(testDataPath, "Preprocessor"); + private static readonly string validPreprocessorDirectory = TestHelper.GetScratchPadPath(); [Test] public void Validate_InputNull_ThrowArgumentNullException() @@ -652,13 +652,10 @@ UpperBoundaryRevetment = waterLevel, LowerBoundaryRevetment = (RoundedDouble) 3 }; - string hcldFilePath = Path.Combine(testDataPath, "HRD ijsselmeer.sqlite"); - string preprocessorDirectory = Path.Combine(testDataPath, "Preprocessor"); - var calculator = new TestWaveConditionsCosineCalculator(); var mockRepository = new MockRepository(); var calculatorFactory = mockRepository.Stub(); - calculatorFactory.Expect(cf => cf.CreateWaveConditionsCosineCalculator(testDataPath, preprocessorDirectory)).Return(calculator); + calculatorFactory.Expect(cf => cf.CreateWaveConditionsCosineCalculator(testDataPath, validPreprocessorDirectory)).Return(calculator); mockRepository.ReplayAll(); using (new HydraRingCalculatorFactoryConfig(calculatorFactory)) @@ -667,7 +664,7 @@ calculator.CalculationFinishedHandler += (s, e) => service.Cancel(); // Call - service.PublicCalculate(a, b, c, norm, input, hcldFilePath, preprocessorDirectory); + service.PublicCalculate(a, b, c, norm, input, validFilePath, validPreprocessorDirectory); // Assert Assert.IsTrue(calculator.IsCanceled); Index: Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Service.Test/StabilityPointStructuresCalculationServiceTest.cs =================================================================== diff -u -rcdc1bc16334dad7a675276648c42ac6fab5ffdfb -rb282e7cc12bd468b577bb8afc20e3b0720d6d1be --- Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Service.Test/StabilityPointStructuresCalculationServiceTest.cs (.../StabilityPointStructuresCalculationServiceTest.cs) (revision cdc1bc16334dad7a675276648c42ac6fab5ffdfb) +++ Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Service.Test/StabilityPointStructuresCalculationServiceTest.cs (.../StabilityPointStructuresCalculationServiceTest.cs) (revision b282e7cc12bd468b577bb8afc20e3b0720d6d1be) @@ -50,7 +50,7 @@ { 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(); [Test] public void Constructor_ExpectedValues() @@ -573,7 +573,7 @@ assessmentSection.FailureMechanismContribution.Norm, failureMechanism.Contribution, validFilePath, - preprocessorDirectory); + validPreprocessorDirectory); // Assert const string expectedMessage = "The value of argument 'structureInput' (100) is invalid for Enum type 'StabilityPointStructureInflowModelType'."; @@ -623,7 +623,7 @@ assessmentSection.FailureMechanismContribution.Norm, failureMechanism.Contribution, validFilePath, - preprocessorDirectory); + validPreprocessorDirectory); // Assert const string expectedMessage = "The value of argument 'structureInput' (100) is invalid for Enum type 'LoadSchematizationType'."; @@ -648,7 +648,7 @@ var calculator = new TestStructuresCalculator(); var calculatorFactory = mockRepository.StrictMock(); - calculatorFactory.Expect(cf => cf.CreateStructuresCalculator(testDataPath, preprocessorDirectory)) + calculatorFactory.Expect(cf => cf.CreateStructuresCalculator(testDataPath, validPreprocessorDirectory)) .Return(calculator); mockRepository.ReplayAll(); @@ -676,7 +676,7 @@ assessmentSection.FailureMechanismContribution.Norm, failureMechanism.Contribution, validFilePath, - preprocessorDirectory); + validPreprocessorDirectory); // Assert StructuresStabilityPointCalculationInput[] calculationInputs = calculator.ReceivedInputs.ToArray(); @@ -770,7 +770,7 @@ var calculator = new TestStructuresCalculator(); var calculatorFactory = mockRepository.StrictMock(); - calculatorFactory.Expect(cf => cf.CreateStructuresCalculator(testDataPath, preprocessorDirectory)) + calculatorFactory.Expect(cf => cf.CreateStructuresCalculator(testDataPath, validPreprocessorDirectory)) .Return(calculator); mockRepository.ReplayAll(); @@ -798,7 +798,7 @@ assessmentSection.FailureMechanismContribution.Norm, failureMechanism.Contribution, validFilePath, - preprocessorDirectory); + validPreprocessorDirectory); // Assert StructuresStabilityPointCalculationInput[] calculationInputs = calculator.ReceivedInputs.ToArray(); @@ -892,7 +892,7 @@ var calculator = new TestStructuresCalculator(); var calculatorFactory = mockRepository.StrictMock(); - calculatorFactory.Expect(cf => cf.CreateStructuresCalculator(testDataPath, preprocessorDirectory)) + calculatorFactory.Expect(cf => cf.CreateStructuresCalculator(testDataPath, validPreprocessorDirectory)) .Return(calculator); mockRepository.ReplayAll(); @@ -920,7 +920,7 @@ assessmentSection.FailureMechanismContribution.Norm, failureMechanism.Contribution, validFilePath, - preprocessorDirectory); + validPreprocessorDirectory); // Assert StructuresStabilityPointCalculationInput[] calculationInputs = calculator.ReceivedInputs.ToArray(); @@ -1014,7 +1014,7 @@ var calculator = new TestStructuresCalculator(); var calculatorFactory = mockRepository.StrictMock(); - calculatorFactory.Expect(cf => cf.CreateStructuresCalculator(testDataPath, preprocessorDirectory)) + calculatorFactory.Expect(cf => cf.CreateStructuresCalculator(testDataPath, validPreprocessorDirectory)) .Return(calculator); mockRepository.ReplayAll(); @@ -1042,7 +1042,7 @@ assessmentSection.FailureMechanismContribution.Norm, failureMechanism.Contribution, validFilePath, - preprocessorDirectory); + validPreprocessorDirectory); // Assert StructuresStabilityPointCalculationInput[] calculationInputs = calculator.ReceivedInputs.ToArray(); @@ -1141,7 +1141,7 @@ IAssessmentSection assessmentSection = AssessmentSectionHelper.CreateAssessmentSectionStub(failureMechanism, mockRepository); var calculatorFactory = mockRepository.StrictMock(); - calculatorFactory.Expect(cf => cf.CreateStructuresCalculator(testDataPath, preprocessorDirectory)) + calculatorFactory.Expect(cf => cf.CreateStructuresCalculator(testDataPath, validPreprocessorDirectory)) .Return(new TestStructuresCalculator()); mockRepository.ReplayAll(); @@ -1182,7 +1182,7 @@ assessmentSection.FailureMechanismContribution.Norm, failureMechanism.Contribution, validFilePath, - preprocessorDirectory); + validPreprocessorDirectory); // Assert TestHelper.AssertLogMessages(call, messages => @@ -1219,7 +1219,7 @@ EndInFailure = true }; var calculatorFactory = mockRepository.StrictMock(); - calculatorFactory.Expect(cf => cf.CreateStructuresCalculator(testDataPath, preprocessorDirectory)) + calculatorFactory.Expect(cf => cf.CreateStructuresCalculator(testDataPath, validPreprocessorDirectory)) .Return(calculator); mockRepository.ReplayAll(); @@ -1247,7 +1247,7 @@ assessmentSection.FailureMechanismContribution.Norm, failureMechanism.Contribution, validFilePath, - preprocessorDirectory); + validPreprocessorDirectory); } catch (HydraRingCalculationException) { @@ -1289,7 +1289,7 @@ EndInFailure = true }; var calculatorFactory = mockRepository.StrictMock(); - calculatorFactory.Expect(cf => cf.CreateStructuresCalculator(testDataPath, preprocessorDirectory)) + calculatorFactory.Expect(cf => cf.CreateStructuresCalculator(testDataPath, validPreprocessorDirectory)) .Return(calculator); mockRepository.ReplayAll(); @@ -1317,7 +1317,7 @@ assessmentSection.FailureMechanismContribution.Norm, failureMechanism.Contribution, validFilePath, - preprocessorDirectory); + validPreprocessorDirectory); } catch (HydraRingCalculationException) { @@ -1359,7 +1359,7 @@ LastErrorFileContent = "An error occurred" }; var calculatorFactory = mockRepository.StrictMock(); - calculatorFactory.Expect(cf => cf.CreateStructuresCalculator(testDataPath, preprocessorDirectory)) + calculatorFactory.Expect(cf => cf.CreateStructuresCalculator(testDataPath, validPreprocessorDirectory)) .Return(calculator); mockRepository.ReplayAll(); @@ -1388,7 +1388,7 @@ assessmentSection.FailureMechanismContribution.Norm, failureMechanism.Contribution, validFilePath, - preprocessorDirectory); + validPreprocessorDirectory); } catch (HydraRingCalculationException e) { Index: Ringtoets/StabilityStoneCover/test/Ringtoets.StabilityStoneCover.Service.Test/StabilityStoneCoverWaveConditionsCalculationServiceTest.cs =================================================================== diff -u -r49fc2a365fb720fe921d963abe78971f589e0079 -rb282e7cc12bd468b577bb8afc20e3b0720d6d1be --- Ringtoets/StabilityStoneCover/test/Ringtoets.StabilityStoneCover.Service.Test/StabilityStoneCoverWaveConditionsCalculationServiceTest.cs (.../StabilityStoneCoverWaveConditionsCalculationServiceTest.cs) (revision 49fc2a365fb720fe921d963abe78971f589e0079) +++ Ringtoets/StabilityStoneCover/test/Ringtoets.StabilityStoneCover.Service.Test/StabilityStoneCoverWaveConditionsCalculationServiceTest.cs (.../StabilityStoneCoverWaveConditionsCalculationServiceTest.cs) (revision b282e7cc12bd468b577bb8afc20e3b0720d6d1be) @@ -49,7 +49,7 @@ { 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 validPreprocessorDirectory = Path.Combine(testDataPath, "Preprocessor"); + private static readonly string validPreprocessorDirectory = TestHelper.GetScratchPadPath(); [Test] public void Constructor_ReturnsNewInstance() Index: Ringtoets/WaveImpactAsphaltCover/test/Ringtoets.WaveImpactAsphaltCover.Service.Test/WaveImpactAsphaltCoverWaveConditionsCalculationServiceTest.cs =================================================================== diff -u -r49fc2a365fb720fe921d963abe78971f589e0079 -rb282e7cc12bd468b577bb8afc20e3b0720d6d1be --- Ringtoets/WaveImpactAsphaltCover/test/Ringtoets.WaveImpactAsphaltCover.Service.Test/WaveImpactAsphaltCoverWaveConditionsCalculationServiceTest.cs (.../WaveImpactAsphaltCoverWaveConditionsCalculationServiceTest.cs) (revision 49fc2a365fb720fe921d963abe78971f589e0079) +++ Ringtoets/WaveImpactAsphaltCover/test/Ringtoets.WaveImpactAsphaltCover.Service.Test/WaveImpactAsphaltCoverWaveConditionsCalculationServiceTest.cs (.../WaveImpactAsphaltCoverWaveConditionsCalculationServiceTest.cs) (revision b282e7cc12bd468b577bb8afc20e3b0720d6d1be) @@ -49,7 +49,7 @@ { 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 validPreprocessorDirectory = Path.Combine(testDataPath, "Preprocessor"); + private static readonly string validPreprocessorDirectory = TestHelper.GetScratchPadPath(); [Test] public void Constructor_ReturnsNewInstance()