When opening a repo in a dir that doesn't exist then an exception is thrown
This commit is contained in:
parent
0c00a57ddb
commit
b75f228dd7
1 changed files with 9 additions and 0 deletions
|
@ -139,6 +139,15 @@ class GitDBTest implements WithAssertions {
|
||||||
}
|
}
|
||||||
|
|
||||||
// When opening a repo in a dir that doesn't exist then an exception is thrown
|
// When opening a repo in a dir that doesn't exist then an exception is thrown
|
||||||
|
@Test
|
||||||
|
void openRepo_whenDirNotExist_thenThrowException() throws IOException {
|
||||||
|
//given
|
||||||
|
final Path dir = dirDoesNotExist();
|
||||||
|
//then
|
||||||
|
assertThatExceptionOfType(GitDBRepoNotFoundException.class)
|
||||||
|
.isThrownBy(() -> GitDB.openLocal(dir))
|
||||||
|
.withMessageContaining(dir.toString());
|
||||||
|
}
|
||||||
|
|
||||||
// When opening a repo in a dir that is a bare repo then GitDb is returned
|
// When opening a repo in a dir that is a bare repo then GitDb is returned
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue