fix uuid-init in TestCustomerRepositoryIntegrationTest

This commit is contained in:
Michael Hoennig 2025-01-14 09:14:22 +01:00
parent 1a234d1528
commit dbc28e398f

View File

@ -13,7 +13,6 @@ import org.springframework.context.annotation.Import;
import jakarta.persistence.PersistenceException; import jakarta.persistence.PersistenceException;
import jakarta.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServletRequest;
import java.util.List; import java.util.List;
import java.util.UUID;
import static net.hostsharing.hsadminng.rbac.test.JpaAttempt.attempt; import static net.hostsharing.hsadminng.rbac.test.JpaAttempt.attempt;
import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
@ -40,7 +39,7 @@ class TestCustomerRepositoryIntegrationTest extends ContextBasedTest {
// when // when
final var result = attempt(em, () -> { final var result = attempt(em, () -> {
final var newCustomer = new TestCustomerEntity( final var newCustomer = new TestCustomerEntity(
UUID.randomUUID(), 0, "www", 90001, "customer-admin@www.example.com"); null, 0, "www", 90001, "customer-admin@www.example.com");
return testCustomerRepository.save(newCustomer); return testCustomerRepository.save(newCustomer);
}); });
@ -59,7 +58,7 @@ class TestCustomerRepositoryIntegrationTest extends ContextBasedTest {
// when // when
final var result = attempt(em, () -> { final var result = attempt(em, () -> {
final var newCustomer = new TestCustomerEntity( final var newCustomer = new TestCustomerEntity(
UUID.randomUUID(), 0, "www", 90001, "customer-admin@www.example.com"); null, 0, "www", 90001, "customer-admin@www.example.com");
return testCustomerRepository.save(newCustomer); return testCustomerRepository.save(newCustomer);
}); });
@ -78,7 +77,7 @@ class TestCustomerRepositoryIntegrationTest extends ContextBasedTest {
// when // when
final var result = attempt(em, () -> { final var result = attempt(em, () -> {
final var newCustomer = new TestCustomerEntity( final var newCustomer = new TestCustomerEntity(
UUID.randomUUID(), 0, "www", 90001, "customer-admin@www.example.com"); null, 0, "www", 90001, "customer-admin@www.example.com");
return testCustomerRepository.save(newCustomer); return testCustomerRepository.save(newCustomer);
}); });