Package org.drools.reteoo.test.dsl.NodeTestCaseResult

Examples of org.drools.reteoo.test.dsl.NodeTestCaseResult.NodeTestResult


        str += "     p1, 0, java.lang.Integer, intValue;\n";
        str += "JoinNode:\n";
        str += "    join1, lian0, otn2;\n";
        str += "    intValue, !=, p1;\n";

        NodeTestResult result = executeTest( str );
        Map<String, Object> map = result.context;

        JoinNode join1 = (JoinNode) map.get( "join1" );
        assertNotNull( join1 );
View Full Code Here


        String str = "TestCase 'testOTN'\nTest 'dummy'\n";
        str += "Facts:\n";
        str += "    1, 2, 'hello',\n";
        str += "    'good bye', new java.util.ArrayList();\n";

        NodeTestResult result = executeTest( str );
        Map<String, Object> map = result.context;

        WorkingMemory wm = (WorkingMemory) map.get( "WorkingMemory" );
        List<InternalFactHandle> handles = (List<InternalFactHandle>) map.get( "Handles" );
View Full Code Here

        str += "With:\n";
        str += "    h2, age = 36, city = 'la',\n";
        str += "       state = 'ca';\n";
        str += "    h4, add( 2 );\n";

        NodeTestResult result = executeTest( str );
        Map<String, Object> map = result.context;

        WorkingMemory wm = (WorkingMemory) map.get( "WorkingMemory" );
        List<InternalFactHandle> handles = (List<InternalFactHandle>) map.get( "Handles" );
View Full Code Here

        str += "    0, 1, 2, 3;\n";
        str += "assert:\n";
        str += "    otn2,[h0, h2];\n";
        str += "    otn1,[h1, h3];\n";

        NodeTestResult result = executeTest( str );
        Map<String, Object> map = result.context;

        InternalWorkingMemory wm = (InternalWorkingMemory) map.get( "WorkingMemory" );

        JoinNode join1 = (JoinNode) map.get( "join1" );
View Full Code Here

        str += "    otn2,[h0, h2];\n";
        str += "retract:\n";
        str += "    otn1,[h1];\n";
        str += "    otn2,[h2];\n";

        NodeTestResult result = executeTest( str );
        Map<String, Object> map = result.context;

        InternalWorkingMemory wm = (InternalWorkingMemory) map.get( "WorkingMemory" );
        List<InternalFactHandle> handles = (List<InternalFactHandle>) map.get( "Handles" );
View Full Code Here

        str += "    otn2,[h2];\n";;
        str += "join1:\n";
        str += "    leftMemory,[ [h3] ];\n";
        str += "    rightMemory,[h0];\n";

        NodeTestResult result = executeTest( str );
        Map<String, Object> map = result.context;

        InternalWorkingMemory wm = (InternalWorkingMemory) map.get( "WorkingMemory" );
        List<InternalFactHandle> handles = (List<InternalFactHandle>) map.get( "Handles" );
View Full Code Here

        str += "    rightMemory, [h0];\n";
        str += "join2:\n";
        str += "    leftMemory,  [[h3, h0]];\n";
        str += "    rightMemory, [h4];\n";

        NodeTestResult result = executeTest( str );
        Map<String, Object> map = result.context;

        InternalWorkingMemory wm = (InternalWorkingMemory) map.get( "WorkingMemory" );
        List<InternalFactHandle> handles = (List<InternalFactHandle>) map.get( "Handles" );
View Full Code Here

        str += "    rightMemory, [h0];\n";
        str += "join2:\n";
        str += "    leftMemory,  [[h1, h0]];\n";
        str += "    rightMemory, [h4];\n";

        NodeTestResult result = executeTest( str );
        Map<String, Object> map = result.context;

        InternalWorkingMemory wm = (InternalWorkingMemory) map.get( "WorkingMemory" );
        List<InternalFactHandle> handles = (List<InternalFactHandle>) map.get( "Handles" );
View Full Code Here

        str += "join2:\n";
        str += "    leftMemory, [[h3, h0],\n";
        str += "                [h3, h2]];\n";
        str += "    rightMemory, [];\n";
       
        NodeTestResult result = executeTest( str );
        Map<String, Object> map = result.context;

        InternalWorkingMemory wm = (InternalWorkingMemory) map.get( "WorkingMemory" );
        List<InternalFactHandle> handles = (List<InternalFactHandle>) map.get( "Handles" );
View Full Code Here

        str += "modify:\n";
        str += "    otn1, [h1];\n";
        str += "sink:\n";
        str += "    verify, retractLeft, count, 1;\n";        

        NodeTestResult result = executeTest( str );
        Map<String, Object> map = result.context;
    }   
View Full Code Here

TOP

Related Classes of org.drools.reteoo.test.dsl.NodeTestCaseResult.NodeTestResult

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.