ctrl_agent_command_mgr_unittest.cc 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. // Copyright (C) 2017 Internet Systems Consortium, Inc. ("ISC")
  2. //
  3. // This Source Code Form is subject to the terms of the Mozilla Public
  4. // License, v. 2.0. If a copy of the MPL was not distributed with this
  5. // file, You can obtain one at http://mozilla.org/MPL/2.0/.
  6. #include <config.h>
  7. #include <agent/ctrl_agent_command_mgr.h>
  8. #include <gtest/gtest.h>
  9. using namespace isc::agent;
  10. namespace {
  11. /// @brief Test fixture class for @ref CtrlAgentCommandMgr.
  12. ///
  13. /// @todo Add tests for various commands, including the cases when the
  14. /// commands are forwarded to other servers via unix sockets.
  15. /// Meanwhile, this is just a placeholder for the tests.
  16. class CtrlAgentCommandMgrTest : public ::testing::Test {
  17. public:
  18. /// @brief Constructor.
  19. ///
  20. /// Deregisters all commands except 'list-commands'.
  21. CtrlAgentCommandMgrTest() {
  22. CtrlAgentCommandMgr::instance().deregisterAll();
  23. }
  24. /// @brief Destructor.
  25. ///
  26. /// Deregisters all commands except 'list-commands'.
  27. virtual ~CtrlAgentCommandMgrTest() {
  28. CtrlAgentCommandMgr::instance().deregisterAll();
  29. }
  30. };
  31. }