diff --git a/src/main/java/org/ays/emergency_application/model/response/EmergencyEvacuationApplicationsResponse.java b/src/main/java/org/ays/emergency_application/model/response/EmergencyEvacuationApplicationsResponse.java index b123967b2..80360e65d 100644 --- a/src/main/java/org/ays/emergency_application/model/response/EmergencyEvacuationApplicationsResponse.java +++ b/src/main/java/org/ays/emergency_application/model/response/EmergencyEvacuationApplicationsResponse.java @@ -16,6 +16,9 @@ public class EmergencyEvacuationApplicationsResponse { private String firstName; private String lastName; private AysPhoneNumber phoneNumber; + private String applicantFirstName; + private String applicantLastName; + private AysPhoneNumber applicantPhoneNumber; private Integer seatingCount; private EmergencyEvacuationApplicationStatus status; private Boolean isInPerson; diff --git a/src/test/java/org/ays/emergency_application/controller/EmergencyEvacuationApplicationEndToEndTest.java b/src/test/java/org/ays/emergency_application/controller/EmergencyEvacuationApplicationEndToEndTest.java index e09450a7b..142660143 100644 --- a/src/test/java/org/ays/emergency_application/controller/EmergencyEvacuationApplicationEndToEndTest.java +++ b/src/test/java/org/ays/emergency_application/controller/EmergencyEvacuationApplicationEndToEndTest.java @@ -48,7 +48,7 @@ class EmergencyEvacuationApplicationEndToEndTest extends AysEndToEndTest { private final EmergencyEvacuationApplicationToApplicationResponseMapper emergencyEvacuationApplicationToApplicationResponseMapper = EmergencyEvacuationApplicationToApplicationResponseMapper.initialize(); - private final String BASE_PATH = "/api/v1"; + private static final String BASE_PATH = "/api/v1"; @Test void givenValidEmergencyEvacuationApplicationListRequest_whenEmergencyEvacuationApplicationsFound_thenReturnAysPageResponseOfEmergencyEvacuationApplicationsResponse() throws Exception { @@ -116,6 +116,14 @@ void givenValidEmergencyEvacuationApplicationListRequest_whenEmergencyEvacuation .isNotEmpty()) .andExpect(AysMockResultMatchersBuilders.contents("phoneNumber.lineNumber") .isNotEmpty()) + .andExpect(AysMockResultMatchersBuilders.contents("applicantFirstName") + .exists()) + .andExpect(AysMockResultMatchersBuilders.contents("applicantLastName") + .exists()) + .andExpect(AysMockResultMatchersBuilders.contents("applicantPhoneNumber.countryCode") + .exists()) + .andExpect(AysMockResultMatchersBuilders.contents("applicantPhoneNumber.lineNumber") + .exists()) .andExpect(AysMockResultMatchersBuilders.contents("seatingCount") .isNotEmpty()) .andExpect(AysMockResultMatchersBuilders.contents("status") @@ -174,25 +182,33 @@ void givenValidEmergencyEvacuationApplicationListRequest_whenEmergencyEvacuation .isNotEmpty()) .andExpect(AysMockResultMatchersBuilders.contentSize() .value(0)) - .andExpect(AysMockResultMatchersBuilders.firstContent("id") + .andExpect(AysMockResultMatchersBuilders.contents("id") + .doesNotExist()) + .andExpect(AysMockResultMatchersBuilders.contents("referenceNumber") + .doesNotExist()) + .andExpect(AysMockResultMatchersBuilders.contents("firstName") + .doesNotExist()) + .andExpect(AysMockResultMatchersBuilders.contents("lastName") .doesNotExist()) - .andExpect(AysMockResultMatchersBuilders.firstContent("referenceNumber") + .andExpect(AysMockResultMatchersBuilders.contents("phoneNumber.countryCode") .doesNotExist()) - .andExpect(AysMockResultMatchersBuilders.firstContent("firstName") + .andExpect(AysMockResultMatchersBuilders.contents("phoneNumber.lineNumber") .doesNotExist()) - .andExpect(AysMockResultMatchersBuilders.firstContent("lastName") + .andExpect(AysMockResultMatchersBuilders.contents("applicantFirstName") .doesNotExist()) - .andExpect(AysMockResultMatchersBuilders.firstContent("phoneNumber.countryCode") + .andExpect(AysMockResultMatchersBuilders.contents("applicantLastName") .doesNotExist()) - .andExpect(AysMockResultMatchersBuilders.firstContent("phoneNumber.lineNumber") + .andExpect(AysMockResultMatchersBuilders.contents("applicantPhoneNumber.countryCode") .doesNotExist()) - .andExpect(AysMockResultMatchersBuilders.firstContent("seatingCount") + .andExpect(AysMockResultMatchersBuilders.contents("applicantPhoneNumber.lineNumber") .doesNotExist()) - .andExpect(AysMockResultMatchersBuilders.firstContent("status") + .andExpect(AysMockResultMatchersBuilders.contents("seatingCount") .doesNotExist()) - .andExpect(AysMockResultMatchersBuilders.firstContent("isInPerson") + .andExpect(AysMockResultMatchersBuilders.contents("status") .doesNotExist()) - .andExpect(AysMockResultMatchersBuilders.firstContent("createdAt") + .andExpect(AysMockResultMatchersBuilders.contents("isInPerson") + .doesNotExist()) + .andExpect(AysMockResultMatchersBuilders.contents("createdAt") .doesNotExist()) .andExpect(AysMockResultMatchersBuilders.response("pageNumber") .value(1))