use of teammates.ui.controller.InstructorCourseStudentDeleteAllAction in project teammates by TEAMMATES.
the class InstructorCourseStudentDeleteAllActionTest method testExecuteAndPostProcess.
@Override
@Test
public void testExecuteAndPostProcess() {
InstructorAttributes instructor1OfCourse1 = typicalBundle.instructors.get("instructor1OfCourse1");
______TS("success: delete all students");
gaeSimulation.loginAsInstructor(instructor1OfCourse1.googleId);
String[] submissionParams = new String[] { Const.ParamsNames.COURSE_ID, instructor1OfCourse1.courseId };
InstructorCourseStudentDeleteAllAction action = getAction(submissionParams);
RedirectResult redirectResult = getRedirectResult(action);
assertEquals(Const.ActionURIs.INSTRUCTOR_COURSE_DETAILS_PAGE, redirectResult.destination);
assertFalse(redirectResult.isError);
assertEquals(Const.StatusMessages.STUDENTS_DELETED, redirectResult.getStatusMessage());
AssertHelper.assertLogMessageEquals("TEAMMATESLOG|||instructorCourseStudentDeleteAll|||" + "instructorCourseStudentDeleteAll|||true|||Instructor|||Instructor 1 of Course 1|||" + "idOfInstructor1OfCourse1|||instr1@course1.tmt|||All the Students in Course " + "<span class=\"bold\">[idOfTypicalCourse1]</span> are deleted.|||" + "/page/instructorCourseStudentDeleteAll", action.getLogMessage());
}
Aggregations