Skip to content

Commit

Permalink
Improve test methods
Browse files Browse the repository at this point in the history
  • Loading branch information
DhiraPT committed Feb 15, 2025
1 parent 542cfc7 commit d3d07f2
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package teammates.sqlui.webapi;

import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.never;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
Expand Down Expand Up @@ -81,6 +82,7 @@ void testExecute_nonExistentCourse_failSilently() {
MessageOutput actionOutput = (MessageOutput) getJsonResult(action).getOutput();

verify(mockLogic, times(1)).deleteStudentsInCourseCascade("RANDOM_ID");
verify(mockLogic, times(1)).deleteStudentsInCourseCascade(any());
verify(mockLogic, never()).deleteStudentsInCourseCascade(course.getId());
assertEquals("Successful", actionOutput.getMessage());
}
Expand Down

0 comments on commit d3d07f2

Please sign in to comment.