Package teammates.testing.object

Examples of teammates.testing.object.Scenario


*/

public class AutoImportTestData {

  public static void main(String args[]) {
    Scenario sc = Scenario.fromJSONFile("./scenario2.json");
    TMAPI.cleanup();
 
    // -----Course 1-----//
    TMAPI.createCourse(sc.course);
    TMAPI.enrollStudents(sc.course.courseId, sc.course.students);
    // ..evaluation 1 OPEN
    sc.evaluation.p2pcomments = "false";
    TMAPI.createEvaluation(sc.evaluation);
    TMAPI.studentsJoinCourse(sc.students, sc.course.courseId);
    TMAPI.openEvaluation(sc.course.courseId, sc.evaluation.name);
    TMAPI.studentsSubmitFeedbacks(sc.course.students, sc.course.courseId,
        sc.evaluation.name);

    // ..evaluation 2 PUBLISHED
    TMAPI.createEvaluation(sc.evaluation2);
    TMAPI.studentsJoinCourse(sc.students, sc.course.courseId);
    TMAPI.openEvaluation(sc.course.courseId, sc.evaluation2.name);

    // TMAPI.firstStudentDidNotSubmitFeedbacks(sc.students, sc.course.courseId,
    // sc.evaluation2.name);
    TMAPI.studentsSubmitFeedbacks(
        sc.students.subList(1, sc.students.size() - 1), sc.course.courseId,
        sc.evaluation2.name);

    TMAPI.closeEvaluation(sc.course.courseId, sc.evaluation2.name);
    TMAPI.publishEvaluation(sc.course.courseId, sc.evaluation2.name);

    Scenario nsc = Scenario.newScenario("target/test-classes/scenario.json");

    // -----Course 2-----//
    TMAPI.createCourse(nsc.course2);
    TMAPI.enrollStudents(nsc.course2.courseId, nsc.course2.students);
    // ..evaluation 3 CLOSED
View Full Code Here


    scn = Scenario.scenarioForBumpRatioTest("target/test-classes/bump_ratio_scenario.json", index);
    scn.scrambleScenario();
  }
 
  protected static Scenario setupScenarioInstance(String name) {
    Scenario s = Scenario.fromJSONFile("./" + name + ".json");
    s.scrambleScenario();
    return s;
  }
View Full Code Here

    s.scrambleScenario();
    return s;
  }

  protected static Scenario setupNewScenarioInstance(String name) {
    Scenario s = Scenario.newScenario("./" + name + ".json");
    s.scrambleScenario();
    return s;
  }
View Full Code Here

    s.scrambleScenario();
    return s;
  }
 
  protected static Scenario setupBumpRatioScenarioInstance(String name, int index) {
    Scenario s = Scenario.scenarioForBumpRatioTest("./" + name + ".json", index);
    s.scrambleScenario();
    return s;
  }
View Full Code Here

*/

public class AutoImportTestData {

  public static void main(String args[]) {
    Scenario sc = Scenario.fromJSONFile("./scenario2.json");
    TMAPI.cleanup();

    // -----Course 1-----//
    TMAPI.createCourse(sc.course);
    TMAPI.enrollStudents(sc.course.courseId, sc.course.students);
    // ..evaluation 1 OPEN
    sc.evaluation.p2pcomments = "false";
    TMAPI.createEvaluation(sc.evaluation);
    TMAPI.studentsJoinCourse(sc.students, sc.course.courseId);
    TMAPI.openEvaluation(sc.course.courseId, sc.evaluation.name);
    TMAPI.studentsSubmitFeedbacks(sc.course.students, sc.course.courseId,
        sc.evaluation.name);

    // ..evaluation 2 PUBLISHED
    TMAPI.createEvaluation(sc.evaluation2);
    TMAPI.studentsJoinCourse(sc.students, sc.course.courseId);
    TMAPI.openEvaluation(sc.course.courseId, sc.evaluation2.name);

    // TMAPI.firstStudentDidNotSubmitFeedbacks(sc.students, sc.course.courseId,
    // sc.evaluation2.name);
    TMAPI.studentsSubmitFeedbacks(
        sc.students.subList(1, sc.students.size() - 1), sc.course.courseId,
        sc.evaluation2.name);

    TMAPI.closeEvaluation(sc.course.courseId, sc.evaluation2.name);
    TMAPI.publishEvaluation(sc.course.courseId, sc.evaluation2.name);

    Scenario nsc = Scenario.newScenario("./scenario.json");

    // -----Course 2-----//
    TMAPI.createCourse(nsc.course2);
    TMAPI.enrollStudents(nsc.course2.courseId, nsc.course2.students);
    // ..evaluation 3 CLOSED
View Full Code Here

*/

public class ImportTestData {

  public static void main(String args[]) {
    Scenario sc = Scenario.scenarioForPageVerification("target/test-classes/data/page_verification.json");
    TMAPI.cleanupByCoordinator(sc.coordinator.username);

    // -----Course 1-----//
    TMAPI.createCourse(sc.course, sc.coordinator.username);
    TMAPI.enrollStudents(sc.course.courseId, sc.course.students);
View Full Code Here

    s.scrambleScenario();
    return s;
  }

  protected static Scenario setupNewScenarioInstance(String name) {
    Scenario s = Scenario.newScenario("target/test-classes/data/" + name + ".json");
    s.scrambleScenario();
    return s;
  }
View Full Code Here

    s.scrambleScenario();
    return s;
  }
 
  protected static Scenario setupBumpRatioScenarioInstance(String name, int index) {
    Scenario s = Scenario.scenarioForBumpRatioTest("target/test-classes/data/" + name + ".json", index);
    s.scrambleScenario();
    return s;
  }
View Full Code Here

    scn = Scenario.scenarioForBumpRatioTest("target/test-classes/data/bump_ratio_scenario.json", index);
    scn.scrambleScenario();
  }
 
  protected static Scenario setupScenarioInstance(String name) {
    Scenario s = Scenario.fromJSONFile("target/test-classes/data/" + name + ".json");
    s.scrambleScenario();
    return s;
  }
View Full Code Here

TOP

Related Classes of teammates.testing.object.Scenario

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.