use of org.jivesoftware.smackx.mam.element.MamPrefsIQ in project Smack by igniterealtime.
the class PreferencesTest method checkUpdatePrefsStanza.
@Test
public void checkUpdatePrefsStanza() throws Exception {
List<Jid> alwaysJids = new ArrayList<>();
alwaysJids.add(JidCreate.from("romeo@montague.lit"));
alwaysJids.add(JidCreate.from("other@montague.lit"));
List<Jid> neverJids = new ArrayList<>();
neverJids.add(JidCreate.from("montague@montague.lit"));
MamPrefsIQ mamPrefIQ = new MamPrefsIQ(alwaysJids, neverJids, DefaultBehavior.roster);
mamPrefIQ.setStanzaId("sarasa");
Assert.assertEquals(mamPrefIQ.toXML().toString(), updatePrefsStanzaExample);
}
use of org.jivesoftware.smackx.mam.element.MamPrefsIQ in project Smack by igniterealtime.
the class PreferencesTest method checkRetrievePrefsStanza.
@Test
public void checkRetrievePrefsStanza() throws Exception {
MamPrefsIQ mamPrefIQ = new MamPrefsIQ();
mamPrefIQ.setStanzaId("sarasa");
Assert.assertEquals(mamPrefIQ.toXML().toString(), retrievePrefsStanzaExample);
}
Aggregations