Package com.calclab.emite.xtesting.handlers

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


    shouldParseVCardImpl(VALID_VCARD);
  }

  @Test
  public void shouldRequestVCard() {
    final VCardResponseTestHandler handler = new VCardResponseTestHandler();
    manager.getUserVCard(XmppURI.uri("test2@domain"), handler);
    session.verifyIQSent(OTHER_VCARD);
  }
View Full Code Here


    session.verifyIQSent(iq);
  }

  @Test
  public void shouldSetOwnVCard() {
    final VCardResponseTestHandler handler = new VCardResponseTestHandler();
    final VCard vCard = new VCard();
    vCard.setDisplayName("Peter Saint-Andre");
    vCard.setFamilyName("Saint-Andre");
    vCard.setGivenName("Peter");
    vCard.setMiddleName("");
View Full Code Here

    manager.updateOwnVCard(vCard, handler);
    session.verifyIQSent(VCARD_SETTED);
  }

  private void shouldParseVCardImpl(final String vcard) {
    final VCardResponseTestHandler handler = new VCardResponseTestHandler();
    manager.requestOwnVCard(handler);
    session.verifyIQSent(new IQ(Type.get));
    session.answerSuccess(new IQ(XMLBuilder.fromXML(vcard)));
    assertTrue(handler.isCalledOnce());
    assertTrue(handler.getLastVCardResponse().hasVCard());
    assertNotNull(handler.getLastVCardResponse().getVCard().getNickName());
  }
View Full Code Here

TOP

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

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.