Search in sources :

Example 1 with InstructorCourseStudentDeleteAllAction

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());
}
Also used : InstructorCourseStudentDeleteAllAction(teammates.ui.controller.InstructorCourseStudentDeleteAllAction) RedirectResult(teammates.ui.controller.RedirectResult) InstructorAttributes(teammates.common.datatransfer.attributes.InstructorAttributes) Test(org.testng.annotations.Test)

Aggregations

Test (org.testng.annotations.Test)1 InstructorAttributes (teammates.common.datatransfer.attributes.InstructorAttributes)1 InstructorCourseStudentDeleteAllAction (teammates.ui.controller.InstructorCourseStudentDeleteAllAction)1 RedirectResult (teammates.ui.controller.RedirectResult)1