Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(222)

Side by Side Diff: generated/googleapis/test/qpxexpress/v1_test.dart

Issue 3006323002: Api-Roll 54: 2017-09-11 (Closed)
Patch Set: use 2.0.0-dev.infinity sdk constraint in pubspecs Created 3 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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;
5 import "dart:async" as async; 4 import "dart:async" as async;
6 import "dart:convert" as convert; 5 import "dart:convert" as convert;
7 6
8 import 'package:http/http.dart' as http; 7 import 'package:http/http.dart' as http;
9 import 'package:http/testing.dart' as http_testing;
10 import 'package:test/test.dart' as unittest; 8 import 'package:test/test.dart' as unittest;
11 9
12 import 'package:googleapis/qpxexpress/v1.dart' as api; 10 import 'package:googleapis/qpxexpress/v1.dart' as api;
13 11
14 class HttpServerMock extends http.BaseClient { 12 class HttpServerMock extends http.BaseClient {
15 core.Function _callback; 13 core.Function _callback;
16 core.bool _expectJson; 14 core.bool _expectJson;
17 15
18 void register(core.Function callback, core.bool expectJson) { 16 void register(core.Function callback, core.bool expectJson) {
19 _callback = callback; 17 _callback = callback;
20 _expectJson = expectJson; 18 _expectJson = expectJson;
21 } 19 }
22 20
23 async.Future<http.StreamedResponse> send(http.BaseRequest request) { 21 async.Future<http.StreamedResponse> send(http.BaseRequest request) {
24 if (_expectJson) { 22 if (_expectJson) {
25 return request.finalize() 23 return request
24 .finalize()
26 .transform(convert.UTF8.decoder) 25 .transform(convert.UTF8.decoder)
27 .join('') 26 .join('')
28 .then((core.String jsonString) { 27 .then((core.String jsonString) {
29 if (jsonString.isEmpty) { 28 if (jsonString.isEmpty) {
30 return _callback(request, null); 29 return _callback(request, null);
31 } else { 30 } else {
32 return _callback(request, convert.JSON.decode(jsonString)); 31 return _callback(request, convert.JSON.decode(jsonString));
33 } 32 }
34 }); 33 });
35 } else { 34 } else {
36 var stream = request.finalize(); 35 var stream = request.finalize();
37 if (stream == null) { 36 if (stream == null) {
38 return _callback(request, []); 37 return _callback(request, []);
39 } else { 38 } else {
40 return stream.toBytes().then((data) { 39 return stream.toBytes().then((data) {
41 return _callback(request, data); 40 return _callback(request, data);
42 }); 41 });
43 } 42 }
44 } 43 }
45 } 44 }
46 } 45 }
47 46
48 http.StreamedResponse stringResponse( 47 http.StreamedResponse stringResponse(core.int status,
49 core.int status, core.Map<core.String, core.String> headers, core.String bod y) { 48 core.Map<core.String, core.String> headers, core.String body) {
50 var stream = new async.Stream.fromIterable([convert.UTF8.encode(body)]); 49 var stream = new async.Stream.fromIterable([convert.UTF8.encode(body)]);
51 return new http.StreamedResponse(stream, status, headers: headers); 50 return new http.StreamedResponse(stream, status, headers: headers);
52 } 51 }
53 52
54 core.int buildCounterAircraftData = 0; 53 core.int buildCounterAircraftData = 0;
55 buildAircraftData() { 54 buildAircraftData() {
56 var o = new api.AircraftData(); 55 var o = new api.AircraftData();
57 buildCounterAircraftData++; 56 buildCounterAircraftData++;
58 if (buildCounterAircraftData < 3) { 57 if (buildCounterAircraftData < 3) {
59 o.code = "foo"; 58 o.code = "foo";
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 buildCounterAirportData++; 91 buildCounterAirportData++;
93 if (buildCounterAirportData < 3) { 92 if (buildCounterAirportData < 3) {
94 unittest.expect(o.city, unittest.equals('foo')); 93 unittest.expect(o.city, unittest.equals('foo'));
95 unittest.expect(o.code, unittest.equals('foo')); 94 unittest.expect(o.code, unittest.equals('foo'));
96 unittest.expect(o.kind, unittest.equals('foo')); 95 unittest.expect(o.kind, unittest.equals('foo'));
97 unittest.expect(o.name, unittest.equals('foo')); 96 unittest.expect(o.name, unittest.equals('foo'));
98 } 97 }
99 buildCounterAirportData--; 98 buildCounterAirportData--;
100 } 99 }
101 100
102 buildUnnamed35() { 101 buildUnnamed28() {
103 var o = new core.List<core.String>(); 102 var o = new core.List<core.String>();
104 o.add("foo"); 103 o.add("foo");
105 o.add("foo"); 104 o.add("foo");
106 return o; 105 return o;
107 } 106 }
108 107
109 checkUnnamed35(core.List<core.String> o) { 108 checkUnnamed28(core.List<core.String> o) {
110 unittest.expect(o, unittest.hasLength(2)); 109 unittest.expect(o, unittest.hasLength(2));
111 unittest.expect(o[0], unittest.equals('foo')); 110 unittest.expect(o[0], unittest.equals('foo'));
112 unittest.expect(o[1], unittest.equals('foo')); 111 unittest.expect(o[1], unittest.equals('foo'));
113 } 112 }
114 113
115 core.int buildCounterBagDescriptor = 0; 114 core.int buildCounterBagDescriptor = 0;
116 buildBagDescriptor() { 115 buildBagDescriptor() {
117 var o = new api.BagDescriptor(); 116 var o = new api.BagDescriptor();
118 buildCounterBagDescriptor++; 117 buildCounterBagDescriptor++;
119 if (buildCounterBagDescriptor < 3) { 118 if (buildCounterBagDescriptor < 3) {
120 o.commercialName = "foo"; 119 o.commercialName = "foo";
121 o.count = 42; 120 o.count = 42;
122 o.description = buildUnnamed35(); 121 o.description = buildUnnamed28();
123 o.kind = "foo"; 122 o.kind = "foo";
124 o.subcode = "foo"; 123 o.subcode = "foo";
125 } 124 }
126 buildCounterBagDescriptor--; 125 buildCounterBagDescriptor--;
127 return o; 126 return o;
128 } 127 }
129 128
130 checkBagDescriptor(api.BagDescriptor o) { 129 checkBagDescriptor(api.BagDescriptor o) {
131 buildCounterBagDescriptor++; 130 buildCounterBagDescriptor++;
132 if (buildCounterBagDescriptor < 3) { 131 if (buildCounterBagDescriptor < 3) {
133 unittest.expect(o.commercialName, unittest.equals('foo')); 132 unittest.expect(o.commercialName, unittest.equals('foo'));
134 unittest.expect(o.count, unittest.equals(42)); 133 unittest.expect(o.count, unittest.equals(42));
135 checkUnnamed35(o.description); 134 checkUnnamed28(o.description);
136 unittest.expect(o.kind, unittest.equals('foo')); 135 unittest.expect(o.kind, unittest.equals('foo'));
137 unittest.expect(o.subcode, unittest.equals('foo')); 136 unittest.expect(o.subcode, unittest.equals('foo'));
138 } 137 }
139 buildCounterBagDescriptor--; 138 buildCounterBagDescriptor--;
140 } 139 }
141 140
142 core.int buildCounterCarrierData = 0; 141 core.int buildCounterCarrierData = 0;
143 buildCarrierData() { 142 buildCarrierData() {
144 var o = new api.CarrierData(); 143 var o = new api.CarrierData();
145 buildCounterCarrierData++; 144 buildCounterCarrierData++;
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 buildCounterCityData++; 179 buildCounterCityData++;
181 if (buildCounterCityData < 3) { 180 if (buildCounterCityData < 3) {
182 unittest.expect(o.code, unittest.equals('foo')); 181 unittest.expect(o.code, unittest.equals('foo'));
183 unittest.expect(o.country, unittest.equals('foo')); 182 unittest.expect(o.country, unittest.equals('foo'));
184 unittest.expect(o.kind, unittest.equals('foo')); 183 unittest.expect(o.kind, unittest.equals('foo'));
185 unittest.expect(o.name, unittest.equals('foo')); 184 unittest.expect(o.name, unittest.equals('foo'));
186 } 185 }
187 buildCounterCityData--; 186 buildCounterCityData--;
188 } 187 }
189 188
190 buildUnnamed36() { 189 buildUnnamed29() {
191 var o = new core.List<api.AircraftData>(); 190 var o = new core.List<api.AircraftData>();
192 o.add(buildAircraftData()); 191 o.add(buildAircraftData());
193 o.add(buildAircraftData()); 192 o.add(buildAircraftData());
194 return o; 193 return o;
195 } 194 }
196 195
197 checkUnnamed36(core.List<api.AircraftData> o) { 196 checkUnnamed29(core.List<api.AircraftData> o) {
198 unittest.expect(o, unittest.hasLength(2)); 197 unittest.expect(o, unittest.hasLength(2));
199 checkAircraftData(o[0]); 198 checkAircraftData(o[0]);
200 checkAircraftData(o[1]); 199 checkAircraftData(o[1]);
201 } 200 }
202 201
203 buildUnnamed37() { 202 buildUnnamed30() {
204 var o = new core.List<api.AirportData>(); 203 var o = new core.List<api.AirportData>();
205 o.add(buildAirportData()); 204 o.add(buildAirportData());
206 o.add(buildAirportData()); 205 o.add(buildAirportData());
207 return o; 206 return o;
208 } 207 }
209 208
210 checkUnnamed37(core.List<api.AirportData> o) { 209 checkUnnamed30(core.List<api.AirportData> o) {
211 unittest.expect(o, unittest.hasLength(2)); 210 unittest.expect(o, unittest.hasLength(2));
212 checkAirportData(o[0]); 211 checkAirportData(o[0]);
213 checkAirportData(o[1]); 212 checkAirportData(o[1]);
214 } 213 }
215 214
216 buildUnnamed38() { 215 buildUnnamed31() {
217 var o = new core.List<api.CarrierData>(); 216 var o = new core.List<api.CarrierData>();
218 o.add(buildCarrierData()); 217 o.add(buildCarrierData());
219 o.add(buildCarrierData()); 218 o.add(buildCarrierData());
220 return o; 219 return o;
221 } 220 }
222 221
223 checkUnnamed38(core.List<api.CarrierData> o) { 222 checkUnnamed31(core.List<api.CarrierData> o) {
224 unittest.expect(o, unittest.hasLength(2)); 223 unittest.expect(o, unittest.hasLength(2));
225 checkCarrierData(o[0]); 224 checkCarrierData(o[0]);
226 checkCarrierData(o[1]); 225 checkCarrierData(o[1]);
227 } 226 }
228 227
229 buildUnnamed39() { 228 buildUnnamed32() {
230 var o = new core.List<api.CityData>(); 229 var o = new core.List<api.CityData>();
231 o.add(buildCityData()); 230 o.add(buildCityData());
232 o.add(buildCityData()); 231 o.add(buildCityData());
233 return o; 232 return o;
234 } 233 }
235 234
236 checkUnnamed39(core.List<api.CityData> o) { 235 checkUnnamed32(core.List<api.CityData> o) {
237 unittest.expect(o, unittest.hasLength(2)); 236 unittest.expect(o, unittest.hasLength(2));
238 checkCityData(o[0]); 237 checkCityData(o[0]);
239 checkCityData(o[1]); 238 checkCityData(o[1]);
240 } 239 }
241 240
242 buildUnnamed40() { 241 buildUnnamed33() {
243 var o = new core.List<api.TaxData>(); 242 var o = new core.List<api.TaxData>();
244 o.add(buildTaxData()); 243 o.add(buildTaxData());
245 o.add(buildTaxData()); 244 o.add(buildTaxData());
246 return o; 245 return o;
247 } 246 }
248 247
249 checkUnnamed40(core.List<api.TaxData> o) { 248 checkUnnamed33(core.List<api.TaxData> o) {
250 unittest.expect(o, unittest.hasLength(2)); 249 unittest.expect(o, unittest.hasLength(2));
251 checkTaxData(o[0]); 250 checkTaxData(o[0]);
252 checkTaxData(o[1]); 251 checkTaxData(o[1]);
253 } 252 }
254 253
255 core.int buildCounterData = 0; 254 core.int buildCounterData = 0;
256 buildData() { 255 buildData() {
257 var o = new api.Data(); 256 var o = new api.Data();
258 buildCounterData++; 257 buildCounterData++;
259 if (buildCounterData < 3) { 258 if (buildCounterData < 3) {
260 o.aircraft = buildUnnamed36(); 259 o.aircraft = buildUnnamed29();
261 o.airport = buildUnnamed37(); 260 o.airport = buildUnnamed30();
262 o.carrier = buildUnnamed38(); 261 o.carrier = buildUnnamed31();
263 o.city = buildUnnamed39(); 262 o.city = buildUnnamed32();
264 o.kind = "foo"; 263 o.kind = "foo";
265 o.tax = buildUnnamed40(); 264 o.tax = buildUnnamed33();
266 } 265 }
267 buildCounterData--; 266 buildCounterData--;
268 return o; 267 return o;
269 } 268 }
270 269
271 checkData(api.Data o) { 270 checkData(api.Data o) {
272 buildCounterData++; 271 buildCounterData++;
273 if (buildCounterData < 3) { 272 if (buildCounterData < 3) {
274 checkUnnamed36(o.aircraft); 273 checkUnnamed29(o.aircraft);
275 checkUnnamed37(o.airport); 274 checkUnnamed30(o.airport);
276 checkUnnamed38(o.carrier); 275 checkUnnamed31(o.carrier);
277 checkUnnamed39(o.city); 276 checkUnnamed32(o.city);
278 unittest.expect(o.kind, unittest.equals('foo')); 277 unittest.expect(o.kind, unittest.equals('foo'));
279 checkUnnamed40(o.tax); 278 checkUnnamed33(o.tax);
280 } 279 }
281 buildCounterData--; 280 buildCounterData--;
282 } 281 }
283 282
284 core.int buildCounterFareInfo = 0; 283 core.int buildCounterFareInfo = 0;
285 buildFareInfo() { 284 buildFareInfo() {
286 var o = new api.FareInfo(); 285 var o = new api.FareInfo();
287 buildCounterFareInfo++; 286 buildCounterFareInfo++;
288 if (buildCounterFareInfo < 3) { 287 if (buildCounterFareInfo < 3) {
289 o.basisCode = "foo"; 288 o.basisCode = "foo";
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
326 325
327 checkFlightInfo(api.FlightInfo o) { 326 checkFlightInfo(api.FlightInfo o) {
328 buildCounterFlightInfo++; 327 buildCounterFlightInfo++;
329 if (buildCounterFlightInfo < 3) { 328 if (buildCounterFlightInfo < 3) {
330 unittest.expect(o.carrier, unittest.equals('foo')); 329 unittest.expect(o.carrier, unittest.equals('foo'));
331 unittest.expect(o.number, unittest.equals('foo')); 330 unittest.expect(o.number, unittest.equals('foo'));
332 } 331 }
333 buildCounterFlightInfo--; 332 buildCounterFlightInfo--;
334 } 333 }
335 334
336 buildUnnamed41() { 335 buildUnnamed34() {
337 var o = new core.List<api.BagDescriptor>(); 336 var o = new core.List<api.BagDescriptor>();
338 o.add(buildBagDescriptor()); 337 o.add(buildBagDescriptor());
339 o.add(buildBagDescriptor()); 338 o.add(buildBagDescriptor());
340 return o; 339 return o;
341 } 340 }
342 341
343 checkUnnamed41(core.List<api.BagDescriptor> o) { 342 checkUnnamed34(core.List<api.BagDescriptor> o) {
344 unittest.expect(o, unittest.hasLength(2)); 343 unittest.expect(o, unittest.hasLength(2));
345 checkBagDescriptor(o[0]); 344 checkBagDescriptor(o[0]);
346 checkBagDescriptor(o[1]); 345 checkBagDescriptor(o[1]);
347 } 346 }
348 347
349 core.int buildCounterFreeBaggageAllowance = 0; 348 core.int buildCounterFreeBaggageAllowance = 0;
350 buildFreeBaggageAllowance() { 349 buildFreeBaggageAllowance() {
351 var o = new api.FreeBaggageAllowance(); 350 var o = new api.FreeBaggageAllowance();
352 buildCounterFreeBaggageAllowance++; 351 buildCounterFreeBaggageAllowance++;
353 if (buildCounterFreeBaggageAllowance < 3) { 352 if (buildCounterFreeBaggageAllowance < 3) {
354 o.bagDescriptor = buildUnnamed41(); 353 o.bagDescriptor = buildUnnamed34();
355 o.kilos = 42; 354 o.kilos = 42;
356 o.kilosPerPiece = 42; 355 o.kilosPerPiece = 42;
357 o.kind = "foo"; 356 o.kind = "foo";
358 o.pieces = 42; 357 o.pieces = 42;
359 o.pounds = 42; 358 o.pounds = 42;
360 } 359 }
361 buildCounterFreeBaggageAllowance--; 360 buildCounterFreeBaggageAllowance--;
362 return o; 361 return o;
363 } 362 }
364 363
365 checkFreeBaggageAllowance(api.FreeBaggageAllowance o) { 364 checkFreeBaggageAllowance(api.FreeBaggageAllowance o) {
366 buildCounterFreeBaggageAllowance++; 365 buildCounterFreeBaggageAllowance++;
367 if (buildCounterFreeBaggageAllowance < 3) { 366 if (buildCounterFreeBaggageAllowance < 3) {
368 checkUnnamed41(o.bagDescriptor); 367 checkUnnamed34(o.bagDescriptor);
369 unittest.expect(o.kilos, unittest.equals(42)); 368 unittest.expect(o.kilos, unittest.equals(42));
370 unittest.expect(o.kilosPerPiece, unittest.equals(42)); 369 unittest.expect(o.kilosPerPiece, unittest.equals(42));
371 unittest.expect(o.kind, unittest.equals('foo')); 370 unittest.expect(o.kind, unittest.equals('foo'));
372 unittest.expect(o.pieces, unittest.equals(42)); 371 unittest.expect(o.pieces, unittest.equals(42));
373 unittest.expect(o.pounds, unittest.equals(42)); 372 unittest.expect(o.pounds, unittest.equals(42));
374 } 373 }
375 buildCounterFreeBaggageAllowance--; 374 buildCounterFreeBaggageAllowance--;
376 } 375 }
377 376
378 core.int buildCounterLegInfo = 0; 377 core.int buildCounterLegInfo = 0;
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
448 unittest.expect(o.adultCount, unittest.equals(42)); 447 unittest.expect(o.adultCount, unittest.equals(42));
449 unittest.expect(o.childCount, unittest.equals(42)); 448 unittest.expect(o.childCount, unittest.equals(42));
450 unittest.expect(o.infantInLapCount, unittest.equals(42)); 449 unittest.expect(o.infantInLapCount, unittest.equals(42));
451 unittest.expect(o.infantInSeatCount, unittest.equals(42)); 450 unittest.expect(o.infantInSeatCount, unittest.equals(42));
452 unittest.expect(o.kind, unittest.equals('foo')); 451 unittest.expect(o.kind, unittest.equals('foo'));
453 unittest.expect(o.seniorCount, unittest.equals(42)); 452 unittest.expect(o.seniorCount, unittest.equals(42));
454 } 453 }
455 buildCounterPassengerCounts--; 454 buildCounterPassengerCounts--;
456 } 455 }
457 456
458 buildUnnamed42() { 457 buildUnnamed35() {
459 var o = new core.List<api.FareInfo>(); 458 var o = new core.List<api.FareInfo>();
460 o.add(buildFareInfo()); 459 o.add(buildFareInfo());
461 o.add(buildFareInfo()); 460 o.add(buildFareInfo());
462 return o; 461 return o;
463 } 462 }
464 463
465 checkUnnamed42(core.List<api.FareInfo> o) { 464 checkUnnamed35(core.List<api.FareInfo> o) {
466 unittest.expect(o, unittest.hasLength(2)); 465 unittest.expect(o, unittest.hasLength(2));
467 checkFareInfo(o[0]); 466 checkFareInfo(o[0]);
468 checkFareInfo(o[1]); 467 checkFareInfo(o[1]);
469 } 468 }
470 469
471 buildUnnamed43() { 470 buildUnnamed36() {
472 var o = new core.List<api.SegmentPricing>(); 471 var o = new core.List<api.SegmentPricing>();
473 o.add(buildSegmentPricing()); 472 o.add(buildSegmentPricing());
474 o.add(buildSegmentPricing()); 473 o.add(buildSegmentPricing());
475 return o; 474 return o;
476 } 475 }
477 476
478 checkUnnamed43(core.List<api.SegmentPricing> o) { 477 checkUnnamed36(core.List<api.SegmentPricing> o) {
479 unittest.expect(o, unittest.hasLength(2)); 478 unittest.expect(o, unittest.hasLength(2));
480 checkSegmentPricing(o[0]); 479 checkSegmentPricing(o[0]);
481 checkSegmentPricing(o[1]); 480 checkSegmentPricing(o[1]);
482 } 481 }
483 482
484 buildUnnamed44() { 483 buildUnnamed37() {
485 var o = new core.List<api.TaxInfo>(); 484 var o = new core.List<api.TaxInfo>();
486 o.add(buildTaxInfo()); 485 o.add(buildTaxInfo());
487 o.add(buildTaxInfo()); 486 o.add(buildTaxInfo());
488 return o; 487 return o;
489 } 488 }
490 489
491 checkUnnamed44(core.List<api.TaxInfo> o) { 490 checkUnnamed37(core.List<api.TaxInfo> o) {
492 unittest.expect(o, unittest.hasLength(2)); 491 unittest.expect(o, unittest.hasLength(2));
493 checkTaxInfo(o[0]); 492 checkTaxInfo(o[0]);
494 checkTaxInfo(o[1]); 493 checkTaxInfo(o[1]);
495 } 494 }
496 495
497 core.int buildCounterPricingInfo = 0; 496 core.int buildCounterPricingInfo = 0;
498 buildPricingInfo() { 497 buildPricingInfo() {
499 var o = new api.PricingInfo(); 498 var o = new api.PricingInfo();
500 buildCounterPricingInfo++; 499 buildCounterPricingInfo++;
501 if (buildCounterPricingInfo < 3) { 500 if (buildCounterPricingInfo < 3) {
502 o.baseFareTotal = "foo"; 501 o.baseFareTotal = "foo";
503 o.fare = buildUnnamed42(); 502 o.fare = buildUnnamed35();
504 o.fareCalculation = "foo"; 503 o.fareCalculation = "foo";
505 o.kind = "foo"; 504 o.kind = "foo";
506 o.latestTicketingTime = "foo"; 505 o.latestTicketingTime = "foo";
507 o.passengers = buildPassengerCounts(); 506 o.passengers = buildPassengerCounts();
508 o.ptc = "foo"; 507 o.ptc = "foo";
509 o.refundable = true; 508 o.refundable = true;
510 o.saleFareTotal = "foo"; 509 o.saleFareTotal = "foo";
511 o.saleTaxTotal = "foo"; 510 o.saleTaxTotal = "foo";
512 o.saleTotal = "foo"; 511 o.saleTotal = "foo";
513 o.segmentPricing = buildUnnamed43(); 512 o.segmentPricing = buildUnnamed36();
514 o.tax = buildUnnamed44(); 513 o.tax = buildUnnamed37();
515 } 514 }
516 buildCounterPricingInfo--; 515 buildCounterPricingInfo--;
517 return o; 516 return o;
518 } 517 }
519 518
520 checkPricingInfo(api.PricingInfo o) { 519 checkPricingInfo(api.PricingInfo o) {
521 buildCounterPricingInfo++; 520 buildCounterPricingInfo++;
522 if (buildCounterPricingInfo < 3) { 521 if (buildCounterPricingInfo < 3) {
523 unittest.expect(o.baseFareTotal, unittest.equals('foo')); 522 unittest.expect(o.baseFareTotal, unittest.equals('foo'));
524 checkUnnamed42(o.fare); 523 checkUnnamed35(o.fare);
525 unittest.expect(o.fareCalculation, unittest.equals('foo')); 524 unittest.expect(o.fareCalculation, unittest.equals('foo'));
526 unittest.expect(o.kind, unittest.equals('foo')); 525 unittest.expect(o.kind, unittest.equals('foo'));
527 unittest.expect(o.latestTicketingTime, unittest.equals('foo')); 526 unittest.expect(o.latestTicketingTime, unittest.equals('foo'));
528 checkPassengerCounts(o.passengers); 527 checkPassengerCounts(o.passengers);
529 unittest.expect(o.ptc, unittest.equals('foo')); 528 unittest.expect(o.ptc, unittest.equals('foo'));
530 unittest.expect(o.refundable, unittest.isTrue); 529 unittest.expect(o.refundable, unittest.isTrue);
531 unittest.expect(o.saleFareTotal, unittest.equals('foo')); 530 unittest.expect(o.saleFareTotal, unittest.equals('foo'));
532 unittest.expect(o.saleTaxTotal, unittest.equals('foo')); 531 unittest.expect(o.saleTaxTotal, unittest.equals('foo'));
533 unittest.expect(o.saleTotal, unittest.equals('foo')); 532 unittest.expect(o.saleTotal, unittest.equals('foo'));
534 checkUnnamed43(o.segmentPricing); 533 checkUnnamed36(o.segmentPricing);
535 checkUnnamed44(o.tax); 534 checkUnnamed37(o.tax);
536 } 535 }
537 buildCounterPricingInfo--; 536 buildCounterPricingInfo--;
538 } 537 }
539 538
540 buildUnnamed45() { 539 buildUnnamed38() {
541 var o = new core.List<api.LegInfo>(); 540 var o = new core.List<api.LegInfo>();
542 o.add(buildLegInfo()); 541 o.add(buildLegInfo());
543 o.add(buildLegInfo()); 542 o.add(buildLegInfo());
544 return o; 543 return o;
545 } 544 }
546 545
547 checkUnnamed45(core.List<api.LegInfo> o) { 546 checkUnnamed38(core.List<api.LegInfo> o) {
548 unittest.expect(o, unittest.hasLength(2)); 547 unittest.expect(o, unittest.hasLength(2));
549 checkLegInfo(o[0]); 548 checkLegInfo(o[0]);
550 checkLegInfo(o[1]); 549 checkLegInfo(o[1]);
551 } 550 }
552 551
553 core.int buildCounterSegmentInfo = 0; 552 core.int buildCounterSegmentInfo = 0;
554 buildSegmentInfo() { 553 buildSegmentInfo() {
555 var o = new api.SegmentInfo(); 554 var o = new api.SegmentInfo();
556 buildCounterSegmentInfo++; 555 buildCounterSegmentInfo++;
557 if (buildCounterSegmentInfo < 3) { 556 if (buildCounterSegmentInfo < 3) {
558 o.bookingCode = "foo"; 557 o.bookingCode = "foo";
559 o.bookingCodeCount = 42; 558 o.bookingCodeCount = 42;
560 o.cabin = "foo"; 559 o.cabin = "foo";
561 o.connectionDuration = 42; 560 o.connectionDuration = 42;
562 o.duration = 42; 561 o.duration = 42;
563 o.flight = buildFlightInfo(); 562 o.flight = buildFlightInfo();
564 o.id = "foo"; 563 o.id = "foo";
565 o.kind = "foo"; 564 o.kind = "foo";
566 o.leg = buildUnnamed45(); 565 o.leg = buildUnnamed38();
567 o.marriedSegmentGroup = "foo"; 566 o.marriedSegmentGroup = "foo";
568 o.subjectToGovernmentApproval = true; 567 o.subjectToGovernmentApproval = true;
569 } 568 }
570 buildCounterSegmentInfo--; 569 buildCounterSegmentInfo--;
571 return o; 570 return o;
572 } 571 }
573 572
574 checkSegmentInfo(api.SegmentInfo o) { 573 checkSegmentInfo(api.SegmentInfo o) {
575 buildCounterSegmentInfo++; 574 buildCounterSegmentInfo++;
576 if (buildCounterSegmentInfo < 3) { 575 if (buildCounterSegmentInfo < 3) {
577 unittest.expect(o.bookingCode, unittest.equals('foo')); 576 unittest.expect(o.bookingCode, unittest.equals('foo'));
578 unittest.expect(o.bookingCodeCount, unittest.equals(42)); 577 unittest.expect(o.bookingCodeCount, unittest.equals(42));
579 unittest.expect(o.cabin, unittest.equals('foo')); 578 unittest.expect(o.cabin, unittest.equals('foo'));
580 unittest.expect(o.connectionDuration, unittest.equals(42)); 579 unittest.expect(o.connectionDuration, unittest.equals(42));
581 unittest.expect(o.duration, unittest.equals(42)); 580 unittest.expect(o.duration, unittest.equals(42));
582 checkFlightInfo(o.flight); 581 checkFlightInfo(o.flight);
583 unittest.expect(o.id, unittest.equals('foo')); 582 unittest.expect(o.id, unittest.equals('foo'));
584 unittest.expect(o.kind, unittest.equals('foo')); 583 unittest.expect(o.kind, unittest.equals('foo'));
585 checkUnnamed45(o.leg); 584 checkUnnamed38(o.leg);
586 unittest.expect(o.marriedSegmentGroup, unittest.equals('foo')); 585 unittest.expect(o.marriedSegmentGroup, unittest.equals('foo'));
587 unittest.expect(o.subjectToGovernmentApproval, unittest.isTrue); 586 unittest.expect(o.subjectToGovernmentApproval, unittest.isTrue);
588 } 587 }
589 buildCounterSegmentInfo--; 588 buildCounterSegmentInfo--;
590 } 589 }
591 590
592 buildUnnamed46() { 591 buildUnnamed39() {
593 var o = new core.List<api.FreeBaggageAllowance>(); 592 var o = new core.List<api.FreeBaggageAllowance>();
594 o.add(buildFreeBaggageAllowance()); 593 o.add(buildFreeBaggageAllowance());
595 o.add(buildFreeBaggageAllowance()); 594 o.add(buildFreeBaggageAllowance());
596 return o; 595 return o;
597 } 596 }
598 597
599 checkUnnamed46(core.List<api.FreeBaggageAllowance> o) { 598 checkUnnamed39(core.List<api.FreeBaggageAllowance> o) {
600 unittest.expect(o, unittest.hasLength(2)); 599 unittest.expect(o, unittest.hasLength(2));
601 checkFreeBaggageAllowance(o[0]); 600 checkFreeBaggageAllowance(o[0]);
602 checkFreeBaggageAllowance(o[1]); 601 checkFreeBaggageAllowance(o[1]);
603 } 602 }
604 603
605 core.int buildCounterSegmentPricing = 0; 604 core.int buildCounterSegmentPricing = 0;
606 buildSegmentPricing() { 605 buildSegmentPricing() {
607 var o = new api.SegmentPricing(); 606 var o = new api.SegmentPricing();
608 buildCounterSegmentPricing++; 607 buildCounterSegmentPricing++;
609 if (buildCounterSegmentPricing < 3) { 608 if (buildCounterSegmentPricing < 3) {
610 o.fareId = "foo"; 609 o.fareId = "foo";
611 o.freeBaggageOption = buildUnnamed46(); 610 o.freeBaggageOption = buildUnnamed39();
612 o.kind = "foo"; 611 o.kind = "foo";
613 o.segmentId = "foo"; 612 o.segmentId = "foo";
614 } 613 }
615 buildCounterSegmentPricing--; 614 buildCounterSegmentPricing--;
616 return o; 615 return o;
617 } 616 }
618 617
619 checkSegmentPricing(api.SegmentPricing o) { 618 checkSegmentPricing(api.SegmentPricing o) {
620 buildCounterSegmentPricing++; 619 buildCounterSegmentPricing++;
621 if (buildCounterSegmentPricing < 3) { 620 if (buildCounterSegmentPricing < 3) {
622 unittest.expect(o.fareId, unittest.equals('foo')); 621 unittest.expect(o.fareId, unittest.equals('foo'));
623 checkUnnamed46(o.freeBaggageOption); 622 checkUnnamed39(o.freeBaggageOption);
624 unittest.expect(o.kind, unittest.equals('foo')); 623 unittest.expect(o.kind, unittest.equals('foo'));
625 unittest.expect(o.segmentId, unittest.equals('foo')); 624 unittest.expect(o.segmentId, unittest.equals('foo'));
626 } 625 }
627 buildCounterSegmentPricing--; 626 buildCounterSegmentPricing--;
628 } 627 }
629 628
630 buildUnnamed47() { 629 buildUnnamed40() {
631 var o = new core.List<api.SegmentInfo>(); 630 var o = new core.List<api.SegmentInfo>();
632 o.add(buildSegmentInfo()); 631 o.add(buildSegmentInfo());
633 o.add(buildSegmentInfo()); 632 o.add(buildSegmentInfo());
634 return o; 633 return o;
635 } 634 }
636 635
637 checkUnnamed47(core.List<api.SegmentInfo> o) { 636 checkUnnamed40(core.List<api.SegmentInfo> o) {
638 unittest.expect(o, unittest.hasLength(2)); 637 unittest.expect(o, unittest.hasLength(2));
639 checkSegmentInfo(o[0]); 638 checkSegmentInfo(o[0]);
640 checkSegmentInfo(o[1]); 639 checkSegmentInfo(o[1]);
641 } 640 }
642 641
643 core.int buildCounterSliceInfo = 0; 642 core.int buildCounterSliceInfo = 0;
644 buildSliceInfo() { 643 buildSliceInfo() {
645 var o = new api.SliceInfo(); 644 var o = new api.SliceInfo();
646 buildCounterSliceInfo++; 645 buildCounterSliceInfo++;
647 if (buildCounterSliceInfo < 3) { 646 if (buildCounterSliceInfo < 3) {
648 o.duration = 42; 647 o.duration = 42;
649 o.kind = "foo"; 648 o.kind = "foo";
650 o.segment = buildUnnamed47(); 649 o.segment = buildUnnamed40();
651 } 650 }
652 buildCounterSliceInfo--; 651 buildCounterSliceInfo--;
653 return o; 652 return o;
654 } 653 }
655 654
656 checkSliceInfo(api.SliceInfo o) { 655 checkSliceInfo(api.SliceInfo o) {
657 buildCounterSliceInfo++; 656 buildCounterSliceInfo++;
658 if (buildCounterSliceInfo < 3) { 657 if (buildCounterSliceInfo < 3) {
659 unittest.expect(o.duration, unittest.equals(42)); 658 unittest.expect(o.duration, unittest.equals(42));
660 unittest.expect(o.kind, unittest.equals('foo')); 659 unittest.expect(o.kind, unittest.equals('foo'));
661 checkUnnamed47(o.segment); 660 checkUnnamed40(o.segment);
662 } 661 }
663 buildCounterSliceInfo--; 662 buildCounterSliceInfo--;
664 } 663 }
665 664
666 buildUnnamed48() { 665 buildUnnamed41() {
667 var o = new core.List<core.String>(); 666 var o = new core.List<core.String>();
668 o.add("foo"); 667 o.add("foo");
669 o.add("foo"); 668 o.add("foo");
670 return o; 669 return o;
671 } 670 }
672 671
673 checkUnnamed48(core.List<core.String> o) { 672 checkUnnamed41(core.List<core.String> o) {
674 unittest.expect(o, unittest.hasLength(2)); 673 unittest.expect(o, unittest.hasLength(2));
675 unittest.expect(o[0], unittest.equals('foo')); 674 unittest.expect(o[0], unittest.equals('foo'));
676 unittest.expect(o[1], unittest.equals('foo')); 675 unittest.expect(o[1], unittest.equals('foo'));
677 } 676 }
678 677
679 buildUnnamed49() { 678 buildUnnamed42() {
680 var o = new core.List<core.String>(); 679 var o = new core.List<core.String>();
681 o.add("foo"); 680 o.add("foo");
682 o.add("foo"); 681 o.add("foo");
683 return o; 682 return o;
684 } 683 }
685 684
686 checkUnnamed49(core.List<core.String> o) { 685 checkUnnamed42(core.List<core.String> o) {
687 unittest.expect(o, unittest.hasLength(2)); 686 unittest.expect(o, unittest.hasLength(2));
688 unittest.expect(o[0], unittest.equals('foo')); 687 unittest.expect(o[0], unittest.equals('foo'));
689 unittest.expect(o[1], unittest.equals('foo')); 688 unittest.expect(o[1], unittest.equals('foo'));
690 } 689 }
691 690
692 core.int buildCounterSliceInput = 0; 691 core.int buildCounterSliceInput = 0;
693 buildSliceInput() { 692 buildSliceInput() {
694 var o = new api.SliceInput(); 693 var o = new api.SliceInput();
695 buildCounterSliceInput++; 694 buildCounterSliceInput++;
696 if (buildCounterSliceInput < 3) { 695 if (buildCounterSliceInput < 3) {
697 o.alliance = "foo"; 696 o.alliance = "foo";
698 o.date = "foo"; 697 o.date = "foo";
699 o.destination = "foo"; 698 o.destination = "foo";
700 o.kind = "foo"; 699 o.kind = "foo";
701 o.maxConnectionDuration = 42; 700 o.maxConnectionDuration = 42;
702 o.maxStops = 42; 701 o.maxStops = 42;
703 o.origin = "foo"; 702 o.origin = "foo";
704 o.permittedCarrier = buildUnnamed48(); 703 o.permittedCarrier = buildUnnamed41();
705 o.permittedDepartureTime = buildTimeOfDayRange(); 704 o.permittedDepartureTime = buildTimeOfDayRange();
706 o.preferredCabin = "foo"; 705 o.preferredCabin = "foo";
707 o.prohibitedCarrier = buildUnnamed49(); 706 o.prohibitedCarrier = buildUnnamed42();
708 } 707 }
709 buildCounterSliceInput--; 708 buildCounterSliceInput--;
710 return o; 709 return o;
711 } 710 }
712 711
713 checkSliceInput(api.SliceInput o) { 712 checkSliceInput(api.SliceInput o) {
714 buildCounterSliceInput++; 713 buildCounterSliceInput++;
715 if (buildCounterSliceInput < 3) { 714 if (buildCounterSliceInput < 3) {
716 unittest.expect(o.alliance, unittest.equals('foo')); 715 unittest.expect(o.alliance, unittest.equals('foo'));
717 unittest.expect(o.date, unittest.equals('foo')); 716 unittest.expect(o.date, unittest.equals('foo'));
718 unittest.expect(o.destination, unittest.equals('foo')); 717 unittest.expect(o.destination, unittest.equals('foo'));
719 unittest.expect(o.kind, unittest.equals('foo')); 718 unittest.expect(o.kind, unittest.equals('foo'));
720 unittest.expect(o.maxConnectionDuration, unittest.equals(42)); 719 unittest.expect(o.maxConnectionDuration, unittest.equals(42));
721 unittest.expect(o.maxStops, unittest.equals(42)); 720 unittest.expect(o.maxStops, unittest.equals(42));
722 unittest.expect(o.origin, unittest.equals('foo')); 721 unittest.expect(o.origin, unittest.equals('foo'));
723 checkUnnamed48(o.permittedCarrier); 722 checkUnnamed41(o.permittedCarrier);
724 checkTimeOfDayRange(o.permittedDepartureTime); 723 checkTimeOfDayRange(o.permittedDepartureTime);
725 unittest.expect(o.preferredCabin, unittest.equals('foo')); 724 unittest.expect(o.preferredCabin, unittest.equals('foo'));
726 checkUnnamed49(o.prohibitedCarrier); 725 checkUnnamed42(o.prohibitedCarrier);
727 } 726 }
728 buildCounterSliceInput--; 727 buildCounterSliceInput--;
729 } 728 }
730 729
731 core.int buildCounterTaxData = 0; 730 core.int buildCounterTaxData = 0;
732 buildTaxData() { 731 buildTaxData() {
733 var o = new api.TaxData(); 732 var o = new api.TaxData();
734 buildCounterTaxData++; 733 buildCounterTaxData++;
735 if (buildCounterTaxData < 3) { 734 if (buildCounterTaxData < 3) {
736 o.id = "foo"; 735 o.id = "foo";
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
796 checkTimeOfDayRange(api.TimeOfDayRange o) { 795 checkTimeOfDayRange(api.TimeOfDayRange o) {
797 buildCounterTimeOfDayRange++; 796 buildCounterTimeOfDayRange++;
798 if (buildCounterTimeOfDayRange < 3) { 797 if (buildCounterTimeOfDayRange < 3) {
799 unittest.expect(o.earliestTime, unittest.equals('foo')); 798 unittest.expect(o.earliestTime, unittest.equals('foo'));
800 unittest.expect(o.kind, unittest.equals('foo')); 799 unittest.expect(o.kind, unittest.equals('foo'));
801 unittest.expect(o.latestTime, unittest.equals('foo')); 800 unittest.expect(o.latestTime, unittest.equals('foo'));
802 } 801 }
803 buildCounterTimeOfDayRange--; 802 buildCounterTimeOfDayRange--;
804 } 803 }
805 804
806 buildUnnamed50() { 805 buildUnnamed43() {
807 var o = new core.List<api.PricingInfo>(); 806 var o = new core.List<api.PricingInfo>();
808 o.add(buildPricingInfo()); 807 o.add(buildPricingInfo());
809 o.add(buildPricingInfo()); 808 o.add(buildPricingInfo());
810 return o; 809 return o;
811 } 810 }
812 811
813 checkUnnamed50(core.List<api.PricingInfo> o) { 812 checkUnnamed43(core.List<api.PricingInfo> o) {
814 unittest.expect(o, unittest.hasLength(2)); 813 unittest.expect(o, unittest.hasLength(2));
815 checkPricingInfo(o[0]); 814 checkPricingInfo(o[0]);
816 checkPricingInfo(o[1]); 815 checkPricingInfo(o[1]);
817 } 816 }
818 817
819 buildUnnamed51() { 818 buildUnnamed44() {
820 var o = new core.List<api.SliceInfo>(); 819 var o = new core.List<api.SliceInfo>();
821 o.add(buildSliceInfo()); 820 o.add(buildSliceInfo());
822 o.add(buildSliceInfo()); 821 o.add(buildSliceInfo());
823 return o; 822 return o;
824 } 823 }
825 824
826 checkUnnamed51(core.List<api.SliceInfo> o) { 825 checkUnnamed44(core.List<api.SliceInfo> o) {
827 unittest.expect(o, unittest.hasLength(2)); 826 unittest.expect(o, unittest.hasLength(2));
828 checkSliceInfo(o[0]); 827 checkSliceInfo(o[0]);
829 checkSliceInfo(o[1]); 828 checkSliceInfo(o[1]);
830 } 829 }
831 830
832 core.int buildCounterTripOption = 0; 831 core.int buildCounterTripOption = 0;
833 buildTripOption() { 832 buildTripOption() {
834 var o = new api.TripOption(); 833 var o = new api.TripOption();
835 buildCounterTripOption++; 834 buildCounterTripOption++;
836 if (buildCounterTripOption < 3) { 835 if (buildCounterTripOption < 3) {
837 o.id = "foo"; 836 o.id = "foo";
838 o.kind = "foo"; 837 o.kind = "foo";
839 o.pricing = buildUnnamed50(); 838 o.pricing = buildUnnamed43();
840 o.saleTotal = "foo"; 839 o.saleTotal = "foo";
841 o.slice = buildUnnamed51(); 840 o.slice = buildUnnamed44();
842 } 841 }
843 buildCounterTripOption--; 842 buildCounterTripOption--;
844 return o; 843 return o;
845 } 844 }
846 845
847 checkTripOption(api.TripOption o) { 846 checkTripOption(api.TripOption o) {
848 buildCounterTripOption++; 847 buildCounterTripOption++;
849 if (buildCounterTripOption < 3) { 848 if (buildCounterTripOption < 3) {
850 unittest.expect(o.id, unittest.equals('foo')); 849 unittest.expect(o.id, unittest.equals('foo'));
851 unittest.expect(o.kind, unittest.equals('foo')); 850 unittest.expect(o.kind, unittest.equals('foo'));
852 checkUnnamed50(o.pricing); 851 checkUnnamed43(o.pricing);
853 unittest.expect(o.saleTotal, unittest.equals('foo')); 852 unittest.expect(o.saleTotal, unittest.equals('foo'));
854 checkUnnamed51(o.slice); 853 checkUnnamed44(o.slice);
855 } 854 }
856 buildCounterTripOption--; 855 buildCounterTripOption--;
857 } 856 }
858 857
859 buildUnnamed52() { 858 buildUnnamed45() {
860 var o = new core.List<api.SliceInput>(); 859 var o = new core.List<api.SliceInput>();
861 o.add(buildSliceInput()); 860 o.add(buildSliceInput());
862 o.add(buildSliceInput()); 861 o.add(buildSliceInput());
863 return o; 862 return o;
864 } 863 }
865 864
866 checkUnnamed52(core.List<api.SliceInput> o) { 865 checkUnnamed45(core.List<api.SliceInput> o) {
867 unittest.expect(o, unittest.hasLength(2)); 866 unittest.expect(o, unittest.hasLength(2));
868 checkSliceInput(o[0]); 867 checkSliceInput(o[0]);
869 checkSliceInput(o[1]); 868 checkSliceInput(o[1]);
870 } 869 }
871 870
872 core.int buildCounterTripOptionsRequest = 0; 871 core.int buildCounterTripOptionsRequest = 0;
873 buildTripOptionsRequest() { 872 buildTripOptionsRequest() {
874 var o = new api.TripOptionsRequest(); 873 var o = new api.TripOptionsRequest();
875 buildCounterTripOptionsRequest++; 874 buildCounterTripOptionsRequest++;
876 if (buildCounterTripOptionsRequest < 3) { 875 if (buildCounterTripOptionsRequest < 3) {
877 o.maxPrice = "foo"; 876 o.maxPrice = "foo";
878 o.passengers = buildPassengerCounts(); 877 o.passengers = buildPassengerCounts();
879 o.refundable = true; 878 o.refundable = true;
880 o.saleCountry = "foo"; 879 o.saleCountry = "foo";
881 o.slice = buildUnnamed52(); 880 o.slice = buildUnnamed45();
882 o.solutions = 42; 881 o.solutions = 42;
883 o.ticketingCountry = "foo"; 882 o.ticketingCountry = "foo";
884 } 883 }
885 buildCounterTripOptionsRequest--; 884 buildCounterTripOptionsRequest--;
886 return o; 885 return o;
887 } 886 }
888 887
889 checkTripOptionsRequest(api.TripOptionsRequest o) { 888 checkTripOptionsRequest(api.TripOptionsRequest o) {
890 buildCounterTripOptionsRequest++; 889 buildCounterTripOptionsRequest++;
891 if (buildCounterTripOptionsRequest < 3) { 890 if (buildCounterTripOptionsRequest < 3) {
892 unittest.expect(o.maxPrice, unittest.equals('foo')); 891 unittest.expect(o.maxPrice, unittest.equals('foo'));
893 checkPassengerCounts(o.passengers); 892 checkPassengerCounts(o.passengers);
894 unittest.expect(o.refundable, unittest.isTrue); 893 unittest.expect(o.refundable, unittest.isTrue);
895 unittest.expect(o.saleCountry, unittest.equals('foo')); 894 unittest.expect(o.saleCountry, unittest.equals('foo'));
896 checkUnnamed52(o.slice); 895 checkUnnamed45(o.slice);
897 unittest.expect(o.solutions, unittest.equals(42)); 896 unittest.expect(o.solutions, unittest.equals(42));
898 unittest.expect(o.ticketingCountry, unittest.equals('foo')); 897 unittest.expect(o.ticketingCountry, unittest.equals('foo'));
899 } 898 }
900 buildCounterTripOptionsRequest--; 899 buildCounterTripOptionsRequest--;
901 } 900 }
902 901
903 buildUnnamed53() { 902 buildUnnamed46() {
904 var o = new core.List<api.TripOption>(); 903 var o = new core.List<api.TripOption>();
905 o.add(buildTripOption()); 904 o.add(buildTripOption());
906 o.add(buildTripOption()); 905 o.add(buildTripOption());
907 return o; 906 return o;
908 } 907 }
909 908
910 checkUnnamed53(core.List<api.TripOption> o) { 909 checkUnnamed46(core.List<api.TripOption> o) {
911 unittest.expect(o, unittest.hasLength(2)); 910 unittest.expect(o, unittest.hasLength(2));
912 checkTripOption(o[0]); 911 checkTripOption(o[0]);
913 checkTripOption(o[1]); 912 checkTripOption(o[1]);
914 } 913 }
915 914
916 core.int buildCounterTripOptionsResponse = 0; 915 core.int buildCounterTripOptionsResponse = 0;
917 buildTripOptionsResponse() { 916 buildTripOptionsResponse() {
918 var o = new api.TripOptionsResponse(); 917 var o = new api.TripOptionsResponse();
919 buildCounterTripOptionsResponse++; 918 buildCounterTripOptionsResponse++;
920 if (buildCounterTripOptionsResponse < 3) { 919 if (buildCounterTripOptionsResponse < 3) {
921 o.data = buildData(); 920 o.data = buildData();
922 o.kind = "foo"; 921 o.kind = "foo";
923 o.requestId = "foo"; 922 o.requestId = "foo";
924 o.tripOption = buildUnnamed53(); 923 o.tripOption = buildUnnamed46();
925 } 924 }
926 buildCounterTripOptionsResponse--; 925 buildCounterTripOptionsResponse--;
927 return o; 926 return o;
928 } 927 }
929 928
930 checkTripOptionsResponse(api.TripOptionsResponse o) { 929 checkTripOptionsResponse(api.TripOptionsResponse o) {
931 buildCounterTripOptionsResponse++; 930 buildCounterTripOptionsResponse++;
932 if (buildCounterTripOptionsResponse < 3) { 931 if (buildCounterTripOptionsResponse < 3) {
933 checkData(o.data); 932 checkData(o.data);
934 unittest.expect(o.kind, unittest.equals('foo')); 933 unittest.expect(o.kind, unittest.equals('foo'));
935 unittest.expect(o.requestId, unittest.equals('foo')); 934 unittest.expect(o.requestId, unittest.equals('foo'));
936 checkUnnamed53(o.tripOption); 935 checkUnnamed46(o.tripOption);
937 } 936 }
938 buildCounterTripOptionsResponse--; 937 buildCounterTripOptionsResponse--;
939 } 938 }
940 939
941 core.int buildCounterTripsSearchRequest = 0; 940 core.int buildCounterTripsSearchRequest = 0;
942 buildTripsSearchRequest() { 941 buildTripsSearchRequest() {
943 var o = new api.TripsSearchRequest(); 942 var o = new api.TripsSearchRequest();
944 buildCounterTripsSearchRequest++; 943 buildCounterTripsSearchRequest++;
945 if (buildCounterTripsSearchRequest < 3) { 944 if (buildCounterTripsSearchRequest < 3) {
946 o.request = buildTripOptionsRequest(); 945 o.request = buildTripOptionsRequest();
(...skipping 24 matching lines...) Expand all
971 970
972 checkTripsSearchResponse(api.TripsSearchResponse o) { 971 checkTripsSearchResponse(api.TripsSearchResponse o) {
973 buildCounterTripsSearchResponse++; 972 buildCounterTripsSearchResponse++;
974 if (buildCounterTripsSearchResponse < 3) { 973 if (buildCounterTripsSearchResponse < 3) {
975 unittest.expect(o.kind, unittest.equals('foo')); 974 unittest.expect(o.kind, unittest.equals('foo'));
976 checkTripOptionsResponse(o.trips); 975 checkTripOptionsResponse(o.trips);
977 } 976 }
978 buildCounterTripsSearchResponse--; 977 buildCounterTripsSearchResponse--;
979 } 978 }
980 979
981
982 main() { 980 main() {
983 unittest.group("obj-schema-AircraftData", () { 981 unittest.group("obj-schema-AircraftData", () {
984 unittest.test("to-json--from-json", () { 982 unittest.test("to-json--from-json", () {
985 var o = buildAircraftData(); 983 var o = buildAircraftData();
986 var od = new api.AircraftData.fromJson(o.toJson()); 984 var od = new api.AircraftData.fromJson(o.toJson());
987 checkAircraftData(od); 985 checkAircraftData(od);
988 }); 986 });
989 }); 987 });
990 988
991
992 unittest.group("obj-schema-AirportData", () { 989 unittest.group("obj-schema-AirportData", () {
993 unittest.test("to-json--from-json", () { 990 unittest.test("to-json--from-json", () {
994 var o = buildAirportData(); 991 var o = buildAirportData();
995 var od = new api.AirportData.fromJson(o.toJson()); 992 var od = new api.AirportData.fromJson(o.toJson());
996 checkAirportData(od); 993 checkAirportData(od);
997 }); 994 });
998 }); 995 });
999 996
1000
1001 unittest.group("obj-schema-BagDescriptor", () { 997 unittest.group("obj-schema-BagDescriptor", () {
1002 unittest.test("to-json--from-json", () { 998 unittest.test("to-json--from-json", () {
1003 var o = buildBagDescriptor(); 999 var o = buildBagDescriptor();
1004 var od = new api.BagDescriptor.fromJson(o.toJson()); 1000 var od = new api.BagDescriptor.fromJson(o.toJson());
1005 checkBagDescriptor(od); 1001 checkBagDescriptor(od);
1006 }); 1002 });
1007 }); 1003 });
1008 1004
1009
1010 unittest.group("obj-schema-CarrierData", () { 1005 unittest.group("obj-schema-CarrierData", () {
1011 unittest.test("to-json--from-json", () { 1006 unittest.test("to-json--from-json", () {
1012 var o = buildCarrierData(); 1007 var o = buildCarrierData();
1013 var od = new api.CarrierData.fromJson(o.toJson()); 1008 var od = new api.CarrierData.fromJson(o.toJson());
1014 checkCarrierData(od); 1009 checkCarrierData(od);
1015 }); 1010 });
1016 }); 1011 });
1017 1012
1018
1019 unittest.group("obj-schema-CityData", () { 1013 unittest.group("obj-schema-CityData", () {
1020 unittest.test("to-json--from-json", () { 1014 unittest.test("to-json--from-json", () {
1021 var o = buildCityData(); 1015 var o = buildCityData();
1022 var od = new api.CityData.fromJson(o.toJson()); 1016 var od = new api.CityData.fromJson(o.toJson());
1023 checkCityData(od); 1017 checkCityData(od);
1024 }); 1018 });
1025 }); 1019 });
1026 1020
1027
1028 unittest.group("obj-schema-Data", () { 1021 unittest.group("obj-schema-Data", () {
1029 unittest.test("to-json--from-json", () { 1022 unittest.test("to-json--from-json", () {
1030 var o = buildData(); 1023 var o = buildData();
1031 var od = new api.Data.fromJson(o.toJson()); 1024 var od = new api.Data.fromJson(o.toJson());
1032 checkData(od); 1025 checkData(od);
1033 }); 1026 });
1034 }); 1027 });
1035 1028
1036
1037 unittest.group("obj-schema-FareInfo", () { 1029 unittest.group("obj-schema-FareInfo", () {
1038 unittest.test("to-json--from-json", () { 1030 unittest.test("to-json--from-json", () {
1039 var o = buildFareInfo(); 1031 var o = buildFareInfo();
1040 var od = new api.FareInfo.fromJson(o.toJson()); 1032 var od = new api.FareInfo.fromJson(o.toJson());
1041 checkFareInfo(od); 1033 checkFareInfo(od);
1042 }); 1034 });
1043 }); 1035 });
1044 1036
1045
1046 unittest.group("obj-schema-FlightInfo", () { 1037 unittest.group("obj-schema-FlightInfo", () {
1047 unittest.test("to-json--from-json", () { 1038 unittest.test("to-json--from-json", () {
1048 var o = buildFlightInfo(); 1039 var o = buildFlightInfo();
1049 var od = new api.FlightInfo.fromJson(o.toJson()); 1040 var od = new api.FlightInfo.fromJson(o.toJson());
1050 checkFlightInfo(od); 1041 checkFlightInfo(od);
1051 }); 1042 });
1052 }); 1043 });
1053 1044
1054
1055 unittest.group("obj-schema-FreeBaggageAllowance", () { 1045 unittest.group("obj-schema-FreeBaggageAllowance", () {
1056 unittest.test("to-json--from-json", () { 1046 unittest.test("to-json--from-json", () {
1057 var o = buildFreeBaggageAllowance(); 1047 var o = buildFreeBaggageAllowance();
1058 var od = new api.FreeBaggageAllowance.fromJson(o.toJson()); 1048 var od = new api.FreeBaggageAllowance.fromJson(o.toJson());
1059 checkFreeBaggageAllowance(od); 1049 checkFreeBaggageAllowance(od);
1060 }); 1050 });
1061 }); 1051 });
1062 1052
1063
1064 unittest.group("obj-schema-LegInfo", () { 1053 unittest.group("obj-schema-LegInfo", () {
1065 unittest.test("to-json--from-json", () { 1054 unittest.test("to-json--from-json", () {
1066 var o = buildLegInfo(); 1055 var o = buildLegInfo();
1067 var od = new api.LegInfo.fromJson(o.toJson()); 1056 var od = new api.LegInfo.fromJson(o.toJson());
1068 checkLegInfo(od); 1057 checkLegInfo(od);
1069 }); 1058 });
1070 }); 1059 });
1071 1060
1072
1073 unittest.group("obj-schema-PassengerCounts", () { 1061 unittest.group("obj-schema-PassengerCounts", () {
1074 unittest.test("to-json--from-json", () { 1062 unittest.test("to-json--from-json", () {
1075 var o = buildPassengerCounts(); 1063 var o = buildPassengerCounts();
1076 var od = new api.PassengerCounts.fromJson(o.toJson()); 1064 var od = new api.PassengerCounts.fromJson(o.toJson());
1077 checkPassengerCounts(od); 1065 checkPassengerCounts(od);
1078 }); 1066 });
1079 }); 1067 });
1080 1068
1081
1082 unittest.group("obj-schema-PricingInfo", () { 1069 unittest.group("obj-schema-PricingInfo", () {
1083 unittest.test("to-json--from-json", () { 1070 unittest.test("to-json--from-json", () {
1084 var o = buildPricingInfo(); 1071 var o = buildPricingInfo();
1085 var od = new api.PricingInfo.fromJson(o.toJson()); 1072 var od = new api.PricingInfo.fromJson(o.toJson());
1086 checkPricingInfo(od); 1073 checkPricingInfo(od);
1087 }); 1074 });
1088 }); 1075 });
1089 1076
1090
1091 unittest.group("obj-schema-SegmentInfo", () { 1077 unittest.group("obj-schema-SegmentInfo", () {
1092 unittest.test("to-json--from-json", () { 1078 unittest.test("to-json--from-json", () {
1093 var o = buildSegmentInfo(); 1079 var o = buildSegmentInfo();
1094 var od = new api.SegmentInfo.fromJson(o.toJson()); 1080 var od = new api.SegmentInfo.fromJson(o.toJson());
1095 checkSegmentInfo(od); 1081 checkSegmentInfo(od);
1096 }); 1082 });
1097 }); 1083 });
1098 1084
1099
1100 unittest.group("obj-schema-SegmentPricing", () { 1085 unittest.group("obj-schema-SegmentPricing", () {
1101 unittest.test("to-json--from-json", () { 1086 unittest.test("to-json--from-json", () {
1102 var o = buildSegmentPricing(); 1087 var o = buildSegmentPricing();
1103 var od = new api.SegmentPricing.fromJson(o.toJson()); 1088 var od = new api.SegmentPricing.fromJson(o.toJson());
1104 checkSegmentPricing(od); 1089 checkSegmentPricing(od);
1105 }); 1090 });
1106 }); 1091 });
1107 1092
1108
1109 unittest.group("obj-schema-SliceInfo", () { 1093 unittest.group("obj-schema-SliceInfo", () {
1110 unittest.test("to-json--from-json", () { 1094 unittest.test("to-json--from-json", () {
1111 var o = buildSliceInfo(); 1095 var o = buildSliceInfo();
1112 var od = new api.SliceInfo.fromJson(o.toJson()); 1096 var od = new api.SliceInfo.fromJson(o.toJson());
1113 checkSliceInfo(od); 1097 checkSliceInfo(od);
1114 }); 1098 });
1115 }); 1099 });
1116 1100
1117
1118 unittest.group("obj-schema-SliceInput", () { 1101 unittest.group("obj-schema-SliceInput", () {
1119 unittest.test("to-json--from-json", () { 1102 unittest.test("to-json--from-json", () {
1120 var o = buildSliceInput(); 1103 var o = buildSliceInput();
1121 var od = new api.SliceInput.fromJson(o.toJson()); 1104 var od = new api.SliceInput.fromJson(o.toJson());
1122 checkSliceInput(od); 1105 checkSliceInput(od);
1123 }); 1106 });
1124 }); 1107 });
1125 1108
1126
1127 unittest.group("obj-schema-TaxData", () { 1109 unittest.group("obj-schema-TaxData", () {
1128 unittest.test("to-json--from-json", () { 1110 unittest.test("to-json--from-json", () {
1129 var o = buildTaxData(); 1111 var o = buildTaxData();
1130 var od = new api.TaxData.fromJson(o.toJson()); 1112 var od = new api.TaxData.fromJson(o.toJson());
1131 checkTaxData(od); 1113 checkTaxData(od);
1132 }); 1114 });
1133 }); 1115 });
1134 1116
1135
1136 unittest.group("obj-schema-TaxInfo", () { 1117 unittest.group("obj-schema-TaxInfo", () {
1137 unittest.test("to-json--from-json", () { 1118 unittest.test("to-json--from-json", () {
1138 var o = buildTaxInfo(); 1119 var o = buildTaxInfo();
1139 var od = new api.TaxInfo.fromJson(o.toJson()); 1120 var od = new api.TaxInfo.fromJson(o.toJson());
1140 checkTaxInfo(od); 1121 checkTaxInfo(od);
1141 }); 1122 });
1142 }); 1123 });
1143 1124
1144
1145 unittest.group("obj-schema-TimeOfDayRange", () { 1125 unittest.group("obj-schema-TimeOfDayRange", () {
1146 unittest.test("to-json--from-json", () { 1126 unittest.test("to-json--from-json", () {
1147 var o = buildTimeOfDayRange(); 1127 var o = buildTimeOfDayRange();
1148 var od = new api.TimeOfDayRange.fromJson(o.toJson()); 1128 var od = new api.TimeOfDayRange.fromJson(o.toJson());
1149 checkTimeOfDayRange(od); 1129 checkTimeOfDayRange(od);
1150 }); 1130 });
1151 }); 1131 });
1152 1132
1153
1154 unittest.group("obj-schema-TripOption", () { 1133 unittest.group("obj-schema-TripOption", () {
1155 unittest.test("to-json--from-json", () { 1134 unittest.test("to-json--from-json", () {
1156 var o = buildTripOption(); 1135 var o = buildTripOption();
1157 var od = new api.TripOption.fromJson(o.toJson()); 1136 var od = new api.TripOption.fromJson(o.toJson());
1158 checkTripOption(od); 1137 checkTripOption(od);
1159 }); 1138 });
1160 }); 1139 });
1161 1140
1162
1163 unittest.group("obj-schema-TripOptionsRequest", () { 1141 unittest.group("obj-schema-TripOptionsRequest", () {
1164 unittest.test("to-json--from-json", () { 1142 unittest.test("to-json--from-json", () {
1165 var o = buildTripOptionsRequest(); 1143 var o = buildTripOptionsRequest();
1166 var od = new api.TripOptionsRequest.fromJson(o.toJson()); 1144 var od = new api.TripOptionsRequest.fromJson(o.toJson());
1167 checkTripOptionsRequest(od); 1145 checkTripOptionsRequest(od);
1168 }); 1146 });
1169 }); 1147 });
1170 1148
1171
1172 unittest.group("obj-schema-TripOptionsResponse", () { 1149 unittest.group("obj-schema-TripOptionsResponse", () {
1173 unittest.test("to-json--from-json", () { 1150 unittest.test("to-json--from-json", () {
1174 var o = buildTripOptionsResponse(); 1151 var o = buildTripOptionsResponse();
1175 var od = new api.TripOptionsResponse.fromJson(o.toJson()); 1152 var od = new api.TripOptionsResponse.fromJson(o.toJson());
1176 checkTripOptionsResponse(od); 1153 checkTripOptionsResponse(od);
1177 }); 1154 });
1178 }); 1155 });
1179 1156
1180
1181 unittest.group("obj-schema-TripsSearchRequest", () { 1157 unittest.group("obj-schema-TripsSearchRequest", () {
1182 unittest.test("to-json--from-json", () { 1158 unittest.test("to-json--from-json", () {
1183 var o = buildTripsSearchRequest(); 1159 var o = buildTripsSearchRequest();
1184 var od = new api.TripsSearchRequest.fromJson(o.toJson()); 1160 var od = new api.TripsSearchRequest.fromJson(o.toJson());
1185 checkTripsSearchRequest(od); 1161 checkTripsSearchRequest(od);
1186 }); 1162 });
1187 }); 1163 });
1188 1164
1189
1190 unittest.group("obj-schema-TripsSearchResponse", () { 1165 unittest.group("obj-schema-TripsSearchResponse", () {
1191 unittest.test("to-json--from-json", () { 1166 unittest.test("to-json--from-json", () {
1192 var o = buildTripsSearchResponse(); 1167 var o = buildTripsSearchResponse();
1193 var od = new api.TripsSearchResponse.fromJson(o.toJson()); 1168 var od = new api.TripsSearchResponse.fromJson(o.toJson());
1194 checkTripsSearchResponse(od); 1169 checkTripsSearchResponse(od);
1195 }); 1170 });
1196 }); 1171 });
1197 1172
1198
1199 unittest.group("resource-TripsResourceApi", () { 1173 unittest.group("resource-TripsResourceApi", () {
1200 unittest.test("method--search", () { 1174 unittest.test("method--search", () {
1201
1202 var mock = new HttpServerMock(); 1175 var mock = new HttpServerMock();
1203 api.TripsResourceApi res = new api.QpxExpressApi(mock).trips; 1176 api.TripsResourceApi res = new api.QpxExpressApi(mock).trips;
1204 var arg_request = buildTripsSearchRequest(); 1177 var arg_request = buildTripsSearchRequest();
1205 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { 1178 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
1206 var obj = new api.TripsSearchRequest.fromJson(json); 1179 var obj = new api.TripsSearchRequest.fromJson(json);
1207 checkTripsSearchRequest(obj); 1180 checkTripsSearchRequest(obj);
1208 1181
1209 var path = (req.url).path; 1182 var path = (req.url).path;
1210 var pathOffset = 0; 1183 var pathOffset = 0;
1211 var index; 1184 var index;
1212 var subPart; 1185 var subPart;
1213 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 1186 unittest.expect(
1187 path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
1214 pathOffset += 1; 1188 pathOffset += 1;
1215 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq uals("qpxExpress/v1/trips/")); 1189 unittest.expect(path.substring(pathOffset, pathOffset + 20),
1190 unittest.equals("qpxExpress/v1/trips/"));
1216 pathOffset += 20; 1191 pathOffset += 20;
1217 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ als("search")); 1192 unittest.expect(path.substring(pathOffset, pathOffset + 6),
1193 unittest.equals("search"));
1218 pathOffset += 6; 1194 pathOffset += 6;
1219 1195
1220 var query = (req.url).query; 1196 var query = (req.url).query;
1221 var queryOffset = 0; 1197 var queryOffset = 0;
1222 var queryMap = {}; 1198 var queryMap = {};
1223 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); 1199 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
1224 parseBool(n) { 1200 parseBool(n) {
1225 if (n == "true") return true; 1201 if (n == "true") return true;
1226 if (n == "false") return false; 1202 if (n == "false") return false;
1227 if (n == null) return null; 1203 if (n == null) return null;
1228 throw new core.ArgumentError("Invalid boolean: $n"); 1204 throw new core.ArgumentError("Invalid boolean: $n");
1229 } 1205 }
1206
1230 if (query.length > 0) { 1207 if (query.length > 0) {
1231 for (var part in query.split("&")) { 1208 for (var part in query.split("&")) {
1232 var keyvalue = part.split("="); 1209 var keyvalue = part.split("=");
1233 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1])); 1210 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]),
1211 core.Uri.decodeQueryComponent(keyvalue[1]));
1234 } 1212 }
1235 } 1213 }
1236 1214
1237
1238 var h = { 1215 var h = {
1239 "content-type" : "application/json; charset=utf-8", 1216 "content-type": "application/json; charset=utf-8",
1240 }; 1217 };
1241 var resp = convert.JSON.encode(buildTripsSearchResponse()); 1218 var resp = convert.JSON.encode(buildTripsSearchResponse());
1242 return new async.Future.value(stringResponse(200, h, resp)); 1219 return new async.Future.value(stringResponse(200, h, resp));
1243 }), true); 1220 }), true);
1244 res.search(arg_request).then(unittest.expectAsync1(((api.TripsSearchRespon se response) { 1221 res
1222 .search(arg_request)
1223 .then(unittest.expectAsync1(((api.TripsSearchResponse response) {
1245 checkTripsSearchResponse(response); 1224 checkTripsSearchResponse(response);
1246 }))); 1225 })));
1247 }); 1226 });
1248
1249 }); 1227 });
1250
1251
1252 } 1228 }
1253
OLDNEW
« no previous file with comments | « generated/googleapis/test/pubsub/v1_test.dart ('k') | generated/googleapis/test/reseller/v1_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698