Package rocks.xmpp.extensions.nick.model

Examples of rocks.xmpp.extensions.nick.model.Nickname


    public void unmarshalNickname() throws XMLStreamException, JAXBException {
        String xml = "<presence from='narrator@moby-dick.lit' to='starbuck@moby-dick.lit' type='subscribe'>\n" +
                "  <nick xmlns='http://jabber.org/protocol/nick'>Ishmael</nick>\n" +
                "</presence>\n";
        Presence presence = unmarshal(xml, Presence.class);
        Nickname nickname = presence.getExtension(Nickname.class);
        Assert.assertNotNull(nickname);
        Assert.assertEquals(nickname.getValue(), "Ishmael");
    }
View Full Code Here


        Assert.assertEquals(nickname.getValue(), "Ishmael");
    }

    @Test
    public void marshalNickname() throws JAXBException, XMLStreamException {
        String xml = marshal(new Nickname("Ishmael"));
        Assert.assertEquals("<nick xmlns=\"http://jabber.org/protocol/nick\">Ishmael</nick>", xml);
    }
View Full Code Here

TOP

Related Classes of rocks.xmpp.extensions.nick.model.Nickname

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.