mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2024-11-22 14:22:05 +01:00
Add parseContentDepthTest()
This commit is contained in:
parent
ecccfe61af
commit
5618da4e23
1 changed files with 9 additions and 0 deletions
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue