diff --git a/src/test/java/com/capgemini/training/appointmentbooking/dataaccess/entity/EntitySmokeIT.java b/src/test/java/com/capgemini/training/appointmentbooking/dataaccess/entity/EntitySmokeIT.java index acba73a..dd6b2dc 100644 --- a/src/test/java/com/capgemini/training/appointmentbooking/dataaccess/entity/EntitySmokeIT.java +++ b/src/test/java/com/capgemini/training/appointmentbooking/dataaccess/entity/EntitySmokeIT.java @@ -1,6 +1,6 @@ package com.capgemini.training.appointmentbooking.dataaccess.entity; -import static org.assertj.core.api.Assertions.assertThat; +import org.assertj.core.api.SoftAssertions; import java.util.List; import java.util.Map; @@ -28,10 +28,11 @@ void loadAllClasses() { TreatmentEntity.class, 12, // AppointmentEntity.class, 20); - // when //then - classMap.forEach((entityType, - expectedCount) -> assertThat( - (List) em.createQuery("from " + entityType.getSimpleName()).getResultList()) - .hasSize(expectedCount)); + // when // then + SoftAssertions softly = new SoftAssertions(); + classMap.forEach((entityType, expectedCount) -> softly + .assertThat((List) em.createQuery("from " + entityType.getSimpleName()).getResultList()) + .hasSize(expectedCount)); + softly.assertAll(); } }