Index: Application/Riskeer/test/Application.Riskeer.Integration.Test/StorageMigrationIntegrationTest.cs
===================================================================
diff -u -r90f87eebb88346c2b0c9c13ebfa50c0c6e5b4157 -r90c83a71cec7caa0b9fc98cd8d5cd24a8ce7c111
--- Application/Riskeer/test/Application.Riskeer.Integration.Test/StorageMigrationIntegrationTest.cs (.../StorageMigrationIntegrationTest.cs) (revision 90f87eebb88346c2b0c9c13ebfa50c0c6e5b4157)
+++ Application/Riskeer/test/Application.Riskeer.Integration.Test/StorageMigrationIntegrationTest.cs (.../StorageMigrationIntegrationTest.cs) (revision 90c83a71cec7caa0b9fc98cd8d5cd24a8ce7c111)
@@ -44,7 +44,7 @@
private DirectoryDisposeHelper directoryDisposeHelper;
[Test]
- [TestCaseSource(typeof(RingtoetsProjectMigrationTestHelper), nameof(RingtoetsProjectMigrationTestHelper.GetAllOutdatedSupportedProjectFileVersions))]
+ [TestCaseSource(typeof(ProjectMigrationTestHelper), nameof(ProjectMigrationTestHelper.GetAllOutdatedSupportedProjectFileVersions))]
[Apartment(ApartmentState.STA)]
public void GivenRingtoetsGuiWithStorageSql_WhenRunWithMigratedFile_MigratedProjectSet(string version)
{
@@ -78,7 +78,7 @@
}
[Test]
- [TestCaseSource(typeof(RingtoetsProjectMigrationTestHelper), nameof(RingtoetsProjectMigrationTestHelper.GetAllOutdatedSupportedProjectFileVersions))]
+ [TestCaseSource(typeof(ProjectMigrationTestHelper), nameof(ProjectMigrationTestHelper.GetAllOutdatedSupportedProjectFileVersions))]
[Apartment(ApartmentState.STA)]
public void GivenRingtoetsGui_WhenRunWithUnmigratedFileAndInquireContinuation_MigratedProjectSet(string version)
{
@@ -116,7 +116,7 @@
}
[Test]
- [TestCaseSource(typeof(RingtoetsProjectMigrationTestHelper), nameof(RingtoetsProjectMigrationTestHelper.GetAllOutdatedSupportedProjectFileVersions))]
+ [TestCaseSource(typeof(ProjectMigrationTestHelper), nameof(ProjectMigrationTestHelper.GetAllOutdatedSupportedProjectFileVersions))]
[Apartment(ApartmentState.STA)]
public void GivenRingtoetsGui_WhenRunWithUnmigratedFileAndNoInquireContinuation_MigratedProjectNotSet(string version)
{
Index: Ringtoets/Migration/test/Riskeer.Migration.Core.Test/ProjectFileMigratorTest.cs
===================================================================
diff -u -r90f87eebb88346c2b0c9c13ebfa50c0c6e5b4157 -r90c83a71cec7caa0b9fc98cd8d5cd24a8ce7c111
--- Ringtoets/Migration/test/Riskeer.Migration.Core.Test/ProjectFileMigratorTest.cs (.../ProjectFileMigratorTest.cs) (revision 90f87eebb88346c2b0c9c13ebfa50c0c6e5b4157)
+++ Ringtoets/Migration/test/Riskeer.Migration.Core.Test/ProjectFileMigratorTest.cs (.../ProjectFileMigratorTest.cs) (revision 90c83a71cec7caa0b9fc98cd8d5cd24a8ce7c111)
@@ -90,7 +90,7 @@
public void NeedsMigrate_NeedsMigrate_ReturnsTrue()
{
// Setup
- string sourceFilePath = RingtoetsProjectMigrationTestHelper.GetOutdatedSupportedProjectFilePath();
+ string sourceFilePath = ProjectMigrationTestHelper.GetOutdatedSupportedProjectFilePath();
var versionedFile = new ProjectVersionedFile(sourceFilePath);
var migrator = new ProjectFileMigrator();
@@ -105,7 +105,7 @@
public void NeedsMigrate_DoesNotNeedMigration_ReturnsFalse()
{
// Setup
- string sourceFilePath = RingtoetsProjectMigrationTestHelper.GetOutdatedSupportedProjectFilePath();
+ string sourceFilePath = ProjectMigrationTestHelper.GetOutdatedSupportedProjectFilePath();
var versionedFile = new ProjectVersionedFile(sourceFilePath);
var migrator = new ProjectFileMigrator();
@@ -121,7 +121,7 @@
{
// Setup
const string newVersion = "17.1";
- string sourceFilePath = RingtoetsProjectMigrationTestHelper.GetOutdatedSupportedProjectFilePath();
+ string sourceFilePath = ProjectMigrationTestHelper.GetOutdatedSupportedProjectFilePath();
var fromVersionedFile = new ProjectVersionedFile(sourceFilePath);
string targetFilePath = TestHelper.GetScratchPadPath(nameof(Migrate_ValidFilesWithoutLogFile_SavesFileAtNewLocation));
@@ -143,7 +143,7 @@
{
// Setup
const string newVersion = "17.1";
- string sourceFilePath = RingtoetsProjectMigrationTestHelper.GetOutdatedSupportedProjectFilePath();
+ string sourceFilePath = ProjectMigrationTestHelper.GetOutdatedSupportedProjectFilePath();
var fromVersionedFile = new ProjectVersionedFile(sourceFilePath);
string targetFilePath = TestHelper.GetScratchPadPath(nameof(Migrate_ValidFilesWithLogFile_SavesFileAtNewLocation));
@@ -170,7 +170,7 @@
{
// Setup
const string newVersion = "17.1";
- string sourceFilePath = RingtoetsProjectMigrationTestHelper.GetOutdatedSupportedProjectFilePath();
+ string sourceFilePath = ProjectMigrationTestHelper.GetOutdatedSupportedProjectFilePath();
var fromVersionedFile = new ProjectVersionedFile(sourceFilePath);
string targetFilePath = TestHelper.GetScratchPadPath(nameof(Migrate_ValidFilesWithNonExistingLogFile_ThrowsCriticalDatabaseMigrationException));
@@ -196,7 +196,7 @@
{
// Setup
const string newVersion = "17.1";
- string sourceFilePath = RingtoetsProjectMigrationTestHelper.GetOutdatedSupportedProjectFilePath();
+ string sourceFilePath = ProjectMigrationTestHelper.GetOutdatedSupportedProjectFilePath();
var fromVersionedFile = new ProjectVersionedFile(sourceFilePath);
string targetFilePath = TestHelper.GetScratchPadPath(nameof(Migrate_TargetFileInUse_ThrowsCriticalDatabaseMigrationException));
@@ -223,7 +223,7 @@
{
// Setup
const string newVersion = "17.1";
- string sourceFilePath = RingtoetsProjectMigrationTestHelper.GetOutdatedSupportedProjectFilePath();
+ string sourceFilePath = ProjectMigrationTestHelper.GetOutdatedSupportedProjectFilePath();
var fromVersionedFile = new ProjectVersionedFile(sourceFilePath);
var migrator = new ProjectFileMigrator();
@@ -241,7 +241,7 @@
{
// Setup
const string newVersion = "17.1";
- string sourceFilePath = RingtoetsProjectMigrationTestHelper.GetOutdatedSupportedProjectFilePath();
+ string sourceFilePath = ProjectMigrationTestHelper.GetOutdatedSupportedProjectFilePath();
var fromVersionedFile = new ProjectVersionedFile(sourceFilePath);
string targetFilePath = TestHelper.GetScratchPadPath(nameof(Migrate_TargetFileNotWritable_ThrowsCriticalDatabaseMigrationException));
@@ -277,7 +277,7 @@
{
// Setup
const string newVersion = "6";
- string sourceFilePath = RingtoetsProjectMigrationTestHelper.GetOutdatedSupportedProjectFilePath();
+ string sourceFilePath = ProjectMigrationTestHelper.GetOutdatedSupportedProjectFilePath();
var fromVersionedFile = new ProjectVersionedFile(sourceFilePath);
string targetFilePath = TestHelper.GetScratchPadPath(nameof(Migrate_InvalidToVersion_ThrowsCriticalDatabaseMigrationException));
@@ -295,7 +295,7 @@
public void Migrate_UnsupportedVersion_ThrowsCriticalDatabaseMigrationException()
{
// Setup
- string sourceFilePath = RingtoetsProjectMigrationTestHelper.GetOutdatedUnSupportedProjectFilePath();
+ string sourceFilePath = ProjectMigrationTestHelper.GetOutdatedUnSupportedProjectFilePath();
var fromVersionedFile = new ProjectVersionedFile(sourceFilePath);
string targetFilePath = TestHelper.GetScratchPadPath(nameof(Migrate_UnsupportedVersion_ThrowsCriticalDatabaseMigrationException));
Index: Ringtoets/Migration/test/Riskeer.Migration.Core.TestUtil.Test/ProjectMigrationTestHelperTest.cs
===================================================================
diff -u
--- Ringtoets/Migration/test/Riskeer.Migration.Core.TestUtil.Test/ProjectMigrationTestHelperTest.cs (revision 0)
+++ Ringtoets/Migration/test/Riskeer.Migration.Core.TestUtil.Test/ProjectMigrationTestHelperTest.cs (revision 90c83a71cec7caa0b9fc98cd8d5cd24a8ce7c111)
@@ -0,0 +1,157 @@
+// 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 Core.Common.Base.Data;
+using Core.Common.TestUtil;
+using Core.Common.Util;
+using NUnit.Framework;
+using Ringtoets.Common.Util;
+using Riskeer.Storage.Core;
+
+namespace Riskeer.Migration.Core.TestUtil.Test
+{
+ [TestFixture]
+ public class ProjectMigrationTestHelperTest
+ {
+ private readonly string currentDatabaseVersion = RingtoetsVersionHelper.GetCurrentDatabaseVersion();
+
+ [Test]
+ public void GetLatestProjectFilePath_Always_ReturnsProjectFilePathToLatestProjectVersion()
+ {
+ // Call
+ string latestProjectFilePath = ProjectMigrationTestHelper.GetLatestProjectFilePath();
+
+ // Assert
+ AssertFilePath(latestProjectFilePath);
+
+ var versionedFile = new ProjectVersionedFile(latestProjectFilePath);
+ string actualTestProjectVersion = versionedFile.GetVersion();
+ string assertionMessage = $"Database version {actualTestProjectVersion} of the testproject must match with the current database version {currentDatabaseVersion}.";
+ Assert.AreEqual(currentDatabaseVersion, actualTestProjectVersion, assertionMessage);
+ }
+
+ [Test]
+ public void GetLatestProjectFilePath_Always_ReturnsProjectThatCanBeLoaded()
+ {
+ // Setup
+ string latestProjectFilePath = ProjectMigrationTestHelper.GetLatestProjectFilePath();
+
+ // Call
+ IProject project = new StorageSqLite().LoadProject(latestProjectFilePath);
+
+ // Assert
+ Assert.IsNotNull(project);
+ }
+
+ [Test]
+ public void GetOutdatedSupportedProjectFilePath_Always_ReturnsProjectFilePathToSupportedProjectVersion()
+ {
+ // Call
+ string projectFilePath = ProjectMigrationTestHelper.GetOutdatedSupportedProjectFilePath();
+
+ // Assert
+ AssertFilePath(projectFilePath);
+
+ var versionedFile = new ProjectVersionedFile(projectFilePath);
+ string actualTestProjectVersion = versionedFile.GetVersion();
+ var migrator = new ProjectFileMigrator();
+ Assert.IsTrue(migrator.IsVersionSupported(actualTestProjectVersion));
+ }
+
+ [Test]
+ public void GetAllOutdatedSupportedProjectFileVersions_Always_ReturnsAllProjectFilePathsToSupportedProjectVersions()
+ {
+ // Setup
+ string[] versions = ProjectMigrationTestHelper.GetAllOutdatedSupportedProjectFileVersions().ToArray();
+
+ // Call
+ List returnedProjectVersions = versions.Select(v => new ProjectVersionedFile(TestHelper.GetTestDataPath(TestDataPath.Ringtoets.Migration.Core,
+ $"MigrationTestProject{v}.rtd")).GetVersion()).ToList();
+
+ // Assert
+ IEnumerable expectedProjectVersions = new[]
+ {
+ "5",
+ "17.1",
+ "17.2",
+ "17.3",
+ "18.1"
+ };
+ CollectionAssert.AreEqual(expectedProjectVersions, returnedProjectVersions);
+ }
+
+ [Test]
+ public void GetOutdatedUnsupportedProjectFilePath_Always_ReturnsProjectFilePathToUnsupportedProjectVersion()
+ {
+ // Call
+ string projectFilePath = ProjectMigrationTestHelper.GetOutdatedUnSupportedProjectFilePath();
+
+ // Assert
+ AssertFilePath(projectFilePath);
+
+ var versionedFile = new ProjectVersionedFile(projectFilePath);
+ string actualTestProjectVersion = versionedFile.GetVersion();
+ var migrator = new ProjectFileMigrator();
+ Assert.IsFalse(migrator.IsVersionSupported(actualTestProjectVersion));
+ }
+
+ [Test]
+ public void AssertMigrationScript_IsEqualToStorageScript()
+ {
+ // Setup
+ string solutionRoot = TestHelper.SolutionRoot;
+ const string baseFileName = "DatabaseStructure";
+ string migrationFileName = $"{baseFileName}{currentDatabaseVersion}";
+
+ string applicationScriptFilePath = Path.Combine(solutionRoot, "build", $"{baseFileName}.sql");
+ string migrationScriptFilePath = Path.Combine(solutionRoot, "Ringtoets", "Migration", "src", "Riskeer.Migration.Core", "EmbeddedResources", $"{migrationFileName}.sql");
+
+ // Precondition
+ AssertFilePath(applicationScriptFilePath);
+ AssertFilePath(migrationScriptFilePath);
+
+ // Call
+ string[] applicationScriptContents = File.ReadAllLines(applicationScriptFilePath);
+ string[] migrationScriptContents = File.ReadAllLines(migrationScriptFilePath);
+
+ // Assert
+ int expectedAmountOfLines = applicationScriptContents.Length;
+ const string assertionMessage = "Application and migration SQL scripts do not have the same length.";
+ Assert.AreEqual(expectedAmountOfLines, migrationScriptContents.Length, assertionMessage);
+
+ for (var i = 0; i < expectedAmountOfLines; i++)
+ {
+ Assert.AreEqual(applicationScriptContents[i],
+ migrationScriptContents[i],
+ $"Mismatch between application and migration SQL scripts detected at line: {i + 1}.");
+ }
+ }
+
+ private static void AssertFilePath(string filePath)
+ {
+ Assert.IsTrue(IOUtils.IsValidFilePath(filePath));
+ Assert.IsTrue(File.Exists(filePath));
+ }
+ }
+}
\ No newline at end of file
Fisheye: Tag 90c83a71cec7caa0b9fc98cd8d5cd24a8ce7c111 refers to a dead (removed) revision in file `Ringtoets/Migration/test/Riskeer.Migration.Core.TestUtil.Test/RingtoetsProjectMigrationTestHelperTest.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Index: Ringtoets/Migration/test/Riskeer.Migration.Core.TestUtil.Test/Riskeer.Migration.Core.TestUtil.Test.csproj
===================================================================
diff -u -rb746c8870b5941e0d01a25c202a0fd22c72c9711 -r90c83a71cec7caa0b9fc98cd8d5cd24a8ce7c111
--- Ringtoets/Migration/test/Riskeer.Migration.Core.TestUtil.Test/Riskeer.Migration.Core.TestUtil.Test.csproj (.../Riskeer.Migration.Core.TestUtil.Test.csproj) (revision b746c8870b5941e0d01a25c202a0fd22c72c9711)
+++ Ringtoets/Migration/test/Riskeer.Migration.Core.TestUtil.Test/Riskeer.Migration.Core.TestUtil.Test.csproj (.../Riskeer.Migration.Core.TestUtil.Test.csproj) (revision 90c83a71cec7caa0b9fc98cd8d5cd24a8ce7c111)
@@ -29,7 +29,7 @@
-
+
Index: Ringtoets/Migration/test/Riskeer.Migration.Core.TestUtil/ProjectMigrationTestHelper.cs
===================================================================
diff -u
--- Ringtoets/Migration/test/Riskeer.Migration.Core.TestUtil/ProjectMigrationTestHelper.cs (revision 0)
+++ Ringtoets/Migration/test/Riskeer.Migration.Core.TestUtil/ProjectMigrationTestHelper.cs (revision 90c83a71cec7caa0b9fc98cd8d5cd24a8ce7c111)
@@ -0,0 +1,89 @@
+// 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 Core.Common.TestUtil;
+using Ringtoets.Common.Util;
+
+namespace Riskeer.Migration.Core.TestUtil
+{
+ ///
+ /// Class which provides file paths of the project files that can
+ /// be used for testing migration functionality.
+ ///
+ public static class ProjectMigrationTestHelper
+ {
+ private static readonly TestDataPath testDataPath = TestDataPath.Ringtoets.Migration.Core;
+
+ ///
+ /// Retrieves the file path of a project with the latest database version
+ /// format.
+ ///
+ /// A file path to a project file with the latest database version.
+ public static string GetLatestProjectFilePath()
+ {
+ string currentDatabaseVersion = RingtoetsVersionHelper.GetCurrentDatabaseVersion();
+ string versionSuffix = currentDatabaseVersion.Replace(".", string.Empty);
+ string projectFileName = $"MigrationTestProject{versionSuffix}.rtd";
+
+ return TestHelper.GetTestDataPath(testDataPath, projectFileName);
+ }
+
+ ///
+ /// Retrieves the file path of a project with an older database version,
+ /// which is supported for migration.
+ ///
+ /// A file path to an outdated project which is supported
+ /// for migration.
+ public static string GetOutdatedSupportedProjectFilePath()
+ {
+ const string projectFileName = "MigrationTestProject164.rtd";
+ return TestHelper.GetTestDataPath(testDataPath, projectFileName);
+ }
+
+ ///
+ /// Retrieves the version numbers of all projects with an older database version,
+ /// which are supported for the migration.
+ ///
+ /// An of all the version numbers of supported
+ /// outdated projects.
+ public static IEnumerable GetAllOutdatedSupportedProjectFileVersions()
+ {
+ yield return "164";
+ yield return "171";
+ yield return "172";
+ yield return "173";
+ yield return "181";
+ }
+
+ ///
+ /// Retrieves the file path of a project with an unsupported database version
+ /// which is unsupported for migration.
+ ///
+ /// A file path to an outdated project which is unsupported for
+ /// migration.
+ public static string GetOutdatedUnSupportedProjectFilePath()
+ {
+ const string projectFileName = "UnsupportedVersion8.rtd";
+ return TestHelper.GetTestDataPath(testDataPath, projectFileName);
+ }
+ }
+}
\ No newline at end of file
Fisheye: Tag 90c83a71cec7caa0b9fc98cd8d5cd24a8ce7c111 refers to a dead (removed) revision in file `Ringtoets/Migration/test/Riskeer.Migration.Core.TestUtil/RingtoetsProjectMigrationTestHelper.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Index: Ringtoets/Migration/test/Riskeer.Migration.Core.TestUtil/Riskeer.Migration.Core.TestUtil.csproj
===================================================================
diff -u -r3a530e0bfbf222411cddbca22991582f5cc7d1ba -r90c83a71cec7caa0b9fc98cd8d5cd24a8ce7c111
--- Ringtoets/Migration/test/Riskeer.Migration.Core.TestUtil/Riskeer.Migration.Core.TestUtil.csproj (.../Riskeer.Migration.Core.TestUtil.csproj) (revision 3a530e0bfbf222411cddbca22991582f5cc7d1ba)
+++ Ringtoets/Migration/test/Riskeer.Migration.Core.TestUtil/Riskeer.Migration.Core.TestUtil.csproj (.../Riskeer.Migration.Core.TestUtil.csproj) (revision 90c83a71cec7caa0b9fc98cd8d5cd24a8ce7c111)
@@ -21,7 +21,7 @@
-
+
Index: Ringtoets/Migration/test/Riskeer.Migration.Test/ProjectMigratorTest.cs
===================================================================
diff -u -r90f87eebb88346c2b0c9c13ebfa50c0c6e5b4157 -r90c83a71cec7caa0b9fc98cd8d5cd24a8ce7c111
--- Ringtoets/Migration/test/Riskeer.Migration.Test/ProjectMigratorTest.cs (.../ProjectMigratorTest.cs) (revision 90f87eebb88346c2b0c9c13ebfa50c0c6e5b4157)
+++ Ringtoets/Migration/test/Riskeer.Migration.Test/ProjectMigratorTest.cs (.../ProjectMigratorTest.cs) (revision 90c83a71cec7caa0b9fc98cd8d5cd24a8ce7c111)
@@ -135,7 +135,7 @@
var inquiryHelper = mocks.Stub();
mocks.ReplayAll();
- string sourceFilePath = RingtoetsProjectMigrationTestHelper.GetOutdatedUnSupportedProjectFilePath();
+ string sourceFilePath = ProjectMigrationTestHelper.GetOutdatedUnSupportedProjectFilePath();
var versionedFile = new ProjectVersionedFile(sourceFilePath);
string fileVersion = versionedFile.GetVersion();
@@ -167,7 +167,7 @@
inquiryHelper.Expect(h => h.InquireContinuation(question)).Return(confirmContinuation);
mocks.ReplayAll();
- string sourceFilePath = RingtoetsProjectMigrationTestHelper.GetOutdatedSupportedProjectFilePath();
+ string sourceFilePath = ProjectMigrationTestHelper.GetOutdatedSupportedProjectFilePath();
var migrator = new ProjectMigrator(inquiryHelper);
@@ -199,7 +199,7 @@
var inquiryHelper = mocks.Stub();
mocks.ReplayAll();
- string sourceFilePath = RingtoetsProjectMigrationTestHelper.GetLatestProjectFilePath();
+ string sourceFilePath = ProjectMigrationTestHelper.GetLatestProjectFilePath();
var migrator = new ProjectMigrator(inquiryHelper);
@@ -352,7 +352,7 @@
var migrator = new ProjectMigrator(inquiryHelper);
- string sourceFilePath = RingtoetsProjectMigrationTestHelper.GetOutdatedSupportedProjectFilePath();
+ string sourceFilePath = ProjectMigrationTestHelper.GetOutdatedSupportedProjectFilePath();
// Call
TestDelegate call = () => migrator.Migrate(sourceFilePath, null);
@@ -400,7 +400,7 @@
var migrator = new ProjectMigrator(inquiryHelper);
- string sourceFilePath = RingtoetsProjectMigrationTestHelper.GetOutdatedSupportedProjectFilePath();
+ string sourceFilePath = ProjectMigrationTestHelper.GetOutdatedSupportedProjectFilePath();
// Call
TestDelegate call = () => migrator.Migrate(sourceFilePath, invalidFilePath);
@@ -418,7 +418,7 @@
public void GivenMigratorAndSupportedFile_WhenValidTargetLocationGiven_ThenFileSuccessfullyMigrates()
{
// Given
- string sourceFilePath = RingtoetsProjectMigrationTestHelper.GetOutdatedSupportedProjectFilePath();
+ string sourceFilePath = ProjectMigrationTestHelper.GetOutdatedSupportedProjectFilePath();
string targetFile = $"{nameof(ProjectMigratorTest)}." +
$"{nameof(GivenMigratorAndSupportedFile_WhenValidTargetLocationGiven_ThenFileSuccessfullyMigrates)}.rtd";
@@ -548,7 +548,7 @@
public void Migrate_MigrationLogDatabaseInUse_MigrationFailsAndLogsError()
{
// Setup
- string sourceFilePath = RingtoetsProjectMigrationTestHelper.GetOutdatedSupportedProjectFilePath();
+ string sourceFilePath = ProjectMigrationTestHelper.GetOutdatedSupportedProjectFilePath();
string targetFile = $"{nameof(ProjectMigratorTest)}." +
$"{nameof(Migrate_MigrationLogDatabaseInUse_MigrationFailsAndLogsError)}.rtd";
string targetFilePath = Path.Combine(TestHelper.GetScratchPadPath(), testDirectory, targetFile);
@@ -593,7 +593,7 @@
public void Migrate_UnableToSaveAtTargetFilePath_MigrationFailsAndLogsError()
{
// Setup
- string sourceFilePath = RingtoetsProjectMigrationTestHelper.GetOutdatedSupportedProjectFilePath();
+ string sourceFilePath = ProjectMigrationTestHelper.GetOutdatedSupportedProjectFilePath();
string targetFile = $"{nameof(ProjectMigratorTest)}." +
$"{nameof(Migrate_UnableToSaveAtTargetFilePath_MigrationFailsAndLogsError)}.rtd";
string targetFilePath = Path.Combine(TestHelper.GetScratchPadPath(), testDirectory, targetFile);
@@ -639,7 +639,7 @@
public void Migrate_UnsupportedSourceFileVersion_MigrationFailsAndLogsError()
{
// Setup
- string sourceFilePath = RingtoetsProjectMigrationTestHelper.GetOutdatedUnSupportedProjectFilePath();
+ string sourceFilePath = ProjectMigrationTestHelper.GetOutdatedUnSupportedProjectFilePath();
string targetFile = $"{nameof(ProjectMigratorTest)}." +
$"{nameof(Migrate_UnsupportedSourceFileVersion_MigrationFailsAndLogsError)}";
string targetFilePath = Path.Combine(TestHelper.GetScratchPadPath(), testDirectory, targetFile);
@@ -682,7 +682,7 @@
public void Migrate_TargetFileSameAsSourceFile_MigrationFailsAndLogsError()
{
// Setup
- string sourceFilePath = RingtoetsProjectMigrationTestHelper.GetOutdatedSupportedProjectFilePath();
+ string sourceFilePath = ProjectMigrationTestHelper.GetOutdatedSupportedProjectFilePath();
var mocks = new MockRepository();
var inquiryHelper = mocks.Stub();