use of org.eclipse.ecf.core.IContainer in project ecf by eclipse.
the class RestContainerTest method testConnectedID.
public void testConnectedID() throws Exception {
IContainer container = createRestContainer(RestConstants.TEST_DE_TARGET);
ID connectedID = container.getConnectedID();
assertNull(connectedID);
}
use of org.eclipse.ecf.core.IContainer in project ecf by eclipse.
the class RestContainerTest method testConnect.
public void testConnect() throws Exception {
IContainer container = createRestContainer(RestConstants.TEST_DE_TARGET);
ID connectedID = container.getConnectedID();
ID targetID = createRestID(new URL(RestConstants.TEST_TWITTER_TARGET));
assertNotNull(targetID);
container.connect(targetID, null);
connectedID = container.getConnectedID();
assertEquals(targetID, connectedID);
}
use of org.eclipse.ecf.core.IContainer in project ecf by eclipse.
the class RestContainerTest method testCreateContainer.
public void testCreateContainer() throws Exception {
IContainer container = createRestContainer(RestConstants.TEST_DE_TARGET);
assertNotNull(container);
assertTrue(container instanceof RestClientContainer);
}
use of org.eclipse.ecf.core.IContainer in project ecf by eclipse.
the class ClientContainerConnectTest method testListenerConnected.
public void testListenerConnected() throws Exception {
final IContainer client = getClients()[0];
client.addListener(createListener());
client.connect(createServerID(), null);
final Object o = clientConnectedEvents.get(0);
assertTrue(o instanceof IContainerConnectedEvent);
final IContainerConnectedEvent cco = (IContainerConnectedEvent) o;
assertTrue(cco.getLocalContainerID().equals(client.getID()));
assertTrue(cco.getTargetID().equals(createServerID()));
}
use of org.eclipse.ecf.core.IContainer in project ecf by eclipse.
the class ClientContainerConnectTest method testRemoveListener.
public void testRemoveListener() throws Exception {
final IContainer client = getClients()[0];
final IContainerListener l = createListener();
client.addListener(l);
client.removeListener(l);
client.connect(createServerID(), null);
assertTrue(clientConnectingEvents.size() == 0);
}
Aggregations