comparison UnitTestsSources/ServerIndexTests.cpp @ 2924:22524fd06225

macros ORTHANC_OVERRIDE and ORTHANC_FINAL
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 09 Nov 2018 09:06:46 +0100
parents e5e3253a1164
children dc18d5804746
comparison
equal deleted inserted replaced
2923:87366b8aed4f 2924:22524fd06225
68 ancestorId_ = ""; 68 ancestorId_ = "";
69 deletedFiles_.clear(); 69 deletedFiles_.clear();
70 } 70 }
71 71
72 virtual void SignalRemainingAncestor(ResourceType type, 72 virtual void SignalRemainingAncestor(ResourceType type,
73 const std::string& publicId) 73 const std::string& publicId)
74 ORTHANC_OVERRIDE
74 { 75 {
75 ancestorId_ = publicId; 76 ancestorId_ = publicId;
76 ancestorType_ = type; 77 ancestorType_ = type;
77 } 78 }
78 79
79 virtual void SignalFileDeleted(const FileInfo& info) 80 virtual void SignalFileDeleted(const FileInfo& info) ORTHANC_OVERRIDE
80 { 81 {
81 const std::string fileUuid = info.GetUuid(); 82 const std::string fileUuid = info.GetUuid();
82 deletedFiles_.push_back(fileUuid); 83 deletedFiles_.push_back(fileUuid);
83 LOG(INFO) << "A file must be removed: " << fileUuid; 84 LOG(INFO) << "A file must be removed: " << fileUuid;
84 } 85 }
85 86
86 virtual void SignalChange(const ServerIndexChange& change) 87 virtual void SignalChange(const ServerIndexChange& change) ORTHANC_OVERRIDE
87 { 88 {
88 if (change.GetChangeType() == ChangeType_Deleted) 89 if (change.GetChangeType() == ChangeType_Deleted)
89 { 90 {
90 deletedResources_.push_back(change.GetPublicId()); 91 deletedResources_.push_back(change.GetPublicId());
91 } 92 }
106 107
107 DatabaseWrapperTest() 108 DatabaseWrapperTest()
108 { 109 {
109 } 110 }
110 111
111 virtual void SetUp() 112 virtual void SetUp() ORTHANC_OVERRIDE
112 { 113 {
113 listener_.reset(new TestDatabaseListener); 114 listener_.reset(new TestDatabaseListener);
114 115
115 switch (GetParam()) 116 switch (GetParam())
116 { 117 {
124 125
125 index_->SetListener(*listener_); 126 index_->SetListener(*listener_);
126 index_->Open(); 127 index_->Open();
127 } 128 }
128 129
129 virtual void TearDown() 130 virtual void TearDown() ORTHANC_OVERRIDE
130 { 131 {
131 index_->Close(); 132 index_->Close();
132 index_.reset(NULL); 133 index_.reset(NULL);
133 listener_.reset(NULL); 134 listener_.reset(NULL);
134 } 135 }