Package rocks.xmpp.extensions.mood.model

Examples of rocks.xmpp.extensions.mood.model.Mood


    @Test
    public void unmarshalSpontaneous() throws XMLStreamException, JAXBException {
        String xml = "<mood xmlns='http://jabber.org/protocol/mood'>\n" +
                "  <spontaneous/>\n" +
                "</mood>\n";
        Mood mood = unmarshal(xml, Mood.class);
        Assert.assertNotNull(mood);
        Assert.assertEquals(mood.getValue(), Mood.Value.SPONTANEOUS);
    }
View Full Code Here


    @Test
    public void unmarshalStressed() throws XMLStreamException, JAXBException {
        String xml = "<mood xmlns='http://jabber.org/protocol/mood'>\n" +
                "  <stressed/>\n" +
                "</mood>\n";
        Mood mood = unmarshal(xml, Mood.class);
        Assert.assertNotNull(mood);
        Assert.assertEquals(mood.getValue(), Mood.Value.STRESSED);
    }
View Full Code Here

    @Test
    public void unmarshalStrong() throws XMLStreamException, JAXBException {
        String xml = "<mood xmlns='http://jabber.org/protocol/mood'>\n" +
                "  <strong/>\n" +
                "</mood>\n";
        Mood mood = unmarshal(xml, Mood.class);
        Assert.assertNotNull(mood);
        Assert.assertEquals(mood.getValue(), Mood.Value.STRONG);
    }
View Full Code Here

    @Test
    public void unmarshalSurprised() throws XMLStreamException, JAXBException {
        String xml = "<mood xmlns='http://jabber.org/protocol/mood'>\n" +
                "  <surprised/>\n" +
                "</mood>\n";
        Mood mood = unmarshal(xml, Mood.class);
        Assert.assertNotNull(mood);
        Assert.assertEquals(mood.getValue(), Mood.Value.SURPRISED);
    }
View Full Code Here

    @Test
    public void unmarshalThankful() throws XMLStreamException, JAXBException {
        String xml = "<mood xmlns='http://jabber.org/protocol/mood'>\n" +
                "  <thankful/>\n" +
                "</mood>\n";
        Mood mood = unmarshal(xml, Mood.class);
        Assert.assertNotNull(mood);
        Assert.assertEquals(mood.getValue(), Mood.Value.THANKFUL);
    }
View Full Code Here

    @Test
    public void unmarshalThirsty() throws XMLStreamException, JAXBException {
        String xml = "<mood xmlns='http://jabber.org/protocol/mood'>\n" +
                "  <thirsty/>\n" +
                "</mood>\n";
        Mood mood = unmarshal(xml, Mood.class);
        Assert.assertNotNull(mood);
        Assert.assertEquals(mood.getValue(), Mood.Value.THIRSTY);
    }
View Full Code Here

    @Test
    public void unmarshalTired() throws XMLStreamException, JAXBException {
        String xml = "<mood xmlns='http://jabber.org/protocol/mood'>\n" +
                "  <tired/>\n" +
                "</mood>\n";
        Mood mood = unmarshal(xml, Mood.class);
        Assert.assertNotNull(mood);
        Assert.assertEquals(mood.getValue(), Mood.Value.TIRED);
    }
View Full Code Here

    @Test
    public void unmarshalUndefined() throws XMLStreamException, JAXBException {
        String xml = "<mood xmlns='http://jabber.org/protocol/mood'>\n" +
                "  <undefined/>\n" +
                "</mood>\n";
        Mood mood = unmarshal(xml, Mood.class);
        Assert.assertNotNull(mood);
        Assert.assertEquals(mood.getValue(), Mood.Value.UNDEFINED);
    }
View Full Code Here

    @Test
    public void unmarshalWeak() throws XMLStreamException, JAXBException {
        String xml = "<mood xmlns='http://jabber.org/protocol/mood'>\n" +
                "  <weak/>\n" +
                "</mood>\n";
        Mood mood = unmarshal(xml, Mood.class);
        Assert.assertNotNull(mood);
        Assert.assertEquals(mood.getValue(), Mood.Value.WEAK);
    }
View Full Code Here

        Assert.assertEquals(xml, "<mood xmlns=\"http://jabber.org/protocol/mood\"><impressed></impressed></mood>");
    }

    @Test
    public void marshalInAwe() throws XMLStreamException, JAXBException {
        String xml = marshal(new Mood(Mood.Value.IN_AWE));
        Assert.assertEquals(xml, "<mood xmlns=\"http://jabber.org/protocol/mood\"><in_awe></in_awe></mood>");
    }
View Full Code Here

TOP

Related Classes of rocks.xmpp.extensions.mood.model.Mood

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.