Index: Riskeer/Integration/src/Riskeer.Integration.IO/Importers/HydraulicBoundaryDatabaseImporter.cs =================================================================== diff -u -rb883e55c8a4b11cc20616910385f283e73661af9 -r6038702edc6ecc5a2dd82a9380c1829948c023e9 --- Riskeer/Integration/src/Riskeer.Integration.IO/Importers/HydraulicBoundaryDatabaseImporter.cs (.../HydraulicBoundaryDatabaseImporter.cs) (revision b883e55c8a4b11cc20616910385f283e73661af9) +++ Riskeer/Integration/src/Riskeer.Integration.IO/Importers/HydraulicBoundaryDatabaseImporter.cs (.../HydraulicBoundaryDatabaseImporter.cs) (revision 6038702edc6ecc5a2dd82a9380c1829948c023e9) @@ -92,13 +92,6 @@ ReadHydraulicLocationConfigurationDatabase readHydraulicLocationConfigurationDatabase = readHydraulicLocationConfigurationDatabaseResult.Items.Single(); - bool usePreprocessorClosure = readHydraulicLocationConfigurationDatabase.ReadTracks.First(rt => rt.TrackId == readHydraulicBoundaryDatabase.TrackId).UsePreprocessorClosure; - if (usePreprocessorClosure && !File.Exists(HydraulicBoundaryDataHelper.GetPreprocessorClosureFilePath(hlcdFilePath))) - { - Log.Error(BuildErrorMessage(hlcdFilePath, Resources.HydraulicBoundaryDatabaseImporter_PreprocessorClosure_sqlite_Not_Found)); - return false; - } - ReadResult> readExcludedLocationsResult = ReadExcludedLocations(); if (readExcludedLocationsResult.CriticalErrorOccurred || Canceled) @@ -111,7 +104,7 @@ return true; } - + protected override void LogImportCanceledMessage() { Log.Info(Resources.HydraulicBoundaryDatabaseImporter_ProgressText_Import_canceled_No_data_changed); @@ -154,7 +147,7 @@ private ReadHydraulicBoundaryDatabase TryReadHydraulicBoundaryDatabase() { NotifyProgress(Resources.HydraulicBoundaryDatabaseImporter_ProgressText_Reading_Hrd_file, 1, numberOfSteps); - + ReadResult readHydraulicBoundaryDatabaseResult; try @@ -174,7 +167,7 @@ { readHydraulicBoundaryDatabaseResult = HandleCriticalFileReadError(e); } - + if (readHydraulicBoundaryDatabaseResult.CriticalErrorOccurred || Canceled) { return null; Index: Riskeer/Integration/test/Riskeer.Integration.IO.Test/Importers/HydraulicBoundaryDatabaseImporterTest.cs =================================================================== diff -u -r1c33828255f3af61e2255936f0fd80963bc21a52 -r6038702edc6ecc5a2dd82a9380c1829948c023e9 --- Riskeer/Integration/test/Riskeer.Integration.IO.Test/Importers/HydraulicBoundaryDatabaseImporterTest.cs (.../HydraulicBoundaryDatabaseImporterTest.cs) (revision 1c33828255f3af61e2255936f0fd80963bc21a52) +++ Riskeer/Integration/test/Riskeer.Integration.IO.Test/Importers/HydraulicBoundaryDatabaseImporterTest.cs (.../HydraulicBoundaryDatabaseImporterTest.cs) (revision 6038702edc6ecc5a2dd82a9380c1829948c023e9) @@ -354,37 +354,6 @@ } [Test] - public void Import_ExistingFileAndHlcdWithUsePreprocessorClosureTrueAndWithoutPreprocessorClosureDatabase_CancelImportWithErrorMessage() - { - // Setup - var mocks = new MockRepository(); - var handler = mocks.StrictMock(); - mocks.ReplayAll(); - - string path = Path.Combine(testDataPath, "missingPreprocessorClosure", "complete.sqlite"); - string hlcdFilePath = Path.Combine(Path.GetDirectoryName(path), "hlcd.sqlite"); - - var hydraulicBoundaryData = new HydraulicBoundaryData - { - HydraulicLocationConfigurationDatabase = - { - FilePath = hlcdFilePath - } - }; - - var importer = new HydraulicBoundaryDatabaseImporter(hydraulicBoundaryData, handler, path); - - // Call - var importSuccessful = true; - void Call() => importSuccessful = importer.Import(); - - // Assert - var expectedMessage = $"Fout bij het lezen van bestand '{hlcdFilePath}': het bijbehorende preprocessor closure bestand is niet gevonden in dezelfde map als het HLCD bestand."; - AssertImportFailed(Call, expectedMessage, ref importSuccessful); - mocks.VerifyAll(); - } - - [Test] [TestCaseSource(nameof(GetValidFiles))] public void Import_WithValidFileAndHlcdWithoutScenarioInformation_UpdatesHydraulicBoundaryDatabaseWithImportedData( string filePath, bool usePreprocessorClosure) Index: Riskeer/Integration/test/Riskeer.Integration.IO.Test/test-data/HydraulicBoundaryDatabaseImporter/withoutPreprocessorClosure/HLCD.sqlite =================================================================== diff -u -rbe2039934e8fb442effc0150a1900f2175ec6a03 -r6038702edc6ecc5a2dd82a9380c1829948c023e9 Binary files differ Index: Riskeer/Integration/test/Riskeer.Integration.IO.Test/test-data/HydraulicBoundaryDatabaseImporter/withoutPreprocessorClosure/complete.config.sqlite =================================================================== diff -u -rbe2039934e8fb442effc0150a1900f2175ec6a03 -r6038702edc6ecc5a2dd82a9380c1829948c023e9 Binary files differ Index: Riskeer/Integration/test/Riskeer.Integration.IO.Test/test-data/HydraulicBoundaryDatabaseImporter/withoutPreprocessorClosure/complete.sqlite =================================================================== diff -u -rbe2039934e8fb442effc0150a1900f2175ec6a03 -r6038702edc6ecc5a2dd82a9380c1829948c023e9 Binary files differ