Mercurial > hg > orthanc-databases
comparison MySQL/UnitTests/UnitTestsMain.cpp @ 195:53bd9022c58b
Support of "OrthancPluginRegisterStorageArea2()" from Orthanc SDK 1.9.0
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 08 Jan 2021 18:54:20 +0100 |
parents | a51ce147dbe0 |
children | 42990b2dd51b |
comparison
equal
deleted
inserted
replaced
194:a51ce147dbe0 | 195:53bd9022c58b |
---|---|
161 std::string uuid = boost::lexical_cast<std::string>(i); | 161 std::string uuid = boost::lexical_cast<std::string>(i); |
162 std::string value = "Value " + boost::lexical_cast<std::string>(i * 2); | 162 std::string value = "Value " + boost::lexical_cast<std::string>(i * 2); |
163 storageArea.Create(transaction, uuid, value.c_str(), value.size(), OrthancPluginContentType_Unknown); | 163 storageArea.Create(transaction, uuid, value.c_str(), value.size(), OrthancPluginContentType_Unknown); |
164 } | 164 } |
165 | 165 |
166 OrthancDatabases::StorageAreaBuffer buffer; | 166 OrthancDatabases::StorageAreaBuffer buffer(NULL /* we are running unit tests */); |
167 ASSERT_THROW(storageArea.Read(buffer, transaction, "nope", OrthancPluginContentType_Unknown), | 167 ASSERT_THROW(storageArea.Read(buffer, transaction, "nope", OrthancPluginContentType_Unknown), |
168 Orthanc::OrthancException); | 168 Orthanc::OrthancException); |
169 | 169 |
170 ASSERT_EQ(10, CountFiles(db)); | 170 ASSERT_EQ(10, CountFiles(db)); |
171 storageArea.Remove(transaction, "5", OrthancPluginContentType_Unknown); | 171 storageArea.Remove(transaction, "5", OrthancPluginContentType_Unknown); |