OneM2M_Testcases_CSE_Release_2.ttcn 188 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
/**
 *  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 {

	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));
					    
46
					mcaPort.send(f_getMsgOutPrimitive(m_request(v_request)));
47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111
					
					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 Generic {
			
			group Create {
				
			} // end of group Create
			
			group Retrieve {
			} // end of group Retrieve
			
			group Update {
			} // end of group Update
			
			group Delete {
			} // end of group Delete
		
		} // end of group Generic
		
		group Registration {
			
			group Create{
				
				/**
				 * @desc Check that IUT accepts  a CSE registration request with OPTIONAL_ATTRIBUTE attribute
				 * 
				 */
				group g_CSE_REG_CRE_028 {
				
					testcase TC_CSE_REG_CRE_028_RN() runs on Tester system CseSystem {
						 //Local variables
						 var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
112
						
113 114
						 var RequestPrimitive v_request;
						 var template PrimitiveContent v_contentResponse;
115 116
						 v_cse1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_CSE1));
						v_cse1.done;
117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132
						 v_request := valueof(m_createRemoteCSEBase);
						 v_request.primitiveContent.remoteCSE.cseType := int2;	//MN_CSE
						 v_request.primitiveContent.remoteCSE.resourceName := c_defaultRemoteCSEResourceName;
	
						 v_contentResponse.remoteCSE := mw_contentRemoteCSEBase;
						 v_contentResponse.remoteCSE.cseType := int2;	//MN_CSE
					     v_contentResponse.remoteCSE.resourceName := c_defaultRemoteCSEResourceName;
	
						 v_cse1.start(f_CSE_REG_CRE_028(v_request, v_contentResponse));
						 v_cse1.done;
						
					}
					
					testcase TC_CSE_REG_CRE_028_ET() runs on Tester system CseSystem {
						 //Local variables
						 var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
133
						
134 135
						 var RequestPrimitive v_request;
						 var template PrimitiveContent v_contentResponse;
136 137
						 v_cse1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_CSE1));
						v_cse1.done;
138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172
						 v_request := valueof(m_createRemoteCSEBase);
						 v_request.primitiveContent.remoteCSE.cseType := int2;	//MN_CSE
						 v_request.primitiveContent.remoteCSE.expirationTime := "20301231T012345";
	
						 v_contentResponse.remoteCSE := mw_contentRemoteCSEBase;
						 v_contentResponse.remoteCSE.cseType := int2;	//MN_CSE
						 v_contentResponse.remoteCSE.expirationTime := "20301231T012345";
	
						 v_cse1.start(f_CSE_REG_CRE_028(v_request, v_contentResponse));
						 v_cse1.done;
		
					}
					
				}//end g_CSE_REG_CRE_028
			
			}	//end group Create
			
			group Retrieve{
				
				
			}//end group Retrieve
			
			group Update{
			
				/**
				 * @desc Check that the IUT accepts an update request of <remoteCSE> resource with OPTIONAL_ATTRIBUTE.
				 * 
				 */
				 
				group g_CSE_REG_UPD_002 {
					
					testcase TC_CSE_REG_UPD_002_ET() runs on Tester system CseSystem {
						// Local variables
						var template RequestPrimitive v_updateRequest := m_updateRemoteCSEBase;	
						var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
173 174
						v_cse1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_CSE1));
						v_cse1.done;
175 176 177 178 179 180 181 182 183 184 185 186
    						
						v_updateRequest.primitiveContent.remoteCSE.expirationTime := "20301231T012345";
	
						v_cse1.start(f_CSE_REG_UPD_002(v_updateRequest));
						v_cse1.done;
						
					}
					
					testcase TC_CSE_REG_UPD_002_RR() runs on Tester system CseSystem {
						// Local variables
						var template RequestPrimitive v_updateRequest := m_updateRemoteCSEBase;	
						var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
187 188
						v_cse1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_CSE1));
						v_cse1.done;
189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208

						v_updateRequest.primitiveContent.remoteCSE.requestReachability := true;

						v_cse1.start(f_CSE_REG_UPD_002(v_updateRequest));
						v_cse1.done;

					}
							
				} //end g_CSE_REG_UPD_002
			    
			}// end group Update
			
			group Delete{
			
			}// end group Delete
	  	  	
		}//end Registration
		
		group Data_Management_and_Repository {
						
209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327
			group g_CSE_DMR_001 {
		
				/**
				 * @desc Check that the IUT rejects a Non-Blocking Synchronous Request if the IUT does not support the <request> resource
				 * 
				 */
				testcase TC_CSE_DMR_001_CRE() runs on Tester system CseSystem {
					// Local variables
					var template RequestPrimitive v_createRequest := m_createContainerBase;
					var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
			
					v_cse1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_CSE1));
					v_cse1.done;
					v_cse1.start(f_CSE_DMR_001(v_createRequest)); //Create Container
					v_cse1.done;
			
				}
				
				testcase TC_CSE_DMR_001_UPD() runs on Tester system CseSystem {
					// Local variables
					var template RequestPrimitive v_createRequest := m_createContainerBase;
					var template RequestPrimitive v_updateRequest := m_updateContainerBase;
					var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
					var Labels v_labels_1 := {"VALUE_1"};
			
					v_cse1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_CSE1));
					v_cse1.done;
					v_updateRequest.primitiveContent.container.labels := v_labels_1;
			
					v_cse1.start(f_CSE_DMR_001(v_updateRequest)); //Update Container
					v_cse1.done;
	  
				}

				testcase TC_CSE_DMR_001_RET() runs on Tester system CseSystem {
					// Local variables
					var template RequestPrimitive v_createRequest := m_createContainerBase;
					var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
			
					v_cse1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_CSE1));
					v_cse1.done;
					v_cse1.start(f_CSE_DMR_001(m_retrieve("NotInitialized", "NotInitialized"))); //Retrieve Container
					v_cse1.done;
	
				}
		
				testcase TC_CSE_DMR_001_DEL() runs on Tester system CseSystem {
					// Local variables
					var template RequestPrimitive v_createRequest := m_createContainerBase;
					var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
			
					v_cse1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_CSE1));
					v_cse1.done;
					v_cse1.start(f_CSE_DMR_001(m_delete("NotInitialized", "NotInitialized"))); //Delete Container
					v_cse1.done;

				}

			}// end group g_CSE_DMR_001
			
			group g_CSE_DMR_002 {
				
				/**
				 * @desc Check that the IUT rejects a Non-Blocking Synchronous Request if the IUT does not support the <request> resource
				 * 
				 */
				testcase TC_CSE_DMR_002_CRE() runs on Tester system CseSystem {
					// Local variables
					var template RequestPrimitive v_createRequest := m_createContainerBase;
					var AeSimu v_ae1 := AeSimu.create("AE1") alive;
				
					v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
					v_ae1.done;
					v_ae1.start(f_CSE_DMR_002(v_createRequest)); //Create Container
					v_ae1.done;
				
				}
					
				testcase TC_CSE_DMR_002_UPD() runs on Tester system CseSystem {
					// Local variables
					var template RequestPrimitive v_createRequest := m_createContainerBase;
					var template RequestPrimitive v_updateRequest := m_updateContainerBase;
					var AeSimu v_ae1 := AeSimu.create("AE1") alive;
					var Labels v_labels_1 := {"VALUE_1"};
				
					v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
					v_ae1.done;
					v_updateRequest.primitiveContent.container.labels := v_labels_1;
				
					v_ae1.start(f_CSE_DMR_002(v_updateRequest)); //Update Container
					v_ae1.done;
		  
				}
	
				testcase TC_CSE_DMR_002_RET() runs on Tester system CseSystem {
					// Local variables
					var template RequestPrimitive v_createRequest := m_createContainerBase;
					var AeSimu v_ae1 := AeSimu.create("AE1") alive;
				
					v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
					v_ae1.done;
					v_ae1.start(f_CSE_DMR_002(m_retrieve("NotInitialized", "NotInitialized"))); //Retrieve Container
					v_ae1.done;
		
				}
			
				testcase TC_CSE_DMR_002_DEL() runs on Tester system CseSystem {
					// Local variables
					var template RequestPrimitive v_createRequest := m_createContainerBase;
					var AeSimu v_ae1 := AeSimu.create("AE1") alive;
				
					v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
					v_ae1.done;
					v_ae1.start(f_CSE_DMR_002(m_delete("NotInitialized", "NotInitialized"))); //Delete Container
					v_ae1.done;
	
				}
			}// end group g_CSE_DMR_002
			
