Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(41)

Side by Side Diff: generated/googleapis_beta/test/cloudresourcemanager/v1beta1_test.dart

Issue 2695743002: Api-roll 45: 2017-02-13 (Closed)
Patch Set: reverted local changes to pubspec file Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 library googleapis_beta.cloudresourcemanager.v1beta1.test; 1 library googleapis_beta.cloudresourcemanager.v1beta1.test;
2 2
3 import "dart:core" as core; 3 import "dart:core" as core;
4 import "dart:collection" as collection; 4 import "dart:collection" as collection;
5 import "dart:async" as async; 5 import "dart:async" as async;
6 import "dart:convert" as convert; 6 import "dart:convert" as convert;
7 7
8 import 'package:http/http.dart' as http; 8 import 'package:http/http.dart' as http;
9 import 'package:http/testing.dart' as http_testing; 9 import 'package:http/testing.dart' as http_testing;
10 import 'package: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
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 buildUnnamed3638() { 73 buildUnnamed3730() {
74 var o = new core.List<core.String>(); 74 var o = new core.List<core.String>();
75 o.add("foo"); 75 o.add("foo");
76 o.add("foo"); 76 o.add("foo");
77 return o; 77 return o;
78 } 78 }
79 79
80 checkUnnamed3638(core.List<core.String> o) { 80 checkUnnamed3730(core.List<core.String> o) {
81 unittest.expect(o, unittest.hasLength(2)); 81 unittest.expect(o, unittest.hasLength(2));
82 unittest.expect(o[0], unittest.equals('foo')); 82 unittest.expect(o[0], unittest.equals('foo'));
83 unittest.expect(o[1], unittest.equals('foo')); 83 unittest.expect(o[1], unittest.equals('foo'));
84 } 84 }
85 85
86 core.int buildCounterBinding = 0; 86 core.int buildCounterBinding = 0;
87 buildBinding() { 87 buildBinding() {
88 var o = new api.Binding(); 88 var o = new api.Binding();
89 buildCounterBinding++; 89 buildCounterBinding++;
90 if (buildCounterBinding < 3) { 90 if (buildCounterBinding < 3) {
91 o.members = buildUnnamed3638(); 91 o.members = buildUnnamed3730();
92 o.role = "foo"; 92 o.role = "foo";
93 } 93 }
94 buildCounterBinding--; 94 buildCounterBinding--;
95 return o; 95 return o;
96 } 96 }
97 97
98 checkBinding(api.Binding o) { 98 checkBinding(api.Binding o) {
99 buildCounterBinding++; 99 buildCounterBinding++;
100 if (buildCounterBinding < 3) { 100 if (buildCounterBinding < 3) {
101 checkUnnamed3638(o.members); 101 checkUnnamed3730(o.members);
102 unittest.expect(o.role, unittest.equals('foo')); 102 unittest.expect(o.role, unittest.equals('foo'));
103 } 103 }
104 buildCounterBinding--; 104 buildCounterBinding--;
105 } 105 }
106 106
107 core.int buildCounterEmpty = 0; 107 core.int buildCounterEmpty = 0;
108 buildEmpty() { 108 buildEmpty() {
109 var o = new api.Empty(); 109 var o = new api.Empty();
110 buildCounterEmpty++; 110 buildCounterEmpty++;
111 if (buildCounterEmpty < 3) { 111 if (buildCounterEmpty < 3) {
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 return o; 175 return o;
176 } 176 }
177 177
178 checkGetAncestryRequest(api.GetAncestryRequest o) { 178 checkGetAncestryRequest(api.GetAncestryRequest o) {
179 buildCounterGetAncestryRequest++; 179 buildCounterGetAncestryRequest++;
180 if (buildCounterGetAncestryRequest < 3) { 180 if (buildCounterGetAncestryRequest < 3) {
181 } 181 }
182 buildCounterGetAncestryRequest--; 182 buildCounterGetAncestryRequest--;
183 } 183 }
184 184
185 buildUnnamed3639() { 185 buildUnnamed3731() {
186 var o = new core.List<api.Ancestor>(); 186 var o = new core.List<api.Ancestor>();
187 o.add(buildAncestor()); 187 o.add(buildAncestor());
188 o.add(buildAncestor()); 188 o.add(buildAncestor());
189 return o; 189 return o;
190 } 190 }
191 191
192 checkUnnamed3639(core.List<api.Ancestor> o) { 192 checkUnnamed3731(core.List<api.Ancestor> o) {
193 unittest.expect(o, unittest.hasLength(2)); 193 unittest.expect(o, unittest.hasLength(2));
194 checkAncestor(o[0]); 194 checkAncestor(o[0]);
195 checkAncestor(o[1]); 195 checkAncestor(o[1]);
196 } 196 }
197 197
198 core.int buildCounterGetAncestryResponse = 0; 198 core.int buildCounterGetAncestryResponse = 0;
199 buildGetAncestryResponse() { 199 buildGetAncestryResponse() {
200 var o = new api.GetAncestryResponse(); 200 var o = new api.GetAncestryResponse();
201 buildCounterGetAncestryResponse++; 201 buildCounterGetAncestryResponse++;
202 if (buildCounterGetAncestryResponse < 3) { 202 if (buildCounterGetAncestryResponse < 3) {
203 o.ancestor = buildUnnamed3639(); 203 o.ancestor = buildUnnamed3731();
204 } 204 }
205 buildCounterGetAncestryResponse--; 205 buildCounterGetAncestryResponse--;
206 return o; 206 return o;
207 } 207 }
208 208
209 checkGetAncestryResponse(api.GetAncestryResponse o) { 209 checkGetAncestryResponse(api.GetAncestryResponse o) {
210 buildCounterGetAncestryResponse++; 210 buildCounterGetAncestryResponse++;
211 if (buildCounterGetAncestryResponse < 3) { 211 if (buildCounterGetAncestryResponse < 3) {
212 checkUnnamed3639(o.ancestor); 212 checkUnnamed3731(o.ancestor);
213 } 213 }
214 buildCounterGetAncestryResponse--; 214 buildCounterGetAncestryResponse--;
215 } 215 }
216 216
217 core.int buildCounterGetIamPolicyRequest = 0; 217 core.int buildCounterGetIamPolicyRequest = 0;
218 buildGetIamPolicyRequest() { 218 buildGetIamPolicyRequest() {
219 var o = new api.GetIamPolicyRequest(); 219 var o = new api.GetIamPolicyRequest();
220 buildCounterGetIamPolicyRequest++; 220 buildCounterGetIamPolicyRequest++;
221 if (buildCounterGetIamPolicyRequest < 3) { 221 if (buildCounterGetIamPolicyRequest < 3) {
222 } 222 }
223 buildCounterGetIamPolicyRequest--; 223 buildCounterGetIamPolicyRequest--;
224 return o; 224 return o;
225 } 225 }
226 226
227 checkGetIamPolicyRequest(api.GetIamPolicyRequest o) { 227 checkGetIamPolicyRequest(api.GetIamPolicyRequest o) {
228 buildCounterGetIamPolicyRequest++; 228 buildCounterGetIamPolicyRequest++;
229 if (buildCounterGetIamPolicyRequest < 3) { 229 if (buildCounterGetIamPolicyRequest < 3) {
230 } 230 }
231 buildCounterGetIamPolicyRequest--; 231 buildCounterGetIamPolicyRequest--;
232 } 232 }
233 233
234 buildUnnamed3640() { 234 buildUnnamed3732() {
235 var o = new core.List<api.Organization>(); 235 var o = new core.List<api.Organization>();
236 o.add(buildOrganization()); 236 o.add(buildOrganization());
237 o.add(buildOrganization()); 237 o.add(buildOrganization());
238 return o; 238 return o;
239 } 239 }
240 240
241 checkUnnamed3640(core.List<api.Organization> o) { 241 checkUnnamed3732(core.List<api.Organization> o) {
242 unittest.expect(o, unittest.hasLength(2)); 242 unittest.expect(o, unittest.hasLength(2));
243 checkOrganization(o[0]); 243 checkOrganization(o[0]);
244 checkOrganization(o[1]); 244 checkOrganization(o[1]);
245 } 245 }
246 246
247 core.int buildCounterListOrganizationsResponse = 0; 247 core.int buildCounterListOrganizationsResponse = 0;
248 buildListOrganizationsResponse() { 248 buildListOrganizationsResponse() {
249 var o = new api.ListOrganizationsResponse(); 249 var o = new api.ListOrganizationsResponse();
250 buildCounterListOrganizationsResponse++; 250 buildCounterListOrganizationsResponse++;
251 if (buildCounterListOrganizationsResponse < 3) { 251 if (buildCounterListOrganizationsResponse < 3) {
252 o.nextPageToken = "foo"; 252 o.nextPageToken = "foo";
253 o.organizations = buildUnnamed3640(); 253 o.organizations = buildUnnamed3732();
254 } 254 }
255 buildCounterListOrganizationsResponse--; 255 buildCounterListOrganizationsResponse--;
256 return o; 256 return o;
257 } 257 }
258 258
259 checkListOrganizationsResponse(api.ListOrganizationsResponse o) { 259 checkListOrganizationsResponse(api.ListOrganizationsResponse o) {
260 buildCounterListOrganizationsResponse++; 260 buildCounterListOrganizationsResponse++;
261 if (buildCounterListOrganizationsResponse < 3) { 261 if (buildCounterListOrganizationsResponse < 3) {
262 unittest.expect(o.nextPageToken, unittest.equals('foo')); 262 unittest.expect(o.nextPageToken, unittest.equals('foo'));
263 checkUnnamed3640(o.organizations); 263 checkUnnamed3732(o.organizations);
264 } 264 }
265 buildCounterListOrganizationsResponse--; 265 buildCounterListOrganizationsResponse--;
266 } 266 }
267 267
268 buildUnnamed3641() { 268 buildUnnamed3733() {
269 var o = new core.List<api.Project>(); 269 var o = new core.List<api.Project>();
270 o.add(buildProject()); 270 o.add(buildProject());
271 o.add(buildProject()); 271 o.add(buildProject());
272 return o; 272 return o;
273 } 273 }
274 274
275 checkUnnamed3641(core.List<api.Project> o) { 275 checkUnnamed3733(core.List<api.Project> o) {
276 unittest.expect(o, unittest.hasLength(2)); 276 unittest.expect(o, unittest.hasLength(2));
277 checkProject(o[0]); 277 checkProject(o[0]);
278 checkProject(o[1]); 278 checkProject(o[1]);
279 } 279 }
280 280
281 core.int buildCounterListProjectsResponse = 0; 281 core.int buildCounterListProjectsResponse = 0;
282 buildListProjectsResponse() { 282 buildListProjectsResponse() {
283 var o = new api.ListProjectsResponse(); 283 var o = new api.ListProjectsResponse();
284 buildCounterListProjectsResponse++; 284 buildCounterListProjectsResponse++;
285 if (buildCounterListProjectsResponse < 3) { 285 if (buildCounterListProjectsResponse < 3) {
286 o.nextPageToken = "foo"; 286 o.nextPageToken = "foo";
287 o.projects = buildUnnamed3641(); 287 o.projects = buildUnnamed3733();
288 } 288 }
289 buildCounterListProjectsResponse--; 289 buildCounterListProjectsResponse--;
290 return o; 290 return o;
291 } 291 }
292 292
293 checkListProjectsResponse(api.ListProjectsResponse o) { 293 checkListProjectsResponse(api.ListProjectsResponse o) {
294 buildCounterListProjectsResponse++; 294 buildCounterListProjectsResponse++;
295 if (buildCounterListProjectsResponse < 3) { 295 if (buildCounterListProjectsResponse < 3) {
296 unittest.expect(o.nextPageToken, unittest.equals('foo')); 296 unittest.expect(o.nextPageToken, unittest.equals('foo'));
297 checkUnnamed3641(o.projects); 297 checkUnnamed3733(o.projects);
298 } 298 }
299 buildCounterListProjectsResponse--; 299 buildCounterListProjectsResponse--;
300 } 300 }
301 301
302 core.int buildCounterOrganization = 0; 302 core.int buildCounterOrganization = 0;
303 buildOrganization() { 303 buildOrganization() {
304 var o = new api.Organization(); 304 var o = new api.Organization();
305 buildCounterOrganization++; 305 buildCounterOrganization++;
306 if (buildCounterOrganization < 3) { 306 if (buildCounterOrganization < 3) {
307 o.creationTime = "foo"; 307 o.creationTime = "foo";
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 } 340 }
341 341
342 checkOrganizationOwner(api.OrganizationOwner o) { 342 checkOrganizationOwner(api.OrganizationOwner o) {
343 buildCounterOrganizationOwner++; 343 buildCounterOrganizationOwner++;
344 if (buildCounterOrganizationOwner < 3) { 344 if (buildCounterOrganizationOwner < 3) {
345 unittest.expect(o.directoryCustomerId, unittest.equals('foo')); 345 unittest.expect(o.directoryCustomerId, unittest.equals('foo'));
346 } 346 }
347 buildCounterOrganizationOwner--; 347 buildCounterOrganizationOwner--;
348 } 348 }
349 349
350 buildUnnamed3642() { 350 buildUnnamed3734() {
351 var o = new core.List<api.Binding>(); 351 var o = new core.List<api.Binding>();
352 o.add(buildBinding()); 352 o.add(buildBinding());
353 o.add(buildBinding()); 353 o.add(buildBinding());
354 return o; 354 return o;
355 } 355 }
356 356
357 checkUnnamed3642(core.List<api.Binding> o) { 357 checkUnnamed3734(core.List<api.Binding> o) {
358 unittest.expect(o, unittest.hasLength(2)); 358 unittest.expect(o, unittest.hasLength(2));
359 checkBinding(o[0]); 359 checkBinding(o[0]);
360 checkBinding(o[1]); 360 checkBinding(o[1]);
361 } 361 }
362 362
363 core.int buildCounterPolicy = 0; 363 core.int buildCounterPolicy = 0;
364 buildPolicy() { 364 buildPolicy() {
365 var o = new api.Policy(); 365 var o = new api.Policy();
366 buildCounterPolicy++; 366 buildCounterPolicy++;
367 if (buildCounterPolicy < 3) { 367 if (buildCounterPolicy < 3) {
368 o.bindings = buildUnnamed3642(); 368 o.bindings = buildUnnamed3734();
369 o.etag = "foo"; 369 o.etag = "foo";
370 o.version = 42; 370 o.version = 42;
371 } 371 }
372 buildCounterPolicy--; 372 buildCounterPolicy--;
373 return o; 373 return o;
374 } 374 }
375 375
376 checkPolicy(api.Policy o) { 376 checkPolicy(api.Policy o) {
377 buildCounterPolicy++; 377 buildCounterPolicy++;
378 if (buildCounterPolicy < 3) { 378 if (buildCounterPolicy < 3) {
379 checkUnnamed3642(o.bindings); 379 checkUnnamed3734(o.bindings);
380 unittest.expect(o.etag, unittest.equals('foo')); 380 unittest.expect(o.etag, unittest.equals('foo'));
381 unittest.expect(o.version, unittest.equals(42)); 381 unittest.expect(o.version, unittest.equals(42));
382 } 382 }
383 buildCounterPolicy--; 383 buildCounterPolicy--;
384 } 384 }
385 385
386 buildUnnamed3643() { 386 buildUnnamed3735() {
387 var o = new core.Map<core.String, core.String>(); 387 var o = new core.Map<core.String, core.String>();
388 o["x"] = "foo"; 388 o["x"] = "foo";
389 o["y"] = "foo"; 389 o["y"] = "foo";
390 return o; 390 return o;
391 } 391 }
392 392
393 checkUnnamed3643(core.Map<core.String, core.String> o) { 393 checkUnnamed3735(core.Map<core.String, core.String> o) {
394 unittest.expect(o, unittest.hasLength(2)); 394 unittest.expect(o, unittest.hasLength(2));
395 unittest.expect(o["x"], unittest.equals('foo')); 395 unittest.expect(o["x"], unittest.equals('foo'));
396 unittest.expect(o["y"], unittest.equals('foo')); 396 unittest.expect(o["y"], unittest.equals('foo'));
397 } 397 }
398 398
399 core.int buildCounterProject = 0; 399 core.int buildCounterProject = 0;
400 buildProject() { 400 buildProject() {
401 var o = new api.Project(); 401 var o = new api.Project();
402 buildCounterProject++; 402 buildCounterProject++;
403 if (buildCounterProject < 3) { 403 if (buildCounterProject < 3) {
404 o.createTime = "foo"; 404 o.createTime = "foo";
405 o.labels = buildUnnamed3643(); 405 o.labels = buildUnnamed3735();
406 o.lifecycleState = "foo"; 406 o.lifecycleState = "foo";
407 o.name = "foo"; 407 o.name = "foo";
408 o.parent = buildResourceId(); 408 o.parent = buildResourceId();
409 o.projectId = "foo"; 409 o.projectId = "foo";
410 o.projectNumber = "foo"; 410 o.projectNumber = "foo";
411 } 411 }
412 buildCounterProject--; 412 buildCounterProject--;
413 return o; 413 return o;
414 } 414 }
415 415
416 checkProject(api.Project o) { 416 checkProject(api.Project o) {
417 buildCounterProject++; 417 buildCounterProject++;
418 if (buildCounterProject < 3) { 418 if (buildCounterProject < 3) {
419 unittest.expect(o.createTime, unittest.equals('foo')); 419 unittest.expect(o.createTime, unittest.equals('foo'));
420 checkUnnamed3643(o.labels); 420 checkUnnamed3735(o.labels);
421 unittest.expect(o.lifecycleState, unittest.equals('foo')); 421 unittest.expect(o.lifecycleState, unittest.equals('foo'));
422 unittest.expect(o.name, unittest.equals('foo')); 422 unittest.expect(o.name, unittest.equals('foo'));
423 checkResourceId(o.parent); 423 checkResourceId(o.parent);
424 unittest.expect(o.projectId, unittest.equals('foo')); 424 unittest.expect(o.projectId, unittest.equals('foo'));
425 unittest.expect(o.projectNumber, unittest.equals('foo')); 425 unittest.expect(o.projectNumber, unittest.equals('foo'));
426 } 426 }
427 buildCounterProject--; 427 buildCounterProject--;
428 } 428 }
429 429
430 core.int buildCounterProjectCreationStatus = 0; 430 core.int buildCounterProjectCreationStatus = 0;
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
483 } 483 }
484 484
485 checkSetIamPolicyRequest(api.SetIamPolicyRequest o) { 485 checkSetIamPolicyRequest(api.SetIamPolicyRequest o) {
486 buildCounterSetIamPolicyRequest++; 486 buildCounterSetIamPolicyRequest++;
487 if (buildCounterSetIamPolicyRequest < 3) { 487 if (buildCounterSetIamPolicyRequest < 3) {
488 checkPolicy(o.policy); 488 checkPolicy(o.policy);
489 } 489 }
490 buildCounterSetIamPolicyRequest--; 490 buildCounterSetIamPolicyRequest--;
491 } 491 }
492 492
493 buildUnnamed3644() { 493 buildUnnamed3736() {
494 var o = new core.List<core.String>(); 494 var o = new core.List<core.String>();
495 o.add("foo"); 495 o.add("foo");
496 o.add("foo"); 496 o.add("foo");
497 return o; 497 return o;
498 } 498 }
499 499
500 checkUnnamed3644(core.List<core.String> o) { 500 checkUnnamed3736(core.List<core.String> o) {
501 unittest.expect(o, unittest.hasLength(2)); 501 unittest.expect(o, unittest.hasLength(2));
502 unittest.expect(o[0], unittest.equals('foo')); 502 unittest.expect(o[0], unittest.equals('foo'));
503 unittest.expect(o[1], unittest.equals('foo')); 503 unittest.expect(o[1], unittest.equals('foo'));
504 } 504 }
505 505
506 core.int buildCounterTestIamPermissionsRequest = 0; 506 core.int buildCounterTestIamPermissionsRequest = 0;
507 buildTestIamPermissionsRequest() { 507 buildTestIamPermissionsRequest() {
508 var o = new api.TestIamPermissionsRequest(); 508 var o = new api.TestIamPermissionsRequest();
509 buildCounterTestIamPermissionsRequest++; 509 buildCounterTestIamPermissionsRequest++;
510 if (buildCounterTestIamPermissionsRequest < 3) { 510 if (buildCounterTestIamPermissionsRequest < 3) {
511 o.permissions = buildUnnamed3644(); 511 o.permissions = buildUnnamed3736();
512 } 512 }
513 buildCounterTestIamPermissionsRequest--; 513 buildCounterTestIamPermissionsRequest--;
514 return o; 514 return o;
515 } 515 }
516 516
517 checkTestIamPermissionsRequest(api.TestIamPermissionsRequest o) { 517 checkTestIamPermissionsRequest(api.TestIamPermissionsRequest o) {
518 buildCounterTestIamPermissionsRequest++; 518 buildCounterTestIamPermissionsRequest++;
519 if (buildCounterTestIamPermissionsRequest < 3) { 519 if (buildCounterTestIamPermissionsRequest < 3) {
520 checkUnnamed3644(o.permissions); 520 checkUnnamed3736(o.permissions);
521 } 521 }
522 buildCounterTestIamPermissionsRequest--; 522 buildCounterTestIamPermissionsRequest--;
523 } 523 }
524 524
525 buildUnnamed3645() { 525 buildUnnamed3737() {
526 var o = new core.List<core.String>(); 526 var o = new core.List<core.String>();
527 o.add("foo"); 527 o.add("foo");
528 o.add("foo"); 528 o.add("foo");
529 return o; 529 return o;
530 } 530 }
531 531
532 checkUnnamed3645(core.List<core.String> o) { 532 checkUnnamed3737(core.List<core.String> o) {
533 unittest.expect(o, unittest.hasLength(2)); 533 unittest.expect(o, unittest.hasLength(2));
534 unittest.expect(o[0], unittest.equals('foo')); 534 unittest.expect(o[0], unittest.equals('foo'));
535 unittest.expect(o[1], unittest.equals('foo')); 535 unittest.expect(o[1], unittest.equals('foo'));
536 } 536 }
537 537
538 core.int buildCounterTestIamPermissionsResponse = 0; 538 core.int buildCounterTestIamPermissionsResponse = 0;
539 buildTestIamPermissionsResponse() { 539 buildTestIamPermissionsResponse() {
540 var o = new api.TestIamPermissionsResponse(); 540 var o = new api.TestIamPermissionsResponse();
541 buildCounterTestIamPermissionsResponse++; 541 buildCounterTestIamPermissionsResponse++;
542 if (buildCounterTestIamPermissionsResponse < 3) { 542 if (buildCounterTestIamPermissionsResponse < 3) {
543 o.permissions = buildUnnamed3645(); 543 o.permissions = buildUnnamed3737();
544 } 544 }
545 buildCounterTestIamPermissionsResponse--; 545 buildCounterTestIamPermissionsResponse--;
546 return o; 546 return o;
547 } 547 }
548 548
549 checkTestIamPermissionsResponse(api.TestIamPermissionsResponse o) { 549 checkTestIamPermissionsResponse(api.TestIamPermissionsResponse o) {
550 buildCounterTestIamPermissionsResponse++; 550 buildCounterTestIamPermissionsResponse++;
551 if (buildCounterTestIamPermissionsResponse < 3) { 551 if (buildCounterTestIamPermissionsResponse < 3) {
552 checkUnnamed3645(o.permissions); 552 checkUnnamed3737(o.permissions);
553 } 553 }
554 buildCounterTestIamPermissionsResponse--; 554 buildCounterTestIamPermissionsResponse--;
555 } 555 }
556 556
557 core.int buildCounterUndeleteProjectRequest = 0; 557 core.int buildCounterUndeleteProjectRequest = 0;
558 buildUndeleteProjectRequest() { 558 buildUndeleteProjectRequest() {
559 var o = new api.UndeleteProjectRequest(); 559 var o = new api.UndeleteProjectRequest();
560 buildCounterUndeleteProjectRequest++; 560 buildCounterUndeleteProjectRequest++;
561 if (buildCounterUndeleteProjectRequest < 3) { 561 if (buildCounterUndeleteProjectRequest < 3) {
562 } 562 }
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
847 }), true); 847 }), true);
848 res.getIamPolicy(arg_request, arg_resource).then(unittest.expectAsync(((ap i.Policy response) { 848 res.getIamPolicy(arg_request, arg_resource).then(unittest.expectAsync(((ap i.Policy response) {
849 checkPolicy(response); 849 checkPolicy(response);
850 }))); 850 })));
851 }); 851 });
852 852
853 unittest.test("method--list", () { 853 unittest.test("method--list", () {
854 854
855 var mock = new HttpServerMock(); 855 var mock = new HttpServerMock();
856 api.OrganizationsResourceApi res = new api.CloudresourcemanagerApi(mock).o rganizations; 856 api.OrganizationsResourceApi res = new api.CloudresourcemanagerApi(mock).o rganizations;
857 var arg_pageSize = 42;
858 var arg_filter = "foo"; 857 var arg_filter = "foo";
859 var arg_pageToken = "foo"; 858 var arg_pageToken = "foo";
859 var arg_pageSize = 42;
860 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 860 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
861 var path = (req.url).path; 861 var path = (req.url).path;
862 var pathOffset = 0; 862 var pathOffset = 0;
863 var index; 863 var index;
864 var subPart; 864 var subPart;
865 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 865 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
866 pathOffset += 1; 866 pathOffset += 1;
867 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq uals("v1beta1/organizations")); 867 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq uals("v1beta1/organizations"));
868 pathOffset += 21; 868 pathOffset += 21;
869 869
870 var query = (req.url).query; 870 var query = (req.url).query;
871 var queryOffset = 0; 871 var queryOffset = 0;
872 var queryMap = {}; 872 var queryMap = {};
873 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); 873 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
874 parseBool(n) { 874 parseBool(n) {
875 if (n == "true") return true; 875 if (n == "true") return true;
876 if (n == "false") return false; 876 if (n == "false") return false;
877 if (n == null) return null; 877 if (n == null) return null;
878 throw new core.ArgumentError("Invalid boolean: $n"); 878 throw new core.ArgumentError("Invalid boolean: $n");
879 } 879 }
880 if (query.length > 0) { 880 if (query.length > 0) {
881 for (var part in query.split("&")) { 881 for (var part in query.split("&")) {
882 var keyvalue = part.split("="); 882 var keyvalue = part.split("=");
883 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1])); 883 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
884 } 884 }
885 } 885 }
886 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ als(arg_pageSize));
887 unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); 886 unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter));
888 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en)); 887 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en));
888 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ als(arg_pageSize));
889 889
890 890
891 var h = { 891 var h = {
892 "content-type" : "application/json; charset=utf-8", 892 "content-type" : "application/json; charset=utf-8",
893 }; 893 };
894 var resp = convert.JSON.encode(buildListOrganizationsResponse()); 894 var resp = convert.JSON.encode(buildListOrganizationsResponse());
895 return new async.Future.value(stringResponse(200, h, resp)); 895 return new async.Future.value(stringResponse(200, h, resp));
896 }), true); 896 }), true);
897 res.list(pageSize: arg_pageSize, filter: arg_filter, pageToken: arg_pageTo ken).then(unittest.expectAsync(((api.ListOrganizationsResponse response) { 897 res.list(filter: arg_filter, pageToken: arg_pageToken, pageSize: arg_pageS ize).then(unittest.expectAsync(((api.ListOrganizationsResponse response) {
898 checkListOrganizationsResponse(response); 898 checkListOrganizationsResponse(response);
899 }))); 899 })));
900 }); 900 });
901 901
902 unittest.test("method--setIamPolicy", () { 902 unittest.test("method--setIamPolicy", () {
903 903
904 var mock = new HttpServerMock(); 904 var mock = new HttpServerMock();
905 api.OrganizationsResourceApi res = new api.CloudresourcemanagerApi(mock).o rganizations; 905 api.OrganizationsResourceApi res = new api.CloudresourcemanagerApi(mock).o rganizations;
906 var arg_request = buildSetIamPolicyRequest(); 906 var arg_request = buildSetIamPolicyRequest();
907 var arg_resource = "foo"; 907 var arg_resource = "foo";
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after
1300 }), true); 1300 }), true);
1301 res.getIamPolicy(arg_request, arg_resource).then(unittest.expectAsync(((ap i.Policy response) { 1301 res.getIamPolicy(arg_request, arg_resource).then(unittest.expectAsync(((ap i.Policy response) {
1302 checkPolicy(response); 1302 checkPolicy(response);
1303 }))); 1303 })));
1304 }); 1304 });
1305 1305
1306 unittest.test("method--list", () { 1306 unittest.test("method--list", () {
1307 1307
1308 var mock = new HttpServerMock(); 1308 var mock = new HttpServerMock();
1309 api.ProjectsResourceApi res = new api.CloudresourcemanagerApi(mock).projec ts; 1309 api.ProjectsResourceApi res = new api.CloudresourcemanagerApi(mock).projec ts;
1310 var arg_pageToken = "foo";
1310 var arg_pageSize = 42; 1311 var arg_pageSize = 42;
1311 var arg_filter = "foo"; 1312 var arg_filter = "foo";
1312 var arg_pageToken = "foo";
1313 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 1313 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
1314 var path = (req.url).path; 1314 var path = (req.url).path;
1315 var pathOffset = 0; 1315 var pathOffset = 0;
1316 var index; 1316 var index;
1317 var subPart; 1317 var subPart;
1318 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 1318 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
1319 pathOffset += 1; 1319 pathOffset += 1;
1320 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("v1beta1/projects")); 1320 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("v1beta1/projects"));
1321 pathOffset += 16; 1321 pathOffset += 16;
1322 1322
1323 var query = (req.url).query; 1323 var query = (req.url).query;
1324 var queryOffset = 0; 1324 var queryOffset = 0;
1325 var queryMap = {}; 1325 var queryMap = {};
1326 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); 1326 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
1327 parseBool(n) { 1327 parseBool(n) {
1328 if (n == "true") return true; 1328 if (n == "true") return true;
1329 if (n == "false") return false; 1329 if (n == "false") return false;
1330 if (n == null) return null; 1330 if (n == null) return null;
1331 throw new core.ArgumentError("Invalid boolean: $n"); 1331 throw new core.ArgumentError("Invalid boolean: $n");
1332 } 1332 }
1333 if (query.length > 0) { 1333 if (query.length > 0) {
1334 for (var part in query.split("&")) { 1334 for (var part in query.split("&")) {
1335 var keyvalue = part.split("="); 1335 var keyvalue = part.split("=");
1336 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1])); 1336 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
1337 } 1337 }
1338 } 1338 }
1339 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en));
1339 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ als(arg_pageSize)); 1340 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ als(arg_pageSize));
1340 unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); 1341 unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter));
1341 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en));
1342 1342
1343 1343
1344 var h = { 1344 var h = {
1345 "content-type" : "application/json; charset=utf-8", 1345 "content-type" : "application/json; charset=utf-8",
1346 }; 1346 };
1347 var resp = convert.JSON.encode(buildListProjectsResponse()); 1347 var resp = convert.JSON.encode(buildListProjectsResponse());
1348 return new async.Future.value(stringResponse(200, h, resp)); 1348 return new async.Future.value(stringResponse(200, h, resp));
1349 }), true); 1349 }), true);
1350 res.list(pageSize: arg_pageSize, filter: arg_filter, pageToken: arg_pageTo ken).then(unittest.expectAsync(((api.ListProjectsResponse response) { 1350 res.list(pageToken: arg_pageToken, pageSize: arg_pageSize, filter: arg_fil ter).then(unittest.expectAsync(((api.ListProjectsResponse response) {
1351 checkListProjectsResponse(response); 1351 checkListProjectsResponse(response);
1352 }))); 1352 })));
1353 }); 1353 });
1354 1354
1355 unittest.test("method--setIamPolicy", () { 1355 unittest.test("method--setIamPolicy", () {
1356 1356
1357 var mock = new HttpServerMock(); 1357 var mock = new HttpServerMock();
1358 api.ProjectsResourceApi res = new api.CloudresourcemanagerApi(mock).projec ts; 1358 api.ProjectsResourceApi res = new api.CloudresourcemanagerApi(mock).projec ts;
1359 var arg_request = buildSetIamPolicyRequest(); 1359 var arg_request = buildSetIamPolicyRequest();
1360 var arg_resource = "foo"; 1360 var arg_resource = "foo";
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
1566 res.update(arg_request, arg_projectId).then(unittest.expectAsync(((api.Pro ject response) { 1566 res.update(arg_request, arg_projectId).then(unittest.expectAsync(((api.Pro ject response) {
1567 checkProject(response); 1567 checkProject(response);
1568 }))); 1568 })));
1569 }); 1569 });
1570 1570
1571 }); 1571 });
1572 1572
1573 1573
1574 } 1574 }
1575 1575
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698