unit test bug is fixed at notification provider service.
Change-Id: I83882ceb626be56fc47d5da2cb6eda60e17207e9
Signed-off-by: KIM JungYong <jyong2.kim@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/10961
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
TEST_F(NotificationProviderTest, ExpectCallbackWhenReceiveSubscribeRequestWithAccepterProvider)
{
- mocks.ExpectCallFunc(NSRequestedSubscribeCallbackEmpty).Do(
+ g_consumer = NULL;
+ mocks.OnCallFunc(NSRequestedSubscribeCallbackEmpty).Do(
[](NSConsumer * consumer)
{
std::cout << "NSRequestedSubscribeCallback" << std::endl;
std::unique_lock< std::mutex > lock{ mutexForCondition };
responseCon.wait_for(lock, std::chrono::milliseconds(1000));
+
+ EXPECT_NE((void*)g_consumer, (void*)NULL);
}
TEST_F(NotificationProviderTest, NeverCallNotifyOnConsumerByAcceptIsFalse)