328 329 330 331 332 333 334 335
			group Create {
				
				group g_CSE_DMR_CRE_001 {
					
					/**
					 * @desc Check that the IUT accepts the creation of a RESOURCE_TYPE resource on the TARGET_RESOURCE_ADDRESS of type PARENT_RESOURCE_TYPE with resource name not provided
					 * 
					 */
336
					testcase TC_CSE_DMR_CRE_001_PCH_AE() runs on Tester system CseSystem {
337
						// Local variables
338
						var template RequestPrimitive v_createRequest := m_createPollingChannelBase;
339 340
						var ResponsePrimitive v_responsePrimitive;
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
341 342
						v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
						v_ae1.done;
343
						
344 345 346 347
						
						v_createRequest.primitiveContent.pollingChannel.resourceName := omit;

						v_ae1.start(f_CSE_DMR_CRE_001(int15, v_createRequest, m_createAeAux(omit,omit)));//PollingChannel
348 349 350
						v_ae1.done;
						
						 
351
												
352
						if(getverdict == pass){ v_responsePrimitive := f_getResponsePrimitive(v_ae1);
353
							if(not ispresent(v_responsePrimitive.primitiveContent.pollingChannel.resourceName)){
354
								setverdict(fail, __SCOPE__ & ": Error, resourceName attribute not provided");
355 356 357 358 359
							}
						}
						
					}
					
360 361 362 363 364 365 366 367 368
				} // end g_CSE_DMR_CRE_001
								
				group g_CSE_DMR_CRE_002 {
					
					/**
					 * @desc Check that the IUT accepts the creation of a RESOURCE_TYPE resource with a non-existing resource name provided by AE
					 * 
					 */
					testcase TC_CSE_DMR_CRE_002_PCH() runs on Tester system CseSystem {
369 370 371
						// Local variables
						var ResponsePrimitive v_responsePrimitive;
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
372 373
						v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
						v_ae1.done;
374 375
			
						v_ae1.start(f_CSE_DMR_CRE_002(int15, m_createPollingChannelBase));//Pollingchannel
376 377 378
						v_ae1.done;
						
						 
379
												
380
						if(getverdict == pass){ v_responsePrimitive := f_getResponsePrimitive(v_ae1);
381
							if(not ispresent(v_responsePrimitive.primitiveContent.pollingChannel.resourceName)){
382
								setverdict(fail, __SCOPE__ & ": Error, resourceName attribute not provided");
383 384 385 386
							} else {
								if(v_responsePrimitive.primitiveContent.pollingChannel.resourceName != c_defaultPollingChannelResourceName){
									setverdict(fail, __SCOPE__ & ": Error, resourceName attribute not correct");
								}
387 388 389
							}
						}
					}
390 391
					
				}// end group g_CSE_DMR_CRE_002
392
				
393 394 395 396 397 398 399 400
				group g_CSE_DMR_CRE_003 {
					
					/**
					 * @desc Check that the IUT rejects the creation of a RESOURCE_TYPE resource with an existing resource name provided by AE
					 * 
					 */
					testcase TC_CSE_DMR_CRE_003_PCH() runs on Tester system CseSystem {
						// Local variables                        
401
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
402 403
						v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
						v_ae1.done;
404 405

						v_ae1.start(f_CSE_DMR_CRE_003(int15, m_createPollingChannelBase));//Pollingchannel
406 407 408
						v_ae1.done;
					}
					
409 410 411 412 413 414 415 416 417
				}// end group g_CSE_DMR_CRE_003
				
				group g_CSE_DMR_CRE_004 {
					
					/**
					 * @desc Check that the IUT rejects the creation of a RESOURCE_TYPE resource when AE has no privileges
					 * 
					 */
					testcase TC_CSE_DMR_CRE_004_PCH() runs on Tester system CseSystem {
418
						// Local variables
419
                        
420
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
421 422
						v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
						v_ae1.done;
423

424
						v_ae1.start(f_CSE_DMR_CRE_004(int15, m_createPollingChannelBase));//Pollingchannel
425 426 427
						v_ae1.done;
					}
					
428 429 430 431 432 433 434 435 436
				}// end group g_CSE_DMR_CRE_004
				
				group g_CSE_DMR_CRE_006 {
					
					/**
					 * @desc Check that the IUT returns a default value to RW ATTRIBUTE in the response of a RESOURCE_TYPE resource CREATE Request where no a RW ATTRIBUTE is provided by AE
					 * 
					 */
					testcase TC_CSE_DMR_CRE_006_CNT_MNI() runs on Tester system CseSystem {
437
						// Local variables
438
						var template RequestPrimitive v_createRequest := m_createContainerBase;
439 440
						var ResponsePrimitive v_responsePrimitive;
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
441
		
442 443
						v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
						v_ae1.done;
444 445 446
						v_ae1.start(f_CSE_DMR_CRE_006(int3, v_createRequest));		
						v_ae1.done;		 
														
447
						if(getverdict == pass){ v_responsePrimitive := f_getResponsePrimitive(v_ae1);
448 449 450 451
							if(not ispresent(v_responsePrimitive.primitiveContent.container.maxNrOfInstances)){
								setverdict(fail, __SCOPE__, ": Error, maxNrOfInstances attribute not provided");
							} 
						}	
452
					}
453 454
	
					testcase TC_CSE_DMR_CRE_006_CNT_MBS() runs on Tester system CseSystem {
455
						// Local variables
456
						var template RequestPrimitive v_createRequest := m_createContainerBase;
457 458
						var ResponsePrimitive v_responsePrimitive;
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
459
		
460 461
						v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
						v_ae1.done;
462
						v_ae1.start(f_CSE_DMR_CRE_006(int3, v_createRequest));
463
						v_ae1.done;
464
																				
465
						if(getverdict == pass){ v_responsePrimitive := f_getResponsePrimitive(v_ae1);
466 467 468 469 470
							if(not ispresent(v_responsePrimitive.primitiveContent.container.maxByteSize)){
								setverdict(fail, __SCOPE__, ": Error, maxByteSize attribute not provided");
							} 
						}	
		  
471
					}
472
	
473 474
					testcase TC_CSE_DMR_CRE_006_CNT_MIA() runs on Tester system CseSystem {
						// Local variables
475 476
						var template RequestPrimitive v_createRequest := m_createContainerBase;
						var ResponsePrimitive v_responsePrimitive;
477 478 479 480
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
								
						v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
						v_ae1.done;
481
						
482 483 484 485 486 487 488 489
						v_ae1.start(f_CSE_DMR_CRE_006(int3, v_createRequest));
						v_ae1.done;		 
														
						if(getverdict == pass){ v_responsePrimitive := f_getResponsePrimitive(v_ae1);
							if(not ispresent(v_responsePrimitive.primitiveContent.container.maxInstanceAge)){
								setverdict(fail, __SCOPE__, ": Error, maxInstanceAge attribute not provided");
							} 
						}	
490 491
					}
					
492 493 494 495 496 497 498 499 500 501 502 503 504 505
				}// end group g_CSE_DMR_CRE_006
				
				group g_CSE_DMR_CRE_007 {
					
					/**
					 * @desc Checks that the IUT accepts a newly created RESOURCE_TYPE when the currentNrOfInstances exceeds the field value set in maxNrOfInstances in the PARENT_RESOURCE_TYPE resource by removing enough of the oldest RESOURCE_TYPE resources to allow the creation of the new RESOURCE_TYPE resource
					 * 
					 */
					testcase TC_CSE_DMR_CRE_007_CNT_CIN() runs on Tester system CseSystem {
						// Local variables		
						var template RequestPrimitive v_createRequestContainer := m_createContainerBase;
						var template RequestPrimitive v_createRequestContentInstance1 := m_createContentInstanceBase;
						var template RequestPrimitive v_createRequestContentInstance2 := m_createContentInstanceBase;
						const integer c_maxNumberOfInstances := 1;	
506
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
507
						
508 509
						v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
						v_ae1.done;
510 511
						v_createRequestContainer.primitiveContent.container.maxNrOfInstances := c_maxNumberOfInstances;
						v_createRequestContentInstance2.primitiveContent.contentInstance.resourceName := c_defaultContentInstanceResourceName & "2";	//Resource 2
512

513 514
						v_ae1.start(f_CSE_DMR_CRE_007(int3, v_createRequestContainer, int4, v_createRequestContentInstance1, v_createRequestContentInstance2, c_defaultContentInstanceResourceName));//ContentInstance under Container
						v_ae1.done;
515
					}
516 517 518 519
	
				}// end group g_CSE_DMR_CRE_007
				
				group g_CSE_DMR_CRE_008 {
520
					
521 522 523 524 525 526 527 528 529 530 531 532
					/**
					 * @desc Checks that the IUT accepts a newly created RESOURCE_TYPE when the currentNrOfInstances exceeds the field value set in maxNrOfInstances in the PARENT_RESOURCE_TYPE resource by removing enough of the oldest RESOURCE_TYPE resources to allow the creation of the new RESOURCE_TYPE resource
					 * 
					 */
					testcase TC_CSE_DMR_CRE_008_CNT_CIN() runs on Tester system CseSystem {
						// Local variables		
						var template RequestPrimitive v_createRequestContainer := m_createContainerBase;
						var template RequestPrimitive v_createRequestContentInstance1 := m_createContentInstanceBase;
						var template RequestPrimitive v_createRequestContentInstance2 := m_createContentInstanceBase;
						const integer c_maxByteSize := 10;	
						const XSD.String c_primitiveContent1 := "Content1";
						const XSD.String c_primitiveContent2 := "Content2";		
533
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
534
		
535 536
						v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
						v_ae1.done;
537 538 539 540 541 542 543
						v_createRequestContainer.primitiveContent.container.maxByteSize := c_maxByteSize;
						v_createRequestContentInstance1.primitiveContent.contentInstance.content := c_primitiveContent1;	//ContentInstance 1
						v_createRequestContentInstance2.primitiveContent.contentInstance.content := c_primitiveContent2;	//ContentInstance 2
						v_createRequestContentInstance2.primitiveContent.contentInstance.resourceName := c_defaultContentInstanceResourceName & "2";	//ContentInstance 2

						v_ae1.start(f_CSE_DMR_CRE_007(int3, v_createRequestContainer, int4, v_createRequestContentInstance1, v_createRequestContentInstance2, c_defaultContentInstanceResourceName));//ContentInstance under Container
						v_ae1.done;
544
					}
545 546 547 548 549

				}// end group g_CSE_DMR_CRE_008
				
				
				group g_CSE_DMR_CRE_013 {
550
					
551 552 553 554 555 556 557 558 559
					/**
					 * @desc Check that the IUT rejects the CREATE Request of a RESOURCE_TYPE resource with error “NOT_ACCEPTABLE” when contentSize exceeds maxByteSize of the PARENT_RESOURCE_TYPE
					 * 
					 */
					testcase TC_CSE_DMR_CRE_013_CNT_CIN() runs on Tester system CseSystem {
						// Local variables		
						var template RequestPrimitive v_createRequestContainer := m_createContainerBase;
						var template RequestPrimitive v_createRequestContentInstance := m_createContentInstanceBase;
						const integer c_maxByteSize := 1;		
560
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
561
		
562 563
						v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
						v_ae1.done;
564 565 566
						v_createRequestContainer.primitiveContent.container.maxByteSize := c_maxByteSize;

						v_ae1.start(f_CSE_DMR_CRE_013(int3, v_createRequestContainer, int4, v_createRequestContentInstance));//ContentInstance under Container
567 568
						v_ae1.done;
					}
569 570 571 572

				}// end group g_CSE_DMR_CRE_013
				
				group g_CSE_DMR_CRE_015 {
573
					
574 575 576 577 578
					/**
					 * @desc Check that the IUT returns successfully after a CREATE request an empty content of created resource when the ResultContent set to 0 (Nothing)
					 * 
					 */
					testcase TC_CSE_DMR_CRE_015_CNT() runs on Tester system CseSystem {
579 580
						// Local variables
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
581 582
						v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
						v_ae1.done;
583 584
						                        
						v_ae1.start(f_CSE_DMR_CRE_015(int3, m_createContainerBase));//Container
585 586
						v_ae1.done;
					}
587 588

					testcase TC_CSE_DMR_CRE_015_GRP() runs on Tester system CseSystem {
589
						// Local variables
590
						
591
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
592 593
						v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
						v_ae1.done;
594 595
						                        
						v_ae1.start(f_CSE_DMR_CRE_015(int9, m_createGroupBase));//Group
596 597 598
						v_ae1.done;
					}
					
599
					testcase TC_CSE_DMR_CRE_015_ACP() runs on Tester system CseSystem {
600
						// Local variables
601
							
602
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
603 604
						v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
						v_ae1.done;
605 606
						                        
						v_ae1.start(f_CSE_DMR_CRE_015(int1, m_createAcpBase));//AccessControlPolicy
607 608
						v_ae1.done;
					}
609 610
				
					testcase TC_CSE_DMR_CRE_015_SUB() runs on Tester system CseSystem {
611
						// Local variables
612
						
613
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
614 615
						v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
						v_ae1.done;
616 617
						                        
						v_ae1.start(f_CSE_DMR_CRE_015(int23, m_createSubscriptionBase));//Subscription
618 619
						v_ae1.done;
					}
620
				
621 622 623 624 625 626 627 628 629 630 631
					testcase TC_CSE_DMR_CRE_015_PCH() runs on Tester system CseSystem {
						// Local variables
						
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
						v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
						v_ae1.done;
						                        
						v_ae1.start(f_CSE_DMR_CRE_015(int15, m_createPollingChannelBase));//PollingChannel
						v_ae1.done;
					}

632 633 634
				} // end g_CSE_DMR_CRE_015							

				group g_CSE_DMR_CRE_016 {
635
					
636 637 638 639 640
					/**
					 * @desc Check that the IUT returns successfully after a CREATE request only hierarchichal address of the created resource when the Result Content is set to 2 (hierarchical address)
					 * 
					 */
					testcase TC_CSE_DMR_CRE_016_CNT() runs on Tester system CseSystem {
641
						// Local variables
642
						var template PrimitiveContent v_contentResponse;
643
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
644 645
						v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
						v_ae1.done;
646
					
647 648 649 650 651 652 653
						v_contentResponse.uRI := mw_contentContainer_rc2;
					                        
						v_ae1.start(f_CSE_DMR_CRE_016(int3, m_createContainerBase, v_contentResponse));//Container
						v_ae1.done;
					}

					testcase TC_CSE_DMR_CRE_016_GRP() runs on Tester system CseSystem {
654
						// Local variables
655 656
						var template PrimitiveContent v_contentResponse;
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
657 658
						v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
						v_ae1.done;
659
					
660
						v_contentResponse.uRI := mw_contentGroup_rc2;
661
					
662 663
						v_ae1.start(f_CSE_DMR_CRE_016(int9, m_createGroupBase, v_contentResponse));//Group
						v_ae1.done;
664 665
					}
					
666
					testcase TC_CSE_DMR_CRE_016_ACP() runs on Tester system CseSystem {
667
						// Local variables
668
						var template PrimitiveContent v_contentResponse;
669
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
670 671
						v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
						v_ae1.done;
672 673 674 675 676
											
						v_contentResponse.uRI := mw_contentAcp_rc2;
						
						v_ae1.start(f_CSE_DMR_CRE_016(int1, m_createAcpBase,v_contentResponse));//AccessControlPolicy
						v_ae1.done;
677
					}
678 679
				
					testcase TC_CSE_DMR_CRE_016_SUB() runs on Tester system CseSystem {
680
						// Local variables
681
						var template PrimitiveContent v_contentResponse;
682
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
683 684
						v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
						v_ae1.done;
685 686 687 688
											
						v_contentResponse.uRI := mw_contentSubscription_rc2;

						v_ae1.start(f_CSE_DMR_CRE_016(int23, m_createSubscriptionBase, v_contentResponse));//Subscription
689 690
						v_ae1.done;
					}
691 692 693 694 695 696 697 698 699 700 701 702 703

					testcase TC_CSE_DMR_CRE_016_PCH() runs on Tester system CseSystem {
						// Local variables
						var template PrimitiveContent v_contentResponse;
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
						v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
						v_ae1.done;
											
						v_contentResponse.uRI := mw_contentPollingChannel_rc2;

						v_ae1.start(f_CSE_DMR_CRE_016(int15, m_createPollingChannelBase, v_contentResponse));//PollingChannel
						v_ae1.done;
					}					
704 705 706 707 708 709 710 711 712
				} // end g_CSE_DMR_CRE_016	
							
				group g_CSE_DMR_CRE_017 {
					
					/**
					 * @desc Check that the IUT returns successfully after a CREATE request only attributes and hierarchichal address of the created resource when Result Content is set 3 (attributes and hierarchichal address)
					 * 
					 */
					testcase TC_CSE_DMR_CRE_017_CNT() runs on Tester system CseSystem {
713
						// Local variables
714
						var template PrimitiveContent v_contentResponse;
715
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
716 717
						v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
						v_ae1.done;
718 719 720 721
					
						v_contentResponse.resource := mw_contentContainer_rc3;
					                        
						v_ae1.start(f_CSE_DMR_CRE_017(int3, m_createContainerBase, v_contentResponse));//Container
722 723
						v_ae1.done;
					}
724 725

					testcase TC_CSE_DMR_CRE_017_GRP() runs on Tester system CseSystem {
726
						// Local variables
727
						var template PrimitiveContent v_contentResponse;
728
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
729 730
						v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
						v_ae1.done;
731
					
732
						v_contentResponse.resource := mw_contentGroup_rc3;
733
					
734 735 736 737 738
						v_ae1.start(f_CSE_DMR_CRE_017(int9, m_createGroupBase, v_contentResponse));//Group
						v_ae1.done;
					}
					
					testcase TC_CSE_DMR_CRE_017_ACP() runs on Tester system CseSystem {
739
						// Local variables
740
						var template PrimitiveContent v_contentResponse;
741
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
742 743
						v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
						v_ae1.done;
744 745 746 747
					
						v_contentResponse.resource := mw_contentAcp_rc3;
						
						v_ae1.start(f_CSE_DMR_CRE_017(int1, m_createAcpBase,v_contentResponse));//AccessControlPolicy
748 749
						v_ae1.done;
					}
750 751 752 753

					testcase TC_CSE_DMR_CRE_017_SUB() runs on Tester system CseSystem {
						// Local variables
						var template PrimitiveContent v_contentResponse;
754
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
755 756
						v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
						v_ae1.done;
757 758
					
						v_contentResponse.resource := mw_contentSubscription_rc3;
759

760
						v_ae1.start(f_CSE_DMR_CRE_017(int23, m_createSubscriptionBase, v_contentResponse));//Subscription
761 762
						v_ae1.done;
					}
763
				
764 765 766 767 768 769 770 771 772 773 774 775
					testcase TC_CSE_DMR_CRE_017_PCH() runs on Tester system CseSystem {
						// Local variables
						var template PrimitiveContent v_contentResponse;
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
						v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
						v_ae1.done;
					
						v_contentResponse.resource := mw_contentPollingChannel_rc3;

						v_ae1.start(f_CSE_DMR_CRE_017(int15, m_createPollingChannelBase, v_contentResponse));//PollingChannel
						v_ae1.done;
					}
776 777
				} // end g_CSE_DMR_CRE_017

778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818
				group g_CSE_DMR_CRE_018 {
					
					/**
					 * @desc Check that the IUT rejects a CREATE request when the ResultContent is set to RESULT_CONTENT
					 * 
					 */
					testcase TC_CSE_DMR_CRE_018_RCN_4() runs on Tester system CseSystem {
						// Local variables
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
						v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
						v_ae1.done;
						v_ae1.start(f_CSE_DMR_CRE_018(int4));//ResultContent = 4 (attributes and child resources)
						v_ae1.done;
					}
	
					testcase TC_CSE_DMR_CRE_018_RCN_5() runs on Tester system CseSystem {
						// Local variables
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
						v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
						v_ae1.done;
						v_ae1.start(f_CSE_DMR_CRE_018(int5));//ResultContent = 5 (attributes and child resources references)
						v_ae1.done;
					}
	
					testcase TC_CSE_DMR_CRE_018_RCN_6() runs on Tester system CseSystem {
						// Local variables
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
						v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
						v_ae1.done;
						v_ae1.start(f_CSE_DMR_CRE_018(int6));//ResultContent = 6 (child resources references)
						v_ae1.done;
					}
	
					testcase TC_CSE_DMR_CRE_018_RCN_8() runs on Tester system CseSystem {
						// Local variables
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
						v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
						v_ae1.done;
						v_ae1.start(f_CSE_DMR_CRE_018(int8));//ResultContent = 8 (child resources)
						v_ae1.done;
					}
819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964
				} // end g_CSE_DMR_CRE_018		
				
				group g_CSE_DMR_CRE_019 {
					/**
					 * @desc Check that the IUT returns successfully only attributes of TARGET_RESOURCE_ADDRESS resource when the ResultContent set to 1 (Attributes)
					 * 
					 */
					testcase TC_CSE_DMR_CRE_019_CNT() runs on Tester system CseSystem {
						// Local variables
						var template PrimitiveContent v_contentResponse;
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
						v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
						v_ae1.done;
						
						v_contentResponse.container := mw_contentContainer_rc1;
						                        
						v_ae1.start(f_CSE_DMR_CRE_019(int3, m_createContainerBase, v_contentResponse));//Container
						v_ae1.done;
					}

					testcase TC_CSE_DMR_CRE_019_GRP() runs on Tester system CseSystem {
						// Local variables
						var template PrimitiveContent v_contentResponse;
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
						v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
						v_ae1.done;
						
						v_contentResponse.group_ := mw_contentGroup_rc1;
						                        
						v_ae1.start(f_CSE_DMR_CRE_019(int9, m_createGroupBase, v_contentResponse));//Group
						v_ae1.done;
					}
					
					testcase TC_CSE_DMR_CRE_019_ACP() runs on Tester system CseSystem {
						// Local variables
						var template PrimitiveContent v_contentResponse;	
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
						v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
						v_ae1.done;
						                        
						v_contentResponse.accessControlPolicy := mw_contentAcp_rc1;
						
						v_ae1.start(f_CSE_DMR_CRE_019(int1, m_createAcpBase, v_contentResponse));//AccessControlPolicy
						v_ae1.done;
					}
				
					testcase TC_CSE_DMR_CRE_019_SUB() runs on Tester system CseSystem {
						// Local variables
						var template PrimitiveContent v_contentResponse;
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
						v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
						v_ae1.done;
						
						v_contentResponse.subscription := mw_contentSubscription_rc1;
						                        
						v_ae1.start(f_CSE_DMR_CRE_019(int23, m_createSubscriptionBase, v_contentResponse));//Subscription
						v_ae1.done;
					}
				
					testcase TC_CSE_DMR_CRE_019_PCH() runs on Tester system CseSystem {
						// Local variables
						var template PrimitiveContent v_contentResponse;
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
						v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
						v_ae1.done;
						
						v_contentResponse.pollingChannel := mw_contentPollingChannel_rc1;
						                        
						v_ae1.start(f_CSE_DMR_CRE_019(int15, m_createPollingChannelBase, v_contentResponse));//PollingChannel
						v_ae1.done;
					}

				} // end g_CSE_DMR_CRE_019							

				group g_CSE_DMR_CRE_020 {
					
					/**
					 * @desc Check that the IUT returns successfully only modified attributes of TARGET_RESOURCE_ADDRESS resource when the Result Content is set to 9 (modified attributes)
					 * 
					 */
					testcase TC_CSE_DMR_CRE_020_CNT() runs on Tester system CseSystem {
						// Local variables
						var template PrimitiveContent v_contentResponse;
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
						v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
						v_ae1.done;
					
						v_contentResponse.container := mw_contentContainer_rc1;
						                    
						v_ae1.start(f_CSE_DMR_CRE_020(int3, m_createContainerBase, v_contentResponse));//Container
						v_ae1.done;
					}

					testcase TC_CSE_DMR_CRE_020_GRP() runs on Tester system CseSystem {
						// Local variables
						var template PrimitiveContent v_contentResponse;
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
						v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
						v_ae1.done;
					
						v_contentResponse.group_ := mw_contentGroup_rc1;
						
						v_ae1.start(f_CSE_DMR_CRE_020(int9, m_createGroupBase, v_contentResponse));//Group
						v_ae1.done;
					}
					
					testcase TC_CSE_DMR_CRE_020_ACP() runs on Tester system CseSystem {
						// Local variables
						var template PrimitiveContent v_contentResponse;
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
						v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
						v_ae1.done;
											
						v_contentResponse.accessControlPolicy := mw_contentAcp_rc1;
						
						v_ae1.start(f_CSE_DMR_CRE_020(int1, m_createAcpBase,v_contentResponse));//AccessControlPolicy
						v_ae1.done;
					}
				
					testcase TC_CSE_DMR_CRE_020_SUB() runs on Tester system CseSystem {
						// Local variables
						var template PrimitiveContent v_contentResponse;
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
						v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
						v_ae1.done;
											
						v_contentResponse.subscription := mw_contentSubscription_rc1;
						
						v_ae1.start(f_CSE_DMR_CRE_020(int23, m_createSubscriptionBase, v_contentResponse));//Subscription
						v_ae1.done;
					}

					testcase TC_CSE_DMR_CRE_020_PCH() runs on Tester system CseSystem {
						// Local variables
						var template PrimitiveContent v_contentResponse;
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
						v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
						v_ae1.done;
											
						v_contentResponse.pollingChannel := mw_contentPollingChannel_rc1;
						
						v_ae1.start(f_CSE_DMR_CRE_020(int15, m_createPollingChannelBase, v_contentResponse));//PollingChannel
						v_ae1.done;
					}					
				} // end g_CSE_DMR_CRE_020	
		
965 966 967 968 969
			}//end group Create
			
			group Retrieve {
				
				group g_CSE_DMR_RET_001 {
970
					
971 972 973 974 975 976 977 978 979
					/**
					 * @desc Check that the IUT returns successfully the TARGET_RESOURCE_ADDRESS resource 
					 * 
					 */
					testcase TC_CSE_DMR_RET_001_PCH() runs on Tester system CseSystem {
						// Local variables
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;						
						var ResponsePrimitive v_responsePrimitive;
						var template PrimitiveContent v_contentResponse;
980 981
						v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
						v_ae1.done;
982 983 984
						v_contentResponse.pollingChannel := mw_contentPollingChannelBase;
						
						v_ae1.start(f_CSE_DMR_RET_001(int15, m_createPollingChannelBase, v_contentResponse));//PollingChannel
985
						v_ae1.done;
986
						
987 988
					}
					
989
				} // end g_CSE_DMR_RET_001
990
				
991 992
								
				group g_CSE_DMR_RET_020 {
993 994
					
					/**
995
					 * @desc Check that the IUT rejects a RETRIEVE Request target to TARGET_RESOURCE_ADDRESS resource  when the Result Content set to RESULT_CONTENT
996 997
					 * 
					 */
998
					testcase TC_CSE_DMR_RET_020_RCN_0() runs on Tester system CseSystem {
999 1000
						// Local variables
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
1001 1002
						v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
						v_ae1.done;
1003
						v_ae1.start(f_CSE_DMR_RET_020(int3, m_createContainerBase, int0));//ResultContent = 0 (nothing)
1004 1005
						v_ae1.done;
					}
1006 1007
	
					testcase TC_CSE_DMR_RET_020_RCN_2() runs on Tester system CseSystem {
1008 1009
						// Local variables
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
1010 1011
						v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
						v_ae1.done;
1012
						v_ae1.start(f_CSE_DMR_RET_020(int3, m_createContainerBase, int2));//ResultContent = 2 (hierarchical address)
1013 1014
						v_ae1.done;
					}
1015 1016
	
					testcase TC_CSE_DMR_RET_020_RCN_3() runs on Tester system CseSystem {
1017 1018
						// Local variables
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
1019 1020
						v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
						v_ae1.done;
1021
						v_ae1.start(f_CSE_DMR_RET_020(int3, m_createContainerBase, int3));//ResultContent = 3 (attributes and hierarchichal address)
1022 1023
						v_ae1.done;
					}
1024
	
1025 1026 1027 1028 1029 1030 1031 1032
					testcase TC_CSE_DMR_RET_020_RCN_9() runs on Tester system CseSystem {
						// Local variables
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
						v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
						v_ae1.done;
						v_ae1.start(f_CSE_DMR_RET_020(int3, m_createContainerBase, int9));//ResultContent = 9 (modified attributes)
						v_ae1.done;
					}
1033 1034 1035 1036
				} // end g_CSE_DMR_RET_020

				group g_CSE_DMR_RET_021 {
		
1037
					/**
1038
					 * @desc Check that the IUT returns successfully only attributes of TARGET_RESOURCE_ADDRESS resource when the Result Content is set to 1 (attributes)
1039 1040
					 * 
					 */
1041
					testcase TC_CSE_DMR_RET_021_CNT() runs on Tester system CseSystem {
1042 1043
						// Local variables
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
1044 1045
						
						var template PrimitiveContent v_contentResponse;
1046 1047
						v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
						v_ae1.done;
1048 1049 1050 1051
						v_contentResponse.container := mw_contentContainer_rc1;
		                        
						v_ae1.start(f_CSE_DMR_RET_021(int3, m_createContainerBase, v_contentResponse, int3, m_createContainerBase));//Container
						v_ae1.done;
1052
					}
1053 1054

					testcase TC_CSE_DMR_RET_021_GRP() runs on Tester system CseSystem {
1055 1056
						// Local variables
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
1057 1058
						
						var template PrimitiveContent v_contentResponse;
1059 1060
						v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
						v_ae1.done;
1061 1062 1063
						v_contentResponse.group_ := mw_contentGroup_rc1;
		
						v_ae1.start(f_CSE_DMR_RET_021(int9, m_createGroupBase, v_contentResponse, int23, m_createSubscriptionBase));//Group
1064 1065
						v_ae1.done;
					}
1066 1067
		
					testcase TC_CSE_DMR_RET_021_ACP() runs on Tester system CseSystem {
1068 1069
						// Local variables
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
1070 1071
						
						var template PrimitiveContent v_contentResponse;
1072 1073
						v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
						v_ae1.done;
1074 1075 1076 1077
						v_contentResponse.accessControlPolicy := mw_contentAcp_rc1;
			
						v_ae1.start(f_CSE_DMR_RET_021(int1, m_createAcpBase,v_contentResponse, int23, m_createSubscriptionBase));//AccessControlPolicy
						v_ae1.done;
1078
					}
1079 1080
	
					testcase TC_CSE_DMR_RET_021_PCH() runs on Tester system CseSystem {
1081 1082
						// Local variables
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
1083 1084
						
						var template PrimitiveContent v_contentResponse;
1085 1086
						v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
						v_ae1.done;
1087 1088 1089 1090
						v_contentResponse.pollingChannel := mw_contentPollingChannelBase;
			
						v_ae1.start(f_CSE_DMR_RET_021(int15, m_createPollingChannelBase, v_contentResponse, omit, omit));//PollingChannel
						v_ae1.done;
1091
					}
1092 1093
		
					testcase TC_CSE_DMR_RET_021_SUB() runs on Tester system CseSystem {
1094 1095
						// Local variables
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
1096 1097
						
						var template PrimitiveContent v_contentResponse;
1098 1099
						v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
						v_ae1.done;
1100
						v_contentResponse.subscription := mw_contentSubscription_rc1;
1101

1102
						v_ae1.start(f_CSE_DMR_RET_021(int23, m_createSubscriptionBase, v_contentResponse, int18, m_createScheduleBase));//Subscription
1103
						v_ae1.done;
1104
					}
1105 1106
					
				} // end g_CSE_DMR_RET_021
1107

1108 1109
				group g_CSE_DMR_RET_022 {
		
1110
					/**
1111
					 * @desc Check that the IUT returns successfully only attributes and child resources of TARGET_RESOURCE_ADDRESS resource when the Result Content is set to 4 (attributes and child resources)
1112 1113
					 * 
					 */
1114 1115
					testcase TC_CSE_DMR_RET_022_CNT() runs on Tester system CseSystem {
						// Local variables
1116 1117
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
						
1118
						var template PrimitiveContent v_contentResponse;
1119 1120
						v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
						v_ae1.done;
1121 1122 1123 1124 1125
						v_contentResponse.container := mw_contentContainer_rc4;
		                        
						v_ae1.start(f_CSE_DMR_RET_022(int3, m_createContainerBase, v_contentResponse, int3, m_createContainerBase));//Container
						v_ae1.done;
					}
1126

1127 1128 1129 1130 1131 1132 1133 1134 1135 1136
					testcase TC_CSE_DMR_RET_022_GRP() runs on Tester system CseSystem {
						// Local variables
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
						
						var template PrimitiveContent v_contentResponse;
						v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
						v_ae1.done;
						v_contentResponse.group_ := mw_contentGroup_rc4;
		
						v_ae1.start(f_CSE_DMR_RET_022(int9, m_createGroupBase, v_contentResponse, int23, m_createSubscriptionBase));//Group
1137 1138
						v_ae1.done;
					}
1139 1140 1141
		
					testcase TC_CSE_DMR_RET_022_ACP() runs on Tester system CseSystem {
						// Local variables
1142 1143
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
						
1144
						var template PrimitiveContent v_contentResponse;
1145 1146
						v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
						v_ae1.done;
1147 1148 1149
						v_contentResponse.accessControlPolicy := mw_contentAcp_rc4;
			
						v_ae1.start(f_CSE_DMR_RET_022(int1, m_createAcpBase,v_contentResponse, int23, m_createSubscriptionBase));//AccessControlPolicy
1150 1151 1152
						v_ae1.done;
					}
	
1153 1154
					testcase TC_CSE_DMR_RET_022_PCH() runs on Tester system CseSystem {
						// Local variables
1155
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
1156 1157
						
						var template PrimitiveContent v_contentResponse;
1158 1159
						v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
						v_ae1.done;
1160 1161 1162
						v_contentResponse.pollingChannel := mw_contentPollingChannelBase;
			
						v_ae1.start(f_CSE_DMR_RET_022(int15, m_createPollingChannelBase, v_contentResponse, omit, omit));//PollingChannel
1163 1164
						v_ae1.done;
					}
1165 1166 1167
		
					testcase TC_CSE_DMR_RET_022_SUB() runs on Tester system CseSystem {
						// Local variables
1168
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
1169 1170
						
						var template PrimitiveContent v_contentResponse;
1171 1172
						v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
						v_ae1.done;
1173
						v_contentResponse.subscription := mw_contentSubscription_rc4;
1174

1175
						v_ae1.start(f_CSE_DMR_RET_022(int23, m_createSubscriptionBase, v_contentResponse, int18, m_createScheduleBase));//Subscription
1176 1177
						v_ae1.done;
					}
1178
					
1179 1180 1181 1182
				} // end g_CSE_DMR_RET_022

				group g_CSE_DMR_RET_023 {
		
1183
					/**
1184
					 * @desc Check that the IUT returns successfully only attributes and child resource references of TARGET_RESOURCE_ADDRESS resource when the Result Content is set to 5 (attributes and child resource references)
1185 1186
					 * 
					 */
1187
					testcase TC_CSE_DMR_RET_023_CNT() runs on Tester system CseSystem {
1188
						// Local variables
1189 1190 1191
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
						
						var template PrimitiveContent v_contentResponse;
1192 1193
						v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
						v_ae1.done;
1194 1195 1196
						v_contentResponse.container := mw_contentContainer_rc5;
		                        
						v_ae1.start(f_CSE_DMR_RET_023(int3, m_createContainerBase, v_contentResponse, int3, m_createContainerBase));//Container
1197 1198
						v_ae1.done;
					}
1199 1200

					testcase TC_CSE_DMR_RET_023_GRP() runs on Tester system CseSystem {
1201
						// Local variables
1202 1203 1204
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
						
						var template PrimitiveContent v_contentResponse;
1205 1206
						v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
						v_ae1.done;
1207 1208 1209
						v_contentResponse.group_ := mw_contentGroup_rc5;
		
						v_ae1.start(f_CSE_DMR_RET_023(int9, m_createGroupBase, v_contentResponse, int23, m_createSubscriptionBase));//Group
1210 1211
						v_ae1.done;
					}
1212 1213
		
					testcase TC_CSE_DMR_RET_023_ACP() runs on Tester system CseSystem {
1214
						// Local variables
1215 1216 1217
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
						
						var template PrimitiveContent v_contentResponse;
1218 1219
						v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
						v_ae1.done;
1220 1221 1222
						v_contentResponse.accessControlPolicy := mw_contentAcp_rc5;
			
						v_ae1.start(f_CSE_DMR_RET_023(int1, m_createAcpBase,v_contentResponse, int23, m_createSubscriptionBase));//AccessControlPolicy
1223 1224
						v_ae1.done;
					}
1225 1226
	
					testcase TC_CSE_DMR_RET_023_PCH() runs on Tester system CseSystem {
1227
						// Local variables
1228 1229
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
						var template PrimitiveContent v_contentResponse;
1230 1231
						v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
						v_ae1.done;
1232 1233 1234
						v_contentResponse.pollingChannel := mw_contentPollingChannelBase;
			
						v_ae1.start(f_CSE_DMR_RET_023(int15, m_createPollingChannelBase, v_contentResponse, omit, omit));//PollingChannel
1235 1236
						v_ae1.done;
					}
1237 1238
		
					testcase TC_CSE_DMR_RET_023_SUB() runs on Tester system CseSystem {
1239
						// Local variables
1240 1241
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
						var template PrimitiveContent v_contentResponse;
1242 1243
						v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
						v_ae1.done;
1244 1245 1246
						v_contentResponse.subscription := mw_contentSubscription_rc5;

						v_ae1.start(f_CSE_DMR_RET_023(int23, m_createSubscriptionBase, v_contentResponse, int18, m_createScheduleBase));//Subscription
1247 1248 1249
						v_ae1.done;
					}
					
1250 1251 1252 1253 1254 1255 1256 1257 1258
				} // end g_CSE_DMR_RET_023

				group g_CSE_DMR_RET_024 {
		
					/**
					 * @desc Check that the IUT returns successfully only child resource references of TARGET_RESOURCE_ADDRESS resource when Result Content is set to 6 (child resource references)
					 * 
					 */
					testcase TC_CSE_DMR_RET_024_CNT() runs on Tester system CseSystem {
1259
						// Local variables
1260 1261
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
						var template PrimitiveContent v_contentResponse;
1262 1263
						v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
						v_ae1.done;
1264 1265 1266
						v_contentResponse.container := mw_contentContainer_rc6;
		                        
						v_ae1.start(f_CSE_DMR_RET_024(int3, m_createContainerBase, v_contentResponse, int3, m_createContainerBase));//Container
1267 1268
						v_ae1.done;
					}
1269 1270

					testcase TC_CSE_DMR_RET_024_GRP() runs on Tester system CseSystem {
1271
						// Local variables
1272 1273
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
						var template PrimitiveContent v_contentResponse;
1274 1275
						v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
						v_ae1.done;
1276 1277 1278
						v_contentResponse.group_ := mw_contentGroup_rc6;
		
						v_ae1.start(f_CSE_DMR_RET_024(int9, m_createGroupBase, v_contentResponse, int23, m_createSubscriptionBase));//Group
1279 1280
						v_ae1.done;
					}
1281 1282
		
					testcase TC_CSE_DMR_RET_024_ACP() runs on Tester system CseSystem {
1283
						// Local variables
1284 1285
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
						var template PrimitiveContent v_contentResponse;
1286 1287
						v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
						v_ae1.done;
1288 1289 1290
						v_contentResponse.accessControlPolicy := mw_contentAcp_rc6;
			
						v_ae1.start(f_CSE_DMR_RET_024(int1, m_createAcpBase,v_contentResponse, int23, m_createSubscriptionBase));//AccessControlPolicy
1291 1292
						v_ae1.done;
					}
1293 1294
	
					testcase TC_CSE_DMR_RET_024_SUB() runs on Tester system CseSystem {
1295
						// Local variables
1296 1297
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
						var template PrimitiveContent v_contentResponse;
1298 1299
						v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
						v_ae1.done;
1300 1301 1302
						v_contentResponse.subscription := mw_contentSubscription_rc6;

						v_ae1.start(f_CSE_DMR_RET_024(int23, m_createSubscriptionBase, v_contentResponse, int18, m_createScheduleBase));//Subscription
1303 1304 1305
						v_ae1.done;
					}
					
1306 1307 1308 1309 1310 1311 1312 1313 1314
				} // end g_CSE_DMR_RET_024

				group g_CSE_DMR_RET_025 {
		
					/**
					 * @desc Check that the IUT returns successfully only child resources of TARGET_RESOURCE_ADDRESS resource when Result Content is set to 8 (child resources)
					 * 
					 */
					testcase TC_CSE_DMR_RET_025_CNT() runs on Tester system CseSystem {
1315
						// Local variables
1316 1317
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
						var template PrimitiveContent v_contentResponse;
1318 1319
						v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
						v_ae1.done;
1320 1321 1322
						v_contentResponse.container := mw_contentContainer_rc8;
		                        
						v_ae1.start(f_CSE_DMR_RET_025(int3, m_createContainerBase, v_contentResponse, int3, m_createContainerBase));//Container
1323 1324
						v_ae1.done;
					}
1325 1326

					testcase TC_CSE_DMR_RET_025_GRP() runs on Tester system CseSystem {
1327
						// Local variables
1328 1329
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
						var template PrimitiveContent v_contentResponse;
1330 1331
						v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
						v_ae1.done;
1332 1333 1334
						v_contentResponse.group_ := mw_contentGroup_rc8;
		
						v_ae1.start(f_CSE_DMR_RET_025(int9, m_createGroupBase, v_contentResponse, int23, m_createSubscriptionBase));//Group
1335 1336
						v_ae1.done;
					}
1337 1338
		
					testcase TC_CSE_DMR_RET_025_ACP() runs on Tester system CseSystem {
1339
						// Local variables
1340 1341
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
						var template PrimitiveContent v_contentResponse;
1342 1343
						v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
						v_ae1.done;
1344 1345 1346
						v_contentResponse.accessControlPolicy := mw_contentAcp_rc8;
			
						v_ae1.start(f_CSE_DMR_RET_025(int1, m_createAcpBase,v_contentResponse, int23, m_createSubscriptionBase));//AccessControlPolicy
1347 1348
						v_ae1.done;
					}
1349 1350
			
					testcase TC_CSE_DMR_RET_025_SUB() runs on Tester system CseSystem {
1351
						// Local variables
1352 1353
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
						var template PrimitiveContent v_contentResponse;
1354 1355
						v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
						v_ae1.done;
1356 1357 1358
						v_contentResponse.subscription := mw_contentSubscription_rc8;

						v_ae1.start(f_CSE_DMR_RET_025(int23, m_createSubscriptionBase, v_contentResponse, int18, m_createScheduleBase));//Subscription
1359 1360 1361
						v_ae1.done;
					}
					
1362 1363 1364 1365 1366 1367
				} // end g_CSE_DMR_RET_025
			
			}//end group Retrieve
			
			group Update {
				group g_CSE_DMR_UPD_001 {
1368
					
1369 1370 1371 1372 1373
					/**
					 * @desc Check that the IUT updates successfully the value of the attribute ATTRIBUTE_NAME of the TARGET_RESOURCE_ADDRESS resource 
					 * 
					 */
					testcase TC_CSE_DMR_UPD_001_PCH_LBL() runs on Tester system CseSystem {
1374
						// Local variables
1375
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
1376
						
1377 1378 1379 1380 1381 1382
						var Labels v_labels_1 := {"VALUE_1"};
						var Labels v_labels_2 := {"VALUE_2"};
						var template RequestPrimitive v_createRequest := m_createPollingChannelBase;
						var template RequestPrimitive v_updateRequest := m_updatePollingChannelBase;
						var ResponsePrimitive v_responsePrimitive;
						var PrimitiveContent v_primitiveContentRetrieveResource;
1383 1384
						v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
						v_ae1.done;
1385 1386 1387 1388
						v_createRequest.primitiveContent.pollingChannel.labels := v_labels_1;
						v_updateRequest.primitiveContent.pollingChannel.labels := v_labels_2;

						v_ae1.start(f_CSE_DMR_UPD_001(int15, v_createRequest, v_updateRequest));//PollingChannel
1389 1390
						v_ae1.done;
						
1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411
						 
																		
						if(getverdict == pass){ v_responsePrimitive := f_getResponsePrimitive(v_ae1);
							//Check attribute 1
							if(ispresent(v_responsePrimitive.primitiveContent)) {
								if(ischosen(v_responsePrimitive.primitiveContent.pollingChannel)) {
									if(v_responsePrimitive.primitiveContent.pollingChannel.labels != v_labels_2){
										setverdict(fail, __SCOPE__ & ": Error: Labels attribute not updated correctly")
									}
								}
							}
						
							v_primitiveContentRetrieveResource := f_getPrimitiveContentRetrievedResource(v_ae1);
	
							//Check that the resource has been udpated correctly
							if(ischosen(v_primitiveContentRetrieveResource.pollingChannel)) {
								if(v_primitiveContentRetrieveResource.pollingChannel.labels != v_labels_2){
									setverdict(fail, __SCOPE__ & ": Error: Labels attribute not updated correctly")
								}
							}
						}
1412 1413
					}
					
1414 1415 1416 1417 1418 1419 1420 1421 1422 1423
					
				} // end g_CSE_DMR_UPD_001
				
				group g_CSE_DMR_UPD_002 {
					
					/**
					 * @desc Check that the IUT adds successfully the attribute ATTRIBUTE_NAME to the TARGET_RESOURCE_ADDRESS resource
					 * 
					 */
					testcase TC_CSE_DMR_UPD_002_PCH_LBL() runs on Tester system CseSystem {
1424
						// Local variables
1425 1426 1427 1428 1429 1430
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
						
						var Labels v_labels_1 := {"VALUE_1"};
						var template RequestPrimitive v_updateRequest := m_updatePollingChannelBase;
						var ResponsePrimitive v_responsePrimitive;
						var PrimitiveContent v_primitiveContentRetrieveResource;
1431 1432
						v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
						v_ae1.done;
1433
						v_updateRequest.primitiveContent.pollingChannel.labels := v_labels_1;
1434
						
1435
						v_ae1.start(f_CSE_DMR_UPD_002(int15, m_createPollingChannelBase,v_updateRequest));//PollingChannel
1436 1437
						v_ae1.done;
						
1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458
						 
																		
						if(getverdict == pass){ v_responsePrimitive := f_getResponsePrimitive(v_ae1);
							//Check attribute 1
							if(ispresent(v_responsePrimitive.primitiveContent)) {
								if(ischosen(v_responsePrimitive.primitiveContent.pollingChannel)) {
									if(v_responsePrimitive.primitiveContent.pollingChannel.labels != v_labels_1){
										setverdict(fail, __SCOPE__ & ": Error: Labels attribute not updated correctly")
									}
								}
							}
							
							v_primitiveContentRetrieveResource := f_getPrimitiveContentRetrievedResource(v_ae1);
							
							//Check that the resource has been udpated correctly
						  if(ischosen(v_primitiveContentRetrieveResource.pollingChannel)) {
							  if(v_primitiveContentRetrieveResource.pollingChannel.labels != v_labels_1){
										  setverdict(fail, __SCOPE__ & ": Error: Labels attribute not updated correctly")
								}
							}
						}
1459 1460
					}
					
1461 1462 1463 1464 1465 1466 1467 1468 1469
				} // end g_CSE_DMR_UPD_002
				
				group g_CSE_DMR_UPD_003 {
					
					/**
					 * @desc Check that the IUT deletes successfully the attribute ATTRIBUTE_NAME from the TARGET_RESOURCE_ADDRESS resource 
					 * 
					 */
					testcase TC_CSE_DMR_UPD_003_PCH_LBL() runs on Tester system CseSystem {
1470
						// Local variables
1471 1472 1473 1474 1475 1476 1477 1478
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
						var Labels v_labels_1 := {"VALUE_1"};
						var Labels v_labels_2 := {"To be deleted"};
						var AttributeAux_list v_nullFields;
						var ResponsePrimitive v_responsePrimitive;
						var template RequestPrimitive v_createRequest := m_createPollingChannelBase;
						var template RequestPrimitive v_updateRequest := m_updatePollingChannelBase;
						var PrimitiveContent v_primitiveContentRetrieveResource;
1479 1480
						v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
						v_ae1.done;
1481 1482 1483 1484
						v_createRequest.primitiveContent.pollingChannel.labels := v_labels_1;
						v_updateRequest.primitiveContent.pollingChannel.labels := v_labels_2;
						
						v_nullFields := {{"labels", omit}};
1485
						
1486
						v_ae1.start(f_CSE_DMR_UPD_003(int15, v_createRequest, v_updateRequest, v_nullFields));//PollingChannel
1487 1488
						v_ae1.done;
						
1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511
						 
																		
						if(getverdict == pass){ v_responsePrimitive := f_getResponsePrimitive(v_ae1);
							//Check attribute 1
							if(ispresent(v_responsePrimitive.primitiveContent)) {
								if(ischosen(v_responsePrimitive.primitiveContent.pollingChannel)) {
									if(ispresent(v_responsePrimitive.primitiveContent.pollingChannel.labels)){
										setverdict(fail, __SCOPE__ & ": Error: Labels attribute not deleted correctly")
									}
								}
							}
							
							v_primitiveContentRetrieveResource := f_getPrimitiveContentRetrievedResource(v_ae1);
							
							//Check that the resource has been udpated correctly
						  if(ischosen(v_primitiveContentRetrieveResource.pollingChannel)) {
							  if(ispresent(v_primitiveContentRetrieveResource.pollingChannel.labels)) {
								if(not(match(v_primitiveContentRetrieveResource.pollingChannel.labels,{""}))){
								  setverdict(fail, __SCOPE__ & ": Error: Labels attribute not deleted correctly")
								}
							}
						  }
						}
1512 1513
					}
					
1514 1515 1516 1517 1518 1519 1520 1521 1522 1523
				} // end g_CSE_DMR_UPD_003
				
				
				group g_CSE_DMR_UPD_007{
					
					/**
					 * @desc Check that the IUT responds with an error when the AE tries to update a non-RW attribute ATTRIBUTE_NAME of a TARGET_RESOURCE_ADDRESS resource
					 * 
					 */
					testcase TC_CSE_DMR_UPD_007_PCH_CT() runs on Tester system CseSystem {
1524 1525
						// Local variables
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
1526 1527 1528
						var Timestamp v_creationTime := "21001231T012345";
						var template RequestPrimitive v_updateRequest := m_updatePollingChannelBase;
						var PrimitiveContent v_primitiveContentRetrieveResource;
1529 1530
						v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
						v_ae1.done;
1531 1532 1533 1534
						v_updateRequest.primitiveContent := {pollingChannel_update_invalid := m_contentUpdatePollingChannel_invalid};
						v_updateRequest.primitiveContent.pollingChannel_update_invalid.creationTime := v_creationTime;
							
						v_ae1.start(f_CSE_DMR_UPD_007(int15, m_createPollingChannelBase, v_updateRequest));//PollingChannel
1535
						v_ae1.done;
1536 1537 1538 1539 1540 1541 1542 1543 1544 1545
						
						if(getverdict == pass){ 
							v_primitiveContentRetrieveResource := f_getPrimitiveContentRetrievedResource(v_ae1);
							//Check that the resource has NOT been udpated
							  if(ischosen(v_primitiveContentRetrieveResource.pollingChannel_update_invalid)) {
							   if(v_primitiveContentRetrieveResource.pollingChannel_update_invalid.creationTime == v_creationTime){
								 setverdict(fail, __SCOPE__ & ": Error: Creation Time attribute updated")
								}
							}
						}
1546 1547
					}
					
1548 1549 1550 1551 1552 1553 1554 1555 1556
				} // end g_CSE_DMR_UPD_007			
				
				group g_CSE_DMR_UPD_008{
					
					/**
					 * @desc Check that the IUT responds with an error when the AE tries to delete a mandatory RW attribute ATTRIBUTE_NAME of a TARGET_RESOURCE_ADDRESS resource
					 * 
					 */
					testcase TC_CSE_DMR_UPD_008_PCH_ET() runs on Tester system CseSystem {
1557 1558
						// Local variables
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
1559 1560 1561 1562
						var Timestamp v_expirationTime := "21001231T012345";
						var template RequestPrimitive v_updateRequest := m_updatePollingChannelBase;
						var AttributeAux_list v_nullFields;
						var PrimitiveContent v_primitiveContentRetrieveResource;
1563 1564
						v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
						v_ae1.done;
1565 1566 1567 1568 1569
						v_nullFields := {{"expirationTime", omit}};
						
						v_updateRequest.primitiveContent.pollingChannel.expirationTime := v_expirationTime;
							
						v_ae1.start(f_CSE_DMR_UPD_008(int15, m_createPollingChannelBase, v_updateRequest, v_nullFields));//PollingChannel
1570
						v_ae1.done;
1571 1572 1573 1574 1575 1576 1577 1578 1579 1580
						
						if(getverdict == pass){ 
							v_primitiveContentRetrieveResource := f_getPrimitiveContentRetrievedResource(v_ae1);
							  //Check that the resource has NOT been udpated
							  if(ischosen(v_primitiveContentRetrieveResource.pollingChannel)) {
							   if(v_primitiveContentRetrieveResource.pollingChannel.expirationTime == v_expirationTime){
								 setverdict(fail, __SCOPE__ & ": Error: Expiration time attribute updated")
								}
							}
						}
1581 1582
					}
					
1583 1584 1585 1586 1587 1588 1589 1590 1591
				} // end g_CSE_DMR_UPD_008
				
				group g_CSE_DMR_UPD_009{
					
					/**
					 * @desc Check that the IUT responds with an error when the AE tries to update an attribute of a  TARGET_RESOURCE_ADDRESS resource which does not exist
					 * 
					 */
					testcase TC_CSE_DMR_UPD_009_PCH_EXC() runs on Tester system CseSystem {
1592 1593
						// Local variables
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
1594 1595 1596
						var XSD.PositiveInteger v_expirationCounter := 1;
						var template RequestPrimitive v_createRequest := m_createPollingChannelBase;
						var template RequestPrimitive v_updateRequest := m_updatePollingChannelBase;
1597 1598
						v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
						v_ae1.done;
1599 1600 1601 1602 1603
						v_updateRequest.primitiveContent := {pollingChannel_update_invalid := m_contentUpdatePollingChannel_invalid};
						
						v_updateRequest.primitiveContent.pollingChannel_update_invalid.expirationCounter := v_expirationCounter;
							
						v_ae1.start(f_CSE_DMR_UPD_009(int15, v_createRequest, v_updateRequest));//PollingChannel
1604 1605 1606
						v_ae1.done;
					}
					
1607 1608 1609 1610 1611 1612 1613 1614 1615
				} // end g_CSE_DMR_UPD_009		
				
				group g_CSE_DMR_UPD_010{
					
					/**
					 * @desc Check that the stateTag attribute of a RESOURCE_TYPE resource is increased when an update operation has been performed on its child resource
					 * 
					 */
					testcase TC_CSE_DMR_UPD_010_CNT() runs on Tester system CseSystem {
1616 1617
						// Local variables
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
1618 1619 1620 1621 1622
						var RequestPrimitive v_updateRequest := valueof(m_updateContainerBase);
						var template RequestPrimitive v_createRequest := m_createContainerBase;
						var Labels v_labels_1:= {"VALUE_1"};
						var PrimitiveContent v_primitiveContentRetrieveResource;
						
1623 1624
						v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
						v_ae1.done;
1625 1626 1627 1628
						
						v_updateRequest.primitiveContent.container.labels := v_labels_1;
		
						v_ae1.start(f_CSE_DMR_UPD_010(int3, v_createRequest, v_updateRequest));//Container
1629
						v_ae1.done;
1630
	
1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641
						if(getverdict == pass){ 
							v_primitiveContentRetrieveResource := f_getPrimitiveContentRetrievedResource(v_ae1);
							//Check that stateTag has been incremented
							  if(ischosen(v_primitiveContentRetrieveResource.container)) {
							   if(v_primitiveContentRetrieveResource.container.stateTag == 1){
									setverdict(pass, __SCOPE__ & ": The stateTag attribute is incremented");	
							   }else{
									setverdict(fail, __SCOPE__ & ": Error the stateTag attribute is not incremented");
							   }
							}
						}
1642
					}
1643
	
1644 1645 1646
				} // end g_CSE_DMR_UPD_010		
				
				group g_CSE_DMR_UPD_011{
1647
					
1648 1649 1650 1651 1652
					/**
					 * @desc Check that the IUT rejects the UPDATE Request of an existing RESOURCE_TYPE resource with error “OPERATION_NOT_ALLOWED”
					 * 
					 */
					testcase TC_CSE_DMR_UPD_011_CNT_CNI() runs on Tester system CseSystem {
1653 1654
						// Local variables
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
1655 1656 1657 1658 1659 1660
						var template RequestPrimitive v_updateRequest := m_updateContentInstanceBase;
						var Labels v_labels:= {"LABEL"};
						var template RequestPrimitive v_createParentRequest := m_createContainerBase;
						var template RequestPrimitive v_createChildRequest := m_createContentInstanceBase;
						var PrimitiveContent v_primitiveContentRetrieveResource;
		
1661 1662
						v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
						v_ae1.done;
1663
						v_updateRequest.primitiveContent.contentInstance.labels := v_labels;
1664

1665
						v_ae1.start(f_CSE_DMR_UPD_011(int3, v_createParentRequest, int4, v_createChildRequest, v_updateRequest));//ContentInstance under Container
1666
						v_ae1.done;
1667

1668 1669 1670 1671 1672 1673 1674 1675 1676 1677
						if(getverdict == pass){ 
							v_primitiveContentRetrieveResource := f_getPrimitiveContentRetrievedResource(v_ae1);
							//Check that the resource has NOT been udpated
							if(ischosen(v_primitiveContentRetrieveResource.contentInstance)) {
								if(v_primitiveContentRetrieveResource.contentInstance.labels == v_labels){
							   		setverdict(fail, __SCOPE__ & ": Error: Labels attribute updated")
						  		}
							}
						}
					}
1678

1679
				} // end g_CSE_DMR_UPD_011
1680

1681
				group g_CSE_DMR_UPD_014 {
1682
					
1683 1684 1685 1686 1687
					/**
					 * @desc Check that the IUT updates successfully the value of the optional attribute OPTIONAL_ATTRIBUTE of the RESOURCE_TYPE resource. 
					 * 
					 */
					testcase TC_CSE_DMR_UPD_014_ACP_ET() runs on Tester system CseSystem {
1688 1689
						// Local variables
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
1690 1691 1692 1693 1694
						var Timestamp v_expirationTime_1 := "20301231T012345";
						var Timestamp v_expirationTime_2 := "20401020T012345";
						var template RequestPrimitive v_createRequest := m_createAcpBase;
						var template RequestPrimitive v_updateRequest := m_updateAcpBase;
						var ResponsePrimitive v_responsePrimitive;
1695 1696
						v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
						v_ae1.done;
1697 1698
						v_createRequest.primitiveContent.accessControlPolicy.expirationTime := v_expirationTime_1;
						v_updateRequest.primitiveContent.accessControlPolicy.expirationTime := v_expirationTime_2;
1699

1700
						v_ae1.start(f_CSE_DMR_UPD_014(int1, v_createRequest, v_updateRequest));//ACP
1701
						v_ae1.done;
1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714
						
						 
						
						if(getverdict == pass){ v_responsePrimitive := f_getResponsePrimitive(v_ae1);
							//Check attribute 1
							if(ispresent(v_responsePrimitive.primitiveContent)) {
								if(ischosen(v_responsePrimitive.primitiveContent.accessControlPolicy)) {
									if(v_responsePrimitive.primitiveContent.accessControlPolicy.expirationTime != v_expirationTime_2){
										setverdict(fail, __SCOPE__ & ": Error: ExpirationTime attribute not updated correctly")
									}
								}
							}
						}
1715

1716 1717 1718
					}
										
					testcase TC_CSE_DMR_UPD_014_CNT_ET() runs on Tester system CseSystem {
1719 1720
						// Local variables
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
1721 1722 1723
						var Timestamp v_expirationTime_1 := "20301231T012345";
						var Timestamp v_expirationTime_2 := "20401020T012345";
						var ResponsePrimitive v_responsePrimitive;
1724

1725 1726
						var template RequestPrimitive v_createRequest := m_createContainerBase;
						var template RequestPrimitive v_updateRequest := m_updateContainerBase;
1727 1728
						v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
						v_ae1.done;
1729 1730
						v_createRequest.primitiveContent.container.expirationTime := v_expirationTime_1;
						v_updateRequest.primitiveContent.container.expirationTime := v_expirationTime_2;
1731

1732
						v_ae1.start(f_CSE_DMR_UPD_014(int3, v_createRequest, v_updateRequest));//Container
1733
						v_ae1.done;
1734 1735
						
						 
1736

1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749
						if(getverdict == pass){ v_responsePrimitive := f_getResponsePrimitive(v_ae1);
							//Check attribute 1
							if(ispresent(v_responsePrimitive.primitiveContent)) {
								if(ischosen(v_responsePrimitive.primitiveContent.container)) {
									if(v_responsePrimitive.primitiveContent.container.expirationTime != v_expirationTime_2){
										setverdict(fail, __SCOPE__ & ": Error: ExpirationTime attribute not updated correctly")
									}
								}
							}
						}
					}
										
					testcase TC_CSE_DMR_UPD_014_CNT_OR() runs on Tester system CseSystem {
1750 1751
						// Local variables
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
1752 1753 1754
						var XSD.AnyURI v_ontologyRef_1 := "MyOntologyRef_1";
						var XSD.AnyURI v_ontologyRef_2 := "MyOntologyRef_2";
						var ResponsePrimitive v_responsePrimitive;
1755
	
1756 1757
						var template RequestPrimitive v_createRequest := m_createContainerBase;
						var template RequestPrimitive v_updateRequest := m_updateContainerBase;
1758 1759
						v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
						v_ae1.done;
1760 1761
						v_createRequest.primitiveContent.container.ontologyRef := v_ontologyRef_1;
						v_updateRequest.primitiveContent.container.ontologyRef := v_ontologyRef_2;
1762
	
1763
						v_ae1.start(f_CSE_DMR_UPD_014(int3, v_createRequest, v_updateRequest));//Container
1764
						v_ae1.done;
1765 1766
						
						 
1767
	
1768 1769 1770 1771 1772 1773 1774 1775 1776 1777
						if(getverdict == pass){ v_responsePrimitive := f_getResponsePrimitive(v_ae1);
							//Check attribute 1
							if(ispresent(v_responsePrimitive.primitiveContent)) {
								if(ischosen(v_responsePrimitive.primitiveContent.container)) {
									if(v_responsePrimitive.primitiveContent.container.ontologyRef != v_ontologyRef_2){
										setverdict(fail, __SCOPE__ & ": Error: OntologyRef attribute not updated correctly")
									}
								}
							}
						}
1778 1779
					}
					
1780
					testcase TC_CSE_DMR_UPD_014_SUB_ACPI() runs on Tester system CseSystem {
1781 1782
						// Local variables
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
1783 1784 1785 1786 1787
						var AcpType v_accessControlPolicyIDs_1 := {"NotInitialized_1"};
						var AcpType v_accessControlPolicyIDs_2 := {"NotInitialized_2"};
						var template RequestPrimitive v_createRequest := m_createSubscriptionBase;
						var template RequestPrimitive v_updateRequest := m_updateSubscriptionBase;
						var ResponsePrimitive v_responsePrimitive;
1788 1789
						v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
						v_ae1.done;
Miguel Angel Reina Ortega's avatar