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

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

Issue 2936613002: Api-Roll 50: 2017-06-12 (Closed)
Patch Set: Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 library googleapis.plus.v1.test; 1 library googleapis.plus.v1.test;
2 2
3 import "dart:core" as core; 3 import "dart:core" as core;
4 import "dart:collection" as collection; 4 import "dart:collection" as collection;
5 import "dart:async" as async; 5 import "dart:async" as async;
6 import "dart:convert" as convert; 6 import "dart:convert" as convert;
7 7
8 import 'package:http/http.dart' as http; 8 import 'package:http/http.dart' as http;
9 import 'package:http/testing.dart' as http_testing; 9 import 'package:http/testing.dart' as http_testing;
10 import 'package:unittest/unittest.dart' as unittest; 10 import 'package:test/test.dart' as unittest;
11 11
12 import 'package:googleapis/plus/v1.dart' as api; 12 import 'package:googleapis/plus/v1.dart' as api;
13 13
14 class HttpServerMock extends http.BaseClient { 14 class HttpServerMock extends http.BaseClient {
15 core.Function _callback; 15 core.Function _callback;
16 core.bool _expectJson; 16 core.bool _expectJson;
17 17
18 void register(core.Function callback, core.bool expectJson) { 18 void register(core.Function callback, core.bool expectJson) {
19 _callback = callback; 19 _callback = callback;
20 _expectJson = expectJson; 20 _expectJson = expectJson;
(...skipping 18 matching lines...) Expand all
39 } else { 39 } else {
40 return stream.toBytes().then((data) { 40 return stream.toBytes().then((data) {
41 return _callback(request, data); 41 return _callback(request, data);
42 }); 42 });
43 } 43 }
44 } 44 }
45 } 45 }
46 } 46 }
47 47
48 http.StreamedResponse stringResponse( 48 http.StreamedResponse stringResponse(
49 core.int status, core.Map headers, core.String body) { 49 core.int status, core.Map<core.String, core.String> headers, core.String bod y) {
50 var stream = new async.Stream.fromIterable([convert.UTF8.encode(body)]); 50 var stream = new async.Stream.fromIterable([convert.UTF8.encode(body)]);
51 return new http.StreamedResponse(stream, status, headers: headers); 51 return new http.StreamedResponse(stream, status, headers: headers);
52 } 52 }
53 53
54 buildUnnamed98() { 54 buildUnnamed100() {
55 var o = new core.List<api.PlusAclentryResource>(); 55 var o = new core.List<api.PlusAclentryResource>();
56 o.add(buildPlusAclentryResource()); 56 o.add(buildPlusAclentryResource());
57 o.add(buildPlusAclentryResource()); 57 o.add(buildPlusAclentryResource());
58 return o; 58 return o;
59 } 59 }
60 60
61 checkUnnamed98(core.List<api.PlusAclentryResource> o) { 61 checkUnnamed100(core.List<api.PlusAclentryResource> o) {
62 unittest.expect(o, unittest.hasLength(2)); 62 unittest.expect(o, unittest.hasLength(2));
63 checkPlusAclentryResource(o[0]); 63 checkPlusAclentryResource(o[0]);
64 checkPlusAclentryResource(o[1]); 64 checkPlusAclentryResource(o[1]);
65 } 65 }
66 66
67 core.int buildCounterAcl = 0; 67 core.int buildCounterAcl = 0;
68 buildAcl() { 68 buildAcl() {
69 var o = new api.Acl(); 69 var o = new api.Acl();
70 buildCounterAcl++; 70 buildCounterAcl++;
71 if (buildCounterAcl < 3) { 71 if (buildCounterAcl < 3) {
72 o.description = "foo"; 72 o.description = "foo";
73 o.items = buildUnnamed98(); 73 o.items = buildUnnamed100();
74 o.kind = "foo"; 74 o.kind = "foo";
75 } 75 }
76 buildCounterAcl--; 76 buildCounterAcl--;
77 return o; 77 return o;
78 } 78 }
79 79
80 checkAcl(api.Acl o) { 80 checkAcl(api.Acl o) {
81 buildCounterAcl++; 81 buildCounterAcl++;
82 if (buildCounterAcl < 3) { 82 if (buildCounterAcl < 3) {
83 unittest.expect(o.description, unittest.equals('foo')); 83 unittest.expect(o.description, unittest.equals('foo'));
84 checkUnnamed98(o.items); 84 checkUnnamed100(o.items);
85 unittest.expect(o.kind, unittest.equals('foo')); 85 unittest.expect(o.kind, unittest.equals('foo'));
86 } 86 }
87 buildCounterAcl--; 87 buildCounterAcl--;
88 } 88 }
89 89
90 core.int buildCounterActivityActorClientSpecificActorInfoYoutubeActorInfo = 0; 90 core.int buildCounterActivityActorClientSpecificActorInfoYoutubeActorInfo = 0;
91 buildActivityActorClientSpecificActorInfoYoutubeActorInfo() { 91 buildActivityActorClientSpecificActorInfoYoutubeActorInfo() {
92 var o = new api.ActivityActorClientSpecificActorInfoYoutubeActorInfo(); 92 var o = new api.ActivityActorClientSpecificActorInfoYoutubeActorInfo();
93 buildCounterActivityActorClientSpecificActorInfoYoutubeActorInfo++; 93 buildCounterActivityActorClientSpecificActorInfoYoutubeActorInfo++;
94 if (buildCounterActivityActorClientSpecificActorInfoYoutubeActorInfo < 3) { 94 if (buildCounterActivityActorClientSpecificActorInfoYoutubeActorInfo < 3) {
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after
432 checkActivityObjectAttachmentsThumbnails(api.ActivityObjectAttachmentsThumbnails o) { 432 checkActivityObjectAttachmentsThumbnails(api.ActivityObjectAttachmentsThumbnails o) {
433 buildCounterActivityObjectAttachmentsThumbnails++; 433 buildCounterActivityObjectAttachmentsThumbnails++;
434 if (buildCounterActivityObjectAttachmentsThumbnails < 3) { 434 if (buildCounterActivityObjectAttachmentsThumbnails < 3) {
435 unittest.expect(o.description, unittest.equals('foo')); 435 unittest.expect(o.description, unittest.equals('foo'));
436 checkActivityObjectAttachmentsThumbnailsImage(o.image); 436 checkActivityObjectAttachmentsThumbnailsImage(o.image);
437 unittest.expect(o.url, unittest.equals('foo')); 437 unittest.expect(o.url, unittest.equals('foo'));
438 } 438 }
439 buildCounterActivityObjectAttachmentsThumbnails--; 439 buildCounterActivityObjectAttachmentsThumbnails--;
440 } 440 }
441 441
442 buildUnnamed99() { 442 buildUnnamed101() {
443 var o = new core.List<api.ActivityObjectAttachmentsThumbnails>(); 443 var o = new core.List<api.ActivityObjectAttachmentsThumbnails>();
444 o.add(buildActivityObjectAttachmentsThumbnails()); 444 o.add(buildActivityObjectAttachmentsThumbnails());
445 o.add(buildActivityObjectAttachmentsThumbnails()); 445 o.add(buildActivityObjectAttachmentsThumbnails());
446 return o; 446 return o;
447 } 447 }
448 448
449 checkUnnamed99(core.List<api.ActivityObjectAttachmentsThumbnails> o) { 449 checkUnnamed101(core.List<api.ActivityObjectAttachmentsThumbnails> o) {
450 unittest.expect(o, unittest.hasLength(2)); 450 unittest.expect(o, unittest.hasLength(2));
451 checkActivityObjectAttachmentsThumbnails(o[0]); 451 checkActivityObjectAttachmentsThumbnails(o[0]);
452 checkActivityObjectAttachmentsThumbnails(o[1]); 452 checkActivityObjectAttachmentsThumbnails(o[1]);
453 } 453 }
454 454
455 core.int buildCounterActivityObjectAttachments = 0; 455 core.int buildCounterActivityObjectAttachments = 0;
456 buildActivityObjectAttachments() { 456 buildActivityObjectAttachments() {
457 var o = new api.ActivityObjectAttachments(); 457 var o = new api.ActivityObjectAttachments();
458 buildCounterActivityObjectAttachments++; 458 buildCounterActivityObjectAttachments++;
459 if (buildCounterActivityObjectAttachments < 3) { 459 if (buildCounterActivityObjectAttachments < 3) {
460 o.content = "foo"; 460 o.content = "foo";
461 o.displayName = "foo"; 461 o.displayName = "foo";
462 o.embed = buildActivityObjectAttachmentsEmbed(); 462 o.embed = buildActivityObjectAttachmentsEmbed();
463 o.fullImage = buildActivityObjectAttachmentsFullImage(); 463 o.fullImage = buildActivityObjectAttachmentsFullImage();
464 o.id = "foo"; 464 o.id = "foo";
465 o.image = buildActivityObjectAttachmentsImage(); 465 o.image = buildActivityObjectAttachmentsImage();
466 o.objectType = "foo"; 466 o.objectType = "foo";
467 o.thumbnails = buildUnnamed99(); 467 o.thumbnails = buildUnnamed101();
468 o.url = "foo"; 468 o.url = "foo";
469 } 469 }
470 buildCounterActivityObjectAttachments--; 470 buildCounterActivityObjectAttachments--;
471 return o; 471 return o;
472 } 472 }
473 473
474 checkActivityObjectAttachments(api.ActivityObjectAttachments o) { 474 checkActivityObjectAttachments(api.ActivityObjectAttachments o) {
475 buildCounterActivityObjectAttachments++; 475 buildCounterActivityObjectAttachments++;
476 if (buildCounterActivityObjectAttachments < 3) { 476 if (buildCounterActivityObjectAttachments < 3) {
477 unittest.expect(o.content, unittest.equals('foo')); 477 unittest.expect(o.content, unittest.equals('foo'));
478 unittest.expect(o.displayName, unittest.equals('foo')); 478 unittest.expect(o.displayName, unittest.equals('foo'));
479 checkActivityObjectAttachmentsEmbed(o.embed); 479 checkActivityObjectAttachmentsEmbed(o.embed);
480 checkActivityObjectAttachmentsFullImage(o.fullImage); 480 checkActivityObjectAttachmentsFullImage(o.fullImage);
481 unittest.expect(o.id, unittest.equals('foo')); 481 unittest.expect(o.id, unittest.equals('foo'));
482 checkActivityObjectAttachmentsImage(o.image); 482 checkActivityObjectAttachmentsImage(o.image);
483 unittest.expect(o.objectType, unittest.equals('foo')); 483 unittest.expect(o.objectType, unittest.equals('foo'));
484 checkUnnamed99(o.thumbnails); 484 checkUnnamed101(o.thumbnails);
485 unittest.expect(o.url, unittest.equals('foo')); 485 unittest.expect(o.url, unittest.equals('foo'));
486 } 486 }
487 buildCounterActivityObjectAttachments--; 487 buildCounterActivityObjectAttachments--;
488 } 488 }
489 489
490 buildUnnamed100() { 490 buildUnnamed102() {
491 var o = new core.List<api.ActivityObjectAttachments>(); 491 var o = new core.List<api.ActivityObjectAttachments>();
492 o.add(buildActivityObjectAttachments()); 492 o.add(buildActivityObjectAttachments());
493 o.add(buildActivityObjectAttachments()); 493 o.add(buildActivityObjectAttachments());
494 return o; 494 return o;
495 } 495 }
496 496
497 checkUnnamed100(core.List<api.ActivityObjectAttachments> o) { 497 checkUnnamed102(core.List<api.ActivityObjectAttachments> o) {
498 unittest.expect(o, unittest.hasLength(2)); 498 unittest.expect(o, unittest.hasLength(2));
499 checkActivityObjectAttachments(o[0]); 499 checkActivityObjectAttachments(o[0]);
500 checkActivityObjectAttachments(o[1]); 500 checkActivityObjectAttachments(o[1]);
501 } 501 }
502 502
503 core.int buildCounterActivityObjectPlusoners = 0; 503 core.int buildCounterActivityObjectPlusoners = 0;
504 buildActivityObjectPlusoners() { 504 buildActivityObjectPlusoners() {
505 var o = new api.ActivityObjectPlusoners(); 505 var o = new api.ActivityObjectPlusoners();
506 buildCounterActivityObjectPlusoners++; 506 buildCounterActivityObjectPlusoners++;
507 if (buildCounterActivityObjectPlusoners < 3) { 507 if (buildCounterActivityObjectPlusoners < 3) {
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
562 } 562 }
563 buildCounterActivityObjectResharers--; 563 buildCounterActivityObjectResharers--;
564 } 564 }
565 565
566 core.int buildCounterActivityObject = 0; 566 core.int buildCounterActivityObject = 0;
567 buildActivityObject() { 567 buildActivityObject() {
568 var o = new api.ActivityObject(); 568 var o = new api.ActivityObject();
569 buildCounterActivityObject++; 569 buildCounterActivityObject++;
570 if (buildCounterActivityObject < 3) { 570 if (buildCounterActivityObject < 3) {
571 o.actor = buildActivityObjectActor(); 571 o.actor = buildActivityObjectActor();
572 o.attachments = buildUnnamed100(); 572 o.attachments = buildUnnamed102();
573 o.content = "foo"; 573 o.content = "foo";
574 o.id = "foo"; 574 o.id = "foo";
575 o.objectType = "foo"; 575 o.objectType = "foo";
576 o.originalContent = "foo"; 576 o.originalContent = "foo";
577 o.plusoners = buildActivityObjectPlusoners(); 577 o.plusoners = buildActivityObjectPlusoners();
578 o.replies = buildActivityObjectReplies(); 578 o.replies = buildActivityObjectReplies();
579 o.resharers = buildActivityObjectResharers(); 579 o.resharers = buildActivityObjectResharers();
580 o.url = "foo"; 580 o.url = "foo";
581 } 581 }
582 buildCounterActivityObject--; 582 buildCounterActivityObject--;
583 return o; 583 return o;
584 } 584 }
585 585
586 checkActivityObject(api.ActivityObject o) { 586 checkActivityObject(api.ActivityObject o) {
587 buildCounterActivityObject++; 587 buildCounterActivityObject++;
588 if (buildCounterActivityObject < 3) { 588 if (buildCounterActivityObject < 3) {
589 checkActivityObjectActor(o.actor); 589 checkActivityObjectActor(o.actor);
590 checkUnnamed100(o.attachments); 590 checkUnnamed102(o.attachments);
591 unittest.expect(o.content, unittest.equals('foo')); 591 unittest.expect(o.content, unittest.equals('foo'));
592 unittest.expect(o.id, unittest.equals('foo')); 592 unittest.expect(o.id, unittest.equals('foo'));
593 unittest.expect(o.objectType, unittest.equals('foo')); 593 unittest.expect(o.objectType, unittest.equals('foo'));
594 unittest.expect(o.originalContent, unittest.equals('foo')); 594 unittest.expect(o.originalContent, unittest.equals('foo'));
595 checkActivityObjectPlusoners(o.plusoners); 595 checkActivityObjectPlusoners(o.plusoners);
596 checkActivityObjectReplies(o.replies); 596 checkActivityObjectReplies(o.replies);
597 checkActivityObjectResharers(o.resharers); 597 checkActivityObjectResharers(o.resharers);
598 unittest.expect(o.url, unittest.equals('foo')); 598 unittest.expect(o.url, unittest.equals('foo'));
599 } 599 }
600 buildCounterActivityObject--; 600 buildCounterActivityObject--;
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
669 unittest.expect(o.published, unittest.equals(core.DateTime.parse("2002-02-27 T14:01:02"))); 669 unittest.expect(o.published, unittest.equals(core.DateTime.parse("2002-02-27 T14:01:02")));
670 unittest.expect(o.radius, unittest.equals('foo')); 670 unittest.expect(o.radius, unittest.equals('foo'));
671 unittest.expect(o.title, unittest.equals('foo')); 671 unittest.expect(o.title, unittest.equals('foo'));
672 unittest.expect(o.updated, unittest.equals(core.DateTime.parse("2002-02-27T1 4:01:02"))); 672 unittest.expect(o.updated, unittest.equals(core.DateTime.parse("2002-02-27T1 4:01:02")));
673 unittest.expect(o.url, unittest.equals('foo')); 673 unittest.expect(o.url, unittest.equals('foo'));
674 unittest.expect(o.verb, unittest.equals('foo')); 674 unittest.expect(o.verb, unittest.equals('foo'));
675 } 675 }
676 buildCounterActivity--; 676 buildCounterActivity--;
677 } 677 }
678 678
679 buildUnnamed101() { 679 buildUnnamed103() {
680 var o = new core.List<api.Activity>(); 680 var o = new core.List<api.Activity>();
681 o.add(buildActivity()); 681 o.add(buildActivity());
682 o.add(buildActivity()); 682 o.add(buildActivity());
683 return o; 683 return o;
684 } 684 }
685 685
686 checkUnnamed101(core.List<api.Activity> o) { 686 checkUnnamed103(core.List<api.Activity> o) {
687 unittest.expect(o, unittest.hasLength(2)); 687 unittest.expect(o, unittest.hasLength(2));
688 checkActivity(o[0]); 688 checkActivity(o[0]);
689 checkActivity(o[1]); 689 checkActivity(o[1]);
690 } 690 }
691 691
692 core.int buildCounterActivityFeed = 0; 692 core.int buildCounterActivityFeed = 0;
693 buildActivityFeed() { 693 buildActivityFeed() {
694 var o = new api.ActivityFeed(); 694 var o = new api.ActivityFeed();
695 buildCounterActivityFeed++; 695 buildCounterActivityFeed++;
696 if (buildCounterActivityFeed < 3) { 696 if (buildCounterActivityFeed < 3) {
697 o.etag = "foo"; 697 o.etag = "foo";
698 o.id = "foo"; 698 o.id = "foo";
699 o.items = buildUnnamed101(); 699 o.items = buildUnnamed103();
700 o.kind = "foo"; 700 o.kind = "foo";
701 o.nextLink = "foo"; 701 o.nextLink = "foo";
702 o.nextPageToken = "foo"; 702 o.nextPageToken = "foo";
703 o.selfLink = "foo"; 703 o.selfLink = "foo";
704 o.title = "foo"; 704 o.title = "foo";
705 o.updated = core.DateTime.parse("2002-02-27T14:01:02"); 705 o.updated = core.DateTime.parse("2002-02-27T14:01:02");
706 } 706 }
707 buildCounterActivityFeed--; 707 buildCounterActivityFeed--;
708 return o; 708 return o;
709 } 709 }
710 710
711 checkActivityFeed(api.ActivityFeed o) { 711 checkActivityFeed(api.ActivityFeed o) {
712 buildCounterActivityFeed++; 712 buildCounterActivityFeed++;
713 if (buildCounterActivityFeed < 3) { 713 if (buildCounterActivityFeed < 3) {
714 unittest.expect(o.etag, unittest.equals('foo')); 714 unittest.expect(o.etag, unittest.equals('foo'));
715 unittest.expect(o.id, unittest.equals('foo')); 715 unittest.expect(o.id, unittest.equals('foo'));
716 checkUnnamed101(o.items); 716 checkUnnamed103(o.items);
717 unittest.expect(o.kind, unittest.equals('foo')); 717 unittest.expect(o.kind, unittest.equals('foo'));
718 unittest.expect(o.nextLink, unittest.equals('foo')); 718 unittest.expect(o.nextLink, unittest.equals('foo'));
719 unittest.expect(o.nextPageToken, unittest.equals('foo')); 719 unittest.expect(o.nextPageToken, unittest.equals('foo'));
720 unittest.expect(o.selfLink, unittest.equals('foo')); 720 unittest.expect(o.selfLink, unittest.equals('foo'));
721 unittest.expect(o.title, unittest.equals('foo')); 721 unittest.expect(o.title, unittest.equals('foo'));
722 unittest.expect(o.updated, unittest.equals(core.DateTime.parse("2002-02-27T1 4:01:02"))); 722 unittest.expect(o.updated, unittest.equals(core.DateTime.parse("2002-02-27T1 4:01:02")));
723 } 723 }
724 buildCounterActivityFeed--; 724 buildCounterActivityFeed--;
725 } 725 }
726 726
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
843 843
844 checkCommentInReplyTo(api.CommentInReplyTo o) { 844 checkCommentInReplyTo(api.CommentInReplyTo o) {
845 buildCounterCommentInReplyTo++; 845 buildCounterCommentInReplyTo++;
846 if (buildCounterCommentInReplyTo < 3) { 846 if (buildCounterCommentInReplyTo < 3) {
847 unittest.expect(o.id, unittest.equals('foo')); 847 unittest.expect(o.id, unittest.equals('foo'));
848 unittest.expect(o.url, unittest.equals('foo')); 848 unittest.expect(o.url, unittest.equals('foo'));
849 } 849 }
850 buildCounterCommentInReplyTo--; 850 buildCounterCommentInReplyTo--;
851 } 851 }
852 852
853 buildUnnamed102() { 853 buildUnnamed104() {
854 var o = new core.List<api.CommentInReplyTo>(); 854 var o = new core.List<api.CommentInReplyTo>();
855 o.add(buildCommentInReplyTo()); 855 o.add(buildCommentInReplyTo());
856 o.add(buildCommentInReplyTo()); 856 o.add(buildCommentInReplyTo());
857 return o; 857 return o;
858 } 858 }
859 859
860 checkUnnamed102(core.List<api.CommentInReplyTo> o) { 860 checkUnnamed104(core.List<api.CommentInReplyTo> o) {
861 unittest.expect(o, unittest.hasLength(2)); 861 unittest.expect(o, unittest.hasLength(2));
862 checkCommentInReplyTo(o[0]); 862 checkCommentInReplyTo(o[0]);
863 checkCommentInReplyTo(o[1]); 863 checkCommentInReplyTo(o[1]);
864 } 864 }
865 865
866 core.int buildCounterCommentObject = 0; 866 core.int buildCounterCommentObject = 0;
867 buildCommentObject() { 867 buildCommentObject() {
868 var o = new api.CommentObject(); 868 var o = new api.CommentObject();
869 buildCounterCommentObject++; 869 buildCounterCommentObject++;
870 if (buildCounterCommentObject < 3) { 870 if (buildCounterCommentObject < 3) {
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
906 } 906 }
907 907
908 core.int buildCounterComment = 0; 908 core.int buildCounterComment = 0;
909 buildComment() { 909 buildComment() {
910 var o = new api.Comment(); 910 var o = new api.Comment();
911 buildCounterComment++; 911 buildCounterComment++;
912 if (buildCounterComment < 3) { 912 if (buildCounterComment < 3) {
913 o.actor = buildCommentActor(); 913 o.actor = buildCommentActor();
914 o.etag = "foo"; 914 o.etag = "foo";
915 o.id = "foo"; 915 o.id = "foo";
916 o.inReplyTo = buildUnnamed102(); 916 o.inReplyTo = buildUnnamed104();
917 o.kind = "foo"; 917 o.kind = "foo";
918 o.object = buildCommentObject(); 918 o.object = buildCommentObject();
919 o.plusoners = buildCommentPlusoners(); 919 o.plusoners = buildCommentPlusoners();
920 o.published = core.DateTime.parse("2002-02-27T14:01:02"); 920 o.published = core.DateTime.parse("2002-02-27T14:01:02");
921 o.selfLink = "foo"; 921 o.selfLink = "foo";
922 o.updated = core.DateTime.parse("2002-02-27T14:01:02"); 922 o.updated = core.DateTime.parse("2002-02-27T14:01:02");
923 o.verb = "foo"; 923 o.verb = "foo";
924 } 924 }
925 buildCounterComment--; 925 buildCounterComment--;
926 return o; 926 return o;
927 } 927 }
928 928
929 checkComment(api.Comment o) { 929 checkComment(api.Comment o) {
930 buildCounterComment++; 930 buildCounterComment++;
931 if (buildCounterComment < 3) { 931 if (buildCounterComment < 3) {
932 checkCommentActor(o.actor); 932 checkCommentActor(o.actor);
933 unittest.expect(o.etag, unittest.equals('foo')); 933 unittest.expect(o.etag, unittest.equals('foo'));
934 unittest.expect(o.id, unittest.equals('foo')); 934 unittest.expect(o.id, unittest.equals('foo'));
935 checkUnnamed102(o.inReplyTo); 935 checkUnnamed104(o.inReplyTo);
936 unittest.expect(o.kind, unittest.equals('foo')); 936 unittest.expect(o.kind, unittest.equals('foo'));
937 checkCommentObject(o.object); 937 checkCommentObject(o.object);
938 checkCommentPlusoners(o.plusoners); 938 checkCommentPlusoners(o.plusoners);
939 unittest.expect(o.published, unittest.equals(core.DateTime.parse("2002-02-27 T14:01:02"))); 939 unittest.expect(o.published, unittest.equals(core.DateTime.parse("2002-02-27 T14:01:02")));
940 unittest.expect(o.selfLink, unittest.equals('foo')); 940 unittest.expect(o.selfLink, unittest.equals('foo'));
941 unittest.expect(o.updated, unittest.equals(core.DateTime.parse("2002-02-27T1 4:01:02"))); 941 unittest.expect(o.updated, unittest.equals(core.DateTime.parse("2002-02-27T1 4:01:02")));
942 unittest.expect(o.verb, unittest.equals('foo')); 942 unittest.expect(o.verb, unittest.equals('foo'));
943 } 943 }
944 buildCounterComment--; 944 buildCounterComment--;
945 } 945 }
946 946
947 buildUnnamed103() { 947 buildUnnamed105() {
948 var o = new core.List<api.Comment>(); 948 var o = new core.List<api.Comment>();
949 o.add(buildComment()); 949 o.add(buildComment());
950 o.add(buildComment()); 950 o.add(buildComment());
951 return o; 951 return o;
952 } 952 }
953 953
954 checkUnnamed103(core.List<api.Comment> o) { 954 checkUnnamed105(core.List<api.Comment> o) {
955 unittest.expect(o, unittest.hasLength(2)); 955 unittest.expect(o, unittest.hasLength(2));
956 checkComment(o[0]); 956 checkComment(o[0]);
957 checkComment(o[1]); 957 checkComment(o[1]);
958 } 958 }
959 959
960 core.int buildCounterCommentFeed = 0; 960 core.int buildCounterCommentFeed = 0;
961 buildCommentFeed() { 961 buildCommentFeed() {
962 var o = new api.CommentFeed(); 962 var o = new api.CommentFeed();
963 buildCounterCommentFeed++; 963 buildCounterCommentFeed++;
964 if (buildCounterCommentFeed < 3) { 964 if (buildCounterCommentFeed < 3) {
965 o.etag = "foo"; 965 o.etag = "foo";
966 o.id = "foo"; 966 o.id = "foo";
967 o.items = buildUnnamed103(); 967 o.items = buildUnnamed105();
968 o.kind = "foo"; 968 o.kind = "foo";
969 o.nextLink = "foo"; 969 o.nextLink = "foo";
970 o.nextPageToken = "foo"; 970 o.nextPageToken = "foo";
971 o.title = "foo"; 971 o.title = "foo";
972 o.updated = core.DateTime.parse("2002-02-27T14:01:02"); 972 o.updated = core.DateTime.parse("2002-02-27T14:01:02");
973 } 973 }
974 buildCounterCommentFeed--; 974 buildCounterCommentFeed--;
975 return o; 975 return o;
976 } 976 }
977 977
978 checkCommentFeed(api.CommentFeed o) { 978 checkCommentFeed(api.CommentFeed o) {
979 buildCounterCommentFeed++; 979 buildCounterCommentFeed++;
980 if (buildCounterCommentFeed < 3) { 980 if (buildCounterCommentFeed < 3) {
981 unittest.expect(o.etag, unittest.equals('foo')); 981 unittest.expect(o.etag, unittest.equals('foo'));
982 unittest.expect(o.id, unittest.equals('foo')); 982 unittest.expect(o.id, unittest.equals('foo'));
983 checkUnnamed103(o.items); 983 checkUnnamed105(o.items);
984 unittest.expect(o.kind, unittest.equals('foo')); 984 unittest.expect(o.kind, unittest.equals('foo'));
985 unittest.expect(o.nextLink, unittest.equals('foo')); 985 unittest.expect(o.nextLink, unittest.equals('foo'));
986 unittest.expect(o.nextPageToken, unittest.equals('foo')); 986 unittest.expect(o.nextPageToken, unittest.equals('foo'));
987 unittest.expect(o.title, unittest.equals('foo')); 987 unittest.expect(o.title, unittest.equals('foo'));
988 unittest.expect(o.updated, unittest.equals(core.DateTime.parse("2002-02-27T1 4:01:02"))); 988 unittest.expect(o.updated, unittest.equals(core.DateTime.parse("2002-02-27T1 4:01:02")));
989 } 989 }
990 buildCounterCommentFeed--; 990 buildCounterCommentFeed--;
991 } 991 }
992 992
993 buildUnnamed104() { 993 buildUnnamed106() {
994 var o = new core.List<api.Person>(); 994 var o = new core.List<api.Person>();
995 o.add(buildPerson()); 995 o.add(buildPerson());
996 o.add(buildPerson()); 996 o.add(buildPerson());
997 return o; 997 return o;
998 } 998 }
999 999
1000 checkUnnamed104(core.List<api.Person> o) { 1000 checkUnnamed106(core.List<api.Person> o) {
1001 unittest.expect(o, unittest.hasLength(2)); 1001 unittest.expect(o, unittest.hasLength(2));
1002 checkPerson(o[0]); 1002 checkPerson(o[0]);
1003 checkPerson(o[1]); 1003 checkPerson(o[1]);
1004 } 1004 }
1005 1005
1006 core.int buildCounterPeopleFeed = 0; 1006 core.int buildCounterPeopleFeed = 0;
1007 buildPeopleFeed() { 1007 buildPeopleFeed() {
1008 var o = new api.PeopleFeed(); 1008 var o = new api.PeopleFeed();
1009 buildCounterPeopleFeed++; 1009 buildCounterPeopleFeed++;
1010 if (buildCounterPeopleFeed < 3) { 1010 if (buildCounterPeopleFeed < 3) {
1011 o.etag = "foo"; 1011 o.etag = "foo";
1012 o.items = buildUnnamed104(); 1012 o.items = buildUnnamed106();
1013 o.kind = "foo"; 1013 o.kind = "foo";
1014 o.nextPageToken = "foo"; 1014 o.nextPageToken = "foo";
1015 o.selfLink = "foo"; 1015 o.selfLink = "foo";
1016 o.title = "foo"; 1016 o.title = "foo";
1017 o.totalItems = 42; 1017 o.totalItems = 42;
1018 } 1018 }
1019 buildCounterPeopleFeed--; 1019 buildCounterPeopleFeed--;
1020 return o; 1020 return o;
1021 } 1021 }
1022 1022
1023 checkPeopleFeed(api.PeopleFeed o) { 1023 checkPeopleFeed(api.PeopleFeed o) {
1024 buildCounterPeopleFeed++; 1024 buildCounterPeopleFeed++;
1025 if (buildCounterPeopleFeed < 3) { 1025 if (buildCounterPeopleFeed < 3) {
1026 unittest.expect(o.etag, unittest.equals('foo')); 1026 unittest.expect(o.etag, unittest.equals('foo'));
1027 checkUnnamed104(o.items); 1027 checkUnnamed106(o.items);
1028 unittest.expect(o.kind, unittest.equals('foo')); 1028 unittest.expect(o.kind, unittest.equals('foo'));
1029 unittest.expect(o.nextPageToken, unittest.equals('foo')); 1029 unittest.expect(o.nextPageToken, unittest.equals('foo'));
1030 unittest.expect(o.selfLink, unittest.equals('foo')); 1030 unittest.expect(o.selfLink, unittest.equals('foo'));
1031 unittest.expect(o.title, unittest.equals('foo')); 1031 unittest.expect(o.title, unittest.equals('foo'));
1032 unittest.expect(o.totalItems, unittest.equals(42)); 1032 unittest.expect(o.totalItems, unittest.equals(42));
1033 } 1033 }
1034 buildCounterPeopleFeed--; 1034 buildCounterPeopleFeed--;
1035 } 1035 }
1036 1036
1037 core.int buildCounterPersonAgeRange = 0; 1037 core.int buildCounterPersonAgeRange = 0;
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
1136 1136
1137 checkPersonEmails(api.PersonEmails o) { 1137 checkPersonEmails(api.PersonEmails o) {
1138 buildCounterPersonEmails++; 1138 buildCounterPersonEmails++;
1139 if (buildCounterPersonEmails < 3) { 1139 if (buildCounterPersonEmails < 3) {
1140 unittest.expect(o.type, unittest.equals('foo')); 1140 unittest.expect(o.type, unittest.equals('foo'));
1141 unittest.expect(o.value, unittest.equals('foo')); 1141 unittest.expect(o.value, unittest.equals('foo'));
1142 } 1142 }
1143 buildCounterPersonEmails--; 1143 buildCounterPersonEmails--;
1144 } 1144 }
1145 1145
1146 buildUnnamed105() { 1146 buildUnnamed107() {
1147 var o = new core.List<api.PersonEmails>(); 1147 var o = new core.List<api.PersonEmails>();
1148 o.add(buildPersonEmails()); 1148 o.add(buildPersonEmails());
1149 o.add(buildPersonEmails()); 1149 o.add(buildPersonEmails());
1150 return o; 1150 return o;
1151 } 1151 }
1152 1152
1153 checkUnnamed105(core.List<api.PersonEmails> o) { 1153 checkUnnamed107(core.List<api.PersonEmails> o) {
1154 unittest.expect(o, unittest.hasLength(2)); 1154 unittest.expect(o, unittest.hasLength(2));
1155 checkPersonEmails(o[0]); 1155 checkPersonEmails(o[0]);
1156 checkPersonEmails(o[1]); 1156 checkPersonEmails(o[1]);
1157 } 1157 }
1158 1158
1159 core.int buildCounterPersonImage = 0; 1159 core.int buildCounterPersonImage = 0;
1160 buildPersonImage() { 1160 buildPersonImage() {
1161 var o = new api.PersonImage(); 1161 var o = new api.PersonImage();
1162 buildCounterPersonImage++; 1162 buildCounterPersonImage++;
1163 if (buildCounterPersonImage < 3) { 1163 if (buildCounterPersonImage < 3) {
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
1234 unittest.expect(o.location, unittest.equals('foo')); 1234 unittest.expect(o.location, unittest.equals('foo'));
1235 unittest.expect(o.name, unittest.equals('foo')); 1235 unittest.expect(o.name, unittest.equals('foo'));
1236 unittest.expect(o.primary, unittest.isTrue); 1236 unittest.expect(o.primary, unittest.isTrue);
1237 unittest.expect(o.startDate, unittest.equals('foo')); 1237 unittest.expect(o.startDate, unittest.equals('foo'));
1238 unittest.expect(o.title, unittest.equals('foo')); 1238 unittest.expect(o.title, unittest.equals('foo'));
1239 unittest.expect(o.type, unittest.equals('foo')); 1239 unittest.expect(o.type, unittest.equals('foo'));
1240 } 1240 }
1241 buildCounterPersonOrganizations--; 1241 buildCounterPersonOrganizations--;
1242 } 1242 }
1243 1243
1244 buildUnnamed106() { 1244 buildUnnamed108() {
1245 var o = new core.List<api.PersonOrganizations>(); 1245 var o = new core.List<api.PersonOrganizations>();
1246 o.add(buildPersonOrganizations()); 1246 o.add(buildPersonOrganizations());
1247 o.add(buildPersonOrganizations()); 1247 o.add(buildPersonOrganizations());
1248 return o; 1248 return o;
1249 } 1249 }
1250 1250
1251 checkUnnamed106(core.List<api.PersonOrganizations> o) { 1251 checkUnnamed108(core.List<api.PersonOrganizations> o) {
1252 unittest.expect(o, unittest.hasLength(2)); 1252 unittest.expect(o, unittest.hasLength(2));
1253 checkPersonOrganizations(o[0]); 1253 checkPersonOrganizations(o[0]);
1254 checkPersonOrganizations(o[1]); 1254 checkPersonOrganizations(o[1]);
1255 } 1255 }
1256 1256
1257 core.int buildCounterPersonPlacesLived = 0; 1257 core.int buildCounterPersonPlacesLived = 0;
1258 buildPersonPlacesLived() { 1258 buildPersonPlacesLived() {
1259 var o = new api.PersonPlacesLived(); 1259 var o = new api.PersonPlacesLived();
1260 buildCounterPersonPlacesLived++; 1260 buildCounterPersonPlacesLived++;
1261 if (buildCounterPersonPlacesLived < 3) { 1261 if (buildCounterPersonPlacesLived < 3) {
1262 o.primary = true; 1262 o.primary = true;
1263 o.value = "foo"; 1263 o.value = "foo";
1264 } 1264 }
1265 buildCounterPersonPlacesLived--; 1265 buildCounterPersonPlacesLived--;
1266 return o; 1266 return o;
1267 } 1267 }
1268 1268
1269 checkPersonPlacesLived(api.PersonPlacesLived o) { 1269 checkPersonPlacesLived(api.PersonPlacesLived o) {
1270 buildCounterPersonPlacesLived++; 1270 buildCounterPersonPlacesLived++;
1271 if (buildCounterPersonPlacesLived < 3) { 1271 if (buildCounterPersonPlacesLived < 3) {
1272 unittest.expect(o.primary, unittest.isTrue); 1272 unittest.expect(o.primary, unittest.isTrue);
1273 unittest.expect(o.value, unittest.equals('foo')); 1273 unittest.expect(o.value, unittest.equals('foo'));
1274 } 1274 }
1275 buildCounterPersonPlacesLived--; 1275 buildCounterPersonPlacesLived--;
1276 } 1276 }
1277 1277
1278 buildUnnamed107() { 1278 buildUnnamed109() {
1279 var o = new core.List<api.PersonPlacesLived>(); 1279 var o = new core.List<api.PersonPlacesLived>();
1280 o.add(buildPersonPlacesLived()); 1280 o.add(buildPersonPlacesLived());
1281 o.add(buildPersonPlacesLived()); 1281 o.add(buildPersonPlacesLived());
1282 return o; 1282 return o;
1283 } 1283 }
1284 1284
1285 checkUnnamed107(core.List<api.PersonPlacesLived> o) { 1285 checkUnnamed109(core.List<api.PersonPlacesLived> o) {
1286 unittest.expect(o, unittest.hasLength(2)); 1286 unittest.expect(o, unittest.hasLength(2));
1287 checkPersonPlacesLived(o[0]); 1287 checkPersonPlacesLived(o[0]);
1288 checkPersonPlacesLived(o[1]); 1288 checkPersonPlacesLived(o[1]);
1289 } 1289 }
1290 1290
1291 core.int buildCounterPersonUrls = 0; 1291 core.int buildCounterPersonUrls = 0;
1292 buildPersonUrls() { 1292 buildPersonUrls() {
1293 var o = new api.PersonUrls(); 1293 var o = new api.PersonUrls();
1294 buildCounterPersonUrls++; 1294 buildCounterPersonUrls++;
1295 if (buildCounterPersonUrls < 3) { 1295 if (buildCounterPersonUrls < 3) {
1296 o.label = "foo"; 1296 o.label = "foo";
1297 o.type = "foo"; 1297 o.type = "foo";
1298 o.value = "foo"; 1298 o.value = "foo";
1299 } 1299 }
1300 buildCounterPersonUrls--; 1300 buildCounterPersonUrls--;
1301 return o; 1301 return o;
1302 } 1302 }
1303 1303
1304 checkPersonUrls(api.PersonUrls o) { 1304 checkPersonUrls(api.PersonUrls o) {
1305 buildCounterPersonUrls++; 1305 buildCounterPersonUrls++;
1306 if (buildCounterPersonUrls < 3) { 1306 if (buildCounterPersonUrls < 3) {
1307 unittest.expect(o.label, unittest.equals('foo')); 1307 unittest.expect(o.label, unittest.equals('foo'));
1308 unittest.expect(o.type, unittest.equals('foo')); 1308 unittest.expect(o.type, unittest.equals('foo'));
1309 unittest.expect(o.value, unittest.equals('foo')); 1309 unittest.expect(o.value, unittest.equals('foo'));
1310 } 1310 }
1311 buildCounterPersonUrls--; 1311 buildCounterPersonUrls--;
1312 } 1312 }
1313 1313
1314 buildUnnamed108() { 1314 buildUnnamed110() {
1315 var o = new core.List<api.PersonUrls>(); 1315 var o = new core.List<api.PersonUrls>();
1316 o.add(buildPersonUrls()); 1316 o.add(buildPersonUrls());
1317 o.add(buildPersonUrls()); 1317 o.add(buildPersonUrls());
1318 return o; 1318 return o;
1319 } 1319 }
1320 1320
1321 checkUnnamed108(core.List<api.PersonUrls> o) { 1321 checkUnnamed110(core.List<api.PersonUrls> o) {
1322 unittest.expect(o, unittest.hasLength(2)); 1322 unittest.expect(o, unittest.hasLength(2));
1323 checkPersonUrls(o[0]); 1323 checkPersonUrls(o[0]);
1324 checkPersonUrls(o[1]); 1324 checkPersonUrls(o[1]);
1325 } 1325 }
1326 1326
1327 core.int buildCounterPerson = 0; 1327 core.int buildCounterPerson = 0;
1328 buildPerson() { 1328 buildPerson() {
1329 var o = new api.Person(); 1329 var o = new api.Person();
1330 buildCounterPerson++; 1330 buildCounterPerson++;
1331 if (buildCounterPerson < 3) { 1331 if (buildCounterPerson < 3) {
1332 o.aboutMe = "foo"; 1332 o.aboutMe = "foo";
1333 o.ageRange = buildPersonAgeRange(); 1333 o.ageRange = buildPersonAgeRange();
1334 o.birthday = "foo"; 1334 o.birthday = "foo";
1335 o.braggingRights = "foo"; 1335 o.braggingRights = "foo";
1336 o.circledByCount = 42; 1336 o.circledByCount = 42;
1337 o.cover = buildPersonCover(); 1337 o.cover = buildPersonCover();
1338 o.currentLocation = "foo"; 1338 o.currentLocation = "foo";
1339 o.displayName = "foo"; 1339 o.displayName = "foo";
1340 o.domain = "foo"; 1340 o.domain = "foo";
1341 o.emails = buildUnnamed105(); 1341 o.emails = buildUnnamed107();
1342 o.etag = "foo"; 1342 o.etag = "foo";
1343 o.gender = "foo"; 1343 o.gender = "foo";
1344 o.id = "foo"; 1344 o.id = "foo";
1345 o.image = buildPersonImage(); 1345 o.image = buildPersonImage();
1346 o.isPlusUser = true; 1346 o.isPlusUser = true;
1347 o.kind = "foo"; 1347 o.kind = "foo";
1348 o.language = "foo"; 1348 o.language = "foo";
1349 o.name = buildPersonName(); 1349 o.name = buildPersonName();
1350 o.nickname = "foo"; 1350 o.nickname = "foo";
1351 o.objectType = "foo"; 1351 o.objectType = "foo";
1352 o.occupation = "foo"; 1352 o.occupation = "foo";
1353 o.organizations = buildUnnamed106(); 1353 o.organizations = buildUnnamed108();
1354 o.placesLived = buildUnnamed107(); 1354 o.placesLived = buildUnnamed109();
1355 o.plusOneCount = 42; 1355 o.plusOneCount = 42;
1356 o.relationshipStatus = "foo"; 1356 o.relationshipStatus = "foo";
1357 o.skills = "foo"; 1357 o.skills = "foo";
1358 o.tagline = "foo"; 1358 o.tagline = "foo";
1359 o.url = "foo"; 1359 o.url = "foo";
1360 o.urls = buildUnnamed108(); 1360 o.urls = buildUnnamed110();
1361 o.verified = true; 1361 o.verified = true;
1362 } 1362 }
1363 buildCounterPerson--; 1363 buildCounterPerson--;
1364 return o; 1364 return o;
1365 } 1365 }
1366 1366
1367 checkPerson(api.Person o) { 1367 checkPerson(api.Person o) {
1368 buildCounterPerson++; 1368 buildCounterPerson++;
1369 if (buildCounterPerson < 3) { 1369 if (buildCounterPerson < 3) {
1370 unittest.expect(o.aboutMe, unittest.equals('foo')); 1370 unittest.expect(o.aboutMe, unittest.equals('foo'));
1371 checkPersonAgeRange(o.ageRange); 1371 checkPersonAgeRange(o.ageRange);
1372 unittest.expect(o.birthday, unittest.equals('foo')); 1372 unittest.expect(o.birthday, unittest.equals('foo'));
1373 unittest.expect(o.braggingRights, unittest.equals('foo')); 1373 unittest.expect(o.braggingRights, unittest.equals('foo'));
1374 unittest.expect(o.circledByCount, unittest.equals(42)); 1374 unittest.expect(o.circledByCount, unittest.equals(42));
1375 checkPersonCover(o.cover); 1375 checkPersonCover(o.cover);
1376 unittest.expect(o.currentLocation, unittest.equals('foo')); 1376 unittest.expect(o.currentLocation, unittest.equals('foo'));
1377 unittest.expect(o.displayName, unittest.equals('foo')); 1377 unittest.expect(o.displayName, unittest.equals('foo'));
1378 unittest.expect(o.domain, unittest.equals('foo')); 1378 unittest.expect(o.domain, unittest.equals('foo'));
1379 checkUnnamed105(o.emails); 1379 checkUnnamed107(o.emails);
1380 unittest.expect(o.etag, unittest.equals('foo')); 1380 unittest.expect(o.etag, unittest.equals('foo'));
1381 unittest.expect(o.gender, unittest.equals('foo')); 1381 unittest.expect(o.gender, unittest.equals('foo'));
1382 unittest.expect(o.id, unittest.equals('foo')); 1382 unittest.expect(o.id, unittest.equals('foo'));
1383 checkPersonImage(o.image); 1383 checkPersonImage(o.image);
1384 unittest.expect(o.isPlusUser, unittest.isTrue); 1384 unittest.expect(o.isPlusUser, unittest.isTrue);
1385 unittest.expect(o.kind, unittest.equals('foo')); 1385 unittest.expect(o.kind, unittest.equals('foo'));
1386 unittest.expect(o.language, unittest.equals('foo')); 1386 unittest.expect(o.language, unittest.equals('foo'));
1387 checkPersonName(o.name); 1387 checkPersonName(o.name);
1388 unittest.expect(o.nickname, unittest.equals('foo')); 1388 unittest.expect(o.nickname, unittest.equals('foo'));
1389 unittest.expect(o.objectType, unittest.equals('foo')); 1389 unittest.expect(o.objectType, unittest.equals('foo'));
1390 unittest.expect(o.occupation, unittest.equals('foo')); 1390 unittest.expect(o.occupation, unittest.equals('foo'));
1391 checkUnnamed106(o.organizations); 1391 checkUnnamed108(o.organizations);
1392 checkUnnamed107(o.placesLived); 1392 checkUnnamed109(o.placesLived);
1393 unittest.expect(o.plusOneCount, unittest.equals(42)); 1393 unittest.expect(o.plusOneCount, unittest.equals(42));
1394 unittest.expect(o.relationshipStatus, unittest.equals('foo')); 1394 unittest.expect(o.relationshipStatus, unittest.equals('foo'));
1395 unittest.expect(o.skills, unittest.equals('foo')); 1395 unittest.expect(o.skills, unittest.equals('foo'));
1396 unittest.expect(o.tagline, unittest.equals('foo')); 1396 unittest.expect(o.tagline, unittest.equals('foo'));
1397 unittest.expect(o.url, unittest.equals('foo')); 1397 unittest.expect(o.url, unittest.equals('foo'));
1398 checkUnnamed108(o.urls); 1398 checkUnnamed110(o.urls);
1399 unittest.expect(o.verified, unittest.isTrue); 1399 unittest.expect(o.verified, unittest.isTrue);
1400 } 1400 }
1401 buildCounterPerson--; 1401 buildCounterPerson--;
1402 } 1402 }
1403 1403
1404 core.int buildCounterPlaceAddress = 0; 1404 core.int buildCounterPlaceAddress = 0;
1405 buildPlaceAddress() { 1405 buildPlaceAddress() {
1406 var o = new api.PlaceAddress(); 1406 var o = new api.PlaceAddress();
1407 buildCounterPlaceAddress++; 1407 buildCounterPlaceAddress++;
1408 if (buildCounterPlaceAddress < 3) { 1408 if (buildCounterPlaceAddress < 3) {
(...skipping 542 matching lines...) Expand 10 before | Expand all | Expand 10 after
1951 }); 1951 });
1952 }); 1952 });
1953 1953
1954 1954
1955 unittest.group("resource-ActivitiesResourceApi", () { 1955 unittest.group("resource-ActivitiesResourceApi", () {
1956 unittest.test("method--get", () { 1956 unittest.test("method--get", () {
1957 1957
1958 var mock = new HttpServerMock(); 1958 var mock = new HttpServerMock();
1959 api.ActivitiesResourceApi res = new api.PlusApi(mock).activities; 1959 api.ActivitiesResourceApi res = new api.PlusApi(mock).activities;
1960 var arg_activityId = "foo"; 1960 var arg_activityId = "foo";
1961 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 1961 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
1962 var path = (req.url).path; 1962 var path = (req.url).path;
1963 var pathOffset = 0; 1963 var pathOffset = 0;
1964 var index; 1964 var index;
1965 var subPart; 1965 var subPart;
1966 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 1966 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
1967 pathOffset += 1; 1967 pathOffset += 1;
1968 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ als("plus/v1/")); 1968 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ als("plus/v1/"));
1969 pathOffset += 8; 1969 pathOffset += 8;
1970 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq uals("activities/")); 1970 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq uals("activities/"));
1971 pathOffset += 11; 1971 pathOffset += 11;
(...skipping 18 matching lines...) Expand all
1990 } 1990 }
1991 } 1991 }
1992 1992
1993 1993
1994 var h = { 1994 var h = {
1995 "content-type" : "application/json; charset=utf-8", 1995 "content-type" : "application/json; charset=utf-8",
1996 }; 1996 };
1997 var resp = convert.JSON.encode(buildActivity()); 1997 var resp = convert.JSON.encode(buildActivity());
1998 return new async.Future.value(stringResponse(200, h, resp)); 1998 return new async.Future.value(stringResponse(200, h, resp));
1999 }), true); 1999 }), true);
2000 res.get(arg_activityId).then(unittest.expectAsync(((api.Activity response) { 2000 res.get(arg_activityId).then(unittest.expectAsync1(((api.Activity response ) {
2001 checkActivity(response); 2001 checkActivity(response);
2002 }))); 2002 })));
2003 }); 2003 });
2004 2004
2005 unittest.test("method--list", () { 2005 unittest.test("method--list", () {
2006 2006
2007 var mock = new HttpServerMock(); 2007 var mock = new HttpServerMock();
2008 api.ActivitiesResourceApi res = new api.PlusApi(mock).activities; 2008 api.ActivitiesResourceApi res = new api.PlusApi(mock).activities;
2009 var arg_userId = "foo"; 2009 var arg_userId = "foo";
2010 var arg_collection = "foo"; 2010 var arg_collection = "foo";
2011 var arg_maxResults = 42; 2011 var arg_maxResults = 42;
2012 var arg_pageToken = "foo"; 2012 var arg_pageToken = "foo";
2013 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 2013 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
2014 var path = (req.url).path; 2014 var path = (req.url).path;
2015 var pathOffset = 0; 2015 var pathOffset = 0;
2016 var index; 2016 var index;
2017 var subPart; 2017 var subPart;
2018 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 2018 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
2019 pathOffset += 1; 2019 pathOffset += 1;
2020 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ als("plus/v1/")); 2020 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ als("plus/v1/"));
2021 pathOffset += 8; 2021 pathOffset += 8;
2022 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ als("people/")); 2022 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ als("people/"));
2023 pathOffset += 7; 2023 pathOffset += 7;
(...skipping 27 matching lines...) Expand all
2051 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e quals(arg_maxResults)); 2051 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e quals(arg_maxResults));
2052 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en)); 2052 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en));
2053 2053
2054 2054
2055 var h = { 2055 var h = {
2056 "content-type" : "application/json; charset=utf-8", 2056 "content-type" : "application/json; charset=utf-8",
2057 }; 2057 };
2058 var resp = convert.JSON.encode(buildActivityFeed()); 2058 var resp = convert.JSON.encode(buildActivityFeed());
2059 return new async.Future.value(stringResponse(200, h, resp)); 2059 return new async.Future.value(stringResponse(200, h, resp));
2060 }), true); 2060 }), true);
2061 res.list(arg_userId, arg_collection, maxResults: arg_maxResults, pageToken : arg_pageToken).then(unittest.expectAsync(((api.ActivityFeed response) { 2061 res.list(arg_userId, arg_collection, maxResults: arg_maxResults, pageToken : arg_pageToken).then(unittest.expectAsync1(((api.ActivityFeed response) {
2062 checkActivityFeed(response); 2062 checkActivityFeed(response);
2063 }))); 2063 })));
2064 }); 2064 });
2065 2065
2066 unittest.test("method--search", () { 2066 unittest.test("method--search", () {
2067 2067
2068 var mock = new HttpServerMock(); 2068 var mock = new HttpServerMock();
2069 api.ActivitiesResourceApi res = new api.PlusApi(mock).activities; 2069 api.ActivitiesResourceApi res = new api.PlusApi(mock).activities;
2070 var arg_query = "foo"; 2070 var arg_query = "foo";
2071 var arg_language = "foo"; 2071 var arg_language = "foo";
2072 var arg_maxResults = 42; 2072 var arg_maxResults = 42;
2073 var arg_orderBy = "foo"; 2073 var arg_orderBy = "foo";
2074 var arg_pageToken = "foo"; 2074 var arg_pageToken = "foo";
2075 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 2075 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
2076 var path = (req.url).path; 2076 var path = (req.url).path;
2077 var pathOffset = 0; 2077 var pathOffset = 0;
2078 var index; 2078 var index;
2079 var subPart; 2079 var subPart;
2080 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 2080 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
2081 pathOffset += 1; 2081 pathOffset += 1;
2082 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ als("plus/v1/")); 2082 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ als("plus/v1/"));
2083 pathOffset += 8; 2083 pathOffset += 8;
2084 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq uals("activities")); 2084 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq uals("activities"));
2085 pathOffset += 10; 2085 pathOffset += 10;
(...skipping 20 matching lines...) Expand all
2106 unittest.expect(queryMap["orderBy"].first, unittest.equals(arg_orderBy)) ; 2106 unittest.expect(queryMap["orderBy"].first, unittest.equals(arg_orderBy)) ;
2107 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en)); 2107 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en));
2108 2108
2109 2109
2110 var h = { 2110 var h = {
2111 "content-type" : "application/json; charset=utf-8", 2111 "content-type" : "application/json; charset=utf-8",
2112 }; 2112 };
2113 var resp = convert.JSON.encode(buildActivityFeed()); 2113 var resp = convert.JSON.encode(buildActivityFeed());
2114 return new async.Future.value(stringResponse(200, h, resp)); 2114 return new async.Future.value(stringResponse(200, h, resp));
2115 }), true); 2115 }), true);
2116 res.search(arg_query, language: arg_language, maxResults: arg_maxResults, orderBy: arg_orderBy, pageToken: arg_pageToken).then(unittest.expectAsync(((api. ActivityFeed response) { 2116 res.search(arg_query, language: arg_language, maxResults: arg_maxResults, orderBy: arg_orderBy, pageToken: arg_pageToken).then(unittest.expectAsync1(((api .ActivityFeed response) {
2117 checkActivityFeed(response); 2117 checkActivityFeed(response);
2118 }))); 2118 })));
2119 }); 2119 });
2120 2120
2121 }); 2121 });
2122 2122
2123 2123
2124 unittest.group("resource-CommentsResourceApi", () { 2124 unittest.group("resource-CommentsResourceApi", () {
2125 unittest.test("method--get", () { 2125 unittest.test("method--get", () {
2126 2126
2127 var mock = new HttpServerMock(); 2127 var mock = new HttpServerMock();
2128 api.CommentsResourceApi res = new api.PlusApi(mock).comments; 2128 api.CommentsResourceApi res = new api.PlusApi(mock).comments;
2129 var arg_commentId = "foo"; 2129 var arg_commentId = "foo";
2130 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 2130 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
2131 var path = (req.url).path; 2131 var path = (req.url).path;
2132 var pathOffset = 0; 2132 var pathOffset = 0;
2133 var index; 2133 var index;
2134 var subPart; 2134 var subPart;
2135 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 2135 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
2136 pathOffset += 1; 2136 pathOffset += 1;
2137 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ als("plus/v1/")); 2137 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ als("plus/v1/"));
2138 pathOffset += 8; 2138 pathOffset += 8;
2139 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("comments/")); 2139 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("comments/"));
2140 pathOffset += 9; 2140 pathOffset += 9;
(...skipping 18 matching lines...) Expand all
2159 } 2159 }
2160 } 2160 }
2161 2161
2162 2162
2163 var h = { 2163 var h = {
2164 "content-type" : "application/json; charset=utf-8", 2164 "content-type" : "application/json; charset=utf-8",
2165 }; 2165 };
2166 var resp = convert.JSON.encode(buildComment()); 2166 var resp = convert.JSON.encode(buildComment());
2167 return new async.Future.value(stringResponse(200, h, resp)); 2167 return new async.Future.value(stringResponse(200, h, resp));
2168 }), true); 2168 }), true);
2169 res.get(arg_commentId).then(unittest.expectAsync(((api.Comment response) { 2169 res.get(arg_commentId).then(unittest.expectAsync1(((api.Comment response) {
2170 checkComment(response); 2170 checkComment(response);
2171 }))); 2171 })));
2172 }); 2172 });
2173 2173
2174 unittest.test("method--list", () { 2174 unittest.test("method--list", () {
2175 2175
2176 var mock = new HttpServerMock(); 2176 var mock = new HttpServerMock();
2177 api.CommentsResourceApi res = new api.PlusApi(mock).comments; 2177 api.CommentsResourceApi res = new api.PlusApi(mock).comments;
2178 var arg_activityId = "foo"; 2178 var arg_activityId = "foo";
2179 var arg_maxResults = 42; 2179 var arg_maxResults = 42;
2180 var arg_pageToken = "foo"; 2180 var arg_pageToken = "foo";
2181 var arg_sortOrder = "foo"; 2181 var arg_sortOrder = "foo";
2182 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 2182 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
2183 var path = (req.url).path; 2183 var path = (req.url).path;
2184 var pathOffset = 0; 2184 var pathOffset = 0;
2185 var index; 2185 var index;
2186 var subPart; 2186 var subPart;
2187 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 2187 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
2188 pathOffset += 1; 2188 pathOffset += 1;
2189 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ als("plus/v1/")); 2189 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ als("plus/v1/"));
2190 pathOffset += 8; 2190 pathOffset += 8;
2191 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq uals("activities/")); 2191 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq uals("activities/"));
2192 pathOffset += 11; 2192 pathOffset += 11;
(...skipping 25 matching lines...) Expand all
2218 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en)); 2218 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en));
2219 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd er)); 2219 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd er));
2220 2220
2221 2221
2222 var h = { 2222 var h = {
2223 "content-type" : "application/json; charset=utf-8", 2223 "content-type" : "application/json; charset=utf-8",
2224 }; 2224 };
2225 var resp = convert.JSON.encode(buildCommentFeed()); 2225 var resp = convert.JSON.encode(buildCommentFeed());
2226 return new async.Future.value(stringResponse(200, h, resp)); 2226 return new async.Future.value(stringResponse(200, h, resp));
2227 }), true); 2227 }), true);
2228 res.list(arg_activityId, maxResults: arg_maxResults, pageToken: arg_pageTo ken, sortOrder: arg_sortOrder).then(unittest.expectAsync(((api.CommentFeed respo nse) { 2228 res.list(arg_activityId, maxResults: arg_maxResults, pageToken: arg_pageTo ken, sortOrder: arg_sortOrder).then(unittest.expectAsync1(((api.CommentFeed resp onse) {
2229 checkCommentFeed(response); 2229 checkCommentFeed(response);
2230 }))); 2230 })));
2231 }); 2231 });
2232 2232
2233 }); 2233 });
2234 2234
2235 2235
2236 unittest.group("resource-PeopleResourceApi", () { 2236 unittest.group("resource-PeopleResourceApi", () {
2237 unittest.test("method--get", () { 2237 unittest.test("method--get", () {
2238 2238
2239 var mock = new HttpServerMock(); 2239 var mock = new HttpServerMock();
2240 api.PeopleResourceApi res = new api.PlusApi(mock).people; 2240 api.PeopleResourceApi res = new api.PlusApi(mock).people;
2241 var arg_userId = "foo"; 2241 var arg_userId = "foo";
2242 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 2242 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
2243 var path = (req.url).path; 2243 var path = (req.url).path;
2244 var pathOffset = 0; 2244 var pathOffset = 0;
2245 var index; 2245 var index;
2246 var subPart; 2246 var subPart;
2247 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 2247 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
2248 pathOffset += 1; 2248 pathOffset += 1;
2249 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ als("plus/v1/")); 2249 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ als("plus/v1/"));
2250 pathOffset += 8; 2250 pathOffset += 8;
2251 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ als("people/")); 2251 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ als("people/"));
2252 pathOffset += 7; 2252 pathOffset += 7;
(...skipping 18 matching lines...) Expand all
2271 } 2271 }
2272 } 2272 }
2273 2273
2274 2274
2275 var h = { 2275 var h = {
2276 "content-type" : "application/json; charset=utf-8", 2276 "content-type" : "application/json; charset=utf-8",
2277 }; 2277 };
2278 var resp = convert.JSON.encode(buildPerson()); 2278 var resp = convert.JSON.encode(buildPerson());
2279 return new async.Future.value(stringResponse(200, h, resp)); 2279 return new async.Future.value(stringResponse(200, h, resp));
2280 }), true); 2280 }), true);
2281 res.get(arg_userId).then(unittest.expectAsync(((api.Person response) { 2281 res.get(arg_userId).then(unittest.expectAsync1(((api.Person response) {
2282 checkPerson(response); 2282 checkPerson(response);
2283 }))); 2283 })));
2284 }); 2284 });
2285 2285
2286 unittest.test("method--list", () { 2286 unittest.test("method--list", () {
2287 2287
2288 var mock = new HttpServerMock(); 2288 var mock = new HttpServerMock();
2289 api.PeopleResourceApi res = new api.PlusApi(mock).people; 2289 api.PeopleResourceApi res = new api.PlusApi(mock).people;
2290 var arg_userId = "foo"; 2290 var arg_userId = "foo";
2291 var arg_collection = "foo"; 2291 var arg_collection = "foo";
2292 var arg_maxResults = 42; 2292 var arg_maxResults = 42;
2293 var arg_orderBy = "foo"; 2293 var arg_orderBy = "foo";
2294 var arg_pageToken = "foo"; 2294 var arg_pageToken = "foo";
2295 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 2295 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
2296 var path = (req.url).path; 2296 var path = (req.url).path;
2297 var pathOffset = 0; 2297 var pathOffset = 0;
2298 var index; 2298 var index;
2299 var subPart; 2299 var subPart;
2300 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 2300 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
2301 pathOffset += 1; 2301 pathOffset += 1;
2302 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ als("plus/v1/")); 2302 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ als("plus/v1/"));
2303 pathOffset += 8; 2303 pathOffset += 8;
2304 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ als("people/")); 2304 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ als("people/"));
2305 pathOffset += 7; 2305 pathOffset += 7;
(...skipping 28 matching lines...) Expand all
2334 unittest.expect(queryMap["orderBy"].first, unittest.equals(arg_orderBy)) ; 2334 unittest.expect(queryMap["orderBy"].first, unittest.equals(arg_orderBy)) ;
2335 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en)); 2335 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en));
2336 2336
2337 2337
2338 var h = { 2338 var h = {
2339 "content-type" : "application/json; charset=utf-8", 2339 "content-type" : "application/json; charset=utf-8",
2340 }; 2340 };
2341 var resp = convert.JSON.encode(buildPeopleFeed()); 2341 var resp = convert.JSON.encode(buildPeopleFeed());
2342 return new async.Future.value(stringResponse(200, h, resp)); 2342 return new async.Future.value(stringResponse(200, h, resp));
2343 }), true); 2343 }), true);
2344 res.list(arg_userId, arg_collection, maxResults: arg_maxResults, orderBy: arg_orderBy, pageToken: arg_pageToken).then(unittest.expectAsync(((api.PeopleFee d response) { 2344 res.list(arg_userId, arg_collection, maxResults: arg_maxResults, orderBy: arg_orderBy, pageToken: arg_pageToken).then(unittest.expectAsync1(((api.PeopleFe ed response) {
2345 checkPeopleFeed(response); 2345 checkPeopleFeed(response);
2346 }))); 2346 })));
2347 }); 2347 });
2348 2348
2349 unittest.test("method--listByActivity", () { 2349 unittest.test("method--listByActivity", () {
2350 2350
2351 var mock = new HttpServerMock(); 2351 var mock = new HttpServerMock();
2352 api.PeopleResourceApi res = new api.PlusApi(mock).people; 2352 api.PeopleResourceApi res = new api.PlusApi(mock).people;
2353 var arg_activityId = "foo"; 2353 var arg_activityId = "foo";
2354 var arg_collection = "foo"; 2354 var arg_collection = "foo";
2355 var arg_maxResults = 42; 2355 var arg_maxResults = 42;
2356 var arg_pageToken = "foo"; 2356 var arg_pageToken = "foo";
2357 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 2357 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
2358 var path = (req.url).path; 2358 var path = (req.url).path;
2359 var pathOffset = 0; 2359 var pathOffset = 0;
2360 var index; 2360 var index;
2361 var subPart; 2361 var subPart;
2362 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 2362 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
2363 pathOffset += 1; 2363 pathOffset += 1;
2364 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ als("plus/v1/")); 2364 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ als("plus/v1/"));
2365 pathOffset += 8; 2365 pathOffset += 8;
2366 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq uals("activities/")); 2366 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq uals("activities/"));
2367 pathOffset += 11; 2367 pathOffset += 11;
(...skipping 27 matching lines...) Expand all
2395 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e quals(arg_maxResults)); 2395 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e quals(arg_maxResults));
2396 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en)); 2396 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en));
2397 2397
2398 2398
2399 var h = { 2399 var h = {
2400 "content-type" : "application/json; charset=utf-8", 2400 "content-type" : "application/json; charset=utf-8",
2401 }; 2401 };
2402 var resp = convert.JSON.encode(buildPeopleFeed()); 2402 var resp = convert.JSON.encode(buildPeopleFeed());
2403 return new async.Future.value(stringResponse(200, h, resp)); 2403 return new async.Future.value(stringResponse(200, h, resp));
2404 }), true); 2404 }), true);
2405 res.listByActivity(arg_activityId, arg_collection, maxResults: arg_maxResu lts, pageToken: arg_pageToken).then(unittest.expectAsync(((api.PeopleFeed respon se) { 2405 res.listByActivity(arg_activityId, arg_collection, maxResults: arg_maxResu lts, pageToken: arg_pageToken).then(unittest.expectAsync1(((api.PeopleFeed respo nse) {
2406 checkPeopleFeed(response); 2406 checkPeopleFeed(response);
2407 }))); 2407 })));
2408 }); 2408 });
2409 2409
2410 unittest.test("method--search", () { 2410 unittest.test("method--search", () {
2411 2411
2412 var mock = new HttpServerMock(); 2412 var mock = new HttpServerMock();
2413 api.PeopleResourceApi res = new api.PlusApi(mock).people; 2413 api.PeopleResourceApi res = new api.PlusApi(mock).people;
2414 var arg_query = "foo"; 2414 var arg_query = "foo";
2415 var arg_language = "foo"; 2415 var arg_language = "foo";
2416 var arg_maxResults = 42; 2416 var arg_maxResults = 42;
2417 var arg_pageToken = "foo"; 2417 var arg_pageToken = "foo";
2418 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 2418 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
2419 var path = (req.url).path; 2419 var path = (req.url).path;
2420 var pathOffset = 0; 2420 var pathOffset = 0;
2421 var index; 2421 var index;
2422 var subPart; 2422 var subPart;
2423 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 2423 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
2424 pathOffset += 1; 2424 pathOffset += 1;
2425 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ als("plus/v1/")); 2425 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ als("plus/v1/"));
2426 pathOffset += 8; 2426 pathOffset += 8;
2427 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ als("people")); 2427 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ als("people"));
2428 pathOffset += 6; 2428 pathOffset += 6;
(...skipping 19 matching lines...) Expand all
2448 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e quals(arg_maxResults)); 2448 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e quals(arg_maxResults));
2449 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en)); 2449 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en));
2450 2450
2451 2451
2452 var h = { 2452 var h = {
2453 "content-type" : "application/json; charset=utf-8", 2453 "content-type" : "application/json; charset=utf-8",
2454 }; 2454 };
2455 var resp = convert.JSON.encode(buildPeopleFeed()); 2455 var resp = convert.JSON.encode(buildPeopleFeed());
2456 return new async.Future.value(stringResponse(200, h, resp)); 2456 return new async.Future.value(stringResponse(200, h, resp));
2457 }), true); 2457 }), true);
2458 res.search(arg_query, language: arg_language, maxResults: arg_maxResults, pageToken: arg_pageToken).then(unittest.expectAsync(((api.PeopleFeed response) { 2458 res.search(arg_query, language: arg_language, maxResults: arg_maxResults, pageToken: arg_pageToken).then(unittest.expectAsync1(((api.PeopleFeed response) {
2459 checkPeopleFeed(response); 2459 checkPeopleFeed(response);
2460 }))); 2460 })));
2461 }); 2461 });
2462 2462
2463 }); 2463 });
2464 2464
2465 2465
2466 } 2466 }
2467 2467
OLDNEW
« no previous file with comments | « generated/googleapis/test/oauth2/v2_test.dart ('k') | generated/googleapis/test/prediction/v1_6_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698