@Test public void testGreaterThan() throws Exception { final CommandContext ctx = CLITestUtil.getCommandContext(cliOut); try { ctx.connectController(); ctx.handle(this.getAddPropertyReq("\"5\"")); assertEquals("5", runIf(ctx, ">", "&&", "\"1\"")); assertEquals("true", runIf(ctx, ">", "||", "\"1\"")); } finally { ctx.handleSafe(this.getRemovePropertyReq()); ctx.terminateSession(); cliOut.reset(); } }
protected StringBuilder undeploy(StringBuilder buf, String deployment, String sg) { ctx.handleSafe("undeploy --server-groups=" + sg + ' ' + deployment); if (ctx.getExitCode() == 0) { if (!afterTestDeployments.remove(deployment)) { if (buf == null) { buf = new StringBuilder(); buf.append("Undeployed unexpected content: "); buf.append(deployment); } else { buf.append(", ").append(deployment); } } } return buf; }