use of com.alipay.sofa.ark.container.session.handler.ArkCommandHandler in project sofa-ark by alipay.
the class CommandHandlerTest method test.
@Test
public void test() {
ArkCommandHandler arkCommandHandler = new ArkCommandHandler();
RegistryService registryService = ArkServiceContainerHolder.getContainer().getService(RegistryService.class);
registryService.publishService(CommandProvider.class, new MockCommandProvider(), new ContainerServiceProvider());
Assert.assertTrue(arkCommandHandler.handleCommand("any").contains("mock help"));
Assert.assertTrue("mock command provider".equals(arkCommandHandler.handleCommand("mock")));
}
Aggregations