use of teammates.ui.automated.InstructorCourseJoinEmailWorkerAction in project teammates by TEAMMATES.
the class InstructorCourseJoinEmailWorkerActionTest method allTests.
@Test
public void allTests() {
CourseAttributes course1 = dataBundle.courses.get("typicalCourse1");
InstructorAttributes instr1InCourse1 = dataBundle.instructors.get("instructor1OfCourse1");
AccountAttributes inviter = AccountsLogic.inst().getAccount("idOfInstructor2OfCourse1");
String[] submissionParams = new String[] { ParamsNames.COURSE_ID, course1.getId(), ParamsNames.INSTRUCTOR_EMAIL, instr1InCourse1.email, ParamsNames.INVITER_ID, inviter.googleId };
InstructorCourseJoinEmailWorkerAction action = getAction(submissionParams);
action.execute();
verifyNumberOfEmailsSent(action, 1);
EmailWrapper email = action.getEmailSender().getEmailsSent().get(0);
assertEquals(String.format(EmailType.INSTRUCTOR_COURSE_JOIN.getSubject(), course1.getName(), course1.getId()), email.getSubject());
assertEquals(instr1InCourse1.email, email.getRecipient());
}
Aggregations