Search in sources :

Example 1 with ScenarioLoader

use of com.nhnent.eat.handler.ScenarioLoader in project eat by nhnent.

the class TesterActor method loadScenario.

/**
 * Load Scenario packet from scenario file.
 *
 * @param scenarioFile Scenario file name
 * @param userId    User ID
 * @return List of Scenario Packet
 */
private List<ScenarioUnit> loadScenario(final String scenarioFile, final String userId) throws SuspendExecution {
    this.userId = userId;
    ScenarioLoader scenarioLoader = new ScenarioLoader();
    String scenarioPath = Config.obj().getScenario().getScenarioPath();
    String fullScenarioFilePath = scenarioPath + "/" + scenarioFile;
    return scenarioLoader.loadScenario(fullScenarioFilePath, userId);
}
Also used : ScenarioLoader(com.nhnent.eat.handler.ScenarioLoader)

Example 2 with ScenarioLoader

use of com.nhnent.eat.handler.ScenarioLoader in project eat by nhnent.

the class ScenarioLoaderTest method load.

@Test
public void load() throws Exception {
    ScenarioLoader scenLoader = new ScenarioLoader();
    String scenPath = Config.obj().getScenario().getScenarioPath();
    String scenFile = scenPath + "\\chat_test.scn";
    System.out.println(scenPath);
    scenLoader.loadScenario(scenFile, "");
}
Also used : ScenarioLoader(com.nhnent.eat.handler.ScenarioLoader) Test(org.junit.Test)

Example 3 with ScenarioLoader

use of com.nhnent.eat.handler.ScenarioLoader in project eat by nhnent.

the class ScenarioExecutorTest method execute.

@Test
public void execute() throws Exception {
    ScenarioExecutor scenExec = new ScenarioExecutor("test");
    List<ScenarioUnit> listScenPck;
    ScenarioLoader scenLoader = new ScenarioLoader();
    String scenPath = Config.obj().getScenario().getScenarioPath();
    String scenFile = scenPath + "\\chat_test.scn";
    System.out.println(scenPath);
    listScenPck = scenLoader.loadScenario(scenFile, "");
    scenExec.runScenario(listScenPck);
    listScenPck.clear();
}
Also used : ScenarioUnit(com.nhnent.eat.entity.ScenarioUnit) ScenarioExecutor(com.nhnent.eat.handler.ScenarioExecutor) ScenarioLoader(com.nhnent.eat.handler.ScenarioLoader) Test(org.junit.Test)

Aggregations

ScenarioLoader (com.nhnent.eat.handler.ScenarioLoader)3 Test (org.junit.Test)2 ScenarioUnit (com.nhnent.eat.entity.ScenarioUnit)1 ScenarioExecutor (com.nhnent.eat.handler.ScenarioExecutor)1