From 30754a4100cf18b6d0b689bafbb23583d165f81b Mon Sep 17 00:00:00 2001 From: Jens Lorenz Date: Fri, 25 Nov 2016 15:29:14 +0100 Subject: AMCore: Fix deamon to update interrupt state of source. Signed-off-by: Toshiaki Isogai --- .../test/AmMapHandlerTest/CAmMapHandlerTest.cpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'AudioManagerCore/test/AmMapHandlerTest') diff --git a/AudioManagerCore/test/AmMapHandlerTest/CAmMapHandlerTest.cpp b/AudioManagerCore/test/AmMapHandlerTest/CAmMapHandlerTest.cpp index 4c91d2a..559764d 100644 --- a/AudioManagerCore/test/AmMapHandlerTest/CAmMapHandlerTest.cpp +++ b/AudioManagerCore/test/AmMapHandlerTest/CAmMapHandlerTest.cpp @@ -480,6 +480,26 @@ TEST_F(CAmMapHandlerTest,sourceState) ASSERT_EQ(listSources[0].sourceState, SS_ON); } +TEST_F(CAmMapHandlerTest,sourceInterruptState) +{ + am_Source_s source; + am_sourceID_t sourceID; + std::vector listSources; + pCF.createSource(source); + source.interruptState = IS_OFF; + + //prepare the test + + ASSERT_EQ(E_OK, pDatabaseHandler.enterSourceDB(source,sourceID)); + + //change the source interrupt state + ASSERT_EQ(E_OK, pDatabaseHandler.changeSourceInterruptState(sourceID,IS_INTERRUPTED)); + + //read out the changed values + ASSERT_EQ(E_OK, pDatabaseHandler.getListSources(listSources)); + ASSERT_EQ(listSources[0].interruptState, IS_INTERRUPTED); +} + TEST_F(CAmMapHandlerTest,sinkVolumeChange) { am_Sink_s sink; -- cgit v1.2.1