Mercurial > hg > orthanc
changeset 1030:66fa947c7280
more tests
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 10 Jul 2014 14:45:43 +0200 |
parents | 9e04f9f36096 |
children | 703a552b52bc |
files | UnitTestsSources/ServerIndexTests.cpp |
diffstat | 1 files changed, 12 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/UnitTestsSources/ServerIndexTests.cpp Thu Jul 10 13:54:00 2014 +0200 +++ b/UnitTestsSources/ServerIndexTests.cpp Thu Jul 10 14:45:43 2014 +0200 @@ -220,11 +220,23 @@ index_->SetMetadata(a[4], MetadataType_ModifiedFrom, "TUTU"); index_->ListAvailableMetadata(md, a[4]); ASSERT_EQ(2u, md.size()); + + std::map<MetadataType, std::string> md2; + index_->GetAllMetadata(md2, a[4]); + ASSERT_EQ(2u, md2.size()); + ASSERT_EQ("TUTU", md2[MetadataType_ModifiedFrom]); + ASSERT_EQ("PINNACLE", md2[MetadataType_Instance_RemoteAet]); + index_->DeleteMetadata(a[4], MetadataType_ModifiedFrom); index_->ListAvailableMetadata(md, a[4]); ASSERT_EQ(1u, md.size()); ASSERT_EQ(MetadataType_Instance_RemoteAet, md.front()); + index_->GetAllMetadata(md2, a[4]); + ASSERT_EQ(1u, md2.size()); + ASSERT_EQ("PINNACLE", md2[MetadataType_Instance_RemoteAet]); + + ASSERT_EQ(21u + 42u + 44u, index_->GetTotalCompressedSize()); ASSERT_EQ(42u + 42u + 44u, index_->GetTotalUncompressedSize());