OneM2M_Testcases_CSE_Release_2.ttcn 193 KB
Newer Older
1 2 3 4 5 6 7
/**
 *  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.
 *  
8
 *  @author     oneM2M/ETSI
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
 *  @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_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));
					    
43
					f_send(e_mca_port, m_request(v_request));
44 45 46 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
					
					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 {
				
83
				group g_CSE_GEN_CRE_003 {
84
			
85 86 87 88 89 90
					/**
					 * @desc Check that the IUT accepts the creation of a <container>  resource using shortcut structured resource identifier
					 * 
					 */
					testcase TC_CSE_GEN_CRE_003_CSR() runs on Tester system CseSystem {
						// Local variables
91
			
92
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
93
			
94 95 96
						v_ae1.start(f_CSE_GEN_CRE_003(e_cseRelative));
						v_ae1.done;
					}
97
		
98 99
					testcase TC_CSE_GEN_CRE_003_SPR() runs on Tester system CseSystem {
						// Local variables
100
		
101
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
102
			
103 104 105
						v_ae1.start(f_CSE_GEN_CRE_003(e_spRelative));
						v_ae1.done;
					}
106
				
107 108 109 110
					testcase TC_CSE_GEN_CRE_003_ABS() runs on Tester system CseSystem {
						// Local variables
							
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
111
						                        
112 113 114 115 116 117
						v_ae1.start(f_CSE_GEN_CRE_003(e_absolute));
						v_ae1.done;
					}
					
				}// end of group g_CSE_GEN_CRE_003

118
				group g_CSE_GEN_CRE_004 {
119

120
				/**
121
					 * @desc Check that the IUT accepts the creation of a <container> resource using structured resource identifier with hybrid addressing.
122 123
				  * 
				 */
124
					testcase TC_CSE_GEN_CRE_004_CSR() runs on Tester system CseSystem {
125
						// Local variables
126 127
					
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
128
						                        
129
						v_ae1.start(f_CSE_GEN_CRE_004(e_cseRelative));
130
						v_ae1.done;
131 132
					}

133
					testcase TC_CSE_GEN_CRE_004_SPR() runs on Tester system CseSystem {
134 135 136
						// Local variables
						
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
137
						                        
138
						v_ae1.start(f_CSE_GEN_CRE_004(e_spRelative));
139 140 141
						v_ae1.done;
					}
					
142
					testcase TC_CSE_GEN_CRE_004_ABS() runs on Tester system CseSystem {
143 144
						// Local variables
							
145
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
146
						                        
147
						v_ae1.start(f_CSE_GEN_CRE_004(e_absolute));
148
						v_ae1.done;
149 150
					}
				
151
				} // end of group g_CSE_GEN_CRE_004				
