Search in sources :

Example 1 with MamFinIQProvider

use of org.jivesoftware.smackx.mam.provider.MamFinIQProvider in project Smack by igniterealtime.

the class MamFinProviderTest method checkMamFinProvider.

@Test
public void checkMamFinProvider() throws Exception {
    XmlPullParser parser = PacketParserUtils.getParserFor(exmapleMamFinXml);
    MamFinIQ mamFinIQ = new MamFinIQProvider().parse(parser);
    Assert.assertFalse(mamFinIQ.isComplete());
    Assert.assertTrue(mamFinIQ.isStable());
    Assert.assertNull(mamFinIQ.getQueryId());
    RSMSet rsmSet = mamFinIQ.getRSMSet();
    Assert.assertEquals(rsmSet.getAfter(), "09af3-cc343-b409f");
    Assert.assertEquals(rsmSet.getMax(), 10);
}
Also used : MamFinIQProvider(org.jivesoftware.smackx.mam.provider.MamFinIQProvider) RSMSet(org.jivesoftware.smackx.rsm.packet.RSMSet) XmlPullParser(org.xmlpull.v1.XmlPullParser) MamFinIQ(org.jivesoftware.smackx.mam.element.MamFinIQ) Test(org.junit.Test)

Aggregations

MamFinIQ (org.jivesoftware.smackx.mam.element.MamFinIQ)1 MamFinIQProvider (org.jivesoftware.smackx.mam.provider.MamFinIQProvider)1 RSMSet (org.jivesoftware.smackx.rsm.packet.RSMSet)1 Test (org.junit.Test)1 XmlPullParser (org.xmlpull.v1.XmlPullParser)1