xmlTest_protocolXsd_Testcases.ttcn 23.5 KB
Newer Older
Elemer Lelik's avatar
Elemer Lelik committed
1
/******************************************************************************
Adam Knapp's avatar
Adam Knapp committed
2
 * Copyright (c) 2000-2021 Ericsson Telecom AB
Elemer Lelik's avatar
Elemer Lelik committed
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v2.0
Elemer Lelik's avatar
Elemer Lelik committed
5
 * which accompanies this distribution, and is available at
6
 * https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html
Elemer Lelik's avatar
Elemer Lelik committed
7
8
9
10
11
12
 *
 * Contributors:
 *   Balasko, Jeno
 *   Raduly, Csaba
 *   Szabados, Kristof
 *
Elemer Lelik's avatar
Elemer Lelik committed
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
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
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
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
 ******************************************************************************/

//=========================================================================
// References: (XSD_0)  XML Schema Part 0: Primer Second Edition
//             (XSD_1)  XML Schema Part 1: Structures Second Edition
//             (XSD_2)  XML Schema Part 2: Datatypes Second Edition
//             (ETSI_9) ETSI ES 201 873-9 V4.1.2, The Testing and Test Control Notation version 3;
//                      Part 9: Using XML schema with TTCN-3

module xmlTest_protocolXsd_Testcases
{

//=========================================================================
// Import Part
//=========================================================================
//import from XSD all;
import from PIPEasp_Types all;
import from PIPEasp_PortType all;
import from PIPEasp_Templates all;
import from xmlTest_Shell all;
import from www_ericsson_com_is_isco_IntegratedSite_R4L06_R4AB_1_02_e all;
import from uri_etsi_org_ngn_params_xml_simservs_sci_e all;
//=========================================================================
// Module Parameters
//=========================================================================

// Insert module parameters here if applicable!
// You can use the module_param skeleton!

//=========================================================================
// Data Types
//=========================================================================

// Insert data type defintions here if applicable!
// You can use the data_type skeleton!

//=========================================================================
// Signatures
//=========================================================================

// Insert signature definitions here if applicable!
// You can use the signature skeleton!

//=========================================================================
//Port Types
//=========================================================================

// Insert port type defintions here if applicable!
// You can use the port_type skeleton!

//=========================================================================
//Component Types
//=========================================================================

//=========================================================================
// Constants
//=========================================================================
group Group_MGW_constants {

const IntegratedSite c_mgw_integratedsite_pdu := {
  administrativeData := {
    siteAlias := omit,
    ipb := omit,
    systemRestart := { omit }
  },
  bladeSystems := {
    bladeSystem_list := {
      {
        name  := "blade-1",
        alias := "Blade of the immortal",
        number := omit,
        typeName := omit,
        swgRef := "swg17",
        scpRef := omit,
        admState := omit,
        opState := omit,
        availStatus := omit,
        bsdRef := omit,
        bsomAddress := omit,
        externalBootServerRef := omit,
        autoCreatePrivateNetwork := omit,
        namespace := omit,
        blade_list := {},
        bsNetworkConfiguration := {
          bsIpTrafficClass_list := {},
          bsLanTrafficClass_list := {},
          bsLogicalNetwork_list := {},
          bsVlan_list := {}
        }
      }
    }
  },
  hardware := {
    activeSis := omit,
    bladeSystemDomain_list := {},
    bladeType_list := {},
    interSubrackLink_list := {},
    subrack_list := {}
  },
  networkConfiguration := {
    externalBootServer_list := { },
    isIpTrafficClass_list := { },
    isLanTrafficClass_list := { },
    isLogicalNetwork_list := {},
    isVariables := {
      updateMode := omit,
      dataModelVersion := omit,
      rlspMarkerGenerateInterval := omit,
      rlspLinkDownThreshold := omit,
      rlspLinkUpThreshold := omit,
      timezoneDstRule := omit,
      dnsDomain := omit,
      notifyAfter := omit,
      defaultDhcpLeaseTime := omit,
      lifeTimeDhcpLeaseTime := omit
    },
    isVlan_list := {}
  },
  software := {
    softwareInventory := {
      backup_list := {},
      softwareAlarm_list := {},
      softwareDeliveryPackage_list := {{
          prodNo   := "1",
          prodRev  := "3",
          prodName := omit,
          type_    := omit
        }},
      softwareGroup_list := {}
    },
    softwareJobs := {
      backupCreateJob_list := {},
      backupExportJob_list := {},
      backupImportJob_list := {},
      backupRestoreJob_list:= {},
      softwareChangeJob_list := {},
      softwareDownloadJob_list := {}
    }
  }
};


const charstring c_mgw_integratedsite_encodedPdu:=
"<IntegratedSite:IntegratedSite xmlns:IntegratedSite='http://www.ericsson.com/is/isco/IntegratedSite/R4L06/R4AB_1.02'>\n" &
"\t<IntegratedSite:AdministrativeData>\n" &
"\t\t<IntegratedSite:SystemRestart/>\n" &
"\t</IntegratedSite:AdministrativeData>\n" &
"\t<IntegratedSite:BladeSystems>\n" &
"\t\t<IntegratedSite:BladeSystem>\n" &
"\t\t\t<IntegratedSite:name>blade-1</IntegratedSite:name>\n" &
"\t\t\t<IntegratedSite:alias>Blade of the immortal</IntegratedSite:alias>\n" &
"\t\t\t<IntegratedSite:swgRef>swg17</IntegratedSite:swgRef>\n" &
"\t\t\t<IntegratedSite:BsNetworkConfiguration/>\n" &
"\t\t</IntegratedSite:BladeSystem>\n\t</IntegratedSite:BladeSystems>\n" &
"\t<IntegratedSite:Hardware/>\n" &
"\t<IntegratedSite:NetworkConfiguration>\n" &
"\t\t<IntegratedSite:IsVariables/>\n" &
"\t</IntegratedSite:NetworkConfiguration>\n" &
"\t<IntegratedSite:Software>\n" &
"\t\t<IntegratedSite:SoftwareInventory>\n" &
"\t\t\t<IntegratedSite:SoftwareDeliveryPackage>\n" &
"\t\t\t\t<IntegratedSite:prodNo>1</IntegratedSite:prodNo>\n" &
"\t\t\t\t<IntegratedSite:prodRev>3</IntegratedSite:prodRev>\n" &
"\t\t\t</IntegratedSite:SoftwareDeliveryPackage>\n" &
"\t\t</IntegratedSite:SoftwareInventory>\n" &
"\t\t<IntegratedSite:SoftwareJobs/>\n" &
"\t</IntegratedSite:Software>\n" &
"</IntegratedSite:IntegratedSite>\n" &
"\n"

}//Group_MGW_constants


group Group_SIP_constants {

const MessageType c_sipserver_pdu1:= {
    choice:= {
      crgt:= {
        chargingControlIndicators:={
          immediateChangeOfActuallyAppliedTariff:=true,
          delayUntilStart:=true
        },
        chargingTariff:= {
          choice:= {
            tariffCurrency:= {
              currentTariffCurrency:= {
                communicationChargeSequenceCurrency_list:={
                  {
                    currencyFactorScale:={
                      currencyFactor:=1111,
                      currencyScale:= -2
                    },
                    tariffDuration:=3,
                    subTariffControl:=false
                  }
                },
                tariffControlIndicators:=true,
                callAttemptChargeCurrency:= {
                    currencyFactor:=273,
                    currencyScale:= -7
                },
                callSetupChargeCurrency:={
                    currencyFactor:=273,
                    currencyScale:= -7
                }
              },
              tariffSwitchCurrency:={
                nextTariffCurrency:= {
                  communicationChargeSequenceCurrency_list:={
                    {
                    currencyFactorScale:={
                      currencyFactor:=1111,
                      currencyScale:= -2
                    },
                    tariffDuration:=3,
                    subTariffControl:=false
                    }
                  },
                  tariffControlIndicators:=true,
                  callAttemptChargeCurrency:= {
                      currencyFactor:=999999,
                      currencyScale:= -7
                  },
                  callSetupChargeCurrency:={
                      currencyFactor:=999999,
                      currencyScale:= -7
                  }
                },//nextTariffCurrency
                tariffSwitchOverTime:= 'EF'O
              }//tariffSwitchCurrency
            }//tariffCurrency
          }//choice
        },//chargingTariff
        originationIdentification:= {
          networkIdentification:= "Ericsson Supported Core NW",
          referenceID:= 0
        },//originationIdentification
        destinationIdentification:=omit,
        currency:="HUF"
      }//cgrt
    }//choice
}//pdu"


const charstring c_sipserver_expectedEncodedPdu:=
"<sci:messageType xmlns:sci='http://uri.etsi.org/ngn/params/xml/simservs/sci'>\n" &
"\t<sci:crgt>\n" &
"\t\t<sci:chargingControlIndicators>\n" &
"\t\t\t<sci:immediateChangeOfActuallyAppliedTariff>true</sci:immediateChangeOfActuallyAppliedTariff>\n" &
"\t\t\t<sci:delayUntilStart>true</sci:delayUntilStart>\n" &
"\t\t</sci:chargingControlIndicators>\n" &
"\t\t<sci:chargingTariff>\n" &
"\t\t\t<sci:tariffCurrency>\n" &
"\t\t\t\t<sci:currentTariffCurrency>\n" &
"\t\t\t\t\t<sci:communicationChargeSequenceCurrency>\n" &
"\t\t\t\t\t\t<sci:currencyFactorScale>\n" &
"\t\t\t\t\t\t\t<sci:currencyFactor>1111</sci:currencyFactor>\n" &
"\t\t\t\t\t\t\t<sci:currencyScale>-2</sci:currencyScale>\n" &
"\t\t\t\t\t\t</sci:currencyFactorScale>\n" &
"\t\t\t\t\t\t<sci:tariffDuration>3</sci:tariffDuration>\n" &
"\t\t\t\t\t\t<sci:subTariffControl>false</sci:subTariffControl>\n" &
"\t\t\t\t\t</sci:communicationChargeSequenceCurrency>\n" &
"\t\t\t\t\t<sci:tariffControlIndicators>true</sci:tariffControlIndicators>\n" &
"\t\t\t\t\t<sci:callAttemptChargeCurrency>\n" &
"\t\t\t\t\t\t<sci:currencyFactor>273</sci:currencyFactor>\n" &
"\t\t\t\t\t\t<sci:currencyScale>-7</sci:currencyScale>\n" &
"\t\t\t\t\t</sci:callAttemptChargeCurrency>\n" &
"\t\t\t\t\t<sci:callSetupChargeCurrency>\n" &
"\t\t\t\t\t\t<sci:currencyFactor>273</sci:currencyFactor>\n" &
"\t\t\t\t\t\t<sci:currencyScale>-7</sci:currencyScale>\n" &
"\t\t\t\t\t</sci:callSetupChargeCurrency>\n" &
"\t\t\t\t</sci:currentTariffCurrency>\n" &
"\t\t\t\t<sci:tariffSwitchCurrency>\n" &
"\t\t\t\t\t<sci:nextTariffCurrency>\n" &
"\t\t\t\t\t\t<sci:communicationChargeSequenceCurrency>\n" &
"\t\t\t\t\t\t\t<sci:currencyFactorScale>\n" &
"\t\t\t\t\t\t\t\t<sci:currencyFactor>1111</sci:currencyFactor>\n" &
"\t\t\t\t\t\t\t\t<sci:currencyScale>-2</sci:currencyScale>\n" &
"\t\t\t\t\t\t\t</sci:currencyFactorScale>\n" &
"\t\t\t\t\t\t\t<sci:tariffDuration>3</sci:tariffDuration>\n" &
"\t\t\t\t\t\t\t<sci:subTariffControl>false</sci:subTariffControl>\n" &
"\t\t\t\t\t\t</sci:communicationChargeSequenceCurrency>\n" &
"\t\t\t\t\t\t<sci:tariffControlIndicators>true</sci:tariffControlIndicators>\n" &
"\t\t\t\t\t\t<sci:callAttemptChargeCurrency>\n" &
"\t\t\t\t\t\t\t<sci:currencyFactor>999999</sci:currencyFactor>\n" &
"\t\t\t\t\t\t\t<sci:currencyScale>-7</sci:currencyScale>\n" &
"\t\t\t\t\t\t</sci:callAttemptChargeCurrency>\n" &
"\t\t\t\t\t\t<sci:callSetupChargeCurrency>\n" &
"\t\t\t\t\t\t\t<sci:currencyFactor>999999</sci:currencyFactor>\n" &
"\t\t\t\t\t\t\t<sci:currencyScale>-7</sci:currencyScale>\n" &
"\t\t\t\t\t\t</sci:callSetupChargeCurrency>\n" &
"\t\t\t\t\t</sci:nextTariffCurrency>\n" &
"\t\t\t\t\t<sci:tariffSwitchOverTime>EF</sci:tariffSwitchOverTime>\n" &
"\t\t\t\t</sci:tariffSwitchCurrency>\n" &
"\t\t\t</sci:tariffCurrency>\n" &
"\t\t</sci:chargingTariff>\n" &
"\t\t<sci:originationIdentification>\n" &
"\t\t\t<sci:networkIdentification>Ericsson Supported Core NW</sci:networkIdentification>\n" &
"\t\t\t<sci:referenceID>0</sci:referenceID>\n" &
"\t\t</sci:originationIdentification>\n" &
"\t\t<sci:currency>HUF</sci:currency>\n" &
"\t</sci:crgt>\n" &
"</sci:messageType>\n" &
"\n"

}//Group_SIP_constants


//=========================================================================
// Functions
//=========================================================================

external function f_enc_MGW_IntegratedSite(in IntegratedSite pdu, out octetstring stream)
with { extension "prototype(fast) encode(XER:XER_EXTENDED) errorbehavior(ALL:WARNING)" }

external function f_dec_MGW_IntegratedSite(in octetstring stream, out IntegratedSite pdu) return integer
with { extension "prototype(backtrack) decode(XER:XER_EXTENDED) errorbehavior(ALL:WARNING)" }

external function f_enc_SIP_MessageType(in MessageType pdu, out octetstring stream)
with { extension "prototype(fast) encode(XER:XER_EXTENDED) errorbehavior(ALL:WARNING)" }

external function f_dec_SIP_MessageType(in octetstring stream, out MessageType pdu) return integer
with { extension "prototype(backtrack) decode(XER:XER_EXTENDED) errorbehavior(ALL:WARNING)" }


//=========================================================================
//  f_encDecTest_MGW_IntegratedSite
//=========================================================================
function f_encDecTest_MGW_IntegratedSite(in IntegratedSite pl_pdu, in charstring pl_expectedEncodedPdu, in IntegratedSite pl_expectedDecodedPdu  ) {
  var octetstring vl_encodedPdu:=''O;
  f_enc_MGW_IntegratedSite(pl_pdu,vl_encodedPdu);

  if(match(vl_encodedPdu,char2oct(pl_expectedEncodedPdu))) {
    setverdict(pass)
  } else {
    log("The encoded message: ",vl_encodedPdu);
    setverdict(fail, match(vl_encodedPdu,char2oct(pl_expectedEncodedPdu)));
  }
  //log("===Checking value decoded from the encoded value vs expected value===");
  var IntegratedSite vl_decodedPdu;
  var integer vl_retval:= f_dec_MGW_IntegratedSite(vl_encodedPdu,vl_decodedPdu)
  if( vl_retval==0) {
    if(match(vl_decodedPdu,pl_expectedDecodedPdu)) {
      setverdict(pass);
    } else {
      setverdict(fail, match(vl_decodedPdu,pl_expectedDecodedPdu));
    }
  }else {
    setverdict(fail);
  }
}//f_

//=========================================================================
//  f_encDecTest_SIP_MessageType
//=========================================================================
function f_encDecTest_SIP_MessageType(in MessageType pl_pdu, in charstring pl_expectedEncodedPdu, in MessageType pl_expectedDecodedPdu  ) {
  var octetstring vl_encodedPdu:=''O;
  f_enc_SIP_MessageType(pl_pdu,vl_encodedPdu);

  if(match(vl_encodedPdu,char2oct(pl_expectedEncodedPdu))) {
    setverdict(pass)
  } else {
    log("The encoded message: ",vl_encodedPdu);
    setverdict(fail, match(vl_encodedPdu,char2oct(pl_expectedEncodedPdu)));
  }
  //log("===Checking value decoded from the encoded value vs expected value===");
  var MessageType vl_decodedPdu;
  var integer vl_retval:= f_dec_SIP_MessageType(vl_encodedPdu,vl_decodedPdu)
  if( vl_retval==0) {
    if(match(vl_decodedPdu,pl_expectedDecodedPdu)) {
      setverdict(pass);
    } else {
      setverdict(fail, match(vl_decodedPdu,pl_expectedDecodedPdu));
    }
  }else {
    setverdict(fail);
  }
}//f_


//=========================================================================
// Testcases
//=========================================================================

testcase tc_XmlTest_CAI3G_converter() runs on xmlTest_CT
{
399
  f_shellCommandWithVerdict(xsd2ttcn_command & " -z -g Bulk.xsd GenericCai3gType.xsd Provisioning.xsd","",c_shell_successWithWarning);
Elemer Lelik's avatar
Elemer Lelik committed
400
401
402

  if(getverdict==pass) {
    f_compareFiles(
403
      "schemas_ericsson_com_cai3g1_1.ttcn","schemas_ericsson_com_cai3g1_1_e.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
404
    f_compareFiles(
405
      "schemas_ericsson_com_upg_bulkprovisioning_1_0.ttcn","schemas_ericsson_com_upg_bulkprovisioning_1_0_e.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
406
    f_compareFiles(
407
      "schemas_ericsson_com_upg_provisioning_1_0.ttcn","schemas_ericsson_com_upg_provisioning_1_0_e.ttcn", c_numOfDiff+1); // import misses _e
Elemer Lelik's avatar
Elemer Lelik committed
408
409
410
411
412
  }
}

testcase tc_XmlTest_CCAPI_converter() runs on xmlTest_CT
{
413
  f_shellCommandWithVerdict(xsd2ttcn_command & "CCAPI.xsd","",c_shell_successWithoutWarningAndError);
Elemer Lelik's avatar
Elemer Lelik committed
414
415
416

  if(getverdict==pass) {
    f_compareFiles(
417
      "NoTargetNamespace.ttcn","NoTargetNamespace_CCAPI_e.ttcn", c_numOfDiff+1); // Module name
Elemer Lelik's avatar
Elemer Lelik committed
418
419
420
421
422
  }
}

testcase tc_XmlTest_HSS_converter() runs on xmlTest_CT
{
423
  f_shellCommandWithVerdict(xsd2ttcn_command & "-z -g avg.xsd cai3g1.2_provisioning.xsd eps.xsd hssla_types.xsd","",c_shell_successWithWarning);
Elemer Lelik's avatar
Elemer Lelik committed
424
425
426

  if(getverdict==pass) {
    f_compareFiles(
427
      "schemas_ericsson_com_cai3g1_2.ttcn","schemas_ericsson_com_cai3g1_2_e.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
428
    f_compareFiles(
429
      "schemas_ericsson_com_ma_HSS.ttcn","schemas_ericsson_com_ma_HSS_e.ttcn", c_numOfDiff+1); // Import misses _e
Elemer Lelik's avatar
Elemer Lelik committed
430
431
432
433
434
  }
}

testcase tc_XmlTest_JMdict_converter() runs on xmlTest_CT
{
435
  f_shellCommandWithVerdict(xsd2ttcn_command & "jmdict-good.xsd","",c_shell_successWithoutWarningAndError);
Elemer Lelik's avatar
Elemer Lelik committed
436
437
438

  if(getverdict==pass) {
    f_compareFiles(
439
      "NoTargetNamespace.ttcn","NoTargetNamespace_JMdict_e.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
440
441
442
443
444
  }
}

testcase tc_XmlTest_MGW_converter() runs on xmlTest_CT
{
445
  f_shellCommandWithVerdict(xsd2ttcn_command & "-z confd.xsd IntegratedSite.xsd IsTypes.xsd MainSwitch.xsd Mgw_R9B27.xsd Misc.xsd xml.xsd XMLSchema.xsd", "",c_shell_successWithWarning);
Elemer Lelik's avatar
Elemer Lelik committed
446
447
448

  if(getverdict==pass) {
    f_compareFiles(
449
      "tail_f_com_ns_confd_1_0.ttcn","tail_f_com_ns_confd_1_0_e.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
450
    f_compareFiles(
451
      "www_ericsson_com_is_isco_IntegratedSite_R4L06_R4AB_1_02.ttcn","www_ericsson_com_is_isco_IntegratedSite_R4L06_R4AB_1_02_e.ttcn", c_numOfDiff+2);// Imports misses _e
Elemer Lelik's avatar
Elemer Lelik committed
452
    f_compareFiles(
453
      "www_ericsson_com_is_isco_IsTypes_R4L06_R4AB_1_02.ttcn","www_ericsson_com_is_isco_IsTypes_R4L06_R4AB_1_02_e.ttcn", c_numOfDiff+1);// Import misses _e
Elemer Lelik's avatar
Elemer Lelik committed
454
    f_compareFiles(
455
      "www_ericsson_com_is_isco_MainSwitch_R4L06_R4AB_1_02.ttcn","www_ericsson_com_is_isco_MainSwitch_R4L06_R4AB_1_02_e.ttcn", c_numOfDiff+2);// Imports misses _e
Elemer Lelik's avatar
Elemer Lelik committed
456
    f_compareFiles(
457
      "www_ericsson_com_is_isco_Mgw_R9B27.ttcn","www_ericsson_com_is_isco_Mgw_R9B27_e.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
458
    f_compareFiles(
459
      "www_ericsson_com_is_isco_Misc_R4L06_R4AB_1_02.ttcn","www_ericsson_com_is_isco_Misc_R4L06_R4AB_1_02_e.ttcn", c_numOfDiff+1);// Import misses _e
Elemer Lelik's avatar
Elemer Lelik committed
460
    f_compareFiles(
461
      "www_w3_org_XML_1998_namespace.ttcn","www_w3_org_XML_1998_namespace_e.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
462
463
464
465
466
  }
}

testcase tc_XmlTest_MGW_HK84933_converter() runs on xmlTest_CT
{
467
  f_shellCommandWithVerdict(xsd2ttcn_command & " -z IntegratedSite_HK84933.xsd","",c_shell_successWithWarning);
Elemer Lelik's avatar
Elemer Lelik committed
468
469
470
471
472

  if(getverdict==pass) {
    f_compareFiles(
      "www_ericsson_com_is_isco_IntegratedSite_R4L06_R4AB_1_02.ttcn",
      "www_ericsson_com_is_isco_IntegratedSite_R4L06_R4AB_1_02_HK84933_e.ttcn",
473
      c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
474
475
476
477
478
479
480
481
482
483
  }
}

testcase tc_XmlTest_MGW_encDec() runs on xmlTest_CT
{
  f_encDecTest_MGW_IntegratedSite(c_mgw_integratedsite_pdu,c_mgw_integratedsite_encodedPdu,c_mgw_integratedsite_pdu);
}

testcase tc_XmlTest_PAP_converter() runs on xmlTest_CT
{
484
  f_shellCommandWithVerdict(xsd2ttcn_command & "PAP.xsd","",c_shell_successWithoutWarningAndError);
Elemer Lelik's avatar
Elemer Lelik committed
485
486
487

  if(getverdict==pass) {
    f_compareFiles(
488
      "NoTargetNamespace.ttcn","NoTargetNamespace_PAP_e.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
489
490
491
492
493
  }
}

testcase tc_XmlTest_ParlayX_converter() runs on xmlTest_CT
{
494
  f_shellCommandWithVerdict(xsd2ttcn_command & "-z parlayx_common_types_2_0.xsd parlayx_payment_amount_charging_interface_2_0.xsd parlayx_payment_reserve_amount_charging_interface_2_0.xsd parlayx_payment_reserve_volume_charging_interface_2_0.xsd parlayx_payment_types_2_0.xsd parlayx_payment_volume_charging_interface_2_0.xsd", "",c_shell_successWithoutWarningAndError);
Elemer Lelik's avatar
Elemer Lelik committed
495
496
497

  if(getverdict==pass) {
    f_compareFiles(
498
      "www_csapi_org_schema_parlayx_common_v2_0.ttcn","www_csapi_org_schema_parlayx_common_v2_0_e.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
499
    f_compareFiles(
500
      "www_csapi_org_schema_parlayx_payment_amount_charging_v2_0_local.ttcn","www_csapi_org_schema_parlayx_payment_amount_charging_v2_0_local_e.ttcn", 2+c_numOfDiff); // Imports misses _e
Elemer Lelik's avatar
Elemer Lelik committed
501
    f_compareFiles(
502
      "www_csapi_org_schema_parlayx_payment_reserve_amount_charging_v2_0_local.ttcn","www_csapi_org_schema_parlayx_payment_reserve_amount_charging_v2_0_local_e.ttcn", 2+c_numOfDiff);  // Imports misses _e
Elemer Lelik's avatar
Elemer Lelik committed
503
    f_compareFiles(
504
      "www_csapi_org_schema_parlayx_payment_reserve_volume_charging_v2_0_local.ttcn","www_csapi_org_schema_parlayx_payment_reserve_volume_charging_v2_0_local_e.ttcn", 2+c_numOfDiff); // Imports misses _e
Elemer Lelik's avatar
Elemer Lelik committed
505
    f_compareFiles(
506
      "www_csapi_org_schema_parlayx_payment_v2_0.ttcn","www_csapi_org_schema_parlayx_payment_v2_0_e.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
507
    f_compareFiles(
508
      "www_csapi_org_schema_parlayx_payment_volume_charging_v2_0_local.ttcn","www_csapi_org_schema_parlayx_payment_volume_charging_v2_0_local_e.ttcn", 2+c_numOfDiff); // Imports misses _e
Elemer Lelik's avatar
Elemer Lelik committed
509
510
511
512
513
  }
}

testcase tc_XmlTest_PIDF_converter() runs on xmlTest_CT
{
514
  f_shellCommandWithVerdict(xsd2ttcn_command & "-z pidf.xsd rlmi.xsd testschema.xsd xml_PIDF.xsd","",c_shell_successWithWarning);
Elemer Lelik's avatar
Elemer Lelik committed
515
516
517

  if(getverdict==pass) {
    f_compareFiles(
518
      "ietf_params_xml_ns_pidf.ttcn","ietf_params_xml_ns_pidf_e.ttcn", 1+c_numOfDiff); // Import misses _e
Elemer Lelik's avatar
Elemer Lelik committed
519
    f_compareFiles(
520
      "ietf_params_xml_ns_pidf_status.ttcn","ietf_params_xml_ns_pidf_status_e.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
521
    f_compareFiles(
522
      "ietf_params_xml_ns_rlmi.ttcn","ietf_params_xml_ns_rlmi_e.ttcn", 1+c_numOfDiff); // Import misses _e
Elemer Lelik's avatar
Elemer Lelik committed
523
    f_compareFiles(
524
      "www_w3_org_XML_1998_namespace.ttcn","www_w3_org_XML_1998_namespace_PIDF_e.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
525
526
527
528
529
  }
}

testcase tc_XmlTest_RLP_converter() runs on xmlTest_CT
{
530
  f_shellCommandWithVerdict(xsd2ttcn_command & "RLP_SVC.xsd","",c_shell_successWithoutWarningAndError);
Elemer Lelik's avatar
Elemer Lelik committed
531
532
533

  if(getverdict==pass) {
    f_compareFiles(
534
      "NoTargetNamespace.ttcn","NoTargetNamespace_RLP_e.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
535
536
537
538
539
  }
}

testcase tc_XmlTest_RLXML_converter() runs on xmlTest_CT
{
540
  f_shellCommandWithVerdict(xsd2ttcn_command & "-z RLXML_small.xsd","",c_shell_successWithoutWarningAndError);
Elemer Lelik's avatar
Elemer Lelik committed
541
542
543

  if(getverdict==pass) {
    f_compareFiles(
544
      "ietf_params_xml_ns_resource_lists.ttcn","ietf_params_xml_ns_resource_lists_e.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
545
546
547
548
549
  }
}

testcase tc_XmlTest_ShData_converter() runs on xmlTest_CT
{
550
  f_shellCommandWithVerdict(xsd2ttcn_command & "-z ShDataType.xsd","",c_shell_successWithoutWarningAndError);
Elemer Lelik's avatar
Elemer Lelik committed
551
552
553

  if(getverdict==pass) {
    f_compareFiles(
554
      "schemas_ericsson_com_upg_dm_hss_sh_4_1.ttcn","schemas_ericsson_com_upg_dm_hss_sh_4_1_e.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
555
556
557
558
559
  }
}

testcase tc_XmlTest_SIPserver_converter() runs on xmlTest_CT
{
560
  f_shellCommandWithVerdict(xsd2ttcn_command & "-z SIP.xsd","",c_shell_successWithoutWarningAndError);
Elemer Lelik's avatar
Elemer Lelik committed
561
562
563

  if(getverdict==pass) {
    f_compareFiles(
564
      "uri_etsi_org_ngn_params_xml_simservs_sci.ttcn","uri_etsi_org_ngn_params_xml_simservs_sci_e.ttcn", c_numOfDiff);
Elemer Lelik's avatar
Elemer Lelik committed
565
566
567
568
569
570
571
572
  }
}

testcase tc_XmlTest_SIPserver_crgt_encDec() runs on xmlTest_CT
{
  f_encDecTest_SIP_MessageType(c_sipserver_pdu1,c_sipserver_expectedEncodedPdu,c_sipserver_pdu1);
}

573
574
575
576
577
578
579
580
581
582
testcase tc_XmlTest_XML_RPC_converter() runs on xmlTest_CT
{
  f_shellCommandWithVerdict(xsd2ttcn_command & "-z XML_RPC.xsd","",c_shell_successWithWarning);

  if(getverdict==pass) {
    f_compareFiles(
      "NoTargetNamespace_XML_RPC_e.ttcn","NoTargetNamespace.ttcn", c_numOfDiff);
  }
}

Elemer Lelik's avatar
Elemer Lelik committed
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
//=========================================================================
// Control
//=========================================================================

control {
  execute(tc_XmlTest_CAI3G_converter());
  execute(tc_XmlTest_CCAPI_converter());
  execute(tc_XmlTest_HSS_converter());
  execute(tc_XmlTest_JMdict_converter());
  execute(tc_XmlTest_MGW_converter());
  execute(tc_XmlTest_MGW_encDec());
  execute(tc_XmlTest_MGW_HK84933_converter());
  execute(tc_XmlTest_PAP_converter());
  execute(tc_XmlTest_ParlayX_converter());
  execute(tc_XmlTest_PIDF_converter());
  execute(tc_XmlTest_RLP_converter());
  execute(tc_XmlTest_RLXML_converter());
  execute(tc_XmlTest_ShData_converter());
  execute(tc_XmlTest_SIPserver_converter());
  execute(tc_XmlTest_SIPserver_crgt_encDec());
  execute(tc_XmlTest_XML_RPC_converter());
}

}  // end of module