152 153 154 155
				
			} // end of group Create
			
			group Retrieve {
156 157 158 159 160 161 162 163 164 165
				
				group g_CSE_GEN_RET_003 {

					/**
					 * @desc Check that the IUT accepts the retrieval of a <container>  resource using shortcut structured resource identifier
					 * 
					 */
					testcase TC_CSE_GEN_RET_003_CSR() runs on Tester system CseSystem {
						// Local variables
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
166
						                        
167
						v_ae1.start(f_CSE_GEN_RET_003(e_cseRelative));
168 169 170
						v_ae1.done;
					}
				
171 172 173 174
					testcase TC_CSE_GEN_RET_003_SPR() runs on Tester system CseSystem {
						// Local variables
						
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
175
						                        
176 177
						v_ae1.start(f_CSE_GEN_RET_003(e_spRelative));
						v_ae1.done;
178 179
				}
				
180 181
					testcase TC_CSE_GEN_RET_003_ABS() runs on Tester system CseSystem {
						// Local variables
182
				
183
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
184
				
185 186 187
						v_ae1.start(f_CSE_GEN_RET_003(e_absolute));
						v_ae1.done;
					}
188
				
189
				} // end of group g_CSE_GEN_RET_003
190 191
  
					
192
				group g_CSE_GEN_RET_004 {
193
	
194 195 196 197 198 199
					/**
					 * @desc Check that the IUT accepts the retrieval of a <container>  resource using structured resource identifier with hybrid addressing.
					 * 
					 */
					testcase TC_CSE_GEN_RET_004_CSR() runs on Tester system CseSystem {
						// Local variables
200
	
201
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
202
	
203 204 205
						v_ae1.start(f_CSE_GEN_RET_004(e_cseRelative));
						v_ae1.done;
					}
206
	
207 208
					testcase TC_CSE_GEN_RET_004_SPR() runs on Tester system CseSystem {
						// Local variables
209
	
210
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
211
						                        
212 213
						v_ae1.start(f_CSE_GEN_RET_004(e_spRelative));
						v_ae1.done;
214
						}
215 216 217 218 219
					
					testcase TC_CSE_GEN_RET_004_ABS() runs on Tester system CseSystem {
						// Local variables
							
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
220
						                        
221 222
						v_ae1.start(f_CSE_GEN_RET_004(e_absolute));
						v_ae1.done;
223
						}
224 225 226
				
				} // end of group g_CSE_GEN_RET_004				

227 228 229
			} // end of group Retrieve
			
			group Update {
230 231 232 233 234 235 236 237 238 239 240
				
				group g_CSE_GEN_UPD_003 {

					/**
					 * @desc Check that the IUT accepts the update of a <container>  resource using shortcut structured resource identifier
					 * 
					 */
					testcase TC_CSE_GEN_UPD_003_CSR() runs on Tester system CseSystem {
						// Local variables
						                        
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
241
						                        
242 243
						v_ae1.start(f_CSE_GEN_UPD_003(e_cseRelative));
						v_ae1.done;
244
						}
245 246 247 248 249

					testcase TC_CSE_GEN_UPD_003_SPR() runs on Tester system CseSystem {
						// Local variables
						
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
250
						                        
251 252
						v_ae1.start(f_CSE_GEN_UPD_003(e_spRelative));
						v_ae1.done;
253 254
					}	
	
255 256
					testcase TC_CSE_GEN_UPD_003_ABS() runs on Tester system CseSystem {
						// Local variables
257
	
258
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
259
	
260 261 262
						v_ae1.start(f_CSE_GEN_UPD_003(e_absolute));
						v_ae1.done;
					}
263
				
264 265
				} // end of group g_CSE_GEN_UPD_003

266 267 268

				group g_CSE_GEN_UPD_004 {

269
								/**
270
					 * @desc Check that the IUT accepts the update of a <container>  resource using structured resource identifier with hybrid addressing..
271
				 * 
272 273 274
					 */
					testcase TC_CSE_GEN_UPD_004_CSR() runs on Tester system CseSystem {
						// Local variables
275
				 
276
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
277
	
278 279 280 281 282
						v_ae1.start(f_CSE_GEN_UPD_004(e_cseRelative));
						v_ae1.done;
					}

					testcase TC_CSE_GEN_UPD_004_SPR() runs on Tester system CseSystem {
283 284
					// Local variables
		   
285
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
286

287 288 289
						v_ae1.start(f_CSE_GEN_UPD_004(e_spRelative));
						v_ae1.done;
					}
290

291 292
					testcase TC_CSE_GEN_UPD_004_ABS() runs on Tester system CseSystem {
						// Local variables
293

294
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
295

296 297 298
						v_ae1.start(f_CSE_GEN_UPD_004(e_absolute));
						v_ae1.done;
					}
299
	
300 301
				} // end of group g_CSE_GEN_UPD_004				

302 303 304
			} // end of group Update
			
			group Delete {
305 306 307 308 309 310 311 312 313 314 315
				
				group g_CSE_GEN_DEL_003 {

					/**
					 * @desc Check that the IUT accepts the deletion of a <container>  resource using shortcut structured resource identifier
					 * 
					 */
					testcase TC_CSE_GEN_DEL_003_CSR() runs on Tester system CseSystem {
						// Local variables
						                        
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
316
						                        
317 318
						v_ae1.start(f_CSE_GEN_DEL_003(e_cseRelative));
						v_ae1.done;
319
						}
320 321 322 323 324

					testcase TC_CSE_GEN_DEL_003_SPR() runs on Tester system CseSystem {
						// Local variables
						
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
325
						                        
326 327
						v_ae1.start(f_CSE_GEN_DEL_003(e_spRelative));
						v_ae1.done;
328
						}
329 330 331 332 333
					
					testcase TC_CSE_GEN_DEL_003_ABS() runs on Tester system CseSystem {
						// Local variables
							
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
334
						                        
335 336
						v_ae1.start(f_CSE_GEN_DEL_003(e_absolute));
						v_ae1.done;
337
						}
338 339 340
								
				} // end of group g_CSE_GEN_DEL_003

341 342 343 344 345 346 347 348 349 350 351

				group g_CSE_GEN_DEL_004 {

					/**
					 * @desc Check that the IUT accepts the deletion of a <container>  resource using structured resource identifier with hybrid addressing.
					 * 
					 */
					testcase TC_CSE_GEN_DEL_004_CSR() runs on Tester system CseSystem {
						// Local variables
						                        
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
352
						                        
353 354
						v_ae1.start(f_CSE_GEN_DEL_004(e_cseRelative));
						v_ae1.done;
355 356
					}	

357 358
					testcase TC_CSE_GEN_DEL_004_SPR() runs on Tester system CseSystem {
						// Local variables
359

360
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
361

362 363 364
						v_ae1.start(f_CSE_GEN_DEL_004(e_spRelative));
						v_ae1.done;
					}
365
				
366 367
					testcase TC_CSE_GEN_DEL_004_ABS() runs on Tester system CseSystem {
						// Local variables
368
				
369
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
370
				
371 372 373
						v_ae1.start(f_CSE_GEN_DEL_004(e_absolute));
						v_ae1.done;
					}
374
				
375 376
				} // end of group g_CSE_GEN_DEL_004				

377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393
			} // 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;
