Skip to content

Commit

Permalink
remove tests
Browse files Browse the repository at this point in the history
  • Loading branch information
alexmcdermid authored and cditcher committed Dec 11, 2024
1 parent 85882c8 commit a8d333c
Showing 1 changed file with 1 addition and 61 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -862,7 +862,7 @@ public void testGetGraduationStudentRecord_GivenValidProgramCompletionDate_Expec
UUID studentID = UUID.randomUUID();
GraduationStudentRecordEntity graduationStudentRecordEntity = new GraduationStudentRecordEntity();
graduationStudentRecordEntity.setProgramCompletionDate(new java.util.Date());
when(graduationStatusRepository.findByStudentID(studentID, GradStudentRecord.class)).thenReturn(new GradStudentRecord(studentID, "2018-EN", new java.util.Date(), "schoolOfRecord", "studentStatusCode", "{\"nonGradReasons\":null,\"graduated\":true}", Boolean.TRUE));
when(graduationStatusRepository.findByStudentID(studentID, GradStudentRecord.class)).thenReturn(new GradStudentRecord(studentID, "2018-EN", new java.util.Date(), "schoolOfRecord", "studentStatusCode", "{\"nonGradReasons\":null,\"graduated\":true}"));
GradStudentRecord result = gradStudentService.getGraduationStudentRecord(studentID);
assertNotNull(result);
}
Expand All @@ -876,66 +876,6 @@ public void testGetGraduationStudentRecord_givenNotFound_ExpectEntityNotFoundExc
});
}

@Test
public void testGetGraduationStudentRecord_GivenGraduatedTrue_ExpectGraduated() {
UUID studentID = UUID.randomUUID();
GradStudentRecord mockRecord = new GradStudentRecord(
studentID,
"2018-EN",
new java.util.Date(),
"schoolOfRecord",
"studentStatusCode",
"{\"nonGradReasons\":null,\"graduated\":true}",
true
);
when(graduationStatusRepository.findByStudentID(studentID, GradStudentRecord.class)).thenReturn(mockRecord);

GradStudentRecord result = gradStudentService.getGraduationStudentRecord(studentID);

assertNotNull(result);
assertTrue(result.getGraduated());
}

@Test
public void testGetGraduationStudentRecord_GivenGraduatedFalse_ExpectNotGraduated() {
UUID studentID = UUID.randomUUID();
GradStudentRecord mockRecord = new GradStudentRecord(
studentID,
"2018-EN",
new java.util.Date(),
"schoolOfRecord",
"studentStatusCode",
"{\"nonGradReasons\":[],\"graduated\":false}",
false
);
when(graduationStatusRepository.findByStudentID(studentID, GradStudentRecord.class)).thenReturn(mockRecord);

GradStudentRecord result = gradStudentService.getGraduationStudentRecord(studentID);

assertNotNull(result);
assertFalse(result.getGraduated());
}

@Test
public void testGetGraduationStudentRecord_GivenNullCLOBData_ExpectNotGraduated() {
UUID studentID = UUID.randomUUID();
GradStudentRecord mockRecord = new GradStudentRecord(
studentID,
"2018-EN",
new java.util.Date(),
"schoolOfRecord",
"studentStatusCode",
null,
false
);
when(graduationStatusRepository.findByStudentID(studentID, GradStudentRecord.class)).thenReturn(mockRecord);

GradStudentRecord result = gradStudentService.getGraduationStudentRecord(studentID);

assertNotNull(result);
assertFalse(result.getGraduated());
}

@Test
public void testGetGraduationStudentRecord_GivenRecordNotFound_ExpectEntityNotFoundException() {
UUID studentID = UUID.randomUUID();
Expand Down

0 comments on commit a8d333c

Please sign in to comment.