Examples of loadDefaultModule()


Examples of org.drools.repository.RulesRepository.loadDefaultModule()

    @Test
    public void testLoadEntriesIncoming() throws Exception {

        RulesRepository repo = rulesRepository;

        AssetItem asset = repo.loadDefaultModule().addAsset( "testLoadEntriesIncoming",
                                                              "" );
        UserInbox ib = new UserInbox( repo );
        ib.clearAll();
        ib.addToIncoming( asset.getUUID(),
                          "hey",
View Full Code Here

Examples of org.drools.repository.RulesRepository.loadDefaultModule()

        RulesRepository repo = rulesRepository;

        UserInbox ib = new UserInbox( repo );
        ib.clearAll();
        AssetItem asset = repo.loadDefaultModule().addAsset( "InBoxTestHelper",
                                                              "hey" );
        UserInbox.recordOpeningEvent( asset );

        List<InboxEntry> es = ib.loadRecentOpened();
        assertEquals( 1,
View Full Code Here

Examples of org.drools.repository.RulesRepository.loadDefaultModule()

    @Test
    public void testIncoming() throws Exception {

        RulesRepository repo = rulesRepository;

        AssetItem asset = repo.loadDefaultModule().addAsset( "testIncoming",
                                                              "" );
        UserInbox ib = new UserInbox( repo );
        ib.clearAll();
        ib.addToIncoming( asset.getUUID(),
                          "hey",
View Full Code Here

Examples of org.drools.repository.RulesRepository.loadDefaultModule()

        }
        assertFalse( found );

        //Now, the second user comes along, makes a change...
        RulesRepository repo2 = new RulesRepository( repositoryStartupService.newSession( "seconduser" ) );
        AssetItem as2 = repo2.loadDefaultModule().loadAsset( "testLoadInbox" );
        as2.updateContent( "hey" );
        as2.checkin( "here we go again !" );

        Thread.sleep( 250 );
View Full Code Here

Examples of org.drools.repository.RulesRepository.loadDefaultModule()

        assertEquals( 1,
                      secondUsersInbox.loadRecentEdited().size() );

        //ok lets create a third user...
        RulesRepository repo3 = new RulesRepository( repositoryStartupService.newSession( "thirduser" ) );
        AssetItem as3 = repo3.loadDefaultModule().loadAsset( "testLoadInbox" );
        as3.updateContent( "hey22" );
        as3.checkin( "here we go again 22!" );

        Thread.sleep( 250 );
View Full Code Here

Examples of org.drools.repository.RulesRepository.loadDefaultModule()

    @Test
    public void testValidating() throws Exception {

        RulesRepository repo = rulesRepository;

        ModuleItem pkg = repo.loadDefaultModule();
        AssetItem asset = pkg.addAsset( "testValidatingEnum",
                                        "" );
        asset.updateFormat( AssetFormats.ENUMERATION );
        asset.updateContent( "'Person.age' : [1, 2, 3]" );
View Full Code Here

Examples of org.drools.repository.RulesRepository.loadDefaultModule()

    @Test
    public void testEmptyDT() throws Exception {

        RulesRepository repo = rulesRepository;

        ModuleItem pkg = repo.loadDefaultModule();
        AssetItem asset = pkg.addAsset( "testEmptyDT",
                                        "" );
        asset.updateFormat( AssetFormats.DECISION_TABLE_GUIDED );
        GuidedDecisionTable52 gt = new GuidedDecisionTable52();
        asset.updateContent( GuidedDTXMLPersistence.getInstance().marshal( gt ) );
View Full Code Here

Examples of org.drools.repository.RulesRepository.loadDefaultModule()

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

        RulesRepository repo = rulesRepository;

        ModuleItem pkg = repo.loadDefaultModule();
        AssetItem asset = pkg.addAsset( "testDeclaredTypeStore",
                                        "" );
        asset.updateFormat( "model.drl" );
        asset.updateContent( "declare Foo\n name: String\n end" );
        asset.checkin( "" );
View Full Code Here

Examples of org.drools.repository.RulesRepository.loadDefaultModule()

        StorageEventManager.le = null;
        StorageEventManager.se = null;

        RulesRepository repo = getRepo();
        ModuleItem pkg = repo.loadDefaultModule();
        AssetItem asset = pkg.addAsset("testAssetContentCallbacks", "");
        assertEquals(0, asset.getContentLength());
        asset.updateContent("boo");
        asset.checkin("");
View Full Code Here

Examples of org.drools.repository.RulesRepository.loadDefaultModule()

                x[0] = item;
            }
        };
        StorageEventManager.registerCheckinEvent(e);
        RulesRepository repo = getRepo();
        ModuleItem pkg = repo.loadDefaultModule();
        AssetItem asset = pkg.addAsset("testCheckinListener", "");
        assertEquals(0, asset.getContentLength());
        asset.updateContent("boo");
        asset.checkin("");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.