Package org.drools.brms.server.rules

Examples of org.drools.brms.server.rules.SuggestionCompletionLoader


public class SuggestionCompletionTest extends TestCase {

    public void testNestedImports() {
        String pkg = "package org.test\n import org.drools.brms.client.modeldriven.SuggestionCompletionTest.NestedClass";

        SuggestionCompletionLoader loader = new SuggestionCompletionLoader();
        SuggestionCompletionEngine engine = loader.getSuggestionEngine( pkg, new ArrayList(), new ArrayList() );

        assertEquals( "String", engine.getFieldType( "SuggestionCompletionTest$NestedClass", "name" ) );
    }
View Full Code Here


    }

    public void testStringNonNumeric() {
        String pkg = "package org.test\n import org.drools.brms.client.modeldriven.Alert";

        SuggestionCompletionLoader loader = new SuggestionCompletionLoader();
        SuggestionCompletionEngine engine = loader.getSuggestionEngine( pkg, new ArrayList(), new ArrayList() );

        assertEquals( SuggestionCompletionEngine.TYPE_STRING, engine.getFieldType( "Alert", "message" ) );

    }
View Full Code Here

    }

    public void testDataEnums() {
        String pkg = "package org.test\n import org.drools.brms.client.modeldriven.SuggestionCompletionTest.NestedClass";

        SuggestionCompletionLoader loader = new SuggestionCompletionLoader();

        List enums = new ArrayList();

        enums.add( "'Person.age' : [42, 43] \n 'Person.sex' : ['M', 'F']");
        enums.add( "'Driver.sex' : ['M', 'F']" );


        SuggestionCompletionEngine engine = loader.getSuggestionEngine( pkg, new ArrayList(), new ArrayList() , enums);
        assertEquals( "String", engine.getFieldType( "SuggestionCompletionTest$NestedClass", "name" ) );

        assertEquals(3, engine.dataEnumLists.size());
        String[] items = (String[]) engine.dataEnumLists.get( "Person.age" );
        assertEquals(2, items.length);
View Full Code Here

public class SuggestionCompletionEngineTest extends TestCase {

    public void testNestedImports() {
        String pkg = "package org.test\n import org.drools.brms.client.modeldriven.SuggestionCompletionEngineTest.NestedClass";

        SuggestionCompletionLoader loader = new SuggestionCompletionLoader();
        SuggestionCompletionEngine engine = loader.getSuggestionEngine( pkg, new ArrayList(), new ArrayList() );

        assertEquals( "String", engine.getFieldType( "SuggestionCompletionEngineTest$NestedClass", "name" ) );
    }
View Full Code Here

    }

    public void testStringNonNumeric() {
        String pkg = "package org.test\n import org.drools.brms.client.modeldriven.Alert";

        SuggestionCompletionLoader loader = new SuggestionCompletionLoader();
        SuggestionCompletionEngine engine = loader.getSuggestionEngine( pkg, new ArrayList(), new ArrayList() );

        assertEquals( SuggestionCompletionEngine.TYPE_STRING, engine.getFieldType( "Alert", "message" ) );

    }
View Full Code Here

    }

    public void testDataEnums() {
        String pkg = "package org.test\n import org.drools.brms.client.modeldriven.SuggestionCompletionEngineTest.NestedClass";

        SuggestionCompletionLoader loader = new SuggestionCompletionLoader();

        List enums = new ArrayList();

        enums.add( "'Person.age' : [42, 43] \n 'Person.sex' : ['M', 'F']");
        enums.add( "'Driver.sex' : ['M', 'F']" );


        SuggestionCompletionEngine engine = loader.getSuggestionEngine( pkg, new ArrayList(), new ArrayList() , enums);
        assertEquals( "String", engine.getFieldType( "SuggestionCompletionEngineTest$NestedClass", "name" ) );

        assertEquals(3, engine.dataEnumLists.size());
        String[] items = (String[]) engine.dataEnumLists.get( "Person.age" );
        assertEquals(2, items.length);
View Full Code Here

TOP

Related Classes of org.drools.brms.server.rules.SuggestionCompletionLoader

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.