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

Side by Side Diff: generated/googleapis/test/appengine/v1_test.dart

Issue 2485703002: Api-roll 42: 2016-11-08 (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 library googleapis.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:unittest/unittest.dart' as unittest;
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 } 90 }
91 91
92 checkApiEndpointHandler(api.ApiEndpointHandler o) { 92 checkApiEndpointHandler(api.ApiEndpointHandler o) {
93 buildCounterApiEndpointHandler++; 93 buildCounterApiEndpointHandler++;
94 if (buildCounterApiEndpointHandler < 3) { 94 if (buildCounterApiEndpointHandler < 3) {
95 unittest.expect(o.scriptPath, unittest.equals('foo')); 95 unittest.expect(o.scriptPath, unittest.equals('foo'));
96 } 96 }
97 buildCounterApiEndpointHandler--; 97 buildCounterApiEndpointHandler--;
98 } 98 }
99 99
100 buildUnnamed3347() { 100 buildUnnamed3160() {
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 checkUnnamed3347(core.List<api.UrlDispatchRule> o) { 107 checkUnnamed3160(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 = buildUnnamed3347(); 123 o.dispatchRules = buildUnnamed3160();
124 o.id = "foo"; 124 o.id = "foo";
125 o.locationId = "foo"; 125 o.locationId = "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 checkUnnamed3347(o.dispatchRules); 140 checkUnnamed3160(o.dispatchRules);
141 unittest.expect(o.id, unittest.equals('foo')); 141 unittest.expect(o.id, unittest.equals('foo'));
142 unittest.expect(o.locationId, unittest.equals('foo')); 142 unittest.expect(o.locationId, 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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 core.int buildCounterDebugInstanceRequest = 0; 250 core.int buildCounterDebugInstanceRequest = 0;
251 buildDebugInstanceRequest() { 251 buildDebugInstanceRequest() {
252 var o = new api.DebugInstanceRequest(); 252 var o = new api.DebugInstanceRequest();
253 buildCounterDebugInstanceRequest++; 253 buildCounterDebugInstanceRequest++;
254 if (buildCounterDebugInstanceRequest < 3) { 254 if (buildCounterDebugInstanceRequest < 3) {
255 o.sshKey = "foo";
255 } 256 }
256 buildCounterDebugInstanceRequest--; 257 buildCounterDebugInstanceRequest--;
257 return o; 258 return o;
258 } 259 }
259 260
260 checkDebugInstanceRequest(api.DebugInstanceRequest o) { 261 checkDebugInstanceRequest(api.DebugInstanceRequest o) {
261 buildCounterDebugInstanceRequest++; 262 buildCounterDebugInstanceRequest++;
262 if (buildCounterDebugInstanceRequest < 3) { 263 if (buildCounterDebugInstanceRequest < 3) {
264 unittest.expect(o.sshKey, unittest.equals('foo'));
263 } 265 }
264 buildCounterDebugInstanceRequest--; 266 buildCounterDebugInstanceRequest--;
265 } 267 }
266 268
267 buildUnnamed3348() { 269 buildUnnamed3161() {
268 var o = new core.Map<core.String, api.FileInfo>(); 270 var o = new core.Map<core.String, api.FileInfo>();
269 o["x"] = buildFileInfo(); 271 o["x"] = buildFileInfo();
270 o["y"] = buildFileInfo(); 272 o["y"] = buildFileInfo();
271 return o; 273 return o;
272 } 274 }
273 275
274 checkUnnamed3348(core.Map<core.String, api.FileInfo> o) { 276 checkUnnamed3161(core.Map<core.String, api.FileInfo> o) {
275 unittest.expect(o, unittest.hasLength(2)); 277 unittest.expect(o, unittest.hasLength(2));
276 checkFileInfo(o["x"]); 278 checkFileInfo(o["x"]);
277 checkFileInfo(o["y"]); 279 checkFileInfo(o["y"]);
278 } 280 }
279 281
280 core.int buildCounterDeployment = 0; 282 core.int buildCounterDeployment = 0;
281 buildDeployment() { 283 buildDeployment() {
282 var o = new api.Deployment(); 284 var o = new api.Deployment();
283 buildCounterDeployment++; 285 buildCounterDeployment++;
284 if (buildCounterDeployment < 3) { 286 if (buildCounterDeployment < 3) {
285 o.container = buildContainerInfo(); 287 o.container = buildContainerInfo();
286 o.files = buildUnnamed3348(); 288 o.files = buildUnnamed3161();
287 o.zip = buildZipInfo(); 289 o.zip = buildZipInfo();
288 } 290 }
289 buildCounterDeployment--; 291 buildCounterDeployment--;
290 return o; 292 return o;
291 } 293 }
292 294
293 checkDeployment(api.Deployment o) { 295 checkDeployment(api.Deployment o) {
294 buildCounterDeployment++; 296 buildCounterDeployment++;
295 if (buildCounterDeployment < 3) { 297 if (buildCounterDeployment < 3) {
296 checkContainerInfo(o.container); 298 checkContainerInfo(o.container);
297 checkUnnamed3348(o.files); 299 checkUnnamed3161(o.files);
298 checkZipInfo(o.zip); 300 checkZipInfo(o.zip);
299 } 301 }
300 buildCounterDeployment--; 302 buildCounterDeployment--;
301 } 303 }
302 304
303 core.int buildCounterDiskUtilization = 0; 305 core.int buildCounterDiskUtilization = 0;
304 buildDiskUtilization() { 306 buildDiskUtilization() {
305 var o = new api.DiskUtilization(); 307 var o = new api.DiskUtilization();
306 buildCounterDiskUtilization++; 308 buildCounterDiskUtilization++;
307 if (buildCounterDiskUtilization < 3) { 309 if (buildCounterDiskUtilization < 3) {
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
412 o.averageLatency = 42; 414 o.averageLatency = 42;
413 o.errors = 42; 415 o.errors = 42;
414 o.id = "foo"; 416 o.id = "foo";
415 o.memoryUsage = "foo"; 417 o.memoryUsage = "foo";
416 o.name = "foo"; 418 o.name = "foo";
417 o.qps = 42.0; 419 o.qps = 42.0;
418 o.requests = 42; 420 o.requests = 42;
419 o.startTime = "foo"; 421 o.startTime = "foo";
420 o.vmDebugEnabled = true; 422 o.vmDebugEnabled = true;
421 o.vmId = "foo"; 423 o.vmId = "foo";
424 o.vmIp = "foo";
422 o.vmName = "foo"; 425 o.vmName = "foo";
423 o.vmStatus = "foo"; 426 o.vmStatus = "foo";
424 o.vmZoneName = "foo"; 427 o.vmZoneName = "foo";
425 } 428 }
426 buildCounterInstance--; 429 buildCounterInstance--;
427 return o; 430 return o;
428 } 431 }
429 432
430 checkInstance(api.Instance o) { 433 checkInstance(api.Instance o) {
431 buildCounterInstance++; 434 buildCounterInstance++;
432 if (buildCounterInstance < 3) { 435 if (buildCounterInstance < 3) {
433 unittest.expect(o.appEngineRelease, unittest.equals('foo')); 436 unittest.expect(o.appEngineRelease, unittest.equals('foo'));
434 unittest.expect(o.availability, unittest.equals('foo')); 437 unittest.expect(o.availability, unittest.equals('foo'));
435 unittest.expect(o.averageLatency, unittest.equals(42)); 438 unittest.expect(o.averageLatency, unittest.equals(42));
436 unittest.expect(o.errors, unittest.equals(42)); 439 unittest.expect(o.errors, unittest.equals(42));
437 unittest.expect(o.id, unittest.equals('foo')); 440 unittest.expect(o.id, unittest.equals('foo'));
438 unittest.expect(o.memoryUsage, unittest.equals('foo')); 441 unittest.expect(o.memoryUsage, unittest.equals('foo'));
439 unittest.expect(o.name, unittest.equals('foo')); 442 unittest.expect(o.name, unittest.equals('foo'));
440 unittest.expect(o.qps, unittest.equals(42.0)); 443 unittest.expect(o.qps, unittest.equals(42.0));
441 unittest.expect(o.requests, unittest.equals(42)); 444 unittest.expect(o.requests, unittest.equals(42));
442 unittest.expect(o.startTime, unittest.equals('foo')); 445 unittest.expect(o.startTime, unittest.equals('foo'));
443 unittest.expect(o.vmDebugEnabled, unittest.isTrue); 446 unittest.expect(o.vmDebugEnabled, unittest.isTrue);
444 unittest.expect(o.vmId, unittest.equals('foo')); 447 unittest.expect(o.vmId, unittest.equals('foo'));
448 unittest.expect(o.vmIp, unittest.equals('foo'));
445 unittest.expect(o.vmName, unittest.equals('foo')); 449 unittest.expect(o.vmName, unittest.equals('foo'));
446 unittest.expect(o.vmStatus, unittest.equals('foo')); 450 unittest.expect(o.vmStatus, unittest.equals('foo'));
447 unittest.expect(o.vmZoneName, unittest.equals('foo')); 451 unittest.expect(o.vmZoneName, unittest.equals('foo'));
448 } 452 }
449 buildCounterInstance--; 453 buildCounterInstance--;
450 } 454 }
451 455
452 core.int buildCounterLibrary = 0; 456 core.int buildCounterLibrary = 0;
453 buildLibrary() { 457 buildLibrary() {
454 var o = new api.Library(); 458 var o = new api.Library();
455 buildCounterLibrary++; 459 buildCounterLibrary++;
456 if (buildCounterLibrary < 3) { 460 if (buildCounterLibrary < 3) {
457 o.name = "foo"; 461 o.name = "foo";
458 o.version = "foo"; 462 o.version = "foo";
459 } 463 }
460 buildCounterLibrary--; 464 buildCounterLibrary--;
461 return o; 465 return o;
462 } 466 }
463 467
464 checkLibrary(api.Library o) { 468 checkLibrary(api.Library o) {
465 buildCounterLibrary++; 469 buildCounterLibrary++;
466 if (buildCounterLibrary < 3) { 470 if (buildCounterLibrary < 3) {
467 unittest.expect(o.name, unittest.equals('foo')); 471 unittest.expect(o.name, unittest.equals('foo'));
468 unittest.expect(o.version, unittest.equals('foo')); 472 unittest.expect(o.version, unittest.equals('foo'));
469 } 473 }
470 buildCounterLibrary--; 474 buildCounterLibrary--;
471 } 475 }
472 476
473 buildUnnamed3349() { 477 buildUnnamed3162() {
474 var o = new core.List<api.Instance>(); 478 var o = new core.List<api.Instance>();
475 o.add(buildInstance()); 479 o.add(buildInstance());
476 o.add(buildInstance()); 480 o.add(buildInstance());
477 return o; 481 return o;
478 } 482 }
479 483
480 checkUnnamed3349(core.List<api.Instance> o) { 484 checkUnnamed3162(core.List<api.Instance> o) {
481 unittest.expect(o, unittest.hasLength(2)); 485 unittest.expect(o, unittest.hasLength(2));
482 checkInstance(o[0]); 486 checkInstance(o[0]);
483 checkInstance(o[1]); 487 checkInstance(o[1]);
484 } 488 }
485 489
486 core.int buildCounterListInstancesResponse = 0; 490 core.int buildCounterListInstancesResponse = 0;
487 buildListInstancesResponse() { 491 buildListInstancesResponse() {
488 var o = new api.ListInstancesResponse(); 492 var o = new api.ListInstancesResponse();
489 buildCounterListInstancesResponse++; 493 buildCounterListInstancesResponse++;
490 if (buildCounterListInstancesResponse < 3) { 494 if (buildCounterListInstancesResponse < 3) {
491 o.instances = buildUnnamed3349(); 495 o.instances = buildUnnamed3162();
492 o.nextPageToken = "foo"; 496 o.nextPageToken = "foo";
493 } 497 }
494 buildCounterListInstancesResponse--; 498 buildCounterListInstancesResponse--;
495 return o; 499 return o;
496 } 500 }
497 501
498 checkListInstancesResponse(api.ListInstancesResponse o) { 502 checkListInstancesResponse(api.ListInstancesResponse o) {
499 buildCounterListInstancesResponse++; 503 buildCounterListInstancesResponse++;
500 if (buildCounterListInstancesResponse < 3) { 504 if (buildCounterListInstancesResponse < 3) {
501 checkUnnamed3349(o.instances); 505 checkUnnamed3162(o.instances);
502 unittest.expect(o.nextPageToken, unittest.equals('foo')); 506 unittest.expect(o.nextPageToken, unittest.equals('foo'));
503 } 507 }
504 buildCounterListInstancesResponse--; 508 buildCounterListInstancesResponse--;
505 } 509 }
506 510
507 buildUnnamed3350() { 511 buildUnnamed3163() {
508 var o = new core.List<api.Location>(); 512 var o = new core.List<api.Location>();
509 o.add(buildLocation()); 513 o.add(buildLocation());
510 o.add(buildLocation()); 514 o.add(buildLocation());
511 return o; 515 return o;
512 } 516 }
513 517
514 checkUnnamed3350(core.List<api.Location> o) { 518 checkUnnamed3163(core.List<api.Location> o) {
515 unittest.expect(o, unittest.hasLength(2)); 519 unittest.expect(o, unittest.hasLength(2));
516 checkLocation(o[0]); 520 checkLocation(o[0]);
517 checkLocation(o[1]); 521 checkLocation(o[1]);
518 } 522 }
519 523
520 core.int buildCounterListLocationsResponse = 0; 524 core.int buildCounterListLocationsResponse = 0;
521 buildListLocationsResponse() { 525 buildListLocationsResponse() {
522 var o = new api.ListLocationsResponse(); 526 var o = new api.ListLocationsResponse();
523 buildCounterListLocationsResponse++; 527 buildCounterListLocationsResponse++;
524 if (buildCounterListLocationsResponse < 3) { 528 if (buildCounterListLocationsResponse < 3) {
525 o.locations = buildUnnamed3350(); 529 o.locations = buildUnnamed3163();
526 o.nextPageToken = "foo"; 530 o.nextPageToken = "foo";
527 } 531 }
528 buildCounterListLocationsResponse--; 532 buildCounterListLocationsResponse--;
529 return o; 533 return o;
530 } 534 }
531 535
532 checkListLocationsResponse(api.ListLocationsResponse o) { 536 checkListLocationsResponse(api.ListLocationsResponse o) {
533 buildCounterListLocationsResponse++; 537 buildCounterListLocationsResponse++;
534 if (buildCounterListLocationsResponse < 3) { 538 if (buildCounterListLocationsResponse < 3) {
535 checkUnnamed3350(o.locations); 539 checkUnnamed3163(o.locations);
536 unittest.expect(o.nextPageToken, unittest.equals('foo')); 540 unittest.expect(o.nextPageToken, unittest.equals('foo'));
537 } 541 }
538 buildCounterListLocationsResponse--; 542 buildCounterListLocationsResponse--;
539 } 543 }
540 544
541 buildUnnamed3351() { 545 buildUnnamed3164() {
542 var o = new core.List<api.Operation>(); 546 var o = new core.List<api.Operation>();
543 o.add(buildOperation()); 547 o.add(buildOperation());
544 o.add(buildOperation()); 548 o.add(buildOperation());
545 return o; 549 return o;
546 } 550 }
547 551
548 checkUnnamed3351(core.List<api.Operation> o) { 552 checkUnnamed3164(core.List<api.Operation> o) {
549 unittest.expect(o, unittest.hasLength(2)); 553 unittest.expect(o, unittest.hasLength(2));
550 checkOperation(o[0]); 554 checkOperation(o[0]);
551 checkOperation(o[1]); 555 checkOperation(o[1]);
552 } 556 }
553 557
554 core.int buildCounterListOperationsResponse = 0; 558 core.int buildCounterListOperationsResponse = 0;
555 buildListOperationsResponse() { 559 buildListOperationsResponse() {
556 var o = new api.ListOperationsResponse(); 560 var o = new api.ListOperationsResponse();
557 buildCounterListOperationsResponse++; 561 buildCounterListOperationsResponse++;
558 if (buildCounterListOperationsResponse < 3) { 562 if (buildCounterListOperationsResponse < 3) {
559 o.nextPageToken = "foo"; 563 o.nextPageToken = "foo";
560 o.operations = buildUnnamed3351(); 564 o.operations = buildUnnamed3164();
561 } 565 }
562 buildCounterListOperationsResponse--; 566 buildCounterListOperationsResponse--;
563 return o; 567 return o;
564 } 568 }
565 569
566 checkListOperationsResponse(api.ListOperationsResponse o) { 570 checkListOperationsResponse(api.ListOperationsResponse o) {
567 buildCounterListOperationsResponse++; 571 buildCounterListOperationsResponse++;
568 if (buildCounterListOperationsResponse < 3) { 572 if (buildCounterListOperationsResponse < 3) {
569 unittest.expect(o.nextPageToken, unittest.equals('foo')); 573 unittest.expect(o.nextPageToken, unittest.equals('foo'));
570 checkUnnamed3351(o.operations); 574 checkUnnamed3164(o.operations);
571 } 575 }
572 buildCounterListOperationsResponse--; 576 buildCounterListOperationsResponse--;
573 } 577 }
574 578
575 buildUnnamed3352() { 579 buildUnnamed3165() {
576 var o = new core.List<api.Service>(); 580 var o = new core.List<api.Service>();
577 o.add(buildService()); 581 o.add(buildService());
578 o.add(buildService()); 582 o.add(buildService());
579 return o; 583 return o;
580 } 584 }
581 585
582 checkUnnamed3352(core.List<api.Service> o) { 586 checkUnnamed3165(core.List<api.Service> o) {
583 unittest.expect(o, unittest.hasLength(2)); 587 unittest.expect(o, unittest.hasLength(2));
584 checkService(o[0]); 588 checkService(o[0]);
585 checkService(o[1]); 589 checkService(o[1]);
586 } 590 }
587 591
588 core.int buildCounterListServicesResponse = 0; 592 core.int buildCounterListServicesResponse = 0;
589 buildListServicesResponse() { 593 buildListServicesResponse() {
590 var o = new api.ListServicesResponse(); 594 var o = new api.ListServicesResponse();
591 buildCounterListServicesResponse++; 595 buildCounterListServicesResponse++;
592 if (buildCounterListServicesResponse < 3) { 596 if (buildCounterListServicesResponse < 3) {
593 o.nextPageToken = "foo"; 597 o.nextPageToken = "foo";
594 o.services = buildUnnamed3352(); 598 o.services = buildUnnamed3165();
595 } 599 }
596 buildCounterListServicesResponse--; 600 buildCounterListServicesResponse--;
597 return o; 601 return o;
598 } 602 }
599 603
600 checkListServicesResponse(api.ListServicesResponse o) { 604 checkListServicesResponse(api.ListServicesResponse o) {
601 buildCounterListServicesResponse++; 605 buildCounterListServicesResponse++;
602 if (buildCounterListServicesResponse < 3) { 606 if (buildCounterListServicesResponse < 3) {
603 unittest.expect(o.nextPageToken, unittest.equals('foo')); 607 unittest.expect(o.nextPageToken, unittest.equals('foo'));
604 checkUnnamed3352(o.services); 608 checkUnnamed3165(o.services);
605 } 609 }
606 buildCounterListServicesResponse--; 610 buildCounterListServicesResponse--;
607 } 611 }
608 612
609 buildUnnamed3353() { 613 buildUnnamed3166() {
610 var o = new core.List<api.Version>(); 614 var o = new core.List<api.Version>();
611 o.add(buildVersion()); 615 o.add(buildVersion());
612 o.add(buildVersion()); 616 o.add(buildVersion());
613 return o; 617 return o;
614 } 618 }
615 619
616 checkUnnamed3353(core.List<api.Version> o) { 620 checkUnnamed3166(core.List<api.Version> o) {
617 unittest.expect(o, unittest.hasLength(2)); 621 unittest.expect(o, unittest.hasLength(2));
618 checkVersion(o[0]); 622 checkVersion(o[0]);
619 checkVersion(o[1]); 623 checkVersion(o[1]);
620 } 624 }
621 625
622 core.int buildCounterListVersionsResponse = 0; 626 core.int buildCounterListVersionsResponse = 0;
623 buildListVersionsResponse() { 627 buildListVersionsResponse() {
624 var o = new api.ListVersionsResponse(); 628 var o = new api.ListVersionsResponse();
625 buildCounterListVersionsResponse++; 629 buildCounterListVersionsResponse++;
626 if (buildCounterListVersionsResponse < 3) { 630 if (buildCounterListVersionsResponse < 3) {
627 o.nextPageToken = "foo"; 631 o.nextPageToken = "foo";
628 o.versions = buildUnnamed3353(); 632 o.versions = buildUnnamed3166();
629 } 633 }
630 buildCounterListVersionsResponse--; 634 buildCounterListVersionsResponse--;
631 return o; 635 return o;
632 } 636 }
633 637
634 checkListVersionsResponse(api.ListVersionsResponse o) { 638 checkListVersionsResponse(api.ListVersionsResponse o) {
635 buildCounterListVersionsResponse++; 639 buildCounterListVersionsResponse++;
636 if (buildCounterListVersionsResponse < 3) { 640 if (buildCounterListVersionsResponse < 3) {
637 unittest.expect(o.nextPageToken, unittest.equals('foo')); 641 unittest.expect(o.nextPageToken, unittest.equals('foo'));
638 checkUnnamed3353(o.versions); 642 checkUnnamed3166(o.versions);
639 } 643 }
640 buildCounterListVersionsResponse--; 644 buildCounterListVersionsResponse--;
641 } 645 }
642 646
643 buildUnnamed3354() { 647 buildUnnamed3167() {
644 var o = new core.Map<core.String, core.String>(); 648 var o = new core.Map<core.String, core.String>();
645 o["x"] = "foo"; 649 o["x"] = "foo";
646 o["y"] = "foo"; 650 o["y"] = "foo";
647 return o; 651 return o;
648 } 652 }
649 653
650 checkUnnamed3354(core.Map<core.String, core.String> o) { 654 checkUnnamed3167(core.Map<core.String, core.String> o) {
651 unittest.expect(o, unittest.hasLength(2)); 655 unittest.expect(o, unittest.hasLength(2));
652 unittest.expect(o["x"], unittest.equals('foo')); 656 unittest.expect(o["x"], unittest.equals('foo'));
653 unittest.expect(o["y"], unittest.equals('foo')); 657 unittest.expect(o["y"], unittest.equals('foo'));
654 } 658 }
655 659
656 buildUnnamed3355() { 660 buildUnnamed3168() {
657 var o = new core.Map<core.String, core.Object>(); 661 var o = new core.Map<core.String, core.Object>();
658 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; 662 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'};
659 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; 663 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'};
660 return o; 664 return o;
661 } 665 }
662 666
663 checkUnnamed3355(core.Map<core.String, core.Object> o) { 667 checkUnnamed3168(core.Map<core.String, core.Object> o) {
664 unittest.expect(o, unittest.hasLength(2)); 668 unittest.expect(o, unittest.hasLength(2));
665 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')); 669 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'));
666 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')); 670 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'));
667 } 671 }
668 672
669 core.int buildCounterLocation = 0; 673 core.int buildCounterLocation = 0;
670 buildLocation() { 674 buildLocation() {
671 var o = new api.Location(); 675 var o = new api.Location();
672 buildCounterLocation++; 676 buildCounterLocation++;
673 if (buildCounterLocation < 3) { 677 if (buildCounterLocation < 3) {
674 o.labels = buildUnnamed3354(); 678 o.labels = buildUnnamed3167();
675 o.locationId = "foo"; 679 o.locationId = "foo";
676 o.metadata = buildUnnamed3355(); 680 o.metadata = buildUnnamed3168();
677 o.name = "foo"; 681 o.name = "foo";
678 } 682 }
679 buildCounterLocation--; 683 buildCounterLocation--;
680 return o; 684 return o;
681 } 685 }
682 686
683 checkLocation(api.Location o) { 687 checkLocation(api.Location o) {
684 buildCounterLocation++; 688 buildCounterLocation++;
685 if (buildCounterLocation < 3) { 689 if (buildCounterLocation < 3) {
686 checkUnnamed3354(o.labels); 690 checkUnnamed3167(o.labels);
687 unittest.expect(o.locationId, unittest.equals('foo')); 691 unittest.expect(o.locationId, unittest.equals('foo'));
688 checkUnnamed3355(o.metadata); 692 checkUnnamed3168(o.metadata);
689 unittest.expect(o.name, unittest.equals('foo')); 693 unittest.expect(o.name, unittest.equals('foo'));
690 } 694 }
691 buildCounterLocation--; 695 buildCounterLocation--;
692 } 696 }
693 697
694 core.int buildCounterLocationMetadata = 0; 698 core.int buildCounterLocationMetadata = 0;
695 buildLocationMetadata() { 699 buildLocationMetadata() {
696 var o = new api.LocationMetadata(); 700 var o = new api.LocationMetadata();
697 buildCounterLocationMetadata++; 701 buildCounterLocationMetadata++;
698 if (buildCounterLocationMetadata < 3) { 702 if (buildCounterLocationMetadata < 3) {
(...skipping 25 matching lines...) Expand all
724 } 728 }
725 729
726 checkManualScaling(api.ManualScaling o) { 730 checkManualScaling(api.ManualScaling o) {
727 buildCounterManualScaling++; 731 buildCounterManualScaling++;
728 if (buildCounterManualScaling < 3) { 732 if (buildCounterManualScaling < 3) {
729 unittest.expect(o.instances, unittest.equals(42)); 733 unittest.expect(o.instances, unittest.equals(42));
730 } 734 }
731 buildCounterManualScaling--; 735 buildCounterManualScaling--;
732 } 736 }
733 737
734 buildUnnamed3356() { 738 buildUnnamed3169() {
735 var o = new core.List<core.String>(); 739 var o = new core.List<core.String>();
736 o.add("foo"); 740 o.add("foo");
737 o.add("foo"); 741 o.add("foo");
738 return o; 742 return o;
739 } 743 }
740 744
741 checkUnnamed3356(core.List<core.String> o) { 745 checkUnnamed3169(core.List<core.String> o) {
742 unittest.expect(o, unittest.hasLength(2)); 746 unittest.expect(o, unittest.hasLength(2));
743 unittest.expect(o[0], unittest.equals('foo')); 747 unittest.expect(o[0], unittest.equals('foo'));
744 unittest.expect(o[1], unittest.equals('foo')); 748 unittest.expect(o[1], unittest.equals('foo'));
745 } 749 }
746 750
747 core.int buildCounterNetwork = 0; 751 core.int buildCounterNetwork = 0;
748 buildNetwork() { 752 buildNetwork() {
749 var o = new api.Network(); 753 var o = new api.Network();
750 buildCounterNetwork++; 754 buildCounterNetwork++;
751 if (buildCounterNetwork < 3) { 755 if (buildCounterNetwork < 3) {
752 o.forwardedPorts = buildUnnamed3356(); 756 o.forwardedPorts = buildUnnamed3169();
753 o.instanceTag = "foo"; 757 o.instanceTag = "foo";
754 o.name = "foo"; 758 o.name = "foo";
755 } 759 }
756 buildCounterNetwork--; 760 buildCounterNetwork--;
757 return o; 761 return o;
758 } 762 }
759 763
760 checkNetwork(api.Network o) { 764 checkNetwork(api.Network o) {
761 buildCounterNetwork++; 765 buildCounterNetwork++;
762 if (buildCounterNetwork < 3) { 766 if (buildCounterNetwork < 3) {
763 checkUnnamed3356(o.forwardedPorts); 767 checkUnnamed3169(o.forwardedPorts);
764 unittest.expect(o.instanceTag, unittest.equals('foo')); 768 unittest.expect(o.instanceTag, unittest.equals('foo'));
765 unittest.expect(o.name, unittest.equals('foo')); 769 unittest.expect(o.name, unittest.equals('foo'));
766 } 770 }
767 buildCounterNetwork--; 771 buildCounterNetwork--;
768 } 772 }
769 773
770 core.int buildCounterNetworkUtilization = 0; 774 core.int buildCounterNetworkUtilization = 0;
771 buildNetworkUtilization() { 775 buildNetworkUtilization() {
772 var o = new api.NetworkUtilization(); 776 var o = new api.NetworkUtilization();
773 buildCounterNetworkUtilization++; 777 buildCounterNetworkUtilization++;
(...skipping 11 matching lines...) Expand all
785 buildCounterNetworkUtilization++; 789 buildCounterNetworkUtilization++;
786 if (buildCounterNetworkUtilization < 3) { 790 if (buildCounterNetworkUtilization < 3) {
787 unittest.expect(o.targetReceivedBytesPerSecond, unittest.equals(42)); 791 unittest.expect(o.targetReceivedBytesPerSecond, unittest.equals(42));
788 unittest.expect(o.targetReceivedPacketsPerSecond, unittest.equals(42)); 792 unittest.expect(o.targetReceivedPacketsPerSecond, unittest.equals(42));
789 unittest.expect(o.targetSentBytesPerSecond, unittest.equals(42)); 793 unittest.expect(o.targetSentBytesPerSecond, unittest.equals(42));
790 unittest.expect(o.targetSentPacketsPerSecond, unittest.equals(42)); 794 unittest.expect(o.targetSentPacketsPerSecond, unittest.equals(42));
791 } 795 }
792 buildCounterNetworkUtilization--; 796 buildCounterNetworkUtilization--;
793 } 797 }
794 798
795 buildUnnamed3357() { 799 buildUnnamed3170() {
796 var o = new core.Map<core.String, core.Object>(); 800 var o = new core.Map<core.String, core.Object>();
797 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; 801 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'};
798 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; 802 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'};
799 return o; 803 return o;
800 } 804 }
801 805
802 checkUnnamed3357(core.Map<core.String, core.Object> o) { 806 checkUnnamed3170(core.Map<core.String, core.Object> o) {
803 unittest.expect(o, unittest.hasLength(2)); 807 unittest.expect(o, unittest.hasLength(2));
804 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')); 808 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'));
805 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')); 809 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'));
806 } 810 }
807 811
808 buildUnnamed3358() { 812 buildUnnamed3171() {
809 var o = new core.Map<core.String, core.Object>(); 813 var o = new core.Map<core.String, core.Object>();
810 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; 814 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'};
811 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; 815 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'};
812 return o; 816 return o;
813 } 817 }
814 818
815 checkUnnamed3358(core.Map<core.String, core.Object> o) { 819 checkUnnamed3171(core.Map<core.String, core.Object> o) {
816 unittest.expect(o, unittest.hasLength(2)); 820 unittest.expect(o, unittest.hasLength(2));
817 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')); 821 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'));
818 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')); 822 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'));
819 } 823 }
820 824
821 core.int buildCounterOperation = 0; 825 core.int buildCounterOperation = 0;
822 buildOperation() { 826 buildOperation() {
823 var o = new api.Operation(); 827 var o = new api.Operation();
824 buildCounterOperation++; 828 buildCounterOperation++;
825 if (buildCounterOperation < 3) { 829 if (buildCounterOperation < 3) {
826 o.done = true; 830 o.done = true;
827 o.error = buildStatus(); 831 o.error = buildStatus();
828 o.metadata = buildUnnamed3357(); 832 o.metadata = buildUnnamed3170();
829 o.name = "foo"; 833 o.name = "foo";
830 o.response = buildUnnamed3358(); 834 o.response = buildUnnamed3171();
831 } 835 }
832 buildCounterOperation--; 836 buildCounterOperation--;
833 return o; 837 return o;
834 } 838 }
835 839
836 checkOperation(api.Operation o) { 840 checkOperation(api.Operation o) {
837 buildCounterOperation++; 841 buildCounterOperation++;
838 if (buildCounterOperation < 3) { 842 if (buildCounterOperation < 3) {
839 unittest.expect(o.done, unittest.isTrue); 843 unittest.expect(o.done, unittest.isTrue);
840 checkStatus(o.error); 844 checkStatus(o.error);
841 checkUnnamed3357(o.metadata); 845 checkUnnamed3170(o.metadata);
842 unittest.expect(o.name, unittest.equals('foo')); 846 unittest.expect(o.name, unittest.equals('foo'));
843 checkUnnamed3358(o.response); 847 checkUnnamed3171(o.response);
844 } 848 }
845 buildCounterOperation--; 849 buildCounterOperation--;
846 } 850 }
847 851
848 core.int buildCounterOperationMetadata = 0; 852 core.int buildCounterOperationMetadata = 0;
849 buildOperationMetadata() { 853 buildOperationMetadata() {
850 var o = new api.OperationMetadata(); 854 var o = new api.OperationMetadata();
851 buildCounterOperationMetadata++; 855 buildCounterOperationMetadata++;
852 if (buildCounterOperationMetadata < 3) { 856 if (buildCounterOperationMetadata < 3) {
853 o.endTime = "foo"; 857 o.endTime = "foo";
(...skipping 13 matching lines...) Expand all
867 unittest.expect(o.endTime, unittest.equals('foo')); 871 unittest.expect(o.endTime, unittest.equals('foo'));
868 unittest.expect(o.insertTime, unittest.equals('foo')); 872 unittest.expect(o.insertTime, unittest.equals('foo'));
869 unittest.expect(o.method, unittest.equals('foo')); 873 unittest.expect(o.method, unittest.equals('foo'));
870 unittest.expect(o.operationType, unittest.equals('foo')); 874 unittest.expect(o.operationType, unittest.equals('foo'));
871 unittest.expect(o.target, unittest.equals('foo')); 875 unittest.expect(o.target, unittest.equals('foo'));
872 unittest.expect(o.user, unittest.equals('foo')); 876 unittest.expect(o.user, unittest.equals('foo'));
873 } 877 }
874 buildCounterOperationMetadata--; 878 buildCounterOperationMetadata--;
875 } 879 }
876 880
881 core.int buildCounterOperationMetadataExperimental = 0;
882 buildOperationMetadataExperimental() {
883 var o = new api.OperationMetadataExperimental();
884 buildCounterOperationMetadataExperimental++;
885 if (buildCounterOperationMetadataExperimental < 3) {
886 o.endTime = "foo";
887 o.insertTime = "foo";
888 o.method = "foo";
889 o.target = "foo";
890 o.user = "foo";
891 }
892 buildCounterOperationMetadataExperimental--;
893 return o;
894 }
895
896 checkOperationMetadataExperimental(api.OperationMetadataExperimental o) {
897 buildCounterOperationMetadataExperimental++;
898 if (buildCounterOperationMetadataExperimental < 3) {
899 unittest.expect(o.endTime, unittest.equals('foo'));
900 unittest.expect(o.insertTime, unittest.equals('foo'));
901 unittest.expect(o.method, unittest.equals('foo'));
902 unittest.expect(o.target, unittest.equals('foo'));
903 unittest.expect(o.user, unittest.equals('foo'));
904 }
905 buildCounterOperationMetadataExperimental--;
906 }
907
877 core.int buildCounterOperationMetadataV1 = 0; 908 core.int buildCounterOperationMetadataV1 = 0;
878 buildOperationMetadataV1() { 909 buildOperationMetadataV1() {
879 var o = new api.OperationMetadataV1(); 910 var o = new api.OperationMetadataV1();
880 buildCounterOperationMetadataV1++; 911 buildCounterOperationMetadataV1++;
881 if (buildCounterOperationMetadataV1 < 3) { 912 if (buildCounterOperationMetadataV1 < 3) {
882 o.endTime = "foo"; 913 o.endTime = "foo";
883 o.insertTime = "foo"; 914 o.insertTime = "foo";
884 o.method = "foo"; 915 o.method = "foo";
885 o.target = "foo"; 916 o.target = "foo";
886 o.user = "foo"; 917 o.user = "foo";
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
1024 checkService(api.Service o) { 1055 checkService(api.Service o) {
1025 buildCounterService++; 1056 buildCounterService++;
1026 if (buildCounterService < 3) { 1057 if (buildCounterService < 3) {
1027 unittest.expect(o.id, unittest.equals('foo')); 1058 unittest.expect(o.id, unittest.equals('foo'));
1028 unittest.expect(o.name, unittest.equals('foo')); 1059 unittest.expect(o.name, unittest.equals('foo'));
1029 checkTrafficSplit(o.split); 1060 checkTrafficSplit(o.split);
1030 } 1061 }
1031 buildCounterService--; 1062 buildCounterService--;
1032 } 1063 }
1033 1064
1034 buildUnnamed3359() { 1065 buildUnnamed3172() {
1035 var o = new core.Map<core.String, core.String>(); 1066 var o = new core.Map<core.String, core.String>();
1036 o["x"] = "foo"; 1067 o["x"] = "foo";
1037 o["y"] = "foo"; 1068 o["y"] = "foo";
1038 return o; 1069 return o;
1039 } 1070 }
1040 1071
1041 checkUnnamed3359(core.Map<core.String, core.String> o) { 1072 checkUnnamed3172(core.Map<core.String, core.String> o) {
1042 unittest.expect(o, unittest.hasLength(2)); 1073 unittest.expect(o, unittest.hasLength(2));
1043 unittest.expect(o["x"], unittest.equals('foo')); 1074 unittest.expect(o["x"], unittest.equals('foo'));
1044 unittest.expect(o["y"], unittest.equals('foo')); 1075 unittest.expect(o["y"], unittest.equals('foo'));
1045 } 1076 }
1046 1077
1047 core.int buildCounterStaticFilesHandler = 0; 1078 core.int buildCounterStaticFilesHandler = 0;
1048 buildStaticFilesHandler() { 1079 buildStaticFilesHandler() {
1049 var o = new api.StaticFilesHandler(); 1080 var o = new api.StaticFilesHandler();
1050 buildCounterStaticFilesHandler++; 1081 buildCounterStaticFilesHandler++;
1051 if (buildCounterStaticFilesHandler < 3) { 1082 if (buildCounterStaticFilesHandler < 3) {
1052 o.applicationReadable = true; 1083 o.applicationReadable = true;
1053 o.expiration = "foo"; 1084 o.expiration = "foo";
1054 o.httpHeaders = buildUnnamed3359(); 1085 o.httpHeaders = buildUnnamed3172();
1055 o.mimeType = "foo"; 1086 o.mimeType = "foo";
1056 o.path = "foo"; 1087 o.path = "foo";
1057 o.requireMatchingFile = true; 1088 o.requireMatchingFile = true;
1058 o.uploadPathRegex = "foo"; 1089 o.uploadPathRegex = "foo";
1059 } 1090 }
1060 buildCounterStaticFilesHandler--; 1091 buildCounterStaticFilesHandler--;
1061 return o; 1092 return o;
1062 } 1093 }
1063 1094
1064 checkStaticFilesHandler(api.StaticFilesHandler o) { 1095 checkStaticFilesHandler(api.StaticFilesHandler o) {
1065 buildCounterStaticFilesHandler++; 1096 buildCounterStaticFilesHandler++;
1066 if (buildCounterStaticFilesHandler < 3) { 1097 if (buildCounterStaticFilesHandler < 3) {
1067 unittest.expect(o.applicationReadable, unittest.isTrue); 1098 unittest.expect(o.applicationReadable, unittest.isTrue);
1068 unittest.expect(o.expiration, unittest.equals('foo')); 1099 unittest.expect(o.expiration, unittest.equals('foo'));
1069 checkUnnamed3359(o.httpHeaders); 1100 checkUnnamed3172(o.httpHeaders);
1070 unittest.expect(o.mimeType, unittest.equals('foo')); 1101 unittest.expect(o.mimeType, unittest.equals('foo'));
1071 unittest.expect(o.path, unittest.equals('foo')); 1102 unittest.expect(o.path, unittest.equals('foo'));
1072 unittest.expect(o.requireMatchingFile, unittest.isTrue); 1103 unittest.expect(o.requireMatchingFile, unittest.isTrue);
1073 unittest.expect(o.uploadPathRegex, unittest.equals('foo')); 1104 unittest.expect(o.uploadPathRegex, unittest.equals('foo'));
1074 } 1105 }
1075 buildCounterStaticFilesHandler--; 1106 buildCounterStaticFilesHandler--;
1076 } 1107 }
1077 1108
1078 buildUnnamed3360() { 1109 buildUnnamed3173() {
1079 var o = new core.Map<core.String, core.Object>(); 1110 var o = new core.Map<core.String, core.Object>();
1080 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; 1111 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'};
1081 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; 1112 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'};
1082 return o; 1113 return o;
1083 } 1114 }
1084 1115
1085 checkUnnamed3360(core.Map<core.String, core.Object> o) { 1116 checkUnnamed3173(core.Map<core.String, core.Object> o) {
1086 unittest.expect(o, unittest.hasLength(2)); 1117 unittest.expect(o, unittest.hasLength(2));
1087 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')); 1118 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'));
1088 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')); 1119 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'));
1089 } 1120 }
1090 1121
1091 buildUnnamed3361() { 1122 buildUnnamed3174() {
1092 var o = new core.List<core.Map<core.String, core.Object>>(); 1123 var o = new core.List<core.Map<core.String, core.Object>>();
1093 o.add(buildUnnamed3360()); 1124 o.add(buildUnnamed3173());
1094 o.add(buildUnnamed3360()); 1125 o.add(buildUnnamed3173());
1095 return o; 1126 return o;
1096 } 1127 }
1097 1128
1098 checkUnnamed3361(core.List<core.Map<core.String, core.Object>> o) { 1129 checkUnnamed3174(core.List<core.Map<core.String, core.Object>> o) {
1099 unittest.expect(o, unittest.hasLength(2)); 1130 unittest.expect(o, unittest.hasLength(2));
1100 checkUnnamed3360(o[0]); 1131 checkUnnamed3173(o[0]);
1101 checkUnnamed3360(o[1]); 1132 checkUnnamed3173(o[1]);
1102 } 1133 }
1103 1134
1104 core.int buildCounterStatus = 0; 1135 core.int buildCounterStatus = 0;
1105 buildStatus() { 1136 buildStatus() {
1106 var o = new api.Status(); 1137 var o = new api.Status();
1107 buildCounterStatus++; 1138 buildCounterStatus++;
1108 if (buildCounterStatus < 3) { 1139 if (buildCounterStatus < 3) {
1109 o.code = 42; 1140 o.code = 42;
1110 o.details = buildUnnamed3361(); 1141 o.details = buildUnnamed3174();
1111 o.message = "foo"; 1142 o.message = "foo";
1112 } 1143 }
1113 buildCounterStatus--; 1144 buildCounterStatus--;
1114 return o; 1145 return o;
1115 } 1146 }
1116 1147
1117 checkStatus(api.Status o) { 1148 checkStatus(api.Status o) {
1118 buildCounterStatus++; 1149 buildCounterStatus++;
1119 if (buildCounterStatus < 3) { 1150 if (buildCounterStatus < 3) {
1120 unittest.expect(o.code, unittest.equals(42)); 1151 unittest.expect(o.code, unittest.equals(42));
1121 checkUnnamed3361(o.details); 1152 checkUnnamed3174(o.details);
1122 unittest.expect(o.message, unittest.equals('foo')); 1153 unittest.expect(o.message, unittest.equals('foo'));
1123 } 1154 }
1124 buildCounterStatus--; 1155 buildCounterStatus--;
1125 } 1156 }
1126 1157
1127 buildUnnamed3362() { 1158 buildUnnamed3175() {
1128 var o = new core.Map<core.String, core.double>(); 1159 var o = new core.Map<core.String, core.double>();
1129 o["x"] = 42.0; 1160 o["x"] = 42.0;
1130 o["y"] = 42.0; 1161 o["y"] = 42.0;
1131 return o; 1162 return o;
1132 } 1163 }
1133 1164
1134 checkUnnamed3362(core.Map<core.String, core.double> o) { 1165 checkUnnamed3175(core.Map<core.String, core.double> o) {
1135 unittest.expect(o, unittest.hasLength(2)); 1166 unittest.expect(o, unittest.hasLength(2));
1136 unittest.expect(o["x"], unittest.equals(42.0)); 1167 unittest.expect(o["x"], unittest.equals(42.0));
1137 unittest.expect(o["y"], unittest.equals(42.0)); 1168 unittest.expect(o["y"], unittest.equals(42.0));
1138 } 1169 }
1139 1170
1140 core.int buildCounterTrafficSplit = 0; 1171 core.int buildCounterTrafficSplit = 0;
1141 buildTrafficSplit() { 1172 buildTrafficSplit() {
1142 var o = new api.TrafficSplit(); 1173 var o = new api.TrafficSplit();
1143 buildCounterTrafficSplit++; 1174 buildCounterTrafficSplit++;
1144 if (buildCounterTrafficSplit < 3) { 1175 if (buildCounterTrafficSplit < 3) {
1145 o.allocations = buildUnnamed3362(); 1176 o.allocations = buildUnnamed3175();
1146 o.shardBy = "foo"; 1177 o.shardBy = "foo";
1147 } 1178 }
1148 buildCounterTrafficSplit--; 1179 buildCounterTrafficSplit--;
1149 return o; 1180 return o;
1150 } 1181 }
1151 1182
1152 checkTrafficSplit(api.TrafficSplit o) { 1183 checkTrafficSplit(api.TrafficSplit o) {
1153 buildCounterTrafficSplit++; 1184 buildCounterTrafficSplit++;
1154 if (buildCounterTrafficSplit < 3) { 1185 if (buildCounterTrafficSplit < 3) {
1155 checkUnnamed3362(o.allocations); 1186 checkUnnamed3175(o.allocations);
1156 unittest.expect(o.shardBy, unittest.equals('foo')); 1187 unittest.expect(o.shardBy, unittest.equals('foo'));
1157 } 1188 }
1158 buildCounterTrafficSplit--; 1189 buildCounterTrafficSplit--;
1159 } 1190 }
1160 1191
1161 core.int buildCounterUrlDispatchRule = 0; 1192 core.int buildCounterUrlDispatchRule = 0;
1162 buildUrlDispatchRule() { 1193 buildUrlDispatchRule() {
1163 var o = new api.UrlDispatchRule(); 1194 var o = new api.UrlDispatchRule();
1164 buildCounterUrlDispatchRule++; 1195 buildCounterUrlDispatchRule++;
1165 if (buildCounterUrlDispatchRule < 3) { 1196 if (buildCounterUrlDispatchRule < 3) {
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
1207 unittest.expect(o.login, unittest.equals('foo')); 1238 unittest.expect(o.login, unittest.equals('foo'));
1208 unittest.expect(o.redirectHttpResponseCode, unittest.equals('foo')); 1239 unittest.expect(o.redirectHttpResponseCode, unittest.equals('foo'));
1209 checkScriptHandler(o.script); 1240 checkScriptHandler(o.script);
1210 unittest.expect(o.securityLevel, unittest.equals('foo')); 1241 unittest.expect(o.securityLevel, unittest.equals('foo'));
1211 checkStaticFilesHandler(o.staticFiles); 1242 checkStaticFilesHandler(o.staticFiles);
1212 unittest.expect(o.urlRegex, unittest.equals('foo')); 1243 unittest.expect(o.urlRegex, unittest.equals('foo'));
1213 } 1244 }
1214 buildCounterUrlMap--; 1245 buildCounterUrlMap--;
1215 } 1246 }
1216 1247
1217 buildUnnamed3363() { 1248 buildUnnamed3176() {
1218 var o = new core.Map<core.String, core.String>(); 1249 var o = new core.Map<core.String, core.String>();
1219 o["x"] = "foo"; 1250 o["x"] = "foo";
1220 o["y"] = "foo"; 1251 o["y"] = "foo";
1221 return o; 1252 return o;
1222 } 1253 }
1223 1254
1224 checkUnnamed3363(core.Map<core.String, core.String> o) { 1255 checkUnnamed3176(core.Map<core.String, core.String> o) {
1225 unittest.expect(o, unittest.hasLength(2)); 1256 unittest.expect(o, unittest.hasLength(2));
1226 unittest.expect(o["x"], unittest.equals('foo')); 1257 unittest.expect(o["x"], unittest.equals('foo'));
1227 unittest.expect(o["y"], unittest.equals('foo')); 1258 unittest.expect(o["y"], unittest.equals('foo'));
1228 } 1259 }
1229 1260
1230 buildUnnamed3364() { 1261 buildUnnamed3177() {
1231 var o = new core.Map<core.String, core.String>(); 1262 var o = new core.Map<core.String, core.String>();
1232 o["x"] = "foo"; 1263 o["x"] = "foo";
1233 o["y"] = "foo"; 1264 o["y"] = "foo";
1234 return o; 1265 return o;
1235 } 1266 }
1236 1267
1237 checkUnnamed3364(core.Map<core.String, core.String> o) { 1268 checkUnnamed3177(core.Map<core.String, core.String> o) {
1238 unittest.expect(o, unittest.hasLength(2)); 1269 unittest.expect(o, unittest.hasLength(2));
1239 unittest.expect(o["x"], unittest.equals('foo')); 1270 unittest.expect(o["x"], unittest.equals('foo'));
1240 unittest.expect(o["y"], unittest.equals('foo')); 1271 unittest.expect(o["y"], unittest.equals('foo'));
1241 } 1272 }
1242 1273
1243 buildUnnamed3365() { 1274 buildUnnamed3178() {
1244 var o = new core.List<api.ErrorHandler>(); 1275 var o = new core.List<api.ErrorHandler>();
1245 o.add(buildErrorHandler()); 1276 o.add(buildErrorHandler());
1246 o.add(buildErrorHandler()); 1277 o.add(buildErrorHandler());
1247 return o; 1278 return o;
1248 } 1279 }
1249 1280
1250 checkUnnamed3365(core.List<api.ErrorHandler> o) { 1281 checkUnnamed3178(core.List<api.ErrorHandler> o) {
1251 unittest.expect(o, unittest.hasLength(2)); 1282 unittest.expect(o, unittest.hasLength(2));
1252 checkErrorHandler(o[0]); 1283 checkErrorHandler(o[0]);
1253 checkErrorHandler(o[1]); 1284 checkErrorHandler(o[1]);
1254 } 1285 }
1255 1286
1256 buildUnnamed3366() { 1287 buildUnnamed3179() {
1257 var o = new core.List<api.UrlMap>(); 1288 var o = new core.List<api.UrlMap>();
1258 o.add(buildUrlMap()); 1289 o.add(buildUrlMap());
1259 o.add(buildUrlMap()); 1290 o.add(buildUrlMap());
1260 return o; 1291 return o;
1261 } 1292 }
1262 1293
1263 checkUnnamed3366(core.List<api.UrlMap> o) { 1294 checkUnnamed3179(core.List<api.UrlMap> o) {
1264 unittest.expect(o, unittest.hasLength(2)); 1295 unittest.expect(o, unittest.hasLength(2));
1265 checkUrlMap(o[0]); 1296 checkUrlMap(o[0]);
1266 checkUrlMap(o[1]); 1297 checkUrlMap(o[1]);
1267 } 1298 }
1268 1299
1269 buildUnnamed3367() { 1300 buildUnnamed3180() {
1270 var o = new core.List<core.String>(); 1301 var o = new core.List<core.String>();
1271 o.add("foo"); 1302 o.add("foo");
1272 o.add("foo"); 1303 o.add("foo");
1273 return o; 1304 return o;
1274 } 1305 }
1275 1306
1276 checkUnnamed3367(core.List<core.String> o) { 1307 checkUnnamed3180(core.List<core.String> o) {
1277 unittest.expect(o, unittest.hasLength(2)); 1308 unittest.expect(o, unittest.hasLength(2));
1278 unittest.expect(o[0], unittest.equals('foo')); 1309 unittest.expect(o[0], unittest.equals('foo'));
1279 unittest.expect(o[1], unittest.equals('foo')); 1310 unittest.expect(o[1], unittest.equals('foo'));
1280 } 1311 }
1281 1312
1282 buildUnnamed3368() { 1313 buildUnnamed3181() {
1283 var o = new core.List<api.Library>(); 1314 var o = new core.List<api.Library>();
1284 o.add(buildLibrary()); 1315 o.add(buildLibrary());
1285 o.add(buildLibrary()); 1316 o.add(buildLibrary());
1286 return o; 1317 return o;
1287 } 1318 }
1288 1319
1289 checkUnnamed3368(core.List<api.Library> o) { 1320 checkUnnamed3181(core.List<api.Library> o) {
1290 unittest.expect(o, unittest.hasLength(2)); 1321 unittest.expect(o, unittest.hasLength(2));
1291 checkLibrary(o[0]); 1322 checkLibrary(o[0]);
1292 checkLibrary(o[1]); 1323 checkLibrary(o[1]);
1293 } 1324 }
1294 1325
1295 core.int buildCounterVersion = 0; 1326 core.int buildCounterVersion = 0;
1296 buildVersion() { 1327 buildVersion() {
1297 var o = new api.Version(); 1328 var o = new api.Version();
1298 buildCounterVersion++; 1329 buildCounterVersion++;
1299 if (buildCounterVersion < 3) { 1330 if (buildCounterVersion < 3) {
1300 o.apiConfig = buildApiConfigHandler(); 1331 o.apiConfig = buildApiConfigHandler();
1301 o.automaticScaling = buildAutomaticScaling(); 1332 o.automaticScaling = buildAutomaticScaling();
1302 o.basicScaling = buildBasicScaling(); 1333 o.basicScaling = buildBasicScaling();
1303 o.betaSettings = buildUnnamed3363(); 1334 o.betaSettings = buildUnnamed3176();
1304 o.createTime = "foo"; 1335 o.createTime = "foo";
1305 o.createdBy = "foo"; 1336 o.createdBy = "foo";
1306 o.defaultExpiration = "foo"; 1337 o.defaultExpiration = "foo";
1307 o.deployment = buildDeployment(); 1338 o.deployment = buildDeployment();
1308 o.diskUsageBytes = "foo"; 1339 o.diskUsageBytes = "foo";
1309 o.env = "foo"; 1340 o.env = "foo";
1310 o.envVariables = buildUnnamed3364(); 1341 o.envVariables = buildUnnamed3177();
1311 o.errorHandlers = buildUnnamed3365(); 1342 o.errorHandlers = buildUnnamed3178();
1312 o.handlers = buildUnnamed3366(); 1343 o.handlers = buildUnnamed3179();
1313 o.healthCheck = buildHealthCheck(); 1344 o.healthCheck = buildHealthCheck();
1314 o.id = "foo"; 1345 o.id = "foo";
1315 o.inboundServices = buildUnnamed3367(); 1346 o.inboundServices = buildUnnamed3180();
1316 o.instanceClass = "foo"; 1347 o.instanceClass = "foo";
1317 o.libraries = buildUnnamed3368(); 1348 o.libraries = buildUnnamed3181();
1318 o.manualScaling = buildManualScaling(); 1349 o.manualScaling = buildManualScaling();
1319 o.name = "foo"; 1350 o.name = "foo";
1320 o.network = buildNetwork(); 1351 o.network = buildNetwork();
1321 o.nobuildFilesRegex = "foo"; 1352 o.nobuildFilesRegex = "foo";
1322 o.resources = buildResources(); 1353 o.resources = buildResources();
1323 o.runtime = "foo"; 1354 o.runtime = "foo";
1324 o.servingStatus = "foo"; 1355 o.servingStatus = "foo";
1325 o.threadsafe = true; 1356 o.threadsafe = true;
1326 o.versionUrl = "foo"; 1357 o.versionUrl = "foo";
1327 o.vm = true; 1358 o.vm = true;
1328 } 1359 }
1329 buildCounterVersion--; 1360 buildCounterVersion--;
1330 return o; 1361 return o;
1331 } 1362 }
1332 1363
1333 checkVersion(api.Version o) { 1364 checkVersion(api.Version o) {
1334 buildCounterVersion++; 1365 buildCounterVersion++;
1335 if (buildCounterVersion < 3) { 1366 if (buildCounterVersion < 3) {
1336 checkApiConfigHandler(o.apiConfig); 1367 checkApiConfigHandler(o.apiConfig);
1337 checkAutomaticScaling(o.automaticScaling); 1368 checkAutomaticScaling(o.automaticScaling);
1338 checkBasicScaling(o.basicScaling); 1369 checkBasicScaling(o.basicScaling);
1339 checkUnnamed3363(o.betaSettings); 1370 checkUnnamed3176(o.betaSettings);
1340 unittest.expect(o.createTime, unittest.equals('foo')); 1371 unittest.expect(o.createTime, unittest.equals('foo'));
1341 unittest.expect(o.createdBy, unittest.equals('foo')); 1372 unittest.expect(o.createdBy, unittest.equals('foo'));
1342 unittest.expect(o.defaultExpiration, unittest.equals('foo')); 1373 unittest.expect(o.defaultExpiration, unittest.equals('foo'));
1343 checkDeployment(o.deployment); 1374 checkDeployment(o.deployment);
1344 unittest.expect(o.diskUsageBytes, unittest.equals('foo')); 1375 unittest.expect(o.diskUsageBytes, unittest.equals('foo'));
1345 unittest.expect(o.env, unittest.equals('foo')); 1376 unittest.expect(o.env, unittest.equals('foo'));
1346 checkUnnamed3364(o.envVariables); 1377 checkUnnamed3177(o.envVariables);
1347 checkUnnamed3365(o.errorHandlers); 1378 checkUnnamed3178(o.errorHandlers);
1348 checkUnnamed3366(o.handlers); 1379 checkUnnamed3179(o.handlers);
1349 checkHealthCheck(o.healthCheck); 1380 checkHealthCheck(o.healthCheck);
1350 unittest.expect(o.id, unittest.equals('foo')); 1381 unittest.expect(o.id, unittest.equals('foo'));
1351 checkUnnamed3367(o.inboundServices); 1382 checkUnnamed3180(o.inboundServices);
1352 unittest.expect(o.instanceClass, unittest.equals('foo')); 1383 unittest.expect(o.instanceClass, unittest.equals('foo'));
1353 checkUnnamed3368(o.libraries); 1384 checkUnnamed3181(o.libraries);
1354 checkManualScaling(o.manualScaling); 1385 checkManualScaling(o.manualScaling);
1355 unittest.expect(o.name, unittest.equals('foo')); 1386 unittest.expect(o.name, unittest.equals('foo'));
1356 checkNetwork(o.network); 1387 checkNetwork(o.network);
1357 unittest.expect(o.nobuildFilesRegex, unittest.equals('foo')); 1388 unittest.expect(o.nobuildFilesRegex, unittest.equals('foo'));
1358 checkResources(o.resources); 1389 checkResources(o.resources);
1359 unittest.expect(o.runtime, unittest.equals('foo')); 1390 unittest.expect(o.runtime, unittest.equals('foo'));
1360 unittest.expect(o.servingStatus, unittest.equals('foo')); 1391 unittest.expect(o.servingStatus, unittest.equals('foo'));
1361 unittest.expect(o.threadsafe, unittest.isTrue); 1392 unittest.expect(o.threadsafe, unittest.isTrue);
1362 unittest.expect(o.versionUrl, unittest.equals('foo')); 1393 unittest.expect(o.versionUrl, unittest.equals('foo'));
1363 unittest.expect(o.vm, unittest.isTrue); 1394 unittest.expect(o.vm, unittest.isTrue);
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
1624 1655
1625 unittest.group("obj-schema-OperationMetadata", () { 1656 unittest.group("obj-schema-OperationMetadata", () {
1626 unittest.test("to-json--from-json", () { 1657 unittest.test("to-json--from-json", () {
1627 var o = buildOperationMetadata(); 1658 var o = buildOperationMetadata();
1628 var od = new api.OperationMetadata.fromJson(o.toJson()); 1659 var od = new api.OperationMetadata.fromJson(o.toJson());
1629 checkOperationMetadata(od); 1660 checkOperationMetadata(od);
1630 }); 1661 });
1631 }); 1662 });
1632 1663
1633 1664
1665 unittest.group("obj-schema-OperationMetadataExperimental", () {
1666 unittest.test("to-json--from-json", () {
1667 var o = buildOperationMetadataExperimental();
1668 var od = new api.OperationMetadataExperimental.fromJson(o.toJson());
1669 checkOperationMetadataExperimental(od);
1670 });
1671 });
1672
1673
1634 unittest.group("obj-schema-OperationMetadataV1", () { 1674 unittest.group("obj-schema-OperationMetadataV1", () {
1635 unittest.test("to-json--from-json", () { 1675 unittest.test("to-json--from-json", () {
1636 var o = buildOperationMetadataV1(); 1676 var o = buildOperationMetadataV1();
1637 var od = new api.OperationMetadataV1.fromJson(o.toJson()); 1677 var od = new api.OperationMetadataV1.fromJson(o.toJson());
1638 checkOperationMetadataV1(od); 1678 checkOperationMetadataV1(od);
1639 }); 1679 });
1640 }); 1680 });
1641 1681
1642 1682
1643 unittest.group("obj-schema-OperationMetadataV1Beta5", () { 1683 unittest.group("obj-schema-OperationMetadataV1Beta5", () {
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
1751 unittest.group("obj-schema-ZipInfo", () { 1791 unittest.group("obj-schema-ZipInfo", () {
1752 unittest.test("to-json--from-json", () { 1792 unittest.test("to-json--from-json", () {
1753 var o = buildZipInfo(); 1793 var o = buildZipInfo();
1754 var od = new api.ZipInfo.fromJson(o.toJson()); 1794 var od = new api.ZipInfo.fromJson(o.toJson());
1755 checkZipInfo(od); 1795 checkZipInfo(od);
1756 }); 1796 });
1757 }); 1797 });
1758 1798
1759 1799
1760 unittest.group("resource-AppsResourceApi", () { 1800 unittest.group("resource-AppsResourceApi", () {
1801 unittest.test("method--create", () {
1802
1803 var mock = new HttpServerMock();
1804 api.AppsResourceApi res = new api.AppengineApi(mock).apps;
1805 var arg_request = buildApplication();
1806 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
1807 var obj = new api.Application.fromJson(json);
1808 checkApplication(obj);
1809
1810 var path = (req.url).path;
1811 var pathOffset = 0;
1812 var index;
1813 var subPart;
1814 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
1815 pathOffset += 1;
1816 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ als("v1/apps"));
1817 pathOffset += 7;
1818
1819 var query = (req.url).query;
1820 var queryOffset = 0;
1821 var queryMap = {};
1822 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
1823 parseBool(n) {
1824 if (n == "true") return true;
1825 if (n == "false") return false;
1826 if (n == null) return null;
1827 throw new core.ArgumentError("Invalid boolean: $n");
1828 }
1829 if (query.length > 0) {
1830 for (var part in query.split("&")) {
1831 var keyvalue = part.split("=");
1832 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
1833 }
1834 }
1835
1836
1837 var h = {
1838 "content-type" : "application/json; charset=utf-8",
1839 };
1840 var resp = convert.JSON.encode(buildOperation());
1841 return new async.Future.value(stringResponse(200, h, resp));
1842 }), true);
1843 res.create(arg_request).then(unittest.expectAsync(((api.Operation response ) {
1844 checkOperation(response);
1845 })));
1846 });
1847
1761 unittest.test("method--get", () { 1848 unittest.test("method--get", () {
1762 1849
1763 var mock = new HttpServerMock(); 1850 var mock = new HttpServerMock();
1764 api.AppsResourceApi res = new api.AppengineApi(mock).apps; 1851 api.AppsResourceApi res = new api.AppengineApi(mock).apps;
1765 var arg_appsId = "foo"; 1852 var arg_appsId = "foo";
1766 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 1853 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
1767 var path = (req.url).path; 1854 var path = (req.url).path;
1768 var pathOffset = 0; 1855 var pathOffset = 0;
1769 var index; 1856 var index;
1770 var subPart; 1857 var subPart;
(...skipping 27 matching lines...) Expand all
1798 "content-type" : "application/json; charset=utf-8", 1885 "content-type" : "application/json; charset=utf-8",
1799 }; 1886 };
1800 var resp = convert.JSON.encode(buildApplication()); 1887 var resp = convert.JSON.encode(buildApplication());
1801 return new async.Future.value(stringResponse(200, h, resp)); 1888 return new async.Future.value(stringResponse(200, h, resp));
1802 }), true); 1889 }), true);
1803 res.get(arg_appsId).then(unittest.expectAsync(((api.Application response) { 1890 res.get(arg_appsId).then(unittest.expectAsync(((api.Application response) {
1804 checkApplication(response); 1891 checkApplication(response);
1805 }))); 1892 })));
1806 }); 1893 });
1807 1894
1895 unittest.test("method--patch", () {
1896
1897 var mock = new HttpServerMock();
1898 api.AppsResourceApi res = new api.AppengineApi(mock).apps;
1899 var arg_request = buildApplication();
1900 var arg_appsId = "foo";
1901 var arg_updateMask = "foo";
1902 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
1903 var obj = new api.Application.fromJson(json);
1904 checkApplication(obj);
1905
1906 var path = (req.url).path;
1907 var pathOffset = 0;
1908 var index;
1909 var subPart;
1910 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
1911 pathOffset += 1;
1912 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ als("v1/apps/"));
1913 pathOffset += 8;
1914 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset));
1915 pathOffset = path.length;
1916 unittest.expect(subPart, unittest.equals("$arg_appsId"));
1917
1918 var query = (req.url).query;
1919 var queryOffset = 0;
1920 var queryMap = {};
1921 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
1922 parseBool(n) {
1923 if (n == "true") return true;
1924 if (n == "false") return false;
1925 if (n == null) return null;
1926 throw new core.ArgumentError("Invalid boolean: $n");
1927 }
1928 if (query.length > 0) {
1929 for (var part in query.split("&")) {
1930 var keyvalue = part.split("=");
1931 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
1932 }
1933 }
1934 unittest.expect(queryMap["updateMask"].first, unittest.equals(arg_update Mask));
1935
1936
1937 var h = {
1938 "content-type" : "application/json; charset=utf-8",
1939 };
1940 var resp = convert.JSON.encode(buildOperation());
1941 return new async.Future.value(stringResponse(200, h, resp));
1942 }), true);
1943 res.patch(arg_request, arg_appsId, updateMask: arg_updateMask).then(unitte st.expectAsync(((api.Operation response) {
1944 checkOperation(response);
1945 })));
1946 });
1947
1808 unittest.test("method--repair", () { 1948 unittest.test("method--repair", () {
1809 1949
1810 var mock = new HttpServerMock(); 1950 var mock = new HttpServerMock();
1811 api.AppsResourceApi res = new api.AppengineApi(mock).apps; 1951 api.AppsResourceApi res = new api.AppengineApi(mock).apps;
1812 var arg_request = buildRepairApplicationRequest(); 1952 var arg_request = buildRepairApplicationRequest();
1813 var arg_appsId = "foo"; 1953 var arg_appsId = "foo";
1814 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 1954 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
1815 var obj = new api.RepairApplicationRequest.fromJson(json); 1955 var obj = new api.RepairApplicationRequest.fromJson(json);
1816 checkRepairApplicationRequest(obj); 1956 checkRepairApplicationRequest(obj);
1817 1957
(...skipping 1127 matching lines...) Expand 10 before | Expand all | Expand 10 after
2945 return new async.Future.value(stringResponse(200, h, resp)); 3085 return new async.Future.value(stringResponse(200, h, resp));
2946 }), true); 3086 }), true);
2947 res.list(arg_appsId, arg_servicesId, arg_versionsId, pageSize: arg_pageSiz e, pageToken: arg_pageToken).then(unittest.expectAsync(((api.ListInstancesRespon se response) { 3087 res.list(arg_appsId, arg_servicesId, arg_versionsId, pageSize: arg_pageSiz e, pageToken: arg_pageToken).then(unittest.expectAsync(((api.ListInstancesRespon se response) {
2948 checkListInstancesResponse(response); 3088 checkListInstancesResponse(response);
2949 }))); 3089 })));
2950 }); 3090 });
2951 3091
2952 }); 3092 });
2953 3093
2954 3094
3095 unittest.group("resource-ExperimentalAppsOperationsResourceApi", () {
3096 unittest.test("method--get", () {
3097
3098 var mock = new HttpServerMock();
3099 api.ExperimentalAppsOperationsResourceApi res = new api.AppengineApi(mock) .experimental.apps.operations;
3100 var arg_appsId = "foo";
3101 var arg_operationsId = "foo";
3102 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
3103 var path = (req.url).path;
3104 var pathOffset = 0;
3105 var index;
3106 var subPart;
3107 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
3108 pathOffset += 1;
3109 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq uals("experimental/apps/"));
3110 pathOffset += 18;
3111 index = path.indexOf("/operations/", pathOffset);
3112 unittest.expect(index >= 0, unittest.isTrue);
3113 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index ));
3114 pathOffset = index;
3115 unittest.expect(subPart, unittest.equals("$arg_appsId"));
3116 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq uals("/operations/"));
3117 pathOffset += 12;
3118 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset));
3119 pathOffset = path.length;
3120 unittest.expect(subPart, unittest.equals("$arg_operationsId"));
3121
3122 var query = (req.url).query;
3123 var queryOffset = 0;
3124 var queryMap = {};
3125 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
3126 parseBool(n) {
3127 if (n == "true") return true;
3128 if (n == "false") return false;
3129 if (n == null) return null;
3130 throw new core.ArgumentError("Invalid boolean: $n");
3131 }
3132 if (query.length > 0) {
3133 for (var part in query.split("&")) {
3134 var keyvalue = part.split("=");
3135 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
3136 }
3137 }
3138
3139
3140 var h = {
3141 "content-type" : "application/json; charset=utf-8",
3142 };
3143 var resp = convert.JSON.encode(buildOperation());
3144 return new async.Future.value(stringResponse(200, h, resp));
3145 }), true);
3146 res.get(arg_appsId, arg_operationsId).then(unittest.expectAsync(((api.Oper ation response) {
3147 checkOperation(response);
3148 })));
3149 });
3150
3151 unittest.test("method--list", () {
3152
3153 var mock = new HttpServerMock();
3154 api.ExperimentalAppsOperationsResourceApi res = new api.AppengineApi(mock) .experimental.apps.operations;
3155 var arg_appsId = "foo";
3156 var arg_filter = "foo";
3157 var arg_pageSize = 42;
3158 var arg_pageToken = "foo";
3159 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
3160 var path = (req.url).path;
3161 var pathOffset = 0;
3162 var index;
3163 var subPart;
3164 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
3165 pathOffset += 1;
3166 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq uals("experimental/apps/"));
3167 pathOffset += 18;
3168 index = path.indexOf("/operations", pathOffset);
3169 unittest.expect(index >= 0, unittest.isTrue);
3170 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index ));
3171 pathOffset = index;
3172 unittest.expect(subPart, unittest.equals("$arg_appsId"));
3173 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq uals("/operations"));
3174 pathOffset += 11;
3175
3176 var query = (req.url).query;
3177 var queryOffset = 0;
3178 var queryMap = {};
3179 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
3180 parseBool(n) {
3181 if (n == "true") return true;
3182 if (n == "false") return false;
3183 if (n == null) return null;
3184 throw new core.ArgumentError("Invalid boolean: $n");
3185 }
3186 if (query.length > 0) {
3187 for (var part in query.split("&")) {
3188 var keyvalue = part.split("=");
3189 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
3190 }
3191 }
3192 unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter));
3193 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ als(arg_pageSize));
3194 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en));
3195
3196
3197 var h = {
3198 "content-type" : "application/json; charset=utf-8",
3199 };
3200 var resp = convert.JSON.encode(buildListOperationsResponse());
3201 return new async.Future.value(stringResponse(200, h, resp));
3202 }), true);
3203 res.list(arg_appsId, filter: arg_filter, pageSize: arg_pageSize, pageToken : arg_pageToken).then(unittest.expectAsync(((api.ListOperationsResponse response ) {
3204 checkListOperationsResponse(response);
3205 })));
3206 });
3207
3208 });
3209
3210
2955 } 3211 }
2956 3212
OLDNEW
« no previous file with comments | « generated/googleapis/test/androidpublisher/v2_test.dart ('k') | generated/googleapis/test/appsactivity/v1_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698