OneM2M_Testcases.ttcn 403 KB
Newer Older
1 2 3 4 5 6 7 8
/**
 *  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
9
 *  @version    $URL: https://forge.etsi.org/svn/oneM2M/branches/Release1/ttcn/OneM2M_Testcases.ttcn $
10
 *              $Id: OneM2M_Testcases.ttcn 183 2016-11-25 13:31:34Z reinaortega $
11 12 13 14 15 16 17 18 19 20
 *  @desc       Module containing test cases for oneM2M
 *
 */
module OneM2M_Testcases {

	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;
21
	import from OneM2M_Pics all;
22
	import from OneM2M_Functions all;
23
	import from LibCommon_Time all;
24 25
	import from XSD all;
	
26
	
27 28 29
	//Demos used for validation purposes
	group oneM2M_demos {
	
30
		group helpingTestCases {//These are not part of the test suite, just for verification purposes
31
			
32
			testcase TC_DELETE_AE() runs on CseTester system CseSystem {
33 34 35 36
				
				timer t_ac := 5.0;
				map(self:mcaPort, system:mcaPort); 
		
37
				mcaPort.send(m_request(m_deleteRequest(PX_URI_CSE & PX_CSE_NAME & "/" & PX_RESOURCE_TO_BE_DELETED)));
38 39
				t_ac.start;
				alt {
40
					[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) {
41 42 43 44
						t_ac.stop;
						log("Postamble: Resource deleted");
						setverdict(pass);
					}
45
					[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
						t_ac.stop;
						log("Postamble: Error while deleting resource");
						setverdict(fail);
					}
					[] mcaPort.receive {
						t_ac.stop;
						log("Postamble: Unexpected message received");
						setverdict(inconc);
					}
					[] t_ac.timeout {
						log("Postamble: No answer while deleting resource");
						setverdict(inconc);
					}	
				}	
				
				unmap(self:mcaPort, system:mcaPort); 
				stop;
			}	
			
65
			testcase TC_DELETE_RESOURCES() runs on CseTester system CseSystem {
66 67 68 69 70 71
				
				timer t_ac := 5.0;
				var integer i; 
				map(self:mcaPort, system:mcaPort); 
					
				for (i:=0; i<lengthof(PX_RESOURCES_TO_BE_DELETED); i:= i+1) {  
72
					mcaPort.send(m_request(m_delete(PX_URI_CSE & "/" & PX_CSE_NAME & "/" & PX_RESOURCES_TO_BE_DELETED[i])));
73 74
					t_ac.start;
					alt {
75
						[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) {
76 77 78 79
							t_ac.stop;
							log("Postamble: Resource deleted");
							setverdict(pass);
						}
80
						[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100
							t_ac.stop;
							log("Postamble: Error while deleting resource");
							setverdict(fail);
						}
						[] mcaPort.receive {
							t_ac.stop;
							log("Postamble: Unexpected message received");
							setverdict(inconc);
						}
						[] t_ac.timeout {
							log("Postamble: No answer while deleting resource");
							setverdict(inconc);
						}	
					}	
				}
			
				unmap(self:mcaPort, system:mcaPort); 
				stop;
			}	
		
101
		}//end group helpingTestCases
102 103 104 105 106
	
	}//end group oneM2M_demos
	
