List<NodeTestDef> tests = test.getTests();
assertEquals( 2,
tests.size() );
NodeTestDef test1 = tests.get( 0 );
assertEquals( "test 1",
test1.getName() );
assertEquals( 19,
test1.getLine() );
DslStep[] steps = test1.getSteps().toArray( new DslStep[0] );
assertEquals( 6,
steps.length );
// step 0
int step = 0;
assertEquals( "assert",
steps[step].getName() );
assertEquals( 1, steps[step].getCommands().size() );
checkCommand( new String[] { "left", "[h0]" },
steps[step].getCommands().get( 0 ) );
// step 1
step = 1;
assertEquals( "col",
steps[step].getName() );
assertEquals( 1, steps[step].getCommands().size() );
checkCommand( new String[] { "leftMemory", "[[h0]]" },
steps[step].getCommands().get( 0 ) );
// step 2
step = 2;
assertEquals( "sink",
steps[step].getName() );
assertEquals( 2, steps[step].getCommands().size() );
checkCommand( new String[] { "verify", "assert", "count", "1" },
steps[step].getCommands().get( 0 ) );
checkCommand( new String[] { "verify", "assert", "tuple0[1]", "is(empty())" },
steps[step].getCommands().get( 1 ) );
// Another test
test1 = tests.get( 1 );
assertEquals( "another test",
test1.getName() );
assertEquals( 35,
test1.getLine() );
steps = test1.getSteps().toArray( new DslStep[0] );
assertEquals( 3,
steps.length );
// step 0
step = 0;