@Test public void testRuleAssetType() { assertTrue(ContentManager.getHandler(AssetFormats.DRL).isRuleAsset()); assertTrue(ContentManager.getHandler(AssetFormats.DSL_TEMPLATE_RULE).isRuleAsset()); assertTrue(ContentManager.getHandler(AssetFormats.BUSINESS_RULE).isRuleAsset()); assertTrue(ContentManager.getHandler(AssetFormats.DECISION_SPREADSHEET_XLS).isRuleAsset()); assertTrue(ContentManager.getHandler(AssetFormats.DECISION_TABLE_GUIDED).isRuleAsset()); assertFalse(ContentManager.getHandler(AssetFormats.DRL_MODEL).isRuleAsset()); assertFalse(ContentManager.getHandler(AssetFormats.DSL).isRuleAsset()); assertFalse(ContentManager.getHandler(AssetFormats.MODEL).isRuleAsset()); assertFalse(ContentManager.getHandler(AssetFormats.ENUMERATION).isRuleAsset()); }
@Test public void testContentFormat() { assertTrue(ContentManager.getHandler(AssetFormats.DRL) instanceof DRLFileContentHandler); assertTrue(ContentManager.getHandler(AssetFormats.DSL) instanceof DSLDefinitionContentHandler); assertTrue( ContentManager.getHandler(AssetFormats.DSL_TEMPLATE_RULE) instanceof DSLRuleContentHandler); assertTrue(ContentManager.getHandler(AssetFormats.BUSINESS_RULE) instanceof BRLContentHandler); assertTrue( ContentManager.getHandler(AssetFormats.DECISION_SPREADSHEET_XLS) instanceof DecisionTableXLSHandler); assertTrue( ContentManager.getHandler(AssetFormats.ENUMERATION) instanceof EnumerationContentHandler); assertTrue( ContentManager.getHandler(AssetFormats.DECISION_TABLE_GUIDED) instanceof GuidedDTContentHandler); assertTrue( ContentManager.getHandler(AssetFormats.DRL_MODEL) instanceof FactModelContentHandler); assertTrue(ContentManager.getHandler("XXX") instanceof DefaultContentHandler); }