1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2025-12-14 23:11:08 +01:00

Improve parsing. Add method for de-serializing Strings

Move some duplicate code from XMPP(TCP|BOSH)Connection to
PacketParserUtils. Remove TestUtils as the method now part of Smack's
public API in PacketParserUtils.
This commit is contained in:
Florian Schmaus 2014-05-25 23:31:58 +02:00
parent beecb8a675
commit 3647a7fce5
24 changed files with 215 additions and 291 deletions

View file

@ -22,7 +22,6 @@ import static org.junit.Assert.assertTrue;
import org.jivesoftware.smack.DummyConnection;
import org.jivesoftware.smack.packet.IQ;
import org.jivesoftware.smack.packet.Packet;
import org.jivesoftware.smack.test.util.TestUtils;
import org.jivesoftware.smack.util.PacketParserUtils;
import org.jivesoftware.smackx.iqversion.packet.Version;
import org.junit.Test;
@ -39,7 +38,7 @@ public class VersionTest {
// Enable version replys for this connection
VersionManager.getInstanceFor(con).setVersion(new Version("Test", "0.23", "DummyOS"));
IQ versionRequest = PacketParserUtils.parseIQ(TestUtils.getIQParser(control), con);
IQ versionRequest = (IQ) PacketParserUtils.parseStanza(control);
assertTrue(versionRequest instanceof Version);