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

Side by Side Diff: generated/googleapis/test/drive/v3_test.dart

Issue 2936613002: Api-Roll 50: 2017-06-12 (Closed)
Patch Set: Created 3 years, 6 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.drive.v3.test; 1 library googleapis.drive.v3.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:test/test.dart' as unittest;
11 11
12 import 'package:googleapis/drive/v3.dart' as api; 12 import 'package:googleapis/drive/v3.dart' as api;
13 13
14 class HttpServerMock extends http.BaseClient { 14 class HttpServerMock extends http.BaseClient {
15 core.Function _callback; 15 core.Function _callback;
16 core.bool _expectJson; 16 core.bool _expectJson;
17 17
18 void register(core.Function callback, core.bool expectJson) { 18 void register(core.Function callback, core.bool expectJson) {
19 _callback = callback; 19 _callback = callback;
20 _expectJson = expectJson; 20 _expectJson = expectJson;
(...skipping 18 matching lines...) Expand all
39 } else { 39 } else {
40 return stream.toBytes().then((data) { 40 return stream.toBytes().then((data) {
41 return _callback(request, data); 41 return _callback(request, data);
42 }); 42 });
43 } 43 }
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<core.String, core.String> headers, core.String bod y) {
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 buildUnnamed1470() { 54 buildUnnamed1477() {
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 checkUnnamed1470(core.List<core.String> o) { 61 checkUnnamed1477(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 buildUnnamed1471() { 67 buildUnnamed1478() {
68 var o = new core.Map<core.String, core.List<core.String>>(); 68 var o = new core.Map<core.String, core.List<core.String>>();
69 o["x"] = buildUnnamed1470(); 69 o["x"] = buildUnnamed1477();
70 o["y"] = buildUnnamed1470(); 70 o["y"] = buildUnnamed1477();
71 return o; 71 return o;
72 } 72 }
73 73
74 checkUnnamed1471(core.Map<core.String, core.List<core.String>> o) { 74 checkUnnamed1478(core.Map<core.String, core.List<core.String>> o) {
75 unittest.expect(o, unittest.hasLength(2)); 75 unittest.expect(o, unittest.hasLength(2));
76 checkUnnamed1470(o["x"]); 76 checkUnnamed1477(o["x"]);
77 checkUnnamed1470(o["y"]); 77 checkUnnamed1477(o["y"]);
78 } 78 }
79 79
80 buildUnnamed1472() { 80 buildUnnamed1479() {
81 var o = new core.List<core.String>(); 81 var o = new core.List<core.String>();
82 o.add("foo"); 82 o.add("foo");
83 o.add("foo"); 83 o.add("foo");
84 return o; 84 return o;
85 } 85 }
86 86
87 checkUnnamed1472(core.List<core.String> o) { 87 checkUnnamed1479(core.List<core.String> o) {
88 unittest.expect(o, unittest.hasLength(2)); 88 unittest.expect(o, unittest.hasLength(2));
89 unittest.expect(o[0], unittest.equals('foo')); 89 unittest.expect(o[0], unittest.equals('foo'));
90 unittest.expect(o[1], unittest.equals('foo')); 90 unittest.expect(o[1], unittest.equals('foo'));
91 } 91 }
92 92
93 buildUnnamed1473() { 93 buildUnnamed1480() {
94 var o = new core.List<core.String>(); 94 var o = new core.List<core.String>();
95 o.add("foo"); 95 o.add("foo");
96 o.add("foo"); 96 o.add("foo");
97 return o; 97 return o;
98 } 98 }
99 99
100 checkUnnamed1473(core.List<core.String> o) { 100 checkUnnamed1480(core.List<core.String> o) {
101 unittest.expect(o, unittest.hasLength(2)); 101 unittest.expect(o, unittest.hasLength(2));
102 unittest.expect(o[0], unittest.equals('foo')); 102 unittest.expect(o[0], unittest.equals('foo'));
103 unittest.expect(o[1], unittest.equals('foo')); 103 unittest.expect(o[1], unittest.equals('foo'));
104 } 104 }
105 105
106 buildUnnamed1474() { 106 buildUnnamed1481() {
107 var o = new core.Map<core.String, core.List<core.String>>(); 107 var o = new core.Map<core.String, core.List<core.String>>();
108 o["x"] = buildUnnamed1473(); 108 o["x"] = buildUnnamed1480();
109 o["y"] = buildUnnamed1473(); 109 o["y"] = buildUnnamed1480();
110 return o; 110 return o;
111 } 111 }
112 112
113 checkUnnamed1474(core.Map<core.String, core.List<core.String>> o) { 113 checkUnnamed1481(core.Map<core.String, core.List<core.String>> o) {
114 unittest.expect(o, unittest.hasLength(2)); 114 unittest.expect(o, unittest.hasLength(2));
115 checkUnnamed1473(o["x"]); 115 checkUnnamed1480(o["x"]);
116 checkUnnamed1473(o["y"]); 116 checkUnnamed1480(o["y"]);
117 } 117 }
118 118
119 buildUnnamed1475() { 119 buildUnnamed1482() {
120 var o = new core.Map<core.String, core.String>(); 120 var o = new core.Map<core.String, core.String>();
121 o["x"] = "foo"; 121 o["x"] = "foo";
122 o["y"] = "foo"; 122 o["y"] = "foo";
123 return o; 123 return o;
124 } 124 }
125 125
126 checkUnnamed1475(core.Map<core.String, core.String> o) { 126 checkUnnamed1482(core.Map<core.String, core.String> o) {
127 unittest.expect(o, unittest.hasLength(2)); 127 unittest.expect(o, unittest.hasLength(2));
128 unittest.expect(o["x"], unittest.equals('foo')); 128 unittest.expect(o["x"], unittest.equals('foo'));
129 unittest.expect(o["y"], unittest.equals('foo')); 129 unittest.expect(o["y"], unittest.equals('foo'));
130 } 130 }
131 131
132 core.int buildCounterAboutStorageQuota = 0; 132 core.int buildCounterAboutStorageQuota = 0;
133 buildAboutStorageQuota() { 133 buildAboutStorageQuota() {
134 var o = new api.AboutStorageQuota(); 134 var o = new api.AboutStorageQuota();
135 buildCounterAboutStorageQuota++; 135 buildCounterAboutStorageQuota++;
136 if (buildCounterAboutStorageQuota < 3) { 136 if (buildCounterAboutStorageQuota < 3) {
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 checkAboutTeamDriveThemes(api.AboutTeamDriveThemes o) { 170 checkAboutTeamDriveThemes(api.AboutTeamDriveThemes o) {
171 buildCounterAboutTeamDriveThemes++; 171 buildCounterAboutTeamDriveThemes++;
172 if (buildCounterAboutTeamDriveThemes < 3) { 172 if (buildCounterAboutTeamDriveThemes < 3) {
173 unittest.expect(o.backgroundImageLink, unittest.equals('foo')); 173 unittest.expect(o.backgroundImageLink, unittest.equals('foo'));
174 unittest.expect(o.colorRgb, unittest.equals('foo')); 174 unittest.expect(o.colorRgb, unittest.equals('foo'));
175 unittest.expect(o.id, unittest.equals('foo')); 175 unittest.expect(o.id, unittest.equals('foo'));
176 } 176 }
177 buildCounterAboutTeamDriveThemes--; 177 buildCounterAboutTeamDriveThemes--;
178 } 178 }
179 179
180 buildUnnamed1476() { 180 buildUnnamed1483() {
181 var o = new core.List<api.AboutTeamDriveThemes>(); 181 var o = new core.List<api.AboutTeamDriveThemes>();
182 o.add(buildAboutTeamDriveThemes()); 182 o.add(buildAboutTeamDriveThemes());
183 o.add(buildAboutTeamDriveThemes()); 183 o.add(buildAboutTeamDriveThemes());
184 return o; 184 return o;
185 } 185 }
186 186
187 checkUnnamed1476(core.List<api.AboutTeamDriveThemes> o) { 187 checkUnnamed1483(core.List<api.AboutTeamDriveThemes> o) {
188 unittest.expect(o, unittest.hasLength(2)); 188 unittest.expect(o, unittest.hasLength(2));
189 checkAboutTeamDriveThemes(o[0]); 189 checkAboutTeamDriveThemes(o[0]);
190 checkAboutTeamDriveThemes(o[1]); 190 checkAboutTeamDriveThemes(o[1]);
191 } 191 }
192 192
193 core.int buildCounterAbout = 0; 193 core.int buildCounterAbout = 0;
194 buildAbout() { 194 buildAbout() {
195 var o = new api.About(); 195 var o = new api.About();
196 buildCounterAbout++; 196 buildCounterAbout++;
197 if (buildCounterAbout < 3) { 197 if (buildCounterAbout < 3) {
198 o.appInstalled = true; 198 o.appInstalled = true;
199 o.exportFormats = buildUnnamed1471(); 199 o.exportFormats = buildUnnamed1478();
200 o.folderColorPalette = buildUnnamed1472(); 200 o.folderColorPalette = buildUnnamed1479();
201 o.importFormats = buildUnnamed1474(); 201 o.importFormats = buildUnnamed1481();
202 o.kind = "foo"; 202 o.kind = "foo";
203 o.maxImportSizes = buildUnnamed1475(); 203 o.maxImportSizes = buildUnnamed1482();
204 o.maxUploadSize = "foo"; 204 o.maxUploadSize = "foo";
205 o.storageQuota = buildAboutStorageQuota(); 205 o.storageQuota = buildAboutStorageQuota();
206 o.teamDriveThemes = buildUnnamed1476(); 206 o.teamDriveThemes = buildUnnamed1483();
207 o.user = buildUser(); 207 o.user = buildUser();
208 } 208 }
209 buildCounterAbout--; 209 buildCounterAbout--;
210 return o; 210 return o;
211 } 211 }
212 212
213 checkAbout(api.About o) { 213 checkAbout(api.About o) {
214 buildCounterAbout++; 214 buildCounterAbout++;
215 if (buildCounterAbout < 3) { 215 if (buildCounterAbout < 3) {
216 unittest.expect(o.appInstalled, unittest.isTrue); 216 unittest.expect(o.appInstalled, unittest.isTrue);
217 checkUnnamed1471(o.exportFormats); 217 checkUnnamed1478(o.exportFormats);
218 checkUnnamed1472(o.folderColorPalette); 218 checkUnnamed1479(o.folderColorPalette);
219 checkUnnamed1474(o.importFormats); 219 checkUnnamed1481(o.importFormats);
220 unittest.expect(o.kind, unittest.equals('foo')); 220 unittest.expect(o.kind, unittest.equals('foo'));
221 checkUnnamed1475(o.maxImportSizes); 221 checkUnnamed1482(o.maxImportSizes);
222 unittest.expect(o.maxUploadSize, unittest.equals('foo')); 222 unittest.expect(o.maxUploadSize, unittest.equals('foo'));
223 checkAboutStorageQuota(o.storageQuota); 223 checkAboutStorageQuota(o.storageQuota);
224 checkUnnamed1476(o.teamDriveThemes); 224 checkUnnamed1483(o.teamDriveThemes);
225 checkUser(o.user); 225 checkUser(o.user);
226 } 226 }
227 buildCounterAbout--; 227 buildCounterAbout--;
228 } 228 }
229 229
230 core.int buildCounterChange = 0; 230 core.int buildCounterChange = 0;
231 buildChange() { 231 buildChange() {
232 var o = new api.Change(); 232 var o = new api.Change();
233 buildCounterChange++; 233 buildCounterChange++;
234 if (buildCounterChange < 3) { 234 if (buildCounterChange < 3) {
(...skipping 18 matching lines...) Expand all
253 unittest.expect(o.kind, unittest.equals('foo')); 253 unittest.expect(o.kind, unittest.equals('foo'));
254 unittest.expect(o.removed, unittest.isTrue); 254 unittest.expect(o.removed, unittest.isTrue);
255 checkTeamDrive(o.teamDrive); 255 checkTeamDrive(o.teamDrive);
256 unittest.expect(o.teamDriveId, unittest.equals('foo')); 256 unittest.expect(o.teamDriveId, unittest.equals('foo'));
257 unittest.expect(o.time, unittest.equals(core.DateTime.parse("2002-02-27T14:0 1:02"))); 257 unittest.expect(o.time, unittest.equals(core.DateTime.parse("2002-02-27T14:0 1:02")));
258 unittest.expect(o.type, unittest.equals('foo')); 258 unittest.expect(o.type, unittest.equals('foo'));
259 } 259 }
260 buildCounterChange--; 260 buildCounterChange--;
261 } 261 }
262 262
263 buildUnnamed1477() { 263 buildUnnamed1484() {
264 var o = new core.List<api.Change>(); 264 var o = new core.List<api.Change>();
265 o.add(buildChange()); 265 o.add(buildChange());
266 o.add(buildChange()); 266 o.add(buildChange());
267 return o; 267 return o;
268 } 268 }
269 269
270 checkUnnamed1477(core.List<api.Change> o) { 270 checkUnnamed1484(core.List<api.Change> o) {
271 unittest.expect(o, unittest.hasLength(2)); 271 unittest.expect(o, unittest.hasLength(2));
272 checkChange(o[0]); 272 checkChange(o[0]);
273 checkChange(o[1]); 273 checkChange(o[1]);
274 } 274 }
275 275
276 core.int buildCounterChangeList = 0; 276 core.int buildCounterChangeList = 0;
277 buildChangeList() { 277 buildChangeList() {
278 var o = new api.ChangeList(); 278 var o = new api.ChangeList();
279 buildCounterChangeList++; 279 buildCounterChangeList++;
280 if (buildCounterChangeList < 3) { 280 if (buildCounterChangeList < 3) {
281 o.changes = buildUnnamed1477(); 281 o.changes = buildUnnamed1484();
282 o.kind = "foo"; 282 o.kind = "foo";
283 o.newStartPageToken = "foo"; 283 o.newStartPageToken = "foo";
284 o.nextPageToken = "foo"; 284 o.nextPageToken = "foo";
285 } 285 }
286 buildCounterChangeList--; 286 buildCounterChangeList--;
287 return o; 287 return o;
288 } 288 }
289 289
290 checkChangeList(api.ChangeList o) { 290 checkChangeList(api.ChangeList o) {
291 buildCounterChangeList++; 291 buildCounterChangeList++;
292 if (buildCounterChangeList < 3) { 292 if (buildCounterChangeList < 3) {
293 checkUnnamed1477(o.changes); 293 checkUnnamed1484(o.changes);
294 unittest.expect(o.kind, unittest.equals('foo')); 294 unittest.expect(o.kind, unittest.equals('foo'));
295 unittest.expect(o.newStartPageToken, unittest.equals('foo')); 295 unittest.expect(o.newStartPageToken, unittest.equals('foo'));
296 unittest.expect(o.nextPageToken, unittest.equals('foo')); 296 unittest.expect(o.nextPageToken, unittest.equals('foo'));
297 } 297 }
298 buildCounterChangeList--; 298 buildCounterChangeList--;
299 } 299 }
300 300
301 buildUnnamed1478() { 301 buildUnnamed1485() {
302 var o = new core.Map<core.String, core.String>(); 302 var o = new core.Map<core.String, core.String>();
303 o["x"] = "foo"; 303 o["x"] = "foo";
304 o["y"] = "foo"; 304 o["y"] = "foo";
305 return o; 305 return o;
306 } 306 }
307 307
308 checkUnnamed1478(core.Map<core.String, core.String> o) { 308 checkUnnamed1485(core.Map<core.String, core.String> o) {
309 unittest.expect(o, unittest.hasLength(2)); 309 unittest.expect(o, unittest.hasLength(2));
310 unittest.expect(o["x"], unittest.equals('foo')); 310 unittest.expect(o["x"], unittest.equals('foo'));
311 unittest.expect(o["y"], unittest.equals('foo')); 311 unittest.expect(o["y"], unittest.equals('foo'));
312 } 312 }
313 313
314 core.int buildCounterChannel = 0; 314 core.int buildCounterChannel = 0;
315 buildChannel() { 315 buildChannel() {
316 var o = new api.Channel(); 316 var o = new api.Channel();
317 buildCounterChannel++; 317 buildCounterChannel++;
318 if (buildCounterChannel < 3) { 318 if (buildCounterChannel < 3) {
319 o.address = "foo"; 319 o.address = "foo";
320 o.expiration = "foo"; 320 o.expiration = "foo";
321 o.id = "foo"; 321 o.id = "foo";
322 o.kind = "foo"; 322 o.kind = "foo";
323 o.params = buildUnnamed1478(); 323 o.params = buildUnnamed1485();
324 o.payload = true; 324 o.payload = true;
325 o.resourceId = "foo"; 325 o.resourceId = "foo";
326 o.resourceUri = "foo"; 326 o.resourceUri = "foo";
327 o.token = "foo"; 327 o.token = "foo";
328 o.type = "foo"; 328 o.type = "foo";
329 } 329 }
330 buildCounterChannel--; 330 buildCounterChannel--;
331 return o; 331 return o;
332 } 332 }
333 333
334 checkChannel(api.Channel o) { 334 checkChannel(api.Channel o) {
335 buildCounterChannel++; 335 buildCounterChannel++;
336 if (buildCounterChannel < 3) { 336 if (buildCounterChannel < 3) {
337 unittest.expect(o.address, unittest.equals('foo')); 337 unittest.expect(o.address, unittest.equals('foo'));
338 unittest.expect(o.expiration, unittest.equals('foo')); 338 unittest.expect(o.expiration, unittest.equals('foo'));
339 unittest.expect(o.id, unittest.equals('foo')); 339 unittest.expect(o.id, unittest.equals('foo'));
340 unittest.expect(o.kind, unittest.equals('foo')); 340 unittest.expect(o.kind, unittest.equals('foo'));
341 checkUnnamed1478(o.params); 341 checkUnnamed1485(o.params);
342 unittest.expect(o.payload, unittest.isTrue); 342 unittest.expect(o.payload, unittest.isTrue);
343 unittest.expect(o.resourceId, unittest.equals('foo')); 343 unittest.expect(o.resourceId, unittest.equals('foo'));
344 unittest.expect(o.resourceUri, unittest.equals('foo')); 344 unittest.expect(o.resourceUri, unittest.equals('foo'));
345 unittest.expect(o.token, unittest.equals('foo')); 345 unittest.expect(o.token, unittest.equals('foo'));
346 unittest.expect(o.type, unittest.equals('foo')); 346 unittest.expect(o.type, unittest.equals('foo'));
347 } 347 }
348 buildCounterChannel--; 348 buildCounterChannel--;
349 } 349 }
350 350
351 core.int buildCounterCommentQuotedFileContent = 0; 351 core.int buildCounterCommentQuotedFileContent = 0;
(...skipping 10 matching lines...) Expand all
362 362
363 checkCommentQuotedFileContent(api.CommentQuotedFileContent o) { 363 checkCommentQuotedFileContent(api.CommentQuotedFileContent o) {
364 buildCounterCommentQuotedFileContent++; 364 buildCounterCommentQuotedFileContent++;
365 if (buildCounterCommentQuotedFileContent < 3) { 365 if (buildCounterCommentQuotedFileContent < 3) {
366 unittest.expect(o.mimeType, unittest.equals('foo')); 366 unittest.expect(o.mimeType, unittest.equals('foo'));
367 unittest.expect(o.value, unittest.equals('foo')); 367 unittest.expect(o.value, unittest.equals('foo'));
368 } 368 }
369 buildCounterCommentQuotedFileContent--; 369 buildCounterCommentQuotedFileContent--;
370 } 370 }
371 371
372 buildUnnamed1479() { 372 buildUnnamed1486() {
373 var o = new core.List<api.Reply>(); 373 var o = new core.List<api.Reply>();
374 o.add(buildReply()); 374 o.add(buildReply());
375 o.add(buildReply()); 375 o.add(buildReply());
376 return o; 376 return o;
377 } 377 }
378 378
379 checkUnnamed1479(core.List<api.Reply> o) { 379 checkUnnamed1486(core.List<api.Reply> o) {
380 unittest.expect(o, unittest.hasLength(2)); 380 unittest.expect(o, unittest.hasLength(2));
381 checkReply(o[0]); 381 checkReply(o[0]);
382 checkReply(o[1]); 382 checkReply(o[1]);
383 } 383 }
384 384
385 core.int buildCounterComment = 0; 385 core.int buildCounterComment = 0;
386 buildComment() { 386 buildComment() {
387 var o = new api.Comment(); 387 var o = new api.Comment();
388 buildCounterComment++; 388 buildCounterComment++;
389 if (buildCounterComment < 3) { 389 if (buildCounterComment < 3) {
390 o.anchor = "foo"; 390 o.anchor = "foo";
391 o.author = buildUser(); 391 o.author = buildUser();
392 o.content = "foo"; 392 o.content = "foo";
393 o.createdTime = core.DateTime.parse("2002-02-27T14:01:02"); 393 o.createdTime = core.DateTime.parse("2002-02-27T14:01:02");
394 o.deleted = true; 394 o.deleted = true;
395 o.htmlContent = "foo"; 395 o.htmlContent = "foo";
396 o.id = "foo"; 396 o.id = "foo";
397 o.kind = "foo"; 397 o.kind = "foo";
398 o.modifiedTime = core.DateTime.parse("2002-02-27T14:01:02"); 398 o.modifiedTime = core.DateTime.parse("2002-02-27T14:01:02");
399 o.quotedFileContent = buildCommentQuotedFileContent(); 399 o.quotedFileContent = buildCommentQuotedFileContent();
400 o.replies = buildUnnamed1479(); 400 o.replies = buildUnnamed1486();
401 o.resolved = true; 401 o.resolved = true;
402 } 402 }
403 buildCounterComment--; 403 buildCounterComment--;
404 return o; 404 return o;
405 } 405 }
406 406
407 checkComment(api.Comment o) { 407 checkComment(api.Comment o) {
408 buildCounterComment++; 408 buildCounterComment++;
409 if (buildCounterComment < 3) { 409 if (buildCounterComment < 3) {
410 unittest.expect(o.anchor, unittest.equals('foo')); 410 unittest.expect(o.anchor, unittest.equals('foo'));
411 checkUser(o.author); 411 checkUser(o.author);
412 unittest.expect(o.content, unittest.equals('foo')); 412 unittest.expect(o.content, unittest.equals('foo'));
413 unittest.expect(o.createdTime, unittest.equals(core.DateTime.parse("2002-02- 27T14:01:02"))); 413 unittest.expect(o.createdTime, unittest.equals(core.DateTime.parse("2002-02- 27T14:01:02")));
414 unittest.expect(o.deleted, unittest.isTrue); 414 unittest.expect(o.deleted, unittest.isTrue);
415 unittest.expect(o.htmlContent, unittest.equals('foo')); 415 unittest.expect(o.htmlContent, unittest.equals('foo'));
416 unittest.expect(o.id, unittest.equals('foo')); 416 unittest.expect(o.id, unittest.equals('foo'));
417 unittest.expect(o.kind, unittest.equals('foo')); 417 unittest.expect(o.kind, unittest.equals('foo'));
418 unittest.expect(o.modifiedTime, unittest.equals(core.DateTime.parse("2002-02 -27T14:01:02"))); 418 unittest.expect(o.modifiedTime, unittest.equals(core.DateTime.parse("2002-02 -27T14:01:02")));
419 checkCommentQuotedFileContent(o.quotedFileContent); 419 checkCommentQuotedFileContent(o.quotedFileContent);
420 checkUnnamed1479(o.replies); 420 checkUnnamed1486(o.replies);
421 unittest.expect(o.resolved, unittest.isTrue); 421 unittest.expect(o.resolved, unittest.isTrue);
422 } 422 }
423 buildCounterComment--; 423 buildCounterComment--;
424 } 424 }
425 425
426 buildUnnamed1480() { 426 buildUnnamed1487() {
427 var o = new core.List<api.Comment>(); 427 var o = new core.List<api.Comment>();
428 o.add(buildComment()); 428 o.add(buildComment());
429 o.add(buildComment()); 429 o.add(buildComment());
430 return o; 430 return o;
431 } 431 }
432 432
433 checkUnnamed1480(core.List<api.Comment> o) { 433 checkUnnamed1487(core.List<api.Comment> o) {
434 unittest.expect(o, unittest.hasLength(2)); 434 unittest.expect(o, unittest.hasLength(2));
435 checkComment(o[0]); 435 checkComment(o[0]);
436 checkComment(o[1]); 436 checkComment(o[1]);
437 } 437 }
438 438
439 core.int buildCounterCommentList = 0; 439 core.int buildCounterCommentList = 0;
440 buildCommentList() { 440 buildCommentList() {
441 var o = new api.CommentList(); 441 var o = new api.CommentList();
442 buildCounterCommentList++; 442 buildCounterCommentList++;
443 if (buildCounterCommentList < 3) { 443 if (buildCounterCommentList < 3) {
444 o.comments = buildUnnamed1480(); 444 o.comments = buildUnnamed1487();
445 o.kind = "foo"; 445 o.kind = "foo";
446 o.nextPageToken = "foo"; 446 o.nextPageToken = "foo";
447 } 447 }
448 buildCounterCommentList--; 448 buildCounterCommentList--;
449 return o; 449 return o;
450 } 450 }
451 451
452 checkCommentList(api.CommentList o) { 452 checkCommentList(api.CommentList o) {
453 buildCounterCommentList++; 453 buildCounterCommentList++;
454 if (buildCounterCommentList < 3) { 454 if (buildCounterCommentList < 3) {
455 checkUnnamed1480(o.comments); 455 checkUnnamed1487(o.comments);
456 unittest.expect(o.kind, unittest.equals('foo')); 456 unittest.expect(o.kind, unittest.equals('foo'));
457 unittest.expect(o.nextPageToken, unittest.equals('foo')); 457 unittest.expect(o.nextPageToken, unittest.equals('foo'));
458 } 458 }
459 buildCounterCommentList--; 459 buildCounterCommentList--;
460 } 460 }
461 461
462 buildUnnamed1481() { 462 buildUnnamed1488() {
463 var o = new core.Map<core.String, core.String>(); 463 var o = new core.Map<core.String, core.String>();
464 o["x"] = "foo"; 464 o["x"] = "foo";
465 o["y"] = "foo"; 465 o["y"] = "foo";
466 return o; 466 return o;
467 } 467 }
468 468
469 checkUnnamed1481(core.Map<core.String, core.String> o) { 469 checkUnnamed1488(core.Map<core.String, core.String> o) {
470 unittest.expect(o, unittest.hasLength(2)); 470 unittest.expect(o, unittest.hasLength(2));
471 unittest.expect(o["x"], unittest.equals('foo')); 471 unittest.expect(o["x"], unittest.equals('foo'));
472 unittest.expect(o["y"], unittest.equals('foo')); 472 unittest.expect(o["y"], unittest.equals('foo'));
473 } 473 }
474 474
475 core.int buildCounterFileCapabilities = 0; 475 core.int buildCounterFileCapabilities = 0;
476 buildFileCapabilities() { 476 buildFileCapabilities() {
477 var o = new api.FileCapabilities(); 477 var o = new api.FileCapabilities();
478 buildCounterFileCapabilities++; 478 buildCounterFileCapabilities++;
479 if (buildCounterFileCapabilities < 3) { 479 if (buildCounterFileCapabilities < 3) {
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
640 unittest.expect(o.rotation, unittest.equals(42)); 640 unittest.expect(o.rotation, unittest.equals(42));
641 unittest.expect(o.sensor, unittest.equals('foo')); 641 unittest.expect(o.sensor, unittest.equals('foo'));
642 unittest.expect(o.subjectDistance, unittest.equals(42)); 642 unittest.expect(o.subjectDistance, unittest.equals(42));
643 unittest.expect(o.time, unittest.equals('foo')); 643 unittest.expect(o.time, unittest.equals('foo'));
644 unittest.expect(o.whiteBalance, unittest.equals('foo')); 644 unittest.expect(o.whiteBalance, unittest.equals('foo'));
645 unittest.expect(o.width, unittest.equals(42)); 645 unittest.expect(o.width, unittest.equals(42));
646 } 646 }
647 buildCounterFileImageMediaMetadata--; 647 buildCounterFileImageMediaMetadata--;
648 } 648 }
649 649
650 buildUnnamed1482() { 650 buildUnnamed1489() {
651 var o = new core.List<api.User>(); 651 var o = new core.List<api.User>();
652 o.add(buildUser()); 652 o.add(buildUser());
653 o.add(buildUser()); 653 o.add(buildUser());
654 return o; 654 return o;
655 } 655 }
656 656
657 checkUnnamed1482(core.List<api.User> o) { 657 checkUnnamed1489(core.List<api.User> o) {
658 unittest.expect(o, unittest.hasLength(2)); 658 unittest.expect(o, unittest.hasLength(2));
659 checkUser(o[0]); 659 checkUser(o[0]);
660 checkUser(o[1]); 660 checkUser(o[1]);
661 } 661 }
662 662
663 buildUnnamed1483() { 663 buildUnnamed1490() {
664 var o = new core.List<core.String>(); 664 var o = new core.List<core.String>();
665 o.add("foo"); 665 o.add("foo");
666 o.add("foo"); 666 o.add("foo");
667 return o; 667 return o;
668 } 668 }
669 669
670 checkUnnamed1483(core.List<core.String> o) { 670 checkUnnamed1490(core.List<core.String> o) {
671 unittest.expect(o, unittest.hasLength(2)); 671 unittest.expect(o, unittest.hasLength(2));
672 unittest.expect(o[0], unittest.equals('foo')); 672 unittest.expect(o[0], unittest.equals('foo'));
673 unittest.expect(o[1], unittest.equals('foo')); 673 unittest.expect(o[1], unittest.equals('foo'));
674 } 674 }
675 675
676 buildUnnamed1484() { 676 buildUnnamed1491() {
677 var o = new core.List<api.Permission>(); 677 var o = new core.List<api.Permission>();
678 o.add(buildPermission()); 678 o.add(buildPermission());
679 o.add(buildPermission()); 679 o.add(buildPermission());
680 return o; 680 return o;
681 } 681 }
682 682
683 checkUnnamed1484(core.List<api.Permission> o) { 683 checkUnnamed1491(core.List<api.Permission> o) {
684 unittest.expect(o, unittest.hasLength(2)); 684 unittest.expect(o, unittest.hasLength(2));
685 checkPermission(o[0]); 685 checkPermission(o[0]);
686 checkPermission(o[1]); 686 checkPermission(o[1]);
687 } 687 }
688 688
689 buildUnnamed1485() { 689 buildUnnamed1492() {
690 var o = new core.Map<core.String, core.String>(); 690 var o = new core.Map<core.String, core.String>();
691 o["x"] = "foo"; 691 o["x"] = "foo";
692 o["y"] = "foo"; 692 o["y"] = "foo";
693 return o; 693 return o;
694 } 694 }
695 695
696 checkUnnamed1485(core.Map<core.String, core.String> o) { 696 checkUnnamed1492(core.Map<core.String, core.String> o) {
697 unittest.expect(o, unittest.hasLength(2)); 697 unittest.expect(o, unittest.hasLength(2));
698 unittest.expect(o["x"], unittest.equals('foo')); 698 unittest.expect(o["x"], unittest.equals('foo'));
699 unittest.expect(o["y"], unittest.equals('foo')); 699 unittest.expect(o["y"], unittest.equals('foo'));
700 } 700 }
701 701
702 buildUnnamed1486() { 702 buildUnnamed1493() {
703 var o = new core.List<core.String>(); 703 var o = new core.List<core.String>();
704 o.add("foo"); 704 o.add("foo");
705 o.add("foo"); 705 o.add("foo");
706 return o; 706 return o;
707 } 707 }
708 708
709 checkUnnamed1486(core.List<core.String> o) { 709 checkUnnamed1493(core.List<core.String> o) {
710 unittest.expect(o, unittest.hasLength(2)); 710 unittest.expect(o, unittest.hasLength(2));
711 unittest.expect(o[0], unittest.equals('foo')); 711 unittest.expect(o[0], unittest.equals('foo'));
712 unittest.expect(o[1], unittest.equals('foo')); 712 unittest.expect(o[1], unittest.equals('foo'));
713 } 713 }
714 714
715 core.int buildCounterFileVideoMediaMetadata = 0; 715 core.int buildCounterFileVideoMediaMetadata = 0;
716 buildFileVideoMediaMetadata() { 716 buildFileVideoMediaMetadata() {
717 var o = new api.FileVideoMediaMetadata(); 717 var o = new api.FileVideoMediaMetadata();
718 buildCounterFileVideoMediaMetadata++; 718 buildCounterFileVideoMediaMetadata++;
719 if (buildCounterFileVideoMediaMetadata < 3) { 719 if (buildCounterFileVideoMediaMetadata < 3) {
(...skipping 13 matching lines...) Expand all
733 unittest.expect(o.width, unittest.equals(42)); 733 unittest.expect(o.width, unittest.equals(42));
734 } 734 }
735 buildCounterFileVideoMediaMetadata--; 735 buildCounterFileVideoMediaMetadata--;
736 } 736 }
737 737
738 core.int buildCounterFile = 0; 738 core.int buildCounterFile = 0;
739 buildFile() { 739 buildFile() {
740 var o = new api.File(); 740 var o = new api.File();
741 buildCounterFile++; 741 buildCounterFile++;
742 if (buildCounterFile < 3) { 742 if (buildCounterFile < 3) {
743 o.appProperties = buildUnnamed1481(); 743 o.appProperties = buildUnnamed1488();
744 o.capabilities = buildFileCapabilities(); 744 o.capabilities = buildFileCapabilities();
745 o.contentHints = buildFileContentHints(); 745 o.contentHints = buildFileContentHints();
746 o.createdTime = core.DateTime.parse("2002-02-27T14:01:02"); 746 o.createdTime = core.DateTime.parse("2002-02-27T14:01:02");
747 o.description = "foo"; 747 o.description = "foo";
748 o.explicitlyTrashed = true; 748 o.explicitlyTrashed = true;
749 o.fileExtension = "foo"; 749 o.fileExtension = "foo";
750 o.folderColorRgb = "foo"; 750 o.folderColorRgb = "foo";
751 o.fullFileExtension = "foo"; 751 o.fullFileExtension = "foo";
752 o.hasAugmentedPermissions = true; 752 o.hasAugmentedPermissions = true;
753 o.hasThumbnail = true; 753 o.hasThumbnail = true;
754 o.headRevisionId = "foo"; 754 o.headRevisionId = "foo";
755 o.iconLink = "foo"; 755 o.iconLink = "foo";
756 o.id = "foo"; 756 o.id = "foo";
757 o.imageMediaMetadata = buildFileImageMediaMetadata(); 757 o.imageMediaMetadata = buildFileImageMediaMetadata();
758 o.isAppAuthorized = true; 758 o.isAppAuthorized = true;
759 o.kind = "foo"; 759 o.kind = "foo";
760 o.lastModifyingUser = buildUser(); 760 o.lastModifyingUser = buildUser();
761 o.md5Checksum = "foo"; 761 o.md5Checksum = "foo";
762 o.mimeType = "foo"; 762 o.mimeType = "foo";
763 o.modifiedByMe = true; 763 o.modifiedByMe = true;
764 o.modifiedByMeTime = core.DateTime.parse("2002-02-27T14:01:02"); 764 o.modifiedByMeTime = core.DateTime.parse("2002-02-27T14:01:02");
765 o.modifiedTime = core.DateTime.parse("2002-02-27T14:01:02"); 765 o.modifiedTime = core.DateTime.parse("2002-02-27T14:01:02");
766 o.name = "foo"; 766 o.name = "foo";
767 o.originalFilename = "foo"; 767 o.originalFilename = "foo";
768 o.ownedByMe = true; 768 o.ownedByMe = true;
769 o.owners = buildUnnamed1482(); 769 o.owners = buildUnnamed1489();
770 o.parents = buildUnnamed1483(); 770 o.parents = buildUnnamed1490();
771 o.permissions = buildUnnamed1484(); 771 o.permissions = buildUnnamed1491();
772 o.properties = buildUnnamed1485(); 772 o.properties = buildUnnamed1492();
773 o.quotaBytesUsed = "foo"; 773 o.quotaBytesUsed = "foo";
774 o.shared = true; 774 o.shared = true;
775 o.sharedWithMeTime = core.DateTime.parse("2002-02-27T14:01:02"); 775 o.sharedWithMeTime = core.DateTime.parse("2002-02-27T14:01:02");
776 o.sharingUser = buildUser(); 776 o.sharingUser = buildUser();
777 o.size = "foo"; 777 o.size = "foo";
778 o.spaces = buildUnnamed1486(); 778 o.spaces = buildUnnamed1493();
779 o.starred = true; 779 o.starred = true;
780 o.teamDriveId = "foo"; 780 o.teamDriveId = "foo";
781 o.thumbnailLink = "foo"; 781 o.thumbnailLink = "foo";
782 o.thumbnailVersion = "foo"; 782 o.thumbnailVersion = "foo";
783 o.trashed = true; 783 o.trashed = true;
784 o.trashedTime = core.DateTime.parse("2002-02-27T14:01:02"); 784 o.trashedTime = core.DateTime.parse("2002-02-27T14:01:02");
785 o.trashingUser = buildUser(); 785 o.trashingUser = buildUser();
786 o.version = "foo"; 786 o.version = "foo";
787 o.videoMediaMetadata = buildFileVideoMediaMetadata(); 787 o.videoMediaMetadata = buildFileVideoMediaMetadata();
788 o.viewedByMe = true; 788 o.viewedByMe = true;
789 o.viewedByMeTime = core.DateTime.parse("2002-02-27T14:01:02"); 789 o.viewedByMeTime = core.DateTime.parse("2002-02-27T14:01:02");
790 o.viewersCanCopyContent = true; 790 o.viewersCanCopyContent = true;
791 o.webContentLink = "foo"; 791 o.webContentLink = "foo";
792 o.webViewLink = "foo"; 792 o.webViewLink = "foo";
793 o.writersCanShare = true; 793 o.writersCanShare = true;
794 } 794 }
795 buildCounterFile--; 795 buildCounterFile--;
796 return o; 796 return o;
797 } 797 }
798 798
799 checkFile(api.File o) { 799 checkFile(api.File o) {
800 buildCounterFile++; 800 buildCounterFile++;
801 if (buildCounterFile < 3) { 801 if (buildCounterFile < 3) {
802 checkUnnamed1481(o.appProperties); 802 checkUnnamed1488(o.appProperties);
803 checkFileCapabilities(o.capabilities); 803 checkFileCapabilities(o.capabilities);
804 checkFileContentHints(o.contentHints); 804 checkFileContentHints(o.contentHints);
805 unittest.expect(o.createdTime, unittest.equals(core.DateTime.parse("2002-02- 27T14:01:02"))); 805 unittest.expect(o.createdTime, unittest.equals(core.DateTime.parse("2002-02- 27T14:01:02")));
806 unittest.expect(o.description, unittest.equals('foo')); 806 unittest.expect(o.description, unittest.equals('foo'));
807 unittest.expect(o.explicitlyTrashed, unittest.isTrue); 807 unittest.expect(o.explicitlyTrashed, unittest.isTrue);
808 unittest.expect(o.fileExtension, unittest.equals('foo')); 808 unittest.expect(o.fileExtension, unittest.equals('foo'));
809 unittest.expect(o.folderColorRgb, unittest.equals('foo')); 809 unittest.expect(o.folderColorRgb, unittest.equals('foo'));
810 unittest.expect(o.fullFileExtension, unittest.equals('foo')); 810 unittest.expect(o.fullFileExtension, unittest.equals('foo'));
811 unittest.expect(o.hasAugmentedPermissions, unittest.isTrue); 811 unittest.expect(o.hasAugmentedPermissions, unittest.isTrue);
812 unittest.expect(o.hasThumbnail, unittest.isTrue); 812 unittest.expect(o.hasThumbnail, unittest.isTrue);
813 unittest.expect(o.headRevisionId, unittest.equals('foo')); 813 unittest.expect(o.headRevisionId, unittest.equals('foo'));
814 unittest.expect(o.iconLink, unittest.equals('foo')); 814 unittest.expect(o.iconLink, unittest.equals('foo'));
815 unittest.expect(o.id, unittest.equals('foo')); 815 unittest.expect(o.id, unittest.equals('foo'));
816 checkFileImageMediaMetadata(o.imageMediaMetadata); 816 checkFileImageMediaMetadata(o.imageMediaMetadata);
817 unittest.expect(o.isAppAuthorized, unittest.isTrue); 817 unittest.expect(o.isAppAuthorized, unittest.isTrue);
818 unittest.expect(o.kind, unittest.equals('foo')); 818 unittest.expect(o.kind, unittest.equals('foo'));
819 checkUser(o.lastModifyingUser); 819 checkUser(o.lastModifyingUser);
820 unittest.expect(o.md5Checksum, unittest.equals('foo')); 820 unittest.expect(o.md5Checksum, unittest.equals('foo'));
821 unittest.expect(o.mimeType, unittest.equals('foo')); 821 unittest.expect(o.mimeType, unittest.equals('foo'));
822 unittest.expect(o.modifiedByMe, unittest.isTrue); 822 unittest.expect(o.modifiedByMe, unittest.isTrue);
823 unittest.expect(o.modifiedByMeTime, unittest.equals(core.DateTime.parse("200 2-02-27T14:01:02"))); 823 unittest.expect(o.modifiedByMeTime, unittest.equals(core.DateTime.parse("200 2-02-27T14:01:02")));
824 unittest.expect(o.modifiedTime, unittest.equals(core.DateTime.parse("2002-02 -27T14:01:02"))); 824 unittest.expect(o.modifiedTime, unittest.equals(core.DateTime.parse("2002-02 -27T14:01:02")));
825 unittest.expect(o.name, unittest.equals('foo')); 825 unittest.expect(o.name, unittest.equals('foo'));
826 unittest.expect(o.originalFilename, unittest.equals('foo')); 826 unittest.expect(o.originalFilename, unittest.equals('foo'));
827 unittest.expect(o.ownedByMe, unittest.isTrue); 827 unittest.expect(o.ownedByMe, unittest.isTrue);
828 checkUnnamed1482(o.owners); 828 checkUnnamed1489(o.owners);
829 checkUnnamed1483(o.parents); 829 checkUnnamed1490(o.parents);
830 checkUnnamed1484(o.permissions); 830 checkUnnamed1491(o.permissions);
831 checkUnnamed1485(o.properties); 831 checkUnnamed1492(o.properties);
832 unittest.expect(o.quotaBytesUsed, unittest.equals('foo')); 832 unittest.expect(o.quotaBytesUsed, unittest.equals('foo'));
833 unittest.expect(o.shared, unittest.isTrue); 833 unittest.expect(o.shared, unittest.isTrue);
834 unittest.expect(o.sharedWithMeTime, unittest.equals(core.DateTime.parse("200 2-02-27T14:01:02"))); 834 unittest.expect(o.sharedWithMeTime, unittest.equals(core.DateTime.parse("200 2-02-27T14:01:02")));
835 checkUser(o.sharingUser); 835 checkUser(o.sharingUser);
836 unittest.expect(o.size, unittest.equals('foo')); 836 unittest.expect(o.size, unittest.equals('foo'));
837 checkUnnamed1486(o.spaces); 837 checkUnnamed1493(o.spaces);
838 unittest.expect(o.starred, unittest.isTrue); 838 unittest.expect(o.starred, unittest.isTrue);
839 unittest.expect(o.teamDriveId, unittest.equals('foo')); 839 unittest.expect(o.teamDriveId, unittest.equals('foo'));
840 unittest.expect(o.thumbnailLink, unittest.equals('foo')); 840 unittest.expect(o.thumbnailLink, unittest.equals('foo'));
841 unittest.expect(o.thumbnailVersion, unittest.equals('foo')); 841 unittest.expect(o.thumbnailVersion, unittest.equals('foo'));
842 unittest.expect(o.trashed, unittest.isTrue); 842 unittest.expect(o.trashed, unittest.isTrue);
843 unittest.expect(o.trashedTime, unittest.equals(core.DateTime.parse("2002-02- 27T14:01:02"))); 843 unittest.expect(o.trashedTime, unittest.equals(core.DateTime.parse("2002-02- 27T14:01:02")));
844 checkUser(o.trashingUser); 844 checkUser(o.trashingUser);
845 unittest.expect(o.version, unittest.equals('foo')); 845 unittest.expect(o.version, unittest.equals('foo'));
846 checkFileVideoMediaMetadata(o.videoMediaMetadata); 846 checkFileVideoMediaMetadata(o.videoMediaMetadata);
847 unittest.expect(o.viewedByMe, unittest.isTrue); 847 unittest.expect(o.viewedByMe, unittest.isTrue);
848 unittest.expect(o.viewedByMeTime, unittest.equals(core.DateTime.parse("2002- 02-27T14:01:02"))); 848 unittest.expect(o.viewedByMeTime, unittest.equals(core.DateTime.parse("2002- 02-27T14:01:02")));
849 unittest.expect(o.viewersCanCopyContent, unittest.isTrue); 849 unittest.expect(o.viewersCanCopyContent, unittest.isTrue);
850 unittest.expect(o.webContentLink, unittest.equals('foo')); 850 unittest.expect(o.webContentLink, unittest.equals('foo'));
851 unittest.expect(o.webViewLink, unittest.equals('foo')); 851 unittest.expect(o.webViewLink, unittest.equals('foo'));
852 unittest.expect(o.writersCanShare, unittest.isTrue); 852 unittest.expect(o.writersCanShare, unittest.isTrue);
853 } 853 }
854 buildCounterFile--; 854 buildCounterFile--;
855 } 855 }
856 856
857 buildUnnamed1487() { 857 buildUnnamed1494() {
858 var o = new core.List<api.File>(); 858 var o = new core.List<api.File>();
859 o.add(buildFile()); 859 o.add(buildFile());
860 o.add(buildFile()); 860 o.add(buildFile());
861 return o; 861 return o;
862 } 862 }
863 863
864 checkUnnamed1487(core.List<api.File> o) { 864 checkUnnamed1494(core.List<api.File> o) {
865 unittest.expect(o, unittest.hasLength(2)); 865 unittest.expect(o, unittest.hasLength(2));
866 checkFile(o[0]); 866 checkFile(o[0]);
867 checkFile(o[1]); 867 checkFile(o[1]);
868 } 868 }
869 869
870 core.int buildCounterFileList = 0; 870 core.int buildCounterFileList = 0;
871 buildFileList() { 871 buildFileList() {
872 var o = new api.FileList(); 872 var o = new api.FileList();
873 buildCounterFileList++; 873 buildCounterFileList++;
874 if (buildCounterFileList < 3) { 874 if (buildCounterFileList < 3) {
875 o.files = buildUnnamed1487(); 875 o.files = buildUnnamed1494();
876 o.incompleteSearch = true; 876 o.incompleteSearch = true;
877 o.kind = "foo"; 877 o.kind = "foo";
878 o.nextPageToken = "foo"; 878 o.nextPageToken = "foo";
879 } 879 }
880 buildCounterFileList--; 880 buildCounterFileList--;
881 return o; 881 return o;
882 } 882 }
883 883
884 checkFileList(api.FileList o) { 884 checkFileList(api.FileList o) {
885 buildCounterFileList++; 885 buildCounterFileList++;
886 if (buildCounterFileList < 3) { 886 if (buildCounterFileList < 3) {
887 checkUnnamed1487(o.files); 887 checkUnnamed1494(o.files);
888 unittest.expect(o.incompleteSearch, unittest.isTrue); 888 unittest.expect(o.incompleteSearch, unittest.isTrue);
889 unittest.expect(o.kind, unittest.equals('foo')); 889 unittest.expect(o.kind, unittest.equals('foo'));
890 unittest.expect(o.nextPageToken, unittest.equals('foo')); 890 unittest.expect(o.nextPageToken, unittest.equals('foo'));
891 } 891 }
892 buildCounterFileList--; 892 buildCounterFileList--;
893 } 893 }
894 894
895 buildUnnamed1488() { 895 buildUnnamed1495() {
896 var o = new core.List<core.String>(); 896 var o = new core.List<core.String>();
897 o.add("foo"); 897 o.add("foo");
898 o.add("foo"); 898 o.add("foo");
899 return o; 899 return o;
900 } 900 }
901 901
902 checkUnnamed1488(core.List<core.String> o) { 902 checkUnnamed1495(core.List<core.String> o) {
903 unittest.expect(o, unittest.hasLength(2)); 903 unittest.expect(o, unittest.hasLength(2));
904 unittest.expect(o[0], unittest.equals('foo')); 904 unittest.expect(o[0], unittest.equals('foo'));
905 unittest.expect(o[1], unittest.equals('foo')); 905 unittest.expect(o[1], unittest.equals('foo'));
906 } 906 }
907 907
908 core.int buildCounterGeneratedIds = 0; 908 core.int buildCounterGeneratedIds = 0;
909 buildGeneratedIds() { 909 buildGeneratedIds() {
910 var o = new api.GeneratedIds(); 910 var o = new api.GeneratedIds();
911 buildCounterGeneratedIds++; 911 buildCounterGeneratedIds++;
912 if (buildCounterGeneratedIds < 3) { 912 if (buildCounterGeneratedIds < 3) {
913 o.ids = buildUnnamed1488(); 913 o.ids = buildUnnamed1495();
914 o.kind = "foo"; 914 o.kind = "foo";
915 o.space = "foo"; 915 o.space = "foo";
916 } 916 }
917 buildCounterGeneratedIds--; 917 buildCounterGeneratedIds--;
918 return o; 918 return o;
919 } 919 }
920 920
921 checkGeneratedIds(api.GeneratedIds o) { 921 checkGeneratedIds(api.GeneratedIds o) {
922 buildCounterGeneratedIds++; 922 buildCounterGeneratedIds++;
923 if (buildCounterGeneratedIds < 3) { 923 if (buildCounterGeneratedIds < 3) {
924 checkUnnamed1488(o.ids); 924 checkUnnamed1495(o.ids);
925 unittest.expect(o.kind, unittest.equals('foo')); 925 unittest.expect(o.kind, unittest.equals('foo'));
926 unittest.expect(o.space, unittest.equals('foo')); 926 unittest.expect(o.space, unittest.equals('foo'));
927 } 927 }
928 buildCounterGeneratedIds--; 928 buildCounterGeneratedIds--;
929 } 929 }
930 930
931 core.int buildCounterPermissionTeamDrivePermissionDetails = 0; 931 core.int buildCounterPermissionTeamDrivePermissionDetails = 0;
932 buildPermissionTeamDrivePermissionDetails() { 932 buildPermissionTeamDrivePermissionDetails() {
933 var o = new api.PermissionTeamDrivePermissionDetails(); 933 var o = new api.PermissionTeamDrivePermissionDetails();
934 buildCounterPermissionTeamDrivePermissionDetails++; 934 buildCounterPermissionTeamDrivePermissionDetails++;
(...skipping 11 matching lines...) Expand all
946 buildCounterPermissionTeamDrivePermissionDetails++; 946 buildCounterPermissionTeamDrivePermissionDetails++;
947 if (buildCounterPermissionTeamDrivePermissionDetails < 3) { 947 if (buildCounterPermissionTeamDrivePermissionDetails < 3) {
948 unittest.expect(o.inherited, unittest.isTrue); 948 unittest.expect(o.inherited, unittest.isTrue);
949 unittest.expect(o.inheritedFrom, unittest.equals('foo')); 949 unittest.expect(o.inheritedFrom, unittest.equals('foo'));
950 unittest.expect(o.role, unittest.equals('foo')); 950 unittest.expect(o.role, unittest.equals('foo'));
951 unittest.expect(o.teamDrivePermissionType, unittest.equals('foo')); 951 unittest.expect(o.teamDrivePermissionType, unittest.equals('foo'));
952 } 952 }
953 buildCounterPermissionTeamDrivePermissionDetails--; 953 buildCounterPermissionTeamDrivePermissionDetails--;
954 } 954 }
955 955
956 buildUnnamed1489() { 956 buildUnnamed1496() {
957 var o = new core.List<api.PermissionTeamDrivePermissionDetails>(); 957 var o = new core.List<api.PermissionTeamDrivePermissionDetails>();
958 o.add(buildPermissionTeamDrivePermissionDetails()); 958 o.add(buildPermissionTeamDrivePermissionDetails());
959 o.add(buildPermissionTeamDrivePermissionDetails()); 959 o.add(buildPermissionTeamDrivePermissionDetails());
960 return o; 960 return o;
961 } 961 }
962 962
963 checkUnnamed1489(core.List<api.PermissionTeamDrivePermissionDetails> o) { 963 checkUnnamed1496(core.List<api.PermissionTeamDrivePermissionDetails> o) {
964 unittest.expect(o, unittest.hasLength(2)); 964 unittest.expect(o, unittest.hasLength(2));
965 checkPermissionTeamDrivePermissionDetails(o[0]); 965 checkPermissionTeamDrivePermissionDetails(o[0]);
966 checkPermissionTeamDrivePermissionDetails(o[1]); 966 checkPermissionTeamDrivePermissionDetails(o[1]);
967 } 967 }
968 968
969 core.int buildCounterPermission = 0; 969 core.int buildCounterPermission = 0;
970 buildPermission() { 970 buildPermission() {
971 var o = new api.Permission(); 971 var o = new api.Permission();
972 buildCounterPermission++; 972 buildCounterPermission++;
973 if (buildCounterPermission < 3) { 973 if (buildCounterPermission < 3) {
974 o.allowFileDiscovery = true; 974 o.allowFileDiscovery = true;
975 o.deleted = true; 975 o.deleted = true;
976 o.displayName = "foo"; 976 o.displayName = "foo";
977 o.domain = "foo"; 977 o.domain = "foo";
978 o.emailAddress = "foo"; 978 o.emailAddress = "foo";
979 o.expirationTime = core.DateTime.parse("2002-02-27T14:01:02"); 979 o.expirationTime = core.DateTime.parse("2002-02-27T14:01:02");
980 o.id = "foo"; 980 o.id = "foo";
981 o.kind = "foo"; 981 o.kind = "foo";
982 o.photoLink = "foo"; 982 o.photoLink = "foo";
983 o.role = "foo"; 983 o.role = "foo";
984 o.teamDrivePermissionDetails = buildUnnamed1489(); 984 o.teamDrivePermissionDetails = buildUnnamed1496();
985 o.type = "foo"; 985 o.type = "foo";
986 } 986 }
987 buildCounterPermission--; 987 buildCounterPermission--;
988 return o; 988 return o;
989 } 989 }
990 990
991 checkPermission(api.Permission o) { 991 checkPermission(api.Permission o) {
992 buildCounterPermission++; 992 buildCounterPermission++;
993 if (buildCounterPermission < 3) { 993 if (buildCounterPermission < 3) {
994 unittest.expect(o.allowFileDiscovery, unittest.isTrue); 994 unittest.expect(o.allowFileDiscovery, unittest.isTrue);
995 unittest.expect(o.deleted, unittest.isTrue); 995 unittest.expect(o.deleted, unittest.isTrue);
996 unittest.expect(o.displayName, unittest.equals('foo')); 996 unittest.expect(o.displayName, unittest.equals('foo'));
997 unittest.expect(o.domain, unittest.equals('foo')); 997 unittest.expect(o.domain, unittest.equals('foo'));
998 unittest.expect(o.emailAddress, unittest.equals('foo')); 998 unittest.expect(o.emailAddress, unittest.equals('foo'));
999 unittest.expect(o.expirationTime, unittest.equals(core.DateTime.parse("2002- 02-27T14:01:02"))); 999 unittest.expect(o.expirationTime, unittest.equals(core.DateTime.parse("2002- 02-27T14:01:02")));
1000 unittest.expect(o.id, unittest.equals('foo')); 1000 unittest.expect(o.id, unittest.equals('foo'));
1001 unittest.expect(o.kind, unittest.equals('foo')); 1001 unittest.expect(o.kind, unittest.equals('foo'));
1002 unittest.expect(o.photoLink, unittest.equals('foo')); 1002 unittest.expect(o.photoLink, unittest.equals('foo'));
1003 unittest.expect(o.role, unittest.equals('foo')); 1003 unittest.expect(o.role, unittest.equals('foo'));
1004 checkUnnamed1489(o.teamDrivePermissionDetails); 1004 checkUnnamed1496(o.teamDrivePermissionDetails);
1005 unittest.expect(o.type, unittest.equals('foo')); 1005 unittest.expect(o.type, unittest.equals('foo'));
1006 } 1006 }
1007 buildCounterPermission--; 1007 buildCounterPermission--;
1008 } 1008 }
1009 1009
1010 buildUnnamed1490() { 1010 buildUnnamed1497() {
1011 var o = new core.List<api.Permission>(); 1011 var o = new core.List<api.Permission>();
1012 o.add(buildPermission()); 1012 o.add(buildPermission());
1013 o.add(buildPermission()); 1013 o.add(buildPermission());
1014 return o; 1014 return o;
1015 } 1015 }
1016 1016
1017 checkUnnamed1490(core.List<api.Permission> o) { 1017 checkUnnamed1497(core.List<api.Permission> o) {
1018 unittest.expect(o, unittest.hasLength(2)); 1018 unittest.expect(o, unittest.hasLength(2));
1019 checkPermission(o[0]); 1019 checkPermission(o[0]);
1020 checkPermission(o[1]); 1020 checkPermission(o[1]);
1021 } 1021 }
1022 1022
1023 core.int buildCounterPermissionList = 0; 1023 core.int buildCounterPermissionList = 0;
1024 buildPermissionList() { 1024 buildPermissionList() {
1025 var o = new api.PermissionList(); 1025 var o = new api.PermissionList();
1026 buildCounterPermissionList++; 1026 buildCounterPermissionList++;
1027 if (buildCounterPermissionList < 3) { 1027 if (buildCounterPermissionList < 3) {
1028 o.kind = "foo"; 1028 o.kind = "foo";
1029 o.nextPageToken = "foo"; 1029 o.nextPageToken = "foo";
1030 o.permissions = buildUnnamed1490(); 1030 o.permissions = buildUnnamed1497();
1031 } 1031 }
1032 buildCounterPermissionList--; 1032 buildCounterPermissionList--;
1033 return o; 1033 return o;
1034 } 1034 }
1035 1035
1036 checkPermissionList(api.PermissionList o) { 1036 checkPermissionList(api.PermissionList o) {
1037 buildCounterPermissionList++; 1037 buildCounterPermissionList++;
1038 if (buildCounterPermissionList < 3) { 1038 if (buildCounterPermissionList < 3) {
1039 unittest.expect(o.kind, unittest.equals('foo')); 1039 unittest.expect(o.kind, unittest.equals('foo'));
1040 unittest.expect(o.nextPageToken, unittest.equals('foo')); 1040 unittest.expect(o.nextPageToken, unittest.equals('foo'));
1041 checkUnnamed1490(o.permissions); 1041 checkUnnamed1497(o.permissions);
1042 } 1042 }
1043 buildCounterPermissionList--; 1043 buildCounterPermissionList--;
1044 } 1044 }
1045 1045
1046 core.int buildCounterReply = 0; 1046 core.int buildCounterReply = 0;
1047 buildReply() { 1047 buildReply() {
1048 var o = new api.Reply(); 1048 var o = new api.Reply();
1049 buildCounterReply++; 1049 buildCounterReply++;
1050 if (buildCounterReply < 3) { 1050 if (buildCounterReply < 3) {
1051 o.action = "foo"; 1051 o.action = "foo";
(...skipping 19 matching lines...) Expand all
1071 unittest.expect(o.createdTime, unittest.equals(core.DateTime.parse("2002-02- 27T14:01:02"))); 1071 unittest.expect(o.createdTime, unittest.equals(core.DateTime.parse("2002-02- 27T14:01:02")));
1072 unittest.expect(o.deleted, unittest.isTrue); 1072 unittest.expect(o.deleted, unittest.isTrue);
1073 unittest.expect(o.htmlContent, unittest.equals('foo')); 1073 unittest.expect(o.htmlContent, unittest.equals('foo'));
1074 unittest.expect(o.id, unittest.equals('foo')); 1074 unittest.expect(o.id, unittest.equals('foo'));
1075 unittest.expect(o.kind, unittest.equals('foo')); 1075 unittest.expect(o.kind, unittest.equals('foo'));
1076 unittest.expect(o.modifiedTime, unittest.equals(core.DateTime.parse("2002-02 -27T14:01:02"))); 1076 unittest.expect(o.modifiedTime, unittest.equals(core.DateTime.parse("2002-02 -27T14:01:02")));
1077 } 1077 }
1078 buildCounterReply--; 1078 buildCounterReply--;
1079 } 1079 }
1080 1080
1081 buildUnnamed1491() { 1081 buildUnnamed1498() {
1082 var o = new core.List<api.Reply>(); 1082 var o = new core.List<api.Reply>();
1083 o.add(buildReply()); 1083 o.add(buildReply());
1084 o.add(buildReply()); 1084 o.add(buildReply());
1085 return o; 1085 return o;
1086 } 1086 }
1087 1087
1088 checkUnnamed1491(core.List<api.Reply> o) { 1088 checkUnnamed1498(core.List<api.Reply> o) {
1089 unittest.expect(o, unittest.hasLength(2)); 1089 unittest.expect(o, unittest.hasLength(2));
1090 checkReply(o[0]); 1090 checkReply(o[0]);
1091 checkReply(o[1]); 1091 checkReply(o[1]);
1092 } 1092 }
1093 1093
1094 core.int buildCounterReplyList = 0; 1094 core.int buildCounterReplyList = 0;
1095 buildReplyList() { 1095 buildReplyList() {
1096 var o = new api.ReplyList(); 1096 var o = new api.ReplyList();
1097 buildCounterReplyList++; 1097 buildCounterReplyList++;
1098 if (buildCounterReplyList < 3) { 1098 if (buildCounterReplyList < 3) {
1099 o.kind = "foo"; 1099 o.kind = "foo";
1100 o.nextPageToken = "foo"; 1100 o.nextPageToken = "foo";
1101 o.replies = buildUnnamed1491(); 1101 o.replies = buildUnnamed1498();
1102 } 1102 }
1103 buildCounterReplyList--; 1103 buildCounterReplyList--;
1104 return o; 1104 return o;
1105 } 1105 }
1106 1106
1107 checkReplyList(api.ReplyList o) { 1107 checkReplyList(api.ReplyList o) {
1108 buildCounterReplyList++; 1108 buildCounterReplyList++;
1109 if (buildCounterReplyList < 3) { 1109 if (buildCounterReplyList < 3) {
1110 unittest.expect(o.kind, unittest.equals('foo')); 1110 unittest.expect(o.kind, unittest.equals('foo'));
1111 unittest.expect(o.nextPageToken, unittest.equals('foo')); 1111 unittest.expect(o.nextPageToken, unittest.equals('foo'));
1112 checkUnnamed1491(o.replies); 1112 checkUnnamed1498(o.replies);
1113 } 1113 }
1114 buildCounterReplyList--; 1114 buildCounterReplyList--;
1115 } 1115 }
1116 1116
1117 core.int buildCounterRevision = 0; 1117 core.int buildCounterRevision = 0;
1118 buildRevision() { 1118 buildRevision() {
1119 var o = new api.Revision(); 1119 var o = new api.Revision();
1120 buildCounterRevision++; 1120 buildCounterRevision++;
1121 if (buildCounterRevision < 3) { 1121 if (buildCounterRevision < 3) {
1122 o.id = "foo"; 1122 o.id = "foo";
(...skipping 25 matching lines...) Expand all
1148 unittest.expect(o.modifiedTime, unittest.equals(core.DateTime.parse("2002-02 -27T14:01:02"))); 1148 unittest.expect(o.modifiedTime, unittest.equals(core.DateTime.parse("2002-02 -27T14:01:02")));
1149 unittest.expect(o.originalFilename, unittest.equals('foo')); 1149 unittest.expect(o.originalFilename, unittest.equals('foo'));
1150 unittest.expect(o.publishAuto, unittest.isTrue); 1150 unittest.expect(o.publishAuto, unittest.isTrue);
1151 unittest.expect(o.published, unittest.isTrue); 1151 unittest.expect(o.published, unittest.isTrue);
1152 unittest.expect(o.publishedOutsideDomain, unittest.isTrue); 1152 unittest.expect(o.publishedOutsideDomain, unittest.isTrue);
1153 unittest.expect(o.size, unittest.equals('foo')); 1153 unittest.expect(o.size, unittest.equals('foo'));
1154 } 1154 }
1155 buildCounterRevision--; 1155 buildCounterRevision--;
1156 } 1156 }
1157 1157
1158 buildUnnamed1492() { 1158 buildUnnamed1499() {
1159 var o = new core.List<api.Revision>(); 1159 var o = new core.List<api.Revision>();
1160 o.add(buildRevision()); 1160 o.add(buildRevision());
1161 o.add(buildRevision()); 1161 o.add(buildRevision());
1162 return o; 1162 return o;
1163 } 1163 }
1164 1164
1165 checkUnnamed1492(core.List<api.Revision> o) { 1165 checkUnnamed1499(core.List<api.Revision> o) {
1166 unittest.expect(o, unittest.hasLength(2)); 1166 unittest.expect(o, unittest.hasLength(2));
1167 checkRevision(o[0]); 1167 checkRevision(o[0]);
1168 checkRevision(o[1]); 1168 checkRevision(o[1]);
1169 } 1169 }
1170 1170
1171 core.int buildCounterRevisionList = 0; 1171 core.int buildCounterRevisionList = 0;
1172 buildRevisionList() { 1172 buildRevisionList() {
1173 var o = new api.RevisionList(); 1173 var o = new api.RevisionList();
1174 buildCounterRevisionList++; 1174 buildCounterRevisionList++;
1175 if (buildCounterRevisionList < 3) { 1175 if (buildCounterRevisionList < 3) {
1176 o.kind = "foo"; 1176 o.kind = "foo";
1177 o.nextPageToken = "foo"; 1177 o.nextPageToken = "foo";
1178 o.revisions = buildUnnamed1492(); 1178 o.revisions = buildUnnamed1499();
1179 } 1179 }
1180 buildCounterRevisionList--; 1180 buildCounterRevisionList--;
1181 return o; 1181 return o;
1182 } 1182 }
1183 1183
1184 checkRevisionList(api.RevisionList o) { 1184 checkRevisionList(api.RevisionList o) {
1185 buildCounterRevisionList++; 1185 buildCounterRevisionList++;
1186 if (buildCounterRevisionList < 3) { 1186 if (buildCounterRevisionList < 3) {
1187 unittest.expect(o.kind, unittest.equals('foo')); 1187 unittest.expect(o.kind, unittest.equals('foo'));
1188 unittest.expect(o.nextPageToken, unittest.equals('foo')); 1188 unittest.expect(o.nextPageToken, unittest.equals('foo'));
1189 checkUnnamed1492(o.revisions); 1189 checkUnnamed1499(o.revisions);
1190 } 1190 }
1191 buildCounterRevisionList--; 1191 buildCounterRevisionList--;
1192 } 1192 }
1193 1193
1194 core.int buildCounterStartPageToken = 0; 1194 core.int buildCounterStartPageToken = 0;
1195 buildStartPageToken() { 1195 buildStartPageToken() {
1196 var o = new api.StartPageToken(); 1196 var o = new api.StartPageToken();
1197 buildCounterStartPageToken++; 1197 buildCounterStartPageToken++;
1198 if (buildCounterStartPageToken < 3) { 1198 if (buildCounterStartPageToken < 3) {
1199 o.kind = "foo"; 1199 o.kind = "foo";
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
1308 checkTeamDriveCapabilities(o.capabilities); 1308 checkTeamDriveCapabilities(o.capabilities);
1309 unittest.expect(o.colorRgb, unittest.equals('foo')); 1309 unittest.expect(o.colorRgb, unittest.equals('foo'));
1310 unittest.expect(o.id, unittest.equals('foo')); 1310 unittest.expect(o.id, unittest.equals('foo'));
1311 unittest.expect(o.kind, unittest.equals('foo')); 1311 unittest.expect(o.kind, unittest.equals('foo'));
1312 unittest.expect(o.name, unittest.equals('foo')); 1312 unittest.expect(o.name, unittest.equals('foo'));
1313 unittest.expect(o.themeId, unittest.equals('foo')); 1313 unittest.expect(o.themeId, unittest.equals('foo'));
1314 } 1314 }
1315 buildCounterTeamDrive--; 1315 buildCounterTeamDrive--;
1316 } 1316 }
1317 1317
1318 buildUnnamed1493() { 1318 buildUnnamed1500() {
1319 var o = new core.List<api.TeamDrive>(); 1319 var o = new core.List<api.TeamDrive>();
1320 o.add(buildTeamDrive()); 1320 o.add(buildTeamDrive());
1321 o.add(buildTeamDrive()); 1321 o.add(buildTeamDrive());
1322 return o; 1322 return o;
1323 } 1323 }
1324 1324
1325 checkUnnamed1493(core.List<api.TeamDrive> o) { 1325 checkUnnamed1500(core.List<api.TeamDrive> o) {
1326 unittest.expect(o, unittest.hasLength(2)); 1326 unittest.expect(o, unittest.hasLength(2));
1327 checkTeamDrive(o[0]); 1327 checkTeamDrive(o[0]);
1328 checkTeamDrive(o[1]); 1328 checkTeamDrive(o[1]);
1329 } 1329 }
1330 1330
1331 core.int buildCounterTeamDriveList = 0; 1331 core.int buildCounterTeamDriveList = 0;
1332 buildTeamDriveList() { 1332 buildTeamDriveList() {
1333 var o = new api.TeamDriveList(); 1333 var o = new api.TeamDriveList();
1334 buildCounterTeamDriveList++; 1334 buildCounterTeamDriveList++;
1335 if (buildCounterTeamDriveList < 3) { 1335 if (buildCounterTeamDriveList < 3) {
1336 o.kind = "foo"; 1336 o.kind = "foo";
1337 o.nextPageToken = "foo"; 1337 o.nextPageToken = "foo";
1338 o.teamDrives = buildUnnamed1493(); 1338 o.teamDrives = buildUnnamed1500();
1339 } 1339 }
1340 buildCounterTeamDriveList--; 1340 buildCounterTeamDriveList--;
1341 return o; 1341 return o;
1342 } 1342 }
1343 1343
1344 checkTeamDriveList(api.TeamDriveList o) { 1344 checkTeamDriveList(api.TeamDriveList o) {
1345 buildCounterTeamDriveList++; 1345 buildCounterTeamDriveList++;
1346 if (buildCounterTeamDriveList < 3) { 1346 if (buildCounterTeamDriveList < 3) {
1347 unittest.expect(o.kind, unittest.equals('foo')); 1347 unittest.expect(o.kind, unittest.equals('foo'));
1348 unittest.expect(o.nextPageToken, unittest.equals('foo')); 1348 unittest.expect(o.nextPageToken, unittest.equals('foo'));
1349 checkUnnamed1493(o.teamDrives); 1349 checkUnnamed1500(o.teamDrives);
1350 } 1350 }
1351 buildCounterTeamDriveList--; 1351 buildCounterTeamDriveList--;
1352 } 1352 }
1353 1353
1354 core.int buildCounterUser = 0; 1354 core.int buildCounterUser = 0;
1355 buildUser() { 1355 buildUser() {
1356 var o = new api.User(); 1356 var o = new api.User();
1357 buildCounterUser++; 1357 buildCounterUser++;
1358 if (buildCounterUser < 3) { 1358 if (buildCounterUser < 3) {
1359 o.displayName = "foo"; 1359 o.displayName = "foo";
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
1659 checkUser(od); 1659 checkUser(od);
1660 }); 1660 });
1661 }); 1661 });
1662 1662
1663 1663
1664 unittest.group("resource-AboutResourceApi", () { 1664 unittest.group("resource-AboutResourceApi", () {
1665 unittest.test("method--get", () { 1665 unittest.test("method--get", () {
1666 1666
1667 var mock = new HttpServerMock(); 1667 var mock = new HttpServerMock();
1668 api.AboutResourceApi res = new api.DriveApi(mock).about; 1668 api.AboutResourceApi res = new api.DriveApi(mock).about;
1669 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 1669 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
1670 var path = (req.url).path; 1670 var path = (req.url).path;
1671 var pathOffset = 0; 1671 var pathOffset = 0;
1672 var index; 1672 var index;
1673 var subPart; 1673 var subPart;
1674 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 1674 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
1675 pathOffset += 1; 1675 pathOffset += 1;
1676 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("drive/v3/")); 1676 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("drive/v3/"));
1677 pathOffset += 9; 1677 pathOffset += 9;
1678 unittest.expect(path.substring(pathOffset, pathOffset + 5), unittest.equ als("about")); 1678 unittest.expect(path.substring(pathOffset, pathOffset + 5), unittest.equ als("about"));
1679 pathOffset += 5; 1679 pathOffset += 5;
(...skipping 15 matching lines...) Expand all
1695 } 1695 }
1696 } 1696 }
1697 1697
1698 1698
1699 var h = { 1699 var h = {
1700 "content-type" : "application/json; charset=utf-8", 1700 "content-type" : "application/json; charset=utf-8",
1701 }; 1701 };
1702 var resp = convert.JSON.encode(buildAbout()); 1702 var resp = convert.JSON.encode(buildAbout());
1703 return new async.Future.value(stringResponse(200, h, resp)); 1703 return new async.Future.value(stringResponse(200, h, resp));
1704 }), true); 1704 }), true);
1705 res.get().then(unittest.expectAsync(((api.About response) { 1705 res.get().then(unittest.expectAsync1(((api.About response) {
1706 checkAbout(response); 1706 checkAbout(response);
1707 }))); 1707 })));
1708 }); 1708 });
1709 1709
1710 }); 1710 });
1711 1711
1712 1712
1713 unittest.group("resource-ChangesResourceApi", () { 1713 unittest.group("resource-ChangesResourceApi", () {
1714 unittest.test("method--getStartPageToken", () { 1714 unittest.test("method--getStartPageToken", () {
1715 1715
1716 var mock = new HttpServerMock(); 1716 var mock = new HttpServerMock();
1717 api.ChangesResourceApi res = new api.DriveApi(mock).changes; 1717 api.ChangesResourceApi res = new api.DriveApi(mock).changes;
1718 var arg_supportsTeamDrives = true; 1718 var arg_supportsTeamDrives = true;
1719 var arg_teamDriveId = "foo"; 1719 var arg_teamDriveId = "foo";
1720 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 1720 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
1721 var path = (req.url).path; 1721 var path = (req.url).path;
1722 var pathOffset = 0; 1722 var pathOffset = 0;
1723 var index; 1723 var index;
1724 var subPart; 1724 var subPart;
1725 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 1725 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
1726 pathOffset += 1; 1726 pathOffset += 1;
1727 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("drive/v3/")); 1727 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("drive/v3/"));
1728 pathOffset += 9; 1728 pathOffset += 9;
1729 unittest.expect(path.substring(pathOffset, pathOffset + 22), unittest.eq uals("changes/startPageToken")); 1729 unittest.expect(path.substring(pathOffset, pathOffset + 22), unittest.eq uals("changes/startPageToken"));
1730 pathOffset += 22; 1730 pathOffset += 22;
(...skipping 17 matching lines...) Expand all
1748 unittest.expect(queryMap["supportsTeamDrives"].first, unittest.equals("$ arg_supportsTeamDrives")); 1748 unittest.expect(queryMap["supportsTeamDrives"].first, unittest.equals("$ arg_supportsTeamDrives"));
1749 unittest.expect(queryMap["teamDriveId"].first, unittest.equals(arg_teamD riveId)); 1749 unittest.expect(queryMap["teamDriveId"].first, unittest.equals(arg_teamD riveId));
1750 1750
1751 1751
1752 var h = { 1752 var h = {
1753 "content-type" : "application/json; charset=utf-8", 1753 "content-type" : "application/json; charset=utf-8",
1754 }; 1754 };
1755 var resp = convert.JSON.encode(buildStartPageToken()); 1755 var resp = convert.JSON.encode(buildStartPageToken());
1756 return new async.Future.value(stringResponse(200, h, resp)); 1756 return new async.Future.value(stringResponse(200, h, resp));
1757 }), true); 1757 }), true);
1758 res.getStartPageToken(supportsTeamDrives: arg_supportsTeamDrives, teamDriv eId: arg_teamDriveId).then(unittest.expectAsync(((api.StartPageToken response) { 1758 res.getStartPageToken(supportsTeamDrives: arg_supportsTeamDrives, teamDriv eId: arg_teamDriveId).then(unittest.expectAsync1(((api.StartPageToken response) {
1759 checkStartPageToken(response); 1759 checkStartPageToken(response);
1760 }))); 1760 })));
1761 }); 1761 });
1762 1762
1763 unittest.test("method--list", () { 1763 unittest.test("method--list", () {
1764 1764
1765 var mock = new HttpServerMock(); 1765 var mock = new HttpServerMock();
1766 api.ChangesResourceApi res = new api.DriveApi(mock).changes; 1766 api.ChangesResourceApi res = new api.DriveApi(mock).changes;
1767 var arg_pageToken = "foo"; 1767 var arg_pageToken = "foo";
1768 var arg_includeCorpusRemovals = true; 1768 var arg_includeCorpusRemovals = true;
1769 var arg_includeRemoved = true; 1769 var arg_includeRemoved = true;
1770 var arg_includeTeamDriveItems = true; 1770 var arg_includeTeamDriveItems = true;
1771 var arg_pageSize = 42; 1771 var arg_pageSize = 42;
1772 var arg_restrictToMyDrive = true; 1772 var arg_restrictToMyDrive = true;
1773 var arg_spaces = "foo"; 1773 var arg_spaces = "foo";
1774 var arg_supportsTeamDrives = true; 1774 var arg_supportsTeamDrives = true;
1775 var arg_teamDriveId = "foo"; 1775 var arg_teamDriveId = "foo";
1776 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 1776 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
1777 var path = (req.url).path; 1777 var path = (req.url).path;
1778 var pathOffset = 0; 1778 var pathOffset = 0;
1779 var index; 1779 var index;
1780 var subPart; 1780 var subPart;
1781 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 1781 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
1782 pathOffset += 1; 1782 pathOffset += 1;
1783 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("drive/v3/")); 1783 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("drive/v3/"));
1784 pathOffset += 9; 1784 pathOffset += 9;
1785 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ als("changes")); 1785 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ als("changes"));
1786 pathOffset += 7; 1786 pathOffset += 7;
(...skipping 24 matching lines...) Expand all
1811 unittest.expect(queryMap["supportsTeamDrives"].first, unittest.equals("$ arg_supportsTeamDrives")); 1811 unittest.expect(queryMap["supportsTeamDrives"].first, unittest.equals("$ arg_supportsTeamDrives"));
1812 unittest.expect(queryMap["teamDriveId"].first, unittest.equals(arg_teamD riveId)); 1812 unittest.expect(queryMap["teamDriveId"].first, unittest.equals(arg_teamD riveId));
1813 1813
1814 1814
1815 var h = { 1815 var h = {
1816 "content-type" : "application/json; charset=utf-8", 1816 "content-type" : "application/json; charset=utf-8",
1817 }; 1817 };
1818 var resp = convert.JSON.encode(buildChangeList()); 1818 var resp = convert.JSON.encode(buildChangeList());
1819 return new async.Future.value(stringResponse(200, h, resp)); 1819 return new async.Future.value(stringResponse(200, h, resp));
1820 }), true); 1820 }), true);
1821 res.list(arg_pageToken, includeCorpusRemovals: arg_includeCorpusRemovals, includeRemoved: arg_includeRemoved, includeTeamDriveItems: arg_includeTeamDriveI tems, pageSize: arg_pageSize, restrictToMyDrive: arg_restrictToMyDrive, spaces: arg_spaces, supportsTeamDrives: arg_supportsTeamDrives, teamDriveId: arg_teamDri veId).then(unittest.expectAsync(((api.ChangeList response) { 1821 res.list(arg_pageToken, includeCorpusRemovals: arg_includeCorpusRemovals, includeRemoved: arg_includeRemoved, includeTeamDriveItems: arg_includeTeamDriveI tems, pageSize: arg_pageSize, restrictToMyDrive: arg_restrictToMyDrive, spaces: arg_spaces, supportsTeamDrives: arg_supportsTeamDrives, teamDriveId: arg_teamDri veId).then(unittest.expectAsync1(((api.ChangeList response) {
1822 checkChangeList(response); 1822 checkChangeList(response);
1823 }))); 1823 })));
1824 }); 1824 });
1825 1825
1826 unittest.test("method--watch", () { 1826 unittest.test("method--watch", () {
1827 1827
1828 var mock = new HttpServerMock(); 1828 var mock = new HttpServerMock();
1829 api.ChangesResourceApi res = new api.DriveApi(mock).changes; 1829 api.ChangesResourceApi res = new api.DriveApi(mock).changes;
1830 var arg_request = buildChannel(); 1830 var arg_request = buildChannel();
1831 var arg_pageToken = "foo"; 1831 var arg_pageToken = "foo";
1832 var arg_includeCorpusRemovals = true; 1832 var arg_includeCorpusRemovals = true;
1833 var arg_includeRemoved = true; 1833 var arg_includeRemoved = true;
1834 var arg_includeTeamDriveItems = true; 1834 var arg_includeTeamDriveItems = true;
1835 var arg_pageSize = 42; 1835 var arg_pageSize = 42;
1836 var arg_restrictToMyDrive = true; 1836 var arg_restrictToMyDrive = true;
1837 var arg_spaces = "foo"; 1837 var arg_spaces = "foo";
1838 var arg_supportsTeamDrives = true; 1838 var arg_supportsTeamDrives = true;
1839 var arg_teamDriveId = "foo"; 1839 var arg_teamDriveId = "foo";
1840 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 1840 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
1841 var obj = new api.Channel.fromJson(json); 1841 var obj = new api.Channel.fromJson(json);
1842 checkChannel(obj); 1842 checkChannel(obj);
1843 1843
1844 var path = (req.url).path; 1844 var path = (req.url).path;
1845 var pathOffset = 0; 1845 var pathOffset = 0;
1846 var index; 1846 var index;
1847 var subPart; 1847 var subPart;
1848 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 1848 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
1849 pathOffset += 1; 1849 pathOffset += 1;
1850 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("drive/v3/")); 1850 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("drive/v3/"));
(...skipping 27 matching lines...) Expand all
1878 unittest.expect(queryMap["supportsTeamDrives"].first, unittest.equals("$ arg_supportsTeamDrives")); 1878 unittest.expect(queryMap["supportsTeamDrives"].first, unittest.equals("$ arg_supportsTeamDrives"));
1879 unittest.expect(queryMap["teamDriveId"].first, unittest.equals(arg_teamD riveId)); 1879 unittest.expect(queryMap["teamDriveId"].first, unittest.equals(arg_teamD riveId));
1880 1880
1881 1881
1882 var h = { 1882 var h = {
1883 "content-type" : "application/json; charset=utf-8", 1883 "content-type" : "application/json; charset=utf-8",
1884 }; 1884 };
1885 var resp = convert.JSON.encode(buildChannel()); 1885 var resp = convert.JSON.encode(buildChannel());
1886 return new async.Future.value(stringResponse(200, h, resp)); 1886 return new async.Future.value(stringResponse(200, h, resp));
1887 }), true); 1887 }), true);
1888 res.watch(arg_request, arg_pageToken, includeCorpusRemovals: arg_includeCo rpusRemovals, includeRemoved: arg_includeRemoved, includeTeamDriveItems: arg_inc ludeTeamDriveItems, pageSize: arg_pageSize, restrictToMyDrive: arg_restrictToMyD rive, spaces: arg_spaces, supportsTeamDrives: arg_supportsTeamDrives, teamDriveI d: arg_teamDriveId).then(unittest.expectAsync(((api.Channel response) { 1888 res.watch(arg_request, arg_pageToken, includeCorpusRemovals: arg_includeCo rpusRemovals, includeRemoved: arg_includeRemoved, includeTeamDriveItems: arg_inc ludeTeamDriveItems, pageSize: arg_pageSize, restrictToMyDrive: arg_restrictToMyD rive, spaces: arg_spaces, supportsTeamDrives: arg_supportsTeamDrives, teamDriveI d: arg_teamDriveId).then(unittest.expectAsync1(((api.Channel response) {
1889 checkChannel(response); 1889 checkChannel(response);
1890 }))); 1890 })));
1891 }); 1891 });
1892 1892
1893 }); 1893 });
1894 1894
1895 1895
1896 unittest.group("resource-ChannelsResourceApi", () { 1896 unittest.group("resource-ChannelsResourceApi", () {
1897 unittest.test("method--stop", () { 1897 unittest.test("method--stop", () {
1898 1898
1899 var mock = new HttpServerMock(); 1899 var mock = new HttpServerMock();
1900 api.ChannelsResourceApi res = new api.DriveApi(mock).channels; 1900 api.ChannelsResourceApi res = new api.DriveApi(mock).channels;
1901 var arg_request = buildChannel(); 1901 var arg_request = buildChannel();
1902 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 1902 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
1903 var obj = new api.Channel.fromJson(json); 1903 var obj = new api.Channel.fromJson(json);
1904 checkChannel(obj); 1904 checkChannel(obj);
1905 1905
1906 var path = (req.url).path; 1906 var path = (req.url).path;
1907 var pathOffset = 0; 1907 var pathOffset = 0;
1908 var index; 1908 var index;
1909 var subPart; 1909 var subPart;
1910 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 1910 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
1911 pathOffset += 1; 1911 pathOffset += 1;
1912 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("drive/v3/")); 1912 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("drive/v3/"));
(...skipping 18 matching lines...) Expand all
1931 } 1931 }
1932 } 1932 }
1933 1933
1934 1934
1935 var h = { 1935 var h = {
1936 "content-type" : "application/json; charset=utf-8", 1936 "content-type" : "application/json; charset=utf-8",
1937 }; 1937 };
1938 var resp = ""; 1938 var resp = "";
1939 return new async.Future.value(stringResponse(200, h, resp)); 1939 return new async.Future.value(stringResponse(200, h, resp));
1940 }), true); 1940 }), true);
1941 res.stop(arg_request).then(unittest.expectAsync((_) {})); 1941 res.stop(arg_request).then(unittest.expectAsync1((_) {}));
1942 }); 1942 });
1943 1943
1944 }); 1944 });
1945 1945
1946 1946
1947 unittest.group("resource-CommentsResourceApi", () { 1947 unittest.group("resource-CommentsResourceApi", () {
1948 unittest.test("method--create", () { 1948 unittest.test("method--create", () {
1949 1949
1950 var mock = new HttpServerMock(); 1950 var mock = new HttpServerMock();
1951 api.CommentsResourceApi res = new api.DriveApi(mock).comments; 1951 api.CommentsResourceApi res = new api.DriveApi(mock).comments;
1952 var arg_request = buildComment(); 1952 var arg_request = buildComment();
1953 var arg_fileId = "foo"; 1953 var arg_fileId = "foo";
1954 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 1954 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
1955 var obj = new api.Comment.fromJson(json); 1955 var obj = new api.Comment.fromJson(json);
1956 checkComment(obj); 1956 checkComment(obj);
1957 1957
1958 var path = (req.url).path; 1958 var path = (req.url).path;
1959 var pathOffset = 0; 1959 var pathOffset = 0;
1960 var index; 1960 var index;
1961 var subPart; 1961 var subPart;
1962 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 1962 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
1963 pathOffset += 1; 1963 pathOffset += 1;
1964 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("drive/v3/")); 1964 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("drive/v3/"));
(...skipping 25 matching lines...) Expand all
1990 } 1990 }
1991 } 1991 }
1992 1992
1993 1993
1994 var h = { 1994 var h = {
1995 "content-type" : "application/json; charset=utf-8", 1995 "content-type" : "application/json; charset=utf-8",
1996 }; 1996 };
1997 var resp = convert.JSON.encode(buildComment()); 1997 var resp = convert.JSON.encode(buildComment());
1998 return new async.Future.value(stringResponse(200, h, resp)); 1998 return new async.Future.value(stringResponse(200, h, resp));
1999 }), true); 1999 }), true);
2000 res.create(arg_request, arg_fileId).then(unittest.expectAsync(((api.Commen t response) { 2000 res.create(arg_request, arg_fileId).then(unittest.expectAsync1(((api.Comme nt response) {
2001 checkComment(response); 2001 checkComment(response);
2002 }))); 2002 })));
2003 }); 2003 });
2004 2004
2005 unittest.test("method--delete", () { 2005 unittest.test("method--delete", () {
2006 2006
2007 var mock = new HttpServerMock(); 2007 var mock = new HttpServerMock();
2008 api.CommentsResourceApi res = new api.DriveApi(mock).comments; 2008 api.CommentsResourceApi res = new api.DriveApi(mock).comments;
2009 var arg_fileId = "foo"; 2009 var arg_fileId = "foo";
2010 var arg_commentId = "foo"; 2010 var arg_commentId = "foo";
2011 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 2011 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
2012 var path = (req.url).path; 2012 var path = (req.url).path;
2013 var pathOffset = 0; 2013 var pathOffset = 0;
2014 var index; 2014 var index;
2015 var subPart; 2015 var subPart;
2016 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 2016 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
2017 pathOffset += 1; 2017 pathOffset += 1;
2018 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("drive/v3/")); 2018 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("drive/v3/"));
2019 pathOffset += 9; 2019 pathOffset += 9;
2020 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ als("files/")); 2020 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ als("files/"));
2021 pathOffset += 6; 2021 pathOffset += 6;
(...skipping 25 matching lines...) Expand all
2047 } 2047 }
2048 } 2048 }
2049 2049
2050 2050
2051 var h = { 2051 var h = {
2052 "content-type" : "application/json; charset=utf-8", 2052 "content-type" : "application/json; charset=utf-8",
2053 }; 2053 };
2054 var resp = ""; 2054 var resp = "";
2055 return new async.Future.value(stringResponse(200, h, resp)); 2055 return new async.Future.value(stringResponse(200, h, resp));
2056 }), true); 2056 }), true);
2057 res.delete(arg_fileId, arg_commentId).then(unittest.expectAsync((_) {})); 2057 res.delete(arg_fileId, arg_commentId).then(unittest.expectAsync1((_) {}));
2058 }); 2058 });
2059 2059
2060 unittest.test("method--get", () { 2060 unittest.test("method--get", () {
2061 2061
2062 var mock = new HttpServerMock(); 2062 var mock = new HttpServerMock();
2063 api.CommentsResourceApi res = new api.DriveApi(mock).comments; 2063 api.CommentsResourceApi res = new api.DriveApi(mock).comments;
2064 var arg_fileId = "foo"; 2064 var arg_fileId = "foo";
2065 var arg_commentId = "foo"; 2065 var arg_commentId = "foo";
2066 var arg_includeDeleted = true; 2066 var arg_includeDeleted = true;
2067 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 2067 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
2068 var path = (req.url).path; 2068 var path = (req.url).path;
2069 var pathOffset = 0; 2069 var pathOffset = 0;
2070 var index; 2070 var index;
2071 var subPart; 2071 var subPart;
2072 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 2072 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
2073 pathOffset += 1; 2073 pathOffset += 1;
2074 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("drive/v3/")); 2074 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("drive/v3/"));
2075 pathOffset += 9; 2075 pathOffset += 9;
2076 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ als("files/")); 2076 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ als("files/"));
2077 pathOffset += 6; 2077 pathOffset += 6;
(...skipping 26 matching lines...) Expand all
2104 } 2104 }
2105 unittest.expect(queryMap["includeDeleted"].first, unittest.equals("$arg_ includeDeleted")); 2105 unittest.expect(queryMap["includeDeleted"].first, unittest.equals("$arg_ includeDeleted"));
2106 2106
2107 2107
2108 var h = { 2108 var h = {
2109 "content-type" : "application/json; charset=utf-8", 2109 "content-type" : "application/json; charset=utf-8",
2110 }; 2110 };
2111 var resp = convert.JSON.encode(buildComment()); 2111 var resp = convert.JSON.encode(buildComment());
2112 return new async.Future.value(stringResponse(200, h, resp)); 2112 return new async.Future.value(stringResponse(200, h, resp));
2113 }), true); 2113 }), true);
2114 res.get(arg_fileId, arg_commentId, includeDeleted: arg_includeDeleted).the n(unittest.expectAsync(((api.Comment response) { 2114 res.get(arg_fileId, arg_commentId, includeDeleted: arg_includeDeleted).the n(unittest.expectAsync1(((api.Comment response) {
2115 checkComment(response); 2115 checkComment(response);
2116 }))); 2116 })));
2117 }); 2117 });
2118 2118
2119 unittest.test("method--list", () { 2119 unittest.test("method--list", () {
2120 2120
2121 var mock = new HttpServerMock(); 2121 var mock = new HttpServerMock();
2122 api.CommentsResourceApi res = new api.DriveApi(mock).comments; 2122 api.CommentsResourceApi res = new api.DriveApi(mock).comments;
2123 var arg_fileId = "foo"; 2123 var arg_fileId = "foo";
2124 var arg_includeDeleted = true; 2124 var arg_includeDeleted = true;
2125 var arg_pageSize = 42; 2125 var arg_pageSize = 42;
2126 var arg_pageToken = "foo"; 2126 var arg_pageToken = "foo";
2127 var arg_startModifiedTime = "foo"; 2127 var arg_startModifiedTime = "foo";
2128 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 2128 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
2129 var path = (req.url).path; 2129 var path = (req.url).path;
2130 var pathOffset = 0; 2130 var pathOffset = 0;
2131 var index; 2131 var index;
2132 var subPart; 2132 var subPart;
2133 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 2133 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
2134 pathOffset += 1; 2134 pathOffset += 1;
2135 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("drive/v3/")); 2135 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("drive/v3/"));
2136 pathOffset += 9; 2136 pathOffset += 9;
2137 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ als("files/")); 2137 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ als("files/"));
2138 pathOffset += 6; 2138 pathOffset += 6;
(...skipping 26 matching lines...) Expand all
2165 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en)); 2165 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en));
2166 unittest.expect(queryMap["startModifiedTime"].first, unittest.equals(arg _startModifiedTime)); 2166 unittest.expect(queryMap["startModifiedTime"].first, unittest.equals(arg _startModifiedTime));
2167 2167
2168 2168
2169 var h = { 2169 var h = {
2170 "content-type" : "application/json; charset=utf-8", 2170 "content-type" : "application/json; charset=utf-8",
2171 }; 2171 };
2172 var resp = convert.JSON.encode(buildCommentList()); 2172 var resp = convert.JSON.encode(buildCommentList());
2173 return new async.Future.value(stringResponse(200, h, resp)); 2173 return new async.Future.value(stringResponse(200, h, resp));
2174 }), true); 2174 }), true);
2175 res.list(arg_fileId, includeDeleted: arg_includeDeleted, pageSize: arg_pag eSize, pageToken: arg_pageToken, startModifiedTime: arg_startModifiedTime).then( unittest.expectAsync(((api.CommentList response) { 2175 res.list(arg_fileId, includeDeleted: arg_includeDeleted, pageSize: arg_pag eSize, pageToken: arg_pageToken, startModifiedTime: arg_startModifiedTime).then( unittest.expectAsync1(((api.CommentList response) {
2176 checkCommentList(response); 2176 checkCommentList(response);
2177 }))); 2177 })));
2178 }); 2178 });
2179 2179
2180 unittest.test("method--update", () { 2180 unittest.test("method--update", () {
2181 2181
2182 var mock = new HttpServerMock(); 2182 var mock = new HttpServerMock();
2183 api.CommentsResourceApi res = new api.DriveApi(mock).comments; 2183 api.CommentsResourceApi res = new api.DriveApi(mock).comments;
2184 var arg_request = buildComment(); 2184 var arg_request = buildComment();
2185 var arg_fileId = "foo"; 2185 var arg_fileId = "foo";
2186 var arg_commentId = "foo"; 2186 var arg_commentId = "foo";
2187 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 2187 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
2188 var obj = new api.Comment.fromJson(json); 2188 var obj = new api.Comment.fromJson(json);
2189 checkComment(obj); 2189 checkComment(obj);
2190 2190
2191 var path = (req.url).path; 2191 var path = (req.url).path;
2192 var pathOffset = 0; 2192 var pathOffset = 0;
2193 var index; 2193 var index;
2194 var subPart; 2194 var subPart;
2195 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 2195 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
2196 pathOffset += 1; 2196 pathOffset += 1;
2197 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("drive/v3/")); 2197 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("drive/v3/"));
(...skipping 28 matching lines...) Expand all
2226 } 2226 }
2227 } 2227 }
2228 2228
2229 2229
2230 var h = { 2230 var h = {
2231 "content-type" : "application/json; charset=utf-8", 2231 "content-type" : "application/json; charset=utf-8",
2232 }; 2232 };
2233 var resp = convert.JSON.encode(buildComment()); 2233 var resp = convert.JSON.encode(buildComment());
2234 return new async.Future.value(stringResponse(200, h, resp)); 2234 return new async.Future.value(stringResponse(200, h, resp));
2235 }), true); 2235 }), true);
2236 res.update(arg_request, arg_fileId, arg_commentId).then(unittest.expectAsy nc(((api.Comment response) { 2236 res.update(arg_request, arg_fileId, arg_commentId).then(unittest.expectAsy nc1(((api.Comment response) {
2237 checkComment(response); 2237 checkComment(response);
2238 }))); 2238 })));
2239 }); 2239 });
2240 2240
2241 }); 2241 });
2242 2242
2243 2243
2244 unittest.group("resource-FilesResourceApi", () { 2244 unittest.group("resource-FilesResourceApi", () {
2245 unittest.test("method--copy", () { 2245 unittest.test("method--copy", () {
2246 2246
2247 var mock = new HttpServerMock(); 2247 var mock = new HttpServerMock();
2248 api.FilesResourceApi res = new api.DriveApi(mock).files; 2248 api.FilesResourceApi res = new api.DriveApi(mock).files;
2249 var arg_request = buildFile(); 2249 var arg_request = buildFile();
2250 var arg_fileId = "foo"; 2250 var arg_fileId = "foo";
2251 var arg_ignoreDefaultVisibility = true; 2251 var arg_ignoreDefaultVisibility = true;
2252 var arg_keepRevisionForever = true; 2252 var arg_keepRevisionForever = true;
2253 var arg_ocrLanguage = "foo"; 2253 var arg_ocrLanguage = "foo";
2254 var arg_supportsTeamDrives = true; 2254 var arg_supportsTeamDrives = true;
2255 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 2255 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
2256 var obj = new api.File.fromJson(json); 2256 var obj = new api.File.fromJson(json);
2257 checkFile(obj); 2257 checkFile(obj);
2258 2258
2259 var path = (req.url).path; 2259 var path = (req.url).path;
2260 var pathOffset = 0; 2260 var pathOffset = 0;
2261 var index; 2261 var index;
2262 var subPart; 2262 var subPart;
2263 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 2263 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
2264 pathOffset += 1; 2264 pathOffset += 1;
2265 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("drive/v3/")); 2265 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("drive/v3/"));
(...skipping 29 matching lines...) Expand all
2295 unittest.expect(queryMap["ocrLanguage"].first, unittest.equals(arg_ocrLa nguage)); 2295 unittest.expect(queryMap["ocrLanguage"].first, unittest.equals(arg_ocrLa nguage));
2296 unittest.expect(queryMap["supportsTeamDrives"].first, unittest.equals("$ arg_supportsTeamDrives")); 2296 unittest.expect(queryMap["supportsTeamDrives"].first, unittest.equals("$ arg_supportsTeamDrives"));
2297 2297
2298 2298
2299 var h = { 2299 var h = {
2300 "content-type" : "application/json; charset=utf-8", 2300 "content-type" : "application/json; charset=utf-8",
2301 }; 2301 };
2302 var resp = convert.JSON.encode(buildFile()); 2302 var resp = convert.JSON.encode(buildFile());
2303 return new async.Future.value(stringResponse(200, h, resp)); 2303 return new async.Future.value(stringResponse(200, h, resp));
2304 }), true); 2304 }), true);
2305 res.copy(arg_request, arg_fileId, ignoreDefaultVisibility: arg_ignoreDefau ltVisibility, keepRevisionForever: arg_keepRevisionForever, ocrLanguage: arg_ocr Language, supportsTeamDrives: arg_supportsTeamDrives).then(unittest.expectAsync( ((api.File response) { 2305 res.copy(arg_request, arg_fileId, ignoreDefaultVisibility: arg_ignoreDefau ltVisibility, keepRevisionForever: arg_keepRevisionForever, ocrLanguage: arg_ocr Language, supportsTeamDrives: arg_supportsTeamDrives).then(unittest.expectAsync1 (((api.File response) {
2306 checkFile(response); 2306 checkFile(response);
2307 }))); 2307 })));
2308 }); 2308 });
2309 2309
2310 unittest.test("method--create", () { 2310 unittest.test("method--create", () {
2311 // TODO: Implement tests for media upload; 2311 // TODO: Implement tests for media upload;
2312 // TODO: Implement tests for media download; 2312 // TODO: Implement tests for media download;
2313 2313
2314 var mock = new HttpServerMock(); 2314 var mock = new HttpServerMock();
2315 api.FilesResourceApi res = new api.DriveApi(mock).files; 2315 api.FilesResourceApi res = new api.DriveApi(mock).files;
2316 var arg_request = buildFile(); 2316 var arg_request = buildFile();
2317 var arg_ignoreDefaultVisibility = true; 2317 var arg_ignoreDefaultVisibility = true;
2318 var arg_keepRevisionForever = true; 2318 var arg_keepRevisionForever = true;
2319 var arg_ocrLanguage = "foo"; 2319 var arg_ocrLanguage = "foo";
2320 var arg_supportsTeamDrives = true; 2320 var arg_supportsTeamDrives = true;
2321 var arg_useContentAsIndexableText = true; 2321 var arg_useContentAsIndexableText = true;
2322 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 2322 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
2323 var obj = new api.File.fromJson(json); 2323 var obj = new api.File.fromJson(json);
2324 checkFile(obj); 2324 checkFile(obj);
2325 2325
2326 var path = (req.url).path; 2326 var path = (req.url).path;
2327 var pathOffset = 0; 2327 var pathOffset = 0;
2328 var index; 2328 var index;
2329 var subPart; 2329 var subPart;
2330 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 2330 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
2331 pathOffset += 1; 2331 pathOffset += 1;
2332 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("drive/v3/")); 2332 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("drive/v3/"));
(...skipping 23 matching lines...) Expand all
2356 unittest.expect(queryMap["supportsTeamDrives"].first, unittest.equals("$ arg_supportsTeamDrives")); 2356 unittest.expect(queryMap["supportsTeamDrives"].first, unittest.equals("$ arg_supportsTeamDrives"));
2357 unittest.expect(queryMap["useContentAsIndexableText"].first, unittest.eq uals("$arg_useContentAsIndexableText")); 2357 unittest.expect(queryMap["useContentAsIndexableText"].first, unittest.eq uals("$arg_useContentAsIndexableText"));
2358 2358
2359 2359
2360 var h = { 2360 var h = {
2361 "content-type" : "application/json; charset=utf-8", 2361 "content-type" : "application/json; charset=utf-8",
2362 }; 2362 };
2363 var resp = convert.JSON.encode(buildFile()); 2363 var resp = convert.JSON.encode(buildFile());
2364 return new async.Future.value(stringResponse(200, h, resp)); 2364 return new async.Future.value(stringResponse(200, h, resp));
2365 }), true); 2365 }), true);
2366 res.create(arg_request, ignoreDefaultVisibility: arg_ignoreDefaultVisibili ty, keepRevisionForever: arg_keepRevisionForever, ocrLanguage: arg_ocrLanguage, supportsTeamDrives: arg_supportsTeamDrives, useContentAsIndexableText: arg_useCo ntentAsIndexableText).then(unittest.expectAsync(((api.File response) { 2366 res.create(arg_request, ignoreDefaultVisibility: arg_ignoreDefaultVisibili ty, keepRevisionForever: arg_keepRevisionForever, ocrLanguage: arg_ocrLanguage, supportsTeamDrives: arg_supportsTeamDrives, useContentAsIndexableText: arg_useCo ntentAsIndexableText).then(unittest.expectAsync1(((api.File response) {
2367 checkFile(response); 2367 checkFile(response);
2368 }))); 2368 })));
2369 }); 2369 });
2370 2370
2371 unittest.test("method--delete", () { 2371 unittest.test("method--delete", () {
2372 2372
2373 var mock = new HttpServerMock(); 2373 var mock = new HttpServerMock();
2374 api.FilesResourceApi res = new api.DriveApi(mock).files; 2374 api.FilesResourceApi res = new api.DriveApi(mock).files;
2375 var arg_fileId = "foo"; 2375 var arg_fileId = "foo";
2376 var arg_supportsTeamDrives = true; 2376 var arg_supportsTeamDrives = true;
2377 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 2377 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
2378 var path = (req.url).path; 2378 var path = (req.url).path;
2379 var pathOffset = 0; 2379 var pathOffset = 0;
2380 var index; 2380 var index;
2381 var subPart; 2381 var subPart;
2382 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 2382 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
2383 pathOffset += 1; 2383 pathOffset += 1;
2384 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("drive/v3/")); 2384 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("drive/v3/"));
2385 pathOffset += 9; 2385 pathOffset += 9;
2386 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ als("files/")); 2386 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ als("files/"));
2387 pathOffset += 6; 2387 pathOffset += 6;
(...skipping 19 matching lines...) Expand all
2407 } 2407 }
2408 unittest.expect(queryMap["supportsTeamDrives"].first, unittest.equals("$ arg_supportsTeamDrives")); 2408 unittest.expect(queryMap["supportsTeamDrives"].first, unittest.equals("$ arg_supportsTeamDrives"));
2409 2409
2410 2410
2411 var h = { 2411 var h = {
2412 "content-type" : "application/json; charset=utf-8", 2412 "content-type" : "application/json; charset=utf-8",
2413 }; 2413 };
2414 var resp = ""; 2414 var resp = "";
2415 return new async.Future.value(stringResponse(200, h, resp)); 2415 return new async.Future.value(stringResponse(200, h, resp));
2416 }), true); 2416 }), true);
2417 res.delete(arg_fileId, supportsTeamDrives: arg_supportsTeamDrives).then(un ittest.expectAsync((_) {})); 2417 res.delete(arg_fileId, supportsTeamDrives: arg_supportsTeamDrives).then(un ittest.expectAsync1((_) {}));
2418 }); 2418 });
2419 2419
2420 unittest.test("method--emptyTrash", () { 2420 unittest.test("method--emptyTrash", () {
2421 2421
2422 var mock = new HttpServerMock(); 2422 var mock = new HttpServerMock();
2423 api.FilesResourceApi res = new api.DriveApi(mock).files; 2423 api.FilesResourceApi res = new api.DriveApi(mock).files;
2424 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 2424 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
2425 var path = (req.url).path; 2425 var path = (req.url).path;
2426 var pathOffset = 0; 2426 var pathOffset = 0;
2427 var index; 2427 var index;
2428 var subPart; 2428 var subPart;
2429 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 2429 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
2430 pathOffset += 1; 2430 pathOffset += 1;
2431 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("drive/v3/")); 2431 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("drive/v3/"));
2432 pathOffset += 9; 2432 pathOffset += 9;
2433 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq uals("files/trash")); 2433 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq uals("files/trash"));
2434 pathOffset += 11; 2434 pathOffset += 11;
(...skipping 15 matching lines...) Expand all
2450 } 2450 }
2451 } 2451 }
2452 2452
2453 2453
2454 var h = { 2454 var h = {
2455 "content-type" : "application/json; charset=utf-8", 2455 "content-type" : "application/json; charset=utf-8",
2456 }; 2456 };
2457 var resp = ""; 2457 var resp = "";
2458 return new async.Future.value(stringResponse(200, h, resp)); 2458 return new async.Future.value(stringResponse(200, h, resp));
2459 }), true); 2459 }), true);
2460 res.emptyTrash().then(unittest.expectAsync((_) {})); 2460 res.emptyTrash().then(unittest.expectAsync1((_) {}));
2461 }); 2461 });
2462 2462
2463 unittest.test("method--export", () { 2463 unittest.test("method--export", () {
2464 // TODO: Implement tests for media upload; 2464 // TODO: Implement tests for media upload;
2465 // TODO: Implement tests for media download; 2465 // TODO: Implement tests for media download;
2466 2466
2467 var mock = new HttpServerMock(); 2467 var mock = new HttpServerMock();
2468 api.FilesResourceApi res = new api.DriveApi(mock).files; 2468 api.FilesResourceApi res = new api.DriveApi(mock).files;
2469 var arg_fileId = "foo"; 2469 var arg_fileId = "foo";
2470 var arg_mimeType = "foo"; 2470 var arg_mimeType = "foo";
2471 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 2471 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
2472 var path = (req.url).path; 2472 var path = (req.url).path;
2473 var pathOffset = 0; 2473 var pathOffset = 0;
2474 var index; 2474 var index;
2475 var subPart; 2475 var subPart;
2476 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 2476 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
2477 pathOffset += 1; 2477 pathOffset += 1;
2478 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("drive/v3/")); 2478 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("drive/v3/"));
2479 pathOffset += 9; 2479 pathOffset += 9;
2480 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ als("files/")); 2480 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ als("files/"));
2481 pathOffset += 6; 2481 pathOffset += 6;
(...skipping 23 matching lines...) Expand all
2505 } 2505 }
2506 unittest.expect(queryMap["mimeType"].first, unittest.equals(arg_mimeType )); 2506 unittest.expect(queryMap["mimeType"].first, unittest.equals(arg_mimeType ));
2507 2507
2508 2508
2509 var h = { 2509 var h = {
2510 "content-type" : "application/json; charset=utf-8", 2510 "content-type" : "application/json; charset=utf-8",
2511 }; 2511 };
2512 var resp = ""; 2512 var resp = "";
2513 return new async.Future.value(stringResponse(200, h, resp)); 2513 return new async.Future.value(stringResponse(200, h, resp));
2514 }), true); 2514 }), true);
2515 res.export(arg_fileId, arg_mimeType).then(unittest.expectAsync((_) {})); 2515 res.export(arg_fileId, arg_mimeType).then(unittest.expectAsync1((_) {}));
2516 }); 2516 });
2517 2517
2518 unittest.test("method--generateIds", () { 2518 unittest.test("method--generateIds", () {
2519 2519
2520 var mock = new HttpServerMock(); 2520 var mock = new HttpServerMock();
2521 api.FilesResourceApi res = new api.DriveApi(mock).files; 2521 api.FilesResourceApi res = new api.DriveApi(mock).files;
2522 var arg_count = 42; 2522 var arg_count = 42;
2523 var arg_space = "foo"; 2523 var arg_space = "foo";
2524 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 2524 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
2525 var path = (req.url).path; 2525 var path = (req.url).path;
2526 var pathOffset = 0; 2526 var pathOffset = 0;
2527 var index; 2527 var index;
2528 var subPart; 2528 var subPart;
2529 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 2529 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
2530 pathOffset += 1; 2530 pathOffset += 1;
2531 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("drive/v3/")); 2531 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("drive/v3/"));
2532 pathOffset += 9; 2532 pathOffset += 9;
2533 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq uals("files/generateIds")); 2533 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq uals("files/generateIds"));
2534 pathOffset += 17; 2534 pathOffset += 17;
(...skipping 17 matching lines...) Expand all
2552 unittest.expect(core.int.parse(queryMap["count"].first), unittest.equals (arg_count)); 2552 unittest.expect(core.int.parse(queryMap["count"].first), unittest.equals (arg_count));
2553 unittest.expect(queryMap["space"].first, unittest.equals(arg_space)); 2553 unittest.expect(queryMap["space"].first, unittest.equals(arg_space));
2554 2554
2555 2555
2556 var h = { 2556 var h = {
2557 "content-type" : "application/json; charset=utf-8", 2557 "content-type" : "application/json; charset=utf-8",
2558 }; 2558 };
2559 var resp = convert.JSON.encode(buildGeneratedIds()); 2559 var resp = convert.JSON.encode(buildGeneratedIds());
2560 return new async.Future.value(stringResponse(200, h, resp)); 2560 return new async.Future.value(stringResponse(200, h, resp));
2561 }), true); 2561 }), true);
2562 res.generateIds(count: arg_count, space: arg_space).then(unittest.expectAs ync(((api.GeneratedIds response) { 2562 res.generateIds(count: arg_count, space: arg_space).then(unittest.expectAs ync1(((api.GeneratedIds response) {
2563 checkGeneratedIds(response); 2563 checkGeneratedIds(response);
2564 }))); 2564 })));
2565 }); 2565 });
2566 2566
2567 unittest.test("method--get", () { 2567 unittest.test("method--get", () {
2568 // TODO: Implement tests for media upload; 2568 // TODO: Implement tests for media upload;
2569 // TODO: Implement tests for media download; 2569 // TODO: Implement tests for media download;
2570 2570
2571 var mock = new HttpServerMock(); 2571 var mock = new HttpServerMock();
2572 api.FilesResourceApi res = new api.DriveApi(mock).files; 2572 api.FilesResourceApi res = new api.DriveApi(mock).files;
2573 var arg_fileId = "foo"; 2573 var arg_fileId = "foo";
2574 var arg_acknowledgeAbuse = true; 2574 var arg_acknowledgeAbuse = true;
2575 var arg_supportsTeamDrives = true; 2575 var arg_supportsTeamDrives = true;
2576 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 2576 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
2577 var path = (req.url).path; 2577 var path = (req.url).path;
2578 var pathOffset = 0; 2578 var pathOffset = 0;
2579 var index; 2579 var index;
2580 var subPart; 2580 var subPart;
2581 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 2581 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
2582 pathOffset += 1; 2582 pathOffset += 1;
2583 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("drive/v3/")); 2583 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("drive/v3/"));
2584 pathOffset += 9; 2584 pathOffset += 9;
2585 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ als("files/")); 2585 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ als("files/"));
2586 pathOffset += 6; 2586 pathOffset += 6;
(...skipping 20 matching lines...) Expand all
2607 unittest.expect(queryMap["acknowledgeAbuse"].first, unittest.equals("$ar g_acknowledgeAbuse")); 2607 unittest.expect(queryMap["acknowledgeAbuse"].first, unittest.equals("$ar g_acknowledgeAbuse"));
2608 unittest.expect(queryMap["supportsTeamDrives"].first, unittest.equals("$ arg_supportsTeamDrives")); 2608 unittest.expect(queryMap["supportsTeamDrives"].first, unittest.equals("$ arg_supportsTeamDrives"));
2609 2609
2610 2610
2611 var h = { 2611 var h = {
2612 "content-type" : "application/json; charset=utf-8", 2612 "content-type" : "application/json; charset=utf-8",
2613 }; 2613 };
2614 var resp = convert.JSON.encode(buildFile()); 2614 var resp = convert.JSON.encode(buildFile());
2615 return new async.Future.value(stringResponse(200, h, resp)); 2615 return new async.Future.value(stringResponse(200, h, resp));
2616 }), true); 2616 }), true);
2617 res.get(arg_fileId, acknowledgeAbuse: arg_acknowledgeAbuse, supportsTeamDr ives: arg_supportsTeamDrives).then(unittest.expectAsync(((api.File response) { 2617 res.get(arg_fileId, acknowledgeAbuse: arg_acknowledgeAbuse, supportsTeamDr ives: arg_supportsTeamDrives).then(unittest.expectAsync1(((api.File response) {
2618 checkFile(response); 2618 checkFile(response);
2619 }))); 2619 })));
2620 }); 2620 });
2621 2621
2622 unittest.test("method--list", () { 2622 unittest.test("method--list", () {
2623 2623
2624 var mock = new HttpServerMock(); 2624 var mock = new HttpServerMock();
2625 api.FilesResourceApi res = new api.DriveApi(mock).files; 2625 api.FilesResourceApi res = new api.DriveApi(mock).files;
2626 var arg_corpora = "foo"; 2626 var arg_corpora = "foo";
2627 var arg_corpus = "foo"; 2627 var arg_corpus = "foo";
2628 var arg_includeTeamDriveItems = true; 2628 var arg_includeTeamDriveItems = true;
2629 var arg_orderBy = "foo"; 2629 var arg_orderBy = "foo";
2630 var arg_pageSize = 42; 2630 var arg_pageSize = 42;
2631 var arg_pageToken = "foo"; 2631 var arg_pageToken = "foo";
2632 var arg_q = "foo"; 2632 var arg_q = "foo";
2633 var arg_spaces = "foo"; 2633 var arg_spaces = "foo";
2634 var arg_supportsTeamDrives = true; 2634 var arg_supportsTeamDrives = true;
2635 var arg_teamDriveId = "foo"; 2635 var arg_teamDriveId = "foo";
2636 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 2636 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
2637 var path = (req.url).path; 2637 var path = (req.url).path;
2638 var pathOffset = 0; 2638 var pathOffset = 0;
2639 var index; 2639 var index;
2640 var subPart; 2640 var subPart;
2641 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 2641 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
2642 pathOffset += 1; 2642 pathOffset += 1;
2643 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("drive/v3/")); 2643 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("drive/v3/"));
2644 pathOffset += 9; 2644 pathOffset += 9;
2645 unittest.expect(path.substring(pathOffset, pathOffset + 5), unittest.equ als("files")); 2645 unittest.expect(path.substring(pathOffset, pathOffset + 5), unittest.equ als("files"));
2646 pathOffset += 5; 2646 pathOffset += 5;
(...skipping 25 matching lines...) Expand all
2672 unittest.expect(queryMap["supportsTeamDrives"].first, unittest.equals("$ arg_supportsTeamDrives")); 2672 unittest.expect(queryMap["supportsTeamDrives"].first, unittest.equals("$ arg_supportsTeamDrives"));
2673 unittest.expect(queryMap["teamDriveId"].first, unittest.equals(arg_teamD riveId)); 2673 unittest.expect(queryMap["teamDriveId"].first, unittest.equals(arg_teamD riveId));
2674 2674
2675 2675
2676 var h = { 2676 var h = {
2677 "content-type" : "application/json; charset=utf-8", 2677 "content-type" : "application/json; charset=utf-8",
2678 }; 2678 };
2679 var resp = convert.JSON.encode(buildFileList()); 2679 var resp = convert.JSON.encode(buildFileList());
2680 return new async.Future.value(stringResponse(200, h, resp)); 2680 return new async.Future.value(stringResponse(200, h, resp));
2681 }), true); 2681 }), true);
2682 res.list(corpora: arg_corpora, corpus: arg_corpus, includeTeamDriveItems: arg_includeTeamDriveItems, orderBy: arg_orderBy, pageSize: arg_pageSize, pageTok en: arg_pageToken, q: arg_q, spaces: arg_spaces, supportsTeamDrives: arg_support sTeamDrives, teamDriveId: arg_teamDriveId).then(unittest.expectAsync(((api.FileL ist response) { 2682 res.list(corpora: arg_corpora, corpus: arg_corpus, includeTeamDriveItems: arg_includeTeamDriveItems, orderBy: arg_orderBy, pageSize: arg_pageSize, pageTok en: arg_pageToken, q: arg_q, spaces: arg_spaces, supportsTeamDrives: arg_support sTeamDrives, teamDriveId: arg_teamDriveId).then(unittest.expectAsync1(((api.File List response) {
2683 checkFileList(response); 2683 checkFileList(response);
2684 }))); 2684 })));
2685 }); 2685 });
2686 2686
2687 unittest.test("method--update", () { 2687 unittest.test("method--update", () {
2688 // TODO: Implement tests for media upload; 2688 // TODO: Implement tests for media upload;
2689 // TODO: Implement tests for media download; 2689 // TODO: Implement tests for media download;
2690 2690
2691 var mock = new HttpServerMock(); 2691 var mock = new HttpServerMock();
2692 api.FilesResourceApi res = new api.DriveApi(mock).files; 2692 api.FilesResourceApi res = new api.DriveApi(mock).files;
2693 var arg_request = buildFile(); 2693 var arg_request = buildFile();
2694 var arg_fileId = "foo"; 2694 var arg_fileId = "foo";
2695 var arg_addParents = "foo"; 2695 var arg_addParents = "foo";
2696 var arg_keepRevisionForever = true; 2696 var arg_keepRevisionForever = true;
2697 var arg_ocrLanguage = "foo"; 2697 var arg_ocrLanguage = "foo";
2698 var arg_removeParents = "foo"; 2698 var arg_removeParents = "foo";
2699 var arg_supportsTeamDrives = true; 2699 var arg_supportsTeamDrives = true;
2700 var arg_useContentAsIndexableText = true; 2700 var arg_useContentAsIndexableText = true;
2701 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 2701 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
2702 var obj = new api.File.fromJson(json); 2702 var obj = new api.File.fromJson(json);
2703 checkFile(obj); 2703 checkFile(obj);
2704 2704
2705 var path = (req.url).path; 2705 var path = (req.url).path;
2706 var pathOffset = 0; 2706 var pathOffset = 0;
2707 var index; 2707 var index;
2708 var subPart; 2708 var subPart;
2709 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 2709 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
2710 pathOffset += 1; 2710 pathOffset += 1;
2711 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("drive/v3/")); 2711 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("drive/v3/"));
(...skipping 27 matching lines...) Expand all
2739 unittest.expect(queryMap["supportsTeamDrives"].first, unittest.equals("$ arg_supportsTeamDrives")); 2739 unittest.expect(queryMap["supportsTeamDrives"].first, unittest.equals("$ arg_supportsTeamDrives"));
2740 unittest.expect(queryMap["useContentAsIndexableText"].first, unittest.eq uals("$arg_useContentAsIndexableText")); 2740 unittest.expect(queryMap["useContentAsIndexableText"].first, unittest.eq uals("$arg_useContentAsIndexableText"));
2741 2741
2742 2742
2743 var h = { 2743 var h = {
2744 "content-type" : "application/json; charset=utf-8", 2744 "content-type" : "application/json; charset=utf-8",
2745 }; 2745 };
2746 var resp = convert.JSON.encode(buildFile()); 2746 var resp = convert.JSON.encode(buildFile());
2747 return new async.Future.value(stringResponse(200, h, resp)); 2747 return new async.Future.value(stringResponse(200, h, resp));
2748 }), true); 2748 }), true);
2749 res.update(arg_request, arg_fileId, addParents: arg_addParents, keepRevisi onForever: arg_keepRevisionForever, ocrLanguage: arg_ocrLanguage, removeParents: arg_removeParents, supportsTeamDrives: arg_supportsTeamDrives, useContentAsInde xableText: arg_useContentAsIndexableText).then(unittest.expectAsync(((api.File r esponse) { 2749 res.update(arg_request, arg_fileId, addParents: arg_addParents, keepRevisi onForever: arg_keepRevisionForever, ocrLanguage: arg_ocrLanguage, removeParents: arg_removeParents, supportsTeamDrives: arg_supportsTeamDrives, useContentAsInde xableText: arg_useContentAsIndexableText).then(unittest.expectAsync1(((api.File response) {
2750 checkFile(response); 2750 checkFile(response);
2751 }))); 2751 })));
2752 }); 2752 });
2753 2753
2754 unittest.test("method--watch", () { 2754 unittest.test("method--watch", () {
2755 // TODO: Implement tests for media upload; 2755 // TODO: Implement tests for media upload;
2756 // TODO: Implement tests for media download; 2756 // TODO: Implement tests for media download;
2757 2757
2758 var mock = new HttpServerMock(); 2758 var mock = new HttpServerMock();
2759 api.FilesResourceApi res = new api.DriveApi(mock).files; 2759 api.FilesResourceApi res = new api.DriveApi(mock).files;
2760 var arg_request = buildChannel(); 2760 var arg_request = buildChannel();
2761 var arg_fileId = "foo"; 2761 var arg_fileId = "foo";
2762 var arg_acknowledgeAbuse = true; 2762 var arg_acknowledgeAbuse = true;
2763 var arg_supportsTeamDrives = true; 2763 var arg_supportsTeamDrives = true;
2764 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 2764 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
2765 var obj = new api.Channel.fromJson(json); 2765 var obj = new api.Channel.fromJson(json);
2766 checkChannel(obj); 2766 checkChannel(obj);
2767 2767
2768 var path = (req.url).path; 2768 var path = (req.url).path;
2769 var pathOffset = 0; 2769 var pathOffset = 0;
2770 var index; 2770 var index;
2771 var subPart; 2771 var subPart;
2772 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 2772 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
2773 pathOffset += 1; 2773 pathOffset += 1;
2774 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("drive/v3/")); 2774 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("drive/v3/"));
(...skipping 27 matching lines...) Expand all
2802 unittest.expect(queryMap["acknowledgeAbuse"].first, unittest.equals("$ar g_acknowledgeAbuse")); 2802 unittest.expect(queryMap["acknowledgeAbuse"].first, unittest.equals("$ar g_acknowledgeAbuse"));
2803 unittest.expect(queryMap["supportsTeamDrives"].first, unittest.equals("$ arg_supportsTeamDrives")); 2803 unittest.expect(queryMap["supportsTeamDrives"].first, unittest.equals("$ arg_supportsTeamDrives"));
2804 2804
2805 2805
2806 var h = { 2806 var h = {
2807 "content-type" : "application/json; charset=utf-8", 2807 "content-type" : "application/json; charset=utf-8",
2808 }; 2808 };
2809 var resp = convert.JSON.encode(buildChannel()); 2809 var resp = convert.JSON.encode(buildChannel());
2810 return new async.Future.value(stringResponse(200, h, resp)); 2810 return new async.Future.value(stringResponse(200, h, resp));
2811 }), true); 2811 }), true);
2812 res.watch(arg_request, arg_fileId, acknowledgeAbuse: arg_acknowledgeAbuse, supportsTeamDrives: arg_supportsTeamDrives).then(unittest.expectAsync(((api.Cha nnel response) { 2812 res.watch(arg_request, arg_fileId, acknowledgeAbuse: arg_acknowledgeAbuse, supportsTeamDrives: arg_supportsTeamDrives).then(unittest.expectAsync1(((api.Ch annel response) {
2813 checkChannel(response); 2813 checkChannel(response);
2814 }))); 2814 })));
2815 }); 2815 });
2816 2816
2817 }); 2817 });
2818 2818
2819 2819
2820 unittest.group("resource-PermissionsResourceApi", () { 2820 unittest.group("resource-PermissionsResourceApi", () {
2821 unittest.test("method--create", () { 2821 unittest.test("method--create", () {
2822 2822
2823 var mock = new HttpServerMock(); 2823 var mock = new HttpServerMock();
2824 api.PermissionsResourceApi res = new api.DriveApi(mock).permissions; 2824 api.PermissionsResourceApi res = new api.DriveApi(mock).permissions;
2825 var arg_request = buildPermission(); 2825 var arg_request = buildPermission();
2826 var arg_fileId = "foo"; 2826 var arg_fileId = "foo";
2827 var arg_emailMessage = "foo"; 2827 var arg_emailMessage = "foo";
2828 var arg_sendNotificationEmail = true; 2828 var arg_sendNotificationEmail = true;
2829 var arg_supportsTeamDrives = true; 2829 var arg_supportsTeamDrives = true;
2830 var arg_transferOwnership = true; 2830 var arg_transferOwnership = true;
2831 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 2831 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
2832 var obj = new api.Permission.fromJson(json); 2832 var obj = new api.Permission.fromJson(json);
2833 checkPermission(obj); 2833 checkPermission(obj);
2834 2834
2835 var path = (req.url).path; 2835 var path = (req.url).path;
2836 var pathOffset = 0; 2836 var pathOffset = 0;
2837 var index; 2837 var index;
2838 var subPart; 2838 var subPart;
2839 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 2839 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
2840 pathOffset += 1; 2840 pathOffset += 1;
2841 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("drive/v3/")); 2841 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("drive/v3/"));
(...skipping 29 matching lines...) Expand all
2871 unittest.expect(queryMap["supportsTeamDrives"].first, unittest.equals("$ arg_supportsTeamDrives")); 2871 unittest.expect(queryMap["supportsTeamDrives"].first, unittest.equals("$ arg_supportsTeamDrives"));
2872 unittest.expect(queryMap["transferOwnership"].first, unittest.equals("$a rg_transferOwnership")); 2872 unittest.expect(queryMap["transferOwnership"].first, unittest.equals("$a rg_transferOwnership"));
2873 2873
2874 2874
2875 var h = { 2875 var h = {
2876 "content-type" : "application/json; charset=utf-8", 2876 "content-type" : "application/json; charset=utf-8",
2877 }; 2877 };
2878 var resp = convert.JSON.encode(buildPermission()); 2878 var resp = convert.JSON.encode(buildPermission());
2879 return new async.Future.value(stringResponse(200, h, resp)); 2879 return new async.Future.value(stringResponse(200, h, resp));
2880 }), true); 2880 }), true);
2881 res.create(arg_request, arg_fileId, emailMessage: arg_emailMessage, sendNo tificationEmail: arg_sendNotificationEmail, supportsTeamDrives: arg_supportsTeam Drives, transferOwnership: arg_transferOwnership).then(unittest.expectAsync(((ap i.Permission response) { 2881 res.create(arg_request, arg_fileId, emailMessage: arg_emailMessage, sendNo tificationEmail: arg_sendNotificationEmail, supportsTeamDrives: arg_supportsTeam Drives, transferOwnership: arg_transferOwnership).then(unittest.expectAsync1(((a pi.Permission response) {
2882 checkPermission(response); 2882 checkPermission(response);
2883 }))); 2883 })));
2884 }); 2884 });
2885 2885
2886 unittest.test("method--delete", () { 2886 unittest.test("method--delete", () {
2887 2887
2888 var mock = new HttpServerMock(); 2888 var mock = new HttpServerMock();
2889 api.PermissionsResourceApi res = new api.DriveApi(mock).permissions; 2889 api.PermissionsResourceApi res = new api.DriveApi(mock).permissions;
2890 var arg_fileId = "foo"; 2890 var arg_fileId = "foo";
2891 var arg_permissionId = "foo"; 2891 var arg_permissionId = "foo";
2892 var arg_supportsTeamDrives = true; 2892 var arg_supportsTeamDrives = true;
2893 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 2893 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
2894 var path = (req.url).path; 2894 var path = (req.url).path;
2895 var pathOffset = 0; 2895 var pathOffset = 0;
2896 var index; 2896 var index;
2897 var subPart; 2897 var subPart;
2898 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 2898 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
2899 pathOffset += 1; 2899 pathOffset += 1;
2900 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("drive/v3/")); 2900 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("drive/v3/"));
2901 pathOffset += 9; 2901 pathOffset += 9;
2902 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ als("files/")); 2902 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ als("files/"));
2903 pathOffset += 6; 2903 pathOffset += 6;
(...skipping 26 matching lines...) Expand all
2930 } 2930 }
2931 unittest.expect(queryMap["supportsTeamDrives"].first, unittest.equals("$ arg_supportsTeamDrives")); 2931 unittest.expect(queryMap["supportsTeamDrives"].first, unittest.equals("$ arg_supportsTeamDrives"));
2932 2932
2933 2933
2934 var h = { 2934 var h = {
2935 "content-type" : "application/json; charset=utf-8", 2935 "content-type" : "application/json; charset=utf-8",
2936 }; 2936 };
2937 var resp = ""; 2937 var resp = "";
2938 return new async.Future.value(stringResponse(200, h, resp)); 2938 return new async.Future.value(stringResponse(200, h, resp));
2939 }), true); 2939 }), true);
2940 res.delete(arg_fileId, arg_permissionId, supportsTeamDrives: arg_supportsT eamDrives).then(unittest.expectAsync((_) {})); 2940 res.delete(arg_fileId, arg_permissionId, supportsTeamDrives: arg_supportsT eamDrives).then(unittest.expectAsync1((_) {}));
2941 }); 2941 });
2942 2942
2943 unittest.test("method--get", () { 2943 unittest.test("method--get", () {
2944 2944
2945 var mock = new HttpServerMock(); 2945 var mock = new HttpServerMock();
2946 api.PermissionsResourceApi res = new api.DriveApi(mock).permissions; 2946 api.PermissionsResourceApi res = new api.DriveApi(mock).permissions;
2947 var arg_fileId = "foo"; 2947 var arg_fileId = "foo";
2948 var arg_permissionId = "foo"; 2948 var arg_permissionId = "foo";
2949 var arg_supportsTeamDrives = true; 2949 var arg_supportsTeamDrives = true;
2950 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 2950 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
2951 var path = (req.url).path; 2951 var path = (req.url).path;
2952 var pathOffset = 0; 2952 var pathOffset = 0;
2953 var index; 2953 var index;
2954 var subPart; 2954 var subPart;
2955 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 2955 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
2956 pathOffset += 1; 2956 pathOffset += 1;
2957 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("drive/v3/")); 2957 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("drive/v3/"));
2958 pathOffset += 9; 2958 pathOffset += 9;
2959 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ als("files/")); 2959 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ als("files/"));
2960 pathOffset += 6; 2960 pathOffset += 6;
(...skipping 26 matching lines...) Expand all
2987 } 2987 }
2988 unittest.expect(queryMap["supportsTeamDrives"].first, unittest.equals("$ arg_supportsTeamDrives")); 2988 unittest.expect(queryMap["supportsTeamDrives"].first, unittest.equals("$ arg_supportsTeamDrives"));
2989 2989
2990 2990
2991 var h = { 2991 var h = {
2992 "content-type" : "application/json; charset=utf-8", 2992 "content-type" : "application/json; charset=utf-8",
2993 }; 2993 };
2994 var resp = convert.JSON.encode(buildPermission()); 2994 var resp = convert.JSON.encode(buildPermission());
2995 return new async.Future.value(stringResponse(200, h, resp)); 2995 return new async.Future.value(stringResponse(200, h, resp));
2996 }), true); 2996 }), true);
2997 res.get(arg_fileId, arg_permissionId, supportsTeamDrives: arg_supportsTeam Drives).then(unittest.expectAsync(((api.Permission response) { 2997 res.get(arg_fileId, arg_permissionId, supportsTeamDrives: arg_supportsTeam Drives).then(unittest.expectAsync1(((api.Permission response) {
2998 checkPermission(response); 2998 checkPermission(response);
2999 }))); 2999 })));
3000 }); 3000 });
3001 3001
3002 unittest.test("method--list", () { 3002 unittest.test("method--list", () {
3003 3003
3004 var mock = new HttpServerMock(); 3004 var mock = new HttpServerMock();
3005 api.PermissionsResourceApi res = new api.DriveApi(mock).permissions; 3005 api.PermissionsResourceApi res = new api.DriveApi(mock).permissions;
3006 var arg_fileId = "foo"; 3006 var arg_fileId = "foo";
3007 var arg_pageSize = 42; 3007 var arg_pageSize = 42;
3008 var arg_pageToken = "foo"; 3008 var arg_pageToken = "foo";
3009 var arg_supportsTeamDrives = true; 3009 var arg_supportsTeamDrives = true;
3010 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 3010 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
3011 var path = (req.url).path; 3011 var path = (req.url).path;
3012 var pathOffset = 0; 3012 var pathOffset = 0;
3013 var index; 3013 var index;
3014 var subPart; 3014 var subPart;
3015 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 3015 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
3016 pathOffset += 1; 3016 pathOffset += 1;
3017 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("drive/v3/")); 3017 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("drive/v3/"));
3018 pathOffset += 9; 3018 pathOffset += 9;
3019 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ als("files/")); 3019 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ als("files/"));
3020 pathOffset += 6; 3020 pathOffset += 6;
(...skipping 25 matching lines...) Expand all
3046 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en)); 3046 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en));
3047 unittest.expect(queryMap["supportsTeamDrives"].first, unittest.equals("$ arg_supportsTeamDrives")); 3047 unittest.expect(queryMap["supportsTeamDrives"].first, unittest.equals("$ arg_supportsTeamDrives"));
3048 3048
3049 3049
3050 var h = { 3050 var h = {
3051 "content-type" : "application/json; charset=utf-8", 3051 "content-type" : "application/json; charset=utf-8",
3052 }; 3052 };
3053 var resp = convert.JSON.encode(buildPermissionList()); 3053 var resp = convert.JSON.encode(buildPermissionList());
3054 return new async.Future.value(stringResponse(200, h, resp)); 3054 return new async.Future.value(stringResponse(200, h, resp));
3055 }), true); 3055 }), true);
3056 res.list(arg_fileId, pageSize: arg_pageSize, pageToken: arg_pageToken, sup portsTeamDrives: arg_supportsTeamDrives).then(unittest.expectAsync(((api.Permiss ionList response) { 3056 res.list(arg_fileId, pageSize: arg_pageSize, pageToken: arg_pageToken, sup portsTeamDrives: arg_supportsTeamDrives).then(unittest.expectAsync1(((api.Permis sionList response) {
3057 checkPermissionList(response); 3057 checkPermissionList(response);
3058 }))); 3058 })));
3059 }); 3059 });
3060 3060
3061 unittest.test("method--update", () { 3061 unittest.test("method--update", () {
3062 3062
3063 var mock = new HttpServerMock(); 3063 var mock = new HttpServerMock();
3064 api.PermissionsResourceApi res = new api.DriveApi(mock).permissions; 3064 api.PermissionsResourceApi res = new api.DriveApi(mock).permissions;
3065 var arg_request = buildPermission(); 3065 var arg_request = buildPermission();
3066 var arg_fileId = "foo"; 3066 var arg_fileId = "foo";
3067 var arg_permissionId = "foo"; 3067 var arg_permissionId = "foo";
3068 var arg_removeExpiration = true; 3068 var arg_removeExpiration = true;
3069 var arg_supportsTeamDrives = true; 3069 var arg_supportsTeamDrives = true;
3070 var arg_transferOwnership = true; 3070 var arg_transferOwnership = true;
3071 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 3071 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
3072 var obj = new api.Permission.fromJson(json); 3072 var obj = new api.Permission.fromJson(json);
3073 checkPermission(obj); 3073 checkPermission(obj);
3074 3074
3075 var path = (req.url).path; 3075 var path = (req.url).path;
3076 var pathOffset = 0; 3076 var pathOffset = 0;
3077 var index; 3077 var index;
3078 var subPart; 3078 var subPart;
3079 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 3079 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
3080 pathOffset += 1; 3080 pathOffset += 1;
3081 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("drive/v3/")); 3081 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("drive/v3/"));
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
3113 unittest.expect(queryMap["supportsTeamDrives"].first, unittest.equals("$ arg_supportsTeamDrives")); 3113 unittest.expect(queryMap["supportsTeamDrives"].first, unittest.equals("$ arg_supportsTeamDrives"));
3114 unittest.expect(queryMap["transferOwnership"].first, unittest.equals("$a rg_transferOwnership")); 3114 unittest.expect(queryMap["transferOwnership"].first, unittest.equals("$a rg_transferOwnership"));
3115 3115
3116 3116
3117 var h = { 3117 var h = {
3118 "content-type" : "application/json; charset=utf-8", 3118 "content-type" : "application/json; charset=utf-8",
3119 }; 3119 };
3120 var resp = convert.JSON.encode(buildPermission()); 3120 var resp = convert.JSON.encode(buildPermission());
3121 return new async.Future.value(stringResponse(200, h, resp)); 3121 return new async.Future.value(stringResponse(200, h, resp));
3122 }), true); 3122 }), true);
3123 res.update(arg_request, arg_fileId, arg_permissionId, removeExpiration: ar g_removeExpiration, supportsTeamDrives: arg_supportsTeamDrives, transferOwnershi p: arg_transferOwnership).then(unittest.expectAsync(((api.Permission response) { 3123 res.update(arg_request, arg_fileId, arg_permissionId, removeExpiration: ar g_removeExpiration, supportsTeamDrives: arg_supportsTeamDrives, transferOwnershi p: arg_transferOwnership).then(unittest.expectAsync1(((api.Permission response) {
3124 checkPermission(response); 3124 checkPermission(response);
3125 }))); 3125 })));
3126 }); 3126 });
3127 3127
3128 }); 3128 });
3129 3129
3130 3130
3131 unittest.group("resource-RepliesResourceApi", () { 3131 unittest.group("resource-RepliesResourceApi", () {
3132 unittest.test("method--create", () { 3132 unittest.test("method--create", () {
3133 3133
3134 var mock = new HttpServerMock(); 3134 var mock = new HttpServerMock();
3135 api.RepliesResourceApi res = new api.DriveApi(mock).replies; 3135 api.RepliesResourceApi res = new api.DriveApi(mock).replies;
3136 var arg_request = buildReply(); 3136 var arg_request = buildReply();
3137 var arg_fileId = "foo"; 3137 var arg_fileId = "foo";
3138 var arg_commentId = "foo"; 3138 var arg_commentId = "foo";
3139 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 3139 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
3140 var obj = new api.Reply.fromJson(json); 3140 var obj = new api.Reply.fromJson(json);
3141 checkReply(obj); 3141 checkReply(obj);
3142 3142
3143 var path = (req.url).path; 3143 var path = (req.url).path;
3144 var pathOffset = 0; 3144 var pathOffset = 0;
3145 var index; 3145 var index;
3146 var subPart; 3146 var subPart;
3147 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 3147 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
3148 pathOffset += 1; 3148 pathOffset += 1;
3149 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("drive/v3/")); 3149 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("drive/v3/"));
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
3182 } 3182 }
3183 } 3183 }
3184 3184
3185 3185
3186 var h = { 3186 var h = {
3187 "content-type" : "application/json; charset=utf-8", 3187 "content-type" : "application/json; charset=utf-8",
3188 }; 3188 };
3189 var resp = convert.JSON.encode(buildReply()); 3189 var resp = convert.JSON.encode(buildReply());
3190 return new async.Future.value(stringResponse(200, h, resp)); 3190 return new async.Future.value(stringResponse(200, h, resp));
3191 }), true); 3191 }), true);
3192 res.create(arg_request, arg_fileId, arg_commentId).then(unittest.expectAsy nc(((api.Reply response) { 3192 res.create(arg_request, arg_fileId, arg_commentId).then(unittest.expectAsy nc1(((api.Reply response) {
3193 checkReply(response); 3193 checkReply(response);
3194 }))); 3194 })));
3195 }); 3195 });
3196 3196
3197 unittest.test("method--delete", () { 3197 unittest.test("method--delete", () {
3198 3198
3199 var mock = new HttpServerMock(); 3199 var mock = new HttpServerMock();
3200 api.RepliesResourceApi res = new api.DriveApi(mock).replies; 3200 api.RepliesResourceApi res = new api.DriveApi(mock).replies;
3201 var arg_fileId = "foo"; 3201 var arg_fileId = "foo";
3202 var arg_commentId = "foo"; 3202 var arg_commentId = "foo";
3203 var arg_replyId = "foo"; 3203 var arg_replyId = "foo";
3204 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 3204 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
3205 var path = (req.url).path; 3205 var path = (req.url).path;
3206 var pathOffset = 0; 3206 var pathOffset = 0;
3207 var index; 3207 var index;
3208 var subPart; 3208 var subPart;
3209 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 3209 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
3210 pathOffset += 1; 3210 pathOffset += 1;
3211 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("drive/v3/")); 3211 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("drive/v3/"));
3212 pathOffset += 9; 3212 pathOffset += 9;
3213 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ als("files/")); 3213 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ als("files/"));
3214 pathOffset += 6; 3214 pathOffset += 6;
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
3247 } 3247 }
3248 } 3248 }
3249 3249
3250 3250
3251 var h = { 3251 var h = {
3252 "content-type" : "application/json; charset=utf-8", 3252 "content-type" : "application/json; charset=utf-8",
3253 }; 3253 };
3254 var resp = ""; 3254 var resp = "";
3255 return new async.Future.value(stringResponse(200, h, resp)); 3255 return new async.Future.value(stringResponse(200, h, resp));
3256 }), true); 3256 }), true);
3257 res.delete(arg_fileId, arg_commentId, arg_replyId).then(unittest.expectAsy nc((_) {})); 3257 res.delete(arg_fileId, arg_commentId, arg_replyId).then(unittest.expectAsy nc1((_) {}));
3258 }); 3258 });
3259 3259
3260 unittest.test("method--get", () { 3260 unittest.test("method--get", () {
3261 3261
3262 var mock = new HttpServerMock(); 3262 var mock = new HttpServerMock();
3263 api.RepliesResourceApi res = new api.DriveApi(mock).replies; 3263 api.RepliesResourceApi res = new api.DriveApi(mock).replies;
3264 var arg_fileId = "foo"; 3264 var arg_fileId = "foo";
3265 var arg_commentId = "foo"; 3265 var arg_commentId = "foo";
3266 var arg_replyId = "foo"; 3266 var arg_replyId = "foo";
3267 var arg_includeDeleted = true; 3267 var arg_includeDeleted = true;
3268 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 3268 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
3269 var path = (req.url).path; 3269 var path = (req.url).path;
3270 var pathOffset = 0; 3270 var pathOffset = 0;
3271 var index; 3271 var index;
3272 var subPart; 3272 var subPart;
3273 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 3273 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
3274 pathOffset += 1; 3274 pathOffset += 1;
3275 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("drive/v3/")); 3275 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("drive/v3/"));
3276 pathOffset += 9; 3276 pathOffset += 9;
3277 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ als("files/")); 3277 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ als("files/"));
3278 pathOffset += 6; 3278 pathOffset += 6;
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
3312 } 3312 }
3313 unittest.expect(queryMap["includeDeleted"].first, unittest.equals("$arg_ includeDeleted")); 3313 unittest.expect(queryMap["includeDeleted"].first, unittest.equals("$arg_ includeDeleted"));
3314 3314
3315 3315
3316 var h = { 3316 var h = {
3317 "content-type" : "application/json; charset=utf-8", 3317 "content-type" : "application/json; charset=utf-8",
3318 }; 3318 };
3319 var resp = convert.JSON.encode(buildReply()); 3319 var resp = convert.JSON.encode(buildReply());
3320 return new async.Future.value(stringResponse(200, h, resp)); 3320 return new async.Future.value(stringResponse(200, h, resp));
3321 }), true); 3321 }), true);
3322 res.get(arg_fileId, arg_commentId, arg_replyId, includeDeleted: arg_includ eDeleted).then(unittest.expectAsync(((api.Reply response) { 3322 res.get(arg_fileId, arg_commentId, arg_replyId, includeDeleted: arg_includ eDeleted).then(unittest.expectAsync1(((api.Reply response) {
3323 checkReply(response); 3323 checkReply(response);
3324 }))); 3324 })));
3325 }); 3325 });
3326 3326
3327 unittest.test("method--list", () { 3327 unittest.test("method--list", () {
3328 3328
3329 var mock = new HttpServerMock(); 3329 var mock = new HttpServerMock();
3330 api.RepliesResourceApi res = new api.DriveApi(mock).replies; 3330 api.RepliesResourceApi res = new api.DriveApi(mock).replies;
3331 var arg_fileId = "foo"; 3331 var arg_fileId = "foo";
3332 var arg_commentId = "foo"; 3332 var arg_commentId = "foo";
3333 var arg_includeDeleted = true; 3333 var arg_includeDeleted = true;
3334 var arg_pageSize = 42; 3334 var arg_pageSize = 42;
3335 var arg_pageToken = "foo"; 3335 var arg_pageToken = "foo";
3336 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 3336 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
3337 var path = (req.url).path; 3337 var path = (req.url).path;
3338 var pathOffset = 0; 3338 var pathOffset = 0;
3339 var index; 3339 var index;
3340 var subPart; 3340 var subPart;
3341 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 3341 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
3342 pathOffset += 1; 3342 pathOffset += 1;
3343 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("drive/v3/")); 3343 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("drive/v3/"));
3344 pathOffset += 9; 3344 pathOffset += 9;
3345 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ als("files/")); 3345 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ als("files/"));
3346 pathOffset += 6; 3346 pathOffset += 6;
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
3379 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ als(arg_pageSize)); 3379 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ als(arg_pageSize));
3380 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en)); 3380 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en));
3381 3381
3382 3382
3383 var h = { 3383 var h = {
3384 "content-type" : "application/json; charset=utf-8", 3384 "content-type" : "application/json; charset=utf-8",
3385 }; 3385 };
3386 var resp = convert.JSON.encode(buildReplyList()); 3386 var resp = convert.JSON.encode(buildReplyList());
3387 return new async.Future.value(stringResponse(200, h, resp)); 3387 return new async.Future.value(stringResponse(200, h, resp));
3388 }), true); 3388 }), true);
3389 res.list(arg_fileId, arg_commentId, includeDeleted: arg_includeDeleted, pa geSize: arg_pageSize, pageToken: arg_pageToken).then(unittest.expectAsync(((api. ReplyList response) { 3389 res.list(arg_fileId, arg_commentId, includeDeleted: arg_includeDeleted, pa geSize: arg_pageSize, pageToken: arg_pageToken).then(unittest.expectAsync1(((api .ReplyList response) {
3390 checkReplyList(response); 3390 checkReplyList(response);
3391 }))); 3391 })));
3392 }); 3392 });
3393 3393
3394 unittest.test("method--update", () { 3394 unittest.test("method--update", () {
3395 3395
3396 var mock = new HttpServerMock(); 3396 var mock = new HttpServerMock();
3397 api.RepliesResourceApi res = new api.DriveApi(mock).replies; 3397 api.RepliesResourceApi res = new api.DriveApi(mock).replies;
3398 var arg_request = buildReply(); 3398 var arg_request = buildReply();
3399 var arg_fileId = "foo"; 3399 var arg_fileId = "foo";
3400 var arg_commentId = "foo"; 3400 var arg_commentId = "foo";
3401 var arg_replyId = "foo"; 3401 var arg_replyId = "foo";
3402 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 3402 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
3403 var obj = new api.Reply.fromJson(json); 3403 var obj = new api.Reply.fromJson(json);
3404 checkReply(obj); 3404 checkReply(obj);
3405 3405
3406 var path = (req.url).path; 3406 var path = (req.url).path;
3407 var pathOffset = 0; 3407 var pathOffset = 0;
3408 var index; 3408 var index;
3409 var subPart; 3409 var subPart;
3410 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 3410 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
3411 pathOffset += 1; 3411 pathOffset += 1;
3412 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("drive/v3/")); 3412 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("drive/v3/"));
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
3448 } 3448 }
3449 } 3449 }
3450 3450
3451 3451
3452 var h = { 3452 var h = {
3453 "content-type" : "application/json; charset=utf-8", 3453 "content-type" : "application/json; charset=utf-8",
3454 }; 3454 };
3455 var resp = convert.JSON.encode(buildReply()); 3455 var resp = convert.JSON.encode(buildReply());
3456 return new async.Future.value(stringResponse(200, h, resp)); 3456 return new async.Future.value(stringResponse(200, h, resp));
3457 }), true); 3457 }), true);
3458 res.update(arg_request, arg_fileId, arg_commentId, arg_replyId).then(unitt est.expectAsync(((api.Reply response) { 3458 res.update(arg_request, arg_fileId, arg_commentId, arg_replyId).then(unitt est.expectAsync1(((api.Reply response) {
3459 checkReply(response); 3459 checkReply(response);
3460 }))); 3460 })));
3461 }); 3461 });
3462 3462
3463 }); 3463 });
3464 3464
3465 3465
3466 unittest.group("resource-RevisionsResourceApi", () { 3466 unittest.group("resource-RevisionsResourceApi", () {
3467 unittest.test("method--delete", () { 3467 unittest.test("method--delete", () {
3468 3468
3469 var mock = new HttpServerMock(); 3469 var mock = new HttpServerMock();
3470 api.RevisionsResourceApi res = new api.DriveApi(mock).revisions; 3470 api.RevisionsResourceApi res = new api.DriveApi(mock).revisions;
3471 var arg_fileId = "foo"; 3471 var arg_fileId = "foo";
3472 var arg_revisionId = "foo"; 3472 var arg_revisionId = "foo";
3473 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 3473 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
3474 var path = (req.url).path; 3474 var path = (req.url).path;
3475 var pathOffset = 0; 3475 var pathOffset = 0;
3476 var index; 3476 var index;
3477 var subPart; 3477 var subPart;
3478 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 3478 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
3479 pathOffset += 1; 3479 pathOffset += 1;
3480 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("drive/v3/")); 3480 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("drive/v3/"));
3481 pathOffset += 9; 3481 pathOffset += 9;
3482 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ als("files/")); 3482 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ als("files/"));
3483 pathOffset += 6; 3483 pathOffset += 6;
(...skipping 25 matching lines...) Expand all
3509 } 3509 }
3510 } 3510 }
3511 3511
3512 3512
3513 var h = { 3513 var h = {
3514 "content-type" : "application/json; charset=utf-8", 3514 "content-type" : "application/json; charset=utf-8",
3515 }; 3515 };
3516 var resp = ""; 3516 var resp = "";
3517 return new async.Future.value(stringResponse(200, h, resp)); 3517 return new async.Future.value(stringResponse(200, h, resp));
3518 }), true); 3518 }), true);
3519 res.delete(arg_fileId, arg_revisionId).then(unittest.expectAsync((_) {})); 3519 res.delete(arg_fileId, arg_revisionId).then(unittest.expectAsync1((_) {})) ;
3520 }); 3520 });
3521 3521
3522 unittest.test("method--get", () { 3522 unittest.test("method--get", () {
3523 // TODO: Implement tests for media upload; 3523 // TODO: Implement tests for media upload;
3524 // TODO: Implement tests for media download; 3524 // TODO: Implement tests for media download;
3525 3525
3526 var mock = new HttpServerMock(); 3526 var mock = new HttpServerMock();
3527 api.RevisionsResourceApi res = new api.DriveApi(mock).revisions; 3527 api.RevisionsResourceApi res = new api.DriveApi(mock).revisions;
3528 var arg_fileId = "foo"; 3528 var arg_fileId = "foo";
3529 var arg_revisionId = "foo"; 3529 var arg_revisionId = "foo";
3530 var arg_acknowledgeAbuse = true; 3530 var arg_acknowledgeAbuse = true;
3531 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 3531 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
3532 var path = (req.url).path; 3532 var path = (req.url).path;
3533 var pathOffset = 0; 3533 var pathOffset = 0;
3534 var index; 3534 var index;
3535 var subPart; 3535 var subPart;
3536 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 3536 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
3537 pathOffset += 1; 3537 pathOffset += 1;
3538 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("drive/v3/")); 3538 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("drive/v3/"));
3539 pathOffset += 9; 3539 pathOffset += 9;
3540 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ als("files/")); 3540 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ als("files/"));
3541 pathOffset += 6; 3541 pathOffset += 6;
(...skipping 26 matching lines...) Expand all
3568 } 3568 }
3569 unittest.expect(queryMap["acknowledgeAbuse"].first, unittest.equals("$ar g_acknowledgeAbuse")); 3569 unittest.expect(queryMap["acknowledgeAbuse"].first, unittest.equals("$ar g_acknowledgeAbuse"));
3570 3570
3571 3571
3572 var h = { 3572 var h = {
3573 "content-type" : "application/json; charset=utf-8", 3573 "content-type" : "application/json; charset=utf-8",
3574 }; 3574 };
3575 var resp = convert.JSON.encode(buildRevision()); 3575 var resp = convert.JSON.encode(buildRevision());
3576 return new async.Future.value(stringResponse(200, h, resp)); 3576 return new async.Future.value(stringResponse(200, h, resp));
3577 }), true); 3577 }), true);
3578 res.get(arg_fileId, arg_revisionId, acknowledgeAbuse: arg_acknowledgeAbuse ).then(unittest.expectAsync(((api.Revision response) { 3578 res.get(arg_fileId, arg_revisionId, acknowledgeAbuse: arg_acknowledgeAbuse ).then(unittest.expectAsync1(((api.Revision response) {
3579 checkRevision(response); 3579 checkRevision(response);
3580 }))); 3580 })));
3581 }); 3581 });
3582 3582
3583 unittest.test("method--list", () { 3583 unittest.test("method--list", () {
3584 3584
3585 var mock = new HttpServerMock(); 3585 var mock = new HttpServerMock();
3586 api.RevisionsResourceApi res = new api.DriveApi(mock).revisions; 3586 api.RevisionsResourceApi res = new api.DriveApi(mock).revisions;
3587 var arg_fileId = "foo"; 3587 var arg_fileId = "foo";
3588 var arg_pageSize = 42; 3588 var arg_pageSize = 42;
3589 var arg_pageToken = "foo"; 3589 var arg_pageToken = "foo";
3590 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 3590 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
3591 var path = (req.url).path; 3591 var path = (req.url).path;
3592 var pathOffset = 0; 3592 var pathOffset = 0;
3593 var index; 3593 var index;
3594 var subPart; 3594 var subPart;
3595 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 3595 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
3596 pathOffset += 1; 3596 pathOffset += 1;
3597 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("drive/v3/")); 3597 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("drive/v3/"));
3598 pathOffset += 9; 3598 pathOffset += 9;
3599 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ als("files/")); 3599 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ als("files/"));
3600 pathOffset += 6; 3600 pathOffset += 6;
(...skipping 24 matching lines...) Expand all
3625 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ als(arg_pageSize)); 3625 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ als(arg_pageSize));
3626 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en)); 3626 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en));
3627 3627
3628 3628
3629 var h = { 3629 var h = {
3630 "content-type" : "application/json; charset=utf-8", 3630 "content-type" : "application/json; charset=utf-8",
3631 }; 3631 };
3632 var resp = convert.JSON.encode(buildRevisionList()); 3632 var resp = convert.JSON.encode(buildRevisionList());
3633 return new async.Future.value(stringResponse(200, h, resp)); 3633 return new async.Future.value(stringResponse(200, h, resp));
3634 }), true); 3634 }), true);
3635 res.list(arg_fileId, pageSize: arg_pageSize, pageToken: arg_pageToken).the n(unittest.expectAsync(((api.RevisionList response) { 3635 res.list(arg_fileId, pageSize: arg_pageSize, pageToken: arg_pageToken).the n(unittest.expectAsync1(((api.RevisionList response) {
3636 checkRevisionList(response); 3636 checkRevisionList(response);
3637 }))); 3637 })));
3638 }); 3638 });
3639 3639
3640 unittest.test("method--update", () { 3640 unittest.test("method--update", () {
3641 3641
3642 var mock = new HttpServerMock(); 3642 var mock = new HttpServerMock();
3643 api.RevisionsResourceApi res = new api.DriveApi(mock).revisions; 3643 api.RevisionsResourceApi res = new api.DriveApi(mock).revisions;
3644 var arg_request = buildRevision(); 3644 var arg_request = buildRevision();
3645 var arg_fileId = "foo"; 3645 var arg_fileId = "foo";
3646 var arg_revisionId = "foo"; 3646 var arg_revisionId = "foo";
3647 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 3647 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
3648 var obj = new api.Revision.fromJson(json); 3648 var obj = new api.Revision.fromJson(json);
3649 checkRevision(obj); 3649 checkRevision(obj);
3650 3650
3651 var path = (req.url).path; 3651 var path = (req.url).path;
3652 var pathOffset = 0; 3652 var pathOffset = 0;
3653 var index; 3653 var index;
3654 var subPart; 3654 var subPart;
3655 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 3655 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
3656 pathOffset += 1; 3656 pathOffset += 1;
3657 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("drive/v3/")); 3657 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("drive/v3/"));
(...skipping 28 matching lines...) Expand all
3686 } 3686 }
3687 } 3687 }
3688 3688
3689 3689
3690 var h = { 3690 var h = {
3691 "content-type" : "application/json; charset=utf-8", 3691 "content-type" : "application/json; charset=utf-8",
3692 }; 3692 };
3693 var resp = convert.JSON.encode(buildRevision()); 3693 var resp = convert.JSON.encode(buildRevision());
3694 return new async.Future.value(stringResponse(200, h, resp)); 3694 return new async.Future.value(stringResponse(200, h, resp));
3695 }), true); 3695 }), true);
3696 res.update(arg_request, arg_fileId, arg_revisionId).then(unittest.expectAs ync(((api.Revision response) { 3696 res.update(arg_request, arg_fileId, arg_revisionId).then(unittest.expectAs ync1(((api.Revision response) {
3697 checkRevision(response); 3697 checkRevision(response);
3698 }))); 3698 })));
3699 }); 3699 });
3700 3700
3701 }); 3701 });
3702 3702
3703 3703
3704 unittest.group("resource-TeamdrivesResourceApi", () { 3704 unittest.group("resource-TeamdrivesResourceApi", () {
3705 unittest.test("method--create", () { 3705 unittest.test("method--create", () {
3706 3706
3707 var mock = new HttpServerMock(); 3707 var mock = new HttpServerMock();
3708 api.TeamdrivesResourceApi res = new api.DriveApi(mock).teamdrives; 3708 api.TeamdrivesResourceApi res = new api.DriveApi(mock).teamdrives;
3709 var arg_request = buildTeamDrive(); 3709 var arg_request = buildTeamDrive();
3710 var arg_requestId = "foo"; 3710 var arg_requestId = "foo";
3711 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 3711 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
3712 var obj = new api.TeamDrive.fromJson(json); 3712 var obj = new api.TeamDrive.fromJson(json);
3713 checkTeamDrive(obj); 3713 checkTeamDrive(obj);
3714 3714
3715 var path = (req.url).path; 3715 var path = (req.url).path;
3716 var pathOffset = 0; 3716 var pathOffset = 0;
3717 var index; 3717 var index;
3718 var subPart; 3718 var subPart;
3719 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 3719 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
3720 pathOffset += 1; 3720 pathOffset += 1;
3721 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("drive/v3/")); 3721 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("drive/v3/"));
(...skipping 19 matching lines...) Expand all
3741 } 3741 }
3742 unittest.expect(queryMap["requestId"].first, unittest.equals(arg_request Id)); 3742 unittest.expect(queryMap["requestId"].first, unittest.equals(arg_request Id));
3743 3743
3744 3744
3745 var h = { 3745 var h = {
3746 "content-type" : "application/json; charset=utf-8", 3746 "content-type" : "application/json; charset=utf-8",
3747 }; 3747 };
3748 var resp = convert.JSON.encode(buildTeamDrive()); 3748 var resp = convert.JSON.encode(buildTeamDrive());
3749 return new async.Future.value(stringResponse(200, h, resp)); 3749 return new async.Future.value(stringResponse(200, h, resp));
3750 }), true); 3750 }), true);
3751 res.create(arg_request, arg_requestId).then(unittest.expectAsync(((api.Tea mDrive response) { 3751 res.create(arg_request, arg_requestId).then(unittest.expectAsync1(((api.Te amDrive response) {
3752 checkTeamDrive(response); 3752 checkTeamDrive(response);
3753 }))); 3753 })));
3754 }); 3754 });
3755 3755
3756 unittest.test("method--delete", () { 3756 unittest.test("method--delete", () {
3757 3757
3758 var mock = new HttpServerMock(); 3758 var mock = new HttpServerMock();
3759 api.TeamdrivesResourceApi res = new api.DriveApi(mock).teamdrives; 3759 api.TeamdrivesResourceApi res = new api.DriveApi(mock).teamdrives;
3760 var arg_teamDriveId = "foo"; 3760 var arg_teamDriveId = "foo";
3761 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 3761 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
3762 var path = (req.url).path; 3762 var path = (req.url).path;
3763 var pathOffset = 0; 3763 var pathOffset = 0;
3764 var index; 3764 var index;
3765 var subPart; 3765 var subPart;
3766 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 3766 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
3767 pathOffset += 1; 3767 pathOffset += 1;
3768 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("drive/v3/")); 3768 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("drive/v3/"));
3769 pathOffset += 9; 3769 pathOffset += 9;
3770 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq uals("teamdrives/")); 3770 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq uals("teamdrives/"));
3771 pathOffset += 11; 3771 pathOffset += 11;
(...skipping 18 matching lines...) Expand all
3790 } 3790 }
3791 } 3791 }
3792 3792
3793 3793
3794 var h = { 3794 var h = {
3795 "content-type" : "application/json; charset=utf-8", 3795 "content-type" : "application/json; charset=utf-8",
3796 }; 3796 };
3797 var resp = ""; 3797 var resp = "";
3798 return new async.Future.value(stringResponse(200, h, resp)); 3798 return new async.Future.value(stringResponse(200, h, resp));
3799 }), true); 3799 }), true);
3800 res.delete(arg_teamDriveId).then(unittest.expectAsync((_) {})); 3800 res.delete(arg_teamDriveId).then(unittest.expectAsync1((_) {}));
3801 }); 3801 });
3802 3802
3803 unittest.test("method--get", () { 3803 unittest.test("method--get", () {
3804 3804
3805 var mock = new HttpServerMock(); 3805 var mock = new HttpServerMock();
3806 api.TeamdrivesResourceApi res = new api.DriveApi(mock).teamdrives; 3806 api.TeamdrivesResourceApi res = new api.DriveApi(mock).teamdrives;
3807 var arg_teamDriveId = "foo"; 3807 var arg_teamDriveId = "foo";
3808 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 3808 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
3809 var path = (req.url).path; 3809 var path = (req.url).path;
3810 var pathOffset = 0; 3810 var pathOffset = 0;
3811 var index; 3811 var index;
3812 var subPart; 3812 var subPart;
3813 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 3813 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
3814 pathOffset += 1; 3814 pathOffset += 1;
3815 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("drive/v3/")); 3815 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("drive/v3/"));
3816 pathOffset += 9; 3816 pathOffset += 9;
3817 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq uals("teamdrives/")); 3817 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq uals("teamdrives/"));
3818 pathOffset += 11; 3818 pathOffset += 11;
(...skipping 18 matching lines...) Expand all
3837 } 3837 }
3838 } 3838 }
3839 3839
3840 3840
3841 var h = { 3841 var h = {
3842 "content-type" : "application/json; charset=utf-8", 3842 "content-type" : "application/json; charset=utf-8",
3843 }; 3843 };
3844 var resp = convert.JSON.encode(buildTeamDrive()); 3844 var resp = convert.JSON.encode(buildTeamDrive());
3845 return new async.Future.value(stringResponse(200, h, resp)); 3845 return new async.Future.value(stringResponse(200, h, resp));
3846 }), true); 3846 }), true);
3847 res.get(arg_teamDriveId).then(unittest.expectAsync(((api.TeamDrive respons e) { 3847 res.get(arg_teamDriveId).then(unittest.expectAsync1(((api.TeamDrive respon se) {
3848 checkTeamDrive(response); 3848 checkTeamDrive(response);
3849 }))); 3849 })));
3850 }); 3850 });
3851 3851
3852 unittest.test("method--list", () { 3852 unittest.test("method--list", () {
3853 3853
3854 var mock = new HttpServerMock(); 3854 var mock = new HttpServerMock();
3855 api.TeamdrivesResourceApi res = new api.DriveApi(mock).teamdrives; 3855 api.TeamdrivesResourceApi res = new api.DriveApi(mock).teamdrives;
3856 var arg_pageSize = 42; 3856 var arg_pageSize = 42;
3857 var arg_pageToken = "foo"; 3857 var arg_pageToken = "foo";
3858 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 3858 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
3859 var path = (req.url).path; 3859 var path = (req.url).path;
3860 var pathOffset = 0; 3860 var pathOffset = 0;
3861 var index; 3861 var index;
3862 var subPart; 3862 var subPart;
3863 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 3863 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
3864 pathOffset += 1; 3864 pathOffset += 1;
3865 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("drive/v3/")); 3865 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("drive/v3/"));
3866 pathOffset += 9; 3866 pathOffset += 9;
3867 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq uals("teamdrives")); 3867 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq uals("teamdrives"));
3868 pathOffset += 10; 3868 pathOffset += 10;
(...skipping 17 matching lines...) Expand all
3886 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ als(arg_pageSize)); 3886 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ als(arg_pageSize));
3887 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en)); 3887 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en));
3888 3888
3889 3889
3890 var h = { 3890 var h = {
3891 "content-type" : "application/json; charset=utf-8", 3891 "content-type" : "application/json; charset=utf-8",
3892 }; 3892 };
3893 var resp = convert.JSON.encode(buildTeamDriveList()); 3893 var resp = convert.JSON.encode(buildTeamDriveList());
3894 return new async.Future.value(stringResponse(200, h, resp)); 3894 return new async.Future.value(stringResponse(200, h, resp));
3895 }), true); 3895 }), true);
3896 res.list(pageSize: arg_pageSize, pageToken: arg_pageToken).then(unittest.e xpectAsync(((api.TeamDriveList response) { 3896 res.list(pageSize: arg_pageSize, pageToken: arg_pageToken).then(unittest.e xpectAsync1(((api.TeamDriveList response) {
3897 checkTeamDriveList(response); 3897 checkTeamDriveList(response);
3898 }))); 3898 })));
3899 }); 3899 });
3900 3900
3901 unittest.test("method--update", () { 3901 unittest.test("method--update", () {
3902 3902
3903 var mock = new HttpServerMock(); 3903 var mock = new HttpServerMock();
3904 api.TeamdrivesResourceApi res = new api.DriveApi(mock).teamdrives; 3904 api.TeamdrivesResourceApi res = new api.DriveApi(mock).teamdrives;
3905 var arg_request = buildTeamDrive(); 3905 var arg_request = buildTeamDrive();
3906 var arg_teamDriveId = "foo"; 3906 var arg_teamDriveId = "foo";
3907 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 3907 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
3908 var obj = new api.TeamDrive.fromJson(json); 3908 var obj = new api.TeamDrive.fromJson(json);
3909 checkTeamDrive(obj); 3909 checkTeamDrive(obj);
3910 3910
3911 var path = (req.url).path; 3911 var path = (req.url).path;
3912 var pathOffset = 0; 3912 var pathOffset = 0;
3913 var index; 3913 var index;
3914 var subPart; 3914 var subPart;
3915 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 3915 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
3916 pathOffset += 1; 3916 pathOffset += 1;
3917 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("drive/v3/")); 3917 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("drive/v3/"));
(...skipping 21 matching lines...) Expand all
3939 } 3939 }
3940 } 3940 }
3941 3941
3942 3942
3943 var h = { 3943 var h = {
3944 "content-type" : "application/json; charset=utf-8", 3944 "content-type" : "application/json; charset=utf-8",
3945 }; 3945 };
3946 var resp = convert.JSON.encode(buildTeamDrive()); 3946 var resp = convert.JSON.encode(buildTeamDrive());
3947 return new async.Future.value(stringResponse(200, h, resp)); 3947 return new async.Future.value(stringResponse(200, h, resp));
3948 }), true); 3948 }), true);
3949 res.update(arg_request, arg_teamDriveId).then(unittest.expectAsync(((api.T eamDrive response) { 3949 res.update(arg_request, arg_teamDriveId).then(unittest.expectAsync1(((api. TeamDrive response) {
3950 checkTeamDrive(response); 3950 checkTeamDrive(response);
3951 }))); 3951 })));
3952 }); 3952 });
3953 3953
3954 }); 3954 });
3955 3955
3956 3956
3957 } 3957 }
3958 3958
OLDNEW
« no previous file with comments | « generated/googleapis/test/drive/v2_test.dart ('k') | generated/googleapis/test/firebasedynamiclinks/v1_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698