Search in sources :

Example 1 with IChatRoomInvitationSender

use of org.eclipse.ecf.presence.chatroom.IChatRoomInvitationSender in project ecf by eclipse.

the class AbstractChatRoomInvitationTest method testSendInvitation.

public void testSendInvitation() throws Exception {
    final IChatRoomInvitationSender invitationSender = chat0.getInvitationSender();
    assertNotNull(invitationSender);
    final IChatRoomInfo roomInfo = chat0.getChatRoomInfo(CHAT_ROOM_NAME);
    if (roomInfo == null)
        return;
    final IChatRoomContainer chatRoomContainer = roomInfo.createChatRoomContainer();
    chatRoomContainer.connect(roomInfo.getRoomID(), null);
    invitationSender.sendInvitation(roomInfo.getRoomID(), getClient(1).getConnectedID(), null, "this is an invitation");
    try {
        synchronized (synchObject) {
            synchObject.wait(WAITTIME);
        }
    } catch (final Exception e) {
        throw e;
    }
    assertHasEvent(invitationsReceived, ID.class);
}
Also used : IChatRoomInfo(org.eclipse.ecf.presence.chatroom.IChatRoomInfo) IChatRoomContainer(org.eclipse.ecf.presence.chatroom.IChatRoomContainer) IChatRoomInvitationSender(org.eclipse.ecf.presence.chatroom.IChatRoomInvitationSender)

Aggregations

IChatRoomContainer (org.eclipse.ecf.presence.chatroom.IChatRoomContainer)1 IChatRoomInfo (org.eclipse.ecf.presence.chatroom.IChatRoomInfo)1 IChatRoomInvitationSender (org.eclipse.ecf.presence.chatroom.IChatRoomInvitationSender)1