Shell shell = getOsgiService(Shell.class);
shell.execute("help");
}
public void testInstallCommand() throws Exception {
Shell shell = getOsgiService(Shell.class);
try {
shell.execute("log/display");
fail("command should not exist");
} catch (CommandLineExecutionFailed e) {
assertNotNull(e.getCause());
assertTrue(e.getCause() instanceof NoSuchCommandException);
}
Bundle b = installBundle("org.apache.servicemix.kernel.gshell", "org.apache.servicemix.kernel.gshell.log", null, "jar");
shell.execute("log/display");
b.uninstall();
try {
shell.execute("log/display");
fail("command should not exist");
} catch (CommandLineExecutionFailed e) {
assertNotNull(e.getCause());
assertTrue(e.getCause() instanceof NoSuchCommandException);
}