[BAEL-3841] PR review updates
This commit is contained in:
parent
e1a6218c1b
commit
ee694afc51
@ -70,7 +70,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>net.bytebuddy</groupId>
|
<groupId>net.bytebuddy</groupId>
|
||||||
<artifactId>byte-buddy</artifactId>
|
<artifactId>byte-buddy</artifactId>
|
||||||
<version>1.10.10</version>
|
<version>1.10.11</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.data</groupId>
|
<groupId>org.springframework.data</groupId>
|
||||||
|
@ -64,7 +64,7 @@ public class BookRepositoryCachingIntegrationTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void givenCachedBookWhenFindByTitleThenRepositoryShouldNotBeHit() {
|
void givenCachedBook_whenFindByTitle_thenRepositoryShouldNotBeHit() {
|
||||||
assertEquals(of(DUNE), bookRepository.findFirstByTitle("Dune"));
|
assertEquals(of(DUNE), bookRepository.findFirstByTitle("Dune"));
|
||||||
verify(mock).findFirstByTitle("Dune");
|
verify(mock).findFirstByTitle("Dune");
|
||||||
|
|
||||||
@ -75,7 +75,7 @@ public class BookRepositoryCachingIntegrationTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@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"));
|
assertEquals(of(FOUNDATION), bookRepository.findFirstByTitle("Foundation"));
|
||||||
assertEquals(of(FOUNDATION), bookRepository.findFirstByTitle("Foundation"));
|
assertEquals(of(FOUNDATION), bookRepository.findFirstByTitle("Foundation"));
|
||||||
|
@ -38,14 +38,14 @@ public class BookRepositoryIntegrationTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void givenBookThatShouldBeCachedWhenFindByTitleThenResultShouldBePutInCache() {
|
void givenBookThatShouldBeCached_whenFindByTitle_thenResultShouldBePutInCache() {
|
||||||
Optional<Book> dune = repository.findFirstByTitle("Dune");
|
Optional<Book> dune = repository.findFirstByTitle("Dune");
|
||||||
|
|
||||||
assertEquals(dune, getCachedBook("Dune"));
|
assertEquals(dune, getCachedBook("Dune"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void givenBookThatShouldNotBeCachedWhenFindByTitleThenResultShouldNotBePutInCache() {
|
void givenBookThatShouldNotBeCached_whenFindByTitle_thenResultShouldNotBePutInCache() {
|
||||||
repository.findFirstByTitle("Foundation");
|
repository.findFirstByTitle("Foundation");
|
||||||
|
|
||||||
assertEquals(empty(), getCachedBook("Foundation"));
|
assertEquals(empty(), getCachedBook("Foundation"));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user