From 5618da4e2323c42257ce1f388678775a45956384 Mon Sep 17 00:00:00 2001 From: Florian Schmaus Date: Sat, 10 May 2014 10:51:45 +0200 Subject: [PATCH] Add parseContentDepthTest() --- .../jivesoftware/smack/util/PacketParserUtilsTest.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/smack-core/src/test/java/org/jivesoftware/smack/util/PacketParserUtilsTest.java b/smack-core/src/test/java/org/jivesoftware/smack/util/PacketParserUtilsTest.java index a2cd4ebd1..80436300f 100644 --- a/smack-core/src/test/java/org/jivesoftware/smack/util/PacketParserUtilsTest.java +++ b/smack-core/src/test/java/org/jivesoftware/smack/util/PacketParserUtilsTest.java @@ -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 = ""; + XmlPullParser parser = TestUtils.getParser(stanza, "iq"); + String content = PacketParserUtils.parseContentDepth(parser, 1); + assertEquals("", content); + } + private String determineNonDefaultLanguage() { String otherLanguage = "jp"; Locale[] availableLocales = Locale.getAvailableLocales();