Package com.calclab.emite.xtesting.handlers

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


    // <iq to='juliet@capulet.com' type='result' id='vc1'/>
  }

  @Test
  public void verifySendVcardRequest() {
    final AvatarVCardTestHandler handler = new AvatarVCardTestHandler();
    avatarManager.addAvatarVCardReceivedHandler(handler);

    session.setLoggedIn(uri("romeo@montague.net/orchard"));
    avatarManager.requestVCard(uri("juliet@capulet.com"));
    session.verifyIQSent("<iq to='juliet@capulet.com' type='get'><vCard xmlns='vcard-temp'/></iq>");
    session.answerSuccess(new IQ(XMLBuilder.fromXML("<iq from='juliet@capulet.com' to='romeo@montague.net/orchard' type='result'>"
        + "<vCard xmlns='vcard-temp'><PHOTO><TYPE>image/jpeg</TYPE>" + "<BINVAL>Base64-encoded-avatar-file-here!</BINVAL></PHOTO></vCard></iq>")));
    assertTrue(handler.isCalledOnce());
  }
View Full Code Here

TOP

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

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.