use of org.apache.activemq.artemis.cli.commands.address.ShowAddress in project activemq-artemis by apache.
the class AddressCommandTest method testShowAddressBindings.
@Test
public void testShowAddressBindings() throws Exception {
// Create bindings
SimpleString address = new SimpleString("address");
server.addAddressInfo(new AddressInfo(address, RoutingType.MULTICAST));
server.createQueue(address, RoutingType.MULTICAST, new SimpleString("queue1"), null, true, false);
server.createQueue(address, RoutingType.MULTICAST, new SimpleString("queue2"), null, true, false);
server.createQueue(address, RoutingType.MULTICAST, new SimpleString("queue3"), null, true, false);
DivertConfiguration divertConfiguration = new DivertConfiguration();
divertConfiguration.setName(address.toString());
divertConfiguration.setAddress(address.toString());
server.deployDivert(divertConfiguration);
ShowAddress showAddress = new ShowAddress();
showAddress.setName(address.toString());
showAddress.setBindings(true);
showAddress.execute(new ActionContext(System.in, new PrintStream(output), new PrintStream(error)));
System.out.println(output.toString());
}
use of org.apache.activemq.artemis.cli.commands.address.ShowAddress in project activemq-artemis by apache.
the class AddressCommandTest method testShowAddress.
@Test
public void testShowAddress() throws Exception {
String address = "address";
CreateAddress command = new CreateAddress();
command.setName(address);
command.execute(new ActionContext());
assertNotNull(server.getAddressInfo(new SimpleString(address)));
ShowAddress showAddress = new ShowAddress();
showAddress.setName(address);
showAddress.execute(new ActionContext(System.in, new PrintStream(output), new PrintStream(error)));
System.out.println(output.toString());
}
use of org.apache.activemq.artemis.cli.commands.address.ShowAddress in project activemq-artemis by apache.
the class AddressCommandTest method testShowAddressDoesNotExist.
@Test
public void testShowAddressDoesNotExist() throws Exception {
String address = "address";
ShowAddress showAddress = new ShowAddress();
showAddress.setName(address);
showAddress.execute(new ActionContext(System.in, new PrintStream(output), new PrintStream(error)));
checkExecutionFailure(showAddress, "Address Does Not Exist");
}
Aggregations