Examples of Muc


Examples of rocks.xmpp.extensions.muc.model.Muc

    }

    @Test
    public void testEnterRoom() throws JAXBException, XMLStreamException {
        Presence presence = new Presence();
        presence.getExtensions().add(new Muc());
        String xml = marshal(presence);
        Assert.assertEquals(xml, "<presence><x xmlns=\"http://jabber.org/protocol/muc\"></x></presence>");
    }
View Full Code Here

Examples of rocks.xmpp.extensions.muc.model.Muc

    }

    @Test
    public void testEnterRoomWithPassword() throws JAXBException, XMLStreamException {
        Presence presence = new Presence();
        presence.getExtensions().add(new Muc("cauldronburn"));
        String xml = marshal(presence);
        Assert.assertEquals(xml, "<presence><x xmlns=\"http://jabber.org/protocol/muc\"><password>cauldronburn</password></x></presence>");
    }
View Full Code Here

Examples of rocks.xmpp.extensions.muc.model.Muc

    }

    @Test
    public void testEnterRoomWithHistoryMaxChars() throws JAXBException, XMLStreamException {
        Presence presence = new Presence();
        presence.getExtensions().add(new Muc(History.forMaxChars(65000)));
        String xml = marshal(presence);
        Assert.assertEquals(xml, "<presence><x xmlns=\"http://jabber.org/protocol/muc\"><history maxchars=\"65000\"></history></x></presence>");
    }
View Full Code Here

Examples of rocks.xmpp.extensions.muc.model.Muc

    }

    @Test
    public void testEnterRoomWithHistoryMaxStanzas() throws JAXBException, XMLStreamException {
        Presence presence = new Presence();
        presence.getExtensions().add(new Muc(History.forMaxMessages(20)));
        String xml = marshal(presence);
        Assert.assertEquals(xml, "<presence><x xmlns=\"http://jabber.org/protocol/muc\"><history maxstanzas=\"20\"></history></x></presence>");
    }
View Full Code Here

Examples of rocks.xmpp.extensions.muc.model.Muc

    }

    @Test
    public void testEnterRoomWithHistorySeconds() throws JAXBException, XMLStreamException {
        Presence presence = new Presence();
        presence.getExtensions().add(new Muc(History.forSeconds(180)));
        String xml = marshal(presence);
        Assert.assertEquals(xml, "<presence><x xmlns=\"http://jabber.org/protocol/muc\"><history seconds=\"180\"></history></x></presence>");
    }
View Full Code Here

Examples of rocks.xmpp.extensions.muc.model.Muc

    public void testEnterRoomWithHistorySince() throws JAXBException, XMLStreamException {
        Date date = new Date();
        Calendar calendar = new GregorianCalendar();
        calendar.setTime(date);
        Presence presence = new Presence();
        presence.getExtensions().add(new Muc(History.since(date)));
        String xml = marshal(presence);
        Assert.assertEquals(xml, "<presence><x xmlns=\"http://jabber.org/protocol/muc\"><history since=\"" + DatatypeConverter.printDateTime(calendar) + "\"></history></x></presence>");
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.