From 5b5e9110305b66895a5f480fcce00c14d600570e Mon Sep 17 00:00:00 2001 From: Michael Hoennig Date: Fri, 26 Jan 2024 09:07:50 +0100 Subject: [PATCH] amend person related tests to new test data --- ...sOfficePersonControllerAcceptanceTest.java | 57 +------------------ ...OfficePersonRepositoryIntegrationTest.java | 2 +- 2 files changed, 3 insertions(+), 56 deletions(-) diff --git a/src/test/java/net/hostsharing/hsadminng/hs/office/person/HsOfficePersonControllerAcceptanceTest.java b/src/test/java/net/hostsharing/hsadminng/hs/office/person/HsOfficePersonControllerAcceptanceTest.java index 5c4579a6..c370a9c2 100644 --- a/src/test/java/net/hostsharing/hsadminng/hs/office/person/HsOfficePersonControllerAcceptanceTest.java +++ b/src/test/java/net/hostsharing/hsadminng/hs/office/person/HsOfficePersonControllerAcceptanceTest.java @@ -23,8 +23,7 @@ import java.util.UUID; import static net.hostsharing.test.IsValidUuidMatcher.isUuidValid; import static net.hostsharing.test.JsonMatcher.lenientlyEquals; import static org.assertj.core.api.Assertions.assertThat; -import static org.hamcrest.Matchers.is; -import static org.hamcrest.Matchers.startsWith; +import static org.hamcrest.Matchers.*; @SpringBootTest( webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, @@ -66,59 +65,7 @@ class HsOfficePersonControllerAcceptanceTest { .then().log().all().assertThat() .statusCode(200) .contentType("application/json") - .body("", lenientlyEquals(""" - [ - { - "personType": "LEGAL_PERSON", - "tradeName": "First GmbH", - "givenName": null, - "familyName": null - }, - { - "personType": "LEGAL_PERSON", - "tradeName": "Second e.K.", - "givenName": "Miller", - "familyName": "Sandra" - }, - { - "personType": "INCORPORATED_FIRM", - "tradeName": "Third OHG", - "givenName": null, - "familyName": null - }, - { - "personType": "INCORPORATED_FIRM", - "tradeName": "Fourth eG", - "givenName": null, - "familyName": null - }, - { - "personType": "NATURAL_PERSON", - "tradeName": null, - "givenName": "Anita", - "familyName": "Bessler" - }, - { - "personType": "UNINCORPORATED_FIRM", - "tradeName": "Erben Bessler", - "givenName": "Bessler", - "familyName": "Mel" - }, - { - "personType": "NATURAL_PERSON", - "tradeName": null, - "givenName": "Peter", - "familyName": "Smith" - }, - { - "personType": "NATURAL_PERSON", - "tradeName": null, - "givenName": "Paul", - "familyName": "Winkler" - } - ] - """ - )); + .body("", hasSize(12)); // @formatter:on } } diff --git a/src/test/java/net/hostsharing/hsadminng/hs/office/person/HsOfficePersonRepositoryIntegrationTest.java b/src/test/java/net/hostsharing/hsadminng/hs/office/person/HsOfficePersonRepositoryIntegrationTest.java index fa39751b..72f853b9 100644 --- a/src/test/java/net/hostsharing/hsadminng/hs/office/person/HsOfficePersonRepositoryIntegrationTest.java +++ b/src/test/java/net/hostsharing/hsadminng/hs/office/person/HsOfficePersonRepositoryIntegrationTest.java @@ -273,7 +273,7 @@ class HsOfficePersonRepositoryIntegrationTest extends ContextBasedTest { // then assertThat(customerLogEntries).map(Arrays::toString).contains( "[creating person test-data First GmbH, hs_office_person, INSERT]", - "[creating person test-data Second e.K., Sandra, Miller, hs_office_person, INSERT]"); + "[creating person test-data Second e.K., Smith, Peter, hs_office_person, INSERT]"); } @AfterEach