Mercurial > hg > orthanc
comparison UnitTestsSources/ServerIndexTests.cpp @ 1514:d73a2178b319
support of deflate and gzip content-types
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 10 Aug 2015 16:43:59 +0200 |
parents | 9f66a12eb8fc |
children | e5e975e9b738 |
comparison
equal
deleted
inserted
replaced
1513:fe07f82d83d3 | 1514:d73a2178b319 |
---|---|
348 std::list<MetadataType> md; | 348 std::list<MetadataType> md; |
349 index_->ListAvailableMetadata(md, a[4]); | 349 index_->ListAvailableMetadata(md, a[4]); |
350 ASSERT_EQ(0u, md.size()); | 350 ASSERT_EQ(0u, md.size()); |
351 | 351 |
352 index_->AddAttachment(a[4], FileInfo("my json file", FileContentType_DicomAsJson, 42, "md5", | 352 index_->AddAttachment(a[4], FileInfo("my json file", FileContentType_DicomAsJson, 42, "md5", |
353 CompressionType_Zlib, 21, "compressedMD5")); | 353 CompressionType_ZlibWithSize, 21, "compressedMD5")); |
354 index_->AddAttachment(a[4], FileInfo("my dicom file", FileContentType_Dicom, 42, "md5")); | 354 index_->AddAttachment(a[4], FileInfo("my dicom file", FileContentType_Dicom, 42, "md5")); |
355 index_->AddAttachment(a[6], FileInfo("world", FileContentType_Dicom, 44, "md5")); | 355 index_->AddAttachment(a[6], FileInfo("world", FileContentType_Dicom, 44, "md5")); |
356 index_->SetMetadata(a[4], MetadataType_Instance_RemoteAet, "PINNACLE"); | 356 index_->SetMetadata(a[4], MetadataType_Instance_RemoteAet, "PINNACLE"); |
357 | 357 |
358 index_->ListAvailableMetadata(md, a[4]); | 358 index_->ListAvailableMetadata(md, a[4]); |
407 ASSERT_EQ("my json file", att.GetUuid()); | 407 ASSERT_EQ("my json file", att.GetUuid()); |
408 ASSERT_EQ(21u, att.GetCompressedSize()); | 408 ASSERT_EQ(21u, att.GetCompressedSize()); |
409 ASSERT_EQ("md5", att.GetUncompressedMD5()); | 409 ASSERT_EQ("md5", att.GetUncompressedMD5()); |
410 ASSERT_EQ("compressedMD5", att.GetCompressedMD5()); | 410 ASSERT_EQ("compressedMD5", att.GetCompressedMD5()); |
411 ASSERT_EQ(42u, att.GetUncompressedSize()); | 411 ASSERT_EQ(42u, att.GetUncompressedSize()); |
412 ASSERT_EQ(CompressionType_Zlib, att.GetCompressionType()); | 412 ASSERT_EQ(CompressionType_ZlibWithSize, att.GetCompressionType()); |
413 | 413 |
414 ASSERT_TRUE(index_->LookupAttachment(att, a[6], FileContentType_Dicom)); | 414 ASSERT_TRUE(index_->LookupAttachment(att, a[6], FileContentType_Dicom)); |
415 ASSERT_EQ("world", att.GetUuid()); | 415 ASSERT_EQ("world", att.GetUuid()); |
416 ASSERT_EQ(44u, att.GetCompressedSize()); | 416 ASSERT_EQ(44u, att.GetCompressedSize()); |
417 ASSERT_EQ("md5", att.GetUncompressedMD5()); | 417 ASSERT_EQ("md5", att.GetUncompressedMD5()); |