Package org.drools.core.base

Examples of org.drools.core.base.TypeResolver


    }

    @Test
    public void testVerifyFactsWithOperator() throws Exception {
        TypeResolver typeResolver = mock( TypeResolver.class );
        ClassLoader classLoader = Thread.currentThread().getContextClassLoader();

        Cheese f1 = new Cheese( "cheddar",
                                42 );
        HashMap<String, Object> populatedData = new HashMap<String, Object>();
View Full Code Here


    }

    @Test
    public void testVerifyFactsWithExpression() throws Exception {
        TypeResolver typeResolver = mock( TypeResolver.class );
        ClassLoader classLoader = Thread.currentThread().getContextClassLoader();

        Cheese f1 = new Cheese( "cheddar",
                                42 );
        f1.setPrice( 42 );
View Full Code Here

    @Test
    public void testVerifyFactExplanation() throws Exception {
        Cheese f1 = new Cheese();
        f1.setType( null );

        TypeResolver typeResolver = mock( TypeResolver.class );
        ClassLoader classLoader = Thread.currentThread().getContextClassLoader();

        HashMap<String, Object> populatedData = new HashMap<String, Object>();
        populatedData.put( "f1", f1 );
View Full Code Here

    @Test
    public void testVerifyFieldAndActualIsNull() throws Exception {
        Cheese f1 = new Cheese();
        f1.setType( null );

        TypeResolver typeResolver = mock( TypeResolver.class );
        ClassLoader classLoader = Thread.currentThread().getContextClassLoader();

        HashMap<String, Object> populatedData = new HashMap<String, Object>();
        populatedData.put( "f1", f1 );
View Full Code Here

        sqlDateWrapper.setSqlDate(new Date(2012 - 1900, 11, 12));

        HashMap<String, Object> populatedData = new HashMap<String, Object>();
        populatedData.put("sqlDateWrapper", sqlDateWrapper);

        TypeResolver typeResolver = mock(TypeResolver.class);

        FactFieldValueVerifier verifier = new FactFieldValueVerifier(
                populatedData,
                "sqlDateWrapper",
                sqlDateWrapper,
View Full Code Here

    }

    @Test
    public void testPopulateNested() throws Exception {

        TypeResolver typeResolver = getTypeResolver();

        FactData cheeseFactData = new FactData(
                "Cheese",
                "c1",
                Arrays.<Field>asList(
View Full Code Here

    }

    @Test
    public void testPopulateNestedWrongOrder() throws Exception {

        TypeResolver typeResolver = getTypeResolver();

        FactData outerFactData = new FactData(
                "OuterFact",
                "p1",
                Arrays.<Field>asList(
View Full Code Here

    }

    @Test
    public void testCollectionFieldInFacts() throws Exception {

        TypeResolver typeResolver = getTypeResolver();

        FactData fd1 = new FactData( "Cheese",
                                     "f1",
                                     Arrays.<Field>asList(
                                             new FieldData( "type",
View Full Code Here

    }

    @Test
    public void testCollection() throws Exception {
        TypeResolver typeResolver = getTypeResolver();

        List<Field> fieldData = new ArrayList<Field>();
        CollectionFieldData collectionFieldData = new CollectionFieldData();
        collectionFieldData.setName( "cheeses" );
        fieldData.add( collectionFieldData );
View Full Code Here

        assertTrue( cheesery.getCheeses().get( 1 ) instanceof Cheese );
    }

    @Test
    public void testCollectionSums() throws Exception {
        TypeResolver typeResolver = getTypeResolver();

        List<Field> fieldData = new ArrayList<Field>();
        CollectionFieldData collectionFieldData = new CollectionFieldData();
        collectionFieldData.setName( "list" );
        fieldData.add( collectionFieldData );
View Full Code Here

TOP

Related Classes of org.drools.core.base.TypeResolver

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.