avoid lazy-loading necessity in assertion

This commit is contained in:
Michael Hoennig 2024-06-17 09:09:27 +02:00
parent 9e2e9b44d1
commit 7e608068e6

View File

@ -231,7 +231,9 @@ class HsBookingItemRepositoryIntegrationTest extends ContextBasedTestWithCleanup
private void assertThatBookingItemActuallyInDatabase(final HsBookingItemEntity saved) {
final var found = bookingItemRepo.findByUuid(saved.getUuid());
assertThat(found).isNotEmpty().get().isNotSameAs(saved)
.extracting(Object::toString).isEqualTo(saved.toString());
.extracting(HsBookingItemEntity::getResources)
.extracting(Object::toString)
.isEqualTo(saved.getResources().toString());
}
}