From 746cc7cf9c4bcf5f133db87f27832d276c0d829e Mon Sep 17 00:00:00 2001
From: reinaortega <miguelangel.reinaortega@etsi.org>
Date: Wed, 25 Sep 2019 09:29:28 +0200
Subject: [PATCH] Addition of PICS_SUBSCRIPTION_VERIFICATION and usage

Signed-off-by: reinaortega <miguelangel.reinaortega@etsi.org>
---
 LibOneM2M/OneM2M_Pics.ttcn          |  8 ++++++++
 OneM2M_TestControl_IN_profile.ttcn  |  4 ++--
 OneM2M_TestControl_MN_profile.ttcn  |  4 ++--
 OneM2M_Testcases_CSE_Release_2.ttcn | 13 +++++++++++--
 4 files changed, 23 insertions(+), 6 deletions(-)

diff --git a/LibOneM2M/OneM2M_Pics.ttcn b/LibOneM2M/OneM2M_Pics.ttcn
index 2304e73..5537178 100644
--- a/LibOneM2M/OneM2M_Pics.ttcn
+++ b/LibOneM2M/OneM2M_Pics.ttcn
@@ -148,6 +148,14 @@ module OneM2M_Pics {
 			modulepar boolean PICS_NON_BLOCKING_REQUEST_SYNCH := true;	
 			modulepar boolean PICS_NON_BLOCKING_REQUEST_ASYNCH := true;
 		}
+		
+		/**
+		 * @desc Subscription capabilities
+		 * @see  oneM2M TS-0017 A.5.4-1
+		 */
+		group Subscription_capabilities{
+			modulepar boolean PICS_SUBSCRIPTION_VERIFICATION := true;	
+		}
 	}
 	
 }  // end of module
diff --git a/OneM2M_TestControl_IN_profile.ttcn b/OneM2M_TestControl_IN_profile.ttcn
index eac5d94..cf0f18c 100644
--- a/OneM2M_TestControl_IN_profile.ttcn
+++ b/OneM2M_TestControl_IN_profile.ttcn
@@ -368,8 +368,8 @@ module OneM2M_TestControl_IN_profile {
 		if(true) {execute (TC_CSE_SUB_DEL_001());}
 		if(true) {execute (TC_CSE_SUB_DEL_002());}
 		if(true) {execute (TC_CSE_SUB_DEL_003());}
-		if(true) {execute (TC_CSE_SUB_NTF_001());}
-		if(true) {execute (TC_CSE_SUB_NTF_002());}
+		if(PICS_SUBSCRIPTION_VERIFICATION) {execute (TC_CSE_SUB_NTF_001());}
+		if(PICS_SUBSCRIPTION_VERIFICATION) {execute (TC_CSE_SUB_NTF_002());}
 		if(true) {execute (TC_CSE_SUB_NTF_003());}
 
 		if(true) {execute (TC_CSE_SUB_CRE_004());}
diff --git a/OneM2M_TestControl_MN_profile.ttcn b/OneM2M_TestControl_MN_profile.ttcn
index 959590b..dd89e4f 100644
--- a/OneM2M_TestControl_MN_profile.ttcn
+++ b/OneM2M_TestControl_MN_profile.ttcn
@@ -375,8 +375,8 @@ module OneM2M_TestControl_MN_profile {
 		if(true) {execute (TC_CSE_SUB_DEL_001());}
 		if(true) {execute (TC_CSE_SUB_DEL_002());}
 		if(true) {execute (TC_CSE_SUB_DEL_003());}
-		if(true) {execute (TC_CSE_SUB_NTF_001());}
-		if(true) {execute (TC_CSE_SUB_NTF_002());}
+		if(PICS_SUBSCRIPTION_VERIFICATION) {execute (TC_CSE_SUB_NTF_001());}
+		if(PICS_SUBSCRIPTION_VERIFICATION) {execute (TC_CSE_SUB_NTF_002());}
 		if(true) {execute (TC_CSE_SUB_NTF_003());}
 
 		if(true) {execute (TC_CSE_SUB_CRE_004());}
diff --git a/OneM2M_Testcases_CSE_Release_2.ttcn b/OneM2M_Testcases_CSE_Release_2.ttcn
index bd867ee..26049d4 100644
--- a/OneM2M_Testcases_CSE_Release_2.ttcn
+++ b/OneM2M_Testcases_CSE_Release_2.ttcn
@@ -16,6 +16,7 @@ module OneM2M_Testcases_CSE_Release_2 {
 	import from OneM2M_Types all;//{type XSD.ID};
 	import from OneM2M_TypesAndValues all;
 	import from OneM2M_Pixits all;
+	import from OneM2M_Pics all;
 	import from LibCommon_Time all;
 	import from OneM2M_Functions all;
 	import from OneM2M_PermutationFunctions all;
@@ -2195,7 +2196,11 @@ module OneM2M_Testcases_CSE_Release_2 {
 					var integer v_ae2Index := -1;
 						
 					// Test control
-
+					if(not(PICS_SUBSCRIPTION_VERIFICATION)) {
+						setverdict(inconc, __SCOPE__ & ": Subscription verification support is required to run this test case");
+						stop;
+					}
+					
 					// Test component configuration
 					f_cf01Up(true);
 										
@@ -2270,7 +2275,11 @@ module OneM2M_Testcases_CSE_Release_2 {
 					var integer v_ae2Index := -1;
 						
 					// Test control
-
+					if(not(PICS_SUBSCRIPTION_VERIFICATION)) {
+						setverdict(inconc, __SCOPE__ & ": Subscription verification support is required to run this test case");
+						stop;
+					}
+					
 					// Test component configuration
 					f_cf01Up(true);
 										
-- 
GitLab