| OLD | NEW |
| 1 library googleapis_beta.manager.v1beta2.test; | 1 library googleapis_beta.manager.v1beta2.test; |
| 2 | 2 |
| 3 import "dart:core" as core; | 3 import "dart:core" as core; |
| 4 import "dart:collection" as collection; | 4 import "dart:collection" as collection; |
| 5 import "dart:async" as async; | 5 import "dart:async" as async; |
| 6 import "dart:convert" as convert; | 6 import "dart:convert" as convert; |
| 7 | 7 |
| 8 import 'package:http/http.dart' as http; | 8 import 'package:http/http.dart' as http; |
| 9 import 'package:http/testing.dart' as http_testing; | 9 import 'package:http/testing.dart' as http_testing; |
| 10 import 'package:unittest/unittest.dart' as unittest; | 10 import 'package:unittest/unittest.dart' as unittest; |
| 11 import 'package:googleapis_beta/common/common.dart' as common; | |
| 12 import 'package:googleapis_beta/src/common_internal.dart' as common_internal; | |
| 13 import '../common/common_internal_test.dart' as common_test; | |
| 14 | 11 |
| 15 import 'package:googleapis_beta/manager/v1beta2.dart' as api; | 12 import 'package:googleapis_beta/manager/v1beta2.dart' as api; |
| 16 | 13 |
| 14 class HttpServerMock extends http.BaseClient { |
| 15 core.Function _callback; |
| 16 core.bool _expectJson; |
| 17 | 17 |
| 18 void register(core.Function callback, core.bool expectJson) { |
| 19 _callback = callback; |
| 20 _expectJson = expectJson; |
| 21 } |
| 22 |
| 23 async.Future<http.StreamedResponse> send(http.BaseRequest request) { |
| 24 if (_expectJson) { |
| 25 return request.finalize() |
| 26 .transform(convert.UTF8.decoder) |
| 27 .join('') |
| 28 .then((core.String jsonString) { |
| 29 if (jsonString.isEmpty) { |
| 30 return _callback(request, null); |
| 31 } else { |
| 32 return _callback(request, convert.JSON.decode(jsonString)); |
| 33 } |
| 34 }); |
| 35 } else { |
| 36 var stream = request.finalize(); |
| 37 if (stream == null) { |
| 38 return _callback(request, []); |
| 39 } else { |
| 40 return stream.toBytes().then((data) { |
| 41 return _callback(request, data); |
| 42 }); |
| 43 } |
| 44 } |
| 45 } |
| 46 } |
| 47 |
| 48 http.StreamedResponse stringResponse( |
| 49 core.int status, core.Map headers, core.String body) { |
| 50 var stream = new async.Stream.fromIterable([convert.UTF8.encode(body)]); |
| 51 return new http.StreamedResponse(stream, status, headers: headers); |
| 52 } |
| 18 | 53 |
| 19 core.int buildCounterAccessConfig = 0; | 54 core.int buildCounterAccessConfig = 0; |
| 20 buildAccessConfig() { | 55 buildAccessConfig() { |
| 21 var o = new api.AccessConfig(); | 56 var o = new api.AccessConfig(); |
| 22 buildCounterAccessConfig++; | 57 buildCounterAccessConfig++; |
| 23 if (buildCounterAccessConfig < 3) { | 58 if (buildCounterAccessConfig < 3) { |
| 24 o.name = "foo"; | 59 o.name = "foo"; |
| 25 o.natIp = "foo"; | 60 o.natIp = "foo"; |
| 26 o.type = "foo"; | 61 o.type = "foo"; |
| 27 } | 62 } |
| 28 buildCounterAccessConfig--; | 63 buildCounterAccessConfig--; |
| 29 return o; | 64 return o; |
| 30 } | 65 } |
| 31 | 66 |
| 32 checkAccessConfig(api.AccessConfig o) { | 67 checkAccessConfig(api.AccessConfig o) { |
| 33 buildCounterAccessConfig++; | 68 buildCounterAccessConfig++; |
| 34 if (buildCounterAccessConfig < 3) { | 69 if (buildCounterAccessConfig < 3) { |
| 35 unittest.expect(o.name, unittest.equals('foo')); | 70 unittest.expect(o.name, unittest.equals('foo')); |
| 36 unittest.expect(o.natIp, unittest.equals('foo')); | 71 unittest.expect(o.natIp, unittest.equals('foo')); |
| 37 unittest.expect(o.type, unittest.equals('foo')); | 72 unittest.expect(o.type, unittest.equals('foo')); |
| 38 } | 73 } |
| 39 buildCounterAccessConfig--; | 74 buildCounterAccessConfig--; |
| 40 } | 75 } |
| 41 | 76 |
| 42 buildUnnamed1663() { | 77 buildUnnamed1694() { |
| 43 var o = new core.List<core.String>(); | 78 var o = new core.List<core.String>(); |
| 44 o.add("foo"); | 79 o.add("foo"); |
| 45 o.add("foo"); | 80 o.add("foo"); |
| 46 return o; | 81 return o; |
| 47 } | 82 } |
| 48 | 83 |
| 49 checkUnnamed1663(core.List<core.String> o) { | 84 checkUnnamed1694(core.List<core.String> o) { |
| 50 unittest.expect(o, unittest.hasLength(2)); | 85 unittest.expect(o, unittest.hasLength(2)); |
| 51 unittest.expect(o[0], unittest.equals('foo')); | 86 unittest.expect(o[0], unittest.equals('foo')); |
| 52 unittest.expect(o[1], unittest.equals('foo')); | 87 unittest.expect(o[1], unittest.equals('foo')); |
| 53 } | 88 } |
| 54 | 89 |
| 55 core.int buildCounterAction = 0; | 90 core.int buildCounterAction = 0; |
| 56 buildAction() { | 91 buildAction() { |
| 57 var o = new api.Action(); | 92 var o = new api.Action(); |
| 58 buildCounterAction++; | 93 buildCounterAction++; |
| 59 if (buildCounterAction < 3) { | 94 if (buildCounterAction < 3) { |
| 60 o.commands = buildUnnamed1663(); | 95 o.commands = buildUnnamed1694(); |
| 61 o.timeoutMs = 42; | 96 o.timeoutMs = 42; |
| 62 } | 97 } |
| 63 buildCounterAction--; | 98 buildCounterAction--; |
| 64 return o; | 99 return o; |
| 65 } | 100 } |
| 66 | 101 |
| 67 checkAction(api.Action o) { | 102 checkAction(api.Action o) { |
| 68 buildCounterAction++; | 103 buildCounterAction++; |
| 69 if (buildCounterAction < 3) { | 104 if (buildCounterAction < 3) { |
| 70 checkUnnamed1663(o.commands); | 105 checkUnnamed1694(o.commands); |
| 71 unittest.expect(o.timeoutMs, unittest.equals(42)); | 106 unittest.expect(o.timeoutMs, unittest.equals(42)); |
| 72 } | 107 } |
| 73 buildCounterAction--; | 108 buildCounterAction--; |
| 74 } | 109 } |
| 75 | 110 |
| 76 buildUnnamed1664() { | 111 buildUnnamed1695() { |
| 77 var o = new core.List<core.String>(); | 112 var o = new core.List<core.String>(); |
| 78 o.add("foo"); | 113 o.add("foo"); |
| 79 o.add("foo"); | 114 o.add("foo"); |
| 80 return o; | 115 return o; |
| 81 } | 116 } |
| 82 | 117 |
| 83 checkUnnamed1664(core.List<core.String> o) { | 118 checkUnnamed1695(core.List<core.String> o) { |
| 84 unittest.expect(o, unittest.hasLength(2)); | 119 unittest.expect(o, unittest.hasLength(2)); |
| 85 unittest.expect(o[0], unittest.equals('foo')); | 120 unittest.expect(o[0], unittest.equals('foo')); |
| 86 unittest.expect(o[1], unittest.equals('foo')); | 121 unittest.expect(o[1], unittest.equals('foo')); |
| 87 } | 122 } |
| 88 | 123 |
| 89 core.int buildCounterAllowedRule = 0; | 124 core.int buildCounterAllowedRule = 0; |
| 90 buildAllowedRule() { | 125 buildAllowedRule() { |
| 91 var o = new api.AllowedRule(); | 126 var o = new api.AllowedRule(); |
| 92 buildCounterAllowedRule++; | 127 buildCounterAllowedRule++; |
| 93 if (buildCounterAllowedRule < 3) { | 128 if (buildCounterAllowedRule < 3) { |
| 94 o.IPProtocol = "foo"; | 129 o.IPProtocol = "foo"; |
| 95 o.ports = buildUnnamed1664(); | 130 o.ports = buildUnnamed1695(); |
| 96 } | 131 } |
| 97 buildCounterAllowedRule--; | 132 buildCounterAllowedRule--; |
| 98 return o; | 133 return o; |
| 99 } | 134 } |
| 100 | 135 |
| 101 checkAllowedRule(api.AllowedRule o) { | 136 checkAllowedRule(api.AllowedRule o) { |
| 102 buildCounterAllowedRule++; | 137 buildCounterAllowedRule++; |
| 103 if (buildCounterAllowedRule < 3) { | 138 if (buildCounterAllowedRule < 3) { |
| 104 unittest.expect(o.IPProtocol, unittest.equals('foo')); | 139 unittest.expect(o.IPProtocol, unittest.equals('foo')); |
| 105 checkUnnamed1664(o.ports); | 140 checkUnnamed1695(o.ports); |
| 106 } | 141 } |
| 107 buildCounterAllowedRule--; | 142 buildCounterAllowedRule--; |
| 108 } | 143 } |
| 109 | 144 |
| 110 core.int buildCounterAutoscalingModule = 0; | 145 core.int buildCounterAutoscalingModule = 0; |
| 111 buildAutoscalingModule() { | 146 buildAutoscalingModule() { |
| 112 var o = new api.AutoscalingModule(); | 147 var o = new api.AutoscalingModule(); |
| 113 buildCounterAutoscalingModule++; | 148 buildCounterAutoscalingModule++; |
| 114 if (buildCounterAutoscalingModule < 3) { | 149 if (buildCounterAutoscalingModule < 3) { |
| 115 o.coolDownPeriodSec = 42; | 150 o.coolDownPeriodSec = 42; |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 | 206 |
| 172 checkDeployState(api.DeployState o) { | 207 checkDeployState(api.DeployState o) { |
| 173 buildCounterDeployState++; | 208 buildCounterDeployState++; |
| 174 if (buildCounterDeployState < 3) { | 209 if (buildCounterDeployState < 3) { |
| 175 unittest.expect(o.details, unittest.equals('foo')); | 210 unittest.expect(o.details, unittest.equals('foo')); |
| 176 unittest.expect(o.status, unittest.equals('foo')); | 211 unittest.expect(o.status, unittest.equals('foo')); |
| 177 } | 212 } |
| 178 buildCounterDeployState--; | 213 buildCounterDeployState--; |
| 179 } | 214 } |
| 180 | 215 |
| 181 buildUnnamed1665() { | 216 buildUnnamed1696() { |
| 182 var o = new core.Map<core.String, api.ModuleStatus>(); | 217 var o = new core.Map<core.String, api.ModuleStatus>(); |
| 183 o["x"] = buildModuleStatus(); | 218 o["x"] = buildModuleStatus(); |
| 184 o["y"] = buildModuleStatus(); | 219 o["y"] = buildModuleStatus(); |
| 185 return o; | 220 return o; |
| 186 } | 221 } |
| 187 | 222 |
| 188 checkUnnamed1665(core.Map<core.String, api.ModuleStatus> o) { | 223 checkUnnamed1696(core.Map<core.String, api.ModuleStatus> o) { |
| 189 unittest.expect(o, unittest.hasLength(2)); | 224 unittest.expect(o, unittest.hasLength(2)); |
| 190 checkModuleStatus(o["x"]); | 225 checkModuleStatus(o["x"]); |
| 191 checkModuleStatus(o["y"]); | 226 checkModuleStatus(o["y"]); |
| 192 } | 227 } |
| 193 | 228 |
| 194 buildUnnamed1666() { | 229 buildUnnamed1697() { |
| 195 var o = new core.List<api.ParamOverride>(); | 230 var o = new core.List<api.ParamOverride>(); |
| 196 o.add(buildParamOverride()); | 231 o.add(buildParamOverride()); |
| 197 o.add(buildParamOverride()); | 232 o.add(buildParamOverride()); |
| 198 return o; | 233 return o; |
| 199 } | 234 } |
| 200 | 235 |
| 201 checkUnnamed1666(core.List<api.ParamOverride> o) { | 236 checkUnnamed1697(core.List<api.ParamOverride> o) { |
| 202 unittest.expect(o, unittest.hasLength(2)); | 237 unittest.expect(o, unittest.hasLength(2)); |
| 203 checkParamOverride(o[0]); | 238 checkParamOverride(o[0]); |
| 204 checkParamOverride(o[1]); | 239 checkParamOverride(o[1]); |
| 205 } | 240 } |
| 206 | 241 |
| 207 core.int buildCounterDeployment = 0; | 242 core.int buildCounterDeployment = 0; |
| 208 buildDeployment() { | 243 buildDeployment() { |
| 209 var o = new api.Deployment(); | 244 var o = new api.Deployment(); |
| 210 buildCounterDeployment++; | 245 buildCounterDeployment++; |
| 211 if (buildCounterDeployment < 3) { | 246 if (buildCounterDeployment < 3) { |
| 212 o.creationDate = "foo"; | 247 o.creationDate = "foo"; |
| 213 o.description = "foo"; | 248 o.description = "foo"; |
| 214 o.modules = buildUnnamed1665(); | 249 o.modules = buildUnnamed1696(); |
| 215 o.name = "foo"; | 250 o.name = "foo"; |
| 216 o.overrides = buildUnnamed1666(); | 251 o.overrides = buildUnnamed1697(); |
| 217 o.state = buildDeployState(); | 252 o.state = buildDeployState(); |
| 218 o.templateName = "foo"; | 253 o.templateName = "foo"; |
| 219 } | 254 } |
| 220 buildCounterDeployment--; | 255 buildCounterDeployment--; |
| 221 return o; | 256 return o; |
| 222 } | 257 } |
| 223 | 258 |
| 224 checkDeployment(api.Deployment o) { | 259 checkDeployment(api.Deployment o) { |
| 225 buildCounterDeployment++; | 260 buildCounterDeployment++; |
| 226 if (buildCounterDeployment < 3) { | 261 if (buildCounterDeployment < 3) { |
| 227 unittest.expect(o.creationDate, unittest.equals('foo')); | 262 unittest.expect(o.creationDate, unittest.equals('foo')); |
| 228 unittest.expect(o.description, unittest.equals('foo')); | 263 unittest.expect(o.description, unittest.equals('foo')); |
| 229 checkUnnamed1665(o.modules); | 264 checkUnnamed1696(o.modules); |
| 230 unittest.expect(o.name, unittest.equals('foo')); | 265 unittest.expect(o.name, unittest.equals('foo')); |
| 231 checkUnnamed1666(o.overrides); | 266 checkUnnamed1697(o.overrides); |
| 232 checkDeployState(o.state); | 267 checkDeployState(o.state); |
| 233 unittest.expect(o.templateName, unittest.equals('foo')); | 268 unittest.expect(o.templateName, unittest.equals('foo')); |
| 234 } | 269 } |
| 235 buildCounterDeployment--; | 270 buildCounterDeployment--; |
| 236 } | 271 } |
| 237 | 272 |
| 238 buildUnnamed1667() { | 273 buildUnnamed1698() { |
| 239 var o = new core.List<api.Deployment>(); | 274 var o = new core.List<api.Deployment>(); |
| 240 o.add(buildDeployment()); | 275 o.add(buildDeployment()); |
| 241 o.add(buildDeployment()); | 276 o.add(buildDeployment()); |
| 242 return o; | 277 return o; |
| 243 } | 278 } |
| 244 | 279 |
| 245 checkUnnamed1667(core.List<api.Deployment> o) { | 280 checkUnnamed1698(core.List<api.Deployment> o) { |
| 246 unittest.expect(o, unittest.hasLength(2)); | 281 unittest.expect(o, unittest.hasLength(2)); |
| 247 checkDeployment(o[0]); | 282 checkDeployment(o[0]); |
| 248 checkDeployment(o[1]); | 283 checkDeployment(o[1]); |
| 249 } | 284 } |
| 250 | 285 |
| 251 core.int buildCounterDeploymentsListResponse = 0; | 286 core.int buildCounterDeploymentsListResponse = 0; |
| 252 buildDeploymentsListResponse() { | 287 buildDeploymentsListResponse() { |
| 253 var o = new api.DeploymentsListResponse(); | 288 var o = new api.DeploymentsListResponse(); |
| 254 buildCounterDeploymentsListResponse++; | 289 buildCounterDeploymentsListResponse++; |
| 255 if (buildCounterDeploymentsListResponse < 3) { | 290 if (buildCounterDeploymentsListResponse < 3) { |
| 256 o.nextPageToken = "foo"; | 291 o.nextPageToken = "foo"; |
| 257 o.resources = buildUnnamed1667(); | 292 o.resources = buildUnnamed1698(); |
| 258 } | 293 } |
| 259 buildCounterDeploymentsListResponse--; | 294 buildCounterDeploymentsListResponse--; |
| 260 return o; | 295 return o; |
| 261 } | 296 } |
| 262 | 297 |
| 263 checkDeploymentsListResponse(api.DeploymentsListResponse o) { | 298 checkDeploymentsListResponse(api.DeploymentsListResponse o) { |
| 264 buildCounterDeploymentsListResponse++; | 299 buildCounterDeploymentsListResponse++; |
| 265 if (buildCounterDeploymentsListResponse < 3) { | 300 if (buildCounterDeploymentsListResponse < 3) { |
| 266 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 301 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 267 checkUnnamed1667(o.resources); | 302 checkUnnamed1698(o.resources); |
| 268 } | 303 } |
| 269 buildCounterDeploymentsListResponse--; | 304 buildCounterDeploymentsListResponse--; |
| 270 } | 305 } |
| 271 | 306 |
| 272 core.int buildCounterDiskAttachment = 0; | 307 core.int buildCounterDiskAttachment = 0; |
| 273 buildDiskAttachment() { | 308 buildDiskAttachment() { |
| 274 var o = new api.DiskAttachment(); | 309 var o = new api.DiskAttachment(); |
| 275 buildCounterDiskAttachment++; | 310 buildCounterDiskAttachment++; |
| 276 if (buildCounterDiskAttachment < 3) { | 311 if (buildCounterDiskAttachment < 3) { |
| 277 o.deviceName = "foo"; | 312 o.deviceName = "foo"; |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 325 | 360 |
| 326 checkExistingDisk(api.ExistingDisk o) { | 361 checkExistingDisk(api.ExistingDisk o) { |
| 327 buildCounterExistingDisk++; | 362 buildCounterExistingDisk++; |
| 328 if (buildCounterExistingDisk < 3) { | 363 if (buildCounterExistingDisk < 3) { |
| 329 checkDiskAttachment(o.attachment); | 364 checkDiskAttachment(o.attachment); |
| 330 unittest.expect(o.source, unittest.equals('foo')); | 365 unittest.expect(o.source, unittest.equals('foo')); |
| 331 } | 366 } |
| 332 buildCounterExistingDisk--; | 367 buildCounterExistingDisk--; |
| 333 } | 368 } |
| 334 | 369 |
| 335 buildUnnamed1668() { | 370 buildUnnamed1699() { |
| 336 var o = new core.List<api.AllowedRule>(); | 371 var o = new core.List<api.AllowedRule>(); |
| 337 o.add(buildAllowedRule()); | 372 o.add(buildAllowedRule()); |
| 338 o.add(buildAllowedRule()); | 373 o.add(buildAllowedRule()); |
| 339 return o; | 374 return o; |
| 340 } | 375 } |
| 341 | 376 |
| 342 checkUnnamed1668(core.List<api.AllowedRule> o) { | 377 checkUnnamed1699(core.List<api.AllowedRule> o) { |
| 343 unittest.expect(o, unittest.hasLength(2)); | 378 unittest.expect(o, unittest.hasLength(2)); |
| 344 checkAllowedRule(o[0]); | 379 checkAllowedRule(o[0]); |
| 345 checkAllowedRule(o[1]); | 380 checkAllowedRule(o[1]); |
| 346 } | 381 } |
| 347 | 382 |
| 348 buildUnnamed1669() { | 383 buildUnnamed1700() { |
| 349 var o = new core.List<core.String>(); | 384 var o = new core.List<core.String>(); |
| 350 o.add("foo"); | 385 o.add("foo"); |
| 351 o.add("foo"); | 386 o.add("foo"); |
| 352 return o; | 387 return o; |
| 353 } | 388 } |
| 354 | 389 |
| 355 checkUnnamed1669(core.List<core.String> o) { | 390 checkUnnamed1700(core.List<core.String> o) { |
| 356 unittest.expect(o, unittest.hasLength(2)); | 391 unittest.expect(o, unittest.hasLength(2)); |
| 357 unittest.expect(o[0], unittest.equals('foo')); | 392 unittest.expect(o[0], unittest.equals('foo')); |
| 358 unittest.expect(o[1], unittest.equals('foo')); | 393 unittest.expect(o[1], unittest.equals('foo')); |
| 359 } | 394 } |
| 360 | 395 |
| 361 buildUnnamed1670() { | 396 buildUnnamed1701() { |
| 362 var o = new core.List<core.String>(); | 397 var o = new core.List<core.String>(); |
| 363 o.add("foo"); | 398 o.add("foo"); |
| 364 o.add("foo"); | 399 o.add("foo"); |
| 365 return o; | 400 return o; |
| 366 } | 401 } |
| 367 | 402 |
| 368 checkUnnamed1670(core.List<core.String> o) { | 403 checkUnnamed1701(core.List<core.String> o) { |
| 369 unittest.expect(o, unittest.hasLength(2)); | 404 unittest.expect(o, unittest.hasLength(2)); |
| 370 unittest.expect(o[0], unittest.equals('foo')); | 405 unittest.expect(o[0], unittest.equals('foo')); |
| 371 unittest.expect(o[1], unittest.equals('foo')); | 406 unittest.expect(o[1], unittest.equals('foo')); |
| 372 } | 407 } |
| 373 | 408 |
| 374 buildUnnamed1671() { | 409 buildUnnamed1702() { |
| 375 var o = new core.List<core.String>(); | 410 var o = new core.List<core.String>(); |
| 376 o.add("foo"); | 411 o.add("foo"); |
| 377 o.add("foo"); | 412 o.add("foo"); |
| 378 return o; | 413 return o; |
| 379 } | 414 } |
| 380 | 415 |
| 381 checkUnnamed1671(core.List<core.String> o) { | 416 checkUnnamed1702(core.List<core.String> o) { |
| 382 unittest.expect(o, unittest.hasLength(2)); | 417 unittest.expect(o, unittest.hasLength(2)); |
| 383 unittest.expect(o[0], unittest.equals('foo')); | 418 unittest.expect(o[0], unittest.equals('foo')); |
| 384 unittest.expect(o[1], unittest.equals('foo')); | 419 unittest.expect(o[1], unittest.equals('foo')); |
| 385 } | 420 } |
| 386 | 421 |
| 387 core.int buildCounterFirewallModule = 0; | 422 core.int buildCounterFirewallModule = 0; |
| 388 buildFirewallModule() { | 423 buildFirewallModule() { |
| 389 var o = new api.FirewallModule(); | 424 var o = new api.FirewallModule(); |
| 390 buildCounterFirewallModule++; | 425 buildCounterFirewallModule++; |
| 391 if (buildCounterFirewallModule < 3) { | 426 if (buildCounterFirewallModule < 3) { |
| 392 o.allowed = buildUnnamed1668(); | 427 o.allowed = buildUnnamed1699(); |
| 393 o.description = "foo"; | 428 o.description = "foo"; |
| 394 o.network = "foo"; | 429 o.network = "foo"; |
| 395 o.sourceRanges = buildUnnamed1669(); | 430 o.sourceRanges = buildUnnamed1700(); |
| 396 o.sourceTags = buildUnnamed1670(); | 431 o.sourceTags = buildUnnamed1701(); |
| 397 o.targetTags = buildUnnamed1671(); | 432 o.targetTags = buildUnnamed1702(); |
| 398 } | 433 } |
| 399 buildCounterFirewallModule--; | 434 buildCounterFirewallModule--; |
| 400 return o; | 435 return o; |
| 401 } | 436 } |
| 402 | 437 |
| 403 checkFirewallModule(api.FirewallModule o) { | 438 checkFirewallModule(api.FirewallModule o) { |
| 404 buildCounterFirewallModule++; | 439 buildCounterFirewallModule++; |
| 405 if (buildCounterFirewallModule < 3) { | 440 if (buildCounterFirewallModule < 3) { |
| 406 checkUnnamed1668(o.allowed); | 441 checkUnnamed1699(o.allowed); |
| 407 unittest.expect(o.description, unittest.equals('foo')); | 442 unittest.expect(o.description, unittest.equals('foo')); |
| 408 unittest.expect(o.network, unittest.equals('foo')); | 443 unittest.expect(o.network, unittest.equals('foo')); |
| 409 checkUnnamed1669(o.sourceRanges); | 444 checkUnnamed1700(o.sourceRanges); |
| 410 checkUnnamed1670(o.sourceTags); | 445 checkUnnamed1701(o.sourceTags); |
| 411 checkUnnamed1671(o.targetTags); | 446 checkUnnamed1702(o.targetTags); |
| 412 } | 447 } |
| 413 buildCounterFirewallModule--; | 448 buildCounterFirewallModule--; |
| 414 } | 449 } |
| 415 | 450 |
| 416 core.int buildCounterFirewallModuleStatus = 0; | 451 core.int buildCounterFirewallModuleStatus = 0; |
| 417 buildFirewallModuleStatus() { | 452 buildFirewallModuleStatus() { |
| 418 var o = new api.FirewallModuleStatus(); | 453 var o = new api.FirewallModuleStatus(); |
| 419 buildCounterFirewallModuleStatus++; | 454 buildCounterFirewallModuleStatus++; |
| 420 if (buildCounterFirewallModuleStatus < 3) { | 455 if (buildCounterFirewallModuleStatus < 3) { |
| 421 o.firewallUrl = "foo"; | 456 o.firewallUrl = "foo"; |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 477 } | 512 } |
| 478 | 513 |
| 479 checkHealthCheckModuleStatus(api.HealthCheckModuleStatus o) { | 514 checkHealthCheckModuleStatus(api.HealthCheckModuleStatus o) { |
| 480 buildCounterHealthCheckModuleStatus++; | 515 buildCounterHealthCheckModuleStatus++; |
| 481 if (buildCounterHealthCheckModuleStatus < 3) { | 516 if (buildCounterHealthCheckModuleStatus < 3) { |
| 482 unittest.expect(o.healthCheckUrl, unittest.equals('foo')); | 517 unittest.expect(o.healthCheckUrl, unittest.equals('foo')); |
| 483 } | 518 } |
| 484 buildCounterHealthCheckModuleStatus--; | 519 buildCounterHealthCheckModuleStatus--; |
| 485 } | 520 } |
| 486 | 521 |
| 487 buildUnnamed1672() { | 522 buildUnnamed1703() { |
| 488 var o = new core.List<core.String>(); | 523 var o = new core.List<core.String>(); |
| 489 o.add("foo"); | 524 o.add("foo"); |
| 490 o.add("foo"); | 525 o.add("foo"); |
| 491 return o; | 526 return o; |
| 492 } | 527 } |
| 493 | 528 |
| 494 checkUnnamed1672(core.List<core.String> o) { | 529 checkUnnamed1703(core.List<core.String> o) { |
| 495 unittest.expect(o, unittest.hasLength(2)); | 530 unittest.expect(o, unittest.hasLength(2)); |
| 496 unittest.expect(o[0], unittest.equals('foo')); | 531 unittest.expect(o[0], unittest.equals('foo')); |
| 497 unittest.expect(o[1], unittest.equals('foo')); | 532 unittest.expect(o[1], unittest.equals('foo')); |
| 498 } | 533 } |
| 499 | 534 |
| 500 buildUnnamed1673() { | 535 buildUnnamed1704() { |
| 501 var o = new core.List<core.String>(); | 536 var o = new core.List<core.String>(); |
| 502 o.add("foo"); | 537 o.add("foo"); |
| 503 o.add("foo"); | 538 o.add("foo"); |
| 504 return o; | 539 return o; |
| 505 } | 540 } |
| 506 | 541 |
| 507 checkUnnamed1673(core.List<core.String> o) { | 542 checkUnnamed1704(core.List<core.String> o) { |
| 508 unittest.expect(o, unittest.hasLength(2)); | 543 unittest.expect(o, unittest.hasLength(2)); |
| 509 unittest.expect(o[0], unittest.equals('foo')); | 544 unittest.expect(o[0], unittest.equals('foo')); |
| 510 unittest.expect(o[1], unittest.equals('foo')); | 545 unittest.expect(o[1], unittest.equals('foo')); |
| 511 } | 546 } |
| 512 | 547 |
| 513 core.int buildCounterLbModule = 0; | 548 core.int buildCounterLbModule = 0; |
| 514 buildLbModule() { | 549 buildLbModule() { |
| 515 var o = new api.LbModule(); | 550 var o = new api.LbModule(); |
| 516 buildCounterLbModule++; | 551 buildCounterLbModule++; |
| 517 if (buildCounterLbModule < 3) { | 552 if (buildCounterLbModule < 3) { |
| 518 o.description = "foo"; | 553 o.description = "foo"; |
| 519 o.healthChecks = buildUnnamed1672(); | 554 o.healthChecks = buildUnnamed1703(); |
| 520 o.ipAddress = "foo"; | 555 o.ipAddress = "foo"; |
| 521 o.ipProtocol = "foo"; | 556 o.ipProtocol = "foo"; |
| 522 o.portRange = "foo"; | 557 o.portRange = "foo"; |
| 523 o.sessionAffinity = "foo"; | 558 o.sessionAffinity = "foo"; |
| 524 o.targetModules = buildUnnamed1673(); | 559 o.targetModules = buildUnnamed1704(); |
| 525 } | 560 } |
| 526 buildCounterLbModule--; | 561 buildCounterLbModule--; |
| 527 return o; | 562 return o; |
| 528 } | 563 } |
| 529 | 564 |
| 530 checkLbModule(api.LbModule o) { | 565 checkLbModule(api.LbModule o) { |
| 531 buildCounterLbModule++; | 566 buildCounterLbModule++; |
| 532 if (buildCounterLbModule < 3) { | 567 if (buildCounterLbModule < 3) { |
| 533 unittest.expect(o.description, unittest.equals('foo')); | 568 unittest.expect(o.description, unittest.equals('foo')); |
| 534 checkUnnamed1672(o.healthChecks); | 569 checkUnnamed1703(o.healthChecks); |
| 535 unittest.expect(o.ipAddress, unittest.equals('foo')); | 570 unittest.expect(o.ipAddress, unittest.equals('foo')); |
| 536 unittest.expect(o.ipProtocol, unittest.equals('foo')); | 571 unittest.expect(o.ipProtocol, unittest.equals('foo')); |
| 537 unittest.expect(o.portRange, unittest.equals('foo')); | 572 unittest.expect(o.portRange, unittest.equals('foo')); |
| 538 unittest.expect(o.sessionAffinity, unittest.equals('foo')); | 573 unittest.expect(o.sessionAffinity, unittest.equals('foo')); |
| 539 checkUnnamed1673(o.targetModules); | 574 checkUnnamed1704(o.targetModules); |
| 540 } | 575 } |
| 541 buildCounterLbModule--; | 576 buildCounterLbModule--; |
| 542 } | 577 } |
| 543 | 578 |
| 544 core.int buildCounterLbModuleStatus = 0; | 579 core.int buildCounterLbModuleStatus = 0; |
| 545 buildLbModuleStatus() { | 580 buildLbModuleStatus() { |
| 546 var o = new api.LbModuleStatus(); | 581 var o = new api.LbModuleStatus(); |
| 547 buildCounterLbModuleStatus++; | 582 buildCounterLbModuleStatus++; |
| 548 if (buildCounterLbModuleStatus < 3) { | 583 if (buildCounterLbModuleStatus < 3) { |
| 549 o.forwardingRuleUrl = "foo"; | 584 o.forwardingRuleUrl = "foo"; |
| 550 o.targetPoolUrl = "foo"; | 585 o.targetPoolUrl = "foo"; |
| 551 } | 586 } |
| 552 buildCounterLbModuleStatus--; | 587 buildCounterLbModuleStatus--; |
| 553 return o; | 588 return o; |
| 554 } | 589 } |
| 555 | 590 |
| 556 checkLbModuleStatus(api.LbModuleStatus o) { | 591 checkLbModuleStatus(api.LbModuleStatus o) { |
| 557 buildCounterLbModuleStatus++; | 592 buildCounterLbModuleStatus++; |
| 558 if (buildCounterLbModuleStatus < 3) { | 593 if (buildCounterLbModuleStatus < 3) { |
| 559 unittest.expect(o.forwardingRuleUrl, unittest.equals('foo')); | 594 unittest.expect(o.forwardingRuleUrl, unittest.equals('foo')); |
| 560 unittest.expect(o.targetPoolUrl, unittest.equals('foo')); | 595 unittest.expect(o.targetPoolUrl, unittest.equals('foo')); |
| 561 } | 596 } |
| 562 buildCounterLbModuleStatus--; | 597 buildCounterLbModuleStatus--; |
| 563 } | 598 } |
| 564 | 599 |
| 565 buildUnnamed1674() { | 600 buildUnnamed1705() { |
| 566 var o = new core.List<api.MetadataItem>(); | 601 var o = new core.List<api.MetadataItem>(); |
| 567 o.add(buildMetadataItem()); | 602 o.add(buildMetadataItem()); |
| 568 o.add(buildMetadataItem()); | 603 o.add(buildMetadataItem()); |
| 569 return o; | 604 return o; |
| 570 } | 605 } |
| 571 | 606 |
| 572 checkUnnamed1674(core.List<api.MetadataItem> o) { | 607 checkUnnamed1705(core.List<api.MetadataItem> o) { |
| 573 unittest.expect(o, unittest.hasLength(2)); | 608 unittest.expect(o, unittest.hasLength(2)); |
| 574 checkMetadataItem(o[0]); | 609 checkMetadataItem(o[0]); |
| 575 checkMetadataItem(o[1]); | 610 checkMetadataItem(o[1]); |
| 576 } | 611 } |
| 577 | 612 |
| 578 core.int buildCounterMetadata = 0; | 613 core.int buildCounterMetadata = 0; |
| 579 buildMetadata() { | 614 buildMetadata() { |
| 580 var o = new api.Metadata(); | 615 var o = new api.Metadata(); |
| 581 buildCounterMetadata++; | 616 buildCounterMetadata++; |
| 582 if (buildCounterMetadata < 3) { | 617 if (buildCounterMetadata < 3) { |
| 583 o.fingerPrint = "foo"; | 618 o.fingerPrint = "foo"; |
| 584 o.items = buildUnnamed1674(); | 619 o.items = buildUnnamed1705(); |
| 585 } | 620 } |
| 586 buildCounterMetadata--; | 621 buildCounterMetadata--; |
| 587 return o; | 622 return o; |
| 588 } | 623 } |
| 589 | 624 |
| 590 checkMetadata(api.Metadata o) { | 625 checkMetadata(api.Metadata o) { |
| 591 buildCounterMetadata++; | 626 buildCounterMetadata++; |
| 592 if (buildCounterMetadata < 3) { | 627 if (buildCounterMetadata < 3) { |
| 593 unittest.expect(o.fingerPrint, unittest.equals('foo')); | 628 unittest.expect(o.fingerPrint, unittest.equals('foo')); |
| 594 checkUnnamed1674(o.items); | 629 checkUnnamed1705(o.items); |
| 595 } | 630 } |
| 596 buildCounterMetadata--; | 631 buildCounterMetadata--; |
| 597 } | 632 } |
| 598 | 633 |
| 599 core.int buildCounterMetadataItem = 0; | 634 core.int buildCounterMetadataItem = 0; |
| 600 buildMetadataItem() { | 635 buildMetadataItem() { |
| 601 var o = new api.MetadataItem(); | 636 var o = new api.MetadataItem(); |
| 602 buildCounterMetadataItem++; | 637 buildCounterMetadataItem++; |
| 603 if (buildCounterMetadataItem < 3) { | 638 if (buildCounterMetadataItem < 3) { |
| 604 o.key = "foo"; | 639 o.key = "foo"; |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 674 checkHealthCheckModuleStatus(o.healthCheckModuleStatus); | 709 checkHealthCheckModuleStatus(o.healthCheckModuleStatus); |
| 675 checkLbModuleStatus(o.lbModuleStatus); | 710 checkLbModuleStatus(o.lbModuleStatus); |
| 676 checkNetworkModuleStatus(o.networkModuleStatus); | 711 checkNetworkModuleStatus(o.networkModuleStatus); |
| 677 checkReplicaPoolModuleStatus(o.replicaPoolModuleStatus); | 712 checkReplicaPoolModuleStatus(o.replicaPoolModuleStatus); |
| 678 checkDeployState(o.state); | 713 checkDeployState(o.state); |
| 679 unittest.expect(o.type, unittest.equals('foo')); | 714 unittest.expect(o.type, unittest.equals('foo')); |
| 680 } | 715 } |
| 681 buildCounterModuleStatus--; | 716 buildCounterModuleStatus--; |
| 682 } | 717 } |
| 683 | 718 |
| 684 buildUnnamed1675() { | 719 buildUnnamed1706() { |
| 685 var o = new core.List<api.AccessConfig>(); | 720 var o = new core.List<api.AccessConfig>(); |
| 686 o.add(buildAccessConfig()); | 721 o.add(buildAccessConfig()); |
| 687 o.add(buildAccessConfig()); | 722 o.add(buildAccessConfig()); |
| 688 return o; | 723 return o; |
| 689 } | 724 } |
| 690 | 725 |
| 691 checkUnnamed1675(core.List<api.AccessConfig> o) { | 726 checkUnnamed1706(core.List<api.AccessConfig> o) { |
| 692 unittest.expect(o, unittest.hasLength(2)); | 727 unittest.expect(o, unittest.hasLength(2)); |
| 693 checkAccessConfig(o[0]); | 728 checkAccessConfig(o[0]); |
| 694 checkAccessConfig(o[1]); | 729 checkAccessConfig(o[1]); |
| 695 } | 730 } |
| 696 | 731 |
| 697 core.int buildCounterNetworkInterface = 0; | 732 core.int buildCounterNetworkInterface = 0; |
| 698 buildNetworkInterface() { | 733 buildNetworkInterface() { |
| 699 var o = new api.NetworkInterface(); | 734 var o = new api.NetworkInterface(); |
| 700 buildCounterNetworkInterface++; | 735 buildCounterNetworkInterface++; |
| 701 if (buildCounterNetworkInterface < 3) { | 736 if (buildCounterNetworkInterface < 3) { |
| 702 o.accessConfigs = buildUnnamed1675(); | 737 o.accessConfigs = buildUnnamed1706(); |
| 703 o.name = "foo"; | 738 o.name = "foo"; |
| 704 o.network = "foo"; | 739 o.network = "foo"; |
| 705 o.networkIp = "foo"; | 740 o.networkIp = "foo"; |
| 706 } | 741 } |
| 707 buildCounterNetworkInterface--; | 742 buildCounterNetworkInterface--; |
| 708 return o; | 743 return o; |
| 709 } | 744 } |
| 710 | 745 |
| 711 checkNetworkInterface(api.NetworkInterface o) { | 746 checkNetworkInterface(api.NetworkInterface o) { |
| 712 buildCounterNetworkInterface++; | 747 buildCounterNetworkInterface++; |
| 713 if (buildCounterNetworkInterface < 3) { | 748 if (buildCounterNetworkInterface < 3) { |
| 714 checkUnnamed1675(o.accessConfigs); | 749 checkUnnamed1706(o.accessConfigs); |
| 715 unittest.expect(o.name, unittest.equals('foo')); | 750 unittest.expect(o.name, unittest.equals('foo')); |
| 716 unittest.expect(o.network, unittest.equals('foo')); | 751 unittest.expect(o.network, unittest.equals('foo')); |
| 717 unittest.expect(o.networkIp, unittest.equals('foo')); | 752 unittest.expect(o.networkIp, unittest.equals('foo')); |
| 718 } | 753 } |
| 719 buildCounterNetworkInterface--; | 754 buildCounterNetworkInterface--; |
| 720 } | 755 } |
| 721 | 756 |
| 722 core.int buildCounterNetworkModule = 0; | 757 core.int buildCounterNetworkModule = 0; |
| 723 buildNetworkModule() { | 758 buildNetworkModule() { |
| 724 var o = new api.NetworkModule(); | 759 var o = new api.NetworkModule(); |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 823 | 858 |
| 824 checkParamOverride(api.ParamOverride o) { | 859 checkParamOverride(api.ParamOverride o) { |
| 825 buildCounterParamOverride++; | 860 buildCounterParamOverride++; |
| 826 if (buildCounterParamOverride < 3) { | 861 if (buildCounterParamOverride < 3) { |
| 827 unittest.expect(o.path, unittest.equals('foo')); | 862 unittest.expect(o.path, unittest.equals('foo')); |
| 828 unittest.expect(o.value, unittest.equals('foo')); | 863 unittest.expect(o.value, unittest.equals('foo')); |
| 829 } | 864 } |
| 830 buildCounterParamOverride--; | 865 buildCounterParamOverride--; |
| 831 } | 866 } |
| 832 | 867 |
| 833 buildUnnamed1676() { | 868 buildUnnamed1707() { |
| 834 var o = new core.Map<core.String, api.EnvVariable>(); | 869 var o = new core.Map<core.String, api.EnvVariable>(); |
| 835 o["x"] = buildEnvVariable(); | 870 o["x"] = buildEnvVariable(); |
| 836 o["y"] = buildEnvVariable(); | 871 o["y"] = buildEnvVariable(); |
| 837 return o; | 872 return o; |
| 838 } | 873 } |
| 839 | 874 |
| 840 checkUnnamed1676(core.Map<core.String, api.EnvVariable> o) { | 875 checkUnnamed1707(core.Map<core.String, api.EnvVariable> o) { |
| 841 unittest.expect(o, unittest.hasLength(2)); | 876 unittest.expect(o, unittest.hasLength(2)); |
| 842 checkEnvVariable(o["x"]); | 877 checkEnvVariable(o["x"]); |
| 843 checkEnvVariable(o["y"]); | 878 checkEnvVariable(o["y"]); |
| 844 } | 879 } |
| 845 | 880 |
| 846 buildUnnamed1677() { | 881 buildUnnamed1708() { |
| 847 var o = new core.List<core.String>(); | 882 var o = new core.List<core.String>(); |
| 848 o.add("foo"); | 883 o.add("foo"); |
| 849 o.add("foo"); | 884 o.add("foo"); |
| 850 return o; | 885 return o; |
| 851 } | 886 } |
| 852 | 887 |
| 853 checkUnnamed1677(core.List<core.String> o) { | 888 checkUnnamed1708(core.List<core.String> o) { |
| 854 unittest.expect(o, unittest.hasLength(2)); | 889 unittest.expect(o, unittest.hasLength(2)); |
| 855 unittest.expect(o[0], unittest.equals('foo')); | 890 unittest.expect(o[0], unittest.equals('foo')); |
| 856 unittest.expect(o[1], unittest.equals('foo')); | 891 unittest.expect(o[1], unittest.equals('foo')); |
| 857 } | 892 } |
| 858 | 893 |
| 859 core.int buildCounterReplicaPoolModule = 0; | 894 core.int buildCounterReplicaPoolModule = 0; |
| 860 buildReplicaPoolModule() { | 895 buildReplicaPoolModule() { |
| 861 var o = new api.ReplicaPoolModule(); | 896 var o = new api.ReplicaPoolModule(); |
| 862 buildCounterReplicaPoolModule++; | 897 buildCounterReplicaPoolModule++; |
| 863 if (buildCounterReplicaPoolModule < 3) { | 898 if (buildCounterReplicaPoolModule < 3) { |
| 864 o.envVariables = buildUnnamed1676(); | 899 o.envVariables = buildUnnamed1707(); |
| 865 o.healthChecks = buildUnnamed1677(); | 900 o.healthChecks = buildUnnamed1708(); |
| 866 o.numReplicas = 42; | 901 o.numReplicas = 42; |
| 867 o.replicaPoolParams = buildReplicaPoolParams(); | 902 o.replicaPoolParams = buildReplicaPoolParams(); |
| 868 o.resourceView = "foo"; | 903 o.resourceView = "foo"; |
| 869 } | 904 } |
| 870 buildCounterReplicaPoolModule--; | 905 buildCounterReplicaPoolModule--; |
| 871 return o; | 906 return o; |
| 872 } | 907 } |
| 873 | 908 |
| 874 checkReplicaPoolModule(api.ReplicaPoolModule o) { | 909 checkReplicaPoolModule(api.ReplicaPoolModule o) { |
| 875 buildCounterReplicaPoolModule++; | 910 buildCounterReplicaPoolModule++; |
| 876 if (buildCounterReplicaPoolModule < 3) { | 911 if (buildCounterReplicaPoolModule < 3) { |
| 877 checkUnnamed1676(o.envVariables); | 912 checkUnnamed1707(o.envVariables); |
| 878 checkUnnamed1677(o.healthChecks); | 913 checkUnnamed1708(o.healthChecks); |
| 879 unittest.expect(o.numReplicas, unittest.equals(42)); | 914 unittest.expect(o.numReplicas, unittest.equals(42)); |
| 880 checkReplicaPoolParams(o.replicaPoolParams); | 915 checkReplicaPoolParams(o.replicaPoolParams); |
| 881 unittest.expect(o.resourceView, unittest.equals('foo')); | 916 unittest.expect(o.resourceView, unittest.equals('foo')); |
| 882 } | 917 } |
| 883 buildCounterReplicaPoolModule--; | 918 buildCounterReplicaPoolModule--; |
| 884 } | 919 } |
| 885 | 920 |
| 886 core.int buildCounterReplicaPoolModuleStatus = 0; | 921 core.int buildCounterReplicaPoolModuleStatus = 0; |
| 887 buildReplicaPoolModuleStatus() { | 922 buildReplicaPoolModuleStatus() { |
| 888 var o = new api.ReplicaPoolModuleStatus(); | 923 var o = new api.ReplicaPoolModuleStatus(); |
| (...skipping 27 matching lines...) Expand all Loading... |
| 916 } | 951 } |
| 917 | 952 |
| 918 checkReplicaPoolParams(api.ReplicaPoolParams o) { | 953 checkReplicaPoolParams(api.ReplicaPoolParams o) { |
| 919 buildCounterReplicaPoolParams++; | 954 buildCounterReplicaPoolParams++; |
| 920 if (buildCounterReplicaPoolParams < 3) { | 955 if (buildCounterReplicaPoolParams < 3) { |
| 921 checkReplicaPoolParamsV1Beta1(o.v1beta1); | 956 checkReplicaPoolParamsV1Beta1(o.v1beta1); |
| 922 } | 957 } |
| 923 buildCounterReplicaPoolParams--; | 958 buildCounterReplicaPoolParams--; |
| 924 } | 959 } |
| 925 | 960 |
| 926 buildUnnamed1678() { | 961 buildUnnamed1709() { |
| 927 var o = new core.List<api.ExistingDisk>(); | 962 var o = new core.List<api.ExistingDisk>(); |
| 928 o.add(buildExistingDisk()); | 963 o.add(buildExistingDisk()); |
| 929 o.add(buildExistingDisk()); | 964 o.add(buildExistingDisk()); |
| 930 return o; | 965 return o; |
| 931 } | 966 } |
| 932 | 967 |
| 933 checkUnnamed1678(core.List<api.ExistingDisk> o) { | 968 checkUnnamed1709(core.List<api.ExistingDisk> o) { |
| 934 unittest.expect(o, unittest.hasLength(2)); | 969 unittest.expect(o, unittest.hasLength(2)); |
| 935 checkExistingDisk(o[0]); | 970 checkExistingDisk(o[0]); |
| 936 checkExistingDisk(o[1]); | 971 checkExistingDisk(o[1]); |
| 937 } | 972 } |
| 938 | 973 |
| 939 buildUnnamed1679() { | 974 buildUnnamed1710() { |
| 940 var o = new core.List<api.NewDisk>(); | 975 var o = new core.List<api.NewDisk>(); |
| 941 o.add(buildNewDisk()); | 976 o.add(buildNewDisk()); |
| 942 o.add(buildNewDisk()); | 977 o.add(buildNewDisk()); |
| 943 return o; | 978 return o; |
| 944 } | 979 } |
| 945 | 980 |
| 946 checkUnnamed1679(core.List<api.NewDisk> o) { | 981 checkUnnamed1710(core.List<api.NewDisk> o) { |
| 947 unittest.expect(o, unittest.hasLength(2)); | 982 unittest.expect(o, unittest.hasLength(2)); |
| 948 checkNewDisk(o[0]); | 983 checkNewDisk(o[0]); |
| 949 checkNewDisk(o[1]); | 984 checkNewDisk(o[1]); |
| 950 } | 985 } |
| 951 | 986 |
| 952 buildUnnamed1680() { | 987 buildUnnamed1711() { |
| 953 var o = new core.List<api.NetworkInterface>(); | 988 var o = new core.List<api.NetworkInterface>(); |
| 954 o.add(buildNetworkInterface()); | 989 o.add(buildNetworkInterface()); |
| 955 o.add(buildNetworkInterface()); | 990 o.add(buildNetworkInterface()); |
| 956 return o; | 991 return o; |
| 957 } | 992 } |
| 958 | 993 |
| 959 checkUnnamed1680(core.List<api.NetworkInterface> o) { | 994 checkUnnamed1711(core.List<api.NetworkInterface> o) { |
| 960 unittest.expect(o, unittest.hasLength(2)); | 995 unittest.expect(o, unittest.hasLength(2)); |
| 961 checkNetworkInterface(o[0]); | 996 checkNetworkInterface(o[0]); |
| 962 checkNetworkInterface(o[1]); | 997 checkNetworkInterface(o[1]); |
| 963 } | 998 } |
| 964 | 999 |
| 965 buildUnnamed1681() { | 1000 buildUnnamed1712() { |
| 966 var o = new core.List<api.ServiceAccount>(); | 1001 var o = new core.List<api.ServiceAccount>(); |
| 967 o.add(buildServiceAccount()); | 1002 o.add(buildServiceAccount()); |
| 968 o.add(buildServiceAccount()); | 1003 o.add(buildServiceAccount()); |
| 969 return o; | 1004 return o; |
| 970 } | 1005 } |
| 971 | 1006 |
| 972 checkUnnamed1681(core.List<api.ServiceAccount> o) { | 1007 checkUnnamed1712(core.List<api.ServiceAccount> o) { |
| 973 unittest.expect(o, unittest.hasLength(2)); | 1008 unittest.expect(o, unittest.hasLength(2)); |
| 974 checkServiceAccount(o[0]); | 1009 checkServiceAccount(o[0]); |
| 975 checkServiceAccount(o[1]); | 1010 checkServiceAccount(o[1]); |
| 976 } | 1011 } |
| 977 | 1012 |
| 978 core.int buildCounterReplicaPoolParamsV1Beta1 = 0; | 1013 core.int buildCounterReplicaPoolParamsV1Beta1 = 0; |
| 979 buildReplicaPoolParamsV1Beta1() { | 1014 buildReplicaPoolParamsV1Beta1() { |
| 980 var o = new api.ReplicaPoolParamsV1Beta1(); | 1015 var o = new api.ReplicaPoolParamsV1Beta1(); |
| 981 buildCounterReplicaPoolParamsV1Beta1++; | 1016 buildCounterReplicaPoolParamsV1Beta1++; |
| 982 if (buildCounterReplicaPoolParamsV1Beta1 < 3) { | 1017 if (buildCounterReplicaPoolParamsV1Beta1 < 3) { |
| 983 o.autoRestart = true; | 1018 o.autoRestart = true; |
| 984 o.baseInstanceName = "foo"; | 1019 o.baseInstanceName = "foo"; |
| 985 o.canIpForward = true; | 1020 o.canIpForward = true; |
| 986 o.description = "foo"; | 1021 o.description = "foo"; |
| 987 o.disksToAttach = buildUnnamed1678(); | 1022 o.disksToAttach = buildUnnamed1709(); |
| 988 o.disksToCreate = buildUnnamed1679(); | 1023 o.disksToCreate = buildUnnamed1710(); |
| 989 o.initAction = "foo"; | 1024 o.initAction = "foo"; |
| 990 o.machineType = "foo"; | 1025 o.machineType = "foo"; |
| 991 o.metadata = buildMetadata(); | 1026 o.metadata = buildMetadata(); |
| 992 o.networkInterfaces = buildUnnamed1680(); | 1027 o.networkInterfaces = buildUnnamed1711(); |
| 993 o.onHostMaintenance = "foo"; | 1028 o.onHostMaintenance = "foo"; |
| 994 o.serviceAccounts = buildUnnamed1681(); | 1029 o.serviceAccounts = buildUnnamed1712(); |
| 995 o.tags = buildTag(); | 1030 o.tags = buildTag(); |
| 996 o.zone = "foo"; | 1031 o.zone = "foo"; |
| 997 } | 1032 } |
| 998 buildCounterReplicaPoolParamsV1Beta1--; | 1033 buildCounterReplicaPoolParamsV1Beta1--; |
| 999 return o; | 1034 return o; |
| 1000 } | 1035 } |
| 1001 | 1036 |
| 1002 checkReplicaPoolParamsV1Beta1(api.ReplicaPoolParamsV1Beta1 o) { | 1037 checkReplicaPoolParamsV1Beta1(api.ReplicaPoolParamsV1Beta1 o) { |
| 1003 buildCounterReplicaPoolParamsV1Beta1++; | 1038 buildCounterReplicaPoolParamsV1Beta1++; |
| 1004 if (buildCounterReplicaPoolParamsV1Beta1 < 3) { | 1039 if (buildCounterReplicaPoolParamsV1Beta1 < 3) { |
| 1005 unittest.expect(o.autoRestart, unittest.isTrue); | 1040 unittest.expect(o.autoRestart, unittest.isTrue); |
| 1006 unittest.expect(o.baseInstanceName, unittest.equals('foo')); | 1041 unittest.expect(o.baseInstanceName, unittest.equals('foo')); |
| 1007 unittest.expect(o.canIpForward, unittest.isTrue); | 1042 unittest.expect(o.canIpForward, unittest.isTrue); |
| 1008 unittest.expect(o.description, unittest.equals('foo')); | 1043 unittest.expect(o.description, unittest.equals('foo')); |
| 1009 checkUnnamed1678(o.disksToAttach); | 1044 checkUnnamed1709(o.disksToAttach); |
| 1010 checkUnnamed1679(o.disksToCreate); | 1045 checkUnnamed1710(o.disksToCreate); |
| 1011 unittest.expect(o.initAction, unittest.equals('foo')); | 1046 unittest.expect(o.initAction, unittest.equals('foo')); |
| 1012 unittest.expect(o.machineType, unittest.equals('foo')); | 1047 unittest.expect(o.machineType, unittest.equals('foo')); |
| 1013 checkMetadata(o.metadata); | 1048 checkMetadata(o.metadata); |
| 1014 checkUnnamed1680(o.networkInterfaces); | 1049 checkUnnamed1711(o.networkInterfaces); |
| 1015 unittest.expect(o.onHostMaintenance, unittest.equals('foo')); | 1050 unittest.expect(o.onHostMaintenance, unittest.equals('foo')); |
| 1016 checkUnnamed1681(o.serviceAccounts); | 1051 checkUnnamed1712(o.serviceAccounts); |
| 1017 checkTag(o.tags); | 1052 checkTag(o.tags); |
| 1018 unittest.expect(o.zone, unittest.equals('foo')); | 1053 unittest.expect(o.zone, unittest.equals('foo')); |
| 1019 } | 1054 } |
| 1020 buildCounterReplicaPoolParamsV1Beta1--; | 1055 buildCounterReplicaPoolParamsV1Beta1--; |
| 1021 } | 1056 } |
| 1022 | 1057 |
| 1023 buildUnnamed1682() { | 1058 buildUnnamed1713() { |
| 1024 var o = new core.List<core.String>(); | 1059 var o = new core.List<core.String>(); |
| 1025 o.add("foo"); | 1060 o.add("foo"); |
| 1026 o.add("foo"); | 1061 o.add("foo"); |
| 1027 return o; | 1062 return o; |
| 1028 } | 1063 } |
| 1029 | 1064 |
| 1030 checkUnnamed1682(core.List<core.String> o) { | 1065 checkUnnamed1713(core.List<core.String> o) { |
| 1031 unittest.expect(o, unittest.hasLength(2)); | 1066 unittest.expect(o, unittest.hasLength(2)); |
| 1032 unittest.expect(o[0], unittest.equals('foo')); | 1067 unittest.expect(o[0], unittest.equals('foo')); |
| 1033 unittest.expect(o[1], unittest.equals('foo')); | 1068 unittest.expect(o[1], unittest.equals('foo')); |
| 1034 } | 1069 } |
| 1035 | 1070 |
| 1036 core.int buildCounterServiceAccount = 0; | 1071 core.int buildCounterServiceAccount = 0; |
| 1037 buildServiceAccount() { | 1072 buildServiceAccount() { |
| 1038 var o = new api.ServiceAccount(); | 1073 var o = new api.ServiceAccount(); |
| 1039 buildCounterServiceAccount++; | 1074 buildCounterServiceAccount++; |
| 1040 if (buildCounterServiceAccount < 3) { | 1075 if (buildCounterServiceAccount < 3) { |
| 1041 o.email = "foo"; | 1076 o.email = "foo"; |
| 1042 o.scopes = buildUnnamed1682(); | 1077 o.scopes = buildUnnamed1713(); |
| 1043 } | 1078 } |
| 1044 buildCounterServiceAccount--; | 1079 buildCounterServiceAccount--; |
| 1045 return o; | 1080 return o; |
| 1046 } | 1081 } |
| 1047 | 1082 |
| 1048 checkServiceAccount(api.ServiceAccount o) { | 1083 checkServiceAccount(api.ServiceAccount o) { |
| 1049 buildCounterServiceAccount++; | 1084 buildCounterServiceAccount++; |
| 1050 if (buildCounterServiceAccount < 3) { | 1085 if (buildCounterServiceAccount < 3) { |
| 1051 unittest.expect(o.email, unittest.equals('foo')); | 1086 unittest.expect(o.email, unittest.equals('foo')); |
| 1052 checkUnnamed1682(o.scopes); | 1087 checkUnnamed1713(o.scopes); |
| 1053 } | 1088 } |
| 1054 buildCounterServiceAccount--; | 1089 buildCounterServiceAccount--; |
| 1055 } | 1090 } |
| 1056 | 1091 |
| 1057 buildUnnamed1683() { | 1092 buildUnnamed1714() { |
| 1058 var o = new core.List<core.String>(); | 1093 var o = new core.List<core.String>(); |
| 1059 o.add("foo"); | 1094 o.add("foo"); |
| 1060 o.add("foo"); | 1095 o.add("foo"); |
| 1061 return o; | 1096 return o; |
| 1062 } | 1097 } |
| 1063 | 1098 |
| 1064 checkUnnamed1683(core.List<core.String> o) { | 1099 checkUnnamed1714(core.List<core.String> o) { |
| 1065 unittest.expect(o, unittest.hasLength(2)); | 1100 unittest.expect(o, unittest.hasLength(2)); |
| 1066 unittest.expect(o[0], unittest.equals('foo')); | 1101 unittest.expect(o[0], unittest.equals('foo')); |
| 1067 unittest.expect(o[1], unittest.equals('foo')); | 1102 unittest.expect(o[1], unittest.equals('foo')); |
| 1068 } | 1103 } |
| 1069 | 1104 |
| 1070 core.int buildCounterTag = 0; | 1105 core.int buildCounterTag = 0; |
| 1071 buildTag() { | 1106 buildTag() { |
| 1072 var o = new api.Tag(); | 1107 var o = new api.Tag(); |
| 1073 buildCounterTag++; | 1108 buildCounterTag++; |
| 1074 if (buildCounterTag < 3) { | 1109 if (buildCounterTag < 3) { |
| 1075 o.fingerPrint = "foo"; | 1110 o.fingerPrint = "foo"; |
| 1076 o.items = buildUnnamed1683(); | 1111 o.items = buildUnnamed1714(); |
| 1077 } | 1112 } |
| 1078 buildCounterTag--; | 1113 buildCounterTag--; |
| 1079 return o; | 1114 return o; |
| 1080 } | 1115 } |
| 1081 | 1116 |
| 1082 checkTag(api.Tag o) { | 1117 checkTag(api.Tag o) { |
| 1083 buildCounterTag++; | 1118 buildCounterTag++; |
| 1084 if (buildCounterTag < 3) { | 1119 if (buildCounterTag < 3) { |
| 1085 unittest.expect(o.fingerPrint, unittest.equals('foo')); | 1120 unittest.expect(o.fingerPrint, unittest.equals('foo')); |
| 1086 checkUnnamed1683(o.items); | 1121 checkUnnamed1714(o.items); |
| 1087 } | 1122 } |
| 1088 buildCounterTag--; | 1123 buildCounterTag--; |
| 1089 } | 1124 } |
| 1090 | 1125 |
| 1091 buildUnnamed1684() { | 1126 buildUnnamed1715() { |
| 1092 var o = new core.Map<core.String, api.Action>(); | 1127 var o = new core.Map<core.String, api.Action>(); |
| 1093 o["x"] = buildAction(); | 1128 o["x"] = buildAction(); |
| 1094 o["y"] = buildAction(); | 1129 o["y"] = buildAction(); |
| 1095 return o; | 1130 return o; |
| 1096 } | 1131 } |
| 1097 | 1132 |
| 1098 checkUnnamed1684(core.Map<core.String, api.Action> o) { | 1133 checkUnnamed1715(core.Map<core.String, api.Action> o) { |
| 1099 unittest.expect(o, unittest.hasLength(2)); | 1134 unittest.expect(o, unittest.hasLength(2)); |
| 1100 checkAction(o["x"]); | 1135 checkAction(o["x"]); |
| 1101 checkAction(o["y"]); | 1136 checkAction(o["y"]); |
| 1102 } | 1137 } |
| 1103 | 1138 |
| 1104 buildUnnamed1685() { | 1139 buildUnnamed1716() { |
| 1105 var o = new core.Map<core.String, api.Module>(); | 1140 var o = new core.Map<core.String, api.Module>(); |
| 1106 o["x"] = buildModule(); | 1141 o["x"] = buildModule(); |
| 1107 o["y"] = buildModule(); | 1142 o["y"] = buildModule(); |
| 1108 return o; | 1143 return o; |
| 1109 } | 1144 } |
| 1110 | 1145 |
| 1111 checkUnnamed1685(core.Map<core.String, api.Module> o) { | 1146 checkUnnamed1716(core.Map<core.String, api.Module> o) { |
| 1112 unittest.expect(o, unittest.hasLength(2)); | 1147 unittest.expect(o, unittest.hasLength(2)); |
| 1113 checkModule(o["x"]); | 1148 checkModule(o["x"]); |
| 1114 checkModule(o["y"]); | 1149 checkModule(o["y"]); |
| 1115 } | 1150 } |
| 1116 | 1151 |
| 1117 core.int buildCounterTemplate = 0; | 1152 core.int buildCounterTemplate = 0; |
| 1118 buildTemplate() { | 1153 buildTemplate() { |
| 1119 var o = new api.Template(); | 1154 var o = new api.Template(); |
| 1120 buildCounterTemplate++; | 1155 buildCounterTemplate++; |
| 1121 if (buildCounterTemplate < 3) { | 1156 if (buildCounterTemplate < 3) { |
| 1122 o.actions = buildUnnamed1684(); | 1157 o.actions = buildUnnamed1715(); |
| 1123 o.description = "foo"; | 1158 o.description = "foo"; |
| 1124 o.modules = buildUnnamed1685(); | 1159 o.modules = buildUnnamed1716(); |
| 1125 o.name = "foo"; | 1160 o.name = "foo"; |
| 1126 } | 1161 } |
| 1127 buildCounterTemplate--; | 1162 buildCounterTemplate--; |
| 1128 return o; | 1163 return o; |
| 1129 } | 1164 } |
| 1130 | 1165 |
| 1131 checkTemplate(api.Template o) { | 1166 checkTemplate(api.Template o) { |
| 1132 buildCounterTemplate++; | 1167 buildCounterTemplate++; |
| 1133 if (buildCounterTemplate < 3) { | 1168 if (buildCounterTemplate < 3) { |
| 1134 checkUnnamed1684(o.actions); | 1169 checkUnnamed1715(o.actions); |
| 1135 unittest.expect(o.description, unittest.equals('foo')); | 1170 unittest.expect(o.description, unittest.equals('foo')); |
| 1136 checkUnnamed1685(o.modules); | 1171 checkUnnamed1716(o.modules); |
| 1137 unittest.expect(o.name, unittest.equals('foo')); | 1172 unittest.expect(o.name, unittest.equals('foo')); |
| 1138 } | 1173 } |
| 1139 buildCounterTemplate--; | 1174 buildCounterTemplate--; |
| 1140 } | 1175 } |
| 1141 | 1176 |
| 1142 buildUnnamed1686() { | 1177 buildUnnamed1717() { |
| 1143 var o = new core.List<api.Template>(); | 1178 var o = new core.List<api.Template>(); |
| 1144 o.add(buildTemplate()); | 1179 o.add(buildTemplate()); |
| 1145 o.add(buildTemplate()); | 1180 o.add(buildTemplate()); |
| 1146 return o; | 1181 return o; |
| 1147 } | 1182 } |
| 1148 | 1183 |
| 1149 checkUnnamed1686(core.List<api.Template> o) { | 1184 checkUnnamed1717(core.List<api.Template> o) { |
| 1150 unittest.expect(o, unittest.hasLength(2)); | 1185 unittest.expect(o, unittest.hasLength(2)); |
| 1151 checkTemplate(o[0]); | 1186 checkTemplate(o[0]); |
| 1152 checkTemplate(o[1]); | 1187 checkTemplate(o[1]); |
| 1153 } | 1188 } |
| 1154 | 1189 |
| 1155 core.int buildCounterTemplatesListResponse = 0; | 1190 core.int buildCounterTemplatesListResponse = 0; |
| 1156 buildTemplatesListResponse() { | 1191 buildTemplatesListResponse() { |
| 1157 var o = new api.TemplatesListResponse(); | 1192 var o = new api.TemplatesListResponse(); |
| 1158 buildCounterTemplatesListResponse++; | 1193 buildCounterTemplatesListResponse++; |
| 1159 if (buildCounterTemplatesListResponse < 3) { | 1194 if (buildCounterTemplatesListResponse < 3) { |
| 1160 o.nextPageToken = "foo"; | 1195 o.nextPageToken = "foo"; |
| 1161 o.resources = buildUnnamed1686(); | 1196 o.resources = buildUnnamed1717(); |
| 1162 } | 1197 } |
| 1163 buildCounterTemplatesListResponse--; | 1198 buildCounterTemplatesListResponse--; |
| 1164 return o; | 1199 return o; |
| 1165 } | 1200 } |
| 1166 | 1201 |
| 1167 checkTemplatesListResponse(api.TemplatesListResponse o) { | 1202 checkTemplatesListResponse(api.TemplatesListResponse o) { |
| 1168 buildCounterTemplatesListResponse++; | 1203 buildCounterTemplatesListResponse++; |
| 1169 if (buildCounterTemplatesListResponse < 3) { | 1204 if (buildCounterTemplatesListResponse < 3) { |
| 1170 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 1205 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 1171 checkUnnamed1686(o.resources); | 1206 checkUnnamed1717(o.resources); |
| 1172 } | 1207 } |
| 1173 buildCounterTemplatesListResponse--; | 1208 buildCounterTemplatesListResponse--; |
| 1174 } | 1209 } |
| 1175 | 1210 |
| 1176 | 1211 |
| 1177 main() { | 1212 main() { |
| 1178 unittest.group("obj-schema-AccessConfig", () { | 1213 unittest.group("obj-schema-AccessConfig", () { |
| 1179 unittest.test("to-json--from-json", () { | 1214 unittest.test("to-json--from-json", () { |
| 1180 var o = buildAccessConfig(); | 1215 var o = buildAccessConfig(); |
| 1181 var od = new api.AccessConfig.fromJson(o.toJson()); | 1216 var od = new api.AccessConfig.fromJson(o.toJson()); |
| (...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1486 var o = buildTemplatesListResponse(); | 1521 var o = buildTemplatesListResponse(); |
| 1487 var od = new api.TemplatesListResponse.fromJson(o.toJson()); | 1522 var od = new api.TemplatesListResponse.fromJson(o.toJson()); |
| 1488 checkTemplatesListResponse(od); | 1523 checkTemplatesListResponse(od); |
| 1489 }); | 1524 }); |
| 1490 }); | 1525 }); |
| 1491 | 1526 |
| 1492 | 1527 |
| 1493 unittest.group("resource-DeploymentsResourceApi", () { | 1528 unittest.group("resource-DeploymentsResourceApi", () { |
| 1494 unittest.test("method--delete", () { | 1529 unittest.test("method--delete", () { |
| 1495 | 1530 |
| 1496 var mock = new common_test.HttpServerMock(); | 1531 var mock = new HttpServerMock(); |
| 1497 api.DeploymentsResourceApi res = new api.ManagerApi(mock).deployments; | 1532 api.DeploymentsResourceApi res = new api.ManagerApi(mock).deployments; |
| 1498 var arg_projectId = "foo"; | 1533 var arg_projectId = "foo"; |
| 1499 var arg_region = "foo"; | 1534 var arg_region = "foo"; |
| 1500 var arg_deploymentName = "foo"; | 1535 var arg_deploymentName = "foo"; |
| 1501 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1536 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 1502 var path = (req.url).path; | 1537 var path = (req.url).path; |
| 1503 var pathOffset = 0; | 1538 var pathOffset = 0; |
| 1504 var index; | 1539 var index; |
| 1505 var subPart; | 1540 var subPart; |
| 1506 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1541 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| (...skipping 14 matching lines...) Expand all Loading... |
| 1521 var keyvalue = part.split("="); | 1556 var keyvalue = part.split("="); |
| 1522 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1557 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 1523 } | 1558 } |
| 1524 } | 1559 } |
| 1525 | 1560 |
| 1526 | 1561 |
| 1527 var h = { | 1562 var h = { |
| 1528 "content-type" : "application/json; charset=utf-8", | 1563 "content-type" : "application/json; charset=utf-8", |
| 1529 }; | 1564 }; |
| 1530 var resp = ""; | 1565 var resp = ""; |
| 1531 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 1566 return new async.Future.value(stringResponse(200, h, resp)); |
| 1532 }), true); | 1567 }), true); |
| 1533 res.delete(arg_projectId, arg_region, arg_deploymentName).then(unittest.ex
pectAsync((_) {})); | 1568 res.delete(arg_projectId, arg_region, arg_deploymentName).then(unittest.ex
pectAsync((_) {})); |
| 1534 }); | 1569 }); |
| 1535 | 1570 |
| 1536 unittest.test("method--get", () { | 1571 unittest.test("method--get", () { |
| 1537 | 1572 |
| 1538 var mock = new common_test.HttpServerMock(); | 1573 var mock = new HttpServerMock(); |
| 1539 api.DeploymentsResourceApi res = new api.ManagerApi(mock).deployments; | 1574 api.DeploymentsResourceApi res = new api.ManagerApi(mock).deployments; |
| 1540 var arg_projectId = "foo"; | 1575 var arg_projectId = "foo"; |
| 1541 var arg_region = "foo"; | 1576 var arg_region = "foo"; |
| 1542 var arg_deploymentName = "foo"; | 1577 var arg_deploymentName = "foo"; |
| 1543 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1578 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 1544 var path = (req.url).path; | 1579 var path = (req.url).path; |
| 1545 var pathOffset = 0; | 1580 var pathOffset = 0; |
| 1546 var index; | 1581 var index; |
| 1547 var subPart; | 1582 var subPart; |
| 1548 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1583 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| (...skipping 14 matching lines...) Expand all Loading... |
| 1563 var keyvalue = part.split("="); | 1598 var keyvalue = part.split("="); |
| 1564 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1599 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 1565 } | 1600 } |
| 1566 } | 1601 } |
| 1567 | 1602 |
| 1568 | 1603 |
| 1569 var h = { | 1604 var h = { |
| 1570 "content-type" : "application/json; charset=utf-8", | 1605 "content-type" : "application/json; charset=utf-8", |
| 1571 }; | 1606 }; |
| 1572 var resp = convert.JSON.encode(buildDeployment()); | 1607 var resp = convert.JSON.encode(buildDeployment()); |
| 1573 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 1608 return new async.Future.value(stringResponse(200, h, resp)); |
| 1574 }), true); | 1609 }), true); |
| 1575 res.get(arg_projectId, arg_region, arg_deploymentName).then(unittest.expec
tAsync(((api.Deployment response) { | 1610 res.get(arg_projectId, arg_region, arg_deploymentName).then(unittest.expec
tAsync(((api.Deployment response) { |
| 1576 checkDeployment(response); | 1611 checkDeployment(response); |
| 1577 }))); | 1612 }))); |
| 1578 }); | 1613 }); |
| 1579 | 1614 |
| 1580 unittest.test("method--insert", () { | 1615 unittest.test("method--insert", () { |
| 1581 | 1616 |
| 1582 var mock = new common_test.HttpServerMock(); | 1617 var mock = new HttpServerMock(); |
| 1583 api.DeploymentsResourceApi res = new api.ManagerApi(mock).deployments; | 1618 api.DeploymentsResourceApi res = new api.ManagerApi(mock).deployments; |
| 1584 var arg_request = buildDeployment(); | 1619 var arg_request = buildDeployment(); |
| 1585 var arg_projectId = "foo"; | 1620 var arg_projectId = "foo"; |
| 1586 var arg_region = "foo"; | 1621 var arg_region = "foo"; |
| 1587 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1622 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 1588 var obj = new api.Deployment.fromJson(json); | 1623 var obj = new api.Deployment.fromJson(json); |
| 1589 checkDeployment(obj); | 1624 checkDeployment(obj); |
| 1590 | 1625 |
| 1591 var path = (req.url).path; | 1626 var path = (req.url).path; |
| 1592 var pathOffset = 0; | 1627 var pathOffset = 0; |
| (...skipping 17 matching lines...) Expand all Loading... |
| 1610 var keyvalue = part.split("="); | 1645 var keyvalue = part.split("="); |
| 1611 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1646 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 1612 } | 1647 } |
| 1613 } | 1648 } |
| 1614 | 1649 |
| 1615 | 1650 |
| 1616 var h = { | 1651 var h = { |
| 1617 "content-type" : "application/json; charset=utf-8", | 1652 "content-type" : "application/json; charset=utf-8", |
| 1618 }; | 1653 }; |
| 1619 var resp = convert.JSON.encode(buildDeployment()); | 1654 var resp = convert.JSON.encode(buildDeployment()); |
| 1620 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 1655 return new async.Future.value(stringResponse(200, h, resp)); |
| 1621 }), true); | 1656 }), true); |
| 1622 res.insert(arg_request, arg_projectId, arg_region).then(unittest.expectAsy
nc(((api.Deployment response) { | 1657 res.insert(arg_request, arg_projectId, arg_region).then(unittest.expectAsy
nc(((api.Deployment response) { |
| 1623 checkDeployment(response); | 1658 checkDeployment(response); |
| 1624 }))); | 1659 }))); |
| 1625 }); | 1660 }); |
| 1626 | 1661 |
| 1627 unittest.test("method--list", () { | 1662 unittest.test("method--list", () { |
| 1628 | 1663 |
| 1629 var mock = new common_test.HttpServerMock(); | 1664 var mock = new HttpServerMock(); |
| 1630 api.DeploymentsResourceApi res = new api.ManagerApi(mock).deployments; | 1665 api.DeploymentsResourceApi res = new api.ManagerApi(mock).deployments; |
| 1631 var arg_projectId = "foo"; | 1666 var arg_projectId = "foo"; |
| 1632 var arg_region = "foo"; | 1667 var arg_region = "foo"; |
| 1633 var arg_maxResults = 42; | 1668 var arg_maxResults = 42; |
| 1634 var arg_pageToken = "foo"; | 1669 var arg_pageToken = "foo"; |
| 1635 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1670 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 1636 var path = (req.url).path; | 1671 var path = (req.url).path; |
| 1637 var pathOffset = 0; | 1672 var pathOffset = 0; |
| 1638 var index; | 1673 var index; |
| 1639 var subPart; | 1674 var subPart; |
| (...skipping 17 matching lines...) Expand all Loading... |
| 1657 } | 1692 } |
| 1658 } | 1693 } |
| 1659 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | 1694 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); |
| 1660 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 1695 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
| 1661 | 1696 |
| 1662 | 1697 |
| 1663 var h = { | 1698 var h = { |
| 1664 "content-type" : "application/json; charset=utf-8", | 1699 "content-type" : "application/json; charset=utf-8", |
| 1665 }; | 1700 }; |
| 1666 var resp = convert.JSON.encode(buildDeploymentsListResponse()); | 1701 var resp = convert.JSON.encode(buildDeploymentsListResponse()); |
| 1667 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 1702 return new async.Future.value(stringResponse(200, h, resp)); |
| 1668 }), true); | 1703 }), true); |
| 1669 res.list(arg_projectId, arg_region, maxResults: arg_maxResults, pageToken:
arg_pageToken).then(unittest.expectAsync(((api.DeploymentsListResponse response
) { | 1704 res.list(arg_projectId, arg_region, maxResults: arg_maxResults, pageToken:
arg_pageToken).then(unittest.expectAsync(((api.DeploymentsListResponse response
) { |
| 1670 checkDeploymentsListResponse(response); | 1705 checkDeploymentsListResponse(response); |
| 1671 }))); | 1706 }))); |
| 1672 }); | 1707 }); |
| 1673 | 1708 |
| 1674 }); | 1709 }); |
| 1675 | 1710 |
| 1676 | 1711 |
| 1677 unittest.group("resource-TemplatesResourceApi", () { | 1712 unittest.group("resource-TemplatesResourceApi", () { |
| 1678 unittest.test("method--delete", () { | 1713 unittest.test("method--delete", () { |
| 1679 | 1714 |
| 1680 var mock = new common_test.HttpServerMock(); | 1715 var mock = new HttpServerMock(); |
| 1681 api.TemplatesResourceApi res = new api.ManagerApi(mock).templates; | 1716 api.TemplatesResourceApi res = new api.ManagerApi(mock).templates; |
| 1682 var arg_projectId = "foo"; | 1717 var arg_projectId = "foo"; |
| 1683 var arg_templateName = "foo"; | 1718 var arg_templateName = "foo"; |
| 1684 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1719 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 1685 var path = (req.url).path; | 1720 var path = (req.url).path; |
| 1686 var pathOffset = 0; | 1721 var pathOffset = 0; |
| 1687 var index; | 1722 var index; |
| 1688 var subPart; | 1723 var subPart; |
| 1689 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1724 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1690 pathOffset += 1; | 1725 pathOffset += 1; |
| (...skipping 13 matching lines...) Expand all Loading... |
| 1704 var keyvalue = part.split("="); | 1739 var keyvalue = part.split("="); |
| 1705 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1740 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 1706 } | 1741 } |
| 1707 } | 1742 } |
| 1708 | 1743 |
| 1709 | 1744 |
| 1710 var h = { | 1745 var h = { |
| 1711 "content-type" : "application/json; charset=utf-8", | 1746 "content-type" : "application/json; charset=utf-8", |
| 1712 }; | 1747 }; |
| 1713 var resp = ""; | 1748 var resp = ""; |
| 1714 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 1749 return new async.Future.value(stringResponse(200, h, resp)); |
| 1715 }), true); | 1750 }), true); |
| 1716 res.delete(arg_projectId, arg_templateName).then(unittest.expectAsync((_)
{})); | 1751 res.delete(arg_projectId, arg_templateName).then(unittest.expectAsync((_)
{})); |
| 1717 }); | 1752 }); |
| 1718 | 1753 |
| 1719 unittest.test("method--get", () { | 1754 unittest.test("method--get", () { |
| 1720 | 1755 |
| 1721 var mock = new common_test.HttpServerMock(); | 1756 var mock = new HttpServerMock(); |
| 1722 api.TemplatesResourceApi res = new api.ManagerApi(mock).templates; | 1757 api.TemplatesResourceApi res = new api.ManagerApi(mock).templates; |
| 1723 var arg_projectId = "foo"; | 1758 var arg_projectId = "foo"; |
| 1724 var arg_templateName = "foo"; | 1759 var arg_templateName = "foo"; |
| 1725 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1760 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 1726 var path = (req.url).path; | 1761 var path = (req.url).path; |
| 1727 var pathOffset = 0; | 1762 var pathOffset = 0; |
| 1728 var index; | 1763 var index; |
| 1729 var subPart; | 1764 var subPart; |
| 1730 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1765 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1731 pathOffset += 1; | 1766 pathOffset += 1; |
| (...skipping 13 matching lines...) Expand all Loading... |
| 1745 var keyvalue = part.split("="); | 1780 var keyvalue = part.split("="); |
| 1746 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1781 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 1747 } | 1782 } |
| 1748 } | 1783 } |
| 1749 | 1784 |
| 1750 | 1785 |
| 1751 var h = { | 1786 var h = { |
| 1752 "content-type" : "application/json; charset=utf-8", | 1787 "content-type" : "application/json; charset=utf-8", |
| 1753 }; | 1788 }; |
| 1754 var resp = convert.JSON.encode(buildTemplate()); | 1789 var resp = convert.JSON.encode(buildTemplate()); |
| 1755 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 1790 return new async.Future.value(stringResponse(200, h, resp)); |
| 1756 }), true); | 1791 }), true); |
| 1757 res.get(arg_projectId, arg_templateName).then(unittest.expectAsync(((api.T
emplate response) { | 1792 res.get(arg_projectId, arg_templateName).then(unittest.expectAsync(((api.T
emplate response) { |
| 1758 checkTemplate(response); | 1793 checkTemplate(response); |
| 1759 }))); | 1794 }))); |
| 1760 }); | 1795 }); |
| 1761 | 1796 |
| 1762 unittest.test("method--insert", () { | 1797 unittest.test("method--insert", () { |
| 1763 | 1798 |
| 1764 var mock = new common_test.HttpServerMock(); | 1799 var mock = new HttpServerMock(); |
| 1765 api.TemplatesResourceApi res = new api.ManagerApi(mock).templates; | 1800 api.TemplatesResourceApi res = new api.ManagerApi(mock).templates; |
| 1766 var arg_request = buildTemplate(); | 1801 var arg_request = buildTemplate(); |
| 1767 var arg_projectId = "foo"; | 1802 var arg_projectId = "foo"; |
| 1768 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1803 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 1769 var obj = new api.Template.fromJson(json); | 1804 var obj = new api.Template.fromJson(json); |
| 1770 checkTemplate(obj); | 1805 checkTemplate(obj); |
| 1771 | 1806 |
| 1772 var path = (req.url).path; | 1807 var path = (req.url).path; |
| 1773 var pathOffset = 0; | 1808 var pathOffset = 0; |
| 1774 var index; | 1809 var index; |
| (...skipping 16 matching lines...) Expand all Loading... |
| 1791 var keyvalue = part.split("="); | 1826 var keyvalue = part.split("="); |
| 1792 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1827 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 1793 } | 1828 } |
| 1794 } | 1829 } |
| 1795 | 1830 |
| 1796 | 1831 |
| 1797 var h = { | 1832 var h = { |
| 1798 "content-type" : "application/json; charset=utf-8", | 1833 "content-type" : "application/json; charset=utf-8", |
| 1799 }; | 1834 }; |
| 1800 var resp = convert.JSON.encode(buildTemplate()); | 1835 var resp = convert.JSON.encode(buildTemplate()); |
| 1801 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 1836 return new async.Future.value(stringResponse(200, h, resp)); |
| 1802 }), true); | 1837 }), true); |
| 1803 res.insert(arg_request, arg_projectId).then(unittest.expectAsync(((api.Tem
plate response) { | 1838 res.insert(arg_request, arg_projectId).then(unittest.expectAsync(((api.Tem
plate response) { |
| 1804 checkTemplate(response); | 1839 checkTemplate(response); |
| 1805 }))); | 1840 }))); |
| 1806 }); | 1841 }); |
| 1807 | 1842 |
| 1808 unittest.test("method--list", () { | 1843 unittest.test("method--list", () { |
| 1809 | 1844 |
| 1810 var mock = new common_test.HttpServerMock(); | 1845 var mock = new HttpServerMock(); |
| 1811 api.TemplatesResourceApi res = new api.ManagerApi(mock).templates; | 1846 api.TemplatesResourceApi res = new api.ManagerApi(mock).templates; |
| 1812 var arg_projectId = "foo"; | 1847 var arg_projectId = "foo"; |
| 1813 var arg_maxResults = 42; | 1848 var arg_maxResults = 42; |
| 1814 var arg_pageToken = "foo"; | 1849 var arg_pageToken = "foo"; |
| 1815 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1850 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 1816 var path = (req.url).path; | 1851 var path = (req.url).path; |
| 1817 var pathOffset = 0; | 1852 var pathOffset = 0; |
| 1818 var index; | 1853 var index; |
| 1819 var subPart; | 1854 var subPart; |
| 1820 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1855 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| (...skipping 16 matching lines...) Expand all Loading... |
| 1837 } | 1872 } |
| 1838 } | 1873 } |
| 1839 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | 1874 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); |
| 1840 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 1875 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
| 1841 | 1876 |
| 1842 | 1877 |
| 1843 var h = { | 1878 var h = { |
| 1844 "content-type" : "application/json; charset=utf-8", | 1879 "content-type" : "application/json; charset=utf-8", |
| 1845 }; | 1880 }; |
| 1846 var resp = convert.JSON.encode(buildTemplatesListResponse()); | 1881 var resp = convert.JSON.encode(buildTemplatesListResponse()); |
| 1847 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 1882 return new async.Future.value(stringResponse(200, h, resp)); |
| 1848 }), true); | 1883 }), true); |
| 1849 res.list(arg_projectId, maxResults: arg_maxResults, pageToken: arg_pageTok
en).then(unittest.expectAsync(((api.TemplatesListResponse response) { | 1884 res.list(arg_projectId, maxResults: arg_maxResults, pageToken: arg_pageTok
en).then(unittest.expectAsync(((api.TemplatesListResponse response) { |
| 1850 checkTemplatesListResponse(response); | 1885 checkTemplatesListResponse(response); |
| 1851 }))); | 1886 }))); |
| 1852 }); | 1887 }); |
| 1853 | 1888 |
| 1854 }); | 1889 }); |
| 1855 | 1890 |
| 1856 | 1891 |
| 1857 } | 1892 } |
| 1858 | 1893 |
| OLD | NEW |