Index: Application/Ringtoets/src/Application.Ringtoets.Migration/Application.Ringtoets.Migration.csproj
===================================================================
diff -u -r3c04633ccf2eacbc1e0dc2db5a2a381080c3a035 -r5ec759496df2662a183c1c5ed74e3724bd834ae2
--- Application/Ringtoets/src/Application.Ringtoets.Migration/Application.Ringtoets.Migration.csproj (.../Application.Ringtoets.Migration.csproj) (revision 3c04633ccf2eacbc1e0dc2db5a2a381080c3a035)
+++ Application/Ringtoets/src/Application.Ringtoets.Migration/Application.Ringtoets.Migration.csproj (.../Application.Ringtoets.Migration.csproj) (revision 5ec759496df2662a183c1c5ed74e3724bd834ae2)
@@ -64,6 +64,11 @@
+
+ {3bbfd65b-b277-4e50-ae6d-bd24c3434609}
+ Core.Common.Base
+ False
+ {30e4c2ae-719e-4d70-9fa9-668a9767fbfa}Core.Common.Gui
Index: Application/Ringtoets/src/Application.Ringtoets.Migration/RingtoetsProjectMigrator.cs
===================================================================
diff -u -rb6d487f36edb7b6ca133a0e26d1ab7bda4c6bab6 -r5ec759496df2662a183c1c5ed74e3724bd834ae2
--- Application/Ringtoets/src/Application.Ringtoets.Migration/RingtoetsProjectMigrator.cs (.../RingtoetsProjectMigrator.cs) (revision b6d487f36edb7b6ca133a0e26d1ab7bda4c6bab6)
+++ Application/Ringtoets/src/Application.Ringtoets.Migration/RingtoetsProjectMigrator.cs (.../RingtoetsProjectMigrator.cs) (revision 5ec759496df2662a183c1c5ed74e3724bd834ae2)
@@ -24,6 +24,7 @@
using System.Windows.Forms;
using Application.Ringtoets.Migration.Core;
using Application.Ringtoets.Migration.Properties;
+using Core.Common.Base.Storage;
using Core.Common.Gui;
using Core.Common.Utils;
using log4net;
@@ -37,7 +38,7 @@
///
/// A GUI implementation to migrate a Ringtoets database file to a newer version.
///
- public class RingtoetsProjectMigrator
+ public class RingtoetsProjectMigrator : IMigrateProject
{
private static readonly string currentProjectVersion = RingtoetsVersionHelper.GetCurrentDatabaseVersion();
@@ -63,18 +64,6 @@
Resources.RingtoetsProject_FileExtension);
}
- ///
- /// Indicates if the project needs to be
- /// updated to the newest version.
- ///
- /// The file path of the project which needs to be checked.
- /// true if the file needs to be migrated, false if:
- ///
- /// The file does not need to be migrated.
- /// The file is not supported for the migration.
- ///
- /// Thrown when is null.
- /// Thrown when is an invalid file path.
public bool ShouldMigrate(string sourceFilePath)
{
if (sourceFilePath == null)
@@ -102,18 +91,6 @@
return isVersionSupported;
}
- ///
- /// Migrates an outdated project file from
- /// to the newest project version version at a user defined target filepath.
- ///
- /// The project file which needs to be migrated.
- /// A filepath to the updated project file. null if:
- ///
- /// The user cancelled.
- /// The migration failed.
- ///
- /// Thrown when is null.
- /// Thrown when is an invalid file path.
public string Migrate(string sourceFilePath)
{
if (sourceFilePath == null)
Index: Application/Ringtoets/test/Application.Ringtoets.Migration.Test/Application.Ringtoets.Migration.Test.csproj
===================================================================
diff -u -rb6d487f36edb7b6ca133a0e26d1ab7bda4c6bab6 -r5ec759496df2662a183c1c5ed74e3724bd834ae2
--- Application/Ringtoets/test/Application.Ringtoets.Migration.Test/Application.Ringtoets.Migration.Test.csproj (.../Application.Ringtoets.Migration.Test.csproj) (revision b6d487f36edb7b6ca133a0e26d1ab7bda4c6bab6)
+++ Application/Ringtoets/test/Application.Ringtoets.Migration.Test/Application.Ringtoets.Migration.Test.csproj (.../Application.Ringtoets.Migration.Test.csproj) (revision 5ec759496df2662a183c1c5ed74e3724bd834ae2)
@@ -64,6 +64,10 @@
+
+ {3BBFD65B-B277-4E50-AE6D-BD24C3434609}
+ Core.Common.Base
+ {30E4C2AE-719E-4D70-9FA9-668A9767FBFA}Core.Common.Gui
Index: Application/Ringtoets/test/Application.Ringtoets.Migration.Test/RingtoetsProjectMigratorTest.cs
===================================================================
diff -u -rb6d487f36edb7b6ca133a0e26d1ab7bda4c6bab6 -r5ec759496df2662a183c1c5ed74e3724bd834ae2
--- Application/Ringtoets/test/Application.Ringtoets.Migration.Test/RingtoetsProjectMigratorTest.cs (.../RingtoetsProjectMigratorTest.cs) (revision b6d487f36edb7b6ca133a0e26d1ab7bda4c6bab6)
+++ Application/Ringtoets/test/Application.Ringtoets.Migration.Test/RingtoetsProjectMigratorTest.cs (.../RingtoetsProjectMigratorTest.cs) (revision 5ec759496df2662a183c1c5ed74e3724bd834ae2)
@@ -24,6 +24,7 @@
using System.Linq;
using System.Threading;
using Application.Ringtoets.Migration.Core;
+using Core.Common.Base.Storage;
using Core.Common.Gui;
using Core.Common.TestUtil;
using NUnit.Extensions.Forms;
@@ -61,8 +62,7 @@
var migrator = new RingtoetsProjectMigrator(inquiryHelper);
// Assert
- // TODO: introduce the IMigrateProject in Core.Common.Base
- Assert.IsInstanceOf