Package com.calclab.emite.xtesting.handlers

Examples of com.calclab.emite.xtesting.handlers.HashPresenceReceivedTestHandler


    avatarManager = new AvatarManager(new SimpleEventBus(), session);
  }

  @Test
  public void managerShouldListenPresenceWithPhoto() {
    final HashPresenceReceivedTestHandler handler = new HashPresenceReceivedTestHandler();
    avatarManager.addHashPresenceReceviedHandler(handler);
    final Presence presence = new Presence();
    presence.setFrom(uri("juliet@capulet.com/balcony"));
    presence.getXML().addChild("x", "vcard-temp:x:update").setChildText("photo", "sha1-hash-of-image");
    session.receives(presence);
    assertTrue(handler.isCalledOnce());
    assertEquals(presence, handler.getLastPresence());
  }
View Full Code Here

TOP

Related Classes of com.calclab.emite.xtesting.handlers.HashPresenceReceivedTestHandler

Copyright © 2018 www.massapicom. 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.