| OLD | NEW |
| 1 library googleapis.androidpublisher.v2.test; | 1 library googleapis.androidpublisher.v2.test; |
| 2 | 2 |
| 3 import "dart:core" as core; | 3 import "dart:core" as core; |
| 4 import "dart:collection" as collection; | 4 import "dart:collection" as collection; |
| 5 import "dart:async" as async; | 5 import "dart:async" as async; |
| 6 import "dart:convert" as convert; | 6 import "dart:convert" as convert; |
| 7 | 7 |
| 8 import 'package:http/http.dart' as http; | 8 import 'package:http/http.dart' as http; |
| 9 import 'package:http/testing.dart' as http_testing; | 9 import 'package:http/testing.dart' as http_testing; |
| 10 import 'package:unittest/unittest.dart' as unittest; | 10 import 'package:unittest/unittest.dart' as unittest; |
| 11 import 'package:googleapis/common/common.dart' as common; | |
| 12 import 'package:googleapis/src/common_internal.dart' as common_internal; | |
| 13 import '../common/common_internal_test.dart' as common_test; | |
| 14 | 11 |
| 15 import 'package:googleapis/androidpublisher/v2.dart' as api; | 12 import 'package:googleapis/androidpublisher/v2.dart' as api; |
| 16 | 13 |
| 14 class HttpServerMock extends http.BaseClient { |
| 15 core.Function _callback; |
| 16 core.bool _expectJson; |
| 17 | 17 |
| 18 void register(core.Function callback, core.bool expectJson) { |
| 19 _callback = callback; |
| 20 _expectJson = expectJson; |
| 21 } |
| 22 |
| 23 async.Future<http.StreamedResponse> send(http.BaseRequest request) { |
| 24 if (_expectJson) { |
| 25 return request.finalize() |
| 26 .transform(convert.UTF8.decoder) |
| 27 .join('') |
| 28 .then((core.String jsonString) { |
| 29 if (jsonString.isEmpty) { |
| 30 return _callback(request, null); |
| 31 } else { |
| 32 return _callback(request, convert.JSON.decode(jsonString)); |
| 33 } |
| 34 }); |
| 35 } else { |
| 36 var stream = request.finalize(); |
| 37 if (stream == null) { |
| 38 return _callback(request, []); |
| 39 } else { |
| 40 return stream.toBytes().then((data) { |
| 41 return _callback(request, data); |
| 42 }); |
| 43 } |
| 44 } |
| 45 } |
| 46 } |
| 47 |
| 48 http.StreamedResponse stringResponse( |
| 49 core.int status, core.Map headers, core.String body) { |
| 50 var stream = new async.Stream.fromIterable([convert.UTF8.encode(body)]); |
| 51 return new http.StreamedResponse(stream, status, headers: headers); |
| 52 } |
| 18 | 53 |
| 19 core.int buildCounterApk = 0; | 54 core.int buildCounterApk = 0; |
| 20 buildApk() { | 55 buildApk() { |
| 21 var o = new api.Apk(); | 56 var o = new api.Apk(); |
| 22 buildCounterApk++; | 57 buildCounterApk++; |
| 23 if (buildCounterApk < 3) { | 58 if (buildCounterApk < 3) { |
| 24 o.binary = buildApkBinary(); | 59 o.binary = buildApkBinary(); |
| 25 o.versionCode = 42; | 60 o.versionCode = 42; |
| 26 } | 61 } |
| 27 buildCounterApk--; | 62 buildCounterApk--; |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 | 105 |
| 71 checkApkListing(api.ApkListing o) { | 106 checkApkListing(api.ApkListing o) { |
| 72 buildCounterApkListing++; | 107 buildCounterApkListing++; |
| 73 if (buildCounterApkListing < 3) { | 108 if (buildCounterApkListing < 3) { |
| 74 unittest.expect(o.language, unittest.equals('foo')); | 109 unittest.expect(o.language, unittest.equals('foo')); |
| 75 unittest.expect(o.recentChanges, unittest.equals('foo')); | 110 unittest.expect(o.recentChanges, unittest.equals('foo')); |
| 76 } | 111 } |
| 77 buildCounterApkListing--; | 112 buildCounterApkListing--; |
| 78 } | 113 } |
| 79 | 114 |
| 80 buildUnnamed1393() { | 115 buildUnnamed258() { |
| 81 var o = new core.List<api.ApkListing>(); | 116 var o = new core.List<api.ApkListing>(); |
| 82 o.add(buildApkListing()); | 117 o.add(buildApkListing()); |
| 83 o.add(buildApkListing()); | 118 o.add(buildApkListing()); |
| 84 return o; | 119 return o; |
| 85 } | 120 } |
| 86 | 121 |
| 87 checkUnnamed1393(core.List<api.ApkListing> o) { | 122 checkUnnamed258(core.List<api.ApkListing> o) { |
| 88 unittest.expect(o, unittest.hasLength(2)); | 123 unittest.expect(o, unittest.hasLength(2)); |
| 89 checkApkListing(o[0]); | 124 checkApkListing(o[0]); |
| 90 checkApkListing(o[1]); | 125 checkApkListing(o[1]); |
| 91 } | 126 } |
| 92 | 127 |
| 93 core.int buildCounterApkListingsListResponse = 0; | 128 core.int buildCounterApkListingsListResponse = 0; |
| 94 buildApkListingsListResponse() { | 129 buildApkListingsListResponse() { |
| 95 var o = new api.ApkListingsListResponse(); | 130 var o = new api.ApkListingsListResponse(); |
| 96 buildCounterApkListingsListResponse++; | 131 buildCounterApkListingsListResponse++; |
| 97 if (buildCounterApkListingsListResponse < 3) { | 132 if (buildCounterApkListingsListResponse < 3) { |
| 98 o.kind = "foo"; | 133 o.kind = "foo"; |
| 99 o.listings = buildUnnamed1393(); | 134 o.listings = buildUnnamed258(); |
| 100 } | 135 } |
| 101 buildCounterApkListingsListResponse--; | 136 buildCounterApkListingsListResponse--; |
| 102 return o; | 137 return o; |
| 103 } | 138 } |
| 104 | 139 |
| 105 checkApkListingsListResponse(api.ApkListingsListResponse o) { | 140 checkApkListingsListResponse(api.ApkListingsListResponse o) { |
| 106 buildCounterApkListingsListResponse++; | 141 buildCounterApkListingsListResponse++; |
| 107 if (buildCounterApkListingsListResponse < 3) { | 142 if (buildCounterApkListingsListResponse < 3) { |
| 108 unittest.expect(o.kind, unittest.equals('foo')); | 143 unittest.expect(o.kind, unittest.equals('foo')); |
| 109 checkUnnamed1393(o.listings); | 144 checkUnnamed258(o.listings); |
| 110 } | 145 } |
| 111 buildCounterApkListingsListResponse--; | 146 buildCounterApkListingsListResponse--; |
| 112 } | 147 } |
| 113 | 148 |
| 114 core.int buildCounterApksAddExternallyHostedRequest = 0; | 149 core.int buildCounterApksAddExternallyHostedRequest = 0; |
| 115 buildApksAddExternallyHostedRequest() { | 150 buildApksAddExternallyHostedRequest() { |
| 116 var o = new api.ApksAddExternallyHostedRequest(); | 151 var o = new api.ApksAddExternallyHostedRequest(); |
| 117 buildCounterApksAddExternallyHostedRequest++; | 152 buildCounterApksAddExternallyHostedRequest++; |
| 118 if (buildCounterApksAddExternallyHostedRequest < 3) { | 153 if (buildCounterApksAddExternallyHostedRequest < 3) { |
| 119 o.externallyHostedApk = buildExternallyHostedApk(); | 154 o.externallyHostedApk = buildExternallyHostedApk(); |
| (...skipping 22 matching lines...) Expand all Loading... |
| 142 } | 177 } |
| 143 | 178 |
| 144 checkApksAddExternallyHostedResponse(api.ApksAddExternallyHostedResponse o) { | 179 checkApksAddExternallyHostedResponse(api.ApksAddExternallyHostedResponse o) { |
| 145 buildCounterApksAddExternallyHostedResponse++; | 180 buildCounterApksAddExternallyHostedResponse++; |
| 146 if (buildCounterApksAddExternallyHostedResponse < 3) { | 181 if (buildCounterApksAddExternallyHostedResponse < 3) { |
| 147 checkExternallyHostedApk(o.externallyHostedApk); | 182 checkExternallyHostedApk(o.externallyHostedApk); |
| 148 } | 183 } |
| 149 buildCounterApksAddExternallyHostedResponse--; | 184 buildCounterApksAddExternallyHostedResponse--; |
| 150 } | 185 } |
| 151 | 186 |
| 152 buildUnnamed1394() { | 187 buildUnnamed259() { |
| 153 var o = new core.List<api.Apk>(); | 188 var o = new core.List<api.Apk>(); |
| 154 o.add(buildApk()); | 189 o.add(buildApk()); |
| 155 o.add(buildApk()); | 190 o.add(buildApk()); |
| 156 return o; | 191 return o; |
| 157 } | 192 } |
| 158 | 193 |
| 159 checkUnnamed1394(core.List<api.Apk> o) { | 194 checkUnnamed259(core.List<api.Apk> o) { |
| 160 unittest.expect(o, unittest.hasLength(2)); | 195 unittest.expect(o, unittest.hasLength(2)); |
| 161 checkApk(o[0]); | 196 checkApk(o[0]); |
| 162 checkApk(o[1]); | 197 checkApk(o[1]); |
| 163 } | 198 } |
| 164 | 199 |
| 165 core.int buildCounterApksListResponse = 0; | 200 core.int buildCounterApksListResponse = 0; |
| 166 buildApksListResponse() { | 201 buildApksListResponse() { |
| 167 var o = new api.ApksListResponse(); | 202 var o = new api.ApksListResponse(); |
| 168 buildCounterApksListResponse++; | 203 buildCounterApksListResponse++; |
| 169 if (buildCounterApksListResponse < 3) { | 204 if (buildCounterApksListResponse < 3) { |
| 170 o.apks = buildUnnamed1394(); | 205 o.apks = buildUnnamed259(); |
| 171 o.kind = "foo"; | 206 o.kind = "foo"; |
| 172 } | 207 } |
| 173 buildCounterApksListResponse--; | 208 buildCounterApksListResponse--; |
| 174 return o; | 209 return o; |
| 175 } | 210 } |
| 176 | 211 |
| 177 checkApksListResponse(api.ApksListResponse o) { | 212 checkApksListResponse(api.ApksListResponse o) { |
| 178 buildCounterApksListResponse++; | 213 buildCounterApksListResponse++; |
| 179 if (buildCounterApksListResponse < 3) { | 214 if (buildCounterApksListResponse < 3) { |
| 180 checkUnnamed1394(o.apks); | 215 checkUnnamed259(o.apks); |
| 181 unittest.expect(o.kind, unittest.equals('foo')); | 216 unittest.expect(o.kind, unittest.equals('foo')); |
| 182 } | 217 } |
| 183 buildCounterApksListResponse--; | 218 buildCounterApksListResponse--; |
| 184 } | 219 } |
| 185 | 220 |
| 186 core.int buildCounterAppDetails = 0; | 221 core.int buildCounterAppDetails = 0; |
| 187 buildAppDetails() { | 222 buildAppDetails() { |
| 188 var o = new api.AppDetails(); | 223 var o = new api.AppDetails(); |
| 189 buildCounterAppDetails++; | 224 buildCounterAppDetails++; |
| 190 if (buildCounterAppDetails < 3) { | 225 if (buildCounterAppDetails < 3) { |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 262 } | 297 } |
| 263 | 298 |
| 264 checkExpansionFilesUploadResponse(api.ExpansionFilesUploadResponse o) { | 299 checkExpansionFilesUploadResponse(api.ExpansionFilesUploadResponse o) { |
| 265 buildCounterExpansionFilesUploadResponse++; | 300 buildCounterExpansionFilesUploadResponse++; |
| 266 if (buildCounterExpansionFilesUploadResponse < 3) { | 301 if (buildCounterExpansionFilesUploadResponse < 3) { |
| 267 checkExpansionFile(o.expansionFile); | 302 checkExpansionFile(o.expansionFile); |
| 268 } | 303 } |
| 269 buildCounterExpansionFilesUploadResponse--; | 304 buildCounterExpansionFilesUploadResponse--; |
| 270 } | 305 } |
| 271 | 306 |
| 272 buildUnnamed1395() { | 307 buildUnnamed260() { |
| 273 var o = new core.List<core.String>(); | 308 var o = new core.List<core.String>(); |
| 274 o.add("foo"); | 309 o.add("foo"); |
| 275 o.add("foo"); | 310 o.add("foo"); |
| 276 return o; | 311 return o; |
| 277 } | 312 } |
| 278 | 313 |
| 279 checkUnnamed1395(core.List<core.String> o) { | 314 checkUnnamed260(core.List<core.String> o) { |
| 280 unittest.expect(o, unittest.hasLength(2)); | 315 unittest.expect(o, unittest.hasLength(2)); |
| 281 unittest.expect(o[0], unittest.equals('foo')); | 316 unittest.expect(o[0], unittest.equals('foo')); |
| 282 unittest.expect(o[1], unittest.equals('foo')); | 317 unittest.expect(o[1], unittest.equals('foo')); |
| 283 } | 318 } |
| 284 | 319 |
| 285 buildUnnamed1396() { | 320 buildUnnamed261() { |
| 286 var o = new core.List<core.String>(); | 321 var o = new core.List<core.String>(); |
| 287 o.add("foo"); | 322 o.add("foo"); |
| 288 o.add("foo"); | 323 o.add("foo"); |
| 289 return o; | 324 return o; |
| 290 } | 325 } |
| 291 | 326 |
| 292 checkUnnamed1396(core.List<core.String> o) { | 327 checkUnnamed261(core.List<core.String> o) { |
| 293 unittest.expect(o, unittest.hasLength(2)); | 328 unittest.expect(o, unittest.hasLength(2)); |
| 294 unittest.expect(o[0], unittest.equals('foo')); | 329 unittest.expect(o[0], unittest.equals('foo')); |
| 295 unittest.expect(o[1], unittest.equals('foo')); | 330 unittest.expect(o[1], unittest.equals('foo')); |
| 296 } | 331 } |
| 297 | 332 |
| 298 buildUnnamed1397() { | 333 buildUnnamed262() { |
| 299 var o = new core.List<core.String>(); | 334 var o = new core.List<core.String>(); |
| 300 o.add("foo"); | 335 o.add("foo"); |
| 301 o.add("foo"); | 336 o.add("foo"); |
| 302 return o; | 337 return o; |
| 303 } | 338 } |
| 304 | 339 |
| 305 checkUnnamed1397(core.List<core.String> o) { | 340 checkUnnamed262(core.List<core.String> o) { |
| 306 unittest.expect(o, unittest.hasLength(2)); | 341 unittest.expect(o, unittest.hasLength(2)); |
| 307 unittest.expect(o[0], unittest.equals('foo')); | 342 unittest.expect(o[0], unittest.equals('foo')); |
| 308 unittest.expect(o[1], unittest.equals('foo')); | 343 unittest.expect(o[1], unittest.equals('foo')); |
| 309 } | 344 } |
| 310 | 345 |
| 311 buildUnnamed1398() { | 346 buildUnnamed263() { |
| 312 var o = new core.List<api.ExternallyHostedApkUsesPermission>(); | 347 var o = new core.List<api.ExternallyHostedApkUsesPermission>(); |
| 313 o.add(buildExternallyHostedApkUsesPermission()); | 348 o.add(buildExternallyHostedApkUsesPermission()); |
| 314 o.add(buildExternallyHostedApkUsesPermission()); | 349 o.add(buildExternallyHostedApkUsesPermission()); |
| 315 return o; | 350 return o; |
| 316 } | 351 } |
| 317 | 352 |
| 318 checkUnnamed1398(core.List<api.ExternallyHostedApkUsesPermission> o) { | 353 checkUnnamed263(core.List<api.ExternallyHostedApkUsesPermission> o) { |
| 319 unittest.expect(o, unittest.hasLength(2)); | 354 unittest.expect(o, unittest.hasLength(2)); |
| 320 checkExternallyHostedApkUsesPermission(o[0]); | 355 checkExternallyHostedApkUsesPermission(o[0]); |
| 321 checkExternallyHostedApkUsesPermission(o[1]); | 356 checkExternallyHostedApkUsesPermission(o[1]); |
| 322 } | 357 } |
| 323 | 358 |
| 324 core.int buildCounterExternallyHostedApk = 0; | 359 core.int buildCounterExternallyHostedApk = 0; |
| 325 buildExternallyHostedApk() { | 360 buildExternallyHostedApk() { |
| 326 var o = new api.ExternallyHostedApk(); | 361 var o = new api.ExternallyHostedApk(); |
| 327 buildCounterExternallyHostedApk++; | 362 buildCounterExternallyHostedApk++; |
| 328 if (buildCounterExternallyHostedApk < 3) { | 363 if (buildCounterExternallyHostedApk < 3) { |
| 329 o.applicationLabel = "foo"; | 364 o.applicationLabel = "foo"; |
| 330 o.certificateBase64s = buildUnnamed1395(); | 365 o.certificateBase64s = buildUnnamed260(); |
| 331 o.externallyHostedUrl = "foo"; | 366 o.externallyHostedUrl = "foo"; |
| 332 o.fileSha1Base64 = "foo"; | 367 o.fileSha1Base64 = "foo"; |
| 333 o.fileSha256Base64 = "foo"; | 368 o.fileSha256Base64 = "foo"; |
| 334 o.fileSize = "foo"; | 369 o.fileSize = "foo"; |
| 335 o.iconBase64 = "foo"; | 370 o.iconBase64 = "foo"; |
| 336 o.maximumSdk = 42; | 371 o.maximumSdk = 42; |
| 337 o.minimumSdk = 42; | 372 o.minimumSdk = 42; |
| 338 o.nativeCodes = buildUnnamed1396(); | 373 o.nativeCodes = buildUnnamed261(); |
| 339 o.packageName = "foo"; | 374 o.packageName = "foo"; |
| 340 o.usesFeatures = buildUnnamed1397(); | 375 o.usesFeatures = buildUnnamed262(); |
| 341 o.usesPermissions = buildUnnamed1398(); | 376 o.usesPermissions = buildUnnamed263(); |
| 342 o.versionCode = 42; | 377 o.versionCode = 42; |
| 343 o.versionName = "foo"; | 378 o.versionName = "foo"; |
| 344 } | 379 } |
| 345 buildCounterExternallyHostedApk--; | 380 buildCounterExternallyHostedApk--; |
| 346 return o; | 381 return o; |
| 347 } | 382 } |
| 348 | 383 |
| 349 checkExternallyHostedApk(api.ExternallyHostedApk o) { | 384 checkExternallyHostedApk(api.ExternallyHostedApk o) { |
| 350 buildCounterExternallyHostedApk++; | 385 buildCounterExternallyHostedApk++; |
| 351 if (buildCounterExternallyHostedApk < 3) { | 386 if (buildCounterExternallyHostedApk < 3) { |
| 352 unittest.expect(o.applicationLabel, unittest.equals('foo')); | 387 unittest.expect(o.applicationLabel, unittest.equals('foo')); |
| 353 checkUnnamed1395(o.certificateBase64s); | 388 checkUnnamed260(o.certificateBase64s); |
| 354 unittest.expect(o.externallyHostedUrl, unittest.equals('foo')); | 389 unittest.expect(o.externallyHostedUrl, unittest.equals('foo')); |
| 355 unittest.expect(o.fileSha1Base64, unittest.equals('foo')); | 390 unittest.expect(o.fileSha1Base64, unittest.equals('foo')); |
| 356 unittest.expect(o.fileSha256Base64, unittest.equals('foo')); | 391 unittest.expect(o.fileSha256Base64, unittest.equals('foo')); |
| 357 unittest.expect(o.fileSize, unittest.equals('foo')); | 392 unittest.expect(o.fileSize, unittest.equals('foo')); |
| 358 unittest.expect(o.iconBase64, unittest.equals('foo')); | 393 unittest.expect(o.iconBase64, unittest.equals('foo')); |
| 359 unittest.expect(o.maximumSdk, unittest.equals(42)); | 394 unittest.expect(o.maximumSdk, unittest.equals(42)); |
| 360 unittest.expect(o.minimumSdk, unittest.equals(42)); | 395 unittest.expect(o.minimumSdk, unittest.equals(42)); |
| 361 checkUnnamed1396(o.nativeCodes); | 396 checkUnnamed261(o.nativeCodes); |
| 362 unittest.expect(o.packageName, unittest.equals('foo')); | 397 unittest.expect(o.packageName, unittest.equals('foo')); |
| 363 checkUnnamed1397(o.usesFeatures); | 398 checkUnnamed262(o.usesFeatures); |
| 364 checkUnnamed1398(o.usesPermissions); | 399 checkUnnamed263(o.usesPermissions); |
| 365 unittest.expect(o.versionCode, unittest.equals(42)); | 400 unittest.expect(o.versionCode, unittest.equals(42)); |
| 366 unittest.expect(o.versionName, unittest.equals('foo')); | 401 unittest.expect(o.versionName, unittest.equals('foo')); |
| 367 } | 402 } |
| 368 buildCounterExternallyHostedApk--; | 403 buildCounterExternallyHostedApk--; |
| 369 } | 404 } |
| 370 | 405 |
| 371 core.int buildCounterExternallyHostedApkUsesPermission = 0; | 406 core.int buildCounterExternallyHostedApkUsesPermission = 0; |
| 372 buildExternallyHostedApkUsesPermission() { | 407 buildExternallyHostedApkUsesPermission() { |
| 373 var o = new api.ExternallyHostedApkUsesPermission(); | 408 var o = new api.ExternallyHostedApkUsesPermission(); |
| 374 buildCounterExternallyHostedApkUsesPermission++; | 409 buildCounterExternallyHostedApkUsesPermission++; |
| (...skipping 30 matching lines...) Expand all Loading... |
| 405 checkImage(api.Image o) { | 440 checkImage(api.Image o) { |
| 406 buildCounterImage++; | 441 buildCounterImage++; |
| 407 if (buildCounterImage < 3) { | 442 if (buildCounterImage < 3) { |
| 408 unittest.expect(o.id, unittest.equals('foo')); | 443 unittest.expect(o.id, unittest.equals('foo')); |
| 409 unittest.expect(o.sha1, unittest.equals('foo')); | 444 unittest.expect(o.sha1, unittest.equals('foo')); |
| 410 unittest.expect(o.url, unittest.equals('foo')); | 445 unittest.expect(o.url, unittest.equals('foo')); |
| 411 } | 446 } |
| 412 buildCounterImage--; | 447 buildCounterImage--; |
| 413 } | 448 } |
| 414 | 449 |
| 415 buildUnnamed1399() { | 450 buildUnnamed264() { |
| 416 var o = new core.List<api.Image>(); | 451 var o = new core.List<api.Image>(); |
| 417 o.add(buildImage()); | 452 o.add(buildImage()); |
| 418 o.add(buildImage()); | 453 o.add(buildImage()); |
| 419 return o; | 454 return o; |
| 420 } | 455 } |
| 421 | 456 |
| 422 checkUnnamed1399(core.List<api.Image> o) { | 457 checkUnnamed264(core.List<api.Image> o) { |
| 423 unittest.expect(o, unittest.hasLength(2)); | 458 unittest.expect(o, unittest.hasLength(2)); |
| 424 checkImage(o[0]); | 459 checkImage(o[0]); |
| 425 checkImage(o[1]); | 460 checkImage(o[1]); |
| 426 } | 461 } |
| 427 | 462 |
| 428 core.int buildCounterImagesDeleteAllResponse = 0; | 463 core.int buildCounterImagesDeleteAllResponse = 0; |
| 429 buildImagesDeleteAllResponse() { | 464 buildImagesDeleteAllResponse() { |
| 430 var o = new api.ImagesDeleteAllResponse(); | 465 var o = new api.ImagesDeleteAllResponse(); |
| 431 buildCounterImagesDeleteAllResponse++; | 466 buildCounterImagesDeleteAllResponse++; |
| 432 if (buildCounterImagesDeleteAllResponse < 3) { | 467 if (buildCounterImagesDeleteAllResponse < 3) { |
| 433 o.deleted = buildUnnamed1399(); | 468 o.deleted = buildUnnamed264(); |
| 434 } | 469 } |
| 435 buildCounterImagesDeleteAllResponse--; | 470 buildCounterImagesDeleteAllResponse--; |
| 436 return o; | 471 return o; |
| 437 } | 472 } |
| 438 | 473 |
| 439 checkImagesDeleteAllResponse(api.ImagesDeleteAllResponse o) { | 474 checkImagesDeleteAllResponse(api.ImagesDeleteAllResponse o) { |
| 440 buildCounterImagesDeleteAllResponse++; | 475 buildCounterImagesDeleteAllResponse++; |
| 441 if (buildCounterImagesDeleteAllResponse < 3) { | 476 if (buildCounterImagesDeleteAllResponse < 3) { |
| 442 checkUnnamed1399(o.deleted); | 477 checkUnnamed264(o.deleted); |
| 443 } | 478 } |
| 444 buildCounterImagesDeleteAllResponse--; | 479 buildCounterImagesDeleteAllResponse--; |
| 445 } | 480 } |
| 446 | 481 |
| 447 buildUnnamed1400() { | 482 buildUnnamed265() { |
| 448 var o = new core.List<api.Image>(); | 483 var o = new core.List<api.Image>(); |
| 449 o.add(buildImage()); | 484 o.add(buildImage()); |
| 450 o.add(buildImage()); | 485 o.add(buildImage()); |
| 451 return o; | 486 return o; |
| 452 } | 487 } |
| 453 | 488 |
| 454 checkUnnamed1400(core.List<api.Image> o) { | 489 checkUnnamed265(core.List<api.Image> o) { |
| 455 unittest.expect(o, unittest.hasLength(2)); | 490 unittest.expect(o, unittest.hasLength(2)); |
| 456 checkImage(o[0]); | 491 checkImage(o[0]); |
| 457 checkImage(o[1]); | 492 checkImage(o[1]); |
| 458 } | 493 } |
| 459 | 494 |
| 460 core.int buildCounterImagesListResponse = 0; | 495 core.int buildCounterImagesListResponse = 0; |
| 461 buildImagesListResponse() { | 496 buildImagesListResponse() { |
| 462 var o = new api.ImagesListResponse(); | 497 var o = new api.ImagesListResponse(); |
| 463 buildCounterImagesListResponse++; | 498 buildCounterImagesListResponse++; |
| 464 if (buildCounterImagesListResponse < 3) { | 499 if (buildCounterImagesListResponse < 3) { |
| 465 o.images = buildUnnamed1400(); | 500 o.images = buildUnnamed265(); |
| 466 } | 501 } |
| 467 buildCounterImagesListResponse--; | 502 buildCounterImagesListResponse--; |
| 468 return o; | 503 return o; |
| 469 } | 504 } |
| 470 | 505 |
| 471 checkImagesListResponse(api.ImagesListResponse o) { | 506 checkImagesListResponse(api.ImagesListResponse o) { |
| 472 buildCounterImagesListResponse++; | 507 buildCounterImagesListResponse++; |
| 473 if (buildCounterImagesListResponse < 3) { | 508 if (buildCounterImagesListResponse < 3) { |
| 474 checkUnnamed1400(o.images); | 509 checkUnnamed265(o.images); |
| 475 } | 510 } |
| 476 buildCounterImagesListResponse--; | 511 buildCounterImagesListResponse--; |
| 477 } | 512 } |
| 478 | 513 |
| 479 core.int buildCounterImagesUploadResponse = 0; | 514 core.int buildCounterImagesUploadResponse = 0; |
| 480 buildImagesUploadResponse() { | 515 buildImagesUploadResponse() { |
| 481 var o = new api.ImagesUploadResponse(); | 516 var o = new api.ImagesUploadResponse(); |
| 482 buildCounterImagesUploadResponse++; | 517 buildCounterImagesUploadResponse++; |
| 483 if (buildCounterImagesUploadResponse < 3) { | 518 if (buildCounterImagesUploadResponse < 3) { |
| 484 o.image = buildImage(); | 519 o.image = buildImage(); |
| 485 } | 520 } |
| 486 buildCounterImagesUploadResponse--; | 521 buildCounterImagesUploadResponse--; |
| 487 return o; | 522 return o; |
| 488 } | 523 } |
| 489 | 524 |
| 490 checkImagesUploadResponse(api.ImagesUploadResponse o) { | 525 checkImagesUploadResponse(api.ImagesUploadResponse o) { |
| 491 buildCounterImagesUploadResponse++; | 526 buildCounterImagesUploadResponse++; |
| 492 if (buildCounterImagesUploadResponse < 3) { | 527 if (buildCounterImagesUploadResponse < 3) { |
| 493 checkImage(o.image); | 528 checkImage(o.image); |
| 494 } | 529 } |
| 495 buildCounterImagesUploadResponse--; | 530 buildCounterImagesUploadResponse--; |
| 496 } | 531 } |
| 497 | 532 |
| 498 buildUnnamed1401() { | 533 buildUnnamed266() { |
| 499 var o = new core.Map<core.String, api.InAppProductListing>(); | 534 var o = new core.Map<core.String, api.InAppProductListing>(); |
| 500 o["x"] = buildInAppProductListing(); | 535 o["x"] = buildInAppProductListing(); |
| 501 o["y"] = buildInAppProductListing(); | 536 o["y"] = buildInAppProductListing(); |
| 502 return o; | 537 return o; |
| 503 } | 538 } |
| 504 | 539 |
| 505 checkUnnamed1401(core.Map<core.String, api.InAppProductListing> o) { | 540 checkUnnamed266(core.Map<core.String, api.InAppProductListing> o) { |
| 506 unittest.expect(o, unittest.hasLength(2)); | 541 unittest.expect(o, unittest.hasLength(2)); |
| 507 checkInAppProductListing(o["x"]); | 542 checkInAppProductListing(o["x"]); |
| 508 checkInAppProductListing(o["y"]); | 543 checkInAppProductListing(o["y"]); |
| 509 } | 544 } |
| 510 | 545 |
| 511 buildUnnamed1402() { | 546 buildUnnamed267() { |
| 512 var o = new core.Map<core.String, api.Price>(); | 547 var o = new core.Map<core.String, api.Price>(); |
| 513 o["x"] = buildPrice(); | 548 o["x"] = buildPrice(); |
| 514 o["y"] = buildPrice(); | 549 o["y"] = buildPrice(); |
| 515 return o; | 550 return o; |
| 516 } | 551 } |
| 517 | 552 |
| 518 checkUnnamed1402(core.Map<core.String, api.Price> o) { | 553 checkUnnamed267(core.Map<core.String, api.Price> o) { |
| 519 unittest.expect(o, unittest.hasLength(2)); | 554 unittest.expect(o, unittest.hasLength(2)); |
| 520 checkPrice(o["x"]); | 555 checkPrice(o["x"]); |
| 521 checkPrice(o["y"]); | 556 checkPrice(o["y"]); |
| 522 } | 557 } |
| 523 | 558 |
| 524 core.int buildCounterInAppProduct = 0; | 559 core.int buildCounterInAppProduct = 0; |
| 525 buildInAppProduct() { | 560 buildInAppProduct() { |
| 526 var o = new api.InAppProduct(); | 561 var o = new api.InAppProduct(); |
| 527 buildCounterInAppProduct++; | 562 buildCounterInAppProduct++; |
| 528 if (buildCounterInAppProduct < 3) { | 563 if (buildCounterInAppProduct < 3) { |
| 529 o.defaultLanguage = "foo"; | 564 o.defaultLanguage = "foo"; |
| 530 o.defaultPrice = buildPrice(); | 565 o.defaultPrice = buildPrice(); |
| 531 o.listings = buildUnnamed1401(); | 566 o.listings = buildUnnamed266(); |
| 532 o.packageName = "foo"; | 567 o.packageName = "foo"; |
| 533 o.prices = buildUnnamed1402(); | 568 o.prices = buildUnnamed267(); |
| 534 o.purchaseType = "foo"; | 569 o.purchaseType = "foo"; |
| 535 o.season = buildSeason(); | 570 o.season = buildSeason(); |
| 536 o.sku = "foo"; | 571 o.sku = "foo"; |
| 537 o.status = "foo"; | 572 o.status = "foo"; |
| 538 o.subscriptionPeriod = "foo"; | 573 o.subscriptionPeriod = "foo"; |
| 539 o.trialPeriod = "foo"; | 574 o.trialPeriod = "foo"; |
| 540 } | 575 } |
| 541 buildCounterInAppProduct--; | 576 buildCounterInAppProduct--; |
| 542 return o; | 577 return o; |
| 543 } | 578 } |
| 544 | 579 |
| 545 checkInAppProduct(api.InAppProduct o) { | 580 checkInAppProduct(api.InAppProduct o) { |
| 546 buildCounterInAppProduct++; | 581 buildCounterInAppProduct++; |
| 547 if (buildCounterInAppProduct < 3) { | 582 if (buildCounterInAppProduct < 3) { |
| 548 unittest.expect(o.defaultLanguage, unittest.equals('foo')); | 583 unittest.expect(o.defaultLanguage, unittest.equals('foo')); |
| 549 checkPrice(o.defaultPrice); | 584 checkPrice(o.defaultPrice); |
| 550 checkUnnamed1401(o.listings); | 585 checkUnnamed266(o.listings); |
| 551 unittest.expect(o.packageName, unittest.equals('foo')); | 586 unittest.expect(o.packageName, unittest.equals('foo')); |
| 552 checkUnnamed1402(o.prices); | 587 checkUnnamed267(o.prices); |
| 553 unittest.expect(o.purchaseType, unittest.equals('foo')); | 588 unittest.expect(o.purchaseType, unittest.equals('foo')); |
| 554 checkSeason(o.season); | 589 checkSeason(o.season); |
| 555 unittest.expect(o.sku, unittest.equals('foo')); | 590 unittest.expect(o.sku, unittest.equals('foo')); |
| 556 unittest.expect(o.status, unittest.equals('foo')); | 591 unittest.expect(o.status, unittest.equals('foo')); |
| 557 unittest.expect(o.subscriptionPeriod, unittest.equals('foo')); | 592 unittest.expect(o.subscriptionPeriod, unittest.equals('foo')); |
| 558 unittest.expect(o.trialPeriod, unittest.equals('foo')); | 593 unittest.expect(o.trialPeriod, unittest.equals('foo')); |
| 559 } | 594 } |
| 560 buildCounterInAppProduct--; | 595 buildCounterInAppProduct--; |
| 561 } | 596 } |
| 562 | 597 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 574 | 609 |
| 575 checkInAppProductListing(api.InAppProductListing o) { | 610 checkInAppProductListing(api.InAppProductListing o) { |
| 576 buildCounterInAppProductListing++; | 611 buildCounterInAppProductListing++; |
| 577 if (buildCounterInAppProductListing < 3) { | 612 if (buildCounterInAppProductListing < 3) { |
| 578 unittest.expect(o.description, unittest.equals('foo')); | 613 unittest.expect(o.description, unittest.equals('foo')); |
| 579 unittest.expect(o.title, unittest.equals('foo')); | 614 unittest.expect(o.title, unittest.equals('foo')); |
| 580 } | 615 } |
| 581 buildCounterInAppProductListing--; | 616 buildCounterInAppProductListing--; |
| 582 } | 617 } |
| 583 | 618 |
| 584 buildUnnamed1403() { | 619 buildUnnamed268() { |
| 585 var o = new core.List<api.InappproductsBatchRequestEntry>(); | 620 var o = new core.List<api.InappproductsBatchRequestEntry>(); |
| 586 o.add(buildInappproductsBatchRequestEntry()); | 621 o.add(buildInappproductsBatchRequestEntry()); |
| 587 o.add(buildInappproductsBatchRequestEntry()); | 622 o.add(buildInappproductsBatchRequestEntry()); |
| 588 return o; | 623 return o; |
| 589 } | 624 } |
| 590 | 625 |
| 591 checkUnnamed1403(core.List<api.InappproductsBatchRequestEntry> o) { | 626 checkUnnamed268(core.List<api.InappproductsBatchRequestEntry> o) { |
| 592 unittest.expect(o, unittest.hasLength(2)); | 627 unittest.expect(o, unittest.hasLength(2)); |
| 593 checkInappproductsBatchRequestEntry(o[0]); | 628 checkInappproductsBatchRequestEntry(o[0]); |
| 594 checkInappproductsBatchRequestEntry(o[1]); | 629 checkInappproductsBatchRequestEntry(o[1]); |
| 595 } | 630 } |
| 596 | 631 |
| 597 core.int buildCounterInappproductsBatchRequest = 0; | 632 core.int buildCounterInappproductsBatchRequest = 0; |
| 598 buildInappproductsBatchRequest() { | 633 buildInappproductsBatchRequest() { |
| 599 var o = new api.InappproductsBatchRequest(); | 634 var o = new api.InappproductsBatchRequest(); |
| 600 buildCounterInappproductsBatchRequest++; | 635 buildCounterInappproductsBatchRequest++; |
| 601 if (buildCounterInappproductsBatchRequest < 3) { | 636 if (buildCounterInappproductsBatchRequest < 3) { |
| 602 o.entrys = buildUnnamed1403(); | 637 o.entrys = buildUnnamed268(); |
| 603 } | 638 } |
| 604 buildCounterInappproductsBatchRequest--; | 639 buildCounterInappproductsBatchRequest--; |
| 605 return o; | 640 return o; |
| 606 } | 641 } |
| 607 | 642 |
| 608 checkInappproductsBatchRequest(api.InappproductsBatchRequest o) { | 643 checkInappproductsBatchRequest(api.InappproductsBatchRequest o) { |
| 609 buildCounterInappproductsBatchRequest++; | 644 buildCounterInappproductsBatchRequest++; |
| 610 if (buildCounterInappproductsBatchRequest < 3) { | 645 if (buildCounterInappproductsBatchRequest < 3) { |
| 611 checkUnnamed1403(o.entrys); | 646 checkUnnamed268(o.entrys); |
| 612 } | 647 } |
| 613 buildCounterInappproductsBatchRequest--; | 648 buildCounterInappproductsBatchRequest--; |
| 614 } | 649 } |
| 615 | 650 |
| 616 core.int buildCounterInappproductsBatchRequestEntry = 0; | 651 core.int buildCounterInappproductsBatchRequestEntry = 0; |
| 617 buildInappproductsBatchRequestEntry() { | 652 buildInappproductsBatchRequestEntry() { |
| 618 var o = new api.InappproductsBatchRequestEntry(); | 653 var o = new api.InappproductsBatchRequestEntry(); |
| 619 buildCounterInappproductsBatchRequestEntry++; | 654 buildCounterInappproductsBatchRequestEntry++; |
| 620 if (buildCounterInappproductsBatchRequestEntry < 3) { | 655 if (buildCounterInappproductsBatchRequestEntry < 3) { |
| 621 o.batchId = 42; | 656 o.batchId = 42; |
| 622 o.inappproductsinsertrequest = buildInappproductsInsertRequest(); | 657 o.inappproductsinsertrequest = buildInappproductsInsertRequest(); |
| 623 o.inappproductsupdaterequest = buildInappproductsUpdateRequest(); | 658 o.inappproductsupdaterequest = buildInappproductsUpdateRequest(); |
| 624 o.methodName = "foo"; | 659 o.methodName = "foo"; |
| 625 } | 660 } |
| 626 buildCounterInappproductsBatchRequestEntry--; | 661 buildCounterInappproductsBatchRequestEntry--; |
| 627 return o; | 662 return o; |
| 628 } | 663 } |
| 629 | 664 |
| 630 checkInappproductsBatchRequestEntry(api.InappproductsBatchRequestEntry o) { | 665 checkInappproductsBatchRequestEntry(api.InappproductsBatchRequestEntry o) { |
| 631 buildCounterInappproductsBatchRequestEntry++; | 666 buildCounterInappproductsBatchRequestEntry++; |
| 632 if (buildCounterInappproductsBatchRequestEntry < 3) { | 667 if (buildCounterInappproductsBatchRequestEntry < 3) { |
| 633 unittest.expect(o.batchId, unittest.equals(42)); | 668 unittest.expect(o.batchId, unittest.equals(42)); |
| 634 checkInappproductsInsertRequest(o.inappproductsinsertrequest); | 669 checkInappproductsInsertRequest(o.inappproductsinsertrequest); |
| 635 checkInappproductsUpdateRequest(o.inappproductsupdaterequest); | 670 checkInappproductsUpdateRequest(o.inappproductsupdaterequest); |
| 636 unittest.expect(o.methodName, unittest.equals('foo')); | 671 unittest.expect(o.methodName, unittest.equals('foo')); |
| 637 } | 672 } |
| 638 buildCounterInappproductsBatchRequestEntry--; | 673 buildCounterInappproductsBatchRequestEntry--; |
| 639 } | 674 } |
| 640 | 675 |
| 641 buildUnnamed1404() { | 676 buildUnnamed269() { |
| 642 var o = new core.List<api.InappproductsBatchResponseEntry>(); | 677 var o = new core.List<api.InappproductsBatchResponseEntry>(); |
| 643 o.add(buildInappproductsBatchResponseEntry()); | 678 o.add(buildInappproductsBatchResponseEntry()); |
| 644 o.add(buildInappproductsBatchResponseEntry()); | 679 o.add(buildInappproductsBatchResponseEntry()); |
| 645 return o; | 680 return o; |
| 646 } | 681 } |
| 647 | 682 |
| 648 checkUnnamed1404(core.List<api.InappproductsBatchResponseEntry> o) { | 683 checkUnnamed269(core.List<api.InappproductsBatchResponseEntry> o) { |
| 649 unittest.expect(o, unittest.hasLength(2)); | 684 unittest.expect(o, unittest.hasLength(2)); |
| 650 checkInappproductsBatchResponseEntry(o[0]); | 685 checkInappproductsBatchResponseEntry(o[0]); |
| 651 checkInappproductsBatchResponseEntry(o[1]); | 686 checkInappproductsBatchResponseEntry(o[1]); |
| 652 } | 687 } |
| 653 | 688 |
| 654 core.int buildCounterInappproductsBatchResponse = 0; | 689 core.int buildCounterInappproductsBatchResponse = 0; |
| 655 buildInappproductsBatchResponse() { | 690 buildInappproductsBatchResponse() { |
| 656 var o = new api.InappproductsBatchResponse(); | 691 var o = new api.InappproductsBatchResponse(); |
| 657 buildCounterInappproductsBatchResponse++; | 692 buildCounterInappproductsBatchResponse++; |
| 658 if (buildCounterInappproductsBatchResponse < 3) { | 693 if (buildCounterInappproductsBatchResponse < 3) { |
| 659 o.entrys = buildUnnamed1404(); | 694 o.entrys = buildUnnamed269(); |
| 660 o.kind = "foo"; | 695 o.kind = "foo"; |
| 661 } | 696 } |
| 662 buildCounterInappproductsBatchResponse--; | 697 buildCounterInappproductsBatchResponse--; |
| 663 return o; | 698 return o; |
| 664 } | 699 } |
| 665 | 700 |
| 666 checkInappproductsBatchResponse(api.InappproductsBatchResponse o) { | 701 checkInappproductsBatchResponse(api.InappproductsBatchResponse o) { |
| 667 buildCounterInappproductsBatchResponse++; | 702 buildCounterInappproductsBatchResponse++; |
| 668 if (buildCounterInappproductsBatchResponse < 3) { | 703 if (buildCounterInappproductsBatchResponse < 3) { |
| 669 checkUnnamed1404(o.entrys); | 704 checkUnnamed269(o.entrys); |
| 670 unittest.expect(o.kind, unittest.equals('foo')); | 705 unittest.expect(o.kind, unittest.equals('foo')); |
| 671 } | 706 } |
| 672 buildCounterInappproductsBatchResponse--; | 707 buildCounterInappproductsBatchResponse--; |
| 673 } | 708 } |
| 674 | 709 |
| 675 core.int buildCounterInappproductsBatchResponseEntry = 0; | 710 core.int buildCounterInappproductsBatchResponseEntry = 0; |
| 676 buildInappproductsBatchResponseEntry() { | 711 buildInappproductsBatchResponseEntry() { |
| 677 var o = new api.InappproductsBatchResponseEntry(); | 712 var o = new api.InappproductsBatchResponseEntry(); |
| 678 buildCounterInappproductsBatchResponseEntry++; | 713 buildCounterInappproductsBatchResponseEntry++; |
| 679 if (buildCounterInappproductsBatchResponseEntry < 3) { | 714 if (buildCounterInappproductsBatchResponseEntry < 3) { |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 726 } | 761 } |
| 727 | 762 |
| 728 checkInappproductsInsertResponse(api.InappproductsInsertResponse o) { | 763 checkInappproductsInsertResponse(api.InappproductsInsertResponse o) { |
| 729 buildCounterInappproductsInsertResponse++; | 764 buildCounterInappproductsInsertResponse++; |
| 730 if (buildCounterInappproductsInsertResponse < 3) { | 765 if (buildCounterInappproductsInsertResponse < 3) { |
| 731 checkInAppProduct(o.inappproduct); | 766 checkInAppProduct(o.inappproduct); |
| 732 } | 767 } |
| 733 buildCounterInappproductsInsertResponse--; | 768 buildCounterInappproductsInsertResponse--; |
| 734 } | 769 } |
| 735 | 770 |
| 736 buildUnnamed1405() { | 771 buildUnnamed270() { |
| 737 var o = new core.List<api.InAppProduct>(); | 772 var o = new core.List<api.InAppProduct>(); |
| 738 o.add(buildInAppProduct()); | 773 o.add(buildInAppProduct()); |
| 739 o.add(buildInAppProduct()); | 774 o.add(buildInAppProduct()); |
| 740 return o; | 775 return o; |
| 741 } | 776 } |
| 742 | 777 |
| 743 checkUnnamed1405(core.List<api.InAppProduct> o) { | 778 checkUnnamed270(core.List<api.InAppProduct> o) { |
| 744 unittest.expect(o, unittest.hasLength(2)); | 779 unittest.expect(o, unittest.hasLength(2)); |
| 745 checkInAppProduct(o[0]); | 780 checkInAppProduct(o[0]); |
| 746 checkInAppProduct(o[1]); | 781 checkInAppProduct(o[1]); |
| 747 } | 782 } |
| 748 | 783 |
| 749 core.int buildCounterInappproductsListResponse = 0; | 784 core.int buildCounterInappproductsListResponse = 0; |
| 750 buildInappproductsListResponse() { | 785 buildInappproductsListResponse() { |
| 751 var o = new api.InappproductsListResponse(); | 786 var o = new api.InappproductsListResponse(); |
| 752 buildCounterInappproductsListResponse++; | 787 buildCounterInappproductsListResponse++; |
| 753 if (buildCounterInappproductsListResponse < 3) { | 788 if (buildCounterInappproductsListResponse < 3) { |
| 754 o.inappproduct = buildUnnamed1405(); | 789 o.inappproduct = buildUnnamed270(); |
| 755 o.kind = "foo"; | 790 o.kind = "foo"; |
| 756 o.pageInfo = buildPageInfo(); | 791 o.pageInfo = buildPageInfo(); |
| 757 o.tokenPagination = buildTokenPagination(); | 792 o.tokenPagination = buildTokenPagination(); |
| 758 } | 793 } |
| 759 buildCounterInappproductsListResponse--; | 794 buildCounterInappproductsListResponse--; |
| 760 return o; | 795 return o; |
| 761 } | 796 } |
| 762 | 797 |
| 763 checkInappproductsListResponse(api.InappproductsListResponse o) { | 798 checkInappproductsListResponse(api.InappproductsListResponse o) { |
| 764 buildCounterInappproductsListResponse++; | 799 buildCounterInappproductsListResponse++; |
| 765 if (buildCounterInappproductsListResponse < 3) { | 800 if (buildCounterInappproductsListResponse < 3) { |
| 766 checkUnnamed1405(o.inappproduct); | 801 checkUnnamed270(o.inappproduct); |
| 767 unittest.expect(o.kind, unittest.equals('foo')); | 802 unittest.expect(o.kind, unittest.equals('foo')); |
| 768 checkPageInfo(o.pageInfo); | 803 checkPageInfo(o.pageInfo); |
| 769 checkTokenPagination(o.tokenPagination); | 804 checkTokenPagination(o.tokenPagination); |
| 770 } | 805 } |
| 771 buildCounterInappproductsListResponse--; | 806 buildCounterInappproductsListResponse--; |
| 772 } | 807 } |
| 773 | 808 |
| 774 core.int buildCounterInappproductsUpdateRequest = 0; | 809 core.int buildCounterInappproductsUpdateRequest = 0; |
| 775 buildInappproductsUpdateRequest() { | 810 buildInappproductsUpdateRequest() { |
| 776 var o = new api.InappproductsUpdateRequest(); | 811 var o = new api.InappproductsUpdateRequest(); |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 829 if (buildCounterListing < 3) { | 864 if (buildCounterListing < 3) { |
| 830 unittest.expect(o.fullDescription, unittest.equals('foo')); | 865 unittest.expect(o.fullDescription, unittest.equals('foo')); |
| 831 unittest.expect(o.language, unittest.equals('foo')); | 866 unittest.expect(o.language, unittest.equals('foo')); |
| 832 unittest.expect(o.shortDescription, unittest.equals('foo')); | 867 unittest.expect(o.shortDescription, unittest.equals('foo')); |
| 833 unittest.expect(o.title, unittest.equals('foo')); | 868 unittest.expect(o.title, unittest.equals('foo')); |
| 834 unittest.expect(o.video, unittest.equals('foo')); | 869 unittest.expect(o.video, unittest.equals('foo')); |
| 835 } | 870 } |
| 836 buildCounterListing--; | 871 buildCounterListing--; |
| 837 } | 872 } |
| 838 | 873 |
| 839 buildUnnamed1406() { | 874 buildUnnamed271() { |
| 840 var o = new core.List<api.Listing>(); | 875 var o = new core.List<api.Listing>(); |
| 841 o.add(buildListing()); | 876 o.add(buildListing()); |
| 842 o.add(buildListing()); | 877 o.add(buildListing()); |
| 843 return o; | 878 return o; |
| 844 } | 879 } |
| 845 | 880 |
| 846 checkUnnamed1406(core.List<api.Listing> o) { | 881 checkUnnamed271(core.List<api.Listing> o) { |
| 847 unittest.expect(o, unittest.hasLength(2)); | 882 unittest.expect(o, unittest.hasLength(2)); |
| 848 checkListing(o[0]); | 883 checkListing(o[0]); |
| 849 checkListing(o[1]); | 884 checkListing(o[1]); |
| 850 } | 885 } |
| 851 | 886 |
| 852 core.int buildCounterListingsListResponse = 0; | 887 core.int buildCounterListingsListResponse = 0; |
| 853 buildListingsListResponse() { | 888 buildListingsListResponse() { |
| 854 var o = new api.ListingsListResponse(); | 889 var o = new api.ListingsListResponse(); |
| 855 buildCounterListingsListResponse++; | 890 buildCounterListingsListResponse++; |
| 856 if (buildCounterListingsListResponse < 3) { | 891 if (buildCounterListingsListResponse < 3) { |
| 857 o.kind = "foo"; | 892 o.kind = "foo"; |
| 858 o.listings = buildUnnamed1406(); | 893 o.listings = buildUnnamed271(); |
| 859 } | 894 } |
| 860 buildCounterListingsListResponse--; | 895 buildCounterListingsListResponse--; |
| 861 return o; | 896 return o; |
| 862 } | 897 } |
| 863 | 898 |
| 864 checkListingsListResponse(api.ListingsListResponse o) { | 899 checkListingsListResponse(api.ListingsListResponse o) { |
| 865 buildCounterListingsListResponse++; | 900 buildCounterListingsListResponse++; |
| 866 if (buildCounterListingsListResponse < 3) { | 901 if (buildCounterListingsListResponse < 3) { |
| 867 unittest.expect(o.kind, unittest.equals('foo')); | 902 unittest.expect(o.kind, unittest.equals('foo')); |
| 868 checkUnnamed1406(o.listings); | 903 checkUnnamed271(o.listings); |
| 869 } | 904 } |
| 870 buildCounterListingsListResponse--; | 905 buildCounterListingsListResponse--; |
| 871 } | 906 } |
| 872 | 907 |
| 873 core.int buildCounterMonthDay = 0; | 908 core.int buildCounterMonthDay = 0; |
| 874 buildMonthDay() { | 909 buildMonthDay() { |
| 875 var o = new api.MonthDay(); | 910 var o = new api.MonthDay(); |
| 876 buildCounterMonthDay++; | 911 buildCounterMonthDay++; |
| 877 if (buildCounterMonthDay < 3) { | 912 if (buildCounterMonthDay < 3) { |
| 878 o.day = 42; | 913 o.day = 42; |
| (...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1060 } | 1095 } |
| 1061 | 1096 |
| 1062 checkSubscriptionPurchasesDeferResponse(api.SubscriptionPurchasesDeferResponse o
) { | 1097 checkSubscriptionPurchasesDeferResponse(api.SubscriptionPurchasesDeferResponse o
) { |
| 1063 buildCounterSubscriptionPurchasesDeferResponse++; | 1098 buildCounterSubscriptionPurchasesDeferResponse++; |
| 1064 if (buildCounterSubscriptionPurchasesDeferResponse < 3) { | 1099 if (buildCounterSubscriptionPurchasesDeferResponse < 3) { |
| 1065 unittest.expect(o.newExpiryTimeMillis, unittest.equals('foo')); | 1100 unittest.expect(o.newExpiryTimeMillis, unittest.equals('foo')); |
| 1066 } | 1101 } |
| 1067 buildCounterSubscriptionPurchasesDeferResponse--; | 1102 buildCounterSubscriptionPurchasesDeferResponse--; |
| 1068 } | 1103 } |
| 1069 | 1104 |
| 1070 buildUnnamed1407() { | 1105 buildUnnamed272() { |
| 1071 var o = new core.List<core.String>(); | 1106 var o = new core.List<core.String>(); |
| 1072 o.add("foo"); | 1107 o.add("foo"); |
| 1073 o.add("foo"); | 1108 o.add("foo"); |
| 1074 return o; | 1109 return o; |
| 1075 } | 1110 } |
| 1076 | 1111 |
| 1077 checkUnnamed1407(core.List<core.String> o) { | 1112 checkUnnamed272(core.List<core.String> o) { |
| 1078 unittest.expect(o, unittest.hasLength(2)); | 1113 unittest.expect(o, unittest.hasLength(2)); |
| 1079 unittest.expect(o[0], unittest.equals('foo')); | 1114 unittest.expect(o[0], unittest.equals('foo')); |
| 1080 unittest.expect(o[1], unittest.equals('foo')); | 1115 unittest.expect(o[1], unittest.equals('foo')); |
| 1081 } | 1116 } |
| 1082 | 1117 |
| 1083 buildUnnamed1408() { | 1118 buildUnnamed273() { |
| 1084 var o = new core.List<core.String>(); | 1119 var o = new core.List<core.String>(); |
| 1085 o.add("foo"); | 1120 o.add("foo"); |
| 1086 o.add("foo"); | 1121 o.add("foo"); |
| 1087 return o; | 1122 return o; |
| 1088 } | 1123 } |
| 1089 | 1124 |
| 1090 checkUnnamed1408(core.List<core.String> o) { | 1125 checkUnnamed273(core.List<core.String> o) { |
| 1091 unittest.expect(o, unittest.hasLength(2)); | 1126 unittest.expect(o, unittest.hasLength(2)); |
| 1092 unittest.expect(o[0], unittest.equals('foo')); | 1127 unittest.expect(o[0], unittest.equals('foo')); |
| 1093 unittest.expect(o[1], unittest.equals('foo')); | 1128 unittest.expect(o[1], unittest.equals('foo')); |
| 1094 } | 1129 } |
| 1095 | 1130 |
| 1096 core.int buildCounterTesters = 0; | 1131 core.int buildCounterTesters = 0; |
| 1097 buildTesters() { | 1132 buildTesters() { |
| 1098 var o = new api.Testers(); | 1133 var o = new api.Testers(); |
| 1099 buildCounterTesters++; | 1134 buildCounterTesters++; |
| 1100 if (buildCounterTesters < 3) { | 1135 if (buildCounterTesters < 3) { |
| 1101 o.googleGroups = buildUnnamed1407(); | 1136 o.googleGroups = buildUnnamed272(); |
| 1102 o.googlePlusCommunities = buildUnnamed1408(); | 1137 o.googlePlusCommunities = buildUnnamed273(); |
| 1103 } | 1138 } |
| 1104 buildCounterTesters--; | 1139 buildCounterTesters--; |
| 1105 return o; | 1140 return o; |
| 1106 } | 1141 } |
| 1107 | 1142 |
| 1108 checkTesters(api.Testers o) { | 1143 checkTesters(api.Testers o) { |
| 1109 buildCounterTesters++; | 1144 buildCounterTesters++; |
| 1110 if (buildCounterTesters < 3) { | 1145 if (buildCounterTesters < 3) { |
| 1111 checkUnnamed1407(o.googleGroups); | 1146 checkUnnamed272(o.googleGroups); |
| 1112 checkUnnamed1408(o.googlePlusCommunities); | 1147 checkUnnamed273(o.googlePlusCommunities); |
| 1113 } | 1148 } |
| 1114 buildCounterTesters--; | 1149 buildCounterTesters--; |
| 1115 } | 1150 } |
| 1116 | 1151 |
| 1117 core.int buildCounterTokenPagination = 0; | 1152 core.int buildCounterTokenPagination = 0; |
| 1118 buildTokenPagination() { | 1153 buildTokenPagination() { |
| 1119 var o = new api.TokenPagination(); | 1154 var o = new api.TokenPagination(); |
| 1120 buildCounterTokenPagination++; | 1155 buildCounterTokenPagination++; |
| 1121 if (buildCounterTokenPagination < 3) { | 1156 if (buildCounterTokenPagination < 3) { |
| 1122 o.nextPageToken = "foo"; | 1157 o.nextPageToken = "foo"; |
| 1123 o.previousPageToken = "foo"; | 1158 o.previousPageToken = "foo"; |
| 1124 } | 1159 } |
| 1125 buildCounterTokenPagination--; | 1160 buildCounterTokenPagination--; |
| 1126 return o; | 1161 return o; |
| 1127 } | 1162 } |
| 1128 | 1163 |
| 1129 checkTokenPagination(api.TokenPagination o) { | 1164 checkTokenPagination(api.TokenPagination o) { |
| 1130 buildCounterTokenPagination++; | 1165 buildCounterTokenPagination++; |
| 1131 if (buildCounterTokenPagination < 3) { | 1166 if (buildCounterTokenPagination < 3) { |
| 1132 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 1167 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 1133 unittest.expect(o.previousPageToken, unittest.equals('foo')); | 1168 unittest.expect(o.previousPageToken, unittest.equals('foo')); |
| 1134 } | 1169 } |
| 1135 buildCounterTokenPagination--; | 1170 buildCounterTokenPagination--; |
| 1136 } | 1171 } |
| 1137 | 1172 |
| 1138 buildUnnamed1409() { | 1173 buildUnnamed274() { |
| 1139 var o = new core.List<core.int>(); | 1174 var o = new core.List<core.int>(); |
| 1140 o.add(42); | 1175 o.add(42); |
| 1141 o.add(42); | 1176 o.add(42); |
| 1142 return o; | 1177 return o; |
| 1143 } | 1178 } |
| 1144 | 1179 |
| 1145 checkUnnamed1409(core.List<core.int> o) { | 1180 checkUnnamed274(core.List<core.int> o) { |
| 1146 unittest.expect(o, unittest.hasLength(2)); | 1181 unittest.expect(o, unittest.hasLength(2)); |
| 1147 unittest.expect(o[0], unittest.equals(42)); | 1182 unittest.expect(o[0], unittest.equals(42)); |
| 1148 unittest.expect(o[1], unittest.equals(42)); | 1183 unittest.expect(o[1], unittest.equals(42)); |
| 1149 } | 1184 } |
| 1150 | 1185 |
| 1151 core.int buildCounterTrack = 0; | 1186 core.int buildCounterTrack = 0; |
| 1152 buildTrack() { | 1187 buildTrack() { |
| 1153 var o = new api.Track(); | 1188 var o = new api.Track(); |
| 1154 buildCounterTrack++; | 1189 buildCounterTrack++; |
| 1155 if (buildCounterTrack < 3) { | 1190 if (buildCounterTrack < 3) { |
| 1156 o.track = "foo"; | 1191 o.track = "foo"; |
| 1157 o.userFraction = 42.0; | 1192 o.userFraction = 42.0; |
| 1158 o.versionCodes = buildUnnamed1409(); | 1193 o.versionCodes = buildUnnamed274(); |
| 1159 } | 1194 } |
| 1160 buildCounterTrack--; | 1195 buildCounterTrack--; |
| 1161 return o; | 1196 return o; |
| 1162 } | 1197 } |
| 1163 | 1198 |
| 1164 checkTrack(api.Track o) { | 1199 checkTrack(api.Track o) { |
| 1165 buildCounterTrack++; | 1200 buildCounterTrack++; |
| 1166 if (buildCounterTrack < 3) { | 1201 if (buildCounterTrack < 3) { |
| 1167 unittest.expect(o.track, unittest.equals('foo')); | 1202 unittest.expect(o.track, unittest.equals('foo')); |
| 1168 unittest.expect(o.userFraction, unittest.equals(42.0)); | 1203 unittest.expect(o.userFraction, unittest.equals(42.0)); |
| 1169 checkUnnamed1409(o.versionCodes); | 1204 checkUnnamed274(o.versionCodes); |
| 1170 } | 1205 } |
| 1171 buildCounterTrack--; | 1206 buildCounterTrack--; |
| 1172 } | 1207 } |
| 1173 | 1208 |
| 1174 buildUnnamed1410() { | 1209 buildUnnamed275() { |
| 1175 var o = new core.List<api.Track>(); | 1210 var o = new core.List<api.Track>(); |
| 1176 o.add(buildTrack()); | 1211 o.add(buildTrack()); |
| 1177 o.add(buildTrack()); | 1212 o.add(buildTrack()); |
| 1178 return o; | 1213 return o; |
| 1179 } | 1214 } |
| 1180 | 1215 |
| 1181 checkUnnamed1410(core.List<api.Track> o) { | 1216 checkUnnamed275(core.List<api.Track> o) { |
| 1182 unittest.expect(o, unittest.hasLength(2)); | 1217 unittest.expect(o, unittest.hasLength(2)); |
| 1183 checkTrack(o[0]); | 1218 checkTrack(o[0]); |
| 1184 checkTrack(o[1]); | 1219 checkTrack(o[1]); |
| 1185 } | 1220 } |
| 1186 | 1221 |
| 1187 core.int buildCounterTracksListResponse = 0; | 1222 core.int buildCounterTracksListResponse = 0; |
| 1188 buildTracksListResponse() { | 1223 buildTracksListResponse() { |
| 1189 var o = new api.TracksListResponse(); | 1224 var o = new api.TracksListResponse(); |
| 1190 buildCounterTracksListResponse++; | 1225 buildCounterTracksListResponse++; |
| 1191 if (buildCounterTracksListResponse < 3) { | 1226 if (buildCounterTracksListResponse < 3) { |
| 1192 o.kind = "foo"; | 1227 o.kind = "foo"; |
| 1193 o.tracks = buildUnnamed1410(); | 1228 o.tracks = buildUnnamed275(); |
| 1194 } | 1229 } |
| 1195 buildCounterTracksListResponse--; | 1230 buildCounterTracksListResponse--; |
| 1196 return o; | 1231 return o; |
| 1197 } | 1232 } |
| 1198 | 1233 |
| 1199 checkTracksListResponse(api.TracksListResponse o) { | 1234 checkTracksListResponse(api.TracksListResponse o) { |
| 1200 buildCounterTracksListResponse++; | 1235 buildCounterTracksListResponse++; |
| 1201 if (buildCounterTracksListResponse < 3) { | 1236 if (buildCounterTracksListResponse < 3) { |
| 1202 unittest.expect(o.kind, unittest.equals('foo')); | 1237 unittest.expect(o.kind, unittest.equals('foo')); |
| 1203 checkUnnamed1410(o.tracks); | 1238 checkUnnamed275(o.tracks); |
| 1204 } | 1239 } |
| 1205 buildCounterTracksListResponse--; | 1240 buildCounterTracksListResponse--; |
| 1206 } | 1241 } |
| 1207 | 1242 |
| 1208 | 1243 |
| 1209 main() { | 1244 main() { |
| 1210 unittest.group("obj-schema-Apk", () { | 1245 unittest.group("obj-schema-Apk", () { |
| 1211 unittest.test("to-json--from-json", () { | 1246 unittest.test("to-json--from-json", () { |
| 1212 var o = buildApk(); | 1247 var o = buildApk(); |
| 1213 var od = new api.Apk.fromJson(o.toJson()); | 1248 var od = new api.Apk.fromJson(o.toJson()); |
| (...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1590 var o = buildTracksListResponse(); | 1625 var o = buildTracksListResponse(); |
| 1591 var od = new api.TracksListResponse.fromJson(o.toJson()); | 1626 var od = new api.TracksListResponse.fromJson(o.toJson()); |
| 1592 checkTracksListResponse(od); | 1627 checkTracksListResponse(od); |
| 1593 }); | 1628 }); |
| 1594 }); | 1629 }); |
| 1595 | 1630 |
| 1596 | 1631 |
| 1597 unittest.group("resource-EditsResourceApi", () { | 1632 unittest.group("resource-EditsResourceApi", () { |
| 1598 unittest.test("method--commit", () { | 1633 unittest.test("method--commit", () { |
| 1599 | 1634 |
| 1600 var mock = new common_test.HttpServerMock(); | 1635 var mock = new HttpServerMock(); |
| 1601 api.EditsResourceApi res = new api.AndroidpublisherApi(mock).edits; | 1636 api.EditsResourceApi res = new api.AndroidpublisherApi(mock).edits; |
| 1602 var arg_packageName = "foo"; | 1637 var arg_packageName = "foo"; |
| 1603 var arg_editId = "foo"; | 1638 var arg_editId = "foo"; |
| 1604 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1639 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 1605 var path = (req.url).path; | 1640 var path = (req.url).path; |
| 1606 var pathOffset = 0; | 1641 var pathOffset = 0; |
| 1607 var index; | 1642 var index; |
| 1608 var subPart; | 1643 var subPart; |
| 1609 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1644 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1610 pathOffset += 1; | 1645 pathOffset += 1; |
| (...skipping 13 matching lines...) Expand all Loading... |
| 1624 var keyvalue = part.split("="); | 1659 var keyvalue = part.split("="); |
| 1625 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1660 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 1626 } | 1661 } |
| 1627 } | 1662 } |
| 1628 | 1663 |
| 1629 | 1664 |
| 1630 var h = { | 1665 var h = { |
| 1631 "content-type" : "application/json; charset=utf-8", | 1666 "content-type" : "application/json; charset=utf-8", |
| 1632 }; | 1667 }; |
| 1633 var resp = convert.JSON.encode(buildAppEdit()); | 1668 var resp = convert.JSON.encode(buildAppEdit()); |
| 1634 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 1669 return new async.Future.value(stringResponse(200, h, resp)); |
| 1635 }), true); | 1670 }), true); |
| 1636 res.commit(arg_packageName, arg_editId).then(unittest.expectAsync(((api.Ap
pEdit response) { | 1671 res.commit(arg_packageName, arg_editId).then(unittest.expectAsync(((api.Ap
pEdit response) { |
| 1637 checkAppEdit(response); | 1672 checkAppEdit(response); |
| 1638 }))); | 1673 }))); |
| 1639 }); | 1674 }); |
| 1640 | 1675 |
| 1641 unittest.test("method--delete", () { | 1676 unittest.test("method--delete", () { |
| 1642 | 1677 |
| 1643 var mock = new common_test.HttpServerMock(); | 1678 var mock = new HttpServerMock(); |
| 1644 api.EditsResourceApi res = new api.AndroidpublisherApi(mock).edits; | 1679 api.EditsResourceApi res = new api.AndroidpublisherApi(mock).edits; |
| 1645 var arg_packageName = "foo"; | 1680 var arg_packageName = "foo"; |
| 1646 var arg_editId = "foo"; | 1681 var arg_editId = "foo"; |
| 1647 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1682 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 1648 var path = (req.url).path; | 1683 var path = (req.url).path; |
| 1649 var pathOffset = 0; | 1684 var pathOffset = 0; |
| 1650 var index; | 1685 var index; |
| 1651 var subPart; | 1686 var subPart; |
| 1652 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1687 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1653 pathOffset += 1; | 1688 pathOffset += 1; |
| (...skipping 13 matching lines...) Expand all Loading... |
| 1667 var keyvalue = part.split("="); | 1702 var keyvalue = part.split("="); |
| 1668 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1703 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 1669 } | 1704 } |
| 1670 } | 1705 } |
| 1671 | 1706 |
| 1672 | 1707 |
| 1673 var h = { | 1708 var h = { |
| 1674 "content-type" : "application/json; charset=utf-8", | 1709 "content-type" : "application/json; charset=utf-8", |
| 1675 }; | 1710 }; |
| 1676 var resp = ""; | 1711 var resp = ""; |
| 1677 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 1712 return new async.Future.value(stringResponse(200, h, resp)); |
| 1678 }), true); | 1713 }), true); |
| 1679 res.delete(arg_packageName, arg_editId).then(unittest.expectAsync((_) {}))
; | 1714 res.delete(arg_packageName, arg_editId).then(unittest.expectAsync((_) {}))
; |
| 1680 }); | 1715 }); |
| 1681 | 1716 |
| 1682 unittest.test("method--get", () { | 1717 unittest.test("method--get", () { |
| 1683 | 1718 |
| 1684 var mock = new common_test.HttpServerMock(); | 1719 var mock = new HttpServerMock(); |
| 1685 api.EditsResourceApi res = new api.AndroidpublisherApi(mock).edits; | 1720 api.EditsResourceApi res = new api.AndroidpublisherApi(mock).edits; |
| 1686 var arg_packageName = "foo"; | 1721 var arg_packageName = "foo"; |
| 1687 var arg_editId = "foo"; | 1722 var arg_editId = "foo"; |
| 1688 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1723 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 1689 var path = (req.url).path; | 1724 var path = (req.url).path; |
| 1690 var pathOffset = 0; | 1725 var pathOffset = 0; |
| 1691 var index; | 1726 var index; |
| 1692 var subPart; | 1727 var subPart; |
| 1693 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1728 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1694 pathOffset += 1; | 1729 pathOffset += 1; |
| (...skipping 13 matching lines...) Expand all Loading... |
| 1708 var keyvalue = part.split("="); | 1743 var keyvalue = part.split("="); |
| 1709 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1744 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 1710 } | 1745 } |
| 1711 } | 1746 } |
| 1712 | 1747 |
| 1713 | 1748 |
| 1714 var h = { | 1749 var h = { |
| 1715 "content-type" : "application/json; charset=utf-8", | 1750 "content-type" : "application/json; charset=utf-8", |
| 1716 }; | 1751 }; |
| 1717 var resp = convert.JSON.encode(buildAppEdit()); | 1752 var resp = convert.JSON.encode(buildAppEdit()); |
| 1718 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 1753 return new async.Future.value(stringResponse(200, h, resp)); |
| 1719 }), true); | 1754 }), true); |
| 1720 res.get(arg_packageName, arg_editId).then(unittest.expectAsync(((api.AppEd
it response) { | 1755 res.get(arg_packageName, arg_editId).then(unittest.expectAsync(((api.AppEd
it response) { |
| 1721 checkAppEdit(response); | 1756 checkAppEdit(response); |
| 1722 }))); | 1757 }))); |
| 1723 }); | 1758 }); |
| 1724 | 1759 |
| 1725 unittest.test("method--insert", () { | 1760 unittest.test("method--insert", () { |
| 1726 | 1761 |
| 1727 var mock = new common_test.HttpServerMock(); | 1762 var mock = new HttpServerMock(); |
| 1728 api.EditsResourceApi res = new api.AndroidpublisherApi(mock).edits; | 1763 api.EditsResourceApi res = new api.AndroidpublisherApi(mock).edits; |
| 1729 var arg_request = buildAppEdit(); | 1764 var arg_request = buildAppEdit(); |
| 1730 var arg_packageName = "foo"; | 1765 var arg_packageName = "foo"; |
| 1731 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1766 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 1732 var obj = new api.AppEdit.fromJson(json); | 1767 var obj = new api.AppEdit.fromJson(json); |
| 1733 checkAppEdit(obj); | 1768 checkAppEdit(obj); |
| 1734 | 1769 |
| 1735 var path = (req.url).path; | 1770 var path = (req.url).path; |
| 1736 var pathOffset = 0; | 1771 var pathOffset = 0; |
| 1737 var index; | 1772 var index; |
| (...skipping 16 matching lines...) Expand all Loading... |
| 1754 var keyvalue = part.split("="); | 1789 var keyvalue = part.split("="); |
| 1755 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1790 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 1756 } | 1791 } |
| 1757 } | 1792 } |
| 1758 | 1793 |
| 1759 | 1794 |
| 1760 var h = { | 1795 var h = { |
| 1761 "content-type" : "application/json; charset=utf-8", | 1796 "content-type" : "application/json; charset=utf-8", |
| 1762 }; | 1797 }; |
| 1763 var resp = convert.JSON.encode(buildAppEdit()); | 1798 var resp = convert.JSON.encode(buildAppEdit()); |
| 1764 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 1799 return new async.Future.value(stringResponse(200, h, resp)); |
| 1765 }), true); | 1800 }), true); |
| 1766 res.insert(arg_request, arg_packageName).then(unittest.expectAsync(((api.A
ppEdit response) { | 1801 res.insert(arg_request, arg_packageName).then(unittest.expectAsync(((api.A
ppEdit response) { |
| 1767 checkAppEdit(response); | 1802 checkAppEdit(response); |
| 1768 }))); | 1803 }))); |
| 1769 }); | 1804 }); |
| 1770 | 1805 |
| 1771 unittest.test("method--validate", () { | 1806 unittest.test("method--validate", () { |
| 1772 | 1807 |
| 1773 var mock = new common_test.HttpServerMock(); | 1808 var mock = new HttpServerMock(); |
| 1774 api.EditsResourceApi res = new api.AndroidpublisherApi(mock).edits; | 1809 api.EditsResourceApi res = new api.AndroidpublisherApi(mock).edits; |
| 1775 var arg_packageName = "foo"; | 1810 var arg_packageName = "foo"; |
| 1776 var arg_editId = "foo"; | 1811 var arg_editId = "foo"; |
| 1777 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1812 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 1778 var path = (req.url).path; | 1813 var path = (req.url).path; |
| 1779 var pathOffset = 0; | 1814 var pathOffset = 0; |
| 1780 var index; | 1815 var index; |
| 1781 var subPart; | 1816 var subPart; |
| 1782 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1817 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1783 pathOffset += 1; | 1818 pathOffset += 1; |
| (...skipping 13 matching lines...) Expand all Loading... |
| 1797 var keyvalue = part.split("="); | 1832 var keyvalue = part.split("="); |
| 1798 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1833 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 1799 } | 1834 } |
| 1800 } | 1835 } |
| 1801 | 1836 |
| 1802 | 1837 |
| 1803 var h = { | 1838 var h = { |
| 1804 "content-type" : "application/json; charset=utf-8", | 1839 "content-type" : "application/json; charset=utf-8", |
| 1805 }; | 1840 }; |
| 1806 var resp = convert.JSON.encode(buildAppEdit()); | 1841 var resp = convert.JSON.encode(buildAppEdit()); |
| 1807 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 1842 return new async.Future.value(stringResponse(200, h, resp)); |
| 1808 }), true); | 1843 }), true); |
| 1809 res.validate(arg_packageName, arg_editId).then(unittest.expectAsync(((api.
AppEdit response) { | 1844 res.validate(arg_packageName, arg_editId).then(unittest.expectAsync(((api.
AppEdit response) { |
| 1810 checkAppEdit(response); | 1845 checkAppEdit(response); |
| 1811 }))); | 1846 }))); |
| 1812 }); | 1847 }); |
| 1813 | 1848 |
| 1814 }); | 1849 }); |
| 1815 | 1850 |
| 1816 | 1851 |
| 1817 unittest.group("resource-EditsApklistingsResourceApi", () { | 1852 unittest.group("resource-EditsApklistingsResourceApi", () { |
| 1818 unittest.test("method--delete", () { | 1853 unittest.test("method--delete", () { |
| 1819 | 1854 |
| 1820 var mock = new common_test.HttpServerMock(); | 1855 var mock = new HttpServerMock(); |
| 1821 api.EditsApklistingsResourceApi res = new api.AndroidpublisherApi(mock).ed
its.apklistings; | 1856 api.EditsApklistingsResourceApi res = new api.AndroidpublisherApi(mock).ed
its.apklistings; |
| 1822 var arg_packageName = "foo"; | 1857 var arg_packageName = "foo"; |
| 1823 var arg_editId = "foo"; | 1858 var arg_editId = "foo"; |
| 1824 var arg_apkVersionCode = 42; | 1859 var arg_apkVersionCode = 42; |
| 1825 var arg_language = "foo"; | 1860 var arg_language = "foo"; |
| 1826 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1861 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 1827 var path = (req.url).path; | 1862 var path = (req.url).path; |
| 1828 var pathOffset = 0; | 1863 var pathOffset = 0; |
| 1829 var index; | 1864 var index; |
| 1830 var subPart; | 1865 var subPart; |
| (...skipping 15 matching lines...) Expand all Loading... |
| 1846 var keyvalue = part.split("="); | 1881 var keyvalue = part.split("="); |
| 1847 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1882 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 1848 } | 1883 } |
| 1849 } | 1884 } |
| 1850 | 1885 |
| 1851 | 1886 |
| 1852 var h = { | 1887 var h = { |
| 1853 "content-type" : "application/json; charset=utf-8", | 1888 "content-type" : "application/json; charset=utf-8", |
| 1854 }; | 1889 }; |
| 1855 var resp = ""; | 1890 var resp = ""; |
| 1856 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 1891 return new async.Future.value(stringResponse(200, h, resp)); |
| 1857 }), true); | 1892 }), true); |
| 1858 res.delete(arg_packageName, arg_editId, arg_apkVersionCode, arg_language).
then(unittest.expectAsync((_) {})); | 1893 res.delete(arg_packageName, arg_editId, arg_apkVersionCode, arg_language).
then(unittest.expectAsync((_) {})); |
| 1859 }); | 1894 }); |
| 1860 | 1895 |
| 1861 unittest.test("method--deleteall", () { | 1896 unittest.test("method--deleteall", () { |
| 1862 | 1897 |
| 1863 var mock = new common_test.HttpServerMock(); | 1898 var mock = new HttpServerMock(); |
| 1864 api.EditsApklistingsResourceApi res = new api.AndroidpublisherApi(mock).ed
its.apklistings; | 1899 api.EditsApklistingsResourceApi res = new api.AndroidpublisherApi(mock).ed
its.apklistings; |
| 1865 var arg_packageName = "foo"; | 1900 var arg_packageName = "foo"; |
| 1866 var arg_editId = "foo"; | 1901 var arg_editId = "foo"; |
| 1867 var arg_apkVersionCode = 42; | 1902 var arg_apkVersionCode = 42; |
| 1868 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1903 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 1869 var path = (req.url).path; | 1904 var path = (req.url).path; |
| 1870 var pathOffset = 0; | 1905 var pathOffset = 0; |
| 1871 var index; | 1906 var index; |
| 1872 var subPart; | 1907 var subPart; |
| 1873 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1908 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| (...skipping 14 matching lines...) Expand all Loading... |
| 1888 var keyvalue = part.split("="); | 1923 var keyvalue = part.split("="); |
| 1889 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1924 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 1890 } | 1925 } |
| 1891 } | 1926 } |
| 1892 | 1927 |
| 1893 | 1928 |
| 1894 var h = { | 1929 var h = { |
| 1895 "content-type" : "application/json; charset=utf-8", | 1930 "content-type" : "application/json; charset=utf-8", |
| 1896 }; | 1931 }; |
| 1897 var resp = ""; | 1932 var resp = ""; |
| 1898 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 1933 return new async.Future.value(stringResponse(200, h, resp)); |
| 1899 }), true); | 1934 }), true); |
| 1900 res.deleteall(arg_packageName, arg_editId, arg_apkVersionCode).then(unitte
st.expectAsync((_) {})); | 1935 res.deleteall(arg_packageName, arg_editId, arg_apkVersionCode).then(unitte
st.expectAsync((_) {})); |
| 1901 }); | 1936 }); |
| 1902 | 1937 |
| 1903 unittest.test("method--get", () { | 1938 unittest.test("method--get", () { |
| 1904 | 1939 |
| 1905 var mock = new common_test.HttpServerMock(); | 1940 var mock = new HttpServerMock(); |
| 1906 api.EditsApklistingsResourceApi res = new api.AndroidpublisherApi(mock).ed
its.apklistings; | 1941 api.EditsApklistingsResourceApi res = new api.AndroidpublisherApi(mock).ed
its.apklistings; |
| 1907 var arg_packageName = "foo"; | 1942 var arg_packageName = "foo"; |
| 1908 var arg_editId = "foo"; | 1943 var arg_editId = "foo"; |
| 1909 var arg_apkVersionCode = 42; | 1944 var arg_apkVersionCode = 42; |
| 1910 var arg_language = "foo"; | 1945 var arg_language = "foo"; |
| 1911 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1946 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 1912 var path = (req.url).path; | 1947 var path = (req.url).path; |
| 1913 var pathOffset = 0; | 1948 var pathOffset = 0; |
| 1914 var index; | 1949 var index; |
| 1915 var subPart; | 1950 var subPart; |
| (...skipping 15 matching lines...) Expand all Loading... |
| 1931 var keyvalue = part.split("="); | 1966 var keyvalue = part.split("="); |
| 1932 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1967 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 1933 } | 1968 } |
| 1934 } | 1969 } |
| 1935 | 1970 |
| 1936 | 1971 |
| 1937 var h = { | 1972 var h = { |
| 1938 "content-type" : "application/json; charset=utf-8", | 1973 "content-type" : "application/json; charset=utf-8", |
| 1939 }; | 1974 }; |
| 1940 var resp = convert.JSON.encode(buildApkListing()); | 1975 var resp = convert.JSON.encode(buildApkListing()); |
| 1941 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 1976 return new async.Future.value(stringResponse(200, h, resp)); |
| 1942 }), true); | 1977 }), true); |
| 1943 res.get(arg_packageName, arg_editId, arg_apkVersionCode, arg_language).the
n(unittest.expectAsync(((api.ApkListing response) { | 1978 res.get(arg_packageName, arg_editId, arg_apkVersionCode, arg_language).the
n(unittest.expectAsync(((api.ApkListing response) { |
| 1944 checkApkListing(response); | 1979 checkApkListing(response); |
| 1945 }))); | 1980 }))); |
| 1946 }); | 1981 }); |
| 1947 | 1982 |
| 1948 unittest.test("method--list", () { | 1983 unittest.test("method--list", () { |
| 1949 | 1984 |
| 1950 var mock = new common_test.HttpServerMock(); | 1985 var mock = new HttpServerMock(); |
| 1951 api.EditsApklistingsResourceApi res = new api.AndroidpublisherApi(mock).ed
its.apklistings; | 1986 api.EditsApklistingsResourceApi res = new api.AndroidpublisherApi(mock).ed
its.apklistings; |
| 1952 var arg_packageName = "foo"; | 1987 var arg_packageName = "foo"; |
| 1953 var arg_editId = "foo"; | 1988 var arg_editId = "foo"; |
| 1954 var arg_apkVersionCode = 42; | 1989 var arg_apkVersionCode = 42; |
| 1955 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1990 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 1956 var path = (req.url).path; | 1991 var path = (req.url).path; |
| 1957 var pathOffset = 0; | 1992 var pathOffset = 0; |
| 1958 var index; | 1993 var index; |
| 1959 var subPart; | 1994 var subPart; |
| 1960 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1995 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| (...skipping 14 matching lines...) Expand all Loading... |
| 1975 var keyvalue = part.split("="); | 2010 var keyvalue = part.split("="); |
| 1976 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2011 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 1977 } | 2012 } |
| 1978 } | 2013 } |
| 1979 | 2014 |
| 1980 | 2015 |
| 1981 var h = { | 2016 var h = { |
| 1982 "content-type" : "application/json; charset=utf-8", | 2017 "content-type" : "application/json; charset=utf-8", |
| 1983 }; | 2018 }; |
| 1984 var resp = convert.JSON.encode(buildApkListingsListResponse()); | 2019 var resp = convert.JSON.encode(buildApkListingsListResponse()); |
| 1985 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2020 return new async.Future.value(stringResponse(200, h, resp)); |
| 1986 }), true); | 2021 }), true); |
| 1987 res.list(arg_packageName, arg_editId, arg_apkVersionCode).then(unittest.ex
pectAsync(((api.ApkListingsListResponse response) { | 2022 res.list(arg_packageName, arg_editId, arg_apkVersionCode).then(unittest.ex
pectAsync(((api.ApkListingsListResponse response) { |
| 1988 checkApkListingsListResponse(response); | 2023 checkApkListingsListResponse(response); |
| 1989 }))); | 2024 }))); |
| 1990 }); | 2025 }); |
| 1991 | 2026 |
| 1992 unittest.test("method--patch", () { | 2027 unittest.test("method--patch", () { |
| 1993 | 2028 |
| 1994 var mock = new common_test.HttpServerMock(); | 2029 var mock = new HttpServerMock(); |
| 1995 api.EditsApklistingsResourceApi res = new api.AndroidpublisherApi(mock).ed
its.apklistings; | 2030 api.EditsApklistingsResourceApi res = new api.AndroidpublisherApi(mock).ed
its.apklistings; |
| 1996 var arg_request = buildApkListing(); | 2031 var arg_request = buildApkListing(); |
| 1997 var arg_packageName = "foo"; | 2032 var arg_packageName = "foo"; |
| 1998 var arg_editId = "foo"; | 2033 var arg_editId = "foo"; |
| 1999 var arg_apkVersionCode = 42; | 2034 var arg_apkVersionCode = 42; |
| 2000 var arg_language = "foo"; | 2035 var arg_language = "foo"; |
| 2001 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2036 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 2002 var obj = new api.ApkListing.fromJson(json); | 2037 var obj = new api.ApkListing.fromJson(json); |
| 2003 checkApkListing(obj); | 2038 checkApkListing(obj); |
| 2004 | 2039 |
| (...skipping 19 matching lines...) Expand all Loading... |
| 2024 var keyvalue = part.split("="); | 2059 var keyvalue = part.split("="); |
| 2025 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2060 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 2026 } | 2061 } |
| 2027 } | 2062 } |
| 2028 | 2063 |
| 2029 | 2064 |
| 2030 var h = { | 2065 var h = { |
| 2031 "content-type" : "application/json; charset=utf-8", | 2066 "content-type" : "application/json; charset=utf-8", |
| 2032 }; | 2067 }; |
| 2033 var resp = convert.JSON.encode(buildApkListing()); | 2068 var resp = convert.JSON.encode(buildApkListing()); |
| 2034 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2069 return new async.Future.value(stringResponse(200, h, resp)); |
| 2035 }), true); | 2070 }), true); |
| 2036 res.patch(arg_request, arg_packageName, arg_editId, arg_apkVersionCode, ar
g_language).then(unittest.expectAsync(((api.ApkListing response) { | 2071 res.patch(arg_request, arg_packageName, arg_editId, arg_apkVersionCode, ar
g_language).then(unittest.expectAsync(((api.ApkListing response) { |
| 2037 checkApkListing(response); | 2072 checkApkListing(response); |
| 2038 }))); | 2073 }))); |
| 2039 }); | 2074 }); |
| 2040 | 2075 |
| 2041 unittest.test("method--update", () { | 2076 unittest.test("method--update", () { |
| 2042 | 2077 |
| 2043 var mock = new common_test.HttpServerMock(); | 2078 var mock = new HttpServerMock(); |
| 2044 api.EditsApklistingsResourceApi res = new api.AndroidpublisherApi(mock).ed
its.apklistings; | 2079 api.EditsApklistingsResourceApi res = new api.AndroidpublisherApi(mock).ed
its.apklistings; |
| 2045 var arg_request = buildApkListing(); | 2080 var arg_request = buildApkListing(); |
| 2046 var arg_packageName = "foo"; | 2081 var arg_packageName = "foo"; |
| 2047 var arg_editId = "foo"; | 2082 var arg_editId = "foo"; |
| 2048 var arg_apkVersionCode = 42; | 2083 var arg_apkVersionCode = 42; |
| 2049 var arg_language = "foo"; | 2084 var arg_language = "foo"; |
| 2050 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2085 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 2051 var obj = new api.ApkListing.fromJson(json); | 2086 var obj = new api.ApkListing.fromJson(json); |
| 2052 checkApkListing(obj); | 2087 checkApkListing(obj); |
| 2053 | 2088 |
| (...skipping 19 matching lines...) Expand all Loading... |
| 2073 var keyvalue = part.split("="); | 2108 var keyvalue = part.split("="); |
| 2074 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2109 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 2075 } | 2110 } |
| 2076 } | 2111 } |
| 2077 | 2112 |
| 2078 | 2113 |
| 2079 var h = { | 2114 var h = { |
| 2080 "content-type" : "application/json; charset=utf-8", | 2115 "content-type" : "application/json; charset=utf-8", |
| 2081 }; | 2116 }; |
| 2082 var resp = convert.JSON.encode(buildApkListing()); | 2117 var resp = convert.JSON.encode(buildApkListing()); |
| 2083 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2118 return new async.Future.value(stringResponse(200, h, resp)); |
| 2084 }), true); | 2119 }), true); |
| 2085 res.update(arg_request, arg_packageName, arg_editId, arg_apkVersionCode, a
rg_language).then(unittest.expectAsync(((api.ApkListing response) { | 2120 res.update(arg_request, arg_packageName, arg_editId, arg_apkVersionCode, a
rg_language).then(unittest.expectAsync(((api.ApkListing response) { |
| 2086 checkApkListing(response); | 2121 checkApkListing(response); |
| 2087 }))); | 2122 }))); |
| 2088 }); | 2123 }); |
| 2089 | 2124 |
| 2090 }); | 2125 }); |
| 2091 | 2126 |
| 2092 | 2127 |
| 2093 unittest.group("resource-EditsApksResourceApi", () { | 2128 unittest.group("resource-EditsApksResourceApi", () { |
| 2094 unittest.test("method--addexternallyhosted", () { | 2129 unittest.test("method--addexternallyhosted", () { |
| 2095 | 2130 |
| 2096 var mock = new common_test.HttpServerMock(); | 2131 var mock = new HttpServerMock(); |
| 2097 api.EditsApksResourceApi res = new api.AndroidpublisherApi(mock).edits.apk
s; | 2132 api.EditsApksResourceApi res = new api.AndroidpublisherApi(mock).edits.apk
s; |
| 2098 var arg_request = buildApksAddExternallyHostedRequest(); | 2133 var arg_request = buildApksAddExternallyHostedRequest(); |
| 2099 var arg_packageName = "foo"; | 2134 var arg_packageName = "foo"; |
| 2100 var arg_editId = "foo"; | 2135 var arg_editId = "foo"; |
| 2101 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2136 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 2102 var obj = new api.ApksAddExternallyHostedRequest.fromJson(json); | 2137 var obj = new api.ApksAddExternallyHostedRequest.fromJson(json); |
| 2103 checkApksAddExternallyHostedRequest(obj); | 2138 checkApksAddExternallyHostedRequest(obj); |
| 2104 | 2139 |
| 2105 var path = (req.url).path; | 2140 var path = (req.url).path; |
| 2106 var pathOffset = 0; | 2141 var pathOffset = 0; |
| (...skipping 17 matching lines...) Expand all Loading... |
| 2124 var keyvalue = part.split("="); | 2159 var keyvalue = part.split("="); |
| 2125 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2160 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 2126 } | 2161 } |
| 2127 } | 2162 } |
| 2128 | 2163 |
| 2129 | 2164 |
| 2130 var h = { | 2165 var h = { |
| 2131 "content-type" : "application/json; charset=utf-8", | 2166 "content-type" : "application/json; charset=utf-8", |
| 2132 }; | 2167 }; |
| 2133 var resp = convert.JSON.encode(buildApksAddExternallyHostedResponse()); | 2168 var resp = convert.JSON.encode(buildApksAddExternallyHostedResponse()); |
| 2134 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2169 return new async.Future.value(stringResponse(200, h, resp)); |
| 2135 }), true); | 2170 }), true); |
| 2136 res.addexternallyhosted(arg_request, arg_packageName, arg_editId).then(uni
ttest.expectAsync(((api.ApksAddExternallyHostedResponse response) { | 2171 res.addexternallyhosted(arg_request, arg_packageName, arg_editId).then(uni
ttest.expectAsync(((api.ApksAddExternallyHostedResponse response) { |
| 2137 checkApksAddExternallyHostedResponse(response); | 2172 checkApksAddExternallyHostedResponse(response); |
| 2138 }))); | 2173 }))); |
| 2139 }); | 2174 }); |
| 2140 | 2175 |
| 2141 unittest.test("method--list", () { | 2176 unittest.test("method--list", () { |
| 2142 | 2177 |
| 2143 var mock = new common_test.HttpServerMock(); | 2178 var mock = new HttpServerMock(); |
| 2144 api.EditsApksResourceApi res = new api.AndroidpublisherApi(mock).edits.apk
s; | 2179 api.EditsApksResourceApi res = new api.AndroidpublisherApi(mock).edits.apk
s; |
| 2145 var arg_packageName = "foo"; | 2180 var arg_packageName = "foo"; |
| 2146 var arg_editId = "foo"; | 2181 var arg_editId = "foo"; |
| 2147 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2182 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 2148 var path = (req.url).path; | 2183 var path = (req.url).path; |
| 2149 var pathOffset = 0; | 2184 var pathOffset = 0; |
| 2150 var index; | 2185 var index; |
| 2151 var subPart; | 2186 var subPart; |
| 2152 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2187 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2153 pathOffset += 1; | 2188 pathOffset += 1; |
| (...skipping 13 matching lines...) Expand all Loading... |
| 2167 var keyvalue = part.split("="); | 2202 var keyvalue = part.split("="); |
| 2168 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2203 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 2169 } | 2204 } |
| 2170 } | 2205 } |
| 2171 | 2206 |
| 2172 | 2207 |
| 2173 var h = { | 2208 var h = { |
| 2174 "content-type" : "application/json; charset=utf-8", | 2209 "content-type" : "application/json; charset=utf-8", |
| 2175 }; | 2210 }; |
| 2176 var resp = convert.JSON.encode(buildApksListResponse()); | 2211 var resp = convert.JSON.encode(buildApksListResponse()); |
| 2177 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2212 return new async.Future.value(stringResponse(200, h, resp)); |
| 2178 }), true); | 2213 }), true); |
| 2179 res.list(arg_packageName, arg_editId).then(unittest.expectAsync(((api.Apks
ListResponse response) { | 2214 res.list(arg_packageName, arg_editId).then(unittest.expectAsync(((api.Apks
ListResponse response) { |
| 2180 checkApksListResponse(response); | 2215 checkApksListResponse(response); |
| 2181 }))); | 2216 }))); |
| 2182 }); | 2217 }); |
| 2183 | 2218 |
| 2184 unittest.test("method--upload", () { | 2219 unittest.test("method--upload", () { |
| 2185 // TODO: Implement tests for media upload; | 2220 // TODO: Implement tests for media upload; |
| 2186 // TODO: Implement tests for media download; | 2221 // TODO: Implement tests for media download; |
| 2187 | 2222 |
| 2188 var mock = new common_test.HttpServerMock(); | 2223 var mock = new HttpServerMock(); |
| 2189 api.EditsApksResourceApi res = new api.AndroidpublisherApi(mock).edits.apk
s; | 2224 api.EditsApksResourceApi res = new api.AndroidpublisherApi(mock).edits.apk
s; |
| 2190 var arg_packageName = "foo"; | 2225 var arg_packageName = "foo"; |
| 2191 var arg_editId = "foo"; | 2226 var arg_editId = "foo"; |
| 2192 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2227 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 2193 var path = (req.url).path; | 2228 var path = (req.url).path; |
| 2194 var pathOffset = 0; | 2229 var pathOffset = 0; |
| 2195 var index; | 2230 var index; |
| 2196 var subPart; | 2231 var subPart; |
| 2197 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2232 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2198 pathOffset += 1; | 2233 pathOffset += 1; |
| (...skipping 13 matching lines...) Expand all Loading... |
| 2212 var keyvalue = part.split("="); | 2247 var keyvalue = part.split("="); |
| 2213 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2248 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 2214 } | 2249 } |
| 2215 } | 2250 } |
| 2216 | 2251 |
| 2217 | 2252 |
| 2218 var h = { | 2253 var h = { |
| 2219 "content-type" : "application/json; charset=utf-8", | 2254 "content-type" : "application/json; charset=utf-8", |
| 2220 }; | 2255 }; |
| 2221 var resp = convert.JSON.encode(buildApk()); | 2256 var resp = convert.JSON.encode(buildApk()); |
| 2222 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2257 return new async.Future.value(stringResponse(200, h, resp)); |
| 2223 }), true); | 2258 }), true); |
| 2224 res.upload(arg_packageName, arg_editId).then(unittest.expectAsync(((api.Ap
k response) { | 2259 res.upload(arg_packageName, arg_editId).then(unittest.expectAsync(((api.Ap
k response) { |
| 2225 checkApk(response); | 2260 checkApk(response); |
| 2226 }))); | 2261 }))); |
| 2227 }); | 2262 }); |
| 2228 | 2263 |
| 2229 }); | 2264 }); |
| 2230 | 2265 |
| 2231 | 2266 |
| 2232 unittest.group("resource-EditsDetailsResourceApi", () { | 2267 unittest.group("resource-EditsDetailsResourceApi", () { |
| 2233 unittest.test("method--get", () { | 2268 unittest.test("method--get", () { |
| 2234 | 2269 |
| 2235 var mock = new common_test.HttpServerMock(); | 2270 var mock = new HttpServerMock(); |
| 2236 api.EditsDetailsResourceApi res = new api.AndroidpublisherApi(mock).edits.
details; | 2271 api.EditsDetailsResourceApi res = new api.AndroidpublisherApi(mock).edits.
details; |
| 2237 var arg_packageName = "foo"; | 2272 var arg_packageName = "foo"; |
| 2238 var arg_editId = "foo"; | 2273 var arg_editId = "foo"; |
| 2239 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2274 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 2240 var path = (req.url).path; | 2275 var path = (req.url).path; |
| 2241 var pathOffset = 0; | 2276 var pathOffset = 0; |
| 2242 var index; | 2277 var index; |
| 2243 var subPart; | 2278 var subPart; |
| 2244 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2279 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2245 pathOffset += 1; | 2280 pathOffset += 1; |
| (...skipping 13 matching lines...) Expand all Loading... |
| 2259 var keyvalue = part.split("="); | 2294 var keyvalue = part.split("="); |
| 2260 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2295 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 2261 } | 2296 } |
| 2262 } | 2297 } |
| 2263 | 2298 |
| 2264 | 2299 |
| 2265 var h = { | 2300 var h = { |
| 2266 "content-type" : "application/json; charset=utf-8", | 2301 "content-type" : "application/json; charset=utf-8", |
| 2267 }; | 2302 }; |
| 2268 var resp = convert.JSON.encode(buildAppDetails()); | 2303 var resp = convert.JSON.encode(buildAppDetails()); |
| 2269 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2304 return new async.Future.value(stringResponse(200, h, resp)); |
| 2270 }), true); | 2305 }), true); |
| 2271 res.get(arg_packageName, arg_editId).then(unittest.expectAsync(((api.AppDe
tails response) { | 2306 res.get(arg_packageName, arg_editId).then(unittest.expectAsync(((api.AppDe
tails response) { |
| 2272 checkAppDetails(response); | 2307 checkAppDetails(response); |
| 2273 }))); | 2308 }))); |
| 2274 }); | 2309 }); |
| 2275 | 2310 |
| 2276 unittest.test("method--patch", () { | 2311 unittest.test("method--patch", () { |
| 2277 | 2312 |
| 2278 var mock = new common_test.HttpServerMock(); | 2313 var mock = new HttpServerMock(); |
| 2279 api.EditsDetailsResourceApi res = new api.AndroidpublisherApi(mock).edits.
details; | 2314 api.EditsDetailsResourceApi res = new api.AndroidpublisherApi(mock).edits.
details; |
| 2280 var arg_request = buildAppDetails(); | 2315 var arg_request = buildAppDetails(); |
| 2281 var arg_packageName = "foo"; | 2316 var arg_packageName = "foo"; |
| 2282 var arg_editId = "foo"; | 2317 var arg_editId = "foo"; |
| 2283 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2318 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 2284 var obj = new api.AppDetails.fromJson(json); | 2319 var obj = new api.AppDetails.fromJson(json); |
| 2285 checkAppDetails(obj); | 2320 checkAppDetails(obj); |
| 2286 | 2321 |
| 2287 var path = (req.url).path; | 2322 var path = (req.url).path; |
| 2288 var pathOffset = 0; | 2323 var pathOffset = 0; |
| (...skipping 17 matching lines...) Expand all Loading... |
| 2306 var keyvalue = part.split("="); | 2341 var keyvalue = part.split("="); |
| 2307 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2342 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 2308 } | 2343 } |
| 2309 } | 2344 } |
| 2310 | 2345 |
| 2311 | 2346 |
| 2312 var h = { | 2347 var h = { |
| 2313 "content-type" : "application/json; charset=utf-8", | 2348 "content-type" : "application/json; charset=utf-8", |
| 2314 }; | 2349 }; |
| 2315 var resp = convert.JSON.encode(buildAppDetails()); | 2350 var resp = convert.JSON.encode(buildAppDetails()); |
| 2316 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2351 return new async.Future.value(stringResponse(200, h, resp)); |
| 2317 }), true); | 2352 }), true); |
| 2318 res.patch(arg_request, arg_packageName, arg_editId).then(unittest.expectAs
ync(((api.AppDetails response) { | 2353 res.patch(arg_request, arg_packageName, arg_editId).then(unittest.expectAs
ync(((api.AppDetails response) { |
| 2319 checkAppDetails(response); | 2354 checkAppDetails(response); |
| 2320 }))); | 2355 }))); |
| 2321 }); | 2356 }); |
| 2322 | 2357 |
| 2323 unittest.test("method--update", () { | 2358 unittest.test("method--update", () { |
| 2324 | 2359 |
| 2325 var mock = new common_test.HttpServerMock(); | 2360 var mock = new HttpServerMock(); |
| 2326 api.EditsDetailsResourceApi res = new api.AndroidpublisherApi(mock).edits.
details; | 2361 api.EditsDetailsResourceApi res = new api.AndroidpublisherApi(mock).edits.
details; |
| 2327 var arg_request = buildAppDetails(); | 2362 var arg_request = buildAppDetails(); |
| 2328 var arg_packageName = "foo"; | 2363 var arg_packageName = "foo"; |
| 2329 var arg_editId = "foo"; | 2364 var arg_editId = "foo"; |
| 2330 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2365 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 2331 var obj = new api.AppDetails.fromJson(json); | 2366 var obj = new api.AppDetails.fromJson(json); |
| 2332 checkAppDetails(obj); | 2367 checkAppDetails(obj); |
| 2333 | 2368 |
| 2334 var path = (req.url).path; | 2369 var path = (req.url).path; |
| 2335 var pathOffset = 0; | 2370 var pathOffset = 0; |
| (...skipping 17 matching lines...) Expand all Loading... |
| 2353 var keyvalue = part.split("="); | 2388 var keyvalue = part.split("="); |
| 2354 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2389 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 2355 } | 2390 } |
| 2356 } | 2391 } |
| 2357 | 2392 |
| 2358 | 2393 |
| 2359 var h = { | 2394 var h = { |
| 2360 "content-type" : "application/json; charset=utf-8", | 2395 "content-type" : "application/json; charset=utf-8", |
| 2361 }; | 2396 }; |
| 2362 var resp = convert.JSON.encode(buildAppDetails()); | 2397 var resp = convert.JSON.encode(buildAppDetails()); |
| 2363 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2398 return new async.Future.value(stringResponse(200, h, resp)); |
| 2364 }), true); | 2399 }), true); |
| 2365 res.update(arg_request, arg_packageName, arg_editId).then(unittest.expectA
sync(((api.AppDetails response) { | 2400 res.update(arg_request, arg_packageName, arg_editId).then(unittest.expectA
sync(((api.AppDetails response) { |
| 2366 checkAppDetails(response); | 2401 checkAppDetails(response); |
| 2367 }))); | 2402 }))); |
| 2368 }); | 2403 }); |
| 2369 | 2404 |
| 2370 }); | 2405 }); |
| 2371 | 2406 |
| 2372 | 2407 |
| 2373 unittest.group("resource-EditsExpansionfilesResourceApi", () { | 2408 unittest.group("resource-EditsExpansionfilesResourceApi", () { |
| 2374 unittest.test("method--get", () { | 2409 unittest.test("method--get", () { |
| 2375 | 2410 |
| 2376 var mock = new common_test.HttpServerMock(); | 2411 var mock = new HttpServerMock(); |
| 2377 api.EditsExpansionfilesResourceApi res = new api.AndroidpublisherApi(mock)
.edits.expansionfiles; | 2412 api.EditsExpansionfilesResourceApi res = new api.AndroidpublisherApi(mock)
.edits.expansionfiles; |
| 2378 var arg_packageName = "foo"; | 2413 var arg_packageName = "foo"; |
| 2379 var arg_editId = "foo"; | 2414 var arg_editId = "foo"; |
| 2380 var arg_apkVersionCode = 42; | 2415 var arg_apkVersionCode = 42; |
| 2381 var arg_expansionFileType = "foo"; | 2416 var arg_expansionFileType = "foo"; |
| 2382 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2417 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 2383 var path = (req.url).path; | 2418 var path = (req.url).path; |
| 2384 var pathOffset = 0; | 2419 var pathOffset = 0; |
| 2385 var index; | 2420 var index; |
| 2386 var subPart; | 2421 var subPart; |
| (...skipping 15 matching lines...) Expand all Loading... |
| 2402 var keyvalue = part.split("="); | 2437 var keyvalue = part.split("="); |
| 2403 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2438 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 2404 } | 2439 } |
| 2405 } | 2440 } |
| 2406 | 2441 |
| 2407 | 2442 |
| 2408 var h = { | 2443 var h = { |
| 2409 "content-type" : "application/json; charset=utf-8", | 2444 "content-type" : "application/json; charset=utf-8", |
| 2410 }; | 2445 }; |
| 2411 var resp = convert.JSON.encode(buildExpansionFile()); | 2446 var resp = convert.JSON.encode(buildExpansionFile()); |
| 2412 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2447 return new async.Future.value(stringResponse(200, h, resp)); |
| 2413 }), true); | 2448 }), true); |
| 2414 res.get(arg_packageName, arg_editId, arg_apkVersionCode, arg_expansionFile
Type).then(unittest.expectAsync(((api.ExpansionFile response) { | 2449 res.get(arg_packageName, arg_editId, arg_apkVersionCode, arg_expansionFile
Type).then(unittest.expectAsync(((api.ExpansionFile response) { |
| 2415 checkExpansionFile(response); | 2450 checkExpansionFile(response); |
| 2416 }))); | 2451 }))); |
| 2417 }); | 2452 }); |
| 2418 | 2453 |
| 2419 unittest.test("method--patch", () { | 2454 unittest.test("method--patch", () { |
| 2420 | 2455 |
| 2421 var mock = new common_test.HttpServerMock(); | 2456 var mock = new HttpServerMock(); |
| 2422 api.EditsExpansionfilesResourceApi res = new api.AndroidpublisherApi(mock)
.edits.expansionfiles; | 2457 api.EditsExpansionfilesResourceApi res = new api.AndroidpublisherApi(mock)
.edits.expansionfiles; |
| 2423 var arg_request = buildExpansionFile(); | 2458 var arg_request = buildExpansionFile(); |
| 2424 var arg_packageName = "foo"; | 2459 var arg_packageName = "foo"; |
| 2425 var arg_editId = "foo"; | 2460 var arg_editId = "foo"; |
| 2426 var arg_apkVersionCode = 42; | 2461 var arg_apkVersionCode = 42; |
| 2427 var arg_expansionFileType = "foo"; | 2462 var arg_expansionFileType = "foo"; |
| 2428 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2463 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 2429 var obj = new api.ExpansionFile.fromJson(json); | 2464 var obj = new api.ExpansionFile.fromJson(json); |
| 2430 checkExpansionFile(obj); | 2465 checkExpansionFile(obj); |
| 2431 | 2466 |
| (...skipping 19 matching lines...) Expand all Loading... |
| 2451 var keyvalue = part.split("="); | 2486 var keyvalue = part.split("="); |
| 2452 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2487 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 2453 } | 2488 } |
| 2454 } | 2489 } |
| 2455 | 2490 |
| 2456 | 2491 |
| 2457 var h = { | 2492 var h = { |
| 2458 "content-type" : "application/json; charset=utf-8", | 2493 "content-type" : "application/json; charset=utf-8", |
| 2459 }; | 2494 }; |
| 2460 var resp = convert.JSON.encode(buildExpansionFile()); | 2495 var resp = convert.JSON.encode(buildExpansionFile()); |
| 2461 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2496 return new async.Future.value(stringResponse(200, h, resp)); |
| 2462 }), true); | 2497 }), true); |
| 2463 res.patch(arg_request, arg_packageName, arg_editId, arg_apkVersionCode, ar
g_expansionFileType).then(unittest.expectAsync(((api.ExpansionFile response) { | 2498 res.patch(arg_request, arg_packageName, arg_editId, arg_apkVersionCode, ar
g_expansionFileType).then(unittest.expectAsync(((api.ExpansionFile response) { |
| 2464 checkExpansionFile(response); | 2499 checkExpansionFile(response); |
| 2465 }))); | 2500 }))); |
| 2466 }); | 2501 }); |
| 2467 | 2502 |
| 2468 unittest.test("method--update", () { | 2503 unittest.test("method--update", () { |
| 2469 | 2504 |
| 2470 var mock = new common_test.HttpServerMock(); | 2505 var mock = new HttpServerMock(); |
| 2471 api.EditsExpansionfilesResourceApi res = new api.AndroidpublisherApi(mock)
.edits.expansionfiles; | 2506 api.EditsExpansionfilesResourceApi res = new api.AndroidpublisherApi(mock)
.edits.expansionfiles; |
| 2472 var arg_request = buildExpansionFile(); | 2507 var arg_request = buildExpansionFile(); |
| 2473 var arg_packageName = "foo"; | 2508 var arg_packageName = "foo"; |
| 2474 var arg_editId = "foo"; | 2509 var arg_editId = "foo"; |
| 2475 var arg_apkVersionCode = 42; | 2510 var arg_apkVersionCode = 42; |
| 2476 var arg_expansionFileType = "foo"; | 2511 var arg_expansionFileType = "foo"; |
| 2477 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2512 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 2478 var obj = new api.ExpansionFile.fromJson(json); | 2513 var obj = new api.ExpansionFile.fromJson(json); |
| 2479 checkExpansionFile(obj); | 2514 checkExpansionFile(obj); |
| 2480 | 2515 |
| (...skipping 19 matching lines...) Expand all Loading... |
| 2500 var keyvalue = part.split("="); | 2535 var keyvalue = part.split("="); |
| 2501 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2536 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 2502 } | 2537 } |
| 2503 } | 2538 } |
| 2504 | 2539 |
| 2505 | 2540 |
| 2506 var h = { | 2541 var h = { |
| 2507 "content-type" : "application/json; charset=utf-8", | 2542 "content-type" : "application/json; charset=utf-8", |
| 2508 }; | 2543 }; |
| 2509 var resp = convert.JSON.encode(buildExpansionFile()); | 2544 var resp = convert.JSON.encode(buildExpansionFile()); |
| 2510 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2545 return new async.Future.value(stringResponse(200, h, resp)); |
| 2511 }), true); | 2546 }), true); |
| 2512 res.update(arg_request, arg_packageName, arg_editId, arg_apkVersionCode, a
rg_expansionFileType).then(unittest.expectAsync(((api.ExpansionFile response) { | 2547 res.update(arg_request, arg_packageName, arg_editId, arg_apkVersionCode, a
rg_expansionFileType).then(unittest.expectAsync(((api.ExpansionFile response) { |
| 2513 checkExpansionFile(response); | 2548 checkExpansionFile(response); |
| 2514 }))); | 2549 }))); |
| 2515 }); | 2550 }); |
| 2516 | 2551 |
| 2517 unittest.test("method--upload", () { | 2552 unittest.test("method--upload", () { |
| 2518 // TODO: Implement tests for media upload; | 2553 // TODO: Implement tests for media upload; |
| 2519 // TODO: Implement tests for media download; | 2554 // TODO: Implement tests for media download; |
| 2520 | 2555 |
| 2521 var mock = new common_test.HttpServerMock(); | 2556 var mock = new HttpServerMock(); |
| 2522 api.EditsExpansionfilesResourceApi res = new api.AndroidpublisherApi(mock)
.edits.expansionfiles; | 2557 api.EditsExpansionfilesResourceApi res = new api.AndroidpublisherApi(mock)
.edits.expansionfiles; |
| 2523 var arg_packageName = "foo"; | 2558 var arg_packageName = "foo"; |
| 2524 var arg_editId = "foo"; | 2559 var arg_editId = "foo"; |
| 2525 var arg_apkVersionCode = 42; | 2560 var arg_apkVersionCode = 42; |
| 2526 var arg_expansionFileType = "foo"; | 2561 var arg_expansionFileType = "foo"; |
| 2527 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2562 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 2528 var path = (req.url).path; | 2563 var path = (req.url).path; |
| 2529 var pathOffset = 0; | 2564 var pathOffset = 0; |
| 2530 var index; | 2565 var index; |
| 2531 var subPart; | 2566 var subPart; |
| (...skipping 15 matching lines...) Expand all Loading... |
| 2547 var keyvalue = part.split("="); | 2582 var keyvalue = part.split("="); |
| 2548 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2583 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 2549 } | 2584 } |
| 2550 } | 2585 } |
| 2551 | 2586 |
| 2552 | 2587 |
| 2553 var h = { | 2588 var h = { |
| 2554 "content-type" : "application/json; charset=utf-8", | 2589 "content-type" : "application/json; charset=utf-8", |
| 2555 }; | 2590 }; |
| 2556 var resp = convert.JSON.encode(buildExpansionFilesUploadResponse()); | 2591 var resp = convert.JSON.encode(buildExpansionFilesUploadResponse()); |
| 2557 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2592 return new async.Future.value(stringResponse(200, h, resp)); |
| 2558 }), true); | 2593 }), true); |
| 2559 res.upload(arg_packageName, arg_editId, arg_apkVersionCode, arg_expansionF
ileType).then(unittest.expectAsync(((api.ExpansionFilesUploadResponse response)
{ | 2594 res.upload(arg_packageName, arg_editId, arg_apkVersionCode, arg_expansionF
ileType).then(unittest.expectAsync(((api.ExpansionFilesUploadResponse response)
{ |
| 2560 checkExpansionFilesUploadResponse(response); | 2595 checkExpansionFilesUploadResponse(response); |
| 2561 }))); | 2596 }))); |
| 2562 }); | 2597 }); |
| 2563 | 2598 |
| 2564 }); | 2599 }); |
| 2565 | 2600 |
| 2566 | 2601 |
| 2567 unittest.group("resource-EditsImagesResourceApi", () { | 2602 unittest.group("resource-EditsImagesResourceApi", () { |
| 2568 unittest.test("method--delete", () { | 2603 unittest.test("method--delete", () { |
| 2569 | 2604 |
| 2570 var mock = new common_test.HttpServerMock(); | 2605 var mock = new HttpServerMock(); |
| 2571 api.EditsImagesResourceApi res = new api.AndroidpublisherApi(mock).edits.i
mages; | 2606 api.EditsImagesResourceApi res = new api.AndroidpublisherApi(mock).edits.i
mages; |
| 2572 var arg_packageName = "foo"; | 2607 var arg_packageName = "foo"; |
| 2573 var arg_editId = "foo"; | 2608 var arg_editId = "foo"; |
| 2574 var arg_language = "foo"; | 2609 var arg_language = "foo"; |
| 2575 var arg_imageType = "foo"; | 2610 var arg_imageType = "foo"; |
| 2576 var arg_imageId = "foo"; | 2611 var arg_imageId = "foo"; |
| 2577 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2612 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 2578 var path = (req.url).path; | 2613 var path = (req.url).path; |
| 2579 var pathOffset = 0; | 2614 var pathOffset = 0; |
| 2580 var index; | 2615 var index; |
| (...skipping 16 matching lines...) Expand all Loading... |
| 2597 var keyvalue = part.split("="); | 2632 var keyvalue = part.split("="); |
| 2598 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2633 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 2599 } | 2634 } |
| 2600 } | 2635 } |
| 2601 | 2636 |
| 2602 | 2637 |
| 2603 var h = { | 2638 var h = { |
| 2604 "content-type" : "application/json; charset=utf-8", | 2639 "content-type" : "application/json; charset=utf-8", |
| 2605 }; | 2640 }; |
| 2606 var resp = ""; | 2641 var resp = ""; |
| 2607 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2642 return new async.Future.value(stringResponse(200, h, resp)); |
| 2608 }), true); | 2643 }), true); |
| 2609 res.delete(arg_packageName, arg_editId, arg_language, arg_imageType, arg_i
mageId).then(unittest.expectAsync((_) {})); | 2644 res.delete(arg_packageName, arg_editId, arg_language, arg_imageType, arg_i
mageId).then(unittest.expectAsync((_) {})); |
| 2610 }); | 2645 }); |
| 2611 | 2646 |
| 2612 unittest.test("method--deleteall", () { | 2647 unittest.test("method--deleteall", () { |
| 2613 | 2648 |
| 2614 var mock = new common_test.HttpServerMock(); | 2649 var mock = new HttpServerMock(); |
| 2615 api.EditsImagesResourceApi res = new api.AndroidpublisherApi(mock).edits.i
mages; | 2650 api.EditsImagesResourceApi res = new api.AndroidpublisherApi(mock).edits.i
mages; |
| 2616 var arg_packageName = "foo"; | 2651 var arg_packageName = "foo"; |
| 2617 var arg_editId = "foo"; | 2652 var arg_editId = "foo"; |
| 2618 var arg_language = "foo"; | 2653 var arg_language = "foo"; |
| 2619 var arg_imageType = "foo"; | 2654 var arg_imageType = "foo"; |
| 2620 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2655 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 2621 var path = (req.url).path; | 2656 var path = (req.url).path; |
| 2622 var pathOffset = 0; | 2657 var pathOffset = 0; |
| 2623 var index; | 2658 var index; |
| 2624 var subPart; | 2659 var subPart; |
| (...skipping 15 matching lines...) Expand all Loading... |
| 2640 var keyvalue = part.split("="); | 2675 var keyvalue = part.split("="); |
| 2641 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2676 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 2642 } | 2677 } |
| 2643 } | 2678 } |
| 2644 | 2679 |
| 2645 | 2680 |
| 2646 var h = { | 2681 var h = { |
| 2647 "content-type" : "application/json; charset=utf-8", | 2682 "content-type" : "application/json; charset=utf-8", |
| 2648 }; | 2683 }; |
| 2649 var resp = convert.JSON.encode(buildImagesDeleteAllResponse()); | 2684 var resp = convert.JSON.encode(buildImagesDeleteAllResponse()); |
| 2650 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2685 return new async.Future.value(stringResponse(200, h, resp)); |
| 2651 }), true); | 2686 }), true); |
| 2652 res.deleteall(arg_packageName, arg_editId, arg_language, arg_imageType).th
en(unittest.expectAsync(((api.ImagesDeleteAllResponse response) { | 2687 res.deleteall(arg_packageName, arg_editId, arg_language, arg_imageType).th
en(unittest.expectAsync(((api.ImagesDeleteAllResponse response) { |
| 2653 checkImagesDeleteAllResponse(response); | 2688 checkImagesDeleteAllResponse(response); |
| 2654 }))); | 2689 }))); |
| 2655 }); | 2690 }); |
| 2656 | 2691 |
| 2657 unittest.test("method--list", () { | 2692 unittest.test("method--list", () { |
| 2658 | 2693 |
| 2659 var mock = new common_test.HttpServerMock(); | 2694 var mock = new HttpServerMock(); |
| 2660 api.EditsImagesResourceApi res = new api.AndroidpublisherApi(mock).edits.i
mages; | 2695 api.EditsImagesResourceApi res = new api.AndroidpublisherApi(mock).edits.i
mages; |
| 2661 var arg_packageName = "foo"; | 2696 var arg_packageName = "foo"; |
| 2662 var arg_editId = "foo"; | 2697 var arg_editId = "foo"; |
| 2663 var arg_language = "foo"; | 2698 var arg_language = "foo"; |
| 2664 var arg_imageType = "foo"; | 2699 var arg_imageType = "foo"; |
| 2665 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2700 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 2666 var path = (req.url).path; | 2701 var path = (req.url).path; |
| 2667 var pathOffset = 0; | 2702 var pathOffset = 0; |
| 2668 var index; | 2703 var index; |
| 2669 var subPart; | 2704 var subPart; |
| (...skipping 15 matching lines...) Expand all Loading... |
| 2685 var keyvalue = part.split("="); | 2720 var keyvalue = part.split("="); |
| 2686 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2721 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 2687 } | 2722 } |
| 2688 } | 2723 } |
| 2689 | 2724 |
| 2690 | 2725 |
| 2691 var h = { | 2726 var h = { |
| 2692 "content-type" : "application/json; charset=utf-8", | 2727 "content-type" : "application/json; charset=utf-8", |
| 2693 }; | 2728 }; |
| 2694 var resp = convert.JSON.encode(buildImagesListResponse()); | 2729 var resp = convert.JSON.encode(buildImagesListResponse()); |
| 2695 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2730 return new async.Future.value(stringResponse(200, h, resp)); |
| 2696 }), true); | 2731 }), true); |
| 2697 res.list(arg_packageName, arg_editId, arg_language, arg_imageType).then(un
ittest.expectAsync(((api.ImagesListResponse response) { | 2732 res.list(arg_packageName, arg_editId, arg_language, arg_imageType).then(un
ittest.expectAsync(((api.ImagesListResponse response) { |
| 2698 checkImagesListResponse(response); | 2733 checkImagesListResponse(response); |
| 2699 }))); | 2734 }))); |
| 2700 }); | 2735 }); |
| 2701 | 2736 |
| 2702 unittest.test("method--upload", () { | 2737 unittest.test("method--upload", () { |
| 2703 // TODO: Implement tests for media upload; | 2738 // TODO: Implement tests for media upload; |
| 2704 // TODO: Implement tests for media download; | 2739 // TODO: Implement tests for media download; |
| 2705 | 2740 |
| 2706 var mock = new common_test.HttpServerMock(); | 2741 var mock = new HttpServerMock(); |
| 2707 api.EditsImagesResourceApi res = new api.AndroidpublisherApi(mock).edits.i
mages; | 2742 api.EditsImagesResourceApi res = new api.AndroidpublisherApi(mock).edits.i
mages; |
| 2708 var arg_packageName = "foo"; | 2743 var arg_packageName = "foo"; |
| 2709 var arg_editId = "foo"; | 2744 var arg_editId = "foo"; |
| 2710 var arg_language = "foo"; | 2745 var arg_language = "foo"; |
| 2711 var arg_imageType = "foo"; | 2746 var arg_imageType = "foo"; |
| 2712 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2747 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 2713 var path = (req.url).path; | 2748 var path = (req.url).path; |
| 2714 var pathOffset = 0; | 2749 var pathOffset = 0; |
| 2715 var index; | 2750 var index; |
| 2716 var subPart; | 2751 var subPart; |
| (...skipping 15 matching lines...) Expand all Loading... |
| 2732 var keyvalue = part.split("="); | 2767 var keyvalue = part.split("="); |
| 2733 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2768 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 2734 } | 2769 } |
| 2735 } | 2770 } |
| 2736 | 2771 |
| 2737 | 2772 |
| 2738 var h = { | 2773 var h = { |
| 2739 "content-type" : "application/json; charset=utf-8", | 2774 "content-type" : "application/json; charset=utf-8", |
| 2740 }; | 2775 }; |
| 2741 var resp = convert.JSON.encode(buildImagesUploadResponse()); | 2776 var resp = convert.JSON.encode(buildImagesUploadResponse()); |
| 2742 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2777 return new async.Future.value(stringResponse(200, h, resp)); |
| 2743 }), true); | 2778 }), true); |
| 2744 res.upload(arg_packageName, arg_editId, arg_language, arg_imageType).then(
unittest.expectAsync(((api.ImagesUploadResponse response) { | 2779 res.upload(arg_packageName, arg_editId, arg_language, arg_imageType).then(
unittest.expectAsync(((api.ImagesUploadResponse response) { |
| 2745 checkImagesUploadResponse(response); | 2780 checkImagesUploadResponse(response); |
| 2746 }))); | 2781 }))); |
| 2747 }); | 2782 }); |
| 2748 | 2783 |
| 2749 }); | 2784 }); |
| 2750 | 2785 |
| 2751 | 2786 |
| 2752 unittest.group("resource-EditsListingsResourceApi", () { | 2787 unittest.group("resource-EditsListingsResourceApi", () { |
| 2753 unittest.test("method--delete", () { | 2788 unittest.test("method--delete", () { |
| 2754 | 2789 |
| 2755 var mock = new common_test.HttpServerMock(); | 2790 var mock = new HttpServerMock(); |
| 2756 api.EditsListingsResourceApi res = new api.AndroidpublisherApi(mock).edits
.listings; | 2791 api.EditsListingsResourceApi res = new api.AndroidpublisherApi(mock).edits
.listings; |
| 2757 var arg_packageName = "foo"; | 2792 var arg_packageName = "foo"; |
| 2758 var arg_editId = "foo"; | 2793 var arg_editId = "foo"; |
| 2759 var arg_language = "foo"; | 2794 var arg_language = "foo"; |
| 2760 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2795 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 2761 var path = (req.url).path; | 2796 var path = (req.url).path; |
| 2762 var pathOffset = 0; | 2797 var pathOffset = 0; |
| 2763 var index; | 2798 var index; |
| 2764 var subPart; | 2799 var subPart; |
| 2765 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2800 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| (...skipping 14 matching lines...) Expand all Loading... |
| 2780 var keyvalue = part.split("="); | 2815 var keyvalue = part.split("="); |
| 2781 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2816 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 2782 } | 2817 } |
| 2783 } | 2818 } |
| 2784 | 2819 |
| 2785 | 2820 |
| 2786 var h = { | 2821 var h = { |
| 2787 "content-type" : "application/json; charset=utf-8", | 2822 "content-type" : "application/json; charset=utf-8", |
| 2788 }; | 2823 }; |
| 2789 var resp = ""; | 2824 var resp = ""; |
| 2790 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2825 return new async.Future.value(stringResponse(200, h, resp)); |
| 2791 }), true); | 2826 }), true); |
| 2792 res.delete(arg_packageName, arg_editId, arg_language).then(unittest.expect
Async((_) {})); | 2827 res.delete(arg_packageName, arg_editId, arg_language).then(unittest.expect
Async((_) {})); |
| 2793 }); | 2828 }); |
| 2794 | 2829 |
| 2795 unittest.test("method--deleteall", () { | 2830 unittest.test("method--deleteall", () { |
| 2796 | 2831 |
| 2797 var mock = new common_test.HttpServerMock(); | 2832 var mock = new HttpServerMock(); |
| 2798 api.EditsListingsResourceApi res = new api.AndroidpublisherApi(mock).edits
.listings; | 2833 api.EditsListingsResourceApi res = new api.AndroidpublisherApi(mock).edits
.listings; |
| 2799 var arg_packageName = "foo"; | 2834 var arg_packageName = "foo"; |
| 2800 var arg_editId = "foo"; | 2835 var arg_editId = "foo"; |
| 2801 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2836 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 2802 var path = (req.url).path; | 2837 var path = (req.url).path; |
| 2803 var pathOffset = 0; | 2838 var pathOffset = 0; |
| 2804 var index; | 2839 var index; |
| 2805 var subPart; | 2840 var subPart; |
| 2806 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2841 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2807 pathOffset += 1; | 2842 pathOffset += 1; |
| (...skipping 13 matching lines...) Expand all Loading... |
| 2821 var keyvalue = part.split("="); | 2856 var keyvalue = part.split("="); |
| 2822 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2857 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 2823 } | 2858 } |
| 2824 } | 2859 } |
| 2825 | 2860 |
| 2826 | 2861 |
| 2827 var h = { | 2862 var h = { |
| 2828 "content-type" : "application/json; charset=utf-8", | 2863 "content-type" : "application/json; charset=utf-8", |
| 2829 }; | 2864 }; |
| 2830 var resp = ""; | 2865 var resp = ""; |
| 2831 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2866 return new async.Future.value(stringResponse(200, h, resp)); |
| 2832 }), true); | 2867 }), true); |
| 2833 res.deleteall(arg_packageName, arg_editId).then(unittest.expectAsync((_) {
})); | 2868 res.deleteall(arg_packageName, arg_editId).then(unittest.expectAsync((_) {
})); |
| 2834 }); | 2869 }); |
| 2835 | 2870 |
| 2836 unittest.test("method--get", () { | 2871 unittest.test("method--get", () { |
| 2837 | 2872 |
| 2838 var mock = new common_test.HttpServerMock(); | 2873 var mock = new HttpServerMock(); |
| 2839 api.EditsListingsResourceApi res = new api.AndroidpublisherApi(mock).edits
.listings; | 2874 api.EditsListingsResourceApi res = new api.AndroidpublisherApi(mock).edits
.listings; |
| 2840 var arg_packageName = "foo"; | 2875 var arg_packageName = "foo"; |
| 2841 var arg_editId = "foo"; | 2876 var arg_editId = "foo"; |
| 2842 var arg_language = "foo"; | 2877 var arg_language = "foo"; |
| 2843 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2878 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 2844 var path = (req.url).path; | 2879 var path = (req.url).path; |
| 2845 var pathOffset = 0; | 2880 var pathOffset = 0; |
| 2846 var index; | 2881 var index; |
| 2847 var subPart; | 2882 var subPart; |
| 2848 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2883 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| (...skipping 14 matching lines...) Expand all Loading... |
| 2863 var keyvalue = part.split("="); | 2898 var keyvalue = part.split("="); |
| 2864 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2899 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 2865 } | 2900 } |
| 2866 } | 2901 } |
| 2867 | 2902 |
| 2868 | 2903 |
| 2869 var h = { | 2904 var h = { |
| 2870 "content-type" : "application/json; charset=utf-8", | 2905 "content-type" : "application/json; charset=utf-8", |
| 2871 }; | 2906 }; |
| 2872 var resp = convert.JSON.encode(buildListing()); | 2907 var resp = convert.JSON.encode(buildListing()); |
| 2873 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2908 return new async.Future.value(stringResponse(200, h, resp)); |
| 2874 }), true); | 2909 }), true); |
| 2875 res.get(arg_packageName, arg_editId, arg_language).then(unittest.expectAsy
nc(((api.Listing response) { | 2910 res.get(arg_packageName, arg_editId, arg_language).then(unittest.expectAsy
nc(((api.Listing response) { |
| 2876 checkListing(response); | 2911 checkListing(response); |
| 2877 }))); | 2912 }))); |
| 2878 }); | 2913 }); |
| 2879 | 2914 |
| 2880 unittest.test("method--list", () { | 2915 unittest.test("method--list", () { |
| 2881 | 2916 |
| 2882 var mock = new common_test.HttpServerMock(); | 2917 var mock = new HttpServerMock(); |
| 2883 api.EditsListingsResourceApi res = new api.AndroidpublisherApi(mock).edits
.listings; | 2918 api.EditsListingsResourceApi res = new api.AndroidpublisherApi(mock).edits
.listings; |
| 2884 var arg_packageName = "foo"; | 2919 var arg_packageName = "foo"; |
| 2885 var arg_editId = "foo"; | 2920 var arg_editId = "foo"; |
| 2886 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2921 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 2887 var path = (req.url).path; | 2922 var path = (req.url).path; |
| 2888 var pathOffset = 0; | 2923 var pathOffset = 0; |
| 2889 var index; | 2924 var index; |
| 2890 var subPart; | 2925 var subPart; |
| 2891 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2926 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2892 pathOffset += 1; | 2927 pathOffset += 1; |
| (...skipping 13 matching lines...) Expand all Loading... |
| 2906 var keyvalue = part.split("="); | 2941 var keyvalue = part.split("="); |
| 2907 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2942 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 2908 } | 2943 } |
| 2909 } | 2944 } |
| 2910 | 2945 |
| 2911 | 2946 |
| 2912 var h = { | 2947 var h = { |
| 2913 "content-type" : "application/json; charset=utf-8", | 2948 "content-type" : "application/json; charset=utf-8", |
| 2914 }; | 2949 }; |
| 2915 var resp = convert.JSON.encode(buildListingsListResponse()); | 2950 var resp = convert.JSON.encode(buildListingsListResponse()); |
| 2916 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2951 return new async.Future.value(stringResponse(200, h, resp)); |
| 2917 }), true); | 2952 }), true); |
| 2918 res.list(arg_packageName, arg_editId).then(unittest.expectAsync(((api.List
ingsListResponse response) { | 2953 res.list(arg_packageName, arg_editId).then(unittest.expectAsync(((api.List
ingsListResponse response) { |
| 2919 checkListingsListResponse(response); | 2954 checkListingsListResponse(response); |
| 2920 }))); | 2955 }))); |
| 2921 }); | 2956 }); |
| 2922 | 2957 |
| 2923 unittest.test("method--patch", () { | 2958 unittest.test("method--patch", () { |
| 2924 | 2959 |
| 2925 var mock = new common_test.HttpServerMock(); | 2960 var mock = new HttpServerMock(); |
| 2926 api.EditsListingsResourceApi res = new api.AndroidpublisherApi(mock).edits
.listings; | 2961 api.EditsListingsResourceApi res = new api.AndroidpublisherApi(mock).edits
.listings; |
| 2927 var arg_request = buildListing(); | 2962 var arg_request = buildListing(); |
| 2928 var arg_packageName = "foo"; | 2963 var arg_packageName = "foo"; |
| 2929 var arg_editId = "foo"; | 2964 var arg_editId = "foo"; |
| 2930 var arg_language = "foo"; | 2965 var arg_language = "foo"; |
| 2931 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2966 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 2932 var obj = new api.Listing.fromJson(json); | 2967 var obj = new api.Listing.fromJson(json); |
| 2933 checkListing(obj); | 2968 checkListing(obj); |
| 2934 | 2969 |
| 2935 var path = (req.url).path; | 2970 var path = (req.url).path; |
| (...skipping 18 matching lines...) Expand all Loading... |
| 2954 var keyvalue = part.split("="); | 2989 var keyvalue = part.split("="); |
| 2955 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2990 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 2956 } | 2991 } |
| 2957 } | 2992 } |
| 2958 | 2993 |
| 2959 | 2994 |
| 2960 var h = { | 2995 var h = { |
| 2961 "content-type" : "application/json; charset=utf-8", | 2996 "content-type" : "application/json; charset=utf-8", |
| 2962 }; | 2997 }; |
| 2963 var resp = convert.JSON.encode(buildListing()); | 2998 var resp = convert.JSON.encode(buildListing()); |
| 2964 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2999 return new async.Future.value(stringResponse(200, h, resp)); |
| 2965 }), true); | 3000 }), true); |
| 2966 res.patch(arg_request, arg_packageName, arg_editId, arg_language).then(uni
ttest.expectAsync(((api.Listing response) { | 3001 res.patch(arg_request, arg_packageName, arg_editId, arg_language).then(uni
ttest.expectAsync(((api.Listing response) { |
| 2967 checkListing(response); | 3002 checkListing(response); |
| 2968 }))); | 3003 }))); |
| 2969 }); | 3004 }); |
| 2970 | 3005 |
| 2971 unittest.test("method--update", () { | 3006 unittest.test("method--update", () { |
| 2972 | 3007 |
| 2973 var mock = new common_test.HttpServerMock(); | 3008 var mock = new HttpServerMock(); |
| 2974 api.EditsListingsResourceApi res = new api.AndroidpublisherApi(mock).edits
.listings; | 3009 api.EditsListingsResourceApi res = new api.AndroidpublisherApi(mock).edits
.listings; |
| 2975 var arg_request = buildListing(); | 3010 var arg_request = buildListing(); |
| 2976 var arg_packageName = "foo"; | 3011 var arg_packageName = "foo"; |
| 2977 var arg_editId = "foo"; | 3012 var arg_editId = "foo"; |
| 2978 var arg_language = "foo"; | 3013 var arg_language = "foo"; |
| 2979 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3014 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 2980 var obj = new api.Listing.fromJson(json); | 3015 var obj = new api.Listing.fromJson(json); |
| 2981 checkListing(obj); | 3016 checkListing(obj); |
| 2982 | 3017 |
| 2983 var path = (req.url).path; | 3018 var path = (req.url).path; |
| (...skipping 18 matching lines...) Expand all Loading... |
| 3002 var keyvalue = part.split("="); | 3037 var keyvalue = part.split("="); |
| 3003 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 3038 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 3004 } | 3039 } |
| 3005 } | 3040 } |
| 3006 | 3041 |
| 3007 | 3042 |
| 3008 var h = { | 3043 var h = { |
| 3009 "content-type" : "application/json; charset=utf-8", | 3044 "content-type" : "application/json; charset=utf-8", |
| 3010 }; | 3045 }; |
| 3011 var resp = convert.JSON.encode(buildListing()); | 3046 var resp = convert.JSON.encode(buildListing()); |
| 3012 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 3047 return new async.Future.value(stringResponse(200, h, resp)); |
| 3013 }), true); | 3048 }), true); |
| 3014 res.update(arg_request, arg_packageName, arg_editId, arg_language).then(un
ittest.expectAsync(((api.Listing response) { | 3049 res.update(arg_request, arg_packageName, arg_editId, arg_language).then(un
ittest.expectAsync(((api.Listing response) { |
| 3015 checkListing(response); | 3050 checkListing(response); |
| 3016 }))); | 3051 }))); |
| 3017 }); | 3052 }); |
| 3018 | 3053 |
| 3019 }); | 3054 }); |
| 3020 | 3055 |
| 3021 | 3056 |
| 3022 unittest.group("resource-EditsTestersResourceApi", () { | 3057 unittest.group("resource-EditsTestersResourceApi", () { |
| 3023 unittest.test("method--get", () { | 3058 unittest.test("method--get", () { |
| 3024 | 3059 |
| 3025 var mock = new common_test.HttpServerMock(); | 3060 var mock = new HttpServerMock(); |
| 3026 api.EditsTestersResourceApi res = new api.AndroidpublisherApi(mock).edits.
testers; | 3061 api.EditsTestersResourceApi res = new api.AndroidpublisherApi(mock).edits.
testers; |
| 3027 var arg_packageName = "foo"; | 3062 var arg_packageName = "foo"; |
| 3028 var arg_editId = "foo"; | 3063 var arg_editId = "foo"; |
| 3029 var arg_track = "foo"; | 3064 var arg_track = "foo"; |
| 3030 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3065 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 3031 var path = (req.url).path; | 3066 var path = (req.url).path; |
| 3032 var pathOffset = 0; | 3067 var pathOffset = 0; |
| 3033 var index; | 3068 var index; |
| 3034 var subPart; | 3069 var subPart; |
| 3035 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3070 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| (...skipping 14 matching lines...) Expand all Loading... |
| 3050 var keyvalue = part.split("="); | 3085 var keyvalue = part.split("="); |
| 3051 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 3086 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 3052 } | 3087 } |
| 3053 } | 3088 } |
| 3054 | 3089 |
| 3055 | 3090 |
| 3056 var h = { | 3091 var h = { |
| 3057 "content-type" : "application/json; charset=utf-8", | 3092 "content-type" : "application/json; charset=utf-8", |
| 3058 }; | 3093 }; |
| 3059 var resp = convert.JSON.encode(buildTesters()); | 3094 var resp = convert.JSON.encode(buildTesters()); |
| 3060 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 3095 return new async.Future.value(stringResponse(200, h, resp)); |
| 3061 }), true); | 3096 }), true); |
| 3062 res.get(arg_packageName, arg_editId, arg_track).then(unittest.expectAsync(
((api.Testers response) { | 3097 res.get(arg_packageName, arg_editId, arg_track).then(unittest.expectAsync(
((api.Testers response) { |
| 3063 checkTesters(response); | 3098 checkTesters(response); |
| 3064 }))); | 3099 }))); |
| 3065 }); | 3100 }); |
| 3066 | 3101 |
| 3067 unittest.test("method--patch", () { | 3102 unittest.test("method--patch", () { |
| 3068 | 3103 |
| 3069 var mock = new common_test.HttpServerMock(); | 3104 var mock = new HttpServerMock(); |
| 3070 api.EditsTestersResourceApi res = new api.AndroidpublisherApi(mock).edits.
testers; | 3105 api.EditsTestersResourceApi res = new api.AndroidpublisherApi(mock).edits.
testers; |
| 3071 var arg_request = buildTesters(); | 3106 var arg_request = buildTesters(); |
| 3072 var arg_packageName = "foo"; | 3107 var arg_packageName = "foo"; |
| 3073 var arg_editId = "foo"; | 3108 var arg_editId = "foo"; |
| 3074 var arg_track = "foo"; | 3109 var arg_track = "foo"; |
| 3075 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3110 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 3076 var obj = new api.Testers.fromJson(json); | 3111 var obj = new api.Testers.fromJson(json); |
| 3077 checkTesters(obj); | 3112 checkTesters(obj); |
| 3078 | 3113 |
| 3079 var path = (req.url).path; | 3114 var path = (req.url).path; |
| (...skipping 18 matching lines...) Expand all Loading... |
| 3098 var keyvalue = part.split("="); | 3133 var keyvalue = part.split("="); |
| 3099 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 3134 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 3100 } | 3135 } |
| 3101 } | 3136 } |
| 3102 | 3137 |
| 3103 | 3138 |
| 3104 var h = { | 3139 var h = { |
| 3105 "content-type" : "application/json; charset=utf-8", | 3140 "content-type" : "application/json; charset=utf-8", |
| 3106 }; | 3141 }; |
| 3107 var resp = convert.JSON.encode(buildTesters()); | 3142 var resp = convert.JSON.encode(buildTesters()); |
| 3108 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 3143 return new async.Future.value(stringResponse(200, h, resp)); |
| 3109 }), true); | 3144 }), true); |
| 3110 res.patch(arg_request, arg_packageName, arg_editId, arg_track).then(unitte
st.expectAsync(((api.Testers response) { | 3145 res.patch(arg_request, arg_packageName, arg_editId, arg_track).then(unitte
st.expectAsync(((api.Testers response) { |
| 3111 checkTesters(response); | 3146 checkTesters(response); |
| 3112 }))); | 3147 }))); |
| 3113 }); | 3148 }); |
| 3114 | 3149 |
| 3115 unittest.test("method--update", () { | 3150 unittest.test("method--update", () { |
| 3116 | 3151 |
| 3117 var mock = new common_test.HttpServerMock(); | 3152 var mock = new HttpServerMock(); |
| 3118 api.EditsTestersResourceApi res = new api.AndroidpublisherApi(mock).edits.
testers; | 3153 api.EditsTestersResourceApi res = new api.AndroidpublisherApi(mock).edits.
testers; |
| 3119 var arg_request = buildTesters(); | 3154 var arg_request = buildTesters(); |
| 3120 var arg_packageName = "foo"; | 3155 var arg_packageName = "foo"; |
| 3121 var arg_editId = "foo"; | 3156 var arg_editId = "foo"; |
| 3122 var arg_track = "foo"; | 3157 var arg_track = "foo"; |
| 3123 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3158 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 3124 var obj = new api.Testers.fromJson(json); | 3159 var obj = new api.Testers.fromJson(json); |
| 3125 checkTesters(obj); | 3160 checkTesters(obj); |
| 3126 | 3161 |
| 3127 var path = (req.url).path; | 3162 var path = (req.url).path; |
| (...skipping 18 matching lines...) Expand all Loading... |
| 3146 var keyvalue = part.split("="); | 3181 var keyvalue = part.split("="); |
| 3147 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 3182 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 3148 } | 3183 } |
| 3149 } | 3184 } |
| 3150 | 3185 |
| 3151 | 3186 |
| 3152 var h = { | 3187 var h = { |
| 3153 "content-type" : "application/json; charset=utf-8", | 3188 "content-type" : "application/json; charset=utf-8", |
| 3154 }; | 3189 }; |
| 3155 var resp = convert.JSON.encode(buildTesters()); | 3190 var resp = convert.JSON.encode(buildTesters()); |
| 3156 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 3191 return new async.Future.value(stringResponse(200, h, resp)); |
| 3157 }), true); | 3192 }), true); |
| 3158 res.update(arg_request, arg_packageName, arg_editId, arg_track).then(unitt
est.expectAsync(((api.Testers response) { | 3193 res.update(arg_request, arg_packageName, arg_editId, arg_track).then(unitt
est.expectAsync(((api.Testers response) { |
| 3159 checkTesters(response); | 3194 checkTesters(response); |
| 3160 }))); | 3195 }))); |
| 3161 }); | 3196 }); |
| 3162 | 3197 |
| 3163 }); | 3198 }); |
| 3164 | 3199 |
| 3165 | 3200 |
| 3166 unittest.group("resource-EditsTracksResourceApi", () { | 3201 unittest.group("resource-EditsTracksResourceApi", () { |
| 3167 unittest.test("method--get", () { | 3202 unittest.test("method--get", () { |
| 3168 | 3203 |
| 3169 var mock = new common_test.HttpServerMock(); | 3204 var mock = new HttpServerMock(); |
| 3170 api.EditsTracksResourceApi res = new api.AndroidpublisherApi(mock).edits.t
racks; | 3205 api.EditsTracksResourceApi res = new api.AndroidpublisherApi(mock).edits.t
racks; |
| 3171 var arg_packageName = "foo"; | 3206 var arg_packageName = "foo"; |
| 3172 var arg_editId = "foo"; | 3207 var arg_editId = "foo"; |
| 3173 var arg_track = "foo"; | 3208 var arg_track = "foo"; |
| 3174 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3209 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 3175 var path = (req.url).path; | 3210 var path = (req.url).path; |
| 3176 var pathOffset = 0; | 3211 var pathOffset = 0; |
| 3177 var index; | 3212 var index; |
| 3178 var subPart; | 3213 var subPart; |
| 3179 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3214 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| (...skipping 14 matching lines...) Expand all Loading... |
| 3194 var keyvalue = part.split("="); | 3229 var keyvalue = part.split("="); |
| 3195 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 3230 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 3196 } | 3231 } |
| 3197 } | 3232 } |
| 3198 | 3233 |
| 3199 | 3234 |
| 3200 var h = { | 3235 var h = { |
| 3201 "content-type" : "application/json; charset=utf-8", | 3236 "content-type" : "application/json; charset=utf-8", |
| 3202 }; | 3237 }; |
| 3203 var resp = convert.JSON.encode(buildTrack()); | 3238 var resp = convert.JSON.encode(buildTrack()); |
| 3204 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 3239 return new async.Future.value(stringResponse(200, h, resp)); |
| 3205 }), true); | 3240 }), true); |
| 3206 res.get(arg_packageName, arg_editId, arg_track).then(unittest.expectAsync(
((api.Track response) { | 3241 res.get(arg_packageName, arg_editId, arg_track).then(unittest.expectAsync(
((api.Track response) { |
| 3207 checkTrack(response); | 3242 checkTrack(response); |
| 3208 }))); | 3243 }))); |
| 3209 }); | 3244 }); |
| 3210 | 3245 |
| 3211 unittest.test("method--list", () { | 3246 unittest.test("method--list", () { |
| 3212 | 3247 |
| 3213 var mock = new common_test.HttpServerMock(); | 3248 var mock = new HttpServerMock(); |
| 3214 api.EditsTracksResourceApi res = new api.AndroidpublisherApi(mock).edits.t
racks; | 3249 api.EditsTracksResourceApi res = new api.AndroidpublisherApi(mock).edits.t
racks; |
| 3215 var arg_packageName = "foo"; | 3250 var arg_packageName = "foo"; |
| 3216 var arg_editId = "foo"; | 3251 var arg_editId = "foo"; |
| 3217 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3252 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 3218 var path = (req.url).path; | 3253 var path = (req.url).path; |
| 3219 var pathOffset = 0; | 3254 var pathOffset = 0; |
| 3220 var index; | 3255 var index; |
| 3221 var subPart; | 3256 var subPart; |
| 3222 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3257 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 3223 pathOffset += 1; | 3258 pathOffset += 1; |
| (...skipping 13 matching lines...) Expand all Loading... |
| 3237 var keyvalue = part.split("="); | 3272 var keyvalue = part.split("="); |
| 3238 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 3273 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 3239 } | 3274 } |
| 3240 } | 3275 } |
| 3241 | 3276 |
| 3242 | 3277 |
| 3243 var h = { | 3278 var h = { |
| 3244 "content-type" : "application/json; charset=utf-8", | 3279 "content-type" : "application/json; charset=utf-8", |
| 3245 }; | 3280 }; |
| 3246 var resp = convert.JSON.encode(buildTracksListResponse()); | 3281 var resp = convert.JSON.encode(buildTracksListResponse()); |
| 3247 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 3282 return new async.Future.value(stringResponse(200, h, resp)); |
| 3248 }), true); | 3283 }), true); |
| 3249 res.list(arg_packageName, arg_editId).then(unittest.expectAsync(((api.Trac
ksListResponse response) { | 3284 res.list(arg_packageName, arg_editId).then(unittest.expectAsync(((api.Trac
ksListResponse response) { |
| 3250 checkTracksListResponse(response); | 3285 checkTracksListResponse(response); |
| 3251 }))); | 3286 }))); |
| 3252 }); | 3287 }); |
| 3253 | 3288 |
| 3254 unittest.test("method--patch", () { | 3289 unittest.test("method--patch", () { |
| 3255 | 3290 |
| 3256 var mock = new common_test.HttpServerMock(); | 3291 var mock = new HttpServerMock(); |
| 3257 api.EditsTracksResourceApi res = new api.AndroidpublisherApi(mock).edits.t
racks; | 3292 api.EditsTracksResourceApi res = new api.AndroidpublisherApi(mock).edits.t
racks; |
| 3258 var arg_request = buildTrack(); | 3293 var arg_request = buildTrack(); |
| 3259 var arg_packageName = "foo"; | 3294 var arg_packageName = "foo"; |
| 3260 var arg_editId = "foo"; | 3295 var arg_editId = "foo"; |
| 3261 var arg_track = "foo"; | 3296 var arg_track = "foo"; |
| 3262 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3297 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 3263 var obj = new api.Track.fromJson(json); | 3298 var obj = new api.Track.fromJson(json); |
| 3264 checkTrack(obj); | 3299 checkTrack(obj); |
| 3265 | 3300 |
| 3266 var path = (req.url).path; | 3301 var path = (req.url).path; |
| (...skipping 18 matching lines...) Expand all Loading... |
| 3285 var keyvalue = part.split("="); | 3320 var keyvalue = part.split("="); |
| 3286 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 3321 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 3287 } | 3322 } |
| 3288 } | 3323 } |
| 3289 | 3324 |
| 3290 | 3325 |
| 3291 var h = { | 3326 var h = { |
| 3292 "content-type" : "application/json; charset=utf-8", | 3327 "content-type" : "application/json; charset=utf-8", |
| 3293 }; | 3328 }; |
| 3294 var resp = convert.JSON.encode(buildTrack()); | 3329 var resp = convert.JSON.encode(buildTrack()); |
| 3295 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 3330 return new async.Future.value(stringResponse(200, h, resp)); |
| 3296 }), true); | 3331 }), true); |
| 3297 res.patch(arg_request, arg_packageName, arg_editId, arg_track).then(unitte
st.expectAsync(((api.Track response) { | 3332 res.patch(arg_request, arg_packageName, arg_editId, arg_track).then(unitte
st.expectAsync(((api.Track response) { |
| 3298 checkTrack(response); | 3333 checkTrack(response); |
| 3299 }))); | 3334 }))); |
| 3300 }); | 3335 }); |
| 3301 | 3336 |
| 3302 unittest.test("method--update", () { | 3337 unittest.test("method--update", () { |
| 3303 | 3338 |
| 3304 var mock = new common_test.HttpServerMock(); | 3339 var mock = new HttpServerMock(); |
| 3305 api.EditsTracksResourceApi res = new api.AndroidpublisherApi(mock).edits.t
racks; | 3340 api.EditsTracksResourceApi res = new api.AndroidpublisherApi(mock).edits.t
racks; |
| 3306 var arg_request = buildTrack(); | 3341 var arg_request = buildTrack(); |
| 3307 var arg_packageName = "foo"; | 3342 var arg_packageName = "foo"; |
| 3308 var arg_editId = "foo"; | 3343 var arg_editId = "foo"; |
| 3309 var arg_track = "foo"; | 3344 var arg_track = "foo"; |
| 3310 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3345 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 3311 var obj = new api.Track.fromJson(json); | 3346 var obj = new api.Track.fromJson(json); |
| 3312 checkTrack(obj); | 3347 checkTrack(obj); |
| 3313 | 3348 |
| 3314 var path = (req.url).path; | 3349 var path = (req.url).path; |
| (...skipping 18 matching lines...) Expand all Loading... |
| 3333 var keyvalue = part.split("="); | 3368 var keyvalue = part.split("="); |
| 3334 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 3369 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 3335 } | 3370 } |
| 3336 } | 3371 } |
| 3337 | 3372 |
| 3338 | 3373 |
| 3339 var h = { | 3374 var h = { |
| 3340 "content-type" : "application/json; charset=utf-8", | 3375 "content-type" : "application/json; charset=utf-8", |
| 3341 }; | 3376 }; |
| 3342 var resp = convert.JSON.encode(buildTrack()); | 3377 var resp = convert.JSON.encode(buildTrack()); |
| 3343 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 3378 return new async.Future.value(stringResponse(200, h, resp)); |
| 3344 }), true); | 3379 }), true); |
| 3345 res.update(arg_request, arg_packageName, arg_editId, arg_track).then(unitt
est.expectAsync(((api.Track response) { | 3380 res.update(arg_request, arg_packageName, arg_editId, arg_track).then(unitt
est.expectAsync(((api.Track response) { |
| 3346 checkTrack(response); | 3381 checkTrack(response); |
| 3347 }))); | 3382 }))); |
| 3348 }); | 3383 }); |
| 3349 | 3384 |
| 3350 }); | 3385 }); |
| 3351 | 3386 |
| 3352 | 3387 |
| 3353 unittest.group("resource-InappproductsResourceApi", () { | 3388 unittest.group("resource-InappproductsResourceApi", () { |
| 3354 unittest.test("method--batch", () { | 3389 unittest.test("method--batch", () { |
| 3355 | 3390 |
| 3356 var mock = new common_test.HttpServerMock(); | 3391 var mock = new HttpServerMock(); |
| 3357 api.InappproductsResourceApi res = new api.AndroidpublisherApi(mock).inapp
products; | 3392 api.InappproductsResourceApi res = new api.AndroidpublisherApi(mock).inapp
products; |
| 3358 var arg_request = buildInappproductsBatchRequest(); | 3393 var arg_request = buildInappproductsBatchRequest(); |
| 3359 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3394 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 3360 var obj = new api.InappproductsBatchRequest.fromJson(json); | 3395 var obj = new api.InappproductsBatchRequest.fromJson(json); |
| 3361 checkInappproductsBatchRequest(obj); | 3396 checkInappproductsBatchRequest(obj); |
| 3362 | 3397 |
| 3363 var path = (req.url).path; | 3398 var path = (req.url).path; |
| 3364 var pathOffset = 0; | 3399 var pathOffset = 0; |
| 3365 var index; | 3400 var index; |
| 3366 var subPart; | 3401 var subPart; |
| (...skipping 19 matching lines...) Expand all Loading... |
| 3386 var keyvalue = part.split("="); | 3421 var keyvalue = part.split("="); |
| 3387 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 3422 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 3388 } | 3423 } |
| 3389 } | 3424 } |
| 3390 | 3425 |
| 3391 | 3426 |
| 3392 var h = { | 3427 var h = { |
| 3393 "content-type" : "application/json; charset=utf-8", | 3428 "content-type" : "application/json; charset=utf-8", |
| 3394 }; | 3429 }; |
| 3395 var resp = convert.JSON.encode(buildInappproductsBatchResponse()); | 3430 var resp = convert.JSON.encode(buildInappproductsBatchResponse()); |
| 3396 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 3431 return new async.Future.value(stringResponse(200, h, resp)); |
| 3397 }), true); | 3432 }), true); |
| 3398 res.batch(arg_request).then(unittest.expectAsync(((api.InappproductsBatchR
esponse response) { | 3433 res.batch(arg_request).then(unittest.expectAsync(((api.InappproductsBatchR
esponse response) { |
| 3399 checkInappproductsBatchResponse(response); | 3434 checkInappproductsBatchResponse(response); |
| 3400 }))); | 3435 }))); |
| 3401 }); | 3436 }); |
| 3402 | 3437 |
| 3403 unittest.test("method--delete", () { | 3438 unittest.test("method--delete", () { |
| 3404 | 3439 |
| 3405 var mock = new common_test.HttpServerMock(); | 3440 var mock = new HttpServerMock(); |
| 3406 api.InappproductsResourceApi res = new api.AndroidpublisherApi(mock).inapp
products; | 3441 api.InappproductsResourceApi res = new api.AndroidpublisherApi(mock).inapp
products; |
| 3407 var arg_packageName = "foo"; | 3442 var arg_packageName = "foo"; |
| 3408 var arg_sku = "foo"; | 3443 var arg_sku = "foo"; |
| 3409 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3444 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 3410 var path = (req.url).path; | 3445 var path = (req.url).path; |
| 3411 var pathOffset = 0; | 3446 var pathOffset = 0; |
| 3412 var index; | 3447 var index; |
| 3413 var subPart; | 3448 var subPart; |
| 3414 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3449 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 3415 pathOffset += 1; | 3450 pathOffset += 1; |
| (...skipping 13 matching lines...) Expand all Loading... |
| 3429 var keyvalue = part.split("="); | 3464 var keyvalue = part.split("="); |
| 3430 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 3465 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 3431 } | 3466 } |
| 3432 } | 3467 } |
| 3433 | 3468 |
| 3434 | 3469 |
| 3435 var h = { | 3470 var h = { |
| 3436 "content-type" : "application/json; charset=utf-8", | 3471 "content-type" : "application/json; charset=utf-8", |
| 3437 }; | 3472 }; |
| 3438 var resp = ""; | 3473 var resp = ""; |
| 3439 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 3474 return new async.Future.value(stringResponse(200, h, resp)); |
| 3440 }), true); | 3475 }), true); |
| 3441 res.delete(arg_packageName, arg_sku).then(unittest.expectAsync((_) {})); | 3476 res.delete(arg_packageName, arg_sku).then(unittest.expectAsync((_) {})); |
| 3442 }); | 3477 }); |
| 3443 | 3478 |
| 3444 unittest.test("method--get", () { | 3479 unittest.test("method--get", () { |
| 3445 | 3480 |
| 3446 var mock = new common_test.HttpServerMock(); | 3481 var mock = new HttpServerMock(); |
| 3447 api.InappproductsResourceApi res = new api.AndroidpublisherApi(mock).inapp
products; | 3482 api.InappproductsResourceApi res = new api.AndroidpublisherApi(mock).inapp
products; |
| 3448 var arg_packageName = "foo"; | 3483 var arg_packageName = "foo"; |
| 3449 var arg_sku = "foo"; | 3484 var arg_sku = "foo"; |
| 3450 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3485 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 3451 var path = (req.url).path; | 3486 var path = (req.url).path; |
| 3452 var pathOffset = 0; | 3487 var pathOffset = 0; |
| 3453 var index; | 3488 var index; |
| 3454 var subPart; | 3489 var subPart; |
| 3455 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3490 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 3456 pathOffset += 1; | 3491 pathOffset += 1; |
| (...skipping 13 matching lines...) Expand all Loading... |
| 3470 var keyvalue = part.split("="); | 3505 var keyvalue = part.split("="); |
| 3471 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 3506 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 3472 } | 3507 } |
| 3473 } | 3508 } |
| 3474 | 3509 |
| 3475 | 3510 |
| 3476 var h = { | 3511 var h = { |
| 3477 "content-type" : "application/json; charset=utf-8", | 3512 "content-type" : "application/json; charset=utf-8", |
| 3478 }; | 3513 }; |
| 3479 var resp = convert.JSON.encode(buildInAppProduct()); | 3514 var resp = convert.JSON.encode(buildInAppProduct()); |
| 3480 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 3515 return new async.Future.value(stringResponse(200, h, resp)); |
| 3481 }), true); | 3516 }), true); |
| 3482 res.get(arg_packageName, arg_sku).then(unittest.expectAsync(((api.InAppPro
duct response) { | 3517 res.get(arg_packageName, arg_sku).then(unittest.expectAsync(((api.InAppPro
duct response) { |
| 3483 checkInAppProduct(response); | 3518 checkInAppProduct(response); |
| 3484 }))); | 3519 }))); |
| 3485 }); | 3520 }); |
| 3486 | 3521 |
| 3487 unittest.test("method--insert", () { | 3522 unittest.test("method--insert", () { |
| 3488 | 3523 |
| 3489 var mock = new common_test.HttpServerMock(); | 3524 var mock = new HttpServerMock(); |
| 3490 api.InappproductsResourceApi res = new api.AndroidpublisherApi(mock).inapp
products; | 3525 api.InappproductsResourceApi res = new api.AndroidpublisherApi(mock).inapp
products; |
| 3491 var arg_request = buildInAppProduct(); | 3526 var arg_request = buildInAppProduct(); |
| 3492 var arg_packageName = "foo"; | 3527 var arg_packageName = "foo"; |
| 3493 var arg_autoConvertMissingPrices = true; | 3528 var arg_autoConvertMissingPrices = true; |
| 3494 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3529 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 3495 var obj = new api.InAppProduct.fromJson(json); | 3530 var obj = new api.InAppProduct.fromJson(json); |
| 3496 checkInAppProduct(obj); | 3531 checkInAppProduct(obj); |
| 3497 | 3532 |
| 3498 var path = (req.url).path; | 3533 var path = (req.url).path; |
| 3499 var pathOffset = 0; | 3534 var pathOffset = 0; |
| (...skipping 18 matching lines...) Expand all Loading... |
| 3518 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 3553 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 3519 } | 3554 } |
| 3520 } | 3555 } |
| 3521 unittest.expect(queryMap["autoConvertMissingPrices"].first, unittest.equ
als("$arg_autoConvertMissingPrices")); | 3556 unittest.expect(queryMap["autoConvertMissingPrices"].first, unittest.equ
als("$arg_autoConvertMissingPrices")); |
| 3522 | 3557 |
| 3523 | 3558 |
| 3524 var h = { | 3559 var h = { |
| 3525 "content-type" : "application/json; charset=utf-8", | 3560 "content-type" : "application/json; charset=utf-8", |
| 3526 }; | 3561 }; |
| 3527 var resp = convert.JSON.encode(buildInAppProduct()); | 3562 var resp = convert.JSON.encode(buildInAppProduct()); |
| 3528 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 3563 return new async.Future.value(stringResponse(200, h, resp)); |
| 3529 }), true); | 3564 }), true); |
| 3530 res.insert(arg_request, arg_packageName, autoConvertMissingPrices: arg_aut
oConvertMissingPrices).then(unittest.expectAsync(((api.InAppProduct response) { | 3565 res.insert(arg_request, arg_packageName, autoConvertMissingPrices: arg_aut
oConvertMissingPrices).then(unittest.expectAsync(((api.InAppProduct response) { |
| 3531 checkInAppProduct(response); | 3566 checkInAppProduct(response); |
| 3532 }))); | 3567 }))); |
| 3533 }); | 3568 }); |
| 3534 | 3569 |
| 3535 unittest.test("method--list", () { | 3570 unittest.test("method--list", () { |
| 3536 | 3571 |
| 3537 var mock = new common_test.HttpServerMock(); | 3572 var mock = new HttpServerMock(); |
| 3538 api.InappproductsResourceApi res = new api.AndroidpublisherApi(mock).inapp
products; | 3573 api.InappproductsResourceApi res = new api.AndroidpublisherApi(mock).inapp
products; |
| 3539 var arg_packageName = "foo"; | 3574 var arg_packageName = "foo"; |
| 3540 var arg_maxResults = 42; | 3575 var arg_maxResults = 42; |
| 3541 var arg_startIndex = 42; | 3576 var arg_startIndex = 42; |
| 3542 var arg_token = "foo"; | 3577 var arg_token = "foo"; |
| 3543 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3578 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 3544 var path = (req.url).path; | 3579 var path = (req.url).path; |
| 3545 var pathOffset = 0; | 3580 var pathOffset = 0; |
| 3546 var index; | 3581 var index; |
| 3547 var subPart; | 3582 var subPart; |
| (...skipping 18 matching lines...) Expand all Loading... |
| 3566 } | 3601 } |
| 3567 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | 3602 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); |
| 3568 unittest.expect(core.int.parse(queryMap["startIndex"].first), unittest.e
quals(arg_startIndex)); | 3603 unittest.expect(core.int.parse(queryMap["startIndex"].first), unittest.e
quals(arg_startIndex)); |
| 3569 unittest.expect(queryMap["token"].first, unittest.equals(arg_token)); | 3604 unittest.expect(queryMap["token"].first, unittest.equals(arg_token)); |
| 3570 | 3605 |
| 3571 | 3606 |
| 3572 var h = { | 3607 var h = { |
| 3573 "content-type" : "application/json; charset=utf-8", | 3608 "content-type" : "application/json; charset=utf-8", |
| 3574 }; | 3609 }; |
| 3575 var resp = convert.JSON.encode(buildInappproductsListResponse()); | 3610 var resp = convert.JSON.encode(buildInappproductsListResponse()); |
| 3576 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 3611 return new async.Future.value(stringResponse(200, h, resp)); |
| 3577 }), true); | 3612 }), true); |
| 3578 res.list(arg_packageName, maxResults: arg_maxResults, startIndex: arg_star
tIndex, token: arg_token).then(unittest.expectAsync(((api.InappproductsListRespo
nse response) { | 3613 res.list(arg_packageName, maxResults: arg_maxResults, startIndex: arg_star
tIndex, token: arg_token).then(unittest.expectAsync(((api.InappproductsListRespo
nse response) { |
| 3579 checkInappproductsListResponse(response); | 3614 checkInappproductsListResponse(response); |
| 3580 }))); | 3615 }))); |
| 3581 }); | 3616 }); |
| 3582 | 3617 |
| 3583 unittest.test("method--patch", () { | 3618 unittest.test("method--patch", () { |
| 3584 | 3619 |
| 3585 var mock = new common_test.HttpServerMock(); | 3620 var mock = new HttpServerMock(); |
| 3586 api.InappproductsResourceApi res = new api.AndroidpublisherApi(mock).inapp
products; | 3621 api.InappproductsResourceApi res = new api.AndroidpublisherApi(mock).inapp
products; |
| 3587 var arg_request = buildInAppProduct(); | 3622 var arg_request = buildInAppProduct(); |
| 3588 var arg_packageName = "foo"; | 3623 var arg_packageName = "foo"; |
| 3589 var arg_sku = "foo"; | 3624 var arg_sku = "foo"; |
| 3590 var arg_autoConvertMissingPrices = true; | 3625 var arg_autoConvertMissingPrices = true; |
| 3591 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3626 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 3592 var obj = new api.InAppProduct.fromJson(json); | 3627 var obj = new api.InAppProduct.fromJson(json); |
| 3593 checkInAppProduct(obj); | 3628 checkInAppProduct(obj); |
| 3594 | 3629 |
| 3595 var path = (req.url).path; | 3630 var path = (req.url).path; |
| (...skipping 19 matching lines...) Expand all Loading... |
| 3615 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 3650 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 3616 } | 3651 } |
| 3617 } | 3652 } |
| 3618 unittest.expect(queryMap["autoConvertMissingPrices"].first, unittest.equ
als("$arg_autoConvertMissingPrices")); | 3653 unittest.expect(queryMap["autoConvertMissingPrices"].first, unittest.equ
als("$arg_autoConvertMissingPrices")); |
| 3619 | 3654 |
| 3620 | 3655 |
| 3621 var h = { | 3656 var h = { |
| 3622 "content-type" : "application/json; charset=utf-8", | 3657 "content-type" : "application/json; charset=utf-8", |
| 3623 }; | 3658 }; |
| 3624 var resp = convert.JSON.encode(buildInAppProduct()); | 3659 var resp = convert.JSON.encode(buildInAppProduct()); |
| 3625 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 3660 return new async.Future.value(stringResponse(200, h, resp)); |
| 3626 }), true); | 3661 }), true); |
| 3627 res.patch(arg_request, arg_packageName, arg_sku, autoConvertMissingPrices:
arg_autoConvertMissingPrices).then(unittest.expectAsync(((api.InAppProduct resp
onse) { | 3662 res.patch(arg_request, arg_packageName, arg_sku, autoConvertMissingPrices:
arg_autoConvertMissingPrices).then(unittest.expectAsync(((api.InAppProduct resp
onse) { |
| 3628 checkInAppProduct(response); | 3663 checkInAppProduct(response); |
| 3629 }))); | 3664 }))); |
| 3630 }); | 3665 }); |
| 3631 | 3666 |
| 3632 unittest.test("method--update", () { | 3667 unittest.test("method--update", () { |
| 3633 | 3668 |
| 3634 var mock = new common_test.HttpServerMock(); | 3669 var mock = new HttpServerMock(); |
| 3635 api.InappproductsResourceApi res = new api.AndroidpublisherApi(mock).inapp
products; | 3670 api.InappproductsResourceApi res = new api.AndroidpublisherApi(mock).inapp
products; |
| 3636 var arg_request = buildInAppProduct(); | 3671 var arg_request = buildInAppProduct(); |
| 3637 var arg_packageName = "foo"; | 3672 var arg_packageName = "foo"; |
| 3638 var arg_sku = "foo"; | 3673 var arg_sku = "foo"; |
| 3639 var arg_autoConvertMissingPrices = true; | 3674 var arg_autoConvertMissingPrices = true; |
| 3640 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3675 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 3641 var obj = new api.InAppProduct.fromJson(json); | 3676 var obj = new api.InAppProduct.fromJson(json); |
| 3642 checkInAppProduct(obj); | 3677 checkInAppProduct(obj); |
| 3643 | 3678 |
| 3644 var path = (req.url).path; | 3679 var path = (req.url).path; |
| (...skipping 19 matching lines...) Expand all Loading... |
| 3664 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 3699 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 3665 } | 3700 } |
| 3666 } | 3701 } |
| 3667 unittest.expect(queryMap["autoConvertMissingPrices"].first, unittest.equ
als("$arg_autoConvertMissingPrices")); | 3702 unittest.expect(queryMap["autoConvertMissingPrices"].first, unittest.equ
als("$arg_autoConvertMissingPrices")); |
| 3668 | 3703 |
| 3669 | 3704 |
| 3670 var h = { | 3705 var h = { |
| 3671 "content-type" : "application/json; charset=utf-8", | 3706 "content-type" : "application/json; charset=utf-8", |
| 3672 }; | 3707 }; |
| 3673 var resp = convert.JSON.encode(buildInAppProduct()); | 3708 var resp = convert.JSON.encode(buildInAppProduct()); |
| 3674 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 3709 return new async.Future.value(stringResponse(200, h, resp)); |
| 3675 }), true); | 3710 }), true); |
| 3676 res.update(arg_request, arg_packageName, arg_sku, autoConvertMissingPrices
: arg_autoConvertMissingPrices).then(unittest.expectAsync(((api.InAppProduct res
ponse) { | 3711 res.update(arg_request, arg_packageName, arg_sku, autoConvertMissingPrices
: arg_autoConvertMissingPrices).then(unittest.expectAsync(((api.InAppProduct res
ponse) { |
| 3677 checkInAppProduct(response); | 3712 checkInAppProduct(response); |
| 3678 }))); | 3713 }))); |
| 3679 }); | 3714 }); |
| 3680 | 3715 |
| 3681 }); | 3716 }); |
| 3682 | 3717 |
| 3683 | 3718 |
| 3684 unittest.group("resource-PurchasesProductsResourceApi", () { | 3719 unittest.group("resource-PurchasesProductsResourceApi", () { |
| 3685 unittest.test("method--get", () { | 3720 unittest.test("method--get", () { |
| 3686 | 3721 |
| 3687 var mock = new common_test.HttpServerMock(); | 3722 var mock = new HttpServerMock(); |
| 3688 api.PurchasesProductsResourceApi res = new api.AndroidpublisherApi(mock).p
urchases.products; | 3723 api.PurchasesProductsResourceApi res = new api.AndroidpublisherApi(mock).p
urchases.products; |
| 3689 var arg_packageName = "foo"; | 3724 var arg_packageName = "foo"; |
| 3690 var arg_productId = "foo"; | 3725 var arg_productId = "foo"; |
| 3691 var arg_token = "foo"; | 3726 var arg_token = "foo"; |
| 3692 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3727 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 3693 var path = (req.url).path; | 3728 var path = (req.url).path; |
| 3694 var pathOffset = 0; | 3729 var pathOffset = 0; |
| 3695 var index; | 3730 var index; |
| 3696 var subPart; | 3731 var subPart; |
| 3697 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3732 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| (...skipping 14 matching lines...) Expand all Loading... |
| 3712 var keyvalue = part.split("="); | 3747 var keyvalue = part.split("="); |
| 3713 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 3748 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 3714 } | 3749 } |
| 3715 } | 3750 } |
| 3716 | 3751 |
| 3717 | 3752 |
| 3718 var h = { | 3753 var h = { |
| 3719 "content-type" : "application/json; charset=utf-8", | 3754 "content-type" : "application/json; charset=utf-8", |
| 3720 }; | 3755 }; |
| 3721 var resp = convert.JSON.encode(buildProductPurchase()); | 3756 var resp = convert.JSON.encode(buildProductPurchase()); |
| 3722 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 3757 return new async.Future.value(stringResponse(200, h, resp)); |
| 3723 }), true); | 3758 }), true); |
| 3724 res.get(arg_packageName, arg_productId, arg_token).then(unittest.expectAsy
nc(((api.ProductPurchase response) { | 3759 res.get(arg_packageName, arg_productId, arg_token).then(unittest.expectAsy
nc(((api.ProductPurchase response) { |
| 3725 checkProductPurchase(response); | 3760 checkProductPurchase(response); |
| 3726 }))); | 3761 }))); |
| 3727 }); | 3762 }); |
| 3728 | 3763 |
| 3729 }); | 3764 }); |
| 3730 | 3765 |
| 3731 | 3766 |
| 3732 unittest.group("resource-PurchasesSubscriptionsResourceApi", () { | 3767 unittest.group("resource-PurchasesSubscriptionsResourceApi", () { |
| 3733 unittest.test("method--cancel", () { | 3768 unittest.test("method--cancel", () { |
| 3734 | 3769 |
| 3735 var mock = new common_test.HttpServerMock(); | 3770 var mock = new HttpServerMock(); |
| 3736 api.PurchasesSubscriptionsResourceApi res = new api.AndroidpublisherApi(mo
ck).purchases.subscriptions; | 3771 api.PurchasesSubscriptionsResourceApi res = new api.AndroidpublisherApi(mo
ck).purchases.subscriptions; |
| 3737 var arg_packageName = "foo"; | 3772 var arg_packageName = "foo"; |
| 3738 var arg_subscriptionId = "foo"; | 3773 var arg_subscriptionId = "foo"; |
| 3739 var arg_token = "foo"; | 3774 var arg_token = "foo"; |
| 3740 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3775 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 3741 var path = (req.url).path; | 3776 var path = (req.url).path; |
| 3742 var pathOffset = 0; | 3777 var pathOffset = 0; |
| 3743 var index; | 3778 var index; |
| 3744 var subPart; | 3779 var subPart; |
| 3745 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3780 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| (...skipping 14 matching lines...) Expand all Loading... |
| 3760 var keyvalue = part.split("="); | 3795 var keyvalue = part.split("="); |
| 3761 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 3796 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 3762 } | 3797 } |
| 3763 } | 3798 } |
| 3764 | 3799 |
| 3765 | 3800 |
| 3766 var h = { | 3801 var h = { |
| 3767 "content-type" : "application/json; charset=utf-8", | 3802 "content-type" : "application/json; charset=utf-8", |
| 3768 }; | 3803 }; |
| 3769 var resp = ""; | 3804 var resp = ""; |
| 3770 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 3805 return new async.Future.value(stringResponse(200, h, resp)); |
| 3771 }), true); | 3806 }), true); |
| 3772 res.cancel(arg_packageName, arg_subscriptionId, arg_token).then(unittest.e
xpectAsync((_) {})); | 3807 res.cancel(arg_packageName, arg_subscriptionId, arg_token).then(unittest.e
xpectAsync((_) {})); |
| 3773 }); | 3808 }); |
| 3774 | 3809 |
| 3775 unittest.test("method--defer", () { | 3810 unittest.test("method--defer", () { |
| 3776 | 3811 |
| 3777 var mock = new common_test.HttpServerMock(); | 3812 var mock = new HttpServerMock(); |
| 3778 api.PurchasesSubscriptionsResourceApi res = new api.AndroidpublisherApi(mo
ck).purchases.subscriptions; | 3813 api.PurchasesSubscriptionsResourceApi res = new api.AndroidpublisherApi(mo
ck).purchases.subscriptions; |
| 3779 var arg_request = buildSubscriptionPurchasesDeferRequest(); | 3814 var arg_request = buildSubscriptionPurchasesDeferRequest(); |
| 3780 var arg_packageName = "foo"; | 3815 var arg_packageName = "foo"; |
| 3781 var arg_subscriptionId = "foo"; | 3816 var arg_subscriptionId = "foo"; |
| 3782 var arg_token = "foo"; | 3817 var arg_token = "foo"; |
| 3783 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3818 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 3784 var obj = new api.SubscriptionPurchasesDeferRequest.fromJson(json); | 3819 var obj = new api.SubscriptionPurchasesDeferRequest.fromJson(json); |
| 3785 checkSubscriptionPurchasesDeferRequest(obj); | 3820 checkSubscriptionPurchasesDeferRequest(obj); |
| 3786 | 3821 |
| 3787 var path = (req.url).path; | 3822 var path = (req.url).path; |
| (...skipping 18 matching lines...) Expand all Loading... |
| 3806 var keyvalue = part.split("="); | 3841 var keyvalue = part.split("="); |
| 3807 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 3842 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 3808 } | 3843 } |
| 3809 } | 3844 } |
| 3810 | 3845 |
| 3811 | 3846 |
| 3812 var h = { | 3847 var h = { |
| 3813 "content-type" : "application/json; charset=utf-8", | 3848 "content-type" : "application/json; charset=utf-8", |
| 3814 }; | 3849 }; |
| 3815 var resp = convert.JSON.encode(buildSubscriptionPurchasesDeferResponse()
); | 3850 var resp = convert.JSON.encode(buildSubscriptionPurchasesDeferResponse()
); |
| 3816 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 3851 return new async.Future.value(stringResponse(200, h, resp)); |
| 3817 }), true); | 3852 }), true); |
| 3818 res.defer(arg_request, arg_packageName, arg_subscriptionId, arg_token).the
n(unittest.expectAsync(((api.SubscriptionPurchasesDeferResponse response) { | 3853 res.defer(arg_request, arg_packageName, arg_subscriptionId, arg_token).the
n(unittest.expectAsync(((api.SubscriptionPurchasesDeferResponse response) { |
| 3819 checkSubscriptionPurchasesDeferResponse(response); | 3854 checkSubscriptionPurchasesDeferResponse(response); |
| 3820 }))); | 3855 }))); |
| 3821 }); | 3856 }); |
| 3822 | 3857 |
| 3823 unittest.test("method--get", () { | 3858 unittest.test("method--get", () { |
| 3824 | 3859 |
| 3825 var mock = new common_test.HttpServerMock(); | 3860 var mock = new HttpServerMock(); |
| 3826 api.PurchasesSubscriptionsResourceApi res = new api.AndroidpublisherApi(mo
ck).purchases.subscriptions; | 3861 api.PurchasesSubscriptionsResourceApi res = new api.AndroidpublisherApi(mo
ck).purchases.subscriptions; |
| 3827 var arg_packageName = "foo"; | 3862 var arg_packageName = "foo"; |
| 3828 var arg_subscriptionId = "foo"; | 3863 var arg_subscriptionId = "foo"; |
| 3829 var arg_token = "foo"; | 3864 var arg_token = "foo"; |
| 3830 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3865 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 3831 var path = (req.url).path; | 3866 var path = (req.url).path; |
| 3832 var pathOffset = 0; | 3867 var pathOffset = 0; |
| 3833 var index; | 3868 var index; |
| 3834 var subPart; | 3869 var subPart; |
| 3835 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3870 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| (...skipping 14 matching lines...) Expand all Loading... |
| 3850 var keyvalue = part.split("="); | 3885 var keyvalue = part.split("="); |
| 3851 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 3886 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 3852 } | 3887 } |
| 3853 } | 3888 } |
| 3854 | 3889 |
| 3855 | 3890 |
| 3856 var h = { | 3891 var h = { |
| 3857 "content-type" : "application/json; charset=utf-8", | 3892 "content-type" : "application/json; charset=utf-8", |
| 3858 }; | 3893 }; |
| 3859 var resp = convert.JSON.encode(buildSubscriptionPurchase()); | 3894 var resp = convert.JSON.encode(buildSubscriptionPurchase()); |
| 3860 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 3895 return new async.Future.value(stringResponse(200, h, resp)); |
| 3861 }), true); | 3896 }), true); |
| 3862 res.get(arg_packageName, arg_subscriptionId, arg_token).then(unittest.expe
ctAsync(((api.SubscriptionPurchase response) { | 3897 res.get(arg_packageName, arg_subscriptionId, arg_token).then(unittest.expe
ctAsync(((api.SubscriptionPurchase response) { |
| 3863 checkSubscriptionPurchase(response); | 3898 checkSubscriptionPurchase(response); |
| 3864 }))); | 3899 }))); |
| 3865 }); | 3900 }); |
| 3866 | 3901 |
| 3867 unittest.test("method--refund", () { | 3902 unittest.test("method--refund", () { |
| 3868 | 3903 |
| 3869 var mock = new common_test.HttpServerMock(); | 3904 var mock = new HttpServerMock(); |
| 3870 api.PurchasesSubscriptionsResourceApi res = new api.AndroidpublisherApi(mo
ck).purchases.subscriptions; | 3905 api.PurchasesSubscriptionsResourceApi res = new api.AndroidpublisherApi(mo
ck).purchases.subscriptions; |
| 3871 var arg_packageName = "foo"; | 3906 var arg_packageName = "foo"; |
| 3872 var arg_subscriptionId = "foo"; | 3907 var arg_subscriptionId = "foo"; |
| 3873 var arg_token = "foo"; | 3908 var arg_token = "foo"; |
| 3874 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3909 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 3875 var path = (req.url).path; | 3910 var path = (req.url).path; |
| 3876 var pathOffset = 0; | 3911 var pathOffset = 0; |
| 3877 var index; | 3912 var index; |
| 3878 var subPart; | 3913 var subPart; |
| 3879 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3914 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| (...skipping 14 matching lines...) Expand all Loading... |
| 3894 var keyvalue = part.split("="); | 3929 var keyvalue = part.split("="); |
| 3895 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 3930 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 3896 } | 3931 } |
| 3897 } | 3932 } |
| 3898 | 3933 |
| 3899 | 3934 |
| 3900 var h = { | 3935 var h = { |
| 3901 "content-type" : "application/json; charset=utf-8", | 3936 "content-type" : "application/json; charset=utf-8", |
| 3902 }; | 3937 }; |
| 3903 var resp = ""; | 3938 var resp = ""; |
| 3904 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 3939 return new async.Future.value(stringResponse(200, h, resp)); |
| 3905 }), true); | 3940 }), true); |
| 3906 res.refund(arg_packageName, arg_subscriptionId, arg_token).then(unittest.e
xpectAsync((_) {})); | 3941 res.refund(arg_packageName, arg_subscriptionId, arg_token).then(unittest.e
xpectAsync((_) {})); |
| 3907 }); | 3942 }); |
| 3908 | 3943 |
| 3909 unittest.test("method--revoke", () { | 3944 unittest.test("method--revoke", () { |
| 3910 | 3945 |
| 3911 var mock = new common_test.HttpServerMock(); | 3946 var mock = new HttpServerMock(); |
| 3912 api.PurchasesSubscriptionsResourceApi res = new api.AndroidpublisherApi(mo
ck).purchases.subscriptions; | 3947 api.PurchasesSubscriptionsResourceApi res = new api.AndroidpublisherApi(mo
ck).purchases.subscriptions; |
| 3913 var arg_packageName = "foo"; | 3948 var arg_packageName = "foo"; |
| 3914 var arg_subscriptionId = "foo"; | 3949 var arg_subscriptionId = "foo"; |
| 3915 var arg_token = "foo"; | 3950 var arg_token = "foo"; |
| 3916 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3951 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 3917 var path = (req.url).path; | 3952 var path = (req.url).path; |
| 3918 var pathOffset = 0; | 3953 var pathOffset = 0; |
| 3919 var index; | 3954 var index; |
| 3920 var subPart; | 3955 var subPart; |
| 3921 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3956 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| (...skipping 14 matching lines...) Expand all Loading... |
| 3936 var keyvalue = part.split("="); | 3971 var keyvalue = part.split("="); |
| 3937 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 3972 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 3938 } | 3973 } |
| 3939 } | 3974 } |
| 3940 | 3975 |
| 3941 | 3976 |
| 3942 var h = { | 3977 var h = { |
| 3943 "content-type" : "application/json; charset=utf-8", | 3978 "content-type" : "application/json; charset=utf-8", |
| 3944 }; | 3979 }; |
| 3945 var resp = ""; | 3980 var resp = ""; |
| 3946 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 3981 return new async.Future.value(stringResponse(200, h, resp)); |
| 3947 }), true); | 3982 }), true); |
| 3948 res.revoke(arg_packageName, arg_subscriptionId, arg_token).then(unittest.e
xpectAsync((_) {})); | 3983 res.revoke(arg_packageName, arg_subscriptionId, arg_token).then(unittest.e
xpectAsync((_) {})); |
| 3949 }); | 3984 }); |
| 3950 | 3985 |
| 3951 }); | 3986 }); |
| 3952 | 3987 |
| 3953 | 3988 |
| 3954 } | 3989 } |
| 3955 | 3990 |
| OLD | NEW |