summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/Serializer/PayloadSerializers/UnitTest/JingleSerializersTest.cpp')
-rw-r--r--Swiften/Serializer/PayloadSerializers/UnitTest/JingleSerializersTest.cpp30
1 files changed, 15 insertions, 15 deletions
diff --git a/Swiften/Serializer/PayloadSerializers/UnitTest/JingleSerializersTest.cpp b/Swiften/Serializer/PayloadSerializers/UnitTest/JingleSerializersTest.cpp
index e3ec8fc..10aa7e9 100644
--- a/Swiften/Serializer/PayloadSerializers/UnitTest/JingleSerializersTest.cpp
+++ b/Swiften/Serializer/PayloadSerializers/UnitTest/JingleSerializersTest.cpp
@@ -181,14 +181,13 @@ class JingleSerializersTest : public CppUnit::TestFixture {
void testSerialize_Xep0234_Example1() {
std::string expected = "<description xmlns=\"urn:xmpp:jingle:apps:file-transfer:3\">"
"<offer>"
- "<file"
- " date=\"1969-07-21T02:56:15Z\""
- " hash=\"552da749930852c69ae5d2141d3766b1\""
- " name=\"test.txt\""
- " size=\"1022\""
- " xmlns=\"http://jabber.org/protocol/si/profile/file-transfer\">"
+ "<file>"
+ "<date>1969-07-21T02:56:15Z</date>"
"<desc>This is a test. If this were a real file...</desc>"
+ "<name>test.txt</name>"
"<range/>"
+ "<size>1022</size>"
+ "<hash algo=\"sha-1\" xmlns=\"urn:xmpp:hashes:1\">552da749930852c69ae5d2141d3766b1</hash>"
"</file>"
"</offer>"
"</description>";
@@ -197,6 +196,7 @@ class JingleSerializersTest : public CppUnit::TestFixture {
fileInfo.setDate(stringToDateTime("1969-07-21T02:56:15Z"));
fileInfo.setHash("552da749930852c69ae5d2141d3766b1");
+ fileInfo.setAlgo("sha-1");
fileInfo.setSize(1022);
fileInfo.setName("test.txt");
fileInfo.setDescription("This is a test. If this were a real file...");
@@ -217,14 +217,13 @@ class JingleSerializersTest : public CppUnit::TestFixture {
"<content creator=\"initiator\" name=\"a-file-offer\">"
"<description xmlns=\"urn:xmpp:jingle:apps:file-transfer:3\">"
"<offer>"
- "<file"
- " date=\"1969-07-21T02:56:15Z\""
- " hash=\"552da749930852c69ae5d2141d3766b1\""
- " name=\"test.txt\""
- " size=\"1022\""
- " xmlns=\"http://jabber.org/protocol/si/profile/file-transfer\">"
+ "<file>"
+ "<date>1969-07-21T02:56:15Z</date>"
"<desc>This is a test. If this were a real file...</desc>"
+ "<name>test.txt</name>"
"<range/>"
+ "<size>1022</size>"
+ "<hash algo=\"sha-1\" xmlns=\"urn:xmpp:hashes:1\">552da749930852c69ae5d2141d3766b1</hash>"
"</file>"
"</offer>"
"</description>"
@@ -266,6 +265,7 @@ class JingleSerializersTest : public CppUnit::TestFixture {
StreamInitiationFileInfo fileInfo;
fileInfo.setName("test.txt");
fileInfo.setSize(1022);
+ fileInfo.setAlgo("sha-1");
fileInfo.setHash("552da749930852c69ae5d2141d3766b1");
fileInfo.setDate(stringToDateTime("1969-07-21T02:56:15Z"));
fileInfo.setDescription("This is a test. If this were a real file...");
@@ -350,10 +350,9 @@ class JingleSerializersTest : public CppUnit::TestFixture {
"<description"
" xmlns=\"urn:xmpp:jingle:apps:file-transfer:3\">"
"<request>"
- "<file"
- " hash=\"552da749930852c69ae5d2141d3766b1\""
- " xmlns=\"http://jabber.org/protocol/si/profile/file-transfer\">"
+ "<file>"
"<range offset=\"270336\"/>"
+ "<hash algo=\"sha-1\" xmlns=\"urn:xmpp:hashes:1\">552da749930852c69ae5d2141d3766b1</hash>"
"</file>"
"</request>"
"</description>"
@@ -393,6 +392,7 @@ class JingleSerializersTest : public CppUnit::TestFixture {
StreamInitiationFileInfo fileInfo;
fileInfo.setHash("552da749930852c69ae5d2141d3766b1");
+ fileInfo.setAlgo("sha-1");
fileInfo.setRangeOffset(270336);
JingleFileTransferDescription::ref desc = boost::make_shared<JingleFileTransferDescription>();