diff options
author | Tarun Gupta <tarun1995gupta@gmail.com> | 2017-06-23 17:52:45 (GMT) |
---|---|---|
committer | Tobias Markmann <tm@ayena.de> | 2017-07-07 11:20:06 (GMT) |
commit | 2a251161c5baa688ec12068346359bd829ab2ea1 (patch) | |
tree | 2bb4797ed266305d08a2800fbf728e8149026b84 /Swiften/Serializer/PayloadSerializers/UnitTest | |
parent | 610a2169757b578c6246c0d277f95a79695652ba (diff) | |
download | swift-2a251161c5baa688ec12068346359bd829ab2ea1.zip swift-2a251161c5baa688ec12068346359bd829ab2ea1.tar.bz2 |
Update namespace for MIX Elements
Namespace update from urn:xmpp:mix:1 to urn:xmpp:mix:0 for MIX
elements for checking against server implementation
License:
This patch is BSD-licensed, see Documentation/Licenses/BSD-simplified.txt for details.
Change-Id: I1bbd06d83f54fcde81ae0ed06dda90aec0ef1aeb
Diffstat (limited to 'Swiften/Serializer/PayloadSerializers/UnitTest')
5 files changed, 18 insertions, 18 deletions
diff --git a/Swiften/Serializer/PayloadSerializers/UnitTest/MIXCreateSerializerTest.cpp b/Swiften/Serializer/PayloadSerializers/UnitTest/MIXCreateSerializerTest.cpp index 78424be..80210a5 100644 --- a/Swiften/Serializer/PayloadSerializers/UnitTest/MIXCreateSerializerTest.cpp +++ b/Swiften/Serializer/PayloadSerializers/UnitTest/MIXCreateSerializerTest.cpp @@ -14,7 +14,7 @@ TEST(MIXCreateSerializerTest, XEP0369_Example31) { MIXCreateSerializer testling; auto create = std::make_shared<MIXCreate>(); - std::string expectedResult = "<create xmlns=\"urn:xmpp:mix:1\"/>"; + std::string expectedResult = "<create xmlns=\"urn:xmpp:mix:0\"/>"; ASSERT_EQ(expectedResult, testling.serialize(create)); } @@ -24,6 +24,6 @@ TEST(MIXCreateSerializerTest, XEP0369_Example66) { auto create = std::make_shared<MIXCreate>(); create->setChannel(std::string("coven")); - std::string expectedResult = "<create channel=\"coven\" xmlns=\"urn:xmpp:mix:1\"/>"; + std::string expectedResult = "<create channel=\"coven\" xmlns=\"urn:xmpp:mix:0\"/>"; ASSERT_EQ(expectedResult, testling.serialize(create)); } diff --git a/Swiften/Serializer/PayloadSerializers/UnitTest/MIXDestroySerializerTest.cpp b/Swiften/Serializer/PayloadSerializers/UnitTest/MIXDestroySerializerTest.cpp index e9cfa8b..5b21873 100644 --- a/Swiften/Serializer/PayloadSerializers/UnitTest/MIXDestroySerializerTest.cpp +++ b/Swiften/Serializer/PayloadSerializers/UnitTest/MIXDestroySerializerTest.cpp @@ -16,6 +16,6 @@ TEST(MIXDestroySerializerTest, XEP0369_Example31) { auto destroy = std::make_shared<MIXDestroy>(); destroy->setChannel(std::string("coven")); - std::string expectedResult = "<destroy channel=\"coven\" xmlns=\"urn:xmpp:mix:1\"/>"; + std::string expectedResult = "<destroy channel=\"coven\" xmlns=\"urn:xmpp:mix:0\"/>"; ASSERT_EQ(expectedResult, testling.serialize(destroy)); } diff --git a/Swiften/Serializer/PayloadSerializers/UnitTest/MIXJoinSerializerTest.cpp b/Swiften/Serializer/PayloadSerializers/UnitTest/MIXJoinSerializerTest.cpp index 61d8a4a..ff8aa70 100644 --- a/Swiften/Serializer/PayloadSerializers/UnitTest/MIXJoinSerializerTest.cpp +++ b/Swiften/Serializer/PayloadSerializers/UnitTest/MIXJoinSerializerTest.cpp @@ -29,7 +29,7 @@ TEST(MIXJoinSerializerTest, XEP0369_Example22) { node4->setNode(std::string("urn:xmpp:mix:nodes:config")); join->addSubscription(node4); - std::string expectedResult = "<join channel=\"coven@mix.shakespeare.example\" xmlns=\"urn:xmpp:mix:1\">" + std::string expectedResult = "<join channel=\"coven@mix.shakespeare.example\" xmlns=\"urn:xmpp:mix:0\">" "<subscribe node=\"urn:xmpp:mix:nodes:messages\"/>" "<subscribe node=\"urn:xmpp:mix:nodes:presence\"/>" "<subscribe node=\"urn:xmpp:mix:nodes:participants\"/>" @@ -56,7 +56,7 @@ TEST(MIXJoinSerializerTest, XEP0369_Example23) { node4->setNode(std::string("urn:xmpp:mix:nodes:config")); join->addSubscription(node4); - std::string expectedResult = "<join xmlns=\"urn:xmpp:mix:1\">" + std::string expectedResult = "<join xmlns=\"urn:xmpp:mix:0\">" "<subscribe node=\"urn:xmpp:mix:nodes:messages\"/>" "<subscribe node=\"urn:xmpp:mix:nodes:presence\"/>" "<subscribe node=\"urn:xmpp:mix:nodes:participants\"/>" @@ -84,7 +84,7 @@ TEST(MIXJoinSerializerTest, XEP0369_Example24) { node4->setNode(std::string("urn:xmpp:mix:nodes:config")); join->addSubscription(node4); - std::string expectedResult = "<join jid=\"123456#coven@mix.shakespeare.example\" xmlns=\"urn:xmpp:mix:1\">" + std::string expectedResult = "<join jid=\"123456#coven@mix.shakespeare.example\" xmlns=\"urn:xmpp:mix:0\">" "<subscribe node=\"urn:xmpp:mix:nodes:messages\"/>" "<subscribe node=\"urn:xmpp:mix:nodes:presence\"/>" "<subscribe node=\"urn:xmpp:mix:nodes:participants\"/>" @@ -110,7 +110,7 @@ TEST(MIXJoinSerializerTest, XEP0369_Example29) { std::shared_ptr<FormField> fieldType = std::make_shared<FormField>(FormField::HiddenType); fieldType->setName("FORM_TYPE"); - fieldType->addValue("urn:xmpp:mix:1"); + fieldType->addValue("urn:xmpp:mix:0"); parameters->addField(fieldType); std::shared_ptr<FormField> fieldJIDVisibility = std::make_shared<FormField>(); @@ -120,12 +120,12 @@ TEST(MIXJoinSerializerTest, XEP0369_Example29) { join->setForm(parameters); - std::string expectedResult = "<join xmlns=\"urn:xmpp:mix:1\">" + std::string expectedResult = "<join xmlns=\"urn:xmpp:mix:0\">" "<subscribe node=\"urn:xmpp:mix:nodes:messages\"/>" "<subscribe node=\"urn:xmpp:mix:nodes:presence\"/>" "<x type=\"submit\" xmlns=\"jabber:x:data\">" "<field type=\"hidden\" var=\"FORM_TYPE\">" - "<value>urn:xmpp:mix:1</value>" + "<value>urn:xmpp:mix:0</value>" "</field>" "<field var=\"JID Visibility\">" "<value>never</value>" @@ -153,7 +153,7 @@ TEST(MIXJoinSerializerTest, XEP0369_Example30) { std::shared_ptr<FormField> fieldType = std::make_shared<FormField>(FormField::HiddenType); fieldType->setName("FORM_TYPE"); - fieldType->addValue("urn:xmpp:mix:1"); + fieldType->addValue("urn:xmpp:mix:0"); parameters->addField(fieldType); std::shared_ptr<FormField> fieldJIDVisibility = std::make_shared<FormField>(); @@ -173,12 +173,12 @@ TEST(MIXJoinSerializerTest, XEP0369_Example30) { join->setForm(parameters); - std::string expectedResult = "<join jid=\"hag66@shakespeare.example\" xmlns=\"urn:xmpp:mix:1\">" + std::string expectedResult = "<join jid=\"hag66@shakespeare.example\" xmlns=\"urn:xmpp:mix:0\">" "<subscribe node=\"urn:xmpp:mix:nodes:messages\"/>" "<subscribe node=\"urn:xmpp:mix:nodes:presence\"/>" "<x type=\"result\" xmlns=\"jabber:x:data\">" "<field type=\"hidden\" var=\"FORM_TYPE\">" - "<value>urn:xmpp:mix:1</value>" + "<value>urn:xmpp:mix:0</value>" "</field>" "<field var=\"JID Visibility\">" "<value>never</value>" diff --git a/Swiften/Serializer/PayloadSerializers/UnitTest/MIXLeaveSerializerTest.cpp b/Swiften/Serializer/PayloadSerializers/UnitTest/MIXLeaveSerializerTest.cpp index 03e3e76..d9537a8 100644 --- a/Swiften/Serializer/PayloadSerializers/UnitTest/MIXLeaveSerializerTest.cpp +++ b/Swiften/Serializer/PayloadSerializers/UnitTest/MIXLeaveSerializerTest.cpp @@ -16,7 +16,7 @@ TEST(MIXLeaveSerializerTest, XEP0369_Example33) { auto leave = std::shared_ptr<MIXLeave>(new MIXLeave()); leave->setChannel(JID("coven@mix.shakespeare.example")); - std::string expectedResult = "<leave channel=\"coven@mix.shakespeare.example\" xmlns=\"urn:xmpp:mix:1\"/>"; + std::string expectedResult = "<leave channel=\"coven@mix.shakespeare.example\" xmlns=\"urn:xmpp:mix:0\"/>"; ASSERT_EQ(expectedResult, testling.serialize(leave)); } @@ -25,6 +25,6 @@ TEST(MIXLeaveSerializerTest, XEP0369_Example34) { auto leave = std::shared_ptr<MIXLeave>(new MIXLeave()); - std::string expectedResult = "<leave xmlns=\"urn:xmpp:mix:1\"/>"; + std::string expectedResult = "<leave xmlns=\"urn:xmpp:mix:0\"/>"; ASSERT_EQ(expectedResult, testling.serialize(leave)); } diff --git a/Swiften/Serializer/PayloadSerializers/UnitTest/MIXUserPreferenceSerializerTest.cpp b/Swiften/Serializer/PayloadSerializers/UnitTest/MIXUserPreferenceSerializerTest.cpp index 7cbfbfc..0226b0f 100644 --- a/Swiften/Serializer/PayloadSerializers/UnitTest/MIXUserPreferenceSerializerTest.cpp +++ b/Swiften/Serializer/PayloadSerializers/UnitTest/MIXUserPreferenceSerializerTest.cpp @@ -15,7 +15,7 @@ TEST(MIXUserPreferenceSerializerTest, XEP0369_Example31) { MIXUserPreferenceSerializer testling; auto userpreference = std::shared_ptr<MIXUserPreference>(new MIXUserPreference()); - std::string expectedResult = "<user-preference xmlns=\"urn:xmpp:mix:1\"/>"; + std::string expectedResult = "<user-preference xmlns=\"urn:xmpp:mix:0\"/>"; ASSERT_EQ(expectedResult, testling.serialize(userpreference)); } @@ -28,7 +28,7 @@ TEST(MIXUserPreferenceSerializerTest, XEP0369_Example32) { std::shared_ptr<FormField> fieldType = std::make_shared<FormField>(FormField::HiddenType); fieldType->setName("FORM_TYPE"); - fieldType->addValue("urn:xmpp:mix:1"); + fieldType->addValue("urn:xmpp:mix:0"); parameters->addField(fieldType); std::shared_ptr<FormField> fieldJIDVisibility = std::make_shared<FormField>(); @@ -48,10 +48,10 @@ TEST(MIXUserPreferenceSerializerTest, XEP0369_Example32) { userpreference->setData(parameters); - std::string expectedResult = "<user-preference xmlns=\"urn:xmpp:mix:1\">" + std::string expectedResult = "<user-preference xmlns=\"urn:xmpp:mix:0\">" "<x type=\"result\" xmlns=\"jabber:x:data\">" "<field type=\"hidden\" var=\"FORM_TYPE\">" - "<value>urn:xmpp:mix:1</value>" + "<value>urn:xmpp:mix:0</value>" "</field>" "<field var=\"JID Visibility\">" "<value>never</value>" |