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

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

Issue 2485703002: Api-roll 42: 2016-11-08 (Closed)
Patch Set: Created 4 years, 1 month 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 buildUnnamed4096() { 73 buildUnnamed3933() {
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 checkUnnamed4096(core.List<core.String> o) { 80 checkUnnamed3933(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 = buildUnnamed4096(); 91 o.members = buildUnnamed3933();
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 checkUnnamed4096(o.members); 101 checkUnnamed3933(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) {
112 } 112 }
113 buildCounterEmpty--; 113 buildCounterEmpty--;
114 return o; 114 return o;
115 } 115 }
116 116
117 checkEmpty(api.Empty o) { 117 checkEmpty(api.Empty o) {
118 buildCounterEmpty++; 118 buildCounterEmpty++;
119 if (buildCounterEmpty < 3) { 119 if (buildCounterEmpty < 3) {
120 } 120 }
121 buildCounterEmpty--; 121 buildCounterEmpty--;
122 } 122 }
123 123
124 core.int buildCounterFolderOperation = 0;
125 buildFolderOperation() {
126 var o = new api.FolderOperation();
127 buildCounterFolderOperation++;
128 if (buildCounterFolderOperation < 3) {
129 o.destinationParent = "foo";
130 o.displayName = "foo";
131 o.operationType = "foo";
132 o.sourceParent = "foo";
133 }
134 buildCounterFolderOperation--;
135 return o;
136 }
137
138 checkFolderOperation(api.FolderOperation o) {
139 buildCounterFolderOperation++;
140 if (buildCounterFolderOperation < 3) {
141 unittest.expect(o.destinationParent, unittest.equals('foo'));
142 unittest.expect(o.displayName, unittest.equals('foo'));
143 unittest.expect(o.operationType, unittest.equals('foo'));
144 unittest.expect(o.sourceParent, unittest.equals('foo'));
145 }
146 buildCounterFolderOperation--;
147 }
148
149 core.int buildCounterFolderOperationError = 0;
150 buildFolderOperationError() {
151 var o = new api.FolderOperationError();
152 buildCounterFolderOperationError++;
153 if (buildCounterFolderOperationError < 3) {
154 o.errorMessageId = "foo";
155 }
156 buildCounterFolderOperationError--;
157 return o;
158 }
159
160 checkFolderOperationError(api.FolderOperationError o) {
161 buildCounterFolderOperationError++;
162 if (buildCounterFolderOperationError < 3) {
163 unittest.expect(o.errorMessageId, unittest.equals('foo'));
164 }
165 buildCounterFolderOperationError--;
166 }
167
124 core.int buildCounterGetAncestryRequest = 0; 168 core.int buildCounterGetAncestryRequest = 0;
125 buildGetAncestryRequest() { 169 buildGetAncestryRequest() {
126 var o = new api.GetAncestryRequest(); 170 var o = new api.GetAncestryRequest();
127 buildCounterGetAncestryRequest++; 171 buildCounterGetAncestryRequest++;
128 if (buildCounterGetAncestryRequest < 3) { 172 if (buildCounterGetAncestryRequest < 3) {
129 } 173 }
130 buildCounterGetAncestryRequest--; 174 buildCounterGetAncestryRequest--;
131 return o; 175 return o;
132 } 176 }
133 177
134 checkGetAncestryRequest(api.GetAncestryRequest o) { 178 checkGetAncestryRequest(api.GetAncestryRequest o) {
135 buildCounterGetAncestryRequest++; 179 buildCounterGetAncestryRequest++;
136 if (buildCounterGetAncestryRequest < 3) { 180 if (buildCounterGetAncestryRequest < 3) {
137 } 181 }
138 buildCounterGetAncestryRequest--; 182 buildCounterGetAncestryRequest--;
139 } 183 }
140 184
141 buildUnnamed4097() { 185 buildUnnamed3934() {
142 var o = new core.List<api.Ancestor>(); 186 var o = new core.List<api.Ancestor>();
143 o.add(buildAncestor()); 187 o.add(buildAncestor());
144 o.add(buildAncestor()); 188 o.add(buildAncestor());
145 return o; 189 return o;
146 } 190 }
147 191
148 checkUnnamed4097(core.List<api.Ancestor> o) { 192 checkUnnamed3934(core.List<api.Ancestor> o) {
149 unittest.expect(o, unittest.hasLength(2)); 193 unittest.expect(o, unittest.hasLength(2));
150 checkAncestor(o[0]); 194 checkAncestor(o[0]);
151 checkAncestor(o[1]); 195 checkAncestor(o[1]);
152 } 196 }
153 197
154 core.int buildCounterGetAncestryResponse = 0; 198 core.int buildCounterGetAncestryResponse = 0;
155 buildGetAncestryResponse() { 199 buildGetAncestryResponse() {
156 var o = new api.GetAncestryResponse(); 200 var o = new api.GetAncestryResponse();
157 buildCounterGetAncestryResponse++; 201 buildCounterGetAncestryResponse++;
158 if (buildCounterGetAncestryResponse < 3) { 202 if (buildCounterGetAncestryResponse < 3) {
159 o.ancestor = buildUnnamed4097(); 203 o.ancestor = buildUnnamed3934();
160 } 204 }
161 buildCounterGetAncestryResponse--; 205 buildCounterGetAncestryResponse--;
162 return o; 206 return o;
163 } 207 }
164 208
165 checkGetAncestryResponse(api.GetAncestryResponse o) { 209 checkGetAncestryResponse(api.GetAncestryResponse o) {
166 buildCounterGetAncestryResponse++; 210 buildCounterGetAncestryResponse++;
167 if (buildCounterGetAncestryResponse < 3) { 211 if (buildCounterGetAncestryResponse < 3) {
168 checkUnnamed4097(o.ancestor); 212 checkUnnamed3934(o.ancestor);
169 } 213 }
170 buildCounterGetAncestryResponse--; 214 buildCounterGetAncestryResponse--;
171 } 215 }
172 216
173 core.int buildCounterGetIamPolicyRequest = 0; 217 core.int buildCounterGetIamPolicyRequest = 0;
174 buildGetIamPolicyRequest() { 218 buildGetIamPolicyRequest() {
175 var o = new api.GetIamPolicyRequest(); 219 var o = new api.GetIamPolicyRequest();
176 buildCounterGetIamPolicyRequest++; 220 buildCounterGetIamPolicyRequest++;
177 if (buildCounterGetIamPolicyRequest < 3) { 221 if (buildCounterGetIamPolicyRequest < 3) {
178 } 222 }
179 buildCounterGetIamPolicyRequest--; 223 buildCounterGetIamPolicyRequest--;
180 return o; 224 return o;
181 } 225 }
182 226
183 checkGetIamPolicyRequest(api.GetIamPolicyRequest o) { 227 checkGetIamPolicyRequest(api.GetIamPolicyRequest o) {
184 buildCounterGetIamPolicyRequest++; 228 buildCounterGetIamPolicyRequest++;
185 if (buildCounterGetIamPolicyRequest < 3) { 229 if (buildCounterGetIamPolicyRequest < 3) {
186 } 230 }
187 buildCounterGetIamPolicyRequest--; 231 buildCounterGetIamPolicyRequest--;
188 } 232 }
189 233
190 buildUnnamed4098() { 234 buildUnnamed3935() {
191 var o = new core.List<api.Organization>(); 235 var o = new core.List<api.Organization>();
192 o.add(buildOrganization()); 236 o.add(buildOrganization());
193 o.add(buildOrganization()); 237 o.add(buildOrganization());
194 return o; 238 return o;
195 } 239 }
196 240
197 checkUnnamed4098(core.List<api.Organization> o) { 241 checkUnnamed3935(core.List<api.Organization> o) {
198 unittest.expect(o, unittest.hasLength(2)); 242 unittest.expect(o, unittest.hasLength(2));
199 checkOrganization(o[0]); 243 checkOrganization(o[0]);
200 checkOrganization(o[1]); 244 checkOrganization(o[1]);
201 } 245 }
202 246
203 core.int buildCounterListOrganizationsResponse = 0; 247 core.int buildCounterListOrganizationsResponse = 0;
204 buildListOrganizationsResponse() { 248 buildListOrganizationsResponse() {
205 var o = new api.ListOrganizationsResponse(); 249 var o = new api.ListOrganizationsResponse();
206 buildCounterListOrganizationsResponse++; 250 buildCounterListOrganizationsResponse++;
207 if (buildCounterListOrganizationsResponse < 3) { 251 if (buildCounterListOrganizationsResponse < 3) {
208 o.nextPageToken = "foo"; 252 o.nextPageToken = "foo";
209 o.organizations = buildUnnamed4098(); 253 o.organizations = buildUnnamed3935();
210 } 254 }
211 buildCounterListOrganizationsResponse--; 255 buildCounterListOrganizationsResponse--;
212 return o; 256 return o;
213 } 257 }
214 258
215 checkListOrganizationsResponse(api.ListOrganizationsResponse o) { 259 checkListOrganizationsResponse(api.ListOrganizationsResponse o) {
216 buildCounterListOrganizationsResponse++; 260 buildCounterListOrganizationsResponse++;
217 if (buildCounterListOrganizationsResponse < 3) { 261 if (buildCounterListOrganizationsResponse < 3) {
218 unittest.expect(o.nextPageToken, unittest.equals('foo')); 262 unittest.expect(o.nextPageToken, unittest.equals('foo'));
219 checkUnnamed4098(o.organizations); 263 checkUnnamed3935(o.organizations);
220 } 264 }
221 buildCounterListOrganizationsResponse--; 265 buildCounterListOrganizationsResponse--;
222 } 266 }
223 267
224 buildUnnamed4099() { 268 buildUnnamed3936() {
225 var o = new core.List<api.Project>(); 269 var o = new core.List<api.Project>();
226 o.add(buildProject()); 270 o.add(buildProject());
227 o.add(buildProject()); 271 o.add(buildProject());
228 return o; 272 return o;
229 } 273 }
230 274
231 checkUnnamed4099(core.List<api.Project> o) { 275 checkUnnamed3936(core.List<api.Project> o) {
232 unittest.expect(o, unittest.hasLength(2)); 276 unittest.expect(o, unittest.hasLength(2));
233 checkProject(o[0]); 277 checkProject(o[0]);
234 checkProject(o[1]); 278 checkProject(o[1]);
235 } 279 }
236 280
237 core.int buildCounterListProjectsResponse = 0; 281 core.int buildCounterListProjectsResponse = 0;
238 buildListProjectsResponse() { 282 buildListProjectsResponse() {
239 var o = new api.ListProjectsResponse(); 283 var o = new api.ListProjectsResponse();
240 buildCounterListProjectsResponse++; 284 buildCounterListProjectsResponse++;
241 if (buildCounterListProjectsResponse < 3) { 285 if (buildCounterListProjectsResponse < 3) {
242 o.nextPageToken = "foo"; 286 o.nextPageToken = "foo";
243 o.projects = buildUnnamed4099(); 287 o.projects = buildUnnamed3936();
244 } 288 }
245 buildCounterListProjectsResponse--; 289 buildCounterListProjectsResponse--;
246 return o; 290 return o;
247 } 291 }
248 292
249 checkListProjectsResponse(api.ListProjectsResponse o) { 293 checkListProjectsResponse(api.ListProjectsResponse o) {
250 buildCounterListProjectsResponse++; 294 buildCounterListProjectsResponse++;
251 if (buildCounterListProjectsResponse < 3) { 295 if (buildCounterListProjectsResponse < 3) {
252 unittest.expect(o.nextPageToken, unittest.equals('foo')); 296 unittest.expect(o.nextPageToken, unittest.equals('foo'));
253 checkUnnamed4099(o.projects); 297 checkUnnamed3936(o.projects);
254 } 298 }
255 buildCounterListProjectsResponse--; 299 buildCounterListProjectsResponse--;
256 } 300 }
257 301
258 core.int buildCounterOrganization = 0; 302 core.int buildCounterOrganization = 0;
259 buildOrganization() { 303 buildOrganization() {
260 var o = new api.Organization(); 304 var o = new api.Organization();
261 buildCounterOrganization++; 305 buildCounterOrganization++;
262 if (buildCounterOrganization < 3) { 306 if (buildCounterOrganization < 3) {
263 o.creationTime = "foo"; 307 o.creationTime = "foo";
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 } 340 }
297 341
298 checkOrganizationOwner(api.OrganizationOwner o) { 342 checkOrganizationOwner(api.OrganizationOwner o) {
299 buildCounterOrganizationOwner++; 343 buildCounterOrganizationOwner++;
300 if (buildCounterOrganizationOwner < 3) { 344 if (buildCounterOrganizationOwner < 3) {
301 unittest.expect(o.directoryCustomerId, unittest.equals('foo')); 345 unittest.expect(o.directoryCustomerId, unittest.equals('foo'));
302 } 346 }
303 buildCounterOrganizationOwner--; 347 buildCounterOrganizationOwner--;
304 } 348 }
305 349
306 buildUnnamed4100() { 350 buildUnnamed3937() {
307 var o = new core.List<api.Binding>(); 351 var o = new core.List<api.Binding>();
308 o.add(buildBinding()); 352 o.add(buildBinding());
309 o.add(buildBinding()); 353 o.add(buildBinding());
310 return o; 354 return o;
311 } 355 }
312 356
313 checkUnnamed4100(core.List<api.Binding> o) { 357 checkUnnamed3937(core.List<api.Binding> o) {
314 unittest.expect(o, unittest.hasLength(2)); 358 unittest.expect(o, unittest.hasLength(2));
315 checkBinding(o[0]); 359 checkBinding(o[0]);
316 checkBinding(o[1]); 360 checkBinding(o[1]);
317 } 361 }
318 362
319 core.int buildCounterPolicy = 0; 363 core.int buildCounterPolicy = 0;
320 buildPolicy() { 364 buildPolicy() {
321 var o = new api.Policy(); 365 var o = new api.Policy();
322 buildCounterPolicy++; 366 buildCounterPolicy++;
323 if (buildCounterPolicy < 3) { 367 if (buildCounterPolicy < 3) {
324 o.bindings = buildUnnamed4100(); 368 o.bindings = buildUnnamed3937();
325 o.etag = "foo"; 369 o.etag = "foo";
326 o.version = 42; 370 o.version = 42;
327 } 371 }
328 buildCounterPolicy--; 372 buildCounterPolicy--;
329 return o; 373 return o;
330 } 374 }
331 375
332 checkPolicy(api.Policy o) { 376 checkPolicy(api.Policy o) {
333 buildCounterPolicy++; 377 buildCounterPolicy++;
334 if (buildCounterPolicy < 3) { 378 if (buildCounterPolicy < 3) {
335 checkUnnamed4100(o.bindings); 379 checkUnnamed3937(o.bindings);
336 unittest.expect(o.etag, unittest.equals('foo')); 380 unittest.expect(o.etag, unittest.equals('foo'));
337 unittest.expect(o.version, unittest.equals(42)); 381 unittest.expect(o.version, unittest.equals(42));
338 } 382 }
339 buildCounterPolicy--; 383 buildCounterPolicy--;
340 } 384 }
341 385
342 buildUnnamed4101() { 386 buildUnnamed3938() {
343 var o = new core.Map<core.String, core.String>(); 387 var o = new core.Map<core.String, core.String>();
344 o["x"] = "foo"; 388 o["x"] = "foo";
345 o["y"] = "foo"; 389 o["y"] = "foo";
346 return o; 390 return o;
347 } 391 }
348 392
349 checkUnnamed4101(core.Map<core.String, core.String> o) { 393 checkUnnamed3938(core.Map<core.String, core.String> o) {
350 unittest.expect(o, unittest.hasLength(2)); 394 unittest.expect(o, unittest.hasLength(2));
351 unittest.expect(o["x"], unittest.equals('foo')); 395 unittest.expect(o["x"], unittest.equals('foo'));
352 unittest.expect(o["y"], unittest.equals('foo')); 396 unittest.expect(o["y"], unittest.equals('foo'));
353 } 397 }
354 398
355 core.int buildCounterProject = 0; 399 core.int buildCounterProject = 0;
356 buildProject() { 400 buildProject() {
357 var o = new api.Project(); 401 var o = new api.Project();
358 buildCounterProject++; 402 buildCounterProject++;
359 if (buildCounterProject < 3) { 403 if (buildCounterProject < 3) {
360 o.createTime = "foo"; 404 o.createTime = "foo";
361 o.labels = buildUnnamed4101(); 405 o.labels = buildUnnamed3938();
362 o.lifecycleState = "foo"; 406 o.lifecycleState = "foo";
363 o.name = "foo"; 407 o.name = "foo";
364 o.parent = buildResourceId(); 408 o.parent = buildResourceId();
365 o.projectId = "foo"; 409 o.projectId = "foo";
366 o.projectNumber = "foo"; 410 o.projectNumber = "foo";
367 } 411 }
368 buildCounterProject--; 412 buildCounterProject--;
369 return o; 413 return o;
370 } 414 }
371 415
372 checkProject(api.Project o) { 416 checkProject(api.Project o) {
373 buildCounterProject++; 417 buildCounterProject++;
374 if (buildCounterProject < 3) { 418 if (buildCounterProject < 3) {
375 unittest.expect(o.createTime, unittest.equals('foo')); 419 unittest.expect(o.createTime, unittest.equals('foo'));
376 checkUnnamed4101(o.labels); 420 checkUnnamed3938(o.labels);
377 unittest.expect(o.lifecycleState, unittest.equals('foo')); 421 unittest.expect(o.lifecycleState, unittest.equals('foo'));
378 unittest.expect(o.name, unittest.equals('foo')); 422 unittest.expect(o.name, unittest.equals('foo'));
379 checkResourceId(o.parent); 423 checkResourceId(o.parent);
380 unittest.expect(o.projectId, unittest.equals('foo')); 424 unittest.expect(o.projectId, unittest.equals('foo'));
381 unittest.expect(o.projectNumber, unittest.equals('foo')); 425 unittest.expect(o.projectNumber, unittest.equals('foo'));
382 } 426 }
383 buildCounterProject--; 427 buildCounterProject--;
384 } 428 }
385 429
430 core.int buildCounterProjectCreationStatus = 0;
431 buildProjectCreationStatus() {
432 var o = new api.ProjectCreationStatus();
433 buildCounterProjectCreationStatus++;
434 if (buildCounterProjectCreationStatus < 3) {
435 o.createTime = "foo";
436 o.gettable = true;
437 o.ready = true;
438 }
439 buildCounterProjectCreationStatus--;
440 return o;
441 }
442
443 checkProjectCreationStatus(api.ProjectCreationStatus o) {
444 buildCounterProjectCreationStatus++;
445 if (buildCounterProjectCreationStatus < 3) {
446 unittest.expect(o.createTime, unittest.equals('foo'));
447 unittest.expect(o.gettable, unittest.isTrue);
448 unittest.expect(o.ready, unittest.isTrue);
449 }
450 buildCounterProjectCreationStatus--;
451 }
452
386 core.int buildCounterResourceId = 0; 453 core.int buildCounterResourceId = 0;
387 buildResourceId() { 454 buildResourceId() {
388 var o = new api.ResourceId(); 455 var o = new api.ResourceId();
389 buildCounterResourceId++; 456 buildCounterResourceId++;
390 if (buildCounterResourceId < 3) { 457 if (buildCounterResourceId < 3) {
391 o.id = "foo"; 458 o.id = "foo";
392 o.type = "foo"; 459 o.type = "foo";
393 } 460 }
394 buildCounterResourceId--; 461 buildCounterResourceId--;
395 return o; 462 return o;
(...skipping 20 matching lines...) Expand all
416 } 483 }
417 484
418 checkSetIamPolicyRequest(api.SetIamPolicyRequest o) { 485 checkSetIamPolicyRequest(api.SetIamPolicyRequest o) {
419 buildCounterSetIamPolicyRequest++; 486 buildCounterSetIamPolicyRequest++;
420 if (buildCounterSetIamPolicyRequest < 3) { 487 if (buildCounterSetIamPolicyRequest < 3) {
421 checkPolicy(o.policy); 488 checkPolicy(o.policy);
422 } 489 }
423 buildCounterSetIamPolicyRequest--; 490 buildCounterSetIamPolicyRequest--;
424 } 491 }
425 492
426 buildUnnamed4102() { 493 buildUnnamed3939() {
427 var o = new core.List<core.String>(); 494 var o = new core.List<core.String>();
428 o.add("foo"); 495 o.add("foo");
429 o.add("foo"); 496 o.add("foo");
430 return o; 497 return o;
431 } 498 }
432 499
433 checkUnnamed4102(core.List<core.String> o) { 500 checkUnnamed3939(core.List<core.String> o) {
434 unittest.expect(o, unittest.hasLength(2)); 501 unittest.expect(o, unittest.hasLength(2));
435 unittest.expect(o[0], unittest.equals('foo')); 502 unittest.expect(o[0], unittest.equals('foo'));
436 unittest.expect(o[1], unittest.equals('foo')); 503 unittest.expect(o[1], unittest.equals('foo'));
437 } 504 }
438 505
439 core.int buildCounterTestIamPermissionsRequest = 0; 506 core.int buildCounterTestIamPermissionsRequest = 0;
440 buildTestIamPermissionsRequest() { 507 buildTestIamPermissionsRequest() {
441 var o = new api.TestIamPermissionsRequest(); 508 var o = new api.TestIamPermissionsRequest();
442 buildCounterTestIamPermissionsRequest++; 509 buildCounterTestIamPermissionsRequest++;
443 if (buildCounterTestIamPermissionsRequest < 3) { 510 if (buildCounterTestIamPermissionsRequest < 3) {
444 o.permissions = buildUnnamed4102(); 511 o.permissions = buildUnnamed3939();
445 } 512 }
446 buildCounterTestIamPermissionsRequest--; 513 buildCounterTestIamPermissionsRequest--;
447 return o; 514 return o;
448 } 515 }
449 516
450 checkTestIamPermissionsRequest(api.TestIamPermissionsRequest o) { 517 checkTestIamPermissionsRequest(api.TestIamPermissionsRequest o) {
451 buildCounterTestIamPermissionsRequest++; 518 buildCounterTestIamPermissionsRequest++;
452 if (buildCounterTestIamPermissionsRequest < 3) { 519 if (buildCounterTestIamPermissionsRequest < 3) {
453 checkUnnamed4102(o.permissions); 520 checkUnnamed3939(o.permissions);
454 } 521 }
455 buildCounterTestIamPermissionsRequest--; 522 buildCounterTestIamPermissionsRequest--;
456 } 523 }
457 524
458 buildUnnamed4103() { 525 buildUnnamed3940() {
459 var o = new core.List<core.String>(); 526 var o = new core.List<core.String>();
460 o.add("foo"); 527 o.add("foo");
461 o.add("foo"); 528 o.add("foo");
462 return o; 529 return o;
463 } 530 }
464 531
465 checkUnnamed4103(core.List<core.String> o) { 532 checkUnnamed3940(core.List<core.String> o) {
466 unittest.expect(o, unittest.hasLength(2)); 533 unittest.expect(o, unittest.hasLength(2));
467 unittest.expect(o[0], unittest.equals('foo')); 534 unittest.expect(o[0], unittest.equals('foo'));
468 unittest.expect(o[1], unittest.equals('foo')); 535 unittest.expect(o[1], unittest.equals('foo'));
469 } 536 }
470 537
471 core.int buildCounterTestIamPermissionsResponse = 0; 538 core.int buildCounterTestIamPermissionsResponse = 0;
472 buildTestIamPermissionsResponse() { 539 buildTestIamPermissionsResponse() {
473 var o = new api.TestIamPermissionsResponse(); 540 var o = new api.TestIamPermissionsResponse();
474 buildCounterTestIamPermissionsResponse++; 541 buildCounterTestIamPermissionsResponse++;
475 if (buildCounterTestIamPermissionsResponse < 3) { 542 if (buildCounterTestIamPermissionsResponse < 3) {
476 o.permissions = buildUnnamed4103(); 543 o.permissions = buildUnnamed3940();
477 } 544 }
478 buildCounterTestIamPermissionsResponse--; 545 buildCounterTestIamPermissionsResponse--;
479 return o; 546 return o;
480 } 547 }
481 548
482 checkTestIamPermissionsResponse(api.TestIamPermissionsResponse o) { 549 checkTestIamPermissionsResponse(api.TestIamPermissionsResponse o) {
483 buildCounterTestIamPermissionsResponse++; 550 buildCounterTestIamPermissionsResponse++;
484 if (buildCounterTestIamPermissionsResponse < 3) { 551 if (buildCounterTestIamPermissionsResponse < 3) {
485 checkUnnamed4103(o.permissions); 552 checkUnnamed3940(o.permissions);
486 } 553 }
487 buildCounterTestIamPermissionsResponse--; 554 buildCounterTestIamPermissionsResponse--;
488 } 555 }
489 556
490 core.int buildCounterUndeleteProjectRequest = 0; 557 core.int buildCounterUndeleteProjectRequest = 0;
491 buildUndeleteProjectRequest() { 558 buildUndeleteProjectRequest() {
492 var o = new api.UndeleteProjectRequest(); 559 var o = new api.UndeleteProjectRequest();
493 buildCounterUndeleteProjectRequest++; 560 buildCounterUndeleteProjectRequest++;
494 if (buildCounterUndeleteProjectRequest < 3) { 561 if (buildCounterUndeleteProjectRequest < 3) {
495 } 562 }
(...skipping 30 matching lines...) Expand all
526 593
527 unittest.group("obj-schema-Empty", () { 594 unittest.group("obj-schema-Empty", () {
528 unittest.test("to-json--from-json", () { 595 unittest.test("to-json--from-json", () {
529 var o = buildEmpty(); 596 var o = buildEmpty();
530 var od = new api.Empty.fromJson(o.toJson()); 597 var od = new api.Empty.fromJson(o.toJson());
531 checkEmpty(od); 598 checkEmpty(od);
532 }); 599 });
533 }); 600 });
534 601
535 602
603 unittest.group("obj-schema-FolderOperation", () {
604 unittest.test("to-json--from-json", () {
605 var o = buildFolderOperation();
606 var od = new api.FolderOperation.fromJson(o.toJson());
607 checkFolderOperation(od);
608 });
609 });
610
611
612 unittest.group("obj-schema-FolderOperationError", () {
613 unittest.test("to-json--from-json", () {
614 var o = buildFolderOperationError();
615 var od = new api.FolderOperationError.fromJson(o.toJson());
616 checkFolderOperationError(od);
617 });
618 });
619
620
536 unittest.group("obj-schema-GetAncestryRequest", () { 621 unittest.group("obj-schema-GetAncestryRequest", () {
537 unittest.test("to-json--from-json", () { 622 unittest.test("to-json--from-json", () {
538 var o = buildGetAncestryRequest(); 623 var o = buildGetAncestryRequest();
539 var od = new api.GetAncestryRequest.fromJson(o.toJson()); 624 var od = new api.GetAncestryRequest.fromJson(o.toJson());
540 checkGetAncestryRequest(od); 625 checkGetAncestryRequest(od);
541 }); 626 });
542 }); 627 });
543 628
544 629
545 unittest.group("obj-schema-GetAncestryResponse", () { 630 unittest.group("obj-schema-GetAncestryResponse", () {
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
607 692
608 unittest.group("obj-schema-Project", () { 693 unittest.group("obj-schema-Project", () {
609 unittest.test("to-json--from-json", () { 694 unittest.test("to-json--from-json", () {
610 var o = buildProject(); 695 var o = buildProject();
611 var od = new api.Project.fromJson(o.toJson()); 696 var od = new api.Project.fromJson(o.toJson());
612 checkProject(od); 697 checkProject(od);
613 }); 698 });
614 }); 699 });
615 700
616 701
702 unittest.group("obj-schema-ProjectCreationStatus", () {
703 unittest.test("to-json--from-json", () {
704 var o = buildProjectCreationStatus();
705 var od = new api.ProjectCreationStatus.fromJson(o.toJson());
706 checkProjectCreationStatus(od);
707 });
708 });
709
710
617 unittest.group("obj-schema-ResourceId", () { 711 unittest.group("obj-schema-ResourceId", () {
618 unittest.test("to-json--from-json", () { 712 unittest.test("to-json--from-json", () {
619 var o = buildResourceId(); 713 var o = buildResourceId();
620 var od = new api.ResourceId.fromJson(o.toJson()); 714 var od = new api.ResourceId.fromJson(o.toJson());
621 checkResourceId(od); 715 checkResourceId(od);
622 }); 716 });
623 }); 717 });
624 718
625 719
626 unittest.group("obj-schema-SetIamPolicyRequest", () { 720 unittest.group("obj-schema-SetIamPolicyRequest", () {
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
954 1048
955 }); 1049 });
956 1050
957 1051
958 unittest.group("resource-ProjectsResourceApi", () { 1052 unittest.group("resource-ProjectsResourceApi", () {
959 unittest.test("method--create", () { 1053 unittest.test("method--create", () {
960 1054
961 var mock = new HttpServerMock(); 1055 var mock = new HttpServerMock();
962 api.ProjectsResourceApi res = new api.CloudresourcemanagerApi(mock).projec ts; 1056 api.ProjectsResourceApi res = new api.CloudresourcemanagerApi(mock).projec ts;
963 var arg_request = buildProject(); 1057 var arg_request = buildProject();
1058 var arg_useLegacyStack = true;
964 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 1059 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
965 var obj = new api.Project.fromJson(json); 1060 var obj = new api.Project.fromJson(json);
966 checkProject(obj); 1061 checkProject(obj);
967 1062
968 var path = (req.url).path; 1063 var path = (req.url).path;
969 var pathOffset = 0; 1064 var pathOffset = 0;
970 var index; 1065 var index;
971 var subPart; 1066 var subPart;
972 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 1067 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
973 pathOffset += 1; 1068 pathOffset += 1;
974 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("v1beta1/projects")); 1069 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("v1beta1/projects"));
975 pathOffset += 16; 1070 pathOffset += 16;
976 1071
977 var query = (req.url).query; 1072 var query = (req.url).query;
978 var queryOffset = 0; 1073 var queryOffset = 0;
979 var queryMap = {}; 1074 var queryMap = {};
980 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); 1075 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
981 parseBool(n) { 1076 parseBool(n) {
982 if (n == "true") return true; 1077 if (n == "true") return true;
983 if (n == "false") return false; 1078 if (n == "false") return false;
984 if (n == null) return null; 1079 if (n == null) return null;
985 throw new core.ArgumentError("Invalid boolean: $n"); 1080 throw new core.ArgumentError("Invalid boolean: $n");
986 } 1081 }
987 if (query.length > 0) { 1082 if (query.length > 0) {
988 for (var part in query.split("&")) { 1083 for (var part in query.split("&")) {
989 var keyvalue = part.split("="); 1084 var keyvalue = part.split("=");
990 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1])); 1085 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
991 } 1086 }
992 } 1087 }
1088 unittest.expect(queryMap["useLegacyStack"].first, unittest.equals("$arg_ useLegacyStack"));
993 1089
994 1090
995 var h = { 1091 var h = {
996 "content-type" : "application/json; charset=utf-8", 1092 "content-type" : "application/json; charset=utf-8",
997 }; 1093 };
998 var resp = convert.JSON.encode(buildProject()); 1094 var resp = convert.JSON.encode(buildProject());
999 return new async.Future.value(stringResponse(200, h, resp)); 1095 return new async.Future.value(stringResponse(200, h, resp));
1000 }), true); 1096 }), true);
1001 res.create(arg_request).then(unittest.expectAsync(((api.Project response) { 1097 res.create(arg_request, useLegacyStack: arg_useLegacyStack).then(unittest. expectAsync(((api.Project response) {
1002 checkProject(response); 1098 checkProject(response);
1003 }))); 1099 })));
1004 }); 1100 });
1005 1101
1006 unittest.test("method--delete", () { 1102 unittest.test("method--delete", () {
1007 1103
1008 var mock = new HttpServerMock(); 1104 var mock = new HttpServerMock();
1009 api.ProjectsResourceApi res = new api.CloudresourcemanagerApi(mock).projec ts; 1105 api.ProjectsResourceApi res = new api.CloudresourcemanagerApi(mock).projec ts;
1010 var arg_projectId = "foo"; 1106 var arg_projectId = "foo";
1011 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 1107 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
(...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after
1470 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) {
1471 checkProject(response); 1567 checkProject(response);
1472 }))); 1568 })));
1473 }); 1569 });
1474 1570
1475 }); 1571 });
1476 1572
1477 1573
1478 } 1574 }
1479 1575
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698