summaryrefslogtreecommitdiff
path: root/AudioManagerDaemon/test/controlInterface
diff options
context:
space:
mode:
authorchristian mueller <christian.ei.mueller@bmw.de>2012-01-26 18:10:02 +0100
committerchristian mueller <christian.ei.mueller@bmw.de>2012-01-27 14:44:44 +0100
commit58d62c4af578c10375bf9baa946e33f340c42a1f (patch)
treec09d7547e4ec8ecdcbeac22b7bc6d845f0d50858 /AudioManagerDaemon/test/controlInterface
parent93c6b1973d59ce225e9cb5d2bcaea7d01c5fda52 (diff)
downloadaudiomanager-58d62c4af578c10375bf9baa946e33f340c42a1f.tar.gz
* regenerated EA code based on Conti Feedback.
* changed paths of audiomanagertypes include in generated files * changed order of parameters in asyncSetSinkSoundProperty / asyncSetSourceSoundProperty / cbTimingInformationChanged to have common style over all interfaces. * changed default include paths for Controller etc... * cleanup of warnings
Diffstat (limited to 'AudioManagerDaemon/test/controlInterface')
-rw-r--r--AudioManagerDaemon/test/controlInterface/MockInterfaces.h9
-rw-r--r--AudioManagerDaemon/test/controlInterface/controlInterfaceTest.cpp9
-rw-r--r--AudioManagerDaemon/test/controlInterface/controlInterfaceTest.h4
3 files changed, 13 insertions, 9 deletions
diff --git a/AudioManagerDaemon/test/controlInterface/MockInterfaces.h b/AudioManagerDaemon/test/controlInterface/MockInterfaces.h
index 9ac325f..746d70e 100644
--- a/AudioManagerDaemon/test/controlInterface/MockInterfaces.h
+++ b/AudioManagerDaemon/test/controlInterface/MockInterfaces.h
@@ -53,13 +53,13 @@ class MockRoutingSendInterface : public RoutingSendInterface {
MOCK_METHOD3(asyncSetSourceState,
am_Error_e(const am_Handle_s handle, const am_sourceID_t sourceID, const am_SourceState_e state));
MOCK_METHOD3(asyncSetSinkSoundProperties,
- am_Error_e(const am_Handle_s handle, const std::vector<am_SoundProperty_s>& listSoundProperties, const am_sinkID_t sinkID));
+ am_Error_e(const am_Handle_s handle, const am_sinkID_t sinkID, const std::vector<am_SoundProperty_s>& listSoundProperties));
MOCK_METHOD3(asyncSetSinkSoundProperty,
- am_Error_e(const am_Handle_s handle, const am_SoundProperty_s& soundProperty, const am_sinkID_t sinkID));
+ am_Error_e(const am_Handle_s handle, const am_sinkID_t sinkID, const am_SoundProperty_s& soundProperty));
MOCK_METHOD3(asyncSetSourceSoundProperties,
- am_Error_e(const am_Handle_s handle, const std::vector<am_SoundProperty_s>& listSoundProperties, const am_sourceID_t sourceID));
+ am_Error_e(const am_Handle_s handle, const am_sourceID_t sourceID, const std::vector<am_SoundProperty_s>& listSoundProperties));
MOCK_METHOD3(asyncSetSourceSoundProperty,
- am_Error_e(const am_Handle_s handle, const am_SoundProperty_s& soundProperty, const am_sourceID_t sourceID));
+ am_Error_e(const am_Handle_s handle, const am_sourceID_t sourceID, const am_SoundProperty_s& soundProperty));
MOCK_METHOD5(asyncCrossFade,
am_Error_e(const am_Handle_s handle, const am_crossfaderID_t crossfaderID, const am_HotSink_e hotSink, const am_RampType_e rampType, const am_time_t time));
MOCK_METHOD2(setDomainState,
@@ -71,6 +71,7 @@ class MockRoutingSendInterface : public RoutingSendInterface {
};
+
class MockControlSendInterface : public ControlSendInterface {
public:
MOCK_METHOD1(startupController,
diff --git a/AudioManagerDaemon/test/controlInterface/controlInterfaceTest.cpp b/AudioManagerDaemon/test/controlInterface/controlInterfaceTest.cpp
index 5d3a4f1..c22f175 100644
--- a/AudioManagerDaemon/test/controlInterface/controlInterfaceTest.cpp
+++ b/AudioManagerDaemon/test/controlInterface/controlInterfaceTest.cpp
@@ -42,12 +42,13 @@ controlInterfaceTest::controlInterfaceTest() :
pCommandSender(plistCommandPluginDirs), //
pMockControlInterface(), //
pMockRoutingInterface(), //
- pControlSender(std::string("")), //
pRoutingInterfaceBackdoor(), //
pCommandInterfaceBackdoor(), //
pControlInterfaceBackdoor(), //
+ pControlSender(std::string("")), //
+ pRouter(&pDatabaseHandler,&pControlSender), //
pDatabaseObserver(&pCommandSender, &pRoutingSender), //
- pControlReceiver(&pDatabaseHandler, &pRoutingSender, &pCommandSender), //
+ pControlReceiver(&pDatabaseHandler, &pRoutingSender, &pCommandSender,&pRouter), //
pRoutingReceiver(&pDatabaseHandler, &pRoutingSender, &pControlSender, pDBusWrapper)
{
pDatabaseHandler.registerObserver(&pDatabaseObserver);
@@ -440,7 +441,7 @@ TEST_F(controlInterfaceTest,ackSetSinkSoundProperty)
ASSERT_EQ(E_OK, pDatabaseHandler.enterSinkDB(sink,sinkID));
//change the soundproperty, expect a call on the routinginterface
- EXPECT_CALL(pMockRoutingInterface,asyncSetSinkSoundProperty(_,_,2)).WillOnce(Return(E_OK));
+ EXPECT_CALL(pMockRoutingInterface,asyncSetSinkSoundProperty(_,2,_)).WillOnce(Return(E_OK));
ASSERT_EQ(E_OK, pControlReceiver.setSinkSoundProperty(handle,sink.sinkID,soundProperty));
//check the list of handles. The handle must be in there and have the right type
@@ -492,7 +493,7 @@ TEST_F(controlInterfaceTest,ackSetSourceSoundProperty)
ASSERT_EQ(E_OK, pDatabaseHandler.enterSourceDB(source,sourceID));
//we trigger the change and wait for a call on the routinginterface
- EXPECT_CALL(pMockRoutingInterface,asyncSetSourceSoundProperty(_,_,2)).WillOnce(Return(E_OK));
+ EXPECT_CALL(pMockRoutingInterface,asyncSetSourceSoundProperty(_,2,_)).WillOnce(Return(E_OK));
ASSERT_EQ(E_OK, pControlReceiver.setSourceSoundProperty(handle,source.sourceID,soundProperty));
//check the list of handles. The handle must be in there and have the right type
diff --git a/AudioManagerDaemon/test/controlInterface/controlInterfaceTest.h b/AudioManagerDaemon/test/controlInterface/controlInterfaceTest.h
index 1bc3ce8..0029d73 100644
--- a/AudioManagerDaemon/test/controlInterface/controlInterfaceTest.h
+++ b/AudioManagerDaemon/test/controlInterface/controlInterfaceTest.h
@@ -36,6 +36,7 @@
#include "DatabaseObserver.h"
#include "ControlSender.h"
#include "RoutingSender.h"
+#include "Router.h"
#include "../RoutingInterfaceBackdoor.h"
#include "../CommandInterfaceBackdoor.h"
#include "../ControlInterfaceBackdoor.h"
@@ -57,10 +58,11 @@ public:
CommandSender pCommandSender;
MockControlSendInterface pMockControlInterface;
MockRoutingSendInterface pMockRoutingInterface;
- ControlSender pControlSender;
RoutingInterfaceBackdoor pRoutingInterfaceBackdoor;
CommandInterfaceBackdoor pCommandInterfaceBackdoor;
ControlInterfaceBackdoor pControlInterfaceBackdoor;
+ ControlSender pControlSender;
+ Router pRouter;
DatabaseObserver pDatabaseObserver;
ControlReceiver pControlReceiver;
RoutingReceiver pRoutingReceiver;