Package org.drools.repository

Examples of org.drools.repository.ModuleItem.listAssetsByFormat()


        asset1.checkin("");

        RestAPI api = new RestAPI(repo);
        api.delete("packages/testRestDelete/asset1.drl");

        List l = RulesRepositoryTest.iteratorToList(pkg.listAssetsByFormat(new String[] {"drl"}));
        assertEquals(0, l.size());

        l = RulesRepositoryTest.iteratorToList(pkg.listArchivedAssets());
        assertEquals(1, l.size());
View Full Code Here


        api.post("packages/testRestDelete/asset1.drl", new ByteArrayInputStream("123".getBytes()), "new comment");
        AssetItem ass = pkg.loadAsset("asset1");
        assertEquals("123", ass.getContent());
        assertEquals("new comment", ass.getCheckinComment());
        assertFalse(ass.isArchived());
        l = RulesRepositoryTest.iteratorToList(pkg.listAssetsByFormat(new String[] {"drl"}));
        assertEquals(1, l.size());

        try {
            api.post("packages/testRestDelete/asset1.drl", new ByteArrayInputStream("123".getBytes())"new comment");
            fail("this should be rejected as its not archived.");
View Full Code Here

        RestAPI api = new RestAPI(repo);
        api.setAssetValidator(new AssetValidator());
        api.delete("packages/testRestDelete/asset1.drl");

        List l = RulesRepositoryTest.iteratorToList(pkg.listAssetsByFormat(new String[] {"drl"}));
        assertEquals(0, l.size());

        l = RulesRepositoryTest.iteratorToList(pkg.listArchivedAssets());
        assertEquals(1, l.size());
View Full Code Here

        api.post("packages/testRestDelete/asset1.drl", new ByteArrayInputStream("123".getBytes()), "new comment");
        AssetItem ass = pkg.loadAsset("asset1");
        assertEquals("123", ass.getContent());
        assertEquals("new comment", ass.getCheckinComment());
        assertFalse(ass.isArchived());
        l = RulesRepositoryTest.iteratorToList(pkg.listAssetsByFormat(new String[] {"drl"}));
        assertEquals(1, l.size());

        try {
            api.post("packages/testRestDelete/asset1.drl", new ByteArrayInputStream("123".getBytes())"new comment");
            fail("this should be rejected as its not archived.");
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.