Skip to content

Commit

Permalink
Fixed the broken flows in Junit test.
Browse files Browse the repository at this point in the history
Fixed the broken flows in Junit test.
  • Loading branch information
infstar committed Jan 14, 2025
1 parent 0d6f1b8 commit 224683d
Showing 1 changed file with 19 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ public void testProcessStudentForGrad2018ENProgram_givenUpdated_STUDENT_whenGrad
school.setMincode(newMincode);
school.setSchoolReportingRequirementCode("PUBLIC");

when(this.restUtils.getSchool(newSchoolOfRecordId, "accessToken")).thenReturn(school);
when(this.restUtils.getSchool(eq(newSchoolOfRecordId), any())).thenReturn(school);

when(this.studentProcess.loadStudentData(eq(pen), any())).thenReturn(currentStudent);
when(this.eventRepository.findByEventId(event.getEventId())).thenReturn(Optional.of(event));
Expand Down Expand Up @@ -275,7 +275,7 @@ public void testProcessArchivedStudentForGrad2018ENProgram_givenUpdated_Archived
school.setMincode(newMincode);
school.setSchoolReportingRequirementCode("PUBLIC");

when(this.restUtils.getSchool(newSchoolOfRecordId, "accessToken")).thenReturn(school);
when(this.restUtils.getSchool(eq(newSchoolOfRecordId), any())).thenReturn(school);

when(this.studentProcess.loadStudentData(eq(pen), any())).thenReturn(currentStudent);
when(this.eventRepository.findByEventId(event.getEventId())).thenReturn(Optional.of(event));
Expand Down Expand Up @@ -352,7 +352,7 @@ public void testProcessCurrentGraduatedStudentForGrad2018ENProgram_givenUpdated_
school.setMincode(newMincode);
school.setSchoolReportingRequirementCode("PUBLIC");

when(this.restUtils.getSchool(newSchoolOfRecordId, "accessToken")).thenReturn(school);
when(this.restUtils.getSchool(eq(newSchoolOfRecordId), any())).thenReturn(school);

when(this.studentProcess.loadStudentData(eq(pen), any())).thenReturn(currentStudent);
when(this.eventRepository.findByEventId(event.getEventId())).thenReturn(Optional.of(event));
Expand Down Expand Up @@ -429,7 +429,7 @@ public void testProcessTerminatedGraduatedStudentForGrad2018ENProgram_givenUpdat
school.setMincode(newMincode);
school.setSchoolReportingRequirementCode("PUBLIC");

when(this.restUtils.getSchool(newSchoolOfRecordId, "accessToken")).thenReturn(school);
when(this.restUtils.getSchool(eq(newSchoolOfRecordId), any())).thenReturn(school);

when(this.studentProcess.loadStudentData(eq(pen), any())).thenReturn(currentStudent);
when(this.eventRepository.findByEventId(event.getEventId())).thenReturn(Optional.of(event));
Expand Down Expand Up @@ -506,7 +506,7 @@ public void testProcessDeceasedGraduatedStudentForGrad2018ENProgram_givenUpdated
school.setMincode(newMincode);
school.setSchoolReportingRequirementCode("PUBLIC");

when(this.restUtils.getSchool(newSchoolOfRecordId, "accessToken")).thenReturn(school);
when(this.restUtils.getSchool(eq(newSchoolOfRecordId), any())).thenReturn(school);

when(this.studentProcess.loadStudentData(eq(pen), any())).thenReturn(currentStudent);
when(this.eventRepository.findByEventId(event.getEventId())).thenReturn(Optional.of(event));
Expand Down Expand Up @@ -583,7 +583,7 @@ public void testProcessCurrentStudentForGrad2018ENProgram_givenUpdated_Archived_
school.setMincode(newMincode);
school.setSchoolReportingRequirementCode("PUBLIC");

when(this.restUtils.getSchool(newSchoolOfRecordId, "accessToken")).thenReturn(school);
when(this.restUtils.getSchool(eq(newSchoolOfRecordId), any())).thenReturn(school);

when(this.studentProcess.loadStudentData(eq(pen), any())).thenReturn(currentStudent);
when(this.eventRepository.findByEventId(event.getEventId())).thenReturn(Optional.of(event));
Expand Down Expand Up @@ -659,7 +659,7 @@ public void testProcessArchivedStudentForGrad2018ENProgram_givenUpdated_Current_
school.setMincode(newMincode);
school.setSchoolReportingRequirementCode("PUBLIC");

