Search in sources :

Example 1 with FeedbackSessionUpdateRespondentWorkerAction

use of teammates.ui.automated.FeedbackSessionUpdateRespondentWorkerAction in project teammates by TEAMMATES.

the class FeedbackSessionUpdateRespondentWorkerActionTest method allTests.

@Test
public void allTests() throws EntityDoesNotExistException {
    FeedbackSessionAttributes session = dataBundle.feedbackSessions.get("session1InCourse1");
    ______TS("typical case: new student respondent");
    StudentAttributes student = dataBundle.students.get("student4InCourse1");
    verifyRespondentNotInSessionRespondentsList(session, student.email, false);
    String[] submissionParams = new String[] { ParamsNames.COURSE_ID, session.getCourseId(), ParamsNames.FEEDBACK_SESSION_NAME, session.getFeedbackSessionName(), ParamsNames.RESPONDENT_EMAIL, student.email, ParamsNames.RESPONDENT_IS_INSTRUCTOR, "false", ParamsNames.RESPONDENT_IS_TO_BE_REMOVED, "false" };
    FeedbackSessionUpdateRespondentWorkerAction action = getAction(submissionParams);
    action.execute();
    verifyRespondentInSessionRespondentsList(session, student.email, false);
    ______TS("typical case: new instructor respondent");
    InstructorAttributes instructor = dataBundle.instructors.get("instructor2OfCourse1");
    verifyRespondentNotInSessionRespondentsList(session, instructor.email, true);
    submissionParams = new String[] { ParamsNames.COURSE_ID, session.getCourseId(), ParamsNames.FEEDBACK_SESSION_NAME, session.getFeedbackSessionName(), ParamsNames.RESPONDENT_EMAIL, instructor.email, ParamsNames.RESPONDENT_IS_INSTRUCTOR, "true", ParamsNames.RESPONDENT_IS_TO_BE_REMOVED, "false" };
    action = getAction(submissionParams);
    action.execute();
    verifyRespondentInSessionRespondentsList(session, instructor.email, true);
    ______TS("typical case: deleted student respondent");
    verifyRespondentInSessionRespondentsList(session, student.email, false);
    submissionParams = new String[] { ParamsNames.COURSE_ID, session.getCourseId(), ParamsNames.FEEDBACK_SESSION_NAME, session.getFeedbackSessionName(), ParamsNames.RESPONDENT_EMAIL, student.email, ParamsNames.RESPONDENT_IS_INSTRUCTOR, "false", ParamsNames.RESPONDENT_IS_TO_BE_REMOVED, "true" };
    action = getAction(submissionParams);
    action.execute();
    verifyRespondentNotInSessionRespondentsList(session, student.email, false);
    ______TS("typical case: deleted instructor respondent");
    verifyRespondentInSessionRespondentsList(session, instructor.email, true);
    submissionParams = new String[] { ParamsNames.COURSE_ID, session.getCourseId(), ParamsNames.FEEDBACK_SESSION_NAME, session.getFeedbackSessionName(), ParamsNames.RESPONDENT_EMAIL, instructor.email, ParamsNames.RESPONDENT_IS_INSTRUCTOR, "true", ParamsNames.RESPONDENT_IS_TO_BE_REMOVED, "true" };
    action = getAction(submissionParams);
    action.execute();
    verifyRespondentNotInSessionRespondentsList(session, instructor.email, true);
}
Also used : FeedbackSessionAttributes(teammates.common.datatransfer.attributes.FeedbackSessionAttributes) FeedbackSessionUpdateRespondentWorkerAction(teammates.ui.automated.FeedbackSessionUpdateRespondentWorkerAction) StudentAttributes(teammates.common.datatransfer.attributes.StudentAttributes) InstructorAttributes(teammates.common.datatransfer.attributes.InstructorAttributes) Test(org.testng.annotations.Test)

Aggregations

Test (org.testng.annotations.Test)1 FeedbackSessionAttributes (teammates.common.datatransfer.attributes.FeedbackSessionAttributes)1 InstructorAttributes (teammates.common.datatransfer.attributes.InstructorAttributes)1 StudentAttributes (teammates.common.datatransfer.attributes.StudentAttributes)1 FeedbackSessionUpdateRespondentWorkerAction (teammates.ui.automated.FeedbackSessionUpdateRespondentWorkerAction)1