diff options
| author | Jeremy Lainé <jeremy.laine@m4x.org> | 2012-10-01 13:46:33 +0200 |
|---|---|---|
| committer | Jeremy Lainé <jeremy.laine@m4x.org> | 2012-10-01 13:46:33 +0200 |
| commit | 6d6e4423540f589f2127e69161814f887f5ab4c5 (patch) | |
| tree | 38b9a19ff80d5537dab0fa7312fb1dd3c03d3026 /tests/all/tests.cpp | |
| parent | 230296d2b579e4380697c650833b0b30f893c3cd (diff) | |
| download | qxmpp-6d6e4423540f589f2127e69161814f887f5ab4c5.tar.gz | |
split QXmppBindIq tests
Diffstat (limited to 'tests/all/tests.cpp')
| -rw-r--r-- | tests/all/tests.cpp | 56 |
1 files changed, 0 insertions, 56 deletions
diff --git a/tests/all/tests.cpp b/tests/all/tests.cpp index f2c4e0fd..2731ea9c 100644 --- a/tests/all/tests.cpp +++ b/tests/all/tests.cpp @@ -22,7 +22,6 @@ * */ -#include "QXmppBindIq.h" #include "QXmppDiscoveryIq.h" #include "QXmppEntityTimeIq.h" #include "QXmppNonSASLAuth.h" @@ -37,9 +36,6 @@ class TestPackets : public QObject Q_OBJECT private slots: - void testBindNoResource(); - void testBindResource(); - void testBindResult(); void testDiscovery(); void testDiscoveryWithForm(); void testNonSaslAuth(); @@ -51,58 +47,6 @@ private slots: void testEntityTimeResult(); }; -void TestPackets::testBindNoResource() -{ - const QByteArray xml( - "<iq id=\"bind_1\" type=\"set\">" - "<bind xmlns=\"urn:ietf:params:xml:ns:xmpp-bind\"/>" - "</iq>"); - - QXmppBindIq bind; - parsePacket(bind, xml); - QCOMPARE(bind.type(), QXmppIq::Set); - QCOMPARE(bind.id(), QString("bind_1")); - QCOMPARE(bind.jid(), QString()); - QCOMPARE(bind.resource(), QString()); - serializePacket(bind, xml); -} - -void TestPackets::testBindResource() -{ - const QByteArray xml( - "<iq id=\"bind_2\" type=\"set\">" - "<bind xmlns=\"urn:ietf:params:xml:ns:xmpp-bind\">" - "<resource>someresource</resource>" - "</bind>" - "</iq>"); - - QXmppBindIq bind; - parsePacket(bind, xml); - QCOMPARE(bind.type(), QXmppIq::Set); - QCOMPARE(bind.id(), QString("bind_2")); - QCOMPARE(bind.jid(), QString()); - QCOMPARE(bind.resource(), QString("someresource")); - serializePacket(bind, xml); -} - -void TestPackets::testBindResult() -{ - const QByteArray xml( - "<iq id=\"bind_2\" type=\"result\">" - "<bind xmlns=\"urn:ietf:params:xml:ns:xmpp-bind\">" - "<jid>somenode@example.com/someresource</jid>" - "</bind>" - "</iq>"); - - QXmppBindIq bind; - parsePacket(bind, xml); - QCOMPARE(bind.type(), QXmppIq::Result); - QCOMPARE(bind.id(), QString("bind_2")); - QCOMPARE(bind.jid(), QString("somenode@example.com/someresource")); - QCOMPARE(bind.resource(), QString()); - serializePacket(bind, xml); -} - void TestPackets::testDiscovery() { const QByteArray xml( |
