Search in sources :

Example 6 with CommandService

use of org.exoplatform.services.command.impl.CommandService in project kernel by exoplatform.

the class CommandServiceTest method testStringConf.

public void testStringConf() throws Exception {
    CommandService cservice = (CommandService) container.getComponentInstanceOfType(CommandService.class);
    Catalog c = cservice.getCatalog();
    assertNull(c.getCommand("StrCommand"));
    cservice.putCatalog(new ByteArrayInputStream(IS.getBytes()));
    Catalog c1 = cservice.getCatalog();
    assertNotNull(c1.getCommand("StrCommand"));
}
Also used : ByteArrayInputStream(java.io.ByteArrayInputStream) CommandService(org.exoplatform.services.command.impl.CommandService) Catalog(org.apache.commons.chain.Catalog)

Aggregations

CommandService (org.exoplatform.services.command.impl.CommandService)6 Catalog (org.apache.commons.chain.Catalog)3 ByteArrayInputStream (java.io.ByteArrayInputStream)2 Iterator (java.util.Iterator)2 Command (org.apache.commons.chain.Command)1 Context (org.apache.commons.chain.Context)1 ContextBase (org.apache.commons.chain.impl.ContextBase)1