| OLD | NEW |
| 1 library googleapis_beta.sqladmin.v1beta3.test; | 1 library googleapis_beta.sqladmin.v1beta3.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/v1beta3.dart' as api; | 12 import 'package:googleapis_beta/sqladmin/v1beta3.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 buildCounterBackupConfiguration = 0; | 54 core.int buildCounterBackupConfiguration = 0; |
| 55 buildBackupConfiguration() { | 55 buildBackupConfiguration() { |
| 56 var o = new api.BackupConfiguration(); | 56 var o = new api.BackupConfiguration(); |
| 57 buildCounterBackupConfiguration++; | 57 buildCounterBackupConfiguration++; |
| 58 if (buildCounterBackupConfiguration < 3) { | 58 if (buildCounterBackupConfiguration < 3) { |
| 59 o.binaryLogEnabled = true; | 59 o.binaryLogEnabled = true; |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 unittest.expect(o.enqueuedTime, unittest.equals(core.DateTime.parse("2002-02
-27T14:01:02"))); | 106 unittest.expect(o.enqueuedTime, unittest.equals(core.DateTime.parse("2002-02
-27T14:01:02"))); |
| 107 checkOperationError(o.error); | 107 checkOperationError(o.error); |
| 108 unittest.expect(o.instance, unittest.equals('foo')); | 108 unittest.expect(o.instance, unittest.equals('foo')); |
| 109 unittest.expect(o.kind, unittest.equals('foo')); | 109 unittest.expect(o.kind, unittest.equals('foo')); |
| 110 unittest.expect(o.startTime, unittest.equals(core.DateTime.parse("2002-02-27
T14:01:02"))); | 110 unittest.expect(o.startTime, unittest.equals(core.DateTime.parse("2002-02-27
T14:01:02"))); |
| 111 unittest.expect(o.status, unittest.equals('foo')); | 111 unittest.expect(o.status, unittest.equals('foo')); |
| 112 } | 112 } |
| 113 buildCounterBackupRun--; | 113 buildCounterBackupRun--; |
| 114 } | 114 } |
| 115 | 115 |
| 116 buildUnnamed3548() { | 116 buildUnnamed3022() { |
| 117 var o = new core.List<api.BackupRun>(); | 117 var o = new core.List<api.BackupRun>(); |
| 118 o.add(buildBackupRun()); | 118 o.add(buildBackupRun()); |
| 119 o.add(buildBackupRun()); | 119 o.add(buildBackupRun()); |
| 120 return o; | 120 return o; |
| 121 } | 121 } |
| 122 | 122 |
| 123 checkUnnamed3548(core.List<api.BackupRun> o) { | 123 checkUnnamed3022(core.List<api.BackupRun> o) { |
| 124 unittest.expect(o, unittest.hasLength(2)); | 124 unittest.expect(o, unittest.hasLength(2)); |
| 125 checkBackupRun(o[0]); | 125 checkBackupRun(o[0]); |
| 126 checkBackupRun(o[1]); | 126 checkBackupRun(o[1]); |
| 127 } | 127 } |
| 128 | 128 |
| 129 core.int buildCounterBackupRunsListResponse = 0; | 129 core.int buildCounterBackupRunsListResponse = 0; |
| 130 buildBackupRunsListResponse() { | 130 buildBackupRunsListResponse() { |
| 131 var o = new api.BackupRunsListResponse(); | 131 var o = new api.BackupRunsListResponse(); |
| 132 buildCounterBackupRunsListResponse++; | 132 buildCounterBackupRunsListResponse++; |
| 133 if (buildCounterBackupRunsListResponse < 3) { | 133 if (buildCounterBackupRunsListResponse < 3) { |
| 134 o.items = buildUnnamed3548(); | 134 o.items = buildUnnamed3022(); |
| 135 o.kind = "foo"; | 135 o.kind = "foo"; |
| 136 o.nextPageToken = "foo"; | 136 o.nextPageToken = "foo"; |
| 137 } | 137 } |
| 138 buildCounterBackupRunsListResponse--; | 138 buildCounterBackupRunsListResponse--; |
| 139 return o; | 139 return o; |
| 140 } | 140 } |
| 141 | 141 |
| 142 checkBackupRunsListResponse(api.BackupRunsListResponse o) { | 142 checkBackupRunsListResponse(api.BackupRunsListResponse o) { |
| 143 buildCounterBackupRunsListResponse++; | 143 buildCounterBackupRunsListResponse++; |
| 144 if (buildCounterBackupRunsListResponse < 3) { | 144 if (buildCounterBackupRunsListResponse < 3) { |
| 145 checkUnnamed3548(o.items); | 145 checkUnnamed3022(o.items); |
| 146 unittest.expect(o.kind, unittest.equals('foo')); | 146 unittest.expect(o.kind, unittest.equals('foo')); |
| 147 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 147 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 148 } | 148 } |
| 149 buildCounterBackupRunsListResponse--; | 149 buildCounterBackupRunsListResponse--; |
| 150 } | 150 } |
| 151 | 151 |
| 152 core.int buildCounterBinLogCoordinates = 0; | 152 core.int buildCounterBinLogCoordinates = 0; |
| 153 buildBinLogCoordinates() { | 153 buildBinLogCoordinates() { |
| 154 var o = new api.BinLogCoordinates(); | 154 var o = new api.BinLogCoordinates(); |
| 155 buildCounterBinLogCoordinates++; | 155 buildCounterBinLogCoordinates++; |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 211 | 211 |
| 212 checkDatabaseFlags(api.DatabaseFlags o) { | 212 checkDatabaseFlags(api.DatabaseFlags o) { |
| 213 buildCounterDatabaseFlags++; | 213 buildCounterDatabaseFlags++; |
| 214 if (buildCounterDatabaseFlags < 3) { | 214 if (buildCounterDatabaseFlags < 3) { |
| 215 unittest.expect(o.name, unittest.equals('foo')); | 215 unittest.expect(o.name, unittest.equals('foo')); |
| 216 unittest.expect(o.value, unittest.equals('foo')); | 216 unittest.expect(o.value, unittest.equals('foo')); |
| 217 } | 217 } |
| 218 buildCounterDatabaseFlags--; | 218 buildCounterDatabaseFlags--; |
| 219 } | 219 } |
| 220 | 220 |
| 221 buildUnnamed3549() { | 221 buildUnnamed3023() { |
| 222 var o = new core.List<api.IpMapping>(); | 222 var o = new core.List<api.IpMapping>(); |
| 223 o.add(buildIpMapping()); | 223 o.add(buildIpMapping()); |
| 224 o.add(buildIpMapping()); | 224 o.add(buildIpMapping()); |
| 225 return o; | 225 return o; |
| 226 } | 226 } |
| 227 | 227 |
| 228 checkUnnamed3549(core.List<api.IpMapping> o) { | 228 checkUnnamed3023(core.List<api.IpMapping> o) { |
| 229 unittest.expect(o, unittest.hasLength(2)); | 229 unittest.expect(o, unittest.hasLength(2)); |
| 230 checkIpMapping(o[0]); | 230 checkIpMapping(o[0]); |
| 231 checkIpMapping(o[1]); | 231 checkIpMapping(o[1]); |
| 232 } | 232 } |
| 233 | 233 |
| 234 buildUnnamed3550() { | 234 buildUnnamed3024() { |
| 235 var o = new core.List<core.String>(); | 235 var o = new core.List<core.String>(); |
| 236 o.add("foo"); | 236 o.add("foo"); |
| 237 o.add("foo"); | 237 o.add("foo"); |
| 238 return o; | 238 return o; |
| 239 } | 239 } |
| 240 | 240 |
| 241 checkUnnamed3550(core.List<core.String> o) { | 241 checkUnnamed3024(core.List<core.String> o) { |
| 242 unittest.expect(o, unittest.hasLength(2)); | 242 unittest.expect(o, unittest.hasLength(2)); |
| 243 unittest.expect(o[0], unittest.equals('foo')); | 243 unittest.expect(o[0], unittest.equals('foo')); |
| 244 unittest.expect(o[1], unittest.equals('foo')); | 244 unittest.expect(o[1], unittest.equals('foo')); |
| 245 } | 245 } |
| 246 | 246 |
| 247 core.int buildCounterDatabaseInstance = 0; | 247 core.int buildCounterDatabaseInstance = 0; |
| 248 buildDatabaseInstance() { | 248 buildDatabaseInstance() { |
| 249 var o = new api.DatabaseInstance(); | 249 var o = new api.DatabaseInstance(); |
| 250 buildCounterDatabaseInstance++; | 250 buildCounterDatabaseInstance++; |
| 251 if (buildCounterDatabaseInstance < 3) { | 251 if (buildCounterDatabaseInstance < 3) { |
| 252 o.connectionName = "foo"; | 252 o.connectionName = "foo"; |
| 253 o.currentDiskSize = "foo"; | 253 o.currentDiskSize = "foo"; |
| 254 o.databaseVersion = "foo"; | 254 o.databaseVersion = "foo"; |
| 255 o.etag = "foo"; | 255 o.etag = "foo"; |
| 256 o.instance = "foo"; | 256 o.instance = "foo"; |
| 257 o.instanceType = "foo"; | 257 o.instanceType = "foo"; |
| 258 o.ipAddresses = buildUnnamed3549(); | 258 o.ipAddresses = buildUnnamed3023(); |
| 259 o.ipv6Address = "foo"; | 259 o.ipv6Address = "foo"; |
| 260 o.kind = "foo"; | 260 o.kind = "foo"; |
| 261 o.masterInstanceName = "foo"; | 261 o.masterInstanceName = "foo"; |
| 262 o.maxDiskSize = "foo"; | 262 o.maxDiskSize = "foo"; |
| 263 o.project = "foo"; | 263 o.project = "foo"; |
| 264 o.region = "foo"; | 264 o.region = "foo"; |
| 265 o.replicaNames = buildUnnamed3550(); | 265 o.replicaNames = buildUnnamed3024(); |
| 266 o.serverCaCert = buildSslCert(); | 266 o.serverCaCert = buildSslCert(); |
| 267 o.serviceAccountEmailAddress = "foo"; | 267 o.serviceAccountEmailAddress = "foo"; |
| 268 o.settings = buildSettings(); | 268 o.settings = buildSettings(); |
| 269 o.state = "foo"; | 269 o.state = "foo"; |
| 270 } | 270 } |
| 271 buildCounterDatabaseInstance--; | 271 buildCounterDatabaseInstance--; |
| 272 return o; | 272 return o; |
| 273 } | 273 } |
| 274 | 274 |
| 275 checkDatabaseInstance(api.DatabaseInstance o) { | 275 checkDatabaseInstance(api.DatabaseInstance o) { |
| 276 buildCounterDatabaseInstance++; | 276 buildCounterDatabaseInstance++; |
| 277 if (buildCounterDatabaseInstance < 3) { | 277 if (buildCounterDatabaseInstance < 3) { |
| 278 unittest.expect(o.connectionName, unittest.equals('foo')); | 278 unittest.expect(o.connectionName, unittest.equals('foo')); |
| 279 unittest.expect(o.currentDiskSize, unittest.equals('foo')); | 279 unittest.expect(o.currentDiskSize, unittest.equals('foo')); |
| 280 unittest.expect(o.databaseVersion, unittest.equals('foo')); | 280 unittest.expect(o.databaseVersion, unittest.equals('foo')); |
| 281 unittest.expect(o.etag, unittest.equals('foo')); | 281 unittest.expect(o.etag, unittest.equals('foo')); |
| 282 unittest.expect(o.instance, unittest.equals('foo')); | 282 unittest.expect(o.instance, unittest.equals('foo')); |
| 283 unittest.expect(o.instanceType, unittest.equals('foo')); | 283 unittest.expect(o.instanceType, unittest.equals('foo')); |
| 284 checkUnnamed3549(o.ipAddresses); | 284 checkUnnamed3023(o.ipAddresses); |
| 285 unittest.expect(o.ipv6Address, unittest.equals('foo')); | 285 unittest.expect(o.ipv6Address, unittest.equals('foo')); |
| 286 unittest.expect(o.kind, unittest.equals('foo')); | 286 unittest.expect(o.kind, unittest.equals('foo')); |
| 287 unittest.expect(o.masterInstanceName, unittest.equals('foo')); | 287 unittest.expect(o.masterInstanceName, unittest.equals('foo')); |
| 288 unittest.expect(o.maxDiskSize, unittest.equals('foo')); | 288 unittest.expect(o.maxDiskSize, unittest.equals('foo')); |
| 289 unittest.expect(o.project, unittest.equals('foo')); | 289 unittest.expect(o.project, unittest.equals('foo')); |
| 290 unittest.expect(o.region, unittest.equals('foo')); | 290 unittest.expect(o.region, unittest.equals('foo')); |
| 291 checkUnnamed3550(o.replicaNames); | 291 checkUnnamed3024(o.replicaNames); |
| 292 checkSslCert(o.serverCaCert); | 292 checkSslCert(o.serverCaCert); |
| 293 unittest.expect(o.serviceAccountEmailAddress, unittest.equals('foo')); | 293 unittest.expect(o.serviceAccountEmailAddress, unittest.equals('foo')); |
| 294 checkSettings(o.settings); | 294 checkSettings(o.settings); |
| 295 unittest.expect(o.state, unittest.equals('foo')); | 295 unittest.expect(o.state, unittest.equals('foo')); |
| 296 } | 296 } |
| 297 buildCounterDatabaseInstance--; | 297 buildCounterDatabaseInstance--; |
| 298 } | 298 } |
| 299 | 299 |
| 300 buildUnnamed3551() { | 300 buildUnnamed3025() { |
| 301 var o = new core.List<core.String>(); | 301 var o = new core.List<core.String>(); |
| 302 o.add("foo"); | 302 o.add("foo"); |
| 303 o.add("foo"); | 303 o.add("foo"); |
| 304 return o; | 304 return o; |
| 305 } | 305 } |
| 306 | 306 |
| 307 checkUnnamed3551(core.List<core.String> o) { | 307 checkUnnamed3025(core.List<core.String> o) { |
| 308 unittest.expect(o, unittest.hasLength(2)); | 308 unittest.expect(o, unittest.hasLength(2)); |
| 309 unittest.expect(o[0], unittest.equals('foo')); | 309 unittest.expect(o[0], unittest.equals('foo')); |
| 310 unittest.expect(o[1], unittest.equals('foo')); | 310 unittest.expect(o[1], unittest.equals('foo')); |
| 311 } | 311 } |
| 312 | 312 |
| 313 buildUnnamed3552() { | 313 buildUnnamed3026() { |
| 314 var o = new core.List<core.String>(); | 314 var o = new core.List<core.String>(); |
| 315 o.add("foo"); | 315 o.add("foo"); |
| 316 o.add("foo"); | 316 o.add("foo"); |
| 317 return o; | 317 return o; |
| 318 } | 318 } |
| 319 | 319 |
| 320 checkUnnamed3552(core.List<core.String> o) { | 320 checkUnnamed3026(core.List<core.String> o) { |
| 321 unittest.expect(o, unittest.hasLength(2)); | 321 unittest.expect(o, unittest.hasLength(2)); |
| 322 unittest.expect(o[0], unittest.equals('foo')); | 322 unittest.expect(o[0], unittest.equals('foo')); |
| 323 unittest.expect(o[1], unittest.equals('foo')); | 323 unittest.expect(o[1], unittest.equals('foo')); |
| 324 } | 324 } |
| 325 | 325 |
| 326 core.int buildCounterExportContext = 0; | 326 core.int buildCounterExportContext = 0; |
| 327 buildExportContext() { | 327 buildExportContext() { |
| 328 var o = new api.ExportContext(); | 328 var o = new api.ExportContext(); |
| 329 buildCounterExportContext++; | 329 buildCounterExportContext++; |
| 330 if (buildCounterExportContext < 3) { | 330 if (buildCounterExportContext < 3) { |
| 331 o.database = buildUnnamed3551(); | 331 o.database = buildUnnamed3025(); |
| 332 o.kind = "foo"; | 332 o.kind = "foo"; |
| 333 o.table = buildUnnamed3552(); | 333 o.table = buildUnnamed3026(); |
| 334 o.uri = "foo"; | 334 o.uri = "foo"; |
| 335 } | 335 } |
| 336 buildCounterExportContext--; | 336 buildCounterExportContext--; |
| 337 return o; | 337 return o; |
| 338 } | 338 } |
| 339 | 339 |
| 340 checkExportContext(api.ExportContext o) { | 340 checkExportContext(api.ExportContext o) { |
| 341 buildCounterExportContext++; | 341 buildCounterExportContext++; |
| 342 if (buildCounterExportContext < 3) { | 342 if (buildCounterExportContext < 3) { |
| 343 checkUnnamed3551(o.database); | 343 checkUnnamed3025(o.database); |
| 344 unittest.expect(o.kind, unittest.equals('foo')); | 344 unittest.expect(o.kind, unittest.equals('foo')); |
| 345 checkUnnamed3552(o.table); | 345 checkUnnamed3026(o.table); |
| 346 unittest.expect(o.uri, unittest.equals('foo')); | 346 unittest.expect(o.uri, unittest.equals('foo')); |
| 347 } | 347 } |
| 348 buildCounterExportContext--; | 348 buildCounterExportContext--; |
| 349 } | 349 } |
| 350 | 350 |
| 351 buildUnnamed3553() { | 351 buildUnnamed3027() { |
| 352 var o = new core.List<core.String>(); | 352 var o = new core.List<core.String>(); |
| 353 o.add("foo"); | 353 o.add("foo"); |
| 354 o.add("foo"); | 354 o.add("foo"); |
| 355 return o; | 355 return o; |
| 356 } | 356 } |
| 357 | 357 |
| 358 checkUnnamed3553(core.List<core.String> o) { | 358 checkUnnamed3027(core.List<core.String> o) { |
| 359 unittest.expect(o, unittest.hasLength(2)); | 359 unittest.expect(o, unittest.hasLength(2)); |
| 360 unittest.expect(o[0], unittest.equals('foo')); | 360 unittest.expect(o[0], unittest.equals('foo')); |
| 361 unittest.expect(o[1], unittest.equals('foo')); | 361 unittest.expect(o[1], unittest.equals('foo')); |
| 362 } | 362 } |
| 363 | 363 |
| 364 buildUnnamed3554() { | 364 buildUnnamed3028() { |
| 365 var o = new core.List<core.String>(); | 365 var o = new core.List<core.String>(); |
| 366 o.add("foo"); | 366 o.add("foo"); |
| 367 o.add("foo"); | 367 o.add("foo"); |
| 368 return o; | 368 return o; |
| 369 } | 369 } |
| 370 | 370 |
| 371 checkUnnamed3554(core.List<core.String> o) { | 371 checkUnnamed3028(core.List<core.String> o) { |
| 372 unittest.expect(o, unittest.hasLength(2)); | 372 unittest.expect(o, unittest.hasLength(2)); |
| 373 unittest.expect(o[0], unittest.equals('foo')); | 373 unittest.expect(o[0], unittest.equals('foo')); |
| 374 unittest.expect(o[1], unittest.equals('foo')); | 374 unittest.expect(o[1], unittest.equals('foo')); |
| 375 } | 375 } |
| 376 | 376 |
| 377 core.int buildCounterFlag = 0; | 377 core.int buildCounterFlag = 0; |
| 378 buildFlag() { | 378 buildFlag() { |
| 379 var o = new api.Flag(); | 379 var o = new api.Flag(); |
| 380 buildCounterFlag++; | 380 buildCounterFlag++; |
| 381 if (buildCounterFlag < 3) { | 381 if (buildCounterFlag < 3) { |
| 382 o.allowedStringValues = buildUnnamed3553(); | 382 o.allowedStringValues = buildUnnamed3027(); |
| 383 o.appliesTo = buildUnnamed3554(); | 383 o.appliesTo = buildUnnamed3028(); |
| 384 o.kind = "foo"; | 384 o.kind = "foo"; |
| 385 o.maxValue = "foo"; | 385 o.maxValue = "foo"; |
| 386 o.minValue = "foo"; | 386 o.minValue = "foo"; |
| 387 o.name = "foo"; | 387 o.name = "foo"; |
| 388 o.type = "foo"; | 388 o.type = "foo"; |
| 389 } | 389 } |
| 390 buildCounterFlag--; | 390 buildCounterFlag--; |
| 391 return o; | 391 return o; |
| 392 } | 392 } |
| 393 | 393 |
| 394 checkFlag(api.Flag o) { | 394 checkFlag(api.Flag o) { |
| 395 buildCounterFlag++; | 395 buildCounterFlag++; |
| 396 if (buildCounterFlag < 3) { | 396 if (buildCounterFlag < 3) { |
| 397 checkUnnamed3553(o.allowedStringValues); | 397 checkUnnamed3027(o.allowedStringValues); |
| 398 checkUnnamed3554(o.appliesTo); | 398 checkUnnamed3028(o.appliesTo); |
| 399 unittest.expect(o.kind, unittest.equals('foo')); | 399 unittest.expect(o.kind, unittest.equals('foo')); |
| 400 unittest.expect(o.maxValue, unittest.equals('foo')); | 400 unittest.expect(o.maxValue, unittest.equals('foo')); |
| 401 unittest.expect(o.minValue, unittest.equals('foo')); | 401 unittest.expect(o.minValue, unittest.equals('foo')); |
| 402 unittest.expect(o.name, unittest.equals('foo')); | 402 unittest.expect(o.name, unittest.equals('foo')); |
| 403 unittest.expect(o.type, unittest.equals('foo')); | 403 unittest.expect(o.type, unittest.equals('foo')); |
| 404 } | 404 } |
| 405 buildCounterFlag--; | 405 buildCounterFlag--; |
| 406 } | 406 } |
| 407 | 407 |
| 408 buildUnnamed3555() { | 408 buildUnnamed3029() { |
| 409 var o = new core.List<api.Flag>(); | 409 var o = new core.List<api.Flag>(); |
| 410 o.add(buildFlag()); | 410 o.add(buildFlag()); |
| 411 o.add(buildFlag()); | 411 o.add(buildFlag()); |
| 412 return o; | 412 return o; |
| 413 } | 413 } |
| 414 | 414 |
| 415 checkUnnamed3555(core.List<api.Flag> o) { | 415 checkUnnamed3029(core.List<api.Flag> o) { |
| 416 unittest.expect(o, unittest.hasLength(2)); | 416 unittest.expect(o, unittest.hasLength(2)); |
| 417 checkFlag(o[0]); | 417 checkFlag(o[0]); |
| 418 checkFlag(o[1]); | 418 checkFlag(o[1]); |
| 419 } | 419 } |
| 420 | 420 |
| 421 core.int buildCounterFlagsListResponse = 0; | 421 core.int buildCounterFlagsListResponse = 0; |
| 422 buildFlagsListResponse() { | 422 buildFlagsListResponse() { |
| 423 var o = new api.FlagsListResponse(); | 423 var o = new api.FlagsListResponse(); |
| 424 buildCounterFlagsListResponse++; | 424 buildCounterFlagsListResponse++; |
| 425 if (buildCounterFlagsListResponse < 3) { | 425 if (buildCounterFlagsListResponse < 3) { |
| 426 o.items = buildUnnamed3555(); | 426 o.items = buildUnnamed3029(); |
| 427 o.kind = "foo"; | 427 o.kind = "foo"; |
| 428 } | 428 } |
| 429 buildCounterFlagsListResponse--; | 429 buildCounterFlagsListResponse--; |
| 430 return o; | 430 return o; |
| 431 } | 431 } |
| 432 | 432 |
| 433 checkFlagsListResponse(api.FlagsListResponse o) { | 433 checkFlagsListResponse(api.FlagsListResponse o) { |
| 434 buildCounterFlagsListResponse++; | 434 buildCounterFlagsListResponse++; |
| 435 if (buildCounterFlagsListResponse < 3) { | 435 if (buildCounterFlagsListResponse < 3) { |
| 436 checkUnnamed3555(o.items); | 436 checkUnnamed3029(o.items); |
| 437 unittest.expect(o.kind, unittest.equals('foo')); | 437 unittest.expect(o.kind, unittest.equals('foo')); |
| 438 } | 438 } |
| 439 buildCounterFlagsListResponse--; | 439 buildCounterFlagsListResponse--; |
| 440 } | 440 } |
| 441 | 441 |
| 442 buildUnnamed3556() { | 442 buildUnnamed3030() { |
| 443 var o = new core.List<core.String>(); | 443 var o = new core.List<core.String>(); |
| 444 o.add("foo"); | 444 o.add("foo"); |
| 445 o.add("foo"); | 445 o.add("foo"); |
| 446 return o; | 446 return o; |
| 447 } | 447 } |
| 448 | 448 |
| 449 checkUnnamed3556(core.List<core.String> o) { | 449 checkUnnamed3030(core.List<core.String> o) { |
| 450 unittest.expect(o, unittest.hasLength(2)); | 450 unittest.expect(o, unittest.hasLength(2)); |
| 451 unittest.expect(o[0], unittest.equals('foo')); | 451 unittest.expect(o[0], unittest.equals('foo')); |
| 452 unittest.expect(o[1], unittest.equals('foo')); | 452 unittest.expect(o[1], unittest.equals('foo')); |
| 453 } | 453 } |
| 454 | 454 |
| 455 core.int buildCounterImportContext = 0; | 455 core.int buildCounterImportContext = 0; |
| 456 buildImportContext() { | 456 buildImportContext() { |
| 457 var o = new api.ImportContext(); | 457 var o = new api.ImportContext(); |
| 458 buildCounterImportContext++; | 458 buildCounterImportContext++; |
| 459 if (buildCounterImportContext < 3) { | 459 if (buildCounterImportContext < 3) { |
| 460 o.database = "foo"; | 460 o.database = "foo"; |
| 461 o.kind = "foo"; | 461 o.kind = "foo"; |
| 462 o.uri = buildUnnamed3556(); | 462 o.uri = buildUnnamed3030(); |
| 463 } | 463 } |
| 464 buildCounterImportContext--; | 464 buildCounterImportContext--; |
| 465 return o; | 465 return o; |
| 466 } | 466 } |
| 467 | 467 |
| 468 checkImportContext(api.ImportContext o) { | 468 checkImportContext(api.ImportContext o) { |
| 469 buildCounterImportContext++; | 469 buildCounterImportContext++; |
| 470 if (buildCounterImportContext < 3) { | 470 if (buildCounterImportContext < 3) { |
| 471 unittest.expect(o.database, unittest.equals('foo')); | 471 unittest.expect(o.database, unittest.equals('foo')); |
| 472 unittest.expect(o.kind, unittest.equals('foo')); | 472 unittest.expect(o.kind, unittest.equals('foo')); |
| 473 checkUnnamed3556(o.uri); | 473 checkUnnamed3030(o.uri); |
| 474 } | 474 } |
| 475 buildCounterImportContext--; | 475 buildCounterImportContext--; |
| 476 } | 476 } |
| 477 | 477 |
| 478 buildUnnamed3557() { | 478 buildUnnamed3031() { |
| 479 var o = new core.List<api.OperationError>(); | 479 var o = new core.List<api.OperationError>(); |
| 480 o.add(buildOperationError()); | 480 o.add(buildOperationError()); |
| 481 o.add(buildOperationError()); | 481 o.add(buildOperationError()); |
| 482 return o; | 482 return o; |
| 483 } | 483 } |
| 484 | 484 |
| 485 checkUnnamed3557(core.List<api.OperationError> o) { | 485 checkUnnamed3031(core.List<api.OperationError> o) { |
| 486 unittest.expect(o, unittest.hasLength(2)); | 486 unittest.expect(o, unittest.hasLength(2)); |
| 487 checkOperationError(o[0]); | 487 checkOperationError(o[0]); |
| 488 checkOperationError(o[1]); | 488 checkOperationError(o[1]); |
| 489 } | 489 } |
| 490 | 490 |
| 491 core.int buildCounterInstanceOperation = 0; | 491 core.int buildCounterInstanceOperation = 0; |
| 492 buildInstanceOperation() { | 492 buildInstanceOperation() { |
| 493 var o = new api.InstanceOperation(); | 493 var o = new api.InstanceOperation(); |
| 494 buildCounterInstanceOperation++; | 494 buildCounterInstanceOperation++; |
| 495 if (buildCounterInstanceOperation < 3) { | 495 if (buildCounterInstanceOperation < 3) { |
| 496 o.endTime = core.DateTime.parse("2002-02-27T14:01:02"); | 496 o.endTime = core.DateTime.parse("2002-02-27T14:01:02"); |
| 497 o.enqueuedTime = core.DateTime.parse("2002-02-27T14:01:02"); | 497 o.enqueuedTime = core.DateTime.parse("2002-02-27T14:01:02"); |
| 498 o.error = buildUnnamed3557(); | 498 o.error = buildUnnamed3031(); |
| 499 o.exportContext = buildExportContext(); | 499 o.exportContext = buildExportContext(); |
| 500 o.importContext = buildImportContext(); | 500 o.importContext = buildImportContext(); |
| 501 o.instance = "foo"; | 501 o.instance = "foo"; |
| 502 o.kind = "foo"; | 502 o.kind = "foo"; |
| 503 o.operation = "foo"; | 503 o.operation = "foo"; |
| 504 o.operationType = "foo"; | 504 o.operationType = "foo"; |
| 505 o.startTime = core.DateTime.parse("2002-02-27T14:01:02"); | 505 o.startTime = core.DateTime.parse("2002-02-27T14:01:02"); |
| 506 o.state = "foo"; | 506 o.state = "foo"; |
| 507 o.userEmailAddress = "foo"; | 507 o.userEmailAddress = "foo"; |
| 508 } | 508 } |
| 509 buildCounterInstanceOperation--; | 509 buildCounterInstanceOperation--; |
| 510 return o; | 510 return o; |
| 511 } | 511 } |
| 512 | 512 |
| 513 checkInstanceOperation(api.InstanceOperation o) { | 513 checkInstanceOperation(api.InstanceOperation o) { |
| 514 buildCounterInstanceOperation++; | 514 buildCounterInstanceOperation++; |
| 515 if (buildCounterInstanceOperation < 3) { | 515 if (buildCounterInstanceOperation < 3) { |
| 516 unittest.expect(o.endTime, unittest.equals(core.DateTime.parse("2002-02-27T1
4:01:02"))); | 516 unittest.expect(o.endTime, unittest.equals(core.DateTime.parse("2002-02-27T1
4:01:02"))); |
| 517 unittest.expect(o.enqueuedTime, unittest.equals(core.DateTime.parse("2002-02
-27T14:01:02"))); | 517 unittest.expect(o.enqueuedTime, unittest.equals(core.DateTime.parse("2002-02
-27T14:01:02"))); |
| 518 checkUnnamed3557(o.error); | 518 checkUnnamed3031(o.error); |
| 519 checkExportContext(o.exportContext); | 519 checkExportContext(o.exportContext); |
| 520 checkImportContext(o.importContext); | 520 checkImportContext(o.importContext); |
| 521 unittest.expect(o.instance, unittest.equals('foo')); | 521 unittest.expect(o.instance, unittest.equals('foo')); |
| 522 unittest.expect(o.kind, unittest.equals('foo')); | 522 unittest.expect(o.kind, unittest.equals('foo')); |
| 523 unittest.expect(o.operation, unittest.equals('foo')); | 523 unittest.expect(o.operation, unittest.equals('foo')); |
| 524 unittest.expect(o.operationType, unittest.equals('foo')); | 524 unittest.expect(o.operationType, unittest.equals('foo')); |
| 525 unittest.expect(o.startTime, unittest.equals(core.DateTime.parse("2002-02-27
T14:01:02"))); | 525 unittest.expect(o.startTime, unittest.equals(core.DateTime.parse("2002-02-27
T14:01:02"))); |
| 526 unittest.expect(o.state, unittest.equals('foo')); | 526 unittest.expect(o.state, unittest.equals('foo')); |
| 527 unittest.expect(o.userEmailAddress, unittest.equals('foo')); | 527 unittest.expect(o.userEmailAddress, unittest.equals('foo')); |
| 528 } | 528 } |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 703 | 703 |
| 704 checkInstancesInsertResponse(api.InstancesInsertResponse o) { | 704 checkInstancesInsertResponse(api.InstancesInsertResponse o) { |
| 705 buildCounterInstancesInsertResponse++; | 705 buildCounterInstancesInsertResponse++; |
| 706 if (buildCounterInstancesInsertResponse < 3) { | 706 if (buildCounterInstancesInsertResponse < 3) { |
| 707 unittest.expect(o.kind, unittest.equals('foo')); | 707 unittest.expect(o.kind, unittest.equals('foo')); |
| 708 unittest.expect(o.operation, unittest.equals('foo')); | 708 unittest.expect(o.operation, unittest.equals('foo')); |
| 709 } | 709 } |
| 710 buildCounterInstancesInsertResponse--; | 710 buildCounterInstancesInsertResponse--; |
| 711 } | 711 } |
| 712 | 712 |
| 713 buildUnnamed3558() { | 713 buildUnnamed3032() { |
| 714 var o = new core.List<api.DatabaseInstance>(); | 714 var o = new core.List<api.DatabaseInstance>(); |
| 715 o.add(buildDatabaseInstance()); | 715 o.add(buildDatabaseInstance()); |
| 716 o.add(buildDatabaseInstance()); | 716 o.add(buildDatabaseInstance()); |
| 717 return o; | 717 return o; |
| 718 } | 718 } |
| 719 | 719 |
| 720 checkUnnamed3558(core.List<api.DatabaseInstance> o) { | 720 checkUnnamed3032(core.List<api.DatabaseInstance> o) { |
| 721 unittest.expect(o, unittest.hasLength(2)); | 721 unittest.expect(o, unittest.hasLength(2)); |
| 722 checkDatabaseInstance(o[0]); | 722 checkDatabaseInstance(o[0]); |
| 723 checkDatabaseInstance(o[1]); | 723 checkDatabaseInstance(o[1]); |
| 724 } | 724 } |
| 725 | 725 |
| 726 core.int buildCounterInstancesListResponse = 0; | 726 core.int buildCounterInstancesListResponse = 0; |
| 727 buildInstancesListResponse() { | 727 buildInstancesListResponse() { |
| 728 var o = new api.InstancesListResponse(); | 728 var o = new api.InstancesListResponse(); |
| 729 buildCounterInstancesListResponse++; | 729 buildCounterInstancesListResponse++; |
| 730 if (buildCounterInstancesListResponse < 3) { | 730 if (buildCounterInstancesListResponse < 3) { |
| 731 o.items = buildUnnamed3558(); | 731 o.items = buildUnnamed3032(); |
| 732 o.kind = "foo"; | 732 o.kind = "foo"; |
| 733 o.nextPageToken = "foo"; | 733 o.nextPageToken = "foo"; |
| 734 } | 734 } |
| 735 buildCounterInstancesListResponse--; | 735 buildCounterInstancesListResponse--; |
| 736 return o; | 736 return o; |
| 737 } | 737 } |
| 738 | 738 |
| 739 checkInstancesListResponse(api.InstancesListResponse o) { | 739 checkInstancesListResponse(api.InstancesListResponse o) { |
| 740 buildCounterInstancesListResponse++; | 740 buildCounterInstancesListResponse++; |
| 741 if (buildCounterInstancesListResponse < 3) { | 741 if (buildCounterInstancesListResponse < 3) { |
| 742 checkUnnamed3558(o.items); | 742 checkUnnamed3032(o.items); |
| 743 unittest.expect(o.kind, unittest.equals('foo')); | 743 unittest.expect(o.kind, unittest.equals('foo')); |
| 744 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 744 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 745 } | 745 } |
| 746 buildCounterInstancesListResponse--; | 746 buildCounterInstancesListResponse--; |
| 747 } | 747 } |
| 748 | 748 |
| 749 core.int buildCounterInstancesPromoteReplicaResponse = 0; | 749 core.int buildCounterInstancesPromoteReplicaResponse = 0; |
| 750 buildInstancesPromoteReplicaResponse() { | 750 buildInstancesPromoteReplicaResponse() { |
| 751 var o = new api.InstancesPromoteReplicaResponse(); | 751 var o = new api.InstancesPromoteReplicaResponse(); |
| 752 buildCounterInstancesPromoteReplicaResponse++; | 752 buildCounterInstancesPromoteReplicaResponse++; |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 865 | 865 |
| 866 checkInstancesUpdateResponse(api.InstancesUpdateResponse o) { | 866 checkInstancesUpdateResponse(api.InstancesUpdateResponse o) { |
| 867 buildCounterInstancesUpdateResponse++; | 867 buildCounterInstancesUpdateResponse++; |
| 868 if (buildCounterInstancesUpdateResponse < 3) { | 868 if (buildCounterInstancesUpdateResponse < 3) { |
| 869 unittest.expect(o.kind, unittest.equals('foo')); | 869 unittest.expect(o.kind, unittest.equals('foo')); |
| 870 unittest.expect(o.operation, unittest.equals('foo')); | 870 unittest.expect(o.operation, unittest.equals('foo')); |
| 871 } | 871 } |
| 872 buildCounterInstancesUpdateResponse--; | 872 buildCounterInstancesUpdateResponse--; |
| 873 } | 873 } |
| 874 | 874 |
| 875 buildUnnamed3559() { | 875 buildUnnamed3033() { |
| 876 var o = new core.List<core.String>(); | 876 var o = new core.List<core.String>(); |
| 877 o.add("foo"); | 877 o.add("foo"); |
| 878 o.add("foo"); | 878 o.add("foo"); |
| 879 return o; | 879 return o; |
| 880 } | 880 } |
| 881 | 881 |
| 882 checkUnnamed3559(core.List<core.String> o) { | 882 checkUnnamed3033(core.List<core.String> o) { |
| 883 unittest.expect(o, unittest.hasLength(2)); | 883 unittest.expect(o, unittest.hasLength(2)); |
| 884 unittest.expect(o[0], unittest.equals('foo')); | 884 unittest.expect(o[0], unittest.equals('foo')); |
| 885 unittest.expect(o[1], unittest.equals('foo')); | 885 unittest.expect(o[1], unittest.equals('foo')); |
| 886 } | 886 } |
| 887 | 887 |
| 888 core.int buildCounterIpConfiguration = 0; | 888 core.int buildCounterIpConfiguration = 0; |
| 889 buildIpConfiguration() { | 889 buildIpConfiguration() { |
| 890 var o = new api.IpConfiguration(); | 890 var o = new api.IpConfiguration(); |
| 891 buildCounterIpConfiguration++; | 891 buildCounterIpConfiguration++; |
| 892 if (buildCounterIpConfiguration < 3) { | 892 if (buildCounterIpConfiguration < 3) { |
| 893 o.authorizedNetworks = buildUnnamed3559(); | 893 o.authorizedNetworks = buildUnnamed3033(); |
| 894 o.enabled = true; | 894 o.enabled = true; |
| 895 o.kind = "foo"; | 895 o.kind = "foo"; |
| 896 o.requireSsl = true; | 896 o.requireSsl = true; |
| 897 } | 897 } |
| 898 buildCounterIpConfiguration--; | 898 buildCounterIpConfiguration--; |
| 899 return o; | 899 return o; |
| 900 } | 900 } |
| 901 | 901 |
| 902 checkIpConfiguration(api.IpConfiguration o) { | 902 checkIpConfiguration(api.IpConfiguration o) { |
| 903 buildCounterIpConfiguration++; | 903 buildCounterIpConfiguration++; |
| 904 if (buildCounterIpConfiguration < 3) { | 904 if (buildCounterIpConfiguration < 3) { |
| 905 checkUnnamed3559(o.authorizedNetworks); | 905 checkUnnamed3033(o.authorizedNetworks); |
| 906 unittest.expect(o.enabled, unittest.isTrue); | 906 unittest.expect(o.enabled, unittest.isTrue); |
| 907 unittest.expect(o.kind, unittest.equals('foo')); | 907 unittest.expect(o.kind, unittest.equals('foo')); |
| 908 unittest.expect(o.requireSsl, unittest.isTrue); | 908 unittest.expect(o.requireSsl, unittest.isTrue); |
| 909 } | 909 } |
| 910 buildCounterIpConfiguration--; | 910 buildCounterIpConfiguration--; |
| 911 } | 911 } |
| 912 | 912 |
| 913 core.int buildCounterIpMapping = 0; | 913 core.int buildCounterIpMapping = 0; |
| 914 buildIpMapping() { | 914 buildIpMapping() { |
| 915 var o = new api.IpMapping(); | 915 var o = new api.IpMapping(); |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 968 | 968 |
| 969 checkOperationError(api.OperationError o) { | 969 checkOperationError(api.OperationError o) { |
| 970 buildCounterOperationError++; | 970 buildCounterOperationError++; |
| 971 if (buildCounterOperationError < 3) { | 971 if (buildCounterOperationError < 3) { |
| 972 unittest.expect(o.code, unittest.equals('foo')); | 972 unittest.expect(o.code, unittest.equals('foo')); |
| 973 unittest.expect(o.kind, unittest.equals('foo')); | 973 unittest.expect(o.kind, unittest.equals('foo')); |
| 974 } | 974 } |
| 975 buildCounterOperationError--; | 975 buildCounterOperationError--; |
| 976 } | 976 } |
| 977 | 977 |
| 978 buildUnnamed3560() { | 978 buildUnnamed3034() { |
| 979 var o = new core.List<api.InstanceOperation>(); | 979 var o = new core.List<api.InstanceOperation>(); |
| 980 o.add(buildInstanceOperation()); | 980 o.add(buildInstanceOperation()); |
| 981 o.add(buildInstanceOperation()); | 981 o.add(buildInstanceOperation()); |
| 982 return o; | 982 return o; |
| 983 } | 983 } |
| 984 | 984 |
| 985 checkUnnamed3560(core.List<api.InstanceOperation> o) { | 985 checkUnnamed3034(core.List<api.InstanceOperation> o) { |
| 986 unittest.expect(o, unittest.hasLength(2)); | 986 unittest.expect(o, unittest.hasLength(2)); |
| 987 checkInstanceOperation(o[0]); | 987 checkInstanceOperation(o[0]); |
| 988 checkInstanceOperation(o[1]); | 988 checkInstanceOperation(o[1]); |
| 989 } | 989 } |
| 990 | 990 |
| 991 core.int buildCounterOperationsListResponse = 0; | 991 core.int buildCounterOperationsListResponse = 0; |
| 992 buildOperationsListResponse() { | 992 buildOperationsListResponse() { |
| 993 var o = new api.OperationsListResponse(); | 993 var o = new api.OperationsListResponse(); |
| 994 buildCounterOperationsListResponse++; | 994 buildCounterOperationsListResponse++; |
| 995 if (buildCounterOperationsListResponse < 3) { | 995 if (buildCounterOperationsListResponse < 3) { |
| 996 o.items = buildUnnamed3560(); | 996 o.items = buildUnnamed3034(); |
| 997 o.kind = "foo"; | 997 o.kind = "foo"; |
| 998 o.nextPageToken = "foo"; | 998 o.nextPageToken = "foo"; |
| 999 } | 999 } |
| 1000 buildCounterOperationsListResponse--; | 1000 buildCounterOperationsListResponse--; |
| 1001 return o; | 1001 return o; |
| 1002 } | 1002 } |
| 1003 | 1003 |
| 1004 checkOperationsListResponse(api.OperationsListResponse o) { | 1004 checkOperationsListResponse(api.OperationsListResponse o) { |
| 1005 buildCounterOperationsListResponse++; | 1005 buildCounterOperationsListResponse++; |
| 1006 if (buildCounterOperationsListResponse < 3) { | 1006 if (buildCounterOperationsListResponse < 3) { |
| 1007 checkUnnamed3560(o.items); | 1007 checkUnnamed3034(o.items); |
| 1008 unittest.expect(o.kind, unittest.equals('foo')); | 1008 unittest.expect(o.kind, unittest.equals('foo')); |
| 1009 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 1009 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 1010 } | 1010 } |
| 1011 buildCounterOperationsListResponse--; | 1011 buildCounterOperationsListResponse--; |
| 1012 } | 1012 } |
| 1013 | 1013 |
| 1014 core.int buildCounterSetRootPasswordContext = 0; | 1014 core.int buildCounterSetRootPasswordContext = 0; |
| 1015 buildSetRootPasswordContext() { | 1015 buildSetRootPasswordContext() { |
| 1016 var o = new api.SetRootPasswordContext(); | 1016 var o = new api.SetRootPasswordContext(); |
| 1017 buildCounterSetRootPasswordContext++; | 1017 buildCounterSetRootPasswordContext++; |
| 1018 if (buildCounterSetRootPasswordContext < 3) { | 1018 if (buildCounterSetRootPasswordContext < 3) { |
| 1019 o.kind = "foo"; | 1019 o.kind = "foo"; |
| 1020 o.password = "foo"; | 1020 o.password = "foo"; |
| 1021 } | 1021 } |
| 1022 buildCounterSetRootPasswordContext--; | 1022 buildCounterSetRootPasswordContext--; |
| 1023 return o; | 1023 return o; |
| 1024 } | 1024 } |
| 1025 | 1025 |
| 1026 checkSetRootPasswordContext(api.SetRootPasswordContext o) { | 1026 checkSetRootPasswordContext(api.SetRootPasswordContext o) { |
| 1027 buildCounterSetRootPasswordContext++; | 1027 buildCounterSetRootPasswordContext++; |
| 1028 if (buildCounterSetRootPasswordContext < 3) { | 1028 if (buildCounterSetRootPasswordContext < 3) { |
| 1029 unittest.expect(o.kind, unittest.equals('foo')); | 1029 unittest.expect(o.kind, unittest.equals('foo')); |
| 1030 unittest.expect(o.password, unittest.equals('foo')); | 1030 unittest.expect(o.password, unittest.equals('foo')); |
| 1031 } | 1031 } |
| 1032 buildCounterSetRootPasswordContext--; | 1032 buildCounterSetRootPasswordContext--; |
| 1033 } | 1033 } |
| 1034 | 1034 |
| 1035 buildUnnamed3561() { | 1035 buildUnnamed3035() { |
| 1036 var o = new core.List<core.String>(); | 1036 var o = new core.List<core.String>(); |
| 1037 o.add("foo"); | 1037 o.add("foo"); |
| 1038 o.add("foo"); | 1038 o.add("foo"); |
| 1039 return o; | 1039 return o; |
| 1040 } | 1040 } |
| 1041 | 1041 |
| 1042 checkUnnamed3561(core.List<core.String> o) { | 1042 checkUnnamed3035(core.List<core.String> o) { |
| 1043 unittest.expect(o, unittest.hasLength(2)); | 1043 unittest.expect(o, unittest.hasLength(2)); |
| 1044 unittest.expect(o[0], unittest.equals('foo')); | 1044 unittest.expect(o[0], unittest.equals('foo')); |
| 1045 unittest.expect(o[1], unittest.equals('foo')); | 1045 unittest.expect(o[1], unittest.equals('foo')); |
| 1046 } | 1046 } |
| 1047 | 1047 |
| 1048 buildUnnamed3562() { | 1048 buildUnnamed3036() { |
| 1049 var o = new core.List<api.BackupConfiguration>(); | 1049 var o = new core.List<api.BackupConfiguration>(); |
| 1050 o.add(buildBackupConfiguration()); | 1050 o.add(buildBackupConfiguration()); |
| 1051 o.add(buildBackupConfiguration()); | 1051 o.add(buildBackupConfiguration()); |
| 1052 return o; | 1052 return o; |
| 1053 } | 1053 } |
| 1054 | 1054 |
| 1055 checkUnnamed3562(core.List<api.BackupConfiguration> o) { | 1055 checkUnnamed3036(core.List<api.BackupConfiguration> o) { |
| 1056 unittest.expect(o, unittest.hasLength(2)); | 1056 unittest.expect(o, unittest.hasLength(2)); |
| 1057 checkBackupConfiguration(o[0]); | 1057 checkBackupConfiguration(o[0]); |
| 1058 checkBackupConfiguration(o[1]); | 1058 checkBackupConfiguration(o[1]); |
| 1059 } | 1059 } |
| 1060 | 1060 |
| 1061 buildUnnamed3563() { | 1061 buildUnnamed3037() { |
| 1062 var o = new core.List<api.DatabaseFlags>(); | 1062 var o = new core.List<api.DatabaseFlags>(); |
| 1063 o.add(buildDatabaseFlags()); | 1063 o.add(buildDatabaseFlags()); |
| 1064 o.add(buildDatabaseFlags()); | 1064 o.add(buildDatabaseFlags()); |
| 1065 return o; | 1065 return o; |
| 1066 } | 1066 } |
| 1067 | 1067 |
| 1068 checkUnnamed3563(core.List<api.DatabaseFlags> o) { | 1068 checkUnnamed3037(core.List<api.DatabaseFlags> o) { |
| 1069 unittest.expect(o, unittest.hasLength(2)); | 1069 unittest.expect(o, unittest.hasLength(2)); |
| 1070 checkDatabaseFlags(o[0]); | 1070 checkDatabaseFlags(o[0]); |
| 1071 checkDatabaseFlags(o[1]); | 1071 checkDatabaseFlags(o[1]); |
| 1072 } | 1072 } |
| 1073 | 1073 |
| 1074 core.int buildCounterSettings = 0; | 1074 core.int buildCounterSettings = 0; |
| 1075 buildSettings() { | 1075 buildSettings() { |
| 1076 var o = new api.Settings(); | 1076 var o = new api.Settings(); |
| 1077 buildCounterSettings++; | 1077 buildCounterSettings++; |
| 1078 if (buildCounterSettings < 3) { | 1078 if (buildCounterSettings < 3) { |
| 1079 o.activationPolicy = "foo"; | 1079 o.activationPolicy = "foo"; |
| 1080 o.authorizedGaeApplications = buildUnnamed3561(); | 1080 o.authorizedGaeApplications = buildUnnamed3035(); |
| 1081 o.backupConfiguration = buildUnnamed3562(); | 1081 o.backupConfiguration = buildUnnamed3036(); |
| 1082 o.databaseFlags = buildUnnamed3563(); | 1082 o.databaseFlags = buildUnnamed3037(); |
| 1083 o.databaseReplicationEnabled = true; | 1083 o.databaseReplicationEnabled = true; |
| 1084 o.ipConfiguration = buildIpConfiguration(); | 1084 o.ipConfiguration = buildIpConfiguration(); |
| 1085 o.kind = "foo"; | 1085 o.kind = "foo"; |
| 1086 o.locationPreference = buildLocationPreference(); | 1086 o.locationPreference = buildLocationPreference(); |
| 1087 o.pricingPlan = "foo"; | 1087 o.pricingPlan = "foo"; |
| 1088 o.replicationType = "foo"; | 1088 o.replicationType = "foo"; |
| 1089 o.settingsVersion = "foo"; | 1089 o.settingsVersion = "foo"; |
| 1090 o.tier = "foo"; | 1090 o.tier = "foo"; |
| 1091 } | 1091 } |
| 1092 buildCounterSettings--; | 1092 buildCounterSettings--; |
| 1093 return o; | 1093 return o; |
| 1094 } | 1094 } |
| 1095 | 1095 |
| 1096 checkSettings(api.Settings o) { | 1096 checkSettings(api.Settings o) { |
| 1097 buildCounterSettings++; | 1097 buildCounterSettings++; |
| 1098 if (buildCounterSettings < 3) { | 1098 if (buildCounterSettings < 3) { |
| 1099 unittest.expect(o.activationPolicy, unittest.equals('foo')); | 1099 unittest.expect(o.activationPolicy, unittest.equals('foo')); |
| 1100 checkUnnamed3561(o.authorizedGaeApplications); | 1100 checkUnnamed3035(o.authorizedGaeApplications); |
| 1101 checkUnnamed3562(o.backupConfiguration); | 1101 checkUnnamed3036(o.backupConfiguration); |
| 1102 checkUnnamed3563(o.databaseFlags); | 1102 checkUnnamed3037(o.databaseFlags); |
| 1103 unittest.expect(o.databaseReplicationEnabled, unittest.isTrue); | 1103 unittest.expect(o.databaseReplicationEnabled, unittest.isTrue); |
| 1104 checkIpConfiguration(o.ipConfiguration); | 1104 checkIpConfiguration(o.ipConfiguration); |
| 1105 unittest.expect(o.kind, unittest.equals('foo')); | 1105 unittest.expect(o.kind, unittest.equals('foo')); |
| 1106 checkLocationPreference(o.locationPreference); | 1106 checkLocationPreference(o.locationPreference); |
| 1107 unittest.expect(o.pricingPlan, unittest.equals('foo')); | 1107 unittest.expect(o.pricingPlan, unittest.equals('foo')); |
| 1108 unittest.expect(o.replicationType, unittest.equals('foo')); | 1108 unittest.expect(o.replicationType, unittest.equals('foo')); |
| 1109 unittest.expect(o.settingsVersion, unittest.equals('foo')); | 1109 unittest.expect(o.settingsVersion, unittest.equals('foo')); |
| 1110 unittest.expect(o.tier, unittest.equals('foo')); | 1110 unittest.expect(o.tier, unittest.equals('foo')); |
| 1111 } | 1111 } |
| 1112 buildCounterSettings--; | 1112 buildCounterSettings--; |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1222 checkSslCertsInsertResponse(api.SslCertsInsertResponse o) { | 1222 checkSslCertsInsertResponse(api.SslCertsInsertResponse o) { |
| 1223 buildCounterSslCertsInsertResponse++; | 1223 buildCounterSslCertsInsertResponse++; |
| 1224 if (buildCounterSslCertsInsertResponse < 3) { | 1224 if (buildCounterSslCertsInsertResponse < 3) { |
| 1225 checkSslCertDetail(o.clientCert); | 1225 checkSslCertDetail(o.clientCert); |
| 1226 unittest.expect(o.kind, unittest.equals('foo')); | 1226 unittest.expect(o.kind, unittest.equals('foo')); |
| 1227 checkSslCert(o.serverCaCert); | 1227 checkSslCert(o.serverCaCert); |
| 1228 } | 1228 } |
| 1229 buildCounterSslCertsInsertResponse--; | 1229 buildCounterSslCertsInsertResponse--; |
| 1230 } | 1230 } |
| 1231 | 1231 |
| 1232 buildUnnamed3564() { | 1232 buildUnnamed3038() { |
| 1233 var o = new core.List<api.SslCert>(); | 1233 var o = new core.List<api.SslCert>(); |
| 1234 o.add(buildSslCert()); | 1234 o.add(buildSslCert()); |
| 1235 o.add(buildSslCert()); | 1235 o.add(buildSslCert()); |
| 1236 return o; | 1236 return o; |
| 1237 } | 1237 } |
| 1238 | 1238 |
| 1239 checkUnnamed3564(core.List<api.SslCert> o) { | 1239 checkUnnamed3038(core.List<api.SslCert> o) { |
| 1240 unittest.expect(o, unittest.hasLength(2)); | 1240 unittest.expect(o, unittest.hasLength(2)); |
| 1241 checkSslCert(o[0]); | 1241 checkSslCert(o[0]); |
| 1242 checkSslCert(o[1]); | 1242 checkSslCert(o[1]); |
| 1243 } | 1243 } |
| 1244 | 1244 |
| 1245 core.int buildCounterSslCertsListResponse = 0; | 1245 core.int buildCounterSslCertsListResponse = 0; |
| 1246 buildSslCertsListResponse() { | 1246 buildSslCertsListResponse() { |
| 1247 var o = new api.SslCertsListResponse(); | 1247 var o = new api.SslCertsListResponse(); |
| 1248 buildCounterSslCertsListResponse++; | 1248 buildCounterSslCertsListResponse++; |
| 1249 if (buildCounterSslCertsListResponse < 3) { | 1249 if (buildCounterSslCertsListResponse < 3) { |
| 1250 o.items = buildUnnamed3564(); | 1250 o.items = buildUnnamed3038(); |
| 1251 o.kind = "foo"; | 1251 o.kind = "foo"; |
| 1252 } | 1252 } |
| 1253 buildCounterSslCertsListResponse--; | 1253 buildCounterSslCertsListResponse--; |
| 1254 return o; | 1254 return o; |
| 1255 } | 1255 } |
| 1256 | 1256 |
| 1257 checkSslCertsListResponse(api.SslCertsListResponse o) { | 1257 checkSslCertsListResponse(api.SslCertsListResponse o) { |
| 1258 buildCounterSslCertsListResponse++; | 1258 buildCounterSslCertsListResponse++; |
| 1259 if (buildCounterSslCertsListResponse < 3) { | 1259 if (buildCounterSslCertsListResponse < 3) { |
| 1260 checkUnnamed3564(o.items); | 1260 checkUnnamed3038(o.items); |
| 1261 unittest.expect(o.kind, unittest.equals('foo')); | 1261 unittest.expect(o.kind, unittest.equals('foo')); |
| 1262 } | 1262 } |
| 1263 buildCounterSslCertsListResponse--; | 1263 buildCounterSslCertsListResponse--; |
| 1264 } | 1264 } |
| 1265 | 1265 |
| 1266 buildUnnamed3565() { | 1266 buildUnnamed3039() { |
| 1267 var o = new core.List<core.String>(); | 1267 var o = new core.List<core.String>(); |
| 1268 o.add("foo"); | 1268 o.add("foo"); |
| 1269 o.add("foo"); | 1269 o.add("foo"); |
| 1270 return o; | 1270 return o; |
| 1271 } | 1271 } |
| 1272 | 1272 |
| 1273 checkUnnamed3565(core.List<core.String> o) { | 1273 checkUnnamed3039(core.List<core.String> o) { |
| 1274 unittest.expect(o, unittest.hasLength(2)); | 1274 unittest.expect(o, unittest.hasLength(2)); |
| 1275 unittest.expect(o[0], unittest.equals('foo')); | 1275 unittest.expect(o[0], unittest.equals('foo')); |
| 1276 unittest.expect(o[1], unittest.equals('foo')); | 1276 unittest.expect(o[1], unittest.equals('foo')); |
| 1277 } | 1277 } |
| 1278 | 1278 |
| 1279 core.int buildCounterTier = 0; | 1279 core.int buildCounterTier = 0; |
| 1280 buildTier() { | 1280 buildTier() { |
| 1281 var o = new api.Tier(); | 1281 var o = new api.Tier(); |
| 1282 buildCounterTier++; | 1282 buildCounterTier++; |
| 1283 if (buildCounterTier < 3) { | 1283 if (buildCounterTier < 3) { |
| 1284 o.DiskQuota = "foo"; | 1284 o.DiskQuota = "foo"; |
| 1285 o.RAM = "foo"; | 1285 o.RAM = "foo"; |
| 1286 o.kind = "foo"; | 1286 o.kind = "foo"; |
| 1287 o.region = buildUnnamed3565(); | 1287 o.region = buildUnnamed3039(); |
| 1288 o.tier = "foo"; | 1288 o.tier = "foo"; |
| 1289 } | 1289 } |
| 1290 buildCounterTier--; | 1290 buildCounterTier--; |
| 1291 return o; | 1291 return o; |
| 1292 } | 1292 } |
| 1293 | 1293 |
| 1294 checkTier(api.Tier o) { | 1294 checkTier(api.Tier o) { |
| 1295 buildCounterTier++; | 1295 buildCounterTier++; |
| 1296 if (buildCounterTier < 3) { | 1296 if (buildCounterTier < 3) { |
| 1297 unittest.expect(o.DiskQuota, unittest.equals('foo')); | 1297 unittest.expect(o.DiskQuota, unittest.equals('foo')); |
| 1298 unittest.expect(o.RAM, unittest.equals('foo')); | 1298 unittest.expect(o.RAM, unittest.equals('foo')); |
| 1299 unittest.expect(o.kind, unittest.equals('foo')); | 1299 unittest.expect(o.kind, unittest.equals('foo')); |
| 1300 checkUnnamed3565(o.region); | 1300 checkUnnamed3039(o.region); |
| 1301 unittest.expect(o.tier, unittest.equals('foo')); | 1301 unittest.expect(o.tier, unittest.equals('foo')); |
| 1302 } | 1302 } |
| 1303 buildCounterTier--; | 1303 buildCounterTier--; |
| 1304 } | 1304 } |
| 1305 | 1305 |
| 1306 buildUnnamed3566() { | 1306 buildUnnamed3040() { |
| 1307 var o = new core.List<api.Tier>(); | 1307 var o = new core.List<api.Tier>(); |
| 1308 o.add(buildTier()); | 1308 o.add(buildTier()); |
| 1309 o.add(buildTier()); | 1309 o.add(buildTier()); |
| 1310 return o; | 1310 return o; |
| 1311 } | 1311 } |
| 1312 | 1312 |
| 1313 checkUnnamed3566(core.List<api.Tier> o) { | 1313 checkUnnamed3040(core.List<api.Tier> o) { |
| 1314 unittest.expect(o, unittest.hasLength(2)); | 1314 unittest.expect(o, unittest.hasLength(2)); |
| 1315 checkTier(o[0]); | 1315 checkTier(o[0]); |
| 1316 checkTier(o[1]); | 1316 checkTier(o[1]); |
| 1317 } | 1317 } |
| 1318 | 1318 |
| 1319 core.int buildCounterTiersListResponse = 0; | 1319 core.int buildCounterTiersListResponse = 0; |
| 1320 buildTiersListResponse() { | 1320 buildTiersListResponse() { |
| 1321 var o = new api.TiersListResponse(); | 1321 var o = new api.TiersListResponse(); |
| 1322 buildCounterTiersListResponse++; | 1322 buildCounterTiersListResponse++; |
| 1323 if (buildCounterTiersListResponse < 3) { | 1323 if (buildCounterTiersListResponse < 3) { |
| 1324 o.items = buildUnnamed3566(); | 1324 o.items = buildUnnamed3040(); |
| 1325 o.kind = "foo"; | 1325 o.kind = "foo"; |
| 1326 } | 1326 } |
| 1327 buildCounterTiersListResponse--; | 1327 buildCounterTiersListResponse--; |
| 1328 return o; | 1328 return o; |
| 1329 } | 1329 } |
| 1330 | 1330 |
| 1331 checkTiersListResponse(api.TiersListResponse o) { | 1331 checkTiersListResponse(api.TiersListResponse o) { |
| 1332 buildCounterTiersListResponse++; | 1332 buildCounterTiersListResponse++; |
| 1333 if (buildCounterTiersListResponse < 3) { | 1333 if (buildCounterTiersListResponse < 3) { |
| 1334 checkUnnamed3566(o.items); | 1334 checkUnnamed3040(o.items); |
| 1335 unittest.expect(o.kind, unittest.equals('foo')); | 1335 unittest.expect(o.kind, unittest.equals('foo')); |
| 1336 } | 1336 } |
| 1337 buildCounterTiersListResponse--; | 1337 buildCounterTiersListResponse--; |
| 1338 } | 1338 } |
| 1339 | 1339 |
| 1340 | 1340 |
| 1341 main() { | 1341 main() { |
| 1342 unittest.group("obj-schema-BackupConfiguration", () { | 1342 unittest.group("obj-schema-BackupConfiguration", () { |
| 1343 unittest.test("to-json--from-json", () { | 1343 unittest.test("to-json--from-json", () { |
| 1344 var o = buildBackupConfiguration(); | 1344 var o = buildBackupConfiguration(); |
| (...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1728 | 1728 |
| 1729 unittest.group("resource-BackupRunsResourceApi", () { | 1729 unittest.group("resource-BackupRunsResourceApi", () { |
| 1730 unittest.test("method--get", () { | 1730 unittest.test("method--get", () { |
| 1731 | 1731 |
| 1732 var mock = new HttpServerMock(); | 1732 var mock = new HttpServerMock(); |
| 1733 api.BackupRunsResourceApi res = new api.SqladminApi(mock).backupRuns; | 1733 api.BackupRunsResourceApi res = new api.SqladminApi(mock).backupRuns; |
| 1734 var arg_project = "foo"; | 1734 var arg_project = "foo"; |
| 1735 var arg_instance = "foo"; | 1735 var arg_instance = "foo"; |
| 1736 var arg_backupConfiguration = "foo"; | 1736 var arg_backupConfiguration = "foo"; |
| 1737 var arg_dueTime = "foo"; | 1737 var arg_dueTime = "foo"; |
| 1738 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1738 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 1739 var path = (req.url).path; | 1739 var path = (req.url).path; |
| 1740 var pathOffset = 0; | 1740 var pathOffset = 0; |
| 1741 var index; | 1741 var index; |
| 1742 var subPart; | 1742 var subPart; |
| 1743 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1743 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1744 pathOffset += 1; | 1744 pathOffset += 1; |
| 1745 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta3/")); | 1745 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta3/")); |
| 1746 pathOffset += 12; | 1746 pathOffset += 12; |
| 1747 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("projects/")); | 1747 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("projects/")); |
| 1748 pathOffset += 9; | 1748 pathOffset += 9; |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1782 } | 1782 } |
| 1783 unittest.expect(queryMap["dueTime"].first, unittest.equals(arg_dueTime))
; | 1783 unittest.expect(queryMap["dueTime"].first, unittest.equals(arg_dueTime))
; |
| 1784 | 1784 |
| 1785 | 1785 |
| 1786 var h = { | 1786 var h = { |
| 1787 "content-type" : "application/json; charset=utf-8", | 1787 "content-type" : "application/json; charset=utf-8", |
| 1788 }; | 1788 }; |
| 1789 var resp = convert.JSON.encode(buildBackupRun()); | 1789 var resp = convert.JSON.encode(buildBackupRun()); |
| 1790 return new async.Future.value(stringResponse(200, h, resp)); | 1790 return new async.Future.value(stringResponse(200, h, resp)); |
| 1791 }), true); | 1791 }), true); |
| 1792 res.get(arg_project, arg_instance, arg_backupConfiguration, arg_dueTime).t
hen(unittest.expectAsync(((api.BackupRun response) { | 1792 res.get(arg_project, arg_instance, arg_backupConfiguration, arg_dueTime).t
hen(unittest.expectAsync1(((api.BackupRun response) { |
| 1793 checkBackupRun(response); | 1793 checkBackupRun(response); |
| 1794 }))); | 1794 }))); |
| 1795 }); | 1795 }); |
| 1796 | 1796 |
| 1797 unittest.test("method--list", () { | 1797 unittest.test("method--list", () { |
| 1798 | 1798 |
| 1799 var mock = new HttpServerMock(); | 1799 var mock = new HttpServerMock(); |
| 1800 api.BackupRunsResourceApi res = new api.SqladminApi(mock).backupRuns; | 1800 api.BackupRunsResourceApi res = new api.SqladminApi(mock).backupRuns; |
| 1801 var arg_project = "foo"; | 1801 var arg_project = "foo"; |
| 1802 var arg_instance = "foo"; | 1802 var arg_instance = "foo"; |
| 1803 var arg_backupConfiguration = "foo"; | 1803 var arg_backupConfiguration = "foo"; |
| 1804 var arg_maxResults = 42; | 1804 var arg_maxResults = 42; |
| 1805 var arg_pageToken = "foo"; | 1805 var arg_pageToken = "foo"; |
| 1806 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1806 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 1807 var path = (req.url).path; | 1807 var path = (req.url).path; |
| 1808 var pathOffset = 0; | 1808 var pathOffset = 0; |
| 1809 var index; | 1809 var index; |
| 1810 var subPart; | 1810 var subPart; |
| 1811 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1811 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1812 pathOffset += 1; | 1812 pathOffset += 1; |
| 1813 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta3/")); | 1813 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta3/")); |
| 1814 pathOffset += 12; | 1814 pathOffset += 12; |
| 1815 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("projects/")); | 1815 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("projects/")); |
| 1816 pathOffset += 9; | 1816 pathOffset += 9; |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1849 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | 1849 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); |
| 1850 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 1850 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
| 1851 | 1851 |
| 1852 | 1852 |
| 1853 var h = { | 1853 var h = { |
| 1854 "content-type" : "application/json; charset=utf-8", | 1854 "content-type" : "application/json; charset=utf-8", |
| 1855 }; | 1855 }; |
| 1856 var resp = convert.JSON.encode(buildBackupRunsListResponse()); | 1856 var resp = convert.JSON.encode(buildBackupRunsListResponse()); |
| 1857 return new async.Future.value(stringResponse(200, h, resp)); | 1857 return new async.Future.value(stringResponse(200, h, resp)); |
| 1858 }), true); | 1858 }), true); |
| 1859 res.list(arg_project, arg_instance, arg_backupConfiguration, maxResults: a
rg_maxResults, pageToken: arg_pageToken).then(unittest.expectAsync(((api.BackupR
unsListResponse response) { | 1859 res.list(arg_project, arg_instance, arg_backupConfiguration, maxResults: a
rg_maxResults, pageToken: arg_pageToken).then(unittest.expectAsync1(((api.Backup
RunsListResponse response) { |
| 1860 checkBackupRunsListResponse(response); | 1860 checkBackupRunsListResponse(response); |
| 1861 }))); | 1861 }))); |
| 1862 }); | 1862 }); |
| 1863 | 1863 |
| 1864 }); | 1864 }); |
| 1865 | 1865 |
| 1866 | 1866 |
| 1867 unittest.group("resource-FlagsResourceApi", () { | 1867 unittest.group("resource-FlagsResourceApi", () { |
| 1868 unittest.test("method--list", () { | 1868 unittest.test("method--list", () { |
| 1869 | 1869 |
| 1870 var mock = new HttpServerMock(); | 1870 var mock = new HttpServerMock(); |
| 1871 api.FlagsResourceApi res = new api.SqladminApi(mock).flags; | 1871 api.FlagsResourceApi res = new api.SqladminApi(mock).flags; |
| 1872 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1872 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 1873 var path = (req.url).path; | 1873 var path = (req.url).path; |
| 1874 var pathOffset = 0; | 1874 var pathOffset = 0; |
| 1875 var index; | 1875 var index; |
| 1876 var subPart; | 1876 var subPart; |
| 1877 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1877 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1878 pathOffset += 1; | 1878 pathOffset += 1; |
| 1879 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta3/")); | 1879 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta3/")); |
| 1880 pathOffset += 12; | 1880 pathOffset += 12; |
| 1881 unittest.expect(path.substring(pathOffset, pathOffset + 5), unittest.equ
als("flags")); | 1881 unittest.expect(path.substring(pathOffset, pathOffset + 5), unittest.equ
als("flags")); |
| 1882 pathOffset += 5; | 1882 pathOffset += 5; |
| (...skipping 15 matching lines...) Expand all Loading... |
| 1898 } | 1898 } |
| 1899 } | 1899 } |
| 1900 | 1900 |
| 1901 | 1901 |
| 1902 var h = { | 1902 var h = { |
| 1903 "content-type" : "application/json; charset=utf-8", | 1903 "content-type" : "application/json; charset=utf-8", |
| 1904 }; | 1904 }; |
| 1905 var resp = convert.JSON.encode(buildFlagsListResponse()); | 1905 var resp = convert.JSON.encode(buildFlagsListResponse()); |
| 1906 return new async.Future.value(stringResponse(200, h, resp)); | 1906 return new async.Future.value(stringResponse(200, h, resp)); |
| 1907 }), true); | 1907 }), true); |
| 1908 res.list().then(unittest.expectAsync(((api.FlagsListResponse response) { | 1908 res.list().then(unittest.expectAsync1(((api.FlagsListResponse response) { |
| 1909 checkFlagsListResponse(response); | 1909 checkFlagsListResponse(response); |
| 1910 }))); | 1910 }))); |
| 1911 }); | 1911 }); |
| 1912 | 1912 |
| 1913 }); | 1913 }); |
| 1914 | 1914 |
| 1915 | 1915 |
| 1916 unittest.group("resource-InstancesResourceApi", () { | 1916 unittest.group("resource-InstancesResourceApi", () { |
| 1917 unittest.test("method--clone", () { | 1917 unittest.test("method--clone", () { |
| 1918 | 1918 |
| 1919 var mock = new HttpServerMock(); | 1919 var mock = new HttpServerMock(); |
| 1920 api.InstancesResourceApi res = new api.SqladminApi(mock).instances; | 1920 api.InstancesResourceApi res = new api.SqladminApi(mock).instances; |
| 1921 var arg_request = buildInstancesCloneRequest(); | 1921 var arg_request = buildInstancesCloneRequest(); |
| 1922 var arg_project = "foo"; | 1922 var arg_project = "foo"; |
| 1923 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1923 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 1924 var obj = new api.InstancesCloneRequest.fromJson(json); | 1924 var obj = new api.InstancesCloneRequest.fromJson(json); |
| 1925 checkInstancesCloneRequest(obj); | 1925 checkInstancesCloneRequest(obj); |
| 1926 | 1926 |
| 1927 var path = (req.url).path; | 1927 var path = (req.url).path; |
| 1928 var pathOffset = 0; | 1928 var pathOffset = 0; |
| 1929 var index; | 1929 var index; |
| 1930 var subPart; | 1930 var subPart; |
| 1931 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1931 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1932 pathOffset += 1; | 1932 pathOffset += 1; |
| 1933 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta3/")); | 1933 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta3/")); |
| (...skipping 25 matching lines...) Expand all Loading... |
| 1959 } | 1959 } |
| 1960 } | 1960 } |
| 1961 | 1961 |
| 1962 | 1962 |
| 1963 var h = { | 1963 var h = { |
| 1964 "content-type" : "application/json; charset=utf-8", | 1964 "content-type" : "application/json; charset=utf-8", |
| 1965 }; | 1965 }; |
| 1966 var resp = convert.JSON.encode(buildInstancesCloneResponse()); | 1966 var resp = convert.JSON.encode(buildInstancesCloneResponse()); |
| 1967 return new async.Future.value(stringResponse(200, h, resp)); | 1967 return new async.Future.value(stringResponse(200, h, resp)); |
| 1968 }), true); | 1968 }), true); |
| 1969 res.clone(arg_request, arg_project).then(unittest.expectAsync(((api.Instan
cesCloneResponse response) { | 1969 res.clone(arg_request, arg_project).then(unittest.expectAsync1(((api.Insta
ncesCloneResponse response) { |
| 1970 checkInstancesCloneResponse(response); | 1970 checkInstancesCloneResponse(response); |
| 1971 }))); | 1971 }))); |
| 1972 }); | 1972 }); |
| 1973 | 1973 |
| 1974 unittest.test("method--delete", () { | 1974 unittest.test("method--delete", () { |
| 1975 | 1975 |
| 1976 var mock = new HttpServerMock(); | 1976 var mock = new HttpServerMock(); |
| 1977 api.InstancesResourceApi res = new api.SqladminApi(mock).instances; | 1977 api.InstancesResourceApi res = new api.SqladminApi(mock).instances; |
| 1978 var arg_project = "foo"; | 1978 var arg_project = "foo"; |
| 1979 var arg_instance = "foo"; | 1979 var arg_instance = "foo"; |
| 1980 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1980 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 1981 var path = (req.url).path; | 1981 var path = (req.url).path; |
| 1982 var pathOffset = 0; | 1982 var pathOffset = 0; |
| 1983 var index; | 1983 var index; |
| 1984 var subPart; | 1984 var subPart; |
| 1985 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1985 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1986 pathOffset += 1; | 1986 pathOffset += 1; |
| 1987 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta3/")); | 1987 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta3/")); |
| 1988 pathOffset += 12; | 1988 pathOffset += 12; |
| 1989 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("projects/")); | 1989 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("projects/")); |
| 1990 pathOffset += 9; | 1990 pathOffset += 9; |
| (...skipping 25 matching lines...) Expand all Loading... |
| 2016 } | 2016 } |
| 2017 } | 2017 } |
| 2018 | 2018 |
| 2019 | 2019 |
| 2020 var h = { | 2020 var h = { |
| 2021 "content-type" : "application/json; charset=utf-8", | 2021 "content-type" : "application/json; charset=utf-8", |
| 2022 }; | 2022 }; |
| 2023 var resp = convert.JSON.encode(buildInstancesDeleteResponse()); | 2023 var resp = convert.JSON.encode(buildInstancesDeleteResponse()); |
| 2024 return new async.Future.value(stringResponse(200, h, resp)); | 2024 return new async.Future.value(stringResponse(200, h, resp)); |
| 2025 }), true); | 2025 }), true); |
| 2026 res.delete(arg_project, arg_instance).then(unittest.expectAsync(((api.Inst
ancesDeleteResponse response) { | 2026 res.delete(arg_project, arg_instance).then(unittest.expectAsync1(((api.Ins
tancesDeleteResponse response) { |
| 2027 checkInstancesDeleteResponse(response); | 2027 checkInstancesDeleteResponse(response); |
| 2028 }))); | 2028 }))); |
| 2029 }); | 2029 }); |
| 2030 | 2030 |
| 2031 unittest.test("method--export", () { | 2031 unittest.test("method--export", () { |
| 2032 | 2032 |
| 2033 var mock = new HttpServerMock(); | 2033 var mock = new HttpServerMock(); |
| 2034 api.InstancesResourceApi res = new api.SqladminApi(mock).instances; | 2034 api.InstancesResourceApi res = new api.SqladminApi(mock).instances; |
| 2035 var arg_request = buildInstancesExportRequest(); | 2035 var arg_request = buildInstancesExportRequest(); |
| 2036 var arg_project = "foo"; | 2036 var arg_project = "foo"; |
| 2037 var arg_instance = "foo"; | 2037 var arg_instance = "foo"; |
| 2038 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2038 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 2039 var obj = new api.InstancesExportRequest.fromJson(json); | 2039 var obj = new api.InstancesExportRequest.fromJson(json); |
| 2040 checkInstancesExportRequest(obj); | 2040 checkInstancesExportRequest(obj); |
| 2041 | 2041 |
| 2042 var path = (req.url).path; | 2042 var path = (req.url).path; |
| 2043 var pathOffset = 0; | 2043 var pathOffset = 0; |
| 2044 var index; | 2044 var index; |
| 2045 var subPart; | 2045 var subPart; |
| 2046 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2046 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2047 pathOffset += 1; | 2047 pathOffset += 1; |
| 2048 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta3/")); | 2048 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta3/")); |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2081 } | 2081 } |
| 2082 } | 2082 } |
| 2083 | 2083 |
| 2084 | 2084 |
| 2085 var h = { | 2085 var h = { |
| 2086 "content-type" : "application/json; charset=utf-8", | 2086 "content-type" : "application/json; charset=utf-8", |
| 2087 }; | 2087 }; |
| 2088 var resp = convert.JSON.encode(buildInstancesExportResponse()); | 2088 var resp = convert.JSON.encode(buildInstancesExportResponse()); |
| 2089 return new async.Future.value(stringResponse(200, h, resp)); | 2089 return new async.Future.value(stringResponse(200, h, resp)); |
| 2090 }), true); | 2090 }), true); |
| 2091 res.export(arg_request, arg_project, arg_instance).then(unittest.expectAsy
nc(((api.InstancesExportResponse response) { | 2091 res.export(arg_request, arg_project, arg_instance).then(unittest.expectAsy
nc1(((api.InstancesExportResponse response) { |
| 2092 checkInstancesExportResponse(response); | 2092 checkInstancesExportResponse(response); |
| 2093 }))); | 2093 }))); |
| 2094 }); | 2094 }); |
| 2095 | 2095 |
| 2096 unittest.test("method--get", () { | 2096 unittest.test("method--get", () { |
| 2097 | 2097 |
| 2098 var mock = new HttpServerMock(); | 2098 var mock = new HttpServerMock(); |
| 2099 api.InstancesResourceApi res = new api.SqladminApi(mock).instances; | 2099 api.InstancesResourceApi res = new api.SqladminApi(mock).instances; |
| 2100 var arg_project = "foo"; | 2100 var arg_project = "foo"; |
| 2101 var arg_instance = "foo"; | 2101 var arg_instance = "foo"; |
| 2102 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2102 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 2103 var path = (req.url).path; | 2103 var path = (req.url).path; |
| 2104 var pathOffset = 0; | 2104 var pathOffset = 0; |
| 2105 var index; | 2105 var index; |
| 2106 var subPart; | 2106 var subPart; |
| 2107 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2107 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2108 pathOffset += 1; | 2108 pathOffset += 1; |
| 2109 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta3/")); | 2109 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta3/")); |
| 2110 pathOffset += 12; | 2110 pathOffset += 12; |
| 2111 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("projects/")); | 2111 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("projects/")); |
| 2112 pathOffset += 9; | 2112 pathOffset += 9; |
| (...skipping 25 matching lines...) Expand all Loading... |
| 2138 } | 2138 } |
| 2139 } | 2139 } |
| 2140 | 2140 |
| 2141 | 2141 |
| 2142 var h = { | 2142 var h = { |
| 2143 "content-type" : "application/json; charset=utf-8", | 2143 "content-type" : "application/json; charset=utf-8", |
| 2144 }; | 2144 }; |
| 2145 var resp = convert.JSON.encode(buildDatabaseInstance()); | 2145 var resp = convert.JSON.encode(buildDatabaseInstance()); |
| 2146 return new async.Future.value(stringResponse(200, h, resp)); | 2146 return new async.Future.value(stringResponse(200, h, resp)); |
| 2147 }), true); | 2147 }), true); |
| 2148 res.get(arg_project, arg_instance).then(unittest.expectAsync(((api.Databas
eInstance response) { | 2148 res.get(arg_project, arg_instance).then(unittest.expectAsync1(((api.Databa
seInstance response) { |
| 2149 checkDatabaseInstance(response); | 2149 checkDatabaseInstance(response); |
| 2150 }))); | 2150 }))); |
| 2151 }); | 2151 }); |
| 2152 | 2152 |
| 2153 unittest.test("method--import", () { | 2153 unittest.test("method--import", () { |
| 2154 | 2154 |
| 2155 var mock = new HttpServerMock(); | 2155 var mock = new HttpServerMock(); |
| 2156 api.InstancesResourceApi res = new api.SqladminApi(mock).instances; | 2156 api.InstancesResourceApi res = new api.SqladminApi(mock).instances; |
| 2157 var arg_request = buildInstancesImportRequest(); | 2157 var arg_request = buildInstancesImportRequest(); |
| 2158 var arg_project = "foo"; | 2158 var arg_project = "foo"; |
| 2159 var arg_instance = "foo"; | 2159 var arg_instance = "foo"; |
| 2160 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2160 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 2161 var obj = new api.InstancesImportRequest.fromJson(json); | 2161 var obj = new api.InstancesImportRequest.fromJson(json); |
| 2162 checkInstancesImportRequest(obj); | 2162 checkInstancesImportRequest(obj); |
| 2163 | 2163 |
| 2164 var path = (req.url).path; | 2164 var path = (req.url).path; |
| 2165 var pathOffset = 0; | 2165 var pathOffset = 0; |
| 2166 var index; | 2166 var index; |
| 2167 var subPart; | 2167 var subPart; |
| 2168 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2168 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2169 pathOffset += 1; | 2169 pathOffset += 1; |
| 2170 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta3/")); | 2170 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta3/")); |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2203 } | 2203 } |
| 2204 } | 2204 } |
| 2205 | 2205 |
| 2206 | 2206 |
| 2207 var h = { | 2207 var h = { |
| 2208 "content-type" : "application/json; charset=utf-8", | 2208 "content-type" : "application/json; charset=utf-8", |
| 2209 }; | 2209 }; |
| 2210 var resp = convert.JSON.encode(buildInstancesImportResponse()); | 2210 var resp = convert.JSON.encode(buildInstancesImportResponse()); |
| 2211 return new async.Future.value(stringResponse(200, h, resp)); | 2211 return new async.Future.value(stringResponse(200, h, resp)); |
| 2212 }), true); | 2212 }), true); |
| 2213 res.import(arg_request, arg_project, arg_instance).then(unittest.expectAsy
nc(((api.InstancesImportResponse response) { | 2213 res.import(arg_request, arg_project, arg_instance).then(unittest.expectAsy
nc1(((api.InstancesImportResponse response) { |
| 2214 checkInstancesImportResponse(response); | 2214 checkInstancesImportResponse(response); |
| 2215 }))); | 2215 }))); |
| 2216 }); | 2216 }); |
| 2217 | 2217 |
| 2218 unittest.test("method--insert", () { | 2218 unittest.test("method--insert", () { |
| 2219 | 2219 |
| 2220 var mock = new HttpServerMock(); | 2220 var mock = new HttpServerMock(); |
| 2221 api.InstancesResourceApi res = new api.SqladminApi(mock).instances; | 2221 api.InstancesResourceApi res = new api.SqladminApi(mock).instances; |
| 2222 var arg_request = buildDatabaseInstance(); | 2222 var arg_request = buildDatabaseInstance(); |
| 2223 var arg_project = "foo"; | 2223 var arg_project = "foo"; |
| 2224 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2224 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 2225 var obj = new api.DatabaseInstance.fromJson(json); | 2225 var obj = new api.DatabaseInstance.fromJson(json); |
| 2226 checkDatabaseInstance(obj); | 2226 checkDatabaseInstance(obj); |
| 2227 | 2227 |
| 2228 var path = (req.url).path; | 2228 var path = (req.url).path; |
| 2229 var pathOffset = 0; | 2229 var pathOffset = 0; |
| 2230 var index; | 2230 var index; |
| 2231 var subPart; | 2231 var subPart; |
| 2232 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2232 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2233 pathOffset += 1; | 2233 pathOffset += 1; |
| 2234 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta3/")); | 2234 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta3/")); |
| (...skipping 25 matching lines...) Expand all Loading... |
| 2260 } | 2260 } |
| 2261 } | 2261 } |
| 2262 | 2262 |
| 2263 | 2263 |
| 2264 var h = { | 2264 var h = { |
| 2265 "content-type" : "application/json; charset=utf-8", | 2265 "content-type" : "application/json; charset=utf-8", |
| 2266 }; | 2266 }; |
| 2267 var resp = convert.JSON.encode(buildInstancesInsertResponse()); | 2267 var resp = convert.JSON.encode(buildInstancesInsertResponse()); |
| 2268 return new async.Future.value(stringResponse(200, h, resp)); | 2268 return new async.Future.value(stringResponse(200, h, resp)); |
| 2269 }), true); | 2269 }), true); |
| 2270 res.insert(arg_request, arg_project).then(unittest.expectAsync(((api.Insta
ncesInsertResponse response) { | 2270 res.insert(arg_request, arg_project).then(unittest.expectAsync1(((api.Inst
ancesInsertResponse response) { |
| 2271 checkInstancesInsertResponse(response); | 2271 checkInstancesInsertResponse(response); |
| 2272 }))); | 2272 }))); |
| 2273 }); | 2273 }); |
| 2274 | 2274 |
| 2275 unittest.test("method--list", () { | 2275 unittest.test("method--list", () { |
| 2276 | 2276 |
| 2277 var mock = new HttpServerMock(); | 2277 var mock = new HttpServerMock(); |
| 2278 api.InstancesResourceApi res = new api.SqladminApi(mock).instances; | 2278 api.InstancesResourceApi res = new api.SqladminApi(mock).instances; |
| 2279 var arg_project = "foo"; | 2279 var arg_project = "foo"; |
| 2280 var arg_maxResults = 42; | 2280 var arg_maxResults = 42; |
| 2281 var arg_pageToken = "foo"; | 2281 var arg_pageToken = "foo"; |
| 2282 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2282 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 2283 var path = (req.url).path; | 2283 var path = (req.url).path; |
| 2284 var pathOffset = 0; | 2284 var pathOffset = 0; |
| 2285 var index; | 2285 var index; |
| 2286 var subPart; | 2286 var subPart; |
| 2287 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2287 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2288 pathOffset += 1; | 2288 pathOffset += 1; |
| 2289 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta3/")); | 2289 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta3/")); |
| 2290 pathOffset += 12; | 2290 pathOffset += 12; |
| 2291 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("projects/")); | 2291 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("projects/")); |
| 2292 pathOffset += 9; | 2292 pathOffset += 9; |
| (...skipping 24 matching lines...) Expand all Loading... |
| 2317 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | 2317 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); |
| 2318 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 2318 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
| 2319 | 2319 |
| 2320 | 2320 |
| 2321 var h = { | 2321 var h = { |
| 2322 "content-type" : "application/json; charset=utf-8", | 2322 "content-type" : "application/json; charset=utf-8", |
| 2323 }; | 2323 }; |
| 2324 var resp = convert.JSON.encode(buildInstancesListResponse()); | 2324 var resp = convert.JSON.encode(buildInstancesListResponse()); |
| 2325 return new async.Future.value(stringResponse(200, h, resp)); | 2325 return new async.Future.value(stringResponse(200, h, resp)); |
| 2326 }), true); | 2326 }), true); |
| 2327 res.list(arg_project, maxResults: arg_maxResults, pageToken: arg_pageToken
).then(unittest.expectAsync(((api.InstancesListResponse response) { | 2327 res.list(arg_project, maxResults: arg_maxResults, pageToken: arg_pageToken
).then(unittest.expectAsync1(((api.InstancesListResponse response) { |
| 2328 checkInstancesListResponse(response); | 2328 checkInstancesListResponse(response); |
| 2329 }))); | 2329 }))); |
| 2330 }); | 2330 }); |
| 2331 | 2331 |
| 2332 unittest.test("method--patch", () { | 2332 unittest.test("method--patch", () { |
| 2333 | 2333 |
| 2334 var mock = new HttpServerMock(); | 2334 var mock = new HttpServerMock(); |
| 2335 api.InstancesResourceApi res = new api.SqladminApi(mock).instances; | 2335 api.InstancesResourceApi res = new api.SqladminApi(mock).instances; |
| 2336 var arg_request = buildDatabaseInstance(); | 2336 var arg_request = buildDatabaseInstance(); |
| 2337 var arg_project = "foo"; | 2337 var arg_project = "foo"; |
| 2338 var arg_instance = "foo"; | 2338 var arg_instance = "foo"; |
| 2339 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2339 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 2340 var obj = new api.DatabaseInstance.fromJson(json); | 2340 var obj = new api.DatabaseInstance.fromJson(json); |
| 2341 checkDatabaseInstance(obj); | 2341 checkDatabaseInstance(obj); |
| 2342 | 2342 |
| 2343 var path = (req.url).path; | 2343 var path = (req.url).path; |
| 2344 var pathOffset = 0; | 2344 var pathOffset = 0; |
| 2345 var index; | 2345 var index; |
| 2346 var subPart; | 2346 var subPart; |
| 2347 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2347 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2348 pathOffset += 1; | 2348 pathOffset += 1; |
| 2349 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta3/")); | 2349 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta3/")); |
| (...skipping 28 matching lines...) Expand all Loading... |
| 2378 } | 2378 } |
| 2379 } | 2379 } |
| 2380 | 2380 |
| 2381 | 2381 |
| 2382 var h = { | 2382 var h = { |
| 2383 "content-type" : "application/json; charset=utf-8", | 2383 "content-type" : "application/json; charset=utf-8", |
| 2384 }; | 2384 }; |
| 2385 var resp = convert.JSON.encode(buildInstancesUpdateResponse()); | 2385 var resp = convert.JSON.encode(buildInstancesUpdateResponse()); |
| 2386 return new async.Future.value(stringResponse(200, h, resp)); | 2386 return new async.Future.value(stringResponse(200, h, resp)); |
| 2387 }), true); | 2387 }), true); |
| 2388 res.patch(arg_request, arg_project, arg_instance).then(unittest.expectAsyn
c(((api.InstancesUpdateResponse response) { | 2388 res.patch(arg_request, arg_project, arg_instance).then(unittest.expectAsyn
c1(((api.InstancesUpdateResponse response) { |
| 2389 checkInstancesUpdateResponse(response); | 2389 checkInstancesUpdateResponse(response); |
| 2390 }))); | 2390 }))); |
| 2391 }); | 2391 }); |
| 2392 | 2392 |
| 2393 unittest.test("method--promoteReplica", () { | 2393 unittest.test("method--promoteReplica", () { |
| 2394 | 2394 |
| 2395 var mock = new HttpServerMock(); | 2395 var mock = new HttpServerMock(); |
| 2396 api.InstancesResourceApi res = new api.SqladminApi(mock).instances; | 2396 api.InstancesResourceApi res = new api.SqladminApi(mock).instances; |
| 2397 var arg_project = "foo"; | 2397 var arg_project = "foo"; |
| 2398 var arg_instance = "foo"; | 2398 var arg_instance = "foo"; |
| 2399 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2399 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 2400 var path = (req.url).path; | 2400 var path = (req.url).path; |
| 2401 var pathOffset = 0; | 2401 var pathOffset = 0; |
| 2402 var index; | 2402 var index; |
| 2403 var subPart; | 2403 var subPart; |
| 2404 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2404 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2405 pathOffset += 1; | 2405 pathOffset += 1; |
| 2406 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta3/")); | 2406 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta3/")); |
| 2407 pathOffset += 12; | 2407 pathOffset += 12; |
| 2408 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("projects/")); | 2408 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("projects/")); |
| 2409 pathOffset += 9; | 2409 pathOffset += 9; |
| (...skipping 29 matching lines...) Expand all Loading... |
| 2439 } | 2439 } |
| 2440 } | 2440 } |
| 2441 | 2441 |
| 2442 | 2442 |
| 2443 var h = { | 2443 var h = { |
| 2444 "content-type" : "application/json; charset=utf-8", | 2444 "content-type" : "application/json; charset=utf-8", |
| 2445 }; | 2445 }; |
| 2446 var resp = convert.JSON.encode(buildInstancesPromoteReplicaResponse()); | 2446 var resp = convert.JSON.encode(buildInstancesPromoteReplicaResponse()); |
| 2447 return new async.Future.value(stringResponse(200, h, resp)); | 2447 return new async.Future.value(stringResponse(200, h, resp)); |
| 2448 }), true); | 2448 }), true); |
| 2449 res.promoteReplica(arg_project, arg_instance).then(unittest.expectAsync(((
api.InstancesPromoteReplicaResponse response) { | 2449 res.promoteReplica(arg_project, arg_instance).then(unittest.expectAsync1((
(api.InstancesPromoteReplicaResponse response) { |
| 2450 checkInstancesPromoteReplicaResponse(response); | 2450 checkInstancesPromoteReplicaResponse(response); |
| 2451 }))); | 2451 }))); |
| 2452 }); | 2452 }); |
| 2453 | 2453 |
| 2454 unittest.test("method--resetSslConfig", () { | 2454 unittest.test("method--resetSslConfig", () { |
| 2455 | 2455 |
| 2456 var mock = new HttpServerMock(); | 2456 var mock = new HttpServerMock(); |
| 2457 api.InstancesResourceApi res = new api.SqladminApi(mock).instances; | 2457 api.InstancesResourceApi res = new api.SqladminApi(mock).instances; |
| 2458 var arg_project = "foo"; | 2458 var arg_project = "foo"; |
| 2459 var arg_instance = "foo"; | 2459 var arg_instance = "foo"; |
| 2460 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2460 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 2461 var path = (req.url).path; | 2461 var path = (req.url).path; |
| 2462 var pathOffset = 0; | 2462 var pathOffset = 0; |
| 2463 var index; | 2463 var index; |
| 2464 var subPart; | 2464 var subPart; |
| 2465 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2465 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2466 pathOffset += 1; | 2466 pathOffset += 1; |
| 2467 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta3/")); | 2467 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta3/")); |
| 2468 pathOffset += 12; | 2468 pathOffset += 12; |
| 2469 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("projects/")); | 2469 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("projects/")); |
| 2470 pathOffset += 9; | 2470 pathOffset += 9; |
| (...skipping 29 matching lines...) Expand all Loading... |
| 2500 } | 2500 } |
| 2501 } | 2501 } |
| 2502 | 2502 |
| 2503 | 2503 |
| 2504 var h = { | 2504 var h = { |
| 2505 "content-type" : "application/json; charset=utf-8", | 2505 "content-type" : "application/json; charset=utf-8", |
| 2506 }; | 2506 }; |
| 2507 var resp = convert.JSON.encode(buildInstancesResetSslConfigResponse()); | 2507 var resp = convert.JSON.encode(buildInstancesResetSslConfigResponse()); |
| 2508 return new async.Future.value(stringResponse(200, h, resp)); | 2508 return new async.Future.value(stringResponse(200, h, resp)); |
| 2509 }), true); | 2509 }), true); |
| 2510 res.resetSslConfig(arg_project, arg_instance).then(unittest.expectAsync(((
api.InstancesResetSslConfigResponse response) { | 2510 res.resetSslConfig(arg_project, arg_instance).then(unittest.expectAsync1((
(api.InstancesResetSslConfigResponse response) { |
| 2511 checkInstancesResetSslConfigResponse(response); | 2511 checkInstancesResetSslConfigResponse(response); |
| 2512 }))); | 2512 }))); |
| 2513 }); | 2513 }); |
| 2514 | 2514 |
| 2515 unittest.test("method--restart", () { | 2515 unittest.test("method--restart", () { |
| 2516 | 2516 |
| 2517 var mock = new HttpServerMock(); | 2517 var mock = new HttpServerMock(); |
| 2518 api.InstancesResourceApi res = new api.SqladminApi(mock).instances; | 2518 api.InstancesResourceApi res = new api.SqladminApi(mock).instances; |
| 2519 var arg_project = "foo"; | 2519 var arg_project = "foo"; |
| 2520 var arg_instance = "foo"; | 2520 var arg_instance = "foo"; |
| 2521 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2521 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 2522 var path = (req.url).path; | 2522 var path = (req.url).path; |
| 2523 var pathOffset = 0; | 2523 var pathOffset = 0; |
| 2524 var index; | 2524 var index; |
| 2525 var subPart; | 2525 var subPart; |
| 2526 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2526 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2527 pathOffset += 1; | 2527 pathOffset += 1; |
| 2528 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta3/")); | 2528 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta3/")); |
| 2529 pathOffset += 12; | 2529 pathOffset += 12; |
| 2530 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("projects/")); | 2530 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("projects/")); |
| 2531 pathOffset += 9; | 2531 pathOffset += 9; |
| (...skipping 29 matching lines...) Expand all Loading... |
| 2561 } | 2561 } |
| 2562 } | 2562 } |
| 2563 | 2563 |
| 2564 | 2564 |
| 2565 var h = { | 2565 var h = { |
| 2566 "content-type" : "application/json; charset=utf-8", | 2566 "content-type" : "application/json; charset=utf-8", |
| 2567 }; | 2567 }; |
| 2568 var resp = convert.JSON.encode(buildInstancesRestartResponse()); | 2568 var resp = convert.JSON.encode(buildInstancesRestartResponse()); |
| 2569 return new async.Future.value(stringResponse(200, h, resp)); | 2569 return new async.Future.value(stringResponse(200, h, resp)); |
| 2570 }), true); | 2570 }), true); |
| 2571 res.restart(arg_project, arg_instance).then(unittest.expectAsync(((api.Ins
tancesRestartResponse response) { | 2571 res.restart(arg_project, arg_instance).then(unittest.expectAsync1(((api.In
stancesRestartResponse response) { |
| 2572 checkInstancesRestartResponse(response); | 2572 checkInstancesRestartResponse(response); |
| 2573 }))); | 2573 }))); |
| 2574 }); | 2574 }); |
| 2575 | 2575 |
| 2576 unittest.test("method--restoreBackup", () { | 2576 unittest.test("method--restoreBackup", () { |
| 2577 | 2577 |
| 2578 var mock = new HttpServerMock(); | 2578 var mock = new HttpServerMock(); |
| 2579 api.InstancesResourceApi res = new api.SqladminApi(mock).instances; | 2579 api.InstancesResourceApi res = new api.SqladminApi(mock).instances; |
| 2580 var arg_project = "foo"; | 2580 var arg_project = "foo"; |
| 2581 var arg_instance = "foo"; | 2581 var arg_instance = "foo"; |
| 2582 var arg_backupConfiguration = "foo"; | 2582 var arg_backupConfiguration = "foo"; |
| 2583 var arg_dueTime = "foo"; | 2583 var arg_dueTime = "foo"; |
| 2584 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2584 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 2585 var path = (req.url).path; | 2585 var path = (req.url).path; |
| 2586 var pathOffset = 0; | 2586 var pathOffset = 0; |
| 2587 var index; | 2587 var index; |
| 2588 var subPart; | 2588 var subPart; |
| 2589 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2589 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2590 pathOffset += 1; | 2590 pathOffset += 1; |
| 2591 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta3/")); | 2591 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta3/")); |
| 2592 pathOffset += 12; | 2592 pathOffset += 12; |
| 2593 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("projects/")); | 2593 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("projects/")); |
| 2594 pathOffset += 9; | 2594 pathOffset += 9; |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2626 unittest.expect(queryMap["backupConfiguration"].first, unittest.equals(a
rg_backupConfiguration)); | 2626 unittest.expect(queryMap["backupConfiguration"].first, unittest.equals(a
rg_backupConfiguration)); |
| 2627 unittest.expect(queryMap["dueTime"].first, unittest.equals(arg_dueTime))
; | 2627 unittest.expect(queryMap["dueTime"].first, unittest.equals(arg_dueTime))
; |
| 2628 | 2628 |
| 2629 | 2629 |
| 2630 var h = { | 2630 var h = { |
| 2631 "content-type" : "application/json; charset=utf-8", | 2631 "content-type" : "application/json; charset=utf-8", |
| 2632 }; | 2632 }; |
| 2633 var resp = convert.JSON.encode(buildInstancesRestoreBackupResponse()); | 2633 var resp = convert.JSON.encode(buildInstancesRestoreBackupResponse()); |
| 2634 return new async.Future.value(stringResponse(200, h, resp)); | 2634 return new async.Future.value(stringResponse(200, h, resp)); |
| 2635 }), true); | 2635 }), true); |
| 2636 res.restoreBackup(arg_project, arg_instance, arg_backupConfiguration, arg_
dueTime).then(unittest.expectAsync(((api.InstancesRestoreBackupResponse response
) { | 2636 res.restoreBackup(arg_project, arg_instance, arg_backupConfiguration, arg_
dueTime).then(unittest.expectAsync1(((api.InstancesRestoreBackupResponse respons
e) { |
| 2637 checkInstancesRestoreBackupResponse(response); | 2637 checkInstancesRestoreBackupResponse(response); |
| 2638 }))); | 2638 }))); |
| 2639 }); | 2639 }); |
| 2640 | 2640 |
| 2641 unittest.test("method--setRootPassword", () { | 2641 unittest.test("method--setRootPassword", () { |
| 2642 | 2642 |
| 2643 var mock = new HttpServerMock(); | 2643 var mock = new HttpServerMock(); |
| 2644 api.InstancesResourceApi res = new api.SqladminApi(mock).instances; | 2644 api.InstancesResourceApi res = new api.SqladminApi(mock).instances; |
| 2645 var arg_request = buildInstanceSetRootPasswordRequest(); | 2645 var arg_request = buildInstanceSetRootPasswordRequest(); |
| 2646 var arg_project = "foo"; | 2646 var arg_project = "foo"; |
| 2647 var arg_instance = "foo"; | 2647 var arg_instance = "foo"; |
| 2648 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2648 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 2649 var obj = new api.InstanceSetRootPasswordRequest.fromJson(json); | 2649 var obj = new api.InstanceSetRootPasswordRequest.fromJson(json); |
| 2650 checkInstanceSetRootPasswordRequest(obj); | 2650 checkInstanceSetRootPasswordRequest(obj); |
| 2651 | 2651 |
| 2652 var path = (req.url).path; | 2652 var path = (req.url).path; |
| 2653 var pathOffset = 0; | 2653 var pathOffset = 0; |
| 2654 var index; | 2654 var index; |
| 2655 var subPart; | 2655 var subPart; |
| 2656 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2656 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2657 pathOffset += 1; | 2657 pathOffset += 1; |
| 2658 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta3/")); | 2658 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta3/")); |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2691 } | 2691 } |
| 2692 } | 2692 } |
| 2693 | 2693 |
| 2694 | 2694 |
| 2695 var h = { | 2695 var h = { |
| 2696 "content-type" : "application/json; charset=utf-8", | 2696 "content-type" : "application/json; charset=utf-8", |
| 2697 }; | 2697 }; |
| 2698 var resp = convert.JSON.encode(buildInstancesSetRootPasswordResponse()); | 2698 var resp = convert.JSON.encode(buildInstancesSetRootPasswordResponse()); |
| 2699 return new async.Future.value(stringResponse(200, h, resp)); | 2699 return new async.Future.value(stringResponse(200, h, resp)); |
| 2700 }), true); | 2700 }), true); |
| 2701 res.setRootPassword(arg_request, arg_project, arg_instance).then(unittest.
expectAsync(((api.InstancesSetRootPasswordResponse response) { | 2701 res.setRootPassword(arg_request, arg_project, arg_instance).then(unittest.
expectAsync1(((api.InstancesSetRootPasswordResponse response) { |
| 2702 checkInstancesSetRootPasswordResponse(response); | 2702 checkInstancesSetRootPasswordResponse(response); |
| 2703 }))); | 2703 }))); |
| 2704 }); | 2704 }); |
| 2705 | 2705 |
| 2706 unittest.test("method--update", () { | 2706 unittest.test("method--update", () { |
| 2707 | 2707 |
| 2708 var mock = new HttpServerMock(); | 2708 var mock = new HttpServerMock(); |
| 2709 api.InstancesResourceApi res = new api.SqladminApi(mock).instances; | 2709 api.InstancesResourceApi res = new api.SqladminApi(mock).instances; |
| 2710 var arg_request = buildDatabaseInstance(); | 2710 var arg_request = buildDatabaseInstance(); |
| 2711 var arg_project = "foo"; | 2711 var arg_project = "foo"; |
| 2712 var arg_instance = "foo"; | 2712 var arg_instance = "foo"; |
| 2713 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2713 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 2714 var obj = new api.DatabaseInstance.fromJson(json); | 2714 var obj = new api.DatabaseInstance.fromJson(json); |
| 2715 checkDatabaseInstance(obj); | 2715 checkDatabaseInstance(obj); |
| 2716 | 2716 |
| 2717 var path = (req.url).path; | 2717 var path = (req.url).path; |
| 2718 var pathOffset = 0; | 2718 var pathOffset = 0; |
| 2719 var index; | 2719 var index; |
| 2720 var subPart; | 2720 var subPart; |
| 2721 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2721 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2722 pathOffset += 1; | 2722 pathOffset += 1; |
| 2723 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta3/")); | 2723 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta3/")); |
| (...skipping 28 matching lines...) Expand all Loading... |
| 2752 } | 2752 } |
| 2753 } | 2753 } |
| 2754 | 2754 |
| 2755 | 2755 |
| 2756 var h = { | 2756 var h = { |
| 2757 "content-type" : "application/json; charset=utf-8", | 2757 "content-type" : "application/json; charset=utf-8", |
| 2758 }; | 2758 }; |
| 2759 var resp = convert.JSON.encode(buildInstancesUpdateResponse()); | 2759 var resp = convert.JSON.encode(buildInstancesUpdateResponse()); |
| 2760 return new async.Future.value(stringResponse(200, h, resp)); | 2760 return new async.Future.value(stringResponse(200, h, resp)); |
| 2761 }), true); | 2761 }), true); |
| 2762 res.update(arg_request, arg_project, arg_instance).then(unittest.expectAsy
nc(((api.InstancesUpdateResponse response) { | 2762 res.update(arg_request, arg_project, arg_instance).then(unittest.expectAsy
nc1(((api.InstancesUpdateResponse response) { |
| 2763 checkInstancesUpdateResponse(response); | 2763 checkInstancesUpdateResponse(response); |
| 2764 }))); | 2764 }))); |
| 2765 }); | 2765 }); |
| 2766 | 2766 |
| 2767 }); | 2767 }); |
| 2768 | 2768 |
| 2769 | 2769 |
| 2770 unittest.group("resource-OperationsResourceApi", () { | 2770 unittest.group("resource-OperationsResourceApi", () { |
| 2771 unittest.test("method--get", () { | 2771 unittest.test("method--get", () { |
| 2772 | 2772 |
| 2773 var mock = new HttpServerMock(); | 2773 var mock = new HttpServerMock(); |
| 2774 api.OperationsResourceApi res = new api.SqladminApi(mock).operations; | 2774 api.OperationsResourceApi res = new api.SqladminApi(mock).operations; |
| 2775 var arg_project = "foo"; | 2775 var arg_project = "foo"; |
| 2776 var arg_instance = "foo"; | 2776 var arg_instance = "foo"; |
| 2777 var arg_operation = "foo"; | 2777 var arg_operation = "foo"; |
| 2778 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2778 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 2779 var path = (req.url).path; | 2779 var path = (req.url).path; |
| 2780 var pathOffset = 0; | 2780 var pathOffset = 0; |
| 2781 var index; | 2781 var index; |
| 2782 var subPart; | 2782 var subPart; |
| 2783 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2783 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2784 pathOffset += 1; | 2784 pathOffset += 1; |
| 2785 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta3/")); | 2785 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta3/")); |
| 2786 pathOffset += 12; | 2786 pathOffset += 12; |
| 2787 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("projects/")); | 2787 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("projects/")); |
| 2788 pathOffset += 9; | 2788 pathOffset += 9; |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2821 } | 2821 } |
| 2822 } | 2822 } |
| 2823 | 2823 |
| 2824 | 2824 |
| 2825 var h = { | 2825 var h = { |
| 2826 "content-type" : "application/json; charset=utf-8", | 2826 "content-type" : "application/json; charset=utf-8", |
| 2827 }; | 2827 }; |
| 2828 var resp = convert.JSON.encode(buildInstanceOperation()); | 2828 var resp = convert.JSON.encode(buildInstanceOperation()); |
| 2829 return new async.Future.value(stringResponse(200, h, resp)); | 2829 return new async.Future.value(stringResponse(200, h, resp)); |
| 2830 }), true); | 2830 }), true); |
| 2831 res.get(arg_project, arg_instance, arg_operation).then(unittest.expectAsyn
c(((api.InstanceOperation response) { | 2831 res.get(arg_project, arg_instance, arg_operation).then(unittest.expectAsyn
c1(((api.InstanceOperation response) { |
| 2832 checkInstanceOperation(response); | 2832 checkInstanceOperation(response); |
| 2833 }))); | 2833 }))); |
| 2834 }); | 2834 }); |
| 2835 | 2835 |
| 2836 unittest.test("method--list", () { | 2836 unittest.test("method--list", () { |
| 2837 | 2837 |
| 2838 var mock = new HttpServerMock(); | 2838 var mock = new HttpServerMock(); |
| 2839 api.OperationsResourceApi res = new api.SqladminApi(mock).operations; | 2839 api.OperationsResourceApi res = new api.SqladminApi(mock).operations; |
| 2840 var arg_project = "foo"; | 2840 var arg_project = "foo"; |
| 2841 var arg_instance = "foo"; | 2841 var arg_instance = "foo"; |
| 2842 var arg_maxResults = 42; | 2842 var arg_maxResults = 42; |
| 2843 var arg_pageToken = "foo"; | 2843 var arg_pageToken = "foo"; |
| 2844 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2844 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 2845 var path = (req.url).path; | 2845 var path = (req.url).path; |
| 2846 var pathOffset = 0; | 2846 var pathOffset = 0; |
| 2847 var index; | 2847 var index; |
| 2848 var subPart; | 2848 var subPart; |
| 2849 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2849 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2850 pathOffset += 1; | 2850 pathOffset += 1; |
| 2851 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta3/")); | 2851 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta3/")); |
| 2852 pathOffset += 12; | 2852 pathOffset += 12; |
| 2853 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("projects/")); | 2853 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("projects/")); |
| 2854 pathOffset += 9; | 2854 pathOffset += 9; |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2886 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | 2886 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); |
| 2887 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 2887 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
| 2888 | 2888 |
| 2889 | 2889 |
| 2890 var h = { | 2890 var h = { |
| 2891 "content-type" : "application/json; charset=utf-8", | 2891 "content-type" : "application/json; charset=utf-8", |
| 2892 }; | 2892 }; |
| 2893 var resp = convert.JSON.encode(buildOperationsListResponse()); | 2893 var resp = convert.JSON.encode(buildOperationsListResponse()); |
| 2894 return new async.Future.value(stringResponse(200, h, resp)); | 2894 return new async.Future.value(stringResponse(200, h, resp)); |
| 2895 }), true); | 2895 }), true); |
| 2896 res.list(arg_project, arg_instance, maxResults: arg_maxResults, pageToken:
arg_pageToken).then(unittest.expectAsync(((api.OperationsListResponse response)
{ | 2896 res.list(arg_project, arg_instance, maxResults: arg_maxResults, pageToken:
arg_pageToken).then(unittest.expectAsync1(((api.OperationsListResponse response
) { |
| 2897 checkOperationsListResponse(response); | 2897 checkOperationsListResponse(response); |
| 2898 }))); | 2898 }))); |
| 2899 }); | 2899 }); |
| 2900 | 2900 |
| 2901 }); | 2901 }); |
| 2902 | 2902 |
| 2903 | 2903 |
| 2904 unittest.group("resource-SslCertsResourceApi", () { | 2904 unittest.group("resource-SslCertsResourceApi", () { |
| 2905 unittest.test("method--delete", () { | 2905 unittest.test("method--delete", () { |
| 2906 | 2906 |
| 2907 var mock = new HttpServerMock(); | 2907 var mock = new HttpServerMock(); |
| 2908 api.SslCertsResourceApi res = new api.SqladminApi(mock).sslCerts; | 2908 api.SslCertsResourceApi res = new api.SqladminApi(mock).sslCerts; |
| 2909 var arg_project = "foo"; | 2909 var arg_project = "foo"; |
| 2910 var arg_instance = "foo"; | 2910 var arg_instance = "foo"; |
| 2911 var arg_sha1Fingerprint = "foo"; | 2911 var arg_sha1Fingerprint = "foo"; |
| 2912 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2912 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 2913 var path = (req.url).path; | 2913 var path = (req.url).path; |
| 2914 var pathOffset = 0; | 2914 var pathOffset = 0; |
| 2915 var index; | 2915 var index; |
| 2916 var subPart; | 2916 var subPart; |
| 2917 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2917 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2918 pathOffset += 1; | 2918 pathOffset += 1; |
| 2919 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta3/")); | 2919 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta3/")); |
| 2920 pathOffset += 12; | 2920 pathOffset += 12; |
| 2921 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("projects/")); | 2921 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("projects/")); |
| 2922 pathOffset += 9; | 2922 pathOffset += 9; |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2955 } | 2955 } |
| 2956 } | 2956 } |
| 2957 | 2957 |
| 2958 | 2958 |
| 2959 var h = { | 2959 var h = { |
| 2960 "content-type" : "application/json; charset=utf-8", | 2960 "content-type" : "application/json; charset=utf-8", |
| 2961 }; | 2961 }; |
| 2962 var resp = convert.JSON.encode(buildSslCertsDeleteResponse()); | 2962 var resp = convert.JSON.encode(buildSslCertsDeleteResponse()); |
| 2963 return new async.Future.value(stringResponse(200, h, resp)); | 2963 return new async.Future.value(stringResponse(200, h, resp)); |
| 2964 }), true); | 2964 }), true); |
| 2965 res.delete(arg_project, arg_instance, arg_sha1Fingerprint).then(unittest.e
xpectAsync(((api.SslCertsDeleteResponse response) { | 2965 res.delete(arg_project, arg_instance, arg_sha1Fingerprint).then(unittest.e
xpectAsync1(((api.SslCertsDeleteResponse response) { |
| 2966 checkSslCertsDeleteResponse(response); | 2966 checkSslCertsDeleteResponse(response); |
| 2967 }))); | 2967 }))); |
| 2968 }); | 2968 }); |
| 2969 | 2969 |
| 2970 unittest.test("method--get", () { | 2970 unittest.test("method--get", () { |
| 2971 | 2971 |
| 2972 var mock = new HttpServerMock(); | 2972 var mock = new HttpServerMock(); |
| 2973 api.SslCertsResourceApi res = new api.SqladminApi(mock).sslCerts; | 2973 api.SslCertsResourceApi res = new api.SqladminApi(mock).sslCerts; |
| 2974 var arg_project = "foo"; | 2974 var arg_project = "foo"; |
| 2975 var arg_instance = "foo"; | 2975 var arg_instance = "foo"; |
| 2976 var arg_sha1Fingerprint = "foo"; | 2976 var arg_sha1Fingerprint = "foo"; |
| 2977 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2977 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 2978 var path = (req.url).path; | 2978 var path = (req.url).path; |
| 2979 var pathOffset = 0; | 2979 var pathOffset = 0; |
| 2980 var index; | 2980 var index; |
| 2981 var subPart; | 2981 var subPart; |
| 2982 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2982 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2983 pathOffset += 1; | 2983 pathOffset += 1; |
| 2984 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta3/")); | 2984 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta3/")); |
| 2985 pathOffset += 12; | 2985 pathOffset += 12; |
| 2986 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("projects/")); | 2986 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("projects/")); |
| 2987 pathOffset += 9; | 2987 pathOffset += 9; |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3020 } | 3020 } |
| 3021 } | 3021 } |
| 3022 | 3022 |
| 3023 | 3023 |
| 3024 var h = { | 3024 var h = { |
| 3025 "content-type" : "application/json; charset=utf-8", | 3025 "content-type" : "application/json; charset=utf-8", |
| 3026 }; | 3026 }; |
| 3027 var resp = convert.JSON.encode(buildSslCert()); | 3027 var resp = convert.JSON.encode(buildSslCert()); |
| 3028 return new async.Future.value(stringResponse(200, h, resp)); | 3028 return new async.Future.value(stringResponse(200, h, resp)); |
| 3029 }), true); | 3029 }), true); |
| 3030 res.get(arg_project, arg_instance, arg_sha1Fingerprint).then(unittest.expe
ctAsync(((api.SslCert response) { | 3030 res.get(arg_project, arg_instance, arg_sha1Fingerprint).then(unittest.expe
ctAsync1(((api.SslCert response) { |
| 3031 checkSslCert(response); | 3031 checkSslCert(response); |
| 3032 }))); | 3032 }))); |
| 3033 }); | 3033 }); |
| 3034 | 3034 |
| 3035 unittest.test("method--insert", () { | 3035 unittest.test("method--insert", () { |
| 3036 | 3036 |
| 3037 var mock = new HttpServerMock(); | 3037 var mock = new HttpServerMock(); |
| 3038 api.SslCertsResourceApi res = new api.SqladminApi(mock).sslCerts; | 3038 api.SslCertsResourceApi res = new api.SqladminApi(mock).sslCerts; |
| 3039 var arg_request = buildSslCertsInsertRequest(); | 3039 var arg_request = buildSslCertsInsertRequest(); |
| 3040 var arg_project = "foo"; | 3040 var arg_project = "foo"; |
| 3041 var arg_instance = "foo"; | 3041 var arg_instance = "foo"; |
| 3042 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3042 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 3043 var obj = new api.SslCertsInsertRequest.fromJson(json); | 3043 var obj = new api.SslCertsInsertRequest.fromJson(json); |
| 3044 checkSslCertsInsertRequest(obj); | 3044 checkSslCertsInsertRequest(obj); |
| 3045 | 3045 |
| 3046 var path = (req.url).path; | 3046 var path = (req.url).path; |
| 3047 var pathOffset = 0; | 3047 var pathOffset = 0; |
| 3048 var index; | 3048 var index; |
| 3049 var subPart; | 3049 var subPart; |
| 3050 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3050 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 3051 pathOffset += 1; | 3051 pathOffset += 1; |
| 3052 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta3/")); | 3052 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta3/")); |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3085 } | 3085 } |
| 3086 } | 3086 } |
| 3087 | 3087 |
| 3088 | 3088 |
| 3089 var h = { | 3089 var h = { |
| 3090 "content-type" : "application/json; charset=utf-8", | 3090 "content-type" : "application/json; charset=utf-8", |
| 3091 }; | 3091 }; |
| 3092 var resp = convert.JSON.encode(buildSslCertsInsertResponse()); | 3092 var resp = convert.JSON.encode(buildSslCertsInsertResponse()); |
| 3093 return new async.Future.value(stringResponse(200, h, resp)); | 3093 return new async.Future.value(stringResponse(200, h, resp)); |
| 3094 }), true); | 3094 }), true); |
| 3095 res.insert(arg_request, arg_project, arg_instance).then(unittest.expectAsy
nc(((api.SslCertsInsertResponse response) { | 3095 res.insert(arg_request, arg_project, arg_instance).then(unittest.expectAsy
nc1(((api.SslCertsInsertResponse response) { |
| 3096 checkSslCertsInsertResponse(response); | 3096 checkSslCertsInsertResponse(response); |
| 3097 }))); | 3097 }))); |
| 3098 }); | 3098 }); |
| 3099 | 3099 |
| 3100 unittest.test("method--list", () { | 3100 unittest.test("method--list", () { |
| 3101 | 3101 |
| 3102 var mock = new HttpServerMock(); | 3102 var mock = new HttpServerMock(); |
| 3103 api.SslCertsResourceApi res = new api.SqladminApi(mock).sslCerts; | 3103 api.SslCertsResourceApi res = new api.SqladminApi(mock).sslCerts; |
| 3104 var arg_project = "foo"; | 3104 var arg_project = "foo"; |
| 3105 var arg_instance = "foo"; | 3105 var arg_instance = "foo"; |
| 3106 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3106 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 3107 var path = (req.url).path; | 3107 var path = (req.url).path; |
| 3108 var pathOffset = 0; | 3108 var pathOffset = 0; |
| 3109 var index; | 3109 var index; |
| 3110 var subPart; | 3110 var subPart; |
| 3111 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3111 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 3112 pathOffset += 1; | 3112 pathOffset += 1; |
| 3113 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta3/")); | 3113 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta3/")); |
| 3114 pathOffset += 12; | 3114 pathOffset += 12; |
| 3115 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("projects/")); | 3115 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("projects/")); |
| 3116 pathOffset += 9; | 3116 pathOffset += 9; |
| (...skipping 29 matching lines...) Expand all Loading... |
| 3146 } | 3146 } |
| 3147 } | 3147 } |
| 3148 | 3148 |
| 3149 | 3149 |
| 3150 var h = { | 3150 var h = { |
| 3151 "content-type" : "application/json; charset=utf-8", | 3151 "content-type" : "application/json; charset=utf-8", |
| 3152 }; | 3152 }; |
| 3153 var resp = convert.JSON.encode(buildSslCertsListResponse()); | 3153 var resp = convert.JSON.encode(buildSslCertsListResponse()); |
| 3154 return new async.Future.value(stringResponse(200, h, resp)); | 3154 return new async.Future.value(stringResponse(200, h, resp)); |
| 3155 }), true); | 3155 }), true); |
| 3156 res.list(arg_project, arg_instance).then(unittest.expectAsync(((api.SslCer
tsListResponse response) { | 3156 res.list(arg_project, arg_instance).then(unittest.expectAsync1(((api.SslCe
rtsListResponse response) { |
| 3157 checkSslCertsListResponse(response); | 3157 checkSslCertsListResponse(response); |
| 3158 }))); | 3158 }))); |
| 3159 }); | 3159 }); |
| 3160 | 3160 |
| 3161 }); | 3161 }); |
| 3162 | 3162 |
| 3163 | 3163 |
| 3164 unittest.group("resource-TiersResourceApi", () { | 3164 unittest.group("resource-TiersResourceApi", () { |
| 3165 unittest.test("method--list", () { | 3165 unittest.test("method--list", () { |
| 3166 | 3166 |
| 3167 var mock = new HttpServerMock(); | 3167 var mock = new HttpServerMock(); |
| 3168 api.TiersResourceApi res = new api.SqladminApi(mock).tiers; | 3168 api.TiersResourceApi res = new api.SqladminApi(mock).tiers; |
| 3169 var arg_project = "foo"; | 3169 var arg_project = "foo"; |
| 3170 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3170 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 3171 var path = (req.url).path; | 3171 var path = (req.url).path; |
| 3172 var pathOffset = 0; | 3172 var pathOffset = 0; |
| 3173 var index; | 3173 var index; |
| 3174 var subPart; | 3174 var subPart; |
| 3175 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3175 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 3176 pathOffset += 1; | 3176 pathOffset += 1; |
| 3177 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta3/")); | 3177 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta3/")); |
| 3178 pathOffset += 12; | 3178 pathOffset += 12; |
| 3179 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("projects/")); | 3179 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("projects/")); |
| 3180 pathOffset += 9; | 3180 pathOffset += 9; |
| (...skipping 22 matching lines...) Expand all Loading... |
| 3203 } | 3203 } |
| 3204 } | 3204 } |
| 3205 | 3205 |
| 3206 | 3206 |
| 3207 var h = { | 3207 var h = { |
| 3208 "content-type" : "application/json; charset=utf-8", | 3208 "content-type" : "application/json; charset=utf-8", |
| 3209 }; | 3209 }; |
| 3210 var resp = convert.JSON.encode(buildTiersListResponse()); | 3210 var resp = convert.JSON.encode(buildTiersListResponse()); |
| 3211 return new async.Future.value(stringResponse(200, h, resp)); | 3211 return new async.Future.value(stringResponse(200, h, resp)); |
| 3212 }), true); | 3212 }), true); |
| 3213 res.list(arg_project).then(unittest.expectAsync(((api.TiersListResponse re
sponse) { | 3213 res.list(arg_project).then(unittest.expectAsync1(((api.TiersListResponse r
esponse) { |
| 3214 checkTiersListResponse(response); | 3214 checkTiersListResponse(response); |
| 3215 }))); | 3215 }))); |
| 3216 }); | 3216 }); |
| 3217 | 3217 |
| 3218 }); | 3218 }); |
| 3219 | 3219 |
| 3220 | 3220 |
| 3221 } | 3221 } |
| 3222 | 3222 |
| OLD | NEW |