when(this.restUtils.getSchool(newSchoolOfRecordId, "accessToken")).thenReturn(school);
when(this.restUtils.getSchool(eq(newSchoolOfRecordId), any())).thenReturn(school);

when(this.studentProcess.loadStudentData(eq(pen), any())).thenReturn(currentStudent);
when(this.eventRepository.findByEventId(event.getEventId())).thenReturn(Optional.of(event));
Expand Down Expand Up @@ -735,7 +735,7 @@ public void testProcessArchivedStudentForGrad2018ENProgram_givenUpdated_whenGrad
school.setMincode(newMincode);
school.setSchoolReportingRequirementCode("PUBLIC");

when(this.restUtils.getSchool(newSchoolOfRecordId, "accessToken")).thenReturn(school);
when(this.restUtils.getSchool(eq(newSchoolOfRecordId), any())).thenReturn(school);

when(this.studentProcess.loadStudentData(eq(pen), any())).thenReturn(currentStudent);
when(this.eventRepository.findByEventId(event.getEventId())).thenReturn(Optional.of(event));
Expand Down Expand Up @@ -1113,7 +1113,7 @@ public void testProcessStudentForGrad2018ENProgram_givenUpdated_STUDENT_whenProg
school.setMincode(newMincode);
school.setSchoolReportingRequirementCode("CSF");

when(this.restUtils.getSchool(newSchoolOfRecordId, "accessToken")).thenReturn(school);
when(this.restUtils.getSchool(eq(newSchoolOfRecordId), any())).thenReturn(school);

when(this.studentProcess.loadStudentData(eq(pen), any())).thenReturn(currentStudent);
when(this.eventRepository.findByEventId(event.getEventId())).thenReturn(Optional.of(event));
Expand Down Expand Up @@ -1187,7 +1187,7 @@ public void testProcessArchivedNonGradStudentForGrad2018ENProgram_givenUpdated_w
school.setMincode(newMincode);
school.setSchoolReportingRequirementCode("CSF");

when(this.restUtils.getSchool(newSchoolOfRecordId, "accessToken")).thenReturn(school);
when(this.restUtils.getSchool(eq(newSchoolOfRecordId), any())).thenReturn(school);

when(this.studentProcess.loadStudentData(eq(pen), any())).thenReturn(currentStudent);
when(this.eventRepository.findByEventId(event.getEventId())).thenReturn(Optional.of(event));
Expand Down Expand Up @@ -1261,7 +1261,7 @@ public void testProcessDeceasedNonGradStudentForGrad2018ENProgram_givenUpdated_w
school.setMincode(newMincode);
school.setSchoolReportingRequirementCode("CSF");

when(this.restUtils.getSchool(newSchoolOfRecordId, "accessToken")).thenReturn(school);
when(this.restUtils.getSchool(eq(newSchoolOfRecordId), any())).thenReturn(school);

when(this.studentProcess.loadStudentData(eq(pen), any())).thenReturn(currentStudent);
when(this.eventRepository.findByEventId(event.getEventId())).thenReturn(Optional.of(event));
Expand Down Expand Up @@ -1335,7 +1335,7 @@ public void testProcessStudentForGrad2018PFProgram_givenUpdated_STUDENT_whenProg
school.setMincode(newMincode);
school.setSchoolReportingRequirementCode("PUBLIC");

when(this.restUtils.getSchool(newSchoolOfRecordId, "accessToken")).thenReturn(school);
when(this.restUtils.getSchool(eq(newSchoolOfRecordId), any())).thenReturn(school);

when(this.studentProcess.loadStudentData(eq(pen), any())).thenReturn(currentStudent);
when(this.eventRepository.findByEventId(event.getEventId())).thenReturn(Optional.of(event));
Expand Down Expand Up @@ -1409,7 +1409,7 @@ public void testProcessStudentFor1950AdultProgram_givenUpdated_STUDENT_whenProgr
school.setMincode(newMincode);
school.setSchoolReportingRequirementCode("PUBLIC");

when(this.restUtils.getSchool(newSchoolOfRecordId, "accessToken")).thenReturn(school);
when(this.restUtils.getSchool(eq(newSchoolOfRecordId), any())).thenReturn(school);

