Transaction: When putting a new key/value pair then the original GitDbBranch can't find it
This commit is contained in:
parent
002429e978
commit
55bf71eb69
1 changed files with 13 additions and 0 deletions
|
@ -343,6 +343,19 @@ class GitDBTest implements WithAssertions {
|
||||||
|
|
||||||
// Given a GitDbTransaction handle (i.e. a new branch)
|
// Given a GitDbTransaction handle (i.e. a new branch)
|
||||||
// When putting a new key/value pair then the original GitDbBranch can't find it
|
// When putting a new key/value pair then the original GitDbBranch can't find it
|
||||||
|
@Test
|
||||||
|
void putValue_whenTransaction_thenOriginalBranchNotFind() throws IOException {
|
||||||
|
//given
|
||||||
|
final GitDBBranch originalBranch = gitDBBranch();
|
||||||
|
final GitDBTransaction transaction = originalBranch.transaction();
|
||||||
|
final String key = stringSupplier.get();
|
||||||
|
final String value = stringSupplier.get();
|
||||||
|
//when
|
||||||
|
final GitDBBranch updatedBranch = transaction.put(key, value);
|
||||||
|
//then
|
||||||
|
assertThat(originalBranch.get(key)).isEmpty();
|
||||||
|
}
|
||||||
|
|
||||||
// When putting an existing key/value pair then the original GitDbBranch finds the original value
|
// When putting an existing key/value pair then the original GitDbBranch finds the original value
|
||||||
// When removing a key then the original GitDbBRanch still finds it
|
// When removing a key then the original GitDbBRanch still finds it
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue