Skip to content

Commit

Permalink
Interim commit
Browse files Browse the repository at this point in the history
  • Loading branch information
arcshiftsolutions committed Jan 29, 2024
1 parent ae8d1d7 commit 4ced7a5
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ private String createHeader(final PenRequestBatchEntity penRequestBatchEntity, S
// retrieved from PEN_COORDINATOR table
List<SchoolContact> schoolContacts = this.getStudentRegistrationContactService().getStudentRegistrationContactsByMincode(penRequestBatchEntity.getMincode());

var primaryContact = Optional.empty();
var primaryContact = Optional.ofNullable(SchoolContact.class);
if(schoolContacts != null && !schoolContacts.isEmpty()){
primaryContact = Optional.of(schoolContacts.get(0));
}
Expand All @@ -268,7 +268,7 @@ private String createHeader(final PenRequestBatchEntity penRequestBatchEntity, S
.append(String.format("%-8.8s", print(penRequestBatchEntity.getMincode())))
.append(String.format("%-40.40s", print(penRequestBatchEntity.getSchoolName())))
.append(String.format("%-8.8s", penRequestBatchEntity.getProcessDate().format(DateTimeFormatter.ofPattern("yyyyMMdd"))))
.append(String.format("%-100.100s", print(primaryContact.isPresent()? primaryContact.get().getPenCoordinatorEmail() : "")))
.append(String.format("%-100.100s", print(primaryContact.isPresent()? ((SchoolContact) primaryContact.get()).getEmail() : "")))
.append(String.format("%-10.10s", print(penCoordinator.map(coordinator -> coordinator.getPenCoordinatorFax().replaceAll("[^0-9]+", "")).orElse(""))))
.append(String.format("%-40.40s", print(penCoordinator.isPresent()? penCoordinator.get().getPenCoordinatorName() : "")))
.append(" ")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,37 +180,37 @@ public void testToReportUserMatchedListItem_GivenNullValues_ShouldMapSuccessfull
assertThat(reportData.getPenCordinatorEmail()).isEqualTo("test@abc.com");

assertThat(reportData.getDiffList().size()).isEqualTo(1);
assertThat(reportData.getDiffList().get(0).getMin().getBirthDate())isEmpty();
assertThat(reportData.getDiffList().get(0).getMin().getGender())isEmpty();
assertThat(reportData.getDiffList().get(0).getMin().getGivenName())isEmpty();
assertThat(reportData.getDiffList().get(0).getMin().getLegalMiddleNames())isEmpty();
assertThat(reportData.getDiffList().get(0).getMin().getBirthDate()).isEmpty();
assertThat(reportData.getDiffList().get(0).getMin().getGender()).isEmpty();
assertThat(reportData.getDiffList().get(0).getMin().getGivenName()).isEmpty();
assertThat(reportData.getDiffList().get(0).getMin().getLegalMiddleNames()).isEmpty();
assertThat(reportData.getDiffList().get(0).getMin().getPen()).isEqualTo("123456780");
assertThat(reportData.getDiffList().get(0).getMin().getReason()).isEqualTo(null);
assertThat(reportData.getDiffList().get(0).getMin().getSchoolID())isEmpty();
assertThat(reportData.getDiffList().get(0).getMin().getSchoolID()).isEmpty();
assertThat(reportData.getDiffList().get(0).getMin().getSurname()).isEqualTo("BILL");
assertThat(reportData.getDiffList().get(0).getMin().getUsualName())isEmpty();
assertThat(reportData.getDiffList().get(0).getMin().getUsualName()).isEmpty();

assertThat(reportData.getDiffList().size()).isEqualTo(1);
assertThat(reportData.getDiffList().get(0).getSchool().getBirthDate())isEmpty();
assertThat(reportData.getDiffList().get(0).getSchool().getGender())isEmpty();
assertThat(reportData.getDiffList().get(0).getSchool().getGivenName())isEmpty();
assertThat(reportData.getDiffList().get(0).getSchool().getLegalMiddleNames())isEmpty();
assertThat(reportData.getDiffList().get(0).getSchool().getPen())isEmpty();
assertThat(reportData.getDiffList().get(0).getSchool().getBirthDate()).isEmpty();
assertThat(reportData.getDiffList().get(0).getSchool().getGender()).isEmpty();
assertThat(reportData.getDiffList().get(0).getSchool().getGivenName()).isEmpty();
assertThat(reportData.getDiffList().get(0).getSchool().getLegalMiddleNames()).isEmpty();
assertThat(reportData.getDiffList().get(0).getSchool().getPen()).isEmpty();
assertThat(reportData.getDiffList().get(0).getSchool().getReason()).isEqualTo(null);
assertThat(reportData.getDiffList().get(0).getSchool().getSchoolID())isEmpty();
assertThat(reportData.getDiffList().get(0).getSchool().getSurname())isEmpty();
assertThat(reportData.getDiffList().get(0).getSchool().getUsualName())isEmpty();
assertThat(reportData.getDiffList().get(0).getSchool().getSchoolID()).isEmpty();
assertThat(reportData.getDiffList().get(0).getSchool().getSurname()).isEmpty();
assertThat(reportData.getDiffList().get(0).getSchool().getUsualName()).isEmpty();

assertThat(reportData.getSysMatchedList().size()).isEqualTo(2);
assertThat(reportData.getSysMatchedList().get(1).getBirthDate())isEmpty();
assertThat(reportData.getSysMatchedList().get(1).getGender())isEmpty();
assertThat(reportData.getSysMatchedList().get(1).getGivenName())isEmpty();
assertThat(reportData.getSysMatchedList().get(1).getLegalMiddleNames())isEmpty();
assertThat(reportData.getSysMatchedList().get(1).getPen())isEmpty();
assertThat(reportData.getSysMatchedList().get(1).getBirthDate()).isEmpty();
assertThat(reportData.getSysMatchedList().get(1).getGender()).isEmpty();
assertThat(reportData.getSysMatchedList().get(1).getGivenName()).isEmpty();
assertThat(reportData.getSysMatchedList().get(1).getLegalMiddleNames()).isEmpty();
assertThat(reportData.getSysMatchedList().get(1).getPen()).isEmpty();
assertThat(reportData.getSysMatchedList().get(1).getReason()).isEqualTo(null);
assertThat(reportData.getSysMatchedList().get(1).getSchoolID())isEmpty();
assertThat(reportData.getSysMatchedList().get(1).getSurname())isEmpty();
assertThat(reportData.getSysMatchedList().get(1).getUsualName())isEmpty();
assertThat(reportData.getSysMatchedList().get(1).getSchoolID()).isEmpty();
assertThat(reportData.getSysMatchedList().get(1).getSurname()).isEmpty();
assertThat(reportData.getSysMatchedList().get(1).getUsualName()).isEmpty();

assertThat(reportData.getNewPenList().size()).isEqualTo(2);
assertThat(reportData.getPendingList().size()).isEqualTo(4);
Expand Down

0 comments on commit 4ced7a5

Please sign in to comment.