Package org.drools.spring.pojorule

Examples of org.drools.spring.pojorule.FactArgument


    protected void setUp() throws Exception {
        Rule rule = new Rule("for-test.declaration-factory");
        declaration = rule.addParameterDeclaration("parameter-name", null);

        arg = new FactArgument(declaration);
    }
View Full Code Here


                "id-1", (ObjectType) controlObjectType_1.getMock());
        Declaration expectedDeclaration_2 = rule.addParameterDeclaration(
                "id-2", (ObjectType) controlObjectType_2.getMock());

        parameterValues[0] = new ApplicationDataArgument("name", Object.class);
        parameterValues[1] = new FactArgument(expectedDeclaration_1);
        parameterValues[2] = new FactArgument(expectedDeclaration_2);

        MockControl controlRuleMethod = newMockRuleMethod();
        RuleReflectMethod mockRuleMethod = (RuleReflectMethod) controlRuleMethod.getMock();
        controlRuleMethod.expectAndReturn(mockRuleMethod.getArguments(), parameterValues);
View Full Code Here

        Argument argument = metadata.createArgument(mockRule);

        mocks.verify();

        assertTrue(argument instanceof FactArgument);
        FactArgument factArgument = (FactArgument)argument;

        assertSame(declaration, factArgument.getDeclaration());
    }
View Full Code Here

        Argument argument = metadata.createArgument(mockRule);

        mocks.verify();

        assertTrue(argument instanceof FactArgument);
        FactArgument factArgument = (FactArgument)argument;

        assertSame(declaration, factArgument.getDeclaration());
    }
View Full Code Here

        Declaration declaration = rule.getParameterDeclaration(identifier);
        if (declaration == null) {
            BeanObjectType objectType = new BeanObjectType(parameterClass);
            declaration = rule.addParameterDeclaration(identifier, objectType);
        }
        return new FactArgument(declaration);
    }
View Full Code Here

TOP

Related Classes of org.drools.spring.pojorule.FactArgument

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.