Mercurial > hg > orthanc
diff OrthancServer/UnitTestsSources/ServerIndexTests.cpp @ 4506:ac69c9f76c71
refactoring ServerIndex::Store()
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 10 Feb 2021 17:01:44 +0100 |
parents | 97d103b57cd1 |
children | b4c58795f3a8 |
line wrap: on
line diff
--- a/OrthancServer/UnitTestsSources/ServerIndexTests.cpp Wed Feb 10 12:07:03 2021 +0100 +++ b/OrthancServer/UnitTestsSources/ServerIndexTests.cpp Wed Feb 10 17:01:44 2021 +0100 @@ -727,17 +727,21 @@ ParsedDicomFile dicom(instance, GetDefaultDicomEncoding(), false /* be strict */); - std::map<MetadataType, std::string> instanceMetadata; DicomInstanceToStore toStore; toStore.SetParsedDicomFile(dicom); + std::map<MetadataType, std::string> instanceMetadata; + { DicomMap summary; OrthancConfiguration::DefaultExtractDicomSummary(summary, toStore.GetParsedDicomFile()); - DicomInstanceHasher hasher(summary); - ASSERT_EQ(StoreStatus_Success, index.Store(instanceMetadata, toStore, summary, hasher, attachments, - false /* don't overwrite */, true /* pixel data offset */, 42)); + std::string transferSyntax; + bool hasTransferSyntax = dicom.LookupTransferSyntax(transferSyntax); + ASSERT_EQ(StoreStatus_Success, index.Store( + instanceMetadata, summary, attachments, toStore.GetMetadata(), + toStore.GetOrigin(), false /* don't overwrite */, + hasTransferSyntax, transferSyntax, true /* pixel data offset */, 42)); } ASSERT_EQ(6u, instanceMetadata.size());