| OLD | NEW |
| 1 library googleapis_beta.sqladmin.v1beta4.test; | 1 library googleapis_beta.sqladmin.v1beta4.test; |
| 2 | 2 |
| 3 import "dart:core" as core; | 3 import "dart:core" as core; |
| 4 import "dart:collection" as collection; | 4 import "dart:collection" as collection; |
| 5 import "dart:async" as async; | 5 import "dart:async" as async; |
| 6 import "dart:convert" as convert; | 6 import "dart:convert" as convert; |
| 7 | 7 |
| 8 import 'package:http/http.dart' as http; | 8 import 'package:http/http.dart' as http; |
| 9 import 'package:http/testing.dart' as http_testing; | 9 import 'package:http/testing.dart' as http_testing; |
| 10 import 'package:unittest/unittest.dart' as unittest; | 10 import 'package:test/test.dart' as unittest; |
| 11 | 11 |
| 12 import 'package:googleapis_beta/sqladmin/v1beta4.dart' as api; | 12 import 'package:googleapis_beta/sqladmin/v1beta4.dart' as api; |
| 13 | 13 |
| 14 class HttpServerMock extends http.BaseClient { | 14 class HttpServerMock extends http.BaseClient { |
| 15 core.Function _callback; | 15 core.Function _callback; |
| 16 core.bool _expectJson; | 16 core.bool _expectJson; |
| 17 | 17 |
| 18 void register(core.Function callback, core.bool expectJson) { | 18 void register(core.Function callback, core.bool expectJson) { |
| 19 _callback = callback; | 19 _callback = callback; |
| 20 _expectJson = expectJson; | 20 _expectJson = expectJson; |
| (...skipping 18 matching lines...) Expand all Loading... |
| 39 } else { | 39 } else { |
| 40 return stream.toBytes().then((data) { | 40 return stream.toBytes().then((data) { |
| 41 return _callback(request, data); | 41 return _callback(request, data); |
| 42 }); | 42 }); |
| 43 } | 43 } |
| 44 } | 44 } |
| 45 } | 45 } |
| 46 } | 46 } |
| 47 | 47 |
| 48 http.StreamedResponse stringResponse( | 48 http.StreamedResponse stringResponse( |
| 49 core.int status, core.Map headers, core.String body) { | 49 core.int status, core.Map<core.String, core.String> headers, core.String bod
y) { |
| 50 var stream = new async.Stream.fromIterable([convert.UTF8.encode(body)]); | 50 var stream = new async.Stream.fromIterable([convert.UTF8.encode(body)]); |
| 51 return new http.StreamedResponse(stream, status, headers: headers); | 51 return new http.StreamedResponse(stream, status, headers: headers); |
| 52 } | 52 } |
| 53 | 53 |
| 54 core.int buildCounterAclEntry = 0; | 54 core.int buildCounterAclEntry = 0; |
| 55 buildAclEntry() { | 55 buildAclEntry() { |
| 56 var o = new api.AclEntry(); | 56 var o = new api.AclEntry(); |
| 57 buildCounterAclEntry++; | 57 buildCounterAclEntry++; |
| 58 if (buildCounterAclEntry < 3) { | 58 if (buildCounterAclEntry < 3) { |
| 59 o.expirationTime = core.DateTime.parse("2002-02-27T14:01:02"); | 59 o.expirationTime = core.DateTime.parse("2002-02-27T14:01:02"); |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 unittest.expect(o.kind, unittest.equals('foo')); | 135 unittest.expect(o.kind, unittest.equals('foo')); |
| 136 unittest.expect(o.selfLink, unittest.equals('foo')); | 136 unittest.expect(o.selfLink, unittest.equals('foo')); |
| 137 unittest.expect(o.startTime, unittest.equals(core.DateTime.parse("2002-02-27
T14:01:02"))); | 137 unittest.expect(o.startTime, unittest.equals(core.DateTime.parse("2002-02-27
T14:01:02"))); |
| 138 unittest.expect(o.status, unittest.equals('foo')); | 138 unittest.expect(o.status, unittest.equals('foo')); |
| 139 unittest.expect(o.type, unittest.equals('foo')); | 139 unittest.expect(o.type, unittest.equals('foo')); |
| 140 unittest.expect(o.windowStartTime, unittest.equals(core.DateTime.parse("2002
-02-27T14:01:02"))); | 140 unittest.expect(o.windowStartTime, unittest.equals(core.DateTime.parse("2002
-02-27T14:01:02"))); |
| 141 } | 141 } |
| 142 buildCounterBackupRun--; | 142 buildCounterBackupRun--; |
| 143 } | 143 } |
| 144 | 144 |
| 145 buildUnnamed3765() { | 145 buildUnnamed3239() { |
| 146 var o = new core.List<api.BackupRun>(); | 146 var o = new core.List<api.BackupRun>(); |
| 147 o.add(buildBackupRun()); | 147 o.add(buildBackupRun()); |
| 148 o.add(buildBackupRun()); | 148 o.add(buildBackupRun()); |
| 149 return o; | 149 return o; |
| 150 } | 150 } |
| 151 | 151 |
| 152 checkUnnamed3765(core.List<api.BackupRun> o) { | 152 checkUnnamed3239(core.List<api.BackupRun> o) { |
| 153 unittest.expect(o, unittest.hasLength(2)); | 153 unittest.expect(o, unittest.hasLength(2)); |
| 154 checkBackupRun(o[0]); | 154 checkBackupRun(o[0]); |
| 155 checkBackupRun(o[1]); | 155 checkBackupRun(o[1]); |
| 156 } | 156 } |
| 157 | 157 |
| 158 core.int buildCounterBackupRunsListResponse = 0; | 158 core.int buildCounterBackupRunsListResponse = 0; |
| 159 buildBackupRunsListResponse() { | 159 buildBackupRunsListResponse() { |
| 160 var o = new api.BackupRunsListResponse(); | 160 var o = new api.BackupRunsListResponse(); |
| 161 buildCounterBackupRunsListResponse++; | 161 buildCounterBackupRunsListResponse++; |
| 162 if (buildCounterBackupRunsListResponse < 3) { | 162 if (buildCounterBackupRunsListResponse < 3) { |
| 163 o.items = buildUnnamed3765(); | 163 o.items = buildUnnamed3239(); |
| 164 o.kind = "foo"; | 164 o.kind = "foo"; |
| 165 o.nextPageToken = "foo"; | 165 o.nextPageToken = "foo"; |
| 166 } | 166 } |
| 167 buildCounterBackupRunsListResponse--; | 167 buildCounterBackupRunsListResponse--; |
| 168 return o; | 168 return o; |
| 169 } | 169 } |
| 170 | 170 |
| 171 checkBackupRunsListResponse(api.BackupRunsListResponse o) { | 171 checkBackupRunsListResponse(api.BackupRunsListResponse o) { |
| 172 buildCounterBackupRunsListResponse++; | 172 buildCounterBackupRunsListResponse++; |
| 173 if (buildCounterBackupRunsListResponse < 3) { | 173 if (buildCounterBackupRunsListResponse < 3) { |
| 174 checkUnnamed3765(o.items); | 174 checkUnnamed3239(o.items); |
| 175 unittest.expect(o.kind, unittest.equals('foo')); | 175 unittest.expect(o.kind, unittest.equals('foo')); |
| 176 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 176 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 177 } | 177 } |
| 178 buildCounterBackupRunsListResponse--; | 178 buildCounterBackupRunsListResponse--; |
| 179 } | 179 } |
| 180 | 180 |
| 181 core.int buildCounterBinLogCoordinates = 0; | 181 core.int buildCounterBinLogCoordinates = 0; |
| 182 buildBinLogCoordinates() { | 182 buildBinLogCoordinates() { |
| 183 var o = new api.BinLogCoordinates(); | 183 var o = new api.BinLogCoordinates(); |
| 184 buildCounterBinLogCoordinates++; | 184 buildCounterBinLogCoordinates++; |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 292 | 292 |
| 293 checkDatabaseInstanceFailoverReplica(api.DatabaseInstanceFailoverReplica o) { | 293 checkDatabaseInstanceFailoverReplica(api.DatabaseInstanceFailoverReplica o) { |
| 294 buildCounterDatabaseInstanceFailoverReplica++; | 294 buildCounterDatabaseInstanceFailoverReplica++; |
| 295 if (buildCounterDatabaseInstanceFailoverReplica < 3) { | 295 if (buildCounterDatabaseInstanceFailoverReplica < 3) { |
| 296 unittest.expect(o.available, unittest.isTrue); | 296 unittest.expect(o.available, unittest.isTrue); |
| 297 unittest.expect(o.name, unittest.equals('foo')); | 297 unittest.expect(o.name, unittest.equals('foo')); |
| 298 } | 298 } |
| 299 buildCounterDatabaseInstanceFailoverReplica--; | 299 buildCounterDatabaseInstanceFailoverReplica--; |
| 300 } | 300 } |
| 301 | 301 |
| 302 buildUnnamed3766() { | 302 buildUnnamed3240() { |
| 303 var o = new core.List<api.IpMapping>(); | 303 var o = new core.List<api.IpMapping>(); |
| 304 o.add(buildIpMapping()); | 304 o.add(buildIpMapping()); |
| 305 o.add(buildIpMapping()); | 305 o.add(buildIpMapping()); |
| 306 return o; | 306 return o; |
| 307 } | 307 } |
| 308 | 308 |
| 309 checkUnnamed3766(core.List<api.IpMapping> o) { | 309 checkUnnamed3240(core.List<api.IpMapping> o) { |
| 310 unittest.expect(o, unittest.hasLength(2)); | 310 unittest.expect(o, unittest.hasLength(2)); |
| 311 checkIpMapping(o[0]); | 311 checkIpMapping(o[0]); |
| 312 checkIpMapping(o[1]); | 312 checkIpMapping(o[1]); |
| 313 } | 313 } |
| 314 | 314 |
| 315 buildUnnamed3767() { | 315 buildUnnamed3241() { |
| 316 var o = new core.List<core.String>(); | 316 var o = new core.List<core.String>(); |
| 317 o.add("foo"); | 317 o.add("foo"); |
| 318 o.add("foo"); | 318 o.add("foo"); |
| 319 return o; | 319 return o; |
| 320 } | 320 } |
| 321 | 321 |
| 322 checkUnnamed3767(core.List<core.String> o) { | 322 checkUnnamed3241(core.List<core.String> o) { |
| 323 unittest.expect(o, unittest.hasLength(2)); | 323 unittest.expect(o, unittest.hasLength(2)); |
| 324 unittest.expect(o[0], unittest.equals('foo')); | 324 unittest.expect(o[0], unittest.equals('foo')); |
| 325 unittest.expect(o[1], unittest.equals('foo')); | 325 unittest.expect(o[1], unittest.equals('foo')); |
| 326 } | 326 } |
| 327 | 327 |
| 328 buildUnnamed3768() { | 328 buildUnnamed3242() { |
| 329 var o = new core.List<core.String>(); | 329 var o = new core.List<core.String>(); |
| 330 o.add("foo"); | 330 o.add("foo"); |
| 331 o.add("foo"); | 331 o.add("foo"); |
| 332 return o; | 332 return o; |
| 333 } | 333 } |
| 334 | 334 |
| 335 checkUnnamed3768(core.List<core.String> o) { | 335 checkUnnamed3242(core.List<core.String> o) { |
| 336 unittest.expect(o, unittest.hasLength(2)); | 336 unittest.expect(o, unittest.hasLength(2)); |
| 337 unittest.expect(o[0], unittest.equals('foo')); | 337 unittest.expect(o[0], unittest.equals('foo')); |
| 338 unittest.expect(o[1], unittest.equals('foo')); | 338 unittest.expect(o[1], unittest.equals('foo')); |
| 339 } | 339 } |
| 340 | 340 |
| 341 core.int buildCounterDatabaseInstance = 0; | 341 core.int buildCounterDatabaseInstance = 0; |
| 342 buildDatabaseInstance() { | 342 buildDatabaseInstance() { |
| 343 var o = new api.DatabaseInstance(); | 343 var o = new api.DatabaseInstance(); |
| 344 buildCounterDatabaseInstance++; | 344 buildCounterDatabaseInstance++; |
| 345 if (buildCounterDatabaseInstance < 3) { | 345 if (buildCounterDatabaseInstance < 3) { |
| 346 o.backendType = "foo"; | 346 o.backendType = "foo"; |
| 347 o.connectionName = "foo"; | 347 o.connectionName = "foo"; |
| 348 o.currentDiskSize = "foo"; | 348 o.currentDiskSize = "foo"; |
| 349 o.databaseVersion = "foo"; | 349 o.databaseVersion = "foo"; |
| 350 o.etag = "foo"; | 350 o.etag = "foo"; |
| 351 o.failoverReplica = buildDatabaseInstanceFailoverReplica(); | 351 o.failoverReplica = buildDatabaseInstanceFailoverReplica(); |
| 352 o.instanceType = "foo"; | 352 o.instanceType = "foo"; |
| 353 o.ipAddresses = buildUnnamed3766(); | 353 o.ipAddresses = buildUnnamed3240(); |
| 354 o.ipv6Address = "foo"; | 354 o.ipv6Address = "foo"; |
| 355 o.kind = "foo"; | 355 o.kind = "foo"; |
| 356 o.masterInstanceName = "foo"; | 356 o.masterInstanceName = "foo"; |
| 357 o.maxDiskSize = "foo"; | 357 o.maxDiskSize = "foo"; |
| 358 o.name = "foo"; | 358 o.name = "foo"; |
| 359 o.onPremisesConfiguration = buildOnPremisesConfiguration(); | 359 o.onPremisesConfiguration = buildOnPremisesConfiguration(); |
| 360 o.project = "foo"; | 360 o.project = "foo"; |
| 361 o.region = "foo"; | 361 o.region = "foo"; |
| 362 o.replicaConfiguration = buildReplicaConfiguration(); | 362 o.replicaConfiguration = buildReplicaConfiguration(); |
| 363 o.replicaNames = buildUnnamed3767(); | 363 o.replicaNames = buildUnnamed3241(); |
| 364 o.selfLink = "foo"; | 364 o.selfLink = "foo"; |
| 365 o.serverCaCert = buildSslCert(); | 365 o.serverCaCert = buildSslCert(); |
| 366 o.serviceAccountEmailAddress = "foo"; | 366 o.serviceAccountEmailAddress = "foo"; |
| 367 o.settings = buildSettings(); | 367 o.settings = buildSettings(); |
| 368 o.state = "foo"; | 368 o.state = "foo"; |
| 369 o.suspensionReason = buildUnnamed3768(); | 369 o.suspensionReason = buildUnnamed3242(); |
| 370 } | 370 } |
| 371 buildCounterDatabaseInstance--; | 371 buildCounterDatabaseInstance--; |
| 372 return o; | 372 return o; |
| 373 } | 373 } |
| 374 | 374 |
| 375 checkDatabaseInstance(api.DatabaseInstance o) { | 375 checkDatabaseInstance(api.DatabaseInstance o) { |
| 376 buildCounterDatabaseInstance++; | 376 buildCounterDatabaseInstance++; |
| 377 if (buildCounterDatabaseInstance < 3) { | 377 if (buildCounterDatabaseInstance < 3) { |
| 378 unittest.expect(o.backendType, unittest.equals('foo')); | 378 unittest.expect(o.backendType, unittest.equals('foo')); |
| 379 unittest.expect(o.connectionName, unittest.equals('foo')); | 379 unittest.expect(o.connectionName, unittest.equals('foo')); |
| 380 unittest.expect(o.currentDiskSize, unittest.equals('foo')); | 380 unittest.expect(o.currentDiskSize, unittest.equals('foo')); |
| 381 unittest.expect(o.databaseVersion, unittest.equals('foo')); | 381 unittest.expect(o.databaseVersion, unittest.equals('foo')); |
| 382 unittest.expect(o.etag, unittest.equals('foo')); | 382 unittest.expect(o.etag, unittest.equals('foo')); |
| 383 checkDatabaseInstanceFailoverReplica(o.failoverReplica); | 383 checkDatabaseInstanceFailoverReplica(o.failoverReplica); |
| 384 unittest.expect(o.instanceType, unittest.equals('foo')); | 384 unittest.expect(o.instanceType, unittest.equals('foo')); |
| 385 checkUnnamed3766(o.ipAddresses); | 385 checkUnnamed3240(o.ipAddresses); |
| 386 unittest.expect(o.ipv6Address, unittest.equals('foo')); | 386 unittest.expect(o.ipv6Address, unittest.equals('foo')); |
| 387 unittest.expect(o.kind, unittest.equals('foo')); | 387 unittest.expect(o.kind, unittest.equals('foo')); |
| 388 unittest.expect(o.masterInstanceName, unittest.equals('foo')); | 388 unittest.expect(o.masterInstanceName, unittest.equals('foo')); |
| 389 unittest.expect(o.maxDiskSize, unittest.equals('foo')); | 389 unittest.expect(o.maxDiskSize, unittest.equals('foo')); |
| 390 unittest.expect(o.name, unittest.equals('foo')); | 390 unittest.expect(o.name, unittest.equals('foo')); |
| 391 checkOnPremisesConfiguration(o.onPremisesConfiguration); | 391 checkOnPremisesConfiguration(o.onPremisesConfiguration); |
| 392 unittest.expect(o.project, unittest.equals('foo')); | 392 unittest.expect(o.project, unittest.equals('foo')); |
| 393 unittest.expect(o.region, unittest.equals('foo')); | 393 unittest.expect(o.region, unittest.equals('foo')); |
| 394 checkReplicaConfiguration(o.replicaConfiguration); | 394 checkReplicaConfiguration(o.replicaConfiguration); |
| 395 checkUnnamed3767(o.replicaNames); | 395 checkUnnamed3241(o.replicaNames); |
| 396 unittest.expect(o.selfLink, unittest.equals('foo')); | 396 unittest.expect(o.selfLink, unittest.equals('foo')); |
| 397 checkSslCert(o.serverCaCert); | 397 checkSslCert(o.serverCaCert); |
| 398 unittest.expect(o.serviceAccountEmailAddress, unittest.equals('foo')); | 398 unittest.expect(o.serviceAccountEmailAddress, unittest.equals('foo')); |
| 399 checkSettings(o.settings); | 399 checkSettings(o.settings); |
| 400 unittest.expect(o.state, unittest.equals('foo')); | 400 unittest.expect(o.state, unittest.equals('foo')); |
| 401 checkUnnamed3768(o.suspensionReason); | 401 checkUnnamed3242(o.suspensionReason); |
| 402 } | 402 } |
| 403 buildCounterDatabaseInstance--; | 403 buildCounterDatabaseInstance--; |
| 404 } | 404 } |
| 405 | 405 |
| 406 buildUnnamed3769() { | 406 buildUnnamed3243() { |
| 407 var o = new core.List<api.Database>(); | 407 var o = new core.List<api.Database>(); |
| 408 o.add(buildDatabase()); | 408 o.add(buildDatabase()); |
| 409 o.add(buildDatabase()); | 409 o.add(buildDatabase()); |
| 410 return o; | 410 return o; |
| 411 } | 411 } |
| 412 | 412 |
| 413 checkUnnamed3769(core.List<api.Database> o) { | 413 checkUnnamed3243(core.List<api.Database> o) { |
| 414 unittest.expect(o, unittest.hasLength(2)); | 414 unittest.expect(o, unittest.hasLength(2)); |
| 415 checkDatabase(o[0]); | 415 checkDatabase(o[0]); |
| 416 checkDatabase(o[1]); | 416 checkDatabase(o[1]); |
| 417 } | 417 } |
| 418 | 418 |
| 419 core.int buildCounterDatabasesListResponse = 0; | 419 core.int buildCounterDatabasesListResponse = 0; |
| 420 buildDatabasesListResponse() { | 420 buildDatabasesListResponse() { |
| 421 var o = new api.DatabasesListResponse(); | 421 var o = new api.DatabasesListResponse(); |
| 422 buildCounterDatabasesListResponse++; | 422 buildCounterDatabasesListResponse++; |
| 423 if (buildCounterDatabasesListResponse < 3) { | 423 if (buildCounterDatabasesListResponse < 3) { |
| 424 o.items = buildUnnamed3769(); | 424 o.items = buildUnnamed3243(); |
| 425 o.kind = "foo"; | 425 o.kind = "foo"; |
| 426 } | 426 } |
| 427 buildCounterDatabasesListResponse--; | 427 buildCounterDatabasesListResponse--; |
| 428 return o; | 428 return o; |
| 429 } | 429 } |
| 430 | 430 |
| 431 checkDatabasesListResponse(api.DatabasesListResponse o) { | 431 checkDatabasesListResponse(api.DatabasesListResponse o) { |
| 432 buildCounterDatabasesListResponse++; | 432 buildCounterDatabasesListResponse++; |
| 433 if (buildCounterDatabasesListResponse < 3) { | 433 if (buildCounterDatabasesListResponse < 3) { |
| 434 checkUnnamed3769(o.items); | 434 checkUnnamed3243(o.items); |
| 435 unittest.expect(o.kind, unittest.equals('foo')); | 435 unittest.expect(o.kind, unittest.equals('foo')); |
| 436 } | 436 } |
| 437 buildCounterDatabasesListResponse--; | 437 buildCounterDatabasesListResponse--; |
| 438 } | 438 } |
| 439 | 439 |
| 440 core.int buildCounterExportContextCsvExportOptions = 0; | 440 core.int buildCounterExportContextCsvExportOptions = 0; |
| 441 buildExportContextCsvExportOptions() { | 441 buildExportContextCsvExportOptions() { |
| 442 var o = new api.ExportContextCsvExportOptions(); | 442 var o = new api.ExportContextCsvExportOptions(); |
| 443 buildCounterExportContextCsvExportOptions++; | 443 buildCounterExportContextCsvExportOptions++; |
| 444 if (buildCounterExportContextCsvExportOptions < 3) { | 444 if (buildCounterExportContextCsvExportOptions < 3) { |
| 445 o.selectQuery = "foo"; | 445 o.selectQuery = "foo"; |
| 446 } | 446 } |
| 447 buildCounterExportContextCsvExportOptions--; | 447 buildCounterExportContextCsvExportOptions--; |
| 448 return o; | 448 return o; |
| 449 } | 449 } |
| 450 | 450 |
| 451 checkExportContextCsvExportOptions(api.ExportContextCsvExportOptions o) { | 451 checkExportContextCsvExportOptions(api.ExportContextCsvExportOptions o) { |
| 452 buildCounterExportContextCsvExportOptions++; | 452 buildCounterExportContextCsvExportOptions++; |
| 453 if (buildCounterExportContextCsvExportOptions < 3) { | 453 if (buildCounterExportContextCsvExportOptions < 3) { |
| 454 unittest.expect(o.selectQuery, unittest.equals('foo')); | 454 unittest.expect(o.selectQuery, unittest.equals('foo')); |
| 455 } | 455 } |
| 456 buildCounterExportContextCsvExportOptions--; | 456 buildCounterExportContextCsvExportOptions--; |
| 457 } | 457 } |
| 458 | 458 |
| 459 buildUnnamed3770() { | 459 buildUnnamed3244() { |
| 460 var o = new core.List<core.String>(); | 460 var o = new core.List<core.String>(); |
| 461 o.add("foo"); | 461 o.add("foo"); |
| 462 o.add("foo"); | 462 o.add("foo"); |
| 463 return o; | 463 return o; |
| 464 } | 464 } |
| 465 | 465 |
| 466 checkUnnamed3770(core.List<core.String> o) { | 466 checkUnnamed3244(core.List<core.String> o) { |
| 467 unittest.expect(o, unittest.hasLength(2)); | 467 unittest.expect(o, unittest.hasLength(2)); |
| 468 unittest.expect(o[0], unittest.equals('foo')); | 468 unittest.expect(o[0], unittest.equals('foo')); |
| 469 unittest.expect(o[1], unittest.equals('foo')); | 469 unittest.expect(o[1], unittest.equals('foo')); |
| 470 } | 470 } |
| 471 | 471 |
| 472 buildUnnamed3771() { | 472 buildUnnamed3245() { |
| 473 var o = new core.List<core.String>(); | 473 var o = new core.List<core.String>(); |
| 474 o.add("foo"); | 474 o.add("foo"); |
| 475 o.add("foo"); | 475 o.add("foo"); |
| 476 return o; | 476 return o; |
| 477 } | 477 } |
| 478 | 478 |
| 479 checkUnnamed3771(core.List<core.String> o) { | 479 checkUnnamed3245(core.List<core.String> o) { |
| 480 unittest.expect(o, unittest.hasLength(2)); | 480 unittest.expect(o, unittest.hasLength(2)); |
| 481 unittest.expect(o[0], unittest.equals('foo')); | 481 unittest.expect(o[0], unittest.equals('foo')); |
| 482 unittest.expect(o[1], unittest.equals('foo')); | 482 unittest.expect(o[1], unittest.equals('foo')); |
| 483 } | 483 } |
| 484 | 484 |
| 485 core.int buildCounterExportContextSqlExportOptions = 0; | 485 core.int buildCounterExportContextSqlExportOptions = 0; |
| 486 buildExportContextSqlExportOptions() { | 486 buildExportContextSqlExportOptions() { |
| 487 var o = new api.ExportContextSqlExportOptions(); | 487 var o = new api.ExportContextSqlExportOptions(); |
| 488 buildCounterExportContextSqlExportOptions++; | 488 buildCounterExportContextSqlExportOptions++; |
| 489 if (buildCounterExportContextSqlExportOptions < 3) { | 489 if (buildCounterExportContextSqlExportOptions < 3) { |
| 490 o.schemaOnly = true; | 490 o.schemaOnly = true; |
| 491 o.tables = buildUnnamed3771(); | 491 o.tables = buildUnnamed3245(); |
| 492 } | 492 } |
| 493 buildCounterExportContextSqlExportOptions--; | 493 buildCounterExportContextSqlExportOptions--; |
| 494 return o; | 494 return o; |
| 495 } | 495 } |
| 496 | 496 |
| 497 checkExportContextSqlExportOptions(api.ExportContextSqlExportOptions o) { | 497 checkExportContextSqlExportOptions(api.ExportContextSqlExportOptions o) { |
| 498 buildCounterExportContextSqlExportOptions++; | 498 buildCounterExportContextSqlExportOptions++; |
| 499 if (buildCounterExportContextSqlExportOptions < 3) { | 499 if (buildCounterExportContextSqlExportOptions < 3) { |
| 500 unittest.expect(o.schemaOnly, unittest.isTrue); | 500 unittest.expect(o.schemaOnly, unittest.isTrue); |
| 501 checkUnnamed3771(o.tables); | 501 checkUnnamed3245(o.tables); |
| 502 } | 502 } |
| 503 buildCounterExportContextSqlExportOptions--; | 503 buildCounterExportContextSqlExportOptions--; |
| 504 } | 504 } |
| 505 | 505 |
| 506 core.int buildCounterExportContext = 0; | 506 core.int buildCounterExportContext = 0; |
| 507 buildExportContext() { | 507 buildExportContext() { |
| 508 var o = new api.ExportContext(); | 508 var o = new api.ExportContext(); |
| 509 buildCounterExportContext++; | 509 buildCounterExportContext++; |
| 510 if (buildCounterExportContext < 3) { | 510 if (buildCounterExportContext < 3) { |
| 511 o.csvExportOptions = buildExportContextCsvExportOptions(); | 511 o.csvExportOptions = buildExportContextCsvExportOptions(); |
| 512 o.databases = buildUnnamed3770(); | 512 o.databases = buildUnnamed3244(); |
| 513 o.fileType = "foo"; | 513 o.fileType = "foo"; |
| 514 o.kind = "foo"; | 514 o.kind = "foo"; |
| 515 o.sqlExportOptions = buildExportContextSqlExportOptions(); | 515 o.sqlExportOptions = buildExportContextSqlExportOptions(); |
| 516 o.uri = "foo"; | 516 o.uri = "foo"; |
| 517 } | 517 } |
| 518 buildCounterExportContext--; | 518 buildCounterExportContext--; |
| 519 return o; | 519 return o; |
| 520 } | 520 } |
| 521 | 521 |
| 522 checkExportContext(api.ExportContext o) { | 522 checkExportContext(api.ExportContext o) { |
| 523 buildCounterExportContext++; | 523 buildCounterExportContext++; |
| 524 if (buildCounterExportContext < 3) { | 524 if (buildCounterExportContext < 3) { |
| 525 checkExportContextCsvExportOptions(o.csvExportOptions); | 525 checkExportContextCsvExportOptions(o.csvExportOptions); |
| 526 checkUnnamed3770(o.databases); | 526 checkUnnamed3244(o.databases); |
| 527 unittest.expect(o.fileType, unittest.equals('foo')); | 527 unittest.expect(o.fileType, unittest.equals('foo')); |
| 528 unittest.expect(o.kind, unittest.equals('foo')); | 528 unittest.expect(o.kind, unittest.equals('foo')); |
| 529 checkExportContextSqlExportOptions(o.sqlExportOptions); | 529 checkExportContextSqlExportOptions(o.sqlExportOptions); |
| 530 unittest.expect(o.uri, unittest.equals('foo')); | 530 unittest.expect(o.uri, unittest.equals('foo')); |
| 531 } | 531 } |
| 532 buildCounterExportContext--; | 532 buildCounterExportContext--; |
| 533 } | 533 } |
| 534 | 534 |
| 535 core.int buildCounterFailoverContext = 0; | 535 core.int buildCounterFailoverContext = 0; |
| 536 buildFailoverContext() { | 536 buildFailoverContext() { |
| 537 var o = new api.FailoverContext(); | 537 var o = new api.FailoverContext(); |
| 538 buildCounterFailoverContext++; | 538 buildCounterFailoverContext++; |
| 539 if (buildCounterFailoverContext < 3) { | 539 if (buildCounterFailoverContext < 3) { |
| 540 o.kind = "foo"; | 540 o.kind = "foo"; |
| 541 o.settingsVersion = "foo"; | 541 o.settingsVersion = "foo"; |
| 542 } | 542 } |
| 543 buildCounterFailoverContext--; | 543 buildCounterFailoverContext--; |
| 544 return o; | 544 return o; |
| 545 } | 545 } |
| 546 | 546 |
| 547 checkFailoverContext(api.FailoverContext o) { | 547 checkFailoverContext(api.FailoverContext o) { |
| 548 buildCounterFailoverContext++; | 548 buildCounterFailoverContext++; |
| 549 if (buildCounterFailoverContext < 3) { | 549 if (buildCounterFailoverContext < 3) { |
| 550 unittest.expect(o.kind, unittest.equals('foo')); | 550 unittest.expect(o.kind, unittest.equals('foo')); |
| 551 unittest.expect(o.settingsVersion, unittest.equals('foo')); | 551 unittest.expect(o.settingsVersion, unittest.equals('foo')); |
| 552 } | 552 } |
| 553 buildCounterFailoverContext--; | 553 buildCounterFailoverContext--; |
| 554 } | 554 } |
| 555 | 555 |
| 556 buildUnnamed3772() { | 556 buildUnnamed3246() { |
| 557 var o = new core.List<core.String>(); | 557 var o = new core.List<core.String>(); |
| 558 o.add("foo"); | 558 o.add("foo"); |
| 559 o.add("foo"); | 559 o.add("foo"); |
| 560 return o; | 560 return o; |
| 561 } | 561 } |
| 562 | 562 |
| 563 checkUnnamed3772(core.List<core.String> o) { | 563 checkUnnamed3246(core.List<core.String> o) { |
| 564 unittest.expect(o, unittest.hasLength(2)); | 564 unittest.expect(o, unittest.hasLength(2)); |
| 565 unittest.expect(o[0], unittest.equals('foo')); | 565 unittest.expect(o[0], unittest.equals('foo')); |
| 566 unittest.expect(o[1], unittest.equals('foo')); | 566 unittest.expect(o[1], unittest.equals('foo')); |
| 567 } | 567 } |
| 568 | 568 |
| 569 buildUnnamed3773() { | 569 buildUnnamed3247() { |
| 570 var o = new core.List<core.String>(); | 570 var o = new core.List<core.String>(); |
| 571 o.add("foo"); | 571 o.add("foo"); |
| 572 o.add("foo"); | 572 o.add("foo"); |
| 573 return o; | 573 return o; |
| 574 } | 574 } |
| 575 | 575 |
| 576 checkUnnamed3773(core.List<core.String> o) { | 576 checkUnnamed3247(core.List<core.String> o) { |
| 577 unittest.expect(o, unittest.hasLength(2)); | 577 unittest.expect(o, unittest.hasLength(2)); |
| 578 unittest.expect(o[0], unittest.equals('foo')); | 578 unittest.expect(o[0], unittest.equals('foo')); |
| 579 unittest.expect(o[1], unittest.equals('foo')); | 579 unittest.expect(o[1], unittest.equals('foo')); |
| 580 } | 580 } |
| 581 | 581 |
| 582 core.int buildCounterFlag = 0; | 582 core.int buildCounterFlag = 0; |
| 583 buildFlag() { | 583 buildFlag() { |
| 584 var o = new api.Flag(); | 584 var o = new api.Flag(); |
| 585 buildCounterFlag++; | 585 buildCounterFlag++; |
| 586 if (buildCounterFlag < 3) { | 586 if (buildCounterFlag < 3) { |
| 587 o.allowedStringValues = buildUnnamed3772(); | 587 o.allowedStringValues = buildUnnamed3246(); |
| 588 o.appliesTo = buildUnnamed3773(); | 588 o.appliesTo = buildUnnamed3247(); |
| 589 o.kind = "foo"; | 589 o.kind = "foo"; |
| 590 o.maxValue = "foo"; | 590 o.maxValue = "foo"; |
| 591 o.minValue = "foo"; | 591 o.minValue = "foo"; |
| 592 o.name = "foo"; | 592 o.name = "foo"; |
| 593 o.requiresRestart = true; | 593 o.requiresRestart = true; |
| 594 o.type = "foo"; | 594 o.type = "foo"; |
| 595 } | 595 } |
| 596 buildCounterFlag--; | 596 buildCounterFlag--; |
| 597 return o; | 597 return o; |
| 598 } | 598 } |
| 599 | 599 |
| 600 checkFlag(api.Flag o) { | 600 checkFlag(api.Flag o) { |
| 601 buildCounterFlag++; | 601 buildCounterFlag++; |
| 602 if (buildCounterFlag < 3) { | 602 if (buildCounterFlag < 3) { |
| 603 checkUnnamed3772(o.allowedStringValues); | 603 checkUnnamed3246(o.allowedStringValues); |
| 604 checkUnnamed3773(o.appliesTo); | 604 checkUnnamed3247(o.appliesTo); |
| 605 unittest.expect(o.kind, unittest.equals('foo')); | 605 unittest.expect(o.kind, unittest.equals('foo')); |
| 606 unittest.expect(o.maxValue, unittest.equals('foo')); | 606 unittest.expect(o.maxValue, unittest.equals('foo')); |
| 607 unittest.expect(o.minValue, unittest.equals('foo')); | 607 unittest.expect(o.minValue, unittest.equals('foo')); |
| 608 unittest.expect(o.name, unittest.equals('foo')); | 608 unittest.expect(o.name, unittest.equals('foo')); |
| 609 unittest.expect(o.requiresRestart, unittest.isTrue); | 609 unittest.expect(o.requiresRestart, unittest.isTrue); |
| 610 unittest.expect(o.type, unittest.equals('foo')); | 610 unittest.expect(o.type, unittest.equals('foo')); |
| 611 } | 611 } |
| 612 buildCounterFlag--; | 612 buildCounterFlag--; |
| 613 } | 613 } |
| 614 | 614 |
| 615 buildUnnamed3774() { | 615 buildUnnamed3248() { |
| 616 var o = new core.List<api.Flag>(); | 616 var o = new core.List<api.Flag>(); |
| 617 o.add(buildFlag()); | 617 o.add(buildFlag()); |
| 618 o.add(buildFlag()); | 618 o.add(buildFlag()); |
| 619 return o; | 619 return o; |
| 620 } | 620 } |
| 621 | 621 |
| 622 checkUnnamed3774(core.List<api.Flag> o) { | 622 checkUnnamed3248(core.List<api.Flag> o) { |
| 623 unittest.expect(o, unittest.hasLength(2)); | 623 unittest.expect(o, unittest.hasLength(2)); |
| 624 checkFlag(o[0]); | 624 checkFlag(o[0]); |
| 625 checkFlag(o[1]); | 625 checkFlag(o[1]); |
| 626 } | 626 } |
| 627 | 627 |
| 628 core.int buildCounterFlagsListResponse = 0; | 628 core.int buildCounterFlagsListResponse = 0; |
| 629 buildFlagsListResponse() { | 629 buildFlagsListResponse() { |
| 630 var o = new api.FlagsListResponse(); | 630 var o = new api.FlagsListResponse(); |
| 631 buildCounterFlagsListResponse++; | 631 buildCounterFlagsListResponse++; |
| 632 if (buildCounterFlagsListResponse < 3) { | 632 if (buildCounterFlagsListResponse < 3) { |
| 633 o.items = buildUnnamed3774(); | 633 o.items = buildUnnamed3248(); |
| 634 o.kind = "foo"; | 634 o.kind = "foo"; |
| 635 } | 635 } |
| 636 buildCounterFlagsListResponse--; | 636 buildCounterFlagsListResponse--; |
| 637 return o; | 637 return o; |
| 638 } | 638 } |
| 639 | 639 |
| 640 checkFlagsListResponse(api.FlagsListResponse o) { | 640 checkFlagsListResponse(api.FlagsListResponse o) { |
| 641 buildCounterFlagsListResponse++; | 641 buildCounterFlagsListResponse++; |
| 642 if (buildCounterFlagsListResponse < 3) { | 642 if (buildCounterFlagsListResponse < 3) { |
| 643 checkUnnamed3774(o.items); | 643 checkUnnamed3248(o.items); |
| 644 unittest.expect(o.kind, unittest.equals('foo')); | 644 unittest.expect(o.kind, unittest.equals('foo')); |
| 645 } | 645 } |
| 646 buildCounterFlagsListResponse--; | 646 buildCounterFlagsListResponse--; |
| 647 } | 647 } |
| 648 | 648 |
| 649 buildUnnamed3775() { | 649 buildUnnamed3249() { |
| 650 var o = new core.List<core.String>(); | 650 var o = new core.List<core.String>(); |
| 651 o.add("foo"); | 651 o.add("foo"); |
| 652 o.add("foo"); | 652 o.add("foo"); |
| 653 return o; | 653 return o; |
| 654 } | 654 } |
| 655 | 655 |
| 656 checkUnnamed3775(core.List<core.String> o) { | 656 checkUnnamed3249(core.List<core.String> o) { |
| 657 unittest.expect(o, unittest.hasLength(2)); | 657 unittest.expect(o, unittest.hasLength(2)); |
| 658 unittest.expect(o[0], unittest.equals('foo')); | 658 unittest.expect(o[0], unittest.equals('foo')); |
| 659 unittest.expect(o[1], unittest.equals('foo')); | 659 unittest.expect(o[1], unittest.equals('foo')); |
| 660 } | 660 } |
| 661 | 661 |
| 662 core.int buildCounterImportContextCsvImportOptions = 0; | 662 core.int buildCounterImportContextCsvImportOptions = 0; |
| 663 buildImportContextCsvImportOptions() { | 663 buildImportContextCsvImportOptions() { |
| 664 var o = new api.ImportContextCsvImportOptions(); | 664 var o = new api.ImportContextCsvImportOptions(); |
| 665 buildCounterImportContextCsvImportOptions++; | 665 buildCounterImportContextCsvImportOptions++; |
| 666 if (buildCounterImportContextCsvImportOptions < 3) { | 666 if (buildCounterImportContextCsvImportOptions < 3) { |
| 667 o.columns = buildUnnamed3775(); | 667 o.columns = buildUnnamed3249(); |
| 668 o.table = "foo"; | 668 o.table = "foo"; |
| 669 } | 669 } |
| 670 buildCounterImportContextCsvImportOptions--; | 670 buildCounterImportContextCsvImportOptions--; |
| 671 return o; | 671 return o; |
| 672 } | 672 } |
| 673 | 673 |
| 674 checkImportContextCsvImportOptions(api.ImportContextCsvImportOptions o) { | 674 checkImportContextCsvImportOptions(api.ImportContextCsvImportOptions o) { |
| 675 buildCounterImportContextCsvImportOptions++; | 675 buildCounterImportContextCsvImportOptions++; |
| 676 if (buildCounterImportContextCsvImportOptions < 3) { | 676 if (buildCounterImportContextCsvImportOptions < 3) { |
| 677 checkUnnamed3775(o.columns); | 677 checkUnnamed3249(o.columns); |
| 678 unittest.expect(o.table, unittest.equals('foo')); | 678 unittest.expect(o.table, unittest.equals('foo')); |
| 679 } | 679 } |
| 680 buildCounterImportContextCsvImportOptions--; | 680 buildCounterImportContextCsvImportOptions--; |
| 681 } | 681 } |
| 682 | 682 |
| 683 core.int buildCounterImportContext = 0; | 683 core.int buildCounterImportContext = 0; |
| 684 buildImportContext() { | 684 buildImportContext() { |
| 685 var o = new api.ImportContext(); | 685 var o = new api.ImportContext(); |
| 686 buildCounterImportContext++; | 686 buildCounterImportContext++; |
| 687 if (buildCounterImportContext < 3) { | 687 if (buildCounterImportContext < 3) { |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 778 } | 778 } |
| 779 | 779 |
| 780 checkInstancesImportRequest(api.InstancesImportRequest o) { | 780 checkInstancesImportRequest(api.InstancesImportRequest o) { |
| 781 buildCounterInstancesImportRequest++; | 781 buildCounterInstancesImportRequest++; |
| 782 if (buildCounterInstancesImportRequest < 3) { | 782 if (buildCounterInstancesImportRequest < 3) { |
| 783 checkImportContext(o.importContext); | 783 checkImportContext(o.importContext); |
| 784 } | 784 } |
| 785 buildCounterInstancesImportRequest--; | 785 buildCounterInstancesImportRequest--; |
| 786 } | 786 } |
| 787 | 787 |
| 788 buildUnnamed3776() { | 788 buildUnnamed3250() { |
| 789 var o = new core.List<api.DatabaseInstance>(); | 789 var o = new core.List<api.DatabaseInstance>(); |
| 790 o.add(buildDatabaseInstance()); | 790 o.add(buildDatabaseInstance()); |
| 791 o.add(buildDatabaseInstance()); | 791 o.add(buildDatabaseInstance()); |
| 792 return o; | 792 return o; |
| 793 } | 793 } |
| 794 | 794 |
| 795 checkUnnamed3776(core.List<api.DatabaseInstance> o) { | 795 checkUnnamed3250(core.List<api.DatabaseInstance> o) { |
| 796 unittest.expect(o, unittest.hasLength(2)); | 796 unittest.expect(o, unittest.hasLength(2)); |
| 797 checkDatabaseInstance(o[0]); | 797 checkDatabaseInstance(o[0]); |
| 798 checkDatabaseInstance(o[1]); | 798 checkDatabaseInstance(o[1]); |
| 799 } | 799 } |
| 800 | 800 |
| 801 core.int buildCounterInstancesListResponse = 0; | 801 core.int buildCounterInstancesListResponse = 0; |
| 802 buildInstancesListResponse() { | 802 buildInstancesListResponse() { |
| 803 var o = new api.InstancesListResponse(); | 803 var o = new api.InstancesListResponse(); |
| 804 buildCounterInstancesListResponse++; | 804 buildCounterInstancesListResponse++; |
| 805 if (buildCounterInstancesListResponse < 3) { | 805 if (buildCounterInstancesListResponse < 3) { |
| 806 o.items = buildUnnamed3776(); | 806 o.items = buildUnnamed3250(); |
| 807 o.kind = "foo"; | 807 o.kind = "foo"; |
| 808 o.nextPageToken = "foo"; | 808 o.nextPageToken = "foo"; |
| 809 } | 809 } |
| 810 buildCounterInstancesListResponse--; | 810 buildCounterInstancesListResponse--; |
| 811 return o; | 811 return o; |
| 812 } | 812 } |
| 813 | 813 |
| 814 checkInstancesListResponse(api.InstancesListResponse o) { | 814 checkInstancesListResponse(api.InstancesListResponse o) { |
| 815 buildCounterInstancesListResponse++; | 815 buildCounterInstancesListResponse++; |
| 816 if (buildCounterInstancesListResponse < 3) { | 816 if (buildCounterInstancesListResponse < 3) { |
| 817 checkUnnamed3776(o.items); | 817 checkUnnamed3250(o.items); |
| 818 unittest.expect(o.kind, unittest.equals('foo')); | 818 unittest.expect(o.kind, unittest.equals('foo')); |
| 819 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 819 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 820 } | 820 } |
| 821 buildCounterInstancesListResponse--; | 821 buildCounterInstancesListResponse--; |
| 822 } | 822 } |
| 823 | 823 |
| 824 core.int buildCounterInstancesRestoreBackupRequest = 0; | 824 core.int buildCounterInstancesRestoreBackupRequest = 0; |
| 825 buildInstancesRestoreBackupRequest() { | 825 buildInstancesRestoreBackupRequest() { |
| 826 var o = new api.InstancesRestoreBackupRequest(); | 826 var o = new api.InstancesRestoreBackupRequest(); |
| 827 buildCounterInstancesRestoreBackupRequest++; | 827 buildCounterInstancesRestoreBackupRequest++; |
| (...skipping 24 matching lines...) Expand all Loading... |
| 852 } | 852 } |
| 853 | 853 |
| 854 checkInstancesTruncateLogRequest(api.InstancesTruncateLogRequest o) { | 854 checkInstancesTruncateLogRequest(api.InstancesTruncateLogRequest o) { |
| 855 buildCounterInstancesTruncateLogRequest++; | 855 buildCounterInstancesTruncateLogRequest++; |
| 856 if (buildCounterInstancesTruncateLogRequest < 3) { | 856 if (buildCounterInstancesTruncateLogRequest < 3) { |
| 857 checkTruncateLogContext(o.truncateLogContext); | 857 checkTruncateLogContext(o.truncateLogContext); |
| 858 } | 858 } |
| 859 buildCounterInstancesTruncateLogRequest--; | 859 buildCounterInstancesTruncateLogRequest--; |
| 860 } | 860 } |
| 861 | 861 |
| 862 buildUnnamed3777() { | 862 buildUnnamed3251() { |
| 863 var o = new core.List<api.AclEntry>(); | 863 var o = new core.List<api.AclEntry>(); |
| 864 o.add(buildAclEntry()); | 864 o.add(buildAclEntry()); |
| 865 o.add(buildAclEntry()); | 865 o.add(buildAclEntry()); |
| 866 return o; | 866 return o; |
| 867 } | 867 } |
| 868 | 868 |
| 869 checkUnnamed3777(core.List<api.AclEntry> o) { | 869 checkUnnamed3251(core.List<api.AclEntry> o) { |
| 870 unittest.expect(o, unittest.hasLength(2)); | 870 unittest.expect(o, unittest.hasLength(2)); |
| 871 checkAclEntry(o[0]); | 871 checkAclEntry(o[0]); |
| 872 checkAclEntry(o[1]); | 872 checkAclEntry(o[1]); |
| 873 } | 873 } |
| 874 | 874 |
| 875 core.int buildCounterIpConfiguration = 0; | 875 core.int buildCounterIpConfiguration = 0; |
| 876 buildIpConfiguration() { | 876 buildIpConfiguration() { |
| 877 var o = new api.IpConfiguration(); | 877 var o = new api.IpConfiguration(); |
| 878 buildCounterIpConfiguration++; | 878 buildCounterIpConfiguration++; |
| 879 if (buildCounterIpConfiguration < 3) { | 879 if (buildCounterIpConfiguration < 3) { |
| 880 o.authorizedNetworks = buildUnnamed3777(); | 880 o.authorizedNetworks = buildUnnamed3251(); |
| 881 o.ipv4Enabled = true; | 881 o.ipv4Enabled = true; |
| 882 o.requireSsl = true; | 882 o.requireSsl = true; |
| 883 } | 883 } |
| 884 buildCounterIpConfiguration--; | 884 buildCounterIpConfiguration--; |
| 885 return o; | 885 return o; |
| 886 } | 886 } |
| 887 | 887 |
| 888 checkIpConfiguration(api.IpConfiguration o) { | 888 checkIpConfiguration(api.IpConfiguration o) { |
| 889 buildCounterIpConfiguration++; | 889 buildCounterIpConfiguration++; |
| 890 if (buildCounterIpConfiguration < 3) { | 890 if (buildCounterIpConfiguration < 3) { |
| 891 checkUnnamed3777(o.authorizedNetworks); | 891 checkUnnamed3251(o.authorizedNetworks); |
| 892 unittest.expect(o.ipv4Enabled, unittest.isTrue); | 892 unittest.expect(o.ipv4Enabled, unittest.isTrue); |
| 893 unittest.expect(o.requireSsl, unittest.isTrue); | 893 unittest.expect(o.requireSsl, unittest.isTrue); |
| 894 } | 894 } |
| 895 buildCounterIpConfiguration--; | 895 buildCounterIpConfiguration--; |
| 896 } | 896 } |
| 897 | 897 |
| 898 core.int buildCounterIpMapping = 0; | 898 core.int buildCounterIpMapping = 0; |
| 899 buildIpMapping() { | 899 buildIpMapping() { |
| 900 var o = new api.IpMapping(); | 900 var o = new api.IpMapping(); |
| 901 buildCounterIpMapping++; | 901 buildCounterIpMapping++; |
| 902 if (buildCounterIpMapping < 3) { | 902 if (buildCounterIpMapping < 3) { |
| 903 o.ipAddress = "foo"; | 903 o.ipAddress = "foo"; |
| 904 o.timeToRetire = core.DateTime.parse("2002-02-27T14:01:02"); | 904 o.timeToRetire = core.DateTime.parse("2002-02-27T14:01:02"); |
| 905 o.type = "foo"; | 905 o.type = "foo"; |
| 906 } | 906 } |
| 907 buildCounterIpMapping--; | 907 buildCounterIpMapping--; |
| 908 return o; | 908 return o; |
| 909 } | 909 } |
| 910 | 910 |
| 911 checkIpMapping(api.IpMapping o) { | 911 checkIpMapping(api.IpMapping o) { |
| 912 buildCounterIpMapping++; | 912 buildCounterIpMapping++; |
| 913 if (buildCounterIpMapping < 3) { | 913 if (buildCounterIpMapping < 3) { |
| 914 unittest.expect(o.ipAddress, unittest.equals('foo')); | 914 unittest.expect(o.ipAddress, unittest.equals('foo')); |
| 915 unittest.expect(o.timeToRetire, unittest.equals(core.DateTime.parse("2002-02
-27T14:01:02"))); | 915 unittest.expect(o.timeToRetire, unittest.equals(core.DateTime.parse("2002-02
-27T14:01:02"))); |
| 916 unittest.expect(o.type, unittest.equals('foo')); | 916 unittest.expect(o.type, unittest.equals('foo')); |
| 917 } | 917 } |
| 918 buildCounterIpMapping--; | 918 buildCounterIpMapping--; |
| 919 } | 919 } |
| 920 | 920 |
| 921 core.int buildCounterLabels = 0; | |
| 922 buildLabels() { | |
| 923 var o = new api.Labels(); | |
| 924 buildCounterLabels++; | |
| 925 if (buildCounterLabels < 3) { | |
| 926 o.key = "foo"; | |
| 927 o.value = "foo"; | |
| 928 } | |
| 929 buildCounterLabels--; | |
| 930 return o; | |
| 931 } | |
| 932 | |
| 933 checkLabels(api.Labels o) { | |
| 934 buildCounterLabels++; | |
| 935 if (buildCounterLabels < 3) { | |
| 936 unittest.expect(o.key, unittest.equals('foo')); | |
| 937 unittest.expect(o.value, unittest.equals('foo')); | |
| 938 } | |
| 939 buildCounterLabels--; | |
| 940 } | |
| 941 | |
| 942 core.int buildCounterLocationPreference = 0; | 921 core.int buildCounterLocationPreference = 0; |
| 943 buildLocationPreference() { | 922 buildLocationPreference() { |
| 944 var o = new api.LocationPreference(); | 923 var o = new api.LocationPreference(); |
| 945 buildCounterLocationPreference++; | 924 buildCounterLocationPreference++; |
| 946 if (buildCounterLocationPreference < 3) { | 925 if (buildCounterLocationPreference < 3) { |
| 947 o.followGaeApplication = "foo"; | 926 o.followGaeApplication = "foo"; |
| 948 o.kind = "foo"; | 927 o.kind = "foo"; |
| 949 o.zone = "foo"; | 928 o.zone = "foo"; |
| 950 } | 929 } |
| 951 buildCounterLocationPreference--; | 930 buildCounterLocationPreference--; |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1110 checkOperationError(api.OperationError o) { | 1089 checkOperationError(api.OperationError o) { |
| 1111 buildCounterOperationError++; | 1090 buildCounterOperationError++; |
| 1112 if (buildCounterOperationError < 3) { | 1091 if (buildCounterOperationError < 3) { |
| 1113 unittest.expect(o.code, unittest.equals('foo')); | 1092 unittest.expect(o.code, unittest.equals('foo')); |
| 1114 unittest.expect(o.kind, unittest.equals('foo')); | 1093 unittest.expect(o.kind, unittest.equals('foo')); |
| 1115 unittest.expect(o.message, unittest.equals('foo')); | 1094 unittest.expect(o.message, unittest.equals('foo')); |
| 1116 } | 1095 } |
| 1117 buildCounterOperationError--; | 1096 buildCounterOperationError--; |
| 1118 } | 1097 } |
| 1119 | 1098 |
| 1120 buildUnnamed3778() { | 1099 buildUnnamed3252() { |
| 1121 var o = new core.List<api.OperationError>(); | 1100 var o = new core.List<api.OperationError>(); |
| 1122 o.add(buildOperationError()); | 1101 o.add(buildOperationError()); |
| 1123 o.add(buildOperationError()); | 1102 o.add(buildOperationError()); |
| 1124 return o; | 1103 return o; |
| 1125 } | 1104 } |
| 1126 | 1105 |
| 1127 checkUnnamed3778(core.List<api.OperationError> o) { | 1106 checkUnnamed3252(core.List<api.OperationError> o) { |
| 1128 unittest.expect(o, unittest.hasLength(2)); | 1107 unittest.expect(o, unittest.hasLength(2)); |
| 1129 checkOperationError(o[0]); | 1108 checkOperationError(o[0]); |
| 1130 checkOperationError(o[1]); | 1109 checkOperationError(o[1]); |
| 1131 } | 1110 } |
| 1132 | 1111 |
| 1133 core.int buildCounterOperationErrors = 0; | 1112 core.int buildCounterOperationErrors = 0; |
| 1134 buildOperationErrors() { | 1113 buildOperationErrors() { |
| 1135 var o = new api.OperationErrors(); | 1114 var o = new api.OperationErrors(); |
| 1136 buildCounterOperationErrors++; | 1115 buildCounterOperationErrors++; |
| 1137 if (buildCounterOperationErrors < 3) { | 1116 if (buildCounterOperationErrors < 3) { |
| 1138 o.errors = buildUnnamed3778(); | 1117 o.errors = buildUnnamed3252(); |
| 1139 o.kind = "foo"; | 1118 o.kind = "foo"; |
| 1140 } | 1119 } |
| 1141 buildCounterOperationErrors--; | 1120 buildCounterOperationErrors--; |
| 1142 return o; | 1121 return o; |
| 1143 } | 1122 } |
| 1144 | 1123 |
| 1145 checkOperationErrors(api.OperationErrors o) { | 1124 checkOperationErrors(api.OperationErrors o) { |
| 1146 buildCounterOperationErrors++; | 1125 buildCounterOperationErrors++; |
| 1147 if (buildCounterOperationErrors < 3) { | 1126 if (buildCounterOperationErrors < 3) { |
| 1148 checkUnnamed3778(o.errors); | 1127 checkUnnamed3252(o.errors); |
| 1149 unittest.expect(o.kind, unittest.equals('foo')); | 1128 unittest.expect(o.kind, unittest.equals('foo')); |
| 1150 } | 1129 } |
| 1151 buildCounterOperationErrors--; | 1130 buildCounterOperationErrors--; |
| 1152 } | 1131 } |
| 1153 | 1132 |
| 1154 buildUnnamed3779() { | 1133 buildUnnamed3253() { |
| 1155 var o = new core.List<api.Operation>(); | 1134 var o = new core.List<api.Operation>(); |
| 1156 o.add(buildOperation()); | 1135 o.add(buildOperation()); |
| 1157 o.add(buildOperation()); | 1136 o.add(buildOperation()); |
| 1158 return o; | 1137 return o; |
| 1159 } | 1138 } |
| 1160 | 1139 |
| 1161 checkUnnamed3779(core.List<api.Operation> o) { | 1140 checkUnnamed3253(core.List<api.Operation> o) { |
| 1162 unittest.expect(o, unittest.hasLength(2)); | 1141 unittest.expect(o, unittest.hasLength(2)); |
| 1163 checkOperation(o[0]); | 1142 checkOperation(o[0]); |
| 1164 checkOperation(o[1]); | 1143 checkOperation(o[1]); |
| 1165 } | 1144 } |
| 1166 | 1145 |
| 1167 core.int buildCounterOperationsListResponse = 0; | 1146 core.int buildCounterOperationsListResponse = 0; |
| 1168 buildOperationsListResponse() { | 1147 buildOperationsListResponse() { |
| 1169 var o = new api.OperationsListResponse(); | 1148 var o = new api.OperationsListResponse(); |
| 1170 buildCounterOperationsListResponse++; | 1149 buildCounterOperationsListResponse++; |
| 1171 if (buildCounterOperationsListResponse < 3) { | 1150 if (buildCounterOperationsListResponse < 3) { |
| 1172 o.items = buildUnnamed3779(); | 1151 o.items = buildUnnamed3253(); |
| 1173 o.kind = "foo"; | 1152 o.kind = "foo"; |
| 1174 o.nextPageToken = "foo"; | 1153 o.nextPageToken = "foo"; |
| 1175 } | 1154 } |
| 1176 buildCounterOperationsListResponse--; | 1155 buildCounterOperationsListResponse--; |
| 1177 return o; | 1156 return o; |
| 1178 } | 1157 } |
| 1179 | 1158 |
| 1180 checkOperationsListResponse(api.OperationsListResponse o) { | 1159 checkOperationsListResponse(api.OperationsListResponse o) { |
| 1181 buildCounterOperationsListResponse++; | 1160 buildCounterOperationsListResponse++; |
| 1182 if (buildCounterOperationsListResponse < 3) { | 1161 if (buildCounterOperationsListResponse < 3) { |
| 1183 checkUnnamed3779(o.items); | 1162 checkUnnamed3253(o.items); |
| 1184 unittest.expect(o.kind, unittest.equals('foo')); | 1163 unittest.expect(o.kind, unittest.equals('foo')); |
| 1185 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 1164 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 1186 } | 1165 } |
| 1187 buildCounterOperationsListResponse--; | 1166 buildCounterOperationsListResponse--; |
| 1188 } | 1167 } |
| 1189 | 1168 |
| 1190 core.int buildCounterReplicaConfiguration = 0; | 1169 core.int buildCounterReplicaConfiguration = 0; |
| 1191 buildReplicaConfiguration() { | 1170 buildReplicaConfiguration() { |
| 1192 var o = new api.ReplicaConfiguration(); | 1171 var o = new api.ReplicaConfiguration(); |
| 1193 buildCounterReplicaConfiguration++; | 1172 buildCounterReplicaConfiguration++; |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1226 checkRestoreBackupContext(api.RestoreBackupContext o) { | 1205 checkRestoreBackupContext(api.RestoreBackupContext o) { |
| 1227 buildCounterRestoreBackupContext++; | 1206 buildCounterRestoreBackupContext++; |
| 1228 if (buildCounterRestoreBackupContext < 3) { | 1207 if (buildCounterRestoreBackupContext < 3) { |
| 1229 unittest.expect(o.backupRunId, unittest.equals('foo')); | 1208 unittest.expect(o.backupRunId, unittest.equals('foo')); |
| 1230 unittest.expect(o.instanceId, unittest.equals('foo')); | 1209 unittest.expect(o.instanceId, unittest.equals('foo')); |
| 1231 unittest.expect(o.kind, unittest.equals('foo')); | 1210 unittest.expect(o.kind, unittest.equals('foo')); |
| 1232 } | 1211 } |
| 1233 buildCounterRestoreBackupContext--; | 1212 buildCounterRestoreBackupContext--; |
| 1234 } | 1213 } |
| 1235 | 1214 |
| 1236 buildUnnamed3780() { | 1215 buildUnnamed3254() { |
| 1237 var o = new core.List<core.String>(); | 1216 var o = new core.List<core.String>(); |
| 1238 o.add("foo"); | 1217 o.add("foo"); |
| 1239 o.add("foo"); | 1218 o.add("foo"); |
| 1240 return o; | 1219 return o; |
| 1241 } | 1220 } |
| 1242 | 1221 |
| 1243 checkUnnamed3780(core.List<core.String> o) { | 1222 checkUnnamed3254(core.List<core.String> o) { |
| 1244 unittest.expect(o, unittest.hasLength(2)); | 1223 unittest.expect(o, unittest.hasLength(2)); |
| 1245 unittest.expect(o[0], unittest.equals('foo')); | 1224 unittest.expect(o[0], unittest.equals('foo')); |
| 1246 unittest.expect(o[1], unittest.equals('foo')); | 1225 unittest.expect(o[1], unittest.equals('foo')); |
| 1247 } | 1226 } |
| 1248 | 1227 |
| 1249 buildUnnamed3781() { | 1228 buildUnnamed3255() { |
| 1250 var o = new core.List<api.DatabaseFlags>(); | 1229 var o = new core.List<api.DatabaseFlags>(); |
| 1251 o.add(buildDatabaseFlags()); | 1230 o.add(buildDatabaseFlags()); |
| 1252 o.add(buildDatabaseFlags()); | 1231 o.add(buildDatabaseFlags()); |
| 1253 return o; | 1232 return o; |
| 1254 } | 1233 } |
| 1255 | 1234 |
| 1256 checkUnnamed3781(core.List<api.DatabaseFlags> o) { | 1235 checkUnnamed3255(core.List<api.DatabaseFlags> o) { |
| 1257 unittest.expect(o, unittest.hasLength(2)); | 1236 unittest.expect(o, unittest.hasLength(2)); |
| 1258 checkDatabaseFlags(o[0]); | 1237 checkDatabaseFlags(o[0]); |
| 1259 checkDatabaseFlags(o[1]); | 1238 checkDatabaseFlags(o[1]); |
| 1260 } | 1239 } |
| 1261 | 1240 |
| 1262 buildUnnamed3782() { | 1241 buildUnnamed3256() { |
| 1263 var o = new core.List<api.Labels>(); | 1242 var o = new core.Map<core.String, core.String>(); |
| 1264 o.add(buildLabels()); | 1243 o["x"] = "foo"; |
| 1265 o.add(buildLabels()); | 1244 o["y"] = "foo"; |
| 1266 return o; | 1245 return o; |
| 1267 } | 1246 } |
| 1268 | 1247 |
| 1269 checkUnnamed3782(core.List<api.Labels> o) { | 1248 checkUnnamed3256(core.Map<core.String, core.String> o) { |
| 1270 unittest.expect(o, unittest.hasLength(2)); | 1249 unittest.expect(o, unittest.hasLength(2)); |
| 1271 checkLabels(o[0]); | 1250 unittest.expect(o["x"], unittest.equals('foo')); |
| 1272 checkLabels(o[1]); | 1251 unittest.expect(o["y"], unittest.equals('foo')); |
| 1273 } | 1252 } |
| 1274 | 1253 |
| 1275 core.int buildCounterSettings = 0; | 1254 core.int buildCounterSettings = 0; |
| 1276 buildSettings() { | 1255 buildSettings() { |
| 1277 var o = new api.Settings(); | 1256 var o = new api.Settings(); |
| 1278 buildCounterSettings++; | 1257 buildCounterSettings++; |
| 1279 if (buildCounterSettings < 3) { | 1258 if (buildCounterSettings < 3) { |
| 1280 o.activationPolicy = "foo"; | 1259 o.activationPolicy = "foo"; |
| 1281 o.authorizedGaeApplications = buildUnnamed3780(); | 1260 o.authorizedGaeApplications = buildUnnamed3254(); |
| 1282 o.availabilityType = "foo"; | 1261 o.availabilityType = "foo"; |
| 1283 o.backupConfiguration = buildBackupConfiguration(); | 1262 o.backupConfiguration = buildBackupConfiguration(); |
| 1284 o.crashSafeReplicationEnabled = true; | 1263 o.crashSafeReplicationEnabled = true; |
| 1285 o.dataDiskSizeGb = "foo"; | 1264 o.dataDiskSizeGb = "foo"; |
| 1286 o.dataDiskType = "foo"; | 1265 o.dataDiskType = "foo"; |
| 1287 o.databaseFlags = buildUnnamed3781(); | 1266 o.databaseFlags = buildUnnamed3255(); |
| 1288 o.databaseReplicationEnabled = true; | 1267 o.databaseReplicationEnabled = true; |
| 1289 o.ipConfiguration = buildIpConfiguration(); | 1268 o.ipConfiguration = buildIpConfiguration(); |
| 1290 o.kind = "foo"; | 1269 o.kind = "foo"; |
| 1291 o.labels = buildUnnamed3782(); | |
| 1292 o.locationPreference = buildLocationPreference(); | 1270 o.locationPreference = buildLocationPreference(); |
| 1293 o.maintenanceWindow = buildMaintenanceWindow(); | 1271 o.maintenanceWindow = buildMaintenanceWindow(); |
| 1294 o.pricingPlan = "foo"; | 1272 o.pricingPlan = "foo"; |
| 1295 o.replicationType = "foo"; | 1273 o.replicationType = "foo"; |
| 1296 o.settingsVersion = "foo"; | 1274 o.settingsVersion = "foo"; |
| 1297 o.storageAutoResize = true; | 1275 o.storageAutoResize = true; |
| 1298 o.storageAutoResizeLimit = "foo"; | 1276 o.storageAutoResizeLimit = "foo"; |
| 1299 o.tier = "foo"; | 1277 o.tier = "foo"; |
| 1278 o.userLabels = buildUnnamed3256(); |
| 1300 } | 1279 } |
| 1301 buildCounterSettings--; | 1280 buildCounterSettings--; |
| 1302 return o; | 1281 return o; |
| 1303 } | 1282 } |
| 1304 | 1283 |
| 1305 checkSettings(api.Settings o) { | 1284 checkSettings(api.Settings o) { |
| 1306 buildCounterSettings++; | 1285 buildCounterSettings++; |
| 1307 if (buildCounterSettings < 3) { | 1286 if (buildCounterSettings < 3) { |
| 1308 unittest.expect(o.activationPolicy, unittest.equals('foo')); | 1287 unittest.expect(o.activationPolicy, unittest.equals('foo')); |
| 1309 checkUnnamed3780(o.authorizedGaeApplications); | 1288 checkUnnamed3254(o.authorizedGaeApplications); |
| 1310 unittest.expect(o.availabilityType, unittest.equals('foo')); | 1289 unittest.expect(o.availabilityType, unittest.equals('foo')); |
| 1311 checkBackupConfiguration(o.backupConfiguration); | 1290 checkBackupConfiguration(o.backupConfiguration); |
| 1312 unittest.expect(o.crashSafeReplicationEnabled, unittest.isTrue); | 1291 unittest.expect(o.crashSafeReplicationEnabled, unittest.isTrue); |
| 1313 unittest.expect(o.dataDiskSizeGb, unittest.equals('foo')); | 1292 unittest.expect(o.dataDiskSizeGb, unittest.equals('foo')); |
| 1314 unittest.expect(o.dataDiskType, unittest.equals('foo')); | 1293 unittest.expect(o.dataDiskType, unittest.equals('foo')); |
| 1315 checkUnnamed3781(o.databaseFlags); | 1294 checkUnnamed3255(o.databaseFlags); |
| 1316 unittest.expect(o.databaseReplicationEnabled, unittest.isTrue); | 1295 unittest.expect(o.databaseReplicationEnabled, unittest.isTrue); |
| 1317 checkIpConfiguration(o.ipConfiguration); | 1296 checkIpConfiguration(o.ipConfiguration); |
| 1318 unittest.expect(o.kind, unittest.equals('foo')); | 1297 unittest.expect(o.kind, unittest.equals('foo')); |
| 1319 checkUnnamed3782(o.labels); | |
| 1320 checkLocationPreference(o.locationPreference); | 1298 checkLocationPreference(o.locationPreference); |
| 1321 checkMaintenanceWindow(o.maintenanceWindow); | 1299 checkMaintenanceWindow(o.maintenanceWindow); |
| 1322 unittest.expect(o.pricingPlan, unittest.equals('foo')); | 1300 unittest.expect(o.pricingPlan, unittest.equals('foo')); |
| 1323 unittest.expect(o.replicationType, unittest.equals('foo')); | 1301 unittest.expect(o.replicationType, unittest.equals('foo')); |
| 1324 unittest.expect(o.settingsVersion, unittest.equals('foo')); | 1302 unittest.expect(o.settingsVersion, unittest.equals('foo')); |
| 1325 unittest.expect(o.storageAutoResize, unittest.isTrue); | 1303 unittest.expect(o.storageAutoResize, unittest.isTrue); |
| 1326 unittest.expect(o.storageAutoResizeLimit, unittest.equals('foo')); | 1304 unittest.expect(o.storageAutoResizeLimit, unittest.equals('foo')); |
| 1327 unittest.expect(o.tier, unittest.equals('foo')); | 1305 unittest.expect(o.tier, unittest.equals('foo')); |
| 1306 checkUnnamed3256(o.userLabels); |
| 1328 } | 1307 } |
| 1329 buildCounterSettings--; | 1308 buildCounterSettings--; |
| 1330 } | 1309 } |
| 1331 | 1310 |
| 1332 core.int buildCounterSslCert = 0; | 1311 core.int buildCounterSslCert = 0; |
| 1333 buildSslCert() { | 1312 buildSslCert() { |
| 1334 var o = new api.SslCert(); | 1313 var o = new api.SslCert(); |
| 1335 buildCounterSslCert++; | 1314 buildCounterSslCert++; |
| 1336 if (buildCounterSslCert < 3) { | 1315 if (buildCounterSslCert < 3) { |
| 1337 o.cert = "foo"; | 1316 o.cert = "foo"; |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1441 buildCounterSslCertsInsertResponse++; | 1420 buildCounterSslCertsInsertResponse++; |
| 1442 if (buildCounterSslCertsInsertResponse < 3) { | 1421 if (buildCounterSslCertsInsertResponse < 3) { |
| 1443 checkSslCertDetail(o.clientCert); | 1422 checkSslCertDetail(o.clientCert); |
| 1444 unittest.expect(o.kind, unittest.equals('foo')); | 1423 unittest.expect(o.kind, unittest.equals('foo')); |
| 1445 checkOperation(o.operation); | 1424 checkOperation(o.operation); |
| 1446 checkSslCert(o.serverCaCert); | 1425 checkSslCert(o.serverCaCert); |
| 1447 } | 1426 } |
| 1448 buildCounterSslCertsInsertResponse--; | 1427 buildCounterSslCertsInsertResponse--; |
| 1449 } | 1428 } |
| 1450 | 1429 |
| 1451 buildUnnamed3783() { | 1430 buildUnnamed3257() { |
| 1452 var o = new core.List<api.SslCert>(); | 1431 var o = new core.List<api.SslCert>(); |
| 1453 o.add(buildSslCert()); | 1432 o.add(buildSslCert()); |
| 1454 o.add(buildSslCert()); | 1433 o.add(buildSslCert()); |
| 1455 return o; | 1434 return o; |
| 1456 } | 1435 } |
| 1457 | 1436 |
| 1458 checkUnnamed3783(core.List<api.SslCert> o) { | 1437 checkUnnamed3257(core.List<api.SslCert> o) { |
| 1459 unittest.expect(o, unittest.hasLength(2)); | 1438 unittest.expect(o, unittest.hasLength(2)); |
| 1460 checkSslCert(o[0]); | 1439 checkSslCert(o[0]); |
| 1461 checkSslCert(o[1]); | 1440 checkSslCert(o[1]); |
| 1462 } | 1441 } |
| 1463 | 1442 |
| 1464 core.int buildCounterSslCertsListResponse = 0; | 1443 core.int buildCounterSslCertsListResponse = 0; |
| 1465 buildSslCertsListResponse() { | 1444 buildSslCertsListResponse() { |
| 1466 var o = new api.SslCertsListResponse(); | 1445 var o = new api.SslCertsListResponse(); |
| 1467 buildCounterSslCertsListResponse++; | 1446 buildCounterSslCertsListResponse++; |
| 1468 if (buildCounterSslCertsListResponse < 3) { | 1447 if (buildCounterSslCertsListResponse < 3) { |
| 1469 o.items = buildUnnamed3783(); | 1448 o.items = buildUnnamed3257(); |
| 1470 o.kind = "foo"; | 1449 o.kind = "foo"; |
| 1471 } | 1450 } |
| 1472 buildCounterSslCertsListResponse--; | 1451 buildCounterSslCertsListResponse--; |
| 1473 return o; | 1452 return o; |
| 1474 } | 1453 } |
| 1475 | 1454 |
| 1476 checkSslCertsListResponse(api.SslCertsListResponse o) { | 1455 checkSslCertsListResponse(api.SslCertsListResponse o) { |
| 1477 buildCounterSslCertsListResponse++; | 1456 buildCounterSslCertsListResponse++; |
| 1478 if (buildCounterSslCertsListResponse < 3) { | 1457 if (buildCounterSslCertsListResponse < 3) { |
| 1479 checkUnnamed3783(o.items); | 1458 checkUnnamed3257(o.items); |
| 1480 unittest.expect(o.kind, unittest.equals('foo')); | 1459 unittest.expect(o.kind, unittest.equals('foo')); |
| 1481 } | 1460 } |
| 1482 buildCounterSslCertsListResponse--; | 1461 buildCounterSslCertsListResponse--; |
| 1483 } | 1462 } |
| 1484 | 1463 |
| 1485 buildUnnamed3784() { | 1464 buildUnnamed3258() { |
| 1486 var o = new core.List<core.String>(); | 1465 var o = new core.List<core.String>(); |
| 1487 o.add("foo"); | 1466 o.add("foo"); |
| 1488 o.add("foo"); | 1467 o.add("foo"); |
| 1489 return o; | 1468 return o; |
| 1490 } | 1469 } |
| 1491 | 1470 |
| 1492 checkUnnamed3784(core.List<core.String> o) { | 1471 checkUnnamed3258(core.List<core.String> o) { |
| 1493 unittest.expect(o, unittest.hasLength(2)); | 1472 unittest.expect(o, unittest.hasLength(2)); |
| 1494 unittest.expect(o[0], unittest.equals('foo')); | 1473 unittest.expect(o[0], unittest.equals('foo')); |
| 1495 unittest.expect(o[1], unittest.equals('foo')); | 1474 unittest.expect(o[1], unittest.equals('foo')); |
| 1496 } | 1475 } |
| 1497 | 1476 |
| 1498 core.int buildCounterTier = 0; | 1477 core.int buildCounterTier = 0; |
| 1499 buildTier() { | 1478 buildTier() { |
| 1500 var o = new api.Tier(); | 1479 var o = new api.Tier(); |
| 1501 buildCounterTier++; | 1480 buildCounterTier++; |
| 1502 if (buildCounterTier < 3) { | 1481 if (buildCounterTier < 3) { |
| 1503 o.DiskQuota = "foo"; | 1482 o.DiskQuota = "foo"; |
| 1504 o.RAM = "foo"; | 1483 o.RAM = "foo"; |
| 1505 o.kind = "foo"; | 1484 o.kind = "foo"; |
| 1506 o.region = buildUnnamed3784(); | 1485 o.region = buildUnnamed3258(); |
| 1507 o.tier = "foo"; | 1486 o.tier = "foo"; |
| 1508 } | 1487 } |
| 1509 buildCounterTier--; | 1488 buildCounterTier--; |
| 1510 return o; | 1489 return o; |
| 1511 } | 1490 } |
| 1512 | 1491 |
| 1513 checkTier(api.Tier o) { | 1492 checkTier(api.Tier o) { |
| 1514 buildCounterTier++; | 1493 buildCounterTier++; |
| 1515 if (buildCounterTier < 3) { | 1494 if (buildCounterTier < 3) { |
| 1516 unittest.expect(o.DiskQuota, unittest.equals('foo')); | 1495 unittest.expect(o.DiskQuota, unittest.equals('foo')); |
| 1517 unittest.expect(o.RAM, unittest.equals('foo')); | 1496 unittest.expect(o.RAM, unittest.equals('foo')); |
| 1518 unittest.expect(o.kind, unittest.equals('foo')); | 1497 unittest.expect(o.kind, unittest.equals('foo')); |
| 1519 checkUnnamed3784(o.region); | 1498 checkUnnamed3258(o.region); |
| 1520 unittest.expect(o.tier, unittest.equals('foo')); | 1499 unittest.expect(o.tier, unittest.equals('foo')); |
| 1521 } | 1500 } |
| 1522 buildCounterTier--; | 1501 buildCounterTier--; |
| 1523 } | 1502 } |
| 1524 | 1503 |
| 1525 buildUnnamed3785() { | 1504 buildUnnamed3259() { |
| 1526 var o = new core.List<api.Tier>(); | 1505 var o = new core.List<api.Tier>(); |
| 1527 o.add(buildTier()); | 1506 o.add(buildTier()); |
| 1528 o.add(buildTier()); | 1507 o.add(buildTier()); |
| 1529 return o; | 1508 return o; |
| 1530 } | 1509 } |
| 1531 | 1510 |
| 1532 checkUnnamed3785(core.List<api.Tier> o) { | 1511 checkUnnamed3259(core.List<api.Tier> o) { |
| 1533 unittest.expect(o, unittest.hasLength(2)); | 1512 unittest.expect(o, unittest.hasLength(2)); |
| 1534 checkTier(o[0]); | 1513 checkTier(o[0]); |
| 1535 checkTier(o[1]); | 1514 checkTier(o[1]); |
| 1536 } | 1515 } |
| 1537 | 1516 |
| 1538 core.int buildCounterTiersListResponse = 0; | 1517 core.int buildCounterTiersListResponse = 0; |
| 1539 buildTiersListResponse() { | 1518 buildTiersListResponse() { |
| 1540 var o = new api.TiersListResponse(); | 1519 var o = new api.TiersListResponse(); |
| 1541 buildCounterTiersListResponse++; | 1520 buildCounterTiersListResponse++; |
| 1542 if (buildCounterTiersListResponse < 3) { | 1521 if (buildCounterTiersListResponse < 3) { |
| 1543 o.items = buildUnnamed3785(); | 1522 o.items = buildUnnamed3259(); |
| 1544 o.kind = "foo"; | 1523 o.kind = "foo"; |
| 1545 } | 1524 } |
| 1546 buildCounterTiersListResponse--; | 1525 buildCounterTiersListResponse--; |
| 1547 return o; | 1526 return o; |
| 1548 } | 1527 } |
| 1549 | 1528 |
| 1550 checkTiersListResponse(api.TiersListResponse o) { | 1529 checkTiersListResponse(api.TiersListResponse o) { |
| 1551 buildCounterTiersListResponse++; | 1530 buildCounterTiersListResponse++; |
| 1552 if (buildCounterTiersListResponse < 3) { | 1531 if (buildCounterTiersListResponse < 3) { |
| 1553 checkUnnamed3785(o.items); | 1532 checkUnnamed3259(o.items); |
| 1554 unittest.expect(o.kind, unittest.equals('foo')); | 1533 unittest.expect(o.kind, unittest.equals('foo')); |
| 1555 } | 1534 } |
| 1556 buildCounterTiersListResponse--; | 1535 buildCounterTiersListResponse--; |
| 1557 } | 1536 } |
| 1558 | 1537 |
| 1559 core.int buildCounterTruncateLogContext = 0; | 1538 core.int buildCounterTruncateLogContext = 0; |
| 1560 buildTruncateLogContext() { | 1539 buildTruncateLogContext() { |
| 1561 var o = new api.TruncateLogContext(); | 1540 var o = new api.TruncateLogContext(); |
| 1562 buildCounterTruncateLogContext++; | 1541 buildCounterTruncateLogContext++; |
| 1563 if (buildCounterTruncateLogContext < 3) { | 1542 if (buildCounterTruncateLogContext < 3) { |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1601 unittest.expect(o.host, unittest.equals('foo')); | 1580 unittest.expect(o.host, unittest.equals('foo')); |
| 1602 unittest.expect(o.instance, unittest.equals('foo')); | 1581 unittest.expect(o.instance, unittest.equals('foo')); |
| 1603 unittest.expect(o.kind, unittest.equals('foo')); | 1582 unittest.expect(o.kind, unittest.equals('foo')); |
| 1604 unittest.expect(o.name, unittest.equals('foo')); | 1583 unittest.expect(o.name, unittest.equals('foo')); |
| 1605 unittest.expect(o.password, unittest.equals('foo')); | 1584 unittest.expect(o.password, unittest.equals('foo')); |
| 1606 unittest.expect(o.project, unittest.equals('foo')); | 1585 unittest.expect(o.project, unittest.equals('foo')); |
| 1607 } | 1586 } |
| 1608 buildCounterUser--; | 1587 buildCounterUser--; |
| 1609 } | 1588 } |
| 1610 | 1589 |
| 1611 buildUnnamed3786() { | 1590 buildUnnamed3260() { |
| 1612 var o = new core.List<api.User>(); | 1591 var o = new core.List<api.User>(); |
| 1613 o.add(buildUser()); | 1592 o.add(buildUser()); |
| 1614 o.add(buildUser()); | 1593 o.add(buildUser()); |
| 1615 return o; | 1594 return o; |
| 1616 } | 1595 } |
| 1617 | 1596 |
| 1618 checkUnnamed3786(core.List<api.User> o) { | 1597 checkUnnamed3260(core.List<api.User> o) { |
| 1619 unittest.expect(o, unittest.hasLength(2)); | 1598 unittest.expect(o, unittest.hasLength(2)); |
| 1620 checkUser(o[0]); | 1599 checkUser(o[0]); |
| 1621 checkUser(o[1]); | 1600 checkUser(o[1]); |
| 1622 } | 1601 } |
| 1623 | 1602 |
| 1624 core.int buildCounterUsersListResponse = 0; | 1603 core.int buildCounterUsersListResponse = 0; |
| 1625 buildUsersListResponse() { | 1604 buildUsersListResponse() { |
| 1626 var o = new api.UsersListResponse(); | 1605 var o = new api.UsersListResponse(); |
| 1627 buildCounterUsersListResponse++; | 1606 buildCounterUsersListResponse++; |
| 1628 if (buildCounterUsersListResponse < 3) { | 1607 if (buildCounterUsersListResponse < 3) { |
| 1629 o.items = buildUnnamed3786(); | 1608 o.items = buildUnnamed3260(); |
| 1630 o.kind = "foo"; | 1609 o.kind = "foo"; |
| 1631 o.nextPageToken = "foo"; | 1610 o.nextPageToken = "foo"; |
| 1632 } | 1611 } |
| 1633 buildCounterUsersListResponse--; | 1612 buildCounterUsersListResponse--; |
| 1634 return o; | 1613 return o; |
| 1635 } | 1614 } |
| 1636 | 1615 |
| 1637 checkUsersListResponse(api.UsersListResponse o) { | 1616 checkUsersListResponse(api.UsersListResponse o) { |
| 1638 buildCounterUsersListResponse++; | 1617 buildCounterUsersListResponse++; |
| 1639 if (buildCounterUsersListResponse < 3) { | 1618 if (buildCounterUsersListResponse < 3) { |
| 1640 checkUnnamed3786(o.items); | 1619 checkUnnamed3260(o.items); |
| 1641 unittest.expect(o.kind, unittest.equals('foo')); | 1620 unittest.expect(o.kind, unittest.equals('foo')); |
| 1642 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 1621 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 1643 } | 1622 } |
| 1644 buildCounterUsersListResponse--; | 1623 buildCounterUsersListResponse--; |
| 1645 } | 1624 } |
| 1646 | 1625 |
| 1647 | 1626 |
| 1648 main() { | 1627 main() { |
| 1649 unittest.group("obj-schema-AclEntry", () { | 1628 unittest.group("obj-schema-AclEntry", () { |
| 1650 unittest.test("to-json--from-json", () { | 1629 unittest.test("to-json--from-json", () { |
| (...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1891 | 1870 |
| 1892 unittest.group("obj-schema-IpMapping", () { | 1871 unittest.group("obj-schema-IpMapping", () { |
| 1893 unittest.test("to-json--from-json", () { | 1872 unittest.test("to-json--from-json", () { |
| 1894 var o = buildIpMapping(); | 1873 var o = buildIpMapping(); |
| 1895 var od = new api.IpMapping.fromJson(o.toJson()); | 1874 var od = new api.IpMapping.fromJson(o.toJson()); |
| 1896 checkIpMapping(od); | 1875 checkIpMapping(od); |
| 1897 }); | 1876 }); |
| 1898 }); | 1877 }); |
| 1899 | 1878 |
| 1900 | 1879 |
| 1901 unittest.group("obj-schema-Labels", () { | |
| 1902 unittest.test("to-json--from-json", () { | |
| 1903 var o = buildLabels(); | |
| 1904 var od = new api.Labels.fromJson(o.toJson()); | |
| 1905 checkLabels(od); | |
| 1906 }); | |
| 1907 }); | |
| 1908 | |
| 1909 | |
| 1910 unittest.group("obj-schema-LocationPreference", () { | 1880 unittest.group("obj-schema-LocationPreference", () { |
| 1911 unittest.test("to-json--from-json", () { | 1881 unittest.test("to-json--from-json", () { |
| 1912 var o = buildLocationPreference(); | 1882 var o = buildLocationPreference(); |
| 1913 var od = new api.LocationPreference.fromJson(o.toJson()); | 1883 var od = new api.LocationPreference.fromJson(o.toJson()); |
| 1914 checkLocationPreference(od); | 1884 checkLocationPreference(od); |
| 1915 }); | 1885 }); |
| 1916 }); | 1886 }); |
| 1917 | 1887 |
| 1918 | 1888 |
| 1919 unittest.group("obj-schema-MaintenanceWindow", () { | 1889 unittest.group("obj-schema-MaintenanceWindow", () { |
| (...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2106 | 2076 |
| 2107 | 2077 |
| 2108 unittest.group("resource-BackupRunsResourceApi", () { | 2078 unittest.group("resource-BackupRunsResourceApi", () { |
| 2109 unittest.test("method--delete", () { | 2079 unittest.test("method--delete", () { |
| 2110 | 2080 |
| 2111 var mock = new HttpServerMock(); | 2081 var mock = new HttpServerMock(); |
| 2112 api.BackupRunsResourceApi res = new api.SqladminApi(mock).backupRuns; | 2082 api.BackupRunsResourceApi res = new api.SqladminApi(mock).backupRuns; |
| 2113 var arg_project = "foo"; | 2083 var arg_project = "foo"; |
| 2114 var arg_instance = "foo"; | 2084 var arg_instance = "foo"; |
| 2115 var arg_id = "foo"; | 2085 var arg_id = "foo"; |
| 2116 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2086 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 2117 var path = (req.url).path; | 2087 var path = (req.url).path; |
| 2118 var pathOffset = 0; | 2088 var pathOffset = 0; |
| 2119 var index; | 2089 var index; |
| 2120 var subPart; | 2090 var subPart; |
| 2121 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2091 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2122 pathOffset += 1; | 2092 pathOffset += 1; |
| 2123 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta4/")); | 2093 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta4/")); |
| 2124 pathOffset += 12; | 2094 pathOffset += 12; |
| 2125 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("projects/")); | 2095 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("projects/")); |
| 2126 pathOffset += 9; | 2096 pathOffset += 9; |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2159 } | 2129 } |
| 2160 } | 2130 } |
| 2161 | 2131 |
| 2162 | 2132 |
| 2163 var h = { | 2133 var h = { |
| 2164 "content-type" : "application/json; charset=utf-8", | 2134 "content-type" : "application/json; charset=utf-8", |
| 2165 }; | 2135 }; |
| 2166 var resp = convert.JSON.encode(buildOperation()); | 2136 var resp = convert.JSON.encode(buildOperation()); |
| 2167 return new async.Future.value(stringResponse(200, h, resp)); | 2137 return new async.Future.value(stringResponse(200, h, resp)); |
| 2168 }), true); | 2138 }), true); |
| 2169 res.delete(arg_project, arg_instance, arg_id).then(unittest.expectAsync(((
api.Operation response) { | 2139 res.delete(arg_project, arg_instance, arg_id).then(unittest.expectAsync1((
(api.Operation response) { |
| 2170 checkOperation(response); | 2140 checkOperation(response); |
| 2171 }))); | 2141 }))); |
| 2172 }); | 2142 }); |
| 2173 | 2143 |
| 2174 unittest.test("method--get", () { | 2144 unittest.test("method--get", () { |
| 2175 | 2145 |
| 2176 var mock = new HttpServerMock(); | 2146 var mock = new HttpServerMock(); |
| 2177 api.BackupRunsResourceApi res = new api.SqladminApi(mock).backupRuns; | 2147 api.BackupRunsResourceApi res = new api.SqladminApi(mock).backupRuns; |
| 2178 var arg_project = "foo"; | 2148 var arg_project = "foo"; |
| 2179 var arg_instance = "foo"; | 2149 var arg_instance = "foo"; |
| 2180 var arg_id = "foo"; | 2150 var arg_id = "foo"; |
| 2181 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2151 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 2182 var path = (req.url).path; | 2152 var path = (req.url).path; |
| 2183 var pathOffset = 0; | 2153 var pathOffset = 0; |
| 2184 var index; | 2154 var index; |
| 2185 var subPart; | 2155 var subPart; |
| 2186 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2156 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2187 pathOffset += 1; | 2157 pathOffset += 1; |
| 2188 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta4/")); | 2158 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta4/")); |
| 2189 pathOffset += 12; | 2159 pathOffset += 12; |
| 2190 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("projects/")); | 2160 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("projects/")); |
| 2191 pathOffset += 9; | 2161 pathOffset += 9; |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2224 } | 2194 } |
| 2225 } | 2195 } |
| 2226 | 2196 |
| 2227 | 2197 |
| 2228 var h = { | 2198 var h = { |
| 2229 "content-type" : "application/json; charset=utf-8", | 2199 "content-type" : "application/json; charset=utf-8", |
| 2230 }; | 2200 }; |
| 2231 var resp = convert.JSON.encode(buildBackupRun()); | 2201 var resp = convert.JSON.encode(buildBackupRun()); |
| 2232 return new async.Future.value(stringResponse(200, h, resp)); | 2202 return new async.Future.value(stringResponse(200, h, resp)); |
| 2233 }), true); | 2203 }), true); |
| 2234 res.get(arg_project, arg_instance, arg_id).then(unittest.expectAsync(((api
.BackupRun response) { | 2204 res.get(arg_project, arg_instance, arg_id).then(unittest.expectAsync1(((ap
i.BackupRun response) { |
| 2235 checkBackupRun(response); | 2205 checkBackupRun(response); |
| 2236 }))); | 2206 }))); |
| 2237 }); | 2207 }); |
| 2238 | 2208 |
| 2239 unittest.test("method--insert", () { | 2209 unittest.test("method--insert", () { |
| 2240 | 2210 |
| 2241 var mock = new HttpServerMock(); | 2211 var mock = new HttpServerMock(); |
| 2242 api.BackupRunsResourceApi res = new api.SqladminApi(mock).backupRuns; | 2212 api.BackupRunsResourceApi res = new api.SqladminApi(mock).backupRuns; |
| 2243 var arg_request = buildBackupRun(); | 2213 var arg_request = buildBackupRun(); |
| 2244 var arg_project = "foo"; | 2214 var arg_project = "foo"; |
| 2245 var arg_instance = "foo"; | 2215 var arg_instance = "foo"; |
| 2246 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2216 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 2247 var obj = new api.BackupRun.fromJson(json); | 2217 var obj = new api.BackupRun.fromJson(json); |
| 2248 checkBackupRun(obj); | 2218 checkBackupRun(obj); |
| 2249 | 2219 |
| 2250 var path = (req.url).path; | 2220 var path = (req.url).path; |
| 2251 var pathOffset = 0; | 2221 var pathOffset = 0; |
| 2252 var index; | 2222 var index; |
| 2253 var subPart; | 2223 var subPart; |
| 2254 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2224 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2255 pathOffset += 1; | 2225 pathOffset += 1; |
| 2256 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta4/")); | 2226 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta4/")); |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2289 } | 2259 } |
| 2290 } | 2260 } |
| 2291 | 2261 |
| 2292 | 2262 |
| 2293 var h = { | 2263 var h = { |
| 2294 "content-type" : "application/json; charset=utf-8", | 2264 "content-type" : "application/json; charset=utf-8", |
| 2295 }; | 2265 }; |
| 2296 var resp = convert.JSON.encode(buildOperation()); | 2266 var resp = convert.JSON.encode(buildOperation()); |
| 2297 return new async.Future.value(stringResponse(200, h, resp)); | 2267 return new async.Future.value(stringResponse(200, h, resp)); |
| 2298 }), true); | 2268 }), true); |
| 2299 res.insert(arg_request, arg_project, arg_instance).then(unittest.expectAsy
nc(((api.Operation response) { | 2269 res.insert(arg_request, arg_project, arg_instance).then(unittest.expectAsy
nc1(((api.Operation response) { |
| 2300 checkOperation(response); | 2270 checkOperation(response); |
| 2301 }))); | 2271 }))); |
| 2302 }); | 2272 }); |
| 2303 | 2273 |
| 2304 unittest.test("method--list", () { | 2274 unittest.test("method--list", () { |
| 2305 | 2275 |
| 2306 var mock = new HttpServerMock(); | 2276 var mock = new HttpServerMock(); |
| 2307 api.BackupRunsResourceApi res = new api.SqladminApi(mock).backupRuns; | 2277 api.BackupRunsResourceApi res = new api.SqladminApi(mock).backupRuns; |
| 2308 var arg_project = "foo"; | 2278 var arg_project = "foo"; |
| 2309 var arg_instance = "foo"; | 2279 var arg_instance = "foo"; |
| 2310 var arg_maxResults = 42; | 2280 var arg_maxResults = 42; |
| 2311 var arg_pageToken = "foo"; | 2281 var arg_pageToken = "foo"; |
| 2312 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2282 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 2313 var path = (req.url).path; | 2283 var path = (req.url).path; |
| 2314 var pathOffset = 0; | 2284 var pathOffset = 0; |
| 2315 var index; | 2285 var index; |
| 2316 var subPart; | 2286 var subPart; |
| 2317 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2287 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2318 pathOffset += 1; | 2288 pathOffset += 1; |
| 2319 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta4/")); | 2289 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta4/")); |
| 2320 pathOffset += 12; | 2290 pathOffset += 12; |
| 2321 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("projects/")); | 2291 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("projects/")); |
| 2322 pathOffset += 9; | 2292 pathOffset += 9; |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2354 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | 2324 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); |
| 2355 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 2325 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
| 2356 | 2326 |
| 2357 | 2327 |
| 2358 var h = { | 2328 var h = { |
| 2359 "content-type" : "application/json; charset=utf-8", | 2329 "content-type" : "application/json; charset=utf-8", |
| 2360 }; | 2330 }; |
| 2361 var resp = convert.JSON.encode(buildBackupRunsListResponse()); | 2331 var resp = convert.JSON.encode(buildBackupRunsListResponse()); |
| 2362 return new async.Future.value(stringResponse(200, h, resp)); | 2332 return new async.Future.value(stringResponse(200, h, resp)); |
| 2363 }), true); | 2333 }), true); |
| 2364 res.list(arg_project, arg_instance, maxResults: arg_maxResults, pageToken:
arg_pageToken).then(unittest.expectAsync(((api.BackupRunsListResponse response)
{ | 2334 res.list(arg_project, arg_instance, maxResults: arg_maxResults, pageToken:
arg_pageToken).then(unittest.expectAsync1(((api.BackupRunsListResponse response
) { |
| 2365 checkBackupRunsListResponse(response); | 2335 checkBackupRunsListResponse(response); |
| 2366 }))); | 2336 }))); |
| 2367 }); | 2337 }); |
| 2368 | 2338 |
| 2369 }); | 2339 }); |
| 2370 | 2340 |
| 2371 | 2341 |
| 2372 unittest.group("resource-DatabasesResourceApi", () { | 2342 unittest.group("resource-DatabasesResourceApi", () { |
| 2373 unittest.test("method--delete", () { | 2343 unittest.test("method--delete", () { |
| 2374 | 2344 |
| 2375 var mock = new HttpServerMock(); | 2345 var mock = new HttpServerMock(); |
| 2376 api.DatabasesResourceApi res = new api.SqladminApi(mock).databases; | 2346 api.DatabasesResourceApi res = new api.SqladminApi(mock).databases; |
| 2377 var arg_project = "foo"; | 2347 var arg_project = "foo"; |
| 2378 var arg_instance = "foo"; | 2348 var arg_instance = "foo"; |
| 2379 var arg_database = "foo"; | 2349 var arg_database = "foo"; |
| 2380 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2350 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 2381 var path = (req.url).path; | 2351 var path = (req.url).path; |
| 2382 var pathOffset = 0; | 2352 var pathOffset = 0; |
| 2383 var index; | 2353 var index; |
| 2384 var subPart; | 2354 var subPart; |
| 2385 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2355 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2386 pathOffset += 1; | 2356 pathOffset += 1; |
| 2387 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta4/")); | 2357 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta4/")); |
| 2388 pathOffset += 12; | 2358 pathOffset += 12; |
| 2389 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("projects/")); | 2359 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("projects/")); |
| 2390 pathOffset += 9; | 2360 pathOffset += 9; |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2423 } | 2393 } |
| 2424 } | 2394 } |
| 2425 | 2395 |
| 2426 | 2396 |
| 2427 var h = { | 2397 var h = { |
| 2428 "content-type" : "application/json; charset=utf-8", | 2398 "content-type" : "application/json; charset=utf-8", |
| 2429 }; | 2399 }; |
| 2430 var resp = convert.JSON.encode(buildOperation()); | 2400 var resp = convert.JSON.encode(buildOperation()); |
| 2431 return new async.Future.value(stringResponse(200, h, resp)); | 2401 return new async.Future.value(stringResponse(200, h, resp)); |
| 2432 }), true); | 2402 }), true); |
| 2433 res.delete(arg_project, arg_instance, arg_database).then(unittest.expectAs
ync(((api.Operation response) { | 2403 res.delete(arg_project, arg_instance, arg_database).then(unittest.expectAs
ync1(((api.Operation response) { |
| 2434 checkOperation(response); | 2404 checkOperation(response); |
| 2435 }))); | 2405 }))); |
| 2436 }); | 2406 }); |
| 2437 | 2407 |
| 2438 unittest.test("method--get", () { | 2408 unittest.test("method--get", () { |
| 2439 | 2409 |
| 2440 var mock = new HttpServerMock(); | 2410 var mock = new HttpServerMock(); |
| 2441 api.DatabasesResourceApi res = new api.SqladminApi(mock).databases; | 2411 api.DatabasesResourceApi res = new api.SqladminApi(mock).databases; |
| 2442 var arg_project = "foo"; | 2412 var arg_project = "foo"; |
| 2443 var arg_instance = "foo"; | 2413 var arg_instance = "foo"; |
| 2444 var arg_database = "foo"; | 2414 var arg_database = "foo"; |
| 2445 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2415 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 2446 var path = (req.url).path; | 2416 var path = (req.url).path; |
| 2447 var pathOffset = 0; | 2417 var pathOffset = 0; |
| 2448 var index; | 2418 var index; |
| 2449 var subPart; | 2419 var subPart; |
| 2450 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2420 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2451 pathOffset += 1; | 2421 pathOffset += 1; |
| 2452 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta4/")); | 2422 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta4/")); |
| 2453 pathOffset += 12; | 2423 pathOffset += 12; |
| 2454 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("projects/")); | 2424 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("projects/")); |
| 2455 pathOffset += 9; | 2425 pathOffset += 9; |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2488 } | 2458 } |
| 2489 } | 2459 } |
| 2490 | 2460 |
| 2491 | 2461 |
| 2492 var h = { | 2462 var h = { |
| 2493 "content-type" : "application/json; charset=utf-8", | 2463 "content-type" : "application/json; charset=utf-8", |
| 2494 }; | 2464 }; |
| 2495 var resp = convert.JSON.encode(buildDatabase()); | 2465 var resp = convert.JSON.encode(buildDatabase()); |
| 2496 return new async.Future.value(stringResponse(200, h, resp)); | 2466 return new async.Future.value(stringResponse(200, h, resp)); |
| 2497 }), true); | 2467 }), true); |
| 2498 res.get(arg_project, arg_instance, arg_database).then(unittest.expectAsync
(((api.Database response) { | 2468 res.get(arg_project, arg_instance, arg_database).then(unittest.expectAsync
1(((api.Database response) { |
| 2499 checkDatabase(response); | 2469 checkDatabase(response); |
| 2500 }))); | 2470 }))); |
| 2501 }); | 2471 }); |
| 2502 | 2472 |
| 2503 unittest.test("method--insert", () { | 2473 unittest.test("method--insert", () { |
| 2504 | 2474 |
| 2505 var mock = new HttpServerMock(); | 2475 var mock = new HttpServerMock(); |
| 2506 api.DatabasesResourceApi res = new api.SqladminApi(mock).databases; | 2476 api.DatabasesResourceApi res = new api.SqladminApi(mock).databases; |
| 2507 var arg_request = buildDatabase(); | 2477 var arg_request = buildDatabase(); |
| 2508 var arg_project = "foo"; | 2478 var arg_project = "foo"; |
| 2509 var arg_instance = "foo"; | 2479 var arg_instance = "foo"; |
| 2510 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2480 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 2511 var obj = new api.Database.fromJson(json); | 2481 var obj = new api.Database.fromJson(json); |
| 2512 checkDatabase(obj); | 2482 checkDatabase(obj); |
| 2513 | 2483 |
| 2514 var path = (req.url).path; | 2484 var path = (req.url).path; |
| 2515 var pathOffset = 0; | 2485 var pathOffset = 0; |
| 2516 var index; | 2486 var index; |
| 2517 var subPart; | 2487 var subPart; |
| 2518 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2488 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2519 pathOffset += 1; | 2489 pathOffset += 1; |
| 2520 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta4/")); | 2490 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta4/")); |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2553 } | 2523 } |
| 2554 } | 2524 } |
| 2555 | 2525 |
| 2556 | 2526 |
| 2557 var h = { | 2527 var h = { |
| 2558 "content-type" : "application/json; charset=utf-8", | 2528 "content-type" : "application/json; charset=utf-8", |
| 2559 }; | 2529 }; |
| 2560 var resp = convert.JSON.encode(buildOperation()); | 2530 var resp = convert.JSON.encode(buildOperation()); |
| 2561 return new async.Future.value(stringResponse(200, h, resp)); | 2531 return new async.Future.value(stringResponse(200, h, resp)); |
| 2562 }), true); | 2532 }), true); |
| 2563 res.insert(arg_request, arg_project, arg_instance).then(unittest.expectAsy
nc(((api.Operation response) { | 2533 res.insert(arg_request, arg_project, arg_instance).then(unittest.expectAsy
nc1(((api.Operation response) { |
| 2564 checkOperation(response); | 2534 checkOperation(response); |
| 2565 }))); | 2535 }))); |
| 2566 }); | 2536 }); |
| 2567 | 2537 |
| 2568 unittest.test("method--list", () { | 2538 unittest.test("method--list", () { |
| 2569 | 2539 |
| 2570 var mock = new HttpServerMock(); | 2540 var mock = new HttpServerMock(); |
| 2571 api.DatabasesResourceApi res = new api.SqladminApi(mock).databases; | 2541 api.DatabasesResourceApi res = new api.SqladminApi(mock).databases; |
| 2572 var arg_project = "foo"; | 2542 var arg_project = "foo"; |
| 2573 var arg_instance = "foo"; | 2543 var arg_instance = "foo"; |
| 2574 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2544 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 2575 var path = (req.url).path; | 2545 var path = (req.url).path; |
| 2576 var pathOffset = 0; | 2546 var pathOffset = 0; |
| 2577 var index; | 2547 var index; |
| 2578 var subPart; | 2548 var subPart; |
| 2579 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2549 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2580 pathOffset += 1; | 2550 pathOffset += 1; |
| 2581 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta4/")); | 2551 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta4/")); |
| 2582 pathOffset += 12; | 2552 pathOffset += 12; |
| 2583 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("projects/")); | 2553 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("projects/")); |
| 2584 pathOffset += 9; | 2554 pathOffset += 9; |
| (...skipping 29 matching lines...) Expand all Loading... |
| 2614 } | 2584 } |
| 2615 } | 2585 } |
| 2616 | 2586 |
| 2617 | 2587 |
| 2618 var h = { | 2588 var h = { |
| 2619 "content-type" : "application/json; charset=utf-8", | 2589 "content-type" : "application/json; charset=utf-8", |
| 2620 }; | 2590 }; |
| 2621 var resp = convert.JSON.encode(buildDatabasesListResponse()); | 2591 var resp = convert.JSON.encode(buildDatabasesListResponse()); |
| 2622 return new async.Future.value(stringResponse(200, h, resp)); | 2592 return new async.Future.value(stringResponse(200, h, resp)); |
| 2623 }), true); | 2593 }), true); |
| 2624 res.list(arg_project, arg_instance).then(unittest.expectAsync(((api.Databa
sesListResponse response) { | 2594 res.list(arg_project, arg_instance).then(unittest.expectAsync1(((api.Datab
asesListResponse response) { |
| 2625 checkDatabasesListResponse(response); | 2595 checkDatabasesListResponse(response); |
| 2626 }))); | 2596 }))); |
| 2627 }); | 2597 }); |
| 2628 | 2598 |
| 2629 unittest.test("method--patch", () { | 2599 unittest.test("method--patch", () { |
| 2630 | 2600 |
| 2631 var mock = new HttpServerMock(); | 2601 var mock = new HttpServerMock(); |
| 2632 api.DatabasesResourceApi res = new api.SqladminApi(mock).databases; | 2602 api.DatabasesResourceApi res = new api.SqladminApi(mock).databases; |
| 2633 var arg_request = buildDatabase(); | 2603 var arg_request = buildDatabase(); |
| 2634 var arg_project = "foo"; | 2604 var arg_project = "foo"; |
| 2635 var arg_instance = "foo"; | 2605 var arg_instance = "foo"; |
| 2636 var arg_database = "foo"; | 2606 var arg_database = "foo"; |
| 2637 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2607 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 2638 var obj = new api.Database.fromJson(json); | 2608 var obj = new api.Database.fromJson(json); |
| 2639 checkDatabase(obj); | 2609 checkDatabase(obj); |
| 2640 | 2610 |
| 2641 var path = (req.url).path; | 2611 var path = (req.url).path; |
| 2642 var pathOffset = 0; | 2612 var pathOffset = 0; |
| 2643 var index; | 2613 var index; |
| 2644 var subPart; | 2614 var subPart; |
| 2645 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2615 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2646 pathOffset += 1; | 2616 pathOffset += 1; |
| 2647 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta4/")); | 2617 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta4/")); |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2683 } | 2653 } |
| 2684 } | 2654 } |
| 2685 | 2655 |
| 2686 | 2656 |
| 2687 var h = { | 2657 var h = { |
| 2688 "content-type" : "application/json; charset=utf-8", | 2658 "content-type" : "application/json; charset=utf-8", |
| 2689 }; | 2659 }; |
| 2690 var resp = convert.JSON.encode(buildOperation()); | 2660 var resp = convert.JSON.encode(buildOperation()); |
| 2691 return new async.Future.value(stringResponse(200, h, resp)); | 2661 return new async.Future.value(stringResponse(200, h, resp)); |
| 2692 }), true); | 2662 }), true); |
| 2693 res.patch(arg_request, arg_project, arg_instance, arg_database).then(unitt
est.expectAsync(((api.Operation response) { | 2663 res.patch(arg_request, arg_project, arg_instance, arg_database).then(unitt
est.expectAsync1(((api.Operation response) { |
| 2694 checkOperation(response); | 2664 checkOperation(response); |
| 2695 }))); | 2665 }))); |
| 2696 }); | 2666 }); |
| 2697 | 2667 |
| 2698 unittest.test("method--update", () { | 2668 unittest.test("method--update", () { |
| 2699 | 2669 |
| 2700 var mock = new HttpServerMock(); | 2670 var mock = new HttpServerMock(); |
| 2701 api.DatabasesResourceApi res = new api.SqladminApi(mock).databases; | 2671 api.DatabasesResourceApi res = new api.SqladminApi(mock).databases; |
| 2702 var arg_request = buildDatabase(); | 2672 var arg_request = buildDatabase(); |
| 2703 var arg_project = "foo"; | 2673 var arg_project = "foo"; |
| 2704 var arg_instance = "foo"; | 2674 var arg_instance = "foo"; |
| 2705 var arg_database = "foo"; | 2675 var arg_database = "foo"; |
| 2706 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2676 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 2707 var obj = new api.Database.fromJson(json); | 2677 var obj = new api.Database.fromJson(json); |
| 2708 checkDatabase(obj); | 2678 checkDatabase(obj); |
| 2709 | 2679 |
| 2710 var path = (req.url).path; | 2680 var path = (req.url).path; |
| 2711 var pathOffset = 0; | 2681 var pathOffset = 0; |
| 2712 var index; | 2682 var index; |
| 2713 var subPart; | 2683 var subPart; |
| 2714 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2684 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2715 pathOffset += 1; | 2685 pathOffset += 1; |
| 2716 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta4/")); | 2686 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta4/")); |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2752 } | 2722 } |
| 2753 } | 2723 } |
| 2754 | 2724 |
| 2755 | 2725 |
| 2756 var h = { | 2726 var h = { |
| 2757 "content-type" : "application/json; charset=utf-8", | 2727 "content-type" : "application/json; charset=utf-8", |
| 2758 }; | 2728 }; |
| 2759 var resp = convert.JSON.encode(buildOperation()); | 2729 var resp = convert.JSON.encode(buildOperation()); |
| 2760 return new async.Future.value(stringResponse(200, h, resp)); | 2730 return new async.Future.value(stringResponse(200, h, resp)); |
| 2761 }), true); | 2731 }), true); |
| 2762 res.update(arg_request, arg_project, arg_instance, arg_database).then(unit
test.expectAsync(((api.Operation response) { | 2732 res.update(arg_request, arg_project, arg_instance, arg_database).then(unit
test.expectAsync1(((api.Operation response) { |
| 2763 checkOperation(response); | 2733 checkOperation(response); |
| 2764 }))); | 2734 }))); |
| 2765 }); | 2735 }); |
| 2766 | 2736 |
| 2767 }); | 2737 }); |
| 2768 | 2738 |
| 2769 | 2739 |
| 2770 unittest.group("resource-FlagsResourceApi", () { | 2740 unittest.group("resource-FlagsResourceApi", () { |
| 2771 unittest.test("method--list", () { | 2741 unittest.test("method--list", () { |
| 2772 | 2742 |
| 2773 var mock = new HttpServerMock(); | 2743 var mock = new HttpServerMock(); |
| 2774 api.FlagsResourceApi res = new api.SqladminApi(mock).flags; | 2744 api.FlagsResourceApi res = new api.SqladminApi(mock).flags; |
| 2775 var arg_databaseVersion = "foo"; | 2745 var arg_databaseVersion = "foo"; |
| 2776 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2746 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 2777 var path = (req.url).path; | 2747 var path = (req.url).path; |
| 2778 var pathOffset = 0; | 2748 var pathOffset = 0; |
| 2779 var index; | 2749 var index; |
| 2780 var subPart; | 2750 var subPart; |
| 2781 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2751 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2782 pathOffset += 1; | 2752 pathOffset += 1; |
| 2783 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta4/")); | 2753 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta4/")); |
| 2784 pathOffset += 12; | 2754 pathOffset += 12; |
| 2785 unittest.expect(path.substring(pathOffset, pathOffset + 5), unittest.equ
als("flags")); | 2755 unittest.expect(path.substring(pathOffset, pathOffset + 5), unittest.equ
als("flags")); |
| 2786 pathOffset += 5; | 2756 pathOffset += 5; |
| (...skipping 16 matching lines...) Expand all Loading... |
| 2803 } | 2773 } |
| 2804 unittest.expect(queryMap["databaseVersion"].first, unittest.equals(arg_d
atabaseVersion)); | 2774 unittest.expect(queryMap["databaseVersion"].first, unittest.equals(arg_d
atabaseVersion)); |
| 2805 | 2775 |
| 2806 | 2776 |
| 2807 var h = { | 2777 var h = { |
| 2808 "content-type" : "application/json; charset=utf-8", | 2778 "content-type" : "application/json; charset=utf-8", |
| 2809 }; | 2779 }; |
| 2810 var resp = convert.JSON.encode(buildFlagsListResponse()); | 2780 var resp = convert.JSON.encode(buildFlagsListResponse()); |
| 2811 return new async.Future.value(stringResponse(200, h, resp)); | 2781 return new async.Future.value(stringResponse(200, h, resp)); |
| 2812 }), true); | 2782 }), true); |
| 2813 res.list(databaseVersion: arg_databaseVersion).then(unittest.expectAsync((
(api.FlagsListResponse response) { | 2783 res.list(databaseVersion: arg_databaseVersion).then(unittest.expectAsync1(
((api.FlagsListResponse response) { |
| 2814 checkFlagsListResponse(response); | 2784 checkFlagsListResponse(response); |
| 2815 }))); | 2785 }))); |
| 2816 }); | 2786 }); |
| 2817 | 2787 |
| 2818 }); | 2788 }); |
| 2819 | 2789 |
| 2820 | 2790 |
| 2821 unittest.group("resource-InstancesResourceApi", () { | 2791 unittest.group("resource-InstancesResourceApi", () { |
| 2822 unittest.test("method--clone", () { | 2792 unittest.test("method--clone", () { |
| 2823 | 2793 |
| 2824 var mock = new HttpServerMock(); | 2794 var mock = new HttpServerMock(); |
| 2825 api.InstancesResourceApi res = new api.SqladminApi(mock).instances; | 2795 api.InstancesResourceApi res = new api.SqladminApi(mock).instances; |
| 2826 var arg_request = buildInstancesCloneRequest(); | 2796 var arg_request = buildInstancesCloneRequest(); |
| 2827 var arg_project = "foo"; | 2797 var arg_project = "foo"; |
| 2828 var arg_instance = "foo"; | 2798 var arg_instance = "foo"; |
| 2829 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2799 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 2830 var obj = new api.InstancesCloneRequest.fromJson(json); | 2800 var obj = new api.InstancesCloneRequest.fromJson(json); |
| 2831 checkInstancesCloneRequest(obj); | 2801 checkInstancesCloneRequest(obj); |
| 2832 | 2802 |
| 2833 var path = (req.url).path; | 2803 var path = (req.url).path; |
| 2834 var pathOffset = 0; | 2804 var pathOffset = 0; |
| 2835 var index; | 2805 var index; |
| 2836 var subPart; | 2806 var subPart; |
| 2837 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2807 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2838 pathOffset += 1; | 2808 pathOffset += 1; |
| 2839 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta4/")); | 2809 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta4/")); |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2872 } | 2842 } |
| 2873 } | 2843 } |
| 2874 | 2844 |
| 2875 | 2845 |
| 2876 var h = { | 2846 var h = { |
| 2877 "content-type" : "application/json; charset=utf-8", | 2847 "content-type" : "application/json; charset=utf-8", |
| 2878 }; | 2848 }; |
| 2879 var resp = convert.JSON.encode(buildOperation()); | 2849 var resp = convert.JSON.encode(buildOperation()); |
| 2880 return new async.Future.value(stringResponse(200, h, resp)); | 2850 return new async.Future.value(stringResponse(200, h, resp)); |
| 2881 }), true); | 2851 }), true); |
| 2882 res.clone(arg_request, arg_project, arg_instance).then(unittest.expectAsyn
c(((api.Operation response) { | 2852 res.clone(arg_request, arg_project, arg_instance).then(unittest.expectAsyn
c1(((api.Operation response) { |
| 2883 checkOperation(response); | 2853 checkOperation(response); |
| 2884 }))); | 2854 }))); |
| 2885 }); | 2855 }); |
| 2886 | 2856 |
| 2887 unittest.test("method--delete", () { | 2857 unittest.test("method--delete", () { |
| 2888 | 2858 |
| 2889 var mock = new HttpServerMock(); | 2859 var mock = new HttpServerMock(); |
| 2890 api.InstancesResourceApi res = new api.SqladminApi(mock).instances; | 2860 api.InstancesResourceApi res = new api.SqladminApi(mock).instances; |
| 2891 var arg_project = "foo"; | 2861 var arg_project = "foo"; |
| 2892 var arg_instance = "foo"; | 2862 var arg_instance = "foo"; |
| 2893 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2863 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 2894 var path = (req.url).path; | 2864 var path = (req.url).path; |
| 2895 var pathOffset = 0; | 2865 var pathOffset = 0; |
| 2896 var index; | 2866 var index; |
| 2897 var subPart; | 2867 var subPart; |
| 2898 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2868 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2899 pathOffset += 1; | 2869 pathOffset += 1; |
| 2900 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta4/")); | 2870 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta4/")); |
| 2901 pathOffset += 12; | 2871 pathOffset += 12; |
| 2902 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("projects/")); | 2872 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("projects/")); |
| 2903 pathOffset += 9; | 2873 pathOffset += 9; |
| (...skipping 25 matching lines...) Expand all Loading... |
| 2929 } | 2899 } |
| 2930 } | 2900 } |
| 2931 | 2901 |
| 2932 | 2902 |
| 2933 var h = { | 2903 var h = { |
| 2934 "content-type" : "application/json; charset=utf-8", | 2904 "content-type" : "application/json; charset=utf-8", |
| 2935 }; | 2905 }; |
| 2936 var resp = convert.JSON.encode(buildOperation()); | 2906 var resp = convert.JSON.encode(buildOperation()); |
| 2937 return new async.Future.value(stringResponse(200, h, resp)); | 2907 return new async.Future.value(stringResponse(200, h, resp)); |
| 2938 }), true); | 2908 }), true); |
| 2939 res.delete(arg_project, arg_instance).then(unittest.expectAsync(((api.Oper
ation response) { | 2909 res.delete(arg_project, arg_instance).then(unittest.expectAsync1(((api.Ope
ration response) { |
| 2940 checkOperation(response); | 2910 checkOperation(response); |
| 2941 }))); | 2911 }))); |
| 2942 }); | 2912 }); |
| 2943 | 2913 |
| 2944 unittest.test("method--export", () { | 2914 unittest.test("method--export", () { |
| 2945 | 2915 |
| 2946 var mock = new HttpServerMock(); | 2916 var mock = new HttpServerMock(); |
| 2947 api.InstancesResourceApi res = new api.SqladminApi(mock).instances; | 2917 api.InstancesResourceApi res = new api.SqladminApi(mock).instances; |
| 2948 var arg_request = buildInstancesExportRequest(); | 2918 var arg_request = buildInstancesExportRequest(); |
| 2949 var arg_project = "foo"; | 2919 var arg_project = "foo"; |
| 2950 var arg_instance = "foo"; | 2920 var arg_instance = "foo"; |
| 2951 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2921 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 2952 var obj = new api.InstancesExportRequest.fromJson(json); | 2922 var obj = new api.InstancesExportRequest.fromJson(json); |
| 2953 checkInstancesExportRequest(obj); | 2923 checkInstancesExportRequest(obj); |
| 2954 | 2924 |
| 2955 var path = (req.url).path; | 2925 var path = (req.url).path; |
| 2956 var pathOffset = 0; | 2926 var pathOffset = 0; |
| 2957 var index; | 2927 var index; |
| 2958 var subPart; | 2928 var subPart; |
| 2959 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2929 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2960 pathOffset += 1; | 2930 pathOffset += 1; |
| 2961 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta4/")); | 2931 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta4/")); |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2994 } | 2964 } |
| 2995 } | 2965 } |
| 2996 | 2966 |
| 2997 | 2967 |
| 2998 var h = { | 2968 var h = { |
| 2999 "content-type" : "application/json; charset=utf-8", | 2969 "content-type" : "application/json; charset=utf-8", |
| 3000 }; | 2970 }; |
| 3001 var resp = convert.JSON.encode(buildOperation()); | 2971 var resp = convert.JSON.encode(buildOperation()); |
| 3002 return new async.Future.value(stringResponse(200, h, resp)); | 2972 return new async.Future.value(stringResponse(200, h, resp)); |
| 3003 }), true); | 2973 }), true); |
| 3004 res.export(arg_request, arg_project, arg_instance).then(unittest.expectAsy
nc(((api.Operation response) { | 2974 res.export(arg_request, arg_project, arg_instance).then(unittest.expectAsy
nc1(((api.Operation response) { |
| 3005 checkOperation(response); | 2975 checkOperation(response); |
| 3006 }))); | 2976 }))); |
| 3007 }); | 2977 }); |
| 3008 | 2978 |
| 3009 unittest.test("method--failover", () { | 2979 unittest.test("method--failover", () { |
| 3010 | 2980 |
| 3011 var mock = new HttpServerMock(); | 2981 var mock = new HttpServerMock(); |
| 3012 api.InstancesResourceApi res = new api.SqladminApi(mock).instances; | 2982 api.InstancesResourceApi res = new api.SqladminApi(mock).instances; |
| 3013 var arg_request = buildInstancesFailoverRequest(); | 2983 var arg_request = buildInstancesFailoverRequest(); |
| 3014 var arg_project = "foo"; | 2984 var arg_project = "foo"; |
| 3015 var arg_instance = "foo"; | 2985 var arg_instance = "foo"; |
| 3016 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2986 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 3017 var obj = new api.InstancesFailoverRequest.fromJson(json); | 2987 var obj = new api.InstancesFailoverRequest.fromJson(json); |
| 3018 checkInstancesFailoverRequest(obj); | 2988 checkInstancesFailoverRequest(obj); |
| 3019 | 2989 |
| 3020 var path = (req.url).path; | 2990 var path = (req.url).path; |
| 3021 var pathOffset = 0; | 2991 var pathOffset = 0; |
| 3022 var index; | 2992 var index; |
| 3023 var subPart; | 2993 var subPart; |
| 3024 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2994 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 3025 pathOffset += 1; | 2995 pathOffset += 1; |
| 3026 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta4/")); | 2996 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta4/")); |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3059 } | 3029 } |
| 3060 } | 3030 } |
| 3061 | 3031 |
| 3062 | 3032 |
| 3063 var h = { | 3033 var h = { |
| 3064 "content-type" : "application/json; charset=utf-8", | 3034 "content-type" : "application/json; charset=utf-8", |
| 3065 }; | 3035 }; |
| 3066 var resp = convert.JSON.encode(buildOperation()); | 3036 var resp = convert.JSON.encode(buildOperation()); |
| 3067 return new async.Future.value(stringResponse(200, h, resp)); | 3037 return new async.Future.value(stringResponse(200, h, resp)); |
| 3068 }), true); | 3038 }), true); |
| 3069 res.failover(arg_request, arg_project, arg_instance).then(unittest.expectA
sync(((api.Operation response) { | 3039 res.failover(arg_request, arg_project, arg_instance).then(unittest.expectA
sync1(((api.Operation response) { |
| 3070 checkOperation(response); | 3040 checkOperation(response); |
| 3071 }))); | 3041 }))); |
| 3072 }); | 3042 }); |
| 3073 | 3043 |
| 3074 unittest.test("method--get", () { | 3044 unittest.test("method--get", () { |
| 3075 | 3045 |
| 3076 var mock = new HttpServerMock(); | 3046 var mock = new HttpServerMock(); |
| 3077 api.InstancesResourceApi res = new api.SqladminApi(mock).instances; | 3047 api.InstancesResourceApi res = new api.SqladminApi(mock).instances; |
| 3078 var arg_project = "foo"; | 3048 var arg_project = "foo"; |
| 3079 var arg_instance = "foo"; | 3049 var arg_instance = "foo"; |
| 3080 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3050 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 3081 var path = (req.url).path; | 3051 var path = (req.url).path; |
| 3082 var pathOffset = 0; | 3052 var pathOffset = 0; |
| 3083 var index; | 3053 var index; |
| 3084 var subPart; | 3054 var subPart; |
| 3085 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3055 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 3086 pathOffset += 1; | 3056 pathOffset += 1; |
| 3087 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta4/")); | 3057 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta4/")); |
| 3088 pathOffset += 12; | 3058 pathOffset += 12; |
| 3089 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("projects/")); | 3059 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("projects/")); |
| 3090 pathOffset += 9; | 3060 pathOffset += 9; |
| (...skipping 25 matching lines...) Expand all Loading... |
| 3116 } | 3086 } |
| 3117 } | 3087 } |
| 3118 | 3088 |
| 3119 | 3089 |
| 3120 var h = { | 3090 var h = { |
| 3121 "content-type" : "application/json; charset=utf-8", | 3091 "content-type" : "application/json; charset=utf-8", |
| 3122 }; | 3092 }; |
| 3123 var resp = convert.JSON.encode(buildDatabaseInstance()); | 3093 var resp = convert.JSON.encode(buildDatabaseInstance()); |
| 3124 return new async.Future.value(stringResponse(200, h, resp)); | 3094 return new async.Future.value(stringResponse(200, h, resp)); |
| 3125 }), true); | 3095 }), true); |
| 3126 res.get(arg_project, arg_instance).then(unittest.expectAsync(((api.Databas
eInstance response) { | 3096 res.get(arg_project, arg_instance).then(unittest.expectAsync1(((api.Databa
seInstance response) { |
| 3127 checkDatabaseInstance(response); | 3097 checkDatabaseInstance(response); |
| 3128 }))); | 3098 }))); |
| 3129 }); | 3099 }); |
| 3130 | 3100 |
| 3131 unittest.test("method--import", () { | 3101 unittest.test("method--import", () { |
| 3132 | 3102 |
| 3133 var mock = new HttpServerMock(); | 3103 var mock = new HttpServerMock(); |
| 3134 api.InstancesResourceApi res = new api.SqladminApi(mock).instances; | 3104 api.InstancesResourceApi res = new api.SqladminApi(mock).instances; |
| 3135 var arg_request = buildInstancesImportRequest(); | 3105 var arg_request = buildInstancesImportRequest(); |
| 3136 var arg_project = "foo"; | 3106 var arg_project = "foo"; |
| 3137 var arg_instance = "foo"; | 3107 var arg_instance = "foo"; |
| 3138 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3108 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 3139 var obj = new api.InstancesImportRequest.fromJson(json); | 3109 var obj = new api.InstancesImportRequest.fromJson(json); |
| 3140 checkInstancesImportRequest(obj); | 3110 checkInstancesImportRequest(obj); |
| 3141 | 3111 |
| 3142 var path = (req.url).path; | 3112 var path = (req.url).path; |
| 3143 var pathOffset = 0; | 3113 var pathOffset = 0; |
| 3144 var index; | 3114 var index; |
| 3145 var subPart; | 3115 var subPart; |
| 3146 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3116 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 3147 pathOffset += 1; | 3117 pathOffset += 1; |
| 3148 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta4/")); | 3118 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta4/")); |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3181 } | 3151 } |
| 3182 } | 3152 } |
| 3183 | 3153 |
| 3184 | 3154 |
| 3185 var h = { | 3155 var h = { |
| 3186 "content-type" : "application/json; charset=utf-8", | 3156 "content-type" : "application/json; charset=utf-8", |
| 3187 }; | 3157 }; |
| 3188 var resp = convert.JSON.encode(buildOperation()); | 3158 var resp = convert.JSON.encode(buildOperation()); |
| 3189 return new async.Future.value(stringResponse(200, h, resp)); | 3159 return new async.Future.value(stringResponse(200, h, resp)); |
| 3190 }), true); | 3160 }), true); |
| 3191 res.import(arg_request, arg_project, arg_instance).then(unittest.expectAsy
nc(((api.Operation response) { | 3161 res.import(arg_request, arg_project, arg_instance).then(unittest.expectAsy
nc1(((api.Operation response) { |
| 3192 checkOperation(response); | 3162 checkOperation(response); |
| 3193 }))); | 3163 }))); |
| 3194 }); | 3164 }); |
| 3195 | 3165 |
| 3196 unittest.test("method--insert", () { | 3166 unittest.test("method--insert", () { |
| 3197 | 3167 |
| 3198 var mock = new HttpServerMock(); | 3168 var mock = new HttpServerMock(); |
| 3199 api.InstancesResourceApi res = new api.SqladminApi(mock).instances; | 3169 api.InstancesResourceApi res = new api.SqladminApi(mock).instances; |
| 3200 var arg_request = buildDatabaseInstance(); | 3170 var arg_request = buildDatabaseInstance(); |
| 3201 var arg_project = "foo"; | 3171 var arg_project = "foo"; |
| 3202 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3172 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 3203 var obj = new api.DatabaseInstance.fromJson(json); | 3173 var obj = new api.DatabaseInstance.fromJson(json); |
| 3204 checkDatabaseInstance(obj); | 3174 checkDatabaseInstance(obj); |
| 3205 | 3175 |
| 3206 var path = (req.url).path; | 3176 var path = (req.url).path; |
| 3207 var pathOffset = 0; | 3177 var pathOffset = 0; |
| 3208 var index; | 3178 var index; |
| 3209 var subPart; | 3179 var subPart; |
| 3210 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3180 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 3211 pathOffset += 1; | 3181 pathOffset += 1; |
| 3212 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta4/")); | 3182 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta4/")); |
| (...skipping 25 matching lines...) Expand all Loading... |
| 3238 } | 3208 } |
| 3239 } | 3209 } |
| 3240 | 3210 |
| 3241 | 3211 |
| 3242 var h = { | 3212 var h = { |
| 3243 "content-type" : "application/json; charset=utf-8", | 3213 "content-type" : "application/json; charset=utf-8", |
| 3244 }; | 3214 }; |
| 3245 var resp = convert.JSON.encode(buildOperation()); | 3215 var resp = convert.JSON.encode(buildOperation()); |
| 3246 return new async.Future.value(stringResponse(200, h, resp)); | 3216 return new async.Future.value(stringResponse(200, h, resp)); |
| 3247 }), true); | 3217 }), true); |
| 3248 res.insert(arg_request, arg_project).then(unittest.expectAsync(((api.Opera
tion response) { | 3218 res.insert(arg_request, arg_project).then(unittest.expectAsync1(((api.Oper
ation response) { |
| 3249 checkOperation(response); | 3219 checkOperation(response); |
| 3250 }))); | 3220 }))); |
| 3251 }); | 3221 }); |
| 3252 | 3222 |
| 3253 unittest.test("method--list", () { | 3223 unittest.test("method--list", () { |
| 3254 | 3224 |
| 3255 var mock = new HttpServerMock(); | 3225 var mock = new HttpServerMock(); |
| 3256 api.InstancesResourceApi res = new api.SqladminApi(mock).instances; | 3226 api.InstancesResourceApi res = new api.SqladminApi(mock).instances; |
| 3257 var arg_project = "foo"; | 3227 var arg_project = "foo"; |
| 3258 var arg_filter = "foo"; | 3228 var arg_filter = "foo"; |
| 3259 var arg_maxResults = 42; | 3229 var arg_maxResults = 42; |
| 3260 var arg_pageToken = "foo"; | 3230 var arg_pageToken = "foo"; |
| 3261 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3231 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 3262 var path = (req.url).path; | 3232 var path = (req.url).path; |
| 3263 var pathOffset = 0; | 3233 var pathOffset = 0; |
| 3264 var index; | 3234 var index; |
| 3265 var subPart; | 3235 var subPart; |
| 3266 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3236 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 3267 pathOffset += 1; | 3237 pathOffset += 1; |
| 3268 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta4/")); | 3238 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta4/")); |
| 3269 pathOffset += 12; | 3239 pathOffset += 12; |
| 3270 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("projects/")); | 3240 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("projects/")); |
| 3271 pathOffset += 9; | 3241 pathOffset += 9; |
| (...skipping 25 matching lines...) Expand all Loading... |
| 3297 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | 3267 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); |
| 3298 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 3268 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
| 3299 | 3269 |
| 3300 | 3270 |
| 3301 var h = { | 3271 var h = { |
| 3302 "content-type" : "application/json; charset=utf-8", | 3272 "content-type" : "application/json; charset=utf-8", |
| 3303 }; | 3273 }; |
| 3304 var resp = convert.JSON.encode(buildInstancesListResponse()); | 3274 var resp = convert.JSON.encode(buildInstancesListResponse()); |
| 3305 return new async.Future.value(stringResponse(200, h, resp)); | 3275 return new async.Future.value(stringResponse(200, h, resp)); |
| 3306 }), true); | 3276 }), true); |
| 3307 res.list(arg_project, filter: arg_filter, maxResults: arg_maxResults, page
Token: arg_pageToken).then(unittest.expectAsync(((api.InstancesListResponse resp
onse) { | 3277 res.list(arg_project, filter: arg_filter, maxResults: arg_maxResults, page
Token: arg_pageToken).then(unittest.expectAsync1(((api.InstancesListResponse res
ponse) { |
| 3308 checkInstancesListResponse(response); | 3278 checkInstancesListResponse(response); |
| 3309 }))); | 3279 }))); |
| 3310 }); | 3280 }); |
| 3311 | 3281 |
| 3312 unittest.test("method--patch", () { | 3282 unittest.test("method--patch", () { |
| 3313 | 3283 |
| 3314 var mock = new HttpServerMock(); | 3284 var mock = new HttpServerMock(); |
| 3315 api.InstancesResourceApi res = new api.SqladminApi(mock).instances; | 3285 api.InstancesResourceApi res = new api.SqladminApi(mock).instances; |
| 3316 var arg_request = buildDatabaseInstance(); | 3286 var arg_request = buildDatabaseInstance(); |
| 3317 var arg_project = "foo"; | 3287 var arg_project = "foo"; |
| 3318 var arg_instance = "foo"; | 3288 var arg_instance = "foo"; |
| 3319 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3289 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 3320 var obj = new api.DatabaseInstance.fromJson(json); | 3290 var obj = new api.DatabaseInstance.fromJson(json); |
| 3321 checkDatabaseInstance(obj); | 3291 checkDatabaseInstance(obj); |
| 3322 | 3292 |
| 3323 var path = (req.url).path; | 3293 var path = (req.url).path; |
| 3324 var pathOffset = 0; | 3294 var pathOffset = 0; |
| 3325 var index; | 3295 var index; |
| 3326 var subPart; | 3296 var subPart; |
| 3327 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3297 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 3328 pathOffset += 1; | 3298 pathOffset += 1; |
| 3329 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta4/")); | 3299 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta4/")); |
| (...skipping 28 matching lines...) Expand all Loading... |
| 3358 } | 3328 } |
| 3359 } | 3329 } |
| 3360 | 3330 |
| 3361 | 3331 |
| 3362 var h = { | 3332 var h = { |
| 3363 "content-type" : "application/json; charset=utf-8", | 3333 "content-type" : "application/json; charset=utf-8", |
| 3364 }; | 3334 }; |
| 3365 var resp = convert.JSON.encode(buildOperation()); | 3335 var resp = convert.JSON.encode(buildOperation()); |
| 3366 return new async.Future.value(stringResponse(200, h, resp)); | 3336 return new async.Future.value(stringResponse(200, h, resp)); |
| 3367 }), true); | 3337 }), true); |
| 3368 res.patch(arg_request, arg_project, arg_instance).then(unittest.expectAsyn
c(((api.Operation response) { | 3338 res.patch(arg_request, arg_project, arg_instance).then(unittest.expectAsyn
c1(((api.Operation response) { |
| 3369 checkOperation(response); | 3339 checkOperation(response); |
| 3370 }))); | 3340 }))); |
| 3371 }); | 3341 }); |
| 3372 | 3342 |
| 3373 unittest.test("method--promoteReplica", () { | 3343 unittest.test("method--promoteReplica", () { |
| 3374 | 3344 |
| 3375 var mock = new HttpServerMock(); | 3345 var mock = new HttpServerMock(); |
| 3376 api.InstancesResourceApi res = new api.SqladminApi(mock).instances; | 3346 api.InstancesResourceApi res = new api.SqladminApi(mock).instances; |
| 3377 var arg_project = "foo"; | 3347 var arg_project = "foo"; |
| 3378 var arg_instance = "foo"; | 3348 var arg_instance = "foo"; |
| 3379 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3349 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 3380 var path = (req.url).path; | 3350 var path = (req.url).path; |
| 3381 var pathOffset = 0; | 3351 var pathOffset = 0; |
| 3382 var index; | 3352 var index; |
| 3383 var subPart; | 3353 var subPart; |
| 3384 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3354 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 3385 pathOffset += 1; | 3355 pathOffset += 1; |
| 3386 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta4/")); | 3356 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta4/")); |
| 3387 pathOffset += 12; | 3357 pathOffset += 12; |
| 3388 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("projects/")); | 3358 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("projects/")); |
| 3389 pathOffset += 9; | 3359 pathOffset += 9; |
| (...skipping 29 matching lines...) Expand all Loading... |
| 3419 } | 3389 } |
| 3420 } | 3390 } |
| 3421 | 3391 |
| 3422 | 3392 |
| 3423 var h = { | 3393 var h = { |
| 3424 "content-type" : "application/json; charset=utf-8", | 3394 "content-type" : "application/json; charset=utf-8", |
| 3425 }; | 3395 }; |
| 3426 var resp = convert.JSON.encode(buildOperation()); | 3396 var resp = convert.JSON.encode(buildOperation()); |
| 3427 return new async.Future.value(stringResponse(200, h, resp)); | 3397 return new async.Future.value(stringResponse(200, h, resp)); |
| 3428 }), true); | 3398 }), true); |
| 3429 res.promoteReplica(arg_project, arg_instance).then(unittest.expectAsync(((
api.Operation response) { | 3399 res.promoteReplica(arg_project, arg_instance).then(unittest.expectAsync1((
(api.Operation response) { |
| 3430 checkOperation(response); | 3400 checkOperation(response); |
| 3431 }))); | 3401 }))); |
| 3432 }); | 3402 }); |
| 3433 | 3403 |
| 3434 unittest.test("method--resetSslConfig", () { | 3404 unittest.test("method--resetSslConfig", () { |
| 3435 | 3405 |
| 3436 var mock = new HttpServerMock(); | 3406 var mock = new HttpServerMock(); |
| 3437 api.InstancesResourceApi res = new api.SqladminApi(mock).instances; | 3407 api.InstancesResourceApi res = new api.SqladminApi(mock).instances; |
| 3438 var arg_project = "foo"; | 3408 var arg_project = "foo"; |
| 3439 var arg_instance = "foo"; | 3409 var arg_instance = "foo"; |
| 3440 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3410 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 3441 var path = (req.url).path; | 3411 var path = (req.url).path; |
| 3442 var pathOffset = 0; | 3412 var pathOffset = 0; |
| 3443 var index; | 3413 var index; |
| 3444 var subPart; | 3414 var subPart; |
| 3445 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3415 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 3446 pathOffset += 1; | 3416 pathOffset += 1; |
| 3447 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta4/")); | 3417 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta4/")); |
| 3448 pathOffset += 12; | 3418 pathOffset += 12; |
| 3449 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("projects/")); | 3419 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("projects/")); |
| 3450 pathOffset += 9; | 3420 pathOffset += 9; |
| (...skipping 29 matching lines...) Expand all Loading... |
| 3480 } | 3450 } |
| 3481 } | 3451 } |
| 3482 | 3452 |
| 3483 | 3453 |
| 3484 var h = { | 3454 var h = { |
| 3485 "content-type" : "application/json; charset=utf-8", | 3455 "content-type" : "application/json; charset=utf-8", |
| 3486 }; | 3456 }; |
| 3487 var resp = convert.JSON.encode(buildOperation()); | 3457 var resp = convert.JSON.encode(buildOperation()); |
| 3488 return new async.Future.value(stringResponse(200, h, resp)); | 3458 return new async.Future.value(stringResponse(200, h, resp)); |
| 3489 }), true); | 3459 }), true); |
| 3490 res.resetSslConfig(arg_project, arg_instance).then(unittest.expectAsync(((
api.Operation response) { | 3460 res.resetSslConfig(arg_project, arg_instance).then(unittest.expectAsync1((
(api.Operation response) { |
| 3491 checkOperation(response); | 3461 checkOperation(response); |
| 3492 }))); | 3462 }))); |
| 3493 }); | 3463 }); |
| 3494 | 3464 |
| 3495 unittest.test("method--restart", () { | 3465 unittest.test("method--restart", () { |
| 3496 | 3466 |
| 3497 var mock = new HttpServerMock(); | 3467 var mock = new HttpServerMock(); |
| 3498 api.InstancesResourceApi res = new api.SqladminApi(mock).instances; | 3468 api.InstancesResourceApi res = new api.SqladminApi(mock).instances; |
| 3499 var arg_project = "foo"; | 3469 var arg_project = "foo"; |
| 3500 var arg_instance = "foo"; | 3470 var arg_instance = "foo"; |
| 3501 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3471 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 3502 var path = (req.url).path; | 3472 var path = (req.url).path; |
| 3503 var pathOffset = 0; | 3473 var pathOffset = 0; |
| 3504 var index; | 3474 var index; |
| 3505 var subPart; | 3475 var subPart; |
| 3506 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3476 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 3507 pathOffset += 1; | 3477 pathOffset += 1; |
| 3508 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta4/")); | 3478 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta4/")); |
| 3509 pathOffset += 12; | 3479 pathOffset += 12; |
| 3510 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("projects/")); | 3480 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("projects/")); |
| 3511 pathOffset += 9; | 3481 pathOffset += 9; |
| (...skipping 29 matching lines...) Expand all Loading... |
| 3541 } | 3511 } |
| 3542 } | 3512 } |
| 3543 | 3513 |
| 3544 | 3514 |
| 3545 var h = { | 3515 var h = { |
| 3546 "content-type" : "application/json; charset=utf-8", | 3516 "content-type" : "application/json; charset=utf-8", |
| 3547 }; | 3517 }; |
| 3548 var resp = convert.JSON.encode(buildOperation()); | 3518 var resp = convert.JSON.encode(buildOperation()); |
| 3549 return new async.Future.value(stringResponse(200, h, resp)); | 3519 return new async.Future.value(stringResponse(200, h, resp)); |
| 3550 }), true); | 3520 }), true); |
| 3551 res.restart(arg_project, arg_instance).then(unittest.expectAsync(((api.Ope
ration response) { | 3521 res.restart(arg_project, arg_instance).then(unittest.expectAsync1(((api.Op
eration response) { |
| 3552 checkOperation(response); | 3522 checkOperation(response); |
| 3553 }))); | 3523 }))); |
| 3554 }); | 3524 }); |
| 3555 | 3525 |
| 3556 unittest.test("method--restoreBackup", () { | 3526 unittest.test("method--restoreBackup", () { |
| 3557 | 3527 |
| 3558 var mock = new HttpServerMock(); | 3528 var mock = new HttpServerMock(); |
| 3559 api.InstancesResourceApi res = new api.SqladminApi(mock).instances; | 3529 api.InstancesResourceApi res = new api.SqladminApi(mock).instances; |
| 3560 var arg_request = buildInstancesRestoreBackupRequest(); | 3530 var arg_request = buildInstancesRestoreBackupRequest(); |
| 3561 var arg_project = "foo"; | 3531 var arg_project = "foo"; |
| 3562 var arg_instance = "foo"; | 3532 var arg_instance = "foo"; |
| 3563 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3533 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 3564 var obj = new api.InstancesRestoreBackupRequest.fromJson(json); | 3534 var obj = new api.InstancesRestoreBackupRequest.fromJson(json); |
| 3565 checkInstancesRestoreBackupRequest(obj); | 3535 checkInstancesRestoreBackupRequest(obj); |
| 3566 | 3536 |
| 3567 var path = (req.url).path; | 3537 var path = (req.url).path; |
| 3568 var pathOffset = 0; | 3538 var pathOffset = 0; |
| 3569 var index; | 3539 var index; |
| 3570 var subPart; | 3540 var subPart; |
| 3571 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3541 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 3572 pathOffset += 1; | 3542 pathOffset += 1; |
| 3573 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta4/")); | 3543 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta4/")); |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3606 } | 3576 } |
| 3607 } | 3577 } |
| 3608 | 3578 |
| 3609 | 3579 |
| 3610 var h = { | 3580 var h = { |
| 3611 "content-type" : "application/json; charset=utf-8", | 3581 "content-type" : "application/json; charset=utf-8", |
| 3612 }; | 3582 }; |
| 3613 var resp = convert.JSON.encode(buildOperation()); | 3583 var resp = convert.JSON.encode(buildOperation()); |
| 3614 return new async.Future.value(stringResponse(200, h, resp)); | 3584 return new async.Future.value(stringResponse(200, h, resp)); |
| 3615 }), true); | 3585 }), true); |
| 3616 res.restoreBackup(arg_request, arg_project, arg_instance).then(unittest.ex
pectAsync(((api.Operation response) { | 3586 res.restoreBackup(arg_request, arg_project, arg_instance).then(unittest.ex
pectAsync1(((api.Operation response) { |
| 3617 checkOperation(response); | 3587 checkOperation(response); |
| 3618 }))); | 3588 }))); |
| 3619 }); | 3589 }); |
| 3620 | 3590 |
| 3621 unittest.test("method--startReplica", () { | 3591 unittest.test("method--startReplica", () { |
| 3622 | 3592 |
| 3623 var mock = new HttpServerMock(); | 3593 var mock = new HttpServerMock(); |
| 3624 api.InstancesResourceApi res = new api.SqladminApi(mock).instances; | 3594 api.InstancesResourceApi res = new api.SqladminApi(mock).instances; |
| 3625 var arg_project = "foo"; | 3595 var arg_project = "foo"; |
| 3626 var arg_instance = "foo"; | 3596 var arg_instance = "foo"; |
| 3627 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3597 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 3628 var path = (req.url).path; | 3598 var path = (req.url).path; |
| 3629 var pathOffset = 0; | 3599 var pathOffset = 0; |
| 3630 var index; | 3600 var index; |
| 3631 var subPart; | 3601 var subPart; |
| 3632 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3602 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 3633 pathOffset += 1; | 3603 pathOffset += 1; |
| 3634 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta4/")); | 3604 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta4/")); |
| 3635 pathOffset += 12; | 3605 pathOffset += 12; |
| 3636 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("projects/")); | 3606 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("projects/")); |
| 3637 pathOffset += 9; | 3607 pathOffset += 9; |
| (...skipping 29 matching lines...) Expand all Loading... |
| 3667 } | 3637 } |
| 3668 } | 3638 } |
| 3669 | 3639 |
| 3670 | 3640 |
| 3671 var h = { | 3641 var h = { |
| 3672 "content-type" : "application/json; charset=utf-8", | 3642 "content-type" : "application/json; charset=utf-8", |
| 3673 }; | 3643 }; |
| 3674 var resp = convert.JSON.encode(buildOperation()); | 3644 var resp = convert.JSON.encode(buildOperation()); |
| 3675 return new async.Future.value(stringResponse(200, h, resp)); | 3645 return new async.Future.value(stringResponse(200, h, resp)); |
| 3676 }), true); | 3646 }), true); |
| 3677 res.startReplica(arg_project, arg_instance).then(unittest.expectAsync(((ap
i.Operation response) { | 3647 res.startReplica(arg_project, arg_instance).then(unittest.expectAsync1(((a
pi.Operation response) { |
| 3678 checkOperation(response); | 3648 checkOperation(response); |
| 3679 }))); | 3649 }))); |
| 3680 }); | 3650 }); |
| 3681 | 3651 |
| 3682 unittest.test("method--stopReplica", () { | 3652 unittest.test("method--stopReplica", () { |
| 3683 | 3653 |
| 3684 var mock = new HttpServerMock(); | 3654 var mock = new HttpServerMock(); |
| 3685 api.InstancesResourceApi res = new api.SqladminApi(mock).instances; | 3655 api.InstancesResourceApi res = new api.SqladminApi(mock).instances; |
| 3686 var arg_project = "foo"; | 3656 var arg_project = "foo"; |
| 3687 var arg_instance = "foo"; | 3657 var arg_instance = "foo"; |
| 3688 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3658 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 3689 var path = (req.url).path; | 3659 var path = (req.url).path; |
| 3690 var pathOffset = 0; | 3660 var pathOffset = 0; |
| 3691 var index; | 3661 var index; |
| 3692 var subPart; | 3662 var subPart; |
| 3693 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3663 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 3694 pathOffset += 1; | 3664 pathOffset += 1; |
| 3695 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta4/")); | 3665 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta4/")); |
| 3696 pathOffset += 12; | 3666 pathOffset += 12; |
| 3697 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("projects/")); | 3667 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("projects/")); |
| 3698 pathOffset += 9; | 3668 pathOffset += 9; |
| (...skipping 29 matching lines...) Expand all Loading... |
| 3728 } | 3698 } |
| 3729 } | 3699 } |
| 3730 | 3700 |
| 3731 | 3701 |
| 3732 var h = { | 3702 var h = { |
| 3733 "content-type" : "application/json; charset=utf-8", | 3703 "content-type" : "application/json; charset=utf-8", |
| 3734 }; | 3704 }; |
| 3735 var resp = convert.JSON.encode(buildOperation()); | 3705 var resp = convert.JSON.encode(buildOperation()); |
| 3736 return new async.Future.value(stringResponse(200, h, resp)); | 3706 return new async.Future.value(stringResponse(200, h, resp)); |
| 3737 }), true); | 3707 }), true); |
| 3738 res.stopReplica(arg_project, arg_instance).then(unittest.expectAsync(((api
.Operation response) { | 3708 res.stopReplica(arg_project, arg_instance).then(unittest.expectAsync1(((ap
i.Operation response) { |
| 3739 checkOperation(response); | 3709 checkOperation(response); |
| 3740 }))); | 3710 }))); |
| 3741 }); | 3711 }); |
| 3742 | 3712 |
| 3743 unittest.test("method--truncateLog", () { | 3713 unittest.test("method--truncateLog", () { |
| 3744 | 3714 |
| 3745 var mock = new HttpServerMock(); | 3715 var mock = new HttpServerMock(); |
| 3746 api.InstancesResourceApi res = new api.SqladminApi(mock).instances; | 3716 api.InstancesResourceApi res = new api.SqladminApi(mock).instances; |
| 3747 var arg_request = buildInstancesTruncateLogRequest(); | 3717 var arg_request = buildInstancesTruncateLogRequest(); |
| 3748 var arg_project = "foo"; | 3718 var arg_project = "foo"; |
| 3749 var arg_instance = "foo"; | 3719 var arg_instance = "foo"; |
| 3750 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3720 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 3751 var obj = new api.InstancesTruncateLogRequest.fromJson(json); | 3721 var obj = new api.InstancesTruncateLogRequest.fromJson(json); |
| 3752 checkInstancesTruncateLogRequest(obj); | 3722 checkInstancesTruncateLogRequest(obj); |
| 3753 | 3723 |
| 3754 var path = (req.url).path; | 3724 var path = (req.url).path; |
| 3755 var pathOffset = 0; | 3725 var pathOffset = 0; |
| 3756 var index; | 3726 var index; |
| 3757 var subPart; | 3727 var subPart; |
| 3758 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3728 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 3759 pathOffset += 1; | 3729 pathOffset += 1; |
| 3760 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta4/")); | 3730 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta4/")); |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3793 } | 3763 } |
| 3794 } | 3764 } |
| 3795 | 3765 |
| 3796 | 3766 |
| 3797 var h = { | 3767 var h = { |
| 3798 "content-type" : "application/json; charset=utf-8", | 3768 "content-type" : "application/json; charset=utf-8", |
| 3799 }; | 3769 }; |
| 3800 var resp = convert.JSON.encode(buildOperation()); | 3770 var resp = convert.JSON.encode(buildOperation()); |
| 3801 return new async.Future.value(stringResponse(200, h, resp)); | 3771 return new async.Future.value(stringResponse(200, h, resp)); |
| 3802 }), true); | 3772 }), true); |
| 3803 res.truncateLog(arg_request, arg_project, arg_instance).then(unittest.expe
ctAsync(((api.Operation response) { | 3773 res.truncateLog(arg_request, arg_project, arg_instance).then(unittest.expe
ctAsync1(((api.Operation response) { |
| 3804 checkOperation(response); | 3774 checkOperation(response); |
| 3805 }))); | 3775 }))); |
| 3806 }); | 3776 }); |
| 3807 | 3777 |
| 3808 unittest.test("method--update", () { | 3778 unittest.test("method--update", () { |
| 3809 | 3779 |
| 3810 var mock = new HttpServerMock(); | 3780 var mock = new HttpServerMock(); |
| 3811 api.InstancesResourceApi res = new api.SqladminApi(mock).instances; | 3781 api.InstancesResourceApi res = new api.SqladminApi(mock).instances; |
| 3812 var arg_request = buildDatabaseInstance(); | 3782 var arg_request = buildDatabaseInstance(); |
| 3813 var arg_project = "foo"; | 3783 var arg_project = "foo"; |
| 3814 var arg_instance = "foo"; | 3784 var arg_instance = "foo"; |
| 3815 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3785 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 3816 var obj = new api.DatabaseInstance.fromJson(json); | 3786 var obj = new api.DatabaseInstance.fromJson(json); |
| 3817 checkDatabaseInstance(obj); | 3787 checkDatabaseInstance(obj); |
| 3818 | 3788 |
| 3819 var path = (req.url).path; | 3789 var path = (req.url).path; |
| 3820 var pathOffset = 0; | 3790 var pathOffset = 0; |
| 3821 var index; | 3791 var index; |
| 3822 var subPart; | 3792 var subPart; |
| 3823 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3793 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 3824 pathOffset += 1; | 3794 pathOffset += 1; |
| 3825 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta4/")); | 3795 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta4/")); |
| (...skipping 28 matching lines...) Expand all Loading... |
| 3854 } | 3824 } |
| 3855 } | 3825 } |
| 3856 | 3826 |
| 3857 | 3827 |
| 3858 var h = { | 3828 var h = { |
| 3859 "content-type" : "application/json; charset=utf-8", | 3829 "content-type" : "application/json; charset=utf-8", |
| 3860 }; | 3830 }; |
| 3861 var resp = convert.JSON.encode(buildOperation()); | 3831 var resp = convert.JSON.encode(buildOperation()); |
| 3862 return new async.Future.value(stringResponse(200, h, resp)); | 3832 return new async.Future.value(stringResponse(200, h, resp)); |
| 3863 }), true); | 3833 }), true); |
| 3864 res.update(arg_request, arg_project, arg_instance).then(unittest.expectAsy
nc(((api.Operation response) { | 3834 res.update(arg_request, arg_project, arg_instance).then(unittest.expectAsy
nc1(((api.Operation response) { |
| 3865 checkOperation(response); | 3835 checkOperation(response); |
| 3866 }))); | 3836 }))); |
| 3867 }); | 3837 }); |
| 3868 | 3838 |
| 3869 }); | 3839 }); |
| 3870 | 3840 |
| 3871 | 3841 |
| 3872 unittest.group("resource-OperationsResourceApi", () { | 3842 unittest.group("resource-OperationsResourceApi", () { |
| 3873 unittest.test("method--get", () { | 3843 unittest.test("method--get", () { |
| 3874 | 3844 |
| 3875 var mock = new HttpServerMock(); | 3845 var mock = new HttpServerMock(); |
| 3876 api.OperationsResourceApi res = new api.SqladminApi(mock).operations; | 3846 api.OperationsResourceApi res = new api.SqladminApi(mock).operations; |
| 3877 var arg_project = "foo"; | 3847 var arg_project = "foo"; |
| 3878 var arg_operation = "foo"; | 3848 var arg_operation = "foo"; |
| 3879 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3849 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 3880 var path = (req.url).path; | 3850 var path = (req.url).path; |
| 3881 var pathOffset = 0; | 3851 var pathOffset = 0; |
| 3882 var index; | 3852 var index; |
| 3883 var subPart; | 3853 var subPart; |
| 3884 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3854 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 3885 pathOffset += 1; | 3855 pathOffset += 1; |
| 3886 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta4/")); | 3856 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta4/")); |
| 3887 pathOffset += 12; | 3857 pathOffset += 12; |
| 3888 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("projects/")); | 3858 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("projects/")); |
| 3889 pathOffset += 9; | 3859 pathOffset += 9; |
| (...skipping 25 matching lines...) Expand all Loading... |
| 3915 } | 3885 } |
| 3916 } | 3886 } |
| 3917 | 3887 |
| 3918 | 3888 |
| 3919 var h = { | 3889 var h = { |
| 3920 "content-type" : "application/json; charset=utf-8", | 3890 "content-type" : "application/json; charset=utf-8", |
| 3921 }; | 3891 }; |
| 3922 var resp = convert.JSON.encode(buildOperation()); | 3892 var resp = convert.JSON.encode(buildOperation()); |
| 3923 return new async.Future.value(stringResponse(200, h, resp)); | 3893 return new async.Future.value(stringResponse(200, h, resp)); |
| 3924 }), true); | 3894 }), true); |
| 3925 res.get(arg_project, arg_operation).then(unittest.expectAsync(((api.Operat
ion response) { | 3895 res.get(arg_project, arg_operation).then(unittest.expectAsync1(((api.Opera
tion response) { |
| 3926 checkOperation(response); | 3896 checkOperation(response); |
| 3927 }))); | 3897 }))); |
| 3928 }); | 3898 }); |
| 3929 | 3899 |
| 3930 unittest.test("method--list", () { | 3900 unittest.test("method--list", () { |
| 3931 | 3901 |
| 3932 var mock = new HttpServerMock(); | 3902 var mock = new HttpServerMock(); |
| 3933 api.OperationsResourceApi res = new api.SqladminApi(mock).operations; | 3903 api.OperationsResourceApi res = new api.SqladminApi(mock).operations; |
| 3934 var arg_project = "foo"; | 3904 var arg_project = "foo"; |
| 3935 var arg_instance = "foo"; | 3905 var arg_instance = "foo"; |
| 3936 var arg_maxResults = 42; | 3906 var arg_maxResults = 42; |
| 3937 var arg_pageToken = "foo"; | 3907 var arg_pageToken = "foo"; |
| 3938 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3908 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 3939 var path = (req.url).path; | 3909 var path = (req.url).path; |
| 3940 var pathOffset = 0; | 3910 var pathOffset = 0; |
| 3941 var index; | 3911 var index; |
| 3942 var subPart; | 3912 var subPart; |
| 3943 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3913 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 3944 pathOffset += 1; | 3914 pathOffset += 1; |
| 3945 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta4/")); | 3915 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta4/")); |
| 3946 pathOffset += 12; | 3916 pathOffset += 12; |
| 3947 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("projects/")); | 3917 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("projects/")); |
| 3948 pathOffset += 9; | 3918 pathOffset += 9; |
| (...skipping 25 matching lines...) Expand all Loading... |
| 3974 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | 3944 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); |
| 3975 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 3945 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
| 3976 | 3946 |
| 3977 | 3947 |
| 3978 var h = { | 3948 var h = { |
| 3979 "content-type" : "application/json; charset=utf-8", | 3949 "content-type" : "application/json; charset=utf-8", |
| 3980 }; | 3950 }; |
| 3981 var resp = convert.JSON.encode(buildOperationsListResponse()); | 3951 var resp = convert.JSON.encode(buildOperationsListResponse()); |
| 3982 return new async.Future.value(stringResponse(200, h, resp)); | 3952 return new async.Future.value(stringResponse(200, h, resp)); |
| 3983 }), true); | 3953 }), true); |
| 3984 res.list(arg_project, arg_instance, maxResults: arg_maxResults, pageToken:
arg_pageToken).then(unittest.expectAsync(((api.OperationsListResponse response)
{ | 3954 res.list(arg_project, arg_instance, maxResults: arg_maxResults, pageToken:
arg_pageToken).then(unittest.expectAsync1(((api.OperationsListResponse response
) { |
| 3985 checkOperationsListResponse(response); | 3955 checkOperationsListResponse(response); |
| 3986 }))); | 3956 }))); |
| 3987 }); | 3957 }); |
| 3988 | 3958 |
| 3989 }); | 3959 }); |
| 3990 | 3960 |
| 3991 | 3961 |
| 3992 unittest.group("resource-SslCertsResourceApi", () { | 3962 unittest.group("resource-SslCertsResourceApi", () { |
| 3993 unittest.test("method--createEphemeral", () { | 3963 unittest.test("method--createEphemeral", () { |
| 3994 | 3964 |
| 3995 var mock = new HttpServerMock(); | 3965 var mock = new HttpServerMock(); |
| 3996 api.SslCertsResourceApi res = new api.SqladminApi(mock).sslCerts; | 3966 api.SslCertsResourceApi res = new api.SqladminApi(mock).sslCerts; |
| 3997 var arg_request = buildSslCertsCreateEphemeralRequest(); | 3967 var arg_request = buildSslCertsCreateEphemeralRequest(); |
| 3998 var arg_project = "foo"; | 3968 var arg_project = "foo"; |
| 3999 var arg_instance = "foo"; | 3969 var arg_instance = "foo"; |
| 4000 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3970 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 4001 var obj = new api.SslCertsCreateEphemeralRequest.fromJson(json); | 3971 var obj = new api.SslCertsCreateEphemeralRequest.fromJson(json); |
| 4002 checkSslCertsCreateEphemeralRequest(obj); | 3972 checkSslCertsCreateEphemeralRequest(obj); |
| 4003 | 3973 |
| 4004 var path = (req.url).path; | 3974 var path = (req.url).path; |
| 4005 var pathOffset = 0; | 3975 var pathOffset = 0; |
| 4006 var index; | 3976 var index; |
| 4007 var subPart; | 3977 var subPart; |
| 4008 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3978 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 4009 pathOffset += 1; | 3979 pathOffset += 1; |
| 4010 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta4/")); | 3980 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta4/")); |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4043 } | 4013 } |
| 4044 } | 4014 } |
| 4045 | 4015 |
| 4046 | 4016 |
| 4047 var h = { | 4017 var h = { |
| 4048 "content-type" : "application/json; charset=utf-8", | 4018 "content-type" : "application/json; charset=utf-8", |
| 4049 }; | 4019 }; |
| 4050 var resp = convert.JSON.encode(buildSslCert()); | 4020 var resp = convert.JSON.encode(buildSslCert()); |
| 4051 return new async.Future.value(stringResponse(200, h, resp)); | 4021 return new async.Future.value(stringResponse(200, h, resp)); |
| 4052 }), true); | 4022 }), true); |
| 4053 res.createEphemeral(arg_request, arg_project, arg_instance).then(unittest.
expectAsync(((api.SslCert response) { | 4023 res.createEphemeral(arg_request, arg_project, arg_instance).then(unittest.
expectAsync1(((api.SslCert response) { |
| 4054 checkSslCert(response); | 4024 checkSslCert(response); |
| 4055 }))); | 4025 }))); |
| 4056 }); | 4026 }); |
| 4057 | 4027 |
| 4058 unittest.test("method--delete", () { | 4028 unittest.test("method--delete", () { |
| 4059 | 4029 |
| 4060 var mock = new HttpServerMock(); | 4030 var mock = new HttpServerMock(); |
| 4061 api.SslCertsResourceApi res = new api.SqladminApi(mock).sslCerts; | 4031 api.SslCertsResourceApi res = new api.SqladminApi(mock).sslCerts; |
| 4062 var arg_project = "foo"; | 4032 var arg_project = "foo"; |
| 4063 var arg_instance = "foo"; | 4033 var arg_instance = "foo"; |
| 4064 var arg_sha1Fingerprint = "foo"; | 4034 var arg_sha1Fingerprint = "foo"; |
| 4065 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 4035 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 4066 var path = (req.url).path; | 4036 var path = (req.url).path; |
| 4067 var pathOffset = 0; | 4037 var pathOffset = 0; |
| 4068 var index; | 4038 var index; |
| 4069 var subPart; | 4039 var subPart; |
| 4070 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 4040 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 4071 pathOffset += 1; | 4041 pathOffset += 1; |
| 4072 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta4/")); | 4042 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta4/")); |
| 4073 pathOffset += 12; | 4043 pathOffset += 12; |
| 4074 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("projects/")); | 4044 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("projects/")); |
| 4075 pathOffset += 9; | 4045 pathOffset += 9; |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4108 } | 4078 } |
| 4109 } | 4079 } |
| 4110 | 4080 |
| 4111 | 4081 |
| 4112 var h = { | 4082 var h = { |
| 4113 "content-type" : "application/json; charset=utf-8", | 4083 "content-type" : "application/json; charset=utf-8", |
| 4114 }; | 4084 }; |
| 4115 var resp = convert.JSON.encode(buildOperation()); | 4085 var resp = convert.JSON.encode(buildOperation()); |
| 4116 return new async.Future.value(stringResponse(200, h, resp)); | 4086 return new async.Future.value(stringResponse(200, h, resp)); |
| 4117 }), true); | 4087 }), true); |
| 4118 res.delete(arg_project, arg_instance, arg_sha1Fingerprint).then(unittest.e
xpectAsync(((api.Operation response) { | 4088 res.delete(arg_project, arg_instance, arg_sha1Fingerprint).then(unittest.e
xpectAsync1(((api.Operation response) { |
| 4119 checkOperation(response); | 4089 checkOperation(response); |
| 4120 }))); | 4090 }))); |
| 4121 }); | 4091 }); |
| 4122 | 4092 |
| 4123 unittest.test("method--get", () { | 4093 unittest.test("method--get", () { |
| 4124 | 4094 |
| 4125 var mock = new HttpServerMock(); | 4095 var mock = new HttpServerMock(); |
| 4126 api.SslCertsResourceApi res = new api.SqladminApi(mock).sslCerts; | 4096 api.SslCertsResourceApi res = new api.SqladminApi(mock).sslCerts; |
| 4127 var arg_project = "foo"; | 4097 var arg_project = "foo"; |
| 4128 var arg_instance = "foo"; | 4098 var arg_instance = "foo"; |
| 4129 var arg_sha1Fingerprint = "foo"; | 4099 var arg_sha1Fingerprint = "foo"; |
| 4130 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 4100 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 4131 var path = (req.url).path; | 4101 var path = (req.url).path; |
| 4132 var pathOffset = 0; | 4102 var pathOffset = 0; |
| 4133 var index; | 4103 var index; |
| 4134 var subPart; | 4104 var subPart; |
| 4135 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 4105 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 4136 pathOffset += 1; | 4106 pathOffset += 1; |
| 4137 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta4/")); | 4107 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta4/")); |
| 4138 pathOffset += 12; | 4108 pathOffset += 12; |
| 4139 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("projects/")); | 4109 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("projects/")); |
| 4140 pathOffset += 9; | 4110 pathOffset += 9; |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4173 } | 4143 } |
| 4174 } | 4144 } |
| 4175 | 4145 |
| 4176 | 4146 |
| 4177 var h = { | 4147 var h = { |
| 4178 "content-type" : "application/json; charset=utf-8", | 4148 "content-type" : "application/json; charset=utf-8", |
| 4179 }; | 4149 }; |
| 4180 var resp = convert.JSON.encode(buildSslCert()); | 4150 var resp = convert.JSON.encode(buildSslCert()); |
| 4181 return new async.Future.value(stringResponse(200, h, resp)); | 4151 return new async.Future.value(stringResponse(200, h, resp)); |
| 4182 }), true); | 4152 }), true); |
| 4183 res.get(arg_project, arg_instance, arg_sha1Fingerprint).then(unittest.expe
ctAsync(((api.SslCert response) { | 4153 res.get(arg_project, arg_instance, arg_sha1Fingerprint).then(unittest.expe
ctAsync1(((api.SslCert response) { |
| 4184 checkSslCert(response); | 4154 checkSslCert(response); |
| 4185 }))); | 4155 }))); |
| 4186 }); | 4156 }); |
| 4187 | 4157 |
| 4188 unittest.test("method--insert", () { | 4158 unittest.test("method--insert", () { |
| 4189 | 4159 |
| 4190 var mock = new HttpServerMock(); | 4160 var mock = new HttpServerMock(); |
| 4191 api.SslCertsResourceApi res = new api.SqladminApi(mock).sslCerts; | 4161 api.SslCertsResourceApi res = new api.SqladminApi(mock).sslCerts; |
| 4192 var arg_request = buildSslCertsInsertRequest(); | 4162 var arg_request = buildSslCertsInsertRequest(); |
| 4193 var arg_project = "foo"; | 4163 var arg_project = "foo"; |
| 4194 var arg_instance = "foo"; | 4164 var arg_instance = "foo"; |
| 4195 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 4165 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 4196 var obj = new api.SslCertsInsertRequest.fromJson(json); | 4166 var obj = new api.SslCertsInsertRequest.fromJson(json); |
| 4197 checkSslCertsInsertRequest(obj); | 4167 checkSslCertsInsertRequest(obj); |
| 4198 | 4168 |
| 4199 var path = (req.url).path; | 4169 var path = (req.url).path; |
| 4200 var pathOffset = 0; | 4170 var pathOffset = 0; |
| 4201 var index; | 4171 var index; |
| 4202 var subPart; | 4172 var subPart; |
| 4203 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 4173 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 4204 pathOffset += 1; | 4174 pathOffset += 1; |
| 4205 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta4/")); | 4175 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta4/")); |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4238 } | 4208 } |
| 4239 } | 4209 } |
| 4240 | 4210 |
| 4241 | 4211 |
| 4242 var h = { | 4212 var h = { |
| 4243 "content-type" : "application/json; charset=utf-8", | 4213 "content-type" : "application/json; charset=utf-8", |
| 4244 }; | 4214 }; |
| 4245 var resp = convert.JSON.encode(buildSslCertsInsertResponse()); | 4215 var resp = convert.JSON.encode(buildSslCertsInsertResponse()); |
| 4246 return new async.Future.value(stringResponse(200, h, resp)); | 4216 return new async.Future.value(stringResponse(200, h, resp)); |
| 4247 }), true); | 4217 }), true); |
| 4248 res.insert(arg_request, arg_project, arg_instance).then(unittest.expectAsy
nc(((api.SslCertsInsertResponse response) { | 4218 res.insert(arg_request, arg_project, arg_instance).then(unittest.expectAsy
nc1(((api.SslCertsInsertResponse response) { |
| 4249 checkSslCertsInsertResponse(response); | 4219 checkSslCertsInsertResponse(response); |
| 4250 }))); | 4220 }))); |
| 4251 }); | 4221 }); |
| 4252 | 4222 |
| 4253 unittest.test("method--list", () { | 4223 unittest.test("method--list", () { |
| 4254 | 4224 |
| 4255 var mock = new HttpServerMock(); | 4225 var mock = new HttpServerMock(); |
| 4256 api.SslCertsResourceApi res = new api.SqladminApi(mock).sslCerts; | 4226 api.SslCertsResourceApi res = new api.SqladminApi(mock).sslCerts; |
| 4257 var arg_project = "foo"; | 4227 var arg_project = "foo"; |
| 4258 var arg_instance = "foo"; | 4228 var arg_instance = "foo"; |
| 4259 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 4229 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 4260 var path = (req.url).path; | 4230 var path = (req.url).path; |
| 4261 var pathOffset = 0; | 4231 var pathOffset = 0; |
| 4262 var index; | 4232 var index; |
| 4263 var subPart; | 4233 var subPart; |
| 4264 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 4234 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 4265 pathOffset += 1; | 4235 pathOffset += 1; |
| 4266 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta4/")); | 4236 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta4/")); |
| 4267 pathOffset += 12; | 4237 pathOffset += 12; |
| 4268 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("projects/")); | 4238 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("projects/")); |
| 4269 pathOffset += 9; | 4239 pathOffset += 9; |
| (...skipping 29 matching lines...) Expand all Loading... |
| 4299 } | 4269 } |
| 4300 } | 4270 } |
| 4301 | 4271 |
| 4302 | 4272 |
| 4303 var h = { | 4273 var h = { |
| 4304 "content-type" : "application/json; charset=utf-8", | 4274 "content-type" : "application/json; charset=utf-8", |
| 4305 }; | 4275 }; |
| 4306 var resp = convert.JSON.encode(buildSslCertsListResponse()); | 4276 var resp = convert.JSON.encode(buildSslCertsListResponse()); |
| 4307 return new async.Future.value(stringResponse(200, h, resp)); | 4277 return new async.Future.value(stringResponse(200, h, resp)); |
| 4308 }), true); | 4278 }), true); |
| 4309 res.list(arg_project, arg_instance).then(unittest.expectAsync(((api.SslCer
tsListResponse response) { | 4279 res.list(arg_project, arg_instance).then(unittest.expectAsync1(((api.SslCe
rtsListResponse response) { |
| 4310 checkSslCertsListResponse(response); | 4280 checkSslCertsListResponse(response); |
| 4311 }))); | 4281 }))); |
| 4312 }); | 4282 }); |
| 4313 | 4283 |
| 4314 }); | 4284 }); |
| 4315 | 4285 |
| 4316 | 4286 |
| 4317 unittest.group("resource-TiersResourceApi", () { | 4287 unittest.group("resource-TiersResourceApi", () { |
| 4318 unittest.test("method--list", () { | 4288 unittest.test("method--list", () { |
| 4319 | 4289 |
| 4320 var mock = new HttpServerMock(); | 4290 var mock = new HttpServerMock(); |
| 4321 api.TiersResourceApi res = new api.SqladminApi(mock).tiers; | 4291 api.TiersResourceApi res = new api.SqladminApi(mock).tiers; |
| 4322 var arg_project = "foo"; | 4292 var arg_project = "foo"; |
| 4323 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 4293 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 4324 var path = (req.url).path; | 4294 var path = (req.url).path; |
| 4325 var pathOffset = 0; | 4295 var pathOffset = 0; |
| 4326 var index; | 4296 var index; |
| 4327 var subPart; | 4297 var subPart; |
| 4328 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 4298 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 4329 pathOffset += 1; | 4299 pathOffset += 1; |
| 4330 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta4/")); | 4300 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta4/")); |
| 4331 pathOffset += 12; | 4301 pathOffset += 12; |
| 4332 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("projects/")); | 4302 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("projects/")); |
| 4333 pathOffset += 9; | 4303 pathOffset += 9; |
| (...skipping 22 matching lines...) Expand all Loading... |
| 4356 } | 4326 } |
| 4357 } | 4327 } |
| 4358 | 4328 |
| 4359 | 4329 |
| 4360 var h = { | 4330 var h = { |
| 4361 "content-type" : "application/json; charset=utf-8", | 4331 "content-type" : "application/json; charset=utf-8", |
| 4362 }; | 4332 }; |
| 4363 var resp = convert.JSON.encode(buildTiersListResponse()); | 4333 var resp = convert.JSON.encode(buildTiersListResponse()); |
| 4364 return new async.Future.value(stringResponse(200, h, resp)); | 4334 return new async.Future.value(stringResponse(200, h, resp)); |
| 4365 }), true); | 4335 }), true); |
| 4366 res.list(arg_project).then(unittest.expectAsync(((api.TiersListResponse re
sponse) { | 4336 res.list(arg_project).then(unittest.expectAsync1(((api.TiersListResponse r
esponse) { |
| 4367 checkTiersListResponse(response); | 4337 checkTiersListResponse(response); |
| 4368 }))); | 4338 }))); |
| 4369 }); | 4339 }); |
| 4370 | 4340 |
| 4371 }); | 4341 }); |
| 4372 | 4342 |
| 4373 | 4343 |
| 4374 unittest.group("resource-UsersResourceApi", () { | 4344 unittest.group("resource-UsersResourceApi", () { |
| 4375 unittest.test("method--delete", () { | 4345 unittest.test("method--delete", () { |
| 4376 | 4346 |
| 4377 var mock = new HttpServerMock(); | 4347 var mock = new HttpServerMock(); |
| 4378 api.UsersResourceApi res = new api.SqladminApi(mock).users; | 4348 api.UsersResourceApi res = new api.SqladminApi(mock).users; |
| 4379 var arg_project = "foo"; | 4349 var arg_project = "foo"; |
| 4380 var arg_instance = "foo"; | 4350 var arg_instance = "foo"; |
| 4381 var arg_host = "foo"; | 4351 var arg_host = "foo"; |
| 4382 var arg_name = "foo"; | 4352 var arg_name = "foo"; |
| 4383 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 4353 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 4384 var path = (req.url).path; | 4354 var path = (req.url).path; |
| 4385 var pathOffset = 0; | 4355 var pathOffset = 0; |
| 4386 var index; | 4356 var index; |
| 4387 var subPart; | 4357 var subPart; |
| 4388 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 4358 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 4389 pathOffset += 1; | 4359 pathOffset += 1; |
| 4390 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta4/")); | 4360 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta4/")); |
| 4391 pathOffset += 12; | 4361 pathOffset += 12; |
| 4392 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("projects/")); | 4362 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("projects/")); |
| 4393 pathOffset += 9; | 4363 pathOffset += 9; |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4425 unittest.expect(queryMap["host"].first, unittest.equals(arg_host)); | 4395 unittest.expect(queryMap["host"].first, unittest.equals(arg_host)); |
| 4426 unittest.expect(queryMap["name"].first, unittest.equals(arg_name)); | 4396 unittest.expect(queryMap["name"].first, unittest.equals(arg_name)); |
| 4427 | 4397 |
| 4428 | 4398 |
| 4429 var h = { | 4399 var h = { |
| 4430 "content-type" : "application/json; charset=utf-8", | 4400 "content-type" : "application/json; charset=utf-8", |
| 4431 }; | 4401 }; |
| 4432 var resp = convert.JSON.encode(buildOperation()); | 4402 var resp = convert.JSON.encode(buildOperation()); |
| 4433 return new async.Future.value(stringResponse(200, h, resp)); | 4403 return new async.Future.value(stringResponse(200, h, resp)); |
| 4434 }), true); | 4404 }), true); |
| 4435 res.delete(arg_project, arg_instance, arg_host, arg_name).then(unittest.ex
pectAsync(((api.Operation response) { | 4405 res.delete(arg_project, arg_instance, arg_host, arg_name).then(unittest.ex
pectAsync1(((api.Operation response) { |
| 4436 checkOperation(response); | 4406 checkOperation(response); |
| 4437 }))); | 4407 }))); |
| 4438 }); | 4408 }); |
| 4439 | 4409 |
| 4440 unittest.test("method--insert", () { | 4410 unittest.test("method--insert", () { |
| 4441 | 4411 |
| 4442 var mock = new HttpServerMock(); | 4412 var mock = new HttpServerMock(); |
| 4443 api.UsersResourceApi res = new api.SqladminApi(mock).users; | 4413 api.UsersResourceApi res = new api.SqladminApi(mock).users; |
| 4444 var arg_request = buildUser(); | 4414 var arg_request = buildUser(); |
| 4445 var arg_project = "foo"; | 4415 var arg_project = "foo"; |
| 4446 var arg_instance = "foo"; | 4416 var arg_instance = "foo"; |
| 4447 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 4417 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 4448 var obj = new api.User.fromJson(json); | 4418 var obj = new api.User.fromJson(json); |
| 4449 checkUser(obj); | 4419 checkUser(obj); |
| 4450 | 4420 |
| 4451 var path = (req.url).path; | 4421 var path = (req.url).path; |
| 4452 var pathOffset = 0; | 4422 var pathOffset = 0; |
| 4453 var index; | 4423 var index; |
| 4454 var subPart; | 4424 var subPart; |
| 4455 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 4425 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 4456 pathOffset += 1; | 4426 pathOffset += 1; |
| 4457 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta4/")); | 4427 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta4/")); |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4490 } | 4460 } |
| 4491 } | 4461 } |
| 4492 | 4462 |
| 4493 | 4463 |
| 4494 var h = { | 4464 var h = { |
| 4495 "content-type" : "application/json; charset=utf-8", | 4465 "content-type" : "application/json; charset=utf-8", |
| 4496 }; | 4466 }; |
| 4497 var resp = convert.JSON.encode(buildOperation()); | 4467 var resp = convert.JSON.encode(buildOperation()); |
| 4498 return new async.Future.value(stringResponse(200, h, resp)); | 4468 return new async.Future.value(stringResponse(200, h, resp)); |
| 4499 }), true); | 4469 }), true); |
| 4500 res.insert(arg_request, arg_project, arg_instance).then(unittest.expectAsy
nc(((api.Operation response) { | 4470 res.insert(arg_request, arg_project, arg_instance).then(unittest.expectAsy
nc1(((api.Operation response) { |
| 4501 checkOperation(response); | 4471 checkOperation(response); |
| 4502 }))); | 4472 }))); |
| 4503 }); | 4473 }); |
| 4504 | 4474 |
| 4505 unittest.test("method--list", () { | 4475 unittest.test("method--list", () { |
| 4506 | 4476 |
| 4507 var mock = new HttpServerMock(); | 4477 var mock = new HttpServerMock(); |
| 4508 api.UsersResourceApi res = new api.SqladminApi(mock).users; | 4478 api.UsersResourceApi res = new api.SqladminApi(mock).users; |
| 4509 var arg_project = "foo"; | 4479 var arg_project = "foo"; |
| 4510 var arg_instance = "foo"; | 4480 var arg_instance = "foo"; |
| 4511 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 4481 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 4512 var path = (req.url).path; | 4482 var path = (req.url).path; |
| 4513 var pathOffset = 0; | 4483 var pathOffset = 0; |
| 4514 var index; | 4484 var index; |
| 4515 var subPart; | 4485 var subPart; |
| 4516 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 4486 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 4517 pathOffset += 1; | 4487 pathOffset += 1; |
| 4518 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta4/")); | 4488 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta4/")); |
| 4519 pathOffset += 12; | 4489 pathOffset += 12; |
| 4520 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("projects/")); | 4490 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("projects/")); |
| 4521 pathOffset += 9; | 4491 pathOffset += 9; |
| (...skipping 29 matching lines...) Expand all Loading... |
| 4551 } | 4521 } |
| 4552 } | 4522 } |
| 4553 | 4523 |
| 4554 | 4524 |
| 4555 var h = { | 4525 var h = { |
| 4556 "content-type" : "application/json; charset=utf-8", | 4526 "content-type" : "application/json; charset=utf-8", |
| 4557 }; | 4527 }; |
| 4558 var resp = convert.JSON.encode(buildUsersListResponse()); | 4528 var resp = convert.JSON.encode(buildUsersListResponse()); |
| 4559 return new async.Future.value(stringResponse(200, h, resp)); | 4529 return new async.Future.value(stringResponse(200, h, resp)); |
| 4560 }), true); | 4530 }), true); |
| 4561 res.list(arg_project, arg_instance).then(unittest.expectAsync(((api.UsersL
istResponse response) { | 4531 res.list(arg_project, arg_instance).then(unittest.expectAsync1(((api.Users
ListResponse response) { |
| 4562 checkUsersListResponse(response); | 4532 checkUsersListResponse(response); |
| 4563 }))); | 4533 }))); |
| 4564 }); | 4534 }); |
| 4565 | 4535 |
| 4566 unittest.test("method--update", () { | 4536 unittest.test("method--update", () { |
| 4567 | 4537 |
| 4568 var mock = new HttpServerMock(); | 4538 var mock = new HttpServerMock(); |
| 4569 api.UsersResourceApi res = new api.SqladminApi(mock).users; | 4539 api.UsersResourceApi res = new api.SqladminApi(mock).users; |
| 4570 var arg_request = buildUser(); | 4540 var arg_request = buildUser(); |
| 4571 var arg_project = "foo"; | 4541 var arg_project = "foo"; |
| 4572 var arg_instance = "foo"; | 4542 var arg_instance = "foo"; |
| 4573 var arg_host = "foo"; | 4543 var arg_host = "foo"; |
| 4574 var arg_name = "foo"; | 4544 var arg_name = "foo"; |
| 4575 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 4545 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 4576 var obj = new api.User.fromJson(json); | 4546 var obj = new api.User.fromJson(json); |
| 4577 checkUser(obj); | 4547 checkUser(obj); |
| 4578 | 4548 |
| 4579 var path = (req.url).path; | 4549 var path = (req.url).path; |
| 4580 var pathOffset = 0; | 4550 var pathOffset = 0; |
| 4581 var index; | 4551 var index; |
| 4582 var subPart; | 4552 var subPart; |
| 4583 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 4553 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 4584 pathOffset += 1; | 4554 pathOffset += 1; |
| 4585 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta4/")); | 4555 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta4/")); |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4620 unittest.expect(queryMap["host"].first, unittest.equals(arg_host)); | 4590 unittest.expect(queryMap["host"].first, unittest.equals(arg_host)); |
| 4621 unittest.expect(queryMap["name"].first, unittest.equals(arg_name)); | 4591 unittest.expect(queryMap["name"].first, unittest.equals(arg_name)); |
| 4622 | 4592 |
| 4623 | 4593 |
| 4624 var h = { | 4594 var h = { |
| 4625 "content-type" : "application/json; charset=utf-8", | 4595 "content-type" : "application/json; charset=utf-8", |
| 4626 }; | 4596 }; |
| 4627 var resp = convert.JSON.encode(buildOperation()); | 4597 var resp = convert.JSON.encode(buildOperation()); |
| 4628 return new async.Future.value(stringResponse(200, h, resp)); | 4598 return new async.Future.value(stringResponse(200, h, resp)); |
| 4629 }), true); | 4599 }), true); |
| 4630 res.update(arg_request, arg_project, arg_instance, arg_host, arg_name).the
n(unittest.expectAsync(((api.Operation response) { | 4600 res.update(arg_request, arg_project, arg_instance, arg_host, arg_name).the
n(unittest.expectAsync1(((api.Operation response) { |
| 4631 checkOperation(response); | 4601 checkOperation(response); |
| 4632 }))); | 4602 }))); |
| 4633 }); | 4603 }); |
| 4634 | 4604 |
| 4635 }); | 4605 }); |
| 4636 | 4606 |
| 4637 | 4607 |
| 4638 } | 4608 } |
| 4639 | 4609 |
| OLD | NEW |