Package org.apache.vysper.xmpp.modules.extension.xep0045_muc.stanzas

Examples of org.apache.vysper.xmpp.modules.extension.xep0045_muc.stanzas.History


       
        assertStanzas(stanzas, 0);
    }

    public void test150SecondsStanzas() throws Exception {
        List<Stanza> stanzas = history.createStanzas(RECEIVER_OCCUPANT, true, new History(null, null, 150, null));
       
        // 2 stanzas + subject should fit in 150 seconds
        assertStanzas(stanzas, 3);
    }
View Full Code Here


        assertStanzas(stanzas, 3);
    }

   
    public void testSince5minutesStanzas() throws Exception {
        List<Stanza> stanzas = history.createStanzas(RECEIVER_OCCUPANT, true, new History(null, null, null, createTimestamp(5)));
       
        // 2 stanzas + subject should fit in 150 seconds
        assertStanzas(stanzas, 6);
    }
View Full Code Here

                new Occupant(OCCUPANT2_JID, "nick2", Affiliation.None, Role.Participant));
        room.getHistory().append(StanzaBuilder.createMessageStanza(OCCUPANT2_JID, ROOM1_JID, MessageStanzaType.GROUPCHAT, null, "Body3").build(),
                new Occupant(OCCUPANT2_JID, "nick2", Affiliation.None, Role.Participant));
       
        // now, let user 1 enter room
        enterRoom(OCCUPANT1_JID, ROOM1_JID_WITH_NICK, null, new History(2, null, null, null), false);

        Stanza stanza = occupant1Queue.getNext();
        // first stanza should be room presence
        assertNotNull(stanza);
        assertEquals("presence", stanza.getName());
View Full Code Here

                startInnerElement("subject").addText(SUBJECT).endInnerElement().build(),
                FROM_OCCUPANT);
    }

    public void testGetAllStanzas() throws Exception {
        List<Stanza> stanzas = history.createStanzas(RECEIVER_OCCUPANT, true, new History(null, null, null, null));
       
        assertStanzas(stanzas, DiscussionHistory.DEFAULT_HISTORY_SIZE);
    }
View Full Code Here

        assertStanzas(stanzas, DiscussionHistory.DEFAULT_HISTORY_SIZE);
    }

   
    public void testThreeStanzas() throws Exception {
        List<Stanza> stanzas = history.createStanzas(RECEIVER_OCCUPANT, true, new History(3, null, null, null));
        assertStanzas(stanzas, 3);
    }
View Full Code Here

        List<Stanza> stanzas = history.createStanzas(RECEIVER_OCCUPANT, true, new History(3, null, null, null));
        assertStanzas(stanzas, 3);
    }
   
    public void testZeroStanzas() throws Exception {
        List<Stanza> stanzas = history.createStanzas(RECEIVER_OCCUPANT, true, new History(0, null, null, null));
       
        assertStanzas(stanzas, 0);
    }
View Full Code Here

       
        assertStanzas(stanzas, 0);
    }

    public void test500CharStanzas() throws Exception {
        List<Stanza> stanzas = history.createStanzas(RECEIVER_OCCUPANT, true, new History(null, 500, null, null));
       
        // 2 stanzas should fit in 500 chars
        assertStanzas(stanzas, 2);
    }
View Full Code Here

        // 2 stanzas should fit in 500 chars
        assertStanzas(stanzas, 2);
    }

    public void test0CharStanzas() throws Exception {
        List<Stanza> stanzas = history.createStanzas(RECEIVER_OCCUPANT, true, new History(null, 0, null, null));
       
        assertStanzas(stanzas, 0);
    }
View Full Code Here

        room.getHistory().append(
                StanzaBuilder.createMessageStanza(OCCUPANT2_JID, ROOM1_JID, MessageStanzaType.GROUPCHAT, null, "Body3")
                        .build(), new Occupant(OCCUPANT2_JID, "nick2", room, Role.Participant));

        // now, let user 1 enter room
        enterRoom(OCCUPANT1_JID, ROOM1_JID_WITH_NICK, null, new History(2, null, null, null), false);

        Stanza stanza = occupant1Queue.getNext();
        // first stanza should be room presence
        assertNotNull(stanza);
        assertEquals("presence", stanza.getName());
View Full Code Here

        room.getHistory().append(
                StanzaBuilder.createMessageStanza(OCCUPANT2_JID, ROOM1_JID, MessageStanzaType.GROUPCHAT, null, "Body3")
                        .build(), new Occupant(OCCUPANT2_JID, "nick2", room, Role.Participant));

        // now, let user 1 enter room
        enterRoom(OCCUPANT1_JID, ROOM1_JID_WITH_NICK, null, new History(2, null, null, null), false);

        Stanza stanza = occupant1Queue.getNext();
        // first stanza should be room presence
        assertNotNull(stanza);
        assertEquals("presence", stanza.getName());
View Full Code Here

TOP

Related Classes of org.apache.vysper.xmpp.modules.extension.xep0045_muc.stanzas.History

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.