	group CSE {
		
107
		group Registration {
108
	  	  	
109
			testcase TC_CSE_REG_BV_001() runs on CseTester system CseSystem {
110
	  	  	
111
				var MsgIn v_response;
112
				var RequestPrimitive v_request;
113
				var integer v_cseBaseIndex := -1;
114 115
				var integer v_resourceIndex := -1;
				var ResourceType v_resourceType := int2;
116
                
117
				// Test component configuration
118
				f_cf01Up();
119
                
120
				//Preambule
121
				v_cseBaseIndex := f_cse_preamble_createServiceSubscribedAppRule({"C-AE-ID-STEM"});//c_CRUDNDi);
122
	
123 124 125
				//Test Body
				v_request := valueof(m_createAe(PX_APP_ID, omit, omit));	
				
126
				v_request := f_getCreateRequestPrimitive(v_resourceType, v_request, v_cseBaseIndex);
127 128 129 130 131
				
				mcaPort.send(m_request(v_request));
				
				tc_ac.start;
				alt {
132
					[] mcaPort.receive(mw_response(mw_responsePrimitive(int2001))) {
133 134 135
						tc_ac.stop;
						setverdict(pass, testcasename() & ": AE successfuly created.");
					}
136
					[] mcaPort.receive(mw_response(mw_responsePrimitiveInverse(int2001))) -> value v_response{
137
						tc_ac.stop;
138
						setverdict(fail, testcasename() & ": Error while creating AE with status code " & int2str(enum2int(v_response.primitive.responsePrimitive.responseStatusCode)));
139 140 141 142 143 144 145
					}
					[] tc_ac.timeout {
						setverdict(inconc, testcasename() & ": No answer while creating AE");
					}
				}	
								
				// Postamble
146 147 148 149
				f_cse_postamble_deleteResources();
				
				// Tear down
				f_cf01Down();
150
					
151
			}
152
	  	  	
153
			testcase TC_CSE_REG_BV_002() runs on CseTester system CseSystem {
154
	  	  	
155
				var MsgIn v_response;
156
				var RequestPrimitive v_request;
157
				var integer v_cseBaseIndex := -1;
158
				var ResourceType v_resourceType := int2;
159
                
160
				// Test component configuration
161
				f_cf01Up();
162
	  	  	
163
				//Preambule
164
				v_cseBaseIndex := f_cse_preamble_createServiceSubscribedAppRule({"C-AE-ID-STEM"});//c_CRUDNDi);
165 166 167
				
				//Test Body
				v_request := valueof(m_createAe(PX_APP_ID, omit, "C-AE-ID-STEM"));				
168
    									
169
				v_request := f_getCreateRequestPrimitive(v_resourceType, v_request, v_cseBaseIndex);
170

171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191
				mcaPort.send(m_request(v_request));
				tc_ac.start;
				alt {
					[] mcaPort.receive(mw_response(mw_responsePrimitive(int2001))) {
						tc_ac.stop;
						setverdict(pass, testcasename() & ": AE successfuly created.");
					}
					[] mcaPort.receive(mw_response(mw_responsePrimitiveInverse(int2001))) -> value v_response{
						tc_ac.stop;
						setverdict(fail, testcasename() & ": Error while creating AE with status code " & int2str(enum2int(v_response.primitive.responsePrimitive.responseStatusCode)));
					}
					[] tc_ac.timeout {
						setverdict(inconc, testcasename() & ": No answer while creating AE");
					}
				}	
								
				// Postamble
				f_cse_postamble_deleteResources();
				
				// Tear down
				f_cf01Down();
192
					
193
			}
194
	  	  	
195
			testcase TC_CSE_REG_BV_003() runs on CseTester system CseSystem {
196
	  	  	
197
				var MsgIn v_response;
198
				var RequestPrimitive v_request;
199
				var integer v_cseBaseIndex := -1;
200
				var ResourceType v_resourceType := int2;
201
                
202
				// Test component configuration
203
				f_cf01Up();
204
				
205
				//Preambule
206
				v_cseBaseIndex := f_cse_preamble_createServiceSubscribedAppRule(omit);//c_CRUDNDi);				
207 208
    									
				// Test Body
209 210
				v_request := valueof(m_createAe(PX_APP_ID, omit, omit));				
    									
211
				v_request := f_getCreateRequestPrimitive(v_resourceType, v_request, v_cseBaseIndex);
212
				
213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233
				mcaPort.send(m_request(v_request));
				tc_ac.start;
				alt {
					[] mcaPort.receive(mw_response(mw_responsePrimitive(int4005))) {
						tc_ac.stop;
						setverdict(pass, testcasename() & ": AE creation rejected.");
					}
					[] mcaPort.receive(mw_response(mw_responsePrimitiveInverse(int4005))) -> value v_response{
						tc_ac.stop;
						setverdict(fail, testcasename() & ": Error while creating AE with status code " & int2str(enum2int(v_response.primitive.responsePrimitive.responseStatusCode)));
					}
					[] tc_ac.timeout {
						setverdict(inconc, testcasename() & ": No answer while creating AE");
					}
				}	
								
				// Postamble
				f_cse_postamble_deleteResources();
				
				// Tear down
				f_cf01Down();
234
					
235
			}
236
	  	  	
237
			testcase TC_CSE_REG_BV_004() runs on CseTester system CseSystem {
238
	  	  	
239
				var MsgIn v_response;
240
				var RequestPrimitive v_request;
241
				var integer v_cseBaseIndex := -1;
242
				var ResourceType v_resourceType := int2;
243
                
244
				// Test component configuration
245
				f_cf01Up();
246
	  	  	
247
				//Preambule
248
				v_cseBaseIndex := f_cse_preamble_createServiceSubscribedAppRule(omit);//c_CRUDNDi);
249
	
250 251
				//Test Body	
				v_request := valueof(m_createAe(PX_APP_ID, omit, "C-AE-ID-STEM"));				
252
    									
253
				v_request := f_getCreateRequestPrimitive(v_resourceType, v_request, v_cseBaseIndex);
254
		
255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275
				mcaPort.send(m_request(v_request));
				tc_ac.start;
				alt {
					[] mcaPort.receive(mw_response(mw_responsePrimitive(int4005))) {
						tc_ac.stop;
						setverdict(pass, testcasename() & ": AE creation rejected.");
					}
					[] mcaPort.receive(mw_response(mw_responsePrimitiveInverse(int4005))) -> value v_response{
						tc_ac.stop;
						setverdict(fail, testcasename() & ": Error while creating AE with status code " & int2str(enum2int(v_response.primitive.responsePrimitive.responseStatusCode)));
					}
					[] tc_ac.timeout {
						setverdict(inconc, testcasename() & ": No answer while creating AE");
					}
				}	
								
				// Postamble
				f_cse_postamble_deleteResources();
					
				// Tear down
				f_cf01Down();
276
					
277
			}
278
	  	  	
279
			testcase TC_CSE_REG_BV_005() runs on CseTester system CseSystem {
280
	  	  	
281
				var MsgIn v_response;
282
				var RequestPrimitive v_request;
283
				var integer v_cseBaseIndex := -1;
284
				var ResourceType v_resourceType := int2;
285
                
286
				// Test component configuration
287
				f_cf02Up();
288
	  	  	
289
				//Preambule
290
				v_cseBaseIndex := f_cse_preamble_createServiceSubscribedAppRule({"S"});//c_CRUDNDi);
291
	
292 293
				//Test Body
				v_request := valueof(m_createAe(PX_APP_ID, omit, "C-AE-ID-STEM"));				
294
    									
295
				v_request := f_getCreateRequestPrimitive(v_resourceType, v_request, v_cseBaseIndex);
296
	  	  		
297 298
				mcaPort.send(m_request(v_request));
				tc_ac.start;
299

300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318
				alt {
					[] mccPort.receive(mw_request(mw_createAEannc(omit, omit, "APP_ID"))) {
						tc_ac.stop;
						setverdict(pass, testcasename() & ": AE creation redirected.");
					}
					[] mccPort.receive {
						tc_ac.stop;
						setverdict(fail, testcasename() & ": Error while creating AE");
					}
					[] tc_ac.timeout {
						setverdict(inconc, testcasename() & ": No answer while creating AE");
					}
				}	
								
				// Postamble
				f_cse_postamble_deleteResources();
				
				// Tear down
				f_cf01Down();
319
					
320
			}
321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409
			
			testcase TC_CSE_REG_BV_006() runs on CseTester system CseSystem {
			  
				var MsgIn v_response;
				var RequestPrimitive v_request;
				var integer v_aeIndex := -1;
				var ResourceType v_resourceType := int2;
				
				// Test control
    				
				// Test component configuration
				f_cf01Up();
    			
				// Test adapter configuration
    			
				// Preamble
				v_aeIndex := f_cse_preamble_registerAeWithId("C-AE-ID-STEM");//c_CRUDNDi);
				
				//Test Body	
				v_request := valueof(m_createAe(PX_APP_ID, omit, "C-AE-ID-STEM"));				
    									
				v_request := f_getCreateRequestPrimitive(v_resourceType, v_request, v_aeIndex);
				
				mcaPort.send(m_request(v_request));
				tc_ac.start;
				alt {
					[] mcaPort.receive(mw_response(mw_responsePrimitive(int4005))) {
						tc_ac.stop;
						setverdict(pass, testcasename() & ": AE creation rejected.");
					}
					[] mcaPort.receive(mw_response(mw_responsePrimitiveInverse(int4005))) -> value v_response{
						tc_ac.stop;
						setverdict(fail, testcasename() & ": Error while creating AE with status code " & int2str(enum2int(v_response.primitive.responsePrimitive.responseStatusCode)));
					}
					[] tc_ac.timeout {
						setverdict(inconc, testcasename() & ": No answer while creating AE");
					}
				}	
								
				// Postamble
				f_cse_postamble_deleteResources();
					
				// Tear down
				f_cf01Down();
			
			}
			
			testcase TC_CSE_REG_BV_007() runs on CseTester system CseSystem {
	  	  	
				var MsgIn v_response;
				var RequestPrimitive v_request;
				var integer v_cseBaseIndex := -1;
				var ResourceType v_resourceType := int2;
                
				// Test component configuration
				f_cf02Up();
	  	  	
				//Preambule
				v_cseBaseIndex := f_cse_preamble_createServiceSubscribedAppRule({"S"});//c_CRUDNDi);
	
				//Test Body
				v_request := valueof(m_createAe(PX_APP_ID, omit, "C-AE-ID-STEM"));				
    									
				v_request := f_getUpdateRequestPrimitive(v_resourceType,v_cseBaseIndex, v_request);
	  	  		
				mcaPort.send(m_request(v_request));
				tc_ac.start;

				alt {
					[] mccPort.receive(mw_request(mw_createAEannc(omit, omit, "APP_ID"))) {
						tc_ac.stop;
						setverdict(pass, testcasename() & ": AE creation redirected.");
					}
					[] mccPort.receive {
						tc_ac.stop;
						setverdict(fail, testcasename() & ": Error while creating AE");
					}
					[] tc_ac.timeout {
						setverdict(inconc, testcasename() & ": No answer while creating AE");
					}
				}	
								
				// Postamble
				f_cse_postamble_deleteResources();
				
				// Tear down
				f_cf01Down();
					
			}
410
	  	  	
411
		}//end Registration
412 413
		
		group Data_Management_and_Repository {
414 415 416

			group g_CSE_DMR_BV_001 {
					
417
				testcase TC_CSE_DMR_BV_001_01() runs on CseTester system CseSystem {
418 419 420 421 422
					// Local variables
                        
					f_CSE_DMR_BV_001(int3, m_createContainerBase);//Container
				}

423
				testcase TC_CSE_DMR_BV_001_02() runs on CseTester system CseSystem {
424 425 426 427 428
					// Local variables
						
					f_CSE_DMR_BV_001(int9, m_createGroupBase);//Group
				}
					
429
				testcase TC_CSE_DMR_BV_001_03() runs on CseTester system CseSystem {
430 431 432 433 434
					// Local variables
	
					f_CSE_DMR_BV_001(int1, m_createAcpBase);//AccessControlPolicy
				}
				
435
				testcase TC_CSE_DMR_BV_001_04() runs on CseTester system CseSystem {
436 437 438 439 440
					// Local variables
	
					f_CSE_DMR_BV_001(int18, m_createScheduleBase);//Schedule
				}
					
441
				testcase TC_CSE_DMR_BV_001_05() runs on CseTester system CseSystem {
442 443 444 445 446
					// Local variables
	
					f_CSE_DMR_BV_001(int15, m_createPollingChannelBase);//PollingChannel
				}
					
447
				testcase TC_CSE_DMR_BV_001_06() runs on CseTester system CseSystem {
448 449 450 451 452
						// Local variables
	
					f_CSE_DMR_BV_001(int23, m_createSubscriptionBase);//Subscription
					}
				
453
				function f_CSE_DMR_BV_001(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive) runs on CseTester {
454 455
    				
					// Local variables
456
					var MsgIn v_response;
457
					var RequestPrimitive v_request;
458 459
					var integer v_aeIndex := -1;
					var integer v_resourceIndex := -1;
460 461 462 463 464 465 466 467 468
    										   
					// Test control
    				
					// Test component configuration
					f_cf01Up();
    				
					// Test adapter configuration
    				
					// Preamble
469
					v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
470
					    					
471
					v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive, v_aeIndex); 				
472 473
    									
					// Test Body
474
					v_request := valueof(m_retrieveResource(f_getResourceAddress(v_resourceIndex), f_getOriginator(v_resourceIndex)));
475 476 477 478
					v_request.resultContent := int0;//Nothing
					mcaPort.send(m_request(v_request));
					tc_ac.start;
					alt {
479
						[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
480
							tc_ac.stop;
481
							if(ispresent(v_response.primitive.responsePrimitive.primitiveContent)){
482 483 484 485 486
								setverdict(fail, testcasename() & ": Providing content when RC set to 0");
							} else {
								setverdict(pass, testcasename() & ": No content provided with RC set to 0");
							}
						}
487
						[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
488 489 490 491 492 493 494 495 496
							tc_ac.stop;
							setverdict(fail, testcasename() & ": Error while retrieving resource");
						}
						[] tc_ac.timeout {
							setverdict(inconc, testcasename() & ": No answer while retrieving resource");
						}
					}	
    								
					// Postamble
497 498 499 500
					f_cse_postamble_deleteResources();
					
					// Tear down
					f_cf01Down();
501 502 503 504 505 506 507
    				
				}//end f_CSE_DMR_BV_001
    				
			} // end g_CSE_DMR_BV_001
			
			group g_CSE_DMR_BV_002 {
					
508
				testcase TC_CSE_DMR_BV_002_01() runs on CseTester system CseSystem {
509 510 511
					// Local variables
					var template PrimitiveContent v_contentResponse;
					
512
					v_contentResponse.any_1[0].Container_optional := mw_contentContainer_rc1;
513 514 515 516
					                        
					f_CSE_DMR_BV_002(int3, m_createContainerBase, v_contentResponse);//Container
				}

517
				testcase TC_CSE_DMR_BV_002_02() runs on CseTester system CseSystem {
518 519 520
					// Local variables
					var template PrimitiveContent v_contentResponse;
					
521
					v_contentResponse.any_1[0].Group_optional := mw_contentGroup_rc1;
522 523 524 525
					
					f_CSE_DMR_BV_002(int9, m_createGroupBase, v_contentResponse);//Group
				}
					
526
				testcase TC_CSE_DMR_BV_002_03() runs on CseTester system CseSystem {
527 528 529
					// Local variables
					var template PrimitiveContent v_contentResponse;
					
530
					v_contentResponse.any_1[0].AccessControlPolicy_optional := mw_contentAcp_rc1;
531 532 533 534
						
					f_CSE_DMR_BV_002(int1, m_createAcpBase,v_contentResponse);//AccessControlPolicy
				}
				
535
				testcase TC_CSE_DMR_BV_002_04() runs on CseTester system CseSystem {
536 537 538
					// Local variables
					var template PrimitiveContent v_contentResponse;
					
539
					v_contentResponse.any_1[0].Schedule_optional := mw_contentSchedule_rc1;
540 541 542 543
						
					f_CSE_DMR_BV_002(int18, m_createScheduleBase, v_contentResponse);//Schedule
				}
					
544
				testcase TC_CSE_DMR_BV_002_05() runs on CseTester system CseSystem {
545 546 547
					// Local variables
					var template PrimitiveContent v_contentResponse;
					
548
					v_contentResponse.any_1[0].PollingChannel_optional := mw_contentPollingChannelBase;//FIXME
549 550 551 552
						
					f_CSE_DMR_BV_002(int15, m_createPollingChannelBase, v_contentResponse);//PollingChannel
				}
					
553
				testcase TC_CSE_DMR_BV_002_06() runs on CseTester system CseSystem {
554 555 556
					// Local variables
					var template PrimitiveContent v_contentResponse;
					
557
					v_contentResponse.any_1[0].Subscription_optional := mw_contentSubscription_rc1;
558 559 560 561

					f_CSE_DMR_BV_002(int23, m_createSubscriptionBase, v_contentResponse);//Subscription
				}
				
562
				function f_CSE_DMR_BV_002(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, template PrimitiveContent p_contentResponse) runs on CseTester {
563 564
    				
					// Local variables
565
					var MsgIn v_response;
566
					var RequestPrimitive v_request;
567 568 569
					
					var integer v_aeIndex := -1;
					var integer v_resourceIndex := -1;
570 571 572 573 574 575 576 577 578
    										   
					// Test control
    				
					// Test component configuration
					f_cf01Up();
    				
					// Test adapter configuration
    				
					// Preamble
579
					v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
580
					
581
					v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive, v_aeIndex); 				
582 583
    									
					// Test Body
584
					v_request := valueof(m_retrieveResource(f_getResourceAddress(v_resourceIndex), f_getOriginator(v_resourceIndex)));
585 586 587 588
					v_request.resultContent := int1;//Attributes
					mcaPort.send(m_request(v_request));
					tc_ac.start;
					alt {
589
						[] mcaPort.receive(mw_response(mw_responsePrimitiveOK(p_contentResponse))) -> value v_response {
590 591 592
							tc_ac.stop;
							setverdict(pass, testcasename() & ": No child resources provided with RC set to 1");
						}
593
						[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
594 595 596
							tc_ac.stop;
							setverdict(fail, testcasename() & ": Child resources provided with RC set to 1");
						}
597
						[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
598 599 600 601 602 603 604 605 606
							tc_ac.stop;
							setverdict(fail, testcasename() & ": Error while retrieving resource");
						}
						[] tc_ac.timeout {
							setverdict(inconc, testcasename() & ": No answer while retrieving resource");
						}
					}	
    								
					// Postamble
607 608 609 610
					f_cse_postamble_deleteResources();
					
					// Tear down
					f_cf01Down();
611 612 613 614
    				
				}//end f_CSE_DMR_BV_002
    				
			} // end g_CSE_DMR_BV_002
615
			
616 617
			group g_CSE_DMR_BV_003 {
					
618
				testcase TC_CSE_DMR_BV_003_01() runs on CseTester system CseSystem {
619 620 621
					// Local variables
					var template PrimitiveContent v_contentResponse;
					
622
					v_contentResponse.any_1[0].AnyURI := mw_contentContainer_rc2;
623 624 625 626
					                        
					f_CSE_DMR_BV_003(int3, m_createContainerBase, v_contentResponse);//Container
				}

627
				testcase TC_CSE_DMR_BV_003_02() runs on CseTester system CseSystem {
628 629 630
					// Local variables
					var template PrimitiveContent v_contentResponse;
					
631
					v_contentResponse.any_1[0].AnyURI := mw_contentGroup_rc2;
632 633 634 635
					
					f_CSE_DMR_BV_003(int9, m_createGroupBase, v_contentResponse);//Group
				}
					
636
				testcase TC_CSE_DMR_BV_003_03() runs on CseTester system CseSystem {
637 638 639
					// Local variables
					var template PrimitiveContent v_contentResponse;
					
640
					v_contentResponse.any_1[0].AnyURI := mw_contentAcp_rc2;
641 642 643 644
						
					f_CSE_DMR_BV_003(int1, m_createAcpBase,v_contentResponse);//AccessControlPolicy
				}
				
645
				testcase TC_CSE_DMR_BV_003_04() runs on CseTester system CseSystem {
646 647 648
					// Local variables
					var template PrimitiveContent v_contentResponse;
					
649
					v_contentResponse.any_1[0].AnyURI := mw_contentSchedule_rc2;
650 651 652 653
						
					f_CSE_DMR_BV_003(int18, m_createScheduleBase, v_contentResponse);//Schedule
				}
					
654
				testcase TC_CSE_DMR_BV_003_05() runs on CseTester system CseSystem {
655 656 657
					// Local variables
					var template PrimitiveContent v_contentResponse;
					
658
					v_contentResponse.any_1[0].PollingChannel_optional := mw_contentPollingChannelBase;//FIXME
659 660 661 662
						
					f_CSE_DMR_BV_003(int15, m_createPollingChannelBase, v_contentResponse);//PollingChannel
				}
					
663
				testcase TC_CSE_DMR_BV_003_06() runs on CseTester system CseSystem {
664 665 666
					// Local variables
					var template PrimitiveContent v_contentResponse;
					
667
					v_contentResponse.any_1[0].AnyURI := mw_contentSubscription_rc2;
668 669 670 671

					f_CSE_DMR_BV_003(int23, m_createSubscriptionBase, v_contentResponse);//Subscription
				}
				
672
				function f_CSE_DMR_BV_003(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, template PrimitiveContent p_contentResponse) runs on CseTester {
673 674
    				
					// Local variables
675
					var MsgIn v_response;
676
					var RequestPrimitive v_request;
677 678 679 680
					
					var integer v_aeIndex := -1;
					var integer v_resourceIndex := -1;
 						   
681 682 683 684 685 686 687 688
					// Test control
    				
					// Test component configuration
					f_cf01Up();
    				
					// Test adapter configuration
    				
					// Preamble
689
					v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
690
					
691
					v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive, v_aeIndex); 				
692 693
    									
					// Test Body
694
					v_request := valueof(m_retrieveResource(f_getResourceAddress(v_resourceIndex), f_getOriginator(v_resourceIndex)));
695 696 697 698
					v_request.resultContent := int2;//Attributes
					mcaPort.send(m_request(v_request));
					tc_ac.start;
					alt {
699
						[] mcaPort.receive(mw_response(mw_responsePrimitiveOK(p_contentResponse))) -> value v_response {
700
							tc_ac.stop;
701
							setverdict(pass, testcasename() & ": Only hierarchical address provided with RC set to 2");
702
						}
703
						[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
704
							tc_ac.stop;
705
							setverdict(fail, testcasename() & ": Not only hierarchical address provided with RC set to 2");
706
						}
707
						[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
708 709 710 711 712 713 714 715 716
							tc_ac.stop;
							setverdict(fail, testcasename() & ": Error while retrieving resource");
						}
						[] tc_ac.timeout {
							setverdict(inconc, testcasename() & ": No answer while retrieving resource");
						}
					}	
    								
					// Postamble
717 718 719 720
					f_cse_postamble_deleteResources();
					
					// Tear down
					f_cf01Down();
721 722 723 724 725 726 727
    				
				}//end f_CSE_DMR_BV_003
    				
			} // end g_CSE_DMR_BV_003
			
			group g_CSE_DMR_BV_004 {
					
728
				testcase TC_CSE_DMR_BV_004_01() runs on CseTester system CseSystem {
729 730 731
					// Local variables
					var template PrimitiveContent v_contentResponse;
					
732
					v_contentResponse.any_1[0].Container_optional := mw_contentContainer_rc3;
733 734 735 736
					                        
					f_CSE_DMR_BV_004(int3, m_createContainerBase, v_contentResponse);//Container
				}

737
				testcase TC_CSE_DMR_BV_004_02() runs on CseTester system CseSystem {
738 739 740
					// Local variables
					var template PrimitiveContent v_contentResponse;
					
741
					v_contentResponse.any_1[0].Group_optional := mw_contentGroup_rc3;
742 743 744 745
					
					f_CSE_DMR_BV_004(int9, m_createGroupBase, v_contentResponse);//Group
				}
					
746
				testcase TC_CSE_DMR_BV_004_03() runs on CseTester system CseSystem {
747 748 749
					// Local variables
					var template PrimitiveContent v_contentResponse;
					
750
					v_contentResponse.any_1[0].AccessControlPolicy_optional := mw_contentAcp_rc3;
751 752 753 754
						
					f_CSE_DMR_BV_004(int1, m_createAcpBase,v_contentResponse);//AccessControlPolicy
				}
				
755
				testcase TC_CSE_DMR_BV_004_04() runs on CseTester system CseSystem {
756 757 758
					// Local variables
					var template PrimitiveContent v_contentResponse;
					
759
					v_contentResponse.any_1[0].Schedule_optional := mw_contentSchedule_rc3;
760 761 762 763
						
					f_CSE_DMR_BV_004(int18, m_createScheduleBase, v_contentResponse);//Schedule
				}
					
764
				testcase TC_CSE_DMR_BV_004_05() runs on CseTester system CseSystem {
765 766 767
					// Local variables
					var template PrimitiveContent v_contentResponse;
					
768
					v_contentResponse.any_1[0].PollingChannel_optional := mw_contentPollingChannelBase;//FIXME
769 770 771 772
						
					f_CSE_DMR_BV_004(int15, m_createPollingChannelBase, v_contentResponse);//PollingChannel
				}
					
773
				testcase TC_CSE_DMR_BV_004_06() runs on CseTester system CseSystem {
774 775 776
					// Local variables
					var template PrimitiveContent v_contentResponse;
					
777
					v_contentResponse.any_1[0].Subscription_optional := mw_contentSubscription_rc3;
778 779 780 781

					f_CSE_DMR_BV_004(int23, m_createSubscriptionBase, v_contentResponse);//Subscription
				}
				
782
				function f_CSE_DMR_BV_004(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, template PrimitiveContent p_contentResponse) runs on CseTester {
783 784
    				
					// Local variables
785
					var MsgIn v_response;
786
					var RequestPrimitive v_request;
787 788 789 790
					
					var integer v_aeIndex := -1;
					var integer v_resourceIndex := -1;
											   
791 792 793 794 795 796 797 798
					// Test control
    				
					// Test component configuration
					f_cf01Up();
    				
					// Test adapter configuration
    				
					// Preamble
799
					v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
800
					
801
					v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive, v_aeIndex); 				
802 803
    									
					// Test Body
804 805
					v_request := valueof(m_retrieveResource(f_getResourceAddress(v_resourceIndex), f_getOriginator(v_resourceIndex)));
					v_request.resultContent := int3;//Hierarchical address and attributes
806 807 808
					mcaPort.send(m_request(v_request));
					tc_ac.start;
					alt {
809
						[] mcaPort.receive(mw_response(mw_responsePrimitiveOK(p_contentResponse))) -> value v_response {
810 811 812
							tc_ac.stop;
							setverdict(pass, testcasename() & ": No child resources provided with RC set to 1");
						}
813
						[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
814 815 816
							tc_ac.stop;
							setverdict(fail, testcasename() & ": Child resources provided with RC set to 1");
						}
817
						[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
818 819 820 821 822 823 824 825 826
							tc_ac.stop;
							setverdict(fail, testcasename() & ": Error while retrieving resource");
						}
						[] tc_ac.timeout {
							setverdict(inconc, testcasename() & ": No answer while retrieving resource");
						}
					}	
    								
					// Postamble
827 828 829 830
					f_cse_postamble_deleteResources();
					
					// Tear down
					f_cf01Down();
831 832 833 834 835 836 837
    				
				}//end f_CSE_DMR_BV_004
    				
			} // end g_CSE_DMR_BV_004
			
			group g_CSE_DMR_BV_005 {
					
838
				testcase TC_CSE_DMR_BV_005_01() runs on CseTester system CseSystem {
839 840 841
					// Local variables
					var template PrimitiveContent v_contentResponse;
					
842
					v_contentResponse.any_1[0].Container_optional := mw_contentContainer_rc4;
843 844 845 846
					                        
					f_CSE_DMR_BV_005(int3, m_createContainerBase, v_contentResponse);//Container
				}

847
				testcase TC_CSE_DMR_BV_005_02() runs on CseTester system CseSystem {
848 849 850
					// Local variables
					var template PrimitiveContent v_contentResponse;
					
851
					v_contentResponse.any_1[0].Group_optional := mw_contentGroup_rc4;
852 853 854 855
					
					f_CSE_DMR_BV_005(int9, m_createGroupBase, v_contentResponse);//Group
				}
					
856
				testcase TC_CSE_DMR_BV_005_03() runs on CseTester system CseSystem {
857 858 859
					// Local variables
					var template PrimitiveContent v_contentResponse;
					
860
					v_contentResponse.any_1[0].AccessControlPolicy_optional := mw_contentAcp_rc4;
861 862 863 864
						
					f_CSE_DMR_BV_005(int1, m_createAcpBase,v_contentResponse);//AccessControlPolicy
				}
				
865
				testcase TC_CSE_DMR_BV_005_04() runs on CseTester system CseSystem {
866 867 868
					// Local variables
					var template PrimitiveContent v_contentResponse;
					
869
					v_contentResponse.any_1[0].Schedule_optional := mw_contentSchedule_rc4;
870 871 872 873
						
					f_CSE_DMR_BV_005(int18, m_createScheduleBase, v_contentResponse);//Schedule
				}
					
874
				testcase TC_CSE_DMR_BV_005_05() runs on CseTester system CseSystem {
875 876 877
					// Local variables
					var template PrimitiveContent v_contentResponse;
					
878
					v_contentResponse.any_1[0].PollingChannel_optional := mw_contentPollingChannelBase;//FIXME
879 880 881 882
						
					f_CSE_DMR_BV_005(int15, m_createPollingChannelBase, v_contentResponse);//PollingChannel
				}
					
883
				testcase TC_CSE_DMR_BV_005_06() runs on CseTester system CseSystem {
884 885 886
					// Local variables
					var template PrimitiveContent v_contentResponse;
					
887
					v_contentResponse.any_1[0].Subscription_optional := mw_contentSubscription_rc4;
888 889 890 891

					f_CSE_DMR_BV_005(int23, m_createSubscriptionBase, v_contentResponse);//Subscription
				}
				
892
				function f_CSE_DMR_BV_005(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, template PrimitiveContent p_contentResponse) runs on CseTester {
893 894
    				
					// Local variables
895
					var MsgIn v_response;
896
					var RequestPrimitive v_request;
897 898 899
					
					var integer v_aeIndex := -1;
					var integer v_resourceIndex := -1;
900 901 902 903 904 905 906 907 908
    										   
					// Test control
    				
					// Test component configuration
					f_cf01Up();
    				
					// Test adapter configuration
    				
					// Preamble
909
					v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
910
					
911
					v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive, v_aeIndex); 				
912 913
    									
					// Test Body
914
					v_request := valueof(m_retrieveResource(f_getResourceAddress(v_resourceIndex), f_getOriginator(v_resourceIndex)));
915 916 917 918
					v_request.resultContent := int1;//Attributes
					mcaPort.send(m_request(v_request));
					tc_ac.start;
					alt {
919
						[] mcaPort.receive(mw_response(mw_responsePrimitiveOK(p_contentResponse))) -> value v_response {
920 921 922
							tc_ac.stop;
							setverdict(pass, testcasename() & ": No child resources provided with RC set to 1");
						}
923
						[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
924 925 926
							tc_ac.stop;
							setverdict(fail, testcasename() & ": Child resources provided with RC set to 1");
						}
927
						[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
928 929 930 931 932 933 934 935 936
							tc_ac.stop;
							setverdict(fail, testcasename() & ": Error while retrieving resource");
						}
						[] tc_ac.timeout {
							setverdict(inconc, testcasename() & ": No answer while retrieving resource");
						}
					}	
    								
					// Postamble
937 938 939 940
					f_cse_postamble_deleteResources();
					
					// Tear down
					f_cf01Down();
941 942 943 944 945 946 947
    				
				}//end f_CSE_DMR_BV_005
    				
			} // end g_CSE_DMR_BV_005
			
			group g_CSE_DMR_BV_006 {
					
948
				testcase TC_CSE_DMR_BV_006_01() runs on CseTester system CseSystem {
949 950 951
					// Local variables
					var template PrimitiveContent v_contentResponse;
					
952
					v_contentResponse.any_1[0].Container_optional := mw_contentContainer_rc5;
953 954 955 956
					                        
					f_CSE_DMR_BV_006(int3, m_createContainerBase, v_contentResponse);//Container
				}

957
				testcase TC_CSE_DMR_BV_006_02() runs on CseTester system CseSystem {
958 959 960
					// Local variables
					var template PrimitiveContent v_contentResponse;
					
961
					v_contentResponse.any_1[0].Group_optional := mw_contentGroup_rc5;
962 963 964 965
					
					f_CSE_DMR_BV_006(int9, m_createGroupBase, v_contentResponse);//Group
				}
					
966
				testcase TC_CSE_DMR_BV_006_03() runs on CseTester system CseSystem {
967 968 969