OLD | NEW |
1 library googleapis_beta.sqladmin.v1beta4.test; | 1 library googleapis_beta.sqladmin.v1beta4.test; |
2 | 2 |
3 import "dart:core" as core; | 3 import "dart:core" as core; |
4 import "dart:collection" as collection; | 4 import "dart:collection" as collection; |
5 import "dart:async" as async; | 5 import "dart:async" as async; |
6 import "dart:convert" as convert; | 6 import "dart:convert" as convert; |
7 | 7 |
8 import 'package:http/http.dart' as http; | 8 import 'package:http/http.dart' as http; |
9 import 'package:http/testing.dart' as http_testing; | 9 import 'package:http/testing.dart' as http_testing; |
10 import 'package:unittest/unittest.dart' as unittest; | 10 import 'package:unittest/unittest.dart' as unittest; |
11 import 'package:googleapis_beta/common/common.dart' as common; | |
12 import 'package:googleapis_beta/src/common_internal.dart' as common_internal; | |
13 import '../common/common_internal_test.dart' as common_test; | |
14 | 11 |
15 import 'package:googleapis_beta/sqladmin/v1beta4.dart' as api; | 12 import 'package:googleapis_beta/sqladmin/v1beta4.dart' as api; |
16 | 13 |
| 14 class HttpServerMock extends http.BaseClient { |
| 15 core.Function _callback; |
| 16 core.bool _expectJson; |
17 | 17 |
| 18 void register(core.Function callback, core.bool expectJson) { |
| 19 _callback = callback; |
| 20 _expectJson = expectJson; |
| 21 } |
| 22 |
| 23 async.Future<http.StreamedResponse> send(http.BaseRequest request) { |
| 24 if (_expectJson) { |
| 25 return request.finalize() |
| 26 .transform(convert.UTF8.decoder) |
| 27 .join('') |
| 28 .then((core.String jsonString) { |
| 29 if (jsonString.isEmpty) { |
| 30 return _callback(request, null); |
| 31 } else { |
| 32 return _callback(request, convert.JSON.decode(jsonString)); |
| 33 } |
| 34 }); |
| 35 } else { |
| 36 var stream = request.finalize(); |
| 37 if (stream == null) { |
| 38 return _callback(request, []); |
| 39 } else { |
| 40 return stream.toBytes().then((data) { |
| 41 return _callback(request, data); |
| 42 }); |
| 43 } |
| 44 } |
| 45 } |
| 46 } |
| 47 |
| 48 http.StreamedResponse stringResponse( |
| 49 core.int status, core.Map headers, core.String body) { |
| 50 var stream = new async.Stream.fromIterable([convert.UTF8.encode(body)]); |
| 51 return new http.StreamedResponse(stream, status, headers: headers); |
| 52 } |
18 | 53 |
19 core.int buildCounterAclEntry = 0; | 54 core.int buildCounterAclEntry = 0; |
20 buildAclEntry() { | 55 buildAclEntry() { |
21 var o = new api.AclEntry(); | 56 var o = new api.AclEntry(); |
22 buildCounterAclEntry++; | 57 buildCounterAclEntry++; |
23 if (buildCounterAclEntry < 3) { | 58 if (buildCounterAclEntry < 3) { |
24 o.expirationTime = core.DateTime.parse("2002-02-27T14:01:02"); | 59 o.expirationTime = core.DateTime.parse("2002-02-27T14:01:02"); |
25 o.kind = "foo"; | 60 o.kind = "foo"; |
26 o.name = "foo"; | 61 o.name = "foo"; |
27 o.value = "foo"; | 62 o.value = "foo"; |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 unittest.expect(o.instance, unittest.equals('foo')); | 131 unittest.expect(o.instance, unittest.equals('foo')); |
97 unittest.expect(o.kind, unittest.equals('foo')); | 132 unittest.expect(o.kind, unittest.equals('foo')); |
98 unittest.expect(o.selfLink, unittest.equals('foo')); | 133 unittest.expect(o.selfLink, unittest.equals('foo')); |
99 unittest.expect(o.startTime, unittest.equals(core.DateTime.parse("2002-02-27
T14:01:02"))); | 134 unittest.expect(o.startTime, unittest.equals(core.DateTime.parse("2002-02-27
T14:01:02"))); |
100 unittest.expect(o.status, unittest.equals('foo')); | 135 unittest.expect(o.status, unittest.equals('foo')); |
101 unittest.expect(o.windowStartTime, unittest.equals(core.DateTime.parse("2002
-02-27T14:01:02"))); | 136 unittest.expect(o.windowStartTime, unittest.equals(core.DateTime.parse("2002
-02-27T14:01:02"))); |
102 } | 137 } |
103 buildCounterBackupRun--; | 138 buildCounterBackupRun--; |
104 } | 139 } |
105 | 140 |
106 buildUnnamed1643() { | 141 buildUnnamed1796() { |
107 var o = new core.List<api.BackupRun>(); | 142 var o = new core.List<api.BackupRun>(); |
108 o.add(buildBackupRun()); | 143 o.add(buildBackupRun()); |
109 o.add(buildBackupRun()); | 144 o.add(buildBackupRun()); |
110 return o; | 145 return o; |
111 } | 146 } |
112 | 147 |
113 checkUnnamed1643(core.List<api.BackupRun> o) { | 148 checkUnnamed1796(core.List<api.BackupRun> o) { |
114 unittest.expect(o, unittest.hasLength(2)); | 149 unittest.expect(o, unittest.hasLength(2)); |
115 checkBackupRun(o[0]); | 150 checkBackupRun(o[0]); |
116 checkBackupRun(o[1]); | 151 checkBackupRun(o[1]); |
117 } | 152 } |
118 | 153 |
119 core.int buildCounterBackupRunsListResponse = 0; | 154 core.int buildCounterBackupRunsListResponse = 0; |
120 buildBackupRunsListResponse() { | 155 buildBackupRunsListResponse() { |
121 var o = new api.BackupRunsListResponse(); | 156 var o = new api.BackupRunsListResponse(); |
122 buildCounterBackupRunsListResponse++; | 157 buildCounterBackupRunsListResponse++; |
123 if (buildCounterBackupRunsListResponse < 3) { | 158 if (buildCounterBackupRunsListResponse < 3) { |
124 o.items = buildUnnamed1643(); | 159 o.items = buildUnnamed1796(); |
125 o.kind = "foo"; | 160 o.kind = "foo"; |
126 o.nextPageToken = "foo"; | 161 o.nextPageToken = "foo"; |
127 } | 162 } |
128 buildCounterBackupRunsListResponse--; | 163 buildCounterBackupRunsListResponse--; |
129 return o; | 164 return o; |
130 } | 165 } |
131 | 166 |
132 checkBackupRunsListResponse(api.BackupRunsListResponse o) { | 167 checkBackupRunsListResponse(api.BackupRunsListResponse o) { |
133 buildCounterBackupRunsListResponse++; | 168 buildCounterBackupRunsListResponse++; |
134 if (buildCounterBackupRunsListResponse < 3) { | 169 if (buildCounterBackupRunsListResponse < 3) { |
135 checkUnnamed1643(o.items); | 170 checkUnnamed1796(o.items); |
136 unittest.expect(o.kind, unittest.equals('foo')); | 171 unittest.expect(o.kind, unittest.equals('foo')); |
137 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 172 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
138 } | 173 } |
139 buildCounterBackupRunsListResponse--; | 174 buildCounterBackupRunsListResponse--; |
140 } | 175 } |
141 | 176 |
142 core.int buildCounterBinLogCoordinates = 0; | 177 core.int buildCounterBinLogCoordinates = 0; |
143 buildBinLogCoordinates() { | 178 buildBinLogCoordinates() { |
144 var o = new api.BinLogCoordinates(); | 179 var o = new api.BinLogCoordinates(); |
145 buildCounterBinLogCoordinates++; | 180 buildCounterBinLogCoordinates++; |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
232 | 267 |
233 checkDatabaseFlags(api.DatabaseFlags o) { | 268 checkDatabaseFlags(api.DatabaseFlags o) { |
234 buildCounterDatabaseFlags++; | 269 buildCounterDatabaseFlags++; |
235 if (buildCounterDatabaseFlags < 3) { | 270 if (buildCounterDatabaseFlags < 3) { |
236 unittest.expect(o.name, unittest.equals('foo')); | 271 unittest.expect(o.name, unittest.equals('foo')); |
237 unittest.expect(o.value, unittest.equals('foo')); | 272 unittest.expect(o.value, unittest.equals('foo')); |
238 } | 273 } |
239 buildCounterDatabaseFlags--; | 274 buildCounterDatabaseFlags--; |
240 } | 275 } |
241 | 276 |
242 buildUnnamed1644() { | 277 buildUnnamed1797() { |
243 var o = new core.List<api.IpMapping>(); | 278 var o = new core.List<api.IpMapping>(); |
244 o.add(buildIpMapping()); | 279 o.add(buildIpMapping()); |
245 o.add(buildIpMapping()); | 280 o.add(buildIpMapping()); |
246 return o; | 281 return o; |
247 } | 282 } |
248 | 283 |
249 checkUnnamed1644(core.List<api.IpMapping> o) { | 284 checkUnnamed1797(core.List<api.IpMapping> o) { |
250 unittest.expect(o, unittest.hasLength(2)); | 285 unittest.expect(o, unittest.hasLength(2)); |
251 checkIpMapping(o[0]); | 286 checkIpMapping(o[0]); |
252 checkIpMapping(o[1]); | 287 checkIpMapping(o[1]); |
253 } | 288 } |
254 | 289 |
255 buildUnnamed1645() { | 290 buildUnnamed1798() { |
256 var o = new core.List<core.String>(); | 291 var o = new core.List<core.String>(); |
257 o.add("foo"); | 292 o.add("foo"); |
258 o.add("foo"); | 293 o.add("foo"); |
259 return o; | 294 return o; |
260 } | 295 } |
261 | 296 |
262 checkUnnamed1645(core.List<core.String> o) { | 297 checkUnnamed1798(core.List<core.String> o) { |
263 unittest.expect(o, unittest.hasLength(2)); | 298 unittest.expect(o, unittest.hasLength(2)); |
264 unittest.expect(o[0], unittest.equals('foo')); | 299 unittest.expect(o[0], unittest.equals('foo')); |
265 unittest.expect(o[1], unittest.equals('foo')); | 300 unittest.expect(o[1], unittest.equals('foo')); |
266 } | 301 } |
267 | 302 |
268 core.int buildCounterDatabaseInstance = 0; | 303 core.int buildCounterDatabaseInstance = 0; |
269 buildDatabaseInstance() { | 304 buildDatabaseInstance() { |
270 var o = new api.DatabaseInstance(); | 305 var o = new api.DatabaseInstance(); |
271 buildCounterDatabaseInstance++; | 306 buildCounterDatabaseInstance++; |
272 if (buildCounterDatabaseInstance < 3) { | 307 if (buildCounterDatabaseInstance < 3) { |
273 o.currentDiskSize = "foo"; | 308 o.currentDiskSize = "foo"; |
274 o.databaseVersion = "foo"; | 309 o.databaseVersion = "foo"; |
275 o.etag = "foo"; | 310 o.etag = "foo"; |
276 o.instanceType = "foo"; | 311 o.instanceType = "foo"; |
277 o.ipAddresses = buildUnnamed1644(); | 312 o.ipAddresses = buildUnnamed1797(); |
278 o.ipv6Address = "foo"; | 313 o.ipv6Address = "foo"; |
279 o.kind = "foo"; | 314 o.kind = "foo"; |
280 o.masterInstanceName = "foo"; | 315 o.masterInstanceName = "foo"; |
281 o.maxDiskSize = "foo"; | 316 o.maxDiskSize = "foo"; |
282 o.name = "foo"; | 317 o.name = "foo"; |
| 318 o.onPremisesConfiguration = buildOnPremisesConfiguration(); |
283 o.project = "foo"; | 319 o.project = "foo"; |
284 o.region = "foo"; | 320 o.region = "foo"; |
285 o.replicaNames = buildUnnamed1645(); | 321 o.replicaConfiguration = buildReplicaConfiguration(); |
| 322 o.replicaNames = buildUnnamed1798(); |
286 o.selfLink = "foo"; | 323 o.selfLink = "foo"; |
287 o.serverCaCert = buildSslCert(); | 324 o.serverCaCert = buildSslCert(); |
288 o.serviceAccountEmailAddress = "foo"; | 325 o.serviceAccountEmailAddress = "foo"; |
289 o.settings = buildSettings(); | 326 o.settings = buildSettings(); |
290 o.state = "foo"; | 327 o.state = "foo"; |
291 } | 328 } |
292 buildCounterDatabaseInstance--; | 329 buildCounterDatabaseInstance--; |
293 return o; | 330 return o; |
294 } | 331 } |
295 | 332 |
296 checkDatabaseInstance(api.DatabaseInstance o) { | 333 checkDatabaseInstance(api.DatabaseInstance o) { |
297 buildCounterDatabaseInstance++; | 334 buildCounterDatabaseInstance++; |
298 if (buildCounterDatabaseInstance < 3) { | 335 if (buildCounterDatabaseInstance < 3) { |
299 unittest.expect(o.currentDiskSize, unittest.equals('foo')); | 336 unittest.expect(o.currentDiskSize, unittest.equals('foo')); |
300 unittest.expect(o.databaseVersion, unittest.equals('foo')); | 337 unittest.expect(o.databaseVersion, unittest.equals('foo')); |
301 unittest.expect(o.etag, unittest.equals('foo')); | 338 unittest.expect(o.etag, unittest.equals('foo')); |
302 unittest.expect(o.instanceType, unittest.equals('foo')); | 339 unittest.expect(o.instanceType, unittest.equals('foo')); |
303 checkUnnamed1644(o.ipAddresses); | 340 checkUnnamed1797(o.ipAddresses); |
304 unittest.expect(o.ipv6Address, unittest.equals('foo')); | 341 unittest.expect(o.ipv6Address, unittest.equals('foo')); |
305 unittest.expect(o.kind, unittest.equals('foo')); | 342 unittest.expect(o.kind, unittest.equals('foo')); |
306 unittest.expect(o.masterInstanceName, unittest.equals('foo')); | 343 unittest.expect(o.masterInstanceName, unittest.equals('foo')); |
307 unittest.expect(o.maxDiskSize, unittest.equals('foo')); | 344 unittest.expect(o.maxDiskSize, unittest.equals('foo')); |
308 unittest.expect(o.name, unittest.equals('foo')); | 345 unittest.expect(o.name, unittest.equals('foo')); |
| 346 checkOnPremisesConfiguration(o.onPremisesConfiguration); |
309 unittest.expect(o.project, unittest.equals('foo')); | 347 unittest.expect(o.project, unittest.equals('foo')); |
310 unittest.expect(o.region, unittest.equals('foo')); | 348 unittest.expect(o.region, unittest.equals('foo')); |
311 checkUnnamed1645(o.replicaNames); | 349 checkReplicaConfiguration(o.replicaConfiguration); |
| 350 checkUnnamed1798(o.replicaNames); |
312 unittest.expect(o.selfLink, unittest.equals('foo')); | 351 unittest.expect(o.selfLink, unittest.equals('foo')); |
313 checkSslCert(o.serverCaCert); | 352 checkSslCert(o.serverCaCert); |
314 unittest.expect(o.serviceAccountEmailAddress, unittest.equals('foo')); | 353 unittest.expect(o.serviceAccountEmailAddress, unittest.equals('foo')); |
315 checkSettings(o.settings); | 354 checkSettings(o.settings); |
316 unittest.expect(o.state, unittest.equals('foo')); | 355 unittest.expect(o.state, unittest.equals('foo')); |
317 } | 356 } |
318 buildCounterDatabaseInstance--; | 357 buildCounterDatabaseInstance--; |
319 } | 358 } |
320 | 359 |
321 buildUnnamed1646() { | 360 buildUnnamed1799() { |
322 var o = new core.List<api.Database>(); | 361 var o = new core.List<api.Database>(); |
323 o.add(buildDatabase()); | 362 o.add(buildDatabase()); |
324 o.add(buildDatabase()); | 363 o.add(buildDatabase()); |
325 return o; | 364 return o; |
326 } | 365 } |
327 | 366 |
328 checkUnnamed1646(core.List<api.Database> o) { | 367 checkUnnamed1799(core.List<api.Database> o) { |
329 unittest.expect(o, unittest.hasLength(2)); | 368 unittest.expect(o, unittest.hasLength(2)); |
330 checkDatabase(o[0]); | 369 checkDatabase(o[0]); |
331 checkDatabase(o[1]); | 370 checkDatabase(o[1]); |
332 } | 371 } |
333 | 372 |
334 core.int buildCounterDatabasesListResponse = 0; | 373 core.int buildCounterDatabasesListResponse = 0; |
335 buildDatabasesListResponse() { | 374 buildDatabasesListResponse() { |
336 var o = new api.DatabasesListResponse(); | 375 var o = new api.DatabasesListResponse(); |
337 buildCounterDatabasesListResponse++; | 376 buildCounterDatabasesListResponse++; |
338 if (buildCounterDatabasesListResponse < 3) { | 377 if (buildCounterDatabasesListResponse < 3) { |
339 o.items = buildUnnamed1646(); | 378 o.items = buildUnnamed1799(); |
340 o.kind = "foo"; | 379 o.kind = "foo"; |
341 } | 380 } |
342 buildCounterDatabasesListResponse--; | 381 buildCounterDatabasesListResponse--; |
343 return o; | 382 return o; |
344 } | 383 } |
345 | 384 |
346 checkDatabasesListResponse(api.DatabasesListResponse o) { | 385 checkDatabasesListResponse(api.DatabasesListResponse o) { |
347 buildCounterDatabasesListResponse++; | 386 buildCounterDatabasesListResponse++; |
348 if (buildCounterDatabasesListResponse < 3) { | 387 if (buildCounterDatabasesListResponse < 3) { |
349 checkUnnamed1646(o.items); | 388 checkUnnamed1799(o.items); |
350 unittest.expect(o.kind, unittest.equals('foo')); | 389 unittest.expect(o.kind, unittest.equals('foo')); |
351 } | 390 } |
352 buildCounterDatabasesListResponse--; | 391 buildCounterDatabasesListResponse--; |
353 } | 392 } |
354 | 393 |
355 core.int buildCounterExportContextCsvExportOptions = 0; | 394 core.int buildCounterExportContextCsvExportOptions = 0; |
356 buildExportContextCsvExportOptions() { | 395 buildExportContextCsvExportOptions() { |
357 var o = new api.ExportContextCsvExportOptions(); | 396 var o = new api.ExportContextCsvExportOptions(); |
358 buildCounterExportContextCsvExportOptions++; | 397 buildCounterExportContextCsvExportOptions++; |
359 if (buildCounterExportContextCsvExportOptions < 3) { | 398 if (buildCounterExportContextCsvExportOptions < 3) { |
360 o.selectQuery = "foo"; | 399 o.selectQuery = "foo"; |
361 } | 400 } |
362 buildCounterExportContextCsvExportOptions--; | 401 buildCounterExportContextCsvExportOptions--; |
363 return o; | 402 return o; |
364 } | 403 } |
365 | 404 |
366 checkExportContextCsvExportOptions(api.ExportContextCsvExportOptions o) { | 405 checkExportContextCsvExportOptions(api.ExportContextCsvExportOptions o) { |
367 buildCounterExportContextCsvExportOptions++; | 406 buildCounterExportContextCsvExportOptions++; |
368 if (buildCounterExportContextCsvExportOptions < 3) { | 407 if (buildCounterExportContextCsvExportOptions < 3) { |
369 unittest.expect(o.selectQuery, unittest.equals('foo')); | 408 unittest.expect(o.selectQuery, unittest.equals('foo')); |
370 } | 409 } |
371 buildCounterExportContextCsvExportOptions--; | 410 buildCounterExportContextCsvExportOptions--; |
372 } | 411 } |
373 | 412 |
374 buildUnnamed1647() { | 413 buildUnnamed1800() { |
375 var o = new core.List<core.String>(); | 414 var o = new core.List<core.String>(); |
376 o.add("foo"); | 415 o.add("foo"); |
377 o.add("foo"); | 416 o.add("foo"); |
378 return o; | 417 return o; |
379 } | 418 } |
380 | 419 |
381 checkUnnamed1647(core.List<core.String> o) { | 420 checkUnnamed1800(core.List<core.String> o) { |
382 unittest.expect(o, unittest.hasLength(2)); | 421 unittest.expect(o, unittest.hasLength(2)); |
383 unittest.expect(o[0], unittest.equals('foo')); | 422 unittest.expect(o[0], unittest.equals('foo')); |
384 unittest.expect(o[1], unittest.equals('foo')); | 423 unittest.expect(o[1], unittest.equals('foo')); |
385 } | 424 } |
386 | 425 |
387 buildUnnamed1648() { | 426 buildUnnamed1801() { |
388 var o = new core.List<core.String>(); | 427 var o = new core.List<core.String>(); |
389 o.add("foo"); | 428 o.add("foo"); |
390 o.add("foo"); | 429 o.add("foo"); |
391 return o; | 430 return o; |
392 } | 431 } |
393 | 432 |
394 checkUnnamed1648(core.List<core.String> o) { | 433 checkUnnamed1801(core.List<core.String> o) { |
395 unittest.expect(o, unittest.hasLength(2)); | 434 unittest.expect(o, unittest.hasLength(2)); |
396 unittest.expect(o[0], unittest.equals('foo')); | 435 unittest.expect(o[0], unittest.equals('foo')); |
397 unittest.expect(o[1], unittest.equals('foo')); | 436 unittest.expect(o[1], unittest.equals('foo')); |
398 } | 437 } |
399 | 438 |
400 core.int buildCounterExportContextSqlExportOptions = 0; | 439 core.int buildCounterExportContextSqlExportOptions = 0; |
401 buildExportContextSqlExportOptions() { | 440 buildExportContextSqlExportOptions() { |
402 var o = new api.ExportContextSqlExportOptions(); | 441 var o = new api.ExportContextSqlExportOptions(); |
403 buildCounterExportContextSqlExportOptions++; | 442 buildCounterExportContextSqlExportOptions++; |
404 if (buildCounterExportContextSqlExportOptions < 3) { | 443 if (buildCounterExportContextSqlExportOptions < 3) { |
405 o.tables = buildUnnamed1648(); | 444 o.tables = buildUnnamed1801(); |
406 } | 445 } |
407 buildCounterExportContextSqlExportOptions--; | 446 buildCounterExportContextSqlExportOptions--; |
408 return o; | 447 return o; |
409 } | 448 } |
410 | 449 |
411 checkExportContextSqlExportOptions(api.ExportContextSqlExportOptions o) { | 450 checkExportContextSqlExportOptions(api.ExportContextSqlExportOptions o) { |
412 buildCounterExportContextSqlExportOptions++; | 451 buildCounterExportContextSqlExportOptions++; |
413 if (buildCounterExportContextSqlExportOptions < 3) { | 452 if (buildCounterExportContextSqlExportOptions < 3) { |
414 checkUnnamed1648(o.tables); | 453 checkUnnamed1801(o.tables); |
415 } | 454 } |
416 buildCounterExportContextSqlExportOptions--; | 455 buildCounterExportContextSqlExportOptions--; |
417 } | 456 } |
418 | 457 |
419 core.int buildCounterExportContext = 0; | 458 core.int buildCounterExportContext = 0; |
420 buildExportContext() { | 459 buildExportContext() { |
421 var o = new api.ExportContext(); | 460 var o = new api.ExportContext(); |
422 buildCounterExportContext++; | 461 buildCounterExportContext++; |
423 if (buildCounterExportContext < 3) { | 462 if (buildCounterExportContext < 3) { |
424 o.csvExportOptions = buildExportContextCsvExportOptions(); | 463 o.csvExportOptions = buildExportContextCsvExportOptions(); |
425 o.databases = buildUnnamed1647(); | 464 o.databases = buildUnnamed1800(); |
426 o.fileType = "foo"; | 465 o.fileType = "foo"; |
427 o.kind = "foo"; | 466 o.kind = "foo"; |
428 o.sqlExportOptions = buildExportContextSqlExportOptions(); | 467 o.sqlExportOptions = buildExportContextSqlExportOptions(); |
429 o.uri = "foo"; | 468 o.uri = "foo"; |
430 } | 469 } |
431 buildCounterExportContext--; | 470 buildCounterExportContext--; |
432 return o; | 471 return o; |
433 } | 472 } |
434 | 473 |
435 checkExportContext(api.ExportContext o) { | 474 checkExportContext(api.ExportContext o) { |
436 buildCounterExportContext++; | 475 buildCounterExportContext++; |
437 if (buildCounterExportContext < 3) { | 476 if (buildCounterExportContext < 3) { |
438 checkExportContextCsvExportOptions(o.csvExportOptions); | 477 checkExportContextCsvExportOptions(o.csvExportOptions); |
439 checkUnnamed1647(o.databases); | 478 checkUnnamed1800(o.databases); |
440 unittest.expect(o.fileType, unittest.equals('foo')); | 479 unittest.expect(o.fileType, unittest.equals('foo')); |
441 unittest.expect(o.kind, unittest.equals('foo')); | 480 unittest.expect(o.kind, unittest.equals('foo')); |
442 checkExportContextSqlExportOptions(o.sqlExportOptions); | 481 checkExportContextSqlExportOptions(o.sqlExportOptions); |
443 unittest.expect(o.uri, unittest.equals('foo')); | 482 unittest.expect(o.uri, unittest.equals('foo')); |
444 } | 483 } |
445 buildCounterExportContext--; | 484 buildCounterExportContext--; |
446 } | 485 } |
447 | 486 |
448 buildUnnamed1649() { | 487 buildUnnamed1802() { |
449 var o = new core.List<core.String>(); | 488 var o = new core.List<core.String>(); |
450 o.add("foo"); | 489 o.add("foo"); |
451 o.add("foo"); | 490 o.add("foo"); |
452 return o; | 491 return o; |
453 } | 492 } |
454 | 493 |
455 checkUnnamed1649(core.List<core.String> o) { | 494 checkUnnamed1802(core.List<core.String> o) { |
456 unittest.expect(o, unittest.hasLength(2)); | 495 unittest.expect(o, unittest.hasLength(2)); |
457 unittest.expect(o[0], unittest.equals('foo')); | 496 unittest.expect(o[0], unittest.equals('foo')); |
458 unittest.expect(o[1], unittest.equals('foo')); | 497 unittest.expect(o[1], unittest.equals('foo')); |
459 } | 498 } |
460 | 499 |
461 buildUnnamed1650() { | 500 buildUnnamed1803() { |
462 var o = new core.List<core.String>(); | 501 var o = new core.List<core.String>(); |
463 o.add("foo"); | 502 o.add("foo"); |
464 o.add("foo"); | 503 o.add("foo"); |
465 return o; | 504 return o; |
466 } | 505 } |
467 | 506 |
468 checkUnnamed1650(core.List<core.String> o) { | 507 checkUnnamed1803(core.List<core.String> o) { |
469 unittest.expect(o, unittest.hasLength(2)); | 508 unittest.expect(o, unittest.hasLength(2)); |
470 unittest.expect(o[0], unittest.equals('foo')); | 509 unittest.expect(o[0], unittest.equals('foo')); |
471 unittest.expect(o[1], unittest.equals('foo')); | 510 unittest.expect(o[1], unittest.equals('foo')); |
472 } | 511 } |
473 | 512 |
474 core.int buildCounterFlag = 0; | 513 core.int buildCounterFlag = 0; |
475 buildFlag() { | 514 buildFlag() { |
476 var o = new api.Flag(); | 515 var o = new api.Flag(); |
477 buildCounterFlag++; | 516 buildCounterFlag++; |
478 if (buildCounterFlag < 3) { | 517 if (buildCounterFlag < 3) { |
479 o.allowedStringValues = buildUnnamed1649(); | 518 o.allowedStringValues = buildUnnamed1802(); |
480 o.appliesTo = buildUnnamed1650(); | 519 o.appliesTo = buildUnnamed1803(); |
481 o.kind = "foo"; | 520 o.kind = "foo"; |
482 o.maxValue = "foo"; | 521 o.maxValue = "foo"; |
483 o.minValue = "foo"; | 522 o.minValue = "foo"; |
484 o.name = "foo"; | 523 o.name = "foo"; |
485 o.type = "foo"; | 524 o.type = "foo"; |
486 } | 525 } |
487 buildCounterFlag--; | 526 buildCounterFlag--; |
488 return o; | 527 return o; |
489 } | 528 } |
490 | 529 |
491 checkFlag(api.Flag o) { | 530 checkFlag(api.Flag o) { |
492 buildCounterFlag++; | 531 buildCounterFlag++; |
493 if (buildCounterFlag < 3) { | 532 if (buildCounterFlag < 3) { |
494 checkUnnamed1649(o.allowedStringValues); | 533 checkUnnamed1802(o.allowedStringValues); |
495 checkUnnamed1650(o.appliesTo); | 534 checkUnnamed1803(o.appliesTo); |
496 unittest.expect(o.kind, unittest.equals('foo')); | 535 unittest.expect(o.kind, unittest.equals('foo')); |
497 unittest.expect(o.maxValue, unittest.equals('foo')); | 536 unittest.expect(o.maxValue, unittest.equals('foo')); |
498 unittest.expect(o.minValue, unittest.equals('foo')); | 537 unittest.expect(o.minValue, unittest.equals('foo')); |
499 unittest.expect(o.name, unittest.equals('foo')); | 538 unittest.expect(o.name, unittest.equals('foo')); |
500 unittest.expect(o.type, unittest.equals('foo')); | 539 unittest.expect(o.type, unittest.equals('foo')); |
501 } | 540 } |
502 buildCounterFlag--; | 541 buildCounterFlag--; |
503 } | 542 } |
504 | 543 |
505 buildUnnamed1651() { | 544 buildUnnamed1804() { |
506 var o = new core.List<api.Flag>(); | 545 var o = new core.List<api.Flag>(); |
507 o.add(buildFlag()); | 546 o.add(buildFlag()); |
508 o.add(buildFlag()); | 547 o.add(buildFlag()); |
509 return o; | 548 return o; |
510 } | 549 } |
511 | 550 |
512 checkUnnamed1651(core.List<api.Flag> o) { | 551 checkUnnamed1804(core.List<api.Flag> o) { |
513 unittest.expect(o, unittest.hasLength(2)); | 552 unittest.expect(o, unittest.hasLength(2)); |
514 checkFlag(o[0]); | 553 checkFlag(o[0]); |
515 checkFlag(o[1]); | 554 checkFlag(o[1]); |
516 } | 555 } |
517 | 556 |
518 core.int buildCounterFlagsListResponse = 0; | 557 core.int buildCounterFlagsListResponse = 0; |
519 buildFlagsListResponse() { | 558 buildFlagsListResponse() { |
520 var o = new api.FlagsListResponse(); | 559 var o = new api.FlagsListResponse(); |
521 buildCounterFlagsListResponse++; | 560 buildCounterFlagsListResponse++; |
522 if (buildCounterFlagsListResponse < 3) { | 561 if (buildCounterFlagsListResponse < 3) { |
523 o.items = buildUnnamed1651(); | 562 o.items = buildUnnamed1804(); |
524 o.kind = "foo"; | 563 o.kind = "foo"; |
525 } | 564 } |
526 buildCounterFlagsListResponse--; | 565 buildCounterFlagsListResponse--; |
527 return o; | 566 return o; |
528 } | 567 } |
529 | 568 |
530 checkFlagsListResponse(api.FlagsListResponse o) { | 569 checkFlagsListResponse(api.FlagsListResponse o) { |
531 buildCounterFlagsListResponse++; | 570 buildCounterFlagsListResponse++; |
532 if (buildCounterFlagsListResponse < 3) { | 571 if (buildCounterFlagsListResponse < 3) { |
533 checkUnnamed1651(o.items); | 572 checkUnnamed1804(o.items); |
534 unittest.expect(o.kind, unittest.equals('foo')); | 573 unittest.expect(o.kind, unittest.equals('foo')); |
535 } | 574 } |
536 buildCounterFlagsListResponse--; | 575 buildCounterFlagsListResponse--; |
537 } | 576 } |
538 | 577 |
539 buildUnnamed1652() { | 578 buildUnnamed1805() { |
540 var o = new core.List<core.String>(); | 579 var o = new core.List<core.String>(); |
541 o.add("foo"); | 580 o.add("foo"); |
542 o.add("foo"); | 581 o.add("foo"); |
543 return o; | 582 return o; |
544 } | 583 } |
545 | 584 |
546 checkUnnamed1652(core.List<core.String> o) { | 585 checkUnnamed1805(core.List<core.String> o) { |
547 unittest.expect(o, unittest.hasLength(2)); | 586 unittest.expect(o, unittest.hasLength(2)); |
548 unittest.expect(o[0], unittest.equals('foo')); | 587 unittest.expect(o[0], unittest.equals('foo')); |
549 unittest.expect(o[1], unittest.equals('foo')); | 588 unittest.expect(o[1], unittest.equals('foo')); |
550 } | 589 } |
551 | 590 |
552 core.int buildCounterImportContextCsvImportOptions = 0; | 591 core.int buildCounterImportContextCsvImportOptions = 0; |
553 buildImportContextCsvImportOptions() { | 592 buildImportContextCsvImportOptions() { |
554 var o = new api.ImportContextCsvImportOptions(); | 593 var o = new api.ImportContextCsvImportOptions(); |
555 buildCounterImportContextCsvImportOptions++; | 594 buildCounterImportContextCsvImportOptions++; |
556 if (buildCounterImportContextCsvImportOptions < 3) { | 595 if (buildCounterImportContextCsvImportOptions < 3) { |
557 o.columns = buildUnnamed1652(); | 596 o.columns = buildUnnamed1805(); |
558 o.table = "foo"; | 597 o.table = "foo"; |
559 } | 598 } |
560 buildCounterImportContextCsvImportOptions--; | 599 buildCounterImportContextCsvImportOptions--; |
561 return o; | 600 return o; |
562 } | 601 } |
563 | 602 |
564 checkImportContextCsvImportOptions(api.ImportContextCsvImportOptions o) { | 603 checkImportContextCsvImportOptions(api.ImportContextCsvImportOptions o) { |
565 buildCounterImportContextCsvImportOptions++; | 604 buildCounterImportContextCsvImportOptions++; |
566 if (buildCounterImportContextCsvImportOptions < 3) { | 605 if (buildCounterImportContextCsvImportOptions < 3) { |
567 checkUnnamed1652(o.columns); | 606 checkUnnamed1805(o.columns); |
568 unittest.expect(o.table, unittest.equals('foo')); | 607 unittest.expect(o.table, unittest.equals('foo')); |
569 } | 608 } |
570 buildCounterImportContextCsvImportOptions--; | 609 buildCounterImportContextCsvImportOptions--; |
571 } | 610 } |
572 | 611 |
573 core.int buildCounterImportContext = 0; | 612 core.int buildCounterImportContext = 0; |
574 buildImportContext() { | 613 buildImportContext() { |
575 var o = new api.ImportContext(); | 614 var o = new api.ImportContext(); |
576 buildCounterImportContext++; | 615 buildCounterImportContext++; |
577 if (buildCounterImportContext < 3) { | 616 if (buildCounterImportContext < 3) { |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
647 } | 686 } |
648 | 687 |
649 checkInstancesImportRequest(api.InstancesImportRequest o) { | 688 checkInstancesImportRequest(api.InstancesImportRequest o) { |
650 buildCounterInstancesImportRequest++; | 689 buildCounterInstancesImportRequest++; |
651 if (buildCounterInstancesImportRequest < 3) { | 690 if (buildCounterInstancesImportRequest < 3) { |
652 checkImportContext(o.importContext); | 691 checkImportContext(o.importContext); |
653 } | 692 } |
654 buildCounterInstancesImportRequest--; | 693 buildCounterInstancesImportRequest--; |
655 } | 694 } |
656 | 695 |
657 buildUnnamed1653() { | 696 buildUnnamed1806() { |
658 var o = new core.List<api.DatabaseInstance>(); | 697 var o = new core.List<api.DatabaseInstance>(); |
659 o.add(buildDatabaseInstance()); | 698 o.add(buildDatabaseInstance()); |
660 o.add(buildDatabaseInstance()); | 699 o.add(buildDatabaseInstance()); |
661 return o; | 700 return o; |
662 } | 701 } |
663 | 702 |
664 checkUnnamed1653(core.List<api.DatabaseInstance> o) { | 703 checkUnnamed1806(core.List<api.DatabaseInstance> o) { |
665 unittest.expect(o, unittest.hasLength(2)); | 704 unittest.expect(o, unittest.hasLength(2)); |
666 checkDatabaseInstance(o[0]); | 705 checkDatabaseInstance(o[0]); |
667 checkDatabaseInstance(o[1]); | 706 checkDatabaseInstance(o[1]); |
668 } | 707 } |
669 | 708 |
670 core.int buildCounterInstancesListResponse = 0; | 709 core.int buildCounterInstancesListResponse = 0; |
671 buildInstancesListResponse() { | 710 buildInstancesListResponse() { |
672 var o = new api.InstancesListResponse(); | 711 var o = new api.InstancesListResponse(); |
673 buildCounterInstancesListResponse++; | 712 buildCounterInstancesListResponse++; |
674 if (buildCounterInstancesListResponse < 3) { | 713 if (buildCounterInstancesListResponse < 3) { |
675 o.items = buildUnnamed1653(); | 714 o.items = buildUnnamed1806(); |
676 o.kind = "foo"; | 715 o.kind = "foo"; |
677 o.nextPageToken = "foo"; | 716 o.nextPageToken = "foo"; |
678 } | 717 } |
679 buildCounterInstancesListResponse--; | 718 buildCounterInstancesListResponse--; |
680 return o; | 719 return o; |
681 } | 720 } |
682 | 721 |
683 checkInstancesListResponse(api.InstancesListResponse o) { | 722 checkInstancesListResponse(api.InstancesListResponse o) { |
684 buildCounterInstancesListResponse++; | 723 buildCounterInstancesListResponse++; |
685 if (buildCounterInstancesListResponse < 3) { | 724 if (buildCounterInstancesListResponse < 3) { |
686 checkUnnamed1653(o.items); | 725 checkUnnamed1806(o.items); |
687 unittest.expect(o.kind, unittest.equals('foo')); | 726 unittest.expect(o.kind, unittest.equals('foo')); |
688 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 727 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
689 } | 728 } |
690 buildCounterInstancesListResponse--; | 729 buildCounterInstancesListResponse--; |
691 } | 730 } |
692 | 731 |
693 core.int buildCounterInstancesRestoreBackupRequest = 0; | 732 core.int buildCounterInstancesRestoreBackupRequest = 0; |
694 buildInstancesRestoreBackupRequest() { | 733 buildInstancesRestoreBackupRequest() { |
695 var o = new api.InstancesRestoreBackupRequest(); | 734 var o = new api.InstancesRestoreBackupRequest(); |
696 buildCounterInstancesRestoreBackupRequest++; | 735 buildCounterInstancesRestoreBackupRequest++; |
697 if (buildCounterInstancesRestoreBackupRequest < 3) { | 736 if (buildCounterInstancesRestoreBackupRequest < 3) { |
698 o.restoreBackupContext = buildRestoreBackupContext(); | 737 o.restoreBackupContext = buildRestoreBackupContext(); |
699 } | 738 } |
700 buildCounterInstancesRestoreBackupRequest--; | 739 buildCounterInstancesRestoreBackupRequest--; |
701 return o; | 740 return o; |
702 } | 741 } |
703 | 742 |
704 checkInstancesRestoreBackupRequest(api.InstancesRestoreBackupRequest o) { | 743 checkInstancesRestoreBackupRequest(api.InstancesRestoreBackupRequest o) { |
705 buildCounterInstancesRestoreBackupRequest++; | 744 buildCounterInstancesRestoreBackupRequest++; |
706 if (buildCounterInstancesRestoreBackupRequest < 3) { | 745 if (buildCounterInstancesRestoreBackupRequest < 3) { |
707 checkRestoreBackupContext(o.restoreBackupContext); | 746 checkRestoreBackupContext(o.restoreBackupContext); |
708 } | 747 } |
709 buildCounterInstancesRestoreBackupRequest--; | 748 buildCounterInstancesRestoreBackupRequest--; |
710 } | 749 } |
711 | 750 |
712 buildUnnamed1654() { | 751 buildUnnamed1807() { |
713 var o = new core.List<api.AclEntry>(); | 752 var o = new core.List<api.AclEntry>(); |
714 o.add(buildAclEntry()); | 753 o.add(buildAclEntry()); |
715 o.add(buildAclEntry()); | 754 o.add(buildAclEntry()); |
716 return o; | 755 return o; |
717 } | 756 } |
718 | 757 |
719 checkUnnamed1654(core.List<api.AclEntry> o) { | 758 checkUnnamed1807(core.List<api.AclEntry> o) { |
720 unittest.expect(o, unittest.hasLength(2)); | 759 unittest.expect(o, unittest.hasLength(2)); |
721 checkAclEntry(o[0]); | 760 checkAclEntry(o[0]); |
722 checkAclEntry(o[1]); | 761 checkAclEntry(o[1]); |
723 } | 762 } |
724 | 763 |
725 core.int buildCounterIpConfiguration = 0; | 764 core.int buildCounterIpConfiguration = 0; |
726 buildIpConfiguration() { | 765 buildIpConfiguration() { |
727 var o = new api.IpConfiguration(); | 766 var o = new api.IpConfiguration(); |
728 buildCounterIpConfiguration++; | 767 buildCounterIpConfiguration++; |
729 if (buildCounterIpConfiguration < 3) { | 768 if (buildCounterIpConfiguration < 3) { |
730 o.authorizedNetworks = buildUnnamed1654(); | 769 o.authorizedNetworks = buildUnnamed1807(); |
731 o.ipv4Enabled = true; | 770 o.ipv4Enabled = true; |
732 o.requireSsl = true; | 771 o.requireSsl = true; |
733 } | 772 } |
734 buildCounterIpConfiguration--; | 773 buildCounterIpConfiguration--; |
735 return o; | 774 return o; |
736 } | 775 } |
737 | 776 |
738 checkIpConfiguration(api.IpConfiguration o) { | 777 checkIpConfiguration(api.IpConfiguration o) { |
739 buildCounterIpConfiguration++; | 778 buildCounterIpConfiguration++; |
740 if (buildCounterIpConfiguration < 3) { | 779 if (buildCounterIpConfiguration < 3) { |
741 checkUnnamed1654(o.authorizedNetworks); | 780 checkUnnamed1807(o.authorizedNetworks); |
742 unittest.expect(o.ipv4Enabled, unittest.isTrue); | 781 unittest.expect(o.ipv4Enabled, unittest.isTrue); |
743 unittest.expect(o.requireSsl, unittest.isTrue); | 782 unittest.expect(o.requireSsl, unittest.isTrue); |
744 } | 783 } |
745 buildCounterIpConfiguration--; | 784 buildCounterIpConfiguration--; |
746 } | 785 } |
747 | 786 |
748 core.int buildCounterIpMapping = 0; | 787 core.int buildCounterIpMapping = 0; |
749 buildIpMapping() { | 788 buildIpMapping() { |
750 var o = new api.IpMapping(); | 789 var o = new api.IpMapping(); |
751 buildCounterIpMapping++; | 790 buildCounterIpMapping++; |
(...skipping 30 matching lines...) Expand all Loading... |
782 checkLocationPreference(api.LocationPreference o) { | 821 checkLocationPreference(api.LocationPreference o) { |
783 buildCounterLocationPreference++; | 822 buildCounterLocationPreference++; |
784 if (buildCounterLocationPreference < 3) { | 823 if (buildCounterLocationPreference < 3) { |
785 unittest.expect(o.followGaeApplication, unittest.equals('foo')); | 824 unittest.expect(o.followGaeApplication, unittest.equals('foo')); |
786 unittest.expect(o.kind, unittest.equals('foo')); | 825 unittest.expect(o.kind, unittest.equals('foo')); |
787 unittest.expect(o.zone, unittest.equals('foo')); | 826 unittest.expect(o.zone, unittest.equals('foo')); |
788 } | 827 } |
789 buildCounterLocationPreference--; | 828 buildCounterLocationPreference--; |
790 } | 829 } |
791 | 830 |
792 buildUnnamed1655() { | 831 core.int buildCounterMySqlReplicaConfiguration = 0; |
| 832 buildMySqlReplicaConfiguration() { |
| 833 var o = new api.MySqlReplicaConfiguration(); |
| 834 buildCounterMySqlReplicaConfiguration++; |
| 835 if (buildCounterMySqlReplicaConfiguration < 3) { |
| 836 o.caCertificate = "foo"; |
| 837 o.clientCertificate = "foo"; |
| 838 o.clientKey = "foo"; |
| 839 o.connectRetryInterval = 42; |
| 840 o.dumpFilePath = "foo"; |
| 841 o.kind = "foo"; |
| 842 o.masterHeartbeatPeriod = "foo"; |
| 843 o.password = "foo"; |
| 844 o.sslCipher = "foo"; |
| 845 o.username = "foo"; |
| 846 o.verifyServerCertificate = true; |
| 847 } |
| 848 buildCounterMySqlReplicaConfiguration--; |
| 849 return o; |
| 850 } |
| 851 |
| 852 checkMySqlReplicaConfiguration(api.MySqlReplicaConfiguration o) { |
| 853 buildCounterMySqlReplicaConfiguration++; |
| 854 if (buildCounterMySqlReplicaConfiguration < 3) { |
| 855 unittest.expect(o.caCertificate, unittest.equals('foo')); |
| 856 unittest.expect(o.clientCertificate, unittest.equals('foo')); |
| 857 unittest.expect(o.clientKey, unittest.equals('foo')); |
| 858 unittest.expect(o.connectRetryInterval, unittest.equals(42)); |
| 859 unittest.expect(o.dumpFilePath, unittest.equals('foo')); |
| 860 unittest.expect(o.kind, unittest.equals('foo')); |
| 861 unittest.expect(o.masterHeartbeatPeriod, unittest.equals('foo')); |
| 862 unittest.expect(o.password, unittest.equals('foo')); |
| 863 unittest.expect(o.sslCipher, unittest.equals('foo')); |
| 864 unittest.expect(o.username, unittest.equals('foo')); |
| 865 unittest.expect(o.verifyServerCertificate, unittest.isTrue); |
| 866 } |
| 867 buildCounterMySqlReplicaConfiguration--; |
| 868 } |
| 869 |
| 870 core.int buildCounterOnPremisesConfiguration = 0; |
| 871 buildOnPremisesConfiguration() { |
| 872 var o = new api.OnPremisesConfiguration(); |
| 873 buildCounterOnPremisesConfiguration++; |
| 874 if (buildCounterOnPremisesConfiguration < 3) { |
| 875 o.hostPort = "foo"; |
| 876 o.kind = "foo"; |
| 877 } |
| 878 buildCounterOnPremisesConfiguration--; |
| 879 return o; |
| 880 } |
| 881 |
| 882 checkOnPremisesConfiguration(api.OnPremisesConfiguration o) { |
| 883 buildCounterOnPremisesConfiguration++; |
| 884 if (buildCounterOnPremisesConfiguration < 3) { |
| 885 unittest.expect(o.hostPort, unittest.equals('foo')); |
| 886 unittest.expect(o.kind, unittest.equals('foo')); |
| 887 } |
| 888 buildCounterOnPremisesConfiguration--; |
| 889 } |
| 890 |
| 891 buildUnnamed1808() { |
793 var o = new core.List<api.OperationError_1>(); | 892 var o = new core.List<api.OperationError_1>(); |
794 o.add(buildOperationError_1()); | 893 o.add(buildOperationError_1()); |
795 o.add(buildOperationError_1()); | 894 o.add(buildOperationError_1()); |
796 return o; | 895 return o; |
797 } | 896 } |
798 | 897 |
799 checkUnnamed1655(core.List<api.OperationError_1> o) { | 898 checkUnnamed1808(core.List<api.OperationError_1> o) { |
800 unittest.expect(o, unittest.hasLength(2)); | 899 unittest.expect(o, unittest.hasLength(2)); |
801 checkOperationError_1(o[0]); | 900 checkOperationError_1(o[0]); |
802 checkOperationError_1(o[1]); | 901 checkOperationError_1(o[1]); |
803 } | 902 } |
804 | 903 |
805 core.int buildCounterOperationError = 0; | 904 core.int buildCounterOperationError = 0; |
806 buildOperationError() { | 905 buildOperationError() { |
807 var o = new api.OperationError(); | 906 var o = new api.OperationError(); |
808 buildCounterOperationError++; | 907 buildCounterOperationError++; |
809 if (buildCounterOperationError < 3) { | 908 if (buildCounterOperationError < 3) { |
810 o.errors = buildUnnamed1655(); | 909 o.errors = buildUnnamed1808(); |
811 } | 910 } |
812 buildCounterOperationError--; | 911 buildCounterOperationError--; |
813 return o; | 912 return o; |
814 } | 913 } |
815 | 914 |
816 checkOperationError(api.OperationError o) { | 915 checkOperationError(api.OperationError o) { |
817 buildCounterOperationError++; | 916 buildCounterOperationError++; |
818 if (buildCounterOperationError < 3) { | 917 if (buildCounterOperationError < 3) { |
819 checkUnnamed1655(o.errors); | 918 checkUnnamed1808(o.errors); |
820 } | 919 } |
821 buildCounterOperationError--; | 920 buildCounterOperationError--; |
822 } | 921 } |
823 | 922 |
824 core.int buildCounterOperation = 0; | 923 core.int buildCounterOperation = 0; |
825 buildOperation() { | 924 buildOperation() { |
826 var o = new api.Operation(); | 925 var o = new api.Operation(); |
827 buildCounterOperation++; | 926 buildCounterOperation++; |
828 if (buildCounterOperation < 3) { | 927 if (buildCounterOperation < 3) { |
829 o.endTime = core.DateTime.parse("2002-02-27T14:01:02"); | 928 o.endTime = core.DateTime.parse("2002-02-27T14:01:02"); |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
884 checkOperationError_1(api.OperationError_1 o) { | 983 checkOperationError_1(api.OperationError_1 o) { |
885 buildCounterOperationError_1++; | 984 buildCounterOperationError_1++; |
886 if (buildCounterOperationError_1 < 3) { | 985 if (buildCounterOperationError_1 < 3) { |
887 unittest.expect(o.code, unittest.equals('foo')); | 986 unittest.expect(o.code, unittest.equals('foo')); |
888 unittest.expect(o.kind, unittest.equals('foo')); | 987 unittest.expect(o.kind, unittest.equals('foo')); |
889 unittest.expect(o.message, unittest.equals('foo')); | 988 unittest.expect(o.message, unittest.equals('foo')); |
890 } | 989 } |
891 buildCounterOperationError_1--; | 990 buildCounterOperationError_1--; |
892 } | 991 } |
893 | 992 |
894 buildUnnamed1656() { | 993 buildUnnamed1809() { |
895 var o = new core.List<api.Operation>(); | 994 var o = new core.List<api.Operation>(); |
896 o.add(buildOperation()); | 995 o.add(buildOperation()); |
897 o.add(buildOperation()); | 996 o.add(buildOperation()); |
898 return o; | 997 return o; |
899 } | 998 } |
900 | 999 |
901 checkUnnamed1656(core.List<api.Operation> o) { | 1000 checkUnnamed1809(core.List<api.Operation> o) { |
902 unittest.expect(o, unittest.hasLength(2)); | 1001 unittest.expect(o, unittest.hasLength(2)); |
903 checkOperation(o[0]); | 1002 checkOperation(o[0]); |
904 checkOperation(o[1]); | 1003 checkOperation(o[1]); |
905 } | 1004 } |
906 | 1005 |
907 core.int buildCounterOperationsListResponse = 0; | 1006 core.int buildCounterOperationsListResponse = 0; |
908 buildOperationsListResponse() { | 1007 buildOperationsListResponse() { |
909 var o = new api.OperationsListResponse(); | 1008 var o = new api.OperationsListResponse(); |
910 buildCounterOperationsListResponse++; | 1009 buildCounterOperationsListResponse++; |
911 if (buildCounterOperationsListResponse < 3) { | 1010 if (buildCounterOperationsListResponse < 3) { |
912 o.items = buildUnnamed1656(); | 1011 o.items = buildUnnamed1809(); |
913 o.kind = "foo"; | 1012 o.kind = "foo"; |
914 o.nextPageToken = "foo"; | 1013 o.nextPageToken = "foo"; |
915 } | 1014 } |
916 buildCounterOperationsListResponse--; | 1015 buildCounterOperationsListResponse--; |
917 return o; | 1016 return o; |
918 } | 1017 } |
919 | 1018 |
920 checkOperationsListResponse(api.OperationsListResponse o) { | 1019 checkOperationsListResponse(api.OperationsListResponse o) { |
921 buildCounterOperationsListResponse++; | 1020 buildCounterOperationsListResponse++; |
922 if (buildCounterOperationsListResponse < 3) { | 1021 if (buildCounterOperationsListResponse < 3) { |
923 checkUnnamed1656(o.items); | 1022 checkUnnamed1809(o.items); |
924 unittest.expect(o.kind, unittest.equals('foo')); | 1023 unittest.expect(o.kind, unittest.equals('foo')); |
925 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 1024 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
926 } | 1025 } |
927 buildCounterOperationsListResponse--; | 1026 buildCounterOperationsListResponse--; |
928 } | 1027 } |
929 | 1028 |
| 1029 core.int buildCounterReplicaConfiguration = 0; |
| 1030 buildReplicaConfiguration() { |
| 1031 var o = new api.ReplicaConfiguration(); |
| 1032 buildCounterReplicaConfiguration++; |
| 1033 if (buildCounterReplicaConfiguration < 3) { |
| 1034 o.kind = "foo"; |
| 1035 o.mysqlReplicaConfiguration = buildMySqlReplicaConfiguration(); |
| 1036 } |
| 1037 buildCounterReplicaConfiguration--; |
| 1038 return o; |
| 1039 } |
| 1040 |
| 1041 checkReplicaConfiguration(api.ReplicaConfiguration o) { |
| 1042 buildCounterReplicaConfiguration++; |
| 1043 if (buildCounterReplicaConfiguration < 3) { |
| 1044 unittest.expect(o.kind, unittest.equals('foo')); |
| 1045 checkMySqlReplicaConfiguration(o.mysqlReplicaConfiguration); |
| 1046 } |
| 1047 buildCounterReplicaConfiguration--; |
| 1048 } |
| 1049 |
930 core.int buildCounterRestoreBackupContext = 0; | 1050 core.int buildCounterRestoreBackupContext = 0; |
931 buildRestoreBackupContext() { | 1051 buildRestoreBackupContext() { |
932 var o = new api.RestoreBackupContext(); | 1052 var o = new api.RestoreBackupContext(); |
933 buildCounterRestoreBackupContext++; | 1053 buildCounterRestoreBackupContext++; |
934 if (buildCounterRestoreBackupContext < 3) { | 1054 if (buildCounterRestoreBackupContext < 3) { |
935 o.backupRunId = "foo"; | 1055 o.backupRunId = "foo"; |
936 o.kind = "foo"; | 1056 o.kind = "foo"; |
937 } | 1057 } |
938 buildCounterRestoreBackupContext--; | 1058 buildCounterRestoreBackupContext--; |
939 return o; | 1059 return o; |
940 } | 1060 } |
941 | 1061 |
942 checkRestoreBackupContext(api.RestoreBackupContext o) { | 1062 checkRestoreBackupContext(api.RestoreBackupContext o) { |
943 buildCounterRestoreBackupContext++; | 1063 buildCounterRestoreBackupContext++; |
944 if (buildCounterRestoreBackupContext < 3) { | 1064 if (buildCounterRestoreBackupContext < 3) { |
945 unittest.expect(o.backupRunId, unittest.equals('foo')); | 1065 unittest.expect(o.backupRunId, unittest.equals('foo')); |
946 unittest.expect(o.kind, unittest.equals('foo')); | 1066 unittest.expect(o.kind, unittest.equals('foo')); |
947 } | 1067 } |
948 buildCounterRestoreBackupContext--; | 1068 buildCounterRestoreBackupContext--; |
949 } | 1069 } |
950 | 1070 |
951 buildUnnamed1657() { | 1071 buildUnnamed1810() { |
952 var o = new core.List<core.String>(); | 1072 var o = new core.List<core.String>(); |
953 o.add("foo"); | 1073 o.add("foo"); |
954 o.add("foo"); | 1074 o.add("foo"); |
955 return o; | 1075 return o; |
956 } | 1076 } |
957 | 1077 |
958 checkUnnamed1657(core.List<core.String> o) { | 1078 checkUnnamed1810(core.List<core.String> o) { |
959 unittest.expect(o, unittest.hasLength(2)); | 1079 unittest.expect(o, unittest.hasLength(2)); |
960 unittest.expect(o[0], unittest.equals('foo')); | 1080 unittest.expect(o[0], unittest.equals('foo')); |
961 unittest.expect(o[1], unittest.equals('foo')); | 1081 unittest.expect(o[1], unittest.equals('foo')); |
962 } | 1082 } |
963 | 1083 |
964 buildUnnamed1658() { | 1084 buildUnnamed1811() { |
965 var o = new core.List<api.DatabaseFlags>(); | 1085 var o = new core.List<api.DatabaseFlags>(); |
966 o.add(buildDatabaseFlags()); | 1086 o.add(buildDatabaseFlags()); |
967 o.add(buildDatabaseFlags()); | 1087 o.add(buildDatabaseFlags()); |
968 return o; | 1088 return o; |
969 } | 1089 } |
970 | 1090 |
971 checkUnnamed1658(core.List<api.DatabaseFlags> o) { | 1091 checkUnnamed1811(core.List<api.DatabaseFlags> o) { |
972 unittest.expect(o, unittest.hasLength(2)); | 1092 unittest.expect(o, unittest.hasLength(2)); |
973 checkDatabaseFlags(o[0]); | 1093 checkDatabaseFlags(o[0]); |
974 checkDatabaseFlags(o[1]); | 1094 checkDatabaseFlags(o[1]); |
975 } | 1095 } |
976 | 1096 |
977 core.int buildCounterSettings = 0; | 1097 core.int buildCounterSettings = 0; |
978 buildSettings() { | 1098 buildSettings() { |
979 var o = new api.Settings(); | 1099 var o = new api.Settings(); |
980 buildCounterSettings++; | 1100 buildCounterSettings++; |
981 if (buildCounterSettings < 3) { | 1101 if (buildCounterSettings < 3) { |
982 o.activationPolicy = "foo"; | 1102 o.activationPolicy = "foo"; |
983 o.authorizedGaeApplications = buildUnnamed1657(); | 1103 o.authorizedGaeApplications = buildUnnamed1810(); |
984 o.backupConfiguration = buildBackupConfiguration(); | 1104 o.backupConfiguration = buildBackupConfiguration(); |
985 o.databaseFlags = buildUnnamed1658(); | 1105 o.crashSafeReplicationEnabled = true; |
| 1106 o.databaseFlags = buildUnnamed1811(); |
986 o.databaseReplicationEnabled = true; | 1107 o.databaseReplicationEnabled = true; |
987 o.ipConfiguration = buildIpConfiguration(); | 1108 o.ipConfiguration = buildIpConfiguration(); |
988 o.kind = "foo"; | 1109 o.kind = "foo"; |
989 o.locationPreference = buildLocationPreference(); | 1110 o.locationPreference = buildLocationPreference(); |
990 o.pricingPlan = "foo"; | 1111 o.pricingPlan = "foo"; |
991 o.replicationType = "foo"; | 1112 o.replicationType = "foo"; |
992 o.settingsVersion = "foo"; | 1113 o.settingsVersion = "foo"; |
993 o.tier = "foo"; | 1114 o.tier = "foo"; |
994 } | 1115 } |
995 buildCounterSettings--; | 1116 buildCounterSettings--; |
996 return o; | 1117 return o; |
997 } | 1118 } |
998 | 1119 |
999 checkSettings(api.Settings o) { | 1120 checkSettings(api.Settings o) { |
1000 buildCounterSettings++; | 1121 buildCounterSettings++; |
1001 if (buildCounterSettings < 3) { | 1122 if (buildCounterSettings < 3) { |
1002 unittest.expect(o.activationPolicy, unittest.equals('foo')); | 1123 unittest.expect(o.activationPolicy, unittest.equals('foo')); |
1003 checkUnnamed1657(o.authorizedGaeApplications); | 1124 checkUnnamed1810(o.authorizedGaeApplications); |
1004 checkBackupConfiguration(o.backupConfiguration); | 1125 checkBackupConfiguration(o.backupConfiguration); |
1005 checkUnnamed1658(o.databaseFlags); | 1126 unittest.expect(o.crashSafeReplicationEnabled, unittest.isTrue); |
| 1127 checkUnnamed1811(o.databaseFlags); |
1006 unittest.expect(o.databaseReplicationEnabled, unittest.isTrue); | 1128 unittest.expect(o.databaseReplicationEnabled, unittest.isTrue); |
1007 checkIpConfiguration(o.ipConfiguration); | 1129 checkIpConfiguration(o.ipConfiguration); |
1008 unittest.expect(o.kind, unittest.equals('foo')); | 1130 unittest.expect(o.kind, unittest.equals('foo')); |
1009 checkLocationPreference(o.locationPreference); | 1131 checkLocationPreference(o.locationPreference); |
1010 unittest.expect(o.pricingPlan, unittest.equals('foo')); | 1132 unittest.expect(o.pricingPlan, unittest.equals('foo')); |
1011 unittest.expect(o.replicationType, unittest.equals('foo')); | 1133 unittest.expect(o.replicationType, unittest.equals('foo')); |
1012 unittest.expect(o.settingsVersion, unittest.equals('foo')); | 1134 unittest.expect(o.settingsVersion, unittest.equals('foo')); |
1013 unittest.expect(o.tier, unittest.equals('foo')); | 1135 unittest.expect(o.tier, unittest.equals('foo')); |
1014 } | 1136 } |
1015 buildCounterSettings--; | 1137 buildCounterSettings--; |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1106 checkSslCertsInsertResponse(api.SslCertsInsertResponse o) { | 1228 checkSslCertsInsertResponse(api.SslCertsInsertResponse o) { |
1107 buildCounterSslCertsInsertResponse++; | 1229 buildCounterSslCertsInsertResponse++; |
1108 if (buildCounterSslCertsInsertResponse < 3) { | 1230 if (buildCounterSslCertsInsertResponse < 3) { |
1109 checkSslCertDetail(o.clientCert); | 1231 checkSslCertDetail(o.clientCert); |
1110 unittest.expect(o.kind, unittest.equals('foo')); | 1232 unittest.expect(o.kind, unittest.equals('foo')); |
1111 checkSslCert(o.serverCaCert); | 1233 checkSslCert(o.serverCaCert); |
1112 } | 1234 } |
1113 buildCounterSslCertsInsertResponse--; | 1235 buildCounterSslCertsInsertResponse--; |
1114 } | 1236 } |
1115 | 1237 |
1116 buildUnnamed1659() { | 1238 buildUnnamed1812() { |
1117 var o = new core.List<api.SslCert>(); | 1239 var o = new core.List<api.SslCert>(); |
1118 o.add(buildSslCert()); | 1240 o.add(buildSslCert()); |
1119 o.add(buildSslCert()); | 1241 o.add(buildSslCert()); |
1120 return o; | 1242 return o; |
1121 } | 1243 } |
1122 | 1244 |
1123 checkUnnamed1659(core.List<api.SslCert> o) { | 1245 checkUnnamed1812(core.List<api.SslCert> o) { |
1124 unittest.expect(o, unittest.hasLength(2)); | 1246 unittest.expect(o, unittest.hasLength(2)); |
1125 checkSslCert(o[0]); | 1247 checkSslCert(o[0]); |
1126 checkSslCert(o[1]); | 1248 checkSslCert(o[1]); |
1127 } | 1249 } |
1128 | 1250 |
1129 core.int buildCounterSslCertsListResponse = 0; | 1251 core.int buildCounterSslCertsListResponse = 0; |
1130 buildSslCertsListResponse() { | 1252 buildSslCertsListResponse() { |
1131 var o = new api.SslCertsListResponse(); | 1253 var o = new api.SslCertsListResponse(); |
1132 buildCounterSslCertsListResponse++; | 1254 buildCounterSslCertsListResponse++; |
1133 if (buildCounterSslCertsListResponse < 3) { | 1255 if (buildCounterSslCertsListResponse < 3) { |
1134 o.items = buildUnnamed1659(); | 1256 o.items = buildUnnamed1812(); |
1135 o.kind = "foo"; | 1257 o.kind = "foo"; |
1136 } | 1258 } |
1137 buildCounterSslCertsListResponse--; | 1259 buildCounterSslCertsListResponse--; |
1138 return o; | 1260 return o; |
1139 } | 1261 } |
1140 | 1262 |
1141 checkSslCertsListResponse(api.SslCertsListResponse o) { | 1263 checkSslCertsListResponse(api.SslCertsListResponse o) { |
1142 buildCounterSslCertsListResponse++; | 1264 buildCounterSslCertsListResponse++; |
1143 if (buildCounterSslCertsListResponse < 3) { | 1265 if (buildCounterSslCertsListResponse < 3) { |
1144 checkUnnamed1659(o.items); | 1266 checkUnnamed1812(o.items); |
1145 unittest.expect(o.kind, unittest.equals('foo')); | 1267 unittest.expect(o.kind, unittest.equals('foo')); |
1146 } | 1268 } |
1147 buildCounterSslCertsListResponse--; | 1269 buildCounterSslCertsListResponse--; |
1148 } | 1270 } |
1149 | 1271 |
1150 buildUnnamed1660() { | 1272 buildUnnamed1813() { |
1151 var o = new core.List<core.String>(); | 1273 var o = new core.List<core.String>(); |
1152 o.add("foo"); | 1274 o.add("foo"); |
1153 o.add("foo"); | 1275 o.add("foo"); |
1154 return o; | 1276 return o; |
1155 } | 1277 } |
1156 | 1278 |
1157 checkUnnamed1660(core.List<core.String> o) { | 1279 checkUnnamed1813(core.List<core.String> o) { |
1158 unittest.expect(o, unittest.hasLength(2)); | 1280 unittest.expect(o, unittest.hasLength(2)); |
1159 unittest.expect(o[0], unittest.equals('foo')); | 1281 unittest.expect(o[0], unittest.equals('foo')); |
1160 unittest.expect(o[1], unittest.equals('foo')); | 1282 unittest.expect(o[1], unittest.equals('foo')); |
1161 } | 1283 } |
1162 | 1284 |
1163 core.int buildCounterTier = 0; | 1285 core.int buildCounterTier = 0; |
1164 buildTier() { | 1286 buildTier() { |
1165 var o = new api.Tier(); | 1287 var o = new api.Tier(); |
1166 buildCounterTier++; | 1288 buildCounterTier++; |
1167 if (buildCounterTier < 3) { | 1289 if (buildCounterTier < 3) { |
1168 o.DiskQuota = "foo"; | 1290 o.DiskQuota = "foo"; |
1169 o.RAM = "foo"; | 1291 o.RAM = "foo"; |
1170 o.kind = "foo"; | 1292 o.kind = "foo"; |
1171 o.region = buildUnnamed1660(); | 1293 o.region = buildUnnamed1813(); |
1172 o.tier = "foo"; | 1294 o.tier = "foo"; |
1173 } | 1295 } |
1174 buildCounterTier--; | 1296 buildCounterTier--; |
1175 return o; | 1297 return o; |
1176 } | 1298 } |
1177 | 1299 |
1178 checkTier(api.Tier o) { | 1300 checkTier(api.Tier o) { |
1179 buildCounterTier++; | 1301 buildCounterTier++; |
1180 if (buildCounterTier < 3) { | 1302 if (buildCounterTier < 3) { |
1181 unittest.expect(o.DiskQuota, unittest.equals('foo')); | 1303 unittest.expect(o.DiskQuota, unittest.equals('foo')); |
1182 unittest.expect(o.RAM, unittest.equals('foo')); | 1304 unittest.expect(o.RAM, unittest.equals('foo')); |
1183 unittest.expect(o.kind, unittest.equals('foo')); | 1305 unittest.expect(o.kind, unittest.equals('foo')); |
1184 checkUnnamed1660(o.region); | 1306 checkUnnamed1813(o.region); |
1185 unittest.expect(o.tier, unittest.equals('foo')); | 1307 unittest.expect(o.tier, unittest.equals('foo')); |
1186 } | 1308 } |
1187 buildCounterTier--; | 1309 buildCounterTier--; |
1188 } | 1310 } |
1189 | 1311 |
1190 buildUnnamed1661() { | 1312 buildUnnamed1814() { |
1191 var o = new core.List<api.Tier>(); | 1313 var o = new core.List<api.Tier>(); |
1192 o.add(buildTier()); | 1314 o.add(buildTier()); |
1193 o.add(buildTier()); | 1315 o.add(buildTier()); |
1194 return o; | 1316 return o; |
1195 } | 1317 } |
1196 | 1318 |
1197 checkUnnamed1661(core.List<api.Tier> o) { | 1319 checkUnnamed1814(core.List<api.Tier> o) { |
1198 unittest.expect(o, unittest.hasLength(2)); | 1320 unittest.expect(o, unittest.hasLength(2)); |
1199 checkTier(o[0]); | 1321 checkTier(o[0]); |
1200 checkTier(o[1]); | 1322 checkTier(o[1]); |
1201 } | 1323 } |
1202 | 1324 |
1203 core.int buildCounterTiersListResponse = 0; | 1325 core.int buildCounterTiersListResponse = 0; |
1204 buildTiersListResponse() { | 1326 buildTiersListResponse() { |
1205 var o = new api.TiersListResponse(); | 1327 var o = new api.TiersListResponse(); |
1206 buildCounterTiersListResponse++; | 1328 buildCounterTiersListResponse++; |
1207 if (buildCounterTiersListResponse < 3) { | 1329 if (buildCounterTiersListResponse < 3) { |
1208 o.items = buildUnnamed1661(); | 1330 o.items = buildUnnamed1814(); |
1209 o.kind = "foo"; | 1331 o.kind = "foo"; |
1210 } | 1332 } |
1211 buildCounterTiersListResponse--; | 1333 buildCounterTiersListResponse--; |
1212 return o; | 1334 return o; |
1213 } | 1335 } |
1214 | 1336 |
1215 checkTiersListResponse(api.TiersListResponse o) { | 1337 checkTiersListResponse(api.TiersListResponse o) { |
1216 buildCounterTiersListResponse++; | 1338 buildCounterTiersListResponse++; |
1217 if (buildCounterTiersListResponse < 3) { | 1339 if (buildCounterTiersListResponse < 3) { |
1218 checkUnnamed1661(o.items); | 1340 checkUnnamed1814(o.items); |
1219 unittest.expect(o.kind, unittest.equals('foo')); | 1341 unittest.expect(o.kind, unittest.equals('foo')); |
1220 } | 1342 } |
1221 buildCounterTiersListResponse--; | 1343 buildCounterTiersListResponse--; |
1222 } | 1344 } |
1223 | 1345 |
1224 core.int buildCounterUser = 0; | 1346 core.int buildCounterUser = 0; |
1225 buildUser() { | 1347 buildUser() { |
1226 var o = new api.User(); | 1348 var o = new api.User(); |
1227 buildCounterUser++; | 1349 buildCounterUser++; |
1228 if (buildCounterUser < 3) { | 1350 if (buildCounterUser < 3) { |
(...skipping 16 matching lines...) Expand all Loading... |
1245 unittest.expect(o.host, unittest.equals('foo')); | 1367 unittest.expect(o.host, unittest.equals('foo')); |
1246 unittest.expect(o.instance, unittest.equals('foo')); | 1368 unittest.expect(o.instance, unittest.equals('foo')); |
1247 unittest.expect(o.kind, unittest.equals('foo')); | 1369 unittest.expect(o.kind, unittest.equals('foo')); |
1248 unittest.expect(o.name, unittest.equals('foo')); | 1370 unittest.expect(o.name, unittest.equals('foo')); |
1249 unittest.expect(o.password, unittest.equals('foo')); | 1371 unittest.expect(o.password, unittest.equals('foo')); |
1250 unittest.expect(o.project, unittest.equals('foo')); | 1372 unittest.expect(o.project, unittest.equals('foo')); |
1251 } | 1373 } |
1252 buildCounterUser--; | 1374 buildCounterUser--; |
1253 } | 1375 } |
1254 | 1376 |
1255 buildUnnamed1662() { | 1377 buildUnnamed1815() { |
1256 var o = new core.List<api.User>(); | 1378 var o = new core.List<api.User>(); |
1257 o.add(buildUser()); | 1379 o.add(buildUser()); |
1258 o.add(buildUser()); | 1380 o.add(buildUser()); |
1259 return o; | 1381 return o; |
1260 } | 1382 } |
1261 | 1383 |
1262 checkUnnamed1662(core.List<api.User> o) { | 1384 checkUnnamed1815(core.List<api.User> o) { |
1263 unittest.expect(o, unittest.hasLength(2)); | 1385 unittest.expect(o, unittest.hasLength(2)); |
1264 checkUser(o[0]); | 1386 checkUser(o[0]); |
1265 checkUser(o[1]); | 1387 checkUser(o[1]); |
1266 } | 1388 } |
1267 | 1389 |
1268 core.int buildCounterUsersListResponse = 0; | 1390 core.int buildCounterUsersListResponse = 0; |
1269 buildUsersListResponse() { | 1391 buildUsersListResponse() { |
1270 var o = new api.UsersListResponse(); | 1392 var o = new api.UsersListResponse(); |
1271 buildCounterUsersListResponse++; | 1393 buildCounterUsersListResponse++; |
1272 if (buildCounterUsersListResponse < 3) { | 1394 if (buildCounterUsersListResponse < 3) { |
1273 o.items = buildUnnamed1662(); | 1395 o.items = buildUnnamed1815(); |
1274 o.kind = "foo"; | 1396 o.kind = "foo"; |
1275 o.nextPageToken = "foo"; | 1397 o.nextPageToken = "foo"; |
1276 } | 1398 } |
1277 buildCounterUsersListResponse--; | 1399 buildCounterUsersListResponse--; |
1278 return o; | 1400 return o; |
1279 } | 1401 } |
1280 | 1402 |
1281 checkUsersListResponse(api.UsersListResponse o) { | 1403 checkUsersListResponse(api.UsersListResponse o) { |
1282 buildCounterUsersListResponse++; | 1404 buildCounterUsersListResponse++; |
1283 if (buildCounterUsersListResponse < 3) { | 1405 if (buildCounterUsersListResponse < 3) { |
1284 checkUnnamed1662(o.items); | 1406 checkUnnamed1815(o.items); |
1285 unittest.expect(o.kind, unittest.equals('foo')); | 1407 unittest.expect(o.kind, unittest.equals('foo')); |
1286 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 1408 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
1287 } | 1409 } |
1288 buildCounterUsersListResponse--; | 1410 buildCounterUsersListResponse--; |
1289 } | 1411 } |
1290 | 1412 |
1291 | 1413 |
1292 main() { | 1414 main() { |
1293 unittest.group("obj-schema-AclEntry", () { | 1415 unittest.group("obj-schema-AclEntry", () { |
1294 unittest.test("to-json--from-json", () { | 1416 unittest.test("to-json--from-json", () { |
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1508 | 1630 |
1509 unittest.group("obj-schema-LocationPreference", () { | 1631 unittest.group("obj-schema-LocationPreference", () { |
1510 unittest.test("to-json--from-json", () { | 1632 unittest.test("to-json--from-json", () { |
1511 var o = buildLocationPreference(); | 1633 var o = buildLocationPreference(); |
1512 var od = new api.LocationPreference.fromJson(o.toJson()); | 1634 var od = new api.LocationPreference.fromJson(o.toJson()); |
1513 checkLocationPreference(od); | 1635 checkLocationPreference(od); |
1514 }); | 1636 }); |
1515 }); | 1637 }); |
1516 | 1638 |
1517 | 1639 |
| 1640 unittest.group("obj-schema-MySqlReplicaConfiguration", () { |
| 1641 unittest.test("to-json--from-json", () { |
| 1642 var o = buildMySqlReplicaConfiguration(); |
| 1643 var od = new api.MySqlReplicaConfiguration.fromJson(o.toJson()); |
| 1644 checkMySqlReplicaConfiguration(od); |
| 1645 }); |
| 1646 }); |
| 1647 |
| 1648 |
| 1649 unittest.group("obj-schema-OnPremisesConfiguration", () { |
| 1650 unittest.test("to-json--from-json", () { |
| 1651 var o = buildOnPremisesConfiguration(); |
| 1652 var od = new api.OnPremisesConfiguration.fromJson(o.toJson()); |
| 1653 checkOnPremisesConfiguration(od); |
| 1654 }); |
| 1655 }); |
| 1656 |
| 1657 |
1518 unittest.group("obj-schema-OperationError", () { | 1658 unittest.group("obj-schema-OperationError", () { |
1519 unittest.test("to-json--from-json", () { | 1659 unittest.test("to-json--from-json", () { |
1520 var o = buildOperationError(); | 1660 var o = buildOperationError(); |
1521 var od = new api.OperationError.fromJson(o.toJson()); | 1661 var od = new api.OperationError.fromJson(o.toJson()); |
1522 checkOperationError(od); | 1662 checkOperationError(od); |
1523 }); | 1663 }); |
1524 }); | 1664 }); |
1525 | 1665 |
1526 | 1666 |
1527 unittest.group("obj-schema-Operation", () { | 1667 unittest.group("obj-schema-Operation", () { |
(...skipping 16 matching lines...) Expand all Loading... |
1544 | 1684 |
1545 unittest.group("obj-schema-OperationsListResponse", () { | 1685 unittest.group("obj-schema-OperationsListResponse", () { |
1546 unittest.test("to-json--from-json", () { | 1686 unittest.test("to-json--from-json", () { |
1547 var o = buildOperationsListResponse(); | 1687 var o = buildOperationsListResponse(); |
1548 var od = new api.OperationsListResponse.fromJson(o.toJson()); | 1688 var od = new api.OperationsListResponse.fromJson(o.toJson()); |
1549 checkOperationsListResponse(od); | 1689 checkOperationsListResponse(od); |
1550 }); | 1690 }); |
1551 }); | 1691 }); |
1552 | 1692 |
1553 | 1693 |
| 1694 unittest.group("obj-schema-ReplicaConfiguration", () { |
| 1695 unittest.test("to-json--from-json", () { |
| 1696 var o = buildReplicaConfiguration(); |
| 1697 var od = new api.ReplicaConfiguration.fromJson(o.toJson()); |
| 1698 checkReplicaConfiguration(od); |
| 1699 }); |
| 1700 }); |
| 1701 |
| 1702 |
1554 unittest.group("obj-schema-RestoreBackupContext", () { | 1703 unittest.group("obj-schema-RestoreBackupContext", () { |
1555 unittest.test("to-json--from-json", () { | 1704 unittest.test("to-json--from-json", () { |
1556 var o = buildRestoreBackupContext(); | 1705 var o = buildRestoreBackupContext(); |
1557 var od = new api.RestoreBackupContext.fromJson(o.toJson()); | 1706 var od = new api.RestoreBackupContext.fromJson(o.toJson()); |
1558 checkRestoreBackupContext(od); | 1707 checkRestoreBackupContext(od); |
1559 }); | 1708 }); |
1560 }); | 1709 }); |
1561 | 1710 |
1562 | 1711 |
1563 unittest.group("obj-schema-Settings", () { | 1712 unittest.group("obj-schema-Settings", () { |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1646 var o = buildUsersListResponse(); | 1795 var o = buildUsersListResponse(); |
1647 var od = new api.UsersListResponse.fromJson(o.toJson()); | 1796 var od = new api.UsersListResponse.fromJson(o.toJson()); |
1648 checkUsersListResponse(od); | 1797 checkUsersListResponse(od); |
1649 }); | 1798 }); |
1650 }); | 1799 }); |
1651 | 1800 |
1652 | 1801 |
1653 unittest.group("resource-BackupRunsResourceApi", () { | 1802 unittest.group("resource-BackupRunsResourceApi", () { |
1654 unittest.test("method--get", () { | 1803 unittest.test("method--get", () { |
1655 | 1804 |
1656 var mock = new common_test.HttpServerMock(); | 1805 var mock = new HttpServerMock(); |
1657 api.BackupRunsResourceApi res = new api.SqladminApi(mock).backupRuns; | 1806 api.BackupRunsResourceApi res = new api.SqladminApi(mock).backupRuns; |
1658 var arg_project = "foo"; | 1807 var arg_project = "foo"; |
1659 var arg_instance = "foo"; | 1808 var arg_instance = "foo"; |
1660 var arg_id = "foo"; | 1809 var arg_id = "foo"; |
1661 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1810 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1662 var path = (req.url).path; | 1811 var path = (req.url).path; |
1663 var pathOffset = 0; | 1812 var pathOffset = 0; |
1664 var index; | 1813 var index; |
1665 var subPart; | 1814 var subPart; |
1666 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1815 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1702 var keyvalue = part.split("="); | 1851 var keyvalue = part.split("="); |
1703 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1852 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
1704 } | 1853 } |
1705 } | 1854 } |
1706 | 1855 |
1707 | 1856 |
1708 var h = { | 1857 var h = { |
1709 "content-type" : "application/json; charset=utf-8", | 1858 "content-type" : "application/json; charset=utf-8", |
1710 }; | 1859 }; |
1711 var resp = convert.JSON.encode(buildBackupRun()); | 1860 var resp = convert.JSON.encode(buildBackupRun()); |
1712 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 1861 return new async.Future.value(stringResponse(200, h, resp)); |
1713 }), true); | 1862 }), true); |
1714 res.get(arg_project, arg_instance, arg_id).then(unittest.expectAsync(((api
.BackupRun response) { | 1863 res.get(arg_project, arg_instance, arg_id).then(unittest.expectAsync(((api
.BackupRun response) { |
1715 checkBackupRun(response); | 1864 checkBackupRun(response); |
1716 }))); | 1865 }))); |
1717 }); | 1866 }); |
1718 | 1867 |
1719 unittest.test("method--list", () { | 1868 unittest.test("method--list", () { |
1720 | 1869 |
1721 var mock = new common_test.HttpServerMock(); | 1870 var mock = new HttpServerMock(); |
1722 api.BackupRunsResourceApi res = new api.SqladminApi(mock).backupRuns; | 1871 api.BackupRunsResourceApi res = new api.SqladminApi(mock).backupRuns; |
1723 var arg_project = "foo"; | 1872 var arg_project = "foo"; |
1724 var arg_instance = "foo"; | 1873 var arg_instance = "foo"; |
1725 var arg_maxResults = 42; | 1874 var arg_maxResults = 42; |
1726 var arg_pageToken = "foo"; | 1875 var arg_pageToken = "foo"; |
1727 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1876 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1728 var path = (req.url).path; | 1877 var path = (req.url).path; |
1729 var pathOffset = 0; | 1878 var pathOffset = 0; |
1730 var index; | 1879 var index; |
1731 var subPart; | 1880 var subPart; |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1767 } | 1916 } |
1768 } | 1917 } |
1769 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | 1918 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); |
1770 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 1919 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
1771 | 1920 |
1772 | 1921 |
1773 var h = { | 1922 var h = { |
1774 "content-type" : "application/json; charset=utf-8", | 1923 "content-type" : "application/json; charset=utf-8", |
1775 }; | 1924 }; |
1776 var resp = convert.JSON.encode(buildBackupRunsListResponse()); | 1925 var resp = convert.JSON.encode(buildBackupRunsListResponse()); |
1777 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 1926 return new async.Future.value(stringResponse(200, h, resp)); |
1778 }), true); | 1927 }), true); |
1779 res.list(arg_project, arg_instance, maxResults: arg_maxResults, pageToken:
arg_pageToken).then(unittest.expectAsync(((api.BackupRunsListResponse response)
{ | 1928 res.list(arg_project, arg_instance, maxResults: arg_maxResults, pageToken:
arg_pageToken).then(unittest.expectAsync(((api.BackupRunsListResponse response)
{ |
1780 checkBackupRunsListResponse(response); | 1929 checkBackupRunsListResponse(response); |
1781 }))); | 1930 }))); |
1782 }); | 1931 }); |
1783 | 1932 |
1784 }); | 1933 }); |
1785 | 1934 |
1786 | 1935 |
1787 unittest.group("resource-DatabasesResourceApi", () { | 1936 unittest.group("resource-DatabasesResourceApi", () { |
1788 unittest.test("method--delete", () { | 1937 unittest.test("method--delete", () { |
1789 | 1938 |
1790 var mock = new common_test.HttpServerMock(); | 1939 var mock = new HttpServerMock(); |
1791 api.DatabasesResourceApi res = new api.SqladminApi(mock).databases; | 1940 api.DatabasesResourceApi res = new api.SqladminApi(mock).databases; |
1792 var arg_project = "foo"; | 1941 var arg_project = "foo"; |
1793 var arg_instance = "foo"; | 1942 var arg_instance = "foo"; |
1794 var arg_database = "foo"; | 1943 var arg_database = "foo"; |
1795 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1944 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1796 var path = (req.url).path; | 1945 var path = (req.url).path; |
1797 var pathOffset = 0; | 1946 var pathOffset = 0; |
1798 var index; | 1947 var index; |
1799 var subPart; | 1948 var subPart; |
1800 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1949 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1836 var keyvalue = part.split("="); | 1985 var keyvalue = part.split("="); |
1837 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1986 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
1838 } | 1987 } |
1839 } | 1988 } |
1840 | 1989 |
1841 | 1990 |
1842 var h = { | 1991 var h = { |
1843 "content-type" : "application/json; charset=utf-8", | 1992 "content-type" : "application/json; charset=utf-8", |
1844 }; | 1993 }; |
1845 var resp = convert.JSON.encode(buildOperation()); | 1994 var resp = convert.JSON.encode(buildOperation()); |
1846 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 1995 return new async.Future.value(stringResponse(200, h, resp)); |
1847 }), true); | 1996 }), true); |
1848 res.delete(arg_project, arg_instance, arg_database).then(unittest.expectAs
ync(((api.Operation response) { | 1997 res.delete(arg_project, arg_instance, arg_database).then(unittest.expectAs
ync(((api.Operation response) { |
1849 checkOperation(response); | 1998 checkOperation(response); |
1850 }))); | 1999 }))); |
1851 }); | 2000 }); |
1852 | 2001 |
1853 unittest.test("method--get", () { | 2002 unittest.test("method--get", () { |
1854 | 2003 |
1855 var mock = new common_test.HttpServerMock(); | 2004 var mock = new HttpServerMock(); |
1856 api.DatabasesResourceApi res = new api.SqladminApi(mock).databases; | 2005 api.DatabasesResourceApi res = new api.SqladminApi(mock).databases; |
1857 var arg_project = "foo"; | 2006 var arg_project = "foo"; |
1858 var arg_instance = "foo"; | 2007 var arg_instance = "foo"; |
1859 var arg_database = "foo"; | 2008 var arg_database = "foo"; |
1860 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2009 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1861 var path = (req.url).path; | 2010 var path = (req.url).path; |
1862 var pathOffset = 0; | 2011 var pathOffset = 0; |
1863 var index; | 2012 var index; |
1864 var subPart; | 2013 var subPart; |
1865 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2014 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1901 var keyvalue = part.split("="); | 2050 var keyvalue = part.split("="); |
1902 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2051 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
1903 } | 2052 } |
1904 } | 2053 } |
1905 | 2054 |
1906 | 2055 |
1907 var h = { | 2056 var h = { |
1908 "content-type" : "application/json; charset=utf-8", | 2057 "content-type" : "application/json; charset=utf-8", |
1909 }; | 2058 }; |
1910 var resp = convert.JSON.encode(buildDatabase()); | 2059 var resp = convert.JSON.encode(buildDatabase()); |
1911 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2060 return new async.Future.value(stringResponse(200, h, resp)); |
1912 }), true); | 2061 }), true); |
1913 res.get(arg_project, arg_instance, arg_database).then(unittest.expectAsync
(((api.Database response) { | 2062 res.get(arg_project, arg_instance, arg_database).then(unittest.expectAsync
(((api.Database response) { |
1914 checkDatabase(response); | 2063 checkDatabase(response); |
1915 }))); | 2064 }))); |
1916 }); | 2065 }); |
1917 | 2066 |
1918 unittest.test("method--insert", () { | 2067 unittest.test("method--insert", () { |
1919 | 2068 |
1920 var mock = new common_test.HttpServerMock(); | 2069 var mock = new HttpServerMock(); |
1921 api.DatabasesResourceApi res = new api.SqladminApi(mock).databases; | 2070 api.DatabasesResourceApi res = new api.SqladminApi(mock).databases; |
1922 var arg_request = buildDatabase(); | 2071 var arg_request = buildDatabase(); |
1923 var arg_project = "foo"; | 2072 var arg_project = "foo"; |
1924 var arg_instance = "foo"; | 2073 var arg_instance = "foo"; |
1925 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2074 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1926 var obj = new api.Database.fromJson(json); | 2075 var obj = new api.Database.fromJson(json); |
1927 checkDatabase(obj); | 2076 checkDatabase(obj); |
1928 | 2077 |
1929 var path = (req.url).path; | 2078 var path = (req.url).path; |
1930 var pathOffset = 0; | 2079 var pathOffset = 0; |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1966 var keyvalue = part.split("="); | 2115 var keyvalue = part.split("="); |
1967 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2116 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
1968 } | 2117 } |
1969 } | 2118 } |
1970 | 2119 |
1971 | 2120 |
1972 var h = { | 2121 var h = { |
1973 "content-type" : "application/json; charset=utf-8", | 2122 "content-type" : "application/json; charset=utf-8", |
1974 }; | 2123 }; |
1975 var resp = convert.JSON.encode(buildOperation()); | 2124 var resp = convert.JSON.encode(buildOperation()); |
1976 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2125 return new async.Future.value(stringResponse(200, h, resp)); |
1977 }), true); | 2126 }), true); |
1978 res.insert(arg_request, arg_project, arg_instance).then(unittest.expectAsy
nc(((api.Operation response) { | 2127 res.insert(arg_request, arg_project, arg_instance).then(unittest.expectAsy
nc(((api.Operation response) { |
1979 checkOperation(response); | 2128 checkOperation(response); |
1980 }))); | 2129 }))); |
1981 }); | 2130 }); |
1982 | 2131 |
1983 unittest.test("method--list", () { | 2132 unittest.test("method--list", () { |
1984 | 2133 |
1985 var mock = new common_test.HttpServerMock(); | 2134 var mock = new HttpServerMock(); |
1986 api.DatabasesResourceApi res = new api.SqladminApi(mock).databases; | 2135 api.DatabasesResourceApi res = new api.SqladminApi(mock).databases; |
1987 var arg_project = "foo"; | 2136 var arg_project = "foo"; |
1988 var arg_instance = "foo"; | 2137 var arg_instance = "foo"; |
1989 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2138 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1990 var path = (req.url).path; | 2139 var path = (req.url).path; |
1991 var pathOffset = 0; | 2140 var pathOffset = 0; |
1992 var index; | 2141 var index; |
1993 var subPart; | 2142 var subPart; |
1994 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2143 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
1995 pathOffset += 1; | 2144 pathOffset += 1; |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2027 var keyvalue = part.split("="); | 2176 var keyvalue = part.split("="); |
2028 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2177 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
2029 } | 2178 } |
2030 } | 2179 } |
2031 | 2180 |
2032 | 2181 |
2033 var h = { | 2182 var h = { |
2034 "content-type" : "application/json; charset=utf-8", | 2183 "content-type" : "application/json; charset=utf-8", |
2035 }; | 2184 }; |
2036 var resp = convert.JSON.encode(buildDatabasesListResponse()); | 2185 var resp = convert.JSON.encode(buildDatabasesListResponse()); |
2037 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2186 return new async.Future.value(stringResponse(200, h, resp)); |
2038 }), true); | 2187 }), true); |
2039 res.list(arg_project, arg_instance).then(unittest.expectAsync(((api.Databa
sesListResponse response) { | 2188 res.list(arg_project, arg_instance).then(unittest.expectAsync(((api.Databa
sesListResponse response) { |
2040 checkDatabasesListResponse(response); | 2189 checkDatabasesListResponse(response); |
2041 }))); | 2190 }))); |
2042 }); | 2191 }); |
2043 | 2192 |
2044 unittest.test("method--patch", () { | 2193 unittest.test("method--patch", () { |
2045 | 2194 |
2046 var mock = new common_test.HttpServerMock(); | 2195 var mock = new HttpServerMock(); |
2047 api.DatabasesResourceApi res = new api.SqladminApi(mock).databases; | 2196 api.DatabasesResourceApi res = new api.SqladminApi(mock).databases; |
2048 var arg_request = buildDatabase(); | 2197 var arg_request = buildDatabase(); |
2049 var arg_project = "foo"; | 2198 var arg_project = "foo"; |
2050 var arg_instance = "foo"; | 2199 var arg_instance = "foo"; |
2051 var arg_database = "foo"; | 2200 var arg_database = "foo"; |
2052 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2201 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2053 var obj = new api.Database.fromJson(json); | 2202 var obj = new api.Database.fromJson(json); |
2054 checkDatabase(obj); | 2203 checkDatabase(obj); |
2055 | 2204 |
2056 var path = (req.url).path; | 2205 var path = (req.url).path; |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2096 var keyvalue = part.split("="); | 2245 var keyvalue = part.split("="); |
2097 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2246 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
2098 } | 2247 } |
2099 } | 2248 } |
2100 | 2249 |
2101 | 2250 |
2102 var h = { | 2251 var h = { |
2103 "content-type" : "application/json; charset=utf-8", | 2252 "content-type" : "application/json; charset=utf-8", |
2104 }; | 2253 }; |
2105 var resp = convert.JSON.encode(buildOperation()); | 2254 var resp = convert.JSON.encode(buildOperation()); |
2106 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2255 return new async.Future.value(stringResponse(200, h, resp)); |
2107 }), true); | 2256 }), true); |
2108 res.patch(arg_request, arg_project, arg_instance, arg_database).then(unitt
est.expectAsync(((api.Operation response) { | 2257 res.patch(arg_request, arg_project, arg_instance, arg_database).then(unitt
est.expectAsync(((api.Operation response) { |
2109 checkOperation(response); | 2258 checkOperation(response); |
2110 }))); | 2259 }))); |
2111 }); | 2260 }); |
2112 | 2261 |
2113 unittest.test("method--update", () { | 2262 unittest.test("method--update", () { |
2114 | 2263 |
2115 var mock = new common_test.HttpServerMock(); | 2264 var mock = new HttpServerMock(); |
2116 api.DatabasesResourceApi res = new api.SqladminApi(mock).databases; | 2265 api.DatabasesResourceApi res = new api.SqladminApi(mock).databases; |
2117 var arg_request = buildDatabase(); | 2266 var arg_request = buildDatabase(); |
2118 var arg_project = "foo"; | 2267 var arg_project = "foo"; |
2119 var arg_instance = "foo"; | 2268 var arg_instance = "foo"; |
2120 var arg_database = "foo"; | 2269 var arg_database = "foo"; |
2121 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2270 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2122 var obj = new api.Database.fromJson(json); | 2271 var obj = new api.Database.fromJson(json); |
2123 checkDatabase(obj); | 2272 checkDatabase(obj); |
2124 | 2273 |
2125 var path = (req.url).path; | 2274 var path = (req.url).path; |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2165 var keyvalue = part.split("="); | 2314 var keyvalue = part.split("="); |
2166 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2315 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
2167 } | 2316 } |
2168 } | 2317 } |
2169 | 2318 |
2170 | 2319 |
2171 var h = { | 2320 var h = { |
2172 "content-type" : "application/json; charset=utf-8", | 2321 "content-type" : "application/json; charset=utf-8", |
2173 }; | 2322 }; |
2174 var resp = convert.JSON.encode(buildOperation()); | 2323 var resp = convert.JSON.encode(buildOperation()); |
2175 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2324 return new async.Future.value(stringResponse(200, h, resp)); |
2176 }), true); | 2325 }), true); |
2177 res.update(arg_request, arg_project, arg_instance, arg_database).then(unit
test.expectAsync(((api.Operation response) { | 2326 res.update(arg_request, arg_project, arg_instance, arg_database).then(unit
test.expectAsync(((api.Operation response) { |
2178 checkOperation(response); | 2327 checkOperation(response); |
2179 }))); | 2328 }))); |
2180 }); | 2329 }); |
2181 | 2330 |
2182 }); | 2331 }); |
2183 | 2332 |
2184 | 2333 |
2185 unittest.group("resource-FlagsResourceApi", () { | 2334 unittest.group("resource-FlagsResourceApi", () { |
2186 unittest.test("method--list", () { | 2335 unittest.test("method--list", () { |
2187 | 2336 |
2188 var mock = new common_test.HttpServerMock(); | 2337 var mock = new HttpServerMock(); |
2189 api.FlagsResourceApi res = new api.SqladminApi(mock).flags; | 2338 api.FlagsResourceApi res = new api.SqladminApi(mock).flags; |
2190 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2339 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2191 var path = (req.url).path; | 2340 var path = (req.url).path; |
2192 var pathOffset = 0; | 2341 var pathOffset = 0; |
2193 var index; | 2342 var index; |
2194 var subPart; | 2343 var subPart; |
2195 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2344 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
2196 pathOffset += 1; | 2345 pathOffset += 1; |
2197 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta4/")); | 2346 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta4/")); |
2198 pathOffset += 12; | 2347 pathOffset += 12; |
(...skipping 15 matching lines...) Expand all Loading... |
2214 var keyvalue = part.split("="); | 2363 var keyvalue = part.split("="); |
2215 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2364 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
2216 } | 2365 } |
2217 } | 2366 } |
2218 | 2367 |
2219 | 2368 |
2220 var h = { | 2369 var h = { |
2221 "content-type" : "application/json; charset=utf-8", | 2370 "content-type" : "application/json; charset=utf-8", |
2222 }; | 2371 }; |
2223 var resp = convert.JSON.encode(buildFlagsListResponse()); | 2372 var resp = convert.JSON.encode(buildFlagsListResponse()); |
2224 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2373 return new async.Future.value(stringResponse(200, h, resp)); |
2225 }), true); | 2374 }), true); |
2226 res.list().then(unittest.expectAsync(((api.FlagsListResponse response) { | 2375 res.list().then(unittest.expectAsync(((api.FlagsListResponse response) { |
2227 checkFlagsListResponse(response); | 2376 checkFlagsListResponse(response); |
2228 }))); | 2377 }))); |
2229 }); | 2378 }); |
2230 | 2379 |
2231 }); | 2380 }); |
2232 | 2381 |
2233 | 2382 |
2234 unittest.group("resource-InstancesResourceApi", () { | 2383 unittest.group("resource-InstancesResourceApi", () { |
2235 unittest.test("method--clone", () { | 2384 unittest.test("method--clone", () { |
2236 | 2385 |
2237 var mock = new common_test.HttpServerMock(); | 2386 var mock = new HttpServerMock(); |
2238 api.InstancesResourceApi res = new api.SqladminApi(mock).instances; | 2387 api.InstancesResourceApi res = new api.SqladminApi(mock).instances; |
2239 var arg_request = buildInstancesCloneRequest(); | 2388 var arg_request = buildInstancesCloneRequest(); |
2240 var arg_project = "foo"; | 2389 var arg_project = "foo"; |
2241 var arg_instance = "foo"; | 2390 var arg_instance = "foo"; |
2242 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2391 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2243 var obj = new api.InstancesCloneRequest.fromJson(json); | 2392 var obj = new api.InstancesCloneRequest.fromJson(json); |
2244 checkInstancesCloneRequest(obj); | 2393 checkInstancesCloneRequest(obj); |
2245 | 2394 |
2246 var path = (req.url).path; | 2395 var path = (req.url).path; |
2247 var pathOffset = 0; | 2396 var pathOffset = 0; |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2283 var keyvalue = part.split("="); | 2432 var keyvalue = part.split("="); |
2284 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2433 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
2285 } | 2434 } |
2286 } | 2435 } |
2287 | 2436 |
2288 | 2437 |
2289 var h = { | 2438 var h = { |
2290 "content-type" : "application/json; charset=utf-8", | 2439 "content-type" : "application/json; charset=utf-8", |
2291 }; | 2440 }; |
2292 var resp = convert.JSON.encode(buildOperation()); | 2441 var resp = convert.JSON.encode(buildOperation()); |
2293 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2442 return new async.Future.value(stringResponse(200, h, resp)); |
2294 }), true); | 2443 }), true); |
2295 res.clone(arg_request, arg_project, arg_instance).then(unittest.expectAsyn
c(((api.Operation response) { | 2444 res.clone(arg_request, arg_project, arg_instance).then(unittest.expectAsyn
c(((api.Operation response) { |
2296 checkOperation(response); | 2445 checkOperation(response); |
2297 }))); | 2446 }))); |
2298 }); | 2447 }); |
2299 | 2448 |
2300 unittest.test("method--delete", () { | 2449 unittest.test("method--delete", () { |
2301 | 2450 |
2302 var mock = new common_test.HttpServerMock(); | 2451 var mock = new HttpServerMock(); |
2303 api.InstancesResourceApi res = new api.SqladminApi(mock).instances; | 2452 api.InstancesResourceApi res = new api.SqladminApi(mock).instances; |
2304 var arg_project = "foo"; | 2453 var arg_project = "foo"; |
2305 var arg_instance = "foo"; | 2454 var arg_instance = "foo"; |
2306 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2455 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2307 var path = (req.url).path; | 2456 var path = (req.url).path; |
2308 var pathOffset = 0; | 2457 var pathOffset = 0; |
2309 var index; | 2458 var index; |
2310 var subPart; | 2459 var subPart; |
2311 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2460 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
2312 pathOffset += 1; | 2461 pathOffset += 1; |
(...skipping 27 matching lines...) Expand all Loading... |
2340 var keyvalue = part.split("="); | 2489 var keyvalue = part.split("="); |
2341 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2490 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
2342 } | 2491 } |
2343 } | 2492 } |
2344 | 2493 |
2345 | 2494 |
2346 var h = { | 2495 var h = { |
2347 "content-type" : "application/json; charset=utf-8", | 2496 "content-type" : "application/json; charset=utf-8", |
2348 }; | 2497 }; |
2349 var resp = convert.JSON.encode(buildOperation()); | 2498 var resp = convert.JSON.encode(buildOperation()); |
2350 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2499 return new async.Future.value(stringResponse(200, h, resp)); |
2351 }), true); | 2500 }), true); |
2352 res.delete(arg_project, arg_instance).then(unittest.expectAsync(((api.Oper
ation response) { | 2501 res.delete(arg_project, arg_instance).then(unittest.expectAsync(((api.Oper
ation response) { |
2353 checkOperation(response); | 2502 checkOperation(response); |
2354 }))); | 2503 }))); |
2355 }); | 2504 }); |
2356 | 2505 |
2357 unittest.test("method--export", () { | 2506 unittest.test("method--export", () { |
2358 | 2507 |
2359 var mock = new common_test.HttpServerMock(); | 2508 var mock = new HttpServerMock(); |
2360 api.InstancesResourceApi res = new api.SqladminApi(mock).instances; | 2509 api.InstancesResourceApi res = new api.SqladminApi(mock).instances; |
2361 var arg_request = buildInstancesExportRequest(); | 2510 var arg_request = buildInstancesExportRequest(); |
2362 var arg_project = "foo"; | 2511 var arg_project = "foo"; |
2363 var arg_instance = "foo"; | 2512 var arg_instance = "foo"; |
2364 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2513 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2365 var obj = new api.InstancesExportRequest.fromJson(json); | 2514 var obj = new api.InstancesExportRequest.fromJson(json); |
2366 checkInstancesExportRequest(obj); | 2515 checkInstancesExportRequest(obj); |
2367 | 2516 |
2368 var path = (req.url).path; | 2517 var path = (req.url).path; |
2369 var pathOffset = 0; | 2518 var pathOffset = 0; |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2405 var keyvalue = part.split("="); | 2554 var keyvalue = part.split("="); |
2406 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2555 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
2407 } | 2556 } |
2408 } | 2557 } |
2409 | 2558 |
2410 | 2559 |
2411 var h = { | 2560 var h = { |
2412 "content-type" : "application/json; charset=utf-8", | 2561 "content-type" : "application/json; charset=utf-8", |
2413 }; | 2562 }; |
2414 var resp = convert.JSON.encode(buildOperation()); | 2563 var resp = convert.JSON.encode(buildOperation()); |
2415 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2564 return new async.Future.value(stringResponse(200, h, resp)); |
2416 }), true); | 2565 }), true); |
2417 res.export(arg_request, arg_project, arg_instance).then(unittest.expectAsy
nc(((api.Operation response) { | 2566 res.export(arg_request, arg_project, arg_instance).then(unittest.expectAsy
nc(((api.Operation response) { |
2418 checkOperation(response); | 2567 checkOperation(response); |
2419 }))); | 2568 }))); |
2420 }); | 2569 }); |
2421 | 2570 |
2422 unittest.test("method--get", () { | 2571 unittest.test("method--get", () { |
2423 | 2572 |
2424 var mock = new common_test.HttpServerMock(); | 2573 var mock = new HttpServerMock(); |
2425 api.InstancesResourceApi res = new api.SqladminApi(mock).instances; | 2574 api.InstancesResourceApi res = new api.SqladminApi(mock).instances; |
2426 var arg_project = "foo"; | 2575 var arg_project = "foo"; |
2427 var arg_instance = "foo"; | 2576 var arg_instance = "foo"; |
2428 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2577 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2429 var path = (req.url).path; | 2578 var path = (req.url).path; |
2430 var pathOffset = 0; | 2579 var pathOffset = 0; |
2431 var index; | 2580 var index; |
2432 var subPart; | 2581 var subPart; |
2433 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2582 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
2434 pathOffset += 1; | 2583 pathOffset += 1; |
(...skipping 27 matching lines...) Expand all Loading... |
2462 var keyvalue = part.split("="); | 2611 var keyvalue = part.split("="); |
2463 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2612 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
2464 } | 2613 } |
2465 } | 2614 } |
2466 | 2615 |
2467 | 2616 |
2468 var h = { | 2617 var h = { |
2469 "content-type" : "application/json; charset=utf-8", | 2618 "content-type" : "application/json; charset=utf-8", |
2470 }; | 2619 }; |
2471 var resp = convert.JSON.encode(buildDatabaseInstance()); | 2620 var resp = convert.JSON.encode(buildDatabaseInstance()); |
2472 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2621 return new async.Future.value(stringResponse(200, h, resp)); |
2473 }), true); | 2622 }), true); |
2474 res.get(arg_project, arg_instance).then(unittest.expectAsync(((api.Databas
eInstance response) { | 2623 res.get(arg_project, arg_instance).then(unittest.expectAsync(((api.Databas
eInstance response) { |
2475 checkDatabaseInstance(response); | 2624 checkDatabaseInstance(response); |
2476 }))); | 2625 }))); |
2477 }); | 2626 }); |
2478 | 2627 |
2479 unittest.test("method--import", () { | 2628 unittest.test("method--import", () { |
2480 | 2629 |
2481 var mock = new common_test.HttpServerMock(); | 2630 var mock = new HttpServerMock(); |
2482 api.InstancesResourceApi res = new api.SqladminApi(mock).instances; | 2631 api.InstancesResourceApi res = new api.SqladminApi(mock).instances; |
2483 var arg_request = buildInstancesImportRequest(); | 2632 var arg_request = buildInstancesImportRequest(); |
2484 var arg_project = "foo"; | 2633 var arg_project = "foo"; |
2485 var arg_instance = "foo"; | 2634 var arg_instance = "foo"; |
2486 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2635 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2487 var obj = new api.InstancesImportRequest.fromJson(json); | 2636 var obj = new api.InstancesImportRequest.fromJson(json); |
2488 checkInstancesImportRequest(obj); | 2637 checkInstancesImportRequest(obj); |
2489 | 2638 |
2490 var path = (req.url).path; | 2639 var path = (req.url).path; |
2491 var pathOffset = 0; | 2640 var pathOffset = 0; |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2527 var keyvalue = part.split("="); | 2676 var keyvalue = part.split("="); |
2528 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2677 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
2529 } | 2678 } |
2530 } | 2679 } |
2531 | 2680 |
2532 | 2681 |
2533 var h = { | 2682 var h = { |
2534 "content-type" : "application/json; charset=utf-8", | 2683 "content-type" : "application/json; charset=utf-8", |
2535 }; | 2684 }; |
2536 var resp = convert.JSON.encode(buildOperation()); | 2685 var resp = convert.JSON.encode(buildOperation()); |
2537 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2686 return new async.Future.value(stringResponse(200, h, resp)); |
2538 }), true); | 2687 }), true); |
2539 res.import(arg_request, arg_project, arg_instance).then(unittest.expectAsy
nc(((api.Operation response) { | 2688 res.import(arg_request, arg_project, arg_instance).then(unittest.expectAsy
nc(((api.Operation response) { |
2540 checkOperation(response); | 2689 checkOperation(response); |
2541 }))); | 2690 }))); |
2542 }); | 2691 }); |
2543 | 2692 |
2544 unittest.test("method--insert", () { | 2693 unittest.test("method--insert", () { |
2545 | 2694 |
2546 var mock = new common_test.HttpServerMock(); | 2695 var mock = new HttpServerMock(); |
2547 api.InstancesResourceApi res = new api.SqladminApi(mock).instances; | 2696 api.InstancesResourceApi res = new api.SqladminApi(mock).instances; |
2548 var arg_request = buildDatabaseInstance(); | 2697 var arg_request = buildDatabaseInstance(); |
2549 var arg_project = "foo"; | 2698 var arg_project = "foo"; |
2550 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2699 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2551 var obj = new api.DatabaseInstance.fromJson(json); | 2700 var obj = new api.DatabaseInstance.fromJson(json); |
2552 checkDatabaseInstance(obj); | 2701 checkDatabaseInstance(obj); |
2553 | 2702 |
2554 var path = (req.url).path; | 2703 var path = (req.url).path; |
2555 var pathOffset = 0; | 2704 var pathOffset = 0; |
2556 var index; | 2705 var index; |
(...skipping 27 matching lines...) Expand all Loading... |
2584 var keyvalue = part.split("="); | 2733 var keyvalue = part.split("="); |
2585 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2734 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
2586 } | 2735 } |
2587 } | 2736 } |
2588 | 2737 |
2589 | 2738 |
2590 var h = { | 2739 var h = { |
2591 "content-type" : "application/json; charset=utf-8", | 2740 "content-type" : "application/json; charset=utf-8", |
2592 }; | 2741 }; |
2593 var resp = convert.JSON.encode(buildOperation()); | 2742 var resp = convert.JSON.encode(buildOperation()); |
2594 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2743 return new async.Future.value(stringResponse(200, h, resp)); |
2595 }), true); | 2744 }), true); |
2596 res.insert(arg_request, arg_project).then(unittest.expectAsync(((api.Opera
tion response) { | 2745 res.insert(arg_request, arg_project).then(unittest.expectAsync(((api.Opera
tion response) { |
2597 checkOperation(response); | 2746 checkOperation(response); |
2598 }))); | 2747 }))); |
2599 }); | 2748 }); |
2600 | 2749 |
2601 unittest.test("method--list", () { | 2750 unittest.test("method--list", () { |
2602 | 2751 |
2603 var mock = new common_test.HttpServerMock(); | 2752 var mock = new HttpServerMock(); |
2604 api.InstancesResourceApi res = new api.SqladminApi(mock).instances; | 2753 api.InstancesResourceApi res = new api.SqladminApi(mock).instances; |
2605 var arg_project = "foo"; | 2754 var arg_project = "foo"; |
2606 var arg_maxResults = 42; | 2755 var arg_maxResults = 42; |
2607 var arg_pageToken = "foo"; | 2756 var arg_pageToken = "foo"; |
2608 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2757 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2609 var path = (req.url).path; | 2758 var path = (req.url).path; |
2610 var pathOffset = 0; | 2759 var pathOffset = 0; |
2611 var index; | 2760 var index; |
2612 var subPart; | 2761 var subPart; |
2613 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2762 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
(...skipping 27 matching lines...) Expand all Loading... |
2641 } | 2790 } |
2642 } | 2791 } |
2643 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | 2792 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); |
2644 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 2793 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
2645 | 2794 |
2646 | 2795 |
2647 var h = { | 2796 var h = { |
2648 "content-type" : "application/json; charset=utf-8", | 2797 "content-type" : "application/json; charset=utf-8", |
2649 }; | 2798 }; |
2650 var resp = convert.JSON.encode(buildInstancesListResponse()); | 2799 var resp = convert.JSON.encode(buildInstancesListResponse()); |
2651 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2800 return new async.Future.value(stringResponse(200, h, resp)); |
2652 }), true); | 2801 }), true); |
2653 res.list(arg_project, maxResults: arg_maxResults, pageToken: arg_pageToken
).then(unittest.expectAsync(((api.InstancesListResponse response) { | 2802 res.list(arg_project, maxResults: arg_maxResults, pageToken: arg_pageToken
).then(unittest.expectAsync(((api.InstancesListResponse response) { |
2654 checkInstancesListResponse(response); | 2803 checkInstancesListResponse(response); |
2655 }))); | 2804 }))); |
2656 }); | 2805 }); |
2657 | 2806 |
2658 unittest.test("method--patch", () { | 2807 unittest.test("method--patch", () { |
2659 | 2808 |
2660 var mock = new common_test.HttpServerMock(); | 2809 var mock = new HttpServerMock(); |
2661 api.InstancesResourceApi res = new api.SqladminApi(mock).instances; | 2810 api.InstancesResourceApi res = new api.SqladminApi(mock).instances; |
2662 var arg_request = buildDatabaseInstance(); | 2811 var arg_request = buildDatabaseInstance(); |
2663 var arg_project = "foo"; | 2812 var arg_project = "foo"; |
2664 var arg_instance = "foo"; | 2813 var arg_instance = "foo"; |
2665 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2814 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2666 var obj = new api.DatabaseInstance.fromJson(json); | 2815 var obj = new api.DatabaseInstance.fromJson(json); |
2667 checkDatabaseInstance(obj); | 2816 checkDatabaseInstance(obj); |
2668 | 2817 |
2669 var path = (req.url).path; | 2818 var path = (req.url).path; |
2670 var pathOffset = 0; | 2819 var pathOffset = 0; |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2702 var keyvalue = part.split("="); | 2851 var keyvalue = part.split("="); |
2703 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2852 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
2704 } | 2853 } |
2705 } | 2854 } |
2706 | 2855 |
2707 | 2856 |
2708 var h = { | 2857 var h = { |
2709 "content-type" : "application/json; charset=utf-8", | 2858 "content-type" : "application/json; charset=utf-8", |
2710 }; | 2859 }; |
2711 var resp = convert.JSON.encode(buildOperation()); | 2860 var resp = convert.JSON.encode(buildOperation()); |
2712 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2861 return new async.Future.value(stringResponse(200, h, resp)); |
2713 }), true); | 2862 }), true); |
2714 res.patch(arg_request, arg_project, arg_instance).then(unittest.expectAsyn
c(((api.Operation response) { | 2863 res.patch(arg_request, arg_project, arg_instance).then(unittest.expectAsyn
c(((api.Operation response) { |
2715 checkOperation(response); | 2864 checkOperation(response); |
2716 }))); | 2865 }))); |
2717 }); | 2866 }); |
2718 | 2867 |
2719 unittest.test("method--promoteReplica", () { | 2868 unittest.test("method--promoteReplica", () { |
2720 | 2869 |
2721 var mock = new common_test.HttpServerMock(); | 2870 var mock = new HttpServerMock(); |
2722 api.InstancesResourceApi res = new api.SqladminApi(mock).instances; | 2871 api.InstancesResourceApi res = new api.SqladminApi(mock).instances; |
2723 var arg_project = "foo"; | 2872 var arg_project = "foo"; |
2724 var arg_instance = "foo"; | 2873 var arg_instance = "foo"; |
2725 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2874 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2726 var path = (req.url).path; | 2875 var path = (req.url).path; |
2727 var pathOffset = 0; | 2876 var pathOffset = 0; |
2728 var index; | 2877 var index; |
2729 var subPart; | 2878 var subPart; |
2730 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2879 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
2731 pathOffset += 1; | 2880 pathOffset += 1; |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2763 var keyvalue = part.split("="); | 2912 var keyvalue = part.split("="); |
2764 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2913 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
2765 } | 2914 } |
2766 } | 2915 } |
2767 | 2916 |
2768 | 2917 |
2769 var h = { | 2918 var h = { |
2770 "content-type" : "application/json; charset=utf-8", | 2919 "content-type" : "application/json; charset=utf-8", |
2771 }; | 2920 }; |
2772 var resp = convert.JSON.encode(buildOperation()); | 2921 var resp = convert.JSON.encode(buildOperation()); |
2773 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2922 return new async.Future.value(stringResponse(200, h, resp)); |
2774 }), true); | 2923 }), true); |
2775 res.promoteReplica(arg_project, arg_instance).then(unittest.expectAsync(((
api.Operation response) { | 2924 res.promoteReplica(arg_project, arg_instance).then(unittest.expectAsync(((
api.Operation response) { |
2776 checkOperation(response); | 2925 checkOperation(response); |
2777 }))); | 2926 }))); |
2778 }); | 2927 }); |
2779 | 2928 |
2780 unittest.test("method--resetSslConfig", () { | 2929 unittest.test("method--resetSslConfig", () { |
2781 | 2930 |
2782 var mock = new common_test.HttpServerMock(); | 2931 var mock = new HttpServerMock(); |
2783 api.InstancesResourceApi res = new api.SqladminApi(mock).instances; | 2932 api.InstancesResourceApi res = new api.SqladminApi(mock).instances; |
2784 var arg_project = "foo"; | 2933 var arg_project = "foo"; |
2785 var arg_instance = "foo"; | 2934 var arg_instance = "foo"; |
2786 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2935 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2787 var path = (req.url).path; | 2936 var path = (req.url).path; |
2788 var pathOffset = 0; | 2937 var pathOffset = 0; |
2789 var index; | 2938 var index; |
2790 var subPart; | 2939 var subPart; |
2791 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2940 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
2792 pathOffset += 1; | 2941 pathOffset += 1; |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2824 var keyvalue = part.split("="); | 2973 var keyvalue = part.split("="); |
2825 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2974 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
2826 } | 2975 } |
2827 } | 2976 } |
2828 | 2977 |
2829 | 2978 |
2830 var h = { | 2979 var h = { |
2831 "content-type" : "application/json; charset=utf-8", | 2980 "content-type" : "application/json; charset=utf-8", |
2832 }; | 2981 }; |
2833 var resp = convert.JSON.encode(buildOperation()); | 2982 var resp = convert.JSON.encode(buildOperation()); |
2834 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2983 return new async.Future.value(stringResponse(200, h, resp)); |
2835 }), true); | 2984 }), true); |
2836 res.resetSslConfig(arg_project, arg_instance).then(unittest.expectAsync(((
api.Operation response) { | 2985 res.resetSslConfig(arg_project, arg_instance).then(unittest.expectAsync(((
api.Operation response) { |
2837 checkOperation(response); | 2986 checkOperation(response); |
2838 }))); | 2987 }))); |
2839 }); | 2988 }); |
2840 | 2989 |
2841 unittest.test("method--restart", () { | 2990 unittest.test("method--restart", () { |
2842 | 2991 |
2843 var mock = new common_test.HttpServerMock(); | 2992 var mock = new HttpServerMock(); |
2844 api.InstancesResourceApi res = new api.SqladminApi(mock).instances; | 2993 api.InstancesResourceApi res = new api.SqladminApi(mock).instances; |
2845 var arg_project = "foo"; | 2994 var arg_project = "foo"; |
2846 var arg_instance = "foo"; | 2995 var arg_instance = "foo"; |
2847 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2996 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2848 var path = (req.url).path; | 2997 var path = (req.url).path; |
2849 var pathOffset = 0; | 2998 var pathOffset = 0; |
2850 var index; | 2999 var index; |
2851 var subPart; | 3000 var subPart; |
2852 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3001 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
2853 pathOffset += 1; | 3002 pathOffset += 1; |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2885 var keyvalue = part.split("="); | 3034 var keyvalue = part.split("="); |
2886 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 3035 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
2887 } | 3036 } |
2888 } | 3037 } |
2889 | 3038 |
2890 | 3039 |
2891 var h = { | 3040 var h = { |
2892 "content-type" : "application/json; charset=utf-8", | 3041 "content-type" : "application/json; charset=utf-8", |
2893 }; | 3042 }; |
2894 var resp = convert.JSON.encode(buildOperation()); | 3043 var resp = convert.JSON.encode(buildOperation()); |
2895 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 3044 return new async.Future.value(stringResponse(200, h, resp)); |
2896 }), true); | 3045 }), true); |
2897 res.restart(arg_project, arg_instance).then(unittest.expectAsync(((api.Ope
ration response) { | 3046 res.restart(arg_project, arg_instance).then(unittest.expectAsync(((api.Ope
ration response) { |
2898 checkOperation(response); | 3047 checkOperation(response); |
2899 }))); | 3048 }))); |
2900 }); | 3049 }); |
2901 | 3050 |
2902 unittest.test("method--restoreBackup", () { | 3051 unittest.test("method--restoreBackup", () { |
2903 | 3052 |
2904 var mock = new common_test.HttpServerMock(); | 3053 var mock = new HttpServerMock(); |
2905 api.InstancesResourceApi res = new api.SqladminApi(mock).instances; | 3054 api.InstancesResourceApi res = new api.SqladminApi(mock).instances; |
2906 var arg_request = buildInstancesRestoreBackupRequest(); | 3055 var arg_request = buildInstancesRestoreBackupRequest(); |
2907 var arg_project = "foo"; | 3056 var arg_project = "foo"; |
2908 var arg_instance = "foo"; | 3057 var arg_instance = "foo"; |
2909 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3058 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2910 var obj = new api.InstancesRestoreBackupRequest.fromJson(json); | 3059 var obj = new api.InstancesRestoreBackupRequest.fromJson(json); |
2911 checkInstancesRestoreBackupRequest(obj); | 3060 checkInstancesRestoreBackupRequest(obj); |
2912 | 3061 |
2913 var path = (req.url).path; | 3062 var path = (req.url).path; |
2914 var pathOffset = 0; | 3063 var pathOffset = 0; |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2950 var keyvalue = part.split("="); | 3099 var keyvalue = part.split("="); |
2951 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 3100 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
2952 } | 3101 } |
2953 } | 3102 } |
2954 | 3103 |
2955 | 3104 |
2956 var h = { | 3105 var h = { |
2957 "content-type" : "application/json; charset=utf-8", | 3106 "content-type" : "application/json; charset=utf-8", |
2958 }; | 3107 }; |
2959 var resp = convert.JSON.encode(buildOperation()); | 3108 var resp = convert.JSON.encode(buildOperation()); |
2960 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 3109 return new async.Future.value(stringResponse(200, h, resp)); |
2961 }), true); | 3110 }), true); |
2962 res.restoreBackup(arg_request, arg_project, arg_instance).then(unittest.ex
pectAsync(((api.Operation response) { | 3111 res.restoreBackup(arg_request, arg_project, arg_instance).then(unittest.ex
pectAsync(((api.Operation response) { |
2963 checkOperation(response); | 3112 checkOperation(response); |
2964 }))); | 3113 }))); |
2965 }); | 3114 }); |
2966 | 3115 |
2967 unittest.test("method--startReplica", () { | 3116 unittest.test("method--startReplica", () { |
2968 | 3117 |
2969 var mock = new common_test.HttpServerMock(); | 3118 var mock = new HttpServerMock(); |
2970 api.InstancesResourceApi res = new api.SqladminApi(mock).instances; | 3119 api.InstancesResourceApi res = new api.SqladminApi(mock).instances; |
2971 var arg_project = "foo"; | 3120 var arg_project = "foo"; |
2972 var arg_instance = "foo"; | 3121 var arg_instance = "foo"; |
2973 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3122 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2974 var path = (req.url).path; | 3123 var path = (req.url).path; |
2975 var pathOffset = 0; | 3124 var pathOffset = 0; |
2976 var index; | 3125 var index; |
2977 var subPart; | 3126 var subPart; |
2978 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3127 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
2979 pathOffset += 1; | 3128 pathOffset += 1; |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3011 var keyvalue = part.split("="); | 3160 var keyvalue = part.split("="); |
3012 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 3161 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
3013 } | 3162 } |
3014 } | 3163 } |
3015 | 3164 |
3016 | 3165 |
3017 var h = { | 3166 var h = { |
3018 "content-type" : "application/json; charset=utf-8", | 3167 "content-type" : "application/json; charset=utf-8", |
3019 }; | 3168 }; |
3020 var resp = convert.JSON.encode(buildOperation()); | 3169 var resp = convert.JSON.encode(buildOperation()); |
3021 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 3170 return new async.Future.value(stringResponse(200, h, resp)); |
3022 }), true); | 3171 }), true); |
3023 res.startReplica(arg_project, arg_instance).then(unittest.expectAsync(((ap
i.Operation response) { | 3172 res.startReplica(arg_project, arg_instance).then(unittest.expectAsync(((ap
i.Operation response) { |
3024 checkOperation(response); | 3173 checkOperation(response); |
3025 }))); | 3174 }))); |
3026 }); | 3175 }); |
3027 | 3176 |
3028 unittest.test("method--stopReplica", () { | 3177 unittest.test("method--stopReplica", () { |
3029 | 3178 |
3030 var mock = new common_test.HttpServerMock(); | 3179 var mock = new HttpServerMock(); |
3031 api.InstancesResourceApi res = new api.SqladminApi(mock).instances; | 3180 api.InstancesResourceApi res = new api.SqladminApi(mock).instances; |
3032 var arg_project = "foo"; | 3181 var arg_project = "foo"; |
3033 var arg_instance = "foo"; | 3182 var arg_instance = "foo"; |
3034 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3183 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
3035 var path = (req.url).path; | 3184 var path = (req.url).path; |
3036 var pathOffset = 0; | 3185 var pathOffset = 0; |
3037 var index; | 3186 var index; |
3038 var subPart; | 3187 var subPart; |
3039 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3188 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
3040 pathOffset += 1; | 3189 pathOffset += 1; |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3072 var keyvalue = part.split("="); | 3221 var keyvalue = part.split("="); |
3073 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 3222 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
3074 } | 3223 } |
3075 } | 3224 } |
3076 | 3225 |
3077 | 3226 |
3078 var h = { | 3227 var h = { |
3079 "content-type" : "application/json; charset=utf-8", | 3228 "content-type" : "application/json; charset=utf-8", |
3080 }; | 3229 }; |
3081 var resp = convert.JSON.encode(buildOperation()); | 3230 var resp = convert.JSON.encode(buildOperation()); |
3082 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 3231 return new async.Future.value(stringResponse(200, h, resp)); |
3083 }), true); | 3232 }), true); |
3084 res.stopReplica(arg_project, arg_instance).then(unittest.expectAsync(((api
.Operation response) { | 3233 res.stopReplica(arg_project, arg_instance).then(unittest.expectAsync(((api
.Operation response) { |
3085 checkOperation(response); | 3234 checkOperation(response); |
3086 }))); | 3235 }))); |
3087 }); | 3236 }); |
3088 | 3237 |
3089 unittest.test("method--update", () { | 3238 unittest.test("method--update", () { |
3090 | 3239 |
3091 var mock = new common_test.HttpServerMock(); | 3240 var mock = new HttpServerMock(); |
3092 api.InstancesResourceApi res = new api.SqladminApi(mock).instances; | 3241 api.InstancesResourceApi res = new api.SqladminApi(mock).instances; |
3093 var arg_request = buildDatabaseInstance(); | 3242 var arg_request = buildDatabaseInstance(); |
3094 var arg_project = "foo"; | 3243 var arg_project = "foo"; |
3095 var arg_instance = "foo"; | 3244 var arg_instance = "foo"; |
3096 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3245 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
3097 var obj = new api.DatabaseInstance.fromJson(json); | 3246 var obj = new api.DatabaseInstance.fromJson(json); |
3098 checkDatabaseInstance(obj); | 3247 checkDatabaseInstance(obj); |
3099 | 3248 |
3100 var path = (req.url).path; | 3249 var path = (req.url).path; |
3101 var pathOffset = 0; | 3250 var pathOffset = 0; |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3133 var keyvalue = part.split("="); | 3282 var keyvalue = part.split("="); |
3134 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 3283 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
3135 } | 3284 } |
3136 } | 3285 } |
3137 | 3286 |
3138 | 3287 |
3139 var h = { | 3288 var h = { |
3140 "content-type" : "application/json; charset=utf-8", | 3289 "content-type" : "application/json; charset=utf-8", |
3141 }; | 3290 }; |
3142 var resp = convert.JSON.encode(buildOperation()); | 3291 var resp = convert.JSON.encode(buildOperation()); |
3143 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 3292 return new async.Future.value(stringResponse(200, h, resp)); |
3144 }), true); | 3293 }), true); |
3145 res.update(arg_request, arg_project, arg_instance).then(unittest.expectAsy
nc(((api.Operation response) { | 3294 res.update(arg_request, arg_project, arg_instance).then(unittest.expectAsy
nc(((api.Operation response) { |
3146 checkOperation(response); | 3295 checkOperation(response); |
3147 }))); | 3296 }))); |
3148 }); | 3297 }); |
3149 | 3298 |
3150 }); | 3299 }); |
3151 | 3300 |
3152 | 3301 |
3153 unittest.group("resource-OperationsResourceApi", () { | 3302 unittest.group("resource-OperationsResourceApi", () { |
3154 unittest.test("method--get", () { | 3303 unittest.test("method--get", () { |
3155 | 3304 |
3156 var mock = new common_test.HttpServerMock(); | 3305 var mock = new HttpServerMock(); |
3157 api.OperationsResourceApi res = new api.SqladminApi(mock).operations; | 3306 api.OperationsResourceApi res = new api.SqladminApi(mock).operations; |
3158 var arg_project = "foo"; | 3307 var arg_project = "foo"; |
3159 var arg_operation = "foo"; | 3308 var arg_operation = "foo"; |
3160 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3309 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
3161 var path = (req.url).path; | 3310 var path = (req.url).path; |
3162 var pathOffset = 0; | 3311 var pathOffset = 0; |
3163 var index; | 3312 var index; |
3164 var subPart; | 3313 var subPart; |
3165 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3314 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
3166 pathOffset += 1; | 3315 pathOffset += 1; |
(...skipping 27 matching lines...) Expand all Loading... |
3194 var keyvalue = part.split("="); | 3343 var keyvalue = part.split("="); |
3195 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 3344 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
3196 } | 3345 } |
3197 } | 3346 } |
3198 | 3347 |
3199 | 3348 |
3200 var h = { | 3349 var h = { |
3201 "content-type" : "application/json; charset=utf-8", | 3350 "content-type" : "application/json; charset=utf-8", |
3202 }; | 3351 }; |
3203 var resp = convert.JSON.encode(buildOperation()); | 3352 var resp = convert.JSON.encode(buildOperation()); |
3204 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 3353 return new async.Future.value(stringResponse(200, h, resp)); |
3205 }), true); | 3354 }), true); |
3206 res.get(arg_project, arg_operation).then(unittest.expectAsync(((api.Operat
ion response) { | 3355 res.get(arg_project, arg_operation).then(unittest.expectAsync(((api.Operat
ion response) { |
3207 checkOperation(response); | 3356 checkOperation(response); |
3208 }))); | 3357 }))); |
3209 }); | 3358 }); |
3210 | 3359 |
3211 unittest.test("method--list", () { | 3360 unittest.test("method--list", () { |
3212 | 3361 |
3213 var mock = new common_test.HttpServerMock(); | 3362 var mock = new HttpServerMock(); |
3214 api.OperationsResourceApi res = new api.SqladminApi(mock).operations; | 3363 api.OperationsResourceApi res = new api.SqladminApi(mock).operations; |
3215 var arg_project = "foo"; | 3364 var arg_project = "foo"; |
3216 var arg_instance = "foo"; | 3365 var arg_instance = "foo"; |
3217 var arg_maxResults = 42; | 3366 var arg_maxResults = 42; |
3218 var arg_pageToken = "foo"; | 3367 var arg_pageToken = "foo"; |
3219 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3368 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
3220 var path = (req.url).path; | 3369 var path = (req.url).path; |
3221 var pathOffset = 0; | 3370 var pathOffset = 0; |
3222 var index; | 3371 var index; |
3223 var subPart; | 3372 var subPart; |
(...skipping 29 matching lines...) Expand all Loading... |
3253 } | 3402 } |
3254 unittest.expect(queryMap["instance"].first, unittest.equals(arg_instance
)); | 3403 unittest.expect(queryMap["instance"].first, unittest.equals(arg_instance
)); |
3255 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | 3404 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); |
3256 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 3405 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
3257 | 3406 |
3258 | 3407 |
3259 var h = { | 3408 var h = { |
3260 "content-type" : "application/json; charset=utf-8", | 3409 "content-type" : "application/json; charset=utf-8", |
3261 }; | 3410 }; |
3262 var resp = convert.JSON.encode(buildOperationsListResponse()); | 3411 var resp = convert.JSON.encode(buildOperationsListResponse()); |
3263 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 3412 return new async.Future.value(stringResponse(200, h, resp)); |
3264 }), true); | 3413 }), true); |
3265 res.list(arg_project, arg_instance, maxResults: arg_maxResults, pageToken:
arg_pageToken).then(unittest.expectAsync(((api.OperationsListResponse response)
{ | 3414 res.list(arg_project, arg_instance, maxResults: arg_maxResults, pageToken:
arg_pageToken).then(unittest.expectAsync(((api.OperationsListResponse response)
{ |
3266 checkOperationsListResponse(response); | 3415 checkOperationsListResponse(response); |
3267 }))); | 3416 }))); |
3268 }); | 3417 }); |
3269 | 3418 |
3270 }); | 3419 }); |
3271 | 3420 |
3272 | 3421 |
3273 unittest.group("resource-SslCertsResourceApi", () { | 3422 unittest.group("resource-SslCertsResourceApi", () { |
3274 unittest.test("method--delete", () { | 3423 unittest.test("method--delete", () { |
3275 | 3424 |
3276 var mock = new common_test.HttpServerMock(); | 3425 var mock = new HttpServerMock(); |
3277 api.SslCertsResourceApi res = new api.SqladminApi(mock).sslCerts; | 3426 api.SslCertsResourceApi res = new api.SqladminApi(mock).sslCerts; |
3278 var arg_project = "foo"; | 3427 var arg_project = "foo"; |
3279 var arg_instance = "foo"; | 3428 var arg_instance = "foo"; |
3280 var arg_sha1Fingerprint = "foo"; | 3429 var arg_sha1Fingerprint = "foo"; |
3281 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3430 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
3282 var path = (req.url).path; | 3431 var path = (req.url).path; |
3283 var pathOffset = 0; | 3432 var pathOffset = 0; |
3284 var index; | 3433 var index; |
3285 var subPart; | 3434 var subPart; |
3286 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3435 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3322 var keyvalue = part.split("="); | 3471 var keyvalue = part.split("="); |
3323 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 3472 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
3324 } | 3473 } |
3325 } | 3474 } |
3326 | 3475 |
3327 | 3476 |
3328 var h = { | 3477 var h = { |
3329 "content-type" : "application/json; charset=utf-8", | 3478 "content-type" : "application/json; charset=utf-8", |
3330 }; | 3479 }; |
3331 var resp = convert.JSON.encode(buildOperation()); | 3480 var resp = convert.JSON.encode(buildOperation()); |
3332 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 3481 return new async.Future.value(stringResponse(200, h, resp)); |
3333 }), true); | 3482 }), true); |
3334 res.delete(arg_project, arg_instance, arg_sha1Fingerprint).then(unittest.e
xpectAsync(((api.Operation response) { | 3483 res.delete(arg_project, arg_instance, arg_sha1Fingerprint).then(unittest.e
xpectAsync(((api.Operation response) { |
3335 checkOperation(response); | 3484 checkOperation(response); |
3336 }))); | 3485 }))); |
3337 }); | 3486 }); |
3338 | 3487 |
3339 unittest.test("method--get", () { | 3488 unittest.test("method--get", () { |
3340 | 3489 |
3341 var mock = new common_test.HttpServerMock(); | 3490 var mock = new HttpServerMock(); |
3342 api.SslCertsResourceApi res = new api.SqladminApi(mock).sslCerts; | 3491 api.SslCertsResourceApi res = new api.SqladminApi(mock).sslCerts; |
3343 var arg_project = "foo"; | 3492 var arg_project = "foo"; |
3344 var arg_instance = "foo"; | 3493 var arg_instance = "foo"; |
3345 var arg_sha1Fingerprint = "foo"; | 3494 var arg_sha1Fingerprint = "foo"; |
3346 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3495 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
3347 var path = (req.url).path; | 3496 var path = (req.url).path; |
3348 var pathOffset = 0; | 3497 var pathOffset = 0; |
3349 var index; | 3498 var index; |
3350 var subPart; | 3499 var subPart; |
3351 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3500 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3387 var keyvalue = part.split("="); | 3536 var keyvalue = part.split("="); |
3388 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 3537 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
3389 } | 3538 } |
3390 } | 3539 } |
3391 | 3540 |
3392 | 3541 |
3393 var h = { | 3542 var h = { |
3394 "content-type" : "application/json; charset=utf-8", | 3543 "content-type" : "application/json; charset=utf-8", |
3395 }; | 3544 }; |
3396 var resp = convert.JSON.encode(buildSslCert()); | 3545 var resp = convert.JSON.encode(buildSslCert()); |
3397 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 3546 return new async.Future.value(stringResponse(200, h, resp)); |
3398 }), true); | 3547 }), true); |
3399 res.get(arg_project, arg_instance, arg_sha1Fingerprint).then(unittest.expe
ctAsync(((api.SslCert response) { | 3548 res.get(arg_project, arg_instance, arg_sha1Fingerprint).then(unittest.expe
ctAsync(((api.SslCert response) { |
3400 checkSslCert(response); | 3549 checkSslCert(response); |
3401 }))); | 3550 }))); |
3402 }); | 3551 }); |
3403 | 3552 |
3404 unittest.test("method--insert", () { | 3553 unittest.test("method--insert", () { |
3405 | 3554 |
3406 var mock = new common_test.HttpServerMock(); | 3555 var mock = new HttpServerMock(); |
3407 api.SslCertsResourceApi res = new api.SqladminApi(mock).sslCerts; | 3556 api.SslCertsResourceApi res = new api.SqladminApi(mock).sslCerts; |
3408 var arg_request = buildSslCertsInsertRequest(); | 3557 var arg_request = buildSslCertsInsertRequest(); |
3409 var arg_project = "foo"; | 3558 var arg_project = "foo"; |
3410 var arg_instance = "foo"; | 3559 var arg_instance = "foo"; |
3411 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3560 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
3412 var obj = new api.SslCertsInsertRequest.fromJson(json); | 3561 var obj = new api.SslCertsInsertRequest.fromJson(json); |
3413 checkSslCertsInsertRequest(obj); | 3562 checkSslCertsInsertRequest(obj); |
3414 | 3563 |
3415 var path = (req.url).path; | 3564 var path = (req.url).path; |
3416 var pathOffset = 0; | 3565 var pathOffset = 0; |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3452 var keyvalue = part.split("="); | 3601 var keyvalue = part.split("="); |
3453 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 3602 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
3454 } | 3603 } |
3455 } | 3604 } |
3456 | 3605 |
3457 | 3606 |
3458 var h = { | 3607 var h = { |
3459 "content-type" : "application/json; charset=utf-8", | 3608 "content-type" : "application/json; charset=utf-8", |
3460 }; | 3609 }; |
3461 var resp = convert.JSON.encode(buildSslCertsInsertResponse()); | 3610 var resp = convert.JSON.encode(buildSslCertsInsertResponse()); |
3462 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 3611 return new async.Future.value(stringResponse(200, h, resp)); |
3463 }), true); | 3612 }), true); |
3464 res.insert(arg_request, arg_project, arg_instance).then(unittest.expectAsy
nc(((api.SslCertsInsertResponse response) { | 3613 res.insert(arg_request, arg_project, arg_instance).then(unittest.expectAsy
nc(((api.SslCertsInsertResponse response) { |
3465 checkSslCertsInsertResponse(response); | 3614 checkSslCertsInsertResponse(response); |
3466 }))); | 3615 }))); |
3467 }); | 3616 }); |
3468 | 3617 |
3469 unittest.test("method--list", () { | 3618 unittest.test("method--list", () { |
3470 | 3619 |
3471 var mock = new common_test.HttpServerMock(); | 3620 var mock = new HttpServerMock(); |
3472 api.SslCertsResourceApi res = new api.SqladminApi(mock).sslCerts; | 3621 api.SslCertsResourceApi res = new api.SqladminApi(mock).sslCerts; |
3473 var arg_project = "foo"; | 3622 var arg_project = "foo"; |
3474 var arg_instance = "foo"; | 3623 var arg_instance = "foo"; |
3475 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3624 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
3476 var path = (req.url).path; | 3625 var path = (req.url).path; |
3477 var pathOffset = 0; | 3626 var pathOffset = 0; |
3478 var index; | 3627 var index; |
3479 var subPart; | 3628 var subPart; |
3480 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3629 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
3481 pathOffset += 1; | 3630 pathOffset += 1; |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3513 var keyvalue = part.split("="); | 3662 var keyvalue = part.split("="); |
3514 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 3663 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
3515 } | 3664 } |
3516 } | 3665 } |
3517 | 3666 |
3518 | 3667 |
3519 var h = { | 3668 var h = { |
3520 "content-type" : "application/json; charset=utf-8", | 3669 "content-type" : "application/json; charset=utf-8", |
3521 }; | 3670 }; |
3522 var resp = convert.JSON.encode(buildSslCertsListResponse()); | 3671 var resp = convert.JSON.encode(buildSslCertsListResponse()); |
3523 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 3672 return new async.Future.value(stringResponse(200, h, resp)); |
3524 }), true); | 3673 }), true); |
3525 res.list(arg_project, arg_instance).then(unittest.expectAsync(((api.SslCer
tsListResponse response) { | 3674 res.list(arg_project, arg_instance).then(unittest.expectAsync(((api.SslCer
tsListResponse response) { |
3526 checkSslCertsListResponse(response); | 3675 checkSslCertsListResponse(response); |
3527 }))); | 3676 }))); |
3528 }); | 3677 }); |
3529 | 3678 |
3530 }); | 3679 }); |
3531 | 3680 |
3532 | 3681 |
3533 unittest.group("resource-TiersResourceApi", () { | 3682 unittest.group("resource-TiersResourceApi", () { |
3534 unittest.test("method--list", () { | 3683 unittest.test("method--list", () { |
3535 | 3684 |
3536 var mock = new common_test.HttpServerMock(); | 3685 var mock = new HttpServerMock(); |
3537 api.TiersResourceApi res = new api.SqladminApi(mock).tiers; | 3686 api.TiersResourceApi res = new api.SqladminApi(mock).tiers; |
3538 var arg_project = "foo"; | 3687 var arg_project = "foo"; |
3539 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3688 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
3540 var path = (req.url).path; | 3689 var path = (req.url).path; |
3541 var pathOffset = 0; | 3690 var pathOffset = 0; |
3542 var index; | 3691 var index; |
3543 var subPart; | 3692 var subPart; |
3544 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3693 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
3545 pathOffset += 1; | 3694 pathOffset += 1; |
3546 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta4/")); | 3695 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta4/")); |
(...skipping 23 matching lines...) Expand all Loading... |
3570 var keyvalue = part.split("="); | 3719 var keyvalue = part.split("="); |
3571 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 3720 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
3572 } | 3721 } |
3573 } | 3722 } |
3574 | 3723 |
3575 | 3724 |
3576 var h = { | 3725 var h = { |
3577 "content-type" : "application/json; charset=utf-8", | 3726 "content-type" : "application/json; charset=utf-8", |
3578 }; | 3727 }; |
3579 var resp = convert.JSON.encode(buildTiersListResponse()); | 3728 var resp = convert.JSON.encode(buildTiersListResponse()); |
3580 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 3729 return new async.Future.value(stringResponse(200, h, resp)); |
3581 }), true); | 3730 }), true); |
3582 res.list(arg_project).then(unittest.expectAsync(((api.TiersListResponse re
sponse) { | 3731 res.list(arg_project).then(unittest.expectAsync(((api.TiersListResponse re
sponse) { |
3583 checkTiersListResponse(response); | 3732 checkTiersListResponse(response); |
3584 }))); | 3733 }))); |
3585 }); | 3734 }); |
3586 | 3735 |
3587 }); | 3736 }); |
3588 | 3737 |
3589 | 3738 |
3590 unittest.group("resource-UsersResourceApi", () { | 3739 unittest.group("resource-UsersResourceApi", () { |
3591 unittest.test("method--delete", () { | 3740 unittest.test("method--delete", () { |
3592 | 3741 |
3593 var mock = new common_test.HttpServerMock(); | 3742 var mock = new HttpServerMock(); |
3594 api.UsersResourceApi res = new api.SqladminApi(mock).users; | 3743 api.UsersResourceApi res = new api.SqladminApi(mock).users; |
3595 var arg_project = "foo"; | 3744 var arg_project = "foo"; |
3596 var arg_instance = "foo"; | 3745 var arg_instance = "foo"; |
3597 var arg_host = "foo"; | 3746 var arg_host = "foo"; |
3598 var arg_name = "foo"; | 3747 var arg_name = "foo"; |
3599 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3748 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
3600 var path = (req.url).path; | 3749 var path = (req.url).path; |
3601 var pathOffset = 0; | 3750 var pathOffset = 0; |
3602 var index; | 3751 var index; |
3603 var subPart; | 3752 var subPart; |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3639 } | 3788 } |
3640 } | 3789 } |
3641 unittest.expect(queryMap["host"].first, unittest.equals(arg_host)); | 3790 unittest.expect(queryMap["host"].first, unittest.equals(arg_host)); |
3642 unittest.expect(queryMap["name"].first, unittest.equals(arg_name)); | 3791 unittest.expect(queryMap["name"].first, unittest.equals(arg_name)); |
3643 | 3792 |
3644 | 3793 |
3645 var h = { | 3794 var h = { |
3646 "content-type" : "application/json; charset=utf-8", | 3795 "content-type" : "application/json; charset=utf-8", |
3647 }; | 3796 }; |
3648 var resp = convert.JSON.encode(buildOperation()); | 3797 var resp = convert.JSON.encode(buildOperation()); |
3649 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 3798 return new async.Future.value(stringResponse(200, h, resp)); |
3650 }), true); | 3799 }), true); |
3651 res.delete(arg_project, arg_instance, arg_host, arg_name).then(unittest.ex
pectAsync(((api.Operation response) { | 3800 res.delete(arg_project, arg_instance, arg_host, arg_name).then(unittest.ex
pectAsync(((api.Operation response) { |
3652 checkOperation(response); | 3801 checkOperation(response); |
3653 }))); | 3802 }))); |
3654 }); | 3803 }); |
3655 | 3804 |
3656 unittest.test("method--insert", () { | 3805 unittest.test("method--insert", () { |
3657 | 3806 |
3658 var mock = new common_test.HttpServerMock(); | 3807 var mock = new HttpServerMock(); |
3659 api.UsersResourceApi res = new api.SqladminApi(mock).users; | 3808 api.UsersResourceApi res = new api.SqladminApi(mock).users; |
3660 var arg_request = buildUser(); | 3809 var arg_request = buildUser(); |
3661 var arg_project = "foo"; | 3810 var arg_project = "foo"; |
3662 var arg_instance = "foo"; | 3811 var arg_instance = "foo"; |
3663 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3812 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
3664 var obj = new api.User.fromJson(json); | 3813 var obj = new api.User.fromJson(json); |
3665 checkUser(obj); | 3814 checkUser(obj); |
3666 | 3815 |
3667 var path = (req.url).path; | 3816 var path = (req.url).path; |
3668 var pathOffset = 0; | 3817 var pathOffset = 0; |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3704 var keyvalue = part.split("="); | 3853 var keyvalue = part.split("="); |
3705 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 3854 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
3706 } | 3855 } |
3707 } | 3856 } |
3708 | 3857 |
3709 | 3858 |
3710 var h = { | 3859 var h = { |
3711 "content-type" : "application/json; charset=utf-8", | 3860 "content-type" : "application/json; charset=utf-8", |
3712 }; | 3861 }; |
3713 var resp = convert.JSON.encode(buildOperation()); | 3862 var resp = convert.JSON.encode(buildOperation()); |
3714 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 3863 return new async.Future.value(stringResponse(200, h, resp)); |
3715 }), true); | 3864 }), true); |
3716 res.insert(arg_request, arg_project, arg_instance).then(unittest.expectAsy
nc(((api.Operation response) { | 3865 res.insert(arg_request, arg_project, arg_instance).then(unittest.expectAsy
nc(((api.Operation response) { |
3717 checkOperation(response); | 3866 checkOperation(response); |
3718 }))); | 3867 }))); |
3719 }); | 3868 }); |
3720 | 3869 |
3721 unittest.test("method--list", () { | 3870 unittest.test("method--list", () { |
3722 | 3871 |
3723 var mock = new common_test.HttpServerMock(); | 3872 var mock = new HttpServerMock(); |
3724 api.UsersResourceApi res = new api.SqladminApi(mock).users; | 3873 api.UsersResourceApi res = new api.SqladminApi(mock).users; |
3725 var arg_project = "foo"; | 3874 var arg_project = "foo"; |
3726 var arg_instance = "foo"; | 3875 var arg_instance = "foo"; |
3727 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3876 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
3728 var path = (req.url).path; | 3877 var path = (req.url).path; |
3729 var pathOffset = 0; | 3878 var pathOffset = 0; |
3730 var index; | 3879 var index; |
3731 var subPart; | 3880 var subPart; |
3732 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3881 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
3733 pathOffset += 1; | 3882 pathOffset += 1; |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3765 var keyvalue = part.split("="); | 3914 var keyvalue = part.split("="); |
3766 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 3915 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
3767 } | 3916 } |
3768 } | 3917 } |
3769 | 3918 |
3770 | 3919 |
3771 var h = { | 3920 var h = { |
3772 "content-type" : "application/json; charset=utf-8", | 3921 "content-type" : "application/json; charset=utf-8", |
3773 }; | 3922 }; |
3774 var resp = convert.JSON.encode(buildUsersListResponse()); | 3923 var resp = convert.JSON.encode(buildUsersListResponse()); |
3775 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 3924 return new async.Future.value(stringResponse(200, h, resp)); |
3776 }), true); | 3925 }), true); |
3777 res.list(arg_project, arg_instance).then(unittest.expectAsync(((api.UsersL
istResponse response) { | 3926 res.list(arg_project, arg_instance).then(unittest.expectAsync(((api.UsersL
istResponse response) { |
3778 checkUsersListResponse(response); | 3927 checkUsersListResponse(response); |
3779 }))); | 3928 }))); |
3780 }); | 3929 }); |
3781 | 3930 |
3782 unittest.test("method--update", () { | 3931 unittest.test("method--update", () { |
3783 | 3932 |
3784 var mock = new common_test.HttpServerMock(); | 3933 var mock = new HttpServerMock(); |
3785 api.UsersResourceApi res = new api.SqladminApi(mock).users; | 3934 api.UsersResourceApi res = new api.SqladminApi(mock).users; |
3786 var arg_request = buildUser(); | 3935 var arg_request = buildUser(); |
3787 var arg_project = "foo"; | 3936 var arg_project = "foo"; |
3788 var arg_instance = "foo"; | 3937 var arg_instance = "foo"; |
3789 var arg_host = "foo"; | 3938 var arg_host = "foo"; |
3790 var arg_name = "foo"; | 3939 var arg_name = "foo"; |
3791 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3940 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
3792 var obj = new api.User.fromJson(json); | 3941 var obj = new api.User.fromJson(json); |
3793 checkUser(obj); | 3942 checkUser(obj); |
3794 | 3943 |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3834 } | 3983 } |
3835 } | 3984 } |
3836 unittest.expect(queryMap["host"].first, unittest.equals(arg_host)); | 3985 unittest.expect(queryMap["host"].first, unittest.equals(arg_host)); |
3837 unittest.expect(queryMap["name"].first, unittest.equals(arg_name)); | 3986 unittest.expect(queryMap["name"].first, unittest.equals(arg_name)); |
3838 | 3987 |
3839 | 3988 |
3840 var h = { | 3989 var h = { |
3841 "content-type" : "application/json; charset=utf-8", | 3990 "content-type" : "application/json; charset=utf-8", |
3842 }; | 3991 }; |
3843 var resp = convert.JSON.encode(buildOperation()); | 3992 var resp = convert.JSON.encode(buildOperation()); |
3844 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 3993 return new async.Future.value(stringResponse(200, h, resp)); |
3845 }), true); | 3994 }), true); |
3846 res.update(arg_request, arg_project, arg_instance, arg_host, arg_name).the
n(unittest.expectAsync(((api.Operation response) { | 3995 res.update(arg_request, arg_project, arg_instance, arg_host, arg_name).the
n(unittest.expectAsync(((api.Operation response) { |
3847 checkOperation(response); | 3996 checkOperation(response); |
3848 }))); | 3997 }))); |
3849 }); | 3998 }); |
3850 | 3999 |
3851 }); | 4000 }); |
3852 | 4001 |
3853 | 4002 |
3854 } | 4003 } |
3855 | 4004 |
OLD | NEW |