Search in sources :

Example 1 with MessageCorrectExtension

use of org.jivesoftware.smackx.message_correct.element.MessageCorrectExtension in project Smack by igniterealtime.

the class MessageCorrectExtensionTest method checkStanzas.

@Test
public void checkStanzas() throws Exception {
    Message initialMessage = (Message) PacketParserUtils.parseStanza(initialMessageXml);
    MessageCorrectExtension messageCorrectExtension = new MessageCorrectExtension(idInitialMessage);
    Assert.assertEquals(messageCorrectExtension.toXML().toString(), messageCorrectionXml);
    initialMessage.addExtension(messageCorrectExtension);
    Assert.assertEquals(initialMessage.toXML(), expectedXml);
}
Also used : Message(org.jivesoftware.smack.packet.Message) MessageCorrectExtension(org.jivesoftware.smackx.message_correct.element.MessageCorrectExtension) Test(org.junit.Test)

Aggregations

Message (org.jivesoftware.smack.packet.Message)1 MessageCorrectExtension (org.jivesoftware.smackx.message_correct.element.MessageCorrectExtension)1 Test (org.junit.Test)1