use of teammates.ui.automated.FeedbackSessionUnpublishedEmailWorkerAction in project teammates by TEAMMATES.
the class FeedbackSessionUnpublishedEmailWorkerActionTest method allTests.
@Test
public void allTests() {
FeedbackSessionAttributes session1 = dataBundle.feedbackSessions.get("session1InCourse1");
String[] submissionParams = new String[] { ParamsNames.EMAIL_COURSE, session1.getCourseId(), ParamsNames.EMAIL_FEEDBACK, session1.getFeedbackSessionName() };
FeedbackSessionUnpublishedEmailWorkerAction action = getAction(submissionParams);
action.execute();
// 5 students and 5 instructors in course1
verifySpecifiedTasksAdded(action, Const.TaskQueue.SEND_EMAIL_QUEUE_NAME, 10);
String courseName = coursesLogic.getCourse(session1.getCourseId()).getName();
List<TaskWrapper> tasksAdded = action.getTaskQueuer().getTasksAdded();
for (TaskWrapper task : tasksAdded) {
Map<String, String[]> paramMap = task.getParamMap();
assertEquals(String.format(EmailType.FEEDBACK_UNPUBLISHED.getSubject(), courseName, session1.getSessionName()), paramMap.get(ParamsNames.EMAIL_SUBJECT)[0]);
}
}
Aggregations