Package com.calclab.emite.xep.muc

Examples of com.calclab.emite.xep.muc.RoomChat.addMessageReceivedHandler()


  @Test
  public void shouldFireChatMessages() {
    final RoomChat chat = manager.open(uri("room@rooms.domain/user"));
    final MessageReceivedTestHandler handler = new MessageReceivedTestHandler();
    chat.addMessageReceivedHandler(handler);
    session.receives("<message from='room@rooms.domain/other' to='user@domain/resource' " + "type='groupchat'><body>the message body</body></message>");
    assertEquals(1, handler.getCalledTimes());
  }

  @Test
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.