use of org.eclipse.ecf.datashare.events.IChannelConnectEvent in project ecf by eclipse.
the class NIODatashareTest method testChannelConnectEvent.
public void testChannelConnectEvent() throws Exception {
final ID[] eventIds = new ID[2];
channelA = createChannel(channelContainerA, new IChannelListener() {
public void handleChannelEvent(IChannelEvent e) {
if (e instanceof IChannelConnectEvent) {
IChannelConnectEvent event = (IChannelConnectEvent) e;
eventIds[0] = event.getChannelID();
eventIds[1] = event.getTargetID();
}
}
});
containerA.connect(null, null);
assertEquals(channelA.getID(), eventIds[0]);
assertEquals(containerA.getConnectedID(), eventIds[1]);
}
Aggregations