OneM2M_Testcases.ttcn 199 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 173 2016-11-22 08:10:48Z reinaortega $
11 12 13
 *  @desc       Module containing test cases for oneM2M
 *
 */
14
 //Test
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29

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;
	import from OneM2M_Functions all;
	import from LibCommon_Time {modulepar all};
	import from XSD all;
	
	//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 101 102 103 104 105 106 107 108
							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;
			}	
		}
		
	
	
	
	}//end group oneM2M_demos
	
	group CSE {
		
109
		group Registration {
110
	  	  	
111
			testcase TC_CSE_REG_BV_001() runs on CseTester system CseSystem {
112
	  	  	
113
				var MsgIn v_response;
114
				var RequestPrimitive v_request;
115
				var integer v_cseBaseIndex := -1;
116 117
				var integer v_resourceIndex := -1;
				var ResourceType v_resourceType := int2;
118 119 120
                
                // Test component configuration
				f_cf01Up();
121
                
122
				//Preambule
123
				v_cseBaseIndex := f_cse_preamble_createServiceSubscribedAppRule({"C-AE-ID-STEM"});//c_CRUDNDi);
124
	
125 126 127
				//Test Body
				v_request := valueof(m_createAe(PX_APP_ID, omit, omit));	
				
128
				v_request := f_getCreateRequestPrimitive(v_resourceType, v_request, v_cseBaseIndex);
129 130 131 132 133
				
				mcaPort.send(m_request(v_request));
				
				tc_ac.start;
				alt {
134
					[] mcaPort.receive(mw_response(mw_responsePrimitive(int2001))) {
135 136 137
						tc_ac.stop;
						setverdict(pass, testcasename() & ": AE successfuly created.");
					}
138
					[] mcaPort.receive(mw_response(mw_responsePrimitiveInverse(int2001))) -> value v_response{
139
						tc_ac.stop;
140
						setverdict(fail, testcasename() & ": Error while creating AE with status code " & int2str(enum2int(v_response.primitive.responsePrimitive.responseStatusCode)));
141 142 143 144 145 146 147
					}
					[] tc_ac.timeout {
						setverdict(inconc, testcasename() & ": No answer while creating AE");
					}
				}	
								
				// Postamble
148 149 150 151
				f_cse_postamble_deleteResources();
				
				// Tear down
				f_cf01Down();
152
					
153
			}
154
	  	  	
155
			testcase TC_CSE_REG_BV_002() runs on CseTester system CseSystem {
156
	  	  	
157
				var MsgIn v_response;
158
				var RequestPrimitive v_request;
159
				var integer v_cseBaseIndex := -1;
160
				var ResourceType v_resourceType := int2;
161 162 163
                
                // Test component configuration
				f_cf01Up();
164
	  	  	
165
				//Preambule
166
				v_cseBaseIndex := f_cse_preamble_createServiceSubscribedAppRule({"C-AE-ID-STEM"});//c_CRUDNDi);
167 168 169
				
				//Test Body
				v_request := valueof(m_createAe(PX_APP_ID, omit, "C-AE-ID-STEM"));				
170
    									
171
				v_request := f_getCreateRequestPrimitive(v_resourceType, v_request, v_cseBaseIndex);
172

173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193
				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();
194
					
195
			}
196
	  	  	
197
			testcase TC_CSE_REG_BV_003() runs on CseTester system CseSystem {
198
	  	  	
199
				var MsgIn v_response;
200
				var RequestPrimitive v_request;
201
				var integer v_cseBaseIndex := -1;
202
				var ResourceType v_resourceType := int2;
203 204 205
                
                // Test component configuration
				f_cf01Up();
206
				
207
				//Preambule
208
				v_cseBaseIndex := f_cse_preamble_createServiceSubscribedAppRule(omit);//c_CRUDNDi);				
209 210
    									
				// Test Body
211 212
				v_request := valueof(m_createAe(PX_APP_ID, omit, omit));				
    									
213
				v_request := f_getCreateRequestPrimitive(v_resourceType, v_request, v_cseBaseIndex);
214
				
215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235
				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();
236
					
237
			}
238
	  	  	
239
			testcase TC_CSE_REG_BV_004() runs on CseTester system CseSystem {
240
	  	  	
241
				var MsgIn v_response;
242
				var RequestPrimitive v_request;
243
				var integer v_cseBaseIndex := -1;
244
				var ResourceType v_resourceType := int2;
245 246 247
                
                // Test component configuration
				f_cf01Up();
248
	  	  	
249
				//Preambule
250
				v_cseBaseIndex := f_cse_preamble_createServiceSubscribedAppRule(omit);//c_CRUDNDi);
251
	
252 253
				//Test Body	
				v_request := valueof(m_createAe(PX_APP_ID, omit, "C-AE-ID-STEM"));				
254
    									
255
				v_request := f_getCreateRequestPrimitive(v_resourceType, v_request, v_cseBaseIndex);
256
		
257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277
				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();
278
					
279
			}
280
	  	  	
281
			testcase TC_CSE_REG_BV_005() runs on CseTester system CseSystem {
282
	  	  	
283
				var MsgIn v_response;
284
				var RequestPrimitive v_request;
285
				var integer v_cseBaseIndex := -1;
286
				var ResourceType v_resourceType := int2;
287 288
                
                // Test component configuration
289
				f_cf02Up();
290
	  	  	
291
				//Preambule
292
				v_cseBaseIndex := f_cse_preamble_createServiceSubscribedAppRule({"S"});//c_CRUDNDi);
293
	
294 295
				//Test Body
				v_request := valueof(m_createAe(PX_APP_ID, omit, "C-AE-ID-STEM"));				
296
    									
297
				v_request := f_getCreateRequestPrimitive(v_resourceType, v_request, v_cseBaseIndex);
298
	  	  		
299 300
				mcaPort.send(m_request(v_request));
				tc_ac.start;
301

302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320
				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();
321
					
322
			}
323
	  	  	
324
		}//end Registration
325 326
		
		group Data_Management_and_Repository {
327 328 329

			group g_CSE_DMR_BV_001 {
					
330
				testcase TC_CSE_DMR_BV_001_01() runs on CseTester system CseSystem {
331 332 333 334 335
					// Local variables
                        
					f_CSE_DMR_BV_001(int3, m_createContainerBase);//Container
				}

336
				testcase TC_CSE_DMR_BV_001_02() runs on CseTester system CseSystem {
337 338 339 340 341
					// Local variables
						
					f_CSE_DMR_BV_001(int9, m_createGroupBase);//Group
				}
					
342
				testcase TC_CSE_DMR_BV_001_03() runs on CseTester system CseSystem {
343 344 345 346 347
					// Local variables
	
					f_CSE_DMR_BV_001(int1, m_createAcpBase);//AccessControlPolicy
				}
				
348
				testcase TC_CSE_DMR_BV_001_04() runs on CseTester system CseSystem {
349 350 351 352 353
					// Local variables
	
					f_CSE_DMR_BV_001(int18, m_createScheduleBase);//Schedule
				}
					
354
				testcase TC_CSE_DMR_BV_001_05() runs on CseTester system CseSystem {
355 356 357 358 359
					// Local variables
	
					f_CSE_DMR_BV_001(int15, m_createPollingChannelBase);//PollingChannel
				}
					
360
				testcase TC_CSE_DMR_BV_001_06() runs on CseTester system CseSystem {
361 362 363 364 365
						// Local variables
	
					f_CSE_DMR_BV_001(int23, m_createSubscriptionBase);//Subscription
					}
				
366
				function f_CSE_DMR_BV_001(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive) runs on CseTester {
367 368
    				
					// Local variables
369
					var MsgIn v_response;
370
					var RequestPrimitive v_request;
371 372
					var integer v_aeIndex := -1;
					var integer v_resourceIndex := -1;
373 374 375 376 377 378 379 380 381
    										   
					// Test control
    				
					// Test component configuration
					f_cf01Up();
    				
					// Test adapter configuration
    				
					// Preamble
382
					v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
383
					    					
384
					v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive, v_aeIndex); 				
385 386
    									
					// Test Body
387
					v_request := valueof(m_retrieveResource(f_getResourceAddress(v_resourceIndex)));
388 389 390 391
					v_request.resultContent := int0;//Nothing
					mcaPort.send(m_request(v_request));
					tc_ac.start;
					alt {
392
						[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
393
							tc_ac.stop;
394
							if(ispresent(v_response.primitive.responsePrimitive.primitiveContent)){
395 396 397 398 399
								setverdict(fail, testcasename() & ": Providing content when RC set to 0");
							} else {
								setverdict(pass, testcasename() & ": No content provided with RC set to 0");
							}
						}
400
						[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
401 402 403 404 405 406 407 408 409
							tc_ac.stop;
							setverdict(fail, testcasename() & ": Error while retrieving resource");
						}
						[] tc_ac.timeout {
							setverdict(inconc, testcasename() & ": No answer while retrieving resource");
						}
					}	
    								
					// Postamble
410 411 412 413
					f_cse_postamble_deleteResources();
					
					// Tear down
					f_cf01Down();
414 415 416 417 418 419 420
    				
				}//end f_CSE_DMR_BV_001
    				
			} // end g_CSE_DMR_BV_001
			
			group g_CSE_DMR_BV_002 {
					
421
				testcase TC_CSE_DMR_BV_002_01() runs on CseTester system CseSystem {
422 423 424
					// Local variables
					var template PrimitiveContent v_contentResponse;
					
425
					v_contentResponse.any_1[0].Container_optional := mw_contentContainer_rc1;
426 427 428 429
					                        
					f_CSE_DMR_BV_002(int3, m_createContainerBase, v_contentResponse);//Container
				}

430
				testcase TC_CSE_DMR_BV_002_02() runs on CseTester system CseSystem {
431 432 433
					// Local variables
					var template PrimitiveContent v_contentResponse;
					
434
					v_contentResponse.any_1[0].Group_optional := mw_contentGroup_rc1;
435 436 437 438
					
					f_CSE_DMR_BV_002(int9, m_createGroupBase, v_contentResponse);//Group
				}
					
439
				testcase TC_CSE_DMR_BV_002_03() runs on CseTester system CseSystem {
440 441 442
					// Local variables
					var template PrimitiveContent v_contentResponse;
					
443
					v_contentResponse.any_1[0].AccessControlPolicy_optional := mw_contentAcp_rc1;
444 445 446 447
						
					f_CSE_DMR_BV_002(int1, m_createAcpBase,v_contentResponse);//AccessControlPolicy
				}
				
448
				testcase TC_CSE_DMR_BV_002_04() runs on CseTester system CseSystem {
449 450 451
					// Local variables
					var template PrimitiveContent v_contentResponse;
					
452
					v_contentResponse.any_1[0].Schedule_optional := mw_contentSchedule_rc1;
453 454 455 456
						
					f_CSE_DMR_BV_002(int18, m_createScheduleBase, v_contentResponse);//Schedule
				}
					
457
				testcase TC_CSE_DMR_BV_002_05() runs on CseTester system CseSystem {
458 459 460
					// Local variables
					var template PrimitiveContent v_contentResponse;
					
461
					v_contentResponse.any_1[0].PollingChannel_optional := mw_contentPollingChannelBase;//FIXME
462 463 464 465
						
					f_CSE_DMR_BV_002(int15, m_createPollingChannelBase, v_contentResponse);//PollingChannel
				}
					
466
				testcase TC_CSE_DMR_BV_002_06() runs on CseTester system CseSystem {
467 468 469
					// Local variables
					var template PrimitiveContent v_contentResponse;
					
470
					v_contentResponse.any_1[0].Subscription_optional := mw_contentSubscription_rc1;
471 472 473 474

					f_CSE_DMR_BV_002(int23, m_createSubscriptionBase, v_contentResponse);//Subscription
				}
				
475
				function f_CSE_DMR_BV_002(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, template PrimitiveContent p_contentResponse) runs on CseTester {
476 477
    				
					// Local variables
478
					var MsgIn v_response;
479
					var RequestPrimitive v_request;
480 481 482
					
					var integer v_aeIndex := -1;
					var integer v_resourceIndex := -1;
483 484 485 486 487 488 489 490 491
    										   
					// Test control
    				
					// Test component configuration
					f_cf01Up();
    				
					// Test adapter configuration
    				
					// Preamble
492
					v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
493
					
494
					v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive, v_aeIndex); 				
495 496
    									
					// Test Body
497
					v_request := valueof(m_retrieveResource(f_getResourceAddress(v_resourceIndex)));
498 499 500 501
					v_request.resultContent := int1;//Attributes
					mcaPort.send(m_request(v_request));
					tc_ac.start;
					alt {
502
						[] mcaPort.receive(mw_response(mw_responsePrimitiveOK(p_contentResponse))) -> value v_response {
503 504 505
							tc_ac.stop;
							setverdict(pass, testcasename() & ": No child resources provided with RC set to 1");
						}
506
						[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
507 508 509
							tc_ac.stop;
							setverdict(fail, testcasename() & ": Child resources provided with RC set to 1");
						}
510
						[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
511 512 513 514 515 516 517 518 519
							tc_ac.stop;
							setverdict(fail, testcasename() & ": Error while retrieving resource");
						}
						[] tc_ac.timeout {
							setverdict(inconc, testcasename() & ": No answer while retrieving resource");
						}
					}	
    								
					// Postamble
520 521 522 523
					f_cse_postamble_deleteResources();
					
					// Tear down
					f_cf01Down();
524 525 526 527
    				
				}//end f_CSE_DMR_BV_002
    				
			} // end g_CSE_DMR_BV_002
