| OLD | NEW |
| (Empty) |
| 1 library googleapis.appengine.v1.test; | |
| 2 | |
| 3 import "dart:core" as core; | |
| 4 import "dart:collection" as collection; | |
| 5 import "dart:async" as async; | |
| 6 import "dart:convert" as convert; | |
| 7 | |
| 8 import 'package:http/http.dart' as http; | |
| 9 import 'package:http/testing.dart' as http_testing; | |
| 10 import 'package:unittest/unittest.dart' as unittest; | |
| 11 | |
| 12 import 'package:googleapis/appengine/v1.dart' as api; | |
| 13 | |
| 14 class HttpServerMock extends http.BaseClient { | |
| 15 core.Function _callback; | |
| 16 core.bool _expectJson; | |
| 17 | |
| 18 void register(core.Function callback, core.bool expectJson) { | |
| 19 _callback = callback; | |
| 20 _expectJson = expectJson; | |
| 21 } | |
| 22 | |
| 23 async.Future<http.StreamedResponse> send(http.BaseRequest request) { | |
| 24 if (_expectJson) { | |
| 25 return request.finalize() | |
| 26 .transform(convert.UTF8.decoder) | |
| 27 .join('') | |
| 28 .then((core.String jsonString) { | |
| 29 if (jsonString.isEmpty) { | |
| 30 return _callback(request, null); | |
| 31 } else { | |
| 32 return _callback(request, convert.JSON.decode(jsonString)); | |
| 33 } | |
| 34 }); | |
| 35 } else { | |
| 36 var stream = request.finalize(); | |
| 37 if (stream == null) { | |
| 38 return _callback(request, []); | |
| 39 } else { | |
| 40 return stream.toBytes().then((data) { | |
| 41 return _callback(request, data); | |
| 42 }); | |
| 43 } | |
| 44 } | |
| 45 } | |
| 46 } | |
| 47 | |
| 48 http.StreamedResponse stringResponse( | |
| 49 core.int status, core.Map headers, core.String body) { | |
| 50 var stream = new async.Stream.fromIterable([convert.UTF8.encode(body)]); | |
| 51 return new http.StreamedResponse(stream, status, headers: headers); | |
| 52 } | |
| 53 | |
| 54 core.int buildCounterApiConfigHandler = 0; | |
| 55 buildApiConfigHandler() { | |
| 56 var o = new api.ApiConfigHandler(); | |
| 57 buildCounterApiConfigHandler++; | |
| 58 if (buildCounterApiConfigHandler < 3) { | |
| 59 o.authFailAction = "foo"; | |
| 60 o.login = "foo"; | |
| 61 o.script = "foo"; | |
| 62 o.securityLevel = "foo"; | |
| 63 o.url = "foo"; | |
| 64 } | |
| 65 buildCounterApiConfigHandler--; | |
| 66 return o; | |
| 67 } | |
| 68 | |
| 69 checkApiConfigHandler(api.ApiConfigHandler o) { | |
| 70 buildCounterApiConfigHandler++; | |
| 71 if (buildCounterApiConfigHandler < 3) { | |
| 72 unittest.expect(o.authFailAction, unittest.equals('foo')); | |
| 73 unittest.expect(o.login, unittest.equals('foo')); | |
| 74 unittest.expect(o.script, unittest.equals('foo')); | |
| 75 unittest.expect(o.securityLevel, unittest.equals('foo')); | |
| 76 unittest.expect(o.url, unittest.equals('foo')); | |
| 77 } | |
| 78 buildCounterApiConfigHandler--; | |
| 79 } | |
| 80 | |
| 81 core.int buildCounterApiEndpointHandler = 0; | |
| 82 buildApiEndpointHandler() { | |
| 83 var o = new api.ApiEndpointHandler(); | |
| 84 buildCounterApiEndpointHandler++; | |
| 85 if (buildCounterApiEndpointHandler < 3) { | |
| 86 o.scriptPath = "foo"; | |
| 87 } | |
| 88 buildCounterApiEndpointHandler--; | |
| 89 return o; | |
| 90 } | |
| 91 | |
| 92 checkApiEndpointHandler(api.ApiEndpointHandler o) { | |
| 93 buildCounterApiEndpointHandler++; | |
| 94 if (buildCounterApiEndpointHandler < 3) { | |
| 95 unittest.expect(o.scriptPath, unittest.equals('foo')); | |
| 96 } | |
| 97 buildCounterApiEndpointHandler--; | |
| 98 } | |
| 99 | |
| 100 buildUnnamed441() { | |
| 101 var o = new core.List<api.UrlDispatchRule>(); | |
| 102 o.add(buildUrlDispatchRule()); | |
| 103 o.add(buildUrlDispatchRule()); | |
| 104 return o; | |
| 105 } | |
| 106 | |
| 107 checkUnnamed441(core.List<api.UrlDispatchRule> o) { | |
| 108 unittest.expect(o, unittest.hasLength(2)); | |
| 109 checkUrlDispatchRule(o[0]); | |
| 110 checkUrlDispatchRule(o[1]); | |
| 111 } | |
| 112 | |
| 113 core.int buildCounterApplication = 0; | |
| 114 buildApplication() { | |
| 115 var o = new api.Application(); | |
| 116 buildCounterApplication++; | |
| 117 if (buildCounterApplication < 3) { | |
| 118 o.authDomain = "foo"; | |
| 119 o.codeBucket = "foo"; | |
| 120 o.defaultBucket = "foo"; | |
| 121 o.defaultCookieExpiration = "foo"; | |
| 122 o.defaultHostname = "foo"; | |
| 123 o.dispatchRules = buildUnnamed441(); | |
| 124 o.id = "foo"; | |
| 125 o.locationId = "foo"; | |
| 126 o.name = "foo"; | |
| 127 } | |
| 128 buildCounterApplication--; | |
| 129 return o; | |
| 130 } | |
| 131 | |
| 132 checkApplication(api.Application o) { | |
| 133 buildCounterApplication++; | |
| 134 if (buildCounterApplication < 3) { | |
| 135 unittest.expect(o.authDomain, unittest.equals('foo')); | |
| 136 unittest.expect(o.codeBucket, unittest.equals('foo')); | |
| 137 unittest.expect(o.defaultBucket, unittest.equals('foo')); | |
| 138 unittest.expect(o.defaultCookieExpiration, unittest.equals('foo')); | |
| 139 unittest.expect(o.defaultHostname, unittest.equals('foo')); | |
| 140 checkUnnamed441(o.dispatchRules); | |
| 141 unittest.expect(o.id, unittest.equals('foo')); | |
| 142 unittest.expect(o.locationId, unittest.equals('foo')); | |
| 143 unittest.expect(o.name, unittest.equals('foo')); | |
| 144 } | |
| 145 buildCounterApplication--; | |
| 146 } | |
| 147 | |
| 148 core.int buildCounterAutomaticScaling = 0; | |
| 149 buildAutomaticScaling() { | |
| 150 var o = new api.AutomaticScaling(); | |
| 151 buildCounterAutomaticScaling++; | |
| 152 if (buildCounterAutomaticScaling < 3) { | |
| 153 o.coolDownPeriod = "foo"; | |
| 154 o.cpuUtilization = buildCpuUtilization(); | |
| 155 o.diskUtilization = buildDiskUtilization(); | |
| 156 o.maxConcurrentRequests = 42; | |
| 157 o.maxIdleInstances = 42; | |
| 158 o.maxPendingLatency = "foo"; | |
| 159 o.maxTotalInstances = 42; | |
| 160 o.minIdleInstances = 42; | |
| 161 o.minPendingLatency = "foo"; | |
| 162 o.minTotalInstances = 42; | |
| 163 o.networkUtilization = buildNetworkUtilization(); | |
| 164 o.requestUtilization = buildRequestUtilization(); | |
| 165 } | |
| 166 buildCounterAutomaticScaling--; | |
| 167 return o; | |
| 168 } | |
| 169 | |
| 170 checkAutomaticScaling(api.AutomaticScaling o) { | |
| 171 buildCounterAutomaticScaling++; | |
| 172 if (buildCounterAutomaticScaling < 3) { | |
| 173 unittest.expect(o.coolDownPeriod, unittest.equals('foo')); | |
| 174 checkCpuUtilization(o.cpuUtilization); | |
| 175 checkDiskUtilization(o.diskUtilization); | |
| 176 unittest.expect(o.maxConcurrentRequests, unittest.equals(42)); | |
| 177 unittest.expect(o.maxIdleInstances, unittest.equals(42)); | |
| 178 unittest.expect(o.maxPendingLatency, unittest.equals('foo')); | |
| 179 unittest.expect(o.maxTotalInstances, unittest.equals(42)); | |
| 180 unittest.expect(o.minIdleInstances, unittest.equals(42)); | |
| 181 unittest.expect(o.minPendingLatency, unittest.equals('foo')); | |
| 182 unittest.expect(o.minTotalInstances, unittest.equals(42)); | |
| 183 checkNetworkUtilization(o.networkUtilization); | |
| 184 checkRequestUtilization(o.requestUtilization); | |
| 185 } | |
| 186 buildCounterAutomaticScaling--; | |
| 187 } | |
| 188 | |
| 189 core.int buildCounterBasicScaling = 0; | |
| 190 buildBasicScaling() { | |
| 191 var o = new api.BasicScaling(); | |
| 192 buildCounterBasicScaling++; | |
| 193 if (buildCounterBasicScaling < 3) { | |
| 194 o.idleTimeout = "foo"; | |
| 195 o.maxInstances = 42; | |
| 196 } | |
| 197 buildCounterBasicScaling--; | |
| 198 return o; | |
| 199 } | |
| 200 | |
| 201 checkBasicScaling(api.BasicScaling o) { | |
| 202 buildCounterBasicScaling++; | |
| 203 if (buildCounterBasicScaling < 3) { | |
| 204 unittest.expect(o.idleTimeout, unittest.equals('foo')); | |
| 205 unittest.expect(o.maxInstances, unittest.equals(42)); | |
| 206 } | |
| 207 buildCounterBasicScaling--; | |
| 208 } | |
| 209 | |
| 210 core.int buildCounterContainerInfo = 0; | |
| 211 buildContainerInfo() { | |
| 212 var o = new api.ContainerInfo(); | |
| 213 buildCounterContainerInfo++; | |
| 214 if (buildCounterContainerInfo < 3) { | |
| 215 o.image = "foo"; | |
| 216 } | |
| 217 buildCounterContainerInfo--; | |
| 218 return o; | |
| 219 } | |
| 220 | |
| 221 checkContainerInfo(api.ContainerInfo o) { | |
| 222 buildCounterContainerInfo++; | |
| 223 if (buildCounterContainerInfo < 3) { | |
| 224 unittest.expect(o.image, unittest.equals('foo')); | |
| 225 } | |
| 226 buildCounterContainerInfo--; | |
| 227 } | |
| 228 | |
| 229 core.int buildCounterCpuUtilization = 0; | |
| 230 buildCpuUtilization() { | |
| 231 var o = new api.CpuUtilization(); | |
| 232 buildCounterCpuUtilization++; | |
| 233 if (buildCounterCpuUtilization < 3) { | |
| 234 o.aggregationWindowLength = "foo"; | |
| 235 o.targetUtilization = 42.0; | |
| 236 } | |
| 237 buildCounterCpuUtilization--; | |
| 238 return o; | |
| 239 } | |
| 240 | |
| 241 checkCpuUtilization(api.CpuUtilization o) { | |
| 242 buildCounterCpuUtilization++; | |
| 243 if (buildCounterCpuUtilization < 3) { | |
| 244 unittest.expect(o.aggregationWindowLength, unittest.equals('foo')); | |
| 245 unittest.expect(o.targetUtilization, unittest.equals(42.0)); | |
| 246 } | |
| 247 buildCounterCpuUtilization--; | |
| 248 } | |
| 249 | |
| 250 buildUnnamed442() { | |
| 251 var o = new core.Map<core.String, api.FileInfo>(); | |
| 252 o["x"] = buildFileInfo(); | |
| 253 o["y"] = buildFileInfo(); | |
| 254 return o; | |
| 255 } | |
| 256 | |
| 257 checkUnnamed442(core.Map<core.String, api.FileInfo> o) { | |
| 258 unittest.expect(o, unittest.hasLength(2)); | |
| 259 checkFileInfo(o["x"]); | |
| 260 checkFileInfo(o["y"]); | |
| 261 } | |
| 262 | |
| 263 core.int buildCounterDeployment = 0; | |
| 264 buildDeployment() { | |
| 265 var o = new api.Deployment(); | |
| 266 buildCounterDeployment++; | |
| 267 if (buildCounterDeployment < 3) { | |
| 268 o.container = buildContainerInfo(); | |
| 269 o.files = buildUnnamed442(); | |
| 270 } | |
| 271 buildCounterDeployment--; | |
| 272 return o; | |
| 273 } | |
| 274 | |
| 275 checkDeployment(api.Deployment o) { | |
| 276 buildCounterDeployment++; | |
| 277 if (buildCounterDeployment < 3) { | |
| 278 checkContainerInfo(o.container); | |
| 279 checkUnnamed442(o.files); | |
| 280 } | |
| 281 buildCounterDeployment--; | |
| 282 } | |
| 283 | |
| 284 core.int buildCounterDiskUtilization = 0; | |
| 285 buildDiskUtilization() { | |
| 286 var o = new api.DiskUtilization(); | |
| 287 buildCounterDiskUtilization++; | |
| 288 if (buildCounterDiskUtilization < 3) { | |
| 289 o.targetReadBytesPerSecond = 42; | |
| 290 o.targetReadOpsPerSecond = 42; | |
| 291 o.targetWriteBytesPerSecond = 42; | |
| 292 o.targetWriteOpsPerSecond = 42; | |
| 293 } | |
| 294 buildCounterDiskUtilization--; | |
| 295 return o; | |
| 296 } | |
| 297 | |
| 298 checkDiskUtilization(api.DiskUtilization o) { | |
| 299 buildCounterDiskUtilization++; | |
| 300 if (buildCounterDiskUtilization < 3) { | |
| 301 unittest.expect(o.targetReadBytesPerSecond, unittest.equals(42)); | |
| 302 unittest.expect(o.targetReadOpsPerSecond, unittest.equals(42)); | |
| 303 unittest.expect(o.targetWriteBytesPerSecond, unittest.equals(42)); | |
| 304 unittest.expect(o.targetWriteOpsPerSecond, unittest.equals(42)); | |
| 305 } | |
| 306 buildCounterDiskUtilization--; | |
| 307 } | |
| 308 | |
| 309 core.int buildCounterErrorHandler = 0; | |
| 310 buildErrorHandler() { | |
| 311 var o = new api.ErrorHandler(); | |
| 312 buildCounterErrorHandler++; | |
| 313 if (buildCounterErrorHandler < 3) { | |
| 314 o.errorCode = "foo"; | |
| 315 o.mimeType = "foo"; | |
| 316 o.staticFile = "foo"; | |
| 317 } | |
| 318 buildCounterErrorHandler--; | |
| 319 return o; | |
| 320 } | |
| 321 | |
| 322 checkErrorHandler(api.ErrorHandler o) { | |
| 323 buildCounterErrorHandler++; | |
| 324 if (buildCounterErrorHandler < 3) { | |
| 325 unittest.expect(o.errorCode, unittest.equals('foo')); | |
| 326 unittest.expect(o.mimeType, unittest.equals('foo')); | |
| 327 unittest.expect(o.staticFile, unittest.equals('foo')); | |
| 328 } | |
| 329 buildCounterErrorHandler--; | |
| 330 } | |
| 331 | |
| 332 core.int buildCounterFileInfo = 0; | |
| 333 buildFileInfo() { | |
| 334 var o = new api.FileInfo(); | |
| 335 buildCounterFileInfo++; | |
| 336 if (buildCounterFileInfo < 3) { | |
| 337 o.mimeType = "foo"; | |
| 338 o.sha1Sum = "foo"; | |
| 339 o.sourceUrl = "foo"; | |
| 340 } | |
| 341 buildCounterFileInfo--; | |
| 342 return o; | |
| 343 } | |
| 344 | |
| 345 checkFileInfo(api.FileInfo o) { | |
| 346 buildCounterFileInfo++; | |
| 347 if (buildCounterFileInfo < 3) { | |
| 348 unittest.expect(o.mimeType, unittest.equals('foo')); | |
| 349 unittest.expect(o.sha1Sum, unittest.equals('foo')); | |
| 350 unittest.expect(o.sourceUrl, unittest.equals('foo')); | |
| 351 } | |
| 352 buildCounterFileInfo--; | |
| 353 } | |
| 354 | |
| 355 core.int buildCounterHealthCheck = 0; | |
| 356 buildHealthCheck() { | |
| 357 var o = new api.HealthCheck(); | |
| 358 buildCounterHealthCheck++; | |
| 359 if (buildCounterHealthCheck < 3) { | |
| 360 o.checkInterval = "foo"; | |
| 361 o.disableHealthCheck = true; | |
| 362 o.healthyThreshold = 42; | |
| 363 o.host = "foo"; | |
| 364 o.restartThreshold = 42; | |
| 365 o.timeout = "foo"; | |
| 366 o.unhealthyThreshold = 42; | |
| 367 } | |
| 368 buildCounterHealthCheck--; | |
| 369 return o; | |
| 370 } | |
| 371 | |
| 372 checkHealthCheck(api.HealthCheck o) { | |
| 373 buildCounterHealthCheck++; | |
| 374 if (buildCounterHealthCheck < 3) { | |
| 375 unittest.expect(o.checkInterval, unittest.equals('foo')); | |
| 376 unittest.expect(o.disableHealthCheck, unittest.isTrue); | |
| 377 unittest.expect(o.healthyThreshold, unittest.equals(42)); | |
| 378 unittest.expect(o.host, unittest.equals('foo')); | |
| 379 unittest.expect(o.restartThreshold, unittest.equals(42)); | |
| 380 unittest.expect(o.timeout, unittest.equals('foo')); | |
| 381 unittest.expect(o.unhealthyThreshold, unittest.equals(42)); | |
| 382 } | |
| 383 buildCounterHealthCheck--; | |
| 384 } | |
| 385 | |
| 386 core.int buildCounterInstance = 0; | |
| 387 buildInstance() { | |
| 388 var o = new api.Instance(); | |
| 389 buildCounterInstance++; | |
| 390 if (buildCounterInstance < 3) { | |
| 391 o.appEngineRelease = "foo"; | |
| 392 o.availability = "foo"; | |
| 393 o.averageLatency = 42; | |
| 394 o.errors = 42; | |
| 395 o.id = "foo"; | |
| 396 o.memoryUsage = "foo"; | |
| 397 o.name = "foo"; | |
| 398 o.qps = 42.0; | |
| 399 o.requests = 42; | |
| 400 o.startTime = "foo"; | |
| 401 o.vmId = "foo"; | |
| 402 o.vmName = "foo"; | |
| 403 o.vmStatus = "foo"; | |
| 404 o.vmUnlocked = true; | |
| 405 o.vmZoneName = "foo"; | |
| 406 } | |
| 407 buildCounterInstance--; | |
| 408 return o; | |
| 409 } | |
| 410 | |
| 411 checkInstance(api.Instance o) { | |
| 412 buildCounterInstance++; | |
| 413 if (buildCounterInstance < 3) { | |
| 414 unittest.expect(o.appEngineRelease, unittest.equals('foo')); | |
| 415 unittest.expect(o.availability, unittest.equals('foo')); | |
| 416 unittest.expect(o.averageLatency, unittest.equals(42)); | |
| 417 unittest.expect(o.errors, unittest.equals(42)); | |
| 418 unittest.expect(o.id, unittest.equals('foo')); | |
| 419 unittest.expect(o.memoryUsage, unittest.equals('foo')); | |
| 420 unittest.expect(o.name, unittest.equals('foo')); | |
| 421 unittest.expect(o.qps, unittest.equals(42.0)); | |
| 422 unittest.expect(o.requests, unittest.equals(42)); | |
| 423 unittest.expect(o.startTime, unittest.equals('foo')); | |
| 424 unittest.expect(o.vmId, unittest.equals('foo')); | |
| 425 unittest.expect(o.vmName, unittest.equals('foo')); | |
| 426 unittest.expect(o.vmStatus, unittest.equals('foo')); | |
| 427 unittest.expect(o.vmUnlocked, unittest.isTrue); | |
| 428 unittest.expect(o.vmZoneName, unittest.equals('foo')); | |
| 429 } | |
| 430 buildCounterInstance--; | |
| 431 } | |
| 432 | |
| 433 core.int buildCounterLibrary = 0; | |
| 434 buildLibrary() { | |
| 435 var o = new api.Library(); | |
| 436 buildCounterLibrary++; | |
| 437 if (buildCounterLibrary < 3) { | |
| 438 o.name = "foo"; | |
| 439 o.version = "foo"; | |
| 440 } | |
| 441 buildCounterLibrary--; | |
| 442 return o; | |
| 443 } | |
| 444 | |
| 445 checkLibrary(api.Library o) { | |
| 446 buildCounterLibrary++; | |
| 447 if (buildCounterLibrary < 3) { | |
| 448 unittest.expect(o.name, unittest.equals('foo')); | |
| 449 unittest.expect(o.version, unittest.equals('foo')); | |
| 450 } | |
| 451 buildCounterLibrary--; | |
| 452 } | |
| 453 | |
| 454 buildUnnamed443() { | |
| 455 var o = new core.List<api.Instance>(); | |
| 456 o.add(buildInstance()); | |
| 457 o.add(buildInstance()); | |
| 458 return o; | |
| 459 } | |
| 460 | |
| 461 checkUnnamed443(core.List<api.Instance> o) { | |
| 462 unittest.expect(o, unittest.hasLength(2)); | |
| 463 checkInstance(o[0]); | |
| 464 checkInstance(o[1]); | |
| 465 } | |
| 466 | |
| 467 core.int buildCounterListInstancesResponse = 0; | |
| 468 buildListInstancesResponse() { | |
| 469 var o = new api.ListInstancesResponse(); | |
| 470 buildCounterListInstancesResponse++; | |
| 471 if (buildCounterListInstancesResponse < 3) { | |
| 472 o.instances = buildUnnamed443(); | |
| 473 o.nextPageToken = "foo"; | |
| 474 } | |
| 475 buildCounterListInstancesResponse--; | |
| 476 return o; | |
| 477 } | |
| 478 | |
| 479 checkListInstancesResponse(api.ListInstancesResponse o) { | |
| 480 buildCounterListInstancesResponse++; | |
| 481 if (buildCounterListInstancesResponse < 3) { | |
| 482 checkUnnamed443(o.instances); | |
| 483 unittest.expect(o.nextPageToken, unittest.equals('foo')); | |
| 484 } | |
| 485 buildCounterListInstancesResponse--; | |
| 486 } | |
| 487 | |
| 488 buildUnnamed444() { | |
| 489 var o = new core.List<api.Operation>(); | |
| 490 o.add(buildOperation()); | |
| 491 o.add(buildOperation()); | |
| 492 return o; | |
| 493 } | |
| 494 | |
| 495 checkUnnamed444(core.List<api.Operation> o) { | |
| 496 unittest.expect(o, unittest.hasLength(2)); | |
| 497 checkOperation(o[0]); | |
| 498 checkOperation(o[1]); | |
| 499 } | |
| 500 | |
| 501 core.int buildCounterListOperationsResponse = 0; | |
| 502 buildListOperationsResponse() { | |
| 503 var o = new api.ListOperationsResponse(); | |
| 504 buildCounterListOperationsResponse++; | |
| 505 if (buildCounterListOperationsResponse < 3) { | |
| 506 o.nextPageToken = "foo"; | |
| 507 o.operations = buildUnnamed444(); | |
| 508 } | |
| 509 buildCounterListOperationsResponse--; | |
| 510 return o; | |
| 511 } | |
| 512 | |
| 513 checkListOperationsResponse(api.ListOperationsResponse o) { | |
| 514 buildCounterListOperationsResponse++; | |
| 515 if (buildCounterListOperationsResponse < 3) { | |
| 516 unittest.expect(o.nextPageToken, unittest.equals('foo')); | |
| 517 checkUnnamed444(o.operations); | |
| 518 } | |
| 519 buildCounterListOperationsResponse--; | |
| 520 } | |
| 521 | |
| 522 buildUnnamed445() { | |
| 523 var o = new core.List<api.Service>(); | |
| 524 o.add(buildService()); | |
| 525 o.add(buildService()); | |
| 526 return o; | |
| 527 } | |
| 528 | |
| 529 checkUnnamed445(core.List<api.Service> o) { | |
| 530 unittest.expect(o, unittest.hasLength(2)); | |
| 531 checkService(o[0]); | |
| 532 checkService(o[1]); | |
| 533 } | |
| 534 | |
| 535 core.int buildCounterListServicesResponse = 0; | |
| 536 buildListServicesResponse() { | |
| 537 var o = new api.ListServicesResponse(); | |
| 538 buildCounterListServicesResponse++; | |
| 539 if (buildCounterListServicesResponse < 3) { | |
| 540 o.nextPageToken = "foo"; | |
| 541 o.services = buildUnnamed445(); | |
| 542 } | |
| 543 buildCounterListServicesResponse--; | |
| 544 return o; | |
| 545 } | |
| 546 | |
| 547 checkListServicesResponse(api.ListServicesResponse o) { | |
| 548 buildCounterListServicesResponse++; | |
| 549 if (buildCounterListServicesResponse < 3) { | |
| 550 unittest.expect(o.nextPageToken, unittest.equals('foo')); | |
| 551 checkUnnamed445(o.services); | |
| 552 } | |
| 553 buildCounterListServicesResponse--; | |
| 554 } | |
| 555 | |
| 556 buildUnnamed446() { | |
| 557 var o = new core.List<api.Version>(); | |
| 558 o.add(buildVersion()); | |
| 559 o.add(buildVersion()); | |
| 560 return o; | |
| 561 } | |
| 562 | |
| 563 checkUnnamed446(core.List<api.Version> o) { | |
| 564 unittest.expect(o, unittest.hasLength(2)); | |
| 565 checkVersion(o[0]); | |
| 566 checkVersion(o[1]); | |
| 567 } | |
| 568 | |
| 569 core.int buildCounterListVersionsResponse = 0; | |
| 570 buildListVersionsResponse() { | |
| 571 var o = new api.ListVersionsResponse(); | |
| 572 buildCounterListVersionsResponse++; | |
| 573 if (buildCounterListVersionsResponse < 3) { | |
| 574 o.nextPageToken = "foo"; | |
| 575 o.versions = buildUnnamed446(); | |
| 576 } | |
| 577 buildCounterListVersionsResponse--; | |
| 578 return o; | |
| 579 } | |
| 580 | |
| 581 checkListVersionsResponse(api.ListVersionsResponse o) { | |
| 582 buildCounterListVersionsResponse++; | |
| 583 if (buildCounterListVersionsResponse < 3) { | |
| 584 unittest.expect(o.nextPageToken, unittest.equals('foo')); | |
| 585 checkUnnamed446(o.versions); | |
| 586 } | |
| 587 buildCounterListVersionsResponse--; | |
| 588 } | |
| 589 | |
| 590 core.int buildCounterLocationMetadata = 0; | |
| 591 buildLocationMetadata() { | |
| 592 var o = new api.LocationMetadata(); | |
| 593 buildCounterLocationMetadata++; | |
| 594 if (buildCounterLocationMetadata < 3) { | |
| 595 } | |
| 596 buildCounterLocationMetadata--; | |
| 597 return o; | |
| 598 } | |
| 599 | |
| 600 checkLocationMetadata(api.LocationMetadata o) { | |
| 601 buildCounterLocationMetadata++; | |
| 602 if (buildCounterLocationMetadata < 3) { | |
| 603 } | |
| 604 buildCounterLocationMetadata--; | |
| 605 } | |
| 606 | |
| 607 core.int buildCounterManualScaling = 0; | |
| 608 buildManualScaling() { | |
| 609 var o = new api.ManualScaling(); | |
| 610 buildCounterManualScaling++; | |
| 611 if (buildCounterManualScaling < 3) { | |
| 612 o.instances = 42; | |
| 613 } | |
| 614 buildCounterManualScaling--; | |
| 615 return o; | |
| 616 } | |
| 617 | |
| 618 checkManualScaling(api.ManualScaling o) { | |
| 619 buildCounterManualScaling++; | |
| 620 if (buildCounterManualScaling < 3) { | |
| 621 unittest.expect(o.instances, unittest.equals(42)); | |
| 622 } | |
| 623 buildCounterManualScaling--; | |
| 624 } | |
| 625 | |
| 626 buildUnnamed447() { | |
| 627 var o = new core.List<core.String>(); | |
| 628 o.add("foo"); | |
| 629 o.add("foo"); | |
| 630 return o; | |
| 631 } | |
| 632 | |
| 633 checkUnnamed447(core.List<core.String> o) { | |
| 634 unittest.expect(o, unittest.hasLength(2)); | |
| 635 unittest.expect(o[0], unittest.equals('foo')); | |
| 636 unittest.expect(o[1], unittest.equals('foo')); | |
| 637 } | |
| 638 | |
| 639 core.int buildCounterNetwork = 0; | |
| 640 buildNetwork() { | |
| 641 var o = new api.Network(); | |
| 642 buildCounterNetwork++; | |
| 643 if (buildCounterNetwork < 3) { | |
| 644 o.forwardedPorts = buildUnnamed447(); | |
| 645 o.instanceTag = "foo"; | |
| 646 o.name = "foo"; | |
| 647 } | |
| 648 buildCounterNetwork--; | |
| 649 return o; | |
| 650 } | |
| 651 | |
| 652 checkNetwork(api.Network o) { | |
| 653 buildCounterNetwork++; | |
| 654 if (buildCounterNetwork < 3) { | |
| 655 checkUnnamed447(o.forwardedPorts); | |
| 656 unittest.expect(o.instanceTag, unittest.equals('foo')); | |
| 657 unittest.expect(o.name, unittest.equals('foo')); | |
| 658 } | |
| 659 buildCounterNetwork--; | |
| 660 } | |
| 661 | |
| 662 core.int buildCounterNetworkUtilization = 0; | |
| 663 buildNetworkUtilization() { | |
| 664 var o = new api.NetworkUtilization(); | |
| 665 buildCounterNetworkUtilization++; | |
| 666 if (buildCounterNetworkUtilization < 3) { | |
| 667 o.targetReceivedBytesPerSecond = 42; | |
| 668 o.targetReceivedPacketsPerSecond = 42; | |
| 669 o.targetSentBytesPerSecond = 42; | |
| 670 o.targetSentPacketsPerSecond = 42; | |
| 671 } | |
| 672 buildCounterNetworkUtilization--; | |
| 673 return o; | |
| 674 } | |
| 675 | |
| 676 checkNetworkUtilization(api.NetworkUtilization o) { | |
| 677 buildCounterNetworkUtilization++; | |
| 678 if (buildCounterNetworkUtilization < 3) { | |
| 679 unittest.expect(o.targetReceivedBytesPerSecond, unittest.equals(42)); | |
| 680 unittest.expect(o.targetReceivedPacketsPerSecond, unittest.equals(42)); | |
| 681 unittest.expect(o.targetSentBytesPerSecond, unittest.equals(42)); | |
| 682 unittest.expect(o.targetSentPacketsPerSecond, unittest.equals(42)); | |
| 683 } | |
| 684 buildCounterNetworkUtilization--; | |
| 685 } | |
| 686 | |
| 687 buildUnnamed448() { | |
| 688 var o = new core.Map<core.String, core.Object>(); | |
| 689 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | |
| 690 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | |
| 691 return o; | |
| 692 } | |
| 693 | |
| 694 checkUnnamed448(core.Map<core.String, core.Object> o) { | |
| 695 unittest.expect(o, unittest.hasLength(2)); | |
| 696 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')); | |
| 697 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')); | |
| 698 } | |
| 699 | |
| 700 buildUnnamed449() { | |
| 701 var o = new core.Map<core.String, core.Object>(); | |
| 702 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | |
| 703 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | |
| 704 return o; | |
| 705 } | |
| 706 | |
| 707 checkUnnamed449(core.Map<core.String, core.Object> o) { | |
| 708 unittest.expect(o, unittest.hasLength(2)); | |
| 709 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')); | |
| 710 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')); | |
| 711 } | |
| 712 | |
| 713 core.int buildCounterOperation = 0; | |
| 714 buildOperation() { | |
| 715 var o = new api.Operation(); | |
| 716 buildCounterOperation++; | |
| 717 if (buildCounterOperation < 3) { | |
| 718 o.done = true; | |
| 719 o.error = buildStatus(); | |
| 720 o.metadata = buildUnnamed448(); | |
| 721 o.name = "foo"; | |
| 722 o.response = buildUnnamed449(); | |
| 723 } | |
| 724 buildCounterOperation--; | |
| 725 return o; | |
| 726 } | |
| 727 | |
| 728 checkOperation(api.Operation o) { | |
| 729 buildCounterOperation++; | |
| 730 if (buildCounterOperation < 3) { | |
| 731 unittest.expect(o.done, unittest.isTrue); | |
| 732 checkStatus(o.error); | |
| 733 checkUnnamed448(o.metadata); | |
| 734 unittest.expect(o.name, unittest.equals('foo')); | |
| 735 checkUnnamed449(o.response); | |
| 736 } | |
| 737 buildCounterOperation--; | |
| 738 } | |
| 739 | |
| 740 core.int buildCounterOperationMetadata = 0; | |
| 741 buildOperationMetadata() { | |
| 742 var o = new api.OperationMetadata(); | |
| 743 buildCounterOperationMetadata++; | |
| 744 if (buildCounterOperationMetadata < 3) { | |
| 745 o.endTime = "foo"; | |
| 746 o.insertTime = "foo"; | |
| 747 o.method = "foo"; | |
| 748 o.operationType = "foo"; | |
| 749 o.target = "foo"; | |
| 750 o.user = "foo"; | |
| 751 } | |
| 752 buildCounterOperationMetadata--; | |
| 753 return o; | |
| 754 } | |
| 755 | |
| 756 checkOperationMetadata(api.OperationMetadata o) { | |
| 757 buildCounterOperationMetadata++; | |
| 758 if (buildCounterOperationMetadata < 3) { | |
| 759 unittest.expect(o.endTime, unittest.equals('foo')); | |
| 760 unittest.expect(o.insertTime, unittest.equals('foo')); | |
| 761 unittest.expect(o.method, unittest.equals('foo')); | |
| 762 unittest.expect(o.operationType, unittest.equals('foo')); | |
| 763 unittest.expect(o.target, unittest.equals('foo')); | |
| 764 unittest.expect(o.user, unittest.equals('foo')); | |
| 765 } | |
| 766 buildCounterOperationMetadata--; | |
| 767 } | |
| 768 | |
| 769 core.int buildCounterOperationMetadataV1 = 0; | |
| 770 buildOperationMetadataV1() { | |
| 771 var o = new api.OperationMetadataV1(); | |
| 772 buildCounterOperationMetadataV1++; | |
| 773 if (buildCounterOperationMetadataV1 < 3) { | |
| 774 o.endTime = "foo"; | |
| 775 o.insertTime = "foo"; | |
| 776 o.method = "foo"; | |
| 777 o.target = "foo"; | |
| 778 o.user = "foo"; | |
| 779 } | |
| 780 buildCounterOperationMetadataV1--; | |
| 781 return o; | |
| 782 } | |
| 783 | |
| 784 checkOperationMetadataV1(api.OperationMetadataV1 o) { | |
| 785 buildCounterOperationMetadataV1++; | |
| 786 if (buildCounterOperationMetadataV1 < 3) { | |
| 787 unittest.expect(o.endTime, unittest.equals('foo')); | |
| 788 unittest.expect(o.insertTime, unittest.equals('foo')); | |
| 789 unittest.expect(o.method, unittest.equals('foo')); | |
| 790 unittest.expect(o.target, unittest.equals('foo')); | |
| 791 unittest.expect(o.user, unittest.equals('foo')); | |
| 792 } | |
| 793 buildCounterOperationMetadataV1--; | |
| 794 } | |
| 795 | |
| 796 core.int buildCounterOperationMetadataV1Beta5 = 0; | |
| 797 buildOperationMetadataV1Beta5() { | |
| 798 var o = new api.OperationMetadataV1Beta5(); | |
| 799 buildCounterOperationMetadataV1Beta5++; | |
| 800 if (buildCounterOperationMetadataV1Beta5 < 3) { | |
| 801 o.endTime = "foo"; | |
| 802 o.insertTime = "foo"; | |
| 803 o.method = "foo"; | |
| 804 o.target = "foo"; | |
| 805 o.user = "foo"; | |
| 806 } | |
| 807 buildCounterOperationMetadataV1Beta5--; | |
| 808 return o; | |
| 809 } | |
| 810 | |
| 811 checkOperationMetadataV1Beta5(api.OperationMetadataV1Beta5 o) { | |
| 812 buildCounterOperationMetadataV1Beta5++; | |
| 813 if (buildCounterOperationMetadataV1Beta5 < 3) { | |
| 814 unittest.expect(o.endTime, unittest.equals('foo')); | |
| 815 unittest.expect(o.insertTime, unittest.equals('foo')); | |
| 816 unittest.expect(o.method, unittest.equals('foo')); | |
| 817 unittest.expect(o.target, unittest.equals('foo')); | |
| 818 unittest.expect(o.user, unittest.equals('foo')); | |
| 819 } | |
| 820 buildCounterOperationMetadataV1Beta5--; | |
| 821 } | |
| 822 | |
| 823 core.int buildCounterRepairApplicationRequest = 0; | |
| 824 buildRepairApplicationRequest() { | |
| 825 var o = new api.RepairApplicationRequest(); | |
| 826 buildCounterRepairApplicationRequest++; | |
| 827 if (buildCounterRepairApplicationRequest < 3) { | |
| 828 } | |
| 829 buildCounterRepairApplicationRequest--; | |
| 830 return o; | |
| 831 } | |
| 832 | |
| 833 checkRepairApplicationRequest(api.RepairApplicationRequest o) { | |
| 834 buildCounterRepairApplicationRequest++; | |
| 835 if (buildCounterRepairApplicationRequest < 3) { | |
| 836 } | |
| 837 buildCounterRepairApplicationRequest--; | |
| 838 } | |
| 839 | |
| 840 core.int buildCounterRequestUtilization = 0; | |
| 841 buildRequestUtilization() { | |
| 842 var o = new api.RequestUtilization(); | |
| 843 buildCounterRequestUtilization++; | |
| 844 if (buildCounterRequestUtilization < 3) { | |
| 845 o.targetConcurrentRequests = 42; | |
| 846 o.targetRequestCountPerSecond = 42; | |
| 847 } | |
| 848 buildCounterRequestUtilization--; | |
| 849 return o; | |
| 850 } | |
| 851 | |
| 852 checkRequestUtilization(api.RequestUtilization o) { | |
| 853 buildCounterRequestUtilization++; | |
| 854 if (buildCounterRequestUtilization < 3) { | |
| 855 unittest.expect(o.targetConcurrentRequests, unittest.equals(42)); | |
| 856 unittest.expect(o.targetRequestCountPerSecond, unittest.equals(42)); | |
| 857 } | |
| 858 buildCounterRequestUtilization--; | |
| 859 } | |
| 860 | |
| 861 core.int buildCounterResources = 0; | |
| 862 buildResources() { | |
| 863 var o = new api.Resources(); | |
| 864 buildCounterResources++; | |
| 865 if (buildCounterResources < 3) { | |
| 866 o.cpu = 42.0; | |
| 867 o.diskGb = 42.0; | |
| 868 o.memoryGb = 42.0; | |
| 869 } | |
| 870 buildCounterResources--; | |
| 871 return o; | |
| 872 } | |
| 873 | |
| 874 checkResources(api.Resources o) { | |
| 875 buildCounterResources++; | |
| 876 if (buildCounterResources < 3) { | |
| 877 unittest.expect(o.cpu, unittest.equals(42.0)); | |
| 878 unittest.expect(o.diskGb, unittest.equals(42.0)); | |
| 879 unittest.expect(o.memoryGb, unittest.equals(42.0)); | |
| 880 } | |
| 881 buildCounterResources--; | |
| 882 } | |
| 883 | |
| 884 core.int buildCounterScriptHandler = 0; | |
| 885 buildScriptHandler() { | |
| 886 var o = new api.ScriptHandler(); | |
| 887 buildCounterScriptHandler++; | |
| 888 if (buildCounterScriptHandler < 3) { | |
| 889 o.scriptPath = "foo"; | |
| 890 } | |
| 891 buildCounterScriptHandler--; | |
| 892 return o; | |
| 893 } | |
| 894 | |
| 895 checkScriptHandler(api.ScriptHandler o) { | |
| 896 buildCounterScriptHandler++; | |
| 897 if (buildCounterScriptHandler < 3) { | |
| 898 unittest.expect(o.scriptPath, unittest.equals('foo')); | |
| 899 } | |
| 900 buildCounterScriptHandler--; | |
| 901 } | |
| 902 | |
| 903 core.int buildCounterService = 0; | |
| 904 buildService() { | |
| 905 var o = new api.Service(); | |
| 906 buildCounterService++; | |
| 907 if (buildCounterService < 3) { | |
| 908 o.id = "foo"; | |
| 909 o.name = "foo"; | |
| 910 o.split = buildTrafficSplit(); | |
| 911 } | |
| 912 buildCounterService--; | |
| 913 return o; | |
| 914 } | |
| 915 | |
| 916 checkService(api.Service o) { | |
| 917 buildCounterService++; | |
| 918 if (buildCounterService < 3) { | |
| 919 unittest.expect(o.id, unittest.equals('foo')); | |
| 920 unittest.expect(o.name, unittest.equals('foo')); | |
| 921 checkTrafficSplit(o.split); | |
| 922 } | |
| 923 buildCounterService--; | |
| 924 } | |
| 925 | |
| 926 buildUnnamed450() { | |
| 927 var o = new core.Map<core.String, core.String>(); | |
| 928 o["x"] = "foo"; | |
| 929 o["y"] = "foo"; | |
| 930 return o; | |
| 931 } | |
| 932 | |
| 933 checkUnnamed450(core.Map<core.String, core.String> o) { | |
| 934 unittest.expect(o, unittest.hasLength(2)); | |
| 935 unittest.expect(o["x"], unittest.equals('foo')); | |
| 936 unittest.expect(o["y"], unittest.equals('foo')); | |
| 937 } | |
| 938 | |
| 939 core.int buildCounterStaticFilesHandler = 0; | |
| 940 buildStaticFilesHandler() { | |
| 941 var o = new api.StaticFilesHandler(); | |
| 942 buildCounterStaticFilesHandler++; | |
| 943 if (buildCounterStaticFilesHandler < 3) { | |
| 944 o.applicationReadable = true; | |
| 945 o.expiration = "foo"; | |
| 946 o.httpHeaders = buildUnnamed450(); | |
| 947 o.mimeType = "foo"; | |
| 948 o.path = "foo"; | |
| 949 o.requireMatchingFile = true; | |
| 950 o.uploadPathRegex = "foo"; | |
| 951 } | |
| 952 buildCounterStaticFilesHandler--; | |
| 953 return o; | |
| 954 } | |
| 955 | |
| 956 checkStaticFilesHandler(api.StaticFilesHandler o) { | |
| 957 buildCounterStaticFilesHandler++; | |
| 958 if (buildCounterStaticFilesHandler < 3) { | |
| 959 unittest.expect(o.applicationReadable, unittest.isTrue); | |
| 960 unittest.expect(o.expiration, unittest.equals('foo')); | |
| 961 checkUnnamed450(o.httpHeaders); | |
| 962 unittest.expect(o.mimeType, unittest.equals('foo')); | |
| 963 unittest.expect(o.path, unittest.equals('foo')); | |
| 964 unittest.expect(o.requireMatchingFile, unittest.isTrue); | |
| 965 unittest.expect(o.uploadPathRegex, unittest.equals('foo')); | |
| 966 } | |
| 967 buildCounterStaticFilesHandler--; | |
| 968 } | |
| 969 | |
| 970 buildUnnamed451() { | |
| 971 var o = new core.Map<core.String, core.Object>(); | |
| 972 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | |
| 973 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | |
| 974 return o; | |
| 975 } | |
| 976 | |
| 977 checkUnnamed451(core.Map<core.String, core.Object> o) { | |
| 978 unittest.expect(o, unittest.hasLength(2)); | |
| 979 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')); | |
| 980 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')); | |
| 981 } | |
| 982 | |
| 983 buildUnnamed452() { | |
| 984 var o = new core.List<core.Map<core.String, core.Object>>(); | |
| 985 o.add(buildUnnamed451()); | |
| 986 o.add(buildUnnamed451()); | |
| 987 return o; | |
| 988 } | |
| 989 | |
| 990 checkUnnamed452(core.List<core.Map<core.String, core.Object>> o) { | |
| 991 unittest.expect(o, unittest.hasLength(2)); | |
| 992 checkUnnamed451(o[0]); | |
| 993 checkUnnamed451(o[1]); | |
| 994 } | |
| 995 | |
| 996 core.int buildCounterStatus = 0; | |
| 997 buildStatus() { | |
| 998 var o = new api.Status(); | |
| 999 buildCounterStatus++; | |
| 1000 if (buildCounterStatus < 3) { | |
| 1001 o.code = 42; | |
| 1002 o.details = buildUnnamed452(); | |
| 1003 o.message = "foo"; | |
| 1004 } | |
| 1005 buildCounterStatus--; | |
| 1006 return o; | |
| 1007 } | |
| 1008 | |
| 1009 checkStatus(api.Status o) { | |
| 1010 buildCounterStatus++; | |
| 1011 if (buildCounterStatus < 3) { | |
| 1012 unittest.expect(o.code, unittest.equals(42)); | |
| 1013 checkUnnamed452(o.details); | |
| 1014 unittest.expect(o.message, unittest.equals('foo')); | |
| 1015 } | |
| 1016 buildCounterStatus--; | |
| 1017 } | |
| 1018 | |
| 1019 buildUnnamed453() { | |
| 1020 var o = new core.Map<core.String, core.double>(); | |
| 1021 o["x"] = 42.0; | |
| 1022 o["y"] = 42.0; | |
| 1023 return o; | |
| 1024 } | |
| 1025 | |
| 1026 checkUnnamed453(core.Map<core.String, core.double> o) { | |
| 1027 unittest.expect(o, unittest.hasLength(2)); | |
| 1028 unittest.expect(o["x"], unittest.equals(42.0)); | |
| 1029 unittest.expect(o["y"], unittest.equals(42.0)); | |
| 1030 } | |
| 1031 | |
| 1032 core.int buildCounterTrafficSplit = 0; | |
| 1033 buildTrafficSplit() { | |
| 1034 var o = new api.TrafficSplit(); | |
| 1035 buildCounterTrafficSplit++; | |
| 1036 if (buildCounterTrafficSplit < 3) { | |
| 1037 o.allocations = buildUnnamed453(); | |
| 1038 o.shardBy = "foo"; | |
| 1039 } | |
| 1040 buildCounterTrafficSplit--; | |
| 1041 return o; | |
| 1042 } | |
| 1043 | |
| 1044 checkTrafficSplit(api.TrafficSplit o) { | |
| 1045 buildCounterTrafficSplit++; | |
| 1046 if (buildCounterTrafficSplit < 3) { | |
| 1047 checkUnnamed453(o.allocations); | |
| 1048 unittest.expect(o.shardBy, unittest.equals('foo')); | |
| 1049 } | |
| 1050 buildCounterTrafficSplit--; | |
| 1051 } | |
| 1052 | |
| 1053 core.int buildCounterUrlDispatchRule = 0; | |
| 1054 buildUrlDispatchRule() { | |
| 1055 var o = new api.UrlDispatchRule(); | |
| 1056 buildCounterUrlDispatchRule++; | |
| 1057 if (buildCounterUrlDispatchRule < 3) { | |
| 1058 o.domain = "foo"; | |
| 1059 o.path = "foo"; | |
| 1060 o.service = "foo"; | |
| 1061 } | |
| 1062 buildCounterUrlDispatchRule--; | |
| 1063 return o; | |
| 1064 } | |
| 1065 | |
| 1066 checkUrlDispatchRule(api.UrlDispatchRule o) { | |
| 1067 buildCounterUrlDispatchRule++; | |
| 1068 if (buildCounterUrlDispatchRule < 3) { | |
| 1069 unittest.expect(o.domain, unittest.equals('foo')); | |
| 1070 unittest.expect(o.path, unittest.equals('foo')); | |
| 1071 unittest.expect(o.service, unittest.equals('foo')); | |
| 1072 } | |
| 1073 buildCounterUrlDispatchRule--; | |
| 1074 } | |
| 1075 | |
| 1076 core.int buildCounterUrlMap = 0; | |
| 1077 buildUrlMap() { | |
| 1078 var o = new api.UrlMap(); | |
| 1079 buildCounterUrlMap++; | |
| 1080 if (buildCounterUrlMap < 3) { | |
| 1081 o.apiEndpoint = buildApiEndpointHandler(); | |
| 1082 o.authFailAction = "foo"; | |
| 1083 o.login = "foo"; | |
| 1084 o.redirectHttpResponseCode = "foo"; | |
| 1085 o.script = buildScriptHandler(); | |
| 1086 o.securityLevel = "foo"; | |
| 1087 o.staticFiles = buildStaticFilesHandler(); | |
| 1088 o.urlRegex = "foo"; | |
| 1089 } | |
| 1090 buildCounterUrlMap--; | |
| 1091 return o; | |
| 1092 } | |
| 1093 | |
| 1094 checkUrlMap(api.UrlMap o) { | |
| 1095 buildCounterUrlMap++; | |
| 1096 if (buildCounterUrlMap < 3) { | |
| 1097 checkApiEndpointHandler(o.apiEndpoint); | |
| 1098 unittest.expect(o.authFailAction, unittest.equals('foo')); | |
| 1099 unittest.expect(o.login, unittest.equals('foo')); | |
| 1100 unittest.expect(o.redirectHttpResponseCode, unittest.equals('foo')); | |
| 1101 checkScriptHandler(o.script); | |
| 1102 unittest.expect(o.securityLevel, unittest.equals('foo')); | |
| 1103 checkStaticFilesHandler(o.staticFiles); | |
| 1104 unittest.expect(o.urlRegex, unittest.equals('foo')); | |
| 1105 } | |
| 1106 buildCounterUrlMap--; | |
| 1107 } | |
| 1108 | |
| 1109 buildUnnamed454() { | |
| 1110 var o = new core.Map<core.String, core.String>(); | |
| 1111 o["x"] = "foo"; | |
| 1112 o["y"] = "foo"; | |
| 1113 return o; | |
| 1114 } | |
| 1115 | |
| 1116 checkUnnamed454(core.Map<core.String, core.String> o) { | |
| 1117 unittest.expect(o, unittest.hasLength(2)); | |
| 1118 unittest.expect(o["x"], unittest.equals('foo')); | |
| 1119 unittest.expect(o["y"], unittest.equals('foo')); | |
| 1120 } | |
| 1121 | |
| 1122 buildUnnamed455() { | |
| 1123 var o = new core.Map<core.String, core.String>(); | |
| 1124 o["x"] = "foo"; | |
| 1125 o["y"] = "foo"; | |
| 1126 return o; | |
| 1127 } | |
| 1128 | |
| 1129 checkUnnamed455(core.Map<core.String, core.String> o) { | |
| 1130 unittest.expect(o, unittest.hasLength(2)); | |
| 1131 unittest.expect(o["x"], unittest.equals('foo')); | |
| 1132 unittest.expect(o["y"], unittest.equals('foo')); | |
| 1133 } | |
| 1134 | |
| 1135 buildUnnamed456() { | |
| 1136 var o = new core.List<api.ErrorHandler>(); | |
| 1137 o.add(buildErrorHandler()); | |
| 1138 o.add(buildErrorHandler()); | |
| 1139 return o; | |
| 1140 } | |
| 1141 | |
| 1142 checkUnnamed456(core.List<api.ErrorHandler> o) { | |
| 1143 unittest.expect(o, unittest.hasLength(2)); | |
| 1144 checkErrorHandler(o[0]); | |
| 1145 checkErrorHandler(o[1]); | |
| 1146 } | |
| 1147 | |
| 1148 buildUnnamed457() { | |
| 1149 var o = new core.List<api.UrlMap>(); | |
| 1150 o.add(buildUrlMap()); | |
| 1151 o.add(buildUrlMap()); | |
| 1152 return o; | |
| 1153 } | |
| 1154 | |
| 1155 checkUnnamed457(core.List<api.UrlMap> o) { | |
| 1156 unittest.expect(o, unittest.hasLength(2)); | |
| 1157 checkUrlMap(o[0]); | |
| 1158 checkUrlMap(o[1]); | |
| 1159 } | |
| 1160 | |
| 1161 buildUnnamed458() { | |
| 1162 var o = new core.List<core.String>(); | |
| 1163 o.add("foo"); | |
| 1164 o.add("foo"); | |
| 1165 return o; | |
| 1166 } | |
| 1167 | |
| 1168 checkUnnamed458(core.List<core.String> o) { | |
| 1169 unittest.expect(o, unittest.hasLength(2)); | |
| 1170 unittest.expect(o[0], unittest.equals('foo')); | |
| 1171 unittest.expect(o[1], unittest.equals('foo')); | |
| 1172 } | |
| 1173 | |
| 1174 buildUnnamed459() { | |
| 1175 var o = new core.List<api.Library>(); | |
| 1176 o.add(buildLibrary()); | |
| 1177 o.add(buildLibrary()); | |
| 1178 return o; | |
| 1179 } | |
| 1180 | |
| 1181 checkUnnamed459(core.List<api.Library> o) { | |
| 1182 unittest.expect(o, unittest.hasLength(2)); | |
| 1183 checkLibrary(o[0]); | |
| 1184 checkLibrary(o[1]); | |
| 1185 } | |
| 1186 | |
| 1187 core.int buildCounterVersion = 0; | |
| 1188 buildVersion() { | |
| 1189 var o = new api.Version(); | |
| 1190 buildCounterVersion++; | |
| 1191 if (buildCounterVersion < 3) { | |
| 1192 o.apiConfig = buildApiConfigHandler(); | |
| 1193 o.automaticScaling = buildAutomaticScaling(); | |
| 1194 o.basicScaling = buildBasicScaling(); | |
| 1195 o.betaSettings = buildUnnamed454(); | |
| 1196 o.createTime = "foo"; | |
| 1197 o.createdBy = "foo"; | |
| 1198 o.defaultExpiration = "foo"; | |
| 1199 o.deployment = buildDeployment(); | |
| 1200 o.diskUsageBytes = "foo"; | |
| 1201 o.env = "foo"; | |
| 1202 o.envVariables = buildUnnamed455(); | |
| 1203 o.errorHandlers = buildUnnamed456(); | |
| 1204 o.handlers = buildUnnamed457(); | |
| 1205 o.healthCheck = buildHealthCheck(); | |
| 1206 o.id = "foo"; | |
| 1207 o.inboundServices = buildUnnamed458(); | |
| 1208 o.instanceClass = "foo"; | |
| 1209 o.libraries = buildUnnamed459(); | |
| 1210 o.manualScaling = buildManualScaling(); | |
| 1211 o.name = "foo"; | |
| 1212 o.network = buildNetwork(); | |
| 1213 o.nobuildFilesRegex = "foo"; | |
| 1214 o.resources = buildResources(); | |
| 1215 o.runtime = "foo"; | |
| 1216 o.servingStatus = "foo"; | |
| 1217 o.threadsafe = true; | |
| 1218 o.versionUrl = "foo"; | |
| 1219 o.vm = true; | |
| 1220 } | |
| 1221 buildCounterVersion--; | |
| 1222 return o; | |
| 1223 } | |
| 1224 | |
| 1225 checkVersion(api.Version o) { | |
| 1226 buildCounterVersion++; | |
| 1227 if (buildCounterVersion < 3) { | |
| 1228 checkApiConfigHandler(o.apiConfig); | |
| 1229 checkAutomaticScaling(o.automaticScaling); | |
| 1230 checkBasicScaling(o.basicScaling); | |
| 1231 checkUnnamed454(o.betaSettings); | |
| 1232 unittest.expect(o.createTime, unittest.equals('foo')); | |
| 1233 unittest.expect(o.createdBy, unittest.equals('foo')); | |
| 1234 unittest.expect(o.defaultExpiration, unittest.equals('foo')); | |
| 1235 checkDeployment(o.deployment); | |
| 1236 unittest.expect(o.diskUsageBytes, unittest.equals('foo')); | |
| 1237 unittest.expect(o.env, unittest.equals('foo')); | |
| 1238 checkUnnamed455(o.envVariables); | |
| 1239 checkUnnamed456(o.errorHandlers); | |
| 1240 checkUnnamed457(o.handlers); | |
| 1241 checkHealthCheck(o.healthCheck); | |
| 1242 unittest.expect(o.id, unittest.equals('foo')); | |
| 1243 checkUnnamed458(o.inboundServices); | |
| 1244 unittest.expect(o.instanceClass, unittest.equals('foo')); | |
| 1245 checkUnnamed459(o.libraries); | |
| 1246 checkManualScaling(o.manualScaling); | |
| 1247 unittest.expect(o.name, unittest.equals('foo')); | |
| 1248 checkNetwork(o.network); | |
| 1249 unittest.expect(o.nobuildFilesRegex, unittest.equals('foo')); | |
| 1250 checkResources(o.resources); | |
| 1251 unittest.expect(o.runtime, unittest.equals('foo')); | |
| 1252 unittest.expect(o.servingStatus, unittest.equals('foo')); | |
| 1253 unittest.expect(o.threadsafe, unittest.isTrue); | |
| 1254 unittest.expect(o.versionUrl, unittest.equals('foo')); | |
| 1255 unittest.expect(o.vm, unittest.isTrue); | |
| 1256 } | |
| 1257 buildCounterVersion--; | |
| 1258 } | |
| 1259 | |
| 1260 | |
| 1261 main() { | |
| 1262 unittest.group("obj-schema-ApiConfigHandler", () { | |
| 1263 unittest.test("to-json--from-json", () { | |
| 1264 var o = buildApiConfigHandler(); | |
| 1265 var od = new api.ApiConfigHandler.fromJson(o.toJson()); | |
| 1266 checkApiConfigHandler(od); | |
| 1267 }); | |
| 1268 }); | |
| 1269 | |
| 1270 | |
| 1271 unittest.group("obj-schema-ApiEndpointHandler", () { | |
| 1272 unittest.test("to-json--from-json", () { | |
| 1273 var o = buildApiEndpointHandler(); | |
| 1274 var od = new api.ApiEndpointHandler.fromJson(o.toJson()); | |
| 1275 checkApiEndpointHandler(od); | |
| 1276 }); | |
| 1277 }); | |
| 1278 | |
| 1279 | |
| 1280 unittest.group("obj-schema-Application", () { | |
| 1281 unittest.test("to-json--from-json", () { | |
| 1282 var o = buildApplication(); | |
| 1283 var od = new api.Application.fromJson(o.toJson()); | |
| 1284 checkApplication(od); | |
| 1285 }); | |
| 1286 }); | |
| 1287 | |
| 1288 | |
| 1289 unittest.group("obj-schema-AutomaticScaling", () { | |
| 1290 unittest.test("to-json--from-json", () { | |
| 1291 var o = buildAutomaticScaling(); | |
| 1292 var od = new api.AutomaticScaling.fromJson(o.toJson()); | |
| 1293 checkAutomaticScaling(od); | |
| 1294 }); | |
| 1295 }); | |
| 1296 | |
| 1297 | |
| 1298 unittest.group("obj-schema-BasicScaling", () { | |
| 1299 unittest.test("to-json--from-json", () { | |
| 1300 var o = buildBasicScaling(); | |
| 1301 var od = new api.BasicScaling.fromJson(o.toJson()); | |
| 1302 checkBasicScaling(od); | |
| 1303 }); | |
| 1304 }); | |
| 1305 | |
| 1306 | |
| 1307 unittest.group("obj-schema-ContainerInfo", () { | |
| 1308 unittest.test("to-json--from-json", () { | |
| 1309 var o = buildContainerInfo(); | |
| 1310 var od = new api.ContainerInfo.fromJson(o.toJson()); | |
| 1311 checkContainerInfo(od); | |
| 1312 }); | |
| 1313 }); | |
| 1314 | |
| 1315 | |
| 1316 unittest.group("obj-schema-CpuUtilization", () { | |
| 1317 unittest.test("to-json--from-json", () { | |
| 1318 var o = buildCpuUtilization(); | |
| 1319 var od = new api.CpuUtilization.fromJson(o.toJson()); | |
| 1320 checkCpuUtilization(od); | |
| 1321 }); | |
| 1322 }); | |
| 1323 | |
| 1324 | |
| 1325 unittest.group("obj-schema-Deployment", () { | |
| 1326 unittest.test("to-json--from-json", () { | |
| 1327 var o = buildDeployment(); | |
| 1328 var od = new api.Deployment.fromJson(o.toJson()); | |
| 1329 checkDeployment(od); | |
| 1330 }); | |
| 1331 }); | |
| 1332 | |
| 1333 | |
| 1334 unittest.group("obj-schema-DiskUtilization", () { | |
| 1335 unittest.test("to-json--from-json", () { | |
| 1336 var o = buildDiskUtilization(); | |
| 1337 var od = new api.DiskUtilization.fromJson(o.toJson()); | |
| 1338 checkDiskUtilization(od); | |
| 1339 }); | |
| 1340 }); | |
| 1341 | |
| 1342 | |
| 1343 unittest.group("obj-schema-ErrorHandler", () { | |
| 1344 unittest.test("to-json--from-json", () { | |
| 1345 var o = buildErrorHandler(); | |
| 1346 var od = new api.ErrorHandler.fromJson(o.toJson()); | |
| 1347 checkErrorHandler(od); | |
| 1348 }); | |
| 1349 }); | |
| 1350 | |
| 1351 | |
| 1352 unittest.group("obj-schema-FileInfo", () { | |
| 1353 unittest.test("to-json--from-json", () { | |
| 1354 var o = buildFileInfo(); | |
| 1355 var od = new api.FileInfo.fromJson(o.toJson()); | |
| 1356 checkFileInfo(od); | |
| 1357 }); | |
| 1358 }); | |
| 1359 | |
| 1360 | |
| 1361 unittest.group("obj-schema-HealthCheck", () { | |
| 1362 unittest.test("to-json--from-json", () { | |
| 1363 var o = buildHealthCheck(); | |
| 1364 var od = new api.HealthCheck.fromJson(o.toJson()); | |
| 1365 checkHealthCheck(od); | |
| 1366 }); | |
| 1367 }); | |
| 1368 | |
| 1369 | |
| 1370 unittest.group("obj-schema-Instance", () { | |
| 1371 unittest.test("to-json--from-json", () { | |
| 1372 var o = buildInstance(); | |
| 1373 var od = new api.Instance.fromJson(o.toJson()); | |
| 1374 checkInstance(od); | |
| 1375 }); | |
| 1376 }); | |
| 1377 | |
| 1378 | |
| 1379 unittest.group("obj-schema-Library", () { | |
| 1380 unittest.test("to-json--from-json", () { | |
| 1381 var o = buildLibrary(); | |
| 1382 var od = new api.Library.fromJson(o.toJson()); | |
| 1383 checkLibrary(od); | |
| 1384 }); | |
| 1385 }); | |
| 1386 | |
| 1387 | |
| 1388 unittest.group("obj-schema-ListInstancesResponse", () { | |
| 1389 unittest.test("to-json--from-json", () { | |
| 1390 var o = buildListInstancesResponse(); | |
| 1391 var od = new api.ListInstancesResponse.fromJson(o.toJson()); | |
| 1392 checkListInstancesResponse(od); | |
| 1393 }); | |
| 1394 }); | |
| 1395 | |
| 1396 | |
| 1397 unittest.group("obj-schema-ListOperationsResponse", () { | |
| 1398 unittest.test("to-json--from-json", () { | |
| 1399 var o = buildListOperationsResponse(); | |
| 1400 var od = new api.ListOperationsResponse.fromJson(o.toJson()); | |
| 1401 checkListOperationsResponse(od); | |
| 1402 }); | |
| 1403 }); | |
| 1404 | |
| 1405 | |
| 1406 unittest.group("obj-schema-ListServicesResponse", () { | |
| 1407 unittest.test("to-json--from-json", () { | |
| 1408 var o = buildListServicesResponse(); | |
| 1409 var od = new api.ListServicesResponse.fromJson(o.toJson()); | |
| 1410 checkListServicesResponse(od); | |
| 1411 }); | |
| 1412 }); | |
| 1413 | |
| 1414 | |
| 1415 unittest.group("obj-schema-ListVersionsResponse", () { | |
| 1416 unittest.test("to-json--from-json", () { | |
| 1417 var o = buildListVersionsResponse(); | |
| 1418 var od = new api.ListVersionsResponse.fromJson(o.toJson()); | |
| 1419 checkListVersionsResponse(od); | |
| 1420 }); | |
| 1421 }); | |
| 1422 | |
| 1423 | |
| 1424 unittest.group("obj-schema-LocationMetadata", () { | |
| 1425 unittest.test("to-json--from-json", () { | |
| 1426 var o = buildLocationMetadata(); | |
| 1427 var od = new api.LocationMetadata.fromJson(o.toJson()); | |
| 1428 checkLocationMetadata(od); | |
| 1429 }); | |
| 1430 }); | |
| 1431 | |
| 1432 | |
| 1433 unittest.group("obj-schema-ManualScaling", () { | |
| 1434 unittest.test("to-json--from-json", () { | |
| 1435 var o = buildManualScaling(); | |
| 1436 var od = new api.ManualScaling.fromJson(o.toJson()); | |
| 1437 checkManualScaling(od); | |
| 1438 }); | |
| 1439 }); | |
| 1440 | |
| 1441 | |
| 1442 unittest.group("obj-schema-Network", () { | |
| 1443 unittest.test("to-json--from-json", () { | |
| 1444 var o = buildNetwork(); | |
| 1445 var od = new api.Network.fromJson(o.toJson()); | |
| 1446 checkNetwork(od); | |
| 1447 }); | |
| 1448 }); | |
| 1449 | |
| 1450 | |
| 1451 unittest.group("obj-schema-NetworkUtilization", () { | |
| 1452 unittest.test("to-json--from-json", () { | |
| 1453 var o = buildNetworkUtilization(); | |
| 1454 var od = new api.NetworkUtilization.fromJson(o.toJson()); | |
| 1455 checkNetworkUtilization(od); | |
| 1456 }); | |
| 1457 }); | |
| 1458 | |
| 1459 | |
| 1460 unittest.group("obj-schema-Operation", () { | |
| 1461 unittest.test("to-json--from-json", () { | |
| 1462 var o = buildOperation(); | |
| 1463 var od = new api.Operation.fromJson(o.toJson()); | |
| 1464 checkOperation(od); | |
| 1465 }); | |
| 1466 }); | |
| 1467 | |
| 1468 | |
| 1469 unittest.group("obj-schema-OperationMetadata", () { | |
| 1470 unittest.test("to-json--from-json", () { | |
| 1471 var o = buildOperationMetadata(); | |
| 1472 var od = new api.OperationMetadata.fromJson(o.toJson()); | |
| 1473 checkOperationMetadata(od); | |
| 1474 }); | |
| 1475 }); | |
| 1476 | |
| 1477 | |
| 1478 unittest.group("obj-schema-OperationMetadataV1", () { | |
| 1479 unittest.test("to-json--from-json", () { | |
| 1480 var o = buildOperationMetadataV1(); | |
| 1481 var od = new api.OperationMetadataV1.fromJson(o.toJson()); | |
| 1482 checkOperationMetadataV1(od); | |
| 1483 }); | |
| 1484 }); | |
| 1485 | |
| 1486 | |
| 1487 unittest.group("obj-schema-OperationMetadataV1Beta5", () { | |
| 1488 unittest.test("to-json--from-json", () { | |
| 1489 var o = buildOperationMetadataV1Beta5(); | |
| 1490 var od = new api.OperationMetadataV1Beta5.fromJson(o.toJson()); | |
| 1491 checkOperationMetadataV1Beta5(od); | |
| 1492 }); | |
| 1493 }); | |
| 1494 | |
| 1495 | |
| 1496 unittest.group("obj-schema-RepairApplicationRequest", () { | |
| 1497 unittest.test("to-json--from-json", () { | |
| 1498 var o = buildRepairApplicationRequest(); | |
| 1499 var od = new api.RepairApplicationRequest.fromJson(o.toJson()); | |
| 1500 checkRepairApplicationRequest(od); | |
| 1501 }); | |
| 1502 }); | |
| 1503 | |
| 1504 | |
| 1505 unittest.group("obj-schema-RequestUtilization", () { | |
| 1506 unittest.test("to-json--from-json", () { | |
| 1507 var o = buildRequestUtilization(); | |
| 1508 var od = new api.RequestUtilization.fromJson(o.toJson()); | |
| 1509 checkRequestUtilization(od); | |
| 1510 }); | |
| 1511 }); | |
| 1512 | |
| 1513 | |
| 1514 unittest.group("obj-schema-Resources", () { | |
| 1515 unittest.test("to-json--from-json", () { | |
| 1516 var o = buildResources(); | |
| 1517 var od = new api.Resources.fromJson(o.toJson()); | |
| 1518 checkResources(od); | |
| 1519 }); | |
| 1520 }); | |
| 1521 | |
| 1522 | |
| 1523 unittest.group("obj-schema-ScriptHandler", () { | |
| 1524 unittest.test("to-json--from-json", () { | |
| 1525 var o = buildScriptHandler(); | |
| 1526 var od = new api.ScriptHandler.fromJson(o.toJson()); | |
| 1527 checkScriptHandler(od); | |
| 1528 }); | |
| 1529 }); | |
| 1530 | |
| 1531 | |
| 1532 unittest.group("obj-schema-Service", () { | |
| 1533 unittest.test("to-json--from-json", () { | |
| 1534 var o = buildService(); | |
| 1535 var od = new api.Service.fromJson(o.toJson()); | |
| 1536 checkService(od); | |
| 1537 }); | |
| 1538 }); | |
| 1539 | |
| 1540 | |
| 1541 unittest.group("obj-schema-StaticFilesHandler", () { | |
| 1542 unittest.test("to-json--from-json", () { | |
| 1543 var o = buildStaticFilesHandler(); | |
| 1544 var od = new api.StaticFilesHandler.fromJson(o.toJson()); | |
| 1545 checkStaticFilesHandler(od); | |
| 1546 }); | |
| 1547 }); | |
| 1548 | |
| 1549 | |
| 1550 unittest.group("obj-schema-Status", () { | |
| 1551 unittest.test("to-json--from-json", () { | |
| 1552 var o = buildStatus(); | |
| 1553 var od = new api.Status.fromJson(o.toJson()); | |
| 1554 checkStatus(od); | |
| 1555 }); | |
| 1556 }); | |
| 1557 | |
| 1558 | |
| 1559 unittest.group("obj-schema-TrafficSplit", () { | |
| 1560 unittest.test("to-json--from-json", () { | |
| 1561 var o = buildTrafficSplit(); | |
| 1562 var od = new api.TrafficSplit.fromJson(o.toJson()); | |
| 1563 checkTrafficSplit(od); | |
| 1564 }); | |
| 1565 }); | |
| 1566 | |
| 1567 | |
| 1568 unittest.group("obj-schema-UrlDispatchRule", () { | |
| 1569 unittest.test("to-json--from-json", () { | |
| 1570 var o = buildUrlDispatchRule(); | |
| 1571 var od = new api.UrlDispatchRule.fromJson(o.toJson()); | |
| 1572 checkUrlDispatchRule(od); | |
| 1573 }); | |
| 1574 }); | |
| 1575 | |
| 1576 | |
| 1577 unittest.group("obj-schema-UrlMap", () { | |
| 1578 unittest.test("to-json--from-json", () { | |
| 1579 var o = buildUrlMap(); | |
| 1580 var od = new api.UrlMap.fromJson(o.toJson()); | |
| 1581 checkUrlMap(od); | |
| 1582 }); | |
| 1583 }); | |
| 1584 | |
| 1585 | |
| 1586 unittest.group("obj-schema-Version", () { | |
| 1587 unittest.test("to-json--from-json", () { | |
| 1588 var o = buildVersion(); | |
| 1589 var od = new api.Version.fromJson(o.toJson()); | |
| 1590 checkVersion(od); | |
| 1591 }); | |
| 1592 }); | |
| 1593 | |
| 1594 | |
| 1595 unittest.group("resource-AppsResourceApi", () { | |
| 1596 unittest.test("method--get", () { | |
| 1597 | |
| 1598 var mock = new HttpServerMock(); | |
| 1599 api.AppsResourceApi res = new api.AppengineApi(mock).apps; | |
| 1600 var arg_appsId = "foo"; | |
| 1601 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 1602 var path = (req.url).path; | |
| 1603 var pathOffset = 0; | |
| 1604 var index; | |
| 1605 var subPart; | |
| 1606 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 1607 pathOffset += 1; | |
| 1608 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1/apps/")); | |
| 1609 pathOffset += 8; | |
| 1610 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 1611 pathOffset = path.length; | |
| 1612 unittest.expect(subPart, unittest.equals("$arg_appsId")); | |
| 1613 | |
| 1614 var query = (req.url).query; | |
| 1615 var queryOffset = 0; | |
| 1616 var queryMap = {}; | |
| 1617 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 1618 parseBool(n) { | |
| 1619 if (n == "true") return true; | |
| 1620 if (n == "false") return false; | |
| 1621 if (n == null) return null; | |
| 1622 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 1623 } | |
| 1624 if (query.length > 0) { | |
| 1625 for (var part in query.split("&")) { | |
| 1626 var keyvalue = part.split("="); | |
| 1627 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 1628 } | |
| 1629 } | |
| 1630 | |
| 1631 | |
| 1632 var h = { | |
| 1633 "content-type" : "application/json; charset=utf-8", | |
| 1634 }; | |
| 1635 var resp = convert.JSON.encode(buildApplication()); | |
| 1636 return new async.Future.value(stringResponse(200, h, resp)); | |
| 1637 }), true); | |
| 1638 res.get(arg_appsId).then(unittest.expectAsync(((api.Application response)
{ | |
| 1639 checkApplication(response); | |
| 1640 }))); | |
| 1641 }); | |
| 1642 | |
| 1643 unittest.test("method--repair", () { | |
| 1644 | |
| 1645 var mock = new HttpServerMock(); | |
| 1646 api.AppsResourceApi res = new api.AppengineApi(mock).apps; | |
| 1647 var arg_request = buildRepairApplicationRequest(); | |
| 1648 var arg_appsId = "foo"; | |
| 1649 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 1650 var obj = new api.RepairApplicationRequest.fromJson(json); | |
| 1651 checkRepairApplicationRequest(obj); | |
| 1652 | |
| 1653 var path = (req.url).path; | |
| 1654 var pathOffset = 0; | |
| 1655 var index; | |
| 1656 var subPart; | |
| 1657 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 1658 pathOffset += 1; | |
| 1659 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1/apps/")); | |
| 1660 pathOffset += 8; | |
| 1661 index = path.indexOf(":repair", pathOffset); | |
| 1662 unittest.expect(index >= 0, unittest.isTrue); | |
| 1663 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 1664 pathOffset = index; | |
| 1665 unittest.expect(subPart, unittest.equals("$arg_appsId")); | |
| 1666 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ
als(":repair")); | |
| 1667 pathOffset += 7; | |
| 1668 | |
| 1669 var query = (req.url).query; | |
| 1670 var queryOffset = 0; | |
| 1671 var queryMap = {}; | |
| 1672 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 1673 parseBool(n) { | |
| 1674 if (n == "true") return true; | |
| 1675 if (n == "false") return false; | |
| 1676 if (n == null) return null; | |
| 1677 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 1678 } | |
| 1679 if (query.length > 0) { | |
| 1680 for (var part in query.split("&")) { | |
| 1681 var keyvalue = part.split("="); | |
| 1682 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 1683 } | |
| 1684 } | |
| 1685 | |
| 1686 | |
| 1687 var h = { | |
| 1688 "content-type" : "application/json; charset=utf-8", | |
| 1689 }; | |
| 1690 var resp = convert.JSON.encode(buildOperation()); | |
| 1691 return new async.Future.value(stringResponse(200, h, resp)); | |
| 1692 }), true); | |
| 1693 res.repair(arg_request, arg_appsId).then(unittest.expectAsync(((api.Operat
ion response) { | |
| 1694 checkOperation(response); | |
| 1695 }))); | |
| 1696 }); | |
| 1697 | |
| 1698 }); | |
| 1699 | |
| 1700 | |
| 1701 unittest.group("resource-AppsOperationsResourceApi", () { | |
| 1702 unittest.test("method--get", () { | |
| 1703 | |
| 1704 var mock = new HttpServerMock(); | |
| 1705 api.AppsOperationsResourceApi res = new api.AppengineApi(mock).apps.operat
ions; | |
| 1706 var arg_appsId = "foo"; | |
| 1707 var arg_operationsId = "foo"; | |
| 1708 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 1709 var path = (req.url).path; | |
| 1710 var pathOffset = 0; | |
| 1711 var index; | |
| 1712 var subPart; | |
| 1713 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 1714 pathOffset += 1; | |
| 1715 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1/apps/")); | |
| 1716 pathOffset += 8; | |
| 1717 index = path.indexOf("/operations/", pathOffset); | |
| 1718 unittest.expect(index >= 0, unittest.isTrue); | |
| 1719 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 1720 pathOffset = index; | |
| 1721 unittest.expect(subPart, unittest.equals("$arg_appsId")); | |
| 1722 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("/operations/")); | |
| 1723 pathOffset += 12; | |
| 1724 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 1725 pathOffset = path.length; | |
| 1726 unittest.expect(subPart, unittest.equals("$arg_operationsId")); | |
| 1727 | |
| 1728 var query = (req.url).query; | |
| 1729 var queryOffset = 0; | |
| 1730 var queryMap = {}; | |
| 1731 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 1732 parseBool(n) { | |
| 1733 if (n == "true") return true; | |
| 1734 if (n == "false") return false; | |
| 1735 if (n == null) return null; | |
| 1736 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 1737 } | |
| 1738 if (query.length > 0) { | |
| 1739 for (var part in query.split("&")) { | |
| 1740 var keyvalue = part.split("="); | |
| 1741 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 1742 } | |
| 1743 } | |
| 1744 | |
| 1745 | |
| 1746 var h = { | |
| 1747 "content-type" : "application/json; charset=utf-8", | |
| 1748 }; | |
| 1749 var resp = convert.JSON.encode(buildOperation()); | |
| 1750 return new async.Future.value(stringResponse(200, h, resp)); | |
| 1751 }), true); | |
| 1752 res.get(arg_appsId, arg_operationsId).then(unittest.expectAsync(((api.Oper
ation response) { | |
| 1753 checkOperation(response); | |
| 1754 }))); | |
| 1755 }); | |
| 1756 | |
| 1757 unittest.test("method--list", () { | |
| 1758 | |
| 1759 var mock = new HttpServerMock(); | |
| 1760 api.AppsOperationsResourceApi res = new api.AppengineApi(mock).apps.operat
ions; | |
| 1761 var arg_appsId = "foo"; | |
| 1762 var arg_filter = "foo"; | |
| 1763 var arg_pageSize = 42; | |
| 1764 var arg_pageToken = "foo"; | |
| 1765 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 1766 var path = (req.url).path; | |
| 1767 var pathOffset = 0; | |
| 1768 var index; | |
| 1769 var subPart; | |
| 1770 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 1771 pathOffset += 1; | |
| 1772 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1/apps/")); | |
| 1773 pathOffset += 8; | |
| 1774 index = path.indexOf("/operations", pathOffset); | |
| 1775 unittest.expect(index >= 0, unittest.isTrue); | |
| 1776 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 1777 pathOffset = index; | |
| 1778 unittest.expect(subPart, unittest.equals("$arg_appsId")); | |
| 1779 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("/operations")); | |
| 1780 pathOffset += 11; | |
| 1781 | |
| 1782 var query = (req.url).query; | |
| 1783 var queryOffset = 0; | |
| 1784 var queryMap = {}; | |
| 1785 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 1786 parseBool(n) { | |
| 1787 if (n == "true") return true; | |
| 1788 if (n == "false") return false; | |
| 1789 if (n == null) return null; | |
| 1790 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 1791 } | |
| 1792 if (query.length > 0) { | |
| 1793 for (var part in query.split("&")) { | |
| 1794 var keyvalue = part.split("="); | |
| 1795 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 1796 } | |
| 1797 } | |
| 1798 unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); | |
| 1799 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); | |
| 1800 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 1801 | |
| 1802 | |
| 1803 var h = { | |
| 1804 "content-type" : "application/json; charset=utf-8", | |
| 1805 }; | |
| 1806 var resp = convert.JSON.encode(buildListOperationsResponse()); | |
| 1807 return new async.Future.value(stringResponse(200, h, resp)); | |
| 1808 }), true); | |
| 1809 res.list(arg_appsId, filter: arg_filter, pageSize: arg_pageSize, pageToken
: arg_pageToken).then(unittest.expectAsync(((api.ListOperationsResponse response
) { | |
| 1810 checkListOperationsResponse(response); | |
| 1811 }))); | |
| 1812 }); | |
| 1813 | |
| 1814 }); | |
| 1815 | |
| 1816 | |
| 1817 unittest.group("resource-AppsServicesResourceApi", () { | |
| 1818 unittest.test("method--delete", () { | |
| 1819 | |
| 1820 var mock = new HttpServerMock(); | |
| 1821 api.AppsServicesResourceApi res = new api.AppengineApi(mock).apps.services
; | |
| 1822 var arg_appsId = "foo"; | |
| 1823 var arg_servicesId = "foo"; | |
| 1824 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 1825 var path = (req.url).path; | |
| 1826 var pathOffset = 0; | |
| 1827 var index; | |
| 1828 var subPart; | |
| 1829 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 1830 pathOffset += 1; | |
| 1831 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1/apps/")); | |
| 1832 pathOffset += 8; | |
| 1833 index = path.indexOf("/services/", pathOffset); | |
| 1834 unittest.expect(index >= 0, unittest.isTrue); | |
| 1835 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 1836 pathOffset = index; | |
| 1837 unittest.expect(subPart, unittest.equals("$arg_appsId")); | |
| 1838 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/services/")); | |
| 1839 pathOffset += 10; | |
| 1840 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 1841 pathOffset = path.length; | |
| 1842 unittest.expect(subPart, unittest.equals("$arg_servicesId")); | |
| 1843 | |
| 1844 var query = (req.url).query; | |
| 1845 var queryOffset = 0; | |
| 1846 var queryMap = {}; | |
| 1847 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 1848 parseBool(n) { | |
| 1849 if (n == "true") return true; | |
| 1850 if (n == "false") return false; | |
| 1851 if (n == null) return null; | |
| 1852 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 1853 } | |
| 1854 if (query.length > 0) { | |
| 1855 for (var part in query.split("&")) { | |
| 1856 var keyvalue = part.split("="); | |
| 1857 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 1858 } | |
| 1859 } | |
| 1860 | |
| 1861 | |
| 1862 var h = { | |
| 1863 "content-type" : "application/json; charset=utf-8", | |
| 1864 }; | |
| 1865 var resp = convert.JSON.encode(buildOperation()); | |
| 1866 return new async.Future.value(stringResponse(200, h, resp)); | |
| 1867 }), true); | |
| 1868 res.delete(arg_appsId, arg_servicesId).then(unittest.expectAsync(((api.Ope
ration response) { | |
| 1869 checkOperation(response); | |
| 1870 }))); | |
| 1871 }); | |
| 1872 | |
| 1873 unittest.test("method--get", () { | |
| 1874 | |
| 1875 var mock = new HttpServerMock(); | |
| 1876 api.AppsServicesResourceApi res = new api.AppengineApi(mock).apps.services
; | |
| 1877 var arg_appsId = "foo"; | |
| 1878 var arg_servicesId = "foo"; | |
| 1879 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 1880 var path = (req.url).path; | |
| 1881 var pathOffset = 0; | |
| 1882 var index; | |
| 1883 var subPart; | |
| 1884 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 1885 pathOffset += 1; | |
| 1886 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1/apps/")); | |
| 1887 pathOffset += 8; | |
| 1888 index = path.indexOf("/services/", pathOffset); | |
| 1889 unittest.expect(index >= 0, unittest.isTrue); | |
| 1890 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 1891 pathOffset = index; | |
| 1892 unittest.expect(subPart, unittest.equals("$arg_appsId")); | |
| 1893 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/services/")); | |
| 1894 pathOffset += 10; | |
| 1895 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 1896 pathOffset = path.length; | |
| 1897 unittest.expect(subPart, unittest.equals("$arg_servicesId")); | |
| 1898 | |
| 1899 var query = (req.url).query; | |
| 1900 var queryOffset = 0; | |
| 1901 var queryMap = {}; | |
| 1902 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 1903 parseBool(n) { | |
| 1904 if (n == "true") return true; | |
| 1905 if (n == "false") return false; | |
| 1906 if (n == null) return null; | |
| 1907 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 1908 } | |
| 1909 if (query.length > 0) { | |
| 1910 for (var part in query.split("&")) { | |
| 1911 var keyvalue = part.split("="); | |
| 1912 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 1913 } | |
| 1914 } | |
| 1915 | |
| 1916 | |
| 1917 var h = { | |
| 1918 "content-type" : "application/json; charset=utf-8", | |
| 1919 }; | |
| 1920 var resp = convert.JSON.encode(buildService()); | |
| 1921 return new async.Future.value(stringResponse(200, h, resp)); | |
| 1922 }), true); | |
| 1923 res.get(arg_appsId, arg_servicesId).then(unittest.expectAsync(((api.Servic
e response) { | |
| 1924 checkService(response); | |
| 1925 }))); | |
| 1926 }); | |
| 1927 | |
| 1928 unittest.test("method--list", () { | |
| 1929 | |
| 1930 var mock = new HttpServerMock(); | |
| 1931 api.AppsServicesResourceApi res = new api.AppengineApi(mock).apps.services
; | |
| 1932 var arg_appsId = "foo"; | |
| 1933 var arg_pageSize = 42; | |
| 1934 var arg_pageToken = "foo"; | |
| 1935 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 1936 var path = (req.url).path; | |
| 1937 var pathOffset = 0; | |
| 1938 var index; | |
| 1939 var subPart; | |
| 1940 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 1941 pathOffset += 1; | |
| 1942 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1/apps/")); | |
| 1943 pathOffset += 8; | |
| 1944 index = path.indexOf("/services", pathOffset); | |
| 1945 unittest.expect(index >= 0, unittest.isTrue); | |
| 1946 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 1947 pathOffset = index; | |
| 1948 unittest.expect(subPart, unittest.equals("$arg_appsId")); | |
| 1949 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("/services")); | |
| 1950 pathOffset += 9; | |
| 1951 | |
| 1952 var query = (req.url).query; | |
| 1953 var queryOffset = 0; | |
| 1954 var queryMap = {}; | |
| 1955 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 1956 parseBool(n) { | |
| 1957 if (n == "true") return true; | |
| 1958 if (n == "false") return false; | |
| 1959 if (n == null) return null; | |
| 1960 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 1961 } | |
| 1962 if (query.length > 0) { | |
| 1963 for (var part in query.split("&")) { | |
| 1964 var keyvalue = part.split("="); | |
| 1965 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 1966 } | |
| 1967 } | |
| 1968 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); | |
| 1969 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 1970 | |
| 1971 | |
| 1972 var h = { | |
| 1973 "content-type" : "application/json; charset=utf-8", | |
| 1974 }; | |
| 1975 var resp = convert.JSON.encode(buildListServicesResponse()); | |
| 1976 return new async.Future.value(stringResponse(200, h, resp)); | |
| 1977 }), true); | |
| 1978 res.list(arg_appsId, pageSize: arg_pageSize, pageToken: arg_pageToken).the
n(unittest.expectAsync(((api.ListServicesResponse response) { | |
| 1979 checkListServicesResponse(response); | |
| 1980 }))); | |
| 1981 }); | |
| 1982 | |
| 1983 unittest.test("method--patch", () { | |
| 1984 | |
| 1985 var mock = new HttpServerMock(); | |
| 1986 api.AppsServicesResourceApi res = new api.AppengineApi(mock).apps.services
; | |
| 1987 var arg_request = buildService(); | |
| 1988 var arg_appsId = "foo"; | |
| 1989 var arg_servicesId = "foo"; | |
| 1990 var arg_updateMask = "foo"; | |
| 1991 var arg_migrateTraffic = true; | |
| 1992 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 1993 var obj = new api.Service.fromJson(json); | |
| 1994 checkService(obj); | |
| 1995 | |
| 1996 var path = (req.url).path; | |
| 1997 var pathOffset = 0; | |
| 1998 var index; | |
| 1999 var subPart; | |
| 2000 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 2001 pathOffset += 1; | |
| 2002 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1/apps/")); | |
| 2003 pathOffset += 8; | |
| 2004 index = path.indexOf("/services/", pathOffset); | |
| 2005 unittest.expect(index >= 0, unittest.isTrue); | |
| 2006 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 2007 pathOffset = index; | |
| 2008 unittest.expect(subPart, unittest.equals("$arg_appsId")); | |
| 2009 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/services/")); | |
| 2010 pathOffset += 10; | |
| 2011 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 2012 pathOffset = path.length; | |
| 2013 unittest.expect(subPart, unittest.equals("$arg_servicesId")); | |
| 2014 | |
| 2015 var query = (req.url).query; | |
| 2016 var queryOffset = 0; | |
| 2017 var queryMap = {}; | |
| 2018 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 2019 parseBool(n) { | |
| 2020 if (n == "true") return true; | |
| 2021 if (n == "false") return false; | |
| 2022 if (n == null) return null; | |
| 2023 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 2024 } | |
| 2025 if (query.length > 0) { | |
| 2026 for (var part in query.split("&")) { | |
| 2027 var keyvalue = part.split("="); | |
| 2028 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 2029 } | |
| 2030 } | |
| 2031 unittest.expect(queryMap["updateMask"].first, unittest.equals(arg_update
Mask)); | |
| 2032 unittest.expect(queryMap["migrateTraffic"].first, unittest.equals("$arg_
migrateTraffic")); | |
| 2033 | |
| 2034 | |
| 2035 var h = { | |
| 2036 "content-type" : "application/json; charset=utf-8", | |
| 2037 }; | |
| 2038 var resp = convert.JSON.encode(buildOperation()); | |
| 2039 return new async.Future.value(stringResponse(200, h, resp)); | |
| 2040 }), true); | |
| 2041 res.patch(arg_request, arg_appsId, arg_servicesId, updateMask: arg_updateM
ask, migrateTraffic: arg_migrateTraffic).then(unittest.expectAsync(((api.Operati
on response) { | |
| 2042 checkOperation(response); | |
| 2043 }))); | |
| 2044 }); | |
| 2045 | |
| 2046 }); | |
| 2047 | |
| 2048 | |
| 2049 unittest.group("resource-AppsServicesVersionsResourceApi", () { | |
| 2050 unittest.test("method--create", () { | |
| 2051 | |
| 2052 var mock = new HttpServerMock(); | |
| 2053 api.AppsServicesVersionsResourceApi res = new api.AppengineApi(mock).apps.
services.versions; | |
| 2054 var arg_request = buildVersion(); | |
| 2055 var arg_appsId = "foo"; | |
| 2056 var arg_servicesId = "foo"; | |
| 2057 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 2058 var obj = new api.Version.fromJson(json); | |
| 2059 checkVersion(obj); | |
| 2060 | |
| 2061 var path = (req.url).path; | |
| 2062 var pathOffset = 0; | |
| 2063 var index; | |
| 2064 var subPart; | |
| 2065 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 2066 pathOffset += 1; | |
| 2067 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1/apps/")); | |
| 2068 pathOffset += 8; | |
| 2069 index = path.indexOf("/services/", pathOffset); | |
| 2070 unittest.expect(index >= 0, unittest.isTrue); | |
| 2071 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 2072 pathOffset = index; | |
| 2073 unittest.expect(subPart, unittest.equals("$arg_appsId")); | |
| 2074 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/services/")); | |
| 2075 pathOffset += 10; | |
| 2076 index = path.indexOf("/versions", pathOffset); | |
| 2077 unittest.expect(index >= 0, unittest.isTrue); | |
| 2078 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 2079 pathOffset = index; | |
| 2080 unittest.expect(subPart, unittest.equals("$arg_servicesId")); | |
| 2081 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("/versions")); | |
| 2082 pathOffset += 9; | |
| 2083 | |
| 2084 var query = (req.url).query; | |
| 2085 var queryOffset = 0; | |
| 2086 var queryMap = {}; | |
| 2087 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 2088 parseBool(n) { | |
| 2089 if (n == "true") return true; | |
| 2090 if (n == "false") return false; | |
| 2091 if (n == null) return null; | |
| 2092 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 2093 } | |
| 2094 if (query.length > 0) { | |
| 2095 for (var part in query.split("&")) { | |
| 2096 var keyvalue = part.split("="); | |
| 2097 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 2098 } | |
| 2099 } | |
| 2100 | |
| 2101 | |
| 2102 var h = { | |
| 2103 "content-type" : "application/json; charset=utf-8", | |
| 2104 }; | |
| 2105 var resp = convert.JSON.encode(buildOperation()); | |
| 2106 return new async.Future.value(stringResponse(200, h, resp)); | |
| 2107 }), true); | |
| 2108 res.create(arg_request, arg_appsId, arg_servicesId).then(unittest.expectAs
ync(((api.Operation response) { | |
| 2109 checkOperation(response); | |
| 2110 }))); | |
| 2111 }); | |
| 2112 | |
| 2113 unittest.test("method--delete", () { | |
| 2114 | |
| 2115 var mock = new HttpServerMock(); | |
| 2116 api.AppsServicesVersionsResourceApi res = new api.AppengineApi(mock).apps.
services.versions; | |
| 2117 var arg_appsId = "foo"; | |
| 2118 var arg_servicesId = "foo"; | |
| 2119 var arg_versionsId = "foo"; | |
| 2120 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 2121 var path = (req.url).path; | |
| 2122 var pathOffset = 0; | |
| 2123 var index; | |
| 2124 var subPart; | |
| 2125 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 2126 pathOffset += 1; | |
| 2127 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1/apps/")); | |
| 2128 pathOffset += 8; | |
| 2129 index = path.indexOf("/services/", pathOffset); | |
| 2130 unittest.expect(index >= 0, unittest.isTrue); | |
| 2131 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 2132 pathOffset = index; | |
| 2133 unittest.expect(subPart, unittest.equals("$arg_appsId")); | |
| 2134 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/services/")); | |
| 2135 pathOffset += 10; | |
| 2136 index = path.indexOf("/versions/", pathOffset); | |
| 2137 unittest.expect(index >= 0, unittest.isTrue); | |
| 2138 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 2139 pathOffset = index; | |
| 2140 unittest.expect(subPart, unittest.equals("$arg_servicesId")); | |
| 2141 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/versions/")); | |
| 2142 pathOffset += 10; | |
| 2143 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 2144 pathOffset = path.length; | |
| 2145 unittest.expect(subPart, unittest.equals("$arg_versionsId")); | |
| 2146 | |
| 2147 var query = (req.url).query; | |
| 2148 var queryOffset = 0; | |
| 2149 var queryMap = {}; | |
| 2150 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 2151 parseBool(n) { | |
| 2152 if (n == "true") return true; | |
| 2153 if (n == "false") return false; | |
| 2154 if (n == null) return null; | |
| 2155 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 2156 } | |
| 2157 if (query.length > 0) { | |
| 2158 for (var part in query.split("&")) { | |
| 2159 var keyvalue = part.split("="); | |
| 2160 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 2161 } | |
| 2162 } | |
| 2163 | |
| 2164 | |
| 2165 var h = { | |
| 2166 "content-type" : "application/json; charset=utf-8", | |
| 2167 }; | |
| 2168 var resp = convert.JSON.encode(buildOperation()); | |
| 2169 return new async.Future.value(stringResponse(200, h, resp)); | |
| 2170 }), true); | |
| 2171 res.delete(arg_appsId, arg_servicesId, arg_versionsId).then(unittest.expec
tAsync(((api.Operation response) { | |
| 2172 checkOperation(response); | |
| 2173 }))); | |
| 2174 }); | |
| 2175 | |
| 2176 unittest.test("method--get", () { | |
| 2177 | |
| 2178 var mock = new HttpServerMock(); | |
| 2179 api.AppsServicesVersionsResourceApi res = new api.AppengineApi(mock).apps.
services.versions; | |
| 2180 var arg_appsId = "foo"; | |
| 2181 var arg_servicesId = "foo"; | |
| 2182 var arg_versionsId = "foo"; | |
| 2183 var arg_view = "foo"; | |
| 2184 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 2185 var path = (req.url).path; | |
| 2186 var pathOffset = 0; | |
| 2187 var index; | |
| 2188 var subPart; | |
| 2189 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 2190 pathOffset += 1; | |
| 2191 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1/apps/")); | |
| 2192 pathOffset += 8; | |
| 2193 index = path.indexOf("/services/", pathOffset); | |
| 2194 unittest.expect(index >= 0, unittest.isTrue); | |
| 2195 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 2196 pathOffset = index; | |
| 2197 unittest.expect(subPart, unittest.equals("$arg_appsId")); | |
| 2198 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/services/")); | |
| 2199 pathOffset += 10; | |
| 2200 index = path.indexOf("/versions/", pathOffset); | |
| 2201 unittest.expect(index >= 0, unittest.isTrue); | |
| 2202 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 2203 pathOffset = index; | |
| 2204 unittest.expect(subPart, unittest.equals("$arg_servicesId")); | |
| 2205 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/versions/")); | |
| 2206 pathOffset += 10; | |
| 2207 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 2208 pathOffset = path.length; | |
| 2209 unittest.expect(subPart, unittest.equals("$arg_versionsId")); | |
| 2210 | |
| 2211 var query = (req.url).query; | |
| 2212 var queryOffset = 0; | |
| 2213 var queryMap = {}; | |
| 2214 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 2215 parseBool(n) { | |
| 2216 if (n == "true") return true; | |
| 2217 if (n == "false") return false; | |
| 2218 if (n == null) return null; | |
| 2219 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 2220 } | |
| 2221 if (query.length > 0) { | |
| 2222 for (var part in query.split("&")) { | |
| 2223 var keyvalue = part.split("="); | |
| 2224 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 2225 } | |
| 2226 } | |
| 2227 unittest.expect(queryMap["view"].first, unittest.equals(arg_view)); | |
| 2228 | |
| 2229 | |
| 2230 var h = { | |
| 2231 "content-type" : "application/json; charset=utf-8", | |
| 2232 }; | |
| 2233 var resp = convert.JSON.encode(buildVersion()); | |
| 2234 return new async.Future.value(stringResponse(200, h, resp)); | |
| 2235 }), true); | |
| 2236 res.get(arg_appsId, arg_servicesId, arg_versionsId, view: arg_view).then(u
nittest.expectAsync(((api.Version response) { | |
| 2237 checkVersion(response); | |
| 2238 }))); | |
| 2239 }); | |
| 2240 | |
| 2241 unittest.test("method--list", () { | |
| 2242 | |
| 2243 var mock = new HttpServerMock(); | |
| 2244 api.AppsServicesVersionsResourceApi res = new api.AppengineApi(mock).apps.
services.versions; | |
| 2245 var arg_appsId = "foo"; | |
| 2246 var arg_servicesId = "foo"; | |
| 2247 var arg_view = "foo"; | |
| 2248 var arg_pageSize = 42; | |
| 2249 var arg_pageToken = "foo"; | |
| 2250 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 2251 var path = (req.url).path; | |
| 2252 var pathOffset = 0; | |
| 2253 var index; | |
| 2254 var subPart; | |
| 2255 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 2256 pathOffset += 1; | |
| 2257 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1/apps/")); | |
| 2258 pathOffset += 8; | |
| 2259 index = path.indexOf("/services/", pathOffset); | |
| 2260 unittest.expect(index >= 0, unittest.isTrue); | |
| 2261 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 2262 pathOffset = index; | |
| 2263 unittest.expect(subPart, unittest.equals("$arg_appsId")); | |
| 2264 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/services/")); | |
| 2265 pathOffset += 10; | |
| 2266 index = path.indexOf("/versions", pathOffset); | |
| 2267 unittest.expect(index >= 0, unittest.isTrue); | |
| 2268 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 2269 pathOffset = index; | |
| 2270 unittest.expect(subPart, unittest.equals("$arg_servicesId")); | |
| 2271 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("/versions")); | |
| 2272 pathOffset += 9; | |
| 2273 | |
| 2274 var query = (req.url).query; | |
| 2275 var queryOffset = 0; | |
| 2276 var queryMap = {}; | |
| 2277 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 2278 parseBool(n) { | |
| 2279 if (n == "true") return true; | |
| 2280 if (n == "false") return false; | |
| 2281 if (n == null) return null; | |
| 2282 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 2283 } | |
| 2284 if (query.length > 0) { | |
| 2285 for (var part in query.split("&")) { | |
| 2286 var keyvalue = part.split("="); | |
| 2287 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 2288 } | |
| 2289 } | |
| 2290 unittest.expect(queryMap["view"].first, unittest.equals(arg_view)); | |
| 2291 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); | |
| 2292 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 2293 | |
| 2294 | |
| 2295 var h = { | |
| 2296 "content-type" : "application/json; charset=utf-8", | |
| 2297 }; | |
| 2298 var resp = convert.JSON.encode(buildListVersionsResponse()); | |
| 2299 return new async.Future.value(stringResponse(200, h, resp)); | |
| 2300 }), true); | |
| 2301 res.list(arg_appsId, arg_servicesId, view: arg_view, pageSize: arg_pageSiz
e, pageToken: arg_pageToken).then(unittest.expectAsync(((api.ListVersionsRespons
e response) { | |
| 2302 checkListVersionsResponse(response); | |
| 2303 }))); | |
| 2304 }); | |
| 2305 | |
| 2306 unittest.test("method--patch", () { | |
| 2307 | |
| 2308 var mock = new HttpServerMock(); | |
| 2309 api.AppsServicesVersionsResourceApi res = new api.AppengineApi(mock).apps.
services.versions; | |
| 2310 var arg_request = buildVersion(); | |
| 2311 var arg_appsId = "foo"; | |
| 2312 var arg_servicesId = "foo"; | |
| 2313 var arg_versionsId = "foo"; | |
| 2314 var arg_updateMask = "foo"; | |
| 2315 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 2316 var obj = new api.Version.fromJson(json); | |
| 2317 checkVersion(obj); | |
| 2318 | |
| 2319 var path = (req.url).path; | |
| 2320 var pathOffset = 0; | |
| 2321 var index; | |
| 2322 var subPart; | |
| 2323 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 2324 pathOffset += 1; | |
| 2325 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1/apps/")); | |
| 2326 pathOffset += 8; | |
| 2327 index = path.indexOf("/services/", pathOffset); | |
| 2328 unittest.expect(index >= 0, unittest.isTrue); | |
| 2329 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 2330 pathOffset = index; | |
| 2331 unittest.expect(subPart, unittest.equals("$arg_appsId")); | |
| 2332 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/services/")); | |
| 2333 pathOffset += 10; | |
| 2334 index = path.indexOf("/versions/", pathOffset); | |
| 2335 unittest.expect(index >= 0, unittest.isTrue); | |
| 2336 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 2337 pathOffset = index; | |
| 2338 unittest.expect(subPart, unittest.equals("$arg_servicesId")); | |
| 2339 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/versions/")); | |
| 2340 pathOffset += 10; | |
| 2341 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 2342 pathOffset = path.length; | |
| 2343 unittest.expect(subPart, unittest.equals("$arg_versionsId")); | |
| 2344 | |
| 2345 var query = (req.url).query; | |
| 2346 var queryOffset = 0; | |
| 2347 var queryMap = {}; | |
| 2348 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 2349 parseBool(n) { | |
| 2350 if (n == "true") return true; | |
| 2351 if (n == "false") return false; | |
| 2352 if (n == null) return null; | |
| 2353 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 2354 } | |
| 2355 if (query.length > 0) { | |
| 2356 for (var part in query.split("&")) { | |
| 2357 var keyvalue = part.split("="); | |
| 2358 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 2359 } | |
| 2360 } | |
| 2361 unittest.expect(queryMap["updateMask"].first, unittest.equals(arg_update
Mask)); | |
| 2362 | |
| 2363 | |
| 2364 var h = { | |
| 2365 "content-type" : "application/json; charset=utf-8", | |
| 2366 }; | |
| 2367 var resp = convert.JSON.encode(buildOperation()); | |
| 2368 return new async.Future.value(stringResponse(200, h, resp)); | |
| 2369 }), true); | |
| 2370 res.patch(arg_request, arg_appsId, arg_servicesId, arg_versionsId, updateM
ask: arg_updateMask).then(unittest.expectAsync(((api.Operation response) { | |
| 2371 checkOperation(response); | |
| 2372 }))); | |
| 2373 }); | |
| 2374 | |
| 2375 }); | |
| 2376 | |
| 2377 | |
| 2378 unittest.group("resource-AppsServicesVersionsInstancesResourceApi", () { | |
| 2379 unittest.test("method--list", () { | |
| 2380 | |
| 2381 var mock = new HttpServerMock(); | |
| 2382 api.AppsServicesVersionsInstancesResourceApi res = new api.AppengineApi(mo
ck).apps.services.versions.instances; | |
| 2383 var arg_appsId = "foo"; | |
| 2384 var arg_servicesId = "foo"; | |
| 2385 var arg_versionsId = "foo"; | |
| 2386 var arg_pageSize = 42; | |
| 2387 var arg_pageToken = "foo"; | |
| 2388 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 2389 var path = (req.url).path; | |
| 2390 var pathOffset = 0; | |
| 2391 var index; | |
| 2392 var subPart; | |
| 2393 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 2394 pathOffset += 1; | |
| 2395 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1/apps/")); | |
| 2396 pathOffset += 8; | |
| 2397 index = path.indexOf("/services/", pathOffset); | |
| 2398 unittest.expect(index >= 0, unittest.isTrue); | |
| 2399 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 2400 pathOffset = index; | |
| 2401 unittest.expect(subPart, unittest.equals("$arg_appsId")); | |
| 2402 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/services/")); | |
| 2403 pathOffset += 10; | |
| 2404 index = path.indexOf("/versions/", pathOffset); | |
| 2405 unittest.expect(index >= 0, unittest.isTrue); | |
| 2406 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 2407 pathOffset = index; | |
| 2408 unittest.expect(subPart, unittest.equals("$arg_servicesId")); | |
| 2409 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/versions/")); | |
| 2410 pathOffset += 10; | |
| 2411 index = path.indexOf("/instances", pathOffset); | |
| 2412 unittest.expect(index >= 0, unittest.isTrue); | |
| 2413 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 2414 pathOffset = index; | |
| 2415 unittest.expect(subPart, unittest.equals("$arg_versionsId")); | |
| 2416 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/instances")); | |
| 2417 pathOffset += 10; | |
| 2418 | |
| 2419 var query = (req.url).query; | |
| 2420 var queryOffset = 0; | |
| 2421 var queryMap = {}; | |
| 2422 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 2423 parseBool(n) { | |
| 2424 if (n == "true") return true; | |
| 2425 if (n == "false") return false; | |
| 2426 if (n == null) return null; | |
| 2427 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 2428 } | |
| 2429 if (query.length > 0) { | |
| 2430 for (var part in query.split("&")) { | |
| 2431 var keyvalue = part.split("="); | |
| 2432 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 2433 } | |
| 2434 } | |
| 2435 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); | |
| 2436 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 2437 | |
| 2438 | |
| 2439 var h = { | |
| 2440 "content-type" : "application/json; charset=utf-8", | |
| 2441 }; | |
| 2442 var resp = convert.JSON.encode(buildListInstancesResponse()); | |
| 2443 return new async.Future.value(stringResponse(200, h, resp)); | |
| 2444 }), true); | |
| 2445 res.list(arg_appsId, arg_servicesId, arg_versionsId, pageSize: arg_pageSiz
e, pageToken: arg_pageToken).then(unittest.expectAsync(((api.ListInstancesRespon
se response) { | |
| 2446 checkListInstancesResponse(response); | |
| 2447 }))); | |
| 2448 }); | |
| 2449 | |
| 2450 }); | |
| 2451 | |
| 2452 | |
| 2453 } | |
| 2454 | |
| OLD | NEW |