[BAEL-3841] PR review updates
This commit is contained in:
+2
-2
@@ -64,7 +64,7 @@ public class BookRepositoryCachingIntegrationTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
void givenCachedBookWhenFindByTitleThenRepositoryShouldNotBeHit() {
|
||||
void givenCachedBook_whenFindByTitle_thenRepositoryShouldNotBeHit() {
|
||||
assertEquals(of(DUNE), bookRepository.findFirstByTitle("Dune"));
|
||||
verify(mock).findFirstByTitle("Dune");
|
||||
|
||||
@@ -75,7 +75,7 @@ public class BookRepositoryCachingIntegrationTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
void givenNotCachedBookWhenFindByTitleThenRepositoryShouldBeHit() {
|
||||
void givenNotCachedBook_whenFindByTitle_thenRepositoryShouldBeHit() {
|
||||
assertEquals(of(FOUNDATION), bookRepository.findFirstByTitle("Foundation"));
|
||||
assertEquals(of(FOUNDATION), bookRepository.findFirstByTitle("Foundation"));
|
||||
assertEquals(of(FOUNDATION), bookRepository.findFirstByTitle("Foundation"));
|
||||
|
||||
+2
-2
@@ -38,14 +38,14 @@ public class BookRepositoryIntegrationTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
void givenBookThatShouldBeCachedWhenFindByTitleThenResultShouldBePutInCache() {
|
||||
void givenBookThatShouldBeCached_whenFindByTitle_thenResultShouldBePutInCache() {
|
||||
Optional<Book> dune = repository.findFirstByTitle("Dune");
|
||||
|
||||
assertEquals(dune, getCachedBook("Dune"));
|
||||
}
|
||||
|
||||
@Test
|
||||
void givenBookThatShouldNotBeCachedWhenFindByTitleThenResultShouldNotBePutInCache() {
|
||||
void givenBookThatShouldNotBeCached_whenFindByTitle_thenResultShouldNotBePutInCache() {
|
||||
repository.findFirstByTitle("Foundation");
|
||||
|
||||
assertEquals(empty(), getCachedBook("Foundation"));
|
||||
|
||||
Reference in New Issue
Block a user