Update unittest for easy setup along with the removal of ESCloudProvState
authorJihun Ha <jihun.ha@samsung.com>
Mon, 22 Aug 2016 10:49:43 +0000 (19:49 +0900)
committerMadan Lanka <lanka.madan@samsung.com>
Tue, 23 Aug 2016 08:31:58 +0000 (08:31 +0000)
In successful provisioning for cloud, ES_FOUND_ENROLLE and ES_OK are returned
in a callback function.

Change-Id: I1ab32d817ff324a777d60d2ecbb5a5a1908a4f0b
Signed-off-by: Jihun Ha <jihun.ha@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/10735
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Madan Lanka <lanka.madan@samsung.com>
service/easy-setup/enrollee/unittests/ESEnrolleeTest.cpp
service/easy-setup/mediator/richsdk/unittests/ESMediatorTest.cpp

index b782a9a..ef6611f 100755 (executable)
@@ -423,7 +423,7 @@ TEST_F(EasysetupEnrolleeTest, CloudServerProperiesProvisionedWithSuccess)
         [& cntForReceivedCallbackWithSuccess](std::shared_ptr< CloudPropProvisioningStatus > status)
         {
             // Will called twice
-            if(status->getESResult() == ES_OK)
+            if(status->getESResult() == ES_OK || status->getESResult() == ES_FOUND_ENROLLEE)
             {
                cntForReceivedCallbackWithSuccess++;
             }
index f55177b..86d83bd 100755 (executable)
@@ -465,7 +465,7 @@ TEST_F(ProvisionCloudPropertiesTest, ProvisionCloudPropertiesSucceed)
         [& cntForReceivedCallbackWithSuccess](std::shared_ptr< CloudPropProvisioningStatus > status)
         {
             // Will called twice
-            if(status->getESResult() == ES_OK)
+            if(status->getESResult() == ES_OK || status->getESResult() == ES_FOUND_ENROLLEE)
             {
                cntForReceivedCallbackWithSuccess++;
             }