use namespace for ca and rename CaState to ca::RequestState
Change-Id: I2250bf7fb68503465dae18e16dc3c512fe809037
diff --git a/tests/unit-tests/ca-sqlite.t.cpp b/tests/unit-tests/ca-sqlite.t.cpp
index a2c0542..e780dde 100644
--- a/tests/unit-tests/ca-sqlite.t.cpp
+++ b/tests/unit-tests/ca-sqlite.t.cpp
@@ -25,6 +25,8 @@
namespace ndncert {
namespace tests {
+using namespace ca;
+
BOOST_FIXTURE_TEST_SUITE(TestCaSqlite, DatabaseFixture)
BOOST_AUTO_TEST_CASE(RequestOperations)
@@ -37,7 +39,7 @@
// add operation
RequestID requestId = {1,2,3,4,5,6,7,8};
- CaState request1(Name("/ndn/site1"), requestId, RequestType::NEW, Status::BEFORE_CHALLENGE, cert1, makeStringBlock(ndn::tlv::ContentType_Key, "PretendItIsAKey"));
+ RequestState request1(Name("/ndn/site1"), requestId, RequestType::NEW, Status::BEFORE_CHALLENGE, cert1, makeStringBlock(ndn::tlv::ContentType_Key, "PretendItIsAKey"));
storage.addRequest(request1);
// get operation
@@ -50,7 +52,7 @@
// update operation
JsonSection json;
json.put("test", "4567");
- CaState request2(Name("/ndn/site1"), requestId, RequestType::NEW, Status::CHALLENGE, cert1,
+ RequestState request2(Name("/ndn/site1"), requestId, RequestType::NEW, Status::CHALLENGE, cert1,
"email", "test", time::system_clock::now(), 3, time::seconds(3600),
std::move(json), makeEmptyBlock(ndn::tlv::ContentType_Key), 0);
storage.updateRequest(request2);
@@ -63,7 +65,7 @@
auto key2 = identity2.getDefaultKey();
auto cert2 = key2.getDefaultCertificate();
RequestID requestId2 = {8,7,6,5,4,3,2,1};
- CaState request3(Name("/ndn/site2"), requestId2, RequestType::NEW, Status::BEFORE_CHALLENGE, cert2, makeStringBlock(ndn::tlv::ContentType_Key, "PretendItIsAKey"));
+ RequestState request3(Name("/ndn/site2"), requestId2, RequestType::NEW, Status::BEFORE_CHALLENGE, cert2, makeStringBlock(ndn::tlv::ContentType_Key, "PretendItIsAKey"));
storage.addRequest(request3);
// list operation
@@ -89,7 +91,7 @@
// add operation
RequestID requestId = {1,2,3,4,5,6,7,8};
- CaState request1(Name("/ndn/site1"),requestId, RequestType::NEW, Status::BEFORE_CHALLENGE, cert1, makeEmptyBlock(ndn::tlv::ContentType_Key));
+ RequestState request1(Name("/ndn/site1"),requestId, RequestType::NEW, Status::BEFORE_CHALLENGE, cert1, makeEmptyBlock(ndn::tlv::ContentType_Key));
BOOST_CHECK_NO_THROW(storage.addRequest(request1));
// add again
BOOST_CHECK_THROW(storage.addRequest(request1), std::runtime_error);