summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/Serializer/PayloadSerializers/UnitTest/ChatStateSerializerTest.cpp')
-rw-r--r--Swiften/Serializer/PayloadSerializers/UnitTest/ChatStateSerializerTest.cpp78
1 files changed, 42 insertions, 36 deletions
diff --git a/Swiften/Serializer/PayloadSerializers/UnitTest/ChatStateSerializerTest.cpp b/Swiften/Serializer/PayloadSerializers/UnitTest/ChatStateSerializerTest.cpp
index 36a01d3..018d2cc 100644
--- a/Swiften/Serializer/PayloadSerializers/UnitTest/ChatStateSerializerTest.cpp
+++ b/Swiften/Serializer/PayloadSerializers/UnitTest/ChatStateSerializerTest.cpp
@@ -4,6 +4,12 @@
* See Documentation/Licenses/BSD-simplified.txt for more information.
*/
+/*
+ * Copyright (c) 2016 Isode Limited.
+ * All rights reserved.
+ * See the COPYING file for more information.
+ */
+
#include <cppunit/extensions/HelperMacros.h>
#include <cppunit/extensions/TestFactoryRegistry.h>
@@ -13,42 +19,42 @@ using namespace Swift;
class ChatStateSerializerTest : public CppUnit::TestFixture
{
- CPPUNIT_TEST_SUITE(ChatStateSerializerTest);
- CPPUNIT_TEST(testSerialize_ActiveState);
- CPPUNIT_TEST(testSerialize_GoneState);
- CPPUNIT_TEST(testSerialize_ComposingState);
- CPPUNIT_TEST(testSerialize_PausedState);
- CPPUNIT_TEST(testSerialize_InacativeState);
- CPPUNIT_TEST_SUITE_END();
-
- public:
- ChatStateSerializerTest() {}
- ChatStateSerializer testling;
-
- void testSerialize_ActiveState() {
- boost::shared_ptr<ChatState> priority(new ChatState(ChatState::Active));
- CPPUNIT_ASSERT_EQUAL(std::string("<active xmlns=\"http://jabber.org/protocol/chatstates\"/>"), testling.serialize(priority));
- }
-
- void testSerialize_GoneState() {
- boost::shared_ptr<ChatState> priority(new ChatState(ChatState::Gone));
- CPPUNIT_ASSERT_EQUAL(std::string("<gone xmlns=\"http://jabber.org/protocol/chatstates\"/>"), testling.serialize(priority));
- }
-
- void testSerialize_ComposingState() {
- boost::shared_ptr<ChatState> priority(new ChatState(ChatState::Composing));
- CPPUNIT_ASSERT_EQUAL(std::string("<composing xmlns=\"http://jabber.org/protocol/chatstates\"/>"), testling.serialize(priority));
- }
-
- void testSerialize_PausedState() {
- boost::shared_ptr<ChatState> priority(new ChatState(ChatState::Paused));
- CPPUNIT_ASSERT_EQUAL(std::string("<paused xmlns=\"http://jabber.org/protocol/chatstates\"/>"), testling.serialize(priority));
- }
-
- void testSerialize_InacativeState() {
- boost::shared_ptr<ChatState> priority(new ChatState(ChatState::Inactive));
- CPPUNIT_ASSERT_EQUAL(std::string("<inactive xmlns=\"http://jabber.org/protocol/chatstates\"/>"), testling.serialize(priority));
- }
+ CPPUNIT_TEST_SUITE(ChatStateSerializerTest);
+ CPPUNIT_TEST(testSerialize_ActiveState);
+ CPPUNIT_TEST(testSerialize_GoneState);
+ CPPUNIT_TEST(testSerialize_ComposingState);
+ CPPUNIT_TEST(testSerialize_PausedState);
+ CPPUNIT_TEST(testSerialize_InacativeState);
+ CPPUNIT_TEST_SUITE_END();
+
+ public:
+ ChatStateSerializerTest() {}
+ ChatStateSerializer testling;
+
+ void testSerialize_ActiveState() {
+ std::shared_ptr<ChatState> priority(new ChatState(ChatState::Active));
+ CPPUNIT_ASSERT_EQUAL(std::string("<active xmlns=\"http://jabber.org/protocol/chatstates\"/>"), testling.serialize(priority));
+ }
+
+ void testSerialize_GoneState() {
+ std::shared_ptr<ChatState> priority(new ChatState(ChatState::Gone));
+ CPPUNIT_ASSERT_EQUAL(std::string("<gone xmlns=\"http://jabber.org/protocol/chatstates\"/>"), testling.serialize(priority));
+ }
+
+ void testSerialize_ComposingState() {
+ std::shared_ptr<ChatState> priority(new ChatState(ChatState::Composing));
+ CPPUNIT_ASSERT_EQUAL(std::string("<composing xmlns=\"http://jabber.org/protocol/chatstates\"/>"), testling.serialize(priority));
+ }
+
+ void testSerialize_PausedState() {
+ std::shared_ptr<ChatState> priority(new ChatState(ChatState::Paused));
+ CPPUNIT_ASSERT_EQUAL(std::string("<paused xmlns=\"http://jabber.org/protocol/chatstates\"/>"), testling.serialize(priority));
+ }
+
+ void testSerialize_InacativeState() {
+ std::shared_ptr<ChatState> priority(new ChatState(ChatState::Inactive));
+ CPPUNIT_ASSERT_EQUAL(std::string("<inactive xmlns=\"http://jabber.org/protocol/chatstates\"/>"), testling.serialize(priority));
+ }
};
CPPUNIT_TEST_SUITE_REGISTRATION(ChatStateSerializerTest);