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

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


                .startInnerElement("subject", NamespaceURIs.JABBER_CLIENT).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

        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

        // 2 stanzas + subject should fit in 150 seconds
        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

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.