OLD | NEW |
1 library googleapis.adsense.v1_4.test; | 1 library googleapis.adsense.v1_4.test; |
2 | 2 |
3 import "dart:core" as core; | 3 import "dart:core" as core; |
4 import "dart:collection" as collection; | 4 import "dart:collection" as collection; |
5 import "dart:async" as async; | 5 import "dart:async" as async; |
6 import "dart:convert" as convert; | 6 import "dart:convert" as convert; |
7 | 7 |
8 import 'package:http/http.dart' as http; | 8 import 'package:http/http.dart' as http; |
9 import 'package:http/testing.dart' as http_testing; | 9 import 'package:http/testing.dart' as http_testing; |
10 import 'package:unittest/unittest.dart' as unittest; | 10 import 'package:unittest/unittest.dart' as unittest; |
11 import 'package:googleapis/common/common.dart' as common; | |
12 import 'package:googleapis/src/common_internal.dart' as common_internal; | |
13 import '../common/common_internal_test.dart' as common_test; | |
14 | 11 |
15 import 'package:googleapis/adsense/v1_4.dart' as api; | 12 import 'package:googleapis/adsense/v1_4.dart' as api; |
16 | 13 |
| 14 class HttpServerMock extends http.BaseClient { |
| 15 core.Function _callback; |
| 16 core.bool _expectJson; |
17 | 17 |
| 18 void register(core.Function callback, core.bool expectJson) { |
| 19 _callback = callback; |
| 20 _expectJson = expectJson; |
| 21 } |
18 | 22 |
19 buildUnnamed1196() { | 23 async.Future<http.StreamedResponse> send(http.BaseRequest request) { |
| 24 if (_expectJson) { |
| 25 return request.finalize() |
| 26 .transform(convert.UTF8.decoder) |
| 27 .join('') |
| 28 .then((core.String jsonString) { |
| 29 if (jsonString.isEmpty) { |
| 30 return _callback(request, null); |
| 31 } else { |
| 32 return _callback(request, convert.JSON.decode(jsonString)); |
| 33 } |
| 34 }); |
| 35 } else { |
| 36 var stream = request.finalize(); |
| 37 if (stream == null) { |
| 38 return _callback(request, []); |
| 39 } else { |
| 40 return stream.toBytes().then((data) { |
| 41 return _callback(request, data); |
| 42 }); |
| 43 } |
| 44 } |
| 45 } |
| 46 } |
| 47 |
| 48 http.StreamedResponse stringResponse( |
| 49 core.int status, core.Map headers, core.String body) { |
| 50 var stream = new async.Stream.fromIterable([convert.UTF8.encode(body)]); |
| 51 return new http.StreamedResponse(stream, status, headers: headers); |
| 52 } |
| 53 |
| 54 buildUnnamed133() { |
20 var o = new core.List<api.Account>(); | 55 var o = new core.List<api.Account>(); |
21 o.add(buildAccount()); | 56 o.add(buildAccount()); |
22 o.add(buildAccount()); | 57 o.add(buildAccount()); |
23 return o; | 58 return o; |
24 } | 59 } |
25 | 60 |
26 checkUnnamed1196(core.List<api.Account> o) { | 61 checkUnnamed133(core.List<api.Account> o) { |
27 unittest.expect(o, unittest.hasLength(2)); | 62 unittest.expect(o, unittest.hasLength(2)); |
28 checkAccount(o[0]); | 63 checkAccount(o[0]); |
29 checkAccount(o[1]); | 64 checkAccount(o[1]); |
30 } | 65 } |
31 | 66 |
32 core.int buildCounterAccount = 0; | 67 core.int buildCounterAccount = 0; |
33 buildAccount() { | 68 buildAccount() { |
34 var o = new api.Account(); | 69 var o = new api.Account(); |
35 buildCounterAccount++; | 70 buildCounterAccount++; |
36 if (buildCounterAccount < 3) { | 71 if (buildCounterAccount < 3) { |
37 o.id = "foo"; | 72 o.id = "foo"; |
38 o.kind = "foo"; | 73 o.kind = "foo"; |
39 o.name = "foo"; | 74 o.name = "foo"; |
40 o.premium = true; | 75 o.premium = true; |
41 o.subAccounts = buildUnnamed1196(); | 76 o.subAccounts = buildUnnamed133(); |
42 o.timezone = "foo"; | 77 o.timezone = "foo"; |
43 } | 78 } |
44 buildCounterAccount--; | 79 buildCounterAccount--; |
45 return o; | 80 return o; |
46 } | 81 } |
47 | 82 |
48 checkAccount(api.Account o) { | 83 checkAccount(api.Account o) { |
49 buildCounterAccount++; | 84 buildCounterAccount++; |
50 if (buildCounterAccount < 3) { | 85 if (buildCounterAccount < 3) { |
51 unittest.expect(o.id, unittest.equals('foo')); | 86 unittest.expect(o.id, unittest.equals('foo')); |
52 unittest.expect(o.kind, unittest.equals('foo')); | 87 unittest.expect(o.kind, unittest.equals('foo')); |
53 unittest.expect(o.name, unittest.equals('foo')); | 88 unittest.expect(o.name, unittest.equals('foo')); |
54 unittest.expect(o.premium, unittest.isTrue); | 89 unittest.expect(o.premium, unittest.isTrue); |
55 checkUnnamed1196(o.subAccounts); | 90 checkUnnamed133(o.subAccounts); |
56 unittest.expect(o.timezone, unittest.equals('foo')); | 91 unittest.expect(o.timezone, unittest.equals('foo')); |
57 } | 92 } |
58 buildCounterAccount--; | 93 buildCounterAccount--; |
59 } | 94 } |
60 | 95 |
61 buildUnnamed1197() { | 96 buildUnnamed134() { |
62 var o = new core.List<api.Account>(); | 97 var o = new core.List<api.Account>(); |
63 o.add(buildAccount()); | 98 o.add(buildAccount()); |
64 o.add(buildAccount()); | 99 o.add(buildAccount()); |
65 return o; | 100 return o; |
66 } | 101 } |
67 | 102 |
68 checkUnnamed1197(core.List<api.Account> o) { | 103 checkUnnamed134(core.List<api.Account> o) { |
69 unittest.expect(o, unittest.hasLength(2)); | 104 unittest.expect(o, unittest.hasLength(2)); |
70 checkAccount(o[0]); | 105 checkAccount(o[0]); |
71 checkAccount(o[1]); | 106 checkAccount(o[1]); |
72 } | 107 } |
73 | 108 |
74 core.int buildCounterAccounts = 0; | 109 core.int buildCounterAccounts = 0; |
75 buildAccounts() { | 110 buildAccounts() { |
76 var o = new api.Accounts(); | 111 var o = new api.Accounts(); |
77 buildCounterAccounts++; | 112 buildCounterAccounts++; |
78 if (buildCounterAccounts < 3) { | 113 if (buildCounterAccounts < 3) { |
79 o.etag = "foo"; | 114 o.etag = "foo"; |
80 o.items = buildUnnamed1197(); | 115 o.items = buildUnnamed134(); |
81 o.kind = "foo"; | 116 o.kind = "foo"; |
82 o.nextPageToken = "foo"; | 117 o.nextPageToken = "foo"; |
83 } | 118 } |
84 buildCounterAccounts--; | 119 buildCounterAccounts--; |
85 return o; | 120 return o; |
86 } | 121 } |
87 | 122 |
88 checkAccounts(api.Accounts o) { | 123 checkAccounts(api.Accounts o) { |
89 buildCounterAccounts++; | 124 buildCounterAccounts++; |
90 if (buildCounterAccounts < 3) { | 125 if (buildCounterAccounts < 3) { |
91 unittest.expect(o.etag, unittest.equals('foo')); | 126 unittest.expect(o.etag, unittest.equals('foo')); |
92 checkUnnamed1197(o.items); | 127 checkUnnamed134(o.items); |
93 unittest.expect(o.kind, unittest.equals('foo')); | 128 unittest.expect(o.kind, unittest.equals('foo')); |
94 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 129 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
95 } | 130 } |
96 buildCounterAccounts--; | 131 buildCounterAccounts--; |
97 } | 132 } |
98 | 133 |
99 core.int buildCounterAdClient = 0; | 134 core.int buildCounterAdClient = 0; |
100 buildAdClient() { | 135 buildAdClient() { |
101 var o = new api.AdClient(); | 136 var o = new api.AdClient(); |
102 buildCounterAdClient++; | 137 buildCounterAdClient++; |
(...skipping 15 matching lines...) Expand all Loading... |
118 unittest.expect(o.arcOptIn, unittest.isTrue); | 153 unittest.expect(o.arcOptIn, unittest.isTrue); |
119 unittest.expect(o.arcReviewMode, unittest.equals('foo')); | 154 unittest.expect(o.arcReviewMode, unittest.equals('foo')); |
120 unittest.expect(o.id, unittest.equals('foo')); | 155 unittest.expect(o.id, unittest.equals('foo')); |
121 unittest.expect(o.kind, unittest.equals('foo')); | 156 unittest.expect(o.kind, unittest.equals('foo')); |
122 unittest.expect(o.productCode, unittest.equals('foo')); | 157 unittest.expect(o.productCode, unittest.equals('foo')); |
123 unittest.expect(o.supportsReporting, unittest.isTrue); | 158 unittest.expect(o.supportsReporting, unittest.isTrue); |
124 } | 159 } |
125 buildCounterAdClient--; | 160 buildCounterAdClient--; |
126 } | 161 } |
127 | 162 |
128 buildUnnamed1198() { | 163 buildUnnamed135() { |
129 var o = new core.List<api.AdClient>(); | 164 var o = new core.List<api.AdClient>(); |
130 o.add(buildAdClient()); | 165 o.add(buildAdClient()); |
131 o.add(buildAdClient()); | 166 o.add(buildAdClient()); |
132 return o; | 167 return o; |
133 } | 168 } |
134 | 169 |
135 checkUnnamed1198(core.List<api.AdClient> o) { | 170 checkUnnamed135(core.List<api.AdClient> o) { |
136 unittest.expect(o, unittest.hasLength(2)); | 171 unittest.expect(o, unittest.hasLength(2)); |
137 checkAdClient(o[0]); | 172 checkAdClient(o[0]); |
138 checkAdClient(o[1]); | 173 checkAdClient(o[1]); |
139 } | 174 } |
140 | 175 |
141 core.int buildCounterAdClients = 0; | 176 core.int buildCounterAdClients = 0; |
142 buildAdClients() { | 177 buildAdClients() { |
143 var o = new api.AdClients(); | 178 var o = new api.AdClients(); |
144 buildCounterAdClients++; | 179 buildCounterAdClients++; |
145 if (buildCounterAdClients < 3) { | 180 if (buildCounterAdClients < 3) { |
146 o.etag = "foo"; | 181 o.etag = "foo"; |
147 o.items = buildUnnamed1198(); | 182 o.items = buildUnnamed135(); |
148 o.kind = "foo"; | 183 o.kind = "foo"; |
149 o.nextPageToken = "foo"; | 184 o.nextPageToken = "foo"; |
150 } | 185 } |
151 buildCounterAdClients--; | 186 buildCounterAdClients--; |
152 return o; | 187 return o; |
153 } | 188 } |
154 | 189 |
155 checkAdClients(api.AdClients o) { | 190 checkAdClients(api.AdClients o) { |
156 buildCounterAdClients++; | 191 buildCounterAdClients++; |
157 if (buildCounterAdClients < 3) { | 192 if (buildCounterAdClients < 3) { |
158 unittest.expect(o.etag, unittest.equals('foo')); | 193 unittest.expect(o.etag, unittest.equals('foo')); |
159 checkUnnamed1198(o.items); | 194 checkUnnamed135(o.items); |
160 unittest.expect(o.kind, unittest.equals('foo')); | 195 unittest.expect(o.kind, unittest.equals('foo')); |
161 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 196 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
162 } | 197 } |
163 buildCounterAdClients--; | 198 buildCounterAdClients--; |
164 } | 199 } |
165 | 200 |
166 core.int buildCounterAdCode = 0; | 201 core.int buildCounterAdCode = 0; |
167 buildAdCode() { | 202 buildAdCode() { |
168 var o = new api.AdCode(); | 203 var o = new api.AdCode(); |
169 buildCounterAdCode++; | 204 buildCounterAdCode++; |
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
383 unittest.expect(o.id, unittest.equals('foo')); | 418 unittest.expect(o.id, unittest.equals('foo')); |
384 unittest.expect(o.kind, unittest.equals('foo')); | 419 unittest.expect(o.kind, unittest.equals('foo')); |
385 checkAdUnitMobileContentAdsSettings(o.mobileContentAdsSettings); | 420 checkAdUnitMobileContentAdsSettings(o.mobileContentAdsSettings); |
386 unittest.expect(o.name, unittest.equals('foo')); | 421 unittest.expect(o.name, unittest.equals('foo')); |
387 unittest.expect(o.savedStyleId, unittest.equals('foo')); | 422 unittest.expect(o.savedStyleId, unittest.equals('foo')); |
388 unittest.expect(o.status, unittest.equals('foo')); | 423 unittest.expect(o.status, unittest.equals('foo')); |
389 } | 424 } |
390 buildCounterAdUnit--; | 425 buildCounterAdUnit--; |
391 } | 426 } |
392 | 427 |
393 buildUnnamed1199() { | 428 buildUnnamed136() { |
394 var o = new core.List<api.AdUnit>(); | 429 var o = new core.List<api.AdUnit>(); |
395 o.add(buildAdUnit()); | 430 o.add(buildAdUnit()); |
396 o.add(buildAdUnit()); | 431 o.add(buildAdUnit()); |
397 return o; | 432 return o; |
398 } | 433 } |
399 | 434 |
400 checkUnnamed1199(core.List<api.AdUnit> o) { | 435 checkUnnamed136(core.List<api.AdUnit> o) { |
401 unittest.expect(o, unittest.hasLength(2)); | 436 unittest.expect(o, unittest.hasLength(2)); |
402 checkAdUnit(o[0]); | 437 checkAdUnit(o[0]); |
403 checkAdUnit(o[1]); | 438 checkAdUnit(o[1]); |
404 } | 439 } |
405 | 440 |
406 core.int buildCounterAdUnits = 0; | 441 core.int buildCounterAdUnits = 0; |
407 buildAdUnits() { | 442 buildAdUnits() { |
408 var o = new api.AdUnits(); | 443 var o = new api.AdUnits(); |
409 buildCounterAdUnits++; | 444 buildCounterAdUnits++; |
410 if (buildCounterAdUnits < 3) { | 445 if (buildCounterAdUnits < 3) { |
411 o.etag = "foo"; | 446 o.etag = "foo"; |
412 o.items = buildUnnamed1199(); | 447 o.items = buildUnnamed136(); |
413 o.kind = "foo"; | 448 o.kind = "foo"; |
414 o.nextPageToken = "foo"; | 449 o.nextPageToken = "foo"; |
415 } | 450 } |
416 buildCounterAdUnits--; | 451 buildCounterAdUnits--; |
417 return o; | 452 return o; |
418 } | 453 } |
419 | 454 |
420 checkAdUnits(api.AdUnits o) { | 455 checkAdUnits(api.AdUnits o) { |
421 buildCounterAdUnits++; | 456 buildCounterAdUnits++; |
422 if (buildCounterAdUnits < 3) { | 457 if (buildCounterAdUnits < 3) { |
423 unittest.expect(o.etag, unittest.equals('foo')); | 458 unittest.expect(o.etag, unittest.equals('foo')); |
424 checkUnnamed1199(o.items); | 459 checkUnnamed136(o.items); |
425 unittest.expect(o.kind, unittest.equals('foo')); | 460 unittest.expect(o.kind, unittest.equals('foo')); |
426 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 461 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
427 } | 462 } |
428 buildCounterAdUnits--; | 463 buildCounterAdUnits--; |
429 } | 464 } |
430 | 465 |
431 buildUnnamed1200() { | 466 buildUnnamed137() { |
432 var o = new core.List<core.String>(); | 467 var o = new core.List<core.String>(); |
433 o.add("foo"); | 468 o.add("foo"); |
434 o.add("foo"); | 469 o.add("foo"); |
435 return o; | 470 return o; |
436 } | 471 } |
437 | 472 |
438 checkUnnamed1200(core.List<core.String> o) { | 473 checkUnnamed137(core.List<core.String> o) { |
439 unittest.expect(o, unittest.hasLength(2)); | 474 unittest.expect(o, unittest.hasLength(2)); |
440 unittest.expect(o[0], unittest.equals('foo')); | 475 unittest.expect(o[0], unittest.equals('foo')); |
441 unittest.expect(o[1], unittest.equals('foo')); | 476 unittest.expect(o[1], unittest.equals('foo')); |
442 } | 477 } |
443 | 478 |
444 core.int buildCounterAdsenseReportsGenerateResponseHeaders = 0; | 479 core.int buildCounterAdsenseReportsGenerateResponseHeaders = 0; |
445 buildAdsenseReportsGenerateResponseHeaders() { | 480 buildAdsenseReportsGenerateResponseHeaders() { |
446 var o = new api.AdsenseReportsGenerateResponseHeaders(); | 481 var o = new api.AdsenseReportsGenerateResponseHeaders(); |
447 buildCounterAdsenseReportsGenerateResponseHeaders++; | 482 buildCounterAdsenseReportsGenerateResponseHeaders++; |
448 if (buildCounterAdsenseReportsGenerateResponseHeaders < 3) { | 483 if (buildCounterAdsenseReportsGenerateResponseHeaders < 3) { |
449 o.currency = "foo"; | 484 o.currency = "foo"; |
450 o.name = "foo"; | 485 o.name = "foo"; |
451 o.type = "foo"; | 486 o.type = "foo"; |
452 } | 487 } |
453 buildCounterAdsenseReportsGenerateResponseHeaders--; | 488 buildCounterAdsenseReportsGenerateResponseHeaders--; |
454 return o; | 489 return o; |
455 } | 490 } |
456 | 491 |
457 checkAdsenseReportsGenerateResponseHeaders(api.AdsenseReportsGenerateResponseHea
ders o) { | 492 checkAdsenseReportsGenerateResponseHeaders(api.AdsenseReportsGenerateResponseHea
ders o) { |
458 buildCounterAdsenseReportsGenerateResponseHeaders++; | 493 buildCounterAdsenseReportsGenerateResponseHeaders++; |
459 if (buildCounterAdsenseReportsGenerateResponseHeaders < 3) { | 494 if (buildCounterAdsenseReportsGenerateResponseHeaders < 3) { |
460 unittest.expect(o.currency, unittest.equals('foo')); | 495 unittest.expect(o.currency, unittest.equals('foo')); |
461 unittest.expect(o.name, unittest.equals('foo')); | 496 unittest.expect(o.name, unittest.equals('foo')); |
462 unittest.expect(o.type, unittest.equals('foo')); | 497 unittest.expect(o.type, unittest.equals('foo')); |
463 } | 498 } |
464 buildCounterAdsenseReportsGenerateResponseHeaders--; | 499 buildCounterAdsenseReportsGenerateResponseHeaders--; |
465 } | 500 } |
466 | 501 |
467 buildUnnamed1201() { | 502 buildUnnamed138() { |
468 var o = new core.List<api.AdsenseReportsGenerateResponseHeaders>(); | 503 var o = new core.List<api.AdsenseReportsGenerateResponseHeaders>(); |
469 o.add(buildAdsenseReportsGenerateResponseHeaders()); | 504 o.add(buildAdsenseReportsGenerateResponseHeaders()); |
470 o.add(buildAdsenseReportsGenerateResponseHeaders()); | 505 o.add(buildAdsenseReportsGenerateResponseHeaders()); |
471 return o; | 506 return o; |
472 } | 507 } |
473 | 508 |
474 checkUnnamed1201(core.List<api.AdsenseReportsGenerateResponseHeaders> o) { | 509 checkUnnamed138(core.List<api.AdsenseReportsGenerateResponseHeaders> o) { |
475 unittest.expect(o, unittest.hasLength(2)); | 510 unittest.expect(o, unittest.hasLength(2)); |
476 checkAdsenseReportsGenerateResponseHeaders(o[0]); | 511 checkAdsenseReportsGenerateResponseHeaders(o[0]); |
477 checkAdsenseReportsGenerateResponseHeaders(o[1]); | 512 checkAdsenseReportsGenerateResponseHeaders(o[1]); |
478 } | 513 } |
479 | 514 |
480 buildUnnamed1202() { | 515 buildUnnamed139() { |
481 var o = new core.List<core.String>(); | 516 var o = new core.List<core.String>(); |
482 o.add("foo"); | 517 o.add("foo"); |
483 o.add("foo"); | 518 o.add("foo"); |
484 return o; | 519 return o; |
485 } | 520 } |
486 | 521 |
487 checkUnnamed1202(core.List<core.String> o) { | 522 checkUnnamed139(core.List<core.String> o) { |
488 unittest.expect(o, unittest.hasLength(2)); | 523 unittest.expect(o, unittest.hasLength(2)); |
489 unittest.expect(o[0], unittest.equals('foo')); | 524 unittest.expect(o[0], unittest.equals('foo')); |
490 unittest.expect(o[1], unittest.equals('foo')); | 525 unittest.expect(o[1], unittest.equals('foo')); |
491 } | 526 } |
492 | 527 |
493 buildUnnamed1203() { | 528 buildUnnamed140() { |
494 var o = new core.List<core.List<core.String>>(); | 529 var o = new core.List<core.List<core.String>>(); |
495 o.add(buildUnnamed1202()); | 530 o.add(buildUnnamed139()); |
496 o.add(buildUnnamed1202()); | 531 o.add(buildUnnamed139()); |
497 return o; | 532 return o; |
498 } | 533 } |
499 | 534 |
500 checkUnnamed1203(core.List<core.List<core.String>> o) { | 535 checkUnnamed140(core.List<core.List<core.String>> o) { |
501 unittest.expect(o, unittest.hasLength(2)); | 536 unittest.expect(o, unittest.hasLength(2)); |
502 checkUnnamed1202(o[0]); | 537 checkUnnamed139(o[0]); |
503 checkUnnamed1202(o[1]); | 538 checkUnnamed139(o[1]); |
504 } | 539 } |
505 | 540 |
506 buildUnnamed1204() { | 541 buildUnnamed141() { |
507 var o = new core.List<core.String>(); | 542 var o = new core.List<core.String>(); |
508 o.add("foo"); | 543 o.add("foo"); |
509 o.add("foo"); | 544 o.add("foo"); |
510 return o; | 545 return o; |
511 } | 546 } |
512 | 547 |
513 checkUnnamed1204(core.List<core.String> o) { | 548 checkUnnamed141(core.List<core.String> o) { |
514 unittest.expect(o, unittest.hasLength(2)); | 549 unittest.expect(o, unittest.hasLength(2)); |
515 unittest.expect(o[0], unittest.equals('foo')); | 550 unittest.expect(o[0], unittest.equals('foo')); |
516 unittest.expect(o[1], unittest.equals('foo')); | 551 unittest.expect(o[1], unittest.equals('foo')); |
517 } | 552 } |
518 | 553 |
519 buildUnnamed1205() { | 554 buildUnnamed142() { |
520 var o = new core.List<core.String>(); | 555 var o = new core.List<core.String>(); |
521 o.add("foo"); | 556 o.add("foo"); |
522 o.add("foo"); | 557 o.add("foo"); |
523 return o; | 558 return o; |
524 } | 559 } |
525 | 560 |
526 checkUnnamed1205(core.List<core.String> o) { | 561 checkUnnamed142(core.List<core.String> o) { |
527 unittest.expect(o, unittest.hasLength(2)); | 562 unittest.expect(o, unittest.hasLength(2)); |
528 unittest.expect(o[0], unittest.equals('foo')); | 563 unittest.expect(o[0], unittest.equals('foo')); |
529 unittest.expect(o[1], unittest.equals('foo')); | 564 unittest.expect(o[1], unittest.equals('foo')); |
530 } | 565 } |
531 | 566 |
532 core.int buildCounterAdsenseReportsGenerateResponse = 0; | 567 core.int buildCounterAdsenseReportsGenerateResponse = 0; |
533 buildAdsenseReportsGenerateResponse() { | 568 buildAdsenseReportsGenerateResponse() { |
534 var o = new api.AdsenseReportsGenerateResponse(); | 569 var o = new api.AdsenseReportsGenerateResponse(); |
535 buildCounterAdsenseReportsGenerateResponse++; | 570 buildCounterAdsenseReportsGenerateResponse++; |
536 if (buildCounterAdsenseReportsGenerateResponse < 3) { | 571 if (buildCounterAdsenseReportsGenerateResponse < 3) { |
537 o.averages = buildUnnamed1200(); | 572 o.averages = buildUnnamed137(); |
538 o.endDate = "foo"; | 573 o.endDate = "foo"; |
539 o.headers = buildUnnamed1201(); | 574 o.headers = buildUnnamed138(); |
540 o.kind = "foo"; | 575 o.kind = "foo"; |
541 o.rows = buildUnnamed1203(); | 576 o.rows = buildUnnamed140(); |
542 o.startDate = "foo"; | 577 o.startDate = "foo"; |
543 o.totalMatchedRows = "foo"; | 578 o.totalMatchedRows = "foo"; |
544 o.totals = buildUnnamed1204(); | 579 o.totals = buildUnnamed141(); |
545 o.warnings = buildUnnamed1205(); | 580 o.warnings = buildUnnamed142(); |
546 } | 581 } |
547 buildCounterAdsenseReportsGenerateResponse--; | 582 buildCounterAdsenseReportsGenerateResponse--; |
548 return o; | 583 return o; |
549 } | 584 } |
550 | 585 |
551 checkAdsenseReportsGenerateResponse(api.AdsenseReportsGenerateResponse o) { | 586 checkAdsenseReportsGenerateResponse(api.AdsenseReportsGenerateResponse o) { |
552 buildCounterAdsenseReportsGenerateResponse++; | 587 buildCounterAdsenseReportsGenerateResponse++; |
553 if (buildCounterAdsenseReportsGenerateResponse < 3) { | 588 if (buildCounterAdsenseReportsGenerateResponse < 3) { |
554 checkUnnamed1200(o.averages); | 589 checkUnnamed137(o.averages); |
555 unittest.expect(o.endDate, unittest.equals('foo')); | 590 unittest.expect(o.endDate, unittest.equals('foo')); |
556 checkUnnamed1201(o.headers); | 591 checkUnnamed138(o.headers); |
557 unittest.expect(o.kind, unittest.equals('foo')); | 592 unittest.expect(o.kind, unittest.equals('foo')); |
558 checkUnnamed1203(o.rows); | 593 checkUnnamed140(o.rows); |
559 unittest.expect(o.startDate, unittest.equals('foo')); | 594 unittest.expect(o.startDate, unittest.equals('foo')); |
560 unittest.expect(o.totalMatchedRows, unittest.equals('foo')); | 595 unittest.expect(o.totalMatchedRows, unittest.equals('foo')); |
561 checkUnnamed1204(o.totals); | 596 checkUnnamed141(o.totals); |
562 checkUnnamed1205(o.warnings); | 597 checkUnnamed142(o.warnings); |
563 } | 598 } |
564 buildCounterAdsenseReportsGenerateResponse--; | 599 buildCounterAdsenseReportsGenerateResponse--; |
565 } | 600 } |
566 | 601 |
567 core.int buildCounterAlert = 0; | 602 core.int buildCounterAlert = 0; |
568 buildAlert() { | 603 buildAlert() { |
569 var o = new api.Alert(); | 604 var o = new api.Alert(); |
570 buildCounterAlert++; | 605 buildCounterAlert++; |
571 if (buildCounterAlert < 3) { | 606 if (buildCounterAlert < 3) { |
572 o.id = "foo"; | 607 o.id = "foo"; |
(...skipping 13 matching lines...) Expand all Loading... |
586 unittest.expect(o.id, unittest.equals('foo')); | 621 unittest.expect(o.id, unittest.equals('foo')); |
587 unittest.expect(o.isDismissible, unittest.isTrue); | 622 unittest.expect(o.isDismissible, unittest.isTrue); |
588 unittest.expect(o.kind, unittest.equals('foo')); | 623 unittest.expect(o.kind, unittest.equals('foo')); |
589 unittest.expect(o.message, unittest.equals('foo')); | 624 unittest.expect(o.message, unittest.equals('foo')); |
590 unittest.expect(o.severity, unittest.equals('foo')); | 625 unittest.expect(o.severity, unittest.equals('foo')); |
591 unittest.expect(o.type, unittest.equals('foo')); | 626 unittest.expect(o.type, unittest.equals('foo')); |
592 } | 627 } |
593 buildCounterAlert--; | 628 buildCounterAlert--; |
594 } | 629 } |
595 | 630 |
596 buildUnnamed1206() { | 631 buildUnnamed143() { |
597 var o = new core.List<api.Alert>(); | 632 var o = new core.List<api.Alert>(); |
598 o.add(buildAlert()); | 633 o.add(buildAlert()); |
599 o.add(buildAlert()); | 634 o.add(buildAlert()); |
600 return o; | 635 return o; |
601 } | 636 } |
602 | 637 |
603 checkUnnamed1206(core.List<api.Alert> o) { | 638 checkUnnamed143(core.List<api.Alert> o) { |
604 unittest.expect(o, unittest.hasLength(2)); | 639 unittest.expect(o, unittest.hasLength(2)); |
605 checkAlert(o[0]); | 640 checkAlert(o[0]); |
606 checkAlert(o[1]); | 641 checkAlert(o[1]); |
607 } | 642 } |
608 | 643 |
609 core.int buildCounterAlerts = 0; | 644 core.int buildCounterAlerts = 0; |
610 buildAlerts() { | 645 buildAlerts() { |
611 var o = new api.Alerts(); | 646 var o = new api.Alerts(); |
612 buildCounterAlerts++; | 647 buildCounterAlerts++; |
613 if (buildCounterAlerts < 3) { | 648 if (buildCounterAlerts < 3) { |
614 o.items = buildUnnamed1206(); | 649 o.items = buildUnnamed143(); |
615 o.kind = "foo"; | 650 o.kind = "foo"; |
616 } | 651 } |
617 buildCounterAlerts--; | 652 buildCounterAlerts--; |
618 return o; | 653 return o; |
619 } | 654 } |
620 | 655 |
621 checkAlerts(api.Alerts o) { | 656 checkAlerts(api.Alerts o) { |
622 buildCounterAlerts++; | 657 buildCounterAlerts++; |
623 if (buildCounterAlerts < 3) { | 658 if (buildCounterAlerts < 3) { |
624 checkUnnamed1206(o.items); | 659 checkUnnamed143(o.items); |
625 unittest.expect(o.kind, unittest.equals('foo')); | 660 unittest.expect(o.kind, unittest.equals('foo')); |
626 } | 661 } |
627 buildCounterAlerts--; | 662 buildCounterAlerts--; |
628 } | 663 } |
629 | 664 |
630 core.int buildCounterCustomChannelTargetingInfo = 0; | 665 core.int buildCounterCustomChannelTargetingInfo = 0; |
631 buildCustomChannelTargetingInfo() { | 666 buildCustomChannelTargetingInfo() { |
632 var o = new api.CustomChannelTargetingInfo(); | 667 var o = new api.CustomChannelTargetingInfo(); |
633 buildCounterCustomChannelTargetingInfo++; | 668 buildCounterCustomChannelTargetingInfo++; |
634 if (buildCounterCustomChannelTargetingInfo < 3) { | 669 if (buildCounterCustomChannelTargetingInfo < 3) { |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
672 if (buildCounterCustomChannel < 3) { | 707 if (buildCounterCustomChannel < 3) { |
673 unittest.expect(o.code, unittest.equals('foo')); | 708 unittest.expect(o.code, unittest.equals('foo')); |
674 unittest.expect(o.id, unittest.equals('foo')); | 709 unittest.expect(o.id, unittest.equals('foo')); |
675 unittest.expect(o.kind, unittest.equals('foo')); | 710 unittest.expect(o.kind, unittest.equals('foo')); |
676 unittest.expect(o.name, unittest.equals('foo')); | 711 unittest.expect(o.name, unittest.equals('foo')); |
677 checkCustomChannelTargetingInfo(o.targetingInfo); | 712 checkCustomChannelTargetingInfo(o.targetingInfo); |
678 } | 713 } |
679 buildCounterCustomChannel--; | 714 buildCounterCustomChannel--; |
680 } | 715 } |
681 | 716 |
682 buildUnnamed1207() { | 717 buildUnnamed144() { |
683 var o = new core.List<api.CustomChannel>(); | 718 var o = new core.List<api.CustomChannel>(); |
684 o.add(buildCustomChannel()); | 719 o.add(buildCustomChannel()); |
685 o.add(buildCustomChannel()); | 720 o.add(buildCustomChannel()); |
686 return o; | 721 return o; |
687 } | 722 } |
688 | 723 |
689 checkUnnamed1207(core.List<api.CustomChannel> o) { | 724 checkUnnamed144(core.List<api.CustomChannel> o) { |
690 unittest.expect(o, unittest.hasLength(2)); | 725 unittest.expect(o, unittest.hasLength(2)); |
691 checkCustomChannel(o[0]); | 726 checkCustomChannel(o[0]); |
692 checkCustomChannel(o[1]); | 727 checkCustomChannel(o[1]); |
693 } | 728 } |
694 | 729 |
695 core.int buildCounterCustomChannels = 0; | 730 core.int buildCounterCustomChannels = 0; |
696 buildCustomChannels() { | 731 buildCustomChannels() { |
697 var o = new api.CustomChannels(); | 732 var o = new api.CustomChannels(); |
698 buildCounterCustomChannels++; | 733 buildCounterCustomChannels++; |
699 if (buildCounterCustomChannels < 3) { | 734 if (buildCounterCustomChannels < 3) { |
700 o.etag = "foo"; | 735 o.etag = "foo"; |
701 o.items = buildUnnamed1207(); | 736 o.items = buildUnnamed144(); |
702 o.kind = "foo"; | 737 o.kind = "foo"; |
703 o.nextPageToken = "foo"; | 738 o.nextPageToken = "foo"; |
704 } | 739 } |
705 buildCounterCustomChannels--; | 740 buildCounterCustomChannels--; |
706 return o; | 741 return o; |
707 } | 742 } |
708 | 743 |
709 checkCustomChannels(api.CustomChannels o) { | 744 checkCustomChannels(api.CustomChannels o) { |
710 buildCounterCustomChannels++; | 745 buildCounterCustomChannels++; |
711 if (buildCounterCustomChannels < 3) { | 746 if (buildCounterCustomChannels < 3) { |
712 unittest.expect(o.etag, unittest.equals('foo')); | 747 unittest.expect(o.etag, unittest.equals('foo')); |
713 checkUnnamed1207(o.items); | 748 checkUnnamed144(o.items); |
714 unittest.expect(o.kind, unittest.equals('foo')); | 749 unittest.expect(o.kind, unittest.equals('foo')); |
715 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 750 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
716 } | 751 } |
717 buildCounterCustomChannels--; | 752 buildCounterCustomChannels--; |
718 } | 753 } |
719 | 754 |
720 buildUnnamed1208() { | 755 buildUnnamed145() { |
721 var o = new core.List<api.ReportingMetadataEntry>(); | 756 var o = new core.List<api.ReportingMetadataEntry>(); |
722 o.add(buildReportingMetadataEntry()); | 757 o.add(buildReportingMetadataEntry()); |
723 o.add(buildReportingMetadataEntry()); | 758 o.add(buildReportingMetadataEntry()); |
724 return o; | 759 return o; |
725 } | 760 } |
726 | 761 |
727 checkUnnamed1208(core.List<api.ReportingMetadataEntry> o) { | 762 checkUnnamed145(core.List<api.ReportingMetadataEntry> o) { |
728 unittest.expect(o, unittest.hasLength(2)); | 763 unittest.expect(o, unittest.hasLength(2)); |
729 checkReportingMetadataEntry(o[0]); | 764 checkReportingMetadataEntry(o[0]); |
730 checkReportingMetadataEntry(o[1]); | 765 checkReportingMetadataEntry(o[1]); |
731 } | 766 } |
732 | 767 |
733 core.int buildCounterMetadata = 0; | 768 core.int buildCounterMetadata = 0; |
734 buildMetadata() { | 769 buildMetadata() { |
735 var o = new api.Metadata(); | 770 var o = new api.Metadata(); |
736 buildCounterMetadata++; | 771 buildCounterMetadata++; |
737 if (buildCounterMetadata < 3) { | 772 if (buildCounterMetadata < 3) { |
738 o.items = buildUnnamed1208(); | 773 o.items = buildUnnamed145(); |
739 o.kind = "foo"; | 774 o.kind = "foo"; |
740 } | 775 } |
741 buildCounterMetadata--; | 776 buildCounterMetadata--; |
742 return o; | 777 return o; |
743 } | 778 } |
744 | 779 |
745 checkMetadata(api.Metadata o) { | 780 checkMetadata(api.Metadata o) { |
746 buildCounterMetadata++; | 781 buildCounterMetadata++; |
747 if (buildCounterMetadata < 3) { | 782 if (buildCounterMetadata < 3) { |
748 checkUnnamed1208(o.items); | 783 checkUnnamed145(o.items); |
749 unittest.expect(o.kind, unittest.equals('foo')); | 784 unittest.expect(o.kind, unittest.equals('foo')); |
750 } | 785 } |
751 buildCounterMetadata--; | 786 buildCounterMetadata--; |
752 } | 787 } |
753 | 788 |
754 core.int buildCounterPayment = 0; | 789 core.int buildCounterPayment = 0; |
755 buildPayment() { | 790 buildPayment() { |
756 var o = new api.Payment(); | 791 var o = new api.Payment(); |
757 buildCounterPayment++; | 792 buildCounterPayment++; |
758 if (buildCounterPayment < 3) { | 793 if (buildCounterPayment < 3) { |
(...skipping 12 matching lines...) Expand all Loading... |
771 if (buildCounterPayment < 3) { | 806 if (buildCounterPayment < 3) { |
772 unittest.expect(o.id, unittest.equals('foo')); | 807 unittest.expect(o.id, unittest.equals('foo')); |
773 unittest.expect(o.kind, unittest.equals('foo')); | 808 unittest.expect(o.kind, unittest.equals('foo')); |
774 unittest.expect(o.paymentAmount, unittest.equals('foo')); | 809 unittest.expect(o.paymentAmount, unittest.equals('foo')); |
775 unittest.expect(o.paymentAmountCurrencyCode, unittest.equals('foo')); | 810 unittest.expect(o.paymentAmountCurrencyCode, unittest.equals('foo')); |
776 unittest.expect(o.paymentDate, unittest.equals('foo')); | 811 unittest.expect(o.paymentDate, unittest.equals('foo')); |
777 } | 812 } |
778 buildCounterPayment--; | 813 buildCounterPayment--; |
779 } | 814 } |
780 | 815 |
781 buildUnnamed1209() { | 816 buildUnnamed146() { |
782 var o = new core.List<api.Payment>(); | 817 var o = new core.List<api.Payment>(); |
783 o.add(buildPayment()); | 818 o.add(buildPayment()); |
784 o.add(buildPayment()); | 819 o.add(buildPayment()); |
785 return o; | 820 return o; |
786 } | 821 } |
787 | 822 |
788 checkUnnamed1209(core.List<api.Payment> o) { | 823 checkUnnamed146(core.List<api.Payment> o) { |
789 unittest.expect(o, unittest.hasLength(2)); | 824 unittest.expect(o, unittest.hasLength(2)); |
790 checkPayment(o[0]); | 825 checkPayment(o[0]); |
791 checkPayment(o[1]); | 826 checkPayment(o[1]); |
792 } | 827 } |
793 | 828 |
794 core.int buildCounterPayments = 0; | 829 core.int buildCounterPayments = 0; |
795 buildPayments() { | 830 buildPayments() { |
796 var o = new api.Payments(); | 831 var o = new api.Payments(); |
797 buildCounterPayments++; | 832 buildCounterPayments++; |
798 if (buildCounterPayments < 3) { | 833 if (buildCounterPayments < 3) { |
799 o.items = buildUnnamed1209(); | 834 o.items = buildUnnamed146(); |
800 o.kind = "foo"; | 835 o.kind = "foo"; |
801 } | 836 } |
802 buildCounterPayments--; | 837 buildCounterPayments--; |
803 return o; | 838 return o; |
804 } | 839 } |
805 | 840 |
806 checkPayments(api.Payments o) { | 841 checkPayments(api.Payments o) { |
807 buildCounterPayments++; | 842 buildCounterPayments++; |
808 if (buildCounterPayments < 3) { | 843 if (buildCounterPayments < 3) { |
809 checkUnnamed1209(o.items); | 844 checkUnnamed146(o.items); |
810 unittest.expect(o.kind, unittest.equals('foo')); | 845 unittest.expect(o.kind, unittest.equals('foo')); |
811 } | 846 } |
812 buildCounterPayments--; | 847 buildCounterPayments--; |
813 } | 848 } |
814 | 849 |
815 buildUnnamed1210() { | 850 buildUnnamed147() { |
816 var o = new core.List<core.String>(); | 851 var o = new core.List<core.String>(); |
817 o.add("foo"); | 852 o.add("foo"); |
818 o.add("foo"); | 853 o.add("foo"); |
819 return o; | 854 return o; |
820 } | 855 } |
821 | 856 |
822 checkUnnamed1210(core.List<core.String> o) { | 857 checkUnnamed147(core.List<core.String> o) { |
823 unittest.expect(o, unittest.hasLength(2)); | 858 unittest.expect(o, unittest.hasLength(2)); |
824 unittest.expect(o[0], unittest.equals('foo')); | 859 unittest.expect(o[0], unittest.equals('foo')); |
825 unittest.expect(o[1], unittest.equals('foo')); | 860 unittest.expect(o[1], unittest.equals('foo')); |
826 } | 861 } |
827 | 862 |
828 buildUnnamed1211() { | 863 buildUnnamed148() { |
829 var o = new core.List<core.String>(); | 864 var o = new core.List<core.String>(); |
830 o.add("foo"); | 865 o.add("foo"); |
831 o.add("foo"); | 866 o.add("foo"); |
832 return o; | 867 return o; |
833 } | 868 } |
834 | 869 |
835 checkUnnamed1211(core.List<core.String> o) { | 870 checkUnnamed148(core.List<core.String> o) { |
836 unittest.expect(o, unittest.hasLength(2)); | 871 unittest.expect(o, unittest.hasLength(2)); |
837 unittest.expect(o[0], unittest.equals('foo')); | 872 unittest.expect(o[0], unittest.equals('foo')); |
838 unittest.expect(o[1], unittest.equals('foo')); | 873 unittest.expect(o[1], unittest.equals('foo')); |
839 } | 874 } |
840 | 875 |
841 buildUnnamed1212() { | 876 buildUnnamed149() { |
842 var o = new core.List<core.String>(); | 877 var o = new core.List<core.String>(); |
843 o.add("foo"); | 878 o.add("foo"); |
844 o.add("foo"); | 879 o.add("foo"); |
845 return o; | 880 return o; |
846 } | 881 } |
847 | 882 |
848 checkUnnamed1212(core.List<core.String> o) { | 883 checkUnnamed149(core.List<core.String> o) { |
849 unittest.expect(o, unittest.hasLength(2)); | 884 unittest.expect(o, unittest.hasLength(2)); |
850 unittest.expect(o[0], unittest.equals('foo')); | 885 unittest.expect(o[0], unittest.equals('foo')); |
851 unittest.expect(o[1], unittest.equals('foo')); | 886 unittest.expect(o[1], unittest.equals('foo')); |
852 } | 887 } |
853 | 888 |
854 buildUnnamed1213() { | 889 buildUnnamed150() { |
855 var o = new core.List<core.String>(); | 890 var o = new core.List<core.String>(); |
856 o.add("foo"); | 891 o.add("foo"); |
857 o.add("foo"); | 892 o.add("foo"); |
858 return o; | 893 return o; |
859 } | 894 } |
860 | 895 |
861 checkUnnamed1213(core.List<core.String> o) { | 896 checkUnnamed150(core.List<core.String> o) { |
862 unittest.expect(o, unittest.hasLength(2)); | 897 unittest.expect(o, unittest.hasLength(2)); |
863 unittest.expect(o[0], unittest.equals('foo')); | 898 unittest.expect(o[0], unittest.equals('foo')); |
864 unittest.expect(o[1], unittest.equals('foo')); | 899 unittest.expect(o[1], unittest.equals('foo')); |
865 } | 900 } |
866 | 901 |
867 buildUnnamed1214() { | 902 buildUnnamed151() { |
868 var o = new core.List<core.String>(); | 903 var o = new core.List<core.String>(); |
869 o.add("foo"); | 904 o.add("foo"); |
870 o.add("foo"); | 905 o.add("foo"); |
871 return o; | 906 return o; |
872 } | 907 } |
873 | 908 |
874 checkUnnamed1214(core.List<core.String> o) { | 909 checkUnnamed151(core.List<core.String> o) { |
875 unittest.expect(o, unittest.hasLength(2)); | 910 unittest.expect(o, unittest.hasLength(2)); |
876 unittest.expect(o[0], unittest.equals('foo')); | 911 unittest.expect(o[0], unittest.equals('foo')); |
877 unittest.expect(o[1], unittest.equals('foo')); | 912 unittest.expect(o[1], unittest.equals('foo')); |
878 } | 913 } |
879 | 914 |
880 core.int buildCounterReportingMetadataEntry = 0; | 915 core.int buildCounterReportingMetadataEntry = 0; |
881 buildReportingMetadataEntry() { | 916 buildReportingMetadataEntry() { |
882 var o = new api.ReportingMetadataEntry(); | 917 var o = new api.ReportingMetadataEntry(); |
883 buildCounterReportingMetadataEntry++; | 918 buildCounterReportingMetadataEntry++; |
884 if (buildCounterReportingMetadataEntry < 3) { | 919 if (buildCounterReportingMetadataEntry < 3) { |
885 o.compatibleDimensions = buildUnnamed1210(); | 920 o.compatibleDimensions = buildUnnamed147(); |
886 o.compatibleMetrics = buildUnnamed1211(); | 921 o.compatibleMetrics = buildUnnamed148(); |
887 o.id = "foo"; | 922 o.id = "foo"; |
888 o.kind = "foo"; | 923 o.kind = "foo"; |
889 o.requiredDimensions = buildUnnamed1212(); | 924 o.requiredDimensions = buildUnnamed149(); |
890 o.requiredMetrics = buildUnnamed1213(); | 925 o.requiredMetrics = buildUnnamed150(); |
891 o.supportedProducts = buildUnnamed1214(); | 926 o.supportedProducts = buildUnnamed151(); |
892 } | 927 } |
893 buildCounterReportingMetadataEntry--; | 928 buildCounterReportingMetadataEntry--; |
894 return o; | 929 return o; |
895 } | 930 } |
896 | 931 |
897 checkReportingMetadataEntry(api.ReportingMetadataEntry o) { | 932 checkReportingMetadataEntry(api.ReportingMetadataEntry o) { |
898 buildCounterReportingMetadataEntry++; | 933 buildCounterReportingMetadataEntry++; |
899 if (buildCounterReportingMetadataEntry < 3) { | 934 if (buildCounterReportingMetadataEntry < 3) { |
900 checkUnnamed1210(o.compatibleDimensions); | 935 checkUnnamed147(o.compatibleDimensions); |
901 checkUnnamed1211(o.compatibleMetrics); | 936 checkUnnamed148(o.compatibleMetrics); |
902 unittest.expect(o.id, unittest.equals('foo')); | 937 unittest.expect(o.id, unittest.equals('foo')); |
903 unittest.expect(o.kind, unittest.equals('foo')); | 938 unittest.expect(o.kind, unittest.equals('foo')); |
904 checkUnnamed1212(o.requiredDimensions); | 939 checkUnnamed149(o.requiredDimensions); |
905 checkUnnamed1213(o.requiredMetrics); | 940 checkUnnamed150(o.requiredMetrics); |
906 checkUnnamed1214(o.supportedProducts); | 941 checkUnnamed151(o.supportedProducts); |
907 } | 942 } |
908 buildCounterReportingMetadataEntry--; | 943 buildCounterReportingMetadataEntry--; |
909 } | 944 } |
910 | 945 |
911 core.int buildCounterSavedAdStyle = 0; | 946 core.int buildCounterSavedAdStyle = 0; |
912 buildSavedAdStyle() { | 947 buildSavedAdStyle() { |
913 var o = new api.SavedAdStyle(); | 948 var o = new api.SavedAdStyle(); |
914 buildCounterSavedAdStyle++; | 949 buildCounterSavedAdStyle++; |
915 if (buildCounterSavedAdStyle < 3) { | 950 if (buildCounterSavedAdStyle < 3) { |
916 o.adStyle = buildAdStyle(); | 951 o.adStyle = buildAdStyle(); |
917 o.id = "foo"; | 952 o.id = "foo"; |
918 o.kind = "foo"; | 953 o.kind = "foo"; |
919 o.name = "foo"; | 954 o.name = "foo"; |
920 } | 955 } |
921 buildCounterSavedAdStyle--; | 956 buildCounterSavedAdStyle--; |
922 return o; | 957 return o; |
923 } | 958 } |
924 | 959 |
925 checkSavedAdStyle(api.SavedAdStyle o) { | 960 checkSavedAdStyle(api.SavedAdStyle o) { |
926 buildCounterSavedAdStyle++; | 961 buildCounterSavedAdStyle++; |
927 if (buildCounterSavedAdStyle < 3) { | 962 if (buildCounterSavedAdStyle < 3) { |
928 checkAdStyle(o.adStyle); | 963 checkAdStyle(o.adStyle); |
929 unittest.expect(o.id, unittest.equals('foo')); | 964 unittest.expect(o.id, unittest.equals('foo')); |
930 unittest.expect(o.kind, unittest.equals('foo')); | 965 unittest.expect(o.kind, unittest.equals('foo')); |
931 unittest.expect(o.name, unittest.equals('foo')); | 966 unittest.expect(o.name, unittest.equals('foo')); |
932 } | 967 } |
933 buildCounterSavedAdStyle--; | 968 buildCounterSavedAdStyle--; |
934 } | 969 } |
935 | 970 |
936 buildUnnamed1215() { | 971 buildUnnamed152() { |
937 var o = new core.List<api.SavedAdStyle>(); | 972 var o = new core.List<api.SavedAdStyle>(); |
938 o.add(buildSavedAdStyle()); | 973 o.add(buildSavedAdStyle()); |
939 o.add(buildSavedAdStyle()); | 974 o.add(buildSavedAdStyle()); |
940 return o; | 975 return o; |
941 } | 976 } |
942 | 977 |
943 checkUnnamed1215(core.List<api.SavedAdStyle> o) { | 978 checkUnnamed152(core.List<api.SavedAdStyle> o) { |
944 unittest.expect(o, unittest.hasLength(2)); | 979 unittest.expect(o, unittest.hasLength(2)); |
945 checkSavedAdStyle(o[0]); | 980 checkSavedAdStyle(o[0]); |
946 checkSavedAdStyle(o[1]); | 981 checkSavedAdStyle(o[1]); |
947 } | 982 } |
948 | 983 |
949 core.int buildCounterSavedAdStyles = 0; | 984 core.int buildCounterSavedAdStyles = 0; |
950 buildSavedAdStyles() { | 985 buildSavedAdStyles() { |
951 var o = new api.SavedAdStyles(); | 986 var o = new api.SavedAdStyles(); |
952 buildCounterSavedAdStyles++; | 987 buildCounterSavedAdStyles++; |
953 if (buildCounterSavedAdStyles < 3) { | 988 if (buildCounterSavedAdStyles < 3) { |
954 o.etag = "foo"; | 989 o.etag = "foo"; |
955 o.items = buildUnnamed1215(); | 990 o.items = buildUnnamed152(); |
956 o.kind = "foo"; | 991 o.kind = "foo"; |
957 o.nextPageToken = "foo"; | 992 o.nextPageToken = "foo"; |
958 } | 993 } |
959 buildCounterSavedAdStyles--; | 994 buildCounterSavedAdStyles--; |
960 return o; | 995 return o; |
961 } | 996 } |
962 | 997 |
963 checkSavedAdStyles(api.SavedAdStyles o) { | 998 checkSavedAdStyles(api.SavedAdStyles o) { |
964 buildCounterSavedAdStyles++; | 999 buildCounterSavedAdStyles++; |
965 if (buildCounterSavedAdStyles < 3) { | 1000 if (buildCounterSavedAdStyles < 3) { |
966 unittest.expect(o.etag, unittest.equals('foo')); | 1001 unittest.expect(o.etag, unittest.equals('foo')); |
967 checkUnnamed1215(o.items); | 1002 checkUnnamed152(o.items); |
968 unittest.expect(o.kind, unittest.equals('foo')); | 1003 unittest.expect(o.kind, unittest.equals('foo')); |
969 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 1004 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
970 } | 1005 } |
971 buildCounterSavedAdStyles--; | 1006 buildCounterSavedAdStyles--; |
972 } | 1007 } |
973 | 1008 |
974 core.int buildCounterSavedReport = 0; | 1009 core.int buildCounterSavedReport = 0; |
975 buildSavedReport() { | 1010 buildSavedReport() { |
976 var o = new api.SavedReport(); | 1011 var o = new api.SavedReport(); |
977 buildCounterSavedReport++; | 1012 buildCounterSavedReport++; |
978 if (buildCounterSavedReport < 3) { | 1013 if (buildCounterSavedReport < 3) { |
979 o.id = "foo"; | 1014 o.id = "foo"; |
980 o.kind = "foo"; | 1015 o.kind = "foo"; |
981 o.name = "foo"; | 1016 o.name = "foo"; |
982 } | 1017 } |
983 buildCounterSavedReport--; | 1018 buildCounterSavedReport--; |
984 return o; | 1019 return o; |
985 } | 1020 } |
986 | 1021 |
987 checkSavedReport(api.SavedReport o) { | 1022 checkSavedReport(api.SavedReport o) { |
988 buildCounterSavedReport++; | 1023 buildCounterSavedReport++; |
989 if (buildCounterSavedReport < 3) { | 1024 if (buildCounterSavedReport < 3) { |
990 unittest.expect(o.id, unittest.equals('foo')); | 1025 unittest.expect(o.id, unittest.equals('foo')); |
991 unittest.expect(o.kind, unittest.equals('foo')); | 1026 unittest.expect(o.kind, unittest.equals('foo')); |
992 unittest.expect(o.name, unittest.equals('foo')); | 1027 unittest.expect(o.name, unittest.equals('foo')); |
993 } | 1028 } |
994 buildCounterSavedReport--; | 1029 buildCounterSavedReport--; |
995 } | 1030 } |
996 | 1031 |
997 buildUnnamed1216() { | 1032 buildUnnamed153() { |
998 var o = new core.List<api.SavedReport>(); | 1033 var o = new core.List<api.SavedReport>(); |
999 o.add(buildSavedReport()); | 1034 o.add(buildSavedReport()); |
1000 o.add(buildSavedReport()); | 1035 o.add(buildSavedReport()); |
1001 return o; | 1036 return o; |
1002 } | 1037 } |
1003 | 1038 |
1004 checkUnnamed1216(core.List<api.SavedReport> o) { | 1039 checkUnnamed153(core.List<api.SavedReport> o) { |
1005 unittest.expect(o, unittest.hasLength(2)); | 1040 unittest.expect(o, unittest.hasLength(2)); |
1006 checkSavedReport(o[0]); | 1041 checkSavedReport(o[0]); |
1007 checkSavedReport(o[1]); | 1042 checkSavedReport(o[1]); |
1008 } | 1043 } |
1009 | 1044 |
1010 core.int buildCounterSavedReports = 0; | 1045 core.int buildCounterSavedReports = 0; |
1011 buildSavedReports() { | 1046 buildSavedReports() { |
1012 var o = new api.SavedReports(); | 1047 var o = new api.SavedReports(); |
1013 buildCounterSavedReports++; | 1048 buildCounterSavedReports++; |
1014 if (buildCounterSavedReports < 3) { | 1049 if (buildCounterSavedReports < 3) { |
1015 o.etag = "foo"; | 1050 o.etag = "foo"; |
1016 o.items = buildUnnamed1216(); | 1051 o.items = buildUnnamed153(); |
1017 o.kind = "foo"; | 1052 o.kind = "foo"; |
1018 o.nextPageToken = "foo"; | 1053 o.nextPageToken = "foo"; |
1019 } | 1054 } |
1020 buildCounterSavedReports--; | 1055 buildCounterSavedReports--; |
1021 return o; | 1056 return o; |
1022 } | 1057 } |
1023 | 1058 |
1024 checkSavedReports(api.SavedReports o) { | 1059 checkSavedReports(api.SavedReports o) { |
1025 buildCounterSavedReports++; | 1060 buildCounterSavedReports++; |
1026 if (buildCounterSavedReports < 3) { | 1061 if (buildCounterSavedReports < 3) { |
1027 unittest.expect(o.etag, unittest.equals('foo')); | 1062 unittest.expect(o.etag, unittest.equals('foo')); |
1028 checkUnnamed1216(o.items); | 1063 checkUnnamed153(o.items); |
1029 unittest.expect(o.kind, unittest.equals('foo')); | 1064 unittest.expect(o.kind, unittest.equals('foo')); |
1030 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 1065 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
1031 } | 1066 } |
1032 buildCounterSavedReports--; | 1067 buildCounterSavedReports--; |
1033 } | 1068 } |
1034 | 1069 |
1035 core.int buildCounterUrlChannel = 0; | 1070 core.int buildCounterUrlChannel = 0; |
1036 buildUrlChannel() { | 1071 buildUrlChannel() { |
1037 var o = new api.UrlChannel(); | 1072 var o = new api.UrlChannel(); |
1038 buildCounterUrlChannel++; | 1073 buildCounterUrlChannel++; |
1039 if (buildCounterUrlChannel < 3) { | 1074 if (buildCounterUrlChannel < 3) { |
1040 o.id = "foo"; | 1075 o.id = "foo"; |
1041 o.kind = "foo"; | 1076 o.kind = "foo"; |
1042 o.urlPattern = "foo"; | 1077 o.urlPattern = "foo"; |
1043 } | 1078 } |
1044 buildCounterUrlChannel--; | 1079 buildCounterUrlChannel--; |
1045 return o; | 1080 return o; |
1046 } | 1081 } |
1047 | 1082 |
1048 checkUrlChannel(api.UrlChannel o) { | 1083 checkUrlChannel(api.UrlChannel o) { |
1049 buildCounterUrlChannel++; | 1084 buildCounterUrlChannel++; |
1050 if (buildCounterUrlChannel < 3) { | 1085 if (buildCounterUrlChannel < 3) { |
1051 unittest.expect(o.id, unittest.equals('foo')); | 1086 unittest.expect(o.id, unittest.equals('foo')); |
1052 unittest.expect(o.kind, unittest.equals('foo')); | 1087 unittest.expect(o.kind, unittest.equals('foo')); |
1053 unittest.expect(o.urlPattern, unittest.equals('foo')); | 1088 unittest.expect(o.urlPattern, unittest.equals('foo')); |
1054 } | 1089 } |
1055 buildCounterUrlChannel--; | 1090 buildCounterUrlChannel--; |
1056 } | 1091 } |
1057 | 1092 |
1058 buildUnnamed1217() { | 1093 buildUnnamed154() { |
1059 var o = new core.List<api.UrlChannel>(); | 1094 var o = new core.List<api.UrlChannel>(); |
1060 o.add(buildUrlChannel()); | 1095 o.add(buildUrlChannel()); |
1061 o.add(buildUrlChannel()); | 1096 o.add(buildUrlChannel()); |
1062 return o; | 1097 return o; |
1063 } | 1098 } |
1064 | 1099 |
1065 checkUnnamed1217(core.List<api.UrlChannel> o) { | 1100 checkUnnamed154(core.List<api.UrlChannel> o) { |
1066 unittest.expect(o, unittest.hasLength(2)); | 1101 unittest.expect(o, unittest.hasLength(2)); |
1067 checkUrlChannel(o[0]); | 1102 checkUrlChannel(o[0]); |
1068 checkUrlChannel(o[1]); | 1103 checkUrlChannel(o[1]); |
1069 } | 1104 } |
1070 | 1105 |
1071 core.int buildCounterUrlChannels = 0; | 1106 core.int buildCounterUrlChannels = 0; |
1072 buildUrlChannels() { | 1107 buildUrlChannels() { |
1073 var o = new api.UrlChannels(); | 1108 var o = new api.UrlChannels(); |
1074 buildCounterUrlChannels++; | 1109 buildCounterUrlChannels++; |
1075 if (buildCounterUrlChannels < 3) { | 1110 if (buildCounterUrlChannels < 3) { |
1076 o.etag = "foo"; | 1111 o.etag = "foo"; |
1077 o.items = buildUnnamed1217(); | 1112 o.items = buildUnnamed154(); |
1078 o.kind = "foo"; | 1113 o.kind = "foo"; |
1079 o.nextPageToken = "foo"; | 1114 o.nextPageToken = "foo"; |
1080 } | 1115 } |
1081 buildCounterUrlChannels--; | 1116 buildCounterUrlChannels--; |
1082 return o; | 1117 return o; |
1083 } | 1118 } |
1084 | 1119 |
1085 checkUrlChannels(api.UrlChannels o) { | 1120 checkUrlChannels(api.UrlChannels o) { |
1086 buildCounterUrlChannels++; | 1121 buildCounterUrlChannels++; |
1087 if (buildCounterUrlChannels < 3) { | 1122 if (buildCounterUrlChannels < 3) { |
1088 unittest.expect(o.etag, unittest.equals('foo')); | 1123 unittest.expect(o.etag, unittest.equals('foo')); |
1089 checkUnnamed1217(o.items); | 1124 checkUnnamed154(o.items); |
1090 unittest.expect(o.kind, unittest.equals('foo')); | 1125 unittest.expect(o.kind, unittest.equals('foo')); |
1091 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 1126 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
1092 } | 1127 } |
1093 buildCounterUrlChannels--; | 1128 buildCounterUrlChannels--; |
1094 } | 1129 } |
1095 | 1130 |
1096 buildUnnamed1218() { | 1131 buildUnnamed155() { |
1097 var o = new core.List<core.String>(); | 1132 var o = new core.List<core.String>(); |
1098 o.add("foo"); | 1133 o.add("foo"); |
1099 o.add("foo"); | 1134 o.add("foo"); |
1100 return o; | 1135 return o; |
1101 } | 1136 } |
1102 | 1137 |
1103 checkUnnamed1218(core.List<core.String> o) { | 1138 checkUnnamed155(core.List<core.String> o) { |
1104 unittest.expect(o, unittest.hasLength(2)); | 1139 unittest.expect(o, unittest.hasLength(2)); |
1105 unittest.expect(o[0], unittest.equals('foo')); | 1140 unittest.expect(o[0], unittest.equals('foo')); |
1106 unittest.expect(o[1], unittest.equals('foo')); | 1141 unittest.expect(o[1], unittest.equals('foo')); |
1107 } | 1142 } |
1108 | 1143 |
1109 buildUnnamed1219() { | 1144 buildUnnamed156() { |
1110 var o = new core.List<core.String>(); | 1145 var o = new core.List<core.String>(); |
1111 o.add("foo"); | 1146 o.add("foo"); |
1112 o.add("foo"); | 1147 o.add("foo"); |
1113 return o; | 1148 return o; |
1114 } | 1149 } |
1115 | 1150 |
1116 checkUnnamed1219(core.List<core.String> o) { | 1151 checkUnnamed156(core.List<core.String> o) { |
1117 unittest.expect(o, unittest.hasLength(2)); | 1152 unittest.expect(o, unittest.hasLength(2)); |
1118 unittest.expect(o[0], unittest.equals('foo')); | 1153 unittest.expect(o[0], unittest.equals('foo')); |
1119 unittest.expect(o[1], unittest.equals('foo')); | 1154 unittest.expect(o[1], unittest.equals('foo')); |
1120 } | 1155 } |
1121 | 1156 |
1122 buildUnnamed1220() { | 1157 buildUnnamed157() { |
1123 var o = new core.List<core.String>(); | 1158 var o = new core.List<core.String>(); |
1124 o.add("foo"); | 1159 o.add("foo"); |
1125 o.add("foo"); | 1160 o.add("foo"); |
1126 return o; | 1161 return o; |
1127 } | 1162 } |
1128 | 1163 |
1129 checkUnnamed1220(core.List<core.String> o) { | 1164 checkUnnamed157(core.List<core.String> o) { |
1130 unittest.expect(o, unittest.hasLength(2)); | 1165 unittest.expect(o, unittest.hasLength(2)); |
1131 unittest.expect(o[0], unittest.equals('foo')); | 1166 unittest.expect(o[0], unittest.equals('foo')); |
1132 unittest.expect(o[1], unittest.equals('foo')); | 1167 unittest.expect(o[1], unittest.equals('foo')); |
1133 } | 1168 } |
1134 | 1169 |
1135 buildUnnamed1221() { | 1170 buildUnnamed158() { |
1136 var o = new core.List<core.String>(); | 1171 var o = new core.List<core.String>(); |
1137 o.add("foo"); | 1172 o.add("foo"); |
1138 o.add("foo"); | 1173 o.add("foo"); |
1139 return o; | 1174 return o; |
1140 } | 1175 } |
1141 | 1176 |
1142 checkUnnamed1221(core.List<core.String> o) { | 1177 checkUnnamed158(core.List<core.String> o) { |
1143 unittest.expect(o, unittest.hasLength(2)); | 1178 unittest.expect(o, unittest.hasLength(2)); |
1144 unittest.expect(o[0], unittest.equals('foo')); | 1179 unittest.expect(o[0], unittest.equals('foo')); |
1145 unittest.expect(o[1], unittest.equals('foo')); | 1180 unittest.expect(o[1], unittest.equals('foo')); |
1146 } | 1181 } |
1147 | 1182 |
1148 buildUnnamed1222() { | 1183 buildUnnamed159() { |
1149 var o = new core.List<core.String>(); | 1184 var o = new core.List<core.String>(); |
1150 o.add("foo"); | 1185 o.add("foo"); |
1151 o.add("foo"); | 1186 o.add("foo"); |
1152 return o; | 1187 return o; |
1153 } | 1188 } |
1154 | 1189 |
1155 checkUnnamed1222(core.List<core.String> o) { | 1190 checkUnnamed159(core.List<core.String> o) { |
1156 unittest.expect(o, unittest.hasLength(2)); | 1191 unittest.expect(o, unittest.hasLength(2)); |
1157 unittest.expect(o[0], unittest.equals('foo')); | 1192 unittest.expect(o[0], unittest.equals('foo')); |
1158 unittest.expect(o[1], unittest.equals('foo')); | 1193 unittest.expect(o[1], unittest.equals('foo')); |
1159 } | 1194 } |
1160 | 1195 |
1161 buildUnnamed1223() { | 1196 buildUnnamed160() { |
1162 var o = new core.List<core.String>(); | 1197 var o = new core.List<core.String>(); |
1163 o.add("foo"); | 1198 o.add("foo"); |
1164 o.add("foo"); | 1199 o.add("foo"); |
1165 return o; | 1200 return o; |
1166 } | 1201 } |
1167 | 1202 |
1168 checkUnnamed1223(core.List<core.String> o) { | 1203 checkUnnamed160(core.List<core.String> o) { |
1169 unittest.expect(o, unittest.hasLength(2)); | 1204 unittest.expect(o, unittest.hasLength(2)); |
1170 unittest.expect(o[0], unittest.equals('foo')); | 1205 unittest.expect(o[0], unittest.equals('foo')); |
1171 unittest.expect(o[1], unittest.equals('foo')); | 1206 unittest.expect(o[1], unittest.equals('foo')); |
1172 } | 1207 } |
1173 | 1208 |
1174 buildUnnamed1224() { | 1209 buildUnnamed161() { |
1175 var o = new core.List<core.String>(); | 1210 var o = new core.List<core.String>(); |
1176 o.add("foo"); | 1211 o.add("foo"); |
1177 o.add("foo"); | 1212 o.add("foo"); |
1178 return o; | 1213 return o; |
1179 } | 1214 } |
1180 | 1215 |
1181 checkUnnamed1224(core.List<core.String> o) { | 1216 checkUnnamed161(core.List<core.String> o) { |
1182 unittest.expect(o, unittest.hasLength(2)); | 1217 unittest.expect(o, unittest.hasLength(2)); |
1183 unittest.expect(o[0], unittest.equals('foo')); | 1218 unittest.expect(o[0], unittest.equals('foo')); |
1184 unittest.expect(o[1], unittest.equals('foo')); | 1219 unittest.expect(o[1], unittest.equals('foo')); |
1185 } | 1220 } |
1186 | 1221 |
1187 buildUnnamed1225() { | 1222 buildUnnamed162() { |
1188 var o = new core.List<core.String>(); | 1223 var o = new core.List<core.String>(); |
1189 o.add("foo"); | 1224 o.add("foo"); |
1190 o.add("foo"); | 1225 o.add("foo"); |
1191 return o; | 1226 return o; |
1192 } | 1227 } |
1193 | 1228 |
1194 checkUnnamed1225(core.List<core.String> o) { | 1229 checkUnnamed162(core.List<core.String> o) { |
1195 unittest.expect(o, unittest.hasLength(2)); | 1230 unittest.expect(o, unittest.hasLength(2)); |
1196 unittest.expect(o[0], unittest.equals('foo')); | 1231 unittest.expect(o[0], unittest.equals('foo')); |
1197 unittest.expect(o[1], unittest.equals('foo')); | 1232 unittest.expect(o[1], unittest.equals('foo')); |
1198 } | 1233 } |
1199 | 1234 |
1200 buildUnnamed1226() { | 1235 buildUnnamed163() { |
1201 var o = new core.List<core.String>(); | 1236 var o = new core.List<core.String>(); |
1202 o.add("foo"); | 1237 o.add("foo"); |
1203 o.add("foo"); | 1238 o.add("foo"); |
1204 return o; | 1239 return o; |
1205 } | 1240 } |
1206 | 1241 |
1207 checkUnnamed1226(core.List<core.String> o) { | 1242 checkUnnamed163(core.List<core.String> o) { |
1208 unittest.expect(o, unittest.hasLength(2)); | 1243 unittest.expect(o, unittest.hasLength(2)); |
1209 unittest.expect(o[0], unittest.equals('foo')); | 1244 unittest.expect(o[0], unittest.equals('foo')); |
1210 unittest.expect(o[1], unittest.equals('foo')); | 1245 unittest.expect(o[1], unittest.equals('foo')); |
1211 } | 1246 } |
1212 | 1247 |
1213 | 1248 |
1214 main() { | 1249 main() { |
1215 unittest.group("obj-schema-Account", () { | 1250 unittest.group("obj-schema-Account", () { |
1216 unittest.test("to-json--from-json", () { | 1251 unittest.test("to-json--from-json", () { |
1217 var o = buildAccount(); | 1252 var o = buildAccount(); |
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1487 var o = buildUrlChannels(); | 1522 var o = buildUrlChannels(); |
1488 var od = new api.UrlChannels.fromJson(o.toJson()); | 1523 var od = new api.UrlChannels.fromJson(o.toJson()); |
1489 checkUrlChannels(od); | 1524 checkUrlChannels(od); |
1490 }); | 1525 }); |
1491 }); | 1526 }); |
1492 | 1527 |
1493 | 1528 |
1494 unittest.group("resource-AccountsResourceApi", () { | 1529 unittest.group("resource-AccountsResourceApi", () { |
1495 unittest.test("method--get", () { | 1530 unittest.test("method--get", () { |
1496 | 1531 |
1497 var mock = new common_test.HttpServerMock(); | 1532 var mock = new HttpServerMock(); |
1498 api.AccountsResourceApi res = new api.AdsenseApi(mock).accounts; | 1533 api.AccountsResourceApi res = new api.AdsenseApi(mock).accounts; |
1499 var arg_accountId = "foo"; | 1534 var arg_accountId = "foo"; |
1500 var arg_tree = true; | 1535 var arg_tree = true; |
1501 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1536 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1502 var path = (req.url).path; | 1537 var path = (req.url).path; |
1503 var pathOffset = 0; | 1538 var pathOffset = 0; |
1504 var index; | 1539 var index; |
1505 var subPart; | 1540 var subPart; |
1506 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1541 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
1507 pathOffset += 1; | 1542 pathOffset += 1; |
(...skipping 21 matching lines...) Expand all Loading... |
1529 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1564 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
1530 } | 1565 } |
1531 } | 1566 } |
1532 unittest.expect(queryMap["tree"].first, unittest.equals("$arg_tree")); | 1567 unittest.expect(queryMap["tree"].first, unittest.equals("$arg_tree")); |
1533 | 1568 |
1534 | 1569 |
1535 var h = { | 1570 var h = { |
1536 "content-type" : "application/json; charset=utf-8", | 1571 "content-type" : "application/json; charset=utf-8", |
1537 }; | 1572 }; |
1538 var resp = convert.JSON.encode(buildAccount()); | 1573 var resp = convert.JSON.encode(buildAccount()); |
1539 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 1574 return new async.Future.value(stringResponse(200, h, resp)); |
1540 }), true); | 1575 }), true); |
1541 res.get(arg_accountId, tree: arg_tree).then(unittest.expectAsync(((api.Acc
ount response) { | 1576 res.get(arg_accountId, tree: arg_tree).then(unittest.expectAsync(((api.Acc
ount response) { |
1542 checkAccount(response); | 1577 checkAccount(response); |
1543 }))); | 1578 }))); |
1544 }); | 1579 }); |
1545 | 1580 |
1546 unittest.test("method--list", () { | 1581 unittest.test("method--list", () { |
1547 | 1582 |
1548 var mock = new common_test.HttpServerMock(); | 1583 var mock = new HttpServerMock(); |
1549 api.AccountsResourceApi res = new api.AdsenseApi(mock).accounts; | 1584 api.AccountsResourceApi res = new api.AdsenseApi(mock).accounts; |
1550 var arg_maxResults = 42; | 1585 var arg_maxResults = 42; |
1551 var arg_pageToken = "foo"; | 1586 var arg_pageToken = "foo"; |
1552 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1587 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1553 var path = (req.url).path; | 1588 var path = (req.url).path; |
1554 var pathOffset = 0; | 1589 var pathOffset = 0; |
1555 var index; | 1590 var index; |
1556 var subPart; | 1591 var subPart; |
1557 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1592 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
1558 pathOffset += 1; | 1593 pathOffset += 1; |
(...skipping 19 matching lines...) Expand all Loading... |
1578 } | 1613 } |
1579 } | 1614 } |
1580 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | 1615 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); |
1581 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 1616 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
1582 | 1617 |
1583 | 1618 |
1584 var h = { | 1619 var h = { |
1585 "content-type" : "application/json; charset=utf-8", | 1620 "content-type" : "application/json; charset=utf-8", |
1586 }; | 1621 }; |
1587 var resp = convert.JSON.encode(buildAccounts()); | 1622 var resp = convert.JSON.encode(buildAccounts()); |
1588 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 1623 return new async.Future.value(stringResponse(200, h, resp)); |
1589 }), true); | 1624 }), true); |
1590 res.list(maxResults: arg_maxResults, pageToken: arg_pageToken).then(unitte
st.expectAsync(((api.Accounts response) { | 1625 res.list(maxResults: arg_maxResults, pageToken: arg_pageToken).then(unitte
st.expectAsync(((api.Accounts response) { |
1591 checkAccounts(response); | 1626 checkAccounts(response); |
1592 }))); | 1627 }))); |
1593 }); | 1628 }); |
1594 | 1629 |
1595 }); | 1630 }); |
1596 | 1631 |
1597 | 1632 |
1598 unittest.group("resource-AccountsAdclientsResourceApi", () { | 1633 unittest.group("resource-AccountsAdclientsResourceApi", () { |
1599 unittest.test("method--list", () { | 1634 unittest.test("method--list", () { |
1600 | 1635 |
1601 var mock = new common_test.HttpServerMock(); | 1636 var mock = new HttpServerMock(); |
1602 api.AccountsAdclientsResourceApi res = new api.AdsenseApi(mock).accounts.a
dclients; | 1637 api.AccountsAdclientsResourceApi res = new api.AdsenseApi(mock).accounts.a
dclients; |
1603 var arg_accountId = "foo"; | 1638 var arg_accountId = "foo"; |
1604 var arg_maxResults = 42; | 1639 var arg_maxResults = 42; |
1605 var arg_pageToken = "foo"; | 1640 var arg_pageToken = "foo"; |
1606 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1641 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1607 var path = (req.url).path; | 1642 var path = (req.url).path; |
1608 var pathOffset = 0; | 1643 var pathOffset = 0; |
1609 var index; | 1644 var index; |
1610 var subPart; | 1645 var subPart; |
1611 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1646 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
(...skipping 27 matching lines...) Expand all Loading... |
1639 } | 1674 } |
1640 } | 1675 } |
1641 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | 1676 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); |
1642 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 1677 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
1643 | 1678 |
1644 | 1679 |
1645 var h = { | 1680 var h = { |
1646 "content-type" : "application/json; charset=utf-8", | 1681 "content-type" : "application/json; charset=utf-8", |
1647 }; | 1682 }; |
1648 var resp = convert.JSON.encode(buildAdClients()); | 1683 var resp = convert.JSON.encode(buildAdClients()); |
1649 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 1684 return new async.Future.value(stringResponse(200, h, resp)); |
1650 }), true); | 1685 }), true); |
1651 res.list(arg_accountId, maxResults: arg_maxResults, pageToken: arg_pageTok
en).then(unittest.expectAsync(((api.AdClients response) { | 1686 res.list(arg_accountId, maxResults: arg_maxResults, pageToken: arg_pageTok
en).then(unittest.expectAsync(((api.AdClients response) { |
1652 checkAdClients(response); | 1687 checkAdClients(response); |
1653 }))); | 1688 }))); |
1654 }); | 1689 }); |
1655 | 1690 |
1656 }); | 1691 }); |
1657 | 1692 |
1658 | 1693 |
1659 unittest.group("resource-AccountsAdunitsResourceApi", () { | 1694 unittest.group("resource-AccountsAdunitsResourceApi", () { |
1660 unittest.test("method--get", () { | 1695 unittest.test("method--get", () { |
1661 | 1696 |
1662 var mock = new common_test.HttpServerMock(); | 1697 var mock = new HttpServerMock(); |
1663 api.AccountsAdunitsResourceApi res = new api.AdsenseApi(mock).accounts.adu
nits; | 1698 api.AccountsAdunitsResourceApi res = new api.AdsenseApi(mock).accounts.adu
nits; |
1664 var arg_accountId = "foo"; | 1699 var arg_accountId = "foo"; |
1665 var arg_adClientId = "foo"; | 1700 var arg_adClientId = "foo"; |
1666 var arg_adUnitId = "foo"; | 1701 var arg_adUnitId = "foo"; |
1667 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1702 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1668 var path = (req.url).path; | 1703 var path = (req.url).path; |
1669 var pathOffset = 0; | 1704 var pathOffset = 0; |
1670 var index; | 1705 var index; |
1671 var subPart; | 1706 var subPart; |
1672 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1707 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1708 var keyvalue = part.split("="); | 1743 var keyvalue = part.split("="); |
1709 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1744 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
1710 } | 1745 } |
1711 } | 1746 } |
1712 | 1747 |
1713 | 1748 |
1714 var h = { | 1749 var h = { |
1715 "content-type" : "application/json; charset=utf-8", | 1750 "content-type" : "application/json; charset=utf-8", |
1716 }; | 1751 }; |
1717 var resp = convert.JSON.encode(buildAdUnit()); | 1752 var resp = convert.JSON.encode(buildAdUnit()); |
1718 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 1753 return new async.Future.value(stringResponse(200, h, resp)); |
1719 }), true); | 1754 }), true); |
1720 res.get(arg_accountId, arg_adClientId, arg_adUnitId).then(unittest.expectA
sync(((api.AdUnit response) { | 1755 res.get(arg_accountId, arg_adClientId, arg_adUnitId).then(unittest.expectA
sync(((api.AdUnit response) { |
1721 checkAdUnit(response); | 1756 checkAdUnit(response); |
1722 }))); | 1757 }))); |
1723 }); | 1758 }); |
1724 | 1759 |
1725 unittest.test("method--getAdCode", () { | 1760 unittest.test("method--getAdCode", () { |
1726 | 1761 |
1727 var mock = new common_test.HttpServerMock(); | 1762 var mock = new HttpServerMock(); |
1728 api.AccountsAdunitsResourceApi res = new api.AdsenseApi(mock).accounts.adu
nits; | 1763 api.AccountsAdunitsResourceApi res = new api.AdsenseApi(mock).accounts.adu
nits; |
1729 var arg_accountId = "foo"; | 1764 var arg_accountId = "foo"; |
1730 var arg_adClientId = "foo"; | 1765 var arg_adClientId = "foo"; |
1731 var arg_adUnitId = "foo"; | 1766 var arg_adUnitId = "foo"; |
1732 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1767 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1733 var path = (req.url).path; | 1768 var path = (req.url).path; |
1734 var pathOffset = 0; | 1769 var pathOffset = 0; |
1735 var index; | 1770 var index; |
1736 var subPart; | 1771 var subPart; |
1737 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1772 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1777 var keyvalue = part.split("="); | 1812 var keyvalue = part.split("="); |
1778 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1813 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
1779 } | 1814 } |
1780 } | 1815 } |
1781 | 1816 |
1782 | 1817 |
1783 var h = { | 1818 var h = { |
1784 "content-type" : "application/json; charset=utf-8", | 1819 "content-type" : "application/json; charset=utf-8", |
1785 }; | 1820 }; |
1786 var resp = convert.JSON.encode(buildAdCode()); | 1821 var resp = convert.JSON.encode(buildAdCode()); |
1787 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 1822 return new async.Future.value(stringResponse(200, h, resp)); |
1788 }), true); | 1823 }), true); |
1789 res.getAdCode(arg_accountId, arg_adClientId, arg_adUnitId).then(unittest.e
xpectAsync(((api.AdCode response) { | 1824 res.getAdCode(arg_accountId, arg_adClientId, arg_adUnitId).then(unittest.e
xpectAsync(((api.AdCode response) { |
1790 checkAdCode(response); | 1825 checkAdCode(response); |
1791 }))); | 1826 }))); |
1792 }); | 1827 }); |
1793 | 1828 |
1794 unittest.test("method--list", () { | 1829 unittest.test("method--list", () { |
1795 | 1830 |
1796 var mock = new common_test.HttpServerMock(); | 1831 var mock = new HttpServerMock(); |
1797 api.AccountsAdunitsResourceApi res = new api.AdsenseApi(mock).accounts.adu
nits; | 1832 api.AccountsAdunitsResourceApi res = new api.AdsenseApi(mock).accounts.adu
nits; |
1798 var arg_accountId = "foo"; | 1833 var arg_accountId = "foo"; |
1799 var arg_adClientId = "foo"; | 1834 var arg_adClientId = "foo"; |
1800 var arg_includeInactive = true; | 1835 var arg_includeInactive = true; |
1801 var arg_maxResults = 42; | 1836 var arg_maxResults = 42; |
1802 var arg_pageToken = "foo"; | 1837 var arg_pageToken = "foo"; |
1803 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1838 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1804 var path = (req.url).path; | 1839 var path = (req.url).path; |
1805 var pathOffset = 0; | 1840 var pathOffset = 0; |
1806 var index; | 1841 var index; |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1844 } | 1879 } |
1845 unittest.expect(queryMap["includeInactive"].first, unittest.equals("$arg
_includeInactive")); | 1880 unittest.expect(queryMap["includeInactive"].first, unittest.equals("$arg
_includeInactive")); |
1846 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | 1881 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); |
1847 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 1882 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
1848 | 1883 |
1849 | 1884 |
1850 var h = { | 1885 var h = { |
1851 "content-type" : "application/json; charset=utf-8", | 1886 "content-type" : "application/json; charset=utf-8", |
1852 }; | 1887 }; |
1853 var resp = convert.JSON.encode(buildAdUnits()); | 1888 var resp = convert.JSON.encode(buildAdUnits()); |
1854 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 1889 return new async.Future.value(stringResponse(200, h, resp)); |
1855 }), true); | 1890 }), true); |
1856 res.list(arg_accountId, arg_adClientId, includeInactive: arg_includeInacti
ve, maxResults: arg_maxResults, pageToken: arg_pageToken).then(unittest.expectAs
ync(((api.AdUnits response) { | 1891 res.list(arg_accountId, arg_adClientId, includeInactive: arg_includeInacti
ve, maxResults: arg_maxResults, pageToken: arg_pageToken).then(unittest.expectAs
ync(((api.AdUnits response) { |
1857 checkAdUnits(response); | 1892 checkAdUnits(response); |
1858 }))); | 1893 }))); |
1859 }); | 1894 }); |
1860 | 1895 |
1861 }); | 1896 }); |
1862 | 1897 |
1863 | 1898 |
1864 unittest.group("resource-AccountsAdunitsCustomchannelsResourceApi", () { | 1899 unittest.group("resource-AccountsAdunitsCustomchannelsResourceApi", () { |
1865 unittest.test("method--list", () { | 1900 unittest.test("method--list", () { |
1866 | 1901 |
1867 var mock = new common_test.HttpServerMock(); | 1902 var mock = new HttpServerMock(); |
1868 api.AccountsAdunitsCustomchannelsResourceApi res = new api.AdsenseApi(mock
).accounts.adunits.customchannels; | 1903 api.AccountsAdunitsCustomchannelsResourceApi res = new api.AdsenseApi(mock
).accounts.adunits.customchannels; |
1869 var arg_accountId = "foo"; | 1904 var arg_accountId = "foo"; |
1870 var arg_adClientId = "foo"; | 1905 var arg_adClientId = "foo"; |
1871 var arg_adUnitId = "foo"; | 1906 var arg_adUnitId = "foo"; |
1872 var arg_maxResults = 42; | 1907 var arg_maxResults = 42; |
1873 var arg_pageToken = "foo"; | 1908 var arg_pageToken = "foo"; |
1874 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1909 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1875 var path = (req.url).path; | 1910 var path = (req.url).path; |
1876 var pathOffset = 0; | 1911 var pathOffset = 0; |
1877 var index; | 1912 var index; |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1921 } | 1956 } |
1922 } | 1957 } |
1923 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | 1958 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); |
1924 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 1959 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
1925 | 1960 |
1926 | 1961 |
1927 var h = { | 1962 var h = { |
1928 "content-type" : "application/json; charset=utf-8", | 1963 "content-type" : "application/json; charset=utf-8", |
1929 }; | 1964 }; |
1930 var resp = convert.JSON.encode(buildCustomChannels()); | 1965 var resp = convert.JSON.encode(buildCustomChannels()); |
1931 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 1966 return new async.Future.value(stringResponse(200, h, resp)); |
1932 }), true); | 1967 }), true); |
1933 res.list(arg_accountId, arg_adClientId, arg_adUnitId, maxResults: arg_maxR
esults, pageToken: arg_pageToken).then(unittest.expectAsync(((api.CustomChannels
response) { | 1968 res.list(arg_accountId, arg_adClientId, arg_adUnitId, maxResults: arg_maxR
esults, pageToken: arg_pageToken).then(unittest.expectAsync(((api.CustomChannels
response) { |
1934 checkCustomChannels(response); | 1969 checkCustomChannels(response); |
1935 }))); | 1970 }))); |
1936 }); | 1971 }); |
1937 | 1972 |
1938 }); | 1973 }); |
1939 | 1974 |
1940 | 1975 |
1941 unittest.group("resource-AccountsAlertsResourceApi", () { | 1976 unittest.group("resource-AccountsAlertsResourceApi", () { |
1942 unittest.test("method--delete", () { | 1977 unittest.test("method--delete", () { |
1943 | 1978 |
1944 var mock = new common_test.HttpServerMock(); | 1979 var mock = new HttpServerMock(); |
1945 api.AccountsAlertsResourceApi res = new api.AdsenseApi(mock).accounts.aler
ts; | 1980 api.AccountsAlertsResourceApi res = new api.AdsenseApi(mock).accounts.aler
ts; |
1946 var arg_accountId = "foo"; | 1981 var arg_accountId = "foo"; |
1947 var arg_alertId = "foo"; | 1982 var arg_alertId = "foo"; |
1948 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1983 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1949 var path = (req.url).path; | 1984 var path = (req.url).path; |
1950 var pathOffset = 0; | 1985 var pathOffset = 0; |
1951 var index; | 1986 var index; |
1952 var subPart; | 1987 var subPart; |
1953 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1988 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
1954 pathOffset += 1; | 1989 pathOffset += 1; |
(...skipping 27 matching lines...) Expand all Loading... |
1982 var keyvalue = part.split("="); | 2017 var keyvalue = part.split("="); |
1983 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2018 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
1984 } | 2019 } |
1985 } | 2020 } |
1986 | 2021 |
1987 | 2022 |
1988 var h = { | 2023 var h = { |
1989 "content-type" : "application/json; charset=utf-8", | 2024 "content-type" : "application/json; charset=utf-8", |
1990 }; | 2025 }; |
1991 var resp = ""; | 2026 var resp = ""; |
1992 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2027 return new async.Future.value(stringResponse(200, h, resp)); |
1993 }), true); | 2028 }), true); |
1994 res.delete(arg_accountId, arg_alertId).then(unittest.expectAsync((_) {})); | 2029 res.delete(arg_accountId, arg_alertId).then(unittest.expectAsync((_) {})); |
1995 }); | 2030 }); |
1996 | 2031 |
1997 unittest.test("method--list", () { | 2032 unittest.test("method--list", () { |
1998 | 2033 |
1999 var mock = new common_test.HttpServerMock(); | 2034 var mock = new HttpServerMock(); |
2000 api.AccountsAlertsResourceApi res = new api.AdsenseApi(mock).accounts.aler
ts; | 2035 api.AccountsAlertsResourceApi res = new api.AdsenseApi(mock).accounts.aler
ts; |
2001 var arg_accountId = "foo"; | 2036 var arg_accountId = "foo"; |
2002 var arg_locale = "foo"; | 2037 var arg_locale = "foo"; |
2003 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2038 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2004 var path = (req.url).path; | 2039 var path = (req.url).path; |
2005 var pathOffset = 0; | 2040 var pathOffset = 0; |
2006 var index; | 2041 var index; |
2007 var subPart; | 2042 var subPart; |
2008 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2043 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
2009 pathOffset += 1; | 2044 pathOffset += 1; |
(...skipping 25 matching lines...) Expand all Loading... |
2035 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2070 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
2036 } | 2071 } |
2037 } | 2072 } |
2038 unittest.expect(queryMap["locale"].first, unittest.equals(arg_locale)); | 2073 unittest.expect(queryMap["locale"].first, unittest.equals(arg_locale)); |
2039 | 2074 |
2040 | 2075 |
2041 var h = { | 2076 var h = { |
2042 "content-type" : "application/json; charset=utf-8", | 2077 "content-type" : "application/json; charset=utf-8", |
2043 }; | 2078 }; |
2044 var resp = convert.JSON.encode(buildAlerts()); | 2079 var resp = convert.JSON.encode(buildAlerts()); |
2045 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2080 return new async.Future.value(stringResponse(200, h, resp)); |
2046 }), true); | 2081 }), true); |
2047 res.list(arg_accountId, locale: arg_locale).then(unittest.expectAsync(((ap
i.Alerts response) { | 2082 res.list(arg_accountId, locale: arg_locale).then(unittest.expectAsync(((ap
i.Alerts response) { |
2048 checkAlerts(response); | 2083 checkAlerts(response); |
2049 }))); | 2084 }))); |
2050 }); | 2085 }); |
2051 | 2086 |
2052 }); | 2087 }); |
2053 | 2088 |
2054 | 2089 |
2055 unittest.group("resource-AccountsCustomchannelsResourceApi", () { | 2090 unittest.group("resource-AccountsCustomchannelsResourceApi", () { |
2056 unittest.test("method--get", () { | 2091 unittest.test("method--get", () { |
2057 | 2092 |
2058 var mock = new common_test.HttpServerMock(); | 2093 var mock = new HttpServerMock(); |
2059 api.AccountsCustomchannelsResourceApi res = new api.AdsenseApi(mock).accou
nts.customchannels; | 2094 api.AccountsCustomchannelsResourceApi res = new api.AdsenseApi(mock).accou
nts.customchannels; |
2060 var arg_accountId = "foo"; | 2095 var arg_accountId = "foo"; |
2061 var arg_adClientId = "foo"; | 2096 var arg_adClientId = "foo"; |
2062 var arg_customChannelId = "foo"; | 2097 var arg_customChannelId = "foo"; |
2063 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2098 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2064 var path = (req.url).path; | 2099 var path = (req.url).path; |
2065 var pathOffset = 0; | 2100 var pathOffset = 0; |
2066 var index; | 2101 var index; |
2067 var subPart; | 2102 var subPart; |
2068 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2103 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2104 var keyvalue = part.split("="); | 2139 var keyvalue = part.split("="); |
2105 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2140 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
2106 } | 2141 } |
2107 } | 2142 } |
2108 | 2143 |
2109 | 2144 |
2110 var h = { | 2145 var h = { |
2111 "content-type" : "application/json; charset=utf-8", | 2146 "content-type" : "application/json; charset=utf-8", |
2112 }; | 2147 }; |
2113 var resp = convert.JSON.encode(buildCustomChannel()); | 2148 var resp = convert.JSON.encode(buildCustomChannel()); |
2114 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2149 return new async.Future.value(stringResponse(200, h, resp)); |
2115 }), true); | 2150 }), true); |
2116 res.get(arg_accountId, arg_adClientId, arg_customChannelId).then(unittest.
expectAsync(((api.CustomChannel response) { | 2151 res.get(arg_accountId, arg_adClientId, arg_customChannelId).then(unittest.
expectAsync(((api.CustomChannel response) { |
2117 checkCustomChannel(response); | 2152 checkCustomChannel(response); |
2118 }))); | 2153 }))); |
2119 }); | 2154 }); |
2120 | 2155 |
2121 unittest.test("method--list", () { | 2156 unittest.test("method--list", () { |
2122 | 2157 |
2123 var mock = new common_test.HttpServerMock(); | 2158 var mock = new HttpServerMock(); |
2124 api.AccountsCustomchannelsResourceApi res = new api.AdsenseApi(mock).accou
nts.customchannels; | 2159 api.AccountsCustomchannelsResourceApi res = new api.AdsenseApi(mock).accou
nts.customchannels; |
2125 var arg_accountId = "foo"; | 2160 var arg_accountId = "foo"; |
2126 var arg_adClientId = "foo"; | 2161 var arg_adClientId = "foo"; |
2127 var arg_maxResults = 42; | 2162 var arg_maxResults = 42; |
2128 var arg_pageToken = "foo"; | 2163 var arg_pageToken = "foo"; |
2129 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2164 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2130 var path = (req.url).path; | 2165 var path = (req.url).path; |
2131 var pathOffset = 0; | 2166 var pathOffset = 0; |
2132 var index; | 2167 var index; |
2133 var subPart; | 2168 var subPart; |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2169 } | 2204 } |
2170 } | 2205 } |
2171 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | 2206 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); |
2172 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 2207 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
2173 | 2208 |
2174 | 2209 |
2175 var h = { | 2210 var h = { |
2176 "content-type" : "application/json; charset=utf-8", | 2211 "content-type" : "application/json; charset=utf-8", |
2177 }; | 2212 }; |
2178 var resp = convert.JSON.encode(buildCustomChannels()); | 2213 var resp = convert.JSON.encode(buildCustomChannels()); |
2179 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2214 return new async.Future.value(stringResponse(200, h, resp)); |
2180 }), true); | 2215 }), true); |
2181 res.list(arg_accountId, arg_adClientId, maxResults: arg_maxResults, pageTo
ken: arg_pageToken).then(unittest.expectAsync(((api.CustomChannels response) { | 2216 res.list(arg_accountId, arg_adClientId, maxResults: arg_maxResults, pageTo
ken: arg_pageToken).then(unittest.expectAsync(((api.CustomChannels response) { |
2182 checkCustomChannels(response); | 2217 checkCustomChannels(response); |
2183 }))); | 2218 }))); |
2184 }); | 2219 }); |
2185 | 2220 |
2186 }); | 2221 }); |
2187 | 2222 |
2188 | 2223 |
2189 unittest.group("resource-AccountsCustomchannelsAdunitsResourceApi", () { | 2224 unittest.group("resource-AccountsCustomchannelsAdunitsResourceApi", () { |
2190 unittest.test("method--list", () { | 2225 unittest.test("method--list", () { |
2191 | 2226 |
2192 var mock = new common_test.HttpServerMock(); | 2227 var mock = new HttpServerMock(); |
2193 api.AccountsCustomchannelsAdunitsResourceApi res = new api.AdsenseApi(mock
).accounts.customchannels.adunits; | 2228 api.AccountsCustomchannelsAdunitsResourceApi res = new api.AdsenseApi(mock
).accounts.customchannels.adunits; |
2194 var arg_accountId = "foo"; | 2229 var arg_accountId = "foo"; |
2195 var arg_adClientId = "foo"; | 2230 var arg_adClientId = "foo"; |
2196 var arg_customChannelId = "foo"; | 2231 var arg_customChannelId = "foo"; |
2197 var arg_includeInactive = true; | 2232 var arg_includeInactive = true; |
2198 var arg_maxResults = 42; | 2233 var arg_maxResults = 42; |
2199 var arg_pageToken = "foo"; | 2234 var arg_pageToken = "foo"; |
2200 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2235 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2201 var path = (req.url).path; | 2236 var path = (req.url).path; |
2202 var pathOffset = 0; | 2237 var pathOffset = 0; |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2248 } | 2283 } |
2249 unittest.expect(queryMap["includeInactive"].first, unittest.equals("$arg
_includeInactive")); | 2284 unittest.expect(queryMap["includeInactive"].first, unittest.equals("$arg
_includeInactive")); |
2250 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | 2285 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); |
2251 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 2286 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
2252 | 2287 |
2253 | 2288 |
2254 var h = { | 2289 var h = { |
2255 "content-type" : "application/json; charset=utf-8", | 2290 "content-type" : "application/json; charset=utf-8", |
2256 }; | 2291 }; |
2257 var resp = convert.JSON.encode(buildAdUnits()); | 2292 var resp = convert.JSON.encode(buildAdUnits()); |
2258 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2293 return new async.Future.value(stringResponse(200, h, resp)); |
2259 }), true); | 2294 }), true); |
2260 res.list(arg_accountId, arg_adClientId, arg_customChannelId, includeInacti
ve: arg_includeInactive, maxResults: arg_maxResults, pageToken: arg_pageToken).t
hen(unittest.expectAsync(((api.AdUnits response) { | 2295 res.list(arg_accountId, arg_adClientId, arg_customChannelId, includeInacti
ve: arg_includeInactive, maxResults: arg_maxResults, pageToken: arg_pageToken).t
hen(unittest.expectAsync(((api.AdUnits response) { |
2261 checkAdUnits(response); | 2296 checkAdUnits(response); |
2262 }))); | 2297 }))); |
2263 }); | 2298 }); |
2264 | 2299 |
2265 }); | 2300 }); |
2266 | 2301 |
2267 | 2302 |
2268 unittest.group("resource-AccountsPaymentsResourceApi", () { | 2303 unittest.group("resource-AccountsPaymentsResourceApi", () { |
2269 unittest.test("method--list", () { | 2304 unittest.test("method--list", () { |
2270 | 2305 |
2271 var mock = new common_test.HttpServerMock(); | 2306 var mock = new HttpServerMock(); |
2272 api.AccountsPaymentsResourceApi res = new api.AdsenseApi(mock).accounts.pa
yments; | 2307 api.AccountsPaymentsResourceApi res = new api.AdsenseApi(mock).accounts.pa
yments; |
2273 var arg_accountId = "foo"; | 2308 var arg_accountId = "foo"; |
2274 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2309 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2275 var path = (req.url).path; | 2310 var path = (req.url).path; |
2276 var pathOffset = 0; | 2311 var pathOffset = 0; |
2277 var index; | 2312 var index; |
2278 var subPart; | 2313 var subPart; |
2279 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2314 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
2280 pathOffset += 1; | 2315 pathOffset += 1; |
2281 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("adsense/v1.4/")); | 2316 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("adsense/v1.4/")); |
(...skipping 23 matching lines...) Expand all Loading... |
2305 var keyvalue = part.split("="); | 2340 var keyvalue = part.split("="); |
2306 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2341 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
2307 } | 2342 } |
2308 } | 2343 } |
2309 | 2344 |
2310 | 2345 |
2311 var h = { | 2346 var h = { |
2312 "content-type" : "application/json; charset=utf-8", | 2347 "content-type" : "application/json; charset=utf-8", |
2313 }; | 2348 }; |
2314 var resp = convert.JSON.encode(buildPayments()); | 2349 var resp = convert.JSON.encode(buildPayments()); |
2315 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2350 return new async.Future.value(stringResponse(200, h, resp)); |
2316 }), true); | 2351 }), true); |
2317 res.list(arg_accountId).then(unittest.expectAsync(((api.Payments response)
{ | 2352 res.list(arg_accountId).then(unittest.expectAsync(((api.Payments response)
{ |
2318 checkPayments(response); | 2353 checkPayments(response); |
2319 }))); | 2354 }))); |
2320 }); | 2355 }); |
2321 | 2356 |
2322 }); | 2357 }); |
2323 | 2358 |
2324 | 2359 |
2325 unittest.group("resource-AccountsReportsResourceApi", () { | 2360 unittest.group("resource-AccountsReportsResourceApi", () { |
2326 unittest.test("method--generate", () { | 2361 unittest.test("method--generate", () { |
2327 // TODO: Implement tests for media upload; | 2362 // TODO: Implement tests for media upload; |
2328 // TODO: Implement tests for media download; | 2363 // TODO: Implement tests for media download; |
2329 | 2364 |
2330 var mock = new common_test.HttpServerMock(); | 2365 var mock = new HttpServerMock(); |
2331 api.AccountsReportsResourceApi res = new api.AdsenseApi(mock).accounts.rep
orts; | 2366 api.AccountsReportsResourceApi res = new api.AdsenseApi(mock).accounts.rep
orts; |
2332 var arg_accountId = "foo"; | 2367 var arg_accountId = "foo"; |
2333 var arg_startDate = "foo"; | 2368 var arg_startDate = "foo"; |
2334 var arg_endDate = "foo"; | 2369 var arg_endDate = "foo"; |
2335 var arg_currency = "foo"; | 2370 var arg_currency = "foo"; |
2336 var arg_dimension = buildUnnamed1218(); | 2371 var arg_dimension = buildUnnamed155(); |
2337 var arg_filter = buildUnnamed1219(); | 2372 var arg_filter = buildUnnamed156(); |
2338 var arg_locale = "foo"; | 2373 var arg_locale = "foo"; |
2339 var arg_maxResults = 42; | 2374 var arg_maxResults = 42; |
2340 var arg_metric = buildUnnamed1220(); | 2375 var arg_metric = buildUnnamed157(); |
2341 var arg_sort = buildUnnamed1221(); | 2376 var arg_sort = buildUnnamed158(); |
2342 var arg_startIndex = 42; | 2377 var arg_startIndex = 42; |
2343 var arg_useTimezoneReporting = true; | 2378 var arg_useTimezoneReporting = true; |
2344 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2379 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2345 var path = (req.url).path; | 2380 var path = (req.url).path; |
2346 var pathOffset = 0; | 2381 var pathOffset = 0; |
2347 var index; | 2382 var index; |
2348 var subPart; | 2383 var subPart; |
2349 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2384 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
2350 pathOffset += 1; | 2385 pathOffset += 1; |
2351 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("adsense/v1.4/")); | 2386 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("adsense/v1.4/")); |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2386 unittest.expect(queryMap["metric"], unittest.equals(arg_metric)); | 2421 unittest.expect(queryMap["metric"], unittest.equals(arg_metric)); |
2387 unittest.expect(queryMap["sort"], unittest.equals(arg_sort)); | 2422 unittest.expect(queryMap["sort"], unittest.equals(arg_sort)); |
2388 unittest.expect(core.int.parse(queryMap["startIndex"].first), unittest.e
quals(arg_startIndex)); | 2423 unittest.expect(core.int.parse(queryMap["startIndex"].first), unittest.e
quals(arg_startIndex)); |
2389 unittest.expect(queryMap["useTimezoneReporting"].first, unittest.equals(
"$arg_useTimezoneReporting")); | 2424 unittest.expect(queryMap["useTimezoneReporting"].first, unittest.equals(
"$arg_useTimezoneReporting")); |
2390 | 2425 |
2391 | 2426 |
2392 var h = { | 2427 var h = { |
2393 "content-type" : "application/json; charset=utf-8", | 2428 "content-type" : "application/json; charset=utf-8", |
2394 }; | 2429 }; |
2395 var resp = convert.JSON.encode(buildAdsenseReportsGenerateResponse()); | 2430 var resp = convert.JSON.encode(buildAdsenseReportsGenerateResponse()); |
2396 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2431 return new async.Future.value(stringResponse(200, h, resp)); |
2397 }), true); | 2432 }), true); |
2398 res.generate(arg_accountId, arg_startDate, arg_endDate, currency: arg_curr
ency, dimension: arg_dimension, filter: arg_filter, locale: arg_locale, maxResul
ts: arg_maxResults, metric: arg_metric, sort: arg_sort, startIndex: arg_startInd
ex, useTimezoneReporting: arg_useTimezoneReporting).then(unittest.expectAsync(((
api.AdsenseReportsGenerateResponse response) { | 2433 res.generate(arg_accountId, arg_startDate, arg_endDate, currency: arg_curr
ency, dimension: arg_dimension, filter: arg_filter, locale: arg_locale, maxResul
ts: arg_maxResults, metric: arg_metric, sort: arg_sort, startIndex: arg_startInd
ex, useTimezoneReporting: arg_useTimezoneReporting).then(unittest.expectAsync(((
api.AdsenseReportsGenerateResponse response) { |
2399 checkAdsenseReportsGenerateResponse(response); | 2434 checkAdsenseReportsGenerateResponse(response); |
2400 }))); | 2435 }))); |
2401 }); | 2436 }); |
2402 | 2437 |
2403 }); | 2438 }); |
2404 | 2439 |
2405 | 2440 |
2406 unittest.group("resource-AccountsReportsSavedResourceApi", () { | 2441 unittest.group("resource-AccountsReportsSavedResourceApi", () { |
2407 unittest.test("method--generate", () { | 2442 unittest.test("method--generate", () { |
2408 | 2443 |
2409 var mock = new common_test.HttpServerMock(); | 2444 var mock = new HttpServerMock(); |
2410 api.AccountsReportsSavedResourceApi res = new api.AdsenseApi(mock).account
s.reports.saved; | 2445 api.AccountsReportsSavedResourceApi res = new api.AdsenseApi(mock).account
s.reports.saved; |
2411 var arg_accountId = "foo"; | 2446 var arg_accountId = "foo"; |
2412 var arg_savedReportId = "foo"; | 2447 var arg_savedReportId = "foo"; |
2413 var arg_locale = "foo"; | 2448 var arg_locale = "foo"; |
2414 var arg_maxResults = 42; | 2449 var arg_maxResults = 42; |
2415 var arg_startIndex = 42; | 2450 var arg_startIndex = 42; |
2416 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2451 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2417 var path = (req.url).path; | 2452 var path = (req.url).path; |
2418 var pathOffset = 0; | 2453 var pathOffset = 0; |
2419 var index; | 2454 var index; |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2453 } | 2488 } |
2454 unittest.expect(queryMap["locale"].first, unittest.equals(arg_locale)); | 2489 unittest.expect(queryMap["locale"].first, unittest.equals(arg_locale)); |
2455 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | 2490 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); |
2456 unittest.expect(core.int.parse(queryMap["startIndex"].first), unittest.e
quals(arg_startIndex)); | 2491 unittest.expect(core.int.parse(queryMap["startIndex"].first), unittest.e
quals(arg_startIndex)); |
2457 | 2492 |
2458 | 2493 |
2459 var h = { | 2494 var h = { |
2460 "content-type" : "application/json; charset=utf-8", | 2495 "content-type" : "application/json; charset=utf-8", |
2461 }; | 2496 }; |
2462 var resp = convert.JSON.encode(buildAdsenseReportsGenerateResponse()); | 2497 var resp = convert.JSON.encode(buildAdsenseReportsGenerateResponse()); |
2463 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2498 return new async.Future.value(stringResponse(200, h, resp)); |
2464 }), true); | 2499 }), true); |
2465 res.generate(arg_accountId, arg_savedReportId, locale: arg_locale, maxResu
lts: arg_maxResults, startIndex: arg_startIndex).then(unittest.expectAsync(((api
.AdsenseReportsGenerateResponse response) { | 2500 res.generate(arg_accountId, arg_savedReportId, locale: arg_locale, maxResu
lts: arg_maxResults, startIndex: arg_startIndex).then(unittest.expectAsync(((api
.AdsenseReportsGenerateResponse response) { |
2466 checkAdsenseReportsGenerateResponse(response); | 2501 checkAdsenseReportsGenerateResponse(response); |
2467 }))); | 2502 }))); |
2468 }); | 2503 }); |
2469 | 2504 |
2470 unittest.test("method--list", () { | 2505 unittest.test("method--list", () { |
2471 | 2506 |
2472 var mock = new common_test.HttpServerMock(); | 2507 var mock = new HttpServerMock(); |
2473 api.AccountsReportsSavedResourceApi res = new api.AdsenseApi(mock).account
s.reports.saved; | 2508 api.AccountsReportsSavedResourceApi res = new api.AdsenseApi(mock).account
s.reports.saved; |
2474 var arg_accountId = "foo"; | 2509 var arg_accountId = "foo"; |
2475 var arg_maxResults = 42; | 2510 var arg_maxResults = 42; |
2476 var arg_pageToken = "foo"; | 2511 var arg_pageToken = "foo"; |
2477 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2512 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2478 var path = (req.url).path; | 2513 var path = (req.url).path; |
2479 var pathOffset = 0; | 2514 var pathOffset = 0; |
2480 var index; | 2515 var index; |
2481 var subPart; | 2516 var subPart; |
2482 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2517 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
(...skipping 27 matching lines...) Expand all Loading... |
2510 } | 2545 } |
2511 } | 2546 } |
2512 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | 2547 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); |
2513 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 2548 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
2514 | 2549 |
2515 | 2550 |
2516 var h = { | 2551 var h = { |
2517 "content-type" : "application/json; charset=utf-8", | 2552 "content-type" : "application/json; charset=utf-8", |
2518 }; | 2553 }; |
2519 var resp = convert.JSON.encode(buildSavedReports()); | 2554 var resp = convert.JSON.encode(buildSavedReports()); |
2520 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2555 return new async.Future.value(stringResponse(200, h, resp)); |
2521 }), true); | 2556 }), true); |
2522 res.list(arg_accountId, maxResults: arg_maxResults, pageToken: arg_pageTok
en).then(unittest.expectAsync(((api.SavedReports response) { | 2557 res.list(arg_accountId, maxResults: arg_maxResults, pageToken: arg_pageTok
en).then(unittest.expectAsync(((api.SavedReports response) { |
2523 checkSavedReports(response); | 2558 checkSavedReports(response); |
2524 }))); | 2559 }))); |
2525 }); | 2560 }); |
2526 | 2561 |
2527 }); | 2562 }); |
2528 | 2563 |
2529 | 2564 |
2530 unittest.group("resource-AccountsSavedadstylesResourceApi", () { | 2565 unittest.group("resource-AccountsSavedadstylesResourceApi", () { |
2531 unittest.test("method--get", () { | 2566 unittest.test("method--get", () { |
2532 | 2567 |
2533 var mock = new common_test.HttpServerMock(); | 2568 var mock = new HttpServerMock(); |
2534 api.AccountsSavedadstylesResourceApi res = new api.AdsenseApi(mock).accoun
ts.savedadstyles; | 2569 api.AccountsSavedadstylesResourceApi res = new api.AdsenseApi(mock).accoun
ts.savedadstyles; |
2535 var arg_accountId = "foo"; | 2570 var arg_accountId = "foo"; |
2536 var arg_savedAdStyleId = "foo"; | 2571 var arg_savedAdStyleId = "foo"; |
2537 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2572 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2538 var path = (req.url).path; | 2573 var path = (req.url).path; |
2539 var pathOffset = 0; | 2574 var pathOffset = 0; |
2540 var index; | 2575 var index; |
2541 var subPart; | 2576 var subPart; |
2542 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2577 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
2543 pathOffset += 1; | 2578 pathOffset += 1; |
(...skipping 27 matching lines...) Expand all Loading... |
2571 var keyvalue = part.split("="); | 2606 var keyvalue = part.split("="); |
2572 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2607 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
2573 } | 2608 } |
2574 } | 2609 } |
2575 | 2610 |
2576 | 2611 |
2577 var h = { | 2612 var h = { |
2578 "content-type" : "application/json; charset=utf-8", | 2613 "content-type" : "application/json; charset=utf-8", |
2579 }; | 2614 }; |
2580 var resp = convert.JSON.encode(buildSavedAdStyle()); | 2615 var resp = convert.JSON.encode(buildSavedAdStyle()); |
2581 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2616 return new async.Future.value(stringResponse(200, h, resp)); |
2582 }), true); | 2617 }), true); |
2583 res.get(arg_accountId, arg_savedAdStyleId).then(unittest.expectAsync(((api
.SavedAdStyle response) { | 2618 res.get(arg_accountId, arg_savedAdStyleId).then(unittest.expectAsync(((api
.SavedAdStyle response) { |
2584 checkSavedAdStyle(response); | 2619 checkSavedAdStyle(response); |
2585 }))); | 2620 }))); |
2586 }); | 2621 }); |
2587 | 2622 |
2588 unittest.test("method--list", () { | 2623 unittest.test("method--list", () { |
2589 | 2624 |
2590 var mock = new common_test.HttpServerMock(); | 2625 var mock = new HttpServerMock(); |
2591 api.AccountsSavedadstylesResourceApi res = new api.AdsenseApi(mock).accoun
ts.savedadstyles; | 2626 api.AccountsSavedadstylesResourceApi res = new api.AdsenseApi(mock).accoun
ts.savedadstyles; |
2592 var arg_accountId = "foo"; | 2627 var arg_accountId = "foo"; |
2593 var arg_maxResults = 42; | 2628 var arg_maxResults = 42; |
2594 var arg_pageToken = "foo"; | 2629 var arg_pageToken = "foo"; |
2595 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2630 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2596 var path = (req.url).path; | 2631 var path = (req.url).path; |
2597 var pathOffset = 0; | 2632 var pathOffset = 0; |
2598 var index; | 2633 var index; |
2599 var subPart; | 2634 var subPart; |
2600 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2635 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
(...skipping 27 matching lines...) Expand all Loading... |
2628 } | 2663 } |
2629 } | 2664 } |
2630 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | 2665 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); |
2631 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 2666 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
2632 | 2667 |
2633 | 2668 |
2634 var h = { | 2669 var h = { |
2635 "content-type" : "application/json; charset=utf-8", | 2670 "content-type" : "application/json; charset=utf-8", |
2636 }; | 2671 }; |
2637 var resp = convert.JSON.encode(buildSavedAdStyles()); | 2672 var resp = convert.JSON.encode(buildSavedAdStyles()); |
2638 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2673 return new async.Future.value(stringResponse(200, h, resp)); |
2639 }), true); | 2674 }), true); |
2640 res.list(arg_accountId, maxResults: arg_maxResults, pageToken: arg_pageTok
en).then(unittest.expectAsync(((api.SavedAdStyles response) { | 2675 res.list(arg_accountId, maxResults: arg_maxResults, pageToken: arg_pageTok
en).then(unittest.expectAsync(((api.SavedAdStyles response) { |
2641 checkSavedAdStyles(response); | 2676 checkSavedAdStyles(response); |
2642 }))); | 2677 }))); |
2643 }); | 2678 }); |
2644 | 2679 |
2645 }); | 2680 }); |
2646 | 2681 |
2647 | 2682 |
2648 unittest.group("resource-AccountsUrlchannelsResourceApi", () { | 2683 unittest.group("resource-AccountsUrlchannelsResourceApi", () { |
2649 unittest.test("method--list", () { | 2684 unittest.test("method--list", () { |
2650 | 2685 |
2651 var mock = new common_test.HttpServerMock(); | 2686 var mock = new HttpServerMock(); |
2652 api.AccountsUrlchannelsResourceApi res = new api.AdsenseApi(mock).accounts
.urlchannels; | 2687 api.AccountsUrlchannelsResourceApi res = new api.AdsenseApi(mock).accounts
.urlchannels; |
2653 var arg_accountId = "foo"; | 2688 var arg_accountId = "foo"; |
2654 var arg_adClientId = "foo"; | 2689 var arg_adClientId = "foo"; |
2655 var arg_maxResults = 42; | 2690 var arg_maxResults = 42; |
2656 var arg_pageToken = "foo"; | 2691 var arg_pageToken = "foo"; |
2657 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2692 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2658 var path = (req.url).path; | 2693 var path = (req.url).path; |
2659 var pathOffset = 0; | 2694 var pathOffset = 0; |
2660 var index; | 2695 var index; |
2661 var subPart; | 2696 var subPart; |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2697 } | 2732 } |
2698 } | 2733 } |
2699 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | 2734 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); |
2700 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 2735 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
2701 | 2736 |
2702 | 2737 |
2703 var h = { | 2738 var h = { |
2704 "content-type" : "application/json; charset=utf-8", | 2739 "content-type" : "application/json; charset=utf-8", |
2705 }; | 2740 }; |
2706 var resp = convert.JSON.encode(buildUrlChannels()); | 2741 var resp = convert.JSON.encode(buildUrlChannels()); |
2707 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2742 return new async.Future.value(stringResponse(200, h, resp)); |
2708 }), true); | 2743 }), true); |
2709 res.list(arg_accountId, arg_adClientId, maxResults: arg_maxResults, pageTo
ken: arg_pageToken).then(unittest.expectAsync(((api.UrlChannels response) { | 2744 res.list(arg_accountId, arg_adClientId, maxResults: arg_maxResults, pageTo
ken: arg_pageToken).then(unittest.expectAsync(((api.UrlChannels response) { |
2710 checkUrlChannels(response); | 2745 checkUrlChannels(response); |
2711 }))); | 2746 }))); |
2712 }); | 2747 }); |
2713 | 2748 |
2714 }); | 2749 }); |
2715 | 2750 |
2716 | 2751 |
2717 unittest.group("resource-AdclientsResourceApi", () { | 2752 unittest.group("resource-AdclientsResourceApi", () { |
2718 unittest.test("method--list", () { | 2753 unittest.test("method--list", () { |
2719 | 2754 |
2720 var mock = new common_test.HttpServerMock(); | 2755 var mock = new HttpServerMock(); |
2721 api.AdclientsResourceApi res = new api.AdsenseApi(mock).adclients; | 2756 api.AdclientsResourceApi res = new api.AdsenseApi(mock).adclients; |
2722 var arg_maxResults = 42; | 2757 var arg_maxResults = 42; |
2723 var arg_pageToken = "foo"; | 2758 var arg_pageToken = "foo"; |
2724 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2759 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2725 var path = (req.url).path; | 2760 var path = (req.url).path; |
2726 var pathOffset = 0; | 2761 var pathOffset = 0; |
2727 var index; | 2762 var index; |
2728 var subPart; | 2763 var subPart; |
2729 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2764 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
2730 pathOffset += 1; | 2765 pathOffset += 1; |
(...skipping 19 matching lines...) Expand all Loading... |
2750 } | 2785 } |
2751 } | 2786 } |
2752 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | 2787 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); |
2753 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 2788 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
2754 | 2789 |
2755 | 2790 |
2756 var h = { | 2791 var h = { |
2757 "content-type" : "application/json; charset=utf-8", | 2792 "content-type" : "application/json; charset=utf-8", |
2758 }; | 2793 }; |
2759 var resp = convert.JSON.encode(buildAdClients()); | 2794 var resp = convert.JSON.encode(buildAdClients()); |
2760 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2795 return new async.Future.value(stringResponse(200, h, resp)); |
2761 }), true); | 2796 }), true); |
2762 res.list(maxResults: arg_maxResults, pageToken: arg_pageToken).then(unitte
st.expectAsync(((api.AdClients response) { | 2797 res.list(maxResults: arg_maxResults, pageToken: arg_pageToken).then(unitte
st.expectAsync(((api.AdClients response) { |
2763 checkAdClients(response); | 2798 checkAdClients(response); |
2764 }))); | 2799 }))); |
2765 }); | 2800 }); |
2766 | 2801 |
2767 }); | 2802 }); |
2768 | 2803 |
2769 | 2804 |
2770 unittest.group("resource-AdunitsResourceApi", () { | 2805 unittest.group("resource-AdunitsResourceApi", () { |
2771 unittest.test("method--get", () { | 2806 unittest.test("method--get", () { |
2772 | 2807 |
2773 var mock = new common_test.HttpServerMock(); | 2808 var mock = new HttpServerMock(); |
2774 api.AdunitsResourceApi res = new api.AdsenseApi(mock).adunits; | 2809 api.AdunitsResourceApi res = new api.AdsenseApi(mock).adunits; |
2775 var arg_adClientId = "foo"; | 2810 var arg_adClientId = "foo"; |
2776 var arg_adUnitId = "foo"; | 2811 var arg_adUnitId = "foo"; |
2777 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2812 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2778 var path = (req.url).path; | 2813 var path = (req.url).path; |
2779 var pathOffset = 0; | 2814 var pathOffset = 0; |
2780 var index; | 2815 var index; |
2781 var subPart; | 2816 var subPart; |
2782 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2817 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
2783 pathOffset += 1; | 2818 pathOffset += 1; |
(...skipping 27 matching lines...) Expand all Loading... |
2811 var keyvalue = part.split("="); | 2846 var keyvalue = part.split("="); |
2812 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2847 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
2813 } | 2848 } |
2814 } | 2849 } |
2815 | 2850 |
2816 | 2851 |
2817 var h = { | 2852 var h = { |
2818 "content-type" : "application/json; charset=utf-8", | 2853 "content-type" : "application/json; charset=utf-8", |
2819 }; | 2854 }; |
2820 var resp = convert.JSON.encode(buildAdUnit()); | 2855 var resp = convert.JSON.encode(buildAdUnit()); |
2821 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2856 return new async.Future.value(stringResponse(200, h, resp)); |
2822 }), true); | 2857 }), true); |
2823 res.get(arg_adClientId, arg_adUnitId).then(unittest.expectAsync(((api.AdUn
it response) { | 2858 res.get(arg_adClientId, arg_adUnitId).then(unittest.expectAsync(((api.AdUn
it response) { |
2824 checkAdUnit(response); | 2859 checkAdUnit(response); |
2825 }))); | 2860 }))); |
2826 }); | 2861 }); |
2827 | 2862 |
2828 unittest.test("method--getAdCode", () { | 2863 unittest.test("method--getAdCode", () { |
2829 | 2864 |
2830 var mock = new common_test.HttpServerMock(); | 2865 var mock = new HttpServerMock(); |
2831 api.AdunitsResourceApi res = new api.AdsenseApi(mock).adunits; | 2866 api.AdunitsResourceApi res = new api.AdsenseApi(mock).adunits; |
2832 var arg_adClientId = "foo"; | 2867 var arg_adClientId = "foo"; |
2833 var arg_adUnitId = "foo"; | 2868 var arg_adUnitId = "foo"; |
2834 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2869 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2835 var path = (req.url).path; | 2870 var path = (req.url).path; |
2836 var pathOffset = 0; | 2871 var pathOffset = 0; |
2837 var index; | 2872 var index; |
2838 var subPart; | 2873 var subPart; |
2839 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2874 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
2840 pathOffset += 1; | 2875 pathOffset += 1; |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2872 var keyvalue = part.split("="); | 2907 var keyvalue = part.split("="); |
2873 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2908 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
2874 } | 2909 } |
2875 } | 2910 } |
2876 | 2911 |
2877 | 2912 |
2878 var h = { | 2913 var h = { |
2879 "content-type" : "application/json; charset=utf-8", | 2914 "content-type" : "application/json; charset=utf-8", |
2880 }; | 2915 }; |
2881 var resp = convert.JSON.encode(buildAdCode()); | 2916 var resp = convert.JSON.encode(buildAdCode()); |
2882 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2917 return new async.Future.value(stringResponse(200, h, resp)); |
2883 }), true); | 2918 }), true); |
2884 res.getAdCode(arg_adClientId, arg_adUnitId).then(unittest.expectAsync(((ap
i.AdCode response) { | 2919 res.getAdCode(arg_adClientId, arg_adUnitId).then(unittest.expectAsync(((ap
i.AdCode response) { |
2885 checkAdCode(response); | 2920 checkAdCode(response); |
2886 }))); | 2921 }))); |
2887 }); | 2922 }); |
2888 | 2923 |
2889 unittest.test("method--list", () { | 2924 unittest.test("method--list", () { |
2890 | 2925 |
2891 var mock = new common_test.HttpServerMock(); | 2926 var mock = new HttpServerMock(); |
2892 api.AdunitsResourceApi res = new api.AdsenseApi(mock).adunits; | 2927 api.AdunitsResourceApi res = new api.AdsenseApi(mock).adunits; |
2893 var arg_adClientId = "foo"; | 2928 var arg_adClientId = "foo"; |
2894 var arg_includeInactive = true; | 2929 var arg_includeInactive = true; |
2895 var arg_maxResults = 42; | 2930 var arg_maxResults = 42; |
2896 var arg_pageToken = "foo"; | 2931 var arg_pageToken = "foo"; |
2897 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2932 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2898 var path = (req.url).path; | 2933 var path = (req.url).path; |
2899 var pathOffset = 0; | 2934 var pathOffset = 0; |
2900 var index; | 2935 var index; |
2901 var subPart; | 2936 var subPart; |
(...skipping 29 matching lines...) Expand all Loading... |
2931 } | 2966 } |
2932 unittest.expect(queryMap["includeInactive"].first, unittest.equals("$arg
_includeInactive")); | 2967 unittest.expect(queryMap["includeInactive"].first, unittest.equals("$arg
_includeInactive")); |
2933 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | 2968 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); |
2934 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 2969 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
2935 | 2970 |
2936 | 2971 |
2937 var h = { | 2972 var h = { |
2938 "content-type" : "application/json; charset=utf-8", | 2973 "content-type" : "application/json; charset=utf-8", |
2939 }; | 2974 }; |
2940 var resp = convert.JSON.encode(buildAdUnits()); | 2975 var resp = convert.JSON.encode(buildAdUnits()); |
2941 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2976 return new async.Future.value(stringResponse(200, h, resp)); |
2942 }), true); | 2977 }), true); |
2943 res.list(arg_adClientId, includeInactive: arg_includeInactive, maxResults:
arg_maxResults, pageToken: arg_pageToken).then(unittest.expectAsync(((api.AdUni
ts response) { | 2978 res.list(arg_adClientId, includeInactive: arg_includeInactive, maxResults:
arg_maxResults, pageToken: arg_pageToken).then(unittest.expectAsync(((api.AdUni
ts response) { |
2944 checkAdUnits(response); | 2979 checkAdUnits(response); |
2945 }))); | 2980 }))); |
2946 }); | 2981 }); |
2947 | 2982 |
2948 }); | 2983 }); |
2949 | 2984 |
2950 | 2985 |
2951 unittest.group("resource-AdunitsCustomchannelsResourceApi", () { | 2986 unittest.group("resource-AdunitsCustomchannelsResourceApi", () { |
2952 unittest.test("method--list", () { | 2987 unittest.test("method--list", () { |
2953 | 2988 |
2954 var mock = new common_test.HttpServerMock(); | 2989 var mock = new HttpServerMock(); |
2955 api.AdunitsCustomchannelsResourceApi res = new api.AdsenseApi(mock).adunit
s.customchannels; | 2990 api.AdunitsCustomchannelsResourceApi res = new api.AdsenseApi(mock).adunit
s.customchannels; |
2956 var arg_adClientId = "foo"; | 2991 var arg_adClientId = "foo"; |
2957 var arg_adUnitId = "foo"; | 2992 var arg_adUnitId = "foo"; |
2958 var arg_maxResults = 42; | 2993 var arg_maxResults = 42; |
2959 var arg_pageToken = "foo"; | 2994 var arg_pageToken = "foo"; |
2960 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2995 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2961 var path = (req.url).path; | 2996 var path = (req.url).path; |
2962 var pathOffset = 0; | 2997 var pathOffset = 0; |
2963 var index; | 2998 var index; |
2964 var subPart; | 2999 var subPart; |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3000 } | 3035 } |
3001 } | 3036 } |
3002 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | 3037 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); |
3003 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 3038 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
3004 | 3039 |
3005 | 3040 |
3006 var h = { | 3041 var h = { |
3007 "content-type" : "application/json; charset=utf-8", | 3042 "content-type" : "application/json; charset=utf-8", |
3008 }; | 3043 }; |
3009 var resp = convert.JSON.encode(buildCustomChannels()); | 3044 var resp = convert.JSON.encode(buildCustomChannels()); |
3010 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 3045 return new async.Future.value(stringResponse(200, h, resp)); |
3011 }), true); | 3046 }), true); |
3012 res.list(arg_adClientId, arg_adUnitId, maxResults: arg_maxResults, pageTok
en: arg_pageToken).then(unittest.expectAsync(((api.CustomChannels response) { | 3047 res.list(arg_adClientId, arg_adUnitId, maxResults: arg_maxResults, pageTok
en: arg_pageToken).then(unittest.expectAsync(((api.CustomChannels response) { |
3013 checkCustomChannels(response); | 3048 checkCustomChannels(response); |
3014 }))); | 3049 }))); |
3015 }); | 3050 }); |
3016 | 3051 |
3017 }); | 3052 }); |
3018 | 3053 |
3019 | 3054 |
3020 unittest.group("resource-AlertsResourceApi", () { | 3055 unittest.group("resource-AlertsResourceApi", () { |
3021 unittest.test("method--delete", () { | 3056 unittest.test("method--delete", () { |
3022 | 3057 |
3023 var mock = new common_test.HttpServerMock(); | 3058 var mock = new HttpServerMock(); |
3024 api.AlertsResourceApi res = new api.AdsenseApi(mock).alerts; | 3059 api.AlertsResourceApi res = new api.AdsenseApi(mock).alerts; |
3025 var arg_alertId = "foo"; | 3060 var arg_alertId = "foo"; |
3026 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3061 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
3027 var path = (req.url).path; | 3062 var path = (req.url).path; |
3028 var pathOffset = 0; | 3063 var pathOffset = 0; |
3029 var index; | 3064 var index; |
3030 var subPart; | 3065 var subPart; |
3031 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3066 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
3032 pathOffset += 1; | 3067 pathOffset += 1; |
3033 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("adsense/v1.4/")); | 3068 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("adsense/v1.4/")); |
(...skipping 19 matching lines...) Expand all Loading... |
3053 var keyvalue = part.split("="); | 3088 var keyvalue = part.split("="); |
3054 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 3089 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
3055 } | 3090 } |
3056 } | 3091 } |
3057 | 3092 |
3058 | 3093 |
3059 var h = { | 3094 var h = { |
3060 "content-type" : "application/json; charset=utf-8", | 3095 "content-type" : "application/json; charset=utf-8", |
3061 }; | 3096 }; |
3062 var resp = ""; | 3097 var resp = ""; |
3063 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 3098 return new async.Future.value(stringResponse(200, h, resp)); |
3064 }), true); | 3099 }), true); |
3065 res.delete(arg_alertId).then(unittest.expectAsync((_) {})); | 3100 res.delete(arg_alertId).then(unittest.expectAsync((_) {})); |
3066 }); | 3101 }); |
3067 | 3102 |
3068 unittest.test("method--list", () { | 3103 unittest.test("method--list", () { |
3069 | 3104 |
3070 var mock = new common_test.HttpServerMock(); | 3105 var mock = new HttpServerMock(); |
3071 api.AlertsResourceApi res = new api.AdsenseApi(mock).alerts; | 3106 api.AlertsResourceApi res = new api.AdsenseApi(mock).alerts; |
3072 var arg_locale = "foo"; | 3107 var arg_locale = "foo"; |
3073 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3108 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
3074 var path = (req.url).path; | 3109 var path = (req.url).path; |
3075 var pathOffset = 0; | 3110 var pathOffset = 0; |
3076 var index; | 3111 var index; |
3077 var subPart; | 3112 var subPart; |
3078 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3113 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
3079 pathOffset += 1; | 3114 pathOffset += 1; |
3080 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("adsense/v1.4/")); | 3115 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("adsense/v1.4/")); |
(...skipping 17 matching lines...) Expand all Loading... |
3098 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 3133 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
3099 } | 3134 } |
3100 } | 3135 } |
3101 unittest.expect(queryMap["locale"].first, unittest.equals(arg_locale)); | 3136 unittest.expect(queryMap["locale"].first, unittest.equals(arg_locale)); |
3102 | 3137 |
3103 | 3138 |
3104 var h = { | 3139 var h = { |
3105 "content-type" : "application/json; charset=utf-8", | 3140 "content-type" : "application/json; charset=utf-8", |
3106 }; | 3141 }; |
3107 var resp = convert.JSON.encode(buildAlerts()); | 3142 var resp = convert.JSON.encode(buildAlerts()); |
3108 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 3143 return new async.Future.value(stringResponse(200, h, resp)); |
3109 }), true); | 3144 }), true); |
3110 res.list(locale: arg_locale).then(unittest.expectAsync(((api.Alerts respon
se) { | 3145 res.list(locale: arg_locale).then(unittest.expectAsync(((api.Alerts respon
se) { |
3111 checkAlerts(response); | 3146 checkAlerts(response); |
3112 }))); | 3147 }))); |
3113 }); | 3148 }); |
3114 | 3149 |
3115 }); | 3150 }); |
3116 | 3151 |
3117 | 3152 |
3118 unittest.group("resource-CustomchannelsResourceApi", () { | 3153 unittest.group("resource-CustomchannelsResourceApi", () { |
3119 unittest.test("method--get", () { | 3154 unittest.test("method--get", () { |
3120 | 3155 |
3121 var mock = new common_test.HttpServerMock(); | 3156 var mock = new HttpServerMock(); |
3122 api.CustomchannelsResourceApi res = new api.AdsenseApi(mock).customchannel
s; | 3157 api.CustomchannelsResourceApi res = new api.AdsenseApi(mock).customchannel
s; |
3123 var arg_adClientId = "foo"; | 3158 var arg_adClientId = "foo"; |
3124 var arg_customChannelId = "foo"; | 3159 var arg_customChannelId = "foo"; |
3125 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3160 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
3126 var path = (req.url).path; | 3161 var path = (req.url).path; |
3127 var pathOffset = 0; | 3162 var pathOffset = 0; |
3128 var index; | 3163 var index; |
3129 var subPart; | 3164 var subPart; |
3130 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3165 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
3131 pathOffset += 1; | 3166 pathOffset += 1; |
(...skipping 27 matching lines...) Expand all Loading... |
3159 var keyvalue = part.split("="); | 3194 var keyvalue = part.split("="); |
3160 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 3195 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
3161 } | 3196 } |
3162 } | 3197 } |
3163 | 3198 |
3164 | 3199 |
3165 var h = { | 3200 var h = { |
3166 "content-type" : "application/json; charset=utf-8", | 3201 "content-type" : "application/json; charset=utf-8", |
3167 }; | 3202 }; |
3168 var resp = convert.JSON.encode(buildCustomChannel()); | 3203 var resp = convert.JSON.encode(buildCustomChannel()); |
3169 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 3204 return new async.Future.value(stringResponse(200, h, resp)); |
3170 }), true); | 3205 }), true); |
3171 res.get(arg_adClientId, arg_customChannelId).then(unittest.expectAsync(((a
pi.CustomChannel response) { | 3206 res.get(arg_adClientId, arg_customChannelId).then(unittest.expectAsync(((a
pi.CustomChannel response) { |
3172 checkCustomChannel(response); | 3207 checkCustomChannel(response); |
3173 }))); | 3208 }))); |
3174 }); | 3209 }); |
3175 | 3210 |
3176 unittest.test("method--list", () { | 3211 unittest.test("method--list", () { |
3177 | 3212 |
3178 var mock = new common_test.HttpServerMock(); | 3213 var mock = new HttpServerMock(); |
3179 api.CustomchannelsResourceApi res = new api.AdsenseApi(mock).customchannel
s; | 3214 api.CustomchannelsResourceApi res = new api.AdsenseApi(mock).customchannel
s; |
3180 var arg_adClientId = "foo"; | 3215 var arg_adClientId = "foo"; |
3181 var arg_maxResults = 42; | 3216 var arg_maxResults = 42; |
3182 var arg_pageToken = "foo"; | 3217 var arg_pageToken = "foo"; |
3183 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3218 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
3184 var path = (req.url).path; | 3219 var path = (req.url).path; |
3185 var pathOffset = 0; | 3220 var pathOffset = 0; |
3186 var index; | 3221 var index; |
3187 var subPart; | 3222 var subPart; |
3188 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3223 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
(...skipping 27 matching lines...) Expand all Loading... |
3216 } | 3251 } |
3217 } | 3252 } |
3218 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | 3253 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); |
3219 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 3254 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
3220 | 3255 |
3221 | 3256 |
3222 var h = { | 3257 var h = { |
3223 "content-type" : "application/json; charset=utf-8", | 3258 "content-type" : "application/json; charset=utf-8", |
3224 }; | 3259 }; |
3225 var resp = convert.JSON.encode(buildCustomChannels()); | 3260 var resp = convert.JSON.encode(buildCustomChannels()); |
3226 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 3261 return new async.Future.value(stringResponse(200, h, resp)); |
3227 }), true); | 3262 }), true); |
3228 res.list(arg_adClientId, maxResults: arg_maxResults, pageToken: arg_pageTo
ken).then(unittest.expectAsync(((api.CustomChannels response) { | 3263 res.list(arg_adClientId, maxResults: arg_maxResults, pageToken: arg_pageTo
ken).then(unittest.expectAsync(((api.CustomChannels response) { |
3229 checkCustomChannels(response); | 3264 checkCustomChannels(response); |
3230 }))); | 3265 }))); |
3231 }); | 3266 }); |
3232 | 3267 |
3233 }); | 3268 }); |
3234 | 3269 |
3235 | 3270 |
3236 unittest.group("resource-CustomchannelsAdunitsResourceApi", () { | 3271 unittest.group("resource-CustomchannelsAdunitsResourceApi", () { |
3237 unittest.test("method--list", () { | 3272 unittest.test("method--list", () { |
3238 | 3273 |
3239 var mock = new common_test.HttpServerMock(); | 3274 var mock = new HttpServerMock(); |
3240 api.CustomchannelsAdunitsResourceApi res = new api.AdsenseApi(mock).custom
channels.adunits; | 3275 api.CustomchannelsAdunitsResourceApi res = new api.AdsenseApi(mock).custom
channels.adunits; |
3241 var arg_adClientId = "foo"; | 3276 var arg_adClientId = "foo"; |
3242 var arg_customChannelId = "foo"; | 3277 var arg_customChannelId = "foo"; |
3243 var arg_includeInactive = true; | 3278 var arg_includeInactive = true; |
3244 var arg_maxResults = 42; | 3279 var arg_maxResults = 42; |
3245 var arg_pageToken = "foo"; | 3280 var arg_pageToken = "foo"; |
3246 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3281 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
3247 var path = (req.url).path; | 3282 var path = (req.url).path; |
3248 var pathOffset = 0; | 3283 var pathOffset = 0; |
3249 var index; | 3284 var index; |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3287 } | 3322 } |
3288 unittest.expect(queryMap["includeInactive"].first, unittest.equals("$arg
_includeInactive")); | 3323 unittest.expect(queryMap["includeInactive"].first, unittest.equals("$arg
_includeInactive")); |
3289 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | 3324 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); |
3290 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 3325 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
3291 | 3326 |
3292 | 3327 |
3293 var h = { | 3328 var h = { |
3294 "content-type" : "application/json; charset=utf-8", | 3329 "content-type" : "application/json; charset=utf-8", |
3295 }; | 3330 }; |
3296 var resp = convert.JSON.encode(buildAdUnits()); | 3331 var resp = convert.JSON.encode(buildAdUnits()); |
3297 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 3332 return new async.Future.value(stringResponse(200, h, resp)); |
3298 }), true); | 3333 }), true); |
3299 res.list(arg_adClientId, arg_customChannelId, includeInactive: arg_include
Inactive, maxResults: arg_maxResults, pageToken: arg_pageToken).then(unittest.ex
pectAsync(((api.AdUnits response) { | 3334 res.list(arg_adClientId, arg_customChannelId, includeInactive: arg_include
Inactive, maxResults: arg_maxResults, pageToken: arg_pageToken).then(unittest.ex
pectAsync(((api.AdUnits response) { |
3300 checkAdUnits(response); | 3335 checkAdUnits(response); |
3301 }))); | 3336 }))); |
3302 }); | 3337 }); |
3303 | 3338 |
3304 }); | 3339 }); |
3305 | 3340 |
3306 | 3341 |
3307 unittest.group("resource-MetadataDimensionsResourceApi", () { | 3342 unittest.group("resource-MetadataDimensionsResourceApi", () { |
3308 unittest.test("method--list", () { | 3343 unittest.test("method--list", () { |
3309 | 3344 |
3310 var mock = new common_test.HttpServerMock(); | 3345 var mock = new HttpServerMock(); |
3311 api.MetadataDimensionsResourceApi res = new api.AdsenseApi(mock).metadata.
dimensions; | 3346 api.MetadataDimensionsResourceApi res = new api.AdsenseApi(mock).metadata.
dimensions; |
3312 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3347 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
3313 var path = (req.url).path; | 3348 var path = (req.url).path; |
3314 var pathOffset = 0; | 3349 var pathOffset = 0; |
3315 var index; | 3350 var index; |
3316 var subPart; | 3351 var subPart; |
3317 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3352 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
3318 pathOffset += 1; | 3353 pathOffset += 1; |
3319 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("adsense/v1.4/")); | 3354 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("adsense/v1.4/")); |
3320 pathOffset += 13; | 3355 pathOffset += 13; |
(...skipping 15 matching lines...) Expand all Loading... |
3336 var keyvalue = part.split("="); | 3371 var keyvalue = part.split("="); |
3337 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 3372 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
3338 } | 3373 } |
3339 } | 3374 } |
3340 | 3375 |
3341 | 3376 |
3342 var h = { | 3377 var h = { |
3343 "content-type" : "application/json; charset=utf-8", | 3378 "content-type" : "application/json; charset=utf-8", |
3344 }; | 3379 }; |
3345 var resp = convert.JSON.encode(buildMetadata()); | 3380 var resp = convert.JSON.encode(buildMetadata()); |
3346 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 3381 return new async.Future.value(stringResponse(200, h, resp)); |
3347 }), true); | 3382 }), true); |
3348 res.list().then(unittest.expectAsync(((api.Metadata response) { | 3383 res.list().then(unittest.expectAsync(((api.Metadata response) { |
3349 checkMetadata(response); | 3384 checkMetadata(response); |
3350 }))); | 3385 }))); |
3351 }); | 3386 }); |
3352 | 3387 |
3353 }); | 3388 }); |
3354 | 3389 |
3355 | 3390 |
3356 unittest.group("resource-MetadataMetricsResourceApi", () { | 3391 unittest.group("resource-MetadataMetricsResourceApi", () { |
3357 unittest.test("method--list", () { | 3392 unittest.test("method--list", () { |
3358 | 3393 |
3359 var mock = new common_test.HttpServerMock(); | 3394 var mock = new HttpServerMock(); |
3360 api.MetadataMetricsResourceApi res = new api.AdsenseApi(mock).metadata.met
rics; | 3395 api.MetadataMetricsResourceApi res = new api.AdsenseApi(mock).metadata.met
rics; |
3361 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3396 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
3362 var path = (req.url).path; | 3397 var path = (req.url).path; |
3363 var pathOffset = 0; | 3398 var pathOffset = 0; |
3364 var index; | 3399 var index; |
3365 var subPart; | 3400 var subPart; |
3366 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3401 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
3367 pathOffset += 1; | 3402 pathOffset += 1; |
3368 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("adsense/v1.4/")); | 3403 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("adsense/v1.4/")); |
3369 pathOffset += 13; | 3404 pathOffset += 13; |
(...skipping 15 matching lines...) Expand all Loading... |
3385 var keyvalue = part.split("="); | 3420 var keyvalue = part.split("="); |
3386 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 3421 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
3387 } | 3422 } |
3388 } | 3423 } |
3389 | 3424 |
3390 | 3425 |
3391 var h = { | 3426 var h = { |
3392 "content-type" : "application/json; charset=utf-8", | 3427 "content-type" : "application/json; charset=utf-8", |
3393 }; | 3428 }; |
3394 var resp = convert.JSON.encode(buildMetadata()); | 3429 var resp = convert.JSON.encode(buildMetadata()); |
3395 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 3430 return new async.Future.value(stringResponse(200, h, resp)); |
3396 }), true); | 3431 }), true); |
3397 res.list().then(unittest.expectAsync(((api.Metadata response) { | 3432 res.list().then(unittest.expectAsync(((api.Metadata response) { |
3398 checkMetadata(response); | 3433 checkMetadata(response); |
3399 }))); | 3434 }))); |
3400 }); | 3435 }); |
3401 | 3436 |
3402 }); | 3437 }); |
3403 | 3438 |
3404 | 3439 |
3405 unittest.group("resource-PaymentsResourceApi", () { | 3440 unittest.group("resource-PaymentsResourceApi", () { |
3406 unittest.test("method--list", () { | 3441 unittest.test("method--list", () { |
3407 | 3442 |
3408 var mock = new common_test.HttpServerMock(); | 3443 var mock = new HttpServerMock(); |
3409 api.PaymentsResourceApi res = new api.AdsenseApi(mock).payments; | 3444 api.PaymentsResourceApi res = new api.AdsenseApi(mock).payments; |
3410 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3445 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
3411 var path = (req.url).path; | 3446 var path = (req.url).path; |
3412 var pathOffset = 0; | 3447 var pathOffset = 0; |
3413 var index; | 3448 var index; |
3414 var subPart; | 3449 var subPart; |
3415 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3450 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
3416 pathOffset += 1; | 3451 pathOffset += 1; |
3417 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("adsense/v1.4/")); | 3452 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("adsense/v1.4/")); |
3418 pathOffset += 13; | 3453 pathOffset += 13; |
(...skipping 15 matching lines...) Expand all Loading... |
3434 var keyvalue = part.split("="); | 3469 var keyvalue = part.split("="); |
3435 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 3470 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
3436 } | 3471 } |
3437 } | 3472 } |
3438 | 3473 |
3439 | 3474 |
3440 var h = { | 3475 var h = { |
3441 "content-type" : "application/json; charset=utf-8", | 3476 "content-type" : "application/json; charset=utf-8", |
3442 }; | 3477 }; |
3443 var resp = convert.JSON.encode(buildPayments()); | 3478 var resp = convert.JSON.encode(buildPayments()); |
3444 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 3479 return new async.Future.value(stringResponse(200, h, resp)); |
3445 }), true); | 3480 }), true); |
3446 res.list().then(unittest.expectAsync(((api.Payments response) { | 3481 res.list().then(unittest.expectAsync(((api.Payments response) { |
3447 checkPayments(response); | 3482 checkPayments(response); |
3448 }))); | 3483 }))); |
3449 }); | 3484 }); |
3450 | 3485 |
3451 }); | 3486 }); |
3452 | 3487 |
3453 | 3488 |
3454 unittest.group("resource-ReportsResourceApi", () { | 3489 unittest.group("resource-ReportsResourceApi", () { |
3455 unittest.test("method--generate", () { | 3490 unittest.test("method--generate", () { |
3456 // TODO: Implement tests for media upload; | 3491 // TODO: Implement tests for media upload; |
3457 // TODO: Implement tests for media download; | 3492 // TODO: Implement tests for media download; |
3458 | 3493 |
3459 var mock = new common_test.HttpServerMock(); | 3494 var mock = new HttpServerMock(); |
3460 api.ReportsResourceApi res = new api.AdsenseApi(mock).reports; | 3495 api.ReportsResourceApi res = new api.AdsenseApi(mock).reports; |
3461 var arg_startDate = "foo"; | 3496 var arg_startDate = "foo"; |
3462 var arg_endDate = "foo"; | 3497 var arg_endDate = "foo"; |
3463 var arg_accountId = buildUnnamed1222(); | 3498 var arg_accountId = buildUnnamed159(); |
3464 var arg_currency = "foo"; | 3499 var arg_currency = "foo"; |
3465 var arg_dimension = buildUnnamed1223(); | 3500 var arg_dimension = buildUnnamed160(); |
3466 var arg_filter = buildUnnamed1224(); | 3501 var arg_filter = buildUnnamed161(); |
3467 var arg_locale = "foo"; | 3502 var arg_locale = "foo"; |
3468 var arg_maxResults = 42; | 3503 var arg_maxResults = 42; |
3469 var arg_metric = buildUnnamed1225(); | 3504 var arg_metric = buildUnnamed162(); |
3470 var arg_sort = buildUnnamed1226(); | 3505 var arg_sort = buildUnnamed163(); |
3471 var arg_startIndex = 42; | 3506 var arg_startIndex = 42; |
3472 var arg_useTimezoneReporting = true; | 3507 var arg_useTimezoneReporting = true; |
3473 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3508 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
3474 var path = (req.url).path; | 3509 var path = (req.url).path; |
3475 var pathOffset = 0; | 3510 var pathOffset = 0; |
3476 var index; | 3511 var index; |
3477 var subPart; | 3512 var subPart; |
3478 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3513 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
3479 pathOffset += 1; | 3514 pathOffset += 1; |
3480 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("adsense/v1.4/")); | 3515 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("adsense/v1.4/")); |
(...skipping 28 matching lines...) Expand all Loading... |
3509 unittest.expect(queryMap["metric"], unittest.equals(arg_metric)); | 3544 unittest.expect(queryMap["metric"], unittest.equals(arg_metric)); |
3510 unittest.expect(queryMap["sort"], unittest.equals(arg_sort)); | 3545 unittest.expect(queryMap["sort"], unittest.equals(arg_sort)); |
3511 unittest.expect(core.int.parse(queryMap["startIndex"].first), unittest.e
quals(arg_startIndex)); | 3546 unittest.expect(core.int.parse(queryMap["startIndex"].first), unittest.e
quals(arg_startIndex)); |
3512 unittest.expect(queryMap["useTimezoneReporting"].first, unittest.equals(
"$arg_useTimezoneReporting")); | 3547 unittest.expect(queryMap["useTimezoneReporting"].first, unittest.equals(
"$arg_useTimezoneReporting")); |
3513 | 3548 |
3514 | 3549 |
3515 var h = { | 3550 var h = { |
3516 "content-type" : "application/json; charset=utf-8", | 3551 "content-type" : "application/json; charset=utf-8", |
3517 }; | 3552 }; |
3518 var resp = convert.JSON.encode(buildAdsenseReportsGenerateResponse()); | 3553 var resp = convert.JSON.encode(buildAdsenseReportsGenerateResponse()); |
3519 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 3554 return new async.Future.value(stringResponse(200, h, resp)); |
3520 }), true); | 3555 }), true); |
3521 res.generate(arg_startDate, arg_endDate, accountId: arg_accountId, currenc
y: arg_currency, dimension: arg_dimension, filter: arg_filter, locale: arg_local
e, maxResults: arg_maxResults, metric: arg_metric, sort: arg_sort, startIndex: a
rg_startIndex, useTimezoneReporting: arg_useTimezoneReporting).then(unittest.exp
ectAsync(((api.AdsenseReportsGenerateResponse response) { | 3556 res.generate(arg_startDate, arg_endDate, accountId: arg_accountId, currenc
y: arg_currency, dimension: arg_dimension, filter: arg_filter, locale: arg_local
e, maxResults: arg_maxResults, metric: arg_metric, sort: arg_sort, startIndex: a
rg_startIndex, useTimezoneReporting: arg_useTimezoneReporting).then(unittest.exp
ectAsync(((api.AdsenseReportsGenerateResponse response) { |
3522 checkAdsenseReportsGenerateResponse(response); | 3557 checkAdsenseReportsGenerateResponse(response); |
3523 }))); | 3558 }))); |
3524 }); | 3559 }); |
3525 | 3560 |
3526 }); | 3561 }); |
3527 | 3562 |
3528 | 3563 |
3529 unittest.group("resource-ReportsSavedResourceApi", () { | 3564 unittest.group("resource-ReportsSavedResourceApi", () { |
3530 unittest.test("method--generate", () { | 3565 unittest.test("method--generate", () { |
3531 | 3566 |
3532 var mock = new common_test.HttpServerMock(); | 3567 var mock = new HttpServerMock(); |
3533 api.ReportsSavedResourceApi res = new api.AdsenseApi(mock).reports.saved; | 3568 api.ReportsSavedResourceApi res = new api.AdsenseApi(mock).reports.saved; |
3534 var arg_savedReportId = "foo"; | 3569 var arg_savedReportId = "foo"; |
3535 var arg_locale = "foo"; | 3570 var arg_locale = "foo"; |
3536 var arg_maxResults = 42; | 3571 var arg_maxResults = 42; |
3537 var arg_startIndex = 42; | 3572 var arg_startIndex = 42; |
3538 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3573 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
3539 var path = (req.url).path; | 3574 var path = (req.url).path; |
3540 var pathOffset = 0; | 3575 var pathOffset = 0; |
3541 var index; | 3576 var index; |
3542 var subPart; | 3577 var subPart; |
(...skipping 25 matching lines...) Expand all Loading... |
3568 } | 3603 } |
3569 unittest.expect(queryMap["locale"].first, unittest.equals(arg_locale)); | 3604 unittest.expect(queryMap["locale"].first, unittest.equals(arg_locale)); |
3570 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | 3605 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); |
3571 unittest.expect(core.int.parse(queryMap["startIndex"].first), unittest.e
quals(arg_startIndex)); | 3606 unittest.expect(core.int.parse(queryMap["startIndex"].first), unittest.e
quals(arg_startIndex)); |
3572 | 3607 |
3573 | 3608 |
3574 var h = { | 3609 var h = { |
3575 "content-type" : "application/json; charset=utf-8", | 3610 "content-type" : "application/json; charset=utf-8", |
3576 }; | 3611 }; |
3577 var resp = convert.JSON.encode(buildAdsenseReportsGenerateResponse()); | 3612 var resp = convert.JSON.encode(buildAdsenseReportsGenerateResponse()); |
3578 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 3613 return new async.Future.value(stringResponse(200, h, resp)); |
3579 }), true); | 3614 }), true); |
3580 res.generate(arg_savedReportId, locale: arg_locale, maxResults: arg_maxRes
ults, startIndex: arg_startIndex).then(unittest.expectAsync(((api.AdsenseReports
GenerateResponse response) { | 3615 res.generate(arg_savedReportId, locale: arg_locale, maxResults: arg_maxRes
ults, startIndex: arg_startIndex).then(unittest.expectAsync(((api.AdsenseReports
GenerateResponse response) { |
3581 checkAdsenseReportsGenerateResponse(response); | 3616 checkAdsenseReportsGenerateResponse(response); |
3582 }))); | 3617 }))); |
3583 }); | 3618 }); |
3584 | 3619 |
3585 unittest.test("method--list", () { | 3620 unittest.test("method--list", () { |
3586 | 3621 |
3587 var mock = new common_test.HttpServerMock(); | 3622 var mock = new HttpServerMock(); |
3588 api.ReportsSavedResourceApi res = new api.AdsenseApi(mock).reports.saved; | 3623 api.ReportsSavedResourceApi res = new api.AdsenseApi(mock).reports.saved; |
3589 var arg_maxResults = 42; | 3624 var arg_maxResults = 42; |
3590 var arg_pageToken = "foo"; | 3625 var arg_pageToken = "foo"; |
3591 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3626 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
3592 var path = (req.url).path; | 3627 var path = (req.url).path; |
3593 var pathOffset = 0; | 3628 var pathOffset = 0; |
3594 var index; | 3629 var index; |
3595 var subPart; | 3630 var subPart; |
3596 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3631 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
3597 pathOffset += 1; | 3632 pathOffset += 1; |
(...skipping 19 matching lines...) Expand all Loading... |
3617 } | 3652 } |
3618 } | 3653 } |
3619 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | 3654 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); |
3620 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 3655 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
3621 | 3656 |
3622 | 3657 |
3623 var h = { | 3658 var h = { |
3624 "content-type" : "application/json; charset=utf-8", | 3659 "content-type" : "application/json; charset=utf-8", |
3625 }; | 3660 }; |
3626 var resp = convert.JSON.encode(buildSavedReports()); | 3661 var resp = convert.JSON.encode(buildSavedReports()); |
3627 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 3662 return new async.Future.value(stringResponse(200, h, resp)); |
3628 }), true); | 3663 }), true); |
3629 res.list(maxResults: arg_maxResults, pageToken: arg_pageToken).then(unitte
st.expectAsync(((api.SavedReports response) { | 3664 res.list(maxResults: arg_maxResults, pageToken: arg_pageToken).then(unitte
st.expectAsync(((api.SavedReports response) { |
3630 checkSavedReports(response); | 3665 checkSavedReports(response); |
3631 }))); | 3666 }))); |
3632 }); | 3667 }); |
3633 | 3668 |
3634 }); | 3669 }); |
3635 | 3670 |
3636 | 3671 |
3637 unittest.group("resource-SavedadstylesResourceApi", () { | 3672 unittest.group("resource-SavedadstylesResourceApi", () { |
3638 unittest.test("method--get", () { | 3673 unittest.test("method--get", () { |
3639 | 3674 |
3640 var mock = new common_test.HttpServerMock(); | 3675 var mock = new HttpServerMock(); |
3641 api.SavedadstylesResourceApi res = new api.AdsenseApi(mock).savedadstyles; | 3676 api.SavedadstylesResourceApi res = new api.AdsenseApi(mock).savedadstyles; |
3642 var arg_savedAdStyleId = "foo"; | 3677 var arg_savedAdStyleId = "foo"; |
3643 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3678 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
3644 var path = (req.url).path; | 3679 var path = (req.url).path; |
3645 var pathOffset = 0; | 3680 var pathOffset = 0; |
3646 var index; | 3681 var index; |
3647 var subPart; | 3682 var subPart; |
3648 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3683 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
3649 pathOffset += 1; | 3684 pathOffset += 1; |
3650 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("adsense/v1.4/")); | 3685 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("adsense/v1.4/")); |
(...skipping 19 matching lines...) Expand all Loading... |
3670 var keyvalue = part.split("="); | 3705 var keyvalue = part.split("="); |
3671 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 3706 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
3672 } | 3707 } |
3673 } | 3708 } |
3674 | 3709 |
3675 | 3710 |
3676 var h = { | 3711 var h = { |
3677 "content-type" : "application/json; charset=utf-8", | 3712 "content-type" : "application/json; charset=utf-8", |
3678 }; | 3713 }; |
3679 var resp = convert.JSON.encode(buildSavedAdStyle()); | 3714 var resp = convert.JSON.encode(buildSavedAdStyle()); |
3680 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 3715 return new async.Future.value(stringResponse(200, h, resp)); |
3681 }), true); | 3716 }), true); |
3682 res.get(arg_savedAdStyleId).then(unittest.expectAsync(((api.SavedAdStyle r
esponse) { | 3717 res.get(arg_savedAdStyleId).then(unittest.expectAsync(((api.SavedAdStyle r
esponse) { |
3683 checkSavedAdStyle(response); | 3718 checkSavedAdStyle(response); |
3684 }))); | 3719 }))); |
3685 }); | 3720 }); |
3686 | 3721 |
3687 unittest.test("method--list", () { | 3722 unittest.test("method--list", () { |
3688 | 3723 |
3689 var mock = new common_test.HttpServerMock(); | 3724 var mock = new HttpServerMock(); |
3690 api.SavedadstylesResourceApi res = new api.AdsenseApi(mock).savedadstyles; | 3725 api.SavedadstylesResourceApi res = new api.AdsenseApi(mock).savedadstyles; |
3691 var arg_maxResults = 42; | 3726 var arg_maxResults = 42; |
3692 var arg_pageToken = "foo"; | 3727 var arg_pageToken = "foo"; |
3693 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3728 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
3694 var path = (req.url).path; | 3729 var path = (req.url).path; |
3695 var pathOffset = 0; | 3730 var pathOffset = 0; |
3696 var index; | 3731 var index; |
3697 var subPart; | 3732 var subPart; |
3698 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3733 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
3699 pathOffset += 1; | 3734 pathOffset += 1; |
(...skipping 19 matching lines...) Expand all Loading... |
3719 } | 3754 } |
3720 } | 3755 } |
3721 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | 3756 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); |
3722 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 3757 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
3723 | 3758 |
3724 | 3759 |
3725 var h = { | 3760 var h = { |
3726 "content-type" : "application/json; charset=utf-8", | 3761 "content-type" : "application/json; charset=utf-8", |
3727 }; | 3762 }; |
3728 var resp = convert.JSON.encode(buildSavedAdStyles()); | 3763 var resp = convert.JSON.encode(buildSavedAdStyles()); |
3729 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 3764 return new async.Future.value(stringResponse(200, h, resp)); |
3730 }), true); | 3765 }), true); |
3731 res.list(maxResults: arg_maxResults, pageToken: arg_pageToken).then(unitte
st.expectAsync(((api.SavedAdStyles response) { | 3766 res.list(maxResults: arg_maxResults, pageToken: arg_pageToken).then(unitte
st.expectAsync(((api.SavedAdStyles response) { |
3732 checkSavedAdStyles(response); | 3767 checkSavedAdStyles(response); |
3733 }))); | 3768 }))); |
3734 }); | 3769 }); |
3735 | 3770 |
3736 }); | 3771 }); |
3737 | 3772 |
3738 | 3773 |
3739 unittest.group("resource-UrlchannelsResourceApi", () { | 3774 unittest.group("resource-UrlchannelsResourceApi", () { |
3740 unittest.test("method--list", () { | 3775 unittest.test("method--list", () { |
3741 | 3776 |
3742 var mock = new common_test.HttpServerMock(); | 3777 var mock = new HttpServerMock(); |
3743 api.UrlchannelsResourceApi res = new api.AdsenseApi(mock).urlchannels; | 3778 api.UrlchannelsResourceApi res = new api.AdsenseApi(mock).urlchannels; |
3744 var arg_adClientId = "foo"; | 3779 var arg_adClientId = "foo"; |
3745 var arg_maxResults = 42; | 3780 var arg_maxResults = 42; |
3746 var arg_pageToken = "foo"; | 3781 var arg_pageToken = "foo"; |
3747 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3782 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
3748 var path = (req.url).path; | 3783 var path = (req.url).path; |
3749 var pathOffset = 0; | 3784 var pathOffset = 0; |
3750 var index; | 3785 var index; |
3751 var subPart; | 3786 var subPart; |
3752 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3787 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
(...skipping 27 matching lines...) Expand all Loading... |
3780 } | 3815 } |
3781 } | 3816 } |
3782 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | 3817 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); |
3783 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 3818 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
3784 | 3819 |
3785 | 3820 |
3786 var h = { | 3821 var h = { |
3787 "content-type" : "application/json; charset=utf-8", | 3822 "content-type" : "application/json; charset=utf-8", |
3788 }; | 3823 }; |
3789 var resp = convert.JSON.encode(buildUrlChannels()); | 3824 var resp = convert.JSON.encode(buildUrlChannels()); |
3790 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 3825 return new async.Future.value(stringResponse(200, h, resp)); |
3791 }), true); | 3826 }), true); |
3792 res.list(arg_adClientId, maxResults: arg_maxResults, pageToken: arg_pageTo
ken).then(unittest.expectAsync(((api.UrlChannels response) { | 3827 res.list(arg_adClientId, maxResults: arg_maxResults, pageToken: arg_pageTo
ken).then(unittest.expectAsync(((api.UrlChannels response) { |
3793 checkUrlChannels(response); | 3828 checkUrlChannels(response); |
3794 }))); | 3829 }))); |
3795 }); | 3830 }); |
3796 | 3831 |
3797 }); | 3832 }); |
3798 | 3833 |
3799 | 3834 |
3800 } | 3835 } |
3801 | 3836 |
OLD | NEW |