/* * Copyright (c) 2017 Tarun Gupta * Licensed under the simplified BSD license. * See Documentation/Licenses/BSD-simplified.txt for more information. */ #include #include using namespace Swift; TEST(MIXUpdateSubscriptionSerializerTest, XEP0369_Example28) { MIXUpdateSubscriptionSerializer testling; auto update = std::make_shared(); update->addSubscription(std::string("urn:xmpp:mix:nodes:messages")); std::string expectedResult = "" "" ""; ASSERT_EQ(expectedResult, testling.serialize(update)); } TEST(MIXUpdateSubscriptionSerializerTest, XEP0369_Example28WithJID) { MIXUpdateSubscriptionSerializer testling; auto update = std::make_shared(); update->setJID(JID("hag66@shakespeare.example")); update->addSubscription(std::string("urn:xmpp:mix:nodes:messages")); std::string expectedResult = "" "" ""; ASSERT_EQ(expectedResult, testling.serialize(update)); }