Index: Riskeer/Integration/test/Riskeer.Integration.IO.Test/Importers/HydraulicLocationConfigurationDatabaseImporterTest.cs =================================================================== diff -u -r6aca1cbb9a75096f8b1fbf60e041cabcbfd78717 -r49405bb333ea149691f282e4d937ef4caf330394 --- Riskeer/Integration/test/Riskeer.Integration.IO.Test/Importers/HydraulicLocationConfigurationDatabaseImporterTest.cs (.../HydraulicLocationConfigurationDatabaseImporterTest.cs) (revision 6aca1cbb9a75096f8b1fbf60e041cabcbfd78717) +++ Riskeer/Integration/test/Riskeer.Integration.IO.Test/Importers/HydraulicLocationConfigurationDatabaseImporterTest.cs (.../HydraulicLocationConfigurationDatabaseImporterTest.cs) (revision 49405bb333ea149691f282e4d937ef4caf330394) @@ -126,58 +126,6 @@ } [Test] - public void Import_HrdInvalidSchema_CancelImportWithErrorMessage() - { - // Setup - var mocks = new MockRepository(); - var handler = mocks.StrictMock(); - handler.Stub(h => h.InquireConfirmation()).Return(true); - mocks.ReplayAll(); - - string path = Path.Combine(testDataPath, "CorruptHrd"); - - HydraulicBoundaryData hydraulicBoundaryData = CreateHydraulicBoundaryData(Path.Combine(path, "corruptschema.sqlite")); - - var importer = new HydraulicLocationConfigurationDatabaseImporter(new HydraulicLocationConfigurationSettings(), handler, - hydraulicBoundaryData, Path.Combine(path, "HLCD.sqlite")); - - // Call - var importSuccessful = true; - void Call() => importSuccessful = importer.Import(); - - // Assert - var expectedMessage = $"Fout bij het lezen van bestand '{hydraulicBoundaryData.FilePath}': kritieke fout opgetreden bij het uitlezen van waardes uit kolommen in de database."; - AssertImportFailed(Call, expectedMessage, ref importSuccessful); - mocks.VerifyAll(); - } - - [Test] - public void Import_HrdEmptySchema_CancelImportWithErrorMessage() - { - // Setup - var mocks = new MockRepository(); - var handler = mocks.StrictMock(); - handler.Stub(h => h.InquireConfirmation()).Return(true); - mocks.ReplayAll(); - - string path = Path.Combine(testDataPath, "EmptyHrd"); - - HydraulicBoundaryData hydraulicBoundaryData = CreateHydraulicBoundaryData(Path.Combine(path, "empty.sqlite")); - - var importer = new HydraulicLocationConfigurationDatabaseImporter(new HydraulicLocationConfigurationSettings(), handler, - hydraulicBoundaryData, Path.Combine(path, "HLCD.sqlite")); - - // Call - var importSuccessful = true; - void Call() => importSuccessful = importer.Import(); - - // Assert - var expectedMessage = $"Fout bij het lezen van bestand '{hydraulicBoundaryData.FilePath}': kon geen locaties verkrijgen van de database."; - AssertImportFailed(Call, expectedMessage, ref importSuccessful); - mocks.VerifyAll(); - } - - [Test] public void Import_EmptySchema_CancelImportWithErrorMessage() { // Setup @@ -289,7 +237,7 @@ public void Import_HlcdWithUsePreprocessorClosureTrueAndWithoutPreprocessorClosureDatabase_CancelImportWithErrorMessage() { // Setup - string directory = Path.Combine(testDataPath, "missingPreprocessorClosure"); + string directory = Path.Combine(testDataPath, "MissingPreprocessorClosureDatabase"); string filePath = Path.Combine(directory, "newHlcd.sqlite"); HydraulicBoundaryData hydraulicBoundaryData = CreateHydraulicBoundaryData(Path.Combine(directory, "completeHrd.sqlite")); @@ -549,14 +497,17 @@ { var hydraulicBoundaryData = new HydraulicBoundaryData { - HydraulicBoundaryDatabases = { new HydraulicBoundaryDatabase() }, + HydraulicBoundaryDatabases = + { + new HydraulicBoundaryDatabase() + }, FilePath = filePath }; hydraulicBoundaryData.HydraulicLocationConfigurationSettings.SetValues(filePath, "scenarioName", 2022, "scope", false, "seaLevel", "riverDischarge", "lakeLevel", "windDirection", "windSpeed", "comment"); - + return hydraulicBoundaryData; } Index: Riskeer/Integration/test/Riskeer.Integration.IO.Test/test-data/HydraulicLocationConfigurationDatabaseImporter/CorruptHrd/HLCD.sqlite =================================================================== diff -u -rbf1fde9d2147a6eeaecebbb371be2c4856759159 -r49405bb333ea149691f282e4d937ef4caf330394 Binary files differ Index: Riskeer/Integration/test/Riskeer.Integration.IO.Test/test-data/HydraulicLocationConfigurationDatabaseImporter/CorruptHrd/corruptschema.sqlite =================================================================== diff -u -rbf1fde9d2147a6eeaecebbb371be2c4856759159 -r49405bb333ea149691f282e4d937ef4caf330394 Binary files differ Index: Riskeer/Integration/test/Riskeer.Integration.IO.Test/test-data/HydraulicLocationConfigurationDatabaseImporter/EmptyHrd/HLCD.sqlite =================================================================== diff -u -rbf1fde9d2147a6eeaecebbb371be2c4856759159 -r49405bb333ea149691f282e4d937ef4caf330394 Binary files differ Index: Riskeer/Integration/test/Riskeer.Integration.IO.Test/test-data/HydraulicLocationConfigurationDatabaseImporter/EmptyHrd/empty.sqlite =================================================================== diff -u -rbf1fde9d2147a6eeaecebbb371be2c4856759159 -r49405bb333ea149691f282e4d937ef4caf330394 Binary files differ Index: Riskeer/Integration/test/Riskeer.Integration.IO.Test/test-data/HydraulicLocationConfigurationDatabaseImporter/MissingPreprocessorClosureDatabase/HLCD.sqlite =================================================================== diff -u Binary files differ Index: Riskeer/Integration/test/Riskeer.Integration.IO.Test/test-data/HydraulicLocationConfigurationDatabaseImporter/MissingPreprocessorClosureDatabase/completeHrd.config.sqlite =================================================================== diff -u Binary files differ Index: Riskeer/Integration/test/Riskeer.Integration.IO.Test/test-data/HydraulicLocationConfigurationDatabaseImporter/MissingPreprocessorClosureDatabase/completeHrd.sqlite =================================================================== diff -u Binary files differ Index: Riskeer/Integration/test/Riskeer.Integration.IO.Test/test-data/HydraulicLocationConfigurationDatabaseImporter/MissingPreprocessorClosureDatabase/newHlcd.sqlite =================================================================== diff -u Binary files differ Index: Riskeer/Integration/test/Riskeer.Integration.IO.Test/test-data/HydraulicLocationConfigurationDatabaseImporter/missingPreprocessorClosure/HLCD.sqlite =================================================================== diff -u -r0ff4c64cf3875c1cb50eeacf5aabd2e84957a92f -r49405bb333ea149691f282e4d937ef4caf330394 Binary files differ Index: Riskeer/Integration/test/Riskeer.Integration.IO.Test/test-data/HydraulicLocationConfigurationDatabaseImporter/missingPreprocessorClosure/completeHrd.config.sqlite =================================================================== diff -u -r0ff4c64cf3875c1cb50eeacf5aabd2e84957a92f -r49405bb333ea149691f282e4d937ef4caf330394 Binary files differ Index: Riskeer/Integration/test/Riskeer.Integration.IO.Test/test-data/HydraulicLocationConfigurationDatabaseImporter/missingPreprocessorClosure/completeHrd.sqlite =================================================================== diff -u -r0ff4c64cf3875c1cb50eeacf5aabd2e84957a92f -r49405bb333ea149691f282e4d937ef4caf330394 Binary files differ Index: Riskeer/Integration/test/Riskeer.Integration.IO.Test/test-data/HydraulicLocationConfigurationDatabaseImporter/missingPreprocessorClosure/newHlcd.sqlite =================================================================== diff -u -r0ff4c64cf3875c1cb50eeacf5aabd2e84957a92f -r49405bb333ea149691f282e4d937ef4caf330394 Binary files differ