| OLD | NEW |
| 1 library googleapis.storage.v1.test; | 1 library googleapis.storage.v1.test; |
| 2 | 2 |
| 3 import "dart:core" as core; | 3 import "dart:core" as core; |
| 4 import "dart:collection" as collection; | 4 import "dart:collection" as collection; |
| 5 import "dart:async" as async; | 5 import "dart:async" as async; |
| 6 import "dart:convert" as convert; | 6 import "dart:convert" as convert; |
| 7 | 7 |
| 8 import 'package:http/http.dart' as http; | 8 import 'package:http/http.dart' as http; |
| 9 import 'package:http/testing.dart' as http_testing; | 9 import 'package:http/testing.dart' as http_testing; |
| 10 import 'package:unittest/unittest.dart' as unittest; | 10 import 'package:unittest/unittest.dart' as unittest; |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 } | 44 } |
| 45 } | 45 } |
| 46 } | 46 } |
| 47 | 47 |
| 48 http.StreamedResponse stringResponse( | 48 http.StreamedResponse stringResponse( |
| 49 core.int status, core.Map headers, core.String body) { | 49 core.int status, core.Map headers, core.String body) { |
| 50 var stream = new async.Stream.fromIterable([convert.UTF8.encode(body)]); | 50 var stream = new async.Stream.fromIterable([convert.UTF8.encode(body)]); |
| 51 return new http.StreamedResponse(stream, status, headers: headers); | 51 return new http.StreamedResponse(stream, status, headers: headers); |
| 52 } | 52 } |
| 53 | 53 |
| 54 buildUnnamed3202() { | 54 buildUnnamed956() { |
| 55 var o = new core.List<api.BucketAccessControl>(); | 55 var o = new core.List<api.BucketAccessControl>(); |
| 56 o.add(buildBucketAccessControl()); | 56 o.add(buildBucketAccessControl()); |
| 57 o.add(buildBucketAccessControl()); | 57 o.add(buildBucketAccessControl()); |
| 58 return o; | 58 return o; |
| 59 } | 59 } |
| 60 | 60 |
| 61 checkUnnamed3202(core.List<api.BucketAccessControl> o) { | 61 checkUnnamed956(core.List<api.BucketAccessControl> o) { |
| 62 unittest.expect(o, unittest.hasLength(2)); | 62 unittest.expect(o, unittest.hasLength(2)); |
| 63 checkBucketAccessControl(o[0]); | 63 checkBucketAccessControl(o[0]); |
| 64 checkBucketAccessControl(o[1]); | 64 checkBucketAccessControl(o[1]); |
| 65 } | 65 } |
| 66 | 66 |
| 67 buildUnnamed3203() { | 67 buildUnnamed957() { |
| 68 var o = new core.List<core.String>(); | 68 var o = new core.List<core.String>(); |
| 69 o.add("foo"); | 69 o.add("foo"); |
| 70 o.add("foo"); | 70 o.add("foo"); |
| 71 return o; | 71 return o; |
| 72 } | 72 } |
| 73 | 73 |
| 74 checkUnnamed3203(core.List<core.String> o) { | 74 checkUnnamed957(core.List<core.String> o) { |
| 75 unittest.expect(o, unittest.hasLength(2)); | 75 unittest.expect(o, unittest.hasLength(2)); |
| 76 unittest.expect(o[0], unittest.equals('foo')); | 76 unittest.expect(o[0], unittest.equals('foo')); |
| 77 unittest.expect(o[1], unittest.equals('foo')); | 77 unittest.expect(o[1], unittest.equals('foo')); |
| 78 } | 78 } |
| 79 | 79 |
| 80 buildUnnamed3204() { | 80 buildUnnamed958() { |
| 81 var o = new core.List<core.String>(); | 81 var o = new core.List<core.String>(); |
| 82 o.add("foo"); | 82 o.add("foo"); |
| 83 o.add("foo"); | 83 o.add("foo"); |
| 84 return o; | 84 return o; |
| 85 } | 85 } |
| 86 | 86 |
| 87 checkUnnamed3204(core.List<core.String> o) { | 87 checkUnnamed958(core.List<core.String> o) { |
| 88 unittest.expect(o, unittest.hasLength(2)); | 88 unittest.expect(o, unittest.hasLength(2)); |
| 89 unittest.expect(o[0], unittest.equals('foo')); | 89 unittest.expect(o[0], unittest.equals('foo')); |
| 90 unittest.expect(o[1], unittest.equals('foo')); | 90 unittest.expect(o[1], unittest.equals('foo')); |
| 91 } | 91 } |
| 92 | 92 |
| 93 buildUnnamed3205() { | 93 buildUnnamed959() { |
| 94 var o = new core.List<core.String>(); | 94 var o = new core.List<core.String>(); |
| 95 o.add("foo"); | 95 o.add("foo"); |
| 96 o.add("foo"); | 96 o.add("foo"); |
| 97 return o; | 97 return o; |
| 98 } | 98 } |
| 99 | 99 |
| 100 checkUnnamed3205(core.List<core.String> o) { | 100 checkUnnamed959(core.List<core.String> o) { |
| 101 unittest.expect(o, unittest.hasLength(2)); | 101 unittest.expect(o, unittest.hasLength(2)); |
| 102 unittest.expect(o[0], unittest.equals('foo')); | 102 unittest.expect(o[0], unittest.equals('foo')); |
| 103 unittest.expect(o[1], unittest.equals('foo')); | 103 unittest.expect(o[1], unittest.equals('foo')); |
| 104 } | 104 } |
| 105 | 105 |
| 106 core.int buildCounterBucketCors = 0; | 106 core.int buildCounterBucketCors = 0; |
| 107 buildBucketCors() { | 107 buildBucketCors() { |
| 108 var o = new api.BucketCors(); | 108 var o = new api.BucketCors(); |
| 109 buildCounterBucketCors++; | 109 buildCounterBucketCors++; |
| 110 if (buildCounterBucketCors < 3) { | 110 if (buildCounterBucketCors < 3) { |
| 111 o.maxAgeSeconds = 42; | 111 o.maxAgeSeconds = 42; |
| 112 o.method = buildUnnamed3203(); | 112 o.method = buildUnnamed957(); |
| 113 o.origin = buildUnnamed3204(); | 113 o.origin = buildUnnamed958(); |
| 114 o.responseHeader = buildUnnamed3205(); | 114 o.responseHeader = buildUnnamed959(); |
| 115 } | 115 } |
| 116 buildCounterBucketCors--; | 116 buildCounterBucketCors--; |
| 117 return o; | 117 return o; |
| 118 } | 118 } |
| 119 | 119 |
| 120 checkBucketCors(api.BucketCors o) { | 120 checkBucketCors(api.BucketCors o) { |
| 121 buildCounterBucketCors++; | 121 buildCounterBucketCors++; |
| 122 if (buildCounterBucketCors < 3) { | 122 if (buildCounterBucketCors < 3) { |
| 123 unittest.expect(o.maxAgeSeconds, unittest.equals(42)); | 123 unittest.expect(o.maxAgeSeconds, unittest.equals(42)); |
| 124 checkUnnamed3203(o.method); | 124 checkUnnamed957(o.method); |
| 125 checkUnnamed3204(o.origin); | 125 checkUnnamed958(o.origin); |
| 126 checkUnnamed3205(o.responseHeader); | 126 checkUnnamed959(o.responseHeader); |
| 127 } | 127 } |
| 128 buildCounterBucketCors--; | 128 buildCounterBucketCors--; |
| 129 } | 129 } |
| 130 | 130 |
| 131 buildUnnamed3206() { | 131 buildUnnamed960() { |
| 132 var o = new core.List<api.BucketCors>(); | 132 var o = new core.List<api.BucketCors>(); |
| 133 o.add(buildBucketCors()); | 133 o.add(buildBucketCors()); |
| 134 o.add(buildBucketCors()); | 134 o.add(buildBucketCors()); |
| 135 return o; | 135 return o; |
| 136 } | 136 } |
| 137 | 137 |
| 138 checkUnnamed3206(core.List<api.BucketCors> o) { | 138 checkUnnamed960(core.List<api.BucketCors> o) { |
| 139 unittest.expect(o, unittest.hasLength(2)); | 139 unittest.expect(o, unittest.hasLength(2)); |
| 140 checkBucketCors(o[0]); | 140 checkBucketCors(o[0]); |
| 141 checkBucketCors(o[1]); | 141 checkBucketCors(o[1]); |
| 142 } | 142 } |
| 143 | 143 |
| 144 buildUnnamed3207() { | 144 buildUnnamed961() { |
| 145 var o = new core.List<api.ObjectAccessControl>(); | 145 var o = new core.List<api.ObjectAccessControl>(); |
| 146 o.add(buildObjectAccessControl()); | 146 o.add(buildObjectAccessControl()); |
| 147 o.add(buildObjectAccessControl()); | 147 o.add(buildObjectAccessControl()); |
| 148 return o; | 148 return o; |
| 149 } | 149 } |
| 150 | 150 |
| 151 checkUnnamed3207(core.List<api.ObjectAccessControl> o) { | 151 checkUnnamed961(core.List<api.ObjectAccessControl> o) { |
| 152 unittest.expect(o, unittest.hasLength(2)); | 152 unittest.expect(o, unittest.hasLength(2)); |
| 153 checkObjectAccessControl(o[0]); | 153 checkObjectAccessControl(o[0]); |
| 154 checkObjectAccessControl(o[1]); | 154 checkObjectAccessControl(o[1]); |
| 155 } | 155 } |
| 156 | 156 |
| 157 core.int buildCounterBucketEncryption = 0; |
| 158 buildBucketEncryption() { |
| 159 var o = new api.BucketEncryption(); |
| 160 buildCounterBucketEncryption++; |
| 161 if (buildCounterBucketEncryption < 3) { |
| 162 o.defaultKmsKeyName = "foo"; |
| 163 } |
| 164 buildCounterBucketEncryption--; |
| 165 return o; |
| 166 } |
| 167 |
| 168 checkBucketEncryption(api.BucketEncryption o) { |
| 169 buildCounterBucketEncryption++; |
| 170 if (buildCounterBucketEncryption < 3) { |
| 171 unittest.expect(o.defaultKmsKeyName, unittest.equals('foo')); |
| 172 } |
| 173 buildCounterBucketEncryption--; |
| 174 } |
| 175 |
| 157 core.int buildCounterBucketLifecycleRuleAction = 0; | 176 core.int buildCounterBucketLifecycleRuleAction = 0; |
| 158 buildBucketLifecycleRuleAction() { | 177 buildBucketLifecycleRuleAction() { |
| 159 var o = new api.BucketLifecycleRuleAction(); | 178 var o = new api.BucketLifecycleRuleAction(); |
| 160 buildCounterBucketLifecycleRuleAction++; | 179 buildCounterBucketLifecycleRuleAction++; |
| 161 if (buildCounterBucketLifecycleRuleAction < 3) { | 180 if (buildCounterBucketLifecycleRuleAction < 3) { |
| 162 o.type = "foo"; | 181 o.type = "foo"; |
| 163 } | 182 } |
| 164 buildCounterBucketLifecycleRuleAction--; | 183 buildCounterBucketLifecycleRuleAction--; |
| 165 return o; | 184 return o; |
| 166 } | 185 } |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 212 | 231 |
| 213 checkBucketLifecycleRule(api.BucketLifecycleRule o) { | 232 checkBucketLifecycleRule(api.BucketLifecycleRule o) { |
| 214 buildCounterBucketLifecycleRule++; | 233 buildCounterBucketLifecycleRule++; |
| 215 if (buildCounterBucketLifecycleRule < 3) { | 234 if (buildCounterBucketLifecycleRule < 3) { |
| 216 checkBucketLifecycleRuleAction(o.action); | 235 checkBucketLifecycleRuleAction(o.action); |
| 217 checkBucketLifecycleRuleCondition(o.condition); | 236 checkBucketLifecycleRuleCondition(o.condition); |
| 218 } | 237 } |
| 219 buildCounterBucketLifecycleRule--; | 238 buildCounterBucketLifecycleRule--; |
| 220 } | 239 } |
| 221 | 240 |
| 222 buildUnnamed3208() { | 241 buildUnnamed962() { |
| 223 var o = new core.List<api.BucketLifecycleRule>(); | 242 var o = new core.List<api.BucketLifecycleRule>(); |
| 224 o.add(buildBucketLifecycleRule()); | 243 o.add(buildBucketLifecycleRule()); |
| 225 o.add(buildBucketLifecycleRule()); | 244 o.add(buildBucketLifecycleRule()); |
| 226 return o; | 245 return o; |
| 227 } | 246 } |
| 228 | 247 |
| 229 checkUnnamed3208(core.List<api.BucketLifecycleRule> o) { | 248 checkUnnamed962(core.List<api.BucketLifecycleRule> o) { |
| 230 unittest.expect(o, unittest.hasLength(2)); | 249 unittest.expect(o, unittest.hasLength(2)); |
| 231 checkBucketLifecycleRule(o[0]); | 250 checkBucketLifecycleRule(o[0]); |
| 232 checkBucketLifecycleRule(o[1]); | 251 checkBucketLifecycleRule(o[1]); |
| 233 } | 252 } |
| 234 | 253 |
| 235 core.int buildCounterBucketLifecycle = 0; | 254 core.int buildCounterBucketLifecycle = 0; |
| 236 buildBucketLifecycle() { | 255 buildBucketLifecycle() { |
| 237 var o = new api.BucketLifecycle(); | 256 var o = new api.BucketLifecycle(); |
| 238 buildCounterBucketLifecycle++; | 257 buildCounterBucketLifecycle++; |
| 239 if (buildCounterBucketLifecycle < 3) { | 258 if (buildCounterBucketLifecycle < 3) { |
| 240 o.rule = buildUnnamed3208(); | 259 o.rule = buildUnnamed962(); |
| 241 } | 260 } |
| 242 buildCounterBucketLifecycle--; | 261 buildCounterBucketLifecycle--; |
| 243 return o; | 262 return o; |
| 244 } | 263 } |
| 245 | 264 |
| 246 checkBucketLifecycle(api.BucketLifecycle o) { | 265 checkBucketLifecycle(api.BucketLifecycle o) { |
| 247 buildCounterBucketLifecycle++; | 266 buildCounterBucketLifecycle++; |
| 248 if (buildCounterBucketLifecycle < 3) { | 267 if (buildCounterBucketLifecycle < 3) { |
| 249 checkUnnamed3208(o.rule); | 268 checkUnnamed962(o.rule); |
| 250 } | 269 } |
| 251 buildCounterBucketLifecycle--; | 270 buildCounterBucketLifecycle--; |
| 252 } | 271 } |
| 253 | 272 |
| 254 core.int buildCounterBucketLogging = 0; | 273 core.int buildCounterBucketLogging = 0; |
| 255 buildBucketLogging() { | 274 buildBucketLogging() { |
| 256 var o = new api.BucketLogging(); | 275 var o = new api.BucketLogging(); |
| 257 buildCounterBucketLogging++; | 276 buildCounterBucketLogging++; |
| 258 if (buildCounterBucketLogging < 3) { | 277 if (buildCounterBucketLogging < 3) { |
| 259 o.logBucket = "foo"; | 278 o.logBucket = "foo"; |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 331 unittest.expect(o.notFoundPage, unittest.equals('foo')); | 350 unittest.expect(o.notFoundPage, unittest.equals('foo')); |
| 332 } | 351 } |
| 333 buildCounterBucketWebsite--; | 352 buildCounterBucketWebsite--; |
| 334 } | 353 } |
| 335 | 354 |
| 336 core.int buildCounterBucket = 0; | 355 core.int buildCounterBucket = 0; |
| 337 buildBucket() { | 356 buildBucket() { |
| 338 var o = new api.Bucket(); | 357 var o = new api.Bucket(); |
| 339 buildCounterBucket++; | 358 buildCounterBucket++; |
| 340 if (buildCounterBucket < 3) { | 359 if (buildCounterBucket < 3) { |
| 341 o.acl = buildUnnamed3202(); | 360 o.acl = buildUnnamed956(); |
| 342 o.cors = buildUnnamed3206(); | 361 o.cors = buildUnnamed960(); |
| 343 o.defaultObjectAcl = buildUnnamed3207(); | 362 o.defaultObjectAcl = buildUnnamed961(); |
| 363 o.encryption = buildBucketEncryption(); |
| 344 o.etag = "foo"; | 364 o.etag = "foo"; |
| 345 o.id = "foo"; | 365 o.id = "foo"; |
| 346 o.kind = "foo"; | 366 o.kind = "foo"; |
| 347 o.lifecycle = buildBucketLifecycle(); | 367 o.lifecycle = buildBucketLifecycle(); |
| 348 o.location = "foo"; | 368 o.location = "foo"; |
| 349 o.logging = buildBucketLogging(); | 369 o.logging = buildBucketLogging(); |
| 350 o.metageneration = "foo"; | 370 o.metageneration = "foo"; |
| 351 o.name = "foo"; | 371 o.name = "foo"; |
| 352 o.owner = buildBucketOwner(); | 372 o.owner = buildBucketOwner(); |
| 353 o.projectNumber = "foo"; | 373 o.projectNumber = "foo"; |
| 354 o.selfLink = "foo"; | 374 o.selfLink = "foo"; |
| 355 o.storageClass = "foo"; | 375 o.storageClass = "foo"; |
| 356 o.timeCreated = core.DateTime.parse("2002-02-27T14:01:02"); | 376 o.timeCreated = core.DateTime.parse("2002-02-27T14:01:02"); |
| 357 o.updated = core.DateTime.parse("2002-02-27T14:01:02"); | 377 o.updated = core.DateTime.parse("2002-02-27T14:01:02"); |
| 358 o.versioning = buildBucketVersioning(); | 378 o.versioning = buildBucketVersioning(); |
| 359 o.website = buildBucketWebsite(); | 379 o.website = buildBucketWebsite(); |
| 360 } | 380 } |
| 361 buildCounterBucket--; | 381 buildCounterBucket--; |
| 362 return o; | 382 return o; |
| 363 } | 383 } |
| 364 | 384 |
| 365 checkBucket(api.Bucket o) { | 385 checkBucket(api.Bucket o) { |
| 366 buildCounterBucket++; | 386 buildCounterBucket++; |
| 367 if (buildCounterBucket < 3) { | 387 if (buildCounterBucket < 3) { |
| 368 checkUnnamed3202(o.acl); | 388 checkUnnamed956(o.acl); |
| 369 checkUnnamed3206(o.cors); | 389 checkUnnamed960(o.cors); |
| 370 checkUnnamed3207(o.defaultObjectAcl); | 390 checkUnnamed961(o.defaultObjectAcl); |
| 391 checkBucketEncryption(o.encryption); |
| 371 unittest.expect(o.etag, unittest.equals('foo')); | 392 unittest.expect(o.etag, unittest.equals('foo')); |
| 372 unittest.expect(o.id, unittest.equals('foo')); | 393 unittest.expect(o.id, unittest.equals('foo')); |
| 373 unittest.expect(o.kind, unittest.equals('foo')); | 394 unittest.expect(o.kind, unittest.equals('foo')); |
| 374 checkBucketLifecycle(o.lifecycle); | 395 checkBucketLifecycle(o.lifecycle); |
| 375 unittest.expect(o.location, unittest.equals('foo')); | 396 unittest.expect(o.location, unittest.equals('foo')); |
| 376 checkBucketLogging(o.logging); | 397 checkBucketLogging(o.logging); |
| 377 unittest.expect(o.metageneration, unittest.equals('foo')); | 398 unittest.expect(o.metageneration, unittest.equals('foo')); |
| 378 unittest.expect(o.name, unittest.equals('foo')); | 399 unittest.expect(o.name, unittest.equals('foo')); |
| 379 checkBucketOwner(o.owner); | 400 checkBucketOwner(o.owner); |
| 380 unittest.expect(o.projectNumber, unittest.equals('foo')); | 401 unittest.expect(o.projectNumber, unittest.equals('foo')); |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 441 unittest.expect(o.etag, unittest.equals('foo')); | 462 unittest.expect(o.etag, unittest.equals('foo')); |
| 442 unittest.expect(o.id, unittest.equals('foo')); | 463 unittest.expect(o.id, unittest.equals('foo')); |
| 443 unittest.expect(o.kind, unittest.equals('foo')); | 464 unittest.expect(o.kind, unittest.equals('foo')); |
| 444 checkBucketAccessControlProjectTeam(o.projectTeam); | 465 checkBucketAccessControlProjectTeam(o.projectTeam); |
| 445 unittest.expect(o.role, unittest.equals('foo')); | 466 unittest.expect(o.role, unittest.equals('foo')); |
| 446 unittest.expect(o.selfLink, unittest.equals('foo')); | 467 unittest.expect(o.selfLink, unittest.equals('foo')); |
| 447 } | 468 } |
| 448 buildCounterBucketAccessControl--; | 469 buildCounterBucketAccessControl--; |
| 449 } | 470 } |
| 450 | 471 |
| 451 buildUnnamed3209() { | 472 buildUnnamed963() { |
| 452 var o = new core.List<api.BucketAccessControl>(); | 473 var o = new core.List<api.BucketAccessControl>(); |
| 453 o.add(buildBucketAccessControl()); | 474 o.add(buildBucketAccessControl()); |
| 454 o.add(buildBucketAccessControl()); | 475 o.add(buildBucketAccessControl()); |
| 455 return o; | 476 return o; |
| 456 } | 477 } |
| 457 | 478 |
| 458 checkUnnamed3209(core.List<api.BucketAccessControl> o) { | 479 checkUnnamed963(core.List<api.BucketAccessControl> o) { |
| 459 unittest.expect(o, unittest.hasLength(2)); | 480 unittest.expect(o, unittest.hasLength(2)); |
| 460 checkBucketAccessControl(o[0]); | 481 checkBucketAccessControl(o[0]); |
| 461 checkBucketAccessControl(o[1]); | 482 checkBucketAccessControl(o[1]); |
| 462 } | 483 } |
| 463 | 484 |
| 464 core.int buildCounterBucketAccessControls = 0; | 485 core.int buildCounterBucketAccessControls = 0; |
| 465 buildBucketAccessControls() { | 486 buildBucketAccessControls() { |
| 466 var o = new api.BucketAccessControls(); | 487 var o = new api.BucketAccessControls(); |
| 467 buildCounterBucketAccessControls++; | 488 buildCounterBucketAccessControls++; |
| 468 if (buildCounterBucketAccessControls < 3) { | 489 if (buildCounterBucketAccessControls < 3) { |
| 469 o.items = buildUnnamed3209(); | 490 o.items = buildUnnamed963(); |
| 470 o.kind = "foo"; | 491 o.kind = "foo"; |
| 471 } | 492 } |
| 472 buildCounterBucketAccessControls--; | 493 buildCounterBucketAccessControls--; |
| 473 return o; | 494 return o; |
| 474 } | 495 } |
| 475 | 496 |
| 476 checkBucketAccessControls(api.BucketAccessControls o) { | 497 checkBucketAccessControls(api.BucketAccessControls o) { |
| 477 buildCounterBucketAccessControls++; | 498 buildCounterBucketAccessControls++; |
| 478 if (buildCounterBucketAccessControls < 3) { | 499 if (buildCounterBucketAccessControls < 3) { |
| 479 checkUnnamed3209(o.items); | 500 checkUnnamed963(o.items); |
| 480 unittest.expect(o.kind, unittest.equals('foo')); | 501 unittest.expect(o.kind, unittest.equals('foo')); |
| 481 } | 502 } |
| 482 buildCounterBucketAccessControls--; | 503 buildCounterBucketAccessControls--; |
| 483 } | 504 } |
| 484 | 505 |
| 485 buildUnnamed3210() { | 506 buildUnnamed964() { |
| 486 var o = new core.List<api.Bucket>(); | 507 var o = new core.List<api.Bucket>(); |
| 487 o.add(buildBucket()); | 508 o.add(buildBucket()); |
| 488 o.add(buildBucket()); | 509 o.add(buildBucket()); |
| 489 return o; | 510 return o; |
| 490 } | 511 } |
| 491 | 512 |
| 492 checkUnnamed3210(core.List<api.Bucket> o) { | 513 checkUnnamed964(core.List<api.Bucket> o) { |
| 493 unittest.expect(o, unittest.hasLength(2)); | 514 unittest.expect(o, unittest.hasLength(2)); |
| 494 checkBucket(o[0]); | 515 checkBucket(o[0]); |
| 495 checkBucket(o[1]); | 516 checkBucket(o[1]); |
| 496 } | 517 } |
| 497 | 518 |
| 498 core.int buildCounterBuckets = 0; | 519 core.int buildCounterBuckets = 0; |
| 499 buildBuckets() { | 520 buildBuckets() { |
| 500 var o = new api.Buckets(); | 521 var o = new api.Buckets(); |
| 501 buildCounterBuckets++; | 522 buildCounterBuckets++; |
| 502 if (buildCounterBuckets < 3) { | 523 if (buildCounterBuckets < 3) { |
| 503 o.items = buildUnnamed3210(); | 524 o.items = buildUnnamed964(); |
| 504 o.kind = "foo"; | 525 o.kind = "foo"; |
| 505 o.nextPageToken = "foo"; | 526 o.nextPageToken = "foo"; |
| 506 } | 527 } |
| 507 buildCounterBuckets--; | 528 buildCounterBuckets--; |
| 508 return o; | 529 return o; |
| 509 } | 530 } |
| 510 | 531 |
| 511 checkBuckets(api.Buckets o) { | 532 checkBuckets(api.Buckets o) { |
| 512 buildCounterBuckets++; | 533 buildCounterBuckets++; |
| 513 if (buildCounterBuckets < 3) { | 534 if (buildCounterBuckets < 3) { |
| 514 checkUnnamed3210(o.items); | 535 checkUnnamed964(o.items); |
| 515 unittest.expect(o.kind, unittest.equals('foo')); | 536 unittest.expect(o.kind, unittest.equals('foo')); |
| 516 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 537 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 517 } | 538 } |
| 518 buildCounterBuckets--; | 539 buildCounterBuckets--; |
| 519 } | 540 } |
| 520 | 541 |
| 521 buildUnnamed3211() { | 542 buildUnnamed965() { |
| 522 var o = new core.Map<core.String, core.String>(); | 543 var o = new core.Map<core.String, core.String>(); |
| 523 o["x"] = "foo"; | 544 o["x"] = "foo"; |
| 524 o["y"] = "foo"; | 545 o["y"] = "foo"; |
| 525 return o; | 546 return o; |
| 526 } | 547 } |
| 527 | 548 |
| 528 checkUnnamed3211(core.Map<core.String, core.String> o) { | 549 checkUnnamed965(core.Map<core.String, core.String> o) { |
| 529 unittest.expect(o, unittest.hasLength(2)); | 550 unittest.expect(o, unittest.hasLength(2)); |
| 530 unittest.expect(o["x"], unittest.equals('foo')); | 551 unittest.expect(o["x"], unittest.equals('foo')); |
| 531 unittest.expect(o["y"], unittest.equals('foo')); | 552 unittest.expect(o["y"], unittest.equals('foo')); |
| 532 } | 553 } |
| 533 | 554 |
| 534 core.int buildCounterChannel = 0; | 555 core.int buildCounterChannel = 0; |
| 535 buildChannel() { | 556 buildChannel() { |
| 536 var o = new api.Channel(); | 557 var o = new api.Channel(); |
| 537 buildCounterChannel++; | 558 buildCounterChannel++; |
| 538 if (buildCounterChannel < 3) { | 559 if (buildCounterChannel < 3) { |
| 539 o.address = "foo"; | 560 o.address = "foo"; |
| 540 o.expiration = "foo"; | 561 o.expiration = "foo"; |
| 541 o.id = "foo"; | 562 o.id = "foo"; |
| 542 o.kind = "foo"; | 563 o.kind = "foo"; |
| 543 o.params = buildUnnamed3211(); | 564 o.params = buildUnnamed965(); |
| 544 o.payload = true; | 565 o.payload = true; |
| 545 o.resourceId = "foo"; | 566 o.resourceId = "foo"; |
| 546 o.resourceUri = "foo"; | 567 o.resourceUri = "foo"; |
| 547 o.token = "foo"; | 568 o.token = "foo"; |
| 548 o.type = "foo"; | 569 o.type = "foo"; |
| 549 } | 570 } |
| 550 buildCounterChannel--; | 571 buildCounterChannel--; |
| 551 return o; | 572 return o; |
| 552 } | 573 } |
| 553 | 574 |
| 554 checkChannel(api.Channel o) { | 575 checkChannel(api.Channel o) { |
| 555 buildCounterChannel++; | 576 buildCounterChannel++; |
| 556 if (buildCounterChannel < 3) { | 577 if (buildCounterChannel < 3) { |
| 557 unittest.expect(o.address, unittest.equals('foo')); | 578 unittest.expect(o.address, unittest.equals('foo')); |
| 558 unittest.expect(o.expiration, unittest.equals('foo')); | 579 unittest.expect(o.expiration, unittest.equals('foo')); |
| 559 unittest.expect(o.id, unittest.equals('foo')); | 580 unittest.expect(o.id, unittest.equals('foo')); |
| 560 unittest.expect(o.kind, unittest.equals('foo')); | 581 unittest.expect(o.kind, unittest.equals('foo')); |
| 561 checkUnnamed3211(o.params); | 582 checkUnnamed965(o.params); |
| 562 unittest.expect(o.payload, unittest.isTrue); | 583 unittest.expect(o.payload, unittest.isTrue); |
| 563 unittest.expect(o.resourceId, unittest.equals('foo')); | 584 unittest.expect(o.resourceId, unittest.equals('foo')); |
| 564 unittest.expect(o.resourceUri, unittest.equals('foo')); | 585 unittest.expect(o.resourceUri, unittest.equals('foo')); |
| 565 unittest.expect(o.token, unittest.equals('foo')); | 586 unittest.expect(o.token, unittest.equals('foo')); |
| 566 unittest.expect(o.type, unittest.equals('foo')); | 587 unittest.expect(o.type, unittest.equals('foo')); |
| 567 } | 588 } |
| 568 buildCounterChannel--; | 589 buildCounterChannel--; |
| 569 } | 590 } |
| 570 | 591 |
| 571 core.int buildCounterComposeRequestSourceObjectsObjectPreconditions = 0; | 592 core.int buildCounterComposeRequestSourceObjectsObjectPreconditions = 0; |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 603 checkComposeRequestSourceObjects(api.ComposeRequestSourceObjects o) { | 624 checkComposeRequestSourceObjects(api.ComposeRequestSourceObjects o) { |
| 604 buildCounterComposeRequestSourceObjects++; | 625 buildCounterComposeRequestSourceObjects++; |
| 605 if (buildCounterComposeRequestSourceObjects < 3) { | 626 if (buildCounterComposeRequestSourceObjects < 3) { |
| 606 unittest.expect(o.generation, unittest.equals('foo')); | 627 unittest.expect(o.generation, unittest.equals('foo')); |
| 607 unittest.expect(o.name, unittest.equals('foo')); | 628 unittest.expect(o.name, unittest.equals('foo')); |
| 608 checkComposeRequestSourceObjectsObjectPreconditions(o.objectPreconditions); | 629 checkComposeRequestSourceObjectsObjectPreconditions(o.objectPreconditions); |
| 609 } | 630 } |
| 610 buildCounterComposeRequestSourceObjects--; | 631 buildCounterComposeRequestSourceObjects--; |
| 611 } | 632 } |
| 612 | 633 |
| 613 buildUnnamed3212() { | 634 buildUnnamed966() { |
| 614 var o = new core.List<api.ComposeRequestSourceObjects>(); | 635 var o = new core.List<api.ComposeRequestSourceObjects>(); |
| 615 o.add(buildComposeRequestSourceObjects()); | 636 o.add(buildComposeRequestSourceObjects()); |
| 616 o.add(buildComposeRequestSourceObjects()); | 637 o.add(buildComposeRequestSourceObjects()); |
| 617 return o; | 638 return o; |
| 618 } | 639 } |
| 619 | 640 |
| 620 checkUnnamed3212(core.List<api.ComposeRequestSourceObjects> o) { | 641 checkUnnamed966(core.List<api.ComposeRequestSourceObjects> o) { |
| 621 unittest.expect(o, unittest.hasLength(2)); | 642 unittest.expect(o, unittest.hasLength(2)); |
| 622 checkComposeRequestSourceObjects(o[0]); | 643 checkComposeRequestSourceObjects(o[0]); |
| 623 checkComposeRequestSourceObjects(o[1]); | 644 checkComposeRequestSourceObjects(o[1]); |
| 624 } | 645 } |
| 625 | 646 |
| 626 core.int buildCounterComposeRequest = 0; | 647 core.int buildCounterComposeRequest = 0; |
| 627 buildComposeRequest() { | 648 buildComposeRequest() { |
| 628 var o = new api.ComposeRequest(); | 649 var o = new api.ComposeRequest(); |
| 629 buildCounterComposeRequest++; | 650 buildCounterComposeRequest++; |
| 630 if (buildCounterComposeRequest < 3) { | 651 if (buildCounterComposeRequest < 3) { |
| 631 o.destination = buildObject(); | 652 o.destination = buildObject(); |
| 632 o.kind = "foo"; | 653 o.kind = "foo"; |
| 633 o.sourceObjects = buildUnnamed3212(); | 654 o.sourceObjects = buildUnnamed966(); |
| 634 } | 655 } |
| 635 buildCounterComposeRequest--; | 656 buildCounterComposeRequest--; |
| 636 return o; | 657 return o; |
| 637 } | 658 } |
| 638 | 659 |
| 639 checkComposeRequest(api.ComposeRequest o) { | 660 checkComposeRequest(api.ComposeRequest o) { |
| 640 buildCounterComposeRequest++; | 661 buildCounterComposeRequest++; |
| 641 if (buildCounterComposeRequest < 3) { | 662 if (buildCounterComposeRequest < 3) { |
| 642 checkObject(o.destination); | 663 checkObject(o.destination); |
| 643 unittest.expect(o.kind, unittest.equals('foo')); | 664 unittest.expect(o.kind, unittest.equals('foo')); |
| 644 checkUnnamed3212(o.sourceObjects); | 665 checkUnnamed966(o.sourceObjects); |
| 645 } | 666 } |
| 646 buildCounterComposeRequest--; | 667 buildCounterComposeRequest--; |
| 647 } | 668 } |
| 648 | 669 |
| 649 buildUnnamed3213() { | 670 buildUnnamed967() { |
| 650 var o = new core.List<api.ObjectAccessControl>(); | 671 var o = new core.List<api.ObjectAccessControl>(); |
| 651 o.add(buildObjectAccessControl()); | 672 o.add(buildObjectAccessControl()); |
| 652 o.add(buildObjectAccessControl()); | 673 o.add(buildObjectAccessControl()); |
| 653 return o; | 674 return o; |
| 654 } | 675 } |
| 655 | 676 |
| 656 checkUnnamed3213(core.List<api.ObjectAccessControl> o) { | 677 checkUnnamed967(core.List<api.ObjectAccessControl> o) { |
| 657 unittest.expect(o, unittest.hasLength(2)); | 678 unittest.expect(o, unittest.hasLength(2)); |
| 658 checkObjectAccessControl(o[0]); | 679 checkObjectAccessControl(o[0]); |
| 659 checkObjectAccessControl(o[1]); | 680 checkObjectAccessControl(o[1]); |
| 660 } | 681 } |
| 661 | 682 |
| 662 core.int buildCounterObjectCustomerEncryption = 0; | 683 core.int buildCounterObjectCustomerEncryption = 0; |
| 663 buildObjectCustomerEncryption() { | 684 buildObjectCustomerEncryption() { |
| 664 var o = new api.ObjectCustomerEncryption(); | 685 var o = new api.ObjectCustomerEncryption(); |
| 665 buildCounterObjectCustomerEncryption++; | 686 buildCounterObjectCustomerEncryption++; |
| 666 if (buildCounterObjectCustomerEncryption < 3) { | 687 if (buildCounterObjectCustomerEncryption < 3) { |
| 667 o.encryptionAlgorithm = "foo"; | 688 o.encryptionAlgorithm = "foo"; |
| 668 o.keySha256 = "foo"; | 689 o.keySha256 = "foo"; |
| 669 } | 690 } |
| 670 buildCounterObjectCustomerEncryption--; | 691 buildCounterObjectCustomerEncryption--; |
| 671 return o; | 692 return o; |
| 672 } | 693 } |
| 673 | 694 |
| 674 checkObjectCustomerEncryption(api.ObjectCustomerEncryption o) { | 695 checkObjectCustomerEncryption(api.ObjectCustomerEncryption o) { |
| 675 buildCounterObjectCustomerEncryption++; | 696 buildCounterObjectCustomerEncryption++; |
| 676 if (buildCounterObjectCustomerEncryption < 3) { | 697 if (buildCounterObjectCustomerEncryption < 3) { |
| 677 unittest.expect(o.encryptionAlgorithm, unittest.equals('foo')); | 698 unittest.expect(o.encryptionAlgorithm, unittest.equals('foo')); |
| 678 unittest.expect(o.keySha256, unittest.equals('foo')); | 699 unittest.expect(o.keySha256, unittest.equals('foo')); |
| 679 } | 700 } |
| 680 buildCounterObjectCustomerEncryption--; | 701 buildCounterObjectCustomerEncryption--; |
| 681 } | 702 } |
| 682 | 703 |
| 683 buildUnnamed3214() { | 704 buildUnnamed968() { |
| 684 var o = new core.Map<core.String, core.String>(); | 705 var o = new core.Map<core.String, core.String>(); |
| 685 o["x"] = "foo"; | 706 o["x"] = "foo"; |
| 686 o["y"] = "foo"; | 707 o["y"] = "foo"; |
| 687 return o; | 708 return o; |
| 688 } | 709 } |
| 689 | 710 |
| 690 checkUnnamed3214(core.Map<core.String, core.String> o) { | 711 checkUnnamed968(core.Map<core.String, core.String> o) { |
| 691 unittest.expect(o, unittest.hasLength(2)); | 712 unittest.expect(o, unittest.hasLength(2)); |
| 692 unittest.expect(o["x"], unittest.equals('foo')); | 713 unittest.expect(o["x"], unittest.equals('foo')); |
| 693 unittest.expect(o["y"], unittest.equals('foo')); | 714 unittest.expect(o["y"], unittest.equals('foo')); |
| 694 } | 715 } |
| 695 | 716 |
| 696 core.int buildCounterObjectOwner = 0; | 717 core.int buildCounterObjectOwner = 0; |
| 697 buildObjectOwner() { | 718 buildObjectOwner() { |
| 698 var o = new api.ObjectOwner(); | 719 var o = new api.ObjectOwner(); |
| 699 buildCounterObjectOwner++; | 720 buildCounterObjectOwner++; |
| 700 if (buildCounterObjectOwner < 3) { | 721 if (buildCounterObjectOwner < 3) { |
| (...skipping 11 matching lines...) Expand all Loading... |
| 712 unittest.expect(o.entityId, unittest.equals('foo')); | 733 unittest.expect(o.entityId, unittest.equals('foo')); |
| 713 } | 734 } |
| 714 buildCounterObjectOwner--; | 735 buildCounterObjectOwner--; |
| 715 } | 736 } |
| 716 | 737 |
| 717 core.int buildCounterObject = 0; | 738 core.int buildCounterObject = 0; |
| 718 buildObject() { | 739 buildObject() { |
| 719 var o = new api.Object(); | 740 var o = new api.Object(); |
| 720 buildCounterObject++; | 741 buildCounterObject++; |
| 721 if (buildCounterObject < 3) { | 742 if (buildCounterObject < 3) { |
| 722 o.acl = buildUnnamed3213(); | 743 o.acl = buildUnnamed967(); |
| 723 o.bucket = "foo"; | 744 o.bucket = "foo"; |
| 724 o.cacheControl = "foo"; | 745 o.cacheControl = "foo"; |
| 725 o.componentCount = 42; | 746 o.componentCount = 42; |
| 726 o.contentDisposition = "foo"; | 747 o.contentDisposition = "foo"; |
| 727 o.contentEncoding = "foo"; | 748 o.contentEncoding = "foo"; |
| 728 o.contentLanguage = "foo"; | 749 o.contentLanguage = "foo"; |
| 729 o.contentType = "foo"; | 750 o.contentType = "foo"; |
| 730 o.crc32c = "foo"; | 751 o.crc32c = "foo"; |
| 731 o.customerEncryption = buildObjectCustomerEncryption(); | 752 o.customerEncryption = buildObjectCustomerEncryption(); |
| 732 o.etag = "foo"; | 753 o.etag = "foo"; |
| 733 o.generation = "foo"; | 754 o.generation = "foo"; |
| 734 o.id = "foo"; | 755 o.id = "foo"; |
| 735 o.kind = "foo"; | 756 o.kind = "foo"; |
| 757 o.kmsKeyName = "foo"; |
| 736 o.md5Hash = "foo"; | 758 o.md5Hash = "foo"; |
| 737 o.mediaLink = "foo"; | 759 o.mediaLink = "foo"; |
| 738 o.metadata = buildUnnamed3214(); | 760 o.metadata = buildUnnamed968(); |
| 739 o.metageneration = "foo"; | 761 o.metageneration = "foo"; |
| 740 o.name = "foo"; | 762 o.name = "foo"; |
| 741 o.owner = buildObjectOwner(); | 763 o.owner = buildObjectOwner(); |
| 742 o.selfLink = "foo"; | 764 o.selfLink = "foo"; |
| 743 o.size = "foo"; | 765 o.size = "foo"; |
| 744 o.storageClass = "foo"; | 766 o.storageClass = "foo"; |
| 745 o.timeCreated = core.DateTime.parse("2002-02-27T14:01:02"); | 767 o.timeCreated = core.DateTime.parse("2002-02-27T14:01:02"); |
| 746 o.timeDeleted = core.DateTime.parse("2002-02-27T14:01:02"); | 768 o.timeDeleted = core.DateTime.parse("2002-02-27T14:01:02"); |
| 747 o.updated = core.DateTime.parse("2002-02-27T14:01:02"); | 769 o.updated = core.DateTime.parse("2002-02-27T14:01:02"); |
| 748 } | 770 } |
| 749 buildCounterObject--; | 771 buildCounterObject--; |
| 750 return o; | 772 return o; |
| 751 } | 773 } |
| 752 | 774 |
| 753 checkObject(api.Object o) { | 775 checkObject(api.Object o) { |
| 754 buildCounterObject++; | 776 buildCounterObject++; |
| 755 if (buildCounterObject < 3) { | 777 if (buildCounterObject < 3) { |
| 756 checkUnnamed3213(o.acl); | 778 checkUnnamed967(o.acl); |
| 757 unittest.expect(o.bucket, unittest.equals('foo')); | 779 unittest.expect(o.bucket, unittest.equals('foo')); |
| 758 unittest.expect(o.cacheControl, unittest.equals('foo')); | 780 unittest.expect(o.cacheControl, unittest.equals('foo')); |
| 759 unittest.expect(o.componentCount, unittest.equals(42)); | 781 unittest.expect(o.componentCount, unittest.equals(42)); |
| 760 unittest.expect(o.contentDisposition, unittest.equals('foo')); | 782 unittest.expect(o.contentDisposition, unittest.equals('foo')); |
| 761 unittest.expect(o.contentEncoding, unittest.equals('foo')); | 783 unittest.expect(o.contentEncoding, unittest.equals('foo')); |
| 762 unittest.expect(o.contentLanguage, unittest.equals('foo')); | 784 unittest.expect(o.contentLanguage, unittest.equals('foo')); |
| 763 unittest.expect(o.contentType, unittest.equals('foo')); | 785 unittest.expect(o.contentType, unittest.equals('foo')); |
| 764 unittest.expect(o.crc32c, unittest.equals('foo')); | 786 unittest.expect(o.crc32c, unittest.equals('foo')); |
| 765 checkObjectCustomerEncryption(o.customerEncryption); | 787 checkObjectCustomerEncryption(o.customerEncryption); |
| 766 unittest.expect(o.etag, unittest.equals('foo')); | 788 unittest.expect(o.etag, unittest.equals('foo')); |
| 767 unittest.expect(o.generation, unittest.equals('foo')); | 789 unittest.expect(o.generation, unittest.equals('foo')); |
| 768 unittest.expect(o.id, unittest.equals('foo')); | 790 unittest.expect(o.id, unittest.equals('foo')); |
| 769 unittest.expect(o.kind, unittest.equals('foo')); | 791 unittest.expect(o.kind, unittest.equals('foo')); |
| 792 unittest.expect(o.kmsKeyName, unittest.equals('foo')); |
| 770 unittest.expect(o.md5Hash, unittest.equals('foo')); | 793 unittest.expect(o.md5Hash, unittest.equals('foo')); |
| 771 unittest.expect(o.mediaLink, unittest.equals('foo')); | 794 unittest.expect(o.mediaLink, unittest.equals('foo')); |
| 772 checkUnnamed3214(o.metadata); | 795 checkUnnamed968(o.metadata); |
| 773 unittest.expect(o.metageneration, unittest.equals('foo')); | 796 unittest.expect(o.metageneration, unittest.equals('foo')); |
| 774 unittest.expect(o.name, unittest.equals('foo')); | 797 unittest.expect(o.name, unittest.equals('foo')); |
| 775 checkObjectOwner(o.owner); | 798 checkObjectOwner(o.owner); |
| 776 unittest.expect(o.selfLink, unittest.equals('foo')); | 799 unittest.expect(o.selfLink, unittest.equals('foo')); |
| 777 unittest.expect(o.size, unittest.equals('foo')); | 800 unittest.expect(o.size, unittest.equals('foo')); |
| 778 unittest.expect(o.storageClass, unittest.equals('foo')); | 801 unittest.expect(o.storageClass, unittest.equals('foo')); |
| 779 unittest.expect(o.timeCreated, unittest.equals(core.DateTime.parse("2002-02-
27T14:01:02"))); | 802 unittest.expect(o.timeCreated, unittest.equals(core.DateTime.parse("2002-02-
27T14:01:02"))); |
| 780 unittest.expect(o.timeDeleted, unittest.equals(core.DateTime.parse("2002-02-
27T14:01:02"))); | 803 unittest.expect(o.timeDeleted, unittest.equals(core.DateTime.parse("2002-02-
27T14:01:02"))); |
| 781 unittest.expect(o.updated, unittest.equals(core.DateTime.parse("2002-02-27T1
4:01:02"))); | 804 unittest.expect(o.updated, unittest.equals(core.DateTime.parse("2002-02-27T1
4:01:02"))); |
| 782 } | 805 } |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 840 unittest.expect(o.id, unittest.equals('foo')); | 863 unittest.expect(o.id, unittest.equals('foo')); |
| 841 unittest.expect(o.kind, unittest.equals('foo')); | 864 unittest.expect(o.kind, unittest.equals('foo')); |
| 842 unittest.expect(o.object, unittest.equals('foo')); | 865 unittest.expect(o.object, unittest.equals('foo')); |
| 843 checkObjectAccessControlProjectTeam(o.projectTeam); | 866 checkObjectAccessControlProjectTeam(o.projectTeam); |
| 844 unittest.expect(o.role, unittest.equals('foo')); | 867 unittest.expect(o.role, unittest.equals('foo')); |
| 845 unittest.expect(o.selfLink, unittest.equals('foo')); | 868 unittest.expect(o.selfLink, unittest.equals('foo')); |
| 846 } | 869 } |
| 847 buildCounterObjectAccessControl--; | 870 buildCounterObjectAccessControl--; |
| 848 } | 871 } |
| 849 | 872 |
| 850 buildUnnamed3215() { | 873 buildUnnamed969() { |
| 851 var o = new core.List<core.Object>(); | 874 var o = new core.List<core.Object>(); |
| 852 o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}); | 875 o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}); |
| 853 o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}); | 876 o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}); |
| 854 return o; | 877 return o; |
| 855 } | 878 } |
| 856 | 879 |
| 857 checkUnnamed3215(core.List<core.Object> o) { | 880 checkUnnamed969(core.List<core.Object> o) { |
| 858 unittest.expect(o, unittest.hasLength(2)); | 881 unittest.expect(o, unittest.hasLength(2)); |
| 859 var casted1 = (o[0]) as core.Map; unittest.expect(casted1, unittest.hasLength(
3)); unittest.expect(casted1["list"], unittest.equals([1, 2, 3])); unittest.expe
ct(casted1["bool"], unittest.equals(true)); unittest.expect(casted1["string"], u
nittest.equals('foo')); | 882 var casted1 = (o[0]) as core.Map; unittest.expect(casted1, unittest.hasLength(
3)); unittest.expect(casted1["list"], unittest.equals([1, 2, 3])); unittest.expe
ct(casted1["bool"], unittest.equals(true)); unittest.expect(casted1["string"], u
nittest.equals('foo')); |
| 860 var casted2 = (o[1]) as core.Map; unittest.expect(casted2, unittest.hasLength(
3)); unittest.expect(casted2["list"], unittest.equals([1, 2, 3])); unittest.expe
ct(casted2["bool"], unittest.equals(true)); unittest.expect(casted2["string"], u
nittest.equals('foo')); | 883 var casted2 = (o[1]) as core.Map; unittest.expect(casted2, unittest.hasLength(
3)); unittest.expect(casted2["list"], unittest.equals([1, 2, 3])); unittest.expe
ct(casted2["bool"], unittest.equals(true)); unittest.expect(casted2["string"], u
nittest.equals('foo')); |
| 861 } | 884 } |
| 862 | 885 |
| 863 core.int buildCounterObjectAccessControls = 0; | 886 core.int buildCounterObjectAccessControls = 0; |
| 864 buildObjectAccessControls() { | 887 buildObjectAccessControls() { |
| 865 var o = new api.ObjectAccessControls(); | 888 var o = new api.ObjectAccessControls(); |
| 866 buildCounterObjectAccessControls++; | 889 buildCounterObjectAccessControls++; |
| 867 if (buildCounterObjectAccessControls < 3) { | 890 if (buildCounterObjectAccessControls < 3) { |
| 868 o.items = buildUnnamed3215(); | 891 o.items = buildUnnamed969(); |
| 869 o.kind = "foo"; | 892 o.kind = "foo"; |
| 870 } | 893 } |
| 871 buildCounterObjectAccessControls--; | 894 buildCounterObjectAccessControls--; |
| 872 return o; | 895 return o; |
| 873 } | 896 } |
| 874 | 897 |
| 875 checkObjectAccessControls(api.ObjectAccessControls o) { | 898 checkObjectAccessControls(api.ObjectAccessControls o) { |
| 876 buildCounterObjectAccessControls++; | 899 buildCounterObjectAccessControls++; |
| 877 if (buildCounterObjectAccessControls < 3) { | 900 if (buildCounterObjectAccessControls < 3) { |
| 878 checkUnnamed3215(o.items); | 901 checkUnnamed969(o.items); |
| 879 unittest.expect(o.kind, unittest.equals('foo')); | 902 unittest.expect(o.kind, unittest.equals('foo')); |
| 880 } | 903 } |
| 881 buildCounterObjectAccessControls--; | 904 buildCounterObjectAccessControls--; |
| 882 } | 905 } |
| 883 | 906 |
| 884 buildUnnamed3216() { | 907 buildUnnamed970() { |
| 885 var o = new core.List<api.Object>(); | 908 var o = new core.List<api.Object>(); |
| 886 o.add(buildObject()); | 909 o.add(buildObject()); |
| 887 o.add(buildObject()); | 910 o.add(buildObject()); |
| 888 return o; | 911 return o; |
| 889 } | 912 } |
| 890 | 913 |
| 891 checkUnnamed3216(core.List<api.Object> o) { | 914 checkUnnamed970(core.List<api.Object> o) { |
| 892 unittest.expect(o, unittest.hasLength(2)); | 915 unittest.expect(o, unittest.hasLength(2)); |
| 893 checkObject(o[0]); | 916 checkObject(o[0]); |
| 894 checkObject(o[1]); | 917 checkObject(o[1]); |
| 895 } | 918 } |
| 896 | 919 |
| 897 buildUnnamed3217() { | 920 buildUnnamed971() { |
| 898 var o = new core.List<core.String>(); | 921 var o = new core.List<core.String>(); |
| 899 o.add("foo"); | 922 o.add("foo"); |
| 900 o.add("foo"); | 923 o.add("foo"); |
| 901 return o; | 924 return o; |
| 902 } | 925 } |
| 903 | 926 |
| 904 checkUnnamed3217(core.List<core.String> o) { | 927 checkUnnamed971(core.List<core.String> o) { |
| 905 unittest.expect(o, unittest.hasLength(2)); | 928 unittest.expect(o, unittest.hasLength(2)); |
| 906 unittest.expect(o[0], unittest.equals('foo')); | 929 unittest.expect(o[0], unittest.equals('foo')); |
| 907 unittest.expect(o[1], unittest.equals('foo')); | 930 unittest.expect(o[1], unittest.equals('foo')); |
| 908 } | 931 } |
| 909 | 932 |
| 910 core.int buildCounterObjects = 0; | 933 core.int buildCounterObjects = 0; |
| 911 buildObjects() { | 934 buildObjects() { |
| 912 var o = new api.Objects(); | 935 var o = new api.Objects(); |
| 913 buildCounterObjects++; | 936 buildCounterObjects++; |
| 914 if (buildCounterObjects < 3) { | 937 if (buildCounterObjects < 3) { |
| 915 o.items = buildUnnamed3216(); | 938 o.items = buildUnnamed970(); |
| 916 o.kind = "foo"; | 939 o.kind = "foo"; |
| 917 o.nextPageToken = "foo"; | 940 o.nextPageToken = "foo"; |
| 918 o.prefixes = buildUnnamed3217(); | 941 o.prefixes = buildUnnamed971(); |
| 919 } | 942 } |
| 920 buildCounterObjects--; | 943 buildCounterObjects--; |
| 921 return o; | 944 return o; |
| 922 } | 945 } |
| 923 | 946 |
| 924 checkObjects(api.Objects o) { | 947 checkObjects(api.Objects o) { |
| 925 buildCounterObjects++; | 948 buildCounterObjects++; |
| 926 if (buildCounterObjects < 3) { | 949 if (buildCounterObjects < 3) { |
| 927 checkUnnamed3216(o.items); | 950 checkUnnamed970(o.items); |
| 928 unittest.expect(o.kind, unittest.equals('foo')); | 951 unittest.expect(o.kind, unittest.equals('foo')); |
| 929 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 952 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 930 checkUnnamed3217(o.prefixes); | 953 checkUnnamed971(o.prefixes); |
| 931 } | 954 } |
| 932 buildCounterObjects--; | 955 buildCounterObjects--; |
| 933 } | 956 } |
| 934 | 957 |
| 935 core.int buildCounterRewriteResponse = 0; | 958 core.int buildCounterRewriteResponse = 0; |
| 936 buildRewriteResponse() { | 959 buildRewriteResponse() { |
| 937 var o = new api.RewriteResponse(); | 960 var o = new api.RewriteResponse(); |
| 938 buildCounterRewriteResponse++; | 961 buildCounterRewriteResponse++; |
| 939 if (buildCounterRewriteResponse < 3) { | 962 if (buildCounterRewriteResponse < 3) { |
| 940 o.done = true; | 963 o.done = true; |
| (...skipping 24 matching lines...) Expand all Loading... |
| 965 main() { | 988 main() { |
| 966 unittest.group("obj-schema-BucketCors", () { | 989 unittest.group("obj-schema-BucketCors", () { |
| 967 unittest.test("to-json--from-json", () { | 990 unittest.test("to-json--from-json", () { |
| 968 var o = buildBucketCors(); | 991 var o = buildBucketCors(); |
| 969 var od = new api.BucketCors.fromJson(o.toJson()); | 992 var od = new api.BucketCors.fromJson(o.toJson()); |
| 970 checkBucketCors(od); | 993 checkBucketCors(od); |
| 971 }); | 994 }); |
| 972 }); | 995 }); |
| 973 | 996 |
| 974 | 997 |
| 998 unittest.group("obj-schema-BucketEncryption", () { |
| 999 unittest.test("to-json--from-json", () { |
| 1000 var o = buildBucketEncryption(); |
| 1001 var od = new api.BucketEncryption.fromJson(o.toJson()); |
| 1002 checkBucketEncryption(od); |
| 1003 }); |
| 1004 }); |
| 1005 |
| 1006 |
| 975 unittest.group("obj-schema-BucketLifecycleRuleAction", () { | 1007 unittest.group("obj-schema-BucketLifecycleRuleAction", () { |
| 976 unittest.test("to-json--from-json", () { | 1008 unittest.test("to-json--from-json", () { |
| 977 var o = buildBucketLifecycleRuleAction(); | 1009 var o = buildBucketLifecycleRuleAction(); |
| 978 var od = new api.BucketLifecycleRuleAction.fromJson(o.toJson()); | 1010 var od = new api.BucketLifecycleRuleAction.fromJson(o.toJson()); |
| 979 checkBucketLifecycleRuleAction(od); | 1011 checkBucketLifecycleRuleAction(od); |
| 980 }); | 1012 }); |
| 981 }); | 1013 }); |
| 982 | 1014 |
| 983 | 1015 |
| 984 unittest.group("obj-schema-BucketLifecycleRuleCondition", () { | 1016 unittest.group("obj-schema-BucketLifecycleRuleCondition", () { |
| (...skipping 1725 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2710 // TODO: Implement tests for media download; | 2742 // TODO: Implement tests for media download; |
| 2711 | 2743 |
| 2712 var mock = new HttpServerMock(); | 2744 var mock = new HttpServerMock(); |
| 2713 api.ObjectsResourceApi res = new api.StorageApi(mock).objects; | 2745 api.ObjectsResourceApi res = new api.StorageApi(mock).objects; |
| 2714 var arg_request = buildComposeRequest(); | 2746 var arg_request = buildComposeRequest(); |
| 2715 var arg_destinationBucket = "foo"; | 2747 var arg_destinationBucket = "foo"; |
| 2716 var arg_destinationObject = "foo"; | 2748 var arg_destinationObject = "foo"; |
| 2717 var arg_destinationPredefinedAcl = "foo"; | 2749 var arg_destinationPredefinedAcl = "foo"; |
| 2718 var arg_ifGenerationMatch = "foo"; | 2750 var arg_ifGenerationMatch = "foo"; |
| 2719 var arg_ifMetagenerationMatch = "foo"; | 2751 var arg_ifMetagenerationMatch = "foo"; |
| 2752 var arg_kmsKeyName = "foo"; |
| 2720 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2753 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 2721 var obj = new api.ComposeRequest.fromJson(json); | 2754 var obj = new api.ComposeRequest.fromJson(json); |
| 2722 checkComposeRequest(obj); | 2755 checkComposeRequest(obj); |
| 2723 | 2756 |
| 2724 var path = (req.url).path; | 2757 var path = (req.url).path; |
| 2725 var pathOffset = 0; | 2758 var pathOffset = 0; |
| 2726 var index; | 2759 var index; |
| 2727 var subPart; | 2760 var subPart; |
| 2728 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2761 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2729 pathOffset += 1; | 2762 pathOffset += 1; |
| (...skipping 28 matching lines...) Expand all Loading... |
| 2758 } | 2791 } |
| 2759 if (query.length > 0) { | 2792 if (query.length > 0) { |
| 2760 for (var part in query.split("&")) { | 2793 for (var part in query.split("&")) { |
| 2761 var keyvalue = part.split("="); | 2794 var keyvalue = part.split("="); |
| 2762 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2795 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 2763 } | 2796 } |
| 2764 } | 2797 } |
| 2765 unittest.expect(queryMap["destinationPredefinedAcl"].first, unittest.equ
als(arg_destinationPredefinedAcl)); | 2798 unittest.expect(queryMap["destinationPredefinedAcl"].first, unittest.equ
als(arg_destinationPredefinedAcl)); |
| 2766 unittest.expect(queryMap["ifGenerationMatch"].first, unittest.equals(arg
_ifGenerationMatch)); | 2799 unittest.expect(queryMap["ifGenerationMatch"].first, unittest.equals(arg
_ifGenerationMatch)); |
| 2767 unittest.expect(queryMap["ifMetagenerationMatch"].first, unittest.equals
(arg_ifMetagenerationMatch)); | 2800 unittest.expect(queryMap["ifMetagenerationMatch"].first, unittest.equals
(arg_ifMetagenerationMatch)); |
| 2801 unittest.expect(queryMap["kmsKeyName"].first, unittest.equals(arg_kmsKey
Name)); |
| 2768 | 2802 |
| 2769 | 2803 |
| 2770 var h = { | 2804 var h = { |
| 2771 "content-type" : "application/json; charset=utf-8", | 2805 "content-type" : "application/json; charset=utf-8", |
| 2772 }; | 2806 }; |
| 2773 var resp = convert.JSON.encode(buildObject()); | 2807 var resp = convert.JSON.encode(buildObject()); |
| 2774 return new async.Future.value(stringResponse(200, h, resp)); | 2808 return new async.Future.value(stringResponse(200, h, resp)); |
| 2775 }), true); | 2809 }), true); |
| 2776 res.compose(arg_request, arg_destinationBucket, arg_destinationObject, des
tinationPredefinedAcl: arg_destinationPredefinedAcl, ifGenerationMatch: arg_ifGe
nerationMatch, ifMetagenerationMatch: arg_ifMetagenerationMatch).then(unittest.e
xpectAsync(((api.Object response) { | 2810 res.compose(arg_request, arg_destinationBucket, arg_destinationObject, des
tinationPredefinedAcl: arg_destinationPredefinedAcl, ifGenerationMatch: arg_ifGe
nerationMatch, ifMetagenerationMatch: arg_ifMetagenerationMatch, kmsKeyName: arg
_kmsKeyName).then(unittest.expectAsync(((api.Object response) { |
| 2777 checkObject(response); | 2811 checkObject(response); |
| 2778 }))); | 2812 }))); |
| 2779 }); | 2813 }); |
| 2780 | 2814 |
| 2781 unittest.test("method--copy", () { | 2815 unittest.test("method--copy", () { |
| 2782 // TODO: Implement tests for media upload; | 2816 // TODO: Implement tests for media upload; |
| 2783 // TODO: Implement tests for media download; | 2817 // TODO: Implement tests for media download; |
| 2784 | 2818 |
| 2785 var mock = new HttpServerMock(); | 2819 var mock = new HttpServerMock(); |
| 2786 api.ObjectsResourceApi res = new api.StorageApi(mock).objects; | 2820 api.ObjectsResourceApi res = new api.StorageApi(mock).objects; |
| (...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3021 | 3055 |
| 3022 var mock = new HttpServerMock(); | 3056 var mock = new HttpServerMock(); |
| 3023 api.ObjectsResourceApi res = new api.StorageApi(mock).objects; | 3057 api.ObjectsResourceApi res = new api.StorageApi(mock).objects; |
| 3024 var arg_request = buildObject(); | 3058 var arg_request = buildObject(); |
| 3025 var arg_bucket = "foo"; | 3059 var arg_bucket = "foo"; |
| 3026 var arg_contentEncoding = "foo"; | 3060 var arg_contentEncoding = "foo"; |
| 3027 var arg_ifGenerationMatch = "foo"; | 3061 var arg_ifGenerationMatch = "foo"; |
| 3028 var arg_ifGenerationNotMatch = "foo"; | 3062 var arg_ifGenerationNotMatch = "foo"; |
| 3029 var arg_ifMetagenerationMatch = "foo"; | 3063 var arg_ifMetagenerationMatch = "foo"; |
| 3030 var arg_ifMetagenerationNotMatch = "foo"; | 3064 var arg_ifMetagenerationNotMatch = "foo"; |
| 3065 var arg_kmsKeyName = "foo"; |
| 3031 var arg_name = "foo"; | 3066 var arg_name = "foo"; |
| 3032 var arg_predefinedAcl = "foo"; | 3067 var arg_predefinedAcl = "foo"; |
| 3033 var arg_projection = "foo"; | 3068 var arg_projection = "foo"; |
| 3034 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3069 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 3035 var obj = new api.Object.fromJson(json); | 3070 var obj = new api.Object.fromJson(json); |
| 3036 checkObject(obj); | 3071 checkObject(obj); |
| 3037 | 3072 |
| 3038 var path = (req.url).path; | 3073 var path = (req.url).path; |
| 3039 var pathOffset = 0; | 3074 var pathOffset = 0; |
| 3040 var index; | 3075 var index; |
| (...skipping 26 matching lines...) Expand all Loading... |
| 3067 for (var part in query.split("&")) { | 3102 for (var part in query.split("&")) { |
| 3068 var keyvalue = part.split("="); | 3103 var keyvalue = part.split("="); |
| 3069 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 3104 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 3070 } | 3105 } |
| 3071 } | 3106 } |
| 3072 unittest.expect(queryMap["contentEncoding"].first, unittest.equals(arg_c
ontentEncoding)); | 3107 unittest.expect(queryMap["contentEncoding"].first, unittest.equals(arg_c
ontentEncoding)); |
| 3073 unittest.expect(queryMap["ifGenerationMatch"].first, unittest.equals(arg
_ifGenerationMatch)); | 3108 unittest.expect(queryMap["ifGenerationMatch"].first, unittest.equals(arg
_ifGenerationMatch)); |
| 3074 unittest.expect(queryMap["ifGenerationNotMatch"].first, unittest.equals(
arg_ifGenerationNotMatch)); | 3109 unittest.expect(queryMap["ifGenerationNotMatch"].first, unittest.equals(
arg_ifGenerationNotMatch)); |
| 3075 unittest.expect(queryMap["ifMetagenerationMatch"].first, unittest.equals
(arg_ifMetagenerationMatch)); | 3110 unittest.expect(queryMap["ifMetagenerationMatch"].first, unittest.equals
(arg_ifMetagenerationMatch)); |
| 3076 unittest.expect(queryMap["ifMetagenerationNotMatch"].first, unittest.equ
als(arg_ifMetagenerationNotMatch)); | 3111 unittest.expect(queryMap["ifMetagenerationNotMatch"].first, unittest.equ
als(arg_ifMetagenerationNotMatch)); |
| 3112 unittest.expect(queryMap["kmsKeyName"].first, unittest.equals(arg_kmsKey
Name)); |
| 3077 unittest.expect(queryMap["name"].first, unittest.equals(arg_name)); | 3113 unittest.expect(queryMap["name"].first, unittest.equals(arg_name)); |
| 3078 unittest.expect(queryMap["predefinedAcl"].first, unittest.equals(arg_pre
definedAcl)); | 3114 unittest.expect(queryMap["predefinedAcl"].first, unittest.equals(arg_pre
definedAcl)); |
| 3079 unittest.expect(queryMap["projection"].first, unittest.equals(arg_projec
tion)); | 3115 unittest.expect(queryMap["projection"].first, unittest.equals(arg_projec
tion)); |
| 3080 | 3116 |
| 3081 | 3117 |
| 3082 var h = { | 3118 var h = { |
| 3083 "content-type" : "application/json; charset=utf-8", | 3119 "content-type" : "application/json; charset=utf-8", |
| 3084 }; | 3120 }; |
| 3085 var resp = convert.JSON.encode(buildObject()); | 3121 var resp = convert.JSON.encode(buildObject()); |
| 3086 return new async.Future.value(stringResponse(200, h, resp)); | 3122 return new async.Future.value(stringResponse(200, h, resp)); |
| 3087 }), true); | 3123 }), true); |
| 3088 res.insert(arg_request, arg_bucket, contentEncoding: arg_contentEncoding,
ifGenerationMatch: arg_ifGenerationMatch, ifGenerationNotMatch: arg_ifGeneration
NotMatch, ifMetagenerationMatch: arg_ifMetagenerationMatch, ifMetagenerationNotM
atch: arg_ifMetagenerationNotMatch, name: arg_name, predefinedAcl: arg_predefine
dAcl, projection: arg_projection).then(unittest.expectAsync(((api.Object respons
e) { | 3124 res.insert(arg_request, arg_bucket, contentEncoding: arg_contentEncoding,
ifGenerationMatch: arg_ifGenerationMatch, ifGenerationNotMatch: arg_ifGeneration
NotMatch, ifMetagenerationMatch: arg_ifMetagenerationMatch, ifMetagenerationNotM
atch: arg_ifMetagenerationNotMatch, kmsKeyName: arg_kmsKeyName, name: arg_name,
predefinedAcl: arg_predefinedAcl, projection: arg_projection).then(unittest.expe
ctAsync(((api.Object response) { |
| 3089 checkObject(response); | 3125 checkObject(response); |
| 3090 }))); | 3126 }))); |
| 3091 }); | 3127 }); |
| 3092 | 3128 |
| 3093 unittest.test("method--list", () { | 3129 unittest.test("method--list", () { |
| 3094 | 3130 |
| 3095 var mock = new HttpServerMock(); | 3131 var mock = new HttpServerMock(); |
| 3096 api.ObjectsResourceApi res = new api.StorageApi(mock).objects; | 3132 api.ObjectsResourceApi res = new api.StorageApi(mock).objects; |
| 3097 var arg_bucket = "foo"; | 3133 var arg_bucket = "foo"; |
| 3098 var arg_delimiter = "foo"; | 3134 var arg_delimiter = "foo"; |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3232 | 3268 |
| 3233 unittest.test("method--rewrite", () { | 3269 unittest.test("method--rewrite", () { |
| 3234 | 3270 |
| 3235 var mock = new HttpServerMock(); | 3271 var mock = new HttpServerMock(); |
| 3236 api.ObjectsResourceApi res = new api.StorageApi(mock).objects; | 3272 api.ObjectsResourceApi res = new api.StorageApi(mock).objects; |
| 3237 var arg_request = buildObject(); | 3273 var arg_request = buildObject(); |
| 3238 var arg_sourceBucket = "foo"; | 3274 var arg_sourceBucket = "foo"; |
| 3239 var arg_sourceObject = "foo"; | 3275 var arg_sourceObject = "foo"; |
| 3240 var arg_destinationBucket = "foo"; | 3276 var arg_destinationBucket = "foo"; |
| 3241 var arg_destinationObject = "foo"; | 3277 var arg_destinationObject = "foo"; |
| 3278 var arg_destinationKmsKeyName = "foo"; |
| 3242 var arg_destinationPredefinedAcl = "foo"; | 3279 var arg_destinationPredefinedAcl = "foo"; |
| 3243 var arg_ifGenerationMatch = "foo"; | 3280 var arg_ifGenerationMatch = "foo"; |
| 3244 var arg_ifGenerationNotMatch = "foo"; | 3281 var arg_ifGenerationNotMatch = "foo"; |
| 3245 var arg_ifMetagenerationMatch = "foo"; | 3282 var arg_ifMetagenerationMatch = "foo"; |
| 3246 var arg_ifMetagenerationNotMatch = "foo"; | 3283 var arg_ifMetagenerationNotMatch = "foo"; |
| 3247 var arg_ifSourceGenerationMatch = "foo"; | 3284 var arg_ifSourceGenerationMatch = "foo"; |
| 3248 var arg_ifSourceGenerationNotMatch = "foo"; | 3285 var arg_ifSourceGenerationNotMatch = "foo"; |
| 3249 var arg_ifSourceMetagenerationMatch = "foo"; | 3286 var arg_ifSourceMetagenerationMatch = "foo"; |
| 3250 var arg_ifSourceMetagenerationNotMatch = "foo"; | 3287 var arg_ifSourceMetagenerationNotMatch = "foo"; |
| 3251 var arg_maxBytesRewrittenPerCall = "foo"; | 3288 var arg_maxBytesRewrittenPerCall = "foo"; |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3300 if (n == "false") return false; | 3337 if (n == "false") return false; |
| 3301 if (n == null) return null; | 3338 if (n == null) return null; |
| 3302 throw new core.ArgumentError("Invalid boolean: $n"); | 3339 throw new core.ArgumentError("Invalid boolean: $n"); |
| 3303 } | 3340 } |
| 3304 if (query.length > 0) { | 3341 if (query.length > 0) { |
| 3305 for (var part in query.split("&")) { | 3342 for (var part in query.split("&")) { |
| 3306 var keyvalue = part.split("="); | 3343 var keyvalue = part.split("="); |
| 3307 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 3344 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 3308 } | 3345 } |
| 3309 } | 3346 } |
| 3347 unittest.expect(queryMap["destinationKmsKeyName"].first, unittest.equals
(arg_destinationKmsKeyName)); |
| 3310 unittest.expect(queryMap["destinationPredefinedAcl"].first, unittest.equ
als(arg_destinationPredefinedAcl)); | 3348 unittest.expect(queryMap["destinationPredefinedAcl"].first, unittest.equ
als(arg_destinationPredefinedAcl)); |
| 3311 unittest.expect(queryMap["ifGenerationMatch"].first, unittest.equals(arg
_ifGenerationMatch)); | 3349 unittest.expect(queryMap["ifGenerationMatch"].first, unittest.equals(arg
_ifGenerationMatch)); |
| 3312 unittest.expect(queryMap["ifGenerationNotMatch"].first, unittest.equals(
arg_ifGenerationNotMatch)); | 3350 unittest.expect(queryMap["ifGenerationNotMatch"].first, unittest.equals(
arg_ifGenerationNotMatch)); |
| 3313 unittest.expect(queryMap["ifMetagenerationMatch"].first, unittest.equals
(arg_ifMetagenerationMatch)); | 3351 unittest.expect(queryMap["ifMetagenerationMatch"].first, unittest.equals
(arg_ifMetagenerationMatch)); |
| 3314 unittest.expect(queryMap["ifMetagenerationNotMatch"].first, unittest.equ
als(arg_ifMetagenerationNotMatch)); | 3352 unittest.expect(queryMap["ifMetagenerationNotMatch"].first, unittest.equ
als(arg_ifMetagenerationNotMatch)); |
| 3315 unittest.expect(queryMap["ifSourceGenerationMatch"].first, unittest.equa
ls(arg_ifSourceGenerationMatch)); | 3353 unittest.expect(queryMap["ifSourceGenerationMatch"].first, unittest.equa
ls(arg_ifSourceGenerationMatch)); |
| 3316 unittest.expect(queryMap["ifSourceGenerationNotMatch"].first, unittest.e
quals(arg_ifSourceGenerationNotMatch)); | 3354 unittest.expect(queryMap["ifSourceGenerationNotMatch"].first, unittest.e
quals(arg_ifSourceGenerationNotMatch)); |
| 3317 unittest.expect(queryMap["ifSourceMetagenerationMatch"].first, unittest.
equals(arg_ifSourceMetagenerationMatch)); | 3355 unittest.expect(queryMap["ifSourceMetagenerationMatch"].first, unittest.
equals(arg_ifSourceMetagenerationMatch)); |
| 3318 unittest.expect(queryMap["ifSourceMetagenerationNotMatch"].first, unitte
st.equals(arg_ifSourceMetagenerationNotMatch)); | 3356 unittest.expect(queryMap["ifSourceMetagenerationNotMatch"].first, unitte
st.equals(arg_ifSourceMetagenerationNotMatch)); |
| 3319 unittest.expect(queryMap["maxBytesRewrittenPerCall"].first, unittest.equ
als(arg_maxBytesRewrittenPerCall)); | 3357 unittest.expect(queryMap["maxBytesRewrittenPerCall"].first, unittest.equ
als(arg_maxBytesRewrittenPerCall)); |
| 3320 unittest.expect(queryMap["projection"].first, unittest.equals(arg_projec
tion)); | 3358 unittest.expect(queryMap["projection"].first, unittest.equals(arg_projec
tion)); |
| 3321 unittest.expect(queryMap["rewriteToken"].first, unittest.equals(arg_rewr
iteToken)); | 3359 unittest.expect(queryMap["rewriteToken"].first, unittest.equals(arg_rewr
iteToken)); |
| 3322 unittest.expect(queryMap["sourceGeneration"].first, unittest.equals(arg_
sourceGeneration)); | 3360 unittest.expect(queryMap["sourceGeneration"].first, unittest.equals(arg_
sourceGeneration)); |
| 3323 | 3361 |
| 3324 | 3362 |
| 3325 var h = { | 3363 var h = { |
| 3326 "content-type" : "application/json; charset=utf-8", | 3364 "content-type" : "application/json; charset=utf-8", |
| 3327 }; | 3365 }; |
| 3328 var resp = convert.JSON.encode(buildRewriteResponse()); | 3366 var resp = convert.JSON.encode(buildRewriteResponse()); |
| 3329 return new async.Future.value(stringResponse(200, h, resp)); | 3367 return new async.Future.value(stringResponse(200, h, resp)); |
| 3330 }), true); | 3368 }), true); |
| 3331 res.rewrite(arg_request, arg_sourceBucket, arg_sourceObject, arg_destinati
onBucket, arg_destinationObject, destinationPredefinedAcl: arg_destinationPredef
inedAcl, ifGenerationMatch: arg_ifGenerationMatch, ifGenerationNotMatch: arg_ifG
enerationNotMatch, ifMetagenerationMatch: arg_ifMetagenerationMatch, ifMetagener
ationNotMatch: arg_ifMetagenerationNotMatch, ifSourceGenerationMatch: arg_ifSour
ceGenerationMatch, ifSourceGenerationNotMatch: arg_ifSourceGenerationNotMatch, i
fSourceMetagenerationMatch: arg_ifSourceMetagenerationMatch, ifSourceMetagenerat
ionNotMatch: arg_ifSourceMetagenerationNotMatch, maxBytesRewrittenPerCall: arg_m
axBytesRewrittenPerCall, projection: arg_projection, rewriteToken: arg_rewriteTo
ken, sourceGeneration: arg_sourceGeneration).then(unittest.expectAsync(((api.Rew
riteResponse response) { | 3369 res.rewrite(arg_request, arg_sourceBucket, arg_sourceObject, arg_destinati
onBucket, arg_destinationObject, destinationKmsKeyName: arg_destinationKmsKeyNam
e, destinationPredefinedAcl: arg_destinationPredefinedAcl, ifGenerationMatch: ar
g_ifGenerationMatch, ifGenerationNotMatch: arg_ifGenerationNotMatch, ifMetagener
ationMatch: arg_ifMetagenerationMatch, ifMetagenerationNotMatch: arg_ifMetagener
ationNotMatch, ifSourceGenerationMatch: arg_ifSourceGenerationMatch, ifSourceGen
erationNotMatch: arg_ifSourceGenerationNotMatch, ifSourceMetagenerationMatch: ar
g_ifSourceMetagenerationMatch, ifSourceMetagenerationNotMatch: arg_ifSourceMetag
enerationNotMatch, maxBytesRewrittenPerCall: arg_maxBytesRewrittenPerCall, proje
ction: arg_projection, rewriteToken: arg_rewriteToken, sourceGeneration: arg_sou
rceGeneration).then(unittest.expectAsync(((api.RewriteResponse response) { |
| 3332 checkRewriteResponse(response); | 3370 checkRewriteResponse(response); |
| 3333 }))); | 3371 }))); |
| 3334 }); | 3372 }); |
| 3335 | 3373 |
| 3336 unittest.test("method--update", () { | 3374 unittest.test("method--update", () { |
| 3337 // TODO: Implement tests for media upload; | 3375 // TODO: Implement tests for media upload; |
| 3338 // TODO: Implement tests for media download; | 3376 // TODO: Implement tests for media download; |
| 3339 | 3377 |
| 3340 var mock = new HttpServerMock(); | 3378 var mock = new HttpServerMock(); |
| 3341 api.ObjectsResourceApi res = new api.StorageApi(mock).objects; | 3379 api.ObjectsResourceApi res = new api.StorageApi(mock).objects; |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3477 res.watchAll(arg_request, arg_bucket, delimiter: arg_delimiter, maxResults
: arg_maxResults, pageToken: arg_pageToken, prefix: arg_prefix, projection: arg_
projection, versions: arg_versions).then(unittest.expectAsync(((api.Channel resp
onse) { | 3515 res.watchAll(arg_request, arg_bucket, delimiter: arg_delimiter, maxResults
: arg_maxResults, pageToken: arg_pageToken, prefix: arg_prefix, projection: arg_
projection, versions: arg_versions).then(unittest.expectAsync(((api.Channel resp
onse) { |
| 3478 checkChannel(response); | 3516 checkChannel(response); |
| 3479 }))); | 3517 }))); |
| 3480 }); | 3518 }); |
| 3481 | 3519 |
| 3482 }); | 3520 }); |
| 3483 | 3521 |
| 3484 | 3522 |
| 3485 } | 3523 } |
| 3486 | 3524 |
| OLD | NEW |