diff UnitTestsSources/ServerIndexTests.cpp @ 2898:e5e3253a1164

DicomInstanceToStore::GetHasher()
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 18 Oct 2018 11:44:17 +0200
parents 859a4950d48f
children 22524fd06225
line wrap: on
line diff
--- a/UnitTestsSources/ServerIndexTests.cpp	Thu Oct 18 10:53:22 2018 +0200
+++ b/UnitTestsSources/ServerIndexTests.cpp	Thu Oct 18 11:44:17 2018 +0200
@@ -820,6 +820,11 @@
     ids.push_back(hasher.HashStudy());
     ids.push_back(hasher.HashSeries());
     ids.push_back(hasher.HashInstance());
+
+    ASSERT_EQ(hasher.HashPatient(), toStore.GetHasher().HashPatient());
+    ASSERT_EQ(hasher.HashStudy(), toStore.GetHasher().HashStudy());
+    ASSERT_EQ(hasher.HashSeries(), toStore.GetHasher().HashSeries());
+    ASSERT_EQ(hasher.HashInstance(), toStore.GetHasher().HashInstance());
   }
 
   index.ComputeStatistics(tmp);
@@ -884,6 +889,7 @@
       DicomInstanceToStore toStore;
       toStore.SetSummary(instance);
       toStore.SetOrigin(DicomInstanceOrigin::FromPlugins());
+      ASSERT_EQ(id, toStore.GetHasher().HashInstance());
 
       std::string id2;
       ASSERT_EQ(StoreStatus_Success, context.Store(id2, toStore));