Index: Application/Ringtoets/test/Application.Ringtoets.Migration.Test/RingtoetsUpgradeScriptTest.cs =================================================================== diff -u -rc0840b3d3dbdbfdcad2a6f55c117ac22ae95b365 -r59e7b9604b09b292bf3b76c729751e7622d36bce --- Application/Ringtoets/test/Application.Ringtoets.Migration.Test/RingtoetsUpgradeScriptTest.cs (.../RingtoetsUpgradeScriptTest.cs) (revision c0840b3d3dbdbfdcad2a6f55c117ac22ae95b365) +++ Application/Ringtoets/test/Application.Ringtoets.Migration.Test/RingtoetsUpgradeScriptTest.cs (.../RingtoetsUpgradeScriptTest.cs) (revision 59e7b9604b09b292bf3b76c729751e7622d36bce) @@ -134,12 +134,10 @@ string filename = Path.GetRandomFileName(); string filePath = TestHelper.GetTestDataPath(TestDataPath.Application.Ringtoets.Migration, filename); - var sourceVersionedFile = new RingtoetsVersionedFile("c:\\file.ext"); - var targetVersionedFile = new RingtoetsVersionedFile("c:\\file.ext"); var upgradeScript = new RingtoetsUpgradeScript("1", "2", "THIS WILL FAIL"); // Call - TestDelegate call = () => upgradeScript.Upgrade(sourceVersionedFile, targetVersionedFile); + TestDelegate call = () => upgradeScript.Upgrade("c:\\file.ext", "c:\\file.ext"); // Assert using (new FileDisposeHelper(filePath)) @@ -158,25 +156,16 @@ string filename = Path.GetRandomFileName(); string filePath = TestHelper.GetTestDataPath(TestDataPath.Application.Ringtoets.Migration, filename); - var mockRepository = new MockRepository(); - var sourceVersionedFile = mockRepository.Stub(); - sourceVersionedFile.Expect(tvf => tvf.Location).Return("c:\\file.ext"); - var targetVersionedFile = mockRepository.Stub(); - targetVersionedFile.Expect(tvf => tvf.Location).Return(filePath); - mockRepository.ReplayAll(); - var upgradeScript = new RingtoetsUpgradeScript("1", "2", ";"); // Call - upgradeScript.Upgrade(sourceVersionedFile, targetVersionedFile); + upgradeScript.Upgrade("c:\\file.ext", filePath); // Assert - Assert.IsNotNull(targetVersionedFile); using (new FileDisposeHelper(filePath)) { Assert.IsTrue(File.Exists(filePath)); } - mockRepository.VerifyAll(); } private class MigrationScriptDatabaseReader : SqLiteDatabaseReaderBase