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