use of org.jivesoftware.smack.DummyConnection in project Smack by igniterealtime.
the class PingTest method checkSendingPing.
@Test
public void checkSendingPing() throws InterruptedException, SmackException, IOException, XMPPException {
DummyConnection dummyCon = getAuthentiactedDummyConnection();
PingManager pinger = PingManager.getInstanceFor(dummyCon);
try {
pinger.ping(DUMMY_AT_EXAMPLE_ORG);
} catch (SmackException e) {
// Ignore the fact the server won't answer for this unit test.
}
Stanza sentPacket = dummyCon.getSentPacket();
assertTrue(sentPacket instanceof Ping);
}
use of org.jivesoftware.smack.DummyConnection in project Smack by igniterealtime.
the class ChatConnectionTest method validateDefaultSetNormalIncludedFalse.
@Test
public void validateDefaultSetNormalIncludedFalse() {
ChatManager.setDefaultIsNormalIncluded(false);
assertFalse(ChatManager.getInstanceFor(new DummyConnection()).isNormalIncluded());
}
use of org.jivesoftware.smack.DummyConnection in project Smack by igniterealtime.
the class RosterOfflineTest method setup.
@Before
public void setup() {
this.connection = new DummyConnection();
assertFalse(connection.isConnected());
roster = Roster.getInstanceFor(connection);
assertNotNull(roster);
}
use of org.jivesoftware.smack.DummyConnection in project Smack by igniterealtime.
the class PingTest method checkPingToServerTimeout.
@Test
public void checkPingToServerTimeout() throws SmackException, IOException, XMPPException, InterruptedException {
DummyConnection con = getAuthenticatedDummyConnectionWithoutIqReplies();
PingManager pinger = PingManager.getInstanceFor(con);
boolean res = pinger.pingMyServer();
assertFalse(res);
}
use of org.jivesoftware.smack.DummyConnection in project Smack by igniterealtime.
the class FileTransferNegotiatorTest method setUp.
@Before
public void setUp() throws Exception {
connection = new DummyConnection();
connection.connect();
connection.login();
ServiceDiscoveryManager.getInstanceFor(connection);
}
Aggregations