Package com.calclab.emite.xep.delay

Examples of com.calclab.emite.xep.delay.Delay


    final XmppURI uri = uri("name@domain/resource");
    final XMLPacket delayNode = XMLBuilder.create("delay", "urn:xmpp:delay").getXML();
    delayNode.setAttribute("from", "name@domain/resource");
    delayNode.setAttribute("stamp", "1980-04-15T17:15:02.159+01:00");
    final Delay delay = new Delay(delayNode);
    assertNotNull(delay);
    final Date date = new Date(324663302159L);
    assertEquals(uri, delay.getFrom());
    assertEquals(date, delay.getStamp());
  }
View Full Code Here


    final XmppURI uri = uri("name@domain/resource");
    final XMLPacket delayNode = XMLBuilder.create("x", "jabber:x:delay").getXML();
    delayNode.setAttribute("xmlns", "jabber:x:delay");
    delayNode.setAttribute("from", "name@domain/resource");
    delayNode.setAttribute("stamp", "19800415T17:15:02");
    final Delay delay = new Delay(delayNode);
    assertNotNull(delay);

    final Date date = new Date(80, 3, 15, 17, 15, 2);
    date.setTime(date.getTime() - (date.getTimezoneOffset() * 60000));
   
    assertEquals(uri, delay.getFrom());
    assertEquals(date, delay.getStamp());
  }
View Full Code Here

    stanza.setTo((XmppURI) null);
    final XMLPacket delayNode = stanza.getXML().addChild("delay");
    delayNode.setAttribute("xmlns", "urn:xmpp:delay");
    delayNode.setAttribute("from", "name@domain/resource");
    delayNode.setAttribute("stamp", "1980-04-15T17:15:02.159+01:00");
    final Delay delay = DelayHelper.getDelay(stanza);
    assertNotNull(delay);
   
    final Date date = new Date(324663302159L);
    assertEquals(uri, delay.getFrom());
    assertEquals(date, delay.getStamp());
  }
View Full Code Here

    stanza.setTo(null);
    final XMLPacket delayNode = stanza.getXML().addChild("x");
    delayNode.setAttribute("xmlns", "jabber:x:delay");
    delayNode.setAttribute("from", "name@domain/resource");
    delayNode.setAttribute("stamp", "19800415T15:15:02");
    final Delay delay = DelayHelper.getDelay(stanza);
    assertNotNull(delay);

    final Date date = new Date(80, 3, 15, 15, 15, 2);
    date.setTime(date.getTime() - (date.getTimezoneOffset() * 60000));
   
    assertEquals(uri, delay.getFrom());
    assertEquals(date, delay.getStamp());
  }
View Full Code Here

TOP

Related Classes of com.calclab.emite.xep.delay.Delay

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.