summaryrefslogtreecommitdiff
path: root/AudioManagerDaemon/test/controlInterface
diff options
context:
space:
mode:
authorChristian Mueller <christian@lmuc329619u.(none)>2011-12-18 16:33:52 +0100
committerChristian Mueller <christian@lmuc329619u.(none)>2011-12-18 16:33:52 +0100
commit18b59afe6cda90607ad0b193088000d4f9749a97 (patch)
treecd25bd8fd2b3b9d1e71e1e7df7059f9c0afc2df0 /AudioManagerDaemon/test/controlInterface
parent392d090c63dcb03df8a044abbc6cc84807e341e5 (diff)
downloadaudiomanager-18b59afe6cda90607ad0b193088000d4f9749a97.tar.gz
- added comments in XML description
- fixed bug in Dbus signal sending - corrected namespace usage
Diffstat (limited to 'AudioManagerDaemon/test/controlInterface')
-rw-r--r--AudioManagerDaemon/test/controlInterface/CMakeLists.txt3
-rw-r--r--AudioManagerDaemon/test/controlInterface/controlInterfaceTest.cpp14
-rw-r--r--AudioManagerDaemon/test/controlInterface/controlInterfaceTest.h35
3 files changed, 17 insertions, 35 deletions
diff --git a/AudioManagerDaemon/test/controlInterface/CMakeLists.txt b/AudioManagerDaemon/test/controlInterface/CMakeLists.txt
index a96cfe8..8ac7cd1 100644
--- a/AudioManagerDaemon/test/controlInterface/CMakeLists.txt
+++ b/AudioManagerDaemon/test/controlInterface/CMakeLists.txt
@@ -25,9 +25,8 @@ cmake_minimum_required(VERSION 2.6)
PROJECT(controlInterfacetest)
-set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -rdynamic")
#set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -pedantic")
-set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -DUNIT_TEST=1")
+set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -DUNIT_TEST=1 -DDLT_CONTEXT=AudioManager")
set(STD_INCLUDE_DIRS "/usr/include")
set(DBUS_FOLDER ${CMAKE_SOURCE_DIR}/../../../dbusInterfaces)
diff --git a/AudioManagerDaemon/test/controlInterface/controlInterfaceTest.cpp b/AudioManagerDaemon/test/controlInterface/controlInterfaceTest.cpp
index dbddf47..c59ac06 100644
--- a/AudioManagerDaemon/test/controlInterface/controlInterfaceTest.cpp
+++ b/AudioManagerDaemon/test/controlInterface/controlInterfaceTest.cpp
@@ -23,8 +23,15 @@
*/
#include "controlInterfaceTest.h"
+#include <algorithm>
+#include <string>
+#include <vector>
+#include <set>
+using namespace am;
+using namespace testing;
+DLT_DECLARE_CONTEXT(DLT_CONTEXT)
controlInterfaceTest::controlInterfaceTest()
:plistCommandPluginDirs(),
@@ -55,14 +62,14 @@ controlInterfaceTest::~controlInterfaceTest()
void controlInterfaceTest::SetUp()
{
DLT_REGISTER_APP("Rtest","RoutingInterfacetest");
- DLT_REGISTER_CONTEXT(AudioManager,"Main","Main Context");
- DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("RoutingSendInterface Test started "));
+ DLT_REGISTER_CONTEXT(DLT_CONTEXT,"Main","Main Context");
+ DLT_LOG(DLT_CONTEXT,DLT_LOG_INFO, DLT_STRING("RoutingSendInterface Test started "));
}
void controlInterfaceTest::TearDown()
{
- DLT_UNREGISTER_CONTEXT(AudioManager);
+ DLT_UNREGISTER_CONTEXT(DLT_CONTEXT);
}
TEST_F(controlInterfaceTest,registerDomain)
@@ -467,7 +474,6 @@ TEST_F(controlInterfaceTest,ackSetSourceSoundProperty)
am_sourceID_t sourceID;
am_Domain_s domain;
am_domainID_t domainID;
- am_volume_t volume;
std::vector<am_Handle_s> handlesList;
am_Handle_s handle;
am_SoundProperty_s soundProperty;
diff --git a/AudioManagerDaemon/test/controlInterface/controlInterfaceTest.h b/AudioManagerDaemon/test/controlInterface/controlInterfaceTest.h
index 4d83b8f..a3a2a50 100644
--- a/AudioManagerDaemon/test/controlInterface/controlInterfaceTest.h
+++ b/AudioManagerDaemon/test/controlInterface/controlInterfaceTest.h
@@ -28,10 +28,6 @@
#include <gtest/gtest.h>
#include <gmock/gmock.h>
#include <dlt/dlt.h>
-#include <algorithm>
-#include <string>
-#include <vector>
-#include <set>
#include "MockInterfaces.h"
#include "DatabaseHandler.h"
#include "ControlReceiver.h"
@@ -44,41 +40,20 @@
#include "../ControlInterfaceBackdoor.h"
#include "../CommonFunctions.h"
-DLT_DECLARE_CONTEXT(AudioManager)
-using namespace testing;
-using namespace am;
+namespace am {
-using ::testing::Field;
-using ::testing::Property;
-using ::testing::Matcher;
-using ::testing::Pointee;
-using ::testing::AllOf;
-using ::testing::SafeMatcherCast;
-using ::testing::MatcherCast;
-using ::testing::DefaultValue;
-using ::testing::Eq;
-using ::testing::An;
-using ::testing::ElementsAreArray;
-using ::testing::ElementsAre;
-using ::testing::NotNull;
-using ::testing::Assign;
-using ::testing::SetArgReferee;
-using ::testing::DoAll;
-using ::testing::MatcherInterface;
-using ::testing::MatchResultListener;
-
-class controlInterfaceTest : public Test{
+class controlInterfaceTest : public ::testing::Test{
public:
controlInterfaceTest();
~controlInterfaceTest();
- std::vector<std::string> plistRoutingPluginDirs;
std::vector<std::string> plistCommandPluginDirs;
+ std::vector<std::string> plistRoutingPluginDirs;
DatabaseHandler pDatabaseHandler;
RoutingSender pRoutingSender;
CommandSender pCommandSender;
- MockRoutingSendInterface pMockRoutingInterface;
MockControlSendInterface pMockControlInterface;
+ MockRoutingSendInterface pMockRoutingInterface;
ControlSender pControlSender;
RoutingInterfaceBackdoor pRoutingInterfaceBackdoor;
CommandInterfaceBackdoor pCommandInterfaceBackdoor;
@@ -91,4 +66,6 @@ public:
void TearDown();
};
+}
+
#endif /* ROUTINGINTERFACETEST_H_ */