Skip to content

Commit

Permalink
Fix fake/clone tests on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
HebaruSan committed Jun 10, 2019
1 parent 7f14638 commit 8c13063
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Tests/Core/KSPManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -128,13 +128,13 @@ public void CloneInstance_BadInstance_ThrowsNotKSPDirKraken()
}

[Test]
public void CloneInstance_ToNotEmptyFolder_ThrowsIOException()
public void CloneInstance_ToNotEmptyFolder_ThrowsPathErrorKraken()
{
using (var KSP = new DisposableKSP())
{
string instanceName = "newInstance";
string tempdir = TestData.NewTempDir();
System.IO.File.Create(System.IO.Path.Combine(tempdir, "shouldntbehere.txt"));
System.IO.File.Create(System.IO.Path.Combine(tempdir, "shouldntbehere.txt")).Close();

Assert.Throws<PathErrorKraken>(() =>
manager.CloneInstance(KSP.KSP, instanceName, tempdir));
Expand Down Expand Up @@ -184,7 +184,7 @@ public void FakeInstance_InNotEmptyFolder_ThrowsBadInstallLocationKraken()
string name = "testname";
string tempdir = TestData.NewTempDir();
CKAN.Versioning.KspVersion version = CKAN.Versioning.KspVersion.Parse("1.5.1");
System.IO.File.Create(System.IO.Path.Combine(tempdir, "shouldntbehere.txt"));
System.IO.File.Create(System.IO.Path.Combine(tempdir, "shouldntbehere.txt")).Close();

Assert.Throws<BadInstallLocationKraken>(() =>
manager.FakeInstance(name, tempdir, version));
Expand All @@ -211,6 +211,7 @@ public void FakeInstance_ValidArgumentsWithDLC_ManagerHasValidInstance()
Assert.IsTrue(dlcVersionObject.ToString().Contains(dlcVersion));

// Tidy up.
CKAN.RegistryManager.Instance(newKSP).ReleaseLock();
System.IO.Directory.Delete(tempdir, true);
}

Expand Down

0 comments on commit 8c13063

Please sign in to comment.