From 44cc908b9cd4a469c30420dc329a3448fb4f20c4 Mon Sep 17 00:00:00 2001 From: Jeremy Lainé Date: Mon, 1 Oct 2012 14:10:35 +0200 Subject: split QXmppNonSASLAuthIq tests --- tests/all/tests.cpp | 50 -------------------------------------------------- 1 file changed, 50 deletions(-) (limited to 'tests/all/tests.cpp') diff --git a/tests/all/tests.cpp b/tests/all/tests.cpp index 7ac5c5e7..fdfbbd16 100644 --- a/tests/all/tests.cpp +++ b/tests/all/tests.cpp @@ -22,10 +22,8 @@ * */ -#include "QXmppNonSASLAuth.h" #include "QXmppSessionIq.h" #include "QXmppStreamFeatures.h" -#include "QXmppUtils.h" #include "util.h" class TestPackets : public QObject @@ -33,58 +31,10 @@ class TestPackets : public QObject Q_OBJECT private slots: - void testNonSaslAuth(); void testSession(); void testStreamFeatures(); }; -void TestPackets::testNonSaslAuth() -{ - // Client Requests Authentication Fields from Server - const QByteArray xml1( - "" - "" - ""); - - QXmppNonSASLAuthIq iq1; - parsePacket(iq1, xml1); - serializePacket(iq1, xml1); - - // Client Provides Required Information (Plaintext) - const QByteArray xml3( - "" - "" - "bill" - "Calli0pe" - "globe" - "" - ""); - QXmppNonSASLAuthIq iq3; - parsePacket(iq3, xml3); - QCOMPARE(iq3.username(), QLatin1String("bill")); - QCOMPARE(iq3.digest(), QByteArray()); - QCOMPARE(iq3.password(), QLatin1String("Calli0pe")); - QCOMPARE(iq3.resource(), QLatin1String("globe")); - serializePacket(iq3, xml3); - - // Client Provides Required Information (Plaintext) - const QByteArray xml4( - "" - "" - "bill" - "48fc78be9ec8f86d8ce1c39c320c97c21d62334d" - "globe" - "" - ""); - QXmppNonSASLAuthIq iq4; - parsePacket(iq4, xml4); - QCOMPARE(iq4.username(), QLatin1String("bill")); - QCOMPARE(iq4.digest(), QByteArray("\x48\xfc\x78\xbe\x9e\xc8\xf8\x6d\x8c\xe1\xc3\x9c\x32\x0c\x97\xc2\x1d\x62\x33\x4d")); - QCOMPARE(iq4.password(), QString()); - QCOMPARE(iq4.resource(), QLatin1String("globe")); - serializePacket(iq4, xml4); -} - void TestPackets::testSession() { const QByteArray xml( -- cgit v1.2.3