OLD | NEW |
1 library googleapis_beta.adexchangebuyer2.v2beta1.test; | 1 library googleapis_beta.adexchangebuyer2.v2beta1.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_beta/adexchangebuyer2/v2beta1.dart' as api; | 10 import 'package:googleapis_beta/adexchangebuyer2/v2beta1.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 buildCounterAbsoluteDateRange = 0; | 53 core.int buildCounterAbsoluteDateRange = 0; |
55 buildAbsoluteDateRange() { | 54 buildAbsoluteDateRange() { |
56 var o = new api.AbsoluteDateRange(); | 55 var o = new api.AbsoluteDateRange(); |
57 buildCounterAbsoluteDateRange++; | 56 buildCounterAbsoluteDateRange++; |
58 if (buildCounterAbsoluteDateRange < 3) { | 57 if (buildCounterAbsoluteDateRange < 3) { |
59 o.endDate = buildDate(); | 58 o.endDate = buildDate(); |
(...skipping 24 matching lines...) Expand all Loading... |
84 } | 83 } |
85 | 84 |
86 checkAddDealAssociationRequest(api.AddDealAssociationRequest o) { | 85 checkAddDealAssociationRequest(api.AddDealAssociationRequest o) { |
87 buildCounterAddDealAssociationRequest++; | 86 buildCounterAddDealAssociationRequest++; |
88 if (buildCounterAddDealAssociationRequest < 3) { | 87 if (buildCounterAddDealAssociationRequest < 3) { |
89 checkCreativeDealAssociation(o.association); | 88 checkCreativeDealAssociation(o.association); |
90 } | 89 } |
91 buildCounterAddDealAssociationRequest--; | 90 buildCounterAddDealAssociationRequest--; |
92 } | 91 } |
93 | 92 |
94 buildUnnamed3564() { | 93 buildUnnamed3572() { |
95 var o = new core.List<core.String>(); | 94 var o = new core.List<core.String>(); |
96 o.add("foo"); | 95 o.add("foo"); |
97 o.add("foo"); | 96 o.add("foo"); |
98 return o; | 97 return o; |
99 } | 98 } |
100 | 99 |
101 checkUnnamed3564(core.List<core.String> o) { | 100 checkUnnamed3572(core.List<core.String> o) { |
102 unittest.expect(o, unittest.hasLength(2)); | 101 unittest.expect(o, unittest.hasLength(2)); |
103 unittest.expect(o[0], unittest.equals('foo')); | 102 unittest.expect(o[0], unittest.equals('foo')); |
104 unittest.expect(o[1], unittest.equals('foo')); | 103 unittest.expect(o[1], unittest.equals('foo')); |
105 } | 104 } |
106 | 105 |
107 core.int buildCounterAppContext = 0; | 106 core.int buildCounterAppContext = 0; |
108 buildAppContext() { | 107 buildAppContext() { |
109 var o = new api.AppContext(); | 108 var o = new api.AppContext(); |
110 buildCounterAppContext++; | 109 buildCounterAppContext++; |
111 if (buildCounterAppContext < 3) { | 110 if (buildCounterAppContext < 3) { |
112 o.appTypes = buildUnnamed3564(); | 111 o.appTypes = buildUnnamed3572(); |
113 } | 112 } |
114 buildCounterAppContext--; | 113 buildCounterAppContext--; |
115 return o; | 114 return o; |
116 } | 115 } |
117 | 116 |
118 checkAppContext(api.AppContext o) { | 117 checkAppContext(api.AppContext o) { |
119 buildCounterAppContext++; | 118 buildCounterAppContext++; |
120 if (buildCounterAppContext < 3) { | 119 if (buildCounterAppContext < 3) { |
121 checkUnnamed3564(o.appTypes); | 120 checkUnnamed3572(o.appTypes); |
122 } | 121 } |
123 buildCounterAppContext--; | 122 buildCounterAppContext--; |
124 } | 123 } |
125 | 124 |
126 buildUnnamed3565() { | 125 buildUnnamed3573() { |
127 var o = new core.List<core.String>(); | 126 var o = new core.List<core.String>(); |
128 o.add("foo"); | 127 o.add("foo"); |
129 o.add("foo"); | 128 o.add("foo"); |
130 return o; | 129 return o; |
131 } | 130 } |
132 | 131 |
133 checkUnnamed3565(core.List<core.String> o) { | 132 checkUnnamed3573(core.List<core.String> o) { |
134 unittest.expect(o, unittest.hasLength(2)); | 133 unittest.expect(o, unittest.hasLength(2)); |
135 unittest.expect(o[0], unittest.equals('foo')); | 134 unittest.expect(o[0], unittest.equals('foo')); |
136 unittest.expect(o[1], unittest.equals('foo')); | 135 unittest.expect(o[1], unittest.equals('foo')); |
137 } | 136 } |
138 | 137 |
139 core.int buildCounterAuctionContext = 0; | 138 core.int buildCounterAuctionContext = 0; |
140 buildAuctionContext() { | 139 buildAuctionContext() { |
141 var o = new api.AuctionContext(); | 140 var o = new api.AuctionContext(); |
142 buildCounterAuctionContext++; | 141 buildCounterAuctionContext++; |
143 if (buildCounterAuctionContext < 3) { | 142 if (buildCounterAuctionContext < 3) { |
144 o.auctionTypes = buildUnnamed3565(); | 143 o.auctionTypes = buildUnnamed3573(); |
145 } | 144 } |
146 buildCounterAuctionContext--; | 145 buildCounterAuctionContext--; |
147 return o; | 146 return o; |
148 } | 147 } |
149 | 148 |
150 checkAuctionContext(api.AuctionContext o) { | 149 checkAuctionContext(api.AuctionContext o) { |
151 buildCounterAuctionContext++; | 150 buildCounterAuctionContext++; |
152 if (buildCounterAuctionContext < 3) { | 151 if (buildCounterAuctionContext < 3) { |
153 checkUnnamed3565(o.auctionTypes); | 152 checkUnnamed3573(o.auctionTypes); |
154 } | 153 } |
155 buildCounterAuctionContext--; | 154 buildCounterAuctionContext--; |
156 } | 155 } |
157 | 156 |
158 core.int buildCounterBidMetricsRow = 0; | 157 core.int buildCounterBidMetricsRow = 0; |
159 buildBidMetricsRow() { | 158 buildBidMetricsRow() { |
160 var o = new api.BidMetricsRow(); | 159 var o = new api.BidMetricsRow(); |
161 buildCounterBidMetricsRow++; | 160 buildCounterBidMetricsRow++; |
162 if (buildCounterBidMetricsRow < 3) { | 161 if (buildCounterBidMetricsRow < 3) { |
163 o.bids = buildMetricValue(); | 162 o.bids = buildMetricValue(); |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
306 checkClientUserInvitation(api.ClientUserInvitation o) { | 305 checkClientUserInvitation(api.ClientUserInvitation o) { |
307 buildCounterClientUserInvitation++; | 306 buildCounterClientUserInvitation++; |
308 if (buildCounterClientUserInvitation < 3) { | 307 if (buildCounterClientUserInvitation < 3) { |
309 unittest.expect(o.clientAccountId, unittest.equals('foo')); | 308 unittest.expect(o.clientAccountId, unittest.equals('foo')); |
310 unittest.expect(o.email, unittest.equals('foo')); | 309 unittest.expect(o.email, unittest.equals('foo')); |
311 unittest.expect(o.invitationId, unittest.equals('foo')); | 310 unittest.expect(o.invitationId, unittest.equals('foo')); |
312 } | 311 } |
313 buildCounterClientUserInvitation--; | 312 buildCounterClientUserInvitation--; |
314 } | 313 } |
315 | 314 |
316 buildUnnamed3566() { | 315 buildUnnamed3574() { |
317 var o = new core.List<api.ServingContext>(); | 316 var o = new core.List<api.ServingContext>(); |
318 o.add(buildServingContext()); | 317 o.add(buildServingContext()); |
319 o.add(buildServingContext()); | 318 o.add(buildServingContext()); |
320 return o; | 319 return o; |
321 } | 320 } |
322 | 321 |
323 checkUnnamed3566(core.List<api.ServingContext> o) { | 322 checkUnnamed3574(core.List<api.ServingContext> o) { |
324 unittest.expect(o, unittest.hasLength(2)); | 323 unittest.expect(o, unittest.hasLength(2)); |
325 checkServingContext(o[0]); | 324 checkServingContext(o[0]); |
326 checkServingContext(o[1]); | 325 checkServingContext(o[1]); |
327 } | 326 } |
328 | 327 |
329 buildUnnamed3567() { | 328 buildUnnamed3575() { |
330 var o = new core.List<core.String>(); | 329 var o = new core.List<core.String>(); |
331 o.add("foo"); | 330 o.add("foo"); |
332 o.add("foo"); | 331 o.add("foo"); |
333 return o; | 332 return o; |
334 } | 333 } |
335 | 334 |
336 checkUnnamed3567(core.List<core.String> o) { | 335 checkUnnamed3575(core.List<core.String> o) { |
337 unittest.expect(o, unittest.hasLength(2)); | 336 unittest.expect(o, unittest.hasLength(2)); |
338 unittest.expect(o[0], unittest.equals('foo')); | 337 unittest.expect(o[0], unittest.equals('foo')); |
339 unittest.expect(o[1], unittest.equals('foo')); | 338 unittest.expect(o[1], unittest.equals('foo')); |
340 } | 339 } |
341 | 340 |
342 core.int buildCounterCorrection = 0; | 341 core.int buildCounterCorrection = 0; |
343 buildCorrection() { | 342 buildCorrection() { |
344 var o = new api.Correction(); | 343 var o = new api.Correction(); |
345 buildCounterCorrection++; | 344 buildCounterCorrection++; |
346 if (buildCounterCorrection < 3) { | 345 if (buildCounterCorrection < 3) { |
347 o.contexts = buildUnnamed3566(); | 346 o.contexts = buildUnnamed3574(); |
348 o.details = buildUnnamed3567(); | 347 o.details = buildUnnamed3575(); |
349 o.type = "foo"; | 348 o.type = "foo"; |
350 } | 349 } |
351 buildCounterCorrection--; | 350 buildCounterCorrection--; |
352 return o; | 351 return o; |
353 } | 352 } |
354 | 353 |
355 checkCorrection(api.Correction o) { | 354 checkCorrection(api.Correction o) { |
356 buildCounterCorrection++; | 355 buildCounterCorrection++; |
357 if (buildCounterCorrection < 3) { | 356 if (buildCounterCorrection < 3) { |
358 checkUnnamed3566(o.contexts); | 357 checkUnnamed3574(o.contexts); |
359 checkUnnamed3567(o.details); | 358 checkUnnamed3575(o.details); |
360 unittest.expect(o.type, unittest.equals('foo')); | 359 unittest.expect(o.type, unittest.equals('foo')); |
361 } | 360 } |
362 buildCounterCorrection--; | 361 buildCounterCorrection--; |
363 } | 362 } |
364 | 363 |
365 buildUnnamed3568() { | |
366 var o = new core.List<core.String>(); | |
367 o.add("foo"); | |
368 o.add("foo"); | |
369 return o; | |
370 } | |
371 | |
372 checkUnnamed3568(core.List<core.String> o) { | |
373 unittest.expect(o, unittest.hasLength(2)); | |
374 unittest.expect(o[0], unittest.equals('foo')); | |
375 unittest.expect(o[1], unittest.equals('foo')); | |
376 } | |
377 | |
378 buildUnnamed3569() { | |
379 var o = new core.List<core.String>(); | |
380 o.add("foo"); | |
381 o.add("foo"); | |
382 return o; | |
383 } | |
384 | |
385 checkUnnamed3569(core.List<core.String> o) { | |
386 unittest.expect(o, unittest.hasLength(2)); | |
387 unittest.expect(o[0], unittest.equals('foo')); | |
388 unittest.expect(o[1], unittest.equals('foo')); | |
389 } | |
390 | |
391 buildUnnamed3570() { | |
392 var o = new core.List<api.Correction>(); | |
393 o.add(buildCorrection()); | |
394 o.add(buildCorrection()); | |
395 return o; | |
396 } | |
397 | |
398 checkUnnamed3570(core.List<api.Correction> o) { | |
399 unittest.expect(o, unittest.hasLength(2)); | |
400 checkCorrection(o[0]); | |
401 checkCorrection(o[1]); | |
402 } | |
403 | |
404 buildUnnamed3571() { | |
405 var o = new core.List<core.String>(); | |
406 o.add("foo"); | |
407 o.add("foo"); | |
408 return o; | |
409 } | |
410 | |
411 checkUnnamed3571(core.List<core.String> o) { | |
412 unittest.expect(o, unittest.hasLength(2)); | |
413 unittest.expect(o[0], unittest.equals('foo')); | |
414 unittest.expect(o[1], unittest.equals('foo')); | |
415 } | |
416 | |
417 buildUnnamed3572() { | |
418 var o = new core.List<core.String>(); | |
419 o.add("foo"); | |
420 o.add("foo"); | |
421 return o; | |
422 } | |
423 | |
424 checkUnnamed3572(core.List<core.String> o) { | |
425 unittest.expect(o, unittest.hasLength(2)); | |
426 unittest.expect(o[0], unittest.equals('foo')); | |
427 unittest.expect(o[1], unittest.equals('foo')); | |
428 } | |
429 | |
430 buildUnnamed3573() { | |
431 var o = new core.List<core.String>(); | |
432 o.add("foo"); | |
433 o.add("foo"); | |
434 return o; | |
435 } | |
436 | |
437 checkUnnamed3573(core.List<core.String> o) { | |
438 unittest.expect(o, unittest.hasLength(2)); | |
439 unittest.expect(o[0], unittest.equals('foo')); | |
440 unittest.expect(o[1], unittest.equals('foo')); | |
441 } | |
442 | |
443 buildUnnamed3574() { | |
444 var o = new core.List<core.int>(); | |
445 o.add(42); | |
446 o.add(42); | |
447 return o; | |
448 } | |
449 | |
450 checkUnnamed3574(core.List<core.int> o) { | |
451 unittest.expect(o, unittest.hasLength(2)); | |
452 unittest.expect(o[0], unittest.equals(42)); | |
453 unittest.expect(o[1], unittest.equals(42)); | |
454 } | |
455 | |
456 buildUnnamed3575() { | |
457 var o = new core.List<core.int>(); | |
458 o.add(42); | |
459 o.add(42); | |
460 return o; | |
461 } | |
462 | |
463 checkUnnamed3575(core.List<core.int> o) { | |
464 unittest.expect(o, unittest.hasLength(2)); | |
465 unittest.expect(o[0], unittest.equals(42)); | |
466 unittest.expect(o[1], unittest.equals(42)); | |
467 } | |
468 | |
469 buildUnnamed3576() { | 364 buildUnnamed3576() { |
470 var o = new core.List<core.String>(); | 365 var o = new core.List<core.String>(); |
471 o.add("foo"); | 366 o.add("foo"); |
472 o.add("foo"); | 367 o.add("foo"); |
473 return o; | 368 return o; |
474 } | 369 } |
475 | 370 |
476 checkUnnamed3576(core.List<core.String> o) { | 371 checkUnnamed3576(core.List<core.String> o) { |
477 unittest.expect(o, unittest.hasLength(2)); | 372 unittest.expect(o, unittest.hasLength(2)); |
478 unittest.expect(o[0], unittest.equals('foo')); | 373 unittest.expect(o[0], unittest.equals('foo')); |
479 unittest.expect(o[1], unittest.equals('foo')); | 374 unittest.expect(o[1], unittest.equals('foo')); |
480 } | 375 } |
481 | 376 |
482 buildUnnamed3577() { | 377 buildUnnamed3577() { |
483 var o = new core.List<core.String>(); | 378 var o = new core.List<core.String>(); |
484 o.add("foo"); | 379 o.add("foo"); |
485 o.add("foo"); | 380 o.add("foo"); |
486 return o; | 381 return o; |
487 } | 382 } |
488 | 383 |
489 checkUnnamed3577(core.List<core.String> o) { | 384 checkUnnamed3577(core.List<core.String> o) { |
490 unittest.expect(o, unittest.hasLength(2)); | 385 unittest.expect(o, unittest.hasLength(2)); |
491 unittest.expect(o[0], unittest.equals('foo')); | 386 unittest.expect(o[0], unittest.equals('foo')); |
492 unittest.expect(o[1], unittest.equals('foo')); | 387 unittest.expect(o[1], unittest.equals('foo')); |
493 } | 388 } |
494 | 389 |
495 buildUnnamed3578() { | 390 buildUnnamed3578() { |
| 391 var o = new core.List<api.Correction>(); |
| 392 o.add(buildCorrection()); |
| 393 o.add(buildCorrection()); |
| 394 return o; |
| 395 } |
| 396 |
| 397 checkUnnamed3578(core.List<api.Correction> o) { |
| 398 unittest.expect(o, unittest.hasLength(2)); |
| 399 checkCorrection(o[0]); |
| 400 checkCorrection(o[1]); |
| 401 } |
| 402 |
| 403 buildUnnamed3579() { |
| 404 var o = new core.List<core.String>(); |
| 405 o.add("foo"); |
| 406 o.add("foo"); |
| 407 return o; |
| 408 } |
| 409 |
| 410 checkUnnamed3579(core.List<core.String> o) { |
| 411 unittest.expect(o, unittest.hasLength(2)); |
| 412 unittest.expect(o[0], unittest.equals('foo')); |
| 413 unittest.expect(o[1], unittest.equals('foo')); |
| 414 } |
| 415 |
| 416 buildUnnamed3580() { |
| 417 var o = new core.List<core.String>(); |
| 418 o.add("foo"); |
| 419 o.add("foo"); |
| 420 return o; |
| 421 } |
| 422 |
| 423 checkUnnamed3580(core.List<core.String> o) { |
| 424 unittest.expect(o, unittest.hasLength(2)); |
| 425 unittest.expect(o[0], unittest.equals('foo')); |
| 426 unittest.expect(o[1], unittest.equals('foo')); |
| 427 } |
| 428 |
| 429 buildUnnamed3581() { |
| 430 var o = new core.List<core.String>(); |
| 431 o.add("foo"); |
| 432 o.add("foo"); |
| 433 return o; |
| 434 } |
| 435 |
| 436 checkUnnamed3581(core.List<core.String> o) { |
| 437 unittest.expect(o, unittest.hasLength(2)); |
| 438 unittest.expect(o[0], unittest.equals('foo')); |
| 439 unittest.expect(o[1], unittest.equals('foo')); |
| 440 } |
| 441 |
| 442 buildUnnamed3582() { |
| 443 var o = new core.List<core.int>(); |
| 444 o.add(42); |
| 445 o.add(42); |
| 446 return o; |
| 447 } |
| 448 |
| 449 checkUnnamed3582(core.List<core.int> o) { |
| 450 unittest.expect(o, unittest.hasLength(2)); |
| 451 unittest.expect(o[0], unittest.equals(42)); |
| 452 unittest.expect(o[1], unittest.equals(42)); |
| 453 } |
| 454 |
| 455 buildUnnamed3583() { |
| 456 var o = new core.List<core.int>(); |
| 457 o.add(42); |
| 458 o.add(42); |
| 459 return o; |
| 460 } |
| 461 |
| 462 checkUnnamed3583(core.List<core.int> o) { |
| 463 unittest.expect(o, unittest.hasLength(2)); |
| 464 unittest.expect(o[0], unittest.equals(42)); |
| 465 unittest.expect(o[1], unittest.equals(42)); |
| 466 } |
| 467 |
| 468 buildUnnamed3584() { |
| 469 var o = new core.List<core.String>(); |
| 470 o.add("foo"); |
| 471 o.add("foo"); |
| 472 return o; |
| 473 } |
| 474 |
| 475 checkUnnamed3584(core.List<core.String> o) { |
| 476 unittest.expect(o, unittest.hasLength(2)); |
| 477 unittest.expect(o[0], unittest.equals('foo')); |
| 478 unittest.expect(o[1], unittest.equals('foo')); |
| 479 } |
| 480 |
| 481 buildUnnamed3585() { |
| 482 var o = new core.List<core.String>(); |
| 483 o.add("foo"); |
| 484 o.add("foo"); |
| 485 return o; |
| 486 } |
| 487 |
| 488 checkUnnamed3585(core.List<core.String> o) { |
| 489 unittest.expect(o, unittest.hasLength(2)); |
| 490 unittest.expect(o[0], unittest.equals('foo')); |
| 491 unittest.expect(o[1], unittest.equals('foo')); |
| 492 } |
| 493 |
| 494 buildUnnamed3586() { |
496 var o = new core.List<api.ServingRestriction>(); | 495 var o = new core.List<api.ServingRestriction>(); |
497 o.add(buildServingRestriction()); | 496 o.add(buildServingRestriction()); |
498 o.add(buildServingRestriction()); | 497 o.add(buildServingRestriction()); |
499 return o; | 498 return o; |
500 } | 499 } |
501 | 500 |
502 checkUnnamed3578(core.List<api.ServingRestriction> o) { | 501 checkUnnamed3586(core.List<api.ServingRestriction> o) { |
503 unittest.expect(o, unittest.hasLength(2)); | 502 unittest.expect(o, unittest.hasLength(2)); |
504 checkServingRestriction(o[0]); | 503 checkServingRestriction(o[0]); |
505 checkServingRestriction(o[1]); | 504 checkServingRestriction(o[1]); |
506 } | 505 } |
507 | 506 |
508 buildUnnamed3579() { | 507 buildUnnamed3587() { |
509 var o = new core.List<core.int>(); | 508 var o = new core.List<core.int>(); |
510 o.add(42); | 509 o.add(42); |
511 o.add(42); | 510 o.add(42); |
512 return o; | 511 return o; |
513 } | 512 } |
514 | 513 |
515 checkUnnamed3579(core.List<core.int> o) { | 514 checkUnnamed3587(core.List<core.int> o) { |
516 unittest.expect(o, unittest.hasLength(2)); | 515 unittest.expect(o, unittest.hasLength(2)); |
517 unittest.expect(o[0], unittest.equals(42)); | 516 unittest.expect(o[0], unittest.equals(42)); |
518 unittest.expect(o[1], unittest.equals(42)); | 517 unittest.expect(o[1], unittest.equals(42)); |
519 } | 518 } |
520 | 519 |
521 core.int buildCounterCreative = 0; | 520 core.int buildCounterCreative = 0; |
522 buildCreative() { | 521 buildCreative() { |
523 var o = new api.Creative(); | 522 var o = new api.Creative(); |
524 buildCounterCreative++; | 523 buildCounterCreative++; |
525 if (buildCounterCreative < 3) { | 524 if (buildCounterCreative < 3) { |
526 o.accountId = "foo"; | 525 o.accountId = "foo"; |
527 o.adChoicesDestinationUrl = "foo"; | 526 o.adChoicesDestinationUrl = "foo"; |
528 o.advertiserName = "foo"; | 527 o.advertiserName = "foo"; |
529 o.agencyId = "foo"; | 528 o.agencyId = "foo"; |
530 o.apiUpdateTime = "foo"; | 529 o.apiUpdateTime = "foo"; |
531 o.attributes = buildUnnamed3568(); | 530 o.attributes = buildUnnamed3576(); |
532 o.clickThroughUrls = buildUnnamed3569(); | 531 o.clickThroughUrls = buildUnnamed3577(); |
533 o.corrections = buildUnnamed3570(); | 532 o.corrections = buildUnnamed3578(); |
534 o.creativeId = "foo"; | 533 o.creativeId = "foo"; |
535 o.dealsStatus = "foo"; | 534 o.dealsStatus = "foo"; |
536 o.detectedAdvertiserIds = buildUnnamed3571(); | 535 o.detectedAdvertiserIds = buildUnnamed3579(); |
537 o.detectedDomains = buildUnnamed3572(); | 536 o.detectedDomains = buildUnnamed3580(); |
538 o.detectedLanguages = buildUnnamed3573(); | 537 o.detectedLanguages = buildUnnamed3581(); |
539 o.detectedProductCategories = buildUnnamed3574(); | 538 o.detectedProductCategories = buildUnnamed3582(); |
540 o.detectedSensitiveCategories = buildUnnamed3575(); | 539 o.detectedSensitiveCategories = buildUnnamed3583(); |
541 o.filteringStats = buildFilteringStats(); | 540 o.filteringStats = buildFilteringStats(); |
542 o.html = buildHtmlContent(); | 541 o.html = buildHtmlContent(); |
543 o.impressionTrackingUrls = buildUnnamed3576(); | 542 o.impressionTrackingUrls = buildUnnamed3584(); |
544 o.native = buildNativeContent(); | 543 o.native = buildNativeContent(); |
545 o.openAuctionStatus = "foo"; | 544 o.openAuctionStatus = "foo"; |
546 o.restrictedCategories = buildUnnamed3577(); | 545 o.restrictedCategories = buildUnnamed3585(); |
547 o.servingRestrictions = buildUnnamed3578(); | 546 o.servingRestrictions = buildUnnamed3586(); |
548 o.vendorIds = buildUnnamed3579(); | 547 o.vendorIds = buildUnnamed3587(); |
549 o.version = 42; | 548 o.version = 42; |
550 o.video = buildVideoContent(); | 549 o.video = buildVideoContent(); |
551 } | 550 } |
552 buildCounterCreative--; | 551 buildCounterCreative--; |
553 return o; | 552 return o; |
554 } | 553 } |
555 | 554 |
556 checkCreative(api.Creative o) { | 555 checkCreative(api.Creative o) { |
557 buildCounterCreative++; | 556 buildCounterCreative++; |
558 if (buildCounterCreative < 3) { | 557 if (buildCounterCreative < 3) { |
559 unittest.expect(o.accountId, unittest.equals('foo')); | 558 unittest.expect(o.accountId, unittest.equals('foo')); |
560 unittest.expect(o.adChoicesDestinationUrl, unittest.equals('foo')); | 559 unittest.expect(o.adChoicesDestinationUrl, unittest.equals('foo')); |
561 unittest.expect(o.advertiserName, unittest.equals('foo')); | 560 unittest.expect(o.advertiserName, unittest.equals('foo')); |
562 unittest.expect(o.agencyId, unittest.equals('foo')); | 561 unittest.expect(o.agencyId, unittest.equals('foo')); |
563 unittest.expect(o.apiUpdateTime, unittest.equals('foo')); | 562 unittest.expect(o.apiUpdateTime, unittest.equals('foo')); |
564 checkUnnamed3568(o.attributes); | 563 checkUnnamed3576(o.attributes); |
565 checkUnnamed3569(o.clickThroughUrls); | 564 checkUnnamed3577(o.clickThroughUrls); |
566 checkUnnamed3570(o.corrections); | 565 checkUnnamed3578(o.corrections); |
567 unittest.expect(o.creativeId, unittest.equals('foo')); | 566 unittest.expect(o.creativeId, unittest.equals('foo')); |
568 unittest.expect(o.dealsStatus, unittest.equals('foo')); | 567 unittest.expect(o.dealsStatus, unittest.equals('foo')); |
569 checkUnnamed3571(o.detectedAdvertiserIds); | 568 checkUnnamed3579(o.detectedAdvertiserIds); |
570 checkUnnamed3572(o.detectedDomains); | 569 checkUnnamed3580(o.detectedDomains); |
571 checkUnnamed3573(o.detectedLanguages); | 570 checkUnnamed3581(o.detectedLanguages); |
572 checkUnnamed3574(o.detectedProductCategories); | 571 checkUnnamed3582(o.detectedProductCategories); |
573 checkUnnamed3575(o.detectedSensitiveCategories); | 572 checkUnnamed3583(o.detectedSensitiveCategories); |
574 checkFilteringStats(o.filteringStats); | 573 checkFilteringStats(o.filteringStats); |
575 checkHtmlContent(o.html); | 574 checkHtmlContent(o.html); |
576 checkUnnamed3576(o.impressionTrackingUrls); | 575 checkUnnamed3584(o.impressionTrackingUrls); |
577 checkNativeContent(o.native); | 576 checkNativeContent(o.native); |
578 unittest.expect(o.openAuctionStatus, unittest.equals('foo')); | 577 unittest.expect(o.openAuctionStatus, unittest.equals('foo')); |
579 checkUnnamed3577(o.restrictedCategories); | 578 checkUnnamed3585(o.restrictedCategories); |
580 checkUnnamed3578(o.servingRestrictions); | 579 checkUnnamed3586(o.servingRestrictions); |
581 checkUnnamed3579(o.vendorIds); | 580 checkUnnamed3587(o.vendorIds); |
582 unittest.expect(o.version, unittest.equals(42)); | 581 unittest.expect(o.version, unittest.equals(42)); |
583 checkVideoContent(o.video); | 582 checkVideoContent(o.video); |
584 } | 583 } |
585 buildCounterCreative--; | 584 buildCounterCreative--; |
586 } | 585 } |
587 | 586 |
588 core.int buildCounterCreativeDealAssociation = 0; | 587 core.int buildCounterCreativeDealAssociation = 0; |
589 buildCreativeDealAssociation() { | 588 buildCreativeDealAssociation() { |
590 var o = new api.CreativeDealAssociation(); | 589 var o = new api.CreativeDealAssociation(); |
591 buildCounterCreativeDealAssociation++; | 590 buildCounterCreativeDealAssociation++; |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
647 checkDate(api.Date o) { | 646 checkDate(api.Date o) { |
648 buildCounterDate++; | 647 buildCounterDate++; |
649 if (buildCounterDate < 3) { | 648 if (buildCounterDate < 3) { |
650 unittest.expect(o.day, unittest.equals(42)); | 649 unittest.expect(o.day, unittest.equals(42)); |
651 unittest.expect(o.month, unittest.equals(42)); | 650 unittest.expect(o.month, unittest.equals(42)); |
652 unittest.expect(o.year, unittest.equals(42)); | 651 unittest.expect(o.year, unittest.equals(42)); |
653 } | 652 } |
654 buildCounterDate--; | 653 buildCounterDate--; |
655 } | 654 } |
656 | 655 |
657 buildUnnamed3580() { | 656 buildUnnamed3588() { |
658 var o = new core.List<core.String>(); | 657 var o = new core.List<core.String>(); |
659 o.add("foo"); | 658 o.add("foo"); |
660 o.add("foo"); | 659 o.add("foo"); |
661 return o; | 660 return o; |
662 } | 661 } |
663 | 662 |
664 checkUnnamed3580(core.List<core.String> o) { | 663 checkUnnamed3588(core.List<core.String> o) { |
665 unittest.expect(o, unittest.hasLength(2)); | 664 unittest.expect(o, unittest.hasLength(2)); |
666 unittest.expect(o[0], unittest.equals('foo')); | 665 unittest.expect(o[0], unittest.equals('foo')); |
667 unittest.expect(o[1], unittest.equals('foo')); | 666 unittest.expect(o[1], unittest.equals('foo')); |
668 } | 667 } |
669 | 668 |
670 core.int buildCounterDisapproval = 0; | 669 core.int buildCounterDisapproval = 0; |
671 buildDisapproval() { | 670 buildDisapproval() { |
672 var o = new api.Disapproval(); | 671 var o = new api.Disapproval(); |
673 buildCounterDisapproval++; | 672 buildCounterDisapproval++; |
674 if (buildCounterDisapproval < 3) { | 673 if (buildCounterDisapproval < 3) { |
675 o.details = buildUnnamed3580(); | 674 o.details = buildUnnamed3588(); |
676 o.reason = "foo"; | 675 o.reason = "foo"; |
677 } | 676 } |
678 buildCounterDisapproval--; | 677 buildCounterDisapproval--; |
679 return o; | 678 return o; |
680 } | 679 } |
681 | 680 |
682 checkDisapproval(api.Disapproval o) { | 681 checkDisapproval(api.Disapproval o) { |
683 buildCounterDisapproval++; | 682 buildCounterDisapproval++; |
684 if (buildCounterDisapproval < 3) { | 683 if (buildCounterDisapproval < 3) { |
685 checkUnnamed3580(o.details); | 684 checkUnnamed3588(o.details); |
686 unittest.expect(o.reason, unittest.equals('foo')); | 685 unittest.expect(o.reason, unittest.equals('foo')); |
687 } | 686 } |
688 buildCounterDisapproval--; | 687 buildCounterDisapproval--; |
689 } | 688 } |
690 | 689 |
691 core.int buildCounterEmpty = 0; | 690 core.int buildCounterEmpty = 0; |
692 buildEmpty() { | 691 buildEmpty() { |
693 var o = new api.Empty(); | 692 var o = new api.Empty(); |
694 buildCounterEmpty++; | 693 buildCounterEmpty++; |
695 if (buildCounterEmpty < 3) { | 694 if (buildCounterEmpty < 3) {} |
696 } | |
697 buildCounterEmpty--; | 695 buildCounterEmpty--; |
698 return o; | 696 return o; |
699 } | 697 } |
700 | 698 |
701 checkEmpty(api.Empty o) { | 699 checkEmpty(api.Empty o) { |
702 buildCounterEmpty++; | 700 buildCounterEmpty++; |
703 if (buildCounterEmpty < 3) { | 701 if (buildCounterEmpty < 3) {} |
704 } | |
705 buildCounterEmpty--; | 702 buildCounterEmpty--; |
706 } | 703 } |
707 | 704 |
708 buildUnnamed3581() { | 705 buildUnnamed3589() { |
709 var o = new core.List<core.String>(); | 706 var o = new core.List<core.String>(); |
710 o.add("foo"); | 707 o.add("foo"); |
711 o.add("foo"); | 708 o.add("foo"); |
712 return o; | 709 return o; |
713 } | 710 } |
714 | 711 |
715 checkUnnamed3581(core.List<core.String> o) { | 712 checkUnnamed3589(core.List<core.String> o) { |
716 unittest.expect(o, unittest.hasLength(2)); | 713 unittest.expect(o, unittest.hasLength(2)); |
717 unittest.expect(o[0], unittest.equals('foo')); | 714 unittest.expect(o[0], unittest.equals('foo')); |
718 unittest.expect(o[1], unittest.equals('foo')); | 715 unittest.expect(o[1], unittest.equals('foo')); |
719 } | 716 } |
720 | 717 |
721 buildUnnamed3582() { | 718 buildUnnamed3590() { |
722 var o = new core.List<core.int>(); | 719 var o = new core.List<core.int>(); |
723 o.add(42); | 720 o.add(42); |
724 o.add(42); | 721 o.add(42); |
725 return o; | 722 return o; |
726 } | 723 } |
727 | 724 |
728 checkUnnamed3582(core.List<core.int> o) { | 725 checkUnnamed3590(core.List<core.int> o) { |
729 unittest.expect(o, unittest.hasLength(2)); | 726 unittest.expect(o, unittest.hasLength(2)); |
730 unittest.expect(o[0], unittest.equals(42)); | 727 unittest.expect(o[0], unittest.equals(42)); |
731 unittest.expect(o[1], unittest.equals(42)); | 728 unittest.expect(o[1], unittest.equals(42)); |
732 } | 729 } |
733 | 730 |
734 core.int buildCounterFilterSet = 0; | 731 core.int buildCounterFilterSet = 0; |
735 buildFilterSet() { | 732 buildFilterSet() { |
736 var o = new api.FilterSet(); | 733 var o = new api.FilterSet(); |
737 buildCounterFilterSet++; | 734 buildCounterFilterSet++; |
738 if (buildCounterFilterSet < 3) { | 735 if (buildCounterFilterSet < 3) { |
739 o.absoluteDateRange = buildAbsoluteDateRange(); | 736 o.absoluteDateRange = buildAbsoluteDateRange(); |
740 o.buyerAccountId = "foo"; | 737 o.buyerAccountId = "foo"; |
741 o.creativeId = "foo"; | 738 o.creativeId = "foo"; |
742 o.dealId = "foo"; | 739 o.dealId = "foo"; |
743 o.environment = "foo"; | 740 o.environment = "foo"; |
744 o.filterSetId = "foo"; | 741 o.filterSetId = "foo"; |
745 o.format = "foo"; | 742 o.format = "foo"; |
746 o.ownerAccountId = "foo"; | 743 o.ownerAccountId = "foo"; |
747 o.platforms = buildUnnamed3581(); | 744 o.platforms = buildUnnamed3589(); |
748 o.realtimeTimeRange = buildRealtimeTimeRange(); | 745 o.realtimeTimeRange = buildRealtimeTimeRange(); |
749 o.relativeDateRange = buildRelativeDateRange(); | 746 o.relativeDateRange = buildRelativeDateRange(); |
750 o.sellerNetworkIds = buildUnnamed3582(); | 747 o.sellerNetworkIds = buildUnnamed3590(); |
751 o.timeSeriesGranularity = "foo"; | 748 o.timeSeriesGranularity = "foo"; |
752 } | 749 } |
753 buildCounterFilterSet--; | 750 buildCounterFilterSet--; |
754 return o; | 751 return o; |
755 } | 752 } |
756 | 753 |
757 checkFilterSet(api.FilterSet o) { | 754 checkFilterSet(api.FilterSet o) { |
758 buildCounterFilterSet++; | 755 buildCounterFilterSet++; |
759 if (buildCounterFilterSet < 3) { | 756 if (buildCounterFilterSet < 3) { |
760 checkAbsoluteDateRange(o.absoluteDateRange); | 757 checkAbsoluteDateRange(o.absoluteDateRange); |
761 unittest.expect(o.buyerAccountId, unittest.equals('foo')); | 758 unittest.expect(o.buyerAccountId, unittest.equals('foo')); |
762 unittest.expect(o.creativeId, unittest.equals('foo')); | 759 unittest.expect(o.creativeId, unittest.equals('foo')); |
763 unittest.expect(o.dealId, unittest.equals('foo')); | 760 unittest.expect(o.dealId, unittest.equals('foo')); |
764 unittest.expect(o.environment, unittest.equals('foo')); | 761 unittest.expect(o.environment, unittest.equals('foo')); |
765 unittest.expect(o.filterSetId, unittest.equals('foo')); | 762 unittest.expect(o.filterSetId, unittest.equals('foo')); |
766 unittest.expect(o.format, unittest.equals('foo')); | 763 unittest.expect(o.format, unittest.equals('foo')); |
767 unittest.expect(o.ownerAccountId, unittest.equals('foo')); | 764 unittest.expect(o.ownerAccountId, unittest.equals('foo')); |
768 checkUnnamed3581(o.platforms); | 765 checkUnnamed3589(o.platforms); |
769 checkRealtimeTimeRange(o.realtimeTimeRange); | 766 checkRealtimeTimeRange(o.realtimeTimeRange); |
770 checkRelativeDateRange(o.relativeDateRange); | 767 checkRelativeDateRange(o.relativeDateRange); |
771 checkUnnamed3582(o.sellerNetworkIds); | 768 checkUnnamed3590(o.sellerNetworkIds); |
772 unittest.expect(o.timeSeriesGranularity, unittest.equals('foo')); | 769 unittest.expect(o.timeSeriesGranularity, unittest.equals('foo')); |
773 } | 770 } |
774 buildCounterFilterSet--; | 771 buildCounterFilterSet--; |
775 } | 772 } |
776 | 773 |
777 core.int buildCounterFilteredBidCreativeRow = 0; | 774 core.int buildCounterFilteredBidCreativeRow = 0; |
778 buildFilteredBidCreativeRow() { | 775 buildFilteredBidCreativeRow() { |
779 var o = new api.FilteredBidCreativeRow(); | 776 var o = new api.FilteredBidCreativeRow(); |
780 buildCounterFilteredBidCreativeRow++; | 777 buildCounterFilteredBidCreativeRow++; |
781 if (buildCounterFilteredBidCreativeRow < 3) { | 778 if (buildCounterFilteredBidCreativeRow < 3) { |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
813 checkFilteredBidDetailRow(api.FilteredBidDetailRow o) { | 810 checkFilteredBidDetailRow(api.FilteredBidDetailRow o) { |
814 buildCounterFilteredBidDetailRow++; | 811 buildCounterFilteredBidDetailRow++; |
815 if (buildCounterFilteredBidDetailRow < 3) { | 812 if (buildCounterFilteredBidDetailRow < 3) { |
816 checkMetricValue(o.bidCount); | 813 checkMetricValue(o.bidCount); |
817 unittest.expect(o.detailId, unittest.equals(42)); | 814 unittest.expect(o.detailId, unittest.equals(42)); |
818 checkRowDimensions(o.rowDimensions); | 815 checkRowDimensions(o.rowDimensions); |
819 } | 816 } |
820 buildCounterFilteredBidDetailRow--; | 817 buildCounterFilteredBidDetailRow--; |
821 } | 818 } |
822 | 819 |
823 buildUnnamed3583() { | 820 buildUnnamed3591() { |
824 var o = new core.List<api.Reason>(); | 821 var o = new core.List<api.Reason>(); |
825 o.add(buildReason()); | 822 o.add(buildReason()); |
826 o.add(buildReason()); | 823 o.add(buildReason()); |
827 return o; | 824 return o; |
828 } | 825 } |
829 | 826 |
830 checkUnnamed3583(core.List<api.Reason> o) { | 827 checkUnnamed3591(core.List<api.Reason> o) { |
831 unittest.expect(o, unittest.hasLength(2)); | 828 unittest.expect(o, unittest.hasLength(2)); |
832 checkReason(o[0]); | 829 checkReason(o[0]); |
833 checkReason(o[1]); | 830 checkReason(o[1]); |
834 } | 831 } |
835 | 832 |
836 core.int buildCounterFilteringStats = 0; | 833 core.int buildCounterFilteringStats = 0; |
837 buildFilteringStats() { | 834 buildFilteringStats() { |
838 var o = new api.FilteringStats(); | 835 var o = new api.FilteringStats(); |
839 buildCounterFilteringStats++; | 836 buildCounterFilteringStats++; |
840 if (buildCounterFilteringStats < 3) { | 837 if (buildCounterFilteringStats < 3) { |
841 o.date = buildDate(); | 838 o.date = buildDate(); |
842 o.reasons = buildUnnamed3583(); | 839 o.reasons = buildUnnamed3591(); |
843 } | 840 } |
844 buildCounterFilteringStats--; | 841 buildCounterFilteringStats--; |
845 return o; | 842 return o; |
846 } | 843 } |
847 | 844 |
848 checkFilteringStats(api.FilteringStats o) { | 845 checkFilteringStats(api.FilteringStats o) { |
849 buildCounterFilteringStats++; | 846 buildCounterFilteringStats++; |
850 if (buildCounterFilteringStats < 3) { | 847 if (buildCounterFilteringStats < 3) { |
851 checkDate(o.date); | 848 checkDate(o.date); |
852 checkUnnamed3583(o.reasons); | 849 checkUnnamed3591(o.reasons); |
853 } | 850 } |
854 buildCounterFilteringStats--; | 851 buildCounterFilteringStats--; |
855 } | 852 } |
856 | 853 |
857 core.int buildCounterHtmlContent = 0; | 854 core.int buildCounterHtmlContent = 0; |
858 buildHtmlContent() { | 855 buildHtmlContent() { |
859 var o = new api.HtmlContent(); | 856 var o = new api.HtmlContent(); |
860 buildCounterHtmlContent++; | 857 buildCounterHtmlContent++; |
861 if (buildCounterHtmlContent < 3) { | 858 if (buildCounterHtmlContent < 3) { |
862 o.height = 42; | 859 o.height = 42; |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
922 checkMetricValue(o.availableImpressions); | 919 checkMetricValue(o.availableImpressions); |
923 checkMetricValue(o.bidRequests); | 920 checkMetricValue(o.bidRequests); |
924 checkMetricValue(o.inventoryMatches); | 921 checkMetricValue(o.inventoryMatches); |
925 checkMetricValue(o.responsesWithBids); | 922 checkMetricValue(o.responsesWithBids); |
926 checkRowDimensions(o.rowDimensions); | 923 checkRowDimensions(o.rowDimensions); |
927 checkMetricValue(o.successfulResponses); | 924 checkMetricValue(o.successfulResponses); |
928 } | 925 } |
929 buildCounterImpressionMetricsRow--; | 926 buildCounterImpressionMetricsRow--; |
930 } | 927 } |
931 | 928 |
932 buildUnnamed3584() { | 929 buildUnnamed3592() { |
933 var o = new core.List<api.BidMetricsRow>(); | 930 var o = new core.List<api.BidMetricsRow>(); |
934 o.add(buildBidMetricsRow()); | 931 o.add(buildBidMetricsRow()); |
935 o.add(buildBidMetricsRow()); | 932 o.add(buildBidMetricsRow()); |
936 return o; | 933 return o; |
937 } | 934 } |
938 | 935 |
939 checkUnnamed3584(core.List<api.BidMetricsRow> o) { | 936 checkUnnamed3592(core.List<api.BidMetricsRow> o) { |
940 unittest.expect(o, unittest.hasLength(2)); | 937 unittest.expect(o, unittest.hasLength(2)); |
941 checkBidMetricsRow(o[0]); | 938 checkBidMetricsRow(o[0]); |
942 checkBidMetricsRow(o[1]); | 939 checkBidMetricsRow(o[1]); |
943 } | 940 } |
944 | 941 |
945 core.int buildCounterListBidMetricsResponse = 0; | 942 core.int buildCounterListBidMetricsResponse = 0; |
946 buildListBidMetricsResponse() { | 943 buildListBidMetricsResponse() { |
947 var o = new api.ListBidMetricsResponse(); | 944 var o = new api.ListBidMetricsResponse(); |
948 buildCounterListBidMetricsResponse++; | 945 buildCounterListBidMetricsResponse++; |
949 if (buildCounterListBidMetricsResponse < 3) { | 946 if (buildCounterListBidMetricsResponse < 3) { |
950 o.bidMetricsRows = buildUnnamed3584(); | 947 o.bidMetricsRows = buildUnnamed3592(); |
951 o.nextPageToken = "foo"; | 948 o.nextPageToken = "foo"; |
952 } | 949 } |
953 buildCounterListBidMetricsResponse--; | 950 buildCounterListBidMetricsResponse--; |
954 return o; | 951 return o; |
955 } | 952 } |
956 | 953 |
957 checkListBidMetricsResponse(api.ListBidMetricsResponse o) { | 954 checkListBidMetricsResponse(api.ListBidMetricsResponse o) { |
958 buildCounterListBidMetricsResponse++; | 955 buildCounterListBidMetricsResponse++; |
959 if (buildCounterListBidMetricsResponse < 3) { | 956 if (buildCounterListBidMetricsResponse < 3) { |
960 checkUnnamed3584(o.bidMetricsRows); | 957 checkUnnamed3592(o.bidMetricsRows); |
961 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 958 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
962 } | 959 } |
963 buildCounterListBidMetricsResponse--; | 960 buildCounterListBidMetricsResponse--; |
964 } | 961 } |
965 | 962 |
966 buildUnnamed3585() { | 963 buildUnnamed3593() { |
967 var o = new core.List<api.CalloutStatusRow>(); | 964 var o = new core.List<api.CalloutStatusRow>(); |
968 o.add(buildCalloutStatusRow()); | 965 o.add(buildCalloutStatusRow()); |
969 o.add(buildCalloutStatusRow()); | 966 o.add(buildCalloutStatusRow()); |
970 return o; | 967 return o; |
971 } | 968 } |
972 | 969 |
973 checkUnnamed3585(core.List<api.CalloutStatusRow> o) { | 970 checkUnnamed3593(core.List<api.CalloutStatusRow> o) { |
974 unittest.expect(o, unittest.hasLength(2)); | 971 unittest.expect(o, unittest.hasLength(2)); |
975 checkCalloutStatusRow(o[0]); | 972 checkCalloutStatusRow(o[0]); |
976 checkCalloutStatusRow(o[1]); | 973 checkCalloutStatusRow(o[1]); |
977 } | 974 } |
978 | 975 |
979 core.int buildCounterListBidResponseErrorsResponse = 0; | 976 core.int buildCounterListBidResponseErrorsResponse = 0; |
980 buildListBidResponseErrorsResponse() { | 977 buildListBidResponseErrorsResponse() { |
981 var o = new api.ListBidResponseErrorsResponse(); | 978 var o = new api.ListBidResponseErrorsResponse(); |
982 buildCounterListBidResponseErrorsResponse++; | 979 buildCounterListBidResponseErrorsResponse++; |
983 if (buildCounterListBidResponseErrorsResponse < 3) { | 980 if (buildCounterListBidResponseErrorsResponse < 3) { |
984 o.calloutStatusRows = buildUnnamed3585(); | 981 o.calloutStatusRows = buildUnnamed3593(); |
985 o.nextPageToken = "foo"; | 982 o.nextPageToken = "foo"; |
986 } | 983 } |
987 buildCounterListBidResponseErrorsResponse--; | 984 buildCounterListBidResponseErrorsResponse--; |
988 return o; | 985 return o; |
989 } | 986 } |
990 | 987 |
991 checkListBidResponseErrorsResponse(api.ListBidResponseErrorsResponse o) { | 988 checkListBidResponseErrorsResponse(api.ListBidResponseErrorsResponse o) { |
992 buildCounterListBidResponseErrorsResponse++; | 989 buildCounterListBidResponseErrorsResponse++; |
993 if (buildCounterListBidResponseErrorsResponse < 3) { | 990 if (buildCounterListBidResponseErrorsResponse < 3) { |
994 checkUnnamed3585(o.calloutStatusRows); | 991 checkUnnamed3593(o.calloutStatusRows); |
995 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 992 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
996 } | 993 } |
997 buildCounterListBidResponseErrorsResponse--; | 994 buildCounterListBidResponseErrorsResponse--; |
998 } | 995 } |
999 | 996 |
1000 buildUnnamed3586() { | 997 buildUnnamed3594() { |
1001 var o = new core.List<api.BidResponseWithoutBidsStatusRow>(); | 998 var o = new core.List<api.BidResponseWithoutBidsStatusRow>(); |
1002 o.add(buildBidResponseWithoutBidsStatusRow()); | 999 o.add(buildBidResponseWithoutBidsStatusRow()); |
1003 o.add(buildBidResponseWithoutBidsStatusRow()); | 1000 o.add(buildBidResponseWithoutBidsStatusRow()); |
1004 return o; | 1001 return o; |
1005 } | 1002 } |
1006 | 1003 |
1007 checkUnnamed3586(core.List<api.BidResponseWithoutBidsStatusRow> o) { | 1004 checkUnnamed3594(core.List<api.BidResponseWithoutBidsStatusRow> o) { |
1008 unittest.expect(o, unittest.hasLength(2)); | 1005 unittest.expect(o, unittest.hasLength(2)); |
1009 checkBidResponseWithoutBidsStatusRow(o[0]); | 1006 checkBidResponseWithoutBidsStatusRow(o[0]); |
1010 checkBidResponseWithoutBidsStatusRow(o[1]); | 1007 checkBidResponseWithoutBidsStatusRow(o[1]); |
1011 } | 1008 } |
1012 | 1009 |
1013 core.int buildCounterListBidResponsesWithoutBidsResponse = 0; | 1010 core.int buildCounterListBidResponsesWithoutBidsResponse = 0; |
1014 buildListBidResponsesWithoutBidsResponse() { | 1011 buildListBidResponsesWithoutBidsResponse() { |
1015 var o = new api.ListBidResponsesWithoutBidsResponse(); | 1012 var o = new api.ListBidResponsesWithoutBidsResponse(); |
1016 buildCounterListBidResponsesWithoutBidsResponse++; | 1013 buildCounterListBidResponsesWithoutBidsResponse++; |
1017 if (buildCounterListBidResponsesWithoutBidsResponse < 3) { | 1014 if (buildCounterListBidResponsesWithoutBidsResponse < 3) { |
1018 o.bidResponseWithoutBidsStatusRows = buildUnnamed3586(); | 1015 o.bidResponseWithoutBidsStatusRows = buildUnnamed3594(); |
1019 o.nextPageToken = "foo"; | 1016 o.nextPageToken = "foo"; |
1020 } | 1017 } |
1021 buildCounterListBidResponsesWithoutBidsResponse--; | 1018 buildCounterListBidResponsesWithoutBidsResponse--; |
1022 return o; | 1019 return o; |
1023 } | 1020 } |
1024 | 1021 |
1025 checkListBidResponsesWithoutBidsResponse(api.ListBidResponsesWithoutBidsResponse
o) { | 1022 checkListBidResponsesWithoutBidsResponse( |
| 1023 api.ListBidResponsesWithoutBidsResponse o) { |
1026 buildCounterListBidResponsesWithoutBidsResponse++; | 1024 buildCounterListBidResponsesWithoutBidsResponse++; |
1027 if (buildCounterListBidResponsesWithoutBidsResponse < 3) { | 1025 if (buildCounterListBidResponsesWithoutBidsResponse < 3) { |
1028 checkUnnamed3586(o.bidResponseWithoutBidsStatusRows); | 1026 checkUnnamed3594(o.bidResponseWithoutBidsStatusRows); |
1029 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 1027 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
1030 } | 1028 } |
1031 buildCounterListBidResponsesWithoutBidsResponse--; | 1029 buildCounterListBidResponsesWithoutBidsResponse--; |
1032 } | 1030 } |
1033 | 1031 |
1034 buildUnnamed3587() { | 1032 buildUnnamed3595() { |
1035 var o = new core.List<api.ClientUserInvitation>(); | 1033 var o = new core.List<api.ClientUserInvitation>(); |
1036 o.add(buildClientUserInvitation()); | 1034 o.add(buildClientUserInvitation()); |
1037 o.add(buildClientUserInvitation()); | 1035 o.add(buildClientUserInvitation()); |
1038 return o; | 1036 return o; |
1039 } | 1037 } |
1040 | 1038 |
1041 checkUnnamed3587(core.List<api.ClientUserInvitation> o) { | 1039 checkUnnamed3595(core.List<api.ClientUserInvitation> o) { |
1042 unittest.expect(o, unittest.hasLength(2)); | 1040 unittest.expect(o, unittest.hasLength(2)); |
1043 checkClientUserInvitation(o[0]); | 1041 checkClientUserInvitation(o[0]); |
1044 checkClientUserInvitation(o[1]); | 1042 checkClientUserInvitation(o[1]); |
1045 } | 1043 } |
1046 | 1044 |
1047 core.int buildCounterListClientUserInvitationsResponse = 0; | 1045 core.int buildCounterListClientUserInvitationsResponse = 0; |
1048 buildListClientUserInvitationsResponse() { | 1046 buildListClientUserInvitationsResponse() { |
1049 var o = new api.ListClientUserInvitationsResponse(); | 1047 var o = new api.ListClientUserInvitationsResponse(); |
1050 buildCounterListClientUserInvitationsResponse++; | 1048 buildCounterListClientUserInvitationsResponse++; |
1051 if (buildCounterListClientUserInvitationsResponse < 3) { | 1049 if (buildCounterListClientUserInvitationsResponse < 3) { |
1052 o.invitations = buildUnnamed3587(); | 1050 o.invitations = buildUnnamed3595(); |
1053 o.nextPageToken = "foo"; | 1051 o.nextPageToken = "foo"; |
1054 } | 1052 } |
1055 buildCounterListClientUserInvitationsResponse--; | 1053 buildCounterListClientUserInvitationsResponse--; |
1056 return o; | 1054 return o; |
1057 } | 1055 } |
1058 | 1056 |
1059 checkListClientUserInvitationsResponse(api.ListClientUserInvitationsResponse o)
{ | 1057 checkListClientUserInvitationsResponse( |
| 1058 api.ListClientUserInvitationsResponse o) { |
1060 buildCounterListClientUserInvitationsResponse++; | 1059 buildCounterListClientUserInvitationsResponse++; |
1061 if (buildCounterListClientUserInvitationsResponse < 3) { | 1060 if (buildCounterListClientUserInvitationsResponse < 3) { |
1062 checkUnnamed3587(o.invitations); | 1061 checkUnnamed3595(o.invitations); |
1063 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 1062 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
1064 } | 1063 } |
1065 buildCounterListClientUserInvitationsResponse--; | 1064 buildCounterListClientUserInvitationsResponse--; |
1066 } | 1065 } |
1067 | 1066 |
1068 buildUnnamed3588() { | 1067 buildUnnamed3596() { |
1069 var o = new core.List<api.ClientUser>(); | 1068 var o = new core.List<api.ClientUser>(); |
1070 o.add(buildClientUser()); | 1069 o.add(buildClientUser()); |
1071 o.add(buildClientUser()); | 1070 o.add(buildClientUser()); |
1072 return o; | 1071 return o; |
1073 } | 1072 } |
1074 | 1073 |
1075 checkUnnamed3588(core.List<api.ClientUser> o) { | 1074 checkUnnamed3596(core.List<api.ClientUser> o) { |
1076 unittest.expect(o, unittest.hasLength(2)); | 1075 unittest.expect(o, unittest.hasLength(2)); |
1077 checkClientUser(o[0]); | 1076 checkClientUser(o[0]); |
1078 checkClientUser(o[1]); | 1077 checkClientUser(o[1]); |
1079 } | 1078 } |
1080 | 1079 |
1081 core.int buildCounterListClientUsersResponse = 0; | 1080 core.int buildCounterListClientUsersResponse = 0; |
1082 buildListClientUsersResponse() { | 1081 buildListClientUsersResponse() { |
1083 var o = new api.ListClientUsersResponse(); | 1082 var o = new api.ListClientUsersResponse(); |
1084 buildCounterListClientUsersResponse++; | 1083 buildCounterListClientUsersResponse++; |
1085 if (buildCounterListClientUsersResponse < 3) { | 1084 if (buildCounterListClientUsersResponse < 3) { |
1086 o.nextPageToken = "foo"; | 1085 o.nextPageToken = "foo"; |
1087 o.users = buildUnnamed3588(); | 1086 o.users = buildUnnamed3596(); |
1088 } | 1087 } |
1089 buildCounterListClientUsersResponse--; | 1088 buildCounterListClientUsersResponse--; |
1090 return o; | 1089 return o; |
1091 } | 1090 } |
1092 | 1091 |
1093 checkListClientUsersResponse(api.ListClientUsersResponse o) { | 1092 checkListClientUsersResponse(api.ListClientUsersResponse o) { |
1094 buildCounterListClientUsersResponse++; | 1093 buildCounterListClientUsersResponse++; |
1095 if (buildCounterListClientUsersResponse < 3) { | 1094 if (buildCounterListClientUsersResponse < 3) { |
1096 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 1095 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
1097 checkUnnamed3588(o.users); | 1096 checkUnnamed3596(o.users); |
1098 } | 1097 } |
1099 buildCounterListClientUsersResponse--; | 1098 buildCounterListClientUsersResponse--; |
1100 } | 1099 } |
1101 | 1100 |
1102 buildUnnamed3589() { | 1101 buildUnnamed3597() { |
1103 var o = new core.List<api.Client>(); | 1102 var o = new core.List<api.Client>(); |
1104 o.add(buildClient()); | 1103 o.add(buildClient()); |
1105 o.add(buildClient()); | 1104 o.add(buildClient()); |
1106 return o; | 1105 return o; |
1107 } | 1106 } |
1108 | 1107 |
1109 checkUnnamed3589(core.List<api.Client> o) { | 1108 checkUnnamed3597(core.List<api.Client> o) { |
1110 unittest.expect(o, unittest.hasLength(2)); | 1109 unittest.expect(o, unittest.hasLength(2)); |
1111 checkClient(o[0]); | 1110 checkClient(o[0]); |
1112 checkClient(o[1]); | 1111 checkClient(o[1]); |
1113 } | 1112 } |
1114 | 1113 |
1115 core.int buildCounterListClientsResponse = 0; | 1114 core.int buildCounterListClientsResponse = 0; |
1116 buildListClientsResponse() { | 1115 buildListClientsResponse() { |
1117 var o = new api.ListClientsResponse(); | 1116 var o = new api.ListClientsResponse(); |
1118 buildCounterListClientsResponse++; | 1117 buildCounterListClientsResponse++; |
1119 if (buildCounterListClientsResponse < 3) { | 1118 if (buildCounterListClientsResponse < 3) { |
1120 o.clients = buildUnnamed3589(); | 1119 o.clients = buildUnnamed3597(); |
1121 o.nextPageToken = "foo"; | 1120 o.nextPageToken = "foo"; |
1122 } | 1121 } |
1123 buildCounterListClientsResponse--; | 1122 buildCounterListClientsResponse--; |
1124 return o; | 1123 return o; |
1125 } | 1124 } |
1126 | 1125 |
1127 checkListClientsResponse(api.ListClientsResponse o) { | 1126 checkListClientsResponse(api.ListClientsResponse o) { |
1128 buildCounterListClientsResponse++; | 1127 buildCounterListClientsResponse++; |
1129 if (buildCounterListClientsResponse < 3) { | 1128 if (buildCounterListClientsResponse < 3) { |
1130 checkUnnamed3589(o.clients); | 1129 checkUnnamed3597(o.clients); |
1131 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 1130 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
1132 } | 1131 } |
1133 buildCounterListClientsResponse--; | 1132 buildCounterListClientsResponse--; |
1134 } | 1133 } |
1135 | 1134 |
1136 buildUnnamed3590() { | 1135 buildUnnamed3598() { |
1137 var o = new core.List<api.FilteredBidCreativeRow>(); | 1136 var o = new core.List<api.FilteredBidCreativeRow>(); |
1138 o.add(buildFilteredBidCreativeRow()); | 1137 o.add(buildFilteredBidCreativeRow()); |
1139 o.add(buildFilteredBidCreativeRow()); | 1138 o.add(buildFilteredBidCreativeRow()); |
1140 return o; | 1139 return o; |
1141 } | 1140 } |
1142 | 1141 |
1143 checkUnnamed3590(core.List<api.FilteredBidCreativeRow> o) { | 1142 checkUnnamed3598(core.List<api.FilteredBidCreativeRow> o) { |
1144 unittest.expect(o, unittest.hasLength(2)); | 1143 unittest.expect(o, unittest.hasLength(2)); |
1145 checkFilteredBidCreativeRow(o[0]); | 1144 checkFilteredBidCreativeRow(o[0]); |
1146 checkFilteredBidCreativeRow(o[1]); | 1145 checkFilteredBidCreativeRow(o[1]); |
1147 } | 1146 } |
1148 | 1147 |
1149 core.int buildCounterListCreativeStatusBreakdownByCreativeResponse = 0; | 1148 core.int buildCounterListCreativeStatusBreakdownByCreativeResponse = 0; |
1150 buildListCreativeStatusBreakdownByCreativeResponse() { | 1149 buildListCreativeStatusBreakdownByCreativeResponse() { |
1151 var o = new api.ListCreativeStatusBreakdownByCreativeResponse(); | 1150 var o = new api.ListCreativeStatusBreakdownByCreativeResponse(); |
1152 buildCounterListCreativeStatusBreakdownByCreativeResponse++; | 1151 buildCounterListCreativeStatusBreakdownByCreativeResponse++; |
1153 if (buildCounterListCreativeStatusBreakdownByCreativeResponse < 3) { | 1152 if (buildCounterListCreativeStatusBreakdownByCreativeResponse < 3) { |
1154 o.filteredBidCreativeRows = buildUnnamed3590(); | 1153 o.filteredBidCreativeRows = buildUnnamed3598(); |
1155 o.nextPageToken = "foo"; | 1154 o.nextPageToken = "foo"; |
1156 } | 1155 } |
1157 buildCounterListCreativeStatusBreakdownByCreativeResponse--; | 1156 buildCounterListCreativeStatusBreakdownByCreativeResponse--; |
1158 return o; | 1157 return o; |
1159 } | 1158 } |
1160 | 1159 |
1161 checkListCreativeStatusBreakdownByCreativeResponse(api.ListCreativeStatusBreakdo
wnByCreativeResponse o) { | 1160 checkListCreativeStatusBreakdownByCreativeResponse( |
| 1161 api.ListCreativeStatusBreakdownByCreativeResponse o) { |
1162 buildCounterListCreativeStatusBreakdownByCreativeResponse++; | 1162 buildCounterListCreativeStatusBreakdownByCreativeResponse++; |
1163 if (buildCounterListCreativeStatusBreakdownByCreativeResponse < 3) { | 1163 if (buildCounterListCreativeStatusBreakdownByCreativeResponse < 3) { |
1164 checkUnnamed3590(o.filteredBidCreativeRows); | 1164 checkUnnamed3598(o.filteredBidCreativeRows); |
1165 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 1165 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
1166 } | 1166 } |
1167 buildCounterListCreativeStatusBreakdownByCreativeResponse--; | 1167 buildCounterListCreativeStatusBreakdownByCreativeResponse--; |
1168 } | 1168 } |
1169 | 1169 |
1170 buildUnnamed3591() { | 1170 buildUnnamed3599() { |
1171 var o = new core.List<api.FilteredBidDetailRow>(); | 1171 var o = new core.List<api.FilteredBidDetailRow>(); |
1172 o.add(buildFilteredBidDetailRow()); | 1172 o.add(buildFilteredBidDetailRow()); |
1173 o.add(buildFilteredBidDetailRow()); | 1173 o.add(buildFilteredBidDetailRow()); |
1174 return o; | 1174 return o; |
1175 } | 1175 } |
1176 | 1176 |
1177 checkUnnamed3591(core.List<api.FilteredBidDetailRow> o) { | 1177 checkUnnamed3599(core.List<api.FilteredBidDetailRow> o) { |
1178 unittest.expect(o, unittest.hasLength(2)); | 1178 unittest.expect(o, unittest.hasLength(2)); |
1179 checkFilteredBidDetailRow(o[0]); | 1179 checkFilteredBidDetailRow(o[0]); |
1180 checkFilteredBidDetailRow(o[1]); | 1180 checkFilteredBidDetailRow(o[1]); |
1181 } | 1181 } |
1182 | 1182 |
1183 core.int buildCounterListCreativeStatusBreakdownByDetailResponse = 0; | 1183 core.int buildCounterListCreativeStatusBreakdownByDetailResponse = 0; |
1184 buildListCreativeStatusBreakdownByDetailResponse() { | 1184 buildListCreativeStatusBreakdownByDetailResponse() { |
1185 var o = new api.ListCreativeStatusBreakdownByDetailResponse(); | 1185 var o = new api.ListCreativeStatusBreakdownByDetailResponse(); |
1186 buildCounterListCreativeStatusBreakdownByDetailResponse++; | 1186 buildCounterListCreativeStatusBreakdownByDetailResponse++; |
1187 if (buildCounterListCreativeStatusBreakdownByDetailResponse < 3) { | 1187 if (buildCounterListCreativeStatusBreakdownByDetailResponse < 3) { |
1188 o.detailType = "foo"; | 1188 o.detailType = "foo"; |
1189 o.filteredBidDetailRows = buildUnnamed3591(); | 1189 o.filteredBidDetailRows = buildUnnamed3599(); |
1190 o.nextPageToken = "foo"; | 1190 o.nextPageToken = "foo"; |
1191 } | 1191 } |
1192 buildCounterListCreativeStatusBreakdownByDetailResponse--; | 1192 buildCounterListCreativeStatusBreakdownByDetailResponse--; |
1193 return o; | 1193 return o; |
1194 } | 1194 } |
1195 | 1195 |
1196 checkListCreativeStatusBreakdownByDetailResponse(api.ListCreativeStatusBreakdown
ByDetailResponse o) { | 1196 checkListCreativeStatusBreakdownByDetailResponse( |
| 1197 api.ListCreativeStatusBreakdownByDetailResponse o) { |
1197 buildCounterListCreativeStatusBreakdownByDetailResponse++; | 1198 buildCounterListCreativeStatusBreakdownByDetailResponse++; |
1198 if (buildCounterListCreativeStatusBreakdownByDetailResponse < 3) { | 1199 if (buildCounterListCreativeStatusBreakdownByDetailResponse < 3) { |
1199 unittest.expect(o.detailType, unittest.equals('foo')); | 1200 unittest.expect(o.detailType, unittest.equals('foo')); |
1200 checkUnnamed3591(o.filteredBidDetailRows); | 1201 checkUnnamed3599(o.filteredBidDetailRows); |
1201 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 1202 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
1202 } | 1203 } |
1203 buildCounterListCreativeStatusBreakdownByDetailResponse--; | 1204 buildCounterListCreativeStatusBreakdownByDetailResponse--; |
1204 } | 1205 } |
1205 | 1206 |
1206 buildUnnamed3592() { | 1207 buildUnnamed3600() { |
1207 var o = new core.List<api.Creative>(); | 1208 var o = new core.List<api.Creative>(); |
1208 o.add(buildCreative()); | 1209 o.add(buildCreative()); |
1209 o.add(buildCreative()); | 1210 o.add(buildCreative()); |
1210 return o; | 1211 return o; |
1211 } | 1212 } |
1212 | 1213 |
1213 checkUnnamed3592(core.List<api.Creative> o) { | 1214 checkUnnamed3600(core.List<api.Creative> o) { |
1214 unittest.expect(o, unittest.hasLength(2)); | 1215 unittest.expect(o, unittest.hasLength(2)); |
1215 checkCreative(o[0]); | 1216 checkCreative(o[0]); |
1216 checkCreative(o[1]); | 1217 checkCreative(o[1]); |
1217 } | 1218 } |
1218 | 1219 |
1219 core.int buildCounterListCreativesResponse = 0; | 1220 core.int buildCounterListCreativesResponse = 0; |
1220 buildListCreativesResponse() { | 1221 buildListCreativesResponse() { |
1221 var o = new api.ListCreativesResponse(); | 1222 var o = new api.ListCreativesResponse(); |
1222 buildCounterListCreativesResponse++; | 1223 buildCounterListCreativesResponse++; |
1223 if (buildCounterListCreativesResponse < 3) { | 1224 if (buildCounterListCreativesResponse < 3) { |
1224 o.creatives = buildUnnamed3592(); | 1225 o.creatives = buildUnnamed3600(); |
1225 o.nextPageToken = "foo"; | 1226 o.nextPageToken = "foo"; |
1226 } | 1227 } |
1227 buildCounterListCreativesResponse--; | 1228 buildCounterListCreativesResponse--; |
1228 return o; | 1229 return o; |
1229 } | 1230 } |
1230 | 1231 |
1231 checkListCreativesResponse(api.ListCreativesResponse o) { | 1232 checkListCreativesResponse(api.ListCreativesResponse o) { |
1232 buildCounterListCreativesResponse++; | 1233 buildCounterListCreativesResponse++; |
1233 if (buildCounterListCreativesResponse < 3) { | 1234 if (buildCounterListCreativesResponse < 3) { |
1234 checkUnnamed3592(o.creatives); | 1235 checkUnnamed3600(o.creatives); |
1235 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 1236 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
1236 } | 1237 } |
1237 buildCounterListCreativesResponse--; | 1238 buildCounterListCreativesResponse--; |
1238 } | 1239 } |
1239 | 1240 |
1240 buildUnnamed3593() { | 1241 buildUnnamed3601() { |
1241 var o = new core.List<api.CreativeDealAssociation>(); | 1242 var o = new core.List<api.CreativeDealAssociation>(); |
1242 o.add(buildCreativeDealAssociation()); | 1243 o.add(buildCreativeDealAssociation()); |
1243 o.add(buildCreativeDealAssociation()); | 1244 o.add(buildCreativeDealAssociation()); |
1244 return o; | 1245 return o; |
1245 } | 1246 } |
1246 | 1247 |
1247 checkUnnamed3593(core.List<api.CreativeDealAssociation> o) { | 1248 checkUnnamed3601(core.List<api.CreativeDealAssociation> o) { |
1248 unittest.expect(o, unittest.hasLength(2)); | 1249 unittest.expect(o, unittest.hasLength(2)); |
1249 checkCreativeDealAssociation(o[0]); | 1250 checkCreativeDealAssociation(o[0]); |
1250 checkCreativeDealAssociation(o[1]); | 1251 checkCreativeDealAssociation(o[1]); |
1251 } | 1252 } |
1252 | 1253 |
1253 core.int buildCounterListDealAssociationsResponse = 0; | 1254 core.int buildCounterListDealAssociationsResponse = 0; |
1254 buildListDealAssociationsResponse() { | 1255 buildListDealAssociationsResponse() { |
1255 var o = new api.ListDealAssociationsResponse(); | 1256 var o = new api.ListDealAssociationsResponse(); |
1256 buildCounterListDealAssociationsResponse++; | 1257 buildCounterListDealAssociationsResponse++; |
1257 if (buildCounterListDealAssociationsResponse < 3) { | 1258 if (buildCounterListDealAssociationsResponse < 3) { |
1258 o.associations = buildUnnamed3593(); | 1259 o.associations = buildUnnamed3601(); |
1259 o.nextPageToken = "foo"; | 1260 o.nextPageToken = "foo"; |
1260 } | 1261 } |
1261 buildCounterListDealAssociationsResponse--; | 1262 buildCounterListDealAssociationsResponse--; |
1262 return o; | 1263 return o; |
1263 } | 1264 } |
1264 | 1265 |
1265 checkListDealAssociationsResponse(api.ListDealAssociationsResponse o) { | 1266 checkListDealAssociationsResponse(api.ListDealAssociationsResponse o) { |
1266 buildCounterListDealAssociationsResponse++; | 1267 buildCounterListDealAssociationsResponse++; |
1267 if (buildCounterListDealAssociationsResponse < 3) { | 1268 if (buildCounterListDealAssociationsResponse < 3) { |
1268 checkUnnamed3593(o.associations); | 1269 checkUnnamed3601(o.associations); |
1269 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 1270 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
1270 } | 1271 } |
1271 buildCounterListDealAssociationsResponse--; | 1272 buildCounterListDealAssociationsResponse--; |
1272 } | 1273 } |
1273 | 1274 |
1274 buildUnnamed3594() { | 1275 buildUnnamed3602() { |
1275 var o = new core.List<api.FilterSet>(); | 1276 var o = new core.List<api.FilterSet>(); |
1276 o.add(buildFilterSet()); | 1277 o.add(buildFilterSet()); |
1277 o.add(buildFilterSet()); | 1278 o.add(buildFilterSet()); |
1278 return o; | 1279 return o; |
1279 } | 1280 } |
1280 | 1281 |
1281 checkUnnamed3594(core.List<api.FilterSet> o) { | 1282 checkUnnamed3602(core.List<api.FilterSet> o) { |
1282 unittest.expect(o, unittest.hasLength(2)); | 1283 unittest.expect(o, unittest.hasLength(2)); |
1283 checkFilterSet(o[0]); | 1284 checkFilterSet(o[0]); |
1284 checkFilterSet(o[1]); | 1285 checkFilterSet(o[1]); |
1285 } | 1286 } |
1286 | 1287 |
1287 core.int buildCounterListFilterSetsResponse = 0; | 1288 core.int buildCounterListFilterSetsResponse = 0; |
1288 buildListFilterSetsResponse() { | 1289 buildListFilterSetsResponse() { |
1289 var o = new api.ListFilterSetsResponse(); | 1290 var o = new api.ListFilterSetsResponse(); |
1290 buildCounterListFilterSetsResponse++; | 1291 buildCounterListFilterSetsResponse++; |
1291 if (buildCounterListFilterSetsResponse < 3) { | 1292 if (buildCounterListFilterSetsResponse < 3) { |
1292 o.filterSets = buildUnnamed3594(); | 1293 o.filterSets = buildUnnamed3602(); |
1293 o.nextPageToken = "foo"; | 1294 o.nextPageToken = "foo"; |
1294 } | 1295 } |
1295 buildCounterListFilterSetsResponse--; | 1296 buildCounterListFilterSetsResponse--; |
1296 return o; | 1297 return o; |
1297 } | 1298 } |
1298 | 1299 |
1299 checkListFilterSetsResponse(api.ListFilterSetsResponse o) { | 1300 checkListFilterSetsResponse(api.ListFilterSetsResponse o) { |
1300 buildCounterListFilterSetsResponse++; | 1301 buildCounterListFilterSetsResponse++; |
1301 if (buildCounterListFilterSetsResponse < 3) { | 1302 if (buildCounterListFilterSetsResponse < 3) { |
1302 checkUnnamed3594(o.filterSets); | 1303 checkUnnamed3602(o.filterSets); |
1303 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 1304 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
1304 } | 1305 } |
1305 buildCounterListFilterSetsResponse--; | 1306 buildCounterListFilterSetsResponse--; |
1306 } | 1307 } |
1307 | 1308 |
1308 buildUnnamed3595() { | 1309 buildUnnamed3603() { |
1309 var o = new core.List<api.CalloutStatusRow>(); | 1310 var o = new core.List<api.CalloutStatusRow>(); |
1310 o.add(buildCalloutStatusRow()); | 1311 o.add(buildCalloutStatusRow()); |
1311 o.add(buildCalloutStatusRow()); | 1312 o.add(buildCalloutStatusRow()); |
1312 return o; | 1313 return o; |
1313 } | 1314 } |
1314 | 1315 |
1315 checkUnnamed3595(core.List<api.CalloutStatusRow> o) { | 1316 checkUnnamed3603(core.List<api.CalloutStatusRow> o) { |
1316 unittest.expect(o, unittest.hasLength(2)); | 1317 unittest.expect(o, unittest.hasLength(2)); |
1317 checkCalloutStatusRow(o[0]); | 1318 checkCalloutStatusRow(o[0]); |
1318 checkCalloutStatusRow(o[1]); | 1319 checkCalloutStatusRow(o[1]); |
1319 } | 1320 } |
1320 | 1321 |
1321 core.int buildCounterListFilteredBidRequestsResponse = 0; | 1322 core.int buildCounterListFilteredBidRequestsResponse = 0; |
1322 buildListFilteredBidRequestsResponse() { | 1323 buildListFilteredBidRequestsResponse() { |
1323 var o = new api.ListFilteredBidRequestsResponse(); | 1324 var o = new api.ListFilteredBidRequestsResponse(); |
1324 buildCounterListFilteredBidRequestsResponse++; | 1325 buildCounterListFilteredBidRequestsResponse++; |
1325 if (buildCounterListFilteredBidRequestsResponse < 3) { | 1326 if (buildCounterListFilteredBidRequestsResponse < 3) { |
1326 o.calloutStatusRows = buildUnnamed3595(); | 1327 o.calloutStatusRows = buildUnnamed3603(); |
1327 o.nextPageToken = "foo"; | 1328 o.nextPageToken = "foo"; |
1328 } | 1329 } |
1329 buildCounterListFilteredBidRequestsResponse--; | 1330 buildCounterListFilteredBidRequestsResponse--; |
1330 return o; | 1331 return o; |
1331 } | 1332 } |
1332 | 1333 |
1333 checkListFilteredBidRequestsResponse(api.ListFilteredBidRequestsResponse o) { | 1334 checkListFilteredBidRequestsResponse(api.ListFilteredBidRequestsResponse o) { |
1334 buildCounterListFilteredBidRequestsResponse++; | 1335 buildCounterListFilteredBidRequestsResponse++; |
1335 if (buildCounterListFilteredBidRequestsResponse < 3) { | 1336 if (buildCounterListFilteredBidRequestsResponse < 3) { |
1336 checkUnnamed3595(o.calloutStatusRows); | 1337 checkUnnamed3603(o.calloutStatusRows); |
1337 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 1338 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
1338 } | 1339 } |
1339 buildCounterListFilteredBidRequestsResponse--; | 1340 buildCounterListFilteredBidRequestsResponse--; |
1340 } | 1341 } |
1341 | 1342 |
1342 buildUnnamed3596() { | 1343 buildUnnamed3604() { |
1343 var o = new core.List<api.CreativeStatusRow>(); | 1344 var o = new core.List<api.CreativeStatusRow>(); |
1344 o.add(buildCreativeStatusRow()); | 1345 o.add(buildCreativeStatusRow()); |
1345 o.add(buildCreativeStatusRow()); | 1346 o.add(buildCreativeStatusRow()); |
1346 return o; | 1347 return o; |
1347 } | 1348 } |
1348 | 1349 |
1349 checkUnnamed3596(core.List<api.CreativeStatusRow> o) { | 1350 checkUnnamed3604(core.List<api.CreativeStatusRow> o) { |
1350 unittest.expect(o, unittest.hasLength(2)); | 1351 unittest.expect(o, unittest.hasLength(2)); |
1351 checkCreativeStatusRow(o[0]); | 1352 checkCreativeStatusRow(o[0]); |
1352 checkCreativeStatusRow(o[1]); | 1353 checkCreativeStatusRow(o[1]); |
1353 } | 1354 } |
1354 | 1355 |
1355 core.int buildCounterListFilteredBidsResponse = 0; | 1356 core.int buildCounterListFilteredBidsResponse = 0; |
1356 buildListFilteredBidsResponse() { | 1357 buildListFilteredBidsResponse() { |
1357 var o = new api.ListFilteredBidsResponse(); | 1358 var o = new api.ListFilteredBidsResponse(); |
1358 buildCounterListFilteredBidsResponse++; | 1359 buildCounterListFilteredBidsResponse++; |
1359 if (buildCounterListFilteredBidsResponse < 3) { | 1360 if (buildCounterListFilteredBidsResponse < 3) { |
1360 o.creativeStatusRows = buildUnnamed3596(); | 1361 o.creativeStatusRows = buildUnnamed3604(); |
1361 o.nextPageToken = "foo"; | 1362 o.nextPageToken = "foo"; |
1362 } | 1363 } |
1363 buildCounterListFilteredBidsResponse--; | 1364 buildCounterListFilteredBidsResponse--; |
1364 return o; | 1365 return o; |
1365 } | 1366 } |
1366 | 1367 |
1367 checkListFilteredBidsResponse(api.ListFilteredBidsResponse o) { | 1368 checkListFilteredBidsResponse(api.ListFilteredBidsResponse o) { |
1368 buildCounterListFilteredBidsResponse++; | 1369 buildCounterListFilteredBidsResponse++; |
1369 if (buildCounterListFilteredBidsResponse < 3) { | 1370 if (buildCounterListFilteredBidsResponse < 3) { |
1370 checkUnnamed3596(o.creativeStatusRows); | 1371 checkUnnamed3604(o.creativeStatusRows); |
1371 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 1372 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
1372 } | 1373 } |
1373 buildCounterListFilteredBidsResponse--; | 1374 buildCounterListFilteredBidsResponse--; |
1374 } | 1375 } |
1375 | 1376 |
1376 buildUnnamed3597() { | 1377 buildUnnamed3605() { |
1377 var o = new core.List<api.ImpressionMetricsRow>(); | 1378 var o = new core.List<api.ImpressionMetricsRow>(); |
1378 o.add(buildImpressionMetricsRow()); | 1379 o.add(buildImpressionMetricsRow()); |
1379 o.add(buildImpressionMetricsRow()); | 1380 o.add(buildImpressionMetricsRow()); |
1380 return o; | 1381 return o; |
1381 } | 1382 } |
1382 | 1383 |
1383 checkUnnamed3597(core.List<api.ImpressionMetricsRow> o) { | 1384 checkUnnamed3605(core.List<api.ImpressionMetricsRow> o) { |
1384 unittest.expect(o, unittest.hasLength(2)); | 1385 unittest.expect(o, unittest.hasLength(2)); |
1385 checkImpressionMetricsRow(o[0]); | 1386 checkImpressionMetricsRow(o[0]); |
1386 checkImpressionMetricsRow(o[1]); | 1387 checkImpressionMetricsRow(o[1]); |
1387 } | 1388 } |
1388 | 1389 |
1389 core.int buildCounterListImpressionMetricsResponse = 0; | 1390 core.int buildCounterListImpressionMetricsResponse = 0; |
1390 buildListImpressionMetricsResponse() { | 1391 buildListImpressionMetricsResponse() { |
1391 var o = new api.ListImpressionMetricsResponse(); | 1392 var o = new api.ListImpressionMetricsResponse(); |
1392 buildCounterListImpressionMetricsResponse++; | 1393 buildCounterListImpressionMetricsResponse++; |
1393 if (buildCounterListImpressionMetricsResponse < 3) { | 1394 if (buildCounterListImpressionMetricsResponse < 3) { |
1394 o.impressionMetricsRows = buildUnnamed3597(); | 1395 o.impressionMetricsRows = buildUnnamed3605(); |
1395 o.nextPageToken = "foo"; | 1396 o.nextPageToken = "foo"; |
1396 } | 1397 } |
1397 buildCounterListImpressionMetricsResponse--; | 1398 buildCounterListImpressionMetricsResponse--; |
1398 return o; | 1399 return o; |
1399 } | 1400 } |
1400 | 1401 |
1401 checkListImpressionMetricsResponse(api.ListImpressionMetricsResponse o) { | 1402 checkListImpressionMetricsResponse(api.ListImpressionMetricsResponse o) { |
1402 buildCounterListImpressionMetricsResponse++; | 1403 buildCounterListImpressionMetricsResponse++; |
1403 if (buildCounterListImpressionMetricsResponse < 3) { | 1404 if (buildCounterListImpressionMetricsResponse < 3) { |
1404 checkUnnamed3597(o.impressionMetricsRows); | 1405 checkUnnamed3605(o.impressionMetricsRows); |
1405 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 1406 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
1406 } | 1407 } |
1407 buildCounterListImpressionMetricsResponse--; | 1408 buildCounterListImpressionMetricsResponse--; |
1408 } | 1409 } |
1409 | 1410 |
1410 buildUnnamed3598() { | 1411 buildUnnamed3606() { |
1411 var o = new core.List<api.CreativeStatusRow>(); | 1412 var o = new core.List<api.CreativeStatusRow>(); |
1412 o.add(buildCreativeStatusRow()); | 1413 o.add(buildCreativeStatusRow()); |
1413 o.add(buildCreativeStatusRow()); | 1414 o.add(buildCreativeStatusRow()); |
1414 return o; | 1415 return o; |
1415 } | 1416 } |
1416 | 1417 |
1417 checkUnnamed3598(core.List<api.CreativeStatusRow> o) { | 1418 checkUnnamed3606(core.List<api.CreativeStatusRow> o) { |
1418 unittest.expect(o, unittest.hasLength(2)); | 1419 unittest.expect(o, unittest.hasLength(2)); |
1419 checkCreativeStatusRow(o[0]); | 1420 checkCreativeStatusRow(o[0]); |
1420 checkCreativeStatusRow(o[1]); | 1421 checkCreativeStatusRow(o[1]); |
1421 } | 1422 } |
1422 | 1423 |
1423 core.int buildCounterListLosingBidsResponse = 0; | 1424 core.int buildCounterListLosingBidsResponse = 0; |
1424 buildListLosingBidsResponse() { | 1425 buildListLosingBidsResponse() { |
1425 var o = new api.ListLosingBidsResponse(); | 1426 var o = new api.ListLosingBidsResponse(); |
1426 buildCounterListLosingBidsResponse++; | 1427 buildCounterListLosingBidsResponse++; |
1427 if (buildCounterListLosingBidsResponse < 3) { | 1428 if (buildCounterListLosingBidsResponse < 3) { |
1428 o.creativeStatusRows = buildUnnamed3598(); | 1429 o.creativeStatusRows = buildUnnamed3606(); |
1429 o.nextPageToken = "foo"; | 1430 o.nextPageToken = "foo"; |
1430 } | 1431 } |
1431 buildCounterListLosingBidsResponse--; | 1432 buildCounterListLosingBidsResponse--; |
1432 return o; | 1433 return o; |
1433 } | 1434 } |
1434 | 1435 |
1435 checkListLosingBidsResponse(api.ListLosingBidsResponse o) { | 1436 checkListLosingBidsResponse(api.ListLosingBidsResponse o) { |
1436 buildCounterListLosingBidsResponse++; | 1437 buildCounterListLosingBidsResponse++; |
1437 if (buildCounterListLosingBidsResponse < 3) { | 1438 if (buildCounterListLosingBidsResponse < 3) { |
1438 checkUnnamed3598(o.creativeStatusRows); | 1439 checkUnnamed3606(o.creativeStatusRows); |
1439 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 1440 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
1440 } | 1441 } |
1441 buildCounterListLosingBidsResponse--; | 1442 buildCounterListLosingBidsResponse--; |
1442 } | 1443 } |
1443 | 1444 |
1444 buildUnnamed3599() { | 1445 buildUnnamed3607() { |
1445 var o = new core.List<api.NonBillableWinningBidStatusRow>(); | 1446 var o = new core.List<api.NonBillableWinningBidStatusRow>(); |
1446 o.add(buildNonBillableWinningBidStatusRow()); | 1447 o.add(buildNonBillableWinningBidStatusRow()); |
1447 o.add(buildNonBillableWinningBidStatusRow()); | 1448 o.add(buildNonBillableWinningBidStatusRow()); |
1448 return o; | 1449 return o; |
1449 } | 1450 } |
1450 | 1451 |
1451 checkUnnamed3599(core.List<api.NonBillableWinningBidStatusRow> o) { | 1452 checkUnnamed3607(core.List<api.NonBillableWinningBidStatusRow> o) { |
1452 unittest.expect(o, unittest.hasLength(2)); | 1453 unittest.expect(o, unittest.hasLength(2)); |
1453 checkNonBillableWinningBidStatusRow(o[0]); | 1454 checkNonBillableWinningBidStatusRow(o[0]); |
1454 checkNonBillableWinningBidStatusRow(o[1]); | 1455 checkNonBillableWinningBidStatusRow(o[1]); |
1455 } | 1456 } |
1456 | 1457 |
1457 core.int buildCounterListNonBillableWinningBidsResponse = 0; | 1458 core.int buildCounterListNonBillableWinningBidsResponse = 0; |
1458 buildListNonBillableWinningBidsResponse() { | 1459 buildListNonBillableWinningBidsResponse() { |
1459 var o = new api.ListNonBillableWinningBidsResponse(); | 1460 var o = new api.ListNonBillableWinningBidsResponse(); |
1460 buildCounterListNonBillableWinningBidsResponse++; | 1461 buildCounterListNonBillableWinningBidsResponse++; |
1461 if (buildCounterListNonBillableWinningBidsResponse < 3) { | 1462 if (buildCounterListNonBillableWinningBidsResponse < 3) { |
1462 o.nextPageToken = "foo"; | 1463 o.nextPageToken = "foo"; |
1463 o.nonBillableWinningBidStatusRows = buildUnnamed3599(); | 1464 o.nonBillableWinningBidStatusRows = buildUnnamed3607(); |
1464 } | 1465 } |
1465 buildCounterListNonBillableWinningBidsResponse--; | 1466 buildCounterListNonBillableWinningBidsResponse--; |
1466 return o; | 1467 return o; |
1467 } | 1468 } |
1468 | 1469 |
1469 checkListNonBillableWinningBidsResponse(api.ListNonBillableWinningBidsResponse o
) { | 1470 checkListNonBillableWinningBidsResponse( |
| 1471 api.ListNonBillableWinningBidsResponse o) { |
1470 buildCounterListNonBillableWinningBidsResponse++; | 1472 buildCounterListNonBillableWinningBidsResponse++; |
1471 if (buildCounterListNonBillableWinningBidsResponse < 3) { | 1473 if (buildCounterListNonBillableWinningBidsResponse < 3) { |
1472 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 1474 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
1473 checkUnnamed3599(o.nonBillableWinningBidStatusRows); | 1475 checkUnnamed3607(o.nonBillableWinningBidStatusRows); |
1474 } | 1476 } |
1475 buildCounterListNonBillableWinningBidsResponse--; | 1477 buildCounterListNonBillableWinningBidsResponse--; |
1476 } | 1478 } |
1477 | 1479 |
1478 buildUnnamed3600() { | 1480 buildUnnamed3608() { |
1479 var o = new core.List<core.int>(); | 1481 var o = new core.List<core.int>(); |
1480 o.add(42); | 1482 o.add(42); |
1481 o.add(42); | 1483 o.add(42); |
1482 return o; | 1484 return o; |
1483 } | 1485 } |
1484 | 1486 |
1485 checkUnnamed3600(core.List<core.int> o) { | 1487 checkUnnamed3608(core.List<core.int> o) { |
1486 unittest.expect(o, unittest.hasLength(2)); | 1488 unittest.expect(o, unittest.hasLength(2)); |
1487 unittest.expect(o[0], unittest.equals(42)); | 1489 unittest.expect(o[0], unittest.equals(42)); |
1488 unittest.expect(o[1], unittest.equals(42)); | 1490 unittest.expect(o[1], unittest.equals(42)); |
1489 } | 1491 } |
1490 | 1492 |
1491 core.int buildCounterLocationContext = 0; | 1493 core.int buildCounterLocationContext = 0; |
1492 buildLocationContext() { | 1494 buildLocationContext() { |
1493 var o = new api.LocationContext(); | 1495 var o = new api.LocationContext(); |
1494 buildCounterLocationContext++; | 1496 buildCounterLocationContext++; |
1495 if (buildCounterLocationContext < 3) { | 1497 if (buildCounterLocationContext < 3) { |
1496 o.geoCriteriaIds = buildUnnamed3600(); | 1498 o.geoCriteriaIds = buildUnnamed3608(); |
1497 } | 1499 } |
1498 buildCounterLocationContext--; | 1500 buildCounterLocationContext--; |
1499 return o; | 1501 return o; |
1500 } | 1502 } |
1501 | 1503 |
1502 checkLocationContext(api.LocationContext o) { | 1504 checkLocationContext(api.LocationContext o) { |
1503 buildCounterLocationContext++; | 1505 buildCounterLocationContext++; |
1504 if (buildCounterLocationContext < 3) { | 1506 if (buildCounterLocationContext < 3) { |
1505 checkUnnamed3600(o.geoCriteriaIds); | 1507 checkUnnamed3608(o.geoCriteriaIds); |
1506 } | 1508 } |
1507 buildCounterLocationContext--; | 1509 buildCounterLocationContext--; |
1508 } | 1510 } |
1509 | 1511 |
1510 core.int buildCounterMetricValue = 0; | 1512 core.int buildCounterMetricValue = 0; |
1511 buildMetricValue() { | 1513 buildMetricValue() { |
1512 var o = new api.MetricValue(); | 1514 var o = new api.MetricValue(); |
1513 buildCounterMetricValue++; | 1515 buildCounterMetricValue++; |
1514 if (buildCounterMetricValue < 3) { | 1516 if (buildCounterMetricValue < 3) { |
1515 o.value = "foo"; | 1517 o.value = "foo"; |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1587 checkNonBillableWinningBidStatusRow(api.NonBillableWinningBidStatusRow o) { | 1589 checkNonBillableWinningBidStatusRow(api.NonBillableWinningBidStatusRow o) { |
1588 buildCounterNonBillableWinningBidStatusRow++; | 1590 buildCounterNonBillableWinningBidStatusRow++; |
1589 if (buildCounterNonBillableWinningBidStatusRow < 3) { | 1591 if (buildCounterNonBillableWinningBidStatusRow < 3) { |
1590 checkMetricValue(o.bidCount); | 1592 checkMetricValue(o.bidCount); |
1591 checkRowDimensions(o.rowDimensions); | 1593 checkRowDimensions(o.rowDimensions); |
1592 unittest.expect(o.status, unittest.equals('foo')); | 1594 unittest.expect(o.status, unittest.equals('foo')); |
1593 } | 1595 } |
1594 buildCounterNonBillableWinningBidStatusRow--; | 1596 buildCounterNonBillableWinningBidStatusRow--; |
1595 } | 1597 } |
1596 | 1598 |
1597 buildUnnamed3601() { | 1599 buildUnnamed3609() { |
1598 var o = new core.List<core.String>(); | 1600 var o = new core.List<core.String>(); |
1599 o.add("foo"); | 1601 o.add("foo"); |
1600 o.add("foo"); | 1602 o.add("foo"); |
1601 return o; | 1603 return o; |
1602 } | 1604 } |
1603 | 1605 |
1604 checkUnnamed3601(core.List<core.String> o) { | 1606 checkUnnamed3609(core.List<core.String> o) { |
1605 unittest.expect(o, unittest.hasLength(2)); | 1607 unittest.expect(o, unittest.hasLength(2)); |
1606 unittest.expect(o[0], unittest.equals('foo')); | 1608 unittest.expect(o[0], unittest.equals('foo')); |
1607 unittest.expect(o[1], unittest.equals('foo')); | 1609 unittest.expect(o[1], unittest.equals('foo')); |
1608 } | 1610 } |
1609 | 1611 |
1610 core.int buildCounterPlatformContext = 0; | 1612 core.int buildCounterPlatformContext = 0; |
1611 buildPlatformContext() { | 1613 buildPlatformContext() { |
1612 var o = new api.PlatformContext(); | 1614 var o = new api.PlatformContext(); |
1613 buildCounterPlatformContext++; | 1615 buildCounterPlatformContext++; |
1614 if (buildCounterPlatformContext < 3) { | 1616 if (buildCounterPlatformContext < 3) { |
1615 o.platforms = buildUnnamed3601(); | 1617 o.platforms = buildUnnamed3609(); |
1616 } | 1618 } |
1617 buildCounterPlatformContext--; | 1619 buildCounterPlatformContext--; |
1618 return o; | 1620 return o; |
1619 } | 1621 } |
1620 | 1622 |
1621 checkPlatformContext(api.PlatformContext o) { | 1623 checkPlatformContext(api.PlatformContext o) { |
1622 buildCounterPlatformContext++; | 1624 buildCounterPlatformContext++; |
1623 if (buildCounterPlatformContext < 3) { | 1625 if (buildCounterPlatformContext < 3) { |
1624 checkUnnamed3601(o.platforms); | 1626 checkUnnamed3609(o.platforms); |
1625 } | 1627 } |
1626 buildCounterPlatformContext--; | 1628 buildCounterPlatformContext--; |
1627 } | 1629 } |
1628 | 1630 |
1629 core.int buildCounterRealtimeTimeRange = 0; | 1631 core.int buildCounterRealtimeTimeRange = 0; |
1630 buildRealtimeTimeRange() { | 1632 buildRealtimeTimeRange() { |
1631 var o = new api.RealtimeTimeRange(); | 1633 var o = new api.RealtimeTimeRange(); |
1632 buildCounterRealtimeTimeRange++; | 1634 buildCounterRealtimeTimeRange++; |
1633 if (buildCounterRealtimeTimeRange < 3) { | 1635 if (buildCounterRealtimeTimeRange < 3) { |
1634 o.startTimestamp = "foo"; | 1636 o.startTimestamp = "foo"; |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1718 } | 1720 } |
1719 | 1721 |
1720 checkRowDimensions(api.RowDimensions o) { | 1722 checkRowDimensions(api.RowDimensions o) { |
1721 buildCounterRowDimensions++; | 1723 buildCounterRowDimensions++; |
1722 if (buildCounterRowDimensions < 3) { | 1724 if (buildCounterRowDimensions < 3) { |
1723 checkTimeInterval(o.timeInterval); | 1725 checkTimeInterval(o.timeInterval); |
1724 } | 1726 } |
1725 buildCounterRowDimensions--; | 1727 buildCounterRowDimensions--; |
1726 } | 1728 } |
1727 | 1729 |
1728 buildUnnamed3602() { | 1730 buildUnnamed3610() { |
1729 var o = new core.List<core.String>(); | 1731 var o = new core.List<core.String>(); |
1730 o.add("foo"); | 1732 o.add("foo"); |
1731 o.add("foo"); | 1733 o.add("foo"); |
1732 return o; | 1734 return o; |
1733 } | 1735 } |
1734 | 1736 |
1735 checkUnnamed3602(core.List<core.String> o) { | 1737 checkUnnamed3610(core.List<core.String> o) { |
1736 unittest.expect(o, unittest.hasLength(2)); | 1738 unittest.expect(o, unittest.hasLength(2)); |
1737 unittest.expect(o[0], unittest.equals('foo')); | 1739 unittest.expect(o[0], unittest.equals('foo')); |
1738 unittest.expect(o[1], unittest.equals('foo')); | 1740 unittest.expect(o[1], unittest.equals('foo')); |
1739 } | 1741 } |
1740 | 1742 |
1741 core.int buildCounterSecurityContext = 0; | 1743 core.int buildCounterSecurityContext = 0; |
1742 buildSecurityContext() { | 1744 buildSecurityContext() { |
1743 var o = new api.SecurityContext(); | 1745 var o = new api.SecurityContext(); |
1744 buildCounterSecurityContext++; | 1746 buildCounterSecurityContext++; |
1745 if (buildCounterSecurityContext < 3) { | 1747 if (buildCounterSecurityContext < 3) { |
1746 o.securities = buildUnnamed3602(); | 1748 o.securities = buildUnnamed3610(); |
1747 } | 1749 } |
1748 buildCounterSecurityContext--; | 1750 buildCounterSecurityContext--; |
1749 return o; | 1751 return o; |
1750 } | 1752 } |
1751 | 1753 |
1752 checkSecurityContext(api.SecurityContext o) { | 1754 checkSecurityContext(api.SecurityContext o) { |
1753 buildCounterSecurityContext++; | 1755 buildCounterSecurityContext++; |
1754 if (buildCounterSecurityContext < 3) { | 1756 if (buildCounterSecurityContext < 3) { |
1755 checkUnnamed3602(o.securities); | 1757 checkUnnamed3610(o.securities); |
1756 } | 1758 } |
1757 buildCounterSecurityContext--; | 1759 buildCounterSecurityContext--; |
1758 } | 1760 } |
1759 | 1761 |
1760 core.int buildCounterServingContext = 0; | 1762 core.int buildCounterServingContext = 0; |
1761 buildServingContext() { | 1763 buildServingContext() { |
1762 var o = new api.ServingContext(); | 1764 var o = new api.ServingContext(); |
1763 buildCounterServingContext++; | 1765 buildCounterServingContext++; |
1764 if (buildCounterServingContext < 3) { | 1766 if (buildCounterServingContext < 3) { |
1765 o.all = "foo"; | 1767 o.all = "foo"; |
(...skipping 13 matching lines...) Expand all Loading... |
1779 unittest.expect(o.all, unittest.equals('foo')); | 1781 unittest.expect(o.all, unittest.equals('foo')); |
1780 checkAppContext(o.appType); | 1782 checkAppContext(o.appType); |
1781 checkAuctionContext(o.auctionType); | 1783 checkAuctionContext(o.auctionType); |
1782 checkLocationContext(o.location); | 1784 checkLocationContext(o.location); |
1783 checkPlatformContext(o.platform); | 1785 checkPlatformContext(o.platform); |
1784 checkSecurityContext(o.securityType); | 1786 checkSecurityContext(o.securityType); |
1785 } | 1787 } |
1786 buildCounterServingContext--; | 1788 buildCounterServingContext--; |
1787 } | 1789 } |
1788 | 1790 |
1789 buildUnnamed3603() { | 1791 buildUnnamed3611() { |
1790 var o = new core.List<api.ServingContext>(); | 1792 var o = new core.List<api.ServingContext>(); |
1791 o.add(buildServingContext()); | 1793 o.add(buildServingContext()); |
1792 o.add(buildServingContext()); | 1794 o.add(buildServingContext()); |
1793 return o; | 1795 return o; |
1794 } | 1796 } |
1795 | 1797 |
1796 checkUnnamed3603(core.List<api.ServingContext> o) { | 1798 checkUnnamed3611(core.List<api.ServingContext> o) { |
1797 unittest.expect(o, unittest.hasLength(2)); | 1799 unittest.expect(o, unittest.hasLength(2)); |
1798 checkServingContext(o[0]); | 1800 checkServingContext(o[0]); |
1799 checkServingContext(o[1]); | 1801 checkServingContext(o[1]); |
1800 } | 1802 } |
1801 | 1803 |
1802 buildUnnamed3604() { | 1804 buildUnnamed3612() { |
1803 var o = new core.List<api.Disapproval>(); | 1805 var o = new core.List<api.Disapproval>(); |
1804 o.add(buildDisapproval()); | 1806 o.add(buildDisapproval()); |
1805 o.add(buildDisapproval()); | 1807 o.add(buildDisapproval()); |
1806 return o; | 1808 return o; |
1807 } | 1809 } |
1808 | 1810 |
1809 checkUnnamed3604(core.List<api.Disapproval> o) { | 1811 checkUnnamed3612(core.List<api.Disapproval> o) { |
1810 unittest.expect(o, unittest.hasLength(2)); | 1812 unittest.expect(o, unittest.hasLength(2)); |
1811 checkDisapproval(o[0]); | 1813 checkDisapproval(o[0]); |
1812 checkDisapproval(o[1]); | 1814 checkDisapproval(o[1]); |
1813 } | 1815 } |
1814 | 1816 |
1815 core.int buildCounterServingRestriction = 0; | 1817 core.int buildCounterServingRestriction = 0; |
1816 buildServingRestriction() { | 1818 buildServingRestriction() { |
1817 var o = new api.ServingRestriction(); | 1819 var o = new api.ServingRestriction(); |
1818 buildCounterServingRestriction++; | 1820 buildCounterServingRestriction++; |
1819 if (buildCounterServingRestriction < 3) { | 1821 if (buildCounterServingRestriction < 3) { |
1820 o.contexts = buildUnnamed3603(); | 1822 o.contexts = buildUnnamed3611(); |
1821 o.disapprovalReasons = buildUnnamed3604(); | 1823 o.disapprovalReasons = buildUnnamed3612(); |
1822 o.status = "foo"; | 1824 o.status = "foo"; |
1823 } | 1825 } |
1824 buildCounterServingRestriction--; | 1826 buildCounterServingRestriction--; |
1825 return o; | 1827 return o; |
1826 } | 1828 } |
1827 | 1829 |
1828 checkServingRestriction(api.ServingRestriction o) { | 1830 checkServingRestriction(api.ServingRestriction o) { |
1829 buildCounterServingRestriction++; | 1831 buildCounterServingRestriction++; |
1830 if (buildCounterServingRestriction < 3) { | 1832 if (buildCounterServingRestriction < 3) { |
1831 checkUnnamed3603(o.contexts); | 1833 checkUnnamed3611(o.contexts); |
1832 checkUnnamed3604(o.disapprovalReasons); | 1834 checkUnnamed3612(o.disapprovalReasons); |
1833 unittest.expect(o.status, unittest.equals('foo')); | 1835 unittest.expect(o.status, unittest.equals('foo')); |
1834 } | 1836 } |
1835 buildCounterServingRestriction--; | 1837 buildCounterServingRestriction--; |
1836 } | 1838 } |
1837 | 1839 |
1838 core.int buildCounterStopWatchingCreativeRequest = 0; | 1840 core.int buildCounterStopWatchingCreativeRequest = 0; |
1839 buildStopWatchingCreativeRequest() { | 1841 buildStopWatchingCreativeRequest() { |
1840 var o = new api.StopWatchingCreativeRequest(); | 1842 var o = new api.StopWatchingCreativeRequest(); |
1841 buildCounterStopWatchingCreativeRequest++; | 1843 buildCounterStopWatchingCreativeRequest++; |
1842 if (buildCounterStopWatchingCreativeRequest < 3) { | 1844 if (buildCounterStopWatchingCreativeRequest < 3) {} |
1843 } | |
1844 buildCounterStopWatchingCreativeRequest--; | 1845 buildCounterStopWatchingCreativeRequest--; |
1845 return o; | 1846 return o; |
1846 } | 1847 } |
1847 | 1848 |
1848 checkStopWatchingCreativeRequest(api.StopWatchingCreativeRequest o) { | 1849 checkStopWatchingCreativeRequest(api.StopWatchingCreativeRequest o) { |
1849 buildCounterStopWatchingCreativeRequest++; | 1850 buildCounterStopWatchingCreativeRequest++; |
1850 if (buildCounterStopWatchingCreativeRequest < 3) { | 1851 if (buildCounterStopWatchingCreativeRequest < 3) {} |
1851 } | |
1852 buildCounterStopWatchingCreativeRequest--; | 1852 buildCounterStopWatchingCreativeRequest--; |
1853 } | 1853 } |
1854 | 1854 |
1855 core.int buildCounterTimeInterval = 0; | 1855 core.int buildCounterTimeInterval = 0; |
1856 buildTimeInterval() { | 1856 buildTimeInterval() { |
1857 var o = new api.TimeInterval(); | 1857 var o = new api.TimeInterval(); |
1858 buildCounterTimeInterval++; | 1858 buildCounterTimeInterval++; |
1859 if (buildCounterTimeInterval < 3) { | 1859 if (buildCounterTimeInterval < 3) { |
1860 o.endTime = "foo"; | 1860 o.endTime = "foo"; |
1861 o.startTime = "foo"; | 1861 o.startTime = "foo"; |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1904 } | 1904 } |
1905 | 1905 |
1906 checkWatchCreativeRequest(api.WatchCreativeRequest o) { | 1906 checkWatchCreativeRequest(api.WatchCreativeRequest o) { |
1907 buildCounterWatchCreativeRequest++; | 1907 buildCounterWatchCreativeRequest++; |
1908 if (buildCounterWatchCreativeRequest < 3) { | 1908 if (buildCounterWatchCreativeRequest < 3) { |
1909 unittest.expect(o.topic, unittest.equals('foo')); | 1909 unittest.expect(o.topic, unittest.equals('foo')); |
1910 } | 1910 } |
1911 buildCounterWatchCreativeRequest--; | 1911 buildCounterWatchCreativeRequest--; |
1912 } | 1912 } |
1913 | 1913 |
1914 | |
1915 main() { | 1914 main() { |
1916 unittest.group("obj-schema-AbsoluteDateRange", () { | 1915 unittest.group("obj-schema-AbsoluteDateRange", () { |
1917 unittest.test("to-json--from-json", () { | 1916 unittest.test("to-json--from-json", () { |
1918 var o = buildAbsoluteDateRange(); | 1917 var o = buildAbsoluteDateRange(); |
1919 var od = new api.AbsoluteDateRange.fromJson(o.toJson()); | 1918 var od = new api.AbsoluteDateRange.fromJson(o.toJson()); |
1920 checkAbsoluteDateRange(od); | 1919 checkAbsoluteDateRange(od); |
1921 }); | 1920 }); |
1922 }); | 1921 }); |
1923 | 1922 |
1924 | |
1925 unittest.group("obj-schema-AddDealAssociationRequest", () { | 1923 unittest.group("obj-schema-AddDealAssociationRequest", () { |
1926 unittest.test("to-json--from-json", () { | 1924 unittest.test("to-json--from-json", () { |
1927 var o = buildAddDealAssociationRequest(); | 1925 var o = buildAddDealAssociationRequest(); |
1928 var od = new api.AddDealAssociationRequest.fromJson(o.toJson()); | 1926 var od = new api.AddDealAssociationRequest.fromJson(o.toJson()); |
1929 checkAddDealAssociationRequest(od); | 1927 checkAddDealAssociationRequest(od); |
1930 }); | 1928 }); |
1931 }); | 1929 }); |
1932 | 1930 |
1933 | |
1934 unittest.group("obj-schema-AppContext", () { | 1931 unittest.group("obj-schema-AppContext", () { |
1935 unittest.test("to-json--from-json", () { | 1932 unittest.test("to-json--from-json", () { |
1936 var o = buildAppContext(); | 1933 var o = buildAppContext(); |
1937 var od = new api.AppContext.fromJson(o.toJson()); | 1934 var od = new api.AppContext.fromJson(o.toJson()); |
1938 checkAppContext(od); | 1935 checkAppContext(od); |
1939 }); | 1936 }); |
1940 }); | 1937 }); |
1941 | 1938 |
1942 | |
1943 unittest.group("obj-schema-AuctionContext", () { | 1939 unittest.group("obj-schema-AuctionContext", () { |
1944 unittest.test("to-json--from-json", () { | 1940 unittest.test("to-json--from-json", () { |
1945 var o = buildAuctionContext(); | 1941 var o = buildAuctionContext(); |
1946 var od = new api.AuctionContext.fromJson(o.toJson()); | 1942 var od = new api.AuctionContext.fromJson(o.toJson()); |
1947 checkAuctionContext(od); | 1943 checkAuctionContext(od); |
1948 }); | 1944 }); |
1949 }); | 1945 }); |
1950 | 1946 |
1951 | |
1952 unittest.group("obj-schema-BidMetricsRow", () { | 1947 unittest.group("obj-schema-BidMetricsRow", () { |
1953 unittest.test("to-json--from-json", () { | 1948 unittest.test("to-json--from-json", () { |
1954 var o = buildBidMetricsRow(); | 1949 var o = buildBidMetricsRow(); |
1955 var od = new api.BidMetricsRow.fromJson(o.toJson()); | 1950 var od = new api.BidMetricsRow.fromJson(o.toJson()); |
1956 checkBidMetricsRow(od); | 1951 checkBidMetricsRow(od); |
1957 }); | 1952 }); |
1958 }); | 1953 }); |
1959 | 1954 |
1960 | |
1961 unittest.group("obj-schema-BidResponseWithoutBidsStatusRow", () { | 1955 unittest.group("obj-schema-BidResponseWithoutBidsStatusRow", () { |
1962 unittest.test("to-json--from-json", () { | 1956 unittest.test("to-json--from-json", () { |
1963 var o = buildBidResponseWithoutBidsStatusRow(); | 1957 var o = buildBidResponseWithoutBidsStatusRow(); |
1964 var od = new api.BidResponseWithoutBidsStatusRow.fromJson(o.toJson()); | 1958 var od = new api.BidResponseWithoutBidsStatusRow.fromJson(o.toJson()); |
1965 checkBidResponseWithoutBidsStatusRow(od); | 1959 checkBidResponseWithoutBidsStatusRow(od); |
1966 }); | 1960 }); |
1967 }); | 1961 }); |
1968 | 1962 |
1969 | |
1970 unittest.group("obj-schema-CalloutStatusRow", () { | 1963 unittest.group("obj-schema-CalloutStatusRow", () { |
1971 unittest.test("to-json--from-json", () { | 1964 unittest.test("to-json--from-json", () { |
1972 var o = buildCalloutStatusRow(); | 1965 var o = buildCalloutStatusRow(); |
1973 var od = new api.CalloutStatusRow.fromJson(o.toJson()); | 1966 var od = new api.CalloutStatusRow.fromJson(o.toJson()); |
1974 checkCalloutStatusRow(od); | 1967 checkCalloutStatusRow(od); |
1975 }); | 1968 }); |
1976 }); | 1969 }); |
1977 | 1970 |
1978 | |
1979 unittest.group("obj-schema-Client", () { | 1971 unittest.group("obj-schema-Client", () { |
1980 unittest.test("to-json--from-json", () { | 1972 unittest.test("to-json--from-json", () { |
1981 var o = buildClient(); | 1973 var o = buildClient(); |
1982 var od = new api.Client.fromJson(o.toJson()); | 1974 var od = new api.Client.fromJson(o.toJson()); |
1983 checkClient(od); | 1975 checkClient(od); |
1984 }); | 1976 }); |
1985 }); | 1977 }); |
1986 | 1978 |
1987 | |
1988 unittest.group("obj-schema-ClientUser", () { | 1979 unittest.group("obj-schema-ClientUser", () { |
1989 unittest.test("to-json--from-json", () { | 1980 unittest.test("to-json--from-json", () { |
1990 var o = buildClientUser(); | 1981 var o = buildClientUser(); |
1991 var od = new api.ClientUser.fromJson(o.toJson()); | 1982 var od = new api.ClientUser.fromJson(o.toJson()); |
1992 checkClientUser(od); | 1983 checkClientUser(od); |
1993 }); | 1984 }); |
1994 }); | 1985 }); |
1995 | 1986 |
1996 | |
1997 unittest.group("obj-schema-ClientUserInvitation", () { | 1987 unittest.group("obj-schema-ClientUserInvitation", () { |
1998 unittest.test("to-json--from-json", () { | 1988 unittest.test("to-json--from-json", () { |
1999 var o = buildClientUserInvitation(); | 1989 var o = buildClientUserInvitation(); |
2000 var od = new api.ClientUserInvitation.fromJson(o.toJson()); | 1990 var od = new api.ClientUserInvitation.fromJson(o.toJson()); |
2001 checkClientUserInvitation(od); | 1991 checkClientUserInvitation(od); |
2002 }); | 1992 }); |
2003 }); | 1993 }); |
2004 | 1994 |
2005 | |
2006 unittest.group("obj-schema-Correction", () { | 1995 unittest.group("obj-schema-Correction", () { |
2007 unittest.test("to-json--from-json", () { | 1996 unittest.test("to-json--from-json", () { |
2008 var o = buildCorrection(); | 1997 var o = buildCorrection(); |
2009 var od = new api.Correction.fromJson(o.toJson()); | 1998 var od = new api.Correction.fromJson(o.toJson()); |
2010 checkCorrection(od); | 1999 checkCorrection(od); |
2011 }); | 2000 }); |
2012 }); | 2001 }); |
2013 | 2002 |
2014 | |
2015 unittest.group("obj-schema-Creative", () { | 2003 unittest.group("obj-schema-Creative", () { |
2016 unittest.test("to-json--from-json", () { | 2004 unittest.test("to-json--from-json", () { |
2017 var o = buildCreative(); | 2005 var o = buildCreative(); |
2018 var od = new api.Creative.fromJson(o.toJson()); | 2006 var od = new api.Creative.fromJson(o.toJson()); |
2019 checkCreative(od); | 2007 checkCreative(od); |
2020 }); | 2008 }); |
2021 }); | 2009 }); |
2022 | 2010 |
2023 | |
2024 unittest.group("obj-schema-CreativeDealAssociation", () { | 2011 unittest.group("obj-schema-CreativeDealAssociation", () { |
2025 unittest.test("to-json--from-json", () { | 2012 unittest.test("to-json--from-json", () { |
2026 var o = buildCreativeDealAssociation(); | 2013 var o = buildCreativeDealAssociation(); |
2027 var od = new api.CreativeDealAssociation.fromJson(o.toJson()); | 2014 var od = new api.CreativeDealAssociation.fromJson(o.toJson()); |
2028 checkCreativeDealAssociation(od); | 2015 checkCreativeDealAssociation(od); |
2029 }); | 2016 }); |
2030 }); | 2017 }); |
2031 | 2018 |
2032 | |
2033 unittest.group("obj-schema-CreativeStatusRow", () { | 2019 unittest.group("obj-schema-CreativeStatusRow", () { |
2034 unittest.test("to-json--from-json", () { | 2020 unittest.test("to-json--from-json", () { |
2035 var o = buildCreativeStatusRow(); | 2021 var o = buildCreativeStatusRow(); |
2036 var od = new api.CreativeStatusRow.fromJson(o.toJson()); | 2022 var od = new api.CreativeStatusRow.fromJson(o.toJson()); |
2037 checkCreativeStatusRow(od); | 2023 checkCreativeStatusRow(od); |
2038 }); | 2024 }); |
2039 }); | 2025 }); |
2040 | 2026 |
2041 | |
2042 unittest.group("obj-schema-Date", () { | 2027 unittest.group("obj-schema-Date", () { |
2043 unittest.test("to-json--from-json", () { | 2028 unittest.test("to-json--from-json", () { |
2044 var o = buildDate(); | 2029 var o = buildDate(); |
2045 var od = new api.Date.fromJson(o.toJson()); | 2030 var od = new api.Date.fromJson(o.toJson()); |
2046 checkDate(od); | 2031 checkDate(od); |
2047 }); | 2032 }); |
2048 }); | 2033 }); |
2049 | 2034 |
2050 | |
2051 unittest.group("obj-schema-Disapproval", () { | 2035 unittest.group("obj-schema-Disapproval", () { |
2052 unittest.test("to-json--from-json", () { | 2036 unittest.test("to-json--from-json", () { |
2053 var o = buildDisapproval(); | 2037 var o = buildDisapproval(); |
2054 var od = new api.Disapproval.fromJson(o.toJson()); | 2038 var od = new api.Disapproval.fromJson(o.toJson()); |
2055 checkDisapproval(od); | 2039 checkDisapproval(od); |
2056 }); | 2040 }); |
2057 }); | 2041 }); |
2058 | 2042 |
2059 | |
2060 unittest.group("obj-schema-Empty", () { | 2043 unittest.group("obj-schema-Empty", () { |
2061 unittest.test("to-json--from-json", () { | 2044 unittest.test("to-json--from-json", () { |
2062 var o = buildEmpty(); | 2045 var o = buildEmpty(); |
2063 var od = new api.Empty.fromJson(o.toJson()); | 2046 var od = new api.Empty.fromJson(o.toJson()); |
2064 checkEmpty(od); | 2047 checkEmpty(od); |
2065 }); | 2048 }); |
2066 }); | 2049 }); |
2067 | 2050 |
2068 | |
2069 unittest.group("obj-schema-FilterSet", () { | 2051 unittest.group("obj-schema-FilterSet", () { |
2070 unittest.test("to-json--from-json", () { | 2052 unittest.test("to-json--from-json", () { |
2071 var o = buildFilterSet(); | 2053 var o = buildFilterSet(); |
2072 var od = new api.FilterSet.fromJson(o.toJson()); | 2054 var od = new api.FilterSet.fromJson(o.toJson()); |
2073 checkFilterSet(od); | 2055 checkFilterSet(od); |
2074 }); | 2056 }); |
2075 }); | 2057 }); |
2076 | 2058 |
2077 | |
2078 unittest.group("obj-schema-FilteredBidCreativeRow", () { | 2059 unittest.group("obj-schema-FilteredBidCreativeRow", () { |
2079 unittest.test("to-json--from-json", () { | 2060 unittest.test("to-json--from-json", () { |
2080 var o = buildFilteredBidCreativeRow(); | 2061 var o = buildFilteredBidCreativeRow(); |
2081 var od = new api.FilteredBidCreativeRow.fromJson(o.toJson()); | 2062 var od = new api.FilteredBidCreativeRow.fromJson(o.toJson()); |
2082 checkFilteredBidCreativeRow(od); | 2063 checkFilteredBidCreativeRow(od); |
2083 }); | 2064 }); |
2084 }); | 2065 }); |
2085 | 2066 |
2086 | |
2087 unittest.group("obj-schema-FilteredBidDetailRow", () { | 2067 unittest.group("obj-schema-FilteredBidDetailRow", () { |
2088 unittest.test("to-json--from-json", () { | 2068 unittest.test("to-json--from-json", () { |
2089 var o = buildFilteredBidDetailRow(); | 2069 var o = buildFilteredBidDetailRow(); |
2090 var od = new api.FilteredBidDetailRow.fromJson(o.toJson()); | 2070 var od = new api.FilteredBidDetailRow.fromJson(o.toJson()); |
2091 checkFilteredBidDetailRow(od); | 2071 checkFilteredBidDetailRow(od); |
2092 }); | 2072 }); |
2093 }); | 2073 }); |
2094 | 2074 |
2095 | |
2096 unittest.group("obj-schema-FilteringStats", () { | 2075 unittest.group("obj-schema-FilteringStats", () { |
2097 unittest.test("to-json--from-json", () { | 2076 unittest.test("to-json--from-json", () { |
2098 var o = buildFilteringStats(); | 2077 var o = buildFilteringStats(); |
2099 var od = new api.FilteringStats.fromJson(o.toJson()); | 2078 var od = new api.FilteringStats.fromJson(o.toJson()); |
2100 checkFilteringStats(od); | 2079 checkFilteringStats(od); |
2101 }); | 2080 }); |
2102 }); | 2081 }); |
2103 | 2082 |
2104 | |
2105 unittest.group("obj-schema-HtmlContent", () { | 2083 unittest.group("obj-schema-HtmlContent", () { |
2106 unittest.test("to-json--from-json", () { | 2084 unittest.test("to-json--from-json", () { |
2107 var o = buildHtmlContent(); | 2085 var o = buildHtmlContent(); |
2108 var od = new api.HtmlContent.fromJson(o.toJson()); | 2086 var od = new api.HtmlContent.fromJson(o.toJson()); |
2109 checkHtmlContent(od); | 2087 checkHtmlContent(od); |
2110 }); | 2088 }); |
2111 }); | 2089 }); |
2112 | 2090 |
2113 | |
2114 unittest.group("obj-schema-Image", () { | 2091 unittest.group("obj-schema-Image", () { |
2115 unittest.test("to-json--from-json", () { | 2092 unittest.test("to-json--from-json", () { |
2116 var o = buildImage(); | 2093 var o = buildImage(); |
2117 var od = new api.Image.fromJson(o.toJson()); | 2094 var od = new api.Image.fromJson(o.toJson()); |
2118 checkImage(od); | 2095 checkImage(od); |
2119 }); | 2096 }); |
2120 }); | 2097 }); |
2121 | 2098 |
2122 | |
2123 unittest.group("obj-schema-ImpressionMetricsRow", () { | 2099 unittest.group("obj-schema-ImpressionMetricsRow", () { |
2124 unittest.test("to-json--from-json", () { | 2100 unittest.test("to-json--from-json", () { |
2125 var o = buildImpressionMetricsRow(); | 2101 var o = buildImpressionMetricsRow(); |
2126 var od = new api.ImpressionMetricsRow.fromJson(o.toJson()); | 2102 var od = new api.ImpressionMetricsRow.fromJson(o.toJson()); |
2127 checkImpressionMetricsRow(od); | 2103 checkImpressionMetricsRow(od); |
2128 }); | 2104 }); |
2129 }); | 2105 }); |
2130 | 2106 |
2131 | |
2132 unittest.group("obj-schema-ListBidMetricsResponse", () { | 2107 unittest.group("obj-schema-ListBidMetricsResponse", () { |
2133 unittest.test("to-json--from-json", () { | 2108 unittest.test("to-json--from-json", () { |
2134 var o = buildListBidMetricsResponse(); | 2109 var o = buildListBidMetricsResponse(); |
2135 var od = new api.ListBidMetricsResponse.fromJson(o.toJson()); | 2110 var od = new api.ListBidMetricsResponse.fromJson(o.toJson()); |
2136 checkListBidMetricsResponse(od); | 2111 checkListBidMetricsResponse(od); |
2137 }); | 2112 }); |
2138 }); | 2113 }); |
2139 | 2114 |
2140 | |
2141 unittest.group("obj-schema-ListBidResponseErrorsResponse", () { | 2115 unittest.group("obj-schema-ListBidResponseErrorsResponse", () { |
2142 unittest.test("to-json--from-json", () { | 2116 unittest.test("to-json--from-json", () { |
2143 var o = buildListBidResponseErrorsResponse(); | 2117 var o = buildListBidResponseErrorsResponse(); |
2144 var od = new api.ListBidResponseErrorsResponse.fromJson(o.toJson()); | 2118 var od = new api.ListBidResponseErrorsResponse.fromJson(o.toJson()); |
2145 checkListBidResponseErrorsResponse(od); | 2119 checkListBidResponseErrorsResponse(od); |
2146 }); | 2120 }); |
2147 }); | 2121 }); |
2148 | 2122 |
2149 | |
2150 unittest.group("obj-schema-ListBidResponsesWithoutBidsResponse", () { | 2123 unittest.group("obj-schema-ListBidResponsesWithoutBidsResponse", () { |
2151 unittest.test("to-json--from-json", () { | 2124 unittest.test("to-json--from-json", () { |
2152 var o = buildListBidResponsesWithoutBidsResponse(); | 2125 var o = buildListBidResponsesWithoutBidsResponse(); |
2153 var od = new api.ListBidResponsesWithoutBidsResponse.fromJson(o.toJson()); | 2126 var od = new api.ListBidResponsesWithoutBidsResponse.fromJson(o.toJson()); |
2154 checkListBidResponsesWithoutBidsResponse(od); | 2127 checkListBidResponsesWithoutBidsResponse(od); |
2155 }); | 2128 }); |
2156 }); | 2129 }); |
2157 | 2130 |
2158 | |
2159 unittest.group("obj-schema-ListClientUserInvitationsResponse", () { | 2131 unittest.group("obj-schema-ListClientUserInvitationsResponse", () { |
2160 unittest.test("to-json--from-json", () { | 2132 unittest.test("to-json--from-json", () { |
2161 var o = buildListClientUserInvitationsResponse(); | 2133 var o = buildListClientUserInvitationsResponse(); |
2162 var od = new api.ListClientUserInvitationsResponse.fromJson(o.toJson()); | 2134 var od = new api.ListClientUserInvitationsResponse.fromJson(o.toJson()); |
2163 checkListClientUserInvitationsResponse(od); | 2135 checkListClientUserInvitationsResponse(od); |
2164 }); | 2136 }); |
2165 }); | 2137 }); |
2166 | 2138 |
2167 | |
2168 unittest.group("obj-schema-ListClientUsersResponse", () { | 2139 unittest.group("obj-schema-ListClientUsersResponse", () { |
2169 unittest.test("to-json--from-json", () { | 2140 unittest.test("to-json--from-json", () { |
2170 var o = buildListClientUsersResponse(); | 2141 var o = buildListClientUsersResponse(); |
2171 var od = new api.ListClientUsersResponse.fromJson(o.toJson()); | 2142 var od = new api.ListClientUsersResponse.fromJson(o.toJson()); |
2172 checkListClientUsersResponse(od); | 2143 checkListClientUsersResponse(od); |
2173 }); | 2144 }); |
2174 }); | 2145 }); |
2175 | 2146 |
2176 | |
2177 unittest.group("obj-schema-ListClientsResponse", () { | 2147 unittest.group("obj-schema-ListClientsResponse", () { |
2178 unittest.test("to-json--from-json", () { | 2148 unittest.test("to-json--from-json", () { |
2179 var o = buildListClientsResponse(); | 2149 var o = buildListClientsResponse(); |
2180 var od = new api.ListClientsResponse.fromJson(o.toJson()); | 2150 var od = new api.ListClientsResponse.fromJson(o.toJson()); |
2181 checkListClientsResponse(od); | 2151 checkListClientsResponse(od); |
2182 }); | 2152 }); |
2183 }); | 2153 }); |
2184 | 2154 |
2185 | 2155 unittest.group("obj-schema-ListCreativeStatusBreakdownByCreativeResponse", |
2186 unittest.group("obj-schema-ListCreativeStatusBreakdownByCreativeResponse", ()
{ | 2156 () { |
2187 unittest.test("to-json--from-json", () { | 2157 unittest.test("to-json--from-json", () { |
2188 var o = buildListCreativeStatusBreakdownByCreativeResponse(); | 2158 var o = buildListCreativeStatusBreakdownByCreativeResponse(); |
2189 var od = new api.ListCreativeStatusBreakdownByCreativeResponse.fromJson(o.
toJson()); | 2159 var od = new api.ListCreativeStatusBreakdownByCreativeResponse.fromJson( |
| 2160 o.toJson()); |
2190 checkListCreativeStatusBreakdownByCreativeResponse(od); | 2161 checkListCreativeStatusBreakdownByCreativeResponse(od); |
2191 }); | 2162 }); |
2192 }); | 2163 }); |
2193 | 2164 |
2194 | |
2195 unittest.group("obj-schema-ListCreativeStatusBreakdownByDetailResponse", () { | 2165 unittest.group("obj-schema-ListCreativeStatusBreakdownByDetailResponse", () { |
2196 unittest.test("to-json--from-json", () { | 2166 unittest.test("to-json--from-json", () { |
2197 var o = buildListCreativeStatusBreakdownByDetailResponse(); | 2167 var o = buildListCreativeStatusBreakdownByDetailResponse(); |
2198 var od = new api.ListCreativeStatusBreakdownByDetailResponse.fromJson(o.to
Json()); | 2168 var od = new api.ListCreativeStatusBreakdownByDetailResponse.fromJson( |
| 2169 o.toJson()); |
2199 checkListCreativeStatusBreakdownByDetailResponse(od); | 2170 checkListCreativeStatusBreakdownByDetailResponse(od); |
2200 }); | 2171 }); |
2201 }); | 2172 }); |
2202 | 2173 |
2203 | |
2204 unittest.group("obj-schema-ListCreativesResponse", () { | 2174 unittest.group("obj-schema-ListCreativesResponse", () { |
2205 unittest.test("to-json--from-json", () { | 2175 unittest.test("to-json--from-json", () { |
2206 var o = buildListCreativesResponse(); | 2176 var o = buildListCreativesResponse(); |
2207 var od = new api.ListCreativesResponse.fromJson(o.toJson()); | 2177 var od = new api.ListCreativesResponse.fromJson(o.toJson()); |
2208 checkListCreativesResponse(od); | 2178 checkListCreativesResponse(od); |
2209 }); | 2179 }); |
2210 }); | 2180 }); |
2211 | 2181 |
2212 | |
2213 unittest.group("obj-schema-ListDealAssociationsResponse", () { | 2182 unittest.group("obj-schema-ListDealAssociationsResponse", () { |
2214 unittest.test("to-json--from-json", () { | 2183 unittest.test("to-json--from-json", () { |
2215 var o = buildListDealAssociationsResponse(); | 2184 var o = buildListDealAssociationsResponse(); |
2216 var od = new api.ListDealAssociationsResponse.fromJson(o.toJson()); | 2185 var od = new api.ListDealAssociationsResponse.fromJson(o.toJson()); |
2217 checkListDealAssociationsResponse(od); | 2186 checkListDealAssociationsResponse(od); |
2218 }); | 2187 }); |
2219 }); | 2188 }); |
2220 | 2189 |
2221 | |
2222 unittest.group("obj-schema-ListFilterSetsResponse", () { | 2190 unittest.group("obj-schema-ListFilterSetsResponse", () { |
2223 unittest.test("to-json--from-json", () { | 2191 unittest.test("to-json--from-json", () { |
2224 var o = buildListFilterSetsResponse(); | 2192 var o = buildListFilterSetsResponse(); |
2225 var od = new api.ListFilterSetsResponse.fromJson(o.toJson()); | 2193 var od = new api.ListFilterSetsResponse.fromJson(o.toJson()); |
2226 checkListFilterSetsResponse(od); | 2194 checkListFilterSetsResponse(od); |
2227 }); | 2195 }); |
2228 }); | 2196 }); |
2229 | 2197 |
2230 | |
2231 unittest.group("obj-schema-ListFilteredBidRequestsResponse", () { | 2198 unittest.group("obj-schema-ListFilteredBidRequestsResponse", () { |
2232 unittest.test("to-json--from-json", () { | 2199 unittest.test("to-json--from-json", () { |
2233 var o = buildListFilteredBidRequestsResponse(); | 2200 var o = buildListFilteredBidRequestsResponse(); |
2234 var od = new api.ListFilteredBidRequestsResponse.fromJson(o.toJson()); | 2201 var od = new api.ListFilteredBidRequestsResponse.fromJson(o.toJson()); |
2235 checkListFilteredBidRequestsResponse(od); | 2202 checkListFilteredBidRequestsResponse(od); |
2236 }); | 2203 }); |
2237 }); | 2204 }); |
2238 | 2205 |
2239 | |
2240 unittest.group("obj-schema-ListFilteredBidsResponse", () { | 2206 unittest.group("obj-schema-ListFilteredBidsResponse", () { |
2241 unittest.test("to-json--from-json", () { | 2207 unittest.test("to-json--from-json", () { |
2242 var o = buildListFilteredBidsResponse(); | 2208 var o = buildListFilteredBidsResponse(); |
2243 var od = new api.ListFilteredBidsResponse.fromJson(o.toJson()); | 2209 var od = new api.ListFilteredBidsResponse.fromJson(o.toJson()); |
2244 checkListFilteredBidsResponse(od); | 2210 checkListFilteredBidsResponse(od); |
2245 }); | 2211 }); |
2246 }); | 2212 }); |
2247 | 2213 |
2248 | |
2249 unittest.group("obj-schema-ListImpressionMetricsResponse", () { | 2214 unittest.group("obj-schema-ListImpressionMetricsResponse", () { |
2250 unittest.test("to-json--from-json", () { | 2215 unittest.test("to-json--from-json", () { |
2251 var o = buildListImpressionMetricsResponse(); | 2216 var o = buildListImpressionMetricsResponse(); |
2252 var od = new api.ListImpressionMetricsResponse.fromJson(o.toJson()); | 2217 var od = new api.ListImpressionMetricsResponse.fromJson(o.toJson()); |
2253 checkListImpressionMetricsResponse(od); | 2218 checkListImpressionMetricsResponse(od); |
2254 }); | 2219 }); |
2255 }); | 2220 }); |
2256 | 2221 |
2257 | |
2258 unittest.group("obj-schema-ListLosingBidsResponse", () { | 2222 unittest.group("obj-schema-ListLosingBidsResponse", () { |
2259 unittest.test("to-json--from-json", () { | 2223 unittest.test("to-json--from-json", () { |
2260 var o = buildListLosingBidsResponse(); | 2224 var o = buildListLosingBidsResponse(); |
2261 var od = new api.ListLosingBidsResponse.fromJson(o.toJson()); | 2225 var od = new api.ListLosingBidsResponse.fromJson(o.toJson()); |
2262 checkListLosingBidsResponse(od); | 2226 checkListLosingBidsResponse(od); |
2263 }); | 2227 }); |
2264 }); | 2228 }); |
2265 | 2229 |
2266 | |
2267 unittest.group("obj-schema-ListNonBillableWinningBidsResponse", () { | 2230 unittest.group("obj-schema-ListNonBillableWinningBidsResponse", () { |
2268 unittest.test("to-json--from-json", () { | 2231 unittest.test("to-json--from-json", () { |
2269 var o = buildListNonBillableWinningBidsResponse(); | 2232 var o = buildListNonBillableWinningBidsResponse(); |
2270 var od = new api.ListNonBillableWinningBidsResponse.fromJson(o.toJson()); | 2233 var od = new api.ListNonBillableWinningBidsResponse.fromJson(o.toJson()); |
2271 checkListNonBillableWinningBidsResponse(od); | 2234 checkListNonBillableWinningBidsResponse(od); |
2272 }); | 2235 }); |
2273 }); | 2236 }); |
2274 | 2237 |
2275 | |
2276 unittest.group("obj-schema-LocationContext", () { | 2238 unittest.group("obj-schema-LocationContext", () { |
2277 unittest.test("to-json--from-json", () { | 2239 unittest.test("to-json--from-json", () { |
2278 var o = buildLocationContext(); | 2240 var o = buildLocationContext(); |
2279 var od = new api.LocationContext.fromJson(o.toJson()); | 2241 var od = new api.LocationContext.fromJson(o.toJson()); |
2280 checkLocationContext(od); | 2242 checkLocationContext(od); |
2281 }); | 2243 }); |
2282 }); | 2244 }); |
2283 | 2245 |
2284 | |
2285 unittest.group("obj-schema-MetricValue", () { | 2246 unittest.group("obj-schema-MetricValue", () { |
2286 unittest.test("to-json--from-json", () { | 2247 unittest.test("to-json--from-json", () { |
2287 var o = buildMetricValue(); | 2248 var o = buildMetricValue(); |
2288 var od = new api.MetricValue.fromJson(o.toJson()); | 2249 var od = new api.MetricValue.fromJson(o.toJson()); |
2289 checkMetricValue(od); | 2250 checkMetricValue(od); |
2290 }); | 2251 }); |
2291 }); | 2252 }); |
2292 | 2253 |
2293 | |
2294 unittest.group("obj-schema-NativeContent", () { | 2254 unittest.group("obj-schema-NativeContent", () { |
2295 unittest.test("to-json--from-json", () { | 2255 unittest.test("to-json--from-json", () { |
2296 var o = buildNativeContent(); | 2256 var o = buildNativeContent(); |
2297 var od = new api.NativeContent.fromJson(o.toJson()); | 2257 var od = new api.NativeContent.fromJson(o.toJson()); |
2298 checkNativeContent(od); | 2258 checkNativeContent(od); |
2299 }); | 2259 }); |
2300 }); | 2260 }); |
2301 | 2261 |
2302 | |
2303 unittest.group("obj-schema-NonBillableWinningBidStatusRow", () { | 2262 unittest.group("obj-schema-NonBillableWinningBidStatusRow", () { |
2304 unittest.test("to-json--from-json", () { | 2263 unittest.test("to-json--from-json", () { |
2305 var o = buildNonBillableWinningBidStatusRow(); | 2264 var o = buildNonBillableWinningBidStatusRow(); |
2306 var od = new api.NonBillableWinningBidStatusRow.fromJson(o.toJson()); | 2265 var od = new api.NonBillableWinningBidStatusRow.fromJson(o.toJson()); |
2307 checkNonBillableWinningBidStatusRow(od); | 2266 checkNonBillableWinningBidStatusRow(od); |
2308 }); | 2267 }); |
2309 }); | 2268 }); |
2310 | 2269 |
2311 | |
2312 unittest.group("obj-schema-PlatformContext", () { | 2270 unittest.group("obj-schema-PlatformContext", () { |
2313 unittest.test("to-json--from-json", () { | 2271 unittest.test("to-json--from-json", () { |
2314 var o = buildPlatformContext(); | 2272 var o = buildPlatformContext(); |
2315 var od = new api.PlatformContext.fromJson(o.toJson()); | 2273 var od = new api.PlatformContext.fromJson(o.toJson()); |
2316 checkPlatformContext(od); | 2274 checkPlatformContext(od); |
2317 }); | 2275 }); |
2318 }); | 2276 }); |
2319 | 2277 |
2320 | |
2321 unittest.group("obj-schema-RealtimeTimeRange", () { | 2278 unittest.group("obj-schema-RealtimeTimeRange", () { |
2322 unittest.test("to-json--from-json", () { | 2279 unittest.test("to-json--from-json", () { |
2323 var o = buildRealtimeTimeRange(); | 2280 var o = buildRealtimeTimeRange(); |
2324 var od = new api.RealtimeTimeRange.fromJson(o.toJson()); | 2281 var od = new api.RealtimeTimeRange.fromJson(o.toJson()); |
2325 checkRealtimeTimeRange(od); | 2282 checkRealtimeTimeRange(od); |
2326 }); | 2283 }); |
2327 }); | 2284 }); |
2328 | 2285 |
2329 | |
2330 unittest.group("obj-schema-Reason", () { | 2286 unittest.group("obj-schema-Reason", () { |
2331 unittest.test("to-json--from-json", () { | 2287 unittest.test("to-json--from-json", () { |
2332 var o = buildReason(); | 2288 var o = buildReason(); |
2333 var od = new api.Reason.fromJson(o.toJson()); | 2289 var od = new api.Reason.fromJson(o.toJson()); |
2334 checkReason(od); | 2290 checkReason(od); |
2335 }); | 2291 }); |
2336 }); | 2292 }); |
2337 | 2293 |
2338 | |
2339 unittest.group("obj-schema-RelativeDateRange", () { | 2294 unittest.group("obj-schema-RelativeDateRange", () { |
2340 unittest.test("to-json--from-json", () { | 2295 unittest.test("to-json--from-json", () { |
2341 var o = buildRelativeDateRange(); | 2296 var o = buildRelativeDateRange(); |
2342 var od = new api.RelativeDateRange.fromJson(o.toJson()); | 2297 var od = new api.RelativeDateRange.fromJson(o.toJson()); |
2343 checkRelativeDateRange(od); | 2298 checkRelativeDateRange(od); |
2344 }); | 2299 }); |
2345 }); | 2300 }); |
2346 | 2301 |
2347 | |
2348 unittest.group("obj-schema-RemoveDealAssociationRequest", () { | 2302 unittest.group("obj-schema-RemoveDealAssociationRequest", () { |
2349 unittest.test("to-json--from-json", () { | 2303 unittest.test("to-json--from-json", () { |
2350 var o = buildRemoveDealAssociationRequest(); | 2304 var o = buildRemoveDealAssociationRequest(); |
2351 var od = new api.RemoveDealAssociationRequest.fromJson(o.toJson()); | 2305 var od = new api.RemoveDealAssociationRequest.fromJson(o.toJson()); |
2352 checkRemoveDealAssociationRequest(od); | 2306 checkRemoveDealAssociationRequest(od); |
2353 }); | 2307 }); |
2354 }); | 2308 }); |
2355 | 2309 |
2356 | |
2357 unittest.group("obj-schema-RowDimensions", () { | 2310 unittest.group("obj-schema-RowDimensions", () { |
2358 unittest.test("to-json--from-json", () { | 2311 unittest.test("to-json--from-json", () { |
2359 var o = buildRowDimensions(); | 2312 var o = buildRowDimensions(); |
2360 var od = new api.RowDimensions.fromJson(o.toJson()); | 2313 var od = new api.RowDimensions.fromJson(o.toJson()); |
2361 checkRowDimensions(od); | 2314 checkRowDimensions(od); |
2362 }); | 2315 }); |
2363 }); | 2316 }); |
2364 | 2317 |
2365 | |
2366 unittest.group("obj-schema-SecurityContext", () { | 2318 unittest.group("obj-schema-SecurityContext", () { |
2367 unittest.test("to-json--from-json", () { | 2319 unittest.test("to-json--from-json", () { |
2368 var o = buildSecurityContext(); | 2320 var o = buildSecurityContext(); |
2369 var od = new api.SecurityContext.fromJson(o.toJson()); | 2321 var od = new api.SecurityContext.fromJson(o.toJson()); |
2370 checkSecurityContext(od); | 2322 checkSecurityContext(od); |
2371 }); | 2323 }); |
2372 }); | 2324 }); |
2373 | 2325 |
2374 | |
2375 unittest.group("obj-schema-ServingContext", () { | 2326 unittest.group("obj-schema-ServingContext", () { |
2376 unittest.test("to-json--from-json", () { | 2327 unittest.test("to-json--from-json", () { |
2377 var o = buildServingContext(); | 2328 var o = buildServingContext(); |
2378 var od = new api.ServingContext.fromJson(o.toJson()); | 2329 var od = new api.ServingContext.fromJson(o.toJson()); |
2379 checkServingContext(od); | 2330 checkServingContext(od); |
2380 }); | 2331 }); |
2381 }); | 2332 }); |
2382 | 2333 |
2383 | |
2384 unittest.group("obj-schema-ServingRestriction", () { | 2334 unittest.group("obj-schema-ServingRestriction", () { |
2385 unittest.test("to-json--from-json", () { | 2335 unittest.test("to-json--from-json", () { |
2386 var o = buildServingRestriction(); | 2336 var o = buildServingRestriction(); |
2387 var od = new api.ServingRestriction.fromJson(o.toJson()); | 2337 var od = new api.ServingRestriction.fromJson(o.toJson()); |
2388 checkServingRestriction(od); | 2338 checkServingRestriction(od); |
2389 }); | 2339 }); |
2390 }); | 2340 }); |
2391 | 2341 |
2392 | |
2393 unittest.group("obj-schema-StopWatchingCreativeRequest", () { | 2342 unittest.group("obj-schema-StopWatchingCreativeRequest", () { |
2394 unittest.test("to-json--from-json", () { | 2343 unittest.test("to-json--from-json", () { |
2395 var o = buildStopWatchingCreativeRequest(); | 2344 var o = buildStopWatchingCreativeRequest(); |
2396 var od = new api.StopWatchingCreativeRequest.fromJson(o.toJson()); | 2345 var od = new api.StopWatchingCreativeRequest.fromJson(o.toJson()); |
2397 checkStopWatchingCreativeRequest(od); | 2346 checkStopWatchingCreativeRequest(od); |
2398 }); | 2347 }); |
2399 }); | 2348 }); |
2400 | 2349 |
2401 | |
2402 unittest.group("obj-schema-TimeInterval", () { | 2350 unittest.group("obj-schema-TimeInterval", () { |
2403 unittest.test("to-json--from-json", () { | 2351 unittest.test("to-json--from-json", () { |
2404 var o = buildTimeInterval(); | 2352 var o = buildTimeInterval(); |
2405 var od = new api.TimeInterval.fromJson(o.toJson()); | 2353 var od = new api.TimeInterval.fromJson(o.toJson()); |
2406 checkTimeInterval(od); | 2354 checkTimeInterval(od); |
2407 }); | 2355 }); |
2408 }); | 2356 }); |
2409 | 2357 |
2410 | |
2411 unittest.group("obj-schema-VideoContent", () { | 2358 unittest.group("obj-schema-VideoContent", () { |
2412 unittest.test("to-json--from-json", () { | 2359 unittest.test("to-json--from-json", () { |
2413 var o = buildVideoContent(); | 2360 var o = buildVideoContent(); |
2414 var od = new api.VideoContent.fromJson(o.toJson()); | 2361 var od = new api.VideoContent.fromJson(o.toJson()); |
2415 checkVideoContent(od); | 2362 checkVideoContent(od); |
2416 }); | 2363 }); |
2417 }); | 2364 }); |
2418 | 2365 |
2419 | |
2420 unittest.group("obj-schema-WatchCreativeRequest", () { | 2366 unittest.group("obj-schema-WatchCreativeRequest", () { |
2421 unittest.test("to-json--from-json", () { | 2367 unittest.test("to-json--from-json", () { |
2422 var o = buildWatchCreativeRequest(); | 2368 var o = buildWatchCreativeRequest(); |
2423 var od = new api.WatchCreativeRequest.fromJson(o.toJson()); | 2369 var od = new api.WatchCreativeRequest.fromJson(o.toJson()); |
2424 checkWatchCreativeRequest(od); | 2370 checkWatchCreativeRequest(od); |
2425 }); | 2371 }); |
2426 }); | 2372 }); |
2427 | 2373 |
2428 | |
2429 unittest.group("resource-AccountsClientsResourceApi", () { | 2374 unittest.group("resource-AccountsClientsResourceApi", () { |
2430 unittest.test("method--create", () { | 2375 unittest.test("method--create", () { |
2431 | |
2432 var mock = new HttpServerMock(); | 2376 var mock = new HttpServerMock(); |
2433 api.AccountsClientsResourceApi res = new api.Adexchangebuyer2Api(mock).acc
ounts.clients; | 2377 api.AccountsClientsResourceApi res = |
| 2378 new api.Adexchangebuyer2Api(mock).accounts.clients; |
2434 var arg_request = buildClient(); | 2379 var arg_request = buildClient(); |
2435 var arg_accountId = "foo"; | 2380 var arg_accountId = "foo"; |
2436 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 2381 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
2437 var obj = new api.Client.fromJson(json); | 2382 var obj = new api.Client.fromJson(json); |
2438 checkClient(obj); | 2383 checkClient(obj); |
2439 | 2384 |
2440 var path = (req.url).path; | 2385 var path = (req.url).path; |
2441 var pathOffset = 0; | 2386 var pathOffset = 0; |
2442 var index; | 2387 var index; |
2443 var subPart; | 2388 var subPart; |
2444 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2389 unittest.expect( |
| 2390 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
2445 pathOffset += 1; | 2391 pathOffset += 1; |
2446 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("v2beta1/accounts/")); | 2392 unittest.expect(path.substring(pathOffset, pathOffset + 17), |
| 2393 unittest.equals("v2beta1/accounts/")); |
2447 pathOffset += 17; | 2394 pathOffset += 17; |
2448 index = path.indexOf("/clients", pathOffset); | 2395 index = path.indexOf("/clients", pathOffset); |
2449 unittest.expect(index >= 0, unittest.isTrue); | 2396 unittest.expect(index >= 0, unittest.isTrue); |
2450 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 2397 subPart = |
| 2398 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
2451 pathOffset = index; | 2399 pathOffset = index; |
2452 unittest.expect(subPart, unittest.equals("$arg_accountId")); | 2400 unittest.expect(subPart, unittest.equals("$arg_accountId")); |
2453 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("/clients")); | 2401 unittest.expect(path.substring(pathOffset, pathOffset + 8), |
| 2402 unittest.equals("/clients")); |
2454 pathOffset += 8; | 2403 pathOffset += 8; |
2455 | 2404 |
2456 var query = (req.url).query; | 2405 var query = (req.url).query; |
2457 var queryOffset = 0; | 2406 var queryOffset = 0; |
2458 var queryMap = {}; | 2407 var queryMap = {}; |
2459 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 2408 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
2460 parseBool(n) { | 2409 parseBool(n) { |
2461 if (n == "true") return true; | 2410 if (n == "true") return true; |
2462 if (n == "false") return false; | 2411 if (n == "false") return false; |
2463 if (n == null) return null; | 2412 if (n == null) return null; |
2464 throw new core.ArgumentError("Invalid boolean: $n"); | 2413 throw new core.ArgumentError("Invalid boolean: $n"); |
2465 } | 2414 } |
| 2415 |
2466 if (query.length > 0) { | 2416 if (query.length > 0) { |
2467 for (var part in query.split("&")) { | 2417 for (var part in query.split("&")) { |
2468 var keyvalue = part.split("="); | 2418 var keyvalue = part.split("="); |
2469 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2419 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 2420 core.Uri.decodeQueryComponent(keyvalue[1])); |
2470 } | 2421 } |
2471 } | 2422 } |
2472 | 2423 |
2473 | |
2474 var h = { | 2424 var h = { |
2475 "content-type" : "application/json; charset=utf-8", | 2425 "content-type": "application/json; charset=utf-8", |
2476 }; | 2426 }; |
2477 var resp = convert.JSON.encode(buildClient()); | 2427 var resp = convert.JSON.encode(buildClient()); |
2478 return new async.Future.value(stringResponse(200, h, resp)); | 2428 return new async.Future.value(stringResponse(200, h, resp)); |
2479 }), true); | 2429 }), true); |
2480 res.create(arg_request, arg_accountId).then(unittest.expectAsync1(((api.Cl
ient response) { | 2430 res |
| 2431 .create(arg_request, arg_accountId) |
| 2432 .then(unittest.expectAsync1(((api.Client response) { |
2481 checkClient(response); | 2433 checkClient(response); |
2482 }))); | 2434 }))); |
2483 }); | 2435 }); |
2484 | 2436 |
2485 unittest.test("method--get", () { | 2437 unittest.test("method--get", () { |
2486 | |
2487 var mock = new HttpServerMock(); | 2438 var mock = new HttpServerMock(); |
2488 api.AccountsClientsResourceApi res = new api.Adexchangebuyer2Api(mock).acc
ounts.clients; | 2439 api.AccountsClientsResourceApi res = |
| 2440 new api.Adexchangebuyer2Api(mock).accounts.clients; |
2489 var arg_accountId = "foo"; | 2441 var arg_accountId = "foo"; |
2490 var arg_clientAccountId = "foo"; | 2442 var arg_clientAccountId = "foo"; |
2491 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 2443 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
2492 var path = (req.url).path; | 2444 var path = (req.url).path; |
2493 var pathOffset = 0; | 2445 var pathOffset = 0; |
2494 var index; | 2446 var index; |
2495 var subPart; | 2447 var subPart; |
2496 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2448 unittest.expect( |
| 2449 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
2497 pathOffset += 1; | 2450 pathOffset += 1; |
2498 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("v2beta1/accounts/")); | 2451 unittest.expect(path.substring(pathOffset, pathOffset + 17), |
| 2452 unittest.equals("v2beta1/accounts/")); |
2499 pathOffset += 17; | 2453 pathOffset += 17; |
2500 index = path.indexOf("/clients/", pathOffset); | 2454 index = path.indexOf("/clients/", pathOffset); |
2501 unittest.expect(index >= 0, unittest.isTrue); | 2455 unittest.expect(index >= 0, unittest.isTrue); |
2502 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 2456 subPart = |
| 2457 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
2503 pathOffset = index; | 2458 pathOffset = index; |
2504 unittest.expect(subPart, unittest.equals("$arg_accountId")); | 2459 unittest.expect(subPart, unittest.equals("$arg_accountId")); |
2505 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("/clients/")); | 2460 unittest.expect(path.substring(pathOffset, pathOffset + 9), |
| 2461 unittest.equals("/clients/")); |
2506 pathOffset += 9; | 2462 pathOffset += 9; |
2507 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | 2463 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
2508 pathOffset = path.length; | 2464 pathOffset = path.length; |
2509 unittest.expect(subPart, unittest.equals("$arg_clientAccountId")); | 2465 unittest.expect(subPart, unittest.equals("$arg_clientAccountId")); |
2510 | 2466 |
2511 var query = (req.url).query; | 2467 var query = (req.url).query; |
2512 var queryOffset = 0; | 2468 var queryOffset = 0; |
2513 var queryMap = {}; | 2469 var queryMap = {}; |
2514 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 2470 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
2515 parseBool(n) { | 2471 parseBool(n) { |
2516 if (n == "true") return true; | 2472 if (n == "true") return true; |
2517 if (n == "false") return false; | 2473 if (n == "false") return false; |
2518 if (n == null) return null; | 2474 if (n == null) return null; |
2519 throw new core.ArgumentError("Invalid boolean: $n"); | 2475 throw new core.ArgumentError("Invalid boolean: $n"); |
2520 } | 2476 } |
| 2477 |
2521 if (query.length > 0) { | 2478 if (query.length > 0) { |
2522 for (var part in query.split("&")) { | 2479 for (var part in query.split("&")) { |
2523 var keyvalue = part.split("="); | 2480 var keyvalue = part.split("="); |
2524 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2481 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 2482 core.Uri.decodeQueryComponent(keyvalue[1])); |
2525 } | 2483 } |
2526 } | 2484 } |
2527 | 2485 |
2528 | |
2529 var h = { | 2486 var h = { |
2530 "content-type" : "application/json; charset=utf-8", | 2487 "content-type": "application/json; charset=utf-8", |
2531 }; | 2488 }; |
2532 var resp = convert.JSON.encode(buildClient()); | 2489 var resp = convert.JSON.encode(buildClient()); |
2533 return new async.Future.value(stringResponse(200, h, resp)); | 2490 return new async.Future.value(stringResponse(200, h, resp)); |
2534 }), true); | 2491 }), true); |
2535 res.get(arg_accountId, arg_clientAccountId).then(unittest.expectAsync1(((a
pi.Client response) { | 2492 res |
| 2493 .get(arg_accountId, arg_clientAccountId) |
| 2494 .then(unittest.expectAsync1(((api.Client response) { |
2536 checkClient(response); | 2495 checkClient(response); |
2537 }))); | 2496 }))); |
2538 }); | 2497 }); |
2539 | 2498 |
2540 unittest.test("method--list", () { | 2499 unittest.test("method--list", () { |
2541 | |
2542 var mock = new HttpServerMock(); | 2500 var mock = new HttpServerMock(); |
2543 api.AccountsClientsResourceApi res = new api.Adexchangebuyer2Api(mock).acc
ounts.clients; | 2501 api.AccountsClientsResourceApi res = |
| 2502 new api.Adexchangebuyer2Api(mock).accounts.clients; |
2544 var arg_accountId = "foo"; | 2503 var arg_accountId = "foo"; |
| 2504 var arg_pageToken = "foo"; |
2545 var arg_pageSize = 42; | 2505 var arg_pageSize = 42; |
2546 var arg_pageToken = "foo"; | |
2547 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 2506 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
2548 var path = (req.url).path; | 2507 var path = (req.url).path; |
2549 var pathOffset = 0; | 2508 var pathOffset = 0; |
2550 var index; | 2509 var index; |
2551 var subPart; | 2510 var subPart; |
2552 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2511 unittest.expect( |
| 2512 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
2553 pathOffset += 1; | 2513 pathOffset += 1; |
2554 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("v2beta1/accounts/")); | 2514 unittest.expect(path.substring(pathOffset, pathOffset + 17), |
| 2515 unittest.equals("v2beta1/accounts/")); |
2555 pathOffset += 17; | 2516 pathOffset += 17; |
2556 index = path.indexOf("/clients", pathOffset); | 2517 index = path.indexOf("/clients", pathOffset); |
2557 unittest.expect(index >= 0, unittest.isTrue); | 2518 unittest.expect(index >= 0, unittest.isTrue); |
2558 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 2519 subPart = |
| 2520 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
2559 pathOffset = index; | 2521 pathOffset = index; |
2560 unittest.expect(subPart, unittest.equals("$arg_accountId")); | 2522 unittest.expect(subPart, unittest.equals("$arg_accountId")); |
2561 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("/clients")); | 2523 unittest.expect(path.substring(pathOffset, pathOffset + 8), |
| 2524 unittest.equals("/clients")); |
2562 pathOffset += 8; | 2525 pathOffset += 8; |
2563 | 2526 |
2564 var query = (req.url).query; | 2527 var query = (req.url).query; |
2565 var queryOffset = 0; | 2528 var queryOffset = 0; |
2566 var queryMap = {}; | 2529 var queryMap = {}; |
2567 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 2530 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
2568 parseBool(n) { | 2531 parseBool(n) { |
2569 if (n == "true") return true; | 2532 if (n == "true") return true; |
2570 if (n == "false") return false; | 2533 if (n == "false") return false; |
2571 if (n == null) return null; | 2534 if (n == null) return null; |
2572 throw new core.ArgumentError("Invalid boolean: $n"); | 2535 throw new core.ArgumentError("Invalid boolean: $n"); |
2573 } | 2536 } |
| 2537 |
2574 if (query.length > 0) { | 2538 if (query.length > 0) { |
2575 for (var part in query.split("&")) { | 2539 for (var part in query.split("&")) { |
2576 var keyvalue = part.split("="); | 2540 var keyvalue = part.split("="); |
2577 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2541 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 2542 core.Uri.decodeQueryComponent(keyvalue[1])); |
2578 } | 2543 } |
2579 } | 2544 } |
2580 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); | 2545 unittest.expect( |
2581 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 2546 queryMap["pageToken"].first, unittest.equals(arg_pageToken)); |
2582 | 2547 unittest.expect(core.int.parse(queryMap["pageSize"].first), |
| 2548 unittest.equals(arg_pageSize)); |
2583 | 2549 |
2584 var h = { | 2550 var h = { |
2585 "content-type" : "application/json; charset=utf-8", | 2551 "content-type": "application/json; charset=utf-8", |
2586 }; | 2552 }; |
2587 var resp = convert.JSON.encode(buildListClientsResponse()); | 2553 var resp = convert.JSON.encode(buildListClientsResponse()); |
2588 return new async.Future.value(stringResponse(200, h, resp)); | 2554 return new async.Future.value(stringResponse(200, h, resp)); |
2589 }), true); | 2555 }), true); |
2590 res.list(arg_accountId, pageSize: arg_pageSize, pageToken: arg_pageToken).
then(unittest.expectAsync1(((api.ListClientsResponse response) { | 2556 res |
| 2557 .list(arg_accountId, pageToken: arg_pageToken, pageSize: arg_pageSize) |
| 2558 .then(unittest.expectAsync1(((api.ListClientsResponse response) { |
2591 checkListClientsResponse(response); | 2559 checkListClientsResponse(response); |
2592 }))); | 2560 }))); |
2593 }); | 2561 }); |
2594 | 2562 |
2595 unittest.test("method--update", () { | 2563 unittest.test("method--update", () { |
2596 | |
2597 var mock = new HttpServerMock(); | 2564 var mock = new HttpServerMock(); |
2598 api.AccountsClientsResourceApi res = new api.Adexchangebuyer2Api(mock).acc
ounts.clients; | 2565 api.AccountsClientsResourceApi res = |
| 2566 new api.Adexchangebuyer2Api(mock).accounts.clients; |
2599 var arg_request = buildClient(); | 2567 var arg_request = buildClient(); |
2600 var arg_accountId = "foo"; | 2568 var arg_accountId = "foo"; |
2601 var arg_clientAccountId = "foo"; | 2569 var arg_clientAccountId = "foo"; |
2602 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 2570 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
2603 var obj = new api.Client.fromJson(json); | 2571 var obj = new api.Client.fromJson(json); |
2604 checkClient(obj); | 2572 checkClient(obj); |
2605 | 2573 |
2606 var path = (req.url).path; | 2574 var path = (req.url).path; |
2607 var pathOffset = 0; | 2575 var pathOffset = 0; |
2608 var index; | 2576 var index; |
2609 var subPart; | 2577 var subPart; |
2610 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2578 unittest.expect( |
| 2579 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
2611 pathOffset += 1; | 2580 pathOffset += 1; |
2612 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("v2beta1/accounts/")); | 2581 unittest.expect(path.substring(pathOffset, pathOffset + 17), |
| 2582 unittest.equals("v2beta1/accounts/")); |
2613 pathOffset += 17; | 2583 pathOffset += 17; |
2614 index = path.indexOf("/clients/", pathOffset); | 2584 index = path.indexOf("/clients/", pathOffset); |
2615 unittest.expect(index >= 0, unittest.isTrue); | 2585 unittest.expect(index >= 0, unittest.isTrue); |
2616 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 2586 subPart = |
| 2587 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
2617 pathOffset = index; | 2588 pathOffset = index; |
2618 unittest.expect(subPart, unittest.equals("$arg_accountId")); | 2589 unittest.expect(subPart, unittest.equals("$arg_accountId")); |
2619 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("/clients/")); | 2590 unittest.expect(path.substring(pathOffset, pathOffset + 9), |
| 2591 unittest.equals("/clients/")); |
2620 pathOffset += 9; | 2592 pathOffset += 9; |
2621 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | 2593 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
2622 pathOffset = path.length; | 2594 pathOffset = path.length; |
2623 unittest.expect(subPart, unittest.equals("$arg_clientAccountId")); | 2595 unittest.expect(subPart, unittest.equals("$arg_clientAccountId")); |
2624 | 2596 |
2625 var query = (req.url).query; | 2597 var query = (req.url).query; |
2626 var queryOffset = 0; | 2598 var queryOffset = 0; |
2627 var queryMap = {}; | 2599 var queryMap = {}; |
2628 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 2600 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
2629 parseBool(n) { | 2601 parseBool(n) { |
2630 if (n == "true") return true; | 2602 if (n == "true") return true; |
2631 if (n == "false") return false; | 2603 if (n == "false") return false; |
2632 if (n == null) return null; | 2604 if (n == null) return null; |
2633 throw new core.ArgumentError("Invalid boolean: $n"); | 2605 throw new core.ArgumentError("Invalid boolean: $n"); |
2634 } | 2606 } |
| 2607 |
2635 if (query.length > 0) { | 2608 if (query.length > 0) { |
2636 for (var part in query.split("&")) { | 2609 for (var part in query.split("&")) { |
2637 var keyvalue = part.split("="); | 2610 var keyvalue = part.split("="); |
2638 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2611 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 2612 core.Uri.decodeQueryComponent(keyvalue[1])); |
2639 } | 2613 } |
2640 } | 2614 } |
2641 | 2615 |
2642 | |
2643 var h = { | 2616 var h = { |
2644 "content-type" : "application/json; charset=utf-8", | 2617 "content-type": "application/json; charset=utf-8", |
2645 }; | 2618 }; |
2646 var resp = convert.JSON.encode(buildClient()); | 2619 var resp = convert.JSON.encode(buildClient()); |
2647 return new async.Future.value(stringResponse(200, h, resp)); | 2620 return new async.Future.value(stringResponse(200, h, resp)); |
2648 }), true); | 2621 }), true); |
2649 res.update(arg_request, arg_accountId, arg_clientAccountId).then(unittest.
expectAsync1(((api.Client response) { | 2622 res |
| 2623 .update(arg_request, arg_accountId, arg_clientAccountId) |
| 2624 .then(unittest.expectAsync1(((api.Client response) { |
2650 checkClient(response); | 2625 checkClient(response); |
2651 }))); | 2626 }))); |
2652 }); | 2627 }); |
2653 | |
2654 }); | 2628 }); |
2655 | 2629 |
2656 | |
2657 unittest.group("resource-AccountsClientsInvitationsResourceApi", () { | 2630 unittest.group("resource-AccountsClientsInvitationsResourceApi", () { |
2658 unittest.test("method--create", () { | 2631 unittest.test("method--create", () { |
2659 | |
2660 var mock = new HttpServerMock(); | 2632 var mock = new HttpServerMock(); |
2661 api.AccountsClientsInvitationsResourceApi res = new api.Adexchangebuyer2Ap
i(mock).accounts.clients.invitations; | 2633 api.AccountsClientsInvitationsResourceApi res = |
| 2634 new api.Adexchangebuyer2Api(mock).accounts.clients.invitations; |
2662 var arg_request = buildClientUserInvitation(); | 2635 var arg_request = buildClientUserInvitation(); |
2663 var arg_accountId = "foo"; | 2636 var arg_accountId = "foo"; |
2664 var arg_clientAccountId = "foo"; | 2637 var arg_clientAccountId = "foo"; |
2665 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 2638 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
2666 var obj = new api.ClientUserInvitation.fromJson(json); | 2639 var obj = new api.ClientUserInvitation.fromJson(json); |
2667 checkClientUserInvitation(obj); | 2640 checkClientUserInvitation(obj); |
2668 | 2641 |
2669 var path = (req.url).path; | 2642 var path = (req.url).path; |
2670 var pathOffset = 0; | 2643 var pathOffset = 0; |
2671 var index; | 2644 var index; |
2672 var subPart; | 2645 var subPart; |
2673 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2646 unittest.expect( |
| 2647 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
2674 pathOffset += 1; | 2648 pathOffset += 1; |
2675 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("v2beta1/accounts/")); | 2649 unittest.expect(path.substring(pathOffset, pathOffset + 17), |
| 2650 unittest.equals("v2beta1/accounts/")); |
2676 pathOffset += 17; | 2651 pathOffset += 17; |
2677 index = path.indexOf("/clients/", pathOffset); | 2652 index = path.indexOf("/clients/", pathOffset); |
2678 unittest.expect(index >= 0, unittest.isTrue); | 2653 unittest.expect(index >= 0, unittest.isTrue); |
2679 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 2654 subPart = |
| 2655 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
2680 pathOffset = index; | 2656 pathOffset = index; |
2681 unittest.expect(subPart, unittest.equals("$arg_accountId")); | 2657 unittest.expect(subPart, unittest.equals("$arg_accountId")); |
2682 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("/clients/")); | 2658 unittest.expect(path.substring(pathOffset, pathOffset + 9), |
| 2659 unittest.equals("/clients/")); |
2683 pathOffset += 9; | 2660 pathOffset += 9; |
2684 index = path.indexOf("/invitations", pathOffset); | 2661 index = path.indexOf("/invitations", pathOffset); |
2685 unittest.expect(index >= 0, unittest.isTrue); | 2662 unittest.expect(index >= 0, unittest.isTrue); |
2686 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 2663 subPart = |
| 2664 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
2687 pathOffset = index; | 2665 pathOffset = index; |
2688 unittest.expect(subPart, unittest.equals("$arg_clientAccountId")); | 2666 unittest.expect(subPart, unittest.equals("$arg_clientAccountId")); |
2689 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("/invitations")); | 2667 unittest.expect(path.substring(pathOffset, pathOffset + 12), |
| 2668 unittest.equals("/invitations")); |
2690 pathOffset += 12; | 2669 pathOffset += 12; |
2691 | 2670 |
2692 var query = (req.url).query; | 2671 var query = (req.url).query; |
2693 var queryOffset = 0; | 2672 var queryOffset = 0; |
2694 var queryMap = {}; | 2673 var queryMap = {}; |
2695 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 2674 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
2696 parseBool(n) { | 2675 parseBool(n) { |
2697 if (n == "true") return true; | 2676 if (n == "true") return true; |
2698 if (n == "false") return false; | 2677 if (n == "false") return false; |
2699 if (n == null) return null; | 2678 if (n == null) return null; |
2700 throw new core.ArgumentError("Invalid boolean: $n"); | 2679 throw new core.ArgumentError("Invalid boolean: $n"); |
2701 } | 2680 } |
| 2681 |
2702 if (query.length > 0) { | 2682 if (query.length > 0) { |
2703 for (var part in query.split("&")) { | 2683 for (var part in query.split("&")) { |
2704 var keyvalue = part.split("="); | 2684 var keyvalue = part.split("="); |
2705 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2685 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 2686 core.Uri.decodeQueryComponent(keyvalue[1])); |
2706 } | 2687 } |
2707 } | 2688 } |
2708 | 2689 |
2709 | |
2710 var h = { | 2690 var h = { |
2711 "content-type" : "application/json; charset=utf-8", | 2691 "content-type": "application/json; charset=utf-8", |
2712 }; | 2692 }; |
2713 var resp = convert.JSON.encode(buildClientUserInvitation()); | 2693 var resp = convert.JSON.encode(buildClientUserInvitation()); |
2714 return new async.Future.value(stringResponse(200, h, resp)); | 2694 return new async.Future.value(stringResponse(200, h, resp)); |
2715 }), true); | 2695 }), true); |
2716 res.create(arg_request, arg_accountId, arg_clientAccountId).then(unittest.
expectAsync1(((api.ClientUserInvitation response) { | 2696 res |
| 2697 .create(arg_request, arg_accountId, arg_clientAccountId) |
| 2698 .then(unittest.expectAsync1(((api.ClientUserInvitation response) { |
2717 checkClientUserInvitation(response); | 2699 checkClientUserInvitation(response); |
2718 }))); | 2700 }))); |
2719 }); | 2701 }); |
2720 | 2702 |
2721 unittest.test("method--get", () { | 2703 unittest.test("method--get", () { |
2722 | |
2723 var mock = new HttpServerMock(); | 2704 var mock = new HttpServerMock(); |
2724 api.AccountsClientsInvitationsResourceApi res = new api.Adexchangebuyer2Ap
i(mock).accounts.clients.invitations; | 2705 api.AccountsClientsInvitationsResourceApi res = |
| 2706 new api.Adexchangebuyer2Api(mock).accounts.clients.invitations; |
2725 var arg_accountId = "foo"; | 2707 var arg_accountId = "foo"; |
2726 var arg_clientAccountId = "foo"; | 2708 var arg_clientAccountId = "foo"; |
2727 var arg_invitationId = "foo"; | 2709 var arg_invitationId = "foo"; |
2728 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 2710 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
2729 var path = (req.url).path; | 2711 var path = (req.url).path; |
2730 var pathOffset = 0; | 2712 var pathOffset = 0; |
2731 var index; | 2713 var index; |
2732 var subPart; | 2714 var subPart; |
2733 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2715 unittest.expect( |
| 2716 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
2734 pathOffset += 1; | 2717 pathOffset += 1; |
2735 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("v2beta1/accounts/")); | 2718 unittest.expect(path.substring(pathOffset, pathOffset + 17), |
| 2719 unittest.equals("v2beta1/accounts/")); |
2736 pathOffset += 17; | 2720 pathOffset += 17; |
2737 index = path.indexOf("/clients/", pathOffset); | 2721 index = path.indexOf("/clients/", pathOffset); |
2738 unittest.expect(index >= 0, unittest.isTrue); | 2722 unittest.expect(index >= 0, unittest.isTrue); |
2739 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 2723 subPart = |
| 2724 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
2740 pathOffset = index; | 2725 pathOffset = index; |
2741 unittest.expect(subPart, unittest.equals("$arg_accountId")); | 2726 unittest.expect(subPart, unittest.equals("$arg_accountId")); |
2742 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("/clients/")); | 2727 unittest.expect(path.substring(pathOffset, pathOffset + 9), |
| 2728 unittest.equals("/clients/")); |
2743 pathOffset += 9; | 2729 pathOffset += 9; |
2744 index = path.indexOf("/invitations/", pathOffset); | 2730 index = path.indexOf("/invitations/", pathOffset); |
2745 unittest.expect(index >= 0, unittest.isTrue); | 2731 unittest.expect(index >= 0, unittest.isTrue); |
2746 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 2732 subPart = |
| 2733 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
2747 pathOffset = index; | 2734 pathOffset = index; |
2748 unittest.expect(subPart, unittest.equals("$arg_clientAccountId")); | 2735 unittest.expect(subPart, unittest.equals("$arg_clientAccountId")); |
2749 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("/invitations/")); | 2736 unittest.expect(path.substring(pathOffset, pathOffset + 13), |
| 2737 unittest.equals("/invitations/")); |
2750 pathOffset += 13; | 2738 pathOffset += 13; |
2751 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | 2739 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
2752 pathOffset = path.length; | 2740 pathOffset = path.length; |
2753 unittest.expect(subPart, unittest.equals("$arg_invitationId")); | 2741 unittest.expect(subPart, unittest.equals("$arg_invitationId")); |
2754 | 2742 |
2755 var query = (req.url).query; | 2743 var query = (req.url).query; |
2756 var queryOffset = 0; | 2744 var queryOffset = 0; |
2757 var queryMap = {}; | 2745 var queryMap = {}; |
2758 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 2746 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
2759 parseBool(n) { | 2747 parseBool(n) { |
2760 if (n == "true") return true; | 2748 if (n == "true") return true; |
2761 if (n == "false") return false; | 2749 if (n == "false") return false; |
2762 if (n == null) return null; | 2750 if (n == null) return null; |
2763 throw new core.ArgumentError("Invalid boolean: $n"); | 2751 throw new core.ArgumentError("Invalid boolean: $n"); |
2764 } | 2752 } |
| 2753 |
2765 if (query.length > 0) { | 2754 if (query.length > 0) { |
2766 for (var part in query.split("&")) { | 2755 for (var part in query.split("&")) { |
2767 var keyvalue = part.split("="); | 2756 var keyvalue = part.split("="); |
2768 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2757 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 2758 core.Uri.decodeQueryComponent(keyvalue[1])); |
2769 } | 2759 } |
2770 } | 2760 } |
2771 | 2761 |
2772 | |
2773 var h = { | 2762 var h = { |
2774 "content-type" : "application/json; charset=utf-8", | 2763 "content-type": "application/json; charset=utf-8", |
2775 }; | 2764 }; |
2776 var resp = convert.JSON.encode(buildClientUserInvitation()); | 2765 var resp = convert.JSON.encode(buildClientUserInvitation()); |
2777 return new async.Future.value(stringResponse(200, h, resp)); | 2766 return new async.Future.value(stringResponse(200, h, resp)); |
2778 }), true); | 2767 }), true); |
2779 res.get(arg_accountId, arg_clientAccountId, arg_invitationId).then(unittes
t.expectAsync1(((api.ClientUserInvitation response) { | 2768 res |
| 2769 .get(arg_accountId, arg_clientAccountId, arg_invitationId) |
| 2770 .then(unittest.expectAsync1(((api.ClientUserInvitation response) { |
2780 checkClientUserInvitation(response); | 2771 checkClientUserInvitation(response); |
2781 }))); | 2772 }))); |
2782 }); | 2773 }); |
2783 | 2774 |
2784 unittest.test("method--list", () { | 2775 unittest.test("method--list", () { |
2785 | |
2786 var mock = new HttpServerMock(); | 2776 var mock = new HttpServerMock(); |
2787 api.AccountsClientsInvitationsResourceApi res = new api.Adexchangebuyer2Ap
i(mock).accounts.clients.invitations; | 2777 api.AccountsClientsInvitationsResourceApi res = |
| 2778 new api.Adexchangebuyer2Api(mock).accounts.clients.invitations; |
2788 var arg_accountId = "foo"; | 2779 var arg_accountId = "foo"; |
2789 var arg_clientAccountId = "foo"; | 2780 var arg_clientAccountId = "foo"; |
2790 var arg_pageToken = "foo"; | 2781 var arg_pageToken = "foo"; |
2791 var arg_pageSize = 42; | 2782 var arg_pageSize = 42; |
2792 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 2783 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
2793 var path = (req.url).path; | 2784 var path = (req.url).path; |
2794 var pathOffset = 0; | 2785 var pathOffset = 0; |
2795 var index; | 2786 var index; |
2796 var subPart; | 2787 var subPart; |
2797 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2788 unittest.expect( |
| 2789 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
2798 pathOffset += 1; | 2790 pathOffset += 1; |
2799 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("v2beta1/accounts/")); | 2791 unittest.expect(path.substring(pathOffset, pathOffset + 17), |
| 2792 unittest.equals("v2beta1/accounts/")); |
2800 pathOffset += 17; | 2793 pathOffset += 17; |
2801 index = path.indexOf("/clients/", pathOffset); | 2794 index = path.indexOf("/clients/", pathOffset); |
2802 unittest.expect(index >= 0, unittest.isTrue); | 2795 unittest.expect(index >= 0, unittest.isTrue); |
2803 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 2796 subPart = |
| 2797 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
2804 pathOffset = index; | 2798 pathOffset = index; |
2805 unittest.expect(subPart, unittest.equals("$arg_accountId")); | 2799 unittest.expect(subPart, unittest.equals("$arg_accountId")); |
2806 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("/clients/")); | 2800 unittest.expect(path.substring(pathOffset, pathOffset + 9), |
| 2801 unittest.equals("/clients/")); |
2807 pathOffset += 9; | 2802 pathOffset += 9; |
2808 index = path.indexOf("/invitations", pathOffset); | 2803 index = path.indexOf("/invitations", pathOffset); |
2809 unittest.expect(index >= 0, unittest.isTrue); | 2804 unittest.expect(index >= 0, unittest.isTrue); |
2810 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 2805 subPart = |
| 2806 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
2811 pathOffset = index; | 2807 pathOffset = index; |
2812 unittest.expect(subPart, unittest.equals("$arg_clientAccountId")); | 2808 unittest.expect(subPart, unittest.equals("$arg_clientAccountId")); |
2813 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("/invitations")); | 2809 unittest.expect(path.substring(pathOffset, pathOffset + 12), |
| 2810 unittest.equals("/invitations")); |
2814 pathOffset += 12; | 2811 pathOffset += 12; |
2815 | 2812 |
2816 var query = (req.url).query; | 2813 var query = (req.url).query; |
2817 var queryOffset = 0; | 2814 var queryOffset = 0; |
2818 var queryMap = {}; | 2815 var queryMap = {}; |
2819 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 2816 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
2820 parseBool(n) { | 2817 parseBool(n) { |
2821 if (n == "true") return true; | 2818 if (n == "true") return true; |
2822 if (n == "false") return false; | 2819 if (n == "false") return false; |
2823 if (n == null) return null; | 2820 if (n == null) return null; |
2824 throw new core.ArgumentError("Invalid boolean: $n"); | 2821 throw new core.ArgumentError("Invalid boolean: $n"); |
2825 } | 2822 } |
| 2823 |
2826 if (query.length > 0) { | 2824 if (query.length > 0) { |
2827 for (var part in query.split("&")) { | 2825 for (var part in query.split("&")) { |
2828 var keyvalue = part.split("="); | 2826 var keyvalue = part.split("="); |
2829 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2827 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 2828 core.Uri.decodeQueryComponent(keyvalue[1])); |
2830 } | 2829 } |
2831 } | 2830 } |
2832 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 2831 unittest.expect( |
2833 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); | 2832 queryMap["pageToken"].first, unittest.equals(arg_pageToken)); |
2834 | 2833 unittest.expect(core.int.parse(queryMap["pageSize"].first), |
| 2834 unittest.equals(arg_pageSize)); |
2835 | 2835 |
2836 var h = { | 2836 var h = { |
2837 "content-type" : "application/json; charset=utf-8", | 2837 "content-type": "application/json; charset=utf-8", |
2838 }; | 2838 }; |
2839 var resp = convert.JSON.encode(buildListClientUserInvitationsResponse())
; | 2839 var resp = |
| 2840 convert.JSON.encode(buildListClientUserInvitationsResponse()); |
2840 return new async.Future.value(stringResponse(200, h, resp)); | 2841 return new async.Future.value(stringResponse(200, h, resp)); |
2841 }), true); | 2842 }), true); |
2842 res.list(arg_accountId, arg_clientAccountId, pageToken: arg_pageToken, pag
eSize: arg_pageSize).then(unittest.expectAsync1(((api.ListClientUserInvitationsR
esponse response) { | 2843 res |
| 2844 .list(arg_accountId, arg_clientAccountId, |
| 2845 pageToken: arg_pageToken, pageSize: arg_pageSize) |
| 2846 .then(unittest |
| 2847 .expectAsync1(((api.ListClientUserInvitationsResponse response) { |
2843 checkListClientUserInvitationsResponse(response); | 2848 checkListClientUserInvitationsResponse(response); |
2844 }))); | 2849 }))); |
2845 }); | 2850 }); |
2846 | |
2847 }); | 2851 }); |
2848 | 2852 |
2849 | |
2850 unittest.group("resource-AccountsClientsUsersResourceApi", () { | 2853 unittest.group("resource-AccountsClientsUsersResourceApi", () { |
2851 unittest.test("method--get", () { | 2854 unittest.test("method--get", () { |
2852 | |
2853 var mock = new HttpServerMock(); | 2855 var mock = new HttpServerMock(); |
2854 api.AccountsClientsUsersResourceApi res = new api.Adexchangebuyer2Api(mock
).accounts.clients.users; | 2856 api.AccountsClientsUsersResourceApi res = |
| 2857 new api.Adexchangebuyer2Api(mock).accounts.clients.users; |
2855 var arg_accountId = "foo"; | 2858 var arg_accountId = "foo"; |
2856 var arg_clientAccountId = "foo"; | 2859 var arg_clientAccountId = "foo"; |
2857 var arg_userId = "foo"; | 2860 var arg_userId = "foo"; |
2858 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 2861 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
2859 var path = (req.url).path; | 2862 var path = (req.url).path; |
2860 var pathOffset = 0; | 2863 var pathOffset = 0; |
2861 var index; | 2864 var index; |
2862 var subPart; | 2865 var subPart; |
2863 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2866 unittest.expect( |
| 2867 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
2864 pathOffset += 1; | 2868 pathOffset += 1; |
2865 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("v2beta1/accounts/")); | 2869 unittest.expect(path.substring(pathOffset, pathOffset + 17), |
| 2870 unittest.equals("v2beta1/accounts/")); |
2866 pathOffset += 17; | 2871 pathOffset += 17; |
2867 index = path.indexOf("/clients/", pathOffset); | 2872 index = path.indexOf("/clients/", pathOffset); |
2868 unittest.expect(index >= 0, unittest.isTrue); | 2873 unittest.expect(index >= 0, unittest.isTrue); |
2869 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 2874 subPart = |
| 2875 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
2870 pathOffset = index; | 2876 pathOffset = index; |
2871 unittest.expect(subPart, unittest.equals("$arg_accountId")); | 2877 unittest.expect(subPart, unittest.equals("$arg_accountId")); |
2872 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("/clients/")); | 2878 unittest.expect(path.substring(pathOffset, pathOffset + 9), |
| 2879 unittest.equals("/clients/")); |
2873 pathOffset += 9; | 2880 pathOffset += 9; |
2874 index = path.indexOf("/users/", pathOffset); | 2881 index = path.indexOf("/users/", pathOffset); |
2875 unittest.expect(index >= 0, unittest.isTrue); | 2882 unittest.expect(index >= 0, unittest.isTrue); |
2876 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 2883 subPart = |
| 2884 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
2877 pathOffset = index; | 2885 pathOffset = index; |
2878 unittest.expect(subPart, unittest.equals("$arg_clientAccountId")); | 2886 unittest.expect(subPart, unittest.equals("$arg_clientAccountId")); |
2879 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ
als("/users/")); | 2887 unittest.expect(path.substring(pathOffset, pathOffset + 7), |
| 2888 unittest.equals("/users/")); |
2880 pathOffset += 7; | 2889 pathOffset += 7; |
2881 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | 2890 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
2882 pathOffset = path.length; | 2891 pathOffset = path.length; |
2883 unittest.expect(subPart, unittest.equals("$arg_userId")); | 2892 unittest.expect(subPart, unittest.equals("$arg_userId")); |
2884 | 2893 |
2885 var query = (req.url).query; | 2894 var query = (req.url).query; |
2886 var queryOffset = 0; | 2895 var queryOffset = 0; |
2887 var queryMap = {}; | 2896 var queryMap = {}; |
2888 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 2897 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
2889 parseBool(n) { | 2898 parseBool(n) { |
2890 if (n == "true") return true; | 2899 if (n == "true") return true; |
2891 if (n == "false") return false; | 2900 if (n == "false") return false; |
2892 if (n == null) return null; | 2901 if (n == null) return null; |
2893 throw new core.ArgumentError("Invalid boolean: $n"); | 2902 throw new core.ArgumentError("Invalid boolean: $n"); |
2894 } | 2903 } |
| 2904 |
2895 if (query.length > 0) { | 2905 if (query.length > 0) { |
2896 for (var part in query.split("&")) { | 2906 for (var part in query.split("&")) { |
2897 var keyvalue = part.split("="); | 2907 var keyvalue = part.split("="); |
2898 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2908 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 2909 core.Uri.decodeQueryComponent(keyvalue[1])); |
2899 } | 2910 } |
2900 } | 2911 } |
2901 | 2912 |
2902 | |
2903 var h = { | 2913 var h = { |
2904 "content-type" : "application/json; charset=utf-8", | 2914 "content-type": "application/json; charset=utf-8", |
2905 }; | 2915 }; |
2906 var resp = convert.JSON.encode(buildClientUser()); | 2916 var resp = convert.JSON.encode(buildClientUser()); |
2907 return new async.Future.value(stringResponse(200, h, resp)); | 2917 return new async.Future.value(stringResponse(200, h, resp)); |
2908 }), true); | 2918 }), true); |
2909 res.get(arg_accountId, arg_clientAccountId, arg_userId).then(unittest.expe
ctAsync1(((api.ClientUser response) { | 2919 res |
| 2920 .get(arg_accountId, arg_clientAccountId, arg_userId) |
| 2921 .then(unittest.expectAsync1(((api.ClientUser response) { |
2910 checkClientUser(response); | 2922 checkClientUser(response); |
2911 }))); | 2923 }))); |
2912 }); | 2924 }); |
2913 | 2925 |
2914 unittest.test("method--list", () { | 2926 unittest.test("method--list", () { |
2915 | |
2916 var mock = new HttpServerMock(); | 2927 var mock = new HttpServerMock(); |
2917 api.AccountsClientsUsersResourceApi res = new api.Adexchangebuyer2Api(mock
).accounts.clients.users; | 2928 api.AccountsClientsUsersResourceApi res = |
| 2929 new api.Adexchangebuyer2Api(mock).accounts.clients.users; |
2918 var arg_accountId = "foo"; | 2930 var arg_accountId = "foo"; |
2919 var arg_clientAccountId = "foo"; | 2931 var arg_clientAccountId = "foo"; |
| 2932 var arg_pageToken = "foo"; |
2920 var arg_pageSize = 42; | 2933 var arg_pageSize = 42; |
2921 var arg_pageToken = "foo"; | |
2922 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 2934 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
2923 var path = (req.url).path; | 2935 var path = (req.url).path; |
2924 var pathOffset = 0; | 2936 var pathOffset = 0; |
2925 var index; | 2937 var index; |
2926 var subPart; | 2938 var subPart; |
2927 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2939 unittest.expect( |
| 2940 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
2928 pathOffset += 1; | 2941 pathOffset += 1; |
2929 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("v2beta1/accounts/")); | 2942 unittest.expect(path.substring(pathOffset, pathOffset + 17), |
| 2943 unittest.equals("v2beta1/accounts/")); |
2930 pathOffset += 17; | 2944 pathOffset += 17; |
2931 index = path.indexOf("/clients/", pathOffset); | 2945 index = path.indexOf("/clients/", pathOffset); |
2932 unittest.expect(index >= 0, unittest.isTrue); | 2946 unittest.expect(index >= 0, unittest.isTrue); |
2933 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 2947 subPart = |
| 2948 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
2934 pathOffset = index; | 2949 pathOffset = index; |
2935 unittest.expect(subPart, unittest.equals("$arg_accountId")); | 2950 unittest.expect(subPart, unittest.equals("$arg_accountId")); |
2936 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("/clients/")); | 2951 unittest.expect(path.substring(pathOffset, pathOffset + 9), |
| 2952 unittest.equals("/clients/")); |
2937 pathOffset += 9; | 2953 pathOffset += 9; |
2938 index = path.indexOf("/users", pathOffset); | 2954 index = path.indexOf("/users", pathOffset); |
2939 unittest.expect(index >= 0, unittest.isTrue); | 2955 unittest.expect(index >= 0, unittest.isTrue); |
2940 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 2956 subPart = |
| 2957 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
2941 pathOffset = index; | 2958 pathOffset = index; |
2942 unittest.expect(subPart, unittest.equals("$arg_clientAccountId")); | 2959 unittest.expect(subPart, unittest.equals("$arg_clientAccountId")); |
2943 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ
als("/users")); | 2960 unittest.expect(path.substring(pathOffset, pathOffset + 6), |
| 2961 unittest.equals("/users")); |
2944 pathOffset += 6; | 2962 pathOffset += 6; |
2945 | 2963 |
2946 var query = (req.url).query; | 2964 var query = (req.url).query; |
2947 var queryOffset = 0; | 2965 var queryOffset = 0; |
2948 var queryMap = {}; | 2966 var queryMap = {}; |
2949 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 2967 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
2950 parseBool(n) { | 2968 parseBool(n) { |
2951 if (n == "true") return true; | 2969 if (n == "true") return true; |
2952 if (n == "false") return false; | 2970 if (n == "false") return false; |
2953 if (n == null) return null; | 2971 if (n == null) return null; |
2954 throw new core.ArgumentError("Invalid boolean: $n"); | 2972 throw new core.ArgumentError("Invalid boolean: $n"); |
2955 } | 2973 } |
| 2974 |
2956 if (query.length > 0) { | 2975 if (query.length > 0) { |
2957 for (var part in query.split("&")) { | 2976 for (var part in query.split("&")) { |
2958 var keyvalue = part.split("="); | 2977 var keyvalue = part.split("="); |
2959 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2978 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 2979 core.Uri.decodeQueryComponent(keyvalue[1])); |
2960 } | 2980 } |
2961 } | 2981 } |
2962 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); | 2982 unittest.expect( |
2963 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 2983 queryMap["pageToken"].first, unittest.equals(arg_pageToken)); |
2964 | 2984 unittest.expect(core.int.parse(queryMap["pageSize"].first), |
| 2985 unittest.equals(arg_pageSize)); |
2965 | 2986 |
2966 var h = { | 2987 var h = { |
2967 "content-type" : "application/json; charset=utf-8", | 2988 "content-type": "application/json; charset=utf-8", |
2968 }; | 2989 }; |
2969 var resp = convert.JSON.encode(buildListClientUsersResponse()); | 2990 var resp = convert.JSON.encode(buildListClientUsersResponse()); |
2970 return new async.Future.value(stringResponse(200, h, resp)); | 2991 return new async.Future.value(stringResponse(200, h, resp)); |
2971 }), true); | 2992 }), true); |
2972 res.list(arg_accountId, arg_clientAccountId, pageSize: arg_pageSize, pageT
oken: arg_pageToken).then(unittest.expectAsync1(((api.ListClientUsersResponse re
sponse) { | 2993 res |
| 2994 .list(arg_accountId, arg_clientAccountId, |
| 2995 pageToken: arg_pageToken, pageSize: arg_pageSize) |
| 2996 .then(unittest.expectAsync1(((api.ListClientUsersResponse response) { |
2973 checkListClientUsersResponse(response); | 2997 checkListClientUsersResponse(response); |
2974 }))); | 2998 }))); |
2975 }); | 2999 }); |
2976 | 3000 |
2977 unittest.test("method--update", () { | 3001 unittest.test("method--update", () { |
2978 | |
2979 var mock = new HttpServerMock(); | 3002 var mock = new HttpServerMock(); |
2980 api.AccountsClientsUsersResourceApi res = new api.Adexchangebuyer2Api(mock
).accounts.clients.users; | 3003 api.AccountsClientsUsersResourceApi res = |
| 3004 new api.Adexchangebuyer2Api(mock).accounts.clients.users; |
2981 var arg_request = buildClientUser(); | 3005 var arg_request = buildClientUser(); |
2982 var arg_accountId = "foo"; | 3006 var arg_accountId = "foo"; |
2983 var arg_clientAccountId = "foo"; | 3007 var arg_clientAccountId = "foo"; |
2984 var arg_userId = "foo"; | 3008 var arg_userId = "foo"; |
2985 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 3009 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
2986 var obj = new api.ClientUser.fromJson(json); | 3010 var obj = new api.ClientUser.fromJson(json); |
2987 checkClientUser(obj); | 3011 checkClientUser(obj); |
2988 | 3012 |
2989 var path = (req.url).path; | 3013 var path = (req.url).path; |
2990 var pathOffset = 0; | 3014 var pathOffset = 0; |
2991 var index; | 3015 var index; |
2992 var subPart; | 3016 var subPart; |
2993 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3017 unittest.expect( |
| 3018 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
2994 pathOffset += 1; | 3019 pathOffset += 1; |
2995 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("v2beta1/accounts/")); | 3020 unittest.expect(path.substring(pathOffset, pathOffset + 17), |
| 3021 unittest.equals("v2beta1/accounts/")); |
2996 pathOffset += 17; | 3022 pathOffset += 17; |
2997 index = path.indexOf("/clients/", pathOffset); | 3023 index = path.indexOf("/clients/", pathOffset); |
2998 unittest.expect(index >= 0, unittest.isTrue); | 3024 unittest.expect(index >= 0, unittest.isTrue); |
2999 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 3025 subPart = |
| 3026 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
3000 pathOffset = index; | 3027 pathOffset = index; |
3001 unittest.expect(subPart, unittest.equals("$arg_accountId")); | 3028 unittest.expect(subPart, unittest.equals("$arg_accountId")); |
3002 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("/clients/")); | 3029 unittest.expect(path.substring(pathOffset, pathOffset + 9), |
| 3030 unittest.equals("/clients/")); |
3003 pathOffset += 9; | 3031 pathOffset += 9; |
3004 index = path.indexOf("/users/", pathOffset); | 3032 index = path.indexOf("/users/", pathOffset); |
3005 unittest.expect(index >= 0, unittest.isTrue); | 3033 unittest.expect(index >= 0, unittest.isTrue); |
3006 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 3034 subPart = |
| 3035 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
3007 pathOffset = index; | 3036 pathOffset = index; |
3008 unittest.expect(subPart, unittest.equals("$arg_clientAccountId")); | 3037 unittest.expect(subPart, unittest.equals("$arg_clientAccountId")); |
3009 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ
als("/users/")); | 3038 unittest.expect(path.substring(pathOffset, pathOffset + 7), |
| 3039 unittest.equals("/users/")); |
3010 pathOffset += 7; | 3040 pathOffset += 7; |
3011 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | 3041 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
3012 pathOffset = path.length; | 3042 pathOffset = path.length; |
3013 unittest.expect(subPart, unittest.equals("$arg_userId")); | 3043 unittest.expect(subPart, unittest.equals("$arg_userId")); |
3014 | 3044 |
3015 var query = (req.url).query; | 3045 var query = (req.url).query; |
3016 var queryOffset = 0; | 3046 var queryOffset = 0; |
3017 var queryMap = {}; | 3047 var queryMap = {}; |
3018 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 3048 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
3019 parseBool(n) { | 3049 parseBool(n) { |
3020 if (n == "true") return true; | 3050 if (n == "true") return true; |
3021 if (n == "false") return false; | 3051 if (n == "false") return false; |
3022 if (n == null) return null; | 3052 if (n == null) return null; |
3023 throw new core.ArgumentError("Invalid boolean: $n"); | 3053 throw new core.ArgumentError("Invalid boolean: $n"); |
3024 } | 3054 } |
| 3055 |
3025 if (query.length > 0) { | 3056 if (query.length > 0) { |
3026 for (var part in query.split("&")) { | 3057 for (var part in query.split("&")) { |
3027 var keyvalue = part.split("="); | 3058 var keyvalue = part.split("="); |
3028 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 3059 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 3060 core.Uri.decodeQueryComponent(keyvalue[1])); |
3029 } | 3061 } |
3030 } | 3062 } |
3031 | 3063 |
3032 | |
3033 var h = { | 3064 var h = { |
3034 "content-type" : "application/json; charset=utf-8", | 3065 "content-type": "application/json; charset=utf-8", |
3035 }; | 3066 }; |
3036 var resp = convert.JSON.encode(buildClientUser()); | 3067 var resp = convert.JSON.encode(buildClientUser()); |
3037 return new async.Future.value(stringResponse(200, h, resp)); | 3068 return new async.Future.value(stringResponse(200, h, resp)); |
3038 }), true); | 3069 }), true); |
3039 res.update(arg_request, arg_accountId, arg_clientAccountId, arg_userId).th
en(unittest.expectAsync1(((api.ClientUser response) { | 3070 res |
| 3071 .update(arg_request, arg_accountId, arg_clientAccountId, arg_userId) |
| 3072 .then(unittest.expectAsync1(((api.ClientUser response) { |
3040 checkClientUser(response); | 3073 checkClientUser(response); |
3041 }))); | 3074 }))); |
3042 }); | 3075 }); |
3043 | |
3044 }); | 3076 }); |
3045 | 3077 |
3046 | |
3047 unittest.group("resource-AccountsCreativesResourceApi", () { | 3078 unittest.group("resource-AccountsCreativesResourceApi", () { |
3048 unittest.test("method--create", () { | 3079 unittest.test("method--create", () { |
3049 | |
3050 var mock = new HttpServerMock(); | 3080 var mock = new HttpServerMock(); |
3051 api.AccountsCreativesResourceApi res = new api.Adexchangebuyer2Api(mock).a
ccounts.creatives; | 3081 api.AccountsCreativesResourceApi res = |
| 3082 new api.Adexchangebuyer2Api(mock).accounts.creatives; |
3052 var arg_request = buildCreative(); | 3083 var arg_request = buildCreative(); |
3053 var arg_accountId = "foo"; | 3084 var arg_accountId = "foo"; |
3054 var arg_duplicateIdMode = "foo"; | 3085 var arg_duplicateIdMode = "foo"; |
3055 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 3086 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
3056 var obj = new api.Creative.fromJson(json); | 3087 var obj = new api.Creative.fromJson(json); |
3057 checkCreative(obj); | 3088 checkCreative(obj); |
3058 | 3089 |
3059 var path = (req.url).path; | 3090 var path = (req.url).path; |
3060 var pathOffset = 0; | 3091 var pathOffset = 0; |
3061 var index; | 3092 var index; |
3062 var subPart; | 3093 var subPart; |
3063 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3094 unittest.expect( |
| 3095 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
3064 pathOffset += 1; | 3096 pathOffset += 1; |
3065 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("v2beta1/accounts/")); | 3097 unittest.expect(path.substring(pathOffset, pathOffset + 17), |
| 3098 unittest.equals("v2beta1/accounts/")); |
3066 pathOffset += 17; | 3099 pathOffset += 17; |
3067 index = path.indexOf("/creatives", pathOffset); | 3100 index = path.indexOf("/creatives", pathOffset); |
3068 unittest.expect(index >= 0, unittest.isTrue); | 3101 unittest.expect(index >= 0, unittest.isTrue); |
3069 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 3102 subPart = |
| 3103 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
3070 pathOffset = index; | 3104 pathOffset = index; |
3071 unittest.expect(subPart, unittest.equals("$arg_accountId")); | 3105 unittest.expect(subPart, unittest.equals("$arg_accountId")); |
3072 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/creatives")); | 3106 unittest.expect(path.substring(pathOffset, pathOffset + 10), |
| 3107 unittest.equals("/creatives")); |
3073 pathOffset += 10; | 3108 pathOffset += 10; |
3074 | 3109 |
3075 var query = (req.url).query; | 3110 var query = (req.url).query; |
3076 var queryOffset = 0; | 3111 var queryOffset = 0; |
3077 var queryMap = {}; | 3112 var queryMap = {}; |
3078 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 3113 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
3079 parseBool(n) { | 3114 parseBool(n) { |
3080 if (n == "true") return true; | 3115 if (n == "true") return true; |
3081 if (n == "false") return false; | 3116 if (n == "false") return false; |
3082 if (n == null) return null; | 3117 if (n == null) return null; |
3083 throw new core.ArgumentError("Invalid boolean: $n"); | 3118 throw new core.ArgumentError("Invalid boolean: $n"); |
3084 } | 3119 } |
| 3120 |
3085 if (query.length > 0) { | 3121 if (query.length > 0) { |
3086 for (var part in query.split("&")) { | 3122 for (var part in query.split("&")) { |
3087 var keyvalue = part.split("="); | 3123 var keyvalue = part.split("="); |
3088 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 3124 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 3125 core.Uri.decodeQueryComponent(keyvalue[1])); |
3089 } | 3126 } |
3090 } | 3127 } |
3091 unittest.expect(queryMap["duplicateIdMode"].first, unittest.equals(arg_d
uplicateIdMode)); | 3128 unittest.expect(queryMap["duplicateIdMode"].first, |
3092 | 3129 unittest.equals(arg_duplicateIdMode)); |
3093 | 3130 |
3094 var h = { | 3131 var h = { |
3095 "content-type" : "application/json; charset=utf-8", | 3132 "content-type": "application/json; charset=utf-8", |
3096 }; | 3133 }; |
3097 var resp = convert.JSON.encode(buildCreative()); | 3134 var resp = convert.JSON.encode(buildCreative()); |
3098 return new async.Future.value(stringResponse(200, h, resp)); | 3135 return new async.Future.value(stringResponse(200, h, resp)); |
3099 }), true); | 3136 }), true); |
3100 res.create(arg_request, arg_accountId, duplicateIdMode: arg_duplicateIdMod
e).then(unittest.expectAsync1(((api.Creative response) { | 3137 res |
| 3138 .create(arg_request, arg_accountId, |
| 3139 duplicateIdMode: arg_duplicateIdMode) |
| 3140 .then(unittest.expectAsync1(((api.Creative response) { |
3101 checkCreative(response); | 3141 checkCreative(response); |
3102 }))); | 3142 }))); |
3103 }); | 3143 }); |
3104 | 3144 |
3105 unittest.test("method--get", () { | 3145 unittest.test("method--get", () { |
3106 | |
3107 var mock = new HttpServerMock(); | 3146 var mock = new HttpServerMock(); |
3108 api.AccountsCreativesResourceApi res = new api.Adexchangebuyer2Api(mock).a
ccounts.creatives; | 3147 api.AccountsCreativesResourceApi res = |
| 3148 new api.Adexchangebuyer2Api(mock).accounts.creatives; |
3109 var arg_accountId = "foo"; | 3149 var arg_accountId = "foo"; |
3110 var arg_creativeId = "foo"; | 3150 var arg_creativeId = "foo"; |
3111 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 3151 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
3112 var path = (req.url).path; | 3152 var path = (req.url).path; |
3113 var pathOffset = 0; | 3153 var pathOffset = 0; |
3114 var index; | 3154 var index; |
3115 var subPart; | 3155 var subPart; |
3116 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3156 unittest.expect( |
| 3157 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
3117 pathOffset += 1; | 3158 pathOffset += 1; |
3118 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("v2beta1/accounts/")); | 3159 unittest.expect(path.substring(pathOffset, pathOffset + 17), |
| 3160 unittest.equals("v2beta1/accounts/")); |
3119 pathOffset += 17; | 3161 pathOffset += 17; |
3120 index = path.indexOf("/creatives/", pathOffset); | 3162 index = path.indexOf("/creatives/", pathOffset); |
3121 unittest.expect(index >= 0, unittest.isTrue); | 3163 unittest.expect(index >= 0, unittest.isTrue); |
3122 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 3164 subPart = |
| 3165 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
3123 pathOffset = index; | 3166 pathOffset = index; |
3124 unittest.expect(subPart, unittest.equals("$arg_accountId")); | 3167 unittest.expect(subPart, unittest.equals("$arg_accountId")); |
3125 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("/creatives/")); | 3168 unittest.expect(path.substring(pathOffset, pathOffset + 11), |
| 3169 unittest.equals("/creatives/")); |
3126 pathOffset += 11; | 3170 pathOffset += 11; |
3127 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | 3171 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
3128 pathOffset = path.length; | 3172 pathOffset = path.length; |
3129 unittest.expect(subPart, unittest.equals("$arg_creativeId")); | 3173 unittest.expect(subPart, unittest.equals("$arg_creativeId")); |
3130 | 3174 |
3131 var query = (req.url).query; | 3175 var query = (req.url).query; |
3132 var queryOffset = 0; | 3176 var queryOffset = 0; |
3133 var queryMap = {}; | 3177 var queryMap = {}; |
3134 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 3178 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
3135 parseBool(n) { | 3179 parseBool(n) { |
3136 if (n == "true") return true; | 3180 if (n == "true") return true; |
3137 if (n == "false") return false; | 3181 if (n == "false") return false; |
3138 if (n == null) return null; | 3182 if (n == null) return null; |
3139 throw new core.ArgumentError("Invalid boolean: $n"); | 3183 throw new core.ArgumentError("Invalid boolean: $n"); |
3140 } | 3184 } |
| 3185 |
3141 if (query.length > 0) { | 3186 if (query.length > 0) { |
3142 for (var part in query.split("&")) { | 3187 for (var part in query.split("&")) { |
3143 var keyvalue = part.split("="); | 3188 var keyvalue = part.split("="); |
3144 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 3189 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 3190 core.Uri.decodeQueryComponent(keyvalue[1])); |
3145 } | 3191 } |
3146 } | 3192 } |
3147 | 3193 |
3148 | |
3149 var h = { | 3194 var h = { |
3150 "content-type" : "application/json; charset=utf-8", | 3195 "content-type": "application/json; charset=utf-8", |
3151 }; | 3196 }; |
3152 var resp = convert.JSON.encode(buildCreative()); | 3197 var resp = convert.JSON.encode(buildCreative()); |
3153 return new async.Future.value(stringResponse(200, h, resp)); | 3198 return new async.Future.value(stringResponse(200, h, resp)); |
3154 }), true); | 3199 }), true); |
3155 res.get(arg_accountId, arg_creativeId).then(unittest.expectAsync1(((api.Cr
eative response) { | 3200 res |
| 3201 .get(arg_accountId, arg_creativeId) |
| 3202 .then(unittest.expectAsync1(((api.Creative response) { |
3156 checkCreative(response); | 3203 checkCreative(response); |
3157 }))); | 3204 }))); |
3158 }); | 3205 }); |
3159 | 3206 |
3160 unittest.test("method--list", () { | 3207 unittest.test("method--list", () { |
3161 | |
3162 var mock = new HttpServerMock(); | 3208 var mock = new HttpServerMock(); |
3163 api.AccountsCreativesResourceApi res = new api.Adexchangebuyer2Api(mock).a
ccounts.creatives; | 3209 api.AccountsCreativesResourceApi res = |
| 3210 new api.Adexchangebuyer2Api(mock).accounts.creatives; |
3164 var arg_accountId = "foo"; | 3211 var arg_accountId = "foo"; |
| 3212 var arg_query = "foo"; |
3165 var arg_pageToken = "foo"; | 3213 var arg_pageToken = "foo"; |
3166 var arg_pageSize = 42; | 3214 var arg_pageSize = 42; |
3167 var arg_query = "foo"; | |
3168 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 3215 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
3169 var path = (req.url).path; | 3216 var path = (req.url).path; |
3170 var pathOffset = 0; | 3217 var pathOffset = 0; |
3171 var index; | 3218 var index; |
3172 var subPart; | 3219 var subPart; |
3173 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3220 unittest.expect( |
| 3221 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
3174 pathOffset += 1; | 3222 pathOffset += 1; |
3175 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("v2beta1/accounts/")); | 3223 unittest.expect(path.substring(pathOffset, pathOffset + 17), |
| 3224 unittest.equals("v2beta1/accounts/")); |
3176 pathOffset += 17; | 3225 pathOffset += 17; |
3177 index = path.indexOf("/creatives", pathOffset); | 3226 index = path.indexOf("/creatives", pathOffset); |
3178 unittest.expect(index >= 0, unittest.isTrue); | 3227 unittest.expect(index >= 0, unittest.isTrue); |
3179 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 3228 subPart = |
| 3229 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
3180 pathOffset = index; | 3230 pathOffset = index; |
3181 unittest.expect(subPart, unittest.equals("$arg_accountId")); | 3231 unittest.expect(subPart, unittest.equals("$arg_accountId")); |
3182 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/creatives")); | 3232 unittest.expect(path.substring(pathOffset, pathOffset + 10), |
| 3233 unittest.equals("/creatives")); |
3183 pathOffset += 10; | 3234 pathOffset += 10; |
3184 | 3235 |
3185 var query = (req.url).query; | 3236 var query = (req.url).query; |
3186 var queryOffset = 0; | 3237 var queryOffset = 0; |
3187 var queryMap = {}; | 3238 var queryMap = {}; |
3188 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 3239 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
3189 parseBool(n) { | 3240 parseBool(n) { |
3190 if (n == "true") return true; | 3241 if (n == "true") return true; |
3191 if (n == "false") return false; | 3242 if (n == "false") return false; |
3192 if (n == null) return null; | 3243 if (n == null) return null; |
3193 throw new core.ArgumentError("Invalid boolean: $n"); | 3244 throw new core.ArgumentError("Invalid boolean: $n"); |
3194 } | 3245 } |
| 3246 |
3195 if (query.length > 0) { | 3247 if (query.length > 0) { |
3196 for (var part in query.split("&")) { | 3248 for (var part in query.split("&")) { |
3197 var keyvalue = part.split("="); | 3249 var keyvalue = part.split("="); |
3198 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 3250 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 3251 core.Uri.decodeQueryComponent(keyvalue[1])); |
3199 } | 3252 } |
3200 } | 3253 } |
3201 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
3202 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); | |
3203 unittest.expect(queryMap["query"].first, unittest.equals(arg_query)); | 3254 unittest.expect(queryMap["query"].first, unittest.equals(arg_query)); |
3204 | 3255 unittest.expect( |
| 3256 queryMap["pageToken"].first, unittest.equals(arg_pageToken)); |
| 3257 unittest.expect(core.int.parse(queryMap["pageSize"].first), |
| 3258 unittest.equals(arg_pageSize)); |
3205 | 3259 |
3206 var h = { | 3260 var h = { |
3207 "content-type" : "application/json; charset=utf-8", | 3261 "content-type": "application/json; charset=utf-8", |
3208 }; | 3262 }; |
3209 var resp = convert.JSON.encode(buildListCreativesResponse()); | 3263 var resp = convert.JSON.encode(buildListCreativesResponse()); |
3210 return new async.Future.value(stringResponse(200, h, resp)); | 3264 return new async.Future.value(stringResponse(200, h, resp)); |
3211 }), true); | 3265 }), true); |
3212 res.list(arg_accountId, pageToken: arg_pageToken, pageSize: arg_pageSize,
query: arg_query).then(unittest.expectAsync1(((api.ListCreativesResponse respons
e) { | 3266 res |
| 3267 .list(arg_accountId, |
| 3268 query: arg_query, |
| 3269 pageToken: arg_pageToken, |
| 3270 pageSize: arg_pageSize) |
| 3271 .then(unittest.expectAsync1(((api.ListCreativesResponse response) { |
3213 checkListCreativesResponse(response); | 3272 checkListCreativesResponse(response); |
3214 }))); | 3273 }))); |
3215 }); | 3274 }); |
3216 | 3275 |
3217 unittest.test("method--stopWatching", () { | 3276 unittest.test("method--stopWatching", () { |
3218 | |
3219 var mock = new HttpServerMock(); | 3277 var mock = new HttpServerMock(); |
3220 api.AccountsCreativesResourceApi res = new api.Adexchangebuyer2Api(mock).a
ccounts.creatives; | 3278 api.AccountsCreativesResourceApi res = |
| 3279 new api.Adexchangebuyer2Api(mock).accounts.creatives; |
3221 var arg_request = buildStopWatchingCreativeRequest(); | 3280 var arg_request = buildStopWatchingCreativeRequest(); |
3222 var arg_accountId = "foo"; | 3281 var arg_accountId = "foo"; |
3223 var arg_creativeId = "foo"; | 3282 var arg_creativeId = "foo"; |
3224 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 3283 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
3225 var obj = new api.StopWatchingCreativeRequest.fromJson(json); | 3284 var obj = new api.StopWatchingCreativeRequest.fromJson(json); |
3226 checkStopWatchingCreativeRequest(obj); | 3285 checkStopWatchingCreativeRequest(obj); |
3227 | 3286 |
3228 var path = (req.url).path; | 3287 var path = (req.url).path; |
3229 var pathOffset = 0; | 3288 var pathOffset = 0; |
3230 var index; | 3289 var index; |
3231 var subPart; | 3290 var subPart; |
3232 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3291 unittest.expect( |
| 3292 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
3233 pathOffset += 1; | 3293 pathOffset += 1; |
3234 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("v2beta1/accounts/")); | 3294 unittest.expect(path.substring(pathOffset, pathOffset + 17), |
| 3295 unittest.equals("v2beta1/accounts/")); |
3235 pathOffset += 17; | 3296 pathOffset += 17; |
3236 index = path.indexOf("/creatives/", pathOffset); | 3297 index = path.indexOf("/creatives/", pathOffset); |
3237 unittest.expect(index >= 0, unittest.isTrue); | 3298 unittest.expect(index >= 0, unittest.isTrue); |
3238 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 3299 subPart = |
| 3300 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
3239 pathOffset = index; | 3301 pathOffset = index; |
3240 unittest.expect(subPart, unittest.equals("$arg_accountId")); | 3302 unittest.expect(subPart, unittest.equals("$arg_accountId")); |
3241 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("/creatives/")); | 3303 unittest.expect(path.substring(pathOffset, pathOffset + 11), |
| 3304 unittest.equals("/creatives/")); |
3242 pathOffset += 11; | 3305 pathOffset += 11; |
3243 index = path.indexOf(":stopWatching", pathOffset); | 3306 index = path.indexOf(":stopWatching", pathOffset); |
3244 unittest.expect(index >= 0, unittest.isTrue); | 3307 unittest.expect(index >= 0, unittest.isTrue); |
3245 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 3308 subPart = |
| 3309 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
3246 pathOffset = index; | 3310 pathOffset = index; |
3247 unittest.expect(subPart, unittest.equals("$arg_creativeId")); | 3311 unittest.expect(subPart, unittest.equals("$arg_creativeId")); |
3248 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals(":stopWatching")); | 3312 unittest.expect(path.substring(pathOffset, pathOffset + 13), |
| 3313 unittest.equals(":stopWatching")); |
3249 pathOffset += 13; | 3314 pathOffset += 13; |
3250 | 3315 |
3251 var query = (req.url).query; | 3316 var query = (req.url).query; |
3252 var queryOffset = 0; | 3317 var queryOffset = 0; |
3253 var queryMap = {}; | 3318 var queryMap = {}; |
3254 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 3319 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
3255 parseBool(n) { | 3320 parseBool(n) { |
3256 if (n == "true") return true; | 3321 if (n == "true") return true; |
3257 if (n == "false") return false; | 3322 if (n == "false") return false; |
3258 if (n == null) return null; | 3323 if (n == null) return null; |
3259 throw new core.ArgumentError("Invalid boolean: $n"); | 3324 throw new core.ArgumentError("Invalid boolean: $n"); |
3260 } | 3325 } |
| 3326 |
3261 if (query.length > 0) { | 3327 if (query.length > 0) { |
3262 for (var part in query.split("&")) { | 3328 for (var part in query.split("&")) { |
3263 var keyvalue = part.split("="); | 3329 var keyvalue = part.split("="); |
3264 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 3330 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 3331 core.Uri.decodeQueryComponent(keyvalue[1])); |
3265 } | 3332 } |
3266 } | 3333 } |
3267 | 3334 |
3268 | |
3269 var h = { | 3335 var h = { |
3270 "content-type" : "application/json; charset=utf-8", | 3336 "content-type": "application/json; charset=utf-8", |
3271 }; | 3337 }; |
3272 var resp = convert.JSON.encode(buildEmpty()); | 3338 var resp = convert.JSON.encode(buildEmpty()); |
3273 return new async.Future.value(stringResponse(200, h, resp)); | 3339 return new async.Future.value(stringResponse(200, h, resp)); |
3274 }), true); | 3340 }), true); |
3275 res.stopWatching(arg_request, arg_accountId, arg_creativeId).then(unittest
.expectAsync1(((api.Empty response) { | 3341 res |
| 3342 .stopWatching(arg_request, arg_accountId, arg_creativeId) |
| 3343 .then(unittest.expectAsync1(((api.Empty response) { |
3276 checkEmpty(response); | 3344 checkEmpty(response); |
3277 }))); | 3345 }))); |
3278 }); | 3346 }); |
3279 | 3347 |
3280 unittest.test("method--update", () { | 3348 unittest.test("method--update", () { |
3281 | |
3282 var mock = new HttpServerMock(); | 3349 var mock = new HttpServerMock(); |
3283 api.AccountsCreativesResourceApi res = new api.Adexchangebuyer2Api(mock).a
ccounts.creatives; | 3350 api.AccountsCreativesResourceApi res = |
| 3351 new api.Adexchangebuyer2Api(mock).accounts.creatives; |
3284 var arg_request = buildCreative(); | 3352 var arg_request = buildCreative(); |
3285 var arg_accountId = "foo"; | 3353 var arg_accountId = "foo"; |
3286 var arg_creativeId = "foo"; | 3354 var arg_creativeId = "foo"; |
3287 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 3355 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
3288 var obj = new api.Creative.fromJson(json); | 3356 var obj = new api.Creative.fromJson(json); |
3289 checkCreative(obj); | 3357 checkCreative(obj); |
3290 | 3358 |
3291 var path = (req.url).path; | 3359 var path = (req.url).path; |
3292 var pathOffset = 0; | 3360 var pathOffset = 0; |
3293 var index; | 3361 var index; |
3294 var subPart; | 3362 var subPart; |
3295 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3363 unittest.expect( |
| 3364 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
3296 pathOffset += 1; | 3365 pathOffset += 1; |
3297 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("v2beta1/accounts/")); | 3366 unittest.expect(path.substring(pathOffset, pathOffset + 17), |
| 3367 unittest.equals("v2beta1/accounts/")); |
3298 pathOffset += 17; | 3368 pathOffset += 17; |
3299 index = path.indexOf("/creatives/", pathOffset); | 3369 index = path.indexOf("/creatives/", pathOffset); |
3300 unittest.expect(index >= 0, unittest.isTrue); | 3370 unittest.expect(index >= 0, unittest.isTrue); |
3301 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 3371 subPart = |
| 3372 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
3302 pathOffset = index; | 3373 pathOffset = index; |
3303 unittest.expect(subPart, unittest.equals("$arg_accountId")); | 3374 unittest.expect(subPart, unittest.equals("$arg_accountId")); |
3304 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("/creatives/")); | 3375 unittest.expect(path.substring(pathOffset, pathOffset + 11), |
| 3376 unittest.equals("/creatives/")); |
3305 pathOffset += 11; | 3377 pathOffset += 11; |
3306 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | 3378 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
3307 pathOffset = path.length; | 3379 pathOffset = path.length; |
3308 unittest.expect(subPart, unittest.equals("$arg_creativeId")); | 3380 unittest.expect(subPart, unittest.equals("$arg_creativeId")); |
3309 | 3381 |
3310 var query = (req.url).query; | 3382 var query = (req.url).query; |
3311 var queryOffset = 0; | 3383 var queryOffset = 0; |
3312 var queryMap = {}; | 3384 var queryMap = {}; |
3313 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 3385 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
3314 parseBool(n) { | 3386 parseBool(n) { |
3315 if (n == "true") return true; | 3387 if (n == "true") return true; |
3316 if (n == "false") return false; | 3388 if (n == "false") return false; |
3317 if (n == null) return null; | 3389 if (n == null) return null; |
3318 throw new core.ArgumentError("Invalid boolean: $n"); | 3390 throw new core.ArgumentError("Invalid boolean: $n"); |
3319 } | 3391 } |
| 3392 |
3320 if (query.length > 0) { | 3393 if (query.length > 0) { |
3321 for (var part in query.split("&")) { | 3394 for (var part in query.split("&")) { |
3322 var keyvalue = part.split("="); | 3395 var keyvalue = part.split("="); |
3323 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 3396 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 3397 core.Uri.decodeQueryComponent(keyvalue[1])); |
3324 } | 3398 } |
3325 } | 3399 } |
3326 | 3400 |
3327 | |
3328 var h = { | 3401 var h = { |
3329 "content-type" : "application/json; charset=utf-8", | 3402 "content-type": "application/json; charset=utf-8", |
3330 }; | 3403 }; |
3331 var resp = convert.JSON.encode(buildCreative()); | 3404 var resp = convert.JSON.encode(buildCreative()); |
3332 return new async.Future.value(stringResponse(200, h, resp)); | 3405 return new async.Future.value(stringResponse(200, h, resp)); |
3333 }), true); | 3406 }), true); |
3334 res.update(arg_request, arg_accountId, arg_creativeId).then(unittest.expec
tAsync1(((api.Creative response) { | 3407 res |
| 3408 .update(arg_request, arg_accountId, arg_creativeId) |
| 3409 .then(unittest.expectAsync1(((api.Creative response) { |
3335 checkCreative(response); | 3410 checkCreative(response); |
3336 }))); | 3411 }))); |
3337 }); | 3412 }); |
3338 | 3413 |
3339 unittest.test("method--watch", () { | 3414 unittest.test("method--watch", () { |
3340 | |
3341 var mock = new HttpServerMock(); | 3415 var mock = new HttpServerMock(); |
3342 api.AccountsCreativesResourceApi res = new api.Adexchangebuyer2Api(mock).a
ccounts.creatives; | 3416 api.AccountsCreativesResourceApi res = |
| 3417 new api.Adexchangebuyer2Api(mock).accounts.creatives; |
3343 var arg_request = buildWatchCreativeRequest(); | 3418 var arg_request = buildWatchCreativeRequest(); |
3344 var arg_accountId = "foo"; | 3419 var arg_accountId = "foo"; |
3345 var arg_creativeId = "foo"; | 3420 var arg_creativeId = "foo"; |
3346 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 3421 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
3347 var obj = new api.WatchCreativeRequest.fromJson(json); | 3422 var obj = new api.WatchCreativeRequest.fromJson(json); |
3348 checkWatchCreativeRequest(obj); | 3423 checkWatchCreativeRequest(obj); |
3349 | 3424 |
3350 var path = (req.url).path; | 3425 var path = (req.url).path; |
3351 var pathOffset = 0; | 3426 var pathOffset = 0; |
3352 var index; | 3427 var index; |
3353 var subPart; | 3428 var subPart; |
3354 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3429 unittest.expect( |
| 3430 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
3355 pathOffset += 1; | 3431 pathOffset += 1; |
3356 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("v2beta1/accounts/")); | 3432 unittest.expect(path.substring(pathOffset, pathOffset + 17), |
| 3433 unittest.equals("v2beta1/accounts/")); |
3357 pathOffset += 17; | 3434 pathOffset += 17; |
3358 index = path.indexOf("/creatives/", pathOffset); | 3435 index = path.indexOf("/creatives/", pathOffset); |
3359 unittest.expect(index >= 0, unittest.isTrue); | 3436 unittest.expect(index >= 0, unittest.isTrue); |
3360 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 3437 subPart = |
| 3438 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
3361 pathOffset = index; | 3439 pathOffset = index; |
3362 unittest.expect(subPart, unittest.equals("$arg_accountId")); | 3440 unittest.expect(subPart, unittest.equals("$arg_accountId")); |
3363 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("/creatives/")); | 3441 unittest.expect(path.substring(pathOffset, pathOffset + 11), |
| 3442 unittest.equals("/creatives/")); |
3364 pathOffset += 11; | 3443 pathOffset += 11; |
3365 index = path.indexOf(":watch", pathOffset); | 3444 index = path.indexOf(":watch", pathOffset); |
3366 unittest.expect(index >= 0, unittest.isTrue); | 3445 unittest.expect(index >= 0, unittest.isTrue); |
3367 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 3446 subPart = |
| 3447 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
3368 pathOffset = index; | 3448 pathOffset = index; |
3369 unittest.expect(subPart, unittest.equals("$arg_creativeId")); | 3449 unittest.expect(subPart, unittest.equals("$arg_creativeId")); |
3370 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ
als(":watch")); | 3450 unittest.expect(path.substring(pathOffset, pathOffset + 6), |
| 3451 unittest.equals(":watch")); |
3371 pathOffset += 6; | 3452 pathOffset += 6; |
3372 | 3453 |
3373 var query = (req.url).query; | 3454 var query = (req.url).query; |
3374 var queryOffset = 0; | 3455 var queryOffset = 0; |
3375 var queryMap = {}; | 3456 var queryMap = {}; |
3376 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 3457 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
3377 parseBool(n) { | 3458 parseBool(n) { |
3378 if (n == "true") return true; | 3459 if (n == "true") return true; |
3379 if (n == "false") return false; | 3460 if (n == "false") return false; |
3380 if (n == null) return null; | 3461 if (n == null) return null; |
3381 throw new core.ArgumentError("Invalid boolean: $n"); | 3462 throw new core.ArgumentError("Invalid boolean: $n"); |
3382 } | 3463 } |
| 3464 |
3383 if (query.length > 0) { | 3465 if (query.length > 0) { |
3384 for (var part in query.split("&")) { | 3466 for (var part in query.split("&")) { |
3385 var keyvalue = part.split("="); | 3467 var keyvalue = part.split("="); |
3386 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 3468 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 3469 core.Uri.decodeQueryComponent(keyvalue[1])); |
3387 } | 3470 } |
3388 } | 3471 } |
3389 | 3472 |
3390 | |
3391 var h = { | 3473 var h = { |
3392 "content-type" : "application/json; charset=utf-8", | 3474 "content-type": "application/json; charset=utf-8", |
3393 }; | 3475 }; |
3394 var resp = convert.JSON.encode(buildEmpty()); | 3476 var resp = convert.JSON.encode(buildEmpty()); |
3395 return new async.Future.value(stringResponse(200, h, resp)); | 3477 return new async.Future.value(stringResponse(200, h, resp)); |
3396 }), true); | 3478 }), true); |
3397 res.watch(arg_request, arg_accountId, arg_creativeId).then(unittest.expect
Async1(((api.Empty response) { | 3479 res |
| 3480 .watch(arg_request, arg_accountId, arg_creativeId) |
| 3481 .then(unittest.expectAsync1(((api.Empty response) { |
3398 checkEmpty(response); | 3482 checkEmpty(response); |
3399 }))); | 3483 }))); |
3400 }); | 3484 }); |
3401 | |
3402 }); | 3485 }); |
3403 | 3486 |
3404 | |
3405 unittest.group("resource-AccountsCreativesDealAssociationsResourceApi", () { | 3487 unittest.group("resource-AccountsCreativesDealAssociationsResourceApi", () { |
3406 unittest.test("method--add", () { | 3488 unittest.test("method--add", () { |
3407 | |
3408 var mock = new HttpServerMock(); | 3489 var mock = new HttpServerMock(); |
3409 api.AccountsCreativesDealAssociationsResourceApi res = new api.Adexchangeb
uyer2Api(mock).accounts.creatives.dealAssociations; | 3490 api.AccountsCreativesDealAssociationsResourceApi res = |
| 3491 new api.Adexchangebuyer2Api(mock).accounts.creatives.dealAssociations; |
3410 var arg_request = buildAddDealAssociationRequest(); | 3492 var arg_request = buildAddDealAssociationRequest(); |
3411 var arg_accountId = "foo"; | 3493 var arg_accountId = "foo"; |
3412 var arg_creativeId = "foo"; | 3494 var arg_creativeId = "foo"; |
3413 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 3495 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
3414 var obj = new api.AddDealAssociationRequest.fromJson(json); | 3496 var obj = new api.AddDealAssociationRequest.fromJson(json); |
3415 checkAddDealAssociationRequest(obj); | 3497 checkAddDealAssociationRequest(obj); |
3416 | 3498 |
3417 var path = (req.url).path; | 3499 var path = (req.url).path; |
3418 var pathOffset = 0; | 3500 var pathOffset = 0; |
3419 var index; | 3501 var index; |
3420 var subPart; | 3502 var subPart; |
3421 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3503 unittest.expect( |
| 3504 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
3422 pathOffset += 1; | 3505 pathOffset += 1; |
3423 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("v2beta1/accounts/")); | 3506 unittest.expect(path.substring(pathOffset, pathOffset + 17), |
| 3507 unittest.equals("v2beta1/accounts/")); |
3424 pathOffset += 17; | 3508 pathOffset += 17; |
3425 index = path.indexOf("/creatives/", pathOffset); | 3509 index = path.indexOf("/creatives/", pathOffset); |
3426 unittest.expect(index >= 0, unittest.isTrue); | 3510 unittest.expect(index >= 0, unittest.isTrue); |
3427 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 3511 subPart = |
| 3512 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
3428 pathOffset = index; | 3513 pathOffset = index; |
3429 unittest.expect(subPart, unittest.equals("$arg_accountId")); | 3514 unittest.expect(subPart, unittest.equals("$arg_accountId")); |
3430 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("/creatives/")); | 3515 unittest.expect(path.substring(pathOffset, pathOffset + 11), |
| 3516 unittest.equals("/creatives/")); |
3431 pathOffset += 11; | 3517 pathOffset += 11; |
3432 index = path.indexOf("/dealAssociations:add", pathOffset); | 3518 index = path.indexOf("/dealAssociations:add", pathOffset); |
3433 unittest.expect(index >= 0, unittest.isTrue); | 3519 unittest.expect(index >= 0, unittest.isTrue); |
3434 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 3520 subPart = |
| 3521 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
3435 pathOffset = index; | 3522 pathOffset = index; |
3436 unittest.expect(subPart, unittest.equals("$arg_creativeId")); | 3523 unittest.expect(subPart, unittest.equals("$arg_creativeId")); |
3437 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("/dealAssociations:add")); | 3524 unittest.expect(path.substring(pathOffset, pathOffset + 21), |
| 3525 unittest.equals("/dealAssociations:add")); |
3438 pathOffset += 21; | 3526 pathOffset += 21; |
3439 | 3527 |
3440 var query = (req.url).query; | 3528 var query = (req.url).query; |
3441 var queryOffset = 0; | 3529 var queryOffset = 0; |
3442 var queryMap = {}; | 3530 var queryMap = {}; |
3443 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 3531 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
3444 parseBool(n) { | 3532 parseBool(n) { |
3445 if (n == "true") return true; | 3533 if (n == "true") return true; |
3446 if (n == "false") return false; | 3534 if (n == "false") return false; |
3447 if (n == null) return null; | 3535 if (n == null) return null; |
3448 throw new core.ArgumentError("Invalid boolean: $n"); | 3536 throw new core.ArgumentError("Invalid boolean: $n"); |
3449 } | 3537 } |
| 3538 |
3450 if (query.length > 0) { | 3539 if (query.length > 0) { |
3451 for (var part in query.split("&")) { | 3540 for (var part in query.split("&")) { |
3452 var keyvalue = part.split("="); | 3541 var keyvalue = part.split("="); |
3453 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 3542 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 3543 core.Uri.decodeQueryComponent(keyvalue[1])); |
3454 } | 3544 } |
3455 } | 3545 } |
3456 | 3546 |
3457 | |
3458 var h = { | 3547 var h = { |
3459 "content-type" : "application/json; charset=utf-8", | 3548 "content-type": "application/json; charset=utf-8", |
3460 }; | 3549 }; |
3461 var resp = convert.JSON.encode(buildEmpty()); | 3550 var resp = convert.JSON.encode(buildEmpty()); |
3462 return new async.Future.value(stringResponse(200, h, resp)); | 3551 return new async.Future.value(stringResponse(200, h, resp)); |
3463 }), true); | 3552 }), true); |
3464 res.add(arg_request, arg_accountId, arg_creativeId).then(unittest.expectAs
ync1(((api.Empty response) { | 3553 res |
| 3554 .add(arg_request, arg_accountId, arg_creativeId) |
| 3555 .then(unittest.expectAsync1(((api.Empty response) { |
3465 checkEmpty(response); | 3556 checkEmpty(response); |
3466 }))); | 3557 }))); |
3467 }); | 3558 }); |
3468 | 3559 |
3469 unittest.test("method--list", () { | 3560 unittest.test("method--list", () { |
3470 | |
3471 var mock = new HttpServerMock(); | 3561 var mock = new HttpServerMock(); |
3472 api.AccountsCreativesDealAssociationsResourceApi res = new api.Adexchangeb
uyer2Api(mock).accounts.creatives.dealAssociations; | 3562 api.AccountsCreativesDealAssociationsResourceApi res = |
| 3563 new api.Adexchangebuyer2Api(mock).accounts.creatives.dealAssociations; |
3473 var arg_accountId = "foo"; | 3564 var arg_accountId = "foo"; |
3474 var arg_creativeId = "foo"; | 3565 var arg_creativeId = "foo"; |
| 3566 var arg_pageToken = "foo"; |
3475 var arg_pageSize = 42; | 3567 var arg_pageSize = 42; |
3476 var arg_query = "foo"; | 3568 var arg_query = "foo"; |
3477 var arg_pageToken = "foo"; | |
3478 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 3569 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
3479 var path = (req.url).path; | 3570 var path = (req.url).path; |
3480 var pathOffset = 0; | 3571 var pathOffset = 0; |
3481 var index; | 3572 var index; |
3482 var subPart; | 3573 var subPart; |
3483 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3574 unittest.expect( |
| 3575 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
3484 pathOffset += 1; | 3576 pathOffset += 1; |
3485 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("v2beta1/accounts/")); | 3577 unittest.expect(path.substring(pathOffset, pathOffset + 17), |
| 3578 unittest.equals("v2beta1/accounts/")); |
3486 pathOffset += 17; | 3579 pathOffset += 17; |
3487 index = path.indexOf("/creatives/", pathOffset); | 3580 index = path.indexOf("/creatives/", pathOffset); |
3488 unittest.expect(index >= 0, unittest.isTrue); | 3581 unittest.expect(index >= 0, unittest.isTrue); |
3489 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 3582 subPart = |
| 3583 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
3490 pathOffset = index; | 3584 pathOffset = index; |
3491 unittest.expect(subPart, unittest.equals("$arg_accountId")); | 3585 unittest.expect(subPart, unittest.equals("$arg_accountId")); |
3492 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("/creatives/")); | 3586 unittest.expect(path.substring(pathOffset, pathOffset + 11), |
| 3587 unittest.equals("/creatives/")); |
3493 pathOffset += 11; | 3588 pathOffset += 11; |
3494 index = path.indexOf("/dealAssociations", pathOffset); | 3589 index = path.indexOf("/dealAssociations", pathOffset); |
3495 unittest.expect(index >= 0, unittest.isTrue); | 3590 unittest.expect(index >= 0, unittest.isTrue); |
3496 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 3591 subPart = |
| 3592 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
3497 pathOffset = index; | 3593 pathOffset = index; |
3498 unittest.expect(subPart, unittest.equals("$arg_creativeId")); | 3594 unittest.expect(subPart, unittest.equals("$arg_creativeId")); |
3499 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("/dealAssociations")); | 3595 unittest.expect(path.substring(pathOffset, pathOffset + 17), |
| 3596 unittest.equals("/dealAssociations")); |
3500 pathOffset += 17; | 3597 pathOffset += 17; |
3501 | 3598 |
3502 var query = (req.url).query; | 3599 var query = (req.url).query; |
3503 var queryOffset = 0; | 3600 var queryOffset = 0; |
3504 var queryMap = {}; | 3601 var queryMap = {}; |
3505 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 3602 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
3506 parseBool(n) { | 3603 parseBool(n) { |
3507 if (n == "true") return true; | 3604 if (n == "true") return true; |
3508 if (n == "false") return false; | 3605 if (n == "false") return false; |
3509 if (n == null) return null; | 3606 if (n == null) return null; |
3510 throw new core.ArgumentError("Invalid boolean: $n"); | 3607 throw new core.ArgumentError("Invalid boolean: $n"); |
3511 } | 3608 } |
| 3609 |
3512 if (query.length > 0) { | 3610 if (query.length > 0) { |
3513 for (var part in query.split("&")) { | 3611 for (var part in query.split("&")) { |
3514 var keyvalue = part.split("="); | 3612 var keyvalue = part.split("="); |
3515 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 3613 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 3614 core.Uri.decodeQueryComponent(keyvalue[1])); |
3516 } | 3615 } |
3517 } | 3616 } |
3518 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); | 3617 unittest.expect( |
| 3618 queryMap["pageToken"].first, unittest.equals(arg_pageToken)); |
| 3619 unittest.expect(core.int.parse(queryMap["pageSize"].first), |
| 3620 unittest.equals(arg_pageSize)); |
3519 unittest.expect(queryMap["query"].first, unittest.equals(arg_query)); | 3621 unittest.expect(queryMap["query"].first, unittest.equals(arg_query)); |
3520 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
3521 | |
3522 | 3622 |
3523 var h = { | 3623 var h = { |
3524 "content-type" : "application/json; charset=utf-8", | 3624 "content-type": "application/json; charset=utf-8", |
3525 }; | 3625 }; |
3526 var resp = convert.JSON.encode(buildListDealAssociationsResponse()); | 3626 var resp = convert.JSON.encode(buildListDealAssociationsResponse()); |
3527 return new async.Future.value(stringResponse(200, h, resp)); | 3627 return new async.Future.value(stringResponse(200, h, resp)); |
3528 }), true); | 3628 }), true); |
3529 res.list(arg_accountId, arg_creativeId, pageSize: arg_pageSize, query: arg
_query, pageToken: arg_pageToken).then(unittest.expectAsync1(((api.ListDealAssoc
iationsResponse response) { | 3629 res |
| 3630 .list(arg_accountId, arg_creativeId, |
| 3631 pageToken: arg_pageToken, |
| 3632 pageSize: arg_pageSize, |
| 3633 query: arg_query) |
| 3634 .then(unittest |
| 3635 .expectAsync1(((api.ListDealAssociationsResponse response) { |
3530 checkListDealAssociationsResponse(response); | 3636 checkListDealAssociationsResponse(response); |
3531 }))); | 3637 }))); |
3532 }); | 3638 }); |
3533 | 3639 |
3534 unittest.test("method--remove", () { | 3640 unittest.test("method--remove", () { |
3535 | |
3536 var mock = new HttpServerMock(); | 3641 var mock = new HttpServerMock(); |
3537 api.AccountsCreativesDealAssociationsResourceApi res = new api.Adexchangeb
uyer2Api(mock).accounts.creatives.dealAssociations; | 3642 api.AccountsCreativesDealAssociationsResourceApi res = |
| 3643 new api.Adexchangebuyer2Api(mock).accounts.creatives.dealAssociations; |
3538 var arg_request = buildRemoveDealAssociationRequest(); | 3644 var arg_request = buildRemoveDealAssociationRequest(); |
3539 var arg_accountId = "foo"; | 3645 var arg_accountId = "foo"; |
3540 var arg_creativeId = "foo"; | 3646 var arg_creativeId = "foo"; |
3541 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 3647 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
3542 var obj = new api.RemoveDealAssociationRequest.fromJson(json); | 3648 var obj = new api.RemoveDealAssociationRequest.fromJson(json); |
3543 checkRemoveDealAssociationRequest(obj); | 3649 checkRemoveDealAssociationRequest(obj); |
3544 | 3650 |
3545 var path = (req.url).path; | 3651 var path = (req.url).path; |
3546 var pathOffset = 0; | 3652 var pathOffset = 0; |
3547 var index; | 3653 var index; |
3548 var subPart; | 3654 var subPart; |
3549 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3655 unittest.expect( |
| 3656 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
3550 pathOffset += 1; | 3657 pathOffset += 1; |
3551 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("v2beta1/accounts/")); | 3658 unittest.expect(path.substring(pathOffset, pathOffset + 17), |
| 3659 unittest.equals("v2beta1/accounts/")); |
3552 pathOffset += 17; | 3660 pathOffset += 17; |
3553 index = path.indexOf("/creatives/", pathOffset); | 3661 index = path.indexOf("/creatives/", pathOffset); |
3554 unittest.expect(index >= 0, unittest.isTrue); | 3662 unittest.expect(index >= 0, unittest.isTrue); |
3555 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 3663 subPart = |
| 3664 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
3556 pathOffset = index; | 3665 pathOffset = index; |
3557 unittest.expect(subPart, unittest.equals("$arg_accountId")); | 3666 unittest.expect(subPart, unittest.equals("$arg_accountId")); |
3558 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("/creatives/")); | 3667 unittest.expect(path.substring(pathOffset, pathOffset + 11), |
| 3668 unittest.equals("/creatives/")); |
3559 pathOffset += 11; | 3669 pathOffset += 11; |
3560 index = path.indexOf("/dealAssociations:remove", pathOffset); | 3670 index = path.indexOf("/dealAssociations:remove", pathOffset); |
3561 unittest.expect(index >= 0, unittest.isTrue); | 3671 unittest.expect(index >= 0, unittest.isTrue); |
3562 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 3672 subPart = |
| 3673 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
3563 pathOffset = index; | 3674 pathOffset = index; |
3564 unittest.expect(subPart, unittest.equals("$arg_creativeId")); | 3675 unittest.expect(subPart, unittest.equals("$arg_creativeId")); |
3565 unittest.expect(path.substring(pathOffset, pathOffset + 24), unittest.eq
uals("/dealAssociations:remove")); | 3676 unittest.expect(path.substring(pathOffset, pathOffset + 24), |
| 3677 unittest.equals("/dealAssociations:remove")); |
3566 pathOffset += 24; | 3678 pathOffset += 24; |
3567 | 3679 |
3568 var query = (req.url).query; | 3680 var query = (req.url).query; |
3569 var queryOffset = 0; | 3681 var queryOffset = 0; |
3570 var queryMap = {}; | 3682 var queryMap = {}; |
3571 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 3683 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
3572 parseBool(n) { | 3684 parseBool(n) { |
3573 if (n == "true") return true; | 3685 if (n == "true") return true; |
3574 if (n == "false") return false; | 3686 if (n == "false") return false; |
3575 if (n == null) return null; | 3687 if (n == null) return null; |
3576 throw new core.ArgumentError("Invalid boolean: $n"); | 3688 throw new core.ArgumentError("Invalid boolean: $n"); |
3577 } | 3689 } |
| 3690 |
3578 if (query.length > 0) { | 3691 if (query.length > 0) { |
3579 for (var part in query.split("&")) { | 3692 for (var part in query.split("&")) { |
3580 var keyvalue = part.split("="); | 3693 var keyvalue = part.split("="); |
3581 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 3694 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 3695 core.Uri.decodeQueryComponent(keyvalue[1])); |
3582 } | 3696 } |
3583 } | 3697 } |
3584 | 3698 |
3585 | |
3586 var h = { | 3699 var h = { |
3587 "content-type" : "application/json; charset=utf-8", | 3700 "content-type": "application/json; charset=utf-8", |
3588 }; | 3701 }; |
3589 var resp = convert.JSON.encode(buildEmpty()); | 3702 var resp = convert.JSON.encode(buildEmpty()); |
3590 return new async.Future.value(stringResponse(200, h, resp)); | 3703 return new async.Future.value(stringResponse(200, h, resp)); |
3591 }), true); | 3704 }), true); |
3592 res.remove(arg_request, arg_accountId, arg_creativeId).then(unittest.expec
tAsync1(((api.Empty response) { | 3705 res |
| 3706 .remove(arg_request, arg_accountId, arg_creativeId) |
| 3707 .then(unittest.expectAsync1(((api.Empty response) { |
3593 checkEmpty(response); | 3708 checkEmpty(response); |
3594 }))); | 3709 }))); |
3595 }); | 3710 }); |
3596 | |
3597 }); | 3711 }); |
3598 | 3712 |
3599 | |
3600 unittest.group("resource-AccountsFilterSetsResourceApi", () { | 3713 unittest.group("resource-AccountsFilterSetsResourceApi", () { |
3601 unittest.test("method--create", () { | 3714 unittest.test("method--create", () { |
3602 | |
3603 var mock = new HttpServerMock(); | 3715 var mock = new HttpServerMock(); |
3604 api.AccountsFilterSetsResourceApi res = new api.Adexchangebuyer2Api(mock).
accounts.filterSets; | 3716 api.AccountsFilterSetsResourceApi res = |
| 3717 new api.Adexchangebuyer2Api(mock).accounts.filterSets; |
3605 var arg_request = buildFilterSet(); | 3718 var arg_request = buildFilterSet(); |
3606 var arg_accountId = "foo"; | 3719 var arg_accountId = "foo"; |
3607 var arg_isTransient = true; | 3720 var arg_isTransient = true; |
3608 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 3721 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
3609 var obj = new api.FilterSet.fromJson(json); | 3722 var obj = new api.FilterSet.fromJson(json); |
3610 checkFilterSet(obj); | 3723 checkFilterSet(obj); |
3611 | 3724 |
3612 var path = (req.url).path; | 3725 var path = (req.url).path; |
3613 var pathOffset = 0; | 3726 var pathOffset = 0; |
3614 var index; | 3727 var index; |
3615 var subPart; | 3728 var subPart; |
3616 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3729 unittest.expect( |
| 3730 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
3617 pathOffset += 1; | 3731 pathOffset += 1; |
3618 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("v2beta1/accounts/")); | 3732 unittest.expect(path.substring(pathOffset, pathOffset + 17), |
| 3733 unittest.equals("v2beta1/accounts/")); |
3619 pathOffset += 17; | 3734 pathOffset += 17; |
3620 index = path.indexOf("/filterSets", pathOffset); | 3735 index = path.indexOf("/filterSets", pathOffset); |
3621 unittest.expect(index >= 0, unittest.isTrue); | 3736 unittest.expect(index >= 0, unittest.isTrue); |
3622 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 3737 subPart = |
| 3738 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
3623 pathOffset = index; | 3739 pathOffset = index; |
3624 unittest.expect(subPart, unittest.equals("$arg_accountId")); | 3740 unittest.expect(subPart, unittest.equals("$arg_accountId")); |
3625 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("/filterSets")); | 3741 unittest.expect(path.substring(pathOffset, pathOffset + 11), |
| 3742 unittest.equals("/filterSets")); |
3626 pathOffset += 11; | 3743 pathOffset += 11; |
3627 | 3744 |
3628 var query = (req.url).query; | 3745 var query = (req.url).query; |
3629 var queryOffset = 0; | 3746 var queryOffset = 0; |
3630 var queryMap = {}; | 3747 var queryMap = {}; |
3631 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 3748 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
3632 parseBool(n) { | 3749 parseBool(n) { |
3633 if (n == "true") return true; | 3750 if (n == "true") return true; |
3634 if (n == "false") return false; | 3751 if (n == "false") return false; |
3635 if (n == null) return null; | 3752 if (n == null) return null; |
3636 throw new core.ArgumentError("Invalid boolean: $n"); | 3753 throw new core.ArgumentError("Invalid boolean: $n"); |
3637 } | 3754 } |
| 3755 |
3638 if (query.length > 0) { | 3756 if (query.length > 0) { |
3639 for (var part in query.split("&")) { | 3757 for (var part in query.split("&")) { |
3640 var keyvalue = part.split("="); | 3758 var keyvalue = part.split("="); |
3641 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 3759 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 3760 core.Uri.decodeQueryComponent(keyvalue[1])); |
3642 } | 3761 } |
3643 } | 3762 } |
3644 unittest.expect(queryMap["isTransient"].first, unittest.equals("$arg_isT
ransient")); | 3763 unittest.expect( |
3645 | 3764 queryMap["isTransient"].first, unittest.equals("$arg_isTransient")); |
3646 | 3765 |
3647 var h = { | 3766 var h = { |
3648 "content-type" : "application/json; charset=utf-8", | 3767 "content-type": "application/json; charset=utf-8", |
3649 }; | 3768 }; |
3650 var resp = convert.JSON.encode(buildFilterSet()); | 3769 var resp = convert.JSON.encode(buildFilterSet()); |
3651 return new async.Future.value(stringResponse(200, h, resp)); | 3770 return new async.Future.value(stringResponse(200, h, resp)); |
3652 }), true); | 3771 }), true); |
3653 res.create(arg_request, arg_accountId, isTransient: arg_isTransient).then(
unittest.expectAsync1(((api.FilterSet response) { | 3772 res |
| 3773 .create(arg_request, arg_accountId, isTransient: arg_isTransient) |
| 3774 .then(unittest.expectAsync1(((api.FilterSet response) { |
3654 checkFilterSet(response); | 3775 checkFilterSet(response); |
3655 }))); | 3776 }))); |
3656 }); | 3777 }); |
3657 | 3778 |
3658 unittest.test("method--delete", () { | 3779 unittest.test("method--delete", () { |
3659 | |
3660 var mock = new HttpServerMock(); | 3780 var mock = new HttpServerMock(); |
3661 api.AccountsFilterSetsResourceApi res = new api.Adexchangebuyer2Api(mock).
accounts.filterSets; | 3781 api.AccountsFilterSetsResourceApi res = |
| 3782 new api.Adexchangebuyer2Api(mock).accounts.filterSets; |
3662 var arg_accountId = "foo"; | 3783 var arg_accountId = "foo"; |
3663 var arg_filterSetId = "foo"; | 3784 var arg_filterSetId = "foo"; |
3664 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 3785 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
3665 var path = (req.url).path; | 3786 var path = (req.url).path; |
3666 var pathOffset = 0; | 3787 var pathOffset = 0; |
3667 var index; | 3788 var index; |
3668 var subPart; | 3789 var subPart; |
3669 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3790 unittest.expect( |
| 3791 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
3670 pathOffset += 1; | 3792 pathOffset += 1; |
3671 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("v2beta1/accounts/")); | 3793 unittest.expect(path.substring(pathOffset, pathOffset + 17), |
| 3794 unittest.equals("v2beta1/accounts/")); |
3672 pathOffset += 17; | 3795 pathOffset += 17; |
3673 index = path.indexOf("/filterSets/", pathOffset); | 3796 index = path.indexOf("/filterSets/", pathOffset); |
3674 unittest.expect(index >= 0, unittest.isTrue); | 3797 unittest.expect(index >= 0, unittest.isTrue); |
3675 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 3798 subPart = |
| 3799 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
3676 pathOffset = index; | 3800 pathOffset = index; |
3677 unittest.expect(subPart, unittest.equals("$arg_accountId")); | 3801 unittest.expect(subPart, unittest.equals("$arg_accountId")); |
3678 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("/filterSets/")); | 3802 unittest.expect(path.substring(pathOffset, pathOffset + 12), |
| 3803 unittest.equals("/filterSets/")); |
3679 pathOffset += 12; | 3804 pathOffset += 12; |
3680 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | 3805 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
3681 pathOffset = path.length; | 3806 pathOffset = path.length; |
3682 unittest.expect(subPart, unittest.equals("$arg_filterSetId")); | 3807 unittest.expect(subPart, unittest.equals("$arg_filterSetId")); |
3683 | 3808 |
3684 var query = (req.url).query; | 3809 var query = (req.url).query; |
3685 var queryOffset = 0; | 3810 var queryOffset = 0; |
3686 var queryMap = {}; | 3811 var queryMap = {}; |
3687 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 3812 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
3688 parseBool(n) { | 3813 parseBool(n) { |
3689 if (n == "true") return true; | 3814 if (n == "true") return true; |
3690 if (n == "false") return false; | 3815 if (n == "false") return false; |
3691 if (n == null) return null; | 3816 if (n == null) return null; |
3692 throw new core.ArgumentError("Invalid boolean: $n"); | 3817 throw new core.ArgumentError("Invalid boolean: $n"); |
3693 } | 3818 } |
| 3819 |
3694 if (query.length > 0) { | 3820 if (query.length > 0) { |
3695 for (var part in query.split("&")) { | 3821 for (var part in query.split("&")) { |
3696 var keyvalue = part.split("="); | 3822 var keyvalue = part.split("="); |
3697 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 3823 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 3824 core.Uri.decodeQueryComponent(keyvalue[1])); |
3698 } | 3825 } |
3699 } | 3826 } |
3700 | 3827 |
3701 | |
3702 var h = { | 3828 var h = { |
3703 "content-type" : "application/json; charset=utf-8", | 3829 "content-type": "application/json; charset=utf-8", |
3704 }; | 3830 }; |
3705 var resp = convert.JSON.encode(buildEmpty()); | 3831 var resp = convert.JSON.encode(buildEmpty()); |
3706 return new async.Future.value(stringResponse(200, h, resp)); | 3832 return new async.Future.value(stringResponse(200, h, resp)); |
3707 }), true); | 3833 }), true); |
3708 res.delete(arg_accountId, arg_filterSetId).then(unittest.expectAsync1(((ap
i.Empty response) { | 3834 res |
| 3835 .delete(arg_accountId, arg_filterSetId) |
| 3836 .then(unittest.expectAsync1(((api.Empty response) { |
3709 checkEmpty(response); | 3837 checkEmpty(response); |
3710 }))); | 3838 }))); |
3711 }); | 3839 }); |
3712 | 3840 |
3713 unittest.test("method--get", () { | 3841 unittest.test("method--get", () { |
3714 | |
3715 var mock = new HttpServerMock(); | 3842 var mock = new HttpServerMock(); |
3716 api.AccountsFilterSetsResourceApi res = new api.Adexchangebuyer2Api(mock).
accounts.filterSets; | 3843 api.AccountsFilterSetsResourceApi res = |
| 3844 new api.Adexchangebuyer2Api(mock).accounts.filterSets; |
3717 var arg_accountId = "foo"; | 3845 var arg_accountId = "foo"; |
3718 var arg_filterSetId = "foo"; | 3846 var arg_filterSetId = "foo"; |
3719 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 3847 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
3720 var path = (req.url).path; | 3848 var path = (req.url).path; |
3721 var pathOffset = 0; | 3849 var pathOffset = 0; |
3722 var index; | 3850 var index; |
3723 var subPart; | 3851 var subPart; |
3724 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3852 unittest.expect( |
| 3853 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
3725 pathOffset += 1; | 3854 pathOffset += 1; |
3726 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("v2beta1/accounts/")); | 3855 unittest.expect(path.substring(pathOffset, pathOffset + 17), |
| 3856 unittest.equals("v2beta1/accounts/")); |
3727 pathOffset += 17; | 3857 pathOffset += 17; |
3728 index = path.indexOf("/filterSets/", pathOffset); | 3858 index = path.indexOf("/filterSets/", pathOffset); |
3729 unittest.expect(index >= 0, unittest.isTrue); | 3859 unittest.expect(index >= 0, unittest.isTrue); |
3730 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 3860 subPart = |
| 3861 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
3731 pathOffset = index; | 3862 pathOffset = index; |
3732 unittest.expect(subPart, unittest.equals("$arg_accountId")); | 3863 unittest.expect(subPart, unittest.equals("$arg_accountId")); |
3733 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("/filterSets/")); | 3864 unittest.expect(path.substring(pathOffset, pathOffset + 12), |
| 3865 unittest.equals("/filterSets/")); |
3734 pathOffset += 12; | 3866 pathOffset += 12; |
3735 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | 3867 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
3736 pathOffset = path.length; | 3868 pathOffset = path.length; |
3737 unittest.expect(subPart, unittest.equals("$arg_filterSetId")); | 3869 unittest.expect(subPart, unittest.equals("$arg_filterSetId")); |
3738 | 3870 |
3739 var query = (req.url).query; | 3871 var query = (req.url).query; |
3740 var queryOffset = 0; | 3872 var queryOffset = 0; |
3741 var queryMap = {}; | 3873 var queryMap = {}; |
3742 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 3874 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
3743 parseBool(n) { | 3875 parseBool(n) { |
3744 if (n == "true") return true; | 3876 if (n == "true") return true; |
3745 if (n == "false") return false; | 3877 if (n == "false") return false; |
3746 if (n == null) return null; | 3878 if (n == null) return null; |
3747 throw new core.ArgumentError("Invalid boolean: $n"); | 3879 throw new core.ArgumentError("Invalid boolean: $n"); |
3748 } | 3880 } |
| 3881 |
3749 if (query.length > 0) { | 3882 if (query.length > 0) { |
3750 for (var part in query.split("&")) { | 3883 for (var part in query.split("&")) { |
3751 var keyvalue = part.split("="); | 3884 var keyvalue = part.split("="); |
3752 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 3885 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 3886 core.Uri.decodeQueryComponent(keyvalue[1])); |
3753 } | 3887 } |
3754 } | 3888 } |
3755 | 3889 |
3756 | |
3757 var h = { | 3890 var h = { |
3758 "content-type" : "application/json; charset=utf-8", | 3891 "content-type": "application/json; charset=utf-8", |
3759 }; | 3892 }; |
3760 var resp = convert.JSON.encode(buildFilterSet()); | 3893 var resp = convert.JSON.encode(buildFilterSet()); |
3761 return new async.Future.value(stringResponse(200, h, resp)); | 3894 return new async.Future.value(stringResponse(200, h, resp)); |
3762 }), true); | 3895 }), true); |
3763 res.get(arg_accountId, arg_filterSetId).then(unittest.expectAsync1(((api.F
ilterSet response) { | 3896 res |
| 3897 .get(arg_accountId, arg_filterSetId) |
| 3898 .then(unittest.expectAsync1(((api.FilterSet response) { |
3764 checkFilterSet(response); | 3899 checkFilterSet(response); |
3765 }))); | 3900 }))); |
3766 }); | 3901 }); |
3767 | 3902 |
3768 unittest.test("method--list", () { | 3903 unittest.test("method--list", () { |
3769 | |
3770 var mock = new HttpServerMock(); | 3904 var mock = new HttpServerMock(); |
3771 api.AccountsFilterSetsResourceApi res = new api.Adexchangebuyer2Api(mock).
accounts.filterSets; | 3905 api.AccountsFilterSetsResourceApi res = |
| 3906 new api.Adexchangebuyer2Api(mock).accounts.filterSets; |
3772 var arg_accountId = "foo"; | 3907 var arg_accountId = "foo"; |
3773 var arg_pageToken = "foo"; | 3908 var arg_pageToken = "foo"; |
3774 var arg_pageSize = 42; | 3909 var arg_pageSize = 42; |
3775 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 3910 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
3776 var path = (req.url).path; | 3911 var path = (req.url).path; |
3777 var pathOffset = 0; | 3912 var pathOffset = 0; |
3778 var index; | 3913 var index; |
3779 var subPart; | 3914 var subPart; |
3780 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3915 unittest.expect( |
| 3916 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
3781 pathOffset += 1; | 3917 pathOffset += 1; |
3782 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("v2beta1/accounts/")); | 3918 unittest.expect(path.substring(pathOffset, pathOffset + 17), |
| 3919 unittest.equals("v2beta1/accounts/")); |
3783 pathOffset += 17; | 3920 pathOffset += 17; |
3784 index = path.indexOf("/filterSets", pathOffset); | 3921 index = path.indexOf("/filterSets", pathOffset); |
3785 unittest.expect(index >= 0, unittest.isTrue); | 3922 unittest.expect(index >= 0, unittest.isTrue); |
3786 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 3923 subPart = |
| 3924 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
3787 pathOffset = index; | 3925 pathOffset = index; |
3788 unittest.expect(subPart, unittest.equals("$arg_accountId")); | 3926 unittest.expect(subPart, unittest.equals("$arg_accountId")); |
3789 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("/filterSets")); | 3927 unittest.expect(path.substring(pathOffset, pathOffset + 11), |
| 3928 unittest.equals("/filterSets")); |
3790 pathOffset += 11; | 3929 pathOffset += 11; |
3791 | 3930 |
3792 var query = (req.url).query; | 3931 var query = (req.url).query; |
3793 var queryOffset = 0; | 3932 var queryOffset = 0; |
3794 var queryMap = {}; | 3933 var queryMap = {}; |
3795 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 3934 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
3796 parseBool(n) { | 3935 parseBool(n) { |
3797 if (n == "true") return true; | 3936 if (n == "true") return true; |
3798 if (n == "false") return false; | 3937 if (n == "false") return false; |
3799 if (n == null) return null; | 3938 if (n == null) return null; |
3800 throw new core.ArgumentError("Invalid boolean: $n"); | 3939 throw new core.ArgumentError("Invalid boolean: $n"); |
3801 } | 3940 } |
| 3941 |
3802 if (query.length > 0) { | 3942 if (query.length > 0) { |
3803 for (var part in query.split("&")) { | 3943 for (var part in query.split("&")) { |
3804 var keyvalue = part.split("="); | 3944 var keyvalue = part.split("="); |
3805 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 3945 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 3946 core.Uri.decodeQueryComponent(keyvalue[1])); |
3806 } | 3947 } |
3807 } | 3948 } |
3808 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 3949 unittest.expect( |
3809 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); | 3950 queryMap["pageToken"].first, unittest.equals(arg_pageToken)); |
3810 | 3951 unittest.expect(core.int.parse(queryMap["pageSize"].first), |
| 3952 unittest.equals(arg_pageSize)); |
3811 | 3953 |
3812 var h = { | 3954 var h = { |
3813 "content-type" : "application/json; charset=utf-8", | 3955 "content-type": "application/json; charset=utf-8", |
3814 }; | 3956 }; |
3815 var resp = convert.JSON.encode(buildListFilterSetsResponse()); | 3957 var resp = convert.JSON.encode(buildListFilterSetsResponse()); |
3816 return new async.Future.value(stringResponse(200, h, resp)); | 3958 return new async.Future.value(stringResponse(200, h, resp)); |
3817 }), true); | 3959 }), true); |
3818 res.list(arg_accountId, pageToken: arg_pageToken, pageSize: arg_pageSize).
then(unittest.expectAsync1(((api.ListFilterSetsResponse response) { | 3960 res |
| 3961 .list(arg_accountId, pageToken: arg_pageToken, pageSize: arg_pageSize) |
| 3962 .then(unittest.expectAsync1(((api.ListFilterSetsResponse response) { |
3819 checkListFilterSetsResponse(response); | 3963 checkListFilterSetsResponse(response); |
3820 }))); | 3964 }))); |
3821 }); | 3965 }); |
3822 | |
3823 }); | 3966 }); |
3824 | 3967 |
3825 | |
3826 unittest.group("resource-AccountsFilterSetsBidMetricsResourceApi", () { | 3968 unittest.group("resource-AccountsFilterSetsBidMetricsResourceApi", () { |
3827 unittest.test("method--list", () { | 3969 unittest.test("method--list", () { |
3828 | |
3829 var mock = new HttpServerMock(); | 3970 var mock = new HttpServerMock(); |
3830 api.AccountsFilterSetsBidMetricsResourceApi res = new api.Adexchangebuyer2
Api(mock).accounts.filterSets.bidMetrics; | 3971 api.AccountsFilterSetsBidMetricsResourceApi res = |
| 3972 new api.Adexchangebuyer2Api(mock).accounts.filterSets.bidMetrics; |
3831 var arg_accountId = "foo"; | 3973 var arg_accountId = "foo"; |
3832 var arg_filterSetId = "foo"; | 3974 var arg_filterSetId = "foo"; |
| 3975 var arg_pageToken = "foo"; |
3833 var arg_pageSize = 42; | 3976 var arg_pageSize = 42; |
3834 var arg_pageToken = "foo"; | |
3835 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 3977 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
3836 var path = (req.url).path; | 3978 var path = (req.url).path; |
3837 var pathOffset = 0; | 3979 var pathOffset = 0; |
3838 var index; | 3980 var index; |
3839 var subPart; | 3981 var subPart; |
3840 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3982 unittest.expect( |
| 3983 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
3841 pathOffset += 1; | 3984 pathOffset += 1; |
3842 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("v2beta1/accounts/")); | 3985 unittest.expect(path.substring(pathOffset, pathOffset + 17), |
| 3986 unittest.equals("v2beta1/accounts/")); |
3843 pathOffset += 17; | 3987 pathOffset += 17; |
3844 index = path.indexOf("/filterSets/", pathOffset); | 3988 index = path.indexOf("/filterSets/", pathOffset); |
3845 unittest.expect(index >= 0, unittest.isTrue); | 3989 unittest.expect(index >= 0, unittest.isTrue); |
3846 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 3990 subPart = |
| 3991 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
3847 pathOffset = index; | 3992 pathOffset = index; |
3848 unittest.expect(subPart, unittest.equals("$arg_accountId")); | 3993 unittest.expect(subPart, unittest.equals("$arg_accountId")); |
3849 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("/filterSets/")); | 3994 unittest.expect(path.substring(pathOffset, pathOffset + 12), |
| 3995 unittest.equals("/filterSets/")); |
3850 pathOffset += 12; | 3996 pathOffset += 12; |
3851 index = path.indexOf("/bidMetrics", pathOffset); | 3997 index = path.indexOf("/bidMetrics", pathOffset); |
3852 unittest.expect(index >= 0, unittest.isTrue); | 3998 unittest.expect(index >= 0, unittest.isTrue); |
3853 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 3999 subPart = |
| 4000 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
3854 pathOffset = index; | 4001 pathOffset = index; |
3855 unittest.expect(subPart, unittest.equals("$arg_filterSetId")); | 4002 unittest.expect(subPart, unittest.equals("$arg_filterSetId")); |
3856 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("/bidMetrics")); | 4003 unittest.expect(path.substring(pathOffset, pathOffset + 11), |
| 4004 unittest.equals("/bidMetrics")); |
3857 pathOffset += 11; | 4005 pathOffset += 11; |
3858 | 4006 |
3859 var query = (req.url).query; | 4007 var query = (req.url).query; |
3860 var queryOffset = 0; | 4008 var queryOffset = 0; |
3861 var queryMap = {}; | 4009 var queryMap = {}; |
3862 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 4010 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
3863 parseBool(n) { | 4011 parseBool(n) { |
3864 if (n == "true") return true; | 4012 if (n == "true") return true; |
3865 if (n == "false") return false; | 4013 if (n == "false") return false; |
3866 if (n == null) return null; | 4014 if (n == null) return null; |
3867 throw new core.ArgumentError("Invalid boolean: $n"); | 4015 throw new core.ArgumentError("Invalid boolean: $n"); |
3868 } | 4016 } |
| 4017 |
3869 if (query.length > 0) { | 4018 if (query.length > 0) { |
3870 for (var part in query.split("&")) { | 4019 for (var part in query.split("&")) { |
3871 var keyvalue = part.split("="); | 4020 var keyvalue = part.split("="); |
3872 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 4021 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 4022 core.Uri.decodeQueryComponent(keyvalue[1])); |
3873 } | 4023 } |
3874 } | 4024 } |
3875 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); | 4025 unittest.expect( |
3876 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 4026 queryMap["pageToken"].first, unittest.equals(arg_pageToken)); |
3877 | 4027 unittest.expect(core.int.parse(queryMap["pageSize"].first), |
| 4028 unittest.equals(arg_pageSize)); |
3878 | 4029 |
3879 var h = { | 4030 var h = { |
3880 "content-type" : "application/json; charset=utf-8", | 4031 "content-type": "application/json; charset=utf-8", |
3881 }; | 4032 }; |
3882 var resp = convert.JSON.encode(buildListBidMetricsResponse()); | 4033 var resp = convert.JSON.encode(buildListBidMetricsResponse()); |
3883 return new async.Future.value(stringResponse(200, h, resp)); | 4034 return new async.Future.value(stringResponse(200, h, resp)); |
3884 }), true); | 4035 }), true); |
3885 res.list(arg_accountId, arg_filterSetId, pageSize: arg_pageSize, pageToken
: arg_pageToken).then(unittest.expectAsync1(((api.ListBidMetricsResponse respons
e) { | 4036 res |
| 4037 .list(arg_accountId, arg_filterSetId, |
| 4038 pageToken: arg_pageToken, pageSize: arg_pageSize) |
| 4039 .then(unittest.expectAsync1(((api.ListBidMetricsResponse response) { |
3886 checkListBidMetricsResponse(response); | 4040 checkListBidMetricsResponse(response); |
3887 }))); | 4041 }))); |
3888 }); | 4042 }); |
3889 | |
3890 }); | 4043 }); |
3891 | 4044 |
3892 | |
3893 unittest.group("resource-AccountsFilterSetsBidResponseErrorsResourceApi", () { | 4045 unittest.group("resource-AccountsFilterSetsBidResponseErrorsResourceApi", () { |
3894 unittest.test("method--list", () { | 4046 unittest.test("method--list", () { |
3895 | |
3896 var mock = new HttpServerMock(); | 4047 var mock = new HttpServerMock(); |
3897 api.AccountsFilterSetsBidResponseErrorsResourceApi res = new api.Adexchang
ebuyer2Api(mock).accounts.filterSets.bidResponseErrors; | 4048 api.AccountsFilterSetsBidResponseErrorsResourceApi res = |
| 4049 new api.Adexchangebuyer2Api(mock) |
| 4050 .accounts |
| 4051 .filterSets |
| 4052 .bidResponseErrors; |
3898 var arg_accountId = "foo"; | 4053 var arg_accountId = "foo"; |
3899 var arg_filterSetId = "foo"; | 4054 var arg_filterSetId = "foo"; |
| 4055 var arg_pageToken = "foo"; |
3900 var arg_pageSize = 42; | 4056 var arg_pageSize = 42; |
3901 var arg_pageToken = "foo"; | |
3902 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 4057 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
3903 var path = (req.url).path; | 4058 var path = (req.url).path; |
3904 var pathOffset = 0; | 4059 var pathOffset = 0; |
3905 var index; | 4060 var index; |
3906 var subPart; | 4061 var subPart; |
3907 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 4062 unittest.expect( |
| 4063 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
3908 pathOffset += 1; | 4064 pathOffset += 1; |
3909 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("v2beta1/accounts/")); | 4065 unittest.expect(path.substring(pathOffset, pathOffset + 17), |
| 4066 unittest.equals("v2beta1/accounts/")); |
3910 pathOffset += 17; | 4067 pathOffset += 17; |
3911 index = path.indexOf("/filterSets/", pathOffset); | 4068 index = path.indexOf("/filterSets/", pathOffset); |
3912 unittest.expect(index >= 0, unittest.isTrue); | 4069 unittest.expect(index >= 0, unittest.isTrue); |
3913 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 4070 subPart = |
| 4071 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
3914 pathOffset = index; | 4072 pathOffset = index; |
3915 unittest.expect(subPart, unittest.equals("$arg_accountId")); | 4073 unittest.expect(subPart, unittest.equals("$arg_accountId")); |
3916 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("/filterSets/")); | 4074 unittest.expect(path.substring(pathOffset, pathOffset + 12), |
| 4075 unittest.equals("/filterSets/")); |
3917 pathOffset += 12; | 4076 pathOffset += 12; |
3918 index = path.indexOf("/bidResponseErrors", pathOffset); | 4077 index = path.indexOf("/bidResponseErrors", pathOffset); |
3919 unittest.expect(index >= 0, unittest.isTrue); | 4078 unittest.expect(index >= 0, unittest.isTrue); |
3920 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 4079 subPart = |
| 4080 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
3921 pathOffset = index; | 4081 pathOffset = index; |
3922 unittest.expect(subPart, unittest.equals("$arg_filterSetId")); | 4082 unittest.expect(subPart, unittest.equals("$arg_filterSetId")); |
3923 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("/bidResponseErrors")); | 4083 unittest.expect(path.substring(pathOffset, pathOffset + 18), |
| 4084 unittest.equals("/bidResponseErrors")); |
3924 pathOffset += 18; | 4085 pathOffset += 18; |
3925 | 4086 |
3926 var query = (req.url).query; | 4087 var query = (req.url).query; |
3927 var queryOffset = 0; | 4088 var queryOffset = 0; |
3928 var queryMap = {}; | 4089 var queryMap = {}; |
3929 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 4090 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
3930 parseBool(n) { | 4091 parseBool(n) { |
3931 if (n == "true") return true; | 4092 if (n == "true") return true; |
3932 if (n == "false") return false; | 4093 if (n == "false") return false; |
3933 if (n == null) return null; | 4094 if (n == null) return null; |
3934 throw new core.ArgumentError("Invalid boolean: $n"); | 4095 throw new core.ArgumentError("Invalid boolean: $n"); |
3935 } | 4096 } |
| 4097 |
3936 if (query.length > 0) { | 4098 if (query.length > 0) { |
3937 for (var part in query.split("&")) { | 4099 for (var part in query.split("&")) { |
3938 var keyvalue = part.split("="); | 4100 var keyvalue = part.split("="); |
3939 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 4101 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 4102 core.Uri.decodeQueryComponent(keyvalue[1])); |
3940 } | 4103 } |
3941 } | 4104 } |
3942 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); | 4105 unittest.expect( |
3943 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 4106 queryMap["pageToken"].first, unittest.equals(arg_pageToken)); |
3944 | 4107 unittest.expect(core.int.parse(queryMap["pageSize"].first), |
| 4108 unittest.equals(arg_pageSize)); |
3945 | 4109 |
3946 var h = { | 4110 var h = { |
3947 "content-type" : "application/json; charset=utf-8", | 4111 "content-type": "application/json; charset=utf-8", |
3948 }; | 4112 }; |
3949 var resp = convert.JSON.encode(buildListBidResponseErrorsResponse()); | 4113 var resp = convert.JSON.encode(buildListBidResponseErrorsResponse()); |
3950 return new async.Future.value(stringResponse(200, h, resp)); | 4114 return new async.Future.value(stringResponse(200, h, resp)); |
3951 }), true); | 4115 }), true); |
3952 res.list(arg_accountId, arg_filterSetId, pageSize: arg_pageSize, pageToken
: arg_pageToken).then(unittest.expectAsync1(((api.ListBidResponseErrorsResponse
response) { | 4116 res |
| 4117 .list(arg_accountId, arg_filterSetId, |
| 4118 pageToken: arg_pageToken, pageSize: arg_pageSize) |
| 4119 .then(unittest |
| 4120 .expectAsync1(((api.ListBidResponseErrorsResponse response) { |
3953 checkListBidResponseErrorsResponse(response); | 4121 checkListBidResponseErrorsResponse(response); |
3954 }))); | 4122 }))); |
3955 }); | 4123 }); |
3956 | |
3957 }); | 4124 }); |
3958 | 4125 |
3959 | 4126 unittest.group( |
3960 unittest.group("resource-AccountsFilterSetsBidResponsesWithoutBidsResourceApi"
, () { | 4127 "resource-AccountsFilterSetsBidResponsesWithoutBidsResourceApi", () { |
3961 unittest.test("method--list", () { | 4128 unittest.test("method--list", () { |
3962 | |
3963 var mock = new HttpServerMock(); | 4129 var mock = new HttpServerMock(); |
3964 api.AccountsFilterSetsBidResponsesWithoutBidsResourceApi res = new api.Ade
xchangebuyer2Api(mock).accounts.filterSets.bidResponsesWithoutBids; | 4130 api.AccountsFilterSetsBidResponsesWithoutBidsResourceApi res = |
| 4131 new api.Adexchangebuyer2Api(mock) |
| 4132 .accounts |
| 4133 .filterSets |
| 4134 .bidResponsesWithoutBids; |
3965 var arg_accountId = "foo"; | 4135 var arg_accountId = "foo"; |
3966 var arg_filterSetId = "foo"; | 4136 var arg_filterSetId = "foo"; |
3967 var arg_pageToken = "foo"; | 4137 var arg_pageToken = "foo"; |
3968 var arg_pageSize = 42; | 4138 var arg_pageSize = 42; |
3969 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 4139 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
3970 var path = (req.url).path; | 4140 var path = (req.url).path; |
3971 var pathOffset = 0; | 4141 var pathOffset = 0; |
3972 var index; | 4142 var index; |
3973 var subPart; | 4143 var subPart; |
3974 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 4144 unittest.expect( |
| 4145 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
3975 pathOffset += 1; | 4146 pathOffset += 1; |
3976 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("v2beta1/accounts/")); | 4147 unittest.expect(path.substring(pathOffset, pathOffset + 17), |
| 4148 unittest.equals("v2beta1/accounts/")); |
3977 pathOffset += 17; | 4149 pathOffset += 17; |
3978 index = path.indexOf("/filterSets/", pathOffset); | 4150 index = path.indexOf("/filterSets/", pathOffset); |
3979 unittest.expect(index >= 0, unittest.isTrue); | 4151 unittest.expect(index >= 0, unittest.isTrue); |
3980 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 4152 subPart = |
| 4153 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
3981 pathOffset = index; | 4154 pathOffset = index; |
3982 unittest.expect(subPart, unittest.equals("$arg_accountId")); | 4155 unittest.expect(subPart, unittest.equals("$arg_accountId")); |
3983 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("/filterSets/")); | 4156 unittest.expect(path.substring(pathOffset, pathOffset + 12), |
| 4157 unittest.equals("/filterSets/")); |
3984 pathOffset += 12; | 4158 pathOffset += 12; |
3985 index = path.indexOf("/bidResponsesWithoutBids", pathOffset); | 4159 index = path.indexOf("/bidResponsesWithoutBids", pathOffset); |
3986 unittest.expect(index >= 0, unittest.isTrue); | 4160 unittest.expect(index >= 0, unittest.isTrue); |
3987 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 4161 subPart = |
| 4162 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
3988 pathOffset = index; | 4163 pathOffset = index; |
3989 unittest.expect(subPart, unittest.equals("$arg_filterSetId")); | 4164 unittest.expect(subPart, unittest.equals("$arg_filterSetId")); |
3990 unittest.expect(path.substring(pathOffset, pathOffset + 24), unittest.eq
uals("/bidResponsesWithoutBids")); | 4165 unittest.expect(path.substring(pathOffset, pathOffset + 24), |
| 4166 unittest.equals("/bidResponsesWithoutBids")); |
3991 pathOffset += 24; | 4167 pathOffset += 24; |
3992 | 4168 |
3993 var query = (req.url).query; | 4169 var query = (req.url).query; |
3994 var queryOffset = 0; | 4170 var queryOffset = 0; |
3995 var queryMap = {}; | 4171 var queryMap = {}; |
3996 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 4172 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
3997 parseBool(n) { | 4173 parseBool(n) { |
3998 if (n == "true") return true; | 4174 if (n == "true") return true; |
3999 if (n == "false") return false; | 4175 if (n == "false") return false; |
4000 if (n == null) return null; | 4176 if (n == null) return null; |
4001 throw new core.ArgumentError("Invalid boolean: $n"); | 4177 throw new core.ArgumentError("Invalid boolean: $n"); |
4002 } | 4178 } |
| 4179 |
4003 if (query.length > 0) { | 4180 if (query.length > 0) { |
4004 for (var part in query.split("&")) { | 4181 for (var part in query.split("&")) { |
4005 var keyvalue = part.split("="); | 4182 var keyvalue = part.split("="); |
4006 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 4183 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 4184 core.Uri.decodeQueryComponent(keyvalue[1])); |
4007 } | 4185 } |
4008 } | 4186 } |
4009 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 4187 unittest.expect( |
4010 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); | 4188 queryMap["pageToken"].first, unittest.equals(arg_pageToken)); |
4011 | 4189 unittest.expect(core.int.parse(queryMap["pageSize"].first), |
| 4190 unittest.equals(arg_pageSize)); |
4012 | 4191 |
4013 var h = { | 4192 var h = { |
4014 "content-type" : "application/json; charset=utf-8", | 4193 "content-type": "application/json; charset=utf-8", |
4015 }; | 4194 }; |
4016 var resp = convert.JSON.encode(buildListBidResponsesWithoutBidsResponse(
)); | 4195 var resp = |
| 4196 convert.JSON.encode(buildListBidResponsesWithoutBidsResponse()); |
4017 return new async.Future.value(stringResponse(200, h, resp)); | 4197 return new async.Future.value(stringResponse(200, h, resp)); |
4018 }), true); | 4198 }), true); |
4019 res.list(arg_accountId, arg_filterSetId, pageToken: arg_pageToken, pageSiz
e: arg_pageSize).then(unittest.expectAsync1(((api.ListBidResponsesWithoutBidsRes
ponse response) { | 4199 res |
| 4200 .list(arg_accountId, arg_filterSetId, |
| 4201 pageToken: arg_pageToken, pageSize: arg_pageSize) |
| 4202 .then(unittest.expectAsync1( |
| 4203 ((api.ListBidResponsesWithoutBidsResponse response) { |
4020 checkListBidResponsesWithoutBidsResponse(response); | 4204 checkListBidResponsesWithoutBidsResponse(response); |
4021 }))); | 4205 }))); |
4022 }); | 4206 }); |
4023 | |
4024 }); | 4207 }); |
4025 | 4208 |
4026 | 4209 unittest.group("resource-AccountsFilterSetsFilteredBidRequestsResourceApi", |
4027 unittest.group("resource-AccountsFilterSetsFilteredBidRequestsResourceApi", ()
{ | 4210 () { |
4028 unittest.test("method--list", () { | 4211 unittest.test("method--list", () { |
4029 | |
4030 var mock = new HttpServerMock(); | 4212 var mock = new HttpServerMock(); |
4031 api.AccountsFilterSetsFilteredBidRequestsResourceApi res = new api.Adexcha
ngebuyer2Api(mock).accounts.filterSets.filteredBidRequests; | 4213 api.AccountsFilterSetsFilteredBidRequestsResourceApi res = |
| 4214 new api.Adexchangebuyer2Api(mock) |
| 4215 .accounts |
| 4216 .filterSets |
| 4217 .filteredBidRequests; |
4032 var arg_accountId = "foo"; | 4218 var arg_accountId = "foo"; |
4033 var arg_filterSetId = "foo"; | 4219 var arg_filterSetId = "foo"; |
| 4220 var arg_pageToken = "foo"; |
4034 var arg_pageSize = 42; | 4221 var arg_pageSize = 42; |
4035 var arg_pageToken = "foo"; | |
4036 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 4222 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
4037 var path = (req.url).path; | 4223 var path = (req.url).path; |
4038 var pathOffset = 0; | 4224 var pathOffset = 0; |
4039 var index; | 4225 var index; |
4040 var subPart; | 4226 var subPart; |
4041 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 4227 unittest.expect( |
| 4228 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
4042 pathOffset += 1; | 4229 pathOffset += 1; |
4043 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("v2beta1/accounts/")); | 4230 unittest.expect(path.substring(pathOffset, pathOffset + 17), |
| 4231 unittest.equals("v2beta1/accounts/")); |
4044 pathOffset += 17; | 4232 pathOffset += 17; |
4045 index = path.indexOf("/filterSets/", pathOffset); | 4233 index = path.indexOf("/filterSets/", pathOffset); |
4046 unittest.expect(index >= 0, unittest.isTrue); | 4234 unittest.expect(index >= 0, unittest.isTrue); |
4047 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 4235 subPart = |
| 4236 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
4048 pathOffset = index; | 4237 pathOffset = index; |
4049 unittest.expect(subPart, unittest.equals("$arg_accountId")); | 4238 unittest.expect(subPart, unittest.equals("$arg_accountId")); |
4050 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("/filterSets/")); | 4239 unittest.expect(path.substring(pathOffset, pathOffset + 12), |
| 4240 unittest.equals("/filterSets/")); |
4051 pathOffset += 12; | 4241 pathOffset += 12; |
4052 index = path.indexOf("/filteredBidRequests", pathOffset); | 4242 index = path.indexOf("/filteredBidRequests", pathOffset); |
4053 unittest.expect(index >= 0, unittest.isTrue); | 4243 unittest.expect(index >= 0, unittest.isTrue); |
4054 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 4244 subPart = |
| 4245 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
4055 pathOffset = index; | 4246 pathOffset = index; |
4056 unittest.expect(subPart, unittest.equals("$arg_filterSetId")); | 4247 unittest.expect(subPart, unittest.equals("$arg_filterSetId")); |
4057 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("/filteredBidRequests")); | 4248 unittest.expect(path.substring(pathOffset, pathOffset + 20), |
| 4249 unittest.equals("/filteredBidRequests")); |
4058 pathOffset += 20; | 4250 pathOffset += 20; |
4059 | 4251 |
4060 var query = (req.url).query; | 4252 var query = (req.url).query; |
4061 var queryOffset = 0; | 4253 var queryOffset = 0; |
4062 var queryMap = {}; | 4254 var queryMap = {}; |
4063 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 4255 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
4064 parseBool(n) { | 4256 parseBool(n) { |
4065 if (n == "true") return true; | 4257 if (n == "true") return true; |
4066 if (n == "false") return false; | 4258 if (n == "false") return false; |
4067 if (n == null) return null; | 4259 if (n == null) return null; |
4068 throw new core.ArgumentError("Invalid boolean: $n"); | 4260 throw new core.ArgumentError("Invalid boolean: $n"); |
4069 } | 4261 } |
| 4262 |
4070 if (query.length > 0) { | 4263 if (query.length > 0) { |
4071 for (var part in query.split("&")) { | 4264 for (var part in query.split("&")) { |
4072 var keyvalue = part.split("="); | 4265 var keyvalue = part.split("="); |
4073 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 4266 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 4267 core.Uri.decodeQueryComponent(keyvalue[1])); |
4074 } | 4268 } |
4075 } | 4269 } |
4076 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); | 4270 unittest.expect( |
4077 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 4271 queryMap["pageToken"].first, unittest.equals(arg_pageToken)); |
4078 | 4272 unittest.expect(core.int.parse(queryMap["pageSize"].first), |
| 4273 unittest.equals(arg_pageSize)); |
4079 | 4274 |
4080 var h = { | 4275 var h = { |
4081 "content-type" : "application/json; charset=utf-8", | 4276 "content-type": "application/json; charset=utf-8", |
4082 }; | 4277 }; |
4083 var resp = convert.JSON.encode(buildListFilteredBidRequestsResponse()); | 4278 var resp = convert.JSON.encode(buildListFilteredBidRequestsResponse()); |
4084 return new async.Future.value(stringResponse(200, h, resp)); | 4279 return new async.Future.value(stringResponse(200, h, resp)); |
4085 }), true); | 4280 }), true); |
4086 res.list(arg_accountId, arg_filterSetId, pageSize: arg_pageSize, pageToken
: arg_pageToken).then(unittest.expectAsync1(((api.ListFilteredBidRequestsRespons
e response) { | 4281 res |
| 4282 .list(arg_accountId, arg_filterSetId, |
| 4283 pageToken: arg_pageToken, pageSize: arg_pageSize) |
| 4284 .then(unittest |
| 4285 .expectAsync1(((api.ListFilteredBidRequestsResponse response) { |
4087 checkListFilteredBidRequestsResponse(response); | 4286 checkListFilteredBidRequestsResponse(response); |
4088 }))); | 4287 }))); |
4089 }); | 4288 }); |
4090 | |
4091 }); | 4289 }); |
4092 | 4290 |
4093 | |
4094 unittest.group("resource-AccountsFilterSetsFilteredBidsResourceApi", () { | 4291 unittest.group("resource-AccountsFilterSetsFilteredBidsResourceApi", () { |
4095 unittest.test("method--list", () { | 4292 unittest.test("method--list", () { |
4096 | |
4097 var mock = new HttpServerMock(); | 4293 var mock = new HttpServerMock(); |
4098 api.AccountsFilterSetsFilteredBidsResourceApi res = new api.Adexchangebuye
r2Api(mock).accounts.filterSets.filteredBids; | 4294 api.AccountsFilterSetsFilteredBidsResourceApi res = |
| 4295 new api.Adexchangebuyer2Api(mock).accounts.filterSets.filteredBids; |
4099 var arg_accountId = "foo"; | 4296 var arg_accountId = "foo"; |
4100 var arg_filterSetId = "foo"; | 4297 var arg_filterSetId = "foo"; |
4101 var arg_pageToken = "foo"; | 4298 var arg_pageToken = "foo"; |
4102 var arg_pageSize = 42; | 4299 var arg_pageSize = 42; |
4103 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 4300 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
4104 var path = (req.url).path; | 4301 var path = (req.url).path; |
4105 var pathOffset = 0; | 4302 var pathOffset = 0; |
4106 var index; | 4303 var index; |
4107 var subPart; | 4304 var subPart; |
4108 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 4305 unittest.expect( |
| 4306 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
4109 pathOffset += 1; | 4307 pathOffset += 1; |
4110 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("v2beta1/accounts/")); | 4308 unittest.expect(path.substring(pathOffset, pathOffset + 17), |
| 4309 unittest.equals("v2beta1/accounts/")); |
4111 pathOffset += 17; | 4310 pathOffset += 17; |
4112 index = path.indexOf("/filterSets/", pathOffset); | 4311 index = path.indexOf("/filterSets/", pathOffset); |
4113 unittest.expect(index >= 0, unittest.isTrue); | 4312 unittest.expect(index >= 0, unittest.isTrue); |
4114 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 4313 subPart = |
| 4314 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
4115 pathOffset = index; | 4315 pathOffset = index; |
4116 unittest.expect(subPart, unittest.equals("$arg_accountId")); | 4316 unittest.expect(subPart, unittest.equals("$arg_accountId")); |
4117 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("/filterSets/")); | 4317 unittest.expect(path.substring(pathOffset, pathOffset + 12), |
| 4318 unittest.equals("/filterSets/")); |
4118 pathOffset += 12; | 4319 pathOffset += 12; |
4119 index = path.indexOf("/filteredBids", pathOffset); | 4320 index = path.indexOf("/filteredBids", pathOffset); |
4120 unittest.expect(index >= 0, unittest.isTrue); | 4321 unittest.expect(index >= 0, unittest.isTrue); |
4121 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 4322 subPart = |
| 4323 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
4122 pathOffset = index; | 4324 pathOffset = index; |
4123 unittest.expect(subPart, unittest.equals("$arg_filterSetId")); | 4325 unittest.expect(subPart, unittest.equals("$arg_filterSetId")); |
4124 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("/filteredBids")); | 4326 unittest.expect(path.substring(pathOffset, pathOffset + 13), |
| 4327 unittest.equals("/filteredBids")); |
4125 pathOffset += 13; | 4328 pathOffset += 13; |
4126 | 4329 |
4127 var query = (req.url).query; | 4330 var query = (req.url).query; |
4128 var queryOffset = 0; | 4331 var queryOffset = 0; |
4129 var queryMap = {}; | 4332 var queryMap = {}; |
4130 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 4333 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
4131 parseBool(n) { | 4334 parseBool(n) { |
4132 if (n == "true") return true; | 4335 if (n == "true") return true; |
4133 if (n == "false") return false; | 4336 if (n == "false") return false; |
4134 if (n == null) return null; | 4337 if (n == null) return null; |
4135 throw new core.ArgumentError("Invalid boolean: $n"); | 4338 throw new core.ArgumentError("Invalid boolean: $n"); |
4136 } | 4339 } |
| 4340 |
4137 if (query.length > 0) { | 4341 if (query.length > 0) { |
4138 for (var part in query.split("&")) { | 4342 for (var part in query.split("&")) { |
4139 var keyvalue = part.split("="); | 4343 var keyvalue = part.split("="); |
4140 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 4344 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 4345 core.Uri.decodeQueryComponent(keyvalue[1])); |
4141 } | 4346 } |
4142 } | 4347 } |
4143 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 4348 unittest.expect( |
4144 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); | 4349 queryMap["pageToken"].first, unittest.equals(arg_pageToken)); |
4145 | 4350 unittest.expect(core.int.parse(queryMap["pageSize"].first), |
| 4351 unittest.equals(arg_pageSize)); |
4146 | 4352 |
4147 var h = { | 4353 var h = { |
4148 "content-type" : "application/json; charset=utf-8", | 4354 "content-type": "application/json; charset=utf-8", |
4149 }; | 4355 }; |
4150 var resp = convert.JSON.encode(buildListFilteredBidsResponse()); | 4356 var resp = convert.JSON.encode(buildListFilteredBidsResponse()); |
4151 return new async.Future.value(stringResponse(200, h, resp)); | 4357 return new async.Future.value(stringResponse(200, h, resp)); |
4152 }), true); | 4358 }), true); |
4153 res.list(arg_accountId, arg_filterSetId, pageToken: arg_pageToken, pageSiz
e: arg_pageSize).then(unittest.expectAsync1(((api.ListFilteredBidsResponse respo
nse) { | 4359 res |
| 4360 .list(arg_accountId, arg_filterSetId, |
| 4361 pageToken: arg_pageToken, pageSize: arg_pageSize) |
| 4362 .then(unittest.expectAsync1(((api.ListFilteredBidsResponse response) { |
4154 checkListFilteredBidsResponse(response); | 4363 checkListFilteredBidsResponse(response); |
4155 }))); | 4364 }))); |
4156 }); | 4365 }); |
4157 | |
4158 }); | 4366 }); |
4159 | 4367 |
4160 | 4368 unittest.group("resource-AccountsFilterSetsFilteredBidsCreativesResourceApi", |
4161 unittest.group("resource-AccountsFilterSetsFilteredBidsCreativesResourceApi",
() { | 4369 () { |
4162 unittest.test("method--list", () { | 4370 unittest.test("method--list", () { |
4163 | |
4164 var mock = new HttpServerMock(); | 4371 var mock = new HttpServerMock(); |
4165 api.AccountsFilterSetsFilteredBidsCreativesResourceApi res = new api.Adexc
hangebuyer2Api(mock).accounts.filterSets.filteredBids.creatives; | 4372 api.AccountsFilterSetsFilteredBidsCreativesResourceApi res = |
| 4373 new api.Adexchangebuyer2Api(mock) |
| 4374 .accounts |
| 4375 .filterSets |
| 4376 .filteredBids |
| 4377 .creatives; |
4166 var arg_accountId = "foo"; | 4378 var arg_accountId = "foo"; |
4167 var arg_filterSetId = "foo"; | 4379 var arg_filterSetId = "foo"; |
4168 var arg_creativeStatusId = 42; | 4380 var arg_creativeStatusId = 42; |
4169 var arg_pageToken = "foo"; | 4381 var arg_pageToken = "foo"; |
4170 var arg_pageSize = 42; | 4382 var arg_pageSize = 42; |
4171 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 4383 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
4172 var path = (req.url).path; | 4384 var path = (req.url).path; |
4173 var pathOffset = 0; | 4385 var pathOffset = 0; |
4174 var index; | 4386 var index; |
4175 var subPart; | 4387 var subPart; |
4176 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 4388 unittest.expect( |
| 4389 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
4177 pathOffset += 1; | 4390 pathOffset += 1; |
4178 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("v2beta1/accounts/")); | 4391 unittest.expect(path.substring(pathOffset, pathOffset + 17), |
| 4392 unittest.equals("v2beta1/accounts/")); |
4179 pathOffset += 17; | 4393 pathOffset += 17; |
4180 index = path.indexOf("/filterSets/", pathOffset); | 4394 index = path.indexOf("/filterSets/", pathOffset); |
4181 unittest.expect(index >= 0, unittest.isTrue); | 4395 unittest.expect(index >= 0, unittest.isTrue); |
4182 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 4396 subPart = |
| 4397 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
4183 pathOffset = index; | 4398 pathOffset = index; |
4184 unittest.expect(subPart, unittest.equals("$arg_accountId")); | 4399 unittest.expect(subPart, unittest.equals("$arg_accountId")); |
4185 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("/filterSets/")); | 4400 unittest.expect(path.substring(pathOffset, pathOffset + 12), |
| 4401 unittest.equals("/filterSets/")); |
4186 pathOffset += 12; | 4402 pathOffset += 12; |
4187 index = path.indexOf("/filteredBids/", pathOffset); | 4403 index = path.indexOf("/filteredBids/", pathOffset); |
4188 unittest.expect(index >= 0, unittest.isTrue); | 4404 unittest.expect(index >= 0, unittest.isTrue); |
4189 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 4405 subPart = |
| 4406 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
4190 pathOffset = index; | 4407 pathOffset = index; |
4191 unittest.expect(subPart, unittest.equals("$arg_filterSetId")); | 4408 unittest.expect(subPart, unittest.equals("$arg_filterSetId")); |
4192 unittest.expect(path.substring(pathOffset, pathOffset + 14), unittest.eq
uals("/filteredBids/")); | 4409 unittest.expect(path.substring(pathOffset, pathOffset + 14), |
| 4410 unittest.equals("/filteredBids/")); |
4193 pathOffset += 14; | 4411 pathOffset += 14; |
4194 index = path.indexOf("/creatives", pathOffset); | 4412 index = path.indexOf("/creatives", pathOffset); |
4195 unittest.expect(index >= 0, unittest.isTrue); | 4413 unittest.expect(index >= 0, unittest.isTrue); |
4196 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 4414 subPart = |
| 4415 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
4197 pathOffset = index; | 4416 pathOffset = index; |
4198 unittest.expect(subPart, unittest.equals("$arg_creativeStatusId")); | 4417 unittest.expect(subPart, unittest.equals("$arg_creativeStatusId")); |
4199 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/creatives")); | 4418 unittest.expect(path.substring(pathOffset, pathOffset + 10), |
| 4419 unittest.equals("/creatives")); |
4200 pathOffset += 10; | 4420 pathOffset += 10; |
4201 | 4421 |
4202 var query = (req.url).query; | 4422 var query = (req.url).query; |
4203 var queryOffset = 0; | 4423 var queryOffset = 0; |
4204 var queryMap = {}; | 4424 var queryMap = {}; |
4205 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 4425 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
4206 parseBool(n) { | 4426 parseBool(n) { |
4207 if (n == "true") return true; | 4427 if (n == "true") return true; |
4208 if (n == "false") return false; | 4428 if (n == "false") return false; |
4209 if (n == null) return null; | 4429 if (n == null) return null; |
4210 throw new core.ArgumentError("Invalid boolean: $n"); | 4430 throw new core.ArgumentError("Invalid boolean: $n"); |
4211 } | 4431 } |
| 4432 |
4212 if (query.length > 0) { | 4433 if (query.length > 0) { |
4213 for (var part in query.split("&")) { | 4434 for (var part in query.split("&")) { |
4214 var keyvalue = part.split("="); | 4435 var keyvalue = part.split("="); |
4215 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 4436 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 4437 core.Uri.decodeQueryComponent(keyvalue[1])); |
4216 } | 4438 } |
4217 } | 4439 } |
4218 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 4440 unittest.expect( |
4219 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); | 4441 queryMap["pageToken"].first, unittest.equals(arg_pageToken)); |
4220 | 4442 unittest.expect(core.int.parse(queryMap["pageSize"].first), |
| 4443 unittest.equals(arg_pageSize)); |
4221 | 4444 |
4222 var h = { | 4445 var h = { |
4223 "content-type" : "application/json; charset=utf-8", | 4446 "content-type": "application/json; charset=utf-8", |
4224 }; | 4447 }; |
4225 var resp = convert.JSON.encode(buildListCreativeStatusBreakdownByCreativ
eResponse()); | 4448 var resp = convert.JSON |
| 4449 .encode(buildListCreativeStatusBreakdownByCreativeResponse()); |
4226 return new async.Future.value(stringResponse(200, h, resp)); | 4450 return new async.Future.value(stringResponse(200, h, resp)); |
4227 }), true); | 4451 }), true); |
4228 res.list(arg_accountId, arg_filterSetId, arg_creativeStatusId, pageToken:
arg_pageToken, pageSize: arg_pageSize).then(unittest.expectAsync1(((api.ListCrea
tiveStatusBreakdownByCreativeResponse response) { | 4452 res |
| 4453 .list(arg_accountId, arg_filterSetId, arg_creativeStatusId, |
| 4454 pageToken: arg_pageToken, pageSize: arg_pageSize) |
| 4455 .then(unittest.expectAsync1( |
| 4456 ((api.ListCreativeStatusBreakdownByCreativeResponse response) { |
4229 checkListCreativeStatusBreakdownByCreativeResponse(response); | 4457 checkListCreativeStatusBreakdownByCreativeResponse(response); |
4230 }))); | 4458 }))); |
4231 }); | 4459 }); |
4232 | |
4233 }); | 4460 }); |
4234 | 4461 |
4235 | 4462 unittest.group("resource-AccountsFilterSetsFilteredBidsDetailsResourceApi", |
4236 unittest.group("resource-AccountsFilterSetsFilteredBidsDetailsResourceApi", ()
{ | 4463 () { |
4237 unittest.test("method--list", () { | 4464 unittest.test("method--list", () { |
4238 | |
4239 var mock = new HttpServerMock(); | 4465 var mock = new HttpServerMock(); |
4240 api.AccountsFilterSetsFilteredBidsDetailsResourceApi res = new api.Adexcha
ngebuyer2Api(mock).accounts.filterSets.filteredBids.details; | 4466 api.AccountsFilterSetsFilteredBidsDetailsResourceApi res = |
| 4467 new api.Adexchangebuyer2Api(mock) |
| 4468 .accounts |
| 4469 .filterSets |
| 4470 .filteredBids |
| 4471 .details; |
4241 var arg_accountId = "foo"; | 4472 var arg_accountId = "foo"; |
4242 var arg_filterSetId = "foo"; | 4473 var arg_filterSetId = "foo"; |
4243 var arg_creativeStatusId = 42; | 4474 var arg_creativeStatusId = 42; |
| 4475 var arg_pageSize = 42; |
4244 var arg_pageToken = "foo"; | 4476 var arg_pageToken = "foo"; |
4245 var arg_pageSize = 42; | |
4246 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 4477 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
4247 var path = (req.url).path; | 4478 var path = (req.url).path; |
4248 var pathOffset = 0; | 4479 var pathOffset = 0; |
4249 var index; | 4480 var index; |
4250 var subPart; | 4481 var subPart; |
4251 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 4482 unittest.expect( |
| 4483 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
4252 pathOffset += 1; | 4484 pathOffset += 1; |
4253 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("v2beta1/accounts/")); | 4485 unittest.expect(path.substring(pathOffset, pathOffset + 17), |
| 4486 unittest.equals("v2beta1/accounts/")); |
4254 pathOffset += 17; | 4487 pathOffset += 17; |
4255 index = path.indexOf("/filterSets/", pathOffset); | 4488 index = path.indexOf("/filterSets/", pathOffset); |
4256 unittest.expect(index >= 0, unittest.isTrue); | 4489 unittest.expect(index >= 0, unittest.isTrue); |
4257 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 4490 subPart = |
| 4491 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
4258 pathOffset = index; | 4492 pathOffset = index; |
4259 unittest.expect(subPart, unittest.equals("$arg_accountId")); | 4493 unittest.expect(subPart, unittest.equals("$arg_accountId")); |
4260 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("/filterSets/")); | 4494 unittest.expect(path.substring(pathOffset, pathOffset + 12), |
| 4495 unittest.equals("/filterSets/")); |
4261 pathOffset += 12; | 4496 pathOffset += 12; |
4262 index = path.indexOf("/filteredBids/", pathOffset); | 4497 index = path.indexOf("/filteredBids/", pathOffset); |
4263 unittest.expect(index >= 0, unittest.isTrue); | 4498 unittest.expect(index >= 0, unittest.isTrue); |
4264 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 4499 subPart = |
| 4500 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
4265 pathOffset = index; | 4501 pathOffset = index; |
4266 unittest.expect(subPart, unittest.equals("$arg_filterSetId")); | 4502 unittest.expect(subPart, unittest.equals("$arg_filterSetId")); |
4267 unittest.expect(path.substring(pathOffset, pathOffset + 14), unittest.eq
uals("/filteredBids/")); | 4503 unittest.expect(path.substring(pathOffset, pathOffset + 14), |
| 4504 unittest.equals("/filteredBids/")); |
4268 pathOffset += 14; | 4505 pathOffset += 14; |
4269 index = path.indexOf("/details", pathOffset); | 4506 index = path.indexOf("/details", pathOffset); |
4270 unittest.expect(index >= 0, unittest.isTrue); | 4507 unittest.expect(index >= 0, unittest.isTrue); |
4271 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 4508 subPart = |
| 4509 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
4272 pathOffset = index; | 4510 pathOffset = index; |
4273 unittest.expect(subPart, unittest.equals("$arg_creativeStatusId")); | 4511 unittest.expect(subPart, unittest.equals("$arg_creativeStatusId")); |
4274 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("/details")); | 4512 unittest.expect(path.substring(pathOffset, pathOffset + 8), |
| 4513 unittest.equals("/details")); |
4275 pathOffset += 8; | 4514 pathOffset += 8; |
4276 | 4515 |
4277 var query = (req.url).query; | 4516 var query = (req.url).query; |
4278 var queryOffset = 0; | 4517 var queryOffset = 0; |
4279 var queryMap = {}; | 4518 var queryMap = {}; |
4280 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 4519 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
4281 parseBool(n) { | 4520 parseBool(n) { |
4282 if (n == "true") return true; | 4521 if (n == "true") return true; |
4283 if (n == "false") return false; | 4522 if (n == "false") return false; |
4284 if (n == null) return null; | 4523 if (n == null) return null; |
4285 throw new core.ArgumentError("Invalid boolean: $n"); | 4524 throw new core.ArgumentError("Invalid boolean: $n"); |
4286 } | 4525 } |
| 4526 |
4287 if (query.length > 0) { | 4527 if (query.length > 0) { |
4288 for (var part in query.split("&")) { | 4528 for (var part in query.split("&")) { |
4289 var keyvalue = part.split("="); | 4529 var keyvalue = part.split("="); |
4290 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 4530 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 4531 core.Uri.decodeQueryComponent(keyvalue[1])); |
4291 } | 4532 } |
4292 } | 4533 } |
4293 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 4534 unittest.expect(core.int.parse(queryMap["pageSize"].first), |
4294 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); | 4535 unittest.equals(arg_pageSize)); |
4295 | 4536 unittest.expect( |
| 4537 queryMap["pageToken"].first, unittest.equals(arg_pageToken)); |
4296 | 4538 |
4297 var h = { | 4539 var h = { |
4298 "content-type" : "application/json; charset=utf-8", | 4540 "content-type": "application/json; charset=utf-8", |
4299 }; | 4541 }; |
4300 var resp = convert.JSON.encode(buildListCreativeStatusBreakdownByDetailR
esponse()); | 4542 var resp = convert.JSON |
| 4543 .encode(buildListCreativeStatusBreakdownByDetailResponse()); |
4301 return new async.Future.value(stringResponse(200, h, resp)); | 4544 return new async.Future.value(stringResponse(200, h, resp)); |
4302 }), true); | 4545 }), true); |
4303 res.list(arg_accountId, arg_filterSetId, arg_creativeStatusId, pageToken:
arg_pageToken, pageSize: arg_pageSize).then(unittest.expectAsync1(((api.ListCrea
tiveStatusBreakdownByDetailResponse response) { | 4546 res |
| 4547 .list(arg_accountId, arg_filterSetId, arg_creativeStatusId, |
| 4548 pageSize: arg_pageSize, pageToken: arg_pageToken) |
| 4549 .then(unittest.expectAsync1( |
| 4550 ((api.ListCreativeStatusBreakdownByDetailResponse response) { |
4304 checkListCreativeStatusBreakdownByDetailResponse(response); | 4551 checkListCreativeStatusBreakdownByDetailResponse(response); |
4305 }))); | 4552 }))); |
4306 }); | 4553 }); |
4307 | |
4308 }); | 4554 }); |
4309 | 4555 |
4310 | |
4311 unittest.group("resource-AccountsFilterSetsImpressionMetricsResourceApi", () { | 4556 unittest.group("resource-AccountsFilterSetsImpressionMetricsResourceApi", () { |
4312 unittest.test("method--list", () { | 4557 unittest.test("method--list", () { |
4313 | |
4314 var mock = new HttpServerMock(); | 4558 var mock = new HttpServerMock(); |
4315 api.AccountsFilterSetsImpressionMetricsResourceApi res = new api.Adexchang
ebuyer2Api(mock).accounts.filterSets.impressionMetrics; | 4559 api.AccountsFilterSetsImpressionMetricsResourceApi res = |
| 4560 new api.Adexchangebuyer2Api(mock) |
| 4561 .accounts |
| 4562 .filterSets |
| 4563 .impressionMetrics; |
4316 var arg_accountId = "foo"; | 4564 var arg_accountId = "foo"; |
4317 var arg_filterSetId = "foo"; | 4565 var arg_filterSetId = "foo"; |
| 4566 var arg_pageSize = 42; |
4318 var arg_pageToken = "foo"; | 4567 var arg_pageToken = "foo"; |
4319 var arg_pageSize = 42; | |
4320 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 4568 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
4321 var path = (req.url).path; | 4569 var path = (req.url).path; |
4322 var pathOffset = 0; | 4570 var pathOffset = 0; |
4323 var index; | 4571 var index; |
4324 var subPart; | 4572 var subPart; |
4325 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 4573 unittest.expect( |
| 4574 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
4326 pathOffset += 1; | 4575 pathOffset += 1; |
4327 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("v2beta1/accounts/")); | 4576 unittest.expect(path.substring(pathOffset, pathOffset + 17), |
| 4577 unittest.equals("v2beta1/accounts/")); |
4328 pathOffset += 17; | 4578 pathOffset += 17; |
4329 index = path.indexOf("/filterSets/", pathOffset); | 4579 index = path.indexOf("/filterSets/", pathOffset); |
4330 unittest.expect(index >= 0, unittest.isTrue); | 4580 unittest.expect(index >= 0, unittest.isTrue); |
4331 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 4581 subPart = |
| 4582 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
4332 pathOffset = index; | 4583 pathOffset = index; |
4333 unittest.expect(subPart, unittest.equals("$arg_accountId")); | 4584 unittest.expect(subPart, unittest.equals("$arg_accountId")); |
4334 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("/filterSets/")); | 4585 unittest.expect(path.substring(pathOffset, pathOffset + 12), |
| 4586 unittest.equals("/filterSets/")); |
4335 pathOffset += 12; | 4587 pathOffset += 12; |
4336 index = path.indexOf("/impressionMetrics", pathOffset); | 4588 index = path.indexOf("/impressionMetrics", pathOffset); |
4337 unittest.expect(index >= 0, unittest.isTrue); | 4589 unittest.expect(index >= 0, unittest.isTrue); |
4338 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 4590 subPart = |
| 4591 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
4339 pathOffset = index; | 4592 pathOffset = index; |
4340 unittest.expect(subPart, unittest.equals("$arg_filterSetId")); | 4593 unittest.expect(subPart, unittest.equals("$arg_filterSetId")); |
4341 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("/impressionMetrics")); | 4594 unittest.expect(path.substring(pathOffset, pathOffset + 18), |
| 4595 unittest.equals("/impressionMetrics")); |
4342 pathOffset += 18; | 4596 pathOffset += 18; |
4343 | 4597 |
4344 var query = (req.url).query; | 4598 var query = (req.url).query; |
4345 var queryOffset = 0; | 4599 var queryOffset = 0; |
4346 var queryMap = {}; | 4600 var queryMap = {}; |
4347 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 4601 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
4348 parseBool(n) { | 4602 parseBool(n) { |
4349 if (n == "true") return true; | 4603 if (n == "true") return true; |
4350 if (n == "false") return false; | 4604 if (n == "false") return false; |
4351 if (n == null) return null; | 4605 if (n == null) return null; |
4352 throw new core.ArgumentError("Invalid boolean: $n"); | 4606 throw new core.ArgumentError("Invalid boolean: $n"); |
4353 } | 4607 } |
| 4608 |
4354 if (query.length > 0) { | 4609 if (query.length > 0) { |
4355 for (var part in query.split("&")) { | 4610 for (var part in query.split("&")) { |
4356 var keyvalue = part.split("="); | 4611 var keyvalue = part.split("="); |
4357 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 4612 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 4613 core.Uri.decodeQueryComponent(keyvalue[1])); |
4358 } | 4614 } |
4359 } | 4615 } |
4360 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 4616 unittest.expect(core.int.parse(queryMap["pageSize"].first), |
4361 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); | 4617 unittest.equals(arg_pageSize)); |
4362 | 4618 unittest.expect( |
| 4619 queryMap["pageToken"].first, unittest.equals(arg_pageToken)); |
4363 | 4620 |
4364 var h = { | 4621 var h = { |
4365 "content-type" : "application/json; charset=utf-8", | 4622 "content-type": "application/json; charset=utf-8", |
4366 }; | 4623 }; |
4367 var resp = convert.JSON.encode(buildListImpressionMetricsResponse()); | 4624 var resp = convert.JSON.encode(buildListImpressionMetricsResponse()); |
4368 return new async.Future.value(stringResponse(200, h, resp)); | 4625 return new async.Future.value(stringResponse(200, h, resp)); |
4369 }), true); | 4626 }), true); |
4370 res.list(arg_accountId, arg_filterSetId, pageToken: arg_pageToken, pageSiz
e: arg_pageSize).then(unittest.expectAsync1(((api.ListImpressionMetricsResponse
response) { | 4627 res |
| 4628 .list(arg_accountId, arg_filterSetId, |
| 4629 pageSize: arg_pageSize, pageToken: arg_pageToken) |
| 4630 .then(unittest |
| 4631 .expectAsync1(((api.ListImpressionMetricsResponse response) { |
4371 checkListImpressionMetricsResponse(response); | 4632 checkListImpressionMetricsResponse(response); |
4372 }))); | 4633 }))); |
4373 }); | 4634 }); |
4374 | |
4375 }); | 4635 }); |
4376 | 4636 |
4377 | |
4378 unittest.group("resource-AccountsFilterSetsLosingBidsResourceApi", () { | 4637 unittest.group("resource-AccountsFilterSetsLosingBidsResourceApi", () { |
4379 unittest.test("method--list", () { | 4638 unittest.test("method--list", () { |
4380 | |
4381 var mock = new HttpServerMock(); | 4639 var mock = new HttpServerMock(); |
4382 api.AccountsFilterSetsLosingBidsResourceApi res = new api.Adexchangebuyer2
Api(mock).accounts.filterSets.losingBids; | 4640 api.AccountsFilterSetsLosingBidsResourceApi res = |
| 4641 new api.Adexchangebuyer2Api(mock).accounts.filterSets.losingBids; |
4383 var arg_accountId = "foo"; | 4642 var arg_accountId = "foo"; |
4384 var arg_filterSetId = "foo"; | 4643 var arg_filterSetId = "foo"; |
| 4644 var arg_pageToken = "foo"; |
4385 var arg_pageSize = 42; | 4645 var arg_pageSize = 42; |
4386 var arg_pageToken = "foo"; | |
4387 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 4646 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
4388 var path = (req.url).path; | 4647 var path = (req.url).path; |
4389 var pathOffset = 0; | 4648 var pathOffset = 0; |
4390 var index; | 4649 var index; |
4391 var subPart; | 4650 var subPart; |
4392 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 4651 unittest.expect( |
| 4652 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
4393 pathOffset += 1; | 4653 pathOffset += 1; |
4394 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("v2beta1/accounts/")); | 4654 unittest.expect(path.substring(pathOffset, pathOffset + 17), |
| 4655 unittest.equals("v2beta1/accounts/")); |
4395 pathOffset += 17; | 4656 pathOffset += 17; |
4396 index = path.indexOf("/filterSets/", pathOffset); | 4657 index = path.indexOf("/filterSets/", pathOffset); |
4397 unittest.expect(index >= 0, unittest.isTrue); | 4658 unittest.expect(index >= 0, unittest.isTrue); |
4398 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 4659 subPart = |
| 4660 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
4399 pathOffset = index; | 4661 pathOffset = index; |
4400 unittest.expect(subPart, unittest.equals("$arg_accountId")); | 4662 unittest.expect(subPart, unittest.equals("$arg_accountId")); |
4401 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("/filterSets/")); | 4663 unittest.expect(path.substring(pathOffset, pathOffset + 12), |
| 4664 unittest.equals("/filterSets/")); |
4402 pathOffset += 12; | 4665 pathOffset += 12; |
4403 index = path.indexOf("/losingBids", pathOffset); | 4666 index = path.indexOf("/losingBids", pathOffset); |
4404 unittest.expect(index >= 0, unittest.isTrue); | 4667 unittest.expect(index >= 0, unittest.isTrue); |
4405 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 4668 subPart = |
| 4669 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
4406 pathOffset = index; | 4670 pathOffset = index; |
4407 unittest.expect(subPart, unittest.equals("$arg_filterSetId")); | 4671 unittest.expect(subPart, unittest.equals("$arg_filterSetId")); |
4408 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("/losingBids")); | 4672 unittest.expect(path.substring(pathOffset, pathOffset + 11), |
| 4673 unittest.equals("/losingBids")); |
4409 pathOffset += 11; | 4674 pathOffset += 11; |
4410 | 4675 |
4411 var query = (req.url).query; | 4676 var query = (req.url).query; |
4412 var queryOffset = 0; | 4677 var queryOffset = 0; |
4413 var queryMap = {}; | 4678 var queryMap = {}; |
4414 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 4679 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
4415 parseBool(n) { | 4680 parseBool(n) { |
4416 if (n == "true") return true; | 4681 if (n == "true") return true; |
4417 if (n == "false") return false; | 4682 if (n == "false") return false; |
4418 if (n == null) return null; | 4683 if (n == null) return null; |
4419 throw new core.ArgumentError("Invalid boolean: $n"); | 4684 throw new core.ArgumentError("Invalid boolean: $n"); |
4420 } | 4685 } |
| 4686 |
4421 if (query.length > 0) { | 4687 if (query.length > 0) { |
4422 for (var part in query.split("&")) { | 4688 for (var part in query.split("&")) { |
4423 var keyvalue = part.split("="); | 4689 var keyvalue = part.split("="); |
4424 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 4690 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 4691 core.Uri.decodeQueryComponent(keyvalue[1])); |
4425 } | 4692 } |
4426 } | 4693 } |
4427 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); | 4694 unittest.expect( |
4428 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 4695 queryMap["pageToken"].first, unittest.equals(arg_pageToken)); |
4429 | 4696 unittest.expect(core.int.parse(queryMap["pageSize"].first), |
| 4697 unittest.equals(arg_pageSize)); |
4430 | 4698 |
4431 var h = { | 4699 var h = { |
4432 "content-type" : "application/json; charset=utf-8", | 4700 "content-type": "application/json; charset=utf-8", |
4433 }; | 4701 }; |
4434 var resp = convert.JSON.encode(buildListLosingBidsResponse()); | 4702 var resp = convert.JSON.encode(buildListLosingBidsResponse()); |
4435 return new async.Future.value(stringResponse(200, h, resp)); | 4703 return new async.Future.value(stringResponse(200, h, resp)); |
4436 }), true); | 4704 }), true); |
4437 res.list(arg_accountId, arg_filterSetId, pageSize: arg_pageSize, pageToken
: arg_pageToken).then(unittest.expectAsync1(((api.ListLosingBidsResponse respons
e) { | 4705 res |
| 4706 .list(arg_accountId, arg_filterSetId, |
| 4707 pageToken: arg_pageToken, pageSize: arg_pageSize) |
| 4708 .then(unittest.expectAsync1(((api.ListLosingBidsResponse response) { |
4438 checkListLosingBidsResponse(response); | 4709 checkListLosingBidsResponse(response); |
4439 }))); | 4710 }))); |
4440 }); | 4711 }); |
4441 | |
4442 }); | 4712 }); |
4443 | 4713 |
4444 | 4714 unittest.group("resource-AccountsFilterSetsNonBillableWinningBidsResourceApi", |
4445 unittest.group("resource-AccountsFilterSetsNonBillableWinningBidsResourceApi",
() { | 4715 () { |
4446 unittest.test("method--list", () { | 4716 unittest.test("method--list", () { |
4447 | |
4448 var mock = new HttpServerMock(); | 4717 var mock = new HttpServerMock(); |
4449 api.AccountsFilterSetsNonBillableWinningBidsResourceApi res = new api.Adex
changebuyer2Api(mock).accounts.filterSets.nonBillableWinningBids; | 4718 api.AccountsFilterSetsNonBillableWinningBidsResourceApi res = |
| 4719 new api.Adexchangebuyer2Api(mock) |
| 4720 .accounts |
| 4721 .filterSets |
| 4722 .nonBillableWinningBids; |
4450 var arg_accountId = "foo"; | 4723 var arg_accountId = "foo"; |
4451 var arg_filterSetId = "foo"; | 4724 var arg_filterSetId = "foo"; |
4452 var arg_pageToken = "foo"; | 4725 var arg_pageToken = "foo"; |
4453 var arg_pageSize = 42; | 4726 var arg_pageSize = 42; |
4454 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 4727 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
4455 var path = (req.url).path; | 4728 var path = (req.url).path; |
4456 var pathOffset = 0; | 4729 var pathOffset = 0; |
4457 var index; | 4730 var index; |
4458 var subPart; | 4731 var subPart; |
4459 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 4732 unittest.expect( |
| 4733 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
4460 pathOffset += 1; | 4734 pathOffset += 1; |
4461 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("v2beta1/accounts/")); | 4735 unittest.expect(path.substring(pathOffset, pathOffset + 17), |
| 4736 unittest.equals("v2beta1/accounts/")); |
4462 pathOffset += 17; | 4737 pathOffset += 17; |
4463 index = path.indexOf("/filterSets/", pathOffset); | 4738 index = path.indexOf("/filterSets/", pathOffset); |
4464 unittest.expect(index >= 0, unittest.isTrue); | 4739 unittest.expect(index >= 0, unittest.isTrue); |
4465 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 4740 subPart = |
| 4741 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
4466 pathOffset = index; | 4742 pathOffset = index; |
4467 unittest.expect(subPart, unittest.equals("$arg_accountId")); | 4743 unittest.expect(subPart, unittest.equals("$arg_accountId")); |
4468 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("/filterSets/")); | 4744 unittest.expect(path.substring(pathOffset, pathOffset + 12), |
| 4745 unittest.equals("/filterSets/")); |
4469 pathOffset += 12; | 4746 pathOffset += 12; |
4470 index = path.indexOf("/nonBillableWinningBids", pathOffset); | 4747 index = path.indexOf("/nonBillableWinningBids", pathOffset); |
4471 unittest.expect(index >= 0, unittest.isTrue); | 4748 unittest.expect(index >= 0, unittest.isTrue); |
4472 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 4749 subPart = |
| 4750 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
4473 pathOffset = index; | 4751 pathOffset = index; |
4474 unittest.expect(subPart, unittest.equals("$arg_filterSetId")); | 4752 unittest.expect(subPart, unittest.equals("$arg_filterSetId")); |
4475 unittest.expect(path.substring(pathOffset, pathOffset + 23), unittest.eq
uals("/nonBillableWinningBids")); | 4753 unittest.expect(path.substring(pathOffset, pathOffset + 23), |
| 4754 unittest.equals("/nonBillableWinningBids")); |
4476 pathOffset += 23; | 4755 pathOffset += 23; |
4477 | 4756 |
4478 var query = (req.url).query; | 4757 var query = (req.url).query; |
4479 var queryOffset = 0; | 4758 var queryOffset = 0; |
4480 var queryMap = {}; | 4759 var queryMap = {}; |
4481 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 4760 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
4482 parseBool(n) { | 4761 parseBool(n) { |
4483 if (n == "true") return true; | 4762 if (n == "true") return true; |
4484 if (n == "false") return false; | 4763 if (n == "false") return false; |
4485 if (n == null) return null; | 4764 if (n == null) return null; |
4486 throw new core.ArgumentError("Invalid boolean: $n"); | 4765 throw new core.ArgumentError("Invalid boolean: $n"); |
4487 } | 4766 } |
| 4767 |
4488 if (query.length > 0) { | 4768 if (query.length > 0) { |
4489 for (var part in query.split("&")) { | 4769 for (var part in query.split("&")) { |
4490 var keyvalue = part.split("="); | 4770 var keyvalue = part.split("="); |
4491 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 4771 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 4772 core.Uri.decodeQueryComponent(keyvalue[1])); |
4492 } | 4773 } |
4493 } | 4774 } |
4494 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 4775 unittest.expect( |
4495 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); | 4776 queryMap["pageToken"].first, unittest.equals(arg_pageToken)); |
4496 | 4777 unittest.expect(core.int.parse(queryMap["pageSize"].first), |
| 4778 unittest.equals(arg_pageSize)); |
4497 | 4779 |
4498 var h = { | 4780 var h = { |
4499 "content-type" : "application/json; charset=utf-8", | 4781 "content-type": "application/json; charset=utf-8", |
4500 }; | 4782 }; |
4501 var resp = convert.JSON.encode(buildListNonBillableWinningBidsResponse()
); | 4783 var resp = |
| 4784 convert.JSON.encode(buildListNonBillableWinningBidsResponse()); |
4502 return new async.Future.value(stringResponse(200, h, resp)); | 4785 return new async.Future.value(stringResponse(200, h, resp)); |
4503 }), true); | 4786 }), true); |
4504 res.list(arg_accountId, arg_filterSetId, pageToken: arg_pageToken, pageSiz
e: arg_pageSize).then(unittest.expectAsync1(((api.ListNonBillableWinningBidsResp
onse response) { | 4787 res |
| 4788 .list(arg_accountId, arg_filterSetId, |
| 4789 pageToken: arg_pageToken, pageSize: arg_pageSize) |
| 4790 .then(unittest |
| 4791 .expectAsync1(((api.ListNonBillableWinningBidsResponse response) { |
4505 checkListNonBillableWinningBidsResponse(response); | 4792 checkListNonBillableWinningBidsResponse(response); |
4506 }))); | 4793 }))); |
4507 }); | 4794 }); |
4508 | |
4509 }); | 4795 }); |
4510 | |
4511 | |
4512 } | 4796 } |
4513 | |
OLD | NEW |