コード例 #1
0
  @Before
  public void beforeEveryMethodExecutes() throws Exception {
    for (int i = 0; i < RESEARCHES_COUNT; i++) {
      users.loginAsTeacher();
      groupIds[i] =
          surveys.createGroup(
              group("group" + i).withEvaluator(EVALUATOR_EMAIL).withStudent(STUDENT_EMAIL));

      users.loginAsEvaluator();
      templateIds[i] =
          surveys.createTemplate(template("template" + i).withQuestions(openQuestion("question")));
      surveys.createResearch(research().withSurvey(templateIds[i]).forGroup(groupIds[i]));
    }
  }
コード例 #2
0
 @Test
 public void studentShouldBeAbleToQueryPublishedTemplatesByGroupName() throws Exception {
   users.loginAsStudent();
   whenQueriesPublishedTemplatesAsStudentWithKeyword("up2");
   thenFollowingPublishedTemplatesAreRead(templateIds[2]);
 }
コード例 #3
0
 @Test
 public void studentShouldBeAbleToQueryPublishedTemplatesFromAllGroups() throws Exception {
   users.loginAsStudent();
   whenQueriesAllGroupsForPublishedTemplatesAsStudent();
   thenFollowingPublishedTemplatesAreRead(templateIds);
 }
コード例 #4
0
 @Test
 public void studentShouldBeAbleToQueryPublishedTemplatesFromMultipleGroups() throws Exception {
   users.loginAsStudent();
   whenQueriesFollowingGroupsForPublishedTemplatesAsStudent(groupIds[1], groupIds[2]);
   thenFollowingPublishedTemplatesAreRead(templateIds[1], templateIds[2]);
 }
コード例 #5
0
 @Test
 public void evaluatorShouldBeAbleToQueryPublishedTemplatesFromAllHisGroups() throws Exception {
   users.loginAsEvaluator();
   whenQueriesAllGroupsForPublishedTemplatesAsEvaluator();
   thenFollowingPublishedTemplatesAreRead(templateIds);
 }
コード例 #6
0
 @Test
 public void evaluatorShouldBeAbleToQueryPublishedTemplatesFromMultipleGroups() throws Exception {
   users.loginAsEvaluator();
   whenQueriesFollowingGroupsForPublishedTemplatesAsEvaluator(groupIds[0], groupIds[1]);
   thenFollowingPublishedTemplatesAreRead(templateIds[0], templateIds[1]);
 }