394
						
395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412
						 var RequestPrimitive v_request;
						 var template PrimitiveContent v_contentResponse;
						 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;
413
						
414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482
						 var RequestPrimitive v_request;
						 var template PrimitiveContent v_contentResponse;
						 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;
    						
						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;

						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 {
						
483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585
			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_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_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_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_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_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_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_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_CSE_DMR_002(m_delete("NotInitialized", "NotInitialized"))); //Delete Container
					v_ae1.done;
	
				}
			}// end group g_CSE_DMR_002
			
586 587 588 589 590 591 592 593
			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
					 * 
					 */
594
					testcase TC_CSE_DMR_CRE_001_PCH_AE() runs on Tester system CseSystem {
595
						// Local variables
596
						var template RequestPrimitive v_createRequest := m_createPollingChannelBase;
597 598 599
						var ResponsePrimitive v_responsePrimitive;
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
						
600 601 602 603
						
						v_createRequest.primitiveContent.pollingChannel.resourceName := omit;

						v_ae1.start(f_CSE_DMR_CRE_001(int15, v_createRequest, m_createAeAux(omit,omit)));//PollingChannel
604 605 606
						v_ae1.done;
						
						 
607
												
608
						if(getverdict == pass){ v_responsePrimitive := f_getResponsePrimitive(v_ae1);
609
							if(not ispresent(v_responsePrimitive.primitiveContent.pollingChannel.resourceName)){
610
								setverdict(fail, __SCOPE__ & ": Error, resourceName attribute not provided");
611 612 613 614 615
							}
						}
						
					}
					
616 617 618 619 620 621 622 623 624
				} // 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 {
625 626 627
						// Local variables
						var ResponsePrimitive v_responsePrimitive;
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
628
			
