Bug fixes unittest for ExpectCallNotifyOnConsumerByAcceptIsTrue.
authorjaesick.shin <jaesick.shin@samsung.com>
Tue, 23 Aug 2016 00:57:47 +0000 (09:57 +0900)
committerUze Choi <uzchoi@samsung.com>
Tue, 23 Aug 2016 11:24:48 +0000 (11:24 +0000)
change new NSMessage to NSCreateMessage.

Change-Id: Ic6639f936504a40fe5b40a2ed0efdabf4d6121c7
Signed-off-by: jaesick.shin <jaesick.shin@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/10751
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
service/notification/unittest/NSProviderTest.cpp

index 442739d..a3fce33 100755 (executable)
@@ -255,14 +255,14 @@ TEST_F(NotificationProviderTest, ExpectCallNotifyOnConsumerByAcceptIsTrue)
                 if (id == msgID)
                 {
                     std::cout << "ExpectCallNotifyOnConsumerByAcceptIsTrue" << std::endl;
+                    responseCon.notify_all();
                 }
-                responseCon.notify_all();
             });
 
     NSAcceptSubscription(g_consumer, true);
 
-    NSMessage * msg = new NSMessage();
-    msgID = 10;
+    NSMessage * msg = NSCreateMessage();
+    msgID = (int)msg->messageId;
     msg->title = strdup(std::string("Title").c_str());
     msg->contentText = strdup(std::string("ContentText").c_str());
     msg->sourceName = strdup(std::string("OCF").c_str());