OLD | NEW |
1 library googleapis_beta.sqladmin.v1beta3.test; | 1 library googleapis_beta.sqladmin.v1beta3.test; |
2 | 2 |
3 import "dart:core" as core; | 3 import "dart:core" as core; |
4 import "dart:collection" as collection; | 4 import "dart:collection" as collection; |
5 import "dart:async" as async; | 5 import "dart:async" as async; |
6 import "dart:convert" as convert; | 6 import "dart:convert" as convert; |
7 | 7 |
8 import 'package:http/http.dart' as http; | 8 import 'package:http/http.dart' as http; |
9 import 'package:http/testing.dart' as http_testing; | 9 import 'package:http/testing.dart' as http_testing; |
10 import 'package:unittest/unittest.dart' as unittest; | 10 import 'package: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/v1beta3.dart' as api; | 12 import 'package:googleapis_beta/sqladmin/v1beta3.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 buildCounterBackupConfiguration = 0; | 54 core.int buildCounterBackupConfiguration = 0; |
20 buildBackupConfiguration() { | 55 buildBackupConfiguration() { |
21 var o = new api.BackupConfiguration(); | 56 var o = new api.BackupConfiguration(); |
22 buildCounterBackupConfiguration++; | 57 buildCounterBackupConfiguration++; |
23 if (buildCounterBackupConfiguration < 3) { | 58 if (buildCounterBackupConfiguration < 3) { |
24 o.binaryLogEnabled = true; | 59 o.binaryLogEnabled = true; |
25 o.enabled = true; | 60 o.enabled = true; |
26 o.id = "foo"; | 61 o.id = "foo"; |
27 o.kind = "foo"; | 62 o.kind = "foo"; |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 unittest.expect(o.enqueuedTime, unittest.equals(core.DateTime.parse("2002-02
-27T14:01:02"))); | 106 unittest.expect(o.enqueuedTime, unittest.equals(core.DateTime.parse("2002-02
-27T14:01:02"))); |
72 checkOperationError(o.error); | 107 checkOperationError(o.error); |
73 unittest.expect(o.instance, unittest.equals('foo')); | 108 unittest.expect(o.instance, unittest.equals('foo')); |
74 unittest.expect(o.kind, unittest.equals('foo')); | 109 unittest.expect(o.kind, unittest.equals('foo')); |
75 unittest.expect(o.startTime, unittest.equals(core.DateTime.parse("2002-02-27
T14:01:02"))); | 110 unittest.expect(o.startTime, unittest.equals(core.DateTime.parse("2002-02-27
T14:01:02"))); |
76 unittest.expect(o.status, unittest.equals('foo')); | 111 unittest.expect(o.status, unittest.equals('foo')); |
77 } | 112 } |
78 buildCounterBackupRun--; | 113 buildCounterBackupRun--; |
79 } | 114 } |
80 | 115 |
81 buildUnnamed1571() { | 116 buildUnnamed1777() { |
82 var o = new core.List<api.BackupRun>(); | 117 var o = new core.List<api.BackupRun>(); |
83 o.add(buildBackupRun()); | 118 o.add(buildBackupRun()); |
84 o.add(buildBackupRun()); | 119 o.add(buildBackupRun()); |
85 return o; | 120 return o; |
86 } | 121 } |
87 | 122 |
88 checkUnnamed1571(core.List<api.BackupRun> o) { | 123 checkUnnamed1777(core.List<api.BackupRun> o) { |
89 unittest.expect(o, unittest.hasLength(2)); | 124 unittest.expect(o, unittest.hasLength(2)); |
90 checkBackupRun(o[0]); | 125 checkBackupRun(o[0]); |
91 checkBackupRun(o[1]); | 126 checkBackupRun(o[1]); |
92 } | 127 } |
93 | 128 |
94 core.int buildCounterBackupRunsListResponse = 0; | 129 core.int buildCounterBackupRunsListResponse = 0; |
95 buildBackupRunsListResponse() { | 130 buildBackupRunsListResponse() { |
96 var o = new api.BackupRunsListResponse(); | 131 var o = new api.BackupRunsListResponse(); |
97 buildCounterBackupRunsListResponse++; | 132 buildCounterBackupRunsListResponse++; |
98 if (buildCounterBackupRunsListResponse < 3) { | 133 if (buildCounterBackupRunsListResponse < 3) { |
99 o.items = buildUnnamed1571(); | 134 o.items = buildUnnamed1777(); |
100 o.kind = "foo"; | 135 o.kind = "foo"; |
101 o.nextPageToken = "foo"; | 136 o.nextPageToken = "foo"; |
102 } | 137 } |
103 buildCounterBackupRunsListResponse--; | 138 buildCounterBackupRunsListResponse--; |
104 return o; | 139 return o; |
105 } | 140 } |
106 | 141 |
107 checkBackupRunsListResponse(api.BackupRunsListResponse o) { | 142 checkBackupRunsListResponse(api.BackupRunsListResponse o) { |
108 buildCounterBackupRunsListResponse++; | 143 buildCounterBackupRunsListResponse++; |
109 if (buildCounterBackupRunsListResponse < 3) { | 144 if (buildCounterBackupRunsListResponse < 3) { |
110 checkUnnamed1571(o.items); | 145 checkUnnamed1777(o.items); |
111 unittest.expect(o.kind, unittest.equals('foo')); | 146 unittest.expect(o.kind, unittest.equals('foo')); |
112 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 147 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
113 } | 148 } |
114 buildCounterBackupRunsListResponse--; | 149 buildCounterBackupRunsListResponse--; |
115 } | 150 } |
116 | 151 |
117 core.int buildCounterBinLogCoordinates = 0; | 152 core.int buildCounterBinLogCoordinates = 0; |
118 buildBinLogCoordinates() { | 153 buildBinLogCoordinates() { |
119 var o = new api.BinLogCoordinates(); | 154 var o = new api.BinLogCoordinates(); |
120 buildCounterBinLogCoordinates++; | 155 buildCounterBinLogCoordinates++; |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
176 | 211 |
177 checkDatabaseFlags(api.DatabaseFlags o) { | 212 checkDatabaseFlags(api.DatabaseFlags o) { |
178 buildCounterDatabaseFlags++; | 213 buildCounterDatabaseFlags++; |
179 if (buildCounterDatabaseFlags < 3) { | 214 if (buildCounterDatabaseFlags < 3) { |
180 unittest.expect(o.name, unittest.equals('foo')); | 215 unittest.expect(o.name, unittest.equals('foo')); |
181 unittest.expect(o.value, unittest.equals('foo')); | 216 unittest.expect(o.value, unittest.equals('foo')); |
182 } | 217 } |
183 buildCounterDatabaseFlags--; | 218 buildCounterDatabaseFlags--; |
184 } | 219 } |
185 | 220 |
186 buildUnnamed1572() { | 221 buildUnnamed1778() { |
187 var o = new core.List<api.IpMapping>(); | 222 var o = new core.List<api.IpMapping>(); |
188 o.add(buildIpMapping()); | 223 o.add(buildIpMapping()); |
189 o.add(buildIpMapping()); | 224 o.add(buildIpMapping()); |
190 return o; | 225 return o; |
191 } | 226 } |
192 | 227 |
193 checkUnnamed1572(core.List<api.IpMapping> o) { | 228 checkUnnamed1778(core.List<api.IpMapping> o) { |
194 unittest.expect(o, unittest.hasLength(2)); | 229 unittest.expect(o, unittest.hasLength(2)); |
195 checkIpMapping(o[0]); | 230 checkIpMapping(o[0]); |
196 checkIpMapping(o[1]); | 231 checkIpMapping(o[1]); |
197 } | 232 } |
198 | 233 |
199 buildUnnamed1573() { | 234 buildUnnamed1779() { |
200 var o = new core.List<core.String>(); | 235 var o = new core.List<core.String>(); |
201 o.add("foo"); | 236 o.add("foo"); |
202 o.add("foo"); | 237 o.add("foo"); |
203 return o; | 238 return o; |
204 } | 239 } |
205 | 240 |
206 checkUnnamed1573(core.List<core.String> o) { | 241 checkUnnamed1779(core.List<core.String> o) { |
207 unittest.expect(o, unittest.hasLength(2)); | 242 unittest.expect(o, unittest.hasLength(2)); |
208 unittest.expect(o[0], unittest.equals('foo')); | 243 unittest.expect(o[0], unittest.equals('foo')); |
209 unittest.expect(o[1], unittest.equals('foo')); | 244 unittest.expect(o[1], unittest.equals('foo')); |
210 } | 245 } |
211 | 246 |
212 core.int buildCounterDatabaseInstance = 0; | 247 core.int buildCounterDatabaseInstance = 0; |
213 buildDatabaseInstance() { | 248 buildDatabaseInstance() { |
214 var o = new api.DatabaseInstance(); | 249 var o = new api.DatabaseInstance(); |
215 buildCounterDatabaseInstance++; | 250 buildCounterDatabaseInstance++; |
216 if (buildCounterDatabaseInstance < 3) { | 251 if (buildCounterDatabaseInstance < 3) { |
217 o.currentDiskSize = "foo"; | 252 o.currentDiskSize = "foo"; |
218 o.databaseVersion = "foo"; | 253 o.databaseVersion = "foo"; |
219 o.etag = "foo"; | 254 o.etag = "foo"; |
220 o.instance = "foo"; | 255 o.instance = "foo"; |
221 o.instanceType = "foo"; | 256 o.instanceType = "foo"; |
222 o.ipAddresses = buildUnnamed1572(); | 257 o.ipAddresses = buildUnnamed1778(); |
223 o.ipv6Address = "foo"; | 258 o.ipv6Address = "foo"; |
224 o.kind = "foo"; | 259 o.kind = "foo"; |
225 o.masterInstanceName = "foo"; | 260 o.masterInstanceName = "foo"; |
226 o.maxDiskSize = "foo"; | 261 o.maxDiskSize = "foo"; |
227 o.project = "foo"; | 262 o.project = "foo"; |
228 o.region = "foo"; | 263 o.region = "foo"; |
229 o.replicaNames = buildUnnamed1573(); | 264 o.replicaNames = buildUnnamed1779(); |
230 o.serverCaCert = buildSslCert(); | 265 o.serverCaCert = buildSslCert(); |
231 o.serviceAccountEmailAddress = "foo"; | 266 o.serviceAccountEmailAddress = "foo"; |
232 o.settings = buildSettings(); | 267 o.settings = buildSettings(); |
233 o.state = "foo"; | 268 o.state = "foo"; |
234 } | 269 } |
235 buildCounterDatabaseInstance--; | 270 buildCounterDatabaseInstance--; |
236 return o; | 271 return o; |
237 } | 272 } |
238 | 273 |
239 checkDatabaseInstance(api.DatabaseInstance o) { | 274 checkDatabaseInstance(api.DatabaseInstance o) { |
240 buildCounterDatabaseInstance++; | 275 buildCounterDatabaseInstance++; |
241 if (buildCounterDatabaseInstance < 3) { | 276 if (buildCounterDatabaseInstance < 3) { |
242 unittest.expect(o.currentDiskSize, unittest.equals('foo')); | 277 unittest.expect(o.currentDiskSize, unittest.equals('foo')); |
243 unittest.expect(o.databaseVersion, unittest.equals('foo')); | 278 unittest.expect(o.databaseVersion, unittest.equals('foo')); |
244 unittest.expect(o.etag, unittest.equals('foo')); | 279 unittest.expect(o.etag, unittest.equals('foo')); |
245 unittest.expect(o.instance, unittest.equals('foo')); | 280 unittest.expect(o.instance, unittest.equals('foo')); |
246 unittest.expect(o.instanceType, unittest.equals('foo')); | 281 unittest.expect(o.instanceType, unittest.equals('foo')); |
247 checkUnnamed1572(o.ipAddresses); | 282 checkUnnamed1778(o.ipAddresses); |
248 unittest.expect(o.ipv6Address, unittest.equals('foo')); | 283 unittest.expect(o.ipv6Address, unittest.equals('foo')); |
249 unittest.expect(o.kind, unittest.equals('foo')); | 284 unittest.expect(o.kind, unittest.equals('foo')); |
250 unittest.expect(o.masterInstanceName, unittest.equals('foo')); | 285 unittest.expect(o.masterInstanceName, unittest.equals('foo')); |
251 unittest.expect(o.maxDiskSize, unittest.equals('foo')); | 286 unittest.expect(o.maxDiskSize, unittest.equals('foo')); |
252 unittest.expect(o.project, unittest.equals('foo')); | 287 unittest.expect(o.project, unittest.equals('foo')); |
253 unittest.expect(o.region, unittest.equals('foo')); | 288 unittest.expect(o.region, unittest.equals('foo')); |
254 checkUnnamed1573(o.replicaNames); | 289 checkUnnamed1779(o.replicaNames); |
255 checkSslCert(o.serverCaCert); | 290 checkSslCert(o.serverCaCert); |
256 unittest.expect(o.serviceAccountEmailAddress, unittest.equals('foo')); | 291 unittest.expect(o.serviceAccountEmailAddress, unittest.equals('foo')); |
257 checkSettings(o.settings); | 292 checkSettings(o.settings); |
258 unittest.expect(o.state, unittest.equals('foo')); | 293 unittest.expect(o.state, unittest.equals('foo')); |
259 } | 294 } |
260 buildCounterDatabaseInstance--; | 295 buildCounterDatabaseInstance--; |
261 } | 296 } |
262 | 297 |
263 buildUnnamed1574() { | 298 buildUnnamed1780() { |
264 var o = new core.List<core.String>(); | 299 var o = new core.List<core.String>(); |
265 o.add("foo"); | 300 o.add("foo"); |
266 o.add("foo"); | 301 o.add("foo"); |
267 return o; | 302 return o; |
268 } | 303 } |
269 | 304 |
270 checkUnnamed1574(core.List<core.String> o) { | 305 checkUnnamed1780(core.List<core.String> o) { |
271 unittest.expect(o, unittest.hasLength(2)); | 306 unittest.expect(o, unittest.hasLength(2)); |
272 unittest.expect(o[0], unittest.equals('foo')); | 307 unittest.expect(o[0], unittest.equals('foo')); |
273 unittest.expect(o[1], unittest.equals('foo')); | 308 unittest.expect(o[1], unittest.equals('foo')); |
274 } | 309 } |
275 | 310 |
276 buildUnnamed1575() { | 311 buildUnnamed1781() { |
277 var o = new core.List<core.String>(); | 312 var o = new core.List<core.String>(); |
278 o.add("foo"); | 313 o.add("foo"); |
279 o.add("foo"); | 314 o.add("foo"); |
280 return o; | 315 return o; |
281 } | 316 } |
282 | 317 |
283 checkUnnamed1575(core.List<core.String> o) { | 318 checkUnnamed1781(core.List<core.String> o) { |
284 unittest.expect(o, unittest.hasLength(2)); | 319 unittest.expect(o, unittest.hasLength(2)); |
285 unittest.expect(o[0], unittest.equals('foo')); | 320 unittest.expect(o[0], unittest.equals('foo')); |
286 unittest.expect(o[1], unittest.equals('foo')); | 321 unittest.expect(o[1], unittest.equals('foo')); |
287 } | 322 } |
288 | 323 |
289 core.int buildCounterExportContext = 0; | 324 core.int buildCounterExportContext = 0; |
290 buildExportContext() { | 325 buildExportContext() { |
291 var o = new api.ExportContext(); | 326 var o = new api.ExportContext(); |
292 buildCounterExportContext++; | 327 buildCounterExportContext++; |
293 if (buildCounterExportContext < 3) { | 328 if (buildCounterExportContext < 3) { |
294 o.database = buildUnnamed1574(); | 329 o.database = buildUnnamed1780(); |
295 o.kind = "foo"; | 330 o.kind = "foo"; |
296 o.table = buildUnnamed1575(); | 331 o.table = buildUnnamed1781(); |
297 o.uri = "foo"; | 332 o.uri = "foo"; |
298 } | 333 } |
299 buildCounterExportContext--; | 334 buildCounterExportContext--; |
300 return o; | 335 return o; |
301 } | 336 } |
302 | 337 |
303 checkExportContext(api.ExportContext o) { | 338 checkExportContext(api.ExportContext o) { |
304 buildCounterExportContext++; | 339 buildCounterExportContext++; |
305 if (buildCounterExportContext < 3) { | 340 if (buildCounterExportContext < 3) { |
306 checkUnnamed1574(o.database); | 341 checkUnnamed1780(o.database); |
307 unittest.expect(o.kind, unittest.equals('foo')); | 342 unittest.expect(o.kind, unittest.equals('foo')); |
308 checkUnnamed1575(o.table); | 343 checkUnnamed1781(o.table); |
309 unittest.expect(o.uri, unittest.equals('foo')); | 344 unittest.expect(o.uri, unittest.equals('foo')); |
310 } | 345 } |
311 buildCounterExportContext--; | 346 buildCounterExportContext--; |
312 } | 347 } |
313 | 348 |
314 buildUnnamed1576() { | 349 buildUnnamed1782() { |
315 var o = new core.List<core.String>(); | 350 var o = new core.List<core.String>(); |
316 o.add("foo"); | 351 o.add("foo"); |
317 o.add("foo"); | 352 o.add("foo"); |
318 return o; | 353 return o; |
319 } | 354 } |
320 | 355 |
321 checkUnnamed1576(core.List<core.String> o) { | 356 checkUnnamed1782(core.List<core.String> o) { |
322 unittest.expect(o, unittest.hasLength(2)); | 357 unittest.expect(o, unittest.hasLength(2)); |
323 unittest.expect(o[0], unittest.equals('foo')); | 358 unittest.expect(o[0], unittest.equals('foo')); |
324 unittest.expect(o[1], unittest.equals('foo')); | 359 unittest.expect(o[1], unittest.equals('foo')); |
325 } | 360 } |
326 | 361 |
327 buildUnnamed1577() { | 362 buildUnnamed1783() { |
328 var o = new core.List<core.String>(); | 363 var o = new core.List<core.String>(); |
329 o.add("foo"); | 364 o.add("foo"); |
330 o.add("foo"); | 365 o.add("foo"); |
331 return o; | 366 return o; |
332 } | 367 } |
333 | 368 |
334 checkUnnamed1577(core.List<core.String> o) { | 369 checkUnnamed1783(core.List<core.String> o) { |
335 unittest.expect(o, unittest.hasLength(2)); | 370 unittest.expect(o, unittest.hasLength(2)); |
336 unittest.expect(o[0], unittest.equals('foo')); | 371 unittest.expect(o[0], unittest.equals('foo')); |
337 unittest.expect(o[1], unittest.equals('foo')); | 372 unittest.expect(o[1], unittest.equals('foo')); |
338 } | 373 } |
339 | 374 |
340 core.int buildCounterFlag = 0; | 375 core.int buildCounterFlag = 0; |
341 buildFlag() { | 376 buildFlag() { |
342 var o = new api.Flag(); | 377 var o = new api.Flag(); |
343 buildCounterFlag++; | 378 buildCounterFlag++; |
344 if (buildCounterFlag < 3) { | 379 if (buildCounterFlag < 3) { |
345 o.allowedStringValues = buildUnnamed1576(); | 380 o.allowedStringValues = buildUnnamed1782(); |
346 o.appliesTo = buildUnnamed1577(); | 381 o.appliesTo = buildUnnamed1783(); |
347 o.kind = "foo"; | 382 o.kind = "foo"; |
348 o.maxValue = "foo"; | 383 o.maxValue = "foo"; |
349 o.minValue = "foo"; | 384 o.minValue = "foo"; |
350 o.name = "foo"; | 385 o.name = "foo"; |
351 o.type = "foo"; | 386 o.type = "foo"; |
352 } | 387 } |
353 buildCounterFlag--; | 388 buildCounterFlag--; |
354 return o; | 389 return o; |
355 } | 390 } |
356 | 391 |
357 checkFlag(api.Flag o) { | 392 checkFlag(api.Flag o) { |
358 buildCounterFlag++; | 393 buildCounterFlag++; |
359 if (buildCounterFlag < 3) { | 394 if (buildCounterFlag < 3) { |
360 checkUnnamed1576(o.allowedStringValues); | 395 checkUnnamed1782(o.allowedStringValues); |
361 checkUnnamed1577(o.appliesTo); | 396 checkUnnamed1783(o.appliesTo); |
362 unittest.expect(o.kind, unittest.equals('foo')); | 397 unittest.expect(o.kind, unittest.equals('foo')); |
363 unittest.expect(o.maxValue, unittest.equals('foo')); | 398 unittest.expect(o.maxValue, unittest.equals('foo')); |
364 unittest.expect(o.minValue, unittest.equals('foo')); | 399 unittest.expect(o.minValue, unittest.equals('foo')); |
365 unittest.expect(o.name, unittest.equals('foo')); | 400 unittest.expect(o.name, unittest.equals('foo')); |
366 unittest.expect(o.type, unittest.equals('foo')); | 401 unittest.expect(o.type, unittest.equals('foo')); |
367 } | 402 } |
368 buildCounterFlag--; | 403 buildCounterFlag--; |
369 } | 404 } |
370 | 405 |
371 buildUnnamed1578() { | 406 buildUnnamed1784() { |
372 var o = new core.List<api.Flag>(); | 407 var o = new core.List<api.Flag>(); |
373 o.add(buildFlag()); | 408 o.add(buildFlag()); |
374 o.add(buildFlag()); | 409 o.add(buildFlag()); |
375 return o; | 410 return o; |
376 } | 411 } |
377 | 412 |
378 checkUnnamed1578(core.List<api.Flag> o) { | 413 checkUnnamed1784(core.List<api.Flag> o) { |
379 unittest.expect(o, unittest.hasLength(2)); | 414 unittest.expect(o, unittest.hasLength(2)); |
380 checkFlag(o[0]); | 415 checkFlag(o[0]); |
381 checkFlag(o[1]); | 416 checkFlag(o[1]); |
382 } | 417 } |
383 | 418 |
384 core.int buildCounterFlagsListResponse = 0; | 419 core.int buildCounterFlagsListResponse = 0; |
385 buildFlagsListResponse() { | 420 buildFlagsListResponse() { |
386 var o = new api.FlagsListResponse(); | 421 var o = new api.FlagsListResponse(); |
387 buildCounterFlagsListResponse++; | 422 buildCounterFlagsListResponse++; |
388 if (buildCounterFlagsListResponse < 3) { | 423 if (buildCounterFlagsListResponse < 3) { |
389 o.items = buildUnnamed1578(); | 424 o.items = buildUnnamed1784(); |
390 o.kind = "foo"; | 425 o.kind = "foo"; |
391 } | 426 } |
392 buildCounterFlagsListResponse--; | 427 buildCounterFlagsListResponse--; |
393 return o; | 428 return o; |
394 } | 429 } |
395 | 430 |
396 checkFlagsListResponse(api.FlagsListResponse o) { | 431 checkFlagsListResponse(api.FlagsListResponse o) { |
397 buildCounterFlagsListResponse++; | 432 buildCounterFlagsListResponse++; |
398 if (buildCounterFlagsListResponse < 3) { | 433 if (buildCounterFlagsListResponse < 3) { |
399 checkUnnamed1578(o.items); | 434 checkUnnamed1784(o.items); |
400 unittest.expect(o.kind, unittest.equals('foo')); | 435 unittest.expect(o.kind, unittest.equals('foo')); |
401 } | 436 } |
402 buildCounterFlagsListResponse--; | 437 buildCounterFlagsListResponse--; |
403 } | 438 } |
404 | 439 |
405 buildUnnamed1579() { | 440 buildUnnamed1785() { |
406 var o = new core.List<core.String>(); | 441 var o = new core.List<core.String>(); |
407 o.add("foo"); | 442 o.add("foo"); |
408 o.add("foo"); | 443 o.add("foo"); |
409 return o; | 444 return o; |
410 } | 445 } |
411 | 446 |
412 checkUnnamed1579(core.List<core.String> o) { | 447 checkUnnamed1785(core.List<core.String> o) { |
413 unittest.expect(o, unittest.hasLength(2)); | 448 unittest.expect(o, unittest.hasLength(2)); |
414 unittest.expect(o[0], unittest.equals('foo')); | 449 unittest.expect(o[0], unittest.equals('foo')); |
415 unittest.expect(o[1], unittest.equals('foo')); | 450 unittest.expect(o[1], unittest.equals('foo')); |
416 } | 451 } |
417 | 452 |
418 core.int buildCounterImportContext = 0; | 453 core.int buildCounterImportContext = 0; |
419 buildImportContext() { | 454 buildImportContext() { |
420 var o = new api.ImportContext(); | 455 var o = new api.ImportContext(); |
421 buildCounterImportContext++; | 456 buildCounterImportContext++; |
422 if (buildCounterImportContext < 3) { | 457 if (buildCounterImportContext < 3) { |
423 o.database = "foo"; | 458 o.database = "foo"; |
424 o.kind = "foo"; | 459 o.kind = "foo"; |
425 o.uri = buildUnnamed1579(); | 460 o.uri = buildUnnamed1785(); |
426 } | 461 } |
427 buildCounterImportContext--; | 462 buildCounterImportContext--; |
428 return o; | 463 return o; |
429 } | 464 } |
430 | 465 |
431 checkImportContext(api.ImportContext o) { | 466 checkImportContext(api.ImportContext o) { |
432 buildCounterImportContext++; | 467 buildCounterImportContext++; |
433 if (buildCounterImportContext < 3) { | 468 if (buildCounterImportContext < 3) { |
434 unittest.expect(o.database, unittest.equals('foo')); | 469 unittest.expect(o.database, unittest.equals('foo')); |
435 unittest.expect(o.kind, unittest.equals('foo')); | 470 unittest.expect(o.kind, unittest.equals('foo')); |
436 checkUnnamed1579(o.uri); | 471 checkUnnamed1785(o.uri); |
437 } | 472 } |
438 buildCounterImportContext--; | 473 buildCounterImportContext--; |
439 } | 474 } |
440 | 475 |
441 buildUnnamed1580() { | 476 buildUnnamed1786() { |
442 var o = new core.List<api.OperationError>(); | 477 var o = new core.List<api.OperationError>(); |
443 o.add(buildOperationError()); | 478 o.add(buildOperationError()); |
444 o.add(buildOperationError()); | 479 o.add(buildOperationError()); |
445 return o; | 480 return o; |
446 } | 481 } |
447 | 482 |
448 checkUnnamed1580(core.List<api.OperationError> o) { | 483 checkUnnamed1786(core.List<api.OperationError> o) { |
449 unittest.expect(o, unittest.hasLength(2)); | 484 unittest.expect(o, unittest.hasLength(2)); |
450 checkOperationError(o[0]); | 485 checkOperationError(o[0]); |
451 checkOperationError(o[1]); | 486 checkOperationError(o[1]); |
452 } | 487 } |
453 | 488 |
454 core.int buildCounterInstanceOperation = 0; | 489 core.int buildCounterInstanceOperation = 0; |
455 buildInstanceOperation() { | 490 buildInstanceOperation() { |
456 var o = new api.InstanceOperation(); | 491 var o = new api.InstanceOperation(); |
457 buildCounterInstanceOperation++; | 492 buildCounterInstanceOperation++; |
458 if (buildCounterInstanceOperation < 3) { | 493 if (buildCounterInstanceOperation < 3) { |
459 o.endTime = core.DateTime.parse("2002-02-27T14:01:02"); | 494 o.endTime = core.DateTime.parse("2002-02-27T14:01:02"); |
460 o.enqueuedTime = core.DateTime.parse("2002-02-27T14:01:02"); | 495 o.enqueuedTime = core.DateTime.parse("2002-02-27T14:01:02"); |
461 o.error = buildUnnamed1580(); | 496 o.error = buildUnnamed1786(); |
462 o.exportContext = buildExportContext(); | 497 o.exportContext = buildExportContext(); |
463 o.importContext = buildImportContext(); | 498 o.importContext = buildImportContext(); |
464 o.instance = "foo"; | 499 o.instance = "foo"; |
465 o.kind = "foo"; | 500 o.kind = "foo"; |
466 o.operation = "foo"; | 501 o.operation = "foo"; |
467 o.operationType = "foo"; | 502 o.operationType = "foo"; |
468 o.startTime = core.DateTime.parse("2002-02-27T14:01:02"); | 503 o.startTime = core.DateTime.parse("2002-02-27T14:01:02"); |
469 o.state = "foo"; | 504 o.state = "foo"; |
470 o.userEmailAddress = "foo"; | 505 o.userEmailAddress = "foo"; |
471 } | 506 } |
472 buildCounterInstanceOperation--; | 507 buildCounterInstanceOperation--; |
473 return o; | 508 return o; |
474 } | 509 } |
475 | 510 |
476 checkInstanceOperation(api.InstanceOperation o) { | 511 checkInstanceOperation(api.InstanceOperation o) { |
477 buildCounterInstanceOperation++; | 512 buildCounterInstanceOperation++; |
478 if (buildCounterInstanceOperation < 3) { | 513 if (buildCounterInstanceOperation < 3) { |
479 unittest.expect(o.endTime, unittest.equals(core.DateTime.parse("2002-02-27T1
4:01:02"))); | 514 unittest.expect(o.endTime, unittest.equals(core.DateTime.parse("2002-02-27T1
4:01:02"))); |
480 unittest.expect(o.enqueuedTime, unittest.equals(core.DateTime.parse("2002-02
-27T14:01:02"))); | 515 unittest.expect(o.enqueuedTime, unittest.equals(core.DateTime.parse("2002-02
-27T14:01:02"))); |
481 checkUnnamed1580(o.error); | 516 checkUnnamed1786(o.error); |
482 checkExportContext(o.exportContext); | 517 checkExportContext(o.exportContext); |
483 checkImportContext(o.importContext); | 518 checkImportContext(o.importContext); |
484 unittest.expect(o.instance, unittest.equals('foo')); | 519 unittest.expect(o.instance, unittest.equals('foo')); |
485 unittest.expect(o.kind, unittest.equals('foo')); | 520 unittest.expect(o.kind, unittest.equals('foo')); |
486 unittest.expect(o.operation, unittest.equals('foo')); | 521 unittest.expect(o.operation, unittest.equals('foo')); |
487 unittest.expect(o.operationType, unittest.equals('foo')); | 522 unittest.expect(o.operationType, unittest.equals('foo')); |
488 unittest.expect(o.startTime, unittest.equals(core.DateTime.parse("2002-02-27
T14:01:02"))); | 523 unittest.expect(o.startTime, unittest.equals(core.DateTime.parse("2002-02-27
T14:01:02"))); |
489 unittest.expect(o.state, unittest.equals('foo')); | 524 unittest.expect(o.state, unittest.equals('foo')); |
490 unittest.expect(o.userEmailAddress, unittest.equals('foo')); | 525 unittest.expect(o.userEmailAddress, unittest.equals('foo')); |
491 } | 526 } |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
666 | 701 |
667 checkInstancesInsertResponse(api.InstancesInsertResponse o) { | 702 checkInstancesInsertResponse(api.InstancesInsertResponse o) { |
668 buildCounterInstancesInsertResponse++; | 703 buildCounterInstancesInsertResponse++; |
669 if (buildCounterInstancesInsertResponse < 3) { | 704 if (buildCounterInstancesInsertResponse < 3) { |
670 unittest.expect(o.kind, unittest.equals('foo')); | 705 unittest.expect(o.kind, unittest.equals('foo')); |
671 unittest.expect(o.operation, unittest.equals('foo')); | 706 unittest.expect(o.operation, unittest.equals('foo')); |
672 } | 707 } |
673 buildCounterInstancesInsertResponse--; | 708 buildCounterInstancesInsertResponse--; |
674 } | 709 } |
675 | 710 |
676 buildUnnamed1581() { | 711 buildUnnamed1787() { |
677 var o = new core.List<api.DatabaseInstance>(); | 712 var o = new core.List<api.DatabaseInstance>(); |
678 o.add(buildDatabaseInstance()); | 713 o.add(buildDatabaseInstance()); |
679 o.add(buildDatabaseInstance()); | 714 o.add(buildDatabaseInstance()); |
680 return o; | 715 return o; |
681 } | 716 } |
682 | 717 |
683 checkUnnamed1581(core.List<api.DatabaseInstance> o) { | 718 checkUnnamed1787(core.List<api.DatabaseInstance> o) { |
684 unittest.expect(o, unittest.hasLength(2)); | 719 unittest.expect(o, unittest.hasLength(2)); |
685 checkDatabaseInstance(o[0]); | 720 checkDatabaseInstance(o[0]); |
686 checkDatabaseInstance(o[1]); | 721 checkDatabaseInstance(o[1]); |
687 } | 722 } |
688 | 723 |
689 core.int buildCounterInstancesListResponse = 0; | 724 core.int buildCounterInstancesListResponse = 0; |
690 buildInstancesListResponse() { | 725 buildInstancesListResponse() { |
691 var o = new api.InstancesListResponse(); | 726 var o = new api.InstancesListResponse(); |
692 buildCounterInstancesListResponse++; | 727 buildCounterInstancesListResponse++; |
693 if (buildCounterInstancesListResponse < 3) { | 728 if (buildCounterInstancesListResponse < 3) { |
694 o.items = buildUnnamed1581(); | 729 o.items = buildUnnamed1787(); |
695 o.kind = "foo"; | 730 o.kind = "foo"; |
696 o.nextPageToken = "foo"; | 731 o.nextPageToken = "foo"; |
697 } | 732 } |
698 buildCounterInstancesListResponse--; | 733 buildCounterInstancesListResponse--; |
699 return o; | 734 return o; |
700 } | 735 } |
701 | 736 |
702 checkInstancesListResponse(api.InstancesListResponse o) { | 737 checkInstancesListResponse(api.InstancesListResponse o) { |
703 buildCounterInstancesListResponse++; | 738 buildCounterInstancesListResponse++; |
704 if (buildCounterInstancesListResponse < 3) { | 739 if (buildCounterInstancesListResponse < 3) { |
705 checkUnnamed1581(o.items); | 740 checkUnnamed1787(o.items); |
706 unittest.expect(o.kind, unittest.equals('foo')); | 741 unittest.expect(o.kind, unittest.equals('foo')); |
707 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 742 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
708 } | 743 } |
709 buildCounterInstancesListResponse--; | 744 buildCounterInstancesListResponse--; |
710 } | 745 } |
711 | 746 |
712 core.int buildCounterInstancesPromoteReplicaResponse = 0; | 747 core.int buildCounterInstancesPromoteReplicaResponse = 0; |
713 buildInstancesPromoteReplicaResponse() { | 748 buildInstancesPromoteReplicaResponse() { |
714 var o = new api.InstancesPromoteReplicaResponse(); | 749 var o = new api.InstancesPromoteReplicaResponse(); |
715 buildCounterInstancesPromoteReplicaResponse++; | 750 buildCounterInstancesPromoteReplicaResponse++; |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
828 | 863 |
829 checkInstancesUpdateResponse(api.InstancesUpdateResponse o) { | 864 checkInstancesUpdateResponse(api.InstancesUpdateResponse o) { |
830 buildCounterInstancesUpdateResponse++; | 865 buildCounterInstancesUpdateResponse++; |
831 if (buildCounterInstancesUpdateResponse < 3) { | 866 if (buildCounterInstancesUpdateResponse < 3) { |
832 unittest.expect(o.kind, unittest.equals('foo')); | 867 unittest.expect(o.kind, unittest.equals('foo')); |
833 unittest.expect(o.operation, unittest.equals('foo')); | 868 unittest.expect(o.operation, unittest.equals('foo')); |
834 } | 869 } |
835 buildCounterInstancesUpdateResponse--; | 870 buildCounterInstancesUpdateResponse--; |
836 } | 871 } |
837 | 872 |
838 buildUnnamed1582() { | 873 buildUnnamed1788() { |
839 var o = new core.List<core.String>(); | 874 var o = new core.List<core.String>(); |
840 o.add("foo"); | 875 o.add("foo"); |
841 o.add("foo"); | 876 o.add("foo"); |
842 return o; | 877 return o; |
843 } | 878 } |
844 | 879 |
845 checkUnnamed1582(core.List<core.String> o) { | 880 checkUnnamed1788(core.List<core.String> o) { |
846 unittest.expect(o, unittest.hasLength(2)); | 881 unittest.expect(o, unittest.hasLength(2)); |
847 unittest.expect(o[0], unittest.equals('foo')); | 882 unittest.expect(o[0], unittest.equals('foo')); |
848 unittest.expect(o[1], unittest.equals('foo')); | 883 unittest.expect(o[1], unittest.equals('foo')); |
849 } | 884 } |
850 | 885 |
851 core.int buildCounterIpConfiguration = 0; | 886 core.int buildCounterIpConfiguration = 0; |
852 buildIpConfiguration() { | 887 buildIpConfiguration() { |
853 var o = new api.IpConfiguration(); | 888 var o = new api.IpConfiguration(); |
854 buildCounterIpConfiguration++; | 889 buildCounterIpConfiguration++; |
855 if (buildCounterIpConfiguration < 3) { | 890 if (buildCounterIpConfiguration < 3) { |
856 o.authorizedNetworks = buildUnnamed1582(); | 891 o.authorizedNetworks = buildUnnamed1788(); |
857 o.enabled = true; | 892 o.enabled = true; |
858 o.kind = "foo"; | 893 o.kind = "foo"; |
859 o.requireSsl = true; | 894 o.requireSsl = true; |
860 } | 895 } |
861 buildCounterIpConfiguration--; | 896 buildCounterIpConfiguration--; |
862 return o; | 897 return o; |
863 } | 898 } |
864 | 899 |
865 checkIpConfiguration(api.IpConfiguration o) { | 900 checkIpConfiguration(api.IpConfiguration o) { |
866 buildCounterIpConfiguration++; | 901 buildCounterIpConfiguration++; |
867 if (buildCounterIpConfiguration < 3) { | 902 if (buildCounterIpConfiguration < 3) { |
868 checkUnnamed1582(o.authorizedNetworks); | 903 checkUnnamed1788(o.authorizedNetworks); |
869 unittest.expect(o.enabled, unittest.isTrue); | 904 unittest.expect(o.enabled, unittest.isTrue); |
870 unittest.expect(o.kind, unittest.equals('foo')); | 905 unittest.expect(o.kind, unittest.equals('foo')); |
871 unittest.expect(o.requireSsl, unittest.isTrue); | 906 unittest.expect(o.requireSsl, unittest.isTrue); |
872 } | 907 } |
873 buildCounterIpConfiguration--; | 908 buildCounterIpConfiguration--; |
874 } | 909 } |
875 | 910 |
876 core.int buildCounterIpMapping = 0; | 911 core.int buildCounterIpMapping = 0; |
877 buildIpMapping() { | 912 buildIpMapping() { |
878 var o = new api.IpMapping(); | 913 var o = new api.IpMapping(); |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
931 | 966 |
932 checkOperationError(api.OperationError o) { | 967 checkOperationError(api.OperationError o) { |
933 buildCounterOperationError++; | 968 buildCounterOperationError++; |
934 if (buildCounterOperationError < 3) { | 969 if (buildCounterOperationError < 3) { |
935 unittest.expect(o.code, unittest.equals('foo')); | 970 unittest.expect(o.code, unittest.equals('foo')); |
936 unittest.expect(o.kind, unittest.equals('foo')); | 971 unittest.expect(o.kind, unittest.equals('foo')); |
937 } | 972 } |
938 buildCounterOperationError--; | 973 buildCounterOperationError--; |
939 } | 974 } |
940 | 975 |
941 buildUnnamed1583() { | 976 buildUnnamed1789() { |
942 var o = new core.List<api.InstanceOperation>(); | 977 var o = new core.List<api.InstanceOperation>(); |
943 o.add(buildInstanceOperation()); | 978 o.add(buildInstanceOperation()); |
944 o.add(buildInstanceOperation()); | 979 o.add(buildInstanceOperation()); |
945 return o; | 980 return o; |
946 } | 981 } |
947 | 982 |
948 checkUnnamed1583(core.List<api.InstanceOperation> o) { | 983 checkUnnamed1789(core.List<api.InstanceOperation> o) { |
949 unittest.expect(o, unittest.hasLength(2)); | 984 unittest.expect(o, unittest.hasLength(2)); |
950 checkInstanceOperation(o[0]); | 985 checkInstanceOperation(o[0]); |
951 checkInstanceOperation(o[1]); | 986 checkInstanceOperation(o[1]); |
952 } | 987 } |
953 | 988 |
954 core.int buildCounterOperationsListResponse = 0; | 989 core.int buildCounterOperationsListResponse = 0; |
955 buildOperationsListResponse() { | 990 buildOperationsListResponse() { |
956 var o = new api.OperationsListResponse(); | 991 var o = new api.OperationsListResponse(); |
957 buildCounterOperationsListResponse++; | 992 buildCounterOperationsListResponse++; |
958 if (buildCounterOperationsListResponse < 3) { | 993 if (buildCounterOperationsListResponse < 3) { |
959 o.items = buildUnnamed1583(); | 994 o.items = buildUnnamed1789(); |
960 o.kind = "foo"; | 995 o.kind = "foo"; |
961 o.nextPageToken = "foo"; | 996 o.nextPageToken = "foo"; |
962 } | 997 } |
963 buildCounterOperationsListResponse--; | 998 buildCounterOperationsListResponse--; |
964 return o; | 999 return o; |
965 } | 1000 } |
966 | 1001 |
967 checkOperationsListResponse(api.OperationsListResponse o) { | 1002 checkOperationsListResponse(api.OperationsListResponse o) { |
968 buildCounterOperationsListResponse++; | 1003 buildCounterOperationsListResponse++; |
969 if (buildCounterOperationsListResponse < 3) { | 1004 if (buildCounterOperationsListResponse < 3) { |
970 checkUnnamed1583(o.items); | 1005 checkUnnamed1789(o.items); |
971 unittest.expect(o.kind, unittest.equals('foo')); | 1006 unittest.expect(o.kind, unittest.equals('foo')); |
972 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 1007 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
973 } | 1008 } |
974 buildCounterOperationsListResponse--; | 1009 buildCounterOperationsListResponse--; |
975 } | 1010 } |
976 | 1011 |
977 core.int buildCounterSetRootPasswordContext = 0; | 1012 core.int buildCounterSetRootPasswordContext = 0; |
978 buildSetRootPasswordContext() { | 1013 buildSetRootPasswordContext() { |
979 var o = new api.SetRootPasswordContext(); | 1014 var o = new api.SetRootPasswordContext(); |
980 buildCounterSetRootPasswordContext++; | 1015 buildCounterSetRootPasswordContext++; |
981 if (buildCounterSetRootPasswordContext < 3) { | 1016 if (buildCounterSetRootPasswordContext < 3) { |
982 o.kind = "foo"; | 1017 o.kind = "foo"; |
983 o.password = "foo"; | 1018 o.password = "foo"; |
984 } | 1019 } |
985 buildCounterSetRootPasswordContext--; | 1020 buildCounterSetRootPasswordContext--; |
986 return o; | 1021 return o; |
987 } | 1022 } |
988 | 1023 |
989 checkSetRootPasswordContext(api.SetRootPasswordContext o) { | 1024 checkSetRootPasswordContext(api.SetRootPasswordContext o) { |
990 buildCounterSetRootPasswordContext++; | 1025 buildCounterSetRootPasswordContext++; |
991 if (buildCounterSetRootPasswordContext < 3) { | 1026 if (buildCounterSetRootPasswordContext < 3) { |
992 unittest.expect(o.kind, unittest.equals('foo')); | 1027 unittest.expect(o.kind, unittest.equals('foo')); |
993 unittest.expect(o.password, unittest.equals('foo')); | 1028 unittest.expect(o.password, unittest.equals('foo')); |
994 } | 1029 } |
995 buildCounterSetRootPasswordContext--; | 1030 buildCounterSetRootPasswordContext--; |
996 } | 1031 } |
997 | 1032 |
998 buildUnnamed1584() { | 1033 buildUnnamed1790() { |
999 var o = new core.List<core.String>(); | 1034 var o = new core.List<core.String>(); |
1000 o.add("foo"); | 1035 o.add("foo"); |
1001 o.add("foo"); | 1036 o.add("foo"); |
1002 return o; | 1037 return o; |
1003 } | 1038 } |
1004 | 1039 |
1005 checkUnnamed1584(core.List<core.String> o) { | 1040 checkUnnamed1790(core.List<core.String> o) { |
1006 unittest.expect(o, unittest.hasLength(2)); | 1041 unittest.expect(o, unittest.hasLength(2)); |
1007 unittest.expect(o[0], unittest.equals('foo')); | 1042 unittest.expect(o[0], unittest.equals('foo')); |
1008 unittest.expect(o[1], unittest.equals('foo')); | 1043 unittest.expect(o[1], unittest.equals('foo')); |
1009 } | 1044 } |
1010 | 1045 |
1011 buildUnnamed1585() { | 1046 buildUnnamed1791() { |
1012 var o = new core.List<api.BackupConfiguration>(); | 1047 var o = new core.List<api.BackupConfiguration>(); |
1013 o.add(buildBackupConfiguration()); | 1048 o.add(buildBackupConfiguration()); |
1014 o.add(buildBackupConfiguration()); | 1049 o.add(buildBackupConfiguration()); |
1015 return o; | 1050 return o; |
1016 } | 1051 } |
1017 | 1052 |
1018 checkUnnamed1585(core.List<api.BackupConfiguration> o) { | 1053 checkUnnamed1791(core.List<api.BackupConfiguration> o) { |
1019 unittest.expect(o, unittest.hasLength(2)); | 1054 unittest.expect(o, unittest.hasLength(2)); |
1020 checkBackupConfiguration(o[0]); | 1055 checkBackupConfiguration(o[0]); |
1021 checkBackupConfiguration(o[1]); | 1056 checkBackupConfiguration(o[1]); |
1022 } | 1057 } |
1023 | 1058 |
1024 buildUnnamed1586() { | 1059 buildUnnamed1792() { |
1025 var o = new core.List<api.DatabaseFlags>(); | 1060 var o = new core.List<api.DatabaseFlags>(); |
1026 o.add(buildDatabaseFlags()); | 1061 o.add(buildDatabaseFlags()); |
1027 o.add(buildDatabaseFlags()); | 1062 o.add(buildDatabaseFlags()); |
1028 return o; | 1063 return o; |
1029 } | 1064 } |
1030 | 1065 |
1031 checkUnnamed1586(core.List<api.DatabaseFlags> o) { | 1066 checkUnnamed1792(core.List<api.DatabaseFlags> o) { |
1032 unittest.expect(o, unittest.hasLength(2)); | 1067 unittest.expect(o, unittest.hasLength(2)); |
1033 checkDatabaseFlags(o[0]); | 1068 checkDatabaseFlags(o[0]); |
1034 checkDatabaseFlags(o[1]); | 1069 checkDatabaseFlags(o[1]); |
1035 } | 1070 } |
1036 | 1071 |
1037 core.int buildCounterSettings = 0; | 1072 core.int buildCounterSettings = 0; |
1038 buildSettings() { | 1073 buildSettings() { |
1039 var o = new api.Settings(); | 1074 var o = new api.Settings(); |
1040 buildCounterSettings++; | 1075 buildCounterSettings++; |
1041 if (buildCounterSettings < 3) { | 1076 if (buildCounterSettings < 3) { |
1042 o.activationPolicy = "foo"; | 1077 o.activationPolicy = "foo"; |
1043 o.authorizedGaeApplications = buildUnnamed1584(); | 1078 o.authorizedGaeApplications = buildUnnamed1790(); |
1044 o.backupConfiguration = buildUnnamed1585(); | 1079 o.backupConfiguration = buildUnnamed1791(); |
1045 o.databaseFlags = buildUnnamed1586(); | 1080 o.databaseFlags = buildUnnamed1792(); |
1046 o.databaseReplicationEnabled = true; | 1081 o.databaseReplicationEnabled = true; |
1047 o.ipConfiguration = buildIpConfiguration(); | 1082 o.ipConfiguration = buildIpConfiguration(); |
1048 o.kind = "foo"; | 1083 o.kind = "foo"; |
1049 o.locationPreference = buildLocationPreference(); | 1084 o.locationPreference = buildLocationPreference(); |
1050 o.pricingPlan = "foo"; | 1085 o.pricingPlan = "foo"; |
1051 o.replicationType = "foo"; | 1086 o.replicationType = "foo"; |
1052 o.settingsVersion = "foo"; | 1087 o.settingsVersion = "foo"; |
1053 o.tier = "foo"; | 1088 o.tier = "foo"; |
1054 } | 1089 } |
1055 buildCounterSettings--; | 1090 buildCounterSettings--; |
1056 return o; | 1091 return o; |
1057 } | 1092 } |
1058 | 1093 |
1059 checkSettings(api.Settings o) { | 1094 checkSettings(api.Settings o) { |
1060 buildCounterSettings++; | 1095 buildCounterSettings++; |
1061 if (buildCounterSettings < 3) { | 1096 if (buildCounterSettings < 3) { |
1062 unittest.expect(o.activationPolicy, unittest.equals('foo')); | 1097 unittest.expect(o.activationPolicy, unittest.equals('foo')); |
1063 checkUnnamed1584(o.authorizedGaeApplications); | 1098 checkUnnamed1790(o.authorizedGaeApplications); |
1064 checkUnnamed1585(o.backupConfiguration); | 1099 checkUnnamed1791(o.backupConfiguration); |
1065 checkUnnamed1586(o.databaseFlags); | 1100 checkUnnamed1792(o.databaseFlags); |
1066 unittest.expect(o.databaseReplicationEnabled, unittest.isTrue); | 1101 unittest.expect(o.databaseReplicationEnabled, unittest.isTrue); |
1067 checkIpConfiguration(o.ipConfiguration); | 1102 checkIpConfiguration(o.ipConfiguration); |
1068 unittest.expect(o.kind, unittest.equals('foo')); | 1103 unittest.expect(o.kind, unittest.equals('foo')); |
1069 checkLocationPreference(o.locationPreference); | 1104 checkLocationPreference(o.locationPreference); |
1070 unittest.expect(o.pricingPlan, unittest.equals('foo')); | 1105 unittest.expect(o.pricingPlan, unittest.equals('foo')); |
1071 unittest.expect(o.replicationType, unittest.equals('foo')); | 1106 unittest.expect(o.replicationType, unittest.equals('foo')); |
1072 unittest.expect(o.settingsVersion, unittest.equals('foo')); | 1107 unittest.expect(o.settingsVersion, unittest.equals('foo')); |
1073 unittest.expect(o.tier, unittest.equals('foo')); | 1108 unittest.expect(o.tier, unittest.equals('foo')); |
1074 } | 1109 } |
1075 buildCounterSettings--; | 1110 buildCounterSettings--; |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1185 checkSslCertsInsertResponse(api.SslCertsInsertResponse o) { | 1220 checkSslCertsInsertResponse(api.SslCertsInsertResponse o) { |
1186 buildCounterSslCertsInsertResponse++; | 1221 buildCounterSslCertsInsertResponse++; |
1187 if (buildCounterSslCertsInsertResponse < 3) { | 1222 if (buildCounterSslCertsInsertResponse < 3) { |
1188 checkSslCertDetail(o.clientCert); | 1223 checkSslCertDetail(o.clientCert); |
1189 unittest.expect(o.kind, unittest.equals('foo')); | 1224 unittest.expect(o.kind, unittest.equals('foo')); |
1190 checkSslCert(o.serverCaCert); | 1225 checkSslCert(o.serverCaCert); |
1191 } | 1226 } |
1192 buildCounterSslCertsInsertResponse--; | 1227 buildCounterSslCertsInsertResponse--; |
1193 } | 1228 } |
1194 | 1229 |
1195 buildUnnamed1587() { | 1230 buildUnnamed1793() { |
1196 var o = new core.List<api.SslCert>(); | 1231 var o = new core.List<api.SslCert>(); |
1197 o.add(buildSslCert()); | 1232 o.add(buildSslCert()); |
1198 o.add(buildSslCert()); | 1233 o.add(buildSslCert()); |
1199 return o; | 1234 return o; |
1200 } | 1235 } |
1201 | 1236 |
1202 checkUnnamed1587(core.List<api.SslCert> o) { | 1237 checkUnnamed1793(core.List<api.SslCert> o) { |
1203 unittest.expect(o, unittest.hasLength(2)); | 1238 unittest.expect(o, unittest.hasLength(2)); |
1204 checkSslCert(o[0]); | 1239 checkSslCert(o[0]); |
1205 checkSslCert(o[1]); | 1240 checkSslCert(o[1]); |
1206 } | 1241 } |
1207 | 1242 |
1208 core.int buildCounterSslCertsListResponse = 0; | 1243 core.int buildCounterSslCertsListResponse = 0; |
1209 buildSslCertsListResponse() { | 1244 buildSslCertsListResponse() { |
1210 var o = new api.SslCertsListResponse(); | 1245 var o = new api.SslCertsListResponse(); |
1211 buildCounterSslCertsListResponse++; | 1246 buildCounterSslCertsListResponse++; |
1212 if (buildCounterSslCertsListResponse < 3) { | 1247 if (buildCounterSslCertsListResponse < 3) { |
1213 o.items = buildUnnamed1587(); | 1248 o.items = buildUnnamed1793(); |
1214 o.kind = "foo"; | 1249 o.kind = "foo"; |
1215 } | 1250 } |
1216 buildCounterSslCertsListResponse--; | 1251 buildCounterSslCertsListResponse--; |
1217 return o; | 1252 return o; |
1218 } | 1253 } |
1219 | 1254 |
1220 checkSslCertsListResponse(api.SslCertsListResponse o) { | 1255 checkSslCertsListResponse(api.SslCertsListResponse o) { |
1221 buildCounterSslCertsListResponse++; | 1256 buildCounterSslCertsListResponse++; |
1222 if (buildCounterSslCertsListResponse < 3) { | 1257 if (buildCounterSslCertsListResponse < 3) { |
1223 checkUnnamed1587(o.items); | 1258 checkUnnamed1793(o.items); |
1224 unittest.expect(o.kind, unittest.equals('foo')); | 1259 unittest.expect(o.kind, unittest.equals('foo')); |
1225 } | 1260 } |
1226 buildCounterSslCertsListResponse--; | 1261 buildCounterSslCertsListResponse--; |
1227 } | 1262 } |
1228 | 1263 |
1229 buildUnnamed1588() { | 1264 buildUnnamed1794() { |
1230 var o = new core.List<core.String>(); | 1265 var o = new core.List<core.String>(); |
1231 o.add("foo"); | 1266 o.add("foo"); |
1232 o.add("foo"); | 1267 o.add("foo"); |
1233 return o; | 1268 return o; |
1234 } | 1269 } |
1235 | 1270 |
1236 checkUnnamed1588(core.List<core.String> o) { | 1271 checkUnnamed1794(core.List<core.String> o) { |
1237 unittest.expect(o, unittest.hasLength(2)); | 1272 unittest.expect(o, unittest.hasLength(2)); |
1238 unittest.expect(o[0], unittest.equals('foo')); | 1273 unittest.expect(o[0], unittest.equals('foo')); |
1239 unittest.expect(o[1], unittest.equals('foo')); | 1274 unittest.expect(o[1], unittest.equals('foo')); |
1240 } | 1275 } |
1241 | 1276 |
1242 core.int buildCounterTier = 0; | 1277 core.int buildCounterTier = 0; |
1243 buildTier() { | 1278 buildTier() { |
1244 var o = new api.Tier(); | 1279 var o = new api.Tier(); |
1245 buildCounterTier++; | 1280 buildCounterTier++; |
1246 if (buildCounterTier < 3) { | 1281 if (buildCounterTier < 3) { |
1247 o.DiskQuota = "foo"; | 1282 o.DiskQuota = "foo"; |
1248 o.RAM = "foo"; | 1283 o.RAM = "foo"; |
1249 o.kind = "foo"; | 1284 o.kind = "foo"; |
1250 o.region = buildUnnamed1588(); | 1285 o.region = buildUnnamed1794(); |
1251 o.tier = "foo"; | 1286 o.tier = "foo"; |
1252 } | 1287 } |
1253 buildCounterTier--; | 1288 buildCounterTier--; |
1254 return o; | 1289 return o; |
1255 } | 1290 } |
1256 | 1291 |
1257 checkTier(api.Tier o) { | 1292 checkTier(api.Tier o) { |
1258 buildCounterTier++; | 1293 buildCounterTier++; |
1259 if (buildCounterTier < 3) { | 1294 if (buildCounterTier < 3) { |
1260 unittest.expect(o.DiskQuota, unittest.equals('foo')); | 1295 unittest.expect(o.DiskQuota, unittest.equals('foo')); |
1261 unittest.expect(o.RAM, unittest.equals('foo')); | 1296 unittest.expect(o.RAM, unittest.equals('foo')); |
1262 unittest.expect(o.kind, unittest.equals('foo')); | 1297 unittest.expect(o.kind, unittest.equals('foo')); |
1263 checkUnnamed1588(o.region); | 1298 checkUnnamed1794(o.region); |
1264 unittest.expect(o.tier, unittest.equals('foo')); | 1299 unittest.expect(o.tier, unittest.equals('foo')); |
1265 } | 1300 } |
1266 buildCounterTier--; | 1301 buildCounterTier--; |
1267 } | 1302 } |
1268 | 1303 |
1269 buildUnnamed1589() { | 1304 buildUnnamed1795() { |
1270 var o = new core.List<api.Tier>(); | 1305 var o = new core.List<api.Tier>(); |
1271 o.add(buildTier()); | 1306 o.add(buildTier()); |
1272 o.add(buildTier()); | 1307 o.add(buildTier()); |
1273 return o; | 1308 return o; |
1274 } | 1309 } |
1275 | 1310 |
1276 checkUnnamed1589(core.List<api.Tier> o) { | 1311 checkUnnamed1795(core.List<api.Tier> o) { |
1277 unittest.expect(o, unittest.hasLength(2)); | 1312 unittest.expect(o, unittest.hasLength(2)); |
1278 checkTier(o[0]); | 1313 checkTier(o[0]); |
1279 checkTier(o[1]); | 1314 checkTier(o[1]); |
1280 } | 1315 } |
1281 | 1316 |
1282 core.int buildCounterTiersListResponse = 0; | 1317 core.int buildCounterTiersListResponse = 0; |
1283 buildTiersListResponse() { | 1318 buildTiersListResponse() { |
1284 var o = new api.TiersListResponse(); | 1319 var o = new api.TiersListResponse(); |
1285 buildCounterTiersListResponse++; | 1320 buildCounterTiersListResponse++; |
1286 if (buildCounterTiersListResponse < 3) { | 1321 if (buildCounterTiersListResponse < 3) { |
1287 o.items = buildUnnamed1589(); | 1322 o.items = buildUnnamed1795(); |
1288 o.kind = "foo"; | 1323 o.kind = "foo"; |
1289 } | 1324 } |
1290 buildCounterTiersListResponse--; | 1325 buildCounterTiersListResponse--; |
1291 return o; | 1326 return o; |
1292 } | 1327 } |
1293 | 1328 |
1294 checkTiersListResponse(api.TiersListResponse o) { | 1329 checkTiersListResponse(api.TiersListResponse o) { |
1295 buildCounterTiersListResponse++; | 1330 buildCounterTiersListResponse++; |
1296 if (buildCounterTiersListResponse < 3) { | 1331 if (buildCounterTiersListResponse < 3) { |
1297 checkUnnamed1589(o.items); | 1332 checkUnnamed1795(o.items); |
1298 unittest.expect(o.kind, unittest.equals('foo')); | 1333 unittest.expect(o.kind, unittest.equals('foo')); |
1299 } | 1334 } |
1300 buildCounterTiersListResponse--; | 1335 buildCounterTiersListResponse--; |
1301 } | 1336 } |
1302 | 1337 |
1303 | 1338 |
1304 main() { | 1339 main() { |
1305 unittest.group("obj-schema-BackupConfiguration", () { | 1340 unittest.group("obj-schema-BackupConfiguration", () { |
1306 unittest.test("to-json--from-json", () { | 1341 unittest.test("to-json--from-json", () { |
1307 var o = buildBackupConfiguration(); | 1342 var o = buildBackupConfiguration(); |
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1685 var o = buildTiersListResponse(); | 1720 var o = buildTiersListResponse(); |
1686 var od = new api.TiersListResponse.fromJson(o.toJson()); | 1721 var od = new api.TiersListResponse.fromJson(o.toJson()); |
1687 checkTiersListResponse(od); | 1722 checkTiersListResponse(od); |
1688 }); | 1723 }); |
1689 }); | 1724 }); |
1690 | 1725 |
1691 | 1726 |
1692 unittest.group("resource-BackupRunsResourceApi", () { | 1727 unittest.group("resource-BackupRunsResourceApi", () { |
1693 unittest.test("method--get", () { | 1728 unittest.test("method--get", () { |
1694 | 1729 |
1695 var mock = new common_test.HttpServerMock(); | 1730 var mock = new HttpServerMock(); |
1696 api.BackupRunsResourceApi res = new api.SqladminApi(mock).backupRuns; | 1731 api.BackupRunsResourceApi res = new api.SqladminApi(mock).backupRuns; |
1697 var arg_project = "foo"; | 1732 var arg_project = "foo"; |
1698 var arg_instance = "foo"; | 1733 var arg_instance = "foo"; |
1699 var arg_backupConfiguration = "foo"; | 1734 var arg_backupConfiguration = "foo"; |
1700 var arg_dueTime = "foo"; | 1735 var arg_dueTime = "foo"; |
1701 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1736 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1702 var path = (req.url).path; | 1737 var path = (req.url).path; |
1703 var pathOffset = 0; | 1738 var pathOffset = 0; |
1704 var index; | 1739 var index; |
1705 var subPart; | 1740 var subPart; |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1743 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1778 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
1744 } | 1779 } |
1745 } | 1780 } |
1746 unittest.expect(queryMap["dueTime"].first, unittest.equals(arg_dueTime))
; | 1781 unittest.expect(queryMap["dueTime"].first, unittest.equals(arg_dueTime))
; |
1747 | 1782 |
1748 | 1783 |
1749 var h = { | 1784 var h = { |
1750 "content-type" : "application/json; charset=utf-8", | 1785 "content-type" : "application/json; charset=utf-8", |
1751 }; | 1786 }; |
1752 var resp = convert.JSON.encode(buildBackupRun()); | 1787 var resp = convert.JSON.encode(buildBackupRun()); |
1753 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 1788 return new async.Future.value(stringResponse(200, h, resp)); |
1754 }), true); | 1789 }), true); |
1755 res.get(arg_project, arg_instance, arg_backupConfiguration, arg_dueTime).t
hen(unittest.expectAsync(((api.BackupRun response) { | 1790 res.get(arg_project, arg_instance, arg_backupConfiguration, arg_dueTime).t
hen(unittest.expectAsync(((api.BackupRun response) { |
1756 checkBackupRun(response); | 1791 checkBackupRun(response); |
1757 }))); | 1792 }))); |
1758 }); | 1793 }); |
1759 | 1794 |
1760 unittest.test("method--list", () { | 1795 unittest.test("method--list", () { |
1761 | 1796 |
1762 var mock = new common_test.HttpServerMock(); | 1797 var mock = new HttpServerMock(); |
1763 api.BackupRunsResourceApi res = new api.SqladminApi(mock).backupRuns; | 1798 api.BackupRunsResourceApi res = new api.SqladminApi(mock).backupRuns; |
1764 var arg_project = "foo"; | 1799 var arg_project = "foo"; |
1765 var arg_instance = "foo"; | 1800 var arg_instance = "foo"; |
1766 var arg_backupConfiguration = "foo"; | 1801 var arg_backupConfiguration = "foo"; |
1767 var arg_maxResults = 42; | 1802 var arg_maxResults = 42; |
1768 var arg_pageToken = "foo"; | 1803 var arg_pageToken = "foo"; |
1769 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1804 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1770 var path = (req.url).path; | 1805 var path = (req.url).path; |
1771 var pathOffset = 0; | 1806 var pathOffset = 0; |
1772 var index; | 1807 var index; |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1810 } | 1845 } |
1811 unittest.expect(queryMap["backupConfiguration"].first, unittest.equals(a
rg_backupConfiguration)); | 1846 unittest.expect(queryMap["backupConfiguration"].first, unittest.equals(a
rg_backupConfiguration)); |
1812 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | 1847 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); |
1813 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 1848 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
1814 | 1849 |
1815 | 1850 |
1816 var h = { | 1851 var h = { |
1817 "content-type" : "application/json; charset=utf-8", | 1852 "content-type" : "application/json; charset=utf-8", |
1818 }; | 1853 }; |
1819 var resp = convert.JSON.encode(buildBackupRunsListResponse()); | 1854 var resp = convert.JSON.encode(buildBackupRunsListResponse()); |
1820 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 1855 return new async.Future.value(stringResponse(200, h, resp)); |
1821 }), true); | 1856 }), true); |
1822 res.list(arg_project, arg_instance, arg_backupConfiguration, maxResults: a
rg_maxResults, pageToken: arg_pageToken).then(unittest.expectAsync(((api.BackupR
unsListResponse response) { | 1857 res.list(arg_project, arg_instance, arg_backupConfiguration, maxResults: a
rg_maxResults, pageToken: arg_pageToken).then(unittest.expectAsync(((api.BackupR
unsListResponse response) { |
1823 checkBackupRunsListResponse(response); | 1858 checkBackupRunsListResponse(response); |
1824 }))); | 1859 }))); |
1825 }); | 1860 }); |
1826 | 1861 |
1827 }); | 1862 }); |
1828 | 1863 |
1829 | 1864 |
1830 unittest.group("resource-FlagsResourceApi", () { | 1865 unittest.group("resource-FlagsResourceApi", () { |
1831 unittest.test("method--list", () { | 1866 unittest.test("method--list", () { |
1832 | 1867 |
1833 var mock = new common_test.HttpServerMock(); | 1868 var mock = new HttpServerMock(); |
1834 api.FlagsResourceApi res = new api.SqladminApi(mock).flags; | 1869 api.FlagsResourceApi res = new api.SqladminApi(mock).flags; |
1835 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1870 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1836 var path = (req.url).path; | 1871 var path = (req.url).path; |
1837 var pathOffset = 0; | 1872 var pathOffset = 0; |
1838 var index; | 1873 var index; |
1839 var subPart; | 1874 var subPart; |
1840 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1875 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
1841 pathOffset += 1; | 1876 pathOffset += 1; |
1842 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta3/")); | 1877 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta3/")); |
1843 pathOffset += 12; | 1878 pathOffset += 12; |
(...skipping 15 matching lines...) Expand all Loading... |
1859 var keyvalue = part.split("="); | 1894 var keyvalue = part.split("="); |
1860 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1895 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
1861 } | 1896 } |
1862 } | 1897 } |
1863 | 1898 |
1864 | 1899 |
1865 var h = { | 1900 var h = { |
1866 "content-type" : "application/json; charset=utf-8", | 1901 "content-type" : "application/json; charset=utf-8", |
1867 }; | 1902 }; |
1868 var resp = convert.JSON.encode(buildFlagsListResponse()); | 1903 var resp = convert.JSON.encode(buildFlagsListResponse()); |
1869 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 1904 return new async.Future.value(stringResponse(200, h, resp)); |
1870 }), true); | 1905 }), true); |
1871 res.list().then(unittest.expectAsync(((api.FlagsListResponse response) { | 1906 res.list().then(unittest.expectAsync(((api.FlagsListResponse response) { |
1872 checkFlagsListResponse(response); | 1907 checkFlagsListResponse(response); |
1873 }))); | 1908 }))); |
1874 }); | 1909 }); |
1875 | 1910 |
1876 }); | 1911 }); |
1877 | 1912 |
1878 | 1913 |
1879 unittest.group("resource-InstancesResourceApi", () { | 1914 unittest.group("resource-InstancesResourceApi", () { |
1880 unittest.test("method--clone", () { | 1915 unittest.test("method--clone", () { |
1881 | 1916 |
1882 var mock = new common_test.HttpServerMock(); | 1917 var mock = new HttpServerMock(); |
1883 api.InstancesResourceApi res = new api.SqladminApi(mock).instances; | 1918 api.InstancesResourceApi res = new api.SqladminApi(mock).instances; |
1884 var arg_request = buildInstancesCloneRequest(); | 1919 var arg_request = buildInstancesCloneRequest(); |
1885 var arg_project = "foo"; | 1920 var arg_project = "foo"; |
1886 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1921 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1887 var obj = new api.InstancesCloneRequest.fromJson(json); | 1922 var obj = new api.InstancesCloneRequest.fromJson(json); |
1888 checkInstancesCloneRequest(obj); | 1923 checkInstancesCloneRequest(obj); |
1889 | 1924 |
1890 var path = (req.url).path; | 1925 var path = (req.url).path; |
1891 var pathOffset = 0; | 1926 var pathOffset = 0; |
1892 var index; | 1927 var index; |
(...skipping 27 matching lines...) Expand all Loading... |
1920 var keyvalue = part.split("="); | 1955 var keyvalue = part.split("="); |
1921 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1956 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
1922 } | 1957 } |
1923 } | 1958 } |
1924 | 1959 |
1925 | 1960 |
1926 var h = { | 1961 var h = { |
1927 "content-type" : "application/json; charset=utf-8", | 1962 "content-type" : "application/json; charset=utf-8", |
1928 }; | 1963 }; |
1929 var resp = convert.JSON.encode(buildInstancesCloneResponse()); | 1964 var resp = convert.JSON.encode(buildInstancesCloneResponse()); |
1930 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 1965 return new async.Future.value(stringResponse(200, h, resp)); |
1931 }), true); | 1966 }), true); |
1932 res.clone(arg_request, arg_project).then(unittest.expectAsync(((api.Instan
cesCloneResponse response) { | 1967 res.clone(arg_request, arg_project).then(unittest.expectAsync(((api.Instan
cesCloneResponse response) { |
1933 checkInstancesCloneResponse(response); | 1968 checkInstancesCloneResponse(response); |
1934 }))); | 1969 }))); |
1935 }); | 1970 }); |
1936 | 1971 |
1937 unittest.test("method--delete", () { | 1972 unittest.test("method--delete", () { |
1938 | 1973 |
1939 var mock = new common_test.HttpServerMock(); | 1974 var mock = new HttpServerMock(); |
1940 api.InstancesResourceApi res = new api.SqladminApi(mock).instances; | 1975 api.InstancesResourceApi res = new api.SqladminApi(mock).instances; |
1941 var arg_project = "foo"; | 1976 var arg_project = "foo"; |
1942 var arg_instance = "foo"; | 1977 var arg_instance = "foo"; |
1943 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1978 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1944 var path = (req.url).path; | 1979 var path = (req.url).path; |
1945 var pathOffset = 0; | 1980 var pathOffset = 0; |
1946 var index; | 1981 var index; |
1947 var subPart; | 1982 var subPart; |
1948 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1983 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
1949 pathOffset += 1; | 1984 pathOffset += 1; |
(...skipping 27 matching lines...) Expand all Loading... |
1977 var keyvalue = part.split("="); | 2012 var keyvalue = part.split("="); |
1978 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2013 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
1979 } | 2014 } |
1980 } | 2015 } |
1981 | 2016 |
1982 | 2017 |
1983 var h = { | 2018 var h = { |
1984 "content-type" : "application/json; charset=utf-8", | 2019 "content-type" : "application/json; charset=utf-8", |
1985 }; | 2020 }; |
1986 var resp = convert.JSON.encode(buildInstancesDeleteResponse()); | 2021 var resp = convert.JSON.encode(buildInstancesDeleteResponse()); |
1987 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2022 return new async.Future.value(stringResponse(200, h, resp)); |
1988 }), true); | 2023 }), true); |
1989 res.delete(arg_project, arg_instance).then(unittest.expectAsync(((api.Inst
ancesDeleteResponse response) { | 2024 res.delete(arg_project, arg_instance).then(unittest.expectAsync(((api.Inst
ancesDeleteResponse response) { |
1990 checkInstancesDeleteResponse(response); | 2025 checkInstancesDeleteResponse(response); |
1991 }))); | 2026 }))); |
1992 }); | 2027 }); |
1993 | 2028 |
1994 unittest.test("method--export", () { | 2029 unittest.test("method--export", () { |
1995 | 2030 |
1996 var mock = new common_test.HttpServerMock(); | 2031 var mock = new HttpServerMock(); |
1997 api.InstancesResourceApi res = new api.SqladminApi(mock).instances; | 2032 api.InstancesResourceApi res = new api.SqladminApi(mock).instances; |
1998 var arg_request = buildInstancesExportRequest(); | 2033 var arg_request = buildInstancesExportRequest(); |
1999 var arg_project = "foo"; | 2034 var arg_project = "foo"; |
2000 var arg_instance = "foo"; | 2035 var arg_instance = "foo"; |
2001 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2036 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2002 var obj = new api.InstancesExportRequest.fromJson(json); | 2037 var obj = new api.InstancesExportRequest.fromJson(json); |
2003 checkInstancesExportRequest(obj); | 2038 checkInstancesExportRequest(obj); |
2004 | 2039 |
2005 var path = (req.url).path; | 2040 var path = (req.url).path; |
2006 var pathOffset = 0; | 2041 var pathOffset = 0; |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2042 var keyvalue = part.split("="); | 2077 var keyvalue = part.split("="); |
2043 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2078 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
2044 } | 2079 } |
2045 } | 2080 } |
2046 | 2081 |
2047 | 2082 |
2048 var h = { | 2083 var h = { |
2049 "content-type" : "application/json; charset=utf-8", | 2084 "content-type" : "application/json; charset=utf-8", |
2050 }; | 2085 }; |
2051 var resp = convert.JSON.encode(buildInstancesExportResponse()); | 2086 var resp = convert.JSON.encode(buildInstancesExportResponse()); |
2052 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2087 return new async.Future.value(stringResponse(200, h, resp)); |
2053 }), true); | 2088 }), true); |
2054 res.export(arg_request, arg_project, arg_instance).then(unittest.expectAsy
nc(((api.InstancesExportResponse response) { | 2089 res.export(arg_request, arg_project, arg_instance).then(unittest.expectAsy
nc(((api.InstancesExportResponse response) { |
2055 checkInstancesExportResponse(response); | 2090 checkInstancesExportResponse(response); |
2056 }))); | 2091 }))); |
2057 }); | 2092 }); |
2058 | 2093 |
2059 unittest.test("method--get", () { | 2094 unittest.test("method--get", () { |
2060 | 2095 |
2061 var mock = new common_test.HttpServerMock(); | 2096 var mock = new HttpServerMock(); |
2062 api.InstancesResourceApi res = new api.SqladminApi(mock).instances; | 2097 api.InstancesResourceApi res = new api.SqladminApi(mock).instances; |
2063 var arg_project = "foo"; | 2098 var arg_project = "foo"; |
2064 var arg_instance = "foo"; | 2099 var arg_instance = "foo"; |
2065 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2100 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2066 var path = (req.url).path; | 2101 var path = (req.url).path; |
2067 var pathOffset = 0; | 2102 var pathOffset = 0; |
2068 var index; | 2103 var index; |
2069 var subPart; | 2104 var subPart; |
2070 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2105 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
2071 pathOffset += 1; | 2106 pathOffset += 1; |
(...skipping 27 matching lines...) Expand all Loading... |
2099 var keyvalue = part.split("="); | 2134 var keyvalue = part.split("="); |
2100 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2135 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
2101 } | 2136 } |
2102 } | 2137 } |
2103 | 2138 |
2104 | 2139 |
2105 var h = { | 2140 var h = { |
2106 "content-type" : "application/json; charset=utf-8", | 2141 "content-type" : "application/json; charset=utf-8", |
2107 }; | 2142 }; |
2108 var resp = convert.JSON.encode(buildDatabaseInstance()); | 2143 var resp = convert.JSON.encode(buildDatabaseInstance()); |
2109 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2144 return new async.Future.value(stringResponse(200, h, resp)); |
2110 }), true); | 2145 }), true); |
2111 res.get(arg_project, arg_instance).then(unittest.expectAsync(((api.Databas
eInstance response) { | 2146 res.get(arg_project, arg_instance).then(unittest.expectAsync(((api.Databas
eInstance response) { |
2112 checkDatabaseInstance(response); | 2147 checkDatabaseInstance(response); |
2113 }))); | 2148 }))); |
2114 }); | 2149 }); |
2115 | 2150 |
2116 unittest.test("method--import", () { | 2151 unittest.test("method--import", () { |
2117 | 2152 |
2118 var mock = new common_test.HttpServerMock(); | 2153 var mock = new HttpServerMock(); |
2119 api.InstancesResourceApi res = new api.SqladminApi(mock).instances; | 2154 api.InstancesResourceApi res = new api.SqladminApi(mock).instances; |
2120 var arg_request = buildInstancesImportRequest(); | 2155 var arg_request = buildInstancesImportRequest(); |
2121 var arg_project = "foo"; | 2156 var arg_project = "foo"; |
2122 var arg_instance = "foo"; | 2157 var arg_instance = "foo"; |
2123 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2158 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2124 var obj = new api.InstancesImportRequest.fromJson(json); | 2159 var obj = new api.InstancesImportRequest.fromJson(json); |
2125 checkInstancesImportRequest(obj); | 2160 checkInstancesImportRequest(obj); |
2126 | 2161 |
2127 var path = (req.url).path; | 2162 var path = (req.url).path; |
2128 var pathOffset = 0; | 2163 var pathOffset = 0; |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2164 var keyvalue = part.split("="); | 2199 var keyvalue = part.split("="); |
2165 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2200 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
2166 } | 2201 } |
2167 } | 2202 } |
2168 | 2203 |
2169 | 2204 |
2170 var h = { | 2205 var h = { |
2171 "content-type" : "application/json; charset=utf-8", | 2206 "content-type" : "application/json; charset=utf-8", |
2172 }; | 2207 }; |
2173 var resp = convert.JSON.encode(buildInstancesImportResponse()); | 2208 var resp = convert.JSON.encode(buildInstancesImportResponse()); |
2174 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2209 return new async.Future.value(stringResponse(200, h, resp)); |
2175 }), true); | 2210 }), true); |
2176 res.import(arg_request, arg_project, arg_instance).then(unittest.expectAsy
nc(((api.InstancesImportResponse response) { | 2211 res.import(arg_request, arg_project, arg_instance).then(unittest.expectAsy
nc(((api.InstancesImportResponse response) { |
2177 checkInstancesImportResponse(response); | 2212 checkInstancesImportResponse(response); |
2178 }))); | 2213 }))); |
2179 }); | 2214 }); |
2180 | 2215 |
2181 unittest.test("method--insert", () { | 2216 unittest.test("method--insert", () { |
2182 | 2217 |
2183 var mock = new common_test.HttpServerMock(); | 2218 var mock = new HttpServerMock(); |
2184 api.InstancesResourceApi res = new api.SqladminApi(mock).instances; | 2219 api.InstancesResourceApi res = new api.SqladminApi(mock).instances; |
2185 var arg_request = buildDatabaseInstance(); | 2220 var arg_request = buildDatabaseInstance(); |
2186 var arg_project = "foo"; | 2221 var arg_project = "foo"; |
2187 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2222 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2188 var obj = new api.DatabaseInstance.fromJson(json); | 2223 var obj = new api.DatabaseInstance.fromJson(json); |
2189 checkDatabaseInstance(obj); | 2224 checkDatabaseInstance(obj); |
2190 | 2225 |
2191 var path = (req.url).path; | 2226 var path = (req.url).path; |
2192 var pathOffset = 0; | 2227 var pathOffset = 0; |
2193 var index; | 2228 var index; |
(...skipping 27 matching lines...) Expand all Loading... |
2221 var keyvalue = part.split("="); | 2256 var keyvalue = part.split("="); |
2222 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2257 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
2223 } | 2258 } |
2224 } | 2259 } |
2225 | 2260 |
2226 | 2261 |
2227 var h = { | 2262 var h = { |
2228 "content-type" : "application/json; charset=utf-8", | 2263 "content-type" : "application/json; charset=utf-8", |
2229 }; | 2264 }; |
2230 var resp = convert.JSON.encode(buildInstancesInsertResponse()); | 2265 var resp = convert.JSON.encode(buildInstancesInsertResponse()); |
2231 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2266 return new async.Future.value(stringResponse(200, h, resp)); |
2232 }), true); | 2267 }), true); |
2233 res.insert(arg_request, arg_project).then(unittest.expectAsync(((api.Insta
ncesInsertResponse response) { | 2268 res.insert(arg_request, arg_project).then(unittest.expectAsync(((api.Insta
ncesInsertResponse response) { |
2234 checkInstancesInsertResponse(response); | 2269 checkInstancesInsertResponse(response); |
2235 }))); | 2270 }))); |
2236 }); | 2271 }); |
2237 | 2272 |
2238 unittest.test("method--list", () { | 2273 unittest.test("method--list", () { |
2239 | 2274 |
2240 var mock = new common_test.HttpServerMock(); | 2275 var mock = new HttpServerMock(); |
2241 api.InstancesResourceApi res = new api.SqladminApi(mock).instances; | 2276 api.InstancesResourceApi res = new api.SqladminApi(mock).instances; |
2242 var arg_project = "foo"; | 2277 var arg_project = "foo"; |
2243 var arg_maxResults = 42; | 2278 var arg_maxResults = 42; |
2244 var arg_pageToken = "foo"; | 2279 var arg_pageToken = "foo"; |
2245 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2280 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2246 var path = (req.url).path; | 2281 var path = (req.url).path; |
2247 var pathOffset = 0; | 2282 var pathOffset = 0; |
2248 var index; | 2283 var index; |
2249 var subPart; | 2284 var subPart; |
2250 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2285 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
(...skipping 27 matching lines...) Expand all Loading... |
2278 } | 2313 } |
2279 } | 2314 } |
2280 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | 2315 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); |
2281 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 2316 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
2282 | 2317 |
2283 | 2318 |
2284 var h = { | 2319 var h = { |
2285 "content-type" : "application/json; charset=utf-8", | 2320 "content-type" : "application/json; charset=utf-8", |
2286 }; | 2321 }; |
2287 var resp = convert.JSON.encode(buildInstancesListResponse()); | 2322 var resp = convert.JSON.encode(buildInstancesListResponse()); |
2288 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2323 return new async.Future.value(stringResponse(200, h, resp)); |
2289 }), true); | 2324 }), true); |
2290 res.list(arg_project, maxResults: arg_maxResults, pageToken: arg_pageToken
).then(unittest.expectAsync(((api.InstancesListResponse response) { | 2325 res.list(arg_project, maxResults: arg_maxResults, pageToken: arg_pageToken
).then(unittest.expectAsync(((api.InstancesListResponse response) { |
2291 checkInstancesListResponse(response); | 2326 checkInstancesListResponse(response); |
2292 }))); | 2327 }))); |
2293 }); | 2328 }); |
2294 | 2329 |
2295 unittest.test("method--patch", () { | 2330 unittest.test("method--patch", () { |
2296 | 2331 |
2297 var mock = new common_test.HttpServerMock(); | 2332 var mock = new HttpServerMock(); |
2298 api.InstancesResourceApi res = new api.SqladminApi(mock).instances; | 2333 api.InstancesResourceApi res = new api.SqladminApi(mock).instances; |
2299 var arg_request = buildDatabaseInstance(); | 2334 var arg_request = buildDatabaseInstance(); |
2300 var arg_project = "foo"; | 2335 var arg_project = "foo"; |
2301 var arg_instance = "foo"; | 2336 var arg_instance = "foo"; |
2302 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2337 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2303 var obj = new api.DatabaseInstance.fromJson(json); | 2338 var obj = new api.DatabaseInstance.fromJson(json); |
2304 checkDatabaseInstance(obj); | 2339 checkDatabaseInstance(obj); |
2305 | 2340 |
2306 var path = (req.url).path; | 2341 var path = (req.url).path; |
2307 var pathOffset = 0; | 2342 var pathOffset = 0; |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2339 var keyvalue = part.split("="); | 2374 var keyvalue = part.split("="); |
2340 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2375 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
2341 } | 2376 } |
2342 } | 2377 } |
2343 | 2378 |
2344 | 2379 |
2345 var h = { | 2380 var h = { |
2346 "content-type" : "application/json; charset=utf-8", | 2381 "content-type" : "application/json; charset=utf-8", |
2347 }; | 2382 }; |
2348 var resp = convert.JSON.encode(buildInstancesUpdateResponse()); | 2383 var resp = convert.JSON.encode(buildInstancesUpdateResponse()); |
2349 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2384 return new async.Future.value(stringResponse(200, h, resp)); |
2350 }), true); | 2385 }), true); |
2351 res.patch(arg_request, arg_project, arg_instance).then(unittest.expectAsyn
c(((api.InstancesUpdateResponse response) { | 2386 res.patch(arg_request, arg_project, arg_instance).then(unittest.expectAsyn
c(((api.InstancesUpdateResponse response) { |
2352 checkInstancesUpdateResponse(response); | 2387 checkInstancesUpdateResponse(response); |
2353 }))); | 2388 }))); |
2354 }); | 2389 }); |
2355 | 2390 |
2356 unittest.test("method--promoteReplica", () { | 2391 unittest.test("method--promoteReplica", () { |
2357 | 2392 |
2358 var mock = new common_test.HttpServerMock(); | 2393 var mock = new HttpServerMock(); |
2359 api.InstancesResourceApi res = new api.SqladminApi(mock).instances; | 2394 api.InstancesResourceApi res = new api.SqladminApi(mock).instances; |
2360 var arg_project = "foo"; | 2395 var arg_project = "foo"; |
2361 var arg_instance = "foo"; | 2396 var arg_instance = "foo"; |
2362 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2397 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2363 var path = (req.url).path; | 2398 var path = (req.url).path; |
2364 var pathOffset = 0; | 2399 var pathOffset = 0; |
2365 var index; | 2400 var index; |
2366 var subPart; | 2401 var subPart; |
2367 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2402 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
2368 pathOffset += 1; | 2403 pathOffset += 1; |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2400 var keyvalue = part.split("="); | 2435 var keyvalue = part.split("="); |
2401 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2436 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
2402 } | 2437 } |
2403 } | 2438 } |
2404 | 2439 |
2405 | 2440 |
2406 var h = { | 2441 var h = { |
2407 "content-type" : "application/json; charset=utf-8", | 2442 "content-type" : "application/json; charset=utf-8", |
2408 }; | 2443 }; |
2409 var resp = convert.JSON.encode(buildInstancesPromoteReplicaResponse()); | 2444 var resp = convert.JSON.encode(buildInstancesPromoteReplicaResponse()); |
2410 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2445 return new async.Future.value(stringResponse(200, h, resp)); |
2411 }), true); | 2446 }), true); |
2412 res.promoteReplica(arg_project, arg_instance).then(unittest.expectAsync(((
api.InstancesPromoteReplicaResponse response) { | 2447 res.promoteReplica(arg_project, arg_instance).then(unittest.expectAsync(((
api.InstancesPromoteReplicaResponse response) { |
2413 checkInstancesPromoteReplicaResponse(response); | 2448 checkInstancesPromoteReplicaResponse(response); |
2414 }))); | 2449 }))); |
2415 }); | 2450 }); |
2416 | 2451 |
2417 unittest.test("method--resetSslConfig", () { | 2452 unittest.test("method--resetSslConfig", () { |
2418 | 2453 |
2419 var mock = new common_test.HttpServerMock(); | 2454 var mock = new HttpServerMock(); |
2420 api.InstancesResourceApi res = new api.SqladminApi(mock).instances; | 2455 api.InstancesResourceApi res = new api.SqladminApi(mock).instances; |
2421 var arg_project = "foo"; | 2456 var arg_project = "foo"; |
2422 var arg_instance = "foo"; | 2457 var arg_instance = "foo"; |
2423 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2458 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2424 var path = (req.url).path; | 2459 var path = (req.url).path; |
2425 var pathOffset = 0; | 2460 var pathOffset = 0; |
2426 var index; | 2461 var index; |
2427 var subPart; | 2462 var subPart; |
2428 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2463 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
2429 pathOffset += 1; | 2464 pathOffset += 1; |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2461 var keyvalue = part.split("="); | 2496 var keyvalue = part.split("="); |
2462 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2497 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
2463 } | 2498 } |
2464 } | 2499 } |
2465 | 2500 |
2466 | 2501 |
2467 var h = { | 2502 var h = { |
2468 "content-type" : "application/json; charset=utf-8", | 2503 "content-type" : "application/json; charset=utf-8", |
2469 }; | 2504 }; |
2470 var resp = convert.JSON.encode(buildInstancesResetSslConfigResponse()); | 2505 var resp = convert.JSON.encode(buildInstancesResetSslConfigResponse()); |
2471 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2506 return new async.Future.value(stringResponse(200, h, resp)); |
2472 }), true); | 2507 }), true); |
2473 res.resetSslConfig(arg_project, arg_instance).then(unittest.expectAsync(((
api.InstancesResetSslConfigResponse response) { | 2508 res.resetSslConfig(arg_project, arg_instance).then(unittest.expectAsync(((
api.InstancesResetSslConfigResponse response) { |
2474 checkInstancesResetSslConfigResponse(response); | 2509 checkInstancesResetSslConfigResponse(response); |
2475 }))); | 2510 }))); |
2476 }); | 2511 }); |
2477 | 2512 |
2478 unittest.test("method--restart", () { | 2513 unittest.test("method--restart", () { |
2479 | 2514 |
2480 var mock = new common_test.HttpServerMock(); | 2515 var mock = new HttpServerMock(); |
2481 api.InstancesResourceApi res = new api.SqladminApi(mock).instances; | 2516 api.InstancesResourceApi res = new api.SqladminApi(mock).instances; |
2482 var arg_project = "foo"; | 2517 var arg_project = "foo"; |
2483 var arg_instance = "foo"; | 2518 var arg_instance = "foo"; |
2484 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2519 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2485 var path = (req.url).path; | 2520 var path = (req.url).path; |
2486 var pathOffset = 0; | 2521 var pathOffset = 0; |
2487 var index; | 2522 var index; |
2488 var subPart; | 2523 var subPart; |
2489 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2524 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
2490 pathOffset += 1; | 2525 pathOffset += 1; |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2522 var keyvalue = part.split("="); | 2557 var keyvalue = part.split("="); |
2523 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2558 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
2524 } | 2559 } |
2525 } | 2560 } |
2526 | 2561 |
2527 | 2562 |
2528 var h = { | 2563 var h = { |
2529 "content-type" : "application/json; charset=utf-8", | 2564 "content-type" : "application/json; charset=utf-8", |
2530 }; | 2565 }; |
2531 var resp = convert.JSON.encode(buildInstancesRestartResponse()); | 2566 var resp = convert.JSON.encode(buildInstancesRestartResponse()); |
2532 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2567 return new async.Future.value(stringResponse(200, h, resp)); |
2533 }), true); | 2568 }), true); |
2534 res.restart(arg_project, arg_instance).then(unittest.expectAsync(((api.Ins
tancesRestartResponse response) { | 2569 res.restart(arg_project, arg_instance).then(unittest.expectAsync(((api.Ins
tancesRestartResponse response) { |
2535 checkInstancesRestartResponse(response); | 2570 checkInstancesRestartResponse(response); |
2536 }))); | 2571 }))); |
2537 }); | 2572 }); |
2538 | 2573 |
2539 unittest.test("method--restoreBackup", () { | 2574 unittest.test("method--restoreBackup", () { |
2540 | 2575 |
2541 var mock = new common_test.HttpServerMock(); | 2576 var mock = new HttpServerMock(); |
2542 api.InstancesResourceApi res = new api.SqladminApi(mock).instances; | 2577 api.InstancesResourceApi res = new api.SqladminApi(mock).instances; |
2543 var arg_project = "foo"; | 2578 var arg_project = "foo"; |
2544 var arg_instance = "foo"; | 2579 var arg_instance = "foo"; |
2545 var arg_backupConfiguration = "foo"; | 2580 var arg_backupConfiguration = "foo"; |
2546 var arg_dueTime = "foo"; | 2581 var arg_dueTime = "foo"; |
2547 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2582 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2548 var path = (req.url).path; | 2583 var path = (req.url).path; |
2549 var pathOffset = 0; | 2584 var pathOffset = 0; |
2550 var index; | 2585 var index; |
2551 var subPart; | 2586 var subPart; |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2587 } | 2622 } |
2588 } | 2623 } |
2589 unittest.expect(queryMap["backupConfiguration"].first, unittest.equals(a
rg_backupConfiguration)); | 2624 unittest.expect(queryMap["backupConfiguration"].first, unittest.equals(a
rg_backupConfiguration)); |
2590 unittest.expect(queryMap["dueTime"].first, unittest.equals(arg_dueTime))
; | 2625 unittest.expect(queryMap["dueTime"].first, unittest.equals(arg_dueTime))
; |
2591 | 2626 |
2592 | 2627 |
2593 var h = { | 2628 var h = { |
2594 "content-type" : "application/json; charset=utf-8", | 2629 "content-type" : "application/json; charset=utf-8", |
2595 }; | 2630 }; |
2596 var resp = convert.JSON.encode(buildInstancesRestoreBackupResponse()); | 2631 var resp = convert.JSON.encode(buildInstancesRestoreBackupResponse()); |
2597 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2632 return new async.Future.value(stringResponse(200, h, resp)); |
2598 }), true); | 2633 }), true); |
2599 res.restoreBackup(arg_project, arg_instance, arg_backupConfiguration, arg_
dueTime).then(unittest.expectAsync(((api.InstancesRestoreBackupResponse response
) { | 2634 res.restoreBackup(arg_project, arg_instance, arg_backupConfiguration, arg_
dueTime).then(unittest.expectAsync(((api.InstancesRestoreBackupResponse response
) { |
2600 checkInstancesRestoreBackupResponse(response); | 2635 checkInstancesRestoreBackupResponse(response); |
2601 }))); | 2636 }))); |
2602 }); | 2637 }); |
2603 | 2638 |
2604 unittest.test("method--setRootPassword", () { | 2639 unittest.test("method--setRootPassword", () { |
2605 | 2640 |
2606 var mock = new common_test.HttpServerMock(); | 2641 var mock = new HttpServerMock(); |
2607 api.InstancesResourceApi res = new api.SqladminApi(mock).instances; | 2642 api.InstancesResourceApi res = new api.SqladminApi(mock).instances; |
2608 var arg_request = buildInstanceSetRootPasswordRequest(); | 2643 var arg_request = buildInstanceSetRootPasswordRequest(); |
2609 var arg_project = "foo"; | 2644 var arg_project = "foo"; |
2610 var arg_instance = "foo"; | 2645 var arg_instance = "foo"; |
2611 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2646 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2612 var obj = new api.InstanceSetRootPasswordRequest.fromJson(json); | 2647 var obj = new api.InstanceSetRootPasswordRequest.fromJson(json); |
2613 checkInstanceSetRootPasswordRequest(obj); | 2648 checkInstanceSetRootPasswordRequest(obj); |
2614 | 2649 |
2615 var path = (req.url).path; | 2650 var path = (req.url).path; |
2616 var pathOffset = 0; | 2651 var pathOffset = 0; |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2652 var keyvalue = part.split("="); | 2687 var keyvalue = part.split("="); |
2653 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2688 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
2654 } | 2689 } |
2655 } | 2690 } |
2656 | 2691 |
2657 | 2692 |
2658 var h = { | 2693 var h = { |
2659 "content-type" : "application/json; charset=utf-8", | 2694 "content-type" : "application/json; charset=utf-8", |
2660 }; | 2695 }; |
2661 var resp = convert.JSON.encode(buildInstancesSetRootPasswordResponse()); | 2696 var resp = convert.JSON.encode(buildInstancesSetRootPasswordResponse()); |
2662 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2697 return new async.Future.value(stringResponse(200, h, resp)); |
2663 }), true); | 2698 }), true); |
2664 res.setRootPassword(arg_request, arg_project, arg_instance).then(unittest.
expectAsync(((api.InstancesSetRootPasswordResponse response) { | 2699 res.setRootPassword(arg_request, arg_project, arg_instance).then(unittest.
expectAsync(((api.InstancesSetRootPasswordResponse response) { |
2665 checkInstancesSetRootPasswordResponse(response); | 2700 checkInstancesSetRootPasswordResponse(response); |
2666 }))); | 2701 }))); |
2667 }); | 2702 }); |
2668 | 2703 |
2669 unittest.test("method--update", () { | 2704 unittest.test("method--update", () { |
2670 | 2705 |
2671 var mock = new common_test.HttpServerMock(); | 2706 var mock = new HttpServerMock(); |
2672 api.InstancesResourceApi res = new api.SqladminApi(mock).instances; | 2707 api.InstancesResourceApi res = new api.SqladminApi(mock).instances; |
2673 var arg_request = buildDatabaseInstance(); | 2708 var arg_request = buildDatabaseInstance(); |
2674 var arg_project = "foo"; | 2709 var arg_project = "foo"; |
2675 var arg_instance = "foo"; | 2710 var arg_instance = "foo"; |
2676 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2711 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2677 var obj = new api.DatabaseInstance.fromJson(json); | 2712 var obj = new api.DatabaseInstance.fromJson(json); |
2678 checkDatabaseInstance(obj); | 2713 checkDatabaseInstance(obj); |
2679 | 2714 |
2680 var path = (req.url).path; | 2715 var path = (req.url).path; |
2681 var pathOffset = 0; | 2716 var pathOffset = 0; |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2713 var keyvalue = part.split("="); | 2748 var keyvalue = part.split("="); |
2714 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2749 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
2715 } | 2750 } |
2716 } | 2751 } |
2717 | 2752 |
2718 | 2753 |
2719 var h = { | 2754 var h = { |
2720 "content-type" : "application/json; charset=utf-8", | 2755 "content-type" : "application/json; charset=utf-8", |
2721 }; | 2756 }; |
2722 var resp = convert.JSON.encode(buildInstancesUpdateResponse()); | 2757 var resp = convert.JSON.encode(buildInstancesUpdateResponse()); |
2723 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2758 return new async.Future.value(stringResponse(200, h, resp)); |
2724 }), true); | 2759 }), true); |
2725 res.update(arg_request, arg_project, arg_instance).then(unittest.expectAsy
nc(((api.InstancesUpdateResponse response) { | 2760 res.update(arg_request, arg_project, arg_instance).then(unittest.expectAsy
nc(((api.InstancesUpdateResponse response) { |
2726 checkInstancesUpdateResponse(response); | 2761 checkInstancesUpdateResponse(response); |
2727 }))); | 2762 }))); |
2728 }); | 2763 }); |
2729 | 2764 |
2730 }); | 2765 }); |
2731 | 2766 |
2732 | 2767 |
2733 unittest.group("resource-OperationsResourceApi", () { | 2768 unittest.group("resource-OperationsResourceApi", () { |
2734 unittest.test("method--get", () { | 2769 unittest.test("method--get", () { |
2735 | 2770 |
2736 var mock = new common_test.HttpServerMock(); | 2771 var mock = new HttpServerMock(); |
2737 api.OperationsResourceApi res = new api.SqladminApi(mock).operations; | 2772 api.OperationsResourceApi res = new api.SqladminApi(mock).operations; |
2738 var arg_project = "foo"; | 2773 var arg_project = "foo"; |
2739 var arg_instance = "foo"; | 2774 var arg_instance = "foo"; |
2740 var arg_operation = "foo"; | 2775 var arg_operation = "foo"; |
2741 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2776 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2742 var path = (req.url).path; | 2777 var path = (req.url).path; |
2743 var pathOffset = 0; | 2778 var pathOffset = 0; |
2744 var index; | 2779 var index; |
2745 var subPart; | 2780 var subPart; |
2746 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2781 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2782 var keyvalue = part.split("="); | 2817 var keyvalue = part.split("="); |
2783 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2818 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
2784 } | 2819 } |
2785 } | 2820 } |
2786 | 2821 |
2787 | 2822 |
2788 var h = { | 2823 var h = { |
2789 "content-type" : "application/json; charset=utf-8", | 2824 "content-type" : "application/json; charset=utf-8", |
2790 }; | 2825 }; |
2791 var resp = convert.JSON.encode(buildInstanceOperation()); | 2826 var resp = convert.JSON.encode(buildInstanceOperation()); |
2792 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2827 return new async.Future.value(stringResponse(200, h, resp)); |
2793 }), true); | 2828 }), true); |
2794 res.get(arg_project, arg_instance, arg_operation).then(unittest.expectAsyn
c(((api.InstanceOperation response) { | 2829 res.get(arg_project, arg_instance, arg_operation).then(unittest.expectAsyn
c(((api.InstanceOperation response) { |
2795 checkInstanceOperation(response); | 2830 checkInstanceOperation(response); |
2796 }))); | 2831 }))); |
2797 }); | 2832 }); |
2798 | 2833 |
2799 unittest.test("method--list", () { | 2834 unittest.test("method--list", () { |
2800 | 2835 |
2801 var mock = new common_test.HttpServerMock(); | 2836 var mock = new HttpServerMock(); |
2802 api.OperationsResourceApi res = new api.SqladminApi(mock).operations; | 2837 api.OperationsResourceApi res = new api.SqladminApi(mock).operations; |
2803 var arg_project = "foo"; | 2838 var arg_project = "foo"; |
2804 var arg_instance = "foo"; | 2839 var arg_instance = "foo"; |
2805 var arg_maxResults = 42; | 2840 var arg_maxResults = 42; |
2806 var arg_pageToken = "foo"; | 2841 var arg_pageToken = "foo"; |
2807 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2842 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2808 var path = (req.url).path; | 2843 var path = (req.url).path; |
2809 var pathOffset = 0; | 2844 var pathOffset = 0; |
2810 var index; | 2845 var index; |
2811 var subPart; | 2846 var subPart; |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2847 } | 2882 } |
2848 } | 2883 } |
2849 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | 2884 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); |
2850 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 2885 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
2851 | 2886 |
2852 | 2887 |
2853 var h = { | 2888 var h = { |
2854 "content-type" : "application/json; charset=utf-8", | 2889 "content-type" : "application/json; charset=utf-8", |
2855 }; | 2890 }; |
2856 var resp = convert.JSON.encode(buildOperationsListResponse()); | 2891 var resp = convert.JSON.encode(buildOperationsListResponse()); |
2857 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2892 return new async.Future.value(stringResponse(200, h, resp)); |
2858 }), true); | 2893 }), true); |
2859 res.list(arg_project, arg_instance, maxResults: arg_maxResults, pageToken:
arg_pageToken).then(unittest.expectAsync(((api.OperationsListResponse response)
{ | 2894 res.list(arg_project, arg_instance, maxResults: arg_maxResults, pageToken:
arg_pageToken).then(unittest.expectAsync(((api.OperationsListResponse response)
{ |
2860 checkOperationsListResponse(response); | 2895 checkOperationsListResponse(response); |
2861 }))); | 2896 }))); |
2862 }); | 2897 }); |
2863 | 2898 |
2864 }); | 2899 }); |
2865 | 2900 |
2866 | 2901 |
2867 unittest.group("resource-SslCertsResourceApi", () { | 2902 unittest.group("resource-SslCertsResourceApi", () { |
2868 unittest.test("method--delete", () { | 2903 unittest.test("method--delete", () { |
2869 | 2904 |
2870 var mock = new common_test.HttpServerMock(); | 2905 var mock = new HttpServerMock(); |
2871 api.SslCertsResourceApi res = new api.SqladminApi(mock).sslCerts; | 2906 api.SslCertsResourceApi res = new api.SqladminApi(mock).sslCerts; |
2872 var arg_project = "foo"; | 2907 var arg_project = "foo"; |
2873 var arg_instance = "foo"; | 2908 var arg_instance = "foo"; |
2874 var arg_sha1Fingerprint = "foo"; | 2909 var arg_sha1Fingerprint = "foo"; |
2875 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2910 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2876 var path = (req.url).path; | 2911 var path = (req.url).path; |
2877 var pathOffset = 0; | 2912 var pathOffset = 0; |
2878 var index; | 2913 var index; |
2879 var subPart; | 2914 var subPart; |
2880 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2915 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2916 var keyvalue = part.split("="); | 2951 var keyvalue = part.split("="); |
2917 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2952 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
2918 } | 2953 } |
2919 } | 2954 } |
2920 | 2955 |
2921 | 2956 |
2922 var h = { | 2957 var h = { |
2923 "content-type" : "application/json; charset=utf-8", | 2958 "content-type" : "application/json; charset=utf-8", |
2924 }; | 2959 }; |
2925 var resp = convert.JSON.encode(buildSslCertsDeleteResponse()); | 2960 var resp = convert.JSON.encode(buildSslCertsDeleteResponse()); |
2926 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2961 return new async.Future.value(stringResponse(200, h, resp)); |
2927 }), true); | 2962 }), true); |
2928 res.delete(arg_project, arg_instance, arg_sha1Fingerprint).then(unittest.e
xpectAsync(((api.SslCertsDeleteResponse response) { | 2963 res.delete(arg_project, arg_instance, arg_sha1Fingerprint).then(unittest.e
xpectAsync(((api.SslCertsDeleteResponse response) { |
2929 checkSslCertsDeleteResponse(response); | 2964 checkSslCertsDeleteResponse(response); |
2930 }))); | 2965 }))); |
2931 }); | 2966 }); |
2932 | 2967 |
2933 unittest.test("method--get", () { | 2968 unittest.test("method--get", () { |
2934 | 2969 |
2935 var mock = new common_test.HttpServerMock(); | 2970 var mock = new HttpServerMock(); |
2936 api.SslCertsResourceApi res = new api.SqladminApi(mock).sslCerts; | 2971 api.SslCertsResourceApi res = new api.SqladminApi(mock).sslCerts; |
2937 var arg_project = "foo"; | 2972 var arg_project = "foo"; |
2938 var arg_instance = "foo"; | 2973 var arg_instance = "foo"; |
2939 var arg_sha1Fingerprint = "foo"; | 2974 var arg_sha1Fingerprint = "foo"; |
2940 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2975 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2941 var path = (req.url).path; | 2976 var path = (req.url).path; |
2942 var pathOffset = 0; | 2977 var pathOffset = 0; |
2943 var index; | 2978 var index; |
2944 var subPart; | 2979 var subPart; |
2945 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2980 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2981 var keyvalue = part.split("="); | 3016 var keyvalue = part.split("="); |
2982 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 3017 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
2983 } | 3018 } |
2984 } | 3019 } |
2985 | 3020 |
2986 | 3021 |
2987 var h = { | 3022 var h = { |
2988 "content-type" : "application/json; charset=utf-8", | 3023 "content-type" : "application/json; charset=utf-8", |
2989 }; | 3024 }; |
2990 var resp = convert.JSON.encode(buildSslCert()); | 3025 var resp = convert.JSON.encode(buildSslCert()); |
2991 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 3026 return new async.Future.value(stringResponse(200, h, resp)); |
2992 }), true); | 3027 }), true); |
2993 res.get(arg_project, arg_instance, arg_sha1Fingerprint).then(unittest.expe
ctAsync(((api.SslCert response) { | 3028 res.get(arg_project, arg_instance, arg_sha1Fingerprint).then(unittest.expe
ctAsync(((api.SslCert response) { |
2994 checkSslCert(response); | 3029 checkSslCert(response); |
2995 }))); | 3030 }))); |
2996 }); | 3031 }); |
2997 | 3032 |
2998 unittest.test("method--insert", () { | 3033 unittest.test("method--insert", () { |
2999 | 3034 |
3000 var mock = new common_test.HttpServerMock(); | 3035 var mock = new HttpServerMock(); |
3001 api.SslCertsResourceApi res = new api.SqladminApi(mock).sslCerts; | 3036 api.SslCertsResourceApi res = new api.SqladminApi(mock).sslCerts; |
3002 var arg_request = buildSslCertsInsertRequest(); | 3037 var arg_request = buildSslCertsInsertRequest(); |
3003 var arg_project = "foo"; | 3038 var arg_project = "foo"; |
3004 var arg_instance = "foo"; | 3039 var arg_instance = "foo"; |
3005 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3040 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
3006 var obj = new api.SslCertsInsertRequest.fromJson(json); | 3041 var obj = new api.SslCertsInsertRequest.fromJson(json); |
3007 checkSslCertsInsertRequest(obj); | 3042 checkSslCertsInsertRequest(obj); |
3008 | 3043 |
3009 var path = (req.url).path; | 3044 var path = (req.url).path; |
3010 var pathOffset = 0; | 3045 var pathOffset = 0; |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3046 var keyvalue = part.split("="); | 3081 var keyvalue = part.split("="); |
3047 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 3082 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
3048 } | 3083 } |
3049 } | 3084 } |
3050 | 3085 |
3051 | 3086 |
3052 var h = { | 3087 var h = { |
3053 "content-type" : "application/json; charset=utf-8", | 3088 "content-type" : "application/json; charset=utf-8", |
3054 }; | 3089 }; |
3055 var resp = convert.JSON.encode(buildSslCertsInsertResponse()); | 3090 var resp = convert.JSON.encode(buildSslCertsInsertResponse()); |
3056 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 3091 return new async.Future.value(stringResponse(200, h, resp)); |
3057 }), true); | 3092 }), true); |
3058 res.insert(arg_request, arg_project, arg_instance).then(unittest.expectAsy
nc(((api.SslCertsInsertResponse response) { | 3093 res.insert(arg_request, arg_project, arg_instance).then(unittest.expectAsy
nc(((api.SslCertsInsertResponse response) { |
3059 checkSslCertsInsertResponse(response); | 3094 checkSslCertsInsertResponse(response); |
3060 }))); | 3095 }))); |
3061 }); | 3096 }); |
3062 | 3097 |
3063 unittest.test("method--list", () { | 3098 unittest.test("method--list", () { |
3064 | 3099 |
3065 var mock = new common_test.HttpServerMock(); | 3100 var mock = new HttpServerMock(); |
3066 api.SslCertsResourceApi res = new api.SqladminApi(mock).sslCerts; | 3101 api.SslCertsResourceApi res = new api.SqladminApi(mock).sslCerts; |
3067 var arg_project = "foo"; | 3102 var arg_project = "foo"; |
3068 var arg_instance = "foo"; | 3103 var arg_instance = "foo"; |
3069 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3104 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
3070 var path = (req.url).path; | 3105 var path = (req.url).path; |
3071 var pathOffset = 0; | 3106 var pathOffset = 0; |
3072 var index; | 3107 var index; |
3073 var subPart; | 3108 var subPart; |
3074 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3109 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
3075 pathOffset += 1; | 3110 pathOffset += 1; |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3107 var keyvalue = part.split("="); | 3142 var keyvalue = part.split("="); |
3108 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 3143 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
3109 } | 3144 } |
3110 } | 3145 } |
3111 | 3146 |
3112 | 3147 |
3113 var h = { | 3148 var h = { |
3114 "content-type" : "application/json; charset=utf-8", | 3149 "content-type" : "application/json; charset=utf-8", |
3115 }; | 3150 }; |
3116 var resp = convert.JSON.encode(buildSslCertsListResponse()); | 3151 var resp = convert.JSON.encode(buildSslCertsListResponse()); |
3117 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 3152 return new async.Future.value(stringResponse(200, h, resp)); |
3118 }), true); | 3153 }), true); |
3119 res.list(arg_project, arg_instance).then(unittest.expectAsync(((api.SslCer
tsListResponse response) { | 3154 res.list(arg_project, arg_instance).then(unittest.expectAsync(((api.SslCer
tsListResponse response) { |
3120 checkSslCertsListResponse(response); | 3155 checkSslCertsListResponse(response); |
3121 }))); | 3156 }))); |
3122 }); | 3157 }); |
3123 | 3158 |
3124 }); | 3159 }); |
3125 | 3160 |
3126 | 3161 |
3127 unittest.group("resource-TiersResourceApi", () { | 3162 unittest.group("resource-TiersResourceApi", () { |
3128 unittest.test("method--list", () { | 3163 unittest.test("method--list", () { |
3129 | 3164 |
3130 var mock = new common_test.HttpServerMock(); | 3165 var mock = new HttpServerMock(); |
3131 api.TiersResourceApi res = new api.SqladminApi(mock).tiers; | 3166 api.TiersResourceApi res = new api.SqladminApi(mock).tiers; |
3132 var arg_project = "foo"; | 3167 var arg_project = "foo"; |
3133 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3168 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
3134 var path = (req.url).path; | 3169 var path = (req.url).path; |
3135 var pathOffset = 0; | 3170 var pathOffset = 0; |
3136 var index; | 3171 var index; |
3137 var subPart; | 3172 var subPart; |
3138 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3173 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
3139 pathOffset += 1; | 3174 pathOffset += 1; |
3140 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta3/")); | 3175 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("sql/v1beta3/")); |
(...skipping 23 matching lines...) Expand all Loading... |
3164 var keyvalue = part.split("="); | 3199 var keyvalue = part.split("="); |
3165 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 3200 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
3166 } | 3201 } |
3167 } | 3202 } |
3168 | 3203 |
3169 | 3204 |
3170 var h = { | 3205 var h = { |
3171 "content-type" : "application/json; charset=utf-8", | 3206 "content-type" : "application/json; charset=utf-8", |
3172 }; | 3207 }; |
3173 var resp = convert.JSON.encode(buildTiersListResponse()); | 3208 var resp = convert.JSON.encode(buildTiersListResponse()); |
3174 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 3209 return new async.Future.value(stringResponse(200, h, resp)); |
3175 }), true); | 3210 }), true); |
3176 res.list(arg_project).then(unittest.expectAsync(((api.TiersListResponse re
sponse) { | 3211 res.list(arg_project).then(unittest.expectAsync(((api.TiersListResponse re
sponse) { |
3177 checkTiersListResponse(response); | 3212 checkTiersListResponse(response); |
3178 }))); | 3213 }))); |
3179 }); | 3214 }); |
3180 | 3215 |
3181 }); | 3216 }); |
3182 | 3217 |
3183 | 3218 |
3184 } | 3219 } |
3185 | 3220 |
OLD | NEW |