| 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; | |
| 5 import "dart:async" as async; | 4 import "dart:async" as async; |
| 6 import "dart:convert" as convert; | 5 import "dart:convert" as convert; |
| 7 | 6 |
| 8 import 'package:http/http.dart' as http; | 7 import 'package:http/http.dart' as http; |
| 9 import 'package:http/testing.dart' as http_testing; | |
| 10 import 'package:test/test.dart' as unittest; | 8 import 'package:test/test.dart' as unittest; |
| 11 | 9 |
| 12 import 'package:googleapis/plus/v1.dart' as api; | 10 import 'package:googleapis/plus/v1.dart' as api; |
| 13 | 11 |
| 14 class HttpServerMock extends http.BaseClient { | 12 class HttpServerMock extends http.BaseClient { |
| 15 core.Function _callback; | 13 core.Function _callback; |
| 16 core.bool _expectJson; | 14 core.bool _expectJson; |
| 17 | 15 |
| 18 void register(core.Function callback, core.bool expectJson) { | 16 void register(core.Function callback, core.bool expectJson) { |
| 19 _callback = callback; | 17 _callback = callback; |
| 20 _expectJson = expectJson; | 18 _expectJson = expectJson; |
| 21 } | 19 } |
| 22 | 20 |
| 23 async.Future<http.StreamedResponse> send(http.BaseRequest request) { | 21 async.Future<http.StreamedResponse> send(http.BaseRequest request) { |
| 24 if (_expectJson) { | 22 if (_expectJson) { |
| 25 return request.finalize() | 23 return request |
| 24 .finalize() |
| 26 .transform(convert.UTF8.decoder) | 25 .transform(convert.UTF8.decoder) |
| 27 .join('') | 26 .join('') |
| 28 .then((core.String jsonString) { | 27 .then((core.String jsonString) { |
| 29 if (jsonString.isEmpty) { | 28 if (jsonString.isEmpty) { |
| 30 return _callback(request, null); | 29 return _callback(request, null); |
| 31 } else { | 30 } else { |
| 32 return _callback(request, convert.JSON.decode(jsonString)); | 31 return _callback(request, convert.JSON.decode(jsonString)); |
| 33 } | 32 } |
| 34 }); | 33 }); |
| 35 } else { | 34 } else { |
| 36 var stream = request.finalize(); | 35 var stream = request.finalize(); |
| 37 if (stream == null) { | 36 if (stream == null) { |
| 38 return _callback(request, []); | 37 return _callback(request, []); |
| 39 } else { | 38 } else { |
| 40 return stream.toBytes().then((data) { | 39 return stream.toBytes().then((data) { |
| 41 return _callback(request, data); | 40 return _callback(request, data); |
| 42 }); | 41 }); |
| 43 } | 42 } |
| 44 } | 43 } |
| 45 } | 44 } |
| 46 } | 45 } |
| 47 | 46 |
| 48 http.StreamedResponse stringResponse( | 47 http.StreamedResponse stringResponse(core.int status, |
| 49 core.int status, core.Map<core.String, core.String> headers, core.String bod
y) { | 48 core.Map<core.String, core.String> headers, core.String body) { |
| 50 var stream = new async.Stream.fromIterable([convert.UTF8.encode(body)]); | 49 var stream = new async.Stream.fromIterable([convert.UTF8.encode(body)]); |
| 51 return new http.StreamedResponse(stream, status, headers: headers); | 50 return new http.StreamedResponse(stream, status, headers: headers); |
| 52 } | 51 } |
| 53 | 52 |
| 54 buildUnnamed155() { | 53 buildUnnamed150() { |
| 55 var o = new core.List<api.PlusAclentryResource>(); | 54 var o = new core.List<api.PlusAclentryResource>(); |
| 56 o.add(buildPlusAclentryResource()); | 55 o.add(buildPlusAclentryResource()); |
| 57 o.add(buildPlusAclentryResource()); | 56 o.add(buildPlusAclentryResource()); |
| 58 return o; | 57 return o; |
| 59 } | 58 } |
| 60 | 59 |
| 61 checkUnnamed155(core.List<api.PlusAclentryResource> o) { | 60 checkUnnamed150(core.List<api.PlusAclentryResource> o) { |
| 62 unittest.expect(o, unittest.hasLength(2)); | 61 unittest.expect(o, unittest.hasLength(2)); |
| 63 checkPlusAclentryResource(o[0]); | 62 checkPlusAclentryResource(o[0]); |
| 64 checkPlusAclentryResource(o[1]); | 63 checkPlusAclentryResource(o[1]); |
| 65 } | 64 } |
| 66 | 65 |
| 67 core.int buildCounterAcl = 0; | 66 core.int buildCounterAcl = 0; |
| 68 buildAcl() { | 67 buildAcl() { |
| 69 var o = new api.Acl(); | 68 var o = new api.Acl(); |
| 70 buildCounterAcl++; | 69 buildCounterAcl++; |
| 71 if (buildCounterAcl < 3) { | 70 if (buildCounterAcl < 3) { |
| 72 o.description = "foo"; | 71 o.description = "foo"; |
| 73 o.items = buildUnnamed155(); | 72 o.items = buildUnnamed150(); |
| 74 o.kind = "foo"; | 73 o.kind = "foo"; |
| 75 } | 74 } |
| 76 buildCounterAcl--; | 75 buildCounterAcl--; |
| 77 return o; | 76 return o; |
| 78 } | 77 } |
| 79 | 78 |
| 80 checkAcl(api.Acl o) { | 79 checkAcl(api.Acl o) { |
| 81 buildCounterAcl++; | 80 buildCounterAcl++; |
| 82 if (buildCounterAcl < 3) { | 81 if (buildCounterAcl < 3) { |
| 83 unittest.expect(o.description, unittest.equals('foo')); | 82 unittest.expect(o.description, unittest.equals('foo')); |
| 84 checkUnnamed155(o.items); | 83 checkUnnamed150(o.items); |
| 85 unittest.expect(o.kind, unittest.equals('foo')); | 84 unittest.expect(o.kind, unittest.equals('foo')); |
| 86 } | 85 } |
| 87 buildCounterAcl--; | 86 buildCounterAcl--; |
| 88 } | 87 } |
| 89 | 88 |
| 90 core.int buildCounterActivityActorClientSpecificActorInfoYoutubeActorInfo = 0; | 89 core.int buildCounterActivityActorClientSpecificActorInfoYoutubeActorInfo = 0; |
| 91 buildActivityActorClientSpecificActorInfoYoutubeActorInfo() { | 90 buildActivityActorClientSpecificActorInfoYoutubeActorInfo() { |
| 92 var o = new api.ActivityActorClientSpecificActorInfoYoutubeActorInfo(); | 91 var o = new api.ActivityActorClientSpecificActorInfoYoutubeActorInfo(); |
| 93 buildCounterActivityActorClientSpecificActorInfoYoutubeActorInfo++; | 92 buildCounterActivityActorClientSpecificActorInfoYoutubeActorInfo++; |
| 94 if (buildCounterActivityActorClientSpecificActorInfoYoutubeActorInfo < 3) { | 93 if (buildCounterActivityActorClientSpecificActorInfoYoutubeActorInfo < 3) { |
| 95 o.channelId = "foo"; | 94 o.channelId = "foo"; |
| 96 } | 95 } |
| 97 buildCounterActivityActorClientSpecificActorInfoYoutubeActorInfo--; | 96 buildCounterActivityActorClientSpecificActorInfoYoutubeActorInfo--; |
| 98 return o; | 97 return o; |
| 99 } | 98 } |
| 100 | 99 |
| 101 checkActivityActorClientSpecificActorInfoYoutubeActorInfo(api.ActivityActorClien
tSpecificActorInfoYoutubeActorInfo o) { | 100 checkActivityActorClientSpecificActorInfoYoutubeActorInfo( |
| 101 api.ActivityActorClientSpecificActorInfoYoutubeActorInfo o) { |
| 102 buildCounterActivityActorClientSpecificActorInfoYoutubeActorInfo++; | 102 buildCounterActivityActorClientSpecificActorInfoYoutubeActorInfo++; |
| 103 if (buildCounterActivityActorClientSpecificActorInfoYoutubeActorInfo < 3) { | 103 if (buildCounterActivityActorClientSpecificActorInfoYoutubeActorInfo < 3) { |
| 104 unittest.expect(o.channelId, unittest.equals('foo')); | 104 unittest.expect(o.channelId, unittest.equals('foo')); |
| 105 } | 105 } |
| 106 buildCounterActivityActorClientSpecificActorInfoYoutubeActorInfo--; | 106 buildCounterActivityActorClientSpecificActorInfoYoutubeActorInfo--; |
| 107 } | 107 } |
| 108 | 108 |
| 109 core.int buildCounterActivityActorClientSpecificActorInfo = 0; | 109 core.int buildCounterActivityActorClientSpecificActorInfo = 0; |
| 110 buildActivityActorClientSpecificActorInfo() { | 110 buildActivityActorClientSpecificActorInfo() { |
| 111 var o = new api.ActivityActorClientSpecificActorInfo(); | 111 var o = new api.ActivityActorClientSpecificActorInfo(); |
| 112 buildCounterActivityActorClientSpecificActorInfo++; | 112 buildCounterActivityActorClientSpecificActorInfo++; |
| 113 if (buildCounterActivityActorClientSpecificActorInfo < 3) { | 113 if (buildCounterActivityActorClientSpecificActorInfo < 3) { |
| 114 o.youtubeActorInfo = buildActivityActorClientSpecificActorInfoYoutubeActorIn
fo(); | 114 o.youtubeActorInfo = |
| 115 buildActivityActorClientSpecificActorInfoYoutubeActorInfo(); |
| 115 } | 116 } |
| 116 buildCounterActivityActorClientSpecificActorInfo--; | 117 buildCounterActivityActorClientSpecificActorInfo--; |
| 117 return o; | 118 return o; |
| 118 } | 119 } |
| 119 | 120 |
| 120 checkActivityActorClientSpecificActorInfo(api.ActivityActorClientSpecificActorIn
fo o) { | 121 checkActivityActorClientSpecificActorInfo( |
| 122 api.ActivityActorClientSpecificActorInfo o) { |
| 121 buildCounterActivityActorClientSpecificActorInfo++; | 123 buildCounterActivityActorClientSpecificActorInfo++; |
| 122 if (buildCounterActivityActorClientSpecificActorInfo < 3) { | 124 if (buildCounterActivityActorClientSpecificActorInfo < 3) { |
| 123 checkActivityActorClientSpecificActorInfoYoutubeActorInfo(o.youtubeActorInfo
); | 125 checkActivityActorClientSpecificActorInfoYoutubeActorInfo( |
| 126 o.youtubeActorInfo); |
| 124 } | 127 } |
| 125 buildCounterActivityActorClientSpecificActorInfo--; | 128 buildCounterActivityActorClientSpecificActorInfo--; |
| 126 } | 129 } |
| 127 | 130 |
| 128 core.int buildCounterActivityActorImage = 0; | 131 core.int buildCounterActivityActorImage = 0; |
| 129 buildActivityActorImage() { | 132 buildActivityActorImage() { |
| 130 var o = new api.ActivityActorImage(); | 133 var o = new api.ActivityActorImage(); |
| 131 buildCounterActivityActorImage++; | 134 buildCounterActivityActorImage++; |
| 132 if (buildCounterActivityActorImage < 3) { | 135 if (buildCounterActivityActorImage < 3) { |
| 133 o.url = "foo"; | 136 o.url = "foo"; |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 208 unittest.expect(o.displayName, unittest.equals('foo')); | 211 unittest.expect(o.displayName, unittest.equals('foo')); |
| 209 unittest.expect(o.id, unittest.equals('foo')); | 212 unittest.expect(o.id, unittest.equals('foo')); |
| 210 checkActivityActorImage(o.image); | 213 checkActivityActorImage(o.image); |
| 211 checkActivityActorName(o.name); | 214 checkActivityActorName(o.name); |
| 212 unittest.expect(o.url, unittest.equals('foo')); | 215 unittest.expect(o.url, unittest.equals('foo')); |
| 213 checkActivityActorVerification(o.verification); | 216 checkActivityActorVerification(o.verification); |
| 214 } | 217 } |
| 215 buildCounterActivityActor--; | 218 buildCounterActivityActor--; |
| 216 } | 219 } |
| 217 | 220 |
| 218 core.int buildCounterActivityObjectActorClientSpecificActorInfoYoutubeActorInfo
= 0; | 221 core.int |
| 222 buildCounterActivityObjectActorClientSpecificActorInfoYoutubeActorInfo = 0; |
| 219 buildActivityObjectActorClientSpecificActorInfoYoutubeActorInfo() { | 223 buildActivityObjectActorClientSpecificActorInfoYoutubeActorInfo() { |
| 220 var o = new api.ActivityObjectActorClientSpecificActorInfoYoutubeActorInfo(); | 224 var o = new api.ActivityObjectActorClientSpecificActorInfoYoutubeActorInfo(); |
| 221 buildCounterActivityObjectActorClientSpecificActorInfoYoutubeActorInfo++; | 225 buildCounterActivityObjectActorClientSpecificActorInfoYoutubeActorInfo++; |
| 222 if (buildCounterActivityObjectActorClientSpecificActorInfoYoutubeActorInfo < 3
) { | 226 if (buildCounterActivityObjectActorClientSpecificActorInfoYoutubeActorInfo < |
| 227 3) { |
| 223 o.channelId = "foo"; | 228 o.channelId = "foo"; |
| 224 } | 229 } |
| 225 buildCounterActivityObjectActorClientSpecificActorInfoYoutubeActorInfo--; | 230 buildCounterActivityObjectActorClientSpecificActorInfoYoutubeActorInfo--; |
| 226 return o; | 231 return o; |
| 227 } | 232 } |
| 228 | 233 |
| 229 checkActivityObjectActorClientSpecificActorInfoYoutubeActorInfo(api.ActivityObje
ctActorClientSpecificActorInfoYoutubeActorInfo o) { | 234 checkActivityObjectActorClientSpecificActorInfoYoutubeActorInfo( |
| 235 api.ActivityObjectActorClientSpecificActorInfoYoutubeActorInfo o) { |
| 230 buildCounterActivityObjectActorClientSpecificActorInfoYoutubeActorInfo++; | 236 buildCounterActivityObjectActorClientSpecificActorInfoYoutubeActorInfo++; |
| 231 if (buildCounterActivityObjectActorClientSpecificActorInfoYoutubeActorInfo < 3
) { | 237 if (buildCounterActivityObjectActorClientSpecificActorInfoYoutubeActorInfo < |
| 238 3) { |
| 232 unittest.expect(o.channelId, unittest.equals('foo')); | 239 unittest.expect(o.channelId, unittest.equals('foo')); |
| 233 } | 240 } |
| 234 buildCounterActivityObjectActorClientSpecificActorInfoYoutubeActorInfo--; | 241 buildCounterActivityObjectActorClientSpecificActorInfoYoutubeActorInfo--; |
| 235 } | 242 } |
| 236 | 243 |
| 237 core.int buildCounterActivityObjectActorClientSpecificActorInfo = 0; | 244 core.int buildCounterActivityObjectActorClientSpecificActorInfo = 0; |
| 238 buildActivityObjectActorClientSpecificActorInfo() { | 245 buildActivityObjectActorClientSpecificActorInfo() { |
| 239 var o = new api.ActivityObjectActorClientSpecificActorInfo(); | 246 var o = new api.ActivityObjectActorClientSpecificActorInfo(); |
| 240 buildCounterActivityObjectActorClientSpecificActorInfo++; | 247 buildCounterActivityObjectActorClientSpecificActorInfo++; |
| 241 if (buildCounterActivityObjectActorClientSpecificActorInfo < 3) { | 248 if (buildCounterActivityObjectActorClientSpecificActorInfo < 3) { |
| 242 o.youtubeActorInfo = buildActivityObjectActorClientSpecificActorInfoYoutubeA
ctorInfo(); | 249 o.youtubeActorInfo = |
| 250 buildActivityObjectActorClientSpecificActorInfoYoutubeActorInfo(); |
| 243 } | 251 } |
| 244 buildCounterActivityObjectActorClientSpecificActorInfo--; | 252 buildCounterActivityObjectActorClientSpecificActorInfo--; |
| 245 return o; | 253 return o; |
| 246 } | 254 } |
| 247 | 255 |
| 248 checkActivityObjectActorClientSpecificActorInfo(api.ActivityObjectActorClientSpe
cificActorInfo o) { | 256 checkActivityObjectActorClientSpecificActorInfo( |
| 257 api.ActivityObjectActorClientSpecificActorInfo o) { |
| 249 buildCounterActivityObjectActorClientSpecificActorInfo++; | 258 buildCounterActivityObjectActorClientSpecificActorInfo++; |
| 250 if (buildCounterActivityObjectActorClientSpecificActorInfo < 3) { | 259 if (buildCounterActivityObjectActorClientSpecificActorInfo < 3) { |
| 251 checkActivityObjectActorClientSpecificActorInfoYoutubeActorInfo(o.youtubeAct
orInfo); | 260 checkActivityObjectActorClientSpecificActorInfoYoutubeActorInfo( |
| 261 o.youtubeActorInfo); |
| 252 } | 262 } |
| 253 buildCounterActivityObjectActorClientSpecificActorInfo--; | 263 buildCounterActivityObjectActorClientSpecificActorInfo--; |
| 254 } | 264 } |
| 255 | 265 |
| 256 core.int buildCounterActivityObjectActorImage = 0; | 266 core.int buildCounterActivityObjectActorImage = 0; |
| 257 buildActivityObjectActorImage() { | 267 buildActivityObjectActorImage() { |
| 258 var o = new api.ActivityObjectActorImage(); | 268 var o = new api.ActivityObjectActorImage(); |
| 259 buildCounterActivityObjectActorImage++; | 269 buildCounterActivityObjectActorImage++; |
| 260 if (buildCounterActivityObjectActorImage < 3) { | 270 if (buildCounterActivityObjectActorImage < 3) { |
| 261 o.url = "foo"; | 271 o.url = "foo"; |
| (...skipping 27 matching lines...) Expand all Loading... |
| 289 unittest.expect(o.adHocVerified, unittest.equals('foo')); | 299 unittest.expect(o.adHocVerified, unittest.equals('foo')); |
| 290 } | 300 } |
| 291 buildCounterActivityObjectActorVerification--; | 301 buildCounterActivityObjectActorVerification--; |
| 292 } | 302 } |
| 293 | 303 |
| 294 core.int buildCounterActivityObjectActor = 0; | 304 core.int buildCounterActivityObjectActor = 0; |
| 295 buildActivityObjectActor() { | 305 buildActivityObjectActor() { |
| 296 var o = new api.ActivityObjectActor(); | 306 var o = new api.ActivityObjectActor(); |
| 297 buildCounterActivityObjectActor++; | 307 buildCounterActivityObjectActor++; |
| 298 if (buildCounterActivityObjectActor < 3) { | 308 if (buildCounterActivityObjectActor < 3) { |
| 299 o.clientSpecificActorInfo = buildActivityObjectActorClientSpecificActorInfo(
); | 309 o.clientSpecificActorInfo = |
| 310 buildActivityObjectActorClientSpecificActorInfo(); |
| 300 o.displayName = "foo"; | 311 o.displayName = "foo"; |
| 301 o.id = "foo"; | 312 o.id = "foo"; |
| 302 o.image = buildActivityObjectActorImage(); | 313 o.image = buildActivityObjectActorImage(); |
| 303 o.url = "foo"; | 314 o.url = "foo"; |
| 304 o.verification = buildActivityObjectActorVerification(); | 315 o.verification = buildActivityObjectActorVerification(); |
| 305 } | 316 } |
| 306 buildCounterActivityObjectActor--; | 317 buildCounterActivityObjectActor--; |
| 307 return o; | 318 return o; |
| 308 } | 319 } |
| 309 | 320 |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 348 if (buildCounterActivityObjectAttachmentsFullImage < 3) { | 359 if (buildCounterActivityObjectAttachmentsFullImage < 3) { |
| 349 o.height = 42; | 360 o.height = 42; |
| 350 o.type = "foo"; | 361 o.type = "foo"; |
| 351 o.url = "foo"; | 362 o.url = "foo"; |
| 352 o.width = 42; | 363 o.width = 42; |
| 353 } | 364 } |
| 354 buildCounterActivityObjectAttachmentsFullImage--; | 365 buildCounterActivityObjectAttachmentsFullImage--; |
| 355 return o; | 366 return o; |
| 356 } | 367 } |
| 357 | 368 |
| 358 checkActivityObjectAttachmentsFullImage(api.ActivityObjectAttachmentsFullImage o
) { | 369 checkActivityObjectAttachmentsFullImage( |
| 370 api.ActivityObjectAttachmentsFullImage o) { |
| 359 buildCounterActivityObjectAttachmentsFullImage++; | 371 buildCounterActivityObjectAttachmentsFullImage++; |
| 360 if (buildCounterActivityObjectAttachmentsFullImage < 3) { | 372 if (buildCounterActivityObjectAttachmentsFullImage < 3) { |
| 361 unittest.expect(o.height, unittest.equals(42)); | 373 unittest.expect(o.height, unittest.equals(42)); |
| 362 unittest.expect(o.type, unittest.equals('foo')); | 374 unittest.expect(o.type, unittest.equals('foo')); |
| 363 unittest.expect(o.url, unittest.equals('foo')); | 375 unittest.expect(o.url, unittest.equals('foo')); |
| 364 unittest.expect(o.width, unittest.equals(42)); | 376 unittest.expect(o.width, unittest.equals(42)); |
| 365 } | 377 } |
| 366 buildCounterActivityObjectAttachmentsFullImage--; | 378 buildCounterActivityObjectAttachmentsFullImage--; |
| 367 } | 379 } |
| 368 | 380 |
| (...skipping 29 matching lines...) Expand all Loading... |
| 398 if (buildCounterActivityObjectAttachmentsThumbnailsImage < 3) { | 410 if (buildCounterActivityObjectAttachmentsThumbnailsImage < 3) { |
| 399 o.height = 42; | 411 o.height = 42; |
| 400 o.type = "foo"; | 412 o.type = "foo"; |
| 401 o.url = "foo"; | 413 o.url = "foo"; |
| 402 o.width = 42; | 414 o.width = 42; |
| 403 } | 415 } |
| 404 buildCounterActivityObjectAttachmentsThumbnailsImage--; | 416 buildCounterActivityObjectAttachmentsThumbnailsImage--; |
| 405 return o; | 417 return o; |
| 406 } | 418 } |
| 407 | 419 |
| 408 checkActivityObjectAttachmentsThumbnailsImage(api.ActivityObjectAttachmentsThumb
nailsImage o) { | 420 checkActivityObjectAttachmentsThumbnailsImage( |
| 421 api.ActivityObjectAttachmentsThumbnailsImage o) { |
| 409 buildCounterActivityObjectAttachmentsThumbnailsImage++; | 422 buildCounterActivityObjectAttachmentsThumbnailsImage++; |
| 410 if (buildCounterActivityObjectAttachmentsThumbnailsImage < 3) { | 423 if (buildCounterActivityObjectAttachmentsThumbnailsImage < 3) { |
| 411 unittest.expect(o.height, unittest.equals(42)); | 424 unittest.expect(o.height, unittest.equals(42)); |
| 412 unittest.expect(o.type, unittest.equals('foo')); | 425 unittest.expect(o.type, unittest.equals('foo')); |
| 413 unittest.expect(o.url, unittest.equals('foo')); | 426 unittest.expect(o.url, unittest.equals('foo')); |
| 414 unittest.expect(o.width, unittest.equals(42)); | 427 unittest.expect(o.width, unittest.equals(42)); |
| 415 } | 428 } |
| 416 buildCounterActivityObjectAttachmentsThumbnailsImage--; | 429 buildCounterActivityObjectAttachmentsThumbnailsImage--; |
| 417 } | 430 } |
| 418 | 431 |
| 419 core.int buildCounterActivityObjectAttachmentsThumbnails = 0; | 432 core.int buildCounterActivityObjectAttachmentsThumbnails = 0; |
| 420 buildActivityObjectAttachmentsThumbnails() { | 433 buildActivityObjectAttachmentsThumbnails() { |
| 421 var o = new api.ActivityObjectAttachmentsThumbnails(); | 434 var o = new api.ActivityObjectAttachmentsThumbnails(); |
| 422 buildCounterActivityObjectAttachmentsThumbnails++; | 435 buildCounterActivityObjectAttachmentsThumbnails++; |
| 423 if (buildCounterActivityObjectAttachmentsThumbnails < 3) { | 436 if (buildCounterActivityObjectAttachmentsThumbnails < 3) { |
| 424 o.description = "foo"; | 437 o.description = "foo"; |
| 425 o.image = buildActivityObjectAttachmentsThumbnailsImage(); | 438 o.image = buildActivityObjectAttachmentsThumbnailsImage(); |
| 426 o.url = "foo"; | 439 o.url = "foo"; |
| 427 } | 440 } |
| 428 buildCounterActivityObjectAttachmentsThumbnails--; | 441 buildCounterActivityObjectAttachmentsThumbnails--; |
| 429 return o; | 442 return o; |
| 430 } | 443 } |
| 431 | 444 |
| 432 checkActivityObjectAttachmentsThumbnails(api.ActivityObjectAttachmentsThumbnails
o) { | 445 checkActivityObjectAttachmentsThumbnails( |
| 446 api.ActivityObjectAttachmentsThumbnails o) { |
| 433 buildCounterActivityObjectAttachmentsThumbnails++; | 447 buildCounterActivityObjectAttachmentsThumbnails++; |
| 434 if (buildCounterActivityObjectAttachmentsThumbnails < 3) { | 448 if (buildCounterActivityObjectAttachmentsThumbnails < 3) { |
| 435 unittest.expect(o.description, unittest.equals('foo')); | 449 unittest.expect(o.description, unittest.equals('foo')); |
| 436 checkActivityObjectAttachmentsThumbnailsImage(o.image); | 450 checkActivityObjectAttachmentsThumbnailsImage(o.image); |
| 437 unittest.expect(o.url, unittest.equals('foo')); | 451 unittest.expect(o.url, unittest.equals('foo')); |
| 438 } | 452 } |
| 439 buildCounterActivityObjectAttachmentsThumbnails--; | 453 buildCounterActivityObjectAttachmentsThumbnails--; |
| 440 } | 454 } |
| 441 | 455 |
| 442 buildUnnamed156() { | 456 buildUnnamed151() { |
| 443 var o = new core.List<api.ActivityObjectAttachmentsThumbnails>(); | 457 var o = new core.List<api.ActivityObjectAttachmentsThumbnails>(); |
| 444 o.add(buildActivityObjectAttachmentsThumbnails()); | 458 o.add(buildActivityObjectAttachmentsThumbnails()); |
| 445 o.add(buildActivityObjectAttachmentsThumbnails()); | 459 o.add(buildActivityObjectAttachmentsThumbnails()); |
| 446 return o; | 460 return o; |
| 447 } | 461 } |
| 448 | 462 |
| 449 checkUnnamed156(core.List<api.ActivityObjectAttachmentsThumbnails> o) { | 463 checkUnnamed151(core.List<api.ActivityObjectAttachmentsThumbnails> o) { |
| 450 unittest.expect(o, unittest.hasLength(2)); | 464 unittest.expect(o, unittest.hasLength(2)); |
| 451 checkActivityObjectAttachmentsThumbnails(o[0]); | 465 checkActivityObjectAttachmentsThumbnails(o[0]); |
| 452 checkActivityObjectAttachmentsThumbnails(o[1]); | 466 checkActivityObjectAttachmentsThumbnails(o[1]); |
| 453 } | 467 } |
| 454 | 468 |
| 455 core.int buildCounterActivityObjectAttachments = 0; | 469 core.int buildCounterActivityObjectAttachments = 0; |
| 456 buildActivityObjectAttachments() { | 470 buildActivityObjectAttachments() { |
| 457 var o = new api.ActivityObjectAttachments(); | 471 var o = new api.ActivityObjectAttachments(); |
| 458 buildCounterActivityObjectAttachments++; | 472 buildCounterActivityObjectAttachments++; |
| 459 if (buildCounterActivityObjectAttachments < 3) { | 473 if (buildCounterActivityObjectAttachments < 3) { |
| 460 o.content = "foo"; | 474 o.content = "foo"; |
| 461 o.displayName = "foo"; | 475 o.displayName = "foo"; |
| 462 o.embed = buildActivityObjectAttachmentsEmbed(); | 476 o.embed = buildActivityObjectAttachmentsEmbed(); |
| 463 o.fullImage = buildActivityObjectAttachmentsFullImage(); | 477 o.fullImage = buildActivityObjectAttachmentsFullImage(); |
| 464 o.id = "foo"; | 478 o.id = "foo"; |
| 465 o.image = buildActivityObjectAttachmentsImage(); | 479 o.image = buildActivityObjectAttachmentsImage(); |
| 466 o.objectType = "foo"; | 480 o.objectType = "foo"; |
| 467 o.thumbnails = buildUnnamed156(); | 481 o.thumbnails = buildUnnamed151(); |
| 468 o.url = "foo"; | 482 o.url = "foo"; |
| 469 } | 483 } |
| 470 buildCounterActivityObjectAttachments--; | 484 buildCounterActivityObjectAttachments--; |
| 471 return o; | 485 return o; |
| 472 } | 486 } |
| 473 | 487 |
| 474 checkActivityObjectAttachments(api.ActivityObjectAttachments o) { | 488 checkActivityObjectAttachments(api.ActivityObjectAttachments o) { |
| 475 buildCounterActivityObjectAttachments++; | 489 buildCounterActivityObjectAttachments++; |
| 476 if (buildCounterActivityObjectAttachments < 3) { | 490 if (buildCounterActivityObjectAttachments < 3) { |
| 477 unittest.expect(o.content, unittest.equals('foo')); | 491 unittest.expect(o.content, unittest.equals('foo')); |
| 478 unittest.expect(o.displayName, unittest.equals('foo')); | 492 unittest.expect(o.displayName, unittest.equals('foo')); |
| 479 checkActivityObjectAttachmentsEmbed(o.embed); | 493 checkActivityObjectAttachmentsEmbed(o.embed); |
| 480 checkActivityObjectAttachmentsFullImage(o.fullImage); | 494 checkActivityObjectAttachmentsFullImage(o.fullImage); |
| 481 unittest.expect(o.id, unittest.equals('foo')); | 495 unittest.expect(o.id, unittest.equals('foo')); |
| 482 checkActivityObjectAttachmentsImage(o.image); | 496 checkActivityObjectAttachmentsImage(o.image); |
| 483 unittest.expect(o.objectType, unittest.equals('foo')); | 497 unittest.expect(o.objectType, unittest.equals('foo')); |
| 484 checkUnnamed156(o.thumbnails); | 498 checkUnnamed151(o.thumbnails); |
| 485 unittest.expect(o.url, unittest.equals('foo')); | 499 unittest.expect(o.url, unittest.equals('foo')); |
| 486 } | 500 } |
| 487 buildCounterActivityObjectAttachments--; | 501 buildCounterActivityObjectAttachments--; |
| 488 } | 502 } |
| 489 | 503 |
| 490 buildUnnamed157() { | 504 buildUnnamed152() { |
| 491 var o = new core.List<api.ActivityObjectAttachments>(); | 505 var o = new core.List<api.ActivityObjectAttachments>(); |
| 492 o.add(buildActivityObjectAttachments()); | 506 o.add(buildActivityObjectAttachments()); |
| 493 o.add(buildActivityObjectAttachments()); | 507 o.add(buildActivityObjectAttachments()); |
| 494 return o; | 508 return o; |
| 495 } | 509 } |
| 496 | 510 |
| 497 checkUnnamed157(core.List<api.ActivityObjectAttachments> o) { | 511 checkUnnamed152(core.List<api.ActivityObjectAttachments> o) { |
| 498 unittest.expect(o, unittest.hasLength(2)); | 512 unittest.expect(o, unittest.hasLength(2)); |
| 499 checkActivityObjectAttachments(o[0]); | 513 checkActivityObjectAttachments(o[0]); |
| 500 checkActivityObjectAttachments(o[1]); | 514 checkActivityObjectAttachments(o[1]); |
| 501 } | 515 } |
| 502 | 516 |
| 503 core.int buildCounterActivityObjectPlusoners = 0; | 517 core.int buildCounterActivityObjectPlusoners = 0; |
| 504 buildActivityObjectPlusoners() { | 518 buildActivityObjectPlusoners() { |
| 505 var o = new api.ActivityObjectPlusoners(); | 519 var o = new api.ActivityObjectPlusoners(); |
| 506 buildCounterActivityObjectPlusoners++; | 520 buildCounterActivityObjectPlusoners++; |
| 507 if (buildCounterActivityObjectPlusoners < 3) { | 521 if (buildCounterActivityObjectPlusoners < 3) { |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 562 } | 576 } |
| 563 buildCounterActivityObjectResharers--; | 577 buildCounterActivityObjectResharers--; |
| 564 } | 578 } |
| 565 | 579 |
| 566 core.int buildCounterActivityObject = 0; | 580 core.int buildCounterActivityObject = 0; |
| 567 buildActivityObject() { | 581 buildActivityObject() { |
| 568 var o = new api.ActivityObject(); | 582 var o = new api.ActivityObject(); |
| 569 buildCounterActivityObject++; | 583 buildCounterActivityObject++; |
| 570 if (buildCounterActivityObject < 3) { | 584 if (buildCounterActivityObject < 3) { |
| 571 o.actor = buildActivityObjectActor(); | 585 o.actor = buildActivityObjectActor(); |
| 572 o.attachments = buildUnnamed157(); | 586 o.attachments = buildUnnamed152(); |
| 573 o.content = "foo"; | 587 o.content = "foo"; |
| 574 o.id = "foo"; | 588 o.id = "foo"; |
| 575 o.objectType = "foo"; | 589 o.objectType = "foo"; |
| 576 o.originalContent = "foo"; | 590 o.originalContent = "foo"; |
| 577 o.plusoners = buildActivityObjectPlusoners(); | 591 o.plusoners = buildActivityObjectPlusoners(); |
| 578 o.replies = buildActivityObjectReplies(); | 592 o.replies = buildActivityObjectReplies(); |
| 579 o.resharers = buildActivityObjectResharers(); | 593 o.resharers = buildActivityObjectResharers(); |
| 580 o.url = "foo"; | 594 o.url = "foo"; |
| 581 } | 595 } |
| 582 buildCounterActivityObject--; | 596 buildCounterActivityObject--; |
| 583 return o; | 597 return o; |
| 584 } | 598 } |
| 585 | 599 |
| 586 checkActivityObject(api.ActivityObject o) { | 600 checkActivityObject(api.ActivityObject o) { |
| 587 buildCounterActivityObject++; | 601 buildCounterActivityObject++; |
| 588 if (buildCounterActivityObject < 3) { | 602 if (buildCounterActivityObject < 3) { |
| 589 checkActivityObjectActor(o.actor); | 603 checkActivityObjectActor(o.actor); |
| 590 checkUnnamed157(o.attachments); | 604 checkUnnamed152(o.attachments); |
| 591 unittest.expect(o.content, unittest.equals('foo')); | 605 unittest.expect(o.content, unittest.equals('foo')); |
| 592 unittest.expect(o.id, unittest.equals('foo')); | 606 unittest.expect(o.id, unittest.equals('foo')); |
| 593 unittest.expect(o.objectType, unittest.equals('foo')); | 607 unittest.expect(o.objectType, unittest.equals('foo')); |
| 594 unittest.expect(o.originalContent, unittest.equals('foo')); | 608 unittest.expect(o.originalContent, unittest.equals('foo')); |
| 595 checkActivityObjectPlusoners(o.plusoners); | 609 checkActivityObjectPlusoners(o.plusoners); |
| 596 checkActivityObjectReplies(o.replies); | 610 checkActivityObjectReplies(o.replies); |
| 597 checkActivityObjectResharers(o.resharers); | 611 checkActivityObjectResharers(o.resharers); |
| 598 unittest.expect(o.url, unittest.equals('foo')); | 612 unittest.expect(o.url, unittest.equals('foo')); |
| 599 } | 613 } |
| 600 buildCounterActivityObject--; | 614 buildCounterActivityObject--; |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 659 unittest.expect(o.crosspostSource, unittest.equals('foo')); | 673 unittest.expect(o.crosspostSource, unittest.equals('foo')); |
| 660 unittest.expect(o.etag, unittest.equals('foo')); | 674 unittest.expect(o.etag, unittest.equals('foo')); |
| 661 unittest.expect(o.geocode, unittest.equals('foo')); | 675 unittest.expect(o.geocode, unittest.equals('foo')); |
| 662 unittest.expect(o.id, unittest.equals('foo')); | 676 unittest.expect(o.id, unittest.equals('foo')); |
| 663 unittest.expect(o.kind, unittest.equals('foo')); | 677 unittest.expect(o.kind, unittest.equals('foo')); |
| 664 checkPlace(o.location); | 678 checkPlace(o.location); |
| 665 checkActivityObject(o.object); | 679 checkActivityObject(o.object); |
| 666 unittest.expect(o.placeId, unittest.equals('foo')); | 680 unittest.expect(o.placeId, unittest.equals('foo')); |
| 667 unittest.expect(o.placeName, unittest.equals('foo')); | 681 unittest.expect(o.placeName, unittest.equals('foo')); |
| 668 checkActivityProvider(o.provider); | 682 checkActivityProvider(o.provider); |
| 669 unittest.expect(o.published, unittest.equals(core.DateTime.parse("2002-02-27
T14:01:02"))); | 683 unittest.expect(o.published, |
| 684 unittest.equals(core.DateTime.parse("2002-02-27T14:01:02"))); |
| 670 unittest.expect(o.radius, unittest.equals('foo')); | 685 unittest.expect(o.radius, unittest.equals('foo')); |
| 671 unittest.expect(o.title, unittest.equals('foo')); | 686 unittest.expect(o.title, unittest.equals('foo')); |
| 672 unittest.expect(o.updated, unittest.equals(core.DateTime.parse("2002-02-27T1
4:01:02"))); | 687 unittest.expect( |
| 688 o.updated, unittest.equals(core.DateTime.parse("2002-02-27T14:01:02"))); |
| 673 unittest.expect(o.url, unittest.equals('foo')); | 689 unittest.expect(o.url, unittest.equals('foo')); |
| 674 unittest.expect(o.verb, unittest.equals('foo')); | 690 unittest.expect(o.verb, unittest.equals('foo')); |
| 675 } | 691 } |
| 676 buildCounterActivity--; | 692 buildCounterActivity--; |
| 677 } | 693 } |
| 678 | 694 |
| 679 buildUnnamed158() { | 695 buildUnnamed153() { |
| 680 var o = new core.List<api.Activity>(); | 696 var o = new core.List<api.Activity>(); |
| 681 o.add(buildActivity()); | 697 o.add(buildActivity()); |
| 682 o.add(buildActivity()); | 698 o.add(buildActivity()); |
| 683 return o; | 699 return o; |
| 684 } | 700 } |
| 685 | 701 |
| 686 checkUnnamed158(core.List<api.Activity> o) { | 702 checkUnnamed153(core.List<api.Activity> o) { |
| 687 unittest.expect(o, unittest.hasLength(2)); | 703 unittest.expect(o, unittest.hasLength(2)); |
| 688 checkActivity(o[0]); | 704 checkActivity(o[0]); |
| 689 checkActivity(o[1]); | 705 checkActivity(o[1]); |
| 690 } | 706 } |
| 691 | 707 |
| 692 core.int buildCounterActivityFeed = 0; | 708 core.int buildCounterActivityFeed = 0; |
| 693 buildActivityFeed() { | 709 buildActivityFeed() { |
| 694 var o = new api.ActivityFeed(); | 710 var o = new api.ActivityFeed(); |
| 695 buildCounterActivityFeed++; | 711 buildCounterActivityFeed++; |
| 696 if (buildCounterActivityFeed < 3) { | 712 if (buildCounterActivityFeed < 3) { |
| 697 o.etag = "foo"; | 713 o.etag = "foo"; |
| 698 o.id = "foo"; | 714 o.id = "foo"; |
| 699 o.items = buildUnnamed158(); | 715 o.items = buildUnnamed153(); |
| 700 o.kind = "foo"; | 716 o.kind = "foo"; |
| 701 o.nextLink = "foo"; | 717 o.nextLink = "foo"; |
| 702 o.nextPageToken = "foo"; | 718 o.nextPageToken = "foo"; |
| 703 o.selfLink = "foo"; | 719 o.selfLink = "foo"; |
| 704 o.title = "foo"; | 720 o.title = "foo"; |
| 705 o.updated = core.DateTime.parse("2002-02-27T14:01:02"); | 721 o.updated = core.DateTime.parse("2002-02-27T14:01:02"); |
| 706 } | 722 } |
| 707 buildCounterActivityFeed--; | 723 buildCounterActivityFeed--; |
| 708 return o; | 724 return o; |
| 709 } | 725 } |
| 710 | 726 |
| 711 checkActivityFeed(api.ActivityFeed o) { | 727 checkActivityFeed(api.ActivityFeed o) { |
| 712 buildCounterActivityFeed++; | 728 buildCounterActivityFeed++; |
| 713 if (buildCounterActivityFeed < 3) { | 729 if (buildCounterActivityFeed < 3) { |
| 714 unittest.expect(o.etag, unittest.equals('foo')); | 730 unittest.expect(o.etag, unittest.equals('foo')); |
| 715 unittest.expect(o.id, unittest.equals('foo')); | 731 unittest.expect(o.id, unittest.equals('foo')); |
| 716 checkUnnamed158(o.items); | 732 checkUnnamed153(o.items); |
| 717 unittest.expect(o.kind, unittest.equals('foo')); | 733 unittest.expect(o.kind, unittest.equals('foo')); |
| 718 unittest.expect(o.nextLink, unittest.equals('foo')); | 734 unittest.expect(o.nextLink, unittest.equals('foo')); |
| 719 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 735 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 720 unittest.expect(o.selfLink, unittest.equals('foo')); | 736 unittest.expect(o.selfLink, unittest.equals('foo')); |
| 721 unittest.expect(o.title, unittest.equals('foo')); | 737 unittest.expect(o.title, unittest.equals('foo')); |
| 722 unittest.expect(o.updated, unittest.equals(core.DateTime.parse("2002-02-27T1
4:01:02"))); | 738 unittest.expect( |
| 739 o.updated, unittest.equals(core.DateTime.parse("2002-02-27T14:01:02"))); |
| 723 } | 740 } |
| 724 buildCounterActivityFeed--; | 741 buildCounterActivityFeed--; |
| 725 } | 742 } |
| 726 | 743 |
| 727 core.int buildCounterCommentActorClientSpecificActorInfoYoutubeActorInfo = 0; | 744 core.int buildCounterCommentActorClientSpecificActorInfoYoutubeActorInfo = 0; |
| 728 buildCommentActorClientSpecificActorInfoYoutubeActorInfo() { | 745 buildCommentActorClientSpecificActorInfoYoutubeActorInfo() { |
| 729 var o = new api.CommentActorClientSpecificActorInfoYoutubeActorInfo(); | 746 var o = new api.CommentActorClientSpecificActorInfoYoutubeActorInfo(); |
| 730 buildCounterCommentActorClientSpecificActorInfoYoutubeActorInfo++; | 747 buildCounterCommentActorClientSpecificActorInfoYoutubeActorInfo++; |
| 731 if (buildCounterCommentActorClientSpecificActorInfoYoutubeActorInfo < 3) { | 748 if (buildCounterCommentActorClientSpecificActorInfoYoutubeActorInfo < 3) { |
| 732 o.channelId = "foo"; | 749 o.channelId = "foo"; |
| 733 } | 750 } |
| 734 buildCounterCommentActorClientSpecificActorInfoYoutubeActorInfo--; | 751 buildCounterCommentActorClientSpecificActorInfoYoutubeActorInfo--; |
| 735 return o; | 752 return o; |
| 736 } | 753 } |
| 737 | 754 |
| 738 checkCommentActorClientSpecificActorInfoYoutubeActorInfo(api.CommentActorClientS
pecificActorInfoYoutubeActorInfo o) { | 755 checkCommentActorClientSpecificActorInfoYoutubeActorInfo( |
| 756 api.CommentActorClientSpecificActorInfoYoutubeActorInfo o) { |
| 739 buildCounterCommentActorClientSpecificActorInfoYoutubeActorInfo++; | 757 buildCounterCommentActorClientSpecificActorInfoYoutubeActorInfo++; |
| 740 if (buildCounterCommentActorClientSpecificActorInfoYoutubeActorInfo < 3) { | 758 if (buildCounterCommentActorClientSpecificActorInfoYoutubeActorInfo < 3) { |
| 741 unittest.expect(o.channelId, unittest.equals('foo')); | 759 unittest.expect(o.channelId, unittest.equals('foo')); |
| 742 } | 760 } |
| 743 buildCounterCommentActorClientSpecificActorInfoYoutubeActorInfo--; | 761 buildCounterCommentActorClientSpecificActorInfoYoutubeActorInfo--; |
| 744 } | 762 } |
| 745 | 763 |
| 746 core.int buildCounterCommentActorClientSpecificActorInfo = 0; | 764 core.int buildCounterCommentActorClientSpecificActorInfo = 0; |
| 747 buildCommentActorClientSpecificActorInfo() { | 765 buildCommentActorClientSpecificActorInfo() { |
| 748 var o = new api.CommentActorClientSpecificActorInfo(); | 766 var o = new api.CommentActorClientSpecificActorInfo(); |
| 749 buildCounterCommentActorClientSpecificActorInfo++; | 767 buildCounterCommentActorClientSpecificActorInfo++; |
| 750 if (buildCounterCommentActorClientSpecificActorInfo < 3) { | 768 if (buildCounterCommentActorClientSpecificActorInfo < 3) { |
| 751 o.youtubeActorInfo = buildCommentActorClientSpecificActorInfoYoutubeActorInf
o(); | 769 o.youtubeActorInfo = |
| 770 buildCommentActorClientSpecificActorInfoYoutubeActorInfo(); |
| 752 } | 771 } |
| 753 buildCounterCommentActorClientSpecificActorInfo--; | 772 buildCounterCommentActorClientSpecificActorInfo--; |
| 754 return o; | 773 return o; |
| 755 } | 774 } |
| 756 | 775 |
| 757 checkCommentActorClientSpecificActorInfo(api.CommentActorClientSpecificActorInfo
o) { | 776 checkCommentActorClientSpecificActorInfo( |
| 777 api.CommentActorClientSpecificActorInfo o) { |
| 758 buildCounterCommentActorClientSpecificActorInfo++; | 778 buildCounterCommentActorClientSpecificActorInfo++; |
| 759 if (buildCounterCommentActorClientSpecificActorInfo < 3) { | 779 if (buildCounterCommentActorClientSpecificActorInfo < 3) { |
| 760 checkCommentActorClientSpecificActorInfoYoutubeActorInfo(o.youtubeActorInfo)
; | 780 checkCommentActorClientSpecificActorInfoYoutubeActorInfo( |
| 781 o.youtubeActorInfo); |
| 761 } | 782 } |
| 762 buildCounterCommentActorClientSpecificActorInfo--; | 783 buildCounterCommentActorClientSpecificActorInfo--; |
| 763 } | 784 } |
| 764 | 785 |
| 765 core.int buildCounterCommentActorImage = 0; | 786 core.int buildCounterCommentActorImage = 0; |
| 766 buildCommentActorImage() { | 787 buildCommentActorImage() { |
| 767 var o = new api.CommentActorImage(); | 788 var o = new api.CommentActorImage(); |
| 768 buildCounterCommentActorImage++; | 789 buildCounterCommentActorImage++; |
| 769 if (buildCounterCommentActorImage < 3) { | 790 if (buildCounterCommentActorImage < 3) { |
| 770 o.url = "foo"; | 791 o.url = "foo"; |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 843 | 864 |
| 844 checkCommentInReplyTo(api.CommentInReplyTo o) { | 865 checkCommentInReplyTo(api.CommentInReplyTo o) { |
| 845 buildCounterCommentInReplyTo++; | 866 buildCounterCommentInReplyTo++; |
| 846 if (buildCounterCommentInReplyTo < 3) { | 867 if (buildCounterCommentInReplyTo < 3) { |
| 847 unittest.expect(o.id, unittest.equals('foo')); | 868 unittest.expect(o.id, unittest.equals('foo')); |
| 848 unittest.expect(o.url, unittest.equals('foo')); | 869 unittest.expect(o.url, unittest.equals('foo')); |
| 849 } | 870 } |
| 850 buildCounterCommentInReplyTo--; | 871 buildCounterCommentInReplyTo--; |
| 851 } | 872 } |
| 852 | 873 |
| 853 buildUnnamed159() { | 874 buildUnnamed154() { |
| 854 var o = new core.List<api.CommentInReplyTo>(); | 875 var o = new core.List<api.CommentInReplyTo>(); |
| 855 o.add(buildCommentInReplyTo()); | 876 o.add(buildCommentInReplyTo()); |
| 856 o.add(buildCommentInReplyTo()); | 877 o.add(buildCommentInReplyTo()); |
| 857 return o; | 878 return o; |
| 858 } | 879 } |
| 859 | 880 |
| 860 checkUnnamed159(core.List<api.CommentInReplyTo> o) { | 881 checkUnnamed154(core.List<api.CommentInReplyTo> o) { |
| 861 unittest.expect(o, unittest.hasLength(2)); | 882 unittest.expect(o, unittest.hasLength(2)); |
| 862 checkCommentInReplyTo(o[0]); | 883 checkCommentInReplyTo(o[0]); |
| 863 checkCommentInReplyTo(o[1]); | 884 checkCommentInReplyTo(o[1]); |
| 864 } | 885 } |
| 865 | 886 |
| 866 core.int buildCounterCommentObject = 0; | 887 core.int buildCounterCommentObject = 0; |
| 867 buildCommentObject() { | 888 buildCommentObject() { |
| 868 var o = new api.CommentObject(); | 889 var o = new api.CommentObject(); |
| 869 buildCounterCommentObject++; | 890 buildCounterCommentObject++; |
| 870 if (buildCounterCommentObject < 3) { | 891 if (buildCounterCommentObject < 3) { |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 906 } | 927 } |
| 907 | 928 |
| 908 core.int buildCounterComment = 0; | 929 core.int buildCounterComment = 0; |
| 909 buildComment() { | 930 buildComment() { |
| 910 var o = new api.Comment(); | 931 var o = new api.Comment(); |
| 911 buildCounterComment++; | 932 buildCounterComment++; |
| 912 if (buildCounterComment < 3) { | 933 if (buildCounterComment < 3) { |
| 913 o.actor = buildCommentActor(); | 934 o.actor = buildCommentActor(); |
| 914 o.etag = "foo"; | 935 o.etag = "foo"; |
| 915 o.id = "foo"; | 936 o.id = "foo"; |
| 916 o.inReplyTo = buildUnnamed159(); | 937 o.inReplyTo = buildUnnamed154(); |
| 917 o.kind = "foo"; | 938 o.kind = "foo"; |
| 918 o.object = buildCommentObject(); | 939 o.object = buildCommentObject(); |
| 919 o.plusoners = buildCommentPlusoners(); | 940 o.plusoners = buildCommentPlusoners(); |
| 920 o.published = core.DateTime.parse("2002-02-27T14:01:02"); | 941 o.published = core.DateTime.parse("2002-02-27T14:01:02"); |
| 921 o.selfLink = "foo"; | 942 o.selfLink = "foo"; |
| 922 o.updated = core.DateTime.parse("2002-02-27T14:01:02"); | 943 o.updated = core.DateTime.parse("2002-02-27T14:01:02"); |
| 923 o.verb = "foo"; | 944 o.verb = "foo"; |
| 924 } | 945 } |
| 925 buildCounterComment--; | 946 buildCounterComment--; |
| 926 return o; | 947 return o; |
| 927 } | 948 } |
| 928 | 949 |
| 929 checkComment(api.Comment o) { | 950 checkComment(api.Comment o) { |
| 930 buildCounterComment++; | 951 buildCounterComment++; |
| 931 if (buildCounterComment < 3) { | 952 if (buildCounterComment < 3) { |
| 932 checkCommentActor(o.actor); | 953 checkCommentActor(o.actor); |
| 933 unittest.expect(o.etag, unittest.equals('foo')); | 954 unittest.expect(o.etag, unittest.equals('foo')); |
| 934 unittest.expect(o.id, unittest.equals('foo')); | 955 unittest.expect(o.id, unittest.equals('foo')); |
| 935 checkUnnamed159(o.inReplyTo); | 956 checkUnnamed154(o.inReplyTo); |
| 936 unittest.expect(o.kind, unittest.equals('foo')); | 957 unittest.expect(o.kind, unittest.equals('foo')); |
| 937 checkCommentObject(o.object); | 958 checkCommentObject(o.object); |
| 938 checkCommentPlusoners(o.plusoners); | 959 checkCommentPlusoners(o.plusoners); |
| 939 unittest.expect(o.published, unittest.equals(core.DateTime.parse("2002-02-27
T14:01:02"))); | 960 unittest.expect(o.published, |
| 961 unittest.equals(core.DateTime.parse("2002-02-27T14:01:02"))); |
| 940 unittest.expect(o.selfLink, unittest.equals('foo')); | 962 unittest.expect(o.selfLink, unittest.equals('foo')); |
| 941 unittest.expect(o.updated, unittest.equals(core.DateTime.parse("2002-02-27T1
4:01:02"))); | 963 unittest.expect( |
| 964 o.updated, unittest.equals(core.DateTime.parse("2002-02-27T14:01:02"))); |
| 942 unittest.expect(o.verb, unittest.equals('foo')); | 965 unittest.expect(o.verb, unittest.equals('foo')); |
| 943 } | 966 } |
| 944 buildCounterComment--; | 967 buildCounterComment--; |
| 945 } | 968 } |
| 946 | 969 |
| 947 buildUnnamed160() { | 970 buildUnnamed155() { |
| 948 var o = new core.List<api.Comment>(); | 971 var o = new core.List<api.Comment>(); |
| 949 o.add(buildComment()); | 972 o.add(buildComment()); |
| 950 o.add(buildComment()); | 973 o.add(buildComment()); |
| 951 return o; | 974 return o; |
| 952 } | 975 } |
| 953 | 976 |
| 954 checkUnnamed160(core.List<api.Comment> o) { | 977 checkUnnamed155(core.List<api.Comment> o) { |
| 955 unittest.expect(o, unittest.hasLength(2)); | 978 unittest.expect(o, unittest.hasLength(2)); |
| 956 checkComment(o[0]); | 979 checkComment(o[0]); |
| 957 checkComment(o[1]); | 980 checkComment(o[1]); |
| 958 } | 981 } |
| 959 | 982 |
| 960 core.int buildCounterCommentFeed = 0; | 983 core.int buildCounterCommentFeed = 0; |
| 961 buildCommentFeed() { | 984 buildCommentFeed() { |
| 962 var o = new api.CommentFeed(); | 985 var o = new api.CommentFeed(); |
| 963 buildCounterCommentFeed++; | 986 buildCounterCommentFeed++; |
| 964 if (buildCounterCommentFeed < 3) { | 987 if (buildCounterCommentFeed < 3) { |
| 965 o.etag = "foo"; | 988 o.etag = "foo"; |
| 966 o.id = "foo"; | 989 o.id = "foo"; |
| 967 o.items = buildUnnamed160(); | 990 o.items = buildUnnamed155(); |
| 968 o.kind = "foo"; | 991 o.kind = "foo"; |
| 969 o.nextLink = "foo"; | 992 o.nextLink = "foo"; |
| 970 o.nextPageToken = "foo"; | 993 o.nextPageToken = "foo"; |
| 971 o.title = "foo"; | 994 o.title = "foo"; |
| 972 o.updated = core.DateTime.parse("2002-02-27T14:01:02"); | 995 o.updated = core.DateTime.parse("2002-02-27T14:01:02"); |
| 973 } | 996 } |
| 974 buildCounterCommentFeed--; | 997 buildCounterCommentFeed--; |
| 975 return o; | 998 return o; |
| 976 } | 999 } |
| 977 | 1000 |
| 978 checkCommentFeed(api.CommentFeed o) { | 1001 checkCommentFeed(api.CommentFeed o) { |
| 979 buildCounterCommentFeed++; | 1002 buildCounterCommentFeed++; |
| 980 if (buildCounterCommentFeed < 3) { | 1003 if (buildCounterCommentFeed < 3) { |
| 981 unittest.expect(o.etag, unittest.equals('foo')); | 1004 unittest.expect(o.etag, unittest.equals('foo')); |
| 982 unittest.expect(o.id, unittest.equals('foo')); | 1005 unittest.expect(o.id, unittest.equals('foo')); |
| 983 checkUnnamed160(o.items); | 1006 checkUnnamed155(o.items); |
| 984 unittest.expect(o.kind, unittest.equals('foo')); | 1007 unittest.expect(o.kind, unittest.equals('foo')); |
| 985 unittest.expect(o.nextLink, unittest.equals('foo')); | 1008 unittest.expect(o.nextLink, unittest.equals('foo')); |
| 986 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 1009 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 987 unittest.expect(o.title, unittest.equals('foo')); | 1010 unittest.expect(o.title, unittest.equals('foo')); |
| 988 unittest.expect(o.updated, unittest.equals(core.DateTime.parse("2002-02-27T1
4:01:02"))); | 1011 unittest.expect( |
| 1012 o.updated, unittest.equals(core.DateTime.parse("2002-02-27T14:01:02"))); |
| 989 } | 1013 } |
| 990 buildCounterCommentFeed--; | 1014 buildCounterCommentFeed--; |
| 991 } | 1015 } |
| 992 | 1016 |
| 993 buildUnnamed161() { | 1017 buildUnnamed156() { |
| 994 var o = new core.List<api.Person>(); | 1018 var o = new core.List<api.Person>(); |
| 995 o.add(buildPerson()); | 1019 o.add(buildPerson()); |
| 996 o.add(buildPerson()); | 1020 o.add(buildPerson()); |
| 997 return o; | 1021 return o; |
| 998 } | 1022 } |
| 999 | 1023 |
| 1000 checkUnnamed161(core.List<api.Person> o) { | 1024 checkUnnamed156(core.List<api.Person> o) { |
| 1001 unittest.expect(o, unittest.hasLength(2)); | 1025 unittest.expect(o, unittest.hasLength(2)); |
| 1002 checkPerson(o[0]); | 1026 checkPerson(o[0]); |
| 1003 checkPerson(o[1]); | 1027 checkPerson(o[1]); |
| 1004 } | 1028 } |
| 1005 | 1029 |
| 1006 core.int buildCounterPeopleFeed = 0; | 1030 core.int buildCounterPeopleFeed = 0; |
| 1007 buildPeopleFeed() { | 1031 buildPeopleFeed() { |
| 1008 var o = new api.PeopleFeed(); | 1032 var o = new api.PeopleFeed(); |
| 1009 buildCounterPeopleFeed++; | 1033 buildCounterPeopleFeed++; |
| 1010 if (buildCounterPeopleFeed < 3) { | 1034 if (buildCounterPeopleFeed < 3) { |
| 1011 o.etag = "foo"; | 1035 o.etag = "foo"; |
| 1012 o.items = buildUnnamed161(); | 1036 o.items = buildUnnamed156(); |
| 1013 o.kind = "foo"; | 1037 o.kind = "foo"; |
| 1014 o.nextPageToken = "foo"; | 1038 o.nextPageToken = "foo"; |
| 1015 o.selfLink = "foo"; | 1039 o.selfLink = "foo"; |
| 1016 o.title = "foo"; | 1040 o.title = "foo"; |
| 1017 o.totalItems = 42; | 1041 o.totalItems = 42; |
| 1018 } | 1042 } |
| 1019 buildCounterPeopleFeed--; | 1043 buildCounterPeopleFeed--; |
| 1020 return o; | 1044 return o; |
| 1021 } | 1045 } |
| 1022 | 1046 |
| 1023 checkPeopleFeed(api.PeopleFeed o) { | 1047 checkPeopleFeed(api.PeopleFeed o) { |
| 1024 buildCounterPeopleFeed++; | 1048 buildCounterPeopleFeed++; |
| 1025 if (buildCounterPeopleFeed < 3) { | 1049 if (buildCounterPeopleFeed < 3) { |
| 1026 unittest.expect(o.etag, unittest.equals('foo')); | 1050 unittest.expect(o.etag, unittest.equals('foo')); |
| 1027 checkUnnamed161(o.items); | 1051 checkUnnamed156(o.items); |
| 1028 unittest.expect(o.kind, unittest.equals('foo')); | 1052 unittest.expect(o.kind, unittest.equals('foo')); |
| 1029 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 1053 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 1030 unittest.expect(o.selfLink, unittest.equals('foo')); | 1054 unittest.expect(o.selfLink, unittest.equals('foo')); |
| 1031 unittest.expect(o.title, unittest.equals('foo')); | 1055 unittest.expect(o.title, unittest.equals('foo')); |
| 1032 unittest.expect(o.totalItems, unittest.equals(42)); | 1056 unittest.expect(o.totalItems, unittest.equals(42)); |
| 1033 } | 1057 } |
| 1034 buildCounterPeopleFeed--; | 1058 buildCounterPeopleFeed--; |
| 1035 } | 1059 } |
| 1036 | 1060 |
| 1037 core.int buildCounterPersonAgeRange = 0; | 1061 core.int buildCounterPersonAgeRange = 0; |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1136 | 1160 |
| 1137 checkPersonEmails(api.PersonEmails o) { | 1161 checkPersonEmails(api.PersonEmails o) { |
| 1138 buildCounterPersonEmails++; | 1162 buildCounterPersonEmails++; |
| 1139 if (buildCounterPersonEmails < 3) { | 1163 if (buildCounterPersonEmails < 3) { |
| 1140 unittest.expect(o.type, unittest.equals('foo')); | 1164 unittest.expect(o.type, unittest.equals('foo')); |
| 1141 unittest.expect(o.value, unittest.equals('foo')); | 1165 unittest.expect(o.value, unittest.equals('foo')); |
| 1142 } | 1166 } |
| 1143 buildCounterPersonEmails--; | 1167 buildCounterPersonEmails--; |
| 1144 } | 1168 } |
| 1145 | 1169 |
| 1146 buildUnnamed162() { | 1170 buildUnnamed157() { |
| 1147 var o = new core.List<api.PersonEmails>(); | 1171 var o = new core.List<api.PersonEmails>(); |
| 1148 o.add(buildPersonEmails()); | 1172 o.add(buildPersonEmails()); |
| 1149 o.add(buildPersonEmails()); | 1173 o.add(buildPersonEmails()); |
| 1150 return o; | 1174 return o; |
| 1151 } | 1175 } |
| 1152 | 1176 |
| 1153 checkUnnamed162(core.List<api.PersonEmails> o) { | 1177 checkUnnamed157(core.List<api.PersonEmails> o) { |
| 1154 unittest.expect(o, unittest.hasLength(2)); | 1178 unittest.expect(o, unittest.hasLength(2)); |
| 1155 checkPersonEmails(o[0]); | 1179 checkPersonEmails(o[0]); |
| 1156 checkPersonEmails(o[1]); | 1180 checkPersonEmails(o[1]); |
| 1157 } | 1181 } |
| 1158 | 1182 |
| 1159 core.int buildCounterPersonImage = 0; | 1183 core.int buildCounterPersonImage = 0; |
| 1160 buildPersonImage() { | 1184 buildPersonImage() { |
| 1161 var o = new api.PersonImage(); | 1185 var o = new api.PersonImage(); |
| 1162 buildCounterPersonImage++; | 1186 buildCounterPersonImage++; |
| 1163 if (buildCounterPersonImage < 3) { | 1187 if (buildCounterPersonImage < 3) { |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1234 unittest.expect(o.location, unittest.equals('foo')); | 1258 unittest.expect(o.location, unittest.equals('foo')); |
| 1235 unittest.expect(o.name, unittest.equals('foo')); | 1259 unittest.expect(o.name, unittest.equals('foo')); |
| 1236 unittest.expect(o.primary, unittest.isTrue); | 1260 unittest.expect(o.primary, unittest.isTrue); |
| 1237 unittest.expect(o.startDate, unittest.equals('foo')); | 1261 unittest.expect(o.startDate, unittest.equals('foo')); |
| 1238 unittest.expect(o.title, unittest.equals('foo')); | 1262 unittest.expect(o.title, unittest.equals('foo')); |
| 1239 unittest.expect(o.type, unittest.equals('foo')); | 1263 unittest.expect(o.type, unittest.equals('foo')); |
| 1240 } | 1264 } |
| 1241 buildCounterPersonOrganizations--; | 1265 buildCounterPersonOrganizations--; |
| 1242 } | 1266 } |
| 1243 | 1267 |
| 1244 buildUnnamed163() { | 1268 buildUnnamed158() { |
| 1245 var o = new core.List<api.PersonOrganizations>(); | 1269 var o = new core.List<api.PersonOrganizations>(); |
| 1246 o.add(buildPersonOrganizations()); | 1270 o.add(buildPersonOrganizations()); |
| 1247 o.add(buildPersonOrganizations()); | 1271 o.add(buildPersonOrganizations()); |
| 1248 return o; | 1272 return o; |
| 1249 } | 1273 } |
| 1250 | 1274 |
| 1251 checkUnnamed163(core.List<api.PersonOrganizations> o) { | 1275 checkUnnamed158(core.List<api.PersonOrganizations> o) { |
| 1252 unittest.expect(o, unittest.hasLength(2)); | 1276 unittest.expect(o, unittest.hasLength(2)); |
| 1253 checkPersonOrganizations(o[0]); | 1277 checkPersonOrganizations(o[0]); |
| 1254 checkPersonOrganizations(o[1]); | 1278 checkPersonOrganizations(o[1]); |
| 1255 } | 1279 } |
| 1256 | 1280 |
| 1257 core.int buildCounterPersonPlacesLived = 0; | 1281 core.int buildCounterPersonPlacesLived = 0; |
| 1258 buildPersonPlacesLived() { | 1282 buildPersonPlacesLived() { |
| 1259 var o = new api.PersonPlacesLived(); | 1283 var o = new api.PersonPlacesLived(); |
| 1260 buildCounterPersonPlacesLived++; | 1284 buildCounterPersonPlacesLived++; |
| 1261 if (buildCounterPersonPlacesLived < 3) { | 1285 if (buildCounterPersonPlacesLived < 3) { |
| 1262 o.primary = true; | 1286 o.primary = true; |
| 1263 o.value = "foo"; | 1287 o.value = "foo"; |
| 1264 } | 1288 } |
| 1265 buildCounterPersonPlacesLived--; | 1289 buildCounterPersonPlacesLived--; |
| 1266 return o; | 1290 return o; |
| 1267 } | 1291 } |
| 1268 | 1292 |
| 1269 checkPersonPlacesLived(api.PersonPlacesLived o) { | 1293 checkPersonPlacesLived(api.PersonPlacesLived o) { |
| 1270 buildCounterPersonPlacesLived++; | 1294 buildCounterPersonPlacesLived++; |
| 1271 if (buildCounterPersonPlacesLived < 3) { | 1295 if (buildCounterPersonPlacesLived < 3) { |
| 1272 unittest.expect(o.primary, unittest.isTrue); | 1296 unittest.expect(o.primary, unittest.isTrue); |
| 1273 unittest.expect(o.value, unittest.equals('foo')); | 1297 unittest.expect(o.value, unittest.equals('foo')); |
| 1274 } | 1298 } |
| 1275 buildCounterPersonPlacesLived--; | 1299 buildCounterPersonPlacesLived--; |
| 1276 } | 1300 } |
| 1277 | 1301 |
| 1278 buildUnnamed164() { | 1302 buildUnnamed159() { |
| 1279 var o = new core.List<api.PersonPlacesLived>(); | 1303 var o = new core.List<api.PersonPlacesLived>(); |
| 1280 o.add(buildPersonPlacesLived()); | 1304 o.add(buildPersonPlacesLived()); |
| 1281 o.add(buildPersonPlacesLived()); | 1305 o.add(buildPersonPlacesLived()); |
| 1282 return o; | 1306 return o; |
| 1283 } | 1307 } |
| 1284 | 1308 |
| 1285 checkUnnamed164(core.List<api.PersonPlacesLived> o) { | 1309 checkUnnamed159(core.List<api.PersonPlacesLived> o) { |
| 1286 unittest.expect(o, unittest.hasLength(2)); | 1310 unittest.expect(o, unittest.hasLength(2)); |
| 1287 checkPersonPlacesLived(o[0]); | 1311 checkPersonPlacesLived(o[0]); |
| 1288 checkPersonPlacesLived(o[1]); | 1312 checkPersonPlacesLived(o[1]); |
| 1289 } | 1313 } |
| 1290 | 1314 |
| 1291 core.int buildCounterPersonUrls = 0; | 1315 core.int buildCounterPersonUrls = 0; |
| 1292 buildPersonUrls() { | 1316 buildPersonUrls() { |
| 1293 var o = new api.PersonUrls(); | 1317 var o = new api.PersonUrls(); |
| 1294 buildCounterPersonUrls++; | 1318 buildCounterPersonUrls++; |
| 1295 if (buildCounterPersonUrls < 3) { | 1319 if (buildCounterPersonUrls < 3) { |
| 1296 o.label = "foo"; | 1320 o.label = "foo"; |
| 1297 o.type = "foo"; | 1321 o.type = "foo"; |
| 1298 o.value = "foo"; | 1322 o.value = "foo"; |
| 1299 } | 1323 } |
| 1300 buildCounterPersonUrls--; | 1324 buildCounterPersonUrls--; |
| 1301 return o; | 1325 return o; |
| 1302 } | 1326 } |
| 1303 | 1327 |
| 1304 checkPersonUrls(api.PersonUrls o) { | 1328 checkPersonUrls(api.PersonUrls o) { |
| 1305 buildCounterPersonUrls++; | 1329 buildCounterPersonUrls++; |
| 1306 if (buildCounterPersonUrls < 3) { | 1330 if (buildCounterPersonUrls < 3) { |
| 1307 unittest.expect(o.label, unittest.equals('foo')); | 1331 unittest.expect(o.label, unittest.equals('foo')); |
| 1308 unittest.expect(o.type, unittest.equals('foo')); | 1332 unittest.expect(o.type, unittest.equals('foo')); |
| 1309 unittest.expect(o.value, unittest.equals('foo')); | 1333 unittest.expect(o.value, unittest.equals('foo')); |
| 1310 } | 1334 } |
| 1311 buildCounterPersonUrls--; | 1335 buildCounterPersonUrls--; |
| 1312 } | 1336 } |
| 1313 | 1337 |
| 1314 buildUnnamed165() { | 1338 buildUnnamed160() { |
| 1315 var o = new core.List<api.PersonUrls>(); | 1339 var o = new core.List<api.PersonUrls>(); |
| 1316 o.add(buildPersonUrls()); | 1340 o.add(buildPersonUrls()); |
| 1317 o.add(buildPersonUrls()); | 1341 o.add(buildPersonUrls()); |
| 1318 return o; | 1342 return o; |
| 1319 } | 1343 } |
| 1320 | 1344 |
| 1321 checkUnnamed165(core.List<api.PersonUrls> o) { | 1345 checkUnnamed160(core.List<api.PersonUrls> o) { |
| 1322 unittest.expect(o, unittest.hasLength(2)); | 1346 unittest.expect(o, unittest.hasLength(2)); |
| 1323 checkPersonUrls(o[0]); | 1347 checkPersonUrls(o[0]); |
| 1324 checkPersonUrls(o[1]); | 1348 checkPersonUrls(o[1]); |
| 1325 } | 1349 } |
| 1326 | 1350 |
| 1327 core.int buildCounterPerson = 0; | 1351 core.int buildCounterPerson = 0; |
| 1328 buildPerson() { | 1352 buildPerson() { |
| 1329 var o = new api.Person(); | 1353 var o = new api.Person(); |
| 1330 buildCounterPerson++; | 1354 buildCounterPerson++; |
| 1331 if (buildCounterPerson < 3) { | 1355 if (buildCounterPerson < 3) { |
| 1332 o.aboutMe = "foo"; | 1356 o.aboutMe = "foo"; |
| 1333 o.ageRange = buildPersonAgeRange(); | 1357 o.ageRange = buildPersonAgeRange(); |
| 1334 o.birthday = "foo"; | 1358 o.birthday = "foo"; |
| 1335 o.braggingRights = "foo"; | 1359 o.braggingRights = "foo"; |
| 1336 o.circledByCount = 42; | 1360 o.circledByCount = 42; |
| 1337 o.cover = buildPersonCover(); | 1361 o.cover = buildPersonCover(); |
| 1338 o.currentLocation = "foo"; | 1362 o.currentLocation = "foo"; |
| 1339 o.displayName = "foo"; | 1363 o.displayName = "foo"; |
| 1340 o.domain = "foo"; | 1364 o.domain = "foo"; |
| 1341 o.emails = buildUnnamed162(); | 1365 o.emails = buildUnnamed157(); |
| 1342 o.etag = "foo"; | 1366 o.etag = "foo"; |
| 1343 o.gender = "foo"; | 1367 o.gender = "foo"; |
| 1344 o.id = "foo"; | 1368 o.id = "foo"; |
| 1345 o.image = buildPersonImage(); | 1369 o.image = buildPersonImage(); |
| 1346 o.isPlusUser = true; | 1370 o.isPlusUser = true; |
| 1347 o.kind = "foo"; | 1371 o.kind = "foo"; |
| 1348 o.language = "foo"; | 1372 o.language = "foo"; |
| 1349 o.name = buildPersonName(); | 1373 o.name = buildPersonName(); |
| 1350 o.nickname = "foo"; | 1374 o.nickname = "foo"; |
| 1351 o.objectType = "foo"; | 1375 o.objectType = "foo"; |
| 1352 o.occupation = "foo"; | 1376 o.occupation = "foo"; |
| 1353 o.organizations = buildUnnamed163(); | 1377 o.organizations = buildUnnamed158(); |
| 1354 o.placesLived = buildUnnamed164(); | 1378 o.placesLived = buildUnnamed159(); |
| 1355 o.plusOneCount = 42; | 1379 o.plusOneCount = 42; |
| 1356 o.relationshipStatus = "foo"; | 1380 o.relationshipStatus = "foo"; |
| 1357 o.skills = "foo"; | 1381 o.skills = "foo"; |
| 1358 o.tagline = "foo"; | 1382 o.tagline = "foo"; |
| 1359 o.url = "foo"; | 1383 o.url = "foo"; |
| 1360 o.urls = buildUnnamed165(); | 1384 o.urls = buildUnnamed160(); |
| 1361 o.verified = true; | 1385 o.verified = true; |
| 1362 } | 1386 } |
| 1363 buildCounterPerson--; | 1387 buildCounterPerson--; |
| 1364 return o; | 1388 return o; |
| 1365 } | 1389 } |
| 1366 | 1390 |
| 1367 checkPerson(api.Person o) { | 1391 checkPerson(api.Person o) { |
| 1368 buildCounterPerson++; | 1392 buildCounterPerson++; |
| 1369 if (buildCounterPerson < 3) { | 1393 if (buildCounterPerson < 3) { |
| 1370 unittest.expect(o.aboutMe, unittest.equals('foo')); | 1394 unittest.expect(o.aboutMe, unittest.equals('foo')); |
| 1371 checkPersonAgeRange(o.ageRange); | 1395 checkPersonAgeRange(o.ageRange); |
| 1372 unittest.expect(o.birthday, unittest.equals('foo')); | 1396 unittest.expect(o.birthday, unittest.equals('foo')); |
| 1373 unittest.expect(o.braggingRights, unittest.equals('foo')); | 1397 unittest.expect(o.braggingRights, unittest.equals('foo')); |
| 1374 unittest.expect(o.circledByCount, unittest.equals(42)); | 1398 unittest.expect(o.circledByCount, unittest.equals(42)); |
| 1375 checkPersonCover(o.cover); | 1399 checkPersonCover(o.cover); |
| 1376 unittest.expect(o.currentLocation, unittest.equals('foo')); | 1400 unittest.expect(o.currentLocation, unittest.equals('foo')); |
| 1377 unittest.expect(o.displayName, unittest.equals('foo')); | 1401 unittest.expect(o.displayName, unittest.equals('foo')); |
| 1378 unittest.expect(o.domain, unittest.equals('foo')); | 1402 unittest.expect(o.domain, unittest.equals('foo')); |
| 1379 checkUnnamed162(o.emails); | 1403 checkUnnamed157(o.emails); |
| 1380 unittest.expect(o.etag, unittest.equals('foo')); | 1404 unittest.expect(o.etag, unittest.equals('foo')); |
| 1381 unittest.expect(o.gender, unittest.equals('foo')); | 1405 unittest.expect(o.gender, unittest.equals('foo')); |
| 1382 unittest.expect(o.id, unittest.equals('foo')); | 1406 unittest.expect(o.id, unittest.equals('foo')); |
| 1383 checkPersonImage(o.image); | 1407 checkPersonImage(o.image); |
| 1384 unittest.expect(o.isPlusUser, unittest.isTrue); | 1408 unittest.expect(o.isPlusUser, unittest.isTrue); |
| 1385 unittest.expect(o.kind, unittest.equals('foo')); | 1409 unittest.expect(o.kind, unittest.equals('foo')); |
| 1386 unittest.expect(o.language, unittest.equals('foo')); | 1410 unittest.expect(o.language, unittest.equals('foo')); |
| 1387 checkPersonName(o.name); | 1411 checkPersonName(o.name); |
| 1388 unittest.expect(o.nickname, unittest.equals('foo')); | 1412 unittest.expect(o.nickname, unittest.equals('foo')); |
| 1389 unittest.expect(o.objectType, unittest.equals('foo')); | 1413 unittest.expect(o.objectType, unittest.equals('foo')); |
| 1390 unittest.expect(o.occupation, unittest.equals('foo')); | 1414 unittest.expect(o.occupation, unittest.equals('foo')); |
| 1391 checkUnnamed163(o.organizations); | 1415 checkUnnamed158(o.organizations); |
| 1392 checkUnnamed164(o.placesLived); | 1416 checkUnnamed159(o.placesLived); |
| 1393 unittest.expect(o.plusOneCount, unittest.equals(42)); | 1417 unittest.expect(o.plusOneCount, unittest.equals(42)); |
| 1394 unittest.expect(o.relationshipStatus, unittest.equals('foo')); | 1418 unittest.expect(o.relationshipStatus, unittest.equals('foo')); |
| 1395 unittest.expect(o.skills, unittest.equals('foo')); | 1419 unittest.expect(o.skills, unittest.equals('foo')); |
| 1396 unittest.expect(o.tagline, unittest.equals('foo')); | 1420 unittest.expect(o.tagline, unittest.equals('foo')); |
| 1397 unittest.expect(o.url, unittest.equals('foo')); | 1421 unittest.expect(o.url, unittest.equals('foo')); |
| 1398 checkUnnamed165(o.urls); | 1422 checkUnnamed160(o.urls); |
| 1399 unittest.expect(o.verified, unittest.isTrue); | 1423 unittest.expect(o.verified, unittest.isTrue); |
| 1400 } | 1424 } |
| 1401 buildCounterPerson--; | 1425 buildCounterPerson--; |
| 1402 } | 1426 } |
| 1403 | 1427 |
| 1404 core.int buildCounterPlaceAddress = 0; | 1428 core.int buildCounterPlaceAddress = 0; |
| 1405 buildPlaceAddress() { | 1429 buildPlaceAddress() { |
| 1406 var o = new api.PlaceAddress(); | 1430 var o = new api.PlaceAddress(); |
| 1407 buildCounterPlaceAddress++; | 1431 buildCounterPlaceAddress++; |
| 1408 if (buildCounterPlaceAddress < 3) { | 1432 if (buildCounterPlaceAddress < 3) { |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1484 checkPlusAclentryResource(api.PlusAclentryResource o) { | 1508 checkPlusAclentryResource(api.PlusAclentryResource o) { |
| 1485 buildCounterPlusAclentryResource++; | 1509 buildCounterPlusAclentryResource++; |
| 1486 if (buildCounterPlusAclentryResource < 3) { | 1510 if (buildCounterPlusAclentryResource < 3) { |
| 1487 unittest.expect(o.displayName, unittest.equals('foo')); | 1511 unittest.expect(o.displayName, unittest.equals('foo')); |
| 1488 unittest.expect(o.id, unittest.equals('foo')); | 1512 unittest.expect(o.id, unittest.equals('foo')); |
| 1489 unittest.expect(o.type, unittest.equals('foo')); | 1513 unittest.expect(o.type, unittest.equals('foo')); |
| 1490 } | 1514 } |
| 1491 buildCounterPlusAclentryResource--; | 1515 buildCounterPlusAclentryResource--; |
| 1492 } | 1516 } |
| 1493 | 1517 |
| 1494 | |
| 1495 main() { | 1518 main() { |
| 1496 unittest.group("obj-schema-Acl", () { | 1519 unittest.group("obj-schema-Acl", () { |
| 1497 unittest.test("to-json--from-json", () { | 1520 unittest.test("to-json--from-json", () { |
| 1498 var o = buildAcl(); | 1521 var o = buildAcl(); |
| 1499 var od = new api.Acl.fromJson(o.toJson()); | 1522 var od = new api.Acl.fromJson(o.toJson()); |
| 1500 checkAcl(od); | 1523 checkAcl(od); |
| 1501 }); | 1524 }); |
| 1502 }); | 1525 }); |
| 1503 | 1526 |
| 1504 | 1527 unittest.group( |
| 1505 unittest.group("obj-schema-ActivityActorClientSpecificActorInfoYoutubeActorInf
o", () { | 1528 "obj-schema-ActivityActorClientSpecificActorInfoYoutubeActorInfo", () { |
| 1506 unittest.test("to-json--from-json", () { | 1529 unittest.test("to-json--from-json", () { |
| 1507 var o = buildActivityActorClientSpecificActorInfoYoutubeActorInfo(); | 1530 var o = buildActivityActorClientSpecificActorInfoYoutubeActorInfo(); |
| 1508 var od = new api.ActivityActorClientSpecificActorInfoYoutubeActorInfo.from
Json(o.toJson()); | 1531 var od = |
| 1532 new api.ActivityActorClientSpecificActorInfoYoutubeActorInfo.fromJson( |
| 1533 o.toJson()); |
| 1509 checkActivityActorClientSpecificActorInfoYoutubeActorInfo(od); | 1534 checkActivityActorClientSpecificActorInfoYoutubeActorInfo(od); |
| 1510 }); | 1535 }); |
| 1511 }); | 1536 }); |
| 1512 | 1537 |
| 1513 | |
| 1514 unittest.group("obj-schema-ActivityActorClientSpecificActorInfo", () { | 1538 unittest.group("obj-schema-ActivityActorClientSpecificActorInfo", () { |
| 1515 unittest.test("to-json--from-json", () { | 1539 unittest.test("to-json--from-json", () { |
| 1516 var o = buildActivityActorClientSpecificActorInfo(); | 1540 var o = buildActivityActorClientSpecificActorInfo(); |
| 1517 var od = new api.ActivityActorClientSpecificActorInfo.fromJson(o.toJson())
; | 1541 var od = |
| 1542 new api.ActivityActorClientSpecificActorInfo.fromJson(o.toJson()); |
| 1518 checkActivityActorClientSpecificActorInfo(od); | 1543 checkActivityActorClientSpecificActorInfo(od); |
| 1519 }); | 1544 }); |
| 1520 }); | 1545 }); |
| 1521 | 1546 |
| 1522 | |
| 1523 unittest.group("obj-schema-ActivityActorImage", () { | 1547 unittest.group("obj-schema-ActivityActorImage", () { |
| 1524 unittest.test("to-json--from-json", () { | 1548 unittest.test("to-json--from-json", () { |
| 1525 var o = buildActivityActorImage(); | 1549 var o = buildActivityActorImage(); |
| 1526 var od = new api.ActivityActorImage.fromJson(o.toJson()); | 1550 var od = new api.ActivityActorImage.fromJson(o.toJson()); |
| 1527 checkActivityActorImage(od); | 1551 checkActivityActorImage(od); |
| 1528 }); | 1552 }); |
| 1529 }); | 1553 }); |
| 1530 | 1554 |
| 1531 | |
| 1532 unittest.group("obj-schema-ActivityActorName", () { | 1555 unittest.group("obj-schema-ActivityActorName", () { |
| 1533 unittest.test("to-json--from-json", () { | 1556 unittest.test("to-json--from-json", () { |
| 1534 var o = buildActivityActorName(); | 1557 var o = buildActivityActorName(); |
| 1535 var od = new api.ActivityActorName.fromJson(o.toJson()); | 1558 var od = new api.ActivityActorName.fromJson(o.toJson()); |
| 1536 checkActivityActorName(od); | 1559 checkActivityActorName(od); |
| 1537 }); | 1560 }); |
| 1538 }); | 1561 }); |
| 1539 | 1562 |
| 1540 | |
| 1541 unittest.group("obj-schema-ActivityActorVerification", () { | 1563 unittest.group("obj-schema-ActivityActorVerification", () { |
| 1542 unittest.test("to-json--from-json", () { | 1564 unittest.test("to-json--from-json", () { |
| 1543 var o = buildActivityActorVerification(); | 1565 var o = buildActivityActorVerification(); |
| 1544 var od = new api.ActivityActorVerification.fromJson(o.toJson()); | 1566 var od = new api.ActivityActorVerification.fromJson(o.toJson()); |
| 1545 checkActivityActorVerification(od); | 1567 checkActivityActorVerification(od); |
| 1546 }); | 1568 }); |
| 1547 }); | 1569 }); |
| 1548 | 1570 |
| 1549 | |
| 1550 unittest.group("obj-schema-ActivityActor", () { | 1571 unittest.group("obj-schema-ActivityActor", () { |
| 1551 unittest.test("to-json--from-json", () { | 1572 unittest.test("to-json--from-json", () { |
| 1552 var o = buildActivityActor(); | 1573 var o = buildActivityActor(); |
| 1553 var od = new api.ActivityActor.fromJson(o.toJson()); | 1574 var od = new api.ActivityActor.fromJson(o.toJson()); |
| 1554 checkActivityActor(od); | 1575 checkActivityActor(od); |
| 1555 }); | 1576 }); |
| 1556 }); | 1577 }); |
| 1557 | 1578 |
| 1558 | 1579 unittest.group( |
| 1559 unittest.group("obj-schema-ActivityObjectActorClientSpecificActorInfoYoutubeAc
torInfo", () { | 1580 "obj-schema-ActivityObjectActorClientSpecificActorInfoYoutubeActorInfo", |
| 1581 () { |
| 1560 unittest.test("to-json--from-json", () { | 1582 unittest.test("to-json--from-json", () { |
| 1561 var o = buildActivityObjectActorClientSpecificActorInfoYoutubeActorInfo(); | 1583 var o = buildActivityObjectActorClientSpecificActorInfoYoutubeActorInfo(); |
| 1562 var od = new api.ActivityObjectActorClientSpecificActorInfoYoutubeActorInf
o.fromJson(o.toJson()); | 1584 var od = new api |
| 1585 .ActivityObjectActorClientSpecificActorInfoYoutubeActorInfo.fromJs
on( |
| 1586 o.toJson()); |
| 1563 checkActivityObjectActorClientSpecificActorInfoYoutubeActorInfo(od); | 1587 checkActivityObjectActorClientSpecificActorInfoYoutubeActorInfo(od); |
| 1564 }); | 1588 }); |
| 1565 }); | 1589 }); |
| 1566 | 1590 |
| 1567 | |
| 1568 unittest.group("obj-schema-ActivityObjectActorClientSpecificActorInfo", () { | 1591 unittest.group("obj-schema-ActivityObjectActorClientSpecificActorInfo", () { |
| 1569 unittest.test("to-json--from-json", () { | 1592 unittest.test("to-json--from-json", () { |
| 1570 var o = buildActivityObjectActorClientSpecificActorInfo(); | 1593 var o = buildActivityObjectActorClientSpecificActorInfo(); |
| 1571 var od = new api.ActivityObjectActorClientSpecificActorInfo.fromJson(o.toJ
son()); | 1594 var od = new api.ActivityObjectActorClientSpecificActorInfo.fromJson( |
| 1595 o.toJson()); |
| 1572 checkActivityObjectActorClientSpecificActorInfo(od); | 1596 checkActivityObjectActorClientSpecificActorInfo(od); |
| 1573 }); | 1597 }); |
| 1574 }); | 1598 }); |
| 1575 | 1599 |
| 1576 | |
| 1577 unittest.group("obj-schema-ActivityObjectActorImage", () { | 1600 unittest.group("obj-schema-ActivityObjectActorImage", () { |
| 1578 unittest.test("to-json--from-json", () { | 1601 unittest.test("to-json--from-json", () { |
| 1579 var o = buildActivityObjectActorImage(); | 1602 var o = buildActivityObjectActorImage(); |
| 1580 var od = new api.ActivityObjectActorImage.fromJson(o.toJson()); | 1603 var od = new api.ActivityObjectActorImage.fromJson(o.toJson()); |
| 1581 checkActivityObjectActorImage(od); | 1604 checkActivityObjectActorImage(od); |
| 1582 }); | 1605 }); |
| 1583 }); | 1606 }); |
| 1584 | 1607 |
| 1585 | |
| 1586 unittest.group("obj-schema-ActivityObjectActorVerification", () { | 1608 unittest.group("obj-schema-ActivityObjectActorVerification", () { |
| 1587 unittest.test("to-json--from-json", () { | 1609 unittest.test("to-json--from-json", () { |
| 1588 var o = buildActivityObjectActorVerification(); | 1610 var o = buildActivityObjectActorVerification(); |
| 1589 var od = new api.ActivityObjectActorVerification.fromJson(o.toJson()); | 1611 var od = new api.ActivityObjectActorVerification.fromJson(o.toJson()); |
| 1590 checkActivityObjectActorVerification(od); | 1612 checkActivityObjectActorVerification(od); |
| 1591 }); | 1613 }); |
| 1592 }); | 1614 }); |
| 1593 | 1615 |
| 1594 | |
| 1595 unittest.group("obj-schema-ActivityObjectActor", () { | 1616 unittest.group("obj-schema-ActivityObjectActor", () { |
| 1596 unittest.test("to-json--from-json", () { | 1617 unittest.test("to-json--from-json", () { |
| 1597 var o = buildActivityObjectActor(); | 1618 var o = buildActivityObjectActor(); |
| 1598 var od = new api.ActivityObjectActor.fromJson(o.toJson()); | 1619 var od = new api.ActivityObjectActor.fromJson(o.toJson()); |
| 1599 checkActivityObjectActor(od); | 1620 checkActivityObjectActor(od); |
| 1600 }); | 1621 }); |
| 1601 }); | 1622 }); |
| 1602 | 1623 |
| 1603 | |
| 1604 unittest.group("obj-schema-ActivityObjectAttachmentsEmbed", () { | 1624 unittest.group("obj-schema-ActivityObjectAttachmentsEmbed", () { |
| 1605 unittest.test("to-json--from-json", () { | 1625 unittest.test("to-json--from-json", () { |
| 1606 var o = buildActivityObjectAttachmentsEmbed(); | 1626 var o = buildActivityObjectAttachmentsEmbed(); |
| 1607 var od = new api.ActivityObjectAttachmentsEmbed.fromJson(o.toJson()); | 1627 var od = new api.ActivityObjectAttachmentsEmbed.fromJson(o.toJson()); |
| 1608 checkActivityObjectAttachmentsEmbed(od); | 1628 checkActivityObjectAttachmentsEmbed(od); |
| 1609 }); | 1629 }); |
| 1610 }); | 1630 }); |
| 1611 | 1631 |
| 1612 | |
| 1613 unittest.group("obj-schema-ActivityObjectAttachmentsFullImage", () { | 1632 unittest.group("obj-schema-ActivityObjectAttachmentsFullImage", () { |
| 1614 unittest.test("to-json--from-json", () { | 1633 unittest.test("to-json--from-json", () { |
| 1615 var o = buildActivityObjectAttachmentsFullImage(); | 1634 var o = buildActivityObjectAttachmentsFullImage(); |
| 1616 var od = new api.ActivityObjectAttachmentsFullImage.fromJson(o.toJson()); | 1635 var od = new api.ActivityObjectAttachmentsFullImage.fromJson(o.toJson()); |
| 1617 checkActivityObjectAttachmentsFullImage(od); | 1636 checkActivityObjectAttachmentsFullImage(od); |
| 1618 }); | 1637 }); |
| 1619 }); | 1638 }); |
| 1620 | 1639 |
| 1621 | |
| 1622 unittest.group("obj-schema-ActivityObjectAttachmentsImage", () { | 1640 unittest.group("obj-schema-ActivityObjectAttachmentsImage", () { |
| 1623 unittest.test("to-json--from-json", () { | 1641 unittest.test("to-json--from-json", () { |
| 1624 var o = buildActivityObjectAttachmentsImage(); | 1642 var o = buildActivityObjectAttachmentsImage(); |
| 1625 var od = new api.ActivityObjectAttachmentsImage.fromJson(o.toJson()); | 1643 var od = new api.ActivityObjectAttachmentsImage.fromJson(o.toJson()); |
| 1626 checkActivityObjectAttachmentsImage(od); | 1644 checkActivityObjectAttachmentsImage(od); |
| 1627 }); | 1645 }); |
| 1628 }); | 1646 }); |
| 1629 | 1647 |
| 1630 | |
| 1631 unittest.group("obj-schema-ActivityObjectAttachmentsThumbnailsImage", () { | 1648 unittest.group("obj-schema-ActivityObjectAttachmentsThumbnailsImage", () { |
| 1632 unittest.test("to-json--from-json", () { | 1649 unittest.test("to-json--from-json", () { |
| 1633 var o = buildActivityObjectAttachmentsThumbnailsImage(); | 1650 var o = buildActivityObjectAttachmentsThumbnailsImage(); |
| 1634 var od = new api.ActivityObjectAttachmentsThumbnailsImage.fromJson(o.toJso
n()); | 1651 var od = |
| 1652 new api.ActivityObjectAttachmentsThumbnailsImage.fromJson(o.toJson()); |
| 1635 checkActivityObjectAttachmentsThumbnailsImage(od); | 1653 checkActivityObjectAttachmentsThumbnailsImage(od); |
| 1636 }); | 1654 }); |
| 1637 }); | 1655 }); |
| 1638 | 1656 |
| 1639 | |
| 1640 unittest.group("obj-schema-ActivityObjectAttachmentsThumbnails", () { | 1657 unittest.group("obj-schema-ActivityObjectAttachmentsThumbnails", () { |
| 1641 unittest.test("to-json--from-json", () { | 1658 unittest.test("to-json--from-json", () { |
| 1642 var o = buildActivityObjectAttachmentsThumbnails(); | 1659 var o = buildActivityObjectAttachmentsThumbnails(); |
| 1643 var od = new api.ActivityObjectAttachmentsThumbnails.fromJson(o.toJson()); | 1660 var od = new api.ActivityObjectAttachmentsThumbnails.fromJson(o.toJson()); |
| 1644 checkActivityObjectAttachmentsThumbnails(od); | 1661 checkActivityObjectAttachmentsThumbnails(od); |
| 1645 }); | 1662 }); |
| 1646 }); | 1663 }); |
| 1647 | 1664 |
| 1648 | |
| 1649 unittest.group("obj-schema-ActivityObjectAttachments", () { | 1665 unittest.group("obj-schema-ActivityObjectAttachments", () { |
| 1650 unittest.test("to-json--from-json", () { | 1666 unittest.test("to-json--from-json", () { |
| 1651 var o = buildActivityObjectAttachments(); | 1667 var o = buildActivityObjectAttachments(); |
| 1652 var od = new api.ActivityObjectAttachments.fromJson(o.toJson()); | 1668 var od = new api.ActivityObjectAttachments.fromJson(o.toJson()); |
| 1653 checkActivityObjectAttachments(od); | 1669 checkActivityObjectAttachments(od); |
| 1654 }); | 1670 }); |
| 1655 }); | 1671 }); |
| 1656 | 1672 |
| 1657 | |
| 1658 unittest.group("obj-schema-ActivityObjectPlusoners", () { | 1673 unittest.group("obj-schema-ActivityObjectPlusoners", () { |
| 1659 unittest.test("to-json--from-json", () { | 1674 unittest.test("to-json--from-json", () { |
| 1660 var o = buildActivityObjectPlusoners(); | 1675 var o = buildActivityObjectPlusoners(); |
| 1661 var od = new api.ActivityObjectPlusoners.fromJson(o.toJson()); | 1676 var od = new api.ActivityObjectPlusoners.fromJson(o.toJson()); |
| 1662 checkActivityObjectPlusoners(od); | 1677 checkActivityObjectPlusoners(od); |
| 1663 }); | 1678 }); |
| 1664 }); | 1679 }); |
| 1665 | 1680 |
| 1666 | |
| 1667 unittest.group("obj-schema-ActivityObjectReplies", () { | 1681 unittest.group("obj-schema-ActivityObjectReplies", () { |
| 1668 unittest.test("to-json--from-json", () { | 1682 unittest.test("to-json--from-json", () { |
| 1669 var o = buildActivityObjectReplies(); | 1683 var o = buildActivityObjectReplies(); |
| 1670 var od = new api.ActivityObjectReplies.fromJson(o.toJson()); | 1684 var od = new api.ActivityObjectReplies.fromJson(o.toJson()); |
| 1671 checkActivityObjectReplies(od); | 1685 checkActivityObjectReplies(od); |
| 1672 }); | 1686 }); |
| 1673 }); | 1687 }); |
| 1674 | 1688 |
| 1675 | |
| 1676 unittest.group("obj-schema-ActivityObjectResharers", () { | 1689 unittest.group("obj-schema-ActivityObjectResharers", () { |
| 1677 unittest.test("to-json--from-json", () { | 1690 unittest.test("to-json--from-json", () { |
| 1678 var o = buildActivityObjectResharers(); | 1691 var o = buildActivityObjectResharers(); |
| 1679 var od = new api.ActivityObjectResharers.fromJson(o.toJson()); | 1692 var od = new api.ActivityObjectResharers.fromJson(o.toJson()); |
| 1680 checkActivityObjectResharers(od); | 1693 checkActivityObjectResharers(od); |
| 1681 }); | 1694 }); |
| 1682 }); | 1695 }); |
| 1683 | 1696 |
| 1684 | |
| 1685 unittest.group("obj-schema-ActivityObject", () { | 1697 unittest.group("obj-schema-ActivityObject", () { |
| 1686 unittest.test("to-json--from-json", () { | 1698 unittest.test("to-json--from-json", () { |
| 1687 var o = buildActivityObject(); | 1699 var o = buildActivityObject(); |
| 1688 var od = new api.ActivityObject.fromJson(o.toJson()); | 1700 var od = new api.ActivityObject.fromJson(o.toJson()); |
| 1689 checkActivityObject(od); | 1701 checkActivityObject(od); |
| 1690 }); | 1702 }); |
| 1691 }); | 1703 }); |
| 1692 | 1704 |
| 1693 | |
| 1694 unittest.group("obj-schema-ActivityProvider", () { | 1705 unittest.group("obj-schema-ActivityProvider", () { |
| 1695 unittest.test("to-json--from-json", () { | 1706 unittest.test("to-json--from-json", () { |
| 1696 var o = buildActivityProvider(); | 1707 var o = buildActivityProvider(); |
| 1697 var od = new api.ActivityProvider.fromJson(o.toJson()); | 1708 var od = new api.ActivityProvider.fromJson(o.toJson()); |
| 1698 checkActivityProvider(od); | 1709 checkActivityProvider(od); |
| 1699 }); | 1710 }); |
| 1700 }); | 1711 }); |
| 1701 | 1712 |
| 1702 | |
| 1703 unittest.group("obj-schema-Activity", () { | 1713 unittest.group("obj-schema-Activity", () { |
| 1704 unittest.test("to-json--from-json", () { | 1714 unittest.test("to-json--from-json", () { |
| 1705 var o = buildActivity(); | 1715 var o = buildActivity(); |
| 1706 var od = new api.Activity.fromJson(o.toJson()); | 1716 var od = new api.Activity.fromJson(o.toJson()); |
| 1707 checkActivity(od); | 1717 checkActivity(od); |
| 1708 }); | 1718 }); |
| 1709 }); | 1719 }); |
| 1710 | 1720 |
| 1711 | |
| 1712 unittest.group("obj-schema-ActivityFeed", () { | 1721 unittest.group("obj-schema-ActivityFeed", () { |
| 1713 unittest.test("to-json--from-json", () { | 1722 unittest.test("to-json--from-json", () { |
| 1714 var o = buildActivityFeed(); | 1723 var o = buildActivityFeed(); |
| 1715 var od = new api.ActivityFeed.fromJson(o.toJson()); | 1724 var od = new api.ActivityFeed.fromJson(o.toJson()); |
| 1716 checkActivityFeed(od); | 1725 checkActivityFeed(od); |
| 1717 }); | 1726 }); |
| 1718 }); | 1727 }); |
| 1719 | 1728 |
| 1720 | 1729 unittest.group( |
| 1721 unittest.group("obj-schema-CommentActorClientSpecificActorInfoYoutubeActorInfo
", () { | 1730 "obj-schema-CommentActorClientSpecificActorInfoYoutubeActorInfo", () { |
| 1722 unittest.test("to-json--from-json", () { | 1731 unittest.test("to-json--from-json", () { |
| 1723 var o = buildCommentActorClientSpecificActorInfoYoutubeActorInfo(); | 1732 var o = buildCommentActorClientSpecificActorInfoYoutubeActorInfo(); |
| 1724 var od = new api.CommentActorClientSpecificActorInfoYoutubeActorInfo.fromJ
son(o.toJson()); | 1733 var od = |
| 1734 new api.CommentActorClientSpecificActorInfoYoutubeActorInfo.fromJson( |
| 1735 o.toJson()); |
| 1725 checkCommentActorClientSpecificActorInfoYoutubeActorInfo(od); | 1736 checkCommentActorClientSpecificActorInfoYoutubeActorInfo(od); |
| 1726 }); | 1737 }); |
| 1727 }); | 1738 }); |
| 1728 | 1739 |
| 1729 | |
| 1730 unittest.group("obj-schema-CommentActorClientSpecificActorInfo", () { | 1740 unittest.group("obj-schema-CommentActorClientSpecificActorInfo", () { |
| 1731 unittest.test("to-json--from-json", () { | 1741 unittest.test("to-json--from-json", () { |
| 1732 var o = buildCommentActorClientSpecificActorInfo(); | 1742 var o = buildCommentActorClientSpecificActorInfo(); |
| 1733 var od = new api.CommentActorClientSpecificActorInfo.fromJson(o.toJson()); | 1743 var od = new api.CommentActorClientSpecificActorInfo.fromJson(o.toJson()); |
| 1734 checkCommentActorClientSpecificActorInfo(od); | 1744 checkCommentActorClientSpecificActorInfo(od); |
| 1735 }); | 1745 }); |
| 1736 }); | 1746 }); |
| 1737 | 1747 |
| 1738 | |
| 1739 unittest.group("obj-schema-CommentActorImage", () { | 1748 unittest.group("obj-schema-CommentActorImage", () { |
| 1740 unittest.test("to-json--from-json", () { | 1749 unittest.test("to-json--from-json", () { |
| 1741 var o = buildCommentActorImage(); | 1750 var o = buildCommentActorImage(); |
| 1742 var od = new api.CommentActorImage.fromJson(o.toJson()); | 1751 var od = new api.CommentActorImage.fromJson(o.toJson()); |
| 1743 checkCommentActorImage(od); | 1752 checkCommentActorImage(od); |
| 1744 }); | 1753 }); |
| 1745 }); | 1754 }); |
| 1746 | 1755 |
| 1747 | |
| 1748 unittest.group("obj-schema-CommentActorVerification", () { | 1756 unittest.group("obj-schema-CommentActorVerification", () { |
| 1749 unittest.test("to-json--from-json", () { | 1757 unittest.test("to-json--from-json", () { |
| 1750 var o = buildCommentActorVerification(); | 1758 var o = buildCommentActorVerification(); |
| 1751 var od = new api.CommentActorVerification.fromJson(o.toJson()); | 1759 var od = new api.CommentActorVerification.fromJson(o.toJson()); |
| 1752 checkCommentActorVerification(od); | 1760 checkCommentActorVerification(od); |
| 1753 }); | 1761 }); |
| 1754 }); | 1762 }); |
| 1755 | 1763 |
| 1756 | |
| 1757 unittest.group("obj-schema-CommentActor", () { | 1764 unittest.group("obj-schema-CommentActor", () { |
| 1758 unittest.test("to-json--from-json", () { | 1765 unittest.test("to-json--from-json", () { |
| 1759 var o = buildCommentActor(); | 1766 var o = buildCommentActor(); |
| 1760 var od = new api.CommentActor.fromJson(o.toJson()); | 1767 var od = new api.CommentActor.fromJson(o.toJson()); |
| 1761 checkCommentActor(od); | 1768 checkCommentActor(od); |
| 1762 }); | 1769 }); |
| 1763 }); | 1770 }); |
| 1764 | 1771 |
| 1765 | |
| 1766 unittest.group("obj-schema-CommentInReplyTo", () { | 1772 unittest.group("obj-schema-CommentInReplyTo", () { |
| 1767 unittest.test("to-json--from-json", () { | 1773 unittest.test("to-json--from-json", () { |
| 1768 var o = buildCommentInReplyTo(); | 1774 var o = buildCommentInReplyTo(); |
| 1769 var od = new api.CommentInReplyTo.fromJson(o.toJson()); | 1775 var od = new api.CommentInReplyTo.fromJson(o.toJson()); |
| 1770 checkCommentInReplyTo(od); | 1776 checkCommentInReplyTo(od); |
| 1771 }); | 1777 }); |
| 1772 }); | 1778 }); |
| 1773 | 1779 |
| 1774 | |
| 1775 unittest.group("obj-schema-CommentObject", () { | 1780 unittest.group("obj-schema-CommentObject", () { |
| 1776 unittest.test("to-json--from-json", () { | 1781 unittest.test("to-json--from-json", () { |
| 1777 var o = buildCommentObject(); | 1782 var o = buildCommentObject(); |
| 1778 var od = new api.CommentObject.fromJson(o.toJson()); | 1783 var od = new api.CommentObject.fromJson(o.toJson()); |
| 1779 checkCommentObject(od); | 1784 checkCommentObject(od); |
| 1780 }); | 1785 }); |
| 1781 }); | 1786 }); |
| 1782 | 1787 |
| 1783 | |
| 1784 unittest.group("obj-schema-CommentPlusoners", () { | 1788 unittest.group("obj-schema-CommentPlusoners", () { |
| 1785 unittest.test("to-json--from-json", () { | 1789 unittest.test("to-json--from-json", () { |
| 1786 var o = buildCommentPlusoners(); | 1790 var o = buildCommentPlusoners(); |
| 1787 var od = new api.CommentPlusoners.fromJson(o.toJson()); | 1791 var od = new api.CommentPlusoners.fromJson(o.toJson()); |
| 1788 checkCommentPlusoners(od); | 1792 checkCommentPlusoners(od); |
| 1789 }); | 1793 }); |
| 1790 }); | 1794 }); |
| 1791 | 1795 |
| 1792 | |
| 1793 unittest.group("obj-schema-Comment", () { | 1796 unittest.group("obj-schema-Comment", () { |
| 1794 unittest.test("to-json--from-json", () { | 1797 unittest.test("to-json--from-json", () { |
| 1795 var o = buildComment(); | 1798 var o = buildComment(); |
| 1796 var od = new api.Comment.fromJson(o.toJson()); | 1799 var od = new api.Comment.fromJson(o.toJson()); |
| 1797 checkComment(od); | 1800 checkComment(od); |
| 1798 }); | 1801 }); |
| 1799 }); | 1802 }); |
| 1800 | 1803 |
| 1801 | |
| 1802 unittest.group("obj-schema-CommentFeed", () { | 1804 unittest.group("obj-schema-CommentFeed", () { |
| 1803 unittest.test("to-json--from-json", () { | 1805 unittest.test("to-json--from-json", () { |
| 1804 var o = buildCommentFeed(); | 1806 var o = buildCommentFeed(); |
| 1805 var od = new api.CommentFeed.fromJson(o.toJson()); | 1807 var od = new api.CommentFeed.fromJson(o.toJson()); |
| 1806 checkCommentFeed(od); | 1808 checkCommentFeed(od); |
| 1807 }); | 1809 }); |
| 1808 }); | 1810 }); |
| 1809 | 1811 |
| 1810 | |
| 1811 unittest.group("obj-schema-PeopleFeed", () { | 1812 unittest.group("obj-schema-PeopleFeed", () { |
| 1812 unittest.test("to-json--from-json", () { | 1813 unittest.test("to-json--from-json", () { |
| 1813 var o = buildPeopleFeed(); | 1814 var o = buildPeopleFeed(); |
| 1814 var od = new api.PeopleFeed.fromJson(o.toJson()); | 1815 var od = new api.PeopleFeed.fromJson(o.toJson()); |
| 1815 checkPeopleFeed(od); | 1816 checkPeopleFeed(od); |
| 1816 }); | 1817 }); |
| 1817 }); | 1818 }); |
| 1818 | 1819 |
| 1819 | |
| 1820 unittest.group("obj-schema-PersonAgeRange", () { | 1820 unittest.group("obj-schema-PersonAgeRange", () { |
| 1821 unittest.test("to-json--from-json", () { | 1821 unittest.test("to-json--from-json", () { |
| 1822 var o = buildPersonAgeRange(); | 1822 var o = buildPersonAgeRange(); |
| 1823 var od = new api.PersonAgeRange.fromJson(o.toJson()); | 1823 var od = new api.PersonAgeRange.fromJson(o.toJson()); |
| 1824 checkPersonAgeRange(od); | 1824 checkPersonAgeRange(od); |
| 1825 }); | 1825 }); |
| 1826 }); | 1826 }); |
| 1827 | 1827 |
| 1828 | |
| 1829 unittest.group("obj-schema-PersonCoverCoverInfo", () { | 1828 unittest.group("obj-schema-PersonCoverCoverInfo", () { |
| 1830 unittest.test("to-json--from-json", () { | 1829 unittest.test("to-json--from-json", () { |
| 1831 var o = buildPersonCoverCoverInfo(); | 1830 var o = buildPersonCoverCoverInfo(); |
| 1832 var od = new api.PersonCoverCoverInfo.fromJson(o.toJson()); | 1831 var od = new api.PersonCoverCoverInfo.fromJson(o.toJson()); |
| 1833 checkPersonCoverCoverInfo(od); | 1832 checkPersonCoverCoverInfo(od); |
| 1834 }); | 1833 }); |
| 1835 }); | 1834 }); |
| 1836 | 1835 |
| 1837 | |
| 1838 unittest.group("obj-schema-PersonCoverCoverPhoto", () { | 1836 unittest.group("obj-schema-PersonCoverCoverPhoto", () { |
| 1839 unittest.test("to-json--from-json", () { | 1837 unittest.test("to-json--from-json", () { |
| 1840 var o = buildPersonCoverCoverPhoto(); | 1838 var o = buildPersonCoverCoverPhoto(); |
| 1841 var od = new api.PersonCoverCoverPhoto.fromJson(o.toJson()); | 1839 var od = new api.PersonCoverCoverPhoto.fromJson(o.toJson()); |
| 1842 checkPersonCoverCoverPhoto(od); | 1840 checkPersonCoverCoverPhoto(od); |
| 1843 }); | 1841 }); |
| 1844 }); | 1842 }); |
| 1845 | 1843 |
| 1846 | |
| 1847 unittest.group("obj-schema-PersonCover", () { | 1844 unittest.group("obj-schema-PersonCover", () { |
| 1848 unittest.test("to-json--from-json", () { | 1845 unittest.test("to-json--from-json", () { |
| 1849 var o = buildPersonCover(); | 1846 var o = buildPersonCover(); |
| 1850 var od = new api.PersonCover.fromJson(o.toJson()); | 1847 var od = new api.PersonCover.fromJson(o.toJson()); |
| 1851 checkPersonCover(od); | 1848 checkPersonCover(od); |
| 1852 }); | 1849 }); |
| 1853 }); | 1850 }); |
| 1854 | 1851 |
| 1855 | |
| 1856 unittest.group("obj-schema-PersonEmails", () { | 1852 unittest.group("obj-schema-PersonEmails", () { |
| 1857 unittest.test("to-json--from-json", () { | 1853 unittest.test("to-json--from-json", () { |
| 1858 var o = buildPersonEmails(); | 1854 var o = buildPersonEmails(); |
| 1859 var od = new api.PersonEmails.fromJson(o.toJson()); | 1855 var od = new api.PersonEmails.fromJson(o.toJson()); |
| 1860 checkPersonEmails(od); | 1856 checkPersonEmails(od); |
| 1861 }); | 1857 }); |
| 1862 }); | 1858 }); |
| 1863 | 1859 |
| 1864 | |
| 1865 unittest.group("obj-schema-PersonImage", () { | 1860 unittest.group("obj-schema-PersonImage", () { |
| 1866 unittest.test("to-json--from-json", () { | 1861 unittest.test("to-json--from-json", () { |
| 1867 var o = buildPersonImage(); | 1862 var o = buildPersonImage(); |
| 1868 var od = new api.PersonImage.fromJson(o.toJson()); | 1863 var od = new api.PersonImage.fromJson(o.toJson()); |
| 1869 checkPersonImage(od); | 1864 checkPersonImage(od); |
| 1870 }); | 1865 }); |
| 1871 }); | 1866 }); |
| 1872 | 1867 |
| 1873 | |
| 1874 unittest.group("obj-schema-PersonName", () { | 1868 unittest.group("obj-schema-PersonName", () { |
| 1875 unittest.test("to-json--from-json", () { | 1869 unittest.test("to-json--from-json", () { |
| 1876 var o = buildPersonName(); | 1870 var o = buildPersonName(); |
| 1877 var od = new api.PersonName.fromJson(o.toJson()); | 1871 var od = new api.PersonName.fromJson(o.toJson()); |
| 1878 checkPersonName(od); | 1872 checkPersonName(od); |
| 1879 }); | 1873 }); |
| 1880 }); | 1874 }); |
| 1881 | 1875 |
| 1882 | |
| 1883 unittest.group("obj-schema-PersonOrganizations", () { | 1876 unittest.group("obj-schema-PersonOrganizations", () { |
| 1884 unittest.test("to-json--from-json", () { | 1877 unittest.test("to-json--from-json", () { |
| 1885 var o = buildPersonOrganizations(); | 1878 var o = buildPersonOrganizations(); |
| 1886 var od = new api.PersonOrganizations.fromJson(o.toJson()); | 1879 var od = new api.PersonOrganizations.fromJson(o.toJson()); |
| 1887 checkPersonOrganizations(od); | 1880 checkPersonOrganizations(od); |
| 1888 }); | 1881 }); |
| 1889 }); | 1882 }); |
| 1890 | 1883 |
| 1891 | |
| 1892 unittest.group("obj-schema-PersonPlacesLived", () { | 1884 unittest.group("obj-schema-PersonPlacesLived", () { |
| 1893 unittest.test("to-json--from-json", () { | 1885 unittest.test("to-json--from-json", () { |
| 1894 var o = buildPersonPlacesLived(); | 1886 var o = buildPersonPlacesLived(); |
| 1895 var od = new api.PersonPlacesLived.fromJson(o.toJson()); | 1887 var od = new api.PersonPlacesLived.fromJson(o.toJson()); |
| 1896 checkPersonPlacesLived(od); | 1888 checkPersonPlacesLived(od); |
| 1897 }); | 1889 }); |
| 1898 }); | 1890 }); |
| 1899 | 1891 |
| 1900 | |
| 1901 unittest.group("obj-schema-PersonUrls", () { | 1892 unittest.group("obj-schema-PersonUrls", () { |
| 1902 unittest.test("to-json--from-json", () { | 1893 unittest.test("to-json--from-json", () { |
| 1903 var o = buildPersonUrls(); | 1894 var o = buildPersonUrls(); |
| 1904 var od = new api.PersonUrls.fromJson(o.toJson()); | 1895 var od = new api.PersonUrls.fromJson(o.toJson()); |
| 1905 checkPersonUrls(od); | 1896 checkPersonUrls(od); |
| 1906 }); | 1897 }); |
| 1907 }); | 1898 }); |
| 1908 | 1899 |
| 1909 | |
| 1910 unittest.group("obj-schema-Person", () { | 1900 unittest.group("obj-schema-Person", () { |
| 1911 unittest.test("to-json--from-json", () { | 1901 unittest.test("to-json--from-json", () { |
| 1912 var o = buildPerson(); | 1902 var o = buildPerson(); |
| 1913 var od = new api.Person.fromJson(o.toJson()); | 1903 var od = new api.Person.fromJson(o.toJson()); |
| 1914 checkPerson(od); | 1904 checkPerson(od); |
| 1915 }); | 1905 }); |
| 1916 }); | 1906 }); |
| 1917 | 1907 |
| 1918 | |
| 1919 unittest.group("obj-schema-PlaceAddress", () { | 1908 unittest.group("obj-schema-PlaceAddress", () { |
| 1920 unittest.test("to-json--from-json", () { | 1909 unittest.test("to-json--from-json", () { |
| 1921 var o = buildPlaceAddress(); | 1910 var o = buildPlaceAddress(); |
| 1922 var od = new api.PlaceAddress.fromJson(o.toJson()); | 1911 var od = new api.PlaceAddress.fromJson(o.toJson()); |
| 1923 checkPlaceAddress(od); | 1912 checkPlaceAddress(od); |
| 1924 }); | 1913 }); |
| 1925 }); | 1914 }); |
| 1926 | 1915 |
| 1927 | |
| 1928 unittest.group("obj-schema-PlacePosition", () { | 1916 unittest.group("obj-schema-PlacePosition", () { |
| 1929 unittest.test("to-json--from-json", () { | 1917 unittest.test("to-json--from-json", () { |
| 1930 var o = buildPlacePosition(); | 1918 var o = buildPlacePosition(); |
| 1931 var od = new api.PlacePosition.fromJson(o.toJson()); | 1919 var od = new api.PlacePosition.fromJson(o.toJson()); |
| 1932 checkPlacePosition(od); | 1920 checkPlacePosition(od); |
| 1933 }); | 1921 }); |
| 1934 }); | 1922 }); |
| 1935 | 1923 |
| 1936 | |
| 1937 unittest.group("obj-schema-Place", () { | 1924 unittest.group("obj-schema-Place", () { |
| 1938 unittest.test("to-json--from-json", () { | 1925 unittest.test("to-json--from-json", () { |
| 1939 var o = buildPlace(); | 1926 var o = buildPlace(); |
| 1940 var od = new api.Place.fromJson(o.toJson()); | 1927 var od = new api.Place.fromJson(o.toJson()); |
| 1941 checkPlace(od); | 1928 checkPlace(od); |
| 1942 }); | 1929 }); |
| 1943 }); | 1930 }); |
| 1944 | 1931 |
| 1945 | |
| 1946 unittest.group("obj-schema-PlusAclentryResource", () { | 1932 unittest.group("obj-schema-PlusAclentryResource", () { |
| 1947 unittest.test("to-json--from-json", () { | 1933 unittest.test("to-json--from-json", () { |
| 1948 var o = buildPlusAclentryResource(); | 1934 var o = buildPlusAclentryResource(); |
| 1949 var od = new api.PlusAclentryResource.fromJson(o.toJson()); | 1935 var od = new api.PlusAclentryResource.fromJson(o.toJson()); |
| 1950 checkPlusAclentryResource(od); | 1936 checkPlusAclentryResource(od); |
| 1951 }); | 1937 }); |
| 1952 }); | 1938 }); |
| 1953 | 1939 |
| 1954 | |
| 1955 unittest.group("resource-ActivitiesResourceApi", () { | 1940 unittest.group("resource-ActivitiesResourceApi", () { |
| 1956 unittest.test("method--get", () { | 1941 unittest.test("method--get", () { |
| 1957 | |
| 1958 var mock = new HttpServerMock(); | 1942 var mock = new HttpServerMock(); |
| 1959 api.ActivitiesResourceApi res = new api.PlusApi(mock).activities; | 1943 api.ActivitiesResourceApi res = new api.PlusApi(mock).activities; |
| 1960 var arg_activityId = "foo"; | 1944 var arg_activityId = "foo"; |
| 1961 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 1945 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 1962 var path = (req.url).path; | 1946 var path = (req.url).path; |
| 1963 var pathOffset = 0; | 1947 var pathOffset = 0; |
| 1964 var index; | 1948 var index; |
| 1965 var subPart; | 1949 var subPart; |
| 1966 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1950 unittest.expect( |
| 1951 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 1967 pathOffset += 1; | 1952 pathOffset += 1; |
| 1968 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("plus/v1/")); | 1953 unittest.expect(path.substring(pathOffset, pathOffset + 8), |
| 1954 unittest.equals("plus/v1/")); |
| 1969 pathOffset += 8; | 1955 pathOffset += 8; |
| 1970 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("activities/")); | 1956 unittest.expect(path.substring(pathOffset, pathOffset + 11), |
| 1957 unittest.equals("activities/")); |
| 1971 pathOffset += 11; | 1958 pathOffset += 11; |
| 1972 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | 1959 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| 1973 pathOffset = path.length; | 1960 pathOffset = path.length; |
| 1974 unittest.expect(subPart, unittest.equals("$arg_activityId")); | 1961 unittest.expect(subPart, unittest.equals("$arg_activityId")); |
| 1975 | 1962 |
| 1976 var query = (req.url).query; | 1963 var query = (req.url).query; |
| 1977 var queryOffset = 0; | 1964 var queryOffset = 0; |
| 1978 var queryMap = {}; | 1965 var queryMap = {}; |
| 1979 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 1966 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 1980 parseBool(n) { | 1967 parseBool(n) { |
| 1981 if (n == "true") return true; | 1968 if (n == "true") return true; |
| 1982 if (n == "false") return false; | 1969 if (n == "false") return false; |
| 1983 if (n == null) return null; | 1970 if (n == null) return null; |
| 1984 throw new core.ArgumentError("Invalid boolean: $n"); | 1971 throw new core.ArgumentError("Invalid boolean: $n"); |
| 1985 } | 1972 } |
| 1973 |
| 1986 if (query.length > 0) { | 1974 if (query.length > 0) { |
| 1987 for (var part in query.split("&")) { | 1975 for (var part in query.split("&")) { |
| 1988 var keyvalue = part.split("="); | 1976 var keyvalue = part.split("="); |
| 1989 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1977 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 1978 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 1990 } | 1979 } |
| 1991 } | 1980 } |
| 1992 | 1981 |
| 1993 | |
| 1994 var h = { | 1982 var h = { |
| 1995 "content-type" : "application/json; charset=utf-8", | 1983 "content-type": "application/json; charset=utf-8", |
| 1996 }; | 1984 }; |
| 1997 var resp = convert.JSON.encode(buildActivity()); | 1985 var resp = convert.JSON.encode(buildActivity()); |
| 1998 return new async.Future.value(stringResponse(200, h, resp)); | 1986 return new async.Future.value(stringResponse(200, h, resp)); |
| 1999 }), true); | 1987 }), true); |
| 2000 res.get(arg_activityId).then(unittest.expectAsync1(((api.Activity response
) { | 1988 res |
| 1989 .get(arg_activityId) |
| 1990 .then(unittest.expectAsync1(((api.Activity response) { |
| 2001 checkActivity(response); | 1991 checkActivity(response); |
| 2002 }))); | 1992 }))); |
| 2003 }); | 1993 }); |
| 2004 | 1994 |
| 2005 unittest.test("method--list", () { | 1995 unittest.test("method--list", () { |
| 2006 | |
| 2007 var mock = new HttpServerMock(); | 1996 var mock = new HttpServerMock(); |
| 2008 api.ActivitiesResourceApi res = new api.PlusApi(mock).activities; | 1997 api.ActivitiesResourceApi res = new api.PlusApi(mock).activities; |
| 2009 var arg_userId = "foo"; | 1998 var arg_userId = "foo"; |
| 2010 var arg_collection = "foo"; | 1999 var arg_collection = "foo"; |
| 2011 var arg_maxResults = 42; | 2000 var arg_maxResults = 42; |
| 2012 var arg_pageToken = "foo"; | 2001 var arg_pageToken = "foo"; |
| 2013 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 2002 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 2014 var path = (req.url).path; | 2003 var path = (req.url).path; |
| 2015 var pathOffset = 0; | 2004 var pathOffset = 0; |
| 2016 var index; | 2005 var index; |
| 2017 var subPart; | 2006 var subPart; |
| 2018 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2007 unittest.expect( |
| 2008 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 2019 pathOffset += 1; | 2009 pathOffset += 1; |
| 2020 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("plus/v1/")); | 2010 unittest.expect(path.substring(pathOffset, pathOffset + 8), |
| 2011 unittest.equals("plus/v1/")); |
| 2021 pathOffset += 8; | 2012 pathOffset += 8; |
| 2022 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ
als("people/")); | 2013 unittest.expect(path.substring(pathOffset, pathOffset + 7), |
| 2014 unittest.equals("people/")); |
| 2023 pathOffset += 7; | 2015 pathOffset += 7; |
| 2024 index = path.indexOf("/activities/", pathOffset); | 2016 index = path.indexOf("/activities/", pathOffset); |
| 2025 unittest.expect(index >= 0, unittest.isTrue); | 2017 unittest.expect(index >= 0, unittest.isTrue); |
| 2026 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 2018 subPart = |
| 2019 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 2027 pathOffset = index; | 2020 pathOffset = index; |
| 2028 unittest.expect(subPart, unittest.equals("$arg_userId")); | 2021 unittest.expect(subPart, unittest.equals("$arg_userId")); |
| 2029 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("/activities/")); | 2022 unittest.expect(path.substring(pathOffset, pathOffset + 12), |
| 2023 unittest.equals("/activities/")); |
| 2030 pathOffset += 12; | 2024 pathOffset += 12; |
| 2031 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | 2025 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| 2032 pathOffset = path.length; | 2026 pathOffset = path.length; |
| 2033 unittest.expect(subPart, unittest.equals("$arg_collection")); | 2027 unittest.expect(subPart, unittest.equals("$arg_collection")); |
| 2034 | 2028 |
| 2035 var query = (req.url).query; | 2029 var query = (req.url).query; |
| 2036 var queryOffset = 0; | 2030 var queryOffset = 0; |
| 2037 var queryMap = {}; | 2031 var queryMap = {}; |
| 2038 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 2032 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 2039 parseBool(n) { | 2033 parseBool(n) { |
| 2040 if (n == "true") return true; | 2034 if (n == "true") return true; |
| 2041 if (n == "false") return false; | 2035 if (n == "false") return false; |
| 2042 if (n == null) return null; | 2036 if (n == null) return null; |
| 2043 throw new core.ArgumentError("Invalid boolean: $n"); | 2037 throw new core.ArgumentError("Invalid boolean: $n"); |
| 2044 } | 2038 } |
| 2039 |
| 2045 if (query.length > 0) { | 2040 if (query.length > 0) { |
| 2046 for (var part in query.split("&")) { | 2041 for (var part in query.split("&")) { |
| 2047 var keyvalue = part.split("="); | 2042 var keyvalue = part.split("="); |
| 2048 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2043 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 2044 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 2049 } | 2045 } |
| 2050 } | 2046 } |
| 2051 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | 2047 unittest.expect(core.int.parse(queryMap["maxResults"].first), |
| 2052 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 2048 unittest.equals(arg_maxResults)); |
| 2053 | 2049 unittest.expect( |
| 2050 queryMap["pageToken"].first, unittest.equals(arg_pageToken)); |
| 2054 | 2051 |
| 2055 var h = { | 2052 var h = { |
| 2056 "content-type" : "application/json; charset=utf-8", | 2053 "content-type": "application/json; charset=utf-8", |
| 2057 }; | 2054 }; |
| 2058 var resp = convert.JSON.encode(buildActivityFeed()); | 2055 var resp = convert.JSON.encode(buildActivityFeed()); |
| 2059 return new async.Future.value(stringResponse(200, h, resp)); | 2056 return new async.Future.value(stringResponse(200, h, resp)); |
| 2060 }), true); | 2057 }), true); |
| 2061 res.list(arg_userId, arg_collection, maxResults: arg_maxResults, pageToken
: arg_pageToken).then(unittest.expectAsync1(((api.ActivityFeed response) { | 2058 res |
| 2059 .list(arg_userId, arg_collection, |
| 2060 maxResults: arg_maxResults, pageToken: arg_pageToken) |
| 2061 .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 | |
| 2068 var mock = new HttpServerMock(); | 2067 var mock = new HttpServerMock(); |
| 2069 api.ActivitiesResourceApi res = new api.PlusApi(mock).activities; | 2068 api.ActivitiesResourceApi res = new api.PlusApi(mock).activities; |
| 2070 var arg_query = "foo"; | 2069 var arg_query = "foo"; |
| 2071 var arg_language = "foo"; | 2070 var arg_language = "foo"; |
| 2072 var arg_maxResults = 42; | 2071 var arg_maxResults = 42; |
| 2073 var arg_orderBy = "foo"; | 2072 var arg_orderBy = "foo"; |
| 2074 var arg_pageToken = "foo"; | 2073 var arg_pageToken = "foo"; |
| 2075 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 2074 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 2076 var path = (req.url).path; | 2075 var path = (req.url).path; |
| 2077 var pathOffset = 0; | 2076 var pathOffset = 0; |
| 2078 var index; | 2077 var index; |
| 2079 var subPart; | 2078 var subPart; |
| 2080 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2079 unittest.expect( |
| 2080 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 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), |
| 2083 unittest.equals("plus/v1/")); |
| 2083 pathOffset += 8; | 2084 pathOffset += 8; |
| 2084 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("activities")); | 2085 unittest.expect(path.substring(pathOffset, pathOffset + 10), |
| 2086 unittest.equals("activities")); |
| 2085 pathOffset += 10; | 2087 pathOffset += 10; |
| 2086 | 2088 |
| 2087 var query = (req.url).query; | 2089 var query = (req.url).query; |
| 2088 var queryOffset = 0; | 2090 var queryOffset = 0; |
| 2089 var queryMap = {}; | 2091 var queryMap = {}; |
| 2090 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 2092 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 2091 parseBool(n) { | 2093 parseBool(n) { |
| 2092 if (n == "true") return true; | 2094 if (n == "true") return true; |
| 2093 if (n == "false") return false; | 2095 if (n == "false") return false; |
| 2094 if (n == null) return null; | 2096 if (n == null) return null; |
| 2095 throw new core.ArgumentError("Invalid boolean: $n"); | 2097 throw new core.ArgumentError("Invalid boolean: $n"); |
| 2096 } | 2098 } |
| 2099 |
| 2097 if (query.length > 0) { | 2100 if (query.length > 0) { |
| 2098 for (var part in query.split("&")) { | 2101 for (var part in query.split("&")) { |
| 2099 var keyvalue = part.split("="); | 2102 var keyvalue = part.split("="); |
| 2100 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2103 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 2104 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 2101 } | 2105 } |
| 2102 } | 2106 } |
| 2103 unittest.expect(queryMap["query"].first, unittest.equals(arg_query)); | 2107 unittest.expect(queryMap["query"].first, unittest.equals(arg_query)); |
| 2104 unittest.expect(queryMap["language"].first, unittest.equals(arg_language
)); | 2108 unittest.expect( |
| 2105 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | 2109 queryMap["language"].first, unittest.equals(arg_language)); |
| 2106 unittest.expect(queryMap["orderBy"].first, unittest.equals(arg_orderBy))
; | 2110 unittest.expect(core.int.parse(queryMap["maxResults"].first), |
| 2107 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 2111 unittest.equals(arg_maxResults)); |
| 2108 | 2112 unittest.expect( |
| 2113 queryMap["orderBy"].first, unittest.equals(arg_orderBy)); |
| 2114 unittest.expect( |
| 2115 queryMap["pageToken"].first, unittest.equals(arg_pageToken)); |
| 2109 | 2116 |
| 2110 var h = { | 2117 var h = { |
| 2111 "content-type" : "application/json; charset=utf-8", | 2118 "content-type": "application/json; charset=utf-8", |
| 2112 }; | 2119 }; |
| 2113 var resp = convert.JSON.encode(buildActivityFeed()); | 2120 var resp = convert.JSON.encode(buildActivityFeed()); |
| 2114 return new async.Future.value(stringResponse(200, h, resp)); | 2121 return new async.Future.value(stringResponse(200, h, resp)); |
| 2115 }), true); | 2122 }), true); |
| 2116 res.search(arg_query, language: arg_language, maxResults: arg_maxResults,
orderBy: arg_orderBy, pageToken: arg_pageToken).then(unittest.expectAsync1(((api
.ActivityFeed response) { | 2123 res |
| 2124 .search(arg_query, |
| 2125 language: arg_language, |
| 2126 maxResults: arg_maxResults, |
| 2127 orderBy: arg_orderBy, |
| 2128 pageToken: arg_pageToken) |
| 2129 .then(unittest.expectAsync1(((api.ActivityFeed response) { |
| 2117 checkActivityFeed(response); | 2130 checkActivityFeed(response); |
| 2118 }))); | 2131 }))); |
| 2119 }); | 2132 }); |
| 2120 | |
| 2121 }); | 2133 }); |
| 2122 | 2134 |
| 2123 | |
| 2124 unittest.group("resource-CommentsResourceApi", () { | 2135 unittest.group("resource-CommentsResourceApi", () { |
| 2125 unittest.test("method--get", () { | 2136 unittest.test("method--get", () { |
| 2126 | |
| 2127 var mock = new HttpServerMock(); | 2137 var mock = new HttpServerMock(); |
| 2128 api.CommentsResourceApi res = new api.PlusApi(mock).comments; | 2138 api.CommentsResourceApi res = new api.PlusApi(mock).comments; |
| 2129 var arg_commentId = "foo"; | 2139 var arg_commentId = "foo"; |
| 2130 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 2140 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 2131 var path = (req.url).path; | 2141 var path = (req.url).path; |
| 2132 var pathOffset = 0; | 2142 var pathOffset = 0; |
| 2133 var index; | 2143 var index; |
| 2134 var subPart; | 2144 var subPart; |
| 2135 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2145 unittest.expect( |
| 2146 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 2136 pathOffset += 1; | 2147 pathOffset += 1; |
| 2137 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("plus/v1/")); | 2148 unittest.expect(path.substring(pathOffset, pathOffset + 8), |
| 2149 unittest.equals("plus/v1/")); |
| 2138 pathOffset += 8; | 2150 pathOffset += 8; |
| 2139 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("comments/")); | 2151 unittest.expect(path.substring(pathOffset, pathOffset + 9), |
| 2152 unittest.equals("comments/")); |
| 2140 pathOffset += 9; | 2153 pathOffset += 9; |
| 2141 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | 2154 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| 2142 pathOffset = path.length; | 2155 pathOffset = path.length; |
| 2143 unittest.expect(subPart, unittest.equals("$arg_commentId")); | 2156 unittest.expect(subPart, unittest.equals("$arg_commentId")); |
| 2144 | 2157 |
| 2145 var query = (req.url).query; | 2158 var query = (req.url).query; |
| 2146 var queryOffset = 0; | 2159 var queryOffset = 0; |
| 2147 var queryMap = {}; | 2160 var queryMap = {}; |
| 2148 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 2161 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 2149 parseBool(n) { | 2162 parseBool(n) { |
| 2150 if (n == "true") return true; | 2163 if (n == "true") return true; |
| 2151 if (n == "false") return false; | 2164 if (n == "false") return false; |
| 2152 if (n == null) return null; | 2165 if (n == null) return null; |
| 2153 throw new core.ArgumentError("Invalid boolean: $n"); | 2166 throw new core.ArgumentError("Invalid boolean: $n"); |
| 2154 } | 2167 } |
| 2168 |
| 2155 if (query.length > 0) { | 2169 if (query.length > 0) { |
| 2156 for (var part in query.split("&")) { | 2170 for (var part in query.split("&")) { |
| 2157 var keyvalue = part.split("="); | 2171 var keyvalue = part.split("="); |
| 2158 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2172 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 2173 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 2159 } | 2174 } |
| 2160 } | 2175 } |
| 2161 | 2176 |
| 2162 | |
| 2163 var h = { | 2177 var h = { |
| 2164 "content-type" : "application/json; charset=utf-8", | 2178 "content-type": "application/json; charset=utf-8", |
| 2165 }; | 2179 }; |
| 2166 var resp = convert.JSON.encode(buildComment()); | 2180 var resp = convert.JSON.encode(buildComment()); |
| 2167 return new async.Future.value(stringResponse(200, h, resp)); | 2181 return new async.Future.value(stringResponse(200, h, resp)); |
| 2168 }), true); | 2182 }), true); |
| 2169 res.get(arg_commentId).then(unittest.expectAsync1(((api.Comment response)
{ | 2183 res |
| 2184 .get(arg_commentId) |
| 2185 .then(unittest.expectAsync1(((api.Comment response) { |
| 2170 checkComment(response); | 2186 checkComment(response); |
| 2171 }))); | 2187 }))); |
| 2172 }); | 2188 }); |
| 2173 | 2189 |
| 2174 unittest.test("method--list", () { | 2190 unittest.test("method--list", () { |
| 2175 | |
| 2176 var mock = new HttpServerMock(); | 2191 var mock = new HttpServerMock(); |
| 2177 api.CommentsResourceApi res = new api.PlusApi(mock).comments; | 2192 api.CommentsResourceApi res = new api.PlusApi(mock).comments; |
| 2178 var arg_activityId = "foo"; | 2193 var arg_activityId = "foo"; |
| 2179 var arg_maxResults = 42; | 2194 var arg_maxResults = 42; |
| 2180 var arg_pageToken = "foo"; | 2195 var arg_pageToken = "foo"; |
| 2181 var arg_sortOrder = "foo"; | 2196 var arg_sortOrder = "foo"; |
| 2182 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 2197 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 2183 var path = (req.url).path; | 2198 var path = (req.url).path; |
| 2184 var pathOffset = 0; | 2199 var pathOffset = 0; |
| 2185 var index; | 2200 var index; |
| 2186 var subPart; | 2201 var subPart; |
| 2187 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2202 unittest.expect( |
| 2203 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 2188 pathOffset += 1; | 2204 pathOffset += 1; |
| 2189 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("plus/v1/")); | 2205 unittest.expect(path.substring(pathOffset, pathOffset + 8), |
| 2206 unittest.equals("plus/v1/")); |
| 2190 pathOffset += 8; | 2207 pathOffset += 8; |
| 2191 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("activities/")); | 2208 unittest.expect(path.substring(pathOffset, pathOffset + 11), |
| 2209 unittest.equals("activities/")); |
| 2192 pathOffset += 11; | 2210 pathOffset += 11; |
| 2193 index = path.indexOf("/comments", pathOffset); | 2211 index = path.indexOf("/comments", pathOffset); |
| 2194 unittest.expect(index >= 0, unittest.isTrue); | 2212 unittest.expect(index >= 0, unittest.isTrue); |
| 2195 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 2213 subPart = |
| 2214 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 2196 pathOffset = index; | 2215 pathOffset = index; |
| 2197 unittest.expect(subPart, unittest.equals("$arg_activityId")); | 2216 unittest.expect(subPart, unittest.equals("$arg_activityId")); |
| 2198 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("/comments")); | 2217 unittest.expect(path.substring(pathOffset, pathOffset + 9), |
| 2218 unittest.equals("/comments")); |
| 2199 pathOffset += 9; | 2219 pathOffset += 9; |
| 2200 | 2220 |
| 2201 var query = (req.url).query; | 2221 var query = (req.url).query; |
| 2202 var queryOffset = 0; | 2222 var queryOffset = 0; |
| 2203 var queryMap = {}; | 2223 var queryMap = {}; |
| 2204 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 2224 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 2205 parseBool(n) { | 2225 parseBool(n) { |
| 2206 if (n == "true") return true; | 2226 if (n == "true") return true; |
| 2207 if (n == "false") return false; | 2227 if (n == "false") return false; |
| 2208 if (n == null) return null; | 2228 if (n == null) return null; |
| 2209 throw new core.ArgumentError("Invalid boolean: $n"); | 2229 throw new core.ArgumentError("Invalid boolean: $n"); |
| 2210 } | 2230 } |
| 2231 |
| 2211 if (query.length > 0) { | 2232 if (query.length > 0) { |
| 2212 for (var part in query.split("&")) { | 2233 for (var part in query.split("&")) { |
| 2213 var keyvalue = part.split("="); | 2234 var keyvalue = part.split("="); |
| 2214 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2235 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 2236 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 2215 } | 2237 } |
| 2216 } | 2238 } |
| 2217 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | 2239 unittest.expect(core.int.parse(queryMap["maxResults"].first), |
| 2218 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 2240 unittest.equals(arg_maxResults)); |
| 2219 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | 2241 unittest.expect( |
| 2220 | 2242 queryMap["pageToken"].first, unittest.equals(arg_pageToken)); |
| 2243 unittest.expect( |
| 2244 queryMap["sortOrder"].first, unittest.equals(arg_sortOrder)); |
| 2221 | 2245 |
| 2222 var h = { | 2246 var h = { |
| 2223 "content-type" : "application/json; charset=utf-8", | 2247 "content-type": "application/json; charset=utf-8", |
| 2224 }; | 2248 }; |
| 2225 var resp = convert.JSON.encode(buildCommentFeed()); | 2249 var resp = convert.JSON.encode(buildCommentFeed()); |
| 2226 return new async.Future.value(stringResponse(200, h, resp)); | 2250 return new async.Future.value(stringResponse(200, h, resp)); |
| 2227 }), true); | 2251 }), true); |
| 2228 res.list(arg_activityId, maxResults: arg_maxResults, pageToken: arg_pageTo
ken, sortOrder: arg_sortOrder).then(unittest.expectAsync1(((api.CommentFeed resp
onse) { | 2252 res |
| 2253 .list(arg_activityId, |
| 2254 maxResults: arg_maxResults, |
| 2255 pageToken: arg_pageToken, |
| 2256 sortOrder: arg_sortOrder) |
| 2257 .then(unittest.expectAsync1(((api.CommentFeed response) { |
| 2229 checkCommentFeed(response); | 2258 checkCommentFeed(response); |
| 2230 }))); | 2259 }))); |
| 2231 }); | 2260 }); |
| 2232 | |
| 2233 }); | 2261 }); |
| 2234 | 2262 |
| 2235 | |
| 2236 unittest.group("resource-PeopleResourceApi", () { | 2263 unittest.group("resource-PeopleResourceApi", () { |
| 2237 unittest.test("method--get", () { | 2264 unittest.test("method--get", () { |
| 2238 | |
| 2239 var mock = new HttpServerMock(); | 2265 var mock = new HttpServerMock(); |
| 2240 api.PeopleResourceApi res = new api.PlusApi(mock).people; | 2266 api.PeopleResourceApi res = new api.PlusApi(mock).people; |
| 2241 var arg_userId = "foo"; | 2267 var arg_userId = "foo"; |
| 2242 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 2268 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 2243 var path = (req.url).path; | 2269 var path = (req.url).path; |
| 2244 var pathOffset = 0; | 2270 var pathOffset = 0; |
| 2245 var index; | 2271 var index; |
| 2246 var subPart; | 2272 var subPart; |
| 2247 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2273 unittest.expect( |
| 2274 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 2248 pathOffset += 1; | 2275 pathOffset += 1; |
| 2249 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("plus/v1/")); | 2276 unittest.expect(path.substring(pathOffset, pathOffset + 8), |
| 2277 unittest.equals("plus/v1/")); |
| 2250 pathOffset += 8; | 2278 pathOffset += 8; |
| 2251 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ
als("people/")); | 2279 unittest.expect(path.substring(pathOffset, pathOffset + 7), |
| 2280 unittest.equals("people/")); |
| 2252 pathOffset += 7; | 2281 pathOffset += 7; |
| 2253 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | 2282 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| 2254 pathOffset = path.length; | 2283 pathOffset = path.length; |
| 2255 unittest.expect(subPart, unittest.equals("$arg_userId")); | 2284 unittest.expect(subPart, unittest.equals("$arg_userId")); |
| 2256 | 2285 |
| 2257 var query = (req.url).query; | 2286 var query = (req.url).query; |
| 2258 var queryOffset = 0; | 2287 var queryOffset = 0; |
| 2259 var queryMap = {}; | 2288 var queryMap = {}; |
| 2260 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 2289 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 2261 parseBool(n) { | 2290 parseBool(n) { |
| 2262 if (n == "true") return true; | 2291 if (n == "true") return true; |
| 2263 if (n == "false") return false; | 2292 if (n == "false") return false; |
| 2264 if (n == null) return null; | 2293 if (n == null) return null; |
| 2265 throw new core.ArgumentError("Invalid boolean: $n"); | 2294 throw new core.ArgumentError("Invalid boolean: $n"); |
| 2266 } | 2295 } |
| 2296 |
| 2267 if (query.length > 0) { | 2297 if (query.length > 0) { |
| 2268 for (var part in query.split("&")) { | 2298 for (var part in query.split("&")) { |
| 2269 var keyvalue = part.split("="); | 2299 var keyvalue = part.split("="); |
| 2270 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2300 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 2301 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 2271 } | 2302 } |
| 2272 } | 2303 } |
| 2273 | 2304 |
| 2274 | |
| 2275 var h = { | 2305 var h = { |
| 2276 "content-type" : "application/json; charset=utf-8", | 2306 "content-type": "application/json; charset=utf-8", |
| 2277 }; | 2307 }; |
| 2278 var resp = convert.JSON.encode(buildPerson()); | 2308 var resp = convert.JSON.encode(buildPerson()); |
| 2279 return new async.Future.value(stringResponse(200, h, resp)); | 2309 return new async.Future.value(stringResponse(200, h, resp)); |
| 2280 }), true); | 2310 }), true); |
| 2281 res.get(arg_userId).then(unittest.expectAsync1(((api.Person response) { | 2311 res.get(arg_userId).then(unittest.expectAsync1(((api.Person response) { |
| 2282 checkPerson(response); | 2312 checkPerson(response); |
| 2283 }))); | 2313 }))); |
| 2284 }); | 2314 }); |
| 2285 | 2315 |
| 2286 unittest.test("method--list", () { | 2316 unittest.test("method--list", () { |
| 2287 | |
| 2288 var mock = new HttpServerMock(); | 2317 var mock = new HttpServerMock(); |
| 2289 api.PeopleResourceApi res = new api.PlusApi(mock).people; | 2318 api.PeopleResourceApi res = new api.PlusApi(mock).people; |
| 2290 var arg_userId = "foo"; | 2319 var arg_userId = "foo"; |
| 2291 var arg_collection = "foo"; | 2320 var arg_collection = "foo"; |
| 2292 var arg_maxResults = 42; | 2321 var arg_maxResults = 42; |
| 2293 var arg_orderBy = "foo"; | 2322 var arg_orderBy = "foo"; |
| 2294 var arg_pageToken = "foo"; | 2323 var arg_pageToken = "foo"; |
| 2295 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 2324 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 2296 var path = (req.url).path; | 2325 var path = (req.url).path; |
| 2297 var pathOffset = 0; | 2326 var pathOffset = 0; |
| 2298 var index; | 2327 var index; |
| 2299 var subPart; | 2328 var subPart; |
| 2300 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2329 unittest.expect( |
| 2330 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 2301 pathOffset += 1; | 2331 pathOffset += 1; |
| 2302 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("plus/v1/")); | 2332 unittest.expect(path.substring(pathOffset, pathOffset + 8), |
| 2333 unittest.equals("plus/v1/")); |
| 2303 pathOffset += 8; | 2334 pathOffset += 8; |
| 2304 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ
als("people/")); | 2335 unittest.expect(path.substring(pathOffset, pathOffset + 7), |
| 2336 unittest.equals("people/")); |
| 2305 pathOffset += 7; | 2337 pathOffset += 7; |
| 2306 index = path.indexOf("/people/", pathOffset); | 2338 index = path.indexOf("/people/", pathOffset); |
| 2307 unittest.expect(index >= 0, unittest.isTrue); | 2339 unittest.expect(index >= 0, unittest.isTrue); |
| 2308 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 2340 subPart = |
| 2341 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 2309 pathOffset = index; | 2342 pathOffset = index; |
| 2310 unittest.expect(subPart, unittest.equals("$arg_userId")); | 2343 unittest.expect(subPart, unittest.equals("$arg_userId")); |
| 2311 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("/people/")); | 2344 unittest.expect(path.substring(pathOffset, pathOffset + 8), |
| 2345 unittest.equals("/people/")); |
| 2312 pathOffset += 8; | 2346 pathOffset += 8; |
| 2313 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | 2347 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| 2314 pathOffset = path.length; | 2348 pathOffset = path.length; |
| 2315 unittest.expect(subPart, unittest.equals("$arg_collection")); | 2349 unittest.expect(subPart, unittest.equals("$arg_collection")); |
| 2316 | 2350 |
| 2317 var query = (req.url).query; | 2351 var query = (req.url).query; |
| 2318 var queryOffset = 0; | 2352 var queryOffset = 0; |
| 2319 var queryMap = {}; | 2353 var queryMap = {}; |
| 2320 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 2354 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 2321 parseBool(n) { | 2355 parseBool(n) { |
| 2322 if (n == "true") return true; | 2356 if (n == "true") return true; |
| 2323 if (n == "false") return false; | 2357 if (n == "false") return false; |
| 2324 if (n == null) return null; | 2358 if (n == null) return null; |
| 2325 throw new core.ArgumentError("Invalid boolean: $n"); | 2359 throw new core.ArgumentError("Invalid boolean: $n"); |
| 2326 } | 2360 } |
| 2361 |
| 2327 if (query.length > 0) { | 2362 if (query.length > 0) { |
| 2328 for (var part in query.split("&")) { | 2363 for (var part in query.split("&")) { |
| 2329 var keyvalue = part.split("="); | 2364 var keyvalue = part.split("="); |
| 2330 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2365 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 2366 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 2331 } | 2367 } |
| 2332 } | 2368 } |
| 2333 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | 2369 unittest.expect(core.int.parse(queryMap["maxResults"].first), |
| 2334 unittest.expect(queryMap["orderBy"].first, unittest.equals(arg_orderBy))
; | 2370 unittest.equals(arg_maxResults)); |
| 2335 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 2371 unittest.expect( |
| 2336 | 2372 queryMap["orderBy"].first, unittest.equals(arg_orderBy)); |
| 2373 unittest.expect( |
| 2374 queryMap["pageToken"].first, unittest.equals(arg_pageToken)); |
| 2337 | 2375 |
| 2338 var h = { | 2376 var h = { |
| 2339 "content-type" : "application/json; charset=utf-8", | 2377 "content-type": "application/json; charset=utf-8", |
| 2340 }; | 2378 }; |
| 2341 var resp = convert.JSON.encode(buildPeopleFeed()); | 2379 var resp = convert.JSON.encode(buildPeopleFeed()); |
| 2342 return new async.Future.value(stringResponse(200, h, resp)); | 2380 return new async.Future.value(stringResponse(200, h, resp)); |
| 2343 }), true); | 2381 }), true); |
| 2344 res.list(arg_userId, arg_collection, maxResults: arg_maxResults, orderBy:
arg_orderBy, pageToken: arg_pageToken).then(unittest.expectAsync1(((api.PeopleFe
ed response) { | 2382 res |
| 2383 .list(arg_userId, arg_collection, |
| 2384 maxResults: arg_maxResults, |
| 2385 orderBy: arg_orderBy, |
| 2386 pageToken: arg_pageToken) |
| 2387 .then(unittest.expectAsync1(((api.PeopleFeed response) { |
| 2345 checkPeopleFeed(response); | 2388 checkPeopleFeed(response); |
| 2346 }))); | 2389 }))); |
| 2347 }); | 2390 }); |
| 2348 | 2391 |
| 2349 unittest.test("method--listByActivity", () { | 2392 unittest.test("method--listByActivity", () { |
| 2350 | |
| 2351 var mock = new HttpServerMock(); | 2393 var mock = new HttpServerMock(); |
| 2352 api.PeopleResourceApi res = new api.PlusApi(mock).people; | 2394 api.PeopleResourceApi res = new api.PlusApi(mock).people; |
| 2353 var arg_activityId = "foo"; | 2395 var arg_activityId = "foo"; |
| 2354 var arg_collection = "foo"; | 2396 var arg_collection = "foo"; |
| 2355 var arg_maxResults = 42; | 2397 var arg_maxResults = 42; |
| 2356 var arg_pageToken = "foo"; | 2398 var arg_pageToken = "foo"; |
| 2357 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 2399 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 2358 var path = (req.url).path; | 2400 var path = (req.url).path; |
| 2359 var pathOffset = 0; | 2401 var pathOffset = 0; |
| 2360 var index; | 2402 var index; |
| 2361 var subPart; | 2403 var subPart; |
| 2362 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2404 unittest.expect( |
| 2405 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 2363 pathOffset += 1; | 2406 pathOffset += 1; |
| 2364 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("plus/v1/")); | 2407 unittest.expect(path.substring(pathOffset, pathOffset + 8), |
| 2408 unittest.equals("plus/v1/")); |
| 2365 pathOffset += 8; | 2409 pathOffset += 8; |
| 2366 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("activities/")); | 2410 unittest.expect(path.substring(pathOffset, pathOffset + 11), |
| 2411 unittest.equals("activities/")); |
| 2367 pathOffset += 11; | 2412 pathOffset += 11; |
| 2368 index = path.indexOf("/people/", pathOffset); | 2413 index = path.indexOf("/people/", pathOffset); |
| 2369 unittest.expect(index >= 0, unittest.isTrue); | 2414 unittest.expect(index >= 0, unittest.isTrue); |
| 2370 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 2415 subPart = |
| 2416 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 2371 pathOffset = index; | 2417 pathOffset = index; |
| 2372 unittest.expect(subPart, unittest.equals("$arg_activityId")); | 2418 unittest.expect(subPart, unittest.equals("$arg_activityId")); |
| 2373 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("/people/")); | 2419 unittest.expect(path.substring(pathOffset, pathOffset + 8), |
| 2420 unittest.equals("/people/")); |
| 2374 pathOffset += 8; | 2421 pathOffset += 8; |
| 2375 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | 2422 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| 2376 pathOffset = path.length; | 2423 pathOffset = path.length; |
| 2377 unittest.expect(subPart, unittest.equals("$arg_collection")); | 2424 unittest.expect(subPart, unittest.equals("$arg_collection")); |
| 2378 | 2425 |
| 2379 var query = (req.url).query; | 2426 var query = (req.url).query; |
| 2380 var queryOffset = 0; | 2427 var queryOffset = 0; |
| 2381 var queryMap = {}; | 2428 var queryMap = {}; |
| 2382 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 2429 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 2383 parseBool(n) { | 2430 parseBool(n) { |
| 2384 if (n == "true") return true; | 2431 if (n == "true") return true; |
| 2385 if (n == "false") return false; | 2432 if (n == "false") return false; |
| 2386 if (n == null) return null; | 2433 if (n == null) return null; |
| 2387 throw new core.ArgumentError("Invalid boolean: $n"); | 2434 throw new core.ArgumentError("Invalid boolean: $n"); |
| 2388 } | 2435 } |
| 2436 |
| 2389 if (query.length > 0) { | 2437 if (query.length > 0) { |
| 2390 for (var part in query.split("&")) { | 2438 for (var part in query.split("&")) { |
| 2391 var keyvalue = part.split("="); | 2439 var keyvalue = part.split("="); |
| 2392 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2440 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 2441 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 2393 } | 2442 } |
| 2394 } | 2443 } |
| 2395 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | 2444 unittest.expect(core.int.parse(queryMap["maxResults"].first), |
| 2396 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 2445 unittest.equals(arg_maxResults)); |
| 2397 | 2446 unittest.expect( |
| 2447 queryMap["pageToken"].first, unittest.equals(arg_pageToken)); |
| 2398 | 2448 |
| 2399 var h = { | 2449 var h = { |
| 2400 "content-type" : "application/json; charset=utf-8", | 2450 "content-type": "application/json; charset=utf-8", |
| 2401 }; | 2451 }; |
| 2402 var resp = convert.JSON.encode(buildPeopleFeed()); | 2452 var resp = convert.JSON.encode(buildPeopleFeed()); |
| 2403 return new async.Future.value(stringResponse(200, h, resp)); | 2453 return new async.Future.value(stringResponse(200, h, resp)); |
| 2404 }), true); | 2454 }), true); |
| 2405 res.listByActivity(arg_activityId, arg_collection, maxResults: arg_maxResu
lts, pageToken: arg_pageToken).then(unittest.expectAsync1(((api.PeopleFeed respo
nse) { | 2455 res |
| 2456 .listByActivity(arg_activityId, arg_collection, |
| 2457 maxResults: arg_maxResults, pageToken: arg_pageToken) |
| 2458 .then(unittest.expectAsync1(((api.PeopleFeed response) { |
| 2406 checkPeopleFeed(response); | 2459 checkPeopleFeed(response); |
| 2407 }))); | 2460 }))); |
| 2408 }); | 2461 }); |
| 2409 | 2462 |
| 2410 unittest.test("method--search", () { | 2463 unittest.test("method--search", () { |
| 2411 | |
| 2412 var mock = new HttpServerMock(); | 2464 var mock = new HttpServerMock(); |
| 2413 api.PeopleResourceApi res = new api.PlusApi(mock).people; | 2465 api.PeopleResourceApi res = new api.PlusApi(mock).people; |
| 2414 var arg_query = "foo"; | 2466 var arg_query = "foo"; |
| 2415 var arg_language = "foo"; | 2467 var arg_language = "foo"; |
| 2416 var arg_maxResults = 42; | 2468 var arg_maxResults = 42; |
| 2417 var arg_pageToken = "foo"; | 2469 var arg_pageToken = "foo"; |
| 2418 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 2470 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 2419 var path = (req.url).path; | 2471 var path = (req.url).path; |
| 2420 var pathOffset = 0; | 2472 var pathOffset = 0; |
| 2421 var index; | 2473 var index; |
| 2422 var subPart; | 2474 var subPart; |
| 2423 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2475 unittest.expect( |
| 2476 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 2424 pathOffset += 1; | 2477 pathOffset += 1; |
| 2425 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("plus/v1/")); | 2478 unittest.expect(path.substring(pathOffset, pathOffset + 8), |
| 2479 unittest.equals("plus/v1/")); |
| 2426 pathOffset += 8; | 2480 pathOffset += 8; |
| 2427 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ
als("people")); | 2481 unittest.expect(path.substring(pathOffset, pathOffset + 6), |
| 2482 unittest.equals("people")); |
| 2428 pathOffset += 6; | 2483 pathOffset += 6; |
| 2429 | 2484 |
| 2430 var query = (req.url).query; | 2485 var query = (req.url).query; |
| 2431 var queryOffset = 0; | 2486 var queryOffset = 0; |
| 2432 var queryMap = {}; | 2487 var queryMap = {}; |
| 2433 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 2488 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 2434 parseBool(n) { | 2489 parseBool(n) { |
| 2435 if (n == "true") return true; | 2490 if (n == "true") return true; |
| 2436 if (n == "false") return false; | 2491 if (n == "false") return false; |
| 2437 if (n == null) return null; | 2492 if (n == null) return null; |
| 2438 throw new core.ArgumentError("Invalid boolean: $n"); | 2493 throw new core.ArgumentError("Invalid boolean: $n"); |
| 2439 } | 2494 } |
| 2495 |
| 2440 if (query.length > 0) { | 2496 if (query.length > 0) { |
| 2441 for (var part in query.split("&")) { | 2497 for (var part in query.split("&")) { |
| 2442 var keyvalue = part.split("="); | 2498 var keyvalue = part.split("="); |
| 2443 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2499 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 2500 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 2444 } | 2501 } |
| 2445 } | 2502 } |
| 2446 unittest.expect(queryMap["query"].first, unittest.equals(arg_query)); | 2503 unittest.expect(queryMap["query"].first, unittest.equals(arg_query)); |
| 2447 unittest.expect(queryMap["language"].first, unittest.equals(arg_language
)); | 2504 unittest.expect( |
| 2448 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | 2505 queryMap["language"].first, unittest.equals(arg_language)); |
| 2449 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 2506 unittest.expect(core.int.parse(queryMap["maxResults"].first), |
| 2450 | 2507 unittest.equals(arg_maxResults)); |
| 2508 unittest.expect( |
| 2509 queryMap["pageToken"].first, unittest.equals(arg_pageToken)); |
| 2451 | 2510 |
| 2452 var h = { | 2511 var h = { |
| 2453 "content-type" : "application/json; charset=utf-8", | 2512 "content-type": "application/json; charset=utf-8", |
| 2454 }; | 2513 }; |
| 2455 var resp = convert.JSON.encode(buildPeopleFeed()); | 2514 var resp = convert.JSON.encode(buildPeopleFeed()); |
| 2456 return new async.Future.value(stringResponse(200, h, resp)); | 2515 return new async.Future.value(stringResponse(200, h, resp)); |
| 2457 }), true); | 2516 }), true); |
| 2458 res.search(arg_query, language: arg_language, maxResults: arg_maxResults,
pageToken: arg_pageToken).then(unittest.expectAsync1(((api.PeopleFeed response)
{ | 2517 res |
| 2518 .search(arg_query, |
| 2519 language: arg_language, |
| 2520 maxResults: arg_maxResults, |
| 2521 pageToken: arg_pageToken) |
| 2522 .then(unittest.expectAsync1(((api.PeopleFeed response) { |
| 2459 checkPeopleFeed(response); | 2523 checkPeopleFeed(response); |
| 2460 }))); | 2524 }))); |
| 2461 }); | 2525 }); |
| 2462 | |
| 2463 }); | 2526 }); |
| 2464 | |
| 2465 | |
| 2466 } | 2527 } |
| 2467 | |
| OLD | NEW |