Change-Id: Ifb4a7c644c5599888b74895429eb2296ab2c9f57
Signed-off-by: Jon A. Cruz <jonc@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1900
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: JungYong KIM <jyong2.kim@samsung.com>
Reviewed-by: Hun-je Yeon <hunje.yeon@samsung.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
protected:
- void SetUp()
+ void SetUp()
{
TestWithMock::SetUp();
brokerInstance = ResourceBroker::getInstance();
id = 0;
}
- void TearDown()
+ void TearDown()
{
TestWithMock::TearDown();
pResource.reset();
}
};
-
+
TEST_F(ResourceBrokerTest,HostResource_ReturnNormalValueIfNormalParams)
{
MockingFunc();
- BrokerID ret;
- ASSERT_NE(ret = brokerInstance->hostResource(pResource,cb),0);
+ BrokerID ret = brokerInstance->hostResource(pResource, cb);
+ ASSERT_NE(BrokerID(0), ret);
brokerInstance->cancelHostResource(ret);
ASSERT_THROW(brokerInstance->getResourceState(id),ResourceBroker::InvalidParameterException);
}
-