Index: Application/Riskeer/test/Application.Riskeer.Integration.Test/StorageMigrationIntegrationTest.cs =================================================================== diff -u -r067b62cc6b5541809fa4f3ddf538e237188be738 -r28dbb95c1b189efc997079ca51c01a507f5b7543 --- Application/Riskeer/test/Application.Riskeer.Integration.Test/StorageMigrationIntegrationTest.cs (.../StorageMigrationIntegrationTest.cs) (revision 067b62cc6b5541809fa4f3ddf538e237188be738) +++ Application/Riskeer/test/Application.Riskeer.Integration.Test/StorageMigrationIntegrationTest.cs (.../StorageMigrationIntegrationTest.cs) (revision 28dbb95c1b189efc997079ca51c01a507f5b7543) @@ -164,7 +164,7 @@ { string newVersion = RingtoetsVersionHelper.GetCurrentDatabaseVersion(); var fromVersionedFile = new RingtoetsVersionedFile(sourceFilePath); - var migrator = new RingtoetsSqLiteDatabaseFileMigrator(); + var migrator = new ProjectFileMigrator(); migrator.Migrate(fromVersionedFile, newVersion, targetFilePath); } Index: Ringtoets/Migration/src/Riskeer.Migration.Core/ProjectFileMigrator.cs =================================================================== diff -u --- Ringtoets/Migration/src/Riskeer.Migration.Core/ProjectFileMigrator.cs (revision 0) +++ Ringtoets/Migration/src/Riskeer.Migration.Core/ProjectFileMigrator.cs (revision 28dbb95c1b189efc997079ca51c01a507f5b7543) @@ -0,0 +1,123 @@ +// Copyright (C) Stichting Deltares 2018. 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. + +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Reflection; +using System.Text.RegularExpressions; +using Migration.Core.Storage; +using Migration.Scripts.Data; +using Ringtoets.Common.Util; +using Riskeer.Migration.Core.Properties; + +namespace Riskeer.Migration.Core +{ + /// + /// Class that provides methods for migrating a . + /// + public class ProjectFileMigrator : VersionedFileMigrator + { + private readonly Assembly scriptResource; + + /// + /// Creates a new instance of the class. + /// + public ProjectFileMigrator() : base(new RingtoetsVersionComparer()) + { + scriptResource = typeof(Resources).Assembly; + } + + /// + /// Gets or sets the path to the logging database. + /// + public string LogPath { private get; set; } + + private static string GetStringOfStream(Stream stream) + { + using (var reader = new StreamReader(stream)) + { + return reader.ReadToEnd(); + } + } + + #region UpgradeScript + + protected override IEnumerable GetAvailableUpgradeScripts() + { + return scriptResource.GetManifestResourceNames() + .Where(r => r.Contains("Migration_")) + .Select(CreateNewUpgradeScript) + .ToArray(); + } + + private static string GetMigrationScriptFromVersion(string filename) + { + Match match = Regex.Match(filename, @"(Migration_)(.*)(_.*\.sql)$", RegexOptions.IgnoreCase); + return match.Success ? match.Groups[2].Value : null; + } + + private static string GetMigrationScriptToVersion(string filename) + { + Match match = Regex.Match(filename, @"(Migration_.*_)(.*)(\.sql)$", RegexOptions.IgnoreCase); + return match.Success ? match.Groups[2].Value : null; + } + + private UpgradeScript CreateNewUpgradeScript(string resourceName) + { + string fromVersion = GetMigrationScriptFromVersion(resourceName); + string toVersion = GetMigrationScriptToVersion(resourceName); + Stream upgradeStream = scriptResource.GetManifestResourceStream(resourceName); + + string upgradeQuery = GetStringOfStream(upgradeStream); + + return new RingtoetsUpgradeScript(fromVersion, toVersion, upgradeQuery, LogPath); + } + + #endregion + + #region CreateScript + + protected override IEnumerable GetAvailableCreateScripts() + { + return scriptResource.GetManifestResourceNames() + .Where(r => r.Contains("DatabaseStructure")) + .Select(CreateNewCreateScript) + .ToArray(); + } + + private static string GetCreateScriptVersion(string filename) + { + Match match = Regex.Match(filename, @"(DatabaseStructure)(.*)(\.sql)$", RegexOptions.IgnoreCase); + return match.Success ? match.Groups[2].Value : null; + } + + private ProjectCreateScript CreateNewCreateScript(string resourceName) + { + string version = GetCreateScriptVersion(resourceName); + Stream createStream = scriptResource.GetManifestResourceStream(resourceName); + string query = GetStringOfStream(createStream); + return new ProjectCreateScript(version, query); + } + + #endregion + } +} \ No newline at end of file Fisheye: Tag 28dbb95c1b189efc997079ca51c01a507f5b7543 refers to a dead (removed) revision in file `Ringtoets/Migration/src/Riskeer.Migration.Core/RingtoetsSqLiteDatabaseFileMigrator.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Ringtoets/Migration/src/Riskeer.Migration.Core/Riskeer.Migration.Core.csproj =================================================================== diff -u -rf00628f6e8118bc33753ab916e0fdff864dfd894 -r28dbb95c1b189efc997079ca51c01a507f5b7543 --- Ringtoets/Migration/src/Riskeer.Migration.Core/Riskeer.Migration.Core.csproj (.../Riskeer.Migration.Core.csproj) (revision f00628f6e8118bc33753ab916e0fdff864dfd894) +++ Ringtoets/Migration/src/Riskeer.Migration.Core/Riskeer.Migration.Core.csproj (.../Riskeer.Migration.Core.csproj) (revision 28dbb95c1b189efc997079ca51c01a507f5b7543) @@ -29,7 +29,7 @@ - + Index: Ringtoets/Migration/src/Riskeer.Migration/ProjectMigrator.cs =================================================================== diff -u -r067b62cc6b5541809fa4f3ddf538e237188be738 -r28dbb95c1b189efc997079ca51c01a507f5b7543 --- Ringtoets/Migration/src/Riskeer.Migration/ProjectMigrator.cs (.../ProjectMigrator.cs) (revision 067b62cc6b5541809fa4f3ddf538e237188be738) +++ Ringtoets/Migration/src/Riskeer.Migration/ProjectMigrator.cs (.../ProjectMigrator.cs) (revision 28dbb95c1b189efc997079ca51c01a507f5b7543) @@ -45,7 +45,7 @@ private static readonly string currentDatabaseVersion = RingtoetsVersionHelper.GetCurrentDatabaseVersion(); private readonly ILog log = LogManager.GetLogger(typeof(ProjectMigrator)); - private readonly RingtoetsSqLiteDatabaseFileMigrator fileMigrator; + private readonly ProjectFileMigrator fileMigrator; private readonly IInquiryHelper inquiryHelper; private readonly FileFilterGenerator fileFilter; @@ -66,7 +66,7 @@ "RingtoetsMigrationLog.sqlite"); this.inquiryHelper = inquiryHelper; - fileMigrator = new RingtoetsSqLiteDatabaseFileMigrator + fileMigrator = new ProjectFileMigrator { LogPath = migrationLogPath }; Index: Ringtoets/Migration/test/Riskeer.Migration.Core.Test/ProjectFileMigratorTest.cs =================================================================== diff -u --- Ringtoets/Migration/test/Riskeer.Migration.Core.Test/ProjectFileMigratorTest.cs (revision 0) +++ Ringtoets/Migration/test/Riskeer.Migration.Core.Test/ProjectFileMigratorTest.cs (revision 28dbb95c1b189efc997079ca51c01a507f5b7543) @@ -0,0 +1,312 @@ +// Copyright (C) Stichting Deltares 2018. 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. + +using System; +using System.Data.SQLite; +using System.IO; +using Core.Common.TestUtil; +using Migration.Core.Storage; +using Migration.Scripts.Data.Exceptions; +using NUnit.Framework; +using Riskeer.Migration.Core.TestUtil; + +namespace Riskeer.Migration.Core.Test +{ + [TestFixture] + public class ProjectFileMigratorTest + { + private static TestCaseData[] ValidFromVersions + { + get + { + return new[] + { + new TestCaseData("5"), + new TestCaseData("17.1"), + new TestCaseData("17.2"), + new TestCaseData("17.3") + }; + } + } + + [Test] + public void Constructor_ReturnsExpectedValues() + { + // Call + var migrator = new ProjectFileMigrator(); + + // Assert + Assert.IsInstanceOf(migrator); + } + + [Test] + [TestCaseSource(nameof(ValidFromVersions))] + public void IsVersionSupported_SupportedVersion_ReturnsTrue(string fromVersion) + { + // Setup + var migrator = new ProjectFileMigrator(); + + // Call + bool isSupported = migrator.IsVersionSupported(fromVersion); + + // Assert + Assert.IsTrue(isSupported); + } + + [Test] + [TestCase("16.4")] + [TestCase("19.2")] + public void IsVersionSupported_UnsupportedVersion_ReturnsFalse(string fromVersion) + { + // Setup + var migrator = new ProjectFileMigrator(); + + // Call + bool isSupported = migrator.IsVersionSupported(fromVersion); + + // Assert + Assert.IsFalse(isSupported); + } + + [Test] + public void NeedsMigrate_NeedsMigrate_ReturnsTrue() + { + // Setup + string sourceFilePath = RingtoetsProjectMigrationTestHelper.GetOutdatedSupportedProjectFilePath(); + var versionedFile = new RingtoetsVersionedFile(sourceFilePath); + var migrator = new ProjectFileMigrator(); + + // Call + bool needsMigrate = migrator.NeedsMigrate(versionedFile, "17.1"); + + // Assert + Assert.IsTrue(needsMigrate); + } + + [Test] + public void NeedsMigrate_DoesNotNeedMigration_ReturnsFalse() + { + // Setup + string sourceFilePath = RingtoetsProjectMigrationTestHelper.GetOutdatedSupportedProjectFilePath(); + var versionedFile = new RingtoetsVersionedFile(sourceFilePath); + var migrator = new ProjectFileMigrator(); + + // Call + bool needsMigrate = migrator.NeedsMigrate(versionedFile, "4"); + + // Assert + Assert.IsFalse(needsMigrate); + } + + [Test] + public void Migrate_ValidFilesWithoutLogFile_SavesFileAtNewLocation() + { + // Setup + const string newVersion = "17.1"; + string sourceFilePath = RingtoetsProjectMigrationTestHelper.GetOutdatedSupportedProjectFilePath(); + var fromVersionedFile = new RingtoetsVersionedFile(sourceFilePath); + + string targetFilePath = TestHelper.GetScratchPadPath(nameof(Migrate_ValidFilesWithoutLogFile_SavesFileAtNewLocation)); + var migrator = new ProjectFileMigrator(); + + using (new FileDisposeHelper(targetFilePath)) + { + // Call + migrator.Migrate(fromVersionedFile, newVersion, targetFilePath); + + // Assert + var toVersionedFile = new RingtoetsVersionedFile(targetFilePath); + Assert.AreEqual(newVersion, toVersionedFile.GetVersion()); + } + } + + [Test] + public void Migrate_ValidFilesWithLogFile_SavesFileAtNewLocation() + { + // Setup + const string newVersion = "17.1"; + string sourceFilePath = RingtoetsProjectMigrationTestHelper.GetOutdatedSupportedProjectFilePath(); + var fromVersionedFile = new RingtoetsVersionedFile(sourceFilePath); + + string targetFilePath = TestHelper.GetScratchPadPath(nameof(Migrate_ValidFilesWithLogFile_SavesFileAtNewLocation)); + string logFilePath = TestHelper.GetScratchPadPath(string.Concat(nameof(Migrate_ValidFilesWithLogFile_SavesFileAtNewLocation), ".log")); + var migrator = new ProjectFileMigrator + { + LogPath = logFilePath + }; + + using (new FileDisposeHelper(logFilePath)) + using (new FileDisposeHelper(targetFilePath)) + { + // Call + migrator.Migrate(fromVersionedFile, newVersion, targetFilePath); + + // Assert + var toVersionedFile = new RingtoetsVersionedFile(targetFilePath); + Assert.AreEqual(newVersion, toVersionedFile.GetVersion()); + } + } + + [Test] + public void Migrate_ValidFilesWithNonExistingLogFile_ThrowsCriticalDatabaseMigrationException() + { + // Setup + const string newVersion = "17.1"; + string sourceFilePath = RingtoetsProjectMigrationTestHelper.GetOutdatedSupportedProjectFilePath(); + var fromVersionedFile = new RingtoetsVersionedFile(sourceFilePath); + + string targetFilePath = TestHelper.GetScratchPadPath(nameof(Migrate_ValidFilesWithNonExistingLogFile_ThrowsCriticalDatabaseMigrationException)); + string logFilePath = TestHelper.GetScratchPadPath(string.Concat(nameof(Migrate_ValidFilesWithNonExistingLogFile_ThrowsCriticalDatabaseMigrationException), ".log")); + var migrator = new ProjectFileMigrator + { + LogPath = logFilePath + }; + + using (new FileDisposeHelper(targetFilePath)) + { + // Call + TestDelegate call = () => migrator.Migrate(fromVersionedFile, newVersion, targetFilePath); + + // Assert + var exception = Assert.Throws(call); + Assert.IsInstanceOf(exception.InnerException); + } + } + + [Test] + public void Migrate_TargetFileInUse_ThrowsCriticalDatabaseMigrationException() + { + // Setup + const string newVersion = "17.1"; + string sourceFilePath = RingtoetsProjectMigrationTestHelper.GetOutdatedSupportedProjectFilePath(); + var fromVersionedFile = new RingtoetsVersionedFile(sourceFilePath); + + string targetFilePath = TestHelper.GetScratchPadPath(nameof(Migrate_TargetFileInUse_ThrowsCriticalDatabaseMigrationException)); + var migrator = new ProjectFileMigrator(); + + using (var fileDisposeHelper = new FileDisposeHelper(targetFilePath)) + { + fileDisposeHelper.LockFiles(); + + // Call + TestDelegate call = () => migrator.Migrate(fromVersionedFile, newVersion, targetFilePath); + + // Assert + var exception = Assert.Throws(call); + StringAssert.StartsWith("Het gemigreerde projectbestand is aangemaakt op '", exception.Message); + StringAssert.EndsWith($"', maar er is een onverwachte fout opgetreden tijdens het verplaatsen naar '{targetFilePath}'.", + exception.Message); + Assert.IsInstanceOf(exception.InnerException); + } + } + + [Test] + public void Migrate_TargetFilePathEqualsSourcePath_ThrowsCriticalDatabaseMigrationException() + { + // Setup + const string newVersion = "17.1"; + string sourceFilePath = RingtoetsProjectMigrationTestHelper.GetOutdatedSupportedProjectFilePath(); + var fromVersionedFile = new RingtoetsVersionedFile(sourceFilePath); + var migrator = new ProjectFileMigrator(); + + // Call + TestDelegate call = () => migrator.Migrate(fromVersionedFile, newVersion, sourceFilePath); + + // Assert + var exception = Assert.Throws(call); + Assert.AreEqual("Het doelprojectpad moet anders zijn dan het bronprojectpad.", + exception.Message); + } + + [Test] + public void Migrate_TargetFileNotWritable_ThrowsCriticalDatabaseMigrationException() + { + // Setup + const string newVersion = "17.1"; + string sourceFilePath = RingtoetsProjectMigrationTestHelper.GetOutdatedSupportedProjectFilePath(); + var fromVersionedFile = new RingtoetsVersionedFile(sourceFilePath); + + string targetFilePath = TestHelper.GetScratchPadPath(nameof(Migrate_TargetFileNotWritable_ThrowsCriticalDatabaseMigrationException)); + var migrator = new ProjectFileMigrator(); + + using (new FileDisposeHelper(targetFilePath)) + { + FileAttributes attributes = File.GetAttributes(targetFilePath); + File.SetAttributes(targetFilePath, attributes | FileAttributes.ReadOnly); + + try + { + // Call + TestDelegate call = () => migrator.Migrate(fromVersionedFile, newVersion, targetFilePath); + + // Assert + var exception = Assert.Throws(call); + StringAssert.StartsWith("Het gemigreerde projectbestand is aangemaakt op '", + exception.Message); + StringAssert.EndsWith($"', maar er is een onverwachte fout opgetreden tijdens het verplaatsen naar '{targetFilePath}'.", + exception.Message); + Assert.IsInstanceOf(exception.InnerException); + } + finally + { + File.SetAttributes(targetFilePath, attributes); + } + } + } + + [Test] + public void Migrate_InvalidToVersion_ThrowsCriticalDatabaseMigrationException() + { + // Setup + const string newVersion = "6"; + string sourceFilePath = RingtoetsProjectMigrationTestHelper.GetOutdatedSupportedProjectFilePath(); + var fromVersionedFile = new RingtoetsVersionedFile(sourceFilePath); + + string targetFilePath = TestHelper.GetScratchPadPath(nameof(Migrate_InvalidToVersion_ThrowsCriticalDatabaseMigrationException)); + var migrator = new ProjectFileMigrator(); + + // Call + TestDelegate call = () => migrator.Migrate(fromVersionedFile, newVersion, targetFilePath); + + // Assert + string message = Assert.Throws(call).Message; + Assert.AreEqual($"Het migreren van een projectbestand met versie '5' naar versie '{newVersion}' is niet ondersteund.", message); + } + + [Test] + public void Migrate_UnsupportedVersion_ThrowsCriticalDatabaseMigrationException() + { + // Setup + string sourceFilePath = RingtoetsProjectMigrationTestHelper.GetOutdatedUnSupportedProjectFilePath(); + var fromVersionedFile = new RingtoetsVersionedFile(sourceFilePath); + + string targetFilePath = TestHelper.GetScratchPadPath(nameof(Migrate_UnsupportedVersion_ThrowsCriticalDatabaseMigrationException)); + var migrator = new ProjectFileMigrator(); + + // Call + TestDelegate call = () => migrator.Migrate(fromVersionedFile, "17.1", targetFilePath); + + // Assert + string message = Assert.Throws(call).Message; + Assert.AreEqual("Het migreren van een projectbestand met versie '8' naar versie '17.1' is niet ondersteund.", message); + } + } +} \ No newline at end of file Fisheye: Tag 28dbb95c1b189efc997079ca51c01a507f5b7543 refers to a dead (removed) revision in file `Ringtoets/Migration/test/Riskeer.Migration.Core.Test/RingtoetsSqLiteDatabaseFileMigratorTest.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Ringtoets/Migration/test/Riskeer.Migration.Core.Test/Riskeer.Migration.Core.Test.csproj =================================================================== diff -u -rf00628f6e8118bc33753ab916e0fdff864dfd894 -r28dbb95c1b189efc997079ca51c01a507f5b7543 --- Ringtoets/Migration/test/Riskeer.Migration.Core.Test/Riskeer.Migration.Core.Test.csproj (.../Riskeer.Migration.Core.Test.csproj) (revision f00628f6e8118bc33753ab916e0fdff864dfd894) +++ Ringtoets/Migration/test/Riskeer.Migration.Core.Test/Riskeer.Migration.Core.Test.csproj (.../Riskeer.Migration.Core.Test.csproj) (revision 28dbb95c1b189efc997079ca51c01a507f5b7543) @@ -26,7 +26,7 @@ - + Index: Ringtoets/Migration/test/Riskeer.Migration.Core.TestUtil.Test/RingtoetsProjectMigrationTestHelperTest.cs =================================================================== diff -u -r7f2327ef368e480d9c27a9578f713765fd840bc8 -r28dbb95c1b189efc997079ca51c01a507f5b7543 --- Ringtoets/Migration/test/Riskeer.Migration.Core.TestUtil.Test/RingtoetsProjectMigrationTestHelperTest.cs (.../RingtoetsProjectMigrationTestHelperTest.cs) (revision 7f2327ef368e480d9c27a9578f713765fd840bc8) +++ Ringtoets/Migration/test/Riskeer.Migration.Core.TestUtil.Test/RingtoetsProjectMigrationTestHelperTest.cs (.../RingtoetsProjectMigrationTestHelperTest.cs) (revision 28dbb95c1b189efc997079ca51c01a507f5b7543) @@ -75,7 +75,7 @@ var versionedFile = new RingtoetsVersionedFile(projectFilePath); string actualTestProjectVersion = versionedFile.GetVersion(); - var migrator = new RingtoetsSqLiteDatabaseFileMigrator(); + var migrator = new ProjectFileMigrator(); Assert.IsTrue(migrator.IsVersionSupported(actualTestProjectVersion)); } @@ -112,7 +112,7 @@ var versionedFile = new RingtoetsVersionedFile(projectFilePath); string actualTestProjectVersion = versionedFile.GetVersion(); - var migrator = new RingtoetsSqLiteDatabaseFileMigrator(); + var migrator = new ProjectFileMigrator(); Assert.IsFalse(migrator.IsVersionSupported(actualTestProjectVersion)); } Index: Ringtoets/Migration/test/Riskeer.Migration.Integration.Test/MigrationIntegrationTest.cs =================================================================== diff -u -r92827b7879fc5c2544c51a84a7a16c96d9a2103d -r28dbb95c1b189efc997079ca51c01a507f5b7543 --- Ringtoets/Migration/test/Riskeer.Migration.Integration.Test/MigrationIntegrationTest.cs (.../MigrationIntegrationTest.cs) (revision 92827b7879fc5c2544c51a84a7a16c96d9a2103d) +++ Ringtoets/Migration/test/Riskeer.Migration.Integration.Test/MigrationIntegrationTest.cs (.../MigrationIntegrationTest.cs) (revision 28dbb95c1b189efc997079ca51c01a507f5b7543) @@ -53,7 +53,7 @@ string name = $"{nameof(GivenProject_WhenSpecialCharacterInPath_DoesNotThrowException)} \'[]!`~@#$%^€&()-_=+;,"; string targetFilePath = TestHelper.GetScratchPadPath(name); string logFilePath = TestHelper.GetScratchPadPath(string.Concat(name, sourceFile, ".log")); - var migrator = new RingtoetsSqLiteDatabaseFileMigrator + var migrator = new ProjectFileMigrator { LogPath = logFilePath }; @@ -88,7 +88,7 @@ nameof(GivenEmpty164Project_WhenNoChangesMadeAndMigratingToLatestVersion_ThenLogDatabaseContainsMessagesSayingNoChangesMade)); string logFilePath = TestHelper.GetScratchPadPath( string.Concat(nameof(GivenEmpty164Project_WhenNoChangesMadeAndMigratingToLatestVersion_ThenLogDatabaseContainsMessagesSayingNoChangesMade), ".log")); - var migrator = new RingtoetsSqLiteDatabaseFileMigrator + var migrator = new ProjectFileMigrator { LogPath = logFilePath }; Index: Ringtoets/Migration/test/Riskeer.Migration.Integration.Test/MigrationTo171IntegrationTest.cs =================================================================== diff -u -r92827b7879fc5c2544c51a84a7a16c96d9a2103d -r28dbb95c1b189efc997079ca51c01a507f5b7543 --- Ringtoets/Migration/test/Riskeer.Migration.Integration.Test/MigrationTo171IntegrationTest.cs (.../MigrationTo171IntegrationTest.cs) (revision 92827b7879fc5c2544c51a84a7a16c96d9a2103d) +++ Ringtoets/Migration/test/Riskeer.Migration.Integration.Test/MigrationTo171IntegrationTest.cs (.../MigrationTo171IntegrationTest.cs) (revision 28dbb95c1b189efc997079ca51c01a507f5b7543) @@ -42,7 +42,7 @@ string targetFilePath = TestHelper.GetScratchPadPath(nameof(Given164Project_WhenUpgradedTo171_ThenProjectAsExpected)); string logFilePath = TestHelper.GetScratchPadPath(string.Concat(nameof(Given164Project_WhenUpgradedTo171_ThenProjectAsExpected), ".log")); - var migrator = new RingtoetsSqLiteDatabaseFileMigrator + var migrator = new ProjectFileMigrator { LogPath = logFilePath }; Index: Ringtoets/Migration/test/Riskeer.Migration.Integration.Test/MigrationTo172IntegrationTest.cs =================================================================== diff -u -r42c365ba568e89bb0267c3788a2c46b816539244 -r28dbb95c1b189efc997079ca51c01a507f5b7543 --- Ringtoets/Migration/test/Riskeer.Migration.Integration.Test/MigrationTo172IntegrationTest.cs (.../MigrationTo172IntegrationTest.cs) (revision 42c365ba568e89bb0267c3788a2c46b816539244) +++ Ringtoets/Migration/test/Riskeer.Migration.Integration.Test/MigrationTo172IntegrationTest.cs (.../MigrationTo172IntegrationTest.cs) (revision 28dbb95c1b189efc997079ca51c01a507f5b7543) @@ -46,7 +46,7 @@ string targetFilePath = TestHelper.GetScratchPadPath(nameof(Given171Project_WhenUpgradedTo172_ThenProjectAsExpected)); string logFilePath = TestHelper.GetScratchPadPath(string.Concat(nameof(Given171Project_WhenUpgradedTo172_ThenProjectAsExpected), ".log")); - var migrator = new RingtoetsSqLiteDatabaseFileMigrator + var migrator = new ProjectFileMigrator { LogPath = logFilePath }; @@ -119,7 +119,7 @@ string targetFilePath = TestHelper.GetScratchPadPath(string.Concat(testName, "Target", ".sql")); string logFilePath = TestHelper.GetScratchPadPath(string.Concat(testName, ".log")); - var migrator = new RingtoetsSqLiteDatabaseFileMigrator + var migrator = new ProjectFileMigrator { LogPath = logFilePath }; @@ -204,7 +204,7 @@ string sourceFilePath = TestHelper.GetScratchPadPath(string.Concat(testName, "Source", ".sql")); string targetFilePath = TestHelper.GetScratchPadPath(string.Concat(testName, "Target", ".sql")); string logFilePath = TestHelper.GetScratchPadPath(string.Concat(testName, ".log")); - var migrator = new RingtoetsSqLiteDatabaseFileMigrator + var migrator = new ProjectFileMigrator { LogPath = logFilePath }; Index: Ringtoets/Migration/test/Riskeer.Migration.Integration.Test/MigrationTo173IntegrationTest.cs =================================================================== diff -u -r92827b7879fc5c2544c51a84a7a16c96d9a2103d -r28dbb95c1b189efc997079ca51c01a507f5b7543 --- Ringtoets/Migration/test/Riskeer.Migration.Integration.Test/MigrationTo173IntegrationTest.cs (.../MigrationTo173IntegrationTest.cs) (revision 92827b7879fc5c2544c51a84a7a16c96d9a2103d) +++ Ringtoets/Migration/test/Riskeer.Migration.Integration.Test/MigrationTo173IntegrationTest.cs (.../MigrationTo173IntegrationTest.cs) (revision 28dbb95c1b189efc997079ca51c01a507f5b7543) @@ -41,7 +41,7 @@ string targetFilePath = TestHelper.GetScratchPadPath(nameof(Given172Project_WhenUpgradedTo173_ThenProjectAsExpected)); string logFilePath = TestHelper.GetScratchPadPath(string.Concat(nameof(Given172Project_WhenUpgradedTo173_ThenProjectAsExpected), ".log")); - var migrator = new RingtoetsSqLiteDatabaseFileMigrator + var migrator = new ProjectFileMigrator { LogPath = logFilePath }; Index: Ringtoets/Migration/test/Riskeer.Migration.Integration.Test/MigrationTo181IntegrationTest.cs =================================================================== diff -u -r92827b7879fc5c2544c51a84a7a16c96d9a2103d -r28dbb95c1b189efc997079ca51c01a507f5b7543 --- Ringtoets/Migration/test/Riskeer.Migration.Integration.Test/MigrationTo181IntegrationTest.cs (.../MigrationTo181IntegrationTest.cs) (revision 92827b7879fc5c2544c51a84a7a16c96d9a2103d) +++ Ringtoets/Migration/test/Riskeer.Migration.Integration.Test/MigrationTo181IntegrationTest.cs (.../MigrationTo181IntegrationTest.cs) (revision 28dbb95c1b189efc997079ca51c01a507f5b7543) @@ -61,7 +61,7 @@ string targetFilePath = TestHelper.GetScratchPadPath(nameof(Given173Project_WhenUpgradedTo181_ThenProjectAsExpected)); string logFilePath = TestHelper.GetScratchPadPath(string.Concat(nameof(Given173Project_WhenUpgradedTo181_ThenProjectAsExpected), ".log")); - var migrator = new RingtoetsSqLiteDatabaseFileMigrator + var migrator = new ProjectFileMigrator { LogPath = logFilePath }; Index: Ringtoets/Migration/test/Riskeer.Migration.Integration.Test/MigrationTo191IntegrationTest.cs =================================================================== diff -u -r92827b7879fc5c2544c51a84a7a16c96d9a2103d -r28dbb95c1b189efc997079ca51c01a507f5b7543 --- Ringtoets/Migration/test/Riskeer.Migration.Integration.Test/MigrationTo191IntegrationTest.cs (.../MigrationTo191IntegrationTest.cs) (revision 92827b7879fc5c2544c51a84a7a16c96d9a2103d) +++ Ringtoets/Migration/test/Riskeer.Migration.Integration.Test/MigrationTo191IntegrationTest.cs (.../MigrationTo191IntegrationTest.cs) (revision 28dbb95c1b189efc997079ca51c01a507f5b7543) @@ -41,7 +41,7 @@ string targetFilePath = TestHelper.GetScratchPadPath(nameof(Given181Project_WhenUpgradedTo182_ThenProjectAsExpected)); string logFilePath = TestHelper.GetScratchPadPath(string.Concat(nameof(Given181Project_WhenUpgradedTo182_ThenProjectAsExpected), ".log")); - var migrator = new RingtoetsSqLiteDatabaseFileMigrator + var migrator = new ProjectFileMigrator { LogPath = logFilePath };