summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksandar Donchev <aleksander.donchev@partner.bmw.de>2013-09-10 10:25:37 (GMT)
committerChristian Linke <Christian.Linke@bmw.de>2013-09-10 10:35:47 (GMT)
commitbd532738184040b4367e79dcb8a804248e62f0fc (patch)
treefe35db18256bfb5ca4e95de1b216d869486e6ebb
parentdb8583483517265e9d6b0fdb3add2cad2cdbcca9 (diff)
downloadaudiomanager-bd532738184040b4367e79dcb8a804248e62f0fc.tar.gz
test ist now working
Signed-off-by: Christian Linke <christian.linke@bmw.de>
-rw-r--r--PluginRoutingInterfaceCAPI/test/CAmRoutingInterfaceCAPITests.cpp47
1 files changed, 26 insertions, 21 deletions
diff --git a/PluginRoutingInterfaceCAPI/test/CAmRoutingInterfaceCAPITests.cpp b/PluginRoutingInterfaceCAPI/test/CAmRoutingInterfaceCAPITests.cpp
index d70cc78..5b75f7d 100644
--- a/PluginRoutingInterfaceCAPI/test/CAmRoutingInterfaceCAPITests.cpp
+++ b/PluginRoutingInterfaceCAPI/test/CAmRoutingInterfaceCAPITests.cpp
@@ -1522,6 +1522,32 @@ ACTION(actionRegister2){
arg1=TEST_ID_2;
}
+TEST_F(CAmRoutingInterfaceCAPITests, confirmRoutingRundown)
+{
+ ASSERT_TRUE(env->mIsServiceAvailable);
+ if(env->mIsServiceAvailable)
+ {
+ CallStatus callStatus = CallStatus::NOT_AVAILABLE, domainstatus = CallStatus::NOT_AVAILABLE;
+ org::genivi::am::am_domainID_t domainID;
+ am_Error_e error = E_OK;
+ org::genivi::am::am_Error_e CAPIError;
+ std::string name("test domain name");
+ std::string busname("busname");
+ std::string nodename("nodename");
+ org::genivi::am::am_Domain_s domainData(0, name, busname, nodename, false, false, org::genivi::am::am_DomainState_e::DS_CONTROLLED);
+ ON_CALL(*env->mpRoutingReceive, registerDomain(_,_)).WillByDefault(Return(E_OK));
+ EXPECT_CALL(*env->mpRoutingReceive, registerDomain(_, _));
+ env->mProxy->registerDomain(domainData,"sd","sds","sd",domainstatus,domainID,CAPIError);
+ ASSERT_EQ( domainstatus, CallStatus::SUCCESS );
+ env->mpPlugin->setRoutingRundown(5);
+ EXPECT_CALL(*env->mpRoutingReceive, confirmRoutingRundown(5,E_OK)).Times(1);
+ env->mProxy->confirmRoutingRundown(name, callStatus);
+ EXPECT_CALL(*env->mpRoutingReceive, deregisterDomain(_));
+ env->mProxy->deregisterDomain(domainID,domainstatus,CAPIError);
+ ASSERT_EQ( callStatus, CallStatus::SUCCESS );
+ }
+ EXPECT_TRUE(Mock::VerifyAndClearExpectations(env->mpRoutingReceive));
+}
/** CAmRoutingSenderCAPITests
* The following methods must be executed in the given order.
@@ -2188,24 +2214,3 @@ TEST_F(CAmRoutingSenderCAPITests, TestDomain_deregisterDomain)
EXPECT_TRUE(Mock::VerifyAndClearExpectations(env->mpRoutingReceive));
}
-TEST_F(CAmRoutingInterfaceCAPITests, confirmRoutingRundown)
-{
- ASSERT_TRUE(env->mIsServiceAvailable);
- if(env->mIsServiceAvailable)
- {
- CallStatus callStatus = CallStatus::NOT_AVAILABLE, domainstatus;
- org::genivi::am::am_domainID_t domainID;
- am_Error_e error = E_OK;
- org::genivi::am::am_Error_e CAPIError;
- std::string testID = "myDomain";
- org::genivi::am::am_Domain_s domainData;
- ON_CALL(*env->mpRoutingReceive, registerDomain(_,_)).WillByDefault(Return(E_OK));
- env->mProxy->registerDomain(domainData,"sd","sds","sd",domainstatus,domainID,CAPIError);
- env->mpPlugin->setRoutingRundown(5);
- EXPECT_CALL(*env->mpRoutingReceive, confirmRoutingRundown(5,E_OK)).Times(1);
- env->mProxy->confirmRoutingRundown(testID, callStatus);
- env->mProxy->deregisterDomain(domainID,domainstatus,CAPIError);
- ASSERT_EQ( callStatus, CallStatus::SUCCESS );
- }
- EXPECT_TRUE(Mock::VerifyAndClearExpectations(env->mpRoutingReceive));
-}