From a661fa9d286b229b9e1afd6b789dd1fa8323487f Mon Sep 17 00:00:00 2001
From: AHMADABB <AHMADABB@IM00400.etsihq.org>
Date: Mon, 5 Mar 2018 17:38:00 +0100
Subject: [PATCH] Gitignore adds + first Draft of ATS security

---
 .gitignore                                    |   1 +
 .settings/.gitignore                          |   1 +
 ...2M_Testcases_CSE_Release_2_SEC_STF531.ttcn | 107 ++++++++++++++++++
 3 files changed, 109 insertions(+)
 create mode 100644 .settings/.gitignore
 create mode 100644 OneM2M_Testcases_CSE_Release_2_SEC_STF531.ttcn

diff --git a/.gitignore b/.gitignore
index d8fe4fa..239d9b3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
 /.project
+/.classpath
diff --git a/.settings/.gitignore b/.settings/.gitignore
new file mode 100644
index 0000000..22d458a
--- /dev/null
+++ b/.settings/.gitignore
@@ -0,0 +1 @@
+/com.testingtech.ttworkbench.core.prefs
diff --git a/OneM2M_Testcases_CSE_Release_2_SEC_STF531.ttcn b/OneM2M_Testcases_CSE_Release_2_SEC_STF531.ttcn
new file mode 100644
index 0000000..01c49e1
--- /dev/null
+++ b/OneM2M_Testcases_CSE_Release_2_SEC_STF531.ttcn
@@ -0,0 +1,107 @@
+/**
+ *  Copyright Notification
+ *  No part of this document may be reproduced, in an electronic retrieval system or otherwise, except as authorized by written permission.
+ *  The copyright and the foregoing restriction extend to reproduction in all media.
+ *  © 2016, oneM2M Partners Type 1 (ARIB, ATIS, CCSA, ETSI, TIA, TSDSI, TTA, TTC).
+ *  All rights reserved.
+ *  
+ *  @author     ETSI
+ *  @version    $URL: https://oldforge.etsi.org/svn/oneM2M/branches/Release1/ttcn/OneM2M_Testcases.ttcn $
+ *              $Id: OneM2M_Testcases.ttcn 347 2017-08-11 08:48:20Z reinaortega $
+ *  @desc       Module containing test cases for oneM2M
+ *
+ */
+module OneM2M_Testcases_CSE_Release_2_SEC_STF531 {
+
+	import from OneM2M_TestSystem all;
+	import from OneM2M_Templates all;
+	import from OneM2M_Types all;//{type XSD.ID};
+	import from OneM2M_TypesAndValues all;
+	import from OneM2M_Pixits all;
+	import from LibCommon_Time all;
+	import from OneM2M_Pics all;
+	import from OneM2M_Functions all;
+	import from OneM2M_PermutationFunctions all;
+	import from XSD all;
+	
+	//Demos used for validation purposes
+	group oneM2M_demos {
+	
+		group helpingTestCases {//These are not part of the test suite, just for verification purposes
+			
+			testcase TC_DELETE_RESOURCES() runs on AeSimu system CseSystem {
+				
+				timer t_ac := 5.0;
+				var integer i; 
+				var XSD.ID v_resourceAddress;
+				var RequestPrimitive v_request;
+				map(self:mcaPort, system:mcaPort); 
+					
+				for (i:=0; i<lengthof(PX_RESOURCES_TO_BE_DELETED); i:= i+1) {  
+					
+					v_resourceAddress := f_getResourceAddress() & "/" & PX_RESOURCES_TO_BE_DELETED[i]; 
+						
+					v_request := valueof(m_delete(v_resourceAddress, PX_SUPER_AE_ID));
+					    
+					mcaPort.send(m_request(v_request));
+					
+					t_ac.start;
+					alt {
+						[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) {
+							t_ac.stop;
+							log(__SCOPE__ & ":Resource deleted");
+							setverdict(pass);
+						}
+						[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
+							t_ac.stop;
+							log(__SCOPE__ & ":Error while deleting resource");
+							setverdict(fail);
+						}
+						[] mcaPort.receive {
+							t_ac.stop;
+							log(__SCOPE__ & ":Unexpected message received");
+							setverdict(inconc);
+						}
+						[] t_ac.timeout {
+							log(__SCOPE__ & ":No answer while deleting resource");
+							setverdict(inconc);
+						}	
+					}	
+				}
+			
+				unmap(self:mcaPort, system:mcaPort); 
+				stop;
+			}	
+		
+		}//end group helpingTestCases
+	
+	}//end group oneM2M_demos
+	
+	group CSE {
+		
+		group ESPrim {
+			
+			testcase TC_CSE_ESC_001() runs on AeSimu system CseSystem {
+				var MsgIn v_response;
+				var integer v_aeIndex := -1;
+				var template RequestPrimitive v_requestNotify := m_notifyEmpty;
+				
+				//Test component configuration
+				f_cf02Up();
+
+				// Test adapter configuration
+
+				// Preamble
+				v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
+				
+				//TestBody
+				v_requestNotify.primitiveContent := {securityInfo := m_contentSecurityInfo(int6)};
+				v_requestNotify.primitiveContent.securityInfo.escertkeMessage := ''O;
+			}
+		
+		} // end of group ESPrim
+			
+	}//end group CSE
+
+	
+}
-- 
GitLab