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:
authorKeith Dahlby <kdahlby@jpcycles.com>2013-04-09 01:33:13 +0400
committerKeith Dahlby <kdahlby@jpcycles.com>2013-04-09 01:33:13 +0400
commit8738461ca8c8f76bbd7ebda8cc11c832f738e726 (patch)
treed0f6e7a87271467ea36ed57c8891b9851aab3468 /LibGit2Sharp.Tests/CheckoutFixture.cs
parent6185c08d1b69ee1480358cafdaf2a10d1a09bd80 (diff)
Make test directory clones consistent
Diffstat (limited to 'LibGit2Sharp.Tests/CheckoutFixture.cs')
-rw-r--r--LibGit2Sharp.Tests/CheckoutFixture.cs25
1 files changed, 12 insertions, 13 deletions
diff --git a/LibGit2Sharp.Tests/CheckoutFixture.cs b/LibGit2Sharp.Tests/CheckoutFixture.cs
index b272cf1b..3d3d1c3b 100644
--- a/LibGit2Sharp.Tests/CheckoutFixture.cs
+++ b/LibGit2Sharp.Tests/CheckoutFixture.cs
@@ -19,8 +19,8 @@ namespace LibGit2Sharp.Tests
[InlineData("diff-test-cases")]
public void CanCheckoutAnExistingBranch(string branchName)
{
- TemporaryCloneOfTestRepo path = BuildTemporaryCloneOfTestRepo(StandardTestRepoWorkingDirPath);
- using (var repo = new Repository(path.RepositoryPath))
+ string path = CloneStandardTestRepo();
+ using (var repo = new Repository(path))
{
Branch master = repo.Branches["master"];
Assert.True(master.IsCurrentRepositoryHead);
@@ -52,8 +52,8 @@ namespace LibGit2Sharp.Tests
[InlineData("diff-test-cases")]
public void CanCheckoutAnExistingBranchByName(string branchName)
{
- TemporaryCloneOfTestRepo path = BuildTemporaryCloneOfTestRepo(StandardTestRepoWorkingDirPath);
- using (var repo = new Repository(path.RepositoryPath))
+ string path = CloneStandardTestRepo();
+ using (var repo = new Repository(path))
{
Branch master = repo.Branches["master"];
Assert.True(master.IsCurrentRepositoryHead);
@@ -82,8 +82,8 @@ namespace LibGit2Sharp.Tests
[InlineData("refs/tags/lw")]
public void CanCheckoutAnArbitraryCommit(string commitPointer)
{
- TemporaryCloneOfTestRepo path = BuildTemporaryCloneOfTestRepo(StandardTestRepoWorkingDirPath);
- using (var repo = new Repository(path.RepositoryPath))
+ string path = CloneStandardTestRepo();
+ using (var repo = new Repository(path))
{
Branch master = repo.Branches["master"];
Assert.True(master.IsCurrentRepositoryHead);
@@ -202,9 +202,8 @@ namespace LibGit2Sharp.Tests
// 4) Create conflicting change
// 5) Forcefully checkout master
- TemporaryCloneOfTestRepo path = BuildTemporaryCloneOfTestRepo(StandardTestRepoWorkingDirPath);
-
- using (var repo = new Repository(path.RepositoryPath))
+ string path = CloneStandardTestRepo();
+ using (var repo = new Repository(path))
{
string fileFullPath = Path.Combine(repo.Info.WorkingDirectory, originalFilePath);
Branch master = repo.Branches["master"];
@@ -556,8 +555,8 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CheckingOutRemoteBranchResultsInDetachedHead()
{
- TemporaryCloneOfTestRepo path = BuildTemporaryCloneOfTestRepo(StandardTestRepoWorkingDirPath);
- using (var repo = new Repository(path.RepositoryPath))
+ string path = CloneStandardTestRepo();
+ using (var repo = new Repository(path))
{
Branch master = repo.Branches["master"];
Assert.True(master.IsCurrentRepositoryHead);
@@ -576,8 +575,8 @@ namespace LibGit2Sharp.Tests
[Fact]
public void CheckingOutABranchDoesNotAlterBinaryFiles()
{
- TemporaryCloneOfTestRepo path = BuildTemporaryCloneOfTestRepo(StandardTestRepoWorkingDirPath);
- using (var repo = new Repository(path.RepositoryPath))
+ string path = CloneStandardTestRepo();
+ using (var repo = new Repository(path))
{
// $ git hash-object square-logo.png
// b758c5bc1c8117c2a4c545dae2903e36360501c5