use of org.jivesoftware.smack.DummyConnection in project Smack by igniterealtime.
the class ChatConnectionTest method validateDefaultSetNormalIncludedTrue.
@Test
public void validateDefaultSetNormalIncludedTrue() {
ChatManager.setDefaultIsNormalIncluded(true);
assertTrue(ChatManager.getInstanceFor(new DummyConnection()).isNormalIncluded());
}
use of org.jivesoftware.smack.DummyConnection in project Smack by igniterealtime.
the class ChatConnectionTest method validateDefaultSetMatchModeEntityBareJid.
@Test
public void validateDefaultSetMatchModeEntityBareJid() {
ChatManager.setDefaultMatchMode(ChatManager.MatchMode.BARE_JID);
assertEquals(ChatManager.MatchMode.BARE_JID, ChatManager.getInstanceFor(new DummyConnection()).getMatchMode());
}
use of org.jivesoftware.smack.DummyConnection in project Smack by igniterealtime.
the class ChatConnectionTest method validateDefaultSetMatchModeNone.
@Test
public void validateDefaultSetMatchModeNone() {
ChatManager.setDefaultMatchMode(ChatManager.MatchMode.NONE);
assertEquals(ChatManager.MatchMode.NONE, ChatManager.getInstanceFor(new DummyConnection()).getMatchMode());
}
use of org.jivesoftware.smack.DummyConnection in project Smack by igniterealtime.
the class DeliveryReceiptTest method receiptManagerListenerTest.
@Test
public void receiptManagerListenerTest() throws Exception {
DummyConnection c = new DummyConnection();
c.connect();
DeliveryReceiptManager drm = DeliveryReceiptManager.getInstanceFor(c);
TestReceiptReceivedListener rrl = new TestReceiptReceivedListener();
drm.addReceiptReceivedListener(rrl);
Message m = new Message(JidCreate.from("romeo@montague.com"), Message.Type.normal);
m.setFrom(JidCreate.from("julia@capulet.com"));
m.setStanzaId("reply-id");
m.addExtension(new DeliveryReceipt("original-test-id"));
c.processStanza(m);
rrl.waitUntilInvocationOrTimeout();
}
use of org.jivesoftware.smack.DummyConnection in project Smack by igniterealtime.
the class MamTest method setup.
@Before
public void setup() {
// mock connection
connection = new DummyConnection();
// test query id
queryId = "testid";
// MamManager instance
mamManager = MamManager.getInstanceFor(connection);
}
Aggregations