528
			
529 530
			group g_CSE_DMR_BV_003 {
					
531
				testcase TC_CSE_DMR_BV_003_01() runs on CseTester system CseSystem {
532 533 534
					// Local variables
					var template PrimitiveContent v_contentResponse;
					
535
					v_contentResponse.any_1[0].AnyURI := mw_contentContainer_rc2;
536 537 538 539
					                        
					f_CSE_DMR_BV_003(int3, m_createContainerBase, v_contentResponse);//Container
				}

540
				testcase TC_CSE_DMR_BV_003_02() runs on CseTester system CseSystem {
541 542 543
					// Local variables
					var template PrimitiveContent v_contentResponse;
					
544
					v_contentResponse.any_1[0].AnyURI := mw_contentGroup_rc2;
545 546 547 548
					
					f_CSE_DMR_BV_003(int9, m_createGroupBase, v_contentResponse);//Group
				}
					
549
				testcase TC_CSE_DMR_BV_003_03() runs on CseTester system CseSystem {
550 551 552
					// Local variables
					var template PrimitiveContent v_contentResponse;
					
553
					v_contentResponse.any_1[0].AnyURI := mw_contentAcp_rc2;
554 555 556 557
						
					f_CSE_DMR_BV_003(int1, m_createAcpBase,v_contentResponse);//AccessControlPolicy
				}
				
558
				testcase TC_CSE_DMR_BV_003_04() runs on CseTester system CseSystem {
559 560 561
					// Local variables
					var template PrimitiveContent v_contentResponse;
					
562
					v_contentResponse.any_1[0].AnyURI := mw_contentSchedule_rc2;
563 564 565 566
						
					f_CSE_DMR_BV_003(int18, m_createScheduleBase, v_contentResponse);//Schedule
				}
					
567
				testcase TC_CSE_DMR_BV_003_05() runs on CseTester system CseSystem {
568 569 570
					// Local variables
					var template PrimitiveContent v_contentResponse;
					
571
					v_contentResponse.any_1[0].PollingChannel_optional := mw_contentPollingChannelBase;//FIXME
572 573 574 575
						
					f_CSE_DMR_BV_003(int15, m_createPollingChannelBase, v_contentResponse);//PollingChannel
				}
					
576
				testcase TC_CSE_DMR_BV_003_06() runs on CseTester system CseSystem {
577 578 579
					// Local variables
					var template PrimitiveContent v_contentResponse;
					
580
					v_contentResponse.any_1[0].AnyURI := mw_contentSubscription_rc2;
581 582 583 584

					f_CSE_DMR_BV_003(int23, m_createSubscriptionBase, v_contentResponse);//Subscription
				}
				
585
				function f_CSE_DMR_BV_003(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, template PrimitiveContent p_contentResponse) runs on CseTester {
586 587
    				
					// Local variables
588
					var MsgIn v_response;
589
					var RequestPrimitive v_request;
590 591 592 593
					
					var integer v_aeIndex := -1;
					var integer v_resourceIndex := -1;
 						   
594 595 596 597 598 599 600 601
					// Test control
    				
					// Test component configuration
					f_cf01Up();
    				
					// Test adapter configuration
    				
					// Preamble
602
					v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
603
					
604
					v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive, v_aeIndex); 				
605 606
    									
					// Test Body
607
					v_request := valueof(m_retrieveResource(f_getResourceAddress(v_resourceIndex)));
608 609 610 611
					v_request.resultContent := int2;//Attributes
					mcaPort.send(m_request(v_request));
					tc_ac.start;
					alt {
612
						[] mcaPort.receive(mw_response(mw_responsePrimitiveOK(p_contentResponse))) -> value v_response {
613
							tc_ac.stop;
614
							setverdict(pass, testcasename() & ": Only hierarchical address provided with RC set to 2");
615
						}
616
						[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
617
							tc_ac.stop;
618
							setverdict(fail, testcasename() & ": Not only hierarchical address provided with RC set to 2");
619
						}
620
						[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
621 622 623 624 625 626 627 628 629
							tc_ac.stop;
							setverdict(fail, testcasename() & ": Error while retrieving resource");
						}
						[] tc_ac.timeout {
							setverdict(inconc, testcasename() & ": No answer while retrieving resource");
						}
					}	
    								
					// Postamble
630 631 632 633
					f_cse_postamble_deleteResources();
					
					// Tear down
					f_cf01Down();
634 635 636 637 638 639 640
    				
				}//end f_CSE_DMR_BV_003
    				
			} // end g_CSE_DMR_BV_003
			
			group g_CSE_DMR_BV_004 {
					
641
				testcase TC_CSE_DMR_BV_004_01() runs on CseTester system CseSystem {
642 643 644
					// Local variables
					var template PrimitiveContent v_contentResponse;
					
645
					v_contentResponse.any_1[0].Container_optional := mw_contentContainer_rc3;
646 647 648 649
					                        
					f_CSE_DMR_BV_004(int3, m_createContainerBase, v_contentResponse);//Container
				}

650
				testcase TC_CSE_DMR_BV_004_02() runs on CseTester system CseSystem {
651 652 653
					// Local variables
					var template PrimitiveContent v_contentResponse;
					
654
					v_contentResponse.any_1[0].Group_optional := mw_contentGroup_rc3;
655 656 657 658
					
					f_CSE_DMR_BV_004(int9, m_createGroupBase, v_contentResponse);//Group
				}
					
659
				testcase TC_CSE_DMR_BV_004_03() runs on CseTester system CseSystem {
660 661 662
					// Local variables
					var template PrimitiveContent v_contentResponse;
					
663
					v_contentResponse.any_1[0].AccessControlPolicy_optional := mw_contentAcp_rc3;
664 665 666 667
						
					f_CSE_DMR_BV_004(int1, m_createAcpBase,v_contentResponse);//AccessControlPolicy
				}
				
668
				testcase TC_CSE_DMR_BV_004_04() runs on CseTester system CseSystem {
669 670 671
					// Local variables
					var template PrimitiveContent v_contentResponse;
					
672
					v_contentResponse.any_1[0].Schedule_optional := mw_contentSchedule_rc3;
673 674 675 676
						
					f_CSE_DMR_BV_004(int18, m_createScheduleBase, v_contentResponse);//Schedule
				}
					
677
				testcase TC_CSE_DMR_BV_004_05() runs on CseTester system CseSystem {
678 679 680
					// Local variables
					var template PrimitiveContent v_contentResponse;
					
681
					v_contentResponse.any_1[0].PollingChannel_optional := mw_contentPollingChannelBase;//FIXME
682 683 684 685
						
					f_CSE_DMR_BV_004(int15, m_createPollingChannelBase, v_contentResponse);//PollingChannel
				}
					
686
				testcase TC_CSE_DMR_BV_004_06() runs on CseTester system CseSystem {
687 688 689
					// Local variables
					var template PrimitiveContent v_contentResponse;
					
690
					v_contentResponse.any_1[0].Subscription_optional := mw_contentSubscription_rc3;
691 692 693 694

					f_CSE_DMR_BV_004(int23, m_createSubscriptionBase, v_contentResponse);//Subscription
				}
				
695
				function f_CSE_DMR_BV_004(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, template PrimitiveContent p_contentResponse) runs on CseTester {
696 697
    				
					// Local variables
698
					var MsgIn v_response;
699
					var RequestPrimitive v_request;
700 701 702 703
					
					var integer v_aeIndex := -1;
					var integer v_resourceIndex := -1;
											   
704 705 706 707 708 709 710 711
					// Test control
    				
					// Test component configuration
					f_cf01Up();
    				
					// Test adapter configuration
    				
					// Preamble
712
					v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
713
					
714
					v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive, v_aeIndex); 				
715 716
    									
					// Test Body
717
					v_request := valueof(m_retrieveResource(f_getResourceAddress(v_resourceIndex)));
718 719 720 721
					v_request.resultContent := int1;//Attributes
					mcaPort.send(m_request(v_request));
					tc_ac.start;
					alt {
722
						[] mcaPort.receive(mw_response(mw_responsePrimitiveOK(p_contentResponse))) -> value v_response {
723 724 725
							tc_ac.stop;
							setverdict(pass, testcasename() & ": No child resources provided with RC set to 1");
						}
726
						[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
727 728 729
							tc_ac.stop;
							setverdict(fail, testcasename() & ": Child resources provided with RC set to 1");
						}
730
						[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
731 732 733 734 735 736 737 738 739
							tc_ac.stop;
							setverdict(fail, testcasename() & ": Error while retrieving resource");
						}
						[] tc_ac.timeout {
							setverdict(inconc, testcasename() & ": No answer while retrieving resource");
						}
					}	
    								
					// Postamble
740 741 742 743
					f_cse_postamble_deleteResources();
					
					// Tear down
					f_cf01Down();
744 745 746 747 748 749 750
    				
				}//end f_CSE_DMR_BV_004
    				
			} // end g_CSE_DMR_BV_004
			
			group g_CSE_DMR_BV_005 {
					
751
				testcase TC_CSE_DMR_BV_005_01() runs on CseTester system CseSystem {
752 753 754
					// Local variables
					var template PrimitiveContent v_contentResponse;
					
755
					v_contentResponse.any_1[0].Container_optional := mw_contentContainer_rc4;
756 757 758 759
					                        
					f_CSE_DMR_BV_005(int3, m_createContainerBase, v_contentResponse);//Container
				}

760
				testcase TC_CSE_DMR_BV_005_02() runs on CseTester system CseSystem {
761 762 763
					// Local variables
					var template PrimitiveContent v_contentResponse;
					
764
					v_contentResponse.any_1[0].Group_optional := mw_contentGroup_rc4;
765 766 767 768
					
					f_CSE_DMR_BV_005(int9, m_createGroupBase, v_contentResponse);//Group
				}
					
769
				testcase TC_CSE_DMR_BV_005_03() runs on CseTester system CseSystem {
770 771 772
					// Local variables
					var template PrimitiveContent v_contentResponse;
					
773
					v_contentResponse.any_1[0].AccessControlPolicy_optional := mw_contentAcp_rc4;
774 775 776 777
						
					f_CSE_DMR_BV_005(int1, m_createAcpBase,v_contentResponse);//AccessControlPolicy
				}
				
778
				testcase TC_CSE_DMR_BV_005_04() runs on CseTester system CseSystem {
779 780 781
					// Local variables
					var template PrimitiveContent v_contentResponse;
					
782
					v_contentResponse.any_1[0].Schedule_optional := mw_contentSchedule_rc4;
783 784 785 786
						
					f_CSE_DMR_BV_005(int18, m_createScheduleBase, v_contentResponse);//Schedule
				}
					
787
				testcase TC_CSE_DMR_BV_005_05() runs on CseTester system CseSystem {
788 789 790
					// Local variables
					var template PrimitiveContent v_contentResponse;
					
791
					v_contentResponse.any_1[0].PollingChannel_optional := mw_contentPollingChannelBase;//FIXME
792 793 794 795
						
					f_CSE_DMR_BV_005(int15, m_createPollingChannelBase, v_contentResponse);//PollingChannel
				}
					
796
				testcase TC_CSE_DMR_BV_005_06() runs on CseTester system CseSystem {
797 798 799
					// Local variables
					var template PrimitiveContent v_contentResponse;
					
800
					v_contentResponse.any_1[0].Subscription_optional := mw_contentSubscription_rc4;
801 802 803 804

					f_CSE_DMR_BV_005(int23, m_createSubscriptionBase, v_contentResponse);//Subscription
				}
				
805
				function f_CSE_DMR_BV_005(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, template PrimitiveContent p_contentResponse) runs on CseTester {
806 807
    				
					// Local variables
808
					var MsgIn v_response;
809
					var RequestPrimitive v_request;
810 811 812
					
					var integer v_aeIndex := -1;
					var integer v_resourceIndex := -1;
813 814 815 816 817 818 819 820 821
    										   
					// Test control
    				
					// Test component configuration
					f_cf01Up();
    				
					// Test adapter configuration
    				
					// Preamble
822
					v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
823
					
824
					v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive, v_aeIndex); 				
825 826
    									
					// Test Body
827
					v_request := valueof(m_retrieveResource(f_getResourceAddress(v_resourceIndex)));
828 829 830 831
					v_request.resultContent := int1;//Attributes
					mcaPort.send(m_request(v_request));
					tc_ac.start;
					alt {
832
						[] mcaPort.receive(mw_response(mw_responsePrimitiveOK(p_contentResponse))) -> value v_response {
833 834 835
							tc_ac.stop;
							setverdict(pass, testcasename() & ": No child resources provided with RC set to 1");
						}
836
						[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
837 838 839
							tc_ac.stop;
							setverdict(fail, testcasename() & ": Child resources provided with RC set to 1");
						}
840
						[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
841 842 843 844 845 846 847 848 849
							tc_ac.stop;
							setverdict(fail, testcasename() & ": Error while retrieving resource");
						}
						[] tc_ac.timeout {
							setverdict(inconc, testcasename() & ": No answer while retrieving resource");
						}
					}	
    								
					// Postamble
850 851 852 853
					f_cse_postamble_deleteResources();
					
					// Tear down
					f_cf01Down();
854 855 856 857 858 859 860
    				
				}//end f_CSE_DMR_BV_005
    				
			} // end g_CSE_DMR_BV_005
			
			group g_CSE_DMR_BV_006 {
					
861
				testcase TC_CSE_DMR_BV_006_01() runs on CseTester system CseSystem {
862 863 864
					// Local variables
					var template PrimitiveContent v_contentResponse;
					
865
					v_contentResponse.any_1[0].Container_optional := mw_contentContainer_rc5;
866 867 868 869
					                        
					f_CSE_DMR_BV_006(int3, m_createContainerBase, v_contentResponse);//Container
				}

870
				testcase TC_CSE_DMR_BV_006_02() runs on CseTester system CseSystem {
871 872 873
					// Local variables
					var template PrimitiveContent v_contentResponse;
					
874
					v_contentResponse.any_1[0].Group_optional := mw_contentGroup_rc5;
875 876 877 878
					
					f_CSE_DMR_BV_006(int9, m_createGroupBase, v_contentResponse);//Group
				}
					
879
				testcase TC_CSE_DMR_BV_006_03() runs on CseTester system CseSystem {
880 881 882
					// Local variables
					var template PrimitiveContent v_contentResponse;
					
883
					v_contentResponse.any_1[0].AccessControlPolicy_optional := mw_contentAcp_rc5;
884 885 886 887
						
					f_CSE_DMR_BV_006(int1, m_createAcpBase,v_contentResponse);//AccessControlPolicy
				}
				
888
				testcase TC_CSE_DMR_BV_006_04() runs on CseTester system CseSystem {
889 890 891
					// Local variables
					var template PrimitiveContent v_contentResponse;
					
892
					v_contentResponse.any_1[0].Schedule_optional := mw_contentSchedule_rc5;
893 894 895 896
						
					f_CSE_DMR_BV_006(int18, m_createScheduleBase, v_contentResponse);//Schedule
				}
					
897
				testcase TC_CSE_DMR_BV_006_05() runs on CseTester system CseSystem {
898 899 900
					// Local variables
					var template PrimitiveContent v_contentResponse;
					
901
					v_contentResponse.any_1[0].PollingChannel_optional := mw_contentPollingChannelBase;//FIXME
902 903 904 905
						
					f_CSE_DMR_BV_006(int15, m_createPollingChannelBase, v_contentResponse);//PollingChannel
				}
					
906
				testcase TC_CSE_DMR_BV_006_06() runs on CseTester system CseSystem {
907 908 909
					// Local variables
					var template PrimitiveContent v_contentResponse;
					
910
					v_contentResponse.any_1[0].Subscription_optional := mw_contentSubscription_rc5;
911 912 913 914

					f_CSE_DMR_BV_006(int23, m_createSubscriptionBase, v_contentResponse);//Subscription
				}
				
915
				function f_CSE_DMR_BV_006(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, template PrimitiveContent p_contentResponse) runs on CseTester {
916 917
    				
					// Local variables
918
					var MsgIn v_response;
919
					var RequestPrimitive v_request;
920 921 922 923
					
					var integer v_aeIndex := -1;
					var integer v_resourceIndex := -1;
     										   
924 925 926 927 928 929 930 931
					// Test control
    				
					// Test component configuration
					f_cf01Up();
    				
					// Test adapter configuration
    				
					// Preamble
932
					v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
933
					
934
					v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive, v_aeIndex); 				
935 936
    									
					// Test Body
937
					v_request := valueof(m_retrieveResource(f_getResourceAddress(v_resourceIndex)));