OLD | NEW |
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:unittest/unittest.dart' as unittest; |
11 import 'package:googleapis/common/common.dart' as common; | |
12 import 'package:googleapis/src/common_internal.dart' as common_internal; | |
13 import '../common/common_internal_test.dart' as common_test; | |
14 | 11 |
15 import 'package:googleapis/plus/v1.dart' as api; | 12 import 'package:googleapis/plus/v1.dart' as api; |
16 | 13 |
| 14 class HttpServerMock extends http.BaseClient { |
| 15 core.Function _callback; |
| 16 core.bool _expectJson; |
17 | 17 |
| 18 void register(core.Function callback, core.bool expectJson) { |
| 19 _callback = callback; |
| 20 _expectJson = expectJson; |
| 21 } |
18 | 22 |
19 buildUnnamed144() { | 23 async.Future<http.StreamedResponse> send(http.BaseRequest request) { |
| 24 if (_expectJson) { |
| 25 return request.finalize() |
| 26 .transform(convert.UTF8.decoder) |
| 27 .join('') |
| 28 .then((core.String jsonString) { |
| 29 if (jsonString.isEmpty) { |
| 30 return _callback(request, null); |
| 31 } else { |
| 32 return _callback(request, convert.JSON.decode(jsonString)); |
| 33 } |
| 34 }); |
| 35 } else { |
| 36 var stream = request.finalize(); |
| 37 if (stream == null) { |
| 38 return _callback(request, []); |
| 39 } else { |
| 40 return stream.toBytes().then((data) { |
| 41 return _callback(request, data); |
| 42 }); |
| 43 } |
| 44 } |
| 45 } |
| 46 } |
| 47 |
| 48 http.StreamedResponse stringResponse( |
| 49 core.int status, core.Map headers, core.String body) { |
| 50 var stream = new async.Stream.fromIterable([convert.UTF8.encode(body)]); |
| 51 return new http.StreamedResponse(stream, status, headers: headers); |
| 52 } |
| 53 |
| 54 buildUnnamed1254() { |
20 var o = new core.List<api.PlusAclentryResource>(); | 55 var o = new core.List<api.PlusAclentryResource>(); |
21 o.add(buildPlusAclentryResource()); | 56 o.add(buildPlusAclentryResource()); |
22 o.add(buildPlusAclentryResource()); | 57 o.add(buildPlusAclentryResource()); |
23 return o; | 58 return o; |
24 } | 59 } |
25 | 60 |
26 checkUnnamed144(core.List<api.PlusAclentryResource> o) { | 61 checkUnnamed1254(core.List<api.PlusAclentryResource> o) { |
27 unittest.expect(o, unittest.hasLength(2)); | 62 unittest.expect(o, unittest.hasLength(2)); |
28 checkPlusAclentryResource(o[0]); | 63 checkPlusAclentryResource(o[0]); |
29 checkPlusAclentryResource(o[1]); | 64 checkPlusAclentryResource(o[1]); |
30 } | 65 } |
31 | 66 |
32 core.int buildCounterAcl = 0; | 67 core.int buildCounterAcl = 0; |
33 buildAcl() { | 68 buildAcl() { |
34 var o = new api.Acl(); | 69 var o = new api.Acl(); |
35 buildCounterAcl++; | 70 buildCounterAcl++; |
36 if (buildCounterAcl < 3) { | 71 if (buildCounterAcl < 3) { |
37 o.description = "foo"; | 72 o.description = "foo"; |
38 o.items = buildUnnamed144(); | 73 o.items = buildUnnamed1254(); |
39 o.kind = "foo"; | 74 o.kind = "foo"; |
40 } | 75 } |
41 buildCounterAcl--; | 76 buildCounterAcl--; |
42 return o; | 77 return o; |
43 } | 78 } |
44 | 79 |
45 checkAcl(api.Acl o) { | 80 checkAcl(api.Acl o) { |
46 buildCounterAcl++; | 81 buildCounterAcl++; |
47 if (buildCounterAcl < 3) { | 82 if (buildCounterAcl < 3) { |
48 unittest.expect(o.description, unittest.equals('foo')); | 83 unittest.expect(o.description, unittest.equals('foo')); |
49 checkUnnamed144(o.items); | 84 checkUnnamed1254(o.items); |
50 unittest.expect(o.kind, unittest.equals('foo')); | 85 unittest.expect(o.kind, unittest.equals('foo')); |
51 } | 86 } |
52 buildCounterAcl--; | 87 buildCounterAcl--; |
53 } | 88 } |
54 | 89 |
55 core.int buildCounterActivityActorImage = 0; | 90 core.int buildCounterActivityActorImage = 0; |
56 buildActivityActorImage() { | 91 buildActivityActorImage() { |
57 var o = new api.ActivityActorImage(); | 92 var o = new api.ActivityActorImage(); |
58 buildCounterActivityActorImage++; | 93 buildCounterActivityActorImage++; |
59 if (buildCounterActivityActorImage < 3) { | 94 if (buildCounterActivityActorImage < 3) { |
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
275 checkActivityObjectAttachmentsThumbnails(api.ActivityObjectAttachmentsThumbnails
o) { | 310 checkActivityObjectAttachmentsThumbnails(api.ActivityObjectAttachmentsThumbnails
o) { |
276 buildCounterActivityObjectAttachmentsThumbnails++; | 311 buildCounterActivityObjectAttachmentsThumbnails++; |
277 if (buildCounterActivityObjectAttachmentsThumbnails < 3) { | 312 if (buildCounterActivityObjectAttachmentsThumbnails < 3) { |
278 unittest.expect(o.description, unittest.equals('foo')); | 313 unittest.expect(o.description, unittest.equals('foo')); |
279 checkActivityObjectAttachmentsThumbnailsImage(o.image); | 314 checkActivityObjectAttachmentsThumbnailsImage(o.image); |
280 unittest.expect(o.url, unittest.equals('foo')); | 315 unittest.expect(o.url, unittest.equals('foo')); |
281 } | 316 } |
282 buildCounterActivityObjectAttachmentsThumbnails--; | 317 buildCounterActivityObjectAttachmentsThumbnails--; |
283 } | 318 } |
284 | 319 |
285 buildUnnamed145() { | 320 buildUnnamed1255() { |
286 var o = new core.List<api.ActivityObjectAttachmentsThumbnails>(); | 321 var o = new core.List<api.ActivityObjectAttachmentsThumbnails>(); |
287 o.add(buildActivityObjectAttachmentsThumbnails()); | 322 o.add(buildActivityObjectAttachmentsThumbnails()); |
288 o.add(buildActivityObjectAttachmentsThumbnails()); | 323 o.add(buildActivityObjectAttachmentsThumbnails()); |
289 return o; | 324 return o; |
290 } | 325 } |
291 | 326 |
292 checkUnnamed145(core.List<api.ActivityObjectAttachmentsThumbnails> o) { | 327 checkUnnamed1255(core.List<api.ActivityObjectAttachmentsThumbnails> o) { |
293 unittest.expect(o, unittest.hasLength(2)); | 328 unittest.expect(o, unittest.hasLength(2)); |
294 checkActivityObjectAttachmentsThumbnails(o[0]); | 329 checkActivityObjectAttachmentsThumbnails(o[0]); |
295 checkActivityObjectAttachmentsThumbnails(o[1]); | 330 checkActivityObjectAttachmentsThumbnails(o[1]); |
296 } | 331 } |
297 | 332 |
298 core.int buildCounterActivityObjectAttachments = 0; | 333 core.int buildCounterActivityObjectAttachments = 0; |
299 buildActivityObjectAttachments() { | 334 buildActivityObjectAttachments() { |
300 var o = new api.ActivityObjectAttachments(); | 335 var o = new api.ActivityObjectAttachments(); |
301 buildCounterActivityObjectAttachments++; | 336 buildCounterActivityObjectAttachments++; |
302 if (buildCounterActivityObjectAttachments < 3) { | 337 if (buildCounterActivityObjectAttachments < 3) { |
303 o.content = "foo"; | 338 o.content = "foo"; |
304 o.displayName = "foo"; | 339 o.displayName = "foo"; |
305 o.embed = buildActivityObjectAttachmentsEmbed(); | 340 o.embed = buildActivityObjectAttachmentsEmbed(); |
306 o.fullImage = buildActivityObjectAttachmentsFullImage(); | 341 o.fullImage = buildActivityObjectAttachmentsFullImage(); |
307 o.id = "foo"; | 342 o.id = "foo"; |
308 o.image = buildActivityObjectAttachmentsImage(); | 343 o.image = buildActivityObjectAttachmentsImage(); |
309 o.objectType = "foo"; | 344 o.objectType = "foo"; |
310 o.thumbnails = buildUnnamed145(); | 345 o.thumbnails = buildUnnamed1255(); |
311 o.url = "foo"; | 346 o.url = "foo"; |
312 } | 347 } |
313 buildCounterActivityObjectAttachments--; | 348 buildCounterActivityObjectAttachments--; |
314 return o; | 349 return o; |
315 } | 350 } |
316 | 351 |
317 checkActivityObjectAttachments(api.ActivityObjectAttachments o) { | 352 checkActivityObjectAttachments(api.ActivityObjectAttachments o) { |
318 buildCounterActivityObjectAttachments++; | 353 buildCounterActivityObjectAttachments++; |
319 if (buildCounterActivityObjectAttachments < 3) { | 354 if (buildCounterActivityObjectAttachments < 3) { |
320 unittest.expect(o.content, unittest.equals('foo')); | 355 unittest.expect(o.content, unittest.equals('foo')); |
321 unittest.expect(o.displayName, unittest.equals('foo')); | 356 unittest.expect(o.displayName, unittest.equals('foo')); |
322 checkActivityObjectAttachmentsEmbed(o.embed); | 357 checkActivityObjectAttachmentsEmbed(o.embed); |
323 checkActivityObjectAttachmentsFullImage(o.fullImage); | 358 checkActivityObjectAttachmentsFullImage(o.fullImage); |
324 unittest.expect(o.id, unittest.equals('foo')); | 359 unittest.expect(o.id, unittest.equals('foo')); |
325 checkActivityObjectAttachmentsImage(o.image); | 360 checkActivityObjectAttachmentsImage(o.image); |
326 unittest.expect(o.objectType, unittest.equals('foo')); | 361 unittest.expect(o.objectType, unittest.equals('foo')); |
327 checkUnnamed145(o.thumbnails); | 362 checkUnnamed1255(o.thumbnails); |
328 unittest.expect(o.url, unittest.equals('foo')); | 363 unittest.expect(o.url, unittest.equals('foo')); |
329 } | 364 } |
330 buildCounterActivityObjectAttachments--; | 365 buildCounterActivityObjectAttachments--; |
331 } | 366 } |
332 | 367 |
333 buildUnnamed146() { | 368 buildUnnamed1256() { |
334 var o = new core.List<api.ActivityObjectAttachments>(); | 369 var o = new core.List<api.ActivityObjectAttachments>(); |
335 o.add(buildActivityObjectAttachments()); | 370 o.add(buildActivityObjectAttachments()); |
336 o.add(buildActivityObjectAttachments()); | 371 o.add(buildActivityObjectAttachments()); |
337 return o; | 372 return o; |
338 } | 373 } |
339 | 374 |
340 checkUnnamed146(core.List<api.ActivityObjectAttachments> o) { | 375 checkUnnamed1256(core.List<api.ActivityObjectAttachments> o) { |
341 unittest.expect(o, unittest.hasLength(2)); | 376 unittest.expect(o, unittest.hasLength(2)); |
342 checkActivityObjectAttachments(o[0]); | 377 checkActivityObjectAttachments(o[0]); |
343 checkActivityObjectAttachments(o[1]); | 378 checkActivityObjectAttachments(o[1]); |
344 } | 379 } |
345 | 380 |
346 core.int buildCounterActivityObjectPlusoners = 0; | 381 core.int buildCounterActivityObjectPlusoners = 0; |
347 buildActivityObjectPlusoners() { | 382 buildActivityObjectPlusoners() { |
348 var o = new api.ActivityObjectPlusoners(); | 383 var o = new api.ActivityObjectPlusoners(); |
349 buildCounterActivityObjectPlusoners++; | 384 buildCounterActivityObjectPlusoners++; |
350 if (buildCounterActivityObjectPlusoners < 3) { | 385 if (buildCounterActivityObjectPlusoners < 3) { |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
405 } | 440 } |
406 buildCounterActivityObjectResharers--; | 441 buildCounterActivityObjectResharers--; |
407 } | 442 } |
408 | 443 |
409 core.int buildCounterActivityObject = 0; | 444 core.int buildCounterActivityObject = 0; |
410 buildActivityObject() { | 445 buildActivityObject() { |
411 var o = new api.ActivityObject(); | 446 var o = new api.ActivityObject(); |
412 buildCounterActivityObject++; | 447 buildCounterActivityObject++; |
413 if (buildCounterActivityObject < 3) { | 448 if (buildCounterActivityObject < 3) { |
414 o.actor = buildActivityObjectActor(); | 449 o.actor = buildActivityObjectActor(); |
415 o.attachments = buildUnnamed146(); | 450 o.attachments = buildUnnamed1256(); |
416 o.content = "foo"; | 451 o.content = "foo"; |
417 o.id = "foo"; | 452 o.id = "foo"; |
418 o.objectType = "foo"; | 453 o.objectType = "foo"; |
419 o.originalContent = "foo"; | 454 o.originalContent = "foo"; |
420 o.plusoners = buildActivityObjectPlusoners(); | 455 o.plusoners = buildActivityObjectPlusoners(); |
421 o.replies = buildActivityObjectReplies(); | 456 o.replies = buildActivityObjectReplies(); |
422 o.resharers = buildActivityObjectResharers(); | 457 o.resharers = buildActivityObjectResharers(); |
423 o.url = "foo"; | 458 o.url = "foo"; |
424 } | 459 } |
425 buildCounterActivityObject--; | 460 buildCounterActivityObject--; |
426 return o; | 461 return o; |
427 } | 462 } |
428 | 463 |
429 checkActivityObject(api.ActivityObject o) { | 464 checkActivityObject(api.ActivityObject o) { |
430 buildCounterActivityObject++; | 465 buildCounterActivityObject++; |
431 if (buildCounterActivityObject < 3) { | 466 if (buildCounterActivityObject < 3) { |
432 checkActivityObjectActor(o.actor); | 467 checkActivityObjectActor(o.actor); |
433 checkUnnamed146(o.attachments); | 468 checkUnnamed1256(o.attachments); |
434 unittest.expect(o.content, unittest.equals('foo')); | 469 unittest.expect(o.content, unittest.equals('foo')); |
435 unittest.expect(o.id, unittest.equals('foo')); | 470 unittest.expect(o.id, unittest.equals('foo')); |
436 unittest.expect(o.objectType, unittest.equals('foo')); | 471 unittest.expect(o.objectType, unittest.equals('foo')); |
437 unittest.expect(o.originalContent, unittest.equals('foo')); | 472 unittest.expect(o.originalContent, unittest.equals('foo')); |
438 checkActivityObjectPlusoners(o.plusoners); | 473 checkActivityObjectPlusoners(o.plusoners); |
439 checkActivityObjectReplies(o.replies); | 474 checkActivityObjectReplies(o.replies); |
440 checkActivityObjectResharers(o.resharers); | 475 checkActivityObjectResharers(o.resharers); |
441 unittest.expect(o.url, unittest.equals('foo')); | 476 unittest.expect(o.url, unittest.equals('foo')); |
442 } | 477 } |
443 buildCounterActivityObject--; | 478 buildCounterActivityObject--; |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
512 unittest.expect(o.published, unittest.equals(core.DateTime.parse("2002-02-27
T14:01:02"))); | 547 unittest.expect(o.published, unittest.equals(core.DateTime.parse("2002-02-27
T14:01:02"))); |
513 unittest.expect(o.radius, unittest.equals('foo')); | 548 unittest.expect(o.radius, unittest.equals('foo')); |
514 unittest.expect(o.title, unittest.equals('foo')); | 549 unittest.expect(o.title, unittest.equals('foo')); |
515 unittest.expect(o.updated, unittest.equals(core.DateTime.parse("2002-02-27T1
4:01:02"))); | 550 unittest.expect(o.updated, unittest.equals(core.DateTime.parse("2002-02-27T1
4:01:02"))); |
516 unittest.expect(o.url, unittest.equals('foo')); | 551 unittest.expect(o.url, unittest.equals('foo')); |
517 unittest.expect(o.verb, unittest.equals('foo')); | 552 unittest.expect(o.verb, unittest.equals('foo')); |
518 } | 553 } |
519 buildCounterActivity--; | 554 buildCounterActivity--; |
520 } | 555 } |
521 | 556 |
522 buildUnnamed147() { | 557 buildUnnamed1257() { |
523 var o = new core.List<api.Activity>(); | 558 var o = new core.List<api.Activity>(); |
524 o.add(buildActivity()); | 559 o.add(buildActivity()); |
525 o.add(buildActivity()); | 560 o.add(buildActivity()); |
526 return o; | 561 return o; |
527 } | 562 } |
528 | 563 |
529 checkUnnamed147(core.List<api.Activity> o) { | 564 checkUnnamed1257(core.List<api.Activity> o) { |
530 unittest.expect(o, unittest.hasLength(2)); | 565 unittest.expect(o, unittest.hasLength(2)); |
531 checkActivity(o[0]); | 566 checkActivity(o[0]); |
532 checkActivity(o[1]); | 567 checkActivity(o[1]); |
533 } | 568 } |
534 | 569 |
535 core.int buildCounterActivityFeed = 0; | 570 core.int buildCounterActivityFeed = 0; |
536 buildActivityFeed() { | 571 buildActivityFeed() { |
537 var o = new api.ActivityFeed(); | 572 var o = new api.ActivityFeed(); |
538 buildCounterActivityFeed++; | 573 buildCounterActivityFeed++; |
539 if (buildCounterActivityFeed < 3) { | 574 if (buildCounterActivityFeed < 3) { |
540 o.etag = "foo"; | 575 o.etag = "foo"; |
541 o.id = "foo"; | 576 o.id = "foo"; |
542 o.items = buildUnnamed147(); | 577 o.items = buildUnnamed1257(); |
543 o.kind = "foo"; | 578 o.kind = "foo"; |
544 o.nextLink = "foo"; | 579 o.nextLink = "foo"; |
545 o.nextPageToken = "foo"; | 580 o.nextPageToken = "foo"; |
546 o.selfLink = "foo"; | 581 o.selfLink = "foo"; |
547 o.title = "foo"; | 582 o.title = "foo"; |
548 o.updated = core.DateTime.parse("2002-02-27T14:01:02"); | 583 o.updated = core.DateTime.parse("2002-02-27T14:01:02"); |
549 } | 584 } |
550 buildCounterActivityFeed--; | 585 buildCounterActivityFeed--; |
551 return o; | 586 return o; |
552 } | 587 } |
553 | 588 |
554 checkActivityFeed(api.ActivityFeed o) { | 589 checkActivityFeed(api.ActivityFeed o) { |
555 buildCounterActivityFeed++; | 590 buildCounterActivityFeed++; |
556 if (buildCounterActivityFeed < 3) { | 591 if (buildCounterActivityFeed < 3) { |
557 unittest.expect(o.etag, unittest.equals('foo')); | 592 unittest.expect(o.etag, unittest.equals('foo')); |
558 unittest.expect(o.id, unittest.equals('foo')); | 593 unittest.expect(o.id, unittest.equals('foo')); |
559 checkUnnamed147(o.items); | 594 checkUnnamed1257(o.items); |
560 unittest.expect(o.kind, unittest.equals('foo')); | 595 unittest.expect(o.kind, unittest.equals('foo')); |
561 unittest.expect(o.nextLink, unittest.equals('foo')); | 596 unittest.expect(o.nextLink, unittest.equals('foo')); |
562 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 597 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
563 unittest.expect(o.selfLink, unittest.equals('foo')); | 598 unittest.expect(o.selfLink, unittest.equals('foo')); |
564 unittest.expect(o.title, unittest.equals('foo')); | 599 unittest.expect(o.title, unittest.equals('foo')); |
565 unittest.expect(o.updated, unittest.equals(core.DateTime.parse("2002-02-27T1
4:01:02"))); | 600 unittest.expect(o.updated, unittest.equals(core.DateTime.parse("2002-02-27T1
4:01:02"))); |
566 } | 601 } |
567 buildCounterActivityFeed--; | 602 buildCounterActivityFeed--; |
568 } | 603 } |
569 | 604 |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
625 | 660 |
626 checkCommentInReplyTo(api.CommentInReplyTo o) { | 661 checkCommentInReplyTo(api.CommentInReplyTo o) { |
627 buildCounterCommentInReplyTo++; | 662 buildCounterCommentInReplyTo++; |
628 if (buildCounterCommentInReplyTo < 3) { | 663 if (buildCounterCommentInReplyTo < 3) { |
629 unittest.expect(o.id, unittest.equals('foo')); | 664 unittest.expect(o.id, unittest.equals('foo')); |
630 unittest.expect(o.url, unittest.equals('foo')); | 665 unittest.expect(o.url, unittest.equals('foo')); |
631 } | 666 } |
632 buildCounterCommentInReplyTo--; | 667 buildCounterCommentInReplyTo--; |
633 } | 668 } |
634 | 669 |
635 buildUnnamed148() { | 670 buildUnnamed1258() { |
636 var o = new core.List<api.CommentInReplyTo>(); | 671 var o = new core.List<api.CommentInReplyTo>(); |
637 o.add(buildCommentInReplyTo()); | 672 o.add(buildCommentInReplyTo()); |
638 o.add(buildCommentInReplyTo()); | 673 o.add(buildCommentInReplyTo()); |
639 return o; | 674 return o; |
640 } | 675 } |
641 | 676 |
642 checkUnnamed148(core.List<api.CommentInReplyTo> o) { | 677 checkUnnamed1258(core.List<api.CommentInReplyTo> o) { |
643 unittest.expect(o, unittest.hasLength(2)); | 678 unittest.expect(o, unittest.hasLength(2)); |
644 checkCommentInReplyTo(o[0]); | 679 checkCommentInReplyTo(o[0]); |
645 checkCommentInReplyTo(o[1]); | 680 checkCommentInReplyTo(o[1]); |
646 } | 681 } |
647 | 682 |
648 core.int buildCounterCommentObject = 0; | 683 core.int buildCounterCommentObject = 0; |
649 buildCommentObject() { | 684 buildCommentObject() { |
650 var o = new api.CommentObject(); | 685 var o = new api.CommentObject(); |
651 buildCounterCommentObject++; | 686 buildCounterCommentObject++; |
652 if (buildCounterCommentObject < 3) { | 687 if (buildCounterCommentObject < 3) { |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
688 } | 723 } |
689 | 724 |
690 core.int buildCounterComment = 0; | 725 core.int buildCounterComment = 0; |
691 buildComment() { | 726 buildComment() { |
692 var o = new api.Comment(); | 727 var o = new api.Comment(); |
693 buildCounterComment++; | 728 buildCounterComment++; |
694 if (buildCounterComment < 3) { | 729 if (buildCounterComment < 3) { |
695 o.actor = buildCommentActor(); | 730 o.actor = buildCommentActor(); |
696 o.etag = "foo"; | 731 o.etag = "foo"; |
697 o.id = "foo"; | 732 o.id = "foo"; |
698 o.inReplyTo = buildUnnamed148(); | 733 o.inReplyTo = buildUnnamed1258(); |
699 o.kind = "foo"; | 734 o.kind = "foo"; |
700 o.object = buildCommentObject(); | 735 o.object = buildCommentObject(); |
701 o.plusoners = buildCommentPlusoners(); | 736 o.plusoners = buildCommentPlusoners(); |
702 o.published = core.DateTime.parse("2002-02-27T14:01:02"); | 737 o.published = core.DateTime.parse("2002-02-27T14:01:02"); |
703 o.selfLink = "foo"; | 738 o.selfLink = "foo"; |
704 o.updated = core.DateTime.parse("2002-02-27T14:01:02"); | 739 o.updated = core.DateTime.parse("2002-02-27T14:01:02"); |
705 o.verb = "foo"; | 740 o.verb = "foo"; |
706 } | 741 } |
707 buildCounterComment--; | 742 buildCounterComment--; |
708 return o; | 743 return o; |
709 } | 744 } |
710 | 745 |
711 checkComment(api.Comment o) { | 746 checkComment(api.Comment o) { |
712 buildCounterComment++; | 747 buildCounterComment++; |
713 if (buildCounterComment < 3) { | 748 if (buildCounterComment < 3) { |
714 checkCommentActor(o.actor); | 749 checkCommentActor(o.actor); |
715 unittest.expect(o.etag, unittest.equals('foo')); | 750 unittest.expect(o.etag, unittest.equals('foo')); |
716 unittest.expect(o.id, unittest.equals('foo')); | 751 unittest.expect(o.id, unittest.equals('foo')); |
717 checkUnnamed148(o.inReplyTo); | 752 checkUnnamed1258(o.inReplyTo); |
718 unittest.expect(o.kind, unittest.equals('foo')); | 753 unittest.expect(o.kind, unittest.equals('foo')); |
719 checkCommentObject(o.object); | 754 checkCommentObject(o.object); |
720 checkCommentPlusoners(o.plusoners); | 755 checkCommentPlusoners(o.plusoners); |
721 unittest.expect(o.published, unittest.equals(core.DateTime.parse("2002-02-27
T14:01:02"))); | 756 unittest.expect(o.published, unittest.equals(core.DateTime.parse("2002-02-27
T14:01:02"))); |
722 unittest.expect(o.selfLink, unittest.equals('foo')); | 757 unittest.expect(o.selfLink, unittest.equals('foo')); |
723 unittest.expect(o.updated, unittest.equals(core.DateTime.parse("2002-02-27T1
4:01:02"))); | 758 unittest.expect(o.updated, unittest.equals(core.DateTime.parse("2002-02-27T1
4:01:02"))); |
724 unittest.expect(o.verb, unittest.equals('foo')); | 759 unittest.expect(o.verb, unittest.equals('foo')); |
725 } | 760 } |
726 buildCounterComment--; | 761 buildCounterComment--; |
727 } | 762 } |
728 | 763 |
729 buildUnnamed149() { | 764 buildUnnamed1259() { |
730 var o = new core.List<api.Comment>(); | 765 var o = new core.List<api.Comment>(); |
731 o.add(buildComment()); | 766 o.add(buildComment()); |
732 o.add(buildComment()); | 767 o.add(buildComment()); |
733 return o; | 768 return o; |
734 } | 769 } |
735 | 770 |
736 checkUnnamed149(core.List<api.Comment> o) { | 771 checkUnnamed1259(core.List<api.Comment> o) { |
737 unittest.expect(o, unittest.hasLength(2)); | 772 unittest.expect(o, unittest.hasLength(2)); |
738 checkComment(o[0]); | 773 checkComment(o[0]); |
739 checkComment(o[1]); | 774 checkComment(o[1]); |
740 } | 775 } |
741 | 776 |
742 core.int buildCounterCommentFeed = 0; | 777 core.int buildCounterCommentFeed = 0; |
743 buildCommentFeed() { | 778 buildCommentFeed() { |
744 var o = new api.CommentFeed(); | 779 var o = new api.CommentFeed(); |
745 buildCounterCommentFeed++; | 780 buildCounterCommentFeed++; |
746 if (buildCounterCommentFeed < 3) { | 781 if (buildCounterCommentFeed < 3) { |
747 o.etag = "foo"; | 782 o.etag = "foo"; |
748 o.id = "foo"; | 783 o.id = "foo"; |
749 o.items = buildUnnamed149(); | 784 o.items = buildUnnamed1259(); |
750 o.kind = "foo"; | 785 o.kind = "foo"; |
751 o.nextLink = "foo"; | 786 o.nextLink = "foo"; |
752 o.nextPageToken = "foo"; | 787 o.nextPageToken = "foo"; |
753 o.title = "foo"; | 788 o.title = "foo"; |
754 o.updated = core.DateTime.parse("2002-02-27T14:01:02"); | 789 o.updated = core.DateTime.parse("2002-02-27T14:01:02"); |
755 } | 790 } |
756 buildCounterCommentFeed--; | 791 buildCounterCommentFeed--; |
757 return o; | 792 return o; |
758 } | 793 } |
759 | 794 |
760 checkCommentFeed(api.CommentFeed o) { | 795 checkCommentFeed(api.CommentFeed o) { |
761 buildCounterCommentFeed++; | 796 buildCounterCommentFeed++; |
762 if (buildCounterCommentFeed < 3) { | 797 if (buildCounterCommentFeed < 3) { |
763 unittest.expect(o.etag, unittest.equals('foo')); | 798 unittest.expect(o.etag, unittest.equals('foo')); |
764 unittest.expect(o.id, unittest.equals('foo')); | 799 unittest.expect(o.id, unittest.equals('foo')); |
765 checkUnnamed149(o.items); | 800 checkUnnamed1259(o.items); |
766 unittest.expect(o.kind, unittest.equals('foo')); | 801 unittest.expect(o.kind, unittest.equals('foo')); |
767 unittest.expect(o.nextLink, unittest.equals('foo')); | 802 unittest.expect(o.nextLink, unittest.equals('foo')); |
768 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 803 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
769 unittest.expect(o.title, unittest.equals('foo')); | 804 unittest.expect(o.title, unittest.equals('foo')); |
770 unittest.expect(o.updated, unittest.equals(core.DateTime.parse("2002-02-27T1
4:01:02"))); | 805 unittest.expect(o.updated, unittest.equals(core.DateTime.parse("2002-02-27T1
4:01:02"))); |
771 } | 806 } |
772 buildCounterCommentFeed--; | 807 buildCounterCommentFeed--; |
773 } | 808 } |
774 | 809 |
775 buildUnnamed150() { | 810 buildUnnamed1260() { |
776 var o = new core.List<core.String>(); | 811 var o = new core.List<core.String>(); |
777 o.add("foo"); | 812 o.add("foo"); |
778 o.add("foo"); | 813 o.add("foo"); |
779 return o; | 814 return o; |
780 } | 815 } |
781 | 816 |
782 checkUnnamed150(core.List<core.String> o) { | 817 checkUnnamed1260(core.List<core.String> o) { |
783 unittest.expect(o, unittest.hasLength(2)); | 818 unittest.expect(o, unittest.hasLength(2)); |
784 unittest.expect(o[0], unittest.equals('foo')); | 819 unittest.expect(o[0], unittest.equals('foo')); |
785 unittest.expect(o[1], unittest.equals('foo')); | 820 unittest.expect(o[1], unittest.equals('foo')); |
786 } | 821 } |
787 | 822 |
788 buildUnnamed151() { | 823 buildUnnamed1261() { |
789 var o = new core.List<api.ItemScope>(); | 824 var o = new core.List<api.ItemScope>(); |
790 o.add(buildItemScope()); | 825 o.add(buildItemScope()); |
791 o.add(buildItemScope()); | 826 o.add(buildItemScope()); |
792 return o; | 827 return o; |
793 } | 828 } |
794 | 829 |
795 checkUnnamed151(core.List<api.ItemScope> o) { | 830 checkUnnamed1261(core.List<api.ItemScope> o) { |
796 unittest.expect(o, unittest.hasLength(2)); | 831 unittest.expect(o, unittest.hasLength(2)); |
797 checkItemScope(o[0]); | 832 checkItemScope(o[0]); |
798 checkItemScope(o[1]); | 833 checkItemScope(o[1]); |
799 } | 834 } |
800 | 835 |
801 buildUnnamed152() { | 836 buildUnnamed1262() { |
802 var o = new core.List<api.ItemScope>(); | 837 var o = new core.List<api.ItemScope>(); |
803 o.add(buildItemScope()); | 838 o.add(buildItemScope()); |
804 o.add(buildItemScope()); | 839 o.add(buildItemScope()); |
805 return o; | 840 return o; |
806 } | 841 } |
807 | 842 |
808 checkUnnamed152(core.List<api.ItemScope> o) { | 843 checkUnnamed1262(core.List<api.ItemScope> o) { |
809 unittest.expect(o, unittest.hasLength(2)); | 844 unittest.expect(o, unittest.hasLength(2)); |
810 checkItemScope(o[0]); | 845 checkItemScope(o[0]); |
811 checkItemScope(o[1]); | 846 checkItemScope(o[1]); |
812 } | 847 } |
813 | 848 |
814 buildUnnamed153() { | 849 buildUnnamed1263() { |
815 var o = new core.List<api.ItemScope>(); | 850 var o = new core.List<api.ItemScope>(); |
816 o.add(buildItemScope()); | 851 o.add(buildItemScope()); |
817 o.add(buildItemScope()); | 852 o.add(buildItemScope()); |
818 return o; | 853 return o; |
819 } | 854 } |
820 | 855 |
821 checkUnnamed153(core.List<api.ItemScope> o) { | 856 checkUnnamed1263(core.List<api.ItemScope> o) { |
822 unittest.expect(o, unittest.hasLength(2)); | 857 unittest.expect(o, unittest.hasLength(2)); |
823 checkItemScope(o[0]); | 858 checkItemScope(o[0]); |
824 checkItemScope(o[1]); | 859 checkItemScope(o[1]); |
825 } | 860 } |
826 | 861 |
827 buildUnnamed154() { | 862 buildUnnamed1264() { |
828 var o = new core.List<api.ItemScope>(); | 863 var o = new core.List<api.ItemScope>(); |
829 o.add(buildItemScope()); | 864 o.add(buildItemScope()); |
830 o.add(buildItemScope()); | 865 o.add(buildItemScope()); |
831 return o; | 866 return o; |
832 } | 867 } |
833 | 868 |
834 checkUnnamed154(core.List<api.ItemScope> o) { | 869 checkUnnamed1264(core.List<api.ItemScope> o) { |
835 unittest.expect(o, unittest.hasLength(2)); | 870 unittest.expect(o, unittest.hasLength(2)); |
836 checkItemScope(o[0]); | 871 checkItemScope(o[0]); |
837 checkItemScope(o[1]); | 872 checkItemScope(o[1]); |
838 } | 873 } |
839 | 874 |
840 buildUnnamed155() { | 875 buildUnnamed1265() { |
841 var o = new core.List<api.ItemScope>(); | 876 var o = new core.List<api.ItemScope>(); |
842 o.add(buildItemScope()); | 877 o.add(buildItemScope()); |
843 o.add(buildItemScope()); | 878 o.add(buildItemScope()); |
844 return o; | 879 return o; |
845 } | 880 } |
846 | 881 |
847 checkUnnamed155(core.List<api.ItemScope> o) { | 882 checkUnnamed1265(core.List<api.ItemScope> o) { |
848 unittest.expect(o, unittest.hasLength(2)); | 883 unittest.expect(o, unittest.hasLength(2)); |
849 checkItemScope(o[0]); | 884 checkItemScope(o[0]); |
850 checkItemScope(o[1]); | 885 checkItemScope(o[1]); |
851 } | 886 } |
852 | 887 |
853 core.int buildCounterItemScope = 0; | 888 core.int buildCounterItemScope = 0; |
854 buildItemScope() { | 889 buildItemScope() { |
855 var o = new api.ItemScope(); | 890 var o = new api.ItemScope(); |
856 buildCounterItemScope++; | 891 buildCounterItemScope++; |
857 if (buildCounterItemScope < 3) { | 892 if (buildCounterItemScope < 3) { |
858 o.about = buildItemScope(); | 893 o.about = buildItemScope(); |
859 o.additionalName = buildUnnamed150(); | 894 o.additionalName = buildUnnamed1260(); |
860 o.address = buildItemScope(); | 895 o.address = buildItemScope(); |
861 o.addressCountry = "foo"; | 896 o.addressCountry = "foo"; |
862 o.addressLocality = "foo"; | 897 o.addressLocality = "foo"; |
863 o.addressRegion = "foo"; | 898 o.addressRegion = "foo"; |
864 o.associatedMedia = buildUnnamed151(); | 899 o.associatedMedia = buildUnnamed1261(); |
865 o.attendeeCount = 42; | 900 o.attendeeCount = 42; |
866 o.attendees = buildUnnamed152(); | 901 o.attendees = buildUnnamed1262(); |
867 o.audio = buildItemScope(); | 902 o.audio = buildItemScope(); |
868 o.author = buildUnnamed153(); | 903 o.author = buildUnnamed1263(); |
869 o.bestRating = "foo"; | 904 o.bestRating = "foo"; |
870 o.birthDate = "foo"; | 905 o.birthDate = "foo"; |
871 o.byArtist = buildItemScope(); | 906 o.byArtist = buildItemScope(); |
872 o.caption = "foo"; | 907 o.caption = "foo"; |
873 o.contentSize = "foo"; | 908 o.contentSize = "foo"; |
874 o.contentUrl = "foo"; | 909 o.contentUrl = "foo"; |
875 o.contributor = buildUnnamed154(); | 910 o.contributor = buildUnnamed1264(); |
876 o.dateCreated = "foo"; | 911 o.dateCreated = "foo"; |
877 o.dateModified = "foo"; | 912 o.dateModified = "foo"; |
878 o.datePublished = "foo"; | 913 o.datePublished = "foo"; |
879 o.description = "foo"; | 914 o.description = "foo"; |
880 o.duration = "foo"; | 915 o.duration = "foo"; |
881 o.embedUrl = "foo"; | 916 o.embedUrl = "foo"; |
882 o.endDate = "foo"; | 917 o.endDate = "foo"; |
883 o.familyName = "foo"; | 918 o.familyName = "foo"; |
884 o.gender = "foo"; | 919 o.gender = "foo"; |
885 o.geo = buildItemScope(); | 920 o.geo = buildItemScope(); |
886 o.givenName = "foo"; | 921 o.givenName = "foo"; |
887 o.height = "foo"; | 922 o.height = "foo"; |
888 o.id = "foo"; | 923 o.id = "foo"; |
889 o.image = "foo"; | 924 o.image = "foo"; |
890 o.inAlbum = buildItemScope(); | 925 o.inAlbum = buildItemScope(); |
891 o.kind = "foo"; | 926 o.kind = "foo"; |
892 o.latitude = 42.0; | 927 o.latitude = 42.0; |
893 o.location = buildItemScope(); | 928 o.location = buildItemScope(); |
894 o.longitude = 42.0; | 929 o.longitude = 42.0; |
895 o.name = "foo"; | 930 o.name = "foo"; |
896 o.partOfTVSeries = buildItemScope(); | 931 o.partOfTVSeries = buildItemScope(); |
897 o.performers = buildUnnamed155(); | 932 o.performers = buildUnnamed1265(); |
898 o.playerType = "foo"; | 933 o.playerType = "foo"; |
899 o.postOfficeBoxNumber = "foo"; | 934 o.postOfficeBoxNumber = "foo"; |
900 o.postalCode = "foo"; | 935 o.postalCode = "foo"; |
901 o.ratingValue = "foo"; | 936 o.ratingValue = "foo"; |
902 o.reviewRating = buildItemScope(); | 937 o.reviewRating = buildItemScope(); |
903 o.startDate = "foo"; | 938 o.startDate = "foo"; |
904 o.streetAddress = "foo"; | 939 o.streetAddress = "foo"; |
905 o.text = "foo"; | 940 o.text = "foo"; |
906 o.thumbnail = buildItemScope(); | 941 o.thumbnail = buildItemScope(); |
907 o.thumbnailUrl = "foo"; | 942 o.thumbnailUrl = "foo"; |
908 o.tickerSymbol = "foo"; | 943 o.tickerSymbol = "foo"; |
909 o.type = "foo"; | 944 o.type = "foo"; |
910 o.url = "foo"; | 945 o.url = "foo"; |
911 o.width = "foo"; | 946 o.width = "foo"; |
912 o.worstRating = "foo"; | 947 o.worstRating = "foo"; |
913 } | 948 } |
914 buildCounterItemScope--; | 949 buildCounterItemScope--; |
915 return o; | 950 return o; |
916 } | 951 } |
917 | 952 |
918 checkItemScope(api.ItemScope o) { | 953 checkItemScope(api.ItemScope o) { |
919 buildCounterItemScope++; | 954 buildCounterItemScope++; |
920 if (buildCounterItemScope < 3) { | 955 if (buildCounterItemScope < 3) { |
921 checkItemScope(o.about); | 956 checkItemScope(o.about); |
922 checkUnnamed150(o.additionalName); | 957 checkUnnamed1260(o.additionalName); |
923 checkItemScope(o.address); | 958 checkItemScope(o.address); |
924 unittest.expect(o.addressCountry, unittest.equals('foo')); | 959 unittest.expect(o.addressCountry, unittest.equals('foo')); |
925 unittest.expect(o.addressLocality, unittest.equals('foo')); | 960 unittest.expect(o.addressLocality, unittest.equals('foo')); |
926 unittest.expect(o.addressRegion, unittest.equals('foo')); | 961 unittest.expect(o.addressRegion, unittest.equals('foo')); |
927 checkUnnamed151(o.associatedMedia); | 962 checkUnnamed1261(o.associatedMedia); |
928 unittest.expect(o.attendeeCount, unittest.equals(42)); | 963 unittest.expect(o.attendeeCount, unittest.equals(42)); |
929 checkUnnamed152(o.attendees); | 964 checkUnnamed1262(o.attendees); |
930 checkItemScope(o.audio); | 965 checkItemScope(o.audio); |
931 checkUnnamed153(o.author); | 966 checkUnnamed1263(o.author); |
932 unittest.expect(o.bestRating, unittest.equals('foo')); | 967 unittest.expect(o.bestRating, unittest.equals('foo')); |
933 unittest.expect(o.birthDate, unittest.equals('foo')); | 968 unittest.expect(o.birthDate, unittest.equals('foo')); |
934 checkItemScope(o.byArtist); | 969 checkItemScope(o.byArtist); |
935 unittest.expect(o.caption, unittest.equals('foo')); | 970 unittest.expect(o.caption, unittest.equals('foo')); |
936 unittest.expect(o.contentSize, unittest.equals('foo')); | 971 unittest.expect(o.contentSize, unittest.equals('foo')); |
937 unittest.expect(o.contentUrl, unittest.equals('foo')); | 972 unittest.expect(o.contentUrl, unittest.equals('foo')); |
938 checkUnnamed154(o.contributor); | 973 checkUnnamed1264(o.contributor); |
939 unittest.expect(o.dateCreated, unittest.equals('foo')); | 974 unittest.expect(o.dateCreated, unittest.equals('foo')); |
940 unittest.expect(o.dateModified, unittest.equals('foo')); | 975 unittest.expect(o.dateModified, unittest.equals('foo')); |
941 unittest.expect(o.datePublished, unittest.equals('foo')); | 976 unittest.expect(o.datePublished, unittest.equals('foo')); |
942 unittest.expect(o.description, unittest.equals('foo')); | 977 unittest.expect(o.description, unittest.equals('foo')); |
943 unittest.expect(o.duration, unittest.equals('foo')); | 978 unittest.expect(o.duration, unittest.equals('foo')); |
944 unittest.expect(o.embedUrl, unittest.equals('foo')); | 979 unittest.expect(o.embedUrl, unittest.equals('foo')); |
945 unittest.expect(o.endDate, unittest.equals('foo')); | 980 unittest.expect(o.endDate, unittest.equals('foo')); |
946 unittest.expect(o.familyName, unittest.equals('foo')); | 981 unittest.expect(o.familyName, unittest.equals('foo')); |
947 unittest.expect(o.gender, unittest.equals('foo')); | 982 unittest.expect(o.gender, unittest.equals('foo')); |
948 checkItemScope(o.geo); | 983 checkItemScope(o.geo); |
949 unittest.expect(o.givenName, unittest.equals('foo')); | 984 unittest.expect(o.givenName, unittest.equals('foo')); |
950 unittest.expect(o.height, unittest.equals('foo')); | 985 unittest.expect(o.height, unittest.equals('foo')); |
951 unittest.expect(o.id, unittest.equals('foo')); | 986 unittest.expect(o.id, unittest.equals('foo')); |
952 unittest.expect(o.image, unittest.equals('foo')); | 987 unittest.expect(o.image, unittest.equals('foo')); |
953 checkItemScope(o.inAlbum); | 988 checkItemScope(o.inAlbum); |
954 unittest.expect(o.kind, unittest.equals('foo')); | 989 unittest.expect(o.kind, unittest.equals('foo')); |
955 unittest.expect(o.latitude, unittest.equals(42.0)); | 990 unittest.expect(o.latitude, unittest.equals(42.0)); |
956 checkItemScope(o.location); | 991 checkItemScope(o.location); |
957 unittest.expect(o.longitude, unittest.equals(42.0)); | 992 unittest.expect(o.longitude, unittest.equals(42.0)); |
958 unittest.expect(o.name, unittest.equals('foo')); | 993 unittest.expect(o.name, unittest.equals('foo')); |
959 checkItemScope(o.partOfTVSeries); | 994 checkItemScope(o.partOfTVSeries); |
960 checkUnnamed155(o.performers); | 995 checkUnnamed1265(o.performers); |
961 unittest.expect(o.playerType, unittest.equals('foo')); | 996 unittest.expect(o.playerType, unittest.equals('foo')); |
962 unittest.expect(o.postOfficeBoxNumber, unittest.equals('foo')); | 997 unittest.expect(o.postOfficeBoxNumber, unittest.equals('foo')); |
963 unittest.expect(o.postalCode, unittest.equals('foo')); | 998 unittest.expect(o.postalCode, unittest.equals('foo')); |
964 unittest.expect(o.ratingValue, unittest.equals('foo')); | 999 unittest.expect(o.ratingValue, unittest.equals('foo')); |
965 checkItemScope(o.reviewRating); | 1000 checkItemScope(o.reviewRating); |
966 unittest.expect(o.startDate, unittest.equals('foo')); | 1001 unittest.expect(o.startDate, unittest.equals('foo')); |
967 unittest.expect(o.streetAddress, unittest.equals('foo')); | 1002 unittest.expect(o.streetAddress, unittest.equals('foo')); |
968 unittest.expect(o.text, unittest.equals('foo')); | 1003 unittest.expect(o.text, unittest.equals('foo')); |
969 checkItemScope(o.thumbnail); | 1004 checkItemScope(o.thumbnail); |
970 unittest.expect(o.thumbnailUrl, unittest.equals('foo')); | 1005 unittest.expect(o.thumbnailUrl, unittest.equals('foo')); |
(...skipping 30 matching lines...) Expand all Loading... |
1001 unittest.expect(o.kind, unittest.equals('foo')); | 1036 unittest.expect(o.kind, unittest.equals('foo')); |
1002 checkItemScope(o.object); | 1037 checkItemScope(o.object); |
1003 checkItemScope(o.result); | 1038 checkItemScope(o.result); |
1004 unittest.expect(o.startDate, unittest.equals(core.DateTime.parse("2002-02-27
T14:01:02"))); | 1039 unittest.expect(o.startDate, unittest.equals(core.DateTime.parse("2002-02-27
T14:01:02"))); |
1005 checkItemScope(o.target); | 1040 checkItemScope(o.target); |
1006 unittest.expect(o.type, unittest.equals('foo')); | 1041 unittest.expect(o.type, unittest.equals('foo')); |
1007 } | 1042 } |
1008 buildCounterMoment--; | 1043 buildCounterMoment--; |
1009 } | 1044 } |
1010 | 1045 |
1011 buildUnnamed156() { | 1046 buildUnnamed1266() { |
1012 var o = new core.List<api.Moment>(); | 1047 var o = new core.List<api.Moment>(); |
1013 o.add(buildMoment()); | 1048 o.add(buildMoment()); |
1014 o.add(buildMoment()); | 1049 o.add(buildMoment()); |
1015 return o; | 1050 return o; |
1016 } | 1051 } |
1017 | 1052 |
1018 checkUnnamed156(core.List<api.Moment> o) { | 1053 checkUnnamed1266(core.List<api.Moment> o) { |
1019 unittest.expect(o, unittest.hasLength(2)); | 1054 unittest.expect(o, unittest.hasLength(2)); |
1020 checkMoment(o[0]); | 1055 checkMoment(o[0]); |
1021 checkMoment(o[1]); | 1056 checkMoment(o[1]); |
1022 } | 1057 } |
1023 | 1058 |
1024 core.int buildCounterMomentsFeed = 0; | 1059 core.int buildCounterMomentsFeed = 0; |
1025 buildMomentsFeed() { | 1060 buildMomentsFeed() { |
1026 var o = new api.MomentsFeed(); | 1061 var o = new api.MomentsFeed(); |
1027 buildCounterMomentsFeed++; | 1062 buildCounterMomentsFeed++; |
1028 if (buildCounterMomentsFeed < 3) { | 1063 if (buildCounterMomentsFeed < 3) { |
1029 o.etag = "foo"; | 1064 o.etag = "foo"; |
1030 o.items = buildUnnamed156(); | 1065 o.items = buildUnnamed1266(); |
1031 o.kind = "foo"; | 1066 o.kind = "foo"; |
1032 o.nextLink = "foo"; | 1067 o.nextLink = "foo"; |
1033 o.nextPageToken = "foo"; | 1068 o.nextPageToken = "foo"; |
1034 o.selfLink = "foo"; | 1069 o.selfLink = "foo"; |
1035 o.title = "foo"; | 1070 o.title = "foo"; |
1036 o.updated = core.DateTime.parse("2002-02-27T14:01:02"); | 1071 o.updated = core.DateTime.parse("2002-02-27T14:01:02"); |
1037 } | 1072 } |
1038 buildCounterMomentsFeed--; | 1073 buildCounterMomentsFeed--; |
1039 return o; | 1074 return o; |
1040 } | 1075 } |
1041 | 1076 |
1042 checkMomentsFeed(api.MomentsFeed o) { | 1077 checkMomentsFeed(api.MomentsFeed o) { |
1043 buildCounterMomentsFeed++; | 1078 buildCounterMomentsFeed++; |
1044 if (buildCounterMomentsFeed < 3) { | 1079 if (buildCounterMomentsFeed < 3) { |
1045 unittest.expect(o.etag, unittest.equals('foo')); | 1080 unittest.expect(o.etag, unittest.equals('foo')); |
1046 checkUnnamed156(o.items); | 1081 checkUnnamed1266(o.items); |
1047 unittest.expect(o.kind, unittest.equals('foo')); | 1082 unittest.expect(o.kind, unittest.equals('foo')); |
1048 unittest.expect(o.nextLink, unittest.equals('foo')); | 1083 unittest.expect(o.nextLink, unittest.equals('foo')); |
1049 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 1084 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
1050 unittest.expect(o.selfLink, unittest.equals('foo')); | 1085 unittest.expect(o.selfLink, unittest.equals('foo')); |
1051 unittest.expect(o.title, unittest.equals('foo')); | 1086 unittest.expect(o.title, unittest.equals('foo')); |
1052 unittest.expect(o.updated, unittest.equals(core.DateTime.parse("2002-02-27T1
4:01:02"))); | 1087 unittest.expect(o.updated, unittest.equals(core.DateTime.parse("2002-02-27T1
4:01:02"))); |
1053 } | 1088 } |
1054 buildCounterMomentsFeed--; | 1089 buildCounterMomentsFeed--; |
1055 } | 1090 } |
1056 | 1091 |
1057 buildUnnamed157() { | 1092 buildUnnamed1267() { |
1058 var o = new core.List<api.Person>(); | 1093 var o = new core.List<api.Person>(); |
1059 o.add(buildPerson()); | 1094 o.add(buildPerson()); |
1060 o.add(buildPerson()); | 1095 o.add(buildPerson()); |
1061 return o; | 1096 return o; |
1062 } | 1097 } |
1063 | 1098 |
1064 checkUnnamed157(core.List<api.Person> o) { | 1099 checkUnnamed1267(core.List<api.Person> o) { |
1065 unittest.expect(o, unittest.hasLength(2)); | 1100 unittest.expect(o, unittest.hasLength(2)); |
1066 checkPerson(o[0]); | 1101 checkPerson(o[0]); |
1067 checkPerson(o[1]); | 1102 checkPerson(o[1]); |
1068 } | 1103 } |
1069 | 1104 |
1070 core.int buildCounterPeopleFeed = 0; | 1105 core.int buildCounterPeopleFeed = 0; |
1071 buildPeopleFeed() { | 1106 buildPeopleFeed() { |
1072 var o = new api.PeopleFeed(); | 1107 var o = new api.PeopleFeed(); |
1073 buildCounterPeopleFeed++; | 1108 buildCounterPeopleFeed++; |
1074 if (buildCounterPeopleFeed < 3) { | 1109 if (buildCounterPeopleFeed < 3) { |
1075 o.etag = "foo"; | 1110 o.etag = "foo"; |
1076 o.items = buildUnnamed157(); | 1111 o.items = buildUnnamed1267(); |
1077 o.kind = "foo"; | 1112 o.kind = "foo"; |
1078 o.nextPageToken = "foo"; | 1113 o.nextPageToken = "foo"; |
1079 o.selfLink = "foo"; | 1114 o.selfLink = "foo"; |
1080 o.title = "foo"; | 1115 o.title = "foo"; |
1081 o.totalItems = 42; | 1116 o.totalItems = 42; |
1082 } | 1117 } |
1083 buildCounterPeopleFeed--; | 1118 buildCounterPeopleFeed--; |
1084 return o; | 1119 return o; |
1085 } | 1120 } |
1086 | 1121 |
1087 checkPeopleFeed(api.PeopleFeed o) { | 1122 checkPeopleFeed(api.PeopleFeed o) { |
1088 buildCounterPeopleFeed++; | 1123 buildCounterPeopleFeed++; |
1089 if (buildCounterPeopleFeed < 3) { | 1124 if (buildCounterPeopleFeed < 3) { |
1090 unittest.expect(o.etag, unittest.equals('foo')); | 1125 unittest.expect(o.etag, unittest.equals('foo')); |
1091 checkUnnamed157(o.items); | 1126 checkUnnamed1267(o.items); |
1092 unittest.expect(o.kind, unittest.equals('foo')); | 1127 unittest.expect(o.kind, unittest.equals('foo')); |
1093 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 1128 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
1094 unittest.expect(o.selfLink, unittest.equals('foo')); | 1129 unittest.expect(o.selfLink, unittest.equals('foo')); |
1095 unittest.expect(o.title, unittest.equals('foo')); | 1130 unittest.expect(o.title, unittest.equals('foo')); |
1096 unittest.expect(o.totalItems, unittest.equals(42)); | 1131 unittest.expect(o.totalItems, unittest.equals(42)); |
1097 } | 1132 } |
1098 buildCounterPeopleFeed--; | 1133 buildCounterPeopleFeed--; |
1099 } | 1134 } |
1100 | 1135 |
1101 core.int buildCounterPersonAgeRange = 0; | 1136 core.int buildCounterPersonAgeRange = 0; |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1200 | 1235 |
1201 checkPersonEmails(api.PersonEmails o) { | 1236 checkPersonEmails(api.PersonEmails o) { |
1202 buildCounterPersonEmails++; | 1237 buildCounterPersonEmails++; |
1203 if (buildCounterPersonEmails < 3) { | 1238 if (buildCounterPersonEmails < 3) { |
1204 unittest.expect(o.type, unittest.equals('foo')); | 1239 unittest.expect(o.type, unittest.equals('foo')); |
1205 unittest.expect(o.value, unittest.equals('foo')); | 1240 unittest.expect(o.value, unittest.equals('foo')); |
1206 } | 1241 } |
1207 buildCounterPersonEmails--; | 1242 buildCounterPersonEmails--; |
1208 } | 1243 } |
1209 | 1244 |
1210 buildUnnamed158() { | 1245 buildUnnamed1268() { |
1211 var o = new core.List<api.PersonEmails>(); | 1246 var o = new core.List<api.PersonEmails>(); |
1212 o.add(buildPersonEmails()); | 1247 o.add(buildPersonEmails()); |
1213 o.add(buildPersonEmails()); | 1248 o.add(buildPersonEmails()); |
1214 return o; | 1249 return o; |
1215 } | 1250 } |
1216 | 1251 |
1217 checkUnnamed158(core.List<api.PersonEmails> o) { | 1252 checkUnnamed1268(core.List<api.PersonEmails> o) { |
1218 unittest.expect(o, unittest.hasLength(2)); | 1253 unittest.expect(o, unittest.hasLength(2)); |
1219 checkPersonEmails(o[0]); | 1254 checkPersonEmails(o[0]); |
1220 checkPersonEmails(o[1]); | 1255 checkPersonEmails(o[1]); |
1221 } | 1256 } |
1222 | 1257 |
1223 core.int buildCounterPersonImage = 0; | 1258 core.int buildCounterPersonImage = 0; |
1224 buildPersonImage() { | 1259 buildPersonImage() { |
1225 var o = new api.PersonImage(); | 1260 var o = new api.PersonImage(); |
1226 buildCounterPersonImage++; | 1261 buildCounterPersonImage++; |
1227 if (buildCounterPersonImage < 3) { | 1262 if (buildCounterPersonImage < 3) { |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1298 unittest.expect(o.location, unittest.equals('foo')); | 1333 unittest.expect(o.location, unittest.equals('foo')); |
1299 unittest.expect(o.name, unittest.equals('foo')); | 1334 unittest.expect(o.name, unittest.equals('foo')); |
1300 unittest.expect(o.primary, unittest.isTrue); | 1335 unittest.expect(o.primary, unittest.isTrue); |
1301 unittest.expect(o.startDate, unittest.equals('foo')); | 1336 unittest.expect(o.startDate, unittest.equals('foo')); |
1302 unittest.expect(o.title, unittest.equals('foo')); | 1337 unittest.expect(o.title, unittest.equals('foo')); |
1303 unittest.expect(o.type, unittest.equals('foo')); | 1338 unittest.expect(o.type, unittest.equals('foo')); |
1304 } | 1339 } |
1305 buildCounterPersonOrganizations--; | 1340 buildCounterPersonOrganizations--; |
1306 } | 1341 } |
1307 | 1342 |
1308 buildUnnamed159() { | 1343 buildUnnamed1269() { |
1309 var o = new core.List<api.PersonOrganizations>(); | 1344 var o = new core.List<api.PersonOrganizations>(); |
1310 o.add(buildPersonOrganizations()); | 1345 o.add(buildPersonOrganizations()); |
1311 o.add(buildPersonOrganizations()); | 1346 o.add(buildPersonOrganizations()); |
1312 return o; | 1347 return o; |
1313 } | 1348 } |
1314 | 1349 |
1315 checkUnnamed159(core.List<api.PersonOrganizations> o) { | 1350 checkUnnamed1269(core.List<api.PersonOrganizations> o) { |
1316 unittest.expect(o, unittest.hasLength(2)); | 1351 unittest.expect(o, unittest.hasLength(2)); |
1317 checkPersonOrganizations(o[0]); | 1352 checkPersonOrganizations(o[0]); |
1318 checkPersonOrganizations(o[1]); | 1353 checkPersonOrganizations(o[1]); |
1319 } | 1354 } |
1320 | 1355 |
1321 core.int buildCounterPersonPlacesLived = 0; | 1356 core.int buildCounterPersonPlacesLived = 0; |
1322 buildPersonPlacesLived() { | 1357 buildPersonPlacesLived() { |
1323 var o = new api.PersonPlacesLived(); | 1358 var o = new api.PersonPlacesLived(); |
1324 buildCounterPersonPlacesLived++; | 1359 buildCounterPersonPlacesLived++; |
1325 if (buildCounterPersonPlacesLived < 3) { | 1360 if (buildCounterPersonPlacesLived < 3) { |
1326 o.primary = true; | 1361 o.primary = true; |
1327 o.value = "foo"; | 1362 o.value = "foo"; |
1328 } | 1363 } |
1329 buildCounterPersonPlacesLived--; | 1364 buildCounterPersonPlacesLived--; |
1330 return o; | 1365 return o; |
1331 } | 1366 } |
1332 | 1367 |
1333 checkPersonPlacesLived(api.PersonPlacesLived o) { | 1368 checkPersonPlacesLived(api.PersonPlacesLived o) { |
1334 buildCounterPersonPlacesLived++; | 1369 buildCounterPersonPlacesLived++; |
1335 if (buildCounterPersonPlacesLived < 3) { | 1370 if (buildCounterPersonPlacesLived < 3) { |
1336 unittest.expect(o.primary, unittest.isTrue); | 1371 unittest.expect(o.primary, unittest.isTrue); |
1337 unittest.expect(o.value, unittest.equals('foo')); | 1372 unittest.expect(o.value, unittest.equals('foo')); |
1338 } | 1373 } |
1339 buildCounterPersonPlacesLived--; | 1374 buildCounterPersonPlacesLived--; |
1340 } | 1375 } |
1341 | 1376 |
1342 buildUnnamed160() { | 1377 buildUnnamed1270() { |
1343 var o = new core.List<api.PersonPlacesLived>(); | 1378 var o = new core.List<api.PersonPlacesLived>(); |
1344 o.add(buildPersonPlacesLived()); | 1379 o.add(buildPersonPlacesLived()); |
1345 o.add(buildPersonPlacesLived()); | 1380 o.add(buildPersonPlacesLived()); |
1346 return o; | 1381 return o; |
1347 } | 1382 } |
1348 | 1383 |
1349 checkUnnamed160(core.List<api.PersonPlacesLived> o) { | 1384 checkUnnamed1270(core.List<api.PersonPlacesLived> o) { |
1350 unittest.expect(o, unittest.hasLength(2)); | 1385 unittest.expect(o, unittest.hasLength(2)); |
1351 checkPersonPlacesLived(o[0]); | 1386 checkPersonPlacesLived(o[0]); |
1352 checkPersonPlacesLived(o[1]); | 1387 checkPersonPlacesLived(o[1]); |
1353 } | 1388 } |
1354 | 1389 |
1355 core.int buildCounterPersonUrls = 0; | 1390 core.int buildCounterPersonUrls = 0; |
1356 buildPersonUrls() { | 1391 buildPersonUrls() { |
1357 var o = new api.PersonUrls(); | 1392 var o = new api.PersonUrls(); |
1358 buildCounterPersonUrls++; | 1393 buildCounterPersonUrls++; |
1359 if (buildCounterPersonUrls < 3) { | 1394 if (buildCounterPersonUrls < 3) { |
1360 o.label = "foo"; | 1395 o.label = "foo"; |
1361 o.type = "foo"; | 1396 o.type = "foo"; |
1362 o.value = "foo"; | 1397 o.value = "foo"; |
1363 } | 1398 } |
1364 buildCounterPersonUrls--; | 1399 buildCounterPersonUrls--; |
1365 return o; | 1400 return o; |
1366 } | 1401 } |
1367 | 1402 |
1368 checkPersonUrls(api.PersonUrls o) { | 1403 checkPersonUrls(api.PersonUrls o) { |
1369 buildCounterPersonUrls++; | 1404 buildCounterPersonUrls++; |
1370 if (buildCounterPersonUrls < 3) { | 1405 if (buildCounterPersonUrls < 3) { |
1371 unittest.expect(o.label, unittest.equals('foo')); | 1406 unittest.expect(o.label, unittest.equals('foo')); |
1372 unittest.expect(o.type, unittest.equals('foo')); | 1407 unittest.expect(o.type, unittest.equals('foo')); |
1373 unittest.expect(o.value, unittest.equals('foo')); | 1408 unittest.expect(o.value, unittest.equals('foo')); |
1374 } | 1409 } |
1375 buildCounterPersonUrls--; | 1410 buildCounterPersonUrls--; |
1376 } | 1411 } |
1377 | 1412 |
1378 buildUnnamed161() { | 1413 buildUnnamed1271() { |
1379 var o = new core.List<api.PersonUrls>(); | 1414 var o = new core.List<api.PersonUrls>(); |
1380 o.add(buildPersonUrls()); | 1415 o.add(buildPersonUrls()); |
1381 o.add(buildPersonUrls()); | 1416 o.add(buildPersonUrls()); |
1382 return o; | 1417 return o; |
1383 } | 1418 } |
1384 | 1419 |
1385 checkUnnamed161(core.List<api.PersonUrls> o) { | 1420 checkUnnamed1271(core.List<api.PersonUrls> o) { |
1386 unittest.expect(o, unittest.hasLength(2)); | 1421 unittest.expect(o, unittest.hasLength(2)); |
1387 checkPersonUrls(o[0]); | 1422 checkPersonUrls(o[0]); |
1388 checkPersonUrls(o[1]); | 1423 checkPersonUrls(o[1]); |
1389 } | 1424 } |
1390 | 1425 |
1391 core.int buildCounterPerson = 0; | 1426 core.int buildCounterPerson = 0; |
1392 buildPerson() { | 1427 buildPerson() { |
1393 var o = new api.Person(); | 1428 var o = new api.Person(); |
1394 buildCounterPerson++; | 1429 buildCounterPerson++; |
1395 if (buildCounterPerson < 3) { | 1430 if (buildCounterPerson < 3) { |
1396 o.aboutMe = "foo"; | 1431 o.aboutMe = "foo"; |
1397 o.ageRange = buildPersonAgeRange(); | 1432 o.ageRange = buildPersonAgeRange(); |
1398 o.birthday = "foo"; | 1433 o.birthday = "foo"; |
1399 o.braggingRights = "foo"; | 1434 o.braggingRights = "foo"; |
1400 o.circledByCount = 42; | 1435 o.circledByCount = 42; |
1401 o.cover = buildPersonCover(); | 1436 o.cover = buildPersonCover(); |
1402 o.currentLocation = "foo"; | 1437 o.currentLocation = "foo"; |
1403 o.displayName = "foo"; | 1438 o.displayName = "foo"; |
1404 o.domain = "foo"; | 1439 o.domain = "foo"; |
1405 o.emails = buildUnnamed158(); | 1440 o.emails = buildUnnamed1268(); |
1406 o.etag = "foo"; | 1441 o.etag = "foo"; |
1407 o.gender = "foo"; | 1442 o.gender = "foo"; |
1408 o.id = "foo"; | 1443 o.id = "foo"; |
1409 o.image = buildPersonImage(); | 1444 o.image = buildPersonImage(); |
1410 o.isPlusUser = true; | 1445 o.isPlusUser = true; |
1411 o.kind = "foo"; | 1446 o.kind = "foo"; |
1412 o.language = "foo"; | 1447 o.language = "foo"; |
1413 o.name = buildPersonName(); | 1448 o.name = buildPersonName(); |
1414 o.nickname = "foo"; | 1449 o.nickname = "foo"; |
1415 o.objectType = "foo"; | 1450 o.objectType = "foo"; |
1416 o.occupation = "foo"; | 1451 o.occupation = "foo"; |
1417 o.organizations = buildUnnamed159(); | 1452 o.organizations = buildUnnamed1269(); |
1418 o.placesLived = buildUnnamed160(); | 1453 o.placesLived = buildUnnamed1270(); |
1419 o.plusOneCount = 42; | 1454 o.plusOneCount = 42; |
1420 o.relationshipStatus = "foo"; | 1455 o.relationshipStatus = "foo"; |
1421 o.skills = "foo"; | 1456 o.skills = "foo"; |
1422 o.tagline = "foo"; | 1457 o.tagline = "foo"; |
1423 o.url = "foo"; | 1458 o.url = "foo"; |
1424 o.urls = buildUnnamed161(); | 1459 o.urls = buildUnnamed1271(); |
1425 o.verified = true; | 1460 o.verified = true; |
1426 } | 1461 } |
1427 buildCounterPerson--; | 1462 buildCounterPerson--; |
1428 return o; | 1463 return o; |
1429 } | 1464 } |
1430 | 1465 |
1431 checkPerson(api.Person o) { | 1466 checkPerson(api.Person o) { |
1432 buildCounterPerson++; | 1467 buildCounterPerson++; |
1433 if (buildCounterPerson < 3) { | 1468 if (buildCounterPerson < 3) { |
1434 unittest.expect(o.aboutMe, unittest.equals('foo')); | 1469 unittest.expect(o.aboutMe, unittest.equals('foo')); |
1435 checkPersonAgeRange(o.ageRange); | 1470 checkPersonAgeRange(o.ageRange); |
1436 unittest.expect(o.birthday, unittest.equals('foo')); | 1471 unittest.expect(o.birthday, unittest.equals('foo')); |
1437 unittest.expect(o.braggingRights, unittest.equals('foo')); | 1472 unittest.expect(o.braggingRights, unittest.equals('foo')); |
1438 unittest.expect(o.circledByCount, unittest.equals(42)); | 1473 unittest.expect(o.circledByCount, unittest.equals(42)); |
1439 checkPersonCover(o.cover); | 1474 checkPersonCover(o.cover); |
1440 unittest.expect(o.currentLocation, unittest.equals('foo')); | 1475 unittest.expect(o.currentLocation, unittest.equals('foo')); |
1441 unittest.expect(o.displayName, unittest.equals('foo')); | 1476 unittest.expect(o.displayName, unittest.equals('foo')); |
1442 unittest.expect(o.domain, unittest.equals('foo')); | 1477 unittest.expect(o.domain, unittest.equals('foo')); |
1443 checkUnnamed158(o.emails); | 1478 checkUnnamed1268(o.emails); |
1444 unittest.expect(o.etag, unittest.equals('foo')); | 1479 unittest.expect(o.etag, unittest.equals('foo')); |
1445 unittest.expect(o.gender, unittest.equals('foo')); | 1480 unittest.expect(o.gender, unittest.equals('foo')); |
1446 unittest.expect(o.id, unittest.equals('foo')); | 1481 unittest.expect(o.id, unittest.equals('foo')); |
1447 checkPersonImage(o.image); | 1482 checkPersonImage(o.image); |
1448 unittest.expect(o.isPlusUser, unittest.isTrue); | 1483 unittest.expect(o.isPlusUser, unittest.isTrue); |
1449 unittest.expect(o.kind, unittest.equals('foo')); | 1484 unittest.expect(o.kind, unittest.equals('foo')); |
1450 unittest.expect(o.language, unittest.equals('foo')); | 1485 unittest.expect(o.language, unittest.equals('foo')); |
1451 checkPersonName(o.name); | 1486 checkPersonName(o.name); |
1452 unittest.expect(o.nickname, unittest.equals('foo')); | 1487 unittest.expect(o.nickname, unittest.equals('foo')); |
1453 unittest.expect(o.objectType, unittest.equals('foo')); | 1488 unittest.expect(o.objectType, unittest.equals('foo')); |
1454 unittest.expect(o.occupation, unittest.equals('foo')); | 1489 unittest.expect(o.occupation, unittest.equals('foo')); |
1455 checkUnnamed159(o.organizations); | 1490 checkUnnamed1269(o.organizations); |
1456 checkUnnamed160(o.placesLived); | 1491 checkUnnamed1270(o.placesLived); |
1457 unittest.expect(o.plusOneCount, unittest.equals(42)); | 1492 unittest.expect(o.plusOneCount, unittest.equals(42)); |
1458 unittest.expect(o.relationshipStatus, unittest.equals('foo')); | 1493 unittest.expect(o.relationshipStatus, unittest.equals('foo')); |
1459 unittest.expect(o.skills, unittest.equals('foo')); | 1494 unittest.expect(o.skills, unittest.equals('foo')); |
1460 unittest.expect(o.tagline, unittest.equals('foo')); | 1495 unittest.expect(o.tagline, unittest.equals('foo')); |
1461 unittest.expect(o.url, unittest.equals('foo')); | 1496 unittest.expect(o.url, unittest.equals('foo')); |
1462 checkUnnamed161(o.urls); | 1497 checkUnnamed1271(o.urls); |
1463 unittest.expect(o.verified, unittest.isTrue); | 1498 unittest.expect(o.verified, unittest.isTrue); |
1464 } | 1499 } |
1465 buildCounterPerson--; | 1500 buildCounterPerson--; |
1466 } | 1501 } |
1467 | 1502 |
1468 core.int buildCounterPlaceAddress = 0; | 1503 core.int buildCounterPlaceAddress = 0; |
1469 buildPlaceAddress() { | 1504 buildPlaceAddress() { |
1470 var o = new api.PlaceAddress(); | 1505 var o = new api.PlaceAddress(); |
1471 buildCounterPlaceAddress++; | 1506 buildCounterPlaceAddress++; |
1472 if (buildCounterPlaceAddress < 3) { | 1507 if (buildCounterPlaceAddress < 3) { |
(...skipping 485 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1958 var o = buildPlusAclentryResource(); | 1993 var o = buildPlusAclentryResource(); |
1959 var od = new api.PlusAclentryResource.fromJson(o.toJson()); | 1994 var od = new api.PlusAclentryResource.fromJson(o.toJson()); |
1960 checkPlusAclentryResource(od); | 1995 checkPlusAclentryResource(od); |
1961 }); | 1996 }); |
1962 }); | 1997 }); |
1963 | 1998 |
1964 | 1999 |
1965 unittest.group("resource-ActivitiesResourceApi", () { | 2000 unittest.group("resource-ActivitiesResourceApi", () { |
1966 unittest.test("method--get", () { | 2001 unittest.test("method--get", () { |
1967 | 2002 |
1968 var mock = new common_test.HttpServerMock(); | 2003 var mock = new HttpServerMock(); |
1969 api.ActivitiesResourceApi res = new api.PlusApi(mock).activities; | 2004 api.ActivitiesResourceApi res = new api.PlusApi(mock).activities; |
1970 var arg_activityId = "foo"; | 2005 var arg_activityId = "foo"; |
1971 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2006 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1972 var path = (req.url).path; | 2007 var path = (req.url).path; |
1973 var pathOffset = 0; | 2008 var pathOffset = 0; |
1974 var index; | 2009 var index; |
1975 var subPart; | 2010 var subPart; |
1976 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2011 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
1977 pathOffset += 1; | 2012 pathOffset += 1; |
1978 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("plus/v1/")); | 2013 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("plus/v1/")); |
(...skipping 19 matching lines...) Expand all Loading... |
1998 var keyvalue = part.split("="); | 2033 var keyvalue = part.split("="); |
1999 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2034 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
2000 } | 2035 } |
2001 } | 2036 } |
2002 | 2037 |
2003 | 2038 |
2004 var h = { | 2039 var h = { |
2005 "content-type" : "application/json; charset=utf-8", | 2040 "content-type" : "application/json; charset=utf-8", |
2006 }; | 2041 }; |
2007 var resp = convert.JSON.encode(buildActivity()); | 2042 var resp = convert.JSON.encode(buildActivity()); |
2008 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2043 return new async.Future.value(stringResponse(200, h, resp)); |
2009 }), true); | 2044 }), true); |
2010 res.get(arg_activityId).then(unittest.expectAsync(((api.Activity response)
{ | 2045 res.get(arg_activityId).then(unittest.expectAsync(((api.Activity response)
{ |
2011 checkActivity(response); | 2046 checkActivity(response); |
2012 }))); | 2047 }))); |
2013 }); | 2048 }); |
2014 | 2049 |
2015 unittest.test("method--list", () { | 2050 unittest.test("method--list", () { |
2016 | 2051 |
2017 var mock = new common_test.HttpServerMock(); | 2052 var mock = new HttpServerMock(); |
2018 api.ActivitiesResourceApi res = new api.PlusApi(mock).activities; | 2053 api.ActivitiesResourceApi res = new api.PlusApi(mock).activities; |
2019 var arg_userId = "foo"; | 2054 var arg_userId = "foo"; |
2020 var arg_collection = "foo"; | 2055 var arg_collection = "foo"; |
2021 var arg_maxResults = 42; | 2056 var arg_maxResults = 42; |
2022 var arg_pageToken = "foo"; | 2057 var arg_pageToken = "foo"; |
2023 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2058 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2024 var path = (req.url).path; | 2059 var path = (req.url).path; |
2025 var pathOffset = 0; | 2060 var pathOffset = 0; |
2026 var index; | 2061 var index; |
2027 var subPart; | 2062 var subPart; |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2059 } | 2094 } |
2060 } | 2095 } |
2061 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | 2096 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); |
2062 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 2097 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
2063 | 2098 |
2064 | 2099 |
2065 var h = { | 2100 var h = { |
2066 "content-type" : "application/json; charset=utf-8", | 2101 "content-type" : "application/json; charset=utf-8", |
2067 }; | 2102 }; |
2068 var resp = convert.JSON.encode(buildActivityFeed()); | 2103 var resp = convert.JSON.encode(buildActivityFeed()); |
2069 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2104 return new async.Future.value(stringResponse(200, h, resp)); |
2070 }), true); | 2105 }), true); |
2071 res.list(arg_userId, arg_collection, maxResults: arg_maxResults, pageToken
: arg_pageToken).then(unittest.expectAsync(((api.ActivityFeed response) { | 2106 res.list(arg_userId, arg_collection, maxResults: arg_maxResults, pageToken
: arg_pageToken).then(unittest.expectAsync(((api.ActivityFeed response) { |
2072 checkActivityFeed(response); | 2107 checkActivityFeed(response); |
2073 }))); | 2108 }))); |
2074 }); | 2109 }); |
2075 | 2110 |
2076 unittest.test("method--search", () { | 2111 unittest.test("method--search", () { |
2077 | 2112 |
2078 var mock = new common_test.HttpServerMock(); | 2113 var mock = new HttpServerMock(); |
2079 api.ActivitiesResourceApi res = new api.PlusApi(mock).activities; | 2114 api.ActivitiesResourceApi res = new api.PlusApi(mock).activities; |
2080 var arg_query = "foo"; | 2115 var arg_query = "foo"; |
2081 var arg_language = "foo"; | 2116 var arg_language = "foo"; |
2082 var arg_maxResults = 42; | 2117 var arg_maxResults = 42; |
2083 var arg_orderBy = "foo"; | 2118 var arg_orderBy = "foo"; |
2084 var arg_pageToken = "foo"; | 2119 var arg_pageToken = "foo"; |
2085 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2120 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2086 var path = (req.url).path; | 2121 var path = (req.url).path; |
2087 var pathOffset = 0; | 2122 var pathOffset = 0; |
2088 var index; | 2123 var index; |
(...skipping 25 matching lines...) Expand all Loading... |
2114 unittest.expect(queryMap["language"].first, unittest.equals(arg_language
)); | 2149 unittest.expect(queryMap["language"].first, unittest.equals(arg_language
)); |
2115 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | 2150 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); |
2116 unittest.expect(queryMap["orderBy"].first, unittest.equals(arg_orderBy))
; | 2151 unittest.expect(queryMap["orderBy"].first, unittest.equals(arg_orderBy))
; |
2117 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 2152 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
2118 | 2153 |
2119 | 2154 |
2120 var h = { | 2155 var h = { |
2121 "content-type" : "application/json; charset=utf-8", | 2156 "content-type" : "application/json; charset=utf-8", |
2122 }; | 2157 }; |
2123 var resp = convert.JSON.encode(buildActivityFeed()); | 2158 var resp = convert.JSON.encode(buildActivityFeed()); |
2124 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2159 return new async.Future.value(stringResponse(200, h, resp)); |
2125 }), true); | 2160 }), true); |
2126 res.search(arg_query, language: arg_language, maxResults: arg_maxResults,
orderBy: arg_orderBy, pageToken: arg_pageToken).then(unittest.expectAsync(((api.
ActivityFeed response) { | 2161 res.search(arg_query, language: arg_language, maxResults: arg_maxResults,
orderBy: arg_orderBy, pageToken: arg_pageToken).then(unittest.expectAsync(((api.
ActivityFeed response) { |
2127 checkActivityFeed(response); | 2162 checkActivityFeed(response); |
2128 }))); | 2163 }))); |
2129 }); | 2164 }); |
2130 | 2165 |
2131 }); | 2166 }); |
2132 | 2167 |
2133 | 2168 |
2134 unittest.group("resource-CommentsResourceApi", () { | 2169 unittest.group("resource-CommentsResourceApi", () { |
2135 unittest.test("method--get", () { | 2170 unittest.test("method--get", () { |
2136 | 2171 |
2137 var mock = new common_test.HttpServerMock(); | 2172 var mock = new HttpServerMock(); |
2138 api.CommentsResourceApi res = new api.PlusApi(mock).comments; | 2173 api.CommentsResourceApi res = new api.PlusApi(mock).comments; |
2139 var arg_commentId = "foo"; | 2174 var arg_commentId = "foo"; |
2140 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2175 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2141 var path = (req.url).path; | 2176 var path = (req.url).path; |
2142 var pathOffset = 0; | 2177 var pathOffset = 0; |
2143 var index; | 2178 var index; |
2144 var subPart; | 2179 var subPart; |
2145 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2180 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
2146 pathOffset += 1; | 2181 pathOffset += 1; |
2147 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("plus/v1/")); | 2182 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("plus/v1/")); |
(...skipping 19 matching lines...) Expand all Loading... |
2167 var keyvalue = part.split("="); | 2202 var keyvalue = part.split("="); |
2168 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2203 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
2169 } | 2204 } |
2170 } | 2205 } |
2171 | 2206 |
2172 | 2207 |
2173 var h = { | 2208 var h = { |
2174 "content-type" : "application/json; charset=utf-8", | 2209 "content-type" : "application/json; charset=utf-8", |
2175 }; | 2210 }; |
2176 var resp = convert.JSON.encode(buildComment()); | 2211 var resp = convert.JSON.encode(buildComment()); |
2177 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2212 return new async.Future.value(stringResponse(200, h, resp)); |
2178 }), true); | 2213 }), true); |
2179 res.get(arg_commentId).then(unittest.expectAsync(((api.Comment response) { | 2214 res.get(arg_commentId).then(unittest.expectAsync(((api.Comment response) { |
2180 checkComment(response); | 2215 checkComment(response); |
2181 }))); | 2216 }))); |
2182 }); | 2217 }); |
2183 | 2218 |
2184 unittest.test("method--list", () { | 2219 unittest.test("method--list", () { |
2185 | 2220 |
2186 var mock = new common_test.HttpServerMock(); | 2221 var mock = new HttpServerMock(); |
2187 api.CommentsResourceApi res = new api.PlusApi(mock).comments; | 2222 api.CommentsResourceApi res = new api.PlusApi(mock).comments; |
2188 var arg_activityId = "foo"; | 2223 var arg_activityId = "foo"; |
2189 var arg_maxResults = 42; | 2224 var arg_maxResults = 42; |
2190 var arg_pageToken = "foo"; | 2225 var arg_pageToken = "foo"; |
2191 var arg_sortOrder = "foo"; | 2226 var arg_sortOrder = "foo"; |
2192 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2227 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2193 var path = (req.url).path; | 2228 var path = (req.url).path; |
2194 var pathOffset = 0; | 2229 var pathOffset = 0; |
2195 var index; | 2230 var index; |
2196 var subPart; | 2231 var subPart; |
(...skipping 29 matching lines...) Expand all Loading... |
2226 } | 2261 } |
2227 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | 2262 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); |
2228 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 2263 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
2229 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | 2264 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); |
2230 | 2265 |
2231 | 2266 |
2232 var h = { | 2267 var h = { |
2233 "content-type" : "application/json; charset=utf-8", | 2268 "content-type" : "application/json; charset=utf-8", |
2234 }; | 2269 }; |
2235 var resp = convert.JSON.encode(buildCommentFeed()); | 2270 var resp = convert.JSON.encode(buildCommentFeed()); |
2236 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2271 return new async.Future.value(stringResponse(200, h, resp)); |
2237 }), true); | 2272 }), true); |
2238 res.list(arg_activityId, maxResults: arg_maxResults, pageToken: arg_pageTo
ken, sortOrder: arg_sortOrder).then(unittest.expectAsync(((api.CommentFeed respo
nse) { | 2273 res.list(arg_activityId, maxResults: arg_maxResults, pageToken: arg_pageTo
ken, sortOrder: arg_sortOrder).then(unittest.expectAsync(((api.CommentFeed respo
nse) { |
2239 checkCommentFeed(response); | 2274 checkCommentFeed(response); |
2240 }))); | 2275 }))); |
2241 }); | 2276 }); |
2242 | 2277 |
2243 }); | 2278 }); |
2244 | 2279 |
2245 | 2280 |
2246 unittest.group("resource-MomentsResourceApi", () { | 2281 unittest.group("resource-MomentsResourceApi", () { |
2247 unittest.test("method--insert", () { | 2282 unittest.test("method--insert", () { |
2248 | 2283 |
2249 var mock = new common_test.HttpServerMock(); | 2284 var mock = new HttpServerMock(); |
2250 api.MomentsResourceApi res = new api.PlusApi(mock).moments; | 2285 api.MomentsResourceApi res = new api.PlusApi(mock).moments; |
2251 var arg_request = buildMoment(); | 2286 var arg_request = buildMoment(); |
2252 var arg_userId = "foo"; | 2287 var arg_userId = "foo"; |
2253 var arg_collection = "foo"; | 2288 var arg_collection = "foo"; |
2254 var arg_debug = true; | 2289 var arg_debug = true; |
2255 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2290 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2256 var obj = new api.Moment.fromJson(json); | 2291 var obj = new api.Moment.fromJson(json); |
2257 checkMoment(obj); | 2292 checkMoment(obj); |
2258 | 2293 |
2259 var path = (req.url).path; | 2294 var path = (req.url).path; |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2293 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2328 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
2294 } | 2329 } |
2295 } | 2330 } |
2296 unittest.expect(queryMap["debug"].first, unittest.equals("$arg_debug")); | 2331 unittest.expect(queryMap["debug"].first, unittest.equals("$arg_debug")); |
2297 | 2332 |
2298 | 2333 |
2299 var h = { | 2334 var h = { |
2300 "content-type" : "application/json; charset=utf-8", | 2335 "content-type" : "application/json; charset=utf-8", |
2301 }; | 2336 }; |
2302 var resp = convert.JSON.encode(buildMoment()); | 2337 var resp = convert.JSON.encode(buildMoment()); |
2303 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2338 return new async.Future.value(stringResponse(200, h, resp)); |
2304 }), true); | 2339 }), true); |
2305 res.insert(arg_request, arg_userId, arg_collection, debug: arg_debug).then
(unittest.expectAsync(((api.Moment response) { | 2340 res.insert(arg_request, arg_userId, arg_collection, debug: arg_debug).then
(unittest.expectAsync(((api.Moment response) { |
2306 checkMoment(response); | 2341 checkMoment(response); |
2307 }))); | 2342 }))); |
2308 }); | 2343 }); |
2309 | 2344 |
2310 unittest.test("method--list", () { | 2345 unittest.test("method--list", () { |
2311 | 2346 |
2312 var mock = new common_test.HttpServerMock(); | 2347 var mock = new HttpServerMock(); |
2313 api.MomentsResourceApi res = new api.PlusApi(mock).moments; | 2348 api.MomentsResourceApi res = new api.PlusApi(mock).moments; |
2314 var arg_userId = "foo"; | 2349 var arg_userId = "foo"; |
2315 var arg_collection = "foo"; | 2350 var arg_collection = "foo"; |
2316 var arg_maxResults = 42; | 2351 var arg_maxResults = 42; |
2317 var arg_pageToken = "foo"; | 2352 var arg_pageToken = "foo"; |
2318 var arg_targetUrl = "foo"; | 2353 var arg_targetUrl = "foo"; |
2319 var arg_type = "foo"; | 2354 var arg_type = "foo"; |
2320 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2355 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2321 var path = (req.url).path; | 2356 var path = (req.url).path; |
2322 var pathOffset = 0; | 2357 var pathOffset = 0; |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2358 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | 2393 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); |
2359 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 2394 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
2360 unittest.expect(queryMap["targetUrl"].first, unittest.equals(arg_targetU
rl)); | 2395 unittest.expect(queryMap["targetUrl"].first, unittest.equals(arg_targetU
rl)); |
2361 unittest.expect(queryMap["type"].first, unittest.equals(arg_type)); | 2396 unittest.expect(queryMap["type"].first, unittest.equals(arg_type)); |
2362 | 2397 |
2363 | 2398 |
2364 var h = { | 2399 var h = { |
2365 "content-type" : "application/json; charset=utf-8", | 2400 "content-type" : "application/json; charset=utf-8", |
2366 }; | 2401 }; |
2367 var resp = convert.JSON.encode(buildMomentsFeed()); | 2402 var resp = convert.JSON.encode(buildMomentsFeed()); |
2368 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2403 return new async.Future.value(stringResponse(200, h, resp)); |
2369 }), true); | 2404 }), true); |
2370 res.list(arg_userId, arg_collection, maxResults: arg_maxResults, pageToken
: arg_pageToken, targetUrl: arg_targetUrl, type: arg_type).then(unittest.expectA
sync(((api.MomentsFeed response) { | 2405 res.list(arg_userId, arg_collection, maxResults: arg_maxResults, pageToken
: arg_pageToken, targetUrl: arg_targetUrl, type: arg_type).then(unittest.expectA
sync(((api.MomentsFeed response) { |
2371 checkMomentsFeed(response); | 2406 checkMomentsFeed(response); |
2372 }))); | 2407 }))); |
2373 }); | 2408 }); |
2374 | 2409 |
2375 unittest.test("method--remove", () { | 2410 unittest.test("method--remove", () { |
2376 | 2411 |
2377 var mock = new common_test.HttpServerMock(); | 2412 var mock = new HttpServerMock(); |
2378 api.MomentsResourceApi res = new api.PlusApi(mock).moments; | 2413 api.MomentsResourceApi res = new api.PlusApi(mock).moments; |
2379 var arg_id = "foo"; | 2414 var arg_id = "foo"; |
2380 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2415 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2381 var path = (req.url).path; | 2416 var path = (req.url).path; |
2382 var pathOffset = 0; | 2417 var pathOffset = 0; |
2383 var index; | 2418 var index; |
2384 var subPart; | 2419 var subPart; |
2385 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2420 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
2386 pathOffset += 1; | 2421 pathOffset += 1; |
2387 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("plus/v1/")); | 2422 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("plus/v1/")); |
(...skipping 19 matching lines...) Expand all Loading... |
2407 var keyvalue = part.split("="); | 2442 var keyvalue = part.split("="); |
2408 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2443 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
2409 } | 2444 } |
2410 } | 2445 } |
2411 | 2446 |
2412 | 2447 |
2413 var h = { | 2448 var h = { |
2414 "content-type" : "application/json; charset=utf-8", | 2449 "content-type" : "application/json; charset=utf-8", |
2415 }; | 2450 }; |
2416 var resp = ""; | 2451 var resp = ""; |
2417 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2452 return new async.Future.value(stringResponse(200, h, resp)); |
2418 }), true); | 2453 }), true); |
2419 res.remove(arg_id).then(unittest.expectAsync((_) {})); | 2454 res.remove(arg_id).then(unittest.expectAsync((_) {})); |
2420 }); | 2455 }); |
2421 | 2456 |
2422 }); | 2457 }); |
2423 | 2458 |
2424 | 2459 |
2425 unittest.group("resource-PeopleResourceApi", () { | 2460 unittest.group("resource-PeopleResourceApi", () { |
2426 unittest.test("method--get", () { | 2461 unittest.test("method--get", () { |
2427 | 2462 |
2428 var mock = new common_test.HttpServerMock(); | 2463 var mock = new HttpServerMock(); |
2429 api.PeopleResourceApi res = new api.PlusApi(mock).people; | 2464 api.PeopleResourceApi res = new api.PlusApi(mock).people; |
2430 var arg_userId = "foo"; | 2465 var arg_userId = "foo"; |
2431 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2466 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2432 var path = (req.url).path; | 2467 var path = (req.url).path; |
2433 var pathOffset = 0; | 2468 var pathOffset = 0; |
2434 var index; | 2469 var index; |
2435 var subPart; | 2470 var subPart; |
2436 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2471 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
2437 pathOffset += 1; | 2472 pathOffset += 1; |
2438 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("plus/v1/")); | 2473 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("plus/v1/")); |
(...skipping 19 matching lines...) Expand all Loading... |
2458 var keyvalue = part.split("="); | 2493 var keyvalue = part.split("="); |
2459 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2494 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
2460 } | 2495 } |
2461 } | 2496 } |
2462 | 2497 |
2463 | 2498 |
2464 var h = { | 2499 var h = { |
2465 "content-type" : "application/json; charset=utf-8", | 2500 "content-type" : "application/json; charset=utf-8", |
2466 }; | 2501 }; |
2467 var resp = convert.JSON.encode(buildPerson()); | 2502 var resp = convert.JSON.encode(buildPerson()); |
2468 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2503 return new async.Future.value(stringResponse(200, h, resp)); |
2469 }), true); | 2504 }), true); |
2470 res.get(arg_userId).then(unittest.expectAsync(((api.Person response) { | 2505 res.get(arg_userId).then(unittest.expectAsync(((api.Person response) { |
2471 checkPerson(response); | 2506 checkPerson(response); |
2472 }))); | 2507 }))); |
2473 }); | 2508 }); |
2474 | 2509 |
2475 unittest.test("method--list", () { | 2510 unittest.test("method--list", () { |
2476 | 2511 |
2477 var mock = new common_test.HttpServerMock(); | 2512 var mock = new HttpServerMock(); |
2478 api.PeopleResourceApi res = new api.PlusApi(mock).people; | 2513 api.PeopleResourceApi res = new api.PlusApi(mock).people; |
2479 var arg_userId = "foo"; | 2514 var arg_userId = "foo"; |
2480 var arg_collection = "foo"; | 2515 var arg_collection = "foo"; |
2481 var arg_maxResults = 42; | 2516 var arg_maxResults = 42; |
2482 var arg_orderBy = "foo"; | 2517 var arg_orderBy = "foo"; |
2483 var arg_pageToken = "foo"; | 2518 var arg_pageToken = "foo"; |
2484 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2519 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2485 var path = (req.url).path; | 2520 var path = (req.url).path; |
2486 var pathOffset = 0; | 2521 var pathOffset = 0; |
2487 var index; | 2522 var index; |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2521 } | 2556 } |
2522 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | 2557 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); |
2523 unittest.expect(queryMap["orderBy"].first, unittest.equals(arg_orderBy))
; | 2558 unittest.expect(queryMap["orderBy"].first, unittest.equals(arg_orderBy))
; |
2524 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 2559 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
2525 | 2560 |
2526 | 2561 |
2527 var h = { | 2562 var h = { |
2528 "content-type" : "application/json; charset=utf-8", | 2563 "content-type" : "application/json; charset=utf-8", |
2529 }; | 2564 }; |
2530 var resp = convert.JSON.encode(buildPeopleFeed()); | 2565 var resp = convert.JSON.encode(buildPeopleFeed()); |
2531 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2566 return new async.Future.value(stringResponse(200, h, resp)); |
2532 }), true); | 2567 }), true); |
2533 res.list(arg_userId, arg_collection, maxResults: arg_maxResults, orderBy:
arg_orderBy, pageToken: arg_pageToken).then(unittest.expectAsync(((api.PeopleFee
d response) { | 2568 res.list(arg_userId, arg_collection, maxResults: arg_maxResults, orderBy:
arg_orderBy, pageToken: arg_pageToken).then(unittest.expectAsync(((api.PeopleFee
d response) { |
2534 checkPeopleFeed(response); | 2569 checkPeopleFeed(response); |
2535 }))); | 2570 }))); |
2536 }); | 2571 }); |
2537 | 2572 |
2538 unittest.test("method--listByActivity", () { | 2573 unittest.test("method--listByActivity", () { |
2539 | 2574 |
2540 var mock = new common_test.HttpServerMock(); | 2575 var mock = new HttpServerMock(); |
2541 api.PeopleResourceApi res = new api.PlusApi(mock).people; | 2576 api.PeopleResourceApi res = new api.PlusApi(mock).people; |
2542 var arg_activityId = "foo"; | 2577 var arg_activityId = "foo"; |
2543 var arg_collection = "foo"; | 2578 var arg_collection = "foo"; |
2544 var arg_maxResults = 42; | 2579 var arg_maxResults = 42; |
2545 var arg_pageToken = "foo"; | 2580 var arg_pageToken = "foo"; |
2546 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2581 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2547 var path = (req.url).path; | 2582 var path = (req.url).path; |
2548 var pathOffset = 0; | 2583 var pathOffset = 0; |
2549 var index; | 2584 var index; |
2550 var subPart; | 2585 var subPart; |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2582 } | 2617 } |
2583 } | 2618 } |
2584 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | 2619 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); |
2585 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 2620 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
2586 | 2621 |
2587 | 2622 |
2588 var h = { | 2623 var h = { |
2589 "content-type" : "application/json; charset=utf-8", | 2624 "content-type" : "application/json; charset=utf-8", |
2590 }; | 2625 }; |
2591 var resp = convert.JSON.encode(buildPeopleFeed()); | 2626 var resp = convert.JSON.encode(buildPeopleFeed()); |
2592 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2627 return new async.Future.value(stringResponse(200, h, resp)); |
2593 }), true); | 2628 }), true); |
2594 res.listByActivity(arg_activityId, arg_collection, maxResults: arg_maxResu
lts, pageToken: arg_pageToken).then(unittest.expectAsync(((api.PeopleFeed respon
se) { | 2629 res.listByActivity(arg_activityId, arg_collection, maxResults: arg_maxResu
lts, pageToken: arg_pageToken).then(unittest.expectAsync(((api.PeopleFeed respon
se) { |
2595 checkPeopleFeed(response); | 2630 checkPeopleFeed(response); |
2596 }))); | 2631 }))); |
2597 }); | 2632 }); |
2598 | 2633 |
2599 unittest.test("method--search", () { | 2634 unittest.test("method--search", () { |
2600 | 2635 |
2601 var mock = new common_test.HttpServerMock(); | 2636 var mock = new HttpServerMock(); |
2602 api.PeopleResourceApi res = new api.PlusApi(mock).people; | 2637 api.PeopleResourceApi res = new api.PlusApi(mock).people; |
2603 var arg_query = "foo"; | 2638 var arg_query = "foo"; |
2604 var arg_language = "foo"; | 2639 var arg_language = "foo"; |
2605 var arg_maxResults = 42; | 2640 var arg_maxResults = 42; |
2606 var arg_pageToken = "foo"; | 2641 var arg_pageToken = "foo"; |
2607 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2642 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2608 var path = (req.url).path; | 2643 var path = (req.url).path; |
2609 var pathOffset = 0; | 2644 var pathOffset = 0; |
2610 var index; | 2645 var index; |
2611 var subPart; | 2646 var subPart; |
(...skipping 23 matching lines...) Expand all Loading... |
2635 unittest.expect(queryMap["query"].first, unittest.equals(arg_query)); | 2670 unittest.expect(queryMap["query"].first, unittest.equals(arg_query)); |
2636 unittest.expect(queryMap["language"].first, unittest.equals(arg_language
)); | 2671 unittest.expect(queryMap["language"].first, unittest.equals(arg_language
)); |
2637 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | 2672 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); |
2638 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 2673 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
2639 | 2674 |
2640 | 2675 |
2641 var h = { | 2676 var h = { |
2642 "content-type" : "application/json; charset=utf-8", | 2677 "content-type" : "application/json; charset=utf-8", |
2643 }; | 2678 }; |
2644 var resp = convert.JSON.encode(buildPeopleFeed()); | 2679 var resp = convert.JSON.encode(buildPeopleFeed()); |
2645 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2680 return new async.Future.value(stringResponse(200, h, resp)); |
2646 }), true); | 2681 }), true); |
2647 res.search(arg_query, language: arg_language, maxResults: arg_maxResults,
pageToken: arg_pageToken).then(unittest.expectAsync(((api.PeopleFeed response) { | 2682 res.search(arg_query, language: arg_language, maxResults: arg_maxResults,
pageToken: arg_pageToken).then(unittest.expectAsync(((api.PeopleFeed response) { |
2648 checkPeopleFeed(response); | 2683 checkPeopleFeed(response); |
2649 }))); | 2684 }))); |
2650 }); | 2685 }); |
2651 | 2686 |
2652 }); | 2687 }); |
2653 | 2688 |
2654 | 2689 |
2655 } | 2690 } |
2656 | 2691 |
OLD | NEW |