Index: Riskeer/Integration/src/Riskeer.Integration.IO/Importers/HydraulicLocationConfigurationDatabaseImporter.cs =================================================================== diff -u -rf5480982e877e22b553eef7e5cc253d4dc25e4ca -rd0cc97885ac7ea81d24d9890c493772c28bf773c --- Riskeer/Integration/src/Riskeer.Integration.IO/Importers/HydraulicLocationConfigurationDatabaseImporter.cs (.../HydraulicLocationConfigurationDatabaseImporter.cs) (revision f5480982e877e22b553eef7e5cc253d4dc25e4ca) +++ Riskeer/Integration/src/Riskeer.Integration.IO/Importers/HydraulicLocationConfigurationDatabaseImporter.cs (.../HydraulicLocationConfigurationDatabaseImporter.cs) (revision d0cc97885ac7ea81d24d9890c493772c28bf773c) @@ -107,8 +107,8 @@ return false; } - if (readHydraulicLocationConfigurationDatabase.ReadTracks.Any(rt => rt.UsePreprocessorClosure) - && !File.Exists(HydraulicBoundaryDataHelper.GetPreprocessorClosureFilePath(FilePath))) + bool usePreprocessorClosure = readHydraulicLocationConfigurationDatabase.ReadTracks.Any(rt => rt.UsePreprocessorClosure); + if (usePreprocessorClosure && !File.Exists(HydraulicBoundaryDataHelper.GetPreprocessorClosureFilePath(FilePath))) { Log.Error(BuildErrorMessage(FilePath, Resources.HydraulicBoundaryDataImporter_PreprocessorClosure_sqlite_Not_Found)); return false; @@ -126,7 +126,7 @@ AddHydraulicLocationConfigurationSettingsToDataModel( readHydraulicLocationConfigurationDatabase.ReadHydraulicLocationConfigurationDatabaseSettings?.Single(), - false); + usePreprocessorClosure); return true; } Index: Riskeer/Integration/test/Riskeer.Integration.IO.Test/Importers/HydraulicLocationConfigurationDatabaseImporterTest.cs =================================================================== diff -u -rf5480982e877e22b553eef7e5cc253d4dc25e4ca -rd0cc97885ac7ea81d24d9890c493772c28bf773c --- Riskeer/Integration/test/Riskeer.Integration.IO.Test/Importers/HydraulicLocationConfigurationDatabaseImporterTest.cs (.../HydraulicLocationConfigurationDatabaseImporterTest.cs) (revision f5480982e877e22b553eef7e5cc253d4dc25e4ca) +++ Riskeer/Integration/test/Riskeer.Integration.IO.Test/Importers/HydraulicLocationConfigurationDatabaseImporterTest.cs (.../HydraulicLocationConfigurationDatabaseImporterTest.cs) (revision d0cc97885ac7ea81d24d9890c493772c28bf773c) @@ -292,9 +292,7 @@ } [Test] - [TestCase(1)] - [TestCase(2)] - public void Import_CancelOfImportWhilePerformingStep_CancelsImportAndLogs(int stepNumber) + public void Import_CancelOfImportWhilePerformingStep_CancelsImportAndLogs() { // Setup var mocks = new MockRepository(); @@ -307,11 +305,8 @@ var importer = new HydraulicLocationConfigurationDatabaseImporter(new HydraulicLocationConfigurationSettings(), handler, hydraulicBoundaryData, validHlcdFilePath); importer.SetProgressChanged((description, currentStep, steps) => - { - if (currentStep == stepNumber) - { - importer.Cancel(); - } + { + importer.Cancel(); }); // Call