OLD | NEW |
1 library googleapis.appengine.v1.test; | 1 library googleapis.appengine.v1.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:test/test.dart' as unittest; |
11 | 11 |
12 import 'package:googleapis/appengine/v1.dart' as api; | 12 import 'package:googleapis/appengine/v1.dart' as api; |
13 | 13 |
14 class HttpServerMock extends http.BaseClient { | 14 class HttpServerMock extends http.BaseClient { |
15 core.Function _callback; | 15 core.Function _callback; |
16 core.bool _expectJson; | 16 core.bool _expectJson; |
17 | 17 |
18 void register(core.Function callback, core.bool expectJson) { | 18 void register(core.Function callback, core.bool expectJson) { |
19 _callback = callback; | 19 _callback = callback; |
20 _expectJson = expectJson; | 20 _expectJson = expectJson; |
(...skipping 18 matching lines...) Expand all Loading... |
39 } else { | 39 } else { |
40 return stream.toBytes().then((data) { | 40 return stream.toBytes().then((data) { |
41 return _callback(request, data); | 41 return _callback(request, data); |
42 }); | 42 }); |
43 } | 43 } |
44 } | 44 } |
45 } | 45 } |
46 } | 46 } |
47 | 47 |
48 http.StreamedResponse stringResponse( | 48 http.StreamedResponse stringResponse( |
49 core.int status, core.Map headers, core.String body) { | 49 core.int status, core.Map<core.String, core.String> headers, core.String bod
y) { |
50 var stream = new async.Stream.fromIterable([convert.UTF8.encode(body)]); | 50 var stream = new async.Stream.fromIterable([convert.UTF8.encode(body)]); |
51 return new http.StreamedResponse(stream, status, headers: headers); | 51 return new http.StreamedResponse(stream, status, headers: headers); |
52 } | 52 } |
53 | 53 |
54 core.int buildCounterApiConfigHandler = 0; | 54 core.int buildCounterApiConfigHandler = 0; |
55 buildApiConfigHandler() { | 55 buildApiConfigHandler() { |
56 var o = new api.ApiConfigHandler(); | 56 var o = new api.ApiConfigHandler(); |
57 buildCounterApiConfigHandler++; | 57 buildCounterApiConfigHandler++; |
58 if (buildCounterApiConfigHandler < 3) { | 58 if (buildCounterApiConfigHandler < 3) { |
59 o.authFailAction = "foo"; | 59 o.authFailAction = "foo"; |
(...skipping 30 matching lines...) Expand all Loading... |
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 buildUnnamed3054() { | 100 buildUnnamed2524() { |
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 checkUnnamed3054(core.List<api.UrlDispatchRule> o) { | 107 checkUnnamed2524(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 = buildUnnamed3054(); | 123 o.dispatchRules = buildUnnamed2524(); |
124 o.gcrDomain = "foo"; | 124 o.gcrDomain = "foo"; |
125 o.iap = buildIdentityAwareProxy(); | 125 o.iap = buildIdentityAwareProxy(); |
126 o.id = "foo"; | 126 o.id = "foo"; |
127 o.locationId = "foo"; | 127 o.locationId = "foo"; |
128 o.name = "foo"; | 128 o.name = "foo"; |
129 o.servingStatus = "foo"; | 129 o.servingStatus = "foo"; |
130 } | 130 } |
131 buildCounterApplication--; | 131 buildCounterApplication--; |
132 return o; | 132 return o; |
133 } | 133 } |
134 | 134 |
135 checkApplication(api.Application o) { | 135 checkApplication(api.Application o) { |
136 buildCounterApplication++; | 136 buildCounterApplication++; |
137 if (buildCounterApplication < 3) { | 137 if (buildCounterApplication < 3) { |
138 unittest.expect(o.authDomain, unittest.equals('foo')); | 138 unittest.expect(o.authDomain, unittest.equals('foo')); |
139 unittest.expect(o.codeBucket, unittest.equals('foo')); | 139 unittest.expect(o.codeBucket, unittest.equals('foo')); |
140 unittest.expect(o.defaultBucket, unittest.equals('foo')); | 140 unittest.expect(o.defaultBucket, unittest.equals('foo')); |
141 unittest.expect(o.defaultCookieExpiration, unittest.equals('foo')); | 141 unittest.expect(o.defaultCookieExpiration, unittest.equals('foo')); |
142 unittest.expect(o.defaultHostname, unittest.equals('foo')); | 142 unittest.expect(o.defaultHostname, unittest.equals('foo')); |
143 checkUnnamed3054(o.dispatchRules); | 143 checkUnnamed2524(o.dispatchRules); |
144 unittest.expect(o.gcrDomain, unittest.equals('foo')); | 144 unittest.expect(o.gcrDomain, unittest.equals('foo')); |
145 checkIdentityAwareProxy(o.iap); | 145 checkIdentityAwareProxy(o.iap); |
146 unittest.expect(o.id, unittest.equals('foo')); | 146 unittest.expect(o.id, unittest.equals('foo')); |
147 unittest.expect(o.locationId, unittest.equals('foo')); | 147 unittest.expect(o.locationId, unittest.equals('foo')); |
148 unittest.expect(o.name, unittest.equals('foo')); | 148 unittest.expect(o.name, unittest.equals('foo')); |
149 unittest.expect(o.servingStatus, unittest.equals('foo')); | 149 unittest.expect(o.servingStatus, unittest.equals('foo')); |
150 } | 150 } |
151 buildCounterApplication--; | 151 buildCounterApplication--; |
152 } | 152 } |
153 | 153 |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
265 } | 265 } |
266 | 266 |
267 checkDebugInstanceRequest(api.DebugInstanceRequest o) { | 267 checkDebugInstanceRequest(api.DebugInstanceRequest o) { |
268 buildCounterDebugInstanceRequest++; | 268 buildCounterDebugInstanceRequest++; |
269 if (buildCounterDebugInstanceRequest < 3) { | 269 if (buildCounterDebugInstanceRequest < 3) { |
270 unittest.expect(o.sshKey, unittest.equals('foo')); | 270 unittest.expect(o.sshKey, unittest.equals('foo')); |
271 } | 271 } |
272 buildCounterDebugInstanceRequest--; | 272 buildCounterDebugInstanceRequest--; |
273 } | 273 } |
274 | 274 |
275 buildUnnamed3055() { | 275 buildUnnamed2525() { |
276 var o = new core.Map<core.String, api.FileInfo>(); | 276 var o = new core.Map<core.String, api.FileInfo>(); |
277 o["x"] = buildFileInfo(); | 277 o["x"] = buildFileInfo(); |
278 o["y"] = buildFileInfo(); | 278 o["y"] = buildFileInfo(); |
279 return o; | 279 return o; |
280 } | 280 } |
281 | 281 |
282 checkUnnamed3055(core.Map<core.String, api.FileInfo> o) { | 282 checkUnnamed2525(core.Map<core.String, api.FileInfo> o) { |
283 unittest.expect(o, unittest.hasLength(2)); | 283 unittest.expect(o, unittest.hasLength(2)); |
284 checkFileInfo(o["x"]); | 284 checkFileInfo(o["x"]); |
285 checkFileInfo(o["y"]); | 285 checkFileInfo(o["y"]); |
286 } | 286 } |
287 | 287 |
288 core.int buildCounterDeployment = 0; | 288 core.int buildCounterDeployment = 0; |
289 buildDeployment() { | 289 buildDeployment() { |
290 var o = new api.Deployment(); | 290 var o = new api.Deployment(); |
291 buildCounterDeployment++; | 291 buildCounterDeployment++; |
292 if (buildCounterDeployment < 3) { | 292 if (buildCounterDeployment < 3) { |
293 o.container = buildContainerInfo(); | 293 o.container = buildContainerInfo(); |
294 o.files = buildUnnamed3055(); | 294 o.files = buildUnnamed2525(); |
295 o.zip = buildZipInfo(); | 295 o.zip = buildZipInfo(); |
296 } | 296 } |
297 buildCounterDeployment--; | 297 buildCounterDeployment--; |
298 return o; | 298 return o; |
299 } | 299 } |
300 | 300 |
301 checkDeployment(api.Deployment o) { | 301 checkDeployment(api.Deployment o) { |
302 buildCounterDeployment++; | 302 buildCounterDeployment++; |
303 if (buildCounterDeployment < 3) { | 303 if (buildCounterDeployment < 3) { |
304 checkContainerInfo(o.container); | 304 checkContainerInfo(o.container); |
305 checkUnnamed3055(o.files); | 305 checkUnnamed2525(o.files); |
306 checkZipInfo(o.zip); | 306 checkZipInfo(o.zip); |
307 } | 307 } |
308 buildCounterDeployment--; | 308 buildCounterDeployment--; |
309 } | 309 } |
310 | 310 |
311 core.int buildCounterDiskUtilization = 0; | 311 core.int buildCounterDiskUtilization = 0; |
312 buildDiskUtilization() { | 312 buildDiskUtilization() { |
313 var o = new api.DiskUtilization(); | 313 var o = new api.DiskUtilization(); |
314 buildCounterDiskUtilization++; | 314 buildCounterDiskUtilization++; |
315 if (buildCounterDiskUtilization < 3) { | 315 if (buildCounterDiskUtilization < 3) { |
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
519 | 519 |
520 checkLibrary(api.Library o) { | 520 checkLibrary(api.Library o) { |
521 buildCounterLibrary++; | 521 buildCounterLibrary++; |
522 if (buildCounterLibrary < 3) { | 522 if (buildCounterLibrary < 3) { |
523 unittest.expect(o.name, unittest.equals('foo')); | 523 unittest.expect(o.name, unittest.equals('foo')); |
524 unittest.expect(o.version, unittest.equals('foo')); | 524 unittest.expect(o.version, unittest.equals('foo')); |
525 } | 525 } |
526 buildCounterLibrary--; | 526 buildCounterLibrary--; |
527 } | 527 } |
528 | 528 |
529 buildUnnamed3056() { | 529 buildUnnamed2526() { |
530 var o = new core.List<api.Instance>(); | 530 var o = new core.List<api.Instance>(); |
531 o.add(buildInstance()); | 531 o.add(buildInstance()); |
532 o.add(buildInstance()); | 532 o.add(buildInstance()); |
533 return o; | 533 return o; |
534 } | 534 } |
535 | 535 |
536 checkUnnamed3056(core.List<api.Instance> o) { | 536 checkUnnamed2526(core.List<api.Instance> o) { |
537 unittest.expect(o, unittest.hasLength(2)); | 537 unittest.expect(o, unittest.hasLength(2)); |
538 checkInstance(o[0]); | 538 checkInstance(o[0]); |
539 checkInstance(o[1]); | 539 checkInstance(o[1]); |
540 } | 540 } |
541 | 541 |
542 core.int buildCounterListInstancesResponse = 0; | 542 core.int buildCounterListInstancesResponse = 0; |
543 buildListInstancesResponse() { | 543 buildListInstancesResponse() { |
544 var o = new api.ListInstancesResponse(); | 544 var o = new api.ListInstancesResponse(); |
545 buildCounterListInstancesResponse++; | 545 buildCounterListInstancesResponse++; |
546 if (buildCounterListInstancesResponse < 3) { | 546 if (buildCounterListInstancesResponse < 3) { |
547 o.instances = buildUnnamed3056(); | 547 o.instances = buildUnnamed2526(); |
548 o.nextPageToken = "foo"; | 548 o.nextPageToken = "foo"; |
549 } | 549 } |
550 buildCounterListInstancesResponse--; | 550 buildCounterListInstancesResponse--; |
551 return o; | 551 return o; |
552 } | 552 } |
553 | 553 |
554 checkListInstancesResponse(api.ListInstancesResponse o) { | 554 checkListInstancesResponse(api.ListInstancesResponse o) { |
555 buildCounterListInstancesResponse++; | 555 buildCounterListInstancesResponse++; |
556 if (buildCounterListInstancesResponse < 3) { | 556 if (buildCounterListInstancesResponse < 3) { |
557 checkUnnamed3056(o.instances); | 557 checkUnnamed2526(o.instances); |
558 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 558 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
559 } | 559 } |
560 buildCounterListInstancesResponse--; | 560 buildCounterListInstancesResponse--; |
561 } | 561 } |
562 | 562 |
563 buildUnnamed3057() { | 563 buildUnnamed2527() { |
564 var o = new core.List<api.Location>(); | 564 var o = new core.List<api.Location>(); |
565 o.add(buildLocation()); | 565 o.add(buildLocation()); |
566 o.add(buildLocation()); | 566 o.add(buildLocation()); |
567 return o; | 567 return o; |
568 } | 568 } |
569 | 569 |
570 checkUnnamed3057(core.List<api.Location> o) { | 570 checkUnnamed2527(core.List<api.Location> o) { |
571 unittest.expect(o, unittest.hasLength(2)); | 571 unittest.expect(o, unittest.hasLength(2)); |
572 checkLocation(o[0]); | 572 checkLocation(o[0]); |
573 checkLocation(o[1]); | 573 checkLocation(o[1]); |
574 } | 574 } |
575 | 575 |
576 core.int buildCounterListLocationsResponse = 0; | 576 core.int buildCounterListLocationsResponse = 0; |
577 buildListLocationsResponse() { | 577 buildListLocationsResponse() { |
578 var o = new api.ListLocationsResponse(); | 578 var o = new api.ListLocationsResponse(); |
579 buildCounterListLocationsResponse++; | 579 buildCounterListLocationsResponse++; |
580 if (buildCounterListLocationsResponse < 3) { | 580 if (buildCounterListLocationsResponse < 3) { |
581 o.locations = buildUnnamed3057(); | 581 o.locations = buildUnnamed2527(); |
582 o.nextPageToken = "foo"; | 582 o.nextPageToken = "foo"; |
583 } | 583 } |
584 buildCounterListLocationsResponse--; | 584 buildCounterListLocationsResponse--; |
585 return o; | 585 return o; |
586 } | 586 } |
587 | 587 |
588 checkListLocationsResponse(api.ListLocationsResponse o) { | 588 checkListLocationsResponse(api.ListLocationsResponse o) { |
589 buildCounterListLocationsResponse++; | 589 buildCounterListLocationsResponse++; |
590 if (buildCounterListLocationsResponse < 3) { | 590 if (buildCounterListLocationsResponse < 3) { |
591 checkUnnamed3057(o.locations); | 591 checkUnnamed2527(o.locations); |
592 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 592 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
593 } | 593 } |
594 buildCounterListLocationsResponse--; | 594 buildCounterListLocationsResponse--; |
595 } | 595 } |
596 | 596 |
597 buildUnnamed3058() { | 597 buildUnnamed2528() { |
598 var o = new core.List<api.Operation>(); | 598 var o = new core.List<api.Operation>(); |
599 o.add(buildOperation()); | 599 o.add(buildOperation()); |
600 o.add(buildOperation()); | 600 o.add(buildOperation()); |
601 return o; | 601 return o; |
602 } | 602 } |
603 | 603 |
604 checkUnnamed3058(core.List<api.Operation> o) { | 604 checkUnnamed2528(core.List<api.Operation> o) { |
605 unittest.expect(o, unittest.hasLength(2)); | 605 unittest.expect(o, unittest.hasLength(2)); |
606 checkOperation(o[0]); | 606 checkOperation(o[0]); |
607 checkOperation(o[1]); | 607 checkOperation(o[1]); |
608 } | 608 } |
609 | 609 |
610 core.int buildCounterListOperationsResponse = 0; | 610 core.int buildCounterListOperationsResponse = 0; |
611 buildListOperationsResponse() { | 611 buildListOperationsResponse() { |
612 var o = new api.ListOperationsResponse(); | 612 var o = new api.ListOperationsResponse(); |
613 buildCounterListOperationsResponse++; | 613 buildCounterListOperationsResponse++; |
614 if (buildCounterListOperationsResponse < 3) { | 614 if (buildCounterListOperationsResponse < 3) { |
615 o.nextPageToken = "foo"; | 615 o.nextPageToken = "foo"; |
616 o.operations = buildUnnamed3058(); | 616 o.operations = buildUnnamed2528(); |
617 } | 617 } |
618 buildCounterListOperationsResponse--; | 618 buildCounterListOperationsResponse--; |
619 return o; | 619 return o; |
620 } | 620 } |
621 | 621 |
622 checkListOperationsResponse(api.ListOperationsResponse o) { | 622 checkListOperationsResponse(api.ListOperationsResponse o) { |
623 buildCounterListOperationsResponse++; | 623 buildCounterListOperationsResponse++; |
624 if (buildCounterListOperationsResponse < 3) { | 624 if (buildCounterListOperationsResponse < 3) { |
625 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 625 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
626 checkUnnamed3058(o.operations); | 626 checkUnnamed2528(o.operations); |
627 } | 627 } |
628 buildCounterListOperationsResponse--; | 628 buildCounterListOperationsResponse--; |
629 } | 629 } |
630 | 630 |
631 buildUnnamed3059() { | 631 buildUnnamed2529() { |
632 var o = new core.List<api.Service>(); | 632 var o = new core.List<api.Service>(); |
633 o.add(buildService()); | 633 o.add(buildService()); |
634 o.add(buildService()); | 634 o.add(buildService()); |
635 return o; | 635 return o; |
636 } | 636 } |
637 | 637 |
638 checkUnnamed3059(core.List<api.Service> o) { | 638 checkUnnamed2529(core.List<api.Service> o) { |
639 unittest.expect(o, unittest.hasLength(2)); | 639 unittest.expect(o, unittest.hasLength(2)); |
640 checkService(o[0]); | 640 checkService(o[0]); |
641 checkService(o[1]); | 641 checkService(o[1]); |
642 } | 642 } |
643 | 643 |
644 core.int buildCounterListServicesResponse = 0; | 644 core.int buildCounterListServicesResponse = 0; |
645 buildListServicesResponse() { | 645 buildListServicesResponse() { |
646 var o = new api.ListServicesResponse(); | 646 var o = new api.ListServicesResponse(); |
647 buildCounterListServicesResponse++; | 647 buildCounterListServicesResponse++; |
648 if (buildCounterListServicesResponse < 3) { | 648 if (buildCounterListServicesResponse < 3) { |
649 o.nextPageToken = "foo"; | 649 o.nextPageToken = "foo"; |
650 o.services = buildUnnamed3059(); | 650 o.services = buildUnnamed2529(); |
651 } | 651 } |
652 buildCounterListServicesResponse--; | 652 buildCounterListServicesResponse--; |
653 return o; | 653 return o; |
654 } | 654 } |
655 | 655 |
656 checkListServicesResponse(api.ListServicesResponse o) { | 656 checkListServicesResponse(api.ListServicesResponse o) { |
657 buildCounterListServicesResponse++; | 657 buildCounterListServicesResponse++; |
658 if (buildCounterListServicesResponse < 3) { | 658 if (buildCounterListServicesResponse < 3) { |
659 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 659 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
660 checkUnnamed3059(o.services); | 660 checkUnnamed2529(o.services); |
661 } | 661 } |
662 buildCounterListServicesResponse--; | 662 buildCounterListServicesResponse--; |
663 } | 663 } |
664 | 664 |
665 buildUnnamed3060() { | 665 buildUnnamed2530() { |
666 var o = new core.List<api.Version>(); | 666 var o = new core.List<api.Version>(); |
667 o.add(buildVersion()); | 667 o.add(buildVersion()); |
668 o.add(buildVersion()); | 668 o.add(buildVersion()); |
669 return o; | 669 return o; |
670 } | 670 } |
671 | 671 |
672 checkUnnamed3060(core.List<api.Version> o) { | 672 checkUnnamed2530(core.List<api.Version> o) { |
673 unittest.expect(o, unittest.hasLength(2)); | 673 unittest.expect(o, unittest.hasLength(2)); |
674 checkVersion(o[0]); | 674 checkVersion(o[0]); |
675 checkVersion(o[1]); | 675 checkVersion(o[1]); |
676 } | 676 } |
677 | 677 |
678 core.int buildCounterListVersionsResponse = 0; | 678 core.int buildCounterListVersionsResponse = 0; |
679 buildListVersionsResponse() { | 679 buildListVersionsResponse() { |
680 var o = new api.ListVersionsResponse(); | 680 var o = new api.ListVersionsResponse(); |
681 buildCounterListVersionsResponse++; | 681 buildCounterListVersionsResponse++; |
682 if (buildCounterListVersionsResponse < 3) { | 682 if (buildCounterListVersionsResponse < 3) { |
683 o.nextPageToken = "foo"; | 683 o.nextPageToken = "foo"; |
684 o.versions = buildUnnamed3060(); | 684 o.versions = buildUnnamed2530(); |
685 } | 685 } |
686 buildCounterListVersionsResponse--; | 686 buildCounterListVersionsResponse--; |
687 return o; | 687 return o; |
688 } | 688 } |
689 | 689 |
690 checkListVersionsResponse(api.ListVersionsResponse o) { | 690 checkListVersionsResponse(api.ListVersionsResponse o) { |
691 buildCounterListVersionsResponse++; | 691 buildCounterListVersionsResponse++; |
692 if (buildCounterListVersionsResponse < 3) { | 692 if (buildCounterListVersionsResponse < 3) { |
693 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 693 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
694 checkUnnamed3060(o.versions); | 694 checkUnnamed2530(o.versions); |
695 } | 695 } |
696 buildCounterListVersionsResponse--; | 696 buildCounterListVersionsResponse--; |
697 } | 697 } |
698 | 698 |
699 core.int buildCounterLivenessCheck = 0; | 699 core.int buildCounterLivenessCheck = 0; |
700 buildLivenessCheck() { | 700 buildLivenessCheck() { |
701 var o = new api.LivenessCheck(); | 701 var o = new api.LivenessCheck(); |
702 buildCounterLivenessCheck++; | 702 buildCounterLivenessCheck++; |
703 if (buildCounterLivenessCheck < 3) { | 703 if (buildCounterLivenessCheck < 3) { |
704 o.checkInterval = "foo"; | 704 o.checkInterval = "foo"; |
(...skipping 15 matching lines...) Expand all Loading... |
720 unittest.expect(o.failureThreshold, unittest.equals(42)); | 720 unittest.expect(o.failureThreshold, unittest.equals(42)); |
721 unittest.expect(o.host, unittest.equals('foo')); | 721 unittest.expect(o.host, unittest.equals('foo')); |
722 unittest.expect(o.initialDelay, unittest.equals('foo')); | 722 unittest.expect(o.initialDelay, unittest.equals('foo')); |
723 unittest.expect(o.path, unittest.equals('foo')); | 723 unittest.expect(o.path, unittest.equals('foo')); |
724 unittest.expect(o.successThreshold, unittest.equals(42)); | 724 unittest.expect(o.successThreshold, unittest.equals(42)); |
725 unittest.expect(o.timeout, unittest.equals('foo')); | 725 unittest.expect(o.timeout, unittest.equals('foo')); |
726 } | 726 } |
727 buildCounterLivenessCheck--; | 727 buildCounterLivenessCheck--; |
728 } | 728 } |
729 | 729 |
730 buildUnnamed3061() { | 730 buildUnnamed2531() { |
731 var o = new core.Map<core.String, core.String>(); | 731 var o = new core.Map<core.String, core.String>(); |
732 o["x"] = "foo"; | 732 o["x"] = "foo"; |
733 o["y"] = "foo"; | 733 o["y"] = "foo"; |
734 return o; | 734 return o; |
735 } | 735 } |
736 | 736 |
737 checkUnnamed3061(core.Map<core.String, core.String> o) { | 737 checkUnnamed2531(core.Map<core.String, core.String> o) { |
738 unittest.expect(o, unittest.hasLength(2)); | 738 unittest.expect(o, unittest.hasLength(2)); |
739 unittest.expect(o["x"], unittest.equals('foo')); | 739 unittest.expect(o["x"], unittest.equals('foo')); |
740 unittest.expect(o["y"], unittest.equals('foo')); | 740 unittest.expect(o["y"], unittest.equals('foo')); |
741 } | 741 } |
742 | 742 |
743 buildUnnamed3062() { | 743 buildUnnamed2532() { |
744 var o = new core.Map<core.String, core.Object>(); | 744 var o = new core.Map<core.String, core.Object>(); |
745 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 745 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
746 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 746 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
747 return o; | 747 return o; |
748 } | 748 } |
749 | 749 |
750 checkUnnamed3062(core.Map<core.String, core.Object> o) { | 750 checkUnnamed2532(core.Map<core.String, core.Object> o) { |
751 unittest.expect(o, unittest.hasLength(2)); | 751 unittest.expect(o, unittest.hasLength(2)); |
752 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')); | 752 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')); |
753 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')); | 753 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')); |
754 } | 754 } |
755 | 755 |
756 core.int buildCounterLocation = 0; | 756 core.int buildCounterLocation = 0; |
757 buildLocation() { | 757 buildLocation() { |
758 var o = new api.Location(); | 758 var o = new api.Location(); |
759 buildCounterLocation++; | 759 buildCounterLocation++; |
760 if (buildCounterLocation < 3) { | 760 if (buildCounterLocation < 3) { |
761 o.labels = buildUnnamed3061(); | 761 o.labels = buildUnnamed2531(); |
762 o.locationId = "foo"; | 762 o.locationId = "foo"; |
763 o.metadata = buildUnnamed3062(); | 763 o.metadata = buildUnnamed2532(); |
764 o.name = "foo"; | 764 o.name = "foo"; |
765 } | 765 } |
766 buildCounterLocation--; | 766 buildCounterLocation--; |
767 return o; | 767 return o; |
768 } | 768 } |
769 | 769 |
770 checkLocation(api.Location o) { | 770 checkLocation(api.Location o) { |
771 buildCounterLocation++; | 771 buildCounterLocation++; |
772 if (buildCounterLocation < 3) { | 772 if (buildCounterLocation < 3) { |
773 checkUnnamed3061(o.labels); | 773 checkUnnamed2531(o.labels); |
774 unittest.expect(o.locationId, unittest.equals('foo')); | 774 unittest.expect(o.locationId, unittest.equals('foo')); |
775 checkUnnamed3062(o.metadata); | 775 checkUnnamed2532(o.metadata); |
776 unittest.expect(o.name, unittest.equals('foo')); | 776 unittest.expect(o.name, unittest.equals('foo')); |
777 } | 777 } |
778 buildCounterLocation--; | 778 buildCounterLocation--; |
779 } | 779 } |
780 | 780 |
781 core.int buildCounterLocationMetadata = 0; | 781 core.int buildCounterLocationMetadata = 0; |
782 buildLocationMetadata() { | 782 buildLocationMetadata() { |
783 var o = new api.LocationMetadata(); | 783 var o = new api.LocationMetadata(); |
784 buildCounterLocationMetadata++; | 784 buildCounterLocationMetadata++; |
785 if (buildCounterLocationMetadata < 3) { | 785 if (buildCounterLocationMetadata < 3) { |
(...skipping 25 matching lines...) Expand all Loading... |
811 } | 811 } |
812 | 812 |
813 checkManualScaling(api.ManualScaling o) { | 813 checkManualScaling(api.ManualScaling o) { |
814 buildCounterManualScaling++; | 814 buildCounterManualScaling++; |
815 if (buildCounterManualScaling < 3) { | 815 if (buildCounterManualScaling < 3) { |
816 unittest.expect(o.instances, unittest.equals(42)); | 816 unittest.expect(o.instances, unittest.equals(42)); |
817 } | 817 } |
818 buildCounterManualScaling--; | 818 buildCounterManualScaling--; |
819 } | 819 } |
820 | 820 |
821 buildUnnamed3063() { | 821 buildUnnamed2533() { |
822 var o = new core.List<core.String>(); | 822 var o = new core.List<core.String>(); |
823 o.add("foo"); | 823 o.add("foo"); |
824 o.add("foo"); | 824 o.add("foo"); |
825 return o; | 825 return o; |
826 } | 826 } |
827 | 827 |
828 checkUnnamed3063(core.List<core.String> o) { | 828 checkUnnamed2533(core.List<core.String> o) { |
829 unittest.expect(o, unittest.hasLength(2)); | 829 unittest.expect(o, unittest.hasLength(2)); |
830 unittest.expect(o[0], unittest.equals('foo')); | 830 unittest.expect(o[0], unittest.equals('foo')); |
831 unittest.expect(o[1], unittest.equals('foo')); | 831 unittest.expect(o[1], unittest.equals('foo')); |
832 } | 832 } |
833 | 833 |
834 core.int buildCounterNetwork = 0; | 834 core.int buildCounterNetwork = 0; |
835 buildNetwork() { | 835 buildNetwork() { |
836 var o = new api.Network(); | 836 var o = new api.Network(); |
837 buildCounterNetwork++; | 837 buildCounterNetwork++; |
838 if (buildCounterNetwork < 3) { | 838 if (buildCounterNetwork < 3) { |
839 o.forwardedPorts = buildUnnamed3063(); | 839 o.forwardedPorts = buildUnnamed2533(); |
840 o.instanceTag = "foo"; | 840 o.instanceTag = "foo"; |
841 o.name = "foo"; | 841 o.name = "foo"; |
842 o.subnetworkName = "foo"; | 842 o.subnetworkName = "foo"; |
843 } | 843 } |
844 buildCounterNetwork--; | 844 buildCounterNetwork--; |
845 return o; | 845 return o; |
846 } | 846 } |
847 | 847 |
848 checkNetwork(api.Network o) { | 848 checkNetwork(api.Network o) { |
849 buildCounterNetwork++; | 849 buildCounterNetwork++; |
850 if (buildCounterNetwork < 3) { | 850 if (buildCounterNetwork < 3) { |
851 checkUnnamed3063(o.forwardedPorts); | 851 checkUnnamed2533(o.forwardedPorts); |
852 unittest.expect(o.instanceTag, unittest.equals('foo')); | 852 unittest.expect(o.instanceTag, unittest.equals('foo')); |
853 unittest.expect(o.name, unittest.equals('foo')); | 853 unittest.expect(o.name, unittest.equals('foo')); |
854 unittest.expect(o.subnetworkName, unittest.equals('foo')); | 854 unittest.expect(o.subnetworkName, unittest.equals('foo')); |
855 } | 855 } |
856 buildCounterNetwork--; | 856 buildCounterNetwork--; |
857 } | 857 } |
858 | 858 |
859 core.int buildCounterNetworkUtilization = 0; | 859 core.int buildCounterNetworkUtilization = 0; |
860 buildNetworkUtilization() { | 860 buildNetworkUtilization() { |
861 var o = new api.NetworkUtilization(); | 861 var o = new api.NetworkUtilization(); |
(...skipping 12 matching lines...) Expand all Loading... |
874 buildCounterNetworkUtilization++; | 874 buildCounterNetworkUtilization++; |
875 if (buildCounterNetworkUtilization < 3) { | 875 if (buildCounterNetworkUtilization < 3) { |
876 unittest.expect(o.targetReceivedBytesPerSecond, unittest.equals(42)); | 876 unittest.expect(o.targetReceivedBytesPerSecond, unittest.equals(42)); |
877 unittest.expect(o.targetReceivedPacketsPerSecond, unittest.equals(42)); | 877 unittest.expect(o.targetReceivedPacketsPerSecond, unittest.equals(42)); |
878 unittest.expect(o.targetSentBytesPerSecond, unittest.equals(42)); | 878 unittest.expect(o.targetSentBytesPerSecond, unittest.equals(42)); |
879 unittest.expect(o.targetSentPacketsPerSecond, unittest.equals(42)); | 879 unittest.expect(o.targetSentPacketsPerSecond, unittest.equals(42)); |
880 } | 880 } |
881 buildCounterNetworkUtilization--; | 881 buildCounterNetworkUtilization--; |
882 } | 882 } |
883 | 883 |
884 buildUnnamed3064() { | 884 buildUnnamed2534() { |
885 var o = new core.Map<core.String, core.Object>(); | 885 var o = new core.Map<core.String, core.Object>(); |
886 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 886 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
887 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 887 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
888 return o; | 888 return o; |
889 } | 889 } |
890 | 890 |
891 checkUnnamed3064(core.Map<core.String, core.Object> o) { | 891 checkUnnamed2534(core.Map<core.String, core.Object> o) { |
892 unittest.expect(o, unittest.hasLength(2)); | 892 unittest.expect(o, unittest.hasLength(2)); |
893 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')); | 893 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')); |
894 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')); | 894 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')); |
895 } | 895 } |
896 | 896 |
897 buildUnnamed3065() { | 897 buildUnnamed2535() { |
898 var o = new core.Map<core.String, core.Object>(); | 898 var o = new core.Map<core.String, core.Object>(); |
899 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 899 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
900 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 900 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
901 return o; | 901 return o; |
902 } | 902 } |
903 | 903 |
904 checkUnnamed3065(core.Map<core.String, core.Object> o) { | 904 checkUnnamed2535(core.Map<core.String, core.Object> o) { |
905 unittest.expect(o, unittest.hasLength(2)); | 905 unittest.expect(o, unittest.hasLength(2)); |
906 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')); | 906 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')); |
907 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')); | 907 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')); |
908 } | 908 } |
909 | 909 |
910 core.int buildCounterOperation = 0; | 910 core.int buildCounterOperation = 0; |
911 buildOperation() { | 911 buildOperation() { |
912 var o = new api.Operation(); | 912 var o = new api.Operation(); |
913 buildCounterOperation++; | 913 buildCounterOperation++; |
914 if (buildCounterOperation < 3) { | 914 if (buildCounterOperation < 3) { |
915 o.done = true; | 915 o.done = true; |
916 o.error = buildStatus(); | 916 o.error = buildStatus(); |
917 o.metadata = buildUnnamed3064(); | 917 o.metadata = buildUnnamed2534(); |
918 o.name = "foo"; | 918 o.name = "foo"; |
919 o.response = buildUnnamed3065(); | 919 o.response = buildUnnamed2535(); |
920 } | 920 } |
921 buildCounterOperation--; | 921 buildCounterOperation--; |
922 return o; | 922 return o; |
923 } | 923 } |
924 | 924 |
925 checkOperation(api.Operation o) { | 925 checkOperation(api.Operation o) { |
926 buildCounterOperation++; | 926 buildCounterOperation++; |
927 if (buildCounterOperation < 3) { | 927 if (buildCounterOperation < 3) { |
928 unittest.expect(o.done, unittest.isTrue); | 928 unittest.expect(o.done, unittest.isTrue); |
929 checkStatus(o.error); | 929 checkStatus(o.error); |
930 checkUnnamed3064(o.metadata); | 930 checkUnnamed2534(o.metadata); |
931 unittest.expect(o.name, unittest.equals('foo')); | 931 unittest.expect(o.name, unittest.equals('foo')); |
932 checkUnnamed3065(o.response); | 932 checkUnnamed2535(o.response); |
933 } | 933 } |
934 buildCounterOperation--; | 934 buildCounterOperation--; |
935 } | 935 } |
936 | 936 |
937 core.int buildCounterOperationMetadata = 0; | 937 core.int buildCounterOperationMetadata = 0; |
938 buildOperationMetadata() { | 938 buildOperationMetadata() { |
939 var o = new api.OperationMetadata(); | 939 var o = new api.OperationMetadata(); |
940 buildCounterOperationMetadata++; | 940 buildCounterOperationMetadata++; |
941 if (buildCounterOperationMetadata < 3) { | 941 if (buildCounterOperationMetadata < 3) { |
942 o.endTime = "foo"; | 942 o.endTime = "foo"; |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
983 if (buildCounterOperationMetadataExperimental < 3) { | 983 if (buildCounterOperationMetadataExperimental < 3) { |
984 unittest.expect(o.endTime, unittest.equals('foo')); | 984 unittest.expect(o.endTime, unittest.equals('foo')); |
985 unittest.expect(o.insertTime, unittest.equals('foo')); | 985 unittest.expect(o.insertTime, unittest.equals('foo')); |
986 unittest.expect(o.method, unittest.equals('foo')); | 986 unittest.expect(o.method, unittest.equals('foo')); |
987 unittest.expect(o.target, unittest.equals('foo')); | 987 unittest.expect(o.target, unittest.equals('foo')); |
988 unittest.expect(o.user, unittest.equals('foo')); | 988 unittest.expect(o.user, unittest.equals('foo')); |
989 } | 989 } |
990 buildCounterOperationMetadataExperimental--; | 990 buildCounterOperationMetadataExperimental--; |
991 } | 991 } |
992 | 992 |
993 buildUnnamed3066() { | 993 buildUnnamed2536() { |
994 var o = new core.List<core.String>(); | 994 var o = new core.List<core.String>(); |
995 o.add("foo"); | 995 o.add("foo"); |
996 o.add("foo"); | 996 o.add("foo"); |
997 return o; | 997 return o; |
998 } | 998 } |
999 | 999 |
1000 checkUnnamed3066(core.List<core.String> o) { | 1000 checkUnnamed2536(core.List<core.String> o) { |
1001 unittest.expect(o, unittest.hasLength(2)); | 1001 unittest.expect(o, unittest.hasLength(2)); |
1002 unittest.expect(o[0], unittest.equals('foo')); | 1002 unittest.expect(o[0], unittest.equals('foo')); |
1003 unittest.expect(o[1], unittest.equals('foo')); | 1003 unittest.expect(o[1], unittest.equals('foo')); |
1004 } | 1004 } |
1005 | 1005 |
1006 core.int buildCounterOperationMetadataV1 = 0; | 1006 core.int buildCounterOperationMetadataV1 = 0; |
1007 buildOperationMetadataV1() { | 1007 buildOperationMetadataV1() { |
1008 var o = new api.OperationMetadataV1(); | 1008 var o = new api.OperationMetadataV1(); |
1009 buildCounterOperationMetadataV1++; | 1009 buildCounterOperationMetadataV1++; |
1010 if (buildCounterOperationMetadataV1 < 3) { | 1010 if (buildCounterOperationMetadataV1 < 3) { |
1011 o.endTime = "foo"; | 1011 o.endTime = "foo"; |
1012 o.ephemeralMessage = "foo"; | 1012 o.ephemeralMessage = "foo"; |
1013 o.insertTime = "foo"; | 1013 o.insertTime = "foo"; |
1014 o.method = "foo"; | 1014 o.method = "foo"; |
1015 o.target = "foo"; | 1015 o.target = "foo"; |
1016 o.user = "foo"; | 1016 o.user = "foo"; |
1017 o.warning = buildUnnamed3066(); | 1017 o.warning = buildUnnamed2536(); |
1018 } | 1018 } |
1019 buildCounterOperationMetadataV1--; | 1019 buildCounterOperationMetadataV1--; |
1020 return o; | 1020 return o; |
1021 } | 1021 } |
1022 | 1022 |
1023 checkOperationMetadataV1(api.OperationMetadataV1 o) { | 1023 checkOperationMetadataV1(api.OperationMetadataV1 o) { |
1024 buildCounterOperationMetadataV1++; | 1024 buildCounterOperationMetadataV1++; |
1025 if (buildCounterOperationMetadataV1 < 3) { | 1025 if (buildCounterOperationMetadataV1 < 3) { |
1026 unittest.expect(o.endTime, unittest.equals('foo')); | 1026 unittest.expect(o.endTime, unittest.equals('foo')); |
1027 unittest.expect(o.ephemeralMessage, unittest.equals('foo')); | 1027 unittest.expect(o.ephemeralMessage, unittest.equals('foo')); |
1028 unittest.expect(o.insertTime, unittest.equals('foo')); | 1028 unittest.expect(o.insertTime, unittest.equals('foo')); |
1029 unittest.expect(o.method, unittest.equals('foo')); | 1029 unittest.expect(o.method, unittest.equals('foo')); |
1030 unittest.expect(o.target, unittest.equals('foo')); | 1030 unittest.expect(o.target, unittest.equals('foo')); |
1031 unittest.expect(o.user, unittest.equals('foo')); | 1031 unittest.expect(o.user, unittest.equals('foo')); |
1032 checkUnnamed3066(o.warning); | 1032 checkUnnamed2536(o.warning); |
1033 } | 1033 } |
1034 buildCounterOperationMetadataV1--; | 1034 buildCounterOperationMetadataV1--; |
1035 } | 1035 } |
1036 | 1036 |
1037 buildUnnamed3067() { | 1037 buildUnnamed2537() { |
1038 var o = new core.List<core.String>(); | 1038 var o = new core.List<core.String>(); |
1039 o.add("foo"); | 1039 o.add("foo"); |
1040 o.add("foo"); | 1040 o.add("foo"); |
1041 return o; | 1041 return o; |
1042 } | 1042 } |
1043 | 1043 |
1044 checkUnnamed3067(core.List<core.String> o) { | 1044 checkUnnamed2537(core.List<core.String> o) { |
1045 unittest.expect(o, unittest.hasLength(2)); | 1045 unittest.expect(o, unittest.hasLength(2)); |
1046 unittest.expect(o[0], unittest.equals('foo')); | 1046 unittest.expect(o[0], unittest.equals('foo')); |
1047 unittest.expect(o[1], unittest.equals('foo')); | 1047 unittest.expect(o[1], unittest.equals('foo')); |
| 1048 } |
| 1049 |
| 1050 core.int buildCounterOperationMetadataV1Alpha = 0; |
| 1051 buildOperationMetadataV1Alpha() { |
| 1052 var o = new api.OperationMetadataV1Alpha(); |
| 1053 buildCounterOperationMetadataV1Alpha++; |
| 1054 if (buildCounterOperationMetadataV1Alpha < 3) { |
| 1055 o.endTime = "foo"; |
| 1056 o.ephemeralMessage = "foo"; |
| 1057 o.insertTime = "foo"; |
| 1058 o.method = "foo"; |
| 1059 o.target = "foo"; |
| 1060 o.user = "foo"; |
| 1061 o.warning = buildUnnamed2537(); |
| 1062 } |
| 1063 buildCounterOperationMetadataV1Alpha--; |
| 1064 return o; |
| 1065 } |
| 1066 |
| 1067 checkOperationMetadataV1Alpha(api.OperationMetadataV1Alpha o) { |
| 1068 buildCounterOperationMetadataV1Alpha++; |
| 1069 if (buildCounterOperationMetadataV1Alpha < 3) { |
| 1070 unittest.expect(o.endTime, unittest.equals('foo')); |
| 1071 unittest.expect(o.ephemeralMessage, unittest.equals('foo')); |
| 1072 unittest.expect(o.insertTime, unittest.equals('foo')); |
| 1073 unittest.expect(o.method, unittest.equals('foo')); |
| 1074 unittest.expect(o.target, unittest.equals('foo')); |
| 1075 unittest.expect(o.user, unittest.equals('foo')); |
| 1076 checkUnnamed2537(o.warning); |
| 1077 } |
| 1078 buildCounterOperationMetadataV1Alpha--; |
| 1079 } |
| 1080 |
| 1081 buildUnnamed2538() { |
| 1082 var o = new core.List<core.String>(); |
| 1083 o.add("foo"); |
| 1084 o.add("foo"); |
| 1085 return o; |
| 1086 } |
| 1087 |
| 1088 checkUnnamed2538(core.List<core.String> o) { |
| 1089 unittest.expect(o, unittest.hasLength(2)); |
| 1090 unittest.expect(o[0], unittest.equals('foo')); |
| 1091 unittest.expect(o[1], unittest.equals('foo')); |
1048 } | 1092 } |
1049 | 1093 |
1050 core.int buildCounterOperationMetadataV1Beta = 0; | 1094 core.int buildCounterOperationMetadataV1Beta = 0; |
1051 buildOperationMetadataV1Beta() { | 1095 buildOperationMetadataV1Beta() { |
1052 var o = new api.OperationMetadataV1Beta(); | 1096 var o = new api.OperationMetadataV1Beta(); |
1053 buildCounterOperationMetadataV1Beta++; | 1097 buildCounterOperationMetadataV1Beta++; |
1054 if (buildCounterOperationMetadataV1Beta < 3) { | 1098 if (buildCounterOperationMetadataV1Beta < 3) { |
1055 o.endTime = "foo"; | 1099 o.endTime = "foo"; |
1056 o.ephemeralMessage = "foo"; | 1100 o.ephemeralMessage = "foo"; |
1057 o.insertTime = "foo"; | 1101 o.insertTime = "foo"; |
1058 o.method = "foo"; | 1102 o.method = "foo"; |
1059 o.target = "foo"; | 1103 o.target = "foo"; |
1060 o.user = "foo"; | 1104 o.user = "foo"; |
1061 o.warning = buildUnnamed3067(); | 1105 o.warning = buildUnnamed2538(); |
1062 } | 1106 } |
1063 buildCounterOperationMetadataV1Beta--; | 1107 buildCounterOperationMetadataV1Beta--; |
1064 return o; | 1108 return o; |
1065 } | 1109 } |
1066 | 1110 |
1067 checkOperationMetadataV1Beta(api.OperationMetadataV1Beta o) { | 1111 checkOperationMetadataV1Beta(api.OperationMetadataV1Beta o) { |
1068 buildCounterOperationMetadataV1Beta++; | 1112 buildCounterOperationMetadataV1Beta++; |
1069 if (buildCounterOperationMetadataV1Beta < 3) { | 1113 if (buildCounterOperationMetadataV1Beta < 3) { |
1070 unittest.expect(o.endTime, unittest.equals('foo')); | 1114 unittest.expect(o.endTime, unittest.equals('foo')); |
1071 unittest.expect(o.ephemeralMessage, unittest.equals('foo')); | 1115 unittest.expect(o.ephemeralMessage, unittest.equals('foo')); |
1072 unittest.expect(o.insertTime, unittest.equals('foo')); | 1116 unittest.expect(o.insertTime, unittest.equals('foo')); |
1073 unittest.expect(o.method, unittest.equals('foo')); | 1117 unittest.expect(o.method, unittest.equals('foo')); |
1074 unittest.expect(o.target, unittest.equals('foo')); | 1118 unittest.expect(o.target, unittest.equals('foo')); |
1075 unittest.expect(o.user, unittest.equals('foo')); | 1119 unittest.expect(o.user, unittest.equals('foo')); |
1076 checkUnnamed3067(o.warning); | 1120 checkUnnamed2538(o.warning); |
1077 } | 1121 } |
1078 buildCounterOperationMetadataV1Beta--; | 1122 buildCounterOperationMetadataV1Beta--; |
1079 } | 1123 } |
1080 | 1124 |
1081 core.int buildCounterOperationMetadataV1Beta5 = 0; | 1125 core.int buildCounterOperationMetadataV1Beta5 = 0; |
1082 buildOperationMetadataV1Beta5() { | 1126 buildOperationMetadataV1Beta5() { |
1083 var o = new api.OperationMetadataV1Beta5(); | 1127 var o = new api.OperationMetadataV1Beta5(); |
1084 buildCounterOperationMetadataV1Beta5++; | 1128 buildCounterOperationMetadataV1Beta5++; |
1085 if (buildCounterOperationMetadataV1Beta5 < 3) { | 1129 if (buildCounterOperationMetadataV1Beta5 < 3) { |
1086 o.endTime = "foo"; | 1130 o.endTime = "foo"; |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1165 | 1209 |
1166 checkRequestUtilization(api.RequestUtilization o) { | 1210 checkRequestUtilization(api.RequestUtilization o) { |
1167 buildCounterRequestUtilization++; | 1211 buildCounterRequestUtilization++; |
1168 if (buildCounterRequestUtilization < 3) { | 1212 if (buildCounterRequestUtilization < 3) { |
1169 unittest.expect(o.targetConcurrentRequests, unittest.equals(42)); | 1213 unittest.expect(o.targetConcurrentRequests, unittest.equals(42)); |
1170 unittest.expect(o.targetRequestCountPerSecond, unittest.equals(42)); | 1214 unittest.expect(o.targetRequestCountPerSecond, unittest.equals(42)); |
1171 } | 1215 } |
1172 buildCounterRequestUtilization--; | 1216 buildCounterRequestUtilization--; |
1173 } | 1217 } |
1174 | 1218 |
1175 buildUnnamed3068() { | 1219 buildUnnamed2539() { |
1176 var o = new core.List<api.Volume>(); | 1220 var o = new core.List<api.Volume>(); |
1177 o.add(buildVolume()); | 1221 o.add(buildVolume()); |
1178 o.add(buildVolume()); | 1222 o.add(buildVolume()); |
1179 return o; | 1223 return o; |
1180 } | 1224 } |
1181 | 1225 |
1182 checkUnnamed3068(core.List<api.Volume> o) { | 1226 checkUnnamed2539(core.List<api.Volume> o) { |
1183 unittest.expect(o, unittest.hasLength(2)); | 1227 unittest.expect(o, unittest.hasLength(2)); |
1184 checkVolume(o[0]); | 1228 checkVolume(o[0]); |
1185 checkVolume(o[1]); | 1229 checkVolume(o[1]); |
1186 } | 1230 } |
1187 | 1231 |
1188 core.int buildCounterResources = 0; | 1232 core.int buildCounterResources = 0; |
1189 buildResources() { | 1233 buildResources() { |
1190 var o = new api.Resources(); | 1234 var o = new api.Resources(); |
1191 buildCounterResources++; | 1235 buildCounterResources++; |
1192 if (buildCounterResources < 3) { | 1236 if (buildCounterResources < 3) { |
1193 o.cpu = 42.0; | 1237 o.cpu = 42.0; |
1194 o.diskGb = 42.0; | 1238 o.diskGb = 42.0; |
1195 o.memoryGb = 42.0; | 1239 o.memoryGb = 42.0; |
1196 o.volumes = buildUnnamed3068(); | 1240 o.volumes = buildUnnamed2539(); |
1197 } | 1241 } |
1198 buildCounterResources--; | 1242 buildCounterResources--; |
1199 return o; | 1243 return o; |
1200 } | 1244 } |
1201 | 1245 |
1202 checkResources(api.Resources o) { | 1246 checkResources(api.Resources o) { |
1203 buildCounterResources++; | 1247 buildCounterResources++; |
1204 if (buildCounterResources < 3) { | 1248 if (buildCounterResources < 3) { |
1205 unittest.expect(o.cpu, unittest.equals(42.0)); | 1249 unittest.expect(o.cpu, unittest.equals(42.0)); |
1206 unittest.expect(o.diskGb, unittest.equals(42.0)); | 1250 unittest.expect(o.diskGb, unittest.equals(42.0)); |
1207 unittest.expect(o.memoryGb, unittest.equals(42.0)); | 1251 unittest.expect(o.memoryGb, unittest.equals(42.0)); |
1208 checkUnnamed3068(o.volumes); | 1252 checkUnnamed2539(o.volumes); |
1209 } | 1253 } |
1210 buildCounterResources--; | 1254 buildCounterResources--; |
1211 } | 1255 } |
1212 | 1256 |
1213 core.int buildCounterScriptHandler = 0; | 1257 core.int buildCounterScriptHandler = 0; |
1214 buildScriptHandler() { | 1258 buildScriptHandler() { |
1215 var o = new api.ScriptHandler(); | 1259 var o = new api.ScriptHandler(); |
1216 buildCounterScriptHandler++; | 1260 buildCounterScriptHandler++; |
1217 if (buildCounterScriptHandler < 3) { | 1261 if (buildCounterScriptHandler < 3) { |
1218 o.scriptPath = "foo"; | 1262 o.scriptPath = "foo"; |
(...skipping 26 matching lines...) Expand all Loading... |
1245 checkService(api.Service o) { | 1289 checkService(api.Service o) { |
1246 buildCounterService++; | 1290 buildCounterService++; |
1247 if (buildCounterService < 3) { | 1291 if (buildCounterService < 3) { |
1248 unittest.expect(o.id, unittest.equals('foo')); | 1292 unittest.expect(o.id, unittest.equals('foo')); |
1249 unittest.expect(o.name, unittest.equals('foo')); | 1293 unittest.expect(o.name, unittest.equals('foo')); |
1250 checkTrafficSplit(o.split); | 1294 checkTrafficSplit(o.split); |
1251 } | 1295 } |
1252 buildCounterService--; | 1296 buildCounterService--; |
1253 } | 1297 } |
1254 | 1298 |
1255 buildUnnamed3069() { | 1299 buildUnnamed2540() { |
1256 var o = new core.Map<core.String, core.String>(); | 1300 var o = new core.Map<core.String, core.String>(); |
1257 o["x"] = "foo"; | 1301 o["x"] = "foo"; |
1258 o["y"] = "foo"; | 1302 o["y"] = "foo"; |
1259 return o; | 1303 return o; |
1260 } | 1304 } |
1261 | 1305 |
1262 checkUnnamed3069(core.Map<core.String, core.String> o) { | 1306 checkUnnamed2540(core.Map<core.String, core.String> o) { |
1263 unittest.expect(o, unittest.hasLength(2)); | 1307 unittest.expect(o, unittest.hasLength(2)); |
1264 unittest.expect(o["x"], unittest.equals('foo')); | 1308 unittest.expect(o["x"], unittest.equals('foo')); |
1265 unittest.expect(o["y"], unittest.equals('foo')); | 1309 unittest.expect(o["y"], unittest.equals('foo')); |
1266 } | 1310 } |
1267 | 1311 |
1268 core.int buildCounterStaticFilesHandler = 0; | 1312 core.int buildCounterStaticFilesHandler = 0; |
1269 buildStaticFilesHandler() { | 1313 buildStaticFilesHandler() { |
1270 var o = new api.StaticFilesHandler(); | 1314 var o = new api.StaticFilesHandler(); |
1271 buildCounterStaticFilesHandler++; | 1315 buildCounterStaticFilesHandler++; |
1272 if (buildCounterStaticFilesHandler < 3) { | 1316 if (buildCounterStaticFilesHandler < 3) { |
1273 o.applicationReadable = true; | 1317 o.applicationReadable = true; |
1274 o.expiration = "foo"; | 1318 o.expiration = "foo"; |
1275 o.httpHeaders = buildUnnamed3069(); | 1319 o.httpHeaders = buildUnnamed2540(); |
1276 o.mimeType = "foo"; | 1320 o.mimeType = "foo"; |
1277 o.path = "foo"; | 1321 o.path = "foo"; |
1278 o.requireMatchingFile = true; | 1322 o.requireMatchingFile = true; |
1279 o.uploadPathRegex = "foo"; | 1323 o.uploadPathRegex = "foo"; |
1280 } | 1324 } |
1281 buildCounterStaticFilesHandler--; | 1325 buildCounterStaticFilesHandler--; |
1282 return o; | 1326 return o; |
1283 } | 1327 } |
1284 | 1328 |
1285 checkStaticFilesHandler(api.StaticFilesHandler o) { | 1329 checkStaticFilesHandler(api.StaticFilesHandler o) { |
1286 buildCounterStaticFilesHandler++; | 1330 buildCounterStaticFilesHandler++; |
1287 if (buildCounterStaticFilesHandler < 3) { | 1331 if (buildCounterStaticFilesHandler < 3) { |
1288 unittest.expect(o.applicationReadable, unittest.isTrue); | 1332 unittest.expect(o.applicationReadable, unittest.isTrue); |
1289 unittest.expect(o.expiration, unittest.equals('foo')); | 1333 unittest.expect(o.expiration, unittest.equals('foo')); |
1290 checkUnnamed3069(o.httpHeaders); | 1334 checkUnnamed2540(o.httpHeaders); |
1291 unittest.expect(o.mimeType, unittest.equals('foo')); | 1335 unittest.expect(o.mimeType, unittest.equals('foo')); |
1292 unittest.expect(o.path, unittest.equals('foo')); | 1336 unittest.expect(o.path, unittest.equals('foo')); |
1293 unittest.expect(o.requireMatchingFile, unittest.isTrue); | 1337 unittest.expect(o.requireMatchingFile, unittest.isTrue); |
1294 unittest.expect(o.uploadPathRegex, unittest.equals('foo')); | 1338 unittest.expect(o.uploadPathRegex, unittest.equals('foo')); |
1295 } | 1339 } |
1296 buildCounterStaticFilesHandler--; | 1340 buildCounterStaticFilesHandler--; |
1297 } | 1341 } |
1298 | 1342 |
1299 buildUnnamed3070() { | 1343 buildUnnamed2541() { |
1300 var o = new core.Map<core.String, core.Object>(); | 1344 var o = new core.Map<core.String, core.Object>(); |
1301 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 1345 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
1302 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 1346 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
1303 return o; | 1347 return o; |
1304 } | 1348 } |
1305 | 1349 |
1306 checkUnnamed3070(core.Map<core.String, core.Object> o) { | 1350 checkUnnamed2541(core.Map<core.String, core.Object> o) { |
1307 unittest.expect(o, unittest.hasLength(2)); | 1351 unittest.expect(o, unittest.hasLength(2)); |
1308 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')); | 1352 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')); |
1309 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')); | 1353 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')); |
1310 } | 1354 } |
1311 | 1355 |
1312 buildUnnamed3071() { | 1356 buildUnnamed2542() { |
1313 var o = new core.List<core.Map<core.String, core.Object>>(); | 1357 var o = new core.List<core.Map<core.String, core.Object>>(); |
1314 o.add(buildUnnamed3070()); | 1358 o.add(buildUnnamed2541()); |
1315 o.add(buildUnnamed3070()); | 1359 o.add(buildUnnamed2541()); |
1316 return o; | 1360 return o; |
1317 } | 1361 } |
1318 | 1362 |
1319 checkUnnamed3071(core.List<core.Map<core.String, core.Object>> o) { | 1363 checkUnnamed2542(core.List<core.Map<core.String, core.Object>> o) { |
1320 unittest.expect(o, unittest.hasLength(2)); | 1364 unittest.expect(o, unittest.hasLength(2)); |
1321 checkUnnamed3070(o[0]); | 1365 checkUnnamed2541(o[0]); |
1322 checkUnnamed3070(o[1]); | 1366 checkUnnamed2541(o[1]); |
1323 } | 1367 } |
1324 | 1368 |
1325 core.int buildCounterStatus = 0; | 1369 core.int buildCounterStatus = 0; |
1326 buildStatus() { | 1370 buildStatus() { |
1327 var o = new api.Status(); | 1371 var o = new api.Status(); |
1328 buildCounterStatus++; | 1372 buildCounterStatus++; |
1329 if (buildCounterStatus < 3) { | 1373 if (buildCounterStatus < 3) { |
1330 o.code = 42; | 1374 o.code = 42; |
1331 o.details = buildUnnamed3071(); | 1375 o.details = buildUnnamed2542(); |
1332 o.message = "foo"; | 1376 o.message = "foo"; |
1333 } | 1377 } |
1334 buildCounterStatus--; | 1378 buildCounterStatus--; |
1335 return o; | 1379 return o; |
1336 } | 1380 } |
1337 | 1381 |
1338 checkStatus(api.Status o) { | 1382 checkStatus(api.Status o) { |
1339 buildCounterStatus++; | 1383 buildCounterStatus++; |
1340 if (buildCounterStatus < 3) { | 1384 if (buildCounterStatus < 3) { |
1341 unittest.expect(o.code, unittest.equals(42)); | 1385 unittest.expect(o.code, unittest.equals(42)); |
1342 checkUnnamed3071(o.details); | 1386 checkUnnamed2542(o.details); |
1343 unittest.expect(o.message, unittest.equals('foo')); | 1387 unittest.expect(o.message, unittest.equals('foo')); |
1344 } | 1388 } |
1345 buildCounterStatus--; | 1389 buildCounterStatus--; |
1346 } | 1390 } |
1347 | 1391 |
1348 buildUnnamed3072() { | 1392 buildUnnamed2543() { |
1349 var o = new core.Map<core.String, core.double>(); | 1393 var o = new core.Map<core.String, core.double>(); |
1350 o["x"] = 42.0; | 1394 o["x"] = 42.0; |
1351 o["y"] = 42.0; | 1395 o["y"] = 42.0; |
1352 return o; | 1396 return o; |
1353 } | 1397 } |
1354 | 1398 |
1355 checkUnnamed3072(core.Map<core.String, core.double> o) { | 1399 checkUnnamed2543(core.Map<core.String, core.double> o) { |
1356 unittest.expect(o, unittest.hasLength(2)); | 1400 unittest.expect(o, unittest.hasLength(2)); |
1357 unittest.expect(o["x"], unittest.equals(42.0)); | 1401 unittest.expect(o["x"], unittest.equals(42.0)); |
1358 unittest.expect(o["y"], unittest.equals(42.0)); | 1402 unittest.expect(o["y"], unittest.equals(42.0)); |
1359 } | 1403 } |
1360 | 1404 |
1361 core.int buildCounterTrafficSplit = 0; | 1405 core.int buildCounterTrafficSplit = 0; |
1362 buildTrafficSplit() { | 1406 buildTrafficSplit() { |
1363 var o = new api.TrafficSplit(); | 1407 var o = new api.TrafficSplit(); |
1364 buildCounterTrafficSplit++; | 1408 buildCounterTrafficSplit++; |
1365 if (buildCounterTrafficSplit < 3) { | 1409 if (buildCounterTrafficSplit < 3) { |
1366 o.allocations = buildUnnamed3072(); | 1410 o.allocations = buildUnnamed2543(); |
1367 o.shardBy = "foo"; | 1411 o.shardBy = "foo"; |
1368 } | 1412 } |
1369 buildCounterTrafficSplit--; | 1413 buildCounterTrafficSplit--; |
1370 return o; | 1414 return o; |
1371 } | 1415 } |
1372 | 1416 |
1373 checkTrafficSplit(api.TrafficSplit o) { | 1417 checkTrafficSplit(api.TrafficSplit o) { |
1374 buildCounterTrafficSplit++; | 1418 buildCounterTrafficSplit++; |
1375 if (buildCounterTrafficSplit < 3) { | 1419 if (buildCounterTrafficSplit < 3) { |
1376 checkUnnamed3072(o.allocations); | 1420 checkUnnamed2543(o.allocations); |
1377 unittest.expect(o.shardBy, unittest.equals('foo')); | 1421 unittest.expect(o.shardBy, unittest.equals('foo')); |
1378 } | 1422 } |
1379 buildCounterTrafficSplit--; | 1423 buildCounterTrafficSplit--; |
1380 } | 1424 } |
1381 | 1425 |
1382 core.int buildCounterUrlDispatchRule = 0; | 1426 core.int buildCounterUrlDispatchRule = 0; |
1383 buildUrlDispatchRule() { | 1427 buildUrlDispatchRule() { |
1384 var o = new api.UrlDispatchRule(); | 1428 var o = new api.UrlDispatchRule(); |
1385 buildCounterUrlDispatchRule++; | 1429 buildCounterUrlDispatchRule++; |
1386 if (buildCounterUrlDispatchRule < 3) { | 1430 if (buildCounterUrlDispatchRule < 3) { |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1428 unittest.expect(o.login, unittest.equals('foo')); | 1472 unittest.expect(o.login, unittest.equals('foo')); |
1429 unittest.expect(o.redirectHttpResponseCode, unittest.equals('foo')); | 1473 unittest.expect(o.redirectHttpResponseCode, unittest.equals('foo')); |
1430 checkScriptHandler(o.script); | 1474 checkScriptHandler(o.script); |
1431 unittest.expect(o.securityLevel, unittest.equals('foo')); | 1475 unittest.expect(o.securityLevel, unittest.equals('foo')); |
1432 checkStaticFilesHandler(o.staticFiles); | 1476 checkStaticFilesHandler(o.staticFiles); |
1433 unittest.expect(o.urlRegex, unittest.equals('foo')); | 1477 unittest.expect(o.urlRegex, unittest.equals('foo')); |
1434 } | 1478 } |
1435 buildCounterUrlMap--; | 1479 buildCounterUrlMap--; |
1436 } | 1480 } |
1437 | 1481 |
1438 buildUnnamed3073() { | 1482 buildUnnamed2544() { |
1439 var o = new core.Map<core.String, core.String>(); | 1483 var o = new core.Map<core.String, core.String>(); |
1440 o["x"] = "foo"; | 1484 o["x"] = "foo"; |
1441 o["y"] = "foo"; | 1485 o["y"] = "foo"; |
1442 return o; | 1486 return o; |
1443 } | 1487 } |
1444 | 1488 |
1445 checkUnnamed3073(core.Map<core.String, core.String> o) { | 1489 checkUnnamed2544(core.Map<core.String, core.String> o) { |
1446 unittest.expect(o, unittest.hasLength(2)); | 1490 unittest.expect(o, unittest.hasLength(2)); |
1447 unittest.expect(o["x"], unittest.equals('foo')); | 1491 unittest.expect(o["x"], unittest.equals('foo')); |
1448 unittest.expect(o["y"], unittest.equals('foo')); | 1492 unittest.expect(o["y"], unittest.equals('foo')); |
1449 } | 1493 } |
1450 | 1494 |
1451 buildUnnamed3074() { | 1495 buildUnnamed2545() { |
1452 var o = new core.Map<core.String, core.String>(); | 1496 var o = new core.Map<core.String, core.String>(); |
1453 o["x"] = "foo"; | 1497 o["x"] = "foo"; |
1454 o["y"] = "foo"; | 1498 o["y"] = "foo"; |
1455 return o; | 1499 return o; |
1456 } | 1500 } |
1457 | 1501 |
1458 checkUnnamed3074(core.Map<core.String, core.String> o) { | 1502 checkUnnamed2545(core.Map<core.String, core.String> o) { |
1459 unittest.expect(o, unittest.hasLength(2)); | 1503 unittest.expect(o, unittest.hasLength(2)); |
1460 unittest.expect(o["x"], unittest.equals('foo')); | 1504 unittest.expect(o["x"], unittest.equals('foo')); |
1461 unittest.expect(o["y"], unittest.equals('foo')); | 1505 unittest.expect(o["y"], unittest.equals('foo')); |
1462 } | 1506 } |
1463 | 1507 |
1464 buildUnnamed3075() { | 1508 buildUnnamed2546() { |
1465 var o = new core.List<api.ErrorHandler>(); | 1509 var o = new core.List<api.ErrorHandler>(); |
1466 o.add(buildErrorHandler()); | 1510 o.add(buildErrorHandler()); |
1467 o.add(buildErrorHandler()); | 1511 o.add(buildErrorHandler()); |
1468 return o; | 1512 return o; |
1469 } | 1513 } |
1470 | 1514 |
1471 checkUnnamed3075(core.List<api.ErrorHandler> o) { | 1515 checkUnnamed2546(core.List<api.ErrorHandler> o) { |
1472 unittest.expect(o, unittest.hasLength(2)); | 1516 unittest.expect(o, unittest.hasLength(2)); |
1473 checkErrorHandler(o[0]); | 1517 checkErrorHandler(o[0]); |
1474 checkErrorHandler(o[1]); | 1518 checkErrorHandler(o[1]); |
1475 } | 1519 } |
1476 | 1520 |
1477 buildUnnamed3076() { | 1521 buildUnnamed2547() { |
1478 var o = new core.List<api.UrlMap>(); | 1522 var o = new core.List<api.UrlMap>(); |
1479 o.add(buildUrlMap()); | 1523 o.add(buildUrlMap()); |
1480 o.add(buildUrlMap()); | 1524 o.add(buildUrlMap()); |
1481 return o; | 1525 return o; |
1482 } | 1526 } |
1483 | 1527 |
1484 checkUnnamed3076(core.List<api.UrlMap> o) { | 1528 checkUnnamed2547(core.List<api.UrlMap> o) { |
1485 unittest.expect(o, unittest.hasLength(2)); | 1529 unittest.expect(o, unittest.hasLength(2)); |
1486 checkUrlMap(o[0]); | 1530 checkUrlMap(o[0]); |
1487 checkUrlMap(o[1]); | 1531 checkUrlMap(o[1]); |
1488 } | 1532 } |
1489 | 1533 |
1490 buildUnnamed3077() { | 1534 buildUnnamed2548() { |
1491 var o = new core.List<core.String>(); | 1535 var o = new core.List<core.String>(); |
1492 o.add("foo"); | 1536 o.add("foo"); |
1493 o.add("foo"); | 1537 o.add("foo"); |
1494 return o; | 1538 return o; |
1495 } | 1539 } |
1496 | 1540 |
1497 checkUnnamed3077(core.List<core.String> o) { | 1541 checkUnnamed2548(core.List<core.String> o) { |
1498 unittest.expect(o, unittest.hasLength(2)); | 1542 unittest.expect(o, unittest.hasLength(2)); |
1499 unittest.expect(o[0], unittest.equals('foo')); | 1543 unittest.expect(o[0], unittest.equals('foo')); |
1500 unittest.expect(o[1], unittest.equals('foo')); | 1544 unittest.expect(o[1], unittest.equals('foo')); |
1501 } | 1545 } |
1502 | 1546 |
1503 buildUnnamed3078() { | 1547 buildUnnamed2549() { |
1504 var o = new core.List<api.Library>(); | 1548 var o = new core.List<api.Library>(); |
1505 o.add(buildLibrary()); | 1549 o.add(buildLibrary()); |
1506 o.add(buildLibrary()); | 1550 o.add(buildLibrary()); |
1507 return o; | 1551 return o; |
1508 } | 1552 } |
1509 | 1553 |
1510 checkUnnamed3078(core.List<api.Library> o) { | 1554 checkUnnamed2549(core.List<api.Library> o) { |
1511 unittest.expect(o, unittest.hasLength(2)); | 1555 unittest.expect(o, unittest.hasLength(2)); |
1512 checkLibrary(o[0]); | 1556 checkLibrary(o[0]); |
1513 checkLibrary(o[1]); | 1557 checkLibrary(o[1]); |
1514 } | 1558 } |
1515 | 1559 |
1516 core.int buildCounterVersion = 0; | 1560 core.int buildCounterVersion = 0; |
1517 buildVersion() { | 1561 buildVersion() { |
1518 var o = new api.Version(); | 1562 var o = new api.Version(); |
1519 buildCounterVersion++; | 1563 buildCounterVersion++; |
1520 if (buildCounterVersion < 3) { | 1564 if (buildCounterVersion < 3) { |
1521 o.apiConfig = buildApiConfigHandler(); | 1565 o.apiConfig = buildApiConfigHandler(); |
1522 o.automaticScaling = buildAutomaticScaling(); | 1566 o.automaticScaling = buildAutomaticScaling(); |
1523 o.basicScaling = buildBasicScaling(); | 1567 o.basicScaling = buildBasicScaling(); |
1524 o.betaSettings = buildUnnamed3073(); | 1568 o.betaSettings = buildUnnamed2544(); |
1525 o.createTime = "foo"; | 1569 o.createTime = "foo"; |
1526 o.createdBy = "foo"; | 1570 o.createdBy = "foo"; |
1527 o.defaultExpiration = "foo"; | 1571 o.defaultExpiration = "foo"; |
1528 o.deployment = buildDeployment(); | 1572 o.deployment = buildDeployment(); |
1529 o.diskUsageBytes = "foo"; | 1573 o.diskUsageBytes = "foo"; |
1530 o.endpointsApiService = buildEndpointsApiService(); | 1574 o.endpointsApiService = buildEndpointsApiService(); |
1531 o.env = "foo"; | 1575 o.env = "foo"; |
1532 o.envVariables = buildUnnamed3074(); | 1576 o.envVariables = buildUnnamed2545(); |
1533 o.errorHandlers = buildUnnamed3075(); | 1577 o.errorHandlers = buildUnnamed2546(); |
1534 o.handlers = buildUnnamed3076(); | 1578 o.handlers = buildUnnamed2547(); |
1535 o.healthCheck = buildHealthCheck(); | 1579 o.healthCheck = buildHealthCheck(); |
1536 o.id = "foo"; | 1580 o.id = "foo"; |
1537 o.inboundServices = buildUnnamed3077(); | 1581 o.inboundServices = buildUnnamed2548(); |
1538 o.instanceClass = "foo"; | 1582 o.instanceClass = "foo"; |
1539 o.libraries = buildUnnamed3078(); | 1583 o.libraries = buildUnnamed2549(); |
1540 o.livenessCheck = buildLivenessCheck(); | 1584 o.livenessCheck = buildLivenessCheck(); |
1541 o.manualScaling = buildManualScaling(); | 1585 o.manualScaling = buildManualScaling(); |
1542 o.name = "foo"; | 1586 o.name = "foo"; |
1543 o.network = buildNetwork(); | 1587 o.network = buildNetwork(); |
1544 o.nobuildFilesRegex = "foo"; | 1588 o.nobuildFilesRegex = "foo"; |
1545 o.readinessCheck = buildReadinessCheck(); | 1589 o.readinessCheck = buildReadinessCheck(); |
1546 o.resources = buildResources(); | 1590 o.resources = buildResources(); |
1547 o.runtime = "foo"; | 1591 o.runtime = "foo"; |
| 1592 o.runtimeApiVersion = "foo"; |
1548 o.servingStatus = "foo"; | 1593 o.servingStatus = "foo"; |
1549 o.threadsafe = true; | 1594 o.threadsafe = true; |
1550 o.versionUrl = "foo"; | 1595 o.versionUrl = "foo"; |
1551 o.vm = true; | 1596 o.vm = true; |
1552 } | 1597 } |
1553 buildCounterVersion--; | 1598 buildCounterVersion--; |
1554 return o; | 1599 return o; |
1555 } | 1600 } |
1556 | 1601 |
1557 checkVersion(api.Version o) { | 1602 checkVersion(api.Version o) { |
1558 buildCounterVersion++; | 1603 buildCounterVersion++; |
1559 if (buildCounterVersion < 3) { | 1604 if (buildCounterVersion < 3) { |
1560 checkApiConfigHandler(o.apiConfig); | 1605 checkApiConfigHandler(o.apiConfig); |
1561 checkAutomaticScaling(o.automaticScaling); | 1606 checkAutomaticScaling(o.automaticScaling); |
1562 checkBasicScaling(o.basicScaling); | 1607 checkBasicScaling(o.basicScaling); |
1563 checkUnnamed3073(o.betaSettings); | 1608 checkUnnamed2544(o.betaSettings); |
1564 unittest.expect(o.createTime, unittest.equals('foo')); | 1609 unittest.expect(o.createTime, unittest.equals('foo')); |
1565 unittest.expect(o.createdBy, unittest.equals('foo')); | 1610 unittest.expect(o.createdBy, unittest.equals('foo')); |
1566 unittest.expect(o.defaultExpiration, unittest.equals('foo')); | 1611 unittest.expect(o.defaultExpiration, unittest.equals('foo')); |
1567 checkDeployment(o.deployment); | 1612 checkDeployment(o.deployment); |
1568 unittest.expect(o.diskUsageBytes, unittest.equals('foo')); | 1613 unittest.expect(o.diskUsageBytes, unittest.equals('foo')); |
1569 checkEndpointsApiService(o.endpointsApiService); | 1614 checkEndpointsApiService(o.endpointsApiService); |
1570 unittest.expect(o.env, unittest.equals('foo')); | 1615 unittest.expect(o.env, unittest.equals('foo')); |
1571 checkUnnamed3074(o.envVariables); | 1616 checkUnnamed2545(o.envVariables); |
1572 checkUnnamed3075(o.errorHandlers); | 1617 checkUnnamed2546(o.errorHandlers); |
1573 checkUnnamed3076(o.handlers); | 1618 checkUnnamed2547(o.handlers); |
1574 checkHealthCheck(o.healthCheck); | 1619 checkHealthCheck(o.healthCheck); |
1575 unittest.expect(o.id, unittest.equals('foo')); | 1620 unittest.expect(o.id, unittest.equals('foo')); |
1576 checkUnnamed3077(o.inboundServices); | 1621 checkUnnamed2548(o.inboundServices); |
1577 unittest.expect(o.instanceClass, unittest.equals('foo')); | 1622 unittest.expect(o.instanceClass, unittest.equals('foo')); |
1578 checkUnnamed3078(o.libraries); | 1623 checkUnnamed2549(o.libraries); |
1579 checkLivenessCheck(o.livenessCheck); | 1624 checkLivenessCheck(o.livenessCheck); |
1580 checkManualScaling(o.manualScaling); | 1625 checkManualScaling(o.manualScaling); |
1581 unittest.expect(o.name, unittest.equals('foo')); | 1626 unittest.expect(o.name, unittest.equals('foo')); |
1582 checkNetwork(o.network); | 1627 checkNetwork(o.network); |
1583 unittest.expect(o.nobuildFilesRegex, unittest.equals('foo')); | 1628 unittest.expect(o.nobuildFilesRegex, unittest.equals('foo')); |
1584 checkReadinessCheck(o.readinessCheck); | 1629 checkReadinessCheck(o.readinessCheck); |
1585 checkResources(o.resources); | 1630 checkResources(o.resources); |
1586 unittest.expect(o.runtime, unittest.equals('foo')); | 1631 unittest.expect(o.runtime, unittest.equals('foo')); |
| 1632 unittest.expect(o.runtimeApiVersion, unittest.equals('foo')); |
1587 unittest.expect(o.servingStatus, unittest.equals('foo')); | 1633 unittest.expect(o.servingStatus, unittest.equals('foo')); |
1588 unittest.expect(o.threadsafe, unittest.isTrue); | 1634 unittest.expect(o.threadsafe, unittest.isTrue); |
1589 unittest.expect(o.versionUrl, unittest.equals('foo')); | 1635 unittest.expect(o.versionUrl, unittest.equals('foo')); |
1590 unittest.expect(o.vm, unittest.isTrue); | 1636 unittest.expect(o.vm, unittest.isTrue); |
1591 } | 1637 } |
1592 buildCounterVersion--; | 1638 buildCounterVersion--; |
1593 } | 1639 } |
1594 | 1640 |
1595 core.int buildCounterVolume = 0; | 1641 core.int buildCounterVolume = 0; |
1596 buildVolume() { | 1642 buildVolume() { |
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1919 | 1965 |
1920 unittest.group("obj-schema-OperationMetadataV1", () { | 1966 unittest.group("obj-schema-OperationMetadataV1", () { |
1921 unittest.test("to-json--from-json", () { | 1967 unittest.test("to-json--from-json", () { |
1922 var o = buildOperationMetadataV1(); | 1968 var o = buildOperationMetadataV1(); |
1923 var od = new api.OperationMetadataV1.fromJson(o.toJson()); | 1969 var od = new api.OperationMetadataV1.fromJson(o.toJson()); |
1924 checkOperationMetadataV1(od); | 1970 checkOperationMetadataV1(od); |
1925 }); | 1971 }); |
1926 }); | 1972 }); |
1927 | 1973 |
1928 | 1974 |
| 1975 unittest.group("obj-schema-OperationMetadataV1Alpha", () { |
| 1976 unittest.test("to-json--from-json", () { |
| 1977 var o = buildOperationMetadataV1Alpha(); |
| 1978 var od = new api.OperationMetadataV1Alpha.fromJson(o.toJson()); |
| 1979 checkOperationMetadataV1Alpha(od); |
| 1980 }); |
| 1981 }); |
| 1982 |
| 1983 |
1929 unittest.group("obj-schema-OperationMetadataV1Beta", () { | 1984 unittest.group("obj-schema-OperationMetadataV1Beta", () { |
1930 unittest.test("to-json--from-json", () { | 1985 unittest.test("to-json--from-json", () { |
1931 var o = buildOperationMetadataV1Beta(); | 1986 var o = buildOperationMetadataV1Beta(); |
1932 var od = new api.OperationMetadataV1Beta.fromJson(o.toJson()); | 1987 var od = new api.OperationMetadataV1Beta.fromJson(o.toJson()); |
1933 checkOperationMetadataV1Beta(od); | 1988 checkOperationMetadataV1Beta(od); |
1934 }); | 1989 }); |
1935 }); | 1990 }); |
1936 | 1991 |
1937 | 1992 |
1938 unittest.group("obj-schema-OperationMetadataV1Beta5", () { | 1993 unittest.group("obj-schema-OperationMetadataV1Beta5", () { |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2069 }); | 2124 }); |
2070 }); | 2125 }); |
2071 | 2126 |
2072 | 2127 |
2073 unittest.group("resource-AppsResourceApi", () { | 2128 unittest.group("resource-AppsResourceApi", () { |
2074 unittest.test("method--create", () { | 2129 unittest.test("method--create", () { |
2075 | 2130 |
2076 var mock = new HttpServerMock(); | 2131 var mock = new HttpServerMock(); |
2077 api.AppsResourceApi res = new api.AppengineApi(mock).apps; | 2132 api.AppsResourceApi res = new api.AppengineApi(mock).apps; |
2078 var arg_request = buildApplication(); | 2133 var arg_request = buildApplication(); |
2079 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2134 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
2080 var obj = new api.Application.fromJson(json); | 2135 var obj = new api.Application.fromJson(json); |
2081 checkApplication(obj); | 2136 checkApplication(obj); |
2082 | 2137 |
2083 var path = (req.url).path; | 2138 var path = (req.url).path; |
2084 var pathOffset = 0; | 2139 var pathOffset = 0; |
2085 var index; | 2140 var index; |
2086 var subPart; | 2141 var subPart; |
2087 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2142 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
2088 pathOffset += 1; | 2143 pathOffset += 1; |
2089 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ
als("v1/apps")); | 2144 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ
als("v1/apps")); |
(...skipping 16 matching lines...) Expand all Loading... |
2106 } | 2161 } |
2107 } | 2162 } |
2108 | 2163 |
2109 | 2164 |
2110 var h = { | 2165 var h = { |
2111 "content-type" : "application/json; charset=utf-8", | 2166 "content-type" : "application/json; charset=utf-8", |
2112 }; | 2167 }; |
2113 var resp = convert.JSON.encode(buildOperation()); | 2168 var resp = convert.JSON.encode(buildOperation()); |
2114 return new async.Future.value(stringResponse(200, h, resp)); | 2169 return new async.Future.value(stringResponse(200, h, resp)); |
2115 }), true); | 2170 }), true); |
2116 res.create(arg_request).then(unittest.expectAsync(((api.Operation response
) { | 2171 res.create(arg_request).then(unittest.expectAsync1(((api.Operation respons
e) { |
2117 checkOperation(response); | 2172 checkOperation(response); |
2118 }))); | 2173 }))); |
2119 }); | 2174 }); |
2120 | 2175 |
2121 unittest.test("method--get", () { | 2176 unittest.test("method--get", () { |
2122 | 2177 |
2123 var mock = new HttpServerMock(); | 2178 var mock = new HttpServerMock(); |
2124 api.AppsResourceApi res = new api.AppengineApi(mock).apps; | 2179 api.AppsResourceApi res = new api.AppengineApi(mock).apps; |
2125 var arg_appsId = "foo"; | 2180 var arg_appsId = "foo"; |
2126 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2181 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
2127 var path = (req.url).path; | 2182 var path = (req.url).path; |
2128 var pathOffset = 0; | 2183 var pathOffset = 0; |
2129 var index; | 2184 var index; |
2130 var subPart; | 2185 var subPart; |
2131 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2186 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
2132 pathOffset += 1; | 2187 pathOffset += 1; |
2133 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1/apps/")); | 2188 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1/apps/")); |
2134 pathOffset += 8; | 2189 pathOffset += 8; |
2135 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | 2190 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
2136 pathOffset = path.length; | 2191 pathOffset = path.length; |
(...skipping 16 matching lines...) Expand all Loading... |
2153 } | 2208 } |
2154 } | 2209 } |
2155 | 2210 |
2156 | 2211 |
2157 var h = { | 2212 var h = { |
2158 "content-type" : "application/json; charset=utf-8", | 2213 "content-type" : "application/json; charset=utf-8", |
2159 }; | 2214 }; |
2160 var resp = convert.JSON.encode(buildApplication()); | 2215 var resp = convert.JSON.encode(buildApplication()); |
2161 return new async.Future.value(stringResponse(200, h, resp)); | 2216 return new async.Future.value(stringResponse(200, h, resp)); |
2162 }), true); | 2217 }), true); |
2163 res.get(arg_appsId).then(unittest.expectAsync(((api.Application response)
{ | 2218 res.get(arg_appsId).then(unittest.expectAsync1(((api.Application response)
{ |
2164 checkApplication(response); | 2219 checkApplication(response); |
2165 }))); | 2220 }))); |
2166 }); | 2221 }); |
2167 | 2222 |
2168 unittest.test("method--patch", () { | 2223 unittest.test("method--patch", () { |
2169 | 2224 |
2170 var mock = new HttpServerMock(); | 2225 var mock = new HttpServerMock(); |
2171 api.AppsResourceApi res = new api.AppengineApi(mock).apps; | 2226 api.AppsResourceApi res = new api.AppengineApi(mock).apps; |
2172 var arg_request = buildApplication(); | 2227 var arg_request = buildApplication(); |
2173 var arg_appsId = "foo"; | 2228 var arg_appsId = "foo"; |
2174 var arg_updateMask = "foo"; | 2229 var arg_updateMask = "foo"; |
2175 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2230 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
2176 var obj = new api.Application.fromJson(json); | 2231 var obj = new api.Application.fromJson(json); |
2177 checkApplication(obj); | 2232 checkApplication(obj); |
2178 | 2233 |
2179 var path = (req.url).path; | 2234 var path = (req.url).path; |
2180 var pathOffset = 0; | 2235 var pathOffset = 0; |
2181 var index; | 2236 var index; |
2182 var subPart; | 2237 var subPart; |
2183 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2238 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
2184 pathOffset += 1; | 2239 pathOffset += 1; |
2185 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1/apps/")); | 2240 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1/apps/")); |
(...skipping 20 matching lines...) Expand all Loading... |
2206 } | 2261 } |
2207 unittest.expect(queryMap["updateMask"].first, unittest.equals(arg_update
Mask)); | 2262 unittest.expect(queryMap["updateMask"].first, unittest.equals(arg_update
Mask)); |
2208 | 2263 |
2209 | 2264 |
2210 var h = { | 2265 var h = { |
2211 "content-type" : "application/json; charset=utf-8", | 2266 "content-type" : "application/json; charset=utf-8", |
2212 }; | 2267 }; |
2213 var resp = convert.JSON.encode(buildOperation()); | 2268 var resp = convert.JSON.encode(buildOperation()); |
2214 return new async.Future.value(stringResponse(200, h, resp)); | 2269 return new async.Future.value(stringResponse(200, h, resp)); |
2215 }), true); | 2270 }), true); |
2216 res.patch(arg_request, arg_appsId, updateMask: arg_updateMask).then(unitte
st.expectAsync(((api.Operation response) { | 2271 res.patch(arg_request, arg_appsId, updateMask: arg_updateMask).then(unitte
st.expectAsync1(((api.Operation response) { |
2217 checkOperation(response); | 2272 checkOperation(response); |
2218 }))); | 2273 }))); |
2219 }); | 2274 }); |
2220 | 2275 |
2221 unittest.test("method--repair", () { | 2276 unittest.test("method--repair", () { |
2222 | 2277 |
2223 var mock = new HttpServerMock(); | 2278 var mock = new HttpServerMock(); |
2224 api.AppsResourceApi res = new api.AppengineApi(mock).apps; | 2279 api.AppsResourceApi res = new api.AppengineApi(mock).apps; |
2225 var arg_request = buildRepairApplicationRequest(); | 2280 var arg_request = buildRepairApplicationRequest(); |
2226 var arg_appsId = "foo"; | 2281 var arg_appsId = "foo"; |
2227 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2282 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
2228 var obj = new api.RepairApplicationRequest.fromJson(json); | 2283 var obj = new api.RepairApplicationRequest.fromJson(json); |
2229 checkRepairApplicationRequest(obj); | 2284 checkRepairApplicationRequest(obj); |
2230 | 2285 |
2231 var path = (req.url).path; | 2286 var path = (req.url).path; |
2232 var pathOffset = 0; | 2287 var pathOffset = 0; |
2233 var index; | 2288 var index; |
2234 var subPart; | 2289 var subPart; |
2235 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2290 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
2236 pathOffset += 1; | 2291 pathOffset += 1; |
2237 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1/apps/")); | 2292 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1/apps/")); |
(...skipping 23 matching lines...) Expand all Loading... |
2261 } | 2316 } |
2262 } | 2317 } |
2263 | 2318 |
2264 | 2319 |
2265 var h = { | 2320 var h = { |
2266 "content-type" : "application/json; charset=utf-8", | 2321 "content-type" : "application/json; charset=utf-8", |
2267 }; | 2322 }; |
2268 var resp = convert.JSON.encode(buildOperation()); | 2323 var resp = convert.JSON.encode(buildOperation()); |
2269 return new async.Future.value(stringResponse(200, h, resp)); | 2324 return new async.Future.value(stringResponse(200, h, resp)); |
2270 }), true); | 2325 }), true); |
2271 res.repair(arg_request, arg_appsId).then(unittest.expectAsync(((api.Operat
ion response) { | 2326 res.repair(arg_request, arg_appsId).then(unittest.expectAsync1(((api.Opera
tion response) { |
2272 checkOperation(response); | 2327 checkOperation(response); |
2273 }))); | 2328 }))); |
2274 }); | 2329 }); |
2275 | 2330 |
2276 }); | 2331 }); |
2277 | 2332 |
2278 | 2333 |
2279 unittest.group("resource-AppsLocationsResourceApi", () { | 2334 unittest.group("resource-AppsLocationsResourceApi", () { |
2280 unittest.test("method--get", () { | 2335 unittest.test("method--get", () { |
2281 | 2336 |
2282 var mock = new HttpServerMock(); | 2337 var mock = new HttpServerMock(); |
2283 api.AppsLocationsResourceApi res = new api.AppengineApi(mock).apps.locatio
ns; | 2338 api.AppsLocationsResourceApi res = new api.AppengineApi(mock).apps.locatio
ns; |
2284 var arg_appsId = "foo"; | 2339 var arg_appsId = "foo"; |
2285 var arg_locationsId = "foo"; | 2340 var arg_locationsId = "foo"; |
2286 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2341 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
2287 var path = (req.url).path; | 2342 var path = (req.url).path; |
2288 var pathOffset = 0; | 2343 var pathOffset = 0; |
2289 var index; | 2344 var index; |
2290 var subPart; | 2345 var subPart; |
2291 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2346 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
2292 pathOffset += 1; | 2347 pathOffset += 1; |
2293 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1/apps/")); | 2348 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1/apps/")); |
2294 pathOffset += 8; | 2349 pathOffset += 8; |
2295 index = path.indexOf("/locations/", pathOffset); | 2350 index = path.indexOf("/locations/", pathOffset); |
2296 unittest.expect(index >= 0, unittest.isTrue); | 2351 unittest.expect(index >= 0, unittest.isTrue); |
(...skipping 23 matching lines...) Expand all Loading... |
2320 } | 2375 } |
2321 } | 2376 } |
2322 | 2377 |
2323 | 2378 |
2324 var h = { | 2379 var h = { |
2325 "content-type" : "application/json; charset=utf-8", | 2380 "content-type" : "application/json; charset=utf-8", |
2326 }; | 2381 }; |
2327 var resp = convert.JSON.encode(buildLocation()); | 2382 var resp = convert.JSON.encode(buildLocation()); |
2328 return new async.Future.value(stringResponse(200, h, resp)); | 2383 return new async.Future.value(stringResponse(200, h, resp)); |
2329 }), true); | 2384 }), true); |
2330 res.get(arg_appsId, arg_locationsId).then(unittest.expectAsync(((api.Locat
ion response) { | 2385 res.get(arg_appsId, arg_locationsId).then(unittest.expectAsync1(((api.Loca
tion response) { |
2331 checkLocation(response); | 2386 checkLocation(response); |
2332 }))); | 2387 }))); |
2333 }); | 2388 }); |
2334 | 2389 |
2335 unittest.test("method--list", () { | 2390 unittest.test("method--list", () { |
2336 | 2391 |
2337 var mock = new HttpServerMock(); | 2392 var mock = new HttpServerMock(); |
2338 api.AppsLocationsResourceApi res = new api.AppengineApi(mock).apps.locatio
ns; | 2393 api.AppsLocationsResourceApi res = new api.AppengineApi(mock).apps.locatio
ns; |
2339 var arg_appsId = "foo"; | 2394 var arg_appsId = "foo"; |
2340 var arg_pageSize = 42; | |
2341 var arg_filter = "foo"; | 2395 var arg_filter = "foo"; |
2342 var arg_pageToken = "foo"; | 2396 var arg_pageToken = "foo"; |
2343 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2397 var arg_pageSize = 42; |
| 2398 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
2344 var path = (req.url).path; | 2399 var path = (req.url).path; |
2345 var pathOffset = 0; | 2400 var pathOffset = 0; |
2346 var index; | 2401 var index; |
2347 var subPart; | 2402 var subPart; |
2348 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2403 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
2349 pathOffset += 1; | 2404 pathOffset += 1; |
2350 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1/apps/")); | 2405 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1/apps/")); |
2351 pathOffset += 8; | 2406 pathOffset += 8; |
2352 index = path.indexOf("/locations", pathOffset); | 2407 index = path.indexOf("/locations", pathOffset); |
2353 unittest.expect(index >= 0, unittest.isTrue); | 2408 unittest.expect(index >= 0, unittest.isTrue); |
(...skipping 12 matching lines...) Expand all Loading... |
2366 if (n == "false") return false; | 2421 if (n == "false") return false; |
2367 if (n == null) return null; | 2422 if (n == null) return null; |
2368 throw new core.ArgumentError("Invalid boolean: $n"); | 2423 throw new core.ArgumentError("Invalid boolean: $n"); |
2369 } | 2424 } |
2370 if (query.length > 0) { | 2425 if (query.length > 0) { |
2371 for (var part in query.split("&")) { | 2426 for (var part in query.split("&")) { |
2372 var keyvalue = part.split("="); | 2427 var keyvalue = part.split("="); |
2373 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2428 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
2374 } | 2429 } |
2375 } | 2430 } |
2376 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); | |
2377 unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); | 2431 unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); |
2378 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 2432 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
| 2433 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); |
2379 | 2434 |
2380 | 2435 |
2381 var h = { | 2436 var h = { |
2382 "content-type" : "application/json; charset=utf-8", | 2437 "content-type" : "application/json; charset=utf-8", |
2383 }; | 2438 }; |
2384 var resp = convert.JSON.encode(buildListLocationsResponse()); | 2439 var resp = convert.JSON.encode(buildListLocationsResponse()); |
2385 return new async.Future.value(stringResponse(200, h, resp)); | 2440 return new async.Future.value(stringResponse(200, h, resp)); |
2386 }), true); | 2441 }), true); |
2387 res.list(arg_appsId, pageSize: arg_pageSize, filter: arg_filter, pageToken
: arg_pageToken).then(unittest.expectAsync(((api.ListLocationsResponse response)
{ | 2442 res.list(arg_appsId, filter: arg_filter, pageToken: arg_pageToken, pageSiz
e: arg_pageSize).then(unittest.expectAsync1(((api.ListLocationsResponse response
) { |
2388 checkListLocationsResponse(response); | 2443 checkListLocationsResponse(response); |
2389 }))); | 2444 }))); |
2390 }); | 2445 }); |
2391 | 2446 |
2392 }); | 2447 }); |
2393 | 2448 |
2394 | 2449 |
2395 unittest.group("resource-AppsOperationsResourceApi", () { | 2450 unittest.group("resource-AppsOperationsResourceApi", () { |
2396 unittest.test("method--get", () { | 2451 unittest.test("method--get", () { |
2397 | 2452 |
2398 var mock = new HttpServerMock(); | 2453 var mock = new HttpServerMock(); |
2399 api.AppsOperationsResourceApi res = new api.AppengineApi(mock).apps.operat
ions; | 2454 api.AppsOperationsResourceApi res = new api.AppengineApi(mock).apps.operat
ions; |
2400 var arg_appsId = "foo"; | 2455 var arg_appsId = "foo"; |
2401 var arg_operationsId = "foo"; | 2456 var arg_operationsId = "foo"; |
2402 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2457 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
2403 var path = (req.url).path; | 2458 var path = (req.url).path; |
2404 var pathOffset = 0; | 2459 var pathOffset = 0; |
2405 var index; | 2460 var index; |
2406 var subPart; | 2461 var subPart; |
2407 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2462 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
2408 pathOffset += 1; | 2463 pathOffset += 1; |
2409 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1/apps/")); | 2464 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1/apps/")); |
2410 pathOffset += 8; | 2465 pathOffset += 8; |
2411 index = path.indexOf("/operations/", pathOffset); | 2466 index = path.indexOf("/operations/", pathOffset); |
2412 unittest.expect(index >= 0, unittest.isTrue); | 2467 unittest.expect(index >= 0, unittest.isTrue); |
(...skipping 23 matching lines...) Expand all Loading... |
2436 } | 2491 } |
2437 } | 2492 } |
2438 | 2493 |
2439 | 2494 |
2440 var h = { | 2495 var h = { |
2441 "content-type" : "application/json; charset=utf-8", | 2496 "content-type" : "application/json; charset=utf-8", |
2442 }; | 2497 }; |
2443 var resp = convert.JSON.encode(buildOperation()); | 2498 var resp = convert.JSON.encode(buildOperation()); |
2444 return new async.Future.value(stringResponse(200, h, resp)); | 2499 return new async.Future.value(stringResponse(200, h, resp)); |
2445 }), true); | 2500 }), true); |
2446 res.get(arg_appsId, arg_operationsId).then(unittest.expectAsync(((api.Oper
ation response) { | 2501 res.get(arg_appsId, arg_operationsId).then(unittest.expectAsync1(((api.Ope
ration response) { |
2447 checkOperation(response); | 2502 checkOperation(response); |
2448 }))); | 2503 }))); |
2449 }); | 2504 }); |
2450 | 2505 |
2451 unittest.test("method--list", () { | 2506 unittest.test("method--list", () { |
2452 | 2507 |
2453 var mock = new HttpServerMock(); | 2508 var mock = new HttpServerMock(); |
2454 api.AppsOperationsResourceApi res = new api.AppengineApi(mock).apps.operat
ions; | 2509 api.AppsOperationsResourceApi res = new api.AppengineApi(mock).apps.operat
ions; |
2455 var arg_appsId = "foo"; | 2510 var arg_appsId = "foo"; |
2456 var arg_pageSize = 42; | 2511 var arg_pageSize = 42; |
2457 var arg_filter = "foo"; | 2512 var arg_filter = "foo"; |
2458 var arg_pageToken = "foo"; | 2513 var arg_pageToken = "foo"; |
2459 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2514 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
2460 var path = (req.url).path; | 2515 var path = (req.url).path; |
2461 var pathOffset = 0; | 2516 var pathOffset = 0; |
2462 var index; | 2517 var index; |
2463 var subPart; | 2518 var subPart; |
2464 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2519 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
2465 pathOffset += 1; | 2520 pathOffset += 1; |
2466 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1/apps/")); | 2521 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1/apps/")); |
2467 pathOffset += 8; | 2522 pathOffset += 8; |
2468 index = path.indexOf("/operations", pathOffset); | 2523 index = path.indexOf("/operations", pathOffset); |
2469 unittest.expect(index >= 0, unittest.isTrue); | 2524 unittest.expect(index >= 0, unittest.isTrue); |
(...skipping 23 matching lines...) Expand all Loading... |
2493 unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); | 2548 unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); |
2494 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 2549 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
2495 | 2550 |
2496 | 2551 |
2497 var h = { | 2552 var h = { |
2498 "content-type" : "application/json; charset=utf-8", | 2553 "content-type" : "application/json; charset=utf-8", |
2499 }; | 2554 }; |
2500 var resp = convert.JSON.encode(buildListOperationsResponse()); | 2555 var resp = convert.JSON.encode(buildListOperationsResponse()); |
2501 return new async.Future.value(stringResponse(200, h, resp)); | 2556 return new async.Future.value(stringResponse(200, h, resp)); |
2502 }), true); | 2557 }), true); |
2503 res.list(arg_appsId, pageSize: arg_pageSize, filter: arg_filter, pageToken
: arg_pageToken).then(unittest.expectAsync(((api.ListOperationsResponse response
) { | 2558 res.list(arg_appsId, pageSize: arg_pageSize, filter: arg_filter, pageToken
: arg_pageToken).then(unittest.expectAsync1(((api.ListOperationsResponse respons
e) { |
2504 checkListOperationsResponse(response); | 2559 checkListOperationsResponse(response); |
2505 }))); | 2560 }))); |
2506 }); | 2561 }); |
2507 | 2562 |
2508 }); | 2563 }); |
2509 | 2564 |
2510 | 2565 |
2511 unittest.group("resource-AppsServicesResourceApi", () { | 2566 unittest.group("resource-AppsServicesResourceApi", () { |
2512 unittest.test("method--delete", () { | 2567 unittest.test("method--delete", () { |
2513 | 2568 |
2514 var mock = new HttpServerMock(); | 2569 var mock = new HttpServerMock(); |
2515 api.AppsServicesResourceApi res = new api.AppengineApi(mock).apps.services
; | 2570 api.AppsServicesResourceApi res = new api.AppengineApi(mock).apps.services
; |
2516 var arg_appsId = "foo"; | 2571 var arg_appsId = "foo"; |
2517 var arg_servicesId = "foo"; | 2572 var arg_servicesId = "foo"; |
2518 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2573 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
2519 var path = (req.url).path; | 2574 var path = (req.url).path; |
2520 var pathOffset = 0; | 2575 var pathOffset = 0; |
2521 var index; | 2576 var index; |
2522 var subPart; | 2577 var subPart; |
2523 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2578 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
2524 pathOffset += 1; | 2579 pathOffset += 1; |
2525 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1/apps/")); | 2580 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1/apps/")); |
2526 pathOffset += 8; | 2581 pathOffset += 8; |
2527 index = path.indexOf("/services/", pathOffset); | 2582 index = path.indexOf("/services/", pathOffset); |
2528 unittest.expect(index >= 0, unittest.isTrue); | 2583 unittest.expect(index >= 0, unittest.isTrue); |
(...skipping 23 matching lines...) Expand all Loading... |
2552 } | 2607 } |
2553 } | 2608 } |
2554 | 2609 |
2555 | 2610 |
2556 var h = { | 2611 var h = { |
2557 "content-type" : "application/json; charset=utf-8", | 2612 "content-type" : "application/json; charset=utf-8", |
2558 }; | 2613 }; |
2559 var resp = convert.JSON.encode(buildOperation()); | 2614 var resp = convert.JSON.encode(buildOperation()); |
2560 return new async.Future.value(stringResponse(200, h, resp)); | 2615 return new async.Future.value(stringResponse(200, h, resp)); |
2561 }), true); | 2616 }), true); |
2562 res.delete(arg_appsId, arg_servicesId).then(unittest.expectAsync(((api.Ope
ration response) { | 2617 res.delete(arg_appsId, arg_servicesId).then(unittest.expectAsync1(((api.Op
eration response) { |
2563 checkOperation(response); | 2618 checkOperation(response); |
2564 }))); | 2619 }))); |
2565 }); | 2620 }); |
2566 | 2621 |
2567 unittest.test("method--get", () { | 2622 unittest.test("method--get", () { |
2568 | 2623 |
2569 var mock = new HttpServerMock(); | 2624 var mock = new HttpServerMock(); |
2570 api.AppsServicesResourceApi res = new api.AppengineApi(mock).apps.services
; | 2625 api.AppsServicesResourceApi res = new api.AppengineApi(mock).apps.services
; |
2571 var arg_appsId = "foo"; | 2626 var arg_appsId = "foo"; |
2572 var arg_servicesId = "foo"; | 2627 var arg_servicesId = "foo"; |
2573 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2628 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
2574 var path = (req.url).path; | 2629 var path = (req.url).path; |
2575 var pathOffset = 0; | 2630 var pathOffset = 0; |
2576 var index; | 2631 var index; |
2577 var subPart; | 2632 var subPart; |
2578 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2633 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
2579 pathOffset += 1; | 2634 pathOffset += 1; |
2580 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1/apps/")); | 2635 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1/apps/")); |
2581 pathOffset += 8; | 2636 pathOffset += 8; |
2582 index = path.indexOf("/services/", pathOffset); | 2637 index = path.indexOf("/services/", pathOffset); |
2583 unittest.expect(index >= 0, unittest.isTrue); | 2638 unittest.expect(index >= 0, unittest.isTrue); |
(...skipping 23 matching lines...) Expand all Loading... |
2607 } | 2662 } |
2608 } | 2663 } |
2609 | 2664 |
2610 | 2665 |
2611 var h = { | 2666 var h = { |
2612 "content-type" : "application/json; charset=utf-8", | 2667 "content-type" : "application/json; charset=utf-8", |
2613 }; | 2668 }; |
2614 var resp = convert.JSON.encode(buildService()); | 2669 var resp = convert.JSON.encode(buildService()); |
2615 return new async.Future.value(stringResponse(200, h, resp)); | 2670 return new async.Future.value(stringResponse(200, h, resp)); |
2616 }), true); | 2671 }), true); |
2617 res.get(arg_appsId, arg_servicesId).then(unittest.expectAsync(((api.Servic
e response) { | 2672 res.get(arg_appsId, arg_servicesId).then(unittest.expectAsync1(((api.Servi
ce response) { |
2618 checkService(response); | 2673 checkService(response); |
2619 }))); | 2674 }))); |
2620 }); | 2675 }); |
2621 | 2676 |
2622 unittest.test("method--list", () { | 2677 unittest.test("method--list", () { |
2623 | 2678 |
2624 var mock = new HttpServerMock(); | 2679 var mock = new HttpServerMock(); |
2625 api.AppsServicesResourceApi res = new api.AppengineApi(mock).apps.services
; | 2680 api.AppsServicesResourceApi res = new api.AppengineApi(mock).apps.services
; |
2626 var arg_appsId = "foo"; | 2681 var arg_appsId = "foo"; |
| 2682 var arg_pageToken = "foo"; |
2627 var arg_pageSize = 42; | 2683 var arg_pageSize = 42; |
2628 var arg_pageToken = "foo"; | 2684 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
2629 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
2630 var path = (req.url).path; | 2685 var path = (req.url).path; |
2631 var pathOffset = 0; | 2686 var pathOffset = 0; |
2632 var index; | 2687 var index; |
2633 var subPart; | 2688 var subPart; |
2634 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2689 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
2635 pathOffset += 1; | 2690 pathOffset += 1; |
2636 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1/apps/")); | 2691 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1/apps/")); |
2637 pathOffset += 8; | 2692 pathOffset += 8; |
2638 index = path.indexOf("/services", pathOffset); | 2693 index = path.indexOf("/services", pathOffset); |
2639 unittest.expect(index >= 0, unittest.isTrue); | 2694 unittest.expect(index >= 0, unittest.isTrue); |
(...skipping 12 matching lines...) Expand all Loading... |
2652 if (n == "false") return false; | 2707 if (n == "false") return false; |
2653 if (n == null) return null; | 2708 if (n == null) return null; |
2654 throw new core.ArgumentError("Invalid boolean: $n"); | 2709 throw new core.ArgumentError("Invalid boolean: $n"); |
2655 } | 2710 } |
2656 if (query.length > 0) { | 2711 if (query.length > 0) { |
2657 for (var part in query.split("&")) { | 2712 for (var part in query.split("&")) { |
2658 var keyvalue = part.split("="); | 2713 var keyvalue = part.split("="); |
2659 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2714 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
2660 } | 2715 } |
2661 } | 2716 } |
| 2717 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
2662 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); | 2718 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); |
2663 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
2664 | 2719 |
2665 | 2720 |
2666 var h = { | 2721 var h = { |
2667 "content-type" : "application/json; charset=utf-8", | 2722 "content-type" : "application/json; charset=utf-8", |
2668 }; | 2723 }; |
2669 var resp = convert.JSON.encode(buildListServicesResponse()); | 2724 var resp = convert.JSON.encode(buildListServicesResponse()); |
2670 return new async.Future.value(stringResponse(200, h, resp)); | 2725 return new async.Future.value(stringResponse(200, h, resp)); |
2671 }), true); | 2726 }), true); |
2672 res.list(arg_appsId, pageSize: arg_pageSize, pageToken: arg_pageToken).the
n(unittest.expectAsync(((api.ListServicesResponse response) { | 2727 res.list(arg_appsId, pageToken: arg_pageToken, pageSize: arg_pageSize).the
n(unittest.expectAsync1(((api.ListServicesResponse response) { |
2673 checkListServicesResponse(response); | 2728 checkListServicesResponse(response); |
2674 }))); | 2729 }))); |
2675 }); | 2730 }); |
2676 | 2731 |
2677 unittest.test("method--patch", () { | 2732 unittest.test("method--patch", () { |
2678 | 2733 |
2679 var mock = new HttpServerMock(); | 2734 var mock = new HttpServerMock(); |
2680 api.AppsServicesResourceApi res = new api.AppengineApi(mock).apps.services
; | 2735 api.AppsServicesResourceApi res = new api.AppengineApi(mock).apps.services
; |
2681 var arg_request = buildService(); | 2736 var arg_request = buildService(); |
2682 var arg_appsId = "foo"; | 2737 var arg_appsId = "foo"; |
2683 var arg_servicesId = "foo"; | 2738 var arg_servicesId = "foo"; |
2684 var arg_updateMask = "foo"; | 2739 var arg_updateMask = "foo"; |
2685 var arg_migrateTraffic = true; | 2740 var arg_migrateTraffic = true; |
2686 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2741 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
2687 var obj = new api.Service.fromJson(json); | 2742 var obj = new api.Service.fromJson(json); |
2688 checkService(obj); | 2743 checkService(obj); |
2689 | 2744 |
2690 var path = (req.url).path; | 2745 var path = (req.url).path; |
2691 var pathOffset = 0; | 2746 var pathOffset = 0; |
2692 var index; | 2747 var index; |
2693 var subPart; | 2748 var subPart; |
2694 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2749 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
2695 pathOffset += 1; | 2750 pathOffset += 1; |
2696 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1/apps/")); | 2751 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1/apps/")); |
(...skipping 28 matching lines...) Expand all Loading... |
2725 unittest.expect(queryMap["updateMask"].first, unittest.equals(arg_update
Mask)); | 2780 unittest.expect(queryMap["updateMask"].first, unittest.equals(arg_update
Mask)); |
2726 unittest.expect(queryMap["migrateTraffic"].first, unittest.equals("$arg_
migrateTraffic")); | 2781 unittest.expect(queryMap["migrateTraffic"].first, unittest.equals("$arg_
migrateTraffic")); |
2727 | 2782 |
2728 | 2783 |
2729 var h = { | 2784 var h = { |
2730 "content-type" : "application/json; charset=utf-8", | 2785 "content-type" : "application/json; charset=utf-8", |
2731 }; | 2786 }; |
2732 var resp = convert.JSON.encode(buildOperation()); | 2787 var resp = convert.JSON.encode(buildOperation()); |
2733 return new async.Future.value(stringResponse(200, h, resp)); | 2788 return new async.Future.value(stringResponse(200, h, resp)); |
2734 }), true); | 2789 }), true); |
2735 res.patch(arg_request, arg_appsId, arg_servicesId, updateMask: arg_updateM
ask, migrateTraffic: arg_migrateTraffic).then(unittest.expectAsync(((api.Operati
on response) { | 2790 res.patch(arg_request, arg_appsId, arg_servicesId, updateMask: arg_updateM
ask, migrateTraffic: arg_migrateTraffic).then(unittest.expectAsync1(((api.Operat
ion response) { |
2736 checkOperation(response); | 2791 checkOperation(response); |
2737 }))); | 2792 }))); |
2738 }); | 2793 }); |
2739 | 2794 |
2740 }); | 2795 }); |
2741 | 2796 |
2742 | 2797 |
2743 unittest.group("resource-AppsServicesVersionsResourceApi", () { | 2798 unittest.group("resource-AppsServicesVersionsResourceApi", () { |
2744 unittest.test("method--create", () { | 2799 unittest.test("method--create", () { |
2745 | 2800 |
2746 var mock = new HttpServerMock(); | 2801 var mock = new HttpServerMock(); |
2747 api.AppsServicesVersionsResourceApi res = new api.AppengineApi(mock).apps.
services.versions; | 2802 api.AppsServicesVersionsResourceApi res = new api.AppengineApi(mock).apps.
services.versions; |
2748 var arg_request = buildVersion(); | 2803 var arg_request = buildVersion(); |
2749 var arg_appsId = "foo"; | 2804 var arg_appsId = "foo"; |
2750 var arg_servicesId = "foo"; | 2805 var arg_servicesId = "foo"; |
2751 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2806 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
2752 var obj = new api.Version.fromJson(json); | 2807 var obj = new api.Version.fromJson(json); |
2753 checkVersion(obj); | 2808 checkVersion(obj); |
2754 | 2809 |
2755 var path = (req.url).path; | 2810 var path = (req.url).path; |
2756 var pathOffset = 0; | 2811 var pathOffset = 0; |
2757 var index; | 2812 var index; |
2758 var subPart; | 2813 var subPart; |
2759 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2814 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
2760 pathOffset += 1; | 2815 pathOffset += 1; |
2761 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1/apps/")); | 2816 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1/apps/")); |
(...skipping 30 matching lines...) Expand all Loading... |
2792 } | 2847 } |
2793 } | 2848 } |
2794 | 2849 |
2795 | 2850 |
2796 var h = { | 2851 var h = { |
2797 "content-type" : "application/json; charset=utf-8", | 2852 "content-type" : "application/json; charset=utf-8", |
2798 }; | 2853 }; |
2799 var resp = convert.JSON.encode(buildOperation()); | 2854 var resp = convert.JSON.encode(buildOperation()); |
2800 return new async.Future.value(stringResponse(200, h, resp)); | 2855 return new async.Future.value(stringResponse(200, h, resp)); |
2801 }), true); | 2856 }), true); |
2802 res.create(arg_request, arg_appsId, arg_servicesId).then(unittest.expectAs
ync(((api.Operation response) { | 2857 res.create(arg_request, arg_appsId, arg_servicesId).then(unittest.expectAs
ync1(((api.Operation response) { |
2803 checkOperation(response); | 2858 checkOperation(response); |
2804 }))); | 2859 }))); |
2805 }); | 2860 }); |
2806 | 2861 |
2807 unittest.test("method--delete", () { | 2862 unittest.test("method--delete", () { |
2808 | 2863 |
2809 var mock = new HttpServerMock(); | 2864 var mock = new HttpServerMock(); |
2810 api.AppsServicesVersionsResourceApi res = new api.AppengineApi(mock).apps.
services.versions; | 2865 api.AppsServicesVersionsResourceApi res = new api.AppengineApi(mock).apps.
services.versions; |
2811 var arg_appsId = "foo"; | 2866 var arg_appsId = "foo"; |
2812 var arg_servicesId = "foo"; | 2867 var arg_servicesId = "foo"; |
2813 var arg_versionsId = "foo"; | 2868 var arg_versionsId = "foo"; |
2814 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2869 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
2815 var path = (req.url).path; | 2870 var path = (req.url).path; |
2816 var pathOffset = 0; | 2871 var pathOffset = 0; |
2817 var index; | 2872 var index; |
2818 var subPart; | 2873 var subPart; |
2819 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2874 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
2820 pathOffset += 1; | 2875 pathOffset += 1; |
2821 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1/apps/")); | 2876 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1/apps/")); |
2822 pathOffset += 8; | 2877 pathOffset += 8; |
2823 index = path.indexOf("/services/", pathOffset); | 2878 index = path.indexOf("/services/", pathOffset); |
2824 unittest.expect(index >= 0, unittest.isTrue); | 2879 unittest.expect(index >= 0, unittest.isTrue); |
(...skipping 30 matching lines...) Expand all Loading... |
2855 } | 2910 } |
2856 } | 2911 } |
2857 | 2912 |
2858 | 2913 |
2859 var h = { | 2914 var h = { |
2860 "content-type" : "application/json; charset=utf-8", | 2915 "content-type" : "application/json; charset=utf-8", |
2861 }; | 2916 }; |
2862 var resp = convert.JSON.encode(buildOperation()); | 2917 var resp = convert.JSON.encode(buildOperation()); |
2863 return new async.Future.value(stringResponse(200, h, resp)); | 2918 return new async.Future.value(stringResponse(200, h, resp)); |
2864 }), true); | 2919 }), true); |
2865 res.delete(arg_appsId, arg_servicesId, arg_versionsId).then(unittest.expec
tAsync(((api.Operation response) { | 2920 res.delete(arg_appsId, arg_servicesId, arg_versionsId).then(unittest.expec
tAsync1(((api.Operation response) { |
2866 checkOperation(response); | 2921 checkOperation(response); |
2867 }))); | 2922 }))); |
2868 }); | 2923 }); |
2869 | 2924 |
2870 unittest.test("method--get", () { | 2925 unittest.test("method--get", () { |
2871 | 2926 |
2872 var mock = new HttpServerMock(); | 2927 var mock = new HttpServerMock(); |
2873 api.AppsServicesVersionsResourceApi res = new api.AppengineApi(mock).apps.
services.versions; | 2928 api.AppsServicesVersionsResourceApi res = new api.AppengineApi(mock).apps.
services.versions; |
2874 var arg_appsId = "foo"; | 2929 var arg_appsId = "foo"; |
2875 var arg_servicesId = "foo"; | 2930 var arg_servicesId = "foo"; |
2876 var arg_versionsId = "foo"; | 2931 var arg_versionsId = "foo"; |
2877 var arg_view = "foo"; | 2932 var arg_view = "foo"; |
2878 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2933 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
2879 var path = (req.url).path; | 2934 var path = (req.url).path; |
2880 var pathOffset = 0; | 2935 var pathOffset = 0; |
2881 var index; | 2936 var index; |
2882 var subPart; | 2937 var subPart; |
2883 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2938 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
2884 pathOffset += 1; | 2939 pathOffset += 1; |
2885 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1/apps/")); | 2940 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1/apps/")); |
2886 pathOffset += 8; | 2941 pathOffset += 8; |
2887 index = path.indexOf("/services/", pathOffset); | 2942 index = path.indexOf("/services/", pathOffset); |
2888 unittest.expect(index >= 0, unittest.isTrue); | 2943 unittest.expect(index >= 0, unittest.isTrue); |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2920 } | 2975 } |
2921 unittest.expect(queryMap["view"].first, unittest.equals(arg_view)); | 2976 unittest.expect(queryMap["view"].first, unittest.equals(arg_view)); |
2922 | 2977 |
2923 | 2978 |
2924 var h = { | 2979 var h = { |
2925 "content-type" : "application/json; charset=utf-8", | 2980 "content-type" : "application/json; charset=utf-8", |
2926 }; | 2981 }; |
2927 var resp = convert.JSON.encode(buildVersion()); | 2982 var resp = convert.JSON.encode(buildVersion()); |
2928 return new async.Future.value(stringResponse(200, h, resp)); | 2983 return new async.Future.value(stringResponse(200, h, resp)); |
2929 }), true); | 2984 }), true); |
2930 res.get(arg_appsId, arg_servicesId, arg_versionsId, view: arg_view).then(u
nittest.expectAsync(((api.Version response) { | 2985 res.get(arg_appsId, arg_servicesId, arg_versionsId, view: arg_view).then(u
nittest.expectAsync1(((api.Version response) { |
2931 checkVersion(response); | 2986 checkVersion(response); |
2932 }))); | 2987 }))); |
2933 }); | 2988 }); |
2934 | 2989 |
2935 unittest.test("method--list", () { | 2990 unittest.test("method--list", () { |
2936 | 2991 |
2937 var mock = new HttpServerMock(); | 2992 var mock = new HttpServerMock(); |
2938 api.AppsServicesVersionsResourceApi res = new api.AppengineApi(mock).apps.
services.versions; | 2993 api.AppsServicesVersionsResourceApi res = new api.AppengineApi(mock).apps.
services.versions; |
2939 var arg_appsId = "foo"; | 2994 var arg_appsId = "foo"; |
2940 var arg_servicesId = "foo"; | 2995 var arg_servicesId = "foo"; |
2941 var arg_pageSize = 42; | 2996 var arg_pageSize = 42; |
2942 var arg_view = "foo"; | 2997 var arg_view = "foo"; |
2943 var arg_pageToken = "foo"; | 2998 var arg_pageToken = "foo"; |
2944 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2999 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
2945 var path = (req.url).path; | 3000 var path = (req.url).path; |
2946 var pathOffset = 0; | 3001 var pathOffset = 0; |
2947 var index; | 3002 var index; |
2948 var subPart; | 3003 var subPart; |
2949 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3004 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
2950 pathOffset += 1; | 3005 pathOffset += 1; |
2951 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1/apps/")); | 3006 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1/apps/")); |
2952 pathOffset += 8; | 3007 pathOffset += 8; |
2953 index = path.indexOf("/services/", pathOffset); | 3008 index = path.indexOf("/services/", pathOffset); |
2954 unittest.expect(index >= 0, unittest.isTrue); | 3009 unittest.expect(index >= 0, unittest.isTrue); |
(...skipping 30 matching lines...) Expand all Loading... |
2985 unittest.expect(queryMap["view"].first, unittest.equals(arg_view)); | 3040 unittest.expect(queryMap["view"].first, unittest.equals(arg_view)); |
2986 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 3041 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
2987 | 3042 |
2988 | 3043 |
2989 var h = { | 3044 var h = { |
2990 "content-type" : "application/json; charset=utf-8", | 3045 "content-type" : "application/json; charset=utf-8", |
2991 }; | 3046 }; |
2992 var resp = convert.JSON.encode(buildListVersionsResponse()); | 3047 var resp = convert.JSON.encode(buildListVersionsResponse()); |
2993 return new async.Future.value(stringResponse(200, h, resp)); | 3048 return new async.Future.value(stringResponse(200, h, resp)); |
2994 }), true); | 3049 }), true); |
2995 res.list(arg_appsId, arg_servicesId, pageSize: arg_pageSize, view: arg_vie
w, pageToken: arg_pageToken).then(unittest.expectAsync(((api.ListVersionsRespons
e response) { | 3050 res.list(arg_appsId, arg_servicesId, pageSize: arg_pageSize, view: arg_vie
w, pageToken: arg_pageToken).then(unittest.expectAsync1(((api.ListVersionsRespon
se response) { |
2996 checkListVersionsResponse(response); | 3051 checkListVersionsResponse(response); |
2997 }))); | 3052 }))); |
2998 }); | 3053 }); |
2999 | 3054 |
3000 unittest.test("method--patch", () { | 3055 unittest.test("method--patch", () { |
3001 | 3056 |
3002 var mock = new HttpServerMock(); | 3057 var mock = new HttpServerMock(); |
3003 api.AppsServicesVersionsResourceApi res = new api.AppengineApi(mock).apps.
services.versions; | 3058 api.AppsServicesVersionsResourceApi res = new api.AppengineApi(mock).apps.
services.versions; |
3004 var arg_request = buildVersion(); | 3059 var arg_request = buildVersion(); |
3005 var arg_appsId = "foo"; | 3060 var arg_appsId = "foo"; |
3006 var arg_servicesId = "foo"; | 3061 var arg_servicesId = "foo"; |
3007 var arg_versionsId = "foo"; | 3062 var arg_versionsId = "foo"; |
3008 var arg_updateMask = "foo"; | 3063 var arg_updateMask = "foo"; |
3009 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3064 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
3010 var obj = new api.Version.fromJson(json); | 3065 var obj = new api.Version.fromJson(json); |
3011 checkVersion(obj); | 3066 checkVersion(obj); |
3012 | 3067 |
3013 var path = (req.url).path; | 3068 var path = (req.url).path; |
3014 var pathOffset = 0; | 3069 var pathOffset = 0; |
3015 var index; | 3070 var index; |
3016 var subPart; | 3071 var subPart; |
3017 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3072 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
3018 pathOffset += 1; | 3073 pathOffset += 1; |
3019 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1/apps/")); | 3074 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1/apps/")); |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3054 } | 3109 } |
3055 unittest.expect(queryMap["updateMask"].first, unittest.equals(arg_update
Mask)); | 3110 unittest.expect(queryMap["updateMask"].first, unittest.equals(arg_update
Mask)); |
3056 | 3111 |
3057 | 3112 |
3058 var h = { | 3113 var h = { |
3059 "content-type" : "application/json; charset=utf-8", | 3114 "content-type" : "application/json; charset=utf-8", |
3060 }; | 3115 }; |
3061 var resp = convert.JSON.encode(buildOperation()); | 3116 var resp = convert.JSON.encode(buildOperation()); |
3062 return new async.Future.value(stringResponse(200, h, resp)); | 3117 return new async.Future.value(stringResponse(200, h, resp)); |
3063 }), true); | 3118 }), true); |
3064 res.patch(arg_request, arg_appsId, arg_servicesId, arg_versionsId, updateM
ask: arg_updateMask).then(unittest.expectAsync(((api.Operation response) { | 3119 res.patch(arg_request, arg_appsId, arg_servicesId, arg_versionsId, updateM
ask: arg_updateMask).then(unittest.expectAsync1(((api.Operation response) { |
3065 checkOperation(response); | 3120 checkOperation(response); |
3066 }))); | 3121 }))); |
3067 }); | 3122 }); |
3068 | 3123 |
3069 }); | 3124 }); |
3070 | 3125 |
3071 | 3126 |
3072 unittest.group("resource-AppsServicesVersionsInstancesResourceApi", () { | 3127 unittest.group("resource-AppsServicesVersionsInstancesResourceApi", () { |
3073 unittest.test("method--debug", () { | 3128 unittest.test("method--debug", () { |
3074 | 3129 |
3075 var mock = new HttpServerMock(); | 3130 var mock = new HttpServerMock(); |
3076 api.AppsServicesVersionsInstancesResourceApi res = new api.AppengineApi(mo
ck).apps.services.versions.instances; | 3131 api.AppsServicesVersionsInstancesResourceApi res = new api.AppengineApi(mo
ck).apps.services.versions.instances; |
3077 var arg_request = buildDebugInstanceRequest(); | 3132 var arg_request = buildDebugInstanceRequest(); |
3078 var arg_appsId = "foo"; | 3133 var arg_appsId = "foo"; |
3079 var arg_servicesId = "foo"; | 3134 var arg_servicesId = "foo"; |
3080 var arg_versionsId = "foo"; | 3135 var arg_versionsId = "foo"; |
3081 var arg_instancesId = "foo"; | 3136 var arg_instancesId = "foo"; |
3082 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3137 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
3083 var obj = new api.DebugInstanceRequest.fromJson(json); | 3138 var obj = new api.DebugInstanceRequest.fromJson(json); |
3084 checkDebugInstanceRequest(obj); | 3139 checkDebugInstanceRequest(obj); |
3085 | 3140 |
3086 var path = (req.url).path; | 3141 var path = (req.url).path; |
3087 var pathOffset = 0; | 3142 var pathOffset = 0; |
3088 var index; | 3143 var index; |
3089 var subPart; | 3144 var subPart; |
3090 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3145 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
3091 pathOffset += 1; | 3146 pathOffset += 1; |
3092 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1/apps/")); | 3147 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1/apps/")); |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3137 } | 3192 } |
3138 } | 3193 } |
3139 | 3194 |
3140 | 3195 |
3141 var h = { | 3196 var h = { |
3142 "content-type" : "application/json; charset=utf-8", | 3197 "content-type" : "application/json; charset=utf-8", |
3143 }; | 3198 }; |
3144 var resp = convert.JSON.encode(buildOperation()); | 3199 var resp = convert.JSON.encode(buildOperation()); |
3145 return new async.Future.value(stringResponse(200, h, resp)); | 3200 return new async.Future.value(stringResponse(200, h, resp)); |
3146 }), true); | 3201 }), true); |
3147 res.debug(arg_request, arg_appsId, arg_servicesId, arg_versionsId, arg_ins
tancesId).then(unittest.expectAsync(((api.Operation response) { | 3202 res.debug(arg_request, arg_appsId, arg_servicesId, arg_versionsId, arg_ins
tancesId).then(unittest.expectAsync1(((api.Operation response) { |
3148 checkOperation(response); | 3203 checkOperation(response); |
3149 }))); | 3204 }))); |
3150 }); | 3205 }); |
3151 | 3206 |
3152 unittest.test("method--delete", () { | 3207 unittest.test("method--delete", () { |
3153 | 3208 |
3154 var mock = new HttpServerMock(); | 3209 var mock = new HttpServerMock(); |
3155 api.AppsServicesVersionsInstancesResourceApi res = new api.AppengineApi(mo
ck).apps.services.versions.instances; | 3210 api.AppsServicesVersionsInstancesResourceApi res = new api.AppengineApi(mo
ck).apps.services.versions.instances; |
3156 var arg_appsId = "foo"; | 3211 var arg_appsId = "foo"; |
3157 var arg_servicesId = "foo"; | 3212 var arg_servicesId = "foo"; |
3158 var arg_versionsId = "foo"; | 3213 var arg_versionsId = "foo"; |
3159 var arg_instancesId = "foo"; | 3214 var arg_instancesId = "foo"; |
3160 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3215 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
3161 var path = (req.url).path; | 3216 var path = (req.url).path; |
3162 var pathOffset = 0; | 3217 var pathOffset = 0; |
3163 var index; | 3218 var index; |
3164 var subPart; | 3219 var subPart; |
3165 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3220 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
3166 pathOffset += 1; | 3221 pathOffset += 1; |
3167 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1/apps/")); | 3222 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1/apps/")); |
3168 pathOffset += 8; | 3223 pathOffset += 8; |
3169 index = path.indexOf("/services/", pathOffset); | 3224 index = path.indexOf("/services/", pathOffset); |
3170 unittest.expect(index >= 0, unittest.isTrue); | 3225 unittest.expect(index >= 0, unittest.isTrue); |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3208 } | 3263 } |
3209 } | 3264 } |
3210 | 3265 |
3211 | 3266 |
3212 var h = { | 3267 var h = { |
3213 "content-type" : "application/json; charset=utf-8", | 3268 "content-type" : "application/json; charset=utf-8", |
3214 }; | 3269 }; |
3215 var resp = convert.JSON.encode(buildOperation()); | 3270 var resp = convert.JSON.encode(buildOperation()); |
3216 return new async.Future.value(stringResponse(200, h, resp)); | 3271 return new async.Future.value(stringResponse(200, h, resp)); |
3217 }), true); | 3272 }), true); |
3218 res.delete(arg_appsId, arg_servicesId, arg_versionsId, arg_instancesId).th
en(unittest.expectAsync(((api.Operation response) { | 3273 res.delete(arg_appsId, arg_servicesId, arg_versionsId, arg_instancesId).th
en(unittest.expectAsync1(((api.Operation response) { |
3219 checkOperation(response); | 3274 checkOperation(response); |
3220 }))); | 3275 }))); |
3221 }); | 3276 }); |
3222 | 3277 |
3223 unittest.test("method--get", () { | 3278 unittest.test("method--get", () { |
3224 | 3279 |
3225 var mock = new HttpServerMock(); | 3280 var mock = new HttpServerMock(); |
3226 api.AppsServicesVersionsInstancesResourceApi res = new api.AppengineApi(mo
ck).apps.services.versions.instances; | 3281 api.AppsServicesVersionsInstancesResourceApi res = new api.AppengineApi(mo
ck).apps.services.versions.instances; |
3227 var arg_appsId = "foo"; | 3282 var arg_appsId = "foo"; |
3228 var arg_servicesId = "foo"; | 3283 var arg_servicesId = "foo"; |
3229 var arg_versionsId = "foo"; | 3284 var arg_versionsId = "foo"; |
3230 var arg_instancesId = "foo"; | 3285 var arg_instancesId = "foo"; |
3231 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3286 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
3232 var path = (req.url).path; | 3287 var path = (req.url).path; |
3233 var pathOffset = 0; | 3288 var pathOffset = 0; |
3234 var index; | 3289 var index; |
3235 var subPart; | 3290 var subPart; |
3236 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3291 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
3237 pathOffset += 1; | 3292 pathOffset += 1; |
3238 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1/apps/")); | 3293 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1/apps/")); |
3239 pathOffset += 8; | 3294 pathOffset += 8; |
3240 index = path.indexOf("/services/", pathOffset); | 3295 index = path.indexOf("/services/", pathOffset); |
3241 unittest.expect(index >= 0, unittest.isTrue); | 3296 unittest.expect(index >= 0, unittest.isTrue); |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3279 } | 3334 } |
3280 } | 3335 } |
3281 | 3336 |
3282 | 3337 |
3283 var h = { | 3338 var h = { |
3284 "content-type" : "application/json; charset=utf-8", | 3339 "content-type" : "application/json; charset=utf-8", |
3285 }; | 3340 }; |
3286 var resp = convert.JSON.encode(buildInstance()); | 3341 var resp = convert.JSON.encode(buildInstance()); |
3287 return new async.Future.value(stringResponse(200, h, resp)); | 3342 return new async.Future.value(stringResponse(200, h, resp)); |
3288 }), true); | 3343 }), true); |
3289 res.get(arg_appsId, arg_servicesId, arg_versionsId, arg_instancesId).then(
unittest.expectAsync(((api.Instance response) { | 3344 res.get(arg_appsId, arg_servicesId, arg_versionsId, arg_instancesId).then(
unittest.expectAsync1(((api.Instance response) { |
3290 checkInstance(response); | 3345 checkInstance(response); |
3291 }))); | 3346 }))); |
3292 }); | 3347 }); |
3293 | 3348 |
3294 unittest.test("method--list", () { | 3349 unittest.test("method--list", () { |
3295 | 3350 |
3296 var mock = new HttpServerMock(); | 3351 var mock = new HttpServerMock(); |
3297 api.AppsServicesVersionsInstancesResourceApi res = new api.AppengineApi(mo
ck).apps.services.versions.instances; | 3352 api.AppsServicesVersionsInstancesResourceApi res = new api.AppengineApi(mo
ck).apps.services.versions.instances; |
3298 var arg_appsId = "foo"; | 3353 var arg_appsId = "foo"; |
3299 var arg_servicesId = "foo"; | 3354 var arg_servicesId = "foo"; |
3300 var arg_versionsId = "foo"; | 3355 var arg_versionsId = "foo"; |
| 3356 var arg_pageToken = "foo"; |
3301 var arg_pageSize = 42; | 3357 var arg_pageSize = 42; |
3302 var arg_pageToken = "foo"; | 3358 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
3303 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
3304 var path = (req.url).path; | 3359 var path = (req.url).path; |
3305 var pathOffset = 0; | 3360 var pathOffset = 0; |
3306 var index; | 3361 var index; |
3307 var subPart; | 3362 var subPart; |
3308 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3363 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
3309 pathOffset += 1; | 3364 pathOffset += 1; |
3310 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1/apps/")); | 3365 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1/apps/")); |
3311 pathOffset += 8; | 3366 pathOffset += 8; |
3312 index = path.indexOf("/services/", pathOffset); | 3367 index = path.indexOf("/services/", pathOffset); |
3313 unittest.expect(index >= 0, unittest.isTrue); | 3368 unittest.expect(index >= 0, unittest.isTrue); |
(...skipping 26 matching lines...) Expand all Loading... |
3340 if (n == "false") return false; | 3395 if (n == "false") return false; |
3341 if (n == null) return null; | 3396 if (n == null) return null; |
3342 throw new core.ArgumentError("Invalid boolean: $n"); | 3397 throw new core.ArgumentError("Invalid boolean: $n"); |
3343 } | 3398 } |
3344 if (query.length > 0) { | 3399 if (query.length > 0) { |
3345 for (var part in query.split("&")) { | 3400 for (var part in query.split("&")) { |
3346 var keyvalue = part.split("="); | 3401 var keyvalue = part.split("="); |
3347 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 3402 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
3348 } | 3403 } |
3349 } | 3404 } |
| 3405 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
3350 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); | 3406 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); |
3351 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
3352 | 3407 |
3353 | 3408 |
3354 var h = { | 3409 var h = { |
3355 "content-type" : "application/json; charset=utf-8", | 3410 "content-type" : "application/json; charset=utf-8", |
3356 }; | 3411 }; |
3357 var resp = convert.JSON.encode(buildListInstancesResponse()); | 3412 var resp = convert.JSON.encode(buildListInstancesResponse()); |
3358 return new async.Future.value(stringResponse(200, h, resp)); | 3413 return new async.Future.value(stringResponse(200, h, resp)); |
3359 }), true); | 3414 }), true); |
3360 res.list(arg_appsId, arg_servicesId, arg_versionsId, pageSize: arg_pageSiz
e, pageToken: arg_pageToken).then(unittest.expectAsync(((api.ListInstancesRespon
se response) { | 3415 res.list(arg_appsId, arg_servicesId, arg_versionsId, pageToken: arg_pageTo
ken, pageSize: arg_pageSize).then(unittest.expectAsync1(((api.ListInstancesRespo
nse response) { |
3361 checkListInstancesResponse(response); | 3416 checkListInstancesResponse(response); |
3362 }))); | 3417 }))); |
3363 }); | 3418 }); |
3364 | 3419 |
3365 }); | 3420 }); |
3366 | 3421 |
3367 | 3422 |
3368 } | 3423 } |
3369 | 3424 |
OLD | NEW |