comparison UnitTests/ServerIndex.cpp @ 438:7bbe77cb9e12

DELETE metadata
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 15 May 2013 16:51:10 +0200
parents d51186bf7602
children 2c739f76d0bb
comparison
equal deleted inserted replaced
437:beca6747945e 438:7bbe77cb9e12
142 index.AddAttachment(a[4], FileInfo("my json file", FileContentType_Json, 42, CompressionType_Zlib, 21)); 142 index.AddAttachment(a[4], FileInfo("my json file", FileContentType_Json, 42, CompressionType_Zlib, 21));
143 index.AddAttachment(a[4], FileInfo("my dicom file", FileContentType_Dicom, 42)); 143 index.AddAttachment(a[4], FileInfo("my dicom file", FileContentType_Dicom, 42));
144 index.AddAttachment(a[6], FileInfo("world", FileContentType_Dicom, 44)); 144 index.AddAttachment(a[6], FileInfo("world", FileContentType_Dicom, 44));
145 index.SetMetadata(a[4], MetadataType_Instance_RemoteAet, "PINNACLE"); 145 index.SetMetadata(a[4], MetadataType_Instance_RemoteAet, "PINNACLE");
146 146
147 index.ListAvailableMetadata(md, a[4]);
148 ASSERT_EQ(1u, md.size());
149 ASSERT_EQ(MetadataType_Instance_RemoteAet, md.front());
150 index.SetMetadata(a[4], MetadataType_ModifiedFrom, "TUTU");
151 index.ListAvailableMetadata(md, a[4]);
152 ASSERT_EQ(2u, md.size());
153 index.DeleteMetadata(a[4], MetadataType_ModifiedFrom);
147 index.ListAvailableMetadata(md, a[4]); 154 index.ListAvailableMetadata(md, a[4]);
148 ASSERT_EQ(1u, md.size()); 155 ASSERT_EQ(1u, md.size());
149 ASSERT_EQ(MetadataType_Instance_RemoteAet, md.front()); 156 ASSERT_EQ(MetadataType_Instance_RemoteAet, md.front());
150 157
151 ASSERT_EQ(21u + 42u + 44u, index.GetTotalCompressedSize()); 158 ASSERT_EQ(21u + 42u + 44u, index.GetTotalCompressedSize());