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

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


        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

        str += "Config:\n";
        str += "    drools.phreakEnabled, true;\n";
        str += "ObjectTypeNode:\n";
        str += "    otn1, java.lang.Integer;\n";
       
        NodeTestResult result = executeTest( str );
        Map<String, Object> map = result.context;

        BuildContext buildCtx = (BuildContext) map.get( ReteDslTestEngine.BUILD_CONTEXT );
        assertTrue(buildCtx.getKnowledgeBase().getConfiguration().isPhreakEnabled());
    }
View Full Code Here

        }

        ReteDslTestEngine tester = new ReteDslTestEngine();
        NodeTestCaseResult testCaseResult = tester.run( testCase, null );
       
        NodeTestResult result = testCaseResult.getResults().get( 0 );
        if( result.result != Result.SUCCESS ) {
            fail( result.getMessages() );
        }
        return result;
    }
View Full Code Here

        }
        this.reteTesterHelper.addImports( testCase.getImports() );
        NodeTestCaseResult result = new NodeTestCaseResult( testCase );
        for ( NodeTestDef test : testCase.getTests() ) {
            notifier.fireTestStarted( test.getDescription() );
            NodeTestResult testResult = createTestResult( test,
                                                          null );

            try {
                testResult = run( testCase,
                                  test );
View Full Code Here

    }

    private NodeTestResult run(NodeTestCase testCase,
                               NodeTestDef test) {
        Map<String, Object> context = createContext( testCase );
        NodeTestResult result = createTestResult( test,
                                                  context );

        try {
            // run setup
            run( context,
View Full Code Here

    }
   
    private NodeTestResult createTestResult(NodeTestDef test,
                                            Map<String, Object> context) {
       
        NodeTestResult result = new NodeTestResult( test,
                                                    Result.NOT_EXECUTED,
                                                    context,
                                                    new LinkedList<String>() );
        return result;
    }
View Full Code Here

TOP

Related Classes of org.drools.core.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.