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>2013-06-21 11:51:43 +0400
committernulltoken <emeric.fermas@gmail.com>2013-06-21 19:34:46 +0400
commit5e40bff48e705125355a7c37c25951b2e4e6e0f8 (patch)
tree62b445b904762e65146ca9b1eb7cae91aa640166 /LibGit2Sharp.Tests/TestHelpers/BaseFixture.cs
parentf62b134d4d553025b28aa3933ab5557cbc54abde (diff)
Add InitNewRepository() test helper
Diffstat (limited to 'LibGit2Sharp.Tests/TestHelpers/BaseFixture.cs')
-rw-r--r--LibGit2Sharp.Tests/TestHelpers/BaseFixture.cs10
1 files changed, 10 insertions, 0 deletions
diff --git a/LibGit2Sharp.Tests/TestHelpers/BaseFixture.cs b/LibGit2Sharp.Tests/TestHelpers/BaseFixture.cs
index d559a5d3..5dcc93c4 100644
--- a/LibGit2Sharp.Tests/TestHelpers/BaseFixture.cs
+++ b/LibGit2Sharp.Tests/TestHelpers/BaseFixture.cs
@@ -138,6 +138,16 @@ namespace LibGit2Sharp.Tests.TestHelpers
return clonePath;
}
+ protected string InitNewRepository(bool isBare = false)
+ {
+ SelfCleaningDirectory scd = BuildSelfCleaningDirectory();
+
+ using (var repo = Repository.Init(scd.DirectoryPath, isBare, null))
+ {
+ return repo.Info.Path;
+ }
+ }
+
public void Register(string directoryPath)
{
directories.Add(directoryPath);