summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2011-05-03 20:39:27 (GMT)
committerRemko Tronçon <git@el-tramo.be>2011-05-05 19:43:14 (GMT)
commit772b2ec0243d7b55d91e4027d828881d18093ed0 (patch)
tree83a58b2b97f3992165ee20c05e0630452eb50457 /Swiften/SASL/UnitTest/PLAINMessageTest.cpp
parent0b3db8fd68abee7269d5a38aabd8a816e099eae5 (diff)
downloadswift-772b2ec0243d7b55d91e4027d828881d18093ed0.zip
swift-772b2ec0243d7b55d91e4027d828881d18093ed0.tar.bz2
Replace ByteArray by typedef.
Diffstat (limited to 'Swiften/SASL/UnitTest/PLAINMessageTest.cpp')
-rw-r--r--Swiften/SASL/UnitTest/PLAINMessageTest.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/Swiften/SASL/UnitTest/PLAINMessageTest.cpp b/Swiften/SASL/UnitTest/PLAINMessageTest.cpp
index cebfbb2..dc3f82f 100644
--- a/Swiften/SASL/UnitTest/PLAINMessageTest.cpp
+++ b/Swiften/SASL/UnitTest/PLAINMessageTest.cpp
@@ -9,6 +9,7 @@
#include <cppunit/extensions/HelperMacros.h>
#include <cppunit/extensions/TestFactoryRegistry.h>
+#include <QA/Checker/IO.h>
#include <Swiften/SASL/PLAINMessage.h>
using namespace Swift;
@@ -29,16 +30,16 @@ class PLAINMessageTest : public CppUnit::TestFixture
void testGetValue_WithoutAuthzID() {
PLAINMessage message("user", "pass");
- CPPUNIT_ASSERT_EQUAL(message.getValue(), ByteArray("\0user\0pass", 10));
+ CPPUNIT_ASSERT_EQUAL(message.getValue(), createByteArray("\0user\0pass", 10));
}
void testGetValue_WithAuthzID() {
PLAINMessage message("user", "pass", "authz");
- CPPUNIT_ASSERT_EQUAL(message.getValue(), ByteArray("authz\0user\0pass", 15));
+ CPPUNIT_ASSERT_EQUAL(message.getValue(), createByteArray("authz\0user\0pass", 15));
}
void testConstructor_WithoutAuthzID() {
- PLAINMessage message(ByteArray("\0user\0pass", 10));
+ PLAINMessage message(createByteArray("\0user\0pass", 10));
CPPUNIT_ASSERT_EQUAL(std::string(""), message.getAuthorizationID());
CPPUNIT_ASSERT_EQUAL(std::string("user"), message.getAuthenticationID());
@@ -46,7 +47,7 @@ class PLAINMessageTest : public CppUnit::TestFixture
}
void testConstructor_WithAuthzID() {
- PLAINMessage message(ByteArray("authz\0user\0pass", 15));
+ PLAINMessage message(createByteArray("authz\0user\0pass", 15));
CPPUNIT_ASSERT_EQUAL(std::string("authz"), message.getAuthorizationID());
CPPUNIT_ASSERT_EQUAL(std::string("user"), message.getAuthenticationID());
@@ -54,13 +55,13 @@ class PLAINMessageTest : public CppUnit::TestFixture
}
void testConstructor_NoAuthcid() {
- PLAINMessage message(ByteArray("authzid", 7));
+ PLAINMessage message(createByteArray("authzid", 7));
CPPUNIT_ASSERT_EQUAL(std::string(""), message.getAuthenticationID());
}
void testConstructor_NoPassword() {
- PLAINMessage message(ByteArray("authzid\0authcid", 15));
+ PLAINMessage message(createByteArray("authzid\0authcid", 15));
CPPUNIT_ASSERT_EQUAL(std::string(""), message.getAuthenticationID());
}