amend person related tests to new test data
This commit is contained in:
parent
78b4fce761
commit
5b5e911030
@ -23,8 +23,7 @@ import java.util.UUID;
|
|||||||
import static net.hostsharing.test.IsValidUuidMatcher.isUuidValid;
|
import static net.hostsharing.test.IsValidUuidMatcher.isUuidValid;
|
||||||
import static net.hostsharing.test.JsonMatcher.lenientlyEquals;
|
import static net.hostsharing.test.JsonMatcher.lenientlyEquals;
|
||||||
import static org.assertj.core.api.Assertions.assertThat;
|
import static org.assertj.core.api.Assertions.assertThat;
|
||||||
import static org.hamcrest.Matchers.is;
|
import static org.hamcrest.Matchers.*;
|
||||||
import static org.hamcrest.Matchers.startsWith;
|
|
||||||
|
|
||||||
@SpringBootTest(
|
@SpringBootTest(
|
||||||
webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT,
|
webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT,
|
||||||
@ -66,59 +65,7 @@ class HsOfficePersonControllerAcceptanceTest {
|
|||||||
.then().log().all().assertThat()
|
.then().log().all().assertThat()
|
||||||
.statusCode(200)
|
.statusCode(200)
|
||||||
.contentType("application/json")
|
.contentType("application/json")
|
||||||
.body("", lenientlyEquals("""
|
.body("", hasSize(12));
|
||||||
[
|
|
||||||
{
|
|
||||||
"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"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
"""
|
|
||||||
));
|
|
||||||
// @formatter:on
|
// @formatter:on
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -273,7 +273,7 @@ class HsOfficePersonRepositoryIntegrationTest extends ContextBasedTest {
|
|||||||
// then
|
// then
|
||||||
assertThat(customerLogEntries).map(Arrays::toString).contains(
|
assertThat(customerLogEntries).map(Arrays::toString).contains(
|
||||||
"[creating person test-data First GmbH, hs_office_person, INSERT]",
|
"[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
|
@AfterEach
|
||||||
|
Loading…
Reference in New Issue
Block a user