| OLD | NEW |
| 1 library googleapis_beta.appengine.v1beta5.test; | 1 library googleapis_beta.appengine.v1beta5.test; |
| 2 | 2 |
| 3 import "dart:core" as core; | 3 import "dart:core" as core; |
| 4 import "dart:collection" as collection; | 4 import "dart:collection" as collection; |
| 5 import "dart:async" as async; | 5 import "dart:async" as async; |
| 6 import "dart:convert" as convert; | 6 import "dart:convert" as convert; |
| 7 | 7 |
| 8 import 'package:http/http.dart' as http; | 8 import 'package:http/http.dart' as http; |
| 9 import 'package:http/testing.dart' as http_testing; | 9 import 'package:http/testing.dart' as http_testing; |
| 10 import 'package:unittest/unittest.dart' as unittest; | 10 import 'package:unittest/unittest.dart' as unittest; |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after 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 buildUnnamed3016() { | 100 buildUnnamed3691() { |
| 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 checkUnnamed3016(core.List<api.UrlDispatchRule> o) { | 107 checkUnnamed3691(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 = buildUnnamed3016(); | 123 o.dispatchRules = buildUnnamed3691(); |
| 124 o.id = "foo"; | 124 o.id = "foo"; |
| 125 o.location = "foo"; | 125 o.location = "foo"; |
| 126 o.name = "foo"; | 126 o.name = "foo"; |
| 127 } | 127 } |
| 128 buildCounterApplication--; | 128 buildCounterApplication--; |
| 129 return o; | 129 return o; |
| 130 } | 130 } |
| 131 | 131 |
| 132 checkApplication(api.Application o) { | 132 checkApplication(api.Application o) { |
| 133 buildCounterApplication++; | 133 buildCounterApplication++; |
| 134 if (buildCounterApplication < 3) { | 134 if (buildCounterApplication < 3) { |
| 135 unittest.expect(o.authDomain, unittest.equals('foo')); | 135 unittest.expect(o.authDomain, unittest.equals('foo')); |
| 136 unittest.expect(o.codeBucket, unittest.equals('foo')); | 136 unittest.expect(o.codeBucket, unittest.equals('foo')); |
| 137 unittest.expect(o.defaultBucket, unittest.equals('foo')); | 137 unittest.expect(o.defaultBucket, unittest.equals('foo')); |
| 138 unittest.expect(o.defaultCookieExpiration, unittest.equals('foo')); | 138 unittest.expect(o.defaultCookieExpiration, unittest.equals('foo')); |
| 139 unittest.expect(o.defaultHostname, unittest.equals('foo')); | 139 unittest.expect(o.defaultHostname, unittest.equals('foo')); |
| 140 checkUnnamed3016(o.dispatchRules); | 140 checkUnnamed3691(o.dispatchRules); |
| 141 unittest.expect(o.id, unittest.equals('foo')); | 141 unittest.expect(o.id, unittest.equals('foo')); |
| 142 unittest.expect(o.location, unittest.equals('foo')); | 142 unittest.expect(o.location, unittest.equals('foo')); |
| 143 unittest.expect(o.name, unittest.equals('foo')); | 143 unittest.expect(o.name, unittest.equals('foo')); |
| 144 } | 144 } |
| 145 buildCounterApplication--; | 145 buildCounterApplication--; |
| 146 } | 146 } |
| 147 | 147 |
| 148 core.int buildCounterAutomaticScaling = 0; | 148 core.int buildCounterAutomaticScaling = 0; |
| 149 buildAutomaticScaling() { | 149 buildAutomaticScaling() { |
| 150 var o = new api.AutomaticScaling(); | 150 var o = new api.AutomaticScaling(); |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 240 | 240 |
| 241 checkCpuUtilization(api.CpuUtilization o) { | 241 checkCpuUtilization(api.CpuUtilization o) { |
| 242 buildCounterCpuUtilization++; | 242 buildCounterCpuUtilization++; |
| 243 if (buildCounterCpuUtilization < 3) { | 243 if (buildCounterCpuUtilization < 3) { |
| 244 unittest.expect(o.aggregationWindowLength, unittest.equals('foo')); | 244 unittest.expect(o.aggregationWindowLength, unittest.equals('foo')); |
| 245 unittest.expect(o.targetUtilization, unittest.equals(42.0)); | 245 unittest.expect(o.targetUtilization, unittest.equals(42.0)); |
| 246 } | 246 } |
| 247 buildCounterCpuUtilization--; | 247 buildCounterCpuUtilization--; |
| 248 } | 248 } |
| 249 | 249 |
| 250 buildUnnamed3017() { | 250 core.int buildCounterDebugInstanceRequest = 0; |
| 251 buildDebugInstanceRequest() { |
| 252 var o = new api.DebugInstanceRequest(); |
| 253 buildCounterDebugInstanceRequest++; |
| 254 if (buildCounterDebugInstanceRequest < 3) { |
| 255 } |
| 256 buildCounterDebugInstanceRequest--; |
| 257 return o; |
| 258 } |
| 259 |
| 260 checkDebugInstanceRequest(api.DebugInstanceRequest o) { |
| 261 buildCounterDebugInstanceRequest++; |
| 262 if (buildCounterDebugInstanceRequest < 3) { |
| 263 } |
| 264 buildCounterDebugInstanceRequest--; |
| 265 } |
| 266 |
| 267 buildUnnamed3692() { |
| 251 var o = new core.Map<core.String, api.FileInfo>(); | 268 var o = new core.Map<core.String, api.FileInfo>(); |
| 252 o["x"] = buildFileInfo(); | 269 o["x"] = buildFileInfo(); |
| 253 o["y"] = buildFileInfo(); | 270 o["y"] = buildFileInfo(); |
| 254 return o; | 271 return o; |
| 255 } | 272 } |
| 256 | 273 |
| 257 checkUnnamed3017(core.Map<core.String, api.FileInfo> o) { | 274 checkUnnamed3692(core.Map<core.String, api.FileInfo> o) { |
| 258 unittest.expect(o, unittest.hasLength(2)); | 275 unittest.expect(o, unittest.hasLength(2)); |
| 259 checkFileInfo(o["x"]); | 276 checkFileInfo(o["x"]); |
| 260 checkFileInfo(o["y"]); | 277 checkFileInfo(o["y"]); |
| 261 } | 278 } |
| 262 | 279 |
| 263 buildUnnamed3018() { | 280 buildUnnamed3693() { |
| 264 var o = new core.List<api.SourceReference>(); | 281 var o = new core.List<api.SourceReference>(); |
| 265 o.add(buildSourceReference()); | 282 o.add(buildSourceReference()); |
| 266 o.add(buildSourceReference()); | 283 o.add(buildSourceReference()); |
| 267 return o; | 284 return o; |
| 268 } | 285 } |
| 269 | 286 |
| 270 checkUnnamed3018(core.List<api.SourceReference> o) { | 287 checkUnnamed3693(core.List<api.SourceReference> o) { |
| 271 unittest.expect(o, unittest.hasLength(2)); | 288 unittest.expect(o, unittest.hasLength(2)); |
| 272 checkSourceReference(o[0]); | 289 checkSourceReference(o[0]); |
| 273 checkSourceReference(o[1]); | 290 checkSourceReference(o[1]); |
| 274 } | 291 } |
| 275 | 292 |
| 276 core.int buildCounterDeployment = 0; | 293 core.int buildCounterDeployment = 0; |
| 277 buildDeployment() { | 294 buildDeployment() { |
| 278 var o = new api.Deployment(); | 295 var o = new api.Deployment(); |
| 279 buildCounterDeployment++; | 296 buildCounterDeployment++; |
| 280 if (buildCounterDeployment < 3) { | 297 if (buildCounterDeployment < 3) { |
| 281 o.container = buildContainerInfo(); | 298 o.container = buildContainerInfo(); |
| 282 o.files = buildUnnamed3017(); | 299 o.files = buildUnnamed3692(); |
| 283 o.sourceReferences = buildUnnamed3018(); | 300 o.sourceReferences = buildUnnamed3693(); |
| 284 } | 301 } |
| 285 buildCounterDeployment--; | 302 buildCounterDeployment--; |
| 286 return o; | 303 return o; |
| 287 } | 304 } |
| 288 | 305 |
| 289 checkDeployment(api.Deployment o) { | 306 checkDeployment(api.Deployment o) { |
| 290 buildCounterDeployment++; | 307 buildCounterDeployment++; |
| 291 if (buildCounterDeployment < 3) { | 308 if (buildCounterDeployment < 3) { |
| 292 checkContainerInfo(o.container); | 309 checkContainerInfo(o.container); |
| 293 checkUnnamed3017(o.files); | 310 checkUnnamed3692(o.files); |
| 294 checkUnnamed3018(o.sourceReferences); | 311 checkUnnamed3693(o.sourceReferences); |
| 295 } | 312 } |
| 296 buildCounterDeployment--; | 313 buildCounterDeployment--; |
| 297 } | 314 } |
| 298 | 315 |
| 299 core.int buildCounterDiskUtilization = 0; | 316 core.int buildCounterDiskUtilization = 0; |
| 300 buildDiskUtilization() { | 317 buildDiskUtilization() { |
| 301 var o = new api.DiskUtilization(); | 318 var o = new api.DiskUtilization(); |
| 302 buildCounterDiskUtilization++; | 319 buildCounterDiskUtilization++; |
| 303 if (buildCounterDiskUtilization < 3) { | 320 if (buildCounterDiskUtilization < 3) { |
| 304 o.targetReadBytesPerSec = 42; | 321 o.targetReadBytesPerSec = 42; |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 459 | 476 |
| 460 checkLibrary(api.Library o) { | 477 checkLibrary(api.Library o) { |
| 461 buildCounterLibrary++; | 478 buildCounterLibrary++; |
| 462 if (buildCounterLibrary < 3) { | 479 if (buildCounterLibrary < 3) { |
| 463 unittest.expect(o.name, unittest.equals('foo')); | 480 unittest.expect(o.name, unittest.equals('foo')); |
| 464 unittest.expect(o.version, unittest.equals('foo')); | 481 unittest.expect(o.version, unittest.equals('foo')); |
| 465 } | 482 } |
| 466 buildCounterLibrary--; | 483 buildCounterLibrary--; |
| 467 } | 484 } |
| 468 | 485 |
| 469 buildUnnamed3019() { | 486 buildUnnamed3694() { |
| 470 var o = new core.List<api.Instance>(); | 487 var o = new core.List<api.Instance>(); |
| 471 o.add(buildInstance()); | 488 o.add(buildInstance()); |
| 472 o.add(buildInstance()); | 489 o.add(buildInstance()); |
| 473 return o; | 490 return o; |
| 474 } | 491 } |
| 475 | 492 |
| 476 checkUnnamed3019(core.List<api.Instance> o) { | 493 checkUnnamed3694(core.List<api.Instance> o) { |
| 477 unittest.expect(o, unittest.hasLength(2)); | 494 unittest.expect(o, unittest.hasLength(2)); |
| 478 checkInstance(o[0]); | 495 checkInstance(o[0]); |
| 479 checkInstance(o[1]); | 496 checkInstance(o[1]); |
| 480 } | 497 } |
| 481 | 498 |
| 482 core.int buildCounterListInstancesResponse = 0; | 499 core.int buildCounterListInstancesResponse = 0; |
| 483 buildListInstancesResponse() { | 500 buildListInstancesResponse() { |
| 484 var o = new api.ListInstancesResponse(); | 501 var o = new api.ListInstancesResponse(); |
| 485 buildCounterListInstancesResponse++; | 502 buildCounterListInstancesResponse++; |
| 486 if (buildCounterListInstancesResponse < 3) { | 503 if (buildCounterListInstancesResponse < 3) { |
| 487 o.instances = buildUnnamed3019(); | 504 o.instances = buildUnnamed3694(); |
| 488 o.nextPageToken = "foo"; | 505 o.nextPageToken = "foo"; |
| 489 } | 506 } |
| 490 buildCounterListInstancesResponse--; | 507 buildCounterListInstancesResponse--; |
| 491 return o; | 508 return o; |
| 492 } | 509 } |
| 493 | 510 |
| 494 checkListInstancesResponse(api.ListInstancesResponse o) { | 511 checkListInstancesResponse(api.ListInstancesResponse o) { |
| 495 buildCounterListInstancesResponse++; | 512 buildCounterListInstancesResponse++; |
| 496 if (buildCounterListInstancesResponse < 3) { | 513 if (buildCounterListInstancesResponse < 3) { |
| 497 checkUnnamed3019(o.instances); | 514 checkUnnamed3694(o.instances); |
| 498 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 515 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 499 } | 516 } |
| 500 buildCounterListInstancesResponse--; | 517 buildCounterListInstancesResponse--; |
| 501 } | 518 } |
| 502 | 519 |
| 503 buildUnnamed3020() { | 520 buildUnnamed3695() { |
| 521 var o = new core.List<api.Location>(); |
| 522 o.add(buildLocation()); |
| 523 o.add(buildLocation()); |
| 524 return o; |
| 525 } |
| 526 |
| 527 checkUnnamed3695(core.List<api.Location> o) { |
| 528 unittest.expect(o, unittest.hasLength(2)); |
| 529 checkLocation(o[0]); |
| 530 checkLocation(o[1]); |
| 531 } |
| 532 |
| 533 core.int buildCounterListLocationsResponse = 0; |
| 534 buildListLocationsResponse() { |
| 535 var o = new api.ListLocationsResponse(); |
| 536 buildCounterListLocationsResponse++; |
| 537 if (buildCounterListLocationsResponse < 3) { |
| 538 o.locations = buildUnnamed3695(); |
| 539 o.nextPageToken = "foo"; |
| 540 } |
| 541 buildCounterListLocationsResponse--; |
| 542 return o; |
| 543 } |
| 544 |
| 545 checkListLocationsResponse(api.ListLocationsResponse o) { |
| 546 buildCounterListLocationsResponse++; |
| 547 if (buildCounterListLocationsResponse < 3) { |
| 548 checkUnnamed3695(o.locations); |
| 549 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 550 } |
| 551 buildCounterListLocationsResponse--; |
| 552 } |
| 553 |
| 554 buildUnnamed3696() { |
| 504 var o = new core.List<api.Operation>(); | 555 var o = new core.List<api.Operation>(); |
| 505 o.add(buildOperation()); | 556 o.add(buildOperation()); |
| 506 o.add(buildOperation()); | 557 o.add(buildOperation()); |
| 507 return o; | 558 return o; |
| 508 } | 559 } |
| 509 | 560 |
| 510 checkUnnamed3020(core.List<api.Operation> o) { | 561 checkUnnamed3696(core.List<api.Operation> o) { |
| 511 unittest.expect(o, unittest.hasLength(2)); | 562 unittest.expect(o, unittest.hasLength(2)); |
| 512 checkOperation(o[0]); | 563 checkOperation(o[0]); |
| 513 checkOperation(o[1]); | 564 checkOperation(o[1]); |
| 514 } | 565 } |
| 515 | 566 |
| 516 core.int buildCounterListOperationsResponse = 0; | 567 core.int buildCounterListOperationsResponse = 0; |
| 517 buildListOperationsResponse() { | 568 buildListOperationsResponse() { |
| 518 var o = new api.ListOperationsResponse(); | 569 var o = new api.ListOperationsResponse(); |
| 519 buildCounterListOperationsResponse++; | 570 buildCounterListOperationsResponse++; |
| 520 if (buildCounterListOperationsResponse < 3) { | 571 if (buildCounterListOperationsResponse < 3) { |
| 521 o.nextPageToken = "foo"; | 572 o.nextPageToken = "foo"; |
| 522 o.operations = buildUnnamed3020(); | 573 o.operations = buildUnnamed3696(); |
| 523 } | 574 } |
| 524 buildCounterListOperationsResponse--; | 575 buildCounterListOperationsResponse--; |
| 525 return o; | 576 return o; |
| 526 } | 577 } |
| 527 | 578 |
| 528 checkListOperationsResponse(api.ListOperationsResponse o) { | 579 checkListOperationsResponse(api.ListOperationsResponse o) { |
| 529 buildCounterListOperationsResponse++; | 580 buildCounterListOperationsResponse++; |
| 530 if (buildCounterListOperationsResponse < 3) { | 581 if (buildCounterListOperationsResponse < 3) { |
| 531 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 582 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 532 checkUnnamed3020(o.operations); | 583 checkUnnamed3696(o.operations); |
| 533 } | 584 } |
| 534 buildCounterListOperationsResponse--; | 585 buildCounterListOperationsResponse--; |
| 535 } | 586 } |
| 536 | 587 |
| 537 buildUnnamed3021() { | 588 buildUnnamed3697() { |
| 538 var o = new core.List<api.Service>(); | 589 var o = new core.List<api.Service>(); |
| 539 o.add(buildService()); | 590 o.add(buildService()); |
| 540 o.add(buildService()); | 591 o.add(buildService()); |
| 541 return o; | 592 return o; |
| 542 } | 593 } |
| 543 | 594 |
| 544 checkUnnamed3021(core.List<api.Service> o) { | 595 checkUnnamed3697(core.List<api.Service> o) { |
| 545 unittest.expect(o, unittest.hasLength(2)); | 596 unittest.expect(o, unittest.hasLength(2)); |
| 546 checkService(o[0]); | 597 checkService(o[0]); |
| 547 checkService(o[1]); | 598 checkService(o[1]); |
| 548 } | 599 } |
| 549 | 600 |
| 550 core.int buildCounterListServicesResponse = 0; | 601 core.int buildCounterListServicesResponse = 0; |
| 551 buildListServicesResponse() { | 602 buildListServicesResponse() { |
| 552 var o = new api.ListServicesResponse(); | 603 var o = new api.ListServicesResponse(); |
| 553 buildCounterListServicesResponse++; | 604 buildCounterListServicesResponse++; |
| 554 if (buildCounterListServicesResponse < 3) { | 605 if (buildCounterListServicesResponse < 3) { |
| 555 o.nextPageToken = "foo"; | 606 o.nextPageToken = "foo"; |
| 556 o.services = buildUnnamed3021(); | 607 o.services = buildUnnamed3697(); |
| 557 } | 608 } |
| 558 buildCounterListServicesResponse--; | 609 buildCounterListServicesResponse--; |
| 559 return o; | 610 return o; |
| 560 } | 611 } |
| 561 | 612 |
| 562 checkListServicesResponse(api.ListServicesResponse o) { | 613 checkListServicesResponse(api.ListServicesResponse o) { |
| 563 buildCounterListServicesResponse++; | 614 buildCounterListServicesResponse++; |
| 564 if (buildCounterListServicesResponse < 3) { | 615 if (buildCounterListServicesResponse < 3) { |
| 565 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 616 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 566 checkUnnamed3021(o.services); | 617 checkUnnamed3697(o.services); |
| 567 } | 618 } |
| 568 buildCounterListServicesResponse--; | 619 buildCounterListServicesResponse--; |
| 569 } | 620 } |
| 570 | 621 |
| 571 buildUnnamed3022() { | 622 buildUnnamed3698() { |
| 572 var o = new core.List<api.Version>(); | 623 var o = new core.List<api.Version>(); |
| 573 o.add(buildVersion()); | 624 o.add(buildVersion()); |
| 574 o.add(buildVersion()); | 625 o.add(buildVersion()); |
| 575 return o; | 626 return o; |
| 576 } | 627 } |
| 577 | 628 |
| 578 checkUnnamed3022(core.List<api.Version> o) { | 629 checkUnnamed3698(core.List<api.Version> o) { |
| 579 unittest.expect(o, unittest.hasLength(2)); | 630 unittest.expect(o, unittest.hasLength(2)); |
| 580 checkVersion(o[0]); | 631 checkVersion(o[0]); |
| 581 checkVersion(o[1]); | 632 checkVersion(o[1]); |
| 582 } | 633 } |
| 583 | 634 |
| 584 core.int buildCounterListVersionsResponse = 0; | 635 core.int buildCounterListVersionsResponse = 0; |
| 585 buildListVersionsResponse() { | 636 buildListVersionsResponse() { |
| 586 var o = new api.ListVersionsResponse(); | 637 var o = new api.ListVersionsResponse(); |
| 587 buildCounterListVersionsResponse++; | 638 buildCounterListVersionsResponse++; |
| 588 if (buildCounterListVersionsResponse < 3) { | 639 if (buildCounterListVersionsResponse < 3) { |
| 589 o.nextPageToken = "foo"; | 640 o.nextPageToken = "foo"; |
| 590 o.versions = buildUnnamed3022(); | 641 o.versions = buildUnnamed3698(); |
| 591 } | 642 } |
| 592 buildCounterListVersionsResponse--; | 643 buildCounterListVersionsResponse--; |
| 593 return o; | 644 return o; |
| 594 } | 645 } |
| 595 | 646 |
| 596 checkListVersionsResponse(api.ListVersionsResponse o) { | 647 checkListVersionsResponse(api.ListVersionsResponse o) { |
| 597 buildCounterListVersionsResponse++; | 648 buildCounterListVersionsResponse++; |
| 598 if (buildCounterListVersionsResponse < 3) { | 649 if (buildCounterListVersionsResponse < 3) { |
| 599 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 650 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 600 checkUnnamed3022(o.versions); | 651 checkUnnamed3698(o.versions); |
| 601 } | 652 } |
| 602 buildCounterListVersionsResponse--; | 653 buildCounterListVersionsResponse--; |
| 603 } | 654 } |
| 604 | 655 |
| 656 buildUnnamed3699() { |
| 657 var o = new core.Map<core.String, core.String>(); |
| 658 o["x"] = "foo"; |
| 659 o["y"] = "foo"; |
| 660 return o; |
| 661 } |
| 662 |
| 663 checkUnnamed3699(core.Map<core.String, core.String> o) { |
| 664 unittest.expect(o, unittest.hasLength(2)); |
| 665 unittest.expect(o["x"], unittest.equals('foo')); |
| 666 unittest.expect(o["y"], unittest.equals('foo')); |
| 667 } |
| 668 |
| 669 buildUnnamed3700() { |
| 670 var o = new core.Map<core.String, core.Object>(); |
| 671 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
| 672 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
| 673 return o; |
| 674 } |
| 675 |
| 676 checkUnnamed3700(core.Map<core.String, core.Object> o) { |
| 677 unittest.expect(o, unittest.hasLength(2)); |
| 678 var casted1 = (o["x"]) as core.Map; unittest.expect(casted1, unittest.hasLengt
h(3)); unittest.expect(casted1["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted1["bool"], unittest.equals(true)); unittest.expect(casted1["string"],
unittest.equals('foo')); |
| 679 var casted2 = (o["y"]) as core.Map; unittest.expect(casted2, unittest.hasLengt
h(3)); unittest.expect(casted2["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted2["bool"], unittest.equals(true)); unittest.expect(casted2["string"],
unittest.equals('foo')); |
| 680 } |
| 681 |
| 682 core.int buildCounterLocation = 0; |
| 683 buildLocation() { |
| 684 var o = new api.Location(); |
| 685 buildCounterLocation++; |
| 686 if (buildCounterLocation < 3) { |
| 687 o.labels = buildUnnamed3699(); |
| 688 o.metadata = buildUnnamed3700(); |
| 689 o.name = "foo"; |
| 690 } |
| 691 buildCounterLocation--; |
| 692 return o; |
| 693 } |
| 694 |
| 695 checkLocation(api.Location o) { |
| 696 buildCounterLocation++; |
| 697 if (buildCounterLocation < 3) { |
| 698 checkUnnamed3699(o.labels); |
| 699 checkUnnamed3700(o.metadata); |
| 700 unittest.expect(o.name, unittest.equals('foo')); |
| 701 } |
| 702 buildCounterLocation--; |
| 703 } |
| 704 |
| 605 core.int buildCounterLocationMetadata = 0; | 705 core.int buildCounterLocationMetadata = 0; |
| 606 buildLocationMetadata() { | 706 buildLocationMetadata() { |
| 607 var o = new api.LocationMetadata(); | 707 var o = new api.LocationMetadata(); |
| 608 buildCounterLocationMetadata++; | 708 buildCounterLocationMetadata++; |
| 609 if (buildCounterLocationMetadata < 3) { | 709 if (buildCounterLocationMetadata < 3) { |
| 610 } | 710 } |
| 611 buildCounterLocationMetadata--; | 711 buildCounterLocationMetadata--; |
| 612 return o; | 712 return o; |
| 613 } | 713 } |
| 614 | 714 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 631 } | 731 } |
| 632 | 732 |
| 633 checkManualScaling(api.ManualScaling o) { | 733 checkManualScaling(api.ManualScaling o) { |
| 634 buildCounterManualScaling++; | 734 buildCounterManualScaling++; |
| 635 if (buildCounterManualScaling < 3) { | 735 if (buildCounterManualScaling < 3) { |
| 636 unittest.expect(o.instances, unittest.equals(42)); | 736 unittest.expect(o.instances, unittest.equals(42)); |
| 637 } | 737 } |
| 638 buildCounterManualScaling--; | 738 buildCounterManualScaling--; |
| 639 } | 739 } |
| 640 | 740 |
| 641 buildUnnamed3023() { | 741 buildUnnamed3701() { |
| 642 var o = new core.List<core.String>(); | 742 var o = new core.List<core.String>(); |
| 643 o.add("foo"); | 743 o.add("foo"); |
| 644 o.add("foo"); | 744 o.add("foo"); |
| 645 return o; | 745 return o; |
| 646 } | 746 } |
| 647 | 747 |
| 648 checkUnnamed3023(core.List<core.String> o) { | 748 checkUnnamed3701(core.List<core.String> o) { |
| 649 unittest.expect(o, unittest.hasLength(2)); | 749 unittest.expect(o, unittest.hasLength(2)); |
| 650 unittest.expect(o[0], unittest.equals('foo')); | 750 unittest.expect(o[0], unittest.equals('foo')); |
| 651 unittest.expect(o[1], unittest.equals('foo')); | 751 unittest.expect(o[1], unittest.equals('foo')); |
| 652 } | 752 } |
| 653 | 753 |
| 654 core.int buildCounterNetwork = 0; | 754 core.int buildCounterNetwork = 0; |
| 655 buildNetwork() { | 755 buildNetwork() { |
| 656 var o = new api.Network(); | 756 var o = new api.Network(); |
| 657 buildCounterNetwork++; | 757 buildCounterNetwork++; |
| 658 if (buildCounterNetwork < 3) { | 758 if (buildCounterNetwork < 3) { |
| 659 o.forwardedPorts = buildUnnamed3023(); | 759 o.forwardedPorts = buildUnnamed3701(); |
| 660 o.instanceTag = "foo"; | 760 o.instanceTag = "foo"; |
| 661 o.name = "foo"; | 761 o.name = "foo"; |
| 662 } | 762 } |
| 663 buildCounterNetwork--; | 763 buildCounterNetwork--; |
| 664 return o; | 764 return o; |
| 665 } | 765 } |
| 666 | 766 |
| 667 checkNetwork(api.Network o) { | 767 checkNetwork(api.Network o) { |
| 668 buildCounterNetwork++; | 768 buildCounterNetwork++; |
| 669 if (buildCounterNetwork < 3) { | 769 if (buildCounterNetwork < 3) { |
| 670 checkUnnamed3023(o.forwardedPorts); | 770 checkUnnamed3701(o.forwardedPorts); |
| 671 unittest.expect(o.instanceTag, unittest.equals('foo')); | 771 unittest.expect(o.instanceTag, unittest.equals('foo')); |
| 672 unittest.expect(o.name, unittest.equals('foo')); | 772 unittest.expect(o.name, unittest.equals('foo')); |
| 673 } | 773 } |
| 674 buildCounterNetwork--; | 774 buildCounterNetwork--; |
| 675 } | 775 } |
| 676 | 776 |
| 677 core.int buildCounterNetworkUtilization = 0; | 777 core.int buildCounterNetworkUtilization = 0; |
| 678 buildNetworkUtilization() { | 778 buildNetworkUtilization() { |
| 679 var o = new api.NetworkUtilization(); | 779 var o = new api.NetworkUtilization(); |
| 680 buildCounterNetworkUtilization++; | 780 buildCounterNetworkUtilization++; |
| (...skipping 11 matching lines...) Expand all Loading... |
| 692 buildCounterNetworkUtilization++; | 792 buildCounterNetworkUtilization++; |
| 693 if (buildCounterNetworkUtilization < 3) { | 793 if (buildCounterNetworkUtilization < 3) { |
| 694 unittest.expect(o.targetReceivedBytesPerSec, unittest.equals(42)); | 794 unittest.expect(o.targetReceivedBytesPerSec, unittest.equals(42)); |
| 695 unittest.expect(o.targetReceivedPacketsPerSec, unittest.equals(42)); | 795 unittest.expect(o.targetReceivedPacketsPerSec, unittest.equals(42)); |
| 696 unittest.expect(o.targetSentBytesPerSec, unittest.equals(42)); | 796 unittest.expect(o.targetSentBytesPerSec, unittest.equals(42)); |
| 697 unittest.expect(o.targetSentPacketsPerSec, unittest.equals(42)); | 797 unittest.expect(o.targetSentPacketsPerSec, unittest.equals(42)); |
| 698 } | 798 } |
| 699 buildCounterNetworkUtilization--; | 799 buildCounterNetworkUtilization--; |
| 700 } | 800 } |
| 701 | 801 |
| 702 buildUnnamed3024() { | 802 buildUnnamed3702() { |
| 703 var o = new core.Map<core.String, core.Object>(); | 803 var o = new core.Map<core.String, core.Object>(); |
| 704 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 804 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
| 705 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 805 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
| 706 return o; | 806 return o; |
| 707 } | 807 } |
| 708 | 808 |
| 709 checkUnnamed3024(core.Map<core.String, core.Object> o) { | 809 checkUnnamed3702(core.Map<core.String, core.Object> o) { |
| 710 unittest.expect(o, unittest.hasLength(2)); | 810 unittest.expect(o, unittest.hasLength(2)); |
| 711 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')); | 811 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')); |
| 712 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')); | 812 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')); |
| 713 } | 813 } |
| 714 | 814 |
| 715 buildUnnamed3025() { | 815 buildUnnamed3703() { |
| 716 var o = new core.Map<core.String, core.Object>(); | 816 var o = new core.Map<core.String, core.Object>(); |
| 717 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 817 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
| 718 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 818 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
| 719 return o; | 819 return o; |
| 720 } | 820 } |
| 721 | 821 |
| 722 checkUnnamed3025(core.Map<core.String, core.Object> o) { | 822 checkUnnamed3703(core.Map<core.String, core.Object> o) { |
| 723 unittest.expect(o, unittest.hasLength(2)); | 823 unittest.expect(o, unittest.hasLength(2)); |
| 724 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')); | 824 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')); |
| 725 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')); | 825 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')); |
| 726 } | 826 } |
| 727 | 827 |
| 728 core.int buildCounterOperation = 0; | 828 core.int buildCounterOperation = 0; |
| 729 buildOperation() { | 829 buildOperation() { |
| 730 var o = new api.Operation(); | 830 var o = new api.Operation(); |
| 731 buildCounterOperation++; | 831 buildCounterOperation++; |
| 732 if (buildCounterOperation < 3) { | 832 if (buildCounterOperation < 3) { |
| 733 o.done = true; | 833 o.done = true; |
| 734 o.error = buildStatus(); | 834 o.error = buildStatus(); |
| 735 o.metadata = buildUnnamed3024(); | 835 o.metadata = buildUnnamed3702(); |
| 736 o.name = "foo"; | 836 o.name = "foo"; |
| 737 o.response = buildUnnamed3025(); | 837 o.response = buildUnnamed3703(); |
| 738 } | 838 } |
| 739 buildCounterOperation--; | 839 buildCounterOperation--; |
| 740 return o; | 840 return o; |
| 741 } | 841 } |
| 742 | 842 |
| 743 checkOperation(api.Operation o) { | 843 checkOperation(api.Operation o) { |
| 744 buildCounterOperation++; | 844 buildCounterOperation++; |
| 745 if (buildCounterOperation < 3) { | 845 if (buildCounterOperation < 3) { |
| 746 unittest.expect(o.done, unittest.isTrue); | 846 unittest.expect(o.done, unittest.isTrue); |
| 747 checkStatus(o.error); | 847 checkStatus(o.error); |
| 748 checkUnnamed3024(o.metadata); | 848 checkUnnamed3702(o.metadata); |
| 749 unittest.expect(o.name, unittest.equals('foo')); | 849 unittest.expect(o.name, unittest.equals('foo')); |
| 750 checkUnnamed3025(o.response); | 850 checkUnnamed3703(o.response); |
| 751 } | 851 } |
| 752 buildCounterOperation--; | 852 buildCounterOperation--; |
| 753 } | 853 } |
| 754 | 854 |
| 755 core.int buildCounterOperationMetadata = 0; | 855 core.int buildCounterOperationMetadata = 0; |
| 756 buildOperationMetadata() { | 856 buildOperationMetadata() { |
| 757 var o = new api.OperationMetadata(); | 857 var o = new api.OperationMetadata(); |
| 758 buildCounterOperationMetadata++; | 858 buildCounterOperationMetadata++; |
| 759 if (buildCounterOperationMetadata < 3) { | 859 if (buildCounterOperationMetadata < 3) { |
| 760 o.endTime = "foo"; | 860 o.endTime = "foo"; |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 935 | 1035 |
| 936 checkSourceReference(api.SourceReference o) { | 1036 checkSourceReference(api.SourceReference o) { |
| 937 buildCounterSourceReference++; | 1037 buildCounterSourceReference++; |
| 938 if (buildCounterSourceReference < 3) { | 1038 if (buildCounterSourceReference < 3) { |
| 939 unittest.expect(o.repository, unittest.equals('foo')); | 1039 unittest.expect(o.repository, unittest.equals('foo')); |
| 940 unittest.expect(o.revisionId, unittest.equals('foo')); | 1040 unittest.expect(o.revisionId, unittest.equals('foo')); |
| 941 } | 1041 } |
| 942 buildCounterSourceReference--; | 1042 buildCounterSourceReference--; |
| 943 } | 1043 } |
| 944 | 1044 |
| 945 buildUnnamed3026() { | 1045 buildUnnamed3704() { |
| 946 var o = new core.Map<core.String, core.String>(); | 1046 var o = new core.Map<core.String, core.String>(); |
| 947 o["x"] = "foo"; | 1047 o["x"] = "foo"; |
| 948 o["y"] = "foo"; | 1048 o["y"] = "foo"; |
| 949 return o; | 1049 return o; |
| 950 } | 1050 } |
| 951 | 1051 |
| 952 checkUnnamed3026(core.Map<core.String, core.String> o) { | 1052 checkUnnamed3704(core.Map<core.String, core.String> o) { |
| 953 unittest.expect(o, unittest.hasLength(2)); | 1053 unittest.expect(o, unittest.hasLength(2)); |
| 954 unittest.expect(o["x"], unittest.equals('foo')); | 1054 unittest.expect(o["x"], unittest.equals('foo')); |
| 955 unittest.expect(o["y"], unittest.equals('foo')); | 1055 unittest.expect(o["y"], unittest.equals('foo')); |
| 956 } | 1056 } |
| 957 | 1057 |
| 958 core.int buildCounterStaticFilesHandler = 0; | 1058 core.int buildCounterStaticFilesHandler = 0; |
| 959 buildStaticFilesHandler() { | 1059 buildStaticFilesHandler() { |
| 960 var o = new api.StaticFilesHandler(); | 1060 var o = new api.StaticFilesHandler(); |
| 961 buildCounterStaticFilesHandler++; | 1061 buildCounterStaticFilesHandler++; |
| 962 if (buildCounterStaticFilesHandler < 3) { | 1062 if (buildCounterStaticFilesHandler < 3) { |
| 963 o.applicationReadable = true; | 1063 o.applicationReadable = true; |
| 964 o.expiration = "foo"; | 1064 o.expiration = "foo"; |
| 965 o.httpHeaders = buildUnnamed3026(); | 1065 o.httpHeaders = buildUnnamed3704(); |
| 966 o.mimeType = "foo"; | 1066 o.mimeType = "foo"; |
| 967 o.path = "foo"; | 1067 o.path = "foo"; |
| 968 o.requireMatchingFile = true; | 1068 o.requireMatchingFile = true; |
| 969 o.uploadPathRegex = "foo"; | 1069 o.uploadPathRegex = "foo"; |
| 970 } | 1070 } |
| 971 buildCounterStaticFilesHandler--; | 1071 buildCounterStaticFilesHandler--; |
| 972 return o; | 1072 return o; |
| 973 } | 1073 } |
| 974 | 1074 |
| 975 checkStaticFilesHandler(api.StaticFilesHandler o) { | 1075 checkStaticFilesHandler(api.StaticFilesHandler o) { |
| 976 buildCounterStaticFilesHandler++; | 1076 buildCounterStaticFilesHandler++; |
| 977 if (buildCounterStaticFilesHandler < 3) { | 1077 if (buildCounterStaticFilesHandler < 3) { |
| 978 unittest.expect(o.applicationReadable, unittest.isTrue); | 1078 unittest.expect(o.applicationReadable, unittest.isTrue); |
| 979 unittest.expect(o.expiration, unittest.equals('foo')); | 1079 unittest.expect(o.expiration, unittest.equals('foo')); |
| 980 checkUnnamed3026(o.httpHeaders); | 1080 checkUnnamed3704(o.httpHeaders); |
| 981 unittest.expect(o.mimeType, unittest.equals('foo')); | 1081 unittest.expect(o.mimeType, unittest.equals('foo')); |
| 982 unittest.expect(o.path, unittest.equals('foo')); | 1082 unittest.expect(o.path, unittest.equals('foo')); |
| 983 unittest.expect(o.requireMatchingFile, unittest.isTrue); | 1083 unittest.expect(o.requireMatchingFile, unittest.isTrue); |
| 984 unittest.expect(o.uploadPathRegex, unittest.equals('foo')); | 1084 unittest.expect(o.uploadPathRegex, unittest.equals('foo')); |
| 985 } | 1085 } |
| 986 buildCounterStaticFilesHandler--; | 1086 buildCounterStaticFilesHandler--; |
| 987 } | 1087 } |
| 988 | 1088 |
| 989 buildUnnamed3027() { | 1089 buildUnnamed3705() { |
| 990 var o = new core.Map<core.String, core.Object>(); | 1090 var o = new core.Map<core.String, core.Object>(); |
| 991 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 1091 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
| 992 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 1092 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
| 993 return o; | 1093 return o; |
| 994 } | 1094 } |
| 995 | 1095 |
| 996 checkUnnamed3027(core.Map<core.String, core.Object> o) { | 1096 checkUnnamed3705(core.Map<core.String, core.Object> o) { |
| 997 unittest.expect(o, unittest.hasLength(2)); | 1097 unittest.expect(o, unittest.hasLength(2)); |
| 998 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')); | 1098 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')); |
| 999 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')); | 1099 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')); |
| 1000 } | 1100 } |
| 1001 | 1101 |
| 1002 buildUnnamed3028() { | 1102 buildUnnamed3706() { |
| 1003 var o = new core.List<core.Map<core.String, core.Object>>(); | 1103 var o = new core.List<core.Map<core.String, core.Object>>(); |
| 1004 o.add(buildUnnamed3027()); | 1104 o.add(buildUnnamed3705()); |
| 1005 o.add(buildUnnamed3027()); | 1105 o.add(buildUnnamed3705()); |
| 1006 return o; | 1106 return o; |
| 1007 } | 1107 } |
| 1008 | 1108 |
| 1009 checkUnnamed3028(core.List<core.Map<core.String, core.Object>> o) { | 1109 checkUnnamed3706(core.List<core.Map<core.String, core.Object>> o) { |
| 1010 unittest.expect(o, unittest.hasLength(2)); | 1110 unittest.expect(o, unittest.hasLength(2)); |
| 1011 checkUnnamed3027(o[0]); | 1111 checkUnnamed3705(o[0]); |
| 1012 checkUnnamed3027(o[1]); | 1112 checkUnnamed3705(o[1]); |
| 1013 } | 1113 } |
| 1014 | 1114 |
| 1015 core.int buildCounterStatus = 0; | 1115 core.int buildCounterStatus = 0; |
| 1016 buildStatus() { | 1116 buildStatus() { |
| 1017 var o = new api.Status(); | 1117 var o = new api.Status(); |
| 1018 buildCounterStatus++; | 1118 buildCounterStatus++; |
| 1019 if (buildCounterStatus < 3) { | 1119 if (buildCounterStatus < 3) { |
| 1020 o.code = 42; | 1120 o.code = 42; |
| 1021 o.details = buildUnnamed3028(); | 1121 o.details = buildUnnamed3706(); |
| 1022 o.message = "foo"; | 1122 o.message = "foo"; |
| 1023 } | 1123 } |
| 1024 buildCounterStatus--; | 1124 buildCounterStatus--; |
| 1025 return o; | 1125 return o; |
| 1026 } | 1126 } |
| 1027 | 1127 |
| 1028 checkStatus(api.Status o) { | 1128 checkStatus(api.Status o) { |
| 1029 buildCounterStatus++; | 1129 buildCounterStatus++; |
| 1030 if (buildCounterStatus < 3) { | 1130 if (buildCounterStatus < 3) { |
| 1031 unittest.expect(o.code, unittest.equals(42)); | 1131 unittest.expect(o.code, unittest.equals(42)); |
| 1032 checkUnnamed3028(o.details); | 1132 checkUnnamed3706(o.details); |
| 1033 unittest.expect(o.message, unittest.equals('foo')); | 1133 unittest.expect(o.message, unittest.equals('foo')); |
| 1034 } | 1134 } |
| 1035 buildCounterStatus--; | 1135 buildCounterStatus--; |
| 1036 } | 1136 } |
| 1037 | 1137 |
| 1038 buildUnnamed3029() { | 1138 buildUnnamed3707() { |
| 1039 var o = new core.Map<core.String, core.double>(); | 1139 var o = new core.Map<core.String, core.double>(); |
| 1040 o["x"] = 42.0; | 1140 o["x"] = 42.0; |
| 1041 o["y"] = 42.0; | 1141 o["y"] = 42.0; |
| 1042 return o; | 1142 return o; |
| 1043 } | 1143 } |
| 1044 | 1144 |
| 1045 checkUnnamed3029(core.Map<core.String, core.double> o) { | 1145 checkUnnamed3707(core.Map<core.String, core.double> o) { |
| 1046 unittest.expect(o, unittest.hasLength(2)); | 1146 unittest.expect(o, unittest.hasLength(2)); |
| 1047 unittest.expect(o["x"], unittest.equals(42.0)); | 1147 unittest.expect(o["x"], unittest.equals(42.0)); |
| 1048 unittest.expect(o["y"], unittest.equals(42.0)); | 1148 unittest.expect(o["y"], unittest.equals(42.0)); |
| 1049 } | 1149 } |
| 1050 | 1150 |
| 1051 core.int buildCounterTrafficSplit = 0; | 1151 core.int buildCounterTrafficSplit = 0; |
| 1052 buildTrafficSplit() { | 1152 buildTrafficSplit() { |
| 1053 var o = new api.TrafficSplit(); | 1153 var o = new api.TrafficSplit(); |
| 1054 buildCounterTrafficSplit++; | 1154 buildCounterTrafficSplit++; |
| 1055 if (buildCounterTrafficSplit < 3) { | 1155 if (buildCounterTrafficSplit < 3) { |
| 1056 o.allocations = buildUnnamed3029(); | 1156 o.allocations = buildUnnamed3707(); |
| 1057 o.shardBy = "foo"; | 1157 o.shardBy = "foo"; |
| 1058 } | 1158 } |
| 1059 buildCounterTrafficSplit--; | 1159 buildCounterTrafficSplit--; |
| 1060 return o; | 1160 return o; |
| 1061 } | 1161 } |
| 1062 | 1162 |
| 1063 checkTrafficSplit(api.TrafficSplit o) { | 1163 checkTrafficSplit(api.TrafficSplit o) { |
| 1064 buildCounterTrafficSplit++; | 1164 buildCounterTrafficSplit++; |
| 1065 if (buildCounterTrafficSplit < 3) { | 1165 if (buildCounterTrafficSplit < 3) { |
| 1066 checkUnnamed3029(o.allocations); | 1166 checkUnnamed3707(o.allocations); |
| 1067 unittest.expect(o.shardBy, unittest.equals('foo')); | 1167 unittest.expect(o.shardBy, unittest.equals('foo')); |
| 1068 } | 1168 } |
| 1069 buildCounterTrafficSplit--; | 1169 buildCounterTrafficSplit--; |
| 1070 } | 1170 } |
| 1071 | 1171 |
| 1072 core.int buildCounterUrlDispatchRule = 0; | 1172 core.int buildCounterUrlDispatchRule = 0; |
| 1073 buildUrlDispatchRule() { | 1173 buildUrlDispatchRule() { |
| 1074 var o = new api.UrlDispatchRule(); | 1174 var o = new api.UrlDispatchRule(); |
| 1075 buildCounterUrlDispatchRule++; | 1175 buildCounterUrlDispatchRule++; |
| 1076 if (buildCounterUrlDispatchRule < 3) { | 1176 if (buildCounterUrlDispatchRule < 3) { |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1118 unittest.expect(o.login, unittest.equals('foo')); | 1218 unittest.expect(o.login, unittest.equals('foo')); |
| 1119 unittest.expect(o.redirectHttpResponseCode, unittest.equals('foo')); | 1219 unittest.expect(o.redirectHttpResponseCode, unittest.equals('foo')); |
| 1120 checkScriptHandler(o.script); | 1220 checkScriptHandler(o.script); |
| 1121 unittest.expect(o.securityLevel, unittest.equals('foo')); | 1221 unittest.expect(o.securityLevel, unittest.equals('foo')); |
| 1122 checkStaticFilesHandler(o.staticFiles); | 1222 checkStaticFilesHandler(o.staticFiles); |
| 1123 unittest.expect(o.urlRegex, unittest.equals('foo')); | 1223 unittest.expect(o.urlRegex, unittest.equals('foo')); |
| 1124 } | 1224 } |
| 1125 buildCounterUrlMap--; | 1225 buildCounterUrlMap--; |
| 1126 } | 1226 } |
| 1127 | 1227 |
| 1128 buildUnnamed3030() { | 1228 buildUnnamed3708() { |
| 1129 var o = new core.Map<core.String, core.String>(); | 1229 var o = new core.Map<core.String, core.String>(); |
| 1130 o["x"] = "foo"; | 1230 o["x"] = "foo"; |
| 1131 o["y"] = "foo"; | 1231 o["y"] = "foo"; |
| 1132 return o; | 1232 return o; |
| 1133 } | 1233 } |
| 1134 | 1234 |
| 1135 checkUnnamed3030(core.Map<core.String, core.String> o) { | 1235 checkUnnamed3708(core.Map<core.String, core.String> o) { |
| 1136 unittest.expect(o, unittest.hasLength(2)); | 1236 unittest.expect(o, unittest.hasLength(2)); |
| 1137 unittest.expect(o["x"], unittest.equals('foo')); | 1237 unittest.expect(o["x"], unittest.equals('foo')); |
| 1138 unittest.expect(o["y"], unittest.equals('foo')); | 1238 unittest.expect(o["y"], unittest.equals('foo')); |
| 1139 } | 1239 } |
| 1140 | 1240 |
| 1141 buildUnnamed3031() { | 1241 buildUnnamed3709() { |
| 1142 var o = new core.Map<core.String, core.String>(); | 1242 var o = new core.Map<core.String, core.String>(); |
| 1143 o["x"] = "foo"; | 1243 o["x"] = "foo"; |
| 1144 o["y"] = "foo"; | 1244 o["y"] = "foo"; |
| 1145 return o; | 1245 return o; |
| 1146 } | 1246 } |
| 1147 | 1247 |
| 1148 checkUnnamed3031(core.Map<core.String, core.String> o) { | 1248 checkUnnamed3709(core.Map<core.String, core.String> o) { |
| 1149 unittest.expect(o, unittest.hasLength(2)); | 1249 unittest.expect(o, unittest.hasLength(2)); |
| 1150 unittest.expect(o["x"], unittest.equals('foo')); | 1250 unittest.expect(o["x"], unittest.equals('foo')); |
| 1151 unittest.expect(o["y"], unittest.equals('foo')); | 1251 unittest.expect(o["y"], unittest.equals('foo')); |
| 1152 } | 1252 } |
| 1153 | 1253 |
| 1154 buildUnnamed3032() { | 1254 buildUnnamed3710() { |
| 1155 var o = new core.List<api.ErrorHandler>(); | 1255 var o = new core.List<api.ErrorHandler>(); |
| 1156 o.add(buildErrorHandler()); | 1256 o.add(buildErrorHandler()); |
| 1157 o.add(buildErrorHandler()); | 1257 o.add(buildErrorHandler()); |
| 1158 return o; | 1258 return o; |
| 1159 } | 1259 } |
| 1160 | 1260 |
| 1161 checkUnnamed3032(core.List<api.ErrorHandler> o) { | 1261 checkUnnamed3710(core.List<api.ErrorHandler> o) { |
| 1162 unittest.expect(o, unittest.hasLength(2)); | 1262 unittest.expect(o, unittest.hasLength(2)); |
| 1163 checkErrorHandler(o[0]); | 1263 checkErrorHandler(o[0]); |
| 1164 checkErrorHandler(o[1]); | 1264 checkErrorHandler(o[1]); |
| 1165 } | 1265 } |
| 1166 | 1266 |
| 1167 buildUnnamed3033() { | 1267 buildUnnamed3711() { |
| 1168 var o = new core.List<api.UrlMap>(); | 1268 var o = new core.List<api.UrlMap>(); |
| 1169 o.add(buildUrlMap()); | 1269 o.add(buildUrlMap()); |
| 1170 o.add(buildUrlMap()); | 1270 o.add(buildUrlMap()); |
| 1171 return o; | 1271 return o; |
| 1172 } | 1272 } |
| 1173 | 1273 |
| 1174 checkUnnamed3033(core.List<api.UrlMap> o) { | 1274 checkUnnamed3711(core.List<api.UrlMap> o) { |
| 1175 unittest.expect(o, unittest.hasLength(2)); | 1275 unittest.expect(o, unittest.hasLength(2)); |
| 1176 checkUrlMap(o[0]); | 1276 checkUrlMap(o[0]); |
| 1177 checkUrlMap(o[1]); | 1277 checkUrlMap(o[1]); |
| 1178 } | 1278 } |
| 1179 | 1279 |
| 1180 buildUnnamed3034() { | 1280 buildUnnamed3712() { |
| 1181 var o = new core.List<core.String>(); | 1281 var o = new core.List<core.String>(); |
| 1182 o.add("foo"); | 1282 o.add("foo"); |
| 1183 o.add("foo"); | 1283 o.add("foo"); |
| 1184 return o; | 1284 return o; |
| 1185 } | 1285 } |
| 1186 | 1286 |
| 1187 checkUnnamed3034(core.List<core.String> o) { | 1287 checkUnnamed3712(core.List<core.String> o) { |
| 1188 unittest.expect(o, unittest.hasLength(2)); | 1288 unittest.expect(o, unittest.hasLength(2)); |
| 1189 unittest.expect(o[0], unittest.equals('foo')); | 1289 unittest.expect(o[0], unittest.equals('foo')); |
| 1190 unittest.expect(o[1], unittest.equals('foo')); | 1290 unittest.expect(o[1], unittest.equals('foo')); |
| 1191 } | 1291 } |
| 1192 | 1292 |
| 1193 buildUnnamed3035() { | 1293 buildUnnamed3713() { |
| 1194 var o = new core.List<api.Library>(); | 1294 var o = new core.List<api.Library>(); |
| 1195 o.add(buildLibrary()); | 1295 o.add(buildLibrary()); |
| 1196 o.add(buildLibrary()); | 1296 o.add(buildLibrary()); |
| 1197 return o; | 1297 return o; |
| 1198 } | 1298 } |
| 1199 | 1299 |
| 1200 checkUnnamed3035(core.List<api.Library> o) { | 1300 checkUnnamed3713(core.List<api.Library> o) { |
| 1201 unittest.expect(o, unittest.hasLength(2)); | 1301 unittest.expect(o, unittest.hasLength(2)); |
| 1202 checkLibrary(o[0]); | 1302 checkLibrary(o[0]); |
| 1203 checkLibrary(o[1]); | 1303 checkLibrary(o[1]); |
| 1204 } | 1304 } |
| 1205 | 1305 |
| 1206 core.int buildCounterVersion = 0; | 1306 core.int buildCounterVersion = 0; |
| 1207 buildVersion() { | 1307 buildVersion() { |
| 1208 var o = new api.Version(); | 1308 var o = new api.Version(); |
| 1209 buildCounterVersion++; | 1309 buildCounterVersion++; |
| 1210 if (buildCounterVersion < 3) { | 1310 if (buildCounterVersion < 3) { |
| 1211 o.apiConfig = buildApiConfigHandler(); | 1311 o.apiConfig = buildApiConfigHandler(); |
| 1212 o.automaticScaling = buildAutomaticScaling(); | 1312 o.automaticScaling = buildAutomaticScaling(); |
| 1213 o.basicScaling = buildBasicScaling(); | 1313 o.basicScaling = buildBasicScaling(); |
| 1214 o.betaSettings = buildUnnamed3030(); | 1314 o.betaSettings = buildUnnamed3708(); |
| 1215 o.creationTime = "foo"; | 1315 o.creationTime = "foo"; |
| 1216 o.defaultExpiration = "foo"; | 1316 o.defaultExpiration = "foo"; |
| 1217 o.deployer = "foo"; | 1317 o.deployer = "foo"; |
| 1218 o.deployment = buildDeployment(); | 1318 o.deployment = buildDeployment(); |
| 1219 o.diskUsageBytes = "foo"; | 1319 o.diskUsageBytes = "foo"; |
| 1220 o.env = "foo"; | 1320 o.env = "foo"; |
| 1221 o.envVariables = buildUnnamed3031(); | 1321 o.envVariables = buildUnnamed3709(); |
| 1222 o.errorHandlers = buildUnnamed3032(); | 1322 o.errorHandlers = buildUnnamed3710(); |
| 1223 o.handlers = buildUnnamed3033(); | 1323 o.handlers = buildUnnamed3711(); |
| 1224 o.healthCheck = buildHealthCheck(); | 1324 o.healthCheck = buildHealthCheck(); |
| 1225 o.id = "foo"; | 1325 o.id = "foo"; |
| 1226 o.inboundServices = buildUnnamed3034(); | 1326 o.inboundServices = buildUnnamed3712(); |
| 1227 o.instanceClass = "foo"; | 1327 o.instanceClass = "foo"; |
| 1228 o.libraries = buildUnnamed3035(); | 1328 o.libraries = buildUnnamed3713(); |
| 1229 o.manualScaling = buildManualScaling(); | 1329 o.manualScaling = buildManualScaling(); |
| 1230 o.name = "foo"; | 1330 o.name = "foo"; |
| 1231 o.network = buildNetwork(); | 1331 o.network = buildNetwork(); |
| 1232 o.nobuildFilesRegex = "foo"; | 1332 o.nobuildFilesRegex = "foo"; |
| 1233 o.resources = buildResources(); | 1333 o.resources = buildResources(); |
| 1234 o.runtime = "foo"; | 1334 o.runtime = "foo"; |
| 1235 o.servingStatus = "foo"; | 1335 o.servingStatus = "foo"; |
| 1236 o.threadsafe = true; | 1336 o.threadsafe = true; |
| 1237 o.vm = true; | 1337 o.vm = true; |
| 1238 } | 1338 } |
| 1239 buildCounterVersion--; | 1339 buildCounterVersion--; |
| 1240 return o; | 1340 return o; |
| 1241 } | 1341 } |
| 1242 | 1342 |
| 1243 checkVersion(api.Version o) { | 1343 checkVersion(api.Version o) { |
| 1244 buildCounterVersion++; | 1344 buildCounterVersion++; |
| 1245 if (buildCounterVersion < 3) { | 1345 if (buildCounterVersion < 3) { |
| 1246 checkApiConfigHandler(o.apiConfig); | 1346 checkApiConfigHandler(o.apiConfig); |
| 1247 checkAutomaticScaling(o.automaticScaling); | 1347 checkAutomaticScaling(o.automaticScaling); |
| 1248 checkBasicScaling(o.basicScaling); | 1348 checkBasicScaling(o.basicScaling); |
| 1249 checkUnnamed3030(o.betaSettings); | 1349 checkUnnamed3708(o.betaSettings); |
| 1250 unittest.expect(o.creationTime, unittest.equals('foo')); | 1350 unittest.expect(o.creationTime, unittest.equals('foo')); |
| 1251 unittest.expect(o.defaultExpiration, unittest.equals('foo')); | 1351 unittest.expect(o.defaultExpiration, unittest.equals('foo')); |
| 1252 unittest.expect(o.deployer, unittest.equals('foo')); | 1352 unittest.expect(o.deployer, unittest.equals('foo')); |
| 1253 checkDeployment(o.deployment); | 1353 checkDeployment(o.deployment); |
| 1254 unittest.expect(o.diskUsageBytes, unittest.equals('foo')); | 1354 unittest.expect(o.diskUsageBytes, unittest.equals('foo')); |
| 1255 unittest.expect(o.env, unittest.equals('foo')); | 1355 unittest.expect(o.env, unittest.equals('foo')); |
| 1256 checkUnnamed3031(o.envVariables); | 1356 checkUnnamed3709(o.envVariables); |
| 1257 checkUnnamed3032(o.errorHandlers); | 1357 checkUnnamed3710(o.errorHandlers); |
| 1258 checkUnnamed3033(o.handlers); | 1358 checkUnnamed3711(o.handlers); |
| 1259 checkHealthCheck(o.healthCheck); | 1359 checkHealthCheck(o.healthCheck); |
| 1260 unittest.expect(o.id, unittest.equals('foo')); | 1360 unittest.expect(o.id, unittest.equals('foo')); |
| 1261 checkUnnamed3034(o.inboundServices); | 1361 checkUnnamed3712(o.inboundServices); |
| 1262 unittest.expect(o.instanceClass, unittest.equals('foo')); | 1362 unittest.expect(o.instanceClass, unittest.equals('foo')); |
| 1263 checkUnnamed3035(o.libraries); | 1363 checkUnnamed3713(o.libraries); |
| 1264 checkManualScaling(o.manualScaling); | 1364 checkManualScaling(o.manualScaling); |
| 1265 unittest.expect(o.name, unittest.equals('foo')); | 1365 unittest.expect(o.name, unittest.equals('foo')); |
| 1266 checkNetwork(o.network); | 1366 checkNetwork(o.network); |
| 1267 unittest.expect(o.nobuildFilesRegex, unittest.equals('foo')); | 1367 unittest.expect(o.nobuildFilesRegex, unittest.equals('foo')); |
| 1268 checkResources(o.resources); | 1368 checkResources(o.resources); |
| 1269 unittest.expect(o.runtime, unittest.equals('foo')); | 1369 unittest.expect(o.runtime, unittest.equals('foo')); |
| 1270 unittest.expect(o.servingStatus, unittest.equals('foo')); | 1370 unittest.expect(o.servingStatus, unittest.equals('foo')); |
| 1271 unittest.expect(o.threadsafe, unittest.isTrue); | 1371 unittest.expect(o.threadsafe, unittest.isTrue); |
| 1272 unittest.expect(o.vm, unittest.isTrue); | 1372 unittest.expect(o.vm, unittest.isTrue); |
| 1273 } | 1373 } |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1332 | 1432 |
| 1333 unittest.group("obj-schema-CpuUtilization", () { | 1433 unittest.group("obj-schema-CpuUtilization", () { |
| 1334 unittest.test("to-json--from-json", () { | 1434 unittest.test("to-json--from-json", () { |
| 1335 var o = buildCpuUtilization(); | 1435 var o = buildCpuUtilization(); |
| 1336 var od = new api.CpuUtilization.fromJson(o.toJson()); | 1436 var od = new api.CpuUtilization.fromJson(o.toJson()); |
| 1337 checkCpuUtilization(od); | 1437 checkCpuUtilization(od); |
| 1338 }); | 1438 }); |
| 1339 }); | 1439 }); |
| 1340 | 1440 |
| 1341 | 1441 |
| 1442 unittest.group("obj-schema-DebugInstanceRequest", () { |
| 1443 unittest.test("to-json--from-json", () { |
| 1444 var o = buildDebugInstanceRequest(); |
| 1445 var od = new api.DebugInstanceRequest.fromJson(o.toJson()); |
| 1446 checkDebugInstanceRequest(od); |
| 1447 }); |
| 1448 }); |
| 1449 |
| 1450 |
| 1342 unittest.group("obj-schema-Deployment", () { | 1451 unittest.group("obj-schema-Deployment", () { |
| 1343 unittest.test("to-json--from-json", () { | 1452 unittest.test("to-json--from-json", () { |
| 1344 var o = buildDeployment(); | 1453 var o = buildDeployment(); |
| 1345 var od = new api.Deployment.fromJson(o.toJson()); | 1454 var od = new api.Deployment.fromJson(o.toJson()); |
| 1346 checkDeployment(od); | 1455 checkDeployment(od); |
| 1347 }); | 1456 }); |
| 1348 }); | 1457 }); |
| 1349 | 1458 |
| 1350 | 1459 |
| 1351 unittest.group("obj-schema-DiskUtilization", () { | 1460 unittest.group("obj-schema-DiskUtilization", () { |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1404 | 1513 |
| 1405 unittest.group("obj-schema-ListInstancesResponse", () { | 1514 unittest.group("obj-schema-ListInstancesResponse", () { |
| 1406 unittest.test("to-json--from-json", () { | 1515 unittest.test("to-json--from-json", () { |
| 1407 var o = buildListInstancesResponse(); | 1516 var o = buildListInstancesResponse(); |
| 1408 var od = new api.ListInstancesResponse.fromJson(o.toJson()); | 1517 var od = new api.ListInstancesResponse.fromJson(o.toJson()); |
| 1409 checkListInstancesResponse(od); | 1518 checkListInstancesResponse(od); |
| 1410 }); | 1519 }); |
| 1411 }); | 1520 }); |
| 1412 | 1521 |
| 1413 | 1522 |
| 1523 unittest.group("obj-schema-ListLocationsResponse", () { |
| 1524 unittest.test("to-json--from-json", () { |
| 1525 var o = buildListLocationsResponse(); |
| 1526 var od = new api.ListLocationsResponse.fromJson(o.toJson()); |
| 1527 checkListLocationsResponse(od); |
| 1528 }); |
| 1529 }); |
| 1530 |
| 1531 |
| 1414 unittest.group("obj-schema-ListOperationsResponse", () { | 1532 unittest.group("obj-schema-ListOperationsResponse", () { |
| 1415 unittest.test("to-json--from-json", () { | 1533 unittest.test("to-json--from-json", () { |
| 1416 var o = buildListOperationsResponse(); | 1534 var o = buildListOperationsResponse(); |
| 1417 var od = new api.ListOperationsResponse.fromJson(o.toJson()); | 1535 var od = new api.ListOperationsResponse.fromJson(o.toJson()); |
| 1418 checkListOperationsResponse(od); | 1536 checkListOperationsResponse(od); |
| 1419 }); | 1537 }); |
| 1420 }); | 1538 }); |
| 1421 | 1539 |
| 1422 | 1540 |
| 1423 unittest.group("obj-schema-ListServicesResponse", () { | 1541 unittest.group("obj-schema-ListServicesResponse", () { |
| 1424 unittest.test("to-json--from-json", () { | 1542 unittest.test("to-json--from-json", () { |
| 1425 var o = buildListServicesResponse(); | 1543 var o = buildListServicesResponse(); |
| 1426 var od = new api.ListServicesResponse.fromJson(o.toJson()); | 1544 var od = new api.ListServicesResponse.fromJson(o.toJson()); |
| 1427 checkListServicesResponse(od); | 1545 checkListServicesResponse(od); |
| 1428 }); | 1546 }); |
| 1429 }); | 1547 }); |
| 1430 | 1548 |
| 1431 | 1549 |
| 1432 unittest.group("obj-schema-ListVersionsResponse", () { | 1550 unittest.group("obj-schema-ListVersionsResponse", () { |
| 1433 unittest.test("to-json--from-json", () { | 1551 unittest.test("to-json--from-json", () { |
| 1434 var o = buildListVersionsResponse(); | 1552 var o = buildListVersionsResponse(); |
| 1435 var od = new api.ListVersionsResponse.fromJson(o.toJson()); | 1553 var od = new api.ListVersionsResponse.fromJson(o.toJson()); |
| 1436 checkListVersionsResponse(od); | 1554 checkListVersionsResponse(od); |
| 1437 }); | 1555 }); |
| 1438 }); | 1556 }); |
| 1439 | 1557 |
| 1440 | 1558 |
| 1559 unittest.group("obj-schema-Location", () { |
| 1560 unittest.test("to-json--from-json", () { |
| 1561 var o = buildLocation(); |
| 1562 var od = new api.Location.fromJson(o.toJson()); |
| 1563 checkLocation(od); |
| 1564 }); |
| 1565 }); |
| 1566 |
| 1567 |
| 1441 unittest.group("obj-schema-LocationMetadata", () { | 1568 unittest.group("obj-schema-LocationMetadata", () { |
| 1442 unittest.test("to-json--from-json", () { | 1569 unittest.test("to-json--from-json", () { |
| 1443 var o = buildLocationMetadata(); | 1570 var o = buildLocationMetadata(); |
| 1444 var od = new api.LocationMetadata.fromJson(o.toJson()); | 1571 var od = new api.LocationMetadata.fromJson(o.toJson()); |
| 1445 checkLocationMetadata(od); | 1572 checkLocationMetadata(od); |
| 1446 }); | 1573 }); |
| 1447 }); | 1574 }); |
| 1448 | 1575 |
| 1449 | 1576 |
| 1450 unittest.group("obj-schema-ManualScaling", () { | 1577 unittest.group("obj-schema-ManualScaling", () { |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1603 unittest.group("obj-schema-Version", () { | 1730 unittest.group("obj-schema-Version", () { |
| 1604 unittest.test("to-json--from-json", () { | 1731 unittest.test("to-json--from-json", () { |
| 1605 var o = buildVersion(); | 1732 var o = buildVersion(); |
| 1606 var od = new api.Version.fromJson(o.toJson()); | 1733 var od = new api.Version.fromJson(o.toJson()); |
| 1607 checkVersion(od); | 1734 checkVersion(od); |
| 1608 }); | 1735 }); |
| 1609 }); | 1736 }); |
| 1610 | 1737 |
| 1611 | 1738 |
| 1612 unittest.group("resource-AppsResourceApi", () { | 1739 unittest.group("resource-AppsResourceApi", () { |
| 1740 unittest.test("method--create", () { |
| 1741 |
| 1742 var mock = new HttpServerMock(); |
| 1743 api.AppsResourceApi res = new api.AppengineApi(mock).apps; |
| 1744 var arg_request = buildApplication(); |
| 1745 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 1746 var obj = new api.Application.fromJson(json); |
| 1747 checkApplication(obj); |
| 1748 |
| 1749 var path = (req.url).path; |
| 1750 var pathOffset = 0; |
| 1751 var index; |
| 1752 var subPart; |
| 1753 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1754 pathOffset += 1; |
| 1755 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("v1beta5/apps")); |
| 1756 pathOffset += 12; |
| 1757 |
| 1758 var query = (req.url).query; |
| 1759 var queryOffset = 0; |
| 1760 var queryMap = {}; |
| 1761 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 1762 parseBool(n) { |
| 1763 if (n == "true") return true; |
| 1764 if (n == "false") return false; |
| 1765 if (n == null) return null; |
| 1766 throw new core.ArgumentError("Invalid boolean: $n"); |
| 1767 } |
| 1768 if (query.length > 0) { |
| 1769 for (var part in query.split("&")) { |
| 1770 var keyvalue = part.split("="); |
| 1771 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 1772 } |
| 1773 } |
| 1774 |
| 1775 |
| 1776 var h = { |
| 1777 "content-type" : "application/json; charset=utf-8", |
| 1778 }; |
| 1779 var resp = convert.JSON.encode(buildOperation()); |
| 1780 return new async.Future.value(stringResponse(200, h, resp)); |
| 1781 }), true); |
| 1782 res.create(arg_request).then(unittest.expectAsync(((api.Operation response
) { |
| 1783 checkOperation(response); |
| 1784 }))); |
| 1785 }); |
| 1786 |
| 1613 unittest.test("method--get", () { | 1787 unittest.test("method--get", () { |
| 1614 | 1788 |
| 1615 var mock = new HttpServerMock(); | 1789 var mock = new HttpServerMock(); |
| 1616 api.AppsResourceApi res = new api.AppengineApi(mock).apps; | 1790 api.AppsResourceApi res = new api.AppengineApi(mock).apps; |
| 1617 var arg_appsId = "foo"; | 1791 var arg_appsId = "foo"; |
| 1618 var arg_ensureResourcesExist = true; | 1792 var arg_ensureResourcesExist = true; |
| 1619 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1793 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 1620 var path = (req.url).path; | 1794 var path = (req.url).path; |
| 1621 var pathOffset = 0; | 1795 var pathOffset = 0; |
| 1622 var index; | 1796 var index; |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1655 return new async.Future.value(stringResponse(200, h, resp)); | 1829 return new async.Future.value(stringResponse(200, h, resp)); |
| 1656 }), true); | 1830 }), true); |
| 1657 res.get(arg_appsId, ensureResourcesExist: arg_ensureResourcesExist).then(u
nittest.expectAsync(((api.Application response) { | 1831 res.get(arg_appsId, ensureResourcesExist: arg_ensureResourcesExist).then(u
nittest.expectAsync(((api.Application response) { |
| 1658 checkApplication(response); | 1832 checkApplication(response); |
| 1659 }))); | 1833 }))); |
| 1660 }); | 1834 }); |
| 1661 | 1835 |
| 1662 }); | 1836 }); |
| 1663 | 1837 |
| 1664 | 1838 |
| 1839 unittest.group("resource-AppsLocationsResourceApi", () { |
| 1840 unittest.test("method--get", () { |
| 1841 |
| 1842 var mock = new HttpServerMock(); |
| 1843 api.AppsLocationsResourceApi res = new api.AppengineApi(mock).apps.locatio
ns; |
| 1844 var arg_appsId = "foo"; |
| 1845 var arg_locationsId = "foo"; |
| 1846 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 1847 var path = (req.url).path; |
| 1848 var pathOffset = 0; |
| 1849 var index; |
| 1850 var subPart; |
| 1851 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1852 pathOffset += 1; |
| 1853 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("v1beta5/apps/")); |
| 1854 pathOffset += 13; |
| 1855 index = path.indexOf("/locations/", pathOffset); |
| 1856 unittest.expect(index >= 0, unittest.isTrue); |
| 1857 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); |
| 1858 pathOffset = index; |
| 1859 unittest.expect(subPart, unittest.equals("$arg_appsId")); |
| 1860 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("/locations/")); |
| 1861 pathOffset += 11; |
| 1862 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| 1863 pathOffset = path.length; |
| 1864 unittest.expect(subPart, unittest.equals("$arg_locationsId")); |
| 1865 |
| 1866 var query = (req.url).query; |
| 1867 var queryOffset = 0; |
| 1868 var queryMap = {}; |
| 1869 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 1870 parseBool(n) { |
| 1871 if (n == "true") return true; |
| 1872 if (n == "false") return false; |
| 1873 if (n == null) return null; |
| 1874 throw new core.ArgumentError("Invalid boolean: $n"); |
| 1875 } |
| 1876 if (query.length > 0) { |
| 1877 for (var part in query.split("&")) { |
| 1878 var keyvalue = part.split("="); |
| 1879 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 1880 } |
| 1881 } |
| 1882 |
| 1883 |
| 1884 var h = { |
| 1885 "content-type" : "application/json; charset=utf-8", |
| 1886 }; |
| 1887 var resp = convert.JSON.encode(buildLocation()); |
| 1888 return new async.Future.value(stringResponse(200, h, resp)); |
| 1889 }), true); |
| 1890 res.get(arg_appsId, arg_locationsId).then(unittest.expectAsync(((api.Locat
ion response) { |
| 1891 checkLocation(response); |
| 1892 }))); |
| 1893 }); |
| 1894 |
| 1895 unittest.test("method--list", () { |
| 1896 |
| 1897 var mock = new HttpServerMock(); |
| 1898 api.AppsLocationsResourceApi res = new api.AppengineApi(mock).apps.locatio
ns; |
| 1899 var arg_appsId = "foo"; |
| 1900 var arg_filter = "foo"; |
| 1901 var arg_pageSize = 42; |
| 1902 var arg_pageToken = "foo"; |
| 1903 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 1904 var path = (req.url).path; |
| 1905 var pathOffset = 0; |
| 1906 var index; |
| 1907 var subPart; |
| 1908 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1909 pathOffset += 1; |
| 1910 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("v1beta5/apps/")); |
| 1911 pathOffset += 13; |
| 1912 index = path.indexOf("/locations", pathOffset); |
| 1913 unittest.expect(index >= 0, unittest.isTrue); |
| 1914 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); |
| 1915 pathOffset = index; |
| 1916 unittest.expect(subPart, unittest.equals("$arg_appsId")); |
| 1917 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/locations")); |
| 1918 pathOffset += 10; |
| 1919 |
| 1920 var query = (req.url).query; |
| 1921 var queryOffset = 0; |
| 1922 var queryMap = {}; |
| 1923 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 1924 parseBool(n) { |
| 1925 if (n == "true") return true; |
| 1926 if (n == "false") return false; |
| 1927 if (n == null) return null; |
| 1928 throw new core.ArgumentError("Invalid boolean: $n"); |
| 1929 } |
| 1930 if (query.length > 0) { |
| 1931 for (var part in query.split("&")) { |
| 1932 var keyvalue = part.split("="); |
| 1933 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 1934 } |
| 1935 } |
| 1936 unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); |
| 1937 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); |
| 1938 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
| 1939 |
| 1940 |
| 1941 var h = { |
| 1942 "content-type" : "application/json; charset=utf-8", |
| 1943 }; |
| 1944 var resp = convert.JSON.encode(buildListLocationsResponse()); |
| 1945 return new async.Future.value(stringResponse(200, h, resp)); |
| 1946 }), true); |
| 1947 res.list(arg_appsId, filter: arg_filter, pageSize: arg_pageSize, pageToken
: arg_pageToken).then(unittest.expectAsync(((api.ListLocationsResponse response)
{ |
| 1948 checkListLocationsResponse(response); |
| 1949 }))); |
| 1950 }); |
| 1951 |
| 1952 }); |
| 1953 |
| 1954 |
| 1665 unittest.group("resource-AppsOperationsResourceApi", () { | 1955 unittest.group("resource-AppsOperationsResourceApi", () { |
| 1666 unittest.test("method--get", () { | 1956 unittest.test("method--get", () { |
| 1667 | 1957 |
| 1668 var mock = new HttpServerMock(); | 1958 var mock = new HttpServerMock(); |
| 1669 api.AppsOperationsResourceApi res = new api.AppengineApi(mock).apps.operat
ions; | 1959 api.AppsOperationsResourceApi res = new api.AppengineApi(mock).apps.operat
ions; |
| 1670 var arg_appsId = "foo"; | 1960 var arg_appsId = "foo"; |
| 1671 var arg_operationsId = "foo"; | 1961 var arg_operationsId = "foo"; |
| 1672 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1962 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 1673 var path = (req.url).path; | 1963 var path = (req.url).path; |
| 1674 var pathOffset = 0; | 1964 var pathOffset = 0; |
| (...skipping 658 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2333 }), true); | 2623 }), true); |
| 2334 res.patch(arg_request, arg_appsId, arg_servicesId, arg_versionsId, mask: a
rg_mask).then(unittest.expectAsync(((api.Operation response) { | 2624 res.patch(arg_request, arg_appsId, arg_servicesId, arg_versionsId, mask: a
rg_mask).then(unittest.expectAsync(((api.Operation response) { |
| 2335 checkOperation(response); | 2625 checkOperation(response); |
| 2336 }))); | 2626 }))); |
| 2337 }); | 2627 }); |
| 2338 | 2628 |
| 2339 }); | 2629 }); |
| 2340 | 2630 |
| 2341 | 2631 |
| 2342 unittest.group("resource-AppsServicesVersionsInstancesResourceApi", () { | 2632 unittest.group("resource-AppsServicesVersionsInstancesResourceApi", () { |
| 2633 unittest.test("method--debug", () { |
| 2634 |
| 2635 var mock = new HttpServerMock(); |
| 2636 api.AppsServicesVersionsInstancesResourceApi res = new api.AppengineApi(mo
ck).apps.services.versions.instances; |
| 2637 var arg_request = buildDebugInstanceRequest(); |
| 2638 var arg_appsId = "foo"; |
| 2639 var arg_servicesId = "foo"; |
| 2640 var arg_versionsId = "foo"; |
| 2641 var arg_instancesId = "foo"; |
| 2642 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 2643 var obj = new api.DebugInstanceRequest.fromJson(json); |
| 2644 checkDebugInstanceRequest(obj); |
| 2645 |
| 2646 var path = (req.url).path; |
| 2647 var pathOffset = 0; |
| 2648 var index; |
| 2649 var subPart; |
| 2650 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2651 pathOffset += 1; |
| 2652 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("v1beta5/apps/")); |
| 2653 pathOffset += 13; |
| 2654 index = path.indexOf("/services/", pathOffset); |
| 2655 unittest.expect(index >= 0, unittest.isTrue); |
| 2656 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); |
| 2657 pathOffset = index; |
| 2658 unittest.expect(subPart, unittest.equals("$arg_appsId")); |
| 2659 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/services/")); |
| 2660 pathOffset += 10; |
| 2661 index = path.indexOf("/versions/", pathOffset); |
| 2662 unittest.expect(index >= 0, unittest.isTrue); |
| 2663 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); |
| 2664 pathOffset = index; |
| 2665 unittest.expect(subPart, unittest.equals("$arg_servicesId")); |
| 2666 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/versions/")); |
| 2667 pathOffset += 10; |
| 2668 index = path.indexOf("/instances/", pathOffset); |
| 2669 unittest.expect(index >= 0, unittest.isTrue); |
| 2670 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); |
| 2671 pathOffset = index; |
| 2672 unittest.expect(subPart, unittest.equals("$arg_versionsId")); |
| 2673 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("/instances/")); |
| 2674 pathOffset += 11; |
| 2675 index = path.indexOf(":debug", pathOffset); |
| 2676 unittest.expect(index >= 0, unittest.isTrue); |
| 2677 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); |
| 2678 pathOffset = index; |
| 2679 unittest.expect(subPart, unittest.equals("$arg_instancesId")); |
| 2680 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ
als(":debug")); |
| 2681 pathOffset += 6; |
| 2682 |
| 2683 var query = (req.url).query; |
| 2684 var queryOffset = 0; |
| 2685 var queryMap = {}; |
| 2686 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 2687 parseBool(n) { |
| 2688 if (n == "true") return true; |
| 2689 if (n == "false") return false; |
| 2690 if (n == null) return null; |
| 2691 throw new core.ArgumentError("Invalid boolean: $n"); |
| 2692 } |
| 2693 if (query.length > 0) { |
| 2694 for (var part in query.split("&")) { |
| 2695 var keyvalue = part.split("="); |
| 2696 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 2697 } |
| 2698 } |
| 2699 |
| 2700 |
| 2701 var h = { |
| 2702 "content-type" : "application/json; charset=utf-8", |
| 2703 }; |
| 2704 var resp = convert.JSON.encode(buildOperation()); |
| 2705 return new async.Future.value(stringResponse(200, h, resp)); |
| 2706 }), true); |
| 2707 res.debug(arg_request, arg_appsId, arg_servicesId, arg_versionsId, arg_ins
tancesId).then(unittest.expectAsync(((api.Operation response) { |
| 2708 checkOperation(response); |
| 2709 }))); |
| 2710 }); |
| 2711 |
| 2712 unittest.test("method--delete", () { |
| 2713 |
| 2714 var mock = new HttpServerMock(); |
| 2715 api.AppsServicesVersionsInstancesResourceApi res = new api.AppengineApi(mo
ck).apps.services.versions.instances; |
| 2716 var arg_appsId = "foo"; |
| 2717 var arg_servicesId = "foo"; |
| 2718 var arg_versionsId = "foo"; |
| 2719 var arg_instancesId = "foo"; |
| 2720 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 2721 var path = (req.url).path; |
| 2722 var pathOffset = 0; |
| 2723 var index; |
| 2724 var subPart; |
| 2725 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2726 pathOffset += 1; |
| 2727 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("v1beta5/apps/")); |
| 2728 pathOffset += 13; |
| 2729 index = path.indexOf("/services/", pathOffset); |
| 2730 unittest.expect(index >= 0, unittest.isTrue); |
| 2731 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); |
| 2732 pathOffset = index; |
| 2733 unittest.expect(subPart, unittest.equals("$arg_appsId")); |
| 2734 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/services/")); |
| 2735 pathOffset += 10; |
| 2736 index = path.indexOf("/versions/", pathOffset); |
| 2737 unittest.expect(index >= 0, unittest.isTrue); |
| 2738 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); |
| 2739 pathOffset = index; |
| 2740 unittest.expect(subPart, unittest.equals("$arg_servicesId")); |
| 2741 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/versions/")); |
| 2742 pathOffset += 10; |
| 2743 index = path.indexOf("/instances/", pathOffset); |
| 2744 unittest.expect(index >= 0, unittest.isTrue); |
| 2745 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); |
| 2746 pathOffset = index; |
| 2747 unittest.expect(subPart, unittest.equals("$arg_versionsId")); |
| 2748 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("/instances/")); |
| 2749 pathOffset += 11; |
| 2750 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| 2751 pathOffset = path.length; |
| 2752 unittest.expect(subPart, unittest.equals("$arg_instancesId")); |
| 2753 |
| 2754 var query = (req.url).query; |
| 2755 var queryOffset = 0; |
| 2756 var queryMap = {}; |
| 2757 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 2758 parseBool(n) { |
| 2759 if (n == "true") return true; |
| 2760 if (n == "false") return false; |
| 2761 if (n == null) return null; |
| 2762 throw new core.ArgumentError("Invalid boolean: $n"); |
| 2763 } |
| 2764 if (query.length > 0) { |
| 2765 for (var part in query.split("&")) { |
| 2766 var keyvalue = part.split("="); |
| 2767 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 2768 } |
| 2769 } |
| 2770 |
| 2771 |
| 2772 var h = { |
| 2773 "content-type" : "application/json; charset=utf-8", |
| 2774 }; |
| 2775 var resp = convert.JSON.encode(buildOperation()); |
| 2776 return new async.Future.value(stringResponse(200, h, resp)); |
| 2777 }), true); |
| 2778 res.delete(arg_appsId, arg_servicesId, arg_versionsId, arg_instancesId).th
en(unittest.expectAsync(((api.Operation response) { |
| 2779 checkOperation(response); |
| 2780 }))); |
| 2781 }); |
| 2782 |
| 2783 unittest.test("method--get", () { |
| 2784 |
| 2785 var mock = new HttpServerMock(); |
| 2786 api.AppsServicesVersionsInstancesResourceApi res = new api.AppengineApi(mo
ck).apps.services.versions.instances; |
| 2787 var arg_appsId = "foo"; |
| 2788 var arg_servicesId = "foo"; |
| 2789 var arg_versionsId = "foo"; |
| 2790 var arg_instancesId = "foo"; |
| 2791 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 2792 var path = (req.url).path; |
| 2793 var pathOffset = 0; |
| 2794 var index; |
| 2795 var subPart; |
| 2796 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2797 pathOffset += 1; |
| 2798 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("v1beta5/apps/")); |
| 2799 pathOffset += 13; |
| 2800 index = path.indexOf("/services/", pathOffset); |
| 2801 unittest.expect(index >= 0, unittest.isTrue); |
| 2802 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); |
| 2803 pathOffset = index; |
| 2804 unittest.expect(subPart, unittest.equals("$arg_appsId")); |
| 2805 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/services/")); |
| 2806 pathOffset += 10; |
| 2807 index = path.indexOf("/versions/", pathOffset); |
| 2808 unittest.expect(index >= 0, unittest.isTrue); |
| 2809 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); |
| 2810 pathOffset = index; |
| 2811 unittest.expect(subPart, unittest.equals("$arg_servicesId")); |
| 2812 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/versions/")); |
| 2813 pathOffset += 10; |
| 2814 index = path.indexOf("/instances/", pathOffset); |
| 2815 unittest.expect(index >= 0, unittest.isTrue); |
| 2816 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); |
| 2817 pathOffset = index; |
| 2818 unittest.expect(subPart, unittest.equals("$arg_versionsId")); |
| 2819 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("/instances/")); |
| 2820 pathOffset += 11; |
| 2821 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| 2822 pathOffset = path.length; |
| 2823 unittest.expect(subPart, unittest.equals("$arg_instancesId")); |
| 2824 |
| 2825 var query = (req.url).query; |
| 2826 var queryOffset = 0; |
| 2827 var queryMap = {}; |
| 2828 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 2829 parseBool(n) { |
| 2830 if (n == "true") return true; |
| 2831 if (n == "false") return false; |
| 2832 if (n == null) return null; |
| 2833 throw new core.ArgumentError("Invalid boolean: $n"); |
| 2834 } |
| 2835 if (query.length > 0) { |
| 2836 for (var part in query.split("&")) { |
| 2837 var keyvalue = part.split("="); |
| 2838 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 2839 } |
| 2840 } |
| 2841 |
| 2842 |
| 2843 var h = { |
| 2844 "content-type" : "application/json; charset=utf-8", |
| 2845 }; |
| 2846 var resp = convert.JSON.encode(buildInstance()); |
| 2847 return new async.Future.value(stringResponse(200, h, resp)); |
| 2848 }), true); |
| 2849 res.get(arg_appsId, arg_servicesId, arg_versionsId, arg_instancesId).then(
unittest.expectAsync(((api.Instance response) { |
| 2850 checkInstance(response); |
| 2851 }))); |
| 2852 }); |
| 2853 |
| 2343 unittest.test("method--list", () { | 2854 unittest.test("method--list", () { |
| 2344 | 2855 |
| 2345 var mock = new HttpServerMock(); | 2856 var mock = new HttpServerMock(); |
| 2346 api.AppsServicesVersionsInstancesResourceApi res = new api.AppengineApi(mo
ck).apps.services.versions.instances; | 2857 api.AppsServicesVersionsInstancesResourceApi res = new api.AppengineApi(mo
ck).apps.services.versions.instances; |
| 2347 var arg_appsId = "foo"; | 2858 var arg_appsId = "foo"; |
| 2348 var arg_servicesId = "foo"; | 2859 var arg_servicesId = "foo"; |
| 2349 var arg_versionsId = "foo"; | 2860 var arg_versionsId = "foo"; |
| 2350 var arg_pageSize = 42; | 2861 var arg_pageSize = 42; |
| 2351 var arg_pageToken = "foo"; | 2862 var arg_pageToken = "foo"; |
| 2352 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2863 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2409 res.list(arg_appsId, arg_servicesId, arg_versionsId, pageSize: arg_pageSiz
e, pageToken: arg_pageToken).then(unittest.expectAsync(((api.ListInstancesRespon
se response) { | 2920 res.list(arg_appsId, arg_servicesId, arg_versionsId, pageSize: arg_pageSiz
e, pageToken: arg_pageToken).then(unittest.expectAsync(((api.ListInstancesRespon
se response) { |
| 2410 checkListInstancesResponse(response); | 2921 checkListInstancesResponse(response); |
| 2411 }))); | 2922 }))); |
| 2412 }); | 2923 }); |
| 2413 | 2924 |
| 2414 }); | 2925 }); |
| 2415 | 2926 |
| 2416 | 2927 |
| 2417 } | 2928 } |
| 2418 | 2929 |
| OLD | NEW |