EPTF_DataSource_Test_Functions.ttcn 346 KB
Newer Older
Elemer Lelik's avatar
Elemer Lelik committed
1
2
///////////////////////////////////////////////////////////////////////////////
//                                                                           //
balaskoa's avatar
balaskoa committed
3
// Copyright (c) 2000-2018 Ericsson Telecom AB                               //
Elemer Lelik's avatar
Elemer Lelik committed
4
5
//                                                                           //
// All rights reserved. This program and the accompanying materials          //
balaskoa's avatar
balaskoa committed
6
// are made available under the terms of the Eclipse Public License v2.0     //
Elemer Lelik's avatar
Elemer Lelik committed
7
// which accompanies this distribution, and is available at                  //
balaskoa's avatar
balaskoa committed
8
// https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html                                 //
Elemer Lelik's avatar
Elemer Lelik committed
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
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
72
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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
///////////////////////////////////////////////////////////////////////////////

///////////////////////////////////////////////////////////
//  Module: EPTF_DataSource_Test_Functions
//
//  Purpose:
//    This module provides functions for testing GUIDataSource
//
//  Module depends on:
//    -
//
//  Current Owner:
//    TitanSim Group
//
//  Last Review Date:
//    -
//
//  Detailed Comments:
//    Provide functions to test GUIDataSource
//
//
///////////////////////////////////////////////////////////////
module EPTF_DataSource_Test_Functions
{

import from EPTF_CLL_Common_Definitions all;
import from EPTF_CLL_Base_Functions all;
import from EPTF_CLL_Variable_Definitions all;
import from EPTF_CLL_Variable_Functions all;
import from EPTF_DataSource_Test_Definitions all;
import from EPTF_CLL_UIHandler_WidgetFunctions all;
import from EPTF_CLL_UIHandler_Definitions all;
import from EPTF_CLL_DataSource_Definitions all;
import from EPTF_CLL_DataSource_Functions all;
import from EPTF_CLL_DataSourceClient_Functions all;
import from EPTF_CLL_Logging_Functions all;
import from EPTF_CLL_DataSource_Definitions all;

group EPTF_DataSource_TestFunctions {

  ///////////////////////////////////////////////////////////
  //  Testcase: f_EPTF_GUIDataSource_Test_ServerBehavior
  //
  //  Purpose:
  //
  //  Parameters:
  //
  ///////////////////////////////////////////////////////////
  public function f_EPTF_CLL_DataSource_Test_serverBehavior()
  runs on EPTF_DataSource_CT
  {
    f_EPTF_DataSource_init_CT("GUIDataSourceServer");

    timer t;
    t.start(26.0);
    alt {
      [] t.timeout {}
    }

    f_EPTF_Base_wait4Shutdown();
    //f_EPTF_Base_cleanup_CT();
  }

  ///////////////////////////////////////////////////////////
  //  Testcase: f_EPTF_GUIDataSource_Test_ClientBehavior
  //
  //  Purpose:
  //
  //  Parameters:
  //
  ///////////////////////////////////////////////////////////
  public function f_EPTF_CLL_DataSource_Test_clientBehavior( in charstring pl_dataProviderName,
    in EPTF_DataSource_CT pl_server,
    in charstring pl_selfName := "GUIDataSource Client")
  runs on EPTF_CLL_DataSource_Client_CT
  {
    f_EPTF_Var_init_CT(pl_selfName);
    f_EPTF_DataSourceClient_init_CT(pl_selfName, pl_server);
    //f_EPTF_DataSourceClient_registerIterator(pl_dataProviderName, "", refers(f_EPTF_CLL_DataSource_preProcessor));
    f_EPTF_DataSourceClient_registerData(pl_dataProviderName, "", refers(f_EPTF_CLL_DataSource_preProcessorData));
    var integer vl_idx;

    var EPTF_CharstringList vl_cList := {};
    f_EPTF_Var_newCharstring(c_EPTF_CLL_DataSource_Test_var_prefix & "ch1","Initvalue for charstring variable",vl_idx);
    vl_cList[sizeof(vl_cList)] := "ch1";
    f_EPTF_Var_newCharstring(c_EPTF_CLL_DataSource_Test_var_prefix & "ch2","Initvalue for charstring variable second",vl_idx);
    vl_cList[sizeof(vl_cList)] := "ch2";

    f_EPTF_Var_newFloat(c_EPTF_CLL_DataSource_Test_var_prefix & "fl1",3.14,vl_idx);
    vl_cList[sizeof(vl_cList)] := "fl1";
    f_EPTF_Var_newBool(c_EPTF_CLL_DataSource_Test_var_prefix & "bool1",true,vl_idx);
    vl_cList[sizeof(vl_cList)] := "bool1";
    f_EPTF_Var_newInt(c_EPTF_CLL_DataSource_Test_var_prefix & "int1",7890,vl_idx);
    vl_cList[sizeof(vl_cList)] := "int1";

    f_EPTF_Var_newCharstringlistRef(c_EPTF_CLL_DataSource_Test_var_prefix & "allVar", vl_cList ,vl_idx);

    vl_cList := {"LGen1", "LGen2", "LGen3"}
    f_EPTF_Var_newCharstringlistRef(c_EPTF_CLL_DataSource_Test_var_prefix & "LGens", vl_cList ,vl_idx);

    vl_cList := {"Scens1", "Scens2", "Scens3"}
    f_EPTF_Var_newCharstringlistRef(c_EPTF_CLL_DataSource_Test_var_prefix & "Scens", vl_cList ,vl_idx);

    vl_cList := {"TC1", "TC2", "TC3"}
    f_EPTF_Var_newCharstringlistRef(c_EPTF_CLL_DataSource_Test_var_prefix & "TCs", vl_cList ,vl_idx);


    f_EPTF_DataSourceClient_registerData("LGenBase", "LGen1", refers(f_EPTF_CLL_DataSource_preProcessorData));
    f_EPTF_DataSourceClient_registerData("LGenBase", "LGen2", refers(f_EPTF_CLL_DataSource_preProcessorData));
    f_EPTF_DataSourceClient_registerData("LGenBase", "LGen3", refers(f_EPTF_CLL_DataSource_preProcessorData));

    timer t;
    t.start(26.0);
    alt {
      [] t.timeout {}
    }

    f_EPTF_Base_cleanup_CT();
  }

  public function f_EPTF_CLL_DataSource_preProcessorData(  out charstring pl_dataVarName,
    in charstring pl_source,
    in charstring pl_ptcName,
    in charstring pl_element,
    in EPTF_DataSource_Params pl_params

  ) runs on EPTF_CLL_DataSource_Client_CT return integer{

    //TODO pl_dataProviderName-nak kene lennie, le ken menteni, hogy mi kik vagyunk...
    action(" f_EPTF_CLL_DataSource_preProcessorData ");
    action("1: " & pl_source & " 2: " & pl_ptcName & " 3: " & pl_element);

    if(pl_source != "ExecCtrl" and pl_source != "LGenBase"){
      setverdict(fail , "Wrong datasource: " & pl_source);
      return -1;
    }

    select( true ){
      case(pl_element == "allVar"){
        pl_dataVarName := c_EPTF_CLL_DataSource_Test_var_prefix & "allVar"
        return 0;
      }
      case(pl_element == "allVarand other"){
        //Iterator is valid, but result is empty
        pl_dataVarName := "";
        return 0;
      }

      case(pl_element == "LGens"){
        pl_dataVarName := c_EPTF_CLL_DataSource_Test_var_prefix & "allVar"
        return 0;
      }
      case(pl_element == "EntityGroups"){
        pl_dataVarName := c_EPTF_CLL_DataSource_Test_var_prefix & "allVar"
        return 0;
      }
      case(pl_element == "LGenList"){
        pl_dataVarName := c_EPTF_CLL_DataSource_Test_var_prefix & "LGens"
        return 0;
      }

      case(pl_element == "EntityCount"){
        pl_dataVarName := c_EPTF_CLL_DataSource_Test_var_prefix & "int1"
        return 0;
      }
      case(pl_element == "LGens"){
        pl_dataVarName := c_EPTF_CLL_DataSource_Test_var_prefix & "allVar"
        return 0;
      }
      case(pl_element == "Scenarios"){
        pl_dataVarName := c_EPTF_CLL_DataSource_Test_var_prefix & "Scens"
        return 0;
      }
      case(pl_element == "TrafficCases"){
        pl_dataVarName := c_EPTF_CLL_DataSource_Test_var_prefix & "TCs"
        return 0;
      }
      case(pl_element == "TCName"){
        pl_dataVarName := c_EPTF_CLL_DataSource_Test_var_prefix & "ch2"
        return 0;
      }
      case(pl_element == "TCEnabled"){
        pl_dataVarName := c_EPTF_CLL_DataSource_Test_var_prefix & "bool1"
        return 0;
      }
      case(pl_element == "TCStateName"){
        pl_dataVarName := c_EPTF_CLL_DataSource_Test_var_prefix & "ch2"
        return 0;
      }

      case(pl_element == "ch1"){
        if(pl_params[0].paramValue == "x"){
          pl_dataVarName := c_EPTF_CLL_DataSource_Test_var_prefix & "ch1"
        } else {
          pl_dataVarName := c_EPTF_CLL_DataSource_Test_var_prefix & "ch2"
        }
        return 0;
      }
      case(pl_element == "fl1"){
        pl_dataVarName := c_EPTF_CLL_DataSource_Test_var_prefix & "fl1"
        return 0;
      }
      case(pl_element == "bool1"){
        pl_dataVarName := c_EPTF_CLL_DataSource_Test_var_prefix & "bool1"
        return 0;
      }
      case(pl_element == "int1"){
        pl_dataVarName := c_EPTF_CLL_DataSource_Test_var_prefix & "int1"
        return 0;
      }
      case(pl_element == "bool2"){
        pl_dataVarName := "";
        return 0;
      }
      case else {  //error, no rule for that
        pl_dataVarName := "";
        action("Unhandled request type in f_EPTF_UIHandler_validateElementId!");
        return -1;
      }
    }

  }

  group GetDataFromClient {

    // behaviour of main DS component
    function f_EPTF_CLL_DataSourceClient_Test_mainDSBehaviour(in charstring pl_selfName) runs on EPTF_DataSource_CT {
      f_EPTF_DataSource_init_CT(pl_selfName);
      f_EPTF_Base_wait4Shutdown();
    }

    const charstring c_EPTF_CLL_DataSourceClient_Test_DSOwnerSourceName := "DSOwner";
    const charstring c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName := "DataElement";
    const charstring c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName2 := "DataElement2";
    const charstring c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName_List := "DataElement_List";
    const charstring c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName_ListString := "DataElement_ListString";
    const charstring c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName_ListFloat := "DataElement_ListFloat";
    const charstring c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName_Value := "DataElement_Value";
    const charstring c_EPTF_CLL_DataSourceClient_Test_DSOwnerDataVarName := "DataVarName";
    const charstring c_EPTF_CLL_DataSourceClient_Test_DSOwnerMethodName := "Method1";
    const charstring c_EPTF_CLL_DataSourceClient_Test_DSOwnerMethod2Name := "Method2";
    const integer    c_EPTF_CLL_DataSourceClient_Test_BuiltInDataValue := 11;
    const EPTF_IntegerList c_EPTF_CLL_DataSourceClient_Test_DSOwnerListInit := {0,1,2,3,4,5,6,7,8,9};
    const EPTF_CharstringList c_EPTF_CLL_DataSourceClient_Test_DSOwnerListStringInit := {"alma", "korte", "szilva", "szolo", "dinnye"};
    const EPTF_FloatList c_EPTF_CLL_DataSourceClient_Test_DSOwnerListFloatInit := {0.0,1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9.0};
    const EPTF_IntegerList c_EPTF_CLL_DataSourceClient_Test_BuiltInDataValueList := {9, 8, 7, 6};
    const charstring c_EPTF_CLL_DataSourceClient_Test_DSOwnerValueHandlerParam := "ValueHandlerParam";
    const charstring c_EPTF_CLL_DataSourceClient_Test_DSOwnerValueHandlerParam2 := "ValueHandlerParam2";
    
258
    function f_EPTF_CLL_DataSourceClient_Test_dsOwnerBehaviour(in charstring pl_selfName, in EPTF_DataSource_CT pl_sourceCompRef, in charstring pl_errMessage := "", in charstring pl_warningMessage := "") runs on EPTF_CLL_DataSource_Client_CT {
Elemer Lelik's avatar
Elemer Lelik committed
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
      f_EPTF_DataSourceClient_init_CT(pl_selfName,pl_sourceCompRef);
      var integer vl_varIdx;
      f_EPTF_Var_newInt(c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName&"."&c_EPTF_CLL_DataSourceClient_Test_DSOwnerDataVarName,0,vl_varIdx);
      f_EPTF_Var_newInt(c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName2&"."&c_EPTF_CLL_DataSourceClient_Test_DSOwnerDataVarName,2,vl_varIdx);
      f_EPTF_Var_newIntegerlist(c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName_List&"."&c_EPTF_CLL_DataSourceClient_Test_DSOwnerDataVarName, c_EPTF_CLL_DataSourceClient_Test_DSOwnerListInit, vl_varIdx);
      f_EPTF_Var_newCharstringlist(c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName_ListString&"."&c_EPTF_CLL_DataSourceClient_Test_DSOwnerDataVarName, c_EPTF_CLL_DataSourceClient_Test_DSOwnerListStringInit, vl_varIdx);
      f_EPTF_Var_newFloatlist(c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName_ListFloat&"."&c_EPTF_CLL_DataSourceClient_Test_DSOwnerDataVarName, c_EPTF_CLL_DataSourceClient_Test_DSOwnerListFloatInit, vl_varIdx);
      f_EPTF_DataSourceClient_registerCondition(c_EPTF_CLL_DataSourceClient_Test_DSOwnerSourceName, f_EPTF_Base_selfName(), refers(f_EPTF_CLL_DataSourceClient_conditionHandler), c_EPTF_CLL_DataSourceClient_Test_DSOwnerMethodName);
      f_EPTF_DataSourceClient_registerCondition(c_EPTF_CLL_DataSourceClient_Test_DSOwnerSourceName, f_EPTF_Base_selfName(), refers(f_EPTF_CLL_DataSourceClient_conditionHandler), c_EPTF_CLL_DataSourceClient_Test_DSOwnerMethod2Name);
      f_EPTF_DataSourceClient_registerData(c_EPTF_CLL_DataSourceClient_Test_DSOwnerSourceName, f_EPTF_Base_selfName(), refers(f_EPTF_CLL_DataSourceClient_mainDSServer));
      f_EPTF_DataSourceClient_registerDataValue(c_EPTF_CLL_DataSourceClient_Test_DSOwnerSourceName, f_EPTF_Base_selfName(), refers(f_EPTF_CLL_DataSourceClient_getValueHandler));
      f_EPTF_DataSourceClient_registerSetDataValue(c_EPTF_CLL_DataSourceClient_Test_DSOwnerSourceName, f_EPTF_Base_selfName(), refers(f_EPTF_CLL_DataSourceClient_setValueHandler));
      
      if (pl_errMessage != "") {
        f_EPTF_Base_setNegativeTestMode();
        f_EPTF_Base_setExpectedErrorMsg(pl_errMessage);
      }
276
277
278
      if (pl_warningMessage != "") {
        f_EPTF_Logging_setExpectedWarningMsg(pl_warningMessage);
      }
Elemer Lelik's avatar
Elemer Lelik committed
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
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
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
      f_EPTF_Base_wait4Shutdown();
    }

    public function f_EPTF_CLL_DataSourceClient_mainDSServer(
      out charstring pl_dataVarName,
      in charstring pl_source,
      in charstring pl_ptcName,
      in charstring pl_element,
      in EPTF_DataSource_Params pl_params

    ) runs on EPTF_CLL_DataSource_Client_CT return integer {
      if (pl_source!=c_EPTF_CLL_DataSourceClient_Test_DSOwnerSourceName
        or (pl_element != c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName 
            and pl_element != c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName2 
            and pl_element != c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName_List 
            and pl_element != c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName_ListString
            and pl_element != c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName_ListFloat)
       ) {
          return 1; // incorrect params
      }
      
      //check for built in error
      var EPTF_CharstringList pl_result := {}
      f_EPTF_DataSource_extractParams(pl_params,
                                      {c_TestNonBlocking_BuiltIn_Error_paramName},
                                      pl_result
      );
      if (pl_result[0] != "") {
        pl_dataVarName := "error on demand";
        return 2; // error on demand
      }
      
      pl_dataVarName := pl_element&"."&c_EPTF_CLL_DataSourceClient_Test_DSOwnerDataVarName;
      return 0;
    }

  public function f_EPTF_CLL_DataSourceClient_getValueHandler(
      out EPTF_Var_DirectContent pl_dataValue,
      in charstring pl_dataSource,
      in charstring pl_ptcName,
      in charstring pl_element,
      in EPTF_DataSource_Params pl_params
    ) runs on EPTF_DataSourceClient_CT return integer {
      if (pl_dataSource != c_EPTF_CLL_DataSourceClient_Test_DSOwnerSourceName or 
            (pl_element != c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName_Value 
         and pl_element != c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName
         and pl_element != c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName_List)) {
        return 1; //incorrect param
      }
      
      //set new value
      var integer vl_toSet := c_EPTF_CLL_DataSourceClient_Test_BuiltInDataValue;
      var EPTF_CharstringList vl_result := {}
      f_EPTF_DataSource_extractParams(pl_params,
                                      {c_EPTF_CLL_DataSourceClient_Test_DSOwnerValueHandlerParam, c_EPTF_CLL_DataSourceClient_Test_DSOwnerValueHandlerParam2},
                                      vl_result
      );
      
      var integer vl_results := sizeof(vl_result);
      for(var integer i := 0; i < vl_results; i := i + 1)
      {
        if (vl_result[i] != "") {
          vl_toSet := vl_toSet + str2int(vl_result[i]);
        }
      }
     
      if (pl_element == c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName or pl_element == c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName_List)  {
          if (vl_result[0] == "") {
            return 1; //incorrect param
          }
      }
      
      if (pl_element == c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName_List)  {
          pl_dataValue := {integerlistVal := c_EPTF_CLL_DataSourceClient_Test_BuiltInDataValueList};
      } else {
          pl_dataValue := {intVal := vl_toSet};
      }
      return 0;
    }
    
    function f_EPTF_CLL_DataSourceClient_setValueHandler(
    inout EPTF_Var_DirectContent pl_dataValue,
    in charstring pl_dataSource,
    in charstring pl_ptcName,
    in charstring pl_dataElement,
    in EPTF_DataSource_Params pl_params,
    in EPTF_IntegerList pl_indexList
  ) runs on EPTF_DataSourceClient_CT return integer {
    
      if (pl_dataSource != c_EPTF_CLL_DataSourceClient_Test_DSOwnerSourceName or 
            (    pl_dataElement != c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName_Value 
             and pl_dataElement != c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName
             and pl_dataElement != c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName_List)) {
372
        return -1; //incorrect param
Elemer Lelik's avatar
Elemer Lelik committed
373
374
375
376
      }
      
      if (pl_dataElement == c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName_Value or pl_dataElement == c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName) {
        if (not ischosen(pl_dataValue.intVal)) {
377
          return -2; //incorrect value        
Elemer Lelik's avatar
Elemer Lelik committed
378
379
380
381
382
        }
      }
      
      if (pl_dataElement == c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName_List) {
        if (not ischosen(pl_dataValue.integerlistVal)) {
383
          return -2; //incorrect value        
Elemer Lelik's avatar
Elemer Lelik committed
384
385
386
387
388
389
390
391
392
393
394
        }
      }
        
      var EPTF_CharstringList pl_result := {};
      f_EPTF_DataSource_extractParams(pl_params,
                                      {c_EPTF_CLL_DataSourceClient_Test_DSOwnerValueHandlerParam},
                                      pl_result
      );
      
      if (pl_dataElement == c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName or pl_dataElement == c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName_List)  {
        if (pl_result[0] == "") {  
395
          return -1; //incorrect param
Elemer Lelik's avatar
Elemer Lelik committed
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
        }
      }
      
      if (pl_dataElement == c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName_List)  {
          pl_dataValue := {integerlistVal := pl_indexList};
      } else {
        //set new value
        var integer vl_toSet := pl_dataValue.intVal;      
        if (pl_result[0] != "") {
          vl_toSet := vl_toSet + str2int(pl_result[0]);
        }
        pl_dataValue := {intVal := vl_toSet};
      }
      return 0;    
  }

    function f_EPTF_CLL_DataSourceClient_conditionHandler(
      out boolean pl_conditionValue,
      in charstring pl_source,
      in charstring pl_ptcName,
      in charstring pl_method,
      in EPTF_DataSource_Params pl_params
    ) runs on EPTF_CLL_DataSource_Client_CT return integer {
      if (pl_source!=c_EPTF_CLL_DataSourceClient_Test_DSOwnerSourceName
        or (pl_method != c_EPTF_CLL_DataSourceClient_Test_DSOwnerMethodName and pl_method != c_EPTF_CLL_DataSourceClient_Test_DSOwnerMethod2Name)) {
          return 1; // incorrect params
      }      
      if (pl_method == c_EPTF_CLL_DataSourceClient_Test_DSOwnerMethodName) {
        pl_conditionValue := true;
      } else if (pl_method == c_EPTF_CLL_DataSourceClient_Test_DSOwnerMethod2Name) {
        pl_conditionValue := false;
      }
      return 0;
    }


    function f_EPTF_CLL_DataSourceClient_Test_dsRequesterBehaviour(in charstring pl_selfName, in EPTF_DataSource_CT pl_sourceCompRef) runs on EPTF_CLL_DataSource_Client_CT {
      f_EPTF_DataSourceClient_init_CT(pl_selfName,pl_sourceCompRef);

      var charstring vl_dataVarName;
      f_EPTF_DataSourceClient_getData(
        pl_dataVarName := vl_dataVarName,
        pl_source := c_EPTF_CLL_DataSourceClient_Test_DSOwnerSourceName,
        pl_ptcName := "",
        pl_element := c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName,
        pl_params := {{"paramX", "valueX"}, {"paramA", "valueA"}} // they are not in lexical order!
      );

      if (f_EPTF_Var_getId(vl_dataVarName)==-1) {
        setverdict(fail, "Returned data variable name is incorrect.")
        f_EPTF_Base_stopAll(none);
      }

      // check the value:
      if (0!=f_EPTF_Var_getIntValue(f_EPTF_Var_getId(vl_dataVarName))) {
        setverdict(fail, "Inital value of the variable is incorrect. Expecting 0, got: ",f_EPTF_Var_getIntValue(f_EPTF_Var_getId(vl_dataVarName)))
        f_EPTF_Base_stopAll(none);
      }


      // check the checkData function:
      var charstring vl_dataVarName_check;
      var integer vl_errorCode := f_EPTF_DataSourceClient_checkData(
        pl_dataVarName := vl_dataVarName_check,
        pl_source := c_EPTF_CLL_DataSourceClient_Test_DSOwnerSourceName,
        pl_ptcName := "",
        pl_element := c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName,
        pl_params := {{"paramX", "valueX"}, {"paramA", "valueA"}}
      );

      if (vl_errorCode!=0) {
        setverdict(fail, "CheckData returned an error: ",vl_errorCode)
        f_EPTF_Base_stopAll(none);
      }

      if (vl_dataVarName != vl_dataVarName_check) {
        setverdict(fail, "CheckData returned an invalid variable name: ",vl_dataVarName_check,". Should be: ",vl_dataVarName)
        f_EPTF_Base_stopAll(none);
      }


      // check data for datalement2"
      var charstring vl_dataVarName2_check;
      vl_errorCode := f_EPTF_DataSourceClient_checkData(
        pl_dataVarName := vl_dataVarName2_check,
        pl_source := c_EPTF_CLL_DataSourceClient_Test_DSOwnerSourceName,
        pl_ptcName := "",
        pl_element := c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName2,
        pl_params := {}
      );

      if (vl_errorCode!=0) {
        setverdict(fail, "CheckData returned an error: ",vl_errorCode)
        f_EPTF_Base_stopAll(none);
      }

//       if (f_EPTF_Var_getId(vl_dataVarName2_check)!=-1) {
//         setverdict(fail, "The local variable exists on local component while subscription was not performed by DataSource.")
//         f_EPTF_Base_stopAll(none);
//       }

      var charstring vl_dataVarName2;
      f_EPTF_DataSourceClient_getData(
        pl_dataVarName := vl_dataVarName2,
        pl_source := c_EPTF_CLL_DataSourceClient_Test_DSOwnerSourceName,
        pl_ptcName := "",
        pl_element := c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName2,
        pl_params := {}
      );

      if (f_EPTF_Var_getId(vl_dataVarName2)==-1) {
        setverdict(fail, "Returned data variable name is incorrect.")
        f_EPTF_Base_stopAll(none);
      }

      // check the value:
      if (2!=f_EPTF_Var_getIntValue(f_EPTF_Var_getId(vl_dataVarName2))) {
        setverdict(fail, "Inital value of the variable is incorrect. Expecting 2, got: ",f_EPTF_Var_getIntValue(f_EPTF_Var_getId(vl_dataVarName2)))
        f_EPTF_Base_stopAll(none);
      }


      if (vl_dataVarName2 != vl_dataVarName2_check) {
        setverdict(fail, "CheckData returned an invalid variable name: ",vl_dataVarName2_check,". Should be: ",vl_dataVarName2)
        f_EPTF_Base_stopAll(none);
      }


      setverdict(pass);
      f_EPTF_Base_stopAll(none);
    }

    function f_EPTF_CLL_DataSourceClient_Test_dsRequesterBehaviour_getDataValue(in charstring pl_selfName, in EPTF_DataSource_CT pl_sourceCompRef) runs on EPTF_CLL_DataSource_Client_CT {
      f_EPTF_DataSourceClient_init_CT(pl_selfName,pl_sourceCompRef);

      var EPTF_Var_DirectContent vl_dataValue;
      f_EPTF_DataSourceClient_getDataValue(
        pl_dataValue := vl_dataValue,
        pl_source := c_EPTF_CLL_DataSourceClient_Test_DSOwnerSourceName,
        pl_ptcName := "",
        pl_element := c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName,
        pl_params := {{"paramX", "valueX"}, {"paramA", "valueA"}} // they are not in lexical order!
      );

      // check the value:
      if (vl_dataValue != {intVal := 0}) {
        setverdict(fail, "Inital value of the variable is incorrect. Expecting 0, got: ",vl_dataValue)
        f_EPTF_Base_stopAll(none);
      }



      var EPTF_Var_DirectContent vl_dataValue2;
      f_EPTF_DataSourceClient_getDataValue(
        pl_dataValue := vl_dataValue2,
        pl_source := c_EPTF_CLL_DataSourceClient_Test_DSOwnerSourceName,
        pl_ptcName := "",
        pl_element := c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName2,
        pl_params := {}
      );

      // check the value:
      if (vl_dataValue2 != {intVal := 2}) {
        setverdict(fail, "Inital value of the variable is incorrect. Expecting 2, got: ",vl_dataValue2)
        f_EPTF_Base_stopAll(none);
      }
 

      setverdict(pass);
      f_EPTF_Base_stopAll(none);
    }

    function f_EPTF_CLL_DataSourceClient_Test_dsRequesterBehaviour_setDataValue(in charstring pl_selfName, in EPTF_DataSource_CT pl_sourceCompRef) runs on EPTF_CLL_DataSource_Client_CT {
      f_EPTF_DataSourceClient_init_CT(pl_selfName,pl_sourceCompRef);

      var EPTF_Var_DirectContent vl_dataValue;
      f_EPTF_DataSourceClient_getDataValue(
        pl_dataValue := vl_dataValue,
        pl_source := c_EPTF_CLL_DataSourceClient_Test_DSOwnerSourceName,
        pl_ptcName := "",
        pl_element := c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName,
        pl_params := {{"paramX", "valueX"}, {"paramA", "valueA"}} // they are not in lexical order!
      );

      // check the value:
      if (vl_dataValue != {intVal := 0}) {
        setverdict(fail, "Inital value of the variable is incorrect. Expecting 0, got: ",vl_dataValue)
        f_EPTF_Base_stopAll(none);
      }

      vl_dataValue := {intVal := 1}
      f_EPTF_DataSourceClient_setDataValue(
        pl_dataValue := vl_dataValue,
        pl_source := c_EPTF_CLL_DataSourceClient_Test_DSOwnerSourceName,
        pl_ptcName := "",
        pl_element := c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName,
        pl_params := {{"paramX", "valueX"}, {"paramA", "valueA"}} // they are not in lexical order!
      );

      // check the value:
      if (vl_dataValue != {intVal := 1}) {
        setverdict(fail, "Updated value of the variable is incorrect. Expecting 1, got: ",vl_dataValue)
        f_EPTF_Base_stopAll(none);
      }

      f_EPTF_DataSourceClient_getDataValue(
        pl_dataValue := vl_dataValue,
        pl_source := c_EPTF_CLL_DataSourceClient_Test_DSOwnerSourceName,
        pl_ptcName := "",
        pl_element := c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName,
        pl_params := {{"paramX", "valueX"}, {"paramA", "valueA"}} // they are not in lexical order!
      );

      // check the value:
      if (vl_dataValue != {intVal := 1}) {
        setverdict(fail, "Value after getDataValue of the variable is incorrect. Expecting 1, got: ",vl_dataValue)
        f_EPTF_Base_stopAll(none);
      }


      var EPTF_Var_DirectContent vl_dataValue2;
      f_EPTF_DataSourceClient_getDataValue(
        pl_dataValue := vl_dataValue2,
        pl_source := c_EPTF_CLL_DataSourceClient_Test_DSOwnerSourceName,
        pl_ptcName := "",
        pl_element := c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName2,
        pl_params := {}
      );

      // check the value:
      if (vl_dataValue2 != {intVal := 2}) {
        setverdict(fail, "Inital value of the variable is incorrect. Expecting 2, got: ",vl_dataValue2)
        f_EPTF_Base_stopAll(none);
      }

      vl_dataValue2 := {intVal := 3}
      f_EPTF_DataSourceClient_setDataValue(
        pl_dataValue := vl_dataValue2,
        pl_source := c_EPTF_CLL_DataSourceClient_Test_DSOwnerSourceName,
        pl_ptcName := "",
        pl_element := c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName2,
        pl_params := {}
      );

      // check the value:
      if (vl_dataValue2 != {intVal := 3}) {
        setverdict(fail, "New value of the variable is incorrect. Expecting 3, got: ",vl_dataValue2)
        f_EPTF_Base_stopAll(none);
      }

      f_EPTF_DataSourceClient_getDataValue(
        pl_dataValue := vl_dataValue2,
        pl_source := c_EPTF_CLL_DataSourceClient_Test_DSOwnerSourceName,
        pl_ptcName := "",
        pl_element := c_EPTF_CLL_DataSourceClient_Test_DSOwnerElementName2,
        pl_params := {}
      );

      // check the value:
      if (vl_dataValue2 != {intVal := 3}) {
        setverdict(fail, "Value after getDataValue of the variable is incorrect. Expecting 3, got: ",vl_dataValue2)
        f_EPTF_Base_stopAll(none);
      }


      setverdict(pass);
      f_EPTF_Base_stopAll(none);
    }
  } // group GetDataFromClient

  group GUITest{

    public function f_EPTF_CLL_DataSourceGUI_Test_clientBehavior( in EPTF_DataSource_CT pl_server)
    runs on EPTF_CLL_DataSource_Client_CT
    {
      var integer vl_idx;
      f_EPTF_Var_init_CT("GUIDataSource Client");
      f_EPTF_DataSourceClient_init_CT("GUIDataSourceClient", pl_server);

      var EPTF_CharstringList vl_cList := {"LGen1", "LGen2", "LGen3"}
      f_EPTF_Var_newCharstringlist(c_EPTF_CLL_DataSource_Test_var_prefix & "LGens", vl_cList ,vl_idx);
      vl_cList := {"EG1", "EG2", "EG3"}
      f_EPTF_Var_newCharstringlist(c_EPTF_CLL_DataSource_Test_var_prefix & "EntityGroups", vl_cList ,vl_idx);
      vl_cList := {"SC1", "SC2", "SC3"}
      f_EPTF_Var_newCharstringlist(c_EPTF_CLL_DataSource_Test_var_prefix & "Scenarios", vl_cList ,vl_idx);
      f_EPTF_Var_newInt(c_EPTF_CLL_DataSource_Test_var_prefix & "ECount1", 101, vl_idx)
      f_EPTF_Var_newInt(c_EPTF_CLL_DataSource_Test_var_prefix & "ECount2", 102, vl_idx)
      f_EPTF_Var_newInt(c_EPTF_CLL_DataSource_Test_var_prefix & "ECount3", 103, vl_idx)

      f_EPTF_DataSourceClient_registerData("LGenBase", "LGen1", refers(f_EPTF_CLL_DataSourceGUI_preProcessorData));
      f_EPTF_DataSourceClient_registerData("LGenBase", "LGen2", refers(f_EPTF_CLL_DataSourceGUI_preProcessorData));
      f_EPTF_DataSourceClient_registerData("LGenBase", "LGen3", refers(f_EPTF_CLL_DataSourceGUI_preProcessorData));
      f_EPTF_DataSourceClient_registerData("ExecCtrl", "LGen1", refers(f_EPTF_CLL_DataSourceGUI_preProcessorData));
      f_EPTF_DataSourceClient_registerData("ExecCtrl", ""     , refers(f_EPTF_CLL_DataSourceGUI_preProcessorData));

      f_EPTF_Base_wait4Shutdown();
      f_EPTF_Base_stopAll();
    }

    public function f_EPTF_CLL_DataSourceGUI_preProcessorData(  out charstring pl_dataVarName,
      in charstring pl_source,
      in charstring pl_ptcName,
      in charstring pl_element,
      in EPTF_DataSource_Params pl_params

    ) runs on EPTF_CLL_DataSource_Client_CT return integer{
      action(%definitionId&": ",pl_source, ",",pl_element)
      select( true ){
        case(pl_element == "LGenList"){
          pl_dataVarName := c_EPTF_CLL_DataSource_Test_var_prefix & "LGens"
          return 0;
        }
        case(pl_element == "EntityGroups"){
          pl_dataVarName := c_EPTF_CLL_DataSource_Test_var_prefix & "EntityGroups"
          return 0;
        }
        case(pl_element == "Scenarios"){
          pl_dataVarName := c_EPTF_CLL_DataSource_Test_var_prefix & "Scenarios"
          return 0;
        }
        case(pl_element == "EntityCount"){
          select( true ){
            case ( pl_params[0].paramValue == "EG1" ){
              pl_dataVarName := c_EPTF_CLL_DataSource_Test_var_prefix & "ECount1"
              return 0;
            }
            case ( pl_params[0].paramValue == "EG2" ){
              pl_dataVarName := c_EPTF_CLL_DataSource_Test_var_prefix & "ECount2"
              return 0;
            }
            case ( pl_params[0].paramValue == "EG3" ){
              pl_dataVarName := c_EPTF_CLL_DataSource_Test_var_prefix & "ECount3"
              return 0;
            }
          }

          pl_dataVarName := c_EPTF_CLL_DataSource_Test_var_prefix & "Scenarios"
          return 0;
        }

      }
      return -1;
    }

  }

  function f_EPTF_DataSourceClient_behaviour(
    in charstring pl_dataProviderName,
    in EPTF_DataSource_CT pl_dataSourceCompRef,
    in charstring pl_selfName := "EPTF_CLL_DataSourceClient_Test"
  ) runs on EPTF_CLL_DataSource_Client_CT {
    f_EPTF_DataSourceClient_init_CT(pl_selfName,pl_dataSourceCompRef);
    f_EPTF_DataSourceClient_registerData(
      pl_source := pl_dataProviderName,
      pl_ptcName := f_EPTF_Base_selfName(),
      pl_dataHandler := refers(f_EPTF_DataSourceClient_testIteratorHandler)
    );
    f_EPTF_Base_wait4Shutdown();
  }


  function f_EPTF_DataSourceClient_testIteratorHandler(
    out charstring pl_dataVarName,
    in charstring pl_dataSource,
    in charstring pl_ptcName,
    in charstring pl_dataElement,
    in EPTF_DataSource_Params pl_params
  ) runs on EPTF_DataSourceClient_CT return integer {
    pl_dataVarName := "IteratorVarName"&pl_dataElement&log2str(pl_params);
    var integer vl_varIdx;
    //create iterator var if not exist for test
    if (f_EPTF_Var_getId(pl_dataVarName)==-1) {
      f_EPTF_Var_newCharstringlist(pl_dataVarName,{"3","4"},vl_varIdx);
    }
    return 0;
  }

  function f_EPTF_DataSourceClient_CheckParamOrder_IteratorHandler(
    out charstring pl_dataVarName,
    in charstring pl_dataSource,
    in charstring pl_ptcName,
    in charstring pl_dataElement,
    in EPTF_DataSource_Params pl_params
  ) runs on EPTF_DataSourceClient_CT return integer {
    if (sizeof(pl_params)!=2) {
      pl_dataVarName := log2str(%definitionId&": Custom warning: Wrong number of params for Element "&pl_dataElement);
      return 1; // invalid number of params
    }
    pl_dataVarName := "IteratorVarName"&pl_dataElement&log2str(pl_params);
    var integer vl_varIdx;
    //create iterator var if not exist for test
    var EPTF_CharstringList vl_dataValue := {};
    for(var integer i:=0; i<sizeof(pl_params);i:=i+1) {
      vl_dataValue := vl_dataValue&{pl_params[i].paramValue};
    }
    if (f_EPTF_Var_getId(pl_dataVarName)==-1) {
      f_EPTF_Var_newCharstringlist(pl_dataVarName,vl_dataValue,vl_varIdx);
      if (pl_params[0].paramName == "read-only") {
        // set it to read-only:
        var EPTF_Var_ProviderLocal vl_localProvider := {
          {null,{0},{}}
        }
        f_EPTF_Var_subscribeLocal(vl_varIdx,vl_localProvider);
      }
    }
    return 0;
  }

  function f_EPTF_DataSourceClient_getDataTest_dataHandler(
    out charstring pl_dataVarName,
    in charstring pl_dataSource,
    in charstring pl_ptcName,
    in charstring pl_dataElement,
    in EPTF_DataSource_Params pl_params
  ) runs on EPTF_DataSourceClient_CT return integer {
    if (not match(pl_dataElement,pattern "data*")) {
      pl_dataVarName := log2str(%definitionId&": Custom warning: Wrong element name for DataSource "&pl_dataSource&": ",pl_dataElement);
      return 2; // invalid element name
    }
    if (sizeof(pl_params)!=2) {
      pl_dataVarName := log2str(%definitionId&": Custom warning: Wrong number of params for Element "&pl_dataElement);
      return 1; // invalid number of params
    }
    pl_dataVarName := "IteratorVarName"&pl_dataElement&log2str(pl_params);
    var integer vl_varIdx;
    //create iterator var if not exist for test
    var EPTF_CharstringList vl_dataValue := {};
    for(var integer i:=0; i<sizeof(pl_params);i:=i+1) {
      vl_dataValue := vl_dataValue&{pl_params[i].paramValue};
    }
    if (f_EPTF_Var_getId(pl_dataVarName)==-1) {
      f_EPTF_Var_newCharstringlist(pl_dataVarName,vl_dataValue,vl_varIdx);
      if (pl_params[0].paramName == "read-only") {
        // set it to read-only:
        var EPTF_Var_ProviderLocal vl_localProvider := {
          {null,{0},{}}
        }
        f_EPTF_Var_subscribeLocal(vl_varIdx,vl_localProvider);
      }
    }
    return 0;
  }

  function f_EPTF_DataSourceClient_CheckParamOrder_IteratorValueHandler(
    out EPTF_Var_DirectContent pl_dataValue,
    in charstring pl_dataSource,
    in charstring pl_ptcName,
    in charstring pl_dataElement,
    in EPTF_DataSource_Params pl_params
  ) runs on EPTF_DataSourceClient_CT return integer {
    if (not match(pl_dataElement,pattern "value*")) {
      pl_dataValue := {charstringVal := log2str(%definitionId&": Custom warning: Wrong element name for DataSource "&pl_dataSource&": ",pl_dataElement)};
      return 2; // invalid element name
    }
    if (sizeof(pl_params)!=3) {
      pl_dataValue := {charstringVal := log2str(%definitionId&": Custom warning: Wrong number of params for Element "&pl_dataElement)};
      return 1; // invalid number of params
    }
    pl_dataValue := {charstringlistVal :={}};
    for(var integer i:=0; i<sizeof(pl_params);i:=i+1) {
      pl_dataValue := {charstringlistVal := pl_dataValue.charstringlistVal&{pl_params[i].paramValue}};
    }
    return 0;
  }

  // the help database for DummySource
  const EPTF_DataSource_Help_DataElementChildren c_EPTF_DataSource_helpTest := {
      {
        dataElement := {
          name := c_EPTF_DataSource_dataElement_Help,
          valueType := charstringType,
          description := "This data element returns the help information about all dataElements supported in DummySource",
          parameters := {
            {
              name := c_EPTF_DataSource_paramNameHelpFormat,
              typeDescriptor := {
                valueType := charstringType
              },
              description := "The format of the output. Valid values: "
                &c_EPTF_DataSource_helpFormatJSON&" , "&c_EPTF_DataSource_helpFormatTEXT
                &". Default: "&c_EPTF_DataSource_helpFormatJSON,
              exampleValue := c_EPTF_DataSource_helpFormatTEXT
            }
          }
        },
        children := {}
      },
      {
        dataElement := {
          name := "ElementWithUnspecifiedTypeDescr",
          valueType := charstringType,
          description := "Help dataelement test with unspecified typeDescriptor",
          parameters := {
          }
        },
        children := {}
      },
      {
        dataElement := {
          name := "ElementWith_TypeDescr==omit",
          valueType := charstringType,
          typeDescriptor := omit,
          description := "Help dataelement test with typeDescriptor==omit",
          parameters := {
          }
        },
        children := {}
      },
      {
        dataElement := {
          name := "ElementListOfItem",
          valueType := charstringType,
          typeDescriptor := {
            isListOf := true,
            typeName := "Item"
          },
          description := "Help dataelement test with isListOf==true",
          parameters := {
          }
        },
        children := {}
      },
      {
        dataElement := {
          name := "SingleItem",
          valueType := charstringType,
          typeDescriptor := {
            isListOf := false,
            typeName := "Item"
          },
          description := "Help dataelement test with isListOf==false",
          parameters := {
          }
        },
        children := {}
      },
      {
        dataElement := {
          name := "SingleItemWithOmit",
          valueType := charstringType,
          typeDescriptor := {
            isListOf := omit,
            typeName := "Item"
          },
          description := "Help dataelement test with isListOf==omit",
          parameters := {
          }
        },
        children := {}
      },
      {
        dataElement := {
          name := "SingleItemListNotSpecified",
          valueType := charstringType,
          typeDescriptor := {
            typeName := "Item"
          },
          description := "Help dataelement test with unspecified isListOf",
          parameters := {
          }
        },
        children := {}
      },
      {
        dataElement := {
          name := "ParamTypeDescr==valueType",
          valueType := charstringType,
          description := "Help dataelement parameter test",
          parameters := {
            {
              name := c_EPTF_DataSource_paramNameHelpFormat,
              typeDescriptor := {
                valueType := charstringType
              },
              description := "Parameter with ParamTypeDescr==valueType",
              exampleValue := c_EPTF_DataSource_helpFormatTEXT
            }
          }
        },
        children := {}
      },
      {
        dataElement := {
          name := "ParamTypeDescr==reference_isListOf_unspecified",
          valueType := charstringType,
          description := "Help dataelement parameter test",
          parameters := {
            {
              name := c_EPTF_DataSource_paramNameHelpFormat,
              typeDescriptor := {
                reference := {
                  typeName := "ParamType"
                }
              },
              description := "Parameter with ParamTypeDescr==reference isIndexInListOf unspecified",
              exampleValue := c_EPTF_DataSource_helpFormatTEXT
            }
          }
        },
        children := {}
      },
      {
        dataElement := {
          name := "ParamTypeDescr==reference_isIndexInListOf==omit",
          valueType := charstringType,
For faster browsing, not all history is shown. View entire blame