Search in sources :

Example 1 with MarkableExtension

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

the class MarkableExtensionTest method checkMarkableProvider.

@Test
public void checkMarkableProvider() throws Exception {
    XmlPullParser parser = PacketParserUtils.getParserFor(markableExtension);
    MarkableExtension markableExtension1 = new MarkableProvider().parse(parser);
    assertEquals(markableExtension, markableExtension1.toXML().toString());
    Message message = PacketParserUtils.parseStanza(markableMessageStanza);
    MarkableExtension markableExtension2 = MarkableExtension.from(message);
    assertEquals(markableExtension, markableExtension2.toXML().toString());
}
Also used : Message(org.jivesoftware.smack.packet.Message) XmlPullParser(org.jivesoftware.smack.xml.XmlPullParser) MarkableExtension(org.jivesoftware.smackx.chat_markers.element.ChatMarkersElements.MarkableExtension) MarkableProvider(org.jivesoftware.smackx.chat_markers.provider.MarkableProvider) Test(org.junit.jupiter.api.Test)

Aggregations

Message (org.jivesoftware.smack.packet.Message)1 XmlPullParser (org.jivesoftware.smack.xml.XmlPullParser)1 MarkableExtension (org.jivesoftware.smackx.chat_markers.element.ChatMarkersElements.MarkableExtension)1 MarkableProvider (org.jivesoftware.smackx.chat_markers.provider.MarkableProvider)1 Test (org.junit.jupiter.api.Test)1