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

Side by Side Diff: generated/googleapis_beta/test/appengine/v1beta4_test.dart

Issue 2159673002: Api-roll 39: 2016-07-18 (Closed) Base URL: git@github.com:dart-lang/googleapis.git@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 library googleapis_beta.appengine.v1beta4.test; 1 library googleapis_beta.appengine.v1beta4.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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 } 90 }
91 91
92 checkApiEndpointHandler(api.ApiEndpointHandler o) { 92 checkApiEndpointHandler(api.ApiEndpointHandler o) {
93 buildCounterApiEndpointHandler++; 93 buildCounterApiEndpointHandler++;
94 if (buildCounterApiEndpointHandler < 3) { 94 if (buildCounterApiEndpointHandler < 3) {
95 unittest.expect(o.scriptPath, unittest.equals('foo')); 95 unittest.expect(o.scriptPath, unittest.equals('foo'));
96 } 96 }
97 buildCounterApiEndpointHandler--; 97 buildCounterApiEndpointHandler--;
98 } 98 }
99 99
100 buildUnnamed2995() { 100 buildUnnamed3714() {
101 var o = new core.List<api.UrlDispatchRule>(); 101 var o = new core.List<api.UrlDispatchRule>();
102 o.add(buildUrlDispatchRule()); 102 o.add(buildUrlDispatchRule());
103 o.add(buildUrlDispatchRule()); 103 o.add(buildUrlDispatchRule());
104 return o; 104 return o;
105 } 105 }
106 106
107 checkUnnamed2995(core.List<api.UrlDispatchRule> o) { 107 checkUnnamed3714(core.List<api.UrlDispatchRule> o) {
108 unittest.expect(o, unittest.hasLength(2)); 108 unittest.expect(o, unittest.hasLength(2));
109 checkUrlDispatchRule(o[0]); 109 checkUrlDispatchRule(o[0]);
110 checkUrlDispatchRule(o[1]); 110 checkUrlDispatchRule(o[1]);
111 } 111 }
112 112
113 core.int buildCounterApplication = 0; 113 core.int buildCounterApplication = 0;
114 buildApplication() { 114 buildApplication() {
115 var o = new api.Application(); 115 var o = new api.Application();
116 buildCounterApplication++; 116 buildCounterApplication++;
117 if (buildCounterApplication < 3) { 117 if (buildCounterApplication < 3) {
118 o.authDomain = "foo"; 118 o.authDomain = "foo";
119 o.codeBucket = "foo"; 119 o.codeBucket = "foo";
120 o.defaultBucket = "foo"; 120 o.defaultBucket = "foo";
121 o.defaultCookieExpiration = "foo"; 121 o.defaultCookieExpiration = "foo";
122 o.defaultHostname = "foo"; 122 o.defaultHostname = "foo";
123 o.dispatchRules = buildUnnamed2995(); 123 o.dispatchRules = buildUnnamed3714();
124 o.id = "foo"; 124 o.id = "foo";
125 o.location = "foo"; 125 o.location = "foo";
126 o.name = "foo"; 126 o.name = "foo";
127 } 127 }
128 buildCounterApplication--; 128 buildCounterApplication--;
129 return o; 129 return o;
130 } 130 }
131 131
132 checkApplication(api.Application o) { 132 checkApplication(api.Application o) {
133 buildCounterApplication++; 133 buildCounterApplication++;
134 if (buildCounterApplication < 3) { 134 if (buildCounterApplication < 3) {
135 unittest.expect(o.authDomain, unittest.equals('foo')); 135 unittest.expect(o.authDomain, unittest.equals('foo'));
136 unittest.expect(o.codeBucket, unittest.equals('foo')); 136 unittest.expect(o.codeBucket, unittest.equals('foo'));
137 unittest.expect(o.defaultBucket, unittest.equals('foo')); 137 unittest.expect(o.defaultBucket, unittest.equals('foo'));
138 unittest.expect(o.defaultCookieExpiration, unittest.equals('foo')); 138 unittest.expect(o.defaultCookieExpiration, unittest.equals('foo'));
139 unittest.expect(o.defaultHostname, unittest.equals('foo')); 139 unittest.expect(o.defaultHostname, unittest.equals('foo'));
140 checkUnnamed2995(o.dispatchRules); 140 checkUnnamed3714(o.dispatchRules);
141 unittest.expect(o.id, unittest.equals('foo')); 141 unittest.expect(o.id, unittest.equals('foo'));
142 unittest.expect(o.location, unittest.equals('foo')); 142 unittest.expect(o.location, unittest.equals('foo'));
143 unittest.expect(o.name, unittest.equals('foo')); 143 unittest.expect(o.name, unittest.equals('foo'));
144 } 144 }
145 buildCounterApplication--; 145 buildCounterApplication--;
146 } 146 }
147 147
148 core.int buildCounterAutomaticScaling = 0; 148 core.int buildCounterAutomaticScaling = 0;
149 buildAutomaticScaling() { 149 buildAutomaticScaling() {
150 var o = new api.AutomaticScaling(); 150 var o = new api.AutomaticScaling();
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 240
241 checkCpuUtilization(api.CpuUtilization o) { 241 checkCpuUtilization(api.CpuUtilization o) {
242 buildCounterCpuUtilization++; 242 buildCounterCpuUtilization++;
243 if (buildCounterCpuUtilization < 3) { 243 if (buildCounterCpuUtilization < 3) {
244 unittest.expect(o.aggregationWindowLength, unittest.equals('foo')); 244 unittest.expect(o.aggregationWindowLength, unittest.equals('foo'));
245 unittest.expect(o.targetUtilization, unittest.equals(42.0)); 245 unittest.expect(o.targetUtilization, unittest.equals(42.0));
246 } 246 }
247 buildCounterCpuUtilization--; 247 buildCounterCpuUtilization--;
248 } 248 }
249 249
250 buildUnnamed2996() { 250 core.int buildCounterDebugInstanceRequest = 0;
251 buildDebugInstanceRequest() {
252 var o = new api.DebugInstanceRequest();
253 buildCounterDebugInstanceRequest++;
254 if (buildCounterDebugInstanceRequest < 3) {
255 }
256 buildCounterDebugInstanceRequest--;
257 return o;
258 }
259
260 checkDebugInstanceRequest(api.DebugInstanceRequest o) {
261 buildCounterDebugInstanceRequest++;
262 if (buildCounterDebugInstanceRequest < 3) {
263 }
264 buildCounterDebugInstanceRequest--;
265 }
266
267 buildUnnamed3715() {
251 var o = new core.Map<core.String, api.FileInfo>(); 268 var o = new core.Map<core.String, api.FileInfo>();
252 o["x"] = buildFileInfo(); 269 o["x"] = buildFileInfo();
253 o["y"] = buildFileInfo(); 270 o["y"] = buildFileInfo();
254 return o; 271 return o;
255 } 272 }
256 273
257 checkUnnamed2996(core.Map<core.String, api.FileInfo> o) { 274 checkUnnamed3715(core.Map<core.String, api.FileInfo> o) {
258 unittest.expect(o, unittest.hasLength(2)); 275 unittest.expect(o, unittest.hasLength(2));
259 checkFileInfo(o["x"]); 276 checkFileInfo(o["x"]);
260 checkFileInfo(o["y"]); 277 checkFileInfo(o["y"]);
261 } 278 }
262 279
263 buildUnnamed2997() { 280 buildUnnamed3716() {
264 var o = new core.List<api.SourceReference>(); 281 var o = new core.List<api.SourceReference>();
265 o.add(buildSourceReference()); 282 o.add(buildSourceReference());
266 o.add(buildSourceReference()); 283 o.add(buildSourceReference());
267 return o; 284 return o;
268 } 285 }
269 286
270 checkUnnamed2997(core.List<api.SourceReference> o) { 287 checkUnnamed3716(core.List<api.SourceReference> o) {
271 unittest.expect(o, unittest.hasLength(2)); 288 unittest.expect(o, unittest.hasLength(2));
272 checkSourceReference(o[0]); 289 checkSourceReference(o[0]);
273 checkSourceReference(o[1]); 290 checkSourceReference(o[1]);
274 } 291 }
275 292
276 core.int buildCounterDeployment = 0; 293 core.int buildCounterDeployment = 0;
277 buildDeployment() { 294 buildDeployment() {
278 var o = new api.Deployment(); 295 var o = new api.Deployment();
279 buildCounterDeployment++; 296 buildCounterDeployment++;
280 if (buildCounterDeployment < 3) { 297 if (buildCounterDeployment < 3) {
281 o.container = buildContainerInfo(); 298 o.container = buildContainerInfo();
282 o.files = buildUnnamed2996(); 299 o.files = buildUnnamed3715();
283 o.sourceReferences = buildUnnamed2997(); 300 o.sourceReferences = buildUnnamed3716();
284 } 301 }
285 buildCounterDeployment--; 302 buildCounterDeployment--;
286 return o; 303 return o;
287 } 304 }
288 305
289 checkDeployment(api.Deployment o) { 306 checkDeployment(api.Deployment o) {
290 buildCounterDeployment++; 307 buildCounterDeployment++;
291 if (buildCounterDeployment < 3) { 308 if (buildCounterDeployment < 3) {
292 checkContainerInfo(o.container); 309 checkContainerInfo(o.container);
293 checkUnnamed2996(o.files); 310 checkUnnamed3715(o.files);
294 checkUnnamed2997(o.sourceReferences); 311 checkUnnamed3716(o.sourceReferences);
295 } 312 }
296 buildCounterDeployment--; 313 buildCounterDeployment--;
297 } 314 }
298 315
299 core.int buildCounterDiskUtilization = 0; 316 core.int buildCounterDiskUtilization = 0;
300 buildDiskUtilization() { 317 buildDiskUtilization() {
301 var o = new api.DiskUtilization(); 318 var o = new api.DiskUtilization();
302 buildCounterDiskUtilization++; 319 buildCounterDiskUtilization++;
303 if (buildCounterDiskUtilization < 3) { 320 if (buildCounterDiskUtilization < 3) {
304 o.targetReadBytesPerSec = 42; 321 o.targetReadBytesPerSec = 42;
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
459 476
460 checkLibrary(api.Library o) { 477 checkLibrary(api.Library o) {
461 buildCounterLibrary++; 478 buildCounterLibrary++;
462 if (buildCounterLibrary < 3) { 479 if (buildCounterLibrary < 3) {
463 unittest.expect(o.name, unittest.equals('foo')); 480 unittest.expect(o.name, unittest.equals('foo'));
464 unittest.expect(o.version, unittest.equals('foo')); 481 unittest.expect(o.version, unittest.equals('foo'));
465 } 482 }
466 buildCounterLibrary--; 483 buildCounterLibrary--;
467 } 484 }
468 485
469 buildUnnamed2998() { 486 buildUnnamed3717() {
470 var o = new core.List<api.Instance>(); 487 var o = new core.List<api.Instance>();
471 o.add(buildInstance()); 488 o.add(buildInstance());
472 o.add(buildInstance()); 489 o.add(buildInstance());
473 return o; 490 return o;
474 } 491 }
475 492
476 checkUnnamed2998(core.List<api.Instance> o) { 493 checkUnnamed3717(core.List<api.Instance> o) {
477 unittest.expect(o, unittest.hasLength(2)); 494 unittest.expect(o, unittest.hasLength(2));
478 checkInstance(o[0]); 495 checkInstance(o[0]);
479 checkInstance(o[1]); 496 checkInstance(o[1]);
480 } 497 }
481 498
482 core.int buildCounterListInstancesResponse = 0; 499 core.int buildCounterListInstancesResponse = 0;
483 buildListInstancesResponse() { 500 buildListInstancesResponse() {
484 var o = new api.ListInstancesResponse(); 501 var o = new api.ListInstancesResponse();
485 buildCounterListInstancesResponse++; 502 buildCounterListInstancesResponse++;
486 if (buildCounterListInstancesResponse < 3) { 503 if (buildCounterListInstancesResponse < 3) {
487 o.instances = buildUnnamed2998(); 504 o.instances = buildUnnamed3717();
488 o.nextPageToken = "foo"; 505 o.nextPageToken = "foo";
489 } 506 }
490 buildCounterListInstancesResponse--; 507 buildCounterListInstancesResponse--;
491 return o; 508 return o;
492 } 509 }
493 510
494 checkListInstancesResponse(api.ListInstancesResponse o) { 511 checkListInstancesResponse(api.ListInstancesResponse o) {
495 buildCounterListInstancesResponse++; 512 buildCounterListInstancesResponse++;
496 if (buildCounterListInstancesResponse < 3) { 513 if (buildCounterListInstancesResponse < 3) {
497 checkUnnamed2998(o.instances); 514 checkUnnamed3717(o.instances);
498 unittest.expect(o.nextPageToken, unittest.equals('foo')); 515 unittest.expect(o.nextPageToken, unittest.equals('foo'));
499 } 516 }
500 buildCounterListInstancesResponse--; 517 buildCounterListInstancesResponse--;
501 } 518 }
502 519
503 buildUnnamed2999() { 520 buildUnnamed3718() {
521 var o = new core.List<api.Location>();
522 o.add(buildLocation());
523 o.add(buildLocation());
524 return o;
525 }
526
527 checkUnnamed3718(core.List<api.Location> o) {
528 unittest.expect(o, unittest.hasLength(2));
529 checkLocation(o[0]);
530 checkLocation(o[1]);
531 }
532
533 core.int buildCounterListLocationsResponse = 0;
534 buildListLocationsResponse() {
535 var o = new api.ListLocationsResponse();
536 buildCounterListLocationsResponse++;
537 if (buildCounterListLocationsResponse < 3) {
538 o.locations = buildUnnamed3718();
539 o.nextPageToken = "foo";
540 }
541 buildCounterListLocationsResponse--;
542 return o;
543 }
544
545 checkListLocationsResponse(api.ListLocationsResponse o) {
546 buildCounterListLocationsResponse++;
547 if (buildCounterListLocationsResponse < 3) {
548 checkUnnamed3718(o.locations);
549 unittest.expect(o.nextPageToken, unittest.equals('foo'));
550 }
551 buildCounterListLocationsResponse--;
552 }
553
554 buildUnnamed3719() {
504 var o = new core.List<api.Module>(); 555 var o = new core.List<api.Module>();
505 o.add(buildModule()); 556 o.add(buildModule());
506 o.add(buildModule()); 557 o.add(buildModule());
507 return o; 558 return o;
508 } 559 }
509 560
510 checkUnnamed2999(core.List<api.Module> o) { 561 checkUnnamed3719(core.List<api.Module> o) {
511 unittest.expect(o, unittest.hasLength(2)); 562 unittest.expect(o, unittest.hasLength(2));
512 checkModule(o[0]); 563 checkModule(o[0]);
513 checkModule(o[1]); 564 checkModule(o[1]);
514 } 565 }
515 566
516 core.int buildCounterListModulesResponse = 0; 567 core.int buildCounterListModulesResponse = 0;
517 buildListModulesResponse() { 568 buildListModulesResponse() {
518 var o = new api.ListModulesResponse(); 569 var o = new api.ListModulesResponse();
519 buildCounterListModulesResponse++; 570 buildCounterListModulesResponse++;
520 if (buildCounterListModulesResponse < 3) { 571 if (buildCounterListModulesResponse < 3) {
521 o.modules = buildUnnamed2999(); 572 o.modules = buildUnnamed3719();
522 o.nextPageToken = "foo"; 573 o.nextPageToken = "foo";
523 } 574 }
524 buildCounterListModulesResponse--; 575 buildCounterListModulesResponse--;
525 return o; 576 return o;
526 } 577 }
527 578
528 checkListModulesResponse(api.ListModulesResponse o) { 579 checkListModulesResponse(api.ListModulesResponse o) {
529 buildCounterListModulesResponse++; 580 buildCounterListModulesResponse++;
530 if (buildCounterListModulesResponse < 3) { 581 if (buildCounterListModulesResponse < 3) {
531 checkUnnamed2999(o.modules); 582 checkUnnamed3719(o.modules);
532 unittest.expect(o.nextPageToken, unittest.equals('foo')); 583 unittest.expect(o.nextPageToken, unittest.equals('foo'));
533 } 584 }
534 buildCounterListModulesResponse--; 585 buildCounterListModulesResponse--;
535 } 586 }
536 587
537 buildUnnamed3000() { 588 buildUnnamed3720() {
538 var o = new core.List<api.Operation>(); 589 var o = new core.List<api.Operation>();
539 o.add(buildOperation()); 590 o.add(buildOperation());
540 o.add(buildOperation()); 591 o.add(buildOperation());
541 return o; 592 return o;
542 } 593 }
543 594
544 checkUnnamed3000(core.List<api.Operation> o) { 595 checkUnnamed3720(core.List<api.Operation> o) {
545 unittest.expect(o, unittest.hasLength(2)); 596 unittest.expect(o, unittest.hasLength(2));
546 checkOperation(o[0]); 597 checkOperation(o[0]);
547 checkOperation(o[1]); 598 checkOperation(o[1]);
548 } 599 }
549 600
550 core.int buildCounterListOperationsResponse = 0; 601 core.int buildCounterListOperationsResponse = 0;
551 buildListOperationsResponse() { 602 buildListOperationsResponse() {
552 var o = new api.ListOperationsResponse(); 603 var o = new api.ListOperationsResponse();
553 buildCounterListOperationsResponse++; 604 buildCounterListOperationsResponse++;
554 if (buildCounterListOperationsResponse < 3) { 605 if (buildCounterListOperationsResponse < 3) {
555 o.nextPageToken = "foo"; 606 o.nextPageToken = "foo";
556 o.operations = buildUnnamed3000(); 607 o.operations = buildUnnamed3720();
557 } 608 }
558 buildCounterListOperationsResponse--; 609 buildCounterListOperationsResponse--;
559 return o; 610 return o;
560 } 611 }
561 612
562 checkListOperationsResponse(api.ListOperationsResponse o) { 613 checkListOperationsResponse(api.ListOperationsResponse o) {
563 buildCounterListOperationsResponse++; 614 buildCounterListOperationsResponse++;
564 if (buildCounterListOperationsResponse < 3) { 615 if (buildCounterListOperationsResponse < 3) {
565 unittest.expect(o.nextPageToken, unittest.equals('foo')); 616 unittest.expect(o.nextPageToken, unittest.equals('foo'));
566 checkUnnamed3000(o.operations); 617 checkUnnamed3720(o.operations);
567 } 618 }
568 buildCounterListOperationsResponse--; 619 buildCounterListOperationsResponse--;
569 } 620 }
570 621
571 buildUnnamed3001() { 622 buildUnnamed3721() {
572 var o = new core.List<api.Version>(); 623 var o = new core.List<api.Version>();
573 o.add(buildVersion()); 624 o.add(buildVersion());
574 o.add(buildVersion()); 625 o.add(buildVersion());
575 return o; 626 return o;
576 } 627 }
577 628
578 checkUnnamed3001(core.List<api.Version> o) { 629 checkUnnamed3721(core.List<api.Version> o) {
579 unittest.expect(o, unittest.hasLength(2)); 630 unittest.expect(o, unittest.hasLength(2));
580 checkVersion(o[0]); 631 checkVersion(o[0]);
581 checkVersion(o[1]); 632 checkVersion(o[1]);
582 } 633 }
583 634
584 core.int buildCounterListVersionsResponse = 0; 635 core.int buildCounterListVersionsResponse = 0;
585 buildListVersionsResponse() { 636 buildListVersionsResponse() {
586 var o = new api.ListVersionsResponse(); 637 var o = new api.ListVersionsResponse();
587 buildCounterListVersionsResponse++; 638 buildCounterListVersionsResponse++;
588 if (buildCounterListVersionsResponse < 3) { 639 if (buildCounterListVersionsResponse < 3) {
589 o.nextPageToken = "foo"; 640 o.nextPageToken = "foo";
590 o.versions = buildUnnamed3001(); 641 o.versions = buildUnnamed3721();
591 } 642 }
592 buildCounterListVersionsResponse--; 643 buildCounterListVersionsResponse--;
593 return o; 644 return o;
594 } 645 }
595 646
596 checkListVersionsResponse(api.ListVersionsResponse o) { 647 checkListVersionsResponse(api.ListVersionsResponse o) {
597 buildCounterListVersionsResponse++; 648 buildCounterListVersionsResponse++;
598 if (buildCounterListVersionsResponse < 3) { 649 if (buildCounterListVersionsResponse < 3) {
599 unittest.expect(o.nextPageToken, unittest.equals('foo')); 650 unittest.expect(o.nextPageToken, unittest.equals('foo'));
600 checkUnnamed3001(o.versions); 651 checkUnnamed3721(o.versions);
601 } 652 }
602 buildCounterListVersionsResponse--; 653 buildCounterListVersionsResponse--;
603 } 654 }
604 655
656 buildUnnamed3722() {
657 var o = new core.Map<core.String, core.String>();
658 o["x"] = "foo";
659 o["y"] = "foo";
660 return o;
661 }
662
663 checkUnnamed3722(core.Map<core.String, core.String> o) {
664 unittest.expect(o, unittest.hasLength(2));
665 unittest.expect(o["x"], unittest.equals('foo'));
666 unittest.expect(o["y"], unittest.equals('foo'));
667 }
668
669 buildUnnamed3723() {
670 var o = new core.Map<core.String, core.Object>();
671 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'};
672 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'};
673 return o;
674 }
675
676 checkUnnamed3723(core.Map<core.String, core.Object> o) {
677 unittest.expect(o, unittest.hasLength(2));
678 var casted1 = (o["x"]) as core.Map; unittest.expect(casted1, unittest.hasLengt h(3)); unittest.expect(casted1["list"], unittest.equals([1, 2, 3])); unittest.ex pect(casted1["bool"], unittest.equals(true)); unittest.expect(casted1["string"], unittest.equals('foo'));
679 var casted2 = (o["y"]) as core.Map; unittest.expect(casted2, unittest.hasLengt h(3)); unittest.expect(casted2["list"], unittest.equals([1, 2, 3])); unittest.ex pect(casted2["bool"], unittest.equals(true)); unittest.expect(casted2["string"], unittest.equals('foo'));
680 }
681
682 core.int buildCounterLocation = 0;
683 buildLocation() {
684 var o = new api.Location();
685 buildCounterLocation++;
686 if (buildCounterLocation < 3) {
687 o.labels = buildUnnamed3722();
688 o.metadata = buildUnnamed3723();
689 o.name = "foo";
690 }
691 buildCounterLocation--;
692 return o;
693 }
694
695 checkLocation(api.Location o) {
696 buildCounterLocation++;
697 if (buildCounterLocation < 3) {
698 checkUnnamed3722(o.labels);
699 checkUnnamed3723(o.metadata);
700 unittest.expect(o.name, unittest.equals('foo'));
701 }
702 buildCounterLocation--;
703 }
704
605 core.int buildCounterLocationMetadata = 0; 705 core.int buildCounterLocationMetadata = 0;
606 buildLocationMetadata() { 706 buildLocationMetadata() {
607 var o = new api.LocationMetadata(); 707 var o = new api.LocationMetadata();
608 buildCounterLocationMetadata++; 708 buildCounterLocationMetadata++;
609 if (buildCounterLocationMetadata < 3) { 709 if (buildCounterLocationMetadata < 3) {
610 } 710 }
611 buildCounterLocationMetadata--; 711 buildCounterLocationMetadata--;
612 return o; 712 return o;
613 } 713 }
614 714
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
654 checkModule(api.Module o) { 754 checkModule(api.Module o) {
655 buildCounterModule++; 755 buildCounterModule++;
656 if (buildCounterModule < 3) { 756 if (buildCounterModule < 3) {
657 unittest.expect(o.id, unittest.equals('foo')); 757 unittest.expect(o.id, unittest.equals('foo'));
658 unittest.expect(o.name, unittest.equals('foo')); 758 unittest.expect(o.name, unittest.equals('foo'));
659 checkTrafficSplit(o.split); 759 checkTrafficSplit(o.split);
660 } 760 }
661 buildCounterModule--; 761 buildCounterModule--;
662 } 762 }
663 763
664 buildUnnamed3002() { 764 buildUnnamed3724() {
665 var o = new core.List<core.String>(); 765 var o = new core.List<core.String>();
666 o.add("foo"); 766 o.add("foo");
667 o.add("foo"); 767 o.add("foo");
668 return o; 768 return o;
669 } 769 }
670 770
671 checkUnnamed3002(core.List<core.String> o) { 771 checkUnnamed3724(core.List<core.String> o) {
672 unittest.expect(o, unittest.hasLength(2)); 772 unittest.expect(o, unittest.hasLength(2));
673 unittest.expect(o[0], unittest.equals('foo')); 773 unittest.expect(o[0], unittest.equals('foo'));
674 unittest.expect(o[1], unittest.equals('foo')); 774 unittest.expect(o[1], unittest.equals('foo'));
675 } 775 }
676 776
677 core.int buildCounterNetwork = 0; 777 core.int buildCounterNetwork = 0;
678 buildNetwork() { 778 buildNetwork() {
679 var o = new api.Network(); 779 var o = new api.Network();
680 buildCounterNetwork++; 780 buildCounterNetwork++;
681 if (buildCounterNetwork < 3) { 781 if (buildCounterNetwork < 3) {
682 o.forwardedPorts = buildUnnamed3002(); 782 o.forwardedPorts = buildUnnamed3724();
683 o.instanceTag = "foo"; 783 o.instanceTag = "foo";
684 o.name = "foo"; 784 o.name = "foo";
685 } 785 }
686 buildCounterNetwork--; 786 buildCounterNetwork--;
687 return o; 787 return o;
688 } 788 }
689 789
690 checkNetwork(api.Network o) { 790 checkNetwork(api.Network o) {
691 buildCounterNetwork++; 791 buildCounterNetwork++;
692 if (buildCounterNetwork < 3) { 792 if (buildCounterNetwork < 3) {
693 checkUnnamed3002(o.forwardedPorts); 793 checkUnnamed3724(o.forwardedPorts);
694 unittest.expect(o.instanceTag, unittest.equals('foo')); 794 unittest.expect(o.instanceTag, unittest.equals('foo'));
695 unittest.expect(o.name, unittest.equals('foo')); 795 unittest.expect(o.name, unittest.equals('foo'));
696 } 796 }
697 buildCounterNetwork--; 797 buildCounterNetwork--;
698 } 798 }
699 799
700 core.int buildCounterNetworkUtilization = 0; 800 core.int buildCounterNetworkUtilization = 0;
701 buildNetworkUtilization() { 801 buildNetworkUtilization() {
702 var o = new api.NetworkUtilization(); 802 var o = new api.NetworkUtilization();
703 buildCounterNetworkUtilization++; 803 buildCounterNetworkUtilization++;
(...skipping 11 matching lines...) Expand all
715 buildCounterNetworkUtilization++; 815 buildCounterNetworkUtilization++;
716 if (buildCounterNetworkUtilization < 3) { 816 if (buildCounterNetworkUtilization < 3) {
717 unittest.expect(o.targetReceivedBytesPerSec, unittest.equals(42)); 817 unittest.expect(o.targetReceivedBytesPerSec, unittest.equals(42));
718 unittest.expect(o.targetReceivedPacketsPerSec, unittest.equals(42)); 818 unittest.expect(o.targetReceivedPacketsPerSec, unittest.equals(42));
719 unittest.expect(o.targetSentBytesPerSec, unittest.equals(42)); 819 unittest.expect(o.targetSentBytesPerSec, unittest.equals(42));
720 unittest.expect(o.targetSentPacketsPerSec, unittest.equals(42)); 820 unittest.expect(o.targetSentPacketsPerSec, unittest.equals(42));
721 } 821 }
722 buildCounterNetworkUtilization--; 822 buildCounterNetworkUtilization--;
723 } 823 }
724 824
725 buildUnnamed3003() { 825 buildUnnamed3725() {
726 var o = new core.Map<core.String, core.Object>(); 826 var o = new core.Map<core.String, core.Object>();
727 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; 827 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'};
728 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; 828 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'};
729 return o; 829 return o;
730 } 830 }
731 831
732 checkUnnamed3003(core.Map<core.String, core.Object> o) { 832 checkUnnamed3725(core.Map<core.String, core.Object> o) {
733 unittest.expect(o, unittest.hasLength(2)); 833 unittest.expect(o, unittest.hasLength(2));
734 var casted1 = (o["x"]) as core.Map; unittest.expect(casted1, unittest.hasLengt h(3)); unittest.expect(casted1["list"], unittest.equals([1, 2, 3])); unittest.ex pect(casted1["bool"], unittest.equals(true)); unittest.expect(casted1["string"], unittest.equals('foo')); 834 var casted3 = (o["x"]) as core.Map; unittest.expect(casted3, unittest.hasLengt h(3)); unittest.expect(casted3["list"], unittest.equals([1, 2, 3])); unittest.ex pect(casted3["bool"], unittest.equals(true)); unittest.expect(casted3["string"], unittest.equals('foo'));
735 var casted2 = (o["y"]) as core.Map; unittest.expect(casted2, unittest.hasLengt h(3)); unittest.expect(casted2["list"], unittest.equals([1, 2, 3])); unittest.ex pect(casted2["bool"], unittest.equals(true)); unittest.expect(casted2["string"], unittest.equals('foo')); 835 var casted4 = (o["y"]) as core.Map; unittest.expect(casted4, unittest.hasLengt h(3)); unittest.expect(casted4["list"], unittest.equals([1, 2, 3])); unittest.ex pect(casted4["bool"], unittest.equals(true)); unittest.expect(casted4["string"], unittest.equals('foo'));
736 } 836 }
737 837
738 buildUnnamed3004() { 838 buildUnnamed3726() {
739 var o = new core.Map<core.String, core.Object>(); 839 var o = new core.Map<core.String, core.Object>();
740 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; 840 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'};
741 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; 841 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'};
742 return o; 842 return o;
743 } 843 }
744 844
745 checkUnnamed3004(core.Map<core.String, core.Object> o) { 845 checkUnnamed3726(core.Map<core.String, core.Object> o) {
746 unittest.expect(o, unittest.hasLength(2)); 846 unittest.expect(o, unittest.hasLength(2));
747 var casted3 = (o["x"]) as core.Map; unittest.expect(casted3, unittest.hasLengt h(3)); unittest.expect(casted3["list"], unittest.equals([1, 2, 3])); unittest.ex pect(casted3["bool"], unittest.equals(true)); unittest.expect(casted3["string"], unittest.equals('foo')); 847 var casted5 = (o["x"]) as core.Map; unittest.expect(casted5, unittest.hasLengt h(3)); unittest.expect(casted5["list"], unittest.equals([1, 2, 3])); unittest.ex pect(casted5["bool"], unittest.equals(true)); unittest.expect(casted5["string"], unittest.equals('foo'));
748 var casted4 = (o["y"]) as core.Map; unittest.expect(casted4, unittest.hasLengt h(3)); unittest.expect(casted4["list"], unittest.equals([1, 2, 3])); unittest.ex pect(casted4["bool"], unittest.equals(true)); unittest.expect(casted4["string"], unittest.equals('foo')); 848 var casted6 = (o["y"]) as core.Map; unittest.expect(casted6, unittest.hasLengt h(3)); unittest.expect(casted6["list"], unittest.equals([1, 2, 3])); unittest.ex pect(casted6["bool"], unittest.equals(true)); unittest.expect(casted6["string"], unittest.equals('foo'));
749 } 849 }
750 850
751 core.int buildCounterOperation = 0; 851 core.int buildCounterOperation = 0;
752 buildOperation() { 852 buildOperation() {
753 var o = new api.Operation(); 853 var o = new api.Operation();
754 buildCounterOperation++; 854 buildCounterOperation++;
755 if (buildCounterOperation < 3) { 855 if (buildCounterOperation < 3) {
756 o.done = true; 856 o.done = true;
757 o.error = buildStatus(); 857 o.error = buildStatus();
758 o.metadata = buildUnnamed3003(); 858 o.metadata = buildUnnamed3725();
759 o.name = "foo"; 859 o.name = "foo";
760 o.response = buildUnnamed3004(); 860 o.response = buildUnnamed3726();
761 } 861 }
762 buildCounterOperation--; 862 buildCounterOperation--;
763 return o; 863 return o;
764 } 864 }
765 865
766 checkOperation(api.Operation o) { 866 checkOperation(api.Operation o) {
767 buildCounterOperation++; 867 buildCounterOperation++;
768 if (buildCounterOperation < 3) { 868 if (buildCounterOperation < 3) {
769 unittest.expect(o.done, unittest.isTrue); 869 unittest.expect(o.done, unittest.isTrue);
770 checkStatus(o.error); 870 checkStatus(o.error);
771 checkUnnamed3003(o.metadata); 871 checkUnnamed3725(o.metadata);
772 unittest.expect(o.name, unittest.equals('foo')); 872 unittest.expect(o.name, unittest.equals('foo'));
773 checkUnnamed3004(o.response); 873 checkUnnamed3726(o.response);
774 } 874 }
775 buildCounterOperation--; 875 buildCounterOperation--;
776 } 876 }
777 877
778 core.int buildCounterOperationMetadata = 0; 878 core.int buildCounterOperationMetadata = 0;
779 buildOperationMetadata() { 879 buildOperationMetadata() {
780 var o = new api.OperationMetadata(); 880 var o = new api.OperationMetadata();
781 buildCounterOperationMetadata++; 881 buildCounterOperationMetadata++;
782 if (buildCounterOperationMetadata < 3) { 882 if (buildCounterOperationMetadata < 3) {
783 o.endTime = "foo"; 883 o.endTime = "foo";
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
935 1035
936 checkSourceReference(api.SourceReference o) { 1036 checkSourceReference(api.SourceReference o) {
937 buildCounterSourceReference++; 1037 buildCounterSourceReference++;
938 if (buildCounterSourceReference < 3) { 1038 if (buildCounterSourceReference < 3) {
939 unittest.expect(o.repository, unittest.equals('foo')); 1039 unittest.expect(o.repository, unittest.equals('foo'));
940 unittest.expect(o.revisionId, unittest.equals('foo')); 1040 unittest.expect(o.revisionId, unittest.equals('foo'));
941 } 1041 }
942 buildCounterSourceReference--; 1042 buildCounterSourceReference--;
943 } 1043 }
944 1044
945 buildUnnamed3005() { 1045 buildUnnamed3727() {
946 var o = new core.Map<core.String, core.String>(); 1046 var o = new core.Map<core.String, core.String>();
947 o["x"] = "foo"; 1047 o["x"] = "foo";
948 o["y"] = "foo"; 1048 o["y"] = "foo";
949 return o; 1049 return o;
950 } 1050 }
951 1051
952 checkUnnamed3005(core.Map<core.String, core.String> o) { 1052 checkUnnamed3727(core.Map<core.String, core.String> o) {
953 unittest.expect(o, unittest.hasLength(2)); 1053 unittest.expect(o, unittest.hasLength(2));
954 unittest.expect(o["x"], unittest.equals('foo')); 1054 unittest.expect(o["x"], unittest.equals('foo'));
955 unittest.expect(o["y"], unittest.equals('foo')); 1055 unittest.expect(o["y"], unittest.equals('foo'));
956 } 1056 }
957 1057
958 core.int buildCounterStaticDirectoryHandler = 0; 1058 core.int buildCounterStaticDirectoryHandler = 0;
959 buildStaticDirectoryHandler() { 1059 buildStaticDirectoryHandler() {
960 var o = new api.StaticDirectoryHandler(); 1060 var o = new api.StaticDirectoryHandler();
961 buildCounterStaticDirectoryHandler++; 1061 buildCounterStaticDirectoryHandler++;
962 if (buildCounterStaticDirectoryHandler < 3) { 1062 if (buildCounterStaticDirectoryHandler < 3) {
963 o.applicationReadable = true; 1063 o.applicationReadable = true;
964 o.directory = "foo"; 1064 o.directory = "foo";
965 o.expiration = "foo"; 1065 o.expiration = "foo";
966 o.httpHeaders = buildUnnamed3005(); 1066 o.httpHeaders = buildUnnamed3727();
967 o.mimeType = "foo"; 1067 o.mimeType = "foo";
968 o.requireMatchingFile = true; 1068 o.requireMatchingFile = true;
969 } 1069 }
970 buildCounterStaticDirectoryHandler--; 1070 buildCounterStaticDirectoryHandler--;
971 return o; 1071 return o;
972 } 1072 }
973 1073
974 checkStaticDirectoryHandler(api.StaticDirectoryHandler o) { 1074 checkStaticDirectoryHandler(api.StaticDirectoryHandler o) {
975 buildCounterStaticDirectoryHandler++; 1075 buildCounterStaticDirectoryHandler++;
976 if (buildCounterStaticDirectoryHandler < 3) { 1076 if (buildCounterStaticDirectoryHandler < 3) {
977 unittest.expect(o.applicationReadable, unittest.isTrue); 1077 unittest.expect(o.applicationReadable, unittest.isTrue);
978 unittest.expect(o.directory, unittest.equals('foo')); 1078 unittest.expect(o.directory, unittest.equals('foo'));
979 unittest.expect(o.expiration, unittest.equals('foo')); 1079 unittest.expect(o.expiration, unittest.equals('foo'));
980 checkUnnamed3005(o.httpHeaders); 1080 checkUnnamed3727(o.httpHeaders);
981 unittest.expect(o.mimeType, unittest.equals('foo')); 1081 unittest.expect(o.mimeType, unittest.equals('foo'));
982 unittest.expect(o.requireMatchingFile, unittest.isTrue); 1082 unittest.expect(o.requireMatchingFile, unittest.isTrue);
983 } 1083 }
984 buildCounterStaticDirectoryHandler--; 1084 buildCounterStaticDirectoryHandler--;
985 } 1085 }
986 1086
987 buildUnnamed3006() { 1087 buildUnnamed3728() {
988 var o = new core.Map<core.String, core.String>(); 1088 var o = new core.Map<core.String, core.String>();
989 o["x"] = "foo"; 1089 o["x"] = "foo";
990 o["y"] = "foo"; 1090 o["y"] = "foo";
991 return o; 1091 return o;
992 } 1092 }
993 1093
994 checkUnnamed3006(core.Map<core.String, core.String> o) { 1094 checkUnnamed3728(core.Map<core.String, core.String> o) {
995 unittest.expect(o, unittest.hasLength(2)); 1095 unittest.expect(o, unittest.hasLength(2));
996 unittest.expect(o["x"], unittest.equals('foo')); 1096 unittest.expect(o["x"], unittest.equals('foo'));
997 unittest.expect(o["y"], unittest.equals('foo')); 1097 unittest.expect(o["y"], unittest.equals('foo'));
998 } 1098 }
999 1099
1000 core.int buildCounterStaticFilesHandler = 0; 1100 core.int buildCounterStaticFilesHandler = 0;
1001 buildStaticFilesHandler() { 1101 buildStaticFilesHandler() {
1002 var o = new api.StaticFilesHandler(); 1102 var o = new api.StaticFilesHandler();
1003 buildCounterStaticFilesHandler++; 1103 buildCounterStaticFilesHandler++;
1004 if (buildCounterStaticFilesHandler < 3) { 1104 if (buildCounterStaticFilesHandler < 3) {
1005 o.applicationReadable = true; 1105 o.applicationReadable = true;
1006 o.expiration = "foo"; 1106 o.expiration = "foo";
1007 o.httpHeaders = buildUnnamed3006(); 1107 o.httpHeaders = buildUnnamed3728();
1008 o.mimeType = "foo"; 1108 o.mimeType = "foo";
1009 o.path = "foo"; 1109 o.path = "foo";
1010 o.requireMatchingFile = true; 1110 o.requireMatchingFile = true;
1011 o.uploadPathRegex = "foo"; 1111 o.uploadPathRegex = "foo";
1012 } 1112 }
1013 buildCounterStaticFilesHandler--; 1113 buildCounterStaticFilesHandler--;
1014 return o; 1114 return o;
1015 } 1115 }
1016 1116
1017 checkStaticFilesHandler(api.StaticFilesHandler o) { 1117 checkStaticFilesHandler(api.StaticFilesHandler o) {
1018 buildCounterStaticFilesHandler++; 1118 buildCounterStaticFilesHandler++;
1019 if (buildCounterStaticFilesHandler < 3) { 1119 if (buildCounterStaticFilesHandler < 3) {
1020 unittest.expect(o.applicationReadable, unittest.isTrue); 1120 unittest.expect(o.applicationReadable, unittest.isTrue);
1021 unittest.expect(o.expiration, unittest.equals('foo')); 1121 unittest.expect(o.expiration, unittest.equals('foo'));
1022 checkUnnamed3006(o.httpHeaders); 1122 checkUnnamed3728(o.httpHeaders);
1023 unittest.expect(o.mimeType, unittest.equals('foo')); 1123 unittest.expect(o.mimeType, unittest.equals('foo'));
1024 unittest.expect(o.path, unittest.equals('foo')); 1124 unittest.expect(o.path, unittest.equals('foo'));
1025 unittest.expect(o.requireMatchingFile, unittest.isTrue); 1125 unittest.expect(o.requireMatchingFile, unittest.isTrue);
1026 unittest.expect(o.uploadPathRegex, unittest.equals('foo')); 1126 unittest.expect(o.uploadPathRegex, unittest.equals('foo'));
1027 } 1127 }
1028 buildCounterStaticFilesHandler--; 1128 buildCounterStaticFilesHandler--;
1029 } 1129 }
1030 1130
1031 buildUnnamed3007() { 1131 buildUnnamed3729() {
1032 var o = new core.Map<core.String, core.Object>(); 1132 var o = new core.Map<core.String, core.Object>();
1033 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; 1133 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'};
1034 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; 1134 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'};
1035 return o; 1135 return o;
1036 } 1136 }
1037 1137
1038 checkUnnamed3007(core.Map<core.String, core.Object> o) { 1138 checkUnnamed3729(core.Map<core.String, core.Object> o) {
1039 unittest.expect(o, unittest.hasLength(2)); 1139 unittest.expect(o, unittest.hasLength(2));
1040 var casted5 = (o["x"]) as core.Map; unittest.expect(casted5, unittest.hasLengt h(3)); unittest.expect(casted5["list"], unittest.equals([1, 2, 3])); unittest.ex pect(casted5["bool"], unittest.equals(true)); unittest.expect(casted5["string"], unittest.equals('foo')); 1140 var casted7 = (o["x"]) as core.Map; unittest.expect(casted7, unittest.hasLengt h(3)); unittest.expect(casted7["list"], unittest.equals([1, 2, 3])); unittest.ex pect(casted7["bool"], unittest.equals(true)); unittest.expect(casted7["string"], unittest.equals('foo'));
1041 var casted6 = (o["y"]) as core.Map; unittest.expect(casted6, unittest.hasLengt h(3)); unittest.expect(casted6["list"], unittest.equals([1, 2, 3])); unittest.ex pect(casted6["bool"], unittest.equals(true)); unittest.expect(casted6["string"], unittest.equals('foo')); 1141 var casted8 = (o["y"]) as core.Map; unittest.expect(casted8, unittest.hasLengt h(3)); unittest.expect(casted8["list"], unittest.equals([1, 2, 3])); unittest.ex pect(casted8["bool"], unittest.equals(true)); unittest.expect(casted8["string"], unittest.equals('foo'));
1042 } 1142 }
1043 1143
1044 buildUnnamed3008() { 1144 buildUnnamed3730() {
1045 var o = new core.List<core.Map<core.String, core.Object>>(); 1145 var o = new core.List<core.Map<core.String, core.Object>>();
1046 o.add(buildUnnamed3007()); 1146 o.add(buildUnnamed3729());
1047 o.add(buildUnnamed3007()); 1147 o.add(buildUnnamed3729());
1048 return o; 1148 return o;
1049 } 1149 }
1050 1150
1051 checkUnnamed3008(core.List<core.Map<core.String, core.Object>> o) { 1151 checkUnnamed3730(core.List<core.Map<core.String, core.Object>> o) {
1052 unittest.expect(o, unittest.hasLength(2)); 1152 unittest.expect(o, unittest.hasLength(2));
1053 checkUnnamed3007(o[0]); 1153 checkUnnamed3729(o[0]);
1054 checkUnnamed3007(o[1]); 1154 checkUnnamed3729(o[1]);
1055 } 1155 }
1056 1156
1057 core.int buildCounterStatus = 0; 1157 core.int buildCounterStatus = 0;
1058 buildStatus() { 1158 buildStatus() {
1059 var o = new api.Status(); 1159 var o = new api.Status();
1060 buildCounterStatus++; 1160 buildCounterStatus++;
1061 if (buildCounterStatus < 3) { 1161 if (buildCounterStatus < 3) {
1062 o.code = 42; 1162 o.code = 42;
1063 o.details = buildUnnamed3008(); 1163 o.details = buildUnnamed3730();
1064 o.message = "foo"; 1164 o.message = "foo";
1065 } 1165 }
1066 buildCounterStatus--; 1166 buildCounterStatus--;
1067 return o; 1167 return o;
1068 } 1168 }
1069 1169
1070 checkStatus(api.Status o) { 1170 checkStatus(api.Status o) {
1071 buildCounterStatus++; 1171 buildCounterStatus++;
1072 if (buildCounterStatus < 3) { 1172 if (buildCounterStatus < 3) {
1073 unittest.expect(o.code, unittest.equals(42)); 1173 unittest.expect(o.code, unittest.equals(42));
1074 checkUnnamed3008(o.details); 1174 checkUnnamed3730(o.details);
1075 unittest.expect(o.message, unittest.equals('foo')); 1175 unittest.expect(o.message, unittest.equals('foo'));
1076 } 1176 }
1077 buildCounterStatus--; 1177 buildCounterStatus--;
1078 } 1178 }
1079 1179
1080 buildUnnamed3009() { 1180 buildUnnamed3731() {
1081 var o = new core.Map<core.String, core.double>(); 1181 var o = new core.Map<core.String, core.double>();
1082 o["x"] = 42.0; 1182 o["x"] = 42.0;
1083 o["y"] = 42.0; 1183 o["y"] = 42.0;
1084 return o; 1184 return o;
1085 } 1185 }
1086 1186
1087 checkUnnamed3009(core.Map<core.String, core.double> o) { 1187 checkUnnamed3731(core.Map<core.String, core.double> o) {
1088 unittest.expect(o, unittest.hasLength(2)); 1188 unittest.expect(o, unittest.hasLength(2));
1089 unittest.expect(o["x"], unittest.equals(42.0)); 1189 unittest.expect(o["x"], unittest.equals(42.0));
1090 unittest.expect(o["y"], unittest.equals(42.0)); 1190 unittest.expect(o["y"], unittest.equals(42.0));
1091 } 1191 }
1092 1192
1093 core.int buildCounterTrafficSplit = 0; 1193 core.int buildCounterTrafficSplit = 0;
1094 buildTrafficSplit() { 1194 buildTrafficSplit() {
1095 var o = new api.TrafficSplit(); 1195 var o = new api.TrafficSplit();
1096 buildCounterTrafficSplit++; 1196 buildCounterTrafficSplit++;
1097 if (buildCounterTrafficSplit < 3) { 1197 if (buildCounterTrafficSplit < 3) {
1098 o.allocations = buildUnnamed3009(); 1198 o.allocations = buildUnnamed3731();
1099 o.shardBy = "foo"; 1199 o.shardBy = "foo";
1100 } 1200 }
1101 buildCounterTrafficSplit--; 1201 buildCounterTrafficSplit--;
1102 return o; 1202 return o;
1103 } 1203 }
1104 1204
1105 checkTrafficSplit(api.TrafficSplit o) { 1205 checkTrafficSplit(api.TrafficSplit o) {
1106 buildCounterTrafficSplit++; 1206 buildCounterTrafficSplit++;
1107 if (buildCounterTrafficSplit < 3) { 1207 if (buildCounterTrafficSplit < 3) {
1108 checkUnnamed3009(o.allocations); 1208 checkUnnamed3731(o.allocations);
1109 unittest.expect(o.shardBy, unittest.equals('foo')); 1209 unittest.expect(o.shardBy, unittest.equals('foo'));
1110 } 1210 }
1111 buildCounterTrafficSplit--; 1211 buildCounterTrafficSplit--;
1112 } 1212 }
1113 1213
1114 core.int buildCounterUrlDispatchRule = 0; 1214 core.int buildCounterUrlDispatchRule = 0;
1115 buildUrlDispatchRule() { 1215 buildUrlDispatchRule() {
1116 var o = new api.UrlDispatchRule(); 1216 var o = new api.UrlDispatchRule();
1117 buildCounterUrlDispatchRule++; 1217 buildCounterUrlDispatchRule++;
1118 if (buildCounterUrlDispatchRule < 3) { 1218 if (buildCounterUrlDispatchRule < 3) {
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
1162 unittest.expect(o.redirectHttpResponseCode, unittest.equals('foo')); 1262 unittest.expect(o.redirectHttpResponseCode, unittest.equals('foo'));
1163 checkScriptHandler(o.script); 1263 checkScriptHandler(o.script);
1164 unittest.expect(o.securityLevel, unittest.equals('foo')); 1264 unittest.expect(o.securityLevel, unittest.equals('foo'));
1165 checkStaticDirectoryHandler(o.staticDirectory); 1265 checkStaticDirectoryHandler(o.staticDirectory);
1166 checkStaticFilesHandler(o.staticFiles); 1266 checkStaticFilesHandler(o.staticFiles);
1167 unittest.expect(o.urlRegex, unittest.equals('foo')); 1267 unittest.expect(o.urlRegex, unittest.equals('foo'));
1168 } 1268 }
1169 buildCounterUrlMap--; 1269 buildCounterUrlMap--;
1170 } 1270 }
1171 1271
1172 buildUnnamed3010() { 1272 buildUnnamed3732() {
1173 var o = new core.Map<core.String, core.String>(); 1273 var o = new core.Map<core.String, core.String>();
1174 o["x"] = "foo"; 1274 o["x"] = "foo";
1175 o["y"] = "foo"; 1275 o["y"] = "foo";
1176 return o; 1276 return o;
1177 } 1277 }
1178 1278
1179 checkUnnamed3010(core.Map<core.String, core.String> o) { 1279 checkUnnamed3732(core.Map<core.String, core.String> o) {
1180 unittest.expect(o, unittest.hasLength(2)); 1280 unittest.expect(o, unittest.hasLength(2));
1181 unittest.expect(o["x"], unittest.equals('foo')); 1281 unittest.expect(o["x"], unittest.equals('foo'));
1182 unittest.expect(o["y"], unittest.equals('foo')); 1282 unittest.expect(o["y"], unittest.equals('foo'));
1183 } 1283 }
1184 1284
1185 buildUnnamed3011() { 1285 buildUnnamed3733() {
1186 var o = new core.Map<core.String, core.String>(); 1286 var o = new core.Map<core.String, core.String>();
1187 o["x"] = "foo"; 1287 o["x"] = "foo";
1188 o["y"] = "foo"; 1288 o["y"] = "foo";
1189 return o; 1289 return o;
1190 } 1290 }
1191 1291
1192 checkUnnamed3011(core.Map<core.String, core.String> o) { 1292 checkUnnamed3733(core.Map<core.String, core.String> o) {
1193 unittest.expect(o, unittest.hasLength(2)); 1293 unittest.expect(o, unittest.hasLength(2));
1194 unittest.expect(o["x"], unittest.equals('foo')); 1294 unittest.expect(o["x"], unittest.equals('foo'));
1195 unittest.expect(o["y"], unittest.equals('foo')); 1295 unittest.expect(o["y"], unittest.equals('foo'));
1196 } 1296 }
1197 1297
1198 buildUnnamed3012() { 1298 buildUnnamed3734() {
1199 var o = new core.List<api.ErrorHandler>(); 1299 var o = new core.List<api.ErrorHandler>();
1200 o.add(buildErrorHandler()); 1300 o.add(buildErrorHandler());
1201 o.add(buildErrorHandler()); 1301 o.add(buildErrorHandler());
1202 return o; 1302 return o;
1203 } 1303 }
1204 1304
1205 checkUnnamed3012(core.List<api.ErrorHandler> o) { 1305 checkUnnamed3734(core.List<api.ErrorHandler> o) {
1206 unittest.expect(o, unittest.hasLength(2)); 1306 unittest.expect(o, unittest.hasLength(2));
1207 checkErrorHandler(o[0]); 1307 checkErrorHandler(o[0]);
1208 checkErrorHandler(o[1]); 1308 checkErrorHandler(o[1]);
1209 } 1309 }
1210 1310
1211 buildUnnamed3013() { 1311 buildUnnamed3735() {
1212 var o = new core.List<api.UrlMap>(); 1312 var o = new core.List<api.UrlMap>();
1213 o.add(buildUrlMap()); 1313 o.add(buildUrlMap());
1214 o.add(buildUrlMap()); 1314 o.add(buildUrlMap());
1215 return o; 1315 return o;
1216 } 1316 }
1217 1317
1218 checkUnnamed3013(core.List<api.UrlMap> o) { 1318 checkUnnamed3735(core.List<api.UrlMap> o) {
1219 unittest.expect(o, unittest.hasLength(2)); 1319 unittest.expect(o, unittest.hasLength(2));
1220 checkUrlMap(o[0]); 1320 checkUrlMap(o[0]);
1221 checkUrlMap(o[1]); 1321 checkUrlMap(o[1]);
1222 } 1322 }
1223 1323
1224 buildUnnamed3014() { 1324 buildUnnamed3736() {
1225 var o = new core.List<core.String>(); 1325 var o = new core.List<core.String>();
1226 o.add("foo"); 1326 o.add("foo");
1227 o.add("foo"); 1327 o.add("foo");
1228 return o; 1328 return o;
1229 } 1329 }
1230 1330
1231 checkUnnamed3014(core.List<core.String> o) { 1331 checkUnnamed3736(core.List<core.String> o) {
1232 unittest.expect(o, unittest.hasLength(2)); 1332 unittest.expect(o, unittest.hasLength(2));
1233 unittest.expect(o[0], unittest.equals('foo')); 1333 unittest.expect(o[0], unittest.equals('foo'));
1234 unittest.expect(o[1], unittest.equals('foo')); 1334 unittest.expect(o[1], unittest.equals('foo'));
1235 } 1335 }
1236 1336
1237 buildUnnamed3015() { 1337 buildUnnamed3737() {
1238 var o = new core.List<api.Library>(); 1338 var o = new core.List<api.Library>();
1239 o.add(buildLibrary()); 1339 o.add(buildLibrary());
1240 o.add(buildLibrary()); 1340 o.add(buildLibrary());
1241 return o; 1341 return o;
1242 } 1342 }
1243 1343
1244 checkUnnamed3015(core.List<api.Library> o) { 1344 checkUnnamed3737(core.List<api.Library> o) {
1245 unittest.expect(o, unittest.hasLength(2)); 1345 unittest.expect(o, unittest.hasLength(2));
1246 checkLibrary(o[0]); 1346 checkLibrary(o[0]);
1247 checkLibrary(o[1]); 1347 checkLibrary(o[1]);
1248 } 1348 }
1249 1349
1250 core.int buildCounterVersion = 0; 1350 core.int buildCounterVersion = 0;
1251 buildVersion() { 1351 buildVersion() {
1252 var o = new api.Version(); 1352 var o = new api.Version();
1253 buildCounterVersion++; 1353 buildCounterVersion++;
1254 if (buildCounterVersion < 3) { 1354 if (buildCounterVersion < 3) {
1255 o.apiConfig = buildApiConfigHandler(); 1355 o.apiConfig = buildApiConfigHandler();
1256 o.automaticScaling = buildAutomaticScaling(); 1356 o.automaticScaling = buildAutomaticScaling();
1257 o.basicScaling = buildBasicScaling(); 1357 o.basicScaling = buildBasicScaling();
1258 o.betaSettings = buildUnnamed3010(); 1358 o.betaSettings = buildUnnamed3732();
1259 o.creationTime = "foo"; 1359 o.creationTime = "foo";
1260 o.defaultExpiration = "foo"; 1360 o.defaultExpiration = "foo";
1261 o.deployer = "foo"; 1361 o.deployer = "foo";
1262 o.deployment = buildDeployment(); 1362 o.deployment = buildDeployment();
1263 o.env = "foo"; 1363 o.env = "foo";
1264 o.envVariables = buildUnnamed3011(); 1364 o.envVariables = buildUnnamed3733();
1265 o.errorHandlers = buildUnnamed3012(); 1365 o.errorHandlers = buildUnnamed3734();
1266 o.handlers = buildUnnamed3013(); 1366 o.handlers = buildUnnamed3735();
1267 o.healthCheck = buildHealthCheck(); 1367 o.healthCheck = buildHealthCheck();
1268 o.id = "foo"; 1368 o.id = "foo";
1269 o.inboundServices = buildUnnamed3014(); 1369 o.inboundServices = buildUnnamed3736();
1270 o.instanceClass = "foo"; 1370 o.instanceClass = "foo";
1271 o.libraries = buildUnnamed3015(); 1371 o.libraries = buildUnnamed3737();
1272 o.manualScaling = buildManualScaling(); 1372 o.manualScaling = buildManualScaling();
1273 o.name = "foo"; 1373 o.name = "foo";
1274 o.network = buildNetwork(); 1374 o.network = buildNetwork();
1275 o.nobuildFilesRegex = "foo"; 1375 o.nobuildFilesRegex = "foo";
1276 o.resources = buildResources(); 1376 o.resources = buildResources();
1277 o.runtime = "foo"; 1377 o.runtime = "foo";
1278 o.servingStatus = "foo"; 1378 o.servingStatus = "foo";
1279 o.threadsafe = true; 1379 o.threadsafe = true;
1280 o.vm = true; 1380 o.vm = true;
1281 } 1381 }
1282 buildCounterVersion--; 1382 buildCounterVersion--;
1283 return o; 1383 return o;
1284 } 1384 }
1285 1385
1286 checkVersion(api.Version o) { 1386 checkVersion(api.Version o) {
1287 buildCounterVersion++; 1387 buildCounterVersion++;
1288 if (buildCounterVersion < 3) { 1388 if (buildCounterVersion < 3) {
1289 checkApiConfigHandler(o.apiConfig); 1389 checkApiConfigHandler(o.apiConfig);
1290 checkAutomaticScaling(o.automaticScaling); 1390 checkAutomaticScaling(o.automaticScaling);
1291 checkBasicScaling(o.basicScaling); 1391 checkBasicScaling(o.basicScaling);
1292 checkUnnamed3010(o.betaSettings); 1392 checkUnnamed3732(o.betaSettings);
1293 unittest.expect(o.creationTime, unittest.equals('foo')); 1393 unittest.expect(o.creationTime, unittest.equals('foo'));
1294 unittest.expect(o.defaultExpiration, unittest.equals('foo')); 1394 unittest.expect(o.defaultExpiration, unittest.equals('foo'));
1295 unittest.expect(o.deployer, unittest.equals('foo')); 1395 unittest.expect(o.deployer, unittest.equals('foo'));
1296 checkDeployment(o.deployment); 1396 checkDeployment(o.deployment);
1297 unittest.expect(o.env, unittest.equals('foo')); 1397 unittest.expect(o.env, unittest.equals('foo'));
1298 checkUnnamed3011(o.envVariables); 1398 checkUnnamed3733(o.envVariables);
1299 checkUnnamed3012(o.errorHandlers); 1399 checkUnnamed3734(o.errorHandlers);
1300 checkUnnamed3013(o.handlers); 1400 checkUnnamed3735(o.handlers);
1301 checkHealthCheck(o.healthCheck); 1401 checkHealthCheck(o.healthCheck);
1302 unittest.expect(o.id, unittest.equals('foo')); 1402 unittest.expect(o.id, unittest.equals('foo'));
1303 checkUnnamed3014(o.inboundServices); 1403 checkUnnamed3736(o.inboundServices);
1304 unittest.expect(o.instanceClass, unittest.equals('foo')); 1404 unittest.expect(o.instanceClass, unittest.equals('foo'));
1305 checkUnnamed3015(o.libraries); 1405 checkUnnamed3737(o.libraries);
1306 checkManualScaling(o.manualScaling); 1406 checkManualScaling(o.manualScaling);
1307 unittest.expect(o.name, unittest.equals('foo')); 1407 unittest.expect(o.name, unittest.equals('foo'));
1308 checkNetwork(o.network); 1408 checkNetwork(o.network);
1309 unittest.expect(o.nobuildFilesRegex, unittest.equals('foo')); 1409 unittest.expect(o.nobuildFilesRegex, unittest.equals('foo'));
1310 checkResources(o.resources); 1410 checkResources(o.resources);
1311 unittest.expect(o.runtime, unittest.equals('foo')); 1411 unittest.expect(o.runtime, unittest.equals('foo'));
1312 unittest.expect(o.servingStatus, unittest.equals('foo')); 1412 unittest.expect(o.servingStatus, unittest.equals('foo'));
1313 unittest.expect(o.threadsafe, unittest.isTrue); 1413 unittest.expect(o.threadsafe, unittest.isTrue);
1314 unittest.expect(o.vm, unittest.isTrue); 1414 unittest.expect(o.vm, unittest.isTrue);
1315 } 1415 }
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
1374 1474
1375 unittest.group("obj-schema-CpuUtilization", () { 1475 unittest.group("obj-schema-CpuUtilization", () {
1376 unittest.test("to-json--from-json", () { 1476 unittest.test("to-json--from-json", () {
1377 var o = buildCpuUtilization(); 1477 var o = buildCpuUtilization();
1378 var od = new api.CpuUtilization.fromJson(o.toJson()); 1478 var od = new api.CpuUtilization.fromJson(o.toJson());
1379 checkCpuUtilization(od); 1479 checkCpuUtilization(od);
1380 }); 1480 });
1381 }); 1481 });
1382 1482
1383 1483
1484 unittest.group("obj-schema-DebugInstanceRequest", () {
1485 unittest.test("to-json--from-json", () {
1486 var o = buildDebugInstanceRequest();
1487 var od = new api.DebugInstanceRequest.fromJson(o.toJson());
1488 checkDebugInstanceRequest(od);
1489 });
1490 });
1491
1492
1384 unittest.group("obj-schema-Deployment", () { 1493 unittest.group("obj-schema-Deployment", () {
1385 unittest.test("to-json--from-json", () { 1494 unittest.test("to-json--from-json", () {
1386 var o = buildDeployment(); 1495 var o = buildDeployment();
1387 var od = new api.Deployment.fromJson(o.toJson()); 1496 var od = new api.Deployment.fromJson(o.toJson());
1388 checkDeployment(od); 1497 checkDeployment(od);
1389 }); 1498 });
1390 }); 1499 });
1391 1500
1392 1501
1393 unittest.group("obj-schema-DiskUtilization", () { 1502 unittest.group("obj-schema-DiskUtilization", () {
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
1446 1555
1447 unittest.group("obj-schema-ListInstancesResponse", () { 1556 unittest.group("obj-schema-ListInstancesResponse", () {
1448 unittest.test("to-json--from-json", () { 1557 unittest.test("to-json--from-json", () {
1449 var o = buildListInstancesResponse(); 1558 var o = buildListInstancesResponse();
1450 var od = new api.ListInstancesResponse.fromJson(o.toJson()); 1559 var od = new api.ListInstancesResponse.fromJson(o.toJson());
1451 checkListInstancesResponse(od); 1560 checkListInstancesResponse(od);
1452 }); 1561 });
1453 }); 1562 });
1454 1563
1455 1564
1565 unittest.group("obj-schema-ListLocationsResponse", () {
1566 unittest.test("to-json--from-json", () {
1567 var o = buildListLocationsResponse();
1568 var od = new api.ListLocationsResponse.fromJson(o.toJson());
1569 checkListLocationsResponse(od);
1570 });
1571 });
1572
1573
1456 unittest.group("obj-schema-ListModulesResponse", () { 1574 unittest.group("obj-schema-ListModulesResponse", () {
1457 unittest.test("to-json--from-json", () { 1575 unittest.test("to-json--from-json", () {
1458 var o = buildListModulesResponse(); 1576 var o = buildListModulesResponse();
1459 var od = new api.ListModulesResponse.fromJson(o.toJson()); 1577 var od = new api.ListModulesResponse.fromJson(o.toJson());
1460 checkListModulesResponse(od); 1578 checkListModulesResponse(od);
1461 }); 1579 });
1462 }); 1580 });
1463 1581
1464 1582
1465 unittest.group("obj-schema-ListOperationsResponse", () { 1583 unittest.group("obj-schema-ListOperationsResponse", () {
1466 unittest.test("to-json--from-json", () { 1584 unittest.test("to-json--from-json", () {
1467 var o = buildListOperationsResponse(); 1585 var o = buildListOperationsResponse();
1468 var od = new api.ListOperationsResponse.fromJson(o.toJson()); 1586 var od = new api.ListOperationsResponse.fromJson(o.toJson());
1469 checkListOperationsResponse(od); 1587 checkListOperationsResponse(od);
1470 }); 1588 });
1471 }); 1589 });
1472 1590
1473 1591
1474 unittest.group("obj-schema-ListVersionsResponse", () { 1592 unittest.group("obj-schema-ListVersionsResponse", () {
1475 unittest.test("to-json--from-json", () { 1593 unittest.test("to-json--from-json", () {
1476 var o = buildListVersionsResponse(); 1594 var o = buildListVersionsResponse();
1477 var od = new api.ListVersionsResponse.fromJson(o.toJson()); 1595 var od = new api.ListVersionsResponse.fromJson(o.toJson());
1478 checkListVersionsResponse(od); 1596 checkListVersionsResponse(od);
1479 }); 1597 });
1480 }); 1598 });
1481 1599
1482 1600
1601 unittest.group("obj-schema-Location", () {
1602 unittest.test("to-json--from-json", () {
1603 var o = buildLocation();
1604 var od = new api.Location.fromJson(o.toJson());
1605 checkLocation(od);
1606 });
1607 });
1608
1609
1483 unittest.group("obj-schema-LocationMetadata", () { 1610 unittest.group("obj-schema-LocationMetadata", () {
1484 unittest.test("to-json--from-json", () { 1611 unittest.test("to-json--from-json", () {
1485 var o = buildLocationMetadata(); 1612 var o = buildLocationMetadata();
1486 var od = new api.LocationMetadata.fromJson(o.toJson()); 1613 var od = new api.LocationMetadata.fromJson(o.toJson());
1487 checkLocationMetadata(od); 1614 checkLocationMetadata(od);
1488 }); 1615 });
1489 }); 1616 });
1490 1617
1491 1618
1492 unittest.group("obj-schema-ManualScaling", () { 1619 unittest.group("obj-schema-ManualScaling", () {
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
1654 unittest.group("obj-schema-Version", () { 1781 unittest.group("obj-schema-Version", () {
1655 unittest.test("to-json--from-json", () { 1782 unittest.test("to-json--from-json", () {
1656 var o = buildVersion(); 1783 var o = buildVersion();
1657 var od = new api.Version.fromJson(o.toJson()); 1784 var od = new api.Version.fromJson(o.toJson());
1658 checkVersion(od); 1785 checkVersion(od);
1659 }); 1786 });
1660 }); 1787 });
1661 1788
1662 1789
1663 unittest.group("resource-AppsResourceApi", () { 1790 unittest.group("resource-AppsResourceApi", () {
1791 unittest.test("method--create", () {
1792
1793 var mock = new HttpServerMock();
1794 api.AppsResourceApi res = new api.AppengineApi(mock).apps;
1795 var arg_request = buildApplication();
1796 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
1797 var obj = new api.Application.fromJson(json);
1798 checkApplication(obj);
1799
1800 var path = (req.url).path;
1801 var pathOffset = 0;
1802 var index;
1803 var subPart;
1804 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
1805 pathOffset += 1;
1806 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq uals("v1beta4/apps"));
1807 pathOffset += 12;
1808
1809 var query = (req.url).query;
1810 var queryOffset = 0;
1811 var queryMap = {};
1812 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
1813 parseBool(n) {
1814 if (n == "true") return true;
1815 if (n == "false") return false;
1816 if (n == null) return null;
1817 throw new core.ArgumentError("Invalid boolean: $n");
1818 }
1819 if (query.length > 0) {
1820 for (var part in query.split("&")) {
1821 var keyvalue = part.split("=");
1822 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
1823 }
1824 }
1825
1826
1827 var h = {
1828 "content-type" : "application/json; charset=utf-8",
1829 };
1830 var resp = convert.JSON.encode(buildOperation());
1831 return new async.Future.value(stringResponse(200, h, resp));
1832 }), true);
1833 res.create(arg_request).then(unittest.expectAsync(((api.Operation response ) {
1834 checkOperation(response);
1835 })));
1836 });
1837
1664 unittest.test("method--get", () { 1838 unittest.test("method--get", () {
1665 1839
1666 var mock = new HttpServerMock(); 1840 var mock = new HttpServerMock();
1667 api.AppsResourceApi res = new api.AppengineApi(mock).apps; 1841 api.AppsResourceApi res = new api.AppengineApi(mock).apps;
1668 var arg_appsId = "foo"; 1842 var arg_appsId = "foo";
1669 var arg_ensureResourcesExist = true; 1843 var arg_ensureResourcesExist = true;
1670 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 1844 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
1671 var path = (req.url).path; 1845 var path = (req.url).path;
1672 var pathOffset = 0; 1846 var pathOffset = 0;
1673 var index; 1847 var index;
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
1706 return new async.Future.value(stringResponse(200, h, resp)); 1880 return new async.Future.value(stringResponse(200, h, resp));
1707 }), true); 1881 }), true);
1708 res.get(arg_appsId, ensureResourcesExist: arg_ensureResourcesExist).then(u nittest.expectAsync(((api.Application response) { 1882 res.get(arg_appsId, ensureResourcesExist: arg_ensureResourcesExist).then(u nittest.expectAsync(((api.Application response) {
1709 checkApplication(response); 1883 checkApplication(response);
1710 }))); 1884 })));
1711 }); 1885 });
1712 1886
1713 }); 1887 });
1714 1888
1715 1889
1890 unittest.group("resource-AppsLocationsResourceApi", () {
1891 unittest.test("method--get", () {
1892
1893 var mock = new HttpServerMock();
1894 api.AppsLocationsResourceApi res = new api.AppengineApi(mock).apps.locatio ns;
1895 var arg_appsId = "foo";
1896 var arg_locationsId = "foo";
1897 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
1898 var path = (req.url).path;
1899 var pathOffset = 0;
1900 var index;
1901 var subPart;
1902 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
1903 pathOffset += 1;
1904 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq uals("v1beta4/apps/"));
1905 pathOffset += 13;
1906 index = path.indexOf("/locations/", pathOffset);
1907 unittest.expect(index >= 0, unittest.isTrue);
1908 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index ));
1909 pathOffset = index;
1910 unittest.expect(subPart, unittest.equals("$arg_appsId"));
1911 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq uals("/locations/"));
1912 pathOffset += 11;
1913 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset));
1914 pathOffset = path.length;
1915 unittest.expect(subPart, unittest.equals("$arg_locationsId"));
1916
1917 var query = (req.url).query;
1918 var queryOffset = 0;
1919 var queryMap = {};
1920 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
1921 parseBool(n) {
1922 if (n == "true") return true;
1923 if (n == "false") return false;
1924 if (n == null) return null;
1925 throw new core.ArgumentError("Invalid boolean: $n");
1926 }
1927 if (query.length > 0) {
1928 for (var part in query.split("&")) {
1929 var keyvalue = part.split("=");
1930 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
1931 }
1932 }
1933
1934
1935 var h = {
1936 "content-type" : "application/json; charset=utf-8",
1937 };
1938 var resp = convert.JSON.encode(buildLocation());
1939 return new async.Future.value(stringResponse(200, h, resp));
1940 }), true);
1941 res.get(arg_appsId, arg_locationsId).then(unittest.expectAsync(((api.Locat ion response) {
1942 checkLocation(response);
1943 })));
1944 });
1945
1946 unittest.test("method--list", () {
1947
1948 var mock = new HttpServerMock();
1949 api.AppsLocationsResourceApi res = new api.AppengineApi(mock).apps.locatio ns;
1950 var arg_appsId = "foo";
1951 var arg_filter = "foo";
1952 var arg_pageSize = 42;
1953 var arg_pageToken = "foo";
1954 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
1955 var path = (req.url).path;
1956 var pathOffset = 0;
1957 var index;
1958 var subPart;
1959 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
1960 pathOffset += 1;
1961 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq uals("v1beta4/apps/"));
1962 pathOffset += 13;
1963 index = path.indexOf("/locations", pathOffset);
1964 unittest.expect(index >= 0, unittest.isTrue);
1965 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index ));
1966 pathOffset = index;
1967 unittest.expect(subPart, unittest.equals("$arg_appsId"));
1968 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq uals("/locations"));
1969 pathOffset += 10;
1970
1971 var query = (req.url).query;
1972 var queryOffset = 0;
1973 var queryMap = {};
1974 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
1975 parseBool(n) {
1976 if (n == "true") return true;
1977 if (n == "false") return false;
1978 if (n == null) return null;
1979 throw new core.ArgumentError("Invalid boolean: $n");
1980 }
1981 if (query.length > 0) {
1982 for (var part in query.split("&")) {
1983 var keyvalue = part.split("=");
1984 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
1985 }
1986 }
1987 unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter));
1988 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ als(arg_pageSize));
1989 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en));
1990
1991
1992 var h = {
1993 "content-type" : "application/json; charset=utf-8",
1994 };
1995 var resp = convert.JSON.encode(buildListLocationsResponse());
1996 return new async.Future.value(stringResponse(200, h, resp));
1997 }), true);
1998 res.list(arg_appsId, filter: arg_filter, pageSize: arg_pageSize, pageToken : arg_pageToken).then(unittest.expectAsync(((api.ListLocationsResponse response) {
1999 checkListLocationsResponse(response);
2000 })));
2001 });
2002
2003 });
2004
2005
1716 unittest.group("resource-AppsModulesResourceApi", () { 2006 unittest.group("resource-AppsModulesResourceApi", () {
1717 unittest.test("method--delete", () { 2007 unittest.test("method--delete", () {
1718 2008
1719 var mock = new HttpServerMock(); 2009 var mock = new HttpServerMock();
1720 api.AppsModulesResourceApi res = new api.AppengineApi(mock).apps.modules; 2010 api.AppsModulesResourceApi res = new api.AppengineApi(mock).apps.modules;
1721 var arg_appsId = "foo"; 2011 var arg_appsId = "foo";
1722 var arg_modulesId = "foo"; 2012 var arg_modulesId = "foo";
1723 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 2013 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
1724 var path = (req.url).path; 2014 var path = (req.url).path;
1725 var pathOffset = 0; 2015 var pathOffset = 0;
(...skipping 542 matching lines...) Expand 10 before | Expand all | Expand 10 after
2268 }), true); 2558 }), true);
2269 res.patch(arg_request, arg_appsId, arg_modulesId, arg_versionsId, mask: ar g_mask).then(unittest.expectAsync(((api.Operation response) { 2559 res.patch(arg_request, arg_appsId, arg_modulesId, arg_versionsId, mask: ar g_mask).then(unittest.expectAsync(((api.Operation response) {
2270 checkOperation(response); 2560 checkOperation(response);
2271 }))); 2561 })));
2272 }); 2562 });
2273 2563
2274 }); 2564 });
2275 2565
2276 2566
2277 unittest.group("resource-AppsModulesVersionsInstancesResourceApi", () { 2567 unittest.group("resource-AppsModulesVersionsInstancesResourceApi", () {
2568 unittest.test("method--debug", () {
2569
2570 var mock = new HttpServerMock();
2571 api.AppsModulesVersionsInstancesResourceApi res = new api.AppengineApi(moc k).apps.modules.versions.instances;
2572 var arg_request = buildDebugInstanceRequest();
2573 var arg_appsId = "foo";
2574 var arg_modulesId = "foo";
2575 var arg_versionsId = "foo";
2576 var arg_instancesId = "foo";
2577 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
2578 var obj = new api.DebugInstanceRequest.fromJson(json);
2579 checkDebugInstanceRequest(obj);
2580
2581 var path = (req.url).path;
2582 var pathOffset = 0;
2583 var index;
2584 var subPart;
2585 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
2586 pathOffset += 1;
2587 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq uals("v1beta4/apps/"));
2588 pathOffset += 13;
2589 index = path.indexOf("/modules/", pathOffset);
2590 unittest.expect(index >= 0, unittest.isTrue);
2591 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index ));
2592 pathOffset = index;
2593 unittest.expect(subPart, unittest.equals("$arg_appsId"));
2594 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("/modules/"));
2595 pathOffset += 9;
2596 index = path.indexOf("/versions/", pathOffset);
2597 unittest.expect(index >= 0, unittest.isTrue);
2598 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index ));
2599 pathOffset = index;
2600 unittest.expect(subPart, unittest.equals("$arg_modulesId"));
2601 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq uals("/versions/"));
2602 pathOffset += 10;
2603 index = path.indexOf("/instances/", pathOffset);
2604 unittest.expect(index >= 0, unittest.isTrue);
2605 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index ));
2606 pathOffset = index;
2607 unittest.expect(subPart, unittest.equals("$arg_versionsId"));
2608 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq uals("/instances/"));
2609 pathOffset += 11;
2610 index = path.indexOf(":debug", pathOffset);
2611 unittest.expect(index >= 0, unittest.isTrue);
2612 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index ));
2613 pathOffset = index;
2614 unittest.expect(subPart, unittest.equals("$arg_instancesId"));
2615 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ als(":debug"));
2616 pathOffset += 6;
2617
2618 var query = (req.url).query;
2619 var queryOffset = 0;
2620 var queryMap = {};
2621 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
2622 parseBool(n) {
2623 if (n == "true") return true;
2624 if (n == "false") return false;
2625 if (n == null) return null;
2626 throw new core.ArgumentError("Invalid boolean: $n");
2627 }
2628 if (query.length > 0) {
2629 for (var part in query.split("&")) {
2630 var keyvalue = part.split("=");
2631 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
2632 }
2633 }
2634
2635
2636 var h = {
2637 "content-type" : "application/json; charset=utf-8",
2638 };
2639 var resp = convert.JSON.encode(buildOperation());
2640 return new async.Future.value(stringResponse(200, h, resp));
2641 }), true);
2642 res.debug(arg_request, arg_appsId, arg_modulesId, arg_versionsId, arg_inst ancesId).then(unittest.expectAsync(((api.Operation response) {
2643 checkOperation(response);
2644 })));
2645 });
2646
2647 unittest.test("method--delete", () {
2648
2649 var mock = new HttpServerMock();
2650 api.AppsModulesVersionsInstancesResourceApi res = new api.AppengineApi(moc k).apps.modules.versions.instances;
2651 var arg_appsId = "foo";
2652 var arg_modulesId = "foo";
2653 var arg_versionsId = "foo";
2654 var arg_instancesId = "foo";
2655 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
2656 var path = (req.url).path;
2657 var pathOffset = 0;
2658 var index;
2659 var subPart;
2660 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
2661 pathOffset += 1;
2662 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq uals("v1beta4/apps/"));
2663 pathOffset += 13;
2664 index = path.indexOf("/modules/", pathOffset);
2665 unittest.expect(index >= 0, unittest.isTrue);
2666 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index ));
2667 pathOffset = index;
2668 unittest.expect(subPart, unittest.equals("$arg_appsId"));
2669 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("/modules/"));
2670 pathOffset += 9;
2671 index = path.indexOf("/versions/", pathOffset);
2672 unittest.expect(index >= 0, unittest.isTrue);
2673 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index ));
2674 pathOffset = index;
2675 unittest.expect(subPart, unittest.equals("$arg_modulesId"));
2676 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq uals("/versions/"));
2677 pathOffset += 10;
2678 index = path.indexOf("/instances/", pathOffset);
2679 unittest.expect(index >= 0, unittest.isTrue);
2680 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index ));
2681 pathOffset = index;
2682 unittest.expect(subPart, unittest.equals("$arg_versionsId"));
2683 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq uals("/instances/"));
2684 pathOffset += 11;
2685 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset));
2686 pathOffset = path.length;
2687 unittest.expect(subPart, unittest.equals("$arg_instancesId"));
2688
2689 var query = (req.url).query;
2690 var queryOffset = 0;
2691 var queryMap = {};
2692 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
2693 parseBool(n) {
2694 if (n == "true") return true;
2695 if (n == "false") return false;
2696 if (n == null) return null;
2697 throw new core.ArgumentError("Invalid boolean: $n");
2698 }
2699 if (query.length > 0) {
2700 for (var part in query.split("&")) {
2701 var keyvalue = part.split("=");
2702 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
2703 }
2704 }
2705
2706
2707 var h = {
2708 "content-type" : "application/json; charset=utf-8",
2709 };
2710 var resp = convert.JSON.encode(buildOperation());
2711 return new async.Future.value(stringResponse(200, h, resp));
2712 }), true);
2713 res.delete(arg_appsId, arg_modulesId, arg_versionsId, arg_instancesId).the n(unittest.expectAsync(((api.Operation response) {
2714 checkOperation(response);
2715 })));
2716 });
2717
2718 unittest.test("method--get", () {
2719
2720 var mock = new HttpServerMock();
2721 api.AppsModulesVersionsInstancesResourceApi res = new api.AppengineApi(moc k).apps.modules.versions.instances;
2722 var arg_appsId = "foo";
2723 var arg_modulesId = "foo";
2724 var arg_versionsId = "foo";
2725 var arg_instancesId = "foo";
2726 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
2727 var path = (req.url).path;
2728 var pathOffset = 0;
2729 var index;
2730 var subPart;
2731 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
2732 pathOffset += 1;
2733 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq uals("v1beta4/apps/"));
2734 pathOffset += 13;
2735 index = path.indexOf("/modules/", pathOffset);
2736 unittest.expect(index >= 0, unittest.isTrue);
2737 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index ));
2738 pathOffset = index;
2739 unittest.expect(subPart, unittest.equals("$arg_appsId"));
2740 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("/modules/"));
2741 pathOffset += 9;
2742 index = path.indexOf("/versions/", pathOffset);
2743 unittest.expect(index >= 0, unittest.isTrue);
2744 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index ));
2745 pathOffset = index;
2746 unittest.expect(subPart, unittest.equals("$arg_modulesId"));
2747 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq uals("/versions/"));
2748 pathOffset += 10;
2749 index = path.indexOf("/instances/", pathOffset);
2750 unittest.expect(index >= 0, unittest.isTrue);
2751 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index ));
2752 pathOffset = index;
2753 unittest.expect(subPart, unittest.equals("$arg_versionsId"));
2754 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq uals("/instances/"));
2755 pathOffset += 11;
2756 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset));
2757 pathOffset = path.length;
2758 unittest.expect(subPart, unittest.equals("$arg_instancesId"));
2759
2760 var query = (req.url).query;
2761 var queryOffset = 0;
2762 var queryMap = {};
2763 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
2764 parseBool(n) {
2765 if (n == "true") return true;
2766 if (n == "false") return false;
2767 if (n == null) return null;
2768 throw new core.ArgumentError("Invalid boolean: $n");
2769 }
2770 if (query.length > 0) {
2771 for (var part in query.split("&")) {
2772 var keyvalue = part.split("=");
2773 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
2774 }
2775 }
2776
2777
2778 var h = {
2779 "content-type" : "application/json; charset=utf-8",
2780 };
2781 var resp = convert.JSON.encode(buildInstance());
2782 return new async.Future.value(stringResponse(200, h, resp));
2783 }), true);
2784 res.get(arg_appsId, arg_modulesId, arg_versionsId, arg_instancesId).then(u nittest.expectAsync(((api.Instance response) {
2785 checkInstance(response);
2786 })));
2787 });
2788
2278 unittest.test("method--list", () { 2789 unittest.test("method--list", () {
2279 2790
2280 var mock = new HttpServerMock(); 2791 var mock = new HttpServerMock();
2281 api.AppsModulesVersionsInstancesResourceApi res = new api.AppengineApi(moc k).apps.modules.versions.instances; 2792 api.AppsModulesVersionsInstancesResourceApi res = new api.AppengineApi(moc k).apps.modules.versions.instances;
2282 var arg_appsId = "foo"; 2793 var arg_appsId = "foo";
2283 var arg_modulesId = "foo"; 2794 var arg_modulesId = "foo";
2284 var arg_versionsId = "foo"; 2795 var arg_versionsId = "foo";
2285 var arg_pageSize = 42; 2796 var arg_pageSize = 42;
2286 var arg_pageToken = "foo"; 2797 var arg_pageToken = "foo";
2287 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 2798 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
2460 res.list(arg_appsId, filter: arg_filter, pageSize: arg_pageSize, pageToken : arg_pageToken).then(unittest.expectAsync(((api.ListOperationsResponse response ) { 2971 res.list(arg_appsId, filter: arg_filter, pageSize: arg_pageSize, pageToken : arg_pageToken).then(unittest.expectAsync(((api.ListOperationsResponse response ) {
2461 checkListOperationsResponse(response); 2972 checkListOperationsResponse(response);
2462 }))); 2973 })));
2463 }); 2974 });
2464 2975
2465 }); 2976 });
2466 2977
2467 2978
2468 } 2979 }
2469 2980
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698