Package org.drools.ide.common.client.modeldriven.testing

Examples of org.drools.ide.common.client.modeldriven.testing.FixturesMap


     * @return List<List<VeryifyRuleFired or VerifyFact or RetractFact> OR Map<String, List<FactData>> OR ExecutionTrace>
     */
    public List<Fixture> lumpyMap(List<Fixture> fixtures) {
        List<Fixture> output = new ArrayList<Fixture>();

        FixturesMap dataInput = new FixturesMap();
        FixtureList verifyFact = new FixtureList();
        FixtureList verifyRule = new FixtureList();
        FixtureList retractFacts = new FixtureList();

        for ( Iterator<Fixture> iterator = fixtures.iterator(); iterator.hasNext(); ) {
            Fixture fixture = iterator.next();
            if ( fixture instanceof FactData ) {
                accumulateData( dataInput,
                                fixture );
            } else if ( fixture instanceof ActivateRuleFlowGroup ) {
                accumulateData( dataInput,
                                fixture );
            } else if ( fixture instanceof RetractFact ) {
                retractFacts.add( (RetractFact) fixture );
            } else if ( fixture instanceof VerifyRuleFired ) {
                verifyRule.add( (VerifyRuleFired) fixture );
            } else if ( fixture instanceof VerifyFact ) {
                verifyFact.add( (VerifyFact) fixture );
            } else if ( fixture instanceof ExecutionTrace ) {
                gatherFixtures( output,
                                dataInput,
                                verifyFact,
                                verifyRule,
                                retractFacts,
                                false );

                output.add( fixture );

                verifyRule = new FixtureList();
                verifyFact = new FixtureList();
                retractFacts = new FixtureList();
                dataInput = new FixturesMap();
            }
        }
        gatherFixtures( output,
                        dataInput,
                        verifyFact,
View Full Code Here


     *         Map<String, List<FactData>> OR ExecutionTrace>
     */
    public List<Fixture> lumpyMap(List<Fixture> fixtures) {
        List<Fixture> output = new ArrayList<Fixture>();

        FixturesMap dataInput = new FixturesMap();
        CallFixtureMap callOnDataInput = new CallFixtureMap();
        FixtureList verifyFact = new FixtureList();
        FixtureList verifyRule = new FixtureList();
        FixtureList retractFacts = new FixtureList();
        for ( Fixture fixture : fixtures ) {
            if ( fixture instanceof FactData ) {
                accumulateDataForFactData( dataInput, (FactData) fixture );
            } else if ( fixture instanceof CallMethod ) {
                accumulateCallMethod( callOnDataInput, (CallMethod) fixture );
            } else if ( fixture instanceof ActivateRuleFlowGroup ) {
                accumulateDataForActivateRuleFlowGroup( dataInput, fixture );
            } else if ( fixture instanceof RetractFact ) {
                retractFacts.add( (RetractFact) fixture );
            } else if ( fixture instanceof VerifyRuleFired ) {
                verifyRule.add( (VerifyRuleFired) fixture );
            } else if ( fixture instanceof VerifyFact ) {
                verifyFact.add( (VerifyFact) fixture );
            } else if ( fixture instanceof ExecutionTrace ) {
                gatherFixtures( output, dataInput, callOnDataInput, verifyFact, verifyRule, retractFacts, false );

                output.add( fixture );

                verifyRule = new FixtureList();
                verifyFact = new FixtureList();
                retractFacts = new FixtureList();
                callOnDataInput = new CallFixtureMap();
                dataInput = new FixturesMap();
            }
        }
        gatherFixtures( output, dataInput, callOnDataInput, verifyFact, verifyRule, retractFacts, true );

        return output;
View Full Code Here

     *         Map<String, List<FactData>> OR ExecutionTrace>
     */
    public List<Fixture> lumpyMap(List<Fixture> fixtures) {
        List<Fixture> output = new ArrayList<Fixture>();

        FixturesMap dataInput = new FixturesMap();
        CallFixtureMap callOnDataInput = new CallFixtureMap();
        FixtureList verifyFact = new FixtureList();
        FixtureList verifyRule = new FixtureList();
        FixtureList retractFacts = new FixtureList();
        for ( Fixture fixture : fixtures ) {
            if ( fixture instanceof FactData ) {
                accumulateDataForFactData( dataInput, (FactData) fixture );
            } else if ( fixture instanceof CallMethod ) {
                accumulateCallMethod( callOnDataInput, (CallMethod) fixture );
            } else if ( fixture instanceof ActivateRuleFlowGroup ) {
                accumulateDataForActivateRuleFlowGroup( dataInput, fixture );
            } else if ( fixture instanceof RetractFact ) {
                retractFacts.add( (RetractFact) fixture );
            } else if ( fixture instanceof VerifyRuleFired ) {
                verifyRule.add( (VerifyRuleFired) fixture );
            } else if ( fixture instanceof VerifyFact ) {
                verifyFact.add( (VerifyFact) fixture );
            } else if ( fixture instanceof ExecutionTrace ) {
                gatherFixtures( output, dataInput, callOnDataInput, verifyFact, verifyRule, retractFacts, false );

                output.add( fixture );

                verifyRule = new FixtureList();
                verifyFact = new FixtureList();
                retractFacts = new FixtureList();
                callOnDataInput = new CallFixtureMap();
                dataInput = new FixturesMap();
            }
        }
        gatherFixtures( output, dataInput, callOnDataInput, verifyFact, verifyRule, retractFacts, true );

        return output;
View Full Code Here

     *         Map<String, List<FactData>> OR ExecutionTrace>
     */
    public List<Fixture> lumpyMap(List<Fixture> fixtures) {
        List<Fixture> output = new ArrayList<Fixture>();

        FixturesMap dataInput = new FixturesMap();
        CallFixtureMap callOnDataInput = new CallFixtureMap();
        FixtureList verifyFact = new FixtureList();
        FixtureList verifyRule = new FixtureList();
        FixtureList retractFacts = new FixtureList();
        for ( Fixture fixture : fixtures ) {
            if ( fixture instanceof FactData ) {
                accumulateDataForFactData( dataInput, (FactData) fixture );
            } else if ( fixture instanceof CallMethod ) {
                accumulateCallMethod( callOnDataInput, (CallMethod) fixture );
            } else if ( fixture instanceof ActivateRuleFlowGroup ) {
                accumulateDataForActivateRuleFlowGroup( dataInput, fixture );
            } else if ( fixture instanceof RetractFact ) {
                retractFacts.add( (RetractFact) fixture );
            } else if ( fixture instanceof VerifyRuleFired ) {
                verifyRule.add( (VerifyRuleFired) fixture );
            } else if ( fixture instanceof VerifyFact ) {
                verifyFact.add( (VerifyFact) fixture );
            } else if ( fixture instanceof ExecutionTrace ) {
                gatherFixtures( output, dataInput, callOnDataInput, verifyFact, verifyRule, retractFacts, false );

                output.add( fixture );

                verifyRule = new FixtureList();
                verifyFact = new FixtureList();
                retractFacts = new FixtureList();
                callOnDataInput = new CallFixtureMap();
                dataInput = new FixturesMap();
            }
        }
        gatherFixtures( output, dataInput, callOnDataInput, verifyFact, verifyRule, retractFacts, true );

        return output;
View Full Code Here

TOP

Related Classes of org.drools.ide.common.client.modeldriven.testing.FixturesMap

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.