OLD | NEW |
1 library googleapis.qpxExpress.v1.test; | 1 library googleapis.qpxExpress.v1.test; |
2 | 2 |
3 import "dart:core" as core; | 3 import "dart:core" as core; |
4 import "dart:collection" as collection; | 4 import "dart:collection" as collection; |
5 import "dart:async" as async; | 5 import "dart:async" as async; |
6 import "dart:convert" as convert; | 6 import "dart:convert" as convert; |
7 | 7 |
8 import 'package:http/http.dart' as http; | 8 import 'package:http/http.dart' as http; |
9 import 'package:http/testing.dart' as http_testing; | 9 import 'package:http/testing.dart' as http_testing; |
10 import 'package:unittest/unittest.dart' as unittest; | 10 import 'package:unittest/unittest.dart' as unittest; |
11 import 'package:googleapis/common/common.dart' as common; | |
12 import 'package:googleapis/src/common_internal.dart' as common_internal; | |
13 import '../common/common_internal_test.dart' as common_test; | |
14 | 11 |
15 import 'package:googleapis/qpxexpress/v1.dart' as api; | 12 import 'package:googleapis/qpxexpress/v1.dart' as api; |
16 | 13 |
| 14 class HttpServerMock extends http.BaseClient { |
| 15 core.Function _callback; |
| 16 core.bool _expectJson; |
17 | 17 |
| 18 void register(core.Function callback, core.bool expectJson) { |
| 19 _callback = callback; |
| 20 _expectJson = expectJson; |
| 21 } |
| 22 |
| 23 async.Future<http.StreamedResponse> send(http.BaseRequest request) { |
| 24 if (_expectJson) { |
| 25 return request.finalize() |
| 26 .transform(convert.UTF8.decoder) |
| 27 .join('') |
| 28 .then((core.String jsonString) { |
| 29 if (jsonString.isEmpty) { |
| 30 return _callback(request, null); |
| 31 } else { |
| 32 return _callback(request, convert.JSON.decode(jsonString)); |
| 33 } |
| 34 }); |
| 35 } else { |
| 36 var stream = request.finalize(); |
| 37 if (stream == null) { |
| 38 return _callback(request, []); |
| 39 } else { |
| 40 return stream.toBytes().then((data) { |
| 41 return _callback(request, data); |
| 42 }); |
| 43 } |
| 44 } |
| 45 } |
| 46 } |
| 47 |
| 48 http.StreamedResponse stringResponse( |
| 49 core.int status, core.Map headers, core.String body) { |
| 50 var stream = new async.Stream.fromIterable([convert.UTF8.encode(body)]); |
| 51 return new http.StreamedResponse(stream, status, headers: headers); |
| 52 } |
18 | 53 |
19 core.int buildCounterAircraftData = 0; | 54 core.int buildCounterAircraftData = 0; |
20 buildAircraftData() { | 55 buildAircraftData() { |
21 var o = new api.AircraftData(); | 56 var o = new api.AircraftData(); |
22 buildCounterAircraftData++; | 57 buildCounterAircraftData++; |
23 if (buildCounterAircraftData < 3) { | 58 if (buildCounterAircraftData < 3) { |
24 o.code = "foo"; | 59 o.code = "foo"; |
25 o.kind = "foo"; | 60 o.kind = "foo"; |
26 o.name = "foo"; | 61 o.name = "foo"; |
27 } | 62 } |
(...skipping 29 matching lines...) Expand all Loading... |
57 buildCounterAirportData++; | 92 buildCounterAirportData++; |
58 if (buildCounterAirportData < 3) { | 93 if (buildCounterAirportData < 3) { |
59 unittest.expect(o.city, unittest.equals('foo')); | 94 unittest.expect(o.city, unittest.equals('foo')); |
60 unittest.expect(o.code, unittest.equals('foo')); | 95 unittest.expect(o.code, unittest.equals('foo')); |
61 unittest.expect(o.kind, unittest.equals('foo')); | 96 unittest.expect(o.kind, unittest.equals('foo')); |
62 unittest.expect(o.name, unittest.equals('foo')); | 97 unittest.expect(o.name, unittest.equals('foo')); |
63 } | 98 } |
64 buildCounterAirportData--; | 99 buildCounterAirportData--; |
65 } | 100 } |
66 | 101 |
67 buildUnnamed1() { | 102 buildUnnamed1307() { |
68 var o = new core.List<core.String>(); | 103 var o = new core.List<core.String>(); |
69 o.add("foo"); | 104 o.add("foo"); |
70 o.add("foo"); | 105 o.add("foo"); |
71 return o; | 106 return o; |
72 } | 107 } |
73 | 108 |
74 checkUnnamed1(core.List<core.String> o) { | 109 checkUnnamed1307(core.List<core.String> o) { |
75 unittest.expect(o, unittest.hasLength(2)); | 110 unittest.expect(o, unittest.hasLength(2)); |
76 unittest.expect(o[0], unittest.equals('foo')); | 111 unittest.expect(o[0], unittest.equals('foo')); |
77 unittest.expect(o[1], unittest.equals('foo')); | 112 unittest.expect(o[1], unittest.equals('foo')); |
78 } | 113 } |
79 | 114 |
80 core.int buildCounterBagDescriptor = 0; | 115 core.int buildCounterBagDescriptor = 0; |
81 buildBagDescriptor() { | 116 buildBagDescriptor() { |
82 var o = new api.BagDescriptor(); | 117 var o = new api.BagDescriptor(); |
83 buildCounterBagDescriptor++; | 118 buildCounterBagDescriptor++; |
84 if (buildCounterBagDescriptor < 3) { | 119 if (buildCounterBagDescriptor < 3) { |
85 o.commercialName = "foo"; | 120 o.commercialName = "foo"; |
86 o.count = 42; | 121 o.count = 42; |
87 o.description = buildUnnamed1(); | 122 o.description = buildUnnamed1307(); |
88 o.kind = "foo"; | 123 o.kind = "foo"; |
89 o.subcode = "foo"; | 124 o.subcode = "foo"; |
90 } | 125 } |
91 buildCounterBagDescriptor--; | 126 buildCounterBagDescriptor--; |
92 return o; | 127 return o; |
93 } | 128 } |
94 | 129 |
95 checkBagDescriptor(api.BagDescriptor o) { | 130 checkBagDescriptor(api.BagDescriptor o) { |
96 buildCounterBagDescriptor++; | 131 buildCounterBagDescriptor++; |
97 if (buildCounterBagDescriptor < 3) { | 132 if (buildCounterBagDescriptor < 3) { |
98 unittest.expect(o.commercialName, unittest.equals('foo')); | 133 unittest.expect(o.commercialName, unittest.equals('foo')); |
99 unittest.expect(o.count, unittest.equals(42)); | 134 unittest.expect(o.count, unittest.equals(42)); |
100 checkUnnamed1(o.description); | 135 checkUnnamed1307(o.description); |
101 unittest.expect(o.kind, unittest.equals('foo')); | 136 unittest.expect(o.kind, unittest.equals('foo')); |
102 unittest.expect(o.subcode, unittest.equals('foo')); | 137 unittest.expect(o.subcode, unittest.equals('foo')); |
103 } | 138 } |
104 buildCounterBagDescriptor--; | 139 buildCounterBagDescriptor--; |
105 } | 140 } |
106 | 141 |
107 core.int buildCounterCarrierData = 0; | 142 core.int buildCounterCarrierData = 0; |
108 buildCarrierData() { | 143 buildCarrierData() { |
109 var o = new api.CarrierData(); | 144 var o = new api.CarrierData(); |
110 buildCounterCarrierData++; | 145 buildCounterCarrierData++; |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 buildCounterCityData++; | 180 buildCounterCityData++; |
146 if (buildCounterCityData < 3) { | 181 if (buildCounterCityData < 3) { |
147 unittest.expect(o.code, unittest.equals('foo')); | 182 unittest.expect(o.code, unittest.equals('foo')); |
148 unittest.expect(o.country, unittest.equals('foo')); | 183 unittest.expect(o.country, unittest.equals('foo')); |
149 unittest.expect(o.kind, unittest.equals('foo')); | 184 unittest.expect(o.kind, unittest.equals('foo')); |
150 unittest.expect(o.name, unittest.equals('foo')); | 185 unittest.expect(o.name, unittest.equals('foo')); |
151 } | 186 } |
152 buildCounterCityData--; | 187 buildCounterCityData--; |
153 } | 188 } |
154 | 189 |
155 buildUnnamed2() { | 190 buildUnnamed1308() { |
156 var o = new core.List<api.AircraftData>(); | 191 var o = new core.List<api.AircraftData>(); |
157 o.add(buildAircraftData()); | 192 o.add(buildAircraftData()); |
158 o.add(buildAircraftData()); | 193 o.add(buildAircraftData()); |
159 return o; | 194 return o; |
160 } | 195 } |
161 | 196 |
162 checkUnnamed2(core.List<api.AircraftData> o) { | 197 checkUnnamed1308(core.List<api.AircraftData> o) { |
163 unittest.expect(o, unittest.hasLength(2)); | 198 unittest.expect(o, unittest.hasLength(2)); |
164 checkAircraftData(o[0]); | 199 checkAircraftData(o[0]); |
165 checkAircraftData(o[1]); | 200 checkAircraftData(o[1]); |
166 } | 201 } |
167 | 202 |
168 buildUnnamed3() { | 203 buildUnnamed1309() { |
169 var o = new core.List<api.AirportData>(); | 204 var o = new core.List<api.AirportData>(); |
170 o.add(buildAirportData()); | 205 o.add(buildAirportData()); |
171 o.add(buildAirportData()); | 206 o.add(buildAirportData()); |
172 return o; | 207 return o; |
173 } | 208 } |
174 | 209 |
175 checkUnnamed3(core.List<api.AirportData> o) { | 210 checkUnnamed1309(core.List<api.AirportData> o) { |
176 unittest.expect(o, unittest.hasLength(2)); | 211 unittest.expect(o, unittest.hasLength(2)); |
177 checkAirportData(o[0]); | 212 checkAirportData(o[0]); |
178 checkAirportData(o[1]); | 213 checkAirportData(o[1]); |
179 } | 214 } |
180 | 215 |
181 buildUnnamed4() { | 216 buildUnnamed1310() { |
182 var o = new core.List<api.CarrierData>(); | 217 var o = new core.List<api.CarrierData>(); |
183 o.add(buildCarrierData()); | 218 o.add(buildCarrierData()); |
184 o.add(buildCarrierData()); | 219 o.add(buildCarrierData()); |
185 return o; | 220 return o; |
186 } | 221 } |
187 | 222 |
188 checkUnnamed4(core.List<api.CarrierData> o) { | 223 checkUnnamed1310(core.List<api.CarrierData> o) { |
189 unittest.expect(o, unittest.hasLength(2)); | 224 unittest.expect(o, unittest.hasLength(2)); |
190 checkCarrierData(o[0]); | 225 checkCarrierData(o[0]); |
191 checkCarrierData(o[1]); | 226 checkCarrierData(o[1]); |
192 } | 227 } |
193 | 228 |
194 buildUnnamed5() { | 229 buildUnnamed1311() { |
195 var o = new core.List<api.CityData>(); | 230 var o = new core.List<api.CityData>(); |
196 o.add(buildCityData()); | 231 o.add(buildCityData()); |
197 o.add(buildCityData()); | 232 o.add(buildCityData()); |
198 return o; | 233 return o; |
199 } | 234 } |
200 | 235 |
201 checkUnnamed5(core.List<api.CityData> o) { | 236 checkUnnamed1311(core.List<api.CityData> o) { |
202 unittest.expect(o, unittest.hasLength(2)); | 237 unittest.expect(o, unittest.hasLength(2)); |
203 checkCityData(o[0]); | 238 checkCityData(o[0]); |
204 checkCityData(o[1]); | 239 checkCityData(o[1]); |
205 } | 240 } |
206 | 241 |
207 buildUnnamed6() { | 242 buildUnnamed1312() { |
208 var o = new core.List<api.TaxData>(); | 243 var o = new core.List<api.TaxData>(); |
209 o.add(buildTaxData()); | 244 o.add(buildTaxData()); |
210 o.add(buildTaxData()); | 245 o.add(buildTaxData()); |
211 return o; | 246 return o; |
212 } | 247 } |
213 | 248 |
214 checkUnnamed6(core.List<api.TaxData> o) { | 249 checkUnnamed1312(core.List<api.TaxData> o) { |
215 unittest.expect(o, unittest.hasLength(2)); | 250 unittest.expect(o, unittest.hasLength(2)); |
216 checkTaxData(o[0]); | 251 checkTaxData(o[0]); |
217 checkTaxData(o[1]); | 252 checkTaxData(o[1]); |
218 } | 253 } |
219 | 254 |
220 core.int buildCounterData = 0; | 255 core.int buildCounterData = 0; |
221 buildData() { | 256 buildData() { |
222 var o = new api.Data(); | 257 var o = new api.Data(); |
223 buildCounterData++; | 258 buildCounterData++; |
224 if (buildCounterData < 3) { | 259 if (buildCounterData < 3) { |
225 o.aircraft = buildUnnamed2(); | 260 o.aircraft = buildUnnamed1308(); |
226 o.airport = buildUnnamed3(); | 261 o.airport = buildUnnamed1309(); |
227 o.carrier = buildUnnamed4(); | 262 o.carrier = buildUnnamed1310(); |
228 o.city = buildUnnamed5(); | 263 o.city = buildUnnamed1311(); |
229 o.kind = "foo"; | 264 o.kind = "foo"; |
230 o.tax = buildUnnamed6(); | 265 o.tax = buildUnnamed1312(); |
231 } | 266 } |
232 buildCounterData--; | 267 buildCounterData--; |
233 return o; | 268 return o; |
234 } | 269 } |
235 | 270 |
236 checkData(api.Data o) { | 271 checkData(api.Data o) { |
237 buildCounterData++; | 272 buildCounterData++; |
238 if (buildCounterData < 3) { | 273 if (buildCounterData < 3) { |
239 checkUnnamed2(o.aircraft); | 274 checkUnnamed1308(o.aircraft); |
240 checkUnnamed3(o.airport); | 275 checkUnnamed1309(o.airport); |
241 checkUnnamed4(o.carrier); | 276 checkUnnamed1310(o.carrier); |
242 checkUnnamed5(o.city); | 277 checkUnnamed1311(o.city); |
243 unittest.expect(o.kind, unittest.equals('foo')); | 278 unittest.expect(o.kind, unittest.equals('foo')); |
244 checkUnnamed6(o.tax); | 279 checkUnnamed1312(o.tax); |
245 } | 280 } |
246 buildCounterData--; | 281 buildCounterData--; |
247 } | 282 } |
248 | 283 |
249 core.int buildCounterFareInfo = 0; | 284 core.int buildCounterFareInfo = 0; |
250 buildFareInfo() { | 285 buildFareInfo() { |
251 var o = new api.FareInfo(); | 286 var o = new api.FareInfo(); |
252 buildCounterFareInfo++; | 287 buildCounterFareInfo++; |
253 if (buildCounterFareInfo < 3) { | 288 if (buildCounterFareInfo < 3) { |
254 o.basisCode = "foo"; | 289 o.basisCode = "foo"; |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
291 | 326 |
292 checkFlightInfo(api.FlightInfo o) { | 327 checkFlightInfo(api.FlightInfo o) { |
293 buildCounterFlightInfo++; | 328 buildCounterFlightInfo++; |
294 if (buildCounterFlightInfo < 3) { | 329 if (buildCounterFlightInfo < 3) { |
295 unittest.expect(o.carrier, unittest.equals('foo')); | 330 unittest.expect(o.carrier, unittest.equals('foo')); |
296 unittest.expect(o.number, unittest.equals('foo')); | 331 unittest.expect(o.number, unittest.equals('foo')); |
297 } | 332 } |
298 buildCounterFlightInfo--; | 333 buildCounterFlightInfo--; |
299 } | 334 } |
300 | 335 |
301 buildUnnamed7() { | 336 buildUnnamed1313() { |
302 var o = new core.List<api.BagDescriptor>(); | 337 var o = new core.List<api.BagDescriptor>(); |
303 o.add(buildBagDescriptor()); | 338 o.add(buildBagDescriptor()); |
304 o.add(buildBagDescriptor()); | 339 o.add(buildBagDescriptor()); |
305 return o; | 340 return o; |
306 } | 341 } |
307 | 342 |
308 checkUnnamed7(core.List<api.BagDescriptor> o) { | 343 checkUnnamed1313(core.List<api.BagDescriptor> o) { |
309 unittest.expect(o, unittest.hasLength(2)); | 344 unittest.expect(o, unittest.hasLength(2)); |
310 checkBagDescriptor(o[0]); | 345 checkBagDescriptor(o[0]); |
311 checkBagDescriptor(o[1]); | 346 checkBagDescriptor(o[1]); |
312 } | 347 } |
313 | 348 |
314 core.int buildCounterFreeBaggageAllowance = 0; | 349 core.int buildCounterFreeBaggageAllowance = 0; |
315 buildFreeBaggageAllowance() { | 350 buildFreeBaggageAllowance() { |
316 var o = new api.FreeBaggageAllowance(); | 351 var o = new api.FreeBaggageAllowance(); |
317 buildCounterFreeBaggageAllowance++; | 352 buildCounterFreeBaggageAllowance++; |
318 if (buildCounterFreeBaggageAllowance < 3) { | 353 if (buildCounterFreeBaggageAllowance < 3) { |
319 o.bagDescriptor = buildUnnamed7(); | 354 o.bagDescriptor = buildUnnamed1313(); |
320 o.kilos = 42; | 355 o.kilos = 42; |
321 o.kilosPerPiece = 42; | 356 o.kilosPerPiece = 42; |
322 o.kind = "foo"; | 357 o.kind = "foo"; |
323 o.pieces = 42; | 358 o.pieces = 42; |
324 o.pounds = 42; | 359 o.pounds = 42; |
325 } | 360 } |
326 buildCounterFreeBaggageAllowance--; | 361 buildCounterFreeBaggageAllowance--; |
327 return o; | 362 return o; |
328 } | 363 } |
329 | 364 |
330 checkFreeBaggageAllowance(api.FreeBaggageAllowance o) { | 365 checkFreeBaggageAllowance(api.FreeBaggageAllowance o) { |
331 buildCounterFreeBaggageAllowance++; | 366 buildCounterFreeBaggageAllowance++; |
332 if (buildCounterFreeBaggageAllowance < 3) { | 367 if (buildCounterFreeBaggageAllowance < 3) { |
333 checkUnnamed7(o.bagDescriptor); | 368 checkUnnamed1313(o.bagDescriptor); |
334 unittest.expect(o.kilos, unittest.equals(42)); | 369 unittest.expect(o.kilos, unittest.equals(42)); |
335 unittest.expect(o.kilosPerPiece, unittest.equals(42)); | 370 unittest.expect(o.kilosPerPiece, unittest.equals(42)); |
336 unittest.expect(o.kind, unittest.equals('foo')); | 371 unittest.expect(o.kind, unittest.equals('foo')); |
337 unittest.expect(o.pieces, unittest.equals(42)); | 372 unittest.expect(o.pieces, unittest.equals(42)); |
338 unittest.expect(o.pounds, unittest.equals(42)); | 373 unittest.expect(o.pounds, unittest.equals(42)); |
339 } | 374 } |
340 buildCounterFreeBaggageAllowance--; | 375 buildCounterFreeBaggageAllowance--; |
341 } | 376 } |
342 | 377 |
343 core.int buildCounterLegInfo = 0; | 378 core.int buildCounterLegInfo = 0; |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
413 unittest.expect(o.adultCount, unittest.equals(42)); | 448 unittest.expect(o.adultCount, unittest.equals(42)); |
414 unittest.expect(o.childCount, unittest.equals(42)); | 449 unittest.expect(o.childCount, unittest.equals(42)); |
415 unittest.expect(o.infantInLapCount, unittest.equals(42)); | 450 unittest.expect(o.infantInLapCount, unittest.equals(42)); |
416 unittest.expect(o.infantInSeatCount, unittest.equals(42)); | 451 unittest.expect(o.infantInSeatCount, unittest.equals(42)); |
417 unittest.expect(o.kind, unittest.equals('foo')); | 452 unittest.expect(o.kind, unittest.equals('foo')); |
418 unittest.expect(o.seniorCount, unittest.equals(42)); | 453 unittest.expect(o.seniorCount, unittest.equals(42)); |
419 } | 454 } |
420 buildCounterPassengerCounts--; | 455 buildCounterPassengerCounts--; |
421 } | 456 } |
422 | 457 |
423 buildUnnamed8() { | 458 buildUnnamed1314() { |
424 var o = new core.List<api.FareInfo>(); | 459 var o = new core.List<api.FareInfo>(); |
425 o.add(buildFareInfo()); | 460 o.add(buildFareInfo()); |
426 o.add(buildFareInfo()); | 461 o.add(buildFareInfo()); |
427 return o; | 462 return o; |
428 } | 463 } |
429 | 464 |
430 checkUnnamed8(core.List<api.FareInfo> o) { | 465 checkUnnamed1314(core.List<api.FareInfo> o) { |
431 unittest.expect(o, unittest.hasLength(2)); | 466 unittest.expect(o, unittest.hasLength(2)); |
432 checkFareInfo(o[0]); | 467 checkFareInfo(o[0]); |
433 checkFareInfo(o[1]); | 468 checkFareInfo(o[1]); |
434 } | 469 } |
435 | 470 |
436 buildUnnamed9() { | 471 buildUnnamed1315() { |
437 var o = new core.List<api.SegmentPricing>(); | 472 var o = new core.List<api.SegmentPricing>(); |
438 o.add(buildSegmentPricing()); | 473 o.add(buildSegmentPricing()); |
439 o.add(buildSegmentPricing()); | 474 o.add(buildSegmentPricing()); |
440 return o; | 475 return o; |
441 } | 476 } |
442 | 477 |
443 checkUnnamed9(core.List<api.SegmentPricing> o) { | 478 checkUnnamed1315(core.List<api.SegmentPricing> o) { |
444 unittest.expect(o, unittest.hasLength(2)); | 479 unittest.expect(o, unittest.hasLength(2)); |
445 checkSegmentPricing(o[0]); | 480 checkSegmentPricing(o[0]); |
446 checkSegmentPricing(o[1]); | 481 checkSegmentPricing(o[1]); |
447 } | 482 } |
448 | 483 |
449 buildUnnamed10() { | 484 buildUnnamed1316() { |
450 var o = new core.List<api.TaxInfo>(); | 485 var o = new core.List<api.TaxInfo>(); |
451 o.add(buildTaxInfo()); | 486 o.add(buildTaxInfo()); |
452 o.add(buildTaxInfo()); | 487 o.add(buildTaxInfo()); |
453 return o; | 488 return o; |
454 } | 489 } |
455 | 490 |
456 checkUnnamed10(core.List<api.TaxInfo> o) { | 491 checkUnnamed1316(core.List<api.TaxInfo> o) { |
457 unittest.expect(o, unittest.hasLength(2)); | 492 unittest.expect(o, unittest.hasLength(2)); |
458 checkTaxInfo(o[0]); | 493 checkTaxInfo(o[0]); |
459 checkTaxInfo(o[1]); | 494 checkTaxInfo(o[1]); |
460 } | 495 } |
461 | 496 |
462 core.int buildCounterPricingInfo = 0; | 497 core.int buildCounterPricingInfo = 0; |
463 buildPricingInfo() { | 498 buildPricingInfo() { |
464 var o = new api.PricingInfo(); | 499 var o = new api.PricingInfo(); |
465 buildCounterPricingInfo++; | 500 buildCounterPricingInfo++; |
466 if (buildCounterPricingInfo < 3) { | 501 if (buildCounterPricingInfo < 3) { |
467 o.baseFareTotal = "foo"; | 502 o.baseFareTotal = "foo"; |
468 o.fare = buildUnnamed8(); | 503 o.fare = buildUnnamed1314(); |
469 o.fareCalculation = "foo"; | 504 o.fareCalculation = "foo"; |
470 o.kind = "foo"; | 505 o.kind = "foo"; |
471 o.latestTicketingTime = "foo"; | 506 o.latestTicketingTime = "foo"; |
472 o.passengers = buildPassengerCounts(); | 507 o.passengers = buildPassengerCounts(); |
473 o.ptc = "foo"; | 508 o.ptc = "foo"; |
474 o.refundable = true; | 509 o.refundable = true; |
475 o.saleFareTotal = "foo"; | 510 o.saleFareTotal = "foo"; |
476 o.saleTaxTotal = "foo"; | 511 o.saleTaxTotal = "foo"; |
477 o.saleTotal = "foo"; | 512 o.saleTotal = "foo"; |
478 o.segmentPricing = buildUnnamed9(); | 513 o.segmentPricing = buildUnnamed1315(); |
479 o.tax = buildUnnamed10(); | 514 o.tax = buildUnnamed1316(); |
480 } | 515 } |
481 buildCounterPricingInfo--; | 516 buildCounterPricingInfo--; |
482 return o; | 517 return o; |
483 } | 518 } |
484 | 519 |
485 checkPricingInfo(api.PricingInfo o) { | 520 checkPricingInfo(api.PricingInfo o) { |
486 buildCounterPricingInfo++; | 521 buildCounterPricingInfo++; |
487 if (buildCounterPricingInfo < 3) { | 522 if (buildCounterPricingInfo < 3) { |
488 unittest.expect(o.baseFareTotal, unittest.equals('foo')); | 523 unittest.expect(o.baseFareTotal, unittest.equals('foo')); |
489 checkUnnamed8(o.fare); | 524 checkUnnamed1314(o.fare); |
490 unittest.expect(o.fareCalculation, unittest.equals('foo')); | 525 unittest.expect(o.fareCalculation, unittest.equals('foo')); |
491 unittest.expect(o.kind, unittest.equals('foo')); | 526 unittest.expect(o.kind, unittest.equals('foo')); |
492 unittest.expect(o.latestTicketingTime, unittest.equals('foo')); | 527 unittest.expect(o.latestTicketingTime, unittest.equals('foo')); |
493 checkPassengerCounts(o.passengers); | 528 checkPassengerCounts(o.passengers); |
494 unittest.expect(o.ptc, unittest.equals('foo')); | 529 unittest.expect(o.ptc, unittest.equals('foo')); |
495 unittest.expect(o.refundable, unittest.isTrue); | 530 unittest.expect(o.refundable, unittest.isTrue); |
496 unittest.expect(o.saleFareTotal, unittest.equals('foo')); | 531 unittest.expect(o.saleFareTotal, unittest.equals('foo')); |
497 unittest.expect(o.saleTaxTotal, unittest.equals('foo')); | 532 unittest.expect(o.saleTaxTotal, unittest.equals('foo')); |
498 unittest.expect(o.saleTotal, unittest.equals('foo')); | 533 unittest.expect(o.saleTotal, unittest.equals('foo')); |
499 checkUnnamed9(o.segmentPricing); | 534 checkUnnamed1315(o.segmentPricing); |
500 checkUnnamed10(o.tax); | 535 checkUnnamed1316(o.tax); |
501 } | 536 } |
502 buildCounterPricingInfo--; | 537 buildCounterPricingInfo--; |
503 } | 538 } |
504 | 539 |
505 buildUnnamed11() { | 540 buildUnnamed1317() { |
506 var o = new core.List<api.LegInfo>(); | 541 var o = new core.List<api.LegInfo>(); |
507 o.add(buildLegInfo()); | 542 o.add(buildLegInfo()); |
508 o.add(buildLegInfo()); | 543 o.add(buildLegInfo()); |
509 return o; | 544 return o; |
510 } | 545 } |
511 | 546 |
512 checkUnnamed11(core.List<api.LegInfo> o) { | 547 checkUnnamed1317(core.List<api.LegInfo> o) { |
513 unittest.expect(o, unittest.hasLength(2)); | 548 unittest.expect(o, unittest.hasLength(2)); |
514 checkLegInfo(o[0]); | 549 checkLegInfo(o[0]); |
515 checkLegInfo(o[1]); | 550 checkLegInfo(o[1]); |
516 } | 551 } |
517 | 552 |
518 core.int buildCounterSegmentInfo = 0; | 553 core.int buildCounterSegmentInfo = 0; |
519 buildSegmentInfo() { | 554 buildSegmentInfo() { |
520 var o = new api.SegmentInfo(); | 555 var o = new api.SegmentInfo(); |
521 buildCounterSegmentInfo++; | 556 buildCounterSegmentInfo++; |
522 if (buildCounterSegmentInfo < 3) { | 557 if (buildCounterSegmentInfo < 3) { |
523 o.bookingCode = "foo"; | 558 o.bookingCode = "foo"; |
524 o.bookingCodeCount = 42; | 559 o.bookingCodeCount = 42; |
525 o.cabin = "foo"; | 560 o.cabin = "foo"; |
526 o.connectionDuration = 42; | 561 o.connectionDuration = 42; |
527 o.duration = 42; | 562 o.duration = 42; |
528 o.flight = buildFlightInfo(); | 563 o.flight = buildFlightInfo(); |
529 o.id = "foo"; | 564 o.id = "foo"; |
530 o.kind = "foo"; | 565 o.kind = "foo"; |
531 o.leg = buildUnnamed11(); | 566 o.leg = buildUnnamed1317(); |
532 o.marriedSegmentGroup = "foo"; | 567 o.marriedSegmentGroup = "foo"; |
533 o.subjectToGovernmentApproval = true; | 568 o.subjectToGovernmentApproval = true; |
534 } | 569 } |
535 buildCounterSegmentInfo--; | 570 buildCounterSegmentInfo--; |
536 return o; | 571 return o; |
537 } | 572 } |
538 | 573 |
539 checkSegmentInfo(api.SegmentInfo o) { | 574 checkSegmentInfo(api.SegmentInfo o) { |
540 buildCounterSegmentInfo++; | 575 buildCounterSegmentInfo++; |
541 if (buildCounterSegmentInfo < 3) { | 576 if (buildCounterSegmentInfo < 3) { |
542 unittest.expect(o.bookingCode, unittest.equals('foo')); | 577 unittest.expect(o.bookingCode, unittest.equals('foo')); |
543 unittest.expect(o.bookingCodeCount, unittest.equals(42)); | 578 unittest.expect(o.bookingCodeCount, unittest.equals(42)); |
544 unittest.expect(o.cabin, unittest.equals('foo')); | 579 unittest.expect(o.cabin, unittest.equals('foo')); |
545 unittest.expect(o.connectionDuration, unittest.equals(42)); | 580 unittest.expect(o.connectionDuration, unittest.equals(42)); |
546 unittest.expect(o.duration, unittest.equals(42)); | 581 unittest.expect(o.duration, unittest.equals(42)); |
547 checkFlightInfo(o.flight); | 582 checkFlightInfo(o.flight); |
548 unittest.expect(o.id, unittest.equals('foo')); | 583 unittest.expect(o.id, unittest.equals('foo')); |
549 unittest.expect(o.kind, unittest.equals('foo')); | 584 unittest.expect(o.kind, unittest.equals('foo')); |
550 checkUnnamed11(o.leg); | 585 checkUnnamed1317(o.leg); |
551 unittest.expect(o.marriedSegmentGroup, unittest.equals('foo')); | 586 unittest.expect(o.marriedSegmentGroup, unittest.equals('foo')); |
552 unittest.expect(o.subjectToGovernmentApproval, unittest.isTrue); | 587 unittest.expect(o.subjectToGovernmentApproval, unittest.isTrue); |
553 } | 588 } |
554 buildCounterSegmentInfo--; | 589 buildCounterSegmentInfo--; |
555 } | 590 } |
556 | 591 |
557 buildUnnamed12() { | 592 buildUnnamed1318() { |
558 var o = new core.List<api.FreeBaggageAllowance>(); | 593 var o = new core.List<api.FreeBaggageAllowance>(); |
559 o.add(buildFreeBaggageAllowance()); | 594 o.add(buildFreeBaggageAllowance()); |
560 o.add(buildFreeBaggageAllowance()); | 595 o.add(buildFreeBaggageAllowance()); |
561 return o; | 596 return o; |
562 } | 597 } |
563 | 598 |
564 checkUnnamed12(core.List<api.FreeBaggageAllowance> o) { | 599 checkUnnamed1318(core.List<api.FreeBaggageAllowance> o) { |
565 unittest.expect(o, unittest.hasLength(2)); | 600 unittest.expect(o, unittest.hasLength(2)); |
566 checkFreeBaggageAllowance(o[0]); | 601 checkFreeBaggageAllowance(o[0]); |
567 checkFreeBaggageAllowance(o[1]); | 602 checkFreeBaggageAllowance(o[1]); |
568 } | 603 } |
569 | 604 |
570 core.int buildCounterSegmentPricing = 0; | 605 core.int buildCounterSegmentPricing = 0; |
571 buildSegmentPricing() { | 606 buildSegmentPricing() { |
572 var o = new api.SegmentPricing(); | 607 var o = new api.SegmentPricing(); |
573 buildCounterSegmentPricing++; | 608 buildCounterSegmentPricing++; |
574 if (buildCounterSegmentPricing < 3) { | 609 if (buildCounterSegmentPricing < 3) { |
575 o.fareId = "foo"; | 610 o.fareId = "foo"; |
576 o.freeBaggageOption = buildUnnamed12(); | 611 o.freeBaggageOption = buildUnnamed1318(); |
577 o.kind = "foo"; | 612 o.kind = "foo"; |
578 o.segmentId = "foo"; | 613 o.segmentId = "foo"; |
579 } | 614 } |
580 buildCounterSegmentPricing--; | 615 buildCounterSegmentPricing--; |
581 return o; | 616 return o; |
582 } | 617 } |
583 | 618 |
584 checkSegmentPricing(api.SegmentPricing o) { | 619 checkSegmentPricing(api.SegmentPricing o) { |
585 buildCounterSegmentPricing++; | 620 buildCounterSegmentPricing++; |
586 if (buildCounterSegmentPricing < 3) { | 621 if (buildCounterSegmentPricing < 3) { |
587 unittest.expect(o.fareId, unittest.equals('foo')); | 622 unittest.expect(o.fareId, unittest.equals('foo')); |
588 checkUnnamed12(o.freeBaggageOption); | 623 checkUnnamed1318(o.freeBaggageOption); |
589 unittest.expect(o.kind, unittest.equals('foo')); | 624 unittest.expect(o.kind, unittest.equals('foo')); |
590 unittest.expect(o.segmentId, unittest.equals('foo')); | 625 unittest.expect(o.segmentId, unittest.equals('foo')); |
591 } | 626 } |
592 buildCounterSegmentPricing--; | 627 buildCounterSegmentPricing--; |
593 } | 628 } |
594 | 629 |
595 buildUnnamed13() { | 630 buildUnnamed1319() { |
596 var o = new core.List<api.SegmentInfo>(); | 631 var o = new core.List<api.SegmentInfo>(); |
597 o.add(buildSegmentInfo()); | 632 o.add(buildSegmentInfo()); |
598 o.add(buildSegmentInfo()); | 633 o.add(buildSegmentInfo()); |
599 return o; | 634 return o; |
600 } | 635 } |
601 | 636 |
602 checkUnnamed13(core.List<api.SegmentInfo> o) { | 637 checkUnnamed1319(core.List<api.SegmentInfo> o) { |
603 unittest.expect(o, unittest.hasLength(2)); | 638 unittest.expect(o, unittest.hasLength(2)); |
604 checkSegmentInfo(o[0]); | 639 checkSegmentInfo(o[0]); |
605 checkSegmentInfo(o[1]); | 640 checkSegmentInfo(o[1]); |
606 } | 641 } |
607 | 642 |
608 core.int buildCounterSliceInfo = 0; | 643 core.int buildCounterSliceInfo = 0; |
609 buildSliceInfo() { | 644 buildSliceInfo() { |
610 var o = new api.SliceInfo(); | 645 var o = new api.SliceInfo(); |
611 buildCounterSliceInfo++; | 646 buildCounterSliceInfo++; |
612 if (buildCounterSliceInfo < 3) { | 647 if (buildCounterSliceInfo < 3) { |
613 o.duration = 42; | 648 o.duration = 42; |
614 o.kind = "foo"; | 649 o.kind = "foo"; |
615 o.segment = buildUnnamed13(); | 650 o.segment = buildUnnamed1319(); |
616 } | 651 } |
617 buildCounterSliceInfo--; | 652 buildCounterSliceInfo--; |
618 return o; | 653 return o; |
619 } | 654 } |
620 | 655 |
621 checkSliceInfo(api.SliceInfo o) { | 656 checkSliceInfo(api.SliceInfo o) { |
622 buildCounterSliceInfo++; | 657 buildCounterSliceInfo++; |
623 if (buildCounterSliceInfo < 3) { | 658 if (buildCounterSliceInfo < 3) { |
624 unittest.expect(o.duration, unittest.equals(42)); | 659 unittest.expect(o.duration, unittest.equals(42)); |
625 unittest.expect(o.kind, unittest.equals('foo')); | 660 unittest.expect(o.kind, unittest.equals('foo')); |
626 checkUnnamed13(o.segment); | 661 checkUnnamed1319(o.segment); |
627 } | 662 } |
628 buildCounterSliceInfo--; | 663 buildCounterSliceInfo--; |
629 } | 664 } |
630 | 665 |
631 buildUnnamed14() { | 666 buildUnnamed1320() { |
632 var o = new core.List<core.String>(); | 667 var o = new core.List<core.String>(); |
633 o.add("foo"); | 668 o.add("foo"); |
634 o.add("foo"); | 669 o.add("foo"); |
635 return o; | 670 return o; |
636 } | 671 } |
637 | 672 |
638 checkUnnamed14(core.List<core.String> o) { | 673 checkUnnamed1320(core.List<core.String> o) { |
639 unittest.expect(o, unittest.hasLength(2)); | 674 unittest.expect(o, unittest.hasLength(2)); |
640 unittest.expect(o[0], unittest.equals('foo')); | 675 unittest.expect(o[0], unittest.equals('foo')); |
641 unittest.expect(o[1], unittest.equals('foo')); | 676 unittest.expect(o[1], unittest.equals('foo')); |
642 } | 677 } |
643 | 678 |
644 buildUnnamed15() { | 679 buildUnnamed1321() { |
645 var o = new core.List<core.String>(); | 680 var o = new core.List<core.String>(); |
646 o.add("foo"); | 681 o.add("foo"); |
647 o.add("foo"); | 682 o.add("foo"); |
648 return o; | 683 return o; |
649 } | 684 } |
650 | 685 |
651 checkUnnamed15(core.List<core.String> o) { | 686 checkUnnamed1321(core.List<core.String> o) { |
652 unittest.expect(o, unittest.hasLength(2)); | 687 unittest.expect(o, unittest.hasLength(2)); |
653 unittest.expect(o[0], unittest.equals('foo')); | 688 unittest.expect(o[0], unittest.equals('foo')); |
654 unittest.expect(o[1], unittest.equals('foo')); | 689 unittest.expect(o[1], unittest.equals('foo')); |
655 } | 690 } |
656 | 691 |
657 core.int buildCounterSliceInput = 0; | 692 core.int buildCounterSliceInput = 0; |
658 buildSliceInput() { | 693 buildSliceInput() { |
659 var o = new api.SliceInput(); | 694 var o = new api.SliceInput(); |
660 buildCounterSliceInput++; | 695 buildCounterSliceInput++; |
661 if (buildCounterSliceInput < 3) { | 696 if (buildCounterSliceInput < 3) { |
662 o.alliance = "foo"; | 697 o.alliance = "foo"; |
663 o.date = "foo"; | 698 o.date = "foo"; |
664 o.destination = "foo"; | 699 o.destination = "foo"; |
665 o.kind = "foo"; | 700 o.kind = "foo"; |
666 o.maxConnectionDuration = 42; | 701 o.maxConnectionDuration = 42; |
667 o.maxStops = 42; | 702 o.maxStops = 42; |
668 o.origin = "foo"; | 703 o.origin = "foo"; |
669 o.permittedCarrier = buildUnnamed14(); | 704 o.permittedCarrier = buildUnnamed1320(); |
670 o.permittedDepartureTime = buildTimeOfDayRange(); | 705 o.permittedDepartureTime = buildTimeOfDayRange(); |
671 o.preferredCabin = "foo"; | 706 o.preferredCabin = "foo"; |
672 o.prohibitedCarrier = buildUnnamed15(); | 707 o.prohibitedCarrier = buildUnnamed1321(); |
673 } | 708 } |
674 buildCounterSliceInput--; | 709 buildCounterSliceInput--; |
675 return o; | 710 return o; |
676 } | 711 } |
677 | 712 |
678 checkSliceInput(api.SliceInput o) { | 713 checkSliceInput(api.SliceInput o) { |
679 buildCounterSliceInput++; | 714 buildCounterSliceInput++; |
680 if (buildCounterSliceInput < 3) { | 715 if (buildCounterSliceInput < 3) { |
681 unittest.expect(o.alliance, unittest.equals('foo')); | 716 unittest.expect(o.alliance, unittest.equals('foo')); |
682 unittest.expect(o.date, unittest.equals('foo')); | 717 unittest.expect(o.date, unittest.equals('foo')); |
683 unittest.expect(o.destination, unittest.equals('foo')); | 718 unittest.expect(o.destination, unittest.equals('foo')); |
684 unittest.expect(o.kind, unittest.equals('foo')); | 719 unittest.expect(o.kind, unittest.equals('foo')); |
685 unittest.expect(o.maxConnectionDuration, unittest.equals(42)); | 720 unittest.expect(o.maxConnectionDuration, unittest.equals(42)); |
686 unittest.expect(o.maxStops, unittest.equals(42)); | 721 unittest.expect(o.maxStops, unittest.equals(42)); |
687 unittest.expect(o.origin, unittest.equals('foo')); | 722 unittest.expect(o.origin, unittest.equals('foo')); |
688 checkUnnamed14(o.permittedCarrier); | 723 checkUnnamed1320(o.permittedCarrier); |
689 checkTimeOfDayRange(o.permittedDepartureTime); | 724 checkTimeOfDayRange(o.permittedDepartureTime); |
690 unittest.expect(o.preferredCabin, unittest.equals('foo')); | 725 unittest.expect(o.preferredCabin, unittest.equals('foo')); |
691 checkUnnamed15(o.prohibitedCarrier); | 726 checkUnnamed1321(o.prohibitedCarrier); |
692 } | 727 } |
693 buildCounterSliceInput--; | 728 buildCounterSliceInput--; |
694 } | 729 } |
695 | 730 |
696 core.int buildCounterTaxData = 0; | 731 core.int buildCounterTaxData = 0; |
697 buildTaxData() { | 732 buildTaxData() { |
698 var o = new api.TaxData(); | 733 var o = new api.TaxData(); |
699 buildCounterTaxData++; | 734 buildCounterTaxData++; |
700 if (buildCounterTaxData < 3) { | 735 if (buildCounterTaxData < 3) { |
701 o.id = "foo"; | 736 o.id = "foo"; |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
761 checkTimeOfDayRange(api.TimeOfDayRange o) { | 796 checkTimeOfDayRange(api.TimeOfDayRange o) { |
762 buildCounterTimeOfDayRange++; | 797 buildCounterTimeOfDayRange++; |
763 if (buildCounterTimeOfDayRange < 3) { | 798 if (buildCounterTimeOfDayRange < 3) { |
764 unittest.expect(o.earliestTime, unittest.equals('foo')); | 799 unittest.expect(o.earliestTime, unittest.equals('foo')); |
765 unittest.expect(o.kind, unittest.equals('foo')); | 800 unittest.expect(o.kind, unittest.equals('foo')); |
766 unittest.expect(o.latestTime, unittest.equals('foo')); | 801 unittest.expect(o.latestTime, unittest.equals('foo')); |
767 } | 802 } |
768 buildCounterTimeOfDayRange--; | 803 buildCounterTimeOfDayRange--; |
769 } | 804 } |
770 | 805 |
771 buildUnnamed16() { | 806 buildUnnamed1322() { |
772 var o = new core.List<api.PricingInfo>(); | 807 var o = new core.List<api.PricingInfo>(); |
773 o.add(buildPricingInfo()); | 808 o.add(buildPricingInfo()); |
774 o.add(buildPricingInfo()); | 809 o.add(buildPricingInfo()); |
775 return o; | 810 return o; |
776 } | 811 } |
777 | 812 |
778 checkUnnamed16(core.List<api.PricingInfo> o) { | 813 checkUnnamed1322(core.List<api.PricingInfo> o) { |
779 unittest.expect(o, unittest.hasLength(2)); | 814 unittest.expect(o, unittest.hasLength(2)); |
780 checkPricingInfo(o[0]); | 815 checkPricingInfo(o[0]); |
781 checkPricingInfo(o[1]); | 816 checkPricingInfo(o[1]); |
782 } | 817 } |
783 | 818 |
784 buildUnnamed17() { | 819 buildUnnamed1323() { |
785 var o = new core.List<api.SliceInfo>(); | 820 var o = new core.List<api.SliceInfo>(); |
786 o.add(buildSliceInfo()); | 821 o.add(buildSliceInfo()); |
787 o.add(buildSliceInfo()); | 822 o.add(buildSliceInfo()); |
788 return o; | 823 return o; |
789 } | 824 } |
790 | 825 |
791 checkUnnamed17(core.List<api.SliceInfo> o) { | 826 checkUnnamed1323(core.List<api.SliceInfo> o) { |
792 unittest.expect(o, unittest.hasLength(2)); | 827 unittest.expect(o, unittest.hasLength(2)); |
793 checkSliceInfo(o[0]); | 828 checkSliceInfo(o[0]); |
794 checkSliceInfo(o[1]); | 829 checkSliceInfo(o[1]); |
795 } | 830 } |
796 | 831 |
797 core.int buildCounterTripOption = 0; | 832 core.int buildCounterTripOption = 0; |
798 buildTripOption() { | 833 buildTripOption() { |
799 var o = new api.TripOption(); | 834 var o = new api.TripOption(); |
800 buildCounterTripOption++; | 835 buildCounterTripOption++; |
801 if (buildCounterTripOption < 3) { | 836 if (buildCounterTripOption < 3) { |
802 o.id = "foo"; | 837 o.id = "foo"; |
803 o.kind = "foo"; | 838 o.kind = "foo"; |
804 o.pricing = buildUnnamed16(); | 839 o.pricing = buildUnnamed1322(); |
805 o.saleTotal = "foo"; | 840 o.saleTotal = "foo"; |
806 o.slice = buildUnnamed17(); | 841 o.slice = buildUnnamed1323(); |
807 } | 842 } |
808 buildCounterTripOption--; | 843 buildCounterTripOption--; |
809 return o; | 844 return o; |
810 } | 845 } |
811 | 846 |
812 checkTripOption(api.TripOption o) { | 847 checkTripOption(api.TripOption o) { |
813 buildCounterTripOption++; | 848 buildCounterTripOption++; |
814 if (buildCounterTripOption < 3) { | 849 if (buildCounterTripOption < 3) { |
815 unittest.expect(o.id, unittest.equals('foo')); | 850 unittest.expect(o.id, unittest.equals('foo')); |
816 unittest.expect(o.kind, unittest.equals('foo')); | 851 unittest.expect(o.kind, unittest.equals('foo')); |
817 checkUnnamed16(o.pricing); | 852 checkUnnamed1322(o.pricing); |
818 unittest.expect(o.saleTotal, unittest.equals('foo')); | 853 unittest.expect(o.saleTotal, unittest.equals('foo')); |
819 checkUnnamed17(o.slice); | 854 checkUnnamed1323(o.slice); |
820 } | 855 } |
821 buildCounterTripOption--; | 856 buildCounterTripOption--; |
822 } | 857 } |
823 | 858 |
824 buildUnnamed18() { | 859 buildUnnamed1324() { |
825 var o = new core.List<api.SliceInput>(); | 860 var o = new core.List<api.SliceInput>(); |
826 o.add(buildSliceInput()); | 861 o.add(buildSliceInput()); |
827 o.add(buildSliceInput()); | 862 o.add(buildSliceInput()); |
828 return o; | 863 return o; |
829 } | 864 } |
830 | 865 |
831 checkUnnamed18(core.List<api.SliceInput> o) { | 866 checkUnnamed1324(core.List<api.SliceInput> o) { |
832 unittest.expect(o, unittest.hasLength(2)); | 867 unittest.expect(o, unittest.hasLength(2)); |
833 checkSliceInput(o[0]); | 868 checkSliceInput(o[0]); |
834 checkSliceInput(o[1]); | 869 checkSliceInput(o[1]); |
835 } | 870 } |
836 | 871 |
837 core.int buildCounterTripOptionsRequest = 0; | 872 core.int buildCounterTripOptionsRequest = 0; |
838 buildTripOptionsRequest() { | 873 buildTripOptionsRequest() { |
839 var o = new api.TripOptionsRequest(); | 874 var o = new api.TripOptionsRequest(); |
840 buildCounterTripOptionsRequest++; | 875 buildCounterTripOptionsRequest++; |
841 if (buildCounterTripOptionsRequest < 3) { | 876 if (buildCounterTripOptionsRequest < 3) { |
842 o.maxPrice = "foo"; | 877 o.maxPrice = "foo"; |
843 o.passengers = buildPassengerCounts(); | 878 o.passengers = buildPassengerCounts(); |
844 o.refundable = true; | 879 o.refundable = true; |
845 o.saleCountry = "foo"; | 880 o.saleCountry = "foo"; |
846 o.slice = buildUnnamed18(); | 881 o.slice = buildUnnamed1324(); |
847 o.solutions = 42; | 882 o.solutions = 42; |
848 } | 883 } |
849 buildCounterTripOptionsRequest--; | 884 buildCounterTripOptionsRequest--; |
850 return o; | 885 return o; |
851 } | 886 } |
852 | 887 |
853 checkTripOptionsRequest(api.TripOptionsRequest o) { | 888 checkTripOptionsRequest(api.TripOptionsRequest o) { |
854 buildCounterTripOptionsRequest++; | 889 buildCounterTripOptionsRequest++; |
855 if (buildCounterTripOptionsRequest < 3) { | 890 if (buildCounterTripOptionsRequest < 3) { |
856 unittest.expect(o.maxPrice, unittest.equals('foo')); | 891 unittest.expect(o.maxPrice, unittest.equals('foo')); |
857 checkPassengerCounts(o.passengers); | 892 checkPassengerCounts(o.passengers); |
858 unittest.expect(o.refundable, unittest.isTrue); | 893 unittest.expect(o.refundable, unittest.isTrue); |
859 unittest.expect(o.saleCountry, unittest.equals('foo')); | 894 unittest.expect(o.saleCountry, unittest.equals('foo')); |
860 checkUnnamed18(o.slice); | 895 checkUnnamed1324(o.slice); |
861 unittest.expect(o.solutions, unittest.equals(42)); | 896 unittest.expect(o.solutions, unittest.equals(42)); |
862 } | 897 } |
863 buildCounterTripOptionsRequest--; | 898 buildCounterTripOptionsRequest--; |
864 } | 899 } |
865 | 900 |
866 buildUnnamed19() { | 901 buildUnnamed1325() { |
867 var o = new core.List<api.TripOption>(); | 902 var o = new core.List<api.TripOption>(); |
868 o.add(buildTripOption()); | 903 o.add(buildTripOption()); |
869 o.add(buildTripOption()); | 904 o.add(buildTripOption()); |
870 return o; | 905 return o; |
871 } | 906 } |
872 | 907 |
873 checkUnnamed19(core.List<api.TripOption> o) { | 908 checkUnnamed1325(core.List<api.TripOption> o) { |
874 unittest.expect(o, unittest.hasLength(2)); | 909 unittest.expect(o, unittest.hasLength(2)); |
875 checkTripOption(o[0]); | 910 checkTripOption(o[0]); |
876 checkTripOption(o[1]); | 911 checkTripOption(o[1]); |
877 } | 912 } |
878 | 913 |
879 core.int buildCounterTripOptionsResponse = 0; | 914 core.int buildCounterTripOptionsResponse = 0; |
880 buildTripOptionsResponse() { | 915 buildTripOptionsResponse() { |
881 var o = new api.TripOptionsResponse(); | 916 var o = new api.TripOptionsResponse(); |
882 buildCounterTripOptionsResponse++; | 917 buildCounterTripOptionsResponse++; |
883 if (buildCounterTripOptionsResponse < 3) { | 918 if (buildCounterTripOptionsResponse < 3) { |
884 o.data = buildData(); | 919 o.data = buildData(); |
885 o.kind = "foo"; | 920 o.kind = "foo"; |
886 o.requestId = "foo"; | 921 o.requestId = "foo"; |
887 o.tripOption = buildUnnamed19(); | 922 o.tripOption = buildUnnamed1325(); |
888 } | 923 } |
889 buildCounterTripOptionsResponse--; | 924 buildCounterTripOptionsResponse--; |
890 return o; | 925 return o; |
891 } | 926 } |
892 | 927 |
893 checkTripOptionsResponse(api.TripOptionsResponse o) { | 928 checkTripOptionsResponse(api.TripOptionsResponse o) { |
894 buildCounterTripOptionsResponse++; | 929 buildCounterTripOptionsResponse++; |
895 if (buildCounterTripOptionsResponse < 3) { | 930 if (buildCounterTripOptionsResponse < 3) { |
896 checkData(o.data); | 931 checkData(o.data); |
897 unittest.expect(o.kind, unittest.equals('foo')); | 932 unittest.expect(o.kind, unittest.equals('foo')); |
898 unittest.expect(o.requestId, unittest.equals('foo')); | 933 unittest.expect(o.requestId, unittest.equals('foo')); |
899 checkUnnamed19(o.tripOption); | 934 checkUnnamed1325(o.tripOption); |
900 } | 935 } |
901 buildCounterTripOptionsResponse--; | 936 buildCounterTripOptionsResponse--; |
902 } | 937 } |
903 | 938 |
904 core.int buildCounterTripsSearchRequest = 0; | 939 core.int buildCounterTripsSearchRequest = 0; |
905 buildTripsSearchRequest() { | 940 buildTripsSearchRequest() { |
906 var o = new api.TripsSearchRequest(); | 941 var o = new api.TripsSearchRequest(); |
907 buildCounterTripsSearchRequest++; | 942 buildCounterTripsSearchRequest++; |
908 if (buildCounterTripsSearchRequest < 3) { | 943 if (buildCounterTripsSearchRequest < 3) { |
909 o.request = buildTripOptionsRequest(); | 944 o.request = buildTripOptionsRequest(); |
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1155 var o = buildTripsSearchResponse(); | 1190 var o = buildTripsSearchResponse(); |
1156 var od = new api.TripsSearchResponse.fromJson(o.toJson()); | 1191 var od = new api.TripsSearchResponse.fromJson(o.toJson()); |
1157 checkTripsSearchResponse(od); | 1192 checkTripsSearchResponse(od); |
1158 }); | 1193 }); |
1159 }); | 1194 }); |
1160 | 1195 |
1161 | 1196 |
1162 unittest.group("resource-TripsResourceApi", () { | 1197 unittest.group("resource-TripsResourceApi", () { |
1163 unittest.test("method--search", () { | 1198 unittest.test("method--search", () { |
1164 | 1199 |
1165 var mock = new common_test.HttpServerMock(); | 1200 var mock = new HttpServerMock(); |
1166 api.TripsResourceApi res = new api.QpxExpressApi(mock).trips; | 1201 api.TripsResourceApi res = new api.QpxExpressApi(mock).trips; |
1167 var arg_request = buildTripsSearchRequest(); | 1202 var arg_request = buildTripsSearchRequest(); |
1168 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1203 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1169 var obj = new api.TripsSearchRequest.fromJson(json); | 1204 var obj = new api.TripsSearchRequest.fromJson(json); |
1170 checkTripsSearchRequest(obj); | 1205 checkTripsSearchRequest(obj); |
1171 | 1206 |
1172 var path = (req.url).path; | 1207 var path = (req.url).path; |
1173 var pathOffset = 0; | 1208 var pathOffset = 0; |
1174 var index; | 1209 var index; |
1175 var subPart; | 1210 var subPart; |
(...skipping 19 matching lines...) Expand all Loading... |
1195 var keyvalue = part.split("="); | 1230 var keyvalue = part.split("="); |
1196 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1231 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
1197 } | 1232 } |
1198 } | 1233 } |
1199 | 1234 |
1200 | 1235 |
1201 var h = { | 1236 var h = { |
1202 "content-type" : "application/json; charset=utf-8", | 1237 "content-type" : "application/json; charset=utf-8", |
1203 }; | 1238 }; |
1204 var resp = convert.JSON.encode(buildTripsSearchResponse()); | 1239 var resp = convert.JSON.encode(buildTripsSearchResponse()); |
1205 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 1240 return new async.Future.value(stringResponse(200, h, resp)); |
1206 }), true); | 1241 }), true); |
1207 res.search(arg_request).then(unittest.expectAsync(((api.TripsSearchRespons
e response) { | 1242 res.search(arg_request).then(unittest.expectAsync(((api.TripsSearchRespons
e response) { |
1208 checkTripsSearchResponse(response); | 1243 checkTripsSearchResponse(response); |
1209 }))); | 1244 }))); |
1210 }); | 1245 }); |
1211 | 1246 |
1212 }); | 1247 }); |
1213 | 1248 |
1214 | 1249 |
1215 } | 1250 } |
1216 | 1251 |
OLD | NEW |