OLD | NEW |
1 library googleapis.adsensehost.v4_1.test; | 1 library googleapis.adsensehost.v4_1.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; |
(...skipping 23 matching lines...) Expand all Loading... |
34 buildCounterAccount++; | 34 buildCounterAccount++; |
35 if (buildCounterAccount < 3) { | 35 if (buildCounterAccount < 3) { |
36 unittest.expect(o.id, unittest.equals('foo')); | 36 unittest.expect(o.id, unittest.equals('foo')); |
37 unittest.expect(o.kind, unittest.equals('foo')); | 37 unittest.expect(o.kind, unittest.equals('foo')); |
38 unittest.expect(o.name, unittest.equals('foo')); | 38 unittest.expect(o.name, unittest.equals('foo')); |
39 unittest.expect(o.status, unittest.equals('foo')); | 39 unittest.expect(o.status, unittest.equals('foo')); |
40 } | 40 } |
41 buildCounterAccount--; | 41 buildCounterAccount--; |
42 } | 42 } |
43 | 43 |
44 buildUnnamed967() { | 44 buildUnnamed995() { |
45 var o = new core.List<api.Account>(); | 45 var o = new core.List<api.Account>(); |
46 o.add(buildAccount()); | 46 o.add(buildAccount()); |
47 o.add(buildAccount()); | 47 o.add(buildAccount()); |
48 return o; | 48 return o; |
49 } | 49 } |
50 | 50 |
51 checkUnnamed967(core.List<api.Account> o) { | 51 checkUnnamed995(core.List<api.Account> o) { |
52 unittest.expect(o, unittest.hasLength(2)); | 52 unittest.expect(o, unittest.hasLength(2)); |
53 checkAccount(o[0]); | 53 checkAccount(o[0]); |
54 checkAccount(o[1]); | 54 checkAccount(o[1]); |
55 } | 55 } |
56 | 56 |
57 core.int buildCounterAccounts = 0; | 57 core.int buildCounterAccounts = 0; |
58 buildAccounts() { | 58 buildAccounts() { |
59 var o = new api.Accounts(); | 59 var o = new api.Accounts(); |
60 buildCounterAccounts++; | 60 buildCounterAccounts++; |
61 if (buildCounterAccounts < 3) { | 61 if (buildCounterAccounts < 3) { |
62 o.etag = "foo"; | 62 o.etag = "foo"; |
63 o.items = buildUnnamed967(); | 63 o.items = buildUnnamed995(); |
64 o.kind = "foo"; | 64 o.kind = "foo"; |
65 } | 65 } |
66 buildCounterAccounts--; | 66 buildCounterAccounts--; |
67 return o; | 67 return o; |
68 } | 68 } |
69 | 69 |
70 checkAccounts(api.Accounts o) { | 70 checkAccounts(api.Accounts o) { |
71 buildCounterAccounts++; | 71 buildCounterAccounts++; |
72 if (buildCounterAccounts < 3) { | 72 if (buildCounterAccounts < 3) { |
73 unittest.expect(o.etag, unittest.equals('foo')); | 73 unittest.expect(o.etag, unittest.equals('foo')); |
74 checkUnnamed967(o.items); | 74 checkUnnamed995(o.items); |
75 unittest.expect(o.kind, unittest.equals('foo')); | 75 unittest.expect(o.kind, unittest.equals('foo')); |
76 } | 76 } |
77 buildCounterAccounts--; | 77 buildCounterAccounts--; |
78 } | 78 } |
79 | 79 |
80 core.int buildCounterAdClient = 0; | 80 core.int buildCounterAdClient = 0; |
81 buildAdClient() { | 81 buildAdClient() { |
82 var o = new api.AdClient(); | 82 var o = new api.AdClient(); |
83 buildCounterAdClient++; | 83 buildCounterAdClient++; |
84 if (buildCounterAdClient < 3) { | 84 if (buildCounterAdClient < 3) { |
(...skipping 12 matching lines...) Expand all Loading... |
97 if (buildCounterAdClient < 3) { | 97 if (buildCounterAdClient < 3) { |
98 unittest.expect(o.arcOptIn, unittest.isTrue); | 98 unittest.expect(o.arcOptIn, unittest.isTrue); |
99 unittest.expect(o.id, unittest.equals('foo')); | 99 unittest.expect(o.id, unittest.equals('foo')); |
100 unittest.expect(o.kind, unittest.equals('foo')); | 100 unittest.expect(o.kind, unittest.equals('foo')); |
101 unittest.expect(o.productCode, unittest.equals('foo')); | 101 unittest.expect(o.productCode, unittest.equals('foo')); |
102 unittest.expect(o.supportsReporting, unittest.isTrue); | 102 unittest.expect(o.supportsReporting, unittest.isTrue); |
103 } | 103 } |
104 buildCounterAdClient--; | 104 buildCounterAdClient--; |
105 } | 105 } |
106 | 106 |
107 buildUnnamed968() { | 107 buildUnnamed996() { |
108 var o = new core.List<api.AdClient>(); | 108 var o = new core.List<api.AdClient>(); |
109 o.add(buildAdClient()); | 109 o.add(buildAdClient()); |
110 o.add(buildAdClient()); | 110 o.add(buildAdClient()); |
111 return o; | 111 return o; |
112 } | 112 } |
113 | 113 |
114 checkUnnamed968(core.List<api.AdClient> o) { | 114 checkUnnamed996(core.List<api.AdClient> o) { |
115 unittest.expect(o, unittest.hasLength(2)); | 115 unittest.expect(o, unittest.hasLength(2)); |
116 checkAdClient(o[0]); | 116 checkAdClient(o[0]); |
117 checkAdClient(o[1]); | 117 checkAdClient(o[1]); |
118 } | 118 } |
119 | 119 |
120 core.int buildCounterAdClients = 0; | 120 core.int buildCounterAdClients = 0; |
121 buildAdClients() { | 121 buildAdClients() { |
122 var o = new api.AdClients(); | 122 var o = new api.AdClients(); |
123 buildCounterAdClients++; | 123 buildCounterAdClients++; |
124 if (buildCounterAdClients < 3) { | 124 if (buildCounterAdClients < 3) { |
125 o.etag = "foo"; | 125 o.etag = "foo"; |
126 o.items = buildUnnamed968(); | 126 o.items = buildUnnamed996(); |
127 o.kind = "foo"; | 127 o.kind = "foo"; |
128 o.nextPageToken = "foo"; | 128 o.nextPageToken = "foo"; |
129 } | 129 } |
130 buildCounterAdClients--; | 130 buildCounterAdClients--; |
131 return o; | 131 return o; |
132 } | 132 } |
133 | 133 |
134 checkAdClients(api.AdClients o) { | 134 checkAdClients(api.AdClients o) { |
135 buildCounterAdClients++; | 135 buildCounterAdClients++; |
136 if (buildCounterAdClients < 3) { | 136 if (buildCounterAdClients < 3) { |
137 unittest.expect(o.etag, unittest.equals('foo')); | 137 unittest.expect(o.etag, unittest.equals('foo')); |
138 checkUnnamed968(o.items); | 138 checkUnnamed996(o.items); |
139 unittest.expect(o.kind, unittest.equals('foo')); | 139 unittest.expect(o.kind, unittest.equals('foo')); |
140 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 140 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
141 } | 141 } |
142 buildCounterAdClients--; | 142 buildCounterAdClients--; |
143 } | 143 } |
144 | 144 |
145 core.int buildCounterAdCode = 0; | 145 core.int buildCounterAdCode = 0; |
146 buildAdCode() { | 146 buildAdCode() { |
147 var o = new api.AdCode(); | 147 var o = new api.AdCode(); |
148 buildCounterAdCode++; | 148 buildCounterAdCode++; |
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
333 checkAdStyle(o.customStyle); | 333 checkAdStyle(o.customStyle); |
334 unittest.expect(o.id, unittest.equals('foo')); | 334 unittest.expect(o.id, unittest.equals('foo')); |
335 unittest.expect(o.kind, unittest.equals('foo')); | 335 unittest.expect(o.kind, unittest.equals('foo')); |
336 checkAdUnitMobileContentAdsSettings(o.mobileContentAdsSettings); | 336 checkAdUnitMobileContentAdsSettings(o.mobileContentAdsSettings); |
337 unittest.expect(o.name, unittest.equals('foo')); | 337 unittest.expect(o.name, unittest.equals('foo')); |
338 unittest.expect(o.status, unittest.equals('foo')); | 338 unittest.expect(o.status, unittest.equals('foo')); |
339 } | 339 } |
340 buildCounterAdUnit--; | 340 buildCounterAdUnit--; |
341 } | 341 } |
342 | 342 |
343 buildUnnamed969() { | 343 buildUnnamed997() { |
344 var o = new core.List<api.AdUnit>(); | 344 var o = new core.List<api.AdUnit>(); |
345 o.add(buildAdUnit()); | 345 o.add(buildAdUnit()); |
346 o.add(buildAdUnit()); | 346 o.add(buildAdUnit()); |
347 return o; | 347 return o; |
348 } | 348 } |
349 | 349 |
350 checkUnnamed969(core.List<api.AdUnit> o) { | 350 checkUnnamed997(core.List<api.AdUnit> o) { |
351 unittest.expect(o, unittest.hasLength(2)); | 351 unittest.expect(o, unittest.hasLength(2)); |
352 checkAdUnit(o[0]); | 352 checkAdUnit(o[0]); |
353 checkAdUnit(o[1]); | 353 checkAdUnit(o[1]); |
354 } | 354 } |
355 | 355 |
356 core.int buildCounterAdUnits = 0; | 356 core.int buildCounterAdUnits = 0; |
357 buildAdUnits() { | 357 buildAdUnits() { |
358 var o = new api.AdUnits(); | 358 var o = new api.AdUnits(); |
359 buildCounterAdUnits++; | 359 buildCounterAdUnits++; |
360 if (buildCounterAdUnits < 3) { | 360 if (buildCounterAdUnits < 3) { |
361 o.etag = "foo"; | 361 o.etag = "foo"; |
362 o.items = buildUnnamed969(); | 362 o.items = buildUnnamed997(); |
363 o.kind = "foo"; | 363 o.kind = "foo"; |
364 o.nextPageToken = "foo"; | 364 o.nextPageToken = "foo"; |
365 } | 365 } |
366 buildCounterAdUnits--; | 366 buildCounterAdUnits--; |
367 return o; | 367 return o; |
368 } | 368 } |
369 | 369 |
370 checkAdUnits(api.AdUnits o) { | 370 checkAdUnits(api.AdUnits o) { |
371 buildCounterAdUnits++; | 371 buildCounterAdUnits++; |
372 if (buildCounterAdUnits < 3) { | 372 if (buildCounterAdUnits < 3) { |
373 unittest.expect(o.etag, unittest.equals('foo')); | 373 unittest.expect(o.etag, unittest.equals('foo')); |
374 checkUnnamed969(o.items); | 374 checkUnnamed997(o.items); |
375 unittest.expect(o.kind, unittest.equals('foo')); | 375 unittest.expect(o.kind, unittest.equals('foo')); |
376 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 376 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
377 } | 377 } |
378 buildCounterAdUnits--; | 378 buildCounterAdUnits--; |
379 } | 379 } |
380 | 380 |
381 buildUnnamed970() { | 381 buildUnnamed998() { |
382 var o = new core.List<core.String>(); | 382 var o = new core.List<core.String>(); |
383 o.add("foo"); | 383 o.add("foo"); |
384 o.add("foo"); | 384 o.add("foo"); |
385 return o; | 385 return o; |
386 } | 386 } |
387 | 387 |
388 checkUnnamed970(core.List<core.String> o) { | 388 checkUnnamed998(core.List<core.String> o) { |
389 unittest.expect(o, unittest.hasLength(2)); | 389 unittest.expect(o, unittest.hasLength(2)); |
390 unittest.expect(o[0], unittest.equals('foo')); | 390 unittest.expect(o[0], unittest.equals('foo')); |
391 unittest.expect(o[1], unittest.equals('foo')); | 391 unittest.expect(o[1], unittest.equals('foo')); |
392 } | 392 } |
393 | 393 |
394 core.int buildCounterAssociationSession = 0; | 394 core.int buildCounterAssociationSession = 0; |
395 buildAssociationSession() { | 395 buildAssociationSession() { |
396 var o = new api.AssociationSession(); | 396 var o = new api.AssociationSession(); |
397 buildCounterAssociationSession++; | 397 buildCounterAssociationSession++; |
398 if (buildCounterAssociationSession < 3) { | 398 if (buildCounterAssociationSession < 3) { |
399 o.accountId = "foo"; | 399 o.accountId = "foo"; |
400 o.id = "foo"; | 400 o.id = "foo"; |
401 o.kind = "foo"; | 401 o.kind = "foo"; |
402 o.productCodes = buildUnnamed970(); | 402 o.productCodes = buildUnnamed998(); |
403 o.redirectUrl = "foo"; | 403 o.redirectUrl = "foo"; |
404 o.status = "foo"; | 404 o.status = "foo"; |
405 o.userLocale = "foo"; | 405 o.userLocale = "foo"; |
406 o.websiteLocale = "foo"; | 406 o.websiteLocale = "foo"; |
407 o.websiteUrl = "foo"; | 407 o.websiteUrl = "foo"; |
408 } | 408 } |
409 buildCounterAssociationSession--; | 409 buildCounterAssociationSession--; |
410 return o; | 410 return o; |
411 } | 411 } |
412 | 412 |
413 checkAssociationSession(api.AssociationSession o) { | 413 checkAssociationSession(api.AssociationSession o) { |
414 buildCounterAssociationSession++; | 414 buildCounterAssociationSession++; |
415 if (buildCounterAssociationSession < 3) { | 415 if (buildCounterAssociationSession < 3) { |
416 unittest.expect(o.accountId, unittest.equals('foo')); | 416 unittest.expect(o.accountId, unittest.equals('foo')); |
417 unittest.expect(o.id, unittest.equals('foo')); | 417 unittest.expect(o.id, unittest.equals('foo')); |
418 unittest.expect(o.kind, unittest.equals('foo')); | 418 unittest.expect(o.kind, unittest.equals('foo')); |
419 checkUnnamed970(o.productCodes); | 419 checkUnnamed998(o.productCodes); |
420 unittest.expect(o.redirectUrl, unittest.equals('foo')); | 420 unittest.expect(o.redirectUrl, unittest.equals('foo')); |
421 unittest.expect(o.status, unittest.equals('foo')); | 421 unittest.expect(o.status, unittest.equals('foo')); |
422 unittest.expect(o.userLocale, unittest.equals('foo')); | 422 unittest.expect(o.userLocale, unittest.equals('foo')); |
423 unittest.expect(o.websiteLocale, unittest.equals('foo')); | 423 unittest.expect(o.websiteLocale, unittest.equals('foo')); |
424 unittest.expect(o.websiteUrl, unittest.equals('foo')); | 424 unittest.expect(o.websiteUrl, unittest.equals('foo')); |
425 } | 425 } |
426 buildCounterAssociationSession--; | 426 buildCounterAssociationSession--; |
427 } | 427 } |
428 | 428 |
429 core.int buildCounterCustomChannel = 0; | 429 core.int buildCounterCustomChannel = 0; |
(...skipping 14 matching lines...) Expand all Loading... |
444 buildCounterCustomChannel++; | 444 buildCounterCustomChannel++; |
445 if (buildCounterCustomChannel < 3) { | 445 if (buildCounterCustomChannel < 3) { |
446 unittest.expect(o.code, unittest.equals('foo')); | 446 unittest.expect(o.code, unittest.equals('foo')); |
447 unittest.expect(o.id, unittest.equals('foo')); | 447 unittest.expect(o.id, unittest.equals('foo')); |
448 unittest.expect(o.kind, unittest.equals('foo')); | 448 unittest.expect(o.kind, unittest.equals('foo')); |
449 unittest.expect(o.name, unittest.equals('foo')); | 449 unittest.expect(o.name, unittest.equals('foo')); |
450 } | 450 } |
451 buildCounterCustomChannel--; | 451 buildCounterCustomChannel--; |
452 } | 452 } |
453 | 453 |
454 buildUnnamed971() { | 454 buildUnnamed999() { |
455 var o = new core.List<api.CustomChannel>(); | 455 var o = new core.List<api.CustomChannel>(); |
456 o.add(buildCustomChannel()); | 456 o.add(buildCustomChannel()); |
457 o.add(buildCustomChannel()); | 457 o.add(buildCustomChannel()); |
458 return o; | 458 return o; |
459 } | 459 } |
460 | 460 |
461 checkUnnamed971(core.List<api.CustomChannel> o) { | 461 checkUnnamed999(core.List<api.CustomChannel> o) { |
462 unittest.expect(o, unittest.hasLength(2)); | 462 unittest.expect(o, unittest.hasLength(2)); |
463 checkCustomChannel(o[0]); | 463 checkCustomChannel(o[0]); |
464 checkCustomChannel(o[1]); | 464 checkCustomChannel(o[1]); |
465 } | 465 } |
466 | 466 |
467 core.int buildCounterCustomChannels = 0; | 467 core.int buildCounterCustomChannels = 0; |
468 buildCustomChannels() { | 468 buildCustomChannels() { |
469 var o = new api.CustomChannels(); | 469 var o = new api.CustomChannels(); |
470 buildCounterCustomChannels++; | 470 buildCounterCustomChannels++; |
471 if (buildCounterCustomChannels < 3) { | 471 if (buildCounterCustomChannels < 3) { |
472 o.etag = "foo"; | 472 o.etag = "foo"; |
473 o.items = buildUnnamed971(); | 473 o.items = buildUnnamed999(); |
474 o.kind = "foo"; | 474 o.kind = "foo"; |
475 o.nextPageToken = "foo"; | 475 o.nextPageToken = "foo"; |
476 } | 476 } |
477 buildCounterCustomChannels--; | 477 buildCounterCustomChannels--; |
478 return o; | 478 return o; |
479 } | 479 } |
480 | 480 |
481 checkCustomChannels(api.CustomChannels o) { | 481 checkCustomChannels(api.CustomChannels o) { |
482 buildCounterCustomChannels++; | 482 buildCounterCustomChannels++; |
483 if (buildCounterCustomChannels < 3) { | 483 if (buildCounterCustomChannels < 3) { |
484 unittest.expect(o.etag, unittest.equals('foo')); | 484 unittest.expect(o.etag, unittest.equals('foo')); |
485 checkUnnamed971(o.items); | 485 checkUnnamed999(o.items); |
486 unittest.expect(o.kind, unittest.equals('foo')); | 486 unittest.expect(o.kind, unittest.equals('foo')); |
487 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 487 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
488 } | 488 } |
489 buildCounterCustomChannels--; | 489 buildCounterCustomChannels--; |
490 } | 490 } |
491 | 491 |
492 buildUnnamed972() { | 492 buildUnnamed1000() { |
493 var o = new core.List<core.String>(); | 493 var o = new core.List<core.String>(); |
494 o.add("foo"); | 494 o.add("foo"); |
495 o.add("foo"); | 495 o.add("foo"); |
496 return o; | 496 return o; |
497 } | 497 } |
498 | 498 |
499 checkUnnamed972(core.List<core.String> o) { | 499 checkUnnamed1000(core.List<core.String> o) { |
500 unittest.expect(o, unittest.hasLength(2)); | 500 unittest.expect(o, unittest.hasLength(2)); |
501 unittest.expect(o[0], unittest.equals('foo')); | 501 unittest.expect(o[0], unittest.equals('foo')); |
502 unittest.expect(o[1], unittest.equals('foo')); | 502 unittest.expect(o[1], unittest.equals('foo')); |
503 } | 503 } |
504 | 504 |
505 core.int buildCounterReportHeaders = 0; | 505 core.int buildCounterReportHeaders = 0; |
506 buildReportHeaders() { | 506 buildReportHeaders() { |
507 var o = new api.ReportHeaders(); | 507 var o = new api.ReportHeaders(); |
508 buildCounterReportHeaders++; | 508 buildCounterReportHeaders++; |
509 if (buildCounterReportHeaders < 3) { | 509 if (buildCounterReportHeaders < 3) { |
510 o.currency = "foo"; | 510 o.currency = "foo"; |
511 o.name = "foo"; | 511 o.name = "foo"; |
512 o.type = "foo"; | 512 o.type = "foo"; |
513 } | 513 } |
514 buildCounterReportHeaders--; | 514 buildCounterReportHeaders--; |
515 return o; | 515 return o; |
516 } | 516 } |
517 | 517 |
518 checkReportHeaders(api.ReportHeaders o) { | 518 checkReportHeaders(api.ReportHeaders o) { |
519 buildCounterReportHeaders++; | 519 buildCounterReportHeaders++; |
520 if (buildCounterReportHeaders < 3) { | 520 if (buildCounterReportHeaders < 3) { |
521 unittest.expect(o.currency, unittest.equals('foo')); | 521 unittest.expect(o.currency, unittest.equals('foo')); |
522 unittest.expect(o.name, unittest.equals('foo')); | 522 unittest.expect(o.name, unittest.equals('foo')); |
523 unittest.expect(o.type, unittest.equals('foo')); | 523 unittest.expect(o.type, unittest.equals('foo')); |
524 } | 524 } |
525 buildCounterReportHeaders--; | 525 buildCounterReportHeaders--; |
526 } | 526 } |
527 | 527 |
528 buildUnnamed973() { | 528 buildUnnamed1001() { |
529 var o = new core.List<api.ReportHeaders>(); | 529 var o = new core.List<api.ReportHeaders>(); |
530 o.add(buildReportHeaders()); | 530 o.add(buildReportHeaders()); |
531 o.add(buildReportHeaders()); | 531 o.add(buildReportHeaders()); |
532 return o; | 532 return o; |
533 } | 533 } |
534 | 534 |
535 checkUnnamed973(core.List<api.ReportHeaders> o) { | 535 checkUnnamed1001(core.List<api.ReportHeaders> o) { |
536 unittest.expect(o, unittest.hasLength(2)); | 536 unittest.expect(o, unittest.hasLength(2)); |
537 checkReportHeaders(o[0]); | 537 checkReportHeaders(o[0]); |
538 checkReportHeaders(o[1]); | 538 checkReportHeaders(o[1]); |
539 } | 539 } |
540 | 540 |
541 buildUnnamed974() { | 541 buildUnnamed1002() { |
542 var o = new core.List<core.String>(); | 542 var o = new core.List<core.String>(); |
543 o.add("foo"); | 543 o.add("foo"); |
544 o.add("foo"); | 544 o.add("foo"); |
545 return o; | 545 return o; |
546 } | 546 } |
547 | 547 |
548 checkUnnamed974(core.List<core.String> o) { | 548 checkUnnamed1002(core.List<core.String> o) { |
549 unittest.expect(o, unittest.hasLength(2)); | 549 unittest.expect(o, unittest.hasLength(2)); |
550 unittest.expect(o[0], unittest.equals('foo')); | 550 unittest.expect(o[0], unittest.equals('foo')); |
551 unittest.expect(o[1], unittest.equals('foo')); | 551 unittest.expect(o[1], unittest.equals('foo')); |
552 } | 552 } |
553 | 553 |
554 buildUnnamed975() { | 554 buildUnnamed1003() { |
555 var o = new core.List<core.List<core.String>>(); | 555 var o = new core.List<core.List<core.String>>(); |
556 o.add(buildUnnamed974()); | 556 o.add(buildUnnamed1002()); |
557 o.add(buildUnnamed974()); | 557 o.add(buildUnnamed1002()); |
558 return o; | 558 return o; |
559 } | 559 } |
560 | 560 |
561 checkUnnamed975(core.List<core.List<core.String>> o) { | 561 checkUnnamed1003(core.List<core.List<core.String>> o) { |
562 unittest.expect(o, unittest.hasLength(2)); | 562 unittest.expect(o, unittest.hasLength(2)); |
563 checkUnnamed974(o[0]); | 563 checkUnnamed1002(o[0]); |
564 checkUnnamed974(o[1]); | 564 checkUnnamed1002(o[1]); |
565 } | 565 } |
566 | 566 |
567 buildUnnamed976() { | 567 buildUnnamed1004() { |
568 var o = new core.List<core.String>(); | 568 var o = new core.List<core.String>(); |
569 o.add("foo"); | 569 o.add("foo"); |
570 o.add("foo"); | 570 o.add("foo"); |
571 return o; | 571 return o; |
572 } | 572 } |
573 | 573 |
574 checkUnnamed976(core.List<core.String> o) { | 574 checkUnnamed1004(core.List<core.String> o) { |
575 unittest.expect(o, unittest.hasLength(2)); | 575 unittest.expect(o, unittest.hasLength(2)); |
576 unittest.expect(o[0], unittest.equals('foo')); | 576 unittest.expect(o[0], unittest.equals('foo')); |
577 unittest.expect(o[1], unittest.equals('foo')); | 577 unittest.expect(o[1], unittest.equals('foo')); |
578 } | 578 } |
579 | 579 |
580 buildUnnamed977() { | 580 buildUnnamed1005() { |
581 var o = new core.List<core.String>(); | 581 var o = new core.List<core.String>(); |
582 o.add("foo"); | 582 o.add("foo"); |
583 o.add("foo"); | 583 o.add("foo"); |
584 return o; | 584 return o; |
585 } | 585 } |
586 | 586 |
587 checkUnnamed977(core.List<core.String> o) { | 587 checkUnnamed1005(core.List<core.String> o) { |
588 unittest.expect(o, unittest.hasLength(2)); | 588 unittest.expect(o, unittest.hasLength(2)); |
589 unittest.expect(o[0], unittest.equals('foo')); | 589 unittest.expect(o[0], unittest.equals('foo')); |
590 unittest.expect(o[1], unittest.equals('foo')); | 590 unittest.expect(o[1], unittest.equals('foo')); |
591 } | 591 } |
592 | 592 |
593 core.int buildCounterReport = 0; | 593 core.int buildCounterReport = 0; |
594 buildReport() { | 594 buildReport() { |
595 var o = new api.Report(); | 595 var o = new api.Report(); |
596 buildCounterReport++; | 596 buildCounterReport++; |
597 if (buildCounterReport < 3) { | 597 if (buildCounterReport < 3) { |
598 o.averages = buildUnnamed972(); | 598 o.averages = buildUnnamed1000(); |
599 o.headers = buildUnnamed973(); | 599 o.headers = buildUnnamed1001(); |
600 o.kind = "foo"; | 600 o.kind = "foo"; |
601 o.rows = buildUnnamed975(); | 601 o.rows = buildUnnamed1003(); |
602 o.totalMatchedRows = "foo"; | 602 o.totalMatchedRows = "foo"; |
603 o.totals = buildUnnamed976(); | 603 o.totals = buildUnnamed1004(); |
604 o.warnings = buildUnnamed977(); | 604 o.warnings = buildUnnamed1005(); |
605 } | 605 } |
606 buildCounterReport--; | 606 buildCounterReport--; |
607 return o; | 607 return o; |
608 } | 608 } |
609 | 609 |
610 checkReport(api.Report o) { | 610 checkReport(api.Report o) { |
611 buildCounterReport++; | 611 buildCounterReport++; |
612 if (buildCounterReport < 3) { | 612 if (buildCounterReport < 3) { |
613 checkUnnamed972(o.averages); | 613 checkUnnamed1000(o.averages); |
614 checkUnnamed973(o.headers); | 614 checkUnnamed1001(o.headers); |
615 unittest.expect(o.kind, unittest.equals('foo')); | 615 unittest.expect(o.kind, unittest.equals('foo')); |
616 checkUnnamed975(o.rows); | 616 checkUnnamed1003(o.rows); |
617 unittest.expect(o.totalMatchedRows, unittest.equals('foo')); | 617 unittest.expect(o.totalMatchedRows, unittest.equals('foo')); |
618 checkUnnamed976(o.totals); | 618 checkUnnamed1004(o.totals); |
619 checkUnnamed977(o.warnings); | 619 checkUnnamed1005(o.warnings); |
620 } | 620 } |
621 buildCounterReport--; | 621 buildCounterReport--; |
622 } | 622 } |
623 | 623 |
624 core.int buildCounterUrlChannel = 0; | 624 core.int buildCounterUrlChannel = 0; |
625 buildUrlChannel() { | 625 buildUrlChannel() { |
626 var o = new api.UrlChannel(); | 626 var o = new api.UrlChannel(); |
627 buildCounterUrlChannel++; | 627 buildCounterUrlChannel++; |
628 if (buildCounterUrlChannel < 3) { | 628 if (buildCounterUrlChannel < 3) { |
629 o.id = "foo"; | 629 o.id = "foo"; |
630 o.kind = "foo"; | 630 o.kind = "foo"; |
631 o.urlPattern = "foo"; | 631 o.urlPattern = "foo"; |
632 } | 632 } |
633 buildCounterUrlChannel--; | 633 buildCounterUrlChannel--; |
634 return o; | 634 return o; |
635 } | 635 } |
636 | 636 |
637 checkUrlChannel(api.UrlChannel o) { | 637 checkUrlChannel(api.UrlChannel o) { |
638 buildCounterUrlChannel++; | 638 buildCounterUrlChannel++; |
639 if (buildCounterUrlChannel < 3) { | 639 if (buildCounterUrlChannel < 3) { |
640 unittest.expect(o.id, unittest.equals('foo')); | 640 unittest.expect(o.id, unittest.equals('foo')); |
641 unittest.expect(o.kind, unittest.equals('foo')); | 641 unittest.expect(o.kind, unittest.equals('foo')); |
642 unittest.expect(o.urlPattern, unittest.equals('foo')); | 642 unittest.expect(o.urlPattern, unittest.equals('foo')); |
643 } | 643 } |
644 buildCounterUrlChannel--; | 644 buildCounterUrlChannel--; |
645 } | 645 } |
646 | 646 |
647 buildUnnamed978() { | 647 buildUnnamed1006() { |
648 var o = new core.List<api.UrlChannel>(); | 648 var o = new core.List<api.UrlChannel>(); |
649 o.add(buildUrlChannel()); | 649 o.add(buildUrlChannel()); |
650 o.add(buildUrlChannel()); | 650 o.add(buildUrlChannel()); |
651 return o; | 651 return o; |
652 } | 652 } |
653 | 653 |
654 checkUnnamed978(core.List<api.UrlChannel> o) { | 654 checkUnnamed1006(core.List<api.UrlChannel> o) { |
655 unittest.expect(o, unittest.hasLength(2)); | 655 unittest.expect(o, unittest.hasLength(2)); |
656 checkUrlChannel(o[0]); | 656 checkUrlChannel(o[0]); |
657 checkUrlChannel(o[1]); | 657 checkUrlChannel(o[1]); |
658 } | 658 } |
659 | 659 |
660 core.int buildCounterUrlChannels = 0; | 660 core.int buildCounterUrlChannels = 0; |
661 buildUrlChannels() { | 661 buildUrlChannels() { |
662 var o = new api.UrlChannels(); | 662 var o = new api.UrlChannels(); |
663 buildCounterUrlChannels++; | 663 buildCounterUrlChannels++; |
664 if (buildCounterUrlChannels < 3) { | 664 if (buildCounterUrlChannels < 3) { |
665 o.etag = "foo"; | 665 o.etag = "foo"; |
666 o.items = buildUnnamed978(); | 666 o.items = buildUnnamed1006(); |
667 o.kind = "foo"; | 667 o.kind = "foo"; |
668 o.nextPageToken = "foo"; | 668 o.nextPageToken = "foo"; |
669 } | 669 } |
670 buildCounterUrlChannels--; | 670 buildCounterUrlChannels--; |
671 return o; | 671 return o; |
672 } | 672 } |
673 | 673 |
674 checkUrlChannels(api.UrlChannels o) { | 674 checkUrlChannels(api.UrlChannels o) { |
675 buildCounterUrlChannels++; | 675 buildCounterUrlChannels++; |
676 if (buildCounterUrlChannels < 3) { | 676 if (buildCounterUrlChannels < 3) { |
677 unittest.expect(o.etag, unittest.equals('foo')); | 677 unittest.expect(o.etag, unittest.equals('foo')); |
678 checkUnnamed978(o.items); | 678 checkUnnamed1006(o.items); |
679 unittest.expect(o.kind, unittest.equals('foo')); | 679 unittest.expect(o.kind, unittest.equals('foo')); |
680 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 680 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
681 } | 681 } |
682 buildCounterUrlChannels--; | 682 buildCounterUrlChannels--; |
683 } | 683 } |
684 | 684 |
685 buildUnnamed979() { | 685 buildUnnamed1007() { |
686 var o = new core.List<core.String>(); | 686 var o = new core.List<core.String>(); |
687 o.add("foo"); | 687 o.add("foo"); |
688 o.add("foo"); | 688 o.add("foo"); |
689 return o; | 689 return o; |
690 } | 690 } |
691 | 691 |
692 checkUnnamed979(core.List<core.String> o) { | 692 checkUnnamed1007(core.List<core.String> o) { |
693 unittest.expect(o, unittest.hasLength(2)); | 693 unittest.expect(o, unittest.hasLength(2)); |
694 unittest.expect(o[0], unittest.equals('foo')); | 694 unittest.expect(o[0], unittest.equals('foo')); |
695 unittest.expect(o[1], unittest.equals('foo')); | 695 unittest.expect(o[1], unittest.equals('foo')); |
696 } | 696 } |
697 | 697 |
698 buildUnnamed980() { | 698 buildUnnamed1008() { |
699 var o = new core.List<core.String>(); | 699 var o = new core.List<core.String>(); |
700 o.add("foo"); | 700 o.add("foo"); |
701 o.add("foo"); | 701 o.add("foo"); |
702 return o; | 702 return o; |
703 } | 703 } |
704 | 704 |
705 checkUnnamed980(core.List<core.String> o) { | 705 checkUnnamed1008(core.List<core.String> o) { |
706 unittest.expect(o, unittest.hasLength(2)); | 706 unittest.expect(o, unittest.hasLength(2)); |
707 unittest.expect(o[0], unittest.equals('foo')); | 707 unittest.expect(o[0], unittest.equals('foo')); |
708 unittest.expect(o[1], unittest.equals('foo')); | 708 unittest.expect(o[1], unittest.equals('foo')); |
709 } | 709 } |
710 | 710 |
711 buildUnnamed981() { | 711 buildUnnamed1009() { |
712 var o = new core.List<core.String>(); | 712 var o = new core.List<core.String>(); |
713 o.add("foo"); | 713 o.add("foo"); |
714 o.add("foo"); | 714 o.add("foo"); |
715 return o; | 715 return o; |
716 } | 716 } |
717 | 717 |
718 checkUnnamed981(core.List<core.String> o) { | 718 checkUnnamed1009(core.List<core.String> o) { |
719 unittest.expect(o, unittest.hasLength(2)); | 719 unittest.expect(o, unittest.hasLength(2)); |
720 unittest.expect(o[0], unittest.equals('foo')); | 720 unittest.expect(o[0], unittest.equals('foo')); |
721 unittest.expect(o[1], unittest.equals('foo')); | 721 unittest.expect(o[1], unittest.equals('foo')); |
722 } | 722 } |
723 | 723 |
724 buildUnnamed982() { | 724 buildUnnamed1010() { |
725 var o = new core.List<core.String>(); | 725 var o = new core.List<core.String>(); |
726 o.add("foo"); | 726 o.add("foo"); |
727 o.add("foo"); | 727 o.add("foo"); |
728 return o; | 728 return o; |
729 } | 729 } |
730 | 730 |
731 checkUnnamed982(core.List<core.String> o) { | 731 checkUnnamed1010(core.List<core.String> o) { |
732 unittest.expect(o, unittest.hasLength(2)); | 732 unittest.expect(o, unittest.hasLength(2)); |
733 unittest.expect(o[0], unittest.equals('foo')); | 733 unittest.expect(o[0], unittest.equals('foo')); |
734 unittest.expect(o[1], unittest.equals('foo')); | 734 unittest.expect(o[1], unittest.equals('foo')); |
735 } | 735 } |
736 | 736 |
737 buildUnnamed983() { | 737 buildUnnamed1011() { |
738 var o = new core.List<core.String>(); | 738 var o = new core.List<core.String>(); |
739 o.add("foo"); | 739 o.add("foo"); |
740 o.add("foo"); | 740 o.add("foo"); |
741 return o; | 741 return o; |
742 } | 742 } |
743 | 743 |
744 checkUnnamed983(core.List<core.String> o) { | 744 checkUnnamed1011(core.List<core.String> o) { |
745 unittest.expect(o, unittest.hasLength(2)); | 745 unittest.expect(o, unittest.hasLength(2)); |
746 unittest.expect(o[0], unittest.equals('foo')); | 746 unittest.expect(o[0], unittest.equals('foo')); |
747 unittest.expect(o[1], unittest.equals('foo')); | 747 unittest.expect(o[1], unittest.equals('foo')); |
748 } | 748 } |
749 | 749 |
750 buildUnnamed984() { | 750 buildUnnamed1012() { |
751 var o = new core.List<core.String>(); | 751 var o = new core.List<core.String>(); |
752 o.add("foo"); | 752 o.add("foo"); |
753 o.add("foo"); | 753 o.add("foo"); |
754 return o; | 754 return o; |
755 } | 755 } |
756 | 756 |
757 checkUnnamed984(core.List<core.String> o) { | 757 checkUnnamed1012(core.List<core.String> o) { |
758 unittest.expect(o, unittest.hasLength(2)); | 758 unittest.expect(o, unittest.hasLength(2)); |
759 unittest.expect(o[0], unittest.equals('foo')); | 759 unittest.expect(o[0], unittest.equals('foo')); |
760 unittest.expect(o[1], unittest.equals('foo')); | 760 unittest.expect(o[1], unittest.equals('foo')); |
761 } | 761 } |
762 | 762 |
763 buildUnnamed985() { | 763 buildUnnamed1013() { |
764 var o = new core.List<core.String>(); | 764 var o = new core.List<core.String>(); |
765 o.add("foo"); | 765 o.add("foo"); |
766 o.add("foo"); | 766 o.add("foo"); |
767 return o; | 767 return o; |
768 } | 768 } |
769 | 769 |
770 checkUnnamed985(core.List<core.String> o) { | 770 checkUnnamed1013(core.List<core.String> o) { |
771 unittest.expect(o, unittest.hasLength(2)); | 771 unittest.expect(o, unittest.hasLength(2)); |
772 unittest.expect(o[0], unittest.equals('foo')); | 772 unittest.expect(o[0], unittest.equals('foo')); |
773 unittest.expect(o[1], unittest.equals('foo')); | 773 unittest.expect(o[1], unittest.equals('foo')); |
774 } | 774 } |
775 | 775 |
776 buildUnnamed986() { | 776 buildUnnamed1014() { |
777 var o = new core.List<core.String>(); | 777 var o = new core.List<core.String>(); |
778 o.add("foo"); | 778 o.add("foo"); |
779 o.add("foo"); | 779 o.add("foo"); |
780 return o; | 780 return o; |
781 } | 781 } |
782 | 782 |
783 checkUnnamed986(core.List<core.String> o) { | 783 checkUnnamed1014(core.List<core.String> o) { |
784 unittest.expect(o, unittest.hasLength(2)); | 784 unittest.expect(o, unittest.hasLength(2)); |
785 unittest.expect(o[0], unittest.equals('foo')); | 785 unittest.expect(o[0], unittest.equals('foo')); |
786 unittest.expect(o[1], unittest.equals('foo')); | 786 unittest.expect(o[1], unittest.equals('foo')); |
787 } | 787 } |
788 | 788 |
789 buildUnnamed987() { | 789 buildUnnamed1015() { |
790 var o = new core.List<core.String>(); | 790 var o = new core.List<core.String>(); |
791 o.add("foo"); | 791 o.add("foo"); |
792 o.add("foo"); | 792 o.add("foo"); |
793 return o; | 793 return o; |
794 } | 794 } |
795 | 795 |
796 checkUnnamed987(core.List<core.String> o) { | 796 checkUnnamed1015(core.List<core.String> o) { |
797 unittest.expect(o, unittest.hasLength(2)); | 797 unittest.expect(o, unittest.hasLength(2)); |
798 unittest.expect(o[0], unittest.equals('foo')); | 798 unittest.expect(o[0], unittest.equals('foo')); |
799 unittest.expect(o[1], unittest.equals('foo')); | 799 unittest.expect(o[1], unittest.equals('foo')); |
800 } | 800 } |
801 | 801 |
802 buildUnnamed988() { | 802 buildUnnamed1016() { |
803 var o = new core.List<core.String>(); | 803 var o = new core.List<core.String>(); |
804 o.add("foo"); | 804 o.add("foo"); |
805 o.add("foo"); | 805 o.add("foo"); |
806 return o; | 806 return o; |
807 } | 807 } |
808 | 808 |
809 checkUnnamed988(core.List<core.String> o) { | 809 checkUnnamed1016(core.List<core.String> o) { |
810 unittest.expect(o, unittest.hasLength(2)); | 810 unittest.expect(o, unittest.hasLength(2)); |
811 unittest.expect(o[0], unittest.equals('foo')); | 811 unittest.expect(o[0], unittest.equals('foo')); |
812 unittest.expect(o[1], unittest.equals('foo')); | 812 unittest.expect(o[1], unittest.equals('foo')); |
813 } | 813 } |
814 | 814 |
815 buildUnnamed989() { | 815 buildUnnamed1017() { |
816 var o = new core.List<core.String>(); | 816 var o = new core.List<core.String>(); |
817 o.add("foo"); | 817 o.add("foo"); |
818 o.add("foo"); | 818 o.add("foo"); |
819 return o; | 819 return o; |
820 } | 820 } |
821 | 821 |
822 checkUnnamed989(core.List<core.String> o) { | 822 checkUnnamed1017(core.List<core.String> o) { |
823 unittest.expect(o, unittest.hasLength(2)); | 823 unittest.expect(o, unittest.hasLength(2)); |
824 unittest.expect(o[0], unittest.equals('foo')); | 824 unittest.expect(o[0], unittest.equals('foo')); |
825 unittest.expect(o[1], unittest.equals('foo')); | 825 unittest.expect(o[1], unittest.equals('foo')); |
826 } | 826 } |
827 | 827 |
828 | 828 |
829 main() { | 829 main() { |
830 unittest.group("obj-schema-Account", () { | 830 unittest.group("obj-schema-Account", () { |
831 unittest.test("to-json--from-json", () { | 831 unittest.test("to-json--from-json", () { |
832 var o = buildAccount(); | 832 var o = buildAccount(); |
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1011 unittest.test("method--get", () { | 1011 unittest.test("method--get", () { |
1012 | 1012 |
1013 var mock = new common_test.HttpServerMock(); | 1013 var mock = new common_test.HttpServerMock(); |
1014 api.AccountsResourceApi res = new api.AdsensehostApi(mock).accounts; | 1014 api.AccountsResourceApi res = new api.AdsensehostApi(mock).accounts; |
1015 var arg_accountId = "foo"; | 1015 var arg_accountId = "foo"; |
1016 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1016 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1017 var path = (req.url).path; | 1017 var path = (req.url).path; |
1018 var pathOffset = 0; | 1018 var pathOffset = 0; |
1019 var index; | 1019 var index; |
1020 var subPart; | 1020 var subPart; |
1021 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("/adsensehost/v4.1/")); | 1021 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
1022 pathOffset += 18; | 1022 pathOffset += 1; |
| 1023 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("adsensehost/v4.1/")); |
| 1024 pathOffset += 17; |
1023 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("accounts/")); | 1025 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("accounts/")); |
1024 pathOffset += 9; | 1026 pathOffset += 9; |
1025 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | 1027 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
1026 pathOffset = path.length; | 1028 pathOffset = path.length; |
1027 unittest.expect(subPart, unittest.equals("$arg_accountId")); | 1029 unittest.expect(subPart, unittest.equals("$arg_accountId")); |
1028 | 1030 |
1029 var query = (req.url).query; | 1031 var query = (req.url).query; |
1030 var queryOffset = 0; | 1032 var queryOffset = 0; |
1031 var queryMap = {}; | 1033 var queryMap = {}; |
1032 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 1034 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
(...skipping 19 matching lines...) Expand all Loading... |
1052 }), true); | 1054 }), true); |
1053 res.get(arg_accountId).then(unittest.expectAsync(((api.Account response) { | 1055 res.get(arg_accountId).then(unittest.expectAsync(((api.Account response) { |
1054 checkAccount(response); | 1056 checkAccount(response); |
1055 }))); | 1057 }))); |
1056 }); | 1058 }); |
1057 | 1059 |
1058 unittest.test("method--list", () { | 1060 unittest.test("method--list", () { |
1059 | 1061 |
1060 var mock = new common_test.HttpServerMock(); | 1062 var mock = new common_test.HttpServerMock(); |
1061 api.AccountsResourceApi res = new api.AdsensehostApi(mock).accounts; | 1063 api.AccountsResourceApi res = new api.AdsensehostApi(mock).accounts; |
1062 var arg_filterAdClientId = buildUnnamed979(); | 1064 var arg_filterAdClientId = buildUnnamed1007(); |
1063 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1065 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1064 var path = (req.url).path; | 1066 var path = (req.url).path; |
1065 var pathOffset = 0; | 1067 var pathOffset = 0; |
1066 var index; | 1068 var index; |
1067 var subPart; | 1069 var subPart; |
1068 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("/adsensehost/v4.1/")); | 1070 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
1069 pathOffset += 18; | 1071 pathOffset += 1; |
| 1072 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("adsensehost/v4.1/")); |
| 1073 pathOffset += 17; |
1070 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("accounts")); | 1074 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("accounts")); |
1071 pathOffset += 8; | 1075 pathOffset += 8; |
1072 | 1076 |
1073 var query = (req.url).query; | 1077 var query = (req.url).query; |
1074 var queryOffset = 0; | 1078 var queryOffset = 0; |
1075 var queryMap = {}; | 1079 var queryMap = {}; |
1076 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 1080 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
1077 parseBool(n) { | 1081 parseBool(n) { |
1078 if (n == "true") return true; | 1082 if (n == "true") return true; |
1079 if (n == "false") return false; | 1083 if (n == "false") return false; |
(...skipping 28 matching lines...) Expand all Loading... |
1108 | 1112 |
1109 var mock = new common_test.HttpServerMock(); | 1113 var mock = new common_test.HttpServerMock(); |
1110 api.AccountsAdclientsResourceApi res = new api.AdsensehostApi(mock).accoun
ts.adclients; | 1114 api.AccountsAdclientsResourceApi res = new api.AdsensehostApi(mock).accoun
ts.adclients; |
1111 var arg_accountId = "foo"; | 1115 var arg_accountId = "foo"; |
1112 var arg_adClientId = "foo"; | 1116 var arg_adClientId = "foo"; |
1113 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1117 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1114 var path = (req.url).path; | 1118 var path = (req.url).path; |
1115 var pathOffset = 0; | 1119 var pathOffset = 0; |
1116 var index; | 1120 var index; |
1117 var subPart; | 1121 var subPart; |
1118 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("/adsensehost/v4.1/")); | 1122 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
1119 pathOffset += 18; | 1123 pathOffset += 1; |
| 1124 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("adsensehost/v4.1/")); |
| 1125 pathOffset += 17; |
1120 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("accounts/")); | 1126 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("accounts/")); |
1121 pathOffset += 9; | 1127 pathOffset += 9; |
1122 index = path.indexOf("/adclients/", pathOffset); | 1128 index = path.indexOf("/adclients/", pathOffset); |
1123 unittest.expect(index >= 0, unittest.isTrue); | 1129 unittest.expect(index >= 0, unittest.isTrue); |
1124 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 1130 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); |
1125 pathOffset = index; | 1131 pathOffset = index; |
1126 unittest.expect(subPart, unittest.equals("$arg_accountId")); | 1132 unittest.expect(subPart, unittest.equals("$arg_accountId")); |
1127 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("/adclients/")); | 1133 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("/adclients/")); |
1128 pathOffset += 11; | 1134 pathOffset += 11; |
1129 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | 1135 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1164 var mock = new common_test.HttpServerMock(); | 1170 var mock = new common_test.HttpServerMock(); |
1165 api.AccountsAdclientsResourceApi res = new api.AdsensehostApi(mock).accoun
ts.adclients; | 1171 api.AccountsAdclientsResourceApi res = new api.AdsensehostApi(mock).accoun
ts.adclients; |
1166 var arg_accountId = "foo"; | 1172 var arg_accountId = "foo"; |
1167 var arg_maxResults = 42; | 1173 var arg_maxResults = 42; |
1168 var arg_pageToken = "foo"; | 1174 var arg_pageToken = "foo"; |
1169 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1175 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1170 var path = (req.url).path; | 1176 var path = (req.url).path; |
1171 var pathOffset = 0; | 1177 var pathOffset = 0; |
1172 var index; | 1178 var index; |
1173 var subPart; | 1179 var subPart; |
1174 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("/adsensehost/v4.1/")); | 1180 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
1175 pathOffset += 18; | 1181 pathOffset += 1; |
| 1182 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("adsensehost/v4.1/")); |
| 1183 pathOffset += 17; |
1176 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("accounts/")); | 1184 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("accounts/")); |
1177 pathOffset += 9; | 1185 pathOffset += 9; |
1178 index = path.indexOf("/adclients", pathOffset); | 1186 index = path.indexOf("/adclients", pathOffset); |
1179 unittest.expect(index >= 0, unittest.isTrue); | 1187 unittest.expect(index >= 0, unittest.isTrue); |
1180 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 1188 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); |
1181 pathOffset = index; | 1189 pathOffset = index; |
1182 unittest.expect(subPart, unittest.equals("$arg_accountId")); | 1190 unittest.expect(subPart, unittest.equals("$arg_accountId")); |
1183 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/adclients")); | 1191 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/adclients")); |
1184 pathOffset += 10; | 1192 pathOffset += 10; |
1185 | 1193 |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1223 var mock = new common_test.HttpServerMock(); | 1231 var mock = new common_test.HttpServerMock(); |
1224 api.AccountsAdunitsResourceApi res = new api.AdsensehostApi(mock).accounts
.adunits; | 1232 api.AccountsAdunitsResourceApi res = new api.AdsensehostApi(mock).accounts
.adunits; |
1225 var arg_accountId = "foo"; | 1233 var arg_accountId = "foo"; |
1226 var arg_adClientId = "foo"; | 1234 var arg_adClientId = "foo"; |
1227 var arg_adUnitId = "foo"; | 1235 var arg_adUnitId = "foo"; |
1228 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1236 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1229 var path = (req.url).path; | 1237 var path = (req.url).path; |
1230 var pathOffset = 0; | 1238 var pathOffset = 0; |
1231 var index; | 1239 var index; |
1232 var subPart; | 1240 var subPart; |
1233 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("/adsensehost/v4.1/")); | 1241 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
1234 pathOffset += 18; | 1242 pathOffset += 1; |
| 1243 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("adsensehost/v4.1/")); |
| 1244 pathOffset += 17; |
1235 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("accounts/")); | 1245 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("accounts/")); |
1236 pathOffset += 9; | 1246 pathOffset += 9; |
1237 index = path.indexOf("/adclients/", pathOffset); | 1247 index = path.indexOf("/adclients/", pathOffset); |
1238 unittest.expect(index >= 0, unittest.isTrue); | 1248 unittest.expect(index >= 0, unittest.isTrue); |
1239 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 1249 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); |
1240 pathOffset = index; | 1250 pathOffset = index; |
1241 unittest.expect(subPart, unittest.equals("$arg_accountId")); | 1251 unittest.expect(subPart, unittest.equals("$arg_accountId")); |
1242 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("/adclients/")); | 1252 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("/adclients/")); |
1243 pathOffset += 11; | 1253 pathOffset += 11; |
1244 index = path.indexOf("/adunits/", pathOffset); | 1254 index = path.indexOf("/adunits/", pathOffset); |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1286 var mock = new common_test.HttpServerMock(); | 1296 var mock = new common_test.HttpServerMock(); |
1287 api.AccountsAdunitsResourceApi res = new api.AdsensehostApi(mock).accounts
.adunits; | 1297 api.AccountsAdunitsResourceApi res = new api.AdsensehostApi(mock).accounts
.adunits; |
1288 var arg_accountId = "foo"; | 1298 var arg_accountId = "foo"; |
1289 var arg_adClientId = "foo"; | 1299 var arg_adClientId = "foo"; |
1290 var arg_adUnitId = "foo"; | 1300 var arg_adUnitId = "foo"; |
1291 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1301 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1292 var path = (req.url).path; | 1302 var path = (req.url).path; |
1293 var pathOffset = 0; | 1303 var pathOffset = 0; |
1294 var index; | 1304 var index; |
1295 var subPart; | 1305 var subPart; |
1296 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("/adsensehost/v4.1/")); | 1306 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
1297 pathOffset += 18; | 1307 pathOffset += 1; |
| 1308 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("adsensehost/v4.1/")); |
| 1309 pathOffset += 17; |
1298 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("accounts/")); | 1310 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("accounts/")); |
1299 pathOffset += 9; | 1311 pathOffset += 9; |
1300 index = path.indexOf("/adclients/", pathOffset); | 1312 index = path.indexOf("/adclients/", pathOffset); |
1301 unittest.expect(index >= 0, unittest.isTrue); | 1313 unittest.expect(index >= 0, unittest.isTrue); |
1302 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 1314 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); |
1303 pathOffset = index; | 1315 pathOffset = index; |
1304 unittest.expect(subPart, unittest.equals("$arg_accountId")); | 1316 unittest.expect(subPart, unittest.equals("$arg_accountId")); |
1305 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("/adclients/")); | 1317 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("/adclients/")); |
1306 pathOffset += 11; | 1318 pathOffset += 11; |
1307 index = path.indexOf("/adunits/", pathOffset); | 1319 index = path.indexOf("/adunits/", pathOffset); |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1344 }))); | 1356 }))); |
1345 }); | 1357 }); |
1346 | 1358 |
1347 unittest.test("method--getAdCode", () { | 1359 unittest.test("method--getAdCode", () { |
1348 | 1360 |
1349 var mock = new common_test.HttpServerMock(); | 1361 var mock = new common_test.HttpServerMock(); |
1350 api.AccountsAdunitsResourceApi res = new api.AdsensehostApi(mock).accounts
.adunits; | 1362 api.AccountsAdunitsResourceApi res = new api.AdsensehostApi(mock).accounts
.adunits; |
1351 var arg_accountId = "foo"; | 1363 var arg_accountId = "foo"; |
1352 var arg_adClientId = "foo"; | 1364 var arg_adClientId = "foo"; |
1353 var arg_adUnitId = "foo"; | 1365 var arg_adUnitId = "foo"; |
1354 var arg_hostCustomChannelId = buildUnnamed980(); | 1366 var arg_hostCustomChannelId = buildUnnamed1008(); |
1355 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1367 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1356 var path = (req.url).path; | 1368 var path = (req.url).path; |
1357 var pathOffset = 0; | 1369 var pathOffset = 0; |
1358 var index; | 1370 var index; |
1359 var subPart; | 1371 var subPart; |
1360 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("/adsensehost/v4.1/")); | 1372 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
1361 pathOffset += 18; | 1373 pathOffset += 1; |
| 1374 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("adsensehost/v4.1/")); |
| 1375 pathOffset += 17; |
1362 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("accounts/")); | 1376 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("accounts/")); |
1363 pathOffset += 9; | 1377 pathOffset += 9; |
1364 index = path.indexOf("/adclients/", pathOffset); | 1378 index = path.indexOf("/adclients/", pathOffset); |
1365 unittest.expect(index >= 0, unittest.isTrue); | 1379 unittest.expect(index >= 0, unittest.isTrue); |
1366 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 1380 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); |
1367 pathOffset = index; | 1381 pathOffset = index; |
1368 unittest.expect(subPart, unittest.equals("$arg_accountId")); | 1382 unittest.expect(subPart, unittest.equals("$arg_accountId")); |
1369 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("/adclients/")); | 1383 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("/adclients/")); |
1370 pathOffset += 11; | 1384 pathOffset += 11; |
1371 index = path.indexOf("/adunits/", pathOffset); | 1385 index = path.indexOf("/adunits/", pathOffset); |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1421 var arg_accountId = "foo"; | 1435 var arg_accountId = "foo"; |
1422 var arg_adClientId = "foo"; | 1436 var arg_adClientId = "foo"; |
1423 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1437 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1424 var obj = new api.AdUnit.fromJson(json); | 1438 var obj = new api.AdUnit.fromJson(json); |
1425 checkAdUnit(obj); | 1439 checkAdUnit(obj); |
1426 | 1440 |
1427 var path = (req.url).path; | 1441 var path = (req.url).path; |
1428 var pathOffset = 0; | 1442 var pathOffset = 0; |
1429 var index; | 1443 var index; |
1430 var subPart; | 1444 var subPart; |
1431 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("/adsensehost/v4.1/")); | 1445 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
1432 pathOffset += 18; | 1446 pathOffset += 1; |
| 1447 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("adsensehost/v4.1/")); |
| 1448 pathOffset += 17; |
1433 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("accounts/")); | 1449 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("accounts/")); |
1434 pathOffset += 9; | 1450 pathOffset += 9; |
1435 index = path.indexOf("/adclients/", pathOffset); | 1451 index = path.indexOf("/adclients/", pathOffset); |
1436 unittest.expect(index >= 0, unittest.isTrue); | 1452 unittest.expect(index >= 0, unittest.isTrue); |
1437 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 1453 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); |
1438 pathOffset = index; | 1454 pathOffset = index; |
1439 unittest.expect(subPart, unittest.equals("$arg_accountId")); | 1455 unittest.expect(subPart, unittest.equals("$arg_accountId")); |
1440 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("/adclients/")); | 1456 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("/adclients/")); |
1441 pathOffset += 11; | 1457 pathOffset += 11; |
1442 index = path.indexOf("/adunits", pathOffset); | 1458 index = path.indexOf("/adunits", pathOffset); |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1483 var arg_accountId = "foo"; | 1499 var arg_accountId = "foo"; |
1484 var arg_adClientId = "foo"; | 1500 var arg_adClientId = "foo"; |
1485 var arg_includeInactive = true; | 1501 var arg_includeInactive = true; |
1486 var arg_maxResults = 42; | 1502 var arg_maxResults = 42; |
1487 var arg_pageToken = "foo"; | 1503 var arg_pageToken = "foo"; |
1488 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1504 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1489 var path = (req.url).path; | 1505 var path = (req.url).path; |
1490 var pathOffset = 0; | 1506 var pathOffset = 0; |
1491 var index; | 1507 var index; |
1492 var subPart; | 1508 var subPart; |
1493 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("/adsensehost/v4.1/")); | 1509 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
1494 pathOffset += 18; | 1510 pathOffset += 1; |
| 1511 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("adsensehost/v4.1/")); |
| 1512 pathOffset += 17; |
1495 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("accounts/")); | 1513 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("accounts/")); |
1496 pathOffset += 9; | 1514 pathOffset += 9; |
1497 index = path.indexOf("/adclients/", pathOffset); | 1515 index = path.indexOf("/adclients/", pathOffset); |
1498 unittest.expect(index >= 0, unittest.isTrue); | 1516 unittest.expect(index >= 0, unittest.isTrue); |
1499 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 1517 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); |
1500 pathOffset = index; | 1518 pathOffset = index; |
1501 unittest.expect(subPart, unittest.equals("$arg_accountId")); | 1519 unittest.expect(subPart, unittest.equals("$arg_accountId")); |
1502 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("/adclients/")); | 1520 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("/adclients/")); |
1503 pathOffset += 11; | 1521 pathOffset += 11; |
1504 index = path.indexOf("/adunits", pathOffset); | 1522 index = path.indexOf("/adunits", pathOffset); |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1550 var arg_adClientId = "foo"; | 1568 var arg_adClientId = "foo"; |
1551 var arg_adUnitId = "foo"; | 1569 var arg_adUnitId = "foo"; |
1552 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1570 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1553 var obj = new api.AdUnit.fromJson(json); | 1571 var obj = new api.AdUnit.fromJson(json); |
1554 checkAdUnit(obj); | 1572 checkAdUnit(obj); |
1555 | 1573 |
1556 var path = (req.url).path; | 1574 var path = (req.url).path; |
1557 var pathOffset = 0; | 1575 var pathOffset = 0; |
1558 var index; | 1576 var index; |
1559 var subPart; | 1577 var subPart; |
1560 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("/adsensehost/v4.1/")); | 1578 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
1561 pathOffset += 18; | 1579 pathOffset += 1; |
| 1580 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("adsensehost/v4.1/")); |
| 1581 pathOffset += 17; |
1562 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("accounts/")); | 1582 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("accounts/")); |
1563 pathOffset += 9; | 1583 pathOffset += 9; |
1564 index = path.indexOf("/adclients/", pathOffset); | 1584 index = path.indexOf("/adclients/", pathOffset); |
1565 unittest.expect(index >= 0, unittest.isTrue); | 1585 unittest.expect(index >= 0, unittest.isTrue); |
1566 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 1586 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); |
1567 pathOffset = index; | 1587 pathOffset = index; |
1568 unittest.expect(subPart, unittest.equals("$arg_accountId")); | 1588 unittest.expect(subPart, unittest.equals("$arg_accountId")); |
1569 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("/adclients/")); | 1589 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("/adclients/")); |
1570 pathOffset += 11; | 1590 pathOffset += 11; |
1571 index = path.indexOf("/adunits", pathOffset); | 1591 index = path.indexOf("/adunits", pathOffset); |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1614 var arg_accountId = "foo"; | 1634 var arg_accountId = "foo"; |
1615 var arg_adClientId = "foo"; | 1635 var arg_adClientId = "foo"; |
1616 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1636 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1617 var obj = new api.AdUnit.fromJson(json); | 1637 var obj = new api.AdUnit.fromJson(json); |
1618 checkAdUnit(obj); | 1638 checkAdUnit(obj); |
1619 | 1639 |
1620 var path = (req.url).path; | 1640 var path = (req.url).path; |
1621 var pathOffset = 0; | 1641 var pathOffset = 0; |
1622 var index; | 1642 var index; |
1623 var subPart; | 1643 var subPart; |
1624 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("/adsensehost/v4.1/")); | 1644 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
1625 pathOffset += 18; | 1645 pathOffset += 1; |
| 1646 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("adsensehost/v4.1/")); |
| 1647 pathOffset += 17; |
1626 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("accounts/")); | 1648 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("accounts/")); |
1627 pathOffset += 9; | 1649 pathOffset += 9; |
1628 index = path.indexOf("/adclients/", pathOffset); | 1650 index = path.indexOf("/adclients/", pathOffset); |
1629 unittest.expect(index >= 0, unittest.isTrue); | 1651 unittest.expect(index >= 0, unittest.isTrue); |
1630 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 1652 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); |
1631 pathOffset = index; | 1653 pathOffset = index; |
1632 unittest.expect(subPart, unittest.equals("$arg_accountId")); | 1654 unittest.expect(subPart, unittest.equals("$arg_accountId")); |
1633 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("/adclients/")); | 1655 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("/adclients/")); |
1634 pathOffset += 11; | 1656 pathOffset += 11; |
1635 index = path.indexOf("/adunits", pathOffset); | 1657 index = path.indexOf("/adunits", pathOffset); |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1673 | 1695 |
1674 | 1696 |
1675 unittest.group("resource-AccountsReportsResourceApi", () { | 1697 unittest.group("resource-AccountsReportsResourceApi", () { |
1676 unittest.test("method--generate", () { | 1698 unittest.test("method--generate", () { |
1677 | 1699 |
1678 var mock = new common_test.HttpServerMock(); | 1700 var mock = new common_test.HttpServerMock(); |
1679 api.AccountsReportsResourceApi res = new api.AdsensehostApi(mock).accounts
.reports; | 1701 api.AccountsReportsResourceApi res = new api.AdsensehostApi(mock).accounts
.reports; |
1680 var arg_accountId = "foo"; | 1702 var arg_accountId = "foo"; |
1681 var arg_startDate = "foo"; | 1703 var arg_startDate = "foo"; |
1682 var arg_endDate = "foo"; | 1704 var arg_endDate = "foo"; |
1683 var arg_dimension = buildUnnamed981(); | 1705 var arg_dimension = buildUnnamed1009(); |
1684 var arg_filter = buildUnnamed982(); | 1706 var arg_filter = buildUnnamed1010(); |
1685 var arg_locale = "foo"; | 1707 var arg_locale = "foo"; |
1686 var arg_maxResults = 42; | 1708 var arg_maxResults = 42; |
1687 var arg_metric = buildUnnamed983(); | 1709 var arg_metric = buildUnnamed1011(); |
1688 var arg_sort = buildUnnamed984(); | 1710 var arg_sort = buildUnnamed1012(); |
1689 var arg_startIndex = 42; | 1711 var arg_startIndex = 42; |
1690 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1712 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1691 var path = (req.url).path; | 1713 var path = (req.url).path; |
1692 var pathOffset = 0; | 1714 var pathOffset = 0; |
1693 var index; | 1715 var index; |
1694 var subPart; | 1716 var subPart; |
1695 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("/adsensehost/v4.1/")); | 1717 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
1696 pathOffset += 18; | 1718 pathOffset += 1; |
| 1719 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("adsensehost/v4.1/")); |
| 1720 pathOffset += 17; |
1697 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("accounts/")); | 1721 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("accounts/")); |
1698 pathOffset += 9; | 1722 pathOffset += 9; |
1699 index = path.indexOf("/reports", pathOffset); | 1723 index = path.indexOf("/reports", pathOffset); |
1700 unittest.expect(index >= 0, unittest.isTrue); | 1724 unittest.expect(index >= 0, unittest.isTrue); |
1701 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 1725 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); |
1702 pathOffset = index; | 1726 pathOffset = index; |
1703 unittest.expect(subPart, unittest.equals("$arg_accountId")); | 1727 unittest.expect(subPart, unittest.equals("$arg_accountId")); |
1704 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("/reports")); | 1728 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("/reports")); |
1705 pathOffset += 8; | 1729 pathOffset += 8; |
1706 | 1730 |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1749 unittest.test("method--get", () { | 1773 unittest.test("method--get", () { |
1750 | 1774 |
1751 var mock = new common_test.HttpServerMock(); | 1775 var mock = new common_test.HttpServerMock(); |
1752 api.AdclientsResourceApi res = new api.AdsensehostApi(mock).adclients; | 1776 api.AdclientsResourceApi res = new api.AdsensehostApi(mock).adclients; |
1753 var arg_adClientId = "foo"; | 1777 var arg_adClientId = "foo"; |
1754 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1778 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1755 var path = (req.url).path; | 1779 var path = (req.url).path; |
1756 var pathOffset = 0; | 1780 var pathOffset = 0; |
1757 var index; | 1781 var index; |
1758 var subPart; | 1782 var subPart; |
1759 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("/adsensehost/v4.1/")); | 1783 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
1760 pathOffset += 18; | 1784 pathOffset += 1; |
| 1785 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("adsensehost/v4.1/")); |
| 1786 pathOffset += 17; |
1761 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("adclients/")); | 1787 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("adclients/")); |
1762 pathOffset += 10; | 1788 pathOffset += 10; |
1763 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | 1789 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
1764 pathOffset = path.length; | 1790 pathOffset = path.length; |
1765 unittest.expect(subPart, unittest.equals("$arg_adClientId")); | 1791 unittest.expect(subPart, unittest.equals("$arg_adClientId")); |
1766 | 1792 |
1767 var query = (req.url).query; | 1793 var query = (req.url).query; |
1768 var queryOffset = 0; | 1794 var queryOffset = 0; |
1769 var queryMap = {}; | 1795 var queryMap = {}; |
1770 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 1796 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
(...skipping 26 matching lines...) Expand all Loading... |
1797 | 1823 |
1798 var mock = new common_test.HttpServerMock(); | 1824 var mock = new common_test.HttpServerMock(); |
1799 api.AdclientsResourceApi res = new api.AdsensehostApi(mock).adclients; | 1825 api.AdclientsResourceApi res = new api.AdsensehostApi(mock).adclients; |
1800 var arg_maxResults = 42; | 1826 var arg_maxResults = 42; |
1801 var arg_pageToken = "foo"; | 1827 var arg_pageToken = "foo"; |
1802 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1828 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1803 var path = (req.url).path; | 1829 var path = (req.url).path; |
1804 var pathOffset = 0; | 1830 var pathOffset = 0; |
1805 var index; | 1831 var index; |
1806 var subPart; | 1832 var subPart; |
1807 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("/adsensehost/v4.1/")); | 1833 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
1808 pathOffset += 18; | 1834 pathOffset += 1; |
| 1835 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("adsensehost/v4.1/")); |
| 1836 pathOffset += 17; |
1809 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("adclients")); | 1837 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("adclients")); |
1810 pathOffset += 9; | 1838 pathOffset += 9; |
1811 | 1839 |
1812 var query = (req.url).query; | 1840 var query = (req.url).query; |
1813 var queryOffset = 0; | 1841 var queryOffset = 0; |
1814 var queryMap = {}; | 1842 var queryMap = {}; |
1815 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 1843 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
1816 parseBool(n) { | 1844 parseBool(n) { |
1817 if (n == "true") return true; | 1845 if (n == "true") return true; |
1818 if (n == "false") return false; | 1846 if (n == "false") return false; |
(...skipping 22 matching lines...) Expand all Loading... |
1841 }); | 1869 }); |
1842 | 1870 |
1843 }); | 1871 }); |
1844 | 1872 |
1845 | 1873 |
1846 unittest.group("resource-AssociationsessionsResourceApi", () { | 1874 unittest.group("resource-AssociationsessionsResourceApi", () { |
1847 unittest.test("method--start", () { | 1875 unittest.test("method--start", () { |
1848 | 1876 |
1849 var mock = new common_test.HttpServerMock(); | 1877 var mock = new common_test.HttpServerMock(); |
1850 api.AssociationsessionsResourceApi res = new api.AdsensehostApi(mock).asso
ciationsessions; | 1878 api.AssociationsessionsResourceApi res = new api.AdsensehostApi(mock).asso
ciationsessions; |
1851 var arg_productCode = buildUnnamed985(); | 1879 var arg_productCode = buildUnnamed1013(); |
1852 var arg_websiteUrl = "foo"; | 1880 var arg_websiteUrl = "foo"; |
1853 var arg_userLocale = "foo"; | 1881 var arg_userLocale = "foo"; |
1854 var arg_websiteLocale = "foo"; | 1882 var arg_websiteLocale = "foo"; |
1855 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1883 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1856 var path = (req.url).path; | 1884 var path = (req.url).path; |
1857 var pathOffset = 0; | 1885 var pathOffset = 0; |
1858 var index; | 1886 var index; |
1859 var subPart; | 1887 var subPart; |
1860 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("/adsensehost/v4.1/")); | 1888 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
1861 pathOffset += 18; | 1889 pathOffset += 1; |
| 1890 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("adsensehost/v4.1/")); |
| 1891 pathOffset += 17; |
1862 unittest.expect(path.substring(pathOffset, pathOffset + 25), unittest.eq
uals("associationsessions/start")); | 1892 unittest.expect(path.substring(pathOffset, pathOffset + 25), unittest.eq
uals("associationsessions/start")); |
1863 pathOffset += 25; | 1893 pathOffset += 25; |
1864 | 1894 |
1865 var query = (req.url).query; | 1895 var query = (req.url).query; |
1866 var queryOffset = 0; | 1896 var queryOffset = 0; |
1867 var queryMap = {}; | 1897 var queryMap = {}; |
1868 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 1898 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
1869 parseBool(n) { | 1899 parseBool(n) { |
1870 if (n == "true") return true; | 1900 if (n == "true") return true; |
1871 if (n == "false") return false; | 1901 if (n == "false") return false; |
(...skipping 26 matching lines...) Expand all Loading... |
1898 unittest.test("method--verify", () { | 1928 unittest.test("method--verify", () { |
1899 | 1929 |
1900 var mock = new common_test.HttpServerMock(); | 1930 var mock = new common_test.HttpServerMock(); |
1901 api.AssociationsessionsResourceApi res = new api.AdsensehostApi(mock).asso
ciationsessions; | 1931 api.AssociationsessionsResourceApi res = new api.AdsensehostApi(mock).asso
ciationsessions; |
1902 var arg_token = "foo"; | 1932 var arg_token = "foo"; |
1903 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1933 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1904 var path = (req.url).path; | 1934 var path = (req.url).path; |
1905 var pathOffset = 0; | 1935 var pathOffset = 0; |
1906 var index; | 1936 var index; |
1907 var subPart; | 1937 var subPart; |
1908 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("/adsensehost/v4.1/")); | 1938 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
1909 pathOffset += 18; | 1939 pathOffset += 1; |
| 1940 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("adsensehost/v4.1/")); |
| 1941 pathOffset += 17; |
1910 unittest.expect(path.substring(pathOffset, pathOffset + 26), unittest.eq
uals("associationsessions/verify")); | 1942 unittest.expect(path.substring(pathOffset, pathOffset + 26), unittest.eq
uals("associationsessions/verify")); |
1911 pathOffset += 26; | 1943 pathOffset += 26; |
1912 | 1944 |
1913 var query = (req.url).query; | 1945 var query = (req.url).query; |
1914 var queryOffset = 0; | 1946 var queryOffset = 0; |
1915 var queryMap = {}; | 1947 var queryMap = {}; |
1916 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 1948 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
1917 parseBool(n) { | 1949 parseBool(n) { |
1918 if (n == "true") return true; | 1950 if (n == "true") return true; |
1919 if (n == "false") return false; | 1951 if (n == "false") return false; |
(...skipping 28 matching lines...) Expand all Loading... |
1948 | 1980 |
1949 var mock = new common_test.HttpServerMock(); | 1981 var mock = new common_test.HttpServerMock(); |
1950 api.CustomchannelsResourceApi res = new api.AdsensehostApi(mock).customcha
nnels; | 1982 api.CustomchannelsResourceApi res = new api.AdsensehostApi(mock).customcha
nnels; |
1951 var arg_adClientId = "foo"; | 1983 var arg_adClientId = "foo"; |
1952 var arg_customChannelId = "foo"; | 1984 var arg_customChannelId = "foo"; |
1953 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1985 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1954 var path = (req.url).path; | 1986 var path = (req.url).path; |
1955 var pathOffset = 0; | 1987 var pathOffset = 0; |
1956 var index; | 1988 var index; |
1957 var subPart; | 1989 var subPart; |
1958 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("/adsensehost/v4.1/")); | 1990 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
1959 pathOffset += 18; | 1991 pathOffset += 1; |
| 1992 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("adsensehost/v4.1/")); |
| 1993 pathOffset += 17; |
1960 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("adclients/")); | 1994 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("adclients/")); |
1961 pathOffset += 10; | 1995 pathOffset += 10; |
1962 index = path.indexOf("/customchannels/", pathOffset); | 1996 index = path.indexOf("/customchannels/", pathOffset); |
1963 unittest.expect(index >= 0, unittest.isTrue); | 1997 unittest.expect(index >= 0, unittest.isTrue); |
1964 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 1998 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); |
1965 pathOffset = index; | 1999 pathOffset = index; |
1966 unittest.expect(subPart, unittest.equals("$arg_adClientId")); | 2000 unittest.expect(subPart, unittest.equals("$arg_adClientId")); |
1967 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq
uals("/customchannels/")); | 2001 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq
uals("/customchannels/")); |
1968 pathOffset += 16; | 2002 pathOffset += 16; |
1969 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | 2003 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2003 | 2037 |
2004 var mock = new common_test.HttpServerMock(); | 2038 var mock = new common_test.HttpServerMock(); |
2005 api.CustomchannelsResourceApi res = new api.AdsensehostApi(mock).customcha
nnels; | 2039 api.CustomchannelsResourceApi res = new api.AdsensehostApi(mock).customcha
nnels; |
2006 var arg_adClientId = "foo"; | 2040 var arg_adClientId = "foo"; |
2007 var arg_customChannelId = "foo"; | 2041 var arg_customChannelId = "foo"; |
2008 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2042 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2009 var path = (req.url).path; | 2043 var path = (req.url).path; |
2010 var pathOffset = 0; | 2044 var pathOffset = 0; |
2011 var index; | 2045 var index; |
2012 var subPart; | 2046 var subPart; |
2013 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("/adsensehost/v4.1/")); | 2047 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
2014 pathOffset += 18; | 2048 pathOffset += 1; |
| 2049 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("adsensehost/v4.1/")); |
| 2050 pathOffset += 17; |
2015 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("adclients/")); | 2051 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("adclients/")); |
2016 pathOffset += 10; | 2052 pathOffset += 10; |
2017 index = path.indexOf("/customchannels/", pathOffset); | 2053 index = path.indexOf("/customchannels/", pathOffset); |
2018 unittest.expect(index >= 0, unittest.isTrue); | 2054 unittest.expect(index >= 0, unittest.isTrue); |
2019 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 2055 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); |
2020 pathOffset = index; | 2056 pathOffset = index; |
2021 unittest.expect(subPart, unittest.equals("$arg_adClientId")); | 2057 unittest.expect(subPart, unittest.equals("$arg_adClientId")); |
2022 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq
uals("/customchannels/")); | 2058 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq
uals("/customchannels/")); |
2023 pathOffset += 16; | 2059 pathOffset += 16; |
2024 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | 2060 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2061 var arg_request = buildCustomChannel(); | 2097 var arg_request = buildCustomChannel(); |
2062 var arg_adClientId = "foo"; | 2098 var arg_adClientId = "foo"; |
2063 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2099 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2064 var obj = new api.CustomChannel.fromJson(json); | 2100 var obj = new api.CustomChannel.fromJson(json); |
2065 checkCustomChannel(obj); | 2101 checkCustomChannel(obj); |
2066 | 2102 |
2067 var path = (req.url).path; | 2103 var path = (req.url).path; |
2068 var pathOffset = 0; | 2104 var pathOffset = 0; |
2069 var index; | 2105 var index; |
2070 var subPart; | 2106 var subPart; |
2071 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("/adsensehost/v4.1/")); | 2107 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
2072 pathOffset += 18; | 2108 pathOffset += 1; |
| 2109 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("adsensehost/v4.1/")); |
| 2110 pathOffset += 17; |
2073 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("adclients/")); | 2111 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("adclients/")); |
2074 pathOffset += 10; | 2112 pathOffset += 10; |
2075 index = path.indexOf("/customchannels", pathOffset); | 2113 index = path.indexOf("/customchannels", pathOffset); |
2076 unittest.expect(index >= 0, unittest.isTrue); | 2114 unittest.expect(index >= 0, unittest.isTrue); |
2077 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 2115 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); |
2078 pathOffset = index; | 2116 pathOffset = index; |
2079 unittest.expect(subPart, unittest.equals("$arg_adClientId")); | 2117 unittest.expect(subPart, unittest.equals("$arg_adClientId")); |
2080 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/customchannels")); | 2118 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/customchannels")); |
2081 pathOffset += 15; | 2119 pathOffset += 15; |
2082 | 2120 |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2114 var mock = new common_test.HttpServerMock(); | 2152 var mock = new common_test.HttpServerMock(); |
2115 api.CustomchannelsResourceApi res = new api.AdsensehostApi(mock).customcha
nnels; | 2153 api.CustomchannelsResourceApi res = new api.AdsensehostApi(mock).customcha
nnels; |
2116 var arg_adClientId = "foo"; | 2154 var arg_adClientId = "foo"; |
2117 var arg_maxResults = 42; | 2155 var arg_maxResults = 42; |
2118 var arg_pageToken = "foo"; | 2156 var arg_pageToken = "foo"; |
2119 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2157 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2120 var path = (req.url).path; | 2158 var path = (req.url).path; |
2121 var pathOffset = 0; | 2159 var pathOffset = 0; |
2122 var index; | 2160 var index; |
2123 var subPart; | 2161 var subPart; |
2124 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("/adsensehost/v4.1/")); | 2162 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
2125 pathOffset += 18; | 2163 pathOffset += 1; |
| 2164 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("adsensehost/v4.1/")); |
| 2165 pathOffset += 17; |
2126 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("adclients/")); | 2166 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("adclients/")); |
2127 pathOffset += 10; | 2167 pathOffset += 10; |
2128 index = path.indexOf("/customchannels", pathOffset); | 2168 index = path.indexOf("/customchannels", pathOffset); |
2129 unittest.expect(index >= 0, unittest.isTrue); | 2169 unittest.expect(index >= 0, unittest.isTrue); |
2130 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 2170 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); |
2131 pathOffset = index; | 2171 pathOffset = index; |
2132 unittest.expect(subPart, unittest.equals("$arg_adClientId")); | 2172 unittest.expect(subPart, unittest.equals("$arg_adClientId")); |
2133 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/customchannels")); | 2173 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/customchannels")); |
2134 pathOffset += 15; | 2174 pathOffset += 15; |
2135 | 2175 |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2172 var arg_adClientId = "foo"; | 2212 var arg_adClientId = "foo"; |
2173 var arg_customChannelId = "foo"; | 2213 var arg_customChannelId = "foo"; |
2174 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2214 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2175 var obj = new api.CustomChannel.fromJson(json); | 2215 var obj = new api.CustomChannel.fromJson(json); |
2176 checkCustomChannel(obj); | 2216 checkCustomChannel(obj); |
2177 | 2217 |
2178 var path = (req.url).path; | 2218 var path = (req.url).path; |
2179 var pathOffset = 0; | 2219 var pathOffset = 0; |
2180 var index; | 2220 var index; |
2181 var subPart; | 2221 var subPart; |
2182 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("/adsensehost/v4.1/")); | 2222 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
2183 pathOffset += 18; | 2223 pathOffset += 1; |
| 2224 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("adsensehost/v4.1/")); |
| 2225 pathOffset += 17; |
2184 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("adclients/")); | 2226 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("adclients/")); |
2185 pathOffset += 10; | 2227 pathOffset += 10; |
2186 index = path.indexOf("/customchannels", pathOffset); | 2228 index = path.indexOf("/customchannels", pathOffset); |
2187 unittest.expect(index >= 0, unittest.isTrue); | 2229 unittest.expect(index >= 0, unittest.isTrue); |
2188 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 2230 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); |
2189 pathOffset = index; | 2231 pathOffset = index; |
2190 unittest.expect(subPart, unittest.equals("$arg_adClientId")); | 2232 unittest.expect(subPart, unittest.equals("$arg_adClientId")); |
2191 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/customchannels")); | 2233 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/customchannels")); |
2192 pathOffset += 15; | 2234 pathOffset += 15; |
2193 | 2235 |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2228 var arg_request = buildCustomChannel(); | 2270 var arg_request = buildCustomChannel(); |
2229 var arg_adClientId = "foo"; | 2271 var arg_adClientId = "foo"; |
2230 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2272 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2231 var obj = new api.CustomChannel.fromJson(json); | 2273 var obj = new api.CustomChannel.fromJson(json); |
2232 checkCustomChannel(obj); | 2274 checkCustomChannel(obj); |
2233 | 2275 |
2234 var path = (req.url).path; | 2276 var path = (req.url).path; |
2235 var pathOffset = 0; | 2277 var pathOffset = 0; |
2236 var index; | 2278 var index; |
2237 var subPart; | 2279 var subPart; |
2238 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("/adsensehost/v4.1/")); | 2280 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
2239 pathOffset += 18; | 2281 pathOffset += 1; |
| 2282 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("adsensehost/v4.1/")); |
| 2283 pathOffset += 17; |
2240 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("adclients/")); | 2284 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("adclients/")); |
2241 pathOffset += 10; | 2285 pathOffset += 10; |
2242 index = path.indexOf("/customchannels", pathOffset); | 2286 index = path.indexOf("/customchannels", pathOffset); |
2243 unittest.expect(index >= 0, unittest.isTrue); | 2287 unittest.expect(index >= 0, unittest.isTrue); |
2244 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 2288 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); |
2245 pathOffset = index; | 2289 pathOffset = index; |
2246 unittest.expect(subPart, unittest.equals("$arg_adClientId")); | 2290 unittest.expect(subPart, unittest.equals("$arg_adClientId")); |
2247 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/customchannels")); | 2291 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/customchannels")); |
2248 pathOffset += 15; | 2292 pathOffset += 15; |
2249 | 2293 |
(...skipping 29 matching lines...) Expand all Loading... |
2279 }); | 2323 }); |
2280 | 2324 |
2281 | 2325 |
2282 unittest.group("resource-ReportsResourceApi", () { | 2326 unittest.group("resource-ReportsResourceApi", () { |
2283 unittest.test("method--generate", () { | 2327 unittest.test("method--generate", () { |
2284 | 2328 |
2285 var mock = new common_test.HttpServerMock(); | 2329 var mock = new common_test.HttpServerMock(); |
2286 api.ReportsResourceApi res = new api.AdsensehostApi(mock).reports; | 2330 api.ReportsResourceApi res = new api.AdsensehostApi(mock).reports; |
2287 var arg_startDate = "foo"; | 2331 var arg_startDate = "foo"; |
2288 var arg_endDate = "foo"; | 2332 var arg_endDate = "foo"; |
2289 var arg_dimension = buildUnnamed986(); | 2333 var arg_dimension = buildUnnamed1014(); |
2290 var arg_filter = buildUnnamed987(); | 2334 var arg_filter = buildUnnamed1015(); |
2291 var arg_locale = "foo"; | 2335 var arg_locale = "foo"; |
2292 var arg_maxResults = 42; | 2336 var arg_maxResults = 42; |
2293 var arg_metric = buildUnnamed988(); | 2337 var arg_metric = buildUnnamed1016(); |
2294 var arg_sort = buildUnnamed989(); | 2338 var arg_sort = buildUnnamed1017(); |
2295 var arg_startIndex = 42; | 2339 var arg_startIndex = 42; |
2296 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2340 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2297 var path = (req.url).path; | 2341 var path = (req.url).path; |
2298 var pathOffset = 0; | 2342 var pathOffset = 0; |
2299 var index; | 2343 var index; |
2300 var subPart; | 2344 var subPart; |
2301 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("/adsensehost/v4.1/")); | 2345 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
2302 pathOffset += 18; | 2346 pathOffset += 1; |
| 2347 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("adsensehost/v4.1/")); |
| 2348 pathOffset += 17; |
2303 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ
als("reports")); | 2349 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ
als("reports")); |
2304 pathOffset += 7; | 2350 pathOffset += 7; |
2305 | 2351 |
2306 var query = (req.url).query; | 2352 var query = (req.url).query; |
2307 var queryOffset = 0; | 2353 var queryOffset = 0; |
2308 var queryMap = {}; | 2354 var queryMap = {}; |
2309 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 2355 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
2310 parseBool(n) { | 2356 parseBool(n) { |
2311 if (n == "true") return true; | 2357 if (n == "true") return true; |
2312 if (n == "false") return false; | 2358 if (n == "false") return false; |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2349 | 2395 |
2350 var mock = new common_test.HttpServerMock(); | 2396 var mock = new common_test.HttpServerMock(); |
2351 api.UrlchannelsResourceApi res = new api.AdsensehostApi(mock).urlchannels; | 2397 api.UrlchannelsResourceApi res = new api.AdsensehostApi(mock).urlchannels; |
2352 var arg_adClientId = "foo"; | 2398 var arg_adClientId = "foo"; |
2353 var arg_urlChannelId = "foo"; | 2399 var arg_urlChannelId = "foo"; |
2354 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2400 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2355 var path = (req.url).path; | 2401 var path = (req.url).path; |
2356 var pathOffset = 0; | 2402 var pathOffset = 0; |
2357 var index; | 2403 var index; |
2358 var subPart; | 2404 var subPart; |
2359 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("/adsensehost/v4.1/")); | 2405 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
2360 pathOffset += 18; | 2406 pathOffset += 1; |
| 2407 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("adsensehost/v4.1/")); |
| 2408 pathOffset += 17; |
2361 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("adclients/")); | 2409 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("adclients/")); |
2362 pathOffset += 10; | 2410 pathOffset += 10; |
2363 index = path.indexOf("/urlchannels/", pathOffset); | 2411 index = path.indexOf("/urlchannels/", pathOffset); |
2364 unittest.expect(index >= 0, unittest.isTrue); | 2412 unittest.expect(index >= 0, unittest.isTrue); |
2365 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 2413 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); |
2366 pathOffset = index; | 2414 pathOffset = index; |
2367 unittest.expect(subPart, unittest.equals("$arg_adClientId")); | 2415 unittest.expect(subPart, unittest.equals("$arg_adClientId")); |
2368 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("/urlchannels/")); | 2416 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("/urlchannels/")); |
2369 pathOffset += 13; | 2417 pathOffset += 13; |
2370 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | 2418 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2407 var arg_request = buildUrlChannel(); | 2455 var arg_request = buildUrlChannel(); |
2408 var arg_adClientId = "foo"; | 2456 var arg_adClientId = "foo"; |
2409 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2457 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2410 var obj = new api.UrlChannel.fromJson(json); | 2458 var obj = new api.UrlChannel.fromJson(json); |
2411 checkUrlChannel(obj); | 2459 checkUrlChannel(obj); |
2412 | 2460 |
2413 var path = (req.url).path; | 2461 var path = (req.url).path; |
2414 var pathOffset = 0; | 2462 var pathOffset = 0; |
2415 var index; | 2463 var index; |
2416 var subPart; | 2464 var subPart; |
2417 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("/adsensehost/v4.1/")); | 2465 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
2418 pathOffset += 18; | 2466 pathOffset += 1; |
| 2467 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("adsensehost/v4.1/")); |
| 2468 pathOffset += 17; |
2419 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("adclients/")); | 2469 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("adclients/")); |
2420 pathOffset += 10; | 2470 pathOffset += 10; |
2421 index = path.indexOf("/urlchannels", pathOffset); | 2471 index = path.indexOf("/urlchannels", pathOffset); |
2422 unittest.expect(index >= 0, unittest.isTrue); | 2472 unittest.expect(index >= 0, unittest.isTrue); |
2423 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 2473 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); |
2424 pathOffset = index; | 2474 pathOffset = index; |
2425 unittest.expect(subPart, unittest.equals("$arg_adClientId")); | 2475 unittest.expect(subPart, unittest.equals("$arg_adClientId")); |
2426 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("/urlchannels")); | 2476 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("/urlchannels")); |
2427 pathOffset += 12; | 2477 pathOffset += 12; |
2428 | 2478 |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2460 var mock = new common_test.HttpServerMock(); | 2510 var mock = new common_test.HttpServerMock(); |
2461 api.UrlchannelsResourceApi res = new api.AdsensehostApi(mock).urlchannels; | 2511 api.UrlchannelsResourceApi res = new api.AdsensehostApi(mock).urlchannels; |
2462 var arg_adClientId = "foo"; | 2512 var arg_adClientId = "foo"; |
2463 var arg_maxResults = 42; | 2513 var arg_maxResults = 42; |
2464 var arg_pageToken = "foo"; | 2514 var arg_pageToken = "foo"; |
2465 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2515 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2466 var path = (req.url).path; | 2516 var path = (req.url).path; |
2467 var pathOffset = 0; | 2517 var pathOffset = 0; |
2468 var index; | 2518 var index; |
2469 var subPart; | 2519 var subPart; |
2470 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("/adsensehost/v4.1/")); | 2520 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
2471 pathOffset += 18; | 2521 pathOffset += 1; |
| 2522 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("adsensehost/v4.1/")); |
| 2523 pathOffset += 17; |
2472 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("adclients/")); | 2524 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("adclients/")); |
2473 pathOffset += 10; | 2525 pathOffset += 10; |
2474 index = path.indexOf("/urlchannels", pathOffset); | 2526 index = path.indexOf("/urlchannels", pathOffset); |
2475 unittest.expect(index >= 0, unittest.isTrue); | 2527 unittest.expect(index >= 0, unittest.isTrue); |
2476 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 2528 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); |
2477 pathOffset = index; | 2529 pathOffset = index; |
2478 unittest.expect(subPart, unittest.equals("$arg_adClientId")); | 2530 unittest.expect(subPart, unittest.equals("$arg_adClientId")); |
2479 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("/urlchannels")); | 2531 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("/urlchannels")); |
2480 pathOffset += 12; | 2532 pathOffset += 12; |
2481 | 2533 |
(...skipping 26 matching lines...) Expand all Loading... |
2508 res.list(arg_adClientId, maxResults: arg_maxResults, pageToken: arg_pageTo
ken).then(unittest.expectAsync(((api.UrlChannels response) { | 2560 res.list(arg_adClientId, maxResults: arg_maxResults, pageToken: arg_pageTo
ken).then(unittest.expectAsync(((api.UrlChannels response) { |
2509 checkUrlChannels(response); | 2561 checkUrlChannels(response); |
2510 }))); | 2562 }))); |
2511 }); | 2563 }); |
2512 | 2564 |
2513 }); | 2565 }); |
2514 | 2566 |
2515 | 2567 |
2516 } | 2568 } |
2517 | 2569 |
OLD | NEW |