示例#1
0
void tst_QXmppMessage::testMucInvitation()
{
    QByteArray xml(
        "<message to=\"[email protected]\" from=\"[email protected]/desktop\" type=\"normal\">"
            "<x xmlns=\"jabber:x:conference\" jid=\"[email protected]\" password=\"cauldronburn\" reason=\"Hey Hecate, this is the place for all good witches!\"/>"
        "</message>");

    QXmppMessage message;
    parsePacket(message, xml);
    QCOMPARE(message.mucInvitationJid(), QLatin1String("*****@*****.**"));
    QCOMPARE(message.mucInvitationPassword(), QLatin1String("cauldronburn"));
    QCOMPARE(message.mucInvitationReason(), QLatin1String("Hey Hecate, this is the place for all good witches!"));
    serializePacket(message, xml);
}