mgmt: remove one level of indirection in status dataset processing
Change-Id: I46bf2f2788300a76d64d835c24fe890b32798d0c
diff --git a/tests/unit/mgmt/dispatcher.t.cpp b/tests/unit/mgmt/dispatcher.t.cpp
index 9087179..ec6f90f 100644
--- a/tests/unit/mgmt/dispatcher.t.cpp
+++ b/tests/unit/mgmt/dispatcher.t.cpp
@@ -32,18 +32,10 @@
class DispatcherFixture : public IoKeyChainFixture
{
-public:
- DispatcherFixture()
- : face(m_io, m_keyChain, {true, true})
- , dispatcher(face, m_keyChain, security::SigningInfo())
- , storage(dispatcher.m_storage)
- {
- }
-
-public:
- DummyClientFace face;
- mgmt::Dispatcher dispatcher;
- InMemoryStorageFifo& storage;
+protected:
+ DummyClientFace face{m_io, m_keyChain, {true, true}};
+ Dispatcher dispatcher{face, m_keyChain};
+ InMemoryStorageFifo& storage{dispatcher.m_storage};
};
class VoidParameters : public mgmt::ControlParameters
@@ -266,16 +258,14 @@
* ut::description("test for bug #4059"))
{
AcceptContinuation authorizationAccept;
- auto authorization =
- [&authorizationAccept] (const Name&, const Interest&, const ControlParameters*,
- AcceptContinuation accept, RejectContinuation) {
- authorizationAccept = std::move(accept);
- };
+ auto authorization = [&authorizationAccept] (const Name&, const Interest&, const ControlParameters*,
+ AcceptContinuation accept, RejectContinuation) {
+ authorizationAccept = std::move(accept);
+ };
- auto validateParameters =
- [] (const ControlParameters& params) {
- return dynamic_cast<const StatefulParameters&>(params).check();
- };
+ auto validateParameters = [] (const ControlParameters& params) {
+ return dynamic_cast<const StatefulParameters&>(params).check();
+ };
size_t nCallbackCalled = 0;
dispatcher.addControlCommand<StatefulParameters>("test", authorization, validateParameters,