when(this.studentProcess.loadStudentData(eq(pen), any())).thenReturn(currentStudent);
when(this.studentProcess.hasAnyFrenchImmersionCourse(eq("2018-EN"), eq(pen), any())).thenReturn(true);
Expand Down Expand Up @@ -1486,7 +1486,7 @@ public void testProcessStudentFor2018EN_givenUpdated_STUDENT_whenProgramIsChange
school.setMincode(newMincode);
school.setSchoolReportingRequirementCode("PUBLIC");

when(this.restUtils.getSchool(newSchoolOfRecordId, "accessToken")).thenReturn(school);
when(this.restUtils.getSchool(eq(newSchoolOfRecordId), any())).thenReturn(school);

when(this.studentProcess.loadStudentData(eq(pen), any())).thenReturn(currentStudent);
when(this.eventRepository.findByEventId(event.getEventId())).thenReturn(Optional.of(event));
Expand Down Expand Up @@ -1564,7 +1564,7 @@ public void testProcessStudentFor2018ENProgram_givenUpdated_STUDENT_whenProgramI
school.setMincode(newMincode);
school.setSchoolReportingRequirementCode("PUBLIC");

when(this.restUtils.getSchool(newSchoolOfRecordId, "accessToken")).thenReturn(school);
when(this.restUtils.getSchool(eq(newSchoolOfRecordId), any())).thenReturn(school);

when(this.studentProcess.loadStudentData(eq(pen), any())).thenReturn(currentStudent);
when(this.eventRepository.findByEventId(event.getEventId())).thenReturn(Optional.of(event));
Expand Down Expand Up @@ -1642,7 +1642,7 @@ public void testProcessStudentFor2018PFProgram_givenUpdated_STUDENT_whenProgramI
school.setMincode(newMincode);
school.setSchoolReportingRequirementCode("PUBLIC");

when(this.restUtils.getSchool(newSchoolOfRecordId, "accessToken")).thenReturn(school);
when(this.restUtils.getSchool(eq(newSchoolOfRecordId), any())).thenReturn(school);

when(this.studentProcess.loadStudentData(eq(pen), any())).thenReturn(currentStudent);
when(this.eventRepository.findByEventId(event.getEventId())).thenReturn(Optional.of(event));
Expand Down Expand Up @@ -1719,7 +1719,7 @@ public void testProcessStudentForSCCPProgram_givenUpdated_STUDENT_whenProgramIsC
school.setMincode(newMincode);
school.setSchoolReportingRequirementCode("PUBLIC");

when(this.restUtils.getSchool(newSchoolOfRecordId, "accessToken")).thenReturn(school);
when(this.restUtils.getSchool(eq(newSchoolOfRecordId), any())).thenReturn(school);

when(this.studentProcess.loadStudentData(eq(pen), any())).thenReturn(currentStudent);
when(this.eventRepository.findByEventId(event.getEventId())).thenReturn(Optional.of(event));
Expand Down Expand Up @@ -1820,7 +1820,7 @@ public void testProcessGraduatedStudentForGrad2018ENProgram_givenUpdated_STUDENT
school.setMincode(newMincode);
school.setSchoolReportingRequirementCode("CSF");

when(this.restUtils.getSchool(newSchoolOfRecordId, "accessToken")).thenReturn(school);
when(this.restUtils.getSchool(eq(newSchoolOfRecordId), any())).thenReturn(school);

when(this.studentProcess.loadStudentData(eq(pen), any())).thenReturn(currentStudent);
when(this.eventRepository.findByEventId(event.getEventId())).thenReturn(Optional.of(event));
Expand Down Expand Up @@ -2124,7 +2124,7 @@ public void testProcessGraduatedStudentForGrad2018ENProgram_givenUpdated_STUDENT
school.setMincode(newMincode);
school.setSchoolReportingRequirementCode("PUBLIC");

when(this.restUtils.getSchool(newSchoolOfRecordId, "accessToken")).thenReturn(school);
when(this.restUtils.getSchool(eq(newSchoolOfRecordId), any())).thenReturn(school);

when(this.studentProcess.loadStudentData(eq(pen), any())).thenReturn(currentStudent);
when(this.eventRepository.findByEventId(event.getEventId())).thenReturn(Optional.of(event));
Expand Down

0 comments on commit 224683d

Please sign in to comment.