Package org.drools.guvnor.server

Examples of org.drools.guvnor.server.ServiceImplementation


    }

    @Test
    public void testLoaderWithComplexFields() throws Exception {

        ServiceImplementation impl = getServiceImplementation();
        RulesRepository repo = impl.getRulesRepository();

        PackageItem item = repo.createPackage( "testLoaderWithComplexFields",
                                               "to test the loader" );
        DroolsHeader.updateDroolsHeader( "import org.drools.guvnor.server.util.Agent",
                                                  item );
View Full Code Here


    @Test
    @Ignore("Needs fixing")
    public void testFactTemplates() throws Exception {

        ServiceImplementation impl = getServiceImplementation();
        RulesRepository repo = impl.getRulesRepository();

        PackageItem item = repo.createPackage( "testLoader2",
                                               "to test the loader for fact templates" );
        DroolsHeader.updateDroolsHeader( "import java.util.Date\ntemplate Person\njava.lang.String name\nDate birthDate\nend",
                                                  item );
View Full Code Here

    }

    @Test
    public void testEmptyDT() throws Exception {

        ServiceImplementation impl = getServiceImplementation();
        RulesRepository repo = impl.getRulesRepository();

        PackageItem pkg = repo.loadDefaultPackage();
        AssetItem asset = pkg.addAsset( "testEmptyDT",
                                        "" );
        asset.updateFormat( AssetFormats.DECISION_TABLE_GUIDED );
View Full Code Here

    }

    @Test
    public void testDeclaredTypes() throws Exception {

        ServiceImplementation impl = getServiceImplementation();
        RulesRepository repo = impl.getRulesRepository();

        PackageItem item = repo.createPackage( "testLoaderDeclaredTypes",
                                               "to test the loader for declared types" );
        AssetItem asset = item.addAsset( "MyModel",
                                         "" );
View Full Code Here

    @Test
    public void testLoadDSLs() throws Exception {
        String dsl = "[when]The agents rating is {rating}=doNothing()\n[then]Send a notification to manufacturing '{message}'=foo()";
       
        ServiceImplementation impl = getServiceImplementation();
        RulesRepository repo = impl.getRulesRepository();

        PackageItem item = repo.createPackage( "testLoadDSLs",
                                               "to test the loader for DSLs" );
        AssetItem asset = item.addAsset( "mydsl",
                                         "" );
View Full Code Here

    @Test
    @Ignore("MVEL error")
    public void testLoadEnumerations() throws Exception {
        String enumeration = "'Person.sex' : ['M', 'F']";

        ServiceImplementation impl = getServiceImplementation();
        RulesRepository repo = impl.getRulesRepository();

        PackageItem item = repo.createPackage( "testLoadEnums",
                                               "to test the loader for enums" );
        AssetItem asset = item.addAsset( "myenum",
                                         "" );
View Full Code Here

    }

    @Test
    public void testErrors() throws Exception {

        ServiceImplementation impl = getServiceImplementation();
        RulesRepository repo = impl.getRulesRepository();

        PackageItem item = repo.createPackage( "testErrorsInPackage",
                                               "to test error handling" );

        BRMSSuggestionCompletionLoader loader = new BRMSSuggestionCompletionLoader();
View Full Code Here

    /**
     * This shows we need to load up the model without anything attached yet.
     */
    public void testModelWithNoAttachment() throws Exception {

        ServiceImplementation impl = getServiceImplementation();
        RulesRepository repo = impl.getRulesRepository();

        PackageItem item = repo.createPackage( "testmodelWithNoAttachment",
                                               "to test model loading" );

        item.addAsset( "testModel",
View Full Code Here

         restTestingBase.setup();        

        assertTrue("server did not launch correctly",
                   launchServer(CXFJAXRSServer.class, true));

        ServiceImplementation impl = restTestingBase.getServiceImplementation();
        //Package version 1(Initial version)
        PackageItem pkg = impl.getRulesRepository().createPackage( "restPackage1",
                                                                   "this is package restPackage1" );

        //Package version 2 
        DroolsHeader.updateDroolsHeader( "import com.billasurf.Board\n global com.billasurf.Person customer1",
                                         pkg );
View Full Code Here

     * files.
     */
    @Test
    public void testPackageConfigWithErrors() throws Exception {
        //test the config, no rule assets yet
        ServiceImplementation impl = getServiceImplementation();
        RulesRepository repo = impl.getRulesRepository();
        PackageItem pkg = repo.createPackage( "testBuilderPackageConfig",
                                              "x" );
        DroolsHeader.updateDroolsHeader( "import java.util.List",
                                                  pkg );
        AssetItem func = pkg.addAsset( "func1",
View Full Code Here

TOP

Related Classes of org.drools.guvnor.server.ServiceImplementation

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.