Package rocks.xmpp.core.session

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


                Assert.assertNull(e.getMessage().getExtension(Request.class));
            }
        });

        Message message = new Message(JULIET);
        xmppSession1.send(message);
    }

    /**
     * A sender could request receipts on any non-error content message
     */
 
View Full Code Here


        });

        Message message = new Message(JULIET);
        message.setType(Message.Type.ERROR);
        message.setId("123");
        xmppSession1.send(message);
    }

    @Test
    public void testDisabledManager() {
        MockServer mockServer = new MockServer();
View Full Code Here

            }
        });

        Message message = new Message(JULIET);
        message.setId("123");
        xmppSession1.send(message);
    }

    @Test
    public void testEnablingManager() {
        TestXmppSession connection1 = new TestXmppSession();
View Full Code Here

            public void handle(PresenceEvent e) {
                xmppSession1.removePresenceListener(this);
                Assert.assertTrue(e.getPresence().getExtension(LastActivity.class) != null);
            }
        });
        xmppSession1.send(new Message(JULIET));
        xmppSession1.send(new Presence(Presence.Show.AWAY));
    }

    @Test
    public void testLastActivityInXAPresence() {
View Full Code Here

                xmppSession1.removePresenceListener(this);
                Assert.assertTrue(e.getPresence().getExtension(LastActivity.class) != null);
            }
        });
        xmppSession1.send(new Message(JULIET));
        xmppSession1.send(new Presence(Presence.Show.AWAY));
    }

    @Test
    public void testLastActivityInXAPresence() {
        TestXmppSession xmppSession1 = new TestXmppSession(ROMEO, new MockServer());
View Full Code Here

            @Override
            public void handle(PresenceEvent e) {
                Assert.assertTrue(e.getPresence().getExtension(LastActivity.class) != null);
            }
        });
        xmppSession1.send(new Message(JULIET));
        xmppSession1.send(new Presence(Presence.Show.AWAY));
    }

    @Test
    public void testLastActivityInChatPresence() {
View Full Code Here

            public void handle(PresenceEvent e) {
                Assert.assertTrue(e.getPresence().getExtension(LastActivity.class) != null);
            }
        });
        xmppSession1.send(new Message(JULIET));
        xmppSession1.send(new Presence(Presence.Show.AWAY));
    }

    @Test
    public void testLastActivityInChatPresence() {
        TestXmppSession xmppSession1 = new TestXmppSession(ROMEO, new MockServer());
View Full Code Here

            @Override
            public void handle(PresenceEvent e) {
                Assert.assertFalse(e.getPresence().getExtension(LastActivity.class) != null);
            }
        });
        xmppSession1.send(new Presence(Presence.Show.CHAT));
    }

    @Test
    public void testLastActivityInDndPresence() {
        TestXmppSession xmppSession1 = new TestXmppSession(ROMEO, new MockServer());
View Full Code Here

            @Override
            public void handle(PresenceEvent e) {
                Assert.assertFalse(e.getPresence().getExtension(LastActivity.class) != null);
            }
        });
        xmppSession1.send(new Presence(Presence.Show.DND));
    }

    @Test
    public void testLastActivityInInitialPresence() {
        TestXmppSession xmppSession1 = new TestXmppSession(ROMEO, new MockServer());
View Full Code Here

            @Override
            public void handle(PresenceEvent e) {
                Assert.assertFalse(e.getPresence().getExtension(LastActivity.class) != null);
            }
        });
        xmppSession1.send(new Presence(Presence.Show.AWAY));
    }

    @Test
    public void testServiceDiscoveryEntry() {
        TestXmppSession xmppSession1 = new TestXmppSession();
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.