Package org.drools.guvnor.server

Examples of org.drools.guvnor.server.ServiceImplementation


    /**
     * This time, we mix up stuff a bit
     */
    @Test
    public void testRuleAndDSLAndFunction() throws Exception {
        ServiceImplementation serviceImplementation = getServiceImplementation();
        RulesRepository repo = serviceImplementation.getRulesRepository();

        //first, setup the package correctly:
        PackageItem pkg = repo.createPackage("testRuleAndDSLAndFunction",
                "");
        AssetItem model = pkg.addAsset("model",
View Full Code Here


    }


    @Test
    public void testSkipDisabledPackageStuff() throws Exception {
        ServiceImplementation serviceImplementation = getServiceImplementation();
        RulesRepository repo = serviceImplementation.getRulesRepository();

        //first, setup the package correctly:
        PackageItem pkg = repo.createPackage("testSkipDisabledPackageStuff",
                "");
        repo.save();
View Full Code Here

    }


    @Test
    public void testXLSDecisionTable() throws Exception {
        ServiceImplementation serviceImplementation = getServiceImplementation();
        RulesRepository repo = serviceImplementation.getRulesRepository();

        //first, setup the package correctly:
        PackageItem pkg = repo.createPackage("testXLSDecisionTable",
                "");
View Full Code Here

        assertFalse(asm.hasErrors());
    }

    @Test
    public void testBRXMLWithDSLMixedIn() throws Exception {
        ServiceImplementation serviceImplementation = getServiceImplementation();
        RulesRepository repo = serviceImplementation.getRulesRepository();

        //create our package
        PackageItem pkg = repo.createPackage("testBRLWithDSLMixedIn",
                "");
        DroolsHeader.updateDroolsHeader("import org.drools.Person",
View Full Code Here

    }

    @Test
    public void testCustomSelector() throws Exception {
        ServiceImplementation serviceImplementation = getServiceImplementation();
        RulesRepository repo = serviceImplementation.getRulesRepository();

        //create our package
        PackageItem pkg = repo.createPackage("testCustomSelector",
                "");
        DroolsHeader.updateDroolsHeader("import org.drools.Person",
View Full Code Here

         restTestingBase.setup();        

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

        ServiceImplementation impl = restTestingBase.getServiceImplementation();
       

        CategoryItem cat = impl.getRulesRepository().loadCategory( "/" );
        cat.addCategory( "AssetPackageResourceTestCategory",
                         "yeah" );
       
        //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

        });     
    }

    private void doRunScenarios(PackageDeploymentURIHelper helper,
                                ByteArrayOutputStream out) throws IOException {
        ServiceImplementation serv = RepositoryServiceServlet.getService();
        PackageItem pkg;
        if ( helper.isLatest() ) {
            pkg = serv.getRulesRepository().loadPackage( helper.getPackageName() );
        } else {
            pkg = serv.getRulesRepository().loadPackageSnapshot( helper.getPackageName(),
                                                                 helper.getVersion() );
        }
        try {
            BulkTestRunResult result = serv.runScenariosInPackage( pkg );
            out.write( result.toString().getBytes() );
        } catch ( DetailedSerializableException e ) {
            log.error( e );
            out.write( e.getMessage().getBytes() );
        } catch ( SerializableException e ) {
View Full Code Here

    @Test
    public void testStore() throws Exception {
        FactModelContentHandler ch = new FactModelContentHandler();

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

        PackageItem pkg = repo.loadDefaultPackage();
        AssetItem asset = pkg.addAsset( "testDeclaredTypeStore",
                                        "" );
        asset.updateFormat( "model.drl" );
View Full Code Here

public class BRMSSuggestionCompletionLoaderTest extends GuvnorTestBase {

    @Test
    public void testLoader() throws Exception {

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

        PackageItem item = repo.createPackage( "testLoader",
                                               "to test the loader" );
        DroolsHeader.updateDroolsHeader( "import java.util.Date",
                                                  item );
View Full Code Here

    @Test
    @Ignore("MVEL error")
    public void testValidating() throws Exception {

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

        PackageItem pkg = repo.loadDefaultPackage();
        AssetItem asset = pkg.addAsset( "testValidatingEnum",
                                        "" );
        asset.updateFormat( AssetFormats.ENUMERATION );
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.