Search in sources :

Example 1 with EnablePushNotificationsIQ

use of org.jivesoftware.smackx.push_notifications.element.EnablePushNotificationsIQ in project Smack by igniterealtime.

the class EnablePushNotificationsIQTest method checkEnablePushNotificationsIQ.

@Test
public void checkEnablePushNotificationsIQ() throws Exception {
    EnablePushNotificationsIQ enablePushNotificationsIQ = new EnablePushNotificationsIQ(JidCreate.from("push-5.client.example"), "yxs32uqsflafdk3iuqo");
    enablePushNotificationsIQ.setStanzaId("x42");
    Assert.assertEquals(exampleEnableIQ, enablePushNotificationsIQ.toXML().toString());
}
Also used : EnablePushNotificationsIQ(org.jivesoftware.smackx.push_notifications.element.EnablePushNotificationsIQ) Test(org.junit.Test)

Example 2 with EnablePushNotificationsIQ

use of org.jivesoftware.smackx.push_notifications.element.EnablePushNotificationsIQ in project Smack by igniterealtime.

the class EnablePushNotificationsIQTest method checkEnablePushNotificationsIQWithPublishOptions.

@Test
public void checkEnablePushNotificationsIQWithPublishOptions() throws Exception {
    HashMap<String, String> publishOptions = new HashMap<>();
    publishOptions.put("secret", "eruio234vzxc2kla-91");
    EnablePushNotificationsIQ enablePushNotificationsIQ = new EnablePushNotificationsIQ(JidCreate.from("push-5.client.example"), "yxs32uqsflafdk3iuqo", publishOptions);
    enablePushNotificationsIQ.setStanzaId("x42");
    Assert.assertEquals(exampleEnableIQWithPublishOptions, enablePushNotificationsIQ.toXML().toString());
}
Also used : EnablePushNotificationsIQ(org.jivesoftware.smackx.push_notifications.element.EnablePushNotificationsIQ) HashMap(java.util.HashMap) Test(org.junit.Test)

Aggregations

EnablePushNotificationsIQ (org.jivesoftware.smackx.push_notifications.element.EnablePushNotificationsIQ)2 Test (org.junit.Test)2 HashMap (java.util.HashMap)1