1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2024-12-22 20:47:57 +01:00

Add parseContentDepthTest()

This commit is contained in:
Florian Schmaus 2014-05-10 10:51:45 +02:00
parent ecccfe61af
commit 5618da4e23

View file

@ -35,6 +35,7 @@ import org.jivesoftware.smack.packet.Packet;
import org.jivesoftware.smack.packet.Presence;
import org.jivesoftware.smack.test.util.TestUtils;
import org.junit.Test;
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
import com.jamesmurty.utils.XMLBuilder;
@ -789,6 +790,14 @@ public class PacketParserUtilsTest {
assertEquals(1, presence.getPriority());
}
@Test
public void parseContentDepthTest() throws Exception {
final String stanza = "<iq type='result' to='foo@bar.com' from='baz.com' id='42'/>";
XmlPullParser parser = TestUtils.getParser(stanza, "iq");
String content = PacketParserUtils.parseContentDepth(parser, 1);
assertEquals("", content);
}
private String determineNonDefaultLanguage() {
String otherLanguage = "jp";
Locale[] availableLocales = Locale.getAvailableLocales();