Package org.drools.reteoo.test.dsl

Examples of org.drools.reteoo.test.dsl.NodeTestDef


        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;
View Full Code Here


        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;
View Full Code Here

        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;
View Full Code Here

        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;
View Full Code Here

        current = Context.TEARDOWN;
    }

    public void createTest( CommonTree testToken, CommonTree name ) {
        current = Context.TEST;
        test = new NodeTestDef( cleanString( name.getText() ), testToken.getLine() );
        testCase.addTest( test );
    }
View Full Code Here

        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;
View Full Code Here

        current = Context.TEARDOWN;
    }

    public void createTest( CommonTree testToken, CommonTree name ) {
        current = Context.TEST;
        test = new NodeTestDef( cleanString( name.getText() ), testToken.getLine() );
        testCase.addTest( test );
    }
View Full Code Here

        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;
View Full Code Here

TOP

Related Classes of org.drools.reteoo.test.dsl.NodeTestDef

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.