629
						v_ae1.start(f_CSE_DMR_CRE_002(int15, m_createPollingChannelBase));//Pollingchannel
630 631 632
						v_ae1.done;
						
						 
633
												
634
						if(getverdict == pass){ v_responsePrimitive := f_getResponsePrimitive(v_ae1);
635
							if(not ispresent(v_responsePrimitive.primitiveContent.pollingChannel.resourceName)){
636
								setverdict(fail, __SCOPE__ & ": Error, resourceName attribute not provided");
637 638 639 640
							} else {
								if(v_responsePrimitive.primitiveContent.pollingChannel.resourceName != c_defaultPollingChannelResourceName){
									setverdict(fail, __SCOPE__ & ": Error, resourceName attribute not correct");
								}
641 642 643 644
							}
						}
					}
					
645
					testcase TC_CSE_DMR_CRE_002_FLXC() runs on Tester system CseSystem {
646 647 648 649
						// Local variables
						var ResponsePrimitive v_responsePrimitive;
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;

650 651 652
						v_ae1.start(f_CSE_DMR_CRE_002(int28, m_createGenericInterworkingServiceBase));//Specialization of FlexContainer
						v_ae1.done;	 
							
653
						if(getverdict == pass){ v_responsePrimitive := f_getResponsePrimitive(v_ae1);
654 655 656 657 658 659
							if(not ispresent(v_responsePrimitive.primitiveContent.genericInterworkingService.resourceName)){
								setverdict(fail, __SCOPE__, ": Error, resourceName attribute not provided");
							} else {
								if(v_responsePrimitive.primitiveContent.flexContainer.resourceName != c_defaultGenericInterworkingServiceResourceName){
									setverdict(fail, __SCOPE__, ": Error, resourceName attribute not correct");
								}
660 661 662 663
							}
						}
					}
					
664
				}// end group g_CSE_DMR_CRE_002
665
				
666 667 668 669 670 671 672 673
				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                        
674
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
675

676
						v_ae1.start(f_CSE_DMR_CRE_003(int15, m_createPollingChannelBase));//Pollingchannel
677 678 679
						v_ae1.done;
					}
					
680 681 682 683 684 685 686 687 688
				}// 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 {
689
						// Local variables
690
                        
691
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
692

693
						v_ae1.start(f_CSE_DMR_CRE_004(int15, m_createPollingChannelBase));//Pollingchannel
694 695 696
						v_ae1.done;
					}
					
