| OLD | NEW |
| 1 library googleapis.cloudresourcemanager.v1.test; | 1 library googleapis.cloudresourcemanager.v1.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; |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 } | 63 } |
| 64 | 64 |
| 65 checkAncestor(api.Ancestor o) { | 65 checkAncestor(api.Ancestor o) { |
| 66 buildCounterAncestor++; | 66 buildCounterAncestor++; |
| 67 if (buildCounterAncestor < 3) { | 67 if (buildCounterAncestor < 3) { |
| 68 checkResourceId(o.resourceId); | 68 checkResourceId(o.resourceId); |
| 69 } | 69 } |
| 70 buildCounterAncestor--; | 70 buildCounterAncestor--; |
| 71 } | 71 } |
| 72 | 72 |
| 73 buildUnnamed1697() { | 73 buildUnnamed1787() { |
| 74 var o = new core.List<core.String>(); | 74 var o = new core.List<core.String>(); |
| 75 o.add("foo"); | 75 o.add("foo"); |
| 76 o.add("foo"); | 76 o.add("foo"); |
| 77 return o; | 77 return o; |
| 78 } | 78 } |
| 79 | 79 |
| 80 checkUnnamed1697(core.List<core.String> o) { | 80 checkUnnamed1787(core.List<core.String> o) { |
| 81 unittest.expect(o, unittest.hasLength(2)); | 81 unittest.expect(o, unittest.hasLength(2)); |
| 82 unittest.expect(o[0], unittest.equals('foo')); | 82 unittest.expect(o[0], unittest.equals('foo')); |
| 83 unittest.expect(o[1], unittest.equals('foo')); | 83 unittest.expect(o[1], unittest.equals('foo')); |
| 84 } | 84 } |
| 85 | 85 |
| 86 core.int buildCounterBinding = 0; | 86 core.int buildCounterBinding = 0; |
| 87 buildBinding() { | 87 buildBinding() { |
| 88 var o = new api.Binding(); | 88 var o = new api.Binding(); |
| 89 buildCounterBinding++; | 89 buildCounterBinding++; |
| 90 if (buildCounterBinding < 3) { | 90 if (buildCounterBinding < 3) { |
| 91 o.members = buildUnnamed1697(); | 91 o.members = buildUnnamed1787(); |
| 92 o.role = "foo"; | 92 o.role = "foo"; |
| 93 } | 93 } |
| 94 buildCounterBinding--; | 94 buildCounterBinding--; |
| 95 return o; | 95 return o; |
| 96 } | 96 } |
| 97 | 97 |
| 98 checkBinding(api.Binding o) { | 98 checkBinding(api.Binding o) { |
| 99 buildCounterBinding++; | 99 buildCounterBinding++; |
| 100 if (buildCounterBinding < 3) { | 100 if (buildCounterBinding < 3) { |
| 101 checkUnnamed1697(o.members); | 101 checkUnnamed1787(o.members); |
| 102 unittest.expect(o.role, unittest.equals('foo')); | 102 unittest.expect(o.role, unittest.equals('foo')); |
| 103 } | 103 } |
| 104 buildCounterBinding--; | 104 buildCounterBinding--; |
| 105 } | 105 } |
| 106 | 106 |
| 107 core.int buildCounterEmpty = 0; | 107 core.int buildCounterEmpty = 0; |
| 108 buildEmpty() { | 108 buildEmpty() { |
| 109 var o = new api.Empty(); | 109 var o = new api.Empty(); |
| 110 buildCounterEmpty++; | 110 buildCounterEmpty++; |
| 111 if (buildCounterEmpty < 3) { | 111 if (buildCounterEmpty < 3) { |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 return o; | 175 return o; |
| 176 } | 176 } |
| 177 | 177 |
| 178 checkGetAncestryRequest(api.GetAncestryRequest o) { | 178 checkGetAncestryRequest(api.GetAncestryRequest o) { |
| 179 buildCounterGetAncestryRequest++; | 179 buildCounterGetAncestryRequest++; |
| 180 if (buildCounterGetAncestryRequest < 3) { | 180 if (buildCounterGetAncestryRequest < 3) { |
| 181 } | 181 } |
| 182 buildCounterGetAncestryRequest--; | 182 buildCounterGetAncestryRequest--; |
| 183 } | 183 } |
| 184 | 184 |
| 185 buildUnnamed1698() { | 185 buildUnnamed1788() { |
| 186 var o = new core.List<api.Ancestor>(); | 186 var o = new core.List<api.Ancestor>(); |
| 187 o.add(buildAncestor()); | 187 o.add(buildAncestor()); |
| 188 o.add(buildAncestor()); | 188 o.add(buildAncestor()); |
| 189 return o; | 189 return o; |
| 190 } | 190 } |
| 191 | 191 |
| 192 checkUnnamed1698(core.List<api.Ancestor> o) { | 192 checkUnnamed1788(core.List<api.Ancestor> o) { |
| 193 unittest.expect(o, unittest.hasLength(2)); | 193 unittest.expect(o, unittest.hasLength(2)); |
| 194 checkAncestor(o[0]); | 194 checkAncestor(o[0]); |
| 195 checkAncestor(o[1]); | 195 checkAncestor(o[1]); |
| 196 } | 196 } |
| 197 | 197 |
| 198 core.int buildCounterGetAncestryResponse = 0; | 198 core.int buildCounterGetAncestryResponse = 0; |
| 199 buildGetAncestryResponse() { | 199 buildGetAncestryResponse() { |
| 200 var o = new api.GetAncestryResponse(); | 200 var o = new api.GetAncestryResponse(); |
| 201 buildCounterGetAncestryResponse++; | 201 buildCounterGetAncestryResponse++; |
| 202 if (buildCounterGetAncestryResponse < 3) { | 202 if (buildCounterGetAncestryResponse < 3) { |
| 203 o.ancestor = buildUnnamed1698(); | 203 o.ancestor = buildUnnamed1788(); |
| 204 } | 204 } |
| 205 buildCounterGetAncestryResponse--; | 205 buildCounterGetAncestryResponse--; |
| 206 return o; | 206 return o; |
| 207 } | 207 } |
| 208 | 208 |
| 209 checkGetAncestryResponse(api.GetAncestryResponse o) { | 209 checkGetAncestryResponse(api.GetAncestryResponse o) { |
| 210 buildCounterGetAncestryResponse++; | 210 buildCounterGetAncestryResponse++; |
| 211 if (buildCounterGetAncestryResponse < 3) { | 211 if (buildCounterGetAncestryResponse < 3) { |
| 212 checkUnnamed1698(o.ancestor); | 212 checkUnnamed1788(o.ancestor); |
| 213 } | 213 } |
| 214 buildCounterGetAncestryResponse--; | 214 buildCounterGetAncestryResponse--; |
| 215 } | 215 } |
| 216 | 216 |
| 217 core.int buildCounterGetIamPolicyRequest = 0; | 217 core.int buildCounterGetIamPolicyRequest = 0; |
| 218 buildGetIamPolicyRequest() { | 218 buildGetIamPolicyRequest() { |
| 219 var o = new api.GetIamPolicyRequest(); | 219 var o = new api.GetIamPolicyRequest(); |
| 220 buildCounterGetIamPolicyRequest++; | 220 buildCounterGetIamPolicyRequest++; |
| 221 if (buildCounterGetIamPolicyRequest < 3) { | 221 if (buildCounterGetIamPolicyRequest < 3) { |
| 222 } | 222 } |
| 223 buildCounterGetIamPolicyRequest--; | 223 buildCounterGetIamPolicyRequest--; |
| 224 return o; | 224 return o; |
| 225 } | 225 } |
| 226 | 226 |
| 227 checkGetIamPolicyRequest(api.GetIamPolicyRequest o) { | 227 checkGetIamPolicyRequest(api.GetIamPolicyRequest o) { |
| 228 buildCounterGetIamPolicyRequest++; | 228 buildCounterGetIamPolicyRequest++; |
| 229 if (buildCounterGetIamPolicyRequest < 3) { | 229 if (buildCounterGetIamPolicyRequest < 3) { |
| 230 } | 230 } |
| 231 buildCounterGetIamPolicyRequest--; | 231 buildCounterGetIamPolicyRequest--; |
| 232 } | 232 } |
| 233 | 233 |
| 234 buildUnnamed1699() { | 234 buildUnnamed1789() { |
| 235 var o = new core.List<api.Project>(); | 235 var o = new core.List<api.Project>(); |
| 236 o.add(buildProject()); | 236 o.add(buildProject()); |
| 237 o.add(buildProject()); | 237 o.add(buildProject()); |
| 238 return o; | 238 return o; |
| 239 } | 239 } |
| 240 | 240 |
| 241 checkUnnamed1699(core.List<api.Project> o) { | 241 checkUnnamed1789(core.List<api.Project> o) { |
| 242 unittest.expect(o, unittest.hasLength(2)); | 242 unittest.expect(o, unittest.hasLength(2)); |
| 243 checkProject(o[0]); | 243 checkProject(o[0]); |
| 244 checkProject(o[1]); | 244 checkProject(o[1]); |
| 245 } | 245 } |
| 246 | 246 |
| 247 core.int buildCounterListProjectsResponse = 0; | 247 core.int buildCounterListProjectsResponse = 0; |
| 248 buildListProjectsResponse() { | 248 buildListProjectsResponse() { |
| 249 var o = new api.ListProjectsResponse(); | 249 var o = new api.ListProjectsResponse(); |
| 250 buildCounterListProjectsResponse++; | 250 buildCounterListProjectsResponse++; |
| 251 if (buildCounterListProjectsResponse < 3) { | 251 if (buildCounterListProjectsResponse < 3) { |
| 252 o.nextPageToken = "foo"; | 252 o.nextPageToken = "foo"; |
| 253 o.projects = buildUnnamed1699(); | 253 o.projects = buildUnnamed1789(); |
| 254 } | 254 } |
| 255 buildCounterListProjectsResponse--; | 255 buildCounterListProjectsResponse--; |
| 256 return o; | 256 return o; |
| 257 } | 257 } |
| 258 | 258 |
| 259 checkListProjectsResponse(api.ListProjectsResponse o) { | 259 checkListProjectsResponse(api.ListProjectsResponse o) { |
| 260 buildCounterListProjectsResponse++; | 260 buildCounterListProjectsResponse++; |
| 261 if (buildCounterListProjectsResponse < 3) { | 261 if (buildCounterListProjectsResponse < 3) { |
| 262 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 262 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 263 checkUnnamed1699(o.projects); | 263 checkUnnamed1789(o.projects); |
| 264 } | 264 } |
| 265 buildCounterListProjectsResponse--; | 265 buildCounterListProjectsResponse--; |
| 266 } | 266 } |
| 267 | 267 |
| 268 buildUnnamed1700() { | 268 buildUnnamed1790() { |
| 269 var o = new core.Map<core.String, core.Object>(); | 269 var o = new core.Map<core.String, core.Object>(); |
| 270 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 270 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
| 271 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 271 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
| 272 return o; | 272 return o; |
| 273 } | 273 } |
| 274 | 274 |
| 275 checkUnnamed1700(core.Map<core.String, core.Object> o) { | 275 checkUnnamed1790(core.Map<core.String, core.Object> o) { |
| 276 unittest.expect(o, unittest.hasLength(2)); | 276 unittest.expect(o, unittest.hasLength(2)); |
| 277 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')); | 277 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')); |
| 278 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')); | 278 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')); |
| 279 } | 279 } |
| 280 | 280 |
| 281 buildUnnamed1701() { | 281 buildUnnamed1791() { |
| 282 var o = new core.Map<core.String, core.Object>(); | 282 var o = new core.Map<core.String, core.Object>(); |
| 283 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 283 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
| 284 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 284 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
| 285 return o; | 285 return o; |
| 286 } | 286 } |
| 287 | 287 |
| 288 checkUnnamed1701(core.Map<core.String, core.Object> o) { | 288 checkUnnamed1791(core.Map<core.String, core.Object> o) { |
| 289 unittest.expect(o, unittest.hasLength(2)); | 289 unittest.expect(o, unittest.hasLength(2)); |
| 290 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')); | 290 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')); |
| 291 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')); | 291 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')); |
| 292 } | 292 } |
| 293 | 293 |
| 294 core.int buildCounterOperation = 0; | 294 core.int buildCounterOperation = 0; |
| 295 buildOperation() { | 295 buildOperation() { |
| 296 var o = new api.Operation(); | 296 var o = new api.Operation(); |
| 297 buildCounterOperation++; | 297 buildCounterOperation++; |
| 298 if (buildCounterOperation < 3) { | 298 if (buildCounterOperation < 3) { |
| 299 o.done = true; | 299 o.done = true; |
| 300 o.error = buildStatus(); | 300 o.error = buildStatus(); |
| 301 o.metadata = buildUnnamed1700(); | 301 o.metadata = buildUnnamed1790(); |
| 302 o.name = "foo"; | 302 o.name = "foo"; |
| 303 o.response = buildUnnamed1701(); | 303 o.response = buildUnnamed1791(); |
| 304 } | 304 } |
| 305 buildCounterOperation--; | 305 buildCounterOperation--; |
| 306 return o; | 306 return o; |
| 307 } | 307 } |
| 308 | 308 |
| 309 checkOperation(api.Operation o) { | 309 checkOperation(api.Operation o) { |
| 310 buildCounterOperation++; | 310 buildCounterOperation++; |
| 311 if (buildCounterOperation < 3) { | 311 if (buildCounterOperation < 3) { |
| 312 unittest.expect(o.done, unittest.isTrue); | 312 unittest.expect(o.done, unittest.isTrue); |
| 313 checkStatus(o.error); | 313 checkStatus(o.error); |
| 314 checkUnnamed1700(o.metadata); | 314 checkUnnamed1790(o.metadata); |
| 315 unittest.expect(o.name, unittest.equals('foo')); | 315 unittest.expect(o.name, unittest.equals('foo')); |
| 316 checkUnnamed1701(o.response); | 316 checkUnnamed1791(o.response); |
| 317 } | 317 } |
| 318 buildCounterOperation--; | 318 buildCounterOperation--; |
| 319 } | 319 } |
| 320 | 320 |
| 321 core.int buildCounterOrganization = 0; | 321 core.int buildCounterOrganization = 0; |
| 322 buildOrganization() { | 322 buildOrganization() { |
| 323 var o = new api.Organization(); | 323 var o = new api.Organization(); |
| 324 buildCounterOrganization++; | 324 buildCounterOrganization++; |
| 325 if (buildCounterOrganization < 3) { | 325 if (buildCounterOrganization < 3) { |
| 326 o.creationTime = "foo"; | 326 o.creationTime = "foo"; |
| (...skipping 30 matching lines...) Expand all Loading... |
| 357 } | 357 } |
| 358 | 358 |
| 359 checkOrganizationOwner(api.OrganizationOwner o) { | 359 checkOrganizationOwner(api.OrganizationOwner o) { |
| 360 buildCounterOrganizationOwner++; | 360 buildCounterOrganizationOwner++; |
| 361 if (buildCounterOrganizationOwner < 3) { | 361 if (buildCounterOrganizationOwner < 3) { |
| 362 unittest.expect(o.directoryCustomerId, unittest.equals('foo')); | 362 unittest.expect(o.directoryCustomerId, unittest.equals('foo')); |
| 363 } | 363 } |
| 364 buildCounterOrganizationOwner--; | 364 buildCounterOrganizationOwner--; |
| 365 } | 365 } |
| 366 | 366 |
| 367 buildUnnamed1702() { | 367 buildUnnamed1792() { |
| 368 var o = new core.List<api.Binding>(); | 368 var o = new core.List<api.Binding>(); |
| 369 o.add(buildBinding()); | 369 o.add(buildBinding()); |
| 370 o.add(buildBinding()); | 370 o.add(buildBinding()); |
| 371 return o; | 371 return o; |
| 372 } | 372 } |
| 373 | 373 |
| 374 checkUnnamed1702(core.List<api.Binding> o) { | 374 checkUnnamed1792(core.List<api.Binding> o) { |
| 375 unittest.expect(o, unittest.hasLength(2)); | 375 unittest.expect(o, unittest.hasLength(2)); |
| 376 checkBinding(o[0]); | 376 checkBinding(o[0]); |
| 377 checkBinding(o[1]); | 377 checkBinding(o[1]); |
| 378 } | 378 } |
| 379 | 379 |
| 380 core.int buildCounterPolicy = 0; | 380 core.int buildCounterPolicy = 0; |
| 381 buildPolicy() { | 381 buildPolicy() { |
| 382 var o = new api.Policy(); | 382 var o = new api.Policy(); |
| 383 buildCounterPolicy++; | 383 buildCounterPolicy++; |
| 384 if (buildCounterPolicy < 3) { | 384 if (buildCounterPolicy < 3) { |
| 385 o.bindings = buildUnnamed1702(); | 385 o.bindings = buildUnnamed1792(); |
| 386 o.etag = "foo"; | 386 o.etag = "foo"; |
| 387 o.version = 42; | 387 o.version = 42; |
| 388 } | 388 } |
| 389 buildCounterPolicy--; | 389 buildCounterPolicy--; |
| 390 return o; | 390 return o; |
| 391 } | 391 } |
| 392 | 392 |
| 393 checkPolicy(api.Policy o) { | 393 checkPolicy(api.Policy o) { |
| 394 buildCounterPolicy++; | 394 buildCounterPolicy++; |
| 395 if (buildCounterPolicy < 3) { | 395 if (buildCounterPolicy < 3) { |
| 396 checkUnnamed1702(o.bindings); | 396 checkUnnamed1792(o.bindings); |
| 397 unittest.expect(o.etag, unittest.equals('foo')); | 397 unittest.expect(o.etag, unittest.equals('foo')); |
| 398 unittest.expect(o.version, unittest.equals(42)); | 398 unittest.expect(o.version, unittest.equals(42)); |
| 399 } | 399 } |
| 400 buildCounterPolicy--; | 400 buildCounterPolicy--; |
| 401 } | 401 } |
| 402 | 402 |
| 403 buildUnnamed1703() { | 403 buildUnnamed1793() { |
| 404 var o = new core.Map<core.String, core.String>(); | 404 var o = new core.Map<core.String, core.String>(); |
| 405 o["x"] = "foo"; | 405 o["x"] = "foo"; |
| 406 o["y"] = "foo"; | 406 o["y"] = "foo"; |
| 407 return o; | 407 return o; |
| 408 } | 408 } |
| 409 | 409 |
| 410 checkUnnamed1703(core.Map<core.String, core.String> o) { | 410 checkUnnamed1793(core.Map<core.String, core.String> o) { |
| 411 unittest.expect(o, unittest.hasLength(2)); | 411 unittest.expect(o, unittest.hasLength(2)); |
| 412 unittest.expect(o["x"], unittest.equals('foo')); | 412 unittest.expect(o["x"], unittest.equals('foo')); |
| 413 unittest.expect(o["y"], unittest.equals('foo')); | 413 unittest.expect(o["y"], unittest.equals('foo')); |
| 414 } | 414 } |
| 415 | 415 |
| 416 core.int buildCounterProject = 0; | 416 core.int buildCounterProject = 0; |
| 417 buildProject() { | 417 buildProject() { |
| 418 var o = new api.Project(); | 418 var o = new api.Project(); |
| 419 buildCounterProject++; | 419 buildCounterProject++; |
| 420 if (buildCounterProject < 3) { | 420 if (buildCounterProject < 3) { |
| 421 o.createTime = "foo"; | 421 o.createTime = "foo"; |
| 422 o.labels = buildUnnamed1703(); | 422 o.labels = buildUnnamed1793(); |
| 423 o.lifecycleState = "foo"; | 423 o.lifecycleState = "foo"; |
| 424 o.name = "foo"; | 424 o.name = "foo"; |
| 425 o.parent = buildResourceId(); | 425 o.parent = buildResourceId(); |
| 426 o.projectId = "foo"; | 426 o.projectId = "foo"; |
| 427 o.projectNumber = "foo"; | 427 o.projectNumber = "foo"; |
| 428 } | 428 } |
| 429 buildCounterProject--; | 429 buildCounterProject--; |
| 430 return o; | 430 return o; |
| 431 } | 431 } |
| 432 | 432 |
| 433 checkProject(api.Project o) { | 433 checkProject(api.Project o) { |
| 434 buildCounterProject++; | 434 buildCounterProject++; |
| 435 if (buildCounterProject < 3) { | 435 if (buildCounterProject < 3) { |
| 436 unittest.expect(o.createTime, unittest.equals('foo')); | 436 unittest.expect(o.createTime, unittest.equals('foo')); |
| 437 checkUnnamed1703(o.labels); | 437 checkUnnamed1793(o.labels); |
| 438 unittest.expect(o.lifecycleState, unittest.equals('foo')); | 438 unittest.expect(o.lifecycleState, unittest.equals('foo')); |
| 439 unittest.expect(o.name, unittest.equals('foo')); | 439 unittest.expect(o.name, unittest.equals('foo')); |
| 440 checkResourceId(o.parent); | 440 checkResourceId(o.parent); |
| 441 unittest.expect(o.projectId, unittest.equals('foo')); | 441 unittest.expect(o.projectId, unittest.equals('foo')); |
| 442 unittest.expect(o.projectNumber, unittest.equals('foo')); | 442 unittest.expect(o.projectNumber, unittest.equals('foo')); |
| 443 } | 443 } |
| 444 buildCounterProject--; | 444 buildCounterProject--; |
| 445 } | 445 } |
| 446 | 446 |
| 447 core.int buildCounterProjectCreationStatus = 0; | 447 core.int buildCounterProjectCreationStatus = 0; |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 504 checkSearchOrganizationsRequest(api.SearchOrganizationsRequest o) { | 504 checkSearchOrganizationsRequest(api.SearchOrganizationsRequest o) { |
| 505 buildCounterSearchOrganizationsRequest++; | 505 buildCounterSearchOrganizationsRequest++; |
| 506 if (buildCounterSearchOrganizationsRequest < 3) { | 506 if (buildCounterSearchOrganizationsRequest < 3) { |
| 507 unittest.expect(o.filter, unittest.equals('foo')); | 507 unittest.expect(o.filter, unittest.equals('foo')); |
| 508 unittest.expect(o.pageSize, unittest.equals(42)); | 508 unittest.expect(o.pageSize, unittest.equals(42)); |
| 509 unittest.expect(o.pageToken, unittest.equals('foo')); | 509 unittest.expect(o.pageToken, unittest.equals('foo')); |
| 510 } | 510 } |
| 511 buildCounterSearchOrganizationsRequest--; | 511 buildCounterSearchOrganizationsRequest--; |
| 512 } | 512 } |
| 513 | 513 |
| 514 buildUnnamed1704() { | 514 buildUnnamed1794() { |
| 515 var o = new core.List<api.Organization>(); | 515 var o = new core.List<api.Organization>(); |
| 516 o.add(buildOrganization()); | 516 o.add(buildOrganization()); |
| 517 o.add(buildOrganization()); | 517 o.add(buildOrganization()); |
| 518 return o; | 518 return o; |
| 519 } | 519 } |
| 520 | 520 |
| 521 checkUnnamed1704(core.List<api.Organization> o) { | 521 checkUnnamed1794(core.List<api.Organization> o) { |
| 522 unittest.expect(o, unittest.hasLength(2)); | 522 unittest.expect(o, unittest.hasLength(2)); |
| 523 checkOrganization(o[0]); | 523 checkOrganization(o[0]); |
| 524 checkOrganization(o[1]); | 524 checkOrganization(o[1]); |
| 525 } | 525 } |
| 526 | 526 |
| 527 core.int buildCounterSearchOrganizationsResponse = 0; | 527 core.int buildCounterSearchOrganizationsResponse = 0; |
| 528 buildSearchOrganizationsResponse() { | 528 buildSearchOrganizationsResponse() { |
| 529 var o = new api.SearchOrganizationsResponse(); | 529 var o = new api.SearchOrganizationsResponse(); |
| 530 buildCounterSearchOrganizationsResponse++; | 530 buildCounterSearchOrganizationsResponse++; |
| 531 if (buildCounterSearchOrganizationsResponse < 3) { | 531 if (buildCounterSearchOrganizationsResponse < 3) { |
| 532 o.nextPageToken = "foo"; | 532 o.nextPageToken = "foo"; |
| 533 o.organizations = buildUnnamed1704(); | 533 o.organizations = buildUnnamed1794(); |
| 534 } | 534 } |
| 535 buildCounterSearchOrganizationsResponse--; | 535 buildCounterSearchOrganizationsResponse--; |
| 536 return o; | 536 return o; |
| 537 } | 537 } |
| 538 | 538 |
| 539 checkSearchOrganizationsResponse(api.SearchOrganizationsResponse o) { | 539 checkSearchOrganizationsResponse(api.SearchOrganizationsResponse o) { |
| 540 buildCounterSearchOrganizationsResponse++; | 540 buildCounterSearchOrganizationsResponse++; |
| 541 if (buildCounterSearchOrganizationsResponse < 3) { | 541 if (buildCounterSearchOrganizationsResponse < 3) { |
| 542 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 542 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 543 checkUnnamed1704(o.organizations); | 543 checkUnnamed1794(o.organizations); |
| 544 } | 544 } |
| 545 buildCounterSearchOrganizationsResponse--; | 545 buildCounterSearchOrganizationsResponse--; |
| 546 } | 546 } |
| 547 | 547 |
| 548 core.int buildCounterSetIamPolicyRequest = 0; | 548 core.int buildCounterSetIamPolicyRequest = 0; |
| 549 buildSetIamPolicyRequest() { | 549 buildSetIamPolicyRequest() { |
| 550 var o = new api.SetIamPolicyRequest(); | 550 var o = new api.SetIamPolicyRequest(); |
| 551 buildCounterSetIamPolicyRequest++; | 551 buildCounterSetIamPolicyRequest++; |
| 552 if (buildCounterSetIamPolicyRequest < 3) { | 552 if (buildCounterSetIamPolicyRequest < 3) { |
| 553 o.policy = buildPolicy(); | 553 o.policy = buildPolicy(); |
| 554 } | 554 } |
| 555 buildCounterSetIamPolicyRequest--; | 555 buildCounterSetIamPolicyRequest--; |
| 556 return o; | 556 return o; |
| 557 } | 557 } |
| 558 | 558 |
| 559 checkSetIamPolicyRequest(api.SetIamPolicyRequest o) { | 559 checkSetIamPolicyRequest(api.SetIamPolicyRequest o) { |
| 560 buildCounterSetIamPolicyRequest++; | 560 buildCounterSetIamPolicyRequest++; |
| 561 if (buildCounterSetIamPolicyRequest < 3) { | 561 if (buildCounterSetIamPolicyRequest < 3) { |
| 562 checkPolicy(o.policy); | 562 checkPolicy(o.policy); |
| 563 } | 563 } |
| 564 buildCounterSetIamPolicyRequest--; | 564 buildCounterSetIamPolicyRequest--; |
| 565 } | 565 } |
| 566 | 566 |
| 567 buildUnnamed1705() { | 567 buildUnnamed1795() { |
| 568 var o = new core.Map<core.String, core.Object>(); | 568 var o = new core.Map<core.String, core.Object>(); |
| 569 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 569 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
| 570 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 570 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
| 571 return o; | 571 return o; |
| 572 } | 572 } |
| 573 | 573 |
| 574 checkUnnamed1705(core.Map<core.String, core.Object> o) { | 574 checkUnnamed1795(core.Map<core.String, core.Object> o) { |
| 575 unittest.expect(o, unittest.hasLength(2)); | 575 unittest.expect(o, unittest.hasLength(2)); |
| 576 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')); | 576 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')); |
| 577 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')); | 577 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')); |
| 578 } | 578 } |
| 579 | 579 |
| 580 buildUnnamed1706() { | 580 buildUnnamed1796() { |
| 581 var o = new core.List<core.Map<core.String, core.Object>>(); | 581 var o = new core.List<core.Map<core.String, core.Object>>(); |
| 582 o.add(buildUnnamed1705()); | 582 o.add(buildUnnamed1795()); |
| 583 o.add(buildUnnamed1705()); | 583 o.add(buildUnnamed1795()); |
| 584 return o; | 584 return o; |
| 585 } | 585 } |
| 586 | 586 |
| 587 checkUnnamed1706(core.List<core.Map<core.String, core.Object>> o) { | 587 checkUnnamed1796(core.List<core.Map<core.String, core.Object>> o) { |
| 588 unittest.expect(o, unittest.hasLength(2)); | 588 unittest.expect(o, unittest.hasLength(2)); |
| 589 checkUnnamed1705(o[0]); | 589 checkUnnamed1795(o[0]); |
| 590 checkUnnamed1705(o[1]); | 590 checkUnnamed1795(o[1]); |
| 591 } | 591 } |
| 592 | 592 |
| 593 core.int buildCounterStatus = 0; | 593 core.int buildCounterStatus = 0; |
| 594 buildStatus() { | 594 buildStatus() { |
| 595 var o = new api.Status(); | 595 var o = new api.Status(); |
| 596 buildCounterStatus++; | 596 buildCounterStatus++; |
| 597 if (buildCounterStatus < 3) { | 597 if (buildCounterStatus < 3) { |
| 598 o.code = 42; | 598 o.code = 42; |
| 599 o.details = buildUnnamed1706(); | 599 o.details = buildUnnamed1796(); |
| 600 o.message = "foo"; | 600 o.message = "foo"; |
| 601 } | 601 } |
| 602 buildCounterStatus--; | 602 buildCounterStatus--; |
| 603 return o; | 603 return o; |
| 604 } | 604 } |
| 605 | 605 |
| 606 checkStatus(api.Status o) { | 606 checkStatus(api.Status o) { |
| 607 buildCounterStatus++; | 607 buildCounterStatus++; |
| 608 if (buildCounterStatus < 3) { | 608 if (buildCounterStatus < 3) { |
| 609 unittest.expect(o.code, unittest.equals(42)); | 609 unittest.expect(o.code, unittest.equals(42)); |
| 610 checkUnnamed1706(o.details); | 610 checkUnnamed1796(o.details); |
| 611 unittest.expect(o.message, unittest.equals('foo')); | 611 unittest.expect(o.message, unittest.equals('foo')); |
| 612 } | 612 } |
| 613 buildCounterStatus--; | 613 buildCounterStatus--; |
| 614 } | 614 } |
| 615 | 615 |
| 616 buildUnnamed1707() { | 616 buildUnnamed1797() { |
| 617 var o = new core.List<core.String>(); | 617 var o = new core.List<core.String>(); |
| 618 o.add("foo"); | 618 o.add("foo"); |
| 619 o.add("foo"); | 619 o.add("foo"); |
| 620 return o; | 620 return o; |
| 621 } | 621 } |
| 622 | 622 |
| 623 checkUnnamed1707(core.List<core.String> o) { | 623 checkUnnamed1797(core.List<core.String> o) { |
| 624 unittest.expect(o, unittest.hasLength(2)); | 624 unittest.expect(o, unittest.hasLength(2)); |
| 625 unittest.expect(o[0], unittest.equals('foo')); | 625 unittest.expect(o[0], unittest.equals('foo')); |
| 626 unittest.expect(o[1], unittest.equals('foo')); | 626 unittest.expect(o[1], unittest.equals('foo')); |
| 627 } | 627 } |
| 628 | 628 |
| 629 core.int buildCounterTestIamPermissionsRequest = 0; | 629 core.int buildCounterTestIamPermissionsRequest = 0; |
| 630 buildTestIamPermissionsRequest() { | 630 buildTestIamPermissionsRequest() { |
| 631 var o = new api.TestIamPermissionsRequest(); | 631 var o = new api.TestIamPermissionsRequest(); |
| 632 buildCounterTestIamPermissionsRequest++; | 632 buildCounterTestIamPermissionsRequest++; |
| 633 if (buildCounterTestIamPermissionsRequest < 3) { | 633 if (buildCounterTestIamPermissionsRequest < 3) { |
| 634 o.permissions = buildUnnamed1707(); | 634 o.permissions = buildUnnamed1797(); |
| 635 } | 635 } |
| 636 buildCounterTestIamPermissionsRequest--; | 636 buildCounterTestIamPermissionsRequest--; |
| 637 return o; | 637 return o; |
| 638 } | 638 } |
| 639 | 639 |
| 640 checkTestIamPermissionsRequest(api.TestIamPermissionsRequest o) { | 640 checkTestIamPermissionsRequest(api.TestIamPermissionsRequest o) { |
| 641 buildCounterTestIamPermissionsRequest++; | 641 buildCounterTestIamPermissionsRequest++; |
| 642 if (buildCounterTestIamPermissionsRequest < 3) { | 642 if (buildCounterTestIamPermissionsRequest < 3) { |
| 643 checkUnnamed1707(o.permissions); | 643 checkUnnamed1797(o.permissions); |
| 644 } | 644 } |
| 645 buildCounterTestIamPermissionsRequest--; | 645 buildCounterTestIamPermissionsRequest--; |
| 646 } | 646 } |
| 647 | 647 |
| 648 buildUnnamed1708() { | 648 buildUnnamed1798() { |
| 649 var o = new core.List<core.String>(); | 649 var o = new core.List<core.String>(); |
| 650 o.add("foo"); | 650 o.add("foo"); |
| 651 o.add("foo"); | 651 o.add("foo"); |
| 652 return o; | 652 return o; |
| 653 } | 653 } |
| 654 | 654 |
| 655 checkUnnamed1708(core.List<core.String> o) { | 655 checkUnnamed1798(core.List<core.String> o) { |
| 656 unittest.expect(o, unittest.hasLength(2)); | 656 unittest.expect(o, unittest.hasLength(2)); |
| 657 unittest.expect(o[0], unittest.equals('foo')); | 657 unittest.expect(o[0], unittest.equals('foo')); |
| 658 unittest.expect(o[1], unittest.equals('foo')); | 658 unittest.expect(o[1], unittest.equals('foo')); |
| 659 } | 659 } |
| 660 | 660 |
| 661 core.int buildCounterTestIamPermissionsResponse = 0; | 661 core.int buildCounterTestIamPermissionsResponse = 0; |
| 662 buildTestIamPermissionsResponse() { | 662 buildTestIamPermissionsResponse() { |
| 663 var o = new api.TestIamPermissionsResponse(); | 663 var o = new api.TestIamPermissionsResponse(); |
| 664 buildCounterTestIamPermissionsResponse++; | 664 buildCounterTestIamPermissionsResponse++; |
| 665 if (buildCounterTestIamPermissionsResponse < 3) { | 665 if (buildCounterTestIamPermissionsResponse < 3) { |
| 666 o.permissions = buildUnnamed1708(); | 666 o.permissions = buildUnnamed1798(); |
| 667 } | 667 } |
| 668 buildCounterTestIamPermissionsResponse--; | 668 buildCounterTestIamPermissionsResponse--; |
| 669 return o; | 669 return o; |
| 670 } | 670 } |
| 671 | 671 |
| 672 checkTestIamPermissionsResponse(api.TestIamPermissionsResponse o) { | 672 checkTestIamPermissionsResponse(api.TestIamPermissionsResponse o) { |
| 673 buildCounterTestIamPermissionsResponse++; | 673 buildCounterTestIamPermissionsResponse++; |
| 674 if (buildCounterTestIamPermissionsResponse < 3) { | 674 if (buildCounterTestIamPermissionsResponse < 3) { |
| 675 checkUnnamed1708(o.permissions); | 675 checkUnnamed1798(o.permissions); |
| 676 } | 676 } |
| 677 buildCounterTestIamPermissionsResponse--; | 677 buildCounterTestIamPermissionsResponse--; |
| 678 } | 678 } |
| 679 | 679 |
| 680 core.int buildCounterUndeleteProjectRequest = 0; | 680 core.int buildCounterUndeleteProjectRequest = 0; |
| 681 buildUndeleteProjectRequest() { | 681 buildUndeleteProjectRequest() { |
| 682 var o = new api.UndeleteProjectRequest(); | 682 var o = new api.UndeleteProjectRequest(); |
| 683 buildCounterUndeleteProjectRequest++; | 683 buildCounterUndeleteProjectRequest++; |
| 684 if (buildCounterUndeleteProjectRequest < 3) { | 684 if (buildCounterUndeleteProjectRequest < 3) { |
| 685 } | 685 } |
| (...skipping 758 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1444 }), true); | 1444 }), true); |
| 1445 res.getIamPolicy(arg_request, arg_resource).then(unittest.expectAsync(((ap
i.Policy response) { | 1445 res.getIamPolicy(arg_request, arg_resource).then(unittest.expectAsync(((ap
i.Policy response) { |
| 1446 checkPolicy(response); | 1446 checkPolicy(response); |
| 1447 }))); | 1447 }))); |
| 1448 }); | 1448 }); |
| 1449 | 1449 |
| 1450 unittest.test("method--list", () { | 1450 unittest.test("method--list", () { |
| 1451 | 1451 |
| 1452 var mock = new HttpServerMock(); | 1452 var mock = new HttpServerMock(); |
| 1453 api.ProjectsResourceApi res = new api.CloudresourcemanagerApi(mock).projec
ts; | 1453 api.ProjectsResourceApi res = new api.CloudresourcemanagerApi(mock).projec
ts; |
| 1454 var arg_pageSize = 42; | |
| 1455 var arg_filter = "foo"; | 1454 var arg_filter = "foo"; |
| 1456 var arg_pageToken = "foo"; | 1455 var arg_pageToken = "foo"; |
| 1456 var arg_pageSize = 42; |
| 1457 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1457 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 1458 var path = (req.url).path; | 1458 var path = (req.url).path; |
| 1459 var pathOffset = 0; | 1459 var pathOffset = 0; |
| 1460 var index; | 1460 var index; |
| 1461 var subPart; | 1461 var subPart; |
| 1462 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1462 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1463 pathOffset += 1; | 1463 pathOffset += 1; |
| 1464 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("v1/projects")); | 1464 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("v1/projects")); |
| 1465 pathOffset += 11; | 1465 pathOffset += 11; |
| 1466 | 1466 |
| 1467 var query = (req.url).query; | 1467 var query = (req.url).query; |
| 1468 var queryOffset = 0; | 1468 var queryOffset = 0; |
| 1469 var queryMap = {}; | 1469 var queryMap = {}; |
| 1470 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 1470 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 1471 parseBool(n) { | 1471 parseBool(n) { |
| 1472 if (n == "true") return true; | 1472 if (n == "true") return true; |
| 1473 if (n == "false") return false; | 1473 if (n == "false") return false; |
| 1474 if (n == null) return null; | 1474 if (n == null) return null; |
| 1475 throw new core.ArgumentError("Invalid boolean: $n"); | 1475 throw new core.ArgumentError("Invalid boolean: $n"); |
| 1476 } | 1476 } |
| 1477 if (query.length > 0) { | 1477 if (query.length > 0) { |
| 1478 for (var part in query.split("&")) { | 1478 for (var part in query.split("&")) { |
| 1479 var keyvalue = part.split("="); | 1479 var keyvalue = part.split("="); |
| 1480 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1480 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 1481 } | 1481 } |
| 1482 } | 1482 } |
| 1483 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); | |
| 1484 unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); | 1483 unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); |
| 1485 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 1484 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
| 1485 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); |
| 1486 | 1486 |
| 1487 | 1487 |
| 1488 var h = { | 1488 var h = { |
| 1489 "content-type" : "application/json; charset=utf-8", | 1489 "content-type" : "application/json; charset=utf-8", |
| 1490 }; | 1490 }; |
| 1491 var resp = convert.JSON.encode(buildListProjectsResponse()); | 1491 var resp = convert.JSON.encode(buildListProjectsResponse()); |
| 1492 return new async.Future.value(stringResponse(200, h, resp)); | 1492 return new async.Future.value(stringResponse(200, h, resp)); |
| 1493 }), true); | 1493 }), true); |
| 1494 res.list(pageSize: arg_pageSize, filter: arg_filter, pageToken: arg_pageTo
ken).then(unittest.expectAsync(((api.ListProjectsResponse response) { | 1494 res.list(filter: arg_filter, pageToken: arg_pageToken, pageSize: arg_pageS
ize).then(unittest.expectAsync(((api.ListProjectsResponse response) { |
| 1495 checkListProjectsResponse(response); | 1495 checkListProjectsResponse(response); |
| 1496 }))); | 1496 }))); |
| 1497 }); | 1497 }); |
| 1498 | 1498 |
| 1499 unittest.test("method--setIamPolicy", () { | 1499 unittest.test("method--setIamPolicy", () { |
| 1500 | 1500 |
| 1501 var mock = new HttpServerMock(); | 1501 var mock = new HttpServerMock(); |
| 1502 api.ProjectsResourceApi res = new api.CloudresourcemanagerApi(mock).projec
ts; | 1502 api.ProjectsResourceApi res = new api.CloudresourcemanagerApi(mock).projec
ts; |
| 1503 var arg_request = buildSetIamPolicyRequest(); | 1503 var arg_request = buildSetIamPolicyRequest(); |
| 1504 var arg_resource = "foo"; | 1504 var arg_resource = "foo"; |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1710 res.update(arg_request, arg_projectId).then(unittest.expectAsync(((api.Pro
ject response) { | 1710 res.update(arg_request, arg_projectId).then(unittest.expectAsync(((api.Pro
ject response) { |
| 1711 checkProject(response); | 1711 checkProject(response); |
| 1712 }))); | 1712 }))); |
| 1713 }); | 1713 }); |
| 1714 | 1714 |
| 1715 }); | 1715 }); |
| 1716 | 1716 |
| 1717 | 1717 |
| 1718 } | 1718 } |
| 1719 | 1719 |
| OLD | NEW |