OLD | NEW |
1 library googleapis.appengine.v1.test; | 1 library googleapis.appengine.v1.test; |
2 | 2 |
3 import "dart:core" as core; | 3 import "dart:core" as core; |
4 import "dart:collection" as collection; | |
5 import "dart:async" as async; | 4 import "dart:async" as async; |
6 import "dart:convert" as convert; | 5 import "dart:convert" as convert; |
7 | 6 |
8 import 'package:http/http.dart' as http; | 7 import 'package:http/http.dart' as http; |
9 import 'package:http/testing.dart' as http_testing; | |
10 import 'package:test/test.dart' as unittest; | 8 import 'package:test/test.dart' as unittest; |
11 | 9 |
12 import 'package:googleapis/appengine/v1.dart' as api; | 10 import 'package:googleapis/appengine/v1.dart' as api; |
13 | 11 |
14 class HttpServerMock extends http.BaseClient { | 12 class HttpServerMock extends http.BaseClient { |
15 core.Function _callback; | 13 core.Function _callback; |
16 core.bool _expectJson; | 14 core.bool _expectJson; |
17 | 15 |
18 void register(core.Function callback, core.bool expectJson) { | 16 void register(core.Function callback, core.bool expectJson) { |
19 _callback = callback; | 17 _callback = callback; |
20 _expectJson = expectJson; | 18 _expectJson = expectJson; |
21 } | 19 } |
22 | 20 |
23 async.Future<http.StreamedResponse> send(http.BaseRequest request) { | 21 async.Future<http.StreamedResponse> send(http.BaseRequest request) { |
24 if (_expectJson) { | 22 if (_expectJson) { |
25 return request.finalize() | 23 return request |
| 24 .finalize() |
26 .transform(convert.UTF8.decoder) | 25 .transform(convert.UTF8.decoder) |
27 .join('') | 26 .join('') |
28 .then((core.String jsonString) { | 27 .then((core.String jsonString) { |
29 if (jsonString.isEmpty) { | 28 if (jsonString.isEmpty) { |
30 return _callback(request, null); | 29 return _callback(request, null); |
31 } else { | 30 } else { |
32 return _callback(request, convert.JSON.decode(jsonString)); | 31 return _callback(request, convert.JSON.decode(jsonString)); |
33 } | 32 } |
34 }); | 33 }); |
35 } else { | 34 } else { |
36 var stream = request.finalize(); | 35 var stream = request.finalize(); |
37 if (stream == null) { | 36 if (stream == null) { |
38 return _callback(request, []); | 37 return _callback(request, []); |
39 } else { | 38 } else { |
40 return stream.toBytes().then((data) { | 39 return stream.toBytes().then((data) { |
41 return _callback(request, data); | 40 return _callback(request, data); |
42 }); | 41 }); |
43 } | 42 } |
44 } | 43 } |
45 } | 44 } |
46 } | 45 } |
47 | 46 |
48 http.StreamedResponse stringResponse( | 47 http.StreamedResponse stringResponse(core.int status, |
49 core.int status, core.Map<core.String, core.String> headers, core.String bod
y) { | 48 core.Map<core.String, core.String> headers, core.String body) { |
50 var stream = new async.Stream.fromIterable([convert.UTF8.encode(body)]); | 49 var stream = new async.Stream.fromIterable([convert.UTF8.encode(body)]); |
51 return new http.StreamedResponse(stream, status, headers: headers); | 50 return new http.StreamedResponse(stream, status, headers: headers); |
52 } | 51 } |
53 | 52 |
54 core.int buildCounterApiConfigHandler = 0; | 53 core.int buildCounterApiConfigHandler = 0; |
55 buildApiConfigHandler() { | 54 buildApiConfigHandler() { |
56 var o = new api.ApiConfigHandler(); | 55 var o = new api.ApiConfigHandler(); |
57 buildCounterApiConfigHandler++; | 56 buildCounterApiConfigHandler++; |
58 if (buildCounterApiConfigHandler < 3) { | 57 if (buildCounterApiConfigHandler < 3) { |
59 o.authFailAction = "foo"; | 58 o.authFailAction = "foo"; |
(...skipping 30 matching lines...) Expand all Loading... |
90 } | 89 } |
91 | 90 |
92 checkApiEndpointHandler(api.ApiEndpointHandler o) { | 91 checkApiEndpointHandler(api.ApiEndpointHandler o) { |
93 buildCounterApiEndpointHandler++; | 92 buildCounterApiEndpointHandler++; |
94 if (buildCounterApiEndpointHandler < 3) { | 93 if (buildCounterApiEndpointHandler < 3) { |
95 unittest.expect(o.scriptPath, unittest.equals('foo')); | 94 unittest.expect(o.scriptPath, unittest.equals('foo')); |
96 } | 95 } |
97 buildCounterApiEndpointHandler--; | 96 buildCounterApiEndpointHandler--; |
98 } | 97 } |
99 | 98 |
100 buildUnnamed2681() { | 99 buildUnnamed2668() { |
101 var o = new core.List<api.UrlDispatchRule>(); | 100 var o = new core.List<api.UrlDispatchRule>(); |
102 o.add(buildUrlDispatchRule()); | 101 o.add(buildUrlDispatchRule()); |
103 o.add(buildUrlDispatchRule()); | 102 o.add(buildUrlDispatchRule()); |
104 return o; | 103 return o; |
105 } | 104 } |
106 | 105 |
107 checkUnnamed2681(core.List<api.UrlDispatchRule> o) { | 106 checkUnnamed2668(core.List<api.UrlDispatchRule> o) { |
108 unittest.expect(o, unittest.hasLength(2)); | 107 unittest.expect(o, unittest.hasLength(2)); |
109 checkUrlDispatchRule(o[0]); | 108 checkUrlDispatchRule(o[0]); |
110 checkUrlDispatchRule(o[1]); | 109 checkUrlDispatchRule(o[1]); |
111 } | 110 } |
112 | 111 |
113 core.int buildCounterApplication = 0; | 112 core.int buildCounterApplication = 0; |
114 buildApplication() { | 113 buildApplication() { |
115 var o = new api.Application(); | 114 var o = new api.Application(); |
116 buildCounterApplication++; | 115 buildCounterApplication++; |
117 if (buildCounterApplication < 3) { | 116 if (buildCounterApplication < 3) { |
118 o.authDomain = "foo"; | 117 o.authDomain = "foo"; |
119 o.codeBucket = "foo"; | 118 o.codeBucket = "foo"; |
120 o.defaultBucket = "foo"; | 119 o.defaultBucket = "foo"; |
121 o.defaultCookieExpiration = "foo"; | 120 o.defaultCookieExpiration = "foo"; |
122 o.defaultHostname = "foo"; | 121 o.defaultHostname = "foo"; |
123 o.dispatchRules = buildUnnamed2681(); | 122 o.dispatchRules = buildUnnamed2668(); |
| 123 o.featureSettings = buildFeatureSettings(); |
124 o.gcrDomain = "foo"; | 124 o.gcrDomain = "foo"; |
125 o.iap = buildIdentityAwareProxy(); | 125 o.iap = buildIdentityAwareProxy(); |
126 o.id = "foo"; | 126 o.id = "foo"; |
127 o.locationId = "foo"; | 127 o.locationId = "foo"; |
128 o.name = "foo"; | 128 o.name = "foo"; |
129 o.servingStatus = "foo"; | 129 o.servingStatus = "foo"; |
130 } | 130 } |
131 buildCounterApplication--; | 131 buildCounterApplication--; |
132 return o; | 132 return o; |
133 } | 133 } |
134 | 134 |
135 checkApplication(api.Application o) { | 135 checkApplication(api.Application o) { |
136 buildCounterApplication++; | 136 buildCounterApplication++; |
137 if (buildCounterApplication < 3) { | 137 if (buildCounterApplication < 3) { |
138 unittest.expect(o.authDomain, unittest.equals('foo')); | 138 unittest.expect(o.authDomain, unittest.equals('foo')); |
139 unittest.expect(o.codeBucket, unittest.equals('foo')); | 139 unittest.expect(o.codeBucket, unittest.equals('foo')); |
140 unittest.expect(o.defaultBucket, unittest.equals('foo')); | 140 unittest.expect(o.defaultBucket, unittest.equals('foo')); |
141 unittest.expect(o.defaultCookieExpiration, unittest.equals('foo')); | 141 unittest.expect(o.defaultCookieExpiration, unittest.equals('foo')); |
142 unittest.expect(o.defaultHostname, unittest.equals('foo')); | 142 unittest.expect(o.defaultHostname, unittest.equals('foo')); |
143 checkUnnamed2681(o.dispatchRules); | 143 checkUnnamed2668(o.dispatchRules); |
| 144 checkFeatureSettings(o.featureSettings); |
144 unittest.expect(o.gcrDomain, unittest.equals('foo')); | 145 unittest.expect(o.gcrDomain, unittest.equals('foo')); |
145 checkIdentityAwareProxy(o.iap); | 146 checkIdentityAwareProxy(o.iap); |
146 unittest.expect(o.id, unittest.equals('foo')); | 147 unittest.expect(o.id, unittest.equals('foo')); |
147 unittest.expect(o.locationId, unittest.equals('foo')); | 148 unittest.expect(o.locationId, unittest.equals('foo')); |
148 unittest.expect(o.name, unittest.equals('foo')); | 149 unittest.expect(o.name, unittest.equals('foo')); |
149 unittest.expect(o.servingStatus, unittest.equals('foo')); | 150 unittest.expect(o.servingStatus, unittest.equals('foo')); |
150 } | 151 } |
151 buildCounterApplication--; | 152 buildCounterApplication--; |
152 } | 153 } |
153 | 154 |
| 155 buildUnnamed2669() { |
| 156 var o = new core.List<core.String>(); |
| 157 o.add("foo"); |
| 158 o.add("foo"); |
| 159 return o; |
| 160 } |
| 161 |
| 162 checkUnnamed2669(core.List<core.String> o) { |
| 163 unittest.expect(o, unittest.hasLength(2)); |
| 164 unittest.expect(o[0], unittest.equals('foo')); |
| 165 unittest.expect(o[1], unittest.equals('foo')); |
| 166 } |
| 167 |
| 168 buildUnnamed2670() { |
| 169 var o = new core.List<core.String>(); |
| 170 o.add("foo"); |
| 171 o.add("foo"); |
| 172 return o; |
| 173 } |
| 174 |
| 175 checkUnnamed2670(core.List<core.String> o) { |
| 176 unittest.expect(o, unittest.hasLength(2)); |
| 177 unittest.expect(o[0], unittest.equals('foo')); |
| 178 unittest.expect(o[1], unittest.equals('foo')); |
| 179 } |
| 180 |
| 181 core.int buildCounterAuthorizedCertificate = 0; |
| 182 buildAuthorizedCertificate() { |
| 183 var o = new api.AuthorizedCertificate(); |
| 184 buildCounterAuthorizedCertificate++; |
| 185 if (buildCounterAuthorizedCertificate < 3) { |
| 186 o.certificateRawData = buildCertificateRawData(); |
| 187 o.displayName = "foo"; |
| 188 o.domainMappingsCount = 42; |
| 189 o.domainNames = buildUnnamed2669(); |
| 190 o.expireTime = "foo"; |
| 191 o.id = "foo"; |
| 192 o.name = "foo"; |
| 193 o.visibleDomainMappings = buildUnnamed2670(); |
| 194 } |
| 195 buildCounterAuthorizedCertificate--; |
| 196 return o; |
| 197 } |
| 198 |
| 199 checkAuthorizedCertificate(api.AuthorizedCertificate o) { |
| 200 buildCounterAuthorizedCertificate++; |
| 201 if (buildCounterAuthorizedCertificate < 3) { |
| 202 checkCertificateRawData(o.certificateRawData); |
| 203 unittest.expect(o.displayName, unittest.equals('foo')); |
| 204 unittest.expect(o.domainMappingsCount, unittest.equals(42)); |
| 205 checkUnnamed2669(o.domainNames); |
| 206 unittest.expect(o.expireTime, unittest.equals('foo')); |
| 207 unittest.expect(o.id, unittest.equals('foo')); |
| 208 unittest.expect(o.name, unittest.equals('foo')); |
| 209 checkUnnamed2670(o.visibleDomainMappings); |
| 210 } |
| 211 buildCounterAuthorizedCertificate--; |
| 212 } |
| 213 |
| 214 core.int buildCounterAuthorizedDomain = 0; |
| 215 buildAuthorizedDomain() { |
| 216 var o = new api.AuthorizedDomain(); |
| 217 buildCounterAuthorizedDomain++; |
| 218 if (buildCounterAuthorizedDomain < 3) { |
| 219 o.id = "foo"; |
| 220 o.name = "foo"; |
| 221 } |
| 222 buildCounterAuthorizedDomain--; |
| 223 return o; |
| 224 } |
| 225 |
| 226 checkAuthorizedDomain(api.AuthorizedDomain o) { |
| 227 buildCounterAuthorizedDomain++; |
| 228 if (buildCounterAuthorizedDomain < 3) { |
| 229 unittest.expect(o.id, unittest.equals('foo')); |
| 230 unittest.expect(o.name, unittest.equals('foo')); |
| 231 } |
| 232 buildCounterAuthorizedDomain--; |
| 233 } |
| 234 |
154 core.int buildCounterAutomaticScaling = 0; | 235 core.int buildCounterAutomaticScaling = 0; |
155 buildAutomaticScaling() { | 236 buildAutomaticScaling() { |
156 var o = new api.AutomaticScaling(); | 237 var o = new api.AutomaticScaling(); |
157 buildCounterAutomaticScaling++; | 238 buildCounterAutomaticScaling++; |
158 if (buildCounterAutomaticScaling < 3) { | 239 if (buildCounterAutomaticScaling < 3) { |
159 o.coolDownPeriod = "foo"; | 240 o.coolDownPeriod = "foo"; |
160 o.cpuUtilization = buildCpuUtilization(); | 241 o.cpuUtilization = buildCpuUtilization(); |
161 o.diskUtilization = buildDiskUtilization(); | 242 o.diskUtilization = buildDiskUtilization(); |
162 o.maxConcurrentRequests = 42; | 243 o.maxConcurrentRequests = 42; |
163 o.maxIdleInstances = 42; | 244 o.maxIdleInstances = 42; |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
206 | 287 |
207 checkBasicScaling(api.BasicScaling o) { | 288 checkBasicScaling(api.BasicScaling o) { |
208 buildCounterBasicScaling++; | 289 buildCounterBasicScaling++; |
209 if (buildCounterBasicScaling < 3) { | 290 if (buildCounterBasicScaling < 3) { |
210 unittest.expect(o.idleTimeout, unittest.equals('foo')); | 291 unittest.expect(o.idleTimeout, unittest.equals('foo')); |
211 unittest.expect(o.maxInstances, unittest.equals(42)); | 292 unittest.expect(o.maxInstances, unittest.equals(42)); |
212 } | 293 } |
213 buildCounterBasicScaling--; | 294 buildCounterBasicScaling--; |
214 } | 295 } |
215 | 296 |
| 297 core.int buildCounterCertificateRawData = 0; |
| 298 buildCertificateRawData() { |
| 299 var o = new api.CertificateRawData(); |
| 300 buildCounterCertificateRawData++; |
| 301 if (buildCounterCertificateRawData < 3) { |
| 302 o.privateKey = "foo"; |
| 303 o.publicCertificate = "foo"; |
| 304 } |
| 305 buildCounterCertificateRawData--; |
| 306 return o; |
| 307 } |
| 308 |
| 309 checkCertificateRawData(api.CertificateRawData o) { |
| 310 buildCounterCertificateRawData++; |
| 311 if (buildCounterCertificateRawData < 3) { |
| 312 unittest.expect(o.privateKey, unittest.equals('foo')); |
| 313 unittest.expect(o.publicCertificate, unittest.equals('foo')); |
| 314 } |
| 315 buildCounterCertificateRawData--; |
| 316 } |
| 317 |
216 core.int buildCounterContainerInfo = 0; | 318 core.int buildCounterContainerInfo = 0; |
217 buildContainerInfo() { | 319 buildContainerInfo() { |
218 var o = new api.ContainerInfo(); | 320 var o = new api.ContainerInfo(); |
219 buildCounterContainerInfo++; | 321 buildCounterContainerInfo++; |
220 if (buildCounterContainerInfo < 3) { | 322 if (buildCounterContainerInfo < 3) { |
221 o.image = "foo"; | 323 o.image = "foo"; |
222 } | 324 } |
223 buildCounterContainerInfo--; | 325 buildCounterContainerInfo--; |
224 return o; | 326 return o; |
225 } | 327 } |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
265 } | 367 } |
266 | 368 |
267 checkDebugInstanceRequest(api.DebugInstanceRequest o) { | 369 checkDebugInstanceRequest(api.DebugInstanceRequest o) { |
268 buildCounterDebugInstanceRequest++; | 370 buildCounterDebugInstanceRequest++; |
269 if (buildCounterDebugInstanceRequest < 3) { | 371 if (buildCounterDebugInstanceRequest < 3) { |
270 unittest.expect(o.sshKey, unittest.equals('foo')); | 372 unittest.expect(o.sshKey, unittest.equals('foo')); |
271 } | 373 } |
272 buildCounterDebugInstanceRequest--; | 374 buildCounterDebugInstanceRequest--; |
273 } | 375 } |
274 | 376 |
275 buildUnnamed2682() { | 377 buildUnnamed2671() { |
276 var o = new core.Map<core.String, api.FileInfo>(); | 378 var o = new core.Map<core.String, api.FileInfo>(); |
277 o["x"] = buildFileInfo(); | 379 o["x"] = buildFileInfo(); |
278 o["y"] = buildFileInfo(); | 380 o["y"] = buildFileInfo(); |
279 return o; | 381 return o; |
280 } | 382 } |
281 | 383 |
282 checkUnnamed2682(core.Map<core.String, api.FileInfo> o) { | 384 checkUnnamed2671(core.Map<core.String, api.FileInfo> o) { |
283 unittest.expect(o, unittest.hasLength(2)); | 385 unittest.expect(o, unittest.hasLength(2)); |
284 checkFileInfo(o["x"]); | 386 checkFileInfo(o["x"]); |
285 checkFileInfo(o["y"]); | 387 checkFileInfo(o["y"]); |
286 } | 388 } |
287 | 389 |
288 core.int buildCounterDeployment = 0; | 390 core.int buildCounterDeployment = 0; |
289 buildDeployment() { | 391 buildDeployment() { |
290 var o = new api.Deployment(); | 392 var o = new api.Deployment(); |
291 buildCounterDeployment++; | 393 buildCounterDeployment++; |
292 if (buildCounterDeployment < 3) { | 394 if (buildCounterDeployment < 3) { |
293 o.container = buildContainerInfo(); | 395 o.container = buildContainerInfo(); |
294 o.files = buildUnnamed2682(); | 396 o.files = buildUnnamed2671(); |
295 o.zip = buildZipInfo(); | 397 o.zip = buildZipInfo(); |
296 } | 398 } |
297 buildCounterDeployment--; | 399 buildCounterDeployment--; |
298 return o; | 400 return o; |
299 } | 401 } |
300 | 402 |
301 checkDeployment(api.Deployment o) { | 403 checkDeployment(api.Deployment o) { |
302 buildCounterDeployment++; | 404 buildCounterDeployment++; |
303 if (buildCounterDeployment < 3) { | 405 if (buildCounterDeployment < 3) { |
304 checkContainerInfo(o.container); | 406 checkContainerInfo(o.container); |
305 checkUnnamed2682(o.files); | 407 checkUnnamed2671(o.files); |
306 checkZipInfo(o.zip); | 408 checkZipInfo(o.zip); |
307 } | 409 } |
308 buildCounterDeployment--; | 410 buildCounterDeployment--; |
309 } | 411 } |
310 | 412 |
311 core.int buildCounterDiskUtilization = 0; | 413 core.int buildCounterDiskUtilization = 0; |
312 buildDiskUtilization() { | 414 buildDiskUtilization() { |
313 var o = new api.DiskUtilization(); | 415 var o = new api.DiskUtilization(); |
314 buildCounterDiskUtilization++; | 416 buildCounterDiskUtilization++; |
315 if (buildCounterDiskUtilization < 3) { | 417 if (buildCounterDiskUtilization < 3) { |
(...skipping 10 matching lines...) Expand all Loading... |
326 buildCounterDiskUtilization++; | 428 buildCounterDiskUtilization++; |
327 if (buildCounterDiskUtilization < 3) { | 429 if (buildCounterDiskUtilization < 3) { |
328 unittest.expect(o.targetReadBytesPerSecond, unittest.equals(42)); | 430 unittest.expect(o.targetReadBytesPerSecond, unittest.equals(42)); |
329 unittest.expect(o.targetReadOpsPerSecond, unittest.equals(42)); | 431 unittest.expect(o.targetReadOpsPerSecond, unittest.equals(42)); |
330 unittest.expect(o.targetWriteBytesPerSecond, unittest.equals(42)); | 432 unittest.expect(o.targetWriteBytesPerSecond, unittest.equals(42)); |
331 unittest.expect(o.targetWriteOpsPerSecond, unittest.equals(42)); | 433 unittest.expect(o.targetWriteOpsPerSecond, unittest.equals(42)); |
332 } | 434 } |
333 buildCounterDiskUtilization--; | 435 buildCounterDiskUtilization--; |
334 } | 436 } |
335 | 437 |
| 438 buildUnnamed2672() { |
| 439 var o = new core.List<api.ResourceRecord>(); |
| 440 o.add(buildResourceRecord()); |
| 441 o.add(buildResourceRecord()); |
| 442 return o; |
| 443 } |
| 444 |
| 445 checkUnnamed2672(core.List<api.ResourceRecord> o) { |
| 446 unittest.expect(o, unittest.hasLength(2)); |
| 447 checkResourceRecord(o[0]); |
| 448 checkResourceRecord(o[1]); |
| 449 } |
| 450 |
| 451 core.int buildCounterDomainMapping = 0; |
| 452 buildDomainMapping() { |
| 453 var o = new api.DomainMapping(); |
| 454 buildCounterDomainMapping++; |
| 455 if (buildCounterDomainMapping < 3) { |
| 456 o.id = "foo"; |
| 457 o.name = "foo"; |
| 458 o.resourceRecords = buildUnnamed2672(); |
| 459 o.sslSettings = buildSslSettings(); |
| 460 } |
| 461 buildCounterDomainMapping--; |
| 462 return o; |
| 463 } |
| 464 |
| 465 checkDomainMapping(api.DomainMapping o) { |
| 466 buildCounterDomainMapping++; |
| 467 if (buildCounterDomainMapping < 3) { |
| 468 unittest.expect(o.id, unittest.equals('foo')); |
| 469 unittest.expect(o.name, unittest.equals('foo')); |
| 470 checkUnnamed2672(o.resourceRecords); |
| 471 checkSslSettings(o.sslSettings); |
| 472 } |
| 473 buildCounterDomainMapping--; |
| 474 } |
| 475 |
| 476 core.int buildCounterEmpty = 0; |
| 477 buildEmpty() { |
| 478 var o = new api.Empty(); |
| 479 buildCounterEmpty++; |
| 480 if (buildCounterEmpty < 3) {} |
| 481 buildCounterEmpty--; |
| 482 return o; |
| 483 } |
| 484 |
| 485 checkEmpty(api.Empty o) { |
| 486 buildCounterEmpty++; |
| 487 if (buildCounterEmpty < 3) {} |
| 488 buildCounterEmpty--; |
| 489 } |
| 490 |
336 core.int buildCounterEndpointsApiService = 0; | 491 core.int buildCounterEndpointsApiService = 0; |
337 buildEndpointsApiService() { | 492 buildEndpointsApiService() { |
338 var o = new api.EndpointsApiService(); | 493 var o = new api.EndpointsApiService(); |
339 buildCounterEndpointsApiService++; | 494 buildCounterEndpointsApiService++; |
340 if (buildCounterEndpointsApiService < 3) { | 495 if (buildCounterEndpointsApiService < 3) { |
341 o.configId = "foo"; | 496 o.configId = "foo"; |
342 o.name = "foo"; | 497 o.name = "foo"; |
343 } | 498 } |
344 buildCounterEndpointsApiService--; | 499 buildCounterEndpointsApiService--; |
345 return o; | 500 return o; |
(...skipping 24 matching lines...) Expand all Loading... |
370 checkErrorHandler(api.ErrorHandler o) { | 525 checkErrorHandler(api.ErrorHandler o) { |
371 buildCounterErrorHandler++; | 526 buildCounterErrorHandler++; |
372 if (buildCounterErrorHandler < 3) { | 527 if (buildCounterErrorHandler < 3) { |
373 unittest.expect(o.errorCode, unittest.equals('foo')); | 528 unittest.expect(o.errorCode, unittest.equals('foo')); |
374 unittest.expect(o.mimeType, unittest.equals('foo')); | 529 unittest.expect(o.mimeType, unittest.equals('foo')); |
375 unittest.expect(o.staticFile, unittest.equals('foo')); | 530 unittest.expect(o.staticFile, unittest.equals('foo')); |
376 } | 531 } |
377 buildCounterErrorHandler--; | 532 buildCounterErrorHandler--; |
378 } | 533 } |
379 | 534 |
| 535 core.int buildCounterFeatureSettings = 0; |
| 536 buildFeatureSettings() { |
| 537 var o = new api.FeatureSettings(); |
| 538 buildCounterFeatureSettings++; |
| 539 if (buildCounterFeatureSettings < 3) { |
| 540 o.splitHealthChecks = true; |
| 541 } |
| 542 buildCounterFeatureSettings--; |
| 543 return o; |
| 544 } |
| 545 |
| 546 checkFeatureSettings(api.FeatureSettings o) { |
| 547 buildCounterFeatureSettings++; |
| 548 if (buildCounterFeatureSettings < 3) { |
| 549 unittest.expect(o.splitHealthChecks, unittest.isTrue); |
| 550 } |
| 551 buildCounterFeatureSettings--; |
| 552 } |
| 553 |
380 core.int buildCounterFileInfo = 0; | 554 core.int buildCounterFileInfo = 0; |
381 buildFileInfo() { | 555 buildFileInfo() { |
382 var o = new api.FileInfo(); | 556 var o = new api.FileInfo(); |
383 buildCounterFileInfo++; | 557 buildCounterFileInfo++; |
384 if (buildCounterFileInfo < 3) { | 558 if (buildCounterFileInfo < 3) { |
385 o.mimeType = "foo"; | 559 o.mimeType = "foo"; |
386 o.sha1Sum = "foo"; | 560 o.sha1Sum = "foo"; |
387 o.sourceUrl = "foo"; | 561 o.sourceUrl = "foo"; |
388 } | 562 } |
389 buildCounterFileInfo--; | 563 buildCounterFileInfo--; |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
519 | 693 |
520 checkLibrary(api.Library o) { | 694 checkLibrary(api.Library o) { |
521 buildCounterLibrary++; | 695 buildCounterLibrary++; |
522 if (buildCounterLibrary < 3) { | 696 if (buildCounterLibrary < 3) { |
523 unittest.expect(o.name, unittest.equals('foo')); | 697 unittest.expect(o.name, unittest.equals('foo')); |
524 unittest.expect(o.version, unittest.equals('foo')); | 698 unittest.expect(o.version, unittest.equals('foo')); |
525 } | 699 } |
526 buildCounterLibrary--; | 700 buildCounterLibrary--; |
527 } | 701 } |
528 | 702 |
529 buildUnnamed2683() { | 703 buildUnnamed2673() { |
| 704 var o = new core.List<api.AuthorizedCertificate>(); |
| 705 o.add(buildAuthorizedCertificate()); |
| 706 o.add(buildAuthorizedCertificate()); |
| 707 return o; |
| 708 } |
| 709 |
| 710 checkUnnamed2673(core.List<api.AuthorizedCertificate> o) { |
| 711 unittest.expect(o, unittest.hasLength(2)); |
| 712 checkAuthorizedCertificate(o[0]); |
| 713 checkAuthorizedCertificate(o[1]); |
| 714 } |
| 715 |
| 716 core.int buildCounterListAuthorizedCertificatesResponse = 0; |
| 717 buildListAuthorizedCertificatesResponse() { |
| 718 var o = new api.ListAuthorizedCertificatesResponse(); |
| 719 buildCounterListAuthorizedCertificatesResponse++; |
| 720 if (buildCounterListAuthorizedCertificatesResponse < 3) { |
| 721 o.certificates = buildUnnamed2673(); |
| 722 o.nextPageToken = "foo"; |
| 723 } |
| 724 buildCounterListAuthorizedCertificatesResponse--; |
| 725 return o; |
| 726 } |
| 727 |
| 728 checkListAuthorizedCertificatesResponse( |
| 729 api.ListAuthorizedCertificatesResponse o) { |
| 730 buildCounterListAuthorizedCertificatesResponse++; |
| 731 if (buildCounterListAuthorizedCertificatesResponse < 3) { |
| 732 checkUnnamed2673(o.certificates); |
| 733 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 734 } |
| 735 buildCounterListAuthorizedCertificatesResponse--; |
| 736 } |
| 737 |
| 738 buildUnnamed2674() { |
| 739 var o = new core.List<api.AuthorizedDomain>(); |
| 740 o.add(buildAuthorizedDomain()); |
| 741 o.add(buildAuthorizedDomain()); |
| 742 return o; |
| 743 } |
| 744 |
| 745 checkUnnamed2674(core.List<api.AuthorizedDomain> o) { |
| 746 unittest.expect(o, unittest.hasLength(2)); |
| 747 checkAuthorizedDomain(o[0]); |
| 748 checkAuthorizedDomain(o[1]); |
| 749 } |
| 750 |
| 751 core.int buildCounterListAuthorizedDomainsResponse = 0; |
| 752 buildListAuthorizedDomainsResponse() { |
| 753 var o = new api.ListAuthorizedDomainsResponse(); |
| 754 buildCounterListAuthorizedDomainsResponse++; |
| 755 if (buildCounterListAuthorizedDomainsResponse < 3) { |
| 756 o.domains = buildUnnamed2674(); |
| 757 o.nextPageToken = "foo"; |
| 758 } |
| 759 buildCounterListAuthorizedDomainsResponse--; |
| 760 return o; |
| 761 } |
| 762 |
| 763 checkListAuthorizedDomainsResponse(api.ListAuthorizedDomainsResponse o) { |
| 764 buildCounterListAuthorizedDomainsResponse++; |
| 765 if (buildCounterListAuthorizedDomainsResponse < 3) { |
| 766 checkUnnamed2674(o.domains); |
| 767 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 768 } |
| 769 buildCounterListAuthorizedDomainsResponse--; |
| 770 } |
| 771 |
| 772 buildUnnamed2675() { |
| 773 var o = new core.List<api.DomainMapping>(); |
| 774 o.add(buildDomainMapping()); |
| 775 o.add(buildDomainMapping()); |
| 776 return o; |
| 777 } |
| 778 |
| 779 checkUnnamed2675(core.List<api.DomainMapping> o) { |
| 780 unittest.expect(o, unittest.hasLength(2)); |
| 781 checkDomainMapping(o[0]); |
| 782 checkDomainMapping(o[1]); |
| 783 } |
| 784 |
| 785 core.int buildCounterListDomainMappingsResponse = 0; |
| 786 buildListDomainMappingsResponse() { |
| 787 var o = new api.ListDomainMappingsResponse(); |
| 788 buildCounterListDomainMappingsResponse++; |
| 789 if (buildCounterListDomainMappingsResponse < 3) { |
| 790 o.domainMappings = buildUnnamed2675(); |
| 791 o.nextPageToken = "foo"; |
| 792 } |
| 793 buildCounterListDomainMappingsResponse--; |
| 794 return o; |
| 795 } |
| 796 |
| 797 checkListDomainMappingsResponse(api.ListDomainMappingsResponse o) { |
| 798 buildCounterListDomainMappingsResponse++; |
| 799 if (buildCounterListDomainMappingsResponse < 3) { |
| 800 checkUnnamed2675(o.domainMappings); |
| 801 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 802 } |
| 803 buildCounterListDomainMappingsResponse--; |
| 804 } |
| 805 |
| 806 buildUnnamed2676() { |
530 var o = new core.List<api.Instance>(); | 807 var o = new core.List<api.Instance>(); |
531 o.add(buildInstance()); | 808 o.add(buildInstance()); |
532 o.add(buildInstance()); | 809 o.add(buildInstance()); |
533 return o; | 810 return o; |
534 } | 811 } |
535 | 812 |
536 checkUnnamed2683(core.List<api.Instance> o) { | 813 checkUnnamed2676(core.List<api.Instance> o) { |
537 unittest.expect(o, unittest.hasLength(2)); | 814 unittest.expect(o, unittest.hasLength(2)); |
538 checkInstance(o[0]); | 815 checkInstance(o[0]); |
539 checkInstance(o[1]); | 816 checkInstance(o[1]); |
540 } | 817 } |
541 | 818 |
542 core.int buildCounterListInstancesResponse = 0; | 819 core.int buildCounterListInstancesResponse = 0; |
543 buildListInstancesResponse() { | 820 buildListInstancesResponse() { |
544 var o = new api.ListInstancesResponse(); | 821 var o = new api.ListInstancesResponse(); |
545 buildCounterListInstancesResponse++; | 822 buildCounterListInstancesResponse++; |
546 if (buildCounterListInstancesResponse < 3) { | 823 if (buildCounterListInstancesResponse < 3) { |
547 o.instances = buildUnnamed2683(); | 824 o.instances = buildUnnamed2676(); |
548 o.nextPageToken = "foo"; | 825 o.nextPageToken = "foo"; |
549 } | 826 } |
550 buildCounterListInstancesResponse--; | 827 buildCounterListInstancesResponse--; |
551 return o; | 828 return o; |
552 } | 829 } |
553 | 830 |
554 checkListInstancesResponse(api.ListInstancesResponse o) { | 831 checkListInstancesResponse(api.ListInstancesResponse o) { |
555 buildCounterListInstancesResponse++; | 832 buildCounterListInstancesResponse++; |
556 if (buildCounterListInstancesResponse < 3) { | 833 if (buildCounterListInstancesResponse < 3) { |
557 checkUnnamed2683(o.instances); | 834 checkUnnamed2676(o.instances); |
558 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 835 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
559 } | 836 } |
560 buildCounterListInstancesResponse--; | 837 buildCounterListInstancesResponse--; |
561 } | 838 } |
562 | 839 |
563 buildUnnamed2684() { | 840 buildUnnamed2677() { |
564 var o = new core.List<api.Location>(); | 841 var o = new core.List<api.Location>(); |
565 o.add(buildLocation()); | 842 o.add(buildLocation()); |
566 o.add(buildLocation()); | 843 o.add(buildLocation()); |
567 return o; | 844 return o; |
568 } | 845 } |
569 | 846 |
570 checkUnnamed2684(core.List<api.Location> o) { | 847 checkUnnamed2677(core.List<api.Location> o) { |
571 unittest.expect(o, unittest.hasLength(2)); | 848 unittest.expect(o, unittest.hasLength(2)); |
572 checkLocation(o[0]); | 849 checkLocation(o[0]); |
573 checkLocation(o[1]); | 850 checkLocation(o[1]); |
574 } | 851 } |
575 | 852 |
576 core.int buildCounterListLocationsResponse = 0; | 853 core.int buildCounterListLocationsResponse = 0; |
577 buildListLocationsResponse() { | 854 buildListLocationsResponse() { |
578 var o = new api.ListLocationsResponse(); | 855 var o = new api.ListLocationsResponse(); |
579 buildCounterListLocationsResponse++; | 856 buildCounterListLocationsResponse++; |
580 if (buildCounterListLocationsResponse < 3) { | 857 if (buildCounterListLocationsResponse < 3) { |
581 o.locations = buildUnnamed2684(); | 858 o.locations = buildUnnamed2677(); |
582 o.nextPageToken = "foo"; | 859 o.nextPageToken = "foo"; |
583 } | 860 } |
584 buildCounterListLocationsResponse--; | 861 buildCounterListLocationsResponse--; |
585 return o; | 862 return o; |
586 } | 863 } |
587 | 864 |
588 checkListLocationsResponse(api.ListLocationsResponse o) { | 865 checkListLocationsResponse(api.ListLocationsResponse o) { |
589 buildCounterListLocationsResponse++; | 866 buildCounterListLocationsResponse++; |
590 if (buildCounterListLocationsResponse < 3) { | 867 if (buildCounterListLocationsResponse < 3) { |
591 checkUnnamed2684(o.locations); | 868 checkUnnamed2677(o.locations); |
592 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 869 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
593 } | 870 } |
594 buildCounterListLocationsResponse--; | 871 buildCounterListLocationsResponse--; |
595 } | 872 } |
596 | 873 |
597 buildUnnamed2685() { | 874 buildUnnamed2678() { |
598 var o = new core.List<api.Operation>(); | 875 var o = new core.List<api.Operation>(); |
599 o.add(buildOperation()); | 876 o.add(buildOperation()); |
600 o.add(buildOperation()); | 877 o.add(buildOperation()); |
601 return o; | 878 return o; |
602 } | 879 } |
603 | 880 |
604 checkUnnamed2685(core.List<api.Operation> o) { | 881 checkUnnamed2678(core.List<api.Operation> o) { |
605 unittest.expect(o, unittest.hasLength(2)); | 882 unittest.expect(o, unittest.hasLength(2)); |
606 checkOperation(o[0]); | 883 checkOperation(o[0]); |
607 checkOperation(o[1]); | 884 checkOperation(o[1]); |
608 } | 885 } |
609 | 886 |
610 core.int buildCounterListOperationsResponse = 0; | 887 core.int buildCounterListOperationsResponse = 0; |
611 buildListOperationsResponse() { | 888 buildListOperationsResponse() { |
612 var o = new api.ListOperationsResponse(); | 889 var o = new api.ListOperationsResponse(); |
613 buildCounterListOperationsResponse++; | 890 buildCounterListOperationsResponse++; |
614 if (buildCounterListOperationsResponse < 3) { | 891 if (buildCounterListOperationsResponse < 3) { |
615 o.nextPageToken = "foo"; | 892 o.nextPageToken = "foo"; |
616 o.operations = buildUnnamed2685(); | 893 o.operations = buildUnnamed2678(); |
617 } | 894 } |
618 buildCounterListOperationsResponse--; | 895 buildCounterListOperationsResponse--; |
619 return o; | 896 return o; |
620 } | 897 } |
621 | 898 |
622 checkListOperationsResponse(api.ListOperationsResponse o) { | 899 checkListOperationsResponse(api.ListOperationsResponse o) { |
623 buildCounterListOperationsResponse++; | 900 buildCounterListOperationsResponse++; |
624 if (buildCounterListOperationsResponse < 3) { | 901 if (buildCounterListOperationsResponse < 3) { |
625 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 902 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
626 checkUnnamed2685(o.operations); | 903 checkUnnamed2678(o.operations); |
627 } | 904 } |
628 buildCounterListOperationsResponse--; | 905 buildCounterListOperationsResponse--; |
629 } | 906 } |
630 | 907 |
631 buildUnnamed2686() { | 908 buildUnnamed2679() { |
632 var o = new core.List<api.Service>(); | 909 var o = new core.List<api.Service>(); |
633 o.add(buildService()); | 910 o.add(buildService()); |
634 o.add(buildService()); | 911 o.add(buildService()); |
635 return o; | 912 return o; |
636 } | 913 } |
637 | 914 |
638 checkUnnamed2686(core.List<api.Service> o) { | 915 checkUnnamed2679(core.List<api.Service> o) { |
639 unittest.expect(o, unittest.hasLength(2)); | 916 unittest.expect(o, unittest.hasLength(2)); |
640 checkService(o[0]); | 917 checkService(o[0]); |
641 checkService(o[1]); | 918 checkService(o[1]); |
642 } | 919 } |
643 | 920 |
644 core.int buildCounterListServicesResponse = 0; | 921 core.int buildCounterListServicesResponse = 0; |
645 buildListServicesResponse() { | 922 buildListServicesResponse() { |
646 var o = new api.ListServicesResponse(); | 923 var o = new api.ListServicesResponse(); |
647 buildCounterListServicesResponse++; | 924 buildCounterListServicesResponse++; |
648 if (buildCounterListServicesResponse < 3) { | 925 if (buildCounterListServicesResponse < 3) { |
649 o.nextPageToken = "foo"; | 926 o.nextPageToken = "foo"; |
650 o.services = buildUnnamed2686(); | 927 o.services = buildUnnamed2679(); |
651 } | 928 } |
652 buildCounterListServicesResponse--; | 929 buildCounterListServicesResponse--; |
653 return o; | 930 return o; |
654 } | 931 } |
655 | 932 |
656 checkListServicesResponse(api.ListServicesResponse o) { | 933 checkListServicesResponse(api.ListServicesResponse o) { |
657 buildCounterListServicesResponse++; | 934 buildCounterListServicesResponse++; |
658 if (buildCounterListServicesResponse < 3) { | 935 if (buildCounterListServicesResponse < 3) { |
659 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 936 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
660 checkUnnamed2686(o.services); | 937 checkUnnamed2679(o.services); |
661 } | 938 } |
662 buildCounterListServicesResponse--; | 939 buildCounterListServicesResponse--; |
663 } | 940 } |
664 | 941 |
665 buildUnnamed2687() { | 942 buildUnnamed2680() { |
666 var o = new core.List<api.Version>(); | 943 var o = new core.List<api.Version>(); |
667 o.add(buildVersion()); | 944 o.add(buildVersion()); |
668 o.add(buildVersion()); | 945 o.add(buildVersion()); |
669 return o; | 946 return o; |
670 } | 947 } |
671 | 948 |
672 checkUnnamed2687(core.List<api.Version> o) { | 949 checkUnnamed2680(core.List<api.Version> o) { |
673 unittest.expect(o, unittest.hasLength(2)); | 950 unittest.expect(o, unittest.hasLength(2)); |
674 checkVersion(o[0]); | 951 checkVersion(o[0]); |
675 checkVersion(o[1]); | 952 checkVersion(o[1]); |
676 } | 953 } |
677 | 954 |
678 core.int buildCounterListVersionsResponse = 0; | 955 core.int buildCounterListVersionsResponse = 0; |
679 buildListVersionsResponse() { | 956 buildListVersionsResponse() { |
680 var o = new api.ListVersionsResponse(); | 957 var o = new api.ListVersionsResponse(); |
681 buildCounterListVersionsResponse++; | 958 buildCounterListVersionsResponse++; |
682 if (buildCounterListVersionsResponse < 3) { | 959 if (buildCounterListVersionsResponse < 3) { |
683 o.nextPageToken = "foo"; | 960 o.nextPageToken = "foo"; |
684 o.versions = buildUnnamed2687(); | 961 o.versions = buildUnnamed2680(); |
685 } | 962 } |
686 buildCounterListVersionsResponse--; | 963 buildCounterListVersionsResponse--; |
687 return o; | 964 return o; |
688 } | 965 } |
689 | 966 |
690 checkListVersionsResponse(api.ListVersionsResponse o) { | 967 checkListVersionsResponse(api.ListVersionsResponse o) { |
691 buildCounterListVersionsResponse++; | 968 buildCounterListVersionsResponse++; |
692 if (buildCounterListVersionsResponse < 3) { | 969 if (buildCounterListVersionsResponse < 3) { |
693 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 970 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
694 checkUnnamed2687(o.versions); | 971 checkUnnamed2680(o.versions); |
695 } | 972 } |
696 buildCounterListVersionsResponse--; | 973 buildCounterListVersionsResponse--; |
697 } | 974 } |
698 | 975 |
699 core.int buildCounterLivenessCheck = 0; | 976 core.int buildCounterLivenessCheck = 0; |
700 buildLivenessCheck() { | 977 buildLivenessCheck() { |
701 var o = new api.LivenessCheck(); | 978 var o = new api.LivenessCheck(); |
702 buildCounterLivenessCheck++; | 979 buildCounterLivenessCheck++; |
703 if (buildCounterLivenessCheck < 3) { | 980 if (buildCounterLivenessCheck < 3) { |
704 o.checkInterval = "foo"; | 981 o.checkInterval = "foo"; |
(...skipping 15 matching lines...) Expand all Loading... |
720 unittest.expect(o.failureThreshold, unittest.equals(42)); | 997 unittest.expect(o.failureThreshold, unittest.equals(42)); |
721 unittest.expect(o.host, unittest.equals('foo')); | 998 unittest.expect(o.host, unittest.equals('foo')); |
722 unittest.expect(o.initialDelay, unittest.equals('foo')); | 999 unittest.expect(o.initialDelay, unittest.equals('foo')); |
723 unittest.expect(o.path, unittest.equals('foo')); | 1000 unittest.expect(o.path, unittest.equals('foo')); |
724 unittest.expect(o.successThreshold, unittest.equals(42)); | 1001 unittest.expect(o.successThreshold, unittest.equals(42)); |
725 unittest.expect(o.timeout, unittest.equals('foo')); | 1002 unittest.expect(o.timeout, unittest.equals('foo')); |
726 } | 1003 } |
727 buildCounterLivenessCheck--; | 1004 buildCounterLivenessCheck--; |
728 } | 1005 } |
729 | 1006 |
730 buildUnnamed2688() { | 1007 buildUnnamed2681() { |
731 var o = new core.Map<core.String, core.String>(); | 1008 var o = new core.Map<core.String, core.String>(); |
732 o["x"] = "foo"; | 1009 o["x"] = "foo"; |
733 o["y"] = "foo"; | 1010 o["y"] = "foo"; |
734 return o; | 1011 return o; |
735 } | 1012 } |
736 | 1013 |
737 checkUnnamed2688(core.Map<core.String, core.String> o) { | 1014 checkUnnamed2681(core.Map<core.String, core.String> o) { |
738 unittest.expect(o, unittest.hasLength(2)); | 1015 unittest.expect(o, unittest.hasLength(2)); |
739 unittest.expect(o["x"], unittest.equals('foo')); | 1016 unittest.expect(o["x"], unittest.equals('foo')); |
740 unittest.expect(o["y"], unittest.equals('foo')); | 1017 unittest.expect(o["y"], unittest.equals('foo')); |
741 } | 1018 } |
742 | 1019 |
743 buildUnnamed2689() { | 1020 buildUnnamed2682() { |
744 var o = new core.Map<core.String, core.Object>(); | 1021 var o = new core.Map<core.String, core.Object>(); |
745 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 1022 o["x"] = { |
746 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 1023 'list': [1, 2, 3], |
| 1024 'bool': true, |
| 1025 'string': 'foo' |
| 1026 }; |
| 1027 o["y"] = { |
| 1028 'list': [1, 2, 3], |
| 1029 'bool': true, |
| 1030 'string': 'foo' |
| 1031 }; |
747 return o; | 1032 return o; |
748 } | 1033 } |
749 | 1034 |
750 checkUnnamed2689(core.Map<core.String, core.Object> o) { | 1035 checkUnnamed2682(core.Map<core.String, core.Object> o) { |
751 unittest.expect(o, unittest.hasLength(2)); | 1036 unittest.expect(o, unittest.hasLength(2)); |
752 var casted1 = (o["x"]) as core.Map; unittest.expect(casted1, unittest.hasLengt
h(3)); unittest.expect(casted1["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted1["bool"], unittest.equals(true)); unittest.expect(casted1["string"],
unittest.equals('foo')); | 1037 var casted1 = (o["x"]) as core.Map; |
753 var casted2 = (o["y"]) as core.Map; unittest.expect(casted2, unittest.hasLengt
h(3)); unittest.expect(casted2["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted2["bool"], unittest.equals(true)); unittest.expect(casted2["string"],
unittest.equals('foo')); | 1038 unittest.expect(casted1, unittest.hasLength(3)); |
| 1039 unittest.expect(casted1["list"], unittest.equals([1, 2, 3])); |
| 1040 unittest.expect(casted1["bool"], unittest.equals(true)); |
| 1041 unittest.expect(casted1["string"], unittest.equals('foo')); |
| 1042 var casted2 = (o["y"]) as core.Map; |
| 1043 unittest.expect(casted2, unittest.hasLength(3)); |
| 1044 unittest.expect(casted2["list"], unittest.equals([1, 2, 3])); |
| 1045 unittest.expect(casted2["bool"], unittest.equals(true)); |
| 1046 unittest.expect(casted2["string"], unittest.equals('foo')); |
754 } | 1047 } |
755 | 1048 |
756 core.int buildCounterLocation = 0; | 1049 core.int buildCounterLocation = 0; |
757 buildLocation() { | 1050 buildLocation() { |
758 var o = new api.Location(); | 1051 var o = new api.Location(); |
759 buildCounterLocation++; | 1052 buildCounterLocation++; |
760 if (buildCounterLocation < 3) { | 1053 if (buildCounterLocation < 3) { |
761 o.labels = buildUnnamed2688(); | 1054 o.labels = buildUnnamed2681(); |
762 o.locationId = "foo"; | 1055 o.locationId = "foo"; |
763 o.metadata = buildUnnamed2689(); | 1056 o.metadata = buildUnnamed2682(); |
764 o.name = "foo"; | 1057 o.name = "foo"; |
765 } | 1058 } |
766 buildCounterLocation--; | 1059 buildCounterLocation--; |
767 return o; | 1060 return o; |
768 } | 1061 } |
769 | 1062 |
770 checkLocation(api.Location o) { | 1063 checkLocation(api.Location o) { |
771 buildCounterLocation++; | 1064 buildCounterLocation++; |
772 if (buildCounterLocation < 3) { | 1065 if (buildCounterLocation < 3) { |
773 checkUnnamed2688(o.labels); | 1066 checkUnnamed2681(o.labels); |
774 unittest.expect(o.locationId, unittest.equals('foo')); | 1067 unittest.expect(o.locationId, unittest.equals('foo')); |
775 checkUnnamed2689(o.metadata); | 1068 checkUnnamed2682(o.metadata); |
776 unittest.expect(o.name, unittest.equals('foo')); | 1069 unittest.expect(o.name, unittest.equals('foo')); |
777 } | 1070 } |
778 buildCounterLocation--; | 1071 buildCounterLocation--; |
779 } | 1072 } |
780 | 1073 |
781 core.int buildCounterLocationMetadata = 0; | 1074 core.int buildCounterLocationMetadata = 0; |
782 buildLocationMetadata() { | 1075 buildLocationMetadata() { |
783 var o = new api.LocationMetadata(); | 1076 var o = new api.LocationMetadata(); |
784 buildCounterLocationMetadata++; | 1077 buildCounterLocationMetadata++; |
785 if (buildCounterLocationMetadata < 3) { | 1078 if (buildCounterLocationMetadata < 3) { |
(...skipping 25 matching lines...) Expand all Loading... |
811 } | 1104 } |
812 | 1105 |
813 checkManualScaling(api.ManualScaling o) { | 1106 checkManualScaling(api.ManualScaling o) { |
814 buildCounterManualScaling++; | 1107 buildCounterManualScaling++; |
815 if (buildCounterManualScaling < 3) { | 1108 if (buildCounterManualScaling < 3) { |
816 unittest.expect(o.instances, unittest.equals(42)); | 1109 unittest.expect(o.instances, unittest.equals(42)); |
817 } | 1110 } |
818 buildCounterManualScaling--; | 1111 buildCounterManualScaling--; |
819 } | 1112 } |
820 | 1113 |
821 buildUnnamed2690() { | 1114 buildUnnamed2683() { |
822 var o = new core.List<core.String>(); | 1115 var o = new core.List<core.String>(); |
823 o.add("foo"); | 1116 o.add("foo"); |
824 o.add("foo"); | 1117 o.add("foo"); |
825 return o; | 1118 return o; |
826 } | 1119 } |
827 | 1120 |
828 checkUnnamed2690(core.List<core.String> o) { | 1121 checkUnnamed2683(core.List<core.String> o) { |
829 unittest.expect(o, unittest.hasLength(2)); | 1122 unittest.expect(o, unittest.hasLength(2)); |
830 unittest.expect(o[0], unittest.equals('foo')); | 1123 unittest.expect(o[0], unittest.equals('foo')); |
831 unittest.expect(o[1], unittest.equals('foo')); | 1124 unittest.expect(o[1], unittest.equals('foo')); |
832 } | 1125 } |
833 | 1126 |
834 core.int buildCounterNetwork = 0; | 1127 core.int buildCounterNetwork = 0; |
835 buildNetwork() { | 1128 buildNetwork() { |
836 var o = new api.Network(); | 1129 var o = new api.Network(); |
837 buildCounterNetwork++; | 1130 buildCounterNetwork++; |
838 if (buildCounterNetwork < 3) { | 1131 if (buildCounterNetwork < 3) { |
839 o.forwardedPorts = buildUnnamed2690(); | 1132 o.forwardedPorts = buildUnnamed2683(); |
840 o.instanceTag = "foo"; | 1133 o.instanceTag = "foo"; |
841 o.name = "foo"; | 1134 o.name = "foo"; |
842 o.subnetworkName = "foo"; | 1135 o.subnetworkName = "foo"; |
843 } | 1136 } |
844 buildCounterNetwork--; | 1137 buildCounterNetwork--; |
845 return o; | 1138 return o; |
846 } | 1139 } |
847 | 1140 |
848 checkNetwork(api.Network o) { | 1141 checkNetwork(api.Network o) { |
849 buildCounterNetwork++; | 1142 buildCounterNetwork++; |
850 if (buildCounterNetwork < 3) { | 1143 if (buildCounterNetwork < 3) { |
851 checkUnnamed2690(o.forwardedPorts); | 1144 checkUnnamed2683(o.forwardedPorts); |
852 unittest.expect(o.instanceTag, unittest.equals('foo')); | 1145 unittest.expect(o.instanceTag, unittest.equals('foo')); |
853 unittest.expect(o.name, unittest.equals('foo')); | 1146 unittest.expect(o.name, unittest.equals('foo')); |
854 unittest.expect(o.subnetworkName, unittest.equals('foo')); | 1147 unittest.expect(o.subnetworkName, unittest.equals('foo')); |
855 } | 1148 } |
856 buildCounterNetwork--; | 1149 buildCounterNetwork--; |
857 } | 1150 } |
858 | 1151 |
859 core.int buildCounterNetworkUtilization = 0; | 1152 core.int buildCounterNetworkUtilization = 0; |
860 buildNetworkUtilization() { | 1153 buildNetworkUtilization() { |
861 var o = new api.NetworkUtilization(); | 1154 var o = new api.NetworkUtilization(); |
(...skipping 12 matching lines...) Expand all Loading... |
874 buildCounterNetworkUtilization++; | 1167 buildCounterNetworkUtilization++; |
875 if (buildCounterNetworkUtilization < 3) { | 1168 if (buildCounterNetworkUtilization < 3) { |
876 unittest.expect(o.targetReceivedBytesPerSecond, unittest.equals(42)); | 1169 unittest.expect(o.targetReceivedBytesPerSecond, unittest.equals(42)); |
877 unittest.expect(o.targetReceivedPacketsPerSecond, unittest.equals(42)); | 1170 unittest.expect(o.targetReceivedPacketsPerSecond, unittest.equals(42)); |
878 unittest.expect(o.targetSentBytesPerSecond, unittest.equals(42)); | 1171 unittest.expect(o.targetSentBytesPerSecond, unittest.equals(42)); |
879 unittest.expect(o.targetSentPacketsPerSecond, unittest.equals(42)); | 1172 unittest.expect(o.targetSentPacketsPerSecond, unittest.equals(42)); |
880 } | 1173 } |
881 buildCounterNetworkUtilization--; | 1174 buildCounterNetworkUtilization--; |
882 } | 1175 } |
883 | 1176 |
884 buildUnnamed2691() { | 1177 buildUnnamed2684() { |
885 var o = new core.Map<core.String, core.Object>(); | 1178 var o = new core.Map<core.String, core.Object>(); |
886 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 1179 o["x"] = { |
887 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 1180 'list': [1, 2, 3], |
| 1181 'bool': true, |
| 1182 'string': 'foo' |
| 1183 }; |
| 1184 o["y"] = { |
| 1185 'list': [1, 2, 3], |
| 1186 'bool': true, |
| 1187 'string': 'foo' |
| 1188 }; |
888 return o; | 1189 return o; |
889 } | 1190 } |
890 | 1191 |
891 checkUnnamed2691(core.Map<core.String, core.Object> o) { | 1192 checkUnnamed2684(core.Map<core.String, core.Object> o) { |
892 unittest.expect(o, unittest.hasLength(2)); | 1193 unittest.expect(o, unittest.hasLength(2)); |
893 var casted3 = (o["x"]) as core.Map; unittest.expect(casted3, unittest.hasLengt
h(3)); unittest.expect(casted3["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted3["bool"], unittest.equals(true)); unittest.expect(casted3["string"],
unittest.equals('foo')); | 1194 var casted3 = (o["x"]) as core.Map; |
894 var casted4 = (o["y"]) as core.Map; unittest.expect(casted4, unittest.hasLengt
h(3)); unittest.expect(casted4["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted4["bool"], unittest.equals(true)); unittest.expect(casted4["string"],
unittest.equals('foo')); | 1195 unittest.expect(casted3, unittest.hasLength(3)); |
| 1196 unittest.expect(casted3["list"], unittest.equals([1, 2, 3])); |
| 1197 unittest.expect(casted3["bool"], unittest.equals(true)); |
| 1198 unittest.expect(casted3["string"], unittest.equals('foo')); |
| 1199 var casted4 = (o["y"]) as core.Map; |
| 1200 unittest.expect(casted4, unittest.hasLength(3)); |
| 1201 unittest.expect(casted4["list"], unittest.equals([1, 2, 3])); |
| 1202 unittest.expect(casted4["bool"], unittest.equals(true)); |
| 1203 unittest.expect(casted4["string"], unittest.equals('foo')); |
895 } | 1204 } |
896 | 1205 |
897 buildUnnamed2692() { | 1206 buildUnnamed2685() { |
898 var o = new core.Map<core.String, core.Object>(); | 1207 var o = new core.Map<core.String, core.Object>(); |
899 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 1208 o["x"] = { |
900 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 1209 'list': [1, 2, 3], |
| 1210 'bool': true, |
| 1211 'string': 'foo' |
| 1212 }; |
| 1213 o["y"] = { |
| 1214 'list': [1, 2, 3], |
| 1215 'bool': true, |
| 1216 'string': 'foo' |
| 1217 }; |
901 return o; | 1218 return o; |
902 } | 1219 } |
903 | 1220 |
904 checkUnnamed2692(core.Map<core.String, core.Object> o) { | 1221 checkUnnamed2685(core.Map<core.String, core.Object> o) { |
905 unittest.expect(o, unittest.hasLength(2)); | 1222 unittest.expect(o, unittest.hasLength(2)); |
906 var casted5 = (o["x"]) as core.Map; unittest.expect(casted5, unittest.hasLengt
h(3)); unittest.expect(casted5["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted5["bool"], unittest.equals(true)); unittest.expect(casted5["string"],
unittest.equals('foo')); | 1223 var casted5 = (o["x"]) as core.Map; |
907 var casted6 = (o["y"]) as core.Map; unittest.expect(casted6, unittest.hasLengt
h(3)); unittest.expect(casted6["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted6["bool"], unittest.equals(true)); unittest.expect(casted6["string"],
unittest.equals('foo')); | 1224 unittest.expect(casted5, unittest.hasLength(3)); |
| 1225 unittest.expect(casted5["list"], unittest.equals([1, 2, 3])); |
| 1226 unittest.expect(casted5["bool"], unittest.equals(true)); |
| 1227 unittest.expect(casted5["string"], unittest.equals('foo')); |
| 1228 var casted6 = (o["y"]) as core.Map; |
| 1229 unittest.expect(casted6, unittest.hasLength(3)); |
| 1230 unittest.expect(casted6["list"], unittest.equals([1, 2, 3])); |
| 1231 unittest.expect(casted6["bool"], unittest.equals(true)); |
| 1232 unittest.expect(casted6["string"], unittest.equals('foo')); |
908 } | 1233 } |
909 | 1234 |
910 core.int buildCounterOperation = 0; | 1235 core.int buildCounterOperation = 0; |
911 buildOperation() { | 1236 buildOperation() { |
912 var o = new api.Operation(); | 1237 var o = new api.Operation(); |
913 buildCounterOperation++; | 1238 buildCounterOperation++; |
914 if (buildCounterOperation < 3) { | 1239 if (buildCounterOperation < 3) { |
915 o.done = true; | 1240 o.done = true; |
916 o.error = buildStatus(); | 1241 o.error = buildStatus(); |
917 o.metadata = buildUnnamed2691(); | 1242 o.metadata = buildUnnamed2684(); |
918 o.name = "foo"; | 1243 o.name = "foo"; |
919 o.response = buildUnnamed2692(); | 1244 o.response = buildUnnamed2685(); |
920 } | 1245 } |
921 buildCounterOperation--; | 1246 buildCounterOperation--; |
922 return o; | 1247 return o; |
923 } | 1248 } |
924 | 1249 |
925 checkOperation(api.Operation o) { | 1250 checkOperation(api.Operation o) { |
926 buildCounterOperation++; | 1251 buildCounterOperation++; |
927 if (buildCounterOperation < 3) { | 1252 if (buildCounterOperation < 3) { |
928 unittest.expect(o.done, unittest.isTrue); | 1253 unittest.expect(o.done, unittest.isTrue); |
929 checkStatus(o.error); | 1254 checkStatus(o.error); |
930 checkUnnamed2691(o.metadata); | 1255 checkUnnamed2684(o.metadata); |
931 unittest.expect(o.name, unittest.equals('foo')); | 1256 unittest.expect(o.name, unittest.equals('foo')); |
932 checkUnnamed2692(o.response); | 1257 checkUnnamed2685(o.response); |
933 } | 1258 } |
934 buildCounterOperation--; | 1259 buildCounterOperation--; |
935 } | 1260 } |
936 | 1261 |
937 core.int buildCounterOperationMetadata = 0; | 1262 core.int buildCounterOperationMetadata = 0; |
938 buildOperationMetadata() { | 1263 buildOperationMetadata() { |
939 var o = new api.OperationMetadata(); | 1264 var o = new api.OperationMetadata(); |
940 buildCounterOperationMetadata++; | 1265 buildCounterOperationMetadata++; |
941 if (buildCounterOperationMetadata < 3) { | 1266 if (buildCounterOperationMetadata < 3) { |
942 o.endTime = "foo"; | 1267 o.endTime = "foo"; |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
983 if (buildCounterOperationMetadataExperimental < 3) { | 1308 if (buildCounterOperationMetadataExperimental < 3) { |
984 unittest.expect(o.endTime, unittest.equals('foo')); | 1309 unittest.expect(o.endTime, unittest.equals('foo')); |
985 unittest.expect(o.insertTime, unittest.equals('foo')); | 1310 unittest.expect(o.insertTime, unittest.equals('foo')); |
986 unittest.expect(o.method, unittest.equals('foo')); | 1311 unittest.expect(o.method, unittest.equals('foo')); |
987 unittest.expect(o.target, unittest.equals('foo')); | 1312 unittest.expect(o.target, unittest.equals('foo')); |
988 unittest.expect(o.user, unittest.equals('foo')); | 1313 unittest.expect(o.user, unittest.equals('foo')); |
989 } | 1314 } |
990 buildCounterOperationMetadataExperimental--; | 1315 buildCounterOperationMetadataExperimental--; |
991 } | 1316 } |
992 | 1317 |
993 buildUnnamed2693() { | 1318 buildUnnamed2686() { |
994 var o = new core.List<core.String>(); | 1319 var o = new core.List<core.String>(); |
995 o.add("foo"); | 1320 o.add("foo"); |
996 o.add("foo"); | 1321 o.add("foo"); |
997 return o; | 1322 return o; |
998 } | 1323 } |
999 | 1324 |
1000 checkUnnamed2693(core.List<core.String> o) { | 1325 checkUnnamed2686(core.List<core.String> o) { |
1001 unittest.expect(o, unittest.hasLength(2)); | 1326 unittest.expect(o, unittest.hasLength(2)); |
1002 unittest.expect(o[0], unittest.equals('foo')); | 1327 unittest.expect(o[0], unittest.equals('foo')); |
1003 unittest.expect(o[1], unittest.equals('foo')); | 1328 unittest.expect(o[1], unittest.equals('foo')); |
1004 } | 1329 } |
1005 | 1330 |
1006 core.int buildCounterOperationMetadataV1 = 0; | 1331 core.int buildCounterOperationMetadataV1 = 0; |
1007 buildOperationMetadataV1() { | 1332 buildOperationMetadataV1() { |
1008 var o = new api.OperationMetadataV1(); | 1333 var o = new api.OperationMetadataV1(); |
1009 buildCounterOperationMetadataV1++; | 1334 buildCounterOperationMetadataV1++; |
1010 if (buildCounterOperationMetadataV1 < 3) { | 1335 if (buildCounterOperationMetadataV1 < 3) { |
1011 o.endTime = "foo"; | 1336 o.endTime = "foo"; |
1012 o.ephemeralMessage = "foo"; | 1337 o.ephemeralMessage = "foo"; |
1013 o.insertTime = "foo"; | 1338 o.insertTime = "foo"; |
1014 o.method = "foo"; | 1339 o.method = "foo"; |
1015 o.target = "foo"; | 1340 o.target = "foo"; |
1016 o.user = "foo"; | 1341 o.user = "foo"; |
1017 o.warning = buildUnnamed2693(); | 1342 o.warning = buildUnnamed2686(); |
1018 } | 1343 } |
1019 buildCounterOperationMetadataV1--; | 1344 buildCounterOperationMetadataV1--; |
1020 return o; | 1345 return o; |
1021 } | 1346 } |
1022 | 1347 |
1023 checkOperationMetadataV1(api.OperationMetadataV1 o) { | 1348 checkOperationMetadataV1(api.OperationMetadataV1 o) { |
1024 buildCounterOperationMetadataV1++; | 1349 buildCounterOperationMetadataV1++; |
1025 if (buildCounterOperationMetadataV1 < 3) { | 1350 if (buildCounterOperationMetadataV1 < 3) { |
1026 unittest.expect(o.endTime, unittest.equals('foo')); | 1351 unittest.expect(o.endTime, unittest.equals('foo')); |
1027 unittest.expect(o.ephemeralMessage, unittest.equals('foo')); | 1352 unittest.expect(o.ephemeralMessage, unittest.equals('foo')); |
1028 unittest.expect(o.insertTime, unittest.equals('foo')); | 1353 unittest.expect(o.insertTime, unittest.equals('foo')); |
1029 unittest.expect(o.method, unittest.equals('foo')); | 1354 unittest.expect(o.method, unittest.equals('foo')); |
1030 unittest.expect(o.target, unittest.equals('foo')); | 1355 unittest.expect(o.target, unittest.equals('foo')); |
1031 unittest.expect(o.user, unittest.equals('foo')); | 1356 unittest.expect(o.user, unittest.equals('foo')); |
1032 checkUnnamed2693(o.warning); | 1357 checkUnnamed2686(o.warning); |
1033 } | 1358 } |
1034 buildCounterOperationMetadataV1--; | 1359 buildCounterOperationMetadataV1--; |
1035 } | 1360 } |
1036 | 1361 |
1037 buildUnnamed2694() { | 1362 buildUnnamed2687() { |
1038 var o = new core.List<core.String>(); | 1363 var o = new core.List<core.String>(); |
1039 o.add("foo"); | 1364 o.add("foo"); |
1040 o.add("foo"); | 1365 o.add("foo"); |
1041 return o; | 1366 return o; |
1042 } | 1367 } |
1043 | 1368 |
1044 checkUnnamed2694(core.List<core.String> o) { | 1369 checkUnnamed2687(core.List<core.String> o) { |
1045 unittest.expect(o, unittest.hasLength(2)); | 1370 unittest.expect(o, unittest.hasLength(2)); |
1046 unittest.expect(o[0], unittest.equals('foo')); | 1371 unittest.expect(o[0], unittest.equals('foo')); |
1047 unittest.expect(o[1], unittest.equals('foo')); | 1372 unittest.expect(o[1], unittest.equals('foo')); |
1048 } | 1373 } |
1049 | 1374 |
1050 core.int buildCounterOperationMetadataV1Alpha = 0; | 1375 core.int buildCounterOperationMetadataV1Alpha = 0; |
1051 buildOperationMetadataV1Alpha() { | 1376 buildOperationMetadataV1Alpha() { |
1052 var o = new api.OperationMetadataV1Alpha(); | 1377 var o = new api.OperationMetadataV1Alpha(); |
1053 buildCounterOperationMetadataV1Alpha++; | 1378 buildCounterOperationMetadataV1Alpha++; |
1054 if (buildCounterOperationMetadataV1Alpha < 3) { | 1379 if (buildCounterOperationMetadataV1Alpha < 3) { |
1055 o.endTime = "foo"; | 1380 o.endTime = "foo"; |
1056 o.ephemeralMessage = "foo"; | 1381 o.ephemeralMessage = "foo"; |
1057 o.insertTime = "foo"; | 1382 o.insertTime = "foo"; |
1058 o.method = "foo"; | 1383 o.method = "foo"; |
1059 o.target = "foo"; | 1384 o.target = "foo"; |
1060 o.user = "foo"; | 1385 o.user = "foo"; |
1061 o.warning = buildUnnamed2694(); | 1386 o.warning = buildUnnamed2687(); |
1062 } | 1387 } |
1063 buildCounterOperationMetadataV1Alpha--; | 1388 buildCounterOperationMetadataV1Alpha--; |
1064 return o; | 1389 return o; |
1065 } | 1390 } |
1066 | 1391 |
1067 checkOperationMetadataV1Alpha(api.OperationMetadataV1Alpha o) { | 1392 checkOperationMetadataV1Alpha(api.OperationMetadataV1Alpha o) { |
1068 buildCounterOperationMetadataV1Alpha++; | 1393 buildCounterOperationMetadataV1Alpha++; |
1069 if (buildCounterOperationMetadataV1Alpha < 3) { | 1394 if (buildCounterOperationMetadataV1Alpha < 3) { |
1070 unittest.expect(o.endTime, unittest.equals('foo')); | 1395 unittest.expect(o.endTime, unittest.equals('foo')); |
1071 unittest.expect(o.ephemeralMessage, unittest.equals('foo')); | 1396 unittest.expect(o.ephemeralMessage, unittest.equals('foo')); |
1072 unittest.expect(o.insertTime, unittest.equals('foo')); | 1397 unittest.expect(o.insertTime, unittest.equals('foo')); |
1073 unittest.expect(o.method, unittest.equals('foo')); | 1398 unittest.expect(o.method, unittest.equals('foo')); |
1074 unittest.expect(o.target, unittest.equals('foo')); | 1399 unittest.expect(o.target, unittest.equals('foo')); |
1075 unittest.expect(o.user, unittest.equals('foo')); | 1400 unittest.expect(o.user, unittest.equals('foo')); |
1076 checkUnnamed2694(o.warning); | 1401 checkUnnamed2687(o.warning); |
1077 } | 1402 } |
1078 buildCounterOperationMetadataV1Alpha--; | 1403 buildCounterOperationMetadataV1Alpha--; |
1079 } | 1404 } |
1080 | 1405 |
1081 buildUnnamed2695() { | 1406 buildUnnamed2688() { |
1082 var o = new core.List<core.String>(); | 1407 var o = new core.List<core.String>(); |
1083 o.add("foo"); | 1408 o.add("foo"); |
1084 o.add("foo"); | 1409 o.add("foo"); |
1085 return o; | 1410 return o; |
1086 } | 1411 } |
1087 | 1412 |
1088 checkUnnamed2695(core.List<core.String> o) { | 1413 checkUnnamed2688(core.List<core.String> o) { |
1089 unittest.expect(o, unittest.hasLength(2)); | 1414 unittest.expect(o, unittest.hasLength(2)); |
1090 unittest.expect(o[0], unittest.equals('foo')); | 1415 unittest.expect(o[0], unittest.equals('foo')); |
1091 unittest.expect(o[1], unittest.equals('foo')); | 1416 unittest.expect(o[1], unittest.equals('foo')); |
1092 } | 1417 } |
1093 | 1418 |
1094 core.int buildCounterOperationMetadataV1Beta = 0; | 1419 core.int buildCounterOperationMetadataV1Beta = 0; |
1095 buildOperationMetadataV1Beta() { | 1420 buildOperationMetadataV1Beta() { |
1096 var o = new api.OperationMetadataV1Beta(); | 1421 var o = new api.OperationMetadataV1Beta(); |
1097 buildCounterOperationMetadataV1Beta++; | 1422 buildCounterOperationMetadataV1Beta++; |
1098 if (buildCounterOperationMetadataV1Beta < 3) { | 1423 if (buildCounterOperationMetadataV1Beta < 3) { |
1099 o.endTime = "foo"; | 1424 o.endTime = "foo"; |
1100 o.ephemeralMessage = "foo"; | 1425 o.ephemeralMessage = "foo"; |
1101 o.insertTime = "foo"; | 1426 o.insertTime = "foo"; |
1102 o.method = "foo"; | 1427 o.method = "foo"; |
1103 o.target = "foo"; | 1428 o.target = "foo"; |
1104 o.user = "foo"; | 1429 o.user = "foo"; |
1105 o.warning = buildUnnamed2695(); | 1430 o.warning = buildUnnamed2688(); |
1106 } | 1431 } |
1107 buildCounterOperationMetadataV1Beta--; | 1432 buildCounterOperationMetadataV1Beta--; |
1108 return o; | 1433 return o; |
1109 } | 1434 } |
1110 | 1435 |
1111 checkOperationMetadataV1Beta(api.OperationMetadataV1Beta o) { | 1436 checkOperationMetadataV1Beta(api.OperationMetadataV1Beta o) { |
1112 buildCounterOperationMetadataV1Beta++; | 1437 buildCounterOperationMetadataV1Beta++; |
1113 if (buildCounterOperationMetadataV1Beta < 3) { | 1438 if (buildCounterOperationMetadataV1Beta < 3) { |
1114 unittest.expect(o.endTime, unittest.equals('foo')); | 1439 unittest.expect(o.endTime, unittest.equals('foo')); |
1115 unittest.expect(o.ephemeralMessage, unittest.equals('foo')); | 1440 unittest.expect(o.ephemeralMessage, unittest.equals('foo')); |
1116 unittest.expect(o.insertTime, unittest.equals('foo')); | 1441 unittest.expect(o.insertTime, unittest.equals('foo')); |
1117 unittest.expect(o.method, unittest.equals('foo')); | 1442 unittest.expect(o.method, unittest.equals('foo')); |
1118 unittest.expect(o.target, unittest.equals('foo')); | 1443 unittest.expect(o.target, unittest.equals('foo')); |
1119 unittest.expect(o.user, unittest.equals('foo')); | 1444 unittest.expect(o.user, unittest.equals('foo')); |
1120 checkUnnamed2695(o.warning); | 1445 checkUnnamed2688(o.warning); |
1121 } | 1446 } |
1122 buildCounterOperationMetadataV1Beta--; | 1447 buildCounterOperationMetadataV1Beta--; |
1123 } | 1448 } |
1124 | 1449 |
1125 core.int buildCounterOperationMetadataV1Beta5 = 0; | 1450 core.int buildCounterOperationMetadataV1Beta5 = 0; |
1126 buildOperationMetadataV1Beta5() { | 1451 buildOperationMetadataV1Beta5() { |
1127 var o = new api.OperationMetadataV1Beta5(); | 1452 var o = new api.OperationMetadataV1Beta5(); |
1128 buildCounterOperationMetadataV1Beta5++; | 1453 buildCounterOperationMetadataV1Beta5++; |
1129 if (buildCounterOperationMetadataV1Beta5 < 3) { | 1454 if (buildCounterOperationMetadataV1Beta5 < 3) { |
1130 o.endTime = "foo"; | 1455 o.endTime = "foo"; |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1177 unittest.expect(o.successThreshold, unittest.equals(42)); | 1502 unittest.expect(o.successThreshold, unittest.equals(42)); |
1178 unittest.expect(o.timeout, unittest.equals('foo')); | 1503 unittest.expect(o.timeout, unittest.equals('foo')); |
1179 } | 1504 } |
1180 buildCounterReadinessCheck--; | 1505 buildCounterReadinessCheck--; |
1181 } | 1506 } |
1182 | 1507 |
1183 core.int buildCounterRepairApplicationRequest = 0; | 1508 core.int buildCounterRepairApplicationRequest = 0; |
1184 buildRepairApplicationRequest() { | 1509 buildRepairApplicationRequest() { |
1185 var o = new api.RepairApplicationRequest(); | 1510 var o = new api.RepairApplicationRequest(); |
1186 buildCounterRepairApplicationRequest++; | 1511 buildCounterRepairApplicationRequest++; |
1187 if (buildCounterRepairApplicationRequest < 3) { | 1512 if (buildCounterRepairApplicationRequest < 3) {} |
1188 } | |
1189 buildCounterRepairApplicationRequest--; | 1513 buildCounterRepairApplicationRequest--; |
1190 return o; | 1514 return o; |
1191 } | 1515 } |
1192 | 1516 |
1193 checkRepairApplicationRequest(api.RepairApplicationRequest o) { | 1517 checkRepairApplicationRequest(api.RepairApplicationRequest o) { |
1194 buildCounterRepairApplicationRequest++; | 1518 buildCounterRepairApplicationRequest++; |
1195 if (buildCounterRepairApplicationRequest < 3) { | 1519 if (buildCounterRepairApplicationRequest < 3) {} |
1196 } | |
1197 buildCounterRepairApplicationRequest--; | 1520 buildCounterRepairApplicationRequest--; |
1198 } | 1521 } |
1199 | 1522 |
1200 core.int buildCounterRequestUtilization = 0; | 1523 core.int buildCounterRequestUtilization = 0; |
1201 buildRequestUtilization() { | 1524 buildRequestUtilization() { |
1202 var o = new api.RequestUtilization(); | 1525 var o = new api.RequestUtilization(); |
1203 buildCounterRequestUtilization++; | 1526 buildCounterRequestUtilization++; |
1204 if (buildCounterRequestUtilization < 3) { | 1527 if (buildCounterRequestUtilization < 3) { |
1205 o.targetConcurrentRequests = 42; | 1528 o.targetConcurrentRequests = 42; |
1206 o.targetRequestCountPerSecond = 42; | 1529 o.targetRequestCountPerSecond = 42; |
1207 } | 1530 } |
1208 buildCounterRequestUtilization--; | 1531 buildCounterRequestUtilization--; |
1209 return o; | 1532 return o; |
1210 } | 1533 } |
1211 | 1534 |
1212 checkRequestUtilization(api.RequestUtilization o) { | 1535 checkRequestUtilization(api.RequestUtilization o) { |
1213 buildCounterRequestUtilization++; | 1536 buildCounterRequestUtilization++; |
1214 if (buildCounterRequestUtilization < 3) { | 1537 if (buildCounterRequestUtilization < 3) { |
1215 unittest.expect(o.targetConcurrentRequests, unittest.equals(42)); | 1538 unittest.expect(o.targetConcurrentRequests, unittest.equals(42)); |
1216 unittest.expect(o.targetRequestCountPerSecond, unittest.equals(42)); | 1539 unittest.expect(o.targetRequestCountPerSecond, unittest.equals(42)); |
1217 } | 1540 } |
1218 buildCounterRequestUtilization--; | 1541 buildCounterRequestUtilization--; |
1219 } | 1542 } |
1220 | 1543 |
1221 buildUnnamed2696() { | 1544 core.int buildCounterResourceRecord = 0; |
| 1545 buildResourceRecord() { |
| 1546 var o = new api.ResourceRecord(); |
| 1547 buildCounterResourceRecord++; |
| 1548 if (buildCounterResourceRecord < 3) { |
| 1549 o.name = "foo"; |
| 1550 o.rrdata = "foo"; |
| 1551 o.type = "foo"; |
| 1552 } |
| 1553 buildCounterResourceRecord--; |
| 1554 return o; |
| 1555 } |
| 1556 |
| 1557 checkResourceRecord(api.ResourceRecord o) { |
| 1558 buildCounterResourceRecord++; |
| 1559 if (buildCounterResourceRecord < 3) { |
| 1560 unittest.expect(o.name, unittest.equals('foo')); |
| 1561 unittest.expect(o.rrdata, unittest.equals('foo')); |
| 1562 unittest.expect(o.type, unittest.equals('foo')); |
| 1563 } |
| 1564 buildCounterResourceRecord--; |
| 1565 } |
| 1566 |
| 1567 buildUnnamed2689() { |
1222 var o = new core.List<api.Volume>(); | 1568 var o = new core.List<api.Volume>(); |
1223 o.add(buildVolume()); | 1569 o.add(buildVolume()); |
1224 o.add(buildVolume()); | 1570 o.add(buildVolume()); |
1225 return o; | 1571 return o; |
1226 } | 1572 } |
1227 | 1573 |
1228 checkUnnamed2696(core.List<api.Volume> o) { | 1574 checkUnnamed2689(core.List<api.Volume> o) { |
1229 unittest.expect(o, unittest.hasLength(2)); | 1575 unittest.expect(o, unittest.hasLength(2)); |
1230 checkVolume(o[0]); | 1576 checkVolume(o[0]); |
1231 checkVolume(o[1]); | 1577 checkVolume(o[1]); |
1232 } | 1578 } |
1233 | 1579 |
1234 core.int buildCounterResources = 0; | 1580 core.int buildCounterResources = 0; |
1235 buildResources() { | 1581 buildResources() { |
1236 var o = new api.Resources(); | 1582 var o = new api.Resources(); |
1237 buildCounterResources++; | 1583 buildCounterResources++; |
1238 if (buildCounterResources < 3) { | 1584 if (buildCounterResources < 3) { |
1239 o.cpu = 42.0; | 1585 o.cpu = 42.0; |
1240 o.diskGb = 42.0; | 1586 o.diskGb = 42.0; |
1241 o.memoryGb = 42.0; | 1587 o.memoryGb = 42.0; |
1242 o.volumes = buildUnnamed2696(); | 1588 o.volumes = buildUnnamed2689(); |
1243 } | 1589 } |
1244 buildCounterResources--; | 1590 buildCounterResources--; |
1245 return o; | 1591 return o; |
1246 } | 1592 } |
1247 | 1593 |
1248 checkResources(api.Resources o) { | 1594 checkResources(api.Resources o) { |
1249 buildCounterResources++; | 1595 buildCounterResources++; |
1250 if (buildCounterResources < 3) { | 1596 if (buildCounterResources < 3) { |
1251 unittest.expect(o.cpu, unittest.equals(42.0)); | 1597 unittest.expect(o.cpu, unittest.equals(42.0)); |
1252 unittest.expect(o.diskGb, unittest.equals(42.0)); | 1598 unittest.expect(o.diskGb, unittest.equals(42.0)); |
1253 unittest.expect(o.memoryGb, unittest.equals(42.0)); | 1599 unittest.expect(o.memoryGb, unittest.equals(42.0)); |
1254 checkUnnamed2696(o.volumes); | 1600 checkUnnamed2689(o.volumes); |
1255 } | 1601 } |
1256 buildCounterResources--; | 1602 buildCounterResources--; |
1257 } | 1603 } |
1258 | 1604 |
1259 core.int buildCounterScriptHandler = 0; | 1605 core.int buildCounterScriptHandler = 0; |
1260 buildScriptHandler() { | 1606 buildScriptHandler() { |
1261 var o = new api.ScriptHandler(); | 1607 var o = new api.ScriptHandler(); |
1262 buildCounterScriptHandler++; | 1608 buildCounterScriptHandler++; |
1263 if (buildCounterScriptHandler < 3) { | 1609 if (buildCounterScriptHandler < 3) { |
1264 o.scriptPath = "foo"; | 1610 o.scriptPath = "foo"; |
(...skipping 26 matching lines...) Expand all Loading... |
1291 checkService(api.Service o) { | 1637 checkService(api.Service o) { |
1292 buildCounterService++; | 1638 buildCounterService++; |
1293 if (buildCounterService < 3) { | 1639 if (buildCounterService < 3) { |
1294 unittest.expect(o.id, unittest.equals('foo')); | 1640 unittest.expect(o.id, unittest.equals('foo')); |
1295 unittest.expect(o.name, unittest.equals('foo')); | 1641 unittest.expect(o.name, unittest.equals('foo')); |
1296 checkTrafficSplit(o.split); | 1642 checkTrafficSplit(o.split); |
1297 } | 1643 } |
1298 buildCounterService--; | 1644 buildCounterService--; |
1299 } | 1645 } |
1300 | 1646 |
1301 buildUnnamed2697() { | 1647 core.int buildCounterSslSettings = 0; |
| 1648 buildSslSettings() { |
| 1649 var o = new api.SslSettings(); |
| 1650 buildCounterSslSettings++; |
| 1651 if (buildCounterSslSettings < 3) { |
| 1652 o.certificateId = "foo"; |
| 1653 } |
| 1654 buildCounterSslSettings--; |
| 1655 return o; |
| 1656 } |
| 1657 |
| 1658 checkSslSettings(api.SslSettings o) { |
| 1659 buildCounterSslSettings++; |
| 1660 if (buildCounterSslSettings < 3) { |
| 1661 unittest.expect(o.certificateId, unittest.equals('foo')); |
| 1662 } |
| 1663 buildCounterSslSettings--; |
| 1664 } |
| 1665 |
| 1666 buildUnnamed2690() { |
1302 var o = new core.Map<core.String, core.String>(); | 1667 var o = new core.Map<core.String, core.String>(); |
1303 o["x"] = "foo"; | 1668 o["x"] = "foo"; |
1304 o["y"] = "foo"; | 1669 o["y"] = "foo"; |
1305 return o; | 1670 return o; |
1306 } | 1671 } |
1307 | 1672 |
1308 checkUnnamed2697(core.Map<core.String, core.String> o) { | 1673 checkUnnamed2690(core.Map<core.String, core.String> o) { |
1309 unittest.expect(o, unittest.hasLength(2)); | 1674 unittest.expect(o, unittest.hasLength(2)); |
1310 unittest.expect(o["x"], unittest.equals('foo')); | 1675 unittest.expect(o["x"], unittest.equals('foo')); |
1311 unittest.expect(o["y"], unittest.equals('foo')); | 1676 unittest.expect(o["y"], unittest.equals('foo')); |
1312 } | 1677 } |
1313 | 1678 |
1314 core.int buildCounterStaticFilesHandler = 0; | 1679 core.int buildCounterStaticFilesHandler = 0; |
1315 buildStaticFilesHandler() { | 1680 buildStaticFilesHandler() { |
1316 var o = new api.StaticFilesHandler(); | 1681 var o = new api.StaticFilesHandler(); |
1317 buildCounterStaticFilesHandler++; | 1682 buildCounterStaticFilesHandler++; |
1318 if (buildCounterStaticFilesHandler < 3) { | 1683 if (buildCounterStaticFilesHandler < 3) { |
1319 o.applicationReadable = true; | 1684 o.applicationReadable = true; |
1320 o.expiration = "foo"; | 1685 o.expiration = "foo"; |
1321 o.httpHeaders = buildUnnamed2697(); | 1686 o.httpHeaders = buildUnnamed2690(); |
1322 o.mimeType = "foo"; | 1687 o.mimeType = "foo"; |
1323 o.path = "foo"; | 1688 o.path = "foo"; |
1324 o.requireMatchingFile = true; | 1689 o.requireMatchingFile = true; |
1325 o.uploadPathRegex = "foo"; | 1690 o.uploadPathRegex = "foo"; |
1326 } | 1691 } |
1327 buildCounterStaticFilesHandler--; | 1692 buildCounterStaticFilesHandler--; |
1328 return o; | 1693 return o; |
1329 } | 1694 } |
1330 | 1695 |
1331 checkStaticFilesHandler(api.StaticFilesHandler o) { | 1696 checkStaticFilesHandler(api.StaticFilesHandler o) { |
1332 buildCounterStaticFilesHandler++; | 1697 buildCounterStaticFilesHandler++; |
1333 if (buildCounterStaticFilesHandler < 3) { | 1698 if (buildCounterStaticFilesHandler < 3) { |
1334 unittest.expect(o.applicationReadable, unittest.isTrue); | 1699 unittest.expect(o.applicationReadable, unittest.isTrue); |
1335 unittest.expect(o.expiration, unittest.equals('foo')); | 1700 unittest.expect(o.expiration, unittest.equals('foo')); |
1336 checkUnnamed2697(o.httpHeaders); | 1701 checkUnnamed2690(o.httpHeaders); |
1337 unittest.expect(o.mimeType, unittest.equals('foo')); | 1702 unittest.expect(o.mimeType, unittest.equals('foo')); |
1338 unittest.expect(o.path, unittest.equals('foo')); | 1703 unittest.expect(o.path, unittest.equals('foo')); |
1339 unittest.expect(o.requireMatchingFile, unittest.isTrue); | 1704 unittest.expect(o.requireMatchingFile, unittest.isTrue); |
1340 unittest.expect(o.uploadPathRegex, unittest.equals('foo')); | 1705 unittest.expect(o.uploadPathRegex, unittest.equals('foo')); |
1341 } | 1706 } |
1342 buildCounterStaticFilesHandler--; | 1707 buildCounterStaticFilesHandler--; |
1343 } | 1708 } |
1344 | 1709 |
1345 buildUnnamed2698() { | 1710 buildUnnamed2691() { |
1346 var o = new core.Map<core.String, core.Object>(); | 1711 var o = new core.Map<core.String, core.Object>(); |
1347 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 1712 o["x"] = { |
1348 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 1713 'list': [1, 2, 3], |
| 1714 'bool': true, |
| 1715 'string': 'foo' |
| 1716 }; |
| 1717 o["y"] = { |
| 1718 'list': [1, 2, 3], |
| 1719 'bool': true, |
| 1720 'string': 'foo' |
| 1721 }; |
1349 return o; | 1722 return o; |
1350 } | 1723 } |
1351 | 1724 |
1352 checkUnnamed2698(core.Map<core.String, core.Object> o) { | 1725 checkUnnamed2691(core.Map<core.String, core.Object> o) { |
1353 unittest.expect(o, unittest.hasLength(2)); | 1726 unittest.expect(o, unittest.hasLength(2)); |
1354 var casted7 = (o["x"]) as core.Map; unittest.expect(casted7, unittest.hasLengt
h(3)); unittest.expect(casted7["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted7["bool"], unittest.equals(true)); unittest.expect(casted7["string"],
unittest.equals('foo')); | 1727 var casted7 = (o["x"]) as core.Map; |
1355 var casted8 = (o["y"]) as core.Map; unittest.expect(casted8, unittest.hasLengt
h(3)); unittest.expect(casted8["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted8["bool"], unittest.equals(true)); unittest.expect(casted8["string"],
unittest.equals('foo')); | 1728 unittest.expect(casted7, unittest.hasLength(3)); |
| 1729 unittest.expect(casted7["list"], unittest.equals([1, 2, 3])); |
| 1730 unittest.expect(casted7["bool"], unittest.equals(true)); |
| 1731 unittest.expect(casted7["string"], unittest.equals('foo')); |
| 1732 var casted8 = (o["y"]) as core.Map; |
| 1733 unittest.expect(casted8, unittest.hasLength(3)); |
| 1734 unittest.expect(casted8["list"], unittest.equals([1, 2, 3])); |
| 1735 unittest.expect(casted8["bool"], unittest.equals(true)); |
| 1736 unittest.expect(casted8["string"], unittest.equals('foo')); |
1356 } | 1737 } |
1357 | 1738 |
1358 buildUnnamed2699() { | 1739 buildUnnamed2692() { |
1359 var o = new core.List<core.Map<core.String, core.Object>>(); | 1740 var o = new core.List<core.Map<core.String, core.Object>>(); |
1360 o.add(buildUnnamed2698()); | 1741 o.add(buildUnnamed2691()); |
1361 o.add(buildUnnamed2698()); | 1742 o.add(buildUnnamed2691()); |
1362 return o; | 1743 return o; |
1363 } | 1744 } |
1364 | 1745 |
1365 checkUnnamed2699(core.List<core.Map<core.String, core.Object>> o) { | 1746 checkUnnamed2692(core.List<core.Map<core.String, core.Object>> o) { |
1366 unittest.expect(o, unittest.hasLength(2)); | 1747 unittest.expect(o, unittest.hasLength(2)); |
1367 checkUnnamed2698(o[0]); | 1748 checkUnnamed2691(o[0]); |
1368 checkUnnamed2698(o[1]); | 1749 checkUnnamed2691(o[1]); |
1369 } | 1750 } |
1370 | 1751 |
1371 core.int buildCounterStatus = 0; | 1752 core.int buildCounterStatus = 0; |
1372 buildStatus() { | 1753 buildStatus() { |
1373 var o = new api.Status(); | 1754 var o = new api.Status(); |
1374 buildCounterStatus++; | 1755 buildCounterStatus++; |
1375 if (buildCounterStatus < 3) { | 1756 if (buildCounterStatus < 3) { |
1376 o.code = 42; | 1757 o.code = 42; |
1377 o.details = buildUnnamed2699(); | 1758 o.details = buildUnnamed2692(); |
1378 o.message = "foo"; | 1759 o.message = "foo"; |
1379 } | 1760 } |
1380 buildCounterStatus--; | 1761 buildCounterStatus--; |
1381 return o; | 1762 return o; |
1382 } | 1763 } |
1383 | 1764 |
1384 checkStatus(api.Status o) { | 1765 checkStatus(api.Status o) { |
1385 buildCounterStatus++; | 1766 buildCounterStatus++; |
1386 if (buildCounterStatus < 3) { | 1767 if (buildCounterStatus < 3) { |
1387 unittest.expect(o.code, unittest.equals(42)); | 1768 unittest.expect(o.code, unittest.equals(42)); |
1388 checkUnnamed2699(o.details); | 1769 checkUnnamed2692(o.details); |
1389 unittest.expect(o.message, unittest.equals('foo')); | 1770 unittest.expect(o.message, unittest.equals('foo')); |
1390 } | 1771 } |
1391 buildCounterStatus--; | 1772 buildCounterStatus--; |
1392 } | 1773 } |
1393 | 1774 |
1394 buildUnnamed2700() { | 1775 buildUnnamed2693() { |
1395 var o = new core.Map<core.String, core.double>(); | 1776 var o = new core.Map<core.String, core.double>(); |
1396 o["x"] = 42.0; | 1777 o["x"] = 42.0; |
1397 o["y"] = 42.0; | 1778 o["y"] = 42.0; |
1398 return o; | 1779 return o; |
1399 } | 1780 } |
1400 | 1781 |
1401 checkUnnamed2700(core.Map<core.String, core.double> o) { | 1782 checkUnnamed2693(core.Map<core.String, core.double> o) { |
1402 unittest.expect(o, unittest.hasLength(2)); | 1783 unittest.expect(o, unittest.hasLength(2)); |
1403 unittest.expect(o["x"], unittest.equals(42.0)); | 1784 unittest.expect(o["x"], unittest.equals(42.0)); |
1404 unittest.expect(o["y"], unittest.equals(42.0)); | 1785 unittest.expect(o["y"], unittest.equals(42.0)); |
1405 } | 1786 } |
1406 | 1787 |
1407 core.int buildCounterTrafficSplit = 0; | 1788 core.int buildCounterTrafficSplit = 0; |
1408 buildTrafficSplit() { | 1789 buildTrafficSplit() { |
1409 var o = new api.TrafficSplit(); | 1790 var o = new api.TrafficSplit(); |
1410 buildCounterTrafficSplit++; | 1791 buildCounterTrafficSplit++; |
1411 if (buildCounterTrafficSplit < 3) { | 1792 if (buildCounterTrafficSplit < 3) { |
1412 o.allocations = buildUnnamed2700(); | 1793 o.allocations = buildUnnamed2693(); |
1413 o.shardBy = "foo"; | 1794 o.shardBy = "foo"; |
1414 } | 1795 } |
1415 buildCounterTrafficSplit--; | 1796 buildCounterTrafficSplit--; |
1416 return o; | 1797 return o; |
1417 } | 1798 } |
1418 | 1799 |
1419 checkTrafficSplit(api.TrafficSplit o) { | 1800 checkTrafficSplit(api.TrafficSplit o) { |
1420 buildCounterTrafficSplit++; | 1801 buildCounterTrafficSplit++; |
1421 if (buildCounterTrafficSplit < 3) { | 1802 if (buildCounterTrafficSplit < 3) { |
1422 checkUnnamed2700(o.allocations); | 1803 checkUnnamed2693(o.allocations); |
1423 unittest.expect(o.shardBy, unittest.equals('foo')); | 1804 unittest.expect(o.shardBy, unittest.equals('foo')); |
1424 } | 1805 } |
1425 buildCounterTrafficSplit--; | 1806 buildCounterTrafficSplit--; |
1426 } | 1807 } |
1427 | 1808 |
1428 core.int buildCounterUrlDispatchRule = 0; | 1809 core.int buildCounterUrlDispatchRule = 0; |
1429 buildUrlDispatchRule() { | 1810 buildUrlDispatchRule() { |
1430 var o = new api.UrlDispatchRule(); | 1811 var o = new api.UrlDispatchRule(); |
1431 buildCounterUrlDispatchRule++; | 1812 buildCounterUrlDispatchRule++; |
1432 if (buildCounterUrlDispatchRule < 3) { | 1813 if (buildCounterUrlDispatchRule < 3) { |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1474 unittest.expect(o.login, unittest.equals('foo')); | 1855 unittest.expect(o.login, unittest.equals('foo')); |
1475 unittest.expect(o.redirectHttpResponseCode, unittest.equals('foo')); | 1856 unittest.expect(o.redirectHttpResponseCode, unittest.equals('foo')); |
1476 checkScriptHandler(o.script); | 1857 checkScriptHandler(o.script); |
1477 unittest.expect(o.securityLevel, unittest.equals('foo')); | 1858 unittest.expect(o.securityLevel, unittest.equals('foo')); |
1478 checkStaticFilesHandler(o.staticFiles); | 1859 checkStaticFilesHandler(o.staticFiles); |
1479 unittest.expect(o.urlRegex, unittest.equals('foo')); | 1860 unittest.expect(o.urlRegex, unittest.equals('foo')); |
1480 } | 1861 } |
1481 buildCounterUrlMap--; | 1862 buildCounterUrlMap--; |
1482 } | 1863 } |
1483 | 1864 |
1484 buildUnnamed2701() { | 1865 buildUnnamed2694() { |
1485 var o = new core.Map<core.String, core.String>(); | 1866 var o = new core.Map<core.String, core.String>(); |
1486 o["x"] = "foo"; | 1867 o["x"] = "foo"; |
1487 o["y"] = "foo"; | 1868 o["y"] = "foo"; |
1488 return o; | 1869 return o; |
1489 } | 1870 } |
1490 | 1871 |
1491 checkUnnamed2701(core.Map<core.String, core.String> o) { | 1872 checkUnnamed2694(core.Map<core.String, core.String> o) { |
1492 unittest.expect(o, unittest.hasLength(2)); | 1873 unittest.expect(o, unittest.hasLength(2)); |
1493 unittest.expect(o["x"], unittest.equals('foo')); | 1874 unittest.expect(o["x"], unittest.equals('foo')); |
1494 unittest.expect(o["y"], unittest.equals('foo')); | 1875 unittest.expect(o["y"], unittest.equals('foo')); |
1495 } | 1876 } |
1496 | 1877 |
1497 buildUnnamed2702() { | 1878 buildUnnamed2695() { |
1498 var o = new core.Map<core.String, core.String>(); | 1879 var o = new core.Map<core.String, core.String>(); |
1499 o["x"] = "foo"; | 1880 o["x"] = "foo"; |
1500 o["y"] = "foo"; | 1881 o["y"] = "foo"; |
1501 return o; | 1882 return o; |
1502 } | 1883 } |
1503 | 1884 |
1504 checkUnnamed2702(core.Map<core.String, core.String> o) { | 1885 checkUnnamed2695(core.Map<core.String, core.String> o) { |
1505 unittest.expect(o, unittest.hasLength(2)); | 1886 unittest.expect(o, unittest.hasLength(2)); |
1506 unittest.expect(o["x"], unittest.equals('foo')); | 1887 unittest.expect(o["x"], unittest.equals('foo')); |
1507 unittest.expect(o["y"], unittest.equals('foo')); | 1888 unittest.expect(o["y"], unittest.equals('foo')); |
1508 } | 1889 } |
1509 | 1890 |
1510 buildUnnamed2703() { | 1891 buildUnnamed2696() { |
1511 var o = new core.List<api.ErrorHandler>(); | 1892 var o = new core.List<api.ErrorHandler>(); |
1512 o.add(buildErrorHandler()); | 1893 o.add(buildErrorHandler()); |
1513 o.add(buildErrorHandler()); | 1894 o.add(buildErrorHandler()); |
1514 return o; | 1895 return o; |
1515 } | 1896 } |
1516 | 1897 |
1517 checkUnnamed2703(core.List<api.ErrorHandler> o) { | 1898 checkUnnamed2696(core.List<api.ErrorHandler> o) { |
1518 unittest.expect(o, unittest.hasLength(2)); | 1899 unittest.expect(o, unittest.hasLength(2)); |
1519 checkErrorHandler(o[0]); | 1900 checkErrorHandler(o[0]); |
1520 checkErrorHandler(o[1]); | 1901 checkErrorHandler(o[1]); |
1521 } | 1902 } |
1522 | 1903 |
1523 buildUnnamed2704() { | 1904 buildUnnamed2697() { |
1524 var o = new core.List<api.UrlMap>(); | 1905 var o = new core.List<api.UrlMap>(); |
1525 o.add(buildUrlMap()); | 1906 o.add(buildUrlMap()); |
1526 o.add(buildUrlMap()); | 1907 o.add(buildUrlMap()); |
1527 return o; | 1908 return o; |
1528 } | 1909 } |
1529 | 1910 |
1530 checkUnnamed2704(core.List<api.UrlMap> o) { | 1911 checkUnnamed2697(core.List<api.UrlMap> o) { |
1531 unittest.expect(o, unittest.hasLength(2)); | 1912 unittest.expect(o, unittest.hasLength(2)); |
1532 checkUrlMap(o[0]); | 1913 checkUrlMap(o[0]); |
1533 checkUrlMap(o[1]); | 1914 checkUrlMap(o[1]); |
1534 } | 1915 } |
1535 | 1916 |
1536 buildUnnamed2705() { | 1917 buildUnnamed2698() { |
1537 var o = new core.List<core.String>(); | 1918 var o = new core.List<core.String>(); |
1538 o.add("foo"); | 1919 o.add("foo"); |
1539 o.add("foo"); | 1920 o.add("foo"); |
1540 return o; | 1921 return o; |
1541 } | 1922 } |
1542 | 1923 |
1543 checkUnnamed2705(core.List<core.String> o) { | 1924 checkUnnamed2698(core.List<core.String> o) { |
1544 unittest.expect(o, unittest.hasLength(2)); | 1925 unittest.expect(o, unittest.hasLength(2)); |
1545 unittest.expect(o[0], unittest.equals('foo')); | 1926 unittest.expect(o[0], unittest.equals('foo')); |
1546 unittest.expect(o[1], unittest.equals('foo')); | 1927 unittest.expect(o[1], unittest.equals('foo')); |
1547 } | 1928 } |
1548 | 1929 |
1549 buildUnnamed2706() { | 1930 buildUnnamed2699() { |
1550 var o = new core.List<api.Library>(); | 1931 var o = new core.List<api.Library>(); |
1551 o.add(buildLibrary()); | 1932 o.add(buildLibrary()); |
1552 o.add(buildLibrary()); | 1933 o.add(buildLibrary()); |
1553 return o; | 1934 return o; |
1554 } | 1935 } |
1555 | 1936 |
1556 checkUnnamed2706(core.List<api.Library> o) { | 1937 checkUnnamed2699(core.List<api.Library> o) { |
1557 unittest.expect(o, unittest.hasLength(2)); | 1938 unittest.expect(o, unittest.hasLength(2)); |
1558 checkLibrary(o[0]); | 1939 checkLibrary(o[0]); |
1559 checkLibrary(o[1]); | 1940 checkLibrary(o[1]); |
1560 } | 1941 } |
1561 | 1942 |
1562 core.int buildCounterVersion = 0; | 1943 core.int buildCounterVersion = 0; |
1563 buildVersion() { | 1944 buildVersion() { |
1564 var o = new api.Version(); | 1945 var o = new api.Version(); |
1565 buildCounterVersion++; | 1946 buildCounterVersion++; |
1566 if (buildCounterVersion < 3) { | 1947 if (buildCounterVersion < 3) { |
1567 o.apiConfig = buildApiConfigHandler(); | 1948 o.apiConfig = buildApiConfigHandler(); |
1568 o.automaticScaling = buildAutomaticScaling(); | 1949 o.automaticScaling = buildAutomaticScaling(); |
1569 o.basicScaling = buildBasicScaling(); | 1950 o.basicScaling = buildBasicScaling(); |
1570 o.betaSettings = buildUnnamed2701(); | 1951 o.betaSettings = buildUnnamed2694(); |
1571 o.createTime = "foo"; | 1952 o.createTime = "foo"; |
1572 o.createdBy = "foo"; | 1953 o.createdBy = "foo"; |
1573 o.defaultExpiration = "foo"; | 1954 o.defaultExpiration = "foo"; |
1574 o.deployment = buildDeployment(); | 1955 o.deployment = buildDeployment(); |
1575 o.diskUsageBytes = "foo"; | 1956 o.diskUsageBytes = "foo"; |
1576 o.endpointsApiService = buildEndpointsApiService(); | 1957 o.endpointsApiService = buildEndpointsApiService(); |
1577 o.env = "foo"; | 1958 o.env = "foo"; |
1578 o.envVariables = buildUnnamed2702(); | 1959 o.envVariables = buildUnnamed2695(); |
1579 o.errorHandlers = buildUnnamed2703(); | 1960 o.errorHandlers = buildUnnamed2696(); |
1580 o.handlers = buildUnnamed2704(); | 1961 o.handlers = buildUnnamed2697(); |
1581 o.healthCheck = buildHealthCheck(); | 1962 o.healthCheck = buildHealthCheck(); |
1582 o.id = "foo"; | 1963 o.id = "foo"; |
1583 o.inboundServices = buildUnnamed2705(); | 1964 o.inboundServices = buildUnnamed2698(); |
1584 o.instanceClass = "foo"; | 1965 o.instanceClass = "foo"; |
1585 o.libraries = buildUnnamed2706(); | 1966 o.libraries = buildUnnamed2699(); |
1586 o.livenessCheck = buildLivenessCheck(); | 1967 o.livenessCheck = buildLivenessCheck(); |
1587 o.manualScaling = buildManualScaling(); | 1968 o.manualScaling = buildManualScaling(); |
1588 o.name = "foo"; | 1969 o.name = "foo"; |
1589 o.network = buildNetwork(); | 1970 o.network = buildNetwork(); |
1590 o.nobuildFilesRegex = "foo"; | 1971 o.nobuildFilesRegex = "foo"; |
1591 o.readinessCheck = buildReadinessCheck(); | 1972 o.readinessCheck = buildReadinessCheck(); |
1592 o.resources = buildResources(); | 1973 o.resources = buildResources(); |
1593 o.runtime = "foo"; | 1974 o.runtime = "foo"; |
1594 o.runtimeApiVersion = "foo"; | 1975 o.runtimeApiVersion = "foo"; |
1595 o.servingStatus = "foo"; | 1976 o.servingStatus = "foo"; |
1596 o.threadsafe = true; | 1977 o.threadsafe = true; |
1597 o.versionUrl = "foo"; | 1978 o.versionUrl = "foo"; |
1598 o.vm = true; | 1979 o.vm = true; |
1599 } | 1980 } |
1600 buildCounterVersion--; | 1981 buildCounterVersion--; |
1601 return o; | 1982 return o; |
1602 } | 1983 } |
1603 | 1984 |
1604 checkVersion(api.Version o) { | 1985 checkVersion(api.Version o) { |
1605 buildCounterVersion++; | 1986 buildCounterVersion++; |
1606 if (buildCounterVersion < 3) { | 1987 if (buildCounterVersion < 3) { |
1607 checkApiConfigHandler(o.apiConfig); | 1988 checkApiConfigHandler(o.apiConfig); |
1608 checkAutomaticScaling(o.automaticScaling); | 1989 checkAutomaticScaling(o.automaticScaling); |
1609 checkBasicScaling(o.basicScaling); | 1990 checkBasicScaling(o.basicScaling); |
1610 checkUnnamed2701(o.betaSettings); | 1991 checkUnnamed2694(o.betaSettings); |
1611 unittest.expect(o.createTime, unittest.equals('foo')); | 1992 unittest.expect(o.createTime, unittest.equals('foo')); |
1612 unittest.expect(o.createdBy, unittest.equals('foo')); | 1993 unittest.expect(o.createdBy, unittest.equals('foo')); |
1613 unittest.expect(o.defaultExpiration, unittest.equals('foo')); | 1994 unittest.expect(o.defaultExpiration, unittest.equals('foo')); |
1614 checkDeployment(o.deployment); | 1995 checkDeployment(o.deployment); |
1615 unittest.expect(o.diskUsageBytes, unittest.equals('foo')); | 1996 unittest.expect(o.diskUsageBytes, unittest.equals('foo')); |
1616 checkEndpointsApiService(o.endpointsApiService); | 1997 checkEndpointsApiService(o.endpointsApiService); |
1617 unittest.expect(o.env, unittest.equals('foo')); | 1998 unittest.expect(o.env, unittest.equals('foo')); |
1618 checkUnnamed2702(o.envVariables); | 1999 checkUnnamed2695(o.envVariables); |
1619 checkUnnamed2703(o.errorHandlers); | 2000 checkUnnamed2696(o.errorHandlers); |
1620 checkUnnamed2704(o.handlers); | 2001 checkUnnamed2697(o.handlers); |
1621 checkHealthCheck(o.healthCheck); | 2002 checkHealthCheck(o.healthCheck); |
1622 unittest.expect(o.id, unittest.equals('foo')); | 2003 unittest.expect(o.id, unittest.equals('foo')); |
1623 checkUnnamed2705(o.inboundServices); | 2004 checkUnnamed2698(o.inboundServices); |
1624 unittest.expect(o.instanceClass, unittest.equals('foo')); | 2005 unittest.expect(o.instanceClass, unittest.equals('foo')); |
1625 checkUnnamed2706(o.libraries); | 2006 checkUnnamed2699(o.libraries); |
1626 checkLivenessCheck(o.livenessCheck); | 2007 checkLivenessCheck(o.livenessCheck); |
1627 checkManualScaling(o.manualScaling); | 2008 checkManualScaling(o.manualScaling); |
1628 unittest.expect(o.name, unittest.equals('foo')); | 2009 unittest.expect(o.name, unittest.equals('foo')); |
1629 checkNetwork(o.network); | 2010 checkNetwork(o.network); |
1630 unittest.expect(o.nobuildFilesRegex, unittest.equals('foo')); | 2011 unittest.expect(o.nobuildFilesRegex, unittest.equals('foo')); |
1631 checkReadinessCheck(o.readinessCheck); | 2012 checkReadinessCheck(o.readinessCheck); |
1632 checkResources(o.resources); | 2013 checkResources(o.resources); |
1633 unittest.expect(o.runtime, unittest.equals('foo')); | 2014 unittest.expect(o.runtime, unittest.equals('foo')); |
1634 unittest.expect(o.runtimeApiVersion, unittest.equals('foo')); | 2015 unittest.expect(o.runtimeApiVersion, unittest.equals('foo')); |
1635 unittest.expect(o.servingStatus, unittest.equals('foo')); | 2016 unittest.expect(o.servingStatus, unittest.equals('foo')); |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1677 | 2058 |
1678 checkZipInfo(api.ZipInfo o) { | 2059 checkZipInfo(api.ZipInfo o) { |
1679 buildCounterZipInfo++; | 2060 buildCounterZipInfo++; |
1680 if (buildCounterZipInfo < 3) { | 2061 if (buildCounterZipInfo < 3) { |
1681 unittest.expect(o.filesCount, unittest.equals(42)); | 2062 unittest.expect(o.filesCount, unittest.equals(42)); |
1682 unittest.expect(o.sourceUrl, unittest.equals('foo')); | 2063 unittest.expect(o.sourceUrl, unittest.equals('foo')); |
1683 } | 2064 } |
1684 buildCounterZipInfo--; | 2065 buildCounterZipInfo--; |
1685 } | 2066 } |
1686 | 2067 |
1687 | |
1688 main() { | 2068 main() { |
1689 unittest.group("obj-schema-ApiConfigHandler", () { | 2069 unittest.group("obj-schema-ApiConfigHandler", () { |
1690 unittest.test("to-json--from-json", () { | 2070 unittest.test("to-json--from-json", () { |
1691 var o = buildApiConfigHandler(); | 2071 var o = buildApiConfigHandler(); |
1692 var od = new api.ApiConfigHandler.fromJson(o.toJson()); | 2072 var od = new api.ApiConfigHandler.fromJson(o.toJson()); |
1693 checkApiConfigHandler(od); | 2073 checkApiConfigHandler(od); |
1694 }); | 2074 }); |
1695 }); | 2075 }); |
1696 | 2076 |
1697 | |
1698 unittest.group("obj-schema-ApiEndpointHandler", () { | 2077 unittest.group("obj-schema-ApiEndpointHandler", () { |
1699 unittest.test("to-json--from-json", () { | 2078 unittest.test("to-json--from-json", () { |
1700 var o = buildApiEndpointHandler(); | 2079 var o = buildApiEndpointHandler(); |
1701 var od = new api.ApiEndpointHandler.fromJson(o.toJson()); | 2080 var od = new api.ApiEndpointHandler.fromJson(o.toJson()); |
1702 checkApiEndpointHandler(od); | 2081 checkApiEndpointHandler(od); |
1703 }); | 2082 }); |
1704 }); | 2083 }); |
1705 | 2084 |
1706 | |
1707 unittest.group("obj-schema-Application", () { | 2085 unittest.group("obj-schema-Application", () { |
1708 unittest.test("to-json--from-json", () { | 2086 unittest.test("to-json--from-json", () { |
1709 var o = buildApplication(); | 2087 var o = buildApplication(); |
1710 var od = new api.Application.fromJson(o.toJson()); | 2088 var od = new api.Application.fromJson(o.toJson()); |
1711 checkApplication(od); | 2089 checkApplication(od); |
1712 }); | 2090 }); |
1713 }); | 2091 }); |
1714 | 2092 |
| 2093 unittest.group("obj-schema-AuthorizedCertificate", () { |
| 2094 unittest.test("to-json--from-json", () { |
| 2095 var o = buildAuthorizedCertificate(); |
| 2096 var od = new api.AuthorizedCertificate.fromJson(o.toJson()); |
| 2097 checkAuthorizedCertificate(od); |
| 2098 }); |
| 2099 }); |
| 2100 |
| 2101 unittest.group("obj-schema-AuthorizedDomain", () { |
| 2102 unittest.test("to-json--from-json", () { |
| 2103 var o = buildAuthorizedDomain(); |
| 2104 var od = new api.AuthorizedDomain.fromJson(o.toJson()); |
| 2105 checkAuthorizedDomain(od); |
| 2106 }); |
| 2107 }); |
1715 | 2108 |
1716 unittest.group("obj-schema-AutomaticScaling", () { | 2109 unittest.group("obj-schema-AutomaticScaling", () { |
1717 unittest.test("to-json--from-json", () { | 2110 unittest.test("to-json--from-json", () { |
1718 var o = buildAutomaticScaling(); | 2111 var o = buildAutomaticScaling(); |
1719 var od = new api.AutomaticScaling.fromJson(o.toJson()); | 2112 var od = new api.AutomaticScaling.fromJson(o.toJson()); |
1720 checkAutomaticScaling(od); | 2113 checkAutomaticScaling(od); |
1721 }); | 2114 }); |
1722 }); | 2115 }); |
1723 | 2116 |
1724 | |
1725 unittest.group("obj-schema-BasicScaling", () { | 2117 unittest.group("obj-schema-BasicScaling", () { |
1726 unittest.test("to-json--from-json", () { | 2118 unittest.test("to-json--from-json", () { |
1727 var o = buildBasicScaling(); | 2119 var o = buildBasicScaling(); |
1728 var od = new api.BasicScaling.fromJson(o.toJson()); | 2120 var od = new api.BasicScaling.fromJson(o.toJson()); |
1729 checkBasicScaling(od); | 2121 checkBasicScaling(od); |
1730 }); | 2122 }); |
1731 }); | 2123 }); |
1732 | 2124 |
| 2125 unittest.group("obj-schema-CertificateRawData", () { |
| 2126 unittest.test("to-json--from-json", () { |
| 2127 var o = buildCertificateRawData(); |
| 2128 var od = new api.CertificateRawData.fromJson(o.toJson()); |
| 2129 checkCertificateRawData(od); |
| 2130 }); |
| 2131 }); |
1733 | 2132 |
1734 unittest.group("obj-schema-ContainerInfo", () { | 2133 unittest.group("obj-schema-ContainerInfo", () { |
1735 unittest.test("to-json--from-json", () { | 2134 unittest.test("to-json--from-json", () { |
1736 var o = buildContainerInfo(); | 2135 var o = buildContainerInfo(); |
1737 var od = new api.ContainerInfo.fromJson(o.toJson()); | 2136 var od = new api.ContainerInfo.fromJson(o.toJson()); |
1738 checkContainerInfo(od); | 2137 checkContainerInfo(od); |
1739 }); | 2138 }); |
1740 }); | 2139 }); |
1741 | 2140 |
1742 | |
1743 unittest.group("obj-schema-CpuUtilization", () { | 2141 unittest.group("obj-schema-CpuUtilization", () { |
1744 unittest.test("to-json--from-json", () { | 2142 unittest.test("to-json--from-json", () { |
1745 var o = buildCpuUtilization(); | 2143 var o = buildCpuUtilization(); |
1746 var od = new api.CpuUtilization.fromJson(o.toJson()); | 2144 var od = new api.CpuUtilization.fromJson(o.toJson()); |
1747 checkCpuUtilization(od); | 2145 checkCpuUtilization(od); |
1748 }); | 2146 }); |
1749 }); | 2147 }); |
1750 | 2148 |
1751 | |
1752 unittest.group("obj-schema-DebugInstanceRequest", () { | 2149 unittest.group("obj-schema-DebugInstanceRequest", () { |
1753 unittest.test("to-json--from-json", () { | 2150 unittest.test("to-json--from-json", () { |
1754 var o = buildDebugInstanceRequest(); | 2151 var o = buildDebugInstanceRequest(); |
1755 var od = new api.DebugInstanceRequest.fromJson(o.toJson()); | 2152 var od = new api.DebugInstanceRequest.fromJson(o.toJson()); |
1756 checkDebugInstanceRequest(od); | 2153 checkDebugInstanceRequest(od); |
1757 }); | 2154 }); |
1758 }); | 2155 }); |
1759 | 2156 |
1760 | |
1761 unittest.group("obj-schema-Deployment", () { | 2157 unittest.group("obj-schema-Deployment", () { |
1762 unittest.test("to-json--from-json", () { | 2158 unittest.test("to-json--from-json", () { |
1763 var o = buildDeployment(); | 2159 var o = buildDeployment(); |
1764 var od = new api.Deployment.fromJson(o.toJson()); | 2160 var od = new api.Deployment.fromJson(o.toJson()); |
1765 checkDeployment(od); | 2161 checkDeployment(od); |
1766 }); | 2162 }); |
1767 }); | 2163 }); |
1768 | 2164 |
1769 | |
1770 unittest.group("obj-schema-DiskUtilization", () { | 2165 unittest.group("obj-schema-DiskUtilization", () { |
1771 unittest.test("to-json--from-json", () { | 2166 unittest.test("to-json--from-json", () { |
1772 var o = buildDiskUtilization(); | 2167 var o = buildDiskUtilization(); |
1773 var od = new api.DiskUtilization.fromJson(o.toJson()); | 2168 var od = new api.DiskUtilization.fromJson(o.toJson()); |
1774 checkDiskUtilization(od); | 2169 checkDiskUtilization(od); |
1775 }); | 2170 }); |
1776 }); | 2171 }); |
1777 | 2172 |
| 2173 unittest.group("obj-schema-DomainMapping", () { |
| 2174 unittest.test("to-json--from-json", () { |
| 2175 var o = buildDomainMapping(); |
| 2176 var od = new api.DomainMapping.fromJson(o.toJson()); |
| 2177 checkDomainMapping(od); |
| 2178 }); |
| 2179 }); |
| 2180 |
| 2181 unittest.group("obj-schema-Empty", () { |
| 2182 unittest.test("to-json--from-json", () { |
| 2183 var o = buildEmpty(); |
| 2184 var od = new api.Empty.fromJson(o.toJson()); |
| 2185 checkEmpty(od); |
| 2186 }); |
| 2187 }); |
1778 | 2188 |
1779 unittest.group("obj-schema-EndpointsApiService", () { | 2189 unittest.group("obj-schema-EndpointsApiService", () { |
1780 unittest.test("to-json--from-json", () { | 2190 unittest.test("to-json--from-json", () { |
1781 var o = buildEndpointsApiService(); | 2191 var o = buildEndpointsApiService(); |
1782 var od = new api.EndpointsApiService.fromJson(o.toJson()); | 2192 var od = new api.EndpointsApiService.fromJson(o.toJson()); |
1783 checkEndpointsApiService(od); | 2193 checkEndpointsApiService(od); |
1784 }); | 2194 }); |
1785 }); | 2195 }); |
1786 | 2196 |
1787 | |
1788 unittest.group("obj-schema-ErrorHandler", () { | 2197 unittest.group("obj-schema-ErrorHandler", () { |
1789 unittest.test("to-json--from-json", () { | 2198 unittest.test("to-json--from-json", () { |
1790 var o = buildErrorHandler(); | 2199 var o = buildErrorHandler(); |
1791 var od = new api.ErrorHandler.fromJson(o.toJson()); | 2200 var od = new api.ErrorHandler.fromJson(o.toJson()); |
1792 checkErrorHandler(od); | 2201 checkErrorHandler(od); |
1793 }); | 2202 }); |
1794 }); | 2203 }); |
1795 | 2204 |
| 2205 unittest.group("obj-schema-FeatureSettings", () { |
| 2206 unittest.test("to-json--from-json", () { |
| 2207 var o = buildFeatureSettings(); |
| 2208 var od = new api.FeatureSettings.fromJson(o.toJson()); |
| 2209 checkFeatureSettings(od); |
| 2210 }); |
| 2211 }); |
1796 | 2212 |
1797 unittest.group("obj-schema-FileInfo", () { | 2213 unittest.group("obj-schema-FileInfo", () { |
1798 unittest.test("to-json--from-json", () { | 2214 unittest.test("to-json--from-json", () { |
1799 var o = buildFileInfo(); | 2215 var o = buildFileInfo(); |
1800 var od = new api.FileInfo.fromJson(o.toJson()); | 2216 var od = new api.FileInfo.fromJson(o.toJson()); |
1801 checkFileInfo(od); | 2217 checkFileInfo(od); |
1802 }); | 2218 }); |
1803 }); | 2219 }); |
1804 | 2220 |
1805 | |
1806 unittest.group("obj-schema-HealthCheck", () { | 2221 unittest.group("obj-schema-HealthCheck", () { |
1807 unittest.test("to-json--from-json", () { | 2222 unittest.test("to-json--from-json", () { |
1808 var o = buildHealthCheck(); | 2223 var o = buildHealthCheck(); |
1809 var od = new api.HealthCheck.fromJson(o.toJson()); | 2224 var od = new api.HealthCheck.fromJson(o.toJson()); |
1810 checkHealthCheck(od); | 2225 checkHealthCheck(od); |
1811 }); | 2226 }); |
1812 }); | 2227 }); |
1813 | 2228 |
1814 | |
1815 unittest.group("obj-schema-IdentityAwareProxy", () { | 2229 unittest.group("obj-schema-IdentityAwareProxy", () { |
1816 unittest.test("to-json--from-json", () { | 2230 unittest.test("to-json--from-json", () { |
1817 var o = buildIdentityAwareProxy(); | 2231 var o = buildIdentityAwareProxy(); |
1818 var od = new api.IdentityAwareProxy.fromJson(o.toJson()); | 2232 var od = new api.IdentityAwareProxy.fromJson(o.toJson()); |
1819 checkIdentityAwareProxy(od); | 2233 checkIdentityAwareProxy(od); |
1820 }); | 2234 }); |
1821 }); | 2235 }); |
1822 | 2236 |
1823 | |
1824 unittest.group("obj-schema-Instance", () { | 2237 unittest.group("obj-schema-Instance", () { |
1825 unittest.test("to-json--from-json", () { | 2238 unittest.test("to-json--from-json", () { |
1826 var o = buildInstance(); | 2239 var o = buildInstance(); |
1827 var od = new api.Instance.fromJson(o.toJson()); | 2240 var od = new api.Instance.fromJson(o.toJson()); |
1828 checkInstance(od); | 2241 checkInstance(od); |
1829 }); | 2242 }); |
1830 }); | 2243 }); |
1831 | 2244 |
1832 | |
1833 unittest.group("obj-schema-Library", () { | 2245 unittest.group("obj-schema-Library", () { |
1834 unittest.test("to-json--from-json", () { | 2246 unittest.test("to-json--from-json", () { |
1835 var o = buildLibrary(); | 2247 var o = buildLibrary(); |
1836 var od = new api.Library.fromJson(o.toJson()); | 2248 var od = new api.Library.fromJson(o.toJson()); |
1837 checkLibrary(od); | 2249 checkLibrary(od); |
1838 }); | 2250 }); |
1839 }); | 2251 }); |
1840 | 2252 |
| 2253 unittest.group("obj-schema-ListAuthorizedCertificatesResponse", () { |
| 2254 unittest.test("to-json--from-json", () { |
| 2255 var o = buildListAuthorizedCertificatesResponse(); |
| 2256 var od = new api.ListAuthorizedCertificatesResponse.fromJson(o.toJson()); |
| 2257 checkListAuthorizedCertificatesResponse(od); |
| 2258 }); |
| 2259 }); |
| 2260 |
| 2261 unittest.group("obj-schema-ListAuthorizedDomainsResponse", () { |
| 2262 unittest.test("to-json--from-json", () { |
| 2263 var o = buildListAuthorizedDomainsResponse(); |
| 2264 var od = new api.ListAuthorizedDomainsResponse.fromJson(o.toJson()); |
| 2265 checkListAuthorizedDomainsResponse(od); |
| 2266 }); |
| 2267 }); |
| 2268 |
| 2269 unittest.group("obj-schema-ListDomainMappingsResponse", () { |
| 2270 unittest.test("to-json--from-json", () { |
| 2271 var o = buildListDomainMappingsResponse(); |
| 2272 var od = new api.ListDomainMappingsResponse.fromJson(o.toJson()); |
| 2273 checkListDomainMappingsResponse(od); |
| 2274 }); |
| 2275 }); |
1841 | 2276 |
1842 unittest.group("obj-schema-ListInstancesResponse", () { | 2277 unittest.group("obj-schema-ListInstancesResponse", () { |
1843 unittest.test("to-json--from-json", () { | 2278 unittest.test("to-json--from-json", () { |
1844 var o = buildListInstancesResponse(); | 2279 var o = buildListInstancesResponse(); |
1845 var od = new api.ListInstancesResponse.fromJson(o.toJson()); | 2280 var od = new api.ListInstancesResponse.fromJson(o.toJson()); |
1846 checkListInstancesResponse(od); | 2281 checkListInstancesResponse(od); |
1847 }); | 2282 }); |
1848 }); | 2283 }); |
1849 | 2284 |
1850 | |
1851 unittest.group("obj-schema-ListLocationsResponse", () { | 2285 unittest.group("obj-schema-ListLocationsResponse", () { |
1852 unittest.test("to-json--from-json", () { | 2286 unittest.test("to-json--from-json", () { |
1853 var o = buildListLocationsResponse(); | 2287 var o = buildListLocationsResponse(); |
1854 var od = new api.ListLocationsResponse.fromJson(o.toJson()); | 2288 var od = new api.ListLocationsResponse.fromJson(o.toJson()); |
1855 checkListLocationsResponse(od); | 2289 checkListLocationsResponse(od); |
1856 }); | 2290 }); |
1857 }); | 2291 }); |
1858 | 2292 |
1859 | |
1860 unittest.group("obj-schema-ListOperationsResponse", () { | 2293 unittest.group("obj-schema-ListOperationsResponse", () { |
1861 unittest.test("to-json--from-json", () { | 2294 unittest.test("to-json--from-json", () { |
1862 var o = buildListOperationsResponse(); | 2295 var o = buildListOperationsResponse(); |
1863 var od = new api.ListOperationsResponse.fromJson(o.toJson()); | 2296 var od = new api.ListOperationsResponse.fromJson(o.toJson()); |
1864 checkListOperationsResponse(od); | 2297 checkListOperationsResponse(od); |
1865 }); | 2298 }); |
1866 }); | 2299 }); |
1867 | 2300 |
1868 | |
1869 unittest.group("obj-schema-ListServicesResponse", () { | 2301 unittest.group("obj-schema-ListServicesResponse", () { |
1870 unittest.test("to-json--from-json", () { | 2302 unittest.test("to-json--from-json", () { |
1871 var o = buildListServicesResponse(); | 2303 var o = buildListServicesResponse(); |
1872 var od = new api.ListServicesResponse.fromJson(o.toJson()); | 2304 var od = new api.ListServicesResponse.fromJson(o.toJson()); |
1873 checkListServicesResponse(od); | 2305 checkListServicesResponse(od); |
1874 }); | 2306 }); |
1875 }); | 2307 }); |
1876 | 2308 |
1877 | |
1878 unittest.group("obj-schema-ListVersionsResponse", () { | 2309 unittest.group("obj-schema-ListVersionsResponse", () { |
1879 unittest.test("to-json--from-json", () { | 2310 unittest.test("to-json--from-json", () { |
1880 var o = buildListVersionsResponse(); | 2311 var o = buildListVersionsResponse(); |
1881 var od = new api.ListVersionsResponse.fromJson(o.toJson()); | 2312 var od = new api.ListVersionsResponse.fromJson(o.toJson()); |
1882 checkListVersionsResponse(od); | 2313 checkListVersionsResponse(od); |
1883 }); | 2314 }); |
1884 }); | 2315 }); |
1885 | 2316 |
1886 | |
1887 unittest.group("obj-schema-LivenessCheck", () { | 2317 unittest.group("obj-schema-LivenessCheck", () { |
1888 unittest.test("to-json--from-json", () { | 2318 unittest.test("to-json--from-json", () { |
1889 var o = buildLivenessCheck(); | 2319 var o = buildLivenessCheck(); |
1890 var od = new api.LivenessCheck.fromJson(o.toJson()); | 2320 var od = new api.LivenessCheck.fromJson(o.toJson()); |
1891 checkLivenessCheck(od); | 2321 checkLivenessCheck(od); |
1892 }); | 2322 }); |
1893 }); | 2323 }); |
1894 | 2324 |
1895 | |
1896 unittest.group("obj-schema-Location", () { | 2325 unittest.group("obj-schema-Location", () { |
1897 unittest.test("to-json--from-json", () { | 2326 unittest.test("to-json--from-json", () { |
1898 var o = buildLocation(); | 2327 var o = buildLocation(); |
1899 var od = new api.Location.fromJson(o.toJson()); | 2328 var od = new api.Location.fromJson(o.toJson()); |
1900 checkLocation(od); | 2329 checkLocation(od); |
1901 }); | 2330 }); |
1902 }); | 2331 }); |
1903 | 2332 |
1904 | |
1905 unittest.group("obj-schema-LocationMetadata", () { | 2333 unittest.group("obj-schema-LocationMetadata", () { |
1906 unittest.test("to-json--from-json", () { | 2334 unittest.test("to-json--from-json", () { |
1907 var o = buildLocationMetadata(); | 2335 var o = buildLocationMetadata(); |
1908 var od = new api.LocationMetadata.fromJson(o.toJson()); | 2336 var od = new api.LocationMetadata.fromJson(o.toJson()); |
1909 checkLocationMetadata(od); | 2337 checkLocationMetadata(od); |
1910 }); | 2338 }); |
1911 }); | 2339 }); |
1912 | 2340 |
1913 | |
1914 unittest.group("obj-schema-ManualScaling", () { | 2341 unittest.group("obj-schema-ManualScaling", () { |
1915 unittest.test("to-json--from-json", () { | 2342 unittest.test("to-json--from-json", () { |
1916 var o = buildManualScaling(); | 2343 var o = buildManualScaling(); |
1917 var od = new api.ManualScaling.fromJson(o.toJson()); | 2344 var od = new api.ManualScaling.fromJson(o.toJson()); |
1918 checkManualScaling(od); | 2345 checkManualScaling(od); |
1919 }); | 2346 }); |
1920 }); | 2347 }); |
1921 | 2348 |
1922 | |
1923 unittest.group("obj-schema-Network", () { | 2349 unittest.group("obj-schema-Network", () { |
1924 unittest.test("to-json--from-json", () { | 2350 unittest.test("to-json--from-json", () { |
1925 var o = buildNetwork(); | 2351 var o = buildNetwork(); |
1926 var od = new api.Network.fromJson(o.toJson()); | 2352 var od = new api.Network.fromJson(o.toJson()); |
1927 checkNetwork(od); | 2353 checkNetwork(od); |
1928 }); | 2354 }); |
1929 }); | 2355 }); |
1930 | 2356 |
1931 | |
1932 unittest.group("obj-schema-NetworkUtilization", () { | 2357 unittest.group("obj-schema-NetworkUtilization", () { |
1933 unittest.test("to-json--from-json", () { | 2358 unittest.test("to-json--from-json", () { |
1934 var o = buildNetworkUtilization(); | 2359 var o = buildNetworkUtilization(); |
1935 var od = new api.NetworkUtilization.fromJson(o.toJson()); | 2360 var od = new api.NetworkUtilization.fromJson(o.toJson()); |
1936 checkNetworkUtilization(od); | 2361 checkNetworkUtilization(od); |
1937 }); | 2362 }); |
1938 }); | 2363 }); |
1939 | 2364 |
1940 | |
1941 unittest.group("obj-schema-Operation", () { | 2365 unittest.group("obj-schema-Operation", () { |
1942 unittest.test("to-json--from-json", () { | 2366 unittest.test("to-json--from-json", () { |
1943 var o = buildOperation(); | 2367 var o = buildOperation(); |
1944 var od = new api.Operation.fromJson(o.toJson()); | 2368 var od = new api.Operation.fromJson(o.toJson()); |
1945 checkOperation(od); | 2369 checkOperation(od); |
1946 }); | 2370 }); |
1947 }); | 2371 }); |
1948 | 2372 |
1949 | |
1950 unittest.group("obj-schema-OperationMetadata", () { | 2373 unittest.group("obj-schema-OperationMetadata", () { |
1951 unittest.test("to-json--from-json", () { | 2374 unittest.test("to-json--from-json", () { |
1952 var o = buildOperationMetadata(); | 2375 var o = buildOperationMetadata(); |
1953 var od = new api.OperationMetadata.fromJson(o.toJson()); | 2376 var od = new api.OperationMetadata.fromJson(o.toJson()); |
1954 checkOperationMetadata(od); | 2377 checkOperationMetadata(od); |
1955 }); | 2378 }); |
1956 }); | 2379 }); |
1957 | 2380 |
1958 | |
1959 unittest.group("obj-schema-OperationMetadataExperimental", () { | 2381 unittest.group("obj-schema-OperationMetadataExperimental", () { |
1960 unittest.test("to-json--from-json", () { | 2382 unittest.test("to-json--from-json", () { |
1961 var o = buildOperationMetadataExperimental(); | 2383 var o = buildOperationMetadataExperimental(); |
1962 var od = new api.OperationMetadataExperimental.fromJson(o.toJson()); | 2384 var od = new api.OperationMetadataExperimental.fromJson(o.toJson()); |
1963 checkOperationMetadataExperimental(od); | 2385 checkOperationMetadataExperimental(od); |
1964 }); | 2386 }); |
1965 }); | 2387 }); |
1966 | 2388 |
1967 | |
1968 unittest.group("obj-schema-OperationMetadataV1", () { | 2389 unittest.group("obj-schema-OperationMetadataV1", () { |
1969 unittest.test("to-json--from-json", () { | 2390 unittest.test("to-json--from-json", () { |
1970 var o = buildOperationMetadataV1(); | 2391 var o = buildOperationMetadataV1(); |
1971 var od = new api.OperationMetadataV1.fromJson(o.toJson()); | 2392 var od = new api.OperationMetadataV1.fromJson(o.toJson()); |
1972 checkOperationMetadataV1(od); | 2393 checkOperationMetadataV1(od); |
1973 }); | 2394 }); |
1974 }); | 2395 }); |
1975 | 2396 |
1976 | |
1977 unittest.group("obj-schema-OperationMetadataV1Alpha", () { | 2397 unittest.group("obj-schema-OperationMetadataV1Alpha", () { |
1978 unittest.test("to-json--from-json", () { | 2398 unittest.test("to-json--from-json", () { |
1979 var o = buildOperationMetadataV1Alpha(); | 2399 var o = buildOperationMetadataV1Alpha(); |
1980 var od = new api.OperationMetadataV1Alpha.fromJson(o.toJson()); | 2400 var od = new api.OperationMetadataV1Alpha.fromJson(o.toJson()); |
1981 checkOperationMetadataV1Alpha(od); | 2401 checkOperationMetadataV1Alpha(od); |
1982 }); | 2402 }); |
1983 }); | 2403 }); |
1984 | 2404 |
1985 | |
1986 unittest.group("obj-schema-OperationMetadataV1Beta", () { | 2405 unittest.group("obj-schema-OperationMetadataV1Beta", () { |
1987 unittest.test("to-json--from-json", () { | 2406 unittest.test("to-json--from-json", () { |
1988 var o = buildOperationMetadataV1Beta(); | 2407 var o = buildOperationMetadataV1Beta(); |
1989 var od = new api.OperationMetadataV1Beta.fromJson(o.toJson()); | 2408 var od = new api.OperationMetadataV1Beta.fromJson(o.toJson()); |
1990 checkOperationMetadataV1Beta(od); | 2409 checkOperationMetadataV1Beta(od); |
1991 }); | 2410 }); |
1992 }); | 2411 }); |
1993 | 2412 |
1994 | |
1995 unittest.group("obj-schema-OperationMetadataV1Beta5", () { | 2413 unittest.group("obj-schema-OperationMetadataV1Beta5", () { |
1996 unittest.test("to-json--from-json", () { | 2414 unittest.test("to-json--from-json", () { |
1997 var o = buildOperationMetadataV1Beta5(); | 2415 var o = buildOperationMetadataV1Beta5(); |
1998 var od = new api.OperationMetadataV1Beta5.fromJson(o.toJson()); | 2416 var od = new api.OperationMetadataV1Beta5.fromJson(o.toJson()); |
1999 checkOperationMetadataV1Beta5(od); | 2417 checkOperationMetadataV1Beta5(od); |
2000 }); | 2418 }); |
2001 }); | 2419 }); |
2002 | 2420 |
2003 | |
2004 unittest.group("obj-schema-ReadinessCheck", () { | 2421 unittest.group("obj-schema-ReadinessCheck", () { |
2005 unittest.test("to-json--from-json", () { | 2422 unittest.test("to-json--from-json", () { |
2006 var o = buildReadinessCheck(); | 2423 var o = buildReadinessCheck(); |
2007 var od = new api.ReadinessCheck.fromJson(o.toJson()); | 2424 var od = new api.ReadinessCheck.fromJson(o.toJson()); |
2008 checkReadinessCheck(od); | 2425 checkReadinessCheck(od); |
2009 }); | 2426 }); |
2010 }); | 2427 }); |
2011 | 2428 |
2012 | |
2013 unittest.group("obj-schema-RepairApplicationRequest", () { | 2429 unittest.group("obj-schema-RepairApplicationRequest", () { |
2014 unittest.test("to-json--from-json", () { | 2430 unittest.test("to-json--from-json", () { |
2015 var o = buildRepairApplicationRequest(); | 2431 var o = buildRepairApplicationRequest(); |
2016 var od = new api.RepairApplicationRequest.fromJson(o.toJson()); | 2432 var od = new api.RepairApplicationRequest.fromJson(o.toJson()); |
2017 checkRepairApplicationRequest(od); | 2433 checkRepairApplicationRequest(od); |
2018 }); | 2434 }); |
2019 }); | 2435 }); |
2020 | 2436 |
2021 | |
2022 unittest.group("obj-schema-RequestUtilization", () { | 2437 unittest.group("obj-schema-RequestUtilization", () { |
2023 unittest.test("to-json--from-json", () { | 2438 unittest.test("to-json--from-json", () { |
2024 var o = buildRequestUtilization(); | 2439 var o = buildRequestUtilization(); |
2025 var od = new api.RequestUtilization.fromJson(o.toJson()); | 2440 var od = new api.RequestUtilization.fromJson(o.toJson()); |
2026 checkRequestUtilization(od); | 2441 checkRequestUtilization(od); |
2027 }); | 2442 }); |
2028 }); | 2443 }); |
2029 | 2444 |
| 2445 unittest.group("obj-schema-ResourceRecord", () { |
| 2446 unittest.test("to-json--from-json", () { |
| 2447 var o = buildResourceRecord(); |
| 2448 var od = new api.ResourceRecord.fromJson(o.toJson()); |
| 2449 checkResourceRecord(od); |
| 2450 }); |
| 2451 }); |
2030 | 2452 |
2031 unittest.group("obj-schema-Resources", () { | 2453 unittest.group("obj-schema-Resources", () { |
2032 unittest.test("to-json--from-json", () { | 2454 unittest.test("to-json--from-json", () { |
2033 var o = buildResources(); | 2455 var o = buildResources(); |
2034 var od = new api.Resources.fromJson(o.toJson()); | 2456 var od = new api.Resources.fromJson(o.toJson()); |
2035 checkResources(od); | 2457 checkResources(od); |
2036 }); | 2458 }); |
2037 }); | 2459 }); |
2038 | 2460 |
2039 | |
2040 unittest.group("obj-schema-ScriptHandler", () { | 2461 unittest.group("obj-schema-ScriptHandler", () { |
2041 unittest.test("to-json--from-json", () { | 2462 unittest.test("to-json--from-json", () { |
2042 var o = buildScriptHandler(); | 2463 var o = buildScriptHandler(); |
2043 var od = new api.ScriptHandler.fromJson(o.toJson()); | 2464 var od = new api.ScriptHandler.fromJson(o.toJson()); |
2044 checkScriptHandler(od); | 2465 checkScriptHandler(od); |
2045 }); | 2466 }); |
2046 }); | 2467 }); |
2047 | 2468 |
2048 | |
2049 unittest.group("obj-schema-Service", () { | 2469 unittest.group("obj-schema-Service", () { |
2050 unittest.test("to-json--from-json", () { | 2470 unittest.test("to-json--from-json", () { |
2051 var o = buildService(); | 2471 var o = buildService(); |
2052 var od = new api.Service.fromJson(o.toJson()); | 2472 var od = new api.Service.fromJson(o.toJson()); |
2053 checkService(od); | 2473 checkService(od); |
2054 }); | 2474 }); |
2055 }); | 2475 }); |
2056 | 2476 |
| 2477 unittest.group("obj-schema-SslSettings", () { |
| 2478 unittest.test("to-json--from-json", () { |
| 2479 var o = buildSslSettings(); |
| 2480 var od = new api.SslSettings.fromJson(o.toJson()); |
| 2481 checkSslSettings(od); |
| 2482 }); |
| 2483 }); |
2057 | 2484 |
2058 unittest.group("obj-schema-StaticFilesHandler", () { | 2485 unittest.group("obj-schema-StaticFilesHandler", () { |
2059 unittest.test("to-json--from-json", () { | 2486 unittest.test("to-json--from-json", () { |
2060 var o = buildStaticFilesHandler(); | 2487 var o = buildStaticFilesHandler(); |
2061 var od = new api.StaticFilesHandler.fromJson(o.toJson()); | 2488 var od = new api.StaticFilesHandler.fromJson(o.toJson()); |
2062 checkStaticFilesHandler(od); | 2489 checkStaticFilesHandler(od); |
2063 }); | 2490 }); |
2064 }); | 2491 }); |
2065 | 2492 |
2066 | |
2067 unittest.group("obj-schema-Status", () { | 2493 unittest.group("obj-schema-Status", () { |
2068 unittest.test("to-json--from-json", () { | 2494 unittest.test("to-json--from-json", () { |
2069 var o = buildStatus(); | 2495 var o = buildStatus(); |
2070 var od = new api.Status.fromJson(o.toJson()); | 2496 var od = new api.Status.fromJson(o.toJson()); |
2071 checkStatus(od); | 2497 checkStatus(od); |
2072 }); | 2498 }); |
2073 }); | 2499 }); |
2074 | 2500 |
2075 | |
2076 unittest.group("obj-schema-TrafficSplit", () { | 2501 unittest.group("obj-schema-TrafficSplit", () { |
2077 unittest.test("to-json--from-json", () { | 2502 unittest.test("to-json--from-json", () { |
2078 var o = buildTrafficSplit(); | 2503 var o = buildTrafficSplit(); |
2079 var od = new api.TrafficSplit.fromJson(o.toJson()); | 2504 var od = new api.TrafficSplit.fromJson(o.toJson()); |
2080 checkTrafficSplit(od); | 2505 checkTrafficSplit(od); |
2081 }); | 2506 }); |
2082 }); | 2507 }); |
2083 | 2508 |
2084 | |
2085 unittest.group("obj-schema-UrlDispatchRule", () { | 2509 unittest.group("obj-schema-UrlDispatchRule", () { |
2086 unittest.test("to-json--from-json", () { | 2510 unittest.test("to-json--from-json", () { |
2087 var o = buildUrlDispatchRule(); | 2511 var o = buildUrlDispatchRule(); |
2088 var od = new api.UrlDispatchRule.fromJson(o.toJson()); | 2512 var od = new api.UrlDispatchRule.fromJson(o.toJson()); |
2089 checkUrlDispatchRule(od); | 2513 checkUrlDispatchRule(od); |
2090 }); | 2514 }); |
2091 }); | 2515 }); |
2092 | 2516 |
2093 | |
2094 unittest.group("obj-schema-UrlMap", () { | 2517 unittest.group("obj-schema-UrlMap", () { |
2095 unittest.test("to-json--from-json", () { | 2518 unittest.test("to-json--from-json", () { |
2096 var o = buildUrlMap(); | 2519 var o = buildUrlMap(); |
2097 var od = new api.UrlMap.fromJson(o.toJson()); | 2520 var od = new api.UrlMap.fromJson(o.toJson()); |
2098 checkUrlMap(od); | 2521 checkUrlMap(od); |
2099 }); | 2522 }); |
2100 }); | 2523 }); |
2101 | 2524 |
2102 | |
2103 unittest.group("obj-schema-Version", () { | 2525 unittest.group("obj-schema-Version", () { |
2104 unittest.test("to-json--from-json", () { | 2526 unittest.test("to-json--from-json", () { |
2105 var o = buildVersion(); | 2527 var o = buildVersion(); |
2106 var od = new api.Version.fromJson(o.toJson()); | 2528 var od = new api.Version.fromJson(o.toJson()); |
2107 checkVersion(od); | 2529 checkVersion(od); |
2108 }); | 2530 }); |
2109 }); | 2531 }); |
2110 | 2532 |
2111 | |
2112 unittest.group("obj-schema-Volume", () { | 2533 unittest.group("obj-schema-Volume", () { |
2113 unittest.test("to-json--from-json", () { | 2534 unittest.test("to-json--from-json", () { |
2114 var o = buildVolume(); | 2535 var o = buildVolume(); |
2115 var od = new api.Volume.fromJson(o.toJson()); | 2536 var od = new api.Volume.fromJson(o.toJson()); |
2116 checkVolume(od); | 2537 checkVolume(od); |
2117 }); | 2538 }); |
2118 }); | 2539 }); |
2119 | 2540 |
2120 | |
2121 unittest.group("obj-schema-ZipInfo", () { | 2541 unittest.group("obj-schema-ZipInfo", () { |
2122 unittest.test("to-json--from-json", () { | 2542 unittest.test("to-json--from-json", () { |
2123 var o = buildZipInfo(); | 2543 var o = buildZipInfo(); |
2124 var od = new api.ZipInfo.fromJson(o.toJson()); | 2544 var od = new api.ZipInfo.fromJson(o.toJson()); |
2125 checkZipInfo(od); | 2545 checkZipInfo(od); |
2126 }); | 2546 }); |
2127 }); | 2547 }); |
2128 | 2548 |
2129 | |
2130 unittest.group("resource-AppsResourceApi", () { | 2549 unittest.group("resource-AppsResourceApi", () { |
2131 unittest.test("method--create", () { | 2550 unittest.test("method--create", () { |
2132 | |
2133 var mock = new HttpServerMock(); | 2551 var mock = new HttpServerMock(); |
2134 api.AppsResourceApi res = new api.AppengineApi(mock).apps; | 2552 api.AppsResourceApi res = new api.AppengineApi(mock).apps; |
2135 var arg_request = buildApplication(); | 2553 var arg_request = buildApplication(); |
2136 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 2554 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
2137 var obj = new api.Application.fromJson(json); | 2555 var obj = new api.Application.fromJson(json); |
2138 checkApplication(obj); | 2556 checkApplication(obj); |
2139 | 2557 |
2140 var path = (req.url).path; | 2558 var path = (req.url).path; |
2141 var pathOffset = 0; | 2559 var pathOffset = 0; |
2142 var index; | 2560 var index; |
2143 var subPart; | 2561 var subPart; |
2144 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2562 unittest.expect( |
2145 pathOffset += 1; | 2563 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
2146 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ
als("v1/apps")); | 2564 pathOffset += 1; |
| 2565 unittest.expect(path.substring(pathOffset, pathOffset + 7), |
| 2566 unittest.equals("v1/apps")); |
2147 pathOffset += 7; | 2567 pathOffset += 7; |
2148 | 2568 |
2149 var query = (req.url).query; | 2569 var query = (req.url).query; |
2150 var queryOffset = 0; | 2570 var queryOffset = 0; |
| 2571 var queryMap = {}; |
| 2572 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 2573 parseBool(n) { |
| 2574 if (n == "true") return true; |
| 2575 if (n == "false") return false; |
| 2576 if (n == null) return null; |
| 2577 throw new core.ArgumentError("Invalid boolean: $n"); |
| 2578 } |
| 2579 |
| 2580 if (query.length > 0) { |
| 2581 for (var part in query.split("&")) { |
| 2582 var keyvalue = part.split("="); |
| 2583 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 2584 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 2585 } |
| 2586 } |
| 2587 |
| 2588 var h = { |
| 2589 "content-type": "application/json; charset=utf-8", |
| 2590 }; |
| 2591 var resp = convert.JSON.encode(buildOperation()); |
| 2592 return new async.Future.value(stringResponse(200, h, resp)); |
| 2593 }), true); |
| 2594 res |
| 2595 .create(arg_request) |
| 2596 .then(unittest.expectAsync1(((api.Operation response) { |
| 2597 checkOperation(response); |
| 2598 }))); |
| 2599 }); |
| 2600 |
| 2601 unittest.test("method--get", () { |
| 2602 var mock = new HttpServerMock(); |
| 2603 api.AppsResourceApi res = new api.AppengineApi(mock).apps; |
| 2604 var arg_appsId = "foo"; |
| 2605 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 2606 var path = (req.url).path; |
| 2607 var pathOffset = 0; |
| 2608 var index; |
| 2609 var subPart; |
| 2610 unittest.expect( |
| 2611 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 2612 pathOffset += 1; |
| 2613 unittest.expect(path.substring(pathOffset, pathOffset + 8), |
| 2614 unittest.equals("v1/apps/")); |
| 2615 pathOffset += 8; |
| 2616 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| 2617 pathOffset = path.length; |
| 2618 unittest.expect(subPart, unittest.equals("$arg_appsId")); |
| 2619 |
| 2620 var query = (req.url).query; |
| 2621 var queryOffset = 0; |
| 2622 var queryMap = {}; |
| 2623 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 2624 parseBool(n) { |
| 2625 if (n == "true") return true; |
| 2626 if (n == "false") return false; |
| 2627 if (n == null) return null; |
| 2628 throw new core.ArgumentError("Invalid boolean: $n"); |
| 2629 } |
| 2630 |
| 2631 if (query.length > 0) { |
| 2632 for (var part in query.split("&")) { |
| 2633 var keyvalue = part.split("="); |
| 2634 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 2635 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 2636 } |
| 2637 } |
| 2638 |
| 2639 var h = { |
| 2640 "content-type": "application/json; charset=utf-8", |
| 2641 }; |
| 2642 var resp = convert.JSON.encode(buildApplication()); |
| 2643 return new async.Future.value(stringResponse(200, h, resp)); |
| 2644 }), true); |
| 2645 res |
| 2646 .get(arg_appsId) |
| 2647 .then(unittest.expectAsync1(((api.Application response) { |
| 2648 checkApplication(response); |
| 2649 }))); |
| 2650 }); |
| 2651 |
| 2652 unittest.test("method--patch", () { |
| 2653 var mock = new HttpServerMock(); |
| 2654 api.AppsResourceApi res = new api.AppengineApi(mock).apps; |
| 2655 var arg_request = buildApplication(); |
| 2656 var arg_appsId = "foo"; |
| 2657 var arg_updateMask = "foo"; |
| 2658 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 2659 var obj = new api.Application.fromJson(json); |
| 2660 checkApplication(obj); |
| 2661 |
| 2662 var path = (req.url).path; |
| 2663 var pathOffset = 0; |
| 2664 var index; |
| 2665 var subPart; |
| 2666 unittest.expect( |
| 2667 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 2668 pathOffset += 1; |
| 2669 unittest.expect(path.substring(pathOffset, pathOffset + 8), |
| 2670 unittest.equals("v1/apps/")); |
| 2671 pathOffset += 8; |
| 2672 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| 2673 pathOffset = path.length; |
| 2674 unittest.expect(subPart, unittest.equals("$arg_appsId")); |
| 2675 |
| 2676 var query = (req.url).query; |
| 2677 var queryOffset = 0; |
| 2678 var queryMap = {}; |
| 2679 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 2680 parseBool(n) { |
| 2681 if (n == "true") return true; |
| 2682 if (n == "false") return false; |
| 2683 if (n == null) return null; |
| 2684 throw new core.ArgumentError("Invalid boolean: $n"); |
| 2685 } |
| 2686 |
| 2687 if (query.length > 0) { |
| 2688 for (var part in query.split("&")) { |
| 2689 var keyvalue = part.split("="); |
| 2690 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 2691 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 2692 } |
| 2693 } |
| 2694 unittest.expect( |
| 2695 queryMap["updateMask"].first, unittest.equals(arg_updateMask)); |
| 2696 |
| 2697 var h = { |
| 2698 "content-type": "application/json; charset=utf-8", |
| 2699 }; |
| 2700 var resp = convert.JSON.encode(buildOperation()); |
| 2701 return new async.Future.value(stringResponse(200, h, resp)); |
| 2702 }), true); |
| 2703 res |
| 2704 .patch(arg_request, arg_appsId, updateMask: arg_updateMask) |
| 2705 .then(unittest.expectAsync1(((api.Operation response) { |
| 2706 checkOperation(response); |
| 2707 }))); |
| 2708 }); |
| 2709 |
| 2710 unittest.test("method--repair", () { |
| 2711 var mock = new HttpServerMock(); |
| 2712 api.AppsResourceApi res = new api.AppengineApi(mock).apps; |
| 2713 var arg_request = buildRepairApplicationRequest(); |
| 2714 var arg_appsId = "foo"; |
| 2715 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 2716 var obj = new api.RepairApplicationRequest.fromJson(json); |
| 2717 checkRepairApplicationRequest(obj); |
| 2718 |
| 2719 var path = (req.url).path; |
| 2720 var pathOffset = 0; |
| 2721 var index; |
| 2722 var subPart; |
| 2723 unittest.expect( |
| 2724 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 2725 pathOffset += 1; |
| 2726 unittest.expect(path.substring(pathOffset, pathOffset + 8), |
| 2727 unittest.equals("v1/apps/")); |
| 2728 pathOffset += 8; |
| 2729 index = path.indexOf(":repair", pathOffset); |
| 2730 unittest.expect(index >= 0, unittest.isTrue); |
| 2731 subPart = |
| 2732 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 2733 pathOffset = index; |
| 2734 unittest.expect(subPart, unittest.equals("$arg_appsId")); |
| 2735 unittest.expect(path.substring(pathOffset, pathOffset + 7), |
| 2736 unittest.equals(":repair")); |
| 2737 pathOffset += 7; |
| 2738 |
| 2739 var query = (req.url).query; |
| 2740 var queryOffset = 0; |
| 2741 var queryMap = {}; |
| 2742 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 2743 parseBool(n) { |
| 2744 if (n == "true") return true; |
| 2745 if (n == "false") return false; |
| 2746 if (n == null) return null; |
| 2747 throw new core.ArgumentError("Invalid boolean: $n"); |
| 2748 } |
| 2749 |
| 2750 if (query.length > 0) { |
| 2751 for (var part in query.split("&")) { |
| 2752 var keyvalue = part.split("="); |
| 2753 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 2754 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 2755 } |
| 2756 } |
| 2757 |
| 2758 var h = { |
| 2759 "content-type": "application/json; charset=utf-8", |
| 2760 }; |
| 2761 var resp = convert.JSON.encode(buildOperation()); |
| 2762 return new async.Future.value(stringResponse(200, h, resp)); |
| 2763 }), true); |
| 2764 res |
| 2765 .repair(arg_request, arg_appsId) |
| 2766 .then(unittest.expectAsync1(((api.Operation response) { |
| 2767 checkOperation(response); |
| 2768 }))); |
| 2769 }); |
| 2770 }); |
| 2771 |
| 2772 unittest.group("resource-AppsAuthorizedCertificatesResourceApi", () { |
| 2773 unittest.test("method--create", () { |
| 2774 var mock = new HttpServerMock(); |
| 2775 api.AppsAuthorizedCertificatesResourceApi res = |
| 2776 new api.AppengineApi(mock).apps.authorizedCertificates; |
| 2777 var arg_request = buildAuthorizedCertificate(); |
| 2778 var arg_appsId = "foo"; |
| 2779 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 2780 var obj = new api.AuthorizedCertificate.fromJson(json); |
| 2781 checkAuthorizedCertificate(obj); |
| 2782 |
| 2783 var path = (req.url).path; |
| 2784 var pathOffset = 0; |
| 2785 var index; |
| 2786 var subPart; |
| 2787 unittest.expect( |
| 2788 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 2789 pathOffset += 1; |
| 2790 unittest.expect(path.substring(pathOffset, pathOffset + 8), |
| 2791 unittest.equals("v1/apps/")); |
| 2792 pathOffset += 8; |
| 2793 index = path.indexOf("/authorizedCertificates", pathOffset); |
| 2794 unittest.expect(index >= 0, unittest.isTrue); |
| 2795 subPart = |
| 2796 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 2797 pathOffset = index; |
| 2798 unittest.expect(subPart, unittest.equals("$arg_appsId")); |
| 2799 unittest.expect(path.substring(pathOffset, pathOffset + 23), |
| 2800 unittest.equals("/authorizedCertificates")); |
| 2801 pathOffset += 23; |
| 2802 |
| 2803 var query = (req.url).query; |
| 2804 var queryOffset = 0; |
| 2805 var queryMap = {}; |
| 2806 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 2807 parseBool(n) { |
| 2808 if (n == "true") return true; |
| 2809 if (n == "false") return false; |
| 2810 if (n == null) return null; |
| 2811 throw new core.ArgumentError("Invalid boolean: $n"); |
| 2812 } |
| 2813 |
| 2814 if (query.length > 0) { |
| 2815 for (var part in query.split("&")) { |
| 2816 var keyvalue = part.split("="); |
| 2817 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 2818 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 2819 } |
| 2820 } |
| 2821 |
| 2822 var h = { |
| 2823 "content-type": "application/json; charset=utf-8", |
| 2824 }; |
| 2825 var resp = convert.JSON.encode(buildAuthorizedCertificate()); |
| 2826 return new async.Future.value(stringResponse(200, h, resp)); |
| 2827 }), true); |
| 2828 res |
| 2829 .create(arg_request, arg_appsId) |
| 2830 .then(unittest.expectAsync1(((api.AuthorizedCertificate response) { |
| 2831 checkAuthorizedCertificate(response); |
| 2832 }))); |
| 2833 }); |
| 2834 |
| 2835 unittest.test("method--delete", () { |
| 2836 var mock = new HttpServerMock(); |
| 2837 api.AppsAuthorizedCertificatesResourceApi res = |
| 2838 new api.AppengineApi(mock).apps.authorizedCertificates; |
| 2839 var arg_appsId = "foo"; |
| 2840 var arg_authorizedCertificatesId = "foo"; |
| 2841 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 2842 var path = (req.url).path; |
| 2843 var pathOffset = 0; |
| 2844 var index; |
| 2845 var subPart; |
| 2846 unittest.expect( |
| 2847 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 2848 pathOffset += 1; |
| 2849 unittest.expect(path.substring(pathOffset, pathOffset + 8), |
| 2850 unittest.equals("v1/apps/")); |
| 2851 pathOffset += 8; |
| 2852 index = path.indexOf("/authorizedCertificates/", pathOffset); |
| 2853 unittest.expect(index >= 0, unittest.isTrue); |
| 2854 subPart = |
| 2855 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 2856 pathOffset = index; |
| 2857 unittest.expect(subPart, unittest.equals("$arg_appsId")); |
| 2858 unittest.expect(path.substring(pathOffset, pathOffset + 24), |
| 2859 unittest.equals("/authorizedCertificates/")); |
| 2860 pathOffset += 24; |
| 2861 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| 2862 pathOffset = path.length; |
| 2863 unittest.expect( |
| 2864 subPart, unittest.equals("$arg_authorizedCertificatesId")); |
| 2865 |
| 2866 var query = (req.url).query; |
| 2867 var queryOffset = 0; |
| 2868 var queryMap = {}; |
| 2869 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 2870 parseBool(n) { |
| 2871 if (n == "true") return true; |
| 2872 if (n == "false") return false; |
| 2873 if (n == null) return null; |
| 2874 throw new core.ArgumentError("Invalid boolean: $n"); |
| 2875 } |
| 2876 |
| 2877 if (query.length > 0) { |
| 2878 for (var part in query.split("&")) { |
| 2879 var keyvalue = part.split("="); |
| 2880 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 2881 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 2882 } |
| 2883 } |
| 2884 |
| 2885 var h = { |
| 2886 "content-type": "application/json; charset=utf-8", |
| 2887 }; |
| 2888 var resp = convert.JSON.encode(buildEmpty()); |
| 2889 return new async.Future.value(stringResponse(200, h, resp)); |
| 2890 }), true); |
| 2891 res |
| 2892 .delete(arg_appsId, arg_authorizedCertificatesId) |
| 2893 .then(unittest.expectAsync1(((api.Empty response) { |
| 2894 checkEmpty(response); |
| 2895 }))); |
| 2896 }); |
| 2897 |
| 2898 unittest.test("method--get", () { |
| 2899 var mock = new HttpServerMock(); |
| 2900 api.AppsAuthorizedCertificatesResourceApi res = |
| 2901 new api.AppengineApi(mock).apps.authorizedCertificates; |
| 2902 var arg_appsId = "foo"; |
| 2903 var arg_authorizedCertificatesId = "foo"; |
| 2904 var arg_view = "foo"; |
| 2905 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 2906 var path = (req.url).path; |
| 2907 var pathOffset = 0; |
| 2908 var index; |
| 2909 var subPart; |
| 2910 unittest.expect( |
| 2911 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 2912 pathOffset += 1; |
| 2913 unittest.expect(path.substring(pathOffset, pathOffset + 8), |
| 2914 unittest.equals("v1/apps/")); |
| 2915 pathOffset += 8; |
| 2916 index = path.indexOf("/authorizedCertificates/", pathOffset); |
| 2917 unittest.expect(index >= 0, unittest.isTrue); |
| 2918 subPart = |
| 2919 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 2920 pathOffset = index; |
| 2921 unittest.expect(subPart, unittest.equals("$arg_appsId")); |
| 2922 unittest.expect(path.substring(pathOffset, pathOffset + 24), |
| 2923 unittest.equals("/authorizedCertificates/")); |
| 2924 pathOffset += 24; |
| 2925 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| 2926 pathOffset = path.length; |
| 2927 unittest.expect( |
| 2928 subPart, unittest.equals("$arg_authorizedCertificatesId")); |
| 2929 |
| 2930 var query = (req.url).query; |
| 2931 var queryOffset = 0; |
| 2932 var queryMap = {}; |
| 2933 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 2934 parseBool(n) { |
| 2935 if (n == "true") return true; |
| 2936 if (n == "false") return false; |
| 2937 if (n == null) return null; |
| 2938 throw new core.ArgumentError("Invalid boolean: $n"); |
| 2939 } |
| 2940 |
| 2941 if (query.length > 0) { |
| 2942 for (var part in query.split("&")) { |
| 2943 var keyvalue = part.split("="); |
| 2944 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 2945 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 2946 } |
| 2947 } |
| 2948 unittest.expect(queryMap["view"].first, unittest.equals(arg_view)); |
| 2949 |
| 2950 var h = { |
| 2951 "content-type": "application/json; charset=utf-8", |
| 2952 }; |
| 2953 var resp = convert.JSON.encode(buildAuthorizedCertificate()); |
| 2954 return new async.Future.value(stringResponse(200, h, resp)); |
| 2955 }), true); |
| 2956 res |
| 2957 .get(arg_appsId, arg_authorizedCertificatesId, view: arg_view) |
| 2958 .then(unittest.expectAsync1(((api.AuthorizedCertificate response) { |
| 2959 checkAuthorizedCertificate(response); |
| 2960 }))); |
| 2961 }); |
| 2962 |
| 2963 unittest.test("method--list", () { |
| 2964 var mock = new HttpServerMock(); |
| 2965 api.AppsAuthorizedCertificatesResourceApi res = |
| 2966 new api.AppengineApi(mock).apps.authorizedCertificates; |
| 2967 var arg_appsId = "foo"; |
| 2968 var arg_pageToken = "foo"; |
| 2969 var arg_pageSize = 42; |
| 2970 var arg_view = "foo"; |
| 2971 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 2972 var path = (req.url).path; |
| 2973 var pathOffset = 0; |
| 2974 var index; |
| 2975 var subPart; |
| 2976 unittest.expect( |
| 2977 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 2978 pathOffset += 1; |
| 2979 unittest.expect(path.substring(pathOffset, pathOffset + 8), |
| 2980 unittest.equals("v1/apps/")); |
| 2981 pathOffset += 8; |
| 2982 index = path.indexOf("/authorizedCertificates", pathOffset); |
| 2983 unittest.expect(index >= 0, unittest.isTrue); |
| 2984 subPart = |
| 2985 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 2986 pathOffset = index; |
| 2987 unittest.expect(subPart, unittest.equals("$arg_appsId")); |
| 2988 unittest.expect(path.substring(pathOffset, pathOffset + 23), |
| 2989 unittest.equals("/authorizedCertificates")); |
| 2990 pathOffset += 23; |
| 2991 |
| 2992 var query = (req.url).query; |
| 2993 var queryOffset = 0; |
| 2994 var queryMap = {}; |
| 2995 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 2996 parseBool(n) { |
| 2997 if (n == "true") return true; |
| 2998 if (n == "false") return false; |
| 2999 if (n == null) return null; |
| 3000 throw new core.ArgumentError("Invalid boolean: $n"); |
| 3001 } |
| 3002 |
| 3003 if (query.length > 0) { |
| 3004 for (var part in query.split("&")) { |
| 3005 var keyvalue = part.split("="); |
| 3006 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 3007 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 3008 } |
| 3009 } |
| 3010 unittest.expect( |
| 3011 queryMap["pageToken"].first, unittest.equals(arg_pageToken)); |
| 3012 unittest.expect(core.int.parse(queryMap["pageSize"].first), |
| 3013 unittest.equals(arg_pageSize)); |
| 3014 unittest.expect(queryMap["view"].first, unittest.equals(arg_view)); |
| 3015 |
| 3016 var h = { |
| 3017 "content-type": "application/json; charset=utf-8", |
| 3018 }; |
| 3019 var resp = |
| 3020 convert.JSON.encode(buildListAuthorizedCertificatesResponse()); |
| 3021 return new async.Future.value(stringResponse(200, h, resp)); |
| 3022 }), true); |
| 3023 res |
| 3024 .list(arg_appsId, |
| 3025 pageToken: arg_pageToken, pageSize: arg_pageSize, view: arg_view) |
| 3026 .then(unittest |
| 3027 .expectAsync1(((api.ListAuthorizedCertificatesResponse response) { |
| 3028 checkListAuthorizedCertificatesResponse(response); |
| 3029 }))); |
| 3030 }); |
| 3031 |
| 3032 unittest.test("method--patch", () { |
| 3033 var mock = new HttpServerMock(); |
| 3034 api.AppsAuthorizedCertificatesResourceApi res = |
| 3035 new api.AppengineApi(mock).apps.authorizedCertificates; |
| 3036 var arg_request = buildAuthorizedCertificate(); |
| 3037 var arg_appsId = "foo"; |
| 3038 var arg_authorizedCertificatesId = "foo"; |
| 3039 var arg_updateMask = "foo"; |
| 3040 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 3041 var obj = new api.AuthorizedCertificate.fromJson(json); |
| 3042 checkAuthorizedCertificate(obj); |
| 3043 |
| 3044 var path = (req.url).path; |
| 3045 var pathOffset = 0; |
| 3046 var index; |
| 3047 var subPart; |
| 3048 unittest.expect( |
| 3049 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 3050 pathOffset += 1; |
| 3051 unittest.expect(path.substring(pathOffset, pathOffset + 8), |
| 3052 unittest.equals("v1/apps/")); |
| 3053 pathOffset += 8; |
| 3054 index = path.indexOf("/authorizedCertificates/", pathOffset); |
| 3055 unittest.expect(index >= 0, unittest.isTrue); |
| 3056 subPart = |
| 3057 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 3058 pathOffset = index; |
| 3059 unittest.expect(subPart, unittest.equals("$arg_appsId")); |
| 3060 unittest.expect(path.substring(pathOffset, pathOffset + 24), |
| 3061 unittest.equals("/authorizedCertificates/")); |
| 3062 pathOffset += 24; |
| 3063 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| 3064 pathOffset = path.length; |
| 3065 unittest.expect( |
| 3066 subPart, unittest.equals("$arg_authorizedCertificatesId")); |
| 3067 |
| 3068 var query = (req.url).query; |
| 3069 var queryOffset = 0; |
| 3070 var queryMap = {}; |
| 3071 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 3072 parseBool(n) { |
| 3073 if (n == "true") return true; |
| 3074 if (n == "false") return false; |
| 3075 if (n == null) return null; |
| 3076 throw new core.ArgumentError("Invalid boolean: $n"); |
| 3077 } |
| 3078 |
| 3079 if (query.length > 0) { |
| 3080 for (var part in query.split("&")) { |
| 3081 var keyvalue = part.split("="); |
| 3082 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 3083 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 3084 } |
| 3085 } |
| 3086 unittest.expect( |
| 3087 queryMap["updateMask"].first, unittest.equals(arg_updateMask)); |
| 3088 |
| 3089 var h = { |
| 3090 "content-type": "application/json; charset=utf-8", |
| 3091 }; |
| 3092 var resp = convert.JSON.encode(buildAuthorizedCertificate()); |
| 3093 return new async.Future.value(stringResponse(200, h, resp)); |
| 3094 }), true); |
| 3095 res |
| 3096 .patch(arg_request, arg_appsId, arg_authorizedCertificatesId, |
| 3097 updateMask: arg_updateMask) |
| 3098 .then(unittest.expectAsync1(((api.AuthorizedCertificate response) { |
| 3099 checkAuthorizedCertificate(response); |
| 3100 }))); |
| 3101 }); |
| 3102 }); |
| 3103 |
| 3104 unittest.group("resource-AppsAuthorizedDomainsResourceApi", () { |
| 3105 unittest.test("method--list", () { |
| 3106 var mock = new HttpServerMock(); |
| 3107 api.AppsAuthorizedDomainsResourceApi res = |
| 3108 new api.AppengineApi(mock).apps.authorizedDomains; |
| 3109 var arg_appsId = "foo"; |
| 3110 var arg_pageSize = 42; |
| 3111 var arg_pageToken = "foo"; |
| 3112 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 3113 var path = (req.url).path; |
| 3114 var pathOffset = 0; |
| 3115 var index; |
| 3116 var subPart; |
| 3117 unittest.expect( |
| 3118 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 3119 pathOffset += 1; |
| 3120 unittest.expect(path.substring(pathOffset, pathOffset + 8), |
| 3121 unittest.equals("v1/apps/")); |
| 3122 pathOffset += 8; |
| 3123 index = path.indexOf("/authorizedDomains", pathOffset); |
| 3124 unittest.expect(index >= 0, unittest.isTrue); |
| 3125 subPart = |
| 3126 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 3127 pathOffset = index; |
| 3128 unittest.expect(subPart, unittest.equals("$arg_appsId")); |
| 3129 unittest.expect(path.substring(pathOffset, pathOffset + 18), |
| 3130 unittest.equals("/authorizedDomains")); |
| 3131 pathOffset += 18; |
| 3132 |
| 3133 var query = (req.url).query; |
| 3134 var queryOffset = 0; |
| 3135 var queryMap = {}; |
| 3136 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 3137 parseBool(n) { |
| 3138 if (n == "true") return true; |
| 3139 if (n == "false") return false; |
| 3140 if (n == null) return null; |
| 3141 throw new core.ArgumentError("Invalid boolean: $n"); |
| 3142 } |
| 3143 |
| 3144 if (query.length > 0) { |
| 3145 for (var part in query.split("&")) { |
| 3146 var keyvalue = part.split("="); |
| 3147 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 3148 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 3149 } |
| 3150 } |
| 3151 unittest.expect(core.int.parse(queryMap["pageSize"].first), |
| 3152 unittest.equals(arg_pageSize)); |
| 3153 unittest.expect( |
| 3154 queryMap["pageToken"].first, unittest.equals(arg_pageToken)); |
| 3155 |
| 3156 var h = { |
| 3157 "content-type": "application/json; charset=utf-8", |
| 3158 }; |
| 3159 var resp = convert.JSON.encode(buildListAuthorizedDomainsResponse()); |
| 3160 return new async.Future.value(stringResponse(200, h, resp)); |
| 3161 }), true); |
| 3162 res |
| 3163 .list(arg_appsId, pageSize: arg_pageSize, pageToken: arg_pageToken) |
| 3164 .then(unittest |
| 3165 .expectAsync1(((api.ListAuthorizedDomainsResponse response) { |
| 3166 checkListAuthorizedDomainsResponse(response); |
| 3167 }))); |
| 3168 }); |
| 3169 }); |
| 3170 |
| 3171 unittest.group("resource-AppsDomainMappingsResourceApi", () { |
| 3172 unittest.test("method--create", () { |
| 3173 var mock = new HttpServerMock(); |
| 3174 api.AppsDomainMappingsResourceApi res = |
| 3175 new api.AppengineApi(mock).apps.domainMappings; |
| 3176 var arg_request = buildDomainMapping(); |
| 3177 var arg_appsId = "foo"; |
| 3178 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 3179 var obj = new api.DomainMapping.fromJson(json); |
| 3180 checkDomainMapping(obj); |
| 3181 |
| 3182 var path = (req.url).path; |
| 3183 var pathOffset = 0; |
| 3184 var index; |
| 3185 var subPart; |
| 3186 unittest.expect( |
| 3187 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 3188 pathOffset += 1; |
| 3189 unittest.expect(path.substring(pathOffset, pathOffset + 8), |
| 3190 unittest.equals("v1/apps/")); |
| 3191 pathOffset += 8; |
| 3192 index = path.indexOf("/domainMappings", pathOffset); |
| 3193 unittest.expect(index >= 0, unittest.isTrue); |
| 3194 subPart = |
| 3195 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 3196 pathOffset = index; |
| 3197 unittest.expect(subPart, unittest.equals("$arg_appsId")); |
| 3198 unittest.expect(path.substring(pathOffset, pathOffset + 15), |
| 3199 unittest.equals("/domainMappings")); |
| 3200 pathOffset += 15; |
| 3201 |
| 3202 var query = (req.url).query; |
| 3203 var queryOffset = 0; |
| 3204 var queryMap = {}; |
| 3205 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 3206 parseBool(n) { |
| 3207 if (n == "true") return true; |
| 3208 if (n == "false") return false; |
| 3209 if (n == null) return null; |
| 3210 throw new core.ArgumentError("Invalid boolean: $n"); |
| 3211 } |
| 3212 |
| 3213 if (query.length > 0) { |
| 3214 for (var part in query.split("&")) { |
| 3215 var keyvalue = part.split("="); |
| 3216 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 3217 core.Uri.decodeQueryComponent(keyvalue[1])); |
| 3218 } |
| 3219 } |
| 3220 |
| 3221 var h = { |
| 3222 "content-type": "application/json; charset=utf-8", |
| 3223 }; |
| 3224 var resp = convert.JSON.encode(buildOperation()); |
| 3225 return new async.Future.value(stringResponse(200, h, resp)); |
| 3226 }), true); |
| 3227 res |
| 3228 .create(arg_request, arg_appsId) |
| 3229 .then(unittest.expectAsync1(((api.Operation response) { |
| 3230 checkOperation(response); |
| 3231 }))); |
| 3232 }); |
| 3233 |
| 3234 unittest.test("method--delete", () { |
| 3235 var mock = new HttpServerMock(); |
| 3236 api.AppsDomainMappingsResourceApi res = |
| 3237 new api.AppengineApi(mock).apps.domainMappings; |
| 3238 var arg_appsId = "foo"; |
| 3239 var arg_domainMappingsId = "foo"; |
| 3240 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 3241 var path = (req.url).path; |
| 3242 var pathOffset = 0; |
| 3243 var index; |
| 3244 var subPart; |
| 3245 unittest.expect( |
| 3246 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 3247 pathOffset += 1; |
| 3248 unittest.expect(path.substring(pathOffset, pathOffset + 8), |
| 3249 unittest.equals("v1/apps/")); |
| 3250 pathOffset += 8; |
| 3251 index = path.indexOf("/domainMappings/", pathOffset); |
| 3252 unittest.expect(index >= 0, unittest.isTrue); |
| 3253 subPart = |
| 3254 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 3255 pathOffset = index; |
| 3256 unittest.expect(subPart, unittest.equals("$arg_appsId")); |
| 3257 unittest.expect(path.substring(pathOffset, pathOffset + 16), |
| 3258 unittest.equals("/domainMappings/")); |
| 3259 pathOffset += 16; |
| 3260 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| 3261 pathOffset = path.length; |
| 3262 unittest.expect(subPart, unittest.equals("$arg_domainMappingsId")); |
| 3263 |
| 3264 var query = (req.url).query; |
| 3265 var queryOffset = 0; |
2151 var queryMap = {}; | 3266 var queryMap = {}; |
2152 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 3267 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
2153 parseBool(n) { | 3268 parseBool(n) { |
2154 if (n == "true") return true; | 3269 if (n == "true") return true; |
2155 if (n == "false") return false; | 3270 if (n == "false") return false; |
2156 if (n == null) return null; | 3271 if (n == null) return null; |
2157 throw new core.ArgumentError("Invalid boolean: $n"); | 3272 throw new core.ArgumentError("Invalid boolean: $n"); |
2158 } | 3273 } |
| 3274 |
2159 if (query.length > 0) { | 3275 if (query.length > 0) { |
2160 for (var part in query.split("&")) { | 3276 for (var part in query.split("&")) { |
2161 var keyvalue = part.split("="); | 3277 var keyvalue = part.split("="); |
2162 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 3278 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 3279 core.Uri.decodeQueryComponent(keyvalue[1])); |
2163 } | 3280 } |
2164 } | 3281 } |
2165 | 3282 |
2166 | |
2167 var h = { | 3283 var h = { |
2168 "content-type" : "application/json; charset=utf-8", | 3284 "content-type": "application/json; charset=utf-8", |
2169 }; | 3285 }; |
2170 var resp = convert.JSON.encode(buildOperation()); | 3286 var resp = convert.JSON.encode(buildOperation()); |
2171 return new async.Future.value(stringResponse(200, h, resp)); | 3287 return new async.Future.value(stringResponse(200, h, resp)); |
2172 }), true); | 3288 }), true); |
2173 res.create(arg_request).then(unittest.expectAsync1(((api.Operation respons
e) { | 3289 res |
| 3290 .delete(arg_appsId, arg_domainMappingsId) |
| 3291 .then(unittest.expectAsync1(((api.Operation response) { |
2174 checkOperation(response); | 3292 checkOperation(response); |
2175 }))); | 3293 }))); |
2176 }); | 3294 }); |
2177 | 3295 |
2178 unittest.test("method--get", () { | 3296 unittest.test("method--get", () { |
2179 | |
2180 var mock = new HttpServerMock(); | 3297 var mock = new HttpServerMock(); |
2181 api.AppsResourceApi res = new api.AppengineApi(mock).apps; | 3298 api.AppsDomainMappingsResourceApi res = |
| 3299 new api.AppengineApi(mock).apps.domainMappings; |
2182 var arg_appsId = "foo"; | 3300 var arg_appsId = "foo"; |
| 3301 var arg_domainMappingsId = "foo"; |
2183 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 3302 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
2184 var path = (req.url).path; | 3303 var path = (req.url).path; |
2185 var pathOffset = 0; | 3304 var pathOffset = 0; |
2186 var index; | 3305 var index; |
2187 var subPart; | 3306 var subPart; |
2188 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3307 unittest.expect( |
| 3308 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
2189 pathOffset += 1; | 3309 pathOffset += 1; |
2190 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1/apps/")); | 3310 unittest.expect(path.substring(pathOffset, pathOffset + 8), |
| 3311 unittest.equals("v1/apps/")); |
2191 pathOffset += 8; | 3312 pathOffset += 8; |
| 3313 index = path.indexOf("/domainMappings/", pathOffset); |
| 3314 unittest.expect(index >= 0, unittest.isTrue); |
| 3315 subPart = |
| 3316 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 3317 pathOffset = index; |
| 3318 unittest.expect(subPart, unittest.equals("$arg_appsId")); |
| 3319 unittest.expect(path.substring(pathOffset, pathOffset + 16), |
| 3320 unittest.equals("/domainMappings/")); |
| 3321 pathOffset += 16; |
2192 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | 3322 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
2193 pathOffset = path.length; | 3323 pathOffset = path.length; |
2194 unittest.expect(subPart, unittest.equals("$arg_appsId")); | 3324 unittest.expect(subPart, unittest.equals("$arg_domainMappingsId")); |
2195 | 3325 |
2196 var query = (req.url).query; | 3326 var query = (req.url).query; |
2197 var queryOffset = 0; | 3327 var queryOffset = 0; |
2198 var queryMap = {}; | 3328 var queryMap = {}; |
2199 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 3329 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
2200 parseBool(n) { | 3330 parseBool(n) { |
2201 if (n == "true") return true; | 3331 if (n == "true") return true; |
2202 if (n == "false") return false; | 3332 if (n == "false") return false; |
2203 if (n == null) return null; | 3333 if (n == null) return null; |
2204 throw new core.ArgumentError("Invalid boolean: $n"); | 3334 throw new core.ArgumentError("Invalid boolean: $n"); |
2205 } | 3335 } |
| 3336 |
2206 if (query.length > 0) { | 3337 if (query.length > 0) { |
2207 for (var part in query.split("&")) { | 3338 for (var part in query.split("&")) { |
2208 var keyvalue = part.split("="); | 3339 var keyvalue = part.split("="); |
2209 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 3340 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 3341 core.Uri.decodeQueryComponent(keyvalue[1])); |
2210 } | 3342 } |
2211 } | 3343 } |
2212 | 3344 |
2213 | |
2214 var h = { | 3345 var h = { |
2215 "content-type" : "application/json; charset=utf-8", | 3346 "content-type": "application/json; charset=utf-8", |
2216 }; | 3347 }; |
2217 var resp = convert.JSON.encode(buildApplication()); | 3348 var resp = convert.JSON.encode(buildDomainMapping()); |
2218 return new async.Future.value(stringResponse(200, h, resp)); | 3349 return new async.Future.value(stringResponse(200, h, resp)); |
2219 }), true); | 3350 }), true); |
2220 res.get(arg_appsId).then(unittest.expectAsync1(((api.Application response)
{ | 3351 res |
2221 checkApplication(response); | 3352 .get(arg_appsId, arg_domainMappingsId) |
| 3353 .then(unittest.expectAsync1(((api.DomainMapping response) { |
| 3354 checkDomainMapping(response); |
2222 }))); | 3355 }))); |
2223 }); | 3356 }); |
2224 | 3357 |
2225 unittest.test("method--patch", () { | 3358 unittest.test("method--list", () { |
2226 | |
2227 var mock = new HttpServerMock(); | 3359 var mock = new HttpServerMock(); |
2228 api.AppsResourceApi res = new api.AppengineApi(mock).apps; | 3360 api.AppsDomainMappingsResourceApi res = |
2229 var arg_request = buildApplication(); | 3361 new api.AppengineApi(mock).apps.domainMappings; |
2230 var arg_appsId = "foo"; | 3362 var arg_appsId = "foo"; |
2231 var arg_updateMask = "foo"; | 3363 var arg_pageToken = "foo"; |
| 3364 var arg_pageSize = 42; |
2232 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 3365 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
2233 var obj = new api.Application.fromJson(json); | |
2234 checkApplication(obj); | |
2235 | |
2236 var path = (req.url).path; | 3366 var path = (req.url).path; |
2237 var pathOffset = 0; | 3367 var pathOffset = 0; |
2238 var index; | 3368 var index; |
2239 var subPart; | 3369 var subPart; |
2240 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3370 unittest.expect( |
| 3371 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
2241 pathOffset += 1; | 3372 pathOffset += 1; |
2242 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1/apps/")); | 3373 unittest.expect(path.substring(pathOffset, pathOffset + 8), |
| 3374 unittest.equals("v1/apps/")); |
2243 pathOffset += 8; | 3375 pathOffset += 8; |
2244 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | 3376 index = path.indexOf("/domainMappings", pathOffset); |
2245 pathOffset = path.length; | 3377 unittest.expect(index >= 0, unittest.isTrue); |
| 3378 subPart = |
| 3379 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 3380 pathOffset = index; |
2246 unittest.expect(subPart, unittest.equals("$arg_appsId")); | 3381 unittest.expect(subPart, unittest.equals("$arg_appsId")); |
| 3382 unittest.expect(path.substring(pathOffset, pathOffset + 15), |
| 3383 unittest.equals("/domainMappings")); |
| 3384 pathOffset += 15; |
2247 | 3385 |
2248 var query = (req.url).query; | 3386 var query = (req.url).query; |
2249 var queryOffset = 0; | 3387 var queryOffset = 0; |
2250 var queryMap = {}; | 3388 var queryMap = {}; |
2251 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 3389 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
2252 parseBool(n) { | 3390 parseBool(n) { |
2253 if (n == "true") return true; | 3391 if (n == "true") return true; |
2254 if (n == "false") return false; | 3392 if (n == "false") return false; |
2255 if (n == null) return null; | 3393 if (n == null) return null; |
2256 throw new core.ArgumentError("Invalid boolean: $n"); | 3394 throw new core.ArgumentError("Invalid boolean: $n"); |
2257 } | 3395 } |
| 3396 |
2258 if (query.length > 0) { | 3397 if (query.length > 0) { |
2259 for (var part in query.split("&")) { | 3398 for (var part in query.split("&")) { |
2260 var keyvalue = part.split("="); | 3399 var keyvalue = part.split("="); |
2261 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 3400 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 3401 core.Uri.decodeQueryComponent(keyvalue[1])); |
2262 } | 3402 } |
2263 } | 3403 } |
2264 unittest.expect(queryMap["updateMask"].first, unittest.equals(arg_update
Mask)); | 3404 unittest.expect( |
2265 | 3405 queryMap["pageToken"].first, unittest.equals(arg_pageToken)); |
| 3406 unittest.expect(core.int.parse(queryMap["pageSize"].first), |
| 3407 unittest.equals(arg_pageSize)); |
2266 | 3408 |
2267 var h = { | 3409 var h = { |
2268 "content-type" : "application/json; charset=utf-8", | 3410 "content-type": "application/json; charset=utf-8", |
2269 }; | 3411 }; |
2270 var resp = convert.JSON.encode(buildOperation()); | 3412 var resp = convert.JSON.encode(buildListDomainMappingsResponse()); |
2271 return new async.Future.value(stringResponse(200, h, resp)); | 3413 return new async.Future.value(stringResponse(200, h, resp)); |
2272 }), true); | 3414 }), true); |
2273 res.patch(arg_request, arg_appsId, updateMask: arg_updateMask).then(unitte
st.expectAsync1(((api.Operation response) { | 3415 res |
2274 checkOperation(response); | 3416 .list(arg_appsId, pageToken: arg_pageToken, pageSize: arg_pageSize) |
| 3417 .then( |
| 3418 unittest.expectAsync1(((api.ListDomainMappingsResponse response) { |
| 3419 checkListDomainMappingsResponse(response); |
2275 }))); | 3420 }))); |
2276 }); | 3421 }); |
2277 | 3422 |
2278 unittest.test("method--repair", () { | 3423 unittest.test("method--patch", () { |
2279 | |
2280 var mock = new HttpServerMock(); | 3424 var mock = new HttpServerMock(); |
2281 api.AppsResourceApi res = new api.AppengineApi(mock).apps; | 3425 api.AppsDomainMappingsResourceApi res = |
2282 var arg_request = buildRepairApplicationRequest(); | 3426 new api.AppengineApi(mock).apps.domainMappings; |
| 3427 var arg_request = buildDomainMapping(); |
2283 var arg_appsId = "foo"; | 3428 var arg_appsId = "foo"; |
| 3429 var arg_domainMappingsId = "foo"; |
| 3430 var arg_updateMask = "foo"; |
2284 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 3431 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
2285 var obj = new api.RepairApplicationRequest.fromJson(json); | 3432 var obj = new api.DomainMapping.fromJson(json); |
2286 checkRepairApplicationRequest(obj); | 3433 checkDomainMapping(obj); |
2287 | 3434 |
2288 var path = (req.url).path; | 3435 var path = (req.url).path; |
2289 var pathOffset = 0; | 3436 var pathOffset = 0; |
2290 var index; | 3437 var index; |
2291 var subPart; | 3438 var subPart; |
2292 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3439 unittest.expect( |
| 3440 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
2293 pathOffset += 1; | 3441 pathOffset += 1; |
2294 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1/apps/")); | 3442 unittest.expect(path.substring(pathOffset, pathOffset + 8), |
| 3443 unittest.equals("v1/apps/")); |
2295 pathOffset += 8; | 3444 pathOffset += 8; |
2296 index = path.indexOf(":repair", pathOffset); | 3445 index = path.indexOf("/domainMappings/", pathOffset); |
2297 unittest.expect(index >= 0, unittest.isTrue); | 3446 unittest.expect(index >= 0, unittest.isTrue); |
2298 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 3447 subPart = |
| 3448 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
2299 pathOffset = index; | 3449 pathOffset = index; |
2300 unittest.expect(subPart, unittest.equals("$arg_appsId")); | 3450 unittest.expect(subPart, unittest.equals("$arg_appsId")); |
2301 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ
als(":repair")); | 3451 unittest.expect(path.substring(pathOffset, pathOffset + 16), |
2302 pathOffset += 7; | 3452 unittest.equals("/domainMappings/")); |
| 3453 pathOffset += 16; |
| 3454 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| 3455 pathOffset = path.length; |
| 3456 unittest.expect(subPart, unittest.equals("$arg_domainMappingsId")); |
2303 | 3457 |
2304 var query = (req.url).query; | 3458 var query = (req.url).query; |
2305 var queryOffset = 0; | 3459 var queryOffset = 0; |
2306 var queryMap = {}; | 3460 var queryMap = {}; |
2307 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 3461 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
2308 parseBool(n) { | 3462 parseBool(n) { |
2309 if (n == "true") return true; | 3463 if (n == "true") return true; |
2310 if (n == "false") return false; | 3464 if (n == "false") return false; |
2311 if (n == null) return null; | 3465 if (n == null) return null; |
2312 throw new core.ArgumentError("Invalid boolean: $n"); | 3466 throw new core.ArgumentError("Invalid boolean: $n"); |
2313 } | 3467 } |
| 3468 |
2314 if (query.length > 0) { | 3469 if (query.length > 0) { |
2315 for (var part in query.split("&")) { | 3470 for (var part in query.split("&")) { |
2316 var keyvalue = part.split("="); | 3471 var keyvalue = part.split("="); |
2317 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 3472 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 3473 core.Uri.decodeQueryComponent(keyvalue[1])); |
2318 } | 3474 } |
2319 } | 3475 } |
2320 | 3476 unittest.expect( |
| 3477 queryMap["updateMask"].first, unittest.equals(arg_updateMask)); |
2321 | 3478 |
2322 var h = { | 3479 var h = { |
2323 "content-type" : "application/json; charset=utf-8", | 3480 "content-type": "application/json; charset=utf-8", |
2324 }; | 3481 }; |
2325 var resp = convert.JSON.encode(buildOperation()); | 3482 var resp = convert.JSON.encode(buildOperation()); |
2326 return new async.Future.value(stringResponse(200, h, resp)); | 3483 return new async.Future.value(stringResponse(200, h, resp)); |
2327 }), true); | 3484 }), true); |
2328 res.repair(arg_request, arg_appsId).then(unittest.expectAsync1(((api.Opera
tion response) { | 3485 res |
| 3486 .patch(arg_request, arg_appsId, arg_domainMappingsId, |
| 3487 updateMask: arg_updateMask) |
| 3488 .then(unittest.expectAsync1(((api.Operation response) { |
2329 checkOperation(response); | 3489 checkOperation(response); |
2330 }))); | 3490 }))); |
2331 }); | 3491 }); |
2332 | |
2333 }); | 3492 }); |
2334 | 3493 |
2335 | |
2336 unittest.group("resource-AppsLocationsResourceApi", () { | 3494 unittest.group("resource-AppsLocationsResourceApi", () { |
2337 unittest.test("method--get", () { | 3495 unittest.test("method--get", () { |
2338 | |
2339 var mock = new HttpServerMock(); | 3496 var mock = new HttpServerMock(); |
2340 api.AppsLocationsResourceApi res = new api.AppengineApi(mock).apps.locatio
ns; | 3497 api.AppsLocationsResourceApi res = |
| 3498 new api.AppengineApi(mock).apps.locations; |
2341 var arg_appsId = "foo"; | 3499 var arg_appsId = "foo"; |
2342 var arg_locationsId = "foo"; | 3500 var arg_locationsId = "foo"; |
2343 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 3501 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
2344 var path = (req.url).path; | 3502 var path = (req.url).path; |
2345 var pathOffset = 0; | 3503 var pathOffset = 0; |
2346 var index; | 3504 var index; |
2347 var subPart; | 3505 var subPart; |
2348 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3506 unittest.expect( |
| 3507 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
2349 pathOffset += 1; | 3508 pathOffset += 1; |
2350 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1/apps/")); | 3509 unittest.expect(path.substring(pathOffset, pathOffset + 8), |
| 3510 unittest.equals("v1/apps/")); |
2351 pathOffset += 8; | 3511 pathOffset += 8; |
2352 index = path.indexOf("/locations/", pathOffset); | 3512 index = path.indexOf("/locations/", pathOffset); |
2353 unittest.expect(index >= 0, unittest.isTrue); | 3513 unittest.expect(index >= 0, unittest.isTrue); |
2354 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 3514 subPart = |
| 3515 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
2355 pathOffset = index; | 3516 pathOffset = index; |
2356 unittest.expect(subPart, unittest.equals("$arg_appsId")); | 3517 unittest.expect(subPart, unittest.equals("$arg_appsId")); |
2357 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("/locations/")); | 3518 unittest.expect(path.substring(pathOffset, pathOffset + 11), |
| 3519 unittest.equals("/locations/")); |
2358 pathOffset += 11; | 3520 pathOffset += 11; |
2359 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | 3521 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
2360 pathOffset = path.length; | 3522 pathOffset = path.length; |
2361 unittest.expect(subPart, unittest.equals("$arg_locationsId")); | 3523 unittest.expect(subPart, unittest.equals("$arg_locationsId")); |
2362 | 3524 |
2363 var query = (req.url).query; | 3525 var query = (req.url).query; |
2364 var queryOffset = 0; | 3526 var queryOffset = 0; |
2365 var queryMap = {}; | 3527 var queryMap = {}; |
2366 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 3528 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
2367 parseBool(n) { | 3529 parseBool(n) { |
2368 if (n == "true") return true; | 3530 if (n == "true") return true; |
2369 if (n == "false") return false; | 3531 if (n == "false") return false; |
2370 if (n == null) return null; | 3532 if (n == null) return null; |
2371 throw new core.ArgumentError("Invalid boolean: $n"); | 3533 throw new core.ArgumentError("Invalid boolean: $n"); |
2372 } | 3534 } |
| 3535 |
2373 if (query.length > 0) { | 3536 if (query.length > 0) { |
2374 for (var part in query.split("&")) { | 3537 for (var part in query.split("&")) { |
2375 var keyvalue = part.split("="); | 3538 var keyvalue = part.split("="); |
2376 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 3539 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 3540 core.Uri.decodeQueryComponent(keyvalue[1])); |
2377 } | 3541 } |
2378 } | 3542 } |
2379 | 3543 |
2380 | |
2381 var h = { | 3544 var h = { |
2382 "content-type" : "application/json; charset=utf-8", | 3545 "content-type": "application/json; charset=utf-8", |
2383 }; | 3546 }; |
2384 var resp = convert.JSON.encode(buildLocation()); | 3547 var resp = convert.JSON.encode(buildLocation()); |
2385 return new async.Future.value(stringResponse(200, h, resp)); | 3548 return new async.Future.value(stringResponse(200, h, resp)); |
2386 }), true); | 3549 }), true); |
2387 res.get(arg_appsId, arg_locationsId).then(unittest.expectAsync1(((api.Loca
tion response) { | 3550 res |
| 3551 .get(arg_appsId, arg_locationsId) |
| 3552 .then(unittest.expectAsync1(((api.Location response) { |
2388 checkLocation(response); | 3553 checkLocation(response); |
2389 }))); | 3554 }))); |
2390 }); | 3555 }); |
2391 | 3556 |
2392 unittest.test("method--list", () { | 3557 unittest.test("method--list", () { |
2393 | |
2394 var mock = new HttpServerMock(); | 3558 var mock = new HttpServerMock(); |
2395 api.AppsLocationsResourceApi res = new api.AppengineApi(mock).apps.locatio
ns; | 3559 api.AppsLocationsResourceApi res = |
| 3560 new api.AppengineApi(mock).apps.locations; |
2396 var arg_appsId = "foo"; | 3561 var arg_appsId = "foo"; |
| 3562 var arg_pageToken = "foo"; |
2397 var arg_pageSize = 42; | 3563 var arg_pageSize = 42; |
2398 var arg_filter = "foo"; | 3564 var arg_filter = "foo"; |
2399 var arg_pageToken = "foo"; | |
2400 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 3565 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
2401 var path = (req.url).path; | 3566 var path = (req.url).path; |
2402 var pathOffset = 0; | 3567 var pathOffset = 0; |
2403 var index; | 3568 var index; |
2404 var subPart; | 3569 var subPart; |
2405 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3570 unittest.expect( |
| 3571 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
2406 pathOffset += 1; | 3572 pathOffset += 1; |
2407 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1/apps/")); | 3573 unittest.expect(path.substring(pathOffset, pathOffset + 8), |
| 3574 unittest.equals("v1/apps/")); |
2408 pathOffset += 8; | 3575 pathOffset += 8; |
2409 index = path.indexOf("/locations", pathOffset); | 3576 index = path.indexOf("/locations", pathOffset); |
2410 unittest.expect(index >= 0, unittest.isTrue); | 3577 unittest.expect(index >= 0, unittest.isTrue); |
2411 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 3578 subPart = |
| 3579 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
2412 pathOffset = index; | 3580 pathOffset = index; |
2413 unittest.expect(subPart, unittest.equals("$arg_appsId")); | 3581 unittest.expect(subPart, unittest.equals("$arg_appsId")); |
2414 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/locations")); | 3582 unittest.expect(path.substring(pathOffset, pathOffset + 10), |
| 3583 unittest.equals("/locations")); |
2415 pathOffset += 10; | 3584 pathOffset += 10; |
2416 | 3585 |
2417 var query = (req.url).query; | 3586 var query = (req.url).query; |
2418 var queryOffset = 0; | 3587 var queryOffset = 0; |
2419 var queryMap = {}; | 3588 var queryMap = {}; |
2420 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 3589 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
2421 parseBool(n) { | 3590 parseBool(n) { |
2422 if (n == "true") return true; | 3591 if (n == "true") return true; |
2423 if (n == "false") return false; | 3592 if (n == "false") return false; |
2424 if (n == null) return null; | 3593 if (n == null) return null; |
2425 throw new core.ArgumentError("Invalid boolean: $n"); | 3594 throw new core.ArgumentError("Invalid boolean: $n"); |
2426 } | 3595 } |
| 3596 |
2427 if (query.length > 0) { | 3597 if (query.length > 0) { |
2428 for (var part in query.split("&")) { | 3598 for (var part in query.split("&")) { |
2429 var keyvalue = part.split("="); | 3599 var keyvalue = part.split("="); |
2430 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 3600 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 3601 core.Uri.decodeQueryComponent(keyvalue[1])); |
2431 } | 3602 } |
2432 } | 3603 } |
2433 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); | 3604 unittest.expect( |
| 3605 queryMap["pageToken"].first, unittest.equals(arg_pageToken)); |
| 3606 unittest.expect(core.int.parse(queryMap["pageSize"].first), |
| 3607 unittest.equals(arg_pageSize)); |
2434 unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); | 3608 unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); |
2435 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
2436 | |
2437 | 3609 |
2438 var h = { | 3610 var h = { |
2439 "content-type" : "application/json; charset=utf-8", | 3611 "content-type": "application/json; charset=utf-8", |
2440 }; | 3612 }; |
2441 var resp = convert.JSON.encode(buildListLocationsResponse()); | 3613 var resp = convert.JSON.encode(buildListLocationsResponse()); |
2442 return new async.Future.value(stringResponse(200, h, resp)); | 3614 return new async.Future.value(stringResponse(200, h, resp)); |
2443 }), true); | 3615 }), true); |
2444 res.list(arg_appsId, pageSize: arg_pageSize, filter: arg_filter, pageToken
: arg_pageToken).then(unittest.expectAsync1(((api.ListLocationsResponse response
) { | 3616 res |
| 3617 .list(arg_appsId, |
| 3618 pageToken: arg_pageToken, |
| 3619 pageSize: arg_pageSize, |
| 3620 filter: arg_filter) |
| 3621 .then(unittest.expectAsync1(((api.ListLocationsResponse response) { |
2445 checkListLocationsResponse(response); | 3622 checkListLocationsResponse(response); |
2446 }))); | 3623 }))); |
2447 }); | 3624 }); |
2448 | |
2449 }); | 3625 }); |
2450 | 3626 |
2451 | |
2452 unittest.group("resource-AppsOperationsResourceApi", () { | 3627 unittest.group("resource-AppsOperationsResourceApi", () { |
2453 unittest.test("method--get", () { | 3628 unittest.test("method--get", () { |
2454 | |
2455 var mock = new HttpServerMock(); | 3629 var mock = new HttpServerMock(); |
2456 api.AppsOperationsResourceApi res = new api.AppengineApi(mock).apps.operat
ions; | 3630 api.AppsOperationsResourceApi res = |
| 3631 new api.AppengineApi(mock).apps.operations; |
2457 var arg_appsId = "foo"; | 3632 var arg_appsId = "foo"; |
2458 var arg_operationsId = "foo"; | 3633 var arg_operationsId = "foo"; |
2459 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 3634 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
2460 var path = (req.url).path; | 3635 var path = (req.url).path; |
2461 var pathOffset = 0; | 3636 var pathOffset = 0; |
2462 var index; | 3637 var index; |
2463 var subPart; | 3638 var subPart; |
2464 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3639 unittest.expect( |
| 3640 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
2465 pathOffset += 1; | 3641 pathOffset += 1; |
2466 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1/apps/")); | 3642 unittest.expect(path.substring(pathOffset, pathOffset + 8), |
| 3643 unittest.equals("v1/apps/")); |
2467 pathOffset += 8; | 3644 pathOffset += 8; |
2468 index = path.indexOf("/operations/", pathOffset); | 3645 index = path.indexOf("/operations/", pathOffset); |
2469 unittest.expect(index >= 0, unittest.isTrue); | 3646 unittest.expect(index >= 0, unittest.isTrue); |
2470 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 3647 subPart = |
| 3648 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
2471 pathOffset = index; | 3649 pathOffset = index; |
2472 unittest.expect(subPart, unittest.equals("$arg_appsId")); | 3650 unittest.expect(subPart, unittest.equals("$arg_appsId")); |
2473 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("/operations/")); | 3651 unittest.expect(path.substring(pathOffset, pathOffset + 12), |
| 3652 unittest.equals("/operations/")); |
2474 pathOffset += 12; | 3653 pathOffset += 12; |
2475 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | 3654 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
2476 pathOffset = path.length; | 3655 pathOffset = path.length; |
2477 unittest.expect(subPart, unittest.equals("$arg_operationsId")); | 3656 unittest.expect(subPart, unittest.equals("$arg_operationsId")); |
2478 | 3657 |
2479 var query = (req.url).query; | 3658 var query = (req.url).query; |
2480 var queryOffset = 0; | 3659 var queryOffset = 0; |
2481 var queryMap = {}; | 3660 var queryMap = {}; |
2482 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 3661 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
2483 parseBool(n) { | 3662 parseBool(n) { |
2484 if (n == "true") return true; | 3663 if (n == "true") return true; |
2485 if (n == "false") return false; | 3664 if (n == "false") return false; |
2486 if (n == null) return null; | 3665 if (n == null) return null; |
2487 throw new core.ArgumentError("Invalid boolean: $n"); | 3666 throw new core.ArgumentError("Invalid boolean: $n"); |
2488 } | 3667 } |
| 3668 |
2489 if (query.length > 0) { | 3669 if (query.length > 0) { |
2490 for (var part in query.split("&")) { | 3670 for (var part in query.split("&")) { |
2491 var keyvalue = part.split("="); | 3671 var keyvalue = part.split("="); |
2492 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 3672 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 3673 core.Uri.decodeQueryComponent(keyvalue[1])); |
2493 } | 3674 } |
2494 } | 3675 } |
2495 | 3676 |
2496 | |
2497 var h = { | 3677 var h = { |
2498 "content-type" : "application/json; charset=utf-8", | 3678 "content-type": "application/json; charset=utf-8", |
2499 }; | 3679 }; |
2500 var resp = convert.JSON.encode(buildOperation()); | 3680 var resp = convert.JSON.encode(buildOperation()); |
2501 return new async.Future.value(stringResponse(200, h, resp)); | 3681 return new async.Future.value(stringResponse(200, h, resp)); |
2502 }), true); | 3682 }), true); |
2503 res.get(arg_appsId, arg_operationsId).then(unittest.expectAsync1(((api.Ope
ration response) { | 3683 res |
| 3684 .get(arg_appsId, arg_operationsId) |
| 3685 .then(unittest.expectAsync1(((api.Operation response) { |
2504 checkOperation(response); | 3686 checkOperation(response); |
2505 }))); | 3687 }))); |
2506 }); | 3688 }); |
2507 | 3689 |
2508 unittest.test("method--list", () { | 3690 unittest.test("method--list", () { |
2509 | |
2510 var mock = new HttpServerMock(); | 3691 var mock = new HttpServerMock(); |
2511 api.AppsOperationsResourceApi res = new api.AppengineApi(mock).apps.operat
ions; | 3692 api.AppsOperationsResourceApi res = |
| 3693 new api.AppengineApi(mock).apps.operations; |
2512 var arg_appsId = "foo"; | 3694 var arg_appsId = "foo"; |
2513 var arg_filter = "foo"; | 3695 var arg_filter = "foo"; |
2514 var arg_pageToken = "foo"; | 3696 var arg_pageToken = "foo"; |
2515 var arg_pageSize = 42; | 3697 var arg_pageSize = 42; |
2516 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 3698 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
2517 var path = (req.url).path; | 3699 var path = (req.url).path; |
2518 var pathOffset = 0; | 3700 var pathOffset = 0; |
2519 var index; | 3701 var index; |
2520 var subPart; | 3702 var subPart; |
2521 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3703 unittest.expect( |
| 3704 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
2522 pathOffset += 1; | 3705 pathOffset += 1; |
2523 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1/apps/")); | 3706 unittest.expect(path.substring(pathOffset, pathOffset + 8), |
| 3707 unittest.equals("v1/apps/")); |
2524 pathOffset += 8; | 3708 pathOffset += 8; |
2525 index = path.indexOf("/operations", pathOffset); | 3709 index = path.indexOf("/operations", pathOffset); |
2526 unittest.expect(index >= 0, unittest.isTrue); | 3710 unittest.expect(index >= 0, unittest.isTrue); |
2527 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 3711 subPart = |
| 3712 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
2528 pathOffset = index; | 3713 pathOffset = index; |
2529 unittest.expect(subPart, unittest.equals("$arg_appsId")); | 3714 unittest.expect(subPart, unittest.equals("$arg_appsId")); |
2530 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("/operations")); | 3715 unittest.expect(path.substring(pathOffset, pathOffset + 11), |
| 3716 unittest.equals("/operations")); |
2531 pathOffset += 11; | 3717 pathOffset += 11; |
2532 | 3718 |
2533 var query = (req.url).query; | 3719 var query = (req.url).query; |
2534 var queryOffset = 0; | 3720 var queryOffset = 0; |
2535 var queryMap = {}; | 3721 var queryMap = {}; |
2536 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 3722 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
2537 parseBool(n) { | 3723 parseBool(n) { |
2538 if (n == "true") return true; | 3724 if (n == "true") return true; |
2539 if (n == "false") return false; | 3725 if (n == "false") return false; |
2540 if (n == null) return null; | 3726 if (n == null) return null; |
2541 throw new core.ArgumentError("Invalid boolean: $n"); | 3727 throw new core.ArgumentError("Invalid boolean: $n"); |
2542 } | 3728 } |
| 3729 |
2543 if (query.length > 0) { | 3730 if (query.length > 0) { |
2544 for (var part in query.split("&")) { | 3731 for (var part in query.split("&")) { |
2545 var keyvalue = part.split("="); | 3732 var keyvalue = part.split("="); |
2546 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 3733 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 3734 core.Uri.decodeQueryComponent(keyvalue[1])); |
2547 } | 3735 } |
2548 } | 3736 } |
2549 unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); | 3737 unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); |
2550 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 3738 unittest.expect( |
2551 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); | 3739 queryMap["pageToken"].first, unittest.equals(arg_pageToken)); |
2552 | 3740 unittest.expect(core.int.parse(queryMap["pageSize"].first), |
| 3741 unittest.equals(arg_pageSize)); |
2553 | 3742 |
2554 var h = { | 3743 var h = { |
2555 "content-type" : "application/json; charset=utf-8", | 3744 "content-type": "application/json; charset=utf-8", |
2556 }; | 3745 }; |
2557 var resp = convert.JSON.encode(buildListOperationsResponse()); | 3746 var resp = convert.JSON.encode(buildListOperationsResponse()); |
2558 return new async.Future.value(stringResponse(200, h, resp)); | 3747 return new async.Future.value(stringResponse(200, h, resp)); |
2559 }), true); | 3748 }), true); |
2560 res.list(arg_appsId, filter: arg_filter, pageToken: arg_pageToken, pageSiz
e: arg_pageSize).then(unittest.expectAsync1(((api.ListOperationsResponse respons
e) { | 3749 res |
| 3750 .list(arg_appsId, |
| 3751 filter: arg_filter, |
| 3752 pageToken: arg_pageToken, |
| 3753 pageSize: arg_pageSize) |
| 3754 .then(unittest.expectAsync1(((api.ListOperationsResponse response) { |
2561 checkListOperationsResponse(response); | 3755 checkListOperationsResponse(response); |
2562 }))); | 3756 }))); |
2563 }); | 3757 }); |
2564 | |
2565 }); | 3758 }); |
2566 | 3759 |
2567 | |
2568 unittest.group("resource-AppsServicesResourceApi", () { | 3760 unittest.group("resource-AppsServicesResourceApi", () { |
2569 unittest.test("method--delete", () { | 3761 unittest.test("method--delete", () { |
2570 | |
2571 var mock = new HttpServerMock(); | 3762 var mock = new HttpServerMock(); |
2572 api.AppsServicesResourceApi res = new api.AppengineApi(mock).apps.services
; | 3763 api.AppsServicesResourceApi res = |
| 3764 new api.AppengineApi(mock).apps.services; |
2573 var arg_appsId = "foo"; | 3765 var arg_appsId = "foo"; |
2574 var arg_servicesId = "foo"; | 3766 var arg_servicesId = "foo"; |
2575 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 3767 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
2576 var path = (req.url).path; | 3768 var path = (req.url).path; |
2577 var pathOffset = 0; | 3769 var pathOffset = 0; |
2578 var index; | 3770 var index; |
2579 var subPart; | 3771 var subPart; |
2580 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3772 unittest.expect( |
| 3773 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
2581 pathOffset += 1; | 3774 pathOffset += 1; |
2582 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1/apps/")); | 3775 unittest.expect(path.substring(pathOffset, pathOffset + 8), |
| 3776 unittest.equals("v1/apps/")); |
2583 pathOffset += 8; | 3777 pathOffset += 8; |
2584 index = path.indexOf("/services/", pathOffset); | 3778 index = path.indexOf("/services/", pathOffset); |
2585 unittest.expect(index >= 0, unittest.isTrue); | 3779 unittest.expect(index >= 0, unittest.isTrue); |
2586 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 3780 subPart = |
| 3781 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
2587 pathOffset = index; | 3782 pathOffset = index; |
2588 unittest.expect(subPart, unittest.equals("$arg_appsId")); | 3783 unittest.expect(subPart, unittest.equals("$arg_appsId")); |
2589 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/services/")); | 3784 unittest.expect(path.substring(pathOffset, pathOffset + 10), |
| 3785 unittest.equals("/services/")); |
2590 pathOffset += 10; | 3786 pathOffset += 10; |
2591 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | 3787 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
2592 pathOffset = path.length; | 3788 pathOffset = path.length; |
2593 unittest.expect(subPart, unittest.equals("$arg_servicesId")); | 3789 unittest.expect(subPart, unittest.equals("$arg_servicesId")); |
2594 | 3790 |
2595 var query = (req.url).query; | 3791 var query = (req.url).query; |
2596 var queryOffset = 0; | 3792 var queryOffset = 0; |
2597 var queryMap = {}; | 3793 var queryMap = {}; |
2598 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 3794 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
2599 parseBool(n) { | 3795 parseBool(n) { |
2600 if (n == "true") return true; | 3796 if (n == "true") return true; |
2601 if (n == "false") return false; | 3797 if (n == "false") return false; |
2602 if (n == null) return null; | 3798 if (n == null) return null; |
2603 throw new core.ArgumentError("Invalid boolean: $n"); | 3799 throw new core.ArgumentError("Invalid boolean: $n"); |
2604 } | 3800 } |
| 3801 |
2605 if (query.length > 0) { | 3802 if (query.length > 0) { |
2606 for (var part in query.split("&")) { | 3803 for (var part in query.split("&")) { |
2607 var keyvalue = part.split("="); | 3804 var keyvalue = part.split("="); |
2608 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 3805 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 3806 core.Uri.decodeQueryComponent(keyvalue[1])); |
2609 } | 3807 } |
2610 } | 3808 } |
2611 | 3809 |
2612 | |
2613 var h = { | 3810 var h = { |
2614 "content-type" : "application/json; charset=utf-8", | 3811 "content-type": "application/json; charset=utf-8", |
2615 }; | 3812 }; |
2616 var resp = convert.JSON.encode(buildOperation()); | 3813 var resp = convert.JSON.encode(buildOperation()); |
2617 return new async.Future.value(stringResponse(200, h, resp)); | 3814 return new async.Future.value(stringResponse(200, h, resp)); |
2618 }), true); | 3815 }), true); |
2619 res.delete(arg_appsId, arg_servicesId).then(unittest.expectAsync1(((api.Op
eration response) { | 3816 res |
| 3817 .delete(arg_appsId, arg_servicesId) |
| 3818 .then(unittest.expectAsync1(((api.Operation response) { |
2620 checkOperation(response); | 3819 checkOperation(response); |
2621 }))); | 3820 }))); |
2622 }); | 3821 }); |
2623 | 3822 |
2624 unittest.test("method--get", () { | 3823 unittest.test("method--get", () { |
2625 | |
2626 var mock = new HttpServerMock(); | 3824 var mock = new HttpServerMock(); |
2627 api.AppsServicesResourceApi res = new api.AppengineApi(mock).apps.services
; | 3825 api.AppsServicesResourceApi res = |
| 3826 new api.AppengineApi(mock).apps.services; |
2628 var arg_appsId = "foo"; | 3827 var arg_appsId = "foo"; |
2629 var arg_servicesId = "foo"; | 3828 var arg_servicesId = "foo"; |
2630 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 3829 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
2631 var path = (req.url).path; | 3830 var path = (req.url).path; |
2632 var pathOffset = 0; | 3831 var pathOffset = 0; |
2633 var index; | 3832 var index; |
2634 var subPart; | 3833 var subPart; |
2635 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3834 unittest.expect( |
| 3835 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
2636 pathOffset += 1; | 3836 pathOffset += 1; |
2637 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1/apps/")); | 3837 unittest.expect(path.substring(pathOffset, pathOffset + 8), |
| 3838 unittest.equals("v1/apps/")); |
2638 pathOffset += 8; | 3839 pathOffset += 8; |
2639 index = path.indexOf("/services/", pathOffset); | 3840 index = path.indexOf("/services/", pathOffset); |
2640 unittest.expect(index >= 0, unittest.isTrue); | 3841 unittest.expect(index >= 0, unittest.isTrue); |
2641 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 3842 subPart = |
| 3843 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
2642 pathOffset = index; | 3844 pathOffset = index; |
2643 unittest.expect(subPart, unittest.equals("$arg_appsId")); | 3845 unittest.expect(subPart, unittest.equals("$arg_appsId")); |
2644 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/services/")); | 3846 unittest.expect(path.substring(pathOffset, pathOffset + 10), |
| 3847 unittest.equals("/services/")); |
2645 pathOffset += 10; | 3848 pathOffset += 10; |
2646 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | 3849 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
2647 pathOffset = path.length; | 3850 pathOffset = path.length; |
2648 unittest.expect(subPart, unittest.equals("$arg_servicesId")); | 3851 unittest.expect(subPart, unittest.equals("$arg_servicesId")); |
2649 | 3852 |
2650 var query = (req.url).query; | 3853 var query = (req.url).query; |
2651 var queryOffset = 0; | 3854 var queryOffset = 0; |
2652 var queryMap = {}; | 3855 var queryMap = {}; |
2653 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 3856 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
2654 parseBool(n) { | 3857 parseBool(n) { |
2655 if (n == "true") return true; | 3858 if (n == "true") return true; |
2656 if (n == "false") return false; | 3859 if (n == "false") return false; |
2657 if (n == null) return null; | 3860 if (n == null) return null; |
2658 throw new core.ArgumentError("Invalid boolean: $n"); | 3861 throw new core.ArgumentError("Invalid boolean: $n"); |
2659 } | 3862 } |
| 3863 |
2660 if (query.length > 0) { | 3864 if (query.length > 0) { |
2661 for (var part in query.split("&")) { | 3865 for (var part in query.split("&")) { |
2662 var keyvalue = part.split("="); | 3866 var keyvalue = part.split("="); |
2663 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 3867 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 3868 core.Uri.decodeQueryComponent(keyvalue[1])); |
2664 } | 3869 } |
2665 } | 3870 } |
2666 | 3871 |
2667 | |
2668 var h = { | 3872 var h = { |
2669 "content-type" : "application/json; charset=utf-8", | 3873 "content-type": "application/json; charset=utf-8", |
2670 }; | 3874 }; |
2671 var resp = convert.JSON.encode(buildService()); | 3875 var resp = convert.JSON.encode(buildService()); |
2672 return new async.Future.value(stringResponse(200, h, resp)); | 3876 return new async.Future.value(stringResponse(200, h, resp)); |
2673 }), true); | 3877 }), true); |
2674 res.get(arg_appsId, arg_servicesId).then(unittest.expectAsync1(((api.Servi
ce response) { | 3878 res |
| 3879 .get(arg_appsId, arg_servicesId) |
| 3880 .then(unittest.expectAsync1(((api.Service response) { |
2675 checkService(response); | 3881 checkService(response); |
2676 }))); | 3882 }))); |
2677 }); | 3883 }); |
2678 | 3884 |
2679 unittest.test("method--list", () { | 3885 unittest.test("method--list", () { |
2680 | |
2681 var mock = new HttpServerMock(); | 3886 var mock = new HttpServerMock(); |
2682 api.AppsServicesResourceApi res = new api.AppengineApi(mock).apps.services
; | 3887 api.AppsServicesResourceApi res = |
| 3888 new api.AppengineApi(mock).apps.services; |
2683 var arg_appsId = "foo"; | 3889 var arg_appsId = "foo"; |
2684 var arg_pageToken = "foo"; | 3890 var arg_pageToken = "foo"; |
2685 var arg_pageSize = 42; | 3891 var arg_pageSize = 42; |
2686 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 3892 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
2687 var path = (req.url).path; | 3893 var path = (req.url).path; |
2688 var pathOffset = 0; | 3894 var pathOffset = 0; |
2689 var index; | 3895 var index; |
2690 var subPart; | 3896 var subPart; |
2691 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3897 unittest.expect( |
| 3898 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
2692 pathOffset += 1; | 3899 pathOffset += 1; |
2693 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1/apps/")); | 3900 unittest.expect(path.substring(pathOffset, pathOffset + 8), |
| 3901 unittest.equals("v1/apps/")); |
2694 pathOffset += 8; | 3902 pathOffset += 8; |
2695 index = path.indexOf("/services", pathOffset); | 3903 index = path.indexOf("/services", pathOffset); |
2696 unittest.expect(index >= 0, unittest.isTrue); | 3904 unittest.expect(index >= 0, unittest.isTrue); |
2697 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 3905 subPart = |
| 3906 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
2698 pathOffset = index; | 3907 pathOffset = index; |
2699 unittest.expect(subPart, unittest.equals("$arg_appsId")); | 3908 unittest.expect(subPart, unittest.equals("$arg_appsId")); |
2700 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("/services")); | 3909 unittest.expect(path.substring(pathOffset, pathOffset + 9), |
| 3910 unittest.equals("/services")); |
2701 pathOffset += 9; | 3911 pathOffset += 9; |
2702 | 3912 |
2703 var query = (req.url).query; | 3913 var query = (req.url).query; |
2704 var queryOffset = 0; | 3914 var queryOffset = 0; |
2705 var queryMap = {}; | 3915 var queryMap = {}; |
2706 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 3916 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
2707 parseBool(n) { | 3917 parseBool(n) { |
2708 if (n == "true") return true; | 3918 if (n == "true") return true; |
2709 if (n == "false") return false; | 3919 if (n == "false") return false; |
2710 if (n == null) return null; | 3920 if (n == null) return null; |
2711 throw new core.ArgumentError("Invalid boolean: $n"); | 3921 throw new core.ArgumentError("Invalid boolean: $n"); |
2712 } | 3922 } |
| 3923 |
2713 if (query.length > 0) { | 3924 if (query.length > 0) { |
2714 for (var part in query.split("&")) { | 3925 for (var part in query.split("&")) { |
2715 var keyvalue = part.split("="); | 3926 var keyvalue = part.split("="); |
2716 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 3927 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 3928 core.Uri.decodeQueryComponent(keyvalue[1])); |
2717 } | 3929 } |
2718 } | 3930 } |
2719 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 3931 unittest.expect( |
2720 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); | 3932 queryMap["pageToken"].first, unittest.equals(arg_pageToken)); |
2721 | 3933 unittest.expect(core.int.parse(queryMap["pageSize"].first), |
| 3934 unittest.equals(arg_pageSize)); |
2722 | 3935 |
2723 var h = { | 3936 var h = { |
2724 "content-type" : "application/json; charset=utf-8", | 3937 "content-type": "application/json; charset=utf-8", |
2725 }; | 3938 }; |
2726 var resp = convert.JSON.encode(buildListServicesResponse()); | 3939 var resp = convert.JSON.encode(buildListServicesResponse()); |
2727 return new async.Future.value(stringResponse(200, h, resp)); | 3940 return new async.Future.value(stringResponse(200, h, resp)); |
2728 }), true); | 3941 }), true); |
2729 res.list(arg_appsId, pageToken: arg_pageToken, pageSize: arg_pageSize).the
n(unittest.expectAsync1(((api.ListServicesResponse response) { | 3942 res |
| 3943 .list(arg_appsId, pageToken: arg_pageToken, pageSize: arg_pageSize) |
| 3944 .then(unittest.expectAsync1(((api.ListServicesResponse response) { |
2730 checkListServicesResponse(response); | 3945 checkListServicesResponse(response); |
2731 }))); | 3946 }))); |
2732 }); | 3947 }); |
2733 | 3948 |
2734 unittest.test("method--patch", () { | 3949 unittest.test("method--patch", () { |
2735 | |
2736 var mock = new HttpServerMock(); | 3950 var mock = new HttpServerMock(); |
2737 api.AppsServicesResourceApi res = new api.AppengineApi(mock).apps.services
; | 3951 api.AppsServicesResourceApi res = |
| 3952 new api.AppengineApi(mock).apps.services; |
2738 var arg_request = buildService(); | 3953 var arg_request = buildService(); |
2739 var arg_appsId = "foo"; | 3954 var arg_appsId = "foo"; |
2740 var arg_servicesId = "foo"; | 3955 var arg_servicesId = "foo"; |
| 3956 var arg_updateMask = "foo"; |
2741 var arg_migrateTraffic = true; | 3957 var arg_migrateTraffic = true; |
2742 var arg_updateMask = "foo"; | |
2743 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 3958 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
2744 var obj = new api.Service.fromJson(json); | 3959 var obj = new api.Service.fromJson(json); |
2745 checkService(obj); | 3960 checkService(obj); |
2746 | 3961 |
2747 var path = (req.url).path; | 3962 var path = (req.url).path; |
2748 var pathOffset = 0; | 3963 var pathOffset = 0; |
2749 var index; | 3964 var index; |
2750 var subPart; | 3965 var subPart; |
2751 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3966 unittest.expect( |
| 3967 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
2752 pathOffset += 1; | 3968 pathOffset += 1; |
2753 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1/apps/")); | 3969 unittest.expect(path.substring(pathOffset, pathOffset + 8), |
| 3970 unittest.equals("v1/apps/")); |
2754 pathOffset += 8; | 3971 pathOffset += 8; |
2755 index = path.indexOf("/services/", pathOffset); | 3972 index = path.indexOf("/services/", pathOffset); |
2756 unittest.expect(index >= 0, unittest.isTrue); | 3973 unittest.expect(index >= 0, unittest.isTrue); |
2757 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 3974 subPart = |
| 3975 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
2758 pathOffset = index; | 3976 pathOffset = index; |
2759 unittest.expect(subPart, unittest.equals("$arg_appsId")); | 3977 unittest.expect(subPart, unittest.equals("$arg_appsId")); |
2760 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/services/")); | 3978 unittest.expect(path.substring(pathOffset, pathOffset + 10), |
| 3979 unittest.equals("/services/")); |
2761 pathOffset += 10; | 3980 pathOffset += 10; |
2762 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | 3981 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
2763 pathOffset = path.length; | 3982 pathOffset = path.length; |
2764 unittest.expect(subPart, unittest.equals("$arg_servicesId")); | 3983 unittest.expect(subPart, unittest.equals("$arg_servicesId")); |
2765 | 3984 |
2766 var query = (req.url).query; | 3985 var query = (req.url).query; |
2767 var queryOffset = 0; | 3986 var queryOffset = 0; |
2768 var queryMap = {}; | 3987 var queryMap = {}; |
2769 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 3988 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
2770 parseBool(n) { | 3989 parseBool(n) { |
2771 if (n == "true") return true; | 3990 if (n == "true") return true; |
2772 if (n == "false") return false; | 3991 if (n == "false") return false; |
2773 if (n == null) return null; | 3992 if (n == null) return null; |
2774 throw new core.ArgumentError("Invalid boolean: $n"); | 3993 throw new core.ArgumentError("Invalid boolean: $n"); |
2775 } | 3994 } |
| 3995 |
2776 if (query.length > 0) { | 3996 if (query.length > 0) { |
2777 for (var part in query.split("&")) { | 3997 for (var part in query.split("&")) { |
2778 var keyvalue = part.split("="); | 3998 var keyvalue = part.split("="); |
2779 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 3999 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 4000 core.Uri.decodeQueryComponent(keyvalue[1])); |
2780 } | 4001 } |
2781 } | 4002 } |
2782 unittest.expect(queryMap["migrateTraffic"].first, unittest.equals("$arg_
migrateTraffic")); | 4003 unittest.expect( |
2783 unittest.expect(queryMap["updateMask"].first, unittest.equals(arg_update
Mask)); | 4004 queryMap["updateMask"].first, unittest.equals(arg_updateMask)); |
2784 | 4005 unittest.expect(queryMap["migrateTraffic"].first, |
| 4006 unittest.equals("$arg_migrateTraffic")); |
2785 | 4007 |
2786 var h = { | 4008 var h = { |
2787 "content-type" : "application/json; charset=utf-8", | 4009 "content-type": "application/json; charset=utf-8", |
2788 }; | 4010 }; |
2789 var resp = convert.JSON.encode(buildOperation()); | 4011 var resp = convert.JSON.encode(buildOperation()); |
2790 return new async.Future.value(stringResponse(200, h, resp)); | 4012 return new async.Future.value(stringResponse(200, h, resp)); |
2791 }), true); | 4013 }), true); |
2792 res.patch(arg_request, arg_appsId, arg_servicesId, migrateTraffic: arg_mig
rateTraffic, updateMask: arg_updateMask).then(unittest.expectAsync1(((api.Operat
ion response) { | 4014 res |
| 4015 .patch(arg_request, arg_appsId, arg_servicesId, |
| 4016 updateMask: arg_updateMask, migrateTraffic: arg_migrateTraffic) |
| 4017 .then(unittest.expectAsync1(((api.Operation response) { |
2793 checkOperation(response); | 4018 checkOperation(response); |
2794 }))); | 4019 }))); |
2795 }); | 4020 }); |
2796 | |
2797 }); | 4021 }); |
2798 | 4022 |
2799 | |
2800 unittest.group("resource-AppsServicesVersionsResourceApi", () { | 4023 unittest.group("resource-AppsServicesVersionsResourceApi", () { |
2801 unittest.test("method--create", () { | 4024 unittest.test("method--create", () { |
2802 | |
2803 var mock = new HttpServerMock(); | 4025 var mock = new HttpServerMock(); |
2804 api.AppsServicesVersionsResourceApi res = new api.AppengineApi(mock).apps.
services.versions; | 4026 api.AppsServicesVersionsResourceApi res = |
| 4027 new api.AppengineApi(mock).apps.services.versions; |
2805 var arg_request = buildVersion(); | 4028 var arg_request = buildVersion(); |
2806 var arg_appsId = "foo"; | 4029 var arg_appsId = "foo"; |
2807 var arg_servicesId = "foo"; | 4030 var arg_servicesId = "foo"; |
2808 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 4031 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
2809 var obj = new api.Version.fromJson(json); | 4032 var obj = new api.Version.fromJson(json); |
2810 checkVersion(obj); | 4033 checkVersion(obj); |
2811 | 4034 |
2812 var path = (req.url).path; | 4035 var path = (req.url).path; |
2813 var pathOffset = 0; | 4036 var pathOffset = 0; |
2814 var index; | 4037 var index; |
2815 var subPart; | 4038 var subPart; |
2816 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 4039 unittest.expect( |
| 4040 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
2817 pathOffset += 1; | 4041 pathOffset += 1; |
2818 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1/apps/")); | 4042 unittest.expect(path.substring(pathOffset, pathOffset + 8), |
| 4043 unittest.equals("v1/apps/")); |
2819 pathOffset += 8; | 4044 pathOffset += 8; |
2820 index = path.indexOf("/services/", pathOffset); | 4045 index = path.indexOf("/services/", pathOffset); |
2821 unittest.expect(index >= 0, unittest.isTrue); | 4046 unittest.expect(index >= 0, unittest.isTrue); |
2822 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 4047 subPart = |
| 4048 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
2823 pathOffset = index; | 4049 pathOffset = index; |
2824 unittest.expect(subPart, unittest.equals("$arg_appsId")); | 4050 unittest.expect(subPart, unittest.equals("$arg_appsId")); |
2825 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/services/")); | 4051 unittest.expect(path.substring(pathOffset, pathOffset + 10), |
| 4052 unittest.equals("/services/")); |
2826 pathOffset += 10; | 4053 pathOffset += 10; |
2827 index = path.indexOf("/versions", pathOffset); | 4054 index = path.indexOf("/versions", pathOffset); |
2828 unittest.expect(index >= 0, unittest.isTrue); | 4055 unittest.expect(index >= 0, unittest.isTrue); |
2829 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 4056 subPart = |
| 4057 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
2830 pathOffset = index; | 4058 pathOffset = index; |
2831 unittest.expect(subPart, unittest.equals("$arg_servicesId")); | 4059 unittest.expect(subPart, unittest.equals("$arg_servicesId")); |
2832 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("/versions")); | 4060 unittest.expect(path.substring(pathOffset, pathOffset + 9), |
| 4061 unittest.equals("/versions")); |
2833 pathOffset += 9; | 4062 pathOffset += 9; |
2834 | 4063 |
2835 var query = (req.url).query; | 4064 var query = (req.url).query; |
2836 var queryOffset = 0; | 4065 var queryOffset = 0; |
2837 var queryMap = {}; | 4066 var queryMap = {}; |
2838 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 4067 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
2839 parseBool(n) { | 4068 parseBool(n) { |
2840 if (n == "true") return true; | 4069 if (n == "true") return true; |
2841 if (n == "false") return false; | 4070 if (n == "false") return false; |
2842 if (n == null) return null; | 4071 if (n == null) return null; |
2843 throw new core.ArgumentError("Invalid boolean: $n"); | 4072 throw new core.ArgumentError("Invalid boolean: $n"); |
2844 } | 4073 } |
| 4074 |
2845 if (query.length > 0) { | 4075 if (query.length > 0) { |
2846 for (var part in query.split("&")) { | 4076 for (var part in query.split("&")) { |
2847 var keyvalue = part.split("="); | 4077 var keyvalue = part.split("="); |
2848 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 4078 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 4079 core.Uri.decodeQueryComponent(keyvalue[1])); |
2849 } | 4080 } |
2850 } | 4081 } |
2851 | 4082 |
2852 | |
2853 var h = { | 4083 var h = { |
2854 "content-type" : "application/json; charset=utf-8", | 4084 "content-type": "application/json; charset=utf-8", |
2855 }; | 4085 }; |
2856 var resp = convert.JSON.encode(buildOperation()); | 4086 var resp = convert.JSON.encode(buildOperation()); |
2857 return new async.Future.value(stringResponse(200, h, resp)); | 4087 return new async.Future.value(stringResponse(200, h, resp)); |
2858 }), true); | 4088 }), true); |
2859 res.create(arg_request, arg_appsId, arg_servicesId).then(unittest.expectAs
ync1(((api.Operation response) { | 4089 res |
| 4090 .create(arg_request, arg_appsId, arg_servicesId) |
| 4091 .then(unittest.expectAsync1(((api.Operation response) { |
2860 checkOperation(response); | 4092 checkOperation(response); |
2861 }))); | 4093 }))); |
2862 }); | 4094 }); |
2863 | 4095 |
2864 unittest.test("method--delete", () { | 4096 unittest.test("method--delete", () { |
2865 | |
2866 var mock = new HttpServerMock(); | 4097 var mock = new HttpServerMock(); |
2867 api.AppsServicesVersionsResourceApi res = new api.AppengineApi(mock).apps.
services.versions; | 4098 api.AppsServicesVersionsResourceApi res = |
| 4099 new api.AppengineApi(mock).apps.services.versions; |
2868 var arg_appsId = "foo"; | 4100 var arg_appsId = "foo"; |
2869 var arg_servicesId = "foo"; | 4101 var arg_servicesId = "foo"; |
2870 var arg_versionsId = "foo"; | 4102 var arg_versionsId = "foo"; |
2871 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 4103 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
2872 var path = (req.url).path; | 4104 var path = (req.url).path; |
2873 var pathOffset = 0; | 4105 var pathOffset = 0; |
2874 var index; | 4106 var index; |
2875 var subPart; | 4107 var subPart; |
2876 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 4108 unittest.expect( |
| 4109 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
2877 pathOffset += 1; | 4110 pathOffset += 1; |
2878 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1/apps/")); | 4111 unittest.expect(path.substring(pathOffset, pathOffset + 8), |
| 4112 unittest.equals("v1/apps/")); |
2879 pathOffset += 8; | 4113 pathOffset += 8; |
2880 index = path.indexOf("/services/", pathOffset); | 4114 index = path.indexOf("/services/", pathOffset); |
2881 unittest.expect(index >= 0, unittest.isTrue); | 4115 unittest.expect(index >= 0, unittest.isTrue); |
2882 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 4116 subPart = |
| 4117 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
2883 pathOffset = index; | 4118 pathOffset = index; |
2884 unittest.expect(subPart, unittest.equals("$arg_appsId")); | 4119 unittest.expect(subPart, unittest.equals("$arg_appsId")); |
2885 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/services/")); | 4120 unittest.expect(path.substring(pathOffset, pathOffset + 10), |
| 4121 unittest.equals("/services/")); |
2886 pathOffset += 10; | 4122 pathOffset += 10; |
2887 index = path.indexOf("/versions/", pathOffset); | 4123 index = path.indexOf("/versions/", pathOffset); |
2888 unittest.expect(index >= 0, unittest.isTrue); | 4124 unittest.expect(index >= 0, unittest.isTrue); |
2889 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 4125 subPart = |
| 4126 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
2890 pathOffset = index; | 4127 pathOffset = index; |
2891 unittest.expect(subPart, unittest.equals("$arg_servicesId")); | 4128 unittest.expect(subPart, unittest.equals("$arg_servicesId")); |
2892 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/versions/")); | 4129 unittest.expect(path.substring(pathOffset, pathOffset + 10), |
| 4130 unittest.equals("/versions/")); |
2893 pathOffset += 10; | 4131 pathOffset += 10; |
2894 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | 4132 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
2895 pathOffset = path.length; | 4133 pathOffset = path.length; |
2896 unittest.expect(subPart, unittest.equals("$arg_versionsId")); | 4134 unittest.expect(subPart, unittest.equals("$arg_versionsId")); |
2897 | 4135 |
2898 var query = (req.url).query; | 4136 var query = (req.url).query; |
2899 var queryOffset = 0; | 4137 var queryOffset = 0; |
2900 var queryMap = {}; | 4138 var queryMap = {}; |
2901 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 4139 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
2902 parseBool(n) { | 4140 parseBool(n) { |
2903 if (n == "true") return true; | 4141 if (n == "true") return true; |
2904 if (n == "false") return false; | 4142 if (n == "false") return false; |
2905 if (n == null) return null; | 4143 if (n == null) return null; |
2906 throw new core.ArgumentError("Invalid boolean: $n"); | 4144 throw new core.ArgumentError("Invalid boolean: $n"); |
2907 } | 4145 } |
| 4146 |
2908 if (query.length > 0) { | 4147 if (query.length > 0) { |
2909 for (var part in query.split("&")) { | 4148 for (var part in query.split("&")) { |
2910 var keyvalue = part.split("="); | 4149 var keyvalue = part.split("="); |
2911 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 4150 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 4151 core.Uri.decodeQueryComponent(keyvalue[1])); |
2912 } | 4152 } |
2913 } | 4153 } |
2914 | 4154 |
2915 | |
2916 var h = { | 4155 var h = { |
2917 "content-type" : "application/json; charset=utf-8", | 4156 "content-type": "application/json; charset=utf-8", |
2918 }; | 4157 }; |
2919 var resp = convert.JSON.encode(buildOperation()); | 4158 var resp = convert.JSON.encode(buildOperation()); |
2920 return new async.Future.value(stringResponse(200, h, resp)); | 4159 return new async.Future.value(stringResponse(200, h, resp)); |
2921 }), true); | 4160 }), true); |
2922 res.delete(arg_appsId, arg_servicesId, arg_versionsId).then(unittest.expec
tAsync1(((api.Operation response) { | 4161 res |
| 4162 .delete(arg_appsId, arg_servicesId, arg_versionsId) |
| 4163 .then(unittest.expectAsync1(((api.Operation response) { |
2923 checkOperation(response); | 4164 checkOperation(response); |
2924 }))); | 4165 }))); |
2925 }); | 4166 }); |
2926 | 4167 |
2927 unittest.test("method--get", () { | 4168 unittest.test("method--get", () { |
2928 | |
2929 var mock = new HttpServerMock(); | 4169 var mock = new HttpServerMock(); |
2930 api.AppsServicesVersionsResourceApi res = new api.AppengineApi(mock).apps.
services.versions; | 4170 api.AppsServicesVersionsResourceApi res = |
| 4171 new api.AppengineApi(mock).apps.services.versions; |
2931 var arg_appsId = "foo"; | 4172 var arg_appsId = "foo"; |
2932 var arg_servicesId = "foo"; | 4173 var arg_servicesId = "foo"; |
2933 var arg_versionsId = "foo"; | 4174 var arg_versionsId = "foo"; |
2934 var arg_view = "foo"; | 4175 var arg_view = "foo"; |
2935 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 4176 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
2936 var path = (req.url).path; | 4177 var path = (req.url).path; |
2937 var pathOffset = 0; | 4178 var pathOffset = 0; |
2938 var index; | 4179 var index; |
2939 var subPart; | 4180 var subPart; |
2940 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 4181 unittest.expect( |
| 4182 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
2941 pathOffset += 1; | 4183 pathOffset += 1; |
2942 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1/apps/")); | 4184 unittest.expect(path.substring(pathOffset, pathOffset + 8), |
| 4185 unittest.equals("v1/apps/")); |
2943 pathOffset += 8; | 4186 pathOffset += 8; |
2944 index = path.indexOf("/services/", pathOffset); | 4187 index = path.indexOf("/services/", pathOffset); |
2945 unittest.expect(index >= 0, unittest.isTrue); | 4188 unittest.expect(index >= 0, unittest.isTrue); |
2946 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 4189 subPart = |
| 4190 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
2947 pathOffset = index; | 4191 pathOffset = index; |
2948 unittest.expect(subPart, unittest.equals("$arg_appsId")); | 4192 unittest.expect(subPart, unittest.equals("$arg_appsId")); |
2949 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/services/")); | 4193 unittest.expect(path.substring(pathOffset, pathOffset + 10), |
| 4194 unittest.equals("/services/")); |
2950 pathOffset += 10; | 4195 pathOffset += 10; |
2951 index = path.indexOf("/versions/", pathOffset); | 4196 index = path.indexOf("/versions/", pathOffset); |
2952 unittest.expect(index >= 0, unittest.isTrue); | 4197 unittest.expect(index >= 0, unittest.isTrue); |
2953 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 4198 subPart = |
| 4199 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
2954 pathOffset = index; | 4200 pathOffset = index; |
2955 unittest.expect(subPart, unittest.equals("$arg_servicesId")); | 4201 unittest.expect(subPart, unittest.equals("$arg_servicesId")); |
2956 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/versions/")); | 4202 unittest.expect(path.substring(pathOffset, pathOffset + 10), |
| 4203 unittest.equals("/versions/")); |
2957 pathOffset += 10; | 4204 pathOffset += 10; |
2958 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | 4205 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
2959 pathOffset = path.length; | 4206 pathOffset = path.length; |
2960 unittest.expect(subPart, unittest.equals("$arg_versionsId")); | 4207 unittest.expect(subPart, unittest.equals("$arg_versionsId")); |
2961 | 4208 |
2962 var query = (req.url).query; | 4209 var query = (req.url).query; |
2963 var queryOffset = 0; | 4210 var queryOffset = 0; |
2964 var queryMap = {}; | 4211 var queryMap = {}; |
2965 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 4212 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
2966 parseBool(n) { | 4213 parseBool(n) { |
2967 if (n == "true") return true; | 4214 if (n == "true") return true; |
2968 if (n == "false") return false; | 4215 if (n == "false") return false; |
2969 if (n == null) return null; | 4216 if (n == null) return null; |
2970 throw new core.ArgumentError("Invalid boolean: $n"); | 4217 throw new core.ArgumentError("Invalid boolean: $n"); |
2971 } | 4218 } |
| 4219 |
2972 if (query.length > 0) { | 4220 if (query.length > 0) { |
2973 for (var part in query.split("&")) { | 4221 for (var part in query.split("&")) { |
2974 var keyvalue = part.split("="); | 4222 var keyvalue = part.split("="); |
2975 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 4223 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 4224 core.Uri.decodeQueryComponent(keyvalue[1])); |
2976 } | 4225 } |
2977 } | 4226 } |
2978 unittest.expect(queryMap["view"].first, unittest.equals(arg_view)); | 4227 unittest.expect(queryMap["view"].first, unittest.equals(arg_view)); |
2979 | 4228 |
2980 | |
2981 var h = { | 4229 var h = { |
2982 "content-type" : "application/json; charset=utf-8", | 4230 "content-type": "application/json; charset=utf-8", |
2983 }; | 4231 }; |
2984 var resp = convert.JSON.encode(buildVersion()); | 4232 var resp = convert.JSON.encode(buildVersion()); |
2985 return new async.Future.value(stringResponse(200, h, resp)); | 4233 return new async.Future.value(stringResponse(200, h, resp)); |
2986 }), true); | 4234 }), true); |
2987 res.get(arg_appsId, arg_servicesId, arg_versionsId, view: arg_view).then(u
nittest.expectAsync1(((api.Version response) { | 4235 res |
| 4236 .get(arg_appsId, arg_servicesId, arg_versionsId, view: arg_view) |
| 4237 .then(unittest.expectAsync1(((api.Version response) { |
2988 checkVersion(response); | 4238 checkVersion(response); |
2989 }))); | 4239 }))); |
2990 }); | 4240 }); |
2991 | 4241 |
2992 unittest.test("method--list", () { | 4242 unittest.test("method--list", () { |
2993 | |
2994 var mock = new HttpServerMock(); | 4243 var mock = new HttpServerMock(); |
2995 api.AppsServicesVersionsResourceApi res = new api.AppengineApi(mock).apps.
services.versions; | 4244 api.AppsServicesVersionsResourceApi res = |
| 4245 new api.AppengineApi(mock).apps.services.versions; |
2996 var arg_appsId = "foo"; | 4246 var arg_appsId = "foo"; |
2997 var arg_servicesId = "foo"; | 4247 var arg_servicesId = "foo"; |
2998 var arg_pageToken = "foo"; | 4248 var arg_pageToken = "foo"; |
2999 var arg_pageSize = 42; | 4249 var arg_pageSize = 42; |
3000 var arg_view = "foo"; | 4250 var arg_view = "foo"; |
3001 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 4251 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
3002 var path = (req.url).path; | 4252 var path = (req.url).path; |
3003 var pathOffset = 0; | 4253 var pathOffset = 0; |
3004 var index; | 4254 var index; |
3005 var subPart; | 4255 var subPart; |
3006 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 4256 unittest.expect( |
| 4257 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
3007 pathOffset += 1; | 4258 pathOffset += 1; |
3008 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1/apps/")); | 4259 unittest.expect(path.substring(pathOffset, pathOffset + 8), |
| 4260 unittest.equals("v1/apps/")); |
3009 pathOffset += 8; | 4261 pathOffset += 8; |
3010 index = path.indexOf("/services/", pathOffset); | 4262 index = path.indexOf("/services/", pathOffset); |
3011 unittest.expect(index >= 0, unittest.isTrue); | 4263 unittest.expect(index >= 0, unittest.isTrue); |
3012 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 4264 subPart = |
| 4265 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
3013 pathOffset = index; | 4266 pathOffset = index; |
3014 unittest.expect(subPart, unittest.equals("$arg_appsId")); | 4267 unittest.expect(subPart, unittest.equals("$arg_appsId")); |
3015 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/services/")); | 4268 unittest.expect(path.substring(pathOffset, pathOffset + 10), |
| 4269 unittest.equals("/services/")); |
3016 pathOffset += 10; | 4270 pathOffset += 10; |
3017 index = path.indexOf("/versions", pathOffset); | 4271 index = path.indexOf("/versions", pathOffset); |
3018 unittest.expect(index >= 0, unittest.isTrue); | 4272 unittest.expect(index >= 0, unittest.isTrue); |
3019 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 4273 subPart = |
| 4274 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
3020 pathOffset = index; | 4275 pathOffset = index; |
3021 unittest.expect(subPart, unittest.equals("$arg_servicesId")); | 4276 unittest.expect(subPart, unittest.equals("$arg_servicesId")); |
3022 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("/versions")); | 4277 unittest.expect(path.substring(pathOffset, pathOffset + 9), |
| 4278 unittest.equals("/versions")); |
3023 pathOffset += 9; | 4279 pathOffset += 9; |
3024 | 4280 |
3025 var query = (req.url).query; | 4281 var query = (req.url).query; |
3026 var queryOffset = 0; | 4282 var queryOffset = 0; |
3027 var queryMap = {}; | 4283 var queryMap = {}; |
3028 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 4284 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
3029 parseBool(n) { | 4285 parseBool(n) { |
3030 if (n == "true") return true; | 4286 if (n == "true") return true; |
3031 if (n == "false") return false; | 4287 if (n == "false") return false; |
3032 if (n == null) return null; | 4288 if (n == null) return null; |
3033 throw new core.ArgumentError("Invalid boolean: $n"); | 4289 throw new core.ArgumentError("Invalid boolean: $n"); |
3034 } | 4290 } |
| 4291 |
3035 if (query.length > 0) { | 4292 if (query.length > 0) { |
3036 for (var part in query.split("&")) { | 4293 for (var part in query.split("&")) { |
3037 var keyvalue = part.split("="); | 4294 var keyvalue = part.split("="); |
3038 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 4295 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 4296 core.Uri.decodeQueryComponent(keyvalue[1])); |
3039 } | 4297 } |
3040 } | 4298 } |
3041 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 4299 unittest.expect( |
3042 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); | 4300 queryMap["pageToken"].first, unittest.equals(arg_pageToken)); |
| 4301 unittest.expect(core.int.parse(queryMap["pageSize"].first), |
| 4302 unittest.equals(arg_pageSize)); |
3043 unittest.expect(queryMap["view"].first, unittest.equals(arg_view)); | 4303 unittest.expect(queryMap["view"].first, unittest.equals(arg_view)); |
3044 | 4304 |
3045 | |
3046 var h = { | 4305 var h = { |
3047 "content-type" : "application/json; charset=utf-8", | 4306 "content-type": "application/json; charset=utf-8", |
3048 }; | 4307 }; |
3049 var resp = convert.JSON.encode(buildListVersionsResponse()); | 4308 var resp = convert.JSON.encode(buildListVersionsResponse()); |
3050 return new async.Future.value(stringResponse(200, h, resp)); | 4309 return new async.Future.value(stringResponse(200, h, resp)); |
3051 }), true); | 4310 }), true); |
3052 res.list(arg_appsId, arg_servicesId, pageToken: arg_pageToken, pageSize: a
rg_pageSize, view: arg_view).then(unittest.expectAsync1(((api.ListVersionsRespon
se response) { | 4311 res |
| 4312 .list(arg_appsId, arg_servicesId, |
| 4313 pageToken: arg_pageToken, pageSize: arg_pageSize, view: arg_view) |
| 4314 .then(unittest.expectAsync1(((api.ListVersionsResponse response) { |
3053 checkListVersionsResponse(response); | 4315 checkListVersionsResponse(response); |
3054 }))); | 4316 }))); |
3055 }); | 4317 }); |
3056 | 4318 |
3057 unittest.test("method--patch", () { | 4319 unittest.test("method--patch", () { |
3058 | |
3059 var mock = new HttpServerMock(); | 4320 var mock = new HttpServerMock(); |
3060 api.AppsServicesVersionsResourceApi res = new api.AppengineApi(mock).apps.
services.versions; | 4321 api.AppsServicesVersionsResourceApi res = |
| 4322 new api.AppengineApi(mock).apps.services.versions; |
3061 var arg_request = buildVersion(); | 4323 var arg_request = buildVersion(); |
3062 var arg_appsId = "foo"; | 4324 var arg_appsId = "foo"; |
3063 var arg_servicesId = "foo"; | 4325 var arg_servicesId = "foo"; |
3064 var arg_versionsId = "foo"; | 4326 var arg_versionsId = "foo"; |
3065 var arg_updateMask = "foo"; | 4327 var arg_updateMask = "foo"; |
3066 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 4328 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
3067 var obj = new api.Version.fromJson(json); | 4329 var obj = new api.Version.fromJson(json); |
3068 checkVersion(obj); | 4330 checkVersion(obj); |
3069 | 4331 |
3070 var path = (req.url).path; | 4332 var path = (req.url).path; |
3071 var pathOffset = 0; | 4333 var pathOffset = 0; |
3072 var index; | 4334 var index; |
3073 var subPart; | 4335 var subPart; |
3074 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 4336 unittest.expect( |
| 4337 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
3075 pathOffset += 1; | 4338 pathOffset += 1; |
3076 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1/apps/")); | 4339 unittest.expect(path.substring(pathOffset, pathOffset + 8), |
| 4340 unittest.equals("v1/apps/")); |
3077 pathOffset += 8; | 4341 pathOffset += 8; |
3078 index = path.indexOf("/services/", pathOffset); | 4342 index = path.indexOf("/services/", pathOffset); |
3079 unittest.expect(index >= 0, unittest.isTrue); | 4343 unittest.expect(index >= 0, unittest.isTrue); |
3080 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 4344 subPart = |
| 4345 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
3081 pathOffset = index; | 4346 pathOffset = index; |
3082 unittest.expect(subPart, unittest.equals("$arg_appsId")); | 4347 unittest.expect(subPart, unittest.equals("$arg_appsId")); |
3083 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/services/")); | 4348 unittest.expect(path.substring(pathOffset, pathOffset + 10), |
| 4349 unittest.equals("/services/")); |
3084 pathOffset += 10; | 4350 pathOffset += 10; |
3085 index = path.indexOf("/versions/", pathOffset); | 4351 index = path.indexOf("/versions/", pathOffset); |
3086 unittest.expect(index >= 0, unittest.isTrue); | 4352 unittest.expect(index >= 0, unittest.isTrue); |
3087 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 4353 subPart = |
| 4354 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
3088 pathOffset = index; | 4355 pathOffset = index; |
3089 unittest.expect(subPart, unittest.equals("$arg_servicesId")); | 4356 unittest.expect(subPart, unittest.equals("$arg_servicesId")); |
3090 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/versions/")); | 4357 unittest.expect(path.substring(pathOffset, pathOffset + 10), |
| 4358 unittest.equals("/versions/")); |
3091 pathOffset += 10; | 4359 pathOffset += 10; |
3092 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | 4360 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
3093 pathOffset = path.length; | 4361 pathOffset = path.length; |
3094 unittest.expect(subPart, unittest.equals("$arg_versionsId")); | 4362 unittest.expect(subPart, unittest.equals("$arg_versionsId")); |
3095 | 4363 |
3096 var query = (req.url).query; | 4364 var query = (req.url).query; |
3097 var queryOffset = 0; | 4365 var queryOffset = 0; |
3098 var queryMap = {}; | 4366 var queryMap = {}; |
3099 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 4367 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
3100 parseBool(n) { | 4368 parseBool(n) { |
3101 if (n == "true") return true; | 4369 if (n == "true") return true; |
3102 if (n == "false") return false; | 4370 if (n == "false") return false; |
3103 if (n == null) return null; | 4371 if (n == null) return null; |
3104 throw new core.ArgumentError("Invalid boolean: $n"); | 4372 throw new core.ArgumentError("Invalid boolean: $n"); |
3105 } | 4373 } |
| 4374 |
3106 if (query.length > 0) { | 4375 if (query.length > 0) { |
3107 for (var part in query.split("&")) { | 4376 for (var part in query.split("&")) { |
3108 var keyvalue = part.split("="); | 4377 var keyvalue = part.split("="); |
3109 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 4378 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 4379 core.Uri.decodeQueryComponent(keyvalue[1])); |
3110 } | 4380 } |
3111 } | 4381 } |
3112 unittest.expect(queryMap["updateMask"].first, unittest.equals(arg_update
Mask)); | 4382 unittest.expect( |
3113 | 4383 queryMap["updateMask"].first, unittest.equals(arg_updateMask)); |
3114 | 4384 |
3115 var h = { | 4385 var h = { |
3116 "content-type" : "application/json; charset=utf-8", | 4386 "content-type": "application/json; charset=utf-8", |
3117 }; | 4387 }; |
3118 var resp = convert.JSON.encode(buildOperation()); | 4388 var resp = convert.JSON.encode(buildOperation()); |
3119 return new async.Future.value(stringResponse(200, h, resp)); | 4389 return new async.Future.value(stringResponse(200, h, resp)); |
3120 }), true); | 4390 }), true); |
3121 res.patch(arg_request, arg_appsId, arg_servicesId, arg_versionsId, updateM
ask: arg_updateMask).then(unittest.expectAsync1(((api.Operation response) { | 4391 res |
| 4392 .patch(arg_request, arg_appsId, arg_servicesId, arg_versionsId, |
| 4393 updateMask: arg_updateMask) |
| 4394 .then(unittest.expectAsync1(((api.Operation response) { |
3122 checkOperation(response); | 4395 checkOperation(response); |
3123 }))); | 4396 }))); |
3124 }); | 4397 }); |
3125 | |
3126 }); | 4398 }); |
3127 | 4399 |
3128 | |
3129 unittest.group("resource-AppsServicesVersionsInstancesResourceApi", () { | 4400 unittest.group("resource-AppsServicesVersionsInstancesResourceApi", () { |
3130 unittest.test("method--debug", () { | 4401 unittest.test("method--debug", () { |
3131 | |
3132 var mock = new HttpServerMock(); | 4402 var mock = new HttpServerMock(); |
3133 api.AppsServicesVersionsInstancesResourceApi res = new api.AppengineApi(mo
ck).apps.services.versions.instances; | 4403 api.AppsServicesVersionsInstancesResourceApi res = |
| 4404 new api.AppengineApi(mock).apps.services.versions.instances; |
3134 var arg_request = buildDebugInstanceRequest(); | 4405 var arg_request = buildDebugInstanceRequest(); |
3135 var arg_appsId = "foo"; | 4406 var arg_appsId = "foo"; |
3136 var arg_servicesId = "foo"; | 4407 var arg_servicesId = "foo"; |
3137 var arg_versionsId = "foo"; | 4408 var arg_versionsId = "foo"; |
3138 var arg_instancesId = "foo"; | 4409 var arg_instancesId = "foo"; |
3139 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 4410 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
3140 var obj = new api.DebugInstanceRequest.fromJson(json); | 4411 var obj = new api.DebugInstanceRequest.fromJson(json); |
3141 checkDebugInstanceRequest(obj); | 4412 checkDebugInstanceRequest(obj); |
3142 | 4413 |
3143 var path = (req.url).path; | 4414 var path = (req.url).path; |
3144 var pathOffset = 0; | 4415 var pathOffset = 0; |
3145 var index; | 4416 var index; |
3146 var subPart; | 4417 var subPart; |
3147 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 4418 unittest.expect( |
| 4419 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
3148 pathOffset += 1; | 4420 pathOffset += 1; |
3149 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1/apps/")); | 4421 unittest.expect(path.substring(pathOffset, pathOffset + 8), |
| 4422 unittest.equals("v1/apps/")); |
3150 pathOffset += 8; | 4423 pathOffset += 8; |
3151 index = path.indexOf("/services/", pathOffset); | 4424 index = path.indexOf("/services/", pathOffset); |
3152 unittest.expect(index >= 0, unittest.isTrue); | 4425 unittest.expect(index >= 0, unittest.isTrue); |
3153 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 4426 subPart = |
| 4427 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
3154 pathOffset = index; | 4428 pathOffset = index; |
3155 unittest.expect(subPart, unittest.equals("$arg_appsId")); | 4429 unittest.expect(subPart, unittest.equals("$arg_appsId")); |
3156 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/services/")); | 4430 unittest.expect(path.substring(pathOffset, pathOffset + 10), |
| 4431 unittest.equals("/services/")); |
3157 pathOffset += 10; | 4432 pathOffset += 10; |
3158 index = path.indexOf("/versions/", pathOffset); | 4433 index = path.indexOf("/versions/", pathOffset); |
3159 unittest.expect(index >= 0, unittest.isTrue); | 4434 unittest.expect(index >= 0, unittest.isTrue); |
3160 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 4435 subPart = |
| 4436 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
3161 pathOffset = index; | 4437 pathOffset = index; |
3162 unittest.expect(subPart, unittest.equals("$arg_servicesId")); | 4438 unittest.expect(subPart, unittest.equals("$arg_servicesId")); |
3163 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/versions/")); | 4439 unittest.expect(path.substring(pathOffset, pathOffset + 10), |
| 4440 unittest.equals("/versions/")); |
3164 pathOffset += 10; | 4441 pathOffset += 10; |
3165 index = path.indexOf("/instances/", pathOffset); | 4442 index = path.indexOf("/instances/", pathOffset); |
3166 unittest.expect(index >= 0, unittest.isTrue); | 4443 unittest.expect(index >= 0, unittest.isTrue); |
3167 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 4444 subPart = |
| 4445 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
3168 pathOffset = index; | 4446 pathOffset = index; |
3169 unittest.expect(subPart, unittest.equals("$arg_versionsId")); | 4447 unittest.expect(subPart, unittest.equals("$arg_versionsId")); |
3170 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("/instances/")); | 4448 unittest.expect(path.substring(pathOffset, pathOffset + 11), |
| 4449 unittest.equals("/instances/")); |
3171 pathOffset += 11; | 4450 pathOffset += 11; |
3172 index = path.indexOf(":debug", pathOffset); | 4451 index = path.indexOf(":debug", pathOffset); |
3173 unittest.expect(index >= 0, unittest.isTrue); | 4452 unittest.expect(index >= 0, unittest.isTrue); |
3174 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 4453 subPart = |
| 4454 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
3175 pathOffset = index; | 4455 pathOffset = index; |
3176 unittest.expect(subPart, unittest.equals("$arg_instancesId")); | 4456 unittest.expect(subPart, unittest.equals("$arg_instancesId")); |
3177 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ
als(":debug")); | 4457 unittest.expect(path.substring(pathOffset, pathOffset + 6), |
| 4458 unittest.equals(":debug")); |
3178 pathOffset += 6; | 4459 pathOffset += 6; |
3179 | 4460 |
3180 var query = (req.url).query; | 4461 var query = (req.url).query; |
3181 var queryOffset = 0; | 4462 var queryOffset = 0; |
3182 var queryMap = {}; | 4463 var queryMap = {}; |
3183 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 4464 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
3184 parseBool(n) { | 4465 parseBool(n) { |
3185 if (n == "true") return true; | 4466 if (n == "true") return true; |
3186 if (n == "false") return false; | 4467 if (n == "false") return false; |
3187 if (n == null) return null; | 4468 if (n == null) return null; |
3188 throw new core.ArgumentError("Invalid boolean: $n"); | 4469 throw new core.ArgumentError("Invalid boolean: $n"); |
3189 } | 4470 } |
| 4471 |
3190 if (query.length > 0) { | 4472 if (query.length > 0) { |
3191 for (var part in query.split("&")) { | 4473 for (var part in query.split("&")) { |
3192 var keyvalue = part.split("="); | 4474 var keyvalue = part.split("="); |
3193 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 4475 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 4476 core.Uri.decodeQueryComponent(keyvalue[1])); |
3194 } | 4477 } |
3195 } | 4478 } |
3196 | 4479 |
3197 | |
3198 var h = { | 4480 var h = { |
3199 "content-type" : "application/json; charset=utf-8", | 4481 "content-type": "application/json; charset=utf-8", |
3200 }; | 4482 }; |
3201 var resp = convert.JSON.encode(buildOperation()); | 4483 var resp = convert.JSON.encode(buildOperation()); |
3202 return new async.Future.value(stringResponse(200, h, resp)); | 4484 return new async.Future.value(stringResponse(200, h, resp)); |
3203 }), true); | 4485 }), true); |
3204 res.debug(arg_request, arg_appsId, arg_servicesId, arg_versionsId, arg_ins
tancesId).then(unittest.expectAsync1(((api.Operation response) { | 4486 res |
| 4487 .debug(arg_request, arg_appsId, arg_servicesId, arg_versionsId, |
| 4488 arg_instancesId) |
| 4489 .then(unittest.expectAsync1(((api.Operation response) { |
3205 checkOperation(response); | 4490 checkOperation(response); |
3206 }))); | 4491 }))); |
3207 }); | 4492 }); |
3208 | 4493 |
3209 unittest.test("method--delete", () { | 4494 unittest.test("method--delete", () { |
3210 | |
3211 var mock = new HttpServerMock(); | 4495 var mock = new HttpServerMock(); |
3212 api.AppsServicesVersionsInstancesResourceApi res = new api.AppengineApi(mo
ck).apps.services.versions.instances; | 4496 api.AppsServicesVersionsInstancesResourceApi res = |
| 4497 new api.AppengineApi(mock).apps.services.versions.instances; |
3213 var arg_appsId = "foo"; | 4498 var arg_appsId = "foo"; |
3214 var arg_servicesId = "foo"; | 4499 var arg_servicesId = "foo"; |
3215 var arg_versionsId = "foo"; | 4500 var arg_versionsId = "foo"; |
3216 var arg_instancesId = "foo"; | 4501 var arg_instancesId = "foo"; |
3217 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 4502 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
3218 var path = (req.url).path; | 4503 var path = (req.url).path; |
3219 var pathOffset = 0; | 4504 var pathOffset = 0; |
3220 var index; | 4505 var index; |
3221 var subPart; | 4506 var subPart; |
3222 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 4507 unittest.expect( |
| 4508 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
3223 pathOffset += 1; | 4509 pathOffset += 1; |
3224 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1/apps/")); | 4510 unittest.expect(path.substring(pathOffset, pathOffset + 8), |
| 4511 unittest.equals("v1/apps/")); |
3225 pathOffset += 8; | 4512 pathOffset += 8; |
3226 index = path.indexOf("/services/", pathOffset); | 4513 index = path.indexOf("/services/", pathOffset); |
3227 unittest.expect(index >= 0, unittest.isTrue); | 4514 unittest.expect(index >= 0, unittest.isTrue); |
3228 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 4515 subPart = |
| 4516 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
3229 pathOffset = index; | 4517 pathOffset = index; |
3230 unittest.expect(subPart, unittest.equals("$arg_appsId")); | 4518 unittest.expect(subPart, unittest.equals("$arg_appsId")); |
3231 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/services/")); | 4519 unittest.expect(path.substring(pathOffset, pathOffset + 10), |
| 4520 unittest.equals("/services/")); |
3232 pathOffset += 10; | 4521 pathOffset += 10; |
3233 index = path.indexOf("/versions/", pathOffset); | 4522 index = path.indexOf("/versions/", pathOffset); |
3234 unittest.expect(index >= 0, unittest.isTrue); | 4523 unittest.expect(index >= 0, unittest.isTrue); |
3235 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 4524 subPart = |
| 4525 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
3236 pathOffset = index; | 4526 pathOffset = index; |
3237 unittest.expect(subPart, unittest.equals("$arg_servicesId")); | 4527 unittest.expect(subPart, unittest.equals("$arg_servicesId")); |
3238 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/versions/")); | 4528 unittest.expect(path.substring(pathOffset, pathOffset + 10), |
| 4529 unittest.equals("/versions/")); |
3239 pathOffset += 10; | 4530 pathOffset += 10; |
3240 index = path.indexOf("/instances/", pathOffset); | 4531 index = path.indexOf("/instances/", pathOffset); |
3241 unittest.expect(index >= 0, unittest.isTrue); | 4532 unittest.expect(index >= 0, unittest.isTrue); |
3242 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 4533 subPart = |
| 4534 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
3243 pathOffset = index; | 4535 pathOffset = index; |
3244 unittest.expect(subPart, unittest.equals("$arg_versionsId")); | 4536 unittest.expect(subPart, unittest.equals("$arg_versionsId")); |
3245 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("/instances/")); | 4537 unittest.expect(path.substring(pathOffset, pathOffset + 11), |
| 4538 unittest.equals("/instances/")); |
3246 pathOffset += 11; | 4539 pathOffset += 11; |
3247 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | 4540 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
3248 pathOffset = path.length; | 4541 pathOffset = path.length; |
3249 unittest.expect(subPart, unittest.equals("$arg_instancesId")); | 4542 unittest.expect(subPart, unittest.equals("$arg_instancesId")); |
3250 | 4543 |
3251 var query = (req.url).query; | 4544 var query = (req.url).query; |
3252 var queryOffset = 0; | 4545 var queryOffset = 0; |
3253 var queryMap = {}; | 4546 var queryMap = {}; |
3254 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 4547 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
3255 parseBool(n) { | 4548 parseBool(n) { |
3256 if (n == "true") return true; | 4549 if (n == "true") return true; |
3257 if (n == "false") return false; | 4550 if (n == "false") return false; |
3258 if (n == null) return null; | 4551 if (n == null) return null; |
3259 throw new core.ArgumentError("Invalid boolean: $n"); | 4552 throw new core.ArgumentError("Invalid boolean: $n"); |
3260 } | 4553 } |
| 4554 |
3261 if (query.length > 0) { | 4555 if (query.length > 0) { |
3262 for (var part in query.split("&")) { | 4556 for (var part in query.split("&")) { |
3263 var keyvalue = part.split("="); | 4557 var keyvalue = part.split("="); |
3264 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 4558 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 4559 core.Uri.decodeQueryComponent(keyvalue[1])); |
3265 } | 4560 } |
3266 } | 4561 } |
3267 | 4562 |
3268 | |
3269 var h = { | 4563 var h = { |
3270 "content-type" : "application/json; charset=utf-8", | 4564 "content-type": "application/json; charset=utf-8", |
3271 }; | 4565 }; |
3272 var resp = convert.JSON.encode(buildOperation()); | 4566 var resp = convert.JSON.encode(buildOperation()); |
3273 return new async.Future.value(stringResponse(200, h, resp)); | 4567 return new async.Future.value(stringResponse(200, h, resp)); |
3274 }), true); | 4568 }), true); |
3275 res.delete(arg_appsId, arg_servicesId, arg_versionsId, arg_instancesId).th
en(unittest.expectAsync1(((api.Operation response) { | 4569 res |
| 4570 .delete(arg_appsId, arg_servicesId, arg_versionsId, arg_instancesId) |
| 4571 .then(unittest.expectAsync1(((api.Operation response) { |
3276 checkOperation(response); | 4572 checkOperation(response); |
3277 }))); | 4573 }))); |
3278 }); | 4574 }); |
3279 | 4575 |
3280 unittest.test("method--get", () { | 4576 unittest.test("method--get", () { |
3281 | |
3282 var mock = new HttpServerMock(); | 4577 var mock = new HttpServerMock(); |
3283 api.AppsServicesVersionsInstancesResourceApi res = new api.AppengineApi(mo
ck).apps.services.versions.instances; | 4578 api.AppsServicesVersionsInstancesResourceApi res = |
| 4579 new api.AppengineApi(mock).apps.services.versions.instances; |
3284 var arg_appsId = "foo"; | 4580 var arg_appsId = "foo"; |
3285 var arg_servicesId = "foo"; | 4581 var arg_servicesId = "foo"; |
3286 var arg_versionsId = "foo"; | 4582 var arg_versionsId = "foo"; |
3287 var arg_instancesId = "foo"; | 4583 var arg_instancesId = "foo"; |
3288 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 4584 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
3289 var path = (req.url).path; | 4585 var path = (req.url).path; |
3290 var pathOffset = 0; | 4586 var pathOffset = 0; |
3291 var index; | 4587 var index; |
3292 var subPart; | 4588 var subPart; |
3293 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 4589 unittest.expect( |
| 4590 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
3294 pathOffset += 1; | 4591 pathOffset += 1; |
3295 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1/apps/")); | 4592 unittest.expect(path.substring(pathOffset, pathOffset + 8), |
| 4593 unittest.equals("v1/apps/")); |
3296 pathOffset += 8; | 4594 pathOffset += 8; |
3297 index = path.indexOf("/services/", pathOffset); | 4595 index = path.indexOf("/services/", pathOffset); |
3298 unittest.expect(index >= 0, unittest.isTrue); | 4596 unittest.expect(index >= 0, unittest.isTrue); |
3299 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 4597 subPart = |
| 4598 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
3300 pathOffset = index; | 4599 pathOffset = index; |
3301 unittest.expect(subPart, unittest.equals("$arg_appsId")); | 4600 unittest.expect(subPart, unittest.equals("$arg_appsId")); |
3302 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/services/")); | 4601 unittest.expect(path.substring(pathOffset, pathOffset + 10), |
| 4602 unittest.equals("/services/")); |
3303 pathOffset += 10; | 4603 pathOffset += 10; |
3304 index = path.indexOf("/versions/", pathOffset); | 4604 index = path.indexOf("/versions/", pathOffset); |
3305 unittest.expect(index >= 0, unittest.isTrue); | 4605 unittest.expect(index >= 0, unittest.isTrue); |
3306 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 4606 subPart = |
| 4607 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
3307 pathOffset = index; | 4608 pathOffset = index; |
3308 unittest.expect(subPart, unittest.equals("$arg_servicesId")); | 4609 unittest.expect(subPart, unittest.equals("$arg_servicesId")); |
3309 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/versions/")); | 4610 unittest.expect(path.substring(pathOffset, pathOffset + 10), |
| 4611 unittest.equals("/versions/")); |
3310 pathOffset += 10; | 4612 pathOffset += 10; |
3311 index = path.indexOf("/instances/", pathOffset); | 4613 index = path.indexOf("/instances/", pathOffset); |
3312 unittest.expect(index >= 0, unittest.isTrue); | 4614 unittest.expect(index >= 0, unittest.isTrue); |
3313 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 4615 subPart = |
| 4616 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
3314 pathOffset = index; | 4617 pathOffset = index; |
3315 unittest.expect(subPart, unittest.equals("$arg_versionsId")); | 4618 unittest.expect(subPart, unittest.equals("$arg_versionsId")); |
3316 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("/instances/")); | 4619 unittest.expect(path.substring(pathOffset, pathOffset + 11), |
| 4620 unittest.equals("/instances/")); |
3317 pathOffset += 11; | 4621 pathOffset += 11; |
3318 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | 4622 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
3319 pathOffset = path.length; | 4623 pathOffset = path.length; |
3320 unittest.expect(subPart, unittest.equals("$arg_instancesId")); | 4624 unittest.expect(subPart, unittest.equals("$arg_instancesId")); |
3321 | 4625 |
3322 var query = (req.url).query; | 4626 var query = (req.url).query; |
3323 var queryOffset = 0; | 4627 var queryOffset = 0; |
3324 var queryMap = {}; | 4628 var queryMap = {}; |
3325 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 4629 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
3326 parseBool(n) { | 4630 parseBool(n) { |
3327 if (n == "true") return true; | 4631 if (n == "true") return true; |
3328 if (n == "false") return false; | 4632 if (n == "false") return false; |
3329 if (n == null) return null; | 4633 if (n == null) return null; |
3330 throw new core.ArgumentError("Invalid boolean: $n"); | 4634 throw new core.ArgumentError("Invalid boolean: $n"); |
3331 } | 4635 } |
| 4636 |
3332 if (query.length > 0) { | 4637 if (query.length > 0) { |
3333 for (var part in query.split("&")) { | 4638 for (var part in query.split("&")) { |
3334 var keyvalue = part.split("="); | 4639 var keyvalue = part.split("="); |
3335 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 4640 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 4641 core.Uri.decodeQueryComponent(keyvalue[1])); |
3336 } | 4642 } |
3337 } | 4643 } |
3338 | 4644 |
3339 | |
3340 var h = { | 4645 var h = { |
3341 "content-type" : "application/json; charset=utf-8", | 4646 "content-type": "application/json; charset=utf-8", |
3342 }; | 4647 }; |
3343 var resp = convert.JSON.encode(buildInstance()); | 4648 var resp = convert.JSON.encode(buildInstance()); |
3344 return new async.Future.value(stringResponse(200, h, resp)); | 4649 return new async.Future.value(stringResponse(200, h, resp)); |
3345 }), true); | 4650 }), true); |
3346 res.get(arg_appsId, arg_servicesId, arg_versionsId, arg_instancesId).then(
unittest.expectAsync1(((api.Instance response) { | 4651 res |
| 4652 .get(arg_appsId, arg_servicesId, arg_versionsId, arg_instancesId) |
| 4653 .then(unittest.expectAsync1(((api.Instance response) { |
3347 checkInstance(response); | 4654 checkInstance(response); |
3348 }))); | 4655 }))); |
3349 }); | 4656 }); |
3350 | 4657 |
3351 unittest.test("method--list", () { | 4658 unittest.test("method--list", () { |
3352 | |
3353 var mock = new HttpServerMock(); | 4659 var mock = new HttpServerMock(); |
3354 api.AppsServicesVersionsInstancesResourceApi res = new api.AppengineApi(mo
ck).apps.services.versions.instances; | 4660 api.AppsServicesVersionsInstancesResourceApi res = |
| 4661 new api.AppengineApi(mock).apps.services.versions.instances; |
3355 var arg_appsId = "foo"; | 4662 var arg_appsId = "foo"; |
3356 var arg_servicesId = "foo"; | 4663 var arg_servicesId = "foo"; |
3357 var arg_versionsId = "foo"; | 4664 var arg_versionsId = "foo"; |
3358 var arg_pageToken = "foo"; | 4665 var arg_pageToken = "foo"; |
3359 var arg_pageSize = 42; | 4666 var arg_pageSize = 42; |
3360 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 4667 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
3361 var path = (req.url).path; | 4668 var path = (req.url).path; |
3362 var pathOffset = 0; | 4669 var pathOffset = 0; |
3363 var index; | 4670 var index; |
3364 var subPart; | 4671 var subPart; |
3365 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 4672 unittest.expect( |
| 4673 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
3366 pathOffset += 1; | 4674 pathOffset += 1; |
3367 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1/apps/")); | 4675 unittest.expect(path.substring(pathOffset, pathOffset + 8), |
| 4676 unittest.equals("v1/apps/")); |
3368 pathOffset += 8; | 4677 pathOffset += 8; |
3369 index = path.indexOf("/services/", pathOffset); | 4678 index = path.indexOf("/services/", pathOffset); |
3370 unittest.expect(index >= 0, unittest.isTrue); | 4679 unittest.expect(index >= 0, unittest.isTrue); |
3371 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 4680 subPart = |
| 4681 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
3372 pathOffset = index; | 4682 pathOffset = index; |
3373 unittest.expect(subPart, unittest.equals("$arg_appsId")); | 4683 unittest.expect(subPart, unittest.equals("$arg_appsId")); |
3374 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/services/")); | 4684 unittest.expect(path.substring(pathOffset, pathOffset + 10), |
| 4685 unittest.equals("/services/")); |
3375 pathOffset += 10; | 4686 pathOffset += 10; |
3376 index = path.indexOf("/versions/", pathOffset); | 4687 index = path.indexOf("/versions/", pathOffset); |
3377 unittest.expect(index >= 0, unittest.isTrue); | 4688 unittest.expect(index >= 0, unittest.isTrue); |
3378 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 4689 subPart = |
| 4690 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
3379 pathOffset = index; | 4691 pathOffset = index; |
3380 unittest.expect(subPart, unittest.equals("$arg_servicesId")); | 4692 unittest.expect(subPart, unittest.equals("$arg_servicesId")); |
3381 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/versions/")); | 4693 unittest.expect(path.substring(pathOffset, pathOffset + 10), |
| 4694 unittest.equals("/versions/")); |
3382 pathOffset += 10; | 4695 pathOffset += 10; |
3383 index = path.indexOf("/instances", pathOffset); | 4696 index = path.indexOf("/instances", pathOffset); |
3384 unittest.expect(index >= 0, unittest.isTrue); | 4697 unittest.expect(index >= 0, unittest.isTrue); |
3385 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | 4698 subPart = |
| 4699 core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
3386 pathOffset = index; | 4700 pathOffset = index; |
3387 unittest.expect(subPart, unittest.equals("$arg_versionsId")); | 4701 unittest.expect(subPart, unittest.equals("$arg_versionsId")); |
3388 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/instances")); | 4702 unittest.expect(path.substring(pathOffset, pathOffset + 10), |
| 4703 unittest.equals("/instances")); |
3389 pathOffset += 10; | 4704 pathOffset += 10; |
3390 | 4705 |
3391 var query = (req.url).query; | 4706 var query = (req.url).query; |
3392 var queryOffset = 0; | 4707 var queryOffset = 0; |
3393 var queryMap = {}; | 4708 var queryMap = {}; |
3394 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 4709 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
3395 parseBool(n) { | 4710 parseBool(n) { |
3396 if (n == "true") return true; | 4711 if (n == "true") return true; |
3397 if (n == "false") return false; | 4712 if (n == "false") return false; |
3398 if (n == null) return null; | 4713 if (n == null) return null; |
3399 throw new core.ArgumentError("Invalid boolean: $n"); | 4714 throw new core.ArgumentError("Invalid boolean: $n"); |
3400 } | 4715 } |
| 4716 |
3401 if (query.length > 0) { | 4717 if (query.length > 0) { |
3402 for (var part in query.split("&")) { | 4718 for (var part in query.split("&")) { |
3403 var keyvalue = part.split("="); | 4719 var keyvalue = part.split("="); |
3404 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 4720 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 4721 core.Uri.decodeQueryComponent(keyvalue[1])); |
3405 } | 4722 } |
3406 } | 4723 } |
3407 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 4724 unittest.expect( |
3408 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); | 4725 queryMap["pageToken"].first, unittest.equals(arg_pageToken)); |
3409 | 4726 unittest.expect(core.int.parse(queryMap["pageSize"].first), |
| 4727 unittest.equals(arg_pageSize)); |
3410 | 4728 |
3411 var h = { | 4729 var h = { |
3412 "content-type" : "application/json; charset=utf-8", | 4730 "content-type": "application/json; charset=utf-8", |
3413 }; | 4731 }; |
3414 var resp = convert.JSON.encode(buildListInstancesResponse()); | 4732 var resp = convert.JSON.encode(buildListInstancesResponse()); |
3415 return new async.Future.value(stringResponse(200, h, resp)); | 4733 return new async.Future.value(stringResponse(200, h, resp)); |
3416 }), true); | 4734 }), true); |
3417 res.list(arg_appsId, arg_servicesId, arg_versionsId, pageToken: arg_pageTo
ken, pageSize: arg_pageSize).then(unittest.expectAsync1(((api.ListInstancesRespo
nse response) { | 4735 res |
| 4736 .list(arg_appsId, arg_servicesId, arg_versionsId, |
| 4737 pageToken: arg_pageToken, pageSize: arg_pageSize) |
| 4738 .then(unittest.expectAsync1(((api.ListInstancesResponse response) { |
3418 checkListInstancesResponse(response); | 4739 checkListInstancesResponse(response); |
3419 }))); | 4740 }))); |
3420 }); | 4741 }); |
3421 | |
3422 }); | 4742 }); |
3423 | |
3424 | |
3425 } | 4743 } |
3426 | |
OLD | NEW |