Mercurial > hg > orthanc
comparison UnitTestsSources/ServerIndexTests.cpp @ 1124:790ff7a5b3bf
IStorageArea abstraction
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 05 Sep 2014 16:28:34 +0200 |
parents | 66fa947c7280 |
children | ba9fd42284d0 |
comparison
equal
deleted
inserted
replaced
1123:6c5a77637b23 | 1124:790ff7a5b3bf |
---|---|
36 #include "../OrthancServer/DatabaseWrapper.h" | 36 #include "../OrthancServer/DatabaseWrapper.h" |
37 #include "../OrthancServer/ServerContext.h" | 37 #include "../OrthancServer/ServerContext.h" |
38 #include "../OrthancServer/ServerIndex.h" | 38 #include "../OrthancServer/ServerIndex.h" |
39 #include "../Core/Uuid.h" | 39 #include "../Core/Uuid.h" |
40 #include "../Core/DicomFormat/DicomNullValue.h" | 40 #include "../Core/DicomFormat/DicomNullValue.h" |
41 #include "../Core/FileStorage/FilesystemStorage.h" | |
41 | 42 |
42 #include <ctype.h> | 43 #include <ctype.h> |
43 #include <glog/logging.h> | 44 #include <glog/logging.h> |
44 #include <algorithm> | 45 #include <algorithm> |
45 | 46 |
567 | 568 |
568 | 569 |
569 TEST(ServerIndex, AttachmentRecycling) | 570 TEST(ServerIndex, AttachmentRecycling) |
570 { | 571 { |
571 const std::string path = "UnitTestsStorage"; | 572 const std::string path = "UnitTestsStorage"; |
573 | |
572 Toolbox::RemoveFile(path + "/index"); | 574 Toolbox::RemoveFile(path + "/index"); |
573 ServerContext context(path, ":memory:"); // The SQLite DB is in memory | 575 FilesystemStorage storage(path); |
576 ServerContext context(storage, ":memory:"); // The SQLite DB is in memory | |
574 ServerIndex& index = context.GetIndex(); | 577 ServerIndex& index = context.GetIndex(); |
575 | 578 |
576 index.SetMaximumStorageSize(10); | 579 index.SetMaximumStorageSize(10); |
577 | 580 |
578 Json::Value tmp; | 581 Json::Value tmp; |