GitDBTest clean up tests throwing exceptions
This commit is contained in:
parent
d1acd4a0dc
commit
fd70dbacc3
1 changed files with 9 additions and 9 deletions
|
@ -252,7 +252,7 @@ class GitDBTest implements WithAssertions {
|
||||||
|
|
||||||
// When getting a key that does not exist then return an empty Optional
|
// When getting a key that does not exist then return an empty Optional
|
||||||
@Test
|
@Test
|
||||||
void getKey_whenKeyNotExist_thenReturnEmptyOptional() throws IOException {
|
void getKey_whenKeyNotExist_thenReturnEmptyOptional() {
|
||||||
//given
|
//given
|
||||||
final GitDBBranch branch = gitDBBranch();
|
final GitDBBranch branch = gitDBBranch();
|
||||||
//when
|
//when
|
||||||
|
@ -280,7 +280,7 @@ class GitDBTest implements WithAssertions {
|
||||||
|
|
||||||
// When getting the format version it matches expected
|
// When getting the format version it matches expected
|
||||||
@Test
|
@Test
|
||||||
void getVersionFormat_thenFormatIsSet() throws IOException {
|
void getVersionFormat_thenFormatIsSet() {
|
||||||
//given
|
//given
|
||||||
final GitDBBranch gitDBBranch = gitDBBranch();
|
final GitDBBranch gitDBBranch = gitDBBranch();
|
||||||
final Version version = new FormatVersion().getVersion();
|
final Version version = new FormatVersion().getVersion();
|
||||||
|
@ -295,7 +295,7 @@ class GitDBTest implements WithAssertions {
|
||||||
|
|
||||||
// When putting a key/value pair then a GitDbBranch is returned
|
// When putting a key/value pair then a GitDbBranch is returned
|
||||||
@Test
|
@Test
|
||||||
void putValue_thenReturnUpdatedGitDBBranch() throws IOException {
|
void putValue_thenReturnUpdatedGitDBBranch() {
|
||||||
//given
|
//given
|
||||||
final GitDBBranch originalBranch = gitDBBranch();
|
final GitDBBranch originalBranch = gitDBBranch();
|
||||||
//when
|
//when
|
||||||
|
@ -309,7 +309,7 @@ class GitDBTest implements WithAssertions {
|
||||||
|
|
||||||
// When getting a key that does exist then the value is returned inside an Optional
|
// When getting a key that does exist then the value is returned inside an Optional
|
||||||
@Test
|
@Test
|
||||||
void getKey_whenExists_thenReturnValueInOptional() throws IOException {
|
void getKey_whenExists_thenReturnValueInOptional() {
|
||||||
//given
|
//given
|
||||||
final String key = stringSupplier.get();
|
final String key = stringSupplier.get();
|
||||||
final String value = stringSupplier.get();
|
final String value = stringSupplier.get();
|
||||||
|
@ -326,7 +326,7 @@ class GitDBTest implements WithAssertions {
|
||||||
|
|
||||||
// When removing a key that does not exist then the GitDbBranch is returned
|
// When removing a key that does not exist then the GitDbBranch is returned
|
||||||
@Test
|
@Test
|
||||||
void removeKey_whenNotExist_thenReturnOriginal() throws IOException {
|
void removeKey_whenNotExist_thenReturnOriginal() {
|
||||||
//given
|
//given
|
||||||
final GitDBBranch gitDBBranch = gitDBBranch();
|
final GitDBBranch gitDBBranch = gitDBBranch();
|
||||||
//when
|
//when
|
||||||
|
@ -340,7 +340,7 @@ class GitDBTest implements WithAssertions {
|
||||||
|
|
||||||
// When removing a key that does exist then a GitDbBranch is returned
|
// When removing a key that does exist then a GitDbBranch is returned
|
||||||
@Test
|
@Test
|
||||||
void removeKey_whenExists_thenReturnUpdatedBranch() throws IOException {
|
void removeKey_whenExists_thenReturnUpdatedBranch() {
|
||||||
//given
|
//given
|
||||||
final String key = stringSupplier.get();
|
final String key = stringSupplier.get();
|
||||||
final String value = stringSupplier.get();
|
final String value = stringSupplier.get();
|
||||||
|
@ -354,13 +354,13 @@ class GitDBTest implements WithAssertions {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
private Result<GitDBBranch> gitDBBranchWithKeyValue(final String key, final String value) throws IOException {
|
private Result<GitDBBranch> gitDBBranchWithKeyValue(final String key, final String value) {
|
||||||
return gitDBBranch().put(key, value);
|
return gitDBBranch().put(key, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
// When removing a key that does exist then original GitDbBranch can still find it
|
// When removing a key that does exist then original GitDbBranch can still find it
|
||||||
@Test
|
@Test
|
||||||
void removeKey_whenExists_thenOriginalCanStillFind() throws IOException {
|
void removeKey_whenExists_thenOriginalCanStillFind() {
|
||||||
//given
|
//given
|
||||||
final String key = stringSupplier.get();
|
final String key = stringSupplier.get();
|
||||||
final String value = stringSupplier.get();
|
final String value = stringSupplier.get();
|
||||||
|
@ -377,7 +377,7 @@ class GitDBTest implements WithAssertions {
|
||||||
|
|
||||||
// When removing a key that does exist then the updated GitDbBranch can't find it
|
// When removing a key that does exist then the updated GitDbBranch can't find it
|
||||||
@Test
|
@Test
|
||||||
void removeKey_whenExists_thenUpdatedCanNotFind() throws IOException {
|
void removeKey_whenExists_thenUpdatedCanNotFind() {
|
||||||
//given
|
//given
|
||||||
final String key = stringSupplier.get();
|
final String key = stringSupplier.get();
|
||||||
final String value = stringSupplier.get();
|
final String value = stringSupplier.get();
|
||||||
|
|
Loading…
Reference in a new issue