Index: Application/Ringtoets/test/Application.Ringtoets.Migration.Test/RingtoetsUpgradeScriptTest.cs =================================================================== diff -u -r6c23a40fd7d5f9ab4f4113d49bc7635e895b0a34 -rd18995d638a6c3f99cb7a8419107bb4148420301 --- Application/Ringtoets/test/Application.Ringtoets.Migration.Test/RingtoetsUpgradeScriptTest.cs (.../RingtoetsUpgradeScriptTest.cs) (revision 6c23a40fd7d5f9ab4f4113d49bc7635e895b0a34) +++ Application/Ringtoets/test/Application.Ringtoets.Migration.Test/RingtoetsUpgradeScriptTest.cs (.../RingtoetsUpgradeScriptTest.cs) (revision d18995d638a6c3f99cb7a8419107bb4148420301) @@ -138,8 +138,6 @@ public void Upgrade_UpgradeFails_ThrowsCriticalMigrationException() { // Setup - string filename = Path.GetRandomFileName(); - string filePath = TestHelper.GetTestDataPath(TestDataPath.Application.Ringtoets.Migration, filename); string fromVersion = RingtoetsVersionHelper.GetCurrentDatabaseVersion(); string toVersion = RingtoetsVersionHelper.GetCurrentDatabaseVersion(); @@ -149,21 +147,18 @@ TestDelegate call = () => upgradeScript.Upgrade("c:\\file.ext", "c:\\file.ext"); // Assert - using (new FileDisposeHelper(filePath)) - { - CriticalMigrationException exception = Assert.Throws(call); - Assert.AreEqual($"Het migreren van het Ringtoets projectbestand van versie '{fromVersion}' naar '{fromVersion}' is mislukt.", - exception.Message); - Assert.IsInstanceOf(exception.InnerException); - } + CriticalMigrationException exception = Assert.Throws(call); + Assert.AreEqual($"Het migreren van het Ringtoets projectbestand van versie '{fromVersion}' naar '{fromVersion}' is mislukt.", + exception.Message); + Assert.IsInstanceOf(exception.InnerException); } [Test] public void Upgrade_ValidParameters_ExpectedProperties() { // Setup string filename = Path.GetRandomFileName(); - string filePath = TestHelper.GetTestDataPath(TestDataPath.Application.Ringtoets.Migration, filename); + string filePath = TestHelper.GetScratchPadPath(filename); string fromVersion = RingtoetsVersionHelper.GetCurrentDatabaseVersion(); string toVersion = RingtoetsVersionHelper.GetCurrentDatabaseVersion(); @@ -174,7 +169,7 @@ // Assert Assert.IsTrue(File.Exists(filePath)); - using (new FileDisposeHelper(filePath)) {} + File.Delete(filePath); } } } \ No newline at end of file