OneM2M_Testcases.ttcn 402 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 226 2017-03-09 08:58:45Z reinaortega $
11
12
13
 *  @desc       Module containing test cases for oneM2M
 *
 */
14
 //Test
15
16
17
18
19
20
21
22

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

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

310
				alt {
311
					[] mccPort.receive(mw_request(mw_createAEAnnc(-, -, -, "APP_ID", -))) {
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
356
						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();
					
			}
			
			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 {
357
					[] mcaPort.receive(mw_response(mw_responsePrimitive(int4105))) {
358
359
360
						tc_ac.stop;
						setverdict(pass, testcasename() & ": AE creation rejected.");
					}
361
					[] mcaPort.receive(mw_response(mw_responsePrimitiveInverse(int4105))) -> value v_response{
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
						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
392
				v_request := valueof(m_createAe(PX_APP_ID, omit, "S-AE-ID-STEM"));				
393
394
395
396
    									
				v_request := f_getUpdateRequestPrimitive(v_resourceType,v_cseBaseIndex, v_request);
	  	  		
				mcaPort.send(m_request(v_request));
397
				tc_ac.start;
398

399
				alt {
400
					[] mccPort.receive(mw_request(mw_createAEAnnc(omit, "CSE_ID", "/S", "APP_ID", "S-AE-ID-STEM"))) {
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
						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
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
				f_cf02Down();
					
			}
			
			testcase TC_CSE_REG_BV_008() 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_registerAe();
				f_cse_postamble_deleteResources(); //to deregister the AE, I don't know if it's correct like this?
	
				//Test Body
436
				v_request := valueof(m_createAEAnnc(-, "CSE_ID", "/S", "APP_ID", "S-AE-ID-STEM"));	//TODO to double check all parameters			
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
    									
				v_request := f_getUpdateRequestPrimitive(v_resourceType,v_cseBaseIndex, v_request);
	  	  		
				mccPort.send(m_request(v_request));
				tc_ac.start;

				alt {
					[] mccPort.receive(mw_response(mw_responsePrimitive(int2004))) -> value v_response {
						tc_ac.stop;
						setverdict(pass, testcasename() & ": AE creation redirected.");
						//continue to test the content
					}
					[] 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_cf02Down();
					
			}
			
			testcase TC_CSE_REG_BV_009() runs on CseTester system CseSystem {
	  	  	
				var MsgIn v_response;
				var ResponsePrimitive 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
480
				v_request := valueof(m_responsePrimitive(int2001, "To_be_defined", {any_1 := {{AEAnnc_optional := m_contentCreateAEAnnc({"Credential-ID:None"}, omit, PX_APP_ID, "/CSE_ID/S-AE-ID-STEM")}}}));				
481
	  	  		
482
				mccPort.send(m_response(v_request));
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
				tc_ac.start;

				alt {
					[] mcaPort.receive(mw_response(mw_responsePrimitive(int2001))) -> value v_response {
						tc_ac.stop;
						setverdict(pass, testcasename() & ": AE creation success.");
						//continue to test the content
					}
					[] mcaPort.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_cf02Down();
505
					
506
			}
507
	  	  	
508
		}//end Registration
509
510
		
		group Data_Management_and_Repository {
511
512
513

			group g_CSE_DMR_BV_001 {
					
514
				testcase TC_CSE_DMR_BV_001_01() runs on CseTester system CseSystem {
515
					// Local variables
516
					f_CSE_DMR_BV_001(int3, m_createContainerBase, int0);//ResultContent = 0 (nothing)
517
				}
518
				
519
				testcase TC_CSE_DMR_BV_001_02() runs on CseTester system CseSystem {
520
					// Local variables
521
					f_CSE_DMR_BV_001(int3, m_createContainerBase, int2);//ResultContent = 2 (hierarchical address)
522
523
				}
				
524
				testcase TC_CSE_DMR_BV_001_03() runs on CseTester system CseSystem {
525
					// Local variables
526
					f_CSE_DMR_BV_001(int3, m_createContainerBase, int3);//ResultContent = 3 (attributes and hierarchichal address)
527
528
				}
				
529
				function f_CSE_DMR_BV_001(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, ResultContent p_resultContent) runs on CseTester {
530
531
    				
					// Local variables
532
					var MsgIn v_response;
533
					var RequestPrimitive v_request;
534
535
					var integer v_aeIndex := -1;
					var integer v_resourceIndex := -1;
536
537
538
539
540
541
542
543
544
    										   
					// Test control
    				
					// Test component configuration
					f_cf01Up();
    				
					// Test adapter configuration
    				
					// Preamble
545
					v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
546
					    					
547
					v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive, v_aeIndex); 				
548
549
    									
					// Test Body
550
					v_request := valueof(m_retrieveResource(f_getResourceAddress(v_resourceIndex), f_getOriginator(v_resourceIndex)));
551
					v_request.resultContent := p_resultContent;
552
553
554
					mcaPort.send(m_request(v_request));
					tc_ac.start;
					alt {
555
						[] mcaPort.receive(mw_response(mw_responsePrimitive(int4000))) { //BAD REQUEST
556
							tc_ac.stop;
557
							setverdict(pass, testcasename() & ": Request successfully rejected");
558
						}
559
						[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { 
560
561
562
							tc_ac.stop;
							setverdict(fail, testcasename() & ": Error while retrieving resource");
						}
563
564
565
566
						[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
							tc_ac.stop;
							setverdict(fail, testcasename() & ": Error, Result content set to 0 is impossible for a retrieve request ");
						}
567
568
569
570
571
572
						[] tc_ac.timeout {
							setverdict(inconc, testcasename() & ": No answer while retrieving resource");
						}
					}	
    								
					// Postamble
573
574
575
576
					f_cse_postamble_deleteResources();
					
					// Tear down
					f_cf01Down();
577
578
579
580
581
582
583
    				
				}//end f_CSE_DMR_BV_001
    				
			} // end g_CSE_DMR_BV_001
			
			group g_CSE_DMR_BV_002 {
					
584
				testcase TC_CSE_DMR_BV_002_01() runs on CseTester system CseSystem {
585
586
587
					// Local variables
					var template PrimitiveContent v_contentResponse;
					
588
					v_contentResponse.any_1[0].Container_optional := mw_contentContainer_rc1;
589
590
591
592
					                        
					f_CSE_DMR_BV_002(int3, m_createContainerBase, v_contentResponse);//Container
				}

593
				testcase TC_CSE_DMR_BV_002_02() runs on CseTester system CseSystem {
594
595
596
					// Local variables
					var template PrimitiveContent v_contentResponse;
					
597
					v_contentResponse.any_1[0].Group_optional := mw_contentGroup_rc1;
598
599
600
601
					
					f_CSE_DMR_BV_002(int9, m_createGroupBase, v_contentResponse);//Group
				}
					
602
				testcase TC_CSE_DMR_BV_002_03() runs on CseTester system CseSystem {
603
604
605
					// Local variables
					var template PrimitiveContent v_contentResponse;
					
606
					v_contentResponse.any_1[0].AccessControlPolicy_optional := mw_contentAcp_rc1;
607
608
609
610
						
					f_CSE_DMR_BV_002(int1, m_createAcpBase,v_contentResponse);//AccessControlPolicy
				}
				
611
				testcase TC_CSE_DMR_BV_002_04() runs on CseTester system CseSystem {
612
613
614
					// Local variables
					var template PrimitiveContent v_contentResponse;
					
615
					v_contentResponse.any_1[0].Schedule_optional := mw_contentSchedule_rc1;
616
617
618
619
						
					f_CSE_DMR_BV_002(int18, m_createScheduleBase, v_contentResponse);//Schedule
				}
					
620
				testcase TC_CSE_DMR_BV_002_05() runs on CseTester system CseSystem {
621
622
623
					// Local variables
					var template PrimitiveContent v_contentResponse;
					
624
					v_contentResponse.any_1[0].PollingChannel_optional := mw_contentPollingChannelBase;//FIXME
625
626
627
628
						
					f_CSE_DMR_BV_002(int15, m_createPollingChannelBase, v_contentResponse);//PollingChannel
				}
					
629
				testcase TC_CSE_DMR_BV_002_06() runs on CseTester system CseSystem {
630
631
632
					// Local variables
					var template PrimitiveContent v_contentResponse;
					
633
					v_contentResponse.any_1[0].Subscription_optional := mw_contentSubscription_rc1;
634
635
636
637

					f_CSE_DMR_BV_002(int23, m_createSubscriptionBase, v_contentResponse);//Subscription
				}
				
638
				function f_CSE_DMR_BV_002(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, template PrimitiveContent p_contentResponse) runs on CseTester {
639
640
    				
					// Local variables
641
					var MsgIn v_response;
642
					var RequestPrimitive v_request;
643
644
645
					
					var integer v_aeIndex := -1;
					var integer v_resourceIndex := -1;
646
647
648
649
650
651
652
653
654
    										   
					// Test control
    				
					// Test component configuration
					f_cf01Up();
    				
					// Test adapter configuration
    				
					// Preamble
655
					v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
656
					
657
					v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive, v_aeIndex); 				
658
659
    									
					// Test Body
660
					v_request := valueof(m_retrieveResource(f_getResourceAddress(v_resourceIndex), f_getOriginator(v_resourceIndex)));
661
662
663
664
					v_request.resultContent := int1;//Attributes
					mcaPort.send(m_request(v_request));
					tc_ac.start;
					alt {
665
						[] mcaPort.receive(mw_response(mw_responsePrimitiveOK(p_contentResponse))) -> value v_response {
666
667
668
							tc_ac.stop;
							setverdict(pass, testcasename() & ": No child resources provided with RC set to 1");
						}
669
						[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
670
671
672
							tc_ac.stop;
							setverdict(fail, testcasename() & ": Child resources provided with RC set to 1");
						}
673
						[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
674
675
676
677
678
679
680
681
682
							tc_ac.stop;
							setverdict(fail, testcasename() & ": Error while retrieving resource");
						}
						[] tc_ac.timeout {
							setverdict(inconc, testcasename() & ": No answer while retrieving resource");
						}
					}	
    								
					// Postamble
683
684
685
686
					f_cse_postamble_deleteResources();
					
					// Tear down
					f_cf01Down();
687
688
689
690
    				
				}//end f_CSE_DMR_BV_002
    				
			} // end g_CSE_DMR_BV_002
691
			
692
			
693
694
			group g_CSE_DMR_BV_003 {
					
695
				testcase TC_CSE_DMR_BV_003_01() runs on CseTester system CseSystem {
696
697
698
					// Local variables
					var template PrimitiveContent v_contentResponse;
					
699
					v_contentResponse.any_1[0].Container_optional := mw_contentContainer_rc4;
700
701
702
703
					                        
					f_CSE_DMR_BV_003(int3, m_createContainerBase, v_contentResponse);//Container
				}

704
				testcase TC_CSE_DMR_BV_003_02() runs on CseTester system CseSystem {
705
706
707
					// Local variables
					var template PrimitiveContent v_contentResponse;
					
708
					v_contentResponse.any_1[0].Group_optional := mw_contentGroup_rc4;
709
710
711
712
					
					f_CSE_DMR_BV_003(int9, m_createGroupBase, v_contentResponse);//Group
				}
					
713
				testcase TC_CSE_DMR_BV_003_03() runs on CseTester system CseSystem {
714
715
716
					// Local variables
					var template PrimitiveContent v_contentResponse;
					
717
					v_contentResponse.any_1[0].AccessControlPolicy_optional := mw_contentAcp_rc4;
718
719
720
721
						
					f_CSE_DMR_BV_003(int1, m_createAcpBase,v_contentResponse);//AccessControlPolicy
				}
				
722
				testcase TC_CSE_DMR_BV_003_04() runs on CseTester system CseSystem {
723
724
725
					// Local variables
					var template PrimitiveContent v_contentResponse;
					
726
					v_contentResponse.any_1[0].Schedule_optional := mw_contentSchedule_rc4;
727
728
729
730
						
					f_CSE_DMR_BV_003(int18, m_createScheduleBase, v_contentResponse);//Schedule
				}
					
731
				testcase TC_CSE_DMR_BV_003_05() runs on CseTester system CseSystem {
732
733
734
					// Local variables
					var template PrimitiveContent v_contentResponse;
					
735
					v_contentResponse.any_1[0].PollingChannel_optional := mw_contentPollingChannelBase;//FIXME
736
737
738
739
						
					f_CSE_DMR_BV_003(int15, m_createPollingChannelBase, v_contentResponse);//PollingChannel
				}
					
740
				testcase TC_CSE_DMR_BV_003_06() runs on CseTester system CseSystem {
741
742
743
					// Local variables
					var template PrimitiveContent v_contentResponse;
					
744
					v_contentResponse.any_1[0].Subscription_optional := mw_contentSubscription_rc4;
745
746
747
748

					f_CSE_DMR_BV_003(int23, m_createSubscriptionBase, v_contentResponse);//Subscription
				}
				
749
				function f_CSE_DMR_BV_003(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, template PrimitiveContent p_contentResponse) runs on CseTester {
750
751
    				
					// Local variables
752
					var MsgIn v_response;
753
					var RequestPrimitive v_request;
754
755
756
					
					var integer v_aeIndex := -1;
					var integer v_resourceIndex := -1;
757
    										   
758
759
760
761
762
763
764
765
					// Test control
    				
					// Test component configuration
					f_cf01Up();
    				
					// Test adapter configuration
    				
					// Preamble
766
					v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
767
					
768
					v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive, v_aeIndex); 				
769
770
    									
					// Test Body
771
					v_request := valueof(m_retrieveResource(f_getResourceAddress(v_resourceIndex), f_getOriginator(v_resourceIndex)));
772
					v_request.resultContent := int1;//Attributes
773
774
775
					mcaPort.send(m_request(v_request));
					tc_ac.start;
					alt {
776
						[] mcaPort.receive(mw_response(mw_responsePrimitiveOK(p_contentResponse))) -> value v_response {
777
							tc_ac.stop;
778
							setverdict(pass, testcasename() & ": No child resources provided with RC set to 1");
779
						}
780
						[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
781
							tc_ac.stop;
782
							setverdict(fail, testcasename() & ": Child resources provided with RC set to 1");
783
						}
784
						[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
785
786
787
788
789
790
791
792
793
							tc_ac.stop;
							setverdict(fail, testcasename() & ": Error while retrieving resource");
						}
						[] tc_ac.timeout {
							setverdict(inconc, testcasename() & ": No answer while retrieving resource");
						}
					}	
    								
					// Postamble
794
795
796
797
					f_cse_postamble_deleteResources();
					
					// Tear down
					f_cf01Down();
798
799
800
801
802
803
804
    				
				}//end f_CSE_DMR_BV_003
    				
			} // end g_CSE_DMR_BV_003
			
			group g_CSE_DMR_BV_004 {
					
805
				testcase TC_CSE_DMR_BV_004_01() runs on CseTester system CseSystem {
806
807
808
					// Local variables
					var template PrimitiveContent v_contentResponse;
					
809
					v_contentResponse.any_1[0].Container_optional := mw_contentContainer_rc5;
810
811
812
813
					                        
					f_CSE_DMR_BV_004(int3, m_createContainerBase, v_contentResponse);//Container
				}

814
				testcase TC_CSE_DMR_BV_004_02() runs on CseTester system CseSystem {
815
816
817
					// Local variables
					var template PrimitiveContent v_contentResponse;
					
818
					v_contentResponse.any_1[0].Group_optional := mw_contentGroup_rc5;
819
820
821
822
					
					f_CSE_DMR_BV_004(int9, m_createGroupBase, v_contentResponse);//Group
				}
					
823
				testcase TC_CSE_DMR_BV_004_03() runs on CseTester system CseSystem {
824
825
826
					// Local variables
					var template PrimitiveContent v_contentResponse;
					
827
					v_contentResponse.any_1[0].AccessControlPolicy_optional := mw_contentAcp_rc5;
828
829
830
831
						
					f_CSE_DMR_BV_004(int1, m_createAcpBase,v_contentResponse);//AccessControlPolicy
				}
				
832
				testcase TC_CSE_DMR_BV_004_04() runs on CseTester system CseSystem {
833
834
835
					// Local variables
					var template PrimitiveContent v_contentResponse;
					
836
					v_contentResponse.any_1[0].Schedule_optional := mw_contentSchedule_rc5;
837
838
839
840
						
					f_CSE_DMR_BV_004(int18, m_createScheduleBase, v_contentResponse);//Schedule
				}
					
841
				testcase TC_CSE_DMR_BV_004_05() runs on CseTester system CseSystem {
842
843
844
					// Local variables
					var template PrimitiveContent v_contentResponse;
					
845
					v_contentResponse.any_1[0].PollingChannel_optional := mw_contentPollingChannelBase;//FIXME
846
847
848
849
						
					f_CSE_DMR_BV_004(int15, m_createPollingChannelBase, v_contentResponse);//PollingChannel
				}
					
850
				testcase TC_CSE_DMR_BV_004_06() runs on CseTester system CseSystem {
851
852
853
					// Local variables
					var template PrimitiveContent v_contentResponse;
					
854
					v_contentResponse.any_1[0].Subscription_optional := mw_contentSubscription_rc5;
855
856
857
858

					f_CSE_DMR_BV_004(int23, m_createSubscriptionBase, v_contentResponse);//Subscription
				}
				
859
				function f_CSE_DMR_BV_004(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, template PrimitiveContent p_contentResponse) runs on CseTester {
860
861
    				
					// Local variables
862
					var MsgIn v_response;
863
					var RequestPrimitive v_request;
864
865
866
					
					var integer v_aeIndex := -1;
					var integer v_resourceIndex := -1;
867
     										   
868
869
870
871
872
873
874
875
					// Test control
    				
					// Test component configuration
					f_cf01Up();
    				
					// Test adapter configuration
    				
					// Preamble
876
					v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
877
					
878
					v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive, v_aeIndex); 				
879
880
    									
					// Test Body
881
					v_request := valueof(m_retrieveResource(f_getResourceAddress(v_resourceIndex), f_getOriginator(v_resourceIndex)));
882
					v_request.resultContent := int1;//Attributes
883
884
885
					mcaPort.send(m_request(v_request));
					tc_ac.start;
					alt {
886
						[] mcaPort.receive(mw_response(mw_responsePrimitiveOK(p_contentResponse))) -> value v_response {
887
888
889
							tc_ac.stop;
							setverdict(pass, testcasename() & ": No child resources provided with RC set to 1");
						}
890
						[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
891
892
893
							tc_ac.stop;
							setverdict(fail, testcasename() & ": Child resources provided with RC set to 1");
						}
894
						[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
895
896
897
898
899
900
901
902
903
							tc_ac.stop;
							setverdict(fail, testcasename() & ": Error while retrieving resource");
						}
						[] tc_ac.timeout {
							setverdict(inconc, testcasename() & ": No answer while retrieving resource");
						}
					}	
    								
					// Postamble
904
905
906
907
					f_cse_postamble_deleteResources();
					
					// Tear down
					f_cf01Down();
908
909
910
911
912
913
914
    				
				}//end f_CSE_DMR_BV_004
    				
			} // end g_CSE_DMR_BV_004
			
			group g_CSE_DMR_BV_005 {
					
915
				testcase TC_CSE_DMR_BV_005_01() runs on CseTester system CseSystem {
916
917
918
					// Local variables
					var template PrimitiveContent v_contentResponse;
					
919
					v_contentResponse.any_1[0].Container_optional := mw_contentContainer_rc6;
920
921
922
923
					                        
					f_CSE_DMR_BV_005(int3, m_createContainerBase, v_contentResponse);//Container
				}

924
				testcase TC_CSE_DMR_BV_005_02() runs on CseTester system CseSystem {
925
926
927
					// Local variables
					var template PrimitiveContent v_contentResponse;
					
928
					v_contentResponse.any_1[0].Group_optional := mw_contentGroup_rc6;
929
930
931
932
					
					f_CSE_DMR_BV_005(int9, m_createGroupBase, v_contentResponse);//Group
				}
					
933
				testcase TC_CSE_DMR_BV_005_03() runs on CseTester system CseSystem {
934
935
936
					// Local variables
					var template PrimitiveContent v_contentResponse;
					
937
					v_contentResponse.any_1[0].AccessControlPolicy_optional := mw_contentAcp_rc6;
938
939
940
941
						
					f_CSE_DMR_BV_005(int1, m_createAcpBase,v_contentResponse);//AccessControlPolicy
				}
				
942
				testcase TC_CSE_DMR_BV_005_04() runs on CseTester system CseSystem {
943
944
945
					// Local variables
					var template PrimitiveContent v_contentResponse;
					
946
					v_contentResponse.any_1[0].Schedule_optional := mw_contentSchedule_rc6;
947
948
949
950
						
					f_CSE_DMR_BV_005(int18, m_createScheduleBase, v_contentResponse);//Schedule
				}
					
951
				testcase TC_CSE_DMR_BV_005_05() runs on CseTester system CseSystem {
952
953
954
					// Local variables
					var template PrimitiveContent v_contentResponse;
					
955
					v_contentResponse.any_1[0].PollingChannel_optional := mw_contentPollingChannelBase;//FIXME
956
957
958
959
						
					f_CSE_DMR_BV_005(int15, m_createPollingChannelBase, v_contentResponse);//PollingChannel
				}
					
960
				testcase TC_CSE_DMR_BV_005_06() runs on CseTester system CseSystem {
961
962
963
					// Local variables
					var template PrimitiveContent v_contentResponse;
					
964
					v_contentResponse.any_1[0].Subscription_optional := mw_contentSubscription_rc6;
965
966
967
968

					f_CSE_DMR_BV_005(int23, m_createSubscriptionBase, v_contentResponse);//Subscription
				}
				
969
				function f_CSE_DMR_BV_005(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, template PrimitiveContent p_contentResponse) runs on CseTester {
970
971
    				
					// Local variables
972
					var MsgIn v_response;
973
					var RequestPrimitive v_request;
974
975
976
					
					var integer v_aeIndex := -1;
					var integer v_resourceIndex := -1;
977
978
979
980
981
982
983
984
985
    										   
					// Test control
    				
					// Test component configuration
					f_cf01Up();
    				
					// Test adapter configuration
    				
					// Preamble
986
					v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
987
					
988
					v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive, v_aeIndex); 				
989
990
    									
					// Test Body
991
					v_request := valueof(m_retrieveResource(f_getResourceAddress(v_resourceIndex), f_getOriginator(v_resourceIndex)));
992
993
994
995
					v_request.resultContent := int1;//Attributes
					mcaPort.send(m_request(v_request));
					tc_ac.start;
					alt {
996
						[] mcaPort.receive(mw_response(mw_responsePrimitiveOK(p_contentResponse))) -> value v_response {
997
998
999
							tc_ac.stop;
							setverdict(pass, testcasename() & ": No child resources provided with RC set to 1");
						}
1000
						[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
For faster browsing, not all history is shown. View entire blame