diff options
Diffstat (limited to 'AudioManagerDaemon/test/routingInterface')
4 files changed, 17 insertions, 10 deletions
diff --git a/AudioManagerDaemon/test/routingInterface/CMakeLists.txt b/AudioManagerDaemon/test/routingInterface/CMakeLists.txt index 5b5da3c..fbb4ac1 100644 --- a/AudioManagerDaemon/test/routingInterface/CMakeLists.txt +++ b/AudioManagerDaemon/test/routingInterface/CMakeLists.txt @@ -54,6 +54,9 @@ file(GLOB ROUTING_INTERFACE_SRCS_CXX "../../src/ControlSender.cpp" "../CommonFunctions.cpp" "../../src/DLTWrapper.cpp" + "../../src/SocketHandler.cpp" + "../../src/RoutingReceiver.cpp" + "../../src/CommandReceiver.cpp" "*.cpp" ) diff --git a/AudioManagerDaemon/test/routingInterface/MockRoutingInterface.h b/AudioManagerDaemon/test/routingInterface/MockRoutingInterface.h index 6c93507..2c21fe6 100644 --- a/AudioManagerDaemon/test/routingInterface/MockRoutingInterface.h +++ b/AudioManagerDaemon/test/routingInterface/MockRoutingInterface.h @@ -34,12 +34,12 @@ namespace am { class MockRoutingSendInterface : public RoutingSendInterface { public: - MOCK_METHOD1(startupRoutingInterface, - void(RoutingReceiveInterface* routingreceiveinterface)); - MOCK_METHOD0(routingInterfacesReady, - void()); - MOCK_METHOD0(routingInterfacesRundown, - void()); + MOCK_METHOD1(startupInterface, + am_Error_e(RoutingReceiveInterface* routingreceiveinterface)); + MOCK_METHOD1(setRoutingReady, + void(const uint16_t handle)); + MOCK_METHOD1(setRoutingRundown, + void(const uint16_t handle)); MOCK_METHOD1(asyncAbort, am_Error_e(const am_Handle_s handle)); MOCK_METHOD5(asyncConnect, @@ -66,9 +66,10 @@ class MockRoutingSendInterface : public RoutingSendInterface { am_Error_e(const am_domainID_t domainID, const am_DomainState_e domainState)); MOCK_CONST_METHOD1(returnBusName, am_Error_e(std::string& BusName)); - MOCK_CONST_METHOD0(getInterfaceVersion, - uint16_t()); + MOCK_CONST_METHOD1(getInterfaceVersion, + void(std::string& version)); }; + } // namespace am diff --git a/AudioManagerDaemon/test/routingInterface/routingInterfaceTest.cpp b/AudioManagerDaemon/test/routingInterface/routingInterfaceTest.cpp index 33aa7f6..a827ebe 100644 --- a/AudioManagerDaemon/test/routingInterface/routingInterfaceTest.cpp +++ b/AudioManagerDaemon/test/routingInterface/routingInterfaceTest.cpp @@ -32,6 +32,7 @@ using namespace testing; routingInterfaceTest::routingInterfaceTest() : plistRoutingPluginDirs(), // plistCommandPluginDirs(), // + pSocketHandler(), // pDatabaseHandler(std::string(":memory:")), // pRoutingSender(plistRoutingPluginDirs), // pCommandSender(plistCommandPluginDirs), // @@ -40,8 +41,8 @@ routingInterfaceTest::routingInterfaceTest() : pMockInterface(), // pRoutingInterfaceBackdoor(), // pCommandInterfaceBackdoor(), // - pControlReceiver(&pDatabaseHandler, &pRoutingSender, &pCommandSender, &pRouter), // - pObserver(&pCommandSender, &pRoutingSender) + pControlReceiver(&pDatabaseHandler, &pRoutingSender, &pCommandSender, &pSocketHandler, &pRouter), // + pObserver(&pCommandSender, &pRoutingSender, &pSocketHandler) { pDatabaseHandler.registerObserver(&pObserver); pRoutingInterfaceBackdoor.unloadPlugins(&pRoutingSender); diff --git a/AudioManagerDaemon/test/routingInterface/routingInterfaceTest.h b/AudioManagerDaemon/test/routingInterface/routingInterfaceTest.h index 0608eb4..f102221 100644 --- a/AudioManagerDaemon/test/routingInterface/routingInterfaceTest.h +++ b/AudioManagerDaemon/test/routingInterface/routingInterfaceTest.h @@ -37,6 +37,7 @@ #include "ControlReceiver.h" #include "ControlSender.h" #include "DatabaseObserver.h" +#include "SocketHandler.h" #include "Router.h" #include "../RoutingInterfaceBackdoor.h" #include "../CommandInterfaceBackdoor.h" @@ -52,6 +53,7 @@ public: ~routingInterfaceTest(); std::vector<std::string> plistRoutingPluginDirs; std::vector<std::string> plistCommandPluginDirs; + SocketHandler pSocketHandler; DatabaseHandler pDatabaseHandler; RoutingSender pRoutingSender; CommandSender pCommandSender; |