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

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

Issue 1797933002: Api-roll 33: 2016-03-14 (Closed) Base URL: git@github.com:dart-lang/googleapis.git@master
Patch Set: Added resources/*/CHANGELOG.md, addresssed comments Created 4 years, 9 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 } 44 }
45 } 45 }
46 } 46 }
47 47
48 http.StreamedResponse stringResponse( 48 http.StreamedResponse stringResponse(
49 core.int status, core.Map headers, core.String body) { 49 core.int status, core.Map headers, core.String body) {
50 var stream = new async.Stream.fromIterable([convert.UTF8.encode(body)]); 50 var stream = new async.Stream.fromIterable([convert.UTF8.encode(body)]);
51 return new http.StreamedResponse(stream, status, headers: headers); 51 return new http.StreamedResponse(stream, status, headers: headers);
52 } 52 }
53 53
54 buildUnnamed3052() { 54 buildUnnamed3398() {
55 var o = new core.List<core.String>(); 55 var o = new core.List<core.String>();
56 o.add("foo"); 56 o.add("foo");
57 o.add("foo"); 57 o.add("foo");
58 return o; 58 return o;
59 } 59 }
60 60
61 checkUnnamed3052(core.List<core.String> o) { 61 checkUnnamed3398(core.List<core.String> o) {
62 unittest.expect(o, unittest.hasLength(2)); 62 unittest.expect(o, unittest.hasLength(2));
63 unittest.expect(o[0], unittest.equals('foo')); 63 unittest.expect(o[0], unittest.equals('foo'));
64 unittest.expect(o[1], unittest.equals('foo')); 64 unittest.expect(o[1], unittest.equals('foo'));
65 } 65 }
66 66
67 core.int buildCounterBinding = 0; 67 core.int buildCounterBinding = 0;
68 buildBinding() { 68 buildBinding() {
69 var o = new api.Binding(); 69 var o = new api.Binding();
70 buildCounterBinding++; 70 buildCounterBinding++;
71 if (buildCounterBinding < 3) { 71 if (buildCounterBinding < 3) {
72 o.members = buildUnnamed3052(); 72 o.members = buildUnnamed3398();
73 o.role = "foo"; 73 o.role = "foo";
74 } 74 }
75 buildCounterBinding--; 75 buildCounterBinding--;
76 return o; 76 return o;
77 } 77 }
78 78
79 checkBinding(api.Binding o) { 79 checkBinding(api.Binding o) {
80 buildCounterBinding++; 80 buildCounterBinding++;
81 if (buildCounterBinding < 3) { 81 if (buildCounterBinding < 3) {
82 checkUnnamed3052(o.members); 82 checkUnnamed3398(o.members);
83 unittest.expect(o.role, unittest.equals('foo')); 83 unittest.expect(o.role, unittest.equals('foo'));
84 } 84 }
85 buildCounterBinding--; 85 buildCounterBinding--;
86 } 86 }
87 87
88 core.int buildCounterEmpty = 0; 88 core.int buildCounterEmpty = 0;
89 buildEmpty() { 89 buildEmpty() {
90 var o = new api.Empty(); 90 var o = new api.Empty();
91 buildCounterEmpty++; 91 buildCounterEmpty++;
92 if (buildCounterEmpty < 3) { 92 if (buildCounterEmpty < 3) {
(...skipping 19 matching lines...) Expand all
112 return o; 112 return o;
113 } 113 }
114 114
115 checkGetIamPolicyRequest(api.GetIamPolicyRequest o) { 115 checkGetIamPolicyRequest(api.GetIamPolicyRequest o) {
116 buildCounterGetIamPolicyRequest++; 116 buildCounterGetIamPolicyRequest++;
117 if (buildCounterGetIamPolicyRequest < 3) { 117 if (buildCounterGetIamPolicyRequest < 3) {
118 } 118 }
119 buildCounterGetIamPolicyRequest--; 119 buildCounterGetIamPolicyRequest--;
120 } 120 }
121 121
122 buildUnnamed3053() { 122 buildUnnamed3399() {
123 var o = new core.List<api.Organization>(); 123 var o = new core.List<api.Organization>();
124 o.add(buildOrganization()); 124 o.add(buildOrganization());
125 o.add(buildOrganization()); 125 o.add(buildOrganization());
126 return o; 126 return o;
127 } 127 }
128 128
129 checkUnnamed3053(core.List<api.Organization> o) { 129 checkUnnamed3399(core.List<api.Organization> o) {
130 unittest.expect(o, unittest.hasLength(2)); 130 unittest.expect(o, unittest.hasLength(2));
131 checkOrganization(o[0]); 131 checkOrganization(o[0]);
132 checkOrganization(o[1]); 132 checkOrganization(o[1]);
133 } 133 }
134 134
135 core.int buildCounterListOrganizationsResponse = 0; 135 core.int buildCounterListOrganizationsResponse = 0;
136 buildListOrganizationsResponse() { 136 buildListOrganizationsResponse() {
137 var o = new api.ListOrganizationsResponse(); 137 var o = new api.ListOrganizationsResponse();
138 buildCounterListOrganizationsResponse++; 138 buildCounterListOrganizationsResponse++;
139 if (buildCounterListOrganizationsResponse < 3) { 139 if (buildCounterListOrganizationsResponse < 3) {
140 o.nextPageToken = "foo"; 140 o.nextPageToken = "foo";
141 o.organizations = buildUnnamed3053(); 141 o.organizations = buildUnnamed3399();
142 } 142 }
143 buildCounterListOrganizationsResponse--; 143 buildCounterListOrganizationsResponse--;
144 return o; 144 return o;
145 } 145 }
146 146
147 checkListOrganizationsResponse(api.ListOrganizationsResponse o) { 147 checkListOrganizationsResponse(api.ListOrganizationsResponse o) {
148 buildCounterListOrganizationsResponse++; 148 buildCounterListOrganizationsResponse++;
149 if (buildCounterListOrganizationsResponse < 3) { 149 if (buildCounterListOrganizationsResponse < 3) {
150 unittest.expect(o.nextPageToken, unittest.equals('foo')); 150 unittest.expect(o.nextPageToken, unittest.equals('foo'));
151 checkUnnamed3053(o.organizations); 151 checkUnnamed3399(o.organizations);
152 } 152 }
153 buildCounterListOrganizationsResponse--; 153 buildCounterListOrganizationsResponse--;
154 } 154 }
155 155
156 buildUnnamed3054() { 156 buildUnnamed3400() {
157 var o = new core.List<api.Project>(); 157 var o = new core.List<api.Project>();
158 o.add(buildProject()); 158 o.add(buildProject());
159 o.add(buildProject()); 159 o.add(buildProject());
160 return o; 160 return o;
161 } 161 }
162 162
163 checkUnnamed3054(core.List<api.Project> o) { 163 checkUnnamed3400(core.List<api.Project> o) {
164 unittest.expect(o, unittest.hasLength(2)); 164 unittest.expect(o, unittest.hasLength(2));
165 checkProject(o[0]); 165 checkProject(o[0]);
166 checkProject(o[1]); 166 checkProject(o[1]);
167 } 167 }
168 168
169 core.int buildCounterListProjectsResponse = 0; 169 core.int buildCounterListProjectsResponse = 0;
170 buildListProjectsResponse() { 170 buildListProjectsResponse() {
171 var o = new api.ListProjectsResponse(); 171 var o = new api.ListProjectsResponse();
172 buildCounterListProjectsResponse++; 172 buildCounterListProjectsResponse++;
173 if (buildCounterListProjectsResponse < 3) { 173 if (buildCounterListProjectsResponse < 3) {
174 o.nextPageToken = "foo"; 174 o.nextPageToken = "foo";
175 o.projects = buildUnnamed3054(); 175 o.projects = buildUnnamed3400();
176 } 176 }
177 buildCounterListProjectsResponse--; 177 buildCounterListProjectsResponse--;
178 return o; 178 return o;
179 } 179 }
180 180
181 checkListProjectsResponse(api.ListProjectsResponse o) { 181 checkListProjectsResponse(api.ListProjectsResponse o) {
182 buildCounterListProjectsResponse++; 182 buildCounterListProjectsResponse++;
183 if (buildCounterListProjectsResponse < 3) { 183 if (buildCounterListProjectsResponse < 3) {
184 unittest.expect(o.nextPageToken, unittest.equals('foo')); 184 unittest.expect(o.nextPageToken, unittest.equals('foo'));
185 checkUnnamed3054(o.projects); 185 checkUnnamed3400(o.projects);
186 } 186 }
187 buildCounterListProjectsResponse--; 187 buildCounterListProjectsResponse--;
188 } 188 }
189 189
190 core.int buildCounterOrganization = 0; 190 core.int buildCounterOrganization = 0;
191 buildOrganization() { 191 buildOrganization() {
192 var o = new api.Organization(); 192 var o = new api.Organization();
193 buildCounterOrganization++; 193 buildCounterOrganization++;
194 if (buildCounterOrganization < 3) { 194 if (buildCounterOrganization < 3) {
195 o.creationTime = "foo"; 195 o.creationTime = "foo";
(...skipping 28 matching lines...) Expand all
224 } 224 }
225 225
226 checkOrganizationOwner(api.OrganizationOwner o) { 226 checkOrganizationOwner(api.OrganizationOwner o) {
227 buildCounterOrganizationOwner++; 227 buildCounterOrganizationOwner++;
228 if (buildCounterOrganizationOwner < 3) { 228 if (buildCounterOrganizationOwner < 3) {
229 unittest.expect(o.directoryCustomerId, unittest.equals('foo')); 229 unittest.expect(o.directoryCustomerId, unittest.equals('foo'));
230 } 230 }
231 buildCounterOrganizationOwner--; 231 buildCounterOrganizationOwner--;
232 } 232 }
233 233
234 buildUnnamed3055() { 234 buildUnnamed3401() {
235 var o = new core.List<api.Binding>(); 235 var o = new core.List<api.Binding>();
236 o.add(buildBinding()); 236 o.add(buildBinding());
237 o.add(buildBinding()); 237 o.add(buildBinding());
238 return o; 238 return o;
239 } 239 }
240 240
241 checkUnnamed3055(core.List<api.Binding> o) { 241 checkUnnamed3401(core.List<api.Binding> o) {
242 unittest.expect(o, unittest.hasLength(2)); 242 unittest.expect(o, unittest.hasLength(2));
243 checkBinding(o[0]); 243 checkBinding(o[0]);
244 checkBinding(o[1]); 244 checkBinding(o[1]);
245 } 245 }
246 246
247 core.int buildCounterPolicy = 0; 247 core.int buildCounterPolicy = 0;
248 buildPolicy() { 248 buildPolicy() {
249 var o = new api.Policy(); 249 var o = new api.Policy();
250 buildCounterPolicy++; 250 buildCounterPolicy++;
251 if (buildCounterPolicy < 3) { 251 if (buildCounterPolicy < 3) {
252 o.bindings = buildUnnamed3055(); 252 o.bindings = buildUnnamed3401();
253 o.etag = "foo"; 253 o.etag = "foo";
254 o.version = 42; 254 o.version = 42;
255 } 255 }
256 buildCounterPolicy--; 256 buildCounterPolicy--;
257 return o; 257 return o;
258 } 258 }
259 259
260 checkPolicy(api.Policy o) { 260 checkPolicy(api.Policy o) {
261 buildCounterPolicy++; 261 buildCounterPolicy++;
262 if (buildCounterPolicy < 3) { 262 if (buildCounterPolicy < 3) {
263 checkUnnamed3055(o.bindings); 263 checkUnnamed3401(o.bindings);
264 unittest.expect(o.etag, unittest.equals('foo')); 264 unittest.expect(o.etag, unittest.equals('foo'));
265 unittest.expect(o.version, unittest.equals(42)); 265 unittest.expect(o.version, unittest.equals(42));
266 } 266 }
267 buildCounterPolicy--; 267 buildCounterPolicy--;
268 } 268 }
269 269
270 buildUnnamed3056() { 270 buildUnnamed3402() {
271 var o = new core.Map<core.String, core.String>(); 271 var o = new core.Map<core.String, core.String>();
272 o["x"] = "foo"; 272 o["x"] = "foo";
273 o["y"] = "foo"; 273 o["y"] = "foo";
274 return o; 274 return o;
275 } 275 }
276 276
277 checkUnnamed3056(core.Map<core.String, core.String> o) { 277 checkUnnamed3402(core.Map<core.String, core.String> o) {
278 unittest.expect(o, unittest.hasLength(2)); 278 unittest.expect(o, unittest.hasLength(2));
279 unittest.expect(o["x"], unittest.equals('foo')); 279 unittest.expect(o["x"], unittest.equals('foo'));
280 unittest.expect(o["y"], unittest.equals('foo')); 280 unittest.expect(o["y"], unittest.equals('foo'));
281 } 281 }
282 282
283 core.int buildCounterProject = 0; 283 core.int buildCounterProject = 0;
284 buildProject() { 284 buildProject() {
285 var o = new api.Project(); 285 var o = new api.Project();
286 buildCounterProject++; 286 buildCounterProject++;
287 if (buildCounterProject < 3) { 287 if (buildCounterProject < 3) {
288 o.createTime = "foo"; 288 o.createTime = "foo";
289 o.labels = buildUnnamed3056(); 289 o.labels = buildUnnamed3402();
290 o.lifecycleState = "foo"; 290 o.lifecycleState = "foo";
291 o.name = "foo"; 291 o.name = "foo";
292 o.parent = buildResourceId(); 292 o.parent = buildResourceId();
293 o.projectId = "foo"; 293 o.projectId = "foo";
294 o.projectNumber = "foo"; 294 o.projectNumber = "foo";
295 } 295 }
296 buildCounterProject--; 296 buildCounterProject--;
297 return o; 297 return o;
298 } 298 }
299 299
300 checkProject(api.Project o) { 300 checkProject(api.Project o) {
301 buildCounterProject++; 301 buildCounterProject++;
302 if (buildCounterProject < 3) { 302 if (buildCounterProject < 3) {
303 unittest.expect(o.createTime, unittest.equals('foo')); 303 unittest.expect(o.createTime, unittest.equals('foo'));
304 checkUnnamed3056(o.labels); 304 checkUnnamed3402(o.labels);
305 unittest.expect(o.lifecycleState, unittest.equals('foo')); 305 unittest.expect(o.lifecycleState, unittest.equals('foo'));
306 unittest.expect(o.name, unittest.equals('foo')); 306 unittest.expect(o.name, unittest.equals('foo'));
307 checkResourceId(o.parent); 307 checkResourceId(o.parent);
308 unittest.expect(o.projectId, unittest.equals('foo')); 308 unittest.expect(o.projectId, unittest.equals('foo'));
309 unittest.expect(o.projectNumber, unittest.equals('foo')); 309 unittest.expect(o.projectNumber, unittest.equals('foo'));
310 } 310 }
311 buildCounterProject--; 311 buildCounterProject--;
312 } 312 }
313 313
314 core.int buildCounterResourceId = 0; 314 core.int buildCounterResourceId = 0;
(...skipping 29 matching lines...) Expand all
344 } 344 }
345 345
346 checkSetIamPolicyRequest(api.SetIamPolicyRequest o) { 346 checkSetIamPolicyRequest(api.SetIamPolicyRequest o) {
347 buildCounterSetIamPolicyRequest++; 347 buildCounterSetIamPolicyRequest++;
348 if (buildCounterSetIamPolicyRequest < 3) { 348 if (buildCounterSetIamPolicyRequest < 3) {
349 checkPolicy(o.policy); 349 checkPolicy(o.policy);
350 } 350 }
351 buildCounterSetIamPolicyRequest--; 351 buildCounterSetIamPolicyRequest--;
352 } 352 }
353 353
354 buildUnnamed3057() { 354 buildUnnamed3403() {
355 var o = new core.List<core.String>(); 355 var o = new core.List<core.String>();
356 o.add("foo"); 356 o.add("foo");
357 o.add("foo"); 357 o.add("foo");
358 return o; 358 return o;
359 } 359 }
360 360
361 checkUnnamed3057(core.List<core.String> o) { 361 checkUnnamed3403(core.List<core.String> o) {
362 unittest.expect(o, unittest.hasLength(2)); 362 unittest.expect(o, unittest.hasLength(2));
363 unittest.expect(o[0], unittest.equals('foo')); 363 unittest.expect(o[0], unittest.equals('foo'));
364 unittest.expect(o[1], unittest.equals('foo')); 364 unittest.expect(o[1], unittest.equals('foo'));
365 } 365 }
366 366
367 core.int buildCounterTestIamPermissionsRequest = 0; 367 core.int buildCounterTestIamPermissionsRequest = 0;
368 buildTestIamPermissionsRequest() { 368 buildTestIamPermissionsRequest() {
369 var o = new api.TestIamPermissionsRequest(); 369 var o = new api.TestIamPermissionsRequest();
370 buildCounterTestIamPermissionsRequest++; 370 buildCounterTestIamPermissionsRequest++;
371 if (buildCounterTestIamPermissionsRequest < 3) { 371 if (buildCounterTestIamPermissionsRequest < 3) {
372 o.permissions = buildUnnamed3057(); 372 o.permissions = buildUnnamed3403();
373 } 373 }
374 buildCounterTestIamPermissionsRequest--; 374 buildCounterTestIamPermissionsRequest--;
375 return o; 375 return o;
376 } 376 }
377 377
378 checkTestIamPermissionsRequest(api.TestIamPermissionsRequest o) { 378 checkTestIamPermissionsRequest(api.TestIamPermissionsRequest o) {
379 buildCounterTestIamPermissionsRequest++; 379 buildCounterTestIamPermissionsRequest++;
380 if (buildCounterTestIamPermissionsRequest < 3) { 380 if (buildCounterTestIamPermissionsRequest < 3) {
381 checkUnnamed3057(o.permissions); 381 checkUnnamed3403(o.permissions);
382 } 382 }
383 buildCounterTestIamPermissionsRequest--; 383 buildCounterTestIamPermissionsRequest--;
384 } 384 }
385 385
386 buildUnnamed3058() { 386 buildUnnamed3404() {
387 var o = new core.List<core.String>(); 387 var o = new core.List<core.String>();
388 o.add("foo"); 388 o.add("foo");
389 o.add("foo"); 389 o.add("foo");
390 return o; 390 return o;
391 } 391 }
392 392
393 checkUnnamed3058(core.List<core.String> o) { 393 checkUnnamed3404(core.List<core.String> o) {
394 unittest.expect(o, unittest.hasLength(2)); 394 unittest.expect(o, unittest.hasLength(2));
395 unittest.expect(o[0], unittest.equals('foo')); 395 unittest.expect(o[0], unittest.equals('foo'));
396 unittest.expect(o[1], unittest.equals('foo')); 396 unittest.expect(o[1], unittest.equals('foo'));
397 } 397 }
398 398
399 core.int buildCounterTestIamPermissionsResponse = 0; 399 core.int buildCounterTestIamPermissionsResponse = 0;
400 buildTestIamPermissionsResponse() { 400 buildTestIamPermissionsResponse() {
401 var o = new api.TestIamPermissionsResponse(); 401 var o = new api.TestIamPermissionsResponse();
402 buildCounterTestIamPermissionsResponse++; 402 buildCounterTestIamPermissionsResponse++;
403 if (buildCounterTestIamPermissionsResponse < 3) { 403 if (buildCounterTestIamPermissionsResponse < 3) {
404 o.permissions = buildUnnamed3058(); 404 o.permissions = buildUnnamed3404();
405 } 405 }
406 buildCounterTestIamPermissionsResponse--; 406 buildCounterTestIamPermissionsResponse--;
407 return o; 407 return o;
408 } 408 }
409 409
410 checkTestIamPermissionsResponse(api.TestIamPermissionsResponse o) { 410 checkTestIamPermissionsResponse(api.TestIamPermissionsResponse o) {
411 buildCounterTestIamPermissionsResponse++; 411 buildCounterTestIamPermissionsResponse++;
412 if (buildCounterTestIamPermissionsResponse < 3) { 412 if (buildCounterTestIamPermissionsResponse < 3) {
413 checkUnnamed3058(o.permissions); 413 checkUnnamed3404(o.permissions);
414 } 414 }
415 buildCounterTestIamPermissionsResponse--; 415 buildCounterTestIamPermissionsResponse--;
416 } 416 }
417 417
418 core.int buildCounterUndeleteProjectRequest = 0;
419 buildUndeleteProjectRequest() {
420 var o = new api.UndeleteProjectRequest();
421 buildCounterUndeleteProjectRequest++;
422 if (buildCounterUndeleteProjectRequest < 3) {
423 }
424 buildCounterUndeleteProjectRequest--;
425 return o;
426 }
427
428 checkUndeleteProjectRequest(api.UndeleteProjectRequest o) {
429 buildCounterUndeleteProjectRequest++;
430 if (buildCounterUndeleteProjectRequest < 3) {
431 }
432 buildCounterUndeleteProjectRequest--;
433 }
434
418 435
419 main() { 436 main() {
420 unittest.group("obj-schema-Binding", () { 437 unittest.group("obj-schema-Binding", () {
421 unittest.test("to-json--from-json", () { 438 unittest.test("to-json--from-json", () {
422 var o = buildBinding(); 439 var o = buildBinding();
423 var od = new api.Binding.fromJson(o.toJson()); 440 var od = new api.Binding.fromJson(o.toJson());
424 checkBinding(od); 441 checkBinding(od);
425 }); 442 });
426 }); 443 });
427 444
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
527 544
528 unittest.group("obj-schema-TestIamPermissionsResponse", () { 545 unittest.group("obj-schema-TestIamPermissionsResponse", () {
529 unittest.test("to-json--from-json", () { 546 unittest.test("to-json--from-json", () {
530 var o = buildTestIamPermissionsResponse(); 547 var o = buildTestIamPermissionsResponse();
531 var od = new api.TestIamPermissionsResponse.fromJson(o.toJson()); 548 var od = new api.TestIamPermissionsResponse.fromJson(o.toJson());
532 checkTestIamPermissionsResponse(od); 549 checkTestIamPermissionsResponse(od);
533 }); 550 });
534 }); 551 });
535 552
536 553
554 unittest.group("obj-schema-UndeleteProjectRequest", () {
555 unittest.test("to-json--from-json", () {
556 var o = buildUndeleteProjectRequest();
557 var od = new api.UndeleteProjectRequest.fromJson(o.toJson());
558 checkUndeleteProjectRequest(od);
559 });
560 });
561
562
537 unittest.group("resource-OrganizationsResourceApi", () { 563 unittest.group("resource-OrganizationsResourceApi", () {
538 unittest.test("method--get", () { 564 unittest.test("method--get", () {
539 565
540 var mock = new HttpServerMock(); 566 var mock = new HttpServerMock();
541 api.OrganizationsResourceApi res = new api.CloudresourcemanagerApi(mock).o rganizations; 567 api.OrganizationsResourceApi res = new api.CloudresourcemanagerApi(mock).o rganizations;
542 var arg_organizationId = "foo"; 568 var arg_organizationId = "foo";
543 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 569 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
544 var path = (req.url).path; 570 var path = (req.url).path;
545 var pathOffset = 0; 571 var pathOffset = 0;
546 var index; 572 var index;
(...skipping 656 matching lines...) Expand 10 before | Expand all | Expand 10 after
1203 }), true); 1229 }), true);
1204 res.testIamPermissions(arg_request, arg_resource).then(unittest.expectAsyn c(((api.TestIamPermissionsResponse response) { 1230 res.testIamPermissions(arg_request, arg_resource).then(unittest.expectAsyn c(((api.TestIamPermissionsResponse response) {
1205 checkTestIamPermissionsResponse(response); 1231 checkTestIamPermissionsResponse(response);
1206 }))); 1232 })));
1207 }); 1233 });
1208 1234
1209 unittest.test("method--undelete", () { 1235 unittest.test("method--undelete", () {
1210 1236
1211 var mock = new HttpServerMock(); 1237 var mock = new HttpServerMock();
1212 api.ProjectsResourceApi res = new api.CloudresourcemanagerApi(mock).projec ts; 1238 api.ProjectsResourceApi res = new api.CloudresourcemanagerApi(mock).projec ts;
1239 var arg_request = buildUndeleteProjectRequest();
1213 var arg_projectId = "foo"; 1240 var arg_projectId = "foo";
1214 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 1241 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
1242 var obj = new api.UndeleteProjectRequest.fromJson(json);
1243 checkUndeleteProjectRequest(obj);
1244
1215 var path = (req.url).path; 1245 var path = (req.url).path;
1216 var pathOffset = 0; 1246 var pathOffset = 0;
1217 var index; 1247 var index;
1218 var subPart; 1248 var subPart;
1219 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 1249 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
1220 pathOffset += 1; 1250 pathOffset += 1;
1221 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq uals("v1beta1/projects/")); 1251 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq uals("v1beta1/projects/"));
1222 pathOffset += 17; 1252 pathOffset += 17;
1223 index = path.indexOf(":undelete", pathOffset); 1253 index = path.indexOf(":undelete", pathOffset);
1224 unittest.expect(index >= 0, unittest.isTrue); 1254 unittest.expect(index >= 0, unittest.isTrue);
(...skipping 20 matching lines...) Expand all
1245 } 1275 }
1246 } 1276 }
1247 1277
1248 1278
1249 var h = { 1279 var h = {
1250 "content-type" : "application/json; charset=utf-8", 1280 "content-type" : "application/json; charset=utf-8",
1251 }; 1281 };
1252 var resp = convert.JSON.encode(buildEmpty()); 1282 var resp = convert.JSON.encode(buildEmpty());
1253 return new async.Future.value(stringResponse(200, h, resp)); 1283 return new async.Future.value(stringResponse(200, h, resp));
1254 }), true); 1284 }), true);
1255 res.undelete(arg_projectId).then(unittest.expectAsync(((api.Empty response ) { 1285 res.undelete(arg_request, arg_projectId).then(unittest.expectAsync(((api.E mpty response) {
1256 checkEmpty(response); 1286 checkEmpty(response);
1257 }))); 1287 })));
1258 }); 1288 });
1259 1289
1260 unittest.test("method--update", () { 1290 unittest.test("method--update", () {
1261 1291
1262 var mock = new HttpServerMock(); 1292 var mock = new HttpServerMock();
1263 api.ProjectsResourceApi res = new api.CloudresourcemanagerApi(mock).projec ts; 1293 api.ProjectsResourceApi res = new api.CloudresourcemanagerApi(mock).projec ts;
1264 var arg_request = buildProject(); 1294 var arg_request = buildProject();
1265 var arg_projectId = "foo"; 1295 var arg_projectId = "foo";
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
1306 res.update(arg_request, arg_projectId).then(unittest.expectAsync(((api.Pro ject response) { 1336 res.update(arg_request, arg_projectId).then(unittest.expectAsync(((api.Pro ject response) {
1307 checkProject(response); 1337 checkProject(response);
1308 }))); 1338 })));
1309 }); 1339 });
1310 1340
1311 }); 1341 });
1312 1342
1313 1343
1314 } 1344 }
1315 1345
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698