summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/Parser/PayloadParsers/UnitTest/VCardParserTest.cpp')
m---------Swiften0
-rw-r--r--Swiften/Parser/PayloadParsers/UnitTest/VCardParserTest.cpp51
2 files changed, 0 insertions, 51 deletions
diff --git a/Swiften b/Swiften
new file mode 160000
+Subproject 8213ba16d0043d2461f4b031c881d61dda5a38c
diff --git a/Swiften/Parser/PayloadParsers/UnitTest/VCardParserTest.cpp b/Swiften/Parser/PayloadParsers/UnitTest/VCardParserTest.cpp
deleted file mode 100644
index d1ddba3..0000000
--- a/Swiften/Parser/PayloadParsers/UnitTest/VCardParserTest.cpp
+++ /dev/null
@@ -1,51 +0,0 @@
-#include <cppunit/extensions/HelperMacros.h>
-#include <cppunit/extensions/TestFactoryRegistry.h>
-
-#include "Swiften/Parser/PayloadParsers/VCardParser.h"
-#include "Swiften/Parser/PayloadParsers/UnitTest/PayloadsParserTester.h"
-
-using namespace Swift;
-
-class VCardParserTest : public CppUnit::TestFixture
-{
- CPPUNIT_TEST_SUITE(VCardParserTest);
- CPPUNIT_TEST(testParse_Photo);
- CPPUNIT_TEST(testParse_Nickname);
- CPPUNIT_TEST_SUITE_END();
-
- public:
- VCardParserTest() {}
-
- void testParse_Photo() {
- PayloadsParserTester parser;
-
- CPPUNIT_ASSERT(parser.parse(
- "<vCard xmlns='vcard-temp'>"
- "<PHOTO>"
- "<TYPE>image/jpeg</TYPE>"
- "<BINVAL>"
- "QUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ej"
- "EyMzQ1Njc4OTA="
- "</BINVAL>"
- "</PHOTO>"
- "</vCard>"));
-
- VCard* payload = dynamic_cast<VCard*>(parser.getPayload().get());
- CPPUNIT_ASSERT_EQUAL(String("image/jpeg"), payload->getPhotoType());
- CPPUNIT_ASSERT_EQUAL(ByteArray("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890"), payload->getPhoto());
- }
-
- void testParse_Nickname() {
- PayloadsParserTester parser;
-
- CPPUNIT_ASSERT(parser.parse(
- "<vCard xmlns='vcard-temp'>"
- "<NICKNAME>mynick</NICKNAME>"
- "</vCard>"));
-
- VCard* payload = dynamic_cast<VCard*>(parser.getPayload().get());
- CPPUNIT_ASSERT_EQUAL(String("mynick"), payload->getNickname());
- }
-};
-
-CPPUNIT_TEST_SUITE_REGISTRATION(VCardParserTest);