Index: Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Forms.Test/TreeNodeInfos/ClosingStructureFailureMechanismContextTreeNodeInfoTest.cs =================================================================== diff -u -r2d8a7d9f1185dbfb67f08aadf63f2aadbcfd0c1f -r64eede81657b51fb755944fd3939ceefb839e591 --- Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Forms.Test/TreeNodeInfos/ClosingStructureFailureMechanismContextTreeNodeInfoTest.cs (.../ClosingStructureFailureMechanismContextTreeNodeInfoTest.cs) (revision 2d8a7d9f1185dbfb67f08aadf63f2aadbcfd0c1f) +++ Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Forms.Test/TreeNodeInfos/ClosingStructureFailureMechanismContextTreeNodeInfoTest.cs (.../ClosingStructureFailureMechanismContextTreeNodeInfoTest.cs) (revision 64eede81657b51fb755944fd3939ceefb839e591) @@ -62,7 +62,7 @@ private const int contextMenuCalculateAllIndex = 3; private const int contextMenuClearAllIndex = 4; - private readonly string testDataPath = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.HydraRing.IO, "HydraulicBoundaryLocationReader"); + private readonly string testDataPath = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.Common.IO, "HydraulicBoundaryDatabaseImporter"); private MockRepository mocksRepository; private ClosingStructuresPlugin plugin; Index: Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Forms.Test/TreeNodeInfos/ClosingStructuresCalculationContextTreeNodeInfoTest.cs =================================================================== diff -u -rc0bbd9451c1d41d33ed7623903930188053f0b45 -r64eede81657b51fb755944fd3939ceefb839e591 --- Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Forms.Test/TreeNodeInfos/ClosingStructuresCalculationContextTreeNodeInfoTest.cs (.../ClosingStructuresCalculationContextTreeNodeInfoTest.cs) (revision c0bbd9451c1d41d33ed7623903930188053f0b45) +++ Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Forms.Test/TreeNodeInfos/ClosingStructuresCalculationContextTreeNodeInfoTest.cs (.../ClosingStructuresCalculationContextTreeNodeInfoTest.cs) (revision 64eede81657b51fb755944fd3939ceefb839e591) @@ -60,7 +60,7 @@ private const int contextMenuValidateIndex = 0; private const int contextMenuCalculateIndex = 1; private const int contextMenuClearIndex = 2; - private readonly string testDataPath = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.HydraRing.IO, "HydraulicBoundaryLocationReader"); + private readonly string testDataPath = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.Common.IO, "HydraulicBoundaryDatabaseImporter"); private IGui guiMock; private TreeNodeInfo info; Index: Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Forms.Test/TreeNodeInfos/ClosingStructuresCalculationGroupContextTreeNodeInfoTest.cs =================================================================== diff -u -r2d8a7d9f1185dbfb67f08aadf63f2aadbcfd0c1f -r64eede81657b51fb755944fd3939ceefb839e591 --- Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Forms.Test/TreeNodeInfos/ClosingStructuresCalculationGroupContextTreeNodeInfoTest.cs (.../ClosingStructuresCalculationGroupContextTreeNodeInfoTest.cs) (revision 2d8a7d9f1185dbfb67f08aadf63f2aadbcfd0c1f) +++ Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Forms.Test/TreeNodeInfos/ClosingStructuresCalculationGroupContextTreeNodeInfoTest.cs (.../ClosingStructuresCalculationGroupContextTreeNodeInfoTest.cs) (revision 64eede81657b51fb755944fd3939ceefb839e591) @@ -68,7 +68,7 @@ private const int contextMenuCalculateAllIndexNestedGroup = 4; private const int contextMenuClearAllIndexNestedGroup = 5; - private readonly string testDataPath = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.HydraRing.IO, "HydraulicBoundaryLocationReader"); + private readonly string testDataPath = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.Common.IO, "HydraulicBoundaryDatabaseImporter"); private IGui guiMock; private TreeNodeInfo info; Index: Ringtoets/Common/src/Ringtoets.Common.IO/HydraRing/HydraRingSettingsDatabaseReader.cs =================================================================== diff -u -r382a89069b631e11752a6fabf9b80b9274c8503e -r64eede81657b51fb755944fd3939ceefb839e591 --- Ringtoets/Common/src/Ringtoets.Common.IO/HydraRing/HydraRingSettingsDatabaseReader.cs (.../HydraRingSettingsDatabaseReader.cs) (revision 382a89069b631e11752a6fabf9b80b9274c8503e) +++ Ringtoets/Common/src/Ringtoets.Common.IO/HydraRing/HydraRingSettingsDatabaseReader.cs (.../HydraRingSettingsDatabaseReader.cs) (revision 64eede81657b51fb755944fd3939ceefb839e591) @@ -227,7 +227,7 @@ if (!ContainsRequiredTables(GetColumnDefinitions(Connection))) { CloseConnection(); - throw new CriticalFileReadException("De rekeninstellingen database heeft niet het juiste schema."); + throw new CriticalFileReadException(Resources.HydraRingSettingsDatabaseReader_ValidateSchema_Hydraulic_calculation_settings_database_has_invalid_schema); } } @@ -342,10 +342,11 @@ for (int i = 0; i < columns.Rows.Count; i++) { var dataRow = columns.Rows[i]; - definitions.Add(Tuple.Create( - ((string) dataRow["TABLE_NAME"]).ToLower(), - ((string) dataRow["COLUMN_NAME"]).ToLower() - )); + definitions.Add( + Tuple.Create( + ((string) dataRow["TABLE_NAME"]).ToLower(), + ((string) dataRow["COLUMN_NAME"]).ToLower() + )); } return definitions; } Index: Ringtoets/Common/src/Ringtoets.Common.IO/Properties/Resources.Designer.cs =================================================================== diff -u -r382a89069b631e11752a6fabf9b80b9274c8503e -r64eede81657b51fb755944fd3939ceefb839e591 --- Ringtoets/Common/src/Ringtoets.Common.IO/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision 382a89069b631e11752a6fabf9b80b9274c8503e) +++ Ringtoets/Common/src/Ringtoets.Common.IO/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision 64eede81657b51fb755944fd3939ceefb839e591) @@ -1,25 +1,4 @@ -// Copyright (C) Stichting Deltares 2016. All rights reserved. -// -// This file is part of Ringtoets. -// -// Ringtoets is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . -// -// All names, logos, and references to "Deltares" are registered trademarks of -// Stichting Deltares and remain full property of Stichting Deltares at all times. -// All rights reserved. - -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // // This code was generated by a tool. // Runtime Version:4.0.30319.42000 @@ -528,6 +507,16 @@ } /// + /// Looks up a localized string similar to De rekeninstellingen database heeft niet het juiste schema.. + /// + public static string HydraRingSettingsDatabaseReader_ValidateSchema_Hydraulic_calculation_settings_database_has_invalid_schema { + get { + return ResourceManager.GetString("HydraRingSettingsDatabaseReader_ValidateSchema_Hydraulic_calculation_settings_dat" + + "abase_has_invalid_schema", resourceCulture); + } + } + + /// /// Looks up a localized string similar to Kon het rekeninstellingen bestand niet openen. {0}. /// public static string HydraulicBoundaryDatabaseImporter_Cannot_open_hydaulic_calculation_settings_file_0_ { @@ -968,15 +957,14 @@ /// /// Looks up a localized string similar to BEGIN TRANSACTION; - ///CREATE TABLE TimeIntegrationSettings (LocationID INTEGER NOT NULL, CalculationTypeID INTEGER NOT NULL REFERENCES CalculationTypes (CalculationTypeID) ON UPDATE CASCADE, TimeIntegrationSchemeID INTEGER NOT NULL); - ///CREATE TABLE "NumericsSettings" ( - /// `LocationID` INTEGER NOT NULL, - /// `MechanismID` INTEGER NOT NULL, - /// `SubMechanismID` INTEGER NOT NULL, - /// `CalculationMethod` INTEGER NOT NULL, - /// `FORM_StartMethod` INTEGER NOT NULL, - /// `FORM_NIterations` INTEGER NOT NULL, - /// `FORM_RelaxationFactor` REAL N [rest of string was truncated]";. + ///CREATE TABLE "TimeIntegrationSettings" ( + /// "LocationID" INTEGER NOT NULL, + /// "CalculationTypeID" INTEGER NOT NULL, + /// "TimeIntegrationSchemeID" INTEGER NOT NULL, + /// CONSTRAINT timeintegrationsettings_pk PRIMARY KEY ("LocationID", "CalculationTypeID"), + /// CONSTRAINT calculationtypes_timeintegrationsettings_fk FOREIGN KEY ("CalculationTypeID") REFERENCES CalculationTypes ("CalculationTypeID") ON DELETE NO ACTION ON UPDATE NO ACTION + ///); + ///CREATE TABLE "Numeri [rest of string was truncated]";. /// public static string settings_schema { get { Index: Ringtoets/Common/src/Ringtoets.Common.IO/Properties/Resources.resx =================================================================== diff -u -r382a89069b631e11752a6fabf9b80b9274c8503e -r64eede81657b51fb755944fd3939ceefb839e591 --- Ringtoets/Common/src/Ringtoets.Common.IO/Properties/Resources.resx (.../Resources.resx) (revision 382a89069b631e11752a6fabf9b80b9274c8503e) +++ Ringtoets/Common/src/Ringtoets.Common.IO/Properties/Resources.resx (.../Resources.resx) (revision 64eede81657b51fb755944fd3939ceefb839e591) @@ -491,4 +491,7 @@ Kon het rekeninstellingen bestand niet openen. {0} + + De rekeninstellingen database heeft niet het juiste schema. + \ No newline at end of file Index: Ringtoets/Common/test/Ringtoets.Common.IO.Test/FileImporters/HydraulicBoundaryDatabaseImporterTest.cs =================================================================== diff -u -rf27092df1f897798c4a0b24f6fc91f49c9f294ce -r64eede81657b51fb755944fd3939ceefb839e591 --- Ringtoets/Common/test/Ringtoets.Common.IO.Test/FileImporters/HydraulicBoundaryDatabaseImporterTest.cs (.../HydraulicBoundaryDatabaseImporterTest.cs) (revision f27092df1f897798c4a0b24f6fc91f49c9f294ce) +++ Ringtoets/Common/test/Ringtoets.Common.IO.Test/FileImporters/HydraulicBoundaryDatabaseImporterTest.cs (.../HydraulicBoundaryDatabaseImporterTest.cs) (revision 64eede81657b51fb755944fd3939ceefb839e591) @@ -30,6 +30,7 @@ using Rhino.Mocks; using Ringtoets.Common.Data.AssessmentSection; using Ringtoets.Common.IO.FileImporters; +using Ringtoets.Common.IO.HydraRing; using Ringtoets.HydraRing.Data; using UtilsResources = Core.Common.Utils.Properties.Resources; @@ -38,7 +39,7 @@ [TestFixture] public class HydraulicBoundaryDatabaseImporterTest { - private readonly string testDataPath = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.HydraRing.IO, "HydraulicBoundaryLocationReader"); + private readonly string testDataPath = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.Common.IO, "HydraulicBoundaryDatabaseImporter"); private HydraulicBoundaryDatabaseImporter importer; [SetUp] @@ -177,6 +178,53 @@ } [Test] + public void Import_ExistingFileWithoutSettings_ThrowCriticalFileReadException() + { + // Setup + var mocks = new MockRepository(); + var assessmentSection = mocks.Stub(); + assessmentSection.Expect(section => section.NotifyObservers()).Repeat.Never(); + mocks.ReplayAll(); + + string validFilePath = Path.Combine(testDataPath, "withoutSettings", "complete.sqlite"); + + // Call + TestDelegate test = () => importer.Import(assessmentSection, validFilePath); + + // Assert + string expectedMessage = new FileReaderErrorMessageBuilder(validFilePath).Build(string.Format( + "Kon het rekeninstellingen bestand niet openen. Fout bij het lezen van bestand '{0}': Het bestand bestaat niet.", + HydraulicDatabaseHelper.GetHydraulicBoundarySettingsDatabase(validFilePath))); + CriticalFileReadException exception = Assert.Throws(test); + Assert.AreEqual(expectedMessage, exception.Message); + + mocks.VerifyAll(); + } + + [Test] + public void Import_ExistingFileWithInvalidSettingsDatabaseSchema_ThrowCriticalFileReadException() + { + // Setup + var mocks = new MockRepository(); + var assessmentSection = mocks.Stub(); + assessmentSection.Expect(section => section.NotifyObservers()).Repeat.Never(); + mocks.ReplayAll(); + + string validFilePath = Path.Combine(testDataPath, "invalidSettingsSchema", "complete.sqlite"); + + // Call + TestDelegate test = () => importer.Import(assessmentSection, validFilePath); + + // Assert + string expectedMessage = new FileReaderErrorMessageBuilder(validFilePath).Build( + "Kon het rekeninstellingen bestand niet openen. De rekeninstellingen database heeft niet het juiste schema."); + CriticalFileReadException exception = Assert.Throws(test); + Assert.AreEqual(expectedMessage, exception.Message); + + mocks.VerifyAll(); + } + + [Test] public void Import_ImportingToValidTargetWithValidFile_ImportHydraulicBoundaryLocationsToCollectionAndAssessmentSectionNotified() { // Setup Index: Ringtoets/Common/test/Ringtoets.Common.IO.Test/HydraRing/HydraulicDatabaseHelperTest.cs =================================================================== diff -u -r382a89069b631e11752a6fabf9b80b9274c8503e -r64eede81657b51fb755944fd3939ceefb839e591 --- Ringtoets/Common/test/Ringtoets.Common.IO.Test/HydraRing/HydraulicDatabaseHelperTest.cs (.../HydraulicDatabaseHelperTest.cs) (revision 382a89069b631e11752a6fabf9b80b9274c8503e) +++ Ringtoets/Common/test/Ringtoets.Common.IO.Test/HydraRing/HydraulicDatabaseHelperTest.cs (.../HydraulicDatabaseHelperTest.cs) (revision 64eede81657b51fb755944fd3939ceefb839e591) @@ -32,7 +32,7 @@ [TestFixture] public class HydraulicDatabaseHelperTest { - private readonly string testDataPath = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.HydraRing.IO, "HydraulicBoundaryLocationReader"); + private readonly string testDataPath = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.Common.IO, "HydraulicBoundaryDatabaseImporter"); [Test] public void ValidatePathForCalculation_ExistingFileWithHlcd_ReturnsNull() @@ -115,6 +115,19 @@ } [Test] + public void ValidatePathForCalculation_ExistingFileWithInvalidSettingsDatabase_ReturnsMessageWithError() + { + // Setup + string validFilePath = Path.Combine(testDataPath, "invalidSettingsSchema", "complete.sqlite"); + + // Call + var result = HydraulicDatabaseHelper.ValidatePathForCalculation(validFilePath); + + // Assert + StringAssert.StartsWith("De rekeninstellingen database heeft niet het juiste schema.", result); + } + + [Test] public void ValidatePathForCalculation_InvalidFilePath_ReturnsMessageWithError() { // Setup Index: Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/HydraulicBoundaryDatabaseImporter/HLCD.sqlite =================================================================== diff -u Binary files differ Index: Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/HydraulicBoundaryDatabaseImporter/complete.config.sqlite =================================================================== diff -u Binary files differ Index: Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/HydraulicBoundaryDatabaseImporter/complete.sqlite =================================================================== diff -u Binary files differ Index: Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/HydraulicBoundaryDatabaseImporter/corruptschema.config.sqlite =================================================================== diff -u Binary files differ Index: Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/HydraulicBoundaryDatabaseImporter/corruptschema.sqlite =================================================================== diff -u Binary files differ Index: Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/HydraulicBoundaryDatabaseImporter/empty.sqlite =================================================================== diff -u Binary files differ Index: Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/HydraulicBoundaryDatabaseImporter/emptyschema.sqlite =================================================================== diff -u Binary files differ Index: Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/HydraulicBoundaryDatabaseImporter/invalidSettingsSchema/HLCD.sqlite =================================================================== diff -u Binary files differ Index: Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/HydraulicBoundaryDatabaseImporter/invalidSettingsSchema/complete.config.sqlite =================================================================== diff -u Binary files differ Index: Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/HydraulicBoundaryDatabaseImporter/invalidSettingsSchema/complete.sqlite =================================================================== diff -u Binary files differ Index: Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/HydraulicBoundaryDatabaseImporter/withoutHLCD/empty.sqlite =================================================================== diff -u Binary files differ Index: Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/HydraulicBoundaryDatabaseImporter/withoutSettings/HLCD.sqlite =================================================================== diff -u Binary files differ Index: Ringtoets/Common/test/Ringtoets.Common.IO.Test/test-data/HydraulicBoundaryDatabaseImporter/withoutSettings/complete.sqlite =================================================================== diff -u Binary files differ Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/TreeNodeInfos/GrassCoverErosionInwardsCalculationContextTreeNodeInfoTest.cs =================================================================== diff -u -r2743056fbaf6cccf5e87f00396c4c32030424ddc -r64eede81657b51fb755944fd3939ceefb839e591 --- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/TreeNodeInfos/GrassCoverErosionInwardsCalculationContextTreeNodeInfoTest.cs (.../GrassCoverErosionInwardsCalculationContextTreeNodeInfoTest.cs) (revision 2743056fbaf6cccf5e87f00396c4c32030424ddc) +++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/TreeNodeInfos/GrassCoverErosionInwardsCalculationContextTreeNodeInfoTest.cs (.../GrassCoverErosionInwardsCalculationContextTreeNodeInfoTest.cs) (revision 64eede81657b51fb755944fd3939ceefb839e591) @@ -58,7 +58,7 @@ private const int contextMenuValidateIndex = 0; private const int contextMenuCalculateIndex = 1; private const int contextMenuClearIndex = 2; - private readonly string testDataPath = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.HydraRing.IO, "HydraulicBoundaryLocationReader"); + private readonly string testDataPath = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.Common.IO, "HydraulicBoundaryDatabaseImporter"); private MockRepository mocks; private GrassCoverErosionInwardsPlugin plugin; Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/TreeNodeInfos/GrassCoverErosionInwardsCalculationGroupContextTreeNodeInfoTest.cs =================================================================== diff -u -rbae9328136bb33f3827192d07115f5512fa7bc32 -r64eede81657b51fb755944fd3939ceefb839e591 --- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/TreeNodeInfos/GrassCoverErosionInwardsCalculationGroupContextTreeNodeInfoTest.cs (.../GrassCoverErosionInwardsCalculationGroupContextTreeNodeInfoTest.cs) (revision bae9328136bb33f3827192d07115f5512fa7bc32) +++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/TreeNodeInfos/GrassCoverErosionInwardsCalculationGroupContextTreeNodeInfoTest.cs (.../GrassCoverErosionInwardsCalculationGroupContextTreeNodeInfoTest.cs) (revision 64eede81657b51fb755944fd3939ceefb839e591) @@ -69,7 +69,7 @@ private const int contextMenuValidateAllIndexNestedGroup = 3; private const int contextMenuCalculateAllIndexNestedGroup = 4; private const int contextMenuClearAllIndexNestedGroup = 5; - private readonly string testDataPath = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.HydraRing.IO, "HydraulicBoundaryLocationReader"); + private readonly string testDataPath = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.Common.IO, "HydraulicBoundaryDatabaseImporter"); private IGui guiMock; private TreeNodeInfo info; Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/TreeNodeInfos/GrassCoverErosionInwardsFailureMechanismContextTreeNodeInfoTest.cs =================================================================== diff -u -rbae9328136bb33f3827192d07115f5512fa7bc32 -r64eede81657b51fb755944fd3939ceefb839e591 --- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/TreeNodeInfos/GrassCoverErosionInwardsFailureMechanismContextTreeNodeInfoTest.cs (.../GrassCoverErosionInwardsFailureMechanismContextTreeNodeInfoTest.cs) (revision bae9328136bb33f3827192d07115f5512fa7bc32) +++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/TreeNodeInfos/GrassCoverErosionInwardsFailureMechanismContextTreeNodeInfoTest.cs (.../GrassCoverErosionInwardsFailureMechanismContextTreeNodeInfoTest.cs) (revision 64eede81657b51fb755944fd3939ceefb839e591) @@ -59,7 +59,7 @@ private const int contextMenuValidateAllIndex = 2; private const int contextMenuCalculateAllIndex = 3; private const int contextMenuClearAllIndex = 4; - private readonly string testDataPath = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.HydraRing.IO, "HydraulicBoundaryLocationReader"); + private readonly string testDataPath = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.Common.IO, "HydraulicBoundaryDatabaseImporter"); private MockRepository mocksRepository; private GrassCoverErosionInwardsPlugin plugin; Index: Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/TreeNodeInfos/GrassCoverErosionOutwardsWaveConditionsCalculationContextTreeNodeInfoTest.cs =================================================================== diff -u -reb66bc91750d4082efd2d01c0fc9e68da96ff62b -r64eede81657b51fb755944fd3939ceefb839e591 --- Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/TreeNodeInfos/GrassCoverErosionOutwardsWaveConditionsCalculationContextTreeNodeInfoTest.cs (.../GrassCoverErosionOutwardsWaveConditionsCalculationContextTreeNodeInfoTest.cs) (revision eb66bc91750d4082efd2d01c0fc9e68da96ff62b) +++ Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/TreeNodeInfos/GrassCoverErosionOutwardsWaveConditionsCalculationContextTreeNodeInfoTest.cs (.../GrassCoverErosionOutwardsWaveConditionsCalculationContextTreeNodeInfoTest.cs) (revision 64eede81657b51fb755944fd3939ceefb839e591) @@ -568,8 +568,8 @@ public void GivenAssessmentSectionWithValidPathForCalculation_ThenValidationItemEnabled() { // Given - string validHydroDatabasePath = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.HydraRing.IO, - Path.Combine("HydraulicBoundaryLocationReader", "complete.sqlite")); + string validHydroDatabasePath = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.Common.IO, + Path.Combine("HydraulicBoundaryDatabaseImporter", "complete.sqlite")); var failureMechanism = new GrassCoverErosionOutwardsFailureMechanism(); var assessmentSection = mocks.Stub(); @@ -624,8 +624,8 @@ public void GivenCalculation_WhenValidating_ThenCalculationValidated(bool validCalculation) { // Given - string validHydroDatabasePath = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.HydraRing.IO, - Path.Combine("HydraulicBoundaryLocationReader", "complete.sqlite")); + string validHydroDatabasePath = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.Common.IO, + Path.Combine("HydraulicBoundaryDatabaseImporter", "complete.sqlite")); var failureMechanism = new GrassCoverErosionOutwardsFailureMechanism(); var assessmentSection = mocks.Stub(); @@ -771,8 +771,8 @@ var hydraulicBoundaryDatabase = new HydraulicBoundaryDatabase(); if (validPath) { - hydraulicBoundaryDatabase.FilePath = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.HydraRing.IO, - Path.Combine("HydraulicBoundaryLocationReader", "complete.sqlite")); + hydraulicBoundaryDatabase.FilePath = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.Common.IO, + Path.Combine("HydraulicBoundaryDatabaseImporter", "complete.sqlite")); } assessmentSection.HydraulicBoundaryDatabase = hydraulicBoundaryDatabase; @@ -824,8 +824,8 @@ public void GivenValidCalculation_WhenCalculating_ThenCalculationReturnsResult() { // Given - string validHydroDatabasePath = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.HydraRing.IO, - Path.Combine("HydraulicBoundaryLocationReader", "complete.sqlite")); + string validHydroDatabasePath = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.Common.IO, + Path.Combine("HydraulicBoundaryDatabaseImporter", "complete.sqlite")); var failureMechanism = new GrassCoverErosionOutwardsFailureMechanism { Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/TreeNodeInfos/HeightStructuresCalculationContextTreeNodeInfoTest.cs =================================================================== diff -u -re6f1efd0603f90b8cb395a5bc6a36a2fd9fd52b0 -r64eede81657b51fb755944fd3939ceefb839e591 --- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/TreeNodeInfos/HeightStructuresCalculationContextTreeNodeInfoTest.cs (.../HeightStructuresCalculationContextTreeNodeInfoTest.cs) (revision e6f1efd0603f90b8cb395a5bc6a36a2fd9fd52b0) +++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/TreeNodeInfos/HeightStructuresCalculationContextTreeNodeInfoTest.cs (.../HeightStructuresCalculationContextTreeNodeInfoTest.cs) (revision 64eede81657b51fb755944fd3939ceefb839e591) @@ -59,7 +59,7 @@ private const int contextMenuValidateIndex = 0; private const int contextMenuCalculateIndex = 1; private const int contextMenuClearIndex = 2; - private readonly string testDataPath = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.HydraRing.IO, "HydraulicBoundaryLocationReader"); + private readonly string testDataPath = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.Common.IO, "HydraulicBoundaryDatabaseImporter"); private MockRepository mocks; private HeightStructuresPlugin plugin; Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/TreeNodeInfos/HeightStructuresCalculationGroupContextTreeNodeInfoTest.cs =================================================================== diff -u -r2d8a7d9f1185dbfb67f08aadf63f2aadbcfd0c1f -r64eede81657b51fb755944fd3939ceefb839e591 --- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/TreeNodeInfos/HeightStructuresCalculationGroupContextTreeNodeInfoTest.cs (.../HeightStructuresCalculationGroupContextTreeNodeInfoTest.cs) (revision 2d8a7d9f1185dbfb67f08aadf63f2aadbcfd0c1f) +++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/TreeNodeInfos/HeightStructuresCalculationGroupContextTreeNodeInfoTest.cs (.../HeightStructuresCalculationGroupContextTreeNodeInfoTest.cs) (revision 64eede81657b51fb755944fd3939ceefb839e591) @@ -67,7 +67,7 @@ private const int contextMenuValidateAllIndexNestedGroup = 3; private const int contextMenuCalculateAllIndexNestedGroup = 4; private const int contextMenuClearAllIndexNestedGroup = 5; - private readonly string testDataPath = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.HydraRing.IO, "HydraulicBoundaryLocationReader"); + private readonly string testDataPath = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.Common.IO, "HydraulicBoundaryDatabaseImporter"); private IGui guiStub; private TreeNodeInfo info; Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/TreeNodeInfos/HeightStructuresFailureMechanismContextTreeNodeInfoTest.cs =================================================================== diff -u -r2d8a7d9f1185dbfb67f08aadf63f2aadbcfd0c1f -r64eede81657b51fb755944fd3939ceefb839e591 --- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/TreeNodeInfos/HeightStructuresFailureMechanismContextTreeNodeInfoTest.cs (.../HeightStructuresFailureMechanismContextTreeNodeInfoTest.cs) (revision 2d8a7d9f1185dbfb67f08aadf63f2aadbcfd0c1f) +++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/TreeNodeInfos/HeightStructuresFailureMechanismContextTreeNodeInfoTest.cs (.../HeightStructuresFailureMechanismContextTreeNodeInfoTest.cs) (revision 64eede81657b51fb755944fd3939ceefb839e591) @@ -60,7 +60,7 @@ private const int contextMenuValidateAllIndex = 2; private const int contextMenuCalculateAllIndex = 3; private const int contextMenuClearAllIndex = 4; - private readonly string testDataPath = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.HydraRing.IO, "HydraulicBoundaryLocationReader"); + private readonly string testDataPath = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.Common.IO, "HydraulicBoundaryDatabaseImporter"); private MockRepository mocksRepository; private HeightStructuresPlugin plugin; Index: Ringtoets/HydraRing/test/Ringtoets.HydraRing.IO.Test/HydraulicBoundaryDatabaseContext/HydraulicBoundarySqLiteDatabaseReaderTest.cs =================================================================== diff -u -r382a89069b631e11752a6fabf9b80b9274c8503e -r64eede81657b51fb755944fd3939ceefb839e591 --- Ringtoets/HydraRing/test/Ringtoets.HydraRing.IO.Test/HydraulicBoundaryDatabaseContext/HydraulicBoundarySqLiteDatabaseReaderTest.cs (.../HydraulicBoundarySqLiteDatabaseReaderTest.cs) (revision 382a89069b631e11752a6fabf9b80b9274c8503e) +++ Ringtoets/HydraRing/test/Ringtoets.HydraRing.IO.Test/HydraulicBoundaryDatabaseContext/HydraulicBoundarySqLiteDatabaseReaderTest.cs (.../HydraulicBoundarySqLiteDatabaseReaderTest.cs) (revision 64eede81657b51fb755944fd3939ceefb839e591) @@ -37,7 +37,7 @@ [TestFixture] public class HydraulicBoundarySqLiteDatabaseReaderTest { - private readonly string testDataPath = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.HydraRing.IO, "HydraulicBoundaryLocationReader"); + private readonly string testDataPath = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.HydraRing.IO, "HydraulicBoundarySqLiteDatabaseReader"); [Test] public void Constructor_NonExistingPath_ThrowsCriticalFileReadException() Index: Ringtoets/HydraRing/test/Ringtoets.HydraRing.IO.Test/test-data/HydraulicBoundaryLocationReader/HLCD.sqlite =================================================================== diff -u -rfef3460a27a37aaa34948649aae3dd9ae143041c -r64eede81657b51fb755944fd3939ceefb839e591 Binary files differ Index: Ringtoets/HydraRing/test/Ringtoets.HydraRing.IO.Test/test-data/HydraulicBoundaryLocationReader/complete.config.sqlite =================================================================== diff -u -r02d0e67121f748ae6d69ab9f68643d2f5e62f800 -r64eede81657b51fb755944fd3939ceefb839e591 Binary files differ Index: Ringtoets/HydraRing/test/Ringtoets.HydraRing.IO.Test/test-data/HydraulicBoundaryLocationReader/complete.sqlite =================================================================== diff -u -rfef3460a27a37aaa34948649aae3dd9ae143041c -r64eede81657b51fb755944fd3939ceefb839e591 Binary files differ Index: Ringtoets/HydraRing/test/Ringtoets.HydraRing.IO.Test/test-data/HydraulicBoundaryLocationReader/corruptschema.config.sqlite =================================================================== diff -u -r25d6b191a8ffd5dce434ddd07650aa1b9a76e699 -r64eede81657b51fb755944fd3939ceefb839e591 Binary files differ Index: Ringtoets/HydraRing/test/Ringtoets.HydraRing.IO.Test/test-data/HydraulicBoundaryLocationReader/corruptschema.sqlite =================================================================== diff -u -rfef3460a27a37aaa34948649aae3dd9ae143041c -r64eede81657b51fb755944fd3939ceefb839e591 Binary files differ Index: Ringtoets/HydraRing/test/Ringtoets.HydraRing.IO.Test/test-data/HydraulicBoundaryLocationReader/empty.sqlite =================================================================== diff -u -r98fc85d8cecf9edae9fe7c1f2f47b60ecda5e187 -r64eede81657b51fb755944fd3939ceefb839e591 Binary files differ Index: Ringtoets/HydraRing/test/Ringtoets.HydraRing.IO.Test/test-data/HydraulicBoundaryLocationReader/emptyschema.sqlite =================================================================== diff -u -rfef3460a27a37aaa34948649aae3dd9ae143041c -r64eede81657b51fb755944fd3939ceefb839e591 Binary files differ Index: Ringtoets/HydraRing/test/Ringtoets.HydraRing.IO.Test/test-data/HydraulicBoundaryLocationReader/withoutHLCD/empty.sqlite =================================================================== diff -u -ra77cd7f471b813c6a7218b42844d017fc10fb4ec -r64eede81657b51fb755944fd3939ceefb839e591 Binary files differ Index: Ringtoets/HydraRing/test/Ringtoets.HydraRing.IO.Test/test-data/HydraulicBoundarySqLiteDatabaseReader/complete.sqlite =================================================================== diff -u Binary files differ Index: Ringtoets/HydraRing/test/Ringtoets.HydraRing.IO.Test/test-data/HydraulicBoundarySqLiteDatabaseReader/corruptschema.sqlite =================================================================== diff -u Binary files differ Index: Ringtoets/HydraRing/test/Ringtoets.HydraRing.IO.Test/test-data/HydraulicBoundarySqLiteDatabaseReader/empty.sqlite =================================================================== diff -u Binary files differ Index: Ringtoets/HydraRing/test/Ringtoets.HydraRing.IO.Test/test-data/HydraulicBoundarySqLiteDatabaseReader/emptyschema.sqlite =================================================================== diff -u Binary files differ Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/TreeNodeInfos/HydraulicBoundaryDatabaseContextTreeNodeInfoTest.cs =================================================================== diff -u -rf27092df1f897798c4a0b24f6fc91f49c9f294ce -r64eede81657b51fb755944fd3939ceefb839e591 --- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/TreeNodeInfos/HydraulicBoundaryDatabaseContextTreeNodeInfoTest.cs (.../HydraulicBoundaryDatabaseContextTreeNodeInfoTest.cs) (revision f27092df1f897798c4a0b24f6fc91f49c9f294ce) +++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/TreeNodeInfos/HydraulicBoundaryDatabaseContextTreeNodeInfoTest.cs (.../HydraulicBoundaryDatabaseContextTreeNodeInfoTest.cs) (revision 64eede81657b51fb755944fd3939ceefb839e591) @@ -35,6 +35,7 @@ using Rhino.Mocks; using Ringtoets.Common.Data.AssessmentSection; using Ringtoets.Common.IO.FileImporters; +using Ringtoets.Common.IO.HydraRing; using Ringtoets.GrassCoverErosionOutwards.Data; using Ringtoets.HydraRing.Data; using Ringtoets.Integration.Data; @@ -53,6 +54,8 @@ private readonly string testDataPath = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.Integration.Forms, "HydraulicBoundaryDatabase"); private readonly string testDataPathNoHlcd = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.Integration.Forms, "HydraulicBoundaryDatabaseNoHLCD"); + private readonly string testDataPathNoSettings = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.Integration.Forms, "HydraulicBoundaryDatabaseNoSettings"); + private readonly string testDataPathInvalidSettings = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.Integration.Forms, "HydraulicBoundaryDatabaseSettingsInvalid"); [SetUp] public void SetUp() @@ -399,6 +402,97 @@ [Test] [RequiresSTA] + public void GivenNoFilePathIsSet_WhenOpeneningValidFileWithoutSettingsDatabaseFromContextMenu_ThenPathWillNotBeSetAndLogMessageAdded() + { + // Given + string testFile = Path.Combine(testDataPathNoSettings, "HRD dutch coast south.sqlite"); + + int contextMenuImportHydraulicBoundaryDatabaseIndex = 0; + + AssessmentSection assessmentSection = new AssessmentSection(AssessmentSectionComposition.Dike); + HydraulicBoundaryDatabaseContext hydraulicBoundaryDatabaseContext = new HydraulicBoundaryDatabaseContext(assessmentSection); + + using (TreeViewControl treeViewControl = new TreeViewControl()) + using (RingtoetsPlugin plugin = new RingtoetsPlugin()) + { + IGui gui = mocks.DynamicMock(); + gui.Expect(cmp => cmp.Get(hydraulicBoundaryDatabaseContext, treeViewControl)).Return(new CustomItemsOnlyContextMenuBuilder()); + mocks.ReplayAll(); + + DialogBoxHandler = (name, wnd) => + { + OpenFileDialogTester tester = new OpenFileDialogTester(wnd); + tester.OpenFile(testFile); + }; + + TreeNodeInfo info = GetInfo(plugin); + plugin.Gui = gui; + + using (ContextMenuStrip contextMenuStrip = info.ContextMenuStrip(hydraulicBoundaryDatabaseContext, null, treeViewControl)) + { + // When + Action action = () => contextMenuStrip.Items[contextMenuImportHydraulicBoundaryDatabaseIndex].PerformClick(); + + // Then + string expectedMessage = + string.Format("Fout bij het lezen van bestand '{0}': Kon het rekeninstellingen bestand niet openen. Fout bij het lezen van bestand '{1}': Het bestand bestaat niet.", + testFile, + HydraulicDatabaseHelper.GetHydraulicBoundarySettingsDatabase(testFile)); + TestHelper.AssertLogMessageIsGenerated(action, expectedMessage); + + Assert.IsNull(assessmentSection.HydraulicBoundaryDatabase); + } + } + mocks.VerifyAll(); + } + + [Test] + [RequiresSTA] + public void GivenNoFilePathIsSet_WhenOpeneningValidFileWithInvalidSettingsDatabaseFromContextMenu_ThenPathWillNotBeSetAndLogMessageAdded() + { + // Given + string testFile = Path.Combine(testDataPathInvalidSettings, "HRD dutch coast south.sqlite"); + + int contextMenuImportHydraulicBoundaryDatabaseIndex = 0; + + AssessmentSection assessmentSection = new AssessmentSection(AssessmentSectionComposition.Dike); + HydraulicBoundaryDatabaseContext hydraulicBoundaryDatabaseContext = new HydraulicBoundaryDatabaseContext(assessmentSection); + + using (TreeViewControl treeViewControl = new TreeViewControl()) + using (RingtoetsPlugin plugin = new RingtoetsPlugin()) + { + IGui gui = mocks.DynamicMock(); + gui.Expect(cmp => cmp.Get(hydraulicBoundaryDatabaseContext, treeViewControl)).Return(new CustomItemsOnlyContextMenuBuilder()); + mocks.ReplayAll(); + + DialogBoxHandler = (name, wnd) => + { + OpenFileDialogTester tester = new OpenFileDialogTester(wnd); + tester.OpenFile(testFile); + }; + + TreeNodeInfo info = GetInfo(plugin); + plugin.Gui = gui; + + using (ContextMenuStrip contextMenuStrip = info.ContextMenuStrip(hydraulicBoundaryDatabaseContext, null, treeViewControl)) + { + // When + Action action = () => contextMenuStrip.Items[contextMenuImportHydraulicBoundaryDatabaseIndex].PerformClick(); + + // Then + string expectedMessage = + string.Format("Fout bij het lezen van bestand '{0}': Kon het rekeninstellingen bestand niet openen. De rekeninstellingen database heeft niet het juiste schema.", + testFile); + TestHelper.AssertLogMessageIsGenerated(action, expectedMessage); + + Assert.IsNull(assessmentSection.HydraulicBoundaryDatabase); + } + } + mocks.VerifyAll(); + } + + [Test] + [RequiresSTA] public void GivenFilePathIsSet_WhenOpeningSameFileFromContextMenu_ThenCalculationsWillNotBeClearedAndNoNotifyObservers() { // Given Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/test-data/HydraulicBoundaryDatabaseNoSettings/HLCD.sqlite =================================================================== diff -u Binary files differ Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/test-data/HydraulicBoundaryDatabaseNoSettings/HRD dutch coast south.sqlite =================================================================== diff -u Binary files differ Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/test-data/HydraulicBoundaryDatabaseSettingsInvalid/HLCD.sqlite =================================================================== diff -u Binary files differ Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/test-data/HydraulicBoundaryDatabaseSettingsInvalid/HRD dutch coast south.config.sqlite =================================================================== diff -u Binary files differ Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/test-data/HydraulicBoundaryDatabaseSettingsInvalid/HRD dutch coast south.sqlite =================================================================== diff -u Binary files differ Index: Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/RingtoetsPluginTest.cs =================================================================== diff -u -r74817f4dbb43aa0346f8b839e59370f786c5d452 -r64eede81657b51fb755944fd3939ceefb839e591 --- Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/RingtoetsPluginTest.cs (.../RingtoetsPluginTest.cs) (revision 74817f4dbb43aa0346f8b839e59370f786c5d452) +++ Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/RingtoetsPluginTest.cs (.../RingtoetsPluginTest.cs) (revision 64eede81657b51fb755944fd3939ceefb839e591) @@ -113,7 +113,7 @@ var projectStore = mocks.Stub(); mocks.ReplayAll(); - var testDataDir = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.HydraRing.IO, "HydraulicBoundaryLocationReader"); + var testDataDir = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.Common.IO, "HydraulicBoundaryDatabaseImporter"); var testFilePath = Path.Combine(testDataDir, "complete.sqlite"); using (var gui = new GuiCore(new MainWindow(), projectStore, new RingtoetsProjectFactory(), new GuiCoreSettings())) Index: Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Forms.Test/TreeNodeInfos/StabilityPointStructuresCalculationContextTreeNodeInfoTest.cs =================================================================== diff -u -rf78fa31c365d310e78111776f78ed9b45b39ed3d -r64eede81657b51fb755944fd3939ceefb839e591 --- Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Forms.Test/TreeNodeInfos/StabilityPointStructuresCalculationContextTreeNodeInfoTest.cs (.../StabilityPointStructuresCalculationContextTreeNodeInfoTest.cs) (revision f78fa31c365d310e78111776f78ed9b45b39ed3d) +++ Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Forms.Test/TreeNodeInfos/StabilityPointStructuresCalculationContextTreeNodeInfoTest.cs (.../StabilityPointStructuresCalculationContextTreeNodeInfoTest.cs) (revision 64eede81657b51fb755944fd3939ceefb839e591) @@ -58,7 +58,7 @@ private const int contextMenuValidateIndex = 0; private const int contextMenuCalculateIndex = 1; private const int contextMenuClearIndex = 2; - private readonly string testDataPath = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.HydraRing.IO, "HydraulicBoundaryLocationReader"); + private readonly string testDataPath = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.Common.IO, "HydraulicBoundaryDatabaseImporter"); private MockRepository mocks; private StabilityPointStructuresPlugin plugin; Index: Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Forms.Test/TreeNodeInfos/StabilityPointStructuresCalculationGroupContextTreeNodeInfoTest.cs =================================================================== diff -u -r2d8a7d9f1185dbfb67f08aadf63f2aadbcfd0c1f -r64eede81657b51fb755944fd3939ceefb839e591 --- Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Forms.Test/TreeNodeInfos/StabilityPointStructuresCalculationGroupContextTreeNodeInfoTest.cs (.../StabilityPointStructuresCalculationGroupContextTreeNodeInfoTest.cs) (revision 2d8a7d9f1185dbfb67f08aadf63f2aadbcfd0c1f) +++ Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Forms.Test/TreeNodeInfos/StabilityPointStructuresCalculationGroupContextTreeNodeInfoTest.cs (.../StabilityPointStructuresCalculationGroupContextTreeNodeInfoTest.cs) (revision 64eede81657b51fb755944fd3939ceefb839e591) @@ -67,7 +67,7 @@ private const int contextMenuValidateAllIndexNestedGroup = 3; private const int contextMenuCalculateAllIndexNestedGroup = 4; private const int contextMenuClearAllIndexNestedGroup = 5; - private readonly string testDataPath = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.HydraRing.IO, "HydraulicBoundaryLocationReader"); + private readonly string testDataPath = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.Common.IO, "HydraulicBoundaryDatabaseImporter"); private IGui guiMock; private TreeNodeInfo info; Index: Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Forms.Test/TreeNodeInfos/StabilityPointStructuresFailureMechanismContextTreeNodeInfoTest.cs =================================================================== diff -u -r2d8a7d9f1185dbfb67f08aadf63f2aadbcfd0c1f -r64eede81657b51fb755944fd3939ceefb839e591 --- Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Forms.Test/TreeNodeInfos/StabilityPointStructuresFailureMechanismContextTreeNodeInfoTest.cs (.../StabilityPointStructuresFailureMechanismContextTreeNodeInfoTest.cs) (revision 2d8a7d9f1185dbfb67f08aadf63f2aadbcfd0c1f) +++ Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Forms.Test/TreeNodeInfos/StabilityPointStructuresFailureMechanismContextTreeNodeInfoTest.cs (.../StabilityPointStructuresFailureMechanismContextTreeNodeInfoTest.cs) (revision 64eede81657b51fb755944fd3939ceefb839e591) @@ -58,7 +58,7 @@ private const int contextMenuValidateAllIndex = 2; private const int contextMenuCalculateAllIndex = 3; private const int contextMenuClearAllIndex = 4; - private readonly string testDataPath = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.HydraRing.IO, "HydraulicBoundaryLocationReader"); + private readonly string testDataPath = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.Common.IO, "HydraulicBoundaryDatabaseImporter"); private MockRepository mocksRepository; Index: Ringtoets/StabilityStoneCover/test/Ringtoets.StabilityStoneCover.Forms.Test/TreeNodeInfos/StabilityStoneCoverWaveConditionsCalculationContextTreeNodeInfoTest.cs =================================================================== diff -u -rffc2fa0ae32fa425918c0c067084a96ed6705cd6 -r64eede81657b51fb755944fd3939ceefb839e591 --- Ringtoets/StabilityStoneCover/test/Ringtoets.StabilityStoneCover.Forms.Test/TreeNodeInfos/StabilityStoneCoverWaveConditionsCalculationContextTreeNodeInfoTest.cs (.../StabilityStoneCoverWaveConditionsCalculationContextTreeNodeInfoTest.cs) (revision ffc2fa0ae32fa425918c0c067084a96ed6705cd6) +++ Ringtoets/StabilityStoneCover/test/Ringtoets.StabilityStoneCover.Forms.Test/TreeNodeInfos/StabilityStoneCoverWaveConditionsCalculationContextTreeNodeInfoTest.cs (.../StabilityStoneCoverWaveConditionsCalculationContextTreeNodeInfoTest.cs) (revision 64eede81657b51fb755944fd3939ceefb839e591) @@ -608,8 +608,8 @@ public void GivenAssessmentSectionWithValidPathForCalculation_ThenValidationItemEnabled() { // Given - string validHydroDatabasePath = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.HydraRing.IO, - Path.Combine("HydraulicBoundaryLocationReader", "complete.sqlite")); + string validHydroDatabasePath = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.Common.IO, + Path.Combine("HydraulicBoundaryDatabaseImporter", "complete.sqlite")); var failureMechanism = new StabilityStoneCoverFailureMechanism(); var assessmentSection = mocks.Stub(); @@ -664,8 +664,8 @@ public void GivenCalculation_WhenValidating_ThenCalculationValidated(bool validCalculation) { // Given - string validHydroDatabasePath = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.HydraRing.IO, - Path.Combine("HydraulicBoundaryLocationReader", "complete.sqlite")); + string validHydroDatabasePath = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.Common.IO, + Path.Combine("HydraulicBoundaryDatabaseImporter", "complete.sqlite")); var failureMechanism = new StabilityStoneCoverFailureMechanism(); var assessmentSection = mocks.Stub(); @@ -811,8 +811,8 @@ var hydraulicBoundaryDatabase = new HydraulicBoundaryDatabase(); if (validPath) { - hydraulicBoundaryDatabase.FilePath = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.HydraRing.IO, - Path.Combine("HydraulicBoundaryLocationReader", "complete.sqlite")); + hydraulicBoundaryDatabase.FilePath = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.Common.IO, + Path.Combine("HydraulicBoundaryDatabaseImporter", "complete.sqlite")); } assessmentSection.HydraulicBoundaryDatabase = hydraulicBoundaryDatabase; @@ -864,8 +864,8 @@ public void GivenValidCalculation_WhenCalculating_ThenCalculationReturnsResult() { // Given - string validHydroDatabasePath = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.HydraRing.IO, - Path.Combine("HydraulicBoundaryLocationReader", "complete.sqlite")); + string validHydroDatabasePath = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.Common.IO, + Path.Combine("HydraulicBoundaryDatabaseImporter", "complete.sqlite")); var failureMechanism = new StabilityStoneCoverFailureMechanism(); var assessmentSection = mocks.Stub(); Index: Ringtoets/WaveImpactAsphaltCover/test/Ringtoets.WaveImpactAsphaltCover.Forms.Test/TreeNodeInfos/WaveImpactAsphaltCoverWaveConditionsCalculationContextTreeNodeInfoTest.cs =================================================================== diff -u -re457a68a5404232ece77c8753f3aa3ba19e6f3c7 -r64eede81657b51fb755944fd3939ceefb839e591 --- Ringtoets/WaveImpactAsphaltCover/test/Ringtoets.WaveImpactAsphaltCover.Forms.Test/TreeNodeInfos/WaveImpactAsphaltCoverWaveConditionsCalculationContextTreeNodeInfoTest.cs (.../WaveImpactAsphaltCoverWaveConditionsCalculationContextTreeNodeInfoTest.cs) (revision e457a68a5404232ece77c8753f3aa3ba19e6f3c7) +++ Ringtoets/WaveImpactAsphaltCover/test/Ringtoets.WaveImpactAsphaltCover.Forms.Test/TreeNodeInfos/WaveImpactAsphaltCoverWaveConditionsCalculationContextTreeNodeInfoTest.cs (.../WaveImpactAsphaltCoverWaveConditionsCalculationContextTreeNodeInfoTest.cs) (revision 64eede81657b51fb755944fd3939ceefb839e591) @@ -564,8 +564,8 @@ public void GivenAssessmentSectionWithValidPathForCalculation_ThenValidationItemEnabled() { // Given - string validHydroDatabasePath = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.HydraRing.IO, - Path.Combine("HydraulicBoundaryLocationReader", "complete.sqlite")); + string validHydroDatabasePath = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.Common.IO, + Path.Combine("HydraulicBoundaryDatabaseImporter", "complete.sqlite")); var failureMechanism = new WaveImpactAsphaltCoverFailureMechanism(); failureMechanism.AddSection(new FailureMechanismSection("A", new[] @@ -625,8 +625,8 @@ public void GivenCalculation_WhenValidating_ThenCalculationValidated(bool validCalculation) { // Given - string validHydroDatabasePath = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.HydraRing.IO, - Path.Combine("HydraulicBoundaryLocationReader", "complete.sqlite")); + string validHydroDatabasePath = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.Common.IO, + Path.Combine("HydraulicBoundaryDatabaseImporter", "complete.sqlite")); var failureMechanism = new WaveImpactAsphaltCoverFailureMechanism(); failureMechanism.AddSection(new FailureMechanismSection("A", new[] @@ -777,8 +777,8 @@ var hydraulicBoundaryDatabase = new HydraulicBoundaryDatabase(); if (validPath) { - hydraulicBoundaryDatabase.FilePath = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.HydraRing.IO, - Path.Combine("HydraulicBoundaryLocationReader", "complete.sqlite")); + hydraulicBoundaryDatabase.FilePath = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.Common.IO, + Path.Combine("HydraulicBoundaryDatabaseImporter", "complete.sqlite")); } assessmentSection.HydraulicBoundaryDatabase = hydraulicBoundaryDatabase; @@ -830,8 +830,8 @@ public void GivenValidCalculation_WhenCalculating_ThenCalculationReturnsResult() { // Given - string validHydroDatabasePath = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.HydraRing.IO, - Path.Combine("HydraulicBoundaryLocationReader", "complete.sqlite")); + string validHydroDatabasePath = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.Common.IO, + Path.Combine("HydraulicBoundaryDatabaseImporter", "complete.sqlite")); var failureMechanism = new WaveImpactAsphaltCoverFailureMechanism(); failureMechanism.AddSection(new FailureMechanismSection("A", new[]