diff --git a/libgit2sharp.Tests/WhenOpeningARepository.cs b/libgit2sharp.Tests/WhenOpeningARepository.cs new file mode 100644 index 0000000000000000000000000000000000000000..158606a6b2c0d5dad6bf01f25ff4702e5faaa252 --- /dev/null +++ b/libgit2sharp.Tests/WhenOpeningARepository.cs @@ -0,0 +1,46 @@ +using System; +using System.IO; +using NUnit.Framework; + +namespace libgit2sharp.Tests +{ + [TestFixture] + public class InstanciatingARepository + { + const string PathToRepository = "../../Resources/testrepo.git"; + + [Test] + [Ignore("https://github.com/libgit2/libgit2/issues/issue/28")] + public void ShouldThrowIfPassedANonValidGitDirectory() + { + var notAValidRepo = Path.GetTempPath(); + var exception = Assert.Throws(() => new Repository(notAValidRepo)); + Assert.Fail("To be finalized."); + } + + [Test] + [Ignore("https://github.com/libgit2/libgit2/issues/issue/28")] + public void ShouldThrowIfPassedANonExistingFolder() + { + var notAValidRepo = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, Guid.NewGuid().ToString()); + var exception = Assert.Throws(() => new Repository(notAValidRepo)); + Assert.Fail("To be finalized."); + } + + [Test] + [Ignore] + public void ShouldAllowPassedRelativeBackslashedPath() + { + Assert.Fail("To be finalized."); + } + + [Test] + [Ignore] + public void ShouldAllowPassedRelativeBackslahedPathWithaTrailingBackslash() + { + Assert.Fail("To be finalized."); + } + + + } +} \ No newline at end of file diff --git a/libgit2sharp.Tests/libgit2sharp.Tests.csproj b/libgit2sharp.Tests/libgit2sharp.Tests.csproj index 93a1face6b972eee98d3eb8df7f5277c5050bf43..92cdfcd8d5235a5633dc2b8bc423c3c915ed1c08 100644 --- a/libgit2sharp.Tests/libgit2sharp.Tests.csproj +++ b/libgit2sharp.Tests/libgit2sharp.Tests.csproj @@ -47,6 +47,7 @@ +