Skip to content

Commit

Permalink
AYS-375 | applicantFirstName, applicantLastName and `applicantPho…
Browse files Browse the repository at this point in the history
…neNumber` Fields Have Been Added to Emergency Evacuation Application List Response (#370)
  • Loading branch information
agitrubard authored Aug 25, 2024
1 parent 6a6e8e7 commit 74acff1
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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")
Expand Down Expand Up @@ -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))
Expand Down

0 comments on commit 74acff1

Please sign in to comment.