use of alma.jconttest.ContainerServicesTester in project ACS by ACS-Community.
the class AdvancedComponentClientTest method testCreateContainerServices.
public void testCreateContainerServices() throws Exception {
String localClientName = "sillyLocalClient";
ContainerServices newCS = client.createContainerServices(localClientName, logger);
assertEquals(newCS.getName(), localClientName);
try {
newCS.getComponentStateManager();
fail("NPE expected in getComponentStateManager call!");
} catch (NullPointerException ex) {
// that's good
;
}
// get references to the same component through two different CS instances
final String compInstance = "CONT_SERVICES_TESTER";
ContainerServicesTester compRef1 = ContainerServicesTesterHelper.narrow(client.getContainerServices().getComponent(compInstance));
assertNotNull(compRef1);
ContainerServicesTester compRef2 = ContainerServicesTesterHelper.narrow(newCS.getComponent(compInstance));
assertNotNull(compRef2);
assertNotSame("Should have gotten a new CORBA proxy for the same component.", compRef1, compRef2);
assertEquals(compRef1.name(), compRef2.name());
}
Aggregations