Search in sources :

Example 1 with AcknowledgedProvider

use of org.jivesoftware.smackx.chat_markers.provider.AcknowledgedProvider in project Smack by igniterealtime.

the class AcknowledgedExtensionTest method checkDisplayedProvider.

@Test
public void checkDisplayedProvider() throws Exception {
    XmlPullParser parser = PacketParserUtils.getParserFor(acknowledgedExtension);
    AcknowledgedExtension acknowledgedExtension1 = new AcknowledgedProvider().parse(parser);
    Assert.assertEquals("message-1", acknowledgedExtension1.getId());
    Message message = (Message) PacketParserUtils.parseStanza(acknowledgedMessageStanza);
    AcknowledgedExtension acknowledgedExtension2 = AcknowledgedExtension.from(message);
    Assert.assertEquals("message-1", acknowledgedExtension2.getId());
}
Also used : Message(org.jivesoftware.smack.packet.Message) AcknowledgedProvider(org.jivesoftware.smackx.chat_markers.provider.AcknowledgedProvider) XmlPullParser(org.xmlpull.v1.XmlPullParser) AcknowledgedExtension(org.jivesoftware.smackx.chat_markers.element.ChatMarkersElements.AcknowledgedExtension) Test(org.junit.Test)

Aggregations

Message (org.jivesoftware.smack.packet.Message)1 AcknowledgedExtension (org.jivesoftware.smackx.chat_markers.element.ChatMarkersElements.AcknowledgedExtension)1 AcknowledgedProvider (org.jivesoftware.smackx.chat_markers.provider.AcknowledgedProvider)1 Test (org.junit.Test)1 XmlPullParser (org.xmlpull.v1.XmlPullParser)1