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

Examples of org.drools.core.reteoo.test.dsl.ReteTesterHelper


    PropagationContextFactory pctxFactory;

    public ReteDslTestEngine() {

        this.reteTesterHelper = new ReteTesterHelper();

        this.steps = new HashMap<String, Object>();

        this.steps.put( CONFIG,
                        new ConfigStep() );
View Full Code Here


        ObjectSource rightInput = nFactory.buildObjectTypeNode(buildContext.getNextId(),
                                                               epn,
                                                               new ClassObjectType(rightType),
                                                               buildContext);

        ReteTesterHelper reteTesterHelper = new ReteTesterHelper();

        Pattern pattern = new Pattern(0, new ClassObjectType(leftType));

        //BetaNodeFieldConstraint betaConstraint = null;
        BetaConstraints betaConstraints = null;
        if (constraintFieldName != null) {
            ClassFieldAccessorStore store = (ClassFieldAccessorStore) reteTesterHelper.getStore();

            InternalReadAccessor extractor = store.getReader(leftType,
                                                             leftFieldName,
                                                             getClass().getClassLoader());

            Declaration declr = new Declaration(leftVariableName,
                                                extractor,
                                                pattern);
            try {
                betaConstraints = new SingleBetaConstraints(reteTesterHelper.getBoundVariableConstraint(rightType,
                                                                                                        constraintFieldName,
                                                                                                        declr,
                                                                                                        constraintOperator), buildContext.getRuleBase().getConfiguration());
            } catch (IntrospectionException e) {
                throw new RuntimeException(e);
View Full Code Here

        ObjectSource rightInput = nFactory.buildObjectTypeNode(buildContext.getNextId(),
                                                               epn,
                                                               new ClassObjectType(rightType),
                                                               buildContext);

        ReteTesterHelper reteTesterHelper = new ReteTesterHelper();

        Pattern pattern = new Pattern(0, new ClassObjectType(leftType));

        //BetaNodeFieldConstraint betaConstraint = null;
        BetaConstraints betaConstraints = null;
        if (constraintFieldName != null) {
            ClassFieldAccessorStore store = (ClassFieldAccessorStore) reteTesterHelper.getStore();

            InternalReadAccessor extractor = store.getReader(leftType,
                                                             leftFieldName,
                                                             getClass().getClassLoader());

            Declaration declr = new Declaration(leftVariableName,
                                                extractor,
                                                pattern);
            try {
                betaConstraints = new SingleBetaConstraints(reteTesterHelper.getBoundVariableConstraint(rightType,
                                                                                                        constraintFieldName,
                                                                                                        declr,
                                                                                                        constraintOperator), buildContext.getKnowledgeBase().getConfiguration());
            } catch (IntrospectionException e) {
                throw new RuntimeException(e);
View Full Code Here

    PropagationContextFactory pctxFactory;

    public ReteDslTestEngine() {

        this.reteTesterHelper = new ReteTesterHelper();

        this.steps = new HashMap<String, Object>();

        this.steps.put( CONFIG,
                        new ConfigStep() );
View Full Code Here

        ObjectSource rightInput = new ObjectTypeNode( buildContext.getNextId(),
                                                      epn,
                                                      new ClassObjectType( rightType ),
                                                      buildContext );

        ReteTesterHelper reteTesterHelper = new ReteTesterHelper();

        Pattern pattern = new Pattern( 0, new ClassObjectType( leftType ) );

        //BetaNodeFieldConstraint betaConstraint = null;
        BetaConstraints betaConstraints = null;
        if ( constraintFieldName != null ) {
            ClassFieldAccessorStore store = (ClassFieldAccessorStore) reteTesterHelper.getStore();
   
            InternalReadAccessor extractor = store.getReader( leftType,
                                                              leftFieldName,
                                                              getClass().getClassLoader() );
   
            Declaration declr = new Declaration( leftVariableName,
                                                 extractor,
                                                 pattern );
            try {
                betaConstraints = new SingleBetaConstraints( reteTesterHelper.getBoundVariableConstraint( rightType,
                                                                              constraintFieldName,
                                                                              declr,
                                                                              constraintOperator ),  buildContext.getRuleBase().getConfiguration()  );
            } catch ( IntrospectionException e ) {
                throw new RuntimeException( e );
View Full Code Here

    PropagationContextFactory pctxFactory;

    public ReteDslTestEngine() {

        this.reteTesterHelper = new ReteTesterHelper();

        this.steps = new HashMap<String, Object>();

        this.steps.put( CONFIG,
                        new ConfigStep() );
View Full Code Here

TOP

Related Classes of org.drools.core.reteoo.test.dsl.ReteTesterHelper

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.