697 698 699
				}// end group g_CSE_DMR_CRE_004
				
				group g_CSE_DMR_CRE_006 {
700
					
701 702 703 704 705
					/**
					 * @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 {
706
						// Local variables
707 708
						var template RequestPrimitive v_createRequest := m_createContainerBase;
						var ResponsePrimitive v_responsePrimitive;
709
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
710
		
711
						v_ae1.start(f_CSE_DMR_CRE_006(int3, v_createRequest));		
712 713
						v_ae1.done;		 
														
714
						if(getverdict == pass){ v_responsePrimitive := f_getResponsePrimitive(v_ae1);
715 716 717 718
							if(not ispresent(v_responsePrimitive.primitiveContent.container.maxNrOfInstances)){
								setverdict(fail, __SCOPE__, ": Error, maxNrOfInstances attribute not provided");
							} 
						}	
719
					}
720 721
	
					testcase TC_CSE_DMR_CRE_006_CNT_MBS() runs on Tester system CseSystem {
722
						// Local variables
723
						var template RequestPrimitive v_createRequest := m_createContainerBase;
724 725
						var ResponsePrimitive v_responsePrimitive;
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
726
		
727
						v_ae1.start(f_CSE_DMR_CRE_006(int3, v_createRequest));
728
						v_ae1.done;
729
																				
730
						if(getverdict == pass){ v_responsePrimitive := f_getResponsePrimitive(v_ae1);
731 732 733 734 735
							if(not ispresent(v_responsePrimitive.primitiveContent.container.maxByteSize)){
								setverdict(fail, __SCOPE__, ": Error, maxByteSize attribute not provided");
							} 
						}	
		  
736
					}
737
	
738
					testcase TC_CSE_DMR_CRE_006_CNT_MIA() runs on Tester system CseSystem {
739
						// Local variables
740
						var template RequestPrimitive v_createRequest := m_createContainerBase;
741 742
						var ResponsePrimitive v_responsePrimitive;
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
743
								
744
						
745 746 747
						v_ae1.start(f_CSE_DMR_CRE_006(int3, v_createRequest));
						v_ae1.done;		 
														
748
						if(getverdict == pass){ v_responsePrimitive := f_getResponsePrimitive(v_ae1);
749 750 751 752
							if(not ispresent(v_responsePrimitive.primitiveContent.container.maxInstanceAge)){
								setverdict(fail, __SCOPE__, ": Error, maxInstanceAge attribute not provided");
							} 
						}	
753 754
					}
					
755 756 757
				}// end group g_CSE_DMR_CRE_006
				
				group g_CSE_DMR_CRE_008 {
758
					
759 760 761 762 763 764 765 766 767 768 769 770
					/**
					 * @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";		
771
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
772
		
773
						v_createRequestContainer.primitiveContent.container.maxByteSize := c_maxByteSize;
774 775 776 777 778
						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
779 780
						v_ae1.done;
					}
781 782

				}// end group g_CSE_DMR_CRE_008
783
								
784
				group g_CSE_DMR_CRE_015 {
785
					
786 787 788 789 790
					/**
					 * @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 {
791 792
						// Local variables
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
793
						                        
794
						v_ae1.start(f_CSE_DMR_CRE_015(int3, m_createContainerBase));//Container
795 796
						v_ae1.done;
					}
797 798

					testcase TC_CSE_DMR_CRE_015_GRP() runs on Tester system CseSystem {
799
						// Local variables
800
						
801
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
802
						                        
803
						v_ae1.start(f_CSE_DMR_CRE_015(int9, m_createGroupBase));//Group
804 805 806
						v_ae1.done;
					}
					
807
					testcase TC_CSE_DMR_CRE_015_ACP() runs on Tester system CseSystem {
808
						// Local variables
809
							
810
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
811
						                        
812
						v_ae1.start(f_CSE_DMR_CRE_015(int1, m_createAcpBase));//AccessControlPolicy
813
						v_ae1.done;
814
					}
815 816
				
					testcase TC_CSE_DMR_CRE_015_SUB() runs on Tester system CseSystem {
817 818
						// Local variables
							
819
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
820
						                        
821
						v_ae1.start(f_CSE_DMR_CRE_015(int23, m_createSubscriptionBase));//Subscription
822
						v_ae1.done;
823 824
					}
					
825
					testcase TC_CSE_DMR_CRE_015_PCH() runs on Tester system CseSystem {
826 827 828
						// Local variables
							
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
829
						                        
830
						v_ae1.start(f_CSE_DMR_CRE_015(int15, m_createPollingChannelBase));//PollingChannel
831
						v_ae1.done;
832 833
					}
					
834 835 836
				} // end g_CSE_DMR_CRE_015							

				group g_CSE_DMR_CRE_016 {
837 838
					
					/**
839
					 * @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)
840 841
					 * 
					 */
842
					testcase TC_CSE_DMR_CRE_016_CNT() runs on Tester system CseSystem {
843
						// Local variables
844
						var template PrimitiveContent v_contentResponse;
845
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
846
					
847 848 849
						v_contentResponse.uRI := mw_contentContainer_rc2;
					                        
						v_ae1.start(f_CSE_DMR_CRE_016(int3, m_createContainerBase, v_contentResponse));//Container
850
						v_ae1.done;
851 852 853
					}

					testcase TC_CSE_DMR_CRE_016_GRP() runs on Tester system CseSystem {
854
						// Local variables
855 856
						var template PrimitiveContent v_contentResponse;
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
857
					
858
						v_contentResponse.uRI := mw_contentGroup_rc2;
859
					
860
						v_ae1.start(f_CSE_DMR_CRE_016(int9, m_createGroupBase, v_contentResponse));//Group
861 862
						v_ae1.done;
					}
863
					
864
					testcase TC_CSE_DMR_CRE_016_ACP() runs on Tester system CseSystem {
865
						// Local variables
866
						var template PrimitiveContent v_contentResponse;
867
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
868
											
869
						v_contentResponse.uRI := mw_contentAcp_rc2;
870
						
871 872
						v_ae1.start(f_CSE_DMR_CRE_016(int1, m_createAcpBase,v_contentResponse));//AccessControlPolicy
						v_ae1.done;
873
					}
874 875
				
					testcase TC_CSE_DMR_CRE_016_SUB() runs on Tester system CseSystem {
876
						// Local variables
877
						var template PrimitiveContent v_contentResponse;
878
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
879
											
880
						v_contentResponse.uRI := mw_contentSubscription_rc2;
881
						
882
						v_ae1.start(f_CSE_DMR_CRE_016(int23, m_createSubscriptionBase, v_contentResponse));//Subscription
883
						v_ae1.done;
884 885
					}
					
886
					testcase TC_CSE_DMR_CRE_016_PCH() runs on Tester system CseSystem {
887
						// Local variables
888
						var template PrimitiveContent v_contentResponse;
889
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
890
											
891
						v_contentResponse.uRI := mw_contentPollingChannel_rc2;
892
						
893
						v_ae1.start(f_CSE_DMR_CRE_016(int15, m_createPollingChannelBase, v_contentResponse));//PollingChannel
894 895
						v_ae1.done;
					}
896 897 898
				} // end g_CSE_DMR_CRE_016	
							
				group g_CSE_DMR_CRE_017 {
899 900
					
					/**
901
					 * @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)
902 903
					 * 
					 */
904
					testcase TC_CSE_DMR_CRE_017_CNT() runs on Tester system CseSystem {
905
						// Local variables
906
						var template PrimitiveContent v_contentResponse;
907
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
908
					
909 910 911
						v_contentResponse.resource := mw_contentContainer_rc3;
					                        
						v_ae1.start(f_CSE_DMR_CRE_017(int3, m_createContainerBase, v_contentResponse));//Container
912
						v_ae1.done;
913 914
					}

915
					testcase TC_CSE_DMR_CRE_017_GRP() runs on Tester system CseSystem {
916
						// Local variables
917
						var template PrimitiveContent v_contentResponse;
918
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
919
					
920
						v_contentResponse.resource := mw_contentGroup_rc3;
921
					
922
						v_ae1.start(f_CSE_DMR_CRE_017(int9, m_createGroupBase, v_contentResponse));//Group
923 924 925
						v_ae1.done;
					}
					
926
					testcase TC_CSE_DMR_CRE_017_ACP() runs on Tester system CseSystem {
927
						// Local variables
928
						var template PrimitiveContent v_contentResponse;
929
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
930
					
931 932 933
						v_contentResponse.resource := mw_contentAcp_rc3;
						
						v_ae1.start(f_CSE_DMR_CRE_017(int1, m_createAcpBase,v_contentResponse));//AccessControlPolicy
934
						v_ae1.done;
935
					}
936
				
937 938 939
					testcase TC_CSE_DMR_CRE_017_SUB() runs on Tester system CseSystem {
						// Local variables
						var template PrimitiveContent v_contentResponse;
940
						var AeSimu v_ae1 := AeSimu.create("AE1") alive;
941
					
942
						v_contentResponse.resource := mw_contentSubscription_rc3;
943
						
944
						v_ae1.start(f_CSE_DMR_CRE_017(int23, m_createSubscriptionBase, v_contentResponse));//Subscription