Search in sources :

Example 1 with ActionDispenser

use of io.engineblock.activityapi.core.ActionDispenser in project engineblock by engineblock.

the class DiagActivityTypeTest method testDiagActivity.

@Test
public void testDiagActivity() {
    DiagActivityType da = new DiagActivityType();
    da.getName();
    ActivityDef ad = ActivityDef.parseActivityDef("type=diag;");
    DiagActivity a = da.getActivity(ad);
    a.initActivity();
    ActionDispenser actionDispenser = da.getActionDispenser(a);
    Action action = actionDispenser.getAction(1);
    action.runCycle(1L);
}
Also used : Action(io.engineblock.activityapi.core.Action) ActionDispenser(io.engineblock.activityapi.core.ActionDispenser) ActivityDef(io.engineblock.activityimpl.ActivityDef) Test(org.testng.annotations.Test)

Example 2 with ActionDispenser

use of io.engineblock.activityapi.core.ActionDispenser in project engineblock by engineblock.

the class StdoutActivityTypeTest method testDiagActivity.

@Test
public void testDiagActivity() {
    StdoutActivityType stdoutAt = new StdoutActivityType();
    String atname = stdoutAt.getName();
    assertThat(atname.equals("stdout"));
    ActivityDef ad = ActivityDef.parseActivityDef("type=stdout; yaml=stdout-test;");
    StdoutActivity stdoutActivity = stdoutAt.getActivity(ad);
    ActionDispenser actionDispenser = stdoutAt.getActionDispenser(stdoutActivity);
    Action action = actionDispenser.getAction(1);
}
Also used : Action(io.engineblock.activityapi.core.Action) ActionDispenser(io.engineblock.activityapi.core.ActionDispenser) ActivityDef(io.engineblock.activityimpl.ActivityDef) Test(org.testng.annotations.Test)

Aggregations

Action (io.engineblock.activityapi.core.Action)2 ActionDispenser (io.engineblock.activityapi.core.ActionDispenser)2 ActivityDef (io.engineblock.activityimpl.ActivityDef)2 Test (org.testng.annotations.Test)2