| OLD | NEW |
| 1 library googleapis_beta.appengine.v1beta5.test; | 1 library googleapis.appengine.v1.test; |
| 2 | 2 |
| 3 import "dart:core" as core; | 3 import "dart:core" as core; |
| 4 import "dart:collection" as collection; | 4 import "dart:collection" as collection; |
| 5 import "dart:async" as async; | 5 import "dart:async" as async; |
| 6 import "dart:convert" as convert; | 6 import "dart:convert" as convert; |
| 7 | 7 |
| 8 import 'package:http/http.dart' as http; | 8 import 'package:http/http.dart' as http; |
| 9 import 'package:http/testing.dart' as http_testing; | 9 import 'package:http/testing.dart' as http_testing; |
| 10 import 'package:unittest/unittest.dart' as unittest; | 10 import 'package:unittest/unittest.dart' as unittest; |
| 11 | 11 |
| 12 import 'package:googleapis_beta/appengine/v1beta5.dart' as api; | 12 import 'package:googleapis/appengine/v1.dart' as api; |
| 13 | 13 |
| 14 class HttpServerMock extends http.BaseClient { | 14 class HttpServerMock extends http.BaseClient { |
| 15 core.Function _callback; | 15 core.Function _callback; |
| 16 core.bool _expectJson; | 16 core.bool _expectJson; |
| 17 | 17 |
| 18 void register(core.Function callback, core.bool expectJson) { | 18 void register(core.Function callback, core.bool expectJson) { |
| 19 _callback = callback; | 19 _callback = callback; |
| 20 _expectJson = expectJson; | 20 _expectJson = expectJson; |
| 21 } | 21 } |
| 22 | 22 |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 } | 90 } |
| 91 | 91 |
| 92 checkApiEndpointHandler(api.ApiEndpointHandler o) { | 92 checkApiEndpointHandler(api.ApiEndpointHandler o) { |
| 93 buildCounterApiEndpointHandler++; | 93 buildCounterApiEndpointHandler++; |
| 94 if (buildCounterApiEndpointHandler < 3) { | 94 if (buildCounterApiEndpointHandler < 3) { |
| 95 unittest.expect(o.scriptPath, unittest.equals('foo')); | 95 unittest.expect(o.scriptPath, unittest.equals('foo')); |
| 96 } | 96 } |
| 97 buildCounterApiEndpointHandler--; | 97 buildCounterApiEndpointHandler--; |
| 98 } | 98 } |
| 99 | 99 |
| 100 buildUnnamed3691() { | 100 buildUnnamed454() { |
| 101 var o = new core.List<api.UrlDispatchRule>(); | 101 var o = new core.List<api.UrlDispatchRule>(); |
| 102 o.add(buildUrlDispatchRule()); | 102 o.add(buildUrlDispatchRule()); |
| 103 o.add(buildUrlDispatchRule()); | 103 o.add(buildUrlDispatchRule()); |
| 104 return o; | 104 return o; |
| 105 } | 105 } |
| 106 | 106 |
| 107 checkUnnamed3691(core.List<api.UrlDispatchRule> o) { | 107 checkUnnamed454(core.List<api.UrlDispatchRule> o) { |
| 108 unittest.expect(o, unittest.hasLength(2)); | 108 unittest.expect(o, unittest.hasLength(2)); |
| 109 checkUrlDispatchRule(o[0]); | 109 checkUrlDispatchRule(o[0]); |
| 110 checkUrlDispatchRule(o[1]); | 110 checkUrlDispatchRule(o[1]); |
| 111 } | 111 } |
| 112 | 112 |
| 113 core.int buildCounterApplication = 0; | 113 core.int buildCounterApplication = 0; |
| 114 buildApplication() { | 114 buildApplication() { |
| 115 var o = new api.Application(); | 115 var o = new api.Application(); |
| 116 buildCounterApplication++; | 116 buildCounterApplication++; |
| 117 if (buildCounterApplication < 3) { | 117 if (buildCounterApplication < 3) { |
| 118 o.authDomain = "foo"; | 118 o.authDomain = "foo"; |
| 119 o.codeBucket = "foo"; | 119 o.codeBucket = "foo"; |
| 120 o.defaultBucket = "foo"; | 120 o.defaultBucket = "foo"; |
| 121 o.defaultCookieExpiration = "foo"; | 121 o.defaultCookieExpiration = "foo"; |
| 122 o.defaultHostname = "foo"; | 122 o.defaultHostname = "foo"; |
| 123 o.dispatchRules = buildUnnamed3691(); | 123 o.dispatchRules = buildUnnamed454(); |
| 124 o.id = "foo"; | 124 o.id = "foo"; |
| 125 o.location = "foo"; | 125 o.locationId = "foo"; |
| 126 o.name = "foo"; | 126 o.name = "foo"; |
| 127 } | 127 } |
| 128 buildCounterApplication--; | 128 buildCounterApplication--; |
| 129 return o; | 129 return o; |
| 130 } | 130 } |
| 131 | 131 |
| 132 checkApplication(api.Application o) { | 132 checkApplication(api.Application o) { |
| 133 buildCounterApplication++; | 133 buildCounterApplication++; |
| 134 if (buildCounterApplication < 3) { | 134 if (buildCounterApplication < 3) { |
| 135 unittest.expect(o.authDomain, unittest.equals('foo')); | 135 unittest.expect(o.authDomain, unittest.equals('foo')); |
| 136 unittest.expect(o.codeBucket, unittest.equals('foo')); | 136 unittest.expect(o.codeBucket, unittest.equals('foo')); |
| 137 unittest.expect(o.defaultBucket, unittest.equals('foo')); | 137 unittest.expect(o.defaultBucket, unittest.equals('foo')); |
| 138 unittest.expect(o.defaultCookieExpiration, unittest.equals('foo')); | 138 unittest.expect(o.defaultCookieExpiration, unittest.equals('foo')); |
| 139 unittest.expect(o.defaultHostname, unittest.equals('foo')); | 139 unittest.expect(o.defaultHostname, unittest.equals('foo')); |
| 140 checkUnnamed3691(o.dispatchRules); | 140 checkUnnamed454(o.dispatchRules); |
| 141 unittest.expect(o.id, unittest.equals('foo')); | 141 unittest.expect(o.id, unittest.equals('foo')); |
| 142 unittest.expect(o.location, unittest.equals('foo')); | 142 unittest.expect(o.locationId, unittest.equals('foo')); |
| 143 unittest.expect(o.name, unittest.equals('foo')); | 143 unittest.expect(o.name, unittest.equals('foo')); |
| 144 } | 144 } |
| 145 buildCounterApplication--; | 145 buildCounterApplication--; |
| 146 } | 146 } |
| 147 | 147 |
| 148 core.int buildCounterAutomaticScaling = 0; | 148 core.int buildCounterAutomaticScaling = 0; |
| 149 buildAutomaticScaling() { | 149 buildAutomaticScaling() { |
| 150 var o = new api.AutomaticScaling(); | 150 var o = new api.AutomaticScaling(); |
| 151 buildCounterAutomaticScaling++; | 151 buildCounterAutomaticScaling++; |
| 152 if (buildCounterAutomaticScaling < 3) { | 152 if (buildCounterAutomaticScaling < 3) { |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 257 return o; | 257 return o; |
| 258 } | 258 } |
| 259 | 259 |
| 260 checkDebugInstanceRequest(api.DebugInstanceRequest o) { | 260 checkDebugInstanceRequest(api.DebugInstanceRequest o) { |
| 261 buildCounterDebugInstanceRequest++; | 261 buildCounterDebugInstanceRequest++; |
| 262 if (buildCounterDebugInstanceRequest < 3) { | 262 if (buildCounterDebugInstanceRequest < 3) { |
| 263 } | 263 } |
| 264 buildCounterDebugInstanceRequest--; | 264 buildCounterDebugInstanceRequest--; |
| 265 } | 265 } |
| 266 | 266 |
| 267 buildUnnamed3692() { | 267 buildUnnamed455() { |
| 268 var o = new core.Map<core.String, api.FileInfo>(); | 268 var o = new core.Map<core.String, api.FileInfo>(); |
| 269 o["x"] = buildFileInfo(); | 269 o["x"] = buildFileInfo(); |
| 270 o["y"] = buildFileInfo(); | 270 o["y"] = buildFileInfo(); |
| 271 return o; | 271 return o; |
| 272 } | 272 } |
| 273 | 273 |
| 274 checkUnnamed3692(core.Map<core.String, api.FileInfo> o) { | 274 checkUnnamed455(core.Map<core.String, api.FileInfo> o) { |
| 275 unittest.expect(o, unittest.hasLength(2)); | 275 unittest.expect(o, unittest.hasLength(2)); |
| 276 checkFileInfo(o["x"]); | 276 checkFileInfo(o["x"]); |
| 277 checkFileInfo(o["y"]); | 277 checkFileInfo(o["y"]); |
| 278 } | 278 } |
| 279 | 279 |
| 280 buildUnnamed3693() { | |
| 281 var o = new core.List<api.SourceReference>(); | |
| 282 o.add(buildSourceReference()); | |
| 283 o.add(buildSourceReference()); | |
| 284 return o; | |
| 285 } | |
| 286 | |
| 287 checkUnnamed3693(core.List<api.SourceReference> o) { | |
| 288 unittest.expect(o, unittest.hasLength(2)); | |
| 289 checkSourceReference(o[0]); | |
| 290 checkSourceReference(o[1]); | |
| 291 } | |
| 292 | |
| 293 core.int buildCounterDeployment = 0; | 280 core.int buildCounterDeployment = 0; |
| 294 buildDeployment() { | 281 buildDeployment() { |
| 295 var o = new api.Deployment(); | 282 var o = new api.Deployment(); |
| 296 buildCounterDeployment++; | 283 buildCounterDeployment++; |
| 297 if (buildCounterDeployment < 3) { | 284 if (buildCounterDeployment < 3) { |
| 298 o.container = buildContainerInfo(); | 285 o.container = buildContainerInfo(); |
| 299 o.files = buildUnnamed3692(); | 286 o.files = buildUnnamed455(); |
| 300 o.sourceReferences = buildUnnamed3693(); | 287 o.zip = buildZipInfo(); |
| 301 } | 288 } |
| 302 buildCounterDeployment--; | 289 buildCounterDeployment--; |
| 303 return o; | 290 return o; |
| 304 } | 291 } |
| 305 | 292 |
| 306 checkDeployment(api.Deployment o) { | 293 checkDeployment(api.Deployment o) { |
| 307 buildCounterDeployment++; | 294 buildCounterDeployment++; |
| 308 if (buildCounterDeployment < 3) { | 295 if (buildCounterDeployment < 3) { |
| 309 checkContainerInfo(o.container); | 296 checkContainerInfo(o.container); |
| 310 checkUnnamed3692(o.files); | 297 checkUnnamed455(o.files); |
| 311 checkUnnamed3693(o.sourceReferences); | 298 checkZipInfo(o.zip); |
| 312 } | 299 } |
| 313 buildCounterDeployment--; | 300 buildCounterDeployment--; |
| 314 } | 301 } |
| 315 | 302 |
| 316 core.int buildCounterDiskUtilization = 0; | 303 core.int buildCounterDiskUtilization = 0; |
| 317 buildDiskUtilization() { | 304 buildDiskUtilization() { |
| 318 var o = new api.DiskUtilization(); | 305 var o = new api.DiskUtilization(); |
| 319 buildCounterDiskUtilization++; | 306 buildCounterDiskUtilization++; |
| 320 if (buildCounterDiskUtilization < 3) { | 307 if (buildCounterDiskUtilization < 3) { |
| 321 o.targetReadBytesPerSec = 42; | 308 o.targetReadBytesPerSecond = 42; |
| 322 o.targetReadOpsPerSec = 42; | 309 o.targetReadOpsPerSecond = 42; |
| 323 o.targetWriteBytesPerSec = 42; | 310 o.targetWriteBytesPerSecond = 42; |
| 324 o.targetWriteOpsPerSec = 42; | 311 o.targetWriteOpsPerSecond = 42; |
| 325 } | 312 } |
| 326 buildCounterDiskUtilization--; | 313 buildCounterDiskUtilization--; |
| 327 return o; | 314 return o; |
| 328 } | 315 } |
| 329 | 316 |
| 330 checkDiskUtilization(api.DiskUtilization o) { | 317 checkDiskUtilization(api.DiskUtilization o) { |
| 331 buildCounterDiskUtilization++; | 318 buildCounterDiskUtilization++; |
| 332 if (buildCounterDiskUtilization < 3) { | 319 if (buildCounterDiskUtilization < 3) { |
| 333 unittest.expect(o.targetReadBytesPerSec, unittest.equals(42)); | 320 unittest.expect(o.targetReadBytesPerSecond, unittest.equals(42)); |
| 334 unittest.expect(o.targetReadOpsPerSec, unittest.equals(42)); | 321 unittest.expect(o.targetReadOpsPerSecond, unittest.equals(42)); |
| 335 unittest.expect(o.targetWriteBytesPerSec, unittest.equals(42)); | 322 unittest.expect(o.targetWriteBytesPerSecond, unittest.equals(42)); |
| 336 unittest.expect(o.targetWriteOpsPerSec, unittest.equals(42)); | 323 unittest.expect(o.targetWriteOpsPerSecond, unittest.equals(42)); |
| 337 } | 324 } |
| 338 buildCounterDiskUtilization--; | 325 buildCounterDiskUtilization--; |
| 339 } | 326 } |
| 340 | 327 |
| 341 core.int buildCounterErrorHandler = 0; | 328 core.int buildCounterErrorHandler = 0; |
| 342 buildErrorHandler() { | 329 buildErrorHandler() { |
| 343 var o = new api.ErrorHandler(); | 330 var o = new api.ErrorHandler(); |
| 344 buildCounterErrorHandler++; | 331 buildCounterErrorHandler++; |
| 345 if (buildCounterErrorHandler < 3) { | 332 if (buildCounterErrorHandler < 3) { |
| 346 o.errorCode = "foo"; | 333 o.errorCode = "foo"; |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 422 if (buildCounterInstance < 3) { | 409 if (buildCounterInstance < 3) { |
| 423 o.appEngineRelease = "foo"; | 410 o.appEngineRelease = "foo"; |
| 424 o.availability = "foo"; | 411 o.availability = "foo"; |
| 425 o.averageLatency = 42; | 412 o.averageLatency = 42; |
| 426 o.errors = 42; | 413 o.errors = 42; |
| 427 o.id = "foo"; | 414 o.id = "foo"; |
| 428 o.memoryUsage = "foo"; | 415 o.memoryUsage = "foo"; |
| 429 o.name = "foo"; | 416 o.name = "foo"; |
| 430 o.qps = 42.0; | 417 o.qps = 42.0; |
| 431 o.requests = 42; | 418 o.requests = 42; |
| 432 o.startTimestamp = "foo"; | 419 o.startTime = "foo"; |
| 420 o.vmDebugEnabled = true; |
| 433 o.vmId = "foo"; | 421 o.vmId = "foo"; |
| 434 o.vmName = "foo"; | 422 o.vmName = "foo"; |
| 435 o.vmStatus = "foo"; | 423 o.vmStatus = "foo"; |
| 436 o.vmUnlocked = true; | |
| 437 o.vmZoneName = "foo"; | 424 o.vmZoneName = "foo"; |
| 438 } | 425 } |
| 439 buildCounterInstance--; | 426 buildCounterInstance--; |
| 440 return o; | 427 return o; |
| 441 } | 428 } |
| 442 | 429 |
| 443 checkInstance(api.Instance o) { | 430 checkInstance(api.Instance o) { |
| 444 buildCounterInstance++; | 431 buildCounterInstance++; |
| 445 if (buildCounterInstance < 3) { | 432 if (buildCounterInstance < 3) { |
| 446 unittest.expect(o.appEngineRelease, unittest.equals('foo')); | 433 unittest.expect(o.appEngineRelease, unittest.equals('foo')); |
| 447 unittest.expect(o.availability, unittest.equals('foo')); | 434 unittest.expect(o.availability, unittest.equals('foo')); |
| 448 unittest.expect(o.averageLatency, unittest.equals(42)); | 435 unittest.expect(o.averageLatency, unittest.equals(42)); |
| 449 unittest.expect(o.errors, unittest.equals(42)); | 436 unittest.expect(o.errors, unittest.equals(42)); |
| 450 unittest.expect(o.id, unittest.equals('foo')); | 437 unittest.expect(o.id, unittest.equals('foo')); |
| 451 unittest.expect(o.memoryUsage, unittest.equals('foo')); | 438 unittest.expect(o.memoryUsage, unittest.equals('foo')); |
| 452 unittest.expect(o.name, unittest.equals('foo')); | 439 unittest.expect(o.name, unittest.equals('foo')); |
| 453 unittest.expect(o.qps, unittest.equals(42.0)); | 440 unittest.expect(o.qps, unittest.equals(42.0)); |
| 454 unittest.expect(o.requests, unittest.equals(42)); | 441 unittest.expect(o.requests, unittest.equals(42)); |
| 455 unittest.expect(o.startTimestamp, unittest.equals('foo')); | 442 unittest.expect(o.startTime, unittest.equals('foo')); |
| 443 unittest.expect(o.vmDebugEnabled, unittest.isTrue); |
| 456 unittest.expect(o.vmId, unittest.equals('foo')); | 444 unittest.expect(o.vmId, unittest.equals('foo')); |
| 457 unittest.expect(o.vmName, unittest.equals('foo')); | 445 unittest.expect(o.vmName, unittest.equals('foo')); |
| 458 unittest.expect(o.vmStatus, unittest.equals('foo')); | 446 unittest.expect(o.vmStatus, unittest.equals('foo')); |
| 459 unittest.expect(o.vmUnlocked, unittest.isTrue); | |
| 460 unittest.expect(o.vmZoneName, unittest.equals('foo')); | 447 unittest.expect(o.vmZoneName, unittest.equals('foo')); |
| 461 } | 448 } |
| 462 buildCounterInstance--; | 449 buildCounterInstance--; |
| 463 } | 450 } |
| 464 | 451 |
| 465 core.int buildCounterLibrary = 0; | 452 core.int buildCounterLibrary = 0; |
| 466 buildLibrary() { | 453 buildLibrary() { |
| 467 var o = new api.Library(); | 454 var o = new api.Library(); |
| 468 buildCounterLibrary++; | 455 buildCounterLibrary++; |
| 469 if (buildCounterLibrary < 3) { | 456 if (buildCounterLibrary < 3) { |
| 470 o.name = "foo"; | 457 o.name = "foo"; |
| 471 o.version = "foo"; | 458 o.version = "foo"; |
| 472 } | 459 } |
| 473 buildCounterLibrary--; | 460 buildCounterLibrary--; |
| 474 return o; | 461 return o; |
| 475 } | 462 } |
| 476 | 463 |
| 477 checkLibrary(api.Library o) { | 464 checkLibrary(api.Library o) { |
| 478 buildCounterLibrary++; | 465 buildCounterLibrary++; |
| 479 if (buildCounterLibrary < 3) { | 466 if (buildCounterLibrary < 3) { |
| 480 unittest.expect(o.name, unittest.equals('foo')); | 467 unittest.expect(o.name, unittest.equals('foo')); |
| 481 unittest.expect(o.version, unittest.equals('foo')); | 468 unittest.expect(o.version, unittest.equals('foo')); |
| 482 } | 469 } |
| 483 buildCounterLibrary--; | 470 buildCounterLibrary--; |
| 484 } | 471 } |
| 485 | 472 |
| 486 buildUnnamed3694() { | 473 buildUnnamed456() { |
| 487 var o = new core.List<api.Instance>(); | 474 var o = new core.List<api.Instance>(); |
| 488 o.add(buildInstance()); | 475 o.add(buildInstance()); |
| 489 o.add(buildInstance()); | 476 o.add(buildInstance()); |
| 490 return o; | 477 return o; |
| 491 } | 478 } |
| 492 | 479 |
| 493 checkUnnamed3694(core.List<api.Instance> o) { | 480 checkUnnamed456(core.List<api.Instance> o) { |
| 494 unittest.expect(o, unittest.hasLength(2)); | 481 unittest.expect(o, unittest.hasLength(2)); |
| 495 checkInstance(o[0]); | 482 checkInstance(o[0]); |
| 496 checkInstance(o[1]); | 483 checkInstance(o[1]); |
| 497 } | 484 } |
| 498 | 485 |
| 499 core.int buildCounterListInstancesResponse = 0; | 486 core.int buildCounterListInstancesResponse = 0; |
| 500 buildListInstancesResponse() { | 487 buildListInstancesResponse() { |
| 501 var o = new api.ListInstancesResponse(); | 488 var o = new api.ListInstancesResponse(); |
| 502 buildCounterListInstancesResponse++; | 489 buildCounterListInstancesResponse++; |
| 503 if (buildCounterListInstancesResponse < 3) { | 490 if (buildCounterListInstancesResponse < 3) { |
| 504 o.instances = buildUnnamed3694(); | 491 o.instances = buildUnnamed456(); |
| 505 o.nextPageToken = "foo"; | 492 o.nextPageToken = "foo"; |
| 506 } | 493 } |
| 507 buildCounterListInstancesResponse--; | 494 buildCounterListInstancesResponse--; |
| 508 return o; | 495 return o; |
| 509 } | 496 } |
| 510 | 497 |
| 511 checkListInstancesResponse(api.ListInstancesResponse o) { | 498 checkListInstancesResponse(api.ListInstancesResponse o) { |
| 512 buildCounterListInstancesResponse++; | 499 buildCounterListInstancesResponse++; |
| 513 if (buildCounterListInstancesResponse < 3) { | 500 if (buildCounterListInstancesResponse < 3) { |
| 514 checkUnnamed3694(o.instances); | 501 checkUnnamed456(o.instances); |
| 515 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 502 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 516 } | 503 } |
| 517 buildCounterListInstancesResponse--; | 504 buildCounterListInstancesResponse--; |
| 518 } | 505 } |
| 519 | 506 |
| 520 buildUnnamed3695() { | 507 buildUnnamed457() { |
| 521 var o = new core.List<api.Location>(); | 508 var o = new core.List<api.Location>(); |
| 522 o.add(buildLocation()); | 509 o.add(buildLocation()); |
| 523 o.add(buildLocation()); | 510 o.add(buildLocation()); |
| 524 return o; | 511 return o; |
| 525 } | 512 } |
| 526 | 513 |
| 527 checkUnnamed3695(core.List<api.Location> o) { | 514 checkUnnamed457(core.List<api.Location> o) { |
| 528 unittest.expect(o, unittest.hasLength(2)); | 515 unittest.expect(o, unittest.hasLength(2)); |
| 529 checkLocation(o[0]); | 516 checkLocation(o[0]); |
| 530 checkLocation(o[1]); | 517 checkLocation(o[1]); |
| 531 } | 518 } |
| 532 | 519 |
| 533 core.int buildCounterListLocationsResponse = 0; | 520 core.int buildCounterListLocationsResponse = 0; |
| 534 buildListLocationsResponse() { | 521 buildListLocationsResponse() { |
| 535 var o = new api.ListLocationsResponse(); | 522 var o = new api.ListLocationsResponse(); |
| 536 buildCounterListLocationsResponse++; | 523 buildCounterListLocationsResponse++; |
| 537 if (buildCounterListLocationsResponse < 3) { | 524 if (buildCounterListLocationsResponse < 3) { |
| 538 o.locations = buildUnnamed3695(); | 525 o.locations = buildUnnamed457(); |
| 539 o.nextPageToken = "foo"; | 526 o.nextPageToken = "foo"; |
| 540 } | 527 } |
| 541 buildCounterListLocationsResponse--; | 528 buildCounterListLocationsResponse--; |
| 542 return o; | 529 return o; |
| 543 } | 530 } |
| 544 | 531 |
| 545 checkListLocationsResponse(api.ListLocationsResponse o) { | 532 checkListLocationsResponse(api.ListLocationsResponse o) { |
| 546 buildCounterListLocationsResponse++; | 533 buildCounterListLocationsResponse++; |
| 547 if (buildCounterListLocationsResponse < 3) { | 534 if (buildCounterListLocationsResponse < 3) { |
| 548 checkUnnamed3695(o.locations); | 535 checkUnnamed457(o.locations); |
| 549 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 536 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 550 } | 537 } |
| 551 buildCounterListLocationsResponse--; | 538 buildCounterListLocationsResponse--; |
| 552 } | 539 } |
| 553 | 540 |
| 554 buildUnnamed3696() { | 541 buildUnnamed458() { |
| 555 var o = new core.List<api.Operation>(); | 542 var o = new core.List<api.Operation>(); |
| 556 o.add(buildOperation()); | 543 o.add(buildOperation()); |
| 557 o.add(buildOperation()); | 544 o.add(buildOperation()); |
| 558 return o; | 545 return o; |
| 559 } | 546 } |
| 560 | 547 |
| 561 checkUnnamed3696(core.List<api.Operation> o) { | 548 checkUnnamed458(core.List<api.Operation> o) { |
| 562 unittest.expect(o, unittest.hasLength(2)); | 549 unittest.expect(o, unittest.hasLength(2)); |
| 563 checkOperation(o[0]); | 550 checkOperation(o[0]); |
| 564 checkOperation(o[1]); | 551 checkOperation(o[1]); |
| 565 } | 552 } |
| 566 | 553 |
| 567 core.int buildCounterListOperationsResponse = 0; | 554 core.int buildCounterListOperationsResponse = 0; |
| 568 buildListOperationsResponse() { | 555 buildListOperationsResponse() { |
| 569 var o = new api.ListOperationsResponse(); | 556 var o = new api.ListOperationsResponse(); |
| 570 buildCounterListOperationsResponse++; | 557 buildCounterListOperationsResponse++; |
| 571 if (buildCounterListOperationsResponse < 3) { | 558 if (buildCounterListOperationsResponse < 3) { |
| 572 o.nextPageToken = "foo"; | 559 o.nextPageToken = "foo"; |
| 573 o.operations = buildUnnamed3696(); | 560 o.operations = buildUnnamed458(); |
| 574 } | 561 } |
| 575 buildCounterListOperationsResponse--; | 562 buildCounterListOperationsResponse--; |
| 576 return o; | 563 return o; |
| 577 } | 564 } |
| 578 | 565 |
| 579 checkListOperationsResponse(api.ListOperationsResponse o) { | 566 checkListOperationsResponse(api.ListOperationsResponse o) { |
| 580 buildCounterListOperationsResponse++; | 567 buildCounterListOperationsResponse++; |
| 581 if (buildCounterListOperationsResponse < 3) { | 568 if (buildCounterListOperationsResponse < 3) { |
| 582 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 569 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 583 checkUnnamed3696(o.operations); | 570 checkUnnamed458(o.operations); |
| 584 } | 571 } |
| 585 buildCounterListOperationsResponse--; | 572 buildCounterListOperationsResponse--; |
| 586 } | 573 } |
| 587 | 574 |
| 588 buildUnnamed3697() { | 575 buildUnnamed459() { |
| 589 var o = new core.List<api.Service>(); | 576 var o = new core.List<api.Service>(); |
| 590 o.add(buildService()); | 577 o.add(buildService()); |
| 591 o.add(buildService()); | 578 o.add(buildService()); |
| 592 return o; | 579 return o; |
| 593 } | 580 } |
| 594 | 581 |
| 595 checkUnnamed3697(core.List<api.Service> o) { | 582 checkUnnamed459(core.List<api.Service> o) { |
| 596 unittest.expect(o, unittest.hasLength(2)); | 583 unittest.expect(o, unittest.hasLength(2)); |
| 597 checkService(o[0]); | 584 checkService(o[0]); |
| 598 checkService(o[1]); | 585 checkService(o[1]); |
| 599 } | 586 } |
| 600 | 587 |
| 601 core.int buildCounterListServicesResponse = 0; | 588 core.int buildCounterListServicesResponse = 0; |
| 602 buildListServicesResponse() { | 589 buildListServicesResponse() { |
| 603 var o = new api.ListServicesResponse(); | 590 var o = new api.ListServicesResponse(); |
| 604 buildCounterListServicesResponse++; | 591 buildCounterListServicesResponse++; |
| 605 if (buildCounterListServicesResponse < 3) { | 592 if (buildCounterListServicesResponse < 3) { |
| 606 o.nextPageToken = "foo"; | 593 o.nextPageToken = "foo"; |
| 607 o.services = buildUnnamed3697(); | 594 o.services = buildUnnamed459(); |
| 608 } | 595 } |
| 609 buildCounterListServicesResponse--; | 596 buildCounterListServicesResponse--; |
| 610 return o; | 597 return o; |
| 611 } | 598 } |
| 612 | 599 |
| 613 checkListServicesResponse(api.ListServicesResponse o) { | 600 checkListServicesResponse(api.ListServicesResponse o) { |
| 614 buildCounterListServicesResponse++; | 601 buildCounterListServicesResponse++; |
| 615 if (buildCounterListServicesResponse < 3) { | 602 if (buildCounterListServicesResponse < 3) { |
| 616 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 603 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 617 checkUnnamed3697(o.services); | 604 checkUnnamed459(o.services); |
| 618 } | 605 } |
| 619 buildCounterListServicesResponse--; | 606 buildCounterListServicesResponse--; |
| 620 } | 607 } |
| 621 | 608 |
| 622 buildUnnamed3698() { | 609 buildUnnamed460() { |
| 623 var o = new core.List<api.Version>(); | 610 var o = new core.List<api.Version>(); |
| 624 o.add(buildVersion()); | 611 o.add(buildVersion()); |
| 625 o.add(buildVersion()); | 612 o.add(buildVersion()); |
| 626 return o; | 613 return o; |
| 627 } | 614 } |
| 628 | 615 |
| 629 checkUnnamed3698(core.List<api.Version> o) { | 616 checkUnnamed460(core.List<api.Version> o) { |
| 630 unittest.expect(o, unittest.hasLength(2)); | 617 unittest.expect(o, unittest.hasLength(2)); |
| 631 checkVersion(o[0]); | 618 checkVersion(o[0]); |
| 632 checkVersion(o[1]); | 619 checkVersion(o[1]); |
| 633 } | 620 } |
| 634 | 621 |
| 635 core.int buildCounterListVersionsResponse = 0; | 622 core.int buildCounterListVersionsResponse = 0; |
| 636 buildListVersionsResponse() { | 623 buildListVersionsResponse() { |
| 637 var o = new api.ListVersionsResponse(); | 624 var o = new api.ListVersionsResponse(); |
| 638 buildCounterListVersionsResponse++; | 625 buildCounterListVersionsResponse++; |
| 639 if (buildCounterListVersionsResponse < 3) { | 626 if (buildCounterListVersionsResponse < 3) { |
| 640 o.nextPageToken = "foo"; | 627 o.nextPageToken = "foo"; |
| 641 o.versions = buildUnnamed3698(); | 628 o.versions = buildUnnamed460(); |
| 642 } | 629 } |
| 643 buildCounterListVersionsResponse--; | 630 buildCounterListVersionsResponse--; |
| 644 return o; | 631 return o; |
| 645 } | 632 } |
| 646 | 633 |
| 647 checkListVersionsResponse(api.ListVersionsResponse o) { | 634 checkListVersionsResponse(api.ListVersionsResponse o) { |
| 648 buildCounterListVersionsResponse++; | 635 buildCounterListVersionsResponse++; |
| 649 if (buildCounterListVersionsResponse < 3) { | 636 if (buildCounterListVersionsResponse < 3) { |
| 650 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 637 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 651 checkUnnamed3698(o.versions); | 638 checkUnnamed460(o.versions); |
| 652 } | 639 } |
| 653 buildCounterListVersionsResponse--; | 640 buildCounterListVersionsResponse--; |
| 654 } | 641 } |
| 655 | 642 |
| 656 buildUnnamed3699() { | 643 buildUnnamed461() { |
| 657 var o = new core.Map<core.String, core.String>(); | 644 var o = new core.Map<core.String, core.String>(); |
| 658 o["x"] = "foo"; | 645 o["x"] = "foo"; |
| 659 o["y"] = "foo"; | 646 o["y"] = "foo"; |
| 660 return o; | 647 return o; |
| 661 } | 648 } |
| 662 | 649 |
| 663 checkUnnamed3699(core.Map<core.String, core.String> o) { | 650 checkUnnamed461(core.Map<core.String, core.String> o) { |
| 664 unittest.expect(o, unittest.hasLength(2)); | 651 unittest.expect(o, unittest.hasLength(2)); |
| 665 unittest.expect(o["x"], unittest.equals('foo')); | 652 unittest.expect(o["x"], unittest.equals('foo')); |
| 666 unittest.expect(o["y"], unittest.equals('foo')); | 653 unittest.expect(o["y"], unittest.equals('foo')); |
| 667 } | 654 } |
| 668 | 655 |
| 669 buildUnnamed3700() { | 656 buildUnnamed462() { |
| 670 var o = new core.Map<core.String, core.Object>(); | 657 var o = new core.Map<core.String, core.Object>(); |
| 671 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 658 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
| 672 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 659 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
| 673 return o; | 660 return o; |
| 674 } | 661 } |
| 675 | 662 |
| 676 checkUnnamed3700(core.Map<core.String, core.Object> o) { | 663 checkUnnamed462(core.Map<core.String, core.Object> o) { |
| 677 unittest.expect(o, unittest.hasLength(2)); | 664 unittest.expect(o, unittest.hasLength(2)); |
| 678 var casted1 = (o["x"]) as core.Map; unittest.expect(casted1, unittest.hasLengt
h(3)); unittest.expect(casted1["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted1["bool"], unittest.equals(true)); unittest.expect(casted1["string"],
unittest.equals('foo')); | 665 var casted1 = (o["x"]) as core.Map; unittest.expect(casted1, unittest.hasLengt
h(3)); unittest.expect(casted1["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted1["bool"], unittest.equals(true)); unittest.expect(casted1["string"],
unittest.equals('foo')); |
| 679 var casted2 = (o["y"]) as core.Map; unittest.expect(casted2, unittest.hasLengt
h(3)); unittest.expect(casted2["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted2["bool"], unittest.equals(true)); unittest.expect(casted2["string"],
unittest.equals('foo')); | 666 var casted2 = (o["y"]) as core.Map; unittest.expect(casted2, unittest.hasLengt
h(3)); unittest.expect(casted2["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted2["bool"], unittest.equals(true)); unittest.expect(casted2["string"],
unittest.equals('foo')); |
| 680 } | 667 } |
| 681 | 668 |
| 682 core.int buildCounterLocation = 0; | 669 core.int buildCounterLocation = 0; |
| 683 buildLocation() { | 670 buildLocation() { |
| 684 var o = new api.Location(); | 671 var o = new api.Location(); |
| 685 buildCounterLocation++; | 672 buildCounterLocation++; |
| 686 if (buildCounterLocation < 3) { | 673 if (buildCounterLocation < 3) { |
| 687 o.labels = buildUnnamed3699(); | 674 o.labels = buildUnnamed461(); |
| 688 o.metadata = buildUnnamed3700(); | 675 o.locationId = "foo"; |
| 676 o.metadata = buildUnnamed462(); |
| 689 o.name = "foo"; | 677 o.name = "foo"; |
| 690 } | 678 } |
| 691 buildCounterLocation--; | 679 buildCounterLocation--; |
| 692 return o; | 680 return o; |
| 693 } | 681 } |
| 694 | 682 |
| 695 checkLocation(api.Location o) { | 683 checkLocation(api.Location o) { |
| 696 buildCounterLocation++; | 684 buildCounterLocation++; |
| 697 if (buildCounterLocation < 3) { | 685 if (buildCounterLocation < 3) { |
| 698 checkUnnamed3699(o.labels); | 686 checkUnnamed461(o.labels); |
| 699 checkUnnamed3700(o.metadata); | 687 unittest.expect(o.locationId, unittest.equals('foo')); |
| 688 checkUnnamed462(o.metadata); |
| 700 unittest.expect(o.name, unittest.equals('foo')); | 689 unittest.expect(o.name, unittest.equals('foo')); |
| 701 } | 690 } |
| 702 buildCounterLocation--; | 691 buildCounterLocation--; |
| 703 } | 692 } |
| 704 | 693 |
| 705 core.int buildCounterLocationMetadata = 0; | 694 core.int buildCounterLocationMetadata = 0; |
| 706 buildLocationMetadata() { | 695 buildLocationMetadata() { |
| 707 var o = new api.LocationMetadata(); | 696 var o = new api.LocationMetadata(); |
| 708 buildCounterLocationMetadata++; | 697 buildCounterLocationMetadata++; |
| 709 if (buildCounterLocationMetadata < 3) { | 698 if (buildCounterLocationMetadata < 3) { |
| 699 o.flexibleEnvironmentAvailable = true; |
| 700 o.standardEnvironmentAvailable = true; |
| 710 } | 701 } |
| 711 buildCounterLocationMetadata--; | 702 buildCounterLocationMetadata--; |
| 712 return o; | 703 return o; |
| 713 } | 704 } |
| 714 | 705 |
| 715 checkLocationMetadata(api.LocationMetadata o) { | 706 checkLocationMetadata(api.LocationMetadata o) { |
| 716 buildCounterLocationMetadata++; | 707 buildCounterLocationMetadata++; |
| 717 if (buildCounterLocationMetadata < 3) { | 708 if (buildCounterLocationMetadata < 3) { |
| 709 unittest.expect(o.flexibleEnvironmentAvailable, unittest.isTrue); |
| 710 unittest.expect(o.standardEnvironmentAvailable, unittest.isTrue); |
| 718 } | 711 } |
| 719 buildCounterLocationMetadata--; | 712 buildCounterLocationMetadata--; |
| 720 } | 713 } |
| 721 | 714 |
| 722 core.int buildCounterManualScaling = 0; | 715 core.int buildCounterManualScaling = 0; |
| 723 buildManualScaling() { | 716 buildManualScaling() { |
| 724 var o = new api.ManualScaling(); | 717 var o = new api.ManualScaling(); |
| 725 buildCounterManualScaling++; | 718 buildCounterManualScaling++; |
| 726 if (buildCounterManualScaling < 3) { | 719 if (buildCounterManualScaling < 3) { |
| 727 o.instances = 42; | 720 o.instances = 42; |
| 728 } | 721 } |
| 729 buildCounterManualScaling--; | 722 buildCounterManualScaling--; |
| 730 return o; | 723 return o; |
| 731 } | 724 } |
| 732 | 725 |
| 733 checkManualScaling(api.ManualScaling o) { | 726 checkManualScaling(api.ManualScaling o) { |
| 734 buildCounterManualScaling++; | 727 buildCounterManualScaling++; |
| 735 if (buildCounterManualScaling < 3) { | 728 if (buildCounterManualScaling < 3) { |
| 736 unittest.expect(o.instances, unittest.equals(42)); | 729 unittest.expect(o.instances, unittest.equals(42)); |
| 737 } | 730 } |
| 738 buildCounterManualScaling--; | 731 buildCounterManualScaling--; |
| 739 } | 732 } |
| 740 | 733 |
| 741 buildUnnamed3701() { | 734 buildUnnamed463() { |
| 742 var o = new core.List<core.String>(); | 735 var o = new core.List<core.String>(); |
| 743 o.add("foo"); | 736 o.add("foo"); |
| 744 o.add("foo"); | 737 o.add("foo"); |
| 745 return o; | 738 return o; |
| 746 } | 739 } |
| 747 | 740 |
| 748 checkUnnamed3701(core.List<core.String> o) { | 741 checkUnnamed463(core.List<core.String> o) { |
| 749 unittest.expect(o, unittest.hasLength(2)); | 742 unittest.expect(o, unittest.hasLength(2)); |
| 750 unittest.expect(o[0], unittest.equals('foo')); | 743 unittest.expect(o[0], unittest.equals('foo')); |
| 751 unittest.expect(o[1], unittest.equals('foo')); | 744 unittest.expect(o[1], unittest.equals('foo')); |
| 752 } | 745 } |
| 753 | 746 |
| 754 core.int buildCounterNetwork = 0; | 747 core.int buildCounterNetwork = 0; |
| 755 buildNetwork() { | 748 buildNetwork() { |
| 756 var o = new api.Network(); | 749 var o = new api.Network(); |
| 757 buildCounterNetwork++; | 750 buildCounterNetwork++; |
| 758 if (buildCounterNetwork < 3) { | 751 if (buildCounterNetwork < 3) { |
| 759 o.forwardedPorts = buildUnnamed3701(); | 752 o.forwardedPorts = buildUnnamed463(); |
| 760 o.instanceTag = "foo"; | 753 o.instanceTag = "foo"; |
| 761 o.name = "foo"; | 754 o.name = "foo"; |
| 762 } | 755 } |
| 763 buildCounterNetwork--; | 756 buildCounterNetwork--; |
| 764 return o; | 757 return o; |
| 765 } | 758 } |
| 766 | 759 |
| 767 checkNetwork(api.Network o) { | 760 checkNetwork(api.Network o) { |
| 768 buildCounterNetwork++; | 761 buildCounterNetwork++; |
| 769 if (buildCounterNetwork < 3) { | 762 if (buildCounterNetwork < 3) { |
| 770 checkUnnamed3701(o.forwardedPorts); | 763 checkUnnamed463(o.forwardedPorts); |
| 771 unittest.expect(o.instanceTag, unittest.equals('foo')); | 764 unittest.expect(o.instanceTag, unittest.equals('foo')); |
| 772 unittest.expect(o.name, unittest.equals('foo')); | 765 unittest.expect(o.name, unittest.equals('foo')); |
| 773 } | 766 } |
| 774 buildCounterNetwork--; | 767 buildCounterNetwork--; |
| 775 } | 768 } |
| 776 | 769 |
| 777 core.int buildCounterNetworkUtilization = 0; | 770 core.int buildCounterNetworkUtilization = 0; |
| 778 buildNetworkUtilization() { | 771 buildNetworkUtilization() { |
| 779 var o = new api.NetworkUtilization(); | 772 var o = new api.NetworkUtilization(); |
| 780 buildCounterNetworkUtilization++; | 773 buildCounterNetworkUtilization++; |
| 781 if (buildCounterNetworkUtilization < 3) { | 774 if (buildCounterNetworkUtilization < 3) { |
| 782 o.targetReceivedBytesPerSec = 42; | 775 o.targetReceivedBytesPerSecond = 42; |
| 783 o.targetReceivedPacketsPerSec = 42; | 776 o.targetReceivedPacketsPerSecond = 42; |
| 784 o.targetSentBytesPerSec = 42; | 777 o.targetSentBytesPerSecond = 42; |
| 785 o.targetSentPacketsPerSec = 42; | 778 o.targetSentPacketsPerSecond = 42; |
| 786 } | 779 } |
| 787 buildCounterNetworkUtilization--; | 780 buildCounterNetworkUtilization--; |
| 788 return o; | 781 return o; |
| 789 } | 782 } |
| 790 | 783 |
| 791 checkNetworkUtilization(api.NetworkUtilization o) { | 784 checkNetworkUtilization(api.NetworkUtilization o) { |
| 792 buildCounterNetworkUtilization++; | 785 buildCounterNetworkUtilization++; |
| 793 if (buildCounterNetworkUtilization < 3) { | 786 if (buildCounterNetworkUtilization < 3) { |
| 794 unittest.expect(o.targetReceivedBytesPerSec, unittest.equals(42)); | 787 unittest.expect(o.targetReceivedBytesPerSecond, unittest.equals(42)); |
| 795 unittest.expect(o.targetReceivedPacketsPerSec, unittest.equals(42)); | 788 unittest.expect(o.targetReceivedPacketsPerSecond, unittest.equals(42)); |
| 796 unittest.expect(o.targetSentBytesPerSec, unittest.equals(42)); | 789 unittest.expect(o.targetSentBytesPerSecond, unittest.equals(42)); |
| 797 unittest.expect(o.targetSentPacketsPerSec, unittest.equals(42)); | 790 unittest.expect(o.targetSentPacketsPerSecond, unittest.equals(42)); |
| 798 } | 791 } |
| 799 buildCounterNetworkUtilization--; | 792 buildCounterNetworkUtilization--; |
| 800 } | 793 } |
| 801 | 794 |
| 802 buildUnnamed3702() { | 795 buildUnnamed464() { |
| 803 var o = new core.Map<core.String, core.Object>(); | 796 var o = new core.Map<core.String, core.Object>(); |
| 804 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 797 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
| 805 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 798 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
| 806 return o; | 799 return o; |
| 807 } | 800 } |
| 808 | 801 |
| 809 checkUnnamed3702(core.Map<core.String, core.Object> o) { | 802 checkUnnamed464(core.Map<core.String, core.Object> o) { |
| 810 unittest.expect(o, unittest.hasLength(2)); | 803 unittest.expect(o, unittest.hasLength(2)); |
| 811 var casted3 = (o["x"]) as core.Map; unittest.expect(casted3, unittest.hasLengt
h(3)); unittest.expect(casted3["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted3["bool"], unittest.equals(true)); unittest.expect(casted3["string"],
unittest.equals('foo')); | 804 var casted3 = (o["x"]) as core.Map; unittest.expect(casted3, unittest.hasLengt
h(3)); unittest.expect(casted3["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted3["bool"], unittest.equals(true)); unittest.expect(casted3["string"],
unittest.equals('foo')); |
| 812 var casted4 = (o["y"]) as core.Map; unittest.expect(casted4, unittest.hasLengt
h(3)); unittest.expect(casted4["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted4["bool"], unittest.equals(true)); unittest.expect(casted4["string"],
unittest.equals('foo')); | 805 var casted4 = (o["y"]) as core.Map; unittest.expect(casted4, unittest.hasLengt
h(3)); unittest.expect(casted4["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted4["bool"], unittest.equals(true)); unittest.expect(casted4["string"],
unittest.equals('foo')); |
| 813 } | 806 } |
| 814 | 807 |
| 815 buildUnnamed3703() { | 808 buildUnnamed465() { |
| 816 var o = new core.Map<core.String, core.Object>(); | 809 var o = new core.Map<core.String, core.Object>(); |
| 817 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 810 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
| 818 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 811 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
| 819 return o; | 812 return o; |
| 820 } | 813 } |
| 821 | 814 |
| 822 checkUnnamed3703(core.Map<core.String, core.Object> o) { | 815 checkUnnamed465(core.Map<core.String, core.Object> o) { |
| 823 unittest.expect(o, unittest.hasLength(2)); | 816 unittest.expect(o, unittest.hasLength(2)); |
| 824 var casted5 = (o["x"]) as core.Map; unittest.expect(casted5, unittest.hasLengt
h(3)); unittest.expect(casted5["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted5["bool"], unittest.equals(true)); unittest.expect(casted5["string"],
unittest.equals('foo')); | 817 var casted5 = (o["x"]) as core.Map; unittest.expect(casted5, unittest.hasLengt
h(3)); unittest.expect(casted5["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted5["bool"], unittest.equals(true)); unittest.expect(casted5["string"],
unittest.equals('foo')); |
| 825 var casted6 = (o["y"]) as core.Map; unittest.expect(casted6, unittest.hasLengt
h(3)); unittest.expect(casted6["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted6["bool"], unittest.equals(true)); unittest.expect(casted6["string"],
unittest.equals('foo')); | 818 var casted6 = (o["y"]) as core.Map; unittest.expect(casted6, unittest.hasLengt
h(3)); unittest.expect(casted6["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted6["bool"], unittest.equals(true)); unittest.expect(casted6["string"],
unittest.equals('foo')); |
| 826 } | 819 } |
| 827 | 820 |
| 828 core.int buildCounterOperation = 0; | 821 core.int buildCounterOperation = 0; |
| 829 buildOperation() { | 822 buildOperation() { |
| 830 var o = new api.Operation(); | 823 var o = new api.Operation(); |
| 831 buildCounterOperation++; | 824 buildCounterOperation++; |
| 832 if (buildCounterOperation < 3) { | 825 if (buildCounterOperation < 3) { |
| 833 o.done = true; | 826 o.done = true; |
| 834 o.error = buildStatus(); | 827 o.error = buildStatus(); |
| 835 o.metadata = buildUnnamed3702(); | 828 o.metadata = buildUnnamed464(); |
| 836 o.name = "foo"; | 829 o.name = "foo"; |
| 837 o.response = buildUnnamed3703(); | 830 o.response = buildUnnamed465(); |
| 838 } | 831 } |
| 839 buildCounterOperation--; | 832 buildCounterOperation--; |
| 840 return o; | 833 return o; |
| 841 } | 834 } |
| 842 | 835 |
| 843 checkOperation(api.Operation o) { | 836 checkOperation(api.Operation o) { |
| 844 buildCounterOperation++; | 837 buildCounterOperation++; |
| 845 if (buildCounterOperation < 3) { | 838 if (buildCounterOperation < 3) { |
| 846 unittest.expect(o.done, unittest.isTrue); | 839 unittest.expect(o.done, unittest.isTrue); |
| 847 checkStatus(o.error); | 840 checkStatus(o.error); |
| 848 checkUnnamed3702(o.metadata); | 841 checkUnnamed464(o.metadata); |
| 849 unittest.expect(o.name, unittest.equals('foo')); | 842 unittest.expect(o.name, unittest.equals('foo')); |
| 850 checkUnnamed3703(o.response); | 843 checkUnnamed465(o.response); |
| 851 } | 844 } |
| 852 buildCounterOperation--; | 845 buildCounterOperation--; |
| 853 } | 846 } |
| 854 | 847 |
| 855 core.int buildCounterOperationMetadata = 0; | 848 core.int buildCounterOperationMetadata = 0; |
| 856 buildOperationMetadata() { | 849 buildOperationMetadata() { |
| 857 var o = new api.OperationMetadata(); | 850 var o = new api.OperationMetadata(); |
| 858 buildCounterOperationMetadata++; | 851 buildCounterOperationMetadata++; |
| 859 if (buildCounterOperationMetadata < 3) { | 852 if (buildCounterOperationMetadata < 3) { |
| 860 o.endTime = "foo"; | 853 o.endTime = "foo"; |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 928 if (buildCounterOperationMetadataV1Beta5 < 3) { | 921 if (buildCounterOperationMetadataV1Beta5 < 3) { |
| 929 unittest.expect(o.endTime, unittest.equals('foo')); | 922 unittest.expect(o.endTime, unittest.equals('foo')); |
| 930 unittest.expect(o.insertTime, unittest.equals('foo')); | 923 unittest.expect(o.insertTime, unittest.equals('foo')); |
| 931 unittest.expect(o.method, unittest.equals('foo')); | 924 unittest.expect(o.method, unittest.equals('foo')); |
| 932 unittest.expect(o.target, unittest.equals('foo')); | 925 unittest.expect(o.target, unittest.equals('foo')); |
| 933 unittest.expect(o.user, unittest.equals('foo')); | 926 unittest.expect(o.user, unittest.equals('foo')); |
| 934 } | 927 } |
| 935 buildCounterOperationMetadataV1Beta5--; | 928 buildCounterOperationMetadataV1Beta5--; |
| 936 } | 929 } |
| 937 | 930 |
| 931 core.int buildCounterRepairApplicationRequest = 0; |
| 932 buildRepairApplicationRequest() { |
| 933 var o = new api.RepairApplicationRequest(); |
| 934 buildCounterRepairApplicationRequest++; |
| 935 if (buildCounterRepairApplicationRequest < 3) { |
| 936 } |
| 937 buildCounterRepairApplicationRequest--; |
| 938 return o; |
| 939 } |
| 940 |
| 941 checkRepairApplicationRequest(api.RepairApplicationRequest o) { |
| 942 buildCounterRepairApplicationRequest++; |
| 943 if (buildCounterRepairApplicationRequest < 3) { |
| 944 } |
| 945 buildCounterRepairApplicationRequest--; |
| 946 } |
| 947 |
| 938 core.int buildCounterRequestUtilization = 0; | 948 core.int buildCounterRequestUtilization = 0; |
| 939 buildRequestUtilization() { | 949 buildRequestUtilization() { |
| 940 var o = new api.RequestUtilization(); | 950 var o = new api.RequestUtilization(); |
| 941 buildCounterRequestUtilization++; | 951 buildCounterRequestUtilization++; |
| 942 if (buildCounterRequestUtilization < 3) { | 952 if (buildCounterRequestUtilization < 3) { |
| 943 o.targetConcurrentRequests = 42; | 953 o.targetConcurrentRequests = 42; |
| 944 o.targetRequestCountPerSec = 42; | 954 o.targetRequestCountPerSecond = 42; |
| 945 } | 955 } |
| 946 buildCounterRequestUtilization--; | 956 buildCounterRequestUtilization--; |
| 947 return o; | 957 return o; |
| 948 } | 958 } |
| 949 | 959 |
| 950 checkRequestUtilization(api.RequestUtilization o) { | 960 checkRequestUtilization(api.RequestUtilization o) { |
| 951 buildCounterRequestUtilization++; | 961 buildCounterRequestUtilization++; |
| 952 if (buildCounterRequestUtilization < 3) { | 962 if (buildCounterRequestUtilization < 3) { |
| 953 unittest.expect(o.targetConcurrentRequests, unittest.equals(42)); | 963 unittest.expect(o.targetConcurrentRequests, unittest.equals(42)); |
| 954 unittest.expect(o.targetRequestCountPerSec, unittest.equals(42)); | 964 unittest.expect(o.targetRequestCountPerSecond, unittest.equals(42)); |
| 955 } | 965 } |
| 956 buildCounterRequestUtilization--; | 966 buildCounterRequestUtilization--; |
| 957 } | 967 } |
| 958 | 968 |
| 959 core.int buildCounterResources = 0; | 969 core.int buildCounterResources = 0; |
| 960 buildResources() { | 970 buildResources() { |
| 961 var o = new api.Resources(); | 971 var o = new api.Resources(); |
| 962 buildCounterResources++; | 972 buildCounterResources++; |
| 963 if (buildCounterResources < 3) { | 973 if (buildCounterResources < 3) { |
| 964 o.cpu = 42.0; | 974 o.cpu = 42.0; |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1014 checkService(api.Service o) { | 1024 checkService(api.Service o) { |
| 1015 buildCounterService++; | 1025 buildCounterService++; |
| 1016 if (buildCounterService < 3) { | 1026 if (buildCounterService < 3) { |
| 1017 unittest.expect(o.id, unittest.equals('foo')); | 1027 unittest.expect(o.id, unittest.equals('foo')); |
| 1018 unittest.expect(o.name, unittest.equals('foo')); | 1028 unittest.expect(o.name, unittest.equals('foo')); |
| 1019 checkTrafficSplit(o.split); | 1029 checkTrafficSplit(o.split); |
| 1020 } | 1030 } |
| 1021 buildCounterService--; | 1031 buildCounterService--; |
| 1022 } | 1032 } |
| 1023 | 1033 |
| 1024 core.int buildCounterSourceReference = 0; | 1034 buildUnnamed466() { |
| 1025 buildSourceReference() { | |
| 1026 var o = new api.SourceReference(); | |
| 1027 buildCounterSourceReference++; | |
| 1028 if (buildCounterSourceReference < 3) { | |
| 1029 o.repository = "foo"; | |
| 1030 o.revisionId = "foo"; | |
| 1031 } | |
| 1032 buildCounterSourceReference--; | |
| 1033 return o; | |
| 1034 } | |
| 1035 | |
| 1036 checkSourceReference(api.SourceReference o) { | |
| 1037 buildCounterSourceReference++; | |
| 1038 if (buildCounterSourceReference < 3) { | |
| 1039 unittest.expect(o.repository, unittest.equals('foo')); | |
| 1040 unittest.expect(o.revisionId, unittest.equals('foo')); | |
| 1041 } | |
| 1042 buildCounterSourceReference--; | |
| 1043 } | |
| 1044 | |
| 1045 buildUnnamed3704() { | |
| 1046 var o = new core.Map<core.String, core.String>(); | 1035 var o = new core.Map<core.String, core.String>(); |
| 1047 o["x"] = "foo"; | 1036 o["x"] = "foo"; |
| 1048 o["y"] = "foo"; | 1037 o["y"] = "foo"; |
| 1049 return o; | 1038 return o; |
| 1050 } | 1039 } |
| 1051 | 1040 |
| 1052 checkUnnamed3704(core.Map<core.String, core.String> o) { | 1041 checkUnnamed466(core.Map<core.String, core.String> o) { |
| 1053 unittest.expect(o, unittest.hasLength(2)); | 1042 unittest.expect(o, unittest.hasLength(2)); |
| 1054 unittest.expect(o["x"], unittest.equals('foo')); | 1043 unittest.expect(o["x"], unittest.equals('foo')); |
| 1055 unittest.expect(o["y"], unittest.equals('foo')); | 1044 unittest.expect(o["y"], unittest.equals('foo')); |
| 1056 } | 1045 } |
| 1057 | 1046 |
| 1058 core.int buildCounterStaticFilesHandler = 0; | 1047 core.int buildCounterStaticFilesHandler = 0; |
| 1059 buildStaticFilesHandler() { | 1048 buildStaticFilesHandler() { |
| 1060 var o = new api.StaticFilesHandler(); | 1049 var o = new api.StaticFilesHandler(); |
| 1061 buildCounterStaticFilesHandler++; | 1050 buildCounterStaticFilesHandler++; |
| 1062 if (buildCounterStaticFilesHandler < 3) { | 1051 if (buildCounterStaticFilesHandler < 3) { |
| 1063 o.applicationReadable = true; | 1052 o.applicationReadable = true; |
| 1064 o.expiration = "foo"; | 1053 o.expiration = "foo"; |
| 1065 o.httpHeaders = buildUnnamed3704(); | 1054 o.httpHeaders = buildUnnamed466(); |
| 1066 o.mimeType = "foo"; | 1055 o.mimeType = "foo"; |
| 1067 o.path = "foo"; | 1056 o.path = "foo"; |
| 1068 o.requireMatchingFile = true; | 1057 o.requireMatchingFile = true; |
| 1069 o.uploadPathRegex = "foo"; | 1058 o.uploadPathRegex = "foo"; |
| 1070 } | 1059 } |
| 1071 buildCounterStaticFilesHandler--; | 1060 buildCounterStaticFilesHandler--; |
| 1072 return o; | 1061 return o; |
| 1073 } | 1062 } |
| 1074 | 1063 |
| 1075 checkStaticFilesHandler(api.StaticFilesHandler o) { | 1064 checkStaticFilesHandler(api.StaticFilesHandler o) { |
| 1076 buildCounterStaticFilesHandler++; | 1065 buildCounterStaticFilesHandler++; |
| 1077 if (buildCounterStaticFilesHandler < 3) { | 1066 if (buildCounterStaticFilesHandler < 3) { |
| 1078 unittest.expect(o.applicationReadable, unittest.isTrue); | 1067 unittest.expect(o.applicationReadable, unittest.isTrue); |
| 1079 unittest.expect(o.expiration, unittest.equals('foo')); | 1068 unittest.expect(o.expiration, unittest.equals('foo')); |
| 1080 checkUnnamed3704(o.httpHeaders); | 1069 checkUnnamed466(o.httpHeaders); |
| 1081 unittest.expect(o.mimeType, unittest.equals('foo')); | 1070 unittest.expect(o.mimeType, unittest.equals('foo')); |
| 1082 unittest.expect(o.path, unittest.equals('foo')); | 1071 unittest.expect(o.path, unittest.equals('foo')); |
| 1083 unittest.expect(o.requireMatchingFile, unittest.isTrue); | 1072 unittest.expect(o.requireMatchingFile, unittest.isTrue); |
| 1084 unittest.expect(o.uploadPathRegex, unittest.equals('foo')); | 1073 unittest.expect(o.uploadPathRegex, unittest.equals('foo')); |
| 1085 } | 1074 } |
| 1086 buildCounterStaticFilesHandler--; | 1075 buildCounterStaticFilesHandler--; |
| 1087 } | 1076 } |
| 1088 | 1077 |
| 1089 buildUnnamed3705() { | 1078 buildUnnamed467() { |
| 1090 var o = new core.Map<core.String, core.Object>(); | 1079 var o = new core.Map<core.String, core.Object>(); |
| 1091 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 1080 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
| 1092 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 1081 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
| 1093 return o; | 1082 return o; |
| 1094 } | 1083 } |
| 1095 | 1084 |
| 1096 checkUnnamed3705(core.Map<core.String, core.Object> o) { | 1085 checkUnnamed467(core.Map<core.String, core.Object> o) { |
| 1097 unittest.expect(o, unittest.hasLength(2)); | 1086 unittest.expect(o, unittest.hasLength(2)); |
| 1098 var casted7 = (o["x"]) as core.Map; unittest.expect(casted7, unittest.hasLengt
h(3)); unittest.expect(casted7["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted7["bool"], unittest.equals(true)); unittest.expect(casted7["string"],
unittest.equals('foo')); | 1087 var casted7 = (o["x"]) as core.Map; unittest.expect(casted7, unittest.hasLengt
h(3)); unittest.expect(casted7["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted7["bool"], unittest.equals(true)); unittest.expect(casted7["string"],
unittest.equals('foo')); |
| 1099 var casted8 = (o["y"]) as core.Map; unittest.expect(casted8, unittest.hasLengt
h(3)); unittest.expect(casted8["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted8["bool"], unittest.equals(true)); unittest.expect(casted8["string"],
unittest.equals('foo')); | 1088 var casted8 = (o["y"]) as core.Map; unittest.expect(casted8, unittest.hasLengt
h(3)); unittest.expect(casted8["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted8["bool"], unittest.equals(true)); unittest.expect(casted8["string"],
unittest.equals('foo')); |
| 1100 } | 1089 } |
| 1101 | 1090 |
| 1102 buildUnnamed3706() { | 1091 buildUnnamed468() { |
| 1103 var o = new core.List<core.Map<core.String, core.Object>>(); | 1092 var o = new core.List<core.Map<core.String, core.Object>>(); |
| 1104 o.add(buildUnnamed3705()); | 1093 o.add(buildUnnamed467()); |
| 1105 o.add(buildUnnamed3705()); | 1094 o.add(buildUnnamed467()); |
| 1106 return o; | 1095 return o; |
| 1107 } | 1096 } |
| 1108 | 1097 |
| 1109 checkUnnamed3706(core.List<core.Map<core.String, core.Object>> o) { | 1098 checkUnnamed468(core.List<core.Map<core.String, core.Object>> o) { |
| 1110 unittest.expect(o, unittest.hasLength(2)); | 1099 unittest.expect(o, unittest.hasLength(2)); |
| 1111 checkUnnamed3705(o[0]); | 1100 checkUnnamed467(o[0]); |
| 1112 checkUnnamed3705(o[1]); | 1101 checkUnnamed467(o[1]); |
| 1113 } | 1102 } |
| 1114 | 1103 |
| 1115 core.int buildCounterStatus = 0; | 1104 core.int buildCounterStatus = 0; |
| 1116 buildStatus() { | 1105 buildStatus() { |
| 1117 var o = new api.Status(); | 1106 var o = new api.Status(); |
| 1118 buildCounterStatus++; | 1107 buildCounterStatus++; |
| 1119 if (buildCounterStatus < 3) { | 1108 if (buildCounterStatus < 3) { |
| 1120 o.code = 42; | 1109 o.code = 42; |
| 1121 o.details = buildUnnamed3706(); | 1110 o.details = buildUnnamed468(); |
| 1122 o.message = "foo"; | 1111 o.message = "foo"; |
| 1123 } | 1112 } |
| 1124 buildCounterStatus--; | 1113 buildCounterStatus--; |
| 1125 return o; | 1114 return o; |
| 1126 } | 1115 } |
| 1127 | 1116 |
| 1128 checkStatus(api.Status o) { | 1117 checkStatus(api.Status o) { |
| 1129 buildCounterStatus++; | 1118 buildCounterStatus++; |
| 1130 if (buildCounterStatus < 3) { | 1119 if (buildCounterStatus < 3) { |
| 1131 unittest.expect(o.code, unittest.equals(42)); | 1120 unittest.expect(o.code, unittest.equals(42)); |
| 1132 checkUnnamed3706(o.details); | 1121 checkUnnamed468(o.details); |
| 1133 unittest.expect(o.message, unittest.equals('foo')); | 1122 unittest.expect(o.message, unittest.equals('foo')); |
| 1134 } | 1123 } |
| 1135 buildCounterStatus--; | 1124 buildCounterStatus--; |
| 1136 } | 1125 } |
| 1137 | 1126 |
| 1138 buildUnnamed3707() { | 1127 buildUnnamed469() { |
| 1139 var o = new core.Map<core.String, core.double>(); | 1128 var o = new core.Map<core.String, core.double>(); |
| 1140 o["x"] = 42.0; | 1129 o["x"] = 42.0; |
| 1141 o["y"] = 42.0; | 1130 o["y"] = 42.0; |
| 1142 return o; | 1131 return o; |
| 1143 } | 1132 } |
| 1144 | 1133 |
| 1145 checkUnnamed3707(core.Map<core.String, core.double> o) { | 1134 checkUnnamed469(core.Map<core.String, core.double> o) { |
| 1146 unittest.expect(o, unittest.hasLength(2)); | 1135 unittest.expect(o, unittest.hasLength(2)); |
| 1147 unittest.expect(o["x"], unittest.equals(42.0)); | 1136 unittest.expect(o["x"], unittest.equals(42.0)); |
| 1148 unittest.expect(o["y"], unittest.equals(42.0)); | 1137 unittest.expect(o["y"], unittest.equals(42.0)); |
| 1149 } | 1138 } |
| 1150 | 1139 |
| 1151 core.int buildCounterTrafficSplit = 0; | 1140 core.int buildCounterTrafficSplit = 0; |
| 1152 buildTrafficSplit() { | 1141 buildTrafficSplit() { |
| 1153 var o = new api.TrafficSplit(); | 1142 var o = new api.TrafficSplit(); |
| 1154 buildCounterTrafficSplit++; | 1143 buildCounterTrafficSplit++; |
| 1155 if (buildCounterTrafficSplit < 3) { | 1144 if (buildCounterTrafficSplit < 3) { |
| 1156 o.allocations = buildUnnamed3707(); | 1145 o.allocations = buildUnnamed469(); |
| 1157 o.shardBy = "foo"; | 1146 o.shardBy = "foo"; |
| 1158 } | 1147 } |
| 1159 buildCounterTrafficSplit--; | 1148 buildCounterTrafficSplit--; |
| 1160 return o; | 1149 return o; |
| 1161 } | 1150 } |
| 1162 | 1151 |
| 1163 checkTrafficSplit(api.TrafficSplit o) { | 1152 checkTrafficSplit(api.TrafficSplit o) { |
| 1164 buildCounterTrafficSplit++; | 1153 buildCounterTrafficSplit++; |
| 1165 if (buildCounterTrafficSplit < 3) { | 1154 if (buildCounterTrafficSplit < 3) { |
| 1166 checkUnnamed3707(o.allocations); | 1155 checkUnnamed469(o.allocations); |
| 1167 unittest.expect(o.shardBy, unittest.equals('foo')); | 1156 unittest.expect(o.shardBy, unittest.equals('foo')); |
| 1168 } | 1157 } |
| 1169 buildCounterTrafficSplit--; | 1158 buildCounterTrafficSplit--; |
| 1170 } | 1159 } |
| 1171 | 1160 |
| 1172 core.int buildCounterUrlDispatchRule = 0; | 1161 core.int buildCounterUrlDispatchRule = 0; |
| 1173 buildUrlDispatchRule() { | 1162 buildUrlDispatchRule() { |
| 1174 var o = new api.UrlDispatchRule(); | 1163 var o = new api.UrlDispatchRule(); |
| 1175 buildCounterUrlDispatchRule++; | 1164 buildCounterUrlDispatchRule++; |
| 1176 if (buildCounterUrlDispatchRule < 3) { | 1165 if (buildCounterUrlDispatchRule < 3) { |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1218 unittest.expect(o.login, unittest.equals('foo')); | 1207 unittest.expect(o.login, unittest.equals('foo')); |
| 1219 unittest.expect(o.redirectHttpResponseCode, unittest.equals('foo')); | 1208 unittest.expect(o.redirectHttpResponseCode, unittest.equals('foo')); |
| 1220 checkScriptHandler(o.script); | 1209 checkScriptHandler(o.script); |
| 1221 unittest.expect(o.securityLevel, unittest.equals('foo')); | 1210 unittest.expect(o.securityLevel, unittest.equals('foo')); |
| 1222 checkStaticFilesHandler(o.staticFiles); | 1211 checkStaticFilesHandler(o.staticFiles); |
| 1223 unittest.expect(o.urlRegex, unittest.equals('foo')); | 1212 unittest.expect(o.urlRegex, unittest.equals('foo')); |
| 1224 } | 1213 } |
| 1225 buildCounterUrlMap--; | 1214 buildCounterUrlMap--; |
| 1226 } | 1215 } |
| 1227 | 1216 |
| 1228 buildUnnamed3708() { | 1217 buildUnnamed470() { |
| 1229 var o = new core.Map<core.String, core.String>(); | 1218 var o = new core.Map<core.String, core.String>(); |
| 1230 o["x"] = "foo"; | 1219 o["x"] = "foo"; |
| 1231 o["y"] = "foo"; | 1220 o["y"] = "foo"; |
| 1232 return o; | 1221 return o; |
| 1233 } | 1222 } |
| 1234 | 1223 |
| 1235 checkUnnamed3708(core.Map<core.String, core.String> o) { | 1224 checkUnnamed470(core.Map<core.String, core.String> o) { |
| 1236 unittest.expect(o, unittest.hasLength(2)); | 1225 unittest.expect(o, unittest.hasLength(2)); |
| 1237 unittest.expect(o["x"], unittest.equals('foo')); | 1226 unittest.expect(o["x"], unittest.equals('foo')); |
| 1238 unittest.expect(o["y"], unittest.equals('foo')); | 1227 unittest.expect(o["y"], unittest.equals('foo')); |
| 1239 } | 1228 } |
| 1240 | 1229 |
| 1241 buildUnnamed3709() { | 1230 buildUnnamed471() { |
| 1242 var o = new core.Map<core.String, core.String>(); | 1231 var o = new core.Map<core.String, core.String>(); |
| 1243 o["x"] = "foo"; | 1232 o["x"] = "foo"; |
| 1244 o["y"] = "foo"; | 1233 o["y"] = "foo"; |
| 1245 return o; | 1234 return o; |
| 1246 } | 1235 } |
| 1247 | 1236 |
| 1248 checkUnnamed3709(core.Map<core.String, core.String> o) { | 1237 checkUnnamed471(core.Map<core.String, core.String> o) { |
| 1249 unittest.expect(o, unittest.hasLength(2)); | 1238 unittest.expect(o, unittest.hasLength(2)); |
| 1250 unittest.expect(o["x"], unittest.equals('foo')); | 1239 unittest.expect(o["x"], unittest.equals('foo')); |
| 1251 unittest.expect(o["y"], unittest.equals('foo')); | 1240 unittest.expect(o["y"], unittest.equals('foo')); |
| 1252 } | 1241 } |
| 1253 | 1242 |
| 1254 buildUnnamed3710() { | 1243 buildUnnamed472() { |
| 1255 var o = new core.List<api.ErrorHandler>(); | 1244 var o = new core.List<api.ErrorHandler>(); |
| 1256 o.add(buildErrorHandler()); | 1245 o.add(buildErrorHandler()); |
| 1257 o.add(buildErrorHandler()); | 1246 o.add(buildErrorHandler()); |
| 1258 return o; | 1247 return o; |
| 1259 } | 1248 } |
| 1260 | 1249 |
| 1261 checkUnnamed3710(core.List<api.ErrorHandler> o) { | 1250 checkUnnamed472(core.List<api.ErrorHandler> o) { |
| 1262 unittest.expect(o, unittest.hasLength(2)); | 1251 unittest.expect(o, unittest.hasLength(2)); |
| 1263 checkErrorHandler(o[0]); | 1252 checkErrorHandler(o[0]); |
| 1264 checkErrorHandler(o[1]); | 1253 checkErrorHandler(o[1]); |
| 1265 } | 1254 } |
| 1266 | 1255 |
| 1267 buildUnnamed3711() { | 1256 buildUnnamed473() { |
| 1268 var o = new core.List<api.UrlMap>(); | 1257 var o = new core.List<api.UrlMap>(); |
| 1269 o.add(buildUrlMap()); | 1258 o.add(buildUrlMap()); |
| 1270 o.add(buildUrlMap()); | 1259 o.add(buildUrlMap()); |
| 1271 return o; | 1260 return o; |
| 1272 } | 1261 } |
| 1273 | 1262 |
| 1274 checkUnnamed3711(core.List<api.UrlMap> o) { | 1263 checkUnnamed473(core.List<api.UrlMap> o) { |
| 1275 unittest.expect(o, unittest.hasLength(2)); | 1264 unittest.expect(o, unittest.hasLength(2)); |
| 1276 checkUrlMap(o[0]); | 1265 checkUrlMap(o[0]); |
| 1277 checkUrlMap(o[1]); | 1266 checkUrlMap(o[1]); |
| 1278 } | 1267 } |
| 1279 | 1268 |
| 1280 buildUnnamed3712() { | 1269 buildUnnamed474() { |
| 1281 var o = new core.List<core.String>(); | 1270 var o = new core.List<core.String>(); |
| 1282 o.add("foo"); | 1271 o.add("foo"); |
| 1283 o.add("foo"); | 1272 o.add("foo"); |
| 1284 return o; | 1273 return o; |
| 1285 } | 1274 } |
| 1286 | 1275 |
| 1287 checkUnnamed3712(core.List<core.String> o) { | 1276 checkUnnamed474(core.List<core.String> o) { |
| 1288 unittest.expect(o, unittest.hasLength(2)); | 1277 unittest.expect(o, unittest.hasLength(2)); |
| 1289 unittest.expect(o[0], unittest.equals('foo')); | 1278 unittest.expect(o[0], unittest.equals('foo')); |
| 1290 unittest.expect(o[1], unittest.equals('foo')); | 1279 unittest.expect(o[1], unittest.equals('foo')); |
| 1291 } | 1280 } |
| 1292 | 1281 |
| 1293 buildUnnamed3713() { | 1282 buildUnnamed475() { |
| 1294 var o = new core.List<api.Library>(); | 1283 var o = new core.List<api.Library>(); |
| 1295 o.add(buildLibrary()); | 1284 o.add(buildLibrary()); |
| 1296 o.add(buildLibrary()); | 1285 o.add(buildLibrary()); |
| 1297 return o; | 1286 return o; |
| 1298 } | 1287 } |
| 1299 | 1288 |
| 1300 checkUnnamed3713(core.List<api.Library> o) { | 1289 checkUnnamed475(core.List<api.Library> o) { |
| 1301 unittest.expect(o, unittest.hasLength(2)); | 1290 unittest.expect(o, unittest.hasLength(2)); |
| 1302 checkLibrary(o[0]); | 1291 checkLibrary(o[0]); |
| 1303 checkLibrary(o[1]); | 1292 checkLibrary(o[1]); |
| 1304 } | 1293 } |
| 1305 | 1294 |
| 1306 core.int buildCounterVersion = 0; | 1295 core.int buildCounterVersion = 0; |
| 1307 buildVersion() { | 1296 buildVersion() { |
| 1308 var o = new api.Version(); | 1297 var o = new api.Version(); |
| 1309 buildCounterVersion++; | 1298 buildCounterVersion++; |
| 1310 if (buildCounterVersion < 3) { | 1299 if (buildCounterVersion < 3) { |
| 1311 o.apiConfig = buildApiConfigHandler(); | 1300 o.apiConfig = buildApiConfigHandler(); |
| 1312 o.automaticScaling = buildAutomaticScaling(); | 1301 o.automaticScaling = buildAutomaticScaling(); |
| 1313 o.basicScaling = buildBasicScaling(); | 1302 o.basicScaling = buildBasicScaling(); |
| 1314 o.betaSettings = buildUnnamed3708(); | 1303 o.betaSettings = buildUnnamed470(); |
| 1315 o.creationTime = "foo"; | 1304 o.createTime = "foo"; |
| 1305 o.createdBy = "foo"; |
| 1316 o.defaultExpiration = "foo"; | 1306 o.defaultExpiration = "foo"; |
| 1317 o.deployer = "foo"; | |
| 1318 o.deployment = buildDeployment(); | 1307 o.deployment = buildDeployment(); |
| 1319 o.diskUsageBytes = "foo"; | 1308 o.diskUsageBytes = "foo"; |
| 1320 o.env = "foo"; | 1309 o.env = "foo"; |
| 1321 o.envVariables = buildUnnamed3709(); | 1310 o.envVariables = buildUnnamed471(); |
| 1322 o.errorHandlers = buildUnnamed3710(); | 1311 o.errorHandlers = buildUnnamed472(); |
| 1323 o.handlers = buildUnnamed3711(); | 1312 o.handlers = buildUnnamed473(); |
| 1324 o.healthCheck = buildHealthCheck(); | 1313 o.healthCheck = buildHealthCheck(); |
| 1325 o.id = "foo"; | 1314 o.id = "foo"; |
| 1326 o.inboundServices = buildUnnamed3712(); | 1315 o.inboundServices = buildUnnamed474(); |
| 1327 o.instanceClass = "foo"; | 1316 o.instanceClass = "foo"; |
| 1328 o.libraries = buildUnnamed3713(); | 1317 o.libraries = buildUnnamed475(); |
| 1329 o.manualScaling = buildManualScaling(); | 1318 o.manualScaling = buildManualScaling(); |
| 1330 o.name = "foo"; | 1319 o.name = "foo"; |
| 1331 o.network = buildNetwork(); | 1320 o.network = buildNetwork(); |
| 1332 o.nobuildFilesRegex = "foo"; | 1321 o.nobuildFilesRegex = "foo"; |
| 1333 o.resources = buildResources(); | 1322 o.resources = buildResources(); |
| 1334 o.runtime = "foo"; | 1323 o.runtime = "foo"; |
| 1335 o.servingStatus = "foo"; | 1324 o.servingStatus = "foo"; |
| 1336 o.threadsafe = true; | 1325 o.threadsafe = true; |
| 1326 o.versionUrl = "foo"; |
| 1337 o.vm = true; | 1327 o.vm = true; |
| 1338 } | 1328 } |
| 1339 buildCounterVersion--; | 1329 buildCounterVersion--; |
| 1340 return o; | 1330 return o; |
| 1341 } | 1331 } |
| 1342 | 1332 |
| 1343 checkVersion(api.Version o) { | 1333 checkVersion(api.Version o) { |
| 1344 buildCounterVersion++; | 1334 buildCounterVersion++; |
| 1345 if (buildCounterVersion < 3) { | 1335 if (buildCounterVersion < 3) { |
| 1346 checkApiConfigHandler(o.apiConfig); | 1336 checkApiConfigHandler(o.apiConfig); |
| 1347 checkAutomaticScaling(o.automaticScaling); | 1337 checkAutomaticScaling(o.automaticScaling); |
| 1348 checkBasicScaling(o.basicScaling); | 1338 checkBasicScaling(o.basicScaling); |
| 1349 checkUnnamed3708(o.betaSettings); | 1339 checkUnnamed470(o.betaSettings); |
| 1350 unittest.expect(o.creationTime, unittest.equals('foo')); | 1340 unittest.expect(o.createTime, unittest.equals('foo')); |
| 1341 unittest.expect(o.createdBy, unittest.equals('foo')); |
| 1351 unittest.expect(o.defaultExpiration, unittest.equals('foo')); | 1342 unittest.expect(o.defaultExpiration, unittest.equals('foo')); |
| 1352 unittest.expect(o.deployer, unittest.equals('foo')); | |
| 1353 checkDeployment(o.deployment); | 1343 checkDeployment(o.deployment); |
| 1354 unittest.expect(o.diskUsageBytes, unittest.equals('foo')); | 1344 unittest.expect(o.diskUsageBytes, unittest.equals('foo')); |
| 1355 unittest.expect(o.env, unittest.equals('foo')); | 1345 unittest.expect(o.env, unittest.equals('foo')); |
| 1356 checkUnnamed3709(o.envVariables); | 1346 checkUnnamed471(o.envVariables); |
| 1357 checkUnnamed3710(o.errorHandlers); | 1347 checkUnnamed472(o.errorHandlers); |
| 1358 checkUnnamed3711(o.handlers); | 1348 checkUnnamed473(o.handlers); |
| 1359 checkHealthCheck(o.healthCheck); | 1349 checkHealthCheck(o.healthCheck); |
| 1360 unittest.expect(o.id, unittest.equals('foo')); | 1350 unittest.expect(o.id, unittest.equals('foo')); |
| 1361 checkUnnamed3712(o.inboundServices); | 1351 checkUnnamed474(o.inboundServices); |
| 1362 unittest.expect(o.instanceClass, unittest.equals('foo')); | 1352 unittest.expect(o.instanceClass, unittest.equals('foo')); |
| 1363 checkUnnamed3713(o.libraries); | 1353 checkUnnamed475(o.libraries); |
| 1364 checkManualScaling(o.manualScaling); | 1354 checkManualScaling(o.manualScaling); |
| 1365 unittest.expect(o.name, unittest.equals('foo')); | 1355 unittest.expect(o.name, unittest.equals('foo')); |
| 1366 checkNetwork(o.network); | 1356 checkNetwork(o.network); |
| 1367 unittest.expect(o.nobuildFilesRegex, unittest.equals('foo')); | 1357 unittest.expect(o.nobuildFilesRegex, unittest.equals('foo')); |
| 1368 checkResources(o.resources); | 1358 checkResources(o.resources); |
| 1369 unittest.expect(o.runtime, unittest.equals('foo')); | 1359 unittest.expect(o.runtime, unittest.equals('foo')); |
| 1370 unittest.expect(o.servingStatus, unittest.equals('foo')); | 1360 unittest.expect(o.servingStatus, unittest.equals('foo')); |
| 1371 unittest.expect(o.threadsafe, unittest.isTrue); | 1361 unittest.expect(o.threadsafe, unittest.isTrue); |
| 1362 unittest.expect(o.versionUrl, unittest.equals('foo')); |
| 1372 unittest.expect(o.vm, unittest.isTrue); | 1363 unittest.expect(o.vm, unittest.isTrue); |
| 1373 } | 1364 } |
| 1374 buildCounterVersion--; | 1365 buildCounterVersion--; |
| 1375 } | 1366 } |
| 1376 | 1367 |
| 1368 core.int buildCounterZipInfo = 0; |
| 1369 buildZipInfo() { |
| 1370 var o = new api.ZipInfo(); |
| 1371 buildCounterZipInfo++; |
| 1372 if (buildCounterZipInfo < 3) { |
| 1373 o.filesCount = 42; |
| 1374 o.sourceUrl = "foo"; |
| 1375 } |
| 1376 buildCounterZipInfo--; |
| 1377 return o; |
| 1378 } |
| 1379 |
| 1380 checkZipInfo(api.ZipInfo o) { |
| 1381 buildCounterZipInfo++; |
| 1382 if (buildCounterZipInfo < 3) { |
| 1383 unittest.expect(o.filesCount, unittest.equals(42)); |
| 1384 unittest.expect(o.sourceUrl, unittest.equals('foo')); |
| 1385 } |
| 1386 buildCounterZipInfo--; |
| 1387 } |
| 1388 |
| 1377 | 1389 |
| 1378 main() { | 1390 main() { |
| 1379 unittest.group("obj-schema-ApiConfigHandler", () { | 1391 unittest.group("obj-schema-ApiConfigHandler", () { |
| 1380 unittest.test("to-json--from-json", () { | 1392 unittest.test("to-json--from-json", () { |
| 1381 var o = buildApiConfigHandler(); | 1393 var o = buildApiConfigHandler(); |
| 1382 var od = new api.ApiConfigHandler.fromJson(o.toJson()); | 1394 var od = new api.ApiConfigHandler.fromJson(o.toJson()); |
| 1383 checkApiConfigHandler(od); | 1395 checkApiConfigHandler(od); |
| 1384 }); | 1396 }); |
| 1385 }); | 1397 }); |
| 1386 | 1398 |
| (...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1630 | 1642 |
| 1631 unittest.group("obj-schema-OperationMetadataV1Beta5", () { | 1643 unittest.group("obj-schema-OperationMetadataV1Beta5", () { |
| 1632 unittest.test("to-json--from-json", () { | 1644 unittest.test("to-json--from-json", () { |
| 1633 var o = buildOperationMetadataV1Beta5(); | 1645 var o = buildOperationMetadataV1Beta5(); |
| 1634 var od = new api.OperationMetadataV1Beta5.fromJson(o.toJson()); | 1646 var od = new api.OperationMetadataV1Beta5.fromJson(o.toJson()); |
| 1635 checkOperationMetadataV1Beta5(od); | 1647 checkOperationMetadataV1Beta5(od); |
| 1636 }); | 1648 }); |
| 1637 }); | 1649 }); |
| 1638 | 1650 |
| 1639 | 1651 |
| 1652 unittest.group("obj-schema-RepairApplicationRequest", () { |
| 1653 unittest.test("to-json--from-json", () { |
| 1654 var o = buildRepairApplicationRequest(); |
| 1655 var od = new api.RepairApplicationRequest.fromJson(o.toJson()); |
| 1656 checkRepairApplicationRequest(od); |
| 1657 }); |
| 1658 }); |
| 1659 |
| 1660 |
| 1640 unittest.group("obj-schema-RequestUtilization", () { | 1661 unittest.group("obj-schema-RequestUtilization", () { |
| 1641 unittest.test("to-json--from-json", () { | 1662 unittest.test("to-json--from-json", () { |
| 1642 var o = buildRequestUtilization(); | 1663 var o = buildRequestUtilization(); |
| 1643 var od = new api.RequestUtilization.fromJson(o.toJson()); | 1664 var od = new api.RequestUtilization.fromJson(o.toJson()); |
| 1644 checkRequestUtilization(od); | 1665 checkRequestUtilization(od); |
| 1645 }); | 1666 }); |
| 1646 }); | 1667 }); |
| 1647 | 1668 |
| 1648 | 1669 |
| 1649 unittest.group("obj-schema-Resources", () { | 1670 unittest.group("obj-schema-Resources", () { |
| (...skipping 16 matching lines...) Expand all Loading... |
| 1666 | 1687 |
| 1667 unittest.group("obj-schema-Service", () { | 1688 unittest.group("obj-schema-Service", () { |
| 1668 unittest.test("to-json--from-json", () { | 1689 unittest.test("to-json--from-json", () { |
| 1669 var o = buildService(); | 1690 var o = buildService(); |
| 1670 var od = new api.Service.fromJson(o.toJson()); | 1691 var od = new api.Service.fromJson(o.toJson()); |
| 1671 checkService(od); | 1692 checkService(od); |
| 1672 }); | 1693 }); |
| 1673 }); | 1694 }); |
| 1674 | 1695 |
| 1675 | 1696 |
| 1676 unittest.group("obj-schema-SourceReference", () { | |
| 1677 unittest.test("to-json--from-json", () { | |
| 1678 var o = buildSourceReference(); | |
| 1679 var od = new api.SourceReference.fromJson(o.toJson()); | |
| 1680 checkSourceReference(od); | |
| 1681 }); | |
| 1682 }); | |
| 1683 | |
| 1684 | |
| 1685 unittest.group("obj-schema-StaticFilesHandler", () { | 1697 unittest.group("obj-schema-StaticFilesHandler", () { |
| 1686 unittest.test("to-json--from-json", () { | 1698 unittest.test("to-json--from-json", () { |
| 1687 var o = buildStaticFilesHandler(); | 1699 var o = buildStaticFilesHandler(); |
| 1688 var od = new api.StaticFilesHandler.fromJson(o.toJson()); | 1700 var od = new api.StaticFilesHandler.fromJson(o.toJson()); |
| 1689 checkStaticFilesHandler(od); | 1701 checkStaticFilesHandler(od); |
| 1690 }); | 1702 }); |
| 1691 }); | 1703 }); |
| 1692 | 1704 |
| 1693 | 1705 |
| 1694 unittest.group("obj-schema-Status", () { | 1706 unittest.group("obj-schema-Status", () { |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1729 | 1741 |
| 1730 unittest.group("obj-schema-Version", () { | 1742 unittest.group("obj-schema-Version", () { |
| 1731 unittest.test("to-json--from-json", () { | 1743 unittest.test("to-json--from-json", () { |
| 1732 var o = buildVersion(); | 1744 var o = buildVersion(); |
| 1733 var od = new api.Version.fromJson(o.toJson()); | 1745 var od = new api.Version.fromJson(o.toJson()); |
| 1734 checkVersion(od); | 1746 checkVersion(od); |
| 1735 }); | 1747 }); |
| 1736 }); | 1748 }); |
| 1737 | 1749 |
| 1738 | 1750 |
| 1751 unittest.group("obj-schema-ZipInfo", () { |
| 1752 unittest.test("to-json--from-json", () { |
| 1753 var o = buildZipInfo(); |
| 1754 var od = new api.ZipInfo.fromJson(o.toJson()); |
| 1755 checkZipInfo(od); |
| 1756 }); |
| 1757 }); |
| 1758 |
| 1759 |
| 1739 unittest.group("resource-AppsResourceApi", () { | 1760 unittest.group("resource-AppsResourceApi", () { |
| 1740 unittest.test("method--create", () { | 1761 unittest.test("method--get", () { |
| 1741 | 1762 |
| 1742 var mock = new HttpServerMock(); | 1763 var mock = new HttpServerMock(); |
| 1743 api.AppsResourceApi res = new api.AppengineApi(mock).apps; | 1764 api.AppsResourceApi res = new api.AppengineApi(mock).apps; |
| 1744 var arg_request = buildApplication(); | 1765 var arg_appsId = "foo"; |
| 1745 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1766 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 1746 var obj = new api.Application.fromJson(json); | |
| 1747 checkApplication(obj); | |
| 1748 | |
| 1749 var path = (req.url).path; | 1767 var path = (req.url).path; |
| 1750 var pathOffset = 0; | 1768 var pathOffset = 0; |
| 1751 var index; | 1769 var index; |
| 1752 var subPart; | 1770 var subPart; |
| 1753 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1771 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1754 pathOffset += 1; | 1772 pathOffset += 1; |
| 1755 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("v1beta5/apps")); | 1773 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1/apps/")); |
| 1756 pathOffset += 12; | 1774 pathOffset += 8; |
| 1775 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| 1776 pathOffset = path.length; |
| 1777 unittest.expect(subPart, unittest.equals("$arg_appsId")); |
| 1757 | 1778 |
| 1758 var query = (req.url).query; | 1779 var query = (req.url).query; |
| 1759 var queryOffset = 0; | 1780 var queryOffset = 0; |
| 1760 var queryMap = {}; | 1781 var queryMap = {}; |
| 1761 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 1782 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 1762 parseBool(n) { | 1783 parseBool(n) { |
| 1763 if (n == "true") return true; | 1784 if (n == "true") return true; |
| 1764 if (n == "false") return false; | 1785 if (n == "false") return false; |
| 1765 if (n == null) return null; | 1786 if (n == null) return null; |
| 1766 throw new core.ArgumentError("Invalid boolean: $n"); | 1787 throw new core.ArgumentError("Invalid boolean: $n"); |
| 1767 } | 1788 } |
| 1768 if (query.length > 0) { | 1789 if (query.length > 0) { |
| 1769 for (var part in query.split("&")) { | 1790 for (var part in query.split("&")) { |
| 1770 var keyvalue = part.split("="); | 1791 var keyvalue = part.split("="); |
| 1771 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1792 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 1772 } | 1793 } |
| 1773 } | 1794 } |
| 1774 | 1795 |
| 1775 | 1796 |
| 1776 var h = { | 1797 var h = { |
| 1777 "content-type" : "application/json; charset=utf-8", | 1798 "content-type" : "application/json; charset=utf-8", |
| 1778 }; | 1799 }; |
| 1779 var resp = convert.JSON.encode(buildOperation()); | 1800 var resp = convert.JSON.encode(buildApplication()); |
| 1780 return new async.Future.value(stringResponse(200, h, resp)); | 1801 return new async.Future.value(stringResponse(200, h, resp)); |
| 1781 }), true); | 1802 }), true); |
| 1782 res.create(arg_request).then(unittest.expectAsync(((api.Operation response
) { | 1803 res.get(arg_appsId).then(unittest.expectAsync(((api.Application response)
{ |
| 1783 checkOperation(response); | 1804 checkApplication(response); |
| 1784 }))); | 1805 }))); |
| 1785 }); | 1806 }); |
| 1786 | 1807 |
| 1787 unittest.test("method--get", () { | 1808 unittest.test("method--repair", () { |
| 1788 | 1809 |
| 1789 var mock = new HttpServerMock(); | 1810 var mock = new HttpServerMock(); |
| 1790 api.AppsResourceApi res = new api.AppengineApi(mock).apps; | 1811 api.AppsResourceApi res = new api.AppengineApi(mock).apps; |
| 1812 var arg_request = buildRepairApplicationRequest(); |
| 1791 var arg_appsId = "foo"; | 1813 var arg_appsId = "foo"; |
| 1792 var arg_ensureResourcesExist = true; | |
| 1793 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1814 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 1815 var obj = new api.RepairApplicationRequest.fromJson(json); |
| 1816 checkRepairApplicationRequest(obj); |
| 1817 |
| 1794 var path = (req.url).path; | 1818 var path = (req.url).path; |
| 1795 var pathOffset = 0; | 1819 var pathOffset = 0; |
| 1796 var index; | 1820 var index; |
| 1797 var subPart; | 1821 var subPart; |
| 1798 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1822 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1799 pathOffset += 1; | 1823 pathOffset += 1; |
| 1800 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("v1beta5/apps/")); | 1824 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1/apps/")); |
| 1801 pathOffset += 13; | 1825 pathOffset += 8; |
| 1802 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | 1826 index = path.indexOf(":repair", pathOffset); |
| 1803 pathOffset = path.length; | 1827 unittest.expect(index >= 0, unittest.isTrue); |
| 1828 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); |
| 1829 pathOffset = index; |
| 1804 unittest.expect(subPart, unittest.equals("$arg_appsId")); | 1830 unittest.expect(subPart, unittest.equals("$arg_appsId")); |
| 1831 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ
als(":repair")); |
| 1832 pathOffset += 7; |
| 1805 | 1833 |
| 1806 var query = (req.url).query; | 1834 var query = (req.url).query; |
| 1807 var queryOffset = 0; | 1835 var queryOffset = 0; |
| 1808 var queryMap = {}; | 1836 var queryMap = {}; |
| 1809 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 1837 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 1810 parseBool(n) { | 1838 parseBool(n) { |
| 1811 if (n == "true") return true; | 1839 if (n == "true") return true; |
| 1812 if (n == "false") return false; | 1840 if (n == "false") return false; |
| 1813 if (n == null) return null; | 1841 if (n == null) return null; |
| 1814 throw new core.ArgumentError("Invalid boolean: $n"); | 1842 throw new core.ArgumentError("Invalid boolean: $n"); |
| 1815 } | 1843 } |
| 1816 if (query.length > 0) { | 1844 if (query.length > 0) { |
| 1817 for (var part in query.split("&")) { | 1845 for (var part in query.split("&")) { |
| 1818 var keyvalue = part.split("="); | 1846 var keyvalue = part.split("="); |
| 1819 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1847 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 1820 } | 1848 } |
| 1821 } | 1849 } |
| 1822 unittest.expect(queryMap["ensureResourcesExist"].first, unittest.equals(
"$arg_ensureResourcesExist")); | |
| 1823 | 1850 |
| 1824 | 1851 |
| 1825 var h = { | 1852 var h = { |
| 1826 "content-type" : "application/json; charset=utf-8", | 1853 "content-type" : "application/json; charset=utf-8", |
| 1827 }; | 1854 }; |
| 1828 var resp = convert.JSON.encode(buildApplication()); | 1855 var resp = convert.JSON.encode(buildOperation()); |
| 1829 return new async.Future.value(stringResponse(200, h, resp)); | 1856 return new async.Future.value(stringResponse(200, h, resp)); |
| 1830 }), true); | 1857 }), true); |
| 1831 res.get(arg_appsId, ensureResourcesExist: arg_ensureResourcesExist).then(u
nittest.expectAsync(((api.Application response) { | 1858 res.repair(arg_request, arg_appsId).then(unittest.expectAsync(((api.Operat
ion response) { |
| 1832 checkApplication(response); | 1859 checkOperation(response); |
| 1833 }))); | 1860 }))); |
| 1834 }); | 1861 }); |
| 1835 | 1862 |
| 1836 }); | 1863 }); |
| 1837 | 1864 |
| 1838 | 1865 |
| 1839 unittest.group("resource-AppsLocationsResourceApi", () { | 1866 unittest.group("resource-AppsLocationsResourceApi", () { |
| 1840 unittest.test("method--get", () { | 1867 unittest.test("method--get", () { |
| 1841 | 1868 |
| 1842 var mock = new HttpServerMock(); | 1869 var mock = new HttpServerMock(); |
| 1843 api.AppsLocationsResourceApi res = new api.AppengineApi(mock).apps.locatio
ns; | 1870 api.AppsLocationsResourceApi res = new api.AppengineApi(mock).apps.locatio
ns; |
| 1844 var arg_appsId = "foo"; | 1871 var arg_appsId = "foo"; |
| 1845 var arg_locationsId = "foo"; | 1872 var arg_locationsId = "foo"; |
| 1846 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1873 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 1847 var path = (req.url).path; | 1874 var path = (req.url).path; |
| 1848 var pathOffset = 0; | 1875 var pathOffset = 0; |
| 1849 var index; | 1876 var index; |
| 1850 var subPart; | 1877 var subPart; |
| 1851 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1878 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1852 pathOffset += 1; | 1879 pathOffset += 1; |
| 1853 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("v1beta5/apps/")); | 1880 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1/apps/")); |
| 1854 pathOffset += 13; | 1881 pathOffset += 8; |
| 1855 index = path.indexOf("/locations/", pathOffset); | 1882 index = path.indexOf("/locations/", pathOffset); |
| 1856 unittest.expect(index >= 0, unittest.isTrue); | 1883 unittest.expect(index >= 0, unittest.isTrue); |
| 1857 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 1884 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); |
| 1858 pathOffset = index; | 1885 pathOffset = index; |
| 1859 unittest.expect(subPart, unittest.equals("$arg_appsId")); | 1886 unittest.expect(subPart, unittest.equals("$arg_appsId")); |
| 1860 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("/locations/")); | 1887 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("/locations/")); |
| 1861 pathOffset += 11; | 1888 pathOffset += 11; |
| 1862 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | 1889 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| 1863 pathOffset = path.length; | 1890 pathOffset = path.length; |
| 1864 unittest.expect(subPart, unittest.equals("$arg_locationsId")); | 1891 unittest.expect(subPart, unittest.equals("$arg_locationsId")); |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1900 var arg_filter = "foo"; | 1927 var arg_filter = "foo"; |
| 1901 var arg_pageSize = 42; | 1928 var arg_pageSize = 42; |
| 1902 var arg_pageToken = "foo"; | 1929 var arg_pageToken = "foo"; |
| 1903 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1930 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 1904 var path = (req.url).path; | 1931 var path = (req.url).path; |
| 1905 var pathOffset = 0; | 1932 var pathOffset = 0; |
| 1906 var index; | 1933 var index; |
| 1907 var subPart; | 1934 var subPart; |
| 1908 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1935 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1909 pathOffset += 1; | 1936 pathOffset += 1; |
| 1910 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("v1beta5/apps/")); | 1937 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1/apps/")); |
| 1911 pathOffset += 13; | 1938 pathOffset += 8; |
| 1912 index = path.indexOf("/locations", pathOffset); | 1939 index = path.indexOf("/locations", pathOffset); |
| 1913 unittest.expect(index >= 0, unittest.isTrue); | 1940 unittest.expect(index >= 0, unittest.isTrue); |
| 1914 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 1941 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); |
| 1915 pathOffset = index; | 1942 pathOffset = index; |
| 1916 unittest.expect(subPart, unittest.equals("$arg_appsId")); | 1943 unittest.expect(subPart, unittest.equals("$arg_appsId")); |
| 1917 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/locations")); | 1944 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/locations")); |
| 1918 pathOffset += 10; | 1945 pathOffset += 10; |
| 1919 | 1946 |
| 1920 var query = (req.url).query; | 1947 var query = (req.url).query; |
| 1921 var queryOffset = 0; | 1948 var queryOffset = 0; |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1959 api.AppsOperationsResourceApi res = new api.AppengineApi(mock).apps.operat
ions; | 1986 api.AppsOperationsResourceApi res = new api.AppengineApi(mock).apps.operat
ions; |
| 1960 var arg_appsId = "foo"; | 1987 var arg_appsId = "foo"; |
| 1961 var arg_operationsId = "foo"; | 1988 var arg_operationsId = "foo"; |
| 1962 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1989 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 1963 var path = (req.url).path; | 1990 var path = (req.url).path; |
| 1964 var pathOffset = 0; | 1991 var pathOffset = 0; |
| 1965 var index; | 1992 var index; |
| 1966 var subPart; | 1993 var subPart; |
| 1967 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1994 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1968 pathOffset += 1; | 1995 pathOffset += 1; |
| 1969 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("v1beta5/apps/")); | 1996 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1/apps/")); |
| 1970 pathOffset += 13; | 1997 pathOffset += 8; |
| 1971 index = path.indexOf("/operations/", pathOffset); | 1998 index = path.indexOf("/operations/", pathOffset); |
| 1972 unittest.expect(index >= 0, unittest.isTrue); | 1999 unittest.expect(index >= 0, unittest.isTrue); |
| 1973 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 2000 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); |
| 1974 pathOffset = index; | 2001 pathOffset = index; |
| 1975 unittest.expect(subPart, unittest.equals("$arg_appsId")); | 2002 unittest.expect(subPart, unittest.equals("$arg_appsId")); |
| 1976 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("/operations/")); | 2003 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("/operations/")); |
| 1977 pathOffset += 12; | 2004 pathOffset += 12; |
| 1978 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | 2005 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| 1979 pathOffset = path.length; | 2006 pathOffset = path.length; |
| 1980 unittest.expect(subPart, unittest.equals("$arg_operationsId")); | 2007 unittest.expect(subPart, unittest.equals("$arg_operationsId")); |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2016 var arg_filter = "foo"; | 2043 var arg_filter = "foo"; |
| 2017 var arg_pageSize = 42; | 2044 var arg_pageSize = 42; |
| 2018 var arg_pageToken = "foo"; | 2045 var arg_pageToken = "foo"; |
| 2019 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2046 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 2020 var path = (req.url).path; | 2047 var path = (req.url).path; |
| 2021 var pathOffset = 0; | 2048 var pathOffset = 0; |
| 2022 var index; | 2049 var index; |
| 2023 var subPart; | 2050 var subPart; |
| 2024 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2051 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2025 pathOffset += 1; | 2052 pathOffset += 1; |
| 2026 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("v1beta5/apps/")); | 2053 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1/apps/")); |
| 2027 pathOffset += 13; | 2054 pathOffset += 8; |
| 2028 index = path.indexOf("/operations", pathOffset); | 2055 index = path.indexOf("/operations", pathOffset); |
| 2029 unittest.expect(index >= 0, unittest.isTrue); | 2056 unittest.expect(index >= 0, unittest.isTrue); |
| 2030 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 2057 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); |
| 2031 pathOffset = index; | 2058 pathOffset = index; |
| 2032 unittest.expect(subPart, unittest.equals("$arg_appsId")); | 2059 unittest.expect(subPart, unittest.equals("$arg_appsId")); |
| 2033 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("/operations")); | 2060 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("/operations")); |
| 2034 pathOffset += 11; | 2061 pathOffset += 11; |
| 2035 | 2062 |
| 2036 var query = (req.url).query; | 2063 var query = (req.url).query; |
| 2037 var queryOffset = 0; | 2064 var queryOffset = 0; |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2075 api.AppsServicesResourceApi res = new api.AppengineApi(mock).apps.services
; | 2102 api.AppsServicesResourceApi res = new api.AppengineApi(mock).apps.services
; |
| 2076 var arg_appsId = "foo"; | 2103 var arg_appsId = "foo"; |
| 2077 var arg_servicesId = "foo"; | 2104 var arg_servicesId = "foo"; |
| 2078 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2105 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 2079 var path = (req.url).path; | 2106 var path = (req.url).path; |
| 2080 var pathOffset = 0; | 2107 var pathOffset = 0; |
| 2081 var index; | 2108 var index; |
| 2082 var subPart; | 2109 var subPart; |
| 2083 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2110 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2084 pathOffset += 1; | 2111 pathOffset += 1; |
| 2085 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("v1beta5/apps/")); | 2112 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1/apps/")); |
| 2086 pathOffset += 13; | 2113 pathOffset += 8; |
| 2087 index = path.indexOf("/services/", pathOffset); | 2114 index = path.indexOf("/services/", pathOffset); |
| 2088 unittest.expect(index >= 0, unittest.isTrue); | 2115 unittest.expect(index >= 0, unittest.isTrue); |
| 2089 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 2116 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); |
| 2090 pathOffset = index; | 2117 pathOffset = index; |
| 2091 unittest.expect(subPart, unittest.equals("$arg_appsId")); | 2118 unittest.expect(subPart, unittest.equals("$arg_appsId")); |
| 2092 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/services/")); | 2119 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/services/")); |
| 2093 pathOffset += 10; | 2120 pathOffset += 10; |
| 2094 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | 2121 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| 2095 pathOffset = path.length; | 2122 pathOffset = path.length; |
| 2096 unittest.expect(subPart, unittest.equals("$arg_servicesId")); | 2123 unittest.expect(subPart, unittest.equals("$arg_servicesId")); |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2130 api.AppsServicesResourceApi res = new api.AppengineApi(mock).apps.services
; | 2157 api.AppsServicesResourceApi res = new api.AppengineApi(mock).apps.services
; |
| 2131 var arg_appsId = "foo"; | 2158 var arg_appsId = "foo"; |
| 2132 var arg_servicesId = "foo"; | 2159 var arg_servicesId = "foo"; |
| 2133 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2160 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 2134 var path = (req.url).path; | 2161 var path = (req.url).path; |
| 2135 var pathOffset = 0; | 2162 var pathOffset = 0; |
| 2136 var index; | 2163 var index; |
| 2137 var subPart; | 2164 var subPart; |
| 2138 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2165 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2139 pathOffset += 1; | 2166 pathOffset += 1; |
| 2140 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("v1beta5/apps/")); | 2167 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1/apps/")); |
| 2141 pathOffset += 13; | 2168 pathOffset += 8; |
| 2142 index = path.indexOf("/services/", pathOffset); | 2169 index = path.indexOf("/services/", pathOffset); |
| 2143 unittest.expect(index >= 0, unittest.isTrue); | 2170 unittest.expect(index >= 0, unittest.isTrue); |
| 2144 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 2171 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); |
| 2145 pathOffset = index; | 2172 pathOffset = index; |
| 2146 unittest.expect(subPart, unittest.equals("$arg_appsId")); | 2173 unittest.expect(subPart, unittest.equals("$arg_appsId")); |
| 2147 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/services/")); | 2174 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/services/")); |
| 2148 pathOffset += 10; | 2175 pathOffset += 10; |
| 2149 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | 2176 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| 2150 pathOffset = path.length; | 2177 pathOffset = path.length; |
| 2151 unittest.expect(subPart, unittest.equals("$arg_servicesId")); | 2178 unittest.expect(subPart, unittest.equals("$arg_servicesId")); |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2186 var arg_appsId = "foo"; | 2213 var arg_appsId = "foo"; |
| 2187 var arg_pageSize = 42; | 2214 var arg_pageSize = 42; |
| 2188 var arg_pageToken = "foo"; | 2215 var arg_pageToken = "foo"; |
| 2189 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2216 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 2190 var path = (req.url).path; | 2217 var path = (req.url).path; |
| 2191 var pathOffset = 0; | 2218 var pathOffset = 0; |
| 2192 var index; | 2219 var index; |
| 2193 var subPart; | 2220 var subPart; |
| 2194 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2221 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2195 pathOffset += 1; | 2222 pathOffset += 1; |
| 2196 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("v1beta5/apps/")); | 2223 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1/apps/")); |
| 2197 pathOffset += 13; | 2224 pathOffset += 8; |
| 2198 index = path.indexOf("/services", pathOffset); | 2225 index = path.indexOf("/services", pathOffset); |
| 2199 unittest.expect(index >= 0, unittest.isTrue); | 2226 unittest.expect(index >= 0, unittest.isTrue); |
| 2200 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 2227 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); |
| 2201 pathOffset = index; | 2228 pathOffset = index; |
| 2202 unittest.expect(subPart, unittest.equals("$arg_appsId")); | 2229 unittest.expect(subPart, unittest.equals("$arg_appsId")); |
| 2203 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("/services")); | 2230 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("/services")); |
| 2204 pathOffset += 9; | 2231 pathOffset += 9; |
| 2205 | 2232 |
| 2206 var query = (req.url).query; | 2233 var query = (req.url).query; |
| 2207 var queryOffset = 0; | 2234 var queryOffset = 0; |
| (...skipping 26 matching lines...) Expand all Loading... |
| 2234 }))); | 2261 }))); |
| 2235 }); | 2262 }); |
| 2236 | 2263 |
| 2237 unittest.test("method--patch", () { | 2264 unittest.test("method--patch", () { |
| 2238 | 2265 |
| 2239 var mock = new HttpServerMock(); | 2266 var mock = new HttpServerMock(); |
| 2240 api.AppsServicesResourceApi res = new api.AppengineApi(mock).apps.services
; | 2267 api.AppsServicesResourceApi res = new api.AppengineApi(mock).apps.services
; |
| 2241 var arg_request = buildService(); | 2268 var arg_request = buildService(); |
| 2242 var arg_appsId = "foo"; | 2269 var arg_appsId = "foo"; |
| 2243 var arg_servicesId = "foo"; | 2270 var arg_servicesId = "foo"; |
| 2244 var arg_mask = "foo"; | 2271 var arg_updateMask = "foo"; |
| 2245 var arg_migrateTraffic = true; | 2272 var arg_migrateTraffic = true; |
| 2246 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2273 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 2247 var obj = new api.Service.fromJson(json); | 2274 var obj = new api.Service.fromJson(json); |
| 2248 checkService(obj); | 2275 checkService(obj); |
| 2249 | 2276 |
| 2250 var path = (req.url).path; | 2277 var path = (req.url).path; |
| 2251 var pathOffset = 0; | 2278 var pathOffset = 0; |
| 2252 var index; | 2279 var index; |
| 2253 var subPart; | 2280 var subPart; |
| 2254 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2281 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2255 pathOffset += 1; | 2282 pathOffset += 1; |
| 2256 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("v1beta5/apps/")); | 2283 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1/apps/")); |
| 2257 pathOffset += 13; | 2284 pathOffset += 8; |
| 2258 index = path.indexOf("/services/", pathOffset); | 2285 index = path.indexOf("/services/", pathOffset); |
| 2259 unittest.expect(index >= 0, unittest.isTrue); | 2286 unittest.expect(index >= 0, unittest.isTrue); |
| 2260 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 2287 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); |
| 2261 pathOffset = index; | 2288 pathOffset = index; |
| 2262 unittest.expect(subPart, unittest.equals("$arg_appsId")); | 2289 unittest.expect(subPart, unittest.equals("$arg_appsId")); |
| 2263 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/services/")); | 2290 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/services/")); |
| 2264 pathOffset += 10; | 2291 pathOffset += 10; |
| 2265 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | 2292 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| 2266 pathOffset = path.length; | 2293 pathOffset = path.length; |
| 2267 unittest.expect(subPart, unittest.equals("$arg_servicesId")); | 2294 unittest.expect(subPart, unittest.equals("$arg_servicesId")); |
| 2268 | 2295 |
| 2269 var query = (req.url).query; | 2296 var query = (req.url).query; |
| 2270 var queryOffset = 0; | 2297 var queryOffset = 0; |
| 2271 var queryMap = {}; | 2298 var queryMap = {}; |
| 2272 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 2299 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 2273 parseBool(n) { | 2300 parseBool(n) { |
| 2274 if (n == "true") return true; | 2301 if (n == "true") return true; |
| 2275 if (n == "false") return false; | 2302 if (n == "false") return false; |
| 2276 if (n == null) return null; | 2303 if (n == null) return null; |
| 2277 throw new core.ArgumentError("Invalid boolean: $n"); | 2304 throw new core.ArgumentError("Invalid boolean: $n"); |
| 2278 } | 2305 } |
| 2279 if (query.length > 0) { | 2306 if (query.length > 0) { |
| 2280 for (var part in query.split("&")) { | 2307 for (var part in query.split("&")) { |
| 2281 var keyvalue = part.split("="); | 2308 var keyvalue = part.split("="); |
| 2282 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2309 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 2283 } | 2310 } |
| 2284 } | 2311 } |
| 2285 unittest.expect(queryMap["mask"].first, unittest.equals(arg_mask)); | 2312 unittest.expect(queryMap["updateMask"].first, unittest.equals(arg_update
Mask)); |
| 2286 unittest.expect(queryMap["migrateTraffic"].first, unittest.equals("$arg_
migrateTraffic")); | 2313 unittest.expect(queryMap["migrateTraffic"].first, unittest.equals("$arg_
migrateTraffic")); |
| 2287 | 2314 |
| 2288 | 2315 |
| 2289 var h = { | 2316 var h = { |
| 2290 "content-type" : "application/json; charset=utf-8", | 2317 "content-type" : "application/json; charset=utf-8", |
| 2291 }; | 2318 }; |
| 2292 var resp = convert.JSON.encode(buildOperation()); | 2319 var resp = convert.JSON.encode(buildOperation()); |
| 2293 return new async.Future.value(stringResponse(200, h, resp)); | 2320 return new async.Future.value(stringResponse(200, h, resp)); |
| 2294 }), true); | 2321 }), true); |
| 2295 res.patch(arg_request, arg_appsId, arg_servicesId, mask: arg_mask, migrate
Traffic: arg_migrateTraffic).then(unittest.expectAsync(((api.Operation response)
{ | 2322 res.patch(arg_request, arg_appsId, arg_servicesId, updateMask: arg_updateM
ask, migrateTraffic: arg_migrateTraffic).then(unittest.expectAsync(((api.Operati
on response) { |
| 2296 checkOperation(response); | 2323 checkOperation(response); |
| 2297 }))); | 2324 }))); |
| 2298 }); | 2325 }); |
| 2299 | 2326 |
| 2300 }); | 2327 }); |
| 2301 | 2328 |
| 2302 | 2329 |
| 2303 unittest.group("resource-AppsServicesVersionsResourceApi", () { | 2330 unittest.group("resource-AppsServicesVersionsResourceApi", () { |
| 2304 unittest.test("method--create", () { | 2331 unittest.test("method--create", () { |
| 2305 | 2332 |
| 2306 var mock = new HttpServerMock(); | 2333 var mock = new HttpServerMock(); |
| 2307 api.AppsServicesVersionsResourceApi res = new api.AppengineApi(mock).apps.
services.versions; | 2334 api.AppsServicesVersionsResourceApi res = new api.AppengineApi(mock).apps.
services.versions; |
| 2308 var arg_request = buildVersion(); | 2335 var arg_request = buildVersion(); |
| 2309 var arg_appsId = "foo"; | 2336 var arg_appsId = "foo"; |
| 2310 var arg_servicesId = "foo"; | 2337 var arg_servicesId = "foo"; |
| 2311 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2338 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 2312 var obj = new api.Version.fromJson(json); | 2339 var obj = new api.Version.fromJson(json); |
| 2313 checkVersion(obj); | 2340 checkVersion(obj); |
| 2314 | 2341 |
| 2315 var path = (req.url).path; | 2342 var path = (req.url).path; |
| 2316 var pathOffset = 0; | 2343 var pathOffset = 0; |
| 2317 var index; | 2344 var index; |
| 2318 var subPart; | 2345 var subPart; |
| 2319 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2346 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2320 pathOffset += 1; | 2347 pathOffset += 1; |
| 2321 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("v1beta5/apps/")); | 2348 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1/apps/")); |
| 2322 pathOffset += 13; | 2349 pathOffset += 8; |
| 2323 index = path.indexOf("/services/", pathOffset); | 2350 index = path.indexOf("/services/", pathOffset); |
| 2324 unittest.expect(index >= 0, unittest.isTrue); | 2351 unittest.expect(index >= 0, unittest.isTrue); |
| 2325 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 2352 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); |
| 2326 pathOffset = index; | 2353 pathOffset = index; |
| 2327 unittest.expect(subPart, unittest.equals("$arg_appsId")); | 2354 unittest.expect(subPart, unittest.equals("$arg_appsId")); |
| 2328 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/services/")); | 2355 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/services/")); |
| 2329 pathOffset += 10; | 2356 pathOffset += 10; |
| 2330 index = path.indexOf("/versions", pathOffset); | 2357 index = path.indexOf("/versions", pathOffset); |
| 2331 unittest.expect(index >= 0, unittest.isTrue); | 2358 unittest.expect(index >= 0, unittest.isTrue); |
| 2332 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 2359 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2371 var arg_appsId = "foo"; | 2398 var arg_appsId = "foo"; |
| 2372 var arg_servicesId = "foo"; | 2399 var arg_servicesId = "foo"; |
| 2373 var arg_versionsId = "foo"; | 2400 var arg_versionsId = "foo"; |
| 2374 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2401 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 2375 var path = (req.url).path; | 2402 var path = (req.url).path; |
| 2376 var pathOffset = 0; | 2403 var pathOffset = 0; |
| 2377 var index; | 2404 var index; |
| 2378 var subPart; | 2405 var subPart; |
| 2379 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2406 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2380 pathOffset += 1; | 2407 pathOffset += 1; |
| 2381 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("v1beta5/apps/")); | 2408 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1/apps/")); |
| 2382 pathOffset += 13; | 2409 pathOffset += 8; |
| 2383 index = path.indexOf("/services/", pathOffset); | 2410 index = path.indexOf("/services/", pathOffset); |
| 2384 unittest.expect(index >= 0, unittest.isTrue); | 2411 unittest.expect(index >= 0, unittest.isTrue); |
| 2385 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 2412 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); |
| 2386 pathOffset = index; | 2413 pathOffset = index; |
| 2387 unittest.expect(subPart, unittest.equals("$arg_appsId")); | 2414 unittest.expect(subPart, unittest.equals("$arg_appsId")); |
| 2388 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/services/")); | 2415 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/services/")); |
| 2389 pathOffset += 10; | 2416 pathOffset += 10; |
| 2390 index = path.indexOf("/versions/", pathOffset); | 2417 index = path.indexOf("/versions/", pathOffset); |
| 2391 unittest.expect(index >= 0, unittest.isTrue); | 2418 unittest.expect(index >= 0, unittest.isTrue); |
| 2392 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 2419 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2435 var arg_servicesId = "foo"; | 2462 var arg_servicesId = "foo"; |
| 2436 var arg_versionsId = "foo"; | 2463 var arg_versionsId = "foo"; |
| 2437 var arg_view = "foo"; | 2464 var arg_view = "foo"; |
| 2438 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2465 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 2439 var path = (req.url).path; | 2466 var path = (req.url).path; |
| 2440 var pathOffset = 0; | 2467 var pathOffset = 0; |
| 2441 var index; | 2468 var index; |
| 2442 var subPart; | 2469 var subPart; |
| 2443 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2470 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2444 pathOffset += 1; | 2471 pathOffset += 1; |
| 2445 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("v1beta5/apps/")); | 2472 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1/apps/")); |
| 2446 pathOffset += 13; | 2473 pathOffset += 8; |
| 2447 index = path.indexOf("/services/", pathOffset); | 2474 index = path.indexOf("/services/", pathOffset); |
| 2448 unittest.expect(index >= 0, unittest.isTrue); | 2475 unittest.expect(index >= 0, unittest.isTrue); |
| 2449 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 2476 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); |
| 2450 pathOffset = index; | 2477 pathOffset = index; |
| 2451 unittest.expect(subPart, unittest.equals("$arg_appsId")); | 2478 unittest.expect(subPart, unittest.equals("$arg_appsId")); |
| 2452 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/services/")); | 2479 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/services/")); |
| 2453 pathOffset += 10; | 2480 pathOffset += 10; |
| 2454 index = path.indexOf("/versions/", pathOffset); | 2481 index = path.indexOf("/versions/", pathOffset); |
| 2455 unittest.expect(index >= 0, unittest.isTrue); | 2482 unittest.expect(index >= 0, unittest.isTrue); |
| 2456 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 2483 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2501 var arg_view = "foo"; | 2528 var arg_view = "foo"; |
| 2502 var arg_pageSize = 42; | 2529 var arg_pageSize = 42; |
| 2503 var arg_pageToken = "foo"; | 2530 var arg_pageToken = "foo"; |
| 2504 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2531 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 2505 var path = (req.url).path; | 2532 var path = (req.url).path; |
| 2506 var pathOffset = 0; | 2533 var pathOffset = 0; |
| 2507 var index; | 2534 var index; |
| 2508 var subPart; | 2535 var subPart; |
| 2509 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2536 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2510 pathOffset += 1; | 2537 pathOffset += 1; |
| 2511 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("v1beta5/apps/")); | 2538 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1/apps/")); |
| 2512 pathOffset += 13; | 2539 pathOffset += 8; |
| 2513 index = path.indexOf("/services/", pathOffset); | 2540 index = path.indexOf("/services/", pathOffset); |
| 2514 unittest.expect(index >= 0, unittest.isTrue); | 2541 unittest.expect(index >= 0, unittest.isTrue); |
| 2515 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 2542 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); |
| 2516 pathOffset = index; | 2543 pathOffset = index; |
| 2517 unittest.expect(subPart, unittest.equals("$arg_appsId")); | 2544 unittest.expect(subPart, unittest.equals("$arg_appsId")); |
| 2518 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/services/")); | 2545 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/services/")); |
| 2519 pathOffset += 10; | 2546 pathOffset += 10; |
| 2520 index = path.indexOf("/versions", pathOffset); | 2547 index = path.indexOf("/versions", pathOffset); |
| 2521 unittest.expect(index >= 0, unittest.isTrue); | 2548 unittest.expect(index >= 0, unittest.isTrue); |
| 2522 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 2549 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2558 }); | 2585 }); |
| 2559 | 2586 |
| 2560 unittest.test("method--patch", () { | 2587 unittest.test("method--patch", () { |
| 2561 | 2588 |
| 2562 var mock = new HttpServerMock(); | 2589 var mock = new HttpServerMock(); |
| 2563 api.AppsServicesVersionsResourceApi res = new api.AppengineApi(mock).apps.
services.versions; | 2590 api.AppsServicesVersionsResourceApi res = new api.AppengineApi(mock).apps.
services.versions; |
| 2564 var arg_request = buildVersion(); | 2591 var arg_request = buildVersion(); |
| 2565 var arg_appsId = "foo"; | 2592 var arg_appsId = "foo"; |
| 2566 var arg_servicesId = "foo"; | 2593 var arg_servicesId = "foo"; |
| 2567 var arg_versionsId = "foo"; | 2594 var arg_versionsId = "foo"; |
| 2568 var arg_mask = "foo"; | 2595 var arg_updateMask = "foo"; |
| 2569 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2596 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 2570 var obj = new api.Version.fromJson(json); | 2597 var obj = new api.Version.fromJson(json); |
| 2571 checkVersion(obj); | 2598 checkVersion(obj); |
| 2572 | 2599 |
| 2573 var path = (req.url).path; | 2600 var path = (req.url).path; |
| 2574 var pathOffset = 0; | 2601 var pathOffset = 0; |
| 2575 var index; | 2602 var index; |
| 2576 var subPart; | 2603 var subPart; |
| 2577 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2604 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2578 pathOffset += 1; | 2605 pathOffset += 1; |
| 2579 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("v1beta5/apps/")); | 2606 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1/apps/")); |
| 2580 pathOffset += 13; | 2607 pathOffset += 8; |
| 2581 index = path.indexOf("/services/", pathOffset); | 2608 index = path.indexOf("/services/", pathOffset); |
| 2582 unittest.expect(index >= 0, unittest.isTrue); | 2609 unittest.expect(index >= 0, unittest.isTrue); |
| 2583 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 2610 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); |
| 2584 pathOffset = index; | 2611 pathOffset = index; |
| 2585 unittest.expect(subPart, unittest.equals("$arg_appsId")); | 2612 unittest.expect(subPart, unittest.equals("$arg_appsId")); |
| 2586 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/services/")); | 2613 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/services/")); |
| 2587 pathOffset += 10; | 2614 pathOffset += 10; |
| 2588 index = path.indexOf("/versions/", pathOffset); | 2615 index = path.indexOf("/versions/", pathOffset); |
| 2589 unittest.expect(index >= 0, unittest.isTrue); | 2616 unittest.expect(index >= 0, unittest.isTrue); |
| 2590 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 2617 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); |
| (...skipping 14 matching lines...) Expand all Loading... |
| 2605 if (n == "false") return false; | 2632 if (n == "false") return false; |
| 2606 if (n == null) return null; | 2633 if (n == null) return null; |
| 2607 throw new core.ArgumentError("Invalid boolean: $n"); | 2634 throw new core.ArgumentError("Invalid boolean: $n"); |
| 2608 } | 2635 } |
| 2609 if (query.length > 0) { | 2636 if (query.length > 0) { |
| 2610 for (var part in query.split("&")) { | 2637 for (var part in query.split("&")) { |
| 2611 var keyvalue = part.split("="); | 2638 var keyvalue = part.split("="); |
| 2612 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2639 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 2613 } | 2640 } |
| 2614 } | 2641 } |
| 2615 unittest.expect(queryMap["mask"].first, unittest.equals(arg_mask)); | 2642 unittest.expect(queryMap["updateMask"].first, unittest.equals(arg_update
Mask)); |
| 2616 | 2643 |
| 2617 | 2644 |
| 2618 var h = { | 2645 var h = { |
| 2619 "content-type" : "application/json; charset=utf-8", | 2646 "content-type" : "application/json; charset=utf-8", |
| 2620 }; | 2647 }; |
| 2621 var resp = convert.JSON.encode(buildOperation()); | 2648 var resp = convert.JSON.encode(buildOperation()); |
| 2622 return new async.Future.value(stringResponse(200, h, resp)); | 2649 return new async.Future.value(stringResponse(200, h, resp)); |
| 2623 }), true); | 2650 }), true); |
| 2624 res.patch(arg_request, arg_appsId, arg_servicesId, arg_versionsId, mask: a
rg_mask).then(unittest.expectAsync(((api.Operation response) { | 2651 res.patch(arg_request, arg_appsId, arg_servicesId, arg_versionsId, updateM
ask: arg_updateMask).then(unittest.expectAsync(((api.Operation response) { |
| 2625 checkOperation(response); | 2652 checkOperation(response); |
| 2626 }))); | 2653 }))); |
| 2627 }); | 2654 }); |
| 2628 | 2655 |
| 2629 }); | 2656 }); |
| 2630 | 2657 |
| 2631 | 2658 |
| 2632 unittest.group("resource-AppsServicesVersionsInstancesResourceApi", () { | 2659 unittest.group("resource-AppsServicesVersionsInstancesResourceApi", () { |
| 2633 unittest.test("method--debug", () { | 2660 unittest.test("method--debug", () { |
| 2634 | 2661 |
| 2635 var mock = new HttpServerMock(); | 2662 var mock = new HttpServerMock(); |
| 2636 api.AppsServicesVersionsInstancesResourceApi res = new api.AppengineApi(mo
ck).apps.services.versions.instances; | 2663 api.AppsServicesVersionsInstancesResourceApi res = new api.AppengineApi(mo
ck).apps.services.versions.instances; |
| 2637 var arg_request = buildDebugInstanceRequest(); | 2664 var arg_request = buildDebugInstanceRequest(); |
| 2638 var arg_appsId = "foo"; | 2665 var arg_appsId = "foo"; |
| 2639 var arg_servicesId = "foo"; | 2666 var arg_servicesId = "foo"; |
| 2640 var arg_versionsId = "foo"; | 2667 var arg_versionsId = "foo"; |
| 2641 var arg_instancesId = "foo"; | 2668 var arg_instancesId = "foo"; |
| 2642 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2669 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 2643 var obj = new api.DebugInstanceRequest.fromJson(json); | 2670 var obj = new api.DebugInstanceRequest.fromJson(json); |
| 2644 checkDebugInstanceRequest(obj); | 2671 checkDebugInstanceRequest(obj); |
| 2645 | 2672 |
| 2646 var path = (req.url).path; | 2673 var path = (req.url).path; |
| 2647 var pathOffset = 0; | 2674 var pathOffset = 0; |
| 2648 var index; | 2675 var index; |
| 2649 var subPart; | 2676 var subPart; |
| 2650 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2677 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2651 pathOffset += 1; | 2678 pathOffset += 1; |
| 2652 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("v1beta5/apps/")); | 2679 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1/apps/")); |
| 2653 pathOffset += 13; | 2680 pathOffset += 8; |
| 2654 index = path.indexOf("/services/", pathOffset); | 2681 index = path.indexOf("/services/", pathOffset); |
| 2655 unittest.expect(index >= 0, unittest.isTrue); | 2682 unittest.expect(index >= 0, unittest.isTrue); |
| 2656 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 2683 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); |
| 2657 pathOffset = index; | 2684 pathOffset = index; |
| 2658 unittest.expect(subPart, unittest.equals("$arg_appsId")); | 2685 unittest.expect(subPart, unittest.equals("$arg_appsId")); |
| 2659 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/services/")); | 2686 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/services/")); |
| 2660 pathOffset += 10; | 2687 pathOffset += 10; |
| 2661 index = path.indexOf("/versions/", pathOffset); | 2688 index = path.indexOf("/versions/", pathOffset); |
| 2662 unittest.expect(index >= 0, unittest.isTrue); | 2689 unittest.expect(index >= 0, unittest.isTrue); |
| 2663 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 2690 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2717 var arg_servicesId = "foo"; | 2744 var arg_servicesId = "foo"; |
| 2718 var arg_versionsId = "foo"; | 2745 var arg_versionsId = "foo"; |
| 2719 var arg_instancesId = "foo"; | 2746 var arg_instancesId = "foo"; |
| 2720 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2747 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 2721 var path = (req.url).path; | 2748 var path = (req.url).path; |
| 2722 var pathOffset = 0; | 2749 var pathOffset = 0; |
| 2723 var index; | 2750 var index; |
| 2724 var subPart; | 2751 var subPart; |
| 2725 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2752 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2726 pathOffset += 1; | 2753 pathOffset += 1; |
| 2727 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("v1beta5/apps/")); | 2754 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1/apps/")); |
| 2728 pathOffset += 13; | 2755 pathOffset += 8; |
| 2729 index = path.indexOf("/services/", pathOffset); | 2756 index = path.indexOf("/services/", pathOffset); |
| 2730 unittest.expect(index >= 0, unittest.isTrue); | 2757 unittest.expect(index >= 0, unittest.isTrue); |
| 2731 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 2758 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); |
| 2732 pathOffset = index; | 2759 pathOffset = index; |
| 2733 unittest.expect(subPart, unittest.equals("$arg_appsId")); | 2760 unittest.expect(subPart, unittest.equals("$arg_appsId")); |
| 2734 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/services/")); | 2761 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/services/")); |
| 2735 pathOffset += 10; | 2762 pathOffset += 10; |
| 2736 index = path.indexOf("/versions/", pathOffset); | 2763 index = path.indexOf("/versions/", pathOffset); |
| 2737 unittest.expect(index >= 0, unittest.isTrue); | 2764 unittest.expect(index >= 0, unittest.isTrue); |
| 2738 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 2765 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2788 var arg_servicesId = "foo"; | 2815 var arg_servicesId = "foo"; |
| 2789 var arg_versionsId = "foo"; | 2816 var arg_versionsId = "foo"; |
| 2790 var arg_instancesId = "foo"; | 2817 var arg_instancesId = "foo"; |
| 2791 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2818 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 2792 var path = (req.url).path; | 2819 var path = (req.url).path; |
| 2793 var pathOffset = 0; | 2820 var pathOffset = 0; |
| 2794 var index; | 2821 var index; |
| 2795 var subPart; | 2822 var subPart; |
| 2796 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2823 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2797 pathOffset += 1; | 2824 pathOffset += 1; |
| 2798 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("v1beta5/apps/")); | 2825 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1/apps/")); |
| 2799 pathOffset += 13; | 2826 pathOffset += 8; |
| 2800 index = path.indexOf("/services/", pathOffset); | 2827 index = path.indexOf("/services/", pathOffset); |
| 2801 unittest.expect(index >= 0, unittest.isTrue); | 2828 unittest.expect(index >= 0, unittest.isTrue); |
| 2802 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 2829 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); |
| 2803 pathOffset = index; | 2830 pathOffset = index; |
| 2804 unittest.expect(subPart, unittest.equals("$arg_appsId")); | 2831 unittest.expect(subPart, unittest.equals("$arg_appsId")); |
| 2805 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/services/")); | 2832 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/services/")); |
| 2806 pathOffset += 10; | 2833 pathOffset += 10; |
| 2807 index = path.indexOf("/versions/", pathOffset); | 2834 index = path.indexOf("/versions/", pathOffset); |
| 2808 unittest.expect(index >= 0, unittest.isTrue); | 2835 unittest.expect(index >= 0, unittest.isTrue); |
| 2809 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 2836 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2860 var arg_versionsId = "foo"; | 2887 var arg_versionsId = "foo"; |
| 2861 var arg_pageSize = 42; | 2888 var arg_pageSize = 42; |
| 2862 var arg_pageToken = "foo"; | 2889 var arg_pageToken = "foo"; |
| 2863 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2890 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 2864 var path = (req.url).path; | 2891 var path = (req.url).path; |
| 2865 var pathOffset = 0; | 2892 var pathOffset = 0; |
| 2866 var index; | 2893 var index; |
| 2867 var subPart; | 2894 var subPart; |
| 2868 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2895 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2869 pathOffset += 1; | 2896 pathOffset += 1; |
| 2870 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("v1beta5/apps/")); | 2897 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1/apps/")); |
| 2871 pathOffset += 13; | 2898 pathOffset += 8; |
| 2872 index = path.indexOf("/services/", pathOffset); | 2899 index = path.indexOf("/services/", pathOffset); |
| 2873 unittest.expect(index >= 0, unittest.isTrue); | 2900 unittest.expect(index >= 0, unittest.isTrue); |
| 2874 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 2901 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); |
| 2875 pathOffset = index; | 2902 pathOffset = index; |
| 2876 unittest.expect(subPart, unittest.equals("$arg_appsId")); | 2903 unittest.expect(subPart, unittest.equals("$arg_appsId")); |
| 2877 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/services/")); | 2904 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/services/")); |
| 2878 pathOffset += 10; | 2905 pathOffset += 10; |
| 2879 index = path.indexOf("/versions/", pathOffset); | 2906 index = path.indexOf("/versions/", pathOffset); |
| 2880 unittest.expect(index >= 0, unittest.isTrue); | 2907 unittest.expect(index >= 0, unittest.isTrue); |
| 2881 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 2908 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2920 res.list(arg_appsId, arg_servicesId, arg_versionsId, pageSize: arg_pageSiz
e, pageToken: arg_pageToken).then(unittest.expectAsync(((api.ListInstancesRespon
se response) { | 2947 res.list(arg_appsId, arg_servicesId, arg_versionsId, pageSize: arg_pageSiz
e, pageToken: arg_pageToken).then(unittest.expectAsync(((api.ListInstancesRespon
se response) { |
| 2921 checkListInstancesResponse(response); | 2948 checkListInstancesResponse(response); |
| 2922 }))); | 2949 }))); |
| 2923 }); | 2950 }); |
| 2924 | 2951 |
| 2925 }); | 2952 }); |
| 2926 | 2953 |
| 2927 | 2954 |
| 2928 } | 2955 } |
| 2929 | 2956 |
| OLD | NEW |