| OLD | NEW |
| 1 library googleapis.youtube.v3.test; | 1 library googleapis.youtube.v3.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/youtube/v3.dart' as api; | 10 import 'package:googleapis/youtube/v3.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 buildUnnamed563() { | 53 buildUnnamed562() { |
| 55 var o = new core.List<core.String>(); | 54 var o = new core.List<core.String>(); |
| 56 o.add("foo"); | 55 o.add("foo"); |
| 57 o.add("foo"); | 56 o.add("foo"); |
| 58 return o; | 57 return o; |
| 59 } | 58 } |
| 60 | 59 |
| 61 checkUnnamed563(core.List<core.String> o) { | 60 checkUnnamed562(core.List<core.String> o) { |
| 62 unittest.expect(o, unittest.hasLength(2)); | 61 unittest.expect(o, unittest.hasLength(2)); |
| 63 unittest.expect(o[0], unittest.equals('foo')); | 62 unittest.expect(o[0], unittest.equals('foo')); |
| 64 unittest.expect(o[1], unittest.equals('foo')); | 63 unittest.expect(o[1], unittest.equals('foo')); |
| 65 } | 64 } |
| 66 | 65 |
| 67 core.int buildCounterAccessPolicy = 0; | 66 core.int buildCounterAccessPolicy = 0; |
| 68 buildAccessPolicy() { | 67 buildAccessPolicy() { |
| 69 var o = new api.AccessPolicy(); | 68 var o = new api.AccessPolicy(); |
| 70 buildCounterAccessPolicy++; | 69 buildCounterAccessPolicy++; |
| 71 if (buildCounterAccessPolicy < 3) { | 70 if (buildCounterAccessPolicy < 3) { |
| 72 o.allowed = true; | 71 o.allowed = true; |
| 73 o.exception = buildUnnamed563(); | 72 o.exception = buildUnnamed562(); |
| 74 } | 73 } |
| 75 buildCounterAccessPolicy--; | 74 buildCounterAccessPolicy--; |
| 76 return o; | 75 return o; |
| 77 } | 76 } |
| 78 | 77 |
| 79 checkAccessPolicy(api.AccessPolicy o) { | 78 checkAccessPolicy(api.AccessPolicy o) { |
| 80 buildCounterAccessPolicy++; | 79 buildCounterAccessPolicy++; |
| 81 if (buildCounterAccessPolicy < 3) { | 80 if (buildCounterAccessPolicy < 3) { |
| 82 unittest.expect(o.allowed, unittest.isTrue); | 81 unittest.expect(o.allowed, unittest.isTrue); |
| 83 checkUnnamed563(o.exception); | 82 checkUnnamed562(o.exception); |
| 84 } | 83 } |
| 85 buildCounterAccessPolicy--; | 84 buildCounterAccessPolicy--; |
| 86 } | 85 } |
| 87 | 86 |
| 88 core.int buildCounterActivity = 0; | 87 core.int buildCounterActivity = 0; |
| 89 buildActivity() { | 88 buildActivity() { |
| 90 var o = new api.Activity(); | 89 var o = new api.Activity(); |
| 91 buildCounterActivity++; | 90 buildCounterActivity++; |
| 92 if (buildCounterActivity < 3) { | 91 if (buildCounterActivity < 3) { |
| 93 o.contentDetails = buildActivityContentDetails(); | 92 o.contentDetails = buildActivityContentDetails(); |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 buildActivityContentDetailsChannelItem() { | 173 buildActivityContentDetailsChannelItem() { |
| 175 var o = new api.ActivityContentDetailsChannelItem(); | 174 var o = new api.ActivityContentDetailsChannelItem(); |
| 176 buildCounterActivityContentDetailsChannelItem++; | 175 buildCounterActivityContentDetailsChannelItem++; |
| 177 if (buildCounterActivityContentDetailsChannelItem < 3) { | 176 if (buildCounterActivityContentDetailsChannelItem < 3) { |
| 178 o.resourceId = buildResourceId(); | 177 o.resourceId = buildResourceId(); |
| 179 } | 178 } |
| 180 buildCounterActivityContentDetailsChannelItem--; | 179 buildCounterActivityContentDetailsChannelItem--; |
| 181 return o; | 180 return o; |
| 182 } | 181 } |
| 183 | 182 |
| 184 checkActivityContentDetailsChannelItem(api.ActivityContentDetailsChannelItem o)
{ | 183 checkActivityContentDetailsChannelItem( |
| 184 api.ActivityContentDetailsChannelItem o) { |
| 185 buildCounterActivityContentDetailsChannelItem++; | 185 buildCounterActivityContentDetailsChannelItem++; |
| 186 if (buildCounterActivityContentDetailsChannelItem < 3) { | 186 if (buildCounterActivityContentDetailsChannelItem < 3) { |
| 187 checkResourceId(o.resourceId); | 187 checkResourceId(o.resourceId); |
| 188 } | 188 } |
| 189 buildCounterActivityContentDetailsChannelItem--; | 189 buildCounterActivityContentDetailsChannelItem--; |
| 190 } | 190 } |
| 191 | 191 |
| 192 core.int buildCounterActivityContentDetailsComment = 0; | 192 core.int buildCounterActivityContentDetailsComment = 0; |
| 193 buildActivityContentDetailsComment() { | 193 buildActivityContentDetailsComment() { |
| 194 var o = new api.ActivityContentDetailsComment(); | 194 var o = new api.ActivityContentDetailsComment(); |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 252 buildCounterActivityContentDetailsPlaylistItem++; | 252 buildCounterActivityContentDetailsPlaylistItem++; |
| 253 if (buildCounterActivityContentDetailsPlaylistItem < 3) { | 253 if (buildCounterActivityContentDetailsPlaylistItem < 3) { |
| 254 o.playlistId = "foo"; | 254 o.playlistId = "foo"; |
| 255 o.playlistItemId = "foo"; | 255 o.playlistItemId = "foo"; |
| 256 o.resourceId = buildResourceId(); | 256 o.resourceId = buildResourceId(); |
| 257 } | 257 } |
| 258 buildCounterActivityContentDetailsPlaylistItem--; | 258 buildCounterActivityContentDetailsPlaylistItem--; |
| 259 return o; | 259 return o; |
| 260 } | 260 } |
| 261 | 261 |
| 262 checkActivityContentDetailsPlaylistItem(api.ActivityContentDetailsPlaylistItem o
) { | 262 checkActivityContentDetailsPlaylistItem( |
| 263 api.ActivityContentDetailsPlaylistItem o) { |
| 263 buildCounterActivityContentDetailsPlaylistItem++; | 264 buildCounterActivityContentDetailsPlaylistItem++; |
| 264 if (buildCounterActivityContentDetailsPlaylistItem < 3) { | 265 if (buildCounterActivityContentDetailsPlaylistItem < 3) { |
| 265 unittest.expect(o.playlistId, unittest.equals('foo')); | 266 unittest.expect(o.playlistId, unittest.equals('foo')); |
| 266 unittest.expect(o.playlistItemId, unittest.equals('foo')); | 267 unittest.expect(o.playlistItemId, unittest.equals('foo')); |
| 267 checkResourceId(o.resourceId); | 268 checkResourceId(o.resourceId); |
| 268 } | 269 } |
| 269 buildCounterActivityContentDetailsPlaylistItem--; | 270 buildCounterActivityContentDetailsPlaylistItem--; |
| 270 } | 271 } |
| 271 | 272 |
| 273 buildUnnamed563() { |
| 274 var o = new core.List<core.String>(); |
| 275 o.add("foo"); |
| 276 o.add("foo"); |
| 277 return o; |
| 278 } |
| 279 |
| 280 checkUnnamed563(core.List<core.String> o) { |
| 281 unittest.expect(o, unittest.hasLength(2)); |
| 282 unittest.expect(o[0], unittest.equals('foo')); |
| 283 unittest.expect(o[1], unittest.equals('foo')); |
| 284 } |
| 285 |
| 272 buildUnnamed564() { | 286 buildUnnamed564() { |
| 273 var o = new core.List<core.String>(); | 287 var o = new core.List<core.String>(); |
| 274 o.add("foo"); | 288 o.add("foo"); |
| 275 o.add("foo"); | 289 o.add("foo"); |
| 276 return o; | 290 return o; |
| 277 } | 291 } |
| 278 | 292 |
| 279 checkUnnamed564(core.List<core.String> o) { | 293 checkUnnamed564(core.List<core.String> o) { |
| 280 unittest.expect(o, unittest.hasLength(2)); | 294 unittest.expect(o, unittest.hasLength(2)); |
| 281 unittest.expect(o[0], unittest.equals('foo')); | 295 unittest.expect(o[0], unittest.equals('foo')); |
| 282 unittest.expect(o[1], unittest.equals('foo')); | 296 unittest.expect(o[1], unittest.equals('foo')); |
| 283 } | |
| 284 | |
| 285 buildUnnamed565() { | |
| 286 var o = new core.List<core.String>(); | |
| 287 o.add("foo"); | |
| 288 o.add("foo"); | |
| 289 return o; | |
| 290 } | |
| 291 | |
| 292 checkUnnamed565(core.List<core.String> o) { | |
| 293 unittest.expect(o, unittest.hasLength(2)); | |
| 294 unittest.expect(o[0], unittest.equals('foo')); | |
| 295 unittest.expect(o[1], unittest.equals('foo')); | |
| 296 } | 297 } |
| 297 | 298 |
| 298 core.int buildCounterActivityContentDetailsPromotedItem = 0; | 299 core.int buildCounterActivityContentDetailsPromotedItem = 0; |
| 299 buildActivityContentDetailsPromotedItem() { | 300 buildActivityContentDetailsPromotedItem() { |
| 300 var o = new api.ActivityContentDetailsPromotedItem(); | 301 var o = new api.ActivityContentDetailsPromotedItem(); |
| 301 buildCounterActivityContentDetailsPromotedItem++; | 302 buildCounterActivityContentDetailsPromotedItem++; |
| 302 if (buildCounterActivityContentDetailsPromotedItem < 3) { | 303 if (buildCounterActivityContentDetailsPromotedItem < 3) { |
| 303 o.adTag = "foo"; | 304 o.adTag = "foo"; |
| 304 o.clickTrackingUrl = "foo"; | 305 o.clickTrackingUrl = "foo"; |
| 305 o.creativeViewUrl = "foo"; | 306 o.creativeViewUrl = "foo"; |
| 306 o.ctaType = "foo"; | 307 o.ctaType = "foo"; |
| 307 o.customCtaButtonText = "foo"; | 308 o.customCtaButtonText = "foo"; |
| 308 o.descriptionText = "foo"; | 309 o.descriptionText = "foo"; |
| 309 o.destinationUrl = "foo"; | 310 o.destinationUrl = "foo"; |
| 310 o.forecastingUrl = buildUnnamed564(); | 311 o.forecastingUrl = buildUnnamed563(); |
| 311 o.impressionUrl = buildUnnamed565(); | 312 o.impressionUrl = buildUnnamed564(); |
| 312 o.videoId = "foo"; | 313 o.videoId = "foo"; |
| 313 } | 314 } |
| 314 buildCounterActivityContentDetailsPromotedItem--; | 315 buildCounterActivityContentDetailsPromotedItem--; |
| 315 return o; | 316 return o; |
| 316 } | 317 } |
| 317 | 318 |
| 318 checkActivityContentDetailsPromotedItem(api.ActivityContentDetailsPromotedItem o
) { | 319 checkActivityContentDetailsPromotedItem( |
| 320 api.ActivityContentDetailsPromotedItem o) { |
| 319 buildCounterActivityContentDetailsPromotedItem++; | 321 buildCounterActivityContentDetailsPromotedItem++; |
| 320 if (buildCounterActivityContentDetailsPromotedItem < 3) { | 322 if (buildCounterActivityContentDetailsPromotedItem < 3) { |
| 321 unittest.expect(o.adTag, unittest.equals('foo')); | 323 unittest.expect(o.adTag, unittest.equals('foo')); |
| 322 unittest.expect(o.clickTrackingUrl, unittest.equals('foo')); | 324 unittest.expect(o.clickTrackingUrl, unittest.equals('foo')); |
| 323 unittest.expect(o.creativeViewUrl, unittest.equals('foo')); | 325 unittest.expect(o.creativeViewUrl, unittest.equals('foo')); |
| 324 unittest.expect(o.ctaType, unittest.equals('foo')); | 326 unittest.expect(o.ctaType, unittest.equals('foo')); |
| 325 unittest.expect(o.customCtaButtonText, unittest.equals('foo')); | 327 unittest.expect(o.customCtaButtonText, unittest.equals('foo')); |
| 326 unittest.expect(o.descriptionText, unittest.equals('foo')); | 328 unittest.expect(o.descriptionText, unittest.equals('foo')); |
| 327 unittest.expect(o.destinationUrl, unittest.equals('foo')); | 329 unittest.expect(o.destinationUrl, unittest.equals('foo')); |
| 328 checkUnnamed564(o.forecastingUrl); | 330 checkUnnamed563(o.forecastingUrl); |
| 329 checkUnnamed565(o.impressionUrl); | 331 checkUnnamed564(o.impressionUrl); |
| 330 unittest.expect(o.videoId, unittest.equals('foo')); | 332 unittest.expect(o.videoId, unittest.equals('foo')); |
| 331 } | 333 } |
| 332 buildCounterActivityContentDetailsPromotedItem--; | 334 buildCounterActivityContentDetailsPromotedItem--; |
| 333 } | 335 } |
| 334 | 336 |
| 335 core.int buildCounterActivityContentDetailsRecommendation = 0; | 337 core.int buildCounterActivityContentDetailsRecommendation = 0; |
| 336 buildActivityContentDetailsRecommendation() { | 338 buildActivityContentDetailsRecommendation() { |
| 337 var o = new api.ActivityContentDetailsRecommendation(); | 339 var o = new api.ActivityContentDetailsRecommendation(); |
| 338 buildCounterActivityContentDetailsRecommendation++; | 340 buildCounterActivityContentDetailsRecommendation++; |
| 339 if (buildCounterActivityContentDetailsRecommendation < 3) { | 341 if (buildCounterActivityContentDetailsRecommendation < 3) { |
| 340 o.reason = "foo"; | 342 o.reason = "foo"; |
| 341 o.resourceId = buildResourceId(); | 343 o.resourceId = buildResourceId(); |
| 342 o.seedResourceId = buildResourceId(); | 344 o.seedResourceId = buildResourceId(); |
| 343 } | 345 } |
| 344 buildCounterActivityContentDetailsRecommendation--; | 346 buildCounterActivityContentDetailsRecommendation--; |
| 345 return o; | 347 return o; |
| 346 } | 348 } |
| 347 | 349 |
| 348 checkActivityContentDetailsRecommendation(api.ActivityContentDetailsRecommendati
on o) { | 350 checkActivityContentDetailsRecommendation( |
| 351 api.ActivityContentDetailsRecommendation o) { |
| 349 buildCounterActivityContentDetailsRecommendation++; | 352 buildCounterActivityContentDetailsRecommendation++; |
| 350 if (buildCounterActivityContentDetailsRecommendation < 3) { | 353 if (buildCounterActivityContentDetailsRecommendation < 3) { |
| 351 unittest.expect(o.reason, unittest.equals('foo')); | 354 unittest.expect(o.reason, unittest.equals('foo')); |
| 352 checkResourceId(o.resourceId); | 355 checkResourceId(o.resourceId); |
| 353 checkResourceId(o.seedResourceId); | 356 checkResourceId(o.seedResourceId); |
| 354 } | 357 } |
| 355 buildCounterActivityContentDetailsRecommendation--; | 358 buildCounterActivityContentDetailsRecommendation--; |
| 356 } | 359 } |
| 357 | 360 |
| 358 core.int buildCounterActivityContentDetailsSocial = 0; | 361 core.int buildCounterActivityContentDetailsSocial = 0; |
| (...skipping 27 matching lines...) Expand all Loading... |
| 386 buildActivityContentDetailsSubscription() { | 389 buildActivityContentDetailsSubscription() { |
| 387 var o = new api.ActivityContentDetailsSubscription(); | 390 var o = new api.ActivityContentDetailsSubscription(); |
| 388 buildCounterActivityContentDetailsSubscription++; | 391 buildCounterActivityContentDetailsSubscription++; |
| 389 if (buildCounterActivityContentDetailsSubscription < 3) { | 392 if (buildCounterActivityContentDetailsSubscription < 3) { |
| 390 o.resourceId = buildResourceId(); | 393 o.resourceId = buildResourceId(); |
| 391 } | 394 } |
| 392 buildCounterActivityContentDetailsSubscription--; | 395 buildCounterActivityContentDetailsSubscription--; |
| 393 return o; | 396 return o; |
| 394 } | 397 } |
| 395 | 398 |
| 396 checkActivityContentDetailsSubscription(api.ActivityContentDetailsSubscription o
) { | 399 checkActivityContentDetailsSubscription( |
| 400 api.ActivityContentDetailsSubscription o) { |
| 397 buildCounterActivityContentDetailsSubscription++; | 401 buildCounterActivityContentDetailsSubscription++; |
| 398 if (buildCounterActivityContentDetailsSubscription < 3) { | 402 if (buildCounterActivityContentDetailsSubscription < 3) { |
| 399 checkResourceId(o.resourceId); | 403 checkResourceId(o.resourceId); |
| 400 } | 404 } |
| 401 buildCounterActivityContentDetailsSubscription--; | 405 buildCounterActivityContentDetailsSubscription--; |
| 402 } | 406 } |
| 403 | 407 |
| 404 core.int buildCounterActivityContentDetailsUpload = 0; | 408 core.int buildCounterActivityContentDetailsUpload = 0; |
| 405 buildActivityContentDetailsUpload() { | 409 buildActivityContentDetailsUpload() { |
| 406 var o = new api.ActivityContentDetailsUpload(); | 410 var o = new api.ActivityContentDetailsUpload(); |
| 407 buildCounterActivityContentDetailsUpload++; | 411 buildCounterActivityContentDetailsUpload++; |
| 408 if (buildCounterActivityContentDetailsUpload < 3) { | 412 if (buildCounterActivityContentDetailsUpload < 3) { |
| 409 o.videoId = "foo"; | 413 o.videoId = "foo"; |
| 410 } | 414 } |
| 411 buildCounterActivityContentDetailsUpload--; | 415 buildCounterActivityContentDetailsUpload--; |
| 412 return o; | 416 return o; |
| 413 } | 417 } |
| 414 | 418 |
| 415 checkActivityContentDetailsUpload(api.ActivityContentDetailsUpload o) { | 419 checkActivityContentDetailsUpload(api.ActivityContentDetailsUpload o) { |
| 416 buildCounterActivityContentDetailsUpload++; | 420 buildCounterActivityContentDetailsUpload++; |
| 417 if (buildCounterActivityContentDetailsUpload < 3) { | 421 if (buildCounterActivityContentDetailsUpload < 3) { |
| 418 unittest.expect(o.videoId, unittest.equals('foo')); | 422 unittest.expect(o.videoId, unittest.equals('foo')); |
| 419 } | 423 } |
| 420 buildCounterActivityContentDetailsUpload--; | 424 buildCounterActivityContentDetailsUpload--; |
| 421 } | 425 } |
| 422 | 426 |
| 423 buildUnnamed566() { | 427 buildUnnamed565() { |
| 424 var o = new core.List<api.Activity>(); | 428 var o = new core.List<api.Activity>(); |
| 425 o.add(buildActivity()); | 429 o.add(buildActivity()); |
| 426 o.add(buildActivity()); | 430 o.add(buildActivity()); |
| 427 return o; | 431 return o; |
| 428 } | 432 } |
| 429 | 433 |
| 430 checkUnnamed566(core.List<api.Activity> o) { | 434 checkUnnamed565(core.List<api.Activity> o) { |
| 431 unittest.expect(o, unittest.hasLength(2)); | 435 unittest.expect(o, unittest.hasLength(2)); |
| 432 checkActivity(o[0]); | 436 checkActivity(o[0]); |
| 433 checkActivity(o[1]); | 437 checkActivity(o[1]); |
| 434 } | 438 } |
| 435 | 439 |
| 436 core.int buildCounterActivityListResponse = 0; | 440 core.int buildCounterActivityListResponse = 0; |
| 437 buildActivityListResponse() { | 441 buildActivityListResponse() { |
| 438 var o = new api.ActivityListResponse(); | 442 var o = new api.ActivityListResponse(); |
| 439 buildCounterActivityListResponse++; | 443 buildCounterActivityListResponse++; |
| 440 if (buildCounterActivityListResponse < 3) { | 444 if (buildCounterActivityListResponse < 3) { |
| 441 o.etag = "foo"; | 445 o.etag = "foo"; |
| 442 o.eventId = "foo"; | 446 o.eventId = "foo"; |
| 443 o.items = buildUnnamed566(); | 447 o.items = buildUnnamed565(); |
| 444 o.kind = "foo"; | 448 o.kind = "foo"; |
| 445 o.nextPageToken = "foo"; | 449 o.nextPageToken = "foo"; |
| 446 o.pageInfo = buildPageInfo(); | 450 o.pageInfo = buildPageInfo(); |
| 447 o.prevPageToken = "foo"; | 451 o.prevPageToken = "foo"; |
| 448 o.tokenPagination = buildTokenPagination(); | 452 o.tokenPagination = buildTokenPagination(); |
| 449 o.visitorId = "foo"; | 453 o.visitorId = "foo"; |
| 450 } | 454 } |
| 451 buildCounterActivityListResponse--; | 455 buildCounterActivityListResponse--; |
| 452 return o; | 456 return o; |
| 453 } | 457 } |
| 454 | 458 |
| 455 checkActivityListResponse(api.ActivityListResponse o) { | 459 checkActivityListResponse(api.ActivityListResponse o) { |
| 456 buildCounterActivityListResponse++; | 460 buildCounterActivityListResponse++; |
| 457 if (buildCounterActivityListResponse < 3) { | 461 if (buildCounterActivityListResponse < 3) { |
| 458 unittest.expect(o.etag, unittest.equals('foo')); | 462 unittest.expect(o.etag, unittest.equals('foo')); |
| 459 unittest.expect(o.eventId, unittest.equals('foo')); | 463 unittest.expect(o.eventId, unittest.equals('foo')); |
| 460 checkUnnamed566(o.items); | 464 checkUnnamed565(o.items); |
| 461 unittest.expect(o.kind, unittest.equals('foo')); | 465 unittest.expect(o.kind, unittest.equals('foo')); |
| 462 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 466 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 463 checkPageInfo(o.pageInfo); | 467 checkPageInfo(o.pageInfo); |
| 464 unittest.expect(o.prevPageToken, unittest.equals('foo')); | 468 unittest.expect(o.prevPageToken, unittest.equals('foo')); |
| 465 checkTokenPagination(o.tokenPagination); | 469 checkTokenPagination(o.tokenPagination); |
| 466 unittest.expect(o.visitorId, unittest.equals('foo')); | 470 unittest.expect(o.visitorId, unittest.equals('foo')); |
| 467 } | 471 } |
| 468 buildCounterActivityListResponse--; | 472 buildCounterActivityListResponse--; |
| 469 } | 473 } |
| 470 | 474 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 486 return o; | 490 return o; |
| 487 } | 491 } |
| 488 | 492 |
| 489 checkActivitySnippet(api.ActivitySnippet o) { | 493 checkActivitySnippet(api.ActivitySnippet o) { |
| 490 buildCounterActivitySnippet++; | 494 buildCounterActivitySnippet++; |
| 491 if (buildCounterActivitySnippet < 3) { | 495 if (buildCounterActivitySnippet < 3) { |
| 492 unittest.expect(o.channelId, unittest.equals('foo')); | 496 unittest.expect(o.channelId, unittest.equals('foo')); |
| 493 unittest.expect(o.channelTitle, unittest.equals('foo')); | 497 unittest.expect(o.channelTitle, unittest.equals('foo')); |
| 494 unittest.expect(o.description, unittest.equals('foo')); | 498 unittest.expect(o.description, unittest.equals('foo')); |
| 495 unittest.expect(o.groupId, unittest.equals('foo')); | 499 unittest.expect(o.groupId, unittest.equals('foo')); |
| 496 unittest.expect(o.publishedAt, unittest.equals(core.DateTime.parse("2002-02-
27T14:01:02"))); | 500 unittest.expect(o.publishedAt, |
| 501 unittest.equals(core.DateTime.parse("2002-02-27T14:01:02"))); |
| 497 checkThumbnailDetails(o.thumbnails); | 502 checkThumbnailDetails(o.thumbnails); |
| 498 unittest.expect(o.title, unittest.equals('foo')); | 503 unittest.expect(o.title, unittest.equals('foo')); |
| 499 unittest.expect(o.type, unittest.equals('foo')); | 504 unittest.expect(o.type, unittest.equals('foo')); |
| 500 } | 505 } |
| 501 buildCounterActivitySnippet--; | 506 buildCounterActivitySnippet--; |
| 502 } | 507 } |
| 503 | 508 |
| 504 core.int buildCounterCaption = 0; | 509 core.int buildCounterCaption = 0; |
| 505 buildCaption() { | 510 buildCaption() { |
| 506 var o = new api.Caption(); | 511 var o = new api.Caption(); |
| (...skipping 12 matching lines...) Expand all Loading... |
| 519 buildCounterCaption++; | 524 buildCounterCaption++; |
| 520 if (buildCounterCaption < 3) { | 525 if (buildCounterCaption < 3) { |
| 521 unittest.expect(o.etag, unittest.equals('foo')); | 526 unittest.expect(o.etag, unittest.equals('foo')); |
| 522 unittest.expect(o.id, unittest.equals('foo')); | 527 unittest.expect(o.id, unittest.equals('foo')); |
| 523 unittest.expect(o.kind, unittest.equals('foo')); | 528 unittest.expect(o.kind, unittest.equals('foo')); |
| 524 checkCaptionSnippet(o.snippet); | 529 checkCaptionSnippet(o.snippet); |
| 525 } | 530 } |
| 526 buildCounterCaption--; | 531 buildCounterCaption--; |
| 527 } | 532 } |
| 528 | 533 |
| 529 buildUnnamed567() { | 534 buildUnnamed566() { |
| 530 var o = new core.List<api.Caption>(); | 535 var o = new core.List<api.Caption>(); |
| 531 o.add(buildCaption()); | 536 o.add(buildCaption()); |
| 532 o.add(buildCaption()); | 537 o.add(buildCaption()); |
| 533 return o; | 538 return o; |
| 534 } | 539 } |
| 535 | 540 |
| 536 checkUnnamed567(core.List<api.Caption> o) { | 541 checkUnnamed566(core.List<api.Caption> o) { |
| 537 unittest.expect(o, unittest.hasLength(2)); | 542 unittest.expect(o, unittest.hasLength(2)); |
| 538 checkCaption(o[0]); | 543 checkCaption(o[0]); |
| 539 checkCaption(o[1]); | 544 checkCaption(o[1]); |
| 540 } | 545 } |
| 541 | 546 |
| 542 core.int buildCounterCaptionListResponse = 0; | 547 core.int buildCounterCaptionListResponse = 0; |
| 543 buildCaptionListResponse() { | 548 buildCaptionListResponse() { |
| 544 var o = new api.CaptionListResponse(); | 549 var o = new api.CaptionListResponse(); |
| 545 buildCounterCaptionListResponse++; | 550 buildCounterCaptionListResponse++; |
| 546 if (buildCounterCaptionListResponse < 3) { | 551 if (buildCounterCaptionListResponse < 3) { |
| 547 o.etag = "foo"; | 552 o.etag = "foo"; |
| 548 o.eventId = "foo"; | 553 o.eventId = "foo"; |
| 549 o.items = buildUnnamed567(); | 554 o.items = buildUnnamed566(); |
| 550 o.kind = "foo"; | 555 o.kind = "foo"; |
| 551 o.visitorId = "foo"; | 556 o.visitorId = "foo"; |
| 552 } | 557 } |
| 553 buildCounterCaptionListResponse--; | 558 buildCounterCaptionListResponse--; |
| 554 return o; | 559 return o; |
| 555 } | 560 } |
| 556 | 561 |
| 557 checkCaptionListResponse(api.CaptionListResponse o) { | 562 checkCaptionListResponse(api.CaptionListResponse o) { |
| 558 buildCounterCaptionListResponse++; | 563 buildCounterCaptionListResponse++; |
| 559 if (buildCounterCaptionListResponse < 3) { | 564 if (buildCounterCaptionListResponse < 3) { |
| 560 unittest.expect(o.etag, unittest.equals('foo')); | 565 unittest.expect(o.etag, unittest.equals('foo')); |
| 561 unittest.expect(o.eventId, unittest.equals('foo')); | 566 unittest.expect(o.eventId, unittest.equals('foo')); |
| 562 checkUnnamed567(o.items); | 567 checkUnnamed566(o.items); |
| 563 unittest.expect(o.kind, unittest.equals('foo')); | 568 unittest.expect(o.kind, unittest.equals('foo')); |
| 564 unittest.expect(o.visitorId, unittest.equals('foo')); | 569 unittest.expect(o.visitorId, unittest.equals('foo')); |
| 565 } | 570 } |
| 566 buildCounterCaptionListResponse--; | 571 buildCounterCaptionListResponse--; |
| 567 } | 572 } |
| 568 | 573 |
| 569 core.int buildCounterCaptionSnippet = 0; | 574 core.int buildCounterCaptionSnippet = 0; |
| 570 buildCaptionSnippet() { | 575 buildCaptionSnippet() { |
| 571 var o = new api.CaptionSnippet(); | 576 var o = new api.CaptionSnippet(); |
| 572 buildCounterCaptionSnippet++; | 577 buildCounterCaptionSnippet++; |
| (...skipping 20 matching lines...) Expand all Loading... |
| 593 buildCounterCaptionSnippet++; | 598 buildCounterCaptionSnippet++; |
| 594 if (buildCounterCaptionSnippet < 3) { | 599 if (buildCounterCaptionSnippet < 3) { |
| 595 unittest.expect(o.audioTrackType, unittest.equals('foo')); | 600 unittest.expect(o.audioTrackType, unittest.equals('foo')); |
| 596 unittest.expect(o.failureReason, unittest.equals('foo')); | 601 unittest.expect(o.failureReason, unittest.equals('foo')); |
| 597 unittest.expect(o.isAutoSynced, unittest.isTrue); | 602 unittest.expect(o.isAutoSynced, unittest.isTrue); |
| 598 unittest.expect(o.isCC, unittest.isTrue); | 603 unittest.expect(o.isCC, unittest.isTrue); |
| 599 unittest.expect(o.isDraft, unittest.isTrue); | 604 unittest.expect(o.isDraft, unittest.isTrue); |
| 600 unittest.expect(o.isEasyReader, unittest.isTrue); | 605 unittest.expect(o.isEasyReader, unittest.isTrue); |
| 601 unittest.expect(o.isLarge, unittest.isTrue); | 606 unittest.expect(o.isLarge, unittest.isTrue); |
| 602 unittest.expect(o.language, unittest.equals('foo')); | 607 unittest.expect(o.language, unittest.equals('foo')); |
| 603 unittest.expect(o.lastUpdated, unittest.equals(core.DateTime.parse("2002-02-
27T14:01:02"))); | 608 unittest.expect(o.lastUpdated, |
| 609 unittest.equals(core.DateTime.parse("2002-02-27T14:01:02"))); |
| 604 unittest.expect(o.name, unittest.equals('foo')); | 610 unittest.expect(o.name, unittest.equals('foo')); |
| 605 unittest.expect(o.status, unittest.equals('foo')); | 611 unittest.expect(o.status, unittest.equals('foo')); |
| 606 unittest.expect(o.trackKind, unittest.equals('foo')); | 612 unittest.expect(o.trackKind, unittest.equals('foo')); |
| 607 unittest.expect(o.videoId, unittest.equals('foo')); | 613 unittest.expect(o.videoId, unittest.equals('foo')); |
| 608 } | 614 } |
| 609 buildCounterCaptionSnippet--; | 615 buildCounterCaptionSnippet--; |
| 610 } | 616 } |
| 611 | 617 |
| 612 core.int buildCounterCdnSettings = 0; | 618 core.int buildCounterCdnSettings = 0; |
| 613 buildCdnSettings() { | 619 buildCdnSettings() { |
| (...skipping 15 matching lines...) Expand all Loading... |
| 629 if (buildCounterCdnSettings < 3) { | 635 if (buildCounterCdnSettings < 3) { |
| 630 unittest.expect(o.format, unittest.equals('foo')); | 636 unittest.expect(o.format, unittest.equals('foo')); |
| 631 unittest.expect(o.frameRate, unittest.equals('foo')); | 637 unittest.expect(o.frameRate, unittest.equals('foo')); |
| 632 checkIngestionInfo(o.ingestionInfo); | 638 checkIngestionInfo(o.ingestionInfo); |
| 633 unittest.expect(o.ingestionType, unittest.equals('foo')); | 639 unittest.expect(o.ingestionType, unittest.equals('foo')); |
| 634 unittest.expect(o.resolution, unittest.equals('foo')); | 640 unittest.expect(o.resolution, unittest.equals('foo')); |
| 635 } | 641 } |
| 636 buildCounterCdnSettings--; | 642 buildCounterCdnSettings--; |
| 637 } | 643 } |
| 638 | 644 |
| 639 buildUnnamed568() { | 645 buildUnnamed567() { |
| 640 var o = new core.Map<core.String, api.ChannelLocalization>(); | 646 var o = new core.Map<core.String, api.ChannelLocalization>(); |
| 641 o["x"] = buildChannelLocalization(); | 647 o["x"] = buildChannelLocalization(); |
| 642 o["y"] = buildChannelLocalization(); | 648 o["y"] = buildChannelLocalization(); |
| 643 return o; | 649 return o; |
| 644 } | 650 } |
| 645 | 651 |
| 646 checkUnnamed568(core.Map<core.String, api.ChannelLocalization> o) { | 652 checkUnnamed567(core.Map<core.String, api.ChannelLocalization> o) { |
| 647 unittest.expect(o, unittest.hasLength(2)); | 653 unittest.expect(o, unittest.hasLength(2)); |
| 648 checkChannelLocalization(o["x"]); | 654 checkChannelLocalization(o["x"]); |
| 649 checkChannelLocalization(o["y"]); | 655 checkChannelLocalization(o["y"]); |
| 650 } | 656 } |
| 651 | 657 |
| 652 core.int buildCounterChannel = 0; | 658 core.int buildCounterChannel = 0; |
| 653 buildChannel() { | 659 buildChannel() { |
| 654 var o = new api.Channel(); | 660 var o = new api.Channel(); |
| 655 buildCounterChannel++; | 661 buildCounterChannel++; |
| 656 if (buildCounterChannel < 3) { | 662 if (buildCounterChannel < 3) { |
| 657 o.auditDetails = buildChannelAuditDetails(); | 663 o.auditDetails = buildChannelAuditDetails(); |
| 658 o.brandingSettings = buildChannelBrandingSettings(); | 664 o.brandingSettings = buildChannelBrandingSettings(); |
| 659 o.contentDetails = buildChannelContentDetails(); | 665 o.contentDetails = buildChannelContentDetails(); |
| 660 o.contentOwnerDetails = buildChannelContentOwnerDetails(); | 666 o.contentOwnerDetails = buildChannelContentOwnerDetails(); |
| 661 o.conversionPings = buildChannelConversionPings(); | 667 o.conversionPings = buildChannelConversionPings(); |
| 662 o.etag = "foo"; | 668 o.etag = "foo"; |
| 663 o.id = "foo"; | 669 o.id = "foo"; |
| 664 o.invideoPromotion = buildInvideoPromotion(); | 670 o.invideoPromotion = buildInvideoPromotion(); |
| 665 o.kind = "foo"; | 671 o.kind = "foo"; |
| 666 o.localizations = buildUnnamed568(); | 672 o.localizations = buildUnnamed567(); |
| 667 o.snippet = buildChannelSnippet(); | 673 o.snippet = buildChannelSnippet(); |
| 668 o.statistics = buildChannelStatistics(); | 674 o.statistics = buildChannelStatistics(); |
| 669 o.status = buildChannelStatus(); | 675 o.status = buildChannelStatus(); |
| 670 o.topicDetails = buildChannelTopicDetails(); | 676 o.topicDetails = buildChannelTopicDetails(); |
| 671 } | 677 } |
| 672 buildCounterChannel--; | 678 buildCounterChannel--; |
| 673 return o; | 679 return o; |
| 674 } | 680 } |
| 675 | 681 |
| 676 checkChannel(api.Channel o) { | 682 checkChannel(api.Channel o) { |
| 677 buildCounterChannel++; | 683 buildCounterChannel++; |
| 678 if (buildCounterChannel < 3) { | 684 if (buildCounterChannel < 3) { |
| 679 checkChannelAuditDetails(o.auditDetails); | 685 checkChannelAuditDetails(o.auditDetails); |
| 680 checkChannelBrandingSettings(o.brandingSettings); | 686 checkChannelBrandingSettings(o.brandingSettings); |
| 681 checkChannelContentDetails(o.contentDetails); | 687 checkChannelContentDetails(o.contentDetails); |
| 682 checkChannelContentOwnerDetails(o.contentOwnerDetails); | 688 checkChannelContentOwnerDetails(o.contentOwnerDetails); |
| 683 checkChannelConversionPings(o.conversionPings); | 689 checkChannelConversionPings(o.conversionPings); |
| 684 unittest.expect(o.etag, unittest.equals('foo')); | 690 unittest.expect(o.etag, unittest.equals('foo')); |
| 685 unittest.expect(o.id, unittest.equals('foo')); | 691 unittest.expect(o.id, unittest.equals('foo')); |
| 686 checkInvideoPromotion(o.invideoPromotion); | 692 checkInvideoPromotion(o.invideoPromotion); |
| 687 unittest.expect(o.kind, unittest.equals('foo')); | 693 unittest.expect(o.kind, unittest.equals('foo')); |
| 688 checkUnnamed568(o.localizations); | 694 checkUnnamed567(o.localizations); |
| 689 checkChannelSnippet(o.snippet); | 695 checkChannelSnippet(o.snippet); |
| 690 checkChannelStatistics(o.statistics); | 696 checkChannelStatistics(o.statistics); |
| 691 checkChannelStatus(o.status); | 697 checkChannelStatus(o.status); |
| 692 checkChannelTopicDetails(o.topicDetails); | 698 checkChannelTopicDetails(o.topicDetails); |
| 693 } | 699 } |
| 694 buildCounterChannel--; | 700 buildCounterChannel--; |
| 695 } | 701 } |
| 696 | 702 |
| 697 core.int buildCounterChannelAuditDetails = 0; | 703 core.int buildCounterChannelAuditDetails = 0; |
| 698 buildChannelAuditDetails() { | 704 buildChannelAuditDetails() { |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 735 checkChannelBannerResource(api.ChannelBannerResource o) { | 741 checkChannelBannerResource(api.ChannelBannerResource o) { |
| 736 buildCounterChannelBannerResource++; | 742 buildCounterChannelBannerResource++; |
| 737 if (buildCounterChannelBannerResource < 3) { | 743 if (buildCounterChannelBannerResource < 3) { |
| 738 unittest.expect(o.etag, unittest.equals('foo')); | 744 unittest.expect(o.etag, unittest.equals('foo')); |
| 739 unittest.expect(o.kind, unittest.equals('foo')); | 745 unittest.expect(o.kind, unittest.equals('foo')); |
| 740 unittest.expect(o.url, unittest.equals('foo')); | 746 unittest.expect(o.url, unittest.equals('foo')); |
| 741 } | 747 } |
| 742 buildCounterChannelBannerResource--; | 748 buildCounterChannelBannerResource--; |
| 743 } | 749 } |
| 744 | 750 |
| 745 buildUnnamed569() { | 751 buildUnnamed568() { |
| 746 var o = new core.List<api.PropertyValue>(); | 752 var o = new core.List<api.PropertyValue>(); |
| 747 o.add(buildPropertyValue()); | 753 o.add(buildPropertyValue()); |
| 748 o.add(buildPropertyValue()); | 754 o.add(buildPropertyValue()); |
| 749 return o; | 755 return o; |
| 750 } | 756 } |
| 751 | 757 |
| 752 checkUnnamed569(core.List<api.PropertyValue> o) { | 758 checkUnnamed568(core.List<api.PropertyValue> o) { |
| 753 unittest.expect(o, unittest.hasLength(2)); | 759 unittest.expect(o, unittest.hasLength(2)); |
| 754 checkPropertyValue(o[0]); | 760 checkPropertyValue(o[0]); |
| 755 checkPropertyValue(o[1]); | 761 checkPropertyValue(o[1]); |
| 756 } | 762 } |
| 757 | 763 |
| 758 core.int buildCounterChannelBrandingSettings = 0; | 764 core.int buildCounterChannelBrandingSettings = 0; |
| 759 buildChannelBrandingSettings() { | 765 buildChannelBrandingSettings() { |
| 760 var o = new api.ChannelBrandingSettings(); | 766 var o = new api.ChannelBrandingSettings(); |
| 761 buildCounterChannelBrandingSettings++; | 767 buildCounterChannelBrandingSettings++; |
| 762 if (buildCounterChannelBrandingSettings < 3) { | 768 if (buildCounterChannelBrandingSettings < 3) { |
| 763 o.channel = buildChannelSettings(); | 769 o.channel = buildChannelSettings(); |
| 764 o.hints = buildUnnamed569(); | 770 o.hints = buildUnnamed568(); |
| 765 o.image = buildImageSettings(); | 771 o.image = buildImageSettings(); |
| 766 o.watch = buildWatchSettings(); | 772 o.watch = buildWatchSettings(); |
| 767 } | 773 } |
| 768 buildCounterChannelBrandingSettings--; | 774 buildCounterChannelBrandingSettings--; |
| 769 return o; | 775 return o; |
| 770 } | 776 } |
| 771 | 777 |
| 772 checkChannelBrandingSettings(api.ChannelBrandingSettings o) { | 778 checkChannelBrandingSettings(api.ChannelBrandingSettings o) { |
| 773 buildCounterChannelBrandingSettings++; | 779 buildCounterChannelBrandingSettings++; |
| 774 if (buildCounterChannelBrandingSettings < 3) { | 780 if (buildCounterChannelBrandingSettings < 3) { |
| 775 checkChannelSettings(o.channel); | 781 checkChannelSettings(o.channel); |
| 776 checkUnnamed569(o.hints); | 782 checkUnnamed568(o.hints); |
| 777 checkImageSettings(o.image); | 783 checkImageSettings(o.image); |
| 778 checkWatchSettings(o.watch); | 784 checkWatchSettings(o.watch); |
| 779 } | 785 } |
| 780 buildCounterChannelBrandingSettings--; | 786 buildCounterChannelBrandingSettings--; |
| 781 } | 787 } |
| 782 | 788 |
| 783 core.int buildCounterChannelContentDetailsRelatedPlaylists = 0; | 789 core.int buildCounterChannelContentDetailsRelatedPlaylists = 0; |
| 784 buildChannelContentDetailsRelatedPlaylists() { | 790 buildChannelContentDetailsRelatedPlaylists() { |
| 785 var o = new api.ChannelContentDetailsRelatedPlaylists(); | 791 var o = new api.ChannelContentDetailsRelatedPlaylists(); |
| 786 buildCounterChannelContentDetailsRelatedPlaylists++; | 792 buildCounterChannelContentDetailsRelatedPlaylists++; |
| 787 if (buildCounterChannelContentDetailsRelatedPlaylists < 3) { | 793 if (buildCounterChannelContentDetailsRelatedPlaylists < 3) { |
| 788 o.favorites = "foo"; | 794 o.favorites = "foo"; |
| 789 o.likes = "foo"; | 795 o.likes = "foo"; |
| 790 o.uploads = "foo"; | 796 o.uploads = "foo"; |
| 791 o.watchHistory = "foo"; | 797 o.watchHistory = "foo"; |
| 792 o.watchLater = "foo"; | 798 o.watchLater = "foo"; |
| 793 } | 799 } |
| 794 buildCounterChannelContentDetailsRelatedPlaylists--; | 800 buildCounterChannelContentDetailsRelatedPlaylists--; |
| 795 return o; | 801 return o; |
| 796 } | 802 } |
| 797 | 803 |
| 798 checkChannelContentDetailsRelatedPlaylists(api.ChannelContentDetailsRelatedPlayl
ists o) { | 804 checkChannelContentDetailsRelatedPlaylists( |
| 805 api.ChannelContentDetailsRelatedPlaylists o) { |
| 799 buildCounterChannelContentDetailsRelatedPlaylists++; | 806 buildCounterChannelContentDetailsRelatedPlaylists++; |
| 800 if (buildCounterChannelContentDetailsRelatedPlaylists < 3) { | 807 if (buildCounterChannelContentDetailsRelatedPlaylists < 3) { |
| 801 unittest.expect(o.favorites, unittest.equals('foo')); | 808 unittest.expect(o.favorites, unittest.equals('foo')); |
| 802 unittest.expect(o.likes, unittest.equals('foo')); | 809 unittest.expect(o.likes, unittest.equals('foo')); |
| 803 unittest.expect(o.uploads, unittest.equals('foo')); | 810 unittest.expect(o.uploads, unittest.equals('foo')); |
| 804 unittest.expect(o.watchHistory, unittest.equals('foo')); | 811 unittest.expect(o.watchHistory, unittest.equals('foo')); |
| 805 unittest.expect(o.watchLater, unittest.equals('foo')); | 812 unittest.expect(o.watchLater, unittest.equals('foo')); |
| 806 } | 813 } |
| 807 buildCounterChannelContentDetailsRelatedPlaylists--; | 814 buildCounterChannelContentDetailsRelatedPlaylists--; |
| 808 } | 815 } |
| (...skipping 26 matching lines...) Expand all Loading... |
| 835 o.timeLinked = core.DateTime.parse("2002-02-27T14:01:02"); | 842 o.timeLinked = core.DateTime.parse("2002-02-27T14:01:02"); |
| 836 } | 843 } |
| 837 buildCounterChannelContentOwnerDetails--; | 844 buildCounterChannelContentOwnerDetails--; |
| 838 return o; | 845 return o; |
| 839 } | 846 } |
| 840 | 847 |
| 841 checkChannelContentOwnerDetails(api.ChannelContentOwnerDetails o) { | 848 checkChannelContentOwnerDetails(api.ChannelContentOwnerDetails o) { |
| 842 buildCounterChannelContentOwnerDetails++; | 849 buildCounterChannelContentOwnerDetails++; |
| 843 if (buildCounterChannelContentOwnerDetails < 3) { | 850 if (buildCounterChannelContentOwnerDetails < 3) { |
| 844 unittest.expect(o.contentOwner, unittest.equals('foo')); | 851 unittest.expect(o.contentOwner, unittest.equals('foo')); |
| 845 unittest.expect(o.timeLinked, unittest.equals(core.DateTime.parse("2002-02-2
7T14:01:02"))); | 852 unittest.expect(o.timeLinked, |
| 853 unittest.equals(core.DateTime.parse("2002-02-27T14:01:02"))); |
| 846 } | 854 } |
| 847 buildCounterChannelContentOwnerDetails--; | 855 buildCounterChannelContentOwnerDetails--; |
| 848 } | 856 } |
| 849 | 857 |
| 850 core.int buildCounterChannelConversionPing = 0; | 858 core.int buildCounterChannelConversionPing = 0; |
| 851 buildChannelConversionPing() { | 859 buildChannelConversionPing() { |
| 852 var o = new api.ChannelConversionPing(); | 860 var o = new api.ChannelConversionPing(); |
| 853 buildCounterChannelConversionPing++; | 861 buildCounterChannelConversionPing++; |
| 854 if (buildCounterChannelConversionPing < 3) { | 862 if (buildCounterChannelConversionPing < 3) { |
| 855 o.context = "foo"; | 863 o.context = "foo"; |
| 856 o.conversionUrl = "foo"; | 864 o.conversionUrl = "foo"; |
| 857 } | 865 } |
| 858 buildCounterChannelConversionPing--; | 866 buildCounterChannelConversionPing--; |
| 859 return o; | 867 return o; |
| 860 } | 868 } |
| 861 | 869 |
| 862 checkChannelConversionPing(api.ChannelConversionPing o) { | 870 checkChannelConversionPing(api.ChannelConversionPing o) { |
| 863 buildCounterChannelConversionPing++; | 871 buildCounterChannelConversionPing++; |
| 864 if (buildCounterChannelConversionPing < 3) { | 872 if (buildCounterChannelConversionPing < 3) { |
| 865 unittest.expect(o.context, unittest.equals('foo')); | 873 unittest.expect(o.context, unittest.equals('foo')); |
| 866 unittest.expect(o.conversionUrl, unittest.equals('foo')); | 874 unittest.expect(o.conversionUrl, unittest.equals('foo')); |
| 867 } | 875 } |
| 868 buildCounterChannelConversionPing--; | 876 buildCounterChannelConversionPing--; |
| 869 } | 877 } |
| 870 | 878 |
| 871 buildUnnamed570() { | 879 buildUnnamed569() { |
| 872 var o = new core.List<api.ChannelConversionPing>(); | 880 var o = new core.List<api.ChannelConversionPing>(); |
| 873 o.add(buildChannelConversionPing()); | 881 o.add(buildChannelConversionPing()); |
| 874 o.add(buildChannelConversionPing()); | 882 o.add(buildChannelConversionPing()); |
| 875 return o; | 883 return o; |
| 876 } | 884 } |
| 877 | 885 |
| 878 checkUnnamed570(core.List<api.ChannelConversionPing> o) { | 886 checkUnnamed569(core.List<api.ChannelConversionPing> o) { |
| 879 unittest.expect(o, unittest.hasLength(2)); | 887 unittest.expect(o, unittest.hasLength(2)); |
| 880 checkChannelConversionPing(o[0]); | 888 checkChannelConversionPing(o[0]); |
| 881 checkChannelConversionPing(o[1]); | 889 checkChannelConversionPing(o[1]); |
| 882 } | 890 } |
| 883 | 891 |
| 884 core.int buildCounterChannelConversionPings = 0; | 892 core.int buildCounterChannelConversionPings = 0; |
| 885 buildChannelConversionPings() { | 893 buildChannelConversionPings() { |
| 886 var o = new api.ChannelConversionPings(); | 894 var o = new api.ChannelConversionPings(); |
| 887 buildCounterChannelConversionPings++; | 895 buildCounterChannelConversionPings++; |
| 888 if (buildCounterChannelConversionPings < 3) { | 896 if (buildCounterChannelConversionPings < 3) { |
| 889 o.pings = buildUnnamed570(); | 897 o.pings = buildUnnamed569(); |
| 890 } | 898 } |
| 891 buildCounterChannelConversionPings--; | 899 buildCounterChannelConversionPings--; |
| 892 return o; | 900 return o; |
| 893 } | 901 } |
| 894 | 902 |
| 895 checkChannelConversionPings(api.ChannelConversionPings o) { | 903 checkChannelConversionPings(api.ChannelConversionPings o) { |
| 896 buildCounterChannelConversionPings++; | 904 buildCounterChannelConversionPings++; |
| 897 if (buildCounterChannelConversionPings < 3) { | 905 if (buildCounterChannelConversionPings < 3) { |
| 898 checkUnnamed570(o.pings); | 906 checkUnnamed569(o.pings); |
| 899 } | 907 } |
| 900 buildCounterChannelConversionPings--; | 908 buildCounterChannelConversionPings--; |
| 901 } | 909 } |
| 902 | 910 |
| 903 buildUnnamed571() { | 911 buildUnnamed570() { |
| 904 var o = new core.List<api.Channel>(); | 912 var o = new core.List<api.Channel>(); |
| 905 o.add(buildChannel()); | 913 o.add(buildChannel()); |
| 906 o.add(buildChannel()); | 914 o.add(buildChannel()); |
| 907 return o; | 915 return o; |
| 908 } | 916 } |
| 909 | 917 |
| 910 checkUnnamed571(core.List<api.Channel> o) { | 918 checkUnnamed570(core.List<api.Channel> o) { |
| 911 unittest.expect(o, unittest.hasLength(2)); | 919 unittest.expect(o, unittest.hasLength(2)); |
| 912 checkChannel(o[0]); | 920 checkChannel(o[0]); |
| 913 checkChannel(o[1]); | 921 checkChannel(o[1]); |
| 914 } | 922 } |
| 915 | 923 |
| 916 core.int buildCounterChannelListResponse = 0; | 924 core.int buildCounterChannelListResponse = 0; |
| 917 buildChannelListResponse() { | 925 buildChannelListResponse() { |
| 918 var o = new api.ChannelListResponse(); | 926 var o = new api.ChannelListResponse(); |
| 919 buildCounterChannelListResponse++; | 927 buildCounterChannelListResponse++; |
| 920 if (buildCounterChannelListResponse < 3) { | 928 if (buildCounterChannelListResponse < 3) { |
| 921 o.etag = "foo"; | 929 o.etag = "foo"; |
| 922 o.eventId = "foo"; | 930 o.eventId = "foo"; |
| 923 o.items = buildUnnamed571(); | 931 o.items = buildUnnamed570(); |
| 924 o.kind = "foo"; | 932 o.kind = "foo"; |
| 925 o.nextPageToken = "foo"; | 933 o.nextPageToken = "foo"; |
| 926 o.pageInfo = buildPageInfo(); | 934 o.pageInfo = buildPageInfo(); |
| 927 o.prevPageToken = "foo"; | 935 o.prevPageToken = "foo"; |
| 928 o.tokenPagination = buildTokenPagination(); | 936 o.tokenPagination = buildTokenPagination(); |
| 929 o.visitorId = "foo"; | 937 o.visitorId = "foo"; |
| 930 } | 938 } |
| 931 buildCounterChannelListResponse--; | 939 buildCounterChannelListResponse--; |
| 932 return o; | 940 return o; |
| 933 } | 941 } |
| 934 | 942 |
| 935 checkChannelListResponse(api.ChannelListResponse o) { | 943 checkChannelListResponse(api.ChannelListResponse o) { |
| 936 buildCounterChannelListResponse++; | 944 buildCounterChannelListResponse++; |
| 937 if (buildCounterChannelListResponse < 3) { | 945 if (buildCounterChannelListResponse < 3) { |
| 938 unittest.expect(o.etag, unittest.equals('foo')); | 946 unittest.expect(o.etag, unittest.equals('foo')); |
| 939 unittest.expect(o.eventId, unittest.equals('foo')); | 947 unittest.expect(o.eventId, unittest.equals('foo')); |
| 940 checkUnnamed571(o.items); | 948 checkUnnamed570(o.items); |
| 941 unittest.expect(o.kind, unittest.equals('foo')); | 949 unittest.expect(o.kind, unittest.equals('foo')); |
| 942 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 950 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 943 checkPageInfo(o.pageInfo); | 951 checkPageInfo(o.pageInfo); |
| 944 unittest.expect(o.prevPageToken, unittest.equals('foo')); | 952 unittest.expect(o.prevPageToken, unittest.equals('foo')); |
| 945 checkTokenPagination(o.tokenPagination); | 953 checkTokenPagination(o.tokenPagination); |
| 946 unittest.expect(o.visitorId, unittest.equals('foo')); | 954 unittest.expect(o.visitorId, unittest.equals('foo')); |
| 947 } | 955 } |
| 948 buildCounterChannelListResponse--; | 956 buildCounterChannelListResponse--; |
| 949 } | 957 } |
| 950 | 958 |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 987 buildCounterChannelProfileDetails++; | 995 buildCounterChannelProfileDetails++; |
| 988 if (buildCounterChannelProfileDetails < 3) { | 996 if (buildCounterChannelProfileDetails < 3) { |
| 989 unittest.expect(o.channelId, unittest.equals('foo')); | 997 unittest.expect(o.channelId, unittest.equals('foo')); |
| 990 unittest.expect(o.channelUrl, unittest.equals('foo')); | 998 unittest.expect(o.channelUrl, unittest.equals('foo')); |
| 991 unittest.expect(o.displayName, unittest.equals('foo')); | 999 unittest.expect(o.displayName, unittest.equals('foo')); |
| 992 unittest.expect(o.profileImageUrl, unittest.equals('foo')); | 1000 unittest.expect(o.profileImageUrl, unittest.equals('foo')); |
| 993 } | 1001 } |
| 994 buildCounterChannelProfileDetails--; | 1002 buildCounterChannelProfileDetails--; |
| 995 } | 1003 } |
| 996 | 1004 |
| 997 buildUnnamed572() { | 1005 buildUnnamed571() { |
| 998 var o = new core.Map<core.String, api.ChannelSectionLocalization>(); | 1006 var o = new core.Map<core.String, api.ChannelSectionLocalization>(); |
| 999 o["x"] = buildChannelSectionLocalization(); | 1007 o["x"] = buildChannelSectionLocalization(); |
| 1000 o["y"] = buildChannelSectionLocalization(); | 1008 o["y"] = buildChannelSectionLocalization(); |
| 1001 return o; | 1009 return o; |
| 1002 } | 1010 } |
| 1003 | 1011 |
| 1004 checkUnnamed572(core.Map<core.String, api.ChannelSectionLocalization> o) { | 1012 checkUnnamed571(core.Map<core.String, api.ChannelSectionLocalization> o) { |
| 1005 unittest.expect(o, unittest.hasLength(2)); | 1013 unittest.expect(o, unittest.hasLength(2)); |
| 1006 checkChannelSectionLocalization(o["x"]); | 1014 checkChannelSectionLocalization(o["x"]); |
| 1007 checkChannelSectionLocalization(o["y"]); | 1015 checkChannelSectionLocalization(o["y"]); |
| 1008 } | 1016 } |
| 1009 | 1017 |
| 1010 core.int buildCounterChannelSection = 0; | 1018 core.int buildCounterChannelSection = 0; |
| 1011 buildChannelSection() { | 1019 buildChannelSection() { |
| 1012 var o = new api.ChannelSection(); | 1020 var o = new api.ChannelSection(); |
| 1013 buildCounterChannelSection++; | 1021 buildCounterChannelSection++; |
| 1014 if (buildCounterChannelSection < 3) { | 1022 if (buildCounterChannelSection < 3) { |
| 1015 o.contentDetails = buildChannelSectionContentDetails(); | 1023 o.contentDetails = buildChannelSectionContentDetails(); |
| 1016 o.etag = "foo"; | 1024 o.etag = "foo"; |
| 1017 o.id = "foo"; | 1025 o.id = "foo"; |
| 1018 o.kind = "foo"; | 1026 o.kind = "foo"; |
| 1019 o.localizations = buildUnnamed572(); | 1027 o.localizations = buildUnnamed571(); |
| 1020 o.snippet = buildChannelSectionSnippet(); | 1028 o.snippet = buildChannelSectionSnippet(); |
| 1021 o.targeting = buildChannelSectionTargeting(); | 1029 o.targeting = buildChannelSectionTargeting(); |
| 1022 } | 1030 } |
| 1023 buildCounterChannelSection--; | 1031 buildCounterChannelSection--; |
| 1024 return o; | 1032 return o; |
| 1025 } | 1033 } |
| 1026 | 1034 |
| 1027 checkChannelSection(api.ChannelSection o) { | 1035 checkChannelSection(api.ChannelSection o) { |
| 1028 buildCounterChannelSection++; | 1036 buildCounterChannelSection++; |
| 1029 if (buildCounterChannelSection < 3) { | 1037 if (buildCounterChannelSection < 3) { |
| 1030 checkChannelSectionContentDetails(o.contentDetails); | 1038 checkChannelSectionContentDetails(o.contentDetails); |
| 1031 unittest.expect(o.etag, unittest.equals('foo')); | 1039 unittest.expect(o.etag, unittest.equals('foo')); |
| 1032 unittest.expect(o.id, unittest.equals('foo')); | 1040 unittest.expect(o.id, unittest.equals('foo')); |
| 1033 unittest.expect(o.kind, unittest.equals('foo')); | 1041 unittest.expect(o.kind, unittest.equals('foo')); |
| 1034 checkUnnamed572(o.localizations); | 1042 checkUnnamed571(o.localizations); |
| 1035 checkChannelSectionSnippet(o.snippet); | 1043 checkChannelSectionSnippet(o.snippet); |
| 1036 checkChannelSectionTargeting(o.targeting); | 1044 checkChannelSectionTargeting(o.targeting); |
| 1037 } | 1045 } |
| 1038 buildCounterChannelSection--; | 1046 buildCounterChannelSection--; |
| 1039 } | 1047 } |
| 1040 | 1048 |
| 1049 buildUnnamed572() { |
| 1050 var o = new core.List<core.String>(); |
| 1051 o.add("foo"); |
| 1052 o.add("foo"); |
| 1053 return o; |
| 1054 } |
| 1055 |
| 1056 checkUnnamed572(core.List<core.String> o) { |
| 1057 unittest.expect(o, unittest.hasLength(2)); |
| 1058 unittest.expect(o[0], unittest.equals('foo')); |
| 1059 unittest.expect(o[1], unittest.equals('foo')); |
| 1060 } |
| 1061 |
| 1041 buildUnnamed573() { | 1062 buildUnnamed573() { |
| 1042 var o = new core.List<core.String>(); | 1063 var o = new core.List<core.String>(); |
| 1043 o.add("foo"); | 1064 o.add("foo"); |
| 1044 o.add("foo"); | 1065 o.add("foo"); |
| 1045 return o; | 1066 return o; |
| 1046 } | 1067 } |
| 1047 | 1068 |
| 1048 checkUnnamed573(core.List<core.String> o) { | 1069 checkUnnamed573(core.List<core.String> o) { |
| 1049 unittest.expect(o, unittest.hasLength(2)); | 1070 unittest.expect(o, unittest.hasLength(2)); |
| 1050 unittest.expect(o[0], unittest.equals('foo')); | 1071 unittest.expect(o[0], unittest.equals('foo')); |
| 1051 unittest.expect(o[1], unittest.equals('foo')); | 1072 unittest.expect(o[1], unittest.equals('foo')); |
| 1052 } | |
| 1053 | |
| 1054 buildUnnamed574() { | |
| 1055 var o = new core.List<core.String>(); | |
| 1056 o.add("foo"); | |
| 1057 o.add("foo"); | |
| 1058 return o; | |
| 1059 } | |
| 1060 | |
| 1061 checkUnnamed574(core.List<core.String> o) { | |
| 1062 unittest.expect(o, unittest.hasLength(2)); | |
| 1063 unittest.expect(o[0], unittest.equals('foo')); | |
| 1064 unittest.expect(o[1], unittest.equals('foo')); | |
| 1065 } | 1073 } |
| 1066 | 1074 |
| 1067 core.int buildCounterChannelSectionContentDetails = 0; | 1075 core.int buildCounterChannelSectionContentDetails = 0; |
| 1068 buildChannelSectionContentDetails() { | 1076 buildChannelSectionContentDetails() { |
| 1069 var o = new api.ChannelSectionContentDetails(); | 1077 var o = new api.ChannelSectionContentDetails(); |
| 1070 buildCounterChannelSectionContentDetails++; | 1078 buildCounterChannelSectionContentDetails++; |
| 1071 if (buildCounterChannelSectionContentDetails < 3) { | 1079 if (buildCounterChannelSectionContentDetails < 3) { |
| 1072 o.channels = buildUnnamed573(); | 1080 o.channels = buildUnnamed572(); |
| 1073 o.playlists = buildUnnamed574(); | 1081 o.playlists = buildUnnamed573(); |
| 1074 } | 1082 } |
| 1075 buildCounterChannelSectionContentDetails--; | 1083 buildCounterChannelSectionContentDetails--; |
| 1076 return o; | 1084 return o; |
| 1077 } | 1085 } |
| 1078 | 1086 |
| 1079 checkChannelSectionContentDetails(api.ChannelSectionContentDetails o) { | 1087 checkChannelSectionContentDetails(api.ChannelSectionContentDetails o) { |
| 1080 buildCounterChannelSectionContentDetails++; | 1088 buildCounterChannelSectionContentDetails++; |
| 1081 if (buildCounterChannelSectionContentDetails < 3) { | 1089 if (buildCounterChannelSectionContentDetails < 3) { |
| 1082 checkUnnamed573(o.channels); | 1090 checkUnnamed572(o.channels); |
| 1083 checkUnnamed574(o.playlists); | 1091 checkUnnamed573(o.playlists); |
| 1084 } | 1092 } |
| 1085 buildCounterChannelSectionContentDetails--; | 1093 buildCounterChannelSectionContentDetails--; |
| 1086 } | 1094 } |
| 1087 | 1095 |
| 1088 buildUnnamed575() { | 1096 buildUnnamed574() { |
| 1089 var o = new core.List<api.ChannelSection>(); | 1097 var o = new core.List<api.ChannelSection>(); |
| 1090 o.add(buildChannelSection()); | 1098 o.add(buildChannelSection()); |
| 1091 o.add(buildChannelSection()); | 1099 o.add(buildChannelSection()); |
| 1092 return o; | 1100 return o; |
| 1093 } | 1101 } |
| 1094 | 1102 |
| 1095 checkUnnamed575(core.List<api.ChannelSection> o) { | 1103 checkUnnamed574(core.List<api.ChannelSection> o) { |
| 1096 unittest.expect(o, unittest.hasLength(2)); | 1104 unittest.expect(o, unittest.hasLength(2)); |
| 1097 checkChannelSection(o[0]); | 1105 checkChannelSection(o[0]); |
| 1098 checkChannelSection(o[1]); | 1106 checkChannelSection(o[1]); |
| 1099 } | 1107 } |
| 1100 | 1108 |
| 1101 core.int buildCounterChannelSectionListResponse = 0; | 1109 core.int buildCounterChannelSectionListResponse = 0; |
| 1102 buildChannelSectionListResponse() { | 1110 buildChannelSectionListResponse() { |
| 1103 var o = new api.ChannelSectionListResponse(); | 1111 var o = new api.ChannelSectionListResponse(); |
| 1104 buildCounterChannelSectionListResponse++; | 1112 buildCounterChannelSectionListResponse++; |
| 1105 if (buildCounterChannelSectionListResponse < 3) { | 1113 if (buildCounterChannelSectionListResponse < 3) { |
| 1106 o.etag = "foo"; | 1114 o.etag = "foo"; |
| 1107 o.eventId = "foo"; | 1115 o.eventId = "foo"; |
| 1108 o.items = buildUnnamed575(); | 1116 o.items = buildUnnamed574(); |
| 1109 o.kind = "foo"; | 1117 o.kind = "foo"; |
| 1110 o.visitorId = "foo"; | 1118 o.visitorId = "foo"; |
| 1111 } | 1119 } |
| 1112 buildCounterChannelSectionListResponse--; | 1120 buildCounterChannelSectionListResponse--; |
| 1113 return o; | 1121 return o; |
| 1114 } | 1122 } |
| 1115 | 1123 |
| 1116 checkChannelSectionListResponse(api.ChannelSectionListResponse o) { | 1124 checkChannelSectionListResponse(api.ChannelSectionListResponse o) { |
| 1117 buildCounterChannelSectionListResponse++; | 1125 buildCounterChannelSectionListResponse++; |
| 1118 if (buildCounterChannelSectionListResponse < 3) { | 1126 if (buildCounterChannelSectionListResponse < 3) { |
| 1119 unittest.expect(o.etag, unittest.equals('foo')); | 1127 unittest.expect(o.etag, unittest.equals('foo')); |
| 1120 unittest.expect(o.eventId, unittest.equals('foo')); | 1128 unittest.expect(o.eventId, unittest.equals('foo')); |
| 1121 checkUnnamed575(o.items); | 1129 checkUnnamed574(o.items); |
| 1122 unittest.expect(o.kind, unittest.equals('foo')); | 1130 unittest.expect(o.kind, unittest.equals('foo')); |
| 1123 unittest.expect(o.visitorId, unittest.equals('foo')); | 1131 unittest.expect(o.visitorId, unittest.equals('foo')); |
| 1124 } | 1132 } |
| 1125 buildCounterChannelSectionListResponse--; | 1133 buildCounterChannelSectionListResponse--; |
| 1126 } | 1134 } |
| 1127 | 1135 |
| 1128 core.int buildCounterChannelSectionLocalization = 0; | 1136 core.int buildCounterChannelSectionLocalization = 0; |
| 1129 buildChannelSectionLocalization() { | 1137 buildChannelSectionLocalization() { |
| 1130 var o = new api.ChannelSectionLocalization(); | 1138 var o = new api.ChannelSectionLocalization(); |
| 1131 buildCounterChannelSectionLocalization++; | 1139 buildCounterChannelSectionLocalization++; |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1168 unittest.expect(o.defaultLanguage, unittest.equals('foo')); | 1176 unittest.expect(o.defaultLanguage, unittest.equals('foo')); |
| 1169 checkChannelSectionLocalization(o.localized); | 1177 checkChannelSectionLocalization(o.localized); |
| 1170 unittest.expect(o.position, unittest.equals(42)); | 1178 unittest.expect(o.position, unittest.equals(42)); |
| 1171 unittest.expect(o.style, unittest.equals('foo')); | 1179 unittest.expect(o.style, unittest.equals('foo')); |
| 1172 unittest.expect(o.title, unittest.equals('foo')); | 1180 unittest.expect(o.title, unittest.equals('foo')); |
| 1173 unittest.expect(o.type, unittest.equals('foo')); | 1181 unittest.expect(o.type, unittest.equals('foo')); |
| 1174 } | 1182 } |
| 1175 buildCounterChannelSectionSnippet--; | 1183 buildCounterChannelSectionSnippet--; |
| 1176 } | 1184 } |
| 1177 | 1185 |
| 1186 buildUnnamed575() { |
| 1187 var o = new core.List<core.String>(); |
| 1188 o.add("foo"); |
| 1189 o.add("foo"); |
| 1190 return o; |
| 1191 } |
| 1192 |
| 1193 checkUnnamed575(core.List<core.String> o) { |
| 1194 unittest.expect(o, unittest.hasLength(2)); |
| 1195 unittest.expect(o[0], unittest.equals('foo')); |
| 1196 unittest.expect(o[1], unittest.equals('foo')); |
| 1197 } |
| 1198 |
| 1178 buildUnnamed576() { | 1199 buildUnnamed576() { |
| 1179 var o = new core.List<core.String>(); | 1200 var o = new core.List<core.String>(); |
| 1180 o.add("foo"); | 1201 o.add("foo"); |
| 1181 o.add("foo"); | 1202 o.add("foo"); |
| 1182 return o; | 1203 return o; |
| 1183 } | 1204 } |
| 1184 | 1205 |
| 1185 checkUnnamed576(core.List<core.String> o) { | 1206 checkUnnamed576(core.List<core.String> o) { |
| 1186 unittest.expect(o, unittest.hasLength(2)); | 1207 unittest.expect(o, unittest.hasLength(2)); |
| 1187 unittest.expect(o[0], unittest.equals('foo')); | 1208 unittest.expect(o[0], unittest.equals('foo')); |
| 1188 unittest.expect(o[1], unittest.equals('foo')); | 1209 unittest.expect(o[1], unittest.equals('foo')); |
| 1189 } | 1210 } |
| 1190 | 1211 |
| 1191 buildUnnamed577() { | 1212 buildUnnamed577() { |
| 1192 var o = new core.List<core.String>(); | 1213 var o = new core.List<core.String>(); |
| 1193 o.add("foo"); | 1214 o.add("foo"); |
| 1194 o.add("foo"); | 1215 o.add("foo"); |
| 1195 return o; | 1216 return o; |
| 1196 } | 1217 } |
| 1197 | 1218 |
| 1198 checkUnnamed577(core.List<core.String> o) { | 1219 checkUnnamed577(core.List<core.String> o) { |
| 1199 unittest.expect(o, unittest.hasLength(2)); | 1220 unittest.expect(o, unittest.hasLength(2)); |
| 1200 unittest.expect(o[0], unittest.equals('foo')); | 1221 unittest.expect(o[0], unittest.equals('foo')); |
| 1201 unittest.expect(o[1], unittest.equals('foo')); | 1222 unittest.expect(o[1], unittest.equals('foo')); |
| 1202 } | |
| 1203 | |
| 1204 buildUnnamed578() { | |
| 1205 var o = new core.List<core.String>(); | |
| 1206 o.add("foo"); | |
| 1207 o.add("foo"); | |
| 1208 return o; | |
| 1209 } | |
| 1210 | |
| 1211 checkUnnamed578(core.List<core.String> o) { | |
| 1212 unittest.expect(o, unittest.hasLength(2)); | |
| 1213 unittest.expect(o[0], unittest.equals('foo')); | |
| 1214 unittest.expect(o[1], unittest.equals('foo')); | |
| 1215 } | 1223 } |
| 1216 | 1224 |
| 1217 core.int buildCounterChannelSectionTargeting = 0; | 1225 core.int buildCounterChannelSectionTargeting = 0; |
| 1218 buildChannelSectionTargeting() { | 1226 buildChannelSectionTargeting() { |
| 1219 var o = new api.ChannelSectionTargeting(); | 1227 var o = new api.ChannelSectionTargeting(); |
| 1220 buildCounterChannelSectionTargeting++; | 1228 buildCounterChannelSectionTargeting++; |
| 1221 if (buildCounterChannelSectionTargeting < 3) { | 1229 if (buildCounterChannelSectionTargeting < 3) { |
| 1222 o.countries = buildUnnamed576(); | 1230 o.countries = buildUnnamed575(); |
| 1223 o.languages = buildUnnamed577(); | 1231 o.languages = buildUnnamed576(); |
| 1224 o.regions = buildUnnamed578(); | 1232 o.regions = buildUnnamed577(); |
| 1225 } | 1233 } |
| 1226 buildCounterChannelSectionTargeting--; | 1234 buildCounterChannelSectionTargeting--; |
| 1227 return o; | 1235 return o; |
| 1228 } | 1236 } |
| 1229 | 1237 |
| 1230 checkChannelSectionTargeting(api.ChannelSectionTargeting o) { | 1238 checkChannelSectionTargeting(api.ChannelSectionTargeting o) { |
| 1231 buildCounterChannelSectionTargeting++; | 1239 buildCounterChannelSectionTargeting++; |
| 1232 if (buildCounterChannelSectionTargeting < 3) { | 1240 if (buildCounterChannelSectionTargeting < 3) { |
| 1233 checkUnnamed576(o.countries); | 1241 checkUnnamed575(o.countries); |
| 1234 checkUnnamed577(o.languages); | 1242 checkUnnamed576(o.languages); |
| 1235 checkUnnamed578(o.regions); | 1243 checkUnnamed577(o.regions); |
| 1236 } | 1244 } |
| 1237 buildCounterChannelSectionTargeting--; | 1245 buildCounterChannelSectionTargeting--; |
| 1238 } | 1246 } |
| 1239 | 1247 |
| 1240 buildUnnamed579() { | 1248 buildUnnamed578() { |
| 1241 var o = new core.List<core.String>(); | 1249 var o = new core.List<core.String>(); |
| 1242 o.add("foo"); | 1250 o.add("foo"); |
| 1243 o.add("foo"); | 1251 o.add("foo"); |
| 1244 return o; | 1252 return o; |
| 1245 } | 1253 } |
| 1246 | 1254 |
| 1247 checkUnnamed579(core.List<core.String> o) { | 1255 checkUnnamed578(core.List<core.String> o) { |
| 1248 unittest.expect(o, unittest.hasLength(2)); | 1256 unittest.expect(o, unittest.hasLength(2)); |
| 1249 unittest.expect(o[0], unittest.equals('foo')); | 1257 unittest.expect(o[0], unittest.equals('foo')); |
| 1250 unittest.expect(o[1], unittest.equals('foo')); | 1258 unittest.expect(o[1], unittest.equals('foo')); |
| 1251 } | 1259 } |
| 1252 | 1260 |
| 1253 core.int buildCounterChannelSettings = 0; | 1261 core.int buildCounterChannelSettings = 0; |
| 1254 buildChannelSettings() { | 1262 buildChannelSettings() { |
| 1255 var o = new api.ChannelSettings(); | 1263 var o = new api.ChannelSettings(); |
| 1256 buildCounterChannelSettings++; | 1264 buildCounterChannelSettings++; |
| 1257 if (buildCounterChannelSettings < 3) { | 1265 if (buildCounterChannelSettings < 3) { |
| 1258 o.country = "foo"; | 1266 o.country = "foo"; |
| 1259 o.defaultLanguage = "foo"; | 1267 o.defaultLanguage = "foo"; |
| 1260 o.defaultTab = "foo"; | 1268 o.defaultTab = "foo"; |
| 1261 o.description = "foo"; | 1269 o.description = "foo"; |
| 1262 o.featuredChannelsTitle = "foo"; | 1270 o.featuredChannelsTitle = "foo"; |
| 1263 o.featuredChannelsUrls = buildUnnamed579(); | 1271 o.featuredChannelsUrls = buildUnnamed578(); |
| 1264 o.keywords = "foo"; | 1272 o.keywords = "foo"; |
| 1265 o.moderateComments = true; | 1273 o.moderateComments = true; |
| 1266 o.profileColor = "foo"; | 1274 o.profileColor = "foo"; |
| 1267 o.showBrowseView = true; | 1275 o.showBrowseView = true; |
| 1268 o.showRelatedChannels = true; | 1276 o.showRelatedChannels = true; |
| 1269 o.title = "foo"; | 1277 o.title = "foo"; |
| 1270 o.trackingAnalyticsAccountId = "foo"; | 1278 o.trackingAnalyticsAccountId = "foo"; |
| 1271 o.unsubscribedTrailer = "foo"; | 1279 o.unsubscribedTrailer = "foo"; |
| 1272 } | 1280 } |
| 1273 buildCounterChannelSettings--; | 1281 buildCounterChannelSettings--; |
| 1274 return o; | 1282 return o; |
| 1275 } | 1283 } |
| 1276 | 1284 |
| 1277 checkChannelSettings(api.ChannelSettings o) { | 1285 checkChannelSettings(api.ChannelSettings o) { |
| 1278 buildCounterChannelSettings++; | 1286 buildCounterChannelSettings++; |
| 1279 if (buildCounterChannelSettings < 3) { | 1287 if (buildCounterChannelSettings < 3) { |
| 1280 unittest.expect(o.country, unittest.equals('foo')); | 1288 unittest.expect(o.country, unittest.equals('foo')); |
| 1281 unittest.expect(o.defaultLanguage, unittest.equals('foo')); | 1289 unittest.expect(o.defaultLanguage, unittest.equals('foo')); |
| 1282 unittest.expect(o.defaultTab, unittest.equals('foo')); | 1290 unittest.expect(o.defaultTab, unittest.equals('foo')); |
| 1283 unittest.expect(o.description, unittest.equals('foo')); | 1291 unittest.expect(o.description, unittest.equals('foo')); |
| 1284 unittest.expect(o.featuredChannelsTitle, unittest.equals('foo')); | 1292 unittest.expect(o.featuredChannelsTitle, unittest.equals('foo')); |
| 1285 checkUnnamed579(o.featuredChannelsUrls); | 1293 checkUnnamed578(o.featuredChannelsUrls); |
| 1286 unittest.expect(o.keywords, unittest.equals('foo')); | 1294 unittest.expect(o.keywords, unittest.equals('foo')); |
| 1287 unittest.expect(o.moderateComments, unittest.isTrue); | 1295 unittest.expect(o.moderateComments, unittest.isTrue); |
| 1288 unittest.expect(o.profileColor, unittest.equals('foo')); | 1296 unittest.expect(o.profileColor, unittest.equals('foo')); |
| 1289 unittest.expect(o.showBrowseView, unittest.isTrue); | 1297 unittest.expect(o.showBrowseView, unittest.isTrue); |
| 1290 unittest.expect(o.showRelatedChannels, unittest.isTrue); | 1298 unittest.expect(o.showRelatedChannels, unittest.isTrue); |
| 1291 unittest.expect(o.title, unittest.equals('foo')); | 1299 unittest.expect(o.title, unittest.equals('foo')); |
| 1292 unittest.expect(o.trackingAnalyticsAccountId, unittest.equals('foo')); | 1300 unittest.expect(o.trackingAnalyticsAccountId, unittest.equals('foo')); |
| 1293 unittest.expect(o.unsubscribedTrailer, unittest.equals('foo')); | 1301 unittest.expect(o.unsubscribedTrailer, unittest.equals('foo')); |
| 1294 } | 1302 } |
| 1295 buildCounterChannelSettings--; | 1303 buildCounterChannelSettings--; |
| (...skipping 18 matching lines...) Expand all Loading... |
| 1314 } | 1322 } |
| 1315 | 1323 |
| 1316 checkChannelSnippet(api.ChannelSnippet o) { | 1324 checkChannelSnippet(api.ChannelSnippet o) { |
| 1317 buildCounterChannelSnippet++; | 1325 buildCounterChannelSnippet++; |
| 1318 if (buildCounterChannelSnippet < 3) { | 1326 if (buildCounterChannelSnippet < 3) { |
| 1319 unittest.expect(o.country, unittest.equals('foo')); | 1327 unittest.expect(o.country, unittest.equals('foo')); |
| 1320 unittest.expect(o.customUrl, unittest.equals('foo')); | 1328 unittest.expect(o.customUrl, unittest.equals('foo')); |
| 1321 unittest.expect(o.defaultLanguage, unittest.equals('foo')); | 1329 unittest.expect(o.defaultLanguage, unittest.equals('foo')); |
| 1322 unittest.expect(o.description, unittest.equals('foo')); | 1330 unittest.expect(o.description, unittest.equals('foo')); |
| 1323 checkChannelLocalization(o.localized); | 1331 checkChannelLocalization(o.localized); |
| 1324 unittest.expect(o.publishedAt, unittest.equals(core.DateTime.parse("2002-02-
27T14:01:02"))); | 1332 unittest.expect(o.publishedAt, |
| 1333 unittest.equals(core.DateTime.parse("2002-02-27T14:01:02"))); |
| 1325 checkThumbnailDetails(o.thumbnails); | 1334 checkThumbnailDetails(o.thumbnails); |
| 1326 unittest.expect(o.title, unittest.equals('foo')); | 1335 unittest.expect(o.title, unittest.equals('foo')); |
| 1327 } | 1336 } |
| 1328 buildCounterChannelSnippet--; | 1337 buildCounterChannelSnippet--; |
| 1329 } | 1338 } |
| 1330 | 1339 |
| 1331 core.int buildCounterChannelStatistics = 0; | 1340 core.int buildCounterChannelStatistics = 0; |
| 1332 buildChannelStatistics() { | 1341 buildChannelStatistics() { |
| 1333 var o = new api.ChannelStatistics(); | 1342 var o = new api.ChannelStatistics(); |
| 1334 buildCounterChannelStatistics++; | 1343 buildCounterChannelStatistics++; |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1371 checkChannelStatus(api.ChannelStatus o) { | 1380 checkChannelStatus(api.ChannelStatus o) { |
| 1372 buildCounterChannelStatus++; | 1381 buildCounterChannelStatus++; |
| 1373 if (buildCounterChannelStatus < 3) { | 1382 if (buildCounterChannelStatus < 3) { |
| 1374 unittest.expect(o.isLinked, unittest.isTrue); | 1383 unittest.expect(o.isLinked, unittest.isTrue); |
| 1375 unittest.expect(o.longUploadsStatus, unittest.equals('foo')); | 1384 unittest.expect(o.longUploadsStatus, unittest.equals('foo')); |
| 1376 unittest.expect(o.privacyStatus, unittest.equals('foo')); | 1385 unittest.expect(o.privacyStatus, unittest.equals('foo')); |
| 1377 } | 1386 } |
| 1378 buildCounterChannelStatus--; | 1387 buildCounterChannelStatus--; |
| 1379 } | 1388 } |
| 1380 | 1389 |
| 1390 buildUnnamed579() { |
| 1391 var o = new core.List<core.String>(); |
| 1392 o.add("foo"); |
| 1393 o.add("foo"); |
| 1394 return o; |
| 1395 } |
| 1396 |
| 1397 checkUnnamed579(core.List<core.String> o) { |
| 1398 unittest.expect(o, unittest.hasLength(2)); |
| 1399 unittest.expect(o[0], unittest.equals('foo')); |
| 1400 unittest.expect(o[1], unittest.equals('foo')); |
| 1401 } |
| 1402 |
| 1381 buildUnnamed580() { | 1403 buildUnnamed580() { |
| 1382 var o = new core.List<core.String>(); | 1404 var o = new core.List<core.String>(); |
| 1383 o.add("foo"); | 1405 o.add("foo"); |
| 1384 o.add("foo"); | 1406 o.add("foo"); |
| 1385 return o; | 1407 return o; |
| 1386 } | 1408 } |
| 1387 | 1409 |
| 1388 checkUnnamed580(core.List<core.String> o) { | 1410 checkUnnamed580(core.List<core.String> o) { |
| 1389 unittest.expect(o, unittest.hasLength(2)); | 1411 unittest.expect(o, unittest.hasLength(2)); |
| 1390 unittest.expect(o[0], unittest.equals('foo')); | 1412 unittest.expect(o[0], unittest.equals('foo')); |
| 1391 unittest.expect(o[1], unittest.equals('foo')); | 1413 unittest.expect(o[1], unittest.equals('foo')); |
| 1392 } | |
| 1393 | |
| 1394 buildUnnamed581() { | |
| 1395 var o = new core.List<core.String>(); | |
| 1396 o.add("foo"); | |
| 1397 o.add("foo"); | |
| 1398 return o; | |
| 1399 } | |
| 1400 | |
| 1401 checkUnnamed581(core.List<core.String> o) { | |
| 1402 unittest.expect(o, unittest.hasLength(2)); | |
| 1403 unittest.expect(o[0], unittest.equals('foo')); | |
| 1404 unittest.expect(o[1], unittest.equals('foo')); | |
| 1405 } | 1414 } |
| 1406 | 1415 |
| 1407 core.int buildCounterChannelTopicDetails = 0; | 1416 core.int buildCounterChannelTopicDetails = 0; |
| 1408 buildChannelTopicDetails() { | 1417 buildChannelTopicDetails() { |
| 1409 var o = new api.ChannelTopicDetails(); | 1418 var o = new api.ChannelTopicDetails(); |
| 1410 buildCounterChannelTopicDetails++; | 1419 buildCounterChannelTopicDetails++; |
| 1411 if (buildCounterChannelTopicDetails < 3) { | 1420 if (buildCounterChannelTopicDetails < 3) { |
| 1412 o.topicCategories = buildUnnamed580(); | 1421 o.topicCategories = buildUnnamed579(); |
| 1413 o.topicIds = buildUnnamed581(); | 1422 o.topicIds = buildUnnamed580(); |
| 1414 } | 1423 } |
| 1415 buildCounterChannelTopicDetails--; | 1424 buildCounterChannelTopicDetails--; |
| 1416 return o; | 1425 return o; |
| 1417 } | 1426 } |
| 1418 | 1427 |
| 1419 checkChannelTopicDetails(api.ChannelTopicDetails o) { | 1428 checkChannelTopicDetails(api.ChannelTopicDetails o) { |
| 1420 buildCounterChannelTopicDetails++; | 1429 buildCounterChannelTopicDetails++; |
| 1421 if (buildCounterChannelTopicDetails < 3) { | 1430 if (buildCounterChannelTopicDetails < 3) { |
| 1422 checkUnnamed580(o.topicCategories); | 1431 checkUnnamed579(o.topicCategories); |
| 1423 checkUnnamed581(o.topicIds); | 1432 checkUnnamed580(o.topicIds); |
| 1424 } | 1433 } |
| 1425 buildCounterChannelTopicDetails--; | 1434 buildCounterChannelTopicDetails--; |
| 1426 } | 1435 } |
| 1427 | 1436 |
| 1428 core.int buildCounterComment = 0; | 1437 core.int buildCounterComment = 0; |
| 1429 buildComment() { | 1438 buildComment() { |
| 1430 var o = new api.Comment(); | 1439 var o = new api.Comment(); |
| 1431 buildCounterComment++; | 1440 buildCounterComment++; |
| 1432 if (buildCounterComment < 3) { | 1441 if (buildCounterComment < 3) { |
| 1433 o.etag = "foo"; | 1442 o.etag = "foo"; |
| 1434 o.id = "foo"; | 1443 o.id = "foo"; |
| 1435 o.kind = "foo"; | 1444 o.kind = "foo"; |
| 1436 o.snippet = buildCommentSnippet(); | 1445 o.snippet = buildCommentSnippet(); |
| 1437 } | 1446 } |
| 1438 buildCounterComment--; | 1447 buildCounterComment--; |
| 1439 return o; | 1448 return o; |
| 1440 } | 1449 } |
| 1441 | 1450 |
| 1442 checkComment(api.Comment o) { | 1451 checkComment(api.Comment o) { |
| 1443 buildCounterComment++; | 1452 buildCounterComment++; |
| 1444 if (buildCounterComment < 3) { | 1453 if (buildCounterComment < 3) { |
| 1445 unittest.expect(o.etag, unittest.equals('foo')); | 1454 unittest.expect(o.etag, unittest.equals('foo')); |
| 1446 unittest.expect(o.id, unittest.equals('foo')); | 1455 unittest.expect(o.id, unittest.equals('foo')); |
| 1447 unittest.expect(o.kind, unittest.equals('foo')); | 1456 unittest.expect(o.kind, unittest.equals('foo')); |
| 1448 checkCommentSnippet(o.snippet); | 1457 checkCommentSnippet(o.snippet); |
| 1449 } | 1458 } |
| 1450 buildCounterComment--; | 1459 buildCounterComment--; |
| 1451 } | 1460 } |
| 1452 | 1461 |
| 1453 buildUnnamed582() { | 1462 buildUnnamed581() { |
| 1454 var o = new core.List<api.Comment>(); | 1463 var o = new core.List<api.Comment>(); |
| 1455 o.add(buildComment()); | 1464 o.add(buildComment()); |
| 1456 o.add(buildComment()); | 1465 o.add(buildComment()); |
| 1457 return o; | 1466 return o; |
| 1458 } | 1467 } |
| 1459 | 1468 |
| 1460 checkUnnamed582(core.List<api.Comment> o) { | 1469 checkUnnamed581(core.List<api.Comment> o) { |
| 1461 unittest.expect(o, unittest.hasLength(2)); | 1470 unittest.expect(o, unittest.hasLength(2)); |
| 1462 checkComment(o[0]); | 1471 checkComment(o[0]); |
| 1463 checkComment(o[1]); | 1472 checkComment(o[1]); |
| 1464 } | 1473 } |
| 1465 | 1474 |
| 1466 core.int buildCounterCommentListResponse = 0; | 1475 core.int buildCounterCommentListResponse = 0; |
| 1467 buildCommentListResponse() { | 1476 buildCommentListResponse() { |
| 1468 var o = new api.CommentListResponse(); | 1477 var o = new api.CommentListResponse(); |
| 1469 buildCounterCommentListResponse++; | 1478 buildCounterCommentListResponse++; |
| 1470 if (buildCounterCommentListResponse < 3) { | 1479 if (buildCounterCommentListResponse < 3) { |
| 1471 o.etag = "foo"; | 1480 o.etag = "foo"; |
| 1472 o.eventId = "foo"; | 1481 o.eventId = "foo"; |
| 1473 o.items = buildUnnamed582(); | 1482 o.items = buildUnnamed581(); |
| 1474 o.kind = "foo"; | 1483 o.kind = "foo"; |
| 1475 o.nextPageToken = "foo"; | 1484 o.nextPageToken = "foo"; |
| 1476 o.pageInfo = buildPageInfo(); | 1485 o.pageInfo = buildPageInfo(); |
| 1477 o.tokenPagination = buildTokenPagination(); | 1486 o.tokenPagination = buildTokenPagination(); |
| 1478 o.visitorId = "foo"; | 1487 o.visitorId = "foo"; |
| 1479 } | 1488 } |
| 1480 buildCounterCommentListResponse--; | 1489 buildCounterCommentListResponse--; |
| 1481 return o; | 1490 return o; |
| 1482 } | 1491 } |
| 1483 | 1492 |
| 1484 checkCommentListResponse(api.CommentListResponse o) { | 1493 checkCommentListResponse(api.CommentListResponse o) { |
| 1485 buildCounterCommentListResponse++; | 1494 buildCounterCommentListResponse++; |
| 1486 if (buildCounterCommentListResponse < 3) { | 1495 if (buildCounterCommentListResponse < 3) { |
| 1487 unittest.expect(o.etag, unittest.equals('foo')); | 1496 unittest.expect(o.etag, unittest.equals('foo')); |
| 1488 unittest.expect(o.eventId, unittest.equals('foo')); | 1497 unittest.expect(o.eventId, unittest.equals('foo')); |
| 1489 checkUnnamed582(o.items); | 1498 checkUnnamed581(o.items); |
| 1490 unittest.expect(o.kind, unittest.equals('foo')); | 1499 unittest.expect(o.kind, unittest.equals('foo')); |
| 1491 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 1500 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 1492 checkPageInfo(o.pageInfo); | 1501 checkPageInfo(o.pageInfo); |
| 1493 checkTokenPagination(o.tokenPagination); | 1502 checkTokenPagination(o.tokenPagination); |
| 1494 unittest.expect(o.visitorId, unittest.equals('foo')); | 1503 unittest.expect(o.visitorId, unittest.equals('foo')); |
| 1495 } | 1504 } |
| 1496 buildCounterCommentListResponse--; | 1505 buildCounterCommentListResponse--; |
| 1497 } | 1506 } |
| 1498 | 1507 |
| 1499 core.int buildCounterCommentSnippet = 0; | 1508 core.int buildCounterCommentSnippet = 0; |
| 1500 buildCommentSnippet() { | 1509 buildCommentSnippet() { |
| 1501 var o = new api.CommentSnippet(); | 1510 var o = new api.CommentSnippet(); |
| 1502 buildCounterCommentSnippet++; | 1511 buildCounterCommentSnippet++; |
| 1503 if (buildCounterCommentSnippet < 3) { | 1512 if (buildCounterCommentSnippet < 3) { |
| 1504 o.authorChannelId = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 1513 o.authorChannelId = { |
| 1514 'list': [1, 2, 3], |
| 1515 'bool': true, |
| 1516 'string': 'foo' |
| 1517 }; |
| 1505 o.authorChannelUrl = "foo"; | 1518 o.authorChannelUrl = "foo"; |
| 1506 o.authorDisplayName = "foo"; | 1519 o.authorDisplayName = "foo"; |
| 1507 o.authorProfileImageUrl = "foo"; | 1520 o.authorProfileImageUrl = "foo"; |
| 1508 o.canRate = true; | 1521 o.canRate = true; |
| 1509 o.channelId = "foo"; | 1522 o.channelId = "foo"; |
| 1510 o.likeCount = 42; | 1523 o.likeCount = 42; |
| 1511 o.moderationStatus = "foo"; | 1524 o.moderationStatus = "foo"; |
| 1512 o.parentId = "foo"; | 1525 o.parentId = "foo"; |
| 1513 o.publishedAt = core.DateTime.parse("2002-02-27T14:01:02"); | 1526 o.publishedAt = core.DateTime.parse("2002-02-27T14:01:02"); |
| 1514 o.textDisplay = "foo"; | 1527 o.textDisplay = "foo"; |
| 1515 o.textOriginal = "foo"; | 1528 o.textOriginal = "foo"; |
| 1516 o.updatedAt = core.DateTime.parse("2002-02-27T14:01:02"); | 1529 o.updatedAt = core.DateTime.parse("2002-02-27T14:01:02"); |
| 1517 o.videoId = "foo"; | 1530 o.videoId = "foo"; |
| 1518 o.viewerRating = "foo"; | 1531 o.viewerRating = "foo"; |
| 1519 } | 1532 } |
| 1520 buildCounterCommentSnippet--; | 1533 buildCounterCommentSnippet--; |
| 1521 return o; | 1534 return o; |
| 1522 } | 1535 } |
| 1523 | 1536 |
| 1524 checkCommentSnippet(api.CommentSnippet o) { | 1537 checkCommentSnippet(api.CommentSnippet o) { |
| 1525 buildCounterCommentSnippet++; | 1538 buildCounterCommentSnippet++; |
| 1526 if (buildCounterCommentSnippet < 3) { | 1539 if (buildCounterCommentSnippet < 3) { |
| 1527 var casted1 = (o.authorChannelId) as core.Map; unittest.expect(casted1, unit
test.hasLength(3)); unittest.expect(casted1["list"], unittest.equals([1, 2, 3]))
; unittest.expect(casted1["bool"], unittest.equals(true)); unittest.expect(caste
d1["string"], unittest.equals('foo')); | 1540 var casted1 = (o.authorChannelId) as core.Map; |
| 1541 unittest.expect(casted1, unittest.hasLength(3)); |
| 1542 unittest.expect(casted1["list"], unittest.equals([1, 2, 3])); |
| 1543 unittest.expect(casted1["bool"], unittest.equals(true)); |
| 1544 unittest.expect(casted1["string"], unittest.equals('foo')); |
| 1528 unittest.expect(o.authorChannelUrl, unittest.equals('foo')); | 1545 unittest.expect(o.authorChannelUrl, unittest.equals('foo')); |
| 1529 unittest.expect(o.authorDisplayName, unittest.equals('foo')); | 1546 unittest.expect(o.authorDisplayName, unittest.equals('foo')); |
| 1530 unittest.expect(o.authorProfileImageUrl, unittest.equals('foo')); | 1547 unittest.expect(o.authorProfileImageUrl, unittest.equals('foo')); |
| 1531 unittest.expect(o.canRate, unittest.isTrue); | 1548 unittest.expect(o.canRate, unittest.isTrue); |
| 1532 unittest.expect(o.channelId, unittest.equals('foo')); | 1549 unittest.expect(o.channelId, unittest.equals('foo')); |
| 1533 unittest.expect(o.likeCount, unittest.equals(42)); | 1550 unittest.expect(o.likeCount, unittest.equals(42)); |
| 1534 unittest.expect(o.moderationStatus, unittest.equals('foo')); | 1551 unittest.expect(o.moderationStatus, unittest.equals('foo')); |
| 1535 unittest.expect(o.parentId, unittest.equals('foo')); | 1552 unittest.expect(o.parentId, unittest.equals('foo')); |
| 1536 unittest.expect(o.publishedAt, unittest.equals(core.DateTime.parse("2002-02-
27T14:01:02"))); | 1553 unittest.expect(o.publishedAt, |
| 1554 unittest.equals(core.DateTime.parse("2002-02-27T14:01:02"))); |
| 1537 unittest.expect(o.textDisplay, unittest.equals('foo')); | 1555 unittest.expect(o.textDisplay, unittest.equals('foo')); |
| 1538 unittest.expect(o.textOriginal, unittest.equals('foo')); | 1556 unittest.expect(o.textOriginal, unittest.equals('foo')); |
| 1539 unittest.expect(o.updatedAt, unittest.equals(core.DateTime.parse("2002-02-27
T14:01:02"))); | 1557 unittest.expect(o.updatedAt, |
| 1558 unittest.equals(core.DateTime.parse("2002-02-27T14:01:02"))); |
| 1540 unittest.expect(o.videoId, unittest.equals('foo')); | 1559 unittest.expect(o.videoId, unittest.equals('foo')); |
| 1541 unittest.expect(o.viewerRating, unittest.equals('foo')); | 1560 unittest.expect(o.viewerRating, unittest.equals('foo')); |
| 1542 } | 1561 } |
| 1543 buildCounterCommentSnippet--; | 1562 buildCounterCommentSnippet--; |
| 1544 } | 1563 } |
| 1545 | 1564 |
| 1546 core.int buildCounterCommentThread = 0; | 1565 core.int buildCounterCommentThread = 0; |
| 1547 buildCommentThread() { | 1566 buildCommentThread() { |
| 1548 var o = new api.CommentThread(); | 1567 var o = new api.CommentThread(); |
| 1549 buildCounterCommentThread++; | 1568 buildCounterCommentThread++; |
| (...skipping 13 matching lines...) Expand all Loading... |
| 1563 if (buildCounterCommentThread < 3) { | 1582 if (buildCounterCommentThread < 3) { |
| 1564 unittest.expect(o.etag, unittest.equals('foo')); | 1583 unittest.expect(o.etag, unittest.equals('foo')); |
| 1565 unittest.expect(o.id, unittest.equals('foo')); | 1584 unittest.expect(o.id, unittest.equals('foo')); |
| 1566 unittest.expect(o.kind, unittest.equals('foo')); | 1585 unittest.expect(o.kind, unittest.equals('foo')); |
| 1567 checkCommentThreadReplies(o.replies); | 1586 checkCommentThreadReplies(o.replies); |
| 1568 checkCommentThreadSnippet(o.snippet); | 1587 checkCommentThreadSnippet(o.snippet); |
| 1569 } | 1588 } |
| 1570 buildCounterCommentThread--; | 1589 buildCounterCommentThread--; |
| 1571 } | 1590 } |
| 1572 | 1591 |
| 1573 buildUnnamed583() { | 1592 buildUnnamed582() { |
| 1574 var o = new core.List<api.CommentThread>(); | 1593 var o = new core.List<api.CommentThread>(); |
| 1575 o.add(buildCommentThread()); | 1594 o.add(buildCommentThread()); |
| 1576 o.add(buildCommentThread()); | 1595 o.add(buildCommentThread()); |
| 1577 return o; | 1596 return o; |
| 1578 } | 1597 } |
| 1579 | 1598 |
| 1580 checkUnnamed583(core.List<api.CommentThread> o) { | 1599 checkUnnamed582(core.List<api.CommentThread> o) { |
| 1581 unittest.expect(o, unittest.hasLength(2)); | 1600 unittest.expect(o, unittest.hasLength(2)); |
| 1582 checkCommentThread(o[0]); | 1601 checkCommentThread(o[0]); |
| 1583 checkCommentThread(o[1]); | 1602 checkCommentThread(o[1]); |
| 1584 } | 1603 } |
| 1585 | 1604 |
| 1586 core.int buildCounterCommentThreadListResponse = 0; | 1605 core.int buildCounterCommentThreadListResponse = 0; |
| 1587 buildCommentThreadListResponse() { | 1606 buildCommentThreadListResponse() { |
| 1588 var o = new api.CommentThreadListResponse(); | 1607 var o = new api.CommentThreadListResponse(); |
| 1589 buildCounterCommentThreadListResponse++; | 1608 buildCounterCommentThreadListResponse++; |
| 1590 if (buildCounterCommentThreadListResponse < 3) { | 1609 if (buildCounterCommentThreadListResponse < 3) { |
| 1591 o.etag = "foo"; | 1610 o.etag = "foo"; |
| 1592 o.eventId = "foo"; | 1611 o.eventId = "foo"; |
| 1593 o.items = buildUnnamed583(); | 1612 o.items = buildUnnamed582(); |
| 1594 o.kind = "foo"; | 1613 o.kind = "foo"; |
| 1595 o.nextPageToken = "foo"; | 1614 o.nextPageToken = "foo"; |
| 1596 o.pageInfo = buildPageInfo(); | 1615 o.pageInfo = buildPageInfo(); |
| 1597 o.tokenPagination = buildTokenPagination(); | 1616 o.tokenPagination = buildTokenPagination(); |
| 1598 o.visitorId = "foo"; | 1617 o.visitorId = "foo"; |
| 1599 } | 1618 } |
| 1600 buildCounterCommentThreadListResponse--; | 1619 buildCounterCommentThreadListResponse--; |
| 1601 return o; | 1620 return o; |
| 1602 } | 1621 } |
| 1603 | 1622 |
| 1604 checkCommentThreadListResponse(api.CommentThreadListResponse o) { | 1623 checkCommentThreadListResponse(api.CommentThreadListResponse o) { |
| 1605 buildCounterCommentThreadListResponse++; | 1624 buildCounterCommentThreadListResponse++; |
| 1606 if (buildCounterCommentThreadListResponse < 3) { | 1625 if (buildCounterCommentThreadListResponse < 3) { |
| 1607 unittest.expect(o.etag, unittest.equals('foo')); | 1626 unittest.expect(o.etag, unittest.equals('foo')); |
| 1608 unittest.expect(o.eventId, unittest.equals('foo')); | 1627 unittest.expect(o.eventId, unittest.equals('foo')); |
| 1609 checkUnnamed583(o.items); | 1628 checkUnnamed582(o.items); |
| 1610 unittest.expect(o.kind, unittest.equals('foo')); | 1629 unittest.expect(o.kind, unittest.equals('foo')); |
| 1611 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 1630 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 1612 checkPageInfo(o.pageInfo); | 1631 checkPageInfo(o.pageInfo); |
| 1613 checkTokenPagination(o.tokenPagination); | 1632 checkTokenPagination(o.tokenPagination); |
| 1614 unittest.expect(o.visitorId, unittest.equals('foo')); | 1633 unittest.expect(o.visitorId, unittest.equals('foo')); |
| 1615 } | 1634 } |
| 1616 buildCounterCommentThreadListResponse--; | 1635 buildCounterCommentThreadListResponse--; |
| 1617 } | 1636 } |
| 1618 | 1637 |
| 1619 buildUnnamed584() { | 1638 buildUnnamed583() { |
| 1620 var o = new core.List<api.Comment>(); | 1639 var o = new core.List<api.Comment>(); |
| 1621 o.add(buildComment()); | 1640 o.add(buildComment()); |
| 1622 o.add(buildComment()); | 1641 o.add(buildComment()); |
| 1623 return o; | 1642 return o; |
| 1624 } | 1643 } |
| 1625 | 1644 |
| 1626 checkUnnamed584(core.List<api.Comment> o) { | 1645 checkUnnamed583(core.List<api.Comment> o) { |
| 1627 unittest.expect(o, unittest.hasLength(2)); | 1646 unittest.expect(o, unittest.hasLength(2)); |
| 1628 checkComment(o[0]); | 1647 checkComment(o[0]); |
| 1629 checkComment(o[1]); | 1648 checkComment(o[1]); |
| 1630 } | 1649 } |
| 1631 | 1650 |
| 1632 core.int buildCounterCommentThreadReplies = 0; | 1651 core.int buildCounterCommentThreadReplies = 0; |
| 1633 buildCommentThreadReplies() { | 1652 buildCommentThreadReplies() { |
| 1634 var o = new api.CommentThreadReplies(); | 1653 var o = new api.CommentThreadReplies(); |
| 1635 buildCounterCommentThreadReplies++; | 1654 buildCounterCommentThreadReplies++; |
| 1636 if (buildCounterCommentThreadReplies < 3) { | 1655 if (buildCounterCommentThreadReplies < 3) { |
| 1637 o.comments = buildUnnamed584(); | 1656 o.comments = buildUnnamed583(); |
| 1638 } | 1657 } |
| 1639 buildCounterCommentThreadReplies--; | 1658 buildCounterCommentThreadReplies--; |
| 1640 return o; | 1659 return o; |
| 1641 } | 1660 } |
| 1642 | 1661 |
| 1643 checkCommentThreadReplies(api.CommentThreadReplies o) { | 1662 checkCommentThreadReplies(api.CommentThreadReplies o) { |
| 1644 buildCounterCommentThreadReplies++; | 1663 buildCounterCommentThreadReplies++; |
| 1645 if (buildCounterCommentThreadReplies < 3) { | 1664 if (buildCounterCommentThreadReplies < 3) { |
| 1646 checkUnnamed584(o.comments); | 1665 checkUnnamed583(o.comments); |
| 1647 } | 1666 } |
| 1648 buildCounterCommentThreadReplies--; | 1667 buildCounterCommentThreadReplies--; |
| 1649 } | 1668 } |
| 1650 | 1669 |
| 1651 core.int buildCounterCommentThreadSnippet = 0; | 1670 core.int buildCounterCommentThreadSnippet = 0; |
| 1652 buildCommentThreadSnippet() { | 1671 buildCommentThreadSnippet() { |
| 1653 var o = new api.CommentThreadSnippet(); | 1672 var o = new api.CommentThreadSnippet(); |
| 1654 buildCounterCommentThreadSnippet++; | 1673 buildCounterCommentThreadSnippet++; |
| 1655 if (buildCounterCommentThreadSnippet < 3) { | 1674 if (buildCounterCommentThreadSnippet < 3) { |
| 1656 o.canReply = true; | 1675 o.canReply = true; |
| (...skipping 13 matching lines...) Expand all Loading... |
| 1670 unittest.expect(o.canReply, unittest.isTrue); | 1689 unittest.expect(o.canReply, unittest.isTrue); |
| 1671 unittest.expect(o.channelId, unittest.equals('foo')); | 1690 unittest.expect(o.channelId, unittest.equals('foo')); |
| 1672 unittest.expect(o.isPublic, unittest.isTrue); | 1691 unittest.expect(o.isPublic, unittest.isTrue); |
| 1673 checkComment(o.topLevelComment); | 1692 checkComment(o.topLevelComment); |
| 1674 unittest.expect(o.totalReplyCount, unittest.equals(42)); | 1693 unittest.expect(o.totalReplyCount, unittest.equals(42)); |
| 1675 unittest.expect(o.videoId, unittest.equals('foo')); | 1694 unittest.expect(o.videoId, unittest.equals('foo')); |
| 1676 } | 1695 } |
| 1677 buildCounterCommentThreadSnippet--; | 1696 buildCounterCommentThreadSnippet--; |
| 1678 } | 1697 } |
| 1679 | 1698 |
| 1699 buildUnnamed584() { |
| 1700 var o = new core.List<core.String>(); |
| 1701 o.add("foo"); |
| 1702 o.add("foo"); |
| 1703 return o; |
| 1704 } |
| 1705 |
| 1706 checkUnnamed584(core.List<core.String> o) { |
| 1707 unittest.expect(o, unittest.hasLength(2)); |
| 1708 unittest.expect(o[0], unittest.equals('foo')); |
| 1709 unittest.expect(o[1], unittest.equals('foo')); |
| 1710 } |
| 1711 |
| 1680 buildUnnamed585() { | 1712 buildUnnamed585() { |
| 1681 var o = new core.List<core.String>(); | 1713 var o = new core.List<core.String>(); |
| 1682 o.add("foo"); | 1714 o.add("foo"); |
| 1683 o.add("foo"); | 1715 o.add("foo"); |
| 1684 return o; | 1716 return o; |
| 1685 } | 1717 } |
| 1686 | 1718 |
| 1687 checkUnnamed585(core.List<core.String> o) { | 1719 checkUnnamed585(core.List<core.String> o) { |
| 1688 unittest.expect(o, unittest.hasLength(2)); | 1720 unittest.expect(o, unittest.hasLength(2)); |
| 1689 unittest.expect(o[0], unittest.equals('foo')); | 1721 unittest.expect(o[0], unittest.equals('foo')); |
| 1690 unittest.expect(o[1], unittest.equals('foo')); | 1722 unittest.expect(o[1], unittest.equals('foo')); |
| 1691 } | |
| 1692 | |
| 1693 buildUnnamed586() { | |
| 1694 var o = new core.List<core.String>(); | |
| 1695 o.add("foo"); | |
| 1696 o.add("foo"); | |
| 1697 return o; | |
| 1698 } | |
| 1699 | |
| 1700 checkUnnamed586(core.List<core.String> o) { | |
| 1701 unittest.expect(o, unittest.hasLength(2)); | |
| 1702 unittest.expect(o[0], unittest.equals('foo')); | |
| 1703 unittest.expect(o[1], unittest.equals('foo')); | |
| 1704 } | 1723 } |
| 1705 | 1724 |
| 1706 core.int buildCounterContentRating = 0; | 1725 core.int buildCounterContentRating = 0; |
| 1707 buildContentRating() { | 1726 buildContentRating() { |
| 1708 var o = new api.ContentRating(); | 1727 var o = new api.ContentRating(); |
| 1709 buildCounterContentRating++; | 1728 buildCounterContentRating++; |
| 1710 if (buildCounterContentRating < 3) { | 1729 if (buildCounterContentRating < 3) { |
| 1711 o.acbRating = "foo"; | 1730 o.acbRating = "foo"; |
| 1712 o.agcomRating = "foo"; | 1731 o.agcomRating = "foo"; |
| 1713 o.anatelRating = "foo"; | 1732 o.anatelRating = "foo"; |
| 1714 o.bbfcRating = "foo"; | 1733 o.bbfcRating = "foo"; |
| 1715 o.bfvcRating = "foo"; | 1734 o.bfvcRating = "foo"; |
| 1716 o.bmukkRating = "foo"; | 1735 o.bmukkRating = "foo"; |
| 1717 o.catvRating = "foo"; | 1736 o.catvRating = "foo"; |
| 1718 o.catvfrRating = "foo"; | 1737 o.catvfrRating = "foo"; |
| 1719 o.cbfcRating = "foo"; | 1738 o.cbfcRating = "foo"; |
| 1720 o.cccRating = "foo"; | 1739 o.cccRating = "foo"; |
| 1721 o.cceRating = "foo"; | 1740 o.cceRating = "foo"; |
| 1722 o.chfilmRating = "foo"; | 1741 o.chfilmRating = "foo"; |
| 1723 o.chvrsRating = "foo"; | 1742 o.chvrsRating = "foo"; |
| 1724 o.cicfRating = "foo"; | 1743 o.cicfRating = "foo"; |
| 1725 o.cnaRating = "foo"; | 1744 o.cnaRating = "foo"; |
| 1726 o.cncRating = "foo"; | 1745 o.cncRating = "foo"; |
| 1727 o.csaRating = "foo"; | 1746 o.csaRating = "foo"; |
| 1728 o.cscfRating = "foo"; | 1747 o.cscfRating = "foo"; |
| 1729 o.czfilmRating = "foo"; | 1748 o.czfilmRating = "foo"; |
| 1730 o.djctqRating = "foo"; | 1749 o.djctqRating = "foo"; |
| 1731 o.djctqRatingReasons = buildUnnamed585(); | 1750 o.djctqRatingReasons = buildUnnamed584(); |
| 1732 o.ecbmctRating = "foo"; | 1751 o.ecbmctRating = "foo"; |
| 1733 o.eefilmRating = "foo"; | 1752 o.eefilmRating = "foo"; |
| 1734 o.egfilmRating = "foo"; | 1753 o.egfilmRating = "foo"; |
| 1735 o.eirinRating = "foo"; | 1754 o.eirinRating = "foo"; |
| 1736 o.fcbmRating = "foo"; | 1755 o.fcbmRating = "foo"; |
| 1737 o.fcoRating = "foo"; | 1756 o.fcoRating = "foo"; |
| 1738 o.fmocRating = "foo"; | 1757 o.fmocRating = "foo"; |
| 1739 o.fpbRating = "foo"; | 1758 o.fpbRating = "foo"; |
| 1740 o.fpbRatingReasons = buildUnnamed586(); | 1759 o.fpbRatingReasons = buildUnnamed585(); |
| 1741 o.fskRating = "foo"; | 1760 o.fskRating = "foo"; |
| 1742 o.grfilmRating = "foo"; | 1761 o.grfilmRating = "foo"; |
| 1743 o.icaaRating = "foo"; | 1762 o.icaaRating = "foo"; |
| 1744 o.ifcoRating = "foo"; | 1763 o.ifcoRating = "foo"; |
| 1745 o.ilfilmRating = "foo"; | 1764 o.ilfilmRating = "foo"; |
| 1746 o.incaaRating = "foo"; | 1765 o.incaaRating = "foo"; |
| 1747 o.kfcbRating = "foo"; | 1766 o.kfcbRating = "foo"; |
| 1748 o.kijkwijzerRating = "foo"; | 1767 o.kijkwijzerRating = "foo"; |
| 1749 o.kmrbRating = "foo"; | 1768 o.kmrbRating = "foo"; |
| 1750 o.lsfRating = "foo"; | 1769 o.lsfRating = "foo"; |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1797 unittest.expect(o.cceRating, unittest.equals('foo')); | 1816 unittest.expect(o.cceRating, unittest.equals('foo')); |
| 1798 unittest.expect(o.chfilmRating, unittest.equals('foo')); | 1817 unittest.expect(o.chfilmRating, unittest.equals('foo')); |
| 1799 unittest.expect(o.chvrsRating, unittest.equals('foo')); | 1818 unittest.expect(o.chvrsRating, unittest.equals('foo')); |
| 1800 unittest.expect(o.cicfRating, unittest.equals('foo')); | 1819 unittest.expect(o.cicfRating, unittest.equals('foo')); |
| 1801 unittest.expect(o.cnaRating, unittest.equals('foo')); | 1820 unittest.expect(o.cnaRating, unittest.equals('foo')); |
| 1802 unittest.expect(o.cncRating, unittest.equals('foo')); | 1821 unittest.expect(o.cncRating, unittest.equals('foo')); |
| 1803 unittest.expect(o.csaRating, unittest.equals('foo')); | 1822 unittest.expect(o.csaRating, unittest.equals('foo')); |
| 1804 unittest.expect(o.cscfRating, unittest.equals('foo')); | 1823 unittest.expect(o.cscfRating, unittest.equals('foo')); |
| 1805 unittest.expect(o.czfilmRating, unittest.equals('foo')); | 1824 unittest.expect(o.czfilmRating, unittest.equals('foo')); |
| 1806 unittest.expect(o.djctqRating, unittest.equals('foo')); | 1825 unittest.expect(o.djctqRating, unittest.equals('foo')); |
| 1807 checkUnnamed585(o.djctqRatingReasons); | 1826 checkUnnamed584(o.djctqRatingReasons); |
| 1808 unittest.expect(o.ecbmctRating, unittest.equals('foo')); | 1827 unittest.expect(o.ecbmctRating, unittest.equals('foo')); |
| 1809 unittest.expect(o.eefilmRating, unittest.equals('foo')); | 1828 unittest.expect(o.eefilmRating, unittest.equals('foo')); |
| 1810 unittest.expect(o.egfilmRating, unittest.equals('foo')); | 1829 unittest.expect(o.egfilmRating, unittest.equals('foo')); |
| 1811 unittest.expect(o.eirinRating, unittest.equals('foo')); | 1830 unittest.expect(o.eirinRating, unittest.equals('foo')); |
| 1812 unittest.expect(o.fcbmRating, unittest.equals('foo')); | 1831 unittest.expect(o.fcbmRating, unittest.equals('foo')); |
| 1813 unittest.expect(o.fcoRating, unittest.equals('foo')); | 1832 unittest.expect(o.fcoRating, unittest.equals('foo')); |
| 1814 unittest.expect(o.fmocRating, unittest.equals('foo')); | 1833 unittest.expect(o.fmocRating, unittest.equals('foo')); |
| 1815 unittest.expect(o.fpbRating, unittest.equals('foo')); | 1834 unittest.expect(o.fpbRating, unittest.equals('foo')); |
| 1816 checkUnnamed586(o.fpbRatingReasons); | 1835 checkUnnamed585(o.fpbRatingReasons); |
| 1817 unittest.expect(o.fskRating, unittest.equals('foo')); | 1836 unittest.expect(o.fskRating, unittest.equals('foo')); |
| 1818 unittest.expect(o.grfilmRating, unittest.equals('foo')); | 1837 unittest.expect(o.grfilmRating, unittest.equals('foo')); |
| 1819 unittest.expect(o.icaaRating, unittest.equals('foo')); | 1838 unittest.expect(o.icaaRating, unittest.equals('foo')); |
| 1820 unittest.expect(o.ifcoRating, unittest.equals('foo')); | 1839 unittest.expect(o.ifcoRating, unittest.equals('foo')); |
| 1821 unittest.expect(o.ilfilmRating, unittest.equals('foo')); | 1840 unittest.expect(o.ilfilmRating, unittest.equals('foo')); |
| 1822 unittest.expect(o.incaaRating, unittest.equals('foo')); | 1841 unittest.expect(o.incaaRating, unittest.equals('foo')); |
| 1823 unittest.expect(o.kfcbRating, unittest.equals('foo')); | 1842 unittest.expect(o.kfcbRating, unittest.equals('foo')); |
| 1824 unittest.expect(o.kijkwijzerRating, unittest.equals('foo')); | 1843 unittest.expect(o.kijkwijzerRating, unittest.equals('foo')); |
| 1825 unittest.expect(o.kmrbRating, unittest.equals('foo')); | 1844 unittest.expect(o.kmrbRating, unittest.equals('foo')); |
| 1826 unittest.expect(o.lsfRating, unittest.equals('foo')); | 1845 unittest.expect(o.lsfRating, unittest.equals('foo')); |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1874 buildCounterFanFundingEvent++; | 1893 buildCounterFanFundingEvent++; |
| 1875 if (buildCounterFanFundingEvent < 3) { | 1894 if (buildCounterFanFundingEvent < 3) { |
| 1876 unittest.expect(o.etag, unittest.equals('foo')); | 1895 unittest.expect(o.etag, unittest.equals('foo')); |
| 1877 unittest.expect(o.id, unittest.equals('foo')); | 1896 unittest.expect(o.id, unittest.equals('foo')); |
| 1878 unittest.expect(o.kind, unittest.equals('foo')); | 1897 unittest.expect(o.kind, unittest.equals('foo')); |
| 1879 checkFanFundingEventSnippet(o.snippet); | 1898 checkFanFundingEventSnippet(o.snippet); |
| 1880 } | 1899 } |
| 1881 buildCounterFanFundingEvent--; | 1900 buildCounterFanFundingEvent--; |
| 1882 } | 1901 } |
| 1883 | 1902 |
| 1884 buildUnnamed587() { | 1903 buildUnnamed586() { |
| 1885 var o = new core.List<api.FanFundingEvent>(); | 1904 var o = new core.List<api.FanFundingEvent>(); |
| 1886 o.add(buildFanFundingEvent()); | 1905 o.add(buildFanFundingEvent()); |
| 1887 o.add(buildFanFundingEvent()); | 1906 o.add(buildFanFundingEvent()); |
| 1888 return o; | 1907 return o; |
| 1889 } | 1908 } |
| 1890 | 1909 |
| 1891 checkUnnamed587(core.List<api.FanFundingEvent> o) { | 1910 checkUnnamed586(core.List<api.FanFundingEvent> o) { |
| 1892 unittest.expect(o, unittest.hasLength(2)); | 1911 unittest.expect(o, unittest.hasLength(2)); |
| 1893 checkFanFundingEvent(o[0]); | 1912 checkFanFundingEvent(o[0]); |
| 1894 checkFanFundingEvent(o[1]); | 1913 checkFanFundingEvent(o[1]); |
| 1895 } | 1914 } |
| 1896 | 1915 |
| 1897 core.int buildCounterFanFundingEventListResponse = 0; | 1916 core.int buildCounterFanFundingEventListResponse = 0; |
| 1898 buildFanFundingEventListResponse() { | 1917 buildFanFundingEventListResponse() { |
| 1899 var o = new api.FanFundingEventListResponse(); | 1918 var o = new api.FanFundingEventListResponse(); |
| 1900 buildCounterFanFundingEventListResponse++; | 1919 buildCounterFanFundingEventListResponse++; |
| 1901 if (buildCounterFanFundingEventListResponse < 3) { | 1920 if (buildCounterFanFundingEventListResponse < 3) { |
| 1902 o.etag = "foo"; | 1921 o.etag = "foo"; |
| 1903 o.eventId = "foo"; | 1922 o.eventId = "foo"; |
| 1904 o.items = buildUnnamed587(); | 1923 o.items = buildUnnamed586(); |
| 1905 o.kind = "foo"; | 1924 o.kind = "foo"; |
| 1906 o.nextPageToken = "foo"; | 1925 o.nextPageToken = "foo"; |
| 1907 o.pageInfo = buildPageInfo(); | 1926 o.pageInfo = buildPageInfo(); |
| 1908 o.tokenPagination = buildTokenPagination(); | 1927 o.tokenPagination = buildTokenPagination(); |
| 1909 o.visitorId = "foo"; | 1928 o.visitorId = "foo"; |
| 1910 } | 1929 } |
| 1911 buildCounterFanFundingEventListResponse--; | 1930 buildCounterFanFundingEventListResponse--; |
| 1912 return o; | 1931 return o; |
| 1913 } | 1932 } |
| 1914 | 1933 |
| 1915 checkFanFundingEventListResponse(api.FanFundingEventListResponse o) { | 1934 checkFanFundingEventListResponse(api.FanFundingEventListResponse o) { |
| 1916 buildCounterFanFundingEventListResponse++; | 1935 buildCounterFanFundingEventListResponse++; |
| 1917 if (buildCounterFanFundingEventListResponse < 3) { | 1936 if (buildCounterFanFundingEventListResponse < 3) { |
| 1918 unittest.expect(o.etag, unittest.equals('foo')); | 1937 unittest.expect(o.etag, unittest.equals('foo')); |
| 1919 unittest.expect(o.eventId, unittest.equals('foo')); | 1938 unittest.expect(o.eventId, unittest.equals('foo')); |
| 1920 checkUnnamed587(o.items); | 1939 checkUnnamed586(o.items); |
| 1921 unittest.expect(o.kind, unittest.equals('foo')); | 1940 unittest.expect(o.kind, unittest.equals('foo')); |
| 1922 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 1941 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 1923 checkPageInfo(o.pageInfo); | 1942 checkPageInfo(o.pageInfo); |
| 1924 checkTokenPagination(o.tokenPagination); | 1943 checkTokenPagination(o.tokenPagination); |
| 1925 unittest.expect(o.visitorId, unittest.equals('foo')); | 1944 unittest.expect(o.visitorId, unittest.equals('foo')); |
| 1926 } | 1945 } |
| 1927 buildCounterFanFundingEventListResponse--; | 1946 buildCounterFanFundingEventListResponse--; |
| 1928 } | 1947 } |
| 1929 | 1948 |
| 1930 core.int buildCounterFanFundingEventSnippet = 0; | 1949 core.int buildCounterFanFundingEventSnippet = 0; |
| (...skipping 12 matching lines...) Expand all Loading... |
| 1943 buildCounterFanFundingEventSnippet--; | 1962 buildCounterFanFundingEventSnippet--; |
| 1944 return o; | 1963 return o; |
| 1945 } | 1964 } |
| 1946 | 1965 |
| 1947 checkFanFundingEventSnippet(api.FanFundingEventSnippet o) { | 1966 checkFanFundingEventSnippet(api.FanFundingEventSnippet o) { |
| 1948 buildCounterFanFundingEventSnippet++; | 1967 buildCounterFanFundingEventSnippet++; |
| 1949 if (buildCounterFanFundingEventSnippet < 3) { | 1968 if (buildCounterFanFundingEventSnippet < 3) { |
| 1950 unittest.expect(o.amountMicros, unittest.equals('foo')); | 1969 unittest.expect(o.amountMicros, unittest.equals('foo')); |
| 1951 unittest.expect(o.channelId, unittest.equals('foo')); | 1970 unittest.expect(o.channelId, unittest.equals('foo')); |
| 1952 unittest.expect(o.commentText, unittest.equals('foo')); | 1971 unittest.expect(o.commentText, unittest.equals('foo')); |
| 1953 unittest.expect(o.createdAt, unittest.equals(core.DateTime.parse("2002-02-27
T14:01:02"))); | 1972 unittest.expect(o.createdAt, |
| 1973 unittest.equals(core.DateTime.parse("2002-02-27T14:01:02"))); |
| 1954 unittest.expect(o.currency, unittest.equals('foo')); | 1974 unittest.expect(o.currency, unittest.equals('foo')); |
| 1955 unittest.expect(o.displayString, unittest.equals('foo')); | 1975 unittest.expect(o.displayString, unittest.equals('foo')); |
| 1956 checkChannelProfileDetails(o.supporterDetails); | 1976 checkChannelProfileDetails(o.supporterDetails); |
| 1957 } | 1977 } |
| 1958 buildCounterFanFundingEventSnippet--; | 1978 buildCounterFanFundingEventSnippet--; |
| 1959 } | 1979 } |
| 1960 | 1980 |
| 1961 core.int buildCounterGeoPoint = 0; | 1981 core.int buildCounterGeoPoint = 0; |
| 1962 buildGeoPoint() { | 1982 buildGeoPoint() { |
| 1963 var o = new api.GeoPoint(); | 1983 var o = new api.GeoPoint(); |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1999 buildCounterGuideCategory++; | 2019 buildCounterGuideCategory++; |
| 2000 if (buildCounterGuideCategory < 3) { | 2020 if (buildCounterGuideCategory < 3) { |
| 2001 unittest.expect(o.etag, unittest.equals('foo')); | 2021 unittest.expect(o.etag, unittest.equals('foo')); |
| 2002 unittest.expect(o.id, unittest.equals('foo')); | 2022 unittest.expect(o.id, unittest.equals('foo')); |
| 2003 unittest.expect(o.kind, unittest.equals('foo')); | 2023 unittest.expect(o.kind, unittest.equals('foo')); |
| 2004 checkGuideCategorySnippet(o.snippet); | 2024 checkGuideCategorySnippet(o.snippet); |
| 2005 } | 2025 } |
| 2006 buildCounterGuideCategory--; | 2026 buildCounterGuideCategory--; |
| 2007 } | 2027 } |
| 2008 | 2028 |
| 2009 buildUnnamed588() { | 2029 buildUnnamed587() { |
| 2010 var o = new core.List<api.GuideCategory>(); | 2030 var o = new core.List<api.GuideCategory>(); |
| 2011 o.add(buildGuideCategory()); | 2031 o.add(buildGuideCategory()); |
| 2012 o.add(buildGuideCategory()); | 2032 o.add(buildGuideCategory()); |
| 2013 return o; | 2033 return o; |
| 2014 } | 2034 } |
| 2015 | 2035 |
| 2016 checkUnnamed588(core.List<api.GuideCategory> o) { | 2036 checkUnnamed587(core.List<api.GuideCategory> o) { |
| 2017 unittest.expect(o, unittest.hasLength(2)); | 2037 unittest.expect(o, unittest.hasLength(2)); |
| 2018 checkGuideCategory(o[0]); | 2038 checkGuideCategory(o[0]); |
| 2019 checkGuideCategory(o[1]); | 2039 checkGuideCategory(o[1]); |
| 2020 } | 2040 } |
| 2021 | 2041 |
| 2022 core.int buildCounterGuideCategoryListResponse = 0; | 2042 core.int buildCounterGuideCategoryListResponse = 0; |
| 2023 buildGuideCategoryListResponse() { | 2043 buildGuideCategoryListResponse() { |
| 2024 var o = new api.GuideCategoryListResponse(); | 2044 var o = new api.GuideCategoryListResponse(); |
| 2025 buildCounterGuideCategoryListResponse++; | 2045 buildCounterGuideCategoryListResponse++; |
| 2026 if (buildCounterGuideCategoryListResponse < 3) { | 2046 if (buildCounterGuideCategoryListResponse < 3) { |
| 2027 o.etag = "foo"; | 2047 o.etag = "foo"; |
| 2028 o.eventId = "foo"; | 2048 o.eventId = "foo"; |
| 2029 o.items = buildUnnamed588(); | 2049 o.items = buildUnnamed587(); |
| 2030 o.kind = "foo"; | 2050 o.kind = "foo"; |
| 2031 o.nextPageToken = "foo"; | 2051 o.nextPageToken = "foo"; |
| 2032 o.pageInfo = buildPageInfo(); | 2052 o.pageInfo = buildPageInfo(); |
| 2033 o.prevPageToken = "foo"; | 2053 o.prevPageToken = "foo"; |
| 2034 o.tokenPagination = buildTokenPagination(); | 2054 o.tokenPagination = buildTokenPagination(); |
| 2035 o.visitorId = "foo"; | 2055 o.visitorId = "foo"; |
| 2036 } | 2056 } |
| 2037 buildCounterGuideCategoryListResponse--; | 2057 buildCounterGuideCategoryListResponse--; |
| 2038 return o; | 2058 return o; |
| 2039 } | 2059 } |
| 2040 | 2060 |
| 2041 checkGuideCategoryListResponse(api.GuideCategoryListResponse o) { | 2061 checkGuideCategoryListResponse(api.GuideCategoryListResponse o) { |
| 2042 buildCounterGuideCategoryListResponse++; | 2062 buildCounterGuideCategoryListResponse++; |
| 2043 if (buildCounterGuideCategoryListResponse < 3) { | 2063 if (buildCounterGuideCategoryListResponse < 3) { |
| 2044 unittest.expect(o.etag, unittest.equals('foo')); | 2064 unittest.expect(o.etag, unittest.equals('foo')); |
| 2045 unittest.expect(o.eventId, unittest.equals('foo')); | 2065 unittest.expect(o.eventId, unittest.equals('foo')); |
| 2046 checkUnnamed588(o.items); | 2066 checkUnnamed587(o.items); |
| 2047 unittest.expect(o.kind, unittest.equals('foo')); | 2067 unittest.expect(o.kind, unittest.equals('foo')); |
| 2048 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 2068 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 2049 checkPageInfo(o.pageInfo); | 2069 checkPageInfo(o.pageInfo); |
| 2050 unittest.expect(o.prevPageToken, unittest.equals('foo')); | 2070 unittest.expect(o.prevPageToken, unittest.equals('foo')); |
| 2051 checkTokenPagination(o.tokenPagination); | 2071 checkTokenPagination(o.tokenPagination); |
| 2052 unittest.expect(o.visitorId, unittest.equals('foo')); | 2072 unittest.expect(o.visitorId, unittest.equals('foo')); |
| 2053 } | 2073 } |
| 2054 buildCounterGuideCategoryListResponse--; | 2074 buildCounterGuideCategoryListResponse--; |
| 2055 } | 2075 } |
| 2056 | 2076 |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2093 buildCounterI18nLanguage++; | 2113 buildCounterI18nLanguage++; |
| 2094 if (buildCounterI18nLanguage < 3) { | 2114 if (buildCounterI18nLanguage < 3) { |
| 2095 unittest.expect(o.etag, unittest.equals('foo')); | 2115 unittest.expect(o.etag, unittest.equals('foo')); |
| 2096 unittest.expect(o.id, unittest.equals('foo')); | 2116 unittest.expect(o.id, unittest.equals('foo')); |
| 2097 unittest.expect(o.kind, unittest.equals('foo')); | 2117 unittest.expect(o.kind, unittest.equals('foo')); |
| 2098 checkI18nLanguageSnippet(o.snippet); | 2118 checkI18nLanguageSnippet(o.snippet); |
| 2099 } | 2119 } |
| 2100 buildCounterI18nLanguage--; | 2120 buildCounterI18nLanguage--; |
| 2101 } | 2121 } |
| 2102 | 2122 |
| 2103 buildUnnamed589() { | 2123 buildUnnamed588() { |
| 2104 var o = new core.List<api.I18nLanguage>(); | 2124 var o = new core.List<api.I18nLanguage>(); |
| 2105 o.add(buildI18nLanguage()); | 2125 o.add(buildI18nLanguage()); |
| 2106 o.add(buildI18nLanguage()); | 2126 o.add(buildI18nLanguage()); |
| 2107 return o; | 2127 return o; |
| 2108 } | 2128 } |
| 2109 | 2129 |
| 2110 checkUnnamed589(core.List<api.I18nLanguage> o) { | 2130 checkUnnamed588(core.List<api.I18nLanguage> o) { |
| 2111 unittest.expect(o, unittest.hasLength(2)); | 2131 unittest.expect(o, unittest.hasLength(2)); |
| 2112 checkI18nLanguage(o[0]); | 2132 checkI18nLanguage(o[0]); |
| 2113 checkI18nLanguage(o[1]); | 2133 checkI18nLanguage(o[1]); |
| 2114 } | 2134 } |
| 2115 | 2135 |
| 2116 core.int buildCounterI18nLanguageListResponse = 0; | 2136 core.int buildCounterI18nLanguageListResponse = 0; |
| 2117 buildI18nLanguageListResponse() { | 2137 buildI18nLanguageListResponse() { |
| 2118 var o = new api.I18nLanguageListResponse(); | 2138 var o = new api.I18nLanguageListResponse(); |
| 2119 buildCounterI18nLanguageListResponse++; | 2139 buildCounterI18nLanguageListResponse++; |
| 2120 if (buildCounterI18nLanguageListResponse < 3) { | 2140 if (buildCounterI18nLanguageListResponse < 3) { |
| 2121 o.etag = "foo"; | 2141 o.etag = "foo"; |
| 2122 o.eventId = "foo"; | 2142 o.eventId = "foo"; |
| 2123 o.items = buildUnnamed589(); | 2143 o.items = buildUnnamed588(); |
| 2124 o.kind = "foo"; | 2144 o.kind = "foo"; |
| 2125 o.visitorId = "foo"; | 2145 o.visitorId = "foo"; |
| 2126 } | 2146 } |
| 2127 buildCounterI18nLanguageListResponse--; | 2147 buildCounterI18nLanguageListResponse--; |
| 2128 return o; | 2148 return o; |
| 2129 } | 2149 } |
| 2130 | 2150 |
| 2131 checkI18nLanguageListResponse(api.I18nLanguageListResponse o) { | 2151 checkI18nLanguageListResponse(api.I18nLanguageListResponse o) { |
| 2132 buildCounterI18nLanguageListResponse++; | 2152 buildCounterI18nLanguageListResponse++; |
| 2133 if (buildCounterI18nLanguageListResponse < 3) { | 2153 if (buildCounterI18nLanguageListResponse < 3) { |
| 2134 unittest.expect(o.etag, unittest.equals('foo')); | 2154 unittest.expect(o.etag, unittest.equals('foo')); |
| 2135 unittest.expect(o.eventId, unittest.equals('foo')); | 2155 unittest.expect(o.eventId, unittest.equals('foo')); |
| 2136 checkUnnamed589(o.items); | 2156 checkUnnamed588(o.items); |
| 2137 unittest.expect(o.kind, unittest.equals('foo')); | 2157 unittest.expect(o.kind, unittest.equals('foo')); |
| 2138 unittest.expect(o.visitorId, unittest.equals('foo')); | 2158 unittest.expect(o.visitorId, unittest.equals('foo')); |
| 2139 } | 2159 } |
| 2140 buildCounterI18nLanguageListResponse--; | 2160 buildCounterI18nLanguageListResponse--; |
| 2141 } | 2161 } |
| 2142 | 2162 |
| 2143 core.int buildCounterI18nLanguageSnippet = 0; | 2163 core.int buildCounterI18nLanguageSnippet = 0; |
| 2144 buildI18nLanguageSnippet() { | 2164 buildI18nLanguageSnippet() { |
| 2145 var o = new api.I18nLanguageSnippet(); | 2165 var o = new api.I18nLanguageSnippet(); |
| 2146 buildCounterI18nLanguageSnippet++; | 2166 buildCounterI18nLanguageSnippet++; |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2179 buildCounterI18nRegion++; | 2199 buildCounterI18nRegion++; |
| 2180 if (buildCounterI18nRegion < 3) { | 2200 if (buildCounterI18nRegion < 3) { |
| 2181 unittest.expect(o.etag, unittest.equals('foo')); | 2201 unittest.expect(o.etag, unittest.equals('foo')); |
| 2182 unittest.expect(o.id, unittest.equals('foo')); | 2202 unittest.expect(o.id, unittest.equals('foo')); |
| 2183 unittest.expect(o.kind, unittest.equals('foo')); | 2203 unittest.expect(o.kind, unittest.equals('foo')); |
| 2184 checkI18nRegionSnippet(o.snippet); | 2204 checkI18nRegionSnippet(o.snippet); |
| 2185 } | 2205 } |
| 2186 buildCounterI18nRegion--; | 2206 buildCounterI18nRegion--; |
| 2187 } | 2207 } |
| 2188 | 2208 |
| 2189 buildUnnamed590() { | 2209 buildUnnamed589() { |
| 2190 var o = new core.List<api.I18nRegion>(); | 2210 var o = new core.List<api.I18nRegion>(); |
| 2191 o.add(buildI18nRegion()); | 2211 o.add(buildI18nRegion()); |
| 2192 o.add(buildI18nRegion()); | 2212 o.add(buildI18nRegion()); |
| 2193 return o; | 2213 return o; |
| 2194 } | 2214 } |
| 2195 | 2215 |
| 2196 checkUnnamed590(core.List<api.I18nRegion> o) { | 2216 checkUnnamed589(core.List<api.I18nRegion> o) { |
| 2197 unittest.expect(o, unittest.hasLength(2)); | 2217 unittest.expect(o, unittest.hasLength(2)); |
| 2198 checkI18nRegion(o[0]); | 2218 checkI18nRegion(o[0]); |
| 2199 checkI18nRegion(o[1]); | 2219 checkI18nRegion(o[1]); |
| 2200 } | 2220 } |
| 2201 | 2221 |
| 2202 core.int buildCounterI18nRegionListResponse = 0; | 2222 core.int buildCounterI18nRegionListResponse = 0; |
| 2203 buildI18nRegionListResponse() { | 2223 buildI18nRegionListResponse() { |
| 2204 var o = new api.I18nRegionListResponse(); | 2224 var o = new api.I18nRegionListResponse(); |
| 2205 buildCounterI18nRegionListResponse++; | 2225 buildCounterI18nRegionListResponse++; |
| 2206 if (buildCounterI18nRegionListResponse < 3) { | 2226 if (buildCounterI18nRegionListResponse < 3) { |
| 2207 o.etag = "foo"; | 2227 o.etag = "foo"; |
| 2208 o.eventId = "foo"; | 2228 o.eventId = "foo"; |
| 2209 o.items = buildUnnamed590(); | 2229 o.items = buildUnnamed589(); |
| 2210 o.kind = "foo"; | 2230 o.kind = "foo"; |
| 2211 o.visitorId = "foo"; | 2231 o.visitorId = "foo"; |
| 2212 } | 2232 } |
| 2213 buildCounterI18nRegionListResponse--; | 2233 buildCounterI18nRegionListResponse--; |
| 2214 return o; | 2234 return o; |
| 2215 } | 2235 } |
| 2216 | 2236 |
| 2217 checkI18nRegionListResponse(api.I18nRegionListResponse o) { | 2237 checkI18nRegionListResponse(api.I18nRegionListResponse o) { |
| 2218 buildCounterI18nRegionListResponse++; | 2238 buildCounterI18nRegionListResponse++; |
| 2219 if (buildCounterI18nRegionListResponse < 3) { | 2239 if (buildCounterI18nRegionListResponse < 3) { |
| 2220 unittest.expect(o.etag, unittest.equals('foo')); | 2240 unittest.expect(o.etag, unittest.equals('foo')); |
| 2221 unittest.expect(o.eventId, unittest.equals('foo')); | 2241 unittest.expect(o.eventId, unittest.equals('foo')); |
| 2222 checkUnnamed590(o.items); | 2242 checkUnnamed589(o.items); |
| 2223 unittest.expect(o.kind, unittest.equals('foo')); | 2243 unittest.expect(o.kind, unittest.equals('foo')); |
| 2224 unittest.expect(o.visitorId, unittest.equals('foo')); | 2244 unittest.expect(o.visitorId, unittest.equals('foo')); |
| 2225 } | 2245 } |
| 2226 buildCounterI18nRegionListResponse--; | 2246 buildCounterI18nRegionListResponse--; |
| 2227 } | 2247 } |
| 2228 | 2248 |
| 2229 core.int buildCounterI18nRegionSnippet = 0; | 2249 core.int buildCounterI18nRegionSnippet = 0; |
| 2230 buildI18nRegionSnippet() { | 2250 buildI18nRegionSnippet() { |
| 2231 var o = new api.I18nRegionSnippet(); | 2251 var o = new api.I18nRegionSnippet(); |
| 2232 buildCounterI18nRegionSnippet++; | 2252 buildCounterI18nRegionSnippet++; |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2372 | 2392 |
| 2373 checkInvideoPosition(api.InvideoPosition o) { | 2393 checkInvideoPosition(api.InvideoPosition o) { |
| 2374 buildCounterInvideoPosition++; | 2394 buildCounterInvideoPosition++; |
| 2375 if (buildCounterInvideoPosition < 3) { | 2395 if (buildCounterInvideoPosition < 3) { |
| 2376 unittest.expect(o.cornerPosition, unittest.equals('foo')); | 2396 unittest.expect(o.cornerPosition, unittest.equals('foo')); |
| 2377 unittest.expect(o.type, unittest.equals('foo')); | 2397 unittest.expect(o.type, unittest.equals('foo')); |
| 2378 } | 2398 } |
| 2379 buildCounterInvideoPosition--; | 2399 buildCounterInvideoPosition--; |
| 2380 } | 2400 } |
| 2381 | 2401 |
| 2382 buildUnnamed591() { | 2402 buildUnnamed590() { |
| 2383 var o = new core.List<api.PromotedItem>(); | 2403 var o = new core.List<api.PromotedItem>(); |
| 2384 o.add(buildPromotedItem()); | 2404 o.add(buildPromotedItem()); |
| 2385 o.add(buildPromotedItem()); | 2405 o.add(buildPromotedItem()); |
| 2386 return o; | 2406 return o; |
| 2387 } | 2407 } |
| 2388 | 2408 |
| 2389 checkUnnamed591(core.List<api.PromotedItem> o) { | 2409 checkUnnamed590(core.List<api.PromotedItem> o) { |
| 2390 unittest.expect(o, unittest.hasLength(2)); | 2410 unittest.expect(o, unittest.hasLength(2)); |
| 2391 checkPromotedItem(o[0]); | 2411 checkPromotedItem(o[0]); |
| 2392 checkPromotedItem(o[1]); | 2412 checkPromotedItem(o[1]); |
| 2393 } | 2413 } |
| 2394 | 2414 |
| 2395 core.int buildCounterInvideoPromotion = 0; | 2415 core.int buildCounterInvideoPromotion = 0; |
| 2396 buildInvideoPromotion() { | 2416 buildInvideoPromotion() { |
| 2397 var o = new api.InvideoPromotion(); | 2417 var o = new api.InvideoPromotion(); |
| 2398 buildCounterInvideoPromotion++; | 2418 buildCounterInvideoPromotion++; |
| 2399 if (buildCounterInvideoPromotion < 3) { | 2419 if (buildCounterInvideoPromotion < 3) { |
| 2400 o.defaultTiming = buildInvideoTiming(); | 2420 o.defaultTiming = buildInvideoTiming(); |
| 2401 o.items = buildUnnamed591(); | 2421 o.items = buildUnnamed590(); |
| 2402 o.position = buildInvideoPosition(); | 2422 o.position = buildInvideoPosition(); |
| 2403 o.useSmartTiming = true; | 2423 o.useSmartTiming = true; |
| 2404 } | 2424 } |
| 2405 buildCounterInvideoPromotion--; | 2425 buildCounterInvideoPromotion--; |
| 2406 return o; | 2426 return o; |
| 2407 } | 2427 } |
| 2408 | 2428 |
| 2409 checkInvideoPromotion(api.InvideoPromotion o) { | 2429 checkInvideoPromotion(api.InvideoPromotion o) { |
| 2410 buildCounterInvideoPromotion++; | 2430 buildCounterInvideoPromotion++; |
| 2411 if (buildCounterInvideoPromotion < 3) { | 2431 if (buildCounterInvideoPromotion < 3) { |
| 2412 checkInvideoTiming(o.defaultTiming); | 2432 checkInvideoTiming(o.defaultTiming); |
| 2413 checkUnnamed591(o.items); | 2433 checkUnnamed590(o.items); |
| 2414 checkInvideoPosition(o.position); | 2434 checkInvideoPosition(o.position); |
| 2415 unittest.expect(o.useSmartTiming, unittest.isTrue); | 2435 unittest.expect(o.useSmartTiming, unittest.isTrue); |
| 2416 } | 2436 } |
| 2417 buildCounterInvideoPromotion--; | 2437 buildCounterInvideoPromotion--; |
| 2418 } | 2438 } |
| 2419 | 2439 |
| 2420 core.int buildCounterInvideoTiming = 0; | 2440 core.int buildCounterInvideoTiming = 0; |
| 2421 buildInvideoTiming() { | 2441 buildInvideoTiming() { |
| 2422 var o = new api.InvideoTiming(); | 2442 var o = new api.InvideoTiming(); |
| 2423 buildCounterInvideoTiming++; | 2443 buildCounterInvideoTiming++; |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2511 o.startWithSlate = true; | 2531 o.startWithSlate = true; |
| 2512 } | 2532 } |
| 2513 buildCounterLiveBroadcastContentDetails--; | 2533 buildCounterLiveBroadcastContentDetails--; |
| 2514 return o; | 2534 return o; |
| 2515 } | 2535 } |
| 2516 | 2536 |
| 2517 checkLiveBroadcastContentDetails(api.LiveBroadcastContentDetails o) { | 2537 checkLiveBroadcastContentDetails(api.LiveBroadcastContentDetails o) { |
| 2518 buildCounterLiveBroadcastContentDetails++; | 2538 buildCounterLiveBroadcastContentDetails++; |
| 2519 if (buildCounterLiveBroadcastContentDetails < 3) { | 2539 if (buildCounterLiveBroadcastContentDetails < 3) { |
| 2520 unittest.expect(o.boundStreamId, unittest.equals('foo')); | 2540 unittest.expect(o.boundStreamId, unittest.equals('foo')); |
| 2521 unittest.expect(o.boundStreamLastUpdateTimeMs, unittest.equals(core.DateTime
.parse("2002-02-27T14:01:02"))); | 2541 unittest.expect(o.boundStreamLastUpdateTimeMs, |
| 2542 unittest.equals(core.DateTime.parse("2002-02-27T14:01:02"))); |
| 2522 unittest.expect(o.closedCaptionsType, unittest.equals('foo')); | 2543 unittest.expect(o.closedCaptionsType, unittest.equals('foo')); |
| 2523 unittest.expect(o.enableClosedCaptions, unittest.isTrue); | 2544 unittest.expect(o.enableClosedCaptions, unittest.isTrue); |
| 2524 unittest.expect(o.enableContentEncryption, unittest.isTrue); | 2545 unittest.expect(o.enableContentEncryption, unittest.isTrue); |
| 2525 unittest.expect(o.enableDvr, unittest.isTrue); | 2546 unittest.expect(o.enableDvr, unittest.isTrue); |
| 2526 unittest.expect(o.enableEmbed, unittest.isTrue); | 2547 unittest.expect(o.enableEmbed, unittest.isTrue); |
| 2527 unittest.expect(o.enableLowLatency, unittest.isTrue); | 2548 unittest.expect(o.enableLowLatency, unittest.isTrue); |
| 2528 checkMonitorStreamInfo(o.monitorStream); | 2549 checkMonitorStreamInfo(o.monitorStream); |
| 2529 unittest.expect(o.projection, unittest.equals('foo')); | 2550 unittest.expect(o.projection, unittest.equals('foo')); |
| 2530 unittest.expect(o.recordFromStart, unittest.isTrue); | 2551 unittest.expect(o.recordFromStart, unittest.isTrue); |
| 2531 unittest.expect(o.startWithSlate, unittest.isTrue); | 2552 unittest.expect(o.startWithSlate, unittest.isTrue); |
| 2532 } | 2553 } |
| 2533 buildCounterLiveBroadcastContentDetails--; | 2554 buildCounterLiveBroadcastContentDetails--; |
| 2534 } | 2555 } |
| 2535 | 2556 |
| 2536 buildUnnamed592() { | 2557 buildUnnamed591() { |
| 2537 var o = new core.List<api.LiveBroadcast>(); | 2558 var o = new core.List<api.LiveBroadcast>(); |
| 2538 o.add(buildLiveBroadcast()); | 2559 o.add(buildLiveBroadcast()); |
| 2539 o.add(buildLiveBroadcast()); | 2560 o.add(buildLiveBroadcast()); |
| 2540 return o; | 2561 return o; |
| 2541 } | 2562 } |
| 2542 | 2563 |
| 2543 checkUnnamed592(core.List<api.LiveBroadcast> o) { | 2564 checkUnnamed591(core.List<api.LiveBroadcast> o) { |
| 2544 unittest.expect(o, unittest.hasLength(2)); | 2565 unittest.expect(o, unittest.hasLength(2)); |
| 2545 checkLiveBroadcast(o[0]); | 2566 checkLiveBroadcast(o[0]); |
| 2546 checkLiveBroadcast(o[1]); | 2567 checkLiveBroadcast(o[1]); |
| 2547 } | 2568 } |
| 2548 | 2569 |
| 2549 core.int buildCounterLiveBroadcastListResponse = 0; | 2570 core.int buildCounterLiveBroadcastListResponse = 0; |
| 2550 buildLiveBroadcastListResponse() { | 2571 buildLiveBroadcastListResponse() { |
| 2551 var o = new api.LiveBroadcastListResponse(); | 2572 var o = new api.LiveBroadcastListResponse(); |
| 2552 buildCounterLiveBroadcastListResponse++; | 2573 buildCounterLiveBroadcastListResponse++; |
| 2553 if (buildCounterLiveBroadcastListResponse < 3) { | 2574 if (buildCounterLiveBroadcastListResponse < 3) { |
| 2554 o.etag = "foo"; | 2575 o.etag = "foo"; |
| 2555 o.eventId = "foo"; | 2576 o.eventId = "foo"; |
| 2556 o.items = buildUnnamed592(); | 2577 o.items = buildUnnamed591(); |
| 2557 o.kind = "foo"; | 2578 o.kind = "foo"; |
| 2558 o.nextPageToken = "foo"; | 2579 o.nextPageToken = "foo"; |
| 2559 o.pageInfo = buildPageInfo(); | 2580 o.pageInfo = buildPageInfo(); |
| 2560 o.prevPageToken = "foo"; | 2581 o.prevPageToken = "foo"; |
| 2561 o.tokenPagination = buildTokenPagination(); | 2582 o.tokenPagination = buildTokenPagination(); |
| 2562 o.visitorId = "foo"; | 2583 o.visitorId = "foo"; |
| 2563 } | 2584 } |
| 2564 buildCounterLiveBroadcastListResponse--; | 2585 buildCounterLiveBroadcastListResponse--; |
| 2565 return o; | 2586 return o; |
| 2566 } | 2587 } |
| 2567 | 2588 |
| 2568 checkLiveBroadcastListResponse(api.LiveBroadcastListResponse o) { | 2589 checkLiveBroadcastListResponse(api.LiveBroadcastListResponse o) { |
| 2569 buildCounterLiveBroadcastListResponse++; | 2590 buildCounterLiveBroadcastListResponse++; |
| 2570 if (buildCounterLiveBroadcastListResponse < 3) { | 2591 if (buildCounterLiveBroadcastListResponse < 3) { |
| 2571 unittest.expect(o.etag, unittest.equals('foo')); | 2592 unittest.expect(o.etag, unittest.equals('foo')); |
| 2572 unittest.expect(o.eventId, unittest.equals('foo')); | 2593 unittest.expect(o.eventId, unittest.equals('foo')); |
| 2573 checkUnnamed592(o.items); | 2594 checkUnnamed591(o.items); |
| 2574 unittest.expect(o.kind, unittest.equals('foo')); | 2595 unittest.expect(o.kind, unittest.equals('foo')); |
| 2575 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 2596 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 2576 checkPageInfo(o.pageInfo); | 2597 checkPageInfo(o.pageInfo); |
| 2577 unittest.expect(o.prevPageToken, unittest.equals('foo')); | 2598 unittest.expect(o.prevPageToken, unittest.equals('foo')); |
| 2578 checkTokenPagination(o.tokenPagination); | 2599 checkTokenPagination(o.tokenPagination); |
| 2579 unittest.expect(o.visitorId, unittest.equals('foo')); | 2600 unittest.expect(o.visitorId, unittest.equals('foo')); |
| 2580 } | 2601 } |
| 2581 buildCounterLiveBroadcastListResponse--; | 2602 buildCounterLiveBroadcastListResponse--; |
| 2582 } | 2603 } |
| 2583 | 2604 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 2598 o.thumbnails = buildThumbnailDetails(); | 2619 o.thumbnails = buildThumbnailDetails(); |
| 2599 o.title = "foo"; | 2620 o.title = "foo"; |
| 2600 } | 2621 } |
| 2601 buildCounterLiveBroadcastSnippet--; | 2622 buildCounterLiveBroadcastSnippet--; |
| 2602 return o; | 2623 return o; |
| 2603 } | 2624 } |
| 2604 | 2625 |
| 2605 checkLiveBroadcastSnippet(api.LiveBroadcastSnippet o) { | 2626 checkLiveBroadcastSnippet(api.LiveBroadcastSnippet o) { |
| 2606 buildCounterLiveBroadcastSnippet++; | 2627 buildCounterLiveBroadcastSnippet++; |
| 2607 if (buildCounterLiveBroadcastSnippet < 3) { | 2628 if (buildCounterLiveBroadcastSnippet < 3) { |
| 2608 unittest.expect(o.actualEndTime, unittest.equals(core.DateTime.parse("2002-0
2-27T14:01:02"))); | 2629 unittest.expect(o.actualEndTime, |
| 2609 unittest.expect(o.actualStartTime, unittest.equals(core.DateTime.parse("2002
-02-27T14:01:02"))); | 2630 unittest.equals(core.DateTime.parse("2002-02-27T14:01:02"))); |
| 2631 unittest.expect(o.actualStartTime, |
| 2632 unittest.equals(core.DateTime.parse("2002-02-27T14:01:02"))); |
| 2610 unittest.expect(o.channelId, unittest.equals('foo')); | 2633 unittest.expect(o.channelId, unittest.equals('foo')); |
| 2611 unittest.expect(o.description, unittest.equals('foo')); | 2634 unittest.expect(o.description, unittest.equals('foo')); |
| 2612 unittest.expect(o.isDefaultBroadcast, unittest.isTrue); | 2635 unittest.expect(o.isDefaultBroadcast, unittest.isTrue); |
| 2613 unittest.expect(o.liveChatId, unittest.equals('foo')); | 2636 unittest.expect(o.liveChatId, unittest.equals('foo')); |
| 2614 unittest.expect(o.publishedAt, unittest.equals(core.DateTime.parse("2002-02-
27T14:01:02"))); | 2637 unittest.expect(o.publishedAt, |
| 2615 unittest.expect(o.scheduledEndTime, unittest.equals(core.DateTime.parse("200
2-02-27T14:01:02"))); | 2638 unittest.equals(core.DateTime.parse("2002-02-27T14:01:02"))); |
| 2616 unittest.expect(o.scheduledStartTime, unittest.equals(core.DateTime.parse("2
002-02-27T14:01:02"))); | 2639 unittest.expect(o.scheduledEndTime, |
| 2640 unittest.equals(core.DateTime.parse("2002-02-27T14:01:02"))); |
| 2641 unittest.expect(o.scheduledStartTime, |
| 2642 unittest.equals(core.DateTime.parse("2002-02-27T14:01:02"))); |
| 2617 checkThumbnailDetails(o.thumbnails); | 2643 checkThumbnailDetails(o.thumbnails); |
| 2618 unittest.expect(o.title, unittest.equals('foo')); | 2644 unittest.expect(o.title, unittest.equals('foo')); |
| 2619 } | 2645 } |
| 2620 buildCounterLiveBroadcastSnippet--; | 2646 buildCounterLiveBroadcastSnippet--; |
| 2621 } | 2647 } |
| 2622 | 2648 |
| 2623 core.int buildCounterLiveBroadcastStatistics = 0; | 2649 core.int buildCounterLiveBroadcastStatistics = 0; |
| 2624 buildLiveBroadcastStatistics() { | 2650 buildLiveBroadcastStatistics() { |
| 2625 var o = new api.LiveBroadcastStatistics(); | 2651 var o = new api.LiveBroadcastStatistics(); |
| 2626 buildCounterLiveBroadcastStatistics++; | 2652 buildCounterLiveBroadcastStatistics++; |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2682 checkLiveBroadcastTopic(api.LiveBroadcastTopic o) { | 2708 checkLiveBroadcastTopic(api.LiveBroadcastTopic o) { |
| 2683 buildCounterLiveBroadcastTopic++; | 2709 buildCounterLiveBroadcastTopic++; |
| 2684 if (buildCounterLiveBroadcastTopic < 3) { | 2710 if (buildCounterLiveBroadcastTopic < 3) { |
| 2685 checkLiveBroadcastTopicSnippet(o.snippet); | 2711 checkLiveBroadcastTopicSnippet(o.snippet); |
| 2686 unittest.expect(o.type, unittest.equals('foo')); | 2712 unittest.expect(o.type, unittest.equals('foo')); |
| 2687 unittest.expect(o.unmatched, unittest.isTrue); | 2713 unittest.expect(o.unmatched, unittest.isTrue); |
| 2688 } | 2714 } |
| 2689 buildCounterLiveBroadcastTopic--; | 2715 buildCounterLiveBroadcastTopic--; |
| 2690 } | 2716 } |
| 2691 | 2717 |
| 2692 buildUnnamed593() { | 2718 buildUnnamed592() { |
| 2693 var o = new core.List<api.LiveBroadcastTopic>(); | 2719 var o = new core.List<api.LiveBroadcastTopic>(); |
| 2694 o.add(buildLiveBroadcastTopic()); | 2720 o.add(buildLiveBroadcastTopic()); |
| 2695 o.add(buildLiveBroadcastTopic()); | 2721 o.add(buildLiveBroadcastTopic()); |
| 2696 return o; | 2722 return o; |
| 2697 } | 2723 } |
| 2698 | 2724 |
| 2699 checkUnnamed593(core.List<api.LiveBroadcastTopic> o) { | 2725 checkUnnamed592(core.List<api.LiveBroadcastTopic> o) { |
| 2700 unittest.expect(o, unittest.hasLength(2)); | 2726 unittest.expect(o, unittest.hasLength(2)); |
| 2701 checkLiveBroadcastTopic(o[0]); | 2727 checkLiveBroadcastTopic(o[0]); |
| 2702 checkLiveBroadcastTopic(o[1]); | 2728 checkLiveBroadcastTopic(o[1]); |
| 2703 } | 2729 } |
| 2704 | 2730 |
| 2705 core.int buildCounterLiveBroadcastTopicDetails = 0; | 2731 core.int buildCounterLiveBroadcastTopicDetails = 0; |
| 2706 buildLiveBroadcastTopicDetails() { | 2732 buildLiveBroadcastTopicDetails() { |
| 2707 var o = new api.LiveBroadcastTopicDetails(); | 2733 var o = new api.LiveBroadcastTopicDetails(); |
| 2708 buildCounterLiveBroadcastTopicDetails++; | 2734 buildCounterLiveBroadcastTopicDetails++; |
| 2709 if (buildCounterLiveBroadcastTopicDetails < 3) { | 2735 if (buildCounterLiveBroadcastTopicDetails < 3) { |
| 2710 o.topics = buildUnnamed593(); | 2736 o.topics = buildUnnamed592(); |
| 2711 } | 2737 } |
| 2712 buildCounterLiveBroadcastTopicDetails--; | 2738 buildCounterLiveBroadcastTopicDetails--; |
| 2713 return o; | 2739 return o; |
| 2714 } | 2740 } |
| 2715 | 2741 |
| 2716 checkLiveBroadcastTopicDetails(api.LiveBroadcastTopicDetails o) { | 2742 checkLiveBroadcastTopicDetails(api.LiveBroadcastTopicDetails o) { |
| 2717 buildCounterLiveBroadcastTopicDetails++; | 2743 buildCounterLiveBroadcastTopicDetails++; |
| 2718 if (buildCounterLiveBroadcastTopicDetails < 3) { | 2744 if (buildCounterLiveBroadcastTopicDetails < 3) { |
| 2719 checkUnnamed593(o.topics); | 2745 checkUnnamed592(o.topics); |
| 2720 } | 2746 } |
| 2721 buildCounterLiveBroadcastTopicDetails--; | 2747 buildCounterLiveBroadcastTopicDetails--; |
| 2722 } | 2748 } |
| 2723 | 2749 |
| 2724 core.int buildCounterLiveBroadcastTopicSnippet = 0; | 2750 core.int buildCounterLiveBroadcastTopicSnippet = 0; |
| 2725 buildLiveBroadcastTopicSnippet() { | 2751 buildLiveBroadcastTopicSnippet() { |
| 2726 var o = new api.LiveBroadcastTopicSnippet(); | 2752 var o = new api.LiveBroadcastTopicSnippet(); |
| 2727 buildCounterLiveBroadcastTopicSnippet++; | 2753 buildCounterLiveBroadcastTopicSnippet++; |
| 2728 if (buildCounterLiveBroadcastTopicSnippet < 3) { | 2754 if (buildCounterLiveBroadcastTopicSnippet < 3) { |
| 2729 o.name = "foo"; | 2755 o.name = "foo"; |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2889 } | 2915 } |
| 2890 | 2916 |
| 2891 checkLiveChatMessageDeletedDetails(api.LiveChatMessageDeletedDetails o) { | 2917 checkLiveChatMessageDeletedDetails(api.LiveChatMessageDeletedDetails o) { |
| 2892 buildCounterLiveChatMessageDeletedDetails++; | 2918 buildCounterLiveChatMessageDeletedDetails++; |
| 2893 if (buildCounterLiveChatMessageDeletedDetails < 3) { | 2919 if (buildCounterLiveChatMessageDeletedDetails < 3) { |
| 2894 unittest.expect(o.deletedMessageId, unittest.equals('foo')); | 2920 unittest.expect(o.deletedMessageId, unittest.equals('foo')); |
| 2895 } | 2921 } |
| 2896 buildCounterLiveChatMessageDeletedDetails--; | 2922 buildCounterLiveChatMessageDeletedDetails--; |
| 2897 } | 2923 } |
| 2898 | 2924 |
| 2899 buildUnnamed594() { | 2925 buildUnnamed593() { |
| 2900 var o = new core.List<api.LiveChatMessage>(); | 2926 var o = new core.List<api.LiveChatMessage>(); |
| 2901 o.add(buildLiveChatMessage()); | 2927 o.add(buildLiveChatMessage()); |
| 2902 o.add(buildLiveChatMessage()); | 2928 o.add(buildLiveChatMessage()); |
| 2903 return o; | 2929 return o; |
| 2904 } | 2930 } |
| 2905 | 2931 |
| 2906 checkUnnamed594(core.List<api.LiveChatMessage> o) { | 2932 checkUnnamed593(core.List<api.LiveChatMessage> o) { |
| 2907 unittest.expect(o, unittest.hasLength(2)); | 2933 unittest.expect(o, unittest.hasLength(2)); |
| 2908 checkLiveChatMessage(o[0]); | 2934 checkLiveChatMessage(o[0]); |
| 2909 checkLiveChatMessage(o[1]); | 2935 checkLiveChatMessage(o[1]); |
| 2910 } | 2936 } |
| 2911 | 2937 |
| 2912 core.int buildCounterLiveChatMessageListResponse = 0; | 2938 core.int buildCounterLiveChatMessageListResponse = 0; |
| 2913 buildLiveChatMessageListResponse() { | 2939 buildLiveChatMessageListResponse() { |
| 2914 var o = new api.LiveChatMessageListResponse(); | 2940 var o = new api.LiveChatMessageListResponse(); |
| 2915 buildCounterLiveChatMessageListResponse++; | 2941 buildCounterLiveChatMessageListResponse++; |
| 2916 if (buildCounterLiveChatMessageListResponse < 3) { | 2942 if (buildCounterLiveChatMessageListResponse < 3) { |
| 2917 o.etag = "foo"; | 2943 o.etag = "foo"; |
| 2918 o.eventId = "foo"; | 2944 o.eventId = "foo"; |
| 2919 o.items = buildUnnamed594(); | 2945 o.items = buildUnnamed593(); |
| 2920 o.kind = "foo"; | 2946 o.kind = "foo"; |
| 2921 o.nextPageToken = "foo"; | 2947 o.nextPageToken = "foo"; |
| 2922 o.offlineAt = core.DateTime.parse("2002-02-27T14:01:02"); | 2948 o.offlineAt = core.DateTime.parse("2002-02-27T14:01:02"); |
| 2923 o.pageInfo = buildPageInfo(); | 2949 o.pageInfo = buildPageInfo(); |
| 2924 o.pollingIntervalMillis = 42; | 2950 o.pollingIntervalMillis = 42; |
| 2925 o.tokenPagination = buildTokenPagination(); | 2951 o.tokenPagination = buildTokenPagination(); |
| 2926 o.visitorId = "foo"; | 2952 o.visitorId = "foo"; |
| 2927 } | 2953 } |
| 2928 buildCounterLiveChatMessageListResponse--; | 2954 buildCounterLiveChatMessageListResponse--; |
| 2929 return o; | 2955 return o; |
| 2930 } | 2956 } |
| 2931 | 2957 |
| 2932 checkLiveChatMessageListResponse(api.LiveChatMessageListResponse o) { | 2958 checkLiveChatMessageListResponse(api.LiveChatMessageListResponse o) { |
| 2933 buildCounterLiveChatMessageListResponse++; | 2959 buildCounterLiveChatMessageListResponse++; |
| 2934 if (buildCounterLiveChatMessageListResponse < 3) { | 2960 if (buildCounterLiveChatMessageListResponse < 3) { |
| 2935 unittest.expect(o.etag, unittest.equals('foo')); | 2961 unittest.expect(o.etag, unittest.equals('foo')); |
| 2936 unittest.expect(o.eventId, unittest.equals('foo')); | 2962 unittest.expect(o.eventId, unittest.equals('foo')); |
| 2937 checkUnnamed594(o.items); | 2963 checkUnnamed593(o.items); |
| 2938 unittest.expect(o.kind, unittest.equals('foo')); | 2964 unittest.expect(o.kind, unittest.equals('foo')); |
| 2939 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 2965 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 2940 unittest.expect(o.offlineAt, unittest.equals(core.DateTime.parse("2002-02-27
T14:01:02"))); | 2966 unittest.expect(o.offlineAt, |
| 2967 unittest.equals(core.DateTime.parse("2002-02-27T14:01:02"))); |
| 2941 checkPageInfo(o.pageInfo); | 2968 checkPageInfo(o.pageInfo); |
| 2942 unittest.expect(o.pollingIntervalMillis, unittest.equals(42)); | 2969 unittest.expect(o.pollingIntervalMillis, unittest.equals(42)); |
| 2943 checkTokenPagination(o.tokenPagination); | 2970 checkTokenPagination(o.tokenPagination); |
| 2944 unittest.expect(o.visitorId, unittest.equals('foo')); | 2971 unittest.expect(o.visitorId, unittest.equals('foo')); |
| 2945 } | 2972 } |
| 2946 buildCounterLiveChatMessageListResponse--; | 2973 buildCounterLiveChatMessageListResponse--; |
| 2947 } | 2974 } |
| 2948 | 2975 |
| 2949 core.int buildCounterLiveChatMessageRetractedDetails = 0; | 2976 core.int buildCounterLiveChatMessageRetractedDetails = 0; |
| 2950 buildLiveChatMessageRetractedDetails() { | 2977 buildLiveChatMessageRetractedDetails() { |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2998 unittest.expect(o.displayMessage, unittest.equals('foo')); | 3025 unittest.expect(o.displayMessage, unittest.equals('foo')); |
| 2999 checkLiveChatFanFundingEventDetails(o.fanFundingEventDetails); | 3026 checkLiveChatFanFundingEventDetails(o.fanFundingEventDetails); |
| 3000 unittest.expect(o.hasDisplayContent, unittest.isTrue); | 3027 unittest.expect(o.hasDisplayContent, unittest.isTrue); |
| 3001 unittest.expect(o.liveChatId, unittest.equals('foo')); | 3028 unittest.expect(o.liveChatId, unittest.equals('foo')); |
| 3002 checkLiveChatMessageDeletedDetails(o.messageDeletedDetails); | 3029 checkLiveChatMessageDeletedDetails(o.messageDeletedDetails); |
| 3003 checkLiveChatMessageRetractedDetails(o.messageRetractedDetails); | 3030 checkLiveChatMessageRetractedDetails(o.messageRetractedDetails); |
| 3004 checkLiveChatPollClosedDetails(o.pollClosedDetails); | 3031 checkLiveChatPollClosedDetails(o.pollClosedDetails); |
| 3005 checkLiveChatPollEditedDetails(o.pollEditedDetails); | 3032 checkLiveChatPollEditedDetails(o.pollEditedDetails); |
| 3006 checkLiveChatPollOpenedDetails(o.pollOpenedDetails); | 3033 checkLiveChatPollOpenedDetails(o.pollOpenedDetails); |
| 3007 checkLiveChatPollVotedDetails(o.pollVotedDetails); | 3034 checkLiveChatPollVotedDetails(o.pollVotedDetails); |
| 3008 unittest.expect(o.publishedAt, unittest.equals(core.DateTime.parse("2002-02-
27T14:01:02"))); | 3035 unittest.expect(o.publishedAt, |
| 3036 unittest.equals(core.DateTime.parse("2002-02-27T14:01:02"))); |
| 3009 checkLiveChatSuperChatDetails(o.superChatDetails); | 3037 checkLiveChatSuperChatDetails(o.superChatDetails); |
| 3010 checkLiveChatTextMessageDetails(o.textMessageDetails); | 3038 checkLiveChatTextMessageDetails(o.textMessageDetails); |
| 3011 unittest.expect(o.type, unittest.equals('foo')); | 3039 unittest.expect(o.type, unittest.equals('foo')); |
| 3012 checkLiveChatUserBannedMessageDetails(o.userBannedDetails); | 3040 checkLiveChatUserBannedMessageDetails(o.userBannedDetails); |
| 3013 } | 3041 } |
| 3014 buildCounterLiveChatMessageSnippet--; | 3042 buildCounterLiveChatMessageSnippet--; |
| 3015 } | 3043 } |
| 3016 | 3044 |
| 3017 core.int buildCounterLiveChatModerator = 0; | 3045 core.int buildCounterLiveChatModerator = 0; |
| 3018 buildLiveChatModerator() { | 3046 buildLiveChatModerator() { |
| (...skipping 13 matching lines...) Expand all Loading... |
| 3032 buildCounterLiveChatModerator++; | 3060 buildCounterLiveChatModerator++; |
| 3033 if (buildCounterLiveChatModerator < 3) { | 3061 if (buildCounterLiveChatModerator < 3) { |
| 3034 unittest.expect(o.etag, unittest.equals('foo')); | 3062 unittest.expect(o.etag, unittest.equals('foo')); |
| 3035 unittest.expect(o.id, unittest.equals('foo')); | 3063 unittest.expect(o.id, unittest.equals('foo')); |
| 3036 unittest.expect(o.kind, unittest.equals('foo')); | 3064 unittest.expect(o.kind, unittest.equals('foo')); |
| 3037 checkLiveChatModeratorSnippet(o.snippet); | 3065 checkLiveChatModeratorSnippet(o.snippet); |
| 3038 } | 3066 } |
| 3039 buildCounterLiveChatModerator--; | 3067 buildCounterLiveChatModerator--; |
| 3040 } | 3068 } |
| 3041 | 3069 |
| 3042 buildUnnamed595() { | 3070 buildUnnamed594() { |
| 3043 var o = new core.List<api.LiveChatModerator>(); | 3071 var o = new core.List<api.LiveChatModerator>(); |
| 3044 o.add(buildLiveChatModerator()); | 3072 o.add(buildLiveChatModerator()); |
| 3045 o.add(buildLiveChatModerator()); | 3073 o.add(buildLiveChatModerator()); |
| 3046 return o; | 3074 return o; |
| 3047 } | 3075 } |
| 3048 | 3076 |
| 3049 checkUnnamed595(core.List<api.LiveChatModerator> o) { | 3077 checkUnnamed594(core.List<api.LiveChatModerator> o) { |
| 3050 unittest.expect(o, unittest.hasLength(2)); | 3078 unittest.expect(o, unittest.hasLength(2)); |
| 3051 checkLiveChatModerator(o[0]); | 3079 checkLiveChatModerator(o[0]); |
| 3052 checkLiveChatModerator(o[1]); | 3080 checkLiveChatModerator(o[1]); |
| 3053 } | 3081 } |
| 3054 | 3082 |
| 3055 core.int buildCounterLiveChatModeratorListResponse = 0; | 3083 core.int buildCounterLiveChatModeratorListResponse = 0; |
| 3056 buildLiveChatModeratorListResponse() { | 3084 buildLiveChatModeratorListResponse() { |
| 3057 var o = new api.LiveChatModeratorListResponse(); | 3085 var o = new api.LiveChatModeratorListResponse(); |
| 3058 buildCounterLiveChatModeratorListResponse++; | 3086 buildCounterLiveChatModeratorListResponse++; |
| 3059 if (buildCounterLiveChatModeratorListResponse < 3) { | 3087 if (buildCounterLiveChatModeratorListResponse < 3) { |
| 3060 o.etag = "foo"; | 3088 o.etag = "foo"; |
| 3061 o.eventId = "foo"; | 3089 o.eventId = "foo"; |
| 3062 o.items = buildUnnamed595(); | 3090 o.items = buildUnnamed594(); |
| 3063 o.kind = "foo"; | 3091 o.kind = "foo"; |
| 3064 o.nextPageToken = "foo"; | 3092 o.nextPageToken = "foo"; |
| 3065 o.pageInfo = buildPageInfo(); | 3093 o.pageInfo = buildPageInfo(); |
| 3066 o.prevPageToken = "foo"; | 3094 o.prevPageToken = "foo"; |
| 3067 o.tokenPagination = buildTokenPagination(); | 3095 o.tokenPagination = buildTokenPagination(); |
| 3068 o.visitorId = "foo"; | 3096 o.visitorId = "foo"; |
| 3069 } | 3097 } |
| 3070 buildCounterLiveChatModeratorListResponse--; | 3098 buildCounterLiveChatModeratorListResponse--; |
| 3071 return o; | 3099 return o; |
| 3072 } | 3100 } |
| 3073 | 3101 |
| 3074 checkLiveChatModeratorListResponse(api.LiveChatModeratorListResponse o) { | 3102 checkLiveChatModeratorListResponse(api.LiveChatModeratorListResponse o) { |
| 3075 buildCounterLiveChatModeratorListResponse++; | 3103 buildCounterLiveChatModeratorListResponse++; |
| 3076 if (buildCounterLiveChatModeratorListResponse < 3) { | 3104 if (buildCounterLiveChatModeratorListResponse < 3) { |
| 3077 unittest.expect(o.etag, unittest.equals('foo')); | 3105 unittest.expect(o.etag, unittest.equals('foo')); |
| 3078 unittest.expect(o.eventId, unittest.equals('foo')); | 3106 unittest.expect(o.eventId, unittest.equals('foo')); |
| 3079 checkUnnamed595(o.items); | 3107 checkUnnamed594(o.items); |
| 3080 unittest.expect(o.kind, unittest.equals('foo')); | 3108 unittest.expect(o.kind, unittest.equals('foo')); |
| 3081 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 3109 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 3082 checkPageInfo(o.pageInfo); | 3110 checkPageInfo(o.pageInfo); |
| 3083 unittest.expect(o.prevPageToken, unittest.equals('foo')); | 3111 unittest.expect(o.prevPageToken, unittest.equals('foo')); |
| 3084 checkTokenPagination(o.tokenPagination); | 3112 checkTokenPagination(o.tokenPagination); |
| 3085 unittest.expect(o.visitorId, unittest.equals('foo')); | 3113 unittest.expect(o.visitorId, unittest.equals('foo')); |
| 3086 } | 3114 } |
| 3087 buildCounterLiveChatModeratorListResponse--; | 3115 buildCounterLiveChatModeratorListResponse--; |
| 3088 } | 3116 } |
| 3089 | 3117 |
| (...skipping 30 matching lines...) Expand all Loading... |
| 3120 } | 3148 } |
| 3121 | 3149 |
| 3122 checkLiveChatPollClosedDetails(api.LiveChatPollClosedDetails o) { | 3150 checkLiveChatPollClosedDetails(api.LiveChatPollClosedDetails o) { |
| 3123 buildCounterLiveChatPollClosedDetails++; | 3151 buildCounterLiveChatPollClosedDetails++; |
| 3124 if (buildCounterLiveChatPollClosedDetails < 3) { | 3152 if (buildCounterLiveChatPollClosedDetails < 3) { |
| 3125 unittest.expect(o.pollId, unittest.equals('foo')); | 3153 unittest.expect(o.pollId, unittest.equals('foo')); |
| 3126 } | 3154 } |
| 3127 buildCounterLiveChatPollClosedDetails--; | 3155 buildCounterLiveChatPollClosedDetails--; |
| 3128 } | 3156 } |
| 3129 | 3157 |
| 3130 buildUnnamed596() { | 3158 buildUnnamed595() { |
| 3131 var o = new core.List<api.LiveChatPollItem>(); | 3159 var o = new core.List<api.LiveChatPollItem>(); |
| 3132 o.add(buildLiveChatPollItem()); | 3160 o.add(buildLiveChatPollItem()); |
| 3133 o.add(buildLiveChatPollItem()); | 3161 o.add(buildLiveChatPollItem()); |
| 3134 return o; | 3162 return o; |
| 3135 } | 3163 } |
| 3136 | 3164 |
| 3137 checkUnnamed596(core.List<api.LiveChatPollItem> o) { | 3165 checkUnnamed595(core.List<api.LiveChatPollItem> o) { |
| 3138 unittest.expect(o, unittest.hasLength(2)); | 3166 unittest.expect(o, unittest.hasLength(2)); |
| 3139 checkLiveChatPollItem(o[0]); | 3167 checkLiveChatPollItem(o[0]); |
| 3140 checkLiveChatPollItem(o[1]); | 3168 checkLiveChatPollItem(o[1]); |
| 3141 } | 3169 } |
| 3142 | 3170 |
| 3143 core.int buildCounterLiveChatPollEditedDetails = 0; | 3171 core.int buildCounterLiveChatPollEditedDetails = 0; |
| 3144 buildLiveChatPollEditedDetails() { | 3172 buildLiveChatPollEditedDetails() { |
| 3145 var o = new api.LiveChatPollEditedDetails(); | 3173 var o = new api.LiveChatPollEditedDetails(); |
| 3146 buildCounterLiveChatPollEditedDetails++; | 3174 buildCounterLiveChatPollEditedDetails++; |
| 3147 if (buildCounterLiveChatPollEditedDetails < 3) { | 3175 if (buildCounterLiveChatPollEditedDetails < 3) { |
| 3148 o.id = "foo"; | 3176 o.id = "foo"; |
| 3149 o.items = buildUnnamed596(); | 3177 o.items = buildUnnamed595(); |
| 3150 o.prompt = "foo"; | 3178 o.prompt = "foo"; |
| 3151 } | 3179 } |
| 3152 buildCounterLiveChatPollEditedDetails--; | 3180 buildCounterLiveChatPollEditedDetails--; |
| 3153 return o; | 3181 return o; |
| 3154 } | 3182 } |
| 3155 | 3183 |
| 3156 checkLiveChatPollEditedDetails(api.LiveChatPollEditedDetails o) { | 3184 checkLiveChatPollEditedDetails(api.LiveChatPollEditedDetails o) { |
| 3157 buildCounterLiveChatPollEditedDetails++; | 3185 buildCounterLiveChatPollEditedDetails++; |
| 3158 if (buildCounterLiveChatPollEditedDetails < 3) { | 3186 if (buildCounterLiveChatPollEditedDetails < 3) { |
| 3159 unittest.expect(o.id, unittest.equals('foo')); | 3187 unittest.expect(o.id, unittest.equals('foo')); |
| 3160 checkUnnamed596(o.items); | 3188 checkUnnamed595(o.items); |
| 3161 unittest.expect(o.prompt, unittest.equals('foo')); | 3189 unittest.expect(o.prompt, unittest.equals('foo')); |
| 3162 } | 3190 } |
| 3163 buildCounterLiveChatPollEditedDetails--; | 3191 buildCounterLiveChatPollEditedDetails--; |
| 3164 } | 3192 } |
| 3165 | 3193 |
| 3166 core.int buildCounterLiveChatPollItem = 0; | 3194 core.int buildCounterLiveChatPollItem = 0; |
| 3167 buildLiveChatPollItem() { | 3195 buildLiveChatPollItem() { |
| 3168 var o = new api.LiveChatPollItem(); | 3196 var o = new api.LiveChatPollItem(); |
| 3169 buildCounterLiveChatPollItem++; | 3197 buildCounterLiveChatPollItem++; |
| 3170 if (buildCounterLiveChatPollItem < 3) { | 3198 if (buildCounterLiveChatPollItem < 3) { |
| 3171 o.description = "foo"; | 3199 o.description = "foo"; |
| 3172 o.itemId = "foo"; | 3200 o.itemId = "foo"; |
| 3173 } | 3201 } |
| 3174 buildCounterLiveChatPollItem--; | 3202 buildCounterLiveChatPollItem--; |
| 3175 return o; | 3203 return o; |
| 3176 } | 3204 } |
| 3177 | 3205 |
| 3178 checkLiveChatPollItem(api.LiveChatPollItem o) { | 3206 checkLiveChatPollItem(api.LiveChatPollItem o) { |
| 3179 buildCounterLiveChatPollItem++; | 3207 buildCounterLiveChatPollItem++; |
| 3180 if (buildCounterLiveChatPollItem < 3) { | 3208 if (buildCounterLiveChatPollItem < 3) { |
| 3181 unittest.expect(o.description, unittest.equals('foo')); | 3209 unittest.expect(o.description, unittest.equals('foo')); |
| 3182 unittest.expect(o.itemId, unittest.equals('foo')); | 3210 unittest.expect(o.itemId, unittest.equals('foo')); |
| 3183 } | 3211 } |
| 3184 buildCounterLiveChatPollItem--; | 3212 buildCounterLiveChatPollItem--; |
| 3185 } | 3213 } |
| 3186 | 3214 |
| 3187 buildUnnamed597() { | 3215 buildUnnamed596() { |
| 3188 var o = new core.List<api.LiveChatPollItem>(); | 3216 var o = new core.List<api.LiveChatPollItem>(); |
| 3189 o.add(buildLiveChatPollItem()); | 3217 o.add(buildLiveChatPollItem()); |
| 3190 o.add(buildLiveChatPollItem()); | 3218 o.add(buildLiveChatPollItem()); |
| 3191 return o; | 3219 return o; |
| 3192 } | 3220 } |
| 3193 | 3221 |
| 3194 checkUnnamed597(core.List<api.LiveChatPollItem> o) { | 3222 checkUnnamed596(core.List<api.LiveChatPollItem> o) { |
| 3195 unittest.expect(o, unittest.hasLength(2)); | 3223 unittest.expect(o, unittest.hasLength(2)); |
| 3196 checkLiveChatPollItem(o[0]); | 3224 checkLiveChatPollItem(o[0]); |
| 3197 checkLiveChatPollItem(o[1]); | 3225 checkLiveChatPollItem(o[1]); |
| 3198 } | 3226 } |
| 3199 | 3227 |
| 3200 core.int buildCounterLiveChatPollOpenedDetails = 0; | 3228 core.int buildCounterLiveChatPollOpenedDetails = 0; |
| 3201 buildLiveChatPollOpenedDetails() { | 3229 buildLiveChatPollOpenedDetails() { |
| 3202 var o = new api.LiveChatPollOpenedDetails(); | 3230 var o = new api.LiveChatPollOpenedDetails(); |
| 3203 buildCounterLiveChatPollOpenedDetails++; | 3231 buildCounterLiveChatPollOpenedDetails++; |
| 3204 if (buildCounterLiveChatPollOpenedDetails < 3) { | 3232 if (buildCounterLiveChatPollOpenedDetails < 3) { |
| 3205 o.id = "foo"; | 3233 o.id = "foo"; |
| 3206 o.items = buildUnnamed597(); | 3234 o.items = buildUnnamed596(); |
| 3207 o.prompt = "foo"; | 3235 o.prompt = "foo"; |
| 3208 } | 3236 } |
| 3209 buildCounterLiveChatPollOpenedDetails--; | 3237 buildCounterLiveChatPollOpenedDetails--; |
| 3210 return o; | 3238 return o; |
| 3211 } | 3239 } |
| 3212 | 3240 |
| 3213 checkLiveChatPollOpenedDetails(api.LiveChatPollOpenedDetails o) { | 3241 checkLiveChatPollOpenedDetails(api.LiveChatPollOpenedDetails o) { |
| 3214 buildCounterLiveChatPollOpenedDetails++; | 3242 buildCounterLiveChatPollOpenedDetails++; |
| 3215 if (buildCounterLiveChatPollOpenedDetails < 3) { | 3243 if (buildCounterLiveChatPollOpenedDetails < 3) { |
| 3216 unittest.expect(o.id, unittest.equals('foo')); | 3244 unittest.expect(o.id, unittest.equals('foo')); |
| 3217 checkUnnamed597(o.items); | 3245 checkUnnamed596(o.items); |
| 3218 unittest.expect(o.prompt, unittest.equals('foo')); | 3246 unittest.expect(o.prompt, unittest.equals('foo')); |
| 3219 } | 3247 } |
| 3220 buildCounterLiveChatPollOpenedDetails--; | 3248 buildCounterLiveChatPollOpenedDetails--; |
| 3221 } | 3249 } |
| 3222 | 3250 |
| 3223 core.int buildCounterLiveChatPollVotedDetails = 0; | 3251 core.int buildCounterLiveChatPollVotedDetails = 0; |
| 3224 buildLiveChatPollVotedDetails() { | 3252 buildLiveChatPollVotedDetails() { |
| 3225 var o = new api.LiveChatPollVotedDetails(); | 3253 var o = new api.LiveChatPollVotedDetails(); |
| 3226 buildCounterLiveChatPollVotedDetails++; | 3254 buildCounterLiveChatPollVotedDetails++; |
| 3227 if (buildCounterLiveChatPollVotedDetails < 3) { | 3255 if (buildCounterLiveChatPollVotedDetails < 3) { |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3380 | 3408 |
| 3381 checkLiveStreamContentDetails(api.LiveStreamContentDetails o) { | 3409 checkLiveStreamContentDetails(api.LiveStreamContentDetails o) { |
| 3382 buildCounterLiveStreamContentDetails++; | 3410 buildCounterLiveStreamContentDetails++; |
| 3383 if (buildCounterLiveStreamContentDetails < 3) { | 3411 if (buildCounterLiveStreamContentDetails < 3) { |
| 3384 unittest.expect(o.closedCaptionsIngestionUrl, unittest.equals('foo')); | 3412 unittest.expect(o.closedCaptionsIngestionUrl, unittest.equals('foo')); |
| 3385 unittest.expect(o.isReusable, unittest.isTrue); | 3413 unittest.expect(o.isReusable, unittest.isTrue); |
| 3386 } | 3414 } |
| 3387 buildCounterLiveStreamContentDetails--; | 3415 buildCounterLiveStreamContentDetails--; |
| 3388 } | 3416 } |
| 3389 | 3417 |
| 3390 buildUnnamed598() { | 3418 buildUnnamed597() { |
| 3391 var o = new core.List<api.LiveStreamConfigurationIssue>(); | 3419 var o = new core.List<api.LiveStreamConfigurationIssue>(); |
| 3392 o.add(buildLiveStreamConfigurationIssue()); | 3420 o.add(buildLiveStreamConfigurationIssue()); |
| 3393 o.add(buildLiveStreamConfigurationIssue()); | 3421 o.add(buildLiveStreamConfigurationIssue()); |
| 3394 return o; | 3422 return o; |
| 3395 } | 3423 } |
| 3396 | 3424 |
| 3397 checkUnnamed598(core.List<api.LiveStreamConfigurationIssue> o) { | 3425 checkUnnamed597(core.List<api.LiveStreamConfigurationIssue> o) { |
| 3398 unittest.expect(o, unittest.hasLength(2)); | 3426 unittest.expect(o, unittest.hasLength(2)); |
| 3399 checkLiveStreamConfigurationIssue(o[0]); | 3427 checkLiveStreamConfigurationIssue(o[0]); |
| 3400 checkLiveStreamConfigurationIssue(o[1]); | 3428 checkLiveStreamConfigurationIssue(o[1]); |
| 3401 } | 3429 } |
| 3402 | 3430 |
| 3403 core.int buildCounterLiveStreamHealthStatus = 0; | 3431 core.int buildCounterLiveStreamHealthStatus = 0; |
| 3404 buildLiveStreamHealthStatus() { | 3432 buildLiveStreamHealthStatus() { |
| 3405 var o = new api.LiveStreamHealthStatus(); | 3433 var o = new api.LiveStreamHealthStatus(); |
| 3406 buildCounterLiveStreamHealthStatus++; | 3434 buildCounterLiveStreamHealthStatus++; |
| 3407 if (buildCounterLiveStreamHealthStatus < 3) { | 3435 if (buildCounterLiveStreamHealthStatus < 3) { |
| 3408 o.configurationIssues = buildUnnamed598(); | 3436 o.configurationIssues = buildUnnamed597(); |
| 3409 o.lastUpdateTimeSeconds = "foo"; | 3437 o.lastUpdateTimeSeconds = "foo"; |
| 3410 o.status = "foo"; | 3438 o.status = "foo"; |
| 3411 } | 3439 } |
| 3412 buildCounterLiveStreamHealthStatus--; | 3440 buildCounterLiveStreamHealthStatus--; |
| 3413 return o; | 3441 return o; |
| 3414 } | 3442 } |
| 3415 | 3443 |
| 3416 checkLiveStreamHealthStatus(api.LiveStreamHealthStatus o) { | 3444 checkLiveStreamHealthStatus(api.LiveStreamHealthStatus o) { |
| 3417 buildCounterLiveStreamHealthStatus++; | 3445 buildCounterLiveStreamHealthStatus++; |
| 3418 if (buildCounterLiveStreamHealthStatus < 3) { | 3446 if (buildCounterLiveStreamHealthStatus < 3) { |
| 3419 checkUnnamed598(o.configurationIssues); | 3447 checkUnnamed597(o.configurationIssues); |
| 3420 unittest.expect(o.lastUpdateTimeSeconds, unittest.equals('foo')); | 3448 unittest.expect(o.lastUpdateTimeSeconds, unittest.equals('foo')); |
| 3421 unittest.expect(o.status, unittest.equals('foo')); | 3449 unittest.expect(o.status, unittest.equals('foo')); |
| 3422 } | 3450 } |
| 3423 buildCounterLiveStreamHealthStatus--; | 3451 buildCounterLiveStreamHealthStatus--; |
| 3424 } | 3452 } |
| 3425 | 3453 |
| 3426 buildUnnamed599() { | 3454 buildUnnamed598() { |
| 3427 var o = new core.List<api.LiveStream>(); | 3455 var o = new core.List<api.LiveStream>(); |
| 3428 o.add(buildLiveStream()); | 3456 o.add(buildLiveStream()); |
| 3429 o.add(buildLiveStream()); | 3457 o.add(buildLiveStream()); |
| 3430 return o; | 3458 return o; |
| 3431 } | 3459 } |
| 3432 | 3460 |
| 3433 checkUnnamed599(core.List<api.LiveStream> o) { | 3461 checkUnnamed598(core.List<api.LiveStream> o) { |
| 3434 unittest.expect(o, unittest.hasLength(2)); | 3462 unittest.expect(o, unittest.hasLength(2)); |
| 3435 checkLiveStream(o[0]); | 3463 checkLiveStream(o[0]); |
| 3436 checkLiveStream(o[1]); | 3464 checkLiveStream(o[1]); |
| 3437 } | 3465 } |
| 3438 | 3466 |
| 3439 core.int buildCounterLiveStreamListResponse = 0; | 3467 core.int buildCounterLiveStreamListResponse = 0; |
| 3440 buildLiveStreamListResponse() { | 3468 buildLiveStreamListResponse() { |
| 3441 var o = new api.LiveStreamListResponse(); | 3469 var o = new api.LiveStreamListResponse(); |
| 3442 buildCounterLiveStreamListResponse++; | 3470 buildCounterLiveStreamListResponse++; |
| 3443 if (buildCounterLiveStreamListResponse < 3) { | 3471 if (buildCounterLiveStreamListResponse < 3) { |
| 3444 o.etag = "foo"; | 3472 o.etag = "foo"; |
| 3445 o.eventId = "foo"; | 3473 o.eventId = "foo"; |
| 3446 o.items = buildUnnamed599(); | 3474 o.items = buildUnnamed598(); |
| 3447 o.kind = "foo"; | 3475 o.kind = "foo"; |
| 3448 o.nextPageToken = "foo"; | 3476 o.nextPageToken = "foo"; |
| 3449 o.pageInfo = buildPageInfo(); | 3477 o.pageInfo = buildPageInfo(); |
| 3450 o.prevPageToken = "foo"; | 3478 o.prevPageToken = "foo"; |
| 3451 o.tokenPagination = buildTokenPagination(); | 3479 o.tokenPagination = buildTokenPagination(); |
| 3452 o.visitorId = "foo"; | 3480 o.visitorId = "foo"; |
| 3453 } | 3481 } |
| 3454 buildCounterLiveStreamListResponse--; | 3482 buildCounterLiveStreamListResponse--; |
| 3455 return o; | 3483 return o; |
| 3456 } | 3484 } |
| 3457 | 3485 |
| 3458 checkLiveStreamListResponse(api.LiveStreamListResponse o) { | 3486 checkLiveStreamListResponse(api.LiveStreamListResponse o) { |
| 3459 buildCounterLiveStreamListResponse++; | 3487 buildCounterLiveStreamListResponse++; |
| 3460 if (buildCounterLiveStreamListResponse < 3) { | 3488 if (buildCounterLiveStreamListResponse < 3) { |
| 3461 unittest.expect(o.etag, unittest.equals('foo')); | 3489 unittest.expect(o.etag, unittest.equals('foo')); |
| 3462 unittest.expect(o.eventId, unittest.equals('foo')); | 3490 unittest.expect(o.eventId, unittest.equals('foo')); |
| 3463 checkUnnamed599(o.items); | 3491 checkUnnamed598(o.items); |
| 3464 unittest.expect(o.kind, unittest.equals('foo')); | 3492 unittest.expect(o.kind, unittest.equals('foo')); |
| 3465 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 3493 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 3466 checkPageInfo(o.pageInfo); | 3494 checkPageInfo(o.pageInfo); |
| 3467 unittest.expect(o.prevPageToken, unittest.equals('foo')); | 3495 unittest.expect(o.prevPageToken, unittest.equals('foo')); |
| 3468 checkTokenPagination(o.tokenPagination); | 3496 checkTokenPagination(o.tokenPagination); |
| 3469 unittest.expect(o.visitorId, unittest.equals('foo')); | 3497 unittest.expect(o.visitorId, unittest.equals('foo')); |
| 3470 } | 3498 } |
| 3471 buildCounterLiveStreamListResponse--; | 3499 buildCounterLiveStreamListResponse--; |
| 3472 } | 3500 } |
| 3473 | 3501 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 3485 buildCounterLiveStreamSnippet--; | 3513 buildCounterLiveStreamSnippet--; |
| 3486 return o; | 3514 return o; |
| 3487 } | 3515 } |
| 3488 | 3516 |
| 3489 checkLiveStreamSnippet(api.LiveStreamSnippet o) { | 3517 checkLiveStreamSnippet(api.LiveStreamSnippet o) { |
| 3490 buildCounterLiveStreamSnippet++; | 3518 buildCounterLiveStreamSnippet++; |
| 3491 if (buildCounterLiveStreamSnippet < 3) { | 3519 if (buildCounterLiveStreamSnippet < 3) { |
| 3492 unittest.expect(o.channelId, unittest.equals('foo')); | 3520 unittest.expect(o.channelId, unittest.equals('foo')); |
| 3493 unittest.expect(o.description, unittest.equals('foo')); | 3521 unittest.expect(o.description, unittest.equals('foo')); |
| 3494 unittest.expect(o.isDefaultStream, unittest.isTrue); | 3522 unittest.expect(o.isDefaultStream, unittest.isTrue); |
| 3495 unittest.expect(o.publishedAt, unittest.equals(core.DateTime.parse("2002-02-
27T14:01:02"))); | 3523 unittest.expect(o.publishedAt, |
| 3524 unittest.equals(core.DateTime.parse("2002-02-27T14:01:02"))); |
| 3496 unittest.expect(o.title, unittest.equals('foo')); | 3525 unittest.expect(o.title, unittest.equals('foo')); |
| 3497 } | 3526 } |
| 3498 buildCounterLiveStreamSnippet--; | 3527 buildCounterLiveStreamSnippet--; |
| 3499 } | 3528 } |
| 3500 | 3529 |
| 3501 core.int buildCounterLiveStreamStatus = 0; | 3530 core.int buildCounterLiveStreamStatus = 0; |
| 3502 buildLiveStreamStatus() { | 3531 buildLiveStreamStatus() { |
| 3503 var o = new api.LiveStreamStatus(); | 3532 var o = new api.LiveStreamStatus(); |
| 3504 buildCounterLiveStreamStatus++; | 3533 buildCounterLiveStreamStatus++; |
| 3505 if (buildCounterLiveStreamStatus < 3) { | 3534 if (buildCounterLiveStreamStatus < 3) { |
| 3506 o.healthStatus = buildLiveStreamHealthStatus(); | 3535 o.healthStatus = buildLiveStreamHealthStatus(); |
| 3507 o.streamStatus = "foo"; | 3536 o.streamStatus = "foo"; |
| 3508 } | 3537 } |
| 3509 buildCounterLiveStreamStatus--; | 3538 buildCounterLiveStreamStatus--; |
| 3510 return o; | 3539 return o; |
| 3511 } | 3540 } |
| 3512 | 3541 |
| 3513 checkLiveStreamStatus(api.LiveStreamStatus o) { | 3542 checkLiveStreamStatus(api.LiveStreamStatus o) { |
| 3514 buildCounterLiveStreamStatus++; | 3543 buildCounterLiveStreamStatus++; |
| 3515 if (buildCounterLiveStreamStatus < 3) { | 3544 if (buildCounterLiveStreamStatus < 3) { |
| 3516 checkLiveStreamHealthStatus(o.healthStatus); | 3545 checkLiveStreamHealthStatus(o.healthStatus); |
| 3517 unittest.expect(o.streamStatus, unittest.equals('foo')); | 3546 unittest.expect(o.streamStatus, unittest.equals('foo')); |
| 3518 } | 3547 } |
| 3519 buildCounterLiveStreamStatus--; | 3548 buildCounterLiveStreamStatus--; |
| 3520 } | 3549 } |
| 3521 | 3550 |
| 3522 buildUnnamed600() { | 3551 buildUnnamed599() { |
| 3523 var o = new core.List<api.LocalizedString>(); | 3552 var o = new core.List<api.LocalizedString>(); |
| 3524 o.add(buildLocalizedString()); | 3553 o.add(buildLocalizedString()); |
| 3525 o.add(buildLocalizedString()); | 3554 o.add(buildLocalizedString()); |
| 3526 return o; | 3555 return o; |
| 3527 } | 3556 } |
| 3528 | 3557 |
| 3529 checkUnnamed600(core.List<api.LocalizedString> o) { | 3558 checkUnnamed599(core.List<api.LocalizedString> o) { |
| 3530 unittest.expect(o, unittest.hasLength(2)); | 3559 unittest.expect(o, unittest.hasLength(2)); |
| 3531 checkLocalizedString(o[0]); | 3560 checkLocalizedString(o[0]); |
| 3532 checkLocalizedString(o[1]); | 3561 checkLocalizedString(o[1]); |
| 3533 } | 3562 } |
| 3534 | 3563 |
| 3535 core.int buildCounterLocalizedProperty = 0; | 3564 core.int buildCounterLocalizedProperty = 0; |
| 3536 buildLocalizedProperty() { | 3565 buildLocalizedProperty() { |
| 3537 var o = new api.LocalizedProperty(); | 3566 var o = new api.LocalizedProperty(); |
| 3538 buildCounterLocalizedProperty++; | 3567 buildCounterLocalizedProperty++; |
| 3539 if (buildCounterLocalizedProperty < 3) { | 3568 if (buildCounterLocalizedProperty < 3) { |
| 3540 o.default_ = "foo"; | 3569 o.default_ = "foo"; |
| 3541 o.defaultLanguage = buildLanguageTag(); | 3570 o.defaultLanguage = buildLanguageTag(); |
| 3542 o.localized = buildUnnamed600(); | 3571 o.localized = buildUnnamed599(); |
| 3543 } | 3572 } |
| 3544 buildCounterLocalizedProperty--; | 3573 buildCounterLocalizedProperty--; |
| 3545 return o; | 3574 return o; |
| 3546 } | 3575 } |
| 3547 | 3576 |
| 3548 checkLocalizedProperty(api.LocalizedProperty o) { | 3577 checkLocalizedProperty(api.LocalizedProperty o) { |
| 3549 buildCounterLocalizedProperty++; | 3578 buildCounterLocalizedProperty++; |
| 3550 if (buildCounterLocalizedProperty < 3) { | 3579 if (buildCounterLocalizedProperty < 3) { |
| 3551 unittest.expect(o.default_, unittest.equals('foo')); | 3580 unittest.expect(o.default_, unittest.equals('foo')); |
| 3552 checkLanguageTag(o.defaultLanguage); | 3581 checkLanguageTag(o.defaultLanguage); |
| 3553 checkUnnamed600(o.localized); | 3582 checkUnnamed599(o.localized); |
| 3554 } | 3583 } |
| 3555 buildCounterLocalizedProperty--; | 3584 buildCounterLocalizedProperty--; |
| 3556 } | 3585 } |
| 3557 | 3586 |
| 3558 core.int buildCounterLocalizedString = 0; | 3587 core.int buildCounterLocalizedString = 0; |
| 3559 buildLocalizedString() { | 3588 buildLocalizedString() { |
| 3560 var o = new api.LocalizedString(); | 3589 var o = new api.LocalizedString(); |
| 3561 buildCounterLocalizedString++; | 3590 buildCounterLocalizedString++; |
| 3562 if (buildCounterLocalizedString < 3) { | 3591 if (buildCounterLocalizedString < 3) { |
| 3563 o.language = "foo"; | 3592 o.language = "foo"; |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3613 | 3642 |
| 3614 checkPageInfo(api.PageInfo o) { | 3643 checkPageInfo(api.PageInfo o) { |
| 3615 buildCounterPageInfo++; | 3644 buildCounterPageInfo++; |
| 3616 if (buildCounterPageInfo < 3) { | 3645 if (buildCounterPageInfo < 3) { |
| 3617 unittest.expect(o.resultsPerPage, unittest.equals(42)); | 3646 unittest.expect(o.resultsPerPage, unittest.equals(42)); |
| 3618 unittest.expect(o.totalResults, unittest.equals(42)); | 3647 unittest.expect(o.totalResults, unittest.equals(42)); |
| 3619 } | 3648 } |
| 3620 buildCounterPageInfo--; | 3649 buildCounterPageInfo--; |
| 3621 } | 3650 } |
| 3622 | 3651 |
| 3623 buildUnnamed601() { | 3652 buildUnnamed600() { |
| 3624 var o = new core.Map<core.String, api.PlaylistLocalization>(); | 3653 var o = new core.Map<core.String, api.PlaylistLocalization>(); |
| 3625 o["x"] = buildPlaylistLocalization(); | 3654 o["x"] = buildPlaylistLocalization(); |
| 3626 o["y"] = buildPlaylistLocalization(); | 3655 o["y"] = buildPlaylistLocalization(); |
| 3627 return o; | 3656 return o; |
| 3628 } | 3657 } |
| 3629 | 3658 |
| 3630 checkUnnamed601(core.Map<core.String, api.PlaylistLocalization> o) { | 3659 checkUnnamed600(core.Map<core.String, api.PlaylistLocalization> o) { |
| 3631 unittest.expect(o, unittest.hasLength(2)); | 3660 unittest.expect(o, unittest.hasLength(2)); |
| 3632 checkPlaylistLocalization(o["x"]); | 3661 checkPlaylistLocalization(o["x"]); |
| 3633 checkPlaylistLocalization(o["y"]); | 3662 checkPlaylistLocalization(o["y"]); |
| 3634 } | 3663 } |
| 3635 | 3664 |
| 3636 core.int buildCounterPlaylist = 0; | 3665 core.int buildCounterPlaylist = 0; |
| 3637 buildPlaylist() { | 3666 buildPlaylist() { |
| 3638 var o = new api.Playlist(); | 3667 var o = new api.Playlist(); |
| 3639 buildCounterPlaylist++; | 3668 buildCounterPlaylist++; |
| 3640 if (buildCounterPlaylist < 3) { | 3669 if (buildCounterPlaylist < 3) { |
| 3641 o.contentDetails = buildPlaylistContentDetails(); | 3670 o.contentDetails = buildPlaylistContentDetails(); |
| 3642 o.etag = "foo"; | 3671 o.etag = "foo"; |
| 3643 o.id = "foo"; | 3672 o.id = "foo"; |
| 3644 o.kind = "foo"; | 3673 o.kind = "foo"; |
| 3645 o.localizations = buildUnnamed601(); | 3674 o.localizations = buildUnnamed600(); |
| 3646 o.player = buildPlaylistPlayer(); | 3675 o.player = buildPlaylistPlayer(); |
| 3647 o.snippet = buildPlaylistSnippet(); | 3676 o.snippet = buildPlaylistSnippet(); |
| 3648 o.status = buildPlaylistStatus(); | 3677 o.status = buildPlaylistStatus(); |
| 3649 } | 3678 } |
| 3650 buildCounterPlaylist--; | 3679 buildCounterPlaylist--; |
| 3651 return o; | 3680 return o; |
| 3652 } | 3681 } |
| 3653 | 3682 |
| 3654 checkPlaylist(api.Playlist o) { | 3683 checkPlaylist(api.Playlist o) { |
| 3655 buildCounterPlaylist++; | 3684 buildCounterPlaylist++; |
| 3656 if (buildCounterPlaylist < 3) { | 3685 if (buildCounterPlaylist < 3) { |
| 3657 checkPlaylistContentDetails(o.contentDetails); | 3686 checkPlaylistContentDetails(o.contentDetails); |
| 3658 unittest.expect(o.etag, unittest.equals('foo')); | 3687 unittest.expect(o.etag, unittest.equals('foo')); |
| 3659 unittest.expect(o.id, unittest.equals('foo')); | 3688 unittest.expect(o.id, unittest.equals('foo')); |
| 3660 unittest.expect(o.kind, unittest.equals('foo')); | 3689 unittest.expect(o.kind, unittest.equals('foo')); |
| 3661 checkUnnamed601(o.localizations); | 3690 checkUnnamed600(o.localizations); |
| 3662 checkPlaylistPlayer(o.player); | 3691 checkPlaylistPlayer(o.player); |
| 3663 checkPlaylistSnippet(o.snippet); | 3692 checkPlaylistSnippet(o.snippet); |
| 3664 checkPlaylistStatus(o.status); | 3693 checkPlaylistStatus(o.status); |
| 3665 } | 3694 } |
| 3666 buildCounterPlaylist--; | 3695 buildCounterPlaylist--; |
| 3667 } | 3696 } |
| 3668 | 3697 |
| 3669 core.int buildCounterPlaylistContentDetails = 0; | 3698 core.int buildCounterPlaylistContentDetails = 0; |
| 3670 buildPlaylistContentDetails() { | 3699 buildPlaylistContentDetails() { |
| 3671 var o = new api.PlaylistContentDetails(); | 3700 var o = new api.PlaylistContentDetails(); |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3729 return o; | 3758 return o; |
| 3730 } | 3759 } |
| 3731 | 3760 |
| 3732 checkPlaylistItemContentDetails(api.PlaylistItemContentDetails o) { | 3761 checkPlaylistItemContentDetails(api.PlaylistItemContentDetails o) { |
| 3733 buildCounterPlaylistItemContentDetails++; | 3762 buildCounterPlaylistItemContentDetails++; |
| 3734 if (buildCounterPlaylistItemContentDetails < 3) { | 3763 if (buildCounterPlaylistItemContentDetails < 3) { |
| 3735 unittest.expect(o.endAt, unittest.equals('foo')); | 3764 unittest.expect(o.endAt, unittest.equals('foo')); |
| 3736 unittest.expect(o.note, unittest.equals('foo')); | 3765 unittest.expect(o.note, unittest.equals('foo')); |
| 3737 unittest.expect(o.startAt, unittest.equals('foo')); | 3766 unittest.expect(o.startAt, unittest.equals('foo')); |
| 3738 unittest.expect(o.videoId, unittest.equals('foo')); | 3767 unittest.expect(o.videoId, unittest.equals('foo')); |
| 3739 unittest.expect(o.videoPublishedAt, unittest.equals(core.DateTime.parse("200
2-02-27T14:01:02"))); | 3768 unittest.expect(o.videoPublishedAt, |
| 3769 unittest.equals(core.DateTime.parse("2002-02-27T14:01:02"))); |
| 3740 } | 3770 } |
| 3741 buildCounterPlaylistItemContentDetails--; | 3771 buildCounterPlaylistItemContentDetails--; |
| 3742 } | 3772 } |
| 3743 | 3773 |
| 3744 buildUnnamed602() { | 3774 buildUnnamed601() { |
| 3745 var o = new core.List<api.PlaylistItem>(); | 3775 var o = new core.List<api.PlaylistItem>(); |
| 3746 o.add(buildPlaylistItem()); | 3776 o.add(buildPlaylistItem()); |
| 3747 o.add(buildPlaylistItem()); | 3777 o.add(buildPlaylistItem()); |
| 3748 return o; | 3778 return o; |
| 3749 } | 3779 } |
| 3750 | 3780 |
| 3751 checkUnnamed602(core.List<api.PlaylistItem> o) { | 3781 checkUnnamed601(core.List<api.PlaylistItem> o) { |
| 3752 unittest.expect(o, unittest.hasLength(2)); | 3782 unittest.expect(o, unittest.hasLength(2)); |
| 3753 checkPlaylistItem(o[0]); | 3783 checkPlaylistItem(o[0]); |
| 3754 checkPlaylistItem(o[1]); | 3784 checkPlaylistItem(o[1]); |
| 3755 } | 3785 } |
| 3756 | 3786 |
| 3757 core.int buildCounterPlaylistItemListResponse = 0; | 3787 core.int buildCounterPlaylistItemListResponse = 0; |
| 3758 buildPlaylistItemListResponse() { | 3788 buildPlaylistItemListResponse() { |
| 3759 var o = new api.PlaylistItemListResponse(); | 3789 var o = new api.PlaylistItemListResponse(); |
| 3760 buildCounterPlaylistItemListResponse++; | 3790 buildCounterPlaylistItemListResponse++; |
| 3761 if (buildCounterPlaylistItemListResponse < 3) { | 3791 if (buildCounterPlaylistItemListResponse < 3) { |
| 3762 o.etag = "foo"; | 3792 o.etag = "foo"; |
| 3763 o.eventId = "foo"; | 3793 o.eventId = "foo"; |
| 3764 o.items = buildUnnamed602(); | 3794 o.items = buildUnnamed601(); |
| 3765 o.kind = "foo"; | 3795 o.kind = "foo"; |
| 3766 o.nextPageToken = "foo"; | 3796 o.nextPageToken = "foo"; |
| 3767 o.pageInfo = buildPageInfo(); | 3797 o.pageInfo = buildPageInfo(); |
| 3768 o.prevPageToken = "foo"; | 3798 o.prevPageToken = "foo"; |
| 3769 o.tokenPagination = buildTokenPagination(); | 3799 o.tokenPagination = buildTokenPagination(); |
| 3770 o.visitorId = "foo"; | 3800 o.visitorId = "foo"; |
| 3771 } | 3801 } |
| 3772 buildCounterPlaylistItemListResponse--; | 3802 buildCounterPlaylistItemListResponse--; |
| 3773 return o; | 3803 return o; |
| 3774 } | 3804 } |
| 3775 | 3805 |
| 3776 checkPlaylistItemListResponse(api.PlaylistItemListResponse o) { | 3806 checkPlaylistItemListResponse(api.PlaylistItemListResponse o) { |
| 3777 buildCounterPlaylistItemListResponse++; | 3807 buildCounterPlaylistItemListResponse++; |
| 3778 if (buildCounterPlaylistItemListResponse < 3) { | 3808 if (buildCounterPlaylistItemListResponse < 3) { |
| 3779 unittest.expect(o.etag, unittest.equals('foo')); | 3809 unittest.expect(o.etag, unittest.equals('foo')); |
| 3780 unittest.expect(o.eventId, unittest.equals('foo')); | 3810 unittest.expect(o.eventId, unittest.equals('foo')); |
| 3781 checkUnnamed602(o.items); | 3811 checkUnnamed601(o.items); |
| 3782 unittest.expect(o.kind, unittest.equals('foo')); | 3812 unittest.expect(o.kind, unittest.equals('foo')); |
| 3783 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 3813 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 3784 checkPageInfo(o.pageInfo); | 3814 checkPageInfo(o.pageInfo); |
| 3785 unittest.expect(o.prevPageToken, unittest.equals('foo')); | 3815 unittest.expect(o.prevPageToken, unittest.equals('foo')); |
| 3786 checkTokenPagination(o.tokenPagination); | 3816 checkTokenPagination(o.tokenPagination); |
| 3787 unittest.expect(o.visitorId, unittest.equals('foo')); | 3817 unittest.expect(o.visitorId, unittest.equals('foo')); |
| 3788 } | 3818 } |
| 3789 buildCounterPlaylistItemListResponse--; | 3819 buildCounterPlaylistItemListResponse--; |
| 3790 } | 3820 } |
| 3791 | 3821 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 3809 } | 3839 } |
| 3810 | 3840 |
| 3811 checkPlaylistItemSnippet(api.PlaylistItemSnippet o) { | 3841 checkPlaylistItemSnippet(api.PlaylistItemSnippet o) { |
| 3812 buildCounterPlaylistItemSnippet++; | 3842 buildCounterPlaylistItemSnippet++; |
| 3813 if (buildCounterPlaylistItemSnippet < 3) { | 3843 if (buildCounterPlaylistItemSnippet < 3) { |
| 3814 unittest.expect(o.channelId, unittest.equals('foo')); | 3844 unittest.expect(o.channelId, unittest.equals('foo')); |
| 3815 unittest.expect(o.channelTitle, unittest.equals('foo')); | 3845 unittest.expect(o.channelTitle, unittest.equals('foo')); |
| 3816 unittest.expect(o.description, unittest.equals('foo')); | 3846 unittest.expect(o.description, unittest.equals('foo')); |
| 3817 unittest.expect(o.playlistId, unittest.equals('foo')); | 3847 unittest.expect(o.playlistId, unittest.equals('foo')); |
| 3818 unittest.expect(o.position, unittest.equals(42)); | 3848 unittest.expect(o.position, unittest.equals(42)); |
| 3819 unittest.expect(o.publishedAt, unittest.equals(core.DateTime.parse("2002-02-
27T14:01:02"))); | 3849 unittest.expect(o.publishedAt, |
| 3850 unittest.equals(core.DateTime.parse("2002-02-27T14:01:02"))); |
| 3820 checkResourceId(o.resourceId); | 3851 checkResourceId(o.resourceId); |
| 3821 checkThumbnailDetails(o.thumbnails); | 3852 checkThumbnailDetails(o.thumbnails); |
| 3822 unittest.expect(o.title, unittest.equals('foo')); | 3853 unittest.expect(o.title, unittest.equals('foo')); |
| 3823 } | 3854 } |
| 3824 buildCounterPlaylistItemSnippet--; | 3855 buildCounterPlaylistItemSnippet--; |
| 3825 } | 3856 } |
| 3826 | 3857 |
| 3827 core.int buildCounterPlaylistItemStatus = 0; | 3858 core.int buildCounterPlaylistItemStatus = 0; |
| 3828 buildPlaylistItemStatus() { | 3859 buildPlaylistItemStatus() { |
| 3829 var o = new api.PlaylistItemStatus(); | 3860 var o = new api.PlaylistItemStatus(); |
| 3830 buildCounterPlaylistItemStatus++; | 3861 buildCounterPlaylistItemStatus++; |
| 3831 if (buildCounterPlaylistItemStatus < 3) { | 3862 if (buildCounterPlaylistItemStatus < 3) { |
| 3832 o.privacyStatus = "foo"; | 3863 o.privacyStatus = "foo"; |
| 3833 } | 3864 } |
| 3834 buildCounterPlaylistItemStatus--; | 3865 buildCounterPlaylistItemStatus--; |
| 3835 return o; | 3866 return o; |
| 3836 } | 3867 } |
| 3837 | 3868 |
| 3838 checkPlaylistItemStatus(api.PlaylistItemStatus o) { | 3869 checkPlaylistItemStatus(api.PlaylistItemStatus o) { |
| 3839 buildCounterPlaylistItemStatus++; | 3870 buildCounterPlaylistItemStatus++; |
| 3840 if (buildCounterPlaylistItemStatus < 3) { | 3871 if (buildCounterPlaylistItemStatus < 3) { |
| 3841 unittest.expect(o.privacyStatus, unittest.equals('foo')); | 3872 unittest.expect(o.privacyStatus, unittest.equals('foo')); |
| 3842 } | 3873 } |
| 3843 buildCounterPlaylistItemStatus--; | 3874 buildCounterPlaylistItemStatus--; |
| 3844 } | 3875 } |
| 3845 | 3876 |
| 3846 buildUnnamed603() { | 3877 buildUnnamed602() { |
| 3847 var o = new core.List<api.Playlist>(); | 3878 var o = new core.List<api.Playlist>(); |
| 3848 o.add(buildPlaylist()); | 3879 o.add(buildPlaylist()); |
| 3849 o.add(buildPlaylist()); | 3880 o.add(buildPlaylist()); |
| 3850 return o; | 3881 return o; |
| 3851 } | 3882 } |
| 3852 | 3883 |
| 3853 checkUnnamed603(core.List<api.Playlist> o) { | 3884 checkUnnamed602(core.List<api.Playlist> o) { |
| 3854 unittest.expect(o, unittest.hasLength(2)); | 3885 unittest.expect(o, unittest.hasLength(2)); |
| 3855 checkPlaylist(o[0]); | 3886 checkPlaylist(o[0]); |
| 3856 checkPlaylist(o[1]); | 3887 checkPlaylist(o[1]); |
| 3857 } | 3888 } |
| 3858 | 3889 |
| 3859 core.int buildCounterPlaylistListResponse = 0; | 3890 core.int buildCounterPlaylistListResponse = 0; |
| 3860 buildPlaylistListResponse() { | 3891 buildPlaylistListResponse() { |
| 3861 var o = new api.PlaylistListResponse(); | 3892 var o = new api.PlaylistListResponse(); |
| 3862 buildCounterPlaylistListResponse++; | 3893 buildCounterPlaylistListResponse++; |
| 3863 if (buildCounterPlaylistListResponse < 3) { | 3894 if (buildCounterPlaylistListResponse < 3) { |
| 3864 o.etag = "foo"; | 3895 o.etag = "foo"; |
| 3865 o.eventId = "foo"; | 3896 o.eventId = "foo"; |
| 3866 o.items = buildUnnamed603(); | 3897 o.items = buildUnnamed602(); |
| 3867 o.kind = "foo"; | 3898 o.kind = "foo"; |
| 3868 o.nextPageToken = "foo"; | 3899 o.nextPageToken = "foo"; |
| 3869 o.pageInfo = buildPageInfo(); | 3900 o.pageInfo = buildPageInfo(); |
| 3870 o.prevPageToken = "foo"; | 3901 o.prevPageToken = "foo"; |
| 3871 o.tokenPagination = buildTokenPagination(); | 3902 o.tokenPagination = buildTokenPagination(); |
| 3872 o.visitorId = "foo"; | 3903 o.visitorId = "foo"; |
| 3873 } | 3904 } |
| 3874 buildCounterPlaylistListResponse--; | 3905 buildCounterPlaylistListResponse--; |
| 3875 return o; | 3906 return o; |
| 3876 } | 3907 } |
| 3877 | 3908 |
| 3878 checkPlaylistListResponse(api.PlaylistListResponse o) { | 3909 checkPlaylistListResponse(api.PlaylistListResponse o) { |
| 3879 buildCounterPlaylistListResponse++; | 3910 buildCounterPlaylistListResponse++; |
| 3880 if (buildCounterPlaylistListResponse < 3) { | 3911 if (buildCounterPlaylistListResponse < 3) { |
| 3881 unittest.expect(o.etag, unittest.equals('foo')); | 3912 unittest.expect(o.etag, unittest.equals('foo')); |
| 3882 unittest.expect(o.eventId, unittest.equals('foo')); | 3913 unittest.expect(o.eventId, unittest.equals('foo')); |
| 3883 checkUnnamed603(o.items); | 3914 checkUnnamed602(o.items); |
| 3884 unittest.expect(o.kind, unittest.equals('foo')); | 3915 unittest.expect(o.kind, unittest.equals('foo')); |
| 3885 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 3916 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 3886 checkPageInfo(o.pageInfo); | 3917 checkPageInfo(o.pageInfo); |
| 3887 unittest.expect(o.prevPageToken, unittest.equals('foo')); | 3918 unittest.expect(o.prevPageToken, unittest.equals('foo')); |
| 3888 checkTokenPagination(o.tokenPagination); | 3919 checkTokenPagination(o.tokenPagination); |
| 3889 unittest.expect(o.visitorId, unittest.equals('foo')); | 3920 unittest.expect(o.visitorId, unittest.equals('foo')); |
| 3890 } | 3921 } |
| 3891 buildCounterPlaylistListResponse--; | 3922 buildCounterPlaylistListResponse--; |
| 3892 } | 3923 } |
| 3893 | 3924 |
| (...skipping 30 matching lines...) Expand all Loading... |
| 3924 } | 3955 } |
| 3925 | 3956 |
| 3926 checkPlaylistPlayer(api.PlaylistPlayer o) { | 3957 checkPlaylistPlayer(api.PlaylistPlayer o) { |
| 3927 buildCounterPlaylistPlayer++; | 3958 buildCounterPlaylistPlayer++; |
| 3928 if (buildCounterPlaylistPlayer < 3) { | 3959 if (buildCounterPlaylistPlayer < 3) { |
| 3929 unittest.expect(o.embedHtml, unittest.equals('foo')); | 3960 unittest.expect(o.embedHtml, unittest.equals('foo')); |
| 3930 } | 3961 } |
| 3931 buildCounterPlaylistPlayer--; | 3962 buildCounterPlaylistPlayer--; |
| 3932 } | 3963 } |
| 3933 | 3964 |
| 3934 buildUnnamed604() { | 3965 buildUnnamed603() { |
| 3935 var o = new core.List<core.String>(); | 3966 var o = new core.List<core.String>(); |
| 3936 o.add("foo"); | 3967 o.add("foo"); |
| 3937 o.add("foo"); | 3968 o.add("foo"); |
| 3938 return o; | 3969 return o; |
| 3939 } | 3970 } |
| 3940 | 3971 |
| 3941 checkUnnamed604(core.List<core.String> o) { | 3972 checkUnnamed603(core.List<core.String> o) { |
| 3942 unittest.expect(o, unittest.hasLength(2)); | 3973 unittest.expect(o, unittest.hasLength(2)); |
| 3943 unittest.expect(o[0], unittest.equals('foo')); | 3974 unittest.expect(o[0], unittest.equals('foo')); |
| 3944 unittest.expect(o[1], unittest.equals('foo')); | 3975 unittest.expect(o[1], unittest.equals('foo')); |
| 3945 } | 3976 } |
| 3946 | 3977 |
| 3947 core.int buildCounterPlaylistSnippet = 0; | 3978 core.int buildCounterPlaylistSnippet = 0; |
| 3948 buildPlaylistSnippet() { | 3979 buildPlaylistSnippet() { |
| 3949 var o = new api.PlaylistSnippet(); | 3980 var o = new api.PlaylistSnippet(); |
| 3950 buildCounterPlaylistSnippet++; | 3981 buildCounterPlaylistSnippet++; |
| 3951 if (buildCounterPlaylistSnippet < 3) { | 3982 if (buildCounterPlaylistSnippet < 3) { |
| 3952 o.channelId = "foo"; | 3983 o.channelId = "foo"; |
| 3953 o.channelTitle = "foo"; | 3984 o.channelTitle = "foo"; |
| 3954 o.defaultLanguage = "foo"; | 3985 o.defaultLanguage = "foo"; |
| 3955 o.description = "foo"; | 3986 o.description = "foo"; |
| 3956 o.localized = buildPlaylistLocalization(); | 3987 o.localized = buildPlaylistLocalization(); |
| 3957 o.publishedAt = core.DateTime.parse("2002-02-27T14:01:02"); | 3988 o.publishedAt = core.DateTime.parse("2002-02-27T14:01:02"); |
| 3958 o.tags = buildUnnamed604(); | 3989 o.tags = buildUnnamed603(); |
| 3959 o.thumbnails = buildThumbnailDetails(); | 3990 o.thumbnails = buildThumbnailDetails(); |
| 3960 o.title = "foo"; | 3991 o.title = "foo"; |
| 3961 } | 3992 } |
| 3962 buildCounterPlaylistSnippet--; | 3993 buildCounterPlaylistSnippet--; |
| 3963 return o; | 3994 return o; |
| 3964 } | 3995 } |
| 3965 | 3996 |
| 3966 checkPlaylistSnippet(api.PlaylistSnippet o) { | 3997 checkPlaylistSnippet(api.PlaylistSnippet o) { |
| 3967 buildCounterPlaylistSnippet++; | 3998 buildCounterPlaylistSnippet++; |
| 3968 if (buildCounterPlaylistSnippet < 3) { | 3999 if (buildCounterPlaylistSnippet < 3) { |
| 3969 unittest.expect(o.channelId, unittest.equals('foo')); | 4000 unittest.expect(o.channelId, unittest.equals('foo')); |
| 3970 unittest.expect(o.channelTitle, unittest.equals('foo')); | 4001 unittest.expect(o.channelTitle, unittest.equals('foo')); |
| 3971 unittest.expect(o.defaultLanguage, unittest.equals('foo')); | 4002 unittest.expect(o.defaultLanguage, unittest.equals('foo')); |
| 3972 unittest.expect(o.description, unittest.equals('foo')); | 4003 unittest.expect(o.description, unittest.equals('foo')); |
| 3973 checkPlaylistLocalization(o.localized); | 4004 checkPlaylistLocalization(o.localized); |
| 3974 unittest.expect(o.publishedAt, unittest.equals(core.DateTime.parse("2002-02-
27T14:01:02"))); | 4005 unittest.expect(o.publishedAt, |
| 3975 checkUnnamed604(o.tags); | 4006 unittest.equals(core.DateTime.parse("2002-02-27T14:01:02"))); |
| 4007 checkUnnamed603(o.tags); |
| 3976 checkThumbnailDetails(o.thumbnails); | 4008 checkThumbnailDetails(o.thumbnails); |
| 3977 unittest.expect(o.title, unittest.equals('foo')); | 4009 unittest.expect(o.title, unittest.equals('foo')); |
| 3978 } | 4010 } |
| 3979 buildCounterPlaylistSnippet--; | 4011 buildCounterPlaylistSnippet--; |
| 3980 } | 4012 } |
| 3981 | 4013 |
| 3982 core.int buildCounterPlaylistStatus = 0; | 4014 core.int buildCounterPlaylistStatus = 0; |
| 3983 buildPlaylistStatus() { | 4015 buildPlaylistStatus() { |
| 3984 var o = new api.PlaylistStatus(); | 4016 var o = new api.PlaylistStatus(); |
| 3985 buildCounterPlaylistStatus++; | 4017 buildCounterPlaylistStatus++; |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4087 buildCounterResourceId++; | 4119 buildCounterResourceId++; |
| 4088 if (buildCounterResourceId < 3) { | 4120 if (buildCounterResourceId < 3) { |
| 4089 unittest.expect(o.channelId, unittest.equals('foo')); | 4121 unittest.expect(o.channelId, unittest.equals('foo')); |
| 4090 unittest.expect(o.kind, unittest.equals('foo')); | 4122 unittest.expect(o.kind, unittest.equals('foo')); |
| 4091 unittest.expect(o.playlistId, unittest.equals('foo')); | 4123 unittest.expect(o.playlistId, unittest.equals('foo')); |
| 4092 unittest.expect(o.videoId, unittest.equals('foo')); | 4124 unittest.expect(o.videoId, unittest.equals('foo')); |
| 4093 } | 4125 } |
| 4094 buildCounterResourceId--; | 4126 buildCounterResourceId--; |
| 4095 } | 4127 } |
| 4096 | 4128 |
| 4097 buildUnnamed605() { | 4129 buildUnnamed604() { |
| 4098 var o = new core.List<api.SearchResult>(); | 4130 var o = new core.List<api.SearchResult>(); |
| 4099 o.add(buildSearchResult()); | 4131 o.add(buildSearchResult()); |
| 4100 o.add(buildSearchResult()); | 4132 o.add(buildSearchResult()); |
| 4101 return o; | 4133 return o; |
| 4102 } | 4134 } |
| 4103 | 4135 |
| 4104 checkUnnamed605(core.List<api.SearchResult> o) { | 4136 checkUnnamed604(core.List<api.SearchResult> o) { |
| 4105 unittest.expect(o, unittest.hasLength(2)); | 4137 unittest.expect(o, unittest.hasLength(2)); |
| 4106 checkSearchResult(o[0]); | 4138 checkSearchResult(o[0]); |
| 4107 checkSearchResult(o[1]); | 4139 checkSearchResult(o[1]); |
| 4108 } | 4140 } |
| 4109 | 4141 |
| 4110 core.int buildCounterSearchListResponse = 0; | 4142 core.int buildCounterSearchListResponse = 0; |
| 4111 buildSearchListResponse() { | 4143 buildSearchListResponse() { |
| 4112 var o = new api.SearchListResponse(); | 4144 var o = new api.SearchListResponse(); |
| 4113 buildCounterSearchListResponse++; | 4145 buildCounterSearchListResponse++; |
| 4114 if (buildCounterSearchListResponse < 3) { | 4146 if (buildCounterSearchListResponse < 3) { |
| 4115 o.etag = "foo"; | 4147 o.etag = "foo"; |
| 4116 o.eventId = "foo"; | 4148 o.eventId = "foo"; |
| 4117 o.items = buildUnnamed605(); | 4149 o.items = buildUnnamed604(); |
| 4118 o.kind = "foo"; | 4150 o.kind = "foo"; |
| 4119 o.nextPageToken = "foo"; | 4151 o.nextPageToken = "foo"; |
| 4120 o.pageInfo = buildPageInfo(); | 4152 o.pageInfo = buildPageInfo(); |
| 4121 o.prevPageToken = "foo"; | 4153 o.prevPageToken = "foo"; |
| 4122 o.regionCode = "foo"; | 4154 o.regionCode = "foo"; |
| 4123 o.tokenPagination = buildTokenPagination(); | 4155 o.tokenPagination = buildTokenPagination(); |
| 4124 o.visitorId = "foo"; | 4156 o.visitorId = "foo"; |
| 4125 } | 4157 } |
| 4126 buildCounterSearchListResponse--; | 4158 buildCounterSearchListResponse--; |
| 4127 return o; | 4159 return o; |
| 4128 } | 4160 } |
| 4129 | 4161 |
| 4130 checkSearchListResponse(api.SearchListResponse o) { | 4162 checkSearchListResponse(api.SearchListResponse o) { |
| 4131 buildCounterSearchListResponse++; | 4163 buildCounterSearchListResponse++; |
| 4132 if (buildCounterSearchListResponse < 3) { | 4164 if (buildCounterSearchListResponse < 3) { |
| 4133 unittest.expect(o.etag, unittest.equals('foo')); | 4165 unittest.expect(o.etag, unittest.equals('foo')); |
| 4134 unittest.expect(o.eventId, unittest.equals('foo')); | 4166 unittest.expect(o.eventId, unittest.equals('foo')); |
| 4135 checkUnnamed605(o.items); | 4167 checkUnnamed604(o.items); |
| 4136 unittest.expect(o.kind, unittest.equals('foo')); | 4168 unittest.expect(o.kind, unittest.equals('foo')); |
| 4137 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 4169 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 4138 checkPageInfo(o.pageInfo); | 4170 checkPageInfo(o.pageInfo); |
| 4139 unittest.expect(o.prevPageToken, unittest.equals('foo')); | 4171 unittest.expect(o.prevPageToken, unittest.equals('foo')); |
| 4140 unittest.expect(o.regionCode, unittest.equals('foo')); | 4172 unittest.expect(o.regionCode, unittest.equals('foo')); |
| 4141 checkTokenPagination(o.tokenPagination); | 4173 checkTokenPagination(o.tokenPagination); |
| 4142 unittest.expect(o.visitorId, unittest.equals('foo')); | 4174 unittest.expect(o.visitorId, unittest.equals('foo')); |
| 4143 } | 4175 } |
| 4144 buildCounterSearchListResponse--; | 4176 buildCounterSearchListResponse--; |
| 4145 } | 4177 } |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4186 return o; | 4218 return o; |
| 4187 } | 4219 } |
| 4188 | 4220 |
| 4189 checkSearchResultSnippet(api.SearchResultSnippet o) { | 4221 checkSearchResultSnippet(api.SearchResultSnippet o) { |
| 4190 buildCounterSearchResultSnippet++; | 4222 buildCounterSearchResultSnippet++; |
| 4191 if (buildCounterSearchResultSnippet < 3) { | 4223 if (buildCounterSearchResultSnippet < 3) { |
| 4192 unittest.expect(o.channelId, unittest.equals('foo')); | 4224 unittest.expect(o.channelId, unittest.equals('foo')); |
| 4193 unittest.expect(o.channelTitle, unittest.equals('foo')); | 4225 unittest.expect(o.channelTitle, unittest.equals('foo')); |
| 4194 unittest.expect(o.description, unittest.equals('foo')); | 4226 unittest.expect(o.description, unittest.equals('foo')); |
| 4195 unittest.expect(o.liveBroadcastContent, unittest.equals('foo')); | 4227 unittest.expect(o.liveBroadcastContent, unittest.equals('foo')); |
| 4196 unittest.expect(o.publishedAt, unittest.equals(core.DateTime.parse("2002-02-
27T14:01:02"))); | 4228 unittest.expect(o.publishedAt, |
| 4229 unittest.equals(core.DateTime.parse("2002-02-27T14:01:02"))); |
| 4197 checkThumbnailDetails(o.thumbnails); | 4230 checkThumbnailDetails(o.thumbnails); |
| 4198 unittest.expect(o.title, unittest.equals('foo')); | 4231 unittest.expect(o.title, unittest.equals('foo')); |
| 4199 } | 4232 } |
| 4200 buildCounterSearchResultSnippet--; | 4233 buildCounterSearchResultSnippet--; |
| 4201 } | 4234 } |
| 4202 | 4235 |
| 4203 core.int buildCounterSponsor = 0; | 4236 core.int buildCounterSponsor = 0; |
| 4204 buildSponsor() { | 4237 buildSponsor() { |
| 4205 var o = new api.Sponsor(); | 4238 var o = new api.Sponsor(); |
| 4206 buildCounterSponsor++; | 4239 buildCounterSponsor++; |
| (...skipping 11 matching lines...) Expand all Loading... |
| 4218 buildCounterSponsor++; | 4251 buildCounterSponsor++; |
| 4219 if (buildCounterSponsor < 3) { | 4252 if (buildCounterSponsor < 3) { |
| 4220 unittest.expect(o.etag, unittest.equals('foo')); | 4253 unittest.expect(o.etag, unittest.equals('foo')); |
| 4221 unittest.expect(o.id, unittest.equals('foo')); | 4254 unittest.expect(o.id, unittest.equals('foo')); |
| 4222 unittest.expect(o.kind, unittest.equals('foo')); | 4255 unittest.expect(o.kind, unittest.equals('foo')); |
| 4223 checkSponsorSnippet(o.snippet); | 4256 checkSponsorSnippet(o.snippet); |
| 4224 } | 4257 } |
| 4225 buildCounterSponsor--; | 4258 buildCounterSponsor--; |
| 4226 } | 4259 } |
| 4227 | 4260 |
| 4228 buildUnnamed606() { | 4261 buildUnnamed605() { |
| 4229 var o = new core.List<api.Sponsor>(); | 4262 var o = new core.List<api.Sponsor>(); |
| 4230 o.add(buildSponsor()); | 4263 o.add(buildSponsor()); |
| 4231 o.add(buildSponsor()); | 4264 o.add(buildSponsor()); |
| 4232 return o; | 4265 return o; |
| 4233 } | 4266 } |
| 4234 | 4267 |
| 4235 checkUnnamed606(core.List<api.Sponsor> o) { | 4268 checkUnnamed605(core.List<api.Sponsor> o) { |
| 4236 unittest.expect(o, unittest.hasLength(2)); | 4269 unittest.expect(o, unittest.hasLength(2)); |
| 4237 checkSponsor(o[0]); | 4270 checkSponsor(o[0]); |
| 4238 checkSponsor(o[1]); | 4271 checkSponsor(o[1]); |
| 4239 } | 4272 } |
| 4240 | 4273 |
| 4241 core.int buildCounterSponsorListResponse = 0; | 4274 core.int buildCounterSponsorListResponse = 0; |
| 4242 buildSponsorListResponse() { | 4275 buildSponsorListResponse() { |
| 4243 var o = new api.SponsorListResponse(); | 4276 var o = new api.SponsorListResponse(); |
| 4244 buildCounterSponsorListResponse++; | 4277 buildCounterSponsorListResponse++; |
| 4245 if (buildCounterSponsorListResponse < 3) { | 4278 if (buildCounterSponsorListResponse < 3) { |
| 4246 o.etag = "foo"; | 4279 o.etag = "foo"; |
| 4247 o.eventId = "foo"; | 4280 o.eventId = "foo"; |
| 4248 o.items = buildUnnamed606(); | 4281 o.items = buildUnnamed605(); |
| 4249 o.kind = "foo"; | 4282 o.kind = "foo"; |
| 4250 o.nextPageToken = "foo"; | 4283 o.nextPageToken = "foo"; |
| 4251 o.pageInfo = buildPageInfo(); | 4284 o.pageInfo = buildPageInfo(); |
| 4252 o.tokenPagination = buildTokenPagination(); | 4285 o.tokenPagination = buildTokenPagination(); |
| 4253 o.visitorId = "foo"; | 4286 o.visitorId = "foo"; |
| 4254 } | 4287 } |
| 4255 buildCounterSponsorListResponse--; | 4288 buildCounterSponsorListResponse--; |
| 4256 return o; | 4289 return o; |
| 4257 } | 4290 } |
| 4258 | 4291 |
| 4259 checkSponsorListResponse(api.SponsorListResponse o) { | 4292 checkSponsorListResponse(api.SponsorListResponse o) { |
| 4260 buildCounterSponsorListResponse++; | 4293 buildCounterSponsorListResponse++; |
| 4261 if (buildCounterSponsorListResponse < 3) { | 4294 if (buildCounterSponsorListResponse < 3) { |
| 4262 unittest.expect(o.etag, unittest.equals('foo')); | 4295 unittest.expect(o.etag, unittest.equals('foo')); |
| 4263 unittest.expect(o.eventId, unittest.equals('foo')); | 4296 unittest.expect(o.eventId, unittest.equals('foo')); |
| 4264 checkUnnamed606(o.items); | 4297 checkUnnamed605(o.items); |
| 4265 unittest.expect(o.kind, unittest.equals('foo')); | 4298 unittest.expect(o.kind, unittest.equals('foo')); |
| 4266 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 4299 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 4267 checkPageInfo(o.pageInfo); | 4300 checkPageInfo(o.pageInfo); |
| 4268 checkTokenPagination(o.tokenPagination); | 4301 checkTokenPagination(o.tokenPagination); |
| 4269 unittest.expect(o.visitorId, unittest.equals('foo')); | 4302 unittest.expect(o.visitorId, unittest.equals('foo')); |
| 4270 } | 4303 } |
| 4271 buildCounterSponsorListResponse--; | 4304 buildCounterSponsorListResponse--; |
| 4272 } | 4305 } |
| 4273 | 4306 |
| 4274 core.int buildCounterSponsorSnippet = 0; | 4307 core.int buildCounterSponsorSnippet = 0; |
| 4275 buildSponsorSnippet() { | 4308 buildSponsorSnippet() { |
| 4276 var o = new api.SponsorSnippet(); | 4309 var o = new api.SponsorSnippet(); |
| 4277 buildCounterSponsorSnippet++; | 4310 buildCounterSponsorSnippet++; |
| 4278 if (buildCounterSponsorSnippet < 3) { | 4311 if (buildCounterSponsorSnippet < 3) { |
| 4279 o.channelId = "foo"; | 4312 o.channelId = "foo"; |
| 4280 o.sponsorDetails = buildChannelProfileDetails(); | 4313 o.sponsorDetails = buildChannelProfileDetails(); |
| 4281 o.sponsorSince = core.DateTime.parse("2002-02-27T14:01:02"); | 4314 o.sponsorSince = core.DateTime.parse("2002-02-27T14:01:02"); |
| 4282 } | 4315 } |
| 4283 buildCounterSponsorSnippet--; | 4316 buildCounterSponsorSnippet--; |
| 4284 return o; | 4317 return o; |
| 4285 } | 4318 } |
| 4286 | 4319 |
| 4287 checkSponsorSnippet(api.SponsorSnippet o) { | 4320 checkSponsorSnippet(api.SponsorSnippet o) { |
| 4288 buildCounterSponsorSnippet++; | 4321 buildCounterSponsorSnippet++; |
| 4289 if (buildCounterSponsorSnippet < 3) { | 4322 if (buildCounterSponsorSnippet < 3) { |
| 4290 unittest.expect(o.channelId, unittest.equals('foo')); | 4323 unittest.expect(o.channelId, unittest.equals('foo')); |
| 4291 checkChannelProfileDetails(o.sponsorDetails); | 4324 checkChannelProfileDetails(o.sponsorDetails); |
| 4292 unittest.expect(o.sponsorSince, unittest.equals(core.DateTime.parse("2002-02
-27T14:01:02"))); | 4325 unittest.expect(o.sponsorSince, |
| 4326 unittest.equals(core.DateTime.parse("2002-02-27T14:01:02"))); |
| 4293 } | 4327 } |
| 4294 buildCounterSponsorSnippet--; | 4328 buildCounterSponsorSnippet--; |
| 4295 } | 4329 } |
| 4296 | 4330 |
| 4297 core.int buildCounterSubscription = 0; | 4331 core.int buildCounterSubscription = 0; |
| 4298 buildSubscription() { | 4332 buildSubscription() { |
| 4299 var o = new api.Subscription(); | 4333 var o = new api.Subscription(); |
| 4300 buildCounterSubscription++; | 4334 buildCounterSubscription++; |
| 4301 if (buildCounterSubscription < 3) { | 4335 if (buildCounterSubscription < 3) { |
| 4302 o.contentDetails = buildSubscriptionContentDetails(); | 4336 o.contentDetails = buildSubscriptionContentDetails(); |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4339 checkSubscriptionContentDetails(api.SubscriptionContentDetails o) { | 4373 checkSubscriptionContentDetails(api.SubscriptionContentDetails o) { |
| 4340 buildCounterSubscriptionContentDetails++; | 4374 buildCounterSubscriptionContentDetails++; |
| 4341 if (buildCounterSubscriptionContentDetails < 3) { | 4375 if (buildCounterSubscriptionContentDetails < 3) { |
| 4342 unittest.expect(o.activityType, unittest.equals('foo')); | 4376 unittest.expect(o.activityType, unittest.equals('foo')); |
| 4343 unittest.expect(o.newItemCount, unittest.equals(42)); | 4377 unittest.expect(o.newItemCount, unittest.equals(42)); |
| 4344 unittest.expect(o.totalItemCount, unittest.equals(42)); | 4378 unittest.expect(o.totalItemCount, unittest.equals(42)); |
| 4345 } | 4379 } |
| 4346 buildCounterSubscriptionContentDetails--; | 4380 buildCounterSubscriptionContentDetails--; |
| 4347 } | 4381 } |
| 4348 | 4382 |
| 4349 buildUnnamed607() { | 4383 buildUnnamed606() { |
| 4350 var o = new core.List<api.Subscription>(); | 4384 var o = new core.List<api.Subscription>(); |
| 4351 o.add(buildSubscription()); | 4385 o.add(buildSubscription()); |
| 4352 o.add(buildSubscription()); | 4386 o.add(buildSubscription()); |
| 4353 return o; | 4387 return o; |
| 4354 } | 4388 } |
| 4355 | 4389 |
| 4356 checkUnnamed607(core.List<api.Subscription> o) { | 4390 checkUnnamed606(core.List<api.Subscription> o) { |
| 4357 unittest.expect(o, unittest.hasLength(2)); | 4391 unittest.expect(o, unittest.hasLength(2)); |
| 4358 checkSubscription(o[0]); | 4392 checkSubscription(o[0]); |
| 4359 checkSubscription(o[1]); | 4393 checkSubscription(o[1]); |
| 4360 } | 4394 } |
| 4361 | 4395 |
| 4362 core.int buildCounterSubscriptionListResponse = 0; | 4396 core.int buildCounterSubscriptionListResponse = 0; |
| 4363 buildSubscriptionListResponse() { | 4397 buildSubscriptionListResponse() { |
| 4364 var o = new api.SubscriptionListResponse(); | 4398 var o = new api.SubscriptionListResponse(); |
| 4365 buildCounterSubscriptionListResponse++; | 4399 buildCounterSubscriptionListResponse++; |
| 4366 if (buildCounterSubscriptionListResponse < 3) { | 4400 if (buildCounterSubscriptionListResponse < 3) { |
| 4367 o.etag = "foo"; | 4401 o.etag = "foo"; |
| 4368 o.eventId = "foo"; | 4402 o.eventId = "foo"; |
| 4369 o.items = buildUnnamed607(); | 4403 o.items = buildUnnamed606(); |
| 4370 o.kind = "foo"; | 4404 o.kind = "foo"; |
| 4371 o.nextPageToken = "foo"; | 4405 o.nextPageToken = "foo"; |
| 4372 o.pageInfo = buildPageInfo(); | 4406 o.pageInfo = buildPageInfo(); |
| 4373 o.prevPageToken = "foo"; | 4407 o.prevPageToken = "foo"; |
| 4374 o.tokenPagination = buildTokenPagination(); | 4408 o.tokenPagination = buildTokenPagination(); |
| 4375 o.visitorId = "foo"; | 4409 o.visitorId = "foo"; |
| 4376 } | 4410 } |
| 4377 buildCounterSubscriptionListResponse--; | 4411 buildCounterSubscriptionListResponse--; |
| 4378 return o; | 4412 return o; |
| 4379 } | 4413 } |
| 4380 | 4414 |
| 4381 checkSubscriptionListResponse(api.SubscriptionListResponse o) { | 4415 checkSubscriptionListResponse(api.SubscriptionListResponse o) { |
| 4382 buildCounterSubscriptionListResponse++; | 4416 buildCounterSubscriptionListResponse++; |
| 4383 if (buildCounterSubscriptionListResponse < 3) { | 4417 if (buildCounterSubscriptionListResponse < 3) { |
| 4384 unittest.expect(o.etag, unittest.equals('foo')); | 4418 unittest.expect(o.etag, unittest.equals('foo')); |
| 4385 unittest.expect(o.eventId, unittest.equals('foo')); | 4419 unittest.expect(o.eventId, unittest.equals('foo')); |
| 4386 checkUnnamed607(o.items); | 4420 checkUnnamed606(o.items); |
| 4387 unittest.expect(o.kind, unittest.equals('foo')); | 4421 unittest.expect(o.kind, unittest.equals('foo')); |
| 4388 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 4422 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 4389 checkPageInfo(o.pageInfo); | 4423 checkPageInfo(o.pageInfo); |
| 4390 unittest.expect(o.prevPageToken, unittest.equals('foo')); | 4424 unittest.expect(o.prevPageToken, unittest.equals('foo')); |
| 4391 checkTokenPagination(o.tokenPagination); | 4425 checkTokenPagination(o.tokenPagination); |
| 4392 unittest.expect(o.visitorId, unittest.equals('foo')); | 4426 unittest.expect(o.visitorId, unittest.equals('foo')); |
| 4393 } | 4427 } |
| 4394 buildCounterSubscriptionListResponse--; | 4428 buildCounterSubscriptionListResponse--; |
| 4395 } | 4429 } |
| 4396 | 4430 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 4410 buildCounterSubscriptionSnippet--; | 4444 buildCounterSubscriptionSnippet--; |
| 4411 return o; | 4445 return o; |
| 4412 } | 4446 } |
| 4413 | 4447 |
| 4414 checkSubscriptionSnippet(api.SubscriptionSnippet o) { | 4448 checkSubscriptionSnippet(api.SubscriptionSnippet o) { |
| 4415 buildCounterSubscriptionSnippet++; | 4449 buildCounterSubscriptionSnippet++; |
| 4416 if (buildCounterSubscriptionSnippet < 3) { | 4450 if (buildCounterSubscriptionSnippet < 3) { |
| 4417 unittest.expect(o.channelId, unittest.equals('foo')); | 4451 unittest.expect(o.channelId, unittest.equals('foo')); |
| 4418 unittest.expect(o.channelTitle, unittest.equals('foo')); | 4452 unittest.expect(o.channelTitle, unittest.equals('foo')); |
| 4419 unittest.expect(o.description, unittest.equals('foo')); | 4453 unittest.expect(o.description, unittest.equals('foo')); |
| 4420 unittest.expect(o.publishedAt, unittest.equals(core.DateTime.parse("2002-02-
27T14:01:02"))); | 4454 unittest.expect(o.publishedAt, |
| 4455 unittest.equals(core.DateTime.parse("2002-02-27T14:01:02"))); |
| 4421 checkResourceId(o.resourceId); | 4456 checkResourceId(o.resourceId); |
| 4422 checkThumbnailDetails(o.thumbnails); | 4457 checkThumbnailDetails(o.thumbnails); |
| 4423 unittest.expect(o.title, unittest.equals('foo')); | 4458 unittest.expect(o.title, unittest.equals('foo')); |
| 4424 } | 4459 } |
| 4425 buildCounterSubscriptionSnippet--; | 4460 buildCounterSubscriptionSnippet--; |
| 4426 } | 4461 } |
| 4427 | 4462 |
| 4428 core.int buildCounterSubscriptionSubscriberSnippet = 0; | 4463 core.int buildCounterSubscriptionSubscriberSnippet = 0; |
| 4429 buildSubscriptionSubscriberSnippet() { | 4464 buildSubscriptionSubscriberSnippet() { |
| 4430 var o = new api.SubscriptionSubscriberSnippet(); | 4465 var o = new api.SubscriptionSubscriberSnippet(); |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4468 buildCounterSuperChatEvent++; | 4503 buildCounterSuperChatEvent++; |
| 4469 if (buildCounterSuperChatEvent < 3) { | 4504 if (buildCounterSuperChatEvent < 3) { |
| 4470 unittest.expect(o.etag, unittest.equals('foo')); | 4505 unittest.expect(o.etag, unittest.equals('foo')); |
| 4471 unittest.expect(o.id, unittest.equals('foo')); | 4506 unittest.expect(o.id, unittest.equals('foo')); |
| 4472 unittest.expect(o.kind, unittest.equals('foo')); | 4507 unittest.expect(o.kind, unittest.equals('foo')); |
| 4473 checkSuperChatEventSnippet(o.snippet); | 4508 checkSuperChatEventSnippet(o.snippet); |
| 4474 } | 4509 } |
| 4475 buildCounterSuperChatEvent--; | 4510 buildCounterSuperChatEvent--; |
| 4476 } | 4511 } |
| 4477 | 4512 |
| 4478 buildUnnamed608() { | 4513 buildUnnamed607() { |
| 4479 var o = new core.List<api.SuperChatEvent>(); | 4514 var o = new core.List<api.SuperChatEvent>(); |
| 4480 o.add(buildSuperChatEvent()); | 4515 o.add(buildSuperChatEvent()); |
| 4481 o.add(buildSuperChatEvent()); | 4516 o.add(buildSuperChatEvent()); |
| 4482 return o; | 4517 return o; |
| 4483 } | 4518 } |
| 4484 | 4519 |
| 4485 checkUnnamed608(core.List<api.SuperChatEvent> o) { | 4520 checkUnnamed607(core.List<api.SuperChatEvent> o) { |
| 4486 unittest.expect(o, unittest.hasLength(2)); | 4521 unittest.expect(o, unittest.hasLength(2)); |
| 4487 checkSuperChatEvent(o[0]); | 4522 checkSuperChatEvent(o[0]); |
| 4488 checkSuperChatEvent(o[1]); | 4523 checkSuperChatEvent(o[1]); |
| 4489 } | 4524 } |
| 4490 | 4525 |
| 4491 core.int buildCounterSuperChatEventListResponse = 0; | 4526 core.int buildCounterSuperChatEventListResponse = 0; |
| 4492 buildSuperChatEventListResponse() { | 4527 buildSuperChatEventListResponse() { |
| 4493 var o = new api.SuperChatEventListResponse(); | 4528 var o = new api.SuperChatEventListResponse(); |
| 4494 buildCounterSuperChatEventListResponse++; | 4529 buildCounterSuperChatEventListResponse++; |
| 4495 if (buildCounterSuperChatEventListResponse < 3) { | 4530 if (buildCounterSuperChatEventListResponse < 3) { |
| 4496 o.etag = "foo"; | 4531 o.etag = "foo"; |
| 4497 o.eventId = "foo"; | 4532 o.eventId = "foo"; |
| 4498 o.items = buildUnnamed608(); | 4533 o.items = buildUnnamed607(); |
| 4499 o.kind = "foo"; | 4534 o.kind = "foo"; |
| 4500 o.nextPageToken = "foo"; | 4535 o.nextPageToken = "foo"; |
| 4501 o.pageInfo = buildPageInfo(); | 4536 o.pageInfo = buildPageInfo(); |
| 4502 o.tokenPagination = buildTokenPagination(); | 4537 o.tokenPagination = buildTokenPagination(); |
| 4503 o.visitorId = "foo"; | 4538 o.visitorId = "foo"; |
| 4504 } | 4539 } |
| 4505 buildCounterSuperChatEventListResponse--; | 4540 buildCounterSuperChatEventListResponse--; |
| 4506 return o; | 4541 return o; |
| 4507 } | 4542 } |
| 4508 | 4543 |
| 4509 checkSuperChatEventListResponse(api.SuperChatEventListResponse o) { | 4544 checkSuperChatEventListResponse(api.SuperChatEventListResponse o) { |
| 4510 buildCounterSuperChatEventListResponse++; | 4545 buildCounterSuperChatEventListResponse++; |
| 4511 if (buildCounterSuperChatEventListResponse < 3) { | 4546 if (buildCounterSuperChatEventListResponse < 3) { |
| 4512 unittest.expect(o.etag, unittest.equals('foo')); | 4547 unittest.expect(o.etag, unittest.equals('foo')); |
| 4513 unittest.expect(o.eventId, unittest.equals('foo')); | 4548 unittest.expect(o.eventId, unittest.equals('foo')); |
| 4514 checkUnnamed608(o.items); | 4549 checkUnnamed607(o.items); |
| 4515 unittest.expect(o.kind, unittest.equals('foo')); | 4550 unittest.expect(o.kind, unittest.equals('foo')); |
| 4516 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 4551 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 4517 checkPageInfo(o.pageInfo); | 4552 checkPageInfo(o.pageInfo); |
| 4518 checkTokenPagination(o.tokenPagination); | 4553 checkTokenPagination(o.tokenPagination); |
| 4519 unittest.expect(o.visitorId, unittest.equals('foo')); | 4554 unittest.expect(o.visitorId, unittest.equals('foo')); |
| 4520 } | 4555 } |
| 4521 buildCounterSuperChatEventListResponse--; | 4556 buildCounterSuperChatEventListResponse--; |
| 4522 } | 4557 } |
| 4523 | 4558 |
| 4524 core.int buildCounterSuperChatEventSnippet = 0; | 4559 core.int buildCounterSuperChatEventSnippet = 0; |
| (...skipping 13 matching lines...) Expand all Loading... |
| 4538 buildCounterSuperChatEventSnippet--; | 4573 buildCounterSuperChatEventSnippet--; |
| 4539 return o; | 4574 return o; |
| 4540 } | 4575 } |
| 4541 | 4576 |
| 4542 checkSuperChatEventSnippet(api.SuperChatEventSnippet o) { | 4577 checkSuperChatEventSnippet(api.SuperChatEventSnippet o) { |
| 4543 buildCounterSuperChatEventSnippet++; | 4578 buildCounterSuperChatEventSnippet++; |
| 4544 if (buildCounterSuperChatEventSnippet < 3) { | 4579 if (buildCounterSuperChatEventSnippet < 3) { |
| 4545 unittest.expect(o.amountMicros, unittest.equals('foo')); | 4580 unittest.expect(o.amountMicros, unittest.equals('foo')); |
| 4546 unittest.expect(o.channelId, unittest.equals('foo')); | 4581 unittest.expect(o.channelId, unittest.equals('foo')); |
| 4547 unittest.expect(o.commentText, unittest.equals('foo')); | 4582 unittest.expect(o.commentText, unittest.equals('foo')); |
| 4548 unittest.expect(o.createdAt, unittest.equals(core.DateTime.parse("2002-02-27
T14:01:02"))); | 4583 unittest.expect(o.createdAt, |
| 4584 unittest.equals(core.DateTime.parse("2002-02-27T14:01:02"))); |
| 4549 unittest.expect(o.currency, unittest.equals('foo')); | 4585 unittest.expect(o.currency, unittest.equals('foo')); |
| 4550 unittest.expect(o.displayString, unittest.equals('foo')); | 4586 unittest.expect(o.displayString, unittest.equals('foo')); |
| 4551 unittest.expect(o.messageType, unittest.equals(42)); | 4587 unittest.expect(o.messageType, unittest.equals(42)); |
| 4552 checkChannelProfileDetails(o.supporterDetails); | 4588 checkChannelProfileDetails(o.supporterDetails); |
| 4553 } | 4589 } |
| 4554 buildCounterSuperChatEventSnippet--; | 4590 buildCounterSuperChatEventSnippet--; |
| 4555 } | 4591 } |
| 4556 | 4592 |
| 4557 core.int buildCounterThumbnail = 0; | 4593 core.int buildCounterThumbnail = 0; |
| 4558 buildThumbnail() { | 4594 buildThumbnail() { |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4597 if (buildCounterThumbnailDetails < 3) { | 4633 if (buildCounterThumbnailDetails < 3) { |
| 4598 checkThumbnail(o.default_); | 4634 checkThumbnail(o.default_); |
| 4599 checkThumbnail(o.high); | 4635 checkThumbnail(o.high); |
| 4600 checkThumbnail(o.maxres); | 4636 checkThumbnail(o.maxres); |
| 4601 checkThumbnail(o.medium); | 4637 checkThumbnail(o.medium); |
| 4602 checkThumbnail(o.standard); | 4638 checkThumbnail(o.standard); |
| 4603 } | 4639 } |
| 4604 buildCounterThumbnailDetails--; | 4640 buildCounterThumbnailDetails--; |
| 4605 } | 4641 } |
| 4606 | 4642 |
| 4607 buildUnnamed609() { | 4643 buildUnnamed608() { |
| 4608 var o = new core.List<api.ThumbnailDetails>(); | 4644 var o = new core.List<api.ThumbnailDetails>(); |
| 4609 o.add(buildThumbnailDetails()); | 4645 o.add(buildThumbnailDetails()); |
| 4610 o.add(buildThumbnailDetails()); | 4646 o.add(buildThumbnailDetails()); |
| 4611 return o; | 4647 return o; |
| 4612 } | 4648 } |
| 4613 | 4649 |
| 4614 checkUnnamed609(core.List<api.ThumbnailDetails> o) { | 4650 checkUnnamed608(core.List<api.ThumbnailDetails> o) { |
| 4615 unittest.expect(o, unittest.hasLength(2)); | 4651 unittest.expect(o, unittest.hasLength(2)); |
| 4616 checkThumbnailDetails(o[0]); | 4652 checkThumbnailDetails(o[0]); |
| 4617 checkThumbnailDetails(o[1]); | 4653 checkThumbnailDetails(o[1]); |
| 4618 } | 4654 } |
| 4619 | 4655 |
| 4620 core.int buildCounterThumbnailSetResponse = 0; | 4656 core.int buildCounterThumbnailSetResponse = 0; |
| 4621 buildThumbnailSetResponse() { | 4657 buildThumbnailSetResponse() { |
| 4622 var o = new api.ThumbnailSetResponse(); | 4658 var o = new api.ThumbnailSetResponse(); |
| 4623 buildCounterThumbnailSetResponse++; | 4659 buildCounterThumbnailSetResponse++; |
| 4624 if (buildCounterThumbnailSetResponse < 3) { | 4660 if (buildCounterThumbnailSetResponse < 3) { |
| 4625 o.etag = "foo"; | 4661 o.etag = "foo"; |
| 4626 o.eventId = "foo"; | 4662 o.eventId = "foo"; |
| 4627 o.items = buildUnnamed609(); | 4663 o.items = buildUnnamed608(); |
| 4628 o.kind = "foo"; | 4664 o.kind = "foo"; |
| 4629 o.visitorId = "foo"; | 4665 o.visitorId = "foo"; |
| 4630 } | 4666 } |
| 4631 buildCounterThumbnailSetResponse--; | 4667 buildCounterThumbnailSetResponse--; |
| 4632 return o; | 4668 return o; |
| 4633 } | 4669 } |
| 4634 | 4670 |
| 4635 checkThumbnailSetResponse(api.ThumbnailSetResponse o) { | 4671 checkThumbnailSetResponse(api.ThumbnailSetResponse o) { |
| 4636 buildCounterThumbnailSetResponse++; | 4672 buildCounterThumbnailSetResponse++; |
| 4637 if (buildCounterThumbnailSetResponse < 3) { | 4673 if (buildCounterThumbnailSetResponse < 3) { |
| 4638 unittest.expect(o.etag, unittest.equals('foo')); | 4674 unittest.expect(o.etag, unittest.equals('foo')); |
| 4639 unittest.expect(o.eventId, unittest.equals('foo')); | 4675 unittest.expect(o.eventId, unittest.equals('foo')); |
| 4640 checkUnnamed609(o.items); | 4676 checkUnnamed608(o.items); |
| 4641 unittest.expect(o.kind, unittest.equals('foo')); | 4677 unittest.expect(o.kind, unittest.equals('foo')); |
| 4642 unittest.expect(o.visitorId, unittest.equals('foo')); | 4678 unittest.expect(o.visitorId, unittest.equals('foo')); |
| 4643 } | 4679 } |
| 4644 buildCounterThumbnailSetResponse--; | 4680 buildCounterThumbnailSetResponse--; |
| 4645 } | 4681 } |
| 4646 | 4682 |
| 4647 core.int buildCounterTokenPagination = 0; | 4683 core.int buildCounterTokenPagination = 0; |
| 4648 buildTokenPagination() { | 4684 buildTokenPagination() { |
| 4649 var o = new api.TokenPagination(); | 4685 var o = new api.TokenPagination(); |
| 4650 buildCounterTokenPagination++; | 4686 buildCounterTokenPagination++; |
| 4651 if (buildCounterTokenPagination < 3) { | 4687 if (buildCounterTokenPagination < 3) {} |
| 4652 } | |
| 4653 buildCounterTokenPagination--; | 4688 buildCounterTokenPagination--; |
| 4654 return o; | 4689 return o; |
| 4655 } | 4690 } |
| 4656 | 4691 |
| 4657 checkTokenPagination(api.TokenPagination o) { | 4692 checkTokenPagination(api.TokenPagination o) { |
| 4658 buildCounterTokenPagination++; | 4693 buildCounterTokenPagination++; |
| 4659 if (buildCounterTokenPagination < 3) { | 4694 if (buildCounterTokenPagination < 3) {} |
| 4660 } | |
| 4661 buildCounterTokenPagination--; | 4695 buildCounterTokenPagination--; |
| 4662 } | 4696 } |
| 4663 | 4697 |
| 4664 buildUnnamed610() { | 4698 buildUnnamed609() { |
| 4665 var o = new core.Map<core.String, api.VideoLocalization>(); | 4699 var o = new core.Map<core.String, api.VideoLocalization>(); |
| 4666 o["x"] = buildVideoLocalization(); | 4700 o["x"] = buildVideoLocalization(); |
| 4667 o["y"] = buildVideoLocalization(); | 4701 o["y"] = buildVideoLocalization(); |
| 4668 return o; | 4702 return o; |
| 4669 } | 4703 } |
| 4670 | 4704 |
| 4671 checkUnnamed610(core.Map<core.String, api.VideoLocalization> o) { | 4705 checkUnnamed609(core.Map<core.String, api.VideoLocalization> o) { |
| 4672 unittest.expect(o, unittest.hasLength(2)); | 4706 unittest.expect(o, unittest.hasLength(2)); |
| 4673 checkVideoLocalization(o["x"]); | 4707 checkVideoLocalization(o["x"]); |
| 4674 checkVideoLocalization(o["y"]); | 4708 checkVideoLocalization(o["y"]); |
| 4675 } | 4709 } |
| 4676 | 4710 |
| 4677 core.int buildCounterVideo = 0; | 4711 core.int buildCounterVideo = 0; |
| 4678 buildVideo() { | 4712 buildVideo() { |
| 4679 var o = new api.Video(); | 4713 var o = new api.Video(); |
| 4680 buildCounterVideo++; | 4714 buildCounterVideo++; |
| 4681 if (buildCounterVideo < 3) { | 4715 if (buildCounterVideo < 3) { |
| 4682 o.ageGating = buildVideoAgeGating(); | 4716 o.ageGating = buildVideoAgeGating(); |
| 4683 o.contentDetails = buildVideoContentDetails(); | 4717 o.contentDetails = buildVideoContentDetails(); |
| 4684 o.etag = "foo"; | 4718 o.etag = "foo"; |
| 4685 o.fileDetails = buildVideoFileDetails(); | 4719 o.fileDetails = buildVideoFileDetails(); |
| 4686 o.id = "foo"; | 4720 o.id = "foo"; |
| 4687 o.kind = "foo"; | 4721 o.kind = "foo"; |
| 4688 o.liveStreamingDetails = buildVideoLiveStreamingDetails(); | 4722 o.liveStreamingDetails = buildVideoLiveStreamingDetails(); |
| 4689 o.localizations = buildUnnamed610(); | 4723 o.localizations = buildUnnamed609(); |
| 4690 o.monetizationDetails = buildVideoMonetizationDetails(); | 4724 o.monetizationDetails = buildVideoMonetizationDetails(); |
| 4691 o.player = buildVideoPlayer(); | 4725 o.player = buildVideoPlayer(); |
| 4692 o.processingDetails = buildVideoProcessingDetails(); | 4726 o.processingDetails = buildVideoProcessingDetails(); |
| 4693 o.projectDetails = buildVideoProjectDetails(); | 4727 o.projectDetails = buildVideoProjectDetails(); |
| 4694 o.recordingDetails = buildVideoRecordingDetails(); | 4728 o.recordingDetails = buildVideoRecordingDetails(); |
| 4695 o.snippet = buildVideoSnippet(); | 4729 o.snippet = buildVideoSnippet(); |
| 4696 o.statistics = buildVideoStatistics(); | 4730 o.statistics = buildVideoStatistics(); |
| 4697 o.status = buildVideoStatus(); | 4731 o.status = buildVideoStatus(); |
| 4698 o.suggestions = buildVideoSuggestions(); | 4732 o.suggestions = buildVideoSuggestions(); |
| 4699 o.topicDetails = buildVideoTopicDetails(); | 4733 o.topicDetails = buildVideoTopicDetails(); |
| 4700 } | 4734 } |
| 4701 buildCounterVideo--; | 4735 buildCounterVideo--; |
| 4702 return o; | 4736 return o; |
| 4703 } | 4737 } |
| 4704 | 4738 |
| 4705 checkVideo(api.Video o) { | 4739 checkVideo(api.Video o) { |
| 4706 buildCounterVideo++; | 4740 buildCounterVideo++; |
| 4707 if (buildCounterVideo < 3) { | 4741 if (buildCounterVideo < 3) { |
| 4708 checkVideoAgeGating(o.ageGating); | 4742 checkVideoAgeGating(o.ageGating); |
| 4709 checkVideoContentDetails(o.contentDetails); | 4743 checkVideoContentDetails(o.contentDetails); |
| 4710 unittest.expect(o.etag, unittest.equals('foo')); | 4744 unittest.expect(o.etag, unittest.equals('foo')); |
| 4711 checkVideoFileDetails(o.fileDetails); | 4745 checkVideoFileDetails(o.fileDetails); |
| 4712 unittest.expect(o.id, unittest.equals('foo')); | 4746 unittest.expect(o.id, unittest.equals('foo')); |
| 4713 unittest.expect(o.kind, unittest.equals('foo')); | 4747 unittest.expect(o.kind, unittest.equals('foo')); |
| 4714 checkVideoLiveStreamingDetails(o.liveStreamingDetails); | 4748 checkVideoLiveStreamingDetails(o.liveStreamingDetails); |
| 4715 checkUnnamed610(o.localizations); | 4749 checkUnnamed609(o.localizations); |
| 4716 checkVideoMonetizationDetails(o.monetizationDetails); | 4750 checkVideoMonetizationDetails(o.monetizationDetails); |
| 4717 checkVideoPlayer(o.player); | 4751 checkVideoPlayer(o.player); |
| 4718 checkVideoProcessingDetails(o.processingDetails); | 4752 checkVideoProcessingDetails(o.processingDetails); |
| 4719 checkVideoProjectDetails(o.projectDetails); | 4753 checkVideoProjectDetails(o.projectDetails); |
| 4720 checkVideoRecordingDetails(o.recordingDetails); | 4754 checkVideoRecordingDetails(o.recordingDetails); |
| 4721 checkVideoSnippet(o.snippet); | 4755 checkVideoSnippet(o.snippet); |
| 4722 checkVideoStatistics(o.statistics); | 4756 checkVideoStatistics(o.statistics); |
| 4723 checkVideoStatus(o.status); | 4757 checkVideoStatus(o.status); |
| 4724 checkVideoSuggestions(o.suggestions); | 4758 checkVideoSuggestions(o.suggestions); |
| 4725 checkVideoTopicDetails(o.topicDetails); | 4759 checkVideoTopicDetails(o.topicDetails); |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4772 buildCounterVideoAbuseReportReason++; | 4806 buildCounterVideoAbuseReportReason++; |
| 4773 if (buildCounterVideoAbuseReportReason < 3) { | 4807 if (buildCounterVideoAbuseReportReason < 3) { |
| 4774 unittest.expect(o.etag, unittest.equals('foo')); | 4808 unittest.expect(o.etag, unittest.equals('foo')); |
| 4775 unittest.expect(o.id, unittest.equals('foo')); | 4809 unittest.expect(o.id, unittest.equals('foo')); |
| 4776 unittest.expect(o.kind, unittest.equals('foo')); | 4810 unittest.expect(o.kind, unittest.equals('foo')); |
| 4777 checkVideoAbuseReportReasonSnippet(o.snippet); | 4811 checkVideoAbuseReportReasonSnippet(o.snippet); |
| 4778 } | 4812 } |
| 4779 buildCounterVideoAbuseReportReason--; | 4813 buildCounterVideoAbuseReportReason--; |
| 4780 } | 4814 } |
| 4781 | 4815 |
| 4782 buildUnnamed611() { | 4816 buildUnnamed610() { |
| 4783 var o = new core.List<api.VideoAbuseReportReason>(); | 4817 var o = new core.List<api.VideoAbuseReportReason>(); |
| 4784 o.add(buildVideoAbuseReportReason()); | 4818 o.add(buildVideoAbuseReportReason()); |
| 4785 o.add(buildVideoAbuseReportReason()); | 4819 o.add(buildVideoAbuseReportReason()); |
| 4786 return o; | 4820 return o; |
| 4787 } | 4821 } |
| 4788 | 4822 |
| 4789 checkUnnamed611(core.List<api.VideoAbuseReportReason> o) { | 4823 checkUnnamed610(core.List<api.VideoAbuseReportReason> o) { |
| 4790 unittest.expect(o, unittest.hasLength(2)); | 4824 unittest.expect(o, unittest.hasLength(2)); |
| 4791 checkVideoAbuseReportReason(o[0]); | 4825 checkVideoAbuseReportReason(o[0]); |
| 4792 checkVideoAbuseReportReason(o[1]); | 4826 checkVideoAbuseReportReason(o[1]); |
| 4793 } | 4827 } |
| 4794 | 4828 |
| 4795 core.int buildCounterVideoAbuseReportReasonListResponse = 0; | 4829 core.int buildCounterVideoAbuseReportReasonListResponse = 0; |
| 4796 buildVideoAbuseReportReasonListResponse() { | 4830 buildVideoAbuseReportReasonListResponse() { |
| 4797 var o = new api.VideoAbuseReportReasonListResponse(); | 4831 var o = new api.VideoAbuseReportReasonListResponse(); |
| 4798 buildCounterVideoAbuseReportReasonListResponse++; | 4832 buildCounterVideoAbuseReportReasonListResponse++; |
| 4799 if (buildCounterVideoAbuseReportReasonListResponse < 3) { | 4833 if (buildCounterVideoAbuseReportReasonListResponse < 3) { |
| 4800 o.etag = "foo"; | 4834 o.etag = "foo"; |
| 4801 o.eventId = "foo"; | 4835 o.eventId = "foo"; |
| 4802 o.items = buildUnnamed611(); | 4836 o.items = buildUnnamed610(); |
| 4803 o.kind = "foo"; | 4837 o.kind = "foo"; |
| 4804 o.visitorId = "foo"; | 4838 o.visitorId = "foo"; |
| 4805 } | 4839 } |
| 4806 buildCounterVideoAbuseReportReasonListResponse--; | 4840 buildCounterVideoAbuseReportReasonListResponse--; |
| 4807 return o; | 4841 return o; |
| 4808 } | 4842 } |
| 4809 | 4843 |
| 4810 checkVideoAbuseReportReasonListResponse(api.VideoAbuseReportReasonListResponse o
) { | 4844 checkVideoAbuseReportReasonListResponse( |
| 4845 api.VideoAbuseReportReasonListResponse o) { |
| 4811 buildCounterVideoAbuseReportReasonListResponse++; | 4846 buildCounterVideoAbuseReportReasonListResponse++; |
| 4812 if (buildCounterVideoAbuseReportReasonListResponse < 3) { | 4847 if (buildCounterVideoAbuseReportReasonListResponse < 3) { |
| 4813 unittest.expect(o.etag, unittest.equals('foo')); | 4848 unittest.expect(o.etag, unittest.equals('foo')); |
| 4814 unittest.expect(o.eventId, unittest.equals('foo')); | 4849 unittest.expect(o.eventId, unittest.equals('foo')); |
| 4815 checkUnnamed611(o.items); | 4850 checkUnnamed610(o.items); |
| 4816 unittest.expect(o.kind, unittest.equals('foo')); | 4851 unittest.expect(o.kind, unittest.equals('foo')); |
| 4817 unittest.expect(o.visitorId, unittest.equals('foo')); | 4852 unittest.expect(o.visitorId, unittest.equals('foo')); |
| 4818 } | 4853 } |
| 4819 buildCounterVideoAbuseReportReasonListResponse--; | 4854 buildCounterVideoAbuseReportReasonListResponse--; |
| 4820 } | 4855 } |
| 4821 | 4856 |
| 4822 buildUnnamed612() { | 4857 buildUnnamed611() { |
| 4823 var o = new core.List<api.VideoAbuseReportSecondaryReason>(); | 4858 var o = new core.List<api.VideoAbuseReportSecondaryReason>(); |
| 4824 o.add(buildVideoAbuseReportSecondaryReason()); | 4859 o.add(buildVideoAbuseReportSecondaryReason()); |
| 4825 o.add(buildVideoAbuseReportSecondaryReason()); | 4860 o.add(buildVideoAbuseReportSecondaryReason()); |
| 4826 return o; | 4861 return o; |
| 4827 } | 4862 } |
| 4828 | 4863 |
| 4829 checkUnnamed612(core.List<api.VideoAbuseReportSecondaryReason> o) { | 4864 checkUnnamed611(core.List<api.VideoAbuseReportSecondaryReason> o) { |
| 4830 unittest.expect(o, unittest.hasLength(2)); | 4865 unittest.expect(o, unittest.hasLength(2)); |
| 4831 checkVideoAbuseReportSecondaryReason(o[0]); | 4866 checkVideoAbuseReportSecondaryReason(o[0]); |
| 4832 checkVideoAbuseReportSecondaryReason(o[1]); | 4867 checkVideoAbuseReportSecondaryReason(o[1]); |
| 4833 } | 4868 } |
| 4834 | 4869 |
| 4835 core.int buildCounterVideoAbuseReportReasonSnippet = 0; | 4870 core.int buildCounterVideoAbuseReportReasonSnippet = 0; |
| 4836 buildVideoAbuseReportReasonSnippet() { | 4871 buildVideoAbuseReportReasonSnippet() { |
| 4837 var o = new api.VideoAbuseReportReasonSnippet(); | 4872 var o = new api.VideoAbuseReportReasonSnippet(); |
| 4838 buildCounterVideoAbuseReportReasonSnippet++; | 4873 buildCounterVideoAbuseReportReasonSnippet++; |
| 4839 if (buildCounterVideoAbuseReportReasonSnippet < 3) { | 4874 if (buildCounterVideoAbuseReportReasonSnippet < 3) { |
| 4840 o.label = "foo"; | 4875 o.label = "foo"; |
| 4841 o.secondaryReasons = buildUnnamed612(); | 4876 o.secondaryReasons = buildUnnamed611(); |
| 4842 } | 4877 } |
| 4843 buildCounterVideoAbuseReportReasonSnippet--; | 4878 buildCounterVideoAbuseReportReasonSnippet--; |
| 4844 return o; | 4879 return o; |
| 4845 } | 4880 } |
| 4846 | 4881 |
| 4847 checkVideoAbuseReportReasonSnippet(api.VideoAbuseReportReasonSnippet o) { | 4882 checkVideoAbuseReportReasonSnippet(api.VideoAbuseReportReasonSnippet o) { |
| 4848 buildCounterVideoAbuseReportReasonSnippet++; | 4883 buildCounterVideoAbuseReportReasonSnippet++; |
| 4849 if (buildCounterVideoAbuseReportReasonSnippet < 3) { | 4884 if (buildCounterVideoAbuseReportReasonSnippet < 3) { |
| 4850 unittest.expect(o.label, unittest.equals('foo')); | 4885 unittest.expect(o.label, unittest.equals('foo')); |
| 4851 checkUnnamed612(o.secondaryReasons); | 4886 checkUnnamed611(o.secondaryReasons); |
| 4852 } | 4887 } |
| 4853 buildCounterVideoAbuseReportReasonSnippet--; | 4888 buildCounterVideoAbuseReportReasonSnippet--; |
| 4854 } | 4889 } |
| 4855 | 4890 |
| 4856 core.int buildCounterVideoAbuseReportSecondaryReason = 0; | 4891 core.int buildCounterVideoAbuseReportSecondaryReason = 0; |
| 4857 buildVideoAbuseReportSecondaryReason() { | 4892 buildVideoAbuseReportSecondaryReason() { |
| 4858 var o = new api.VideoAbuseReportSecondaryReason(); | 4893 var o = new api.VideoAbuseReportSecondaryReason(); |
| 4859 buildCounterVideoAbuseReportSecondaryReason++; | 4894 buildCounterVideoAbuseReportSecondaryReason++; |
| 4860 if (buildCounterVideoAbuseReportSecondaryReason < 3) { | 4895 if (buildCounterVideoAbuseReportSecondaryReason < 3) { |
| 4861 o.id = "foo"; | 4896 o.id = "foo"; |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4915 buildCounterVideoCategory++; | 4950 buildCounterVideoCategory++; |
| 4916 if (buildCounterVideoCategory < 3) { | 4951 if (buildCounterVideoCategory < 3) { |
| 4917 unittest.expect(o.etag, unittest.equals('foo')); | 4952 unittest.expect(o.etag, unittest.equals('foo')); |
| 4918 unittest.expect(o.id, unittest.equals('foo')); | 4953 unittest.expect(o.id, unittest.equals('foo')); |
| 4919 unittest.expect(o.kind, unittest.equals('foo')); | 4954 unittest.expect(o.kind, unittest.equals('foo')); |
| 4920 checkVideoCategorySnippet(o.snippet); | 4955 checkVideoCategorySnippet(o.snippet); |
| 4921 } | 4956 } |
| 4922 buildCounterVideoCategory--; | 4957 buildCounterVideoCategory--; |
| 4923 } | 4958 } |
| 4924 | 4959 |
| 4925 buildUnnamed613() { | 4960 buildUnnamed612() { |
| 4926 var o = new core.List<api.VideoCategory>(); | 4961 var o = new core.List<api.VideoCategory>(); |
| 4927 o.add(buildVideoCategory()); | 4962 o.add(buildVideoCategory()); |
| 4928 o.add(buildVideoCategory()); | 4963 o.add(buildVideoCategory()); |
| 4929 return o; | 4964 return o; |
| 4930 } | 4965 } |
| 4931 | 4966 |
| 4932 checkUnnamed613(core.List<api.VideoCategory> o) { | 4967 checkUnnamed612(core.List<api.VideoCategory> o) { |
| 4933 unittest.expect(o, unittest.hasLength(2)); | 4968 unittest.expect(o, unittest.hasLength(2)); |
| 4934 checkVideoCategory(o[0]); | 4969 checkVideoCategory(o[0]); |
| 4935 checkVideoCategory(o[1]); | 4970 checkVideoCategory(o[1]); |
| 4936 } | 4971 } |
| 4937 | 4972 |
| 4938 core.int buildCounterVideoCategoryListResponse = 0; | 4973 core.int buildCounterVideoCategoryListResponse = 0; |
| 4939 buildVideoCategoryListResponse() { | 4974 buildVideoCategoryListResponse() { |
| 4940 var o = new api.VideoCategoryListResponse(); | 4975 var o = new api.VideoCategoryListResponse(); |
| 4941 buildCounterVideoCategoryListResponse++; | 4976 buildCounterVideoCategoryListResponse++; |
| 4942 if (buildCounterVideoCategoryListResponse < 3) { | 4977 if (buildCounterVideoCategoryListResponse < 3) { |
| 4943 o.etag = "foo"; | 4978 o.etag = "foo"; |
| 4944 o.eventId = "foo"; | 4979 o.eventId = "foo"; |
| 4945 o.items = buildUnnamed613(); | 4980 o.items = buildUnnamed612(); |
| 4946 o.kind = "foo"; | 4981 o.kind = "foo"; |
| 4947 o.nextPageToken = "foo"; | 4982 o.nextPageToken = "foo"; |
| 4948 o.pageInfo = buildPageInfo(); | 4983 o.pageInfo = buildPageInfo(); |
| 4949 o.prevPageToken = "foo"; | 4984 o.prevPageToken = "foo"; |
| 4950 o.tokenPagination = buildTokenPagination(); | 4985 o.tokenPagination = buildTokenPagination(); |
| 4951 o.visitorId = "foo"; | 4986 o.visitorId = "foo"; |
| 4952 } | 4987 } |
| 4953 buildCounterVideoCategoryListResponse--; | 4988 buildCounterVideoCategoryListResponse--; |
| 4954 return o; | 4989 return o; |
| 4955 } | 4990 } |
| 4956 | 4991 |
| 4957 checkVideoCategoryListResponse(api.VideoCategoryListResponse o) { | 4992 checkVideoCategoryListResponse(api.VideoCategoryListResponse o) { |
| 4958 buildCounterVideoCategoryListResponse++; | 4993 buildCounterVideoCategoryListResponse++; |
| 4959 if (buildCounterVideoCategoryListResponse < 3) { | 4994 if (buildCounterVideoCategoryListResponse < 3) { |
| 4960 unittest.expect(o.etag, unittest.equals('foo')); | 4995 unittest.expect(o.etag, unittest.equals('foo')); |
| 4961 unittest.expect(o.eventId, unittest.equals('foo')); | 4996 unittest.expect(o.eventId, unittest.equals('foo')); |
| 4962 checkUnnamed613(o.items); | 4997 checkUnnamed612(o.items); |
| 4963 unittest.expect(o.kind, unittest.equals('foo')); | 4998 unittest.expect(o.kind, unittest.equals('foo')); |
| 4964 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 4999 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 4965 checkPageInfo(o.pageInfo); | 5000 checkPageInfo(o.pageInfo); |
| 4966 unittest.expect(o.prevPageToken, unittest.equals('foo')); | 5001 unittest.expect(o.prevPageToken, unittest.equals('foo')); |
| 4967 checkTokenPagination(o.tokenPagination); | 5002 checkTokenPagination(o.tokenPagination); |
| 4968 unittest.expect(o.visitorId, unittest.equals('foo')); | 5003 unittest.expect(o.visitorId, unittest.equals('foo')); |
| 4969 } | 5004 } |
| 4970 buildCounterVideoCategoryListResponse--; | 5005 buildCounterVideoCategoryListResponse--; |
| 4971 } | 5006 } |
| 4972 | 5007 |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5023 unittest.expect(o.dimension, unittest.equals('foo')); | 5058 unittest.expect(o.dimension, unittest.equals('foo')); |
| 5024 unittest.expect(o.duration, unittest.equals('foo')); | 5059 unittest.expect(o.duration, unittest.equals('foo')); |
| 5025 unittest.expect(o.hasCustomThumbnail, unittest.isTrue); | 5060 unittest.expect(o.hasCustomThumbnail, unittest.isTrue); |
| 5026 unittest.expect(o.licensedContent, unittest.isTrue); | 5061 unittest.expect(o.licensedContent, unittest.isTrue); |
| 5027 unittest.expect(o.projection, unittest.equals('foo')); | 5062 unittest.expect(o.projection, unittest.equals('foo')); |
| 5028 checkVideoContentDetailsRegionRestriction(o.regionRestriction); | 5063 checkVideoContentDetailsRegionRestriction(o.regionRestriction); |
| 5029 } | 5064 } |
| 5030 buildCounterVideoContentDetails--; | 5065 buildCounterVideoContentDetails--; |
| 5031 } | 5066 } |
| 5032 | 5067 |
| 5068 buildUnnamed613() { |
| 5069 var o = new core.List<core.String>(); |
| 5070 o.add("foo"); |
| 5071 o.add("foo"); |
| 5072 return o; |
| 5073 } |
| 5074 |
| 5075 checkUnnamed613(core.List<core.String> o) { |
| 5076 unittest.expect(o, unittest.hasLength(2)); |
| 5077 unittest.expect(o[0], unittest.equals('foo')); |
| 5078 unittest.expect(o[1], unittest.equals('foo')); |
| 5079 } |
| 5080 |
| 5033 buildUnnamed614() { | 5081 buildUnnamed614() { |
| 5034 var o = new core.List<core.String>(); | 5082 var o = new core.List<core.String>(); |
| 5035 o.add("foo"); | 5083 o.add("foo"); |
| 5036 o.add("foo"); | 5084 o.add("foo"); |
| 5037 return o; | 5085 return o; |
| 5038 } | 5086 } |
| 5039 | 5087 |
| 5040 checkUnnamed614(core.List<core.String> o) { | 5088 checkUnnamed614(core.List<core.String> o) { |
| 5041 unittest.expect(o, unittest.hasLength(2)); | 5089 unittest.expect(o, unittest.hasLength(2)); |
| 5042 unittest.expect(o[0], unittest.equals('foo')); | 5090 unittest.expect(o[0], unittest.equals('foo')); |
| 5043 unittest.expect(o[1], unittest.equals('foo')); | 5091 unittest.expect(o[1], unittest.equals('foo')); |
| 5044 } | |
| 5045 | |
| 5046 buildUnnamed615() { | |
| 5047 var o = new core.List<core.String>(); | |
| 5048 o.add("foo"); | |
| 5049 o.add("foo"); | |
| 5050 return o; | |
| 5051 } | |
| 5052 | |
| 5053 checkUnnamed615(core.List<core.String> o) { | |
| 5054 unittest.expect(o, unittest.hasLength(2)); | |
| 5055 unittest.expect(o[0], unittest.equals('foo')); | |
| 5056 unittest.expect(o[1], unittest.equals('foo')); | |
| 5057 } | 5092 } |
| 5058 | 5093 |
| 5059 core.int buildCounterVideoContentDetailsRegionRestriction = 0; | 5094 core.int buildCounterVideoContentDetailsRegionRestriction = 0; |
| 5060 buildVideoContentDetailsRegionRestriction() { | 5095 buildVideoContentDetailsRegionRestriction() { |
| 5061 var o = new api.VideoContentDetailsRegionRestriction(); | 5096 var o = new api.VideoContentDetailsRegionRestriction(); |
| 5062 buildCounterVideoContentDetailsRegionRestriction++; | 5097 buildCounterVideoContentDetailsRegionRestriction++; |
| 5063 if (buildCounterVideoContentDetailsRegionRestriction < 3) { | 5098 if (buildCounterVideoContentDetailsRegionRestriction < 3) { |
| 5064 o.allowed = buildUnnamed614(); | 5099 o.allowed = buildUnnamed613(); |
| 5065 o.blocked = buildUnnamed615(); | 5100 o.blocked = buildUnnamed614(); |
| 5066 } | 5101 } |
| 5067 buildCounterVideoContentDetailsRegionRestriction--; | 5102 buildCounterVideoContentDetailsRegionRestriction--; |
| 5068 return o; | 5103 return o; |
| 5069 } | 5104 } |
| 5070 | 5105 |
| 5071 checkVideoContentDetailsRegionRestriction(api.VideoContentDetailsRegionRestricti
on o) { | 5106 checkVideoContentDetailsRegionRestriction( |
| 5107 api.VideoContentDetailsRegionRestriction o) { |
| 5072 buildCounterVideoContentDetailsRegionRestriction++; | 5108 buildCounterVideoContentDetailsRegionRestriction++; |
| 5073 if (buildCounterVideoContentDetailsRegionRestriction < 3) { | 5109 if (buildCounterVideoContentDetailsRegionRestriction < 3) { |
| 5074 checkUnnamed614(o.allowed); | 5110 checkUnnamed613(o.allowed); |
| 5075 checkUnnamed615(o.blocked); | 5111 checkUnnamed614(o.blocked); |
| 5076 } | 5112 } |
| 5077 buildCounterVideoContentDetailsRegionRestriction--; | 5113 buildCounterVideoContentDetailsRegionRestriction--; |
| 5078 } | 5114 } |
| 5079 | 5115 |
| 5080 buildUnnamed616() { | 5116 buildUnnamed615() { |
| 5081 var o = new core.List<api.VideoFileDetailsAudioStream>(); | 5117 var o = new core.List<api.VideoFileDetailsAudioStream>(); |
| 5082 o.add(buildVideoFileDetailsAudioStream()); | 5118 o.add(buildVideoFileDetailsAudioStream()); |
| 5083 o.add(buildVideoFileDetailsAudioStream()); | 5119 o.add(buildVideoFileDetailsAudioStream()); |
| 5084 return o; | 5120 return o; |
| 5085 } | 5121 } |
| 5086 | 5122 |
| 5087 checkUnnamed616(core.List<api.VideoFileDetailsAudioStream> o) { | 5123 checkUnnamed615(core.List<api.VideoFileDetailsAudioStream> o) { |
| 5088 unittest.expect(o, unittest.hasLength(2)); | 5124 unittest.expect(o, unittest.hasLength(2)); |
| 5089 checkVideoFileDetailsAudioStream(o[0]); | 5125 checkVideoFileDetailsAudioStream(o[0]); |
| 5090 checkVideoFileDetailsAudioStream(o[1]); | 5126 checkVideoFileDetailsAudioStream(o[1]); |
| 5091 } | 5127 } |
| 5092 | 5128 |
| 5093 buildUnnamed617() { | 5129 buildUnnamed616() { |
| 5094 var o = new core.List<api.VideoFileDetailsVideoStream>(); | 5130 var o = new core.List<api.VideoFileDetailsVideoStream>(); |
| 5095 o.add(buildVideoFileDetailsVideoStream()); | 5131 o.add(buildVideoFileDetailsVideoStream()); |
| 5096 o.add(buildVideoFileDetailsVideoStream()); | 5132 o.add(buildVideoFileDetailsVideoStream()); |
| 5097 return o; | 5133 return o; |
| 5098 } | 5134 } |
| 5099 | 5135 |
| 5100 checkUnnamed617(core.List<api.VideoFileDetailsVideoStream> o) { | 5136 checkUnnamed616(core.List<api.VideoFileDetailsVideoStream> o) { |
| 5101 unittest.expect(o, unittest.hasLength(2)); | 5137 unittest.expect(o, unittest.hasLength(2)); |
| 5102 checkVideoFileDetailsVideoStream(o[0]); | 5138 checkVideoFileDetailsVideoStream(o[0]); |
| 5103 checkVideoFileDetailsVideoStream(o[1]); | 5139 checkVideoFileDetailsVideoStream(o[1]); |
| 5104 } | 5140 } |
| 5105 | 5141 |
| 5106 core.int buildCounterVideoFileDetails = 0; | 5142 core.int buildCounterVideoFileDetails = 0; |
| 5107 buildVideoFileDetails() { | 5143 buildVideoFileDetails() { |
| 5108 var o = new api.VideoFileDetails(); | 5144 var o = new api.VideoFileDetails(); |
| 5109 buildCounterVideoFileDetails++; | 5145 buildCounterVideoFileDetails++; |
| 5110 if (buildCounterVideoFileDetails < 3) { | 5146 if (buildCounterVideoFileDetails < 3) { |
| 5111 o.audioStreams = buildUnnamed616(); | 5147 o.audioStreams = buildUnnamed615(); |
| 5112 o.bitrateBps = "foo"; | 5148 o.bitrateBps = "foo"; |
| 5113 o.container = "foo"; | 5149 o.container = "foo"; |
| 5114 o.creationTime = "foo"; | 5150 o.creationTime = "foo"; |
| 5115 o.durationMs = "foo"; | 5151 o.durationMs = "foo"; |
| 5116 o.fileName = "foo"; | 5152 o.fileName = "foo"; |
| 5117 o.fileSize = "foo"; | 5153 o.fileSize = "foo"; |
| 5118 o.fileType = "foo"; | 5154 o.fileType = "foo"; |
| 5119 o.videoStreams = buildUnnamed617(); | 5155 o.videoStreams = buildUnnamed616(); |
| 5120 } | 5156 } |
| 5121 buildCounterVideoFileDetails--; | 5157 buildCounterVideoFileDetails--; |
| 5122 return o; | 5158 return o; |
| 5123 } | 5159 } |
| 5124 | 5160 |
| 5125 checkVideoFileDetails(api.VideoFileDetails o) { | 5161 checkVideoFileDetails(api.VideoFileDetails o) { |
| 5126 buildCounterVideoFileDetails++; | 5162 buildCounterVideoFileDetails++; |
| 5127 if (buildCounterVideoFileDetails < 3) { | 5163 if (buildCounterVideoFileDetails < 3) { |
| 5128 checkUnnamed616(o.audioStreams); | 5164 checkUnnamed615(o.audioStreams); |
| 5129 unittest.expect(o.bitrateBps, unittest.equals('foo')); | 5165 unittest.expect(o.bitrateBps, unittest.equals('foo')); |
| 5130 unittest.expect(o.container, unittest.equals('foo')); | 5166 unittest.expect(o.container, unittest.equals('foo')); |
| 5131 unittest.expect(o.creationTime, unittest.equals('foo')); | 5167 unittest.expect(o.creationTime, unittest.equals('foo')); |
| 5132 unittest.expect(o.durationMs, unittest.equals('foo')); | 5168 unittest.expect(o.durationMs, unittest.equals('foo')); |
| 5133 unittest.expect(o.fileName, unittest.equals('foo')); | 5169 unittest.expect(o.fileName, unittest.equals('foo')); |
| 5134 unittest.expect(o.fileSize, unittest.equals('foo')); | 5170 unittest.expect(o.fileSize, unittest.equals('foo')); |
| 5135 unittest.expect(o.fileType, unittest.equals('foo')); | 5171 unittest.expect(o.fileType, unittest.equals('foo')); |
| 5136 checkUnnamed617(o.videoStreams); | 5172 checkUnnamed616(o.videoStreams); |
| 5137 } | 5173 } |
| 5138 buildCounterVideoFileDetails--; | 5174 buildCounterVideoFileDetails--; |
| 5139 } | 5175 } |
| 5140 | 5176 |
| 5141 core.int buildCounterVideoFileDetailsAudioStream = 0; | 5177 core.int buildCounterVideoFileDetailsAudioStream = 0; |
| 5142 buildVideoFileDetailsAudioStream() { | 5178 buildVideoFileDetailsAudioStream() { |
| 5143 var o = new api.VideoFileDetailsAudioStream(); | 5179 var o = new api.VideoFileDetailsAudioStream(); |
| 5144 buildCounterVideoFileDetailsAudioStream++; | 5180 buildCounterVideoFileDetailsAudioStream++; |
| 5145 if (buildCounterVideoFileDetailsAudioStream < 3) { | 5181 if (buildCounterVideoFileDetailsAudioStream < 3) { |
| 5146 o.bitrateBps = "foo"; | 5182 o.bitrateBps = "foo"; |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5189 unittest.expect(o.codec, unittest.equals('foo')); | 5225 unittest.expect(o.codec, unittest.equals('foo')); |
| 5190 unittest.expect(o.frameRateFps, unittest.equals(42.0)); | 5226 unittest.expect(o.frameRateFps, unittest.equals(42.0)); |
| 5191 unittest.expect(o.heightPixels, unittest.equals(42)); | 5227 unittest.expect(o.heightPixels, unittest.equals(42)); |
| 5192 unittest.expect(o.rotation, unittest.equals('foo')); | 5228 unittest.expect(o.rotation, unittest.equals('foo')); |
| 5193 unittest.expect(o.vendor, unittest.equals('foo')); | 5229 unittest.expect(o.vendor, unittest.equals('foo')); |
| 5194 unittest.expect(o.widthPixels, unittest.equals(42)); | 5230 unittest.expect(o.widthPixels, unittest.equals(42)); |
| 5195 } | 5231 } |
| 5196 buildCounterVideoFileDetailsVideoStream--; | 5232 buildCounterVideoFileDetailsVideoStream--; |
| 5197 } | 5233 } |
| 5198 | 5234 |
| 5199 buildUnnamed618() { | 5235 buildUnnamed617() { |
| 5200 var o = new core.List<api.VideoRating>(); | 5236 var o = new core.List<api.VideoRating>(); |
| 5201 o.add(buildVideoRating()); | 5237 o.add(buildVideoRating()); |
| 5202 o.add(buildVideoRating()); | 5238 o.add(buildVideoRating()); |
| 5203 return o; | 5239 return o; |
| 5204 } | 5240 } |
| 5205 | 5241 |
| 5206 checkUnnamed618(core.List<api.VideoRating> o) { | 5242 checkUnnamed617(core.List<api.VideoRating> o) { |
| 5207 unittest.expect(o, unittest.hasLength(2)); | 5243 unittest.expect(o, unittest.hasLength(2)); |
| 5208 checkVideoRating(o[0]); | 5244 checkVideoRating(o[0]); |
| 5209 checkVideoRating(o[1]); | 5245 checkVideoRating(o[1]); |
| 5210 } | 5246 } |
| 5211 | 5247 |
| 5212 core.int buildCounterVideoGetRatingResponse = 0; | 5248 core.int buildCounterVideoGetRatingResponse = 0; |
| 5213 buildVideoGetRatingResponse() { | 5249 buildVideoGetRatingResponse() { |
| 5214 var o = new api.VideoGetRatingResponse(); | 5250 var o = new api.VideoGetRatingResponse(); |
| 5215 buildCounterVideoGetRatingResponse++; | 5251 buildCounterVideoGetRatingResponse++; |
| 5216 if (buildCounterVideoGetRatingResponse < 3) { | 5252 if (buildCounterVideoGetRatingResponse < 3) { |
| 5217 o.etag = "foo"; | 5253 o.etag = "foo"; |
| 5218 o.eventId = "foo"; | 5254 o.eventId = "foo"; |
| 5219 o.items = buildUnnamed618(); | 5255 o.items = buildUnnamed617(); |
| 5220 o.kind = "foo"; | 5256 o.kind = "foo"; |
| 5221 o.visitorId = "foo"; | 5257 o.visitorId = "foo"; |
| 5222 } | 5258 } |
| 5223 buildCounterVideoGetRatingResponse--; | 5259 buildCounterVideoGetRatingResponse--; |
| 5224 return o; | 5260 return o; |
| 5225 } | 5261 } |
| 5226 | 5262 |
| 5227 checkVideoGetRatingResponse(api.VideoGetRatingResponse o) { | 5263 checkVideoGetRatingResponse(api.VideoGetRatingResponse o) { |
| 5228 buildCounterVideoGetRatingResponse++; | 5264 buildCounterVideoGetRatingResponse++; |
| 5229 if (buildCounterVideoGetRatingResponse < 3) { | 5265 if (buildCounterVideoGetRatingResponse < 3) { |
| 5230 unittest.expect(o.etag, unittest.equals('foo')); | 5266 unittest.expect(o.etag, unittest.equals('foo')); |
| 5231 unittest.expect(o.eventId, unittest.equals('foo')); | 5267 unittest.expect(o.eventId, unittest.equals('foo')); |
| 5232 checkUnnamed618(o.items); | 5268 checkUnnamed617(o.items); |
| 5233 unittest.expect(o.kind, unittest.equals('foo')); | 5269 unittest.expect(o.kind, unittest.equals('foo')); |
| 5234 unittest.expect(o.visitorId, unittest.equals('foo')); | 5270 unittest.expect(o.visitorId, unittest.equals('foo')); |
| 5235 } | 5271 } |
| 5236 buildCounterVideoGetRatingResponse--; | 5272 buildCounterVideoGetRatingResponse--; |
| 5237 } | 5273 } |
| 5238 | 5274 |
| 5239 buildUnnamed619() { | 5275 buildUnnamed618() { |
| 5240 var o = new core.List<api.Video>(); | 5276 var o = new core.List<api.Video>(); |
| 5241 o.add(buildVideo()); | 5277 o.add(buildVideo()); |
| 5242 o.add(buildVideo()); | 5278 o.add(buildVideo()); |
| 5243 return o; | 5279 return o; |
| 5244 } | 5280 } |
| 5245 | 5281 |
| 5246 checkUnnamed619(core.List<api.Video> o) { | 5282 checkUnnamed618(core.List<api.Video> o) { |
| 5247 unittest.expect(o, unittest.hasLength(2)); | 5283 unittest.expect(o, unittest.hasLength(2)); |
| 5248 checkVideo(o[0]); | 5284 checkVideo(o[0]); |
| 5249 checkVideo(o[1]); | 5285 checkVideo(o[1]); |
| 5250 } | 5286 } |
| 5251 | 5287 |
| 5252 core.int buildCounterVideoListResponse = 0; | 5288 core.int buildCounterVideoListResponse = 0; |
| 5253 buildVideoListResponse() { | 5289 buildVideoListResponse() { |
| 5254 var o = new api.VideoListResponse(); | 5290 var o = new api.VideoListResponse(); |
| 5255 buildCounterVideoListResponse++; | 5291 buildCounterVideoListResponse++; |
| 5256 if (buildCounterVideoListResponse < 3) { | 5292 if (buildCounterVideoListResponse < 3) { |
| 5257 o.etag = "foo"; | 5293 o.etag = "foo"; |
| 5258 o.eventId = "foo"; | 5294 o.eventId = "foo"; |
| 5259 o.items = buildUnnamed619(); | 5295 o.items = buildUnnamed618(); |
| 5260 o.kind = "foo"; | 5296 o.kind = "foo"; |
| 5261 o.nextPageToken = "foo"; | 5297 o.nextPageToken = "foo"; |
| 5262 o.pageInfo = buildPageInfo(); | 5298 o.pageInfo = buildPageInfo(); |
| 5263 o.prevPageToken = "foo"; | 5299 o.prevPageToken = "foo"; |
| 5264 o.tokenPagination = buildTokenPagination(); | 5300 o.tokenPagination = buildTokenPagination(); |
| 5265 o.visitorId = "foo"; | 5301 o.visitorId = "foo"; |
| 5266 } | 5302 } |
| 5267 buildCounterVideoListResponse--; | 5303 buildCounterVideoListResponse--; |
| 5268 return o; | 5304 return o; |
| 5269 } | 5305 } |
| 5270 | 5306 |
| 5271 checkVideoListResponse(api.VideoListResponse o) { | 5307 checkVideoListResponse(api.VideoListResponse o) { |
| 5272 buildCounterVideoListResponse++; | 5308 buildCounterVideoListResponse++; |
| 5273 if (buildCounterVideoListResponse < 3) { | 5309 if (buildCounterVideoListResponse < 3) { |
| 5274 unittest.expect(o.etag, unittest.equals('foo')); | 5310 unittest.expect(o.etag, unittest.equals('foo')); |
| 5275 unittest.expect(o.eventId, unittest.equals('foo')); | 5311 unittest.expect(o.eventId, unittest.equals('foo')); |
| 5276 checkUnnamed619(o.items); | 5312 checkUnnamed618(o.items); |
| 5277 unittest.expect(o.kind, unittest.equals('foo')); | 5313 unittest.expect(o.kind, unittest.equals('foo')); |
| 5278 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 5314 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 5279 checkPageInfo(o.pageInfo); | 5315 checkPageInfo(o.pageInfo); |
| 5280 unittest.expect(o.prevPageToken, unittest.equals('foo')); | 5316 unittest.expect(o.prevPageToken, unittest.equals('foo')); |
| 5281 checkTokenPagination(o.tokenPagination); | 5317 checkTokenPagination(o.tokenPagination); |
| 5282 unittest.expect(o.visitorId, unittest.equals('foo')); | 5318 unittest.expect(o.visitorId, unittest.equals('foo')); |
| 5283 } | 5319 } |
| 5284 buildCounterVideoListResponse--; | 5320 buildCounterVideoListResponse--; |
| 5285 } | 5321 } |
| 5286 | 5322 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 5297 o.scheduledStartTime = core.DateTime.parse("2002-02-27T14:01:02"); | 5333 o.scheduledStartTime = core.DateTime.parse("2002-02-27T14:01:02"); |
| 5298 } | 5334 } |
| 5299 buildCounterVideoLiveStreamingDetails--; | 5335 buildCounterVideoLiveStreamingDetails--; |
| 5300 return o; | 5336 return o; |
| 5301 } | 5337 } |
| 5302 | 5338 |
| 5303 checkVideoLiveStreamingDetails(api.VideoLiveStreamingDetails o) { | 5339 checkVideoLiveStreamingDetails(api.VideoLiveStreamingDetails o) { |
| 5304 buildCounterVideoLiveStreamingDetails++; | 5340 buildCounterVideoLiveStreamingDetails++; |
| 5305 if (buildCounterVideoLiveStreamingDetails < 3) { | 5341 if (buildCounterVideoLiveStreamingDetails < 3) { |
| 5306 unittest.expect(o.activeLiveChatId, unittest.equals('foo')); | 5342 unittest.expect(o.activeLiveChatId, unittest.equals('foo')); |
| 5307 unittest.expect(o.actualEndTime, unittest.equals(core.DateTime.parse("2002-0
2-27T14:01:02"))); | 5343 unittest.expect(o.actualEndTime, |
| 5308 unittest.expect(o.actualStartTime, unittest.equals(core.DateTime.parse("2002
-02-27T14:01:02"))); | 5344 unittest.equals(core.DateTime.parse("2002-02-27T14:01:02"))); |
| 5345 unittest.expect(o.actualStartTime, |
| 5346 unittest.equals(core.DateTime.parse("2002-02-27T14:01:02"))); |
| 5309 unittest.expect(o.concurrentViewers, unittest.equals('foo')); | 5347 unittest.expect(o.concurrentViewers, unittest.equals('foo')); |
| 5310 unittest.expect(o.scheduledEndTime, unittest.equals(core.DateTime.parse("200
2-02-27T14:01:02"))); | 5348 unittest.expect(o.scheduledEndTime, |
| 5311 unittest.expect(o.scheduledStartTime, unittest.equals(core.DateTime.parse("2
002-02-27T14:01:02"))); | 5349 unittest.equals(core.DateTime.parse("2002-02-27T14:01:02"))); |
| 5350 unittest.expect(o.scheduledStartTime, |
| 5351 unittest.equals(core.DateTime.parse("2002-02-27T14:01:02"))); |
| 5312 } | 5352 } |
| 5313 buildCounterVideoLiveStreamingDetails--; | 5353 buildCounterVideoLiveStreamingDetails--; |
| 5314 } | 5354 } |
| 5315 | 5355 |
| 5316 core.int buildCounterVideoLocalization = 0; | 5356 core.int buildCounterVideoLocalization = 0; |
| 5317 buildVideoLocalization() { | 5357 buildVideoLocalization() { |
| 5318 var o = new api.VideoLocalization(); | 5358 var o = new api.VideoLocalization(); |
| 5319 buildCounterVideoLocalization++; | 5359 buildCounterVideoLocalization++; |
| 5320 if (buildCounterVideoLocalization < 3) { | 5360 if (buildCounterVideoLocalization < 3) { |
| 5321 o.description = "foo"; | 5361 o.description = "foo"; |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5415 buildCounterVideoProcessingDetailsProcessingProgress++; | 5455 buildCounterVideoProcessingDetailsProcessingProgress++; |
| 5416 if (buildCounterVideoProcessingDetailsProcessingProgress < 3) { | 5456 if (buildCounterVideoProcessingDetailsProcessingProgress < 3) { |
| 5417 o.partsProcessed = "foo"; | 5457 o.partsProcessed = "foo"; |
| 5418 o.partsTotal = "foo"; | 5458 o.partsTotal = "foo"; |
| 5419 o.timeLeftMs = "foo"; | 5459 o.timeLeftMs = "foo"; |
| 5420 } | 5460 } |
| 5421 buildCounterVideoProcessingDetailsProcessingProgress--; | 5461 buildCounterVideoProcessingDetailsProcessingProgress--; |
| 5422 return o; | 5462 return o; |
| 5423 } | 5463 } |
| 5424 | 5464 |
| 5425 checkVideoProcessingDetailsProcessingProgress(api.VideoProcessingDetailsProcessi
ngProgress o) { | 5465 checkVideoProcessingDetailsProcessingProgress( |
| 5466 api.VideoProcessingDetailsProcessingProgress o) { |
| 5426 buildCounterVideoProcessingDetailsProcessingProgress++; | 5467 buildCounterVideoProcessingDetailsProcessingProgress++; |
| 5427 if (buildCounterVideoProcessingDetailsProcessingProgress < 3) { | 5468 if (buildCounterVideoProcessingDetailsProcessingProgress < 3) { |
| 5428 unittest.expect(o.partsProcessed, unittest.equals('foo')); | 5469 unittest.expect(o.partsProcessed, unittest.equals('foo')); |
| 5429 unittest.expect(o.partsTotal, unittest.equals('foo')); | 5470 unittest.expect(o.partsTotal, unittest.equals('foo')); |
| 5430 unittest.expect(o.timeLeftMs, unittest.equals('foo')); | 5471 unittest.expect(o.timeLeftMs, unittest.equals('foo')); |
| 5431 } | 5472 } |
| 5432 buildCounterVideoProcessingDetailsProcessingProgress--; | 5473 buildCounterVideoProcessingDetailsProcessingProgress--; |
| 5433 } | 5474 } |
| 5434 | 5475 |
| 5435 buildUnnamed620() { | 5476 buildUnnamed619() { |
| 5436 var o = new core.List<core.String>(); | 5477 var o = new core.List<core.String>(); |
| 5437 o.add("foo"); | 5478 o.add("foo"); |
| 5438 o.add("foo"); | 5479 o.add("foo"); |
| 5439 return o; | 5480 return o; |
| 5440 } | 5481 } |
| 5441 | 5482 |
| 5442 checkUnnamed620(core.List<core.String> o) { | 5483 checkUnnamed619(core.List<core.String> o) { |
| 5443 unittest.expect(o, unittest.hasLength(2)); | 5484 unittest.expect(o, unittest.hasLength(2)); |
| 5444 unittest.expect(o[0], unittest.equals('foo')); | 5485 unittest.expect(o[0], unittest.equals('foo')); |
| 5445 unittest.expect(o[1], unittest.equals('foo')); | 5486 unittest.expect(o[1], unittest.equals('foo')); |
| 5446 } | 5487 } |
| 5447 | 5488 |
| 5448 core.int buildCounterVideoProjectDetails = 0; | 5489 core.int buildCounterVideoProjectDetails = 0; |
| 5449 buildVideoProjectDetails() { | 5490 buildVideoProjectDetails() { |
| 5450 var o = new api.VideoProjectDetails(); | 5491 var o = new api.VideoProjectDetails(); |
| 5451 buildCounterVideoProjectDetails++; | 5492 buildCounterVideoProjectDetails++; |
| 5452 if (buildCounterVideoProjectDetails < 3) { | 5493 if (buildCounterVideoProjectDetails < 3) { |
| 5453 o.tags = buildUnnamed620(); | 5494 o.tags = buildUnnamed619(); |
| 5454 } | 5495 } |
| 5455 buildCounterVideoProjectDetails--; | 5496 buildCounterVideoProjectDetails--; |
| 5456 return o; | 5497 return o; |
| 5457 } | 5498 } |
| 5458 | 5499 |
| 5459 checkVideoProjectDetails(api.VideoProjectDetails o) { | 5500 checkVideoProjectDetails(api.VideoProjectDetails o) { |
| 5460 buildCounterVideoProjectDetails++; | 5501 buildCounterVideoProjectDetails++; |
| 5461 if (buildCounterVideoProjectDetails < 3) { | 5502 if (buildCounterVideoProjectDetails < 3) { |
| 5462 checkUnnamed620(o.tags); | 5503 checkUnnamed619(o.tags); |
| 5463 } | 5504 } |
| 5464 buildCounterVideoProjectDetails--; | 5505 buildCounterVideoProjectDetails--; |
| 5465 } | 5506 } |
| 5466 | 5507 |
| 5467 core.int buildCounterVideoRating = 0; | 5508 core.int buildCounterVideoRating = 0; |
| 5468 buildVideoRating() { | 5509 buildVideoRating() { |
| 5469 var o = new api.VideoRating(); | 5510 var o = new api.VideoRating(); |
| 5470 buildCounterVideoRating++; | 5511 buildCounterVideoRating++; |
| 5471 if (buildCounterVideoRating < 3) { | 5512 if (buildCounterVideoRating < 3) { |
| 5472 o.rating = "foo"; | 5513 o.rating = "foo"; |
| (...skipping 23 matching lines...) Expand all Loading... |
| 5496 } | 5537 } |
| 5497 buildCounterVideoRecordingDetails--; | 5538 buildCounterVideoRecordingDetails--; |
| 5498 return o; | 5539 return o; |
| 5499 } | 5540 } |
| 5500 | 5541 |
| 5501 checkVideoRecordingDetails(api.VideoRecordingDetails o) { | 5542 checkVideoRecordingDetails(api.VideoRecordingDetails o) { |
| 5502 buildCounterVideoRecordingDetails++; | 5543 buildCounterVideoRecordingDetails++; |
| 5503 if (buildCounterVideoRecordingDetails < 3) { | 5544 if (buildCounterVideoRecordingDetails < 3) { |
| 5504 checkGeoPoint(o.location); | 5545 checkGeoPoint(o.location); |
| 5505 unittest.expect(o.locationDescription, unittest.equals('foo')); | 5546 unittest.expect(o.locationDescription, unittest.equals('foo')); |
| 5506 unittest.expect(o.recordingDate, unittest.equals(core.DateTime.parse("2002-0
2-27T14:01:02"))); | 5547 unittest.expect(o.recordingDate, |
| 5548 unittest.equals(core.DateTime.parse("2002-02-27T14:01:02"))); |
| 5507 } | 5549 } |
| 5508 buildCounterVideoRecordingDetails--; | 5550 buildCounterVideoRecordingDetails--; |
| 5509 } | 5551 } |
| 5510 | 5552 |
| 5511 buildUnnamed621() { | 5553 buildUnnamed620() { |
| 5512 var o = new core.List<core.String>(); | 5554 var o = new core.List<core.String>(); |
| 5513 o.add("foo"); | 5555 o.add("foo"); |
| 5514 o.add("foo"); | 5556 o.add("foo"); |
| 5515 return o; | 5557 return o; |
| 5516 } | 5558 } |
| 5517 | 5559 |
| 5518 checkUnnamed621(core.List<core.String> o) { | 5560 checkUnnamed620(core.List<core.String> o) { |
| 5519 unittest.expect(o, unittest.hasLength(2)); | 5561 unittest.expect(o, unittest.hasLength(2)); |
| 5520 unittest.expect(o[0], unittest.equals('foo')); | 5562 unittest.expect(o[0], unittest.equals('foo')); |
| 5521 unittest.expect(o[1], unittest.equals('foo')); | 5563 unittest.expect(o[1], unittest.equals('foo')); |
| 5522 } | 5564 } |
| 5523 | 5565 |
| 5524 core.int buildCounterVideoSnippet = 0; | 5566 core.int buildCounterVideoSnippet = 0; |
| 5525 buildVideoSnippet() { | 5567 buildVideoSnippet() { |
| 5526 var o = new api.VideoSnippet(); | 5568 var o = new api.VideoSnippet(); |
| 5527 buildCounterVideoSnippet++; | 5569 buildCounterVideoSnippet++; |
| 5528 if (buildCounterVideoSnippet < 3) { | 5570 if (buildCounterVideoSnippet < 3) { |
| 5529 o.categoryId = "foo"; | 5571 o.categoryId = "foo"; |
| 5530 o.channelId = "foo"; | 5572 o.channelId = "foo"; |
| 5531 o.channelTitle = "foo"; | 5573 o.channelTitle = "foo"; |
| 5532 o.defaultAudioLanguage = "foo"; | 5574 o.defaultAudioLanguage = "foo"; |
| 5533 o.defaultLanguage = "foo"; | 5575 o.defaultLanguage = "foo"; |
| 5534 o.description = "foo"; | 5576 o.description = "foo"; |
| 5535 o.liveBroadcastContent = "foo"; | 5577 o.liveBroadcastContent = "foo"; |
| 5536 o.localized = buildVideoLocalization(); | 5578 o.localized = buildVideoLocalization(); |
| 5537 o.publishedAt = core.DateTime.parse("2002-02-27T14:01:02"); | 5579 o.publishedAt = core.DateTime.parse("2002-02-27T14:01:02"); |
| 5538 o.tags = buildUnnamed621(); | 5580 o.tags = buildUnnamed620(); |
| 5539 o.thumbnails = buildThumbnailDetails(); | 5581 o.thumbnails = buildThumbnailDetails(); |
| 5540 o.title = "foo"; | 5582 o.title = "foo"; |
| 5541 } | 5583 } |
| 5542 buildCounterVideoSnippet--; | 5584 buildCounterVideoSnippet--; |
| 5543 return o; | 5585 return o; |
| 5544 } | 5586 } |
| 5545 | 5587 |
| 5546 checkVideoSnippet(api.VideoSnippet o) { | 5588 checkVideoSnippet(api.VideoSnippet o) { |
| 5547 buildCounterVideoSnippet++; | 5589 buildCounterVideoSnippet++; |
| 5548 if (buildCounterVideoSnippet < 3) { | 5590 if (buildCounterVideoSnippet < 3) { |
| 5549 unittest.expect(o.categoryId, unittest.equals('foo')); | 5591 unittest.expect(o.categoryId, unittest.equals('foo')); |
| 5550 unittest.expect(o.channelId, unittest.equals('foo')); | 5592 unittest.expect(o.channelId, unittest.equals('foo')); |
| 5551 unittest.expect(o.channelTitle, unittest.equals('foo')); | 5593 unittest.expect(o.channelTitle, unittest.equals('foo')); |
| 5552 unittest.expect(o.defaultAudioLanguage, unittest.equals('foo')); | 5594 unittest.expect(o.defaultAudioLanguage, unittest.equals('foo')); |
| 5553 unittest.expect(o.defaultLanguage, unittest.equals('foo')); | 5595 unittest.expect(o.defaultLanguage, unittest.equals('foo')); |
| 5554 unittest.expect(o.description, unittest.equals('foo')); | 5596 unittest.expect(o.description, unittest.equals('foo')); |
| 5555 unittest.expect(o.liveBroadcastContent, unittest.equals('foo')); | 5597 unittest.expect(o.liveBroadcastContent, unittest.equals('foo')); |
| 5556 checkVideoLocalization(o.localized); | 5598 checkVideoLocalization(o.localized); |
| 5557 unittest.expect(o.publishedAt, unittest.equals(core.DateTime.parse("2002-02-
27T14:01:02"))); | 5599 unittest.expect(o.publishedAt, |
| 5558 checkUnnamed621(o.tags); | 5600 unittest.equals(core.DateTime.parse("2002-02-27T14:01:02"))); |
| 5601 checkUnnamed620(o.tags); |
| 5559 checkThumbnailDetails(o.thumbnails); | 5602 checkThumbnailDetails(o.thumbnails); |
| 5560 unittest.expect(o.title, unittest.equals('foo')); | 5603 unittest.expect(o.title, unittest.equals('foo')); |
| 5561 } | 5604 } |
| 5562 buildCounterVideoSnippet--; | 5605 buildCounterVideoSnippet--; |
| 5563 } | 5606 } |
| 5564 | 5607 |
| 5565 core.int buildCounterVideoStatistics = 0; | 5608 core.int buildCounterVideoStatistics = 0; |
| 5566 buildVideoStatistics() { | 5609 buildVideoStatistics() { |
| 5567 var o = new api.VideoStatistics(); | 5610 var o = new api.VideoStatistics(); |
| 5568 buildCounterVideoStatistics++; | 5611 buildCounterVideoStatistics++; |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5608 } | 5651 } |
| 5609 | 5652 |
| 5610 checkVideoStatus(api.VideoStatus o) { | 5653 checkVideoStatus(api.VideoStatus o) { |
| 5611 buildCounterVideoStatus++; | 5654 buildCounterVideoStatus++; |
| 5612 if (buildCounterVideoStatus < 3) { | 5655 if (buildCounterVideoStatus < 3) { |
| 5613 unittest.expect(o.embeddable, unittest.isTrue); | 5656 unittest.expect(o.embeddable, unittest.isTrue); |
| 5614 unittest.expect(o.failureReason, unittest.equals('foo')); | 5657 unittest.expect(o.failureReason, unittest.equals('foo')); |
| 5615 unittest.expect(o.license, unittest.equals('foo')); | 5658 unittest.expect(o.license, unittest.equals('foo')); |
| 5616 unittest.expect(o.privacyStatus, unittest.equals('foo')); | 5659 unittest.expect(o.privacyStatus, unittest.equals('foo')); |
| 5617 unittest.expect(o.publicStatsViewable, unittest.isTrue); | 5660 unittest.expect(o.publicStatsViewable, unittest.isTrue); |
| 5618 unittest.expect(o.publishAt, unittest.equals(core.DateTime.parse("2002-02-27
T14:01:02"))); | 5661 unittest.expect(o.publishAt, |
| 5662 unittest.equals(core.DateTime.parse("2002-02-27T14:01:02"))); |
| 5619 unittest.expect(o.rejectionReason, unittest.equals('foo')); | 5663 unittest.expect(o.rejectionReason, unittest.equals('foo')); |
| 5620 unittest.expect(o.uploadStatus, unittest.equals('foo')); | 5664 unittest.expect(o.uploadStatus, unittest.equals('foo')); |
| 5621 } | 5665 } |
| 5622 buildCounterVideoStatus--; | 5666 buildCounterVideoStatus--; |
| 5623 } | 5667 } |
| 5624 | 5668 |
| 5669 buildUnnamed621() { |
| 5670 var o = new core.List<core.String>(); |
| 5671 o.add("foo"); |
| 5672 o.add("foo"); |
| 5673 return o; |
| 5674 } |
| 5675 |
| 5676 checkUnnamed621(core.List<core.String> o) { |
| 5677 unittest.expect(o, unittest.hasLength(2)); |
| 5678 unittest.expect(o[0], unittest.equals('foo')); |
| 5679 unittest.expect(o[1], unittest.equals('foo')); |
| 5680 } |
| 5681 |
| 5625 buildUnnamed622() { | 5682 buildUnnamed622() { |
| 5626 var o = new core.List<core.String>(); | 5683 var o = new core.List<core.String>(); |
| 5627 o.add("foo"); | 5684 o.add("foo"); |
| 5628 o.add("foo"); | 5685 o.add("foo"); |
| 5629 return o; | 5686 return o; |
| 5630 } | 5687 } |
| 5631 | 5688 |
| 5632 checkUnnamed622(core.List<core.String> o) { | 5689 checkUnnamed622(core.List<core.String> o) { |
| 5633 unittest.expect(o, unittest.hasLength(2)); | 5690 unittest.expect(o, unittest.hasLength(2)); |
| 5634 unittest.expect(o[0], unittest.equals('foo')); | 5691 unittest.expect(o[0], unittest.equals('foo')); |
| (...skipping 20 matching lines...) Expand all Loading... |
| 5655 return o; | 5712 return o; |
| 5656 } | 5713 } |
| 5657 | 5714 |
| 5658 checkUnnamed624(core.List<core.String> o) { | 5715 checkUnnamed624(core.List<core.String> o) { |
| 5659 unittest.expect(o, unittest.hasLength(2)); | 5716 unittest.expect(o, unittest.hasLength(2)); |
| 5660 unittest.expect(o[0], unittest.equals('foo')); | 5717 unittest.expect(o[0], unittest.equals('foo')); |
| 5661 unittest.expect(o[1], unittest.equals('foo')); | 5718 unittest.expect(o[1], unittest.equals('foo')); |
| 5662 } | 5719 } |
| 5663 | 5720 |
| 5664 buildUnnamed625() { | 5721 buildUnnamed625() { |
| 5665 var o = new core.List<core.String>(); | |
| 5666 o.add("foo"); | |
| 5667 o.add("foo"); | |
| 5668 return o; | |
| 5669 } | |
| 5670 | |
| 5671 checkUnnamed625(core.List<core.String> o) { | |
| 5672 unittest.expect(o, unittest.hasLength(2)); | |
| 5673 unittest.expect(o[0], unittest.equals('foo')); | |
| 5674 unittest.expect(o[1], unittest.equals('foo')); | |
| 5675 } | |
| 5676 | |
| 5677 buildUnnamed626() { | |
| 5678 var o = new core.List<api.VideoSuggestionsTagSuggestion>(); | 5722 var o = new core.List<api.VideoSuggestionsTagSuggestion>(); |
| 5679 o.add(buildVideoSuggestionsTagSuggestion()); | 5723 o.add(buildVideoSuggestionsTagSuggestion()); |
| 5680 o.add(buildVideoSuggestionsTagSuggestion()); | 5724 o.add(buildVideoSuggestionsTagSuggestion()); |
| 5681 return o; | 5725 return o; |
| 5682 } | 5726 } |
| 5683 | 5727 |
| 5684 checkUnnamed626(core.List<api.VideoSuggestionsTagSuggestion> o) { | 5728 checkUnnamed625(core.List<api.VideoSuggestionsTagSuggestion> o) { |
| 5685 unittest.expect(o, unittest.hasLength(2)); | 5729 unittest.expect(o, unittest.hasLength(2)); |
| 5686 checkVideoSuggestionsTagSuggestion(o[0]); | 5730 checkVideoSuggestionsTagSuggestion(o[0]); |
| 5687 checkVideoSuggestionsTagSuggestion(o[1]); | 5731 checkVideoSuggestionsTagSuggestion(o[1]); |
| 5688 } | 5732 } |
| 5689 | 5733 |
| 5690 core.int buildCounterVideoSuggestions = 0; | 5734 core.int buildCounterVideoSuggestions = 0; |
| 5691 buildVideoSuggestions() { | 5735 buildVideoSuggestions() { |
| 5692 var o = new api.VideoSuggestions(); | 5736 var o = new api.VideoSuggestions(); |
| 5693 buildCounterVideoSuggestions++; | 5737 buildCounterVideoSuggestions++; |
| 5694 if (buildCounterVideoSuggestions < 3) { | 5738 if (buildCounterVideoSuggestions < 3) { |
| 5695 o.editorSuggestions = buildUnnamed622(); | 5739 o.editorSuggestions = buildUnnamed621(); |
| 5696 o.processingErrors = buildUnnamed623(); | 5740 o.processingErrors = buildUnnamed622(); |
| 5697 o.processingHints = buildUnnamed624(); | 5741 o.processingHints = buildUnnamed623(); |
| 5698 o.processingWarnings = buildUnnamed625(); | 5742 o.processingWarnings = buildUnnamed624(); |
| 5699 o.tagSuggestions = buildUnnamed626(); | 5743 o.tagSuggestions = buildUnnamed625(); |
| 5700 } | 5744 } |
| 5701 buildCounterVideoSuggestions--; | 5745 buildCounterVideoSuggestions--; |
| 5702 return o; | 5746 return o; |
| 5703 } | 5747 } |
| 5704 | 5748 |
| 5705 checkVideoSuggestions(api.VideoSuggestions o) { | 5749 checkVideoSuggestions(api.VideoSuggestions o) { |
| 5706 buildCounterVideoSuggestions++; | 5750 buildCounterVideoSuggestions++; |
| 5707 if (buildCounterVideoSuggestions < 3) { | 5751 if (buildCounterVideoSuggestions < 3) { |
| 5708 checkUnnamed622(o.editorSuggestions); | 5752 checkUnnamed621(o.editorSuggestions); |
| 5709 checkUnnamed623(o.processingErrors); | 5753 checkUnnamed622(o.processingErrors); |
| 5710 checkUnnamed624(o.processingHints); | 5754 checkUnnamed623(o.processingHints); |
| 5711 checkUnnamed625(o.processingWarnings); | 5755 checkUnnamed624(o.processingWarnings); |
| 5712 checkUnnamed626(o.tagSuggestions); | 5756 checkUnnamed625(o.tagSuggestions); |
| 5713 } | 5757 } |
| 5714 buildCounterVideoSuggestions--; | 5758 buildCounterVideoSuggestions--; |
| 5715 } | 5759 } |
| 5716 | 5760 |
| 5717 buildUnnamed627() { | 5761 buildUnnamed626() { |
| 5718 var o = new core.List<core.String>(); | 5762 var o = new core.List<core.String>(); |
| 5719 o.add("foo"); | 5763 o.add("foo"); |
| 5720 o.add("foo"); | 5764 o.add("foo"); |
| 5721 return o; | 5765 return o; |
| 5722 } | 5766 } |
| 5723 | 5767 |
| 5724 checkUnnamed627(core.List<core.String> o) { | 5768 checkUnnamed626(core.List<core.String> o) { |
| 5725 unittest.expect(o, unittest.hasLength(2)); | 5769 unittest.expect(o, unittest.hasLength(2)); |
| 5726 unittest.expect(o[0], unittest.equals('foo')); | 5770 unittest.expect(o[0], unittest.equals('foo')); |
| 5727 unittest.expect(o[1], unittest.equals('foo')); | 5771 unittest.expect(o[1], unittest.equals('foo')); |
| 5728 } | 5772 } |
| 5729 | 5773 |
| 5730 core.int buildCounterVideoSuggestionsTagSuggestion = 0; | 5774 core.int buildCounterVideoSuggestionsTagSuggestion = 0; |
| 5731 buildVideoSuggestionsTagSuggestion() { | 5775 buildVideoSuggestionsTagSuggestion() { |
| 5732 var o = new api.VideoSuggestionsTagSuggestion(); | 5776 var o = new api.VideoSuggestionsTagSuggestion(); |
| 5733 buildCounterVideoSuggestionsTagSuggestion++; | 5777 buildCounterVideoSuggestionsTagSuggestion++; |
| 5734 if (buildCounterVideoSuggestionsTagSuggestion < 3) { | 5778 if (buildCounterVideoSuggestionsTagSuggestion < 3) { |
| 5735 o.categoryRestricts = buildUnnamed627(); | 5779 o.categoryRestricts = buildUnnamed626(); |
| 5736 o.tag = "foo"; | 5780 o.tag = "foo"; |
| 5737 } | 5781 } |
| 5738 buildCounterVideoSuggestionsTagSuggestion--; | 5782 buildCounterVideoSuggestionsTagSuggestion--; |
| 5739 return o; | 5783 return o; |
| 5740 } | 5784 } |
| 5741 | 5785 |
| 5742 checkVideoSuggestionsTagSuggestion(api.VideoSuggestionsTagSuggestion o) { | 5786 checkVideoSuggestionsTagSuggestion(api.VideoSuggestionsTagSuggestion o) { |
| 5743 buildCounterVideoSuggestionsTagSuggestion++; | 5787 buildCounterVideoSuggestionsTagSuggestion++; |
| 5744 if (buildCounterVideoSuggestionsTagSuggestion < 3) { | 5788 if (buildCounterVideoSuggestionsTagSuggestion < 3) { |
| 5745 checkUnnamed627(o.categoryRestricts); | 5789 checkUnnamed626(o.categoryRestricts); |
| 5746 unittest.expect(o.tag, unittest.equals('foo')); | 5790 unittest.expect(o.tag, unittest.equals('foo')); |
| 5747 } | 5791 } |
| 5748 buildCounterVideoSuggestionsTagSuggestion--; | 5792 buildCounterVideoSuggestionsTagSuggestion--; |
| 5749 } | 5793 } |
| 5750 | 5794 |
| 5795 buildUnnamed627() { |
| 5796 var o = new core.List<core.String>(); |
| 5797 o.add("foo"); |
| 5798 o.add("foo"); |
| 5799 return o; |
| 5800 } |
| 5801 |
| 5802 checkUnnamed627(core.List<core.String> o) { |
| 5803 unittest.expect(o, unittest.hasLength(2)); |
| 5804 unittest.expect(o[0], unittest.equals('foo')); |
| 5805 unittest.expect(o[1], unittest.equals('foo')); |
| 5806 } |
| 5807 |
| 5751 buildUnnamed628() { | 5808 buildUnnamed628() { |
| 5752 var o = new core.List<core.String>(); | 5809 var o = new core.List<core.String>(); |
| 5753 o.add("foo"); | 5810 o.add("foo"); |
| 5754 o.add("foo"); | 5811 o.add("foo"); |
| 5755 return o; | 5812 return o; |
| 5756 } | 5813 } |
| 5757 | 5814 |
| 5758 checkUnnamed628(core.List<core.String> o) { | 5815 checkUnnamed628(core.List<core.String> o) { |
| 5759 unittest.expect(o, unittest.hasLength(2)); | 5816 unittest.expect(o, unittest.hasLength(2)); |
| 5760 unittest.expect(o[0], unittest.equals('foo')); | 5817 unittest.expect(o[0], unittest.equals('foo')); |
| 5761 unittest.expect(o[1], unittest.equals('foo')); | 5818 unittest.expect(o[1], unittest.equals('foo')); |
| 5762 } | 5819 } |
| 5763 | 5820 |
| 5764 buildUnnamed629() { | 5821 buildUnnamed629() { |
| 5765 var o = new core.List<core.String>(); | 5822 var o = new core.List<core.String>(); |
| 5766 o.add("foo"); | 5823 o.add("foo"); |
| 5767 o.add("foo"); | 5824 o.add("foo"); |
| 5768 return o; | 5825 return o; |
| 5769 } | 5826 } |
| 5770 | 5827 |
| 5771 checkUnnamed629(core.List<core.String> o) { | 5828 checkUnnamed629(core.List<core.String> o) { |
| 5772 unittest.expect(o, unittest.hasLength(2)); | 5829 unittest.expect(o, unittest.hasLength(2)); |
| 5773 unittest.expect(o[0], unittest.equals('foo')); | 5830 unittest.expect(o[0], unittest.equals('foo')); |
| 5774 unittest.expect(o[1], unittest.equals('foo')); | 5831 unittest.expect(o[1], unittest.equals('foo')); |
| 5775 } | |
| 5776 | |
| 5777 buildUnnamed630() { | |
| 5778 var o = new core.List<core.String>(); | |
| 5779 o.add("foo"); | |
| 5780 o.add("foo"); | |
| 5781 return o; | |
| 5782 } | |
| 5783 | |
| 5784 checkUnnamed630(core.List<core.String> o) { | |
| 5785 unittest.expect(o, unittest.hasLength(2)); | |
| 5786 unittest.expect(o[0], unittest.equals('foo')); | |
| 5787 unittest.expect(o[1], unittest.equals('foo')); | |
| 5788 } | 5832 } |
| 5789 | 5833 |
| 5790 core.int buildCounterVideoTopicDetails = 0; | 5834 core.int buildCounterVideoTopicDetails = 0; |
| 5791 buildVideoTopicDetails() { | 5835 buildVideoTopicDetails() { |
| 5792 var o = new api.VideoTopicDetails(); | 5836 var o = new api.VideoTopicDetails(); |
| 5793 buildCounterVideoTopicDetails++; | 5837 buildCounterVideoTopicDetails++; |
| 5794 if (buildCounterVideoTopicDetails < 3) { | 5838 if (buildCounterVideoTopicDetails < 3) { |
| 5795 o.relevantTopicIds = buildUnnamed628(); | 5839 o.relevantTopicIds = buildUnnamed627(); |
| 5796 o.topicCategories = buildUnnamed629(); | 5840 o.topicCategories = buildUnnamed628(); |
| 5797 o.topicIds = buildUnnamed630(); | 5841 o.topicIds = buildUnnamed629(); |
| 5798 } | 5842 } |
| 5799 buildCounterVideoTopicDetails--; | 5843 buildCounterVideoTopicDetails--; |
| 5800 return o; | 5844 return o; |
| 5801 } | 5845 } |
| 5802 | 5846 |
| 5803 checkVideoTopicDetails(api.VideoTopicDetails o) { | 5847 checkVideoTopicDetails(api.VideoTopicDetails o) { |
| 5804 buildCounterVideoTopicDetails++; | 5848 buildCounterVideoTopicDetails++; |
| 5805 if (buildCounterVideoTopicDetails < 3) { | 5849 if (buildCounterVideoTopicDetails < 3) { |
| 5806 checkUnnamed628(o.relevantTopicIds); | 5850 checkUnnamed627(o.relevantTopicIds); |
| 5807 checkUnnamed629(o.topicCategories); | 5851 checkUnnamed628(o.topicCategories); |
| 5808 checkUnnamed630(o.topicIds); | 5852 checkUnnamed629(o.topicIds); |
| 5809 } | 5853 } |
| 5810 buildCounterVideoTopicDetails--; | 5854 buildCounterVideoTopicDetails--; |
| 5811 } | 5855 } |
| 5812 | 5856 |
| 5813 core.int buildCounterWatchSettings = 0; | 5857 core.int buildCounterWatchSettings = 0; |
| 5814 buildWatchSettings() { | 5858 buildWatchSettings() { |
| 5815 var o = new api.WatchSettings(); | 5859 var o = new api.WatchSettings(); |
| 5816 buildCounterWatchSettings++; | 5860 buildCounterWatchSettings++; |
| 5817 if (buildCounterWatchSettings < 3) { | 5861 if (buildCounterWatchSettings < 3) { |
| 5818 o.backgroundColor = "foo"; | 5862 o.backgroundColor = "foo"; |
| 5819 o.featuredPlaylistId = "foo"; | 5863 o.featuredPlaylistId = "foo"; |
| 5820 o.textColor = "foo"; | 5864 o.textColor = "foo"; |
| 5821 } | 5865 } |
| 5822 buildCounterWatchSettings--; | 5866 buildCounterWatchSettings--; |
| 5823 return o; | 5867 return o; |
| 5824 } | 5868 } |
| 5825 | 5869 |
| 5826 checkWatchSettings(api.WatchSettings o) { | 5870 checkWatchSettings(api.WatchSettings o) { |
| 5827 buildCounterWatchSettings++; | 5871 buildCounterWatchSettings++; |
| 5828 if (buildCounterWatchSettings < 3) { | 5872 if (buildCounterWatchSettings < 3) { |
| 5829 unittest.expect(o.backgroundColor, unittest.equals('foo')); | 5873 unittest.expect(o.backgroundColor, unittest.equals('foo')); |
| 5830 unittest.expect(o.featuredPlaylistId, unittest.equals('foo')); | 5874 unittest.expect(o.featuredPlaylistId, unittest.equals('foo')); |
| 5831 unittest.expect(o.textColor, unittest.equals('foo')); | 5875 unittest.expect(o.textColor, unittest.equals('foo')); |
| 5832 } | 5876 } |
| 5833 buildCounterWatchSettings--; | 5877 buildCounterWatchSettings--; |
| 5834 } | 5878 } |
| 5835 | 5879 |
| 5836 | |
| 5837 main() { | 5880 main() { |
| 5838 unittest.group("obj-schema-AccessPolicy", () { | 5881 unittest.group("obj-schema-AccessPolicy", () { |
| 5839 unittest.test("to-json--from-json", () { | 5882 unittest.test("to-json--from-json", () { |
| 5840 var o = buildAccessPolicy(); | 5883 var o = buildAccessPolicy(); |
| 5841 var od = new api.AccessPolicy.fromJson(o.toJson()); | 5884 var od = new api.AccessPolicy.fromJson(o.toJson()); |
| 5842 checkAccessPolicy(od); | 5885 checkAccessPolicy(od); |
| 5843 }); | 5886 }); |
| 5844 }); | 5887 }); |
| 5845 | 5888 |
| 5846 | |
| 5847 unittest.group("obj-schema-Activity", () { | 5889 unittest.group("obj-schema-Activity", () { |
| 5848 unittest.test("to-json--from-json", () { | 5890 unittest.test("to-json--from-json", () { |
| 5849 var o = buildActivity(); | 5891 var o = buildActivity(); |
| 5850 var od = new api.Activity.fromJson(o.toJson()); | 5892 var od = new api.Activity.fromJson(o.toJson()); |
| 5851 checkActivity(od); | 5893 checkActivity(od); |
| 5852 }); | 5894 }); |
| 5853 }); | 5895 }); |
| 5854 | 5896 |
| 5855 | |
| 5856 unittest.group("obj-schema-ActivityContentDetails", () { | 5897 unittest.group("obj-schema-ActivityContentDetails", () { |
| 5857 unittest.test("to-json--from-json", () { | 5898 unittest.test("to-json--from-json", () { |
| 5858 var o = buildActivityContentDetails(); | 5899 var o = buildActivityContentDetails(); |
| 5859 var od = new api.ActivityContentDetails.fromJson(o.toJson()); | 5900 var od = new api.ActivityContentDetails.fromJson(o.toJson()); |
| 5860 checkActivityContentDetails(od); | 5901 checkActivityContentDetails(od); |
| 5861 }); | 5902 }); |
| 5862 }); | 5903 }); |
| 5863 | 5904 |
| 5864 | |
| 5865 unittest.group("obj-schema-ActivityContentDetailsBulletin", () { | 5905 unittest.group("obj-schema-ActivityContentDetailsBulletin", () { |
| 5866 unittest.test("to-json--from-json", () { | 5906 unittest.test("to-json--from-json", () { |
| 5867 var o = buildActivityContentDetailsBulletin(); | 5907 var o = buildActivityContentDetailsBulletin(); |
| 5868 var od = new api.ActivityContentDetailsBulletin.fromJson(o.toJson()); | 5908 var od = new api.ActivityContentDetailsBulletin.fromJson(o.toJson()); |
| 5869 checkActivityContentDetailsBulletin(od); | 5909 checkActivityContentDetailsBulletin(od); |
| 5870 }); | 5910 }); |
| 5871 }); | 5911 }); |
| 5872 | 5912 |
| 5873 | |
| 5874 unittest.group("obj-schema-ActivityContentDetailsChannelItem", () { | 5913 unittest.group("obj-schema-ActivityContentDetailsChannelItem", () { |
| 5875 unittest.test("to-json--from-json", () { | 5914 unittest.test("to-json--from-json", () { |
| 5876 var o = buildActivityContentDetailsChannelItem(); | 5915 var o = buildActivityContentDetailsChannelItem(); |
| 5877 var od = new api.ActivityContentDetailsChannelItem.fromJson(o.toJson()); | 5916 var od = new api.ActivityContentDetailsChannelItem.fromJson(o.toJson()); |
| 5878 checkActivityContentDetailsChannelItem(od); | 5917 checkActivityContentDetailsChannelItem(od); |
| 5879 }); | 5918 }); |
| 5880 }); | 5919 }); |
| 5881 | 5920 |
| 5882 | |
| 5883 unittest.group("obj-schema-ActivityContentDetailsComment", () { | 5921 unittest.group("obj-schema-ActivityContentDetailsComment", () { |
| 5884 unittest.test("to-json--from-json", () { | 5922 unittest.test("to-json--from-json", () { |
| 5885 var o = buildActivityContentDetailsComment(); | 5923 var o = buildActivityContentDetailsComment(); |
| 5886 var od = new api.ActivityContentDetailsComment.fromJson(o.toJson()); | 5924 var od = new api.ActivityContentDetailsComment.fromJson(o.toJson()); |
| 5887 checkActivityContentDetailsComment(od); | 5925 checkActivityContentDetailsComment(od); |
| 5888 }); | 5926 }); |
| 5889 }); | 5927 }); |
| 5890 | 5928 |
| 5891 | |
| 5892 unittest.group("obj-schema-ActivityContentDetailsFavorite", () { | 5929 unittest.group("obj-schema-ActivityContentDetailsFavorite", () { |
| 5893 unittest.test("to-json--from-json", () { | 5930 unittest.test("to-json--from-json", () { |
| 5894 var o = buildActivityContentDetailsFavorite(); | 5931 var o = buildActivityContentDetailsFavorite(); |
| 5895 var od = new api.ActivityContentDetailsFavorite.fromJson(o.toJson()); | 5932 var od = new api.ActivityContentDetailsFavorite.fromJson(o.toJson()); |
| 5896 checkActivityContentDetailsFavorite(od); | 5933 checkActivityContentDetailsFavorite(od); |
| 5897 }); | 5934 }); |
| 5898 }); | 5935 }); |
| 5899 | 5936 |
| 5900 | |
| 5901 unittest.group("obj-schema-ActivityContentDetailsLike", () { | 5937 unittest.group("obj-schema-ActivityContentDetailsLike", () { |
| 5902 unittest.test("to-json--from-json", () { | 5938 unittest.test("to-json--from-json", () { |
| 5903 var o = buildActivityContentDetailsLike(); | 5939 var o = buildActivityContentDetailsLike(); |
| 5904 var od = new api.ActivityContentDetailsLike.fromJson(o.toJson()); | 5940 var od = new api.ActivityContentDetailsLike.fromJson(o.toJson()); |
| 5905 checkActivityContentDetailsLike(od); | 5941 checkActivityContentDetailsLike(od); |
| 5906 }); | 5942 }); |
| 5907 }); | 5943 }); |
| 5908 | 5944 |
| 5909 | |
| 5910 unittest.group("obj-schema-ActivityContentDetailsPlaylistItem", () { | 5945 unittest.group("obj-schema-ActivityContentDetailsPlaylistItem", () { |
| 5911 unittest.test("to-json--from-json", () { | 5946 unittest.test("to-json--from-json", () { |
| 5912 var o = buildActivityContentDetailsPlaylistItem(); | 5947 var o = buildActivityContentDetailsPlaylistItem(); |
| 5913 var od = new api.ActivityContentDetailsPlaylistItem.fromJson(o.toJson()); | 5948 var od = new api.ActivityContentDetailsPlaylistItem.fromJson(o.toJson()); |
| 5914 checkActivityContentDetailsPlaylistItem(od); | 5949 checkActivityContentDetailsPlaylistItem(od); |
| 5915 }); | 5950 }); |
| 5916 }); | 5951 }); |
| 5917 | 5952 |
| 5918 | |
| 5919 unittest.group("obj-schema-ActivityContentDetailsPromotedItem", () { | 5953 unittest.group("obj-schema-ActivityContentDetailsPromotedItem", () { |
| 5920 unittest.test("to-json--from-json", () { | 5954 unittest.test("to-json--from-json", () { |
| 5921 var o = buildActivityContentDetailsPromotedItem(); | 5955 var o = buildActivityContentDetailsPromotedItem(); |
| 5922 var od = new api.ActivityContentDetailsPromotedItem.fromJson(o.toJson()); | 5956 var od = new api.ActivityContentDetailsPromotedItem.fromJson(o.toJson()); |
| 5923 checkActivityContentDetailsPromotedItem(od); | 5957 checkActivityContentDetailsPromotedItem(od); |
| 5924 }); | 5958 }); |
| 5925 }); | 5959 }); |
| 5926 | 5960 |
| 5927 | |
| 5928 unittest.group("obj-schema-ActivityContentDetailsRecommendation", () { | 5961 unittest.group("obj-schema-ActivityContentDetailsRecommendation", () { |
| 5929 unittest.test("to-json--from-json", () { | 5962 unittest.test("to-json--from-json", () { |
| 5930 var o = buildActivityContentDetailsRecommendation(); | 5963 var o = buildActivityContentDetailsRecommendation(); |
| 5931 var od = new api.ActivityContentDetailsRecommendation.fromJson(o.toJson())
; | 5964 var od = |
| 5965 new api.ActivityContentDetailsRecommendation.fromJson(o.toJson()); |
| 5932 checkActivityContentDetailsRecommendation(od); | 5966 checkActivityContentDetailsRecommendation(od); |
| 5933 }); | 5967 }); |
| 5934 }); | 5968 }); |
| 5935 | 5969 |
| 5936 | |
| 5937 unittest.group("obj-schema-ActivityContentDetailsSocial", () { | 5970 unittest.group("obj-schema-ActivityContentDetailsSocial", () { |
| 5938 unittest.test("to-json--from-json", () { | 5971 unittest.test("to-json--from-json", () { |
| 5939 var o = buildActivityContentDetailsSocial(); | 5972 var o = buildActivityContentDetailsSocial(); |
| 5940 var od = new api.ActivityContentDetailsSocial.fromJson(o.toJson()); | 5973 var od = new api.ActivityContentDetailsSocial.fromJson(o.toJson()); |
| 5941 checkActivityContentDetailsSocial(od); | 5974 checkActivityContentDetailsSocial(od); |
| 5942 }); | 5975 }); |
| 5943 }); | 5976 }); |
| 5944 | 5977 |
| 5945 | |
| 5946 unittest.group("obj-schema-ActivityContentDetailsSubscription", () { | 5978 unittest.group("obj-schema-ActivityContentDetailsSubscription", () { |
| 5947 unittest.test("to-json--from-json", () { | 5979 unittest.test("to-json--from-json", () { |
| 5948 var o = buildActivityContentDetailsSubscription(); | 5980 var o = buildActivityContentDetailsSubscription(); |
| 5949 var od = new api.ActivityContentDetailsSubscription.fromJson(o.toJson()); | 5981 var od = new api.ActivityContentDetailsSubscription.fromJson(o.toJson()); |
| 5950 checkActivityContentDetailsSubscription(od); | 5982 checkActivityContentDetailsSubscription(od); |
| 5951 }); | 5983 }); |
| 5952 }); | 5984 }); |
| 5953 | 5985 |
| 5954 | |
| 5955 unittest.group("obj-schema-ActivityContentDetailsUpload", () { | 5986 unittest.group("obj-schema-ActivityContentDetailsUpload", () { |
| 5956 unittest.test("to-json--from-json", () { | 5987 unittest.test("to-json--from-json", () { |
| 5957 var o = buildActivityContentDetailsUpload(); | 5988 var o = buildActivityContentDetailsUpload(); |
| 5958 var od = new api.ActivityContentDetailsUpload.fromJson(o.toJson()); | 5989 var od = new api.ActivityContentDetailsUpload.fromJson(o.toJson()); |
| 5959 checkActivityContentDetailsUpload(od); | 5990 checkActivityContentDetailsUpload(od); |
| 5960 }); | 5991 }); |
| 5961 }); | 5992 }); |
| 5962 | 5993 |
| 5963 | |
| 5964 unittest.group("obj-schema-ActivityListResponse", () { | 5994 unittest.group("obj-schema-ActivityListResponse", () { |
| 5965 unittest.test("to-json--from-json", () { | 5995 unittest.test("to-json--from-json", () { |
| 5966 var o = buildActivityListResponse(); | 5996 var o = buildActivityListResponse(); |
| 5967 var od = new api.ActivityListResponse.fromJson(o.toJson()); | 5997 var od = new api.ActivityListResponse.fromJson(o.toJson()); |
| 5968 checkActivityListResponse(od); | 5998 checkActivityListResponse(od); |
| 5969 }); | 5999 }); |
| 5970 }); | 6000 }); |
| 5971 | 6001 |
| 5972 | |
| 5973 unittest.group("obj-schema-ActivitySnippet", () { | 6002 unittest.group("obj-schema-ActivitySnippet", () { |
| 5974 unittest.test("to-json--from-json", () { | 6003 unittest.test("to-json--from-json", () { |
| 5975 var o = buildActivitySnippet(); | 6004 var o = buildActivitySnippet(); |
| 5976 var od = new api.ActivitySnippet.fromJson(o.toJson()); | 6005 var od = new api.ActivitySnippet.fromJson(o.toJson()); |
| 5977 checkActivitySnippet(od); | 6006 checkActivitySnippet(od); |
| 5978 }); | 6007 }); |
| 5979 }); | 6008 }); |
| 5980 | 6009 |
| 5981 | |
| 5982 unittest.group("obj-schema-Caption", () { | 6010 unittest.group("obj-schema-Caption", () { |
| 5983 unittest.test("to-json--from-json", () { | 6011 unittest.test("to-json--from-json", () { |
| 5984 var o = buildCaption(); | 6012 var o = buildCaption(); |
| 5985 var od = new api.Caption.fromJson(o.toJson()); | 6013 var od = new api.Caption.fromJson(o.toJson()); |
| 5986 checkCaption(od); | 6014 checkCaption(od); |
| 5987 }); | 6015 }); |
| 5988 }); | 6016 }); |
| 5989 | 6017 |
| 5990 | |
| 5991 unittest.group("obj-schema-CaptionListResponse", () { | 6018 unittest.group("obj-schema-CaptionListResponse", () { |
| 5992 unittest.test("to-json--from-json", () { | 6019 unittest.test("to-json--from-json", () { |
| 5993 var o = buildCaptionListResponse(); | 6020 var o = buildCaptionListResponse(); |
| 5994 var od = new api.CaptionListResponse.fromJson(o.toJson()); | 6021 var od = new api.CaptionListResponse.fromJson(o.toJson()); |
| 5995 checkCaptionListResponse(od); | 6022 checkCaptionListResponse(od); |
| 5996 }); | 6023 }); |
| 5997 }); | 6024 }); |
| 5998 | 6025 |
| 5999 | |
| 6000 unittest.group("obj-schema-CaptionSnippet", () { | 6026 unittest.group("obj-schema-CaptionSnippet", () { |
| 6001 unittest.test("to-json--from-json", () { | 6027 unittest.test("to-json--from-json", () { |
| 6002 var o = buildCaptionSnippet(); | 6028 var o = buildCaptionSnippet(); |
| 6003 var od = new api.CaptionSnippet.fromJson(o.toJson()); | 6029 var od = new api.CaptionSnippet.fromJson(o.toJson()); |
| 6004 checkCaptionSnippet(od); | 6030 checkCaptionSnippet(od); |
| 6005 }); | 6031 }); |
| 6006 }); | 6032 }); |
| 6007 | 6033 |
| 6008 | |
| 6009 unittest.group("obj-schema-CdnSettings", () { | 6034 unittest.group("obj-schema-CdnSettings", () { |
| 6010 unittest.test("to-json--from-json", () { | 6035 unittest.test("to-json--from-json", () { |
| 6011 var o = buildCdnSettings(); | 6036 var o = buildCdnSettings(); |
| 6012 var od = new api.CdnSettings.fromJson(o.toJson()); | 6037 var od = new api.CdnSettings.fromJson(o.toJson()); |
| 6013 checkCdnSettings(od); | 6038 checkCdnSettings(od); |
| 6014 }); | 6039 }); |
| 6015 }); | 6040 }); |
| 6016 | 6041 |
| 6017 | |
| 6018 unittest.group("obj-schema-Channel", () { | 6042 unittest.group("obj-schema-Channel", () { |
| 6019 unittest.test("to-json--from-json", () { | 6043 unittest.test("to-json--from-json", () { |
| 6020 var o = buildChannel(); | 6044 var o = buildChannel(); |
| 6021 var od = new api.Channel.fromJson(o.toJson()); | 6045 var od = new api.Channel.fromJson(o.toJson()); |
| 6022 checkChannel(od); | 6046 checkChannel(od); |
| 6023 }); | 6047 }); |
| 6024 }); | 6048 }); |
| 6025 | 6049 |
| 6026 | |
| 6027 unittest.group("obj-schema-ChannelAuditDetails", () { | 6050 unittest.group("obj-schema-ChannelAuditDetails", () { |
| 6028 unittest.test("to-json--from-json", () { | 6051 unittest.test("to-json--from-json", () { |
| 6029 var o = buildChannelAuditDetails(); | 6052 var o = buildChannelAuditDetails(); |
| 6030 var od = new api.ChannelAuditDetails.fromJson(o.toJson()); | 6053 var od = new api.ChannelAuditDetails.fromJson(o.toJson()); |
| 6031 checkChannelAuditDetails(od); | 6054 checkChannelAuditDetails(od); |
| 6032 }); | 6055 }); |
| 6033 }); | 6056 }); |
| 6034 | 6057 |
| 6035 | |
| 6036 unittest.group("obj-schema-ChannelBannerResource", () { | 6058 unittest.group("obj-schema-ChannelBannerResource", () { |
| 6037 unittest.test("to-json--from-json", () { | 6059 unittest.test("to-json--from-json", () { |
| 6038 var o = buildChannelBannerResource(); | 6060 var o = buildChannelBannerResource(); |
| 6039 var od = new api.ChannelBannerResource.fromJson(o.toJson()); | 6061 var od = new api.ChannelBannerResource.fromJson(o.toJson()); |
| 6040 checkChannelBannerResource(od); | 6062 checkChannelBannerResource(od); |
| 6041 }); | 6063 }); |
| 6042 }); | 6064 }); |
| 6043 | 6065 |
| 6044 | |
| 6045 unittest.group("obj-schema-ChannelBrandingSettings", () { | 6066 unittest.group("obj-schema-ChannelBrandingSettings", () { |
| 6046 unittest.test("to-json--from-json", () { | 6067 unittest.test("to-json--from-json", () { |
| 6047 var o = buildChannelBrandingSettings(); | 6068 var o = buildChannelBrandingSettings(); |
| 6048 var od = new api.ChannelBrandingSettings.fromJson(o.toJson()); | 6069 var od = new api.ChannelBrandingSettings.fromJson(o.toJson()); |
| 6049 checkChannelBrandingSettings(od); | 6070 checkChannelBrandingSettings(od); |
| 6050 }); | 6071 }); |
| 6051 }); | 6072 }); |
| 6052 | 6073 |
| 6053 | |
| 6054 unittest.group("obj-schema-ChannelContentDetailsRelatedPlaylists", () { | 6074 unittest.group("obj-schema-ChannelContentDetailsRelatedPlaylists", () { |
| 6055 unittest.test("to-json--from-json", () { | 6075 unittest.test("to-json--from-json", () { |
| 6056 var o = buildChannelContentDetailsRelatedPlaylists(); | 6076 var o = buildChannelContentDetailsRelatedPlaylists(); |
| 6057 var od = new api.ChannelContentDetailsRelatedPlaylists.fromJson(o.toJson()
); | 6077 var od = |
| 6078 new api.ChannelContentDetailsRelatedPlaylists.fromJson(o.toJson()); |
| 6058 checkChannelContentDetailsRelatedPlaylists(od); | 6079 checkChannelContentDetailsRelatedPlaylists(od); |
| 6059 }); | 6080 }); |
| 6060 }); | 6081 }); |
| 6061 | 6082 |
| 6062 | |
| 6063 unittest.group("obj-schema-ChannelContentDetails", () { | 6083 unittest.group("obj-schema-ChannelContentDetails", () { |
| 6064 unittest.test("to-json--from-json", () { | 6084 unittest.test("to-json--from-json", () { |
| 6065 var o = buildChannelContentDetails(); | 6085 var o = buildChannelContentDetails(); |
| 6066 var od = new api.ChannelContentDetails.fromJson(o.toJson()); | 6086 var od = new api.ChannelContentDetails.fromJson(o.toJson()); |
| 6067 checkChannelContentDetails(od); | 6087 checkChannelContentDetails(od); |
| 6068 }); | 6088 }); |
| 6069 }); | 6089 }); |
| 6070 | 6090 |
| 6071 | |
| 6072 unittest.group("obj-schema-ChannelContentOwnerDetails", () { | 6091 unittest.group("obj-schema-ChannelContentOwnerDetails", () { |
| 6073 unittest.test("to-json--from-json", () { | 6092 unittest.test("to-json--from-json", () { |
| 6074 var o = buildChannelContentOwnerDetails(); | 6093 var o = buildChannelContentOwnerDetails(); |
| 6075 var od = new api.ChannelContentOwnerDetails.fromJson(o.toJson()); | 6094 var od = new api.ChannelContentOwnerDetails.fromJson(o.toJson()); |
| 6076 checkChannelContentOwnerDetails(od); | 6095 checkChannelContentOwnerDetails(od); |
| 6077 }); | 6096 }); |
| 6078 }); | 6097 }); |
| 6079 | 6098 |
| 6080 | |
| 6081 unittest.group("obj-schema-ChannelConversionPing", () { | 6099 unittest.group("obj-schema-ChannelConversionPing", () { |
| 6082 unittest.test("to-json--from-json", () { | 6100 unittest.test("to-json--from-json", () { |
| 6083 var o = buildChannelConversionPing(); | 6101 var o = buildChannelConversionPing(); |
| 6084 var od = new api.ChannelConversionPing.fromJson(o.toJson()); | 6102 var od = new api.ChannelConversionPing.fromJson(o.toJson()); |
| 6085 checkChannelConversionPing(od); | 6103 checkChannelConversionPing(od); |
| 6086 }); | 6104 }); |
| 6087 }); | 6105 }); |
| 6088 | 6106 |
| 6089 | |
| 6090 unittest.group("obj-schema-ChannelConversionPings", () { | 6107 unittest.group("obj-schema-ChannelConversionPings", () { |
| 6091 unittest.test("to-json--from-json", () { | 6108 unittest.test("to-json--from-json", () { |
| 6092 var o = buildChannelConversionPings(); | 6109 var o = buildChannelConversionPings(); |
| 6093 var od = new api.ChannelConversionPings.fromJson(o.toJson()); | 6110 var od = new api.ChannelConversionPings.fromJson(o.toJson()); |
| 6094 checkChannelConversionPings(od); | 6111 checkChannelConversionPings(od); |
| 6095 }); | 6112 }); |
| 6096 }); | 6113 }); |
| 6097 | 6114 |
| 6098 | |
| 6099 unittest.group("obj-schema-ChannelListResponse", () { | 6115 unittest.group("obj-schema-ChannelListResponse", () { |
| 6100 unittest.test("to-json--from-json", () { | 6116 unittest.test("to-json--from-json", () { |
| 6101 var o = buildChannelListResponse(); | 6117 var o = buildChannelListResponse(); |
| 6102 var od = new api.ChannelListResponse.fromJson(o.toJson()); | 6118 var od = new api.ChannelListResponse.fromJson(o.toJson()); |
| 6103 checkChannelListResponse(od); | 6119 checkChannelListResponse(od); |
| 6104 }); | 6120 }); |
| 6105 }); | 6121 }); |
| 6106 | 6122 |
| 6107 | |
| 6108 unittest.group("obj-schema-ChannelLocalization", () { | 6123 unittest.group("obj-schema-ChannelLocalization", () { |
| 6109 unittest.test("to-json--from-json", () { | 6124 unittest.test("to-json--from-json", () { |
| 6110 var o = buildChannelLocalization(); | 6125 var o = buildChannelLocalization(); |
| 6111 var od = new api.ChannelLocalization.fromJson(o.toJson()); | 6126 var od = new api.ChannelLocalization.fromJson(o.toJson()); |
| 6112 checkChannelLocalization(od); | 6127 checkChannelLocalization(od); |
| 6113 }); | 6128 }); |
| 6114 }); | 6129 }); |
| 6115 | 6130 |
| 6116 | |
| 6117 unittest.group("obj-schema-ChannelProfileDetails", () { | 6131 unittest.group("obj-schema-ChannelProfileDetails", () { |
| 6118 unittest.test("to-json--from-json", () { | 6132 unittest.test("to-json--from-json", () { |
| 6119 var o = buildChannelProfileDetails(); | 6133 var o = buildChannelProfileDetails(); |
| 6120 var od = new api.ChannelProfileDetails.fromJson(o.toJson()); | 6134 var od = new api.ChannelProfileDetails.fromJson(o.toJson()); |
| 6121 checkChannelProfileDetails(od); | 6135 checkChannelProfileDetails(od); |
| 6122 }); | 6136 }); |
| 6123 }); | 6137 }); |
| 6124 | 6138 |
| 6125 | |
| 6126 unittest.group("obj-schema-ChannelSection", () { | 6139 unittest.group("obj-schema-ChannelSection", () { |
| 6127 unittest.test("to-json--from-json", () { | 6140 unittest.test("to-json--from-json", () { |
| 6128 var o = buildChannelSection(); | 6141 var o = buildChannelSection(); |
| 6129 var od = new api.ChannelSection.fromJson(o.toJson()); | 6142 var od = new api.ChannelSection.fromJson(o.toJson()); |
| 6130 checkChannelSection(od); | 6143 checkChannelSection(od); |
| 6131 }); | 6144 }); |
| 6132 }); | 6145 }); |
| 6133 | 6146 |
| 6134 | |
| 6135 unittest.group("obj-schema-ChannelSectionContentDetails", () { | 6147 unittest.group("obj-schema-ChannelSectionContentDetails", () { |
| 6136 unittest.test("to-json--from-json", () { | 6148 unittest.test("to-json--from-json", () { |
| 6137 var o = buildChannelSectionContentDetails(); | 6149 var o = buildChannelSectionContentDetails(); |
| 6138 var od = new api.ChannelSectionContentDetails.fromJson(o.toJson()); | 6150 var od = new api.ChannelSectionContentDetails.fromJson(o.toJson()); |
| 6139 checkChannelSectionContentDetails(od); | 6151 checkChannelSectionContentDetails(od); |
| 6140 }); | 6152 }); |
| 6141 }); | 6153 }); |
| 6142 | 6154 |
| 6143 | |
| 6144 unittest.group("obj-schema-ChannelSectionListResponse", () { | 6155 unittest.group("obj-schema-ChannelSectionListResponse", () { |
| 6145 unittest.test("to-json--from-json", () { | 6156 unittest.test("to-json--from-json", () { |
| 6146 var o = buildChannelSectionListResponse(); | 6157 var o = buildChannelSectionListResponse(); |
| 6147 var od = new api.ChannelSectionListResponse.fromJson(o.toJson()); | 6158 var od = new api.ChannelSectionListResponse.fromJson(o.toJson()); |
| 6148 checkChannelSectionListResponse(od); | 6159 checkChannelSectionListResponse(od); |
| 6149 }); | 6160 }); |
| 6150 }); | 6161 }); |
| 6151 | 6162 |
| 6152 | |
| 6153 unittest.group("obj-schema-ChannelSectionLocalization", () { | 6163 unittest.group("obj-schema-ChannelSectionLocalization", () { |
| 6154 unittest.test("to-json--from-json", () { | 6164 unittest.test("to-json--from-json", () { |
| 6155 var o = buildChannelSectionLocalization(); | 6165 var o = buildChannelSectionLocalization(); |
| 6156 var od = new api.ChannelSectionLocalization.fromJson(o.toJson()); | 6166 var od = new api.ChannelSectionLocalization.fromJson(o.toJson()); |
| 6157 checkChannelSectionLocalization(od); | 6167 checkChannelSectionLocalization(od); |
| 6158 }); | 6168 }); |
| 6159 }); | 6169 }); |
| 6160 | 6170 |
| 6161 | |
| 6162 unittest.group("obj-schema-ChannelSectionSnippet", () { | 6171 unittest.group("obj-schema-ChannelSectionSnippet", () { |
| 6163 unittest.test("to-json--from-json", () { | 6172 unittest.test("to-json--from-json", () { |
| 6164 var o = buildChannelSectionSnippet(); | 6173 var o = buildChannelSectionSnippet(); |
| 6165 var od = new api.ChannelSectionSnippet.fromJson(o.toJson()); | 6174 var od = new api.ChannelSectionSnippet.fromJson(o.toJson()); |
| 6166 checkChannelSectionSnippet(od); | 6175 checkChannelSectionSnippet(od); |
| 6167 }); | 6176 }); |
| 6168 }); | 6177 }); |
| 6169 | 6178 |
| 6170 | |
| 6171 unittest.group("obj-schema-ChannelSectionTargeting", () { | 6179 unittest.group("obj-schema-ChannelSectionTargeting", () { |
| 6172 unittest.test("to-json--from-json", () { | 6180 unittest.test("to-json--from-json", () { |
| 6173 var o = buildChannelSectionTargeting(); | 6181 var o = buildChannelSectionTargeting(); |
| 6174 var od = new api.ChannelSectionTargeting.fromJson(o.toJson()); | 6182 var od = new api.ChannelSectionTargeting.fromJson(o.toJson()); |
| 6175 checkChannelSectionTargeting(od); | 6183 checkChannelSectionTargeting(od); |
| 6176 }); | 6184 }); |
| 6177 }); | 6185 }); |
| 6178 | 6186 |
| 6179 | |
| 6180 unittest.group("obj-schema-ChannelSettings", () { | 6187 unittest.group("obj-schema-ChannelSettings", () { |
| 6181 unittest.test("to-json--from-json", () { | 6188 unittest.test("to-json--from-json", () { |
| 6182 var o = buildChannelSettings(); | 6189 var o = buildChannelSettings(); |
| 6183 var od = new api.ChannelSettings.fromJson(o.toJson()); | 6190 var od = new api.ChannelSettings.fromJson(o.toJson()); |
| 6184 checkChannelSettings(od); | 6191 checkChannelSettings(od); |
| 6185 }); | 6192 }); |
| 6186 }); | 6193 }); |
| 6187 | 6194 |
| 6188 | |
| 6189 unittest.group("obj-schema-ChannelSnippet", () { | 6195 unittest.group("obj-schema-ChannelSnippet", () { |
| 6190 unittest.test("to-json--from-json", () { | 6196 unittest.test("to-json--from-json", () { |
| 6191 var o = buildChannelSnippet(); | 6197 var o = buildChannelSnippet(); |
| 6192 var od = new api.ChannelSnippet.fromJson(o.toJson()); | 6198 var od = new api.ChannelSnippet.fromJson(o.toJson()); |
| 6193 checkChannelSnippet(od); | 6199 checkChannelSnippet(od); |
| 6194 }); | 6200 }); |
| 6195 }); | 6201 }); |
| 6196 | 6202 |
| 6197 | |
| 6198 unittest.group("obj-schema-ChannelStatistics", () { | 6203 unittest.group("obj-schema-ChannelStatistics", () { |
| 6199 unittest.test("to-json--from-json", () { | 6204 unittest.test("to-json--from-json", () { |
| 6200 var o = buildChannelStatistics(); | 6205 var o = buildChannelStatistics(); |
| 6201 var od = new api.ChannelStatistics.fromJson(o.toJson()); | 6206 var od = new api.ChannelStatistics.fromJson(o.toJson()); |
| 6202 checkChannelStatistics(od); | 6207 checkChannelStatistics(od); |
| 6203 }); | 6208 }); |
| 6204 }); | 6209 }); |
| 6205 | 6210 |
| 6206 | |
| 6207 unittest.group("obj-schema-ChannelStatus", () { | 6211 unittest.group("obj-schema-ChannelStatus", () { |
| 6208 unittest.test("to-json--from-json", () { | 6212 unittest.test("to-json--from-json", () { |
| 6209 var o = buildChannelStatus(); | 6213 var o = buildChannelStatus(); |
| 6210 var od = new api.ChannelStatus.fromJson(o.toJson()); | 6214 var od = new api.ChannelStatus.fromJson(o.toJson()); |
| 6211 checkChannelStatus(od); | 6215 checkChannelStatus(od); |
| 6212 }); | 6216 }); |
| 6213 }); | 6217 }); |
| 6214 | 6218 |
| 6215 | |
| 6216 unittest.group("obj-schema-ChannelTopicDetails", () { | 6219 unittest.group("obj-schema-ChannelTopicDetails", () { |
| 6217 unittest.test("to-json--from-json", () { | 6220 unittest.test("to-json--from-json", () { |
| 6218 var o = buildChannelTopicDetails(); | 6221 var o = buildChannelTopicDetails(); |
| 6219 var od = new api.ChannelTopicDetails.fromJson(o.toJson()); | 6222 var od = new api.ChannelTopicDetails.fromJson(o.toJson()); |
| 6220 checkChannelTopicDetails(od); | 6223 checkChannelTopicDetails(od); |
| 6221 }); | 6224 }); |
| 6222 }); | 6225 }); |
| 6223 | 6226 |
| 6224 | |
| 6225 unittest.group("obj-schema-Comment", () { | 6227 unittest.group("obj-schema-Comment", () { |
| 6226 unittest.test("to-json--from-json", () { | 6228 unittest.test("to-json--from-json", () { |
| 6227 var o = buildComment(); | 6229 var o = buildComment(); |
| 6228 var od = new api.Comment.fromJson(o.toJson()); | 6230 var od = new api.Comment.fromJson(o.toJson()); |
| 6229 checkComment(od); | 6231 checkComment(od); |
| 6230 }); | 6232 }); |
| 6231 }); | 6233 }); |
| 6232 | 6234 |
| 6233 | |
| 6234 unittest.group("obj-schema-CommentListResponse", () { | 6235 unittest.group("obj-schema-CommentListResponse", () { |
| 6235 unittest.test("to-json--from-json", () { | 6236 unittest.test("to-json--from-json", () { |
| 6236 var o = buildCommentListResponse(); | 6237 var o = buildCommentListResponse(); |
| 6237 var od = new api.CommentListResponse.fromJson(o.toJson()); | 6238 var od = new api.CommentListResponse.fromJson(o.toJson()); |
| 6238 checkCommentListResponse(od); | 6239 checkCommentListResponse(od); |
| 6239 }); | 6240 }); |
| 6240 }); | 6241 }); |
| 6241 | 6242 |
| 6242 | |
| 6243 unittest.group("obj-schema-CommentSnippet", () { | 6243 unittest.group("obj-schema-CommentSnippet", () { |
| 6244 unittest.test("to-json--from-json", () { | 6244 unittest.test("to-json--from-json", () { |
| 6245 var o = buildCommentSnippet(); | 6245 var o = buildCommentSnippet(); |
| 6246 var od = new api.CommentSnippet.fromJson(o.toJson()); | 6246 var od = new api.CommentSnippet.fromJson(o.toJson()); |
| 6247 checkCommentSnippet(od); | 6247 checkCommentSnippet(od); |
| 6248 }); | 6248 }); |
| 6249 }); | 6249 }); |
| 6250 | 6250 |
| 6251 | |
| 6252 unittest.group("obj-schema-CommentThread", () { | 6251 unittest.group("obj-schema-CommentThread", () { |
| 6253 unittest.test("to-json--from-json", () { | 6252 unittest.test("to-json--from-json", () { |
| 6254 var o = buildCommentThread(); | 6253 var o = buildCommentThread(); |
| 6255 var od = new api.CommentThread.fromJson(o.toJson()); | 6254 var od = new api.CommentThread.fromJson(o.toJson()); |
| 6256 checkCommentThread(od); | 6255 checkCommentThread(od); |
| 6257 }); | 6256 }); |
| 6258 }); | 6257 }); |
| 6259 | 6258 |
| 6260 | |
| 6261 unittest.group("obj-schema-CommentThreadListResponse", () { | 6259 unittest.group("obj-schema-CommentThreadListResponse", () { |
| 6262 unittest.test("to-json--from-json", () { | 6260 unittest.test("to-json--from-json", () { |
| 6263 var o = buildCommentThreadListResponse(); | 6261 var o = buildCommentThreadListResponse(); |
| 6264 var od = new api.CommentThreadListResponse.fromJson(o.toJson()); | 6262 var od = new api.CommentThreadListResponse.fromJson(o.toJson()); |
| 6265 checkCommentThreadListResponse(od); | 6263 checkCommentThreadListResponse(od); |
| 6266 }); | 6264 }); |
| 6267 }); | 6265 }); |
| 6268 | 6266 |
| 6269 | |
| 6270 unittest.group("obj-schema-CommentThreadReplies", () { | 6267 unittest.group("obj-schema-CommentThreadReplies", () { |
| 6271 unittest.test("to-json--from-json", () { | 6268 unittest.test("to-json--from-json", () { |
| 6272 var o = buildCommentThreadReplies(); | 6269 var o = buildCommentThreadReplies(); |
| 6273 var od = new api.CommentThreadReplies.fromJson(o.toJson()); | 6270 var od = new api.CommentThreadReplies.fromJson(o.toJson()); |
| 6274 checkCommentThreadReplies(od); | 6271 checkCommentThreadReplies(od); |
| 6275 }); | 6272 }); |
| 6276 }); | 6273 }); |
| 6277 | 6274 |
| 6278 | |
| 6279 unittest.group("obj-schema-CommentThreadSnippet", () { | 6275 unittest.group("obj-schema-CommentThreadSnippet", () { |
| 6280 unittest.test("to-json--from-json", () { | 6276 unittest.test("to-json--from-json", () { |
| 6281 var o = buildCommentThreadSnippet(); | 6277 var o = buildCommentThreadSnippet(); |
| 6282 var od = new api.CommentThreadSnippet.fromJson(o.toJson()); | 6278 var od = new api.CommentThreadSnippet.fromJson(o.toJson()); |
| 6283 checkCommentThreadSnippet(od); | 6279 checkCommentThreadSnippet(od); |
| 6284 }); | 6280 }); |
| 6285 }); | 6281 }); |
| 6286 | 6282 |
| 6287 | |
| 6288 unittest.group("obj-schema-ContentRating", () { | 6283 unittest.group("obj-schema-ContentRating", () { |
| 6289 unittest.test("to-json--from-json", () { | 6284 unittest.test("to-json--from-json", () { |
| 6290 var o = buildContentRating(); | 6285 var o = buildContentRating(); |
| 6291 var od = new api.ContentRating.fromJson(o.toJson()); | 6286 var od = new api.ContentRating.fromJson(o.toJson()); |
| 6292 checkContentRating(od); | 6287 checkContentRating(od); |
| 6293 }); | 6288 }); |
| 6294 }); | 6289 }); |
| 6295 | 6290 |
| 6296 | |
| 6297 unittest.group("obj-schema-FanFundingEvent", () { | 6291 unittest.group("obj-schema-FanFundingEvent", () { |
| 6298 unittest.test("to-json--from-json", () { | 6292 unittest.test("to-json--from-json", () { |
| 6299 var o = buildFanFundingEvent(); | 6293 var o = buildFanFundingEvent(); |
| 6300 var od = new api.FanFundingEvent.fromJson(o.toJson()); | 6294 var od = new api.FanFundingEvent.fromJson(o.toJson()); |
| 6301 checkFanFundingEvent(od); | 6295 checkFanFundingEvent(od); |
| 6302 }); | 6296 }); |
| 6303 }); | 6297 }); |
| 6304 | 6298 |
| 6305 | |
| 6306 unittest.group("obj-schema-FanFundingEventListResponse", () { | 6299 unittest.group("obj-schema-FanFundingEventListResponse", () { |
| 6307 unittest.test("to-json--from-json", () { | 6300 unittest.test("to-json--from-json", () { |
| 6308 var o = buildFanFundingEventListResponse(); | 6301 var o = buildFanFundingEventListResponse(); |
| 6309 var od = new api.FanFundingEventListResponse.fromJson(o.toJson()); | 6302 var od = new api.FanFundingEventListResponse.fromJson(o.toJson()); |
| 6310 checkFanFundingEventListResponse(od); | 6303 checkFanFundingEventListResponse(od); |
| 6311 }); | 6304 }); |
| 6312 }); | 6305 }); |
| 6313 | 6306 |
| 6314 | |
| 6315 unittest.group("obj-schema-FanFundingEventSnippet", () { | 6307 unittest.group("obj-schema-FanFundingEventSnippet", () { |
| 6316 unittest.test("to-json--from-json", () { | 6308 unittest.test("to-json--from-json", () { |
| 6317 var o = buildFanFundingEventSnippet(); | 6309 var o = buildFanFundingEventSnippet(); |
| 6318 var od = new api.FanFundingEventSnippet.fromJson(o.toJson()); | 6310 var od = new api.FanFundingEventSnippet.fromJson(o.toJson()); |
| 6319 checkFanFundingEventSnippet(od); | 6311 checkFanFundingEventSnippet(od); |
| 6320 }); | 6312 }); |
| 6321 }); | 6313 }); |
| 6322 | 6314 |
| 6323 | |
| 6324 unittest.group("obj-schema-GeoPoint", () { | 6315 unittest.group("obj-schema-GeoPoint", () { |
| 6325 unittest.test("to-json--from-json", () { | 6316 unittest.test("to-json--from-json", () { |
| 6326 var o = buildGeoPoint(); | 6317 var o = buildGeoPoint(); |
| 6327 var od = new api.GeoPoint.fromJson(o.toJson()); | 6318 var od = new api.GeoPoint.fromJson(o.toJson()); |
| 6328 checkGeoPoint(od); | 6319 checkGeoPoint(od); |
| 6329 }); | 6320 }); |
| 6330 }); | 6321 }); |
| 6331 | 6322 |
| 6332 | |
| 6333 unittest.group("obj-schema-GuideCategory", () { | 6323 unittest.group("obj-schema-GuideCategory", () { |
| 6334 unittest.test("to-json--from-json", () { | 6324 unittest.test("to-json--from-json", () { |
| 6335 var o = buildGuideCategory(); | 6325 var o = buildGuideCategory(); |
| 6336 var od = new api.GuideCategory.fromJson(o.toJson()); | 6326 var od = new api.GuideCategory.fromJson(o.toJson()); |
| 6337 checkGuideCategory(od); | 6327 checkGuideCategory(od); |
| 6338 }); | 6328 }); |
| 6339 }); | 6329 }); |
| 6340 | 6330 |
| 6341 | |
| 6342 unittest.group("obj-schema-GuideCategoryListResponse", () { | 6331 unittest.group("obj-schema-GuideCategoryListResponse", () { |
| 6343 unittest.test("to-json--from-json", () { | 6332 unittest.test("to-json--from-json", () { |
| 6344 var o = buildGuideCategoryListResponse(); | 6333 var o = buildGuideCategoryListResponse(); |
| 6345 var od = new api.GuideCategoryListResponse.fromJson(o.toJson()); | 6334 var od = new api.GuideCategoryListResponse.fromJson(o.toJson()); |
| 6346 checkGuideCategoryListResponse(od); | 6335 checkGuideCategoryListResponse(od); |
| 6347 }); | 6336 }); |
| 6348 }); | 6337 }); |
| 6349 | 6338 |
| 6350 | |
| 6351 unittest.group("obj-schema-GuideCategorySnippet", () { | 6339 unittest.group("obj-schema-GuideCategorySnippet", () { |
| 6352 unittest.test("to-json--from-json", () { | 6340 unittest.test("to-json--from-json", () { |
| 6353 var o = buildGuideCategorySnippet(); | 6341 var o = buildGuideCategorySnippet(); |
| 6354 var od = new api.GuideCategorySnippet.fromJson(o.toJson()); | 6342 var od = new api.GuideCategorySnippet.fromJson(o.toJson()); |
| 6355 checkGuideCategorySnippet(od); | 6343 checkGuideCategorySnippet(od); |
| 6356 }); | 6344 }); |
| 6357 }); | 6345 }); |
| 6358 | 6346 |
| 6359 | |
| 6360 unittest.group("obj-schema-I18nLanguage", () { | 6347 unittest.group("obj-schema-I18nLanguage", () { |
| 6361 unittest.test("to-json--from-json", () { | 6348 unittest.test("to-json--from-json", () { |
| 6362 var o = buildI18nLanguage(); | 6349 var o = buildI18nLanguage(); |
| 6363 var od = new api.I18nLanguage.fromJson(o.toJson()); | 6350 var od = new api.I18nLanguage.fromJson(o.toJson()); |
| 6364 checkI18nLanguage(od); | 6351 checkI18nLanguage(od); |
| 6365 }); | 6352 }); |
| 6366 }); | 6353 }); |
| 6367 | 6354 |
| 6368 | |
| 6369 unittest.group("obj-schema-I18nLanguageListResponse", () { | 6355 unittest.group("obj-schema-I18nLanguageListResponse", () { |
| 6370 unittest.test("to-json--from-json", () { | 6356 unittest.test("to-json--from-json", () { |
| 6371 var o = buildI18nLanguageListResponse(); | 6357 var o = buildI18nLanguageListResponse(); |
| 6372 var od = new api.I18nLanguageListResponse.fromJson(o.toJson()); | 6358 var od = new api.I18nLanguageListResponse.fromJson(o.toJson()); |
| 6373 checkI18nLanguageListResponse(od); | 6359 checkI18nLanguageListResponse(od); |
| 6374 }); | 6360 }); |
| 6375 }); | 6361 }); |
| 6376 | 6362 |
| 6377 | |
| 6378 unittest.group("obj-schema-I18nLanguageSnippet", () { | 6363 unittest.group("obj-schema-I18nLanguageSnippet", () { |
| 6379 unittest.test("to-json--from-json", () { | 6364 unittest.test("to-json--from-json", () { |
| 6380 var o = buildI18nLanguageSnippet(); | 6365 var o = buildI18nLanguageSnippet(); |
| 6381 var od = new api.I18nLanguageSnippet.fromJson(o.toJson()); | 6366 var od = new api.I18nLanguageSnippet.fromJson(o.toJson()); |
| 6382 checkI18nLanguageSnippet(od); | 6367 checkI18nLanguageSnippet(od); |
| 6383 }); | 6368 }); |
| 6384 }); | 6369 }); |
| 6385 | 6370 |
| 6386 | |
| 6387 unittest.group("obj-schema-I18nRegion", () { | 6371 unittest.group("obj-schema-I18nRegion", () { |
| 6388 unittest.test("to-json--from-json", () { | 6372 unittest.test("to-json--from-json", () { |
| 6389 var o = buildI18nRegion(); | 6373 var o = buildI18nRegion(); |
| 6390 var od = new api.I18nRegion.fromJson(o.toJson()); | 6374 var od = new api.I18nRegion.fromJson(o.toJson()); |
| 6391 checkI18nRegion(od); | 6375 checkI18nRegion(od); |
| 6392 }); | 6376 }); |
| 6393 }); | 6377 }); |
| 6394 | 6378 |
| 6395 | |
| 6396 unittest.group("obj-schema-I18nRegionListResponse", () { | 6379 unittest.group("obj-schema-I18nRegionListResponse", () { |
| 6397 unittest.test("to-json--from-json", () { | 6380 unittest.test("to-json--from-json", () { |
| 6398 var o = buildI18nRegionListResponse(); | 6381 var o = buildI18nRegionListResponse(); |
| 6399 var od = new api.I18nRegionListResponse.fromJson(o.toJson()); | 6382 var od = new api.I18nRegionListResponse.fromJson(o.toJson()); |
| 6400 checkI18nRegionListResponse(od); | 6383 checkI18nRegionListResponse(od); |
| 6401 }); | 6384 }); |
| 6402 }); | 6385 }); |
| 6403 | 6386 |
| 6404 | |
| 6405 unittest.group("obj-schema-I18nRegionSnippet", () { | 6387 unittest.group("obj-schema-I18nRegionSnippet", () { |
| 6406 unittest.test("to-json--from-json", () { | 6388 unittest.test("to-json--from-json", () { |
| 6407 var o = buildI18nRegionSnippet(); | 6389 var o = buildI18nRegionSnippet(); |
| 6408 var od = new api.I18nRegionSnippet.fromJson(o.toJson()); | 6390 var od = new api.I18nRegionSnippet.fromJson(o.toJson()); |
| 6409 checkI18nRegionSnippet(od); | 6391 checkI18nRegionSnippet(od); |
| 6410 }); | 6392 }); |
| 6411 }); | 6393 }); |
| 6412 | 6394 |
| 6413 | |
| 6414 unittest.group("obj-schema-ImageSettings", () { | 6395 unittest.group("obj-schema-ImageSettings", () { |
| 6415 unittest.test("to-json--from-json", () { | 6396 unittest.test("to-json--from-json", () { |
| 6416 var o = buildImageSettings(); | 6397 var o = buildImageSettings(); |
| 6417 var od = new api.ImageSettings.fromJson(o.toJson()); | 6398 var od = new api.ImageSettings.fromJson(o.toJson()); |
| 6418 checkImageSettings(od); | 6399 checkImageSettings(od); |
| 6419 }); | 6400 }); |
| 6420 }); | 6401 }); |
| 6421 | 6402 |
| 6422 | |
| 6423 unittest.group("obj-schema-IngestionInfo", () { | 6403 unittest.group("obj-schema-IngestionInfo", () { |
| 6424 unittest.test("to-json--from-json", () { | 6404 unittest.test("to-json--from-json", () { |
| 6425 var o = buildIngestionInfo(); | 6405 var o = buildIngestionInfo(); |
| 6426 var od = new api.IngestionInfo.fromJson(o.toJson()); | 6406 var od = new api.IngestionInfo.fromJson(o.toJson()); |
| 6427 checkIngestionInfo(od); | 6407 checkIngestionInfo(od); |
| 6428 }); | 6408 }); |
| 6429 }); | 6409 }); |
| 6430 | 6410 |
| 6431 | |
| 6432 unittest.group("obj-schema-InvideoBranding", () { | 6411 unittest.group("obj-schema-InvideoBranding", () { |
| 6433 unittest.test("to-json--from-json", () { | 6412 unittest.test("to-json--from-json", () { |
| 6434 var o = buildInvideoBranding(); | 6413 var o = buildInvideoBranding(); |
| 6435 var od = new api.InvideoBranding.fromJson(o.toJson()); | 6414 var od = new api.InvideoBranding.fromJson(o.toJson()); |
| 6436 checkInvideoBranding(od); | 6415 checkInvideoBranding(od); |
| 6437 }); | 6416 }); |
| 6438 }); | 6417 }); |
| 6439 | 6418 |
| 6440 | |
| 6441 unittest.group("obj-schema-InvideoPosition", () { | 6419 unittest.group("obj-schema-InvideoPosition", () { |
| 6442 unittest.test("to-json--from-json", () { | 6420 unittest.test("to-json--from-json", () { |
| 6443 var o = buildInvideoPosition(); | 6421 var o = buildInvideoPosition(); |
| 6444 var od = new api.InvideoPosition.fromJson(o.toJson()); | 6422 var od = new api.InvideoPosition.fromJson(o.toJson()); |
| 6445 checkInvideoPosition(od); | 6423 checkInvideoPosition(od); |
| 6446 }); | 6424 }); |
| 6447 }); | 6425 }); |
| 6448 | 6426 |
| 6449 | |
| 6450 unittest.group("obj-schema-InvideoPromotion", () { | 6427 unittest.group("obj-schema-InvideoPromotion", () { |
| 6451 unittest.test("to-json--from-json", () { | 6428 unittest.test("to-json--from-json", () { |
| 6452 var o = buildInvideoPromotion(); | 6429 var o = buildInvideoPromotion(); |
| 6453 var od = new api.InvideoPromotion.fromJson(o.toJson()); | 6430 var od = new api.InvideoPromotion.fromJson(o.toJson()); |
| 6454 checkInvideoPromotion(od); | 6431 checkInvideoPromotion(od); |
| 6455 }); | 6432 }); |
| 6456 }); | 6433 }); |
| 6457 | 6434 |
| 6458 | |
| 6459 unittest.group("obj-schema-InvideoTiming", () { | 6435 unittest.group("obj-schema-InvideoTiming", () { |
| 6460 unittest.test("to-json--from-json", () { | 6436 unittest.test("to-json--from-json", () { |
| 6461 var o = buildInvideoTiming(); | 6437 var o = buildInvideoTiming(); |
| 6462 var od = new api.InvideoTiming.fromJson(o.toJson()); | 6438 var od = new api.InvideoTiming.fromJson(o.toJson()); |
| 6463 checkInvideoTiming(od); | 6439 checkInvideoTiming(od); |
| 6464 }); | 6440 }); |
| 6465 }); | 6441 }); |
| 6466 | 6442 |
| 6467 | |
| 6468 unittest.group("obj-schema-LanguageTag", () { | 6443 unittest.group("obj-schema-LanguageTag", () { |
| 6469 unittest.test("to-json--from-json", () { | 6444 unittest.test("to-json--from-json", () { |
| 6470 var o = buildLanguageTag(); | 6445 var o = buildLanguageTag(); |
| 6471 var od = new api.LanguageTag.fromJson(o.toJson()); | 6446 var od = new api.LanguageTag.fromJson(o.toJson()); |
| 6472 checkLanguageTag(od); | 6447 checkLanguageTag(od); |
| 6473 }); | 6448 }); |
| 6474 }); | 6449 }); |
| 6475 | 6450 |
| 6476 | |
| 6477 unittest.group("obj-schema-LiveBroadcast", () { | 6451 unittest.group("obj-schema-LiveBroadcast", () { |
| 6478 unittest.test("to-json--from-json", () { | 6452 unittest.test("to-json--from-json", () { |
| 6479 var o = buildLiveBroadcast(); | 6453 var o = buildLiveBroadcast(); |
| 6480 var od = new api.LiveBroadcast.fromJson(o.toJson()); | 6454 var od = new api.LiveBroadcast.fromJson(o.toJson()); |
| 6481 checkLiveBroadcast(od); | 6455 checkLiveBroadcast(od); |
| 6482 }); | 6456 }); |
| 6483 }); | 6457 }); |
| 6484 | 6458 |
| 6485 | |
| 6486 unittest.group("obj-schema-LiveBroadcastContentDetails", () { | 6459 unittest.group("obj-schema-LiveBroadcastContentDetails", () { |
| 6487 unittest.test("to-json--from-json", () { | 6460 unittest.test("to-json--from-json", () { |
| 6488 var o = buildLiveBroadcastContentDetails(); | 6461 var o = buildLiveBroadcastContentDetails(); |
| 6489 var od = new api.LiveBroadcastContentDetails.fromJson(o.toJson()); | 6462 var od = new api.LiveBroadcastContentDetails.fromJson(o.toJson()); |
| 6490 checkLiveBroadcastContentDetails(od); | 6463 checkLiveBroadcastContentDetails(od); |
| 6491 }); | 6464 }); |
| 6492 }); | 6465 }); |
| 6493 | 6466 |
| 6494 | |
| 6495 unittest.group("obj-schema-LiveBroadcastListResponse", () { | 6467 unittest.group("obj-schema-LiveBroadcastListResponse", () { |
| 6496 unittest.test("to-json--from-json", () { | 6468 unittest.test("to-json--from-json", () { |
| 6497 var o = buildLiveBroadcastListResponse(); | 6469 var o = buildLiveBroadcastListResponse(); |
| 6498 var od = new api.LiveBroadcastListResponse.fromJson(o.toJson()); | 6470 var od = new api.LiveBroadcastListResponse.fromJson(o.toJson()); |
| 6499 checkLiveBroadcastListResponse(od); | 6471 checkLiveBroadcastListResponse(od); |
| 6500 }); | 6472 }); |
| 6501 }); | 6473 }); |
| 6502 | 6474 |
| 6503 | |
| 6504 unittest.group("obj-schema-LiveBroadcastSnippet", () { | 6475 unittest.group("obj-schema-LiveBroadcastSnippet", () { |
| 6505 unittest.test("to-json--from-json", () { | 6476 unittest.test("to-json--from-json", () { |
| 6506 var o = buildLiveBroadcastSnippet(); | 6477 var o = buildLiveBroadcastSnippet(); |
| 6507 var od = new api.LiveBroadcastSnippet.fromJson(o.toJson()); | 6478 var od = new api.LiveBroadcastSnippet.fromJson(o.toJson()); |
| 6508 checkLiveBroadcastSnippet(od); | 6479 checkLiveBroadcastSnippet(od); |
| 6509 }); | 6480 }); |
| 6510 }); | 6481 }); |
| 6511 | 6482 |
| 6512 | |
| 6513 unittest.group("obj-schema-LiveBroadcastStatistics", () { | 6483 unittest.group("obj-schema-LiveBroadcastStatistics", () { |
| 6514 unittest.test("to-json--from-json", () { | 6484 unittest.test("to-json--from-json", () { |
| 6515 var o = buildLiveBroadcastStatistics(); | 6485 var o = buildLiveBroadcastStatistics(); |
| 6516 var od = new api.LiveBroadcastStatistics.fromJson(o.toJson()); | 6486 var od = new api.LiveBroadcastStatistics.fromJson(o.toJson()); |
| 6517 checkLiveBroadcastStatistics(od); | 6487 checkLiveBroadcastStatistics(od); |
| 6518 }); | 6488 }); |
| 6519 }); | 6489 }); |
| 6520 | 6490 |
| 6521 | |
| 6522 unittest.group("obj-schema-LiveBroadcastStatus", () { | 6491 unittest.group("obj-schema-LiveBroadcastStatus", () { |
| 6523 unittest.test("to-json--from-json", () { | 6492 unittest.test("to-json--from-json", () { |
| 6524 var o = buildLiveBroadcastStatus(); | 6493 var o = buildLiveBroadcastStatus(); |
| 6525 var od = new api.LiveBroadcastStatus.fromJson(o.toJson()); | 6494 var od = new api.LiveBroadcastStatus.fromJson(o.toJson()); |
| 6526 checkLiveBroadcastStatus(od); | 6495 checkLiveBroadcastStatus(od); |
| 6527 }); | 6496 }); |
| 6528 }); | 6497 }); |
| 6529 | 6498 |
| 6530 | |
| 6531 unittest.group("obj-schema-LiveBroadcastTopic", () { | 6499 unittest.group("obj-schema-LiveBroadcastTopic", () { |
| 6532 unittest.test("to-json--from-json", () { | 6500 unittest.test("to-json--from-json", () { |
| 6533 var o = buildLiveBroadcastTopic(); | 6501 var o = buildLiveBroadcastTopic(); |
| 6534 var od = new api.LiveBroadcastTopic.fromJson(o.toJson()); | 6502 var od = new api.LiveBroadcastTopic.fromJson(o.toJson()); |
| 6535 checkLiveBroadcastTopic(od); | 6503 checkLiveBroadcastTopic(od); |
| 6536 }); | 6504 }); |
| 6537 }); | 6505 }); |
| 6538 | 6506 |
| 6539 | |
| 6540 unittest.group("obj-schema-LiveBroadcastTopicDetails", () { | 6507 unittest.group("obj-schema-LiveBroadcastTopicDetails", () { |
| 6541 unittest.test("to-json--from-json", () { | 6508 unittest.test("to-json--from-json", () { |
| 6542 var o = buildLiveBroadcastTopicDetails(); | 6509 var o = buildLiveBroadcastTopicDetails(); |
| 6543 var od = new api.LiveBroadcastTopicDetails.fromJson(o.toJson()); | 6510 var od = new api.LiveBroadcastTopicDetails.fromJson(o.toJson()); |
| 6544 checkLiveBroadcastTopicDetails(od); | 6511 checkLiveBroadcastTopicDetails(od); |
| 6545 }); | 6512 }); |
| 6546 }); | 6513 }); |
| 6547 | 6514 |
| 6548 | |
| 6549 unittest.group("obj-schema-LiveBroadcastTopicSnippet", () { | 6515 unittest.group("obj-schema-LiveBroadcastTopicSnippet", () { |
| 6550 unittest.test("to-json--from-json", () { | 6516 unittest.test("to-json--from-json", () { |
| 6551 var o = buildLiveBroadcastTopicSnippet(); | 6517 var o = buildLiveBroadcastTopicSnippet(); |
| 6552 var od = new api.LiveBroadcastTopicSnippet.fromJson(o.toJson()); | 6518 var od = new api.LiveBroadcastTopicSnippet.fromJson(o.toJson()); |
| 6553 checkLiveBroadcastTopicSnippet(od); | 6519 checkLiveBroadcastTopicSnippet(od); |
| 6554 }); | 6520 }); |
| 6555 }); | 6521 }); |
| 6556 | 6522 |
| 6557 | |
| 6558 unittest.group("obj-schema-LiveChatBan", () { | 6523 unittest.group("obj-schema-LiveChatBan", () { |
| 6559 unittest.test("to-json--from-json", () { | 6524 unittest.test("to-json--from-json", () { |
| 6560 var o = buildLiveChatBan(); | 6525 var o = buildLiveChatBan(); |
| 6561 var od = new api.LiveChatBan.fromJson(o.toJson()); | 6526 var od = new api.LiveChatBan.fromJson(o.toJson()); |
| 6562 checkLiveChatBan(od); | 6527 checkLiveChatBan(od); |
| 6563 }); | 6528 }); |
| 6564 }); | 6529 }); |
| 6565 | 6530 |
| 6566 | |
| 6567 unittest.group("obj-schema-LiveChatBanSnippet", () { | 6531 unittest.group("obj-schema-LiveChatBanSnippet", () { |
| 6568 unittest.test("to-json--from-json", () { | 6532 unittest.test("to-json--from-json", () { |
| 6569 var o = buildLiveChatBanSnippet(); | 6533 var o = buildLiveChatBanSnippet(); |
| 6570 var od = new api.LiveChatBanSnippet.fromJson(o.toJson()); | 6534 var od = new api.LiveChatBanSnippet.fromJson(o.toJson()); |
| 6571 checkLiveChatBanSnippet(od); | 6535 checkLiveChatBanSnippet(od); |
| 6572 }); | 6536 }); |
| 6573 }); | 6537 }); |
| 6574 | 6538 |
| 6575 | |
| 6576 unittest.group("obj-schema-LiveChatFanFundingEventDetails", () { | 6539 unittest.group("obj-schema-LiveChatFanFundingEventDetails", () { |
| 6577 unittest.test("to-json--from-json", () { | 6540 unittest.test("to-json--from-json", () { |
| 6578 var o = buildLiveChatFanFundingEventDetails(); | 6541 var o = buildLiveChatFanFundingEventDetails(); |
| 6579 var od = new api.LiveChatFanFundingEventDetails.fromJson(o.toJson()); | 6542 var od = new api.LiveChatFanFundingEventDetails.fromJson(o.toJson()); |
| 6580 checkLiveChatFanFundingEventDetails(od); | 6543 checkLiveChatFanFundingEventDetails(od); |
| 6581 }); | 6544 }); |
| 6582 }); | 6545 }); |
| 6583 | 6546 |
| 6584 | |
| 6585 unittest.group("obj-schema-LiveChatMessage", () { | 6547 unittest.group("obj-schema-LiveChatMessage", () { |
| 6586 unittest.test("to-json--from-json", () { | 6548 unittest.test("to-json--from-json", () { |
| 6587 var o = buildLiveChatMessage(); | 6549 var o = buildLiveChatMessage(); |
| 6588 var od = new api.LiveChatMessage.fromJson(o.toJson()); | 6550 var od = new api.LiveChatMessage.fromJson(o.toJson()); |
| 6589 checkLiveChatMessage(od); | 6551 checkLiveChatMessage(od); |
| 6590 }); | 6552 }); |
| 6591 }); | 6553 }); |
| 6592 | 6554 |
| 6593 | |
| 6594 unittest.group("obj-schema-LiveChatMessageAuthorDetails", () { | 6555 unittest.group("obj-schema-LiveChatMessageAuthorDetails", () { |
| 6595 unittest.test("to-json--from-json", () { | 6556 unittest.test("to-json--from-json", () { |
| 6596 var o = buildLiveChatMessageAuthorDetails(); | 6557 var o = buildLiveChatMessageAuthorDetails(); |
| 6597 var od = new api.LiveChatMessageAuthorDetails.fromJson(o.toJson()); | 6558 var od = new api.LiveChatMessageAuthorDetails.fromJson(o.toJson()); |
| 6598 checkLiveChatMessageAuthorDetails(od); | 6559 checkLiveChatMessageAuthorDetails(od); |
| 6599 }); | 6560 }); |
| 6600 }); | 6561 }); |
| 6601 | 6562 |
| 6602 | |
| 6603 unittest.group("obj-schema-LiveChatMessageDeletedDetails", () { | 6563 unittest.group("obj-schema-LiveChatMessageDeletedDetails", () { |
| 6604 unittest.test("to-json--from-json", () { | 6564 unittest.test("to-json--from-json", () { |
| 6605 var o = buildLiveChatMessageDeletedDetails(); | 6565 var o = buildLiveChatMessageDeletedDetails(); |
| 6606 var od = new api.LiveChatMessageDeletedDetails.fromJson(o.toJson()); | 6566 var od = new api.LiveChatMessageDeletedDetails.fromJson(o.toJson()); |
| 6607 checkLiveChatMessageDeletedDetails(od); | 6567 checkLiveChatMessageDeletedDetails(od); |
| 6608 }); | 6568 }); |
| 6609 }); | 6569 }); |
| 6610 | 6570 |
| 6611 | |
| 6612 unittest.group("obj-schema-LiveChatMessageListResponse", () { | 6571 unittest.group("obj-schema-LiveChatMessageListResponse", () { |
| 6613 unittest.test("to-json--from-json", () { | 6572 unittest.test("to-json--from-json", () { |
| 6614 var o = buildLiveChatMessageListResponse(); | 6573 var o = buildLiveChatMessageListResponse(); |
| 6615 var od = new api.LiveChatMessageListResponse.fromJson(o.toJson()); | 6574 var od = new api.LiveChatMessageListResponse.fromJson(o.toJson()); |
| 6616 checkLiveChatMessageListResponse(od); | 6575 checkLiveChatMessageListResponse(od); |
| 6617 }); | 6576 }); |
| 6618 }); | 6577 }); |
| 6619 | 6578 |
| 6620 | |
| 6621 unittest.group("obj-schema-LiveChatMessageRetractedDetails", () { | 6579 unittest.group("obj-schema-LiveChatMessageRetractedDetails", () { |
| 6622 unittest.test("to-json--from-json", () { | 6580 unittest.test("to-json--from-json", () { |
| 6623 var o = buildLiveChatMessageRetractedDetails(); | 6581 var o = buildLiveChatMessageRetractedDetails(); |
| 6624 var od = new api.LiveChatMessageRetractedDetails.fromJson(o.toJson()); | 6582 var od = new api.LiveChatMessageRetractedDetails.fromJson(o.toJson()); |
| 6625 checkLiveChatMessageRetractedDetails(od); | 6583 checkLiveChatMessageRetractedDetails(od); |
| 6626 }); | 6584 }); |
| 6627 }); | 6585 }); |
| 6628 | 6586 |
| 6629 | |
| 6630 unittest.group("obj-schema-LiveChatMessageSnippet", () { | 6587 unittest.group("obj-schema-LiveChatMessageSnippet", () { |
| 6631 unittest.test("to-json--from-json", () { | 6588 unittest.test("to-json--from-json", () { |
| 6632 var o = buildLiveChatMessageSnippet(); | 6589 var o = buildLiveChatMessageSnippet(); |
| 6633 var od = new api.LiveChatMessageSnippet.fromJson(o.toJson()); | 6590 var od = new api.LiveChatMessageSnippet.fromJson(o.toJson()); |
| 6634 checkLiveChatMessageSnippet(od); | 6591 checkLiveChatMessageSnippet(od); |
| 6635 }); | 6592 }); |
| 6636 }); | 6593 }); |
| 6637 | 6594 |
| 6638 | |
| 6639 unittest.group("obj-schema-LiveChatModerator", () { | 6595 unittest.group("obj-schema-LiveChatModerator", () { |
| 6640 unittest.test("to-json--from-json", () { | 6596 unittest.test("to-json--from-json", () { |
| 6641 var o = buildLiveChatModerator(); | 6597 var o = buildLiveChatModerator(); |
| 6642 var od = new api.LiveChatModerator.fromJson(o.toJson()); | 6598 var od = new api.LiveChatModerator.fromJson(o.toJson()); |
| 6643 checkLiveChatModerator(od); | 6599 checkLiveChatModerator(od); |
| 6644 }); | 6600 }); |
| 6645 }); | 6601 }); |
| 6646 | 6602 |
| 6647 | |
| 6648 unittest.group("obj-schema-LiveChatModeratorListResponse", () { | 6603 unittest.group("obj-schema-LiveChatModeratorListResponse", () { |
| 6649 unittest.test("to-json--from-json", () { | 6604 unittest.test("to-json--from-json", () { |
| 6650 var o = buildLiveChatModeratorListResponse(); | 6605 var o = buildLiveChatModeratorListResponse(); |
| 6651 var od = new api.LiveChatModeratorListResponse.fromJson(o.toJson()); | 6606 var od = new api.LiveChatModeratorListResponse.fromJson(o.toJson()); |
| 6652 checkLiveChatModeratorListResponse(od); | 6607 checkLiveChatModeratorListResponse(od); |
| 6653 }); | 6608 }); |
| 6654 }); | 6609 }); |
| 6655 | 6610 |
| 6656 | |
| 6657 unittest.group("obj-schema-LiveChatModeratorSnippet", () { | 6611 unittest.group("obj-schema-LiveChatModeratorSnippet", () { |
| 6658 unittest.test("to-json--from-json", () { | 6612 unittest.test("to-json--from-json", () { |
| 6659 var o = buildLiveChatModeratorSnippet(); | 6613 var o = buildLiveChatModeratorSnippet(); |
| 6660 var od = new api.LiveChatModeratorSnippet.fromJson(o.toJson()); | 6614 var od = new api.LiveChatModeratorSnippet.fromJson(o.toJson()); |
| 6661 checkLiveChatModeratorSnippet(od); | 6615 checkLiveChatModeratorSnippet(od); |
| 6662 }); | 6616 }); |
| 6663 }); | 6617 }); |
| 6664 | 6618 |
| 6665 | |
| 6666 unittest.group("obj-schema-LiveChatPollClosedDetails", () { | 6619 unittest.group("obj-schema-LiveChatPollClosedDetails", () { |
| 6667 unittest.test("to-json--from-json", () { | 6620 unittest.test("to-json--from-json", () { |
| 6668 var o = buildLiveChatPollClosedDetails(); | 6621 var o = buildLiveChatPollClosedDetails(); |
| 6669 var od = new api.LiveChatPollClosedDetails.fromJson(o.toJson()); | 6622 var od = new api.LiveChatPollClosedDetails.fromJson(o.toJson()); |
| 6670 checkLiveChatPollClosedDetails(od); | 6623 checkLiveChatPollClosedDetails(od); |
| 6671 }); | 6624 }); |
| 6672 }); | 6625 }); |
| 6673 | 6626 |
| 6674 | |
| 6675 unittest.group("obj-schema-LiveChatPollEditedDetails", () { | 6627 unittest.group("obj-schema-LiveChatPollEditedDetails", () { |
| 6676 unittest.test("to-json--from-json", () { | 6628 unittest.test("to-json--from-json", () { |
| 6677 var o = buildLiveChatPollEditedDetails(); | 6629 var o = buildLiveChatPollEditedDetails(); |
| 6678 var od = new api.LiveChatPollEditedDetails.fromJson(o.toJson()); | 6630 var od = new api.LiveChatPollEditedDetails.fromJson(o.toJson()); |
| 6679 checkLiveChatPollEditedDetails(od); | 6631 checkLiveChatPollEditedDetails(od); |
| 6680 }); | 6632 }); |
| 6681 }); | 6633 }); |
| 6682 | 6634 |
| 6683 | |
| 6684 unittest.group("obj-schema-LiveChatPollItem", () { | 6635 unittest.group("obj-schema-LiveChatPollItem", () { |
| 6685 unittest.test("to-json--from-json", () { | 6636 unittest.test("to-json--from-json", () { |
| 6686 var o = buildLiveChatPollItem(); | 6637 var o = buildLiveChatPollItem(); |
| 6687 var od = new api.LiveChatPollItem.fromJson(o.toJson()); | 6638 var od = new api.LiveChatPollItem.fromJson(o.toJson()); |
| 6688 checkLiveChatPollItem(od); | 6639 checkLiveChatPollItem(od); |
| 6689 }); | 6640 }); |
| 6690 }); | 6641 }); |
| 6691 | 6642 |
| 6692 | |
| 6693 unittest.group("obj-schema-LiveChatPollOpenedDetails", () { | 6643 unittest.group("obj-schema-LiveChatPollOpenedDetails", () { |
| 6694 unittest.test("to-json--from-json", () { | 6644 unittest.test("to-json--from-json", () { |
| 6695 var o = buildLiveChatPollOpenedDetails(); | 6645 var o = buildLiveChatPollOpenedDetails(); |
| 6696 var od = new api.LiveChatPollOpenedDetails.fromJson(o.toJson()); | 6646 var od = new api.LiveChatPollOpenedDetails.fromJson(o.toJson()); |
| 6697 checkLiveChatPollOpenedDetails(od); | 6647 checkLiveChatPollOpenedDetails(od); |
| 6698 }); | 6648 }); |
| 6699 }); | 6649 }); |
| 6700 | 6650 |
| 6701 | |
| 6702 unittest.group("obj-schema-LiveChatPollVotedDetails", () { | 6651 unittest.group("obj-schema-LiveChatPollVotedDetails", () { |
| 6703 unittest.test("to-json--from-json", () { | 6652 unittest.test("to-json--from-json", () { |
| 6704 var o = buildLiveChatPollVotedDetails(); | 6653 var o = buildLiveChatPollVotedDetails(); |
| 6705 var od = new api.LiveChatPollVotedDetails.fromJson(o.toJson()); | 6654 var od = new api.LiveChatPollVotedDetails.fromJson(o.toJson()); |
| 6706 checkLiveChatPollVotedDetails(od); | 6655 checkLiveChatPollVotedDetails(od); |
| 6707 }); | 6656 }); |
| 6708 }); | 6657 }); |
| 6709 | 6658 |
| 6710 | |
| 6711 unittest.group("obj-schema-LiveChatSuperChatDetails", () { | 6659 unittest.group("obj-schema-LiveChatSuperChatDetails", () { |
| 6712 unittest.test("to-json--from-json", () { | 6660 unittest.test("to-json--from-json", () { |
| 6713 var o = buildLiveChatSuperChatDetails(); | 6661 var o = buildLiveChatSuperChatDetails(); |
| 6714 var od = new api.LiveChatSuperChatDetails.fromJson(o.toJson()); | 6662 var od = new api.LiveChatSuperChatDetails.fromJson(o.toJson()); |
| 6715 checkLiveChatSuperChatDetails(od); | 6663 checkLiveChatSuperChatDetails(od); |
| 6716 }); | 6664 }); |
| 6717 }); | 6665 }); |
| 6718 | 6666 |
| 6719 | |
| 6720 unittest.group("obj-schema-LiveChatTextMessageDetails", () { | 6667 unittest.group("obj-schema-LiveChatTextMessageDetails", () { |
| 6721 unittest.test("to-json--from-json", () { | 6668 unittest.test("to-json--from-json", () { |
| 6722 var o = buildLiveChatTextMessageDetails(); | 6669 var o = buildLiveChatTextMessageDetails(); |
| 6723 var od = new api.LiveChatTextMessageDetails.fromJson(o.toJson()); | 6670 var od = new api.LiveChatTextMessageDetails.fromJson(o.toJson()); |
| 6724 checkLiveChatTextMessageDetails(od); | 6671 checkLiveChatTextMessageDetails(od); |
| 6725 }); | 6672 }); |
| 6726 }); | 6673 }); |
| 6727 | 6674 |
| 6728 | |
| 6729 unittest.group("obj-schema-LiveChatUserBannedMessageDetails", () { | 6675 unittest.group("obj-schema-LiveChatUserBannedMessageDetails", () { |
| 6730 unittest.test("to-json--from-json", () { | 6676 unittest.test("to-json--from-json", () { |
| 6731 var o = buildLiveChatUserBannedMessageDetails(); | 6677 var o = buildLiveChatUserBannedMessageDetails(); |
| 6732 var od = new api.LiveChatUserBannedMessageDetails.fromJson(o.toJson()); | 6678 var od = new api.LiveChatUserBannedMessageDetails.fromJson(o.toJson()); |
| 6733 checkLiveChatUserBannedMessageDetails(od); | 6679 checkLiveChatUserBannedMessageDetails(od); |
| 6734 }); | 6680 }); |
| 6735 }); | 6681 }); |
| 6736 | 6682 |
| 6737 | |
| 6738 unittest.group("obj-schema-LiveStream", () { | 6683 unittest.group("obj-schema-LiveStream", () { |
| 6739 unittest.test("to-json--from-json", () { | 6684 unittest.test("to-json--from-json", () { |
| 6740 var o = buildLiveStream(); | 6685 var o = buildLiveStream(); |
| 6741 var od = new api.LiveStream.fromJson(o.toJson()); | 6686 var od = new api.LiveStream.fromJson(o.toJson()); |
| 6742 checkLiveStream(od); | 6687 checkLiveStream(od); |
| 6743 }); | 6688 }); |
| 6744 }); | 6689 }); |
| 6745 | 6690 |
| 6746 | |
| 6747 unittest.group("obj-schema-LiveStreamConfigurationIssue", () { | 6691 unittest.group("obj-schema-LiveStreamConfigurationIssue", () { |
| 6748 unittest.test("to-json--from-json", () { | 6692 unittest.test("to-json--from-json", () { |
| 6749 var o = buildLiveStreamConfigurationIssue(); | 6693 var o = buildLiveStreamConfigurationIssue(); |
| 6750 var od = new api.LiveStreamConfigurationIssue.fromJson(o.toJson()); | 6694 var od = new api.LiveStreamConfigurationIssue.fromJson(o.toJson()); |
| 6751 checkLiveStreamConfigurationIssue(od); | 6695 checkLiveStreamConfigurationIssue(od); |
| 6752 }); | 6696 }); |
| 6753 }); | 6697 }); |
| 6754 | 6698 |
| 6755 | |
| 6756 unittest.group("obj-schema-LiveStreamContentDetails", () { | 6699 unittest.group("obj-schema-LiveStreamContentDetails", () { |
| 6757 unittest.test("to-json--from-json", () { | 6700 unittest.test("to-json--from-json", () { |
| 6758 var o = buildLiveStreamContentDetails(); | 6701 var o = buildLiveStreamContentDetails(); |
| 6759 var od = new api.LiveStreamContentDetails.fromJson(o.toJson()); | 6702 var od = new api.LiveStreamContentDetails.fromJson(o.toJson()); |
| 6760 checkLiveStreamContentDetails(od); | 6703 checkLiveStreamContentDetails(od); |
| 6761 }); | 6704 }); |
| 6762 }); | 6705 }); |
| 6763 | 6706 |
| 6764 | |
| 6765 unittest.group("obj-schema-LiveStreamHealthStatus", () { | 6707 unittest.group("obj-schema-LiveStreamHealthStatus", () { |
| 6766 unittest.test("to-json--from-json", () { | 6708 unittest.test("to-json--from-json", () { |
| 6767 var o = buildLiveStreamHealthStatus(); | 6709 var o = buildLiveStreamHealthStatus(); |
| 6768 var od = new api.LiveStreamHealthStatus.fromJson(o.toJson()); | 6710 var od = new api.LiveStreamHealthStatus.fromJson(o.toJson()); |
| 6769 checkLiveStreamHealthStatus(od); | 6711 checkLiveStreamHealthStatus(od); |
| 6770 }); | 6712 }); |
| 6771 }); | 6713 }); |
| 6772 | 6714 |
| 6773 | |
| 6774 unittest.group("obj-schema-LiveStreamListResponse", () { | 6715 unittest.group("obj-schema-LiveStreamListResponse", () { |
| 6775 unittest.test("to-json--from-json", () { | 6716 unittest.test("to-json--from-json", () { |
| 6776 var o = buildLiveStreamListResponse(); | 6717 var o = buildLiveStreamListResponse(); |
| 6777 var od = new api.LiveStreamListResponse.fromJson(o.toJson()); | 6718 var od = new api.LiveStreamListResponse.fromJson(o.toJson()); |
| 6778 checkLiveStreamListResponse(od); | 6719 checkLiveStreamListResponse(od); |
| 6779 }); | 6720 }); |
| 6780 }); | 6721 }); |
| 6781 | 6722 |
| 6782 | |
| 6783 unittest.group("obj-schema-LiveStreamSnippet", () { | 6723 unittest.group("obj-schema-LiveStreamSnippet", () { |
| 6784 unittest.test("to-json--from-json", () { | 6724 unittest.test("to-json--from-json", () { |
| 6785 var o = buildLiveStreamSnippet(); | 6725 var o = buildLiveStreamSnippet(); |
| 6786 var od = new api.LiveStreamSnippet.fromJson(o.toJson()); | 6726 var od = new api.LiveStreamSnippet.fromJson(o.toJson()); |
| 6787 checkLiveStreamSnippet(od); | 6727 checkLiveStreamSnippet(od); |
| 6788 }); | 6728 }); |
| 6789 }); | 6729 }); |
| 6790 | 6730 |
| 6791 | |
| 6792 unittest.group("obj-schema-LiveStreamStatus", () { | 6731 unittest.group("obj-schema-LiveStreamStatus", () { |
| 6793 unittest.test("to-json--from-json", () { | 6732 unittest.test("to-json--from-json", () { |
| 6794 var o = buildLiveStreamStatus(); | 6733 var o = buildLiveStreamStatus(); |
| 6795 var od = new api.LiveStreamStatus.fromJson(o.toJson()); | 6734 var od = new api.LiveStreamStatus.fromJson(o.toJson()); |
| 6796 checkLiveStreamStatus(od); | 6735 checkLiveStreamStatus(od); |
| 6797 }); | 6736 }); |
| 6798 }); | 6737 }); |
| 6799 | 6738 |
| 6800 | |
| 6801 unittest.group("obj-schema-LocalizedProperty", () { | 6739 unittest.group("obj-schema-LocalizedProperty", () { |
| 6802 unittest.test("to-json--from-json", () { | 6740 unittest.test("to-json--from-json", () { |
| 6803 var o = buildLocalizedProperty(); | 6741 var o = buildLocalizedProperty(); |
| 6804 var od = new api.LocalizedProperty.fromJson(o.toJson()); | 6742 var od = new api.LocalizedProperty.fromJson(o.toJson()); |
| 6805 checkLocalizedProperty(od); | 6743 checkLocalizedProperty(od); |
| 6806 }); | 6744 }); |
| 6807 }); | 6745 }); |
| 6808 | 6746 |
| 6809 | |
| 6810 unittest.group("obj-schema-LocalizedString", () { | 6747 unittest.group("obj-schema-LocalizedString", () { |
| 6811 unittest.test("to-json--from-json", () { | 6748 unittest.test("to-json--from-json", () { |
| 6812 var o = buildLocalizedString(); | 6749 var o = buildLocalizedString(); |
| 6813 var od = new api.LocalizedString.fromJson(o.toJson()); | 6750 var od = new api.LocalizedString.fromJson(o.toJson()); |
| 6814 checkLocalizedString(od); | 6751 checkLocalizedString(od); |
| 6815 }); | 6752 }); |
| 6816 }); | 6753 }); |
| 6817 | 6754 |
| 6818 | |
| 6819 unittest.group("obj-schema-MonitorStreamInfo", () { | 6755 unittest.group("obj-schema-MonitorStreamInfo", () { |
| 6820 unittest.test("to-json--from-json", () { | 6756 unittest.test("to-json--from-json", () { |
| 6821 var o = buildMonitorStreamInfo(); | 6757 var o = buildMonitorStreamInfo(); |
| 6822 var od = new api.MonitorStreamInfo.fromJson(o.toJson()); | 6758 var od = new api.MonitorStreamInfo.fromJson(o.toJson()); |
| 6823 checkMonitorStreamInfo(od); | 6759 checkMonitorStreamInfo(od); |
| 6824 }); | 6760 }); |
| 6825 }); | 6761 }); |
| 6826 | 6762 |
| 6827 | |
| 6828 unittest.group("obj-schema-PageInfo", () { | 6763 unittest.group("obj-schema-PageInfo", () { |
| 6829 unittest.test("to-json--from-json", () { | 6764 unittest.test("to-json--from-json", () { |
| 6830 var o = buildPageInfo(); | 6765 var o = buildPageInfo(); |
| 6831 var od = new api.PageInfo.fromJson(o.toJson()); | 6766 var od = new api.PageInfo.fromJson(o.toJson()); |
| 6832 checkPageInfo(od); | 6767 checkPageInfo(od); |
| 6833 }); | 6768 }); |
| 6834 }); | 6769 }); |
| 6835 | 6770 |
| 6836 | |
| 6837 unittest.group("obj-schema-Playlist", () { | 6771 unittest.group("obj-schema-Playlist", () { |
| 6838 unittest.test("to-json--from-json", () { | 6772 unittest.test("to-json--from-json", () { |
| 6839 var o = buildPlaylist(); | 6773 var o = buildPlaylist(); |
| 6840 var od = new api.Playlist.fromJson(o.toJson()); | 6774 var od = new api.Playlist.fromJson(o.toJson()); |
| 6841 checkPlaylist(od); | 6775 checkPlaylist(od); |
| 6842 }); | 6776 }); |
| 6843 }); | 6777 }); |
| 6844 | 6778 |
| 6845 | |
| 6846 unittest.group("obj-schema-PlaylistContentDetails", () { | 6779 unittest.group("obj-schema-PlaylistContentDetails", () { |
| 6847 unittest.test("to-json--from-json", () { | 6780 unittest.test("to-json--from-json", () { |
| 6848 var o = buildPlaylistContentDetails(); | 6781 var o = buildPlaylistContentDetails(); |
| 6849 var od = new api.PlaylistContentDetails.fromJson(o.toJson()); | 6782 var od = new api.PlaylistContentDetails.fromJson(o.toJson()); |
| 6850 checkPlaylistContentDetails(od); | 6783 checkPlaylistContentDetails(od); |
| 6851 }); | 6784 }); |
| 6852 }); | 6785 }); |
| 6853 | 6786 |
| 6854 | |
| 6855 unittest.group("obj-schema-PlaylistItem", () { | 6787 unittest.group("obj-schema-PlaylistItem", () { |
| 6856 unittest.test("to-json--from-json", () { | 6788 unittest.test("to-json--from-json", () { |
| 6857 var o = buildPlaylistItem(); | 6789 var o = buildPlaylistItem(); |
| 6858 var od = new api.PlaylistItem.fromJson(o.toJson()); | 6790 var od = new api.PlaylistItem.fromJson(o.toJson()); |
| 6859 checkPlaylistItem(od); | 6791 checkPlaylistItem(od); |
| 6860 }); | 6792 }); |
| 6861 }); | 6793 }); |
| 6862 | 6794 |
| 6863 | |
| 6864 unittest.group("obj-schema-PlaylistItemContentDetails", () { | 6795 unittest.group("obj-schema-PlaylistItemContentDetails", () { |
| 6865 unittest.test("to-json--from-json", () { | 6796 unittest.test("to-json--from-json", () { |
| 6866 var o = buildPlaylistItemContentDetails(); | 6797 var o = buildPlaylistItemContentDetails(); |
| 6867 var od = new api.PlaylistItemContentDetails.fromJson(o.toJson()); | 6798 var od = new api.PlaylistItemContentDetails.fromJson(o.toJson()); |
| 6868 checkPlaylistItemContentDetails(od); | 6799 checkPlaylistItemContentDetails(od); |
| 6869 }); | 6800 }); |
| 6870 }); | 6801 }); |
| 6871 | 6802 |
| 6872 | |
| 6873 unittest.group("obj-schema-PlaylistItemListResponse", () { | 6803 unittest.group("obj-schema-PlaylistItemListResponse", () { |
| 6874 unittest.test("to-json--from-json", () { | 6804 unittest.test("to-json--from-json", () { |
| 6875 var o = buildPlaylistItemListResponse(); | 6805 var o = buildPlaylistItemListResponse(); |
| 6876 var od = new api.PlaylistItemListResponse.fromJson(o.toJson()); | 6806 var od = new api.PlaylistItemListResponse.fromJson(o.toJson()); |
| 6877 checkPlaylistItemListResponse(od); | 6807 checkPlaylistItemListResponse(od); |
| 6878 }); | 6808 }); |
| 6879 }); | 6809 }); |
| 6880 | 6810 |
| 6881 | |
| 6882 unittest.group("obj-schema-PlaylistItemSnippet", () { | 6811 unittest.group("obj-schema-PlaylistItemSnippet", () { |
| 6883 unittest.test("to-json--from-json", () { | 6812 unittest.test("to-json--from-json", () { |
| 6884 var o = buildPlaylistItemSnippet(); | 6813 var o = buildPlaylistItemSnippet(); |
| 6885 var od = new api.PlaylistItemSnippet.fromJson(o.toJson()); | 6814 var od = new api.PlaylistItemSnippet.fromJson(o.toJson()); |
| 6886 checkPlaylistItemSnippet(od); | 6815 checkPlaylistItemSnippet(od); |
| 6887 }); | 6816 }); |
| 6888 }); | 6817 }); |
| 6889 | 6818 |
| 6890 | |
| 6891 unittest.group("obj-schema-PlaylistItemStatus", () { | 6819 unittest.group("obj-schema-PlaylistItemStatus", () { |
| 6892 unittest.test("to-json--from-json", () { | 6820 unittest.test("to-json--from-json", () { |
| 6893 var o = buildPlaylistItemStatus(); | 6821 var o = buildPlaylistItemStatus(); |
| 6894 var od = new api.PlaylistItemStatus.fromJson(o.toJson()); | 6822 var od = new api.PlaylistItemStatus.fromJson(o.toJson()); |
| 6895 checkPlaylistItemStatus(od); | 6823 checkPlaylistItemStatus(od); |
| 6896 }); | 6824 }); |
| 6897 }); | 6825 }); |
| 6898 | 6826 |
| 6899 | |
| 6900 unittest.group("obj-schema-PlaylistListResponse", () { | 6827 unittest.group("obj-schema-PlaylistListResponse", () { |
| 6901 unittest.test("to-json--from-json", () { | 6828 unittest.test("to-json--from-json", () { |
| 6902 var o = buildPlaylistListResponse(); | 6829 var o = buildPlaylistListResponse(); |
| 6903 var od = new api.PlaylistListResponse.fromJson(o.toJson()); | 6830 var od = new api.PlaylistListResponse.fromJson(o.toJson()); |
| 6904 checkPlaylistListResponse(od); | 6831 checkPlaylistListResponse(od); |
| 6905 }); | 6832 }); |
| 6906 }); | 6833 }); |
| 6907 | 6834 |
| 6908 | |
| 6909 unittest.group("obj-schema-PlaylistLocalization", () { | 6835 unittest.group("obj-schema-PlaylistLocalization", () { |
| 6910 unittest.test("to-json--from-json", () { | 6836 unittest.test("to-json--from-json", () { |
| 6911 var o = buildPlaylistLocalization(); | 6837 var o = buildPlaylistLocalization(); |
| 6912 var od = new api.PlaylistLocalization.fromJson(o.toJson()); | 6838 var od = new api.PlaylistLocalization.fromJson(o.toJson()); |
| 6913 checkPlaylistLocalization(od); | 6839 checkPlaylistLocalization(od); |
| 6914 }); | 6840 }); |
| 6915 }); | 6841 }); |
| 6916 | 6842 |
| 6917 | |
| 6918 unittest.group("obj-schema-PlaylistPlayer", () { | 6843 unittest.group("obj-schema-PlaylistPlayer", () { |
| 6919 unittest.test("to-json--from-json", () { | 6844 unittest.test("to-json--from-json", () { |
| 6920 var o = buildPlaylistPlayer(); | 6845 var o = buildPlaylistPlayer(); |
| 6921 var od = new api.PlaylistPlayer.fromJson(o.toJson()); | 6846 var od = new api.PlaylistPlayer.fromJson(o.toJson()); |
| 6922 checkPlaylistPlayer(od); | 6847 checkPlaylistPlayer(od); |
| 6923 }); | 6848 }); |
| 6924 }); | 6849 }); |
| 6925 | 6850 |
| 6926 | |
| 6927 unittest.group("obj-schema-PlaylistSnippet", () { | 6851 unittest.group("obj-schema-PlaylistSnippet", () { |
| 6928 unittest.test("to-json--from-json", () { | 6852 unittest.test("to-json--from-json", () { |
| 6929 var o = buildPlaylistSnippet(); | 6853 var o = buildPlaylistSnippet(); |
| 6930 var od = new api.PlaylistSnippet.fromJson(o.toJson()); | 6854 var od = new api.PlaylistSnippet.fromJson(o.toJson()); |
| 6931 checkPlaylistSnippet(od); | 6855 checkPlaylistSnippet(od); |
| 6932 }); | 6856 }); |
| 6933 }); | 6857 }); |
| 6934 | 6858 |
| 6935 | |
| 6936 unittest.group("obj-schema-PlaylistStatus", () { | 6859 unittest.group("obj-schema-PlaylistStatus", () { |
| 6937 unittest.test("to-json--from-json", () { | 6860 unittest.test("to-json--from-json", () { |
| 6938 var o = buildPlaylistStatus(); | 6861 var o = buildPlaylistStatus(); |
| 6939 var od = new api.PlaylistStatus.fromJson(o.toJson()); | 6862 var od = new api.PlaylistStatus.fromJson(o.toJson()); |
| 6940 checkPlaylistStatus(od); | 6863 checkPlaylistStatus(od); |
| 6941 }); | 6864 }); |
| 6942 }); | 6865 }); |
| 6943 | 6866 |
| 6944 | |
| 6945 unittest.group("obj-schema-PromotedItem", () { | 6867 unittest.group("obj-schema-PromotedItem", () { |
| 6946 unittest.test("to-json--from-json", () { | 6868 unittest.test("to-json--from-json", () { |
| 6947 var o = buildPromotedItem(); | 6869 var o = buildPromotedItem(); |
| 6948 var od = new api.PromotedItem.fromJson(o.toJson()); | 6870 var od = new api.PromotedItem.fromJson(o.toJson()); |
| 6949 checkPromotedItem(od); | 6871 checkPromotedItem(od); |
| 6950 }); | 6872 }); |
| 6951 }); | 6873 }); |
| 6952 | 6874 |
| 6953 | |
| 6954 unittest.group("obj-schema-PromotedItemId", () { | 6875 unittest.group("obj-schema-PromotedItemId", () { |
| 6955 unittest.test("to-json--from-json", () { | 6876 unittest.test("to-json--from-json", () { |
| 6956 var o = buildPromotedItemId(); | 6877 var o = buildPromotedItemId(); |
| 6957 var od = new api.PromotedItemId.fromJson(o.toJson()); | 6878 var od = new api.PromotedItemId.fromJson(o.toJson()); |
| 6958 checkPromotedItemId(od); | 6879 checkPromotedItemId(od); |
| 6959 }); | 6880 }); |
| 6960 }); | 6881 }); |
| 6961 | 6882 |
| 6962 | |
| 6963 unittest.group("obj-schema-PropertyValue", () { | 6883 unittest.group("obj-schema-PropertyValue", () { |
| 6964 unittest.test("to-json--from-json", () { | 6884 unittest.test("to-json--from-json", () { |
| 6965 var o = buildPropertyValue(); | 6885 var o = buildPropertyValue(); |
| 6966 var od = new api.PropertyValue.fromJson(o.toJson()); | 6886 var od = new api.PropertyValue.fromJson(o.toJson()); |
| 6967 checkPropertyValue(od); | 6887 checkPropertyValue(od); |
| 6968 }); | 6888 }); |
| 6969 }); | 6889 }); |
| 6970 | 6890 |
| 6971 | |
| 6972 unittest.group("obj-schema-ResourceId", () { | 6891 unittest.group("obj-schema-ResourceId", () { |
| 6973 unittest.test("to-json--from-json", () { | 6892 unittest.test("to-json--from-json", () { |
| 6974 var o = buildResourceId(); | 6893 var o = buildResourceId(); |
| 6975 var od = new api.ResourceId.fromJson(o.toJson()); | 6894 var od = new api.ResourceId.fromJson(o.toJson()); |
| 6976 checkResourceId(od); | 6895 checkResourceId(od); |
| 6977 }); | 6896 }); |
| 6978 }); | 6897 }); |
| 6979 | 6898 |
| 6980 | |
| 6981 unittest.group("obj-schema-SearchListResponse", () { | 6899 unittest.group("obj-schema-SearchListResponse", () { |
| 6982 unittest.test("to-json--from-json", () { | 6900 unittest.test("to-json--from-json", () { |
| 6983 var o = buildSearchListResponse(); | 6901 var o = buildSearchListResponse(); |
| 6984 var od = new api.SearchListResponse.fromJson(o.toJson()); | 6902 var od = new api.SearchListResponse.fromJson(o.toJson()); |
| 6985 checkSearchListResponse(od); | 6903 checkSearchListResponse(od); |
| 6986 }); | 6904 }); |
| 6987 }); | 6905 }); |
| 6988 | 6906 |
| 6989 | |
| 6990 unittest.group("obj-schema-SearchResult", () { | 6907 unittest.group("obj-schema-SearchResult", () { |
| 6991 unittest.test("to-json--from-json", () { | 6908 unittest.test("to-json--from-json", () { |
| 6992 var o = buildSearchResult(); | 6909 var o = buildSearchResult(); |
| 6993 var od = new api.SearchResult.fromJson(o.toJson()); | 6910 var od = new api.SearchResult.fromJson(o.toJson()); |
| 6994 checkSearchResult(od); | 6911 checkSearchResult(od); |
| 6995 }); | 6912 }); |
| 6996 }); | 6913 }); |
| 6997 | 6914 |
| 6998 | |
| 6999 unittest.group("obj-schema-SearchResultSnippet", () { | 6915 unittest.group("obj-schema-SearchResultSnippet", () { |
| 7000 unittest.test("to-json--from-json", () { | 6916 unittest.test("to-json--from-json", () { |
| 7001 var o = buildSearchResultSnippet(); | 6917 var o = buildSearchResultSnippet(); |
| 7002 var od = new api.SearchResultSnippet.fromJson(o.toJson()); | 6918 var od = new api.SearchResultSnippet.fromJson(o.toJson()); |
| 7003 checkSearchResultSnippet(od); | 6919 checkSearchResultSnippet(od); |
| 7004 }); | 6920 }); |
| 7005 }); | 6921 }); |
| 7006 | 6922 |
| 7007 | |
| 7008 unittest.group("obj-schema-Sponsor", () { | 6923 unittest.group("obj-schema-Sponsor", () { |
| 7009 unittest.test("to-json--from-json", () { | 6924 unittest.test("to-json--from-json", () { |
| 7010 var o = buildSponsor(); | 6925 var o = buildSponsor(); |
| 7011 var od = new api.Sponsor.fromJson(o.toJson()); | 6926 var od = new api.Sponsor.fromJson(o.toJson()); |
| 7012 checkSponsor(od); | 6927 checkSponsor(od); |
| 7013 }); | 6928 }); |
| 7014 }); | 6929 }); |
| 7015 | 6930 |
| 7016 | |
| 7017 unittest.group("obj-schema-SponsorListResponse", () { | 6931 unittest.group("obj-schema-SponsorListResponse", () { |
| 7018 unittest.test("to-json--from-json", () { | 6932 unittest.test("to-json--from-json", () { |
| 7019 var o = buildSponsorListResponse(); | 6933 var o = buildSponsorListResponse(); |
| 7020 var od = new api.SponsorListResponse.fromJson(o.toJson()); | 6934 var od = new api.SponsorListResponse.fromJson(o.toJson()); |
| 7021 checkSponsorListResponse(od); | 6935 checkSponsorListResponse(od); |
| 7022 }); | 6936 }); |
| 7023 }); | 6937 }); |
| 7024 | 6938 |
| 7025 | |
| 7026 unittest.group("obj-schema-SponsorSnippet", () { | 6939 unittest.group("obj-schema-SponsorSnippet", () { |
| 7027 unittest.test("to-json--from-json", () { | 6940 unittest.test("to-json--from-json", () { |
| 7028 var o = buildSponsorSnippet(); | 6941 var o = buildSponsorSnippet(); |
| 7029 var od = new api.SponsorSnippet.fromJson(o.toJson()); | 6942 var od = new api.SponsorSnippet.fromJson(o.toJson()); |
| 7030 checkSponsorSnippet(od); | 6943 checkSponsorSnippet(od); |
| 7031 }); | 6944 }); |
| 7032 }); | 6945 }); |
| 7033 | 6946 |
| 7034 | |
| 7035 unittest.group("obj-schema-Subscription", () { | 6947 unittest.group("obj-schema-Subscription", () { |
| 7036 unittest.test("to-json--from-json", () { | 6948 unittest.test("to-json--from-json", () { |
| 7037 var o = buildSubscription(); | 6949 var o = buildSubscription(); |
| 7038 var od = new api.Subscription.fromJson(o.toJson()); | 6950 var od = new api.Subscription.fromJson(o.toJson()); |
| 7039 checkSubscription(od); | 6951 checkSubscription(od); |
| 7040 }); | 6952 }); |
| 7041 }); | 6953 }); |
| 7042 | 6954 |
| 7043 | |
| 7044 unittest.group("obj-schema-SubscriptionContentDetails", () { | 6955 unittest.group("obj-schema-SubscriptionContentDetails", () { |
| 7045 unittest.test("to-json--from-json", () { | 6956 unittest.test("to-json--from-json", () { |
| 7046 var o = buildSubscriptionContentDetails(); | 6957 var o = buildSubscriptionContentDetails(); |
| 7047 var od = new api.SubscriptionContentDetails.fromJson(o.toJson()); | 6958 var od = new api.SubscriptionContentDetails.fromJson(o.toJson()); |
| 7048 checkSubscriptionContentDetails(od); | 6959 checkSubscriptionContentDetails(od); |
| 7049 }); | 6960 }); |
| 7050 }); | 6961 }); |
| 7051 | 6962 |
| 7052 | |
| 7053 unittest.group("obj-schema-SubscriptionListResponse", () { | 6963 unittest.group("obj-schema-SubscriptionListResponse", () { |
| 7054 unittest.test("to-json--from-json", () { | 6964 unittest.test("to-json--from-json", () { |
| 7055 var o = buildSubscriptionListResponse(); | 6965 var o = buildSubscriptionListResponse(); |
| 7056 var od = new api.SubscriptionListResponse.fromJson(o.toJson()); | 6966 var od = new api.SubscriptionListResponse.fromJson(o.toJson()); |
| 7057 checkSubscriptionListResponse(od); | 6967 checkSubscriptionListResponse(od); |
| 7058 }); | 6968 }); |
| 7059 }); | 6969 }); |
| 7060 | 6970 |
| 7061 | |
| 7062 unittest.group("obj-schema-SubscriptionSnippet", () { | 6971 unittest.group("obj-schema-SubscriptionSnippet", () { |
| 7063 unittest.test("to-json--from-json", () { | 6972 unittest.test("to-json--from-json", () { |
| 7064 var o = buildSubscriptionSnippet(); | 6973 var o = buildSubscriptionSnippet(); |
| 7065 var od = new api.SubscriptionSnippet.fromJson(o.toJson()); | 6974 var od = new api.SubscriptionSnippet.fromJson(o.toJson()); |
| 7066 checkSubscriptionSnippet(od); | 6975 checkSubscriptionSnippet(od); |
| 7067 }); | 6976 }); |
| 7068 }); | 6977 }); |
| 7069 | 6978 |
| 7070 | |
| 7071 unittest.group("obj-schema-SubscriptionSubscriberSnippet", () { | 6979 unittest.group("obj-schema-SubscriptionSubscriberSnippet", () { |
| 7072 unittest.test("to-json--from-json", () { | 6980 unittest.test("to-json--from-json", () { |
| 7073 var o = buildSubscriptionSubscriberSnippet(); | 6981 var o = buildSubscriptionSubscriberSnippet(); |
| 7074 var od = new api.SubscriptionSubscriberSnippet.fromJson(o.toJson()); | 6982 var od = new api.SubscriptionSubscriberSnippet.fromJson(o.toJson()); |
| 7075 checkSubscriptionSubscriberSnippet(od); | 6983 checkSubscriptionSubscriberSnippet(od); |
| 7076 }); | 6984 }); |
| 7077 }); | 6985 }); |
| 7078 | 6986 |
| 7079 | |
| 7080 unittest.group("obj-schema-SuperChatEvent", () { | 6987 unittest.group("obj-schema-SuperChatEvent", () { |
| 7081 unittest.test("to-json--from-json", () { | 6988 unittest.test("to-json--from-json", () { |
| 7082 var o = buildSuperChatEvent(); | 6989 var o = buildSuperChatEvent(); |
| 7083 var od = new api.SuperChatEvent.fromJson(o.toJson()); | 6990 var od = new api.SuperChatEvent.fromJson(o.toJson()); |
| 7084 checkSuperChatEvent(od); | 6991 checkSuperChatEvent(od); |
| 7085 }); | 6992 }); |
| 7086 }); | 6993 }); |
| 7087 | 6994 |
| 7088 | |
| 7089 unittest.group("obj-schema-SuperChatEventListResponse", () { | 6995 unittest.group("obj-schema-SuperChatEventListResponse", () { |
| 7090 unittest.test("to-json--from-json", () { | 6996 unittest.test("to-json--from-json", () { |
| 7091 var o = buildSuperChatEventListResponse(); | 6997 var o = buildSuperChatEventListResponse(); |
| 7092 var od = new api.SuperChatEventListResponse.fromJson(o.toJson()); | 6998 var od = new api.SuperChatEventListResponse.fromJson(o.toJson()); |
| 7093 checkSuperChatEventListResponse(od); | 6999 checkSuperChatEventListResponse(od); |
| 7094 }); | 7000 }); |
| 7095 }); | 7001 }); |
| 7096 | 7002 |
| 7097 | |
| 7098 unittest.group("obj-schema-SuperChatEventSnippet", () { | 7003 unittest.group("obj-schema-SuperChatEventSnippet", () { |
| 7099 unittest.test("to-json--from-json", () { | 7004 unittest.test("to-json--from-json", () { |
| 7100 var o = buildSuperChatEventSnippet(); | 7005 var o = buildSuperChatEventSnippet(); |
| 7101 var od = new api.SuperChatEventSnippet.fromJson(o.toJson()); | 7006 var od = new api.SuperChatEventSnippet.fromJson(o.toJson()); |
| 7102 checkSuperChatEventSnippet(od); | 7007 checkSuperChatEventSnippet(od); |
| 7103 }); | 7008 }); |
| 7104 }); | 7009 }); |
| 7105 | 7010 |
| 7106 | |
| 7107 unittest.group("obj-schema-Thumbnail", () { | 7011 unittest.group("obj-schema-Thumbnail", () { |
| 7108 unittest.test("to-json--from-json", () { | 7012 unittest.test("to-json--from-json", () { |
| 7109 var o = buildThumbnail(); | 7013 var o = buildThumbnail(); |
| 7110 var od = new api.Thumbnail.fromJson(o.toJson()); | 7014 var od = new api.Thumbnail.fromJson(o.toJson()); |
| 7111 checkThumbnail(od); | 7015 checkThumbnail(od); |
| 7112 }); | 7016 }); |
| 7113 }); | 7017 }); |
| 7114 | 7018 |
| 7115 | |
| 7116 unittest.group("obj-schema-ThumbnailDetails", () { | 7019 unittest.group("obj-schema-ThumbnailDetails", () { |
| 7117 unittest.test("to-json--from-json", () { | 7020 unittest.test("to-json--from-json", () { |
| 7118 var o = buildThumbnailDetails(); | 7021 var o = buildThumbnailDetails(); |
| 7119 var od = new api.ThumbnailDetails.fromJson(o.toJson()); | 7022 var od = new api.ThumbnailDetails.fromJson(o.toJson()); |
| 7120 checkThumbnailDetails(od); | 7023 checkThumbnailDetails(od); |
| 7121 }); | 7024 }); |
| 7122 }); | 7025 }); |
| 7123 | 7026 |
| 7124 | |
| 7125 unittest.group("obj-schema-ThumbnailSetResponse", () { | 7027 unittest.group("obj-schema-ThumbnailSetResponse", () { |
| 7126 unittest.test("to-json--from-json", () { | 7028 unittest.test("to-json--from-json", () { |
| 7127 var o = buildThumbnailSetResponse(); | 7029 var o = buildThumbnailSetResponse(); |
| 7128 var od = new api.ThumbnailSetResponse.fromJson(o.toJson()); | 7030 var od = new api.ThumbnailSetResponse.fromJson(o.toJson()); |
| 7129 checkThumbnailSetResponse(od); | 7031 checkThumbnailSetResponse(od); |
| 7130 }); | 7032 }); |
| 7131 }); | 7033 }); |
| 7132 | 7034 |
| 7133 | |
| 7134 unittest.group("obj-schema-TokenPagination", () { | 7035 unittest.group("obj-schema-TokenPagination", () { |
| 7135 unittest.test("to-json--from-json", () { | 7036 unittest.test("to-json--from-json", () { |
| 7136 var o = buildTokenPagination(); | 7037 var o = buildTokenPagination(); |
| 7137 var od = new api.TokenPagination.fromJson(o.toJson()); | 7038 var od = new api.TokenPagination.fromJson(o.toJson()); |
| 7138 checkTokenPagination(od); | 7039 checkTokenPagination(od); |
| 7139 }); | 7040 }); |
| 7140 }); | 7041 }); |
| 7141 | 7042 |
| 7142 | |
| 7143 unittest.group("obj-schema-Video", () { | 7043 unittest.group("obj-schema-Video", () { |
| 7144 unittest.test("to-json--from-json", () { | 7044 unittest.test("to-json--from-json", () { |
| 7145 var o = buildVideo(); | 7045 var o = buildVideo(); |
| 7146 var od = new api.Video.fromJson(o.toJson()); | 7046 var od = new api.Video.fromJson(o.toJson()); |
| 7147 checkVideo(od); | 7047 checkVideo(od); |
| 7148 }); | 7048 }); |
| 7149 }); | 7049 }); |
| 7150 | 7050 |
| 7151 | |
| 7152 unittest.group("obj-schema-VideoAbuseReport", () { | 7051 unittest.group("obj-schema-VideoAbuseReport", () { |
| 7153 unittest.test("to-json--from-json", () { | 7052 unittest.test("to-json--from-json", () { |
| 7154 var o = buildVideoAbuseReport(); | 7053 var o = buildVideoAbuseReport(); |
| 7155 var od = new api.VideoAbuseReport.fromJson(o.toJson()); | 7054 var od = new api.VideoAbuseReport.fromJson(o.toJson()); |
| 7156 checkVideoAbuseReport(od); | 7055 checkVideoAbuseReport(od); |
| 7157 }); | 7056 }); |
| 7158 }); | 7057 }); |
| 7159 | 7058 |
| 7160 | |
| 7161 unittest.group("obj-schema-VideoAbuseReportReason", () { | 7059 unittest.group("obj-schema-VideoAbuseReportReason", () { |
| 7162 unittest.test("to-json--from-json", () { | 7060 unittest.test("to-json--from-json", () { |
| 7163 var o = buildVideoAbuseReportReason(); | 7061 var o = buildVideoAbuseReportReason(); |
| 7164 var od = new api.VideoAbuseReportReason.fromJson(o.toJson()); | 7062 var od = new api.VideoAbuseReportReason.fromJson(o.toJson()); |
| 7165 checkVideoAbuseReportReason(od); | 7063 checkVideoAbuseReportReason(od); |
| 7166 }); | 7064 }); |
| 7167 }); | 7065 }); |
| 7168 | 7066 |
| 7169 | |
| 7170 unittest.group("obj-schema-VideoAbuseReportReasonListResponse", () { | 7067 unittest.group("obj-schema-VideoAbuseReportReasonListResponse", () { |
| 7171 unittest.test("to-json--from-json", () { | 7068 unittest.test("to-json--from-json", () { |
| 7172 var o = buildVideoAbuseReportReasonListResponse(); | 7069 var o = buildVideoAbuseReportReasonListResponse(); |
| 7173 var od = new api.VideoAbuseReportReasonListResponse.fromJson(o.toJson()); | 7070 var od = new api.VideoAbuseReportReasonListResponse.fromJson(o.toJson()); |
| 7174 checkVideoAbuseReportReasonListResponse(od); | 7071 checkVideoAbuseReportReasonListResponse(od); |
| 7175 }); | 7072 }); |
| 7176 }); | 7073 }); |
| 7177 | 7074 |
| 7178 | |
| 7179 unittest.group("obj-schema-VideoAbuseReportReasonSnippet", () { | 7075 unittest.group("obj-schema-VideoAbuseReportReasonSnippet", () { |
| 7180 unittest.test("to-json--from-json", () { | 7076 unittest.test("to-json--from-json", () { |
| 7181 var o = buildVideoAbuseReportReasonSnippet(); | 7077 var o = buildVideoAbuseReportReasonSnippet(); |
| 7182 var od = new api.VideoAbuseReportReasonSnippet.fromJson(o.toJson()); | 7078 var od = new api.VideoAbuseReportReasonSnippet.fromJson(o.toJson()); |
| 7183 checkVideoAbuseReportReasonSnippet(od); | 7079 checkVideoAbuseReportReasonSnippet(od); |
| 7184 }); | 7080 }); |
| 7185 }); | 7081 }); |
| 7186 | 7082 |
| 7187 | |
| 7188 unittest.group("obj-schema-VideoAbuseReportSecondaryReason", () { | 7083 unittest.group("obj-schema-VideoAbuseReportSecondaryReason", () { |
| 7189 unittest.test("to-json--from-json", () { | 7084 unittest.test("to-json--from-json", () { |
| 7190 var o = buildVideoAbuseReportSecondaryReason(); | 7085 var o = buildVideoAbuseReportSecondaryReason(); |
| 7191 var od = new api.VideoAbuseReportSecondaryReason.fromJson(o.toJson()); | 7086 var od = new api.VideoAbuseReportSecondaryReason.fromJson(o.toJson()); |
| 7192 checkVideoAbuseReportSecondaryReason(od); | 7087 checkVideoAbuseReportSecondaryReason(od); |
| 7193 }); | 7088 }); |
| 7194 }); | 7089 }); |
| 7195 | 7090 |
| 7196 | |
| 7197 unittest.group("obj-schema-VideoAgeGating", () { | 7091 unittest.group("obj-schema-VideoAgeGating", () { |
| 7198 unittest.test("to-json--from-json", () { | 7092 unittest.test("to-json--from-json", () { |
| 7199 var o = buildVideoAgeGating(); | 7093 var o = buildVideoAgeGating(); |
| 7200 var od = new api.VideoAgeGating.fromJson(o.toJson()); | 7094 var od = new api.VideoAgeGating.fromJson(o.toJson()); |
| 7201 checkVideoAgeGating(od); | 7095 checkVideoAgeGating(od); |
| 7202 }); | 7096 }); |
| 7203 }); | 7097 }); |
| 7204 | 7098 |
| 7205 | |
| 7206 unittest.group("obj-schema-VideoCategory", () { | 7099 unittest.group("obj-schema-VideoCategory", () { |
| 7207 unittest.test("to-json--from-json", () { | 7100 unittest.test("to-json--from-json", () { |
| 7208 var o = buildVideoCategory(); | 7101 var o = buildVideoCategory(); |
| 7209 var od = new api.VideoCategory.fromJson(o.toJson()); | 7102 var od = new api.VideoCategory.fromJson(o.toJson()); |
| 7210 checkVideoCategory(od); | 7103 checkVideoCategory(od); |
| 7211 }); | 7104 }); |
| 7212 }); | 7105 }); |
| 7213 | 7106 |
| 7214 | |
| 7215 unittest.group("obj-schema-VideoCategoryListResponse", () { | 7107 unittest.group("obj-schema-VideoCategoryListResponse", () { |
| 7216 unittest.test("to-json--from-json", () { | 7108 unittest.test("to-json--from-json", () { |
| 7217 var o = buildVideoCategoryListResponse(); | 7109 var o = buildVideoCategoryListResponse(); |
| 7218 var od = new api.VideoCategoryListResponse.fromJson(o.toJson()); | 7110 var od = new api.VideoCategoryListResponse.fromJson(o.toJson()); |
| 7219 checkVideoCategoryListResponse(od); | 7111 checkVideoCategoryListResponse(od); |
| 7220 }); | 7112 }); |
| 7221 }); | 7113 }); |
| 7222 | 7114 |
| 7223 | |
| 7224 unittest.group("obj-schema-VideoCategorySnippet", () { | 7115 unittest.group("obj-schema-VideoCategorySnippet", () { |
| 7225 unittest.test("to-json--from-json", () { | 7116 unittest.test("to-json--from-json", () { |
| 7226 var o = buildVideoCategorySnippet(); | 7117 var o = buildVideoCategorySnippet(); |
| 7227 var od = new api.VideoCategorySnippet.fromJson(o.toJson()); | 7118 var od = new api.VideoCategorySnippet.fromJson(o.toJson()); |
| 7228 checkVideoCategorySnippet(od); | 7119 checkVideoCategorySnippet(od); |
| 7229 }); | 7120 }); |
| 7230 }); | 7121 }); |
| 7231 | 7122 |
| 7232 | |
| 7233 unittest.group("obj-schema-VideoContentDetails", () { | 7123 unittest.group("obj-schema-VideoContentDetails", () { |
| 7234 unittest.test("to-json--from-json", () { | 7124 unittest.test("to-json--from-json", () { |
| 7235 var o = buildVideoContentDetails(); | 7125 var o = buildVideoContentDetails(); |
| 7236 var od = new api.VideoContentDetails.fromJson(o.toJson()); | 7126 var od = new api.VideoContentDetails.fromJson(o.toJson()); |
| 7237 checkVideoContentDetails(od); | 7127 checkVideoContentDetails(od); |
| 7238 }); | 7128 }); |
| 7239 }); | 7129 }); |
| 7240 | 7130 |
| 7241 | |
| 7242 unittest.group("obj-schema-VideoContentDetailsRegionRestriction", () { | 7131 unittest.group("obj-schema-VideoContentDetailsRegionRestriction", () { |
| 7243 unittest.test("to-json--from-json", () { | 7132 unittest.test("to-json--from-json", () { |
| 7244 var o = buildVideoContentDetailsRegionRestriction(); | 7133 var o = buildVideoContentDetailsRegionRestriction(); |
| 7245 var od = new api.VideoContentDetailsRegionRestriction.fromJson(o.toJson())
; | 7134 var od = |
| 7135 new api.VideoContentDetailsRegionRestriction.fromJson(o.toJson()); |
| 7246 checkVideoContentDetailsRegionRestriction(od); | 7136 checkVideoContentDetailsRegionRestriction(od); |
| 7247 }); | 7137 }); |
| 7248 }); | 7138 }); |
| 7249 | 7139 |
| 7250 | |
| 7251 unittest.group("obj-schema-VideoFileDetails", () { | 7140 unittest.group("obj-schema-VideoFileDetails", () { |
| 7252 unittest.test("to-json--from-json", () { | 7141 unittest.test("to-json--from-json", () { |
| 7253 var o = buildVideoFileDetails(); | 7142 var o = buildVideoFileDetails(); |
| 7254 var od = new api.VideoFileDetails.fromJson(o.toJson()); | 7143 var od = new api.VideoFileDetails.fromJson(o.toJson()); |
| 7255 checkVideoFileDetails(od); | 7144 checkVideoFileDetails(od); |
| 7256 }); | 7145 }); |
| 7257 }); | 7146 }); |
| 7258 | 7147 |
| 7259 | |
| 7260 unittest.group("obj-schema-VideoFileDetailsAudioStream", () { | 7148 unittest.group("obj-schema-VideoFileDetailsAudioStream", () { |
| 7261 unittest.test("to-json--from-json", () { | 7149 unittest.test("to-json--from-json", () { |
| 7262 var o = buildVideoFileDetailsAudioStream(); | 7150 var o = buildVideoFileDetailsAudioStream(); |
| 7263 var od = new api.VideoFileDetailsAudioStream.fromJson(o.toJson()); | 7151 var od = new api.VideoFileDetailsAudioStream.fromJson(o.toJson()); |
| 7264 checkVideoFileDetailsAudioStream(od); | 7152 checkVideoFileDetailsAudioStream(od); |
| 7265 }); | 7153 }); |
| 7266 }); | 7154 }); |
| 7267 | 7155 |
| 7268 | |
| 7269 unittest.group("obj-schema-VideoFileDetailsVideoStream", () { | 7156 unittest.group("obj-schema-VideoFileDetailsVideoStream", () { |
| 7270 unittest.test("to-json--from-json", () { | 7157 unittest.test("to-json--from-json", () { |
| 7271 var o = buildVideoFileDetailsVideoStream(); | 7158 var o = buildVideoFileDetailsVideoStream(); |
| 7272 var od = new api.VideoFileDetailsVideoStream.fromJson(o.toJson()); | 7159 var od = new api.VideoFileDetailsVideoStream.fromJson(o.toJson()); |
| 7273 checkVideoFileDetailsVideoStream(od); | 7160 checkVideoFileDetailsVideoStream(od); |
| 7274 }); | 7161 }); |
| 7275 }); | 7162 }); |
| 7276 | 7163 |
| 7277 | |
| 7278 unittest.group("obj-schema-VideoGetRatingResponse", () { | 7164 unittest.group("obj-schema-VideoGetRatingResponse", () { |
| 7279 unittest.test("to-json--from-json", () { | 7165 unittest.test("to-json--from-json", () { |
| 7280 var o = buildVideoGetRatingResponse(); | 7166 var o = buildVideoGetRatingResponse(); |
| 7281 var od = new api.VideoGetRatingResponse.fromJson(o.toJson()); | 7167 var od = new api.VideoGetRatingResponse.fromJson(o.toJson()); |
| 7282 checkVideoGetRatingResponse(od); | 7168 checkVideoGetRatingResponse(od); |
| 7283 }); | 7169 }); |
| 7284 }); | 7170 }); |
| 7285 | 7171 |
| 7286 | |
| 7287 unittest.group("obj-schema-VideoListResponse", () { | 7172 unittest.group("obj-schema-VideoListResponse", () { |
| 7288 unittest.test("to-json--from-json", () { | 7173 unittest.test("to-json--from-json", () { |
| 7289 var o = buildVideoListResponse(); | 7174 var o = buildVideoListResponse(); |
| 7290 var od = new api.VideoListResponse.fromJson(o.toJson()); | 7175 var od = new api.VideoListResponse.fromJson(o.toJson()); |
| 7291 checkVideoListResponse(od); | 7176 checkVideoListResponse(od); |
| 7292 }); | 7177 }); |
| 7293 }); | 7178 }); |
| 7294 | 7179 |
| 7295 | |
| 7296 unittest.group("obj-schema-VideoLiveStreamingDetails", () { | 7180 unittest.group("obj-schema-VideoLiveStreamingDetails", () { |
| 7297 unittest.test("to-json--from-json", () { | 7181 unittest.test("to-json--from-json", () { |
| 7298 var o = buildVideoLiveStreamingDetails(); | 7182 var o = buildVideoLiveStreamingDetails(); |
| 7299 var od = new api.VideoLiveStreamingDetails.fromJson(o.toJson()); | 7183 var od = new api.VideoLiveStreamingDetails.fromJson(o.toJson()); |
| 7300 checkVideoLiveStreamingDetails(od); | 7184 checkVideoLiveStreamingDetails(od); |
| 7301 }); | 7185 }); |
| 7302 }); | 7186 }); |
| 7303 | 7187 |
| 7304 | |
| 7305 unittest.group("obj-schema-VideoLocalization", () { | 7188 unittest.group("obj-schema-VideoLocalization", () { |
| 7306 unittest.test("to-json--from-json", () { | 7189 unittest.test("to-json--from-json", () { |
| 7307 var o = buildVideoLocalization(); | 7190 var o = buildVideoLocalization(); |
| 7308 var od = new api.VideoLocalization.fromJson(o.toJson()); | 7191 var od = new api.VideoLocalization.fromJson(o.toJson()); |
| 7309 checkVideoLocalization(od); | 7192 checkVideoLocalization(od); |
| 7310 }); | 7193 }); |
| 7311 }); | 7194 }); |
| 7312 | 7195 |
| 7313 | |
| 7314 unittest.group("obj-schema-VideoMonetizationDetails", () { | 7196 unittest.group("obj-schema-VideoMonetizationDetails", () { |
| 7315 unittest.test("to-json--from-json", () { | 7197 unittest.test("to-json--from-json", () { |
| 7316 var o = buildVideoMonetizationDetails(); | 7198 var o = buildVideoMonetizationDetails(); |
| 7317 var od = new api.VideoMonetizationDetails.fromJson(o.toJson()); | 7199 var od = new api.VideoMonetizationDetails.fromJson(o.toJson()); |
| 7318 checkVideoMonetizationDetails(od); | 7200 checkVideoMonetizationDetails(od); |
| 7319 }); | 7201 }); |
| 7320 }); | 7202 }); |
| 7321 | 7203 |
| 7322 | |
| 7323 unittest.group("obj-schema-VideoPlayer", () { | 7204 unittest.group("obj-schema-VideoPlayer", () { |
| 7324 unittest.test("to-json--from-json", () { | 7205 unittest.test("to-json--from-json", () { |
| 7325 var o = buildVideoPlayer(); | 7206 var o = buildVideoPlayer(); |
| 7326 var od = new api.VideoPlayer.fromJson(o.toJson()); | 7207 var od = new api.VideoPlayer.fromJson(o.toJson()); |
| 7327 checkVideoPlayer(od); | 7208 checkVideoPlayer(od); |
| 7328 }); | 7209 }); |
| 7329 }); | 7210 }); |
| 7330 | 7211 |
| 7331 | |
| 7332 unittest.group("obj-schema-VideoProcessingDetails", () { | 7212 unittest.group("obj-schema-VideoProcessingDetails", () { |
| 7333 unittest.test("to-json--from-json", () { | 7213 unittest.test("to-json--from-json", () { |
| 7334 var o = buildVideoProcessingDetails(); | 7214 var o = buildVideoProcessingDetails(); |
| 7335 var od = new api.VideoProcessingDetails.fromJson(o.toJson()); | 7215 var od = new api.VideoProcessingDetails.fromJson(o.toJson()); |
| 7336 checkVideoProcessingDetails(od); | 7216 checkVideoProcessingDetails(od); |
| 7337 }); | 7217 }); |
| 7338 }); | 7218 }); |
| 7339 | 7219 |
| 7340 | |
| 7341 unittest.group("obj-schema-VideoProcessingDetailsProcessingProgress", () { | 7220 unittest.group("obj-schema-VideoProcessingDetailsProcessingProgress", () { |
| 7342 unittest.test("to-json--from-json", () { | 7221 unittest.test("to-json--from-json", () { |
| 7343 var o = buildVideoProcessingDetailsProcessingProgress(); | 7222 var o = buildVideoProcessingDetailsProcessingProgress(); |
| 7344 var od = new api.VideoProcessingDetailsProcessingProgress.fromJson(o.toJso
n()); | 7223 var od = |
| 7224 new api.VideoProcessingDetailsProcessingProgress.fromJson(o.toJson()); |
| 7345 checkVideoProcessingDetailsProcessingProgress(od); | 7225 checkVideoProcessingDetailsProcessingProgress(od); |
| 7346 }); | 7226 }); |
| 7347 }); | 7227 }); |
| 7348 | 7228 |
| 7349 | |
| 7350 unittest.group("obj-schema-VideoProjectDetails", () { | 7229 unittest.group("obj-schema-VideoProjectDetails", () { |
| 7351 unittest.test("to-json--from-json", () { | 7230 unittest.test("to-json--from-json", () { |
| 7352 var o = buildVideoProjectDetails(); | 7231 var o = buildVideoProjectDetails(); |
| 7353 var od = new api.VideoProjectDetails.fromJson(o.toJson()); | 7232 var od = new api.VideoProjectDetails.fromJson(o.toJson()); |
| 7354 checkVideoProjectDetails(od); | 7233 checkVideoProjectDetails(od); |
| 7355 }); | 7234 }); |
| 7356 }); | 7235 }); |
| 7357 | 7236 |
| 7358 | |
| 7359 unittest.group("obj-schema-VideoRating", () { | 7237 unittest.group("obj-schema-VideoRating", () { |
| 7360 unittest.test("to-json--from-json", () { | 7238 unittest.test("to-json--from-json", () { |
| 7361 var o = buildVideoRating(); | 7239 var o = buildVideoRating(); |
| 7362 var od = new api.VideoRating.fromJson(o.toJson()); | 7240 var od = new api.VideoRating.fromJson(o.toJson()); |
| 7363 checkVideoRating(od); | 7241 checkVideoRating(od); |
| 7364 }); | 7242 }); |
| 7365 }); | 7243 }); |
| 7366 | 7244 |
| 7367 | |
| 7368 unittest.group("obj-schema-VideoRecordingDetails", () { | 7245 unittest.group("obj-schema-VideoRecordingDetails", () { |
| 7369 unittest.test("to-json--from-json", () { | 7246 unittest.test("to-json--from-json", () { |
| 7370 var o = buildVideoRecordingDetails(); | 7247 var o = buildVideoRecordingDetails(); |
| 7371 var od = new api.VideoRecordingDetails.fromJson(o.toJson()); | 7248 var od = new api.VideoRecordingDetails.fromJson(o.toJson()); |
| 7372 checkVideoRecordingDetails(od); | 7249 checkVideoRecordingDetails(od); |
| 7373 }); | 7250 }); |
| 7374 }); | 7251 }); |
| 7375 | 7252 |
| 7376 | |
| 7377 unittest.group("obj-schema-VideoSnippet", () { | 7253 unittest.group("obj-schema-VideoSnippet", () { |
| 7378 unittest.test("to-json--from-json", () { | 7254 unittest.test("to-json--from-json", () { |
| 7379 var o = buildVideoSnippet(); | 7255 var o = buildVideoSnippet(); |
| 7380 var od = new api.VideoSnippet.fromJson(o.toJson()); | 7256 var od = new api.VideoSnippet.fromJson(o.toJson()); |
| 7381 checkVideoSnippet(od); | 7257 checkVideoSnippet(od); |
| 7382 }); | 7258 }); |
| 7383 }); | 7259 }); |
| 7384 | 7260 |
| 7385 | |
| 7386 unittest.group("obj-schema-VideoStatistics", () { | 7261 unittest.group("obj-schema-VideoStatistics", () { |
| 7387 unittest.test("to-json--from-json", () { | 7262 unittest.test("to-json--from-json", () { |
| 7388 var o = buildVideoStatistics(); | 7263 var o = buildVideoStatistics(); |
| 7389 var od = new api.VideoStatistics.fromJson(o.toJson()); | 7264 var od = new api.VideoStatistics.fromJson(o.toJson()); |
| 7390 checkVideoStatistics(od); | 7265 checkVideoStatistics(od); |
| 7391 }); | 7266 }); |
| 7392 }); | 7267 }); |
| 7393 | 7268 |
| 7394 | |
| 7395 unittest.group("obj-schema-VideoStatus", () { | 7269 unittest.group("obj-schema-VideoStatus", () { |
| 7396 unittest.test("to-json--from-json", () { | 7270 unittest.test("to-json--from-json", () { |
| 7397 var o = buildVideoStatus(); | 7271 var o = buildVideoStatus(); |
| 7398 var od = new api.VideoStatus.fromJson(o.toJson()); | 7272 var od = new api.VideoStatus.fromJson(o.toJson()); |
| 7399 checkVideoStatus(od); | 7273 checkVideoStatus(od); |
| 7400 }); | 7274 }); |
| 7401 }); | 7275 }); |
| 7402 | 7276 |
| 7403 | |
| 7404 unittest.group("obj-schema-VideoSuggestions", () { | 7277 unittest.group("obj-schema-VideoSuggestions", () { |
| 7405 unittest.test("to-json--from-json", () { | 7278 unittest.test("to-json--from-json", () { |
| 7406 var o = buildVideoSuggestions(); | 7279 var o = buildVideoSuggestions(); |
| 7407 var od = new api.VideoSuggestions.fromJson(o.toJson()); | 7280 var od = new api.VideoSuggestions.fromJson(o.toJson()); |
| 7408 checkVideoSuggestions(od); | 7281 checkVideoSuggestions(od); |
| 7409 }); | 7282 }); |
| 7410 }); | 7283 }); |
| 7411 | 7284 |
| 7412 | |
| 7413 unittest.group("obj-schema-VideoSuggestionsTagSuggestion", () { | 7285 unittest.group("obj-schema-VideoSuggestionsTagSuggestion", () { |
| 7414 unittest.test("to-json--from-json", () { | 7286 unittest.test("to-json--from-json", () { |
| 7415 var o = buildVideoSuggestionsTagSuggestion(); | 7287 var o = buildVideoSuggestionsTagSuggestion(); |
| 7416 var od = new api.VideoSuggestionsTagSuggestion.fromJson(o.toJson()); | 7288 var od = new api.VideoSuggestionsTagSuggestion.fromJson(o.toJson()); |
| 7417 checkVideoSuggestionsTagSuggestion(od); | 7289 checkVideoSuggestionsTagSuggestion(od); |
| 7418 }); | 7290 }); |
| 7419 }); | 7291 }); |
| 7420 | 7292 |
| 7421 | |
| 7422 unittest.group("obj-schema-VideoTopicDetails", () { | 7293 unittest.group("obj-schema-VideoTopicDetails", () { |
| 7423 unittest.test("to-json--from-json", () { | 7294 unittest.test("to-json--from-json", () { |
| 7424 var o = buildVideoTopicDetails(); | 7295 var o = buildVideoTopicDetails(); |
| 7425 var od = new api.VideoTopicDetails.fromJson(o.toJson()); | 7296 var od = new api.VideoTopicDetails.fromJson(o.toJson()); |
| 7426 checkVideoTopicDetails(od); | 7297 checkVideoTopicDetails(od); |
| 7427 }); | 7298 }); |
| 7428 }); | 7299 }); |
| 7429 | 7300 |
| 7430 | |
| 7431 unittest.group("obj-schema-WatchSettings", () { | 7301 unittest.group("obj-schema-WatchSettings", () { |
| 7432 unittest.test("to-json--from-json", () { | 7302 unittest.test("to-json--from-json", () { |
| 7433 var o = buildWatchSettings(); | 7303 var o = buildWatchSettings(); |
| 7434 var od = new api.WatchSettings.fromJson(o.toJson()); | 7304 var od = new api.WatchSettings.fromJson(o.toJson()); |
| 7435 checkWatchSettings(od); | 7305 checkWatchSettings(od); |
| 7436 }); | 7306 }); |
| 7437 }); | 7307 }); |
| 7438 | 7308 |
| 7439 | |
| 7440 unittest.group("resource-ActivitiesResourceApi", () { | 7309 unittest.group("resource-ActivitiesResourceApi", () { |
| 7441 unittest.test("method--insert", () { | 7310 unittest.test("method--insert", () { |
| 7442 | |
| 7443 var mock = new HttpServerMock(); | 7311 var mock = new HttpServerMock(); |
| 7444 api.ActivitiesResourceApi res = new api.YoutubeApi(mock).activities; | 7312 api.ActivitiesResourceApi res = new api.YoutubeApi(mock).activities; |
| 7445 var arg_request = buildActivity(); | 7313 var arg_request = buildActivity(); |
| 7446 var arg_part = "foo"; | 7314 var arg_part = "foo"; |
| 7447 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 7315 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 7448 var obj = new api.Activity.fromJson(json); | 7316 var obj = new api.Activity.fromJson(json); |
| 7449 checkActivity(obj); | 7317 checkActivity(obj); |
| 7450 | 7318 |
| 7451 var path = (req.url).path; | 7319 var path = (req.url).path; |
| 7452 var pathOffset = 0; | 7320 var pathOffset = 0; |
| 7453 var index; | 7321 var index; |
| 7454 var subPart; | 7322 var subPart; |
| 7455 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 7323 unittest.expect( |
| 7324 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 7456 pathOffset += 1; | 7325 pathOffset += 1; |
| 7457 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("youtube/v3/")); | 7326 unittest.expect(path.substring(pathOffset, pathOffset + 11), |
| 7327 unittest.equals("youtube/v3/")); |
| 7458 pathOffset += 11; | 7328 pathOffset += 11; |
| 7459 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("activities")); | 7329 unittest.expect(path.substring(pathOffset, pathOffset + 10), |
| 7330 unittest.equals("activities")); |
| 7460 pathOffset += 10; | 7331 pathOffset += 10; |
| 7461 | 7332 |
| 7462 var query = (req.url).query; | 7333 var query = (req.url).query; |
| 7463 var queryOffset = 0; | 7334 var queryOffset = 0; |
| 7464 var queryMap = {}; | 7335 var queryMap = {}; |
| 7465 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 7336 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 7466 parseBool(n) { | 7337 parseBool(n) { |
| 7467 if (n == "true") return true; | 7338 if (n == "true") return true; |
| 7468 if (n == "false") return false; | 7339 if (n == "false") return false; |
| 7469 if (n == null) return null; | 7340 if (n == null) return null; |
| 7470 throw new core.ArgumentError("Invalid boolean: $n"); | 7341 throw new core.ArgumentError("Invalid boolean: $n"); |
| 7471 } | 7342 } |
| 7343 |
| 7472 if (query.length > 0) { | 7344 if (query.length > 0) { |
| 7473 for (var part in query.split("&")) { | 7345 for (var part in query.split("&")) { |
| 7474 var keyvalue = part.split("="); | 7346 var keyvalue = part.split("="); |
| 7475 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 7347 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 7348 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 7476 } | 7349 } |
| 7477 } | 7350 } |
| 7478 unittest.expect(queryMap["part"].first, unittest.equals(arg_part)); | 7351 unittest.expect(queryMap["part"].first, unittest.equals(arg_part)); |
| 7479 | 7352 |
| 7480 | |
| 7481 var h = { | 7353 var h = { |
| 7482 "content-type" : "application/json; charset=utf-8", | 7354 "content-type": "application/json; charset=utf-8", |
| 7483 }; | 7355 }; |
| 7484 var resp = convert.JSON.encode(buildActivity()); | 7356 var resp = convert.JSON.encode(buildActivity()); |
| 7485 return new async.Future.value(stringResponse(200, h, resp)); | 7357 return new async.Future.value(stringResponse(200, h, resp)); |
| 7486 }), true); | 7358 }), true); |
| 7487 res.insert(arg_request, arg_part).then(unittest.expectAsync1(((api.Activit
y response) { | 7359 res |
| 7360 .insert(arg_request, arg_part) |
| 7361 .then(unittest.expectAsync1(((api.Activity response) { |
| 7488 checkActivity(response); | 7362 checkActivity(response); |
| 7489 }))); | 7363 }))); |
| 7490 }); | 7364 }); |
| 7491 | 7365 |
| 7492 unittest.test("method--list", () { | 7366 unittest.test("method--list", () { |
| 7493 | |
| 7494 var mock = new HttpServerMock(); | 7367 var mock = new HttpServerMock(); |
| 7495 api.ActivitiesResourceApi res = new api.YoutubeApi(mock).activities; | 7368 api.ActivitiesResourceApi res = new api.YoutubeApi(mock).activities; |
| 7496 var arg_part = "foo"; | 7369 var arg_part = "foo"; |
| 7497 var arg_channelId = "foo"; | 7370 var arg_channelId = "foo"; |
| 7498 var arg_home = true; | 7371 var arg_home = true; |
| 7499 var arg_maxResults = 42; | 7372 var arg_maxResults = 42; |
| 7500 var arg_mine = true; | 7373 var arg_mine = true; |
| 7501 var arg_pageToken = "foo"; | 7374 var arg_pageToken = "foo"; |
| 7502 var arg_publishedAfter = core.DateTime.parse("2002-02-27T14:01:02"); | 7375 var arg_publishedAfter = core.DateTime.parse("2002-02-27T14:01:02"); |
| 7503 var arg_publishedBefore = core.DateTime.parse("2002-02-27T14:01:02"); | 7376 var arg_publishedBefore = core.DateTime.parse("2002-02-27T14:01:02"); |
| 7504 var arg_regionCode = "foo"; | 7377 var arg_regionCode = "foo"; |
| 7505 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 7378 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 7506 var path = (req.url).path; | 7379 var path = (req.url).path; |
| 7507 var pathOffset = 0; | 7380 var pathOffset = 0; |
| 7508 var index; | 7381 var index; |
| 7509 var subPart; | 7382 var subPart; |
| 7510 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 7383 unittest.expect( |
| 7384 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 7511 pathOffset += 1; | 7385 pathOffset += 1; |
| 7512 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("youtube/v3/")); | 7386 unittest.expect(path.substring(pathOffset, pathOffset + 11), |
| 7387 unittest.equals("youtube/v3/")); |
| 7513 pathOffset += 11; | 7388 pathOffset += 11; |
| 7514 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("activities")); | 7389 unittest.expect(path.substring(pathOffset, pathOffset + 10), |
| 7390 unittest.equals("activities")); |
| 7515 pathOffset += 10; | 7391 pathOffset += 10; |
| 7516 | 7392 |
| 7517 var query = (req.url).query; | 7393 var query = (req.url).query; |
| 7518 var queryOffset = 0; | 7394 var queryOffset = 0; |
| 7519 var queryMap = {}; | 7395 var queryMap = {}; |
| 7520 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 7396 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 7521 parseBool(n) { | 7397 parseBool(n) { |
| 7522 if (n == "true") return true; | 7398 if (n == "true") return true; |
| 7523 if (n == "false") return false; | 7399 if (n == "false") return false; |
| 7524 if (n == null) return null; | 7400 if (n == null) return null; |
| 7525 throw new core.ArgumentError("Invalid boolean: $n"); | 7401 throw new core.ArgumentError("Invalid boolean: $n"); |
| 7526 } | 7402 } |
| 7403 |
| 7527 if (query.length > 0) { | 7404 if (query.length > 0) { |
| 7528 for (var part in query.split("&")) { | 7405 for (var part in query.split("&")) { |
| 7529 var keyvalue = part.split("="); | 7406 var keyvalue = part.split("="); |
| 7530 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 7407 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 7408 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 7531 } | 7409 } |
| 7532 } | 7410 } |
| 7533 unittest.expect(queryMap["part"].first, unittest.equals(arg_part)); | 7411 unittest.expect(queryMap["part"].first, unittest.equals(arg_part)); |
| 7534 unittest.expect(queryMap["channelId"].first, unittest.equals(arg_channel
Id)); | 7412 unittest.expect( |
| 7413 queryMap["channelId"].first, unittest.equals(arg_channelId)); |
| 7535 unittest.expect(queryMap["home"].first, unittest.equals("$arg_home")); | 7414 unittest.expect(queryMap["home"].first, unittest.equals("$arg_home")); |
| 7536 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | 7415 unittest.expect(core.int.parse(queryMap["maxResults"].first), |
| 7416 unittest.equals(arg_maxResults)); |
| 7537 unittest.expect(queryMap["mine"].first, unittest.equals("$arg_mine")); | 7417 unittest.expect(queryMap["mine"].first, unittest.equals("$arg_mine")); |
| 7538 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 7418 unittest.expect( |
| 7539 unittest.expect(core.DateTime.parse(queryMap["publishedAfter"].first), u
nittest.equals(arg_publishedAfter)); | 7419 queryMap["pageToken"].first, unittest.equals(arg_pageToken)); |
| 7540 unittest.expect(core.DateTime.parse(queryMap["publishedBefore"].first),
unittest.equals(arg_publishedBefore)); | 7420 unittest.expect(core.DateTime.parse(queryMap["publishedAfter"].first), |
| 7541 unittest.expect(queryMap["regionCode"].first, unittest.equals(arg_region
Code)); | 7421 unittest.equals(arg_publishedAfter)); |
| 7542 | 7422 unittest.expect(core.DateTime.parse(queryMap["publishedBefore"].first), |
| 7423 unittest.equals(arg_publishedBefore)); |
| 7424 unittest.expect( |
| 7425 queryMap["regionCode"].first, unittest.equals(arg_regionCode)); |
| 7543 | 7426 |
| 7544 var h = { | 7427 var h = { |
| 7545 "content-type" : "application/json; charset=utf-8", | 7428 "content-type": "application/json; charset=utf-8", |
| 7546 }; | 7429 }; |
| 7547 var resp = convert.JSON.encode(buildActivityListResponse()); | 7430 var resp = convert.JSON.encode(buildActivityListResponse()); |
| 7548 return new async.Future.value(stringResponse(200, h, resp)); | 7431 return new async.Future.value(stringResponse(200, h, resp)); |
| 7549 }), true); | 7432 }), true); |
| 7550 res.list(arg_part, channelId: arg_channelId, home: arg_home, maxResults: a
rg_maxResults, mine: arg_mine, pageToken: arg_pageToken, publishedAfter: arg_pub
lishedAfter, publishedBefore: arg_publishedBefore, regionCode: arg_regionCode).t
hen(unittest.expectAsync1(((api.ActivityListResponse response) { | 7433 res |
| 7434 .list(arg_part, |
| 7435 channelId: arg_channelId, |
| 7436 home: arg_home, |
| 7437 maxResults: arg_maxResults, |
| 7438 mine: arg_mine, |
| 7439 pageToken: arg_pageToken, |
| 7440 publishedAfter: arg_publishedAfter, |
| 7441 publishedBefore: arg_publishedBefore, |
| 7442 regionCode: arg_regionCode) |
| 7443 .then(unittest.expectAsync1(((api.ActivityListResponse response) { |
| 7551 checkActivityListResponse(response); | 7444 checkActivityListResponse(response); |
| 7552 }))); | 7445 }))); |
| 7553 }); | 7446 }); |
| 7554 | |
| 7555 }); | 7447 }); |
| 7556 | 7448 |
| 7557 | |
| 7558 unittest.group("resource-CaptionsResourceApi", () { | 7449 unittest.group("resource-CaptionsResourceApi", () { |
| 7559 unittest.test("method--delete", () { | 7450 unittest.test("method--delete", () { |
| 7560 | |
| 7561 var mock = new HttpServerMock(); | 7451 var mock = new HttpServerMock(); |
| 7562 api.CaptionsResourceApi res = new api.YoutubeApi(mock).captions; | 7452 api.CaptionsResourceApi res = new api.YoutubeApi(mock).captions; |
| 7563 var arg_id = "foo"; | 7453 var arg_id = "foo"; |
| 7564 var arg_onBehalfOf = "foo"; | 7454 var arg_onBehalfOf = "foo"; |
| 7565 var arg_onBehalfOfContentOwner = "foo"; | 7455 var arg_onBehalfOfContentOwner = "foo"; |
| 7566 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 7456 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 7567 var path = (req.url).path; | 7457 var path = (req.url).path; |
| 7568 var pathOffset = 0; | 7458 var pathOffset = 0; |
| 7569 var index; | 7459 var index; |
| 7570 var subPart; | 7460 var subPart; |
| 7571 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 7461 unittest.expect( |
| 7462 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 7572 pathOffset += 1; | 7463 pathOffset += 1; |
| 7573 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("youtube/v3/")); | 7464 unittest.expect(path.substring(pathOffset, pathOffset + 11), |
| 7465 unittest.equals("youtube/v3/")); |
| 7574 pathOffset += 11; | 7466 pathOffset += 11; |
| 7575 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("captions")); | 7467 unittest.expect(path.substring(pathOffset, pathOffset + 8), |
| 7468 unittest.equals("captions")); |
| 7576 pathOffset += 8; | 7469 pathOffset += 8; |
| 7577 | 7470 |
| 7578 var query = (req.url).query; | 7471 var query = (req.url).query; |
| 7579 var queryOffset = 0; | 7472 var queryOffset = 0; |
| 7580 var queryMap = {}; | 7473 var queryMap = {}; |
| 7581 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 7474 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 7582 parseBool(n) { | 7475 parseBool(n) { |
| 7583 if (n == "true") return true; | 7476 if (n == "true") return true; |
| 7584 if (n == "false") return false; | 7477 if (n == "false") return false; |
| 7585 if (n == null) return null; | 7478 if (n == null) return null; |
| 7586 throw new core.ArgumentError("Invalid boolean: $n"); | 7479 throw new core.ArgumentError("Invalid boolean: $n"); |
| 7587 } | 7480 } |
| 7481 |
| 7588 if (query.length > 0) { | 7482 if (query.length > 0) { |
| 7589 for (var part in query.split("&")) { | 7483 for (var part in query.split("&")) { |
| 7590 var keyvalue = part.split("="); | 7484 var keyvalue = part.split("="); |
| 7591 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 7485 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 7486 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 7592 } | 7487 } |
| 7593 } | 7488 } |
| 7594 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); | 7489 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); |
| 7595 unittest.expect(queryMap["onBehalfOf"].first, unittest.equals(arg_onBeha
lfOf)); | 7490 unittest.expect( |
| 7596 unittest.expect(queryMap["onBehalfOfContentOwner"].first, unittest.equal
s(arg_onBehalfOfContentOwner)); | 7491 queryMap["onBehalfOf"].first, unittest.equals(arg_onBehalfOf)); |
| 7597 | 7492 unittest.expect(queryMap["onBehalfOfContentOwner"].first, |
| 7493 unittest.equals(arg_onBehalfOfContentOwner)); |
| 7598 | 7494 |
| 7599 var h = { | 7495 var h = { |
| 7600 "content-type" : "application/json; charset=utf-8", | 7496 "content-type": "application/json; charset=utf-8", |
| 7601 }; | 7497 }; |
| 7602 var resp = ""; | 7498 var resp = ""; |
| 7603 return new async.Future.value(stringResponse(200, h, resp)); | 7499 return new async.Future.value(stringResponse(200, h, resp)); |
| 7604 }), true); | 7500 }), true); |
| 7605 res.delete(arg_id, onBehalfOf: arg_onBehalfOf, onBehalfOfContentOwner: arg
_onBehalfOfContentOwner).then(unittest.expectAsync1((_) {})); | 7501 res |
| 7502 .delete(arg_id, |
| 7503 onBehalfOf: arg_onBehalfOf, |
| 7504 onBehalfOfContentOwner: arg_onBehalfOfContentOwner) |
| 7505 .then(unittest.expectAsync1((_) {})); |
| 7606 }); | 7506 }); |
| 7607 | 7507 |
| 7608 unittest.test("method--download", () { | 7508 unittest.test("method--download", () { |
| 7609 // TODO: Implement tests for media upload; | 7509 // TODO: Implement tests for media upload; |
| 7610 // TODO: Implement tests for media download; | 7510 // TODO: Implement tests for media download; |
| 7611 | 7511 |
| 7612 var mock = new HttpServerMock(); | 7512 var mock = new HttpServerMock(); |
| 7613 api.CaptionsResourceApi res = new api.YoutubeApi(mock).captions; | 7513 api.CaptionsResourceApi res = new api.YoutubeApi(mock).captions; |
| 7614 var arg_id = "foo"; | 7514 var arg_id = "foo"; |
| 7615 var arg_onBehalfOf = "foo"; | 7515 var arg_onBehalfOf = "foo"; |
| 7616 var arg_onBehalfOfContentOwner = "foo"; | 7516 var arg_onBehalfOfContentOwner = "foo"; |
| 7617 var arg_tfmt = "foo"; | 7517 var arg_tfmt = "foo"; |
| 7618 var arg_tlang = "foo"; | 7518 var arg_tlang = "foo"; |
| 7619 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 7519 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 7620 var path = (req.url).path; | 7520 var path = (req.url).path; |
| 7621 var pathOffset = 0; | 7521 var pathOffset = 0; |
| 7622 var index; | 7522 var index; |
| 7623 var subPart; | 7523 var subPart; |
| 7624 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 7524 unittest.expect( |
| 7525 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 7625 pathOffset += 1; | 7526 pathOffset += 1; |
| 7626 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("youtube/v3/")); | 7527 unittest.expect(path.substring(pathOffset, pathOffset + 11), |
| 7528 unittest.equals("youtube/v3/")); |
| 7627 pathOffset += 11; | 7529 pathOffset += 11; |
| 7628 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("captions/")); | 7530 unittest.expect(path.substring(pathOffset, pathOffset + 9), |
| 7531 unittest.equals("captions/")); |
| 7629 pathOffset += 9; | 7532 pathOffset += 9; |
| 7630 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | 7533 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| 7631 pathOffset = path.length; | 7534 pathOffset = path.length; |
| 7632 unittest.expect(subPart, unittest.equals("$arg_id")); | 7535 unittest.expect(subPart, unittest.equals("$arg_id")); |
| 7633 | 7536 |
| 7634 var query = (req.url).query; | 7537 var query = (req.url).query; |
| 7635 var queryOffset = 0; | 7538 var queryOffset = 0; |
| 7636 var queryMap = {}; | 7539 var queryMap = {}; |
| 7637 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 7540 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 7638 parseBool(n) { | 7541 parseBool(n) { |
| 7639 if (n == "true") return true; | 7542 if (n == "true") return true; |
| 7640 if (n == "false") return false; | 7543 if (n == "false") return false; |
| 7641 if (n == null) return null; | 7544 if (n == null) return null; |
| 7642 throw new core.ArgumentError("Invalid boolean: $n"); | 7545 throw new core.ArgumentError("Invalid boolean: $n"); |
| 7643 } | 7546 } |
| 7547 |
| 7644 if (query.length > 0) { | 7548 if (query.length > 0) { |
| 7645 for (var part in query.split("&")) { | 7549 for (var part in query.split("&")) { |
| 7646 var keyvalue = part.split("="); | 7550 var keyvalue = part.split("="); |
| 7647 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 7551 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 7552 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 7648 } | 7553 } |
| 7649 } | 7554 } |
| 7650 unittest.expect(queryMap["onBehalfOf"].first, unittest.equals(arg_onBeha
lfOf)); | 7555 unittest.expect( |
| 7651 unittest.expect(queryMap["onBehalfOfContentOwner"].first, unittest.equal
s(arg_onBehalfOfContentOwner)); | 7556 queryMap["onBehalfOf"].first, unittest.equals(arg_onBehalfOf)); |
| 7557 unittest.expect(queryMap["onBehalfOfContentOwner"].first, |
| 7558 unittest.equals(arg_onBehalfOfContentOwner)); |
| 7652 unittest.expect(queryMap["tfmt"].first, unittest.equals(arg_tfmt)); | 7559 unittest.expect(queryMap["tfmt"].first, unittest.equals(arg_tfmt)); |
| 7653 unittest.expect(queryMap["tlang"].first, unittest.equals(arg_tlang)); | 7560 unittest.expect(queryMap["tlang"].first, unittest.equals(arg_tlang)); |
| 7654 | 7561 |
| 7655 | |
| 7656 var h = { | 7562 var h = { |
| 7657 "content-type" : "application/json; charset=utf-8", | 7563 "content-type": "application/json; charset=utf-8", |
| 7658 }; | 7564 }; |
| 7659 var resp = ""; | 7565 var resp = ""; |
| 7660 return new async.Future.value(stringResponse(200, h, resp)); | 7566 return new async.Future.value(stringResponse(200, h, resp)); |
| 7661 }), true); | 7567 }), true); |
| 7662 res.download(arg_id, onBehalfOf: arg_onBehalfOf, onBehalfOfContentOwner: a
rg_onBehalfOfContentOwner, tfmt: arg_tfmt, tlang: arg_tlang).then(unittest.expec
tAsync1((_) {})); | 7568 res |
| 7569 .download(arg_id, |
| 7570 onBehalfOf: arg_onBehalfOf, |
| 7571 onBehalfOfContentOwner: arg_onBehalfOfContentOwner, |
| 7572 tfmt: arg_tfmt, |
| 7573 tlang: arg_tlang) |
| 7574 .then(unittest.expectAsync1((_) {})); |
| 7663 }); | 7575 }); |
| 7664 | 7576 |
| 7665 unittest.test("method--insert", () { | 7577 unittest.test("method--insert", () { |
| 7666 // TODO: Implement tests for media upload; | 7578 // TODO: Implement tests for media upload; |
| 7667 // TODO: Implement tests for media download; | 7579 // TODO: Implement tests for media download; |
| 7668 | 7580 |
| 7669 var mock = new HttpServerMock(); | 7581 var mock = new HttpServerMock(); |
| 7670 api.CaptionsResourceApi res = new api.YoutubeApi(mock).captions; | 7582 api.CaptionsResourceApi res = new api.YoutubeApi(mock).captions; |
| 7671 var arg_request = buildCaption(); | 7583 var arg_request = buildCaption(); |
| 7672 var arg_part = "foo"; | 7584 var arg_part = "foo"; |
| 7673 var arg_onBehalfOf = "foo"; | 7585 var arg_onBehalfOf = "foo"; |
| 7674 var arg_onBehalfOfContentOwner = "foo"; | 7586 var arg_onBehalfOfContentOwner = "foo"; |
| 7675 var arg_sync = true; | 7587 var arg_sync = true; |
| 7676 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 7588 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 7677 var obj = new api.Caption.fromJson(json); | 7589 var obj = new api.Caption.fromJson(json); |
| 7678 checkCaption(obj); | 7590 checkCaption(obj); |
| 7679 | 7591 |
| 7680 var path = (req.url).path; | 7592 var path = (req.url).path; |
| 7681 var pathOffset = 0; | 7593 var pathOffset = 0; |
| 7682 var index; | 7594 var index; |
| 7683 var subPart; | 7595 var subPart; |
| 7684 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 7596 unittest.expect( |
| 7597 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 7685 pathOffset += 1; | 7598 pathOffset += 1; |
| 7686 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("youtube/v3/")); | 7599 unittest.expect(path.substring(pathOffset, pathOffset + 11), |
| 7600 unittest.equals("youtube/v3/")); |
| 7687 pathOffset += 11; | 7601 pathOffset += 11; |
| 7688 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("captions")); | 7602 unittest.expect(path.substring(pathOffset, pathOffset + 8), |
| 7603 unittest.equals("captions")); |
| 7689 pathOffset += 8; | 7604 pathOffset += 8; |
| 7690 | 7605 |
| 7691 var query = (req.url).query; | 7606 var query = (req.url).query; |
| 7692 var queryOffset = 0; | 7607 var queryOffset = 0; |
| 7693 var queryMap = {}; | 7608 var queryMap = {}; |
| 7694 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 7609 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 7695 parseBool(n) { | 7610 parseBool(n) { |
| 7696 if (n == "true") return true; | 7611 if (n == "true") return true; |
| 7697 if (n == "false") return false; | 7612 if (n == "false") return false; |
| 7698 if (n == null) return null; | 7613 if (n == null) return null; |
| 7699 throw new core.ArgumentError("Invalid boolean: $n"); | 7614 throw new core.ArgumentError("Invalid boolean: $n"); |
| 7700 } | 7615 } |
| 7616 |
| 7701 if (query.length > 0) { | 7617 if (query.length > 0) { |
| 7702 for (var part in query.split("&")) { | 7618 for (var part in query.split("&")) { |
| 7703 var keyvalue = part.split("="); | 7619 var keyvalue = part.split("="); |
| 7704 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 7620 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 7621 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 7705 } | 7622 } |
| 7706 } | 7623 } |
| 7707 unittest.expect(queryMap["part"].first, unittest.equals(arg_part)); | 7624 unittest.expect(queryMap["part"].first, unittest.equals(arg_part)); |
| 7708 unittest.expect(queryMap["onBehalfOf"].first, unittest.equals(arg_onBeha
lfOf)); | 7625 unittest.expect( |
| 7709 unittest.expect(queryMap["onBehalfOfContentOwner"].first, unittest.equal
s(arg_onBehalfOfContentOwner)); | 7626 queryMap["onBehalfOf"].first, unittest.equals(arg_onBehalfOf)); |
| 7627 unittest.expect(queryMap["onBehalfOfContentOwner"].first, |
| 7628 unittest.equals(arg_onBehalfOfContentOwner)); |
| 7710 unittest.expect(queryMap["sync"].first, unittest.equals("$arg_sync")); | 7629 unittest.expect(queryMap["sync"].first, unittest.equals("$arg_sync")); |
| 7711 | 7630 |
| 7712 | |
| 7713 var h = { | 7631 var h = { |
| 7714 "content-type" : "application/json; charset=utf-8", | 7632 "content-type": "application/json; charset=utf-8", |
| 7715 }; | 7633 }; |
| 7716 var resp = convert.JSON.encode(buildCaption()); | 7634 var resp = convert.JSON.encode(buildCaption()); |
| 7717 return new async.Future.value(stringResponse(200, h, resp)); | 7635 return new async.Future.value(stringResponse(200, h, resp)); |
| 7718 }), true); | 7636 }), true); |
| 7719 res.insert(arg_request, arg_part, onBehalfOf: arg_onBehalfOf, onBehalfOfCo
ntentOwner: arg_onBehalfOfContentOwner, sync: arg_sync).then(unittest.expectAsyn
c1(((api.Caption response) { | 7637 res |
| 7638 .insert(arg_request, arg_part, |
| 7639 onBehalfOf: arg_onBehalfOf, |
| 7640 onBehalfOfContentOwner: arg_onBehalfOfContentOwner, |
| 7641 sync: arg_sync) |
| 7642 .then(unittest.expectAsync1(((api.Caption response) { |
| 7720 checkCaption(response); | 7643 checkCaption(response); |
| 7721 }))); | 7644 }))); |
| 7722 }); | 7645 }); |
| 7723 | 7646 |
| 7724 unittest.test("method--list", () { | 7647 unittest.test("method--list", () { |
| 7725 | |
| 7726 var mock = new HttpServerMock(); | 7648 var mock = new HttpServerMock(); |
| 7727 api.CaptionsResourceApi res = new api.YoutubeApi(mock).captions; | 7649 api.CaptionsResourceApi res = new api.YoutubeApi(mock).captions; |
| 7728 var arg_part = "foo"; | 7650 var arg_part = "foo"; |
| 7729 var arg_videoId = "foo"; | 7651 var arg_videoId = "foo"; |
| 7730 var arg_id = "foo"; | 7652 var arg_id = "foo"; |
| 7731 var arg_onBehalfOf = "foo"; | 7653 var arg_onBehalfOf = "foo"; |
| 7732 var arg_onBehalfOfContentOwner = "foo"; | 7654 var arg_onBehalfOfContentOwner = "foo"; |
| 7733 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 7655 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 7734 var path = (req.url).path; | 7656 var path = (req.url).path; |
| 7735 var pathOffset = 0; | 7657 var pathOffset = 0; |
| 7736 var index; | 7658 var index; |
| 7737 var subPart; | 7659 var subPart; |
| 7738 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 7660 unittest.expect( |
| 7661 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 7739 pathOffset += 1; | 7662 pathOffset += 1; |
| 7740 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("youtube/v3/")); | 7663 unittest.expect(path.substring(pathOffset, pathOffset + 11), |
| 7664 unittest.equals("youtube/v3/")); |
| 7741 pathOffset += 11; | 7665 pathOffset += 11; |
| 7742 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("captions")); | 7666 unittest.expect(path.substring(pathOffset, pathOffset + 8), |
| 7667 unittest.equals("captions")); |
| 7743 pathOffset += 8; | 7668 pathOffset += 8; |
| 7744 | 7669 |
| 7745 var query = (req.url).query; | 7670 var query = (req.url).query; |
| 7746 var queryOffset = 0; | 7671 var queryOffset = 0; |
| 7747 var queryMap = {}; | 7672 var queryMap = {}; |
| 7748 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 7673 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 7749 parseBool(n) { | 7674 parseBool(n) { |
| 7750 if (n == "true") return true; | 7675 if (n == "true") return true; |
| 7751 if (n == "false") return false; | 7676 if (n == "false") return false; |
| 7752 if (n == null) return null; | 7677 if (n == null) return null; |
| 7753 throw new core.ArgumentError("Invalid boolean: $n"); | 7678 throw new core.ArgumentError("Invalid boolean: $n"); |
| 7754 } | 7679 } |
| 7680 |
| 7755 if (query.length > 0) { | 7681 if (query.length > 0) { |
| 7756 for (var part in query.split("&")) { | 7682 for (var part in query.split("&")) { |
| 7757 var keyvalue = part.split("="); | 7683 var keyvalue = part.split("="); |
| 7758 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 7684 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 7685 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 7759 } | 7686 } |
| 7760 } | 7687 } |
| 7761 unittest.expect(queryMap["part"].first, unittest.equals(arg_part)); | 7688 unittest.expect(queryMap["part"].first, unittest.equals(arg_part)); |
| 7762 unittest.expect(queryMap["videoId"].first, unittest.equals(arg_videoId))
; | 7689 unittest.expect( |
| 7690 queryMap["videoId"].first, unittest.equals(arg_videoId)); |
| 7763 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); | 7691 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); |
| 7764 unittest.expect(queryMap["onBehalfOf"].first, unittest.equals(arg_onBeha
lfOf)); | 7692 unittest.expect( |
| 7765 unittest.expect(queryMap["onBehalfOfContentOwner"].first, unittest.equal
s(arg_onBehalfOfContentOwner)); | 7693 queryMap["onBehalfOf"].first, unittest.equals(arg_onBehalfOf)); |
| 7766 | 7694 unittest.expect(queryMap["onBehalfOfContentOwner"].first, |
| 7695 unittest.equals(arg_onBehalfOfContentOwner)); |
| 7767 | 7696 |
| 7768 var h = { | 7697 var h = { |
| 7769 "content-type" : "application/json; charset=utf-8", | 7698 "content-type": "application/json; charset=utf-8", |
| 7770 }; | 7699 }; |
| 7771 var resp = convert.JSON.encode(buildCaptionListResponse()); | 7700 var resp = convert.JSON.encode(buildCaptionListResponse()); |
| 7772 return new async.Future.value(stringResponse(200, h, resp)); | 7701 return new async.Future.value(stringResponse(200, h, resp)); |
| 7773 }), true); | 7702 }), true); |
| 7774 res.list(arg_part, arg_videoId, id: arg_id, onBehalfOf: arg_onBehalfOf, on
BehalfOfContentOwner: arg_onBehalfOfContentOwner).then(unittest.expectAsync1(((a
pi.CaptionListResponse response) { | 7703 res |
| 7704 .list(arg_part, arg_videoId, |
| 7705 id: arg_id, |
| 7706 onBehalfOf: arg_onBehalfOf, |
| 7707 onBehalfOfContentOwner: arg_onBehalfOfContentOwner) |
| 7708 .then(unittest.expectAsync1(((api.CaptionListResponse response) { |
| 7775 checkCaptionListResponse(response); | 7709 checkCaptionListResponse(response); |
| 7776 }))); | 7710 }))); |
| 7777 }); | 7711 }); |
| 7778 | 7712 |
| 7779 unittest.test("method--update", () { | 7713 unittest.test("method--update", () { |
| 7780 // TODO: Implement tests for media upload; | 7714 // TODO: Implement tests for media upload; |
| 7781 // TODO: Implement tests for media download; | 7715 // TODO: Implement tests for media download; |
| 7782 | 7716 |
| 7783 var mock = new HttpServerMock(); | 7717 var mock = new HttpServerMock(); |
| 7784 api.CaptionsResourceApi res = new api.YoutubeApi(mock).captions; | 7718 api.CaptionsResourceApi res = new api.YoutubeApi(mock).captions; |
| 7785 var arg_request = buildCaption(); | 7719 var arg_request = buildCaption(); |
| 7786 var arg_part = "foo"; | 7720 var arg_part = "foo"; |
| 7787 var arg_onBehalfOf = "foo"; | 7721 var arg_onBehalfOf = "foo"; |
| 7788 var arg_onBehalfOfContentOwner = "foo"; | 7722 var arg_onBehalfOfContentOwner = "foo"; |
| 7789 var arg_sync = true; | 7723 var arg_sync = true; |
| 7790 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 7724 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 7791 var obj = new api.Caption.fromJson(json); | 7725 var obj = new api.Caption.fromJson(json); |
| 7792 checkCaption(obj); | 7726 checkCaption(obj); |
| 7793 | 7727 |
| 7794 var path = (req.url).path; | 7728 var path = (req.url).path; |
| 7795 var pathOffset = 0; | 7729 var pathOffset = 0; |
| 7796 var index; | 7730 var index; |
| 7797 var subPart; | 7731 var subPart; |
| 7798 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 7732 unittest.expect( |
| 7733 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 7799 pathOffset += 1; | 7734 pathOffset += 1; |
| 7800 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("youtube/v3/")); | 7735 unittest.expect(path.substring(pathOffset, pathOffset + 11), |
| 7736 unittest.equals("youtube/v3/")); |
| 7801 pathOffset += 11; | 7737 pathOffset += 11; |
| 7802 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("captions")); | 7738 unittest.expect(path.substring(pathOffset, pathOffset + 8), |
| 7739 unittest.equals("captions")); |
| 7803 pathOffset += 8; | 7740 pathOffset += 8; |
| 7804 | 7741 |
| 7805 var query = (req.url).query; | 7742 var query = (req.url).query; |
| 7806 var queryOffset = 0; | 7743 var queryOffset = 0; |
| 7807 var queryMap = {}; | 7744 var queryMap = {}; |
| 7808 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 7745 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 7809 parseBool(n) { | 7746 parseBool(n) { |
| 7810 if (n == "true") return true; | 7747 if (n == "true") return true; |
| 7811 if (n == "false") return false; | 7748 if (n == "false") return false; |
| 7812 if (n == null) return null; | 7749 if (n == null) return null; |
| 7813 throw new core.ArgumentError("Invalid boolean: $n"); | 7750 throw new core.ArgumentError("Invalid boolean: $n"); |
| 7814 } | 7751 } |
| 7752 |
| 7815 if (query.length > 0) { | 7753 if (query.length > 0) { |
| 7816 for (var part in query.split("&")) { | 7754 for (var part in query.split("&")) { |
| 7817 var keyvalue = part.split("="); | 7755 var keyvalue = part.split("="); |
| 7818 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 7756 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 7757 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 7819 } | 7758 } |
| 7820 } | 7759 } |
| 7821 unittest.expect(queryMap["part"].first, unittest.equals(arg_part)); | 7760 unittest.expect(queryMap["part"].first, unittest.equals(arg_part)); |
| 7822 unittest.expect(queryMap["onBehalfOf"].first, unittest.equals(arg_onBeha
lfOf)); | 7761 unittest.expect( |
| 7823 unittest.expect(queryMap["onBehalfOfContentOwner"].first, unittest.equal
s(arg_onBehalfOfContentOwner)); | 7762 queryMap["onBehalfOf"].first, unittest.equals(arg_onBehalfOf)); |
| 7763 unittest.expect(queryMap["onBehalfOfContentOwner"].first, |
| 7764 unittest.equals(arg_onBehalfOfContentOwner)); |
| 7824 unittest.expect(queryMap["sync"].first, unittest.equals("$arg_sync")); | 7765 unittest.expect(queryMap["sync"].first, unittest.equals("$arg_sync")); |
| 7825 | 7766 |
| 7826 | |
| 7827 var h = { | 7767 var h = { |
| 7828 "content-type" : "application/json; charset=utf-8", | 7768 "content-type": "application/json; charset=utf-8", |
| 7829 }; | 7769 }; |
| 7830 var resp = convert.JSON.encode(buildCaption()); | 7770 var resp = convert.JSON.encode(buildCaption()); |
| 7831 return new async.Future.value(stringResponse(200, h, resp)); | 7771 return new async.Future.value(stringResponse(200, h, resp)); |
| 7832 }), true); | 7772 }), true); |
| 7833 res.update(arg_request, arg_part, onBehalfOf: arg_onBehalfOf, onBehalfOfCo
ntentOwner: arg_onBehalfOfContentOwner, sync: arg_sync).then(unittest.expectAsyn
c1(((api.Caption response) { | 7773 res |
| 7774 .update(arg_request, arg_part, |
| 7775 onBehalfOf: arg_onBehalfOf, |
| 7776 onBehalfOfContentOwner: arg_onBehalfOfContentOwner, |
| 7777 sync: arg_sync) |
| 7778 .then(unittest.expectAsync1(((api.Caption response) { |
| 7834 checkCaption(response); | 7779 checkCaption(response); |
| 7835 }))); | 7780 }))); |
| 7836 }); | 7781 }); |
| 7837 | |
| 7838 }); | 7782 }); |
| 7839 | 7783 |
| 7840 | |
| 7841 unittest.group("resource-ChannelBannersResourceApi", () { | 7784 unittest.group("resource-ChannelBannersResourceApi", () { |
| 7842 unittest.test("method--insert", () { | 7785 unittest.test("method--insert", () { |
| 7843 // TODO: Implement tests for media upload; | 7786 // TODO: Implement tests for media upload; |
| 7844 // TODO: Implement tests for media download; | 7787 // TODO: Implement tests for media download; |
| 7845 | 7788 |
| 7846 var mock = new HttpServerMock(); | 7789 var mock = new HttpServerMock(); |
| 7847 api.ChannelBannersResourceApi res = new api.YoutubeApi(mock).channelBanner
s; | 7790 api.ChannelBannersResourceApi res = |
| 7791 new api.YoutubeApi(mock).channelBanners; |
| 7848 var arg_request = buildChannelBannerResource(); | 7792 var arg_request = buildChannelBannerResource(); |
| 7849 var arg_onBehalfOfContentOwner = "foo"; | 7793 var arg_onBehalfOfContentOwner = "foo"; |
| 7850 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 7794 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 7851 var obj = new api.ChannelBannerResource.fromJson(json); | 7795 var obj = new api.ChannelBannerResource.fromJson(json); |
| 7852 checkChannelBannerResource(obj); | 7796 checkChannelBannerResource(obj); |
| 7853 | 7797 |
| 7854 var path = (req.url).path; | 7798 var path = (req.url).path; |
| 7855 var pathOffset = 0; | 7799 var pathOffset = 0; |
| 7856 var index; | 7800 var index; |
| 7857 var subPart; | 7801 var subPart; |
| 7858 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 7802 unittest.expect( |
| 7803 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 7859 pathOffset += 1; | 7804 pathOffset += 1; |
| 7860 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("youtube/v3/")); | 7805 unittest.expect(path.substring(pathOffset, pathOffset + 11), |
| 7806 unittest.equals("youtube/v3/")); |
| 7861 pathOffset += 11; | 7807 pathOffset += 11; |
| 7862 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("channelBanners/insert")); | 7808 unittest.expect(path.substring(pathOffset, pathOffset + 21), |
| 7809 unittest.equals("channelBanners/insert")); |
| 7863 pathOffset += 21; | 7810 pathOffset += 21; |
| 7864 | 7811 |
| 7865 var query = (req.url).query; | 7812 var query = (req.url).query; |
| 7866 var queryOffset = 0; | 7813 var queryOffset = 0; |
| 7867 var queryMap = {}; | 7814 var queryMap = {}; |
| 7868 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 7815 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 7869 parseBool(n) { | 7816 parseBool(n) { |
| 7870 if (n == "true") return true; | 7817 if (n == "true") return true; |
| 7871 if (n == "false") return false; | 7818 if (n == "false") return false; |
| 7872 if (n == null) return null; | 7819 if (n == null) return null; |
| 7873 throw new core.ArgumentError("Invalid boolean: $n"); | 7820 throw new core.ArgumentError("Invalid boolean: $n"); |
| 7874 } | 7821 } |
| 7822 |
| 7875 if (query.length > 0) { | 7823 if (query.length > 0) { |
| 7876 for (var part in query.split("&")) { | 7824 for (var part in query.split("&")) { |
| 7877 var keyvalue = part.split("="); | 7825 var keyvalue = part.split("="); |
| 7878 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 7826 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 7827 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 7879 } | 7828 } |
| 7880 } | 7829 } |
| 7881 unittest.expect(queryMap["onBehalfOfContentOwner"].first, unittest.equal
s(arg_onBehalfOfContentOwner)); | 7830 unittest.expect(queryMap["onBehalfOfContentOwner"].first, |
| 7882 | 7831 unittest.equals(arg_onBehalfOfContentOwner)); |
| 7883 | 7832 |
| 7884 var h = { | 7833 var h = { |
| 7885 "content-type" : "application/json; charset=utf-8", | 7834 "content-type": "application/json; charset=utf-8", |
| 7886 }; | 7835 }; |
| 7887 var resp = convert.JSON.encode(buildChannelBannerResource()); | 7836 var resp = convert.JSON.encode(buildChannelBannerResource()); |
| 7888 return new async.Future.value(stringResponse(200, h, resp)); | 7837 return new async.Future.value(stringResponse(200, h, resp)); |
| 7889 }), true); | 7838 }), true); |
| 7890 res.insert(arg_request, onBehalfOfContentOwner: arg_onBehalfOfContentOwner
).then(unittest.expectAsync1(((api.ChannelBannerResource response) { | 7839 res |
| 7840 .insert(arg_request, |
| 7841 onBehalfOfContentOwner: arg_onBehalfOfContentOwner) |
| 7842 .then(unittest.expectAsync1(((api.ChannelBannerResource response) { |
| 7891 checkChannelBannerResource(response); | 7843 checkChannelBannerResource(response); |
| 7892 }))); | 7844 }))); |
| 7893 }); | 7845 }); |
| 7894 | |
| 7895 }); | 7846 }); |
| 7896 | 7847 |
| 7897 | |
| 7898 unittest.group("resource-ChannelSectionsResourceApi", () { | 7848 unittest.group("resource-ChannelSectionsResourceApi", () { |
| 7899 unittest.test("method--delete", () { | 7849 unittest.test("method--delete", () { |
| 7900 | |
| 7901 var mock = new HttpServerMock(); | 7850 var mock = new HttpServerMock(); |
| 7902 api.ChannelSectionsResourceApi res = new api.YoutubeApi(mock).channelSecti
ons; | 7851 api.ChannelSectionsResourceApi res = |
| 7852 new api.YoutubeApi(mock).channelSections; |
| 7903 var arg_id = "foo"; | 7853 var arg_id = "foo"; |
| 7904 var arg_onBehalfOfContentOwner = "foo"; | 7854 var arg_onBehalfOfContentOwner = "foo"; |
| 7905 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 7855 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 7906 var path = (req.url).path; | 7856 var path = (req.url).path; |
| 7907 var pathOffset = 0; | 7857 var pathOffset = 0; |
| 7908 var index; | 7858 var index; |
| 7909 var subPart; | 7859 var subPart; |
| 7910 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 7860 unittest.expect( |
| 7861 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 7911 pathOffset += 1; | 7862 pathOffset += 1; |
| 7912 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("youtube/v3/")); | 7863 unittest.expect(path.substring(pathOffset, pathOffset + 11), |
| 7864 unittest.equals("youtube/v3/")); |
| 7913 pathOffset += 11; | 7865 pathOffset += 11; |
| 7914 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("channelSections")); | 7866 unittest.expect(path.substring(pathOffset, pathOffset + 15), |
| 7867 unittest.equals("channelSections")); |
| 7915 pathOffset += 15; | 7868 pathOffset += 15; |
| 7916 | 7869 |
| 7917 var query = (req.url).query; | 7870 var query = (req.url).query; |
| 7918 var queryOffset = 0; | 7871 var queryOffset = 0; |
| 7919 var queryMap = {}; | 7872 var queryMap = {}; |
| 7920 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 7873 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 7921 parseBool(n) { | 7874 parseBool(n) { |
| 7922 if (n == "true") return true; | 7875 if (n == "true") return true; |
| 7923 if (n == "false") return false; | 7876 if (n == "false") return false; |
| 7924 if (n == null) return null; | 7877 if (n == null) return null; |
| 7925 throw new core.ArgumentError("Invalid boolean: $n"); | 7878 throw new core.ArgumentError("Invalid boolean: $n"); |
| 7926 } | 7879 } |
| 7880 |
| 7927 if (query.length > 0) { | 7881 if (query.length > 0) { |
| 7928 for (var part in query.split("&")) { | 7882 for (var part in query.split("&")) { |
| 7929 var keyvalue = part.split("="); | 7883 var keyvalue = part.split("="); |
| 7930 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 7884 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 7885 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 7931 } | 7886 } |
| 7932 } | 7887 } |
| 7933 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); | 7888 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); |
| 7934 unittest.expect(queryMap["onBehalfOfContentOwner"].first, unittest.equal
s(arg_onBehalfOfContentOwner)); | 7889 unittest.expect(queryMap["onBehalfOfContentOwner"].first, |
| 7935 | 7890 unittest.equals(arg_onBehalfOfContentOwner)); |
| 7936 | 7891 |
| 7937 var h = { | 7892 var h = { |
| 7938 "content-type" : "application/json; charset=utf-8", | 7893 "content-type": "application/json; charset=utf-8", |
| 7939 }; | 7894 }; |
| 7940 var resp = ""; | 7895 var resp = ""; |
| 7941 return new async.Future.value(stringResponse(200, h, resp)); | 7896 return new async.Future.value(stringResponse(200, h, resp)); |
| 7942 }), true); | 7897 }), true); |
| 7943 res.delete(arg_id, onBehalfOfContentOwner: arg_onBehalfOfContentOwner).the
n(unittest.expectAsync1((_) {})); | 7898 res |
| 7899 .delete(arg_id, onBehalfOfContentOwner: arg_onBehalfOfContentOwner) |
| 7900 .then(unittest.expectAsync1((_) {})); |
| 7944 }); | 7901 }); |
| 7945 | 7902 |
| 7946 unittest.test("method--insert", () { | 7903 unittest.test("method--insert", () { |
| 7947 | |
| 7948 var mock = new HttpServerMock(); | 7904 var mock = new HttpServerMock(); |
| 7949 api.ChannelSectionsResourceApi res = new api.YoutubeApi(mock).channelSecti
ons; | 7905 api.ChannelSectionsResourceApi res = |
| 7906 new api.YoutubeApi(mock).channelSections; |
| 7950 var arg_request = buildChannelSection(); | 7907 var arg_request = buildChannelSection(); |
| 7951 var arg_part = "foo"; | 7908 var arg_part = "foo"; |
| 7952 var arg_onBehalfOfContentOwner = "foo"; | 7909 var arg_onBehalfOfContentOwner = "foo"; |
| 7953 var arg_onBehalfOfContentOwnerChannel = "foo"; | 7910 var arg_onBehalfOfContentOwnerChannel = "foo"; |
| 7954 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 7911 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 7955 var obj = new api.ChannelSection.fromJson(json); | 7912 var obj = new api.ChannelSection.fromJson(json); |
| 7956 checkChannelSection(obj); | 7913 checkChannelSection(obj); |
| 7957 | 7914 |
| 7958 var path = (req.url).path; | 7915 var path = (req.url).path; |
| 7959 var pathOffset = 0; | 7916 var pathOffset = 0; |
| 7960 var index; | 7917 var index; |
| 7961 var subPart; | 7918 var subPart; |
| 7962 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 7919 unittest.expect( |
| 7920 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 7963 pathOffset += 1; | 7921 pathOffset += 1; |
| 7964 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("youtube/v3/")); | 7922 unittest.expect(path.substring(pathOffset, pathOffset + 11), |
| 7923 unittest.equals("youtube/v3/")); |
| 7965 pathOffset += 11; | 7924 pathOffset += 11; |
| 7966 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("channelSections")); | 7925 unittest.expect(path.substring(pathOffset, pathOffset + 15), |
| 7926 unittest.equals("channelSections")); |
| 7967 pathOffset += 15; | 7927 pathOffset += 15; |
| 7968 | 7928 |
| 7969 var query = (req.url).query; | 7929 var query = (req.url).query; |
| 7970 var queryOffset = 0; | 7930 var queryOffset = 0; |
| 7971 var queryMap = {}; | 7931 var queryMap = {}; |
| 7972 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 7932 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 7973 parseBool(n) { | 7933 parseBool(n) { |
| 7974 if (n == "true") return true; | 7934 if (n == "true") return true; |
| 7975 if (n == "false") return false; | 7935 if (n == "false") return false; |
| 7976 if (n == null) return null; | 7936 if (n == null) return null; |
| 7977 throw new core.ArgumentError("Invalid boolean: $n"); | 7937 throw new core.ArgumentError("Invalid boolean: $n"); |
| 7978 } | 7938 } |
| 7939 |
| 7979 if (query.length > 0) { | 7940 if (query.length > 0) { |
| 7980 for (var part in query.split("&")) { | 7941 for (var part in query.split("&")) { |
| 7981 var keyvalue = part.split("="); | 7942 var keyvalue = part.split("="); |
| 7982 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 7943 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 7944 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 7983 } | 7945 } |
| 7984 } | 7946 } |
| 7985 unittest.expect(queryMap["part"].first, unittest.equals(arg_part)); | 7947 unittest.expect(queryMap["part"].first, unittest.equals(arg_part)); |
| 7986 unittest.expect(queryMap["onBehalfOfContentOwner"].first, unittest.equal
s(arg_onBehalfOfContentOwner)); | 7948 unittest.expect(queryMap["onBehalfOfContentOwner"].first, |
| 7987 unittest.expect(queryMap["onBehalfOfContentOwnerChannel"].first, unittes
t.equals(arg_onBehalfOfContentOwnerChannel)); | 7949 unittest.equals(arg_onBehalfOfContentOwner)); |
| 7988 | 7950 unittest.expect(queryMap["onBehalfOfContentOwnerChannel"].first, |
| 7951 unittest.equals(arg_onBehalfOfContentOwnerChannel)); |
| 7989 | 7952 |
| 7990 var h = { | 7953 var h = { |
| 7991 "content-type" : "application/json; charset=utf-8", | 7954 "content-type": "application/json; charset=utf-8", |
| 7992 }; | 7955 }; |
| 7993 var resp = convert.JSON.encode(buildChannelSection()); | 7956 var resp = convert.JSON.encode(buildChannelSection()); |
| 7994 return new async.Future.value(stringResponse(200, h, resp)); | 7957 return new async.Future.value(stringResponse(200, h, resp)); |
| 7995 }), true); | 7958 }), true); |
| 7996 res.insert(arg_request, arg_part, onBehalfOfContentOwner: arg_onBehalfOfCo
ntentOwner, onBehalfOfContentOwnerChannel: arg_onBehalfOfContentOwnerChannel).th
en(unittest.expectAsync1(((api.ChannelSection response) { | 7959 res |
| 7960 .insert(arg_request, arg_part, |
| 7961 onBehalfOfContentOwner: arg_onBehalfOfContentOwner, |
| 7962 onBehalfOfContentOwnerChannel: arg_onBehalfOfContentOwnerChannel) |
| 7963 .then(unittest.expectAsync1(((api.ChannelSection response) { |
| 7997 checkChannelSection(response); | 7964 checkChannelSection(response); |
| 7998 }))); | 7965 }))); |
| 7999 }); | 7966 }); |
| 8000 | 7967 |
| 8001 unittest.test("method--list", () { | 7968 unittest.test("method--list", () { |
| 8002 | |
| 8003 var mock = new HttpServerMock(); | 7969 var mock = new HttpServerMock(); |
| 8004 api.ChannelSectionsResourceApi res = new api.YoutubeApi(mock).channelSecti
ons; | 7970 api.ChannelSectionsResourceApi res = |
| 7971 new api.YoutubeApi(mock).channelSections; |
| 8005 var arg_part = "foo"; | 7972 var arg_part = "foo"; |
| 8006 var arg_channelId = "foo"; | 7973 var arg_channelId = "foo"; |
| 8007 var arg_hl = "foo"; | 7974 var arg_hl = "foo"; |
| 8008 var arg_id = "foo"; | 7975 var arg_id = "foo"; |
| 8009 var arg_mine = true; | 7976 var arg_mine = true; |
| 8010 var arg_onBehalfOfContentOwner = "foo"; | 7977 var arg_onBehalfOfContentOwner = "foo"; |
| 8011 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 7978 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 8012 var path = (req.url).path; | 7979 var path = (req.url).path; |
| 8013 var pathOffset = 0; | 7980 var pathOffset = 0; |
| 8014 var index; | 7981 var index; |
| 8015 var subPart; | 7982 var subPart; |
| 8016 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 7983 unittest.expect( |
| 7984 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 8017 pathOffset += 1; | 7985 pathOffset += 1; |
| 8018 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("youtube/v3/")); | 7986 unittest.expect(path.substring(pathOffset, pathOffset + 11), |
| 7987 unittest.equals("youtube/v3/")); |
| 8019 pathOffset += 11; | 7988 pathOffset += 11; |
| 8020 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("channelSections")); | 7989 unittest.expect(path.substring(pathOffset, pathOffset + 15), |
| 7990 unittest.equals("channelSections")); |
| 8021 pathOffset += 15; | 7991 pathOffset += 15; |
| 8022 | 7992 |
| 8023 var query = (req.url).query; | 7993 var query = (req.url).query; |
| 8024 var queryOffset = 0; | 7994 var queryOffset = 0; |
| 8025 var queryMap = {}; | 7995 var queryMap = {}; |
| 8026 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 7996 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 8027 parseBool(n) { | 7997 parseBool(n) { |
| 8028 if (n == "true") return true; | 7998 if (n == "true") return true; |
| 8029 if (n == "false") return false; | 7999 if (n == "false") return false; |
| 8030 if (n == null) return null; | 8000 if (n == null) return null; |
| 8031 throw new core.ArgumentError("Invalid boolean: $n"); | 8001 throw new core.ArgumentError("Invalid boolean: $n"); |
| 8032 } | 8002 } |
| 8003 |
| 8033 if (query.length > 0) { | 8004 if (query.length > 0) { |
| 8034 for (var part in query.split("&")) { | 8005 for (var part in query.split("&")) { |
| 8035 var keyvalue = part.split("="); | 8006 var keyvalue = part.split("="); |
| 8036 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 8007 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 8008 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 8037 } | 8009 } |
| 8038 } | 8010 } |
| 8039 unittest.expect(queryMap["part"].first, unittest.equals(arg_part)); | 8011 unittest.expect(queryMap["part"].first, unittest.equals(arg_part)); |
| 8040 unittest.expect(queryMap["channelId"].first, unittest.equals(arg_channel
Id)); | 8012 unittest.expect( |
| 8013 queryMap["channelId"].first, unittest.equals(arg_channelId)); |
| 8041 unittest.expect(queryMap["hl"].first, unittest.equals(arg_hl)); | 8014 unittest.expect(queryMap["hl"].first, unittest.equals(arg_hl)); |
| 8042 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); | 8015 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); |
| 8043 unittest.expect(queryMap["mine"].first, unittest.equals("$arg_mine")); | 8016 unittest.expect(queryMap["mine"].first, unittest.equals("$arg_mine")); |
| 8044 unittest.expect(queryMap["onBehalfOfContentOwner"].first, unittest.equal
s(arg_onBehalfOfContentOwner)); | 8017 unittest.expect(queryMap["onBehalfOfContentOwner"].first, |
| 8045 | 8018 unittest.equals(arg_onBehalfOfContentOwner)); |
| 8046 | 8019 |
| 8047 var h = { | 8020 var h = { |
| 8048 "content-type" : "application/json; charset=utf-8", | 8021 "content-type": "application/json; charset=utf-8", |
| 8049 }; | 8022 }; |
| 8050 var resp = convert.JSON.encode(buildChannelSectionListResponse()); | 8023 var resp = convert.JSON.encode(buildChannelSectionListResponse()); |
| 8051 return new async.Future.value(stringResponse(200, h, resp)); | 8024 return new async.Future.value(stringResponse(200, h, resp)); |
| 8052 }), true); | 8025 }), true); |
| 8053 res.list(arg_part, channelId: arg_channelId, hl: arg_hl, id: arg_id, mine:
arg_mine, onBehalfOfContentOwner: arg_onBehalfOfContentOwner).then(unittest.exp
ectAsync1(((api.ChannelSectionListResponse response) { | 8026 res |
| 8027 .list(arg_part, |
| 8028 channelId: arg_channelId, |
| 8029 hl: arg_hl, |
| 8030 id: arg_id, |
| 8031 mine: arg_mine, |
| 8032 onBehalfOfContentOwner: arg_onBehalfOfContentOwner) |
| 8033 .then( |
| 8034 unittest.expectAsync1(((api.ChannelSectionListResponse response) { |
| 8054 checkChannelSectionListResponse(response); | 8035 checkChannelSectionListResponse(response); |
| 8055 }))); | 8036 }))); |
| 8056 }); | 8037 }); |
| 8057 | 8038 |
| 8058 unittest.test("method--update", () { | 8039 unittest.test("method--update", () { |
| 8059 | |
| 8060 var mock = new HttpServerMock(); | 8040 var mock = new HttpServerMock(); |
| 8061 api.ChannelSectionsResourceApi res = new api.YoutubeApi(mock).channelSecti
ons; | 8041 api.ChannelSectionsResourceApi res = |
| 8042 new api.YoutubeApi(mock).channelSections; |
| 8062 var arg_request = buildChannelSection(); | 8043 var arg_request = buildChannelSection(); |
| 8063 var arg_part = "foo"; | 8044 var arg_part = "foo"; |
| 8064 var arg_onBehalfOfContentOwner = "foo"; | 8045 var arg_onBehalfOfContentOwner = "foo"; |
| 8065 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 8046 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 8066 var obj = new api.ChannelSection.fromJson(json); | 8047 var obj = new api.ChannelSection.fromJson(json); |
| 8067 checkChannelSection(obj); | 8048 checkChannelSection(obj); |
| 8068 | 8049 |
| 8069 var path = (req.url).path; | 8050 var path = (req.url).path; |
| 8070 var pathOffset = 0; | 8051 var pathOffset = 0; |
| 8071 var index; | 8052 var index; |
| 8072 var subPart; | 8053 var subPart; |
| 8073 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 8054 unittest.expect( |
| 8055 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 8074 pathOffset += 1; | 8056 pathOffset += 1; |
| 8075 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("youtube/v3/")); | 8057 unittest.expect(path.substring(pathOffset, pathOffset + 11), |
| 8058 unittest.equals("youtube/v3/")); |
| 8076 pathOffset += 11; | 8059 pathOffset += 11; |
| 8077 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("channelSections")); | 8060 unittest.expect(path.substring(pathOffset, pathOffset + 15), |
| 8061 unittest.equals("channelSections")); |
| 8078 pathOffset += 15; | 8062 pathOffset += 15; |
| 8079 | 8063 |
| 8080 var query = (req.url).query; | 8064 var query = (req.url).query; |
| 8081 var queryOffset = 0; | 8065 var queryOffset = 0; |
| 8082 var queryMap = {}; | 8066 var queryMap = {}; |
| 8083 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 8067 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 8084 parseBool(n) { | 8068 parseBool(n) { |
| 8085 if (n == "true") return true; | 8069 if (n == "true") return true; |
| 8086 if (n == "false") return false; | 8070 if (n == "false") return false; |
| 8087 if (n == null) return null; | 8071 if (n == null) return null; |
| 8088 throw new core.ArgumentError("Invalid boolean: $n"); | 8072 throw new core.ArgumentError("Invalid boolean: $n"); |
| 8089 } | 8073 } |
| 8074 |
| 8090 if (query.length > 0) { | 8075 if (query.length > 0) { |
| 8091 for (var part in query.split("&")) { | 8076 for (var part in query.split("&")) { |
| 8092 var keyvalue = part.split("="); | 8077 var keyvalue = part.split("="); |
| 8093 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 8078 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 8079 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 8094 } | 8080 } |
| 8095 } | 8081 } |
| 8096 unittest.expect(queryMap["part"].first, unittest.equals(arg_part)); | 8082 unittest.expect(queryMap["part"].first, unittest.equals(arg_part)); |
| 8097 unittest.expect(queryMap["onBehalfOfContentOwner"].first, unittest.equal
s(arg_onBehalfOfContentOwner)); | 8083 unittest.expect(queryMap["onBehalfOfContentOwner"].first, |
| 8098 | 8084 unittest.equals(arg_onBehalfOfContentOwner)); |
| 8099 | 8085 |
| 8100 var h = { | 8086 var h = { |
| 8101 "content-type" : "application/json; charset=utf-8", | 8087 "content-type": "application/json; charset=utf-8", |
| 8102 }; | 8088 }; |
| 8103 var resp = convert.JSON.encode(buildChannelSection()); | 8089 var resp = convert.JSON.encode(buildChannelSection()); |
| 8104 return new async.Future.value(stringResponse(200, h, resp)); | 8090 return new async.Future.value(stringResponse(200, h, resp)); |
| 8105 }), true); | 8091 }), true); |
| 8106 res.update(arg_request, arg_part, onBehalfOfContentOwner: arg_onBehalfOfCo
ntentOwner).then(unittest.expectAsync1(((api.ChannelSection response) { | 8092 res |
| 8093 .update(arg_request, arg_part, |
| 8094 onBehalfOfContentOwner: arg_onBehalfOfContentOwner) |
| 8095 .then(unittest.expectAsync1(((api.ChannelSection response) { |
| 8107 checkChannelSection(response); | 8096 checkChannelSection(response); |
| 8108 }))); | 8097 }))); |
| 8109 }); | 8098 }); |
| 8110 | |
| 8111 }); | 8099 }); |
| 8112 | 8100 |
| 8113 | |
| 8114 unittest.group("resource-ChannelsResourceApi", () { | 8101 unittest.group("resource-ChannelsResourceApi", () { |
| 8115 unittest.test("method--list", () { | 8102 unittest.test("method--list", () { |
| 8116 | |
| 8117 var mock = new HttpServerMock(); | 8103 var mock = new HttpServerMock(); |
| 8118 api.ChannelsResourceApi res = new api.YoutubeApi(mock).channels; | 8104 api.ChannelsResourceApi res = new api.YoutubeApi(mock).channels; |
| 8119 var arg_part = "foo"; | 8105 var arg_part = "foo"; |
| 8120 var arg_categoryId = "foo"; | 8106 var arg_categoryId = "foo"; |
| 8121 var arg_forUsername = "foo"; | 8107 var arg_forUsername = "foo"; |
| 8122 var arg_hl = "foo"; | 8108 var arg_hl = "foo"; |
| 8123 var arg_id = "foo"; | 8109 var arg_id = "foo"; |
| 8124 var arg_managedByMe = true; | 8110 var arg_managedByMe = true; |
| 8125 var arg_maxResults = 42; | 8111 var arg_maxResults = 42; |
| 8126 var arg_mine = true; | 8112 var arg_mine = true; |
| 8127 var arg_mySubscribers = true; | 8113 var arg_mySubscribers = true; |
| 8128 var arg_onBehalfOfContentOwner = "foo"; | 8114 var arg_onBehalfOfContentOwner = "foo"; |
| 8129 var arg_pageToken = "foo"; | 8115 var arg_pageToken = "foo"; |
| 8130 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 8116 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 8131 var path = (req.url).path; | 8117 var path = (req.url).path; |
| 8132 var pathOffset = 0; | 8118 var pathOffset = 0; |
| 8133 var index; | 8119 var index; |
| 8134 var subPart; | 8120 var subPart; |
| 8135 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 8121 unittest.expect( |
| 8122 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 8136 pathOffset += 1; | 8123 pathOffset += 1; |
| 8137 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("youtube/v3/")); | 8124 unittest.expect(path.substring(pathOffset, pathOffset + 11), |
| 8125 unittest.equals("youtube/v3/")); |
| 8138 pathOffset += 11; | 8126 pathOffset += 11; |
| 8139 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("channels")); | 8127 unittest.expect(path.substring(pathOffset, pathOffset + 8), |
| 8128 unittest.equals("channels")); |
| 8140 pathOffset += 8; | 8129 pathOffset += 8; |
| 8141 | 8130 |
| 8142 var query = (req.url).query; | 8131 var query = (req.url).query; |
| 8143 var queryOffset = 0; | 8132 var queryOffset = 0; |
| 8144 var queryMap = {}; | 8133 var queryMap = {}; |
| 8145 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 8134 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 8146 parseBool(n) { | 8135 parseBool(n) { |
| 8147 if (n == "true") return true; | 8136 if (n == "true") return true; |
| 8148 if (n == "false") return false; | 8137 if (n == "false") return false; |
| 8149 if (n == null) return null; | 8138 if (n == null) return null; |
| 8150 throw new core.ArgumentError("Invalid boolean: $n"); | 8139 throw new core.ArgumentError("Invalid boolean: $n"); |
| 8151 } | 8140 } |
| 8141 |
| 8152 if (query.length > 0) { | 8142 if (query.length > 0) { |
| 8153 for (var part in query.split("&")) { | 8143 for (var part in query.split("&")) { |
| 8154 var keyvalue = part.split("="); | 8144 var keyvalue = part.split("="); |
| 8155 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 8145 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 8146 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 8156 } | 8147 } |
| 8157 } | 8148 } |
| 8158 unittest.expect(queryMap["part"].first, unittest.equals(arg_part)); | 8149 unittest.expect(queryMap["part"].first, unittest.equals(arg_part)); |
| 8159 unittest.expect(queryMap["categoryId"].first, unittest.equals(arg_catego
ryId)); | 8150 unittest.expect( |
| 8160 unittest.expect(queryMap["forUsername"].first, unittest.equals(arg_forUs
ername)); | 8151 queryMap["categoryId"].first, unittest.equals(arg_categoryId)); |
| 8152 unittest.expect( |
| 8153 queryMap["forUsername"].first, unittest.equals(arg_forUsername)); |
| 8161 unittest.expect(queryMap["hl"].first, unittest.equals(arg_hl)); | 8154 unittest.expect(queryMap["hl"].first, unittest.equals(arg_hl)); |
| 8162 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); | 8155 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); |
| 8163 unittest.expect(queryMap["managedByMe"].first, unittest.equals("$arg_man
agedByMe")); | 8156 unittest.expect( |
| 8164 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | 8157 queryMap["managedByMe"].first, unittest.equals("$arg_managedByMe")); |
| 8158 unittest.expect(core.int.parse(queryMap["maxResults"].first), |
| 8159 unittest.equals(arg_maxResults)); |
| 8165 unittest.expect(queryMap["mine"].first, unittest.equals("$arg_mine")); | 8160 unittest.expect(queryMap["mine"].first, unittest.equals("$arg_mine")); |
| 8166 unittest.expect(queryMap["mySubscribers"].first, unittest.equals("$arg_m
ySubscribers")); | 8161 unittest.expect(queryMap["mySubscribers"].first, |
| 8167 unittest.expect(queryMap["onBehalfOfContentOwner"].first, unittest.equal
s(arg_onBehalfOfContentOwner)); | 8162 unittest.equals("$arg_mySubscribers")); |
| 8168 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 8163 unittest.expect(queryMap["onBehalfOfContentOwner"].first, |
| 8169 | 8164 unittest.equals(arg_onBehalfOfContentOwner)); |
| 8165 unittest.expect( |
| 8166 queryMap["pageToken"].first, unittest.equals(arg_pageToken)); |
| 8170 | 8167 |
| 8171 var h = { | 8168 var h = { |
| 8172 "content-type" : "application/json; charset=utf-8", | 8169 "content-type": "application/json; charset=utf-8", |
| 8173 }; | 8170 }; |
| 8174 var resp = convert.JSON.encode(buildChannelListResponse()); | 8171 var resp = convert.JSON.encode(buildChannelListResponse()); |
| 8175 return new async.Future.value(stringResponse(200, h, resp)); | 8172 return new async.Future.value(stringResponse(200, h, resp)); |
| 8176 }), true); | 8173 }), true); |
| 8177 res.list(arg_part, categoryId: arg_categoryId, forUsername: arg_forUsernam
e, hl: arg_hl, id: arg_id, managedByMe: arg_managedByMe, maxResults: arg_maxResu
lts, mine: arg_mine, mySubscribers: arg_mySubscribers, onBehalfOfContentOwner: a
rg_onBehalfOfContentOwner, pageToken: arg_pageToken).then(unittest.expectAsync1(
((api.ChannelListResponse response) { | 8174 res |
| 8175 .list(arg_part, |
| 8176 categoryId: arg_categoryId, |
| 8177 forUsername: arg_forUsername, |
| 8178 hl: arg_hl, |
| 8179 id: arg_id, |
| 8180 managedByMe: arg_managedByMe, |
| 8181 maxResults: arg_maxResults, |
| 8182 mine: arg_mine, |
| 8183 mySubscribers: arg_mySubscribers, |
| 8184 onBehalfOfContentOwner: arg_onBehalfOfContentOwner, |
| 8185 pageToken: arg_pageToken) |
| 8186 .then(unittest.expectAsync1(((api.ChannelListResponse response) { |
| 8178 checkChannelListResponse(response); | 8187 checkChannelListResponse(response); |
| 8179 }))); | 8188 }))); |
| 8180 }); | 8189 }); |
| 8181 | 8190 |
| 8182 unittest.test("method--update", () { | 8191 unittest.test("method--update", () { |
| 8183 | |
| 8184 var mock = new HttpServerMock(); | 8192 var mock = new HttpServerMock(); |
| 8185 api.ChannelsResourceApi res = new api.YoutubeApi(mock).channels; | 8193 api.ChannelsResourceApi res = new api.YoutubeApi(mock).channels; |
| 8186 var arg_request = buildChannel(); | 8194 var arg_request = buildChannel(); |
| 8187 var arg_part = "foo"; | 8195 var arg_part = "foo"; |
| 8188 var arg_onBehalfOfContentOwner = "foo"; | 8196 var arg_onBehalfOfContentOwner = "foo"; |
| 8189 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 8197 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 8190 var obj = new api.Channel.fromJson(json); | 8198 var obj = new api.Channel.fromJson(json); |
| 8191 checkChannel(obj); | 8199 checkChannel(obj); |
| 8192 | 8200 |
| 8193 var path = (req.url).path; | 8201 var path = (req.url).path; |
| 8194 var pathOffset = 0; | 8202 var pathOffset = 0; |
| 8195 var index; | 8203 var index; |
| 8196 var subPart; | 8204 var subPart; |
| 8197 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 8205 unittest.expect( |
| 8206 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 8198 pathOffset += 1; | 8207 pathOffset += 1; |
| 8199 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("youtube/v3/")); | 8208 unittest.expect(path.substring(pathOffset, pathOffset + 11), |
| 8209 unittest.equals("youtube/v3/")); |
| 8200 pathOffset += 11; | 8210 pathOffset += 11; |
| 8201 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("channels")); | 8211 unittest.expect(path.substring(pathOffset, pathOffset + 8), |
| 8212 unittest.equals("channels")); |
| 8202 pathOffset += 8; | 8213 pathOffset += 8; |
| 8203 | 8214 |
| 8204 var query = (req.url).query; | 8215 var query = (req.url).query; |
| 8205 var queryOffset = 0; | 8216 var queryOffset = 0; |
| 8206 var queryMap = {}; | 8217 var queryMap = {}; |
| 8207 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 8218 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 8208 parseBool(n) { | 8219 parseBool(n) { |
| 8209 if (n == "true") return true; | 8220 if (n == "true") return true; |
| 8210 if (n == "false") return false; | 8221 if (n == "false") return false; |
| 8211 if (n == null) return null; | 8222 if (n == null) return null; |
| 8212 throw new core.ArgumentError("Invalid boolean: $n"); | 8223 throw new core.ArgumentError("Invalid boolean: $n"); |
| 8213 } | 8224 } |
| 8225 |
| 8214 if (query.length > 0) { | 8226 if (query.length > 0) { |
| 8215 for (var part in query.split("&")) { | 8227 for (var part in query.split("&")) { |
| 8216 var keyvalue = part.split("="); | 8228 var keyvalue = part.split("="); |
| 8217 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 8229 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 8230 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 8218 } | 8231 } |
| 8219 } | 8232 } |
| 8220 unittest.expect(queryMap["part"].first, unittest.equals(arg_part)); | 8233 unittest.expect(queryMap["part"].first, unittest.equals(arg_part)); |
| 8221 unittest.expect(queryMap["onBehalfOfContentOwner"].first, unittest.equal
s(arg_onBehalfOfContentOwner)); | 8234 unittest.expect(queryMap["onBehalfOfContentOwner"].first, |
| 8222 | 8235 unittest.equals(arg_onBehalfOfContentOwner)); |
| 8223 | 8236 |
| 8224 var h = { | 8237 var h = { |
| 8225 "content-type" : "application/json; charset=utf-8", | 8238 "content-type": "application/json; charset=utf-8", |
| 8226 }; | 8239 }; |
| 8227 var resp = convert.JSON.encode(buildChannel()); | 8240 var resp = convert.JSON.encode(buildChannel()); |
| 8228 return new async.Future.value(stringResponse(200, h, resp)); | 8241 return new async.Future.value(stringResponse(200, h, resp)); |
| 8229 }), true); | 8242 }), true); |
| 8230 res.update(arg_request, arg_part, onBehalfOfContentOwner: arg_onBehalfOfCo
ntentOwner).then(unittest.expectAsync1(((api.Channel response) { | 8243 res |
| 8244 .update(arg_request, arg_part, |
| 8245 onBehalfOfContentOwner: arg_onBehalfOfContentOwner) |
| 8246 .then(unittest.expectAsync1(((api.Channel response) { |
| 8231 checkChannel(response); | 8247 checkChannel(response); |
| 8232 }))); | 8248 }))); |
| 8233 }); | 8249 }); |
| 8234 | |
| 8235 }); | 8250 }); |
| 8236 | 8251 |
| 8237 | |
| 8238 unittest.group("resource-CommentThreadsResourceApi", () { | 8252 unittest.group("resource-CommentThreadsResourceApi", () { |
| 8239 unittest.test("method--insert", () { | 8253 unittest.test("method--insert", () { |
| 8240 | |
| 8241 var mock = new HttpServerMock(); | 8254 var mock = new HttpServerMock(); |
| 8242 api.CommentThreadsResourceApi res = new api.YoutubeApi(mock).commentThread
s; | 8255 api.CommentThreadsResourceApi res = |
| 8256 new api.YoutubeApi(mock).commentThreads; |
| 8243 var arg_request = buildCommentThread(); | 8257 var arg_request = buildCommentThread(); |
| 8244 var arg_part = "foo"; | 8258 var arg_part = "foo"; |
| 8245 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 8259 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 8246 var obj = new api.CommentThread.fromJson(json); | 8260 var obj = new api.CommentThread.fromJson(json); |
| 8247 checkCommentThread(obj); | 8261 checkCommentThread(obj); |
| 8248 | 8262 |
| 8249 var path = (req.url).path; | 8263 var path = (req.url).path; |
| 8250 var pathOffset = 0; | 8264 var pathOffset = 0; |
| 8251 var index; | 8265 var index; |
| 8252 var subPart; | 8266 var subPart; |
| 8253 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 8267 unittest.expect( |
| 8268 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 8254 pathOffset += 1; | 8269 pathOffset += 1; |
| 8255 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("youtube/v3/")); | 8270 unittest.expect(path.substring(pathOffset, pathOffset + 11), |
| 8271 unittest.equals("youtube/v3/")); |
| 8256 pathOffset += 11; | 8272 pathOffset += 11; |
| 8257 unittest.expect(path.substring(pathOffset, pathOffset + 14), unittest.eq
uals("commentThreads")); | 8273 unittest.expect(path.substring(pathOffset, pathOffset + 14), |
| 8274 unittest.equals("commentThreads")); |
| 8258 pathOffset += 14; | 8275 pathOffset += 14; |
| 8259 | 8276 |
| 8260 var query = (req.url).query; | 8277 var query = (req.url).query; |
| 8261 var queryOffset = 0; | 8278 var queryOffset = 0; |
| 8262 var queryMap = {}; | 8279 var queryMap = {}; |
| 8263 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 8280 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 8264 parseBool(n) { | 8281 parseBool(n) { |
| 8265 if (n == "true") return true; | 8282 if (n == "true") return true; |
| 8266 if (n == "false") return false; | 8283 if (n == "false") return false; |
| 8267 if (n == null) return null; | 8284 if (n == null) return null; |
| 8268 throw new core.ArgumentError("Invalid boolean: $n"); | 8285 throw new core.ArgumentError("Invalid boolean: $n"); |
| 8269 } | 8286 } |
| 8287 |
| 8270 if (query.length > 0) { | 8288 if (query.length > 0) { |
| 8271 for (var part in query.split("&")) { | 8289 for (var part in query.split("&")) { |
| 8272 var keyvalue = part.split("="); | 8290 var keyvalue = part.split("="); |
| 8273 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 8291 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 8292 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 8274 } | 8293 } |
| 8275 } | 8294 } |
| 8276 unittest.expect(queryMap["part"].first, unittest.equals(arg_part)); | 8295 unittest.expect(queryMap["part"].first, unittest.equals(arg_part)); |
| 8277 | 8296 |
| 8278 | |
| 8279 var h = { | 8297 var h = { |
| 8280 "content-type" : "application/json; charset=utf-8", | 8298 "content-type": "application/json; charset=utf-8", |
| 8281 }; | 8299 }; |
| 8282 var resp = convert.JSON.encode(buildCommentThread()); | 8300 var resp = convert.JSON.encode(buildCommentThread()); |
| 8283 return new async.Future.value(stringResponse(200, h, resp)); | 8301 return new async.Future.value(stringResponse(200, h, resp)); |
| 8284 }), true); | 8302 }), true); |
| 8285 res.insert(arg_request, arg_part).then(unittest.expectAsync1(((api.Comment
Thread response) { | 8303 res |
| 8304 .insert(arg_request, arg_part) |
| 8305 .then(unittest.expectAsync1(((api.CommentThread response) { |
| 8286 checkCommentThread(response); | 8306 checkCommentThread(response); |
| 8287 }))); | 8307 }))); |
| 8288 }); | 8308 }); |
| 8289 | 8309 |
| 8290 unittest.test("method--list", () { | 8310 unittest.test("method--list", () { |
| 8291 | |
| 8292 var mock = new HttpServerMock(); | 8311 var mock = new HttpServerMock(); |
| 8293 api.CommentThreadsResourceApi res = new api.YoutubeApi(mock).commentThread
s; | 8312 api.CommentThreadsResourceApi res = |
| 8313 new api.YoutubeApi(mock).commentThreads; |
| 8294 var arg_part = "foo"; | 8314 var arg_part = "foo"; |
| 8295 var arg_allThreadsRelatedToChannelId = "foo"; | 8315 var arg_allThreadsRelatedToChannelId = "foo"; |
| 8296 var arg_channelId = "foo"; | 8316 var arg_channelId = "foo"; |
| 8297 var arg_id = "foo"; | 8317 var arg_id = "foo"; |
| 8298 var arg_maxResults = 42; | 8318 var arg_maxResults = 42; |
| 8299 var arg_moderationStatus = "foo"; | 8319 var arg_moderationStatus = "foo"; |
| 8300 var arg_order = "foo"; | 8320 var arg_order = "foo"; |
| 8301 var arg_pageToken = "foo"; | 8321 var arg_pageToken = "foo"; |
| 8302 var arg_searchTerms = "foo"; | 8322 var arg_searchTerms = "foo"; |
| 8303 var arg_textFormat = "foo"; | 8323 var arg_textFormat = "foo"; |
| 8304 var arg_videoId = "foo"; | 8324 var arg_videoId = "foo"; |
| 8305 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 8325 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 8306 var path = (req.url).path; | 8326 var path = (req.url).path; |
| 8307 var pathOffset = 0; | 8327 var pathOffset = 0; |
| 8308 var index; | 8328 var index; |
| 8309 var subPart; | 8329 var subPart; |
| 8310 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 8330 unittest.expect( |
| 8331 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 8311 pathOffset += 1; | 8332 pathOffset += 1; |
| 8312 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("youtube/v3/")); | 8333 unittest.expect(path.substring(pathOffset, pathOffset + 11), |
| 8334 unittest.equals("youtube/v3/")); |
| 8313 pathOffset += 11; | 8335 pathOffset += 11; |
| 8314 unittest.expect(path.substring(pathOffset, pathOffset + 14), unittest.eq
uals("commentThreads")); | 8336 unittest.expect(path.substring(pathOffset, pathOffset + 14), |
| 8337 unittest.equals("commentThreads")); |
| 8315 pathOffset += 14; | 8338 pathOffset += 14; |
| 8316 | 8339 |
| 8317 var query = (req.url).query; | 8340 var query = (req.url).query; |
| 8318 var queryOffset = 0; | 8341 var queryOffset = 0; |
| 8319 var queryMap = {}; | 8342 var queryMap = {}; |
| 8320 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 8343 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 8321 parseBool(n) { | 8344 parseBool(n) { |
| 8322 if (n == "true") return true; | 8345 if (n == "true") return true; |
| 8323 if (n == "false") return false; | 8346 if (n == "false") return false; |
| 8324 if (n == null) return null; | 8347 if (n == null) return null; |
| 8325 throw new core.ArgumentError("Invalid boolean: $n"); | 8348 throw new core.ArgumentError("Invalid boolean: $n"); |
| 8326 } | 8349 } |
| 8350 |
| 8327 if (query.length > 0) { | 8351 if (query.length > 0) { |
| 8328 for (var part in query.split("&")) { | 8352 for (var part in query.split("&")) { |
| 8329 var keyvalue = part.split("="); | 8353 var keyvalue = part.split("="); |
| 8330 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 8354 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 8355 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 8331 } | 8356 } |
| 8332 } | 8357 } |
| 8333 unittest.expect(queryMap["part"].first, unittest.equals(arg_part)); | 8358 unittest.expect(queryMap["part"].first, unittest.equals(arg_part)); |
| 8334 unittest.expect(queryMap["allThreadsRelatedToChannelId"].first, unittest
.equals(arg_allThreadsRelatedToChannelId)); | 8359 unittest.expect(queryMap["allThreadsRelatedToChannelId"].first, |
| 8335 unittest.expect(queryMap["channelId"].first, unittest.equals(arg_channel
Id)); | 8360 unittest.equals(arg_allThreadsRelatedToChannelId)); |
| 8361 unittest.expect( |
| 8362 queryMap["channelId"].first, unittest.equals(arg_channelId)); |
| 8336 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); | 8363 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); |
| 8337 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | 8364 unittest.expect(core.int.parse(queryMap["maxResults"].first), |
| 8338 unittest.expect(queryMap["moderationStatus"].first, unittest.equals(arg_
moderationStatus)); | 8365 unittest.equals(arg_maxResults)); |
| 8366 unittest.expect(queryMap["moderationStatus"].first, |
| 8367 unittest.equals(arg_moderationStatus)); |
| 8339 unittest.expect(queryMap["order"].first, unittest.equals(arg_order)); | 8368 unittest.expect(queryMap["order"].first, unittest.equals(arg_order)); |
| 8340 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 8369 unittest.expect( |
| 8341 unittest.expect(queryMap["searchTerms"].first, unittest.equals(arg_searc
hTerms)); | 8370 queryMap["pageToken"].first, unittest.equals(arg_pageToken)); |
| 8342 unittest.expect(queryMap["textFormat"].first, unittest.equals(arg_textFo
rmat)); | 8371 unittest.expect( |
| 8343 unittest.expect(queryMap["videoId"].first, unittest.equals(arg_videoId))
; | 8372 queryMap["searchTerms"].first, unittest.equals(arg_searchTerms)); |
| 8344 | 8373 unittest.expect( |
| 8374 queryMap["textFormat"].first, unittest.equals(arg_textFormat)); |
| 8375 unittest.expect( |
| 8376 queryMap["videoId"].first, unittest.equals(arg_videoId)); |
| 8345 | 8377 |
| 8346 var h = { | 8378 var h = { |
| 8347 "content-type" : "application/json; charset=utf-8", | 8379 "content-type": "application/json; charset=utf-8", |
| 8348 }; | 8380 }; |
| 8349 var resp = convert.JSON.encode(buildCommentThreadListResponse()); | 8381 var resp = convert.JSON.encode(buildCommentThreadListResponse()); |
| 8350 return new async.Future.value(stringResponse(200, h, resp)); | 8382 return new async.Future.value(stringResponse(200, h, resp)); |
| 8351 }), true); | 8383 }), true); |
| 8352 res.list(arg_part, allThreadsRelatedToChannelId: arg_allThreadsRelatedToCh
annelId, channelId: arg_channelId, id: arg_id, maxResults: arg_maxResults, moder
ationStatus: arg_moderationStatus, order: arg_order, pageToken: arg_pageToken, s
earchTerms: arg_searchTerms, textFormat: arg_textFormat, videoId: arg_videoId).t
hen(unittest.expectAsync1(((api.CommentThreadListResponse response) { | 8384 res |
| 8385 .list(arg_part, |
| 8386 allThreadsRelatedToChannelId: arg_allThreadsRelatedToChannelId, |
| 8387 channelId: arg_channelId, |
| 8388 id: arg_id, |
| 8389 maxResults: arg_maxResults, |
| 8390 moderationStatus: arg_moderationStatus, |
| 8391 order: arg_order, |
| 8392 pageToken: arg_pageToken, |
| 8393 searchTerms: arg_searchTerms, |
| 8394 textFormat: arg_textFormat, |
| 8395 videoId: arg_videoId) |
| 8396 .then( |
| 8397 unittest.expectAsync1(((api.CommentThreadListResponse response) { |
| 8353 checkCommentThreadListResponse(response); | 8398 checkCommentThreadListResponse(response); |
| 8354 }))); | 8399 }))); |
| 8355 }); | 8400 }); |
| 8356 | 8401 |
| 8357 unittest.test("method--update", () { | 8402 unittest.test("method--update", () { |
| 8358 | |
| 8359 var mock = new HttpServerMock(); | 8403 var mock = new HttpServerMock(); |
| 8360 api.CommentThreadsResourceApi res = new api.YoutubeApi(mock).commentThread
s; | 8404 api.CommentThreadsResourceApi res = |
| 8405 new api.YoutubeApi(mock).commentThreads; |
| 8361 var arg_request = buildCommentThread(); | 8406 var arg_request = buildCommentThread(); |
| 8362 var arg_part = "foo"; | 8407 var arg_part = "foo"; |
| 8363 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 8408 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 8364 var obj = new api.CommentThread.fromJson(json); | 8409 var obj = new api.CommentThread.fromJson(json); |
| 8365 checkCommentThread(obj); | 8410 checkCommentThread(obj); |
| 8366 | 8411 |
| 8367 var path = (req.url).path; | 8412 var path = (req.url).path; |
| 8368 var pathOffset = 0; | 8413 var pathOffset = 0; |
| 8369 var index; | 8414 var index; |
| 8370 var subPart; | 8415 var subPart; |
| 8371 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 8416 unittest.expect( |
| 8417 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 8372 pathOffset += 1; | 8418 pathOffset += 1; |
| 8373 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("youtube/v3/")); | 8419 unittest.expect(path.substring(pathOffset, pathOffset + 11), |
| 8420 unittest.equals("youtube/v3/")); |
| 8374 pathOffset += 11; | 8421 pathOffset += 11; |
| 8375 unittest.expect(path.substring(pathOffset, pathOffset + 14), unittest.eq
uals("commentThreads")); | 8422 unittest.expect(path.substring(pathOffset, pathOffset + 14), |
| 8423 unittest.equals("commentThreads")); |
| 8376 pathOffset += 14; | 8424 pathOffset += 14; |
| 8377 | 8425 |
| 8378 var query = (req.url).query; | 8426 var query = (req.url).query; |
| 8379 var queryOffset = 0; | 8427 var queryOffset = 0; |
| 8380 var queryMap = {}; | 8428 var queryMap = {}; |
| 8381 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 8429 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 8382 parseBool(n) { | 8430 parseBool(n) { |
| 8383 if (n == "true") return true; | 8431 if (n == "true") return true; |
| 8384 if (n == "false") return false; | 8432 if (n == "false") return false; |
| 8385 if (n == null) return null; | 8433 if (n == null) return null; |
| 8386 throw new core.ArgumentError("Invalid boolean: $n"); | 8434 throw new core.ArgumentError("Invalid boolean: $n"); |
| 8387 } | 8435 } |
| 8436 |
| 8388 if (query.length > 0) { | 8437 if (query.length > 0) { |
| 8389 for (var part in query.split("&")) { | 8438 for (var part in query.split("&")) { |
| 8390 var keyvalue = part.split("="); | 8439 var keyvalue = part.split("="); |
| 8391 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 8440 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 8441 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 8392 } | 8442 } |
| 8393 } | 8443 } |
| 8394 unittest.expect(queryMap["part"].first, unittest.equals(arg_part)); | 8444 unittest.expect(queryMap["part"].first, unittest.equals(arg_part)); |
| 8395 | 8445 |
| 8396 | |
| 8397 var h = { | 8446 var h = { |
| 8398 "content-type" : "application/json; charset=utf-8", | 8447 "content-type": "application/json; charset=utf-8", |
| 8399 }; | 8448 }; |
| 8400 var resp = convert.JSON.encode(buildCommentThread()); | 8449 var resp = convert.JSON.encode(buildCommentThread()); |
| 8401 return new async.Future.value(stringResponse(200, h, resp)); | 8450 return new async.Future.value(stringResponse(200, h, resp)); |
| 8402 }), true); | 8451 }), true); |
| 8403 res.update(arg_request, arg_part).then(unittest.expectAsync1(((api.Comment
Thread response) { | 8452 res |
| 8453 .update(arg_request, arg_part) |
| 8454 .then(unittest.expectAsync1(((api.CommentThread response) { |
| 8404 checkCommentThread(response); | 8455 checkCommentThread(response); |
| 8405 }))); | 8456 }))); |
| 8406 }); | 8457 }); |
| 8407 | |
| 8408 }); | 8458 }); |
| 8409 | 8459 |
| 8410 | |
| 8411 unittest.group("resource-CommentsResourceApi", () { | 8460 unittest.group("resource-CommentsResourceApi", () { |
| 8412 unittest.test("method--delete", () { | 8461 unittest.test("method--delete", () { |
| 8413 | |
| 8414 var mock = new HttpServerMock(); | 8462 var mock = new HttpServerMock(); |
| 8415 api.CommentsResourceApi res = new api.YoutubeApi(mock).comments; | 8463 api.CommentsResourceApi res = new api.YoutubeApi(mock).comments; |
| 8416 var arg_id = "foo"; | 8464 var arg_id = "foo"; |
| 8417 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 8465 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 8418 var path = (req.url).path; | 8466 var path = (req.url).path; |
| 8419 var pathOffset = 0; | 8467 var pathOffset = 0; |
| 8420 var index; | 8468 var index; |
| 8421 var subPart; | 8469 var subPart; |
| 8422 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 8470 unittest.expect( |
| 8471 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 8423 pathOffset += 1; | 8472 pathOffset += 1; |
| 8424 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("youtube/v3/")); | 8473 unittest.expect(path.substring(pathOffset, pathOffset + 11), |
| 8474 unittest.equals("youtube/v3/")); |
| 8425 pathOffset += 11; | 8475 pathOffset += 11; |
| 8426 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("comments")); | 8476 unittest.expect(path.substring(pathOffset, pathOffset + 8), |
| 8477 unittest.equals("comments")); |
| 8427 pathOffset += 8; | 8478 pathOffset += 8; |
| 8428 | 8479 |
| 8429 var query = (req.url).query; | 8480 var query = (req.url).query; |
| 8430 var queryOffset = 0; | 8481 var queryOffset = 0; |
| 8431 var queryMap = {}; | 8482 var queryMap = {}; |
| 8432 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 8483 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 8433 parseBool(n) { | 8484 parseBool(n) { |
| 8434 if (n == "true") return true; | 8485 if (n == "true") return true; |
| 8435 if (n == "false") return false; | 8486 if (n == "false") return false; |
| 8436 if (n == null) return null; | 8487 if (n == null) return null; |
| 8437 throw new core.ArgumentError("Invalid boolean: $n"); | 8488 throw new core.ArgumentError("Invalid boolean: $n"); |
| 8438 } | 8489 } |
| 8490 |
| 8439 if (query.length > 0) { | 8491 if (query.length > 0) { |
| 8440 for (var part in query.split("&")) { | 8492 for (var part in query.split("&")) { |
| 8441 var keyvalue = part.split("="); | 8493 var keyvalue = part.split("="); |
| 8442 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 8494 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 8495 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 8443 } | 8496 } |
| 8444 } | 8497 } |
| 8445 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); | 8498 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); |
| 8446 | 8499 |
| 8447 | |
| 8448 var h = { | 8500 var h = { |
| 8449 "content-type" : "application/json; charset=utf-8", | 8501 "content-type": "application/json; charset=utf-8", |
| 8450 }; | 8502 }; |
| 8451 var resp = ""; | 8503 var resp = ""; |
| 8452 return new async.Future.value(stringResponse(200, h, resp)); | 8504 return new async.Future.value(stringResponse(200, h, resp)); |
| 8453 }), true); | 8505 }), true); |
| 8454 res.delete(arg_id).then(unittest.expectAsync1((_) {})); | 8506 res.delete(arg_id).then(unittest.expectAsync1((_) {})); |
| 8455 }); | 8507 }); |
| 8456 | 8508 |
| 8457 unittest.test("method--insert", () { | 8509 unittest.test("method--insert", () { |
| 8458 | |
| 8459 var mock = new HttpServerMock(); | 8510 var mock = new HttpServerMock(); |
| 8460 api.CommentsResourceApi res = new api.YoutubeApi(mock).comments; | 8511 api.CommentsResourceApi res = new api.YoutubeApi(mock).comments; |
| 8461 var arg_request = buildComment(); | 8512 var arg_request = buildComment(); |
| 8462 var arg_part = "foo"; | 8513 var arg_part = "foo"; |
| 8463 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 8514 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 8464 var obj = new api.Comment.fromJson(json); | 8515 var obj = new api.Comment.fromJson(json); |
| 8465 checkComment(obj); | 8516 checkComment(obj); |
| 8466 | 8517 |
| 8467 var path = (req.url).path; | 8518 var path = (req.url).path; |
| 8468 var pathOffset = 0; | 8519 var pathOffset = 0; |
| 8469 var index; | 8520 var index; |
| 8470 var subPart; | 8521 var subPart; |
| 8471 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 8522 unittest.expect( |
| 8523 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 8472 pathOffset += 1; | 8524 pathOffset += 1; |
| 8473 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("youtube/v3/")); | 8525 unittest.expect(path.substring(pathOffset, pathOffset + 11), |
| 8526 unittest.equals("youtube/v3/")); |
| 8474 pathOffset += 11; | 8527 pathOffset += 11; |
| 8475 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("comments")); | 8528 unittest.expect(path.substring(pathOffset, pathOffset + 8), |
| 8529 unittest.equals("comments")); |
| 8476 pathOffset += 8; | 8530 pathOffset += 8; |
| 8477 | 8531 |
| 8478 var query = (req.url).query; | 8532 var query = (req.url).query; |
| 8479 var queryOffset = 0; | 8533 var queryOffset = 0; |
| 8480 var queryMap = {}; | 8534 var queryMap = {}; |
| 8481 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 8535 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 8482 parseBool(n) { | 8536 parseBool(n) { |
| 8483 if (n == "true") return true; | 8537 if (n == "true") return true; |
| 8484 if (n == "false") return false; | 8538 if (n == "false") return false; |
| 8485 if (n == null) return null; | 8539 if (n == null) return null; |
| 8486 throw new core.ArgumentError("Invalid boolean: $n"); | 8540 throw new core.ArgumentError("Invalid boolean: $n"); |
| 8487 } | 8541 } |
| 8542 |
| 8488 if (query.length > 0) { | 8543 if (query.length > 0) { |
| 8489 for (var part in query.split("&")) { | 8544 for (var part in query.split("&")) { |
| 8490 var keyvalue = part.split("="); | 8545 var keyvalue = part.split("="); |
| 8491 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 8546 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 8547 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 8492 } | 8548 } |
| 8493 } | 8549 } |
| 8494 unittest.expect(queryMap["part"].first, unittest.equals(arg_part)); | 8550 unittest.expect(queryMap["part"].first, unittest.equals(arg_part)); |
| 8495 | 8551 |
| 8496 | |
| 8497 var h = { | 8552 var h = { |
| 8498 "content-type" : "application/json; charset=utf-8", | 8553 "content-type": "application/json; charset=utf-8", |
| 8499 }; | 8554 }; |
| 8500 var resp = convert.JSON.encode(buildComment()); | 8555 var resp = convert.JSON.encode(buildComment()); |
| 8501 return new async.Future.value(stringResponse(200, h, resp)); | 8556 return new async.Future.value(stringResponse(200, h, resp)); |
| 8502 }), true); | 8557 }), true); |
| 8503 res.insert(arg_request, arg_part).then(unittest.expectAsync1(((api.Comment
response) { | 8558 res |
| 8559 .insert(arg_request, arg_part) |
| 8560 .then(unittest.expectAsync1(((api.Comment response) { |
| 8504 checkComment(response); | 8561 checkComment(response); |
| 8505 }))); | 8562 }))); |
| 8506 }); | 8563 }); |
| 8507 | 8564 |
| 8508 unittest.test("method--list", () { | 8565 unittest.test("method--list", () { |
| 8509 | |
| 8510 var mock = new HttpServerMock(); | 8566 var mock = new HttpServerMock(); |
| 8511 api.CommentsResourceApi res = new api.YoutubeApi(mock).comments; | 8567 api.CommentsResourceApi res = new api.YoutubeApi(mock).comments; |
| 8512 var arg_part = "foo"; | 8568 var arg_part = "foo"; |
| 8513 var arg_id = "foo"; | 8569 var arg_id = "foo"; |
| 8514 var arg_maxResults = 42; | 8570 var arg_maxResults = 42; |
| 8515 var arg_pageToken = "foo"; | 8571 var arg_pageToken = "foo"; |
| 8516 var arg_parentId = "foo"; | 8572 var arg_parentId = "foo"; |
| 8517 var arg_textFormat = "foo"; | 8573 var arg_textFormat = "foo"; |
| 8518 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 8574 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 8519 var path = (req.url).path; | 8575 var path = (req.url).path; |
| 8520 var pathOffset = 0; | 8576 var pathOffset = 0; |
| 8521 var index; | 8577 var index; |
| 8522 var subPart; | 8578 var subPart; |
| 8523 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 8579 unittest.expect( |
| 8580 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 8524 pathOffset += 1; | 8581 pathOffset += 1; |
| 8525 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("youtube/v3/")); | 8582 unittest.expect(path.substring(pathOffset, pathOffset + 11), |
| 8583 unittest.equals("youtube/v3/")); |
| 8526 pathOffset += 11; | 8584 pathOffset += 11; |
| 8527 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("comments")); | 8585 unittest.expect(path.substring(pathOffset, pathOffset + 8), |
| 8586 unittest.equals("comments")); |
| 8528 pathOffset += 8; | 8587 pathOffset += 8; |
| 8529 | 8588 |
| 8530 var query = (req.url).query; | 8589 var query = (req.url).query; |
| 8531 var queryOffset = 0; | 8590 var queryOffset = 0; |
| 8532 var queryMap = {}; | 8591 var queryMap = {}; |
| 8533 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 8592 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 8534 parseBool(n) { | 8593 parseBool(n) { |
| 8535 if (n == "true") return true; | 8594 if (n == "true") return true; |
| 8536 if (n == "false") return false; | 8595 if (n == "false") return false; |
| 8537 if (n == null) return null; | 8596 if (n == null) return null; |
| 8538 throw new core.ArgumentError("Invalid boolean: $n"); | 8597 throw new core.ArgumentError("Invalid boolean: $n"); |
| 8539 } | 8598 } |
| 8599 |
| 8540 if (query.length > 0) { | 8600 if (query.length > 0) { |
| 8541 for (var part in query.split("&")) { | 8601 for (var part in query.split("&")) { |
| 8542 var keyvalue = part.split("="); | 8602 var keyvalue = part.split("="); |
| 8543 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 8603 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 8604 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 8544 } | 8605 } |
| 8545 } | 8606 } |
| 8546 unittest.expect(queryMap["part"].first, unittest.equals(arg_part)); | 8607 unittest.expect(queryMap["part"].first, unittest.equals(arg_part)); |
| 8547 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); | 8608 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); |
| 8548 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | 8609 unittest.expect(core.int.parse(queryMap["maxResults"].first), |
| 8549 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 8610 unittest.equals(arg_maxResults)); |
| 8550 unittest.expect(queryMap["parentId"].first, unittest.equals(arg_parentId
)); | 8611 unittest.expect( |
| 8551 unittest.expect(queryMap["textFormat"].first, unittest.equals(arg_textFo
rmat)); | 8612 queryMap["pageToken"].first, unittest.equals(arg_pageToken)); |
| 8552 | 8613 unittest.expect( |
| 8614 queryMap["parentId"].first, unittest.equals(arg_parentId)); |
| 8615 unittest.expect( |
| 8616 queryMap["textFormat"].first, unittest.equals(arg_textFormat)); |
| 8553 | 8617 |
| 8554 var h = { | 8618 var h = { |
| 8555 "content-type" : "application/json; charset=utf-8", | 8619 "content-type": "application/json; charset=utf-8", |
| 8556 }; | 8620 }; |
| 8557 var resp = convert.JSON.encode(buildCommentListResponse()); | 8621 var resp = convert.JSON.encode(buildCommentListResponse()); |
| 8558 return new async.Future.value(stringResponse(200, h, resp)); | 8622 return new async.Future.value(stringResponse(200, h, resp)); |
| 8559 }), true); | 8623 }), true); |
| 8560 res.list(arg_part, id: arg_id, maxResults: arg_maxResults, pageToken: arg_
pageToken, parentId: arg_parentId, textFormat: arg_textFormat).then(unittest.exp
ectAsync1(((api.CommentListResponse response) { | 8624 res |
| 8625 .list(arg_part, |
| 8626 id: arg_id, |
| 8627 maxResults: arg_maxResults, |
| 8628 pageToken: arg_pageToken, |
| 8629 parentId: arg_parentId, |
| 8630 textFormat: arg_textFormat) |
| 8631 .then(unittest.expectAsync1(((api.CommentListResponse response) { |
| 8561 checkCommentListResponse(response); | 8632 checkCommentListResponse(response); |
| 8562 }))); | 8633 }))); |
| 8563 }); | 8634 }); |
| 8564 | 8635 |
| 8565 unittest.test("method--markAsSpam", () { | 8636 unittest.test("method--markAsSpam", () { |
| 8566 | |
| 8567 var mock = new HttpServerMock(); | 8637 var mock = new HttpServerMock(); |
| 8568 api.CommentsResourceApi res = new api.YoutubeApi(mock).comments; | 8638 api.CommentsResourceApi res = new api.YoutubeApi(mock).comments; |
| 8569 var arg_id = "foo"; | 8639 var arg_id = "foo"; |
| 8570 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 8640 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 8571 var path = (req.url).path; | 8641 var path = (req.url).path; |
| 8572 var pathOffset = 0; | 8642 var pathOffset = 0; |
| 8573 var index; | 8643 var index; |
| 8574 var subPart; | 8644 var subPart; |
| 8575 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 8645 unittest.expect( |
| 8646 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 8576 pathOffset += 1; | 8647 pathOffset += 1; |
| 8577 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("youtube/v3/")); | 8648 unittest.expect(path.substring(pathOffset, pathOffset + 11), |
| 8649 unittest.equals("youtube/v3/")); |
| 8578 pathOffset += 11; | 8650 pathOffset += 11; |
| 8579 unittest.expect(path.substring(pathOffset, pathOffset + 19), unittest.eq
uals("comments/markAsSpam")); | 8651 unittest.expect(path.substring(pathOffset, pathOffset + 19), |
| 8652 unittest.equals("comments/markAsSpam")); |
| 8580 pathOffset += 19; | 8653 pathOffset += 19; |
| 8581 | 8654 |
| 8582 var query = (req.url).query; | 8655 var query = (req.url).query; |
| 8583 var queryOffset = 0; | 8656 var queryOffset = 0; |
| 8584 var queryMap = {}; | 8657 var queryMap = {}; |
| 8585 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 8658 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 8586 parseBool(n) { | 8659 parseBool(n) { |
| 8587 if (n == "true") return true; | 8660 if (n == "true") return true; |
| 8588 if (n == "false") return false; | 8661 if (n == "false") return false; |
| 8589 if (n == null) return null; | 8662 if (n == null) return null; |
| 8590 throw new core.ArgumentError("Invalid boolean: $n"); | 8663 throw new core.ArgumentError("Invalid boolean: $n"); |
| 8591 } | 8664 } |
| 8665 |
| 8592 if (query.length > 0) { | 8666 if (query.length > 0) { |
| 8593 for (var part in query.split("&")) { | 8667 for (var part in query.split("&")) { |
| 8594 var keyvalue = part.split("="); | 8668 var keyvalue = part.split("="); |
| 8595 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 8669 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 8670 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 8596 } | 8671 } |
| 8597 } | 8672 } |
| 8598 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); | 8673 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); |
| 8599 | 8674 |
| 8600 | |
| 8601 var h = { | 8675 var h = { |
| 8602 "content-type" : "application/json; charset=utf-8", | 8676 "content-type": "application/json; charset=utf-8", |
| 8603 }; | 8677 }; |
| 8604 var resp = ""; | 8678 var resp = ""; |
| 8605 return new async.Future.value(stringResponse(200, h, resp)); | 8679 return new async.Future.value(stringResponse(200, h, resp)); |
| 8606 }), true); | 8680 }), true); |
| 8607 res.markAsSpam(arg_id).then(unittest.expectAsync1((_) {})); | 8681 res.markAsSpam(arg_id).then(unittest.expectAsync1((_) {})); |
| 8608 }); | 8682 }); |
| 8609 | 8683 |
| 8610 unittest.test("method--setModerationStatus", () { | 8684 unittest.test("method--setModerationStatus", () { |
| 8611 | |
| 8612 var mock = new HttpServerMock(); | 8685 var mock = new HttpServerMock(); |
| 8613 api.CommentsResourceApi res = new api.YoutubeApi(mock).comments; | 8686 api.CommentsResourceApi res = new api.YoutubeApi(mock).comments; |
| 8614 var arg_id = "foo"; | 8687 var arg_id = "foo"; |
| 8615 var arg_moderationStatus = "foo"; | 8688 var arg_moderationStatus = "foo"; |
| 8616 var arg_banAuthor = true; | 8689 var arg_banAuthor = true; |
| 8617 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 8690 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 8618 var path = (req.url).path; | 8691 var path = (req.url).path; |
| 8619 var pathOffset = 0; | 8692 var pathOffset = 0; |
| 8620 var index; | 8693 var index; |
| 8621 var subPart; | 8694 var subPart; |
| 8622 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 8695 unittest.expect( |
| 8696 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 8623 pathOffset += 1; | 8697 pathOffset += 1; |
| 8624 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("youtube/v3/")); | 8698 unittest.expect(path.substring(pathOffset, pathOffset + 11), |
| 8699 unittest.equals("youtube/v3/")); |
| 8625 pathOffset += 11; | 8700 pathOffset += 11; |
| 8626 unittest.expect(path.substring(pathOffset, pathOffset + 28), unittest.eq
uals("comments/setModerationStatus")); | 8701 unittest.expect(path.substring(pathOffset, pathOffset + 28), |
| 8702 unittest.equals("comments/setModerationStatus")); |
| 8627 pathOffset += 28; | 8703 pathOffset += 28; |
| 8628 | 8704 |
| 8629 var query = (req.url).query; | 8705 var query = (req.url).query; |
| 8630 var queryOffset = 0; | 8706 var queryOffset = 0; |
| 8631 var queryMap = {}; | 8707 var queryMap = {}; |
| 8632 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 8708 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 8633 parseBool(n) { | 8709 parseBool(n) { |
| 8634 if (n == "true") return true; | 8710 if (n == "true") return true; |
| 8635 if (n == "false") return false; | 8711 if (n == "false") return false; |
| 8636 if (n == null) return null; | 8712 if (n == null) return null; |
| 8637 throw new core.ArgumentError("Invalid boolean: $n"); | 8713 throw new core.ArgumentError("Invalid boolean: $n"); |
| 8638 } | 8714 } |
| 8715 |
| 8639 if (query.length > 0) { | 8716 if (query.length > 0) { |
| 8640 for (var part in query.split("&")) { | 8717 for (var part in query.split("&")) { |
| 8641 var keyvalue = part.split("="); | 8718 var keyvalue = part.split("="); |
| 8642 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 8719 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 8720 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 8643 } | 8721 } |
| 8644 } | 8722 } |
| 8645 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); | 8723 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); |
| 8646 unittest.expect(queryMap["moderationStatus"].first, unittest.equals(arg_
moderationStatus)); | 8724 unittest.expect(queryMap["moderationStatus"].first, |
| 8647 unittest.expect(queryMap["banAuthor"].first, unittest.equals("$arg_banAu
thor")); | 8725 unittest.equals(arg_moderationStatus)); |
| 8648 | 8726 unittest.expect( |
| 8727 queryMap["banAuthor"].first, unittest.equals("$arg_banAuthor")); |
| 8649 | 8728 |
| 8650 var h = { | 8729 var h = { |
| 8651 "content-type" : "application/json; charset=utf-8", | 8730 "content-type": "application/json; charset=utf-8", |
| 8652 }; | 8731 }; |
| 8653 var resp = ""; | 8732 var resp = ""; |
| 8654 return new async.Future.value(stringResponse(200, h, resp)); | 8733 return new async.Future.value(stringResponse(200, h, resp)); |
| 8655 }), true); | 8734 }), true); |
| 8656 res.setModerationStatus(arg_id, arg_moderationStatus, banAuthor: arg_banAu
thor).then(unittest.expectAsync1((_) {})); | 8735 res |
| 8736 .setModerationStatus(arg_id, arg_moderationStatus, |
| 8737 banAuthor: arg_banAuthor) |
| 8738 .then(unittest.expectAsync1((_) {})); |
| 8657 }); | 8739 }); |
| 8658 | 8740 |
| 8659 unittest.test("method--update", () { | 8741 unittest.test("method--update", () { |
| 8660 | |
| 8661 var mock = new HttpServerMock(); | 8742 var mock = new HttpServerMock(); |
| 8662 api.CommentsResourceApi res = new api.YoutubeApi(mock).comments; | 8743 api.CommentsResourceApi res = new api.YoutubeApi(mock).comments; |
| 8663 var arg_request = buildComment(); | 8744 var arg_request = buildComment(); |
| 8664 var arg_part = "foo"; | 8745 var arg_part = "foo"; |
| 8665 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 8746 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 8666 var obj = new api.Comment.fromJson(json); | 8747 var obj = new api.Comment.fromJson(json); |
| 8667 checkComment(obj); | 8748 checkComment(obj); |
| 8668 | 8749 |
| 8669 var path = (req.url).path; | 8750 var path = (req.url).path; |
| 8670 var pathOffset = 0; | 8751 var pathOffset = 0; |
| 8671 var index; | 8752 var index; |
| 8672 var subPart; | 8753 var subPart; |
| 8673 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 8754 unittest.expect( |
| 8755 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 8674 pathOffset += 1; | 8756 pathOffset += 1; |
| 8675 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("youtube/v3/")); | 8757 unittest.expect(path.substring(pathOffset, pathOffset + 11), |
| 8758 unittest.equals("youtube/v3/")); |
| 8676 pathOffset += 11; | 8759 pathOffset += 11; |
| 8677 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("comments")); | 8760 unittest.expect(path.substring(pathOffset, pathOffset + 8), |
| 8761 unittest.equals("comments")); |
| 8678 pathOffset += 8; | 8762 pathOffset += 8; |
| 8679 | 8763 |
| 8680 var query = (req.url).query; | 8764 var query = (req.url).query; |
| 8681 var queryOffset = 0; | 8765 var queryOffset = 0; |
| 8682 var queryMap = {}; | 8766 var queryMap = {}; |
| 8683 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 8767 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 8684 parseBool(n) { | 8768 parseBool(n) { |
| 8685 if (n == "true") return true; | 8769 if (n == "true") return true; |
| 8686 if (n == "false") return false; | 8770 if (n == "false") return false; |
| 8687 if (n == null) return null; | 8771 if (n == null) return null; |
| 8688 throw new core.ArgumentError("Invalid boolean: $n"); | 8772 throw new core.ArgumentError("Invalid boolean: $n"); |
| 8689 } | 8773 } |
| 8774 |
| 8690 if (query.length > 0) { | 8775 if (query.length > 0) { |
| 8691 for (var part in query.split("&")) { | 8776 for (var part in query.split("&")) { |
| 8692 var keyvalue = part.split("="); | 8777 var keyvalue = part.split("="); |
| 8693 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 8778 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 8779 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 8694 } | 8780 } |
| 8695 } | 8781 } |
| 8696 unittest.expect(queryMap["part"].first, unittest.equals(arg_part)); | 8782 unittest.expect(queryMap["part"].first, unittest.equals(arg_part)); |
| 8697 | 8783 |
| 8698 | |
| 8699 var h = { | 8784 var h = { |
| 8700 "content-type" : "application/json; charset=utf-8", | 8785 "content-type": "application/json; charset=utf-8", |
| 8701 }; | 8786 }; |
| 8702 var resp = convert.JSON.encode(buildComment()); | 8787 var resp = convert.JSON.encode(buildComment()); |
| 8703 return new async.Future.value(stringResponse(200, h, resp)); | 8788 return new async.Future.value(stringResponse(200, h, resp)); |
| 8704 }), true); | 8789 }), true); |
| 8705 res.update(arg_request, arg_part).then(unittest.expectAsync1(((api.Comment
response) { | 8790 res |
| 8791 .update(arg_request, arg_part) |
| 8792 .then(unittest.expectAsync1(((api.Comment response) { |
| 8706 checkComment(response); | 8793 checkComment(response); |
| 8707 }))); | 8794 }))); |
| 8708 }); | 8795 }); |
| 8709 | |
| 8710 }); | 8796 }); |
| 8711 | 8797 |
| 8712 | |
| 8713 unittest.group("resource-FanFundingEventsResourceApi", () { | 8798 unittest.group("resource-FanFundingEventsResourceApi", () { |
| 8714 unittest.test("method--list", () { | 8799 unittest.test("method--list", () { |
| 8715 | |
| 8716 var mock = new HttpServerMock(); | 8800 var mock = new HttpServerMock(); |
| 8717 api.FanFundingEventsResourceApi res = new api.YoutubeApi(mock).fanFundingE
vents; | 8801 api.FanFundingEventsResourceApi res = |
| 8802 new api.YoutubeApi(mock).fanFundingEvents; |
| 8718 var arg_part = "foo"; | 8803 var arg_part = "foo"; |
| 8719 var arg_hl = "foo"; | 8804 var arg_hl = "foo"; |
| 8720 var arg_maxResults = 42; | 8805 var arg_maxResults = 42; |
| 8721 var arg_pageToken = "foo"; | 8806 var arg_pageToken = "foo"; |
| 8722 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 8807 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 8723 var path = (req.url).path; | 8808 var path = (req.url).path; |
| 8724 var pathOffset = 0; | 8809 var pathOffset = 0; |
| 8725 var index; | 8810 var index; |
| 8726 var subPart; | 8811 var subPart; |
| 8727 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 8812 unittest.expect( |
| 8813 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 8728 pathOffset += 1; | 8814 pathOffset += 1; |
| 8729 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("youtube/v3/")); | 8815 unittest.expect(path.substring(pathOffset, pathOffset + 11), |
| 8816 unittest.equals("youtube/v3/")); |
| 8730 pathOffset += 11; | 8817 pathOffset += 11; |
| 8731 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq
uals("fanFundingEvents")); | 8818 unittest.expect(path.substring(pathOffset, pathOffset + 16), |
| 8819 unittest.equals("fanFundingEvents")); |
| 8732 pathOffset += 16; | 8820 pathOffset += 16; |
| 8733 | 8821 |
| 8734 var query = (req.url).query; | 8822 var query = (req.url).query; |
| 8735 var queryOffset = 0; | 8823 var queryOffset = 0; |
| 8736 var queryMap = {}; | 8824 var queryMap = {}; |
| 8737 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 8825 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 8738 parseBool(n) { | 8826 parseBool(n) { |
| 8739 if (n == "true") return true; | 8827 if (n == "true") return true; |
| 8740 if (n == "false") return false; | 8828 if (n == "false") return false; |
| 8741 if (n == null) return null; | 8829 if (n == null) return null; |
| 8742 throw new core.ArgumentError("Invalid boolean: $n"); | 8830 throw new core.ArgumentError("Invalid boolean: $n"); |
| 8743 } | 8831 } |
| 8832 |
| 8744 if (query.length > 0) { | 8833 if (query.length > 0) { |
| 8745 for (var part in query.split("&")) { | 8834 for (var part in query.split("&")) { |
| 8746 var keyvalue = part.split("="); | 8835 var keyvalue = part.split("="); |
| 8747 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 8836 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 8837 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 8748 } | 8838 } |
| 8749 } | 8839 } |
| 8750 unittest.expect(queryMap["part"].first, unittest.equals(arg_part)); | 8840 unittest.expect(queryMap["part"].first, unittest.equals(arg_part)); |
| 8751 unittest.expect(queryMap["hl"].first, unittest.equals(arg_hl)); | 8841 unittest.expect(queryMap["hl"].first, unittest.equals(arg_hl)); |
| 8752 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | 8842 unittest.expect(core.int.parse(queryMap["maxResults"].first), |
| 8753 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 8843 unittest.equals(arg_maxResults)); |
| 8754 | 8844 unittest.expect( |
| 8845 queryMap["pageToken"].first, unittest.equals(arg_pageToken)); |
| 8755 | 8846 |
| 8756 var h = { | 8847 var h = { |
| 8757 "content-type" : "application/json; charset=utf-8", | 8848 "content-type": "application/json; charset=utf-8", |
| 8758 }; | 8849 }; |
| 8759 var resp = convert.JSON.encode(buildFanFundingEventListResponse()); | 8850 var resp = convert.JSON.encode(buildFanFundingEventListResponse()); |
| 8760 return new async.Future.value(stringResponse(200, h, resp)); | 8851 return new async.Future.value(stringResponse(200, h, resp)); |
| 8761 }), true); | 8852 }), true); |
| 8762 res.list(arg_part, hl: arg_hl, maxResults: arg_maxResults, pageToken: arg_
pageToken).then(unittest.expectAsync1(((api.FanFundingEventListResponse response
) { | 8853 res |
| 8854 .list(arg_part, |
| 8855 hl: arg_hl, maxResults: arg_maxResults, pageToken: arg_pageToken) |
| 8856 .then(unittest |
| 8857 .expectAsync1(((api.FanFundingEventListResponse response) { |
| 8763 checkFanFundingEventListResponse(response); | 8858 checkFanFundingEventListResponse(response); |
| 8764 }))); | 8859 }))); |
| 8765 }); | 8860 }); |
| 8766 | |
| 8767 }); | 8861 }); |
| 8768 | 8862 |
| 8769 | |
| 8770 unittest.group("resource-GuideCategoriesResourceApi", () { | 8863 unittest.group("resource-GuideCategoriesResourceApi", () { |
| 8771 unittest.test("method--list", () { | 8864 unittest.test("method--list", () { |
| 8772 | |
| 8773 var mock = new HttpServerMock(); | 8865 var mock = new HttpServerMock(); |
| 8774 api.GuideCategoriesResourceApi res = new api.YoutubeApi(mock).guideCategor
ies; | 8866 api.GuideCategoriesResourceApi res = |
| 8867 new api.YoutubeApi(mock).guideCategories; |
| 8775 var arg_part = "foo"; | 8868 var arg_part = "foo"; |
| 8776 var arg_hl = "foo"; | 8869 var arg_hl = "foo"; |
| 8777 var arg_id = "foo"; | 8870 var arg_id = "foo"; |
| 8778 var arg_regionCode = "foo"; | 8871 var arg_regionCode = "foo"; |
| 8779 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 8872 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 8780 var path = (req.url).path; | 8873 var path = (req.url).path; |
| 8781 var pathOffset = 0; | 8874 var pathOffset = 0; |
| 8782 var index; | 8875 var index; |
| 8783 var subPart; | 8876 var subPart; |
| 8784 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 8877 unittest.expect( |
| 8878 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 8785 pathOffset += 1; | 8879 pathOffset += 1; |
| 8786 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("youtube/v3/")); | 8880 unittest.expect(path.substring(pathOffset, pathOffset + 11), |
| 8881 unittest.equals("youtube/v3/")); |
| 8787 pathOffset += 11; | 8882 pathOffset += 11; |
| 8788 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("guideCategories")); | 8883 unittest.expect(path.substring(pathOffset, pathOffset + 15), |
| 8884 unittest.equals("guideCategories")); |
| 8789 pathOffset += 15; | 8885 pathOffset += 15; |
| 8790 | 8886 |
| 8791 var query = (req.url).query; | 8887 var query = (req.url).query; |
| 8792 var queryOffset = 0; | 8888 var queryOffset = 0; |
| 8793 var queryMap = {}; | 8889 var queryMap = {}; |
| 8794 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 8890 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 8795 parseBool(n) { | 8891 parseBool(n) { |
| 8796 if (n == "true") return true; | 8892 if (n == "true") return true; |
| 8797 if (n == "false") return false; | 8893 if (n == "false") return false; |
| 8798 if (n == null) return null; | 8894 if (n == null) return null; |
| 8799 throw new core.ArgumentError("Invalid boolean: $n"); | 8895 throw new core.ArgumentError("Invalid boolean: $n"); |
| 8800 } | 8896 } |
| 8897 |
| 8801 if (query.length > 0) { | 8898 if (query.length > 0) { |
| 8802 for (var part in query.split("&")) { | 8899 for (var part in query.split("&")) { |
| 8803 var keyvalue = part.split("="); | 8900 var keyvalue = part.split("="); |
| 8804 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 8901 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 8902 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 8805 } | 8903 } |
| 8806 } | 8904 } |
| 8807 unittest.expect(queryMap["part"].first, unittest.equals(arg_part)); | 8905 unittest.expect(queryMap["part"].first, unittest.equals(arg_part)); |
| 8808 unittest.expect(queryMap["hl"].first, unittest.equals(arg_hl)); | 8906 unittest.expect(queryMap["hl"].first, unittest.equals(arg_hl)); |
| 8809 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); | 8907 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); |
| 8810 unittest.expect(queryMap["regionCode"].first, unittest.equals(arg_region
Code)); | 8908 unittest.expect( |
| 8811 | 8909 queryMap["regionCode"].first, unittest.equals(arg_regionCode)); |
| 8812 | 8910 |
| 8813 var h = { | 8911 var h = { |
| 8814 "content-type" : "application/json; charset=utf-8", | 8912 "content-type": "application/json; charset=utf-8", |
| 8815 }; | 8913 }; |
| 8816 var resp = convert.JSON.encode(buildGuideCategoryListResponse()); | 8914 var resp = convert.JSON.encode(buildGuideCategoryListResponse()); |
| 8817 return new async.Future.value(stringResponse(200, h, resp)); | 8915 return new async.Future.value(stringResponse(200, h, resp)); |
| 8818 }), true); | 8916 }), true); |
| 8819 res.list(arg_part, hl: arg_hl, id: arg_id, regionCode: arg_regionCode).the
n(unittest.expectAsync1(((api.GuideCategoryListResponse response) { | 8917 res |
| 8918 .list(arg_part, hl: arg_hl, id: arg_id, regionCode: arg_regionCode) |
| 8919 .then( |
| 8920 unittest.expectAsync1(((api.GuideCategoryListResponse response) { |
| 8820 checkGuideCategoryListResponse(response); | 8921 checkGuideCategoryListResponse(response); |
| 8821 }))); | 8922 }))); |
| 8822 }); | 8923 }); |
| 8823 | |
| 8824 }); | 8924 }); |
| 8825 | 8925 |
| 8826 | |
| 8827 unittest.group("resource-I18nLanguagesResourceApi", () { | 8926 unittest.group("resource-I18nLanguagesResourceApi", () { |
| 8828 unittest.test("method--list", () { | 8927 unittest.test("method--list", () { |
| 8829 | |
| 8830 var mock = new HttpServerMock(); | 8928 var mock = new HttpServerMock(); |
| 8831 api.I18nLanguagesResourceApi res = new api.YoutubeApi(mock).i18nLanguages; | 8929 api.I18nLanguagesResourceApi res = new api.YoutubeApi(mock).i18nLanguages; |
| 8832 var arg_part = "foo"; | 8930 var arg_part = "foo"; |
| 8833 var arg_hl = "foo"; | 8931 var arg_hl = "foo"; |
| 8834 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 8932 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 8835 var path = (req.url).path; | 8933 var path = (req.url).path; |
| 8836 var pathOffset = 0; | 8934 var pathOffset = 0; |
| 8837 var index; | 8935 var index; |
| 8838 var subPart; | 8936 var subPart; |
| 8839 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 8937 unittest.expect( |
| 8938 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 8840 pathOffset += 1; | 8939 pathOffset += 1; |
| 8841 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("youtube/v3/")); | 8940 unittest.expect(path.substring(pathOffset, pathOffset + 11), |
| 8941 unittest.equals("youtube/v3/")); |
| 8842 pathOffset += 11; | 8942 pathOffset += 11; |
| 8843 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("i18nLanguages")); | 8943 unittest.expect(path.substring(pathOffset, pathOffset + 13), |
| 8944 unittest.equals("i18nLanguages")); |
| 8844 pathOffset += 13; | 8945 pathOffset += 13; |
| 8845 | 8946 |
| 8846 var query = (req.url).query; | 8947 var query = (req.url).query; |
| 8847 var queryOffset = 0; | 8948 var queryOffset = 0; |
| 8848 var queryMap = {}; | 8949 var queryMap = {}; |
| 8849 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 8950 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 8850 parseBool(n) { | 8951 parseBool(n) { |
| 8851 if (n == "true") return true; | 8952 if (n == "true") return true; |
| 8852 if (n == "false") return false; | 8953 if (n == "false") return false; |
| 8853 if (n == null) return null; | 8954 if (n == null) return null; |
| 8854 throw new core.ArgumentError("Invalid boolean: $n"); | 8955 throw new core.ArgumentError("Invalid boolean: $n"); |
| 8855 } | 8956 } |
| 8957 |
| 8856 if (query.length > 0) { | 8958 if (query.length > 0) { |
| 8857 for (var part in query.split("&")) { | 8959 for (var part in query.split("&")) { |
| 8858 var keyvalue = part.split("="); | 8960 var keyvalue = part.split("="); |
| 8859 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 8961 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 8962 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 8860 } | 8963 } |
| 8861 } | 8964 } |
| 8862 unittest.expect(queryMap["part"].first, unittest.equals(arg_part)); | 8965 unittest.expect(queryMap["part"].first, unittest.equals(arg_part)); |
| 8863 unittest.expect(queryMap["hl"].first, unittest.equals(arg_hl)); | 8966 unittest.expect(queryMap["hl"].first, unittest.equals(arg_hl)); |
| 8864 | 8967 |
| 8865 | |
| 8866 var h = { | 8968 var h = { |
| 8867 "content-type" : "application/json; charset=utf-8", | 8969 "content-type": "application/json; charset=utf-8", |
| 8868 }; | 8970 }; |
| 8869 var resp = convert.JSON.encode(buildI18nLanguageListResponse()); | 8971 var resp = convert.JSON.encode(buildI18nLanguageListResponse()); |
| 8870 return new async.Future.value(stringResponse(200, h, resp)); | 8972 return new async.Future.value(stringResponse(200, h, resp)); |
| 8871 }), true); | 8973 }), true); |
| 8872 res.list(arg_part, hl: arg_hl).then(unittest.expectAsync1(((api.I18nLangua
geListResponse response) { | 8974 res |
| 8975 .list(arg_part, hl: arg_hl) |
| 8976 .then(unittest.expectAsync1(((api.I18nLanguageListResponse response) { |
| 8873 checkI18nLanguageListResponse(response); | 8977 checkI18nLanguageListResponse(response); |
| 8874 }))); | 8978 }))); |
| 8875 }); | 8979 }); |
| 8876 | |
| 8877 }); | 8980 }); |
| 8878 | 8981 |
| 8879 | |
| 8880 unittest.group("resource-I18nRegionsResourceApi", () { | 8982 unittest.group("resource-I18nRegionsResourceApi", () { |
| 8881 unittest.test("method--list", () { | 8983 unittest.test("method--list", () { |
| 8882 | |
| 8883 var mock = new HttpServerMock(); | 8984 var mock = new HttpServerMock(); |
| 8884 api.I18nRegionsResourceApi res = new api.YoutubeApi(mock).i18nRegions; | 8985 api.I18nRegionsResourceApi res = new api.YoutubeApi(mock).i18nRegions; |
| 8885 var arg_part = "foo"; | 8986 var arg_part = "foo"; |
| 8886 var arg_hl = "foo"; | 8987 var arg_hl = "foo"; |
| 8887 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 8988 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 8888 var path = (req.url).path; | 8989 var path = (req.url).path; |
| 8889 var pathOffset = 0; | 8990 var pathOffset = 0; |
| 8890 var index; | 8991 var index; |
| 8891 var subPart; | 8992 var subPart; |
| 8892 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 8993 unittest.expect( |
| 8994 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 8893 pathOffset += 1; | 8995 pathOffset += 1; |
| 8894 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("youtube/v3/")); | 8996 unittest.expect(path.substring(pathOffset, pathOffset + 11), |
| 8997 unittest.equals("youtube/v3/")); |
| 8895 pathOffset += 11; | 8998 pathOffset += 11; |
| 8896 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("i18nRegions")); | 8999 unittest.expect(path.substring(pathOffset, pathOffset + 11), |
| 9000 unittest.equals("i18nRegions")); |
| 8897 pathOffset += 11; | 9001 pathOffset += 11; |
| 8898 | 9002 |
| 8899 var query = (req.url).query; | 9003 var query = (req.url).query; |
| 8900 var queryOffset = 0; | 9004 var queryOffset = 0; |
| 8901 var queryMap = {}; | 9005 var queryMap = {}; |
| 8902 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 9006 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 8903 parseBool(n) { | 9007 parseBool(n) { |
| 8904 if (n == "true") return true; | 9008 if (n == "true") return true; |
| 8905 if (n == "false") return false; | 9009 if (n == "false") return false; |
| 8906 if (n == null) return null; | 9010 if (n == null) return null; |
| 8907 throw new core.ArgumentError("Invalid boolean: $n"); | 9011 throw new core.ArgumentError("Invalid boolean: $n"); |
| 8908 } | 9012 } |
| 9013 |
| 8909 if (query.length > 0) { | 9014 if (query.length > 0) { |
| 8910 for (var part in query.split("&")) { | 9015 for (var part in query.split("&")) { |
| 8911 var keyvalue = part.split("="); | 9016 var keyvalue = part.split("="); |
| 8912 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 9017 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 9018 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 8913 } | 9019 } |
| 8914 } | 9020 } |
| 8915 unittest.expect(queryMap["part"].first, unittest.equals(arg_part)); | 9021 unittest.expect(queryMap["part"].first, unittest.equals(arg_part)); |
| 8916 unittest.expect(queryMap["hl"].first, unittest.equals(arg_hl)); | 9022 unittest.expect(queryMap["hl"].first, unittest.equals(arg_hl)); |
| 8917 | 9023 |
| 8918 | |
| 8919 var h = { | 9024 var h = { |
| 8920 "content-type" : "application/json; charset=utf-8", | 9025 "content-type": "application/json; charset=utf-8", |
| 8921 }; | 9026 }; |
| 8922 var resp = convert.JSON.encode(buildI18nRegionListResponse()); | 9027 var resp = convert.JSON.encode(buildI18nRegionListResponse()); |
| 8923 return new async.Future.value(stringResponse(200, h, resp)); | 9028 return new async.Future.value(stringResponse(200, h, resp)); |
| 8924 }), true); | 9029 }), true); |
| 8925 res.list(arg_part, hl: arg_hl).then(unittest.expectAsync1(((api.I18nRegion
ListResponse response) { | 9030 res |
| 9031 .list(arg_part, hl: arg_hl) |
| 9032 .then(unittest.expectAsync1(((api.I18nRegionListResponse response) { |
| 8926 checkI18nRegionListResponse(response); | 9033 checkI18nRegionListResponse(response); |
| 8927 }))); | 9034 }))); |
| 8928 }); | 9035 }); |
| 8929 | |
| 8930 }); | 9036 }); |
| 8931 | 9037 |
| 8932 | |
| 8933 unittest.group("resource-LiveBroadcastsResourceApi", () { | 9038 unittest.group("resource-LiveBroadcastsResourceApi", () { |
| 8934 unittest.test("method--bind", () { | 9039 unittest.test("method--bind", () { |
| 8935 | |
| 8936 var mock = new HttpServerMock(); | 9040 var mock = new HttpServerMock(); |
| 8937 api.LiveBroadcastsResourceApi res = new api.YoutubeApi(mock).liveBroadcast
s; | 9041 api.LiveBroadcastsResourceApi res = |
| 9042 new api.YoutubeApi(mock).liveBroadcasts; |
| 8938 var arg_id = "foo"; | 9043 var arg_id = "foo"; |
| 8939 var arg_part = "foo"; | 9044 var arg_part = "foo"; |
| 8940 var arg_onBehalfOfContentOwner = "foo"; | 9045 var arg_onBehalfOfContentOwner = "foo"; |
| 8941 var arg_onBehalfOfContentOwnerChannel = "foo"; | 9046 var arg_onBehalfOfContentOwnerChannel = "foo"; |
| 8942 var arg_streamId = "foo"; | 9047 var arg_streamId = "foo"; |
| 8943 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 9048 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 8944 var path = (req.url).path; | 9049 var path = (req.url).path; |
| 8945 var pathOffset = 0; | 9050 var pathOffset = 0; |
| 8946 var index; | 9051 var index; |
| 8947 var subPart; | 9052 var subPart; |
| 8948 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 9053 unittest.expect( |
| 9054 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 8949 pathOffset += 1; | 9055 pathOffset += 1; |
| 8950 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("youtube/v3/")); | 9056 unittest.expect(path.substring(pathOffset, pathOffset + 11), |
| 9057 unittest.equals("youtube/v3/")); |
| 8951 pathOffset += 11; | 9058 pathOffset += 11; |
| 8952 unittest.expect(path.substring(pathOffset, pathOffset + 19), unittest.eq
uals("liveBroadcasts/bind")); | 9059 unittest.expect(path.substring(pathOffset, pathOffset + 19), |
| 9060 unittest.equals("liveBroadcasts/bind")); |
| 8953 pathOffset += 19; | 9061 pathOffset += 19; |
| 8954 | 9062 |
| 8955 var query = (req.url).query; | 9063 var query = (req.url).query; |
| 8956 var queryOffset = 0; | 9064 var queryOffset = 0; |
| 8957 var queryMap = {}; | 9065 var queryMap = {}; |
| 8958 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 9066 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 8959 parseBool(n) { | 9067 parseBool(n) { |
| 8960 if (n == "true") return true; | 9068 if (n == "true") return true; |
| 8961 if (n == "false") return false; | 9069 if (n == "false") return false; |
| 8962 if (n == null) return null; | 9070 if (n == null) return null; |
| 8963 throw new core.ArgumentError("Invalid boolean: $n"); | 9071 throw new core.ArgumentError("Invalid boolean: $n"); |
| 8964 } | 9072 } |
| 9073 |
| 8965 if (query.length > 0) { | 9074 if (query.length > 0) { |
| 8966 for (var part in query.split("&")) { | 9075 for (var part in query.split("&")) { |
| 8967 var keyvalue = part.split("="); | 9076 var keyvalue = part.split("="); |
| 8968 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 9077 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 9078 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 8969 } | 9079 } |
| 8970 } | 9080 } |
| 8971 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); | 9081 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); |
| 8972 unittest.expect(queryMap["part"].first, unittest.equals(arg_part)); | 9082 unittest.expect(queryMap["part"].first, unittest.equals(arg_part)); |
| 8973 unittest.expect(queryMap["onBehalfOfContentOwner"].first, unittest.equal
s(arg_onBehalfOfContentOwner)); | 9083 unittest.expect(queryMap["onBehalfOfContentOwner"].first, |
| 8974 unittest.expect(queryMap["onBehalfOfContentOwnerChannel"].first, unittes
t.equals(arg_onBehalfOfContentOwnerChannel)); | 9084 unittest.equals(arg_onBehalfOfContentOwner)); |
| 8975 unittest.expect(queryMap["streamId"].first, unittest.equals(arg_streamId
)); | 9085 unittest.expect(queryMap["onBehalfOfContentOwnerChannel"].first, |
| 8976 | 9086 unittest.equals(arg_onBehalfOfContentOwnerChannel)); |
| 9087 unittest.expect( |
| 9088 queryMap["streamId"].first, unittest.equals(arg_streamId)); |
| 8977 | 9089 |
| 8978 var h = { | 9090 var h = { |
| 8979 "content-type" : "application/json; charset=utf-8", | 9091 "content-type": "application/json; charset=utf-8", |
| 8980 }; | 9092 }; |
| 8981 var resp = convert.JSON.encode(buildLiveBroadcast()); | 9093 var resp = convert.JSON.encode(buildLiveBroadcast()); |
| 8982 return new async.Future.value(stringResponse(200, h, resp)); | 9094 return new async.Future.value(stringResponse(200, h, resp)); |
| 8983 }), true); | 9095 }), true); |
| 8984 res.bind(arg_id, arg_part, onBehalfOfContentOwner: arg_onBehalfOfContentOw
ner, onBehalfOfContentOwnerChannel: arg_onBehalfOfContentOwnerChannel, streamId:
arg_streamId).then(unittest.expectAsync1(((api.LiveBroadcast response) { | 9096 res |
| 9097 .bind(arg_id, arg_part, |
| 9098 onBehalfOfContentOwner: arg_onBehalfOfContentOwner, |
| 9099 onBehalfOfContentOwnerChannel: arg_onBehalfOfContentOwnerChannel, |
| 9100 streamId: arg_streamId) |
| 9101 .then(unittest.expectAsync1(((api.LiveBroadcast response) { |
| 8985 checkLiveBroadcast(response); | 9102 checkLiveBroadcast(response); |
| 8986 }))); | 9103 }))); |
| 8987 }); | 9104 }); |
| 8988 | 9105 |
| 8989 unittest.test("method--control", () { | 9106 unittest.test("method--control", () { |
| 8990 | |
| 8991 var mock = new HttpServerMock(); | 9107 var mock = new HttpServerMock(); |
| 8992 api.LiveBroadcastsResourceApi res = new api.YoutubeApi(mock).liveBroadcast
s; | 9108 api.LiveBroadcastsResourceApi res = |
| 9109 new api.YoutubeApi(mock).liveBroadcasts; |
| 8993 var arg_id = "foo"; | 9110 var arg_id = "foo"; |
| 8994 var arg_part = "foo"; | 9111 var arg_part = "foo"; |
| 8995 var arg_displaySlate = true; | 9112 var arg_displaySlate = true; |
| 8996 var arg_offsetTimeMs = "foo"; | 9113 var arg_offsetTimeMs = "foo"; |
| 8997 var arg_onBehalfOfContentOwner = "foo"; | 9114 var arg_onBehalfOfContentOwner = "foo"; |
| 8998 var arg_onBehalfOfContentOwnerChannel = "foo"; | 9115 var arg_onBehalfOfContentOwnerChannel = "foo"; |
| 8999 var arg_walltime = core.DateTime.parse("2002-02-27T14:01:02"); | 9116 var arg_walltime = core.DateTime.parse("2002-02-27T14:01:02"); |
| 9000 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 9117 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 9001 var path = (req.url).path; | 9118 var path = (req.url).path; |
| 9002 var pathOffset = 0; | 9119 var pathOffset = 0; |
| 9003 var index; | 9120 var index; |
| 9004 var subPart; | 9121 var subPart; |
| 9005 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 9122 unittest.expect( |
| 9123 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 9006 pathOffset += 1; | 9124 pathOffset += 1; |
| 9007 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("youtube/v3/")); | 9125 unittest.expect(path.substring(pathOffset, pathOffset + 11), |
| 9126 unittest.equals("youtube/v3/")); |
| 9008 pathOffset += 11; | 9127 pathOffset += 11; |
| 9009 unittest.expect(path.substring(pathOffset, pathOffset + 22), unittest.eq
uals("liveBroadcasts/control")); | 9128 unittest.expect(path.substring(pathOffset, pathOffset + 22), |
| 9129 unittest.equals("liveBroadcasts/control")); |
| 9010 pathOffset += 22; | 9130 pathOffset += 22; |
| 9011 | 9131 |
| 9012 var query = (req.url).query; | 9132 var query = (req.url).query; |
| 9013 var queryOffset = 0; | 9133 var queryOffset = 0; |
| 9014 var queryMap = {}; | 9134 var queryMap = {}; |
| 9015 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 9135 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 9016 parseBool(n) { | 9136 parseBool(n) { |
| 9017 if (n == "true") return true; | 9137 if (n == "true") return true; |
| 9018 if (n == "false") return false; | 9138 if (n == "false") return false; |
| 9019 if (n == null) return null; | 9139 if (n == null) return null; |
| 9020 throw new core.ArgumentError("Invalid boolean: $n"); | 9140 throw new core.ArgumentError("Invalid boolean: $n"); |
| 9021 } | 9141 } |
| 9142 |
| 9022 if (query.length > 0) { | 9143 if (query.length > 0) { |
| 9023 for (var part in query.split("&")) { | 9144 for (var part in query.split("&")) { |
| 9024 var keyvalue = part.split("="); | 9145 var keyvalue = part.split("="); |
| 9025 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 9146 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 9147 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 9026 } | 9148 } |
| 9027 } | 9149 } |
| 9028 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); | 9150 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); |
| 9029 unittest.expect(queryMap["part"].first, unittest.equals(arg_part)); | 9151 unittest.expect(queryMap["part"].first, unittest.equals(arg_part)); |
| 9030 unittest.expect(queryMap["displaySlate"].first, unittest.equals("$arg_di
splaySlate")); | 9152 unittest.expect(queryMap["displaySlate"].first, |
| 9031 unittest.expect(queryMap["offsetTimeMs"].first, unittest.equals(arg_offs
etTimeMs)); | 9153 unittest.equals("$arg_displaySlate")); |
| 9032 unittest.expect(queryMap["onBehalfOfContentOwner"].first, unittest.equal
s(arg_onBehalfOfContentOwner)); | 9154 unittest.expect( |
| 9033 unittest.expect(queryMap["onBehalfOfContentOwnerChannel"].first, unittes
t.equals(arg_onBehalfOfContentOwnerChannel)); | 9155 queryMap["offsetTimeMs"].first, unittest.equals(arg_offsetTimeMs)); |
| 9034 unittest.expect(core.DateTime.parse(queryMap["walltime"].first), unittes
t.equals(arg_walltime)); | 9156 unittest.expect(queryMap["onBehalfOfContentOwner"].first, |
| 9035 | 9157 unittest.equals(arg_onBehalfOfContentOwner)); |
| 9158 unittest.expect(queryMap["onBehalfOfContentOwnerChannel"].first, |
| 9159 unittest.equals(arg_onBehalfOfContentOwnerChannel)); |
| 9160 unittest.expect(core.DateTime.parse(queryMap["walltime"].first), |
| 9161 unittest.equals(arg_walltime)); |
| 9036 | 9162 |
| 9037 var h = { | 9163 var h = { |
| 9038 "content-type" : "application/json; charset=utf-8", | 9164 "content-type": "application/json; charset=utf-8", |
| 9039 }; | 9165 }; |
| 9040 var resp = convert.JSON.encode(buildLiveBroadcast()); | 9166 var resp = convert.JSON.encode(buildLiveBroadcast()); |
| 9041 return new async.Future.value(stringResponse(200, h, resp)); | 9167 return new async.Future.value(stringResponse(200, h, resp)); |
| 9042 }), true); | 9168 }), true); |
| 9043 res.control(arg_id, arg_part, displaySlate: arg_displaySlate, offsetTimeMs
: arg_offsetTimeMs, onBehalfOfContentOwner: arg_onBehalfOfContentOwner, onBehalf
OfContentOwnerChannel: arg_onBehalfOfContentOwnerChannel, walltime: arg_walltime
).then(unittest.expectAsync1(((api.LiveBroadcast response) { | 9169 res |
| 9170 .control(arg_id, arg_part, |
| 9171 displaySlate: arg_displaySlate, |
| 9172 offsetTimeMs: arg_offsetTimeMs, |
| 9173 onBehalfOfContentOwner: arg_onBehalfOfContentOwner, |
| 9174 onBehalfOfContentOwnerChannel: arg_onBehalfOfContentOwnerChannel, |
| 9175 walltime: arg_walltime) |
| 9176 .then(unittest.expectAsync1(((api.LiveBroadcast response) { |
| 9044 checkLiveBroadcast(response); | 9177 checkLiveBroadcast(response); |
| 9045 }))); | 9178 }))); |
| 9046 }); | 9179 }); |
| 9047 | 9180 |
| 9048 unittest.test("method--delete", () { | 9181 unittest.test("method--delete", () { |
| 9049 | |
| 9050 var mock = new HttpServerMock(); | 9182 var mock = new HttpServerMock(); |
| 9051 api.LiveBroadcastsResourceApi res = new api.YoutubeApi(mock).liveBroadcast
s; | 9183 api.LiveBroadcastsResourceApi res = |
| 9184 new api.YoutubeApi(mock).liveBroadcasts; |
| 9052 var arg_id = "foo"; | 9185 var arg_id = "foo"; |
| 9053 var arg_onBehalfOfContentOwner = "foo"; | 9186 var arg_onBehalfOfContentOwner = "foo"; |
| 9054 var arg_onBehalfOfContentOwnerChannel = "foo"; | 9187 var arg_onBehalfOfContentOwnerChannel = "foo"; |
| 9055 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 9188 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 9056 var path = (req.url).path; | 9189 var path = (req.url).path; |
| 9057 var pathOffset = 0; | 9190 var pathOffset = 0; |
| 9058 var index; | 9191 var index; |
| 9059 var subPart; | 9192 var subPart; |
| 9060 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 9193 unittest.expect( |
| 9194 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 9061 pathOffset += 1; | 9195 pathOffset += 1; |
| 9062 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("youtube/v3/")); | 9196 unittest.expect(path.substring(pathOffset, pathOffset + 11), |
| 9197 unittest.equals("youtube/v3/")); |
| 9063 pathOffset += 11; | 9198 pathOffset += 11; |
| 9064 unittest.expect(path.substring(pathOffset, pathOffset + 14), unittest.eq
uals("liveBroadcasts")); | 9199 unittest.expect(path.substring(pathOffset, pathOffset + 14), |
| 9200 unittest.equals("liveBroadcasts")); |
| 9065 pathOffset += 14; | 9201 pathOffset += 14; |
| 9066 | 9202 |
| 9067 var query = (req.url).query; | 9203 var query = (req.url).query; |
| 9068 var queryOffset = 0; | 9204 var queryOffset = 0; |
| 9069 var queryMap = {}; | 9205 var queryMap = {}; |
| 9070 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 9206 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 9071 parseBool(n) { | 9207 parseBool(n) { |
| 9072 if (n == "true") return true; | 9208 if (n == "true") return true; |
| 9073 if (n == "false") return false; | 9209 if (n == "false") return false; |
| 9074 if (n == null) return null; | 9210 if (n == null) return null; |
| 9075 throw new core.ArgumentError("Invalid boolean: $n"); | 9211 throw new core.ArgumentError("Invalid boolean: $n"); |
| 9076 } | 9212 } |
| 9213 |
| 9077 if (query.length > 0) { | 9214 if (query.length > 0) { |
| 9078 for (var part in query.split("&")) { | 9215 for (var part in query.split("&")) { |
| 9079 var keyvalue = part.split("="); | 9216 var keyvalue = part.split("="); |
| 9080 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 9217 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 9218 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 9081 } | 9219 } |
| 9082 } | 9220 } |
| 9083 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); | 9221 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); |
| 9084 unittest.expect(queryMap["onBehalfOfContentOwner"].first, unittest.equal
s(arg_onBehalfOfContentOwner)); | 9222 unittest.expect(queryMap["onBehalfOfContentOwner"].first, |
| 9085 unittest.expect(queryMap["onBehalfOfContentOwnerChannel"].first, unittes
t.equals(arg_onBehalfOfContentOwnerChannel)); | 9223 unittest.equals(arg_onBehalfOfContentOwner)); |
| 9086 | 9224 unittest.expect(queryMap["onBehalfOfContentOwnerChannel"].first, |
| 9225 unittest.equals(arg_onBehalfOfContentOwnerChannel)); |
| 9087 | 9226 |
| 9088 var h = { | 9227 var h = { |
| 9089 "content-type" : "application/json; charset=utf-8", | 9228 "content-type": "application/json; charset=utf-8", |
| 9090 }; | 9229 }; |
| 9091 var resp = ""; | 9230 var resp = ""; |
| 9092 return new async.Future.value(stringResponse(200, h, resp)); | 9231 return new async.Future.value(stringResponse(200, h, resp)); |
| 9093 }), true); | 9232 }), true); |
| 9094 res.delete(arg_id, onBehalfOfContentOwner: arg_onBehalfOfContentOwner, onB
ehalfOfContentOwnerChannel: arg_onBehalfOfContentOwnerChannel).then(unittest.exp
ectAsync1((_) {})); | 9233 res |
| 9234 .delete(arg_id, |
| 9235 onBehalfOfContentOwner: arg_onBehalfOfContentOwner, |
| 9236 onBehalfOfContentOwnerChannel: arg_onBehalfOfContentOwnerChannel) |
| 9237 .then(unittest.expectAsync1((_) {})); |
| 9095 }); | 9238 }); |
| 9096 | 9239 |
| 9097 unittest.test("method--insert", () { | 9240 unittest.test("method--insert", () { |
| 9098 | |
| 9099 var mock = new HttpServerMock(); | 9241 var mock = new HttpServerMock(); |
| 9100 api.LiveBroadcastsResourceApi res = new api.YoutubeApi(mock).liveBroadcast
s; | 9242 api.LiveBroadcastsResourceApi res = |
| 9243 new api.YoutubeApi(mock).liveBroadcasts; |
| 9101 var arg_request = buildLiveBroadcast(); | 9244 var arg_request = buildLiveBroadcast(); |
| 9102 var arg_part = "foo"; | 9245 var arg_part = "foo"; |
| 9103 var arg_onBehalfOfContentOwner = "foo"; | 9246 var arg_onBehalfOfContentOwner = "foo"; |
| 9104 var arg_onBehalfOfContentOwnerChannel = "foo"; | 9247 var arg_onBehalfOfContentOwnerChannel = "foo"; |
| 9105 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 9248 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 9106 var obj = new api.LiveBroadcast.fromJson(json); | 9249 var obj = new api.LiveBroadcast.fromJson(json); |
| 9107 checkLiveBroadcast(obj); | 9250 checkLiveBroadcast(obj); |
| 9108 | 9251 |
| 9109 var path = (req.url).path; | 9252 var path = (req.url).path; |
| 9110 var pathOffset = 0; | 9253 var pathOffset = 0; |
| 9111 var index; | 9254 var index; |
| 9112 var subPart; | 9255 var subPart; |
| 9113 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 9256 unittest.expect( |
| 9257 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 9114 pathOffset += 1; | 9258 pathOffset += 1; |
| 9115 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("youtube/v3/")); | 9259 unittest.expect(path.substring(pathOffset, pathOffset + 11), |
| 9260 unittest.equals("youtube/v3/")); |
| 9116 pathOffset += 11; | 9261 pathOffset += 11; |
| 9117 unittest.expect(path.substring(pathOffset, pathOffset + 14), unittest.eq
uals("liveBroadcasts")); | 9262 unittest.expect(path.substring(pathOffset, pathOffset + 14), |
| 9263 unittest.equals("liveBroadcasts")); |
| 9118 pathOffset += 14; | 9264 pathOffset += 14; |
| 9119 | 9265 |
| 9120 var query = (req.url).query; | 9266 var query = (req.url).query; |
| 9121 var queryOffset = 0; | 9267 var queryOffset = 0; |
| 9122 var queryMap = {}; | 9268 var queryMap = {}; |
| 9123 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 9269 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 9124 parseBool(n) { | 9270 parseBool(n) { |
| 9125 if (n == "true") return true; | 9271 if (n == "true") return true; |
| 9126 if (n == "false") return false; | 9272 if (n == "false") return false; |
| 9127 if (n == null) return null; | 9273 if (n == null) return null; |
| 9128 throw new core.ArgumentError("Invalid boolean: $n"); | 9274 throw new core.ArgumentError("Invalid boolean: $n"); |
| 9129 } | 9275 } |
| 9276 |
| 9130 if (query.length > 0) { | 9277 if (query.length > 0) { |
| 9131 for (var part in query.split("&")) { | 9278 for (var part in query.split("&")) { |
| 9132 var keyvalue = part.split("="); | 9279 var keyvalue = part.split("="); |
| 9133 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 9280 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 9281 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 9134 } | 9282 } |
| 9135 } | 9283 } |
| 9136 unittest.expect(queryMap["part"].first, unittest.equals(arg_part)); | 9284 unittest.expect(queryMap["part"].first, unittest.equals(arg_part)); |
| 9137 unittest.expect(queryMap["onBehalfOfContentOwner"].first, unittest.equal
s(arg_onBehalfOfContentOwner)); | 9285 unittest.expect(queryMap["onBehalfOfContentOwner"].first, |
| 9138 unittest.expect(queryMap["onBehalfOfContentOwnerChannel"].first, unittes
t.equals(arg_onBehalfOfContentOwnerChannel)); | 9286 unittest.equals(arg_onBehalfOfContentOwner)); |
| 9139 | 9287 unittest.expect(queryMap["onBehalfOfContentOwnerChannel"].first, |
| 9288 unittest.equals(arg_onBehalfOfContentOwnerChannel)); |
| 9140 | 9289 |
| 9141 var h = { | 9290 var h = { |
| 9142 "content-type" : "application/json; charset=utf-8", | 9291 "content-type": "application/json; charset=utf-8", |
| 9143 }; | 9292 }; |
| 9144 var resp = convert.JSON.encode(buildLiveBroadcast()); | 9293 var resp = convert.JSON.encode(buildLiveBroadcast()); |
| 9145 return new async.Future.value(stringResponse(200, h, resp)); | 9294 return new async.Future.value(stringResponse(200, h, resp)); |
| 9146 }), true); | 9295 }), true); |
| 9147 res.insert(arg_request, arg_part, onBehalfOfContentOwner: arg_onBehalfOfCo
ntentOwner, onBehalfOfContentOwnerChannel: arg_onBehalfOfContentOwnerChannel).th
en(unittest.expectAsync1(((api.LiveBroadcast response) { | 9296 res |
| 9297 .insert(arg_request, arg_part, |
| 9298 onBehalfOfContentOwner: arg_onBehalfOfContentOwner, |
| 9299 onBehalfOfContentOwnerChannel: arg_onBehalfOfContentOwnerChannel) |
| 9300 .then(unittest.expectAsync1(((api.LiveBroadcast response) { |
| 9148 checkLiveBroadcast(response); | 9301 checkLiveBroadcast(response); |
| 9149 }))); | 9302 }))); |
| 9150 }); | 9303 }); |
| 9151 | 9304 |
| 9152 unittest.test("method--list", () { | 9305 unittest.test("method--list", () { |
| 9153 | |
| 9154 var mock = new HttpServerMock(); | 9306 var mock = new HttpServerMock(); |
| 9155 api.LiveBroadcastsResourceApi res = new api.YoutubeApi(mock).liveBroadcast
s; | 9307 api.LiveBroadcastsResourceApi res = |
| 9308 new api.YoutubeApi(mock).liveBroadcasts; |
| 9156 var arg_part = "foo"; | 9309 var arg_part = "foo"; |
| 9157 var arg_broadcastStatus = "foo"; | 9310 var arg_broadcastStatus = "foo"; |
| 9158 var arg_broadcastType = "foo"; | 9311 var arg_broadcastType = "foo"; |
| 9159 var arg_id = "foo"; | 9312 var arg_id = "foo"; |
| 9160 var arg_maxResults = 42; | 9313 var arg_maxResults = 42; |
| 9161 var arg_mine = true; | 9314 var arg_mine = true; |
| 9162 var arg_onBehalfOfContentOwner = "foo"; | 9315 var arg_onBehalfOfContentOwner = "foo"; |
| 9163 var arg_onBehalfOfContentOwnerChannel = "foo"; | 9316 var arg_onBehalfOfContentOwnerChannel = "foo"; |
| 9164 var arg_pageToken = "foo"; | 9317 var arg_pageToken = "foo"; |
| 9165 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 9318 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 9166 var path = (req.url).path; | 9319 var path = (req.url).path; |
| 9167 var pathOffset = 0; | 9320 var pathOffset = 0; |
| 9168 var index; | 9321 var index; |
| 9169 var subPart; | 9322 var subPart; |
| 9170 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 9323 unittest.expect( |
| 9324 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 9171 pathOffset += 1; | 9325 pathOffset += 1; |
| 9172 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("youtube/v3/")); | 9326 unittest.expect(path.substring(pathOffset, pathOffset + 11), |
| 9327 unittest.equals("youtube/v3/")); |
| 9173 pathOffset += 11; | 9328 pathOffset += 11; |
| 9174 unittest.expect(path.substring(pathOffset, pathOffset + 14), unittest.eq
uals("liveBroadcasts")); | 9329 unittest.expect(path.substring(pathOffset, pathOffset + 14), |
| 9330 unittest.equals("liveBroadcasts")); |
| 9175 pathOffset += 14; | 9331 pathOffset += 14; |
| 9176 | 9332 |
| 9177 var query = (req.url).query; | 9333 var query = (req.url).query; |
| 9178 var queryOffset = 0; | 9334 var queryOffset = 0; |
| 9179 var queryMap = {}; | 9335 var queryMap = {}; |
| 9180 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 9336 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 9181 parseBool(n) { | 9337 parseBool(n) { |
| 9182 if (n == "true") return true; | 9338 if (n == "true") return true; |
| 9183 if (n == "false") return false; | 9339 if (n == "false") return false; |
| 9184 if (n == null) return null; | 9340 if (n == null) return null; |
| 9185 throw new core.ArgumentError("Invalid boolean: $n"); | 9341 throw new core.ArgumentError("Invalid boolean: $n"); |
| 9186 } | 9342 } |
| 9343 |
| 9187 if (query.length > 0) { | 9344 if (query.length > 0) { |
| 9188 for (var part in query.split("&")) { | 9345 for (var part in query.split("&")) { |
| 9189 var keyvalue = part.split("="); | 9346 var keyvalue = part.split("="); |
| 9190 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 9347 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 9348 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 9191 } | 9349 } |
| 9192 } | 9350 } |
| 9193 unittest.expect(queryMap["part"].first, unittest.equals(arg_part)); | 9351 unittest.expect(queryMap["part"].first, unittest.equals(arg_part)); |
| 9194 unittest.expect(queryMap["broadcastStatus"].first, unittest.equals(arg_b
roadcastStatus)); | 9352 unittest.expect(queryMap["broadcastStatus"].first, |
| 9195 unittest.expect(queryMap["broadcastType"].first, unittest.equals(arg_bro
adcastType)); | 9353 unittest.equals(arg_broadcastStatus)); |
| 9354 unittest.expect(queryMap["broadcastType"].first, |
| 9355 unittest.equals(arg_broadcastType)); |
| 9196 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); | 9356 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); |
| 9197 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | 9357 unittest.expect(core.int.parse(queryMap["maxResults"].first), |
| 9358 unittest.equals(arg_maxResults)); |
| 9198 unittest.expect(queryMap["mine"].first, unittest.equals("$arg_mine")); | 9359 unittest.expect(queryMap["mine"].first, unittest.equals("$arg_mine")); |
| 9199 unittest.expect(queryMap["onBehalfOfContentOwner"].first, unittest.equal
s(arg_onBehalfOfContentOwner)); | 9360 unittest.expect(queryMap["onBehalfOfContentOwner"].first, |
| 9200 unittest.expect(queryMap["onBehalfOfContentOwnerChannel"].first, unittes
t.equals(arg_onBehalfOfContentOwnerChannel)); | 9361 unittest.equals(arg_onBehalfOfContentOwner)); |
| 9201 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 9362 unittest.expect(queryMap["onBehalfOfContentOwnerChannel"].first, |
| 9202 | 9363 unittest.equals(arg_onBehalfOfContentOwnerChannel)); |
| 9364 unittest.expect( |
| 9365 queryMap["pageToken"].first, unittest.equals(arg_pageToken)); |
| 9203 | 9366 |
| 9204 var h = { | 9367 var h = { |
| 9205 "content-type" : "application/json; charset=utf-8", | 9368 "content-type": "application/json; charset=utf-8", |
| 9206 }; | 9369 }; |
| 9207 var resp = convert.JSON.encode(buildLiveBroadcastListResponse()); | 9370 var resp = convert.JSON.encode(buildLiveBroadcastListResponse()); |
| 9208 return new async.Future.value(stringResponse(200, h, resp)); | 9371 return new async.Future.value(stringResponse(200, h, resp)); |
| 9209 }), true); | 9372 }), true); |
| 9210 res.list(arg_part, broadcastStatus: arg_broadcastStatus, broadcastType: ar
g_broadcastType, id: arg_id, maxResults: arg_maxResults, mine: arg_mine, onBehal
fOfContentOwner: arg_onBehalfOfContentOwner, onBehalfOfContentOwnerChannel: arg_
onBehalfOfContentOwnerChannel, pageToken: arg_pageToken).then(unittest.expectAsy
nc1(((api.LiveBroadcastListResponse response) { | 9373 res |
| 9374 .list(arg_part, |
| 9375 broadcastStatus: arg_broadcastStatus, |
| 9376 broadcastType: arg_broadcastType, |
| 9377 id: arg_id, |
| 9378 maxResults: arg_maxResults, |
| 9379 mine: arg_mine, |
| 9380 onBehalfOfContentOwner: arg_onBehalfOfContentOwner, |
| 9381 onBehalfOfContentOwnerChannel: arg_onBehalfOfContentOwnerChannel, |
| 9382 pageToken: arg_pageToken) |
| 9383 .then( |
| 9384 unittest.expectAsync1(((api.LiveBroadcastListResponse response) { |
| 9211 checkLiveBroadcastListResponse(response); | 9385 checkLiveBroadcastListResponse(response); |
| 9212 }))); | 9386 }))); |
| 9213 }); | 9387 }); |
| 9214 | 9388 |
| 9215 unittest.test("method--transition", () { | 9389 unittest.test("method--transition", () { |
| 9216 | |
| 9217 var mock = new HttpServerMock(); | 9390 var mock = new HttpServerMock(); |
| 9218 api.LiveBroadcastsResourceApi res = new api.YoutubeApi(mock).liveBroadcast
s; | 9391 api.LiveBroadcastsResourceApi res = |
| 9392 new api.YoutubeApi(mock).liveBroadcasts; |
| 9219 var arg_broadcastStatus = "foo"; | 9393 var arg_broadcastStatus = "foo"; |
| 9220 var arg_id = "foo"; | 9394 var arg_id = "foo"; |
| 9221 var arg_part = "foo"; | 9395 var arg_part = "foo"; |
| 9222 var arg_onBehalfOfContentOwner = "foo"; | 9396 var arg_onBehalfOfContentOwner = "foo"; |
| 9223 var arg_onBehalfOfContentOwnerChannel = "foo"; | 9397 var arg_onBehalfOfContentOwnerChannel = "foo"; |
| 9224 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 9398 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 9225 var path = (req.url).path; | 9399 var path = (req.url).path; |
| 9226 var pathOffset = 0; | 9400 var pathOffset = 0; |
| 9227 var index; | 9401 var index; |
| 9228 var subPart; | 9402 var subPart; |
| 9229 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 9403 unittest.expect( |
| 9404 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 9230 pathOffset += 1; | 9405 pathOffset += 1; |
| 9231 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("youtube/v3/")); | 9406 unittest.expect(path.substring(pathOffset, pathOffset + 11), |
| 9407 unittest.equals("youtube/v3/")); |
| 9232 pathOffset += 11; | 9408 pathOffset += 11; |
| 9233 unittest.expect(path.substring(pathOffset, pathOffset + 25), unittest.eq
uals("liveBroadcasts/transition")); | 9409 unittest.expect(path.substring(pathOffset, pathOffset + 25), |
| 9410 unittest.equals("liveBroadcasts/transition")); |
| 9234 pathOffset += 25; | 9411 pathOffset += 25; |
| 9235 | 9412 |
| 9236 var query = (req.url).query; | 9413 var query = (req.url).query; |
| 9237 var queryOffset = 0; | 9414 var queryOffset = 0; |
| 9238 var queryMap = {}; | 9415 var queryMap = {}; |
| 9239 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 9416 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 9240 parseBool(n) { | 9417 parseBool(n) { |
| 9241 if (n == "true") return true; | 9418 if (n == "true") return true; |
| 9242 if (n == "false") return false; | 9419 if (n == "false") return false; |
| 9243 if (n == null) return null; | 9420 if (n == null) return null; |
| 9244 throw new core.ArgumentError("Invalid boolean: $n"); | 9421 throw new core.ArgumentError("Invalid boolean: $n"); |
| 9245 } | 9422 } |
| 9423 |
| 9246 if (query.length > 0) { | 9424 if (query.length > 0) { |
| 9247 for (var part in query.split("&")) { | 9425 for (var part in query.split("&")) { |
| 9248 var keyvalue = part.split("="); | 9426 var keyvalue = part.split("="); |
| 9249 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 9427 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 9428 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 9250 } | 9429 } |
| 9251 } | 9430 } |
| 9252 unittest.expect(queryMap["broadcastStatus"].first, unittest.equals(arg_b
roadcastStatus)); | 9431 unittest.expect(queryMap["broadcastStatus"].first, |
| 9432 unittest.equals(arg_broadcastStatus)); |
| 9253 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); | 9433 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); |
| 9254 unittest.expect(queryMap["part"].first, unittest.equals(arg_part)); | 9434 unittest.expect(queryMap["part"].first, unittest.equals(arg_part)); |
| 9255 unittest.expect(queryMap["onBehalfOfContentOwner"].first, unittest.equal
s(arg_onBehalfOfContentOwner)); | 9435 unittest.expect(queryMap["onBehalfOfContentOwner"].first, |
| 9256 unittest.expect(queryMap["onBehalfOfContentOwnerChannel"].first, unittes
t.equals(arg_onBehalfOfContentOwnerChannel)); | 9436 unittest.equals(arg_onBehalfOfContentOwner)); |
| 9257 | 9437 unittest.expect(queryMap["onBehalfOfContentOwnerChannel"].first, |
| 9438 unittest.equals(arg_onBehalfOfContentOwnerChannel)); |
| 9258 | 9439 |
| 9259 var h = { | 9440 var h = { |
| 9260 "content-type" : "application/json; charset=utf-8", | 9441 "content-type": "application/json; charset=utf-8", |
| 9261 }; | 9442 }; |
| 9262 var resp = convert.JSON.encode(buildLiveBroadcast()); | 9443 var resp = convert.JSON.encode(buildLiveBroadcast()); |
| 9263 return new async.Future.value(stringResponse(200, h, resp)); | 9444 return new async.Future.value(stringResponse(200, h, resp)); |
| 9264 }), true); | 9445 }), true); |
| 9265 res.transition(arg_broadcastStatus, arg_id, arg_part, onBehalfOfContentOwn
er: arg_onBehalfOfContentOwner, onBehalfOfContentOwnerChannel: arg_onBehalfOfCon
tentOwnerChannel).then(unittest.expectAsync1(((api.LiveBroadcast response) { | 9446 res |
| 9447 .transition(arg_broadcastStatus, arg_id, arg_part, |
| 9448 onBehalfOfContentOwner: arg_onBehalfOfContentOwner, |
| 9449 onBehalfOfContentOwnerChannel: arg_onBehalfOfContentOwnerChannel) |
| 9450 .then(unittest.expectAsync1(((api.LiveBroadcast response) { |
| 9266 checkLiveBroadcast(response); | 9451 checkLiveBroadcast(response); |
| 9267 }))); | 9452 }))); |
| 9268 }); | 9453 }); |
| 9269 | 9454 |
| 9270 unittest.test("method--update", () { | 9455 unittest.test("method--update", () { |
| 9271 | |
| 9272 var mock = new HttpServerMock(); | 9456 var mock = new HttpServerMock(); |
| 9273 api.LiveBroadcastsResourceApi res = new api.YoutubeApi(mock).liveBroadcast
s; | 9457 api.LiveBroadcastsResourceApi res = |
| 9458 new api.YoutubeApi(mock).liveBroadcasts; |
| 9274 var arg_request = buildLiveBroadcast(); | 9459 var arg_request = buildLiveBroadcast(); |
| 9275 var arg_part = "foo"; | 9460 var arg_part = "foo"; |
| 9276 var arg_onBehalfOfContentOwner = "foo"; | 9461 var arg_onBehalfOfContentOwner = "foo"; |
| 9277 var arg_onBehalfOfContentOwnerChannel = "foo"; | 9462 var arg_onBehalfOfContentOwnerChannel = "foo"; |
| 9278 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 9463 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 9279 var obj = new api.LiveBroadcast.fromJson(json); | 9464 var obj = new api.LiveBroadcast.fromJson(json); |
| 9280 checkLiveBroadcast(obj); | 9465 checkLiveBroadcast(obj); |
| 9281 | 9466 |
| 9282 var path = (req.url).path; | 9467 var path = (req.url).path; |
| 9283 var pathOffset = 0; | 9468 var pathOffset = 0; |
| 9284 var index; | 9469 var index; |
| 9285 var subPart; | 9470 var subPart; |
| 9286 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 9471 unittest.expect( |
| 9472 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 9287 pathOffset += 1; | 9473 pathOffset += 1; |
| 9288 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("youtube/v3/")); | 9474 unittest.expect(path.substring(pathOffset, pathOffset + 11), |
| 9475 unittest.equals("youtube/v3/")); |
| 9289 pathOffset += 11; | 9476 pathOffset += 11; |
| 9290 unittest.expect(path.substring(pathOffset, pathOffset + 14), unittest.eq
uals("liveBroadcasts")); | 9477 unittest.expect(path.substring(pathOffset, pathOffset + 14), |
| 9478 unittest.equals("liveBroadcasts")); |
| 9291 pathOffset += 14; | 9479 pathOffset += 14; |
| 9292 | 9480 |
| 9293 var query = (req.url).query; | 9481 var query = (req.url).query; |
| 9294 var queryOffset = 0; | 9482 var queryOffset = 0; |
| 9295 var queryMap = {}; | 9483 var queryMap = {}; |
| 9296 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 9484 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 9297 parseBool(n) { | 9485 parseBool(n) { |
| 9298 if (n == "true") return true; | 9486 if (n == "true") return true; |
| 9299 if (n == "false") return false; | 9487 if (n == "false") return false; |
| 9300 if (n == null) return null; | 9488 if (n == null) return null; |
| 9301 throw new core.ArgumentError("Invalid boolean: $n"); | 9489 throw new core.ArgumentError("Invalid boolean: $n"); |
| 9302 } | 9490 } |
| 9491 |
| 9303 if (query.length > 0) { | 9492 if (query.length > 0) { |
| 9304 for (var part in query.split("&")) { | 9493 for (var part in query.split("&")) { |
| 9305 var keyvalue = part.split("="); | 9494 var keyvalue = part.split("="); |
| 9306 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 9495 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 9496 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 9307 } | 9497 } |
| 9308 } | 9498 } |
| 9309 unittest.expect(queryMap["part"].first, unittest.equals(arg_part)); | 9499 unittest.expect(queryMap["part"].first, unittest.equals(arg_part)); |
| 9310 unittest.expect(queryMap["onBehalfOfContentOwner"].first, unittest.equal
s(arg_onBehalfOfContentOwner)); | 9500 unittest.expect(queryMap["onBehalfOfContentOwner"].first, |
| 9311 unittest.expect(queryMap["onBehalfOfContentOwnerChannel"].first, unittes
t.equals(arg_onBehalfOfContentOwnerChannel)); | 9501 unittest.equals(arg_onBehalfOfContentOwner)); |
| 9312 | 9502 unittest.expect(queryMap["onBehalfOfContentOwnerChannel"].first, |
| 9503 unittest.equals(arg_onBehalfOfContentOwnerChannel)); |
| 9313 | 9504 |
| 9314 var h = { | 9505 var h = { |
| 9315 "content-type" : "application/json; charset=utf-8", | 9506 "content-type": "application/json; charset=utf-8", |
| 9316 }; | 9507 }; |
| 9317 var resp = convert.JSON.encode(buildLiveBroadcast()); | 9508 var resp = convert.JSON.encode(buildLiveBroadcast()); |
| 9318 return new async.Future.value(stringResponse(200, h, resp)); | 9509 return new async.Future.value(stringResponse(200, h, resp)); |
| 9319 }), true); | 9510 }), true); |
| 9320 res.update(arg_request, arg_part, onBehalfOfContentOwner: arg_onBehalfOfCo
ntentOwner, onBehalfOfContentOwnerChannel: arg_onBehalfOfContentOwnerChannel).th
en(unittest.expectAsync1(((api.LiveBroadcast response) { | 9511 res |
| 9512 .update(arg_request, arg_part, |
| 9513 onBehalfOfContentOwner: arg_onBehalfOfContentOwner, |
| 9514 onBehalfOfContentOwnerChannel: arg_onBehalfOfContentOwnerChannel) |
| 9515 .then(unittest.expectAsync1(((api.LiveBroadcast response) { |
| 9321 checkLiveBroadcast(response); | 9516 checkLiveBroadcast(response); |
| 9322 }))); | 9517 }))); |
| 9323 }); | 9518 }); |
| 9324 | |
| 9325 }); | 9519 }); |
| 9326 | 9520 |
| 9327 | |
| 9328 unittest.group("resource-LiveChatBansResourceApi", () { | 9521 unittest.group("resource-LiveChatBansResourceApi", () { |
| 9329 unittest.test("method--delete", () { | 9522 unittest.test("method--delete", () { |
| 9330 | |
| 9331 var mock = new HttpServerMock(); | 9523 var mock = new HttpServerMock(); |
| 9332 api.LiveChatBansResourceApi res = new api.YoutubeApi(mock).liveChatBans; | 9524 api.LiveChatBansResourceApi res = new api.YoutubeApi(mock).liveChatBans; |
| 9333 var arg_id = "foo"; | 9525 var arg_id = "foo"; |
| 9334 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 9526 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 9335 var path = (req.url).path; | 9527 var path = (req.url).path; |
| 9336 var pathOffset = 0; | 9528 var pathOffset = 0; |
| 9337 var index; | 9529 var index; |
| 9338 var subPart; | 9530 var subPart; |
| 9339 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 9531 unittest.expect( |
| 9532 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 9340 pathOffset += 1; | 9533 pathOffset += 1; |
| 9341 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("youtube/v3/")); | 9534 unittest.expect(path.substring(pathOffset, pathOffset + 11), |
| 9535 unittest.equals("youtube/v3/")); |
| 9342 pathOffset += 11; | 9536 pathOffset += 11; |
| 9343 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("liveChat/bans")); | 9537 unittest.expect(path.substring(pathOffset, pathOffset + 13), |
| 9538 unittest.equals("liveChat/bans")); |
| 9344 pathOffset += 13; | 9539 pathOffset += 13; |
| 9345 | 9540 |
| 9346 var query = (req.url).query; | 9541 var query = (req.url).query; |
| 9347 var queryOffset = 0; | 9542 var queryOffset = 0; |
| 9348 var queryMap = {}; | 9543 var queryMap = {}; |
| 9349 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 9544 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 9350 parseBool(n) { | 9545 parseBool(n) { |
| 9351 if (n == "true") return true; | 9546 if (n == "true") return true; |
| 9352 if (n == "false") return false; | 9547 if (n == "false") return false; |
| 9353 if (n == null) return null; | 9548 if (n == null) return null; |
| 9354 throw new core.ArgumentError("Invalid boolean: $n"); | 9549 throw new core.ArgumentError("Invalid boolean: $n"); |
| 9355 } | 9550 } |
| 9551 |
| 9356 if (query.length > 0) { | 9552 if (query.length > 0) { |
| 9357 for (var part in query.split("&")) { | 9553 for (var part in query.split("&")) { |
| 9358 var keyvalue = part.split("="); | 9554 var keyvalue = part.split("="); |
| 9359 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 9555 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 9556 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 9360 } | 9557 } |
| 9361 } | 9558 } |
| 9362 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); | 9559 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); |
| 9363 | 9560 |
| 9364 | |
| 9365 var h = { | 9561 var h = { |
| 9366 "content-type" : "application/json; charset=utf-8", | 9562 "content-type": "application/json; charset=utf-8", |
| 9367 }; | 9563 }; |
| 9368 var resp = ""; | 9564 var resp = ""; |
| 9369 return new async.Future.value(stringResponse(200, h, resp)); | 9565 return new async.Future.value(stringResponse(200, h, resp)); |
| 9370 }), true); | 9566 }), true); |
| 9371 res.delete(arg_id).then(unittest.expectAsync1((_) {})); | 9567 res.delete(arg_id).then(unittest.expectAsync1((_) {})); |
| 9372 }); | 9568 }); |
| 9373 | 9569 |
| 9374 unittest.test("method--insert", () { | 9570 unittest.test("method--insert", () { |
| 9375 | |
| 9376 var mock = new HttpServerMock(); | 9571 var mock = new HttpServerMock(); |
| 9377 api.LiveChatBansResourceApi res = new api.YoutubeApi(mock).liveChatBans; | 9572 api.LiveChatBansResourceApi res = new api.YoutubeApi(mock).liveChatBans; |
| 9378 var arg_request = buildLiveChatBan(); | 9573 var arg_request = buildLiveChatBan(); |
| 9379 var arg_part = "foo"; | 9574 var arg_part = "foo"; |
| 9380 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 9575 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 9381 var obj = new api.LiveChatBan.fromJson(json); | 9576 var obj = new api.LiveChatBan.fromJson(json); |
| 9382 checkLiveChatBan(obj); | 9577 checkLiveChatBan(obj); |
| 9383 | 9578 |
| 9384 var path = (req.url).path; | 9579 var path = (req.url).path; |
| 9385 var pathOffset = 0; | 9580 var pathOffset = 0; |
| 9386 var index; | 9581 var index; |
| 9387 var subPart; | 9582 var subPart; |
| 9388 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 9583 unittest.expect( |
| 9584 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 9389 pathOffset += 1; | 9585 pathOffset += 1; |
| 9390 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("youtube/v3/")); | 9586 unittest.expect(path.substring(pathOffset, pathOffset + 11), |
| 9587 unittest.equals("youtube/v3/")); |
| 9391 pathOffset += 11; | 9588 pathOffset += 11; |
| 9392 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("liveChat/bans")); | 9589 unittest.expect(path.substring(pathOffset, pathOffset + 13), |
| 9590 unittest.equals("liveChat/bans")); |
| 9393 pathOffset += 13; | 9591 pathOffset += 13; |
| 9394 | 9592 |
| 9395 var query = (req.url).query; | 9593 var query = (req.url).query; |
| 9396 var queryOffset = 0; | 9594 var queryOffset = 0; |
| 9397 var queryMap = {}; | 9595 var queryMap = {}; |
| 9398 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 9596 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 9399 parseBool(n) { | 9597 parseBool(n) { |
| 9400 if (n == "true") return true; | 9598 if (n == "true") return true; |
| 9401 if (n == "false") return false; | 9599 if (n == "false") return false; |
| 9402 if (n == null) return null; | 9600 if (n == null) return null; |
| 9403 throw new core.ArgumentError("Invalid boolean: $n"); | 9601 throw new core.ArgumentError("Invalid boolean: $n"); |
| 9404 } | 9602 } |
| 9603 |
| 9405 if (query.length > 0) { | 9604 if (query.length > 0) { |
| 9406 for (var part in query.split("&")) { | 9605 for (var part in query.split("&")) { |
| 9407 var keyvalue = part.split("="); | 9606 var keyvalue = part.split("="); |
| 9408 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 9607 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 9608 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 9409 } | 9609 } |
| 9410 } | 9610 } |
| 9411 unittest.expect(queryMap["part"].first, unittest.equals(arg_part)); | 9611 unittest.expect(queryMap["part"].first, unittest.equals(arg_part)); |
| 9412 | 9612 |
| 9413 | |
| 9414 var h = { | 9613 var h = { |
| 9415 "content-type" : "application/json; charset=utf-8", | 9614 "content-type": "application/json; charset=utf-8", |
| 9416 }; | 9615 }; |
| 9417 var resp = convert.JSON.encode(buildLiveChatBan()); | 9616 var resp = convert.JSON.encode(buildLiveChatBan()); |
| 9418 return new async.Future.value(stringResponse(200, h, resp)); | 9617 return new async.Future.value(stringResponse(200, h, resp)); |
| 9419 }), true); | 9618 }), true); |
| 9420 res.insert(arg_request, arg_part).then(unittest.expectAsync1(((api.LiveCha
tBan response) { | 9619 res |
| 9620 .insert(arg_request, arg_part) |
| 9621 .then(unittest.expectAsync1(((api.LiveChatBan response) { |
| 9421 checkLiveChatBan(response); | 9622 checkLiveChatBan(response); |
| 9422 }))); | 9623 }))); |
| 9423 }); | 9624 }); |
| 9424 | |
| 9425 }); | 9625 }); |
| 9426 | 9626 |
| 9427 | |
| 9428 unittest.group("resource-LiveChatMessagesResourceApi", () { | 9627 unittest.group("resource-LiveChatMessagesResourceApi", () { |
| 9429 unittest.test("method--delete", () { | 9628 unittest.test("method--delete", () { |
| 9430 | |
| 9431 var mock = new HttpServerMock(); | 9629 var mock = new HttpServerMock(); |
| 9432 api.LiveChatMessagesResourceApi res = new api.YoutubeApi(mock).liveChatMes
sages; | 9630 api.LiveChatMessagesResourceApi res = |
| 9631 new api.YoutubeApi(mock).liveChatMessages; |
| 9433 var arg_id = "foo"; | 9632 var arg_id = "foo"; |
| 9434 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 9633 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 9435 var path = (req.url).path; | 9634 var path = (req.url).path; |
| 9436 var pathOffset = 0; | 9635 var pathOffset = 0; |
| 9437 var index; | 9636 var index; |
| 9438 var subPart; | 9637 var subPart; |
| 9439 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 9638 unittest.expect( |
| 9639 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 9440 pathOffset += 1; | 9640 pathOffset += 1; |
| 9441 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("youtube/v3/")); | 9641 unittest.expect(path.substring(pathOffset, pathOffset + 11), |
| 9642 unittest.equals("youtube/v3/")); |
| 9442 pathOffset += 11; | 9643 pathOffset += 11; |
| 9443 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("liveChat/messages")); | 9644 unittest.expect(path.substring(pathOffset, pathOffset + 17), |
| 9645 unittest.equals("liveChat/messages")); |
| 9444 pathOffset += 17; | 9646 pathOffset += 17; |
| 9445 | 9647 |
| 9446 var query = (req.url).query; | 9648 var query = (req.url).query; |
| 9447 var queryOffset = 0; | 9649 var queryOffset = 0; |
| 9448 var queryMap = {}; | 9650 var queryMap = {}; |
| 9449 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 9651 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 9450 parseBool(n) { | 9652 parseBool(n) { |
| 9451 if (n == "true") return true; | 9653 if (n == "true") return true; |
| 9452 if (n == "false") return false; | 9654 if (n == "false") return false; |
| 9453 if (n == null) return null; | 9655 if (n == null) return null; |
| 9454 throw new core.ArgumentError("Invalid boolean: $n"); | 9656 throw new core.ArgumentError("Invalid boolean: $n"); |
| 9455 } | 9657 } |
| 9658 |
| 9456 if (query.length > 0) { | 9659 if (query.length > 0) { |
| 9457 for (var part in query.split("&")) { | 9660 for (var part in query.split("&")) { |
| 9458 var keyvalue = part.split("="); | 9661 var keyvalue = part.split("="); |
| 9459 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 9662 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 9663 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 9460 } | 9664 } |
| 9461 } | 9665 } |
| 9462 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); | 9666 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); |
| 9463 | 9667 |
| 9464 | |
| 9465 var h = { | 9668 var h = { |
| 9466 "content-type" : "application/json; charset=utf-8", | 9669 "content-type": "application/json; charset=utf-8", |
| 9467 }; | 9670 }; |
| 9468 var resp = ""; | 9671 var resp = ""; |
| 9469 return new async.Future.value(stringResponse(200, h, resp)); | 9672 return new async.Future.value(stringResponse(200, h, resp)); |
| 9470 }), true); | 9673 }), true); |
| 9471 res.delete(arg_id).then(unittest.expectAsync1((_) {})); | 9674 res.delete(arg_id).then(unittest.expectAsync1((_) {})); |
| 9472 }); | 9675 }); |
| 9473 | 9676 |
| 9474 unittest.test("method--insert", () { | 9677 unittest.test("method--insert", () { |
| 9475 | |
| 9476 var mock = new HttpServerMock(); | 9678 var mock = new HttpServerMock(); |
| 9477 api.LiveChatMessagesResourceApi res = new api.YoutubeApi(mock).liveChatMes
sages; | 9679 api.LiveChatMessagesResourceApi res = |
| 9680 new api.YoutubeApi(mock).liveChatMessages; |
| 9478 var arg_request = buildLiveChatMessage(); | 9681 var arg_request = buildLiveChatMessage(); |
| 9479 var arg_part = "foo"; | 9682 var arg_part = "foo"; |
| 9480 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 9683 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 9481 var obj = new api.LiveChatMessage.fromJson(json); | 9684 var obj = new api.LiveChatMessage.fromJson(json); |
| 9482 checkLiveChatMessage(obj); | 9685 checkLiveChatMessage(obj); |
| 9483 | 9686 |
| 9484 var path = (req.url).path; | 9687 var path = (req.url).path; |
| 9485 var pathOffset = 0; | 9688 var pathOffset = 0; |
| 9486 var index; | 9689 var index; |
| 9487 var subPart; | 9690 var subPart; |
| 9488 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 9691 unittest.expect( |
| 9692 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 9489 pathOffset += 1; | 9693 pathOffset += 1; |
| 9490 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("youtube/v3/")); | 9694 unittest.expect(path.substring(pathOffset, pathOffset + 11), |
| 9695 unittest.equals("youtube/v3/")); |
| 9491 pathOffset += 11; | 9696 pathOffset += 11; |
| 9492 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("liveChat/messages")); | 9697 unittest.expect(path.substring(pathOffset, pathOffset + 17), |
| 9698 unittest.equals("liveChat/messages")); |
| 9493 pathOffset += 17; | 9699 pathOffset += 17; |
| 9494 | 9700 |
| 9495 var query = (req.url).query; | 9701 var query = (req.url).query; |
| 9496 var queryOffset = 0; | 9702 var queryOffset = 0; |
| 9497 var queryMap = {}; | 9703 var queryMap = {}; |
| 9498 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 9704 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 9499 parseBool(n) { | 9705 parseBool(n) { |
| 9500 if (n == "true") return true; | 9706 if (n == "true") return true; |
| 9501 if (n == "false") return false; | 9707 if (n == "false") return false; |
| 9502 if (n == null) return null; | 9708 if (n == null) return null; |
| 9503 throw new core.ArgumentError("Invalid boolean: $n"); | 9709 throw new core.ArgumentError("Invalid boolean: $n"); |
| 9504 } | 9710 } |
| 9711 |
| 9505 if (query.length > 0) { | 9712 if (query.length > 0) { |
| 9506 for (var part in query.split("&")) { | 9713 for (var part in query.split("&")) { |
| 9507 var keyvalue = part.split("="); | 9714 var keyvalue = part.split("="); |
| 9508 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 9715 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 9716 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 9509 } | 9717 } |
| 9510 } | 9718 } |
| 9511 unittest.expect(queryMap["part"].first, unittest.equals(arg_part)); | 9719 unittest.expect(queryMap["part"].first, unittest.equals(arg_part)); |
| 9512 | 9720 |
| 9513 | |
| 9514 var h = { | 9721 var h = { |
| 9515 "content-type" : "application/json; charset=utf-8", | 9722 "content-type": "application/json; charset=utf-8", |
| 9516 }; | 9723 }; |
| 9517 var resp = convert.JSON.encode(buildLiveChatMessage()); | 9724 var resp = convert.JSON.encode(buildLiveChatMessage()); |
| 9518 return new async.Future.value(stringResponse(200, h, resp)); | 9725 return new async.Future.value(stringResponse(200, h, resp)); |
| 9519 }), true); | 9726 }), true); |
| 9520 res.insert(arg_request, arg_part).then(unittest.expectAsync1(((api.LiveCha
tMessage response) { | 9727 res |
| 9728 .insert(arg_request, arg_part) |
| 9729 .then(unittest.expectAsync1(((api.LiveChatMessage response) { |
| 9521 checkLiveChatMessage(response); | 9730 checkLiveChatMessage(response); |
| 9522 }))); | 9731 }))); |
| 9523 }); | 9732 }); |
| 9524 | 9733 |
| 9525 unittest.test("method--list", () { | 9734 unittest.test("method--list", () { |
| 9526 | |
| 9527 var mock = new HttpServerMock(); | 9735 var mock = new HttpServerMock(); |
| 9528 api.LiveChatMessagesResourceApi res = new api.YoutubeApi(mock).liveChatMes
sages; | 9736 api.LiveChatMessagesResourceApi res = |
| 9737 new api.YoutubeApi(mock).liveChatMessages; |
| 9529 var arg_liveChatId = "foo"; | 9738 var arg_liveChatId = "foo"; |
| 9530 var arg_part = "foo"; | 9739 var arg_part = "foo"; |
| 9531 var arg_hl = "foo"; | 9740 var arg_hl = "foo"; |
| 9532 var arg_maxResults = 42; | 9741 var arg_maxResults = 42; |
| 9533 var arg_pageToken = "foo"; | 9742 var arg_pageToken = "foo"; |
| 9534 var arg_profileImageSize = 42; | 9743 var arg_profileImageSize = 42; |
| 9535 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 9744 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 9536 var path = (req.url).path; | 9745 var path = (req.url).path; |
| 9537 var pathOffset = 0; | 9746 var pathOffset = 0; |
| 9538 var index; | 9747 var index; |
| 9539 var subPart; | 9748 var subPart; |
| 9540 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 9749 unittest.expect( |
| 9750 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 9541 pathOffset += 1; | 9751 pathOffset += 1; |
| 9542 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("youtube/v3/")); | 9752 unittest.expect(path.substring(pathOffset, pathOffset + 11), |
| 9753 unittest.equals("youtube/v3/")); |
| 9543 pathOffset += 11; | 9754 pathOffset += 11; |
| 9544 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("liveChat/messages")); | 9755 unittest.expect(path.substring(pathOffset, pathOffset + 17), |
| 9756 unittest.equals("liveChat/messages")); |
| 9545 pathOffset += 17; | 9757 pathOffset += 17; |
| 9546 | 9758 |
| 9547 var query = (req.url).query; | 9759 var query = (req.url).query; |
| 9548 var queryOffset = 0; | 9760 var queryOffset = 0; |
| 9549 var queryMap = {}; | 9761 var queryMap = {}; |
| 9550 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 9762 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 9551 parseBool(n) { | 9763 parseBool(n) { |
| 9552 if (n == "true") return true; | 9764 if (n == "true") return true; |
| 9553 if (n == "false") return false; | 9765 if (n == "false") return false; |
| 9554 if (n == null) return null; | 9766 if (n == null) return null; |
| 9555 throw new core.ArgumentError("Invalid boolean: $n"); | 9767 throw new core.ArgumentError("Invalid boolean: $n"); |
| 9556 } | 9768 } |
| 9769 |
| 9557 if (query.length > 0) { | 9770 if (query.length > 0) { |
| 9558 for (var part in query.split("&")) { | 9771 for (var part in query.split("&")) { |
| 9559 var keyvalue = part.split("="); | 9772 var keyvalue = part.split("="); |
| 9560 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 9773 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 9774 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 9561 } | 9775 } |
| 9562 } | 9776 } |
| 9563 unittest.expect(queryMap["liveChatId"].first, unittest.equals(arg_liveCh
atId)); | 9777 unittest.expect( |
| 9778 queryMap["liveChatId"].first, unittest.equals(arg_liveChatId)); |
| 9564 unittest.expect(queryMap["part"].first, unittest.equals(arg_part)); | 9779 unittest.expect(queryMap["part"].first, unittest.equals(arg_part)); |
| 9565 unittest.expect(queryMap["hl"].first, unittest.equals(arg_hl)); | 9780 unittest.expect(queryMap["hl"].first, unittest.equals(arg_hl)); |
| 9566 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | 9781 unittest.expect(core.int.parse(queryMap["maxResults"].first), |
| 9567 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 9782 unittest.equals(arg_maxResults)); |
| 9568 unittest.expect(core.int.parse(queryMap["profileImageSize"].first), unit
test.equals(arg_profileImageSize)); | 9783 unittest.expect( |
| 9569 | 9784 queryMap["pageToken"].first, unittest.equals(arg_pageToken)); |
| 9785 unittest.expect(core.int.parse(queryMap["profileImageSize"].first), |
| 9786 unittest.equals(arg_profileImageSize)); |
| 9570 | 9787 |
| 9571 var h = { | 9788 var h = { |
| 9572 "content-type" : "application/json; charset=utf-8", | 9789 "content-type": "application/json; charset=utf-8", |
| 9573 }; | 9790 }; |
| 9574 var resp = convert.JSON.encode(buildLiveChatMessageListResponse()); | 9791 var resp = convert.JSON.encode(buildLiveChatMessageListResponse()); |
| 9575 return new async.Future.value(stringResponse(200, h, resp)); | 9792 return new async.Future.value(stringResponse(200, h, resp)); |
| 9576 }), true); | 9793 }), true); |
| 9577 res.list(arg_liveChatId, arg_part, hl: arg_hl, maxResults: arg_maxResults,
pageToken: arg_pageToken, profileImageSize: arg_profileImageSize).then(unittest
.expectAsync1(((api.LiveChatMessageListResponse response) { | 9794 res |
| 9795 .list(arg_liveChatId, arg_part, |
| 9796 hl: arg_hl, |
| 9797 maxResults: arg_maxResults, |
| 9798 pageToken: arg_pageToken, |
| 9799 profileImageSize: arg_profileImageSize) |
| 9800 .then(unittest |
| 9801 .expectAsync1(((api.LiveChatMessageListResponse response) { |
| 9578 checkLiveChatMessageListResponse(response); | 9802 checkLiveChatMessageListResponse(response); |
| 9579 }))); | 9803 }))); |
| 9580 }); | 9804 }); |
| 9581 | |
| 9582 }); | 9805 }); |
| 9583 | 9806 |
| 9584 | |
| 9585 unittest.group("resource-LiveChatModeratorsResourceApi", () { | 9807 unittest.group("resource-LiveChatModeratorsResourceApi", () { |
| 9586 unittest.test("method--delete", () { | 9808 unittest.test("method--delete", () { |
| 9587 | |
| 9588 var mock = new HttpServerMock(); | 9809 var mock = new HttpServerMock(); |
| 9589 api.LiveChatModeratorsResourceApi res = new api.YoutubeApi(mock).liveChatM
oderators; | 9810 api.LiveChatModeratorsResourceApi res = |
| 9811 new api.YoutubeApi(mock).liveChatModerators; |
| 9590 var arg_id = "foo"; | 9812 var arg_id = "foo"; |
| 9591 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 9813 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 9592 var path = (req.url).path; | 9814 var path = (req.url).path; |
| 9593 var pathOffset = 0; | 9815 var pathOffset = 0; |
| 9594 var index; | 9816 var index; |
| 9595 var subPart; | 9817 var subPart; |
| 9596 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 9818 unittest.expect( |
| 9819 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 9597 pathOffset += 1; | 9820 pathOffset += 1; |
| 9598 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("youtube/v3/")); | 9821 unittest.expect(path.substring(pathOffset, pathOffset + 11), |
| 9822 unittest.equals("youtube/v3/")); |
| 9599 pathOffset += 11; | 9823 pathOffset += 11; |
| 9600 unittest.expect(path.substring(pathOffset, pathOffset + 19), unittest.eq
uals("liveChat/moderators")); | 9824 unittest.expect(path.substring(pathOffset, pathOffset + 19), |
| 9825 unittest.equals("liveChat/moderators")); |
| 9601 pathOffset += 19; | 9826 pathOffset += 19; |
| 9602 | 9827 |
| 9603 var query = (req.url).query; | 9828 var query = (req.url).query; |
| 9604 var queryOffset = 0; | 9829 var queryOffset = 0; |
| 9605 var queryMap = {}; | 9830 var queryMap = {}; |
| 9606 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 9831 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 9607 parseBool(n) { | 9832 parseBool(n) { |
| 9608 if (n == "true") return true; | 9833 if (n == "true") return true; |
| 9609 if (n == "false") return false; | 9834 if (n == "false") return false; |
| 9610 if (n == null) return null; | 9835 if (n == null) return null; |
| 9611 throw new core.ArgumentError("Invalid boolean: $n"); | 9836 throw new core.ArgumentError("Invalid boolean: $n"); |
| 9612 } | 9837 } |
| 9838 |
| 9613 if (query.length > 0) { | 9839 if (query.length > 0) { |
| 9614 for (var part in query.split("&")) { | 9840 for (var part in query.split("&")) { |
| 9615 var keyvalue = part.split("="); | 9841 var keyvalue = part.split("="); |
| 9616 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 9842 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 9843 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 9617 } | 9844 } |
| 9618 } | 9845 } |
| 9619 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); | 9846 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); |
| 9620 | 9847 |
| 9621 | |
| 9622 var h = { | 9848 var h = { |
| 9623 "content-type" : "application/json; charset=utf-8", | 9849 "content-type": "application/json; charset=utf-8", |
| 9624 }; | 9850 }; |
| 9625 var resp = ""; | 9851 var resp = ""; |
| 9626 return new async.Future.value(stringResponse(200, h, resp)); | 9852 return new async.Future.value(stringResponse(200, h, resp)); |
| 9627 }), true); | 9853 }), true); |
| 9628 res.delete(arg_id).then(unittest.expectAsync1((_) {})); | 9854 res.delete(arg_id).then(unittest.expectAsync1((_) {})); |
| 9629 }); | 9855 }); |
| 9630 | 9856 |
| 9631 unittest.test("method--insert", () { | 9857 unittest.test("method--insert", () { |
| 9632 | |
| 9633 var mock = new HttpServerMock(); | 9858 var mock = new HttpServerMock(); |
| 9634 api.LiveChatModeratorsResourceApi res = new api.YoutubeApi(mock).liveChatM
oderators; | 9859 api.LiveChatModeratorsResourceApi res = |
| 9860 new api.YoutubeApi(mock).liveChatModerators; |
| 9635 var arg_request = buildLiveChatModerator(); | 9861 var arg_request = buildLiveChatModerator(); |
| 9636 var arg_part = "foo"; | 9862 var arg_part = "foo"; |
| 9637 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 9863 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 9638 var obj = new api.LiveChatModerator.fromJson(json); | 9864 var obj = new api.LiveChatModerator.fromJson(json); |
| 9639 checkLiveChatModerator(obj); | 9865 checkLiveChatModerator(obj); |
| 9640 | 9866 |
| 9641 var path = (req.url).path; | 9867 var path = (req.url).path; |
| 9642 var pathOffset = 0; | 9868 var pathOffset = 0; |
| 9643 var index; | 9869 var index; |
| 9644 var subPart; | 9870 var subPart; |
| 9645 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 9871 unittest.expect( |
| 9872 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 9646 pathOffset += 1; | 9873 pathOffset += 1; |
| 9647 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("youtube/v3/")); | 9874 unittest.expect(path.substring(pathOffset, pathOffset + 11), |
| 9875 unittest.equals("youtube/v3/")); |
| 9648 pathOffset += 11; | 9876 pathOffset += 11; |
| 9649 unittest.expect(path.substring(pathOffset, pathOffset + 19), unittest.eq
uals("liveChat/moderators")); | 9877 unittest.expect(path.substring(pathOffset, pathOffset + 19), |
| 9878 unittest.equals("liveChat/moderators")); |
| 9650 pathOffset += 19; | 9879 pathOffset += 19; |
| 9651 | 9880 |
| 9652 var query = (req.url).query; | 9881 var query = (req.url).query; |
| 9653 var queryOffset = 0; | 9882 var queryOffset = 0; |
| 9654 var queryMap = {}; | 9883 var queryMap = {}; |
| 9655 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 9884 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 9656 parseBool(n) { | 9885 parseBool(n) { |
| 9657 if (n == "true") return true; | 9886 if (n == "true") return true; |
| 9658 if (n == "false") return false; | 9887 if (n == "false") return false; |
| 9659 if (n == null) return null; | 9888 if (n == null) return null; |
| 9660 throw new core.ArgumentError("Invalid boolean: $n"); | 9889 throw new core.ArgumentError("Invalid boolean: $n"); |
| 9661 } | 9890 } |
| 9891 |
| 9662 if (query.length > 0) { | 9892 if (query.length > 0) { |
| 9663 for (var part in query.split("&")) { | 9893 for (var part in query.split("&")) { |
| 9664 var keyvalue = part.split("="); | 9894 var keyvalue = part.split("="); |
| 9665 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 9895 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 9896 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 9666 } | 9897 } |
| 9667 } | 9898 } |
| 9668 unittest.expect(queryMap["part"].first, unittest.equals(arg_part)); | 9899 unittest.expect(queryMap["part"].first, unittest.equals(arg_part)); |
| 9669 | 9900 |
| 9670 | |
| 9671 var h = { | 9901 var h = { |
| 9672 "content-type" : "application/json; charset=utf-8", | 9902 "content-type": "application/json; charset=utf-8", |
| 9673 }; | 9903 }; |
| 9674 var resp = convert.JSON.encode(buildLiveChatModerator()); | 9904 var resp = convert.JSON.encode(buildLiveChatModerator()); |
| 9675 return new async.Future.value(stringResponse(200, h, resp)); | 9905 return new async.Future.value(stringResponse(200, h, resp)); |
| 9676 }), true); | 9906 }), true); |
| 9677 res.insert(arg_request, arg_part).then(unittest.expectAsync1(((api.LiveCha
tModerator response) { | 9907 res |
| 9908 .insert(arg_request, arg_part) |
| 9909 .then(unittest.expectAsync1(((api.LiveChatModerator response) { |
| 9678 checkLiveChatModerator(response); | 9910 checkLiveChatModerator(response); |
| 9679 }))); | 9911 }))); |
| 9680 }); | 9912 }); |
| 9681 | 9913 |
| 9682 unittest.test("method--list", () { | 9914 unittest.test("method--list", () { |
| 9683 | |
| 9684 var mock = new HttpServerMock(); | 9915 var mock = new HttpServerMock(); |
| 9685 api.LiveChatModeratorsResourceApi res = new api.YoutubeApi(mock).liveChatM
oderators; | 9916 api.LiveChatModeratorsResourceApi res = |
| 9917 new api.YoutubeApi(mock).liveChatModerators; |
| 9686 var arg_liveChatId = "foo"; | 9918 var arg_liveChatId = "foo"; |
| 9687 var arg_part = "foo"; | 9919 var arg_part = "foo"; |
| 9688 var arg_maxResults = 42; | 9920 var arg_maxResults = 42; |
| 9689 var arg_pageToken = "foo"; | 9921 var arg_pageToken = "foo"; |
| 9690 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 9922 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 9691 var path = (req.url).path; | 9923 var path = (req.url).path; |
| 9692 var pathOffset = 0; | 9924 var pathOffset = 0; |
| 9693 var index; | 9925 var index; |
| 9694 var subPart; | 9926 var subPart; |
| 9695 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 9927 unittest.expect( |
| 9928 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 9696 pathOffset += 1; | 9929 pathOffset += 1; |
| 9697 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("youtube/v3/")); | 9930 unittest.expect(path.substring(pathOffset, pathOffset + 11), |
| 9931 unittest.equals("youtube/v3/")); |
| 9698 pathOffset += 11; | 9932 pathOffset += 11; |
| 9699 unittest.expect(path.substring(pathOffset, pathOffset + 19), unittest.eq
uals("liveChat/moderators")); | 9933 unittest.expect(path.substring(pathOffset, pathOffset + 19), |
| 9934 unittest.equals("liveChat/moderators")); |
| 9700 pathOffset += 19; | 9935 pathOffset += 19; |
| 9701 | 9936 |
| 9702 var query = (req.url).query; | 9937 var query = (req.url).query; |
| 9703 var queryOffset = 0; | 9938 var queryOffset = 0; |
| 9704 var queryMap = {}; | 9939 var queryMap = {}; |
| 9705 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 9940 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 9706 parseBool(n) { | 9941 parseBool(n) { |
| 9707 if (n == "true") return true; | 9942 if (n == "true") return true; |
| 9708 if (n == "false") return false; | 9943 if (n == "false") return false; |
| 9709 if (n == null) return null; | 9944 if (n == null) return null; |
| 9710 throw new core.ArgumentError("Invalid boolean: $n"); | 9945 throw new core.ArgumentError("Invalid boolean: $n"); |
| 9711 } | 9946 } |
| 9947 |
| 9712 if (query.length > 0) { | 9948 if (query.length > 0) { |
| 9713 for (var part in query.split("&")) { | 9949 for (var part in query.split("&")) { |
| 9714 var keyvalue = part.split("="); | 9950 var keyvalue = part.split("="); |
| 9715 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 9951 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 9952 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 9716 } | 9953 } |
| 9717 } | 9954 } |
| 9718 unittest.expect(queryMap["liveChatId"].first, unittest.equals(arg_liveCh
atId)); | 9955 unittest.expect( |
| 9956 queryMap["liveChatId"].first, unittest.equals(arg_liveChatId)); |
| 9719 unittest.expect(queryMap["part"].first, unittest.equals(arg_part)); | 9957 unittest.expect(queryMap["part"].first, unittest.equals(arg_part)); |
| 9720 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | 9958 unittest.expect(core.int.parse(queryMap["maxResults"].first), |
| 9721 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 9959 unittest.equals(arg_maxResults)); |
| 9722 | 9960 unittest.expect( |
| 9961 queryMap["pageToken"].first, unittest.equals(arg_pageToken)); |
| 9723 | 9962 |
| 9724 var h = { | 9963 var h = { |
| 9725 "content-type" : "application/json; charset=utf-8", | 9964 "content-type": "application/json; charset=utf-8", |
| 9726 }; | 9965 }; |
| 9727 var resp = convert.JSON.encode(buildLiveChatModeratorListResponse()); | 9966 var resp = convert.JSON.encode(buildLiveChatModeratorListResponse()); |
| 9728 return new async.Future.value(stringResponse(200, h, resp)); | 9967 return new async.Future.value(stringResponse(200, h, resp)); |
| 9729 }), true); | 9968 }), true); |
| 9730 res.list(arg_liveChatId, arg_part, maxResults: arg_maxResults, pageToken:
arg_pageToken).then(unittest.expectAsync1(((api.LiveChatModeratorListResponse re
sponse) { | 9969 res |
| 9970 .list(arg_liveChatId, arg_part, |
| 9971 maxResults: arg_maxResults, pageToken: arg_pageToken) |
| 9972 .then(unittest |
| 9973 .expectAsync1(((api.LiveChatModeratorListResponse response) { |
| 9731 checkLiveChatModeratorListResponse(response); | 9974 checkLiveChatModeratorListResponse(response); |
| 9732 }))); | 9975 }))); |
| 9733 }); | 9976 }); |
| 9734 | |
| 9735 }); | 9977 }); |
| 9736 | 9978 |
| 9737 | |
| 9738 unittest.group("resource-LiveStreamsResourceApi", () { | 9979 unittest.group("resource-LiveStreamsResourceApi", () { |
| 9739 unittest.test("method--delete", () { | 9980 unittest.test("method--delete", () { |
| 9740 | |
| 9741 var mock = new HttpServerMock(); | 9981 var mock = new HttpServerMock(); |
| 9742 api.LiveStreamsResourceApi res = new api.YoutubeApi(mock).liveStreams; | 9982 api.LiveStreamsResourceApi res = new api.YoutubeApi(mock).liveStreams; |
| 9743 var arg_id = "foo"; | 9983 var arg_id = "foo"; |
| 9744 var arg_onBehalfOfContentOwner = "foo"; | 9984 var arg_onBehalfOfContentOwner = "foo"; |
| 9745 var arg_onBehalfOfContentOwnerChannel = "foo"; | 9985 var arg_onBehalfOfContentOwnerChannel = "foo"; |
| 9746 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 9986 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 9747 var path = (req.url).path; | 9987 var path = (req.url).path; |
| 9748 var pathOffset = 0; | 9988 var pathOffset = 0; |
| 9749 var index; | 9989 var index; |
| 9750 var subPart; | 9990 var subPart; |
| 9751 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 9991 unittest.expect( |
| 9992 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 9752 pathOffset += 1; | 9993 pathOffset += 1; |
| 9753 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("youtube/v3/")); | 9994 unittest.expect(path.substring(pathOffset, pathOffset + 11), |
| 9995 unittest.equals("youtube/v3/")); |
| 9754 pathOffset += 11; | 9996 pathOffset += 11; |
| 9755 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("liveStreams")); | 9997 unittest.expect(path.substring(pathOffset, pathOffset + 11), |
| 9998 unittest.equals("liveStreams")); |
| 9756 pathOffset += 11; | 9999 pathOffset += 11; |
| 9757 | 10000 |
| 9758 var query = (req.url).query; | 10001 var query = (req.url).query; |
| 9759 var queryOffset = 0; | 10002 var queryOffset = 0; |
| 9760 var queryMap = {}; | 10003 var queryMap = {}; |
| 9761 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 10004 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 9762 parseBool(n) { | 10005 parseBool(n) { |
| 9763 if (n == "true") return true; | 10006 if (n == "true") return true; |
| 9764 if (n == "false") return false; | 10007 if (n == "false") return false; |
| 9765 if (n == null) return null; | 10008 if (n == null) return null; |
| 9766 throw new core.ArgumentError("Invalid boolean: $n"); | 10009 throw new core.ArgumentError("Invalid boolean: $n"); |
| 9767 } | 10010 } |
| 10011 |
| 9768 if (query.length > 0) { | 10012 if (query.length > 0) { |
| 9769 for (var part in query.split("&")) { | 10013 for (var part in query.split("&")) { |
| 9770 var keyvalue = part.split("="); | 10014 var keyvalue = part.split("="); |
| 9771 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 10015 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 10016 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 9772 } | 10017 } |
| 9773 } | 10018 } |
| 9774 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); | 10019 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); |
| 9775 unittest.expect(queryMap["onBehalfOfContentOwner"].first, unittest.equal
s(arg_onBehalfOfContentOwner)); | 10020 unittest.expect(queryMap["onBehalfOfContentOwner"].first, |
| 9776 unittest.expect(queryMap["onBehalfOfContentOwnerChannel"].first, unittes
t.equals(arg_onBehalfOfContentOwnerChannel)); | 10021 unittest.equals(arg_onBehalfOfContentOwner)); |
| 9777 | 10022 unittest.expect(queryMap["onBehalfOfContentOwnerChannel"].first, |
| 10023 unittest.equals(arg_onBehalfOfContentOwnerChannel)); |
| 9778 | 10024 |
| 9779 var h = { | 10025 var h = { |
| 9780 "content-type" : "application/json; charset=utf-8", | 10026 "content-type": "application/json; charset=utf-8", |
| 9781 }; | 10027 }; |
| 9782 var resp = ""; | 10028 var resp = ""; |
| 9783 return new async.Future.value(stringResponse(200, h, resp)); | 10029 return new async.Future.value(stringResponse(200, h, resp)); |
| 9784 }), true); | 10030 }), true); |
| 9785 res.delete(arg_id, onBehalfOfContentOwner: arg_onBehalfOfContentOwner, onB
ehalfOfContentOwnerChannel: arg_onBehalfOfContentOwnerChannel).then(unittest.exp
ectAsync1((_) {})); | 10031 res |
| 10032 .delete(arg_id, |
| 10033 onBehalfOfContentOwner: arg_onBehalfOfContentOwner, |
| 10034 onBehalfOfContentOwnerChannel: arg_onBehalfOfContentOwnerChannel) |
| 10035 .then(unittest.expectAsync1((_) {})); |
| 9786 }); | 10036 }); |
| 9787 | 10037 |
| 9788 unittest.test("method--insert", () { | 10038 unittest.test("method--insert", () { |
| 9789 | |
| 9790 var mock = new HttpServerMock(); | 10039 var mock = new HttpServerMock(); |
| 9791 api.LiveStreamsResourceApi res = new api.YoutubeApi(mock).liveStreams; | 10040 api.LiveStreamsResourceApi res = new api.YoutubeApi(mock).liveStreams; |
| 9792 var arg_request = buildLiveStream(); | 10041 var arg_request = buildLiveStream(); |
| 9793 var arg_part = "foo"; | 10042 var arg_part = "foo"; |
| 9794 var arg_onBehalfOfContentOwner = "foo"; | 10043 var arg_onBehalfOfContentOwner = "foo"; |
| 9795 var arg_onBehalfOfContentOwnerChannel = "foo"; | 10044 var arg_onBehalfOfContentOwnerChannel = "foo"; |
| 9796 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 10045 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 9797 var obj = new api.LiveStream.fromJson(json); | 10046 var obj = new api.LiveStream.fromJson(json); |
| 9798 checkLiveStream(obj); | 10047 checkLiveStream(obj); |
| 9799 | 10048 |
| 9800 var path = (req.url).path; | 10049 var path = (req.url).path; |
| 9801 var pathOffset = 0; | 10050 var pathOffset = 0; |
| 9802 var index; | 10051 var index; |
| 9803 var subPart; | 10052 var subPart; |
| 9804 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 10053 unittest.expect( |
| 10054 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 9805 pathOffset += 1; | 10055 pathOffset += 1; |
| 9806 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("youtube/v3/")); | 10056 unittest.expect(path.substring(pathOffset, pathOffset + 11), |
| 10057 unittest.equals("youtube/v3/")); |
| 9807 pathOffset += 11; | 10058 pathOffset += 11; |
| 9808 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("liveStreams")); | 10059 unittest.expect(path.substring(pathOffset, pathOffset + 11), |
| 10060 unittest.equals("liveStreams")); |
| 9809 pathOffset += 11; | 10061 pathOffset += 11; |
| 9810 | 10062 |
| 9811 var query = (req.url).query; | 10063 var query = (req.url).query; |
| 9812 var queryOffset = 0; | 10064 var queryOffset = 0; |
| 9813 var queryMap = {}; | 10065 var queryMap = {}; |
| 9814 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 10066 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 9815 parseBool(n) { | 10067 parseBool(n) { |
| 9816 if (n == "true") return true; | 10068 if (n == "true") return true; |
| 9817 if (n == "false") return false; | 10069 if (n == "false") return false; |
| 9818 if (n == null) return null; | 10070 if (n == null) return null; |
| 9819 throw new core.ArgumentError("Invalid boolean: $n"); | 10071 throw new core.ArgumentError("Invalid boolean: $n"); |
| 9820 } | 10072 } |
| 10073 |
| 9821 if (query.length > 0) { | 10074 if (query.length > 0) { |
| 9822 for (var part in query.split("&")) { | 10075 for (var part in query.split("&")) { |
| 9823 var keyvalue = part.split("="); | 10076 var keyvalue = part.split("="); |
| 9824 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 10077 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 10078 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 9825 } | 10079 } |
| 9826 } | 10080 } |
| 9827 unittest.expect(queryMap["part"].first, unittest.equals(arg_part)); | 10081 unittest.expect(queryMap["part"].first, unittest.equals(arg_part)); |
| 9828 unittest.expect(queryMap["onBehalfOfContentOwner"].first, unittest.equal
s(arg_onBehalfOfContentOwner)); | 10082 unittest.expect(queryMap["onBehalfOfContentOwner"].first, |
| 9829 unittest.expect(queryMap["onBehalfOfContentOwnerChannel"].first, unittes
t.equals(arg_onBehalfOfContentOwnerChannel)); | 10083 unittest.equals(arg_onBehalfOfContentOwner)); |
| 9830 | 10084 unittest.expect(queryMap["onBehalfOfContentOwnerChannel"].first, |
| 10085 unittest.equals(arg_onBehalfOfContentOwnerChannel)); |
| 9831 | 10086 |
| 9832 var h = { | 10087 var h = { |
| 9833 "content-type" : "application/json; charset=utf-8", | 10088 "content-type": "application/json; charset=utf-8", |
| 9834 }; | 10089 }; |
| 9835 var resp = convert.JSON.encode(buildLiveStream()); | 10090 var resp = convert.JSON.encode(buildLiveStream()); |
| 9836 return new async.Future.value(stringResponse(200, h, resp)); | 10091 return new async.Future.value(stringResponse(200, h, resp)); |
| 9837 }), true); | 10092 }), true); |
| 9838 res.insert(arg_request, arg_part, onBehalfOfContentOwner: arg_onBehalfOfCo
ntentOwner, onBehalfOfContentOwnerChannel: arg_onBehalfOfContentOwnerChannel).th
en(unittest.expectAsync1(((api.LiveStream response) { | 10093 res |
| 10094 .insert(arg_request, arg_part, |
| 10095 onBehalfOfContentOwner: arg_onBehalfOfContentOwner, |
| 10096 onBehalfOfContentOwnerChannel: arg_onBehalfOfContentOwnerChannel) |
| 10097 .then(unittest.expectAsync1(((api.LiveStream response) { |
| 9839 checkLiveStream(response); | 10098 checkLiveStream(response); |
| 9840 }))); | 10099 }))); |
| 9841 }); | 10100 }); |
| 9842 | 10101 |
| 9843 unittest.test("method--list", () { | 10102 unittest.test("method--list", () { |
| 9844 | |
| 9845 var mock = new HttpServerMock(); | 10103 var mock = new HttpServerMock(); |
| 9846 api.LiveStreamsResourceApi res = new api.YoutubeApi(mock).liveStreams; | 10104 api.LiveStreamsResourceApi res = new api.YoutubeApi(mock).liveStreams; |
| 9847 var arg_part = "foo"; | 10105 var arg_part = "foo"; |
| 9848 var arg_id = "foo"; | 10106 var arg_id = "foo"; |
| 9849 var arg_maxResults = 42; | 10107 var arg_maxResults = 42; |
| 9850 var arg_mine = true; | 10108 var arg_mine = true; |
| 9851 var arg_onBehalfOfContentOwner = "foo"; | 10109 var arg_onBehalfOfContentOwner = "foo"; |
| 9852 var arg_onBehalfOfContentOwnerChannel = "foo"; | 10110 var arg_onBehalfOfContentOwnerChannel = "foo"; |
| 9853 var arg_pageToken = "foo"; | 10111 var arg_pageToken = "foo"; |
| 9854 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 10112 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 9855 var path = (req.url).path; | 10113 var path = (req.url).path; |
| 9856 var pathOffset = 0; | 10114 var pathOffset = 0; |
| 9857 var index; | 10115 var index; |
| 9858 var subPart; | 10116 var subPart; |
| 9859 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 10117 unittest.expect( |
| 10118 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 9860 pathOffset += 1; | 10119 pathOffset += 1; |
| 9861 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("youtube/v3/")); | 10120 unittest.expect(path.substring(pathOffset, pathOffset + 11), |
| 10121 unittest.equals("youtube/v3/")); |
| 9862 pathOffset += 11; | 10122 pathOffset += 11; |
| 9863 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("liveStreams")); | 10123 unittest.expect(path.substring(pathOffset, pathOffset + 11), |
| 10124 unittest.equals("liveStreams")); |
| 9864 pathOffset += 11; | 10125 pathOffset += 11; |
| 9865 | 10126 |
| 9866 var query = (req.url).query; | 10127 var query = (req.url).query; |
| 9867 var queryOffset = 0; | 10128 var queryOffset = 0; |
| 9868 var queryMap = {}; | 10129 var queryMap = {}; |
| 9869 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 10130 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 9870 parseBool(n) { | 10131 parseBool(n) { |
| 9871 if (n == "true") return true; | 10132 if (n == "true") return true; |
| 9872 if (n == "false") return false; | 10133 if (n == "false") return false; |
| 9873 if (n == null) return null; | 10134 if (n == null) return null; |
| 9874 throw new core.ArgumentError("Invalid boolean: $n"); | 10135 throw new core.ArgumentError("Invalid boolean: $n"); |
| 9875 } | 10136 } |
| 10137 |
| 9876 if (query.length > 0) { | 10138 if (query.length > 0) { |
| 9877 for (var part in query.split("&")) { | 10139 for (var part in query.split("&")) { |
| 9878 var keyvalue = part.split("="); | 10140 var keyvalue = part.split("="); |
| 9879 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 10141 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 10142 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 9880 } | 10143 } |
| 9881 } | 10144 } |
| 9882 unittest.expect(queryMap["part"].first, unittest.equals(arg_part)); | 10145 unittest.expect(queryMap["part"].first, unittest.equals(arg_part)); |
| 9883 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); | 10146 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); |
| 9884 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | 10147 unittest.expect(core.int.parse(queryMap["maxResults"].first), |
| 10148 unittest.equals(arg_maxResults)); |
| 9885 unittest.expect(queryMap["mine"].first, unittest.equals("$arg_mine")); | 10149 unittest.expect(queryMap["mine"].first, unittest.equals("$arg_mine")); |
| 9886 unittest.expect(queryMap["onBehalfOfContentOwner"].first, unittest.equal
s(arg_onBehalfOfContentOwner)); | 10150 unittest.expect(queryMap["onBehalfOfContentOwner"].first, |
| 9887 unittest.expect(queryMap["onBehalfOfContentOwnerChannel"].first, unittes
t.equals(arg_onBehalfOfContentOwnerChannel)); | 10151 unittest.equals(arg_onBehalfOfContentOwner)); |
| 9888 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 10152 unittest.expect(queryMap["onBehalfOfContentOwnerChannel"].first, |
| 9889 | 10153 unittest.equals(arg_onBehalfOfContentOwnerChannel)); |
| 10154 unittest.expect( |
| 10155 queryMap["pageToken"].first, unittest.equals(arg_pageToken)); |
| 9890 | 10156 |
| 9891 var h = { | 10157 var h = { |
| 9892 "content-type" : "application/json; charset=utf-8", | 10158 "content-type": "application/json; charset=utf-8", |
| 9893 }; | 10159 }; |
| 9894 var resp = convert.JSON.encode(buildLiveStreamListResponse()); | 10160 var resp = convert.JSON.encode(buildLiveStreamListResponse()); |
| 9895 return new async.Future.value(stringResponse(200, h, resp)); | 10161 return new async.Future.value(stringResponse(200, h, resp)); |
| 9896 }), true); | 10162 }), true); |
| 9897 res.list(arg_part, id: arg_id, maxResults: arg_maxResults, mine: arg_mine,
onBehalfOfContentOwner: arg_onBehalfOfContentOwner, onBehalfOfContentOwnerChann
el: arg_onBehalfOfContentOwnerChannel, pageToken: arg_pageToken).then(unittest.e
xpectAsync1(((api.LiveStreamListResponse response) { | 10163 res |
| 10164 .list(arg_part, |
| 10165 id: arg_id, |
| 10166 maxResults: arg_maxResults, |
| 10167 mine: arg_mine, |
| 10168 onBehalfOfContentOwner: arg_onBehalfOfContentOwner, |
| 10169 onBehalfOfContentOwnerChannel: arg_onBehalfOfContentOwnerChannel, |
| 10170 pageToken: arg_pageToken) |
| 10171 .then(unittest.expectAsync1(((api.LiveStreamListResponse response) { |
| 9898 checkLiveStreamListResponse(response); | 10172 checkLiveStreamListResponse(response); |
| 9899 }))); | 10173 }))); |
| 9900 }); | 10174 }); |
| 9901 | 10175 |
| 9902 unittest.test("method--update", () { | 10176 unittest.test("method--update", () { |
| 9903 | |
| 9904 var mock = new HttpServerMock(); | 10177 var mock = new HttpServerMock(); |
| 9905 api.LiveStreamsResourceApi res = new api.YoutubeApi(mock).liveStreams; | 10178 api.LiveStreamsResourceApi res = new api.YoutubeApi(mock).liveStreams; |
| 9906 var arg_request = buildLiveStream(); | 10179 var arg_request = buildLiveStream(); |
| 9907 var arg_part = "foo"; | 10180 var arg_part = "foo"; |
| 9908 var arg_onBehalfOfContentOwner = "foo"; | 10181 var arg_onBehalfOfContentOwner = "foo"; |
| 9909 var arg_onBehalfOfContentOwnerChannel = "foo"; | 10182 var arg_onBehalfOfContentOwnerChannel = "foo"; |
| 9910 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 10183 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 9911 var obj = new api.LiveStream.fromJson(json); | 10184 var obj = new api.LiveStream.fromJson(json); |
| 9912 checkLiveStream(obj); | 10185 checkLiveStream(obj); |
| 9913 | 10186 |
| 9914 var path = (req.url).path; | 10187 var path = (req.url).path; |
| 9915 var pathOffset = 0; | 10188 var pathOffset = 0; |
| 9916 var index; | 10189 var index; |
| 9917 var subPart; | 10190 var subPart; |
| 9918 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 10191 unittest.expect( |
| 10192 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 9919 pathOffset += 1; | 10193 pathOffset += 1; |
| 9920 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("youtube/v3/")); | 10194 unittest.expect(path.substring(pathOffset, pathOffset + 11), |
| 10195 unittest.equals("youtube/v3/")); |
| 9921 pathOffset += 11; | 10196 pathOffset += 11; |
| 9922 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("liveStreams")); | 10197 unittest.expect(path.substring(pathOffset, pathOffset + 11), |
| 10198 unittest.equals("liveStreams")); |
| 9923 pathOffset += 11; | 10199 pathOffset += 11; |
| 9924 | 10200 |
| 9925 var query = (req.url).query; | 10201 var query = (req.url).query; |
| 9926 var queryOffset = 0; | 10202 var queryOffset = 0; |
| 9927 var queryMap = {}; | 10203 var queryMap = {}; |
| 9928 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 10204 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 9929 parseBool(n) { | 10205 parseBool(n) { |
| 9930 if (n == "true") return true; | 10206 if (n == "true") return true; |
| 9931 if (n == "false") return false; | 10207 if (n == "false") return false; |
| 9932 if (n == null) return null; | 10208 if (n == null) return null; |
| 9933 throw new core.ArgumentError("Invalid boolean: $n"); | 10209 throw new core.ArgumentError("Invalid boolean: $n"); |
| 9934 } | 10210 } |
| 10211 |
| 9935 if (query.length > 0) { | 10212 if (query.length > 0) { |
| 9936 for (var part in query.split("&")) { | 10213 for (var part in query.split("&")) { |
| 9937 var keyvalue = part.split("="); | 10214 var keyvalue = part.split("="); |
| 9938 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 10215 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 10216 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 9939 } | 10217 } |
| 9940 } | 10218 } |
| 9941 unittest.expect(queryMap["part"].first, unittest.equals(arg_part)); | 10219 unittest.expect(queryMap["part"].first, unittest.equals(arg_part)); |
| 9942 unittest.expect(queryMap["onBehalfOfContentOwner"].first, unittest.equal
s(arg_onBehalfOfContentOwner)); | 10220 unittest.expect(queryMap["onBehalfOfContentOwner"].first, |
| 9943 unittest.expect(queryMap["onBehalfOfContentOwnerChannel"].first, unittes
t.equals(arg_onBehalfOfContentOwnerChannel)); | 10221 unittest.equals(arg_onBehalfOfContentOwner)); |
| 9944 | 10222 unittest.expect(queryMap["onBehalfOfContentOwnerChannel"].first, |
| 10223 unittest.equals(arg_onBehalfOfContentOwnerChannel)); |
| 9945 | 10224 |
| 9946 var h = { | 10225 var h = { |
| 9947 "content-type" : "application/json; charset=utf-8", | 10226 "content-type": "application/json; charset=utf-8", |
| 9948 }; | 10227 }; |
| 9949 var resp = convert.JSON.encode(buildLiveStream()); | 10228 var resp = convert.JSON.encode(buildLiveStream()); |
| 9950 return new async.Future.value(stringResponse(200, h, resp)); | 10229 return new async.Future.value(stringResponse(200, h, resp)); |
| 9951 }), true); | 10230 }), true); |
| 9952 res.update(arg_request, arg_part, onBehalfOfContentOwner: arg_onBehalfOfCo
ntentOwner, onBehalfOfContentOwnerChannel: arg_onBehalfOfContentOwnerChannel).th
en(unittest.expectAsync1(((api.LiveStream response) { | 10231 res |
| 10232 .update(arg_request, arg_part, |
| 10233 onBehalfOfContentOwner: arg_onBehalfOfContentOwner, |
| 10234 onBehalfOfContentOwnerChannel: arg_onBehalfOfContentOwnerChannel) |
| 10235 .then(unittest.expectAsync1(((api.LiveStream response) { |
| 9953 checkLiveStream(response); | 10236 checkLiveStream(response); |
| 9954 }))); | 10237 }))); |
| 9955 }); | 10238 }); |
| 9956 | |
| 9957 }); | 10239 }); |
| 9958 | 10240 |
| 9959 | |
| 9960 unittest.group("resource-PlaylistItemsResourceApi", () { | 10241 unittest.group("resource-PlaylistItemsResourceApi", () { |
| 9961 unittest.test("method--delete", () { | 10242 unittest.test("method--delete", () { |
| 9962 | |
| 9963 var mock = new HttpServerMock(); | 10243 var mock = new HttpServerMock(); |
| 9964 api.PlaylistItemsResourceApi res = new api.YoutubeApi(mock).playlistItems; | 10244 api.PlaylistItemsResourceApi res = new api.YoutubeApi(mock).playlistItems; |
| 9965 var arg_id = "foo"; | 10245 var arg_id = "foo"; |
| 9966 var arg_onBehalfOfContentOwner = "foo"; | 10246 var arg_onBehalfOfContentOwner = "foo"; |
| 9967 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 10247 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 9968 var path = (req.url).path; | 10248 var path = (req.url).path; |
| 9969 var pathOffset = 0; | 10249 var pathOffset = 0; |
| 9970 var index; | 10250 var index; |
| 9971 var subPart; | 10251 var subPart; |
| 9972 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 10252 unittest.expect( |
| 10253 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 9973 pathOffset += 1; | 10254 pathOffset += 1; |
| 9974 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("youtube/v3/")); | 10255 unittest.expect(path.substring(pathOffset, pathOffset + 11), |
| 10256 unittest.equals("youtube/v3/")); |
| 9975 pathOffset += 11; | 10257 pathOffset += 11; |
| 9976 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("playlistItems")); | 10258 unittest.expect(path.substring(pathOffset, pathOffset + 13), |
| 10259 unittest.equals("playlistItems")); |
| 9977 pathOffset += 13; | 10260 pathOffset += 13; |
| 9978 | 10261 |
| 9979 var query = (req.url).query; | 10262 var query = (req.url).query; |
| 9980 var queryOffset = 0; | 10263 var queryOffset = 0; |
| 9981 var queryMap = {}; | 10264 var queryMap = {}; |
| 9982 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 10265 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 9983 parseBool(n) { | 10266 parseBool(n) { |
| 9984 if (n == "true") return true; | 10267 if (n == "true") return true; |
| 9985 if (n == "false") return false; | 10268 if (n == "false") return false; |
| 9986 if (n == null) return null; | 10269 if (n == null) return null; |
| 9987 throw new core.ArgumentError("Invalid boolean: $n"); | 10270 throw new core.ArgumentError("Invalid boolean: $n"); |
| 9988 } | 10271 } |
| 10272 |
| 9989 if (query.length > 0) { | 10273 if (query.length > 0) { |
| 9990 for (var part in query.split("&")) { | 10274 for (var part in query.split("&")) { |
| 9991 var keyvalue = part.split("="); | 10275 var keyvalue = part.split("="); |
| 9992 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 10276 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 10277 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 9993 } | 10278 } |
| 9994 } | 10279 } |
| 9995 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); | 10280 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); |
| 9996 unittest.expect(queryMap["onBehalfOfContentOwner"].first, unittest.equal
s(arg_onBehalfOfContentOwner)); | 10281 unittest.expect(queryMap["onBehalfOfContentOwner"].first, |
| 9997 | 10282 unittest.equals(arg_onBehalfOfContentOwner)); |
| 9998 | 10283 |
| 9999 var h = { | 10284 var h = { |
| 10000 "content-type" : "application/json; charset=utf-8", | 10285 "content-type": "application/json; charset=utf-8", |
| 10001 }; | 10286 }; |
| 10002 var resp = ""; | 10287 var resp = ""; |
| 10003 return new async.Future.value(stringResponse(200, h, resp)); | 10288 return new async.Future.value(stringResponse(200, h, resp)); |
| 10004 }), true); | 10289 }), true); |
| 10005 res.delete(arg_id, onBehalfOfContentOwner: arg_onBehalfOfContentOwner).the
n(unittest.expectAsync1((_) {})); | 10290 res |
| 10291 .delete(arg_id, onBehalfOfContentOwner: arg_onBehalfOfContentOwner) |
| 10292 .then(unittest.expectAsync1((_) {})); |
| 10006 }); | 10293 }); |
| 10007 | 10294 |
| 10008 unittest.test("method--insert", () { | 10295 unittest.test("method--insert", () { |
| 10009 | |
| 10010 var mock = new HttpServerMock(); | 10296 var mock = new HttpServerMock(); |
| 10011 api.PlaylistItemsResourceApi res = new api.YoutubeApi(mock).playlistItems; | 10297 api.PlaylistItemsResourceApi res = new api.YoutubeApi(mock).playlistItems; |
| 10012 var arg_request = buildPlaylistItem(); | 10298 var arg_request = buildPlaylistItem(); |
| 10013 var arg_part = "foo"; | 10299 var arg_part = "foo"; |
| 10014 var arg_onBehalfOfContentOwner = "foo"; | 10300 var arg_onBehalfOfContentOwner = "foo"; |
| 10015 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 10301 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 10016 var obj = new api.PlaylistItem.fromJson(json); | 10302 var obj = new api.PlaylistItem.fromJson(json); |
| 10017 checkPlaylistItem(obj); | 10303 checkPlaylistItem(obj); |
| 10018 | 10304 |
| 10019 var path = (req.url).path; | 10305 var path = (req.url).path; |
| 10020 var pathOffset = 0; | 10306 var pathOffset = 0; |
| 10021 var index; | 10307 var index; |
| 10022 var subPart; | 10308 var subPart; |
| 10023 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 10309 unittest.expect( |
| 10310 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 10024 pathOffset += 1; | 10311 pathOffset += 1; |
| 10025 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("youtube/v3/")); | 10312 unittest.expect(path.substring(pathOffset, pathOffset + 11), |
| 10313 unittest.equals("youtube/v3/")); |
| 10026 pathOffset += 11; | 10314 pathOffset += 11; |
| 10027 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("playlistItems")); | 10315 unittest.expect(path.substring(pathOffset, pathOffset + 13), |
| 10316 unittest.equals("playlistItems")); |
| 10028 pathOffset += 13; | 10317 pathOffset += 13; |
| 10029 | 10318 |
| 10030 var query = (req.url).query; | 10319 var query = (req.url).query; |
| 10031 var queryOffset = 0; | 10320 var queryOffset = 0; |
| 10032 var queryMap = {}; | 10321 var queryMap = {}; |
| 10033 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 10322 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 10034 parseBool(n) { | 10323 parseBool(n) { |
| 10035 if (n == "true") return true; | 10324 if (n == "true") return true; |
| 10036 if (n == "false") return false; | 10325 if (n == "false") return false; |
| 10037 if (n == null) return null; | 10326 if (n == null) return null; |
| 10038 throw new core.ArgumentError("Invalid boolean: $n"); | 10327 throw new core.ArgumentError("Invalid boolean: $n"); |
| 10039 } | 10328 } |
| 10329 |
| 10040 if (query.length > 0) { | 10330 if (query.length > 0) { |
| 10041 for (var part in query.split("&")) { | 10331 for (var part in query.split("&")) { |
| 10042 var keyvalue = part.split("="); | 10332 var keyvalue = part.split("="); |
| 10043 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 10333 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 10334 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 10044 } | 10335 } |
| 10045 } | 10336 } |
| 10046 unittest.expect(queryMap["part"].first, unittest.equals(arg_part)); | 10337 unittest.expect(queryMap["part"].first, unittest.equals(arg_part)); |
| 10047 unittest.expect(queryMap["onBehalfOfContentOwner"].first, unittest.equal
s(arg_onBehalfOfContentOwner)); | 10338 unittest.expect(queryMap["onBehalfOfContentOwner"].first, |
| 10048 | 10339 unittest.equals(arg_onBehalfOfContentOwner)); |
| 10049 | 10340 |
| 10050 var h = { | 10341 var h = { |
| 10051 "content-type" : "application/json; charset=utf-8", | 10342 "content-type": "application/json; charset=utf-8", |
| 10052 }; | 10343 }; |
| 10053 var resp = convert.JSON.encode(buildPlaylistItem()); | 10344 var resp = convert.JSON.encode(buildPlaylistItem()); |
| 10054 return new async.Future.value(stringResponse(200, h, resp)); | 10345 return new async.Future.value(stringResponse(200, h, resp)); |
| 10055 }), true); | 10346 }), true); |
| 10056 res.insert(arg_request, arg_part, onBehalfOfContentOwner: arg_onBehalfOfCo
ntentOwner).then(unittest.expectAsync1(((api.PlaylistItem response) { | 10347 res |
| 10348 .insert(arg_request, arg_part, |
| 10349 onBehalfOfContentOwner: arg_onBehalfOfContentOwner) |
| 10350 .then(unittest.expectAsync1(((api.PlaylistItem response) { |
| 10057 checkPlaylistItem(response); | 10351 checkPlaylistItem(response); |
| 10058 }))); | 10352 }))); |
| 10059 }); | 10353 }); |
| 10060 | 10354 |
| 10061 unittest.test("method--list", () { | 10355 unittest.test("method--list", () { |
| 10062 | |
| 10063 var mock = new HttpServerMock(); | 10356 var mock = new HttpServerMock(); |
| 10064 api.PlaylistItemsResourceApi res = new api.YoutubeApi(mock).playlistItems; | 10357 api.PlaylistItemsResourceApi res = new api.YoutubeApi(mock).playlistItems; |
| 10065 var arg_part = "foo"; | 10358 var arg_part = "foo"; |
| 10066 var arg_id = "foo"; | 10359 var arg_id = "foo"; |
| 10067 var arg_maxResults = 42; | 10360 var arg_maxResults = 42; |
| 10068 var arg_onBehalfOfContentOwner = "foo"; | 10361 var arg_onBehalfOfContentOwner = "foo"; |
| 10069 var arg_pageToken = "foo"; | 10362 var arg_pageToken = "foo"; |
| 10070 var arg_playlistId = "foo"; | 10363 var arg_playlistId = "foo"; |
| 10071 var arg_videoId = "foo"; | 10364 var arg_videoId = "foo"; |
| 10072 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 10365 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 10073 var path = (req.url).path; | 10366 var path = (req.url).path; |
| 10074 var pathOffset = 0; | 10367 var pathOffset = 0; |
| 10075 var index; | 10368 var index; |
| 10076 var subPart; | 10369 var subPart; |
| 10077 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 10370 unittest.expect( |
| 10371 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 10078 pathOffset += 1; | 10372 pathOffset += 1; |
| 10079 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("youtube/v3/")); | 10373 unittest.expect(path.substring(pathOffset, pathOffset + 11), |
| 10374 unittest.equals("youtube/v3/")); |
| 10080 pathOffset += 11; | 10375 pathOffset += 11; |
| 10081 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("playlistItems")); | 10376 unittest.expect(path.substring(pathOffset, pathOffset + 13), |
| 10377 unittest.equals("playlistItems")); |
| 10082 pathOffset += 13; | 10378 pathOffset += 13; |
| 10083 | 10379 |
| 10084 var query = (req.url).query; | 10380 var query = (req.url).query; |
| 10085 var queryOffset = 0; | 10381 var queryOffset = 0; |
| 10086 var queryMap = {}; | 10382 var queryMap = {}; |
| 10087 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 10383 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 10088 parseBool(n) { | 10384 parseBool(n) { |
| 10089 if (n == "true") return true; | 10385 if (n == "true") return true; |
| 10090 if (n == "false") return false; | 10386 if (n == "false") return false; |
| 10091 if (n == null) return null; | 10387 if (n == null) return null; |
| 10092 throw new core.ArgumentError("Invalid boolean: $n"); | 10388 throw new core.ArgumentError("Invalid boolean: $n"); |
| 10093 } | 10389 } |
| 10390 |
| 10094 if (query.length > 0) { | 10391 if (query.length > 0) { |
| 10095 for (var part in query.split("&")) { | 10392 for (var part in query.split("&")) { |
| 10096 var keyvalue = part.split("="); | 10393 var keyvalue = part.split("="); |
| 10097 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 10394 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 10395 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 10098 } | 10396 } |
| 10099 } | 10397 } |
| 10100 unittest.expect(queryMap["part"].first, unittest.equals(arg_part)); | 10398 unittest.expect(queryMap["part"].first, unittest.equals(arg_part)); |
| 10101 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); | 10399 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); |
| 10102 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | 10400 unittest.expect(core.int.parse(queryMap["maxResults"].first), |
| 10103 unittest.expect(queryMap["onBehalfOfContentOwner"].first, unittest.equal
s(arg_onBehalfOfContentOwner)); | 10401 unittest.equals(arg_maxResults)); |
| 10104 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 10402 unittest.expect(queryMap["onBehalfOfContentOwner"].first, |
| 10105 unittest.expect(queryMap["playlistId"].first, unittest.equals(arg_playli
stId)); | 10403 unittest.equals(arg_onBehalfOfContentOwner)); |
| 10106 unittest.expect(queryMap["videoId"].first, unittest.equals(arg_videoId))
; | 10404 unittest.expect( |
| 10107 | 10405 queryMap["pageToken"].first, unittest.equals(arg_pageToken)); |
| 10406 unittest.expect( |
| 10407 queryMap["playlistId"].first, unittest.equals(arg_playlistId)); |
| 10408 unittest.expect( |
| 10409 queryMap["videoId"].first, unittest.equals(arg_videoId)); |
| 10108 | 10410 |
| 10109 var h = { | 10411 var h = { |
| 10110 "content-type" : "application/json; charset=utf-8", | 10412 "content-type": "application/json; charset=utf-8", |
| 10111 }; | 10413 }; |
| 10112 var resp = convert.JSON.encode(buildPlaylistItemListResponse()); | 10414 var resp = convert.JSON.encode(buildPlaylistItemListResponse()); |
| 10113 return new async.Future.value(stringResponse(200, h, resp)); | 10415 return new async.Future.value(stringResponse(200, h, resp)); |
| 10114 }), true); | 10416 }), true); |
| 10115 res.list(arg_part, id: arg_id, maxResults: arg_maxResults, onBehalfOfConte
ntOwner: arg_onBehalfOfContentOwner, pageToken: arg_pageToken, playlistId: arg_p
laylistId, videoId: arg_videoId).then(unittest.expectAsync1(((api.PlaylistItemLi
stResponse response) { | 10417 res |
| 10418 .list(arg_part, |
| 10419 id: arg_id, |
| 10420 maxResults: arg_maxResults, |
| 10421 onBehalfOfContentOwner: arg_onBehalfOfContentOwner, |
| 10422 pageToken: arg_pageToken, |
| 10423 playlistId: arg_playlistId, |
| 10424 videoId: arg_videoId) |
| 10425 .then(unittest.expectAsync1(((api.PlaylistItemListResponse response) { |
| 10116 checkPlaylistItemListResponse(response); | 10426 checkPlaylistItemListResponse(response); |
| 10117 }))); | 10427 }))); |
| 10118 }); | 10428 }); |
| 10119 | 10429 |
| 10120 unittest.test("method--update", () { | 10430 unittest.test("method--update", () { |
| 10121 | |
| 10122 var mock = new HttpServerMock(); | 10431 var mock = new HttpServerMock(); |
| 10123 api.PlaylistItemsResourceApi res = new api.YoutubeApi(mock).playlistItems; | 10432 api.PlaylistItemsResourceApi res = new api.YoutubeApi(mock).playlistItems; |
| 10124 var arg_request = buildPlaylistItem(); | 10433 var arg_request = buildPlaylistItem(); |
| 10125 var arg_part = "foo"; | 10434 var arg_part = "foo"; |
| 10126 var arg_onBehalfOfContentOwner = "foo"; | 10435 var arg_onBehalfOfContentOwner = "foo"; |
| 10127 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 10436 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 10128 var obj = new api.PlaylistItem.fromJson(json); | 10437 var obj = new api.PlaylistItem.fromJson(json); |
| 10129 checkPlaylistItem(obj); | 10438 checkPlaylistItem(obj); |
| 10130 | 10439 |
| 10131 var path = (req.url).path; | 10440 var path = (req.url).path; |
| 10132 var pathOffset = 0; | 10441 var pathOffset = 0; |
| 10133 var index; | 10442 var index; |
| 10134 var subPart; | 10443 var subPart; |
| 10135 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 10444 unittest.expect( |
| 10445 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 10136 pathOffset += 1; | 10446 pathOffset += 1; |
| 10137 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("youtube/v3/")); | 10447 unittest.expect(path.substring(pathOffset, pathOffset + 11), |
| 10448 unittest.equals("youtube/v3/")); |
| 10138 pathOffset += 11; | 10449 pathOffset += 11; |
| 10139 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("playlistItems")); | 10450 unittest.expect(path.substring(pathOffset, pathOffset + 13), |
| 10451 unittest.equals("playlistItems")); |
| 10140 pathOffset += 13; | 10452 pathOffset += 13; |
| 10141 | 10453 |
| 10142 var query = (req.url).query; | 10454 var query = (req.url).query; |
| 10143 var queryOffset = 0; | 10455 var queryOffset = 0; |
| 10144 var queryMap = {}; | 10456 var queryMap = {}; |
| 10145 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 10457 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 10146 parseBool(n) { | 10458 parseBool(n) { |
| 10147 if (n == "true") return true; | 10459 if (n == "true") return true; |
| 10148 if (n == "false") return false; | 10460 if (n == "false") return false; |
| 10149 if (n == null) return null; | 10461 if (n == null) return null; |
| 10150 throw new core.ArgumentError("Invalid boolean: $n"); | 10462 throw new core.ArgumentError("Invalid boolean: $n"); |
| 10151 } | 10463 } |
| 10464 |
| 10152 if (query.length > 0) { | 10465 if (query.length > 0) { |
| 10153 for (var part in query.split("&")) { | 10466 for (var part in query.split("&")) { |
| 10154 var keyvalue = part.split("="); | 10467 var keyvalue = part.split("="); |
| 10155 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 10468 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 10469 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 10156 } | 10470 } |
| 10157 } | 10471 } |
| 10158 unittest.expect(queryMap["part"].first, unittest.equals(arg_part)); | 10472 unittest.expect(queryMap["part"].first, unittest.equals(arg_part)); |
| 10159 unittest.expect(queryMap["onBehalfOfContentOwner"].first, unittest.equal
s(arg_onBehalfOfContentOwner)); | 10473 unittest.expect(queryMap["onBehalfOfContentOwner"].first, |
| 10160 | 10474 unittest.equals(arg_onBehalfOfContentOwner)); |
| 10161 | 10475 |
| 10162 var h = { | 10476 var h = { |
| 10163 "content-type" : "application/json; charset=utf-8", | 10477 "content-type": "application/json; charset=utf-8", |
| 10164 }; | 10478 }; |
| 10165 var resp = convert.JSON.encode(buildPlaylistItem()); | 10479 var resp = convert.JSON.encode(buildPlaylistItem()); |
| 10166 return new async.Future.value(stringResponse(200, h, resp)); | 10480 return new async.Future.value(stringResponse(200, h, resp)); |
| 10167 }), true); | 10481 }), true); |
| 10168 res.update(arg_request, arg_part, onBehalfOfContentOwner: arg_onBehalfOfCo
ntentOwner).then(unittest.expectAsync1(((api.PlaylistItem response) { | 10482 res |
| 10483 .update(arg_request, arg_part, |
| 10484 onBehalfOfContentOwner: arg_onBehalfOfContentOwner) |
| 10485 .then(unittest.expectAsync1(((api.PlaylistItem response) { |
| 10169 checkPlaylistItem(response); | 10486 checkPlaylistItem(response); |
| 10170 }))); | 10487 }))); |
| 10171 }); | 10488 }); |
| 10172 | |
| 10173 }); | 10489 }); |
| 10174 | 10490 |
| 10175 | |
| 10176 unittest.group("resource-PlaylistsResourceApi", () { | 10491 unittest.group("resource-PlaylistsResourceApi", () { |
| 10177 unittest.test("method--delete", () { | 10492 unittest.test("method--delete", () { |
| 10178 | |
| 10179 var mock = new HttpServerMock(); | 10493 var mock = new HttpServerMock(); |
| 10180 api.PlaylistsResourceApi res = new api.YoutubeApi(mock).playlists; | 10494 api.PlaylistsResourceApi res = new api.YoutubeApi(mock).playlists; |
| 10181 var arg_id = "foo"; | 10495 var arg_id = "foo"; |
| 10182 var arg_onBehalfOfContentOwner = "foo"; | 10496 var arg_onBehalfOfContentOwner = "foo"; |
| 10183 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 10497 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 10184 var path = (req.url).path; | 10498 var path = (req.url).path; |
| 10185 var pathOffset = 0; | 10499 var pathOffset = 0; |
| 10186 var index; | 10500 var index; |
| 10187 var subPart; | 10501 var subPart; |
| 10188 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 10502 unittest.expect( |
| 10503 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 10189 pathOffset += 1; | 10504 pathOffset += 1; |
| 10190 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("youtube/v3/")); | 10505 unittest.expect(path.substring(pathOffset, pathOffset + 11), |
| 10506 unittest.equals("youtube/v3/")); |
| 10191 pathOffset += 11; | 10507 pathOffset += 11; |
| 10192 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("playlists")); | 10508 unittest.expect(path.substring(pathOffset, pathOffset + 9), |
| 10509 unittest.equals("playlists")); |
| 10193 pathOffset += 9; | 10510 pathOffset += 9; |
| 10194 | 10511 |
| 10195 var query = (req.url).query; | 10512 var query = (req.url).query; |
| 10196 var queryOffset = 0; | 10513 var queryOffset = 0; |
| 10197 var queryMap = {}; | 10514 var queryMap = {}; |
| 10198 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 10515 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 10199 parseBool(n) { | 10516 parseBool(n) { |
| 10200 if (n == "true") return true; | 10517 if (n == "true") return true; |
| 10201 if (n == "false") return false; | 10518 if (n == "false") return false; |
| 10202 if (n == null) return null; | 10519 if (n == null) return null; |
| 10203 throw new core.ArgumentError("Invalid boolean: $n"); | 10520 throw new core.ArgumentError("Invalid boolean: $n"); |
| 10204 } | 10521 } |
| 10522 |
| 10205 if (query.length > 0) { | 10523 if (query.length > 0) { |
| 10206 for (var part in query.split("&")) { | 10524 for (var part in query.split("&")) { |
| 10207 var keyvalue = part.split("="); | 10525 var keyvalue = part.split("="); |
| 10208 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 10526 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 10527 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 10209 } | 10528 } |
| 10210 } | 10529 } |
| 10211 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); | 10530 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); |
| 10212 unittest.expect(queryMap["onBehalfOfContentOwner"].first, unittest.equal
s(arg_onBehalfOfContentOwner)); | 10531 unittest.expect(queryMap["onBehalfOfContentOwner"].first, |
| 10213 | 10532 unittest.equals(arg_onBehalfOfContentOwner)); |
| 10214 | 10533 |
| 10215 var h = { | 10534 var h = { |
| 10216 "content-type" : "application/json; charset=utf-8", | 10535 "content-type": "application/json; charset=utf-8", |
| 10217 }; | 10536 }; |
| 10218 var resp = ""; | 10537 var resp = ""; |
| 10219 return new async.Future.value(stringResponse(200, h, resp)); | 10538 return new async.Future.value(stringResponse(200, h, resp)); |
| 10220 }), true); | 10539 }), true); |
| 10221 res.delete(arg_id, onBehalfOfContentOwner: arg_onBehalfOfContentOwner).the
n(unittest.expectAsync1((_) {})); | 10540 res |
| 10541 .delete(arg_id, onBehalfOfContentOwner: arg_onBehalfOfContentOwner) |
| 10542 .then(unittest.expectAsync1((_) {})); |
| 10222 }); | 10543 }); |
| 10223 | 10544 |
| 10224 unittest.test("method--insert", () { | 10545 unittest.test("method--insert", () { |
| 10225 | |
| 10226 var mock = new HttpServerMock(); | 10546 var mock = new HttpServerMock(); |
| 10227 api.PlaylistsResourceApi res = new api.YoutubeApi(mock).playlists; | 10547 api.PlaylistsResourceApi res = new api.YoutubeApi(mock).playlists; |
| 10228 var arg_request = buildPlaylist(); | 10548 var arg_request = buildPlaylist(); |
| 10229 var arg_part = "foo"; | 10549 var arg_part = "foo"; |
| 10230 var arg_onBehalfOfContentOwner = "foo"; | 10550 var arg_onBehalfOfContentOwner = "foo"; |
| 10231 var arg_onBehalfOfContentOwnerChannel = "foo"; | 10551 var arg_onBehalfOfContentOwnerChannel = "foo"; |
| 10232 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 10552 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 10233 var obj = new api.Playlist.fromJson(json); | 10553 var obj = new api.Playlist.fromJson(json); |
| 10234 checkPlaylist(obj); | 10554 checkPlaylist(obj); |
| 10235 | 10555 |
| 10236 var path = (req.url).path; | 10556 var path = (req.url).path; |
| 10237 var pathOffset = 0; | 10557 var pathOffset = 0; |
| 10238 var index; | 10558 var index; |
| 10239 var subPart; | 10559 var subPart; |
| 10240 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 10560 unittest.expect( |
| 10561 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 10241 pathOffset += 1; | 10562 pathOffset += 1; |
| 10242 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("youtube/v3/")); | 10563 unittest.expect(path.substring(pathOffset, pathOffset + 11), |
| 10564 unittest.equals("youtube/v3/")); |
| 10243 pathOffset += 11; | 10565 pathOffset += 11; |
| 10244 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("playlists")); | 10566 unittest.expect(path.substring(pathOffset, pathOffset + 9), |
| 10567 unittest.equals("playlists")); |
| 10245 pathOffset += 9; | 10568 pathOffset += 9; |
| 10246 | 10569 |
| 10247 var query = (req.url).query; | 10570 var query = (req.url).query; |
| 10248 var queryOffset = 0; | 10571 var queryOffset = 0; |
| 10249 var queryMap = {}; | 10572 var queryMap = {}; |
| 10250 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 10573 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 10251 parseBool(n) { | 10574 parseBool(n) { |
| 10252 if (n == "true") return true; | 10575 if (n == "true") return true; |
| 10253 if (n == "false") return false; | 10576 if (n == "false") return false; |
| 10254 if (n == null) return null; | 10577 if (n == null) return null; |
| 10255 throw new core.ArgumentError("Invalid boolean: $n"); | 10578 throw new core.ArgumentError("Invalid boolean: $n"); |
| 10256 } | 10579 } |
| 10580 |
| 10257 if (query.length > 0) { | 10581 if (query.length > 0) { |
| 10258 for (var part in query.split("&")) { | 10582 for (var part in query.split("&")) { |
| 10259 var keyvalue = part.split("="); | 10583 var keyvalue = part.split("="); |
| 10260 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 10584 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 10585 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 10261 } | 10586 } |
| 10262 } | 10587 } |
| 10263 unittest.expect(queryMap["part"].first, unittest.equals(arg_part)); | 10588 unittest.expect(queryMap["part"].first, unittest.equals(arg_part)); |
| 10264 unittest.expect(queryMap["onBehalfOfContentOwner"].first, unittest.equal
s(arg_onBehalfOfContentOwner)); | 10589 unittest.expect(queryMap["onBehalfOfContentOwner"].first, |
| 10265 unittest.expect(queryMap["onBehalfOfContentOwnerChannel"].first, unittes
t.equals(arg_onBehalfOfContentOwnerChannel)); | 10590 unittest.equals(arg_onBehalfOfContentOwner)); |
| 10266 | 10591 unittest.expect(queryMap["onBehalfOfContentOwnerChannel"].first, |
| 10592 unittest.equals(arg_onBehalfOfContentOwnerChannel)); |
| 10267 | 10593 |
| 10268 var h = { | 10594 var h = { |
| 10269 "content-type" : "application/json; charset=utf-8", | 10595 "content-type": "application/json; charset=utf-8", |
| 10270 }; | 10596 }; |
| 10271 var resp = convert.JSON.encode(buildPlaylist()); | 10597 var resp = convert.JSON.encode(buildPlaylist()); |
| 10272 return new async.Future.value(stringResponse(200, h, resp)); | 10598 return new async.Future.value(stringResponse(200, h, resp)); |
| 10273 }), true); | 10599 }), true); |
| 10274 res.insert(arg_request, arg_part, onBehalfOfContentOwner: arg_onBehalfOfCo
ntentOwner, onBehalfOfContentOwnerChannel: arg_onBehalfOfContentOwnerChannel).th
en(unittest.expectAsync1(((api.Playlist response) { | 10600 res |
| 10601 .insert(arg_request, arg_part, |
| 10602 onBehalfOfContentOwner: arg_onBehalfOfContentOwner, |
| 10603 onBehalfOfContentOwnerChannel: arg_onBehalfOfContentOwnerChannel) |
| 10604 .then(unittest.expectAsync1(((api.Playlist response) { |
| 10275 checkPlaylist(response); | 10605 checkPlaylist(response); |
| 10276 }))); | 10606 }))); |
| 10277 }); | 10607 }); |
| 10278 | 10608 |
| 10279 unittest.test("method--list", () { | 10609 unittest.test("method--list", () { |
| 10280 | |
| 10281 var mock = new HttpServerMock(); | 10610 var mock = new HttpServerMock(); |
| 10282 api.PlaylistsResourceApi res = new api.YoutubeApi(mock).playlists; | 10611 api.PlaylistsResourceApi res = new api.YoutubeApi(mock).playlists; |
| 10283 var arg_part = "foo"; | 10612 var arg_part = "foo"; |
| 10284 var arg_channelId = "foo"; | 10613 var arg_channelId = "foo"; |
| 10285 var arg_hl = "foo"; | 10614 var arg_hl = "foo"; |
| 10286 var arg_id = "foo"; | 10615 var arg_id = "foo"; |
| 10287 var arg_maxResults = 42; | 10616 var arg_maxResults = 42; |
| 10288 var arg_mine = true; | 10617 var arg_mine = true; |
| 10289 var arg_onBehalfOfContentOwner = "foo"; | 10618 var arg_onBehalfOfContentOwner = "foo"; |
| 10290 var arg_onBehalfOfContentOwnerChannel = "foo"; | 10619 var arg_onBehalfOfContentOwnerChannel = "foo"; |
| 10291 var arg_pageToken = "foo"; | 10620 var arg_pageToken = "foo"; |
| 10292 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 10621 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 10293 var path = (req.url).path; | 10622 var path = (req.url).path; |
| 10294 var pathOffset = 0; | 10623 var pathOffset = 0; |
| 10295 var index; | 10624 var index; |
| 10296 var subPart; | 10625 var subPart; |
| 10297 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 10626 unittest.expect( |
| 10627 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 10298 pathOffset += 1; | 10628 pathOffset += 1; |
| 10299 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("youtube/v3/")); | 10629 unittest.expect(path.substring(pathOffset, pathOffset + 11), |
| 10630 unittest.equals("youtube/v3/")); |
| 10300 pathOffset += 11; | 10631 pathOffset += 11; |
| 10301 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("playlists")); | 10632 unittest.expect(path.substring(pathOffset, pathOffset + 9), |
| 10633 unittest.equals("playlists")); |
| 10302 pathOffset += 9; | 10634 pathOffset += 9; |
| 10303 | 10635 |
| 10304 var query = (req.url).query; | 10636 var query = (req.url).query; |
| 10305 var queryOffset = 0; | 10637 var queryOffset = 0; |
| 10306 var queryMap = {}; | 10638 var queryMap = {}; |
| 10307 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 10639 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 10308 parseBool(n) { | 10640 parseBool(n) { |
| 10309 if (n == "true") return true; | 10641 if (n == "true") return true; |
| 10310 if (n == "false") return false; | 10642 if (n == "false") return false; |
| 10311 if (n == null) return null; | 10643 if (n == null) return null; |
| 10312 throw new core.ArgumentError("Invalid boolean: $n"); | 10644 throw new core.ArgumentError("Invalid boolean: $n"); |
| 10313 } | 10645 } |
| 10646 |
| 10314 if (query.length > 0) { | 10647 if (query.length > 0) { |
| 10315 for (var part in query.split("&")) { | 10648 for (var part in query.split("&")) { |
| 10316 var keyvalue = part.split("="); | 10649 var keyvalue = part.split("="); |
| 10317 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 10650 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 10651 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 10318 } | 10652 } |
| 10319 } | 10653 } |
| 10320 unittest.expect(queryMap["part"].first, unittest.equals(arg_part)); | 10654 unittest.expect(queryMap["part"].first, unittest.equals(arg_part)); |
| 10321 unittest.expect(queryMap["channelId"].first, unittest.equals(arg_channel
Id)); | 10655 unittest.expect( |
| 10656 queryMap["channelId"].first, unittest.equals(arg_channelId)); |
| 10322 unittest.expect(queryMap["hl"].first, unittest.equals(arg_hl)); | 10657 unittest.expect(queryMap["hl"].first, unittest.equals(arg_hl)); |
| 10323 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); | 10658 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); |
| 10324 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | 10659 unittest.expect(core.int.parse(queryMap["maxResults"].first), |
| 10660 unittest.equals(arg_maxResults)); |
| 10325 unittest.expect(queryMap["mine"].first, unittest.equals("$arg_mine")); | 10661 unittest.expect(queryMap["mine"].first, unittest.equals("$arg_mine")); |
| 10326 unittest.expect(queryMap["onBehalfOfContentOwner"].first, unittest.equal
s(arg_onBehalfOfContentOwner)); | 10662 unittest.expect(queryMap["onBehalfOfContentOwner"].first, |
| 10327 unittest.expect(queryMap["onBehalfOfContentOwnerChannel"].first, unittes
t.equals(arg_onBehalfOfContentOwnerChannel)); | 10663 unittest.equals(arg_onBehalfOfContentOwner)); |
| 10328 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 10664 unittest.expect(queryMap["onBehalfOfContentOwnerChannel"].first, |
| 10329 | 10665 unittest.equals(arg_onBehalfOfContentOwnerChannel)); |
| 10666 unittest.expect( |
| 10667 queryMap["pageToken"].first, unittest.equals(arg_pageToken)); |
| 10330 | 10668 |
| 10331 var h = { | 10669 var h = { |
| 10332 "content-type" : "application/json; charset=utf-8", | 10670 "content-type": "application/json; charset=utf-8", |
| 10333 }; | 10671 }; |
| 10334 var resp = convert.JSON.encode(buildPlaylistListResponse()); | 10672 var resp = convert.JSON.encode(buildPlaylistListResponse()); |
| 10335 return new async.Future.value(stringResponse(200, h, resp)); | 10673 return new async.Future.value(stringResponse(200, h, resp)); |
| 10336 }), true); | 10674 }), true); |
| 10337 res.list(arg_part, channelId: arg_channelId, hl: arg_hl, id: arg_id, maxRe
sults: arg_maxResults, mine: arg_mine, onBehalfOfContentOwner: arg_onBehalfOfCon
tentOwner, onBehalfOfContentOwnerChannel: arg_onBehalfOfContentOwnerChannel, pag
eToken: arg_pageToken).then(unittest.expectAsync1(((api.PlaylistListResponse res
ponse) { | 10675 res |
| 10676 .list(arg_part, |
| 10677 channelId: arg_channelId, |
| 10678 hl: arg_hl, |
| 10679 id: arg_id, |
| 10680 maxResults: arg_maxResults, |
| 10681 mine: arg_mine, |
| 10682 onBehalfOfContentOwner: arg_onBehalfOfContentOwner, |
| 10683 onBehalfOfContentOwnerChannel: arg_onBehalfOfContentOwnerChannel, |
| 10684 pageToken: arg_pageToken) |
| 10685 .then(unittest.expectAsync1(((api.PlaylistListResponse response) { |
| 10338 checkPlaylistListResponse(response); | 10686 checkPlaylistListResponse(response); |
| 10339 }))); | 10687 }))); |
| 10340 }); | 10688 }); |
| 10341 | 10689 |
| 10342 unittest.test("method--update", () { | 10690 unittest.test("method--update", () { |
| 10343 | |
| 10344 var mock = new HttpServerMock(); | 10691 var mock = new HttpServerMock(); |
| 10345 api.PlaylistsResourceApi res = new api.YoutubeApi(mock).playlists; | 10692 api.PlaylistsResourceApi res = new api.YoutubeApi(mock).playlists; |
| 10346 var arg_request = buildPlaylist(); | 10693 var arg_request = buildPlaylist(); |
| 10347 var arg_part = "foo"; | 10694 var arg_part = "foo"; |
| 10348 var arg_onBehalfOfContentOwner = "foo"; | 10695 var arg_onBehalfOfContentOwner = "foo"; |
| 10349 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 10696 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 10350 var obj = new api.Playlist.fromJson(json); | 10697 var obj = new api.Playlist.fromJson(json); |
| 10351 checkPlaylist(obj); | 10698 checkPlaylist(obj); |
| 10352 | 10699 |
| 10353 var path = (req.url).path; | 10700 var path = (req.url).path; |
| 10354 var pathOffset = 0; | 10701 var pathOffset = 0; |
| 10355 var index; | 10702 var index; |
| 10356 var subPart; | 10703 var subPart; |
| 10357 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 10704 unittest.expect( |
| 10705 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 10358 pathOffset += 1; | 10706 pathOffset += 1; |
| 10359 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("youtube/v3/")); | 10707 unittest.expect(path.substring(pathOffset, pathOffset + 11), |
| 10708 unittest.equals("youtube/v3/")); |
| 10360 pathOffset += 11; | 10709 pathOffset += 11; |
| 10361 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("playlists")); | 10710 unittest.expect(path.substring(pathOffset, pathOffset + 9), |
| 10711 unittest.equals("playlists")); |
| 10362 pathOffset += 9; | 10712 pathOffset += 9; |
| 10363 | 10713 |
| 10364 var query = (req.url).query; | 10714 var query = (req.url).query; |
| 10365 var queryOffset = 0; | 10715 var queryOffset = 0; |
| 10366 var queryMap = {}; | 10716 var queryMap = {}; |
| 10367 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 10717 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 10368 parseBool(n) { | 10718 parseBool(n) { |
| 10369 if (n == "true") return true; | 10719 if (n == "true") return true; |
| 10370 if (n == "false") return false; | 10720 if (n == "false") return false; |
| 10371 if (n == null) return null; | 10721 if (n == null) return null; |
| 10372 throw new core.ArgumentError("Invalid boolean: $n"); | 10722 throw new core.ArgumentError("Invalid boolean: $n"); |
| 10373 } | 10723 } |
| 10724 |
| 10374 if (query.length > 0) { | 10725 if (query.length > 0) { |
| 10375 for (var part in query.split("&")) { | 10726 for (var part in query.split("&")) { |
| 10376 var keyvalue = part.split("="); | 10727 var keyvalue = part.split("="); |
| 10377 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 10728 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 10729 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 10378 } | 10730 } |
| 10379 } | 10731 } |
| 10380 unittest.expect(queryMap["part"].first, unittest.equals(arg_part)); | 10732 unittest.expect(queryMap["part"].first, unittest.equals(arg_part)); |
| 10381 unittest.expect(queryMap["onBehalfOfContentOwner"].first, unittest.equal
s(arg_onBehalfOfContentOwner)); | 10733 unittest.expect(queryMap["onBehalfOfContentOwner"].first, |
| 10382 | 10734 unittest.equals(arg_onBehalfOfContentOwner)); |
| 10383 | 10735 |
| 10384 var h = { | 10736 var h = { |
| 10385 "content-type" : "application/json; charset=utf-8", | 10737 "content-type": "application/json; charset=utf-8", |
| 10386 }; | 10738 }; |
| 10387 var resp = convert.JSON.encode(buildPlaylist()); | 10739 var resp = convert.JSON.encode(buildPlaylist()); |
| 10388 return new async.Future.value(stringResponse(200, h, resp)); | 10740 return new async.Future.value(stringResponse(200, h, resp)); |
| 10389 }), true); | 10741 }), true); |
| 10390 res.update(arg_request, arg_part, onBehalfOfContentOwner: arg_onBehalfOfCo
ntentOwner).then(unittest.expectAsync1(((api.Playlist response) { | 10742 res |
| 10743 .update(arg_request, arg_part, |
| 10744 onBehalfOfContentOwner: arg_onBehalfOfContentOwner) |
| 10745 .then(unittest.expectAsync1(((api.Playlist response) { |
| 10391 checkPlaylist(response); | 10746 checkPlaylist(response); |
| 10392 }))); | 10747 }))); |
| 10393 }); | 10748 }); |
| 10394 | |
| 10395 }); | 10749 }); |
| 10396 | 10750 |
| 10397 | |
| 10398 unittest.group("resource-SearchResourceApi", () { | 10751 unittest.group("resource-SearchResourceApi", () { |
| 10399 unittest.test("method--list", () { | 10752 unittest.test("method--list", () { |
| 10400 | |
| 10401 var mock = new HttpServerMock(); | 10753 var mock = new HttpServerMock(); |
| 10402 api.SearchResourceApi res = new api.YoutubeApi(mock).search; | 10754 api.SearchResourceApi res = new api.YoutubeApi(mock).search; |
| 10403 var arg_part = "foo"; | 10755 var arg_part = "foo"; |
| 10404 var arg_channelId = "foo"; | 10756 var arg_channelId = "foo"; |
| 10405 var arg_channelType = "foo"; | 10757 var arg_channelType = "foo"; |
| 10406 var arg_eventType = "foo"; | 10758 var arg_eventType = "foo"; |
| 10407 var arg_forContentOwner = true; | 10759 var arg_forContentOwner = true; |
| 10408 var arg_forDeveloper = true; | 10760 var arg_forDeveloper = true; |
| 10409 var arg_forMine = true; | 10761 var arg_forMine = true; |
| 10410 var arg_location = "foo"; | 10762 var arg_location = "foo"; |
| (...skipping 18 matching lines...) Expand all Loading... |
| 10429 var arg_videoDuration = "foo"; | 10781 var arg_videoDuration = "foo"; |
| 10430 var arg_videoEmbeddable = "foo"; | 10782 var arg_videoEmbeddable = "foo"; |
| 10431 var arg_videoLicense = "foo"; | 10783 var arg_videoLicense = "foo"; |
| 10432 var arg_videoSyndicated = "foo"; | 10784 var arg_videoSyndicated = "foo"; |
| 10433 var arg_videoType = "foo"; | 10785 var arg_videoType = "foo"; |
| 10434 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 10786 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 10435 var path = (req.url).path; | 10787 var path = (req.url).path; |
| 10436 var pathOffset = 0; | 10788 var pathOffset = 0; |
| 10437 var index; | 10789 var index; |
| 10438 var subPart; | 10790 var subPart; |
| 10439 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 10791 unittest.expect( |
| 10792 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 10440 pathOffset += 1; | 10793 pathOffset += 1; |
| 10441 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("youtube/v3/")); | 10794 unittest.expect(path.substring(pathOffset, pathOffset + 11), |
| 10795 unittest.equals("youtube/v3/")); |
| 10442 pathOffset += 11; | 10796 pathOffset += 11; |
| 10443 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ
als("search")); | 10797 unittest.expect(path.substring(pathOffset, pathOffset + 6), |
| 10798 unittest.equals("search")); |
| 10444 pathOffset += 6; | 10799 pathOffset += 6; |
| 10445 | 10800 |
| 10446 var query = (req.url).query; | 10801 var query = (req.url).query; |
| 10447 var queryOffset = 0; | 10802 var queryOffset = 0; |
| 10448 var queryMap = {}; | 10803 var queryMap = {}; |
| 10449 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 10804 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 10450 parseBool(n) { | 10805 parseBool(n) { |
| 10451 if (n == "true") return true; | 10806 if (n == "true") return true; |
| 10452 if (n == "false") return false; | 10807 if (n == "false") return false; |
| 10453 if (n == null) return null; | 10808 if (n == null) return null; |
| 10454 throw new core.ArgumentError("Invalid boolean: $n"); | 10809 throw new core.ArgumentError("Invalid boolean: $n"); |
| 10455 } | 10810 } |
| 10811 |
| 10456 if (query.length > 0) { | 10812 if (query.length > 0) { |
| 10457 for (var part in query.split("&")) { | 10813 for (var part in query.split("&")) { |
| 10458 var keyvalue = part.split("="); | 10814 var keyvalue = part.split("="); |
| 10459 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 10815 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 10816 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 10460 } | 10817 } |
| 10461 } | 10818 } |
| 10462 unittest.expect(queryMap["part"].first, unittest.equals(arg_part)); | 10819 unittest.expect(queryMap["part"].first, unittest.equals(arg_part)); |
| 10463 unittest.expect(queryMap["channelId"].first, unittest.equals(arg_channel
Id)); | 10820 unittest.expect( |
| 10464 unittest.expect(queryMap["channelType"].first, unittest.equals(arg_chann
elType)); | 10821 queryMap["channelId"].first, unittest.equals(arg_channelId)); |
| 10465 unittest.expect(queryMap["eventType"].first, unittest.equals(arg_eventTy
pe)); | 10822 unittest.expect( |
| 10466 unittest.expect(queryMap["forContentOwner"].first, unittest.equals("$arg
_forContentOwner")); | 10823 queryMap["channelType"].first, unittest.equals(arg_channelType)); |
| 10467 unittest.expect(queryMap["forDeveloper"].first, unittest.equals("$arg_fo
rDeveloper")); | 10824 unittest.expect( |
| 10468 unittest.expect(queryMap["forMine"].first, unittest.equals("$arg_forMine
")); | 10825 queryMap["eventType"].first, unittest.equals(arg_eventType)); |
| 10469 unittest.expect(queryMap["location"].first, unittest.equals(arg_location
)); | 10826 unittest.expect(queryMap["forContentOwner"].first, |
| 10470 unittest.expect(queryMap["locationRadius"].first, unittest.equals(arg_lo
cationRadius)); | 10827 unittest.equals("$arg_forContentOwner")); |
| 10471 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | 10828 unittest.expect(queryMap["forDeveloper"].first, |
| 10472 unittest.expect(queryMap["onBehalfOfContentOwner"].first, unittest.equal
s(arg_onBehalfOfContentOwner)); | 10829 unittest.equals("$arg_forDeveloper")); |
| 10830 unittest.expect( |
| 10831 queryMap["forMine"].first, unittest.equals("$arg_forMine")); |
| 10832 unittest.expect( |
| 10833 queryMap["location"].first, unittest.equals(arg_location)); |
| 10834 unittest.expect(queryMap["locationRadius"].first, |
| 10835 unittest.equals(arg_locationRadius)); |
| 10836 unittest.expect(core.int.parse(queryMap["maxResults"].first), |
| 10837 unittest.equals(arg_maxResults)); |
| 10838 unittest.expect(queryMap["onBehalfOfContentOwner"].first, |
| 10839 unittest.equals(arg_onBehalfOfContentOwner)); |
| 10473 unittest.expect(queryMap["order"].first, unittest.equals(arg_order)); | 10840 unittest.expect(queryMap["order"].first, unittest.equals(arg_order)); |
| 10474 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 10841 unittest.expect( |
| 10475 unittest.expect(core.DateTime.parse(queryMap["publishedAfter"].first), u
nittest.equals(arg_publishedAfter)); | 10842 queryMap["pageToken"].first, unittest.equals(arg_pageToken)); |
| 10476 unittest.expect(core.DateTime.parse(queryMap["publishedBefore"].first),
unittest.equals(arg_publishedBefore)); | 10843 unittest.expect(core.DateTime.parse(queryMap["publishedAfter"].first), |
| 10844 unittest.equals(arg_publishedAfter)); |
| 10845 unittest.expect(core.DateTime.parse(queryMap["publishedBefore"].first), |
| 10846 unittest.equals(arg_publishedBefore)); |
| 10477 unittest.expect(queryMap["q"].first, unittest.equals(arg_q)); | 10847 unittest.expect(queryMap["q"].first, unittest.equals(arg_q)); |
| 10478 unittest.expect(queryMap["regionCode"].first, unittest.equals(arg_region
Code)); | 10848 unittest.expect( |
| 10479 unittest.expect(queryMap["relatedToVideoId"].first, unittest.equals(arg_
relatedToVideoId)); | 10849 queryMap["regionCode"].first, unittest.equals(arg_regionCode)); |
| 10480 unittest.expect(queryMap["relevanceLanguage"].first, unittest.equals(arg
_relevanceLanguage)); | 10850 unittest.expect(queryMap["relatedToVideoId"].first, |
| 10481 unittest.expect(queryMap["safeSearch"].first, unittest.equals(arg_safeSe
arch)); | 10851 unittest.equals(arg_relatedToVideoId)); |
| 10482 unittest.expect(queryMap["topicId"].first, unittest.equals(arg_topicId))
; | 10852 unittest.expect(queryMap["relevanceLanguage"].first, |
| 10853 unittest.equals(arg_relevanceLanguage)); |
| 10854 unittest.expect( |
| 10855 queryMap["safeSearch"].first, unittest.equals(arg_safeSearch)); |
| 10856 unittest.expect( |
| 10857 queryMap["topicId"].first, unittest.equals(arg_topicId)); |
| 10483 unittest.expect(queryMap["type"].first, unittest.equals(arg_type)); | 10858 unittest.expect(queryMap["type"].first, unittest.equals(arg_type)); |
| 10484 unittest.expect(queryMap["videoCaption"].first, unittest.equals(arg_vide
oCaption)); | 10859 unittest.expect( |
| 10485 unittest.expect(queryMap["videoCategoryId"].first, unittest.equals(arg_v
ideoCategoryId)); | 10860 queryMap["videoCaption"].first, unittest.equals(arg_videoCaption)); |
| 10486 unittest.expect(queryMap["videoDefinition"].first, unittest.equals(arg_v
ideoDefinition)); | 10861 unittest.expect(queryMap["videoCategoryId"].first, |
| 10487 unittest.expect(queryMap["videoDimension"].first, unittest.equals(arg_vi
deoDimension)); | 10862 unittest.equals(arg_videoCategoryId)); |
| 10488 unittest.expect(queryMap["videoDuration"].first, unittest.equals(arg_vid
eoDuration)); | 10863 unittest.expect(queryMap["videoDefinition"].first, |
| 10489 unittest.expect(queryMap["videoEmbeddable"].first, unittest.equals(arg_v
ideoEmbeddable)); | 10864 unittest.equals(arg_videoDefinition)); |
| 10490 unittest.expect(queryMap["videoLicense"].first, unittest.equals(arg_vide
oLicense)); | 10865 unittest.expect(queryMap["videoDimension"].first, |
| 10491 unittest.expect(queryMap["videoSyndicated"].first, unittest.equals(arg_v
ideoSyndicated)); | 10866 unittest.equals(arg_videoDimension)); |
| 10492 unittest.expect(queryMap["videoType"].first, unittest.equals(arg_videoTy
pe)); | 10867 unittest.expect(queryMap["videoDuration"].first, |
| 10493 | 10868 unittest.equals(arg_videoDuration)); |
| 10869 unittest.expect(queryMap["videoEmbeddable"].first, |
| 10870 unittest.equals(arg_videoEmbeddable)); |
| 10871 unittest.expect( |
| 10872 queryMap["videoLicense"].first, unittest.equals(arg_videoLicense)); |
| 10873 unittest.expect(queryMap["videoSyndicated"].first, |
| 10874 unittest.equals(arg_videoSyndicated)); |
| 10875 unittest.expect( |
| 10876 queryMap["videoType"].first, unittest.equals(arg_videoType)); |
| 10494 | 10877 |
| 10495 var h = { | 10878 var h = { |
| 10496 "content-type" : "application/json; charset=utf-8", | 10879 "content-type": "application/json; charset=utf-8", |
| 10497 }; | 10880 }; |
| 10498 var resp = convert.JSON.encode(buildSearchListResponse()); | 10881 var resp = convert.JSON.encode(buildSearchListResponse()); |
| 10499 return new async.Future.value(stringResponse(200, h, resp)); | 10882 return new async.Future.value(stringResponse(200, h, resp)); |
| 10500 }), true); | 10883 }), true); |
| 10501 res.list(arg_part, channelId: arg_channelId, channelType: arg_channelType,
eventType: arg_eventType, forContentOwner: arg_forContentOwner, forDeveloper: a
rg_forDeveloper, forMine: arg_forMine, location: arg_location, locationRadius: a
rg_locationRadius, maxResults: arg_maxResults, onBehalfOfContentOwner: arg_onBeh
alfOfContentOwner, order: arg_order, pageToken: arg_pageToken, publishedAfter: a
rg_publishedAfter, publishedBefore: arg_publishedBefore, q: arg_q, regionCode: a
rg_regionCode, relatedToVideoId: arg_relatedToVideoId, relevanceLanguage: arg_re
levanceLanguage, safeSearch: arg_safeSearch, topicId: arg_topicId, type: arg_typ
e, videoCaption: arg_videoCaption, videoCategoryId: arg_videoCategoryId, videoDe
finition: arg_videoDefinition, videoDimension: arg_videoDimension, videoDuration
: arg_videoDuration, videoEmbeddable: arg_videoEmbeddable, videoLicense: arg_vid
eoLicense, videoSyndicated: arg_videoSyndicated, videoType: arg_videoType).then(
unittest.expectAsync1(((api.SearchListResponse response) { | 10884 res |
| 10885 .list(arg_part, |
| 10886 channelId: arg_channelId, |
| 10887 channelType: arg_channelType, |
| 10888 eventType: arg_eventType, |
| 10889 forContentOwner: arg_forContentOwner, |
| 10890 forDeveloper: arg_forDeveloper, |
| 10891 forMine: arg_forMine, |
| 10892 location: arg_location, |
| 10893 locationRadius: arg_locationRadius, |
| 10894 maxResults: arg_maxResults, |
| 10895 onBehalfOfContentOwner: arg_onBehalfOfContentOwner, |
| 10896 order: arg_order, |
| 10897 pageToken: arg_pageToken, |
| 10898 publishedAfter: arg_publishedAfter, |
| 10899 publishedBefore: arg_publishedBefore, |
| 10900 q: arg_q, |
| 10901 regionCode: arg_regionCode, |
| 10902 relatedToVideoId: arg_relatedToVideoId, |
| 10903 relevanceLanguage: arg_relevanceLanguage, |
| 10904 safeSearch: arg_safeSearch, |
| 10905 topicId: arg_topicId, |
| 10906 type: arg_type, |
| 10907 videoCaption: arg_videoCaption, |
| 10908 videoCategoryId: arg_videoCategoryId, |
| 10909 videoDefinition: arg_videoDefinition, |
| 10910 videoDimension: arg_videoDimension, |
| 10911 videoDuration: arg_videoDuration, |
| 10912 videoEmbeddable: arg_videoEmbeddable, |
| 10913 videoLicense: arg_videoLicense, |
| 10914 videoSyndicated: arg_videoSyndicated, |
| 10915 videoType: arg_videoType) |
| 10916 .then(unittest.expectAsync1(((api.SearchListResponse response) { |
| 10502 checkSearchListResponse(response); | 10917 checkSearchListResponse(response); |
| 10503 }))); | 10918 }))); |
| 10504 }); | 10919 }); |
| 10505 | |
| 10506 }); | 10920 }); |
| 10507 | 10921 |
| 10508 | |
| 10509 unittest.group("resource-SponsorsResourceApi", () { | 10922 unittest.group("resource-SponsorsResourceApi", () { |
| 10510 unittest.test("method--list", () { | 10923 unittest.test("method--list", () { |
| 10511 | |
| 10512 var mock = new HttpServerMock(); | 10924 var mock = new HttpServerMock(); |
| 10513 api.SponsorsResourceApi res = new api.YoutubeApi(mock).sponsors; | 10925 api.SponsorsResourceApi res = new api.YoutubeApi(mock).sponsors; |
| 10514 var arg_part = "foo"; | 10926 var arg_part = "foo"; |
| 10515 var arg_filter = "foo"; | 10927 var arg_filter = "foo"; |
| 10516 var arg_maxResults = 42; | 10928 var arg_maxResults = 42; |
| 10517 var arg_pageToken = "foo"; | 10929 var arg_pageToken = "foo"; |
| 10518 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 10930 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 10519 var path = (req.url).path; | 10931 var path = (req.url).path; |
| 10520 var pathOffset = 0; | 10932 var pathOffset = 0; |
| 10521 var index; | 10933 var index; |
| 10522 var subPart; | 10934 var subPart; |
| 10523 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 10935 unittest.expect( |
| 10936 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 10524 pathOffset += 1; | 10937 pathOffset += 1; |
| 10525 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("youtube/v3/")); | 10938 unittest.expect(path.substring(pathOffset, pathOffset + 11), |
| 10939 unittest.equals("youtube/v3/")); |
| 10526 pathOffset += 11; | 10940 pathOffset += 11; |
| 10527 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("sponsors")); | 10941 unittest.expect(path.substring(pathOffset, pathOffset + 8), |
| 10942 unittest.equals("sponsors")); |
| 10528 pathOffset += 8; | 10943 pathOffset += 8; |
| 10529 | 10944 |
| 10530 var query = (req.url).query; | 10945 var query = (req.url).query; |
| 10531 var queryOffset = 0; | 10946 var queryOffset = 0; |
| 10532 var queryMap = {}; | 10947 var queryMap = {}; |
| 10533 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 10948 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 10534 parseBool(n) { | 10949 parseBool(n) { |
| 10535 if (n == "true") return true; | 10950 if (n == "true") return true; |
| 10536 if (n == "false") return false; | 10951 if (n == "false") return false; |
| 10537 if (n == null) return null; | 10952 if (n == null) return null; |
| 10538 throw new core.ArgumentError("Invalid boolean: $n"); | 10953 throw new core.ArgumentError("Invalid boolean: $n"); |
| 10539 } | 10954 } |
| 10955 |
| 10540 if (query.length > 0) { | 10956 if (query.length > 0) { |
| 10541 for (var part in query.split("&")) { | 10957 for (var part in query.split("&")) { |
| 10542 var keyvalue = part.split("="); | 10958 var keyvalue = part.split("="); |
| 10543 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 10959 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 10960 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 10544 } | 10961 } |
| 10545 } | 10962 } |
| 10546 unittest.expect(queryMap["part"].first, unittest.equals(arg_part)); | 10963 unittest.expect(queryMap["part"].first, unittest.equals(arg_part)); |
| 10547 unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); | 10964 unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); |
| 10548 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | 10965 unittest.expect(core.int.parse(queryMap["maxResults"].first), |
| 10549 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 10966 unittest.equals(arg_maxResults)); |
| 10550 | 10967 unittest.expect( |
| 10968 queryMap["pageToken"].first, unittest.equals(arg_pageToken)); |
| 10551 | 10969 |
| 10552 var h = { | 10970 var h = { |
| 10553 "content-type" : "application/json; charset=utf-8", | 10971 "content-type": "application/json; charset=utf-8", |
| 10554 }; | 10972 }; |
| 10555 var resp = convert.JSON.encode(buildSponsorListResponse()); | 10973 var resp = convert.JSON.encode(buildSponsorListResponse()); |
| 10556 return new async.Future.value(stringResponse(200, h, resp)); | 10974 return new async.Future.value(stringResponse(200, h, resp)); |
| 10557 }), true); | 10975 }), true); |
| 10558 res.list(arg_part, filter: arg_filter, maxResults: arg_maxResults, pageTok
en: arg_pageToken).then(unittest.expectAsync1(((api.SponsorListResponse response
) { | 10976 res |
| 10977 .list(arg_part, |
| 10978 filter: arg_filter, |
| 10979 maxResults: arg_maxResults, |
| 10980 pageToken: arg_pageToken) |
| 10981 .then(unittest.expectAsync1(((api.SponsorListResponse response) { |
| 10559 checkSponsorListResponse(response); | 10982 checkSponsorListResponse(response); |
| 10560 }))); | 10983 }))); |
| 10561 }); | 10984 }); |
| 10562 | |
| 10563 }); | 10985 }); |
| 10564 | 10986 |
| 10565 | |
| 10566 unittest.group("resource-SubscriptionsResourceApi", () { | 10987 unittest.group("resource-SubscriptionsResourceApi", () { |
| 10567 unittest.test("method--delete", () { | 10988 unittest.test("method--delete", () { |
| 10568 | |
| 10569 var mock = new HttpServerMock(); | 10989 var mock = new HttpServerMock(); |
| 10570 api.SubscriptionsResourceApi res = new api.YoutubeApi(mock).subscriptions; | 10990 api.SubscriptionsResourceApi res = new api.YoutubeApi(mock).subscriptions; |
| 10571 var arg_id = "foo"; | 10991 var arg_id = "foo"; |
| 10572 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 10992 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 10573 var path = (req.url).path; | 10993 var path = (req.url).path; |
| 10574 var pathOffset = 0; | 10994 var pathOffset = 0; |
| 10575 var index; | 10995 var index; |
| 10576 var subPart; | 10996 var subPart; |
| 10577 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 10997 unittest.expect( |
| 10998 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 10578 pathOffset += 1; | 10999 pathOffset += 1; |
| 10579 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("youtube/v3/")); | 11000 unittest.expect(path.substring(pathOffset, pathOffset + 11), |
| 11001 unittest.equals("youtube/v3/")); |
| 10580 pathOffset += 11; | 11002 pathOffset += 11; |
| 10581 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("subscriptions")); | 11003 unittest.expect(path.substring(pathOffset, pathOffset + 13), |
| 11004 unittest.equals("subscriptions")); |
| 10582 pathOffset += 13; | 11005 pathOffset += 13; |
| 10583 | 11006 |
| 10584 var query = (req.url).query; | 11007 var query = (req.url).query; |
| 10585 var queryOffset = 0; | 11008 var queryOffset = 0; |
| 10586 var queryMap = {}; | 11009 var queryMap = {}; |
| 10587 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 11010 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 10588 parseBool(n) { | 11011 parseBool(n) { |
| 10589 if (n == "true") return true; | 11012 if (n == "true") return true; |
| 10590 if (n == "false") return false; | 11013 if (n == "false") return false; |
| 10591 if (n == null) return null; | 11014 if (n == null) return null; |
| 10592 throw new core.ArgumentError("Invalid boolean: $n"); | 11015 throw new core.ArgumentError("Invalid boolean: $n"); |
| 10593 } | 11016 } |
| 11017 |
| 10594 if (query.length > 0) { | 11018 if (query.length > 0) { |
| 10595 for (var part in query.split("&")) { | 11019 for (var part in query.split("&")) { |
| 10596 var keyvalue = part.split("="); | 11020 var keyvalue = part.split("="); |
| 10597 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 11021 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 11022 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 10598 } | 11023 } |
| 10599 } | 11024 } |
| 10600 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); | 11025 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); |
| 10601 | 11026 |
| 10602 | |
| 10603 var h = { | 11027 var h = { |
| 10604 "content-type" : "application/json; charset=utf-8", | 11028 "content-type": "application/json; charset=utf-8", |
| 10605 }; | 11029 }; |
| 10606 var resp = ""; | 11030 var resp = ""; |
| 10607 return new async.Future.value(stringResponse(200, h, resp)); | 11031 return new async.Future.value(stringResponse(200, h, resp)); |
| 10608 }), true); | 11032 }), true); |
| 10609 res.delete(arg_id).then(unittest.expectAsync1((_) {})); | 11033 res.delete(arg_id).then(unittest.expectAsync1((_) {})); |
| 10610 }); | 11034 }); |
| 10611 | 11035 |
| 10612 unittest.test("method--insert", () { | 11036 unittest.test("method--insert", () { |
| 10613 | |
| 10614 var mock = new HttpServerMock(); | 11037 var mock = new HttpServerMock(); |
| 10615 api.SubscriptionsResourceApi res = new api.YoutubeApi(mock).subscriptions; | 11038 api.SubscriptionsResourceApi res = new api.YoutubeApi(mock).subscriptions; |
| 10616 var arg_request = buildSubscription(); | 11039 var arg_request = buildSubscription(); |
| 10617 var arg_part = "foo"; | 11040 var arg_part = "foo"; |
| 10618 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 11041 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 10619 var obj = new api.Subscription.fromJson(json); | 11042 var obj = new api.Subscription.fromJson(json); |
| 10620 checkSubscription(obj); | 11043 checkSubscription(obj); |
| 10621 | 11044 |
| 10622 var path = (req.url).path; | 11045 var path = (req.url).path; |
| 10623 var pathOffset = 0; | 11046 var pathOffset = 0; |
| 10624 var index; | 11047 var index; |
| 10625 var subPart; | 11048 var subPart; |
| 10626 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 11049 unittest.expect( |
| 11050 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 10627 pathOffset += 1; | 11051 pathOffset += 1; |
| 10628 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("youtube/v3/")); | 11052 unittest.expect(path.substring(pathOffset, pathOffset + 11), |
| 11053 unittest.equals("youtube/v3/")); |
| 10629 pathOffset += 11; | 11054 pathOffset += 11; |
| 10630 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("subscriptions")); | 11055 unittest.expect(path.substring(pathOffset, pathOffset + 13), |
| 11056 unittest.equals("subscriptions")); |
| 10631 pathOffset += 13; | 11057 pathOffset += 13; |
| 10632 | 11058 |
| 10633 var query = (req.url).query; | 11059 var query = (req.url).query; |
| 10634 var queryOffset = 0; | 11060 var queryOffset = 0; |
| 10635 var queryMap = {}; | 11061 var queryMap = {}; |
| 10636 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 11062 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 10637 parseBool(n) { | 11063 parseBool(n) { |
| 10638 if (n == "true") return true; | 11064 if (n == "true") return true; |
| 10639 if (n == "false") return false; | 11065 if (n == "false") return false; |
| 10640 if (n == null) return null; | 11066 if (n == null) return null; |
| 10641 throw new core.ArgumentError("Invalid boolean: $n"); | 11067 throw new core.ArgumentError("Invalid boolean: $n"); |
| 10642 } | 11068 } |
| 11069 |
| 10643 if (query.length > 0) { | 11070 if (query.length > 0) { |
| 10644 for (var part in query.split("&")) { | 11071 for (var part in query.split("&")) { |
| 10645 var keyvalue = part.split("="); | 11072 var keyvalue = part.split("="); |
| 10646 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 11073 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 11074 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 10647 } | 11075 } |
| 10648 } | 11076 } |
| 10649 unittest.expect(queryMap["part"].first, unittest.equals(arg_part)); | 11077 unittest.expect(queryMap["part"].first, unittest.equals(arg_part)); |
| 10650 | 11078 |
| 10651 | |
| 10652 var h = { | 11079 var h = { |
| 10653 "content-type" : "application/json; charset=utf-8", | 11080 "content-type": "application/json; charset=utf-8", |
| 10654 }; | 11081 }; |
| 10655 var resp = convert.JSON.encode(buildSubscription()); | 11082 var resp = convert.JSON.encode(buildSubscription()); |
| 10656 return new async.Future.value(stringResponse(200, h, resp)); | 11083 return new async.Future.value(stringResponse(200, h, resp)); |
| 10657 }), true); | 11084 }), true); |
| 10658 res.insert(arg_request, arg_part).then(unittest.expectAsync1(((api.Subscri
ption response) { | 11085 res |
| 11086 .insert(arg_request, arg_part) |
| 11087 .then(unittest.expectAsync1(((api.Subscription response) { |
| 10659 checkSubscription(response); | 11088 checkSubscription(response); |
| 10660 }))); | 11089 }))); |
| 10661 }); | 11090 }); |
| 10662 | 11091 |
| 10663 unittest.test("method--list", () { | 11092 unittest.test("method--list", () { |
| 10664 | |
| 10665 var mock = new HttpServerMock(); | 11093 var mock = new HttpServerMock(); |
| 10666 api.SubscriptionsResourceApi res = new api.YoutubeApi(mock).subscriptions; | 11094 api.SubscriptionsResourceApi res = new api.YoutubeApi(mock).subscriptions; |
| 10667 var arg_part = "foo"; | 11095 var arg_part = "foo"; |
| 10668 var arg_channelId = "foo"; | 11096 var arg_channelId = "foo"; |
| 10669 var arg_forChannelId = "foo"; | 11097 var arg_forChannelId = "foo"; |
| 10670 var arg_id = "foo"; | 11098 var arg_id = "foo"; |
| 10671 var arg_maxResults = 42; | 11099 var arg_maxResults = 42; |
| 10672 var arg_mine = true; | 11100 var arg_mine = true; |
| 10673 var arg_myRecentSubscribers = true; | 11101 var arg_myRecentSubscribers = true; |
| 10674 var arg_mySubscribers = true; | 11102 var arg_mySubscribers = true; |
| 10675 var arg_onBehalfOfContentOwner = "foo"; | 11103 var arg_onBehalfOfContentOwner = "foo"; |
| 10676 var arg_onBehalfOfContentOwnerChannel = "foo"; | 11104 var arg_onBehalfOfContentOwnerChannel = "foo"; |
| 10677 var arg_order = "foo"; | 11105 var arg_order = "foo"; |
| 10678 var arg_pageToken = "foo"; | 11106 var arg_pageToken = "foo"; |
| 10679 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 11107 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 10680 var path = (req.url).path; | 11108 var path = (req.url).path; |
| 10681 var pathOffset = 0; | 11109 var pathOffset = 0; |
| 10682 var index; | 11110 var index; |
| 10683 var subPart; | 11111 var subPart; |
| 10684 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 11112 unittest.expect( |
| 11113 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 10685 pathOffset += 1; | 11114 pathOffset += 1; |
| 10686 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("youtube/v3/")); | 11115 unittest.expect(path.substring(pathOffset, pathOffset + 11), |
| 11116 unittest.equals("youtube/v3/")); |
| 10687 pathOffset += 11; | 11117 pathOffset += 11; |
| 10688 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("subscriptions")); | 11118 unittest.expect(path.substring(pathOffset, pathOffset + 13), |
| 11119 unittest.equals("subscriptions")); |
| 10689 pathOffset += 13; | 11120 pathOffset += 13; |
| 10690 | 11121 |
| 10691 var query = (req.url).query; | 11122 var query = (req.url).query; |
| 10692 var queryOffset = 0; | 11123 var queryOffset = 0; |
| 10693 var queryMap = {}; | 11124 var queryMap = {}; |
| 10694 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 11125 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 10695 parseBool(n) { | 11126 parseBool(n) { |
| 10696 if (n == "true") return true; | 11127 if (n == "true") return true; |
| 10697 if (n == "false") return false; | 11128 if (n == "false") return false; |
| 10698 if (n == null) return null; | 11129 if (n == null) return null; |
| 10699 throw new core.ArgumentError("Invalid boolean: $n"); | 11130 throw new core.ArgumentError("Invalid boolean: $n"); |
| 10700 } | 11131 } |
| 11132 |
| 10701 if (query.length > 0) { | 11133 if (query.length > 0) { |
| 10702 for (var part in query.split("&")) { | 11134 for (var part in query.split("&")) { |
| 10703 var keyvalue = part.split("="); | 11135 var keyvalue = part.split("="); |
| 10704 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 11136 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 11137 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 10705 } | 11138 } |
| 10706 } | 11139 } |
| 10707 unittest.expect(queryMap["part"].first, unittest.equals(arg_part)); | 11140 unittest.expect(queryMap["part"].first, unittest.equals(arg_part)); |
| 10708 unittest.expect(queryMap["channelId"].first, unittest.equals(arg_channel
Id)); | 11141 unittest.expect( |
| 10709 unittest.expect(queryMap["forChannelId"].first, unittest.equals(arg_forC
hannelId)); | 11142 queryMap["channelId"].first, unittest.equals(arg_channelId)); |
| 11143 unittest.expect( |
| 11144 queryMap["forChannelId"].first, unittest.equals(arg_forChannelId)); |
| 10710 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); | 11145 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); |
| 10711 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | 11146 unittest.expect(core.int.parse(queryMap["maxResults"].first), |
| 11147 unittest.equals(arg_maxResults)); |
| 10712 unittest.expect(queryMap["mine"].first, unittest.equals("$arg_mine")); | 11148 unittest.expect(queryMap["mine"].first, unittest.equals("$arg_mine")); |
| 10713 unittest.expect(queryMap["myRecentSubscribers"].first, unittest.equals("
$arg_myRecentSubscribers")); | 11149 unittest.expect(queryMap["myRecentSubscribers"].first, |
| 10714 unittest.expect(queryMap["mySubscribers"].first, unittest.equals("$arg_m
ySubscribers")); | 11150 unittest.equals("$arg_myRecentSubscribers")); |
| 10715 unittest.expect(queryMap["onBehalfOfContentOwner"].first, unittest.equal
s(arg_onBehalfOfContentOwner)); | 11151 unittest.expect(queryMap["mySubscribers"].first, |
| 10716 unittest.expect(queryMap["onBehalfOfContentOwnerChannel"].first, unittes
t.equals(arg_onBehalfOfContentOwnerChannel)); | 11152 unittest.equals("$arg_mySubscribers")); |
| 11153 unittest.expect(queryMap["onBehalfOfContentOwner"].first, |
| 11154 unittest.equals(arg_onBehalfOfContentOwner)); |
| 11155 unittest.expect(queryMap["onBehalfOfContentOwnerChannel"].first, |
| 11156 unittest.equals(arg_onBehalfOfContentOwnerChannel)); |
| 10717 unittest.expect(queryMap["order"].first, unittest.equals(arg_order)); | 11157 unittest.expect(queryMap["order"].first, unittest.equals(arg_order)); |
| 10718 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 11158 unittest.expect( |
| 10719 | 11159 queryMap["pageToken"].first, unittest.equals(arg_pageToken)); |
| 10720 | 11160 |
| 10721 var h = { | 11161 var h = { |
| 10722 "content-type" : "application/json; charset=utf-8", | 11162 "content-type": "application/json; charset=utf-8", |
| 10723 }; | 11163 }; |
| 10724 var resp = convert.JSON.encode(buildSubscriptionListResponse()); | 11164 var resp = convert.JSON.encode(buildSubscriptionListResponse()); |
| 10725 return new async.Future.value(stringResponse(200, h, resp)); | 11165 return new async.Future.value(stringResponse(200, h, resp)); |
| 10726 }), true); | 11166 }), true); |
| 10727 res.list(arg_part, channelId: arg_channelId, forChannelId: arg_forChannelI
d, id: arg_id, maxResults: arg_maxResults, mine: arg_mine, myRecentSubscribers:
arg_myRecentSubscribers, mySubscribers: arg_mySubscribers, onBehalfOfContentOwne
r: arg_onBehalfOfContentOwner, onBehalfOfContentOwnerChannel: arg_onBehalfOfCont
entOwnerChannel, order: arg_order, pageToken: arg_pageToken).then(unittest.expec
tAsync1(((api.SubscriptionListResponse response) { | 11167 res |
| 11168 .list(arg_part, |
| 11169 channelId: arg_channelId, |
| 11170 forChannelId: arg_forChannelId, |
| 11171 id: arg_id, |
| 11172 maxResults: arg_maxResults, |
| 11173 mine: arg_mine, |
| 11174 myRecentSubscribers: arg_myRecentSubscribers, |
| 11175 mySubscribers: arg_mySubscribers, |
| 11176 onBehalfOfContentOwner: arg_onBehalfOfContentOwner, |
| 11177 onBehalfOfContentOwnerChannel: arg_onBehalfOfContentOwnerChannel, |
| 11178 order: arg_order, |
| 11179 pageToken: arg_pageToken) |
| 11180 .then(unittest.expectAsync1(((api.SubscriptionListResponse response) { |
| 10728 checkSubscriptionListResponse(response); | 11181 checkSubscriptionListResponse(response); |
| 10729 }))); | 11182 }))); |
| 10730 }); | 11183 }); |
| 10731 | |
| 10732 }); | 11184 }); |
| 10733 | 11185 |
| 10734 | |
| 10735 unittest.group("resource-SuperChatEventsResourceApi", () { | 11186 unittest.group("resource-SuperChatEventsResourceApi", () { |
| 10736 unittest.test("method--list", () { | 11187 unittest.test("method--list", () { |
| 10737 | |
| 10738 var mock = new HttpServerMock(); | 11188 var mock = new HttpServerMock(); |
| 10739 api.SuperChatEventsResourceApi res = new api.YoutubeApi(mock).superChatEve
nts; | 11189 api.SuperChatEventsResourceApi res = |
| 11190 new api.YoutubeApi(mock).superChatEvents; |
| 10740 var arg_part = "foo"; | 11191 var arg_part = "foo"; |
| 10741 var arg_hl = "foo"; | 11192 var arg_hl = "foo"; |
| 10742 var arg_maxResults = 42; | 11193 var arg_maxResults = 42; |
| 10743 var arg_pageToken = "foo"; | 11194 var arg_pageToken = "foo"; |
| 10744 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 11195 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 10745 var path = (req.url).path; | 11196 var path = (req.url).path; |
| 10746 var pathOffset = 0; | 11197 var pathOffset = 0; |
| 10747 var index; | 11198 var index; |
| 10748 var subPart; | 11199 var subPart; |
| 10749 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 11200 unittest.expect( |
| 11201 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 10750 pathOffset += 1; | 11202 pathOffset += 1; |
| 10751 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("youtube/v3/")); | 11203 unittest.expect(path.substring(pathOffset, pathOffset + 11), |
| 11204 unittest.equals("youtube/v3/")); |
| 10752 pathOffset += 11; | 11205 pathOffset += 11; |
| 10753 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("superChatEvents")); | 11206 unittest.expect(path.substring(pathOffset, pathOffset + 15), |
| 11207 unittest.equals("superChatEvents")); |
| 10754 pathOffset += 15; | 11208 pathOffset += 15; |
| 10755 | 11209 |
| 10756 var query = (req.url).query; | 11210 var query = (req.url).query; |
| 10757 var queryOffset = 0; | 11211 var queryOffset = 0; |
| 10758 var queryMap = {}; | 11212 var queryMap = {}; |
| 10759 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 11213 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 10760 parseBool(n) { | 11214 parseBool(n) { |
| 10761 if (n == "true") return true; | 11215 if (n == "true") return true; |
| 10762 if (n == "false") return false; | 11216 if (n == "false") return false; |
| 10763 if (n == null) return null; | 11217 if (n == null) return null; |
| 10764 throw new core.ArgumentError("Invalid boolean: $n"); | 11218 throw new core.ArgumentError("Invalid boolean: $n"); |
| 10765 } | 11219 } |
| 11220 |
| 10766 if (query.length > 0) { | 11221 if (query.length > 0) { |
| 10767 for (var part in query.split("&")) { | 11222 for (var part in query.split("&")) { |
| 10768 var keyvalue = part.split("="); | 11223 var keyvalue = part.split("="); |
| 10769 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 11224 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 11225 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 10770 } | 11226 } |
| 10771 } | 11227 } |
| 10772 unittest.expect(queryMap["part"].first, unittest.equals(arg_part)); | 11228 unittest.expect(queryMap["part"].first, unittest.equals(arg_part)); |
| 10773 unittest.expect(queryMap["hl"].first, unittest.equals(arg_hl)); | 11229 unittest.expect(queryMap["hl"].first, unittest.equals(arg_hl)); |
| 10774 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | 11230 unittest.expect(core.int.parse(queryMap["maxResults"].first), |
| 10775 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 11231 unittest.equals(arg_maxResults)); |
| 10776 | 11232 unittest.expect( |
| 11233 queryMap["pageToken"].first, unittest.equals(arg_pageToken)); |
| 10777 | 11234 |
| 10778 var h = { | 11235 var h = { |
| 10779 "content-type" : "application/json; charset=utf-8", | 11236 "content-type": "application/json; charset=utf-8", |
| 10780 }; | 11237 }; |
| 10781 var resp = convert.JSON.encode(buildSuperChatEventListResponse()); | 11238 var resp = convert.JSON.encode(buildSuperChatEventListResponse()); |
| 10782 return new async.Future.value(stringResponse(200, h, resp)); | 11239 return new async.Future.value(stringResponse(200, h, resp)); |
| 10783 }), true); | 11240 }), true); |
| 10784 res.list(arg_part, hl: arg_hl, maxResults: arg_maxResults, pageToken: arg_
pageToken).then(unittest.expectAsync1(((api.SuperChatEventListResponse response)
{ | 11241 res |
| 11242 .list(arg_part, |
| 11243 hl: arg_hl, maxResults: arg_maxResults, pageToken: arg_pageToken) |
| 11244 .then( |
| 11245 unittest.expectAsync1(((api.SuperChatEventListResponse response) { |
| 10785 checkSuperChatEventListResponse(response); | 11246 checkSuperChatEventListResponse(response); |
| 10786 }))); | 11247 }))); |
| 10787 }); | 11248 }); |
| 10788 | |
| 10789 }); | 11249 }); |
| 10790 | 11250 |
| 10791 | |
| 10792 unittest.group("resource-ThumbnailsResourceApi", () { | 11251 unittest.group("resource-ThumbnailsResourceApi", () { |
| 10793 unittest.test("method--set", () { | 11252 unittest.test("method--set", () { |
| 10794 // TODO: Implement tests for media upload; | 11253 // TODO: Implement tests for media upload; |
| 10795 // TODO: Implement tests for media download; | 11254 // TODO: Implement tests for media download; |
| 10796 | 11255 |
| 10797 var mock = new HttpServerMock(); | 11256 var mock = new HttpServerMock(); |
| 10798 api.ThumbnailsResourceApi res = new api.YoutubeApi(mock).thumbnails; | 11257 api.ThumbnailsResourceApi res = new api.YoutubeApi(mock).thumbnails; |
| 10799 var arg_videoId = "foo"; | 11258 var arg_videoId = "foo"; |
| 10800 var arg_onBehalfOfContentOwner = "foo"; | 11259 var arg_onBehalfOfContentOwner = "foo"; |
| 10801 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 11260 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 10802 var path = (req.url).path; | 11261 var path = (req.url).path; |
| 10803 var pathOffset = 0; | 11262 var pathOffset = 0; |
| 10804 var index; | 11263 var index; |
| 10805 var subPart; | 11264 var subPart; |
| 10806 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 11265 unittest.expect( |
| 11266 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 10807 pathOffset += 1; | 11267 pathOffset += 1; |
| 10808 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("youtube/v3/")); | 11268 unittest.expect(path.substring(pathOffset, pathOffset + 11), |
| 11269 unittest.equals("youtube/v3/")); |
| 10809 pathOffset += 11; | 11270 pathOffset += 11; |
| 10810 unittest.expect(path.substring(pathOffset, pathOffset + 14), unittest.eq
uals("thumbnails/set")); | 11271 unittest.expect(path.substring(pathOffset, pathOffset + 14), |
| 11272 unittest.equals("thumbnails/set")); |
| 10811 pathOffset += 14; | 11273 pathOffset += 14; |
| 10812 | 11274 |
| 10813 var query = (req.url).query; | 11275 var query = (req.url).query; |
| 10814 var queryOffset = 0; | 11276 var queryOffset = 0; |
| 10815 var queryMap = {}; | 11277 var queryMap = {}; |
| 10816 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 11278 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 10817 parseBool(n) { | 11279 parseBool(n) { |
| 10818 if (n == "true") return true; | 11280 if (n == "true") return true; |
| 10819 if (n == "false") return false; | 11281 if (n == "false") return false; |
| 10820 if (n == null) return null; | 11282 if (n == null) return null; |
| 10821 throw new core.ArgumentError("Invalid boolean: $n"); | 11283 throw new core.ArgumentError("Invalid boolean: $n"); |
| 10822 } | 11284 } |
| 11285 |
| 10823 if (query.length > 0) { | 11286 if (query.length > 0) { |
| 10824 for (var part in query.split("&")) { | 11287 for (var part in query.split("&")) { |
| 10825 var keyvalue = part.split("="); | 11288 var keyvalue = part.split("="); |
| 10826 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 11289 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 11290 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 10827 } | 11291 } |
| 10828 } | 11292 } |
| 10829 unittest.expect(queryMap["videoId"].first, unittest.equals(arg_videoId))
; | 11293 unittest.expect( |
| 10830 unittest.expect(queryMap["onBehalfOfContentOwner"].first, unittest.equal
s(arg_onBehalfOfContentOwner)); | 11294 queryMap["videoId"].first, unittest.equals(arg_videoId)); |
| 10831 | 11295 unittest.expect(queryMap["onBehalfOfContentOwner"].first, |
| 11296 unittest.equals(arg_onBehalfOfContentOwner)); |
| 10832 | 11297 |
| 10833 var h = { | 11298 var h = { |
| 10834 "content-type" : "application/json; charset=utf-8", | 11299 "content-type": "application/json; charset=utf-8", |
| 10835 }; | 11300 }; |
| 10836 var resp = convert.JSON.encode(buildThumbnailSetResponse()); | 11301 var resp = convert.JSON.encode(buildThumbnailSetResponse()); |
| 10837 return new async.Future.value(stringResponse(200, h, resp)); | 11302 return new async.Future.value(stringResponse(200, h, resp)); |
| 10838 }), true); | 11303 }), true); |
| 10839 res.set(arg_videoId, onBehalfOfContentOwner: arg_onBehalfOfContentOwner).t
hen(unittest.expectAsync1(((api.ThumbnailSetResponse response) { | 11304 res |
| 11305 .set(arg_videoId, onBehalfOfContentOwner: arg_onBehalfOfContentOwner) |
| 11306 .then(unittest.expectAsync1(((api.ThumbnailSetResponse response) { |
| 10840 checkThumbnailSetResponse(response); | 11307 checkThumbnailSetResponse(response); |
| 10841 }))); | 11308 }))); |
| 10842 }); | 11309 }); |
| 10843 | |
| 10844 }); | 11310 }); |
| 10845 | 11311 |
| 10846 | |
| 10847 unittest.group("resource-VideoAbuseReportReasonsResourceApi", () { | 11312 unittest.group("resource-VideoAbuseReportReasonsResourceApi", () { |
| 10848 unittest.test("method--list", () { | 11313 unittest.test("method--list", () { |
| 10849 | |
| 10850 var mock = new HttpServerMock(); | 11314 var mock = new HttpServerMock(); |
| 10851 api.VideoAbuseReportReasonsResourceApi res = new api.YoutubeApi(mock).vide
oAbuseReportReasons; | 11315 api.VideoAbuseReportReasonsResourceApi res = |
| 11316 new api.YoutubeApi(mock).videoAbuseReportReasons; |
| 10852 var arg_part = "foo"; | 11317 var arg_part = "foo"; |
| 10853 var arg_hl = "foo"; | 11318 var arg_hl = "foo"; |
| 10854 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 11319 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 10855 var path = (req.url).path; | 11320 var path = (req.url).path; |
| 10856 var pathOffset = 0; | 11321 var pathOffset = 0; |
| 10857 var index; | 11322 var index; |
| 10858 var subPart; | 11323 var subPart; |
| 10859 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 11324 unittest.expect( |
| 11325 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 10860 pathOffset += 1; | 11326 pathOffset += 1; |
| 10861 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("youtube/v3/")); | 11327 unittest.expect(path.substring(pathOffset, pathOffset + 11), |
| 11328 unittest.equals("youtube/v3/")); |
| 10862 pathOffset += 11; | 11329 pathOffset += 11; |
| 10863 unittest.expect(path.substring(pathOffset, pathOffset + 23), unittest.eq
uals("videoAbuseReportReasons")); | 11330 unittest.expect(path.substring(pathOffset, pathOffset + 23), |
| 11331 unittest.equals("videoAbuseReportReasons")); |
| 10864 pathOffset += 23; | 11332 pathOffset += 23; |
| 10865 | 11333 |
| 10866 var query = (req.url).query; | 11334 var query = (req.url).query; |
| 10867 var queryOffset = 0; | 11335 var queryOffset = 0; |
| 10868 var queryMap = {}; | 11336 var queryMap = {}; |
| 10869 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 11337 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 10870 parseBool(n) { | 11338 parseBool(n) { |
| 10871 if (n == "true") return true; | 11339 if (n == "true") return true; |
| 10872 if (n == "false") return false; | 11340 if (n == "false") return false; |
| 10873 if (n == null) return null; | 11341 if (n == null) return null; |
| 10874 throw new core.ArgumentError("Invalid boolean: $n"); | 11342 throw new core.ArgumentError("Invalid boolean: $n"); |
| 10875 } | 11343 } |
| 11344 |
| 10876 if (query.length > 0) { | 11345 if (query.length > 0) { |
| 10877 for (var part in query.split("&")) { | 11346 for (var part in query.split("&")) { |
| 10878 var keyvalue = part.split("="); | 11347 var keyvalue = part.split("="); |
| 10879 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 11348 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 11349 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 10880 } | 11350 } |
| 10881 } | 11351 } |
| 10882 unittest.expect(queryMap["part"].first, unittest.equals(arg_part)); | 11352 unittest.expect(queryMap["part"].first, unittest.equals(arg_part)); |
| 10883 unittest.expect(queryMap["hl"].first, unittest.equals(arg_hl)); | 11353 unittest.expect(queryMap["hl"].first, unittest.equals(arg_hl)); |
| 10884 | 11354 |
| 10885 | |
| 10886 var h = { | 11355 var h = { |
| 10887 "content-type" : "application/json; charset=utf-8", | 11356 "content-type": "application/json; charset=utf-8", |
| 10888 }; | 11357 }; |
| 10889 var resp = convert.JSON.encode(buildVideoAbuseReportReasonListResponse()
); | 11358 var resp = |
| 11359 convert.JSON.encode(buildVideoAbuseReportReasonListResponse()); |
| 10890 return new async.Future.value(stringResponse(200, h, resp)); | 11360 return new async.Future.value(stringResponse(200, h, resp)); |
| 10891 }), true); | 11361 }), true); |
| 10892 res.list(arg_part, hl: arg_hl).then(unittest.expectAsync1(((api.VideoAbuse
ReportReasonListResponse response) { | 11362 res.list(arg_part, hl: arg_hl).then(unittest |
| 11363 .expectAsync1(((api.VideoAbuseReportReasonListResponse response) { |
| 10893 checkVideoAbuseReportReasonListResponse(response); | 11364 checkVideoAbuseReportReasonListResponse(response); |
| 10894 }))); | 11365 }))); |
| 10895 }); | 11366 }); |
| 10896 | |
| 10897 }); | 11367 }); |
| 10898 | 11368 |
| 10899 | |
| 10900 unittest.group("resource-VideoCategoriesResourceApi", () { | 11369 unittest.group("resource-VideoCategoriesResourceApi", () { |
| 10901 unittest.test("method--list", () { | 11370 unittest.test("method--list", () { |
| 10902 | |
| 10903 var mock = new HttpServerMock(); | 11371 var mock = new HttpServerMock(); |
| 10904 api.VideoCategoriesResourceApi res = new api.YoutubeApi(mock).videoCategor
ies; | 11372 api.VideoCategoriesResourceApi res = |
| 11373 new api.YoutubeApi(mock).videoCategories; |
| 10905 var arg_part = "foo"; | 11374 var arg_part = "foo"; |
| 10906 var arg_hl = "foo"; | 11375 var arg_hl = "foo"; |
| 10907 var arg_id = "foo"; | 11376 var arg_id = "foo"; |
| 10908 var arg_regionCode = "foo"; | 11377 var arg_regionCode = "foo"; |
| 10909 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 11378 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 10910 var path = (req.url).path; | 11379 var path = (req.url).path; |
| 10911 var pathOffset = 0; | 11380 var pathOffset = 0; |
| 10912 var index; | 11381 var index; |
| 10913 var subPart; | 11382 var subPart; |
| 10914 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 11383 unittest.expect( |
| 11384 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 10915 pathOffset += 1; | 11385 pathOffset += 1; |
| 10916 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("youtube/v3/")); | 11386 unittest.expect(path.substring(pathOffset, pathOffset + 11), |
| 11387 unittest.equals("youtube/v3/")); |
| 10917 pathOffset += 11; | 11388 pathOffset += 11; |
| 10918 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("videoCategories")); | 11389 unittest.expect(path.substring(pathOffset, pathOffset + 15), |
| 11390 unittest.equals("videoCategories")); |
| 10919 pathOffset += 15; | 11391 pathOffset += 15; |
| 10920 | 11392 |
| 10921 var query = (req.url).query; | 11393 var query = (req.url).query; |
| 10922 var queryOffset = 0; | 11394 var queryOffset = 0; |
| 10923 var queryMap = {}; | 11395 var queryMap = {}; |
| 10924 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 11396 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 10925 parseBool(n) { | 11397 parseBool(n) { |
| 10926 if (n == "true") return true; | 11398 if (n == "true") return true; |
| 10927 if (n == "false") return false; | 11399 if (n == "false") return false; |
| 10928 if (n == null) return null; | 11400 if (n == null) return null; |
| 10929 throw new core.ArgumentError("Invalid boolean: $n"); | 11401 throw new core.ArgumentError("Invalid boolean: $n"); |
| 10930 } | 11402 } |
| 11403 |
| 10931 if (query.length > 0) { | 11404 if (query.length > 0) { |
| 10932 for (var part in query.split("&")) { | 11405 for (var part in query.split("&")) { |
| 10933 var keyvalue = part.split("="); | 11406 var keyvalue = part.split("="); |
| 10934 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 11407 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 11408 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 10935 } | 11409 } |
| 10936 } | 11410 } |
| 10937 unittest.expect(queryMap["part"].first, unittest.equals(arg_part)); | 11411 unittest.expect(queryMap["part"].first, unittest.equals(arg_part)); |
| 10938 unittest.expect(queryMap["hl"].first, unittest.equals(arg_hl)); | 11412 unittest.expect(queryMap["hl"].first, unittest.equals(arg_hl)); |
| 10939 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); | 11413 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); |
| 10940 unittest.expect(queryMap["regionCode"].first, unittest.equals(arg_region
Code)); | 11414 unittest.expect( |
| 10941 | 11415 queryMap["regionCode"].first, unittest.equals(arg_regionCode)); |
| 10942 | 11416 |
| 10943 var h = { | 11417 var h = { |
| 10944 "content-type" : "application/json; charset=utf-8", | 11418 "content-type": "application/json; charset=utf-8", |
| 10945 }; | 11419 }; |
| 10946 var resp = convert.JSON.encode(buildVideoCategoryListResponse()); | 11420 var resp = convert.JSON.encode(buildVideoCategoryListResponse()); |
| 10947 return new async.Future.value(stringResponse(200, h, resp)); | 11421 return new async.Future.value(stringResponse(200, h, resp)); |
| 10948 }), true); | 11422 }), true); |
| 10949 res.list(arg_part, hl: arg_hl, id: arg_id, regionCode: arg_regionCode).the
n(unittest.expectAsync1(((api.VideoCategoryListResponse response) { | 11423 res |
| 11424 .list(arg_part, hl: arg_hl, id: arg_id, regionCode: arg_regionCode) |
| 11425 .then( |
| 11426 unittest.expectAsync1(((api.VideoCategoryListResponse response) { |
| 10950 checkVideoCategoryListResponse(response); | 11427 checkVideoCategoryListResponse(response); |
| 10951 }))); | 11428 }))); |
| 10952 }); | 11429 }); |
| 10953 | |
| 10954 }); | 11430 }); |
| 10955 | 11431 |
| 10956 | |
| 10957 unittest.group("resource-VideosResourceApi", () { | 11432 unittest.group("resource-VideosResourceApi", () { |
| 10958 unittest.test("method--delete", () { | 11433 unittest.test("method--delete", () { |
| 10959 | |
| 10960 var mock = new HttpServerMock(); | 11434 var mock = new HttpServerMock(); |
| 10961 api.VideosResourceApi res = new api.YoutubeApi(mock).videos; | 11435 api.VideosResourceApi res = new api.YoutubeApi(mock).videos; |
| 10962 var arg_id = "foo"; | 11436 var arg_id = "foo"; |
| 10963 var arg_onBehalfOfContentOwner = "foo"; | 11437 var arg_onBehalfOfContentOwner = "foo"; |
| 10964 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 11438 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 10965 var path = (req.url).path; | 11439 var path = (req.url).path; |
| 10966 var pathOffset = 0; | 11440 var pathOffset = 0; |
| 10967 var index; | 11441 var index; |
| 10968 var subPart; | 11442 var subPart; |
| 10969 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 11443 unittest.expect( |
| 11444 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 10970 pathOffset += 1; | 11445 pathOffset += 1; |
| 10971 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("youtube/v3/")); | 11446 unittest.expect(path.substring(pathOffset, pathOffset + 11), |
| 11447 unittest.equals("youtube/v3/")); |
| 10972 pathOffset += 11; | 11448 pathOffset += 11; |
| 10973 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ
als("videos")); | 11449 unittest.expect(path.substring(pathOffset, pathOffset + 6), |
| 11450 unittest.equals("videos")); |
| 10974 pathOffset += 6; | 11451 pathOffset += 6; |
| 10975 | 11452 |
| 10976 var query = (req.url).query; | 11453 var query = (req.url).query; |
| 10977 var queryOffset = 0; | 11454 var queryOffset = 0; |
| 10978 var queryMap = {}; | 11455 var queryMap = {}; |
| 10979 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 11456 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 10980 parseBool(n) { | 11457 parseBool(n) { |
| 10981 if (n == "true") return true; | 11458 if (n == "true") return true; |
| 10982 if (n == "false") return false; | 11459 if (n == "false") return false; |
| 10983 if (n == null) return null; | 11460 if (n == null) return null; |
| 10984 throw new core.ArgumentError("Invalid boolean: $n"); | 11461 throw new core.ArgumentError("Invalid boolean: $n"); |
| 10985 } | 11462 } |
| 11463 |
| 10986 if (query.length > 0) { | 11464 if (query.length > 0) { |
| 10987 for (var part in query.split("&")) { | 11465 for (var part in query.split("&")) { |
| 10988 var keyvalue = part.split("="); | 11466 var keyvalue = part.split("="); |
| 10989 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 11467 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 11468 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 10990 } | 11469 } |
| 10991 } | 11470 } |
| 10992 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); | 11471 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); |
| 10993 unittest.expect(queryMap["onBehalfOfContentOwner"].first, unittest.equal
s(arg_onBehalfOfContentOwner)); | 11472 unittest.expect(queryMap["onBehalfOfContentOwner"].first, |
| 10994 | 11473 unittest.equals(arg_onBehalfOfContentOwner)); |
| 10995 | 11474 |
| 10996 var h = { | 11475 var h = { |
| 10997 "content-type" : "application/json; charset=utf-8", | 11476 "content-type": "application/json; charset=utf-8", |
| 10998 }; | 11477 }; |
| 10999 var resp = ""; | 11478 var resp = ""; |
| 11000 return new async.Future.value(stringResponse(200, h, resp)); | 11479 return new async.Future.value(stringResponse(200, h, resp)); |
| 11001 }), true); | 11480 }), true); |
| 11002 res.delete(arg_id, onBehalfOfContentOwner: arg_onBehalfOfContentOwner).the
n(unittest.expectAsync1((_) {})); | 11481 res |
| 11482 .delete(arg_id, onBehalfOfContentOwner: arg_onBehalfOfContentOwner) |
| 11483 .then(unittest.expectAsync1((_) {})); |
| 11003 }); | 11484 }); |
| 11004 | 11485 |
| 11005 unittest.test("method--getRating", () { | 11486 unittest.test("method--getRating", () { |
| 11006 | |
| 11007 var mock = new HttpServerMock(); | 11487 var mock = new HttpServerMock(); |
| 11008 api.VideosResourceApi res = new api.YoutubeApi(mock).videos; | 11488 api.VideosResourceApi res = new api.YoutubeApi(mock).videos; |
| 11009 var arg_id = "foo"; | 11489 var arg_id = "foo"; |
| 11010 var arg_onBehalfOfContentOwner = "foo"; | 11490 var arg_onBehalfOfContentOwner = "foo"; |
| 11011 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 11491 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 11012 var path = (req.url).path; | 11492 var path = (req.url).path; |
| 11013 var pathOffset = 0; | 11493 var pathOffset = 0; |
| 11014 var index; | 11494 var index; |
| 11015 var subPart; | 11495 var subPart; |
| 11016 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 11496 unittest.expect( |
| 11497 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 11017 pathOffset += 1; | 11498 pathOffset += 1; |
| 11018 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("youtube/v3/")); | 11499 unittest.expect(path.substring(pathOffset, pathOffset + 11), |
| 11500 unittest.equals("youtube/v3/")); |
| 11019 pathOffset += 11; | 11501 pathOffset += 11; |
| 11020 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq
uals("videos/getRating")); | 11502 unittest.expect(path.substring(pathOffset, pathOffset + 16), |
| 11503 unittest.equals("videos/getRating")); |
| 11021 pathOffset += 16; | 11504 pathOffset += 16; |
| 11022 | 11505 |
| 11023 var query = (req.url).query; | 11506 var query = (req.url).query; |
| 11024 var queryOffset = 0; | 11507 var queryOffset = 0; |
| 11025 var queryMap = {}; | 11508 var queryMap = {}; |
| 11026 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 11509 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 11027 parseBool(n) { | 11510 parseBool(n) { |
| 11028 if (n == "true") return true; | 11511 if (n == "true") return true; |
| 11029 if (n == "false") return false; | 11512 if (n == "false") return false; |
| 11030 if (n == null) return null; | 11513 if (n == null) return null; |
| 11031 throw new core.ArgumentError("Invalid boolean: $n"); | 11514 throw new core.ArgumentError("Invalid boolean: $n"); |
| 11032 } | 11515 } |
| 11516 |
| 11033 if (query.length > 0) { | 11517 if (query.length > 0) { |
| 11034 for (var part in query.split("&")) { | 11518 for (var part in query.split("&")) { |
| 11035 var keyvalue = part.split("="); | 11519 var keyvalue = part.split("="); |
| 11036 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 11520 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 11521 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 11037 } | 11522 } |
| 11038 } | 11523 } |
| 11039 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); | 11524 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); |
| 11040 unittest.expect(queryMap["onBehalfOfContentOwner"].first, unittest.equal
s(arg_onBehalfOfContentOwner)); | 11525 unittest.expect(queryMap["onBehalfOfContentOwner"].first, |
| 11041 | 11526 unittest.equals(arg_onBehalfOfContentOwner)); |
| 11042 | 11527 |
| 11043 var h = { | 11528 var h = { |
| 11044 "content-type" : "application/json; charset=utf-8", | 11529 "content-type": "application/json; charset=utf-8", |
| 11045 }; | 11530 }; |
| 11046 var resp = convert.JSON.encode(buildVideoGetRatingResponse()); | 11531 var resp = convert.JSON.encode(buildVideoGetRatingResponse()); |
| 11047 return new async.Future.value(stringResponse(200, h, resp)); | 11532 return new async.Future.value(stringResponse(200, h, resp)); |
| 11048 }), true); | 11533 }), true); |
| 11049 res.getRating(arg_id, onBehalfOfContentOwner: arg_onBehalfOfContentOwner).
then(unittest.expectAsync1(((api.VideoGetRatingResponse response) { | 11534 res |
| 11535 .getRating(arg_id, onBehalfOfContentOwner: arg_onBehalfOfContentOwner) |
| 11536 .then(unittest.expectAsync1(((api.VideoGetRatingResponse response) { |
| 11050 checkVideoGetRatingResponse(response); | 11537 checkVideoGetRatingResponse(response); |
| 11051 }))); | 11538 }))); |
| 11052 }); | 11539 }); |
| 11053 | 11540 |
| 11054 unittest.test("method--insert", () { | 11541 unittest.test("method--insert", () { |
| 11055 // TODO: Implement tests for media upload; | 11542 // TODO: Implement tests for media upload; |
| 11056 // TODO: Implement tests for media download; | 11543 // TODO: Implement tests for media download; |
| 11057 | 11544 |
| 11058 var mock = new HttpServerMock(); | 11545 var mock = new HttpServerMock(); |
| 11059 api.VideosResourceApi res = new api.YoutubeApi(mock).videos; | 11546 api.VideosResourceApi res = new api.YoutubeApi(mock).videos; |
| 11060 var arg_request = buildVideo(); | 11547 var arg_request = buildVideo(); |
| 11061 var arg_part = "foo"; | 11548 var arg_part = "foo"; |
| 11062 var arg_autoLevels = true; | 11549 var arg_autoLevels = true; |
| 11063 var arg_notifySubscribers = true; | 11550 var arg_notifySubscribers = true; |
| 11064 var arg_onBehalfOfContentOwner = "foo"; | 11551 var arg_onBehalfOfContentOwner = "foo"; |
| 11065 var arg_onBehalfOfContentOwnerChannel = "foo"; | 11552 var arg_onBehalfOfContentOwnerChannel = "foo"; |
| 11066 var arg_stabilize = true; | 11553 var arg_stabilize = true; |
| 11067 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 11554 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 11068 var obj = new api.Video.fromJson(json); | 11555 var obj = new api.Video.fromJson(json); |
| 11069 checkVideo(obj); | 11556 checkVideo(obj); |
| 11070 | 11557 |
| 11071 var path = (req.url).path; | 11558 var path = (req.url).path; |
| 11072 var pathOffset = 0; | 11559 var pathOffset = 0; |
| 11073 var index; | 11560 var index; |
| 11074 var subPart; | 11561 var subPart; |
| 11075 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 11562 unittest.expect( |
| 11563 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 11076 pathOffset += 1; | 11564 pathOffset += 1; |
| 11077 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("youtube/v3/")); | 11565 unittest.expect(path.substring(pathOffset, pathOffset + 11), |
| 11566 unittest.equals("youtube/v3/")); |
| 11078 pathOffset += 11; | 11567 pathOffset += 11; |
| 11079 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ
als("videos")); | 11568 unittest.expect(path.substring(pathOffset, pathOffset + 6), |
| 11569 unittest.equals("videos")); |
| 11080 pathOffset += 6; | 11570 pathOffset += 6; |
| 11081 | 11571 |
| 11082 var query = (req.url).query; | 11572 var query = (req.url).query; |
| 11083 var queryOffset = 0; | 11573 var queryOffset = 0; |
| 11084 var queryMap = {}; | 11574 var queryMap = {}; |
| 11085 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 11575 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 11086 parseBool(n) { | 11576 parseBool(n) { |
| 11087 if (n == "true") return true; | 11577 if (n == "true") return true; |
| 11088 if (n == "false") return false; | 11578 if (n == "false") return false; |
| 11089 if (n == null) return null; | 11579 if (n == null) return null; |
| 11090 throw new core.ArgumentError("Invalid boolean: $n"); | 11580 throw new core.ArgumentError("Invalid boolean: $n"); |
| 11091 } | 11581 } |
| 11582 |
| 11092 if (query.length > 0) { | 11583 if (query.length > 0) { |
| 11093 for (var part in query.split("&")) { | 11584 for (var part in query.split("&")) { |
| 11094 var keyvalue = part.split("="); | 11585 var keyvalue = part.split("="); |
| 11095 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 11586 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 11587 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 11096 } | 11588 } |
| 11097 } | 11589 } |
| 11098 unittest.expect(queryMap["part"].first, unittest.equals(arg_part)); | 11590 unittest.expect(queryMap["part"].first, unittest.equals(arg_part)); |
| 11099 unittest.expect(queryMap["autoLevels"].first, unittest.equals("$arg_auto
Levels")); | 11591 unittest.expect( |
| 11100 unittest.expect(queryMap["notifySubscribers"].first, unittest.equals("$a
rg_notifySubscribers")); | 11592 queryMap["autoLevels"].first, unittest.equals("$arg_autoLevels")); |
| 11101 unittest.expect(queryMap["onBehalfOfContentOwner"].first, unittest.equal
s(arg_onBehalfOfContentOwner)); | 11593 unittest.expect(queryMap["notifySubscribers"].first, |
| 11102 unittest.expect(queryMap["onBehalfOfContentOwnerChannel"].first, unittes
t.equals(arg_onBehalfOfContentOwnerChannel)); | 11594 unittest.equals("$arg_notifySubscribers")); |
| 11103 unittest.expect(queryMap["stabilize"].first, unittest.equals("$arg_stabi
lize")); | 11595 unittest.expect(queryMap["onBehalfOfContentOwner"].first, |
| 11104 | 11596 unittest.equals(arg_onBehalfOfContentOwner)); |
| 11597 unittest.expect(queryMap["onBehalfOfContentOwnerChannel"].first, |
| 11598 unittest.equals(arg_onBehalfOfContentOwnerChannel)); |
| 11599 unittest.expect( |
| 11600 queryMap["stabilize"].first, unittest.equals("$arg_stabilize")); |
| 11105 | 11601 |
| 11106 var h = { | 11602 var h = { |
| 11107 "content-type" : "application/json; charset=utf-8", | 11603 "content-type": "application/json; charset=utf-8", |
| 11108 }; | 11604 }; |
| 11109 var resp = convert.JSON.encode(buildVideo()); | 11605 var resp = convert.JSON.encode(buildVideo()); |
| 11110 return new async.Future.value(stringResponse(200, h, resp)); | 11606 return new async.Future.value(stringResponse(200, h, resp)); |
| 11111 }), true); | 11607 }), true); |
| 11112 res.insert(arg_request, arg_part, autoLevels: arg_autoLevels, notifySubscr
ibers: arg_notifySubscribers, onBehalfOfContentOwner: arg_onBehalfOfContentOwner
, onBehalfOfContentOwnerChannel: arg_onBehalfOfContentOwnerChannel, stabilize: a
rg_stabilize).then(unittest.expectAsync1(((api.Video response) { | 11608 res |
| 11609 .insert(arg_request, arg_part, |
| 11610 autoLevels: arg_autoLevels, |
| 11611 notifySubscribers: arg_notifySubscribers, |
| 11612 onBehalfOfContentOwner: arg_onBehalfOfContentOwner, |
| 11613 onBehalfOfContentOwnerChannel: arg_onBehalfOfContentOwnerChannel, |
| 11614 stabilize: arg_stabilize) |
| 11615 .then(unittest.expectAsync1(((api.Video response) { |
| 11113 checkVideo(response); | 11616 checkVideo(response); |
| 11114 }))); | 11617 }))); |
| 11115 }); | 11618 }); |
| 11116 | 11619 |
| 11117 unittest.test("method--list", () { | 11620 unittest.test("method--list", () { |
| 11118 | |
| 11119 var mock = new HttpServerMock(); | 11621 var mock = new HttpServerMock(); |
| 11120 api.VideosResourceApi res = new api.YoutubeApi(mock).videos; | 11622 api.VideosResourceApi res = new api.YoutubeApi(mock).videos; |
| 11121 var arg_part = "foo"; | 11623 var arg_part = "foo"; |
| 11122 var arg_chart = "foo"; | 11624 var arg_chart = "foo"; |
| 11123 var arg_hl = "foo"; | 11625 var arg_hl = "foo"; |
| 11124 var arg_id = "foo"; | 11626 var arg_id = "foo"; |
| 11125 var arg_locale = "foo"; | 11627 var arg_locale = "foo"; |
| 11126 var arg_maxHeight = 42; | 11628 var arg_maxHeight = 42; |
| 11127 var arg_maxResults = 42; | 11629 var arg_maxResults = 42; |
| 11128 var arg_maxWidth = 42; | 11630 var arg_maxWidth = 42; |
| 11129 var arg_myRating = "foo"; | 11631 var arg_myRating = "foo"; |
| 11130 var arg_onBehalfOfContentOwner = "foo"; | 11632 var arg_onBehalfOfContentOwner = "foo"; |
| 11131 var arg_pageToken = "foo"; | 11633 var arg_pageToken = "foo"; |
| 11132 var arg_regionCode = "foo"; | 11634 var arg_regionCode = "foo"; |
| 11133 var arg_videoCategoryId = "foo"; | 11635 var arg_videoCategoryId = "foo"; |
| 11134 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 11636 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 11135 var path = (req.url).path; | 11637 var path = (req.url).path; |
| 11136 var pathOffset = 0; | 11638 var pathOffset = 0; |
| 11137 var index; | 11639 var index; |
| 11138 var subPart; | 11640 var subPart; |
| 11139 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 11641 unittest.expect( |
| 11642 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 11140 pathOffset += 1; | 11643 pathOffset += 1; |
| 11141 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("youtube/v3/")); | 11644 unittest.expect(path.substring(pathOffset, pathOffset + 11), |
| 11645 unittest.equals("youtube/v3/")); |
| 11142 pathOffset += 11; | 11646 pathOffset += 11; |
| 11143 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ
als("videos")); | 11647 unittest.expect(path.substring(pathOffset, pathOffset + 6), |
| 11648 unittest.equals("videos")); |
| 11144 pathOffset += 6; | 11649 pathOffset += 6; |
| 11145 | 11650 |
| 11146 var query = (req.url).query; | 11651 var query = (req.url).query; |
| 11147 var queryOffset = 0; | 11652 var queryOffset = 0; |
| 11148 var queryMap = {}; | 11653 var queryMap = {}; |
| 11149 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 11654 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 11150 parseBool(n) { | 11655 parseBool(n) { |
| 11151 if (n == "true") return true; | 11656 if (n == "true") return true; |
| 11152 if (n == "false") return false; | 11657 if (n == "false") return false; |
| 11153 if (n == null) return null; | 11658 if (n == null) return null; |
| 11154 throw new core.ArgumentError("Invalid boolean: $n"); | 11659 throw new core.ArgumentError("Invalid boolean: $n"); |
| 11155 } | 11660 } |
| 11661 |
| 11156 if (query.length > 0) { | 11662 if (query.length > 0) { |
| 11157 for (var part in query.split("&")) { | 11663 for (var part in query.split("&")) { |
| 11158 var keyvalue = part.split("="); | 11664 var keyvalue = part.split("="); |
| 11159 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 11665 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 11666 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 11160 } | 11667 } |
| 11161 } | 11668 } |
| 11162 unittest.expect(queryMap["part"].first, unittest.equals(arg_part)); | 11669 unittest.expect(queryMap["part"].first, unittest.equals(arg_part)); |
| 11163 unittest.expect(queryMap["chart"].first, unittest.equals(arg_chart)); | 11670 unittest.expect(queryMap["chart"].first, unittest.equals(arg_chart)); |
| 11164 unittest.expect(queryMap["hl"].first, unittest.equals(arg_hl)); | 11671 unittest.expect(queryMap["hl"].first, unittest.equals(arg_hl)); |
| 11165 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); | 11672 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); |
| 11166 unittest.expect(queryMap["locale"].first, unittest.equals(arg_locale)); | 11673 unittest.expect(queryMap["locale"].first, unittest.equals(arg_locale)); |
| 11167 unittest.expect(core.int.parse(queryMap["maxHeight"].first), unittest.eq
uals(arg_maxHeight)); | 11674 unittest.expect(core.int.parse(queryMap["maxHeight"].first), |
| 11168 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | 11675 unittest.equals(arg_maxHeight)); |
| 11169 unittest.expect(core.int.parse(queryMap["maxWidth"].first), unittest.equ
als(arg_maxWidth)); | 11676 unittest.expect(core.int.parse(queryMap["maxResults"].first), |
| 11170 unittest.expect(queryMap["myRating"].first, unittest.equals(arg_myRating
)); | 11677 unittest.equals(arg_maxResults)); |
| 11171 unittest.expect(queryMap["onBehalfOfContentOwner"].first, unittest.equal
s(arg_onBehalfOfContentOwner)); | 11678 unittest.expect(core.int.parse(queryMap["maxWidth"].first), |
| 11172 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 11679 unittest.equals(arg_maxWidth)); |
| 11173 unittest.expect(queryMap["regionCode"].first, unittest.equals(arg_region
Code)); | 11680 unittest.expect( |
| 11174 unittest.expect(queryMap["videoCategoryId"].first, unittest.equals(arg_v
ideoCategoryId)); | 11681 queryMap["myRating"].first, unittest.equals(arg_myRating)); |
| 11175 | 11682 unittest.expect(queryMap["onBehalfOfContentOwner"].first, |
| 11683 unittest.equals(arg_onBehalfOfContentOwner)); |
| 11684 unittest.expect( |
| 11685 queryMap["pageToken"].first, unittest.equals(arg_pageToken)); |
| 11686 unittest.expect( |
| 11687 queryMap["regionCode"].first, unittest.equals(arg_regionCode)); |
| 11688 unittest.expect(queryMap["videoCategoryId"].first, |
| 11689 unittest.equals(arg_videoCategoryId)); |
| 11176 | 11690 |
| 11177 var h = { | 11691 var h = { |
| 11178 "content-type" : "application/json; charset=utf-8", | 11692 "content-type": "application/json; charset=utf-8", |
| 11179 }; | 11693 }; |
| 11180 var resp = convert.JSON.encode(buildVideoListResponse()); | 11694 var resp = convert.JSON.encode(buildVideoListResponse()); |
| 11181 return new async.Future.value(stringResponse(200, h, resp)); | 11695 return new async.Future.value(stringResponse(200, h, resp)); |
| 11182 }), true); | 11696 }), true); |
| 11183 res.list(arg_part, chart: arg_chart, hl: arg_hl, id: arg_id, locale: arg_l
ocale, maxHeight: arg_maxHeight, maxResults: arg_maxResults, maxWidth: arg_maxWi
dth, myRating: arg_myRating, onBehalfOfContentOwner: arg_onBehalfOfContentOwner,
pageToken: arg_pageToken, regionCode: arg_regionCode, videoCategoryId: arg_vide
oCategoryId).then(unittest.expectAsync1(((api.VideoListResponse response) { | 11697 res |
| 11698 .list(arg_part, |
| 11699 chart: arg_chart, |
| 11700 hl: arg_hl, |
| 11701 id: arg_id, |
| 11702 locale: arg_locale, |
| 11703 maxHeight: arg_maxHeight, |
| 11704 maxResults: arg_maxResults, |
| 11705 maxWidth: arg_maxWidth, |
| 11706 myRating: arg_myRating, |
| 11707 onBehalfOfContentOwner: arg_onBehalfOfContentOwner, |
| 11708 pageToken: arg_pageToken, |
| 11709 regionCode: arg_regionCode, |
| 11710 videoCategoryId: arg_videoCategoryId) |
| 11711 .then(unittest.expectAsync1(((api.VideoListResponse response) { |
| 11184 checkVideoListResponse(response); | 11712 checkVideoListResponse(response); |
| 11185 }))); | 11713 }))); |
| 11186 }); | 11714 }); |
| 11187 | 11715 |
| 11188 unittest.test("method--rate", () { | 11716 unittest.test("method--rate", () { |
| 11189 | |
| 11190 var mock = new HttpServerMock(); | 11717 var mock = new HttpServerMock(); |
| 11191 api.VideosResourceApi res = new api.YoutubeApi(mock).videos; | 11718 api.VideosResourceApi res = new api.YoutubeApi(mock).videos; |
| 11192 var arg_id = "foo"; | 11719 var arg_id = "foo"; |
| 11193 var arg_rating = "foo"; | 11720 var arg_rating = "foo"; |
| 11194 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 11721 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 11195 var path = (req.url).path; | 11722 var path = (req.url).path; |
| 11196 var pathOffset = 0; | 11723 var pathOffset = 0; |
| 11197 var index; | 11724 var index; |
| 11198 var subPart; | 11725 var subPart; |
| 11199 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 11726 unittest.expect( |
| 11727 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 11200 pathOffset += 1; | 11728 pathOffset += 1; |
| 11201 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("youtube/v3/")); | 11729 unittest.expect(path.substring(pathOffset, pathOffset + 11), |
| 11730 unittest.equals("youtube/v3/")); |
| 11202 pathOffset += 11; | 11731 pathOffset += 11; |
| 11203 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("videos/rate")); | 11732 unittest.expect(path.substring(pathOffset, pathOffset + 11), |
| 11733 unittest.equals("videos/rate")); |
| 11204 pathOffset += 11; | 11734 pathOffset += 11; |
| 11205 | 11735 |
| 11206 var query = (req.url).query; | 11736 var query = (req.url).query; |
| 11207 var queryOffset = 0; | 11737 var queryOffset = 0; |
| 11208 var queryMap = {}; | 11738 var queryMap = {}; |
| 11209 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 11739 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 11210 parseBool(n) { | 11740 parseBool(n) { |
| 11211 if (n == "true") return true; | 11741 if (n == "true") return true; |
| 11212 if (n == "false") return false; | 11742 if (n == "false") return false; |
| 11213 if (n == null) return null; | 11743 if (n == null) return null; |
| 11214 throw new core.ArgumentError("Invalid boolean: $n"); | 11744 throw new core.ArgumentError("Invalid boolean: $n"); |
| 11215 } | 11745 } |
| 11746 |
| 11216 if (query.length > 0) { | 11747 if (query.length > 0) { |
| 11217 for (var part in query.split("&")) { | 11748 for (var part in query.split("&")) { |
| 11218 var keyvalue = part.split("="); | 11749 var keyvalue = part.split("="); |
| 11219 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 11750 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 11751 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 11220 } | 11752 } |
| 11221 } | 11753 } |
| 11222 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); | 11754 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); |
| 11223 unittest.expect(queryMap["rating"].first, unittest.equals(arg_rating)); | 11755 unittest.expect(queryMap["rating"].first, unittest.equals(arg_rating)); |
| 11224 | 11756 |
| 11225 | |
| 11226 var h = { | 11757 var h = { |
| 11227 "content-type" : "application/json; charset=utf-8", | 11758 "content-type": "application/json; charset=utf-8", |
| 11228 }; | 11759 }; |
| 11229 var resp = ""; | 11760 var resp = ""; |
| 11230 return new async.Future.value(stringResponse(200, h, resp)); | 11761 return new async.Future.value(stringResponse(200, h, resp)); |
| 11231 }), true); | 11762 }), true); |
| 11232 res.rate(arg_id, arg_rating).then(unittest.expectAsync1((_) {})); | 11763 res.rate(arg_id, arg_rating).then(unittest.expectAsync1((_) {})); |
| 11233 }); | 11764 }); |
| 11234 | 11765 |
| 11235 unittest.test("method--reportAbuse", () { | 11766 unittest.test("method--reportAbuse", () { |
| 11236 | |
| 11237 var mock = new HttpServerMock(); | 11767 var mock = new HttpServerMock(); |
| 11238 api.VideosResourceApi res = new api.YoutubeApi(mock).videos; | 11768 api.VideosResourceApi res = new api.YoutubeApi(mock).videos; |
| 11239 var arg_request = buildVideoAbuseReport(); | 11769 var arg_request = buildVideoAbuseReport(); |
| 11240 var arg_onBehalfOfContentOwner = "foo"; | 11770 var arg_onBehalfOfContentOwner = "foo"; |
| 11241 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 11771 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 11242 var obj = new api.VideoAbuseReport.fromJson(json); | 11772 var obj = new api.VideoAbuseReport.fromJson(json); |
| 11243 checkVideoAbuseReport(obj); | 11773 checkVideoAbuseReport(obj); |
| 11244 | 11774 |
| 11245 var path = (req.url).path; | 11775 var path = (req.url).path; |
| 11246 var pathOffset = 0; | 11776 var pathOffset = 0; |
| 11247 var index; | 11777 var index; |
| 11248 var subPart; | 11778 var subPart; |
| 11249 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 11779 unittest.expect( |
| 11780 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 11250 pathOffset += 1; | 11781 pathOffset += 1; |
| 11251 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("youtube/v3/")); | 11782 unittest.expect(path.substring(pathOffset, pathOffset + 11), |
| 11783 unittest.equals("youtube/v3/")); |
| 11252 pathOffset += 11; | 11784 pathOffset += 11; |
| 11253 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("videos/reportAbuse")); | 11785 unittest.expect(path.substring(pathOffset, pathOffset + 18), |
| 11786 unittest.equals("videos/reportAbuse")); |
| 11254 pathOffset += 18; | 11787 pathOffset += 18; |
| 11255 | 11788 |
| 11256 var query = (req.url).query; | 11789 var query = (req.url).query; |
| 11257 var queryOffset = 0; | 11790 var queryOffset = 0; |
| 11258 var queryMap = {}; | 11791 var queryMap = {}; |
| 11259 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 11792 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 11260 parseBool(n) { | 11793 parseBool(n) { |
| 11261 if (n == "true") return true; | 11794 if (n == "true") return true; |
| 11262 if (n == "false") return false; | 11795 if (n == "false") return false; |
| 11263 if (n == null) return null; | 11796 if (n == null) return null; |
| 11264 throw new core.ArgumentError("Invalid boolean: $n"); | 11797 throw new core.ArgumentError("Invalid boolean: $n"); |
| 11265 } | 11798 } |
| 11799 |
| 11266 if (query.length > 0) { | 11800 if (query.length > 0) { |
| 11267 for (var part in query.split("&")) { | 11801 for (var part in query.split("&")) { |
| 11268 var keyvalue = part.split("="); | 11802 var keyvalue = part.split("="); |
| 11269 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 11803 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 11804 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 11270 } | 11805 } |
| 11271 } | 11806 } |
| 11272 unittest.expect(queryMap["onBehalfOfContentOwner"].first, unittest.equal
s(arg_onBehalfOfContentOwner)); | 11807 unittest.expect(queryMap["onBehalfOfContentOwner"].first, |
| 11273 | 11808 unittest.equals(arg_onBehalfOfContentOwner)); |
| 11274 | 11809 |
| 11275 var h = { | 11810 var h = { |
| 11276 "content-type" : "application/json; charset=utf-8", | 11811 "content-type": "application/json; charset=utf-8", |
| 11277 }; | 11812 }; |
| 11278 var resp = ""; | 11813 var resp = ""; |
| 11279 return new async.Future.value(stringResponse(200, h, resp)); | 11814 return new async.Future.value(stringResponse(200, h, resp)); |
| 11280 }), true); | 11815 }), true); |
| 11281 res.reportAbuse(arg_request, onBehalfOfContentOwner: arg_onBehalfOfContent
Owner).then(unittest.expectAsync1((_) {})); | 11816 res |
| 11817 .reportAbuse(arg_request, |
| 11818 onBehalfOfContentOwner: arg_onBehalfOfContentOwner) |
| 11819 .then(unittest.expectAsync1((_) {})); |
| 11282 }); | 11820 }); |
| 11283 | 11821 |
| 11284 unittest.test("method--update", () { | 11822 unittest.test("method--update", () { |
| 11285 | |
| 11286 var mock = new HttpServerMock(); | 11823 var mock = new HttpServerMock(); |
| 11287 api.VideosResourceApi res = new api.YoutubeApi(mock).videos; | 11824 api.VideosResourceApi res = new api.YoutubeApi(mock).videos; |
| 11288 var arg_request = buildVideo(); | 11825 var arg_request = buildVideo(); |
| 11289 var arg_part = "foo"; | 11826 var arg_part = "foo"; |
| 11290 var arg_onBehalfOfContentOwner = "foo"; | 11827 var arg_onBehalfOfContentOwner = "foo"; |
| 11291 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 11828 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 11292 var obj = new api.Video.fromJson(json); | 11829 var obj = new api.Video.fromJson(json); |
| 11293 checkVideo(obj); | 11830 checkVideo(obj); |
| 11294 | 11831 |
| 11295 var path = (req.url).path; | 11832 var path = (req.url).path; |
| 11296 var pathOffset = 0; | 11833 var pathOffset = 0; |
| 11297 var index; | 11834 var index; |
| 11298 var subPart; | 11835 var subPart; |
| 11299 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 11836 unittest.expect( |
| 11837 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 11300 pathOffset += 1; | 11838 pathOffset += 1; |
| 11301 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("youtube/v3/")); | 11839 unittest.expect(path.substring(pathOffset, pathOffset + 11), |
| 11840 unittest.equals("youtube/v3/")); |
| 11302 pathOffset += 11; | 11841 pathOffset += 11; |
| 11303 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ
als("videos")); | 11842 unittest.expect(path.substring(pathOffset, pathOffset + 6), |
| 11843 unittest.equals("videos")); |
| 11304 pathOffset += 6; | 11844 pathOffset += 6; |
| 11305 | 11845 |
| 11306 var query = (req.url).query; | 11846 var query = (req.url).query; |
| 11307 var queryOffset = 0; | 11847 var queryOffset = 0; |
| 11308 var queryMap = {}; | 11848 var queryMap = {}; |
| 11309 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 11849 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 11310 parseBool(n) { | 11850 parseBool(n) { |
| 11311 if (n == "true") return true; | 11851 if (n == "true") return true; |
| 11312 if (n == "false") return false; | 11852 if (n == "false") return false; |
| 11313 if (n == null) return null; | 11853 if (n == null) return null; |
| 11314 throw new core.ArgumentError("Invalid boolean: $n"); | 11854 throw new core.ArgumentError("Invalid boolean: $n"); |
| 11315 } | 11855 } |
| 11856 |
| 11316 if (query.length > 0) { | 11857 if (query.length > 0) { |
| 11317 for (var part in query.split("&")) { | 11858 for (var part in query.split("&")) { |
| 11318 var keyvalue = part.split("="); | 11859 var keyvalue = part.split("="); |
| 11319 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 11860 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 11861 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 11320 } | 11862 } |
| 11321 } | 11863 } |
| 11322 unittest.expect(queryMap["part"].first, unittest.equals(arg_part)); | 11864 unittest.expect(queryMap["part"].first, unittest.equals(arg_part)); |
| 11323 unittest.expect(queryMap["onBehalfOfContentOwner"].first, unittest.equal
s(arg_onBehalfOfContentOwner)); | 11865 unittest.expect(queryMap["onBehalfOfContentOwner"].first, |
| 11324 | 11866 unittest.equals(arg_onBehalfOfContentOwner)); |
| 11325 | 11867 |
| 11326 var h = { | 11868 var h = { |
| 11327 "content-type" : "application/json; charset=utf-8", | 11869 "content-type": "application/json; charset=utf-8", |
| 11328 }; | 11870 }; |
| 11329 var resp = convert.JSON.encode(buildVideo()); | 11871 var resp = convert.JSON.encode(buildVideo()); |
| 11330 return new async.Future.value(stringResponse(200, h, resp)); | 11872 return new async.Future.value(stringResponse(200, h, resp)); |
| 11331 }), true); | 11873 }), true); |
| 11332 res.update(arg_request, arg_part, onBehalfOfContentOwner: arg_onBehalfOfCo
ntentOwner).then(unittest.expectAsync1(((api.Video response) { | 11874 res |
| 11875 .update(arg_request, arg_part, |
| 11876 onBehalfOfContentOwner: arg_onBehalfOfContentOwner) |
| 11877 .then(unittest.expectAsync1(((api.Video response) { |
| 11333 checkVideo(response); | 11878 checkVideo(response); |
| 11334 }))); | 11879 }))); |
| 11335 }); | 11880 }); |
| 11336 | |
| 11337 }); | 11881 }); |
| 11338 | 11882 |
| 11339 | |
| 11340 unittest.group("resource-WatermarksResourceApi", () { | 11883 unittest.group("resource-WatermarksResourceApi", () { |
| 11341 unittest.test("method--set", () { | 11884 unittest.test("method--set", () { |
| 11342 // TODO: Implement tests for media upload; | 11885 // TODO: Implement tests for media upload; |
| 11343 // TODO: Implement tests for media download; | 11886 // TODO: Implement tests for media download; |
| 11344 | 11887 |
| 11345 var mock = new HttpServerMock(); | 11888 var mock = new HttpServerMock(); |
| 11346 api.WatermarksResourceApi res = new api.YoutubeApi(mock).watermarks; | 11889 api.WatermarksResourceApi res = new api.YoutubeApi(mock).watermarks; |
| 11347 var arg_request = buildInvideoBranding(); | 11890 var arg_request = buildInvideoBranding(); |
| 11348 var arg_channelId = "foo"; | 11891 var arg_channelId = "foo"; |
| 11349 var arg_onBehalfOfContentOwner = "foo"; | 11892 var arg_onBehalfOfContentOwner = "foo"; |
| 11350 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 11893 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 11351 var obj = new api.InvideoBranding.fromJson(json); | 11894 var obj = new api.InvideoBranding.fromJson(json); |
| 11352 checkInvideoBranding(obj); | 11895 checkInvideoBranding(obj); |
| 11353 | 11896 |
| 11354 var path = (req.url).path; | 11897 var path = (req.url).path; |
| 11355 var pathOffset = 0; | 11898 var pathOffset = 0; |
| 11356 var index; | 11899 var index; |
| 11357 var subPart; | 11900 var subPart; |
| 11358 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 11901 unittest.expect( |
| 11902 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 11359 pathOffset += 1; | 11903 pathOffset += 1; |
| 11360 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("youtube/v3/")); | 11904 unittest.expect(path.substring(pathOffset, pathOffset + 11), |
| 11905 unittest.equals("youtube/v3/")); |
| 11361 pathOffset += 11; | 11906 pathOffset += 11; |
| 11362 unittest.expect(path.substring(pathOffset, pathOffset + 14), unittest.eq
uals("watermarks/set")); | 11907 unittest.expect(path.substring(pathOffset, pathOffset + 14), |
| 11908 unittest.equals("watermarks/set")); |
| 11363 pathOffset += 14; | 11909 pathOffset += 14; |
| 11364 | 11910 |
| 11365 var query = (req.url).query; | 11911 var query = (req.url).query; |
| 11366 var queryOffset = 0; | 11912 var queryOffset = 0; |
| 11367 var queryMap = {}; | 11913 var queryMap = {}; |
| 11368 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 11914 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 11369 parseBool(n) { | 11915 parseBool(n) { |
| 11370 if (n == "true") return true; | 11916 if (n == "true") return true; |
| 11371 if (n == "false") return false; | 11917 if (n == "false") return false; |
| 11372 if (n == null) return null; | 11918 if (n == null) return null; |
| 11373 throw new core.ArgumentError("Invalid boolean: $n"); | 11919 throw new core.ArgumentError("Invalid boolean: $n"); |
| 11374 } | 11920 } |
| 11921 |
| 11375 if (query.length > 0) { | 11922 if (query.length > 0) { |
| 11376 for (var part in query.split("&")) { | 11923 for (var part in query.split("&")) { |
| 11377 var keyvalue = part.split("="); | 11924 var keyvalue = part.split("="); |
| 11378 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 11925 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 11926 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 11379 } | 11927 } |
| 11380 } | 11928 } |
| 11381 unittest.expect(queryMap["channelId"].first, unittest.equals(arg_channel
Id)); | 11929 unittest.expect( |
| 11382 unittest.expect(queryMap["onBehalfOfContentOwner"].first, unittest.equal
s(arg_onBehalfOfContentOwner)); | 11930 queryMap["channelId"].first, unittest.equals(arg_channelId)); |
| 11383 | 11931 unittest.expect(queryMap["onBehalfOfContentOwner"].first, |
| 11932 unittest.equals(arg_onBehalfOfContentOwner)); |
| 11384 | 11933 |
| 11385 var h = { | 11934 var h = { |
| 11386 "content-type" : "application/json; charset=utf-8", | 11935 "content-type": "application/json; charset=utf-8", |
| 11387 }; | 11936 }; |
| 11388 var resp = ""; | 11937 var resp = ""; |
| 11389 return new async.Future.value(stringResponse(200, h, resp)); | 11938 return new async.Future.value(stringResponse(200, h, resp)); |
| 11390 }), true); | 11939 }), true); |
| 11391 res.set(arg_request, arg_channelId, onBehalfOfContentOwner: arg_onBehalfOf
ContentOwner).then(unittest.expectAsync1((_) {})); | 11940 res |
| 11941 .set(arg_request, arg_channelId, |
| 11942 onBehalfOfContentOwner: arg_onBehalfOfContentOwner) |
| 11943 .then(unittest.expectAsync1((_) {})); |
| 11392 }); | 11944 }); |
| 11393 | 11945 |
| 11394 unittest.test("method--unset", () { | 11946 unittest.test("method--unset", () { |
| 11395 | |
| 11396 var mock = new HttpServerMock(); | 11947 var mock = new HttpServerMock(); |
| 11397 api.WatermarksResourceApi res = new api.YoutubeApi(mock).watermarks; | 11948 api.WatermarksResourceApi res = new api.YoutubeApi(mock).watermarks; |
| 11398 var arg_channelId = "foo"; | 11949 var arg_channelId = "foo"; |
| 11399 var arg_onBehalfOfContentOwner = "foo"; | 11950 var arg_onBehalfOfContentOwner = "foo"; |
| 11400 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 11951 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 11401 var path = (req.url).path; | 11952 var path = (req.url).path; |
| 11402 var pathOffset = 0; | 11953 var pathOffset = 0; |
| 11403 var index; | 11954 var index; |
| 11404 var subPart; | 11955 var subPart; |
| 11405 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 11956 unittest.expect( |
| 11957 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 11406 pathOffset += 1; | 11958 pathOffset += 1; |
| 11407 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("youtube/v3/")); | 11959 unittest.expect(path.substring(pathOffset, pathOffset + 11), |
| 11960 unittest.equals("youtube/v3/")); |
| 11408 pathOffset += 11; | 11961 pathOffset += 11; |
| 11409 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq
uals("watermarks/unset")); | 11962 unittest.expect(path.substring(pathOffset, pathOffset + 16), |
| 11963 unittest.equals("watermarks/unset")); |
| 11410 pathOffset += 16; | 11964 pathOffset += 16; |
| 11411 | 11965 |
| 11412 var query = (req.url).query; | 11966 var query = (req.url).query; |
| 11413 var queryOffset = 0; | 11967 var queryOffset = 0; |
| 11414 var queryMap = {}; | 11968 var queryMap = {}; |
| 11415 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 11969 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 11416 parseBool(n) { | 11970 parseBool(n) { |
| 11417 if (n == "true") return true; | 11971 if (n == "true") return true; |
| 11418 if (n == "false") return false; | 11972 if (n == "false") return false; |
| 11419 if (n == null) return null; | 11973 if (n == null) return null; |
| 11420 throw new core.ArgumentError("Invalid boolean: $n"); | 11974 throw new core.ArgumentError("Invalid boolean: $n"); |
| 11421 } | 11975 } |
| 11976 |
| 11422 if (query.length > 0) { | 11977 if (query.length > 0) { |
| 11423 for (var part in query.split("&")) { | 11978 for (var part in query.split("&")) { |
| 11424 var keyvalue = part.split("="); | 11979 var keyvalue = part.split("="); |
| 11425 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 11980 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 11981 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 11426 } | 11982 } |
| 11427 } | 11983 } |
| 11428 unittest.expect(queryMap["channelId"].first, unittest.equals(arg_channel
Id)); | 11984 unittest.expect( |
| 11429 unittest.expect(queryMap["onBehalfOfContentOwner"].first, unittest.equal
s(arg_onBehalfOfContentOwner)); | 11985 queryMap["channelId"].first, unittest.equals(arg_channelId)); |
| 11430 | 11986 unittest.expect(queryMap["onBehalfOfContentOwner"].first, |
| 11987 unittest.equals(arg_onBehalfOfContentOwner)); |
| 11431 | 11988 |
| 11432 var h = { | 11989 var h = { |
| 11433 "content-type" : "application/json; charset=utf-8", | 11990 "content-type": "application/json; charset=utf-8", |
| 11434 }; | 11991 }; |
| 11435 var resp = ""; | 11992 var resp = ""; |
| 11436 return new async.Future.value(stringResponse(200, h, resp)); | 11993 return new async.Future.value(stringResponse(200, h, resp)); |
| 11437 }), true); | 11994 }), true); |
| 11438 res.unset(arg_channelId, onBehalfOfContentOwner: arg_onBehalfOfContentOwne
r).then(unittest.expectAsync1((_) {})); | 11995 res |
| 11996 .unset(arg_channelId, |
| 11997 onBehalfOfContentOwner: arg_onBehalfOfContentOwner) |
| 11998 .then(unittest.expectAsync1((_) {})); |
| 11439 }); | 11999 }); |
| 11440 | |
| 11441 }); | 12000 }); |
| 11442 | |
| 11443 | |
| 11444 } | 12001 } |
| 11445 | |
| OLD | NEW |