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 buildUnnamed1555() { | 73 buildUnnamed1616() { |
| 74 var o = new core.List<api.AuditLogConfig>(); |
| 75 o.add(buildAuditLogConfig()); |
| 76 o.add(buildAuditLogConfig()); |
| 77 return o; |
| 78 } |
| 79 |
| 80 checkUnnamed1616(core.List<api.AuditLogConfig> o) { |
| 81 unittest.expect(o, unittest.hasLength(2)); |
| 82 checkAuditLogConfig(o[0]); |
| 83 checkAuditLogConfig(o[1]); |
| 84 } |
| 85 |
| 86 core.int buildCounterAuditConfig = 0; |
| 87 buildAuditConfig() { |
| 88 var o = new api.AuditConfig(); |
| 89 buildCounterAuditConfig++; |
| 90 if (buildCounterAuditConfig < 3) { |
| 91 o.auditLogConfigs = buildUnnamed1616(); |
| 92 o.service = "foo"; |
| 93 } |
| 94 buildCounterAuditConfig--; |
| 95 return o; |
| 96 } |
| 97 |
| 98 checkAuditConfig(api.AuditConfig o) { |
| 99 buildCounterAuditConfig++; |
| 100 if (buildCounterAuditConfig < 3) { |
| 101 checkUnnamed1616(o.auditLogConfigs); |
| 102 unittest.expect(o.service, unittest.equals('foo')); |
| 103 } |
| 104 buildCounterAuditConfig--; |
| 105 } |
| 106 |
| 107 buildUnnamed1617() { |
74 var o = new core.List<core.String>(); | 108 var o = new core.List<core.String>(); |
75 o.add("foo"); | 109 o.add("foo"); |
76 o.add("foo"); | 110 o.add("foo"); |
77 return o; | 111 return o; |
78 } | 112 } |
79 | 113 |
80 checkUnnamed1555(core.List<core.String> o) { | 114 checkUnnamed1617(core.List<core.String> o) { |
81 unittest.expect(o, unittest.hasLength(2)); | 115 unittest.expect(o, unittest.hasLength(2)); |
82 unittest.expect(o[0], unittest.equals('foo')); | 116 unittest.expect(o[0], unittest.equals('foo')); |
83 unittest.expect(o[1], unittest.equals('foo')); | 117 unittest.expect(o[1], unittest.equals('foo')); |
| 118 } |
| 119 |
| 120 core.int buildCounterAuditLogConfig = 0; |
| 121 buildAuditLogConfig() { |
| 122 var o = new api.AuditLogConfig(); |
| 123 buildCounterAuditLogConfig++; |
| 124 if (buildCounterAuditLogConfig < 3) { |
| 125 o.exemptedMembers = buildUnnamed1617(); |
| 126 o.logType = "foo"; |
| 127 } |
| 128 buildCounterAuditLogConfig--; |
| 129 return o; |
| 130 } |
| 131 |
| 132 checkAuditLogConfig(api.AuditLogConfig o) { |
| 133 buildCounterAuditLogConfig++; |
| 134 if (buildCounterAuditLogConfig < 3) { |
| 135 checkUnnamed1617(o.exemptedMembers); |
| 136 unittest.expect(o.logType, unittest.equals('foo')); |
| 137 } |
| 138 buildCounterAuditLogConfig--; |
| 139 } |
| 140 |
| 141 buildUnnamed1618() { |
| 142 var o = new core.List<core.String>(); |
| 143 o.add("foo"); |
| 144 o.add("foo"); |
| 145 return o; |
| 146 } |
| 147 |
| 148 checkUnnamed1618(core.List<core.String> o) { |
| 149 unittest.expect(o, unittest.hasLength(2)); |
| 150 unittest.expect(o[0], unittest.equals('foo')); |
| 151 unittest.expect(o[1], unittest.equals('foo')); |
84 } | 152 } |
85 | 153 |
86 core.int buildCounterBinding = 0; | 154 core.int buildCounterBinding = 0; |
87 buildBinding() { | 155 buildBinding() { |
88 var o = new api.Binding(); | 156 var o = new api.Binding(); |
89 buildCounterBinding++; | 157 buildCounterBinding++; |
90 if (buildCounterBinding < 3) { | 158 if (buildCounterBinding < 3) { |
91 o.members = buildUnnamed1555(); | 159 o.members = buildUnnamed1618(); |
92 o.role = "foo"; | 160 o.role = "foo"; |
93 } | 161 } |
94 buildCounterBinding--; | 162 buildCounterBinding--; |
95 return o; | 163 return o; |
96 } | 164 } |
97 | 165 |
98 checkBinding(api.Binding o) { | 166 checkBinding(api.Binding o) { |
99 buildCounterBinding++; | 167 buildCounterBinding++; |
100 if (buildCounterBinding < 3) { | 168 if (buildCounterBinding < 3) { |
101 checkUnnamed1555(o.members); | 169 checkUnnamed1618(o.members); |
102 unittest.expect(o.role, unittest.equals('foo')); | 170 unittest.expect(o.role, unittest.equals('foo')); |
103 } | 171 } |
104 buildCounterBinding--; | 172 buildCounterBinding--; |
105 } | 173 } |
106 | 174 |
| 175 core.int buildCounterBooleanConstraint = 0; |
| 176 buildBooleanConstraint() { |
| 177 var o = new api.BooleanConstraint(); |
| 178 buildCounterBooleanConstraint++; |
| 179 if (buildCounterBooleanConstraint < 3) { |
| 180 } |
| 181 buildCounterBooleanConstraint--; |
| 182 return o; |
| 183 } |
| 184 |
| 185 checkBooleanConstraint(api.BooleanConstraint o) { |
| 186 buildCounterBooleanConstraint++; |
| 187 if (buildCounterBooleanConstraint < 3) { |
| 188 } |
| 189 buildCounterBooleanConstraint--; |
| 190 } |
| 191 |
| 192 core.int buildCounterBooleanPolicy = 0; |
| 193 buildBooleanPolicy() { |
| 194 var o = new api.BooleanPolicy(); |
| 195 buildCounterBooleanPolicy++; |
| 196 if (buildCounterBooleanPolicy < 3) { |
| 197 o.enforced = true; |
| 198 } |
| 199 buildCounterBooleanPolicy--; |
| 200 return o; |
| 201 } |
| 202 |
| 203 checkBooleanPolicy(api.BooleanPolicy o) { |
| 204 buildCounterBooleanPolicy++; |
| 205 if (buildCounterBooleanPolicy < 3) { |
| 206 unittest.expect(o.enforced, unittest.isTrue); |
| 207 } |
| 208 buildCounterBooleanPolicy--; |
| 209 } |
| 210 |
| 211 core.int buildCounterClearOrgPolicyRequest = 0; |
| 212 buildClearOrgPolicyRequest() { |
| 213 var o = new api.ClearOrgPolicyRequest(); |
| 214 buildCounterClearOrgPolicyRequest++; |
| 215 if (buildCounterClearOrgPolicyRequest < 3) { |
| 216 o.constraint = "foo"; |
| 217 o.etag = "foo"; |
| 218 } |
| 219 buildCounterClearOrgPolicyRequest--; |
| 220 return o; |
| 221 } |
| 222 |
| 223 checkClearOrgPolicyRequest(api.ClearOrgPolicyRequest o) { |
| 224 buildCounterClearOrgPolicyRequest++; |
| 225 if (buildCounterClearOrgPolicyRequest < 3) { |
| 226 unittest.expect(o.constraint, unittest.equals('foo')); |
| 227 unittest.expect(o.etag, unittest.equals('foo')); |
| 228 } |
| 229 buildCounterClearOrgPolicyRequest--; |
| 230 } |
| 231 |
| 232 core.int buildCounterConstraint = 0; |
| 233 buildConstraint() { |
| 234 var o = new api.Constraint(); |
| 235 buildCounterConstraint++; |
| 236 if (buildCounterConstraint < 3) { |
| 237 o.booleanConstraint = buildBooleanConstraint(); |
| 238 o.constraintDefault = "foo"; |
| 239 o.description = "foo"; |
| 240 o.displayName = "foo"; |
| 241 o.listConstraint = buildListConstraint(); |
| 242 o.name = "foo"; |
| 243 o.version = 42; |
| 244 } |
| 245 buildCounterConstraint--; |
| 246 return o; |
| 247 } |
| 248 |
| 249 checkConstraint(api.Constraint o) { |
| 250 buildCounterConstraint++; |
| 251 if (buildCounterConstraint < 3) { |
| 252 checkBooleanConstraint(o.booleanConstraint); |
| 253 unittest.expect(o.constraintDefault, unittest.equals('foo')); |
| 254 unittest.expect(o.description, unittest.equals('foo')); |
| 255 unittest.expect(o.displayName, unittest.equals('foo')); |
| 256 checkListConstraint(o.listConstraint); |
| 257 unittest.expect(o.name, unittest.equals('foo')); |
| 258 unittest.expect(o.version, unittest.equals(42)); |
| 259 } |
| 260 buildCounterConstraint--; |
| 261 } |
| 262 |
107 core.int buildCounterEmpty = 0; | 263 core.int buildCounterEmpty = 0; |
108 buildEmpty() { | 264 buildEmpty() { |
109 var o = new api.Empty(); | 265 var o = new api.Empty(); |
110 buildCounterEmpty++; | 266 buildCounterEmpty++; |
111 if (buildCounterEmpty < 3) { | 267 if (buildCounterEmpty < 3) { |
112 } | 268 } |
113 buildCounterEmpty--; | 269 buildCounterEmpty--; |
114 return o; | 270 return o; |
115 } | 271 } |
116 | 272 |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 return o; | 331 return o; |
176 } | 332 } |
177 | 333 |
178 checkGetAncestryRequest(api.GetAncestryRequest o) { | 334 checkGetAncestryRequest(api.GetAncestryRequest o) { |
179 buildCounterGetAncestryRequest++; | 335 buildCounterGetAncestryRequest++; |
180 if (buildCounterGetAncestryRequest < 3) { | 336 if (buildCounterGetAncestryRequest < 3) { |
181 } | 337 } |
182 buildCounterGetAncestryRequest--; | 338 buildCounterGetAncestryRequest--; |
183 } | 339 } |
184 | 340 |
185 buildUnnamed1556() { | 341 buildUnnamed1619() { |
186 var o = new core.List<api.Ancestor>(); | 342 var o = new core.List<api.Ancestor>(); |
187 o.add(buildAncestor()); | 343 o.add(buildAncestor()); |
188 o.add(buildAncestor()); | 344 o.add(buildAncestor()); |
189 return o; | 345 return o; |
190 } | 346 } |
191 | 347 |
192 checkUnnamed1556(core.List<api.Ancestor> o) { | 348 checkUnnamed1619(core.List<api.Ancestor> o) { |
193 unittest.expect(o, unittest.hasLength(2)); | 349 unittest.expect(o, unittest.hasLength(2)); |
194 checkAncestor(o[0]); | 350 checkAncestor(o[0]); |
195 checkAncestor(o[1]); | 351 checkAncestor(o[1]); |
196 } | 352 } |
197 | 353 |
198 core.int buildCounterGetAncestryResponse = 0; | 354 core.int buildCounterGetAncestryResponse = 0; |
199 buildGetAncestryResponse() { | 355 buildGetAncestryResponse() { |
200 var o = new api.GetAncestryResponse(); | 356 var o = new api.GetAncestryResponse(); |
201 buildCounterGetAncestryResponse++; | 357 buildCounterGetAncestryResponse++; |
202 if (buildCounterGetAncestryResponse < 3) { | 358 if (buildCounterGetAncestryResponse < 3) { |
203 o.ancestor = buildUnnamed1556(); | 359 o.ancestor = buildUnnamed1619(); |
204 } | 360 } |
205 buildCounterGetAncestryResponse--; | 361 buildCounterGetAncestryResponse--; |
206 return o; | 362 return o; |
207 } | 363 } |
208 | 364 |
209 checkGetAncestryResponse(api.GetAncestryResponse o) { | 365 checkGetAncestryResponse(api.GetAncestryResponse o) { |
210 buildCounterGetAncestryResponse++; | 366 buildCounterGetAncestryResponse++; |
211 if (buildCounterGetAncestryResponse < 3) { | 367 if (buildCounterGetAncestryResponse < 3) { |
212 checkUnnamed1556(o.ancestor); | 368 checkUnnamed1619(o.ancestor); |
213 } | 369 } |
214 buildCounterGetAncestryResponse--; | 370 buildCounterGetAncestryResponse--; |
215 } | 371 } |
216 | 372 |
| 373 core.int buildCounterGetEffectiveOrgPolicyRequest = 0; |
| 374 buildGetEffectiveOrgPolicyRequest() { |
| 375 var o = new api.GetEffectiveOrgPolicyRequest(); |
| 376 buildCounterGetEffectiveOrgPolicyRequest++; |
| 377 if (buildCounterGetEffectiveOrgPolicyRequest < 3) { |
| 378 o.constraint = "foo"; |
| 379 } |
| 380 buildCounterGetEffectiveOrgPolicyRequest--; |
| 381 return o; |
| 382 } |
| 383 |
| 384 checkGetEffectiveOrgPolicyRequest(api.GetEffectiveOrgPolicyRequest o) { |
| 385 buildCounterGetEffectiveOrgPolicyRequest++; |
| 386 if (buildCounterGetEffectiveOrgPolicyRequest < 3) { |
| 387 unittest.expect(o.constraint, unittest.equals('foo')); |
| 388 } |
| 389 buildCounterGetEffectiveOrgPolicyRequest--; |
| 390 } |
| 391 |
217 core.int buildCounterGetIamPolicyRequest = 0; | 392 core.int buildCounterGetIamPolicyRequest = 0; |
218 buildGetIamPolicyRequest() { | 393 buildGetIamPolicyRequest() { |
219 var o = new api.GetIamPolicyRequest(); | 394 var o = new api.GetIamPolicyRequest(); |
220 buildCounterGetIamPolicyRequest++; | 395 buildCounterGetIamPolicyRequest++; |
221 if (buildCounterGetIamPolicyRequest < 3) { | 396 if (buildCounterGetIamPolicyRequest < 3) { |
222 } | 397 } |
223 buildCounterGetIamPolicyRequest--; | 398 buildCounterGetIamPolicyRequest--; |
224 return o; | 399 return o; |
225 } | 400 } |
226 | 401 |
227 checkGetIamPolicyRequest(api.GetIamPolicyRequest o) { | 402 checkGetIamPolicyRequest(api.GetIamPolicyRequest o) { |
228 buildCounterGetIamPolicyRequest++; | 403 buildCounterGetIamPolicyRequest++; |
229 if (buildCounterGetIamPolicyRequest < 3) { | 404 if (buildCounterGetIamPolicyRequest < 3) { |
230 } | 405 } |
231 buildCounterGetIamPolicyRequest--; | 406 buildCounterGetIamPolicyRequest--; |
232 } | 407 } |
233 | 408 |
234 buildUnnamed1557() { | 409 core.int buildCounterGetOrgPolicyRequest = 0; |
| 410 buildGetOrgPolicyRequest() { |
| 411 var o = new api.GetOrgPolicyRequest(); |
| 412 buildCounterGetOrgPolicyRequest++; |
| 413 if (buildCounterGetOrgPolicyRequest < 3) { |
| 414 o.constraint = "foo"; |
| 415 } |
| 416 buildCounterGetOrgPolicyRequest--; |
| 417 return o; |
| 418 } |
| 419 |
| 420 checkGetOrgPolicyRequest(api.GetOrgPolicyRequest o) { |
| 421 buildCounterGetOrgPolicyRequest++; |
| 422 if (buildCounterGetOrgPolicyRequest < 3) { |
| 423 unittest.expect(o.constraint, unittest.equals('foo')); |
| 424 } |
| 425 buildCounterGetOrgPolicyRequest--; |
| 426 } |
| 427 |
| 428 buildUnnamed1620() { |
235 var o = new core.List<core.String>(); | 429 var o = new core.List<core.String>(); |
236 o.add("foo"); | 430 o.add("foo"); |
237 o.add("foo"); | 431 o.add("foo"); |
238 return o; | 432 return o; |
239 } | 433 } |
240 | 434 |
241 checkUnnamed1557(core.List<core.String> o) { | 435 checkUnnamed1620(core.List<core.String> o) { |
242 unittest.expect(o, unittest.hasLength(2)); | 436 unittest.expect(o, unittest.hasLength(2)); |
243 unittest.expect(o[0], unittest.equals('foo')); | 437 unittest.expect(o[0], unittest.equals('foo')); |
244 unittest.expect(o[1], unittest.equals('foo')); | 438 unittest.expect(o[1], unittest.equals('foo')); |
245 } | 439 } |
246 | 440 |
247 core.int buildCounterLien = 0; | 441 core.int buildCounterLien = 0; |
248 buildLien() { | 442 buildLien() { |
249 var o = new api.Lien(); | 443 var o = new api.Lien(); |
250 buildCounterLien++; | 444 buildCounterLien++; |
251 if (buildCounterLien < 3) { | 445 if (buildCounterLien < 3) { |
252 o.createTime = "foo"; | 446 o.createTime = "foo"; |
253 o.name = "foo"; | 447 o.name = "foo"; |
254 o.origin = "foo"; | 448 o.origin = "foo"; |
255 o.parent = "foo"; | 449 o.parent = "foo"; |
256 o.reason = "foo"; | 450 o.reason = "foo"; |
257 o.restrictions = buildUnnamed1557(); | 451 o.restrictions = buildUnnamed1620(); |
258 } | 452 } |
259 buildCounterLien--; | 453 buildCounterLien--; |
260 return o; | 454 return o; |
261 } | 455 } |
262 | 456 |
263 checkLien(api.Lien o) { | 457 checkLien(api.Lien o) { |
264 buildCounterLien++; | 458 buildCounterLien++; |
265 if (buildCounterLien < 3) { | 459 if (buildCounterLien < 3) { |
266 unittest.expect(o.createTime, unittest.equals('foo')); | 460 unittest.expect(o.createTime, unittest.equals('foo')); |
267 unittest.expect(o.name, unittest.equals('foo')); | 461 unittest.expect(o.name, unittest.equals('foo')); |
268 unittest.expect(o.origin, unittest.equals('foo')); | 462 unittest.expect(o.origin, unittest.equals('foo')); |
269 unittest.expect(o.parent, unittest.equals('foo')); | 463 unittest.expect(o.parent, unittest.equals('foo')); |
270 unittest.expect(o.reason, unittest.equals('foo')); | 464 unittest.expect(o.reason, unittest.equals('foo')); |
271 checkUnnamed1557(o.restrictions); | 465 checkUnnamed1620(o.restrictions); |
272 } | 466 } |
273 buildCounterLien--; | 467 buildCounterLien--; |
274 } | 468 } |
275 | 469 |
276 buildUnnamed1558() { | 470 core.int buildCounterListAvailableOrgPolicyConstraintsRequest = 0; |
| 471 buildListAvailableOrgPolicyConstraintsRequest() { |
| 472 var o = new api.ListAvailableOrgPolicyConstraintsRequest(); |
| 473 buildCounterListAvailableOrgPolicyConstraintsRequest++; |
| 474 if (buildCounterListAvailableOrgPolicyConstraintsRequest < 3) { |
| 475 o.pageSize = 42; |
| 476 o.pageToken = "foo"; |
| 477 } |
| 478 buildCounterListAvailableOrgPolicyConstraintsRequest--; |
| 479 return o; |
| 480 } |
| 481 |
| 482 checkListAvailableOrgPolicyConstraintsRequest(api.ListAvailableOrgPolicyConstrai
ntsRequest o) { |
| 483 buildCounterListAvailableOrgPolicyConstraintsRequest++; |
| 484 if (buildCounterListAvailableOrgPolicyConstraintsRequest < 3) { |
| 485 unittest.expect(o.pageSize, unittest.equals(42)); |
| 486 unittest.expect(o.pageToken, unittest.equals('foo')); |
| 487 } |
| 488 buildCounterListAvailableOrgPolicyConstraintsRequest--; |
| 489 } |
| 490 |
| 491 buildUnnamed1621() { |
| 492 var o = new core.List<api.Constraint>(); |
| 493 o.add(buildConstraint()); |
| 494 o.add(buildConstraint()); |
| 495 return o; |
| 496 } |
| 497 |
| 498 checkUnnamed1621(core.List<api.Constraint> o) { |
| 499 unittest.expect(o, unittest.hasLength(2)); |
| 500 checkConstraint(o[0]); |
| 501 checkConstraint(o[1]); |
| 502 } |
| 503 |
| 504 core.int buildCounterListAvailableOrgPolicyConstraintsResponse = 0; |
| 505 buildListAvailableOrgPolicyConstraintsResponse() { |
| 506 var o = new api.ListAvailableOrgPolicyConstraintsResponse(); |
| 507 buildCounterListAvailableOrgPolicyConstraintsResponse++; |
| 508 if (buildCounterListAvailableOrgPolicyConstraintsResponse < 3) { |
| 509 o.constraints = buildUnnamed1621(); |
| 510 o.nextPageToken = "foo"; |
| 511 } |
| 512 buildCounterListAvailableOrgPolicyConstraintsResponse--; |
| 513 return o; |
| 514 } |
| 515 |
| 516 checkListAvailableOrgPolicyConstraintsResponse(api.ListAvailableOrgPolicyConstra
intsResponse o) { |
| 517 buildCounterListAvailableOrgPolicyConstraintsResponse++; |
| 518 if (buildCounterListAvailableOrgPolicyConstraintsResponse < 3) { |
| 519 checkUnnamed1621(o.constraints); |
| 520 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 521 } |
| 522 buildCounterListAvailableOrgPolicyConstraintsResponse--; |
| 523 } |
| 524 |
| 525 core.int buildCounterListConstraint = 0; |
| 526 buildListConstraint() { |
| 527 var o = new api.ListConstraint(); |
| 528 buildCounterListConstraint++; |
| 529 if (buildCounterListConstraint < 3) { |
| 530 o.suggestedValue = "foo"; |
| 531 } |
| 532 buildCounterListConstraint--; |
| 533 return o; |
| 534 } |
| 535 |
| 536 checkListConstraint(api.ListConstraint o) { |
| 537 buildCounterListConstraint++; |
| 538 if (buildCounterListConstraint < 3) { |
| 539 unittest.expect(o.suggestedValue, unittest.equals('foo')); |
| 540 } |
| 541 buildCounterListConstraint--; |
| 542 } |
| 543 |
| 544 buildUnnamed1622() { |
277 var o = new core.List<api.Lien>(); | 545 var o = new core.List<api.Lien>(); |
278 o.add(buildLien()); | 546 o.add(buildLien()); |
279 o.add(buildLien()); | 547 o.add(buildLien()); |
280 return o; | 548 return o; |
281 } | 549 } |
282 | 550 |
283 checkUnnamed1558(core.List<api.Lien> o) { | 551 checkUnnamed1622(core.List<api.Lien> o) { |
284 unittest.expect(o, unittest.hasLength(2)); | 552 unittest.expect(o, unittest.hasLength(2)); |
285 checkLien(o[0]); | 553 checkLien(o[0]); |
286 checkLien(o[1]); | 554 checkLien(o[1]); |
287 } | 555 } |
288 | 556 |
289 core.int buildCounterListLiensResponse = 0; | 557 core.int buildCounterListLiensResponse = 0; |
290 buildListLiensResponse() { | 558 buildListLiensResponse() { |
291 var o = new api.ListLiensResponse(); | 559 var o = new api.ListLiensResponse(); |
292 buildCounterListLiensResponse++; | 560 buildCounterListLiensResponse++; |
293 if (buildCounterListLiensResponse < 3) { | 561 if (buildCounterListLiensResponse < 3) { |
294 o.liens = buildUnnamed1558(); | 562 o.liens = buildUnnamed1622(); |
295 o.nextPageToken = "foo"; | 563 o.nextPageToken = "foo"; |
296 } | 564 } |
297 buildCounterListLiensResponse--; | 565 buildCounterListLiensResponse--; |
298 return o; | 566 return o; |
299 } | 567 } |
300 | 568 |
301 checkListLiensResponse(api.ListLiensResponse o) { | 569 checkListLiensResponse(api.ListLiensResponse o) { |
302 buildCounterListLiensResponse++; | 570 buildCounterListLiensResponse++; |
303 if (buildCounterListLiensResponse < 3) { | 571 if (buildCounterListLiensResponse < 3) { |
304 checkUnnamed1558(o.liens); | 572 checkUnnamed1622(o.liens); |
305 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 573 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
306 } | 574 } |
307 buildCounterListLiensResponse--; | 575 buildCounterListLiensResponse--; |
308 } | 576 } |
309 | 577 |
310 buildUnnamed1559() { | 578 core.int buildCounterListOrgPoliciesRequest = 0; |
| 579 buildListOrgPoliciesRequest() { |
| 580 var o = new api.ListOrgPoliciesRequest(); |
| 581 buildCounterListOrgPoliciesRequest++; |
| 582 if (buildCounterListOrgPoliciesRequest < 3) { |
| 583 o.pageSize = 42; |
| 584 o.pageToken = "foo"; |
| 585 } |
| 586 buildCounterListOrgPoliciesRequest--; |
| 587 return o; |
| 588 } |
| 589 |
| 590 checkListOrgPoliciesRequest(api.ListOrgPoliciesRequest o) { |
| 591 buildCounterListOrgPoliciesRequest++; |
| 592 if (buildCounterListOrgPoliciesRequest < 3) { |
| 593 unittest.expect(o.pageSize, unittest.equals(42)); |
| 594 unittest.expect(o.pageToken, unittest.equals('foo')); |
| 595 } |
| 596 buildCounterListOrgPoliciesRequest--; |
| 597 } |
| 598 |
| 599 buildUnnamed1623() { |
| 600 var o = new core.List<api.OrgPolicy>(); |
| 601 o.add(buildOrgPolicy()); |
| 602 o.add(buildOrgPolicy()); |
| 603 return o; |
| 604 } |
| 605 |
| 606 checkUnnamed1623(core.List<api.OrgPolicy> o) { |
| 607 unittest.expect(o, unittest.hasLength(2)); |
| 608 checkOrgPolicy(o[0]); |
| 609 checkOrgPolicy(o[1]); |
| 610 } |
| 611 |
| 612 core.int buildCounterListOrgPoliciesResponse = 0; |
| 613 buildListOrgPoliciesResponse() { |
| 614 var o = new api.ListOrgPoliciesResponse(); |
| 615 buildCounterListOrgPoliciesResponse++; |
| 616 if (buildCounterListOrgPoliciesResponse < 3) { |
| 617 o.nextPageToken = "foo"; |
| 618 o.policies = buildUnnamed1623(); |
| 619 } |
| 620 buildCounterListOrgPoliciesResponse--; |
| 621 return o; |
| 622 } |
| 623 |
| 624 checkListOrgPoliciesResponse(api.ListOrgPoliciesResponse o) { |
| 625 buildCounterListOrgPoliciesResponse++; |
| 626 if (buildCounterListOrgPoliciesResponse < 3) { |
| 627 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 628 checkUnnamed1623(o.policies); |
| 629 } |
| 630 buildCounterListOrgPoliciesResponse--; |
| 631 } |
| 632 |
| 633 buildUnnamed1624() { |
| 634 var o = new core.List<core.String>(); |
| 635 o.add("foo"); |
| 636 o.add("foo"); |
| 637 return o; |
| 638 } |
| 639 |
| 640 checkUnnamed1624(core.List<core.String> o) { |
| 641 unittest.expect(o, unittest.hasLength(2)); |
| 642 unittest.expect(o[0], unittest.equals('foo')); |
| 643 unittest.expect(o[1], unittest.equals('foo')); |
| 644 } |
| 645 |
| 646 buildUnnamed1625() { |
| 647 var o = new core.List<core.String>(); |
| 648 o.add("foo"); |
| 649 o.add("foo"); |
| 650 return o; |
| 651 } |
| 652 |
| 653 checkUnnamed1625(core.List<core.String> o) { |
| 654 unittest.expect(o, unittest.hasLength(2)); |
| 655 unittest.expect(o[0], unittest.equals('foo')); |
| 656 unittest.expect(o[1], unittest.equals('foo')); |
| 657 } |
| 658 |
| 659 core.int buildCounterListPolicy = 0; |
| 660 buildListPolicy() { |
| 661 var o = new api.ListPolicy(); |
| 662 buildCounterListPolicy++; |
| 663 if (buildCounterListPolicy < 3) { |
| 664 o.allValues = "foo"; |
| 665 o.allowedValues = buildUnnamed1624(); |
| 666 o.deniedValues = buildUnnamed1625(); |
| 667 o.inheritFromParent = true; |
| 668 o.suggestedValue = "foo"; |
| 669 } |
| 670 buildCounterListPolicy--; |
| 671 return o; |
| 672 } |
| 673 |
| 674 checkListPolicy(api.ListPolicy o) { |
| 675 buildCounterListPolicy++; |
| 676 if (buildCounterListPolicy < 3) { |
| 677 unittest.expect(o.allValues, unittest.equals('foo')); |
| 678 checkUnnamed1624(o.allowedValues); |
| 679 checkUnnamed1625(o.deniedValues); |
| 680 unittest.expect(o.inheritFromParent, unittest.isTrue); |
| 681 unittest.expect(o.suggestedValue, unittest.equals('foo')); |
| 682 } |
| 683 buildCounterListPolicy--; |
| 684 } |
| 685 |
| 686 buildUnnamed1626() { |
311 var o = new core.List<api.Project>(); | 687 var o = new core.List<api.Project>(); |
312 o.add(buildProject()); | 688 o.add(buildProject()); |
313 o.add(buildProject()); | 689 o.add(buildProject()); |
314 return o; | 690 return o; |
315 } | 691 } |
316 | 692 |
317 checkUnnamed1559(core.List<api.Project> o) { | 693 checkUnnamed1626(core.List<api.Project> o) { |
318 unittest.expect(o, unittest.hasLength(2)); | 694 unittest.expect(o, unittest.hasLength(2)); |
319 checkProject(o[0]); | 695 checkProject(o[0]); |
320 checkProject(o[1]); | 696 checkProject(o[1]); |
321 } | 697 } |
322 | 698 |
323 core.int buildCounterListProjectsResponse = 0; | 699 core.int buildCounterListProjectsResponse = 0; |
324 buildListProjectsResponse() { | 700 buildListProjectsResponse() { |
325 var o = new api.ListProjectsResponse(); | 701 var o = new api.ListProjectsResponse(); |
326 buildCounterListProjectsResponse++; | 702 buildCounterListProjectsResponse++; |
327 if (buildCounterListProjectsResponse < 3) { | 703 if (buildCounterListProjectsResponse < 3) { |
328 o.nextPageToken = "foo"; | 704 o.nextPageToken = "foo"; |
329 o.projects = buildUnnamed1559(); | 705 o.projects = buildUnnamed1626(); |
330 } | 706 } |
331 buildCounterListProjectsResponse--; | 707 buildCounterListProjectsResponse--; |
332 return o; | 708 return o; |
333 } | 709 } |
334 | 710 |
335 checkListProjectsResponse(api.ListProjectsResponse o) { | 711 checkListProjectsResponse(api.ListProjectsResponse o) { |
336 buildCounterListProjectsResponse++; | 712 buildCounterListProjectsResponse++; |
337 if (buildCounterListProjectsResponse < 3) { | 713 if (buildCounterListProjectsResponse < 3) { |
338 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 714 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
339 checkUnnamed1559(o.projects); | 715 checkUnnamed1626(o.projects); |
340 } | 716 } |
341 buildCounterListProjectsResponse--; | 717 buildCounterListProjectsResponse--; |
342 } | 718 } |
343 | 719 |
344 buildUnnamed1560() { | 720 buildUnnamed1627() { |
345 var o = new core.Map<core.String, core.Object>(); | 721 var o = new core.Map<core.String, core.Object>(); |
346 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 722 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
347 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 723 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
348 return o; | 724 return o; |
349 } | 725 } |
350 | 726 |
351 checkUnnamed1560(core.Map<core.String, core.Object> o) { | 727 checkUnnamed1627(core.Map<core.String, core.Object> o) { |
352 unittest.expect(o, unittest.hasLength(2)); | 728 unittest.expect(o, unittest.hasLength(2)); |
353 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')); | 729 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')); |
354 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')); | 730 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')); |
355 } | 731 } |
356 | 732 |
357 buildUnnamed1561() { | 733 buildUnnamed1628() { |
358 var o = new core.Map<core.String, core.Object>(); | 734 var o = new core.Map<core.String, core.Object>(); |
359 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 735 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
360 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 736 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
361 return o; | 737 return o; |
362 } | 738 } |
363 | 739 |
364 checkUnnamed1561(core.Map<core.String, core.Object> o) { | 740 checkUnnamed1628(core.Map<core.String, core.Object> o) { |
365 unittest.expect(o, unittest.hasLength(2)); | 741 unittest.expect(o, unittest.hasLength(2)); |
366 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')); | 742 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')); |
367 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')); | 743 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')); |
368 } | 744 } |
369 | 745 |
370 core.int buildCounterOperation = 0; | 746 core.int buildCounterOperation = 0; |
371 buildOperation() { | 747 buildOperation() { |
372 var o = new api.Operation(); | 748 var o = new api.Operation(); |
373 buildCounterOperation++; | 749 buildCounterOperation++; |
374 if (buildCounterOperation < 3) { | 750 if (buildCounterOperation < 3) { |
375 o.done = true; | 751 o.done = true; |
376 o.error = buildStatus(); | 752 o.error = buildStatus(); |
377 o.metadata = buildUnnamed1560(); | 753 o.metadata = buildUnnamed1627(); |
378 o.name = "foo"; | 754 o.name = "foo"; |
379 o.response = buildUnnamed1561(); | 755 o.response = buildUnnamed1628(); |
380 } | 756 } |
381 buildCounterOperation--; | 757 buildCounterOperation--; |
382 return o; | 758 return o; |
383 } | 759 } |
384 | 760 |
385 checkOperation(api.Operation o) { | 761 checkOperation(api.Operation o) { |
386 buildCounterOperation++; | 762 buildCounterOperation++; |
387 if (buildCounterOperation < 3) { | 763 if (buildCounterOperation < 3) { |
388 unittest.expect(o.done, unittest.isTrue); | 764 unittest.expect(o.done, unittest.isTrue); |
389 checkStatus(o.error); | 765 checkStatus(o.error); |
390 checkUnnamed1560(o.metadata); | 766 checkUnnamed1627(o.metadata); |
391 unittest.expect(o.name, unittest.equals('foo')); | 767 unittest.expect(o.name, unittest.equals('foo')); |
392 checkUnnamed1561(o.response); | 768 checkUnnamed1628(o.response); |
393 } | 769 } |
394 buildCounterOperation--; | 770 buildCounterOperation--; |
395 } | 771 } |
396 | 772 |
| 773 core.int buildCounterOrgPolicy = 0; |
| 774 buildOrgPolicy() { |
| 775 var o = new api.OrgPolicy(); |
| 776 buildCounterOrgPolicy++; |
| 777 if (buildCounterOrgPolicy < 3) { |
| 778 o.booleanPolicy = buildBooleanPolicy(); |
| 779 o.constraint = "foo"; |
| 780 o.etag = "foo"; |
| 781 o.listPolicy = buildListPolicy(); |
| 782 o.restoreDefault = buildRestoreDefault(); |
| 783 o.updateTime = "foo"; |
| 784 o.version = 42; |
| 785 } |
| 786 buildCounterOrgPolicy--; |
| 787 return o; |
| 788 } |
| 789 |
| 790 checkOrgPolicy(api.OrgPolicy o) { |
| 791 buildCounterOrgPolicy++; |
| 792 if (buildCounterOrgPolicy < 3) { |
| 793 checkBooleanPolicy(o.booleanPolicy); |
| 794 unittest.expect(o.constraint, unittest.equals('foo')); |
| 795 unittest.expect(o.etag, unittest.equals('foo')); |
| 796 checkListPolicy(o.listPolicy); |
| 797 checkRestoreDefault(o.restoreDefault); |
| 798 unittest.expect(o.updateTime, unittest.equals('foo')); |
| 799 unittest.expect(o.version, unittest.equals(42)); |
| 800 } |
| 801 buildCounterOrgPolicy--; |
| 802 } |
| 803 |
397 core.int buildCounterOrganization = 0; | 804 core.int buildCounterOrganization = 0; |
398 buildOrganization() { | 805 buildOrganization() { |
399 var o = new api.Organization(); | 806 var o = new api.Organization(); |
400 buildCounterOrganization++; | 807 buildCounterOrganization++; |
401 if (buildCounterOrganization < 3) { | 808 if (buildCounterOrganization < 3) { |
402 o.creationTime = "foo"; | 809 o.creationTime = "foo"; |
403 o.displayName = "foo"; | 810 o.displayName = "foo"; |
404 o.lifecycleState = "foo"; | 811 o.lifecycleState = "foo"; |
405 o.name = "foo"; | 812 o.name = "foo"; |
406 o.owner = buildOrganizationOwner(); | 813 o.owner = buildOrganizationOwner(); |
(...skipping 26 matching lines...) Expand all Loading... |
433 } | 840 } |
434 | 841 |
435 checkOrganizationOwner(api.OrganizationOwner o) { | 842 checkOrganizationOwner(api.OrganizationOwner o) { |
436 buildCounterOrganizationOwner++; | 843 buildCounterOrganizationOwner++; |
437 if (buildCounterOrganizationOwner < 3) { | 844 if (buildCounterOrganizationOwner < 3) { |
438 unittest.expect(o.directoryCustomerId, unittest.equals('foo')); | 845 unittest.expect(o.directoryCustomerId, unittest.equals('foo')); |
439 } | 846 } |
440 buildCounterOrganizationOwner--; | 847 buildCounterOrganizationOwner--; |
441 } | 848 } |
442 | 849 |
443 buildUnnamed1562() { | 850 buildUnnamed1629() { |
| 851 var o = new core.List<api.AuditConfig>(); |
| 852 o.add(buildAuditConfig()); |
| 853 o.add(buildAuditConfig()); |
| 854 return o; |
| 855 } |
| 856 |
| 857 checkUnnamed1629(core.List<api.AuditConfig> o) { |
| 858 unittest.expect(o, unittest.hasLength(2)); |
| 859 checkAuditConfig(o[0]); |
| 860 checkAuditConfig(o[1]); |
| 861 } |
| 862 |
| 863 buildUnnamed1630() { |
444 var o = new core.List<api.Binding>(); | 864 var o = new core.List<api.Binding>(); |
445 o.add(buildBinding()); | 865 o.add(buildBinding()); |
446 o.add(buildBinding()); | 866 o.add(buildBinding()); |
447 return o; | 867 return o; |
448 } | 868 } |
449 | 869 |
450 checkUnnamed1562(core.List<api.Binding> o) { | 870 checkUnnamed1630(core.List<api.Binding> o) { |
451 unittest.expect(o, unittest.hasLength(2)); | 871 unittest.expect(o, unittest.hasLength(2)); |
452 checkBinding(o[0]); | 872 checkBinding(o[0]); |
453 checkBinding(o[1]); | 873 checkBinding(o[1]); |
454 } | 874 } |
455 | 875 |
456 core.int buildCounterPolicy = 0; | 876 core.int buildCounterPolicy = 0; |
457 buildPolicy() { | 877 buildPolicy() { |
458 var o = new api.Policy(); | 878 var o = new api.Policy(); |
459 buildCounterPolicy++; | 879 buildCounterPolicy++; |
460 if (buildCounterPolicy < 3) { | 880 if (buildCounterPolicy < 3) { |
461 o.bindings = buildUnnamed1562(); | 881 o.auditConfigs = buildUnnamed1629(); |
| 882 o.bindings = buildUnnamed1630(); |
462 o.etag = "foo"; | 883 o.etag = "foo"; |
463 o.version = 42; | 884 o.version = 42; |
464 } | 885 } |
465 buildCounterPolicy--; | 886 buildCounterPolicy--; |
466 return o; | 887 return o; |
467 } | 888 } |
468 | 889 |
469 checkPolicy(api.Policy o) { | 890 checkPolicy(api.Policy o) { |
470 buildCounterPolicy++; | 891 buildCounterPolicy++; |
471 if (buildCounterPolicy < 3) { | 892 if (buildCounterPolicy < 3) { |
472 checkUnnamed1562(o.bindings); | 893 checkUnnamed1629(o.auditConfigs); |
| 894 checkUnnamed1630(o.bindings); |
473 unittest.expect(o.etag, unittest.equals('foo')); | 895 unittest.expect(o.etag, unittest.equals('foo')); |
474 unittest.expect(o.version, unittest.equals(42)); | 896 unittest.expect(o.version, unittest.equals(42)); |
475 } | 897 } |
476 buildCounterPolicy--; | 898 buildCounterPolicy--; |
477 } | 899 } |
478 | 900 |
479 buildUnnamed1563() { | 901 buildUnnamed1631() { |
480 var o = new core.Map<core.String, core.String>(); | 902 var o = new core.Map<core.String, core.String>(); |
481 o["x"] = "foo"; | 903 o["x"] = "foo"; |
482 o["y"] = "foo"; | 904 o["y"] = "foo"; |
483 return o; | 905 return o; |
484 } | 906 } |
485 | 907 |
486 checkUnnamed1563(core.Map<core.String, core.String> o) { | 908 checkUnnamed1631(core.Map<core.String, core.String> o) { |
487 unittest.expect(o, unittest.hasLength(2)); | 909 unittest.expect(o, unittest.hasLength(2)); |
488 unittest.expect(o["x"], unittest.equals('foo')); | 910 unittest.expect(o["x"], unittest.equals('foo')); |
489 unittest.expect(o["y"], unittest.equals('foo')); | 911 unittest.expect(o["y"], unittest.equals('foo')); |
490 } | 912 } |
491 | 913 |
492 core.int buildCounterProject = 0; | 914 core.int buildCounterProject = 0; |
493 buildProject() { | 915 buildProject() { |
494 var o = new api.Project(); | 916 var o = new api.Project(); |
495 buildCounterProject++; | 917 buildCounterProject++; |
496 if (buildCounterProject < 3) { | 918 if (buildCounterProject < 3) { |
497 o.createTime = "foo"; | 919 o.createTime = "foo"; |
498 o.labels = buildUnnamed1563(); | 920 o.labels = buildUnnamed1631(); |
499 o.lifecycleState = "foo"; | 921 o.lifecycleState = "foo"; |
500 o.name = "foo"; | 922 o.name = "foo"; |
501 o.parent = buildResourceId(); | 923 o.parent = buildResourceId(); |
502 o.projectId = "foo"; | 924 o.projectId = "foo"; |
503 o.projectNumber = "foo"; | 925 o.projectNumber = "foo"; |
504 } | 926 } |
505 buildCounterProject--; | 927 buildCounterProject--; |
506 return o; | 928 return o; |
507 } | 929 } |
508 | 930 |
509 checkProject(api.Project o) { | 931 checkProject(api.Project o) { |
510 buildCounterProject++; | 932 buildCounterProject++; |
511 if (buildCounterProject < 3) { | 933 if (buildCounterProject < 3) { |
512 unittest.expect(o.createTime, unittest.equals('foo')); | 934 unittest.expect(o.createTime, unittest.equals('foo')); |
513 checkUnnamed1563(o.labels); | 935 checkUnnamed1631(o.labels); |
514 unittest.expect(o.lifecycleState, unittest.equals('foo')); | 936 unittest.expect(o.lifecycleState, unittest.equals('foo')); |
515 unittest.expect(o.name, unittest.equals('foo')); | 937 unittest.expect(o.name, unittest.equals('foo')); |
516 checkResourceId(o.parent); | 938 checkResourceId(o.parent); |
517 unittest.expect(o.projectId, unittest.equals('foo')); | 939 unittest.expect(o.projectId, unittest.equals('foo')); |
518 unittest.expect(o.projectNumber, unittest.equals('foo')); | 940 unittest.expect(o.projectNumber, unittest.equals('foo')); |
519 } | 941 } |
520 buildCounterProject--; | 942 buildCounterProject--; |
521 } | 943 } |
522 | 944 |
523 core.int buildCounterProjectCreationStatus = 0; | 945 core.int buildCounterProjectCreationStatus = 0; |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
557 | 979 |
558 checkResourceId(api.ResourceId o) { | 980 checkResourceId(api.ResourceId o) { |
559 buildCounterResourceId++; | 981 buildCounterResourceId++; |
560 if (buildCounterResourceId < 3) { | 982 if (buildCounterResourceId < 3) { |
561 unittest.expect(o.id, unittest.equals('foo')); | 983 unittest.expect(o.id, unittest.equals('foo')); |
562 unittest.expect(o.type, unittest.equals('foo')); | 984 unittest.expect(o.type, unittest.equals('foo')); |
563 } | 985 } |
564 buildCounterResourceId--; | 986 buildCounterResourceId--; |
565 } | 987 } |
566 | 988 |
| 989 core.int buildCounterRestoreDefault = 0; |
| 990 buildRestoreDefault() { |
| 991 var o = new api.RestoreDefault(); |
| 992 buildCounterRestoreDefault++; |
| 993 if (buildCounterRestoreDefault < 3) { |
| 994 } |
| 995 buildCounterRestoreDefault--; |
| 996 return o; |
| 997 } |
| 998 |
| 999 checkRestoreDefault(api.RestoreDefault o) { |
| 1000 buildCounterRestoreDefault++; |
| 1001 if (buildCounterRestoreDefault < 3) { |
| 1002 } |
| 1003 buildCounterRestoreDefault--; |
| 1004 } |
| 1005 |
567 core.int buildCounterSearchOrganizationsRequest = 0; | 1006 core.int buildCounterSearchOrganizationsRequest = 0; |
568 buildSearchOrganizationsRequest() { | 1007 buildSearchOrganizationsRequest() { |
569 var o = new api.SearchOrganizationsRequest(); | 1008 var o = new api.SearchOrganizationsRequest(); |
570 buildCounterSearchOrganizationsRequest++; | 1009 buildCounterSearchOrganizationsRequest++; |
571 if (buildCounterSearchOrganizationsRequest < 3) { | 1010 if (buildCounterSearchOrganizationsRequest < 3) { |
572 o.filter = "foo"; | 1011 o.filter = "foo"; |
573 o.pageSize = 42; | 1012 o.pageSize = 42; |
574 o.pageToken = "foo"; | 1013 o.pageToken = "foo"; |
575 } | 1014 } |
576 buildCounterSearchOrganizationsRequest--; | 1015 buildCounterSearchOrganizationsRequest--; |
577 return o; | 1016 return o; |
578 } | 1017 } |
579 | 1018 |
580 checkSearchOrganizationsRequest(api.SearchOrganizationsRequest o) { | 1019 checkSearchOrganizationsRequest(api.SearchOrganizationsRequest o) { |
581 buildCounterSearchOrganizationsRequest++; | 1020 buildCounterSearchOrganizationsRequest++; |
582 if (buildCounterSearchOrganizationsRequest < 3) { | 1021 if (buildCounterSearchOrganizationsRequest < 3) { |
583 unittest.expect(o.filter, unittest.equals('foo')); | 1022 unittest.expect(o.filter, unittest.equals('foo')); |
584 unittest.expect(o.pageSize, unittest.equals(42)); | 1023 unittest.expect(o.pageSize, unittest.equals(42)); |
585 unittest.expect(o.pageToken, unittest.equals('foo')); | 1024 unittest.expect(o.pageToken, unittest.equals('foo')); |
586 } | 1025 } |
587 buildCounterSearchOrganizationsRequest--; | 1026 buildCounterSearchOrganizationsRequest--; |
588 } | 1027 } |
589 | 1028 |
590 buildUnnamed1564() { | 1029 buildUnnamed1632() { |
591 var o = new core.List<api.Organization>(); | 1030 var o = new core.List<api.Organization>(); |
592 o.add(buildOrganization()); | 1031 o.add(buildOrganization()); |
593 o.add(buildOrganization()); | 1032 o.add(buildOrganization()); |
594 return o; | 1033 return o; |
595 } | 1034 } |
596 | 1035 |
597 checkUnnamed1564(core.List<api.Organization> o) { | 1036 checkUnnamed1632(core.List<api.Organization> o) { |
598 unittest.expect(o, unittest.hasLength(2)); | 1037 unittest.expect(o, unittest.hasLength(2)); |
599 checkOrganization(o[0]); | 1038 checkOrganization(o[0]); |
600 checkOrganization(o[1]); | 1039 checkOrganization(o[1]); |
601 } | 1040 } |
602 | 1041 |
603 core.int buildCounterSearchOrganizationsResponse = 0; | 1042 core.int buildCounterSearchOrganizationsResponse = 0; |
604 buildSearchOrganizationsResponse() { | 1043 buildSearchOrganizationsResponse() { |
605 var o = new api.SearchOrganizationsResponse(); | 1044 var o = new api.SearchOrganizationsResponse(); |
606 buildCounterSearchOrganizationsResponse++; | 1045 buildCounterSearchOrganizationsResponse++; |
607 if (buildCounterSearchOrganizationsResponse < 3) { | 1046 if (buildCounterSearchOrganizationsResponse < 3) { |
608 o.nextPageToken = "foo"; | 1047 o.nextPageToken = "foo"; |
609 o.organizations = buildUnnamed1564(); | 1048 o.organizations = buildUnnamed1632(); |
610 } | 1049 } |
611 buildCounterSearchOrganizationsResponse--; | 1050 buildCounterSearchOrganizationsResponse--; |
612 return o; | 1051 return o; |
613 } | 1052 } |
614 | 1053 |
615 checkSearchOrganizationsResponse(api.SearchOrganizationsResponse o) { | 1054 checkSearchOrganizationsResponse(api.SearchOrganizationsResponse o) { |
616 buildCounterSearchOrganizationsResponse++; | 1055 buildCounterSearchOrganizationsResponse++; |
617 if (buildCounterSearchOrganizationsResponse < 3) { | 1056 if (buildCounterSearchOrganizationsResponse < 3) { |
618 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 1057 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
619 checkUnnamed1564(o.organizations); | 1058 checkUnnamed1632(o.organizations); |
620 } | 1059 } |
621 buildCounterSearchOrganizationsResponse--; | 1060 buildCounterSearchOrganizationsResponse--; |
622 } | 1061 } |
623 | 1062 |
624 core.int buildCounterSetIamPolicyRequest = 0; | 1063 core.int buildCounterSetIamPolicyRequest = 0; |
625 buildSetIamPolicyRequest() { | 1064 buildSetIamPolicyRequest() { |
626 var o = new api.SetIamPolicyRequest(); | 1065 var o = new api.SetIamPolicyRequest(); |
627 buildCounterSetIamPolicyRequest++; | 1066 buildCounterSetIamPolicyRequest++; |
628 if (buildCounterSetIamPolicyRequest < 3) { | 1067 if (buildCounterSetIamPolicyRequest < 3) { |
629 o.policy = buildPolicy(); | 1068 o.policy = buildPolicy(); |
| 1069 o.updateMask = "foo"; |
630 } | 1070 } |
631 buildCounterSetIamPolicyRequest--; | 1071 buildCounterSetIamPolicyRequest--; |
632 return o; | 1072 return o; |
633 } | 1073 } |
634 | 1074 |
635 checkSetIamPolicyRequest(api.SetIamPolicyRequest o) { | 1075 checkSetIamPolicyRequest(api.SetIamPolicyRequest o) { |
636 buildCounterSetIamPolicyRequest++; | 1076 buildCounterSetIamPolicyRequest++; |
637 if (buildCounterSetIamPolicyRequest < 3) { | 1077 if (buildCounterSetIamPolicyRequest < 3) { |
638 checkPolicy(o.policy); | 1078 checkPolicy(o.policy); |
| 1079 unittest.expect(o.updateMask, unittest.equals('foo')); |
639 } | 1080 } |
640 buildCounterSetIamPolicyRequest--; | 1081 buildCounterSetIamPolicyRequest--; |
641 } | 1082 } |
642 | 1083 |
643 buildUnnamed1565() { | 1084 core.int buildCounterSetOrgPolicyRequest = 0; |
| 1085 buildSetOrgPolicyRequest() { |
| 1086 var o = new api.SetOrgPolicyRequest(); |
| 1087 buildCounterSetOrgPolicyRequest++; |
| 1088 if (buildCounterSetOrgPolicyRequest < 3) { |
| 1089 o.policy = buildOrgPolicy(); |
| 1090 } |
| 1091 buildCounterSetOrgPolicyRequest--; |
| 1092 return o; |
| 1093 } |
| 1094 |
| 1095 checkSetOrgPolicyRequest(api.SetOrgPolicyRequest o) { |
| 1096 buildCounterSetOrgPolicyRequest++; |
| 1097 if (buildCounterSetOrgPolicyRequest < 3) { |
| 1098 checkOrgPolicy(o.policy); |
| 1099 } |
| 1100 buildCounterSetOrgPolicyRequest--; |
| 1101 } |
| 1102 |
| 1103 buildUnnamed1633() { |
644 var o = new core.Map<core.String, core.Object>(); | 1104 var o = new core.Map<core.String, core.Object>(); |
645 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 1105 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
646 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 1106 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
647 return o; | 1107 return o; |
648 } | 1108 } |
649 | 1109 |
650 checkUnnamed1565(core.Map<core.String, core.Object> o) { | 1110 checkUnnamed1633(core.Map<core.String, core.Object> o) { |
651 unittest.expect(o, unittest.hasLength(2)); | 1111 unittest.expect(o, unittest.hasLength(2)); |
652 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')); | 1112 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')); |
653 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')); | 1113 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')); |
654 } | 1114 } |
655 | 1115 |
656 buildUnnamed1566() { | 1116 buildUnnamed1634() { |
657 var o = new core.List<core.Map<core.String, core.Object>>(); | 1117 var o = new core.List<core.Map<core.String, core.Object>>(); |
658 o.add(buildUnnamed1565()); | 1118 o.add(buildUnnamed1633()); |
659 o.add(buildUnnamed1565()); | 1119 o.add(buildUnnamed1633()); |
660 return o; | 1120 return o; |
661 } | 1121 } |
662 | 1122 |
663 checkUnnamed1566(core.List<core.Map<core.String, core.Object>> o) { | 1123 checkUnnamed1634(core.List<core.Map<core.String, core.Object>> o) { |
664 unittest.expect(o, unittest.hasLength(2)); | 1124 unittest.expect(o, unittest.hasLength(2)); |
665 checkUnnamed1565(o[0]); | 1125 checkUnnamed1633(o[0]); |
666 checkUnnamed1565(o[1]); | 1126 checkUnnamed1633(o[1]); |
667 } | 1127 } |
668 | 1128 |
669 core.int buildCounterStatus = 0; | 1129 core.int buildCounterStatus = 0; |
670 buildStatus() { | 1130 buildStatus() { |
671 var o = new api.Status(); | 1131 var o = new api.Status(); |
672 buildCounterStatus++; | 1132 buildCounterStatus++; |
673 if (buildCounterStatus < 3) { | 1133 if (buildCounterStatus < 3) { |
674 o.code = 42; | 1134 o.code = 42; |
675 o.details = buildUnnamed1566(); | 1135 o.details = buildUnnamed1634(); |
676 o.message = "foo"; | 1136 o.message = "foo"; |
677 } | 1137 } |
678 buildCounterStatus--; | 1138 buildCounterStatus--; |
679 return o; | 1139 return o; |
680 } | 1140 } |
681 | 1141 |
682 checkStatus(api.Status o) { | 1142 checkStatus(api.Status o) { |
683 buildCounterStatus++; | 1143 buildCounterStatus++; |
684 if (buildCounterStatus < 3) { | 1144 if (buildCounterStatus < 3) { |
685 unittest.expect(o.code, unittest.equals(42)); | 1145 unittest.expect(o.code, unittest.equals(42)); |
686 checkUnnamed1566(o.details); | 1146 checkUnnamed1634(o.details); |
687 unittest.expect(o.message, unittest.equals('foo')); | 1147 unittest.expect(o.message, unittest.equals('foo')); |
688 } | 1148 } |
689 buildCounterStatus--; | 1149 buildCounterStatus--; |
690 } | 1150 } |
691 | 1151 |
692 buildUnnamed1567() { | 1152 buildUnnamed1635() { |
693 var o = new core.List<core.String>(); | 1153 var o = new core.List<core.String>(); |
694 o.add("foo"); | 1154 o.add("foo"); |
695 o.add("foo"); | 1155 o.add("foo"); |
696 return o; | 1156 return o; |
697 } | 1157 } |
698 | 1158 |
699 checkUnnamed1567(core.List<core.String> o) { | 1159 checkUnnamed1635(core.List<core.String> o) { |
700 unittest.expect(o, unittest.hasLength(2)); | 1160 unittest.expect(o, unittest.hasLength(2)); |
701 unittest.expect(o[0], unittest.equals('foo')); | 1161 unittest.expect(o[0], unittest.equals('foo')); |
702 unittest.expect(o[1], unittest.equals('foo')); | 1162 unittest.expect(o[1], unittest.equals('foo')); |
703 } | 1163 } |
704 | 1164 |
705 core.int buildCounterTestIamPermissionsRequest = 0; | 1165 core.int buildCounterTestIamPermissionsRequest = 0; |
706 buildTestIamPermissionsRequest() { | 1166 buildTestIamPermissionsRequest() { |
707 var o = new api.TestIamPermissionsRequest(); | 1167 var o = new api.TestIamPermissionsRequest(); |
708 buildCounterTestIamPermissionsRequest++; | 1168 buildCounterTestIamPermissionsRequest++; |
709 if (buildCounterTestIamPermissionsRequest < 3) { | 1169 if (buildCounterTestIamPermissionsRequest < 3) { |
710 o.permissions = buildUnnamed1567(); | 1170 o.permissions = buildUnnamed1635(); |
711 } | 1171 } |
712 buildCounterTestIamPermissionsRequest--; | 1172 buildCounterTestIamPermissionsRequest--; |
713 return o; | 1173 return o; |
714 } | 1174 } |
715 | 1175 |
716 checkTestIamPermissionsRequest(api.TestIamPermissionsRequest o) { | 1176 checkTestIamPermissionsRequest(api.TestIamPermissionsRequest o) { |
717 buildCounterTestIamPermissionsRequest++; | 1177 buildCounterTestIamPermissionsRequest++; |
718 if (buildCounterTestIamPermissionsRequest < 3) { | 1178 if (buildCounterTestIamPermissionsRequest < 3) { |
719 checkUnnamed1567(o.permissions); | 1179 checkUnnamed1635(o.permissions); |
720 } | 1180 } |
721 buildCounterTestIamPermissionsRequest--; | 1181 buildCounterTestIamPermissionsRequest--; |
722 } | 1182 } |
723 | 1183 |
724 buildUnnamed1568() { | 1184 buildUnnamed1636() { |
725 var o = new core.List<core.String>(); | 1185 var o = new core.List<core.String>(); |
726 o.add("foo"); | 1186 o.add("foo"); |
727 o.add("foo"); | 1187 o.add("foo"); |
728 return o; | 1188 return o; |
729 } | 1189 } |
730 | 1190 |
731 checkUnnamed1568(core.List<core.String> o) { | 1191 checkUnnamed1636(core.List<core.String> o) { |
732 unittest.expect(o, unittest.hasLength(2)); | 1192 unittest.expect(o, unittest.hasLength(2)); |
733 unittest.expect(o[0], unittest.equals('foo')); | 1193 unittest.expect(o[0], unittest.equals('foo')); |
734 unittest.expect(o[1], unittest.equals('foo')); | 1194 unittest.expect(o[1], unittest.equals('foo')); |
735 } | 1195 } |
736 | 1196 |
737 core.int buildCounterTestIamPermissionsResponse = 0; | 1197 core.int buildCounterTestIamPermissionsResponse = 0; |
738 buildTestIamPermissionsResponse() { | 1198 buildTestIamPermissionsResponse() { |
739 var o = new api.TestIamPermissionsResponse(); | 1199 var o = new api.TestIamPermissionsResponse(); |
740 buildCounterTestIamPermissionsResponse++; | 1200 buildCounterTestIamPermissionsResponse++; |
741 if (buildCounterTestIamPermissionsResponse < 3) { | 1201 if (buildCounterTestIamPermissionsResponse < 3) { |
742 o.permissions = buildUnnamed1568(); | 1202 o.permissions = buildUnnamed1636(); |
743 } | 1203 } |
744 buildCounterTestIamPermissionsResponse--; | 1204 buildCounterTestIamPermissionsResponse--; |
745 return o; | 1205 return o; |
746 } | 1206 } |
747 | 1207 |
748 checkTestIamPermissionsResponse(api.TestIamPermissionsResponse o) { | 1208 checkTestIamPermissionsResponse(api.TestIamPermissionsResponse o) { |
749 buildCounterTestIamPermissionsResponse++; | 1209 buildCounterTestIamPermissionsResponse++; |
750 if (buildCounterTestIamPermissionsResponse < 3) { | 1210 if (buildCounterTestIamPermissionsResponse < 3) { |
751 checkUnnamed1568(o.permissions); | 1211 checkUnnamed1636(o.permissions); |
752 } | 1212 } |
753 buildCounterTestIamPermissionsResponse--; | 1213 buildCounterTestIamPermissionsResponse--; |
754 } | 1214 } |
755 | 1215 |
756 core.int buildCounterUndeleteProjectRequest = 0; | 1216 core.int buildCounterUndeleteProjectRequest = 0; |
757 buildUndeleteProjectRequest() { | 1217 buildUndeleteProjectRequest() { |
758 var o = new api.UndeleteProjectRequest(); | 1218 var o = new api.UndeleteProjectRequest(); |
759 buildCounterUndeleteProjectRequest++; | 1219 buildCounterUndeleteProjectRequest++; |
760 if (buildCounterUndeleteProjectRequest < 3) { | 1220 if (buildCounterUndeleteProjectRequest < 3) { |
761 } | 1221 } |
(...skipping 12 matching lines...) Expand all Loading... |
774 main() { | 1234 main() { |
775 unittest.group("obj-schema-Ancestor", () { | 1235 unittest.group("obj-schema-Ancestor", () { |
776 unittest.test("to-json--from-json", () { | 1236 unittest.test("to-json--from-json", () { |
777 var o = buildAncestor(); | 1237 var o = buildAncestor(); |
778 var od = new api.Ancestor.fromJson(o.toJson()); | 1238 var od = new api.Ancestor.fromJson(o.toJson()); |
779 checkAncestor(od); | 1239 checkAncestor(od); |
780 }); | 1240 }); |
781 }); | 1241 }); |
782 | 1242 |
783 | 1243 |
| 1244 unittest.group("obj-schema-AuditConfig", () { |
| 1245 unittest.test("to-json--from-json", () { |
| 1246 var o = buildAuditConfig(); |
| 1247 var od = new api.AuditConfig.fromJson(o.toJson()); |
| 1248 checkAuditConfig(od); |
| 1249 }); |
| 1250 }); |
| 1251 |
| 1252 |
| 1253 unittest.group("obj-schema-AuditLogConfig", () { |
| 1254 unittest.test("to-json--from-json", () { |
| 1255 var o = buildAuditLogConfig(); |
| 1256 var od = new api.AuditLogConfig.fromJson(o.toJson()); |
| 1257 checkAuditLogConfig(od); |
| 1258 }); |
| 1259 }); |
| 1260 |
| 1261 |
784 unittest.group("obj-schema-Binding", () { | 1262 unittest.group("obj-schema-Binding", () { |
785 unittest.test("to-json--from-json", () { | 1263 unittest.test("to-json--from-json", () { |
786 var o = buildBinding(); | 1264 var o = buildBinding(); |
787 var od = new api.Binding.fromJson(o.toJson()); | 1265 var od = new api.Binding.fromJson(o.toJson()); |
788 checkBinding(od); | 1266 checkBinding(od); |
789 }); | 1267 }); |
790 }); | 1268 }); |
791 | 1269 |
792 | 1270 |
| 1271 unittest.group("obj-schema-BooleanConstraint", () { |
| 1272 unittest.test("to-json--from-json", () { |
| 1273 var o = buildBooleanConstraint(); |
| 1274 var od = new api.BooleanConstraint.fromJson(o.toJson()); |
| 1275 checkBooleanConstraint(od); |
| 1276 }); |
| 1277 }); |
| 1278 |
| 1279 |
| 1280 unittest.group("obj-schema-BooleanPolicy", () { |
| 1281 unittest.test("to-json--from-json", () { |
| 1282 var o = buildBooleanPolicy(); |
| 1283 var od = new api.BooleanPolicy.fromJson(o.toJson()); |
| 1284 checkBooleanPolicy(od); |
| 1285 }); |
| 1286 }); |
| 1287 |
| 1288 |
| 1289 unittest.group("obj-schema-ClearOrgPolicyRequest", () { |
| 1290 unittest.test("to-json--from-json", () { |
| 1291 var o = buildClearOrgPolicyRequest(); |
| 1292 var od = new api.ClearOrgPolicyRequest.fromJson(o.toJson()); |
| 1293 checkClearOrgPolicyRequest(od); |
| 1294 }); |
| 1295 }); |
| 1296 |
| 1297 |
| 1298 unittest.group("obj-schema-Constraint", () { |
| 1299 unittest.test("to-json--from-json", () { |
| 1300 var o = buildConstraint(); |
| 1301 var od = new api.Constraint.fromJson(o.toJson()); |
| 1302 checkConstraint(od); |
| 1303 }); |
| 1304 }); |
| 1305 |
| 1306 |
793 unittest.group("obj-schema-Empty", () { | 1307 unittest.group("obj-schema-Empty", () { |
794 unittest.test("to-json--from-json", () { | 1308 unittest.test("to-json--from-json", () { |
795 var o = buildEmpty(); | 1309 var o = buildEmpty(); |
796 var od = new api.Empty.fromJson(o.toJson()); | 1310 var od = new api.Empty.fromJson(o.toJson()); |
797 checkEmpty(od); | 1311 checkEmpty(od); |
798 }); | 1312 }); |
799 }); | 1313 }); |
800 | 1314 |
801 | 1315 |
802 unittest.group("obj-schema-FolderOperation", () { | 1316 unittest.group("obj-schema-FolderOperation", () { |
(...skipping 25 matching lines...) Expand all Loading... |
828 | 1342 |
829 unittest.group("obj-schema-GetAncestryResponse", () { | 1343 unittest.group("obj-schema-GetAncestryResponse", () { |
830 unittest.test("to-json--from-json", () { | 1344 unittest.test("to-json--from-json", () { |
831 var o = buildGetAncestryResponse(); | 1345 var o = buildGetAncestryResponse(); |
832 var od = new api.GetAncestryResponse.fromJson(o.toJson()); | 1346 var od = new api.GetAncestryResponse.fromJson(o.toJson()); |
833 checkGetAncestryResponse(od); | 1347 checkGetAncestryResponse(od); |
834 }); | 1348 }); |
835 }); | 1349 }); |
836 | 1350 |
837 | 1351 |
| 1352 unittest.group("obj-schema-GetEffectiveOrgPolicyRequest", () { |
| 1353 unittest.test("to-json--from-json", () { |
| 1354 var o = buildGetEffectiveOrgPolicyRequest(); |
| 1355 var od = new api.GetEffectiveOrgPolicyRequest.fromJson(o.toJson()); |
| 1356 checkGetEffectiveOrgPolicyRequest(od); |
| 1357 }); |
| 1358 }); |
| 1359 |
| 1360 |
838 unittest.group("obj-schema-GetIamPolicyRequest", () { | 1361 unittest.group("obj-schema-GetIamPolicyRequest", () { |
839 unittest.test("to-json--from-json", () { | 1362 unittest.test("to-json--from-json", () { |
840 var o = buildGetIamPolicyRequest(); | 1363 var o = buildGetIamPolicyRequest(); |
841 var od = new api.GetIamPolicyRequest.fromJson(o.toJson()); | 1364 var od = new api.GetIamPolicyRequest.fromJson(o.toJson()); |
842 checkGetIamPolicyRequest(od); | 1365 checkGetIamPolicyRequest(od); |
843 }); | 1366 }); |
844 }); | 1367 }); |
845 | 1368 |
846 | 1369 |
| 1370 unittest.group("obj-schema-GetOrgPolicyRequest", () { |
| 1371 unittest.test("to-json--from-json", () { |
| 1372 var o = buildGetOrgPolicyRequest(); |
| 1373 var od = new api.GetOrgPolicyRequest.fromJson(o.toJson()); |
| 1374 checkGetOrgPolicyRequest(od); |
| 1375 }); |
| 1376 }); |
| 1377 |
| 1378 |
847 unittest.group("obj-schema-Lien", () { | 1379 unittest.group("obj-schema-Lien", () { |
848 unittest.test("to-json--from-json", () { | 1380 unittest.test("to-json--from-json", () { |
849 var o = buildLien(); | 1381 var o = buildLien(); |
850 var od = new api.Lien.fromJson(o.toJson()); | 1382 var od = new api.Lien.fromJson(o.toJson()); |
851 checkLien(od); | 1383 checkLien(od); |
852 }); | 1384 }); |
853 }); | 1385 }); |
854 | 1386 |
855 | 1387 |
| 1388 unittest.group("obj-schema-ListAvailableOrgPolicyConstraintsRequest", () { |
| 1389 unittest.test("to-json--from-json", () { |
| 1390 var o = buildListAvailableOrgPolicyConstraintsRequest(); |
| 1391 var od = new api.ListAvailableOrgPolicyConstraintsRequest.fromJson(o.toJso
n()); |
| 1392 checkListAvailableOrgPolicyConstraintsRequest(od); |
| 1393 }); |
| 1394 }); |
| 1395 |
| 1396 |
| 1397 unittest.group("obj-schema-ListAvailableOrgPolicyConstraintsResponse", () { |
| 1398 unittest.test("to-json--from-json", () { |
| 1399 var o = buildListAvailableOrgPolicyConstraintsResponse(); |
| 1400 var od = new api.ListAvailableOrgPolicyConstraintsResponse.fromJson(o.toJs
on()); |
| 1401 checkListAvailableOrgPolicyConstraintsResponse(od); |
| 1402 }); |
| 1403 }); |
| 1404 |
| 1405 |
| 1406 unittest.group("obj-schema-ListConstraint", () { |
| 1407 unittest.test("to-json--from-json", () { |
| 1408 var o = buildListConstraint(); |
| 1409 var od = new api.ListConstraint.fromJson(o.toJson()); |
| 1410 checkListConstraint(od); |
| 1411 }); |
| 1412 }); |
| 1413 |
| 1414 |
856 unittest.group("obj-schema-ListLiensResponse", () { | 1415 unittest.group("obj-schema-ListLiensResponse", () { |
857 unittest.test("to-json--from-json", () { | 1416 unittest.test("to-json--from-json", () { |
858 var o = buildListLiensResponse(); | 1417 var o = buildListLiensResponse(); |
859 var od = new api.ListLiensResponse.fromJson(o.toJson()); | 1418 var od = new api.ListLiensResponse.fromJson(o.toJson()); |
860 checkListLiensResponse(od); | 1419 checkListLiensResponse(od); |
861 }); | 1420 }); |
862 }); | 1421 }); |
863 | 1422 |
864 | 1423 |
| 1424 unittest.group("obj-schema-ListOrgPoliciesRequest", () { |
| 1425 unittest.test("to-json--from-json", () { |
| 1426 var o = buildListOrgPoliciesRequest(); |
| 1427 var od = new api.ListOrgPoliciesRequest.fromJson(o.toJson()); |
| 1428 checkListOrgPoliciesRequest(od); |
| 1429 }); |
| 1430 }); |
| 1431 |
| 1432 |
| 1433 unittest.group("obj-schema-ListOrgPoliciesResponse", () { |
| 1434 unittest.test("to-json--from-json", () { |
| 1435 var o = buildListOrgPoliciesResponse(); |
| 1436 var od = new api.ListOrgPoliciesResponse.fromJson(o.toJson()); |
| 1437 checkListOrgPoliciesResponse(od); |
| 1438 }); |
| 1439 }); |
| 1440 |
| 1441 |
| 1442 unittest.group("obj-schema-ListPolicy", () { |
| 1443 unittest.test("to-json--from-json", () { |
| 1444 var o = buildListPolicy(); |
| 1445 var od = new api.ListPolicy.fromJson(o.toJson()); |
| 1446 checkListPolicy(od); |
| 1447 }); |
| 1448 }); |
| 1449 |
| 1450 |
865 unittest.group("obj-schema-ListProjectsResponse", () { | 1451 unittest.group("obj-schema-ListProjectsResponse", () { |
866 unittest.test("to-json--from-json", () { | 1452 unittest.test("to-json--from-json", () { |
867 var o = buildListProjectsResponse(); | 1453 var o = buildListProjectsResponse(); |
868 var od = new api.ListProjectsResponse.fromJson(o.toJson()); | 1454 var od = new api.ListProjectsResponse.fromJson(o.toJson()); |
869 checkListProjectsResponse(od); | 1455 checkListProjectsResponse(od); |
870 }); | 1456 }); |
871 }); | 1457 }); |
872 | 1458 |
873 | 1459 |
874 unittest.group("obj-schema-Operation", () { | 1460 unittest.group("obj-schema-Operation", () { |
875 unittest.test("to-json--from-json", () { | 1461 unittest.test("to-json--from-json", () { |
876 var o = buildOperation(); | 1462 var o = buildOperation(); |
877 var od = new api.Operation.fromJson(o.toJson()); | 1463 var od = new api.Operation.fromJson(o.toJson()); |
878 checkOperation(od); | 1464 checkOperation(od); |
879 }); | 1465 }); |
880 }); | 1466 }); |
881 | 1467 |
882 | 1468 |
| 1469 unittest.group("obj-schema-OrgPolicy", () { |
| 1470 unittest.test("to-json--from-json", () { |
| 1471 var o = buildOrgPolicy(); |
| 1472 var od = new api.OrgPolicy.fromJson(o.toJson()); |
| 1473 checkOrgPolicy(od); |
| 1474 }); |
| 1475 }); |
| 1476 |
| 1477 |
883 unittest.group("obj-schema-Organization", () { | 1478 unittest.group("obj-schema-Organization", () { |
884 unittest.test("to-json--from-json", () { | 1479 unittest.test("to-json--from-json", () { |
885 var o = buildOrganization(); | 1480 var o = buildOrganization(); |
886 var od = new api.Organization.fromJson(o.toJson()); | 1481 var od = new api.Organization.fromJson(o.toJson()); |
887 checkOrganization(od); | 1482 checkOrganization(od); |
888 }); | 1483 }); |
889 }); | 1484 }); |
890 | 1485 |
891 | 1486 |
892 unittest.group("obj-schema-OrganizationOwner", () { | 1487 unittest.group("obj-schema-OrganizationOwner", () { |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
927 | 1522 |
928 unittest.group("obj-schema-ResourceId", () { | 1523 unittest.group("obj-schema-ResourceId", () { |
929 unittest.test("to-json--from-json", () { | 1524 unittest.test("to-json--from-json", () { |
930 var o = buildResourceId(); | 1525 var o = buildResourceId(); |
931 var od = new api.ResourceId.fromJson(o.toJson()); | 1526 var od = new api.ResourceId.fromJson(o.toJson()); |
932 checkResourceId(od); | 1527 checkResourceId(od); |
933 }); | 1528 }); |
934 }); | 1529 }); |
935 | 1530 |
936 | 1531 |
| 1532 unittest.group("obj-schema-RestoreDefault", () { |
| 1533 unittest.test("to-json--from-json", () { |
| 1534 var o = buildRestoreDefault(); |
| 1535 var od = new api.RestoreDefault.fromJson(o.toJson()); |
| 1536 checkRestoreDefault(od); |
| 1537 }); |
| 1538 }); |
| 1539 |
| 1540 |
937 unittest.group("obj-schema-SearchOrganizationsRequest", () { | 1541 unittest.group("obj-schema-SearchOrganizationsRequest", () { |
938 unittest.test("to-json--from-json", () { | 1542 unittest.test("to-json--from-json", () { |
939 var o = buildSearchOrganizationsRequest(); | 1543 var o = buildSearchOrganizationsRequest(); |
940 var od = new api.SearchOrganizationsRequest.fromJson(o.toJson()); | 1544 var od = new api.SearchOrganizationsRequest.fromJson(o.toJson()); |
941 checkSearchOrganizationsRequest(od); | 1545 checkSearchOrganizationsRequest(od); |
942 }); | 1546 }); |
943 }); | 1547 }); |
944 | 1548 |
945 | 1549 |
946 unittest.group("obj-schema-SearchOrganizationsResponse", () { | 1550 unittest.group("obj-schema-SearchOrganizationsResponse", () { |
947 unittest.test("to-json--from-json", () { | 1551 unittest.test("to-json--from-json", () { |
948 var o = buildSearchOrganizationsResponse(); | 1552 var o = buildSearchOrganizationsResponse(); |
949 var od = new api.SearchOrganizationsResponse.fromJson(o.toJson()); | 1553 var od = new api.SearchOrganizationsResponse.fromJson(o.toJson()); |
950 checkSearchOrganizationsResponse(od); | 1554 checkSearchOrganizationsResponse(od); |
951 }); | 1555 }); |
952 }); | 1556 }); |
953 | 1557 |
954 | 1558 |
955 unittest.group("obj-schema-SetIamPolicyRequest", () { | 1559 unittest.group("obj-schema-SetIamPolicyRequest", () { |
956 unittest.test("to-json--from-json", () { | 1560 unittest.test("to-json--from-json", () { |
957 var o = buildSetIamPolicyRequest(); | 1561 var o = buildSetIamPolicyRequest(); |
958 var od = new api.SetIamPolicyRequest.fromJson(o.toJson()); | 1562 var od = new api.SetIamPolicyRequest.fromJson(o.toJson()); |
959 checkSetIamPolicyRequest(od); | 1563 checkSetIamPolicyRequest(od); |
960 }); | 1564 }); |
961 }); | 1565 }); |
962 | 1566 |
963 | 1567 |
| 1568 unittest.group("obj-schema-SetOrgPolicyRequest", () { |
| 1569 unittest.test("to-json--from-json", () { |
| 1570 var o = buildSetOrgPolicyRequest(); |
| 1571 var od = new api.SetOrgPolicyRequest.fromJson(o.toJson()); |
| 1572 checkSetOrgPolicyRequest(od); |
| 1573 }); |
| 1574 }); |
| 1575 |
| 1576 |
964 unittest.group("obj-schema-Status", () { | 1577 unittest.group("obj-schema-Status", () { |
965 unittest.test("to-json--from-json", () { | 1578 unittest.test("to-json--from-json", () { |
966 var o = buildStatus(); | 1579 var o = buildStatus(); |
967 var od = new api.Status.fromJson(o.toJson()); | 1580 var od = new api.Status.fromJson(o.toJson()); |
968 checkStatus(od); | 1581 checkStatus(od); |
969 }); | 1582 }); |
970 }); | 1583 }); |
971 | 1584 |
972 | 1585 |
973 unittest.group("obj-schema-TestIamPermissionsRequest", () { | 1586 unittest.group("obj-schema-TestIamPermissionsRequest", () { |
(...skipping 16 matching lines...) Expand all Loading... |
990 | 1603 |
991 unittest.group("obj-schema-UndeleteProjectRequest", () { | 1604 unittest.group("obj-schema-UndeleteProjectRequest", () { |
992 unittest.test("to-json--from-json", () { | 1605 unittest.test("to-json--from-json", () { |
993 var o = buildUndeleteProjectRequest(); | 1606 var o = buildUndeleteProjectRequest(); |
994 var od = new api.UndeleteProjectRequest.fromJson(o.toJson()); | 1607 var od = new api.UndeleteProjectRequest.fromJson(o.toJson()); |
995 checkUndeleteProjectRequest(od); | 1608 checkUndeleteProjectRequest(od); |
996 }); | 1609 }); |
997 }); | 1610 }); |
998 | 1611 |
999 | 1612 |
1000 unittest.group("resource-LiensResourceApi", () { | 1613 unittest.group("resource-FoldersResourceApi", () { |
1001 unittest.test("method--create", () { | 1614 unittest.test("method--clearOrgPolicy", () { |
1002 | 1615 |
1003 var mock = new HttpServerMock(); | 1616 var mock = new HttpServerMock(); |
1004 api.LiensResourceApi res = new api.CloudresourcemanagerApi(mock).liens; | 1617 api.FoldersResourceApi res = new api.CloudresourcemanagerApi(mock).folders
; |
1005 var arg_request = buildLien(); | 1618 var arg_request = buildClearOrgPolicyRequest(); |
| 1619 var arg_resource = "foo"; |
1006 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1620 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1007 var obj = new api.Lien.fromJson(json); | 1621 var obj = new api.ClearOrgPolicyRequest.fromJson(json); |
1008 checkLien(obj); | 1622 checkClearOrgPolicyRequest(obj); |
1009 | 1623 |
1010 var path = (req.url).path; | 1624 var path = (req.url).path; |
1011 var pathOffset = 0; | 1625 var pathOffset = 0; |
1012 var index; | 1626 var index; |
1013 var subPart; | 1627 var subPart; |
1014 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1628 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
1015 pathOffset += 1; | 1629 pathOffset += 1; |
1016 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1/liens")); | 1630 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); |
1017 pathOffset += 8; | 1631 pathOffset += 3; |
| 1632 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
1018 | 1633 |
1019 var query = (req.url).query; | 1634 var query = (req.url).query; |
1020 var queryOffset = 0; | 1635 var queryOffset = 0; |
1021 var queryMap = {}; | 1636 var queryMap = {}; |
1022 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 1637 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
1023 parseBool(n) { | 1638 parseBool(n) { |
1024 if (n == "true") return true; | 1639 if (n == "true") return true; |
1025 if (n == "false") return false; | 1640 if (n == "false") return false; |
1026 if (n == null) return null; | 1641 if (n == null) return null; |
1027 throw new core.ArgumentError("Invalid boolean: $n"); | 1642 throw new core.ArgumentError("Invalid boolean: $n"); |
1028 } | 1643 } |
1029 if (query.length > 0) { | 1644 if (query.length > 0) { |
1030 for (var part in query.split("&")) { | 1645 for (var part in query.split("&")) { |
1031 var keyvalue = part.split("="); | 1646 var keyvalue = part.split("="); |
1032 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1647 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
1033 } | 1648 } |
1034 } | 1649 } |
1035 | 1650 |
1036 | 1651 |
1037 var h = { | 1652 var h = { |
1038 "content-type" : "application/json; charset=utf-8", | 1653 "content-type" : "application/json; charset=utf-8", |
1039 }; | 1654 }; |
1040 var resp = convert.JSON.encode(buildLien()); | 1655 var resp = convert.JSON.encode(buildEmpty()); |
1041 return new async.Future.value(stringResponse(200, h, resp)); | 1656 return new async.Future.value(stringResponse(200, h, resp)); |
1042 }), true); | 1657 }), true); |
1043 res.create(arg_request).then(unittest.expectAsync(((api.Lien response) { | 1658 res.clearOrgPolicy(arg_request, arg_resource).then(unittest.expectAsync(((
api.Empty response) { |
1044 checkLien(response); | 1659 checkEmpty(response); |
1045 }))); | 1660 }))); |
1046 }); | 1661 }); |
1047 | 1662 |
1048 unittest.test("method--delete", () { | 1663 unittest.test("method--clearOrgPolicyV1", () { |
1049 | 1664 |
1050 var mock = new HttpServerMock(); | 1665 var mock = new HttpServerMock(); |
1051 api.LiensResourceApi res = new api.CloudresourcemanagerApi(mock).liens; | 1666 api.FoldersResourceApi res = new api.CloudresourcemanagerApi(mock).folders
; |
1052 var arg_name = "foo"; | 1667 var arg_request = buildClearOrgPolicyRequest(); |
| 1668 var arg_resource = "foo"; |
1053 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1669 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 1670 var obj = new api.ClearOrgPolicyRequest.fromJson(json); |
| 1671 checkClearOrgPolicyRequest(obj); |
| 1672 |
1054 var path = (req.url).path; | 1673 var path = (req.url).path; |
1055 var pathOffset = 0; | 1674 var pathOffset = 0; |
1056 var index; | 1675 var index; |
1057 var subPart; | 1676 var subPart; |
1058 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1677 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
1059 pathOffset += 1; | 1678 pathOffset += 1; |
1060 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); | 1679 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); |
1061 pathOffset += 3; | 1680 pathOffset += 3; |
1062 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 1681 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
1063 | 1682 |
(...skipping 14 matching lines...) Expand all Loading... |
1078 } | 1697 } |
1079 } | 1698 } |
1080 | 1699 |
1081 | 1700 |
1082 var h = { | 1701 var h = { |
1083 "content-type" : "application/json; charset=utf-8", | 1702 "content-type" : "application/json; charset=utf-8", |
1084 }; | 1703 }; |
1085 var resp = convert.JSON.encode(buildEmpty()); | 1704 var resp = convert.JSON.encode(buildEmpty()); |
1086 return new async.Future.value(stringResponse(200, h, resp)); | 1705 return new async.Future.value(stringResponse(200, h, resp)); |
1087 }), true); | 1706 }), true); |
1088 res.delete(arg_name).then(unittest.expectAsync(((api.Empty response) { | 1707 res.clearOrgPolicyV1(arg_request, arg_resource).then(unittest.expectAsync(
((api.Empty response) { |
1089 checkEmpty(response); | 1708 checkEmpty(response); |
1090 }))); | 1709 }))); |
1091 }); | 1710 }); |
1092 | 1711 |
1093 unittest.test("method--list", () { | 1712 unittest.test("method--getEffectiveOrgPolicy", () { |
1094 | 1713 |
1095 var mock = new HttpServerMock(); | 1714 var mock = new HttpServerMock(); |
1096 api.LiensResourceApi res = new api.CloudresourcemanagerApi(mock).liens; | 1715 api.FoldersResourceApi res = new api.CloudresourcemanagerApi(mock).folders
; |
1097 var arg_parent = "foo"; | 1716 var arg_request = buildGetEffectiveOrgPolicyRequest(); |
1098 var arg_pageToken = "foo"; | 1717 var arg_resource = "foo"; |
1099 var arg_pageSize = 42; | |
1100 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1718 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 1719 var obj = new api.GetEffectiveOrgPolicyRequest.fromJson(json); |
| 1720 checkGetEffectiveOrgPolicyRequest(obj); |
| 1721 |
1101 var path = (req.url).path; | 1722 var path = (req.url).path; |
1102 var pathOffset = 0; | 1723 var pathOffset = 0; |
1103 var index; | 1724 var index; |
1104 var subPart; | 1725 var subPart; |
1105 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1726 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
1106 pathOffset += 1; | 1727 pathOffset += 1; |
1107 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1/liens")); | 1728 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); |
1108 pathOffset += 8; | 1729 pathOffset += 3; |
| 1730 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
1109 | 1731 |
1110 var query = (req.url).query; | 1732 var query = (req.url).query; |
1111 var queryOffset = 0; | 1733 var queryOffset = 0; |
1112 var queryMap = {}; | 1734 var queryMap = {}; |
1113 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 1735 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
1114 parseBool(n) { | 1736 parseBool(n) { |
1115 if (n == "true") return true; | 1737 if (n == "true") return true; |
1116 if (n == "false") return false; | 1738 if (n == "false") return false; |
1117 if (n == null) return null; | 1739 if (n == null) return null; |
1118 throw new core.ArgumentError("Invalid boolean: $n"); | 1740 throw new core.ArgumentError("Invalid boolean: $n"); |
1119 } | 1741 } |
1120 if (query.length > 0) { | 1742 if (query.length > 0) { |
1121 for (var part in query.split("&")) { | 1743 for (var part in query.split("&")) { |
1122 var keyvalue = part.split("="); | 1744 var keyvalue = part.split("="); |
1123 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1745 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
1124 } | 1746 } |
1125 } | 1747 } |
1126 unittest.expect(queryMap["parent"].first, unittest.equals(arg_parent)); | |
1127 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
1128 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); | |
1129 | 1748 |
1130 | 1749 |
1131 var h = { | 1750 var h = { |
1132 "content-type" : "application/json; charset=utf-8", | 1751 "content-type" : "application/json; charset=utf-8", |
1133 }; | 1752 }; |
1134 var resp = convert.JSON.encode(buildListLiensResponse()); | 1753 var resp = convert.JSON.encode(buildOrgPolicy()); |
1135 return new async.Future.value(stringResponse(200, h, resp)); | 1754 return new async.Future.value(stringResponse(200, h, resp)); |
1136 }), true); | 1755 }), true); |
1137 res.list(parent: arg_parent, pageToken: arg_pageToken, pageSize: arg_pageS
ize).then(unittest.expectAsync(((api.ListLiensResponse response) { | 1756 res.getEffectiveOrgPolicy(arg_request, arg_resource).then(unittest.expectA
sync(((api.OrgPolicy response) { |
1138 checkListLiensResponse(response); | 1757 checkOrgPolicy(response); |
1139 }))); | 1758 }))); |
1140 }); | 1759 }); |
1141 | 1760 |
1142 }); | 1761 unittest.test("method--getEffectiveOrgPolicyV1", () { |
1143 | |
1144 | |
1145 unittest.group("resource-OperationsResourceApi", () { | |
1146 unittest.test("method--get", () { | |
1147 | 1762 |
1148 var mock = new HttpServerMock(); | 1763 var mock = new HttpServerMock(); |
1149 api.OperationsResourceApi res = new api.CloudresourcemanagerApi(mock).oper
ations; | 1764 api.FoldersResourceApi res = new api.CloudresourcemanagerApi(mock).folders
; |
1150 var arg_name = "foo"; | 1765 var arg_request = buildGetEffectiveOrgPolicyRequest(); |
| 1766 var arg_resource = "foo"; |
1151 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1767 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 1768 var obj = new api.GetEffectiveOrgPolicyRequest.fromJson(json); |
| 1769 checkGetEffectiveOrgPolicyRequest(obj); |
| 1770 |
1152 var path = (req.url).path; | 1771 var path = (req.url).path; |
1153 var pathOffset = 0; | 1772 var pathOffset = 0; |
1154 var index; | 1773 var index; |
1155 var subPart; | 1774 var subPart; |
1156 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1775 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
1157 pathOffset += 1; | 1776 pathOffset += 1; |
1158 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); | 1777 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); |
1159 pathOffset += 3; | 1778 pathOffset += 3; |
1160 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 1779 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
1161 | 1780 |
(...skipping 11 matching lines...) Expand all Loading... |
1173 for (var part in query.split("&")) { | 1792 for (var part in query.split("&")) { |
1174 var keyvalue = part.split("="); | 1793 var keyvalue = part.split("="); |
1175 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1794 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
1176 } | 1795 } |
1177 } | 1796 } |
1178 | 1797 |
1179 | 1798 |
1180 var h = { | 1799 var h = { |
1181 "content-type" : "application/json; charset=utf-8", | 1800 "content-type" : "application/json; charset=utf-8", |
1182 }; | 1801 }; |
1183 var resp = convert.JSON.encode(buildOperation()); | 1802 var resp = convert.JSON.encode(buildOrgPolicy()); |
1184 return new async.Future.value(stringResponse(200, h, resp)); | 1803 return new async.Future.value(stringResponse(200, h, resp)); |
1185 }), true); | 1804 }), true); |
1186 res.get(arg_name).then(unittest.expectAsync(((api.Operation response) { | 1805 res.getEffectiveOrgPolicyV1(arg_request, arg_resource).then(unittest.expec
tAsync(((api.OrgPolicy response) { |
1187 checkOperation(response); | 1806 checkOrgPolicy(response); |
1188 }))); | 1807 }))); |
1189 }); | 1808 }); |
1190 | 1809 |
1191 }); | 1810 unittest.test("method--getOrgPolicy", () { |
1192 | |
1193 | |
1194 unittest.group("resource-OrganizationsResourceApi", () { | |
1195 unittest.test("method--get", () { | |
1196 | 1811 |
1197 var mock = new HttpServerMock(); | 1812 var mock = new HttpServerMock(); |
1198 api.OrganizationsResourceApi res = new api.CloudresourcemanagerApi(mock).o
rganizations; | 1813 api.FoldersResourceApi res = new api.CloudresourcemanagerApi(mock).folders
; |
1199 var arg_name = "foo"; | 1814 var arg_request = buildGetOrgPolicyRequest(); |
| 1815 var arg_resource = "foo"; |
1200 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1816 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 1817 var obj = new api.GetOrgPolicyRequest.fromJson(json); |
| 1818 checkGetOrgPolicyRequest(obj); |
| 1819 |
1201 var path = (req.url).path; | 1820 var path = (req.url).path; |
1202 var pathOffset = 0; | 1821 var pathOffset = 0; |
1203 var index; | 1822 var index; |
1204 var subPart; | 1823 var subPart; |
1205 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1824 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
1206 pathOffset += 1; | 1825 pathOffset += 1; |
1207 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); | 1826 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); |
1208 pathOffset += 3; | 1827 pathOffset += 3; |
1209 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 1828 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
1210 | 1829 |
(...skipping 11 matching lines...) Expand all Loading... |
1222 for (var part in query.split("&")) { | 1841 for (var part in query.split("&")) { |
1223 var keyvalue = part.split("="); | 1842 var keyvalue = part.split("="); |
1224 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1843 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
1225 } | 1844 } |
1226 } | 1845 } |
1227 | 1846 |
1228 | 1847 |
1229 var h = { | 1848 var h = { |
1230 "content-type" : "application/json; charset=utf-8", | 1849 "content-type" : "application/json; charset=utf-8", |
1231 }; | 1850 }; |
1232 var resp = convert.JSON.encode(buildOrganization()); | 1851 var resp = convert.JSON.encode(buildOrgPolicy()); |
1233 return new async.Future.value(stringResponse(200, h, resp)); | 1852 return new async.Future.value(stringResponse(200, h, resp)); |
1234 }), true); | 1853 }), true); |
1235 res.get(arg_name).then(unittest.expectAsync(((api.Organization response) { | 1854 res.getOrgPolicy(arg_request, arg_resource).then(unittest.expectAsync(((ap
i.OrgPolicy response) { |
1236 checkOrganization(response); | 1855 checkOrgPolicy(response); |
1237 }))); | 1856 }))); |
1238 }); | 1857 }); |
1239 | 1858 |
1240 unittest.test("method--getIamPolicy", () { | 1859 unittest.test("method--getOrgPolicyV1", () { |
1241 | 1860 |
1242 var mock = new HttpServerMock(); | 1861 var mock = new HttpServerMock(); |
1243 api.OrganizationsResourceApi res = new api.CloudresourcemanagerApi(mock).o
rganizations; | 1862 api.FoldersResourceApi res = new api.CloudresourcemanagerApi(mock).folders
; |
1244 var arg_request = buildGetIamPolicyRequest(); | 1863 var arg_request = buildGetOrgPolicyRequest(); |
1245 var arg_resource = "foo"; | 1864 var arg_resource = "foo"; |
1246 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1865 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1247 var obj = new api.GetIamPolicyRequest.fromJson(json); | 1866 var obj = new api.GetOrgPolicyRequest.fromJson(json); |
1248 checkGetIamPolicyRequest(obj); | 1867 checkGetOrgPolicyRequest(obj); |
1249 | 1868 |
1250 var path = (req.url).path; | 1869 var path = (req.url).path; |
1251 var pathOffset = 0; | 1870 var pathOffset = 0; |
1252 var index; | 1871 var index; |
1253 var subPart; | 1872 var subPart; |
1254 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1873 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
1255 pathOffset += 1; | 1874 pathOffset += 1; |
1256 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); | 1875 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); |
1257 pathOffset += 3; | 1876 pathOffset += 3; |
1258 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 1877 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
(...skipping 12 matching lines...) Expand all Loading... |
1271 for (var part in query.split("&")) { | 1890 for (var part in query.split("&")) { |
1272 var keyvalue = part.split("="); | 1891 var keyvalue = part.split("="); |
1273 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1892 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
1274 } | 1893 } |
1275 } | 1894 } |
1276 | 1895 |
1277 | 1896 |
1278 var h = { | 1897 var h = { |
1279 "content-type" : "application/json; charset=utf-8", | 1898 "content-type" : "application/json; charset=utf-8", |
1280 }; | 1899 }; |
1281 var resp = convert.JSON.encode(buildPolicy()); | 1900 var resp = convert.JSON.encode(buildOrgPolicy()); |
1282 return new async.Future.value(stringResponse(200, h, resp)); | 1901 return new async.Future.value(stringResponse(200, h, resp)); |
1283 }), true); | 1902 }), true); |
1284 res.getIamPolicy(arg_request, arg_resource).then(unittest.expectAsync(((ap
i.Policy response) { | 1903 res.getOrgPolicyV1(arg_request, arg_resource).then(unittest.expectAsync(((
api.OrgPolicy response) { |
1285 checkPolicy(response); | 1904 checkOrgPolicy(response); |
1286 }))); | 1905 }))); |
1287 }); | 1906 }); |
1288 | 1907 |
1289 unittest.test("method--search", () { | 1908 unittest.test("method--listAvailableOrgPolicyConstraints", () { |
1290 | 1909 |
1291 var mock = new HttpServerMock(); | 1910 var mock = new HttpServerMock(); |
1292 api.OrganizationsResourceApi res = new api.CloudresourcemanagerApi(mock).o
rganizations; | 1911 api.FoldersResourceApi res = new api.CloudresourcemanagerApi(mock).folders
; |
1293 var arg_request = buildSearchOrganizationsRequest(); | 1912 var arg_request = buildListAvailableOrgPolicyConstraintsRequest(); |
| 1913 var arg_resource = "foo"; |
1294 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1914 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1295 var obj = new api.SearchOrganizationsRequest.fromJson(json); | 1915 var obj = new api.ListAvailableOrgPolicyConstraintsRequest.fromJson(json
); |
1296 checkSearchOrganizationsRequest(obj); | 1916 checkListAvailableOrgPolicyConstraintsRequest(obj); |
1297 | 1917 |
1298 var path = (req.url).path; | 1918 var path = (req.url).path; |
1299 var pathOffset = 0; | 1919 var pathOffset = 0; |
1300 var index; | 1920 var index; |
1301 var subPart; | 1921 var subPart; |
1302 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1922 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
1303 pathOffset += 1; | 1923 pathOffset += 1; |
1304 unittest.expect(path.substring(pathOffset, pathOffset + 23), unittest.eq
uals("v1/organizations:search")); | 1924 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); |
1305 pathOffset += 23; | 1925 pathOffset += 3; |
| 1926 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
1306 | 1927 |
1307 var query = (req.url).query; | 1928 var query = (req.url).query; |
1308 var queryOffset = 0; | 1929 var queryOffset = 0; |
1309 var queryMap = {}; | 1930 var queryMap = {}; |
1310 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 1931 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
1311 parseBool(n) { | 1932 parseBool(n) { |
1312 if (n == "true") return true; | 1933 if (n == "true") return true; |
1313 if (n == "false") return false; | 1934 if (n == "false") return false; |
1314 if (n == null) return null; | 1935 if (n == null) return null; |
1315 throw new core.ArgumentError("Invalid boolean: $n"); | 1936 throw new core.ArgumentError("Invalid boolean: $n"); |
1316 } | 1937 } |
1317 if (query.length > 0) { | 1938 if (query.length > 0) { |
1318 for (var part in query.split("&")) { | 1939 for (var part in query.split("&")) { |
1319 var keyvalue = part.split("="); | 1940 var keyvalue = part.split("="); |
1320 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1941 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
1321 } | 1942 } |
1322 } | 1943 } |
1323 | 1944 |
1324 | 1945 |
1325 var h = { | 1946 var h = { |
1326 "content-type" : "application/json; charset=utf-8", | 1947 "content-type" : "application/json; charset=utf-8", |
1327 }; | 1948 }; |
1328 var resp = convert.JSON.encode(buildSearchOrganizationsResponse()); | 1949 var resp = convert.JSON.encode(buildListAvailableOrgPolicyConstraintsRes
ponse()); |
1329 return new async.Future.value(stringResponse(200, h, resp)); | 1950 return new async.Future.value(stringResponse(200, h, resp)); |
1330 }), true); | 1951 }), true); |
1331 res.search(arg_request).then(unittest.expectAsync(((api.SearchOrganization
sResponse response) { | 1952 res.listAvailableOrgPolicyConstraints(arg_request, arg_resource).then(unit
test.expectAsync(((api.ListAvailableOrgPolicyConstraintsResponse response) { |
1332 checkSearchOrganizationsResponse(response); | 1953 checkListAvailableOrgPolicyConstraintsResponse(response); |
1333 }))); | 1954 }))); |
1334 }); | 1955 }); |
1335 | 1956 |
1336 unittest.test("method--setIamPolicy", () { | 1957 unittest.test("method--listOrgPolicies", () { |
1337 | 1958 |
1338 var mock = new HttpServerMock(); | 1959 var mock = new HttpServerMock(); |
1339 api.OrganizationsResourceApi res = new api.CloudresourcemanagerApi(mock).o
rganizations; | 1960 api.FoldersResourceApi res = new api.CloudresourcemanagerApi(mock).folders
; |
1340 var arg_request = buildSetIamPolicyRequest(); | 1961 var arg_request = buildListOrgPoliciesRequest(); |
1341 var arg_resource = "foo"; | 1962 var arg_resource = "foo"; |
1342 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1963 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1343 var obj = new api.SetIamPolicyRequest.fromJson(json); | 1964 var obj = new api.ListOrgPoliciesRequest.fromJson(json); |
1344 checkSetIamPolicyRequest(obj); | 1965 checkListOrgPoliciesRequest(obj); |
1345 | 1966 |
1346 var path = (req.url).path; | 1967 var path = (req.url).path; |
1347 var pathOffset = 0; | 1968 var pathOffset = 0; |
1348 var index; | 1969 var index; |
1349 var subPart; | 1970 var subPart; |
1350 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1971 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
1351 pathOffset += 1; | 1972 pathOffset += 1; |
1352 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); | 1973 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); |
1353 pathOffset += 3; | 1974 pathOffset += 3; |
1354 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 1975 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
(...skipping 12 matching lines...) Expand all Loading... |
1367 for (var part in query.split("&")) { | 1988 for (var part in query.split("&")) { |
1368 var keyvalue = part.split("="); | 1989 var keyvalue = part.split("="); |
1369 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1990 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
1370 } | 1991 } |
1371 } | 1992 } |
1372 | 1993 |
1373 | 1994 |
1374 var h = { | 1995 var h = { |
1375 "content-type" : "application/json; charset=utf-8", | 1996 "content-type" : "application/json; charset=utf-8", |
1376 }; | 1997 }; |
1377 var resp = convert.JSON.encode(buildPolicy()); | 1998 var resp = convert.JSON.encode(buildListOrgPoliciesResponse()); |
1378 return new async.Future.value(stringResponse(200, h, resp)); | 1999 return new async.Future.value(stringResponse(200, h, resp)); |
1379 }), true); | 2000 }), true); |
1380 res.setIamPolicy(arg_request, arg_resource).then(unittest.expectAsync(((ap
i.Policy response) { | 2001 res.listOrgPolicies(arg_request, arg_resource).then(unittest.expectAsync((
(api.ListOrgPoliciesResponse response) { |
1381 checkPolicy(response); | 2002 checkListOrgPoliciesResponse(response); |
1382 }))); | 2003 }))); |
1383 }); | 2004 }); |
1384 | 2005 |
1385 unittest.test("method--testIamPermissions", () { | 2006 unittest.test("method--setOrgPolicy", () { |
1386 | 2007 |
1387 var mock = new HttpServerMock(); | 2008 var mock = new HttpServerMock(); |
1388 api.OrganizationsResourceApi res = new api.CloudresourcemanagerApi(mock).o
rganizations; | 2009 api.FoldersResourceApi res = new api.CloudresourcemanagerApi(mock).folders
; |
1389 var arg_request = buildTestIamPermissionsRequest(); | 2010 var arg_request = buildSetOrgPolicyRequest(); |
1390 var arg_resource = "foo"; | 2011 var arg_resource = "foo"; |
1391 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2012 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1392 var obj = new api.TestIamPermissionsRequest.fromJson(json); | 2013 var obj = new api.SetOrgPolicyRequest.fromJson(json); |
1393 checkTestIamPermissionsRequest(obj); | 2014 checkSetOrgPolicyRequest(obj); |
1394 | 2015 |
1395 var path = (req.url).path; | 2016 var path = (req.url).path; |
1396 var pathOffset = 0; | 2017 var pathOffset = 0; |
1397 var index; | 2018 var index; |
1398 var subPart; | 2019 var subPart; |
1399 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2020 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
1400 pathOffset += 1; | 2021 pathOffset += 1; |
1401 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); | 2022 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); |
1402 pathOffset += 3; | 2023 pathOffset += 3; |
1403 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 2024 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
(...skipping 12 matching lines...) Expand all Loading... |
1416 for (var part in query.split("&")) { | 2037 for (var part in query.split("&")) { |
1417 var keyvalue = part.split("="); | 2038 var keyvalue = part.split("="); |
1418 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2039 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
1419 } | 2040 } |
1420 } | 2041 } |
1421 | 2042 |
1422 | 2043 |
1423 var h = { | 2044 var h = { |
1424 "content-type" : "application/json; charset=utf-8", | 2045 "content-type" : "application/json; charset=utf-8", |
1425 }; | 2046 }; |
1426 var resp = convert.JSON.encode(buildTestIamPermissionsResponse()); | 2047 var resp = convert.JSON.encode(buildOrgPolicy()); |
1427 return new async.Future.value(stringResponse(200, h, resp)); | 2048 return new async.Future.value(stringResponse(200, h, resp)); |
1428 }), true); | 2049 }), true); |
1429 res.testIamPermissions(arg_request, arg_resource).then(unittest.expectAsyn
c(((api.TestIamPermissionsResponse response) { | 2050 res.setOrgPolicy(arg_request, arg_resource).then(unittest.expectAsync(((ap
i.OrgPolicy response) { |
1430 checkTestIamPermissionsResponse(response); | 2051 checkOrgPolicy(response); |
1431 }))); | 2052 }))); |
1432 }); | 2053 }); |
1433 | 2054 |
1434 }); | 2055 unittest.test("method--setOrgPolicyV1", () { |
1435 | |
1436 | |
1437 unittest.group("resource-ProjectsResourceApi", () { | |
1438 unittest.test("method--create", () { | |
1439 | 2056 |
1440 var mock = new HttpServerMock(); | 2057 var mock = new HttpServerMock(); |
1441 api.ProjectsResourceApi res = new api.CloudresourcemanagerApi(mock).projec
ts; | 2058 api.FoldersResourceApi res = new api.CloudresourcemanagerApi(mock).folders
; |
1442 var arg_request = buildProject(); | 2059 var arg_request = buildSetOrgPolicyRequest(); |
| 2060 var arg_resource = "foo"; |
1443 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2061 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1444 var obj = new api.Project.fromJson(json); | 2062 var obj = new api.SetOrgPolicyRequest.fromJson(json); |
1445 checkProject(obj); | 2063 checkSetOrgPolicyRequest(obj); |
1446 | 2064 |
1447 var path = (req.url).path; | 2065 var path = (req.url).path; |
1448 var pathOffset = 0; | 2066 var pathOffset = 0; |
1449 var index; | 2067 var index; |
1450 var subPart; | 2068 var subPart; |
1451 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2069 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
1452 pathOffset += 1; | 2070 pathOffset += 1; |
1453 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("v1/projects")); | 2071 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); |
1454 pathOffset += 11; | 2072 pathOffset += 3; |
| 2073 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
1455 | 2074 |
1456 var query = (req.url).query; | 2075 var query = (req.url).query; |
1457 var queryOffset = 0; | 2076 var queryOffset = 0; |
1458 var queryMap = {}; | 2077 var queryMap = {}; |
1459 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 2078 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
1460 parseBool(n) { | 2079 parseBool(n) { |
1461 if (n == "true") return true; | 2080 if (n == "true") return true; |
1462 if (n == "false") return false; | 2081 if (n == "false") return false; |
1463 if (n == null) return null; | 2082 if (n == null) return null; |
1464 throw new core.ArgumentError("Invalid boolean: $n"); | 2083 throw new core.ArgumentError("Invalid boolean: $n"); |
1465 } | 2084 } |
1466 if (query.length > 0) { | 2085 if (query.length > 0) { |
1467 for (var part in query.split("&")) { | 2086 for (var part in query.split("&")) { |
1468 var keyvalue = part.split("="); | 2087 var keyvalue = part.split("="); |
1469 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2088 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
1470 } | 2089 } |
1471 } | 2090 } |
1472 | 2091 |
1473 | 2092 |
1474 var h = { | 2093 var h = { |
1475 "content-type" : "application/json; charset=utf-8", | 2094 "content-type" : "application/json; charset=utf-8", |
1476 }; | 2095 }; |
1477 var resp = convert.JSON.encode(buildOperation()); | 2096 var resp = convert.JSON.encode(buildOrgPolicy()); |
1478 return new async.Future.value(stringResponse(200, h, resp)); | 2097 return new async.Future.value(stringResponse(200, h, resp)); |
1479 }), true); | 2098 }), true); |
1480 res.create(arg_request).then(unittest.expectAsync(((api.Operation response
) { | 2099 res.setOrgPolicyV1(arg_request, arg_resource).then(unittest.expectAsync(((
api.OrgPolicy response) { |
1481 checkOperation(response); | 2100 checkOrgPolicy(response); |
1482 }))); | 2101 }))); |
1483 }); | 2102 }); |
1484 | 2103 |
1485 unittest.test("method--delete", () { | 2104 }); |
| 2105 |
| 2106 |
| 2107 unittest.group("resource-LiensResourceApi", () { |
| 2108 unittest.test("method--create", () { |
1486 | 2109 |
1487 var mock = new HttpServerMock(); | 2110 var mock = new HttpServerMock(); |
1488 api.ProjectsResourceApi res = new api.CloudresourcemanagerApi(mock).projec
ts; | 2111 api.LiensResourceApi res = new api.CloudresourcemanagerApi(mock).liens; |
1489 var arg_projectId = "foo"; | 2112 var arg_request = buildLien(); |
1490 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2113 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 2114 var obj = new api.Lien.fromJson(json); |
| 2115 checkLien(obj); |
| 2116 |
1491 var path = (req.url).path; | 2117 var path = (req.url).path; |
1492 var pathOffset = 0; | 2118 var pathOffset = 0; |
1493 var index; | 2119 var index; |
1494 var subPart; | 2120 var subPart; |
1495 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2121 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
1496 pathOffset += 1; | 2122 pathOffset += 1; |
1497 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("v1/projects/")); | 2123 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1/liens")); |
1498 pathOffset += 12; | 2124 pathOffset += 8; |
1499 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
1500 pathOffset = path.length; | |
1501 unittest.expect(subPart, unittest.equals("$arg_projectId")); | |
1502 | 2125 |
1503 var query = (req.url).query; | 2126 var query = (req.url).query; |
1504 var queryOffset = 0; | 2127 var queryOffset = 0; |
1505 var queryMap = {}; | 2128 var queryMap = {}; |
1506 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 2129 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
1507 parseBool(n) { | 2130 parseBool(n) { |
1508 if (n == "true") return true; | 2131 if (n == "true") return true; |
1509 if (n == "false") return false; | 2132 if (n == "false") return false; |
1510 if (n == null) return null; | 2133 if (n == null) return null; |
1511 throw new core.ArgumentError("Invalid boolean: $n"); | 2134 throw new core.ArgumentError("Invalid boolean: $n"); |
1512 } | 2135 } |
1513 if (query.length > 0) { | 2136 if (query.length > 0) { |
1514 for (var part in query.split("&")) { | 2137 for (var part in query.split("&")) { |
1515 var keyvalue = part.split("="); | 2138 var keyvalue = part.split("="); |
1516 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2139 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
1517 } | 2140 } |
1518 } | 2141 } |
1519 | 2142 |
1520 | 2143 |
1521 var h = { | 2144 var h = { |
1522 "content-type" : "application/json; charset=utf-8", | 2145 "content-type" : "application/json; charset=utf-8", |
1523 }; | 2146 }; |
1524 var resp = convert.JSON.encode(buildEmpty()); | 2147 var resp = convert.JSON.encode(buildLien()); |
1525 return new async.Future.value(stringResponse(200, h, resp)); | 2148 return new async.Future.value(stringResponse(200, h, resp)); |
1526 }), true); | 2149 }), true); |
1527 res.delete(arg_projectId).then(unittest.expectAsync(((api.Empty response)
{ | 2150 res.create(arg_request).then(unittest.expectAsync(((api.Lien response) { |
1528 checkEmpty(response); | 2151 checkLien(response); |
1529 }))); | 2152 }))); |
1530 }); | 2153 }); |
1531 | 2154 |
1532 unittest.test("method--get", () { | 2155 unittest.test("method--delete", () { |
1533 | 2156 |
1534 var mock = new HttpServerMock(); | 2157 var mock = new HttpServerMock(); |
1535 api.ProjectsResourceApi res = new api.CloudresourcemanagerApi(mock).projec
ts; | 2158 api.LiensResourceApi res = new api.CloudresourcemanagerApi(mock).liens; |
1536 var arg_projectId = "foo"; | 2159 var arg_name = "foo"; |
1537 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2160 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1538 var path = (req.url).path; | 2161 var path = (req.url).path; |
1539 var pathOffset = 0; | 2162 var pathOffset = 0; |
1540 var index; | 2163 var index; |
1541 var subPart; | 2164 var subPart; |
1542 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2165 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
1543 pathOffset += 1; | 2166 pathOffset += 1; |
1544 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("v1/projects/")); | 2167 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); |
1545 pathOffset += 12; | 2168 pathOffset += 3; |
1546 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | 2169 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
1547 pathOffset = path.length; | |
1548 unittest.expect(subPart, unittest.equals("$arg_projectId")); | |
1549 | 2170 |
1550 var query = (req.url).query; | 2171 var query = (req.url).query; |
1551 var queryOffset = 0; | 2172 var queryOffset = 0; |
1552 var queryMap = {}; | 2173 var queryMap = {}; |
1553 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 2174 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
1554 parseBool(n) { | 2175 parseBool(n) { |
1555 if (n == "true") return true; | 2176 if (n == "true") return true; |
1556 if (n == "false") return false; | 2177 if (n == "false") return false; |
1557 if (n == null) return null; | 2178 if (n == null) return null; |
1558 throw new core.ArgumentError("Invalid boolean: $n"); | 2179 throw new core.ArgumentError("Invalid boolean: $n"); |
1559 } | 2180 } |
1560 if (query.length > 0) { | 2181 if (query.length > 0) { |
1561 for (var part in query.split("&")) { | 2182 for (var part in query.split("&")) { |
1562 var keyvalue = part.split("="); | 2183 var keyvalue = part.split("="); |
1563 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2184 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
1564 } | 2185 } |
1565 } | 2186 } |
1566 | 2187 |
1567 | 2188 |
1568 var h = { | 2189 var h = { |
1569 "content-type" : "application/json; charset=utf-8", | 2190 "content-type" : "application/json; charset=utf-8", |
1570 }; | 2191 }; |
1571 var resp = convert.JSON.encode(buildProject()); | 2192 var resp = convert.JSON.encode(buildEmpty()); |
1572 return new async.Future.value(stringResponse(200, h, resp)); | 2193 return new async.Future.value(stringResponse(200, h, resp)); |
1573 }), true); | 2194 }), true); |
1574 res.get(arg_projectId).then(unittest.expectAsync(((api.Project response) { | 2195 res.delete(arg_name).then(unittest.expectAsync(((api.Empty response) { |
1575 checkProject(response); | 2196 checkEmpty(response); |
1576 }))); | 2197 }))); |
1577 }); | 2198 }); |
1578 | 2199 |
1579 unittest.test("method--getAncestry", () { | 2200 unittest.test("method--list", () { |
1580 | 2201 |
1581 var mock = new HttpServerMock(); | 2202 var mock = new HttpServerMock(); |
1582 api.ProjectsResourceApi res = new api.CloudresourcemanagerApi(mock).projec
ts; | 2203 api.LiensResourceApi res = new api.CloudresourcemanagerApi(mock).liens; |
1583 var arg_request = buildGetAncestryRequest(); | 2204 var arg_parent = "foo"; |
1584 var arg_projectId = "foo"; | 2205 var arg_pageToken = "foo"; |
| 2206 var arg_pageSize = 42; |
1585 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2207 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1586 var obj = new api.GetAncestryRequest.fromJson(json); | |
1587 checkGetAncestryRequest(obj); | |
1588 | |
1589 var path = (req.url).path; | 2208 var path = (req.url).path; |
1590 var pathOffset = 0; | 2209 var pathOffset = 0; |
1591 var index; | 2210 var index; |
1592 var subPart; | 2211 var subPart; |
1593 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2212 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
1594 pathOffset += 1; | 2213 pathOffset += 1; |
1595 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("v1/projects/")); | 2214 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("v1/liens")); |
1596 pathOffset += 12; | 2215 pathOffset += 8; |
1597 index = path.indexOf(":getAncestry", pathOffset); | |
1598 unittest.expect(index >= 0, unittest.isTrue); | |
1599 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
1600 pathOffset = index; | |
1601 unittest.expect(subPart, unittest.equals("$arg_projectId")); | |
1602 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals(":getAncestry")); | |
1603 pathOffset += 12; | |
1604 | 2216 |
1605 var query = (req.url).query; | 2217 var query = (req.url).query; |
1606 var queryOffset = 0; | 2218 var queryOffset = 0; |
1607 var queryMap = {}; | 2219 var queryMap = {}; |
1608 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 2220 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
1609 parseBool(n) { | 2221 parseBool(n) { |
1610 if (n == "true") return true; | 2222 if (n == "true") return true; |
1611 if (n == "false") return false; | 2223 if (n == "false") return false; |
1612 if (n == null) return null; | 2224 if (n == null) return null; |
1613 throw new core.ArgumentError("Invalid boolean: $n"); | 2225 throw new core.ArgumentError("Invalid boolean: $n"); |
1614 } | 2226 } |
1615 if (query.length > 0) { | 2227 if (query.length > 0) { |
1616 for (var part in query.split("&")) { | 2228 for (var part in query.split("&")) { |
1617 var keyvalue = part.split("="); | 2229 var keyvalue = part.split("="); |
1618 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2230 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
1619 } | 2231 } |
1620 } | 2232 } |
| 2233 unittest.expect(queryMap["parent"].first, unittest.equals(arg_parent)); |
| 2234 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
| 2235 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); |
| 2236 |
| 2237 |
| 2238 var h = { |
| 2239 "content-type" : "application/json; charset=utf-8", |
| 2240 }; |
| 2241 var resp = convert.JSON.encode(buildListLiensResponse()); |
| 2242 return new async.Future.value(stringResponse(200, h, resp)); |
| 2243 }), true); |
| 2244 res.list(parent: arg_parent, pageToken: arg_pageToken, pageSize: arg_pageS
ize).then(unittest.expectAsync(((api.ListLiensResponse response) { |
| 2245 checkListLiensResponse(response); |
| 2246 }))); |
| 2247 }); |
| 2248 |
| 2249 }); |
| 2250 |
| 2251 |
| 2252 unittest.group("resource-OperationsResourceApi", () { |
| 2253 unittest.test("method--get", () { |
| 2254 |
| 2255 var mock = new HttpServerMock(); |
| 2256 api.OperationsResourceApi res = new api.CloudresourcemanagerApi(mock).oper
ations; |
| 2257 var arg_name = "foo"; |
| 2258 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 2259 var path = (req.url).path; |
| 2260 var pathOffset = 0; |
| 2261 var index; |
| 2262 var subPart; |
| 2263 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2264 pathOffset += 1; |
| 2265 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); |
| 2266 pathOffset += 3; |
| 2267 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
| 2268 |
| 2269 var query = (req.url).query; |
| 2270 var queryOffset = 0; |
| 2271 var queryMap = {}; |
| 2272 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 2273 parseBool(n) { |
| 2274 if (n == "true") return true; |
| 2275 if (n == "false") return false; |
| 2276 if (n == null) return null; |
| 2277 throw new core.ArgumentError("Invalid boolean: $n"); |
| 2278 } |
| 2279 if (query.length > 0) { |
| 2280 for (var part in query.split("&")) { |
| 2281 var keyvalue = part.split("="); |
| 2282 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 2283 } |
| 2284 } |
| 2285 |
| 2286 |
| 2287 var h = { |
| 2288 "content-type" : "application/json; charset=utf-8", |
| 2289 }; |
| 2290 var resp = convert.JSON.encode(buildOperation()); |
| 2291 return new async.Future.value(stringResponse(200, h, resp)); |
| 2292 }), true); |
| 2293 res.get(arg_name).then(unittest.expectAsync(((api.Operation response) { |
| 2294 checkOperation(response); |
| 2295 }))); |
| 2296 }); |
| 2297 |
| 2298 }); |
| 2299 |
| 2300 |
| 2301 unittest.group("resource-OrganizationsResourceApi", () { |
| 2302 unittest.test("method--clearOrgPolicy", () { |
| 2303 |
| 2304 var mock = new HttpServerMock(); |
| 2305 api.OrganizationsResourceApi res = new api.CloudresourcemanagerApi(mock).o
rganizations; |
| 2306 var arg_request = buildClearOrgPolicyRequest(); |
| 2307 var arg_resource = "foo"; |
| 2308 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 2309 var obj = new api.ClearOrgPolicyRequest.fromJson(json); |
| 2310 checkClearOrgPolicyRequest(obj); |
| 2311 |
| 2312 var path = (req.url).path; |
| 2313 var pathOffset = 0; |
| 2314 var index; |
| 2315 var subPart; |
| 2316 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2317 pathOffset += 1; |
| 2318 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); |
| 2319 pathOffset += 3; |
| 2320 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
| 2321 |
| 2322 var query = (req.url).query; |
| 2323 var queryOffset = 0; |
| 2324 var queryMap = {}; |
| 2325 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 2326 parseBool(n) { |
| 2327 if (n == "true") return true; |
| 2328 if (n == "false") return false; |
| 2329 if (n == null) return null; |
| 2330 throw new core.ArgumentError("Invalid boolean: $n"); |
| 2331 } |
| 2332 if (query.length > 0) { |
| 2333 for (var part in query.split("&")) { |
| 2334 var keyvalue = part.split("="); |
| 2335 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 2336 } |
| 2337 } |
| 2338 |
| 2339 |
| 2340 var h = { |
| 2341 "content-type" : "application/json; charset=utf-8", |
| 2342 }; |
| 2343 var resp = convert.JSON.encode(buildEmpty()); |
| 2344 return new async.Future.value(stringResponse(200, h, resp)); |
| 2345 }), true); |
| 2346 res.clearOrgPolicy(arg_request, arg_resource).then(unittest.expectAsync(((
api.Empty response) { |
| 2347 checkEmpty(response); |
| 2348 }))); |
| 2349 }); |
| 2350 |
| 2351 unittest.test("method--clearOrgPolicyV1", () { |
| 2352 |
| 2353 var mock = new HttpServerMock(); |
| 2354 api.OrganizationsResourceApi res = new api.CloudresourcemanagerApi(mock).o
rganizations; |
| 2355 var arg_request = buildClearOrgPolicyRequest(); |
| 2356 var arg_resource = "foo"; |
| 2357 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 2358 var obj = new api.ClearOrgPolicyRequest.fromJson(json); |
| 2359 checkClearOrgPolicyRequest(obj); |
| 2360 |
| 2361 var path = (req.url).path; |
| 2362 var pathOffset = 0; |
| 2363 var index; |
| 2364 var subPart; |
| 2365 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2366 pathOffset += 1; |
| 2367 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); |
| 2368 pathOffset += 3; |
| 2369 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
| 2370 |
| 2371 var query = (req.url).query; |
| 2372 var queryOffset = 0; |
| 2373 var queryMap = {}; |
| 2374 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 2375 parseBool(n) { |
| 2376 if (n == "true") return true; |
| 2377 if (n == "false") return false; |
| 2378 if (n == null) return null; |
| 2379 throw new core.ArgumentError("Invalid boolean: $n"); |
| 2380 } |
| 2381 if (query.length > 0) { |
| 2382 for (var part in query.split("&")) { |
| 2383 var keyvalue = part.split("="); |
| 2384 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 2385 } |
| 2386 } |
| 2387 |
| 2388 |
| 2389 var h = { |
| 2390 "content-type" : "application/json; charset=utf-8", |
| 2391 }; |
| 2392 var resp = convert.JSON.encode(buildEmpty()); |
| 2393 return new async.Future.value(stringResponse(200, h, resp)); |
| 2394 }), true); |
| 2395 res.clearOrgPolicyV1(arg_request, arg_resource).then(unittest.expectAsync(
((api.Empty response) { |
| 2396 checkEmpty(response); |
| 2397 }))); |
| 2398 }); |
| 2399 |
| 2400 unittest.test("method--get", () { |
| 2401 |
| 2402 var mock = new HttpServerMock(); |
| 2403 api.OrganizationsResourceApi res = new api.CloudresourcemanagerApi(mock).o
rganizations; |
| 2404 var arg_name = "foo"; |
| 2405 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 2406 var path = (req.url).path; |
| 2407 var pathOffset = 0; |
| 2408 var index; |
| 2409 var subPart; |
| 2410 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2411 pathOffset += 1; |
| 2412 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); |
| 2413 pathOffset += 3; |
| 2414 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
| 2415 |
| 2416 var query = (req.url).query; |
| 2417 var queryOffset = 0; |
| 2418 var queryMap = {}; |
| 2419 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 2420 parseBool(n) { |
| 2421 if (n == "true") return true; |
| 2422 if (n == "false") return false; |
| 2423 if (n == null) return null; |
| 2424 throw new core.ArgumentError("Invalid boolean: $n"); |
| 2425 } |
| 2426 if (query.length > 0) { |
| 2427 for (var part in query.split("&")) { |
| 2428 var keyvalue = part.split("="); |
| 2429 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 2430 } |
| 2431 } |
| 2432 |
| 2433 |
| 2434 var h = { |
| 2435 "content-type" : "application/json; charset=utf-8", |
| 2436 }; |
| 2437 var resp = convert.JSON.encode(buildOrganization()); |
| 2438 return new async.Future.value(stringResponse(200, h, resp)); |
| 2439 }), true); |
| 2440 res.get(arg_name).then(unittest.expectAsync(((api.Organization response) { |
| 2441 checkOrganization(response); |
| 2442 }))); |
| 2443 }); |
| 2444 |
| 2445 unittest.test("method--getEffectiveOrgPolicy", () { |
| 2446 |
| 2447 var mock = new HttpServerMock(); |
| 2448 api.OrganizationsResourceApi res = new api.CloudresourcemanagerApi(mock).o
rganizations; |
| 2449 var arg_request = buildGetEffectiveOrgPolicyRequest(); |
| 2450 var arg_resource = "foo"; |
| 2451 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 2452 var obj = new api.GetEffectiveOrgPolicyRequest.fromJson(json); |
| 2453 checkGetEffectiveOrgPolicyRequest(obj); |
| 2454 |
| 2455 var path = (req.url).path; |
| 2456 var pathOffset = 0; |
| 2457 var index; |
| 2458 var subPart; |
| 2459 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2460 pathOffset += 1; |
| 2461 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); |
| 2462 pathOffset += 3; |
| 2463 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
| 2464 |
| 2465 var query = (req.url).query; |
| 2466 var queryOffset = 0; |
| 2467 var queryMap = {}; |
| 2468 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 2469 parseBool(n) { |
| 2470 if (n == "true") return true; |
| 2471 if (n == "false") return false; |
| 2472 if (n == null) return null; |
| 2473 throw new core.ArgumentError("Invalid boolean: $n"); |
| 2474 } |
| 2475 if (query.length > 0) { |
| 2476 for (var part in query.split("&")) { |
| 2477 var keyvalue = part.split("="); |
| 2478 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 2479 } |
| 2480 } |
| 2481 |
| 2482 |
| 2483 var h = { |
| 2484 "content-type" : "application/json; charset=utf-8", |
| 2485 }; |
| 2486 var resp = convert.JSON.encode(buildOrgPolicy()); |
| 2487 return new async.Future.value(stringResponse(200, h, resp)); |
| 2488 }), true); |
| 2489 res.getEffectiveOrgPolicy(arg_request, arg_resource).then(unittest.expectA
sync(((api.OrgPolicy response) { |
| 2490 checkOrgPolicy(response); |
| 2491 }))); |
| 2492 }); |
| 2493 |
| 2494 unittest.test("method--getEffectiveOrgPolicyV1", () { |
| 2495 |
| 2496 var mock = new HttpServerMock(); |
| 2497 api.OrganizationsResourceApi res = new api.CloudresourcemanagerApi(mock).o
rganizations; |
| 2498 var arg_request = buildGetEffectiveOrgPolicyRequest(); |
| 2499 var arg_resource = "foo"; |
| 2500 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 2501 var obj = new api.GetEffectiveOrgPolicyRequest.fromJson(json); |
| 2502 checkGetEffectiveOrgPolicyRequest(obj); |
| 2503 |
| 2504 var path = (req.url).path; |
| 2505 var pathOffset = 0; |
| 2506 var index; |
| 2507 var subPart; |
| 2508 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2509 pathOffset += 1; |
| 2510 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); |
| 2511 pathOffset += 3; |
| 2512 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
| 2513 |
| 2514 var query = (req.url).query; |
| 2515 var queryOffset = 0; |
| 2516 var queryMap = {}; |
| 2517 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 2518 parseBool(n) { |
| 2519 if (n == "true") return true; |
| 2520 if (n == "false") return false; |
| 2521 if (n == null) return null; |
| 2522 throw new core.ArgumentError("Invalid boolean: $n"); |
| 2523 } |
| 2524 if (query.length > 0) { |
| 2525 for (var part in query.split("&")) { |
| 2526 var keyvalue = part.split("="); |
| 2527 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 2528 } |
| 2529 } |
| 2530 |
| 2531 |
| 2532 var h = { |
| 2533 "content-type" : "application/json; charset=utf-8", |
| 2534 }; |
| 2535 var resp = convert.JSON.encode(buildOrgPolicy()); |
| 2536 return new async.Future.value(stringResponse(200, h, resp)); |
| 2537 }), true); |
| 2538 res.getEffectiveOrgPolicyV1(arg_request, arg_resource).then(unittest.expec
tAsync(((api.OrgPolicy response) { |
| 2539 checkOrgPolicy(response); |
| 2540 }))); |
| 2541 }); |
| 2542 |
| 2543 unittest.test("method--getIamPolicy", () { |
| 2544 |
| 2545 var mock = new HttpServerMock(); |
| 2546 api.OrganizationsResourceApi res = new api.CloudresourcemanagerApi(mock).o
rganizations; |
| 2547 var arg_request = buildGetIamPolicyRequest(); |
| 2548 var arg_resource = "foo"; |
| 2549 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 2550 var obj = new api.GetIamPolicyRequest.fromJson(json); |
| 2551 checkGetIamPolicyRequest(obj); |
| 2552 |
| 2553 var path = (req.url).path; |
| 2554 var pathOffset = 0; |
| 2555 var index; |
| 2556 var subPart; |
| 2557 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2558 pathOffset += 1; |
| 2559 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); |
| 2560 pathOffset += 3; |
| 2561 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
| 2562 |
| 2563 var query = (req.url).query; |
| 2564 var queryOffset = 0; |
| 2565 var queryMap = {}; |
| 2566 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 2567 parseBool(n) { |
| 2568 if (n == "true") return true; |
| 2569 if (n == "false") return false; |
| 2570 if (n == null) return null; |
| 2571 throw new core.ArgumentError("Invalid boolean: $n"); |
| 2572 } |
| 2573 if (query.length > 0) { |
| 2574 for (var part in query.split("&")) { |
| 2575 var keyvalue = part.split("="); |
| 2576 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 2577 } |
| 2578 } |
| 2579 |
| 2580 |
| 2581 var h = { |
| 2582 "content-type" : "application/json; charset=utf-8", |
| 2583 }; |
| 2584 var resp = convert.JSON.encode(buildPolicy()); |
| 2585 return new async.Future.value(stringResponse(200, h, resp)); |
| 2586 }), true); |
| 2587 res.getIamPolicy(arg_request, arg_resource).then(unittest.expectAsync(((ap
i.Policy response) { |
| 2588 checkPolicy(response); |
| 2589 }))); |
| 2590 }); |
| 2591 |
| 2592 unittest.test("method--getOrgPolicy", () { |
| 2593 |
| 2594 var mock = new HttpServerMock(); |
| 2595 api.OrganizationsResourceApi res = new api.CloudresourcemanagerApi(mock).o
rganizations; |
| 2596 var arg_request = buildGetOrgPolicyRequest(); |
| 2597 var arg_resource = "foo"; |
| 2598 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 2599 var obj = new api.GetOrgPolicyRequest.fromJson(json); |
| 2600 checkGetOrgPolicyRequest(obj); |
| 2601 |
| 2602 var path = (req.url).path; |
| 2603 var pathOffset = 0; |
| 2604 var index; |
| 2605 var subPart; |
| 2606 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2607 pathOffset += 1; |
| 2608 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); |
| 2609 pathOffset += 3; |
| 2610 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
| 2611 |
| 2612 var query = (req.url).query; |
| 2613 var queryOffset = 0; |
| 2614 var queryMap = {}; |
| 2615 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 2616 parseBool(n) { |
| 2617 if (n == "true") return true; |
| 2618 if (n == "false") return false; |
| 2619 if (n == null) return null; |
| 2620 throw new core.ArgumentError("Invalid boolean: $n"); |
| 2621 } |
| 2622 if (query.length > 0) { |
| 2623 for (var part in query.split("&")) { |
| 2624 var keyvalue = part.split("="); |
| 2625 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 2626 } |
| 2627 } |
| 2628 |
| 2629 |
| 2630 var h = { |
| 2631 "content-type" : "application/json; charset=utf-8", |
| 2632 }; |
| 2633 var resp = convert.JSON.encode(buildOrgPolicy()); |
| 2634 return new async.Future.value(stringResponse(200, h, resp)); |
| 2635 }), true); |
| 2636 res.getOrgPolicy(arg_request, arg_resource).then(unittest.expectAsync(((ap
i.OrgPolicy response) { |
| 2637 checkOrgPolicy(response); |
| 2638 }))); |
| 2639 }); |
| 2640 |
| 2641 unittest.test("method--getOrgPolicyV1", () { |
| 2642 |
| 2643 var mock = new HttpServerMock(); |
| 2644 api.OrganizationsResourceApi res = new api.CloudresourcemanagerApi(mock).o
rganizations; |
| 2645 var arg_request = buildGetOrgPolicyRequest(); |
| 2646 var arg_resource = "foo"; |
| 2647 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 2648 var obj = new api.GetOrgPolicyRequest.fromJson(json); |
| 2649 checkGetOrgPolicyRequest(obj); |
| 2650 |
| 2651 var path = (req.url).path; |
| 2652 var pathOffset = 0; |
| 2653 var index; |
| 2654 var subPart; |
| 2655 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2656 pathOffset += 1; |
| 2657 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); |
| 2658 pathOffset += 3; |
| 2659 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
| 2660 |
| 2661 var query = (req.url).query; |
| 2662 var queryOffset = 0; |
| 2663 var queryMap = {}; |
| 2664 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 2665 parseBool(n) { |
| 2666 if (n == "true") return true; |
| 2667 if (n == "false") return false; |
| 2668 if (n == null) return null; |
| 2669 throw new core.ArgumentError("Invalid boolean: $n"); |
| 2670 } |
| 2671 if (query.length > 0) { |
| 2672 for (var part in query.split("&")) { |
| 2673 var keyvalue = part.split("="); |
| 2674 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 2675 } |
| 2676 } |
| 2677 |
| 2678 |
| 2679 var h = { |
| 2680 "content-type" : "application/json; charset=utf-8", |
| 2681 }; |
| 2682 var resp = convert.JSON.encode(buildOrgPolicy()); |
| 2683 return new async.Future.value(stringResponse(200, h, resp)); |
| 2684 }), true); |
| 2685 res.getOrgPolicyV1(arg_request, arg_resource).then(unittest.expectAsync(((
api.OrgPolicy response) { |
| 2686 checkOrgPolicy(response); |
| 2687 }))); |
| 2688 }); |
| 2689 |
| 2690 unittest.test("method--listAvailableOrgPolicyConstraints", () { |
| 2691 |
| 2692 var mock = new HttpServerMock(); |
| 2693 api.OrganizationsResourceApi res = new api.CloudresourcemanagerApi(mock).o
rganizations; |
| 2694 var arg_request = buildListAvailableOrgPolicyConstraintsRequest(); |
| 2695 var arg_resource = "foo"; |
| 2696 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 2697 var obj = new api.ListAvailableOrgPolicyConstraintsRequest.fromJson(json
); |
| 2698 checkListAvailableOrgPolicyConstraintsRequest(obj); |
| 2699 |
| 2700 var path = (req.url).path; |
| 2701 var pathOffset = 0; |
| 2702 var index; |
| 2703 var subPart; |
| 2704 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2705 pathOffset += 1; |
| 2706 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); |
| 2707 pathOffset += 3; |
| 2708 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
| 2709 |
| 2710 var query = (req.url).query; |
| 2711 var queryOffset = 0; |
| 2712 var queryMap = {}; |
| 2713 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 2714 parseBool(n) { |
| 2715 if (n == "true") return true; |
| 2716 if (n == "false") return false; |
| 2717 if (n == null) return null; |
| 2718 throw new core.ArgumentError("Invalid boolean: $n"); |
| 2719 } |
| 2720 if (query.length > 0) { |
| 2721 for (var part in query.split("&")) { |
| 2722 var keyvalue = part.split("="); |
| 2723 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 2724 } |
| 2725 } |
| 2726 |
| 2727 |
| 2728 var h = { |
| 2729 "content-type" : "application/json; charset=utf-8", |
| 2730 }; |
| 2731 var resp = convert.JSON.encode(buildListAvailableOrgPolicyConstraintsRes
ponse()); |
| 2732 return new async.Future.value(stringResponse(200, h, resp)); |
| 2733 }), true); |
| 2734 res.listAvailableOrgPolicyConstraints(arg_request, arg_resource).then(unit
test.expectAsync(((api.ListAvailableOrgPolicyConstraintsResponse response) { |
| 2735 checkListAvailableOrgPolicyConstraintsResponse(response); |
| 2736 }))); |
| 2737 }); |
| 2738 |
| 2739 unittest.test("method--listOrgPolicies", () { |
| 2740 |
| 2741 var mock = new HttpServerMock(); |
| 2742 api.OrganizationsResourceApi res = new api.CloudresourcemanagerApi(mock).o
rganizations; |
| 2743 var arg_request = buildListOrgPoliciesRequest(); |
| 2744 var arg_resource = "foo"; |
| 2745 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 2746 var obj = new api.ListOrgPoliciesRequest.fromJson(json); |
| 2747 checkListOrgPoliciesRequest(obj); |
| 2748 |
| 2749 var path = (req.url).path; |
| 2750 var pathOffset = 0; |
| 2751 var index; |
| 2752 var subPart; |
| 2753 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2754 pathOffset += 1; |
| 2755 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); |
| 2756 pathOffset += 3; |
| 2757 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
| 2758 |
| 2759 var query = (req.url).query; |
| 2760 var queryOffset = 0; |
| 2761 var queryMap = {}; |
| 2762 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 2763 parseBool(n) { |
| 2764 if (n == "true") return true; |
| 2765 if (n == "false") return false; |
| 2766 if (n == null) return null; |
| 2767 throw new core.ArgumentError("Invalid boolean: $n"); |
| 2768 } |
| 2769 if (query.length > 0) { |
| 2770 for (var part in query.split("&")) { |
| 2771 var keyvalue = part.split("="); |
| 2772 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 2773 } |
| 2774 } |
| 2775 |
| 2776 |
| 2777 var h = { |
| 2778 "content-type" : "application/json; charset=utf-8", |
| 2779 }; |
| 2780 var resp = convert.JSON.encode(buildListOrgPoliciesResponse()); |
| 2781 return new async.Future.value(stringResponse(200, h, resp)); |
| 2782 }), true); |
| 2783 res.listOrgPolicies(arg_request, arg_resource).then(unittest.expectAsync((
(api.ListOrgPoliciesResponse response) { |
| 2784 checkListOrgPoliciesResponse(response); |
| 2785 }))); |
| 2786 }); |
| 2787 |
| 2788 unittest.test("method--search", () { |
| 2789 |
| 2790 var mock = new HttpServerMock(); |
| 2791 api.OrganizationsResourceApi res = new api.CloudresourcemanagerApi(mock).o
rganizations; |
| 2792 var arg_request = buildSearchOrganizationsRequest(); |
| 2793 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 2794 var obj = new api.SearchOrganizationsRequest.fromJson(json); |
| 2795 checkSearchOrganizationsRequest(obj); |
| 2796 |
| 2797 var path = (req.url).path; |
| 2798 var pathOffset = 0; |
| 2799 var index; |
| 2800 var subPart; |
| 2801 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2802 pathOffset += 1; |
| 2803 unittest.expect(path.substring(pathOffset, pathOffset + 23), unittest.eq
uals("v1/organizations:search")); |
| 2804 pathOffset += 23; |
| 2805 |
| 2806 var query = (req.url).query; |
| 2807 var queryOffset = 0; |
| 2808 var queryMap = {}; |
| 2809 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 2810 parseBool(n) { |
| 2811 if (n == "true") return true; |
| 2812 if (n == "false") return false; |
| 2813 if (n == null) return null; |
| 2814 throw new core.ArgumentError("Invalid boolean: $n"); |
| 2815 } |
| 2816 if (query.length > 0) { |
| 2817 for (var part in query.split("&")) { |
| 2818 var keyvalue = part.split("="); |
| 2819 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 2820 } |
| 2821 } |
| 2822 |
| 2823 |
| 2824 var h = { |
| 2825 "content-type" : "application/json; charset=utf-8", |
| 2826 }; |
| 2827 var resp = convert.JSON.encode(buildSearchOrganizationsResponse()); |
| 2828 return new async.Future.value(stringResponse(200, h, resp)); |
| 2829 }), true); |
| 2830 res.search(arg_request).then(unittest.expectAsync(((api.SearchOrganization
sResponse response) { |
| 2831 checkSearchOrganizationsResponse(response); |
| 2832 }))); |
| 2833 }); |
| 2834 |
| 2835 unittest.test("method--setIamPolicy", () { |
| 2836 |
| 2837 var mock = new HttpServerMock(); |
| 2838 api.OrganizationsResourceApi res = new api.CloudresourcemanagerApi(mock).o
rganizations; |
| 2839 var arg_request = buildSetIamPolicyRequest(); |
| 2840 var arg_resource = "foo"; |
| 2841 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 2842 var obj = new api.SetIamPolicyRequest.fromJson(json); |
| 2843 checkSetIamPolicyRequest(obj); |
| 2844 |
| 2845 var path = (req.url).path; |
| 2846 var pathOffset = 0; |
| 2847 var index; |
| 2848 var subPart; |
| 2849 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2850 pathOffset += 1; |
| 2851 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); |
| 2852 pathOffset += 3; |
| 2853 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
| 2854 |
| 2855 var query = (req.url).query; |
| 2856 var queryOffset = 0; |
| 2857 var queryMap = {}; |
| 2858 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 2859 parseBool(n) { |
| 2860 if (n == "true") return true; |
| 2861 if (n == "false") return false; |
| 2862 if (n == null) return null; |
| 2863 throw new core.ArgumentError("Invalid boolean: $n"); |
| 2864 } |
| 2865 if (query.length > 0) { |
| 2866 for (var part in query.split("&")) { |
| 2867 var keyvalue = part.split("="); |
| 2868 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 2869 } |
| 2870 } |
| 2871 |
| 2872 |
| 2873 var h = { |
| 2874 "content-type" : "application/json; charset=utf-8", |
| 2875 }; |
| 2876 var resp = convert.JSON.encode(buildPolicy()); |
| 2877 return new async.Future.value(stringResponse(200, h, resp)); |
| 2878 }), true); |
| 2879 res.setIamPolicy(arg_request, arg_resource).then(unittest.expectAsync(((ap
i.Policy response) { |
| 2880 checkPolicy(response); |
| 2881 }))); |
| 2882 }); |
| 2883 |
| 2884 unittest.test("method--setOrgPolicy", () { |
| 2885 |
| 2886 var mock = new HttpServerMock(); |
| 2887 api.OrganizationsResourceApi res = new api.CloudresourcemanagerApi(mock).o
rganizations; |
| 2888 var arg_request = buildSetOrgPolicyRequest(); |
| 2889 var arg_resource = "foo"; |
| 2890 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 2891 var obj = new api.SetOrgPolicyRequest.fromJson(json); |
| 2892 checkSetOrgPolicyRequest(obj); |
| 2893 |
| 2894 var path = (req.url).path; |
| 2895 var pathOffset = 0; |
| 2896 var index; |
| 2897 var subPart; |
| 2898 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2899 pathOffset += 1; |
| 2900 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); |
| 2901 pathOffset += 3; |
| 2902 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
| 2903 |
| 2904 var query = (req.url).query; |
| 2905 var queryOffset = 0; |
| 2906 var queryMap = {}; |
| 2907 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 2908 parseBool(n) { |
| 2909 if (n == "true") return true; |
| 2910 if (n == "false") return false; |
| 2911 if (n == null) return null; |
| 2912 throw new core.ArgumentError("Invalid boolean: $n"); |
| 2913 } |
| 2914 if (query.length > 0) { |
| 2915 for (var part in query.split("&")) { |
| 2916 var keyvalue = part.split("="); |
| 2917 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 2918 } |
| 2919 } |
| 2920 |
| 2921 |
| 2922 var h = { |
| 2923 "content-type" : "application/json; charset=utf-8", |
| 2924 }; |
| 2925 var resp = convert.JSON.encode(buildOrgPolicy()); |
| 2926 return new async.Future.value(stringResponse(200, h, resp)); |
| 2927 }), true); |
| 2928 res.setOrgPolicy(arg_request, arg_resource).then(unittest.expectAsync(((ap
i.OrgPolicy response) { |
| 2929 checkOrgPolicy(response); |
| 2930 }))); |
| 2931 }); |
| 2932 |
| 2933 unittest.test("method--setOrgPolicyV1", () { |
| 2934 |
| 2935 var mock = new HttpServerMock(); |
| 2936 api.OrganizationsResourceApi res = new api.CloudresourcemanagerApi(mock).o
rganizations; |
| 2937 var arg_request = buildSetOrgPolicyRequest(); |
| 2938 var arg_resource = "foo"; |
| 2939 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 2940 var obj = new api.SetOrgPolicyRequest.fromJson(json); |
| 2941 checkSetOrgPolicyRequest(obj); |
| 2942 |
| 2943 var path = (req.url).path; |
| 2944 var pathOffset = 0; |
| 2945 var index; |
| 2946 var subPart; |
| 2947 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2948 pathOffset += 1; |
| 2949 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); |
| 2950 pathOffset += 3; |
| 2951 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
| 2952 |
| 2953 var query = (req.url).query; |
| 2954 var queryOffset = 0; |
| 2955 var queryMap = {}; |
| 2956 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 2957 parseBool(n) { |
| 2958 if (n == "true") return true; |
| 2959 if (n == "false") return false; |
| 2960 if (n == null) return null; |
| 2961 throw new core.ArgumentError("Invalid boolean: $n"); |
| 2962 } |
| 2963 if (query.length > 0) { |
| 2964 for (var part in query.split("&")) { |
| 2965 var keyvalue = part.split("="); |
| 2966 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 2967 } |
| 2968 } |
| 2969 |
| 2970 |
| 2971 var h = { |
| 2972 "content-type" : "application/json; charset=utf-8", |
| 2973 }; |
| 2974 var resp = convert.JSON.encode(buildOrgPolicy()); |
| 2975 return new async.Future.value(stringResponse(200, h, resp)); |
| 2976 }), true); |
| 2977 res.setOrgPolicyV1(arg_request, arg_resource).then(unittest.expectAsync(((
api.OrgPolicy response) { |
| 2978 checkOrgPolicy(response); |
| 2979 }))); |
| 2980 }); |
| 2981 |
| 2982 unittest.test("method--testIamPermissions", () { |
| 2983 |
| 2984 var mock = new HttpServerMock(); |
| 2985 api.OrganizationsResourceApi res = new api.CloudresourcemanagerApi(mock).o
rganizations; |
| 2986 var arg_request = buildTestIamPermissionsRequest(); |
| 2987 var arg_resource = "foo"; |
| 2988 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 2989 var obj = new api.TestIamPermissionsRequest.fromJson(json); |
| 2990 checkTestIamPermissionsRequest(obj); |
| 2991 |
| 2992 var path = (req.url).path; |
| 2993 var pathOffset = 0; |
| 2994 var index; |
| 2995 var subPart; |
| 2996 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2997 pathOffset += 1; |
| 2998 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); |
| 2999 pathOffset += 3; |
| 3000 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
| 3001 |
| 3002 var query = (req.url).query; |
| 3003 var queryOffset = 0; |
| 3004 var queryMap = {}; |
| 3005 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 3006 parseBool(n) { |
| 3007 if (n == "true") return true; |
| 3008 if (n == "false") return false; |
| 3009 if (n == null) return null; |
| 3010 throw new core.ArgumentError("Invalid boolean: $n"); |
| 3011 } |
| 3012 if (query.length > 0) { |
| 3013 for (var part in query.split("&")) { |
| 3014 var keyvalue = part.split("="); |
| 3015 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 3016 } |
| 3017 } |
| 3018 |
| 3019 |
| 3020 var h = { |
| 3021 "content-type" : "application/json; charset=utf-8", |
| 3022 }; |
| 3023 var resp = convert.JSON.encode(buildTestIamPermissionsResponse()); |
| 3024 return new async.Future.value(stringResponse(200, h, resp)); |
| 3025 }), true); |
| 3026 res.testIamPermissions(arg_request, arg_resource).then(unittest.expectAsyn
c(((api.TestIamPermissionsResponse response) { |
| 3027 checkTestIamPermissionsResponse(response); |
| 3028 }))); |
| 3029 }); |
| 3030 |
| 3031 }); |
| 3032 |
| 3033 |
| 3034 unittest.group("resource-ProjectsResourceApi", () { |
| 3035 unittest.test("method--clearOrgPolicy", () { |
| 3036 |
| 3037 var mock = new HttpServerMock(); |
| 3038 api.ProjectsResourceApi res = new api.CloudresourcemanagerApi(mock).projec
ts; |
| 3039 var arg_request = buildClearOrgPolicyRequest(); |
| 3040 var arg_resource = "foo"; |
| 3041 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 3042 var obj = new api.ClearOrgPolicyRequest.fromJson(json); |
| 3043 checkClearOrgPolicyRequest(obj); |
| 3044 |
| 3045 var path = (req.url).path; |
| 3046 var pathOffset = 0; |
| 3047 var index; |
| 3048 var subPart; |
| 3049 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 3050 pathOffset += 1; |
| 3051 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); |
| 3052 pathOffset += 3; |
| 3053 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
| 3054 |
| 3055 var query = (req.url).query; |
| 3056 var queryOffset = 0; |
| 3057 var queryMap = {}; |
| 3058 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 3059 parseBool(n) { |
| 3060 if (n == "true") return true; |
| 3061 if (n == "false") return false; |
| 3062 if (n == null) return null; |
| 3063 throw new core.ArgumentError("Invalid boolean: $n"); |
| 3064 } |
| 3065 if (query.length > 0) { |
| 3066 for (var part in query.split("&")) { |
| 3067 var keyvalue = part.split("="); |
| 3068 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 3069 } |
| 3070 } |
| 3071 |
| 3072 |
| 3073 var h = { |
| 3074 "content-type" : "application/json; charset=utf-8", |
| 3075 }; |
| 3076 var resp = convert.JSON.encode(buildEmpty()); |
| 3077 return new async.Future.value(stringResponse(200, h, resp)); |
| 3078 }), true); |
| 3079 res.clearOrgPolicy(arg_request, arg_resource).then(unittest.expectAsync(((
api.Empty response) { |
| 3080 checkEmpty(response); |
| 3081 }))); |
| 3082 }); |
| 3083 |
| 3084 unittest.test("method--clearOrgPolicyV1", () { |
| 3085 |
| 3086 var mock = new HttpServerMock(); |
| 3087 api.ProjectsResourceApi res = new api.CloudresourcemanagerApi(mock).projec
ts; |
| 3088 var arg_request = buildClearOrgPolicyRequest(); |
| 3089 var arg_resource = "foo"; |
| 3090 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 3091 var obj = new api.ClearOrgPolicyRequest.fromJson(json); |
| 3092 checkClearOrgPolicyRequest(obj); |
| 3093 |
| 3094 var path = (req.url).path; |
| 3095 var pathOffset = 0; |
| 3096 var index; |
| 3097 var subPart; |
| 3098 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 3099 pathOffset += 1; |
| 3100 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); |
| 3101 pathOffset += 3; |
| 3102 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
| 3103 |
| 3104 var query = (req.url).query; |
| 3105 var queryOffset = 0; |
| 3106 var queryMap = {}; |
| 3107 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 3108 parseBool(n) { |
| 3109 if (n == "true") return true; |
| 3110 if (n == "false") return false; |
| 3111 if (n == null) return null; |
| 3112 throw new core.ArgumentError("Invalid boolean: $n"); |
| 3113 } |
| 3114 if (query.length > 0) { |
| 3115 for (var part in query.split("&")) { |
| 3116 var keyvalue = part.split("="); |
| 3117 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 3118 } |
| 3119 } |
| 3120 |
| 3121 |
| 3122 var h = { |
| 3123 "content-type" : "application/json; charset=utf-8", |
| 3124 }; |
| 3125 var resp = convert.JSON.encode(buildEmpty()); |
| 3126 return new async.Future.value(stringResponse(200, h, resp)); |
| 3127 }), true); |
| 3128 res.clearOrgPolicyV1(arg_request, arg_resource).then(unittest.expectAsync(
((api.Empty response) { |
| 3129 checkEmpty(response); |
| 3130 }))); |
| 3131 }); |
| 3132 |
| 3133 unittest.test("method--create", () { |
| 3134 |
| 3135 var mock = new HttpServerMock(); |
| 3136 api.ProjectsResourceApi res = new api.CloudresourcemanagerApi(mock).projec
ts; |
| 3137 var arg_request = buildProject(); |
| 3138 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 3139 var obj = new api.Project.fromJson(json); |
| 3140 checkProject(obj); |
| 3141 |
| 3142 var path = (req.url).path; |
| 3143 var pathOffset = 0; |
| 3144 var index; |
| 3145 var subPart; |
| 3146 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 3147 pathOffset += 1; |
| 3148 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("v1/projects")); |
| 3149 pathOffset += 11; |
| 3150 |
| 3151 var query = (req.url).query; |
| 3152 var queryOffset = 0; |
| 3153 var queryMap = {}; |
| 3154 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 3155 parseBool(n) { |
| 3156 if (n == "true") return true; |
| 3157 if (n == "false") return false; |
| 3158 if (n == null) return null; |
| 3159 throw new core.ArgumentError("Invalid boolean: $n"); |
| 3160 } |
| 3161 if (query.length > 0) { |
| 3162 for (var part in query.split("&")) { |
| 3163 var keyvalue = part.split("="); |
| 3164 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 3165 } |
| 3166 } |
| 3167 |
| 3168 |
| 3169 var h = { |
| 3170 "content-type" : "application/json; charset=utf-8", |
| 3171 }; |
| 3172 var resp = convert.JSON.encode(buildOperation()); |
| 3173 return new async.Future.value(stringResponse(200, h, resp)); |
| 3174 }), true); |
| 3175 res.create(arg_request).then(unittest.expectAsync(((api.Operation response
) { |
| 3176 checkOperation(response); |
| 3177 }))); |
| 3178 }); |
| 3179 |
| 3180 unittest.test("method--delete", () { |
| 3181 |
| 3182 var mock = new HttpServerMock(); |
| 3183 api.ProjectsResourceApi res = new api.CloudresourcemanagerApi(mock).projec
ts; |
| 3184 var arg_projectId = "foo"; |
| 3185 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 3186 var path = (req.url).path; |
| 3187 var pathOffset = 0; |
| 3188 var index; |
| 3189 var subPart; |
| 3190 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 3191 pathOffset += 1; |
| 3192 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("v1/projects/")); |
| 3193 pathOffset += 12; |
| 3194 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| 3195 pathOffset = path.length; |
| 3196 unittest.expect(subPart, unittest.equals("$arg_projectId")); |
| 3197 |
| 3198 var query = (req.url).query; |
| 3199 var queryOffset = 0; |
| 3200 var queryMap = {}; |
| 3201 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 3202 parseBool(n) { |
| 3203 if (n == "true") return true; |
| 3204 if (n == "false") return false; |
| 3205 if (n == null) return null; |
| 3206 throw new core.ArgumentError("Invalid boolean: $n"); |
| 3207 } |
| 3208 if (query.length > 0) { |
| 3209 for (var part in query.split("&")) { |
| 3210 var keyvalue = part.split("="); |
| 3211 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 3212 } |
| 3213 } |
| 3214 |
| 3215 |
| 3216 var h = { |
| 3217 "content-type" : "application/json; charset=utf-8", |
| 3218 }; |
| 3219 var resp = convert.JSON.encode(buildEmpty()); |
| 3220 return new async.Future.value(stringResponse(200, h, resp)); |
| 3221 }), true); |
| 3222 res.delete(arg_projectId).then(unittest.expectAsync(((api.Empty response)
{ |
| 3223 checkEmpty(response); |
| 3224 }))); |
| 3225 }); |
| 3226 |
| 3227 unittest.test("method--get", () { |
| 3228 |
| 3229 var mock = new HttpServerMock(); |
| 3230 api.ProjectsResourceApi res = new api.CloudresourcemanagerApi(mock).projec
ts; |
| 3231 var arg_projectId = "foo"; |
| 3232 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 3233 var path = (req.url).path; |
| 3234 var pathOffset = 0; |
| 3235 var index; |
| 3236 var subPart; |
| 3237 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 3238 pathOffset += 1; |
| 3239 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("v1/projects/")); |
| 3240 pathOffset += 12; |
| 3241 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| 3242 pathOffset = path.length; |
| 3243 unittest.expect(subPart, unittest.equals("$arg_projectId")); |
| 3244 |
| 3245 var query = (req.url).query; |
| 3246 var queryOffset = 0; |
| 3247 var queryMap = {}; |
| 3248 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 3249 parseBool(n) { |
| 3250 if (n == "true") return true; |
| 3251 if (n == "false") return false; |
| 3252 if (n == null) return null; |
| 3253 throw new core.ArgumentError("Invalid boolean: $n"); |
| 3254 } |
| 3255 if (query.length > 0) { |
| 3256 for (var part in query.split("&")) { |
| 3257 var keyvalue = part.split("="); |
| 3258 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 3259 } |
| 3260 } |
| 3261 |
| 3262 |
| 3263 var h = { |
| 3264 "content-type" : "application/json; charset=utf-8", |
| 3265 }; |
| 3266 var resp = convert.JSON.encode(buildProject()); |
| 3267 return new async.Future.value(stringResponse(200, h, resp)); |
| 3268 }), true); |
| 3269 res.get(arg_projectId).then(unittest.expectAsync(((api.Project response) { |
| 3270 checkProject(response); |
| 3271 }))); |
| 3272 }); |
| 3273 |
| 3274 unittest.test("method--getAncestry", () { |
| 3275 |
| 3276 var mock = new HttpServerMock(); |
| 3277 api.ProjectsResourceApi res = new api.CloudresourcemanagerApi(mock).projec
ts; |
| 3278 var arg_request = buildGetAncestryRequest(); |
| 3279 var arg_projectId = "foo"; |
| 3280 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 3281 var obj = new api.GetAncestryRequest.fromJson(json); |
| 3282 checkGetAncestryRequest(obj); |
| 3283 |
| 3284 var path = (req.url).path; |
| 3285 var pathOffset = 0; |
| 3286 var index; |
| 3287 var subPart; |
| 3288 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 3289 pathOffset += 1; |
| 3290 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("v1/projects/")); |
| 3291 pathOffset += 12; |
| 3292 index = path.indexOf(":getAncestry", pathOffset); |
| 3293 unittest.expect(index >= 0, unittest.isTrue); |
| 3294 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); |
| 3295 pathOffset = index; |
| 3296 unittest.expect(subPart, unittest.equals("$arg_projectId")); |
| 3297 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals(":getAncestry")); |
| 3298 pathOffset += 12; |
| 3299 |
| 3300 var query = (req.url).query; |
| 3301 var queryOffset = 0; |
| 3302 var queryMap = {}; |
| 3303 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 3304 parseBool(n) { |
| 3305 if (n == "true") return true; |
| 3306 if (n == "false") return false; |
| 3307 if (n == null) return null; |
| 3308 throw new core.ArgumentError("Invalid boolean: $n"); |
| 3309 } |
| 3310 if (query.length > 0) { |
| 3311 for (var part in query.split("&")) { |
| 3312 var keyvalue = part.split("="); |
| 3313 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 3314 } |
| 3315 } |
1621 | 3316 |
1622 | 3317 |
1623 var h = { | 3318 var h = { |
1624 "content-type" : "application/json; charset=utf-8", | 3319 "content-type" : "application/json; charset=utf-8", |
1625 }; | 3320 }; |
1626 var resp = convert.JSON.encode(buildGetAncestryResponse()); | 3321 var resp = convert.JSON.encode(buildGetAncestryResponse()); |
1627 return new async.Future.value(stringResponse(200, h, resp)); | 3322 return new async.Future.value(stringResponse(200, h, resp)); |
1628 }), true); | 3323 }), true); |
1629 res.getAncestry(arg_request, arg_projectId).then(unittest.expectAsync(((ap
i.GetAncestryResponse response) { | 3324 res.getAncestry(arg_request, arg_projectId).then(unittest.expectAsync(((ap
i.GetAncestryResponse response) { |
1630 checkGetAncestryResponse(response); | 3325 checkGetAncestryResponse(response); |
1631 }))); | 3326 }))); |
1632 }); | 3327 }); |
1633 | 3328 |
| 3329 unittest.test("method--getEffectiveOrgPolicy", () { |
| 3330 |
| 3331 var mock = new HttpServerMock(); |
| 3332 api.ProjectsResourceApi res = new api.CloudresourcemanagerApi(mock).projec
ts; |
| 3333 var arg_request = buildGetEffectiveOrgPolicyRequest(); |
| 3334 var arg_resource = "foo"; |
| 3335 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 3336 var obj = new api.GetEffectiveOrgPolicyRequest.fromJson(json); |
| 3337 checkGetEffectiveOrgPolicyRequest(obj); |
| 3338 |
| 3339 var path = (req.url).path; |
| 3340 var pathOffset = 0; |
| 3341 var index; |
| 3342 var subPart; |
| 3343 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 3344 pathOffset += 1; |
| 3345 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); |
| 3346 pathOffset += 3; |
| 3347 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
| 3348 |
| 3349 var query = (req.url).query; |
| 3350 var queryOffset = 0; |
| 3351 var queryMap = {}; |
| 3352 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 3353 parseBool(n) { |
| 3354 if (n == "true") return true; |
| 3355 if (n == "false") return false; |
| 3356 if (n == null) return null; |
| 3357 throw new core.ArgumentError("Invalid boolean: $n"); |
| 3358 } |
| 3359 if (query.length > 0) { |
| 3360 for (var part in query.split("&")) { |
| 3361 var keyvalue = part.split("="); |
| 3362 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 3363 } |
| 3364 } |
| 3365 |
| 3366 |
| 3367 var h = { |
| 3368 "content-type" : "application/json; charset=utf-8", |
| 3369 }; |
| 3370 var resp = convert.JSON.encode(buildOrgPolicy()); |
| 3371 return new async.Future.value(stringResponse(200, h, resp)); |
| 3372 }), true); |
| 3373 res.getEffectiveOrgPolicy(arg_request, arg_resource).then(unittest.expectA
sync(((api.OrgPolicy response) { |
| 3374 checkOrgPolicy(response); |
| 3375 }))); |
| 3376 }); |
| 3377 |
| 3378 unittest.test("method--getEffectiveOrgPolicyV1", () { |
| 3379 |
| 3380 var mock = new HttpServerMock(); |
| 3381 api.ProjectsResourceApi res = new api.CloudresourcemanagerApi(mock).projec
ts; |
| 3382 var arg_request = buildGetEffectiveOrgPolicyRequest(); |
| 3383 var arg_resource = "foo"; |
| 3384 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 3385 var obj = new api.GetEffectiveOrgPolicyRequest.fromJson(json); |
| 3386 checkGetEffectiveOrgPolicyRequest(obj); |
| 3387 |
| 3388 var path = (req.url).path; |
| 3389 var pathOffset = 0; |
| 3390 var index; |
| 3391 var subPart; |
| 3392 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 3393 pathOffset += 1; |
| 3394 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); |
| 3395 pathOffset += 3; |
| 3396 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
| 3397 |
| 3398 var query = (req.url).query; |
| 3399 var queryOffset = 0; |
| 3400 var queryMap = {}; |
| 3401 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 3402 parseBool(n) { |
| 3403 if (n == "true") return true; |
| 3404 if (n == "false") return false; |
| 3405 if (n == null) return null; |
| 3406 throw new core.ArgumentError("Invalid boolean: $n"); |
| 3407 } |
| 3408 if (query.length > 0) { |
| 3409 for (var part in query.split("&")) { |
| 3410 var keyvalue = part.split("="); |
| 3411 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 3412 } |
| 3413 } |
| 3414 |
| 3415 |
| 3416 var h = { |
| 3417 "content-type" : "application/json; charset=utf-8", |
| 3418 }; |
| 3419 var resp = convert.JSON.encode(buildOrgPolicy()); |
| 3420 return new async.Future.value(stringResponse(200, h, resp)); |
| 3421 }), true); |
| 3422 res.getEffectiveOrgPolicyV1(arg_request, arg_resource).then(unittest.expec
tAsync(((api.OrgPolicy response) { |
| 3423 checkOrgPolicy(response); |
| 3424 }))); |
| 3425 }); |
| 3426 |
1634 unittest.test("method--getIamPolicy", () { | 3427 unittest.test("method--getIamPolicy", () { |
1635 | 3428 |
1636 var mock = new HttpServerMock(); | 3429 var mock = new HttpServerMock(); |
1637 api.ProjectsResourceApi res = new api.CloudresourcemanagerApi(mock).projec
ts; | 3430 api.ProjectsResourceApi res = new api.CloudresourcemanagerApi(mock).projec
ts; |
1638 var arg_request = buildGetIamPolicyRequest(); | 3431 var arg_request = buildGetIamPolicyRequest(); |
1639 var arg_resource = "foo"; | 3432 var arg_resource = "foo"; |
1640 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3433 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1641 var obj = new api.GetIamPolicyRequest.fromJson(json); | 3434 var obj = new api.GetIamPolicyRequest.fromJson(json); |
1642 checkGetIamPolicyRequest(obj); | 3435 checkGetIamPolicyRequest(obj); |
1643 | 3436 |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1679 "content-type" : "application/json; charset=utf-8", | 3472 "content-type" : "application/json; charset=utf-8", |
1680 }; | 3473 }; |
1681 var resp = convert.JSON.encode(buildPolicy()); | 3474 var resp = convert.JSON.encode(buildPolicy()); |
1682 return new async.Future.value(stringResponse(200, h, resp)); | 3475 return new async.Future.value(stringResponse(200, h, resp)); |
1683 }), true); | 3476 }), true); |
1684 res.getIamPolicy(arg_request, arg_resource).then(unittest.expectAsync(((ap
i.Policy response) { | 3477 res.getIamPolicy(arg_request, arg_resource).then(unittest.expectAsync(((ap
i.Policy response) { |
1685 checkPolicy(response); | 3478 checkPolicy(response); |
1686 }))); | 3479 }))); |
1687 }); | 3480 }); |
1688 | 3481 |
| 3482 unittest.test("method--getOrgPolicy", () { |
| 3483 |
| 3484 var mock = new HttpServerMock(); |
| 3485 api.ProjectsResourceApi res = new api.CloudresourcemanagerApi(mock).projec
ts; |
| 3486 var arg_request = buildGetOrgPolicyRequest(); |
| 3487 var arg_resource = "foo"; |
| 3488 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 3489 var obj = new api.GetOrgPolicyRequest.fromJson(json); |
| 3490 checkGetOrgPolicyRequest(obj); |
| 3491 |
| 3492 var path = (req.url).path; |
| 3493 var pathOffset = 0; |
| 3494 var index; |
| 3495 var subPart; |
| 3496 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 3497 pathOffset += 1; |
| 3498 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); |
| 3499 pathOffset += 3; |
| 3500 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
| 3501 |
| 3502 var query = (req.url).query; |
| 3503 var queryOffset = 0; |
| 3504 var queryMap = {}; |
| 3505 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 3506 parseBool(n) { |
| 3507 if (n == "true") return true; |
| 3508 if (n == "false") return false; |
| 3509 if (n == null) return null; |
| 3510 throw new core.ArgumentError("Invalid boolean: $n"); |
| 3511 } |
| 3512 if (query.length > 0) { |
| 3513 for (var part in query.split("&")) { |
| 3514 var keyvalue = part.split("="); |
| 3515 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 3516 } |
| 3517 } |
| 3518 |
| 3519 |
| 3520 var h = { |
| 3521 "content-type" : "application/json; charset=utf-8", |
| 3522 }; |
| 3523 var resp = convert.JSON.encode(buildOrgPolicy()); |
| 3524 return new async.Future.value(stringResponse(200, h, resp)); |
| 3525 }), true); |
| 3526 res.getOrgPolicy(arg_request, arg_resource).then(unittest.expectAsync(((ap
i.OrgPolicy response) { |
| 3527 checkOrgPolicy(response); |
| 3528 }))); |
| 3529 }); |
| 3530 |
| 3531 unittest.test("method--getOrgPolicyV1", () { |
| 3532 |
| 3533 var mock = new HttpServerMock(); |
| 3534 api.ProjectsResourceApi res = new api.CloudresourcemanagerApi(mock).projec
ts; |
| 3535 var arg_request = buildGetOrgPolicyRequest(); |
| 3536 var arg_resource = "foo"; |
| 3537 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 3538 var obj = new api.GetOrgPolicyRequest.fromJson(json); |
| 3539 checkGetOrgPolicyRequest(obj); |
| 3540 |
| 3541 var path = (req.url).path; |
| 3542 var pathOffset = 0; |
| 3543 var index; |
| 3544 var subPart; |
| 3545 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 3546 pathOffset += 1; |
| 3547 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); |
| 3548 pathOffset += 3; |
| 3549 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
| 3550 |
| 3551 var query = (req.url).query; |
| 3552 var queryOffset = 0; |
| 3553 var queryMap = {}; |
| 3554 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 3555 parseBool(n) { |
| 3556 if (n == "true") return true; |
| 3557 if (n == "false") return false; |
| 3558 if (n == null) return null; |
| 3559 throw new core.ArgumentError("Invalid boolean: $n"); |
| 3560 } |
| 3561 if (query.length > 0) { |
| 3562 for (var part in query.split("&")) { |
| 3563 var keyvalue = part.split("="); |
| 3564 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 3565 } |
| 3566 } |
| 3567 |
| 3568 |
| 3569 var h = { |
| 3570 "content-type" : "application/json; charset=utf-8", |
| 3571 }; |
| 3572 var resp = convert.JSON.encode(buildOrgPolicy()); |
| 3573 return new async.Future.value(stringResponse(200, h, resp)); |
| 3574 }), true); |
| 3575 res.getOrgPolicyV1(arg_request, arg_resource).then(unittest.expectAsync(((
api.OrgPolicy response) { |
| 3576 checkOrgPolicy(response); |
| 3577 }))); |
| 3578 }); |
| 3579 |
1689 unittest.test("method--list", () { | 3580 unittest.test("method--list", () { |
1690 | 3581 |
1691 var mock = new HttpServerMock(); | 3582 var mock = new HttpServerMock(); |
1692 api.ProjectsResourceApi res = new api.CloudresourcemanagerApi(mock).projec
ts; | 3583 api.ProjectsResourceApi res = new api.CloudresourcemanagerApi(mock).projec
ts; |
1693 var arg_filter = "foo"; | 3584 var arg_filter = "foo"; |
1694 var arg_pageToken = "foo"; | 3585 var arg_pageToken = "foo"; |
1695 var arg_pageSize = 42; | 3586 var arg_pageSize = 42; |
1696 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3587 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1697 var path = (req.url).path; | 3588 var path = (req.url).path; |
1698 var pathOffset = 0; | 3589 var pathOffset = 0; |
(...skipping 29 matching lines...) Expand all Loading... |
1728 "content-type" : "application/json; charset=utf-8", | 3619 "content-type" : "application/json; charset=utf-8", |
1729 }; | 3620 }; |
1730 var resp = convert.JSON.encode(buildListProjectsResponse()); | 3621 var resp = convert.JSON.encode(buildListProjectsResponse()); |
1731 return new async.Future.value(stringResponse(200, h, resp)); | 3622 return new async.Future.value(stringResponse(200, h, resp)); |
1732 }), true); | 3623 }), true); |
1733 res.list(filter: arg_filter, pageToken: arg_pageToken, pageSize: arg_pageS
ize).then(unittest.expectAsync(((api.ListProjectsResponse response) { | 3624 res.list(filter: arg_filter, pageToken: arg_pageToken, pageSize: arg_pageS
ize).then(unittest.expectAsync(((api.ListProjectsResponse response) { |
1734 checkListProjectsResponse(response); | 3625 checkListProjectsResponse(response); |
1735 }))); | 3626 }))); |
1736 }); | 3627 }); |
1737 | 3628 |
| 3629 unittest.test("method--listAvailableOrgPolicyConstraints", () { |
| 3630 |
| 3631 var mock = new HttpServerMock(); |
| 3632 api.ProjectsResourceApi res = new api.CloudresourcemanagerApi(mock).projec
ts; |
| 3633 var arg_request = buildListAvailableOrgPolicyConstraintsRequest(); |
| 3634 var arg_resource = "foo"; |
| 3635 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 3636 var obj = new api.ListAvailableOrgPolicyConstraintsRequest.fromJson(json
); |
| 3637 checkListAvailableOrgPolicyConstraintsRequest(obj); |
| 3638 |
| 3639 var path = (req.url).path; |
| 3640 var pathOffset = 0; |
| 3641 var index; |
| 3642 var subPart; |
| 3643 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 3644 pathOffset += 1; |
| 3645 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); |
| 3646 pathOffset += 3; |
| 3647 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
| 3648 |
| 3649 var query = (req.url).query; |
| 3650 var queryOffset = 0; |
| 3651 var queryMap = {}; |
| 3652 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 3653 parseBool(n) { |
| 3654 if (n == "true") return true; |
| 3655 if (n == "false") return false; |
| 3656 if (n == null) return null; |
| 3657 throw new core.ArgumentError("Invalid boolean: $n"); |
| 3658 } |
| 3659 if (query.length > 0) { |
| 3660 for (var part in query.split("&")) { |
| 3661 var keyvalue = part.split("="); |
| 3662 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 3663 } |
| 3664 } |
| 3665 |
| 3666 |
| 3667 var h = { |
| 3668 "content-type" : "application/json; charset=utf-8", |
| 3669 }; |
| 3670 var resp = convert.JSON.encode(buildListAvailableOrgPolicyConstraintsRes
ponse()); |
| 3671 return new async.Future.value(stringResponse(200, h, resp)); |
| 3672 }), true); |
| 3673 res.listAvailableOrgPolicyConstraints(arg_request, arg_resource).then(unit
test.expectAsync(((api.ListAvailableOrgPolicyConstraintsResponse response) { |
| 3674 checkListAvailableOrgPolicyConstraintsResponse(response); |
| 3675 }))); |
| 3676 }); |
| 3677 |
| 3678 unittest.test("method--listOrgPolicies", () { |
| 3679 |
| 3680 var mock = new HttpServerMock(); |
| 3681 api.ProjectsResourceApi res = new api.CloudresourcemanagerApi(mock).projec
ts; |
| 3682 var arg_request = buildListOrgPoliciesRequest(); |
| 3683 var arg_resource = "foo"; |
| 3684 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 3685 var obj = new api.ListOrgPoliciesRequest.fromJson(json); |
| 3686 checkListOrgPoliciesRequest(obj); |
| 3687 |
| 3688 var path = (req.url).path; |
| 3689 var pathOffset = 0; |
| 3690 var index; |
| 3691 var subPart; |
| 3692 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 3693 pathOffset += 1; |
| 3694 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); |
| 3695 pathOffset += 3; |
| 3696 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
| 3697 |
| 3698 var query = (req.url).query; |
| 3699 var queryOffset = 0; |
| 3700 var queryMap = {}; |
| 3701 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 3702 parseBool(n) { |
| 3703 if (n == "true") return true; |
| 3704 if (n == "false") return false; |
| 3705 if (n == null) return null; |
| 3706 throw new core.ArgumentError("Invalid boolean: $n"); |
| 3707 } |
| 3708 if (query.length > 0) { |
| 3709 for (var part in query.split("&")) { |
| 3710 var keyvalue = part.split("="); |
| 3711 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 3712 } |
| 3713 } |
| 3714 |
| 3715 |
| 3716 var h = { |
| 3717 "content-type" : "application/json; charset=utf-8", |
| 3718 }; |
| 3719 var resp = convert.JSON.encode(buildListOrgPoliciesResponse()); |
| 3720 return new async.Future.value(stringResponse(200, h, resp)); |
| 3721 }), true); |
| 3722 res.listOrgPolicies(arg_request, arg_resource).then(unittest.expectAsync((
(api.ListOrgPoliciesResponse response) { |
| 3723 checkListOrgPoliciesResponse(response); |
| 3724 }))); |
| 3725 }); |
| 3726 |
1738 unittest.test("method--setIamPolicy", () { | 3727 unittest.test("method--setIamPolicy", () { |
1739 | 3728 |
1740 var mock = new HttpServerMock(); | 3729 var mock = new HttpServerMock(); |
1741 api.ProjectsResourceApi res = new api.CloudresourcemanagerApi(mock).projec
ts; | 3730 api.ProjectsResourceApi res = new api.CloudresourcemanagerApi(mock).projec
ts; |
1742 var arg_request = buildSetIamPolicyRequest(); | 3731 var arg_request = buildSetIamPolicyRequest(); |
1743 var arg_resource = "foo"; | 3732 var arg_resource = "foo"; |
1744 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3733 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1745 var obj = new api.SetIamPolicyRequest.fromJson(json); | 3734 var obj = new api.SetIamPolicyRequest.fromJson(json); |
1746 checkSetIamPolicyRequest(obj); | 3735 checkSetIamPolicyRequest(obj); |
1747 | 3736 |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1783 "content-type" : "application/json; charset=utf-8", | 3772 "content-type" : "application/json; charset=utf-8", |
1784 }; | 3773 }; |
1785 var resp = convert.JSON.encode(buildPolicy()); | 3774 var resp = convert.JSON.encode(buildPolicy()); |
1786 return new async.Future.value(stringResponse(200, h, resp)); | 3775 return new async.Future.value(stringResponse(200, h, resp)); |
1787 }), true); | 3776 }), true); |
1788 res.setIamPolicy(arg_request, arg_resource).then(unittest.expectAsync(((ap
i.Policy response) { | 3777 res.setIamPolicy(arg_request, arg_resource).then(unittest.expectAsync(((ap
i.Policy response) { |
1789 checkPolicy(response); | 3778 checkPolicy(response); |
1790 }))); | 3779 }))); |
1791 }); | 3780 }); |
1792 | 3781 |
| 3782 unittest.test("method--setOrgPolicy", () { |
| 3783 |
| 3784 var mock = new HttpServerMock(); |
| 3785 api.ProjectsResourceApi res = new api.CloudresourcemanagerApi(mock).projec
ts; |
| 3786 var arg_request = buildSetOrgPolicyRequest(); |
| 3787 var arg_resource = "foo"; |
| 3788 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 3789 var obj = new api.SetOrgPolicyRequest.fromJson(json); |
| 3790 checkSetOrgPolicyRequest(obj); |
| 3791 |
| 3792 var path = (req.url).path; |
| 3793 var pathOffset = 0; |
| 3794 var index; |
| 3795 var subPart; |
| 3796 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 3797 pathOffset += 1; |
| 3798 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); |
| 3799 pathOffset += 3; |
| 3800 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
| 3801 |
| 3802 var query = (req.url).query; |
| 3803 var queryOffset = 0; |
| 3804 var queryMap = {}; |
| 3805 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 3806 parseBool(n) { |
| 3807 if (n == "true") return true; |
| 3808 if (n == "false") return false; |
| 3809 if (n == null) return null; |
| 3810 throw new core.ArgumentError("Invalid boolean: $n"); |
| 3811 } |
| 3812 if (query.length > 0) { |
| 3813 for (var part in query.split("&")) { |
| 3814 var keyvalue = part.split("="); |
| 3815 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 3816 } |
| 3817 } |
| 3818 |
| 3819 |
| 3820 var h = { |
| 3821 "content-type" : "application/json; charset=utf-8", |
| 3822 }; |
| 3823 var resp = convert.JSON.encode(buildOrgPolicy()); |
| 3824 return new async.Future.value(stringResponse(200, h, resp)); |
| 3825 }), true); |
| 3826 res.setOrgPolicy(arg_request, arg_resource).then(unittest.expectAsync(((ap
i.OrgPolicy response) { |
| 3827 checkOrgPolicy(response); |
| 3828 }))); |
| 3829 }); |
| 3830 |
| 3831 unittest.test("method--setOrgPolicyV1", () { |
| 3832 |
| 3833 var mock = new HttpServerMock(); |
| 3834 api.ProjectsResourceApi res = new api.CloudresourcemanagerApi(mock).projec
ts; |
| 3835 var arg_request = buildSetOrgPolicyRequest(); |
| 3836 var arg_resource = "foo"; |
| 3837 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 3838 var obj = new api.SetOrgPolicyRequest.fromJson(json); |
| 3839 checkSetOrgPolicyRequest(obj); |
| 3840 |
| 3841 var path = (req.url).path; |
| 3842 var pathOffset = 0; |
| 3843 var index; |
| 3844 var subPart; |
| 3845 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 3846 pathOffset += 1; |
| 3847 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); |
| 3848 pathOffset += 3; |
| 3849 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
| 3850 |
| 3851 var query = (req.url).query; |
| 3852 var queryOffset = 0; |
| 3853 var queryMap = {}; |
| 3854 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 3855 parseBool(n) { |
| 3856 if (n == "true") return true; |
| 3857 if (n == "false") return false; |
| 3858 if (n == null) return null; |
| 3859 throw new core.ArgumentError("Invalid boolean: $n"); |
| 3860 } |
| 3861 if (query.length > 0) { |
| 3862 for (var part in query.split("&")) { |
| 3863 var keyvalue = part.split("="); |
| 3864 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 3865 } |
| 3866 } |
| 3867 |
| 3868 |
| 3869 var h = { |
| 3870 "content-type" : "application/json; charset=utf-8", |
| 3871 }; |
| 3872 var resp = convert.JSON.encode(buildOrgPolicy()); |
| 3873 return new async.Future.value(stringResponse(200, h, resp)); |
| 3874 }), true); |
| 3875 res.setOrgPolicyV1(arg_request, arg_resource).then(unittest.expectAsync(((
api.OrgPolicy response) { |
| 3876 checkOrgPolicy(response); |
| 3877 }))); |
| 3878 }); |
| 3879 |
1793 unittest.test("method--testIamPermissions", () { | 3880 unittest.test("method--testIamPermissions", () { |
1794 | 3881 |
1795 var mock = new HttpServerMock(); | 3882 var mock = new HttpServerMock(); |
1796 api.ProjectsResourceApi res = new api.CloudresourcemanagerApi(mock).projec
ts; | 3883 api.ProjectsResourceApi res = new api.CloudresourcemanagerApi(mock).projec
ts; |
1797 var arg_request = buildTestIamPermissionsRequest(); | 3884 var arg_request = buildTestIamPermissionsRequest(); |
1798 var arg_resource = "foo"; | 3885 var arg_resource = "foo"; |
1799 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3886 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1800 var obj = new api.TestIamPermissionsRequest.fromJson(json); | 3887 var obj = new api.TestIamPermissionsRequest.fromJson(json); |
1801 checkTestIamPermissionsRequest(obj); | 3888 checkTestIamPermissionsRequest(obj); |
1802 | 3889 |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1949 res.update(arg_request, arg_projectId).then(unittest.expectAsync(((api.Pro
ject response) { | 4036 res.update(arg_request, arg_projectId).then(unittest.expectAsync(((api.Pro
ject response) { |
1950 checkProject(response); | 4037 checkProject(response); |
1951 }))); | 4038 }))); |
1952 }); | 4039 }); |
1953 | 4040 |
1954 }); | 4041 }); |
1955 | 4042 |
1956 | 4043 |
1957 } | 4044 } |
1958 | 4045 |
OLD | NEW |