Fix build fail of consumer unittest. 07/10707/2
authorKIM JungYong <jyong2.kim@samsung.com>
Mon, 22 Aug 2016 02:03:59 +0000 (11:03 +0900)
committerUze Choi <uzchoi@samsung.com>
Tue, 23 Aug 2016 01:29:10 +0000 (01:29 +0000)
When notification service build,
before unittest is commented why unittest has fail case and build error.
Fail case is resolved other patch by Jaesick.shin.
In this patch, build error is fixed.

Change-Id: Id5a588f719ae8b6eb1ac78bf987dd793da208c14
Signed-off-by: KIM JungYong <jyong2.kim@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/10707
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
service/notification/SConscript
service/notification/unittest/NSConsumerTest.cpp

index a86fe42..d9fc820 100755 (executable)
@@ -113,8 +113,8 @@ notification_env.UserInstallTargetHeader('include/NSConsumerInterface.h',\
        'service/notification', 'NSConsumerInterface.h')
 
 # Go to build Unit test
-#if target_os == 'linux':
-# SConscript('unittest/SConscript')
+if target_os == 'linux':
+    SConscript('unittest/SConscript')
 
 # Go to build sample apps
 SConscript('examples/SConscript')
index 6f23786..d60d7d8 100644 (file)
@@ -104,7 +104,7 @@ public:
         std::cout << __func__ << std::endl;
     }
 
-    static void NSSubscriptionAcceptedCallback(NSProvider *)
+    static void NSProviderChangedCallback(NSProvider *,  NSResponse)
     {
         std::cout << __func__ << std::endl;
     }
@@ -152,7 +152,7 @@ TEST_F(NotificationConsumerTest, StartConsumerPositive)
 {
     NSConsumerConfig cfg;
     cfg.discoverCb = NSProviderDiscoveredCallbackEmpty;
-    cfg.acceptedCb = NSSubscriptionAcceptedCallback;
+    cfg.changedCb = NSProviderChangedCallback;
     cfg.messageCb = NSNotificationReceivedCallbackEmpty;
     cfg.syncInfoCb = NSSyncCallbackEmpty;
     EXPECT_EQ(NS_OK, NSStartConsumer(cfg));
@@ -174,7 +174,7 @@ TEST_F(NotificationConsumerTest, DiscoverProviderWithNonAccepterWhenStartedConsu
 
     NSConsumerConfig cfg;
     cfg.discoverCb = NSProviderDiscoveredCallbackEmpty;
-    cfg.acceptedCb = NSSubscriptionAcceptedCallback;
+    cfg.changedCb = NSProviderChangedCallback;
     cfg.messageCb = NSNotificationReceivedCallbackEmpty;
     cfg.syncInfoCb = NSSyncCallbackEmpty;
     NSStartConsumer(cfg);
@@ -208,7 +208,7 @@ TEST_F(NotificationConsumerTest, DiscoverProviderWithNonAccepterWhenStartedConsu
 
     NSConsumerConfig cfg;
     cfg.discoverCb = NSProviderDiscoveredCallbackEmpty;
-    cfg.acceptedCb = NSSubscriptionAcceptedCallback;
+    cfg.changedCb = NSProviderChangedCallback;
     cfg.messageCb = NSNotificationReceivedCallbackEmpty;
     cfg.syncInfoCb = NSSyncCallbackEmpty;
     NSStartConsumer(cfg);
@@ -283,7 +283,7 @@ TEST_F(NotificationConsumerTest, ExpectReceiveNotificationWithAccepterisProvider
 
     NSConsumerConfig cfg;
     cfg.discoverCb = NSProviderDiscoveredCallbackEmpty;
-    cfg.acceptedCb = NSSubscriptionAcceptedCallback;
+    cfg.changedCb = NSProviderChangedCallback;
     cfg.messageCb = NSNotificationReceivedCallbackEmpty;
     cfg.syncInfoCb = NSSyncCallbackEmpty;
     NSStartConsumer(cfg);