Skip to content

Commit 045d7cd

Browse files
committed
Enforce test coverage of the opening of a repository
1 parent 49fb3fc commit 045d7cd

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

LibGit2Sharp.Tests/RepositoryFixture.cs

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,12 +116,33 @@ private static void AssertInitializedRepository(Repository repo)
116116
}
117117

118118
[Test]
119-
public void CanOpenRepoWithFullPath()
119+
public void CanOpenBareRepositoryThroughAFullPathToTheGitDir()
120120
{
121121
string path = Path.GetFullPath(BareTestRepoPath);
122122
using (var repo = new Repository(path))
123123
{
124124
repo.ShouldNotBeNull();
125+
repo.Info.WorkingDirectory.ShouldBeNull();
126+
}
127+
}
128+
129+
[Test]
130+
public void CanOpenStandardRepositoryThroughAWorkingDirPath()
131+
{
132+
using (var repo = new Repository(StandardTestRepoWorkingDirPath))
133+
{
134+
repo.ShouldNotBeNull();
135+
repo.Info.WorkingDirectory.ShouldNotBeNull();
136+
}
137+
}
138+
139+
[Test]
140+
public void OpeningStandardRepositoryThroughTheGitDirGuessesTheWorkingDirPath()
141+
{
142+
using (var repo = new Repository(StandardTestRepoPath))
143+
{
144+
repo.ShouldNotBeNull();
145+
repo.Info.WorkingDirectory.ShouldNotBeNull();
125146
}
126147
}
127148

0 commit comments

Comments
 (0)