BAEL-13321 Fixed test-data creation logic in live test
This commit is contained in:
parent
895aad42f9
commit
ddd3591e0b
@ -37,7 +37,7 @@ public class SpringDataProjectionLiveTest {
|
|||||||
|
|
||||||
@Before
|
@Before
|
||||||
public void setup() {
|
public void setup() {
|
||||||
if (bookRepo.findById(1L) == null) {
|
if (!bookRepo.findById(1L).isPresent()) {
|
||||||
Book book = new Book("Animal Farm");
|
Book book = new Book("Animal Farm");
|
||||||
book.setIsbn("978-1943138425");
|
book.setIsbn("978-1943138425");
|
||||||
book = bookRepo.save(book);
|
book = bookRepo.save(book);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user