summaryrefslogtreecommitdiffstats
blob: 80210a5b61a8daa1ce29541f2d9c56fddb09d95a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/*
 * Copyright (c) 2017 Tarun Gupta
 * Licensed under the simplified BSD license.
 * See Documentation/Licenses/BSD-simplified.txt for more information.
 */

#include <gtest/gtest.h>

#include <Swiften/Serializer/PayloadSerializers/MIXCreateSerializer.h>

using namespace Swift;

TEST(MIXCreateSerializerTest, XEP0369_Example31) {
    MIXCreateSerializer testling;

    auto create = std::make_shared<MIXCreate>();
    std::string expectedResult = "<create xmlns=\"urn:xmpp:mix:0\"/>";
    ASSERT_EQ(expectedResult, testling.serialize(create));
}

TEST(MIXCreateSerializerTest, XEP0369_Example66) {
    MIXCreateSerializer testling;

    auto create = std::make_shared<MIXCreate>();
    create->setChannel(std::string("coven"));

    std::string expectedResult = "<create channel=\"coven\" xmlns=\"urn:xmpp:mix:0\"/>";
    ASSERT_EQ(expectedResult, testling.serialize(create));
}