Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2sharp.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornulltoken <emeric.fermas@gmail.com>2015-01-03 00:45:54 +0300
committernulltoken <emeric.fermas@gmail.com>2015-01-04 23:14:34 +0300
commit27fbde62110b2fb40f537ac14da620410fc0888e (patch)
tree713e2adc8f23a0d87d154dab5aafe3c4b2e9eef2 /LibGit2Sharp.Tests/CheckoutFixture.cs
parent7e5785871e4cebd3c18202263d8fb75a26e55eea (diff)
Sandbox every test
Fix #826
Diffstat (limited to 'LibGit2Sharp.Tests/CheckoutFixture.cs')
-rw-r--r--LibGit2Sharp.Tests/CheckoutFixture.cs12
1 files changed, 8 insertions, 4 deletions
diff --git a/LibGit2Sharp.Tests/CheckoutFixture.cs b/LibGit2Sharp.Tests/CheckoutFixture.cs
index 78813eb2..402aaab5 100644
--- a/LibGit2Sharp.Tests/CheckoutFixture.cs
+++ b/LibGit2Sharp.Tests/CheckoutFixture.cs
@@ -356,7 +356,8 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CheckingOutInABareRepoThrows()
{
- using (var repo = new Repository(BareTestRepoPath))
+ string path = SandboxBareTestRepo();
+ using (var repo = new Repository(path))
{
Assert.Throws<BareRepositoryException>(() => repo.Checkout(repo.Branches["refs/heads/test"]));
Assert.Throws<BareRepositoryException>(() => repo.Checkout("refs/heads/test"));
@@ -379,7 +380,8 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CheckingOutANonExistingBranchThrows()
{
- using (var repo = new Repository(StandardTestRepoWorkingDirPath))
+ string path = SandboxBareTestRepo();
+ using (var repo = new Repository(path))
{
Assert.Throws<LibGit2SharpException>(() => repo.Checkout("i-do-not-exist"));
}
@@ -388,7 +390,8 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CheckingOutABranchWithBadParamsThrows()
{
- using (var repo = new Repository(StandardTestRepoWorkingDirPath))
+ string path = SandboxBareTestRepo();
+ using (var repo = new Repository(path))
{
Assert.Throws<ArgumentException>(() => repo.Checkout(string.Empty));
Assert.Throws<ArgumentNullException>(() => repo.Checkout(default(Branch)));
@@ -889,7 +892,8 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CheckoutLowerCasedHeadThrows()
{
- using (var repo = new Repository(StandardTestRepoWorkingDirPath))
+ string path = SandboxStandardTestRepo();
+ using (var repo = new Repository(path))
{
Assert.Throws<LibGit2SharpException>(() => repo.Checkout("head"));
}