Skip to content

Commit

Permalink
Added extra test to satisfy sonar.
Browse files Browse the repository at this point in the history
  • Loading branch information
chris.ditcher authored and chris.ditcher committed Aug 10, 2023
1 parent 05bf5c1 commit af41b08
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,15 @@ public void testHasStudentGraduated_GivenNoProgramCompletionDate_ExpectFalse() t
assertFalse(result);
}

@Test
public void testHasStudentGraduated_GivenNotFound_ExpectEntityNotFoundException() throws EntityNotFoundException {
UUID studentID = UUID.randomUUID();
when(graduationStatusRepository.findById(studentID)).thenReturn(Optional.empty());
assertThrows(EntityNotFoundException.class, () -> {
graduationStatusService.hasStudentGraduated(studentID);
});
}

@Test
public void testGetGraduationStatusForAlgorithm() {
// ID
Expand Down

0 comments on commit af41b08

Please sign in to comment.