From b22b0d5054243f1b08755f8c0d27ca9a910ff238 Mon Sep 17 00:00:00 2001 From: agitrubard Date: Fri, 23 Aug 2024 17:04:34 +0300 Subject: [PATCH 1/2] AYS-375 | `applicantFirstName`, `applicantLastName` and `applicantPhoneNumber` Fields Have Been Added to Emergency Evacuation Application List Tests --- ...encyEvacuationApplicationEndToEndTest.java | 38 +++++++++++++------ 1 file changed, 27 insertions(+), 11 deletions(-) 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)) From 1068a92cbedf4a58f3f07de7d94d4530534ea97f Mon Sep 17 00:00:00 2001 From: agitrubard Date: Fri, 23 Aug 2024 17:04:43 +0300 Subject: [PATCH 2/2] AYS-375 | `applicantFirstName`, `applicantLastName` and `applicantPhoneNumber` Fields Have Been Added to Emergency Evacuation Application List Response --- .../response/EmergencyEvacuationApplicationsResponse.java | 3 +++ 1 file changed, 3 insertions(+) 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;