Search in sources :

Example 1 with DisplayedExtension

use of org.jivesoftware.smackx.chat_markers.element.ChatMarkersElements.DisplayedExtension in project Smack by igniterealtime.

the class DisplayedExtensionTest method checkDisplayedProvider.

@Test
public void checkDisplayedProvider() throws Exception {
    XmlPullParser parser = PacketParserUtils.getParserFor(displayedExtension);
    DisplayedExtension displayedExtension1 = new DisplayedProvider().parse(parser);
    Assert.assertEquals("message-1", displayedExtension1.getId());
    Message message = (Message) PacketParserUtils.parseStanza(displayedMessageStanza);
    DisplayedExtension displayedExtension2 = DisplayedExtension.from(message);
    Assert.assertEquals("message-1", displayedExtension2.getId());
}
Also used : Message(org.jivesoftware.smack.packet.Message) DisplayedExtension(org.jivesoftware.smackx.chat_markers.element.ChatMarkersElements.DisplayedExtension) XmlPullParser(org.xmlpull.v1.XmlPullParser) DisplayedProvider(org.jivesoftware.smackx.chat_markers.provider.DisplayedProvider) Test(org.junit.Test)

Aggregations

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