Index: Ringtoets/Common/test/Ringtoets.Common.Forms.Test/GuiServices/HydraulicBoundaryLocationCalculationGuiServiceTest.cs =================================================================== diff -u -r2a81f01756e227d5ce93717b21b87e8a5cd5fcbb -r2c4404936f53178d527072729e7af7f41fc9fe71 --- Ringtoets/Common/test/Ringtoets.Common.Forms.Test/GuiServices/HydraulicBoundaryLocationCalculationGuiServiceTest.cs (.../HydraulicBoundaryLocationCalculationGuiServiceTest.cs) (revision 2a81f01756e227d5ce93717b21b87e8a5cd5fcbb) +++ Ringtoets/Common/test/Ringtoets.Common.Forms.Test/GuiServices/HydraulicBoundaryLocationCalculationGuiServiceTest.cs (.../HydraulicBoundaryLocationCalculationGuiServiceTest.cs) (revision 2c4404936f53178d527072729e7af7f41fc9fe71) @@ -33,6 +33,7 @@ using Ringtoets.Common.Forms.GuiServices; using Ringtoets.Common.Service.TestUtil; using Ringtoets.HydraRing.Calculation.Calculator.Factory; +using Ringtoets.HydraRing.Calculation.Data.Input; using Ringtoets.HydraRing.Calculation.TestUtil.Calculator; namespace Ringtoets.Common.Forms.Test.GuiServices @@ -217,7 +218,14 @@ IAssessmentSection assessmentSection = AssessmentSectionTestHelper.CreateAssessmentSectionStub(mockRepository); var calculatorFactory = mockRepository.StrictMock(); - calculatorFactory.Expect(cf => cf.CreateDesignWaterLevelCalculator(testDataPath, "")).Return(new TestDesignWaterLevelCalculator()); + calculatorFactory.Expect(cf => cf.CreateDesignWaterLevelCalculator(Arg.Is.NotNull)) + .WhenCalled(invocation => + { + var settings = (HydraRingCalculationSettings) invocation.Arguments[0]; + Assert.AreEqual(validFilePath, settings.HlcdFilePath); + Assert.IsEmpty(settings.PreprocessorDirectory); + }) + .Return(new TestDesignWaterLevelCalculator()); mockRepository.ReplayAll(); assessmentSection.HydraulicBoundaryDatabase.FilePath = validFilePath; Index: Ringtoets/Common/test/Ringtoets.Common.Service.Test/DesignWaterLevelCalculationActivityTest.cs =================================================================== diff -u -r2a81f01756e227d5ce93717b21b87e8a5cd5fcbb -r2c4404936f53178d527072729e7af7f41fc9fe71 --- Ringtoets/Common/test/Ringtoets.Common.Service.Test/DesignWaterLevelCalculationActivityTest.cs (.../DesignWaterLevelCalculationActivityTest.cs) (revision 2a81f01756e227d5ce93717b21b87e8a5cd5fcbb) +++ Ringtoets/Common/test/Ringtoets.Common.Service.Test/DesignWaterLevelCalculationActivityTest.cs (.../DesignWaterLevelCalculationActivityTest.cs) (revision 2c4404936f53178d527072729e7af7f41fc9fe71) @@ -33,6 +33,7 @@ using Ringtoets.Common.Data.TestUtil; using Ringtoets.Common.Service.TestUtil; using Ringtoets.HydraRing.Calculation.Calculator.Factory; +using Ringtoets.HydraRing.Calculation.Data.Input; using Ringtoets.HydraRing.Calculation.Data.Input.Hydraulics; using Ringtoets.HydraRing.Calculation.TestUtil.Calculator; using Ringtoets.HydraRing.Calculation.TestUtil.IllustrationPoints; @@ -190,7 +191,14 @@ var mockRepository = new MockRepository(); var calculatorFactory = mockRepository.StrictMock(); - calculatorFactory.Expect(cf => cf.CreateDesignWaterLevelCalculator(testDataPath, validPreprocessorDirectory)).Return(calculator); + calculatorFactory.Expect(cf => cf.CreateDesignWaterLevelCalculator(Arg.Is.NotNull)) + .WhenCalled(invocation => + { + var settings = (HydraRingCalculationSettings) invocation.Arguments[0]; + Assert.AreEqual(validFilePath, settings.HlcdFilePath); + Assert.AreEqual(validPreprocessorDirectory, settings.PreprocessorDirectory); + }) + .Return(calculator); mockRepository.ReplayAll(); var hydraulicBoundaryLocation = new TestHydraulicBoundaryLocation(locationName); @@ -249,7 +257,14 @@ var mockRepository = new MockRepository(); var calculatorFactory = mockRepository.StrictMock(); - calculatorFactory.Expect(cf => cf.CreateDesignWaterLevelCalculator(testDataPath, validPreprocessorDirectory)).Return(calculator); + calculatorFactory.Expect(cf => cf.CreateDesignWaterLevelCalculator(Arg.Is.NotNull)) + .WhenCalled(invocation => + { + var settings = (HydraRingCalculationSettings) invocation.Arguments[0]; + Assert.AreEqual(validFilePath, settings.HlcdFilePath); + Assert.AreEqual(validPreprocessorDirectory, settings.PreprocessorDirectory); + }) + .Return(calculator); mockRepository.ReplayAll(); var activity = new DesignWaterLevelCalculationActivity(hydraulicBoundaryLocationCalculation, @@ -291,7 +306,14 @@ var mockRepository = new MockRepository(); var calculatorFactory = mockRepository.StrictMock(); - calculatorFactory.Expect(cf => cf.CreateDesignWaterLevelCalculator(testDataPath, validPreprocessorDirectory)).Return(calculator); + calculatorFactory.Expect(cf => cf.CreateDesignWaterLevelCalculator(Arg.Is.NotNull)) + .WhenCalled(invocation => + { + var settings = (HydraRingCalculationSettings) invocation.Arguments[0]; + Assert.AreEqual(validFilePath, settings.HlcdFilePath); + Assert.AreEqual(validPreprocessorDirectory, settings.PreprocessorDirectory); + }) + .Return(calculator); mockRepository.ReplayAll(); var output = new TestHydraulicBoundaryLocationCalculationOutput(double.NaN, CalculationConvergence.CalculatedConverged); @@ -357,7 +379,14 @@ var mockRepository = new MockRepository(); var calculatorFactory = mockRepository.StrictMock(); - calculatorFactory.Expect(cf => cf.CreateDesignWaterLevelCalculator(testDataPath, validPreprocessorDirectory)).Return(calculator); + calculatorFactory.Expect(cf => cf.CreateDesignWaterLevelCalculator(Arg.Is.NotNull)) + .WhenCalled(invocation => + { + var settings = (HydraRingCalculationSettings) invocation.Arguments[0]; + Assert.AreEqual(validFilePath, settings.HlcdFilePath); + Assert.AreEqual(validPreprocessorDirectory, settings.PreprocessorDirectory); + }) + .Return(calculator); mockRepository.ReplayAll(); var hydraulicBoundaryLocationCalculation = new HydraulicBoundaryLocationCalculation(new TestHydraulicBoundaryLocation(locationName)) Index: Ringtoets/Common/test/Ringtoets.Common.Service.Test/DesignWaterLevelCalculationServiceTest.cs =================================================================== diff -u -r2a81f01756e227d5ce93717b21b87e8a5cd5fcbb -r2c4404936f53178d527072729e7af7f41fc9fe71 --- Ringtoets/Common/test/Ringtoets.Common.Service.Test/DesignWaterLevelCalculationServiceTest.cs (.../DesignWaterLevelCalculationServiceTest.cs) (revision 2a81f01756e227d5ce93717b21b87e8a5cd5fcbb) +++ Ringtoets/Common/test/Ringtoets.Common.Service.Test/DesignWaterLevelCalculationServiceTest.cs (.../DesignWaterLevelCalculationServiceTest.cs) (revision 2c4404936f53178d527072729e7af7f41fc9fe71) @@ -110,7 +110,14 @@ var mockRepository = new MockRepository(); var calculatorFactory = mockRepository.StrictMock(); - calculatorFactory.Expect(cf => cf.CreateDesignWaterLevelCalculator(testDataPath, validPreprocessorDirectory)).Return(calculator); + calculatorFactory.Expect(cf => cf.CreateDesignWaterLevelCalculator(Arg.Is.NotNull)) + .WhenCalled(invocation => + { + var settings = (HydraRingCalculationSettings)invocation.Arguments[0]; + Assert.AreEqual(validFilePath, settings.HlcdFilePath); + Assert.AreEqual(validPreprocessorDirectory, settings.PreprocessorDirectory); + }) + .Return(calculator); var calculationMessageProvider = mockRepository.StrictMock(); mockRepository.ReplayAll(); @@ -172,7 +179,14 @@ var mockRepository = new MockRepository(); var calculatorFactory = mockRepository.StrictMock(); - calculatorFactory.Expect(cf => cf.CreateDesignWaterLevelCalculator(testDataPath, preprocessorDirectory)).Return(calculator); + calculatorFactory.Expect(cf => cf.CreateDesignWaterLevelCalculator(Arg.Is.NotNull)) + .WhenCalled(invocation => + { + var settings = (HydraRingCalculationSettings)invocation.Arguments[0]; + Assert.AreEqual(validFilePath, settings.HlcdFilePath); + Assert.AreEqual(preprocessorDirectory, settings.PreprocessorDirectory); + }) + .Return(calculator); var calculationMessageProvider = mockRepository.StrictMock(); mockRepository.ReplayAll(); @@ -213,7 +227,14 @@ var mockRepository = new MockRepository(); var calculatorFactory = mockRepository.StrictMock(); - calculatorFactory.Expect(cf => cf.CreateDesignWaterLevelCalculator(testDataPath, validPreprocessorDirectory)).Return(calculator); + calculatorFactory.Expect(cf => cf.CreateDesignWaterLevelCalculator(Arg.Is.NotNull)) + .WhenCalled(invocation => + { + var settings = (HydraRingCalculationSettings)invocation.Arguments[0]; + Assert.AreEqual(validFilePath, settings.HlcdFilePath); + Assert.AreEqual(validPreprocessorDirectory, settings.PreprocessorDirectory); + }) + .Return(calculator); var calculationMessageProvider = mockRepository.StrictMock(); calculationMessageProvider.Expect(c => c.GetCalculatedNotConvergedMessage(locationName)).Return(failedConvergenceMessage); @@ -271,7 +292,14 @@ var mockRepository = new MockRepository(); var calculatorFactory = mockRepository.StrictMock(); - calculatorFactory.Expect(cf => cf.CreateDesignWaterLevelCalculator(testDataPath, validPreprocessorDirectory)).Return(calculator); + calculatorFactory.Expect(cf => cf.CreateDesignWaterLevelCalculator(Arg.Is.NotNull)) + .WhenCalled(invocation => + { + var settings = (HydraRingCalculationSettings)invocation.Arguments[0]; + Assert.AreEqual(validFilePath, settings.HlcdFilePath); + Assert.AreEqual(validPreprocessorDirectory, settings.PreprocessorDirectory); + }) + .Return(calculator); var calculationMessageProvider = mockRepository.StrictMock(); mockRepository.ReplayAll(); @@ -330,7 +358,14 @@ var mockRepository = new MockRepository(); var calculatorFactory = mockRepository.StrictMock(); - calculatorFactory.Expect(cf => cf.CreateDesignWaterLevelCalculator(testDataPath, validPreprocessorDirectory)).Return(calculator); + calculatorFactory.Expect(cf => cf.CreateDesignWaterLevelCalculator(Arg.Is.NotNull)) + .WhenCalled(invocation => + { + var settings = (HydraRingCalculationSettings)invocation.Arguments[0]; + Assert.AreEqual(validFilePath, settings.HlcdFilePath); + Assert.AreEqual(validPreprocessorDirectory, settings.PreprocessorDirectory); + }) + .Return(calculator); var calculationMessageProvider = mockRepository.StrictMock(); mockRepository.ReplayAll(); @@ -391,7 +426,14 @@ calculator.Stub(c => c.OutputDirectory).Return(string.Empty); var calculatorFactory = mockRepository.StrictMock(); - calculatorFactory.Expect(cf => cf.CreateDesignWaterLevelCalculator(testDataPath, validPreprocessorDirectory)).Return(calculator); + calculatorFactory.Expect(cf => cf.CreateDesignWaterLevelCalculator(Arg.Is.NotNull)) + .WhenCalled(invocation => + { + var settings = (HydraRingCalculationSettings)invocation.Arguments[0]; + Assert.AreEqual(validFilePath, settings.HlcdFilePath); + Assert.AreEqual(validPreprocessorDirectory, settings.PreprocessorDirectory); + }) + .Return(calculator); var calculationMessageProvider = mockRepository.Stub(); calculationMessageProvider.Stub(mp => mp.GetCalculatedNotConvergedMessage(locationName)).Return(string.Empty); @@ -429,7 +471,14 @@ }; var calculatorFactory = mockRepository.StrictMock(); - calculatorFactory.Expect(cf => cf.CreateDesignWaterLevelCalculator(testDataPath, validPreprocessorDirectory)).Return(calculator); + calculatorFactory.Expect(cf => cf.CreateDesignWaterLevelCalculator(Arg.Is.NotNull)) + .WhenCalled(invocation => + { + var settings = (HydraRingCalculationSettings)invocation.Arguments[0]; + Assert.AreEqual(validFilePath, settings.HlcdFilePath); + Assert.AreEqual(validPreprocessorDirectory, settings.PreprocessorDirectory); + }) + .Return(calculator); var calculationMessageProvider = mockRepository.Stub(); mockRepository.ReplayAll(); @@ -480,7 +529,14 @@ }; var calculatorFactory = mockRepository.StrictMock(); - calculatorFactory.Expect(cf => cf.CreateDesignWaterLevelCalculator(testDataPath, validPreprocessorDirectory)).Return(calculator); + calculatorFactory.Expect(cf => cf.CreateDesignWaterLevelCalculator(Arg.Is.NotNull)) + .WhenCalled(invocation => + { + var settings = (HydraRingCalculationSettings)invocation.Arguments[0]; + Assert.AreEqual(validFilePath, settings.HlcdFilePath); + Assert.AreEqual(validPreprocessorDirectory, settings.PreprocessorDirectory); + }) + .Return(calculator); var calculationMessageProvider = mockRepository.Stub(); mockRepository.ReplayAll(); @@ -519,7 +575,14 @@ var mockRepository = new MockRepository(); var calculatorFactory = mockRepository.StrictMock(); - calculatorFactory.Expect(cf => cf.CreateDesignWaterLevelCalculator(testDataPath, validPreprocessorDirectory)).Return(calculator); + calculatorFactory.Expect(cf => cf.CreateDesignWaterLevelCalculator(Arg.Is.NotNull)) + .WhenCalled(invocation => + { + var settings = (HydraRingCalculationSettings)invocation.Arguments[0]; + Assert.AreEqual(validFilePath, settings.HlcdFilePath); + Assert.AreEqual(validPreprocessorDirectory, settings.PreprocessorDirectory); + }) + .Return(calculator); var calculationMessageProvider = mockRepository.Stub(); mockRepository.ReplayAll(); @@ -564,7 +627,14 @@ var mockRepository = new MockRepository(); var calculatorFactory = mockRepository.StrictMock(); - calculatorFactory.Expect(cf => cf.CreateDesignWaterLevelCalculator(testDataPath, validPreprocessorDirectory)).Return(calculator); + calculatorFactory.Expect(cf => cf.CreateDesignWaterLevelCalculator(Arg.Is.NotNull)) + .WhenCalled(invocation => + { + var settings = (HydraRingCalculationSettings)invocation.Arguments[0]; + Assert.AreEqual(validFilePath, settings.HlcdFilePath); + Assert.AreEqual(validPreprocessorDirectory, settings.PreprocessorDirectory); + }) + .Return(calculator); var calculationMessageProvider = mockRepository.Stub(); if (endInFailure && string.IsNullOrEmpty(lastErrorFileContent)) Index: Ringtoets/Common/test/Ringtoets.Common.Service.Test/HydraulicBoundaryLocationCalculationActivityFactoryTest.cs =================================================================== diff -u -r2a81f01756e227d5ce93717b21b87e8a5cd5fcbb -r2c4404936f53178d527072729e7af7f41fc9fe71 --- Ringtoets/Common/test/Ringtoets.Common.Service.Test/HydraulicBoundaryLocationCalculationActivityFactoryTest.cs (.../HydraulicBoundaryLocationCalculationActivityFactoryTest.cs) (revision 2a81f01756e227d5ce93717b21b87e8a5cd5fcbb) +++ Ringtoets/Common/test/Ringtoets.Common.Service.Test/HydraulicBoundaryLocationCalculationActivityFactoryTest.cs (.../HydraulicBoundaryLocationCalculationActivityFactoryTest.cs) (revision 2c4404936f53178d527072729e7af7f41fc9fe71) @@ -32,6 +32,7 @@ using Ringtoets.Common.Data.Hydraulics; using Ringtoets.Common.Data.TestUtil; using Ringtoets.HydraRing.Calculation.Calculator.Factory; +using Ringtoets.HydraRing.Calculation.Data.Input; using Ringtoets.HydraRing.Calculation.Data.Input.Hydraulics; using Ringtoets.HydraRing.Calculation.TestUtil.Calculator; @@ -230,7 +231,15 @@ var mocks = new MockRepository(); var calculator = new TestDesignWaterLevelCalculator(); var calculatorFactory = mocks.StrictMock(); - calculatorFactory.Expect(cf => cf.CreateDesignWaterLevelCalculator(testDataPath, usePreprocessor ? validPreprocessorDirectory : "")).Return(calculator); + string preprocessorDirectory = usePreprocessor ? validPreprocessorDirectory : string.Empty; + calculatorFactory.Expect(cf => cf.CreateDesignWaterLevelCalculator(Arg.Is.NotNull)) + .WhenCalled(invocation => + { + var settings = (HydraRingCalculationSettings) invocation.Arguments[0]; + Assert.AreEqual(validFilePath, settings.HlcdFilePath); + Assert.AreEqual(preprocessorDirectory, settings.PreprocessorDirectory); + }) + .Return(calculator); mocks.ReplayAll(); using (new HydraRingCalculatorFactoryConfig(calculatorFactory)) Index: Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/TreeNodeInfos/DesignWaterLevelCalculationsContextTreeNodeInfoTest.cs =================================================================== diff -u -r445908a52db30fa7d97665d3282ab2459e26007f -r2c4404936f53178d527072729e7af7f41fc9fe71 --- Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/TreeNodeInfos/DesignWaterLevelCalculationsContextTreeNodeInfoTest.cs (.../DesignWaterLevelCalculationsContextTreeNodeInfoTest.cs) (revision 445908a52db30fa7d97665d3282ab2459e26007f) +++ Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/TreeNodeInfos/DesignWaterLevelCalculationsContextTreeNodeInfoTest.cs (.../DesignWaterLevelCalculationsContextTreeNodeInfoTest.cs) (revision 2c4404936f53178d527072729e7af7f41fc9fe71) @@ -44,6 +44,7 @@ using Ringtoets.Common.Forms.PresentationObjects; using Ringtoets.Common.Service.TestUtil; using Ringtoets.HydraRing.Calculation.Calculator.Factory; +using Ringtoets.HydraRing.Calculation.Data.Input; using Ringtoets.HydraRing.Calculation.Data.Input.Hydraulics; using Ringtoets.HydraRing.Calculation.TestUtil.Calculator; using Ringtoets.Integration.Data; @@ -57,7 +58,8 @@ private const int contextMenuRunAssessmentLevelCalculationsIndex = 2; private MockRepository mockRepository; - private readonly string testDataPath = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.Integration.Service, "HydraRingCalculation"); + private static readonly string testDataPath = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.Integration.Service, "HydraRingCalculation"); + private static readonly string validFilePath = Path.Combine(testDataPath, "HRD ijsselmeer.sqlite"); [Test] public void Initialized_Always_ExpectedPropertiesSet() @@ -394,7 +396,14 @@ var designWaterLevelCalculator = new TestDesignWaterLevelCalculator(); var calculatorFactory = mockRepository.Stub(); - calculatorFactory.Expect(cf => cf.CreateDesignWaterLevelCalculator(testDataPath, string.Empty)).Return(designWaterLevelCalculator); + calculatorFactory.Expect(cf => cf.CreateDesignWaterLevelCalculator(Arg.Is.NotNull)) + .WhenCalled(invocation => + { + var settings = (HydraRingCalculationSettings) invocation.Arguments[0]; + Assert.AreEqual(validFilePath, settings.HlcdFilePath); + Assert.IsEmpty(settings.PreprocessorDirectory); + }) + .Return(designWaterLevelCalculator); mockRepository.ReplayAll(); DialogBoxHandler = (name, wnd) => @@ -436,7 +445,7 @@ { HydraulicBoundaryDatabase = { - FilePath = Path.Combine(testDataPath, "HRD ijsselmeer.sqlite"), + FilePath = validFilePath, CanUsePreprocessor = true, UsePreprocessor = true, PreprocessorDirectory = preprocessorDirectory @@ -468,7 +477,14 @@ var designWaterLevelCalculator = new TestDesignWaterLevelCalculator(); var calculatorFactory = mockRepository.Stub(); - calculatorFactory.Expect(cf => cf.CreateDesignWaterLevelCalculator(testDataPath, preprocessorDirectory)).Return(designWaterLevelCalculator); + calculatorFactory.Expect(cf => cf.CreateDesignWaterLevelCalculator(Arg.Is.NotNull)) + .WhenCalled(invocation => + { + var settings = (HydraRingCalculationSettings) invocation.Arguments[0]; + Assert.AreEqual(validFilePath, settings.HlcdFilePath); + Assert.AreEqual(preprocessorDirectory, settings.PreprocessorDirectory); + }) + .Return(designWaterLevelCalculator); mockRepository.ReplayAll(); DialogBoxHandler = (name, wnd) => @@ -509,7 +525,7 @@ { HydraulicBoundaryDatabase = { - FilePath = Path.Combine(testDataPath, "HRD ijsselmeer.sqlite"), + FilePath = validFilePath, CanUsePreprocessor = true, UsePreprocessor = false, PreprocessorDirectory = "InvalidPreprocessorDirectory" @@ -541,7 +557,14 @@ var designWaterLevelCalculator = new TestDesignWaterLevelCalculator(); var calculatorFactory = mockRepository.Stub(); - calculatorFactory.Expect(cf => cf.CreateDesignWaterLevelCalculator(testDataPath, string.Empty)).Return(designWaterLevelCalculator); + calculatorFactory.Expect(cf => cf.CreateDesignWaterLevelCalculator(Arg.Is.NotNull)) + .WhenCalled(invocation => + { + var settings = (HydraRingCalculationSettings) invocation.Arguments[0]; + Assert.AreEqual(validFilePath, settings.HlcdFilePath); + Assert.IsEmpty(settings.PreprocessorDirectory); + }) + .Return(designWaterLevelCalculator); mockRepository.ReplayAll(); DialogBoxHandler = (name, wnd) => @@ -583,7 +606,7 @@ { HydraulicBoundaryDatabase = { - FilePath = Path.Combine(testDataPath, "HRD ijsselmeer.sqlite") + FilePath = validFilePath } }; @@ -614,7 +637,14 @@ Converged = false }; var calculatorFactory = mockRepository.Stub(); - calculatorFactory.Expect(cf => cf.CreateDesignWaterLevelCalculator(testDataPath, string.Empty)).Return(calculator); + calculatorFactory.Expect(cf => cf.CreateDesignWaterLevelCalculator(Arg.Is.NotNull)) + .WhenCalled(invocation => + { + var settings = (HydraRingCalculationSettings) invocation.Arguments[0]; + Assert.AreEqual(validFilePath, settings.HlcdFilePath); + Assert.IsEmpty(settings.PreprocessorDirectory); + }) + .Return(calculator); mockRepository.ReplayAll(); DialogBoxHandler = (name, wnd) => Index: Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/TreeNodeInfos/DesignWaterLevelCalculationsGroupContextTreeNodeInfoTest.cs =================================================================== diff -u -r445908a52db30fa7d97665d3282ab2459e26007f -r2c4404936f53178d527072729e7af7f41fc9fe71 --- Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/TreeNodeInfos/DesignWaterLevelCalculationsGroupContextTreeNodeInfoTest.cs (.../DesignWaterLevelCalculationsGroupContextTreeNodeInfoTest.cs) (revision 445908a52db30fa7d97665d3282ab2459e26007f) +++ Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/TreeNodeInfos/DesignWaterLevelCalculationsGroupContextTreeNodeInfoTest.cs (.../DesignWaterLevelCalculationsGroupContextTreeNodeInfoTest.cs) (revision 2c4404936f53178d527072729e7af7f41fc9fe71) @@ -44,6 +44,7 @@ using Ringtoets.Common.Plugin.TestUtil; using Ringtoets.HydraRing.Calculation.Calculator; using Ringtoets.HydraRing.Calculation.Calculator.Factory; +using Ringtoets.HydraRing.Calculation.Data.Input; using Ringtoets.HydraRing.Calculation.TestUtil.Calculator; using RingtoetsCommonFormsResources = Ringtoets.Common.Forms.Properties.Resources; @@ -324,7 +325,16 @@ Converged = false }; var calculatorFactory = mockRepository.Stub(); - calculatorFactory.Expect(cf => cf.CreateDesignWaterLevelCalculator(testDataPath, string.Empty)).Return(designWaterLevelCalculator).Repeat.Times(4); + calculatorFactory.Expect(cf => cf.CreateDesignWaterLevelCalculator(Arg.Is.NotNull)) + .WhenCalled(invocation => + { + var settings = (HydraRingCalculationSettings)invocation.Arguments[0]; + Assert.AreEqual(assessmentSection.HydraulicBoundaryDatabase.FilePath, settings.HlcdFilePath); + Assert.IsEmpty(settings.PreprocessorDirectory); + }) + .Return(designWaterLevelCalculator) + .Repeat + .Times(4); mockRepository.ReplayAll(); DialogBoxHandler = (name, wnd) => Index: Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/TreeNodeInfos/HydraulicBoundaryDatabaseContextTreeNodeInfoTest.cs =================================================================== diff -u -r2b7a4d261a11c943ea0f0081d45edea6252887cc -r2c4404936f53178d527072729e7af7f41fc9fe71 --- Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/TreeNodeInfos/HydraulicBoundaryDatabaseContextTreeNodeInfoTest.cs (.../HydraulicBoundaryDatabaseContextTreeNodeInfoTest.cs) (revision 2b7a4d261a11c943ea0f0081d45edea6252887cc) +++ Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/TreeNodeInfos/HydraulicBoundaryDatabaseContextTreeNodeInfoTest.cs (.../HydraulicBoundaryDatabaseContextTreeNodeInfoTest.cs) (revision 2c4404936f53178d527072729e7af7f41fc9fe71) @@ -46,6 +46,7 @@ using Ringtoets.Common.Plugin.TestUtil; using Ringtoets.GrassCoverErosionOutwards.Data; using Ringtoets.HydraRing.Calculation.Calculator.Factory; +using Ringtoets.HydraRing.Calculation.Data.Input; using Ringtoets.HydraRing.Calculation.TestUtil.Calculator; using Ringtoets.Integration.Data; using Ringtoets.Integration.Forms.PresentationObjects; @@ -799,11 +800,12 @@ public void GivenValidCalculations_WhenCalculatingAllFromContextMenu_ThenAllCalculationsScheduled() { // Given + string validFilePath = Path.Combine(testDataPath, "HRD dutch coast south.sqlite"); var assessmentSection = new AssessmentSection(AssessmentSectionComposition.Dike) { HydraulicBoundaryDatabase = { - FilePath = Path.Combine(testDataPath, "HRD dutch coast south.sqlite") + FilePath = validFilePath } }; @@ -836,7 +838,16 @@ Converged = false }; - calculatorFactory.Expect(cf => cf.CreateDesignWaterLevelCalculator(testDataPath, string.Empty)).Return(designWaterLevelCalculator).Repeat.Times(4); + calculatorFactory.Expect(cf => cf.CreateDesignWaterLevelCalculator(Arg.Is.NotNull)) + .WhenCalled(invocation => + { + var settings = (HydraRingCalculationSettings)invocation.Arguments[0]; + Assert.AreEqual(validFilePath, settings.HlcdFilePath); + Assert.IsEmpty(settings.PreprocessorDirectory); + }) + .Return(designWaterLevelCalculator) + .Repeat + .Times(4); calculatorFactory.Expect(cf => cf.CreateWaveHeightCalculator(testDataPath, string.Empty)).Return(waveHeightCalculator).Repeat.Times(4); mocks.ReplayAll();