@Test public void testCreateJmsQueue() throws Exception { CreateDestination command = new CreateDestination(); command.setName("jmsQueue1"); command.setBindings("jmsQueue1Binding"); command.execute(new ActionContext(System.in, new PrintStream(output), new PrintStream(error))); checkExecutionResult(command); }
@Test public void testCreateCoreQueue() throws Exception { CreateDestination command = new CreateDestination(); command.setDestType(DestinationAction.CORE_QUEUE); command.setName("coreQueue1"); command.execute(new ActionContext(System.in, new PrintStream(output), new PrintStream(error))); checkExecutionResult(command); }
@Test public void testCreateJmsQueueWithFilter() throws Exception { CreateDestination command = new CreateDestination(); command.setName("jmsQueue2"); command.setBindings("jmsQueue2Binding"); command.setFilter("color='red'"); command.execute(new ActionContext(System.in, new PrintStream(output), new PrintStream(error))); checkExecutionResult(command); assertTrue(checkBindingExists(command, "color='red'")); }
@Test public void testDeleteJmsTopic() throws Exception { CreateDestination command = new CreateDestination(); command.setDestType(DestinationAction.JMS_TOPIC); command.setName("jmsTopic1"); command.setBindings("jmsTopic1Binding"); command.execute(new ActionContext()); DeleteDestination delete = new DeleteDestination(); delete.setDestType(DestinationAction.JMS_TOPIC); delete.setName("jmsTopic1"); delete.execute(new ActionContext(System.in, new PrintStream(output), new PrintStream(error))); checkExecutionResult(delete); }
@Test public void testDeleteCoreQueue() throws Exception { CreateDestination command = new CreateDestination(); command.setName("coreQueue2"); command.setDestType(DestinationAction.CORE_QUEUE); command.setFilter("color='green'"); command.execute(new ActionContext()); DeleteDestination delete = new DeleteDestination(); delete.setName("coreQueue2"); delete.setDestType(DestinationAction.CORE_QUEUE); delete.execute(new ActionContext(System.in, new PrintStream(output), new PrintStream(error))); checkExecutionResult(delete); }