std::unique_lock< std::mutex > lock { mutexForCondition };
responseCon.wait_for(lock, g_waitForResponse);
+ delete msg;
+
EXPECT_EQ(expectTrue, true);
}
OIC::Service::NSProviderService::getInstance()->sendMessage(msg);
std::unique_lock< std::mutex > lock { mutexForCondition };
responseCon.wait_for(lock, g_waitForResponse);
+
+ delete msg;
}
TEST_F(NotificationProviderServiceTest, ExpectCallbackSyncOnReadToConsumer)
OIC::Service::NSSyncInfo::NSSyncType::NS_SYNC_READ);
std::unique_lock< std::mutex > lock { mutexForCondition };
responseCon.wait_for(lock, g_waitForResponse);
+
+ delete msg;
}
TEST_F(NotificationProviderServiceTest, ExpectCallbackSyncOnReadFromConsumer)
g_consumerSimul.syncToProvider(type, id, msg->getProviderId());
std::unique_lock< std::mutex > lock { mutexForCondition };
responseCon.wait(lock);
+
+ delete msg;
}
TEST_F(NotificationProviderServiceTest, ExpectEqualAddedTopicsAndRegisteredTopics)
std::vector<OC::OCRepresentation> postTopicArr;
for(std::vector<OC::OCRepresentation>::iterator it = topicArr.begin();
- it != topicArr.end(); ++it) {
+ it != topicArr.end(); ++it)
+ {
/* std::cout << *it; ... */
OC::OCRepresentation topic = *it;
OC::OCRepresentation postTopic;