Examples of addPresenceListener()


Examples of rocks.xmpp.core.session.TestXmppSession.addPresenceListener()

    @Test
    public void testLastActivityInAwayPresence() {
        final TestXmppSession xmppSession1 = new TestXmppSession(ROMEO, new MockServer());
        xmppSession1.getExtensionManager(AvatarManager.class).setEnabled(false);
        xmppSession1.addPresenceListener(new PresenceListener() {
            @Override
            public void handle(PresenceEvent e) {
                xmppSession1.removePresenceListener(this);
                Assert.assertTrue(e.getPresence().getExtension(LastActivity.class) != null);
            }
View Full Code Here

Examples of rocks.xmpp.core.session.TestXmppSession.addPresenceListener()

    @Test
    public void testLastActivityInXAPresence() {
        TestXmppSession xmppSession1 = new TestXmppSession(ROMEO, new MockServer());
        xmppSession1.getExtensionManager(AvatarManager.class).setEnabled(false);
        xmppSession1.addPresenceListener(new PresenceListener() {
            @Override
            public void handle(PresenceEvent e) {
                Assert.assertTrue(e.getPresence().getExtension(LastActivity.class) != null);
            }
        });
View Full Code Here

Examples of rocks.xmpp.core.session.TestXmppSession.addPresenceListener()

    @Test
    public void testLastActivityInChatPresence() {
        TestXmppSession xmppSession1 = new TestXmppSession(ROMEO, new MockServer());
        xmppSession1.getExtensionManager(AvatarManager.class).setEnabled(false);
        xmppSession1.addPresenceListener(new PresenceListener() {
            @Override
            public void handle(PresenceEvent e) {
                Assert.assertFalse(e.getPresence().getExtension(LastActivity.class) != null);
            }
        });
View Full Code Here

Examples of rocks.xmpp.core.session.TestXmppSession.addPresenceListener()

    @Test
    public void testLastActivityInDndPresence() {
        TestXmppSession xmppSession1 = new TestXmppSession(ROMEO, new MockServer());
        xmppSession1.getExtensionManager(AvatarManager.class).setEnabled(false);
        xmppSession1.addPresenceListener(new PresenceListener() {
            @Override
            public void handle(PresenceEvent e) {
                Assert.assertFalse(e.getPresence().getExtension(LastActivity.class) != null);
            }
        });
View Full Code Here

Examples of rocks.xmpp.core.session.TestXmppSession.addPresenceListener()

    @Test
    public void testLastActivityInInitialPresence() {
        TestXmppSession xmppSession1 = new TestXmppSession(ROMEO, new MockServer());
        xmppSession1.getExtensionManager(AvatarManager.class).setEnabled(false);
        xmppSession1.addPresenceListener(new PresenceListener() {
            @Override
            public void handle(PresenceEvent e) {
                Assert.assertFalse(e.getPresence().getExtension(LastActivity.class) != null);
            }
        });
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.