OLD | NEW |
1 library googleapis_beta.cloudresourcemanager.v1beta1.test; | 1 library googleapis_beta.cloudresourcemanager.v1beta1.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:test/test.dart' as unittest; | 10 import 'package:test/test.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 buildUnnamed3394() { | 73 buildUnnamed3426() { |
74 var o = new core.List<api.AuditLogConfig>(); | 74 var o = new core.List<api.AuditLogConfig>(); |
75 o.add(buildAuditLogConfig()); | 75 o.add(buildAuditLogConfig()); |
76 o.add(buildAuditLogConfig()); | 76 o.add(buildAuditLogConfig()); |
77 return o; | 77 return o; |
78 } | 78 } |
79 | 79 |
80 checkUnnamed3394(core.List<api.AuditLogConfig> o) { | 80 checkUnnamed3426(core.List<api.AuditLogConfig> o) { |
81 unittest.expect(o, unittest.hasLength(2)); | 81 unittest.expect(o, unittest.hasLength(2)); |
82 checkAuditLogConfig(o[0]); | 82 checkAuditLogConfig(o[0]); |
83 checkAuditLogConfig(o[1]); | 83 checkAuditLogConfig(o[1]); |
84 } | 84 } |
85 | 85 |
86 core.int buildCounterAuditConfig = 0; | 86 core.int buildCounterAuditConfig = 0; |
87 buildAuditConfig() { | 87 buildAuditConfig() { |
88 var o = new api.AuditConfig(); | 88 var o = new api.AuditConfig(); |
89 buildCounterAuditConfig++; | 89 buildCounterAuditConfig++; |
90 if (buildCounterAuditConfig < 3) { | 90 if (buildCounterAuditConfig < 3) { |
91 o.auditLogConfigs = buildUnnamed3394(); | 91 o.auditLogConfigs = buildUnnamed3426(); |
92 o.service = "foo"; | 92 o.service = "foo"; |
93 } | 93 } |
94 buildCounterAuditConfig--; | 94 buildCounterAuditConfig--; |
95 return o; | 95 return o; |
96 } | 96 } |
97 | 97 |
98 checkAuditConfig(api.AuditConfig o) { | 98 checkAuditConfig(api.AuditConfig o) { |
99 buildCounterAuditConfig++; | 99 buildCounterAuditConfig++; |
100 if (buildCounterAuditConfig < 3) { | 100 if (buildCounterAuditConfig < 3) { |
101 checkUnnamed3394(o.auditLogConfigs); | 101 checkUnnamed3426(o.auditLogConfigs); |
102 unittest.expect(o.service, unittest.equals('foo')); | 102 unittest.expect(o.service, unittest.equals('foo')); |
103 } | 103 } |
104 buildCounterAuditConfig--; | 104 buildCounterAuditConfig--; |
105 } | 105 } |
106 | 106 |
107 buildUnnamed3395() { | 107 buildUnnamed3427() { |
108 var o = new core.List<core.String>(); | 108 var o = new core.List<core.String>(); |
109 o.add("foo"); | 109 o.add("foo"); |
110 o.add("foo"); | 110 o.add("foo"); |
111 return o; | 111 return o; |
112 } | 112 } |
113 | 113 |
114 checkUnnamed3395(core.List<core.String> o) { | 114 checkUnnamed3427(core.List<core.String> o) { |
115 unittest.expect(o, unittest.hasLength(2)); | 115 unittest.expect(o, unittest.hasLength(2)); |
116 unittest.expect(o[0], unittest.equals('foo')); | 116 unittest.expect(o[0], unittest.equals('foo')); |
117 unittest.expect(o[1], unittest.equals('foo')); | 117 unittest.expect(o[1], unittest.equals('foo')); |
118 } | 118 } |
119 | 119 |
120 core.int buildCounterAuditLogConfig = 0; | 120 core.int buildCounterAuditLogConfig = 0; |
121 buildAuditLogConfig() { | 121 buildAuditLogConfig() { |
122 var o = new api.AuditLogConfig(); | 122 var o = new api.AuditLogConfig(); |
123 buildCounterAuditLogConfig++; | 123 buildCounterAuditLogConfig++; |
124 if (buildCounterAuditLogConfig < 3) { | 124 if (buildCounterAuditLogConfig < 3) { |
125 o.exemptedMembers = buildUnnamed3395(); | 125 o.exemptedMembers = buildUnnamed3427(); |
126 o.logType = "foo"; | 126 o.logType = "foo"; |
127 } | 127 } |
128 buildCounterAuditLogConfig--; | 128 buildCounterAuditLogConfig--; |
129 return o; | 129 return o; |
130 } | 130 } |
131 | 131 |
132 checkAuditLogConfig(api.AuditLogConfig o) { | 132 checkAuditLogConfig(api.AuditLogConfig o) { |
133 buildCounterAuditLogConfig++; | 133 buildCounterAuditLogConfig++; |
134 if (buildCounterAuditLogConfig < 3) { | 134 if (buildCounterAuditLogConfig < 3) { |
135 checkUnnamed3395(o.exemptedMembers); | 135 checkUnnamed3427(o.exemptedMembers); |
136 unittest.expect(o.logType, unittest.equals('foo')); | 136 unittest.expect(o.logType, unittest.equals('foo')); |
137 } | 137 } |
138 buildCounterAuditLogConfig--; | 138 buildCounterAuditLogConfig--; |
139 } | 139 } |
140 | 140 |
141 buildUnnamed3396() { | 141 buildUnnamed3428() { |
142 var o = new core.List<core.String>(); | 142 var o = new core.List<core.String>(); |
143 o.add("foo"); | 143 o.add("foo"); |
144 o.add("foo"); | 144 o.add("foo"); |
145 return o; | 145 return o; |
146 } | 146 } |
147 | 147 |
148 checkUnnamed3396(core.List<core.String> o) { | 148 checkUnnamed3428(core.List<core.String> o) { |
149 unittest.expect(o, unittest.hasLength(2)); | 149 unittest.expect(o, unittest.hasLength(2)); |
150 unittest.expect(o[0], unittest.equals('foo')); | 150 unittest.expect(o[0], unittest.equals('foo')); |
151 unittest.expect(o[1], unittest.equals('foo')); | 151 unittest.expect(o[1], unittest.equals('foo')); |
152 } | 152 } |
153 | 153 |
154 core.int buildCounterBinding = 0; | 154 core.int buildCounterBinding = 0; |
155 buildBinding() { | 155 buildBinding() { |
156 var o = new api.Binding(); | 156 var o = new api.Binding(); |
157 buildCounterBinding++; | 157 buildCounterBinding++; |
158 if (buildCounterBinding < 3) { | 158 if (buildCounterBinding < 3) { |
159 o.members = buildUnnamed3396(); | 159 o.members = buildUnnamed3428(); |
160 o.role = "foo"; | 160 o.role = "foo"; |
161 } | 161 } |
162 buildCounterBinding--; | 162 buildCounterBinding--; |
163 return o; | 163 return o; |
164 } | 164 } |
165 | 165 |
166 checkBinding(api.Binding o) { | 166 checkBinding(api.Binding o) { |
167 buildCounterBinding++; | 167 buildCounterBinding++; |
168 if (buildCounterBinding < 3) { | 168 if (buildCounterBinding < 3) { |
169 checkUnnamed3396(o.members); | 169 checkUnnamed3428(o.members); |
170 unittest.expect(o.role, unittest.equals('foo')); | 170 unittest.expect(o.role, unittest.equals('foo')); |
171 } | 171 } |
172 buildCounterBinding--; | 172 buildCounterBinding--; |
173 } | 173 } |
174 | 174 |
175 core.int buildCounterEmpty = 0; | 175 core.int buildCounterEmpty = 0; |
176 buildEmpty() { | 176 buildEmpty() { |
177 var o = new api.Empty(); | 177 var o = new api.Empty(); |
178 buildCounterEmpty++; | 178 buildCounterEmpty++; |
179 if (buildCounterEmpty < 3) { | 179 if (buildCounterEmpty < 3) { |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
243 return o; | 243 return o; |
244 } | 244 } |
245 | 245 |
246 checkGetAncestryRequest(api.GetAncestryRequest o) { | 246 checkGetAncestryRequest(api.GetAncestryRequest o) { |
247 buildCounterGetAncestryRequest++; | 247 buildCounterGetAncestryRequest++; |
248 if (buildCounterGetAncestryRequest < 3) { | 248 if (buildCounterGetAncestryRequest < 3) { |
249 } | 249 } |
250 buildCounterGetAncestryRequest--; | 250 buildCounterGetAncestryRequest--; |
251 } | 251 } |
252 | 252 |
253 buildUnnamed3397() { | 253 buildUnnamed3429() { |
254 var o = new core.List<api.Ancestor>(); | 254 var o = new core.List<api.Ancestor>(); |
255 o.add(buildAncestor()); | 255 o.add(buildAncestor()); |
256 o.add(buildAncestor()); | 256 o.add(buildAncestor()); |
257 return o; | 257 return o; |
258 } | 258 } |
259 | 259 |
260 checkUnnamed3397(core.List<api.Ancestor> o) { | 260 checkUnnamed3429(core.List<api.Ancestor> o) { |
261 unittest.expect(o, unittest.hasLength(2)); | 261 unittest.expect(o, unittest.hasLength(2)); |
262 checkAncestor(o[0]); | 262 checkAncestor(o[0]); |
263 checkAncestor(o[1]); | 263 checkAncestor(o[1]); |
264 } | 264 } |
265 | 265 |
266 core.int buildCounterGetAncestryResponse = 0; | 266 core.int buildCounterGetAncestryResponse = 0; |
267 buildGetAncestryResponse() { | 267 buildGetAncestryResponse() { |
268 var o = new api.GetAncestryResponse(); | 268 var o = new api.GetAncestryResponse(); |
269 buildCounterGetAncestryResponse++; | 269 buildCounterGetAncestryResponse++; |
270 if (buildCounterGetAncestryResponse < 3) { | 270 if (buildCounterGetAncestryResponse < 3) { |
271 o.ancestor = buildUnnamed3397(); | 271 o.ancestor = buildUnnamed3429(); |
272 } | 272 } |
273 buildCounterGetAncestryResponse--; | 273 buildCounterGetAncestryResponse--; |
274 return o; | 274 return o; |
275 } | 275 } |
276 | 276 |
277 checkGetAncestryResponse(api.GetAncestryResponse o) { | 277 checkGetAncestryResponse(api.GetAncestryResponse o) { |
278 buildCounterGetAncestryResponse++; | 278 buildCounterGetAncestryResponse++; |
279 if (buildCounterGetAncestryResponse < 3) { | 279 if (buildCounterGetAncestryResponse < 3) { |
280 checkUnnamed3397(o.ancestor); | 280 checkUnnamed3429(o.ancestor); |
281 } | 281 } |
282 buildCounterGetAncestryResponse--; | 282 buildCounterGetAncestryResponse--; |
283 } | 283 } |
284 | 284 |
285 core.int buildCounterGetIamPolicyRequest = 0; | 285 core.int buildCounterGetIamPolicyRequest = 0; |
286 buildGetIamPolicyRequest() { | 286 buildGetIamPolicyRequest() { |
287 var o = new api.GetIamPolicyRequest(); | 287 var o = new api.GetIamPolicyRequest(); |
288 buildCounterGetIamPolicyRequest++; | 288 buildCounterGetIamPolicyRequest++; |
289 if (buildCounterGetIamPolicyRequest < 3) { | 289 if (buildCounterGetIamPolicyRequest < 3) { |
290 } | 290 } |
291 buildCounterGetIamPolicyRequest--; | 291 buildCounterGetIamPolicyRequest--; |
292 return o; | 292 return o; |
293 } | 293 } |
294 | 294 |
295 checkGetIamPolicyRequest(api.GetIamPolicyRequest o) { | 295 checkGetIamPolicyRequest(api.GetIamPolicyRequest o) { |
296 buildCounterGetIamPolicyRequest++; | 296 buildCounterGetIamPolicyRequest++; |
297 if (buildCounterGetIamPolicyRequest < 3) { | 297 if (buildCounterGetIamPolicyRequest < 3) { |
298 } | 298 } |
299 buildCounterGetIamPolicyRequest--; | 299 buildCounterGetIamPolicyRequest--; |
300 } | 300 } |
301 | 301 |
302 buildUnnamed3398() { | 302 buildUnnamed3430() { |
303 var o = new core.List<api.Organization>(); | 303 var o = new core.List<api.Organization>(); |
304 o.add(buildOrganization()); | 304 o.add(buildOrganization()); |
305 o.add(buildOrganization()); | 305 o.add(buildOrganization()); |
306 return o; | 306 return o; |
307 } | 307 } |
308 | 308 |
309 checkUnnamed3398(core.List<api.Organization> o) { | 309 checkUnnamed3430(core.List<api.Organization> o) { |
310 unittest.expect(o, unittest.hasLength(2)); | 310 unittest.expect(o, unittest.hasLength(2)); |
311 checkOrganization(o[0]); | 311 checkOrganization(o[0]); |
312 checkOrganization(o[1]); | 312 checkOrganization(o[1]); |
313 } | 313 } |
314 | 314 |
315 core.int buildCounterListOrganizationsResponse = 0; | 315 core.int buildCounterListOrganizationsResponse = 0; |
316 buildListOrganizationsResponse() { | 316 buildListOrganizationsResponse() { |
317 var o = new api.ListOrganizationsResponse(); | 317 var o = new api.ListOrganizationsResponse(); |
318 buildCounterListOrganizationsResponse++; | 318 buildCounterListOrganizationsResponse++; |
319 if (buildCounterListOrganizationsResponse < 3) { | 319 if (buildCounterListOrganizationsResponse < 3) { |
320 o.nextPageToken = "foo"; | 320 o.nextPageToken = "foo"; |
321 o.organizations = buildUnnamed3398(); | 321 o.organizations = buildUnnamed3430(); |
322 } | 322 } |
323 buildCounterListOrganizationsResponse--; | 323 buildCounterListOrganizationsResponse--; |
324 return o; | 324 return o; |
325 } | 325 } |
326 | 326 |
327 checkListOrganizationsResponse(api.ListOrganizationsResponse o) { | 327 checkListOrganizationsResponse(api.ListOrganizationsResponse o) { |
328 buildCounterListOrganizationsResponse++; | 328 buildCounterListOrganizationsResponse++; |
329 if (buildCounterListOrganizationsResponse < 3) { | 329 if (buildCounterListOrganizationsResponse < 3) { |
330 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 330 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
331 checkUnnamed3398(o.organizations); | 331 checkUnnamed3430(o.organizations); |
332 } | 332 } |
333 buildCounterListOrganizationsResponse--; | 333 buildCounterListOrganizationsResponse--; |
334 } | 334 } |
335 | 335 |
336 buildUnnamed3399() { | 336 buildUnnamed3431() { |
337 var o = new core.List<api.Project>(); | 337 var o = new core.List<api.Project>(); |
338 o.add(buildProject()); | 338 o.add(buildProject()); |
339 o.add(buildProject()); | 339 o.add(buildProject()); |
340 return o; | 340 return o; |
341 } | 341 } |
342 | 342 |
343 checkUnnamed3399(core.List<api.Project> o) { | 343 checkUnnamed3431(core.List<api.Project> o) { |
344 unittest.expect(o, unittest.hasLength(2)); | 344 unittest.expect(o, unittest.hasLength(2)); |
345 checkProject(o[0]); | 345 checkProject(o[0]); |
346 checkProject(o[1]); | 346 checkProject(o[1]); |
347 } | 347 } |
348 | 348 |
349 core.int buildCounterListProjectsResponse = 0; | 349 core.int buildCounterListProjectsResponse = 0; |
350 buildListProjectsResponse() { | 350 buildListProjectsResponse() { |
351 var o = new api.ListProjectsResponse(); | 351 var o = new api.ListProjectsResponse(); |
352 buildCounterListProjectsResponse++; | 352 buildCounterListProjectsResponse++; |
353 if (buildCounterListProjectsResponse < 3) { | 353 if (buildCounterListProjectsResponse < 3) { |
354 o.nextPageToken = "foo"; | 354 o.nextPageToken = "foo"; |
355 o.projects = buildUnnamed3399(); | 355 o.projects = buildUnnamed3431(); |
356 } | 356 } |
357 buildCounterListProjectsResponse--; | 357 buildCounterListProjectsResponse--; |
358 return o; | 358 return o; |
359 } | 359 } |
360 | 360 |
361 checkListProjectsResponse(api.ListProjectsResponse o) { | 361 checkListProjectsResponse(api.ListProjectsResponse o) { |
362 buildCounterListProjectsResponse++; | 362 buildCounterListProjectsResponse++; |
363 if (buildCounterListProjectsResponse < 3) { | 363 if (buildCounterListProjectsResponse < 3) { |
364 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 364 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
365 checkUnnamed3399(o.projects); | 365 checkUnnamed3431(o.projects); |
366 } | 366 } |
367 buildCounterListProjectsResponse--; | 367 buildCounterListProjectsResponse--; |
368 } | 368 } |
369 | 369 |
370 core.int buildCounterOrganization = 0; | 370 core.int buildCounterOrganization = 0; |
371 buildOrganization() { | 371 buildOrganization() { |
372 var o = new api.Organization(); | 372 var o = new api.Organization(); |
373 buildCounterOrganization++; | 373 buildCounterOrganization++; |
374 if (buildCounterOrganization < 3) { | 374 if (buildCounterOrganization < 3) { |
375 o.creationTime = "foo"; | 375 o.creationTime = "foo"; |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
408 } | 408 } |
409 | 409 |
410 checkOrganizationOwner(api.OrganizationOwner o) { | 410 checkOrganizationOwner(api.OrganizationOwner o) { |
411 buildCounterOrganizationOwner++; | 411 buildCounterOrganizationOwner++; |
412 if (buildCounterOrganizationOwner < 3) { | 412 if (buildCounterOrganizationOwner < 3) { |
413 unittest.expect(o.directoryCustomerId, unittest.equals('foo')); | 413 unittest.expect(o.directoryCustomerId, unittest.equals('foo')); |
414 } | 414 } |
415 buildCounterOrganizationOwner--; | 415 buildCounterOrganizationOwner--; |
416 } | 416 } |
417 | 417 |
418 buildUnnamed3400() { | 418 buildUnnamed3432() { |
419 var o = new core.List<api.AuditConfig>(); | 419 var o = new core.List<api.AuditConfig>(); |
420 o.add(buildAuditConfig()); | 420 o.add(buildAuditConfig()); |
421 o.add(buildAuditConfig()); | 421 o.add(buildAuditConfig()); |
422 return o; | 422 return o; |
423 } | 423 } |
424 | 424 |
425 checkUnnamed3400(core.List<api.AuditConfig> o) { | 425 checkUnnamed3432(core.List<api.AuditConfig> o) { |
426 unittest.expect(o, unittest.hasLength(2)); | 426 unittest.expect(o, unittest.hasLength(2)); |
427 checkAuditConfig(o[0]); | 427 checkAuditConfig(o[0]); |
428 checkAuditConfig(o[1]); | 428 checkAuditConfig(o[1]); |
429 } | 429 } |
430 | 430 |
431 buildUnnamed3401() { | 431 buildUnnamed3433() { |
432 var o = new core.List<api.Binding>(); | 432 var o = new core.List<api.Binding>(); |
433 o.add(buildBinding()); | 433 o.add(buildBinding()); |
434 o.add(buildBinding()); | 434 o.add(buildBinding()); |
435 return o; | 435 return o; |
436 } | 436 } |
437 | 437 |
438 checkUnnamed3401(core.List<api.Binding> o) { | 438 checkUnnamed3433(core.List<api.Binding> o) { |
439 unittest.expect(o, unittest.hasLength(2)); | 439 unittest.expect(o, unittest.hasLength(2)); |
440 checkBinding(o[0]); | 440 checkBinding(o[0]); |
441 checkBinding(o[1]); | 441 checkBinding(o[1]); |
442 } | 442 } |
443 | 443 |
444 core.int buildCounterPolicy = 0; | 444 core.int buildCounterPolicy = 0; |
445 buildPolicy() { | 445 buildPolicy() { |
446 var o = new api.Policy(); | 446 var o = new api.Policy(); |
447 buildCounterPolicy++; | 447 buildCounterPolicy++; |
448 if (buildCounterPolicy < 3) { | 448 if (buildCounterPolicy < 3) { |
449 o.auditConfigs = buildUnnamed3400(); | 449 o.auditConfigs = buildUnnamed3432(); |
450 o.bindings = buildUnnamed3401(); | 450 o.bindings = buildUnnamed3433(); |
451 o.etag = "foo"; | 451 o.etag = "foo"; |
452 o.version = 42; | 452 o.version = 42; |
453 } | 453 } |
454 buildCounterPolicy--; | 454 buildCounterPolicy--; |
455 return o; | 455 return o; |
456 } | 456 } |
457 | 457 |
458 checkPolicy(api.Policy o) { | 458 checkPolicy(api.Policy o) { |
459 buildCounterPolicy++; | 459 buildCounterPolicy++; |
460 if (buildCounterPolicy < 3) { | 460 if (buildCounterPolicy < 3) { |
461 checkUnnamed3400(o.auditConfigs); | 461 checkUnnamed3432(o.auditConfigs); |
462 checkUnnamed3401(o.bindings); | 462 checkUnnamed3433(o.bindings); |
463 unittest.expect(o.etag, unittest.equals('foo')); | 463 unittest.expect(o.etag, unittest.equals('foo')); |
464 unittest.expect(o.version, unittest.equals(42)); | 464 unittest.expect(o.version, unittest.equals(42)); |
465 } | 465 } |
466 buildCounterPolicy--; | 466 buildCounterPolicy--; |
467 } | 467 } |
468 | 468 |
469 buildUnnamed3402() { | 469 buildUnnamed3434() { |
470 var o = new core.Map<core.String, core.String>(); | 470 var o = new core.Map<core.String, core.String>(); |
471 o["x"] = "foo"; | 471 o["x"] = "foo"; |
472 o["y"] = "foo"; | 472 o["y"] = "foo"; |
473 return o; | 473 return o; |
474 } | 474 } |
475 | 475 |
476 checkUnnamed3402(core.Map<core.String, core.String> o) { | 476 checkUnnamed3434(core.Map<core.String, core.String> o) { |
477 unittest.expect(o, unittest.hasLength(2)); | 477 unittest.expect(o, unittest.hasLength(2)); |
478 unittest.expect(o["x"], unittest.equals('foo')); | 478 unittest.expect(o["x"], unittest.equals('foo')); |
479 unittest.expect(o["y"], unittest.equals('foo')); | 479 unittest.expect(o["y"], unittest.equals('foo')); |
480 } | 480 } |
481 | 481 |
482 core.int buildCounterProject = 0; | 482 core.int buildCounterProject = 0; |
483 buildProject() { | 483 buildProject() { |
484 var o = new api.Project(); | 484 var o = new api.Project(); |
485 buildCounterProject++; | 485 buildCounterProject++; |
486 if (buildCounterProject < 3) { | 486 if (buildCounterProject < 3) { |
487 o.createTime = "foo"; | 487 o.createTime = "foo"; |
488 o.labels = buildUnnamed3402(); | 488 o.labels = buildUnnamed3434(); |
489 o.lifecycleState = "foo"; | 489 o.lifecycleState = "foo"; |
490 o.name = "foo"; | 490 o.name = "foo"; |
491 o.parent = buildResourceId(); | 491 o.parent = buildResourceId(); |
492 o.projectId = "foo"; | 492 o.projectId = "foo"; |
493 o.projectNumber = "foo"; | 493 o.projectNumber = "foo"; |
494 } | 494 } |
495 buildCounterProject--; | 495 buildCounterProject--; |
496 return o; | 496 return o; |
497 } | 497 } |
498 | 498 |
499 checkProject(api.Project o) { | 499 checkProject(api.Project o) { |
500 buildCounterProject++; | 500 buildCounterProject++; |
501 if (buildCounterProject < 3) { | 501 if (buildCounterProject < 3) { |
502 unittest.expect(o.createTime, unittest.equals('foo')); | 502 unittest.expect(o.createTime, unittest.equals('foo')); |
503 checkUnnamed3402(o.labels); | 503 checkUnnamed3434(o.labels); |
504 unittest.expect(o.lifecycleState, unittest.equals('foo')); | 504 unittest.expect(o.lifecycleState, unittest.equals('foo')); |
505 unittest.expect(o.name, unittest.equals('foo')); | 505 unittest.expect(o.name, unittest.equals('foo')); |
506 checkResourceId(o.parent); | 506 checkResourceId(o.parent); |
507 unittest.expect(o.projectId, unittest.equals('foo')); | 507 unittest.expect(o.projectId, unittest.equals('foo')); |
508 unittest.expect(o.projectNumber, unittest.equals('foo')); | 508 unittest.expect(o.projectNumber, unittest.equals('foo')); |
509 } | 509 } |
510 buildCounterProject--; | 510 buildCounterProject--; |
511 } | 511 } |
512 | 512 |
513 core.int buildCounterProjectCreationStatus = 0; | 513 core.int buildCounterProjectCreationStatus = 0; |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
568 | 568 |
569 checkSetIamPolicyRequest(api.SetIamPolicyRequest o) { | 569 checkSetIamPolicyRequest(api.SetIamPolicyRequest o) { |
570 buildCounterSetIamPolicyRequest++; | 570 buildCounterSetIamPolicyRequest++; |
571 if (buildCounterSetIamPolicyRequest < 3) { | 571 if (buildCounterSetIamPolicyRequest < 3) { |
572 checkPolicy(o.policy); | 572 checkPolicy(o.policy); |
573 unittest.expect(o.updateMask, unittest.equals('foo')); | 573 unittest.expect(o.updateMask, unittest.equals('foo')); |
574 } | 574 } |
575 buildCounterSetIamPolicyRequest--; | 575 buildCounterSetIamPolicyRequest--; |
576 } | 576 } |
577 | 577 |
578 buildUnnamed3403() { | 578 buildUnnamed3435() { |
579 var o = new core.List<core.String>(); | 579 var o = new core.List<core.String>(); |
580 o.add("foo"); | 580 o.add("foo"); |
581 o.add("foo"); | 581 o.add("foo"); |
582 return o; | 582 return o; |
583 } | 583 } |
584 | 584 |
585 checkUnnamed3403(core.List<core.String> o) { | 585 checkUnnamed3435(core.List<core.String> o) { |
586 unittest.expect(o, unittest.hasLength(2)); | 586 unittest.expect(o, unittest.hasLength(2)); |
587 unittest.expect(o[0], unittest.equals('foo')); | 587 unittest.expect(o[0], unittest.equals('foo')); |
588 unittest.expect(o[1], unittest.equals('foo')); | 588 unittest.expect(o[1], unittest.equals('foo')); |
589 } | 589 } |
590 | 590 |
591 core.int buildCounterTestIamPermissionsRequest = 0; | 591 core.int buildCounterTestIamPermissionsRequest = 0; |
592 buildTestIamPermissionsRequest() { | 592 buildTestIamPermissionsRequest() { |
593 var o = new api.TestIamPermissionsRequest(); | 593 var o = new api.TestIamPermissionsRequest(); |
594 buildCounterTestIamPermissionsRequest++; | 594 buildCounterTestIamPermissionsRequest++; |
595 if (buildCounterTestIamPermissionsRequest < 3) { | 595 if (buildCounterTestIamPermissionsRequest < 3) { |
596 o.permissions = buildUnnamed3403(); | 596 o.permissions = buildUnnamed3435(); |
597 } | 597 } |
598 buildCounterTestIamPermissionsRequest--; | 598 buildCounterTestIamPermissionsRequest--; |
599 return o; | 599 return o; |
600 } | 600 } |
601 | 601 |
602 checkTestIamPermissionsRequest(api.TestIamPermissionsRequest o) { | 602 checkTestIamPermissionsRequest(api.TestIamPermissionsRequest o) { |
603 buildCounterTestIamPermissionsRequest++; | 603 buildCounterTestIamPermissionsRequest++; |
604 if (buildCounterTestIamPermissionsRequest < 3) { | 604 if (buildCounterTestIamPermissionsRequest < 3) { |
605 checkUnnamed3403(o.permissions); | 605 checkUnnamed3435(o.permissions); |
606 } | 606 } |
607 buildCounterTestIamPermissionsRequest--; | 607 buildCounterTestIamPermissionsRequest--; |
608 } | 608 } |
609 | 609 |
610 buildUnnamed3404() { | 610 buildUnnamed3436() { |
611 var o = new core.List<core.String>(); | 611 var o = new core.List<core.String>(); |
612 o.add("foo"); | 612 o.add("foo"); |
613 o.add("foo"); | 613 o.add("foo"); |
614 return o; | 614 return o; |
615 } | 615 } |
616 | 616 |
617 checkUnnamed3404(core.List<core.String> o) { | 617 checkUnnamed3436(core.List<core.String> o) { |
618 unittest.expect(o, unittest.hasLength(2)); | 618 unittest.expect(o, unittest.hasLength(2)); |
619 unittest.expect(o[0], unittest.equals('foo')); | 619 unittest.expect(o[0], unittest.equals('foo')); |
620 unittest.expect(o[1], unittest.equals('foo')); | 620 unittest.expect(o[1], unittest.equals('foo')); |
621 } | 621 } |
622 | 622 |
623 core.int buildCounterTestIamPermissionsResponse = 0; | 623 core.int buildCounterTestIamPermissionsResponse = 0; |
624 buildTestIamPermissionsResponse() { | 624 buildTestIamPermissionsResponse() { |
625 var o = new api.TestIamPermissionsResponse(); | 625 var o = new api.TestIamPermissionsResponse(); |
626 buildCounterTestIamPermissionsResponse++; | 626 buildCounterTestIamPermissionsResponse++; |
627 if (buildCounterTestIamPermissionsResponse < 3) { | 627 if (buildCounterTestIamPermissionsResponse < 3) { |
628 o.permissions = buildUnnamed3404(); | 628 o.permissions = buildUnnamed3436(); |
629 } | 629 } |
630 buildCounterTestIamPermissionsResponse--; | 630 buildCounterTestIamPermissionsResponse--; |
631 return o; | 631 return o; |
632 } | 632 } |
633 | 633 |
634 checkTestIamPermissionsResponse(api.TestIamPermissionsResponse o) { | 634 checkTestIamPermissionsResponse(api.TestIamPermissionsResponse o) { |
635 buildCounterTestIamPermissionsResponse++; | 635 buildCounterTestIamPermissionsResponse++; |
636 if (buildCounterTestIamPermissionsResponse < 3) { | 636 if (buildCounterTestIamPermissionsResponse < 3) { |
637 checkUnnamed3404(o.permissions); | 637 checkUnnamed3436(o.permissions); |
638 } | 638 } |
639 buildCounterTestIamPermissionsResponse--; | 639 buildCounterTestIamPermissionsResponse--; |
640 } | 640 } |
641 | 641 |
642 core.int buildCounterUndeleteProjectRequest = 0; | 642 core.int buildCounterUndeleteProjectRequest = 0; |
643 buildUndeleteProjectRequest() { | 643 buildUndeleteProjectRequest() { |
644 var o = new api.UndeleteProjectRequest(); | 644 var o = new api.UndeleteProjectRequest(); |
645 buildCounterUndeleteProjectRequest++; | 645 buildCounterUndeleteProjectRequest++; |
646 if (buildCounterUndeleteProjectRequest < 3) { | 646 if (buildCounterUndeleteProjectRequest < 3) { |
647 } | 647 } |
(...skipping 755 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1403 }), true); | 1403 }), true); |
1404 res.getIamPolicy(arg_request, arg_resource).then(unittest.expectAsync1(((a
pi.Policy response) { | 1404 res.getIamPolicy(arg_request, arg_resource).then(unittest.expectAsync1(((a
pi.Policy response) { |
1405 checkPolicy(response); | 1405 checkPolicy(response); |
1406 }))); | 1406 }))); |
1407 }); | 1407 }); |
1408 | 1408 |
1409 unittest.test("method--list", () { | 1409 unittest.test("method--list", () { |
1410 | 1410 |
1411 var mock = new HttpServerMock(); | 1411 var mock = new HttpServerMock(); |
1412 api.ProjectsResourceApi res = new api.CloudresourcemanagerApi(mock).projec
ts; | 1412 api.ProjectsResourceApi res = new api.CloudresourcemanagerApi(mock).projec
ts; |
1413 var arg_filter = "foo"; | |
1414 var arg_pageToken = "foo"; | 1413 var arg_pageToken = "foo"; |
1415 var arg_pageSize = 42; | 1414 var arg_pageSize = 42; |
| 1415 var arg_filter = "foo"; |
1416 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 1416 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
1417 var path = (req.url).path; | 1417 var path = (req.url).path; |
1418 var pathOffset = 0; | 1418 var pathOffset = 0; |
1419 var index; | 1419 var index; |
1420 var subPart; | 1420 var subPart; |
1421 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1421 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
1422 pathOffset += 1; | 1422 pathOffset += 1; |
1423 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq
uals("v1beta1/projects")); | 1423 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq
uals("v1beta1/projects")); |
1424 pathOffset += 16; | 1424 pathOffset += 16; |
1425 | 1425 |
1426 var query = (req.url).query; | 1426 var query = (req.url).query; |
1427 var queryOffset = 0; | 1427 var queryOffset = 0; |
1428 var queryMap = {}; | 1428 var queryMap = {}; |
1429 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 1429 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
1430 parseBool(n) { | 1430 parseBool(n) { |
1431 if (n == "true") return true; | 1431 if (n == "true") return true; |
1432 if (n == "false") return false; | 1432 if (n == "false") return false; |
1433 if (n == null) return null; | 1433 if (n == null) return null; |
1434 throw new core.ArgumentError("Invalid boolean: $n"); | 1434 throw new core.ArgumentError("Invalid boolean: $n"); |
1435 } | 1435 } |
1436 if (query.length > 0) { | 1436 if (query.length > 0) { |
1437 for (var part in query.split("&")) { | 1437 for (var part in query.split("&")) { |
1438 var keyvalue = part.split("="); | 1438 var keyvalue = part.split("="); |
1439 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1439 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
1440 } | 1440 } |
1441 } | 1441 } |
1442 unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); | |
1443 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 1442 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
1444 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); | 1443 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); |
| 1444 unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); |
1445 | 1445 |
1446 | 1446 |
1447 var h = { | 1447 var h = { |
1448 "content-type" : "application/json; charset=utf-8", | 1448 "content-type" : "application/json; charset=utf-8", |
1449 }; | 1449 }; |
1450 var resp = convert.JSON.encode(buildListProjectsResponse()); | 1450 var resp = convert.JSON.encode(buildListProjectsResponse()); |
1451 return new async.Future.value(stringResponse(200, h, resp)); | 1451 return new async.Future.value(stringResponse(200, h, resp)); |
1452 }), true); | 1452 }), true); |
1453 res.list(filter: arg_filter, pageToken: arg_pageToken, pageSize: arg_pageS
ize).then(unittest.expectAsync1(((api.ListProjectsResponse response) { | 1453 res.list(pageToken: arg_pageToken, pageSize: arg_pageSize, filter: arg_fil
ter).then(unittest.expectAsync1(((api.ListProjectsResponse response) { |
1454 checkListProjectsResponse(response); | 1454 checkListProjectsResponse(response); |
1455 }))); | 1455 }))); |
1456 }); | 1456 }); |
1457 | 1457 |
1458 unittest.test("method--setIamPolicy", () { | 1458 unittest.test("method--setIamPolicy", () { |
1459 | 1459 |
1460 var mock = new HttpServerMock(); | 1460 var mock = new HttpServerMock(); |
1461 api.ProjectsResourceApi res = new api.CloudresourcemanagerApi(mock).projec
ts; | 1461 api.ProjectsResourceApi res = new api.CloudresourcemanagerApi(mock).projec
ts; |
1462 var arg_request = buildSetIamPolicyRequest(); | 1462 var arg_request = buildSetIamPolicyRequest(); |
1463 var arg_resource = "foo"; | 1463 var arg_resource = "foo"; |
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1669 res.update(arg_request, arg_projectId).then(unittest.expectAsync1(((api.Pr
oject response) { | 1669 res.update(arg_request, arg_projectId).then(unittest.expectAsync1(((api.Pr
oject response) { |
1670 checkProject(response); | 1670 checkProject(response); |
1671 }))); | 1671 }))); |
1672 }); | 1672 }); |
1673 | 1673 |
1674 }); | 1674 }); |
1675 | 1675 |
1676 | 1676 |
1677 } | 1677 } |
1678 | 1678 |
OLD | NEW |