OneM2M_Testcases.ttcn 193 KB
Newer Older
1
2
3
4
5
6
7
8
9
/**
 *  Copyright Notification
 *  No part of this document may be reproduced, in an electronic retrieval system or otherwise, except as authorized by written permission.
 *  The copyright and the foregoing restriction extend to reproduction in all media.
 *  © 2016, oneM2M Partners Type 1 (ARIB, ATIS, CCSA, ETSI, TIA, TSDSI, TTA, TTC).
 *  All rights reserved.
 *  
 *  @author     ETSI
 *  @version    $URL: https://forge.etsi.org/svn/oneM2M/trunk/ttcn/OneM2M_Testcases.ttcn $
10
 *              $Id: OneM2M_Testcases.ttcn 103 2016-08-30 09:39:32Z 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
33
34
35
36
			
			testcase TC_DELETE_AE() runs on M2M system M2MSystem {
				
				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
40
41
42
43
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
				t_ac.start;
				alt {
					[] mcaPort.receive(mw_responseOK) {
						t_ac.stop;
						log("Postamble: Resource deleted");
						setverdict(pass);
					}
					[] mcaPort.receive(mw_responseKO) {
						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;
			}	
			
			testcase TC_DELETE_RESOURCES() runs on M2M system M2MSystem {
				
				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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
					t_ac.start;
					alt {
						[] mcaPort.receive(mw_responseOK) {
							t_ac.stop;
							log("Postamble: Resource deleted");
							setverdict(pass);
						}
						[] mcaPort.receive(mw_responseKO) {
							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 M2M system M2MSystem {
112
	  	  	
113
				var M2MResponsePrimitive 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
123
				//Preambule
				v_cseBaseIndex := f_preamble_prepareCSE({"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
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
				
				mcaPort.send(m_request(v_request));
				
				tc_ac.start;
				alt {
					[] mcaPort.receive(mw_response(int2001)) {
						tc_ac.stop;
						setverdict(pass, testcasename() & ": AE successfuly created.");
					}
					[] mcaPort.receive(mw_responseInverse(int2001)) -> value v_response{
						tc_ac.stop;
						setverdict(fail, testcasename() & ": Error while creating AE with status code " & int2str(enum2int(v_response.responsePrimitive_.responseStatusCode)));
					}
					[] tc_ac.timeout {
						setverdict(inconc, testcasename() & ": No answer while creating AE");
					}
				}	
								
				// Postamble
				f_postamble_deleteResources();
149
					
150
			}
151
	  	  	
152
			testcase TC_CSE_REG_BV_002() runs on M2M system M2MSystem {
153
	  	  	
154
				var M2MResponsePrimitive v_response;
155
				var RequestPrimitive v_request;
156
				var integer v_cseBaseIndex := -1;
157
				var ResourceType v_resourceType := int2;
158
159
160
                
                // Test component configuration
				f_cf01Up();
161
	  	  	
162
				//Preambule
163
164
165
166
				v_cseBaseIndex := f_preamble_prepareCSE({"C-AE-ID-STEM"});//c_CRUDNDi);
				
				//Test Body
				v_request := valueof(m_createAe(PX_APP_ID, omit, "C-AE-ID-STEM"));				
167
    									
168
				v_request := f_getCreateRequestPrimitive(v_resourceType, v_request, v_cseBaseIndex);
169

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

290
					alt {
291
						[] mccPort.receive(mw_request(mw_createAEannc(omit, omit, "APP_ID"))) {
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
							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_postamble_deleteResources();
					
307
			}
308
	  	  	
309
		}//end Registration
310
311
		
		group Data_Management_and_Repository {
312
313
314
315
316
317
318
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

			group g_CSE_DMR_BV_001 {
					
				testcase TC_CSE_DMR_BV_001_01() runs on M2M system M2MSystem {
					// Local variables
                        
					f_CSE_DMR_BV_001(int3, m_createContainerBase);//Container
				}

				testcase TC_CSE_DMR_BV_001_02() runs on M2M system M2MSystem {
					// Local variables
						
					f_CSE_DMR_BV_001(int9, m_createGroupBase);//Group
				}
					
				testcase TC_CSE_DMR_BV_001_03() runs on M2M system M2MSystem {
					// Local variables
	
					f_CSE_DMR_BV_001(int1, m_createAcpBase);//AccessControlPolicy
				}
				
				testcase TC_CSE_DMR_BV_001_04() runs on M2M system M2MSystem {
					// Local variables
	
					f_CSE_DMR_BV_001(int18, m_createScheduleBase);//Schedule
				}
					
				testcase TC_CSE_DMR_BV_001_05() runs on M2M system M2MSystem {
					// Local variables
	
					f_CSE_DMR_BV_001(int15, m_createPollingChannelBase);//PollingChannel
				}
					
				testcase TC_CSE_DMR_BV_001_06() runs on M2M system M2MSystem {
						// Local variables
	
					f_CSE_DMR_BV_001(int23, m_createSubscriptionBase);//Subscription
					}
				
				function f_CSE_DMR_BV_001(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive) runs on M2M {
    				
					// Local variables
					var M2MResponsePrimitive v_response;
					var RequestPrimitive v_request;
356
357
					var integer v_aeIndex := -1;
					var integer v_resourceIndex := -1;
358
359
360
361
362
363
364
365
366
    										   
					// Test control
    				
					// Test component configuration
					f_cf01Up();
    				
					// Test adapter configuration
    				
					// Preamble
367
368
369
					v_aeIndex := f_preamble_registerAe();//c_CRUDNDi);
					    					
					v_resourceIndex := f_createResource(p_resourceType, p_requestPrimitive, v_aeIndex); 				
370
371
    									
					// Test Body
372
					v_request := valueof(m_retrieveResource(f_getResourceAddress(v_resourceIndex)));
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
					v_request.resultContent := int0;//Nothing
					mcaPort.send(m_request(v_request));
					tc_ac.start;
					alt {
						[] mcaPort.receive(mw_responseOK) -> value v_response {
							tc_ac.stop;
							if(ispresent(v_response.responsePrimitive_.primitiveContent)){
								setverdict(fail, testcasename() & ": Providing content when RC set to 0");
							} else {
								setverdict(pass, testcasename() & ": No content provided with RC set to 0");
							}
						}
						[] mcaPort.receive(mw_responseKO) {
							tc_ac.stop;
							setverdict(fail, testcasename() & ": Error while retrieving resource");
						}
						[] tc_ac.timeout {
							setverdict(inconc, testcasename() & ": No answer while retrieving resource");
						}
					}	
    								
					// Postamble
395
					f_postamble_deleteResources();
396
397
398
399
400
401
402
403
404
405
406
    				
				}//end f_CSE_DMR_BV_001
    				
			} // end g_CSE_DMR_BV_001
			
			group g_CSE_DMR_BV_002 {
					
				testcase TC_CSE_DMR_BV_002_01() runs on M2M system M2MSystem {
					// Local variables
					var template PrimitiveContent v_contentResponse;
					
407
					v_contentResponse.any_1[0].Container_optional := mw_contentContainer_rc1;
408
409
410
411
412
413
414
415
					                        
					f_CSE_DMR_BV_002(int3, m_createContainerBase, v_contentResponse);//Container
				}

				testcase TC_CSE_DMR_BV_002_02() runs on M2M system M2MSystem {
					// Local variables
					var template PrimitiveContent v_contentResponse;
					
416
					v_contentResponse.any_1[0].Group_optional := mw_contentGroup_rc1;
417
418
419
420
421
422
423
424
					
					f_CSE_DMR_BV_002(int9, m_createGroupBase, v_contentResponse);//Group
				}
					
				testcase TC_CSE_DMR_BV_002_03() runs on M2M system M2MSystem {
					// Local variables
					var template PrimitiveContent v_contentResponse;
					
425
					v_contentResponse.any_1[0].AccessControlPolicy_optional := mw_contentAcp_rc1;
426
427
428
429
430
431
432
433
						
					f_CSE_DMR_BV_002(int1, m_createAcpBase,v_contentResponse);//AccessControlPolicy
				}
				
				testcase TC_CSE_DMR_BV_002_04() runs on M2M system M2MSystem {
					// Local variables
					var template PrimitiveContent v_contentResponse;
					
434
					v_contentResponse.any_1[0].Schedule_optional := mw_contentSchedule_rc1;
435
436
437
438
439
440
441
442
						
					f_CSE_DMR_BV_002(int18, m_createScheduleBase, v_contentResponse);//Schedule
				}
					
				testcase TC_CSE_DMR_BV_002_05() runs on M2M system M2MSystem {
					// Local variables
					var template PrimitiveContent v_contentResponse;
					
443
					v_contentResponse.any_1[0].PollingChannel_optional := mw_contentPollingChannelBase;//FIXME
444
445
446
447
448
449
450
451
						
					f_CSE_DMR_BV_002(int15, m_createPollingChannelBase, v_contentResponse);//PollingChannel
				}
					
				testcase TC_CSE_DMR_BV_002_06() runs on M2M system M2MSystem {
					// Local variables
					var template PrimitiveContent v_contentResponse;
					
452
					v_contentResponse.any_1[0].Subscription_optional := mw_contentSubscription_rc1;
453
454
455
456
457
458
459
460
461

					f_CSE_DMR_BV_002(int23, m_createSubscriptionBase, v_contentResponse);//Subscription
				}
				
				function f_CSE_DMR_BV_002(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, template PrimitiveContent p_contentResponse) runs on M2M {
    				
					// Local variables
					var M2MResponsePrimitive v_response;
					var RequestPrimitive v_request;
462
463
464
					
					var integer v_aeIndex := -1;
					var integer v_resourceIndex := -1;
465
466
467
468
469
470
471
472
473
    										   
					// Test control
    				
					// Test component configuration
					f_cf01Up();
    				
					// Test adapter configuration
    				
					// Preamble
474
					v_aeIndex := f_preamble_registerAe();//c_CRUDNDi);
475
					
476
					v_resourceIndex := f_createResource(p_resourceType, p_requestPrimitive, v_aeIndex); 				
477
478
    									
					// Test Body
479
					v_request := valueof(m_retrieveResource(f_getResourceAddress(v_resourceIndex)));
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
					v_request.resultContent := int1;//Attributes
					mcaPort.send(m_request(v_request));
					tc_ac.start;
					alt {
						[] mcaPort.receive(mw_responseOK(p_contentResponse)) -> value v_response {
							tc_ac.stop;
							setverdict(pass, testcasename() & ": No child resources provided with RC set to 1");
						}
						[] mcaPort.receive(mw_responseOK()) -> value v_response {
							tc_ac.stop;
							setverdict(fail, testcasename() & ": Child resources provided with RC set to 1");
						}
						[] mcaPort.receive(mw_responseKO) {
							tc_ac.stop;
							setverdict(fail, testcasename() & ": Error while retrieving resource");
						}
						[] tc_ac.timeout {
							setverdict(inconc, testcasename() & ": No answer while retrieving resource");
						}
					}	
    								
					// Postamble
502
					f_postamble_deleteResources();
503
504
505
506
    				
				}//end f_CSE_DMR_BV_002
    				
			} // end g_CSE_DMR_BV_002
507
			
508
509
510
511
512
513
			group g_CSE_DMR_BV_003 {
					
				testcase TC_CSE_DMR_BV_003_01() runs on M2M system M2MSystem {
					// Local variables
					var template PrimitiveContent v_contentResponse;
					
514
					v_contentResponse.any_1[0].AnyURI := mw_contentContainer_rc2;
515
516
517
518
519
520
521
522
					                        
					f_CSE_DMR_BV_003(int3, m_createContainerBase, v_contentResponse);//Container
				}

				testcase TC_CSE_DMR_BV_003_02() runs on M2M system M2MSystem {
					// Local variables
					var template PrimitiveContent v_contentResponse;
					
523
					v_contentResponse.any_1[0].AnyURI := mw_contentGroup_rc2;
524
525
526
527
528
529
530
531
					
					f_CSE_DMR_BV_003(int9, m_createGroupBase, v_contentResponse);//Group
				}
					
				testcase TC_CSE_DMR_BV_003_03() runs on M2M system M2MSystem {
					// Local variables
					var template PrimitiveContent v_contentResponse;
					
532
					v_contentResponse.any_1[0].AnyURI := mw_contentAcp_rc2;
533
534
535
536
537
538
539
540
						
					f_CSE_DMR_BV_003(int1, m_createAcpBase,v_contentResponse);//AccessControlPolicy
				}
				
				testcase TC_CSE_DMR_BV_003_04() runs on M2M system M2MSystem {
					// Local variables
					var template PrimitiveContent v_contentResponse;
					
541
					v_contentResponse.any_1[0].AnyURI := mw_contentSchedule_rc2;
542
543
544
545
546
547
548
549
						
					f_CSE_DMR_BV_003(int18, m_createScheduleBase, v_contentResponse);//Schedule
				}
					
				testcase TC_CSE_DMR_BV_003_05() runs on M2M system M2MSystem {
					// Local variables
					var template PrimitiveContent v_contentResponse;
					
550
					v_contentResponse.any_1[0].PollingChannel_optional := mw_contentPollingChannelBase;//FIXME
551
552
553
554
555
556
557
558
						
					f_CSE_DMR_BV_003(int15, m_createPollingChannelBase, v_contentResponse);//PollingChannel
				}
					
				testcase TC_CSE_DMR_BV_003_06() runs on M2M system M2MSystem {
					// Local variables
					var template PrimitiveContent v_contentResponse;
					
559
					v_contentResponse.any_1[0].AnyURI := mw_contentSubscription_rc2;
560
561
562
563
564
565
566
567
568

					f_CSE_DMR_BV_003(int23, m_createSubscriptionBase, v_contentResponse);//Subscription
				}
				
				function f_CSE_DMR_BV_003(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, template PrimitiveContent p_contentResponse) runs on M2M {
    				
					// Local variables
					var M2MResponsePrimitive v_response;
					var RequestPrimitive v_request;
569
570
571
572
					
					var integer v_aeIndex := -1;
					var integer v_resourceIndex := -1;
 						   
573
574
575
576
577
578
579
580
					// Test control
    				
					// Test component configuration
					f_cf01Up();
    				
					// Test adapter configuration
    				
					// Preamble
581
					v_aeIndex := f_preamble_registerAe();//c_CRUDNDi);
582
					
583
					v_resourceIndex := f_createResource(p_resourceType, p_requestPrimitive, v_aeIndex); 				
584
585
    									
					// Test Body
586
					v_request := valueof(m_retrieveResource(f_getResourceAddress(v_resourceIndex)));
587
588
589
590
591
592
					v_request.resultContent := int2;//Attributes
					mcaPort.send(m_request(v_request));
					tc_ac.start;
					alt {
						[] mcaPort.receive(mw_responseOK(p_contentResponse)) -> value v_response {
							tc_ac.stop;
593
							setverdict(pass, testcasename() & ": Only hierarchical address provided with RC set to 2");
594
595
596
						}
						[] mcaPort.receive(mw_responseOK()) -> value v_response {
							tc_ac.stop;
597
							setverdict(fail, testcasename() & ": Not only hierarchical address provided with RC set to 2");
598
599
600
601
602
603
604
605
606
607
608
						}
						[] mcaPort.receive(mw_responseKO) {
							tc_ac.stop;
							setverdict(fail, testcasename() & ": Error while retrieving resource");
						}
						[] tc_ac.timeout {
							setverdict(inconc, testcasename() & ": No answer while retrieving resource");
						}
					}	
    								
					// Postamble
609
					f_postamble_deleteResources();
610
611
612
613
614
615
616
617
618
619
620
    				
				}//end f_CSE_DMR_BV_003
    				
			} // end g_CSE_DMR_BV_003
			
			group g_CSE_DMR_BV_004 {
					
				testcase TC_CSE_DMR_BV_004_01() runs on M2M system M2MSystem {
					// Local variables
					var template PrimitiveContent v_contentResponse;
					
621
					v_contentResponse.any_1[0].Container_optional := mw_contentContainer_rc3;
622
623
624
625
626
627
628
629
					                        
					f_CSE_DMR_BV_004(int3, m_createContainerBase, v_contentResponse);//Container
				}

				testcase TC_CSE_DMR_BV_004_02() runs on M2M system M2MSystem {
					// Local variables
					var template PrimitiveContent v_contentResponse;
					
630
					v_contentResponse.any_1[0].Group_optional := mw_contentGroup_rc3;
631
632
633
634
635
636
637
638
					
					f_CSE_DMR_BV_004(int9, m_createGroupBase, v_contentResponse);//Group
				}
					
				testcase TC_CSE_DMR_BV_004_03() runs on M2M system M2MSystem {
					// Local variables
					var template PrimitiveContent v_contentResponse;
					
639
					v_contentResponse.any_1[0].AccessControlPolicy_optional := mw_contentAcp_rc3;
640
641
642
643
644
645
646
647
						
					f_CSE_DMR_BV_004(int1, m_createAcpBase,v_contentResponse);//AccessControlPolicy
				}
				
				testcase TC_CSE_DMR_BV_004_04() runs on M2M system M2MSystem {
					// Local variables
					var template PrimitiveContent v_contentResponse;
					
648
					v_contentResponse.any_1[0].Schedule_optional := mw_contentSchedule_rc3;
649
650
651
652
653
654
655
656
						
					f_CSE_DMR_BV_004(int18, m_createScheduleBase, v_contentResponse);//Schedule
				}
					
				testcase TC_CSE_DMR_BV_004_05() runs on M2M system M2MSystem {
					// Local variables
					var template PrimitiveContent v_contentResponse;
					
657
					v_contentResponse.any_1[0].PollingChannel_optional := mw_contentPollingChannelBase;//FIXME
658
659
660
661
662
663
664
665
						
					f_CSE_DMR_BV_004(int15, m_createPollingChannelBase, v_contentResponse);//PollingChannel
				}
					
				testcase TC_CSE_DMR_BV_004_06() runs on M2M system M2MSystem {
					// Local variables
					var template PrimitiveContent v_contentResponse;
					
666
					v_contentResponse.any_1[0].Subscription_optional := mw_contentSubscription_rc3;
667
668
669
670
671
672
673
674
675

					f_CSE_DMR_BV_004(int23, m_createSubscriptionBase, v_contentResponse);//Subscription
				}
				
				function f_CSE_DMR_BV_004(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, template PrimitiveContent p_contentResponse) runs on M2M {
    				
					// Local variables
					var M2MResponsePrimitive v_response;
					var RequestPrimitive v_request;
676
677
678
679
					
					var integer v_aeIndex := -1;
					var integer v_resourceIndex := -1;
											   
680
681
682
683
684
685
686
687
					// Test control
    				
					// Test component configuration
					f_cf01Up();
    				
					// Test adapter configuration
    				
					// Preamble
688
					v_aeIndex := f_preamble_registerAe();//c_CRUDNDi);
689
					
690
					v_resourceIndex := f_createResource(p_resourceType, p_requestPrimitive, v_aeIndex); 				
691
692
    									
					// Test Body
693
					v_request := valueof(m_retrieveResource(f_getResourceAddress(v_resourceIndex)));
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
					v_request.resultContent := int1;//Attributes
					mcaPort.send(m_request(v_request));
					tc_ac.start;
					alt {
						[] mcaPort.receive(mw_responseOK(p_contentResponse)) -> value v_response {
							tc_ac.stop;
							setverdict(pass, testcasename() & ": No child resources provided with RC set to 1");
						}
						[] mcaPort.receive(mw_responseOK()) -> value v_response {
							tc_ac.stop;
							setverdict(fail, testcasename() & ": Child resources provided with RC set to 1");
						}
						[] mcaPort.receive(mw_responseKO) {
							tc_ac.stop;
							setverdict(fail, testcasename() & ": Error while retrieving resource");
						}
						[] tc_ac.timeout {
							setverdict(inconc, testcasename() & ": No answer while retrieving resource");
						}
					}	
    								
					// Postamble
716
					f_postamble_deleteResources();
717
718
719
720
721
722
723
724
725
726
727
    				
				}//end f_CSE_DMR_BV_004
    				
			} // end g_CSE_DMR_BV_004
			
			group g_CSE_DMR_BV_005 {
					
				testcase TC_CSE_DMR_BV_005_01() runs on M2M system M2MSystem {
					// Local variables
					var template PrimitiveContent v_contentResponse;
					
728
					v_contentResponse.any_1[0].Container_optional := mw_contentContainer_rc4;
729
730
731
732
733
734
735
736
					                        
					f_CSE_DMR_BV_005(int3, m_createContainerBase, v_contentResponse);//Container
				}

				testcase TC_CSE_DMR_BV_005_02() runs on M2M system M2MSystem {
					// Local variables
					var template PrimitiveContent v_contentResponse;
					
737
					v_contentResponse.any_1[0].Group_optional := mw_contentGroup_rc4;
738
739
740
741
742
743
744
745
					
					f_CSE_DMR_BV_005(int9, m_createGroupBase, v_contentResponse);//Group
				}
					
				testcase TC_CSE_DMR_BV_005_03() runs on M2M system M2MSystem {
					// Local variables
					var template PrimitiveContent v_contentResponse;
					
746
					v_contentResponse.any_1[0].AccessControlPolicy_optional := mw_contentAcp_rc4;
747
748
749
750
751
752
753
754
						
					f_CSE_DMR_BV_005(int1, m_createAcpBase,v_contentResponse);//AccessControlPolicy
				}
				
				testcase TC_CSE_DMR_BV_005_04() runs on M2M system M2MSystem {
					// Local variables
					var template PrimitiveContent v_contentResponse;
					
755
					v_contentResponse.any_1[0].Schedule_optional := mw_contentSchedule_rc4;
756
757
758
759
760
761
762
763
						
					f_CSE_DMR_BV_005(int18, m_createScheduleBase, v_contentResponse);//Schedule
				}
					
				testcase TC_CSE_DMR_BV_005_05() runs on M2M system M2MSystem {
					// Local variables
					var template PrimitiveContent v_contentResponse;
					
764
					v_contentResponse.any_1[0].PollingChannel_optional := mw_contentPollingChannelBase;//FIXME
765
766
767
768
769
770
771
772
						
					f_CSE_DMR_BV_005(int15, m_createPollingChannelBase, v_contentResponse);//PollingChannel
				}
					
				testcase TC_CSE_DMR_BV_005_06() runs on M2M system M2MSystem {
					// Local variables
					var template PrimitiveContent v_contentResponse;
					
773
					v_contentResponse.any_1[0].Subscription_optional := mw_contentSubscription_rc4;
774
775
776
777
778
779
780
781
782

					f_CSE_DMR_BV_005(int23, m_createSubscriptionBase, v_contentResponse);//Subscription
				}
				
				function f_CSE_DMR_BV_005(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, template PrimitiveContent p_contentResponse) runs on M2M {
    				
					// Local variables
					var M2MResponsePrimitive v_response;
					var RequestPrimitive v_request;
783
784
785
					
					var integer v_aeIndex := -1;
					var integer v_resourceIndex := -1;
786
787
788
789
790
791
792
793
794
    										   
					// Test control
    				
					// Test component configuration
					f_cf01Up();
    				
					// Test adapter configuration
    				
					// Preamble
795
					v_aeIndex := f_preamble_registerAe();//c_CRUDNDi);
796
					
797
					v_resourceIndex := f_createResource(p_resourceType, p_requestPrimitive, v_aeIndex); 				
798
799
    									
					// Test Body
800
					v_request := valueof(m_retrieveResource(f_getResourceAddress(v_resourceIndex)));
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
					v_request.resultContent := int1;//Attributes
					mcaPort.send(m_request(v_request));
					tc_ac.start;
					alt {
						[] mcaPort.receive(mw_responseOK(p_contentResponse)) -> value v_response {
							tc_ac.stop;
							setverdict(pass, testcasename() & ": No child resources provided with RC set to 1");
						}
						[] mcaPort.receive(mw_responseOK()) -> value v_response {
							tc_ac.stop;
							setverdict(fail, testcasename() & ": Child resources provided with RC set to 1");
						}
						[] mcaPort.receive(mw_responseKO) {
							tc_ac.stop;
							setverdict(fail, testcasename() & ": Error while retrieving resource");
						}
						[] tc_ac.timeout {
							setverdict(inconc, testcasename() & ": No answer while retrieving resource");
						}
					}	
    								
					// Postamble
823
					f_postamble_deleteResources();
824
825
826
827
828
829
830
831
832
833
834
    				
				}//end f_CSE_DMR_BV_005
    				
			} // end g_CSE_DMR_BV_005
			
			group g_CSE_DMR_BV_006 {
					
				testcase TC_CSE_DMR_BV_006_01() runs on M2M system M2MSystem {
					// Local variables
					var template PrimitiveContent v_contentResponse;
					
835
					v_contentResponse.any_1[0].Container_optional := mw_contentContainer_rc5;
836
837
838
839
840
841
842
843
					                        
					f_CSE_DMR_BV_006(int3, m_createContainerBase, v_contentResponse);//Container
				}

				testcase TC_CSE_DMR_BV_006_02() runs on M2M system M2MSystem {
					// Local variables
					var template PrimitiveContent v_contentResponse;
					
844
					v_contentResponse.any_1[0].Group_optional := mw_contentGroup_rc5;
845
846
847
848
849
850
851
852
					
					f_CSE_DMR_BV_006(int9, m_createGroupBase, v_contentResponse);//Group
				}
					
				testcase TC_CSE_DMR_BV_006_03() runs on M2M system M2MSystem {
					// Local variables
					var template PrimitiveContent v_contentResponse;
					
853
					v_contentResponse.any_1[0].AccessControlPolicy_optional := mw_contentAcp_rc5;
854
855
856
857
858
859
860
861
						
					f_CSE_DMR_BV_006(int1, m_createAcpBase,v_contentResponse);//AccessControlPolicy
				}
				
				testcase TC_CSE_DMR_BV_006_04() runs on M2M system M2MSystem {
					// Local variables
					var template PrimitiveContent v_contentResponse;
					
862
					v_contentResponse.any_1[0].Schedule_optional := mw_contentSchedule_rc5;
863
864
865
866
867
868
869
870
						
					f_CSE_DMR_BV_006(int18, m_createScheduleBase, v_contentResponse);//Schedule
				}
					
				testcase TC_CSE_DMR_BV_006_05() runs on M2M system M2MSystem {
					// Local variables
					var template PrimitiveContent v_contentResponse;
					
871
					v_contentResponse.any_1[0].PollingChannel_optional := mw_contentPollingChannelBase;//FIXME
872
873
874
875
876
877
878
879
						
					f_CSE_DMR_BV_006(int15, m_createPollingChannelBase, v_contentResponse);//PollingChannel
				}
					
				testcase TC_CSE_DMR_BV_006_06() runs on M2M system M2MSystem {
					// Local variables
					var template PrimitiveContent v_contentResponse;
					
880
					v_contentResponse.any_1[0].Subscription_optional := mw_contentSubscription_rc5;
881
882
883
884
885
886
887
888
889

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

				testcase TC_CSE_DMR_BV_007_02() runs on M2M system M2MSystem {
					// Local variables
					var template PrimitiveContent v_contentResponse;
					
951
					v_contentResponse.any_1[0].Group_optional := mw_contentGroup_rc6;
952
953
954
955
956
957
958
959
					
					f_CSE_DMR_BV_007(int9, m_createGroupBase, v_contentResponse);//Group
				}
					
				testcase TC_CSE_DMR_BV_007_03() runs on M2M system M2MSystem {
					// Local variables
					var template PrimitiveContent v_contentResponse;
					
960
					v_contentResponse.any_1[0].AccessControlPolicy_optional := mw_contentAcp_rc6;
961
962
963
964
965
966
967
968
						
					f_CSE_DMR_BV_007(int1, m_createAcpBase,v_contentResponse);//AccessControlPolicy
				}
				
				testcase TC_CSE_DMR_BV_007_04() runs on M2M system M2MSystem {
					// Local variables
					var template PrimitiveContent v_contentResponse;
					
969
					v_contentResponse.any_1[0].Schedule_optional := mw_contentSchedule_rc6;
970
971
972
973
974
975
976
977
						
					f_CSE_DMR_BV_007(int18, m_createScheduleBase, v_contentResponse);//Schedule
				}
					
				testcase TC_CSE_DMR_BV_007_05() runs on M2M system M2MSystem {
					// Local variables
					var template PrimitiveContent v_contentResponse;
					
978
					v_contentResponse.any_1[0].PollingChannel_optional := mw_contentPollingChannelBase;//FIXME
979
980
981
982
983
984
985
986
						
					f_CSE_DMR_BV_007(int15, m_createPollingChannelBase, v_contentResponse);//PollingChannel
				}
					
				testcase TC_CSE_DMR_BV_007_06() runs on M2M system M2MSystem {
					// Local variables
					var template PrimitiveContent v_contentResponse;
					
987
					v_contentResponse.any_1[0].Subscription_optional := mw_contentSubscription_rc6;
988
989
990
991
992
993
994
995
996

					f_CSE_DMR_BV_007(int23, m_createSubscriptionBase, v_contentResponse);//Subscription
				}
				
				function f_CSE_DMR_BV_007(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, template PrimitiveContent p_contentResponse) runs on M2M {
    				
					// Local variables
					var M2MResponsePrimitive v_response;
					var RequestPrimitive v_request;
997
998
999
					
					var integer v_aeIndex := -1;
					var integer v_resourceIndex := -1;
1000
    										   
For faster browsing, not all history is shown. View entire blame