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

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

Issue 2734843002: Api-roll 46: 2017-03-06 (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 library googleapis.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:unittest/unittest.dart' as unittest;
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 } 44 }
45 } 45 }
46 } 46 }
47 47
48 http.StreamedResponse stringResponse( 48 http.StreamedResponse stringResponse(
49 core.int status, core.Map headers, core.String body) { 49 core.int status, core.Map headers, core.String body) {
50 var stream = new async.Stream.fromIterable([convert.UTF8.encode(body)]); 50 var stream = new async.Stream.fromIterable([convert.UTF8.encode(body)]);
51 return new http.StreamedResponse(stream, status, headers: headers); 51 return new http.StreamedResponse(stream, status, headers: headers);
52 } 52 }
53 53
54 buildUnnamed1581() { 54 buildUnnamed1346() {
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 checkUnnamed1581(core.List<core.String> o) { 61 checkUnnamed1346(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 buildUnnamed1582() { 67 buildUnnamed1347() {
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"] = buildUnnamed1581(); 69 o["x"] = buildUnnamed1346();
70 o["y"] = buildUnnamed1581(); 70 o["y"] = buildUnnamed1346();
71 return o; 71 return o;
72 } 72 }
73 73
74 checkUnnamed1582(core.Map<core.String, core.List<core.String>> o) { 74 checkUnnamed1347(core.Map<core.String, core.List<core.String>> o) {
75 unittest.expect(o, unittest.hasLength(2)); 75 unittest.expect(o, unittest.hasLength(2));
76 checkUnnamed1581(o["x"]); 76 checkUnnamed1346(o["x"]);
77 checkUnnamed1581(o["y"]); 77 checkUnnamed1346(o["y"]);
78 } 78 }
79 79
80 buildUnnamed1583() { 80 buildUnnamed1348() {
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 checkUnnamed1583(core.List<core.String> o) { 87 checkUnnamed1348(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 buildUnnamed1584() { 93 buildUnnamed1349() {
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 checkUnnamed1584(core.List<core.String> o) { 100 checkUnnamed1349(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 buildUnnamed1585() { 106 buildUnnamed1350() {
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"] = buildUnnamed1584(); 108 o["x"] = buildUnnamed1349();
109 o["y"] = buildUnnamed1584(); 109 o["y"] = buildUnnamed1349();
110 return o; 110 return o;
111 } 111 }
112 112
113 checkUnnamed1585(core.Map<core.String, core.List<core.String>> o) { 113 checkUnnamed1350(core.Map<core.String, core.List<core.String>> o) {
114 unittest.expect(o, unittest.hasLength(2)); 114 unittest.expect(o, unittest.hasLength(2));
115 checkUnnamed1584(o["x"]); 115 checkUnnamed1349(o["x"]);
116 checkUnnamed1584(o["y"]); 116 checkUnnamed1349(o["y"]);
117 } 117 }
118 118
119 buildUnnamed1586() { 119 buildUnnamed1351() {
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 checkUnnamed1586(core.Map<core.String, core.String> o) { 126 checkUnnamed1351(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 16 matching lines...) Expand all
153 } 153 }
154 buildCounterAboutStorageQuota--; 154 buildCounterAboutStorageQuota--;
155 } 155 }
156 156
157 core.int buildCounterAbout = 0; 157 core.int buildCounterAbout = 0;
158 buildAbout() { 158 buildAbout() {
159 var o = new api.About(); 159 var o = new api.About();
160 buildCounterAbout++; 160 buildCounterAbout++;
161 if (buildCounterAbout < 3) { 161 if (buildCounterAbout < 3) {
162 o.appInstalled = true; 162 o.appInstalled = true;
163 o.exportFormats = buildUnnamed1582(); 163 o.exportFormats = buildUnnamed1347();
164 o.folderColorPalette = buildUnnamed1583(); 164 o.folderColorPalette = buildUnnamed1348();
165 o.importFormats = buildUnnamed1585(); 165 o.importFormats = buildUnnamed1350();
166 o.kind = "foo"; 166 o.kind = "foo";
167 o.maxImportSizes = buildUnnamed1586(); 167 o.maxImportSizes = buildUnnamed1351();
168 o.maxUploadSize = "foo"; 168 o.maxUploadSize = "foo";
169 o.storageQuota = buildAboutStorageQuota(); 169 o.storageQuota = buildAboutStorageQuota();
170 o.user = buildUser(); 170 o.user = buildUser();
171 } 171 }
172 buildCounterAbout--; 172 buildCounterAbout--;
173 return o; 173 return o;
174 } 174 }
175 175
176 checkAbout(api.About o) { 176 checkAbout(api.About o) {
177 buildCounterAbout++; 177 buildCounterAbout++;
178 if (buildCounterAbout < 3) { 178 if (buildCounterAbout < 3) {
179 unittest.expect(o.appInstalled, unittest.isTrue); 179 unittest.expect(o.appInstalled, unittest.isTrue);
180 checkUnnamed1582(o.exportFormats); 180 checkUnnamed1347(o.exportFormats);
181 checkUnnamed1583(o.folderColorPalette); 181 checkUnnamed1348(o.folderColorPalette);
182 checkUnnamed1585(o.importFormats); 182 checkUnnamed1350(o.importFormats);
183 unittest.expect(o.kind, unittest.equals('foo')); 183 unittest.expect(o.kind, unittest.equals('foo'));
184 checkUnnamed1586(o.maxImportSizes); 184 checkUnnamed1351(o.maxImportSizes);
185 unittest.expect(o.maxUploadSize, unittest.equals('foo')); 185 unittest.expect(o.maxUploadSize, unittest.equals('foo'));
186 checkAboutStorageQuota(o.storageQuota); 186 checkAboutStorageQuota(o.storageQuota);
187 checkUser(o.user); 187 checkUser(o.user);
188 } 188 }
189 buildCounterAbout--; 189 buildCounterAbout--;
190 } 190 }
191 191
192 core.int buildCounterChange = 0; 192 core.int buildCounterChange = 0;
193 buildChange() { 193 buildChange() {
194 var o = new api.Change(); 194 var o = new api.Change();
195 buildCounterChange++; 195 buildCounterChange++;
196 if (buildCounterChange < 3) { 196 if (buildCounterChange < 3) {
197 o.file = buildFile(); 197 o.file = buildFile();
198 o.fileId = "foo"; 198 o.fileId = "foo";
199 o.kind = "foo"; 199 o.kind = "foo";
200 o.removed = true; 200 o.removed = true;
201 o.teamDrive = buildTeamDrive();
202 o.teamDriveId = "foo";
201 o.time = core.DateTime.parse("2002-02-27T14:01:02"); 203 o.time = core.DateTime.parse("2002-02-27T14:01:02");
204 o.type = "foo";
202 } 205 }
203 buildCounterChange--; 206 buildCounterChange--;
204 return o; 207 return o;
205 } 208 }
206 209
207 checkChange(api.Change o) { 210 checkChange(api.Change o) {
208 buildCounterChange++; 211 buildCounterChange++;
209 if (buildCounterChange < 3) { 212 if (buildCounterChange < 3) {
210 checkFile(o.file); 213 checkFile(o.file);
211 unittest.expect(o.fileId, unittest.equals('foo')); 214 unittest.expect(o.fileId, unittest.equals('foo'));
212 unittest.expect(o.kind, unittest.equals('foo')); 215 unittest.expect(o.kind, unittest.equals('foo'));
213 unittest.expect(o.removed, unittest.isTrue); 216 unittest.expect(o.removed, unittest.isTrue);
217 checkTeamDrive(o.teamDrive);
218 unittest.expect(o.teamDriveId, unittest.equals('foo'));
214 unittest.expect(o.time, unittest.equals(core.DateTime.parse("2002-02-27T14:0 1:02"))); 219 unittest.expect(o.time, unittest.equals(core.DateTime.parse("2002-02-27T14:0 1:02")));
220 unittest.expect(o.type, unittest.equals('foo'));
215 } 221 }
216 buildCounterChange--; 222 buildCounterChange--;
217 } 223 }
218 224
219 buildUnnamed1587() { 225 buildUnnamed1352() {
220 var o = new core.List<api.Change>(); 226 var o = new core.List<api.Change>();
221 o.add(buildChange()); 227 o.add(buildChange());
222 o.add(buildChange()); 228 o.add(buildChange());
223 return o; 229 return o;
224 } 230 }
225 231
226 checkUnnamed1587(core.List<api.Change> o) { 232 checkUnnamed1352(core.List<api.Change> o) {
227 unittest.expect(o, unittest.hasLength(2)); 233 unittest.expect(o, unittest.hasLength(2));
228 checkChange(o[0]); 234 checkChange(o[0]);
229 checkChange(o[1]); 235 checkChange(o[1]);
230 } 236 }
231 237
232 core.int buildCounterChangeList = 0; 238 core.int buildCounterChangeList = 0;
233 buildChangeList() { 239 buildChangeList() {
234 var o = new api.ChangeList(); 240 var o = new api.ChangeList();
235 buildCounterChangeList++; 241 buildCounterChangeList++;
236 if (buildCounterChangeList < 3) { 242 if (buildCounterChangeList < 3) {
237 o.changes = buildUnnamed1587(); 243 o.changes = buildUnnamed1352();
238 o.kind = "foo"; 244 o.kind = "foo";
239 o.newStartPageToken = "foo"; 245 o.newStartPageToken = "foo";
240 o.nextPageToken = "foo"; 246 o.nextPageToken = "foo";
241 } 247 }
242 buildCounterChangeList--; 248 buildCounterChangeList--;
243 return o; 249 return o;
244 } 250 }
245 251
246 checkChangeList(api.ChangeList o) { 252 checkChangeList(api.ChangeList o) {
247 buildCounterChangeList++; 253 buildCounterChangeList++;
248 if (buildCounterChangeList < 3) { 254 if (buildCounterChangeList < 3) {
249 checkUnnamed1587(o.changes); 255 checkUnnamed1352(o.changes);
250 unittest.expect(o.kind, unittest.equals('foo')); 256 unittest.expect(o.kind, unittest.equals('foo'));
251 unittest.expect(o.newStartPageToken, unittest.equals('foo')); 257 unittest.expect(o.newStartPageToken, unittest.equals('foo'));
252 unittest.expect(o.nextPageToken, unittest.equals('foo')); 258 unittest.expect(o.nextPageToken, unittest.equals('foo'));
253 } 259 }
254 buildCounterChangeList--; 260 buildCounterChangeList--;
255 } 261 }
256 262
257 buildUnnamed1588() { 263 buildUnnamed1353() {
258 var o = new core.Map<core.String, core.String>(); 264 var o = new core.Map<core.String, core.String>();
259 o["x"] = "foo"; 265 o["x"] = "foo";
260 o["y"] = "foo"; 266 o["y"] = "foo";
261 return o; 267 return o;
262 } 268 }
263 269
264 checkUnnamed1588(core.Map<core.String, core.String> o) { 270 checkUnnamed1353(core.Map<core.String, core.String> o) {
265 unittest.expect(o, unittest.hasLength(2)); 271 unittest.expect(o, unittest.hasLength(2));
266 unittest.expect(o["x"], unittest.equals('foo')); 272 unittest.expect(o["x"], unittest.equals('foo'));
267 unittest.expect(o["y"], unittest.equals('foo')); 273 unittest.expect(o["y"], unittest.equals('foo'));
268 } 274 }
269 275
270 core.int buildCounterChannel = 0; 276 core.int buildCounterChannel = 0;
271 buildChannel() { 277 buildChannel() {
272 var o = new api.Channel(); 278 var o = new api.Channel();
273 buildCounterChannel++; 279 buildCounterChannel++;
274 if (buildCounterChannel < 3) { 280 if (buildCounterChannel < 3) {
275 o.address = "foo"; 281 o.address = "foo";
276 o.expiration = "foo"; 282 o.expiration = "foo";
277 o.id = "foo"; 283 o.id = "foo";
278 o.kind = "foo"; 284 o.kind = "foo";
279 o.params = buildUnnamed1588(); 285 o.params = buildUnnamed1353();
280 o.payload = true; 286 o.payload = true;
281 o.resourceId = "foo"; 287 o.resourceId = "foo";
282 o.resourceUri = "foo"; 288 o.resourceUri = "foo";
283 o.token = "foo"; 289 o.token = "foo";
284 o.type = "foo"; 290 o.type = "foo";
285 } 291 }
286 buildCounterChannel--; 292 buildCounterChannel--;
287 return o; 293 return o;
288 } 294 }
289 295
290 checkChannel(api.Channel o) { 296 checkChannel(api.Channel o) {
291 buildCounterChannel++; 297 buildCounterChannel++;
292 if (buildCounterChannel < 3) { 298 if (buildCounterChannel < 3) {
293 unittest.expect(o.address, unittest.equals('foo')); 299 unittest.expect(o.address, unittest.equals('foo'));
294 unittest.expect(o.expiration, unittest.equals('foo')); 300 unittest.expect(o.expiration, unittest.equals('foo'));
295 unittest.expect(o.id, unittest.equals('foo')); 301 unittest.expect(o.id, unittest.equals('foo'));
296 unittest.expect(o.kind, unittest.equals('foo')); 302 unittest.expect(o.kind, unittest.equals('foo'));
297 checkUnnamed1588(o.params); 303 checkUnnamed1353(o.params);
298 unittest.expect(o.payload, unittest.isTrue); 304 unittest.expect(o.payload, unittest.isTrue);
299 unittest.expect(o.resourceId, unittest.equals('foo')); 305 unittest.expect(o.resourceId, unittest.equals('foo'));
300 unittest.expect(o.resourceUri, unittest.equals('foo')); 306 unittest.expect(o.resourceUri, unittest.equals('foo'));
301 unittest.expect(o.token, unittest.equals('foo')); 307 unittest.expect(o.token, unittest.equals('foo'));
302 unittest.expect(o.type, unittest.equals('foo')); 308 unittest.expect(o.type, unittest.equals('foo'));
303 } 309 }
304 buildCounterChannel--; 310 buildCounterChannel--;
305 } 311 }
306 312
307 core.int buildCounterCommentQuotedFileContent = 0; 313 core.int buildCounterCommentQuotedFileContent = 0;
(...skipping 10 matching lines...) Expand all
318 324
319 checkCommentQuotedFileContent(api.CommentQuotedFileContent o) { 325 checkCommentQuotedFileContent(api.CommentQuotedFileContent o) {
320 buildCounterCommentQuotedFileContent++; 326 buildCounterCommentQuotedFileContent++;
321 if (buildCounterCommentQuotedFileContent < 3) { 327 if (buildCounterCommentQuotedFileContent < 3) {
322 unittest.expect(o.mimeType, unittest.equals('foo')); 328 unittest.expect(o.mimeType, unittest.equals('foo'));
323 unittest.expect(o.value, unittest.equals('foo')); 329 unittest.expect(o.value, unittest.equals('foo'));
324 } 330 }
325 buildCounterCommentQuotedFileContent--; 331 buildCounterCommentQuotedFileContent--;
326 } 332 }
327 333
328 buildUnnamed1589() { 334 buildUnnamed1354() {
329 var o = new core.List<api.Reply>(); 335 var o = new core.List<api.Reply>();
330 o.add(buildReply()); 336 o.add(buildReply());
331 o.add(buildReply()); 337 o.add(buildReply());
332 return o; 338 return o;
333 } 339 }
334 340
335 checkUnnamed1589(core.List<api.Reply> o) { 341 checkUnnamed1354(core.List<api.Reply> o) {
336 unittest.expect(o, unittest.hasLength(2)); 342 unittest.expect(o, unittest.hasLength(2));
337 checkReply(o[0]); 343 checkReply(o[0]);
338 checkReply(o[1]); 344 checkReply(o[1]);
339 } 345 }
340 346
341 core.int buildCounterComment = 0; 347 core.int buildCounterComment = 0;
342 buildComment() { 348 buildComment() {
343 var o = new api.Comment(); 349 var o = new api.Comment();
344 buildCounterComment++; 350 buildCounterComment++;
345 if (buildCounterComment < 3) { 351 if (buildCounterComment < 3) {
346 o.anchor = "foo"; 352 o.anchor = "foo";
347 o.author = buildUser(); 353 o.author = buildUser();
348 o.content = "foo"; 354 o.content = "foo";
349 o.createdTime = core.DateTime.parse("2002-02-27T14:01:02"); 355 o.createdTime = core.DateTime.parse("2002-02-27T14:01:02");
350 o.deleted = true; 356 o.deleted = true;
351 o.htmlContent = "foo"; 357 o.htmlContent = "foo";
352 o.id = "foo"; 358 o.id = "foo";
353 o.kind = "foo"; 359 o.kind = "foo";
354 o.modifiedTime = core.DateTime.parse("2002-02-27T14:01:02"); 360 o.modifiedTime = core.DateTime.parse("2002-02-27T14:01:02");
355 o.quotedFileContent = buildCommentQuotedFileContent(); 361 o.quotedFileContent = buildCommentQuotedFileContent();
356 o.replies = buildUnnamed1589(); 362 o.replies = buildUnnamed1354();
357 o.resolved = true; 363 o.resolved = true;
358 } 364 }
359 buildCounterComment--; 365 buildCounterComment--;
360 return o; 366 return o;
361 } 367 }
362 368
363 checkComment(api.Comment o) { 369 checkComment(api.Comment o) {
364 buildCounterComment++; 370 buildCounterComment++;
365 if (buildCounterComment < 3) { 371 if (buildCounterComment < 3) {
366 unittest.expect(o.anchor, unittest.equals('foo')); 372 unittest.expect(o.anchor, unittest.equals('foo'));
367 checkUser(o.author); 373 checkUser(o.author);
368 unittest.expect(o.content, unittest.equals('foo')); 374 unittest.expect(o.content, unittest.equals('foo'));
369 unittest.expect(o.createdTime, unittest.equals(core.DateTime.parse("2002-02- 27T14:01:02"))); 375 unittest.expect(o.createdTime, unittest.equals(core.DateTime.parse("2002-02- 27T14:01:02")));
370 unittest.expect(o.deleted, unittest.isTrue); 376 unittest.expect(o.deleted, unittest.isTrue);
371 unittest.expect(o.htmlContent, unittest.equals('foo')); 377 unittest.expect(o.htmlContent, unittest.equals('foo'));
372 unittest.expect(o.id, unittest.equals('foo')); 378 unittest.expect(o.id, unittest.equals('foo'));
373 unittest.expect(o.kind, unittest.equals('foo')); 379 unittest.expect(o.kind, unittest.equals('foo'));
374 unittest.expect(o.modifiedTime, unittest.equals(core.DateTime.parse("2002-02 -27T14:01:02"))); 380 unittest.expect(o.modifiedTime, unittest.equals(core.DateTime.parse("2002-02 -27T14:01:02")));
375 checkCommentQuotedFileContent(o.quotedFileContent); 381 checkCommentQuotedFileContent(o.quotedFileContent);
376 checkUnnamed1589(o.replies); 382 checkUnnamed1354(o.replies);
377 unittest.expect(o.resolved, unittest.isTrue); 383 unittest.expect(o.resolved, unittest.isTrue);
378 } 384 }
379 buildCounterComment--; 385 buildCounterComment--;
380 } 386 }
381 387
382 buildUnnamed1590() { 388 buildUnnamed1355() {
383 var o = new core.List<api.Comment>(); 389 var o = new core.List<api.Comment>();
384 o.add(buildComment()); 390 o.add(buildComment());
385 o.add(buildComment()); 391 o.add(buildComment());
386 return o; 392 return o;
387 } 393 }
388 394
389 checkUnnamed1590(core.List<api.Comment> o) { 395 checkUnnamed1355(core.List<api.Comment> o) {
390 unittest.expect(o, unittest.hasLength(2)); 396 unittest.expect(o, unittest.hasLength(2));
391 checkComment(o[0]); 397 checkComment(o[0]);
392 checkComment(o[1]); 398 checkComment(o[1]);
393 } 399 }
394 400
395 core.int buildCounterCommentList = 0; 401 core.int buildCounterCommentList = 0;
396 buildCommentList() { 402 buildCommentList() {
397 var o = new api.CommentList(); 403 var o = new api.CommentList();
398 buildCounterCommentList++; 404 buildCounterCommentList++;
399 if (buildCounterCommentList < 3) { 405 if (buildCounterCommentList < 3) {
400 o.comments = buildUnnamed1590(); 406 o.comments = buildUnnamed1355();
401 o.kind = "foo"; 407 o.kind = "foo";
402 o.nextPageToken = "foo"; 408 o.nextPageToken = "foo";
403 } 409 }
404 buildCounterCommentList--; 410 buildCounterCommentList--;
405 return o; 411 return o;
406 } 412 }
407 413
408 checkCommentList(api.CommentList o) { 414 checkCommentList(api.CommentList o) {
409 buildCounterCommentList++; 415 buildCounterCommentList++;
410 if (buildCounterCommentList < 3) { 416 if (buildCounterCommentList < 3) {
411 checkUnnamed1590(o.comments); 417 checkUnnamed1355(o.comments);
412 unittest.expect(o.kind, unittest.equals('foo')); 418 unittest.expect(o.kind, unittest.equals('foo'));
413 unittest.expect(o.nextPageToken, unittest.equals('foo')); 419 unittest.expect(o.nextPageToken, unittest.equals('foo'));
414 } 420 }
415 buildCounterCommentList--; 421 buildCounterCommentList--;
416 } 422 }
417 423
418 buildUnnamed1591() { 424 buildUnnamed1356() {
419 var o = new core.Map<core.String, core.String>(); 425 var o = new core.Map<core.String, core.String>();
420 o["x"] = "foo"; 426 o["x"] = "foo";
421 o["y"] = "foo"; 427 o["y"] = "foo";
422 return o; 428 return o;
423 } 429 }
424 430
425 checkUnnamed1591(core.Map<core.String, core.String> o) { 431 checkUnnamed1356(core.Map<core.String, core.String> o) {
426 unittest.expect(o, unittest.hasLength(2)); 432 unittest.expect(o, unittest.hasLength(2));
427 unittest.expect(o["x"], unittest.equals('foo')); 433 unittest.expect(o["x"], unittest.equals('foo'));
428 unittest.expect(o["y"], unittest.equals('foo')); 434 unittest.expect(o["y"], unittest.equals('foo'));
429 } 435 }
430 436
431 core.int buildCounterFileCapabilities = 0; 437 core.int buildCounterFileCapabilities = 0;
432 buildFileCapabilities() { 438 buildFileCapabilities() {
433 var o = new api.FileCapabilities(); 439 var o = new api.FileCapabilities();
434 buildCounterFileCapabilities++; 440 buildCounterFileCapabilities++;
435 if (buildCounterFileCapabilities < 3) { 441 if (buildCounterFileCapabilities < 3) {
442 o.canAddChildren = true;
436 o.canComment = true; 443 o.canComment = true;
437 o.canCopy = true; 444 o.canCopy = true;
445 o.canDelete = true;
446 o.canDownload = true;
438 o.canEdit = true; 447 o.canEdit = true;
448 o.canListChildren = true;
449 o.canMoveItemIntoTeamDrive = true;
450 o.canMoveTeamDriveItem = true;
439 o.canReadRevisions = true; 451 o.canReadRevisions = true;
452 o.canReadTeamDrive = true;
453 o.canRemoveChildren = true;
454 o.canRename = true;
440 o.canShare = true; 455 o.canShare = true;
456 o.canTrash = true;
457 o.canUntrash = true;
441 } 458 }
442 buildCounterFileCapabilities--; 459 buildCounterFileCapabilities--;
443 return o; 460 return o;
444 } 461 }
445 462
446 checkFileCapabilities(api.FileCapabilities o) { 463 checkFileCapabilities(api.FileCapabilities o) {
447 buildCounterFileCapabilities++; 464 buildCounterFileCapabilities++;
448 if (buildCounterFileCapabilities < 3) { 465 if (buildCounterFileCapabilities < 3) {
466 unittest.expect(o.canAddChildren, unittest.isTrue);
449 unittest.expect(o.canComment, unittest.isTrue); 467 unittest.expect(o.canComment, unittest.isTrue);
450 unittest.expect(o.canCopy, unittest.isTrue); 468 unittest.expect(o.canCopy, unittest.isTrue);
469 unittest.expect(o.canDelete, unittest.isTrue);
470 unittest.expect(o.canDownload, unittest.isTrue);
451 unittest.expect(o.canEdit, unittest.isTrue); 471 unittest.expect(o.canEdit, unittest.isTrue);
472 unittest.expect(o.canListChildren, unittest.isTrue);
473 unittest.expect(o.canMoveItemIntoTeamDrive, unittest.isTrue);
474 unittest.expect(o.canMoveTeamDriveItem, unittest.isTrue);
452 unittest.expect(o.canReadRevisions, unittest.isTrue); 475 unittest.expect(o.canReadRevisions, unittest.isTrue);
476 unittest.expect(o.canReadTeamDrive, unittest.isTrue);
477 unittest.expect(o.canRemoveChildren, unittest.isTrue);
478 unittest.expect(o.canRename, unittest.isTrue);
453 unittest.expect(o.canShare, unittest.isTrue); 479 unittest.expect(o.canShare, unittest.isTrue);
480 unittest.expect(o.canTrash, unittest.isTrue);
481 unittest.expect(o.canUntrash, unittest.isTrue);
454 } 482 }
455 buildCounterFileCapabilities--; 483 buildCounterFileCapabilities--;
456 } 484 }
457 485
458 core.int buildCounterFileContentHintsThumbnail = 0; 486 core.int buildCounterFileContentHintsThumbnail = 0;
459 buildFileContentHintsThumbnail() { 487 buildFileContentHintsThumbnail() {
460 var o = new api.FileContentHintsThumbnail(); 488 var o = new api.FileContentHintsThumbnail();
461 buildCounterFileContentHintsThumbnail++; 489 buildCounterFileContentHintsThumbnail++;
462 if (buildCounterFileContentHintsThumbnail < 3) { 490 if (buildCounterFileContentHintsThumbnail < 3) {
463 o.image = "foo"; 491 o.image = "foo";
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
572 unittest.expect(o.rotation, unittest.equals(42)); 600 unittest.expect(o.rotation, unittest.equals(42));
573 unittest.expect(o.sensor, unittest.equals('foo')); 601 unittest.expect(o.sensor, unittest.equals('foo'));
574 unittest.expect(o.subjectDistance, unittest.equals(42)); 602 unittest.expect(o.subjectDistance, unittest.equals(42));
575 unittest.expect(o.time, unittest.equals('foo')); 603 unittest.expect(o.time, unittest.equals('foo'));
576 unittest.expect(o.whiteBalance, unittest.equals('foo')); 604 unittest.expect(o.whiteBalance, unittest.equals('foo'));
577 unittest.expect(o.width, unittest.equals(42)); 605 unittest.expect(o.width, unittest.equals(42));
578 } 606 }
579 buildCounterFileImageMediaMetadata--; 607 buildCounterFileImageMediaMetadata--;
580 } 608 }
581 609
582 buildUnnamed1592() { 610 buildUnnamed1357() {
583 var o = new core.List<api.User>(); 611 var o = new core.List<api.User>();
584 o.add(buildUser()); 612 o.add(buildUser());
585 o.add(buildUser()); 613 o.add(buildUser());
586 return o; 614 return o;
587 } 615 }
588 616
589 checkUnnamed1592(core.List<api.User> o) { 617 checkUnnamed1357(core.List<api.User> o) {
590 unittest.expect(o, unittest.hasLength(2)); 618 unittest.expect(o, unittest.hasLength(2));
591 checkUser(o[0]); 619 checkUser(o[0]);
592 checkUser(o[1]); 620 checkUser(o[1]);
593 } 621 }
594 622
595 buildUnnamed1593() { 623 buildUnnamed1358() {
596 var o = new core.List<core.String>(); 624 var o = new core.List<core.String>();
597 o.add("foo"); 625 o.add("foo");
598 o.add("foo"); 626 o.add("foo");
599 return o; 627 return o;
600 } 628 }
601 629
602 checkUnnamed1593(core.List<core.String> o) { 630 checkUnnamed1358(core.List<core.String> o) {
603 unittest.expect(o, unittest.hasLength(2)); 631 unittest.expect(o, unittest.hasLength(2));
604 unittest.expect(o[0], unittest.equals('foo')); 632 unittest.expect(o[0], unittest.equals('foo'));
605 unittest.expect(o[1], unittest.equals('foo')); 633 unittest.expect(o[1], unittest.equals('foo'));
606 } 634 }
607 635
608 buildUnnamed1594() { 636 buildUnnamed1359() {
609 var o = new core.List<api.Permission>(); 637 var o = new core.List<api.Permission>();
610 o.add(buildPermission()); 638 o.add(buildPermission());
611 o.add(buildPermission()); 639 o.add(buildPermission());
612 return o; 640 return o;
613 } 641 }
614 642
615 checkUnnamed1594(core.List<api.Permission> o) { 643 checkUnnamed1359(core.List<api.Permission> o) {
616 unittest.expect(o, unittest.hasLength(2)); 644 unittest.expect(o, unittest.hasLength(2));
617 checkPermission(o[0]); 645 checkPermission(o[0]);
618 checkPermission(o[1]); 646 checkPermission(o[1]);
619 } 647 }
620 648
621 buildUnnamed1595() { 649 buildUnnamed1360() {
622 var o = new core.Map<core.String, core.String>(); 650 var o = new core.Map<core.String, core.String>();
623 o["x"] = "foo"; 651 o["x"] = "foo";
624 o["y"] = "foo"; 652 o["y"] = "foo";
625 return o; 653 return o;
626 } 654 }
627 655
628 checkUnnamed1595(core.Map<core.String, core.String> o) { 656 checkUnnamed1360(core.Map<core.String, core.String> o) {
629 unittest.expect(o, unittest.hasLength(2)); 657 unittest.expect(o, unittest.hasLength(2));
630 unittest.expect(o["x"], unittest.equals('foo')); 658 unittest.expect(o["x"], unittest.equals('foo'));
631 unittest.expect(o["y"], unittest.equals('foo')); 659 unittest.expect(o["y"], unittest.equals('foo'));
632 } 660 }
633 661
634 buildUnnamed1596() { 662 buildUnnamed1361() {
635 var o = new core.List<core.String>(); 663 var o = new core.List<core.String>();
636 o.add("foo"); 664 o.add("foo");
637 o.add("foo"); 665 o.add("foo");
638 return o; 666 return o;
639 } 667 }
640 668
641 checkUnnamed1596(core.List<core.String> o) { 669 checkUnnamed1361(core.List<core.String> o) {
642 unittest.expect(o, unittest.hasLength(2)); 670 unittest.expect(o, unittest.hasLength(2));
643 unittest.expect(o[0], unittest.equals('foo')); 671 unittest.expect(o[0], unittest.equals('foo'));
644 unittest.expect(o[1], unittest.equals('foo')); 672 unittest.expect(o[1], unittest.equals('foo'));
645 } 673 }
646 674
647 core.int buildCounterFileVideoMediaMetadata = 0; 675 core.int buildCounterFileVideoMediaMetadata = 0;
648 buildFileVideoMediaMetadata() { 676 buildFileVideoMediaMetadata() {
649 var o = new api.FileVideoMediaMetadata(); 677 var o = new api.FileVideoMediaMetadata();
650 buildCounterFileVideoMediaMetadata++; 678 buildCounterFileVideoMediaMetadata++;
651 if (buildCounterFileVideoMediaMetadata < 3) { 679 if (buildCounterFileVideoMediaMetadata < 3) {
(...skipping 13 matching lines...) Expand all
665 unittest.expect(o.width, unittest.equals(42)); 693 unittest.expect(o.width, unittest.equals(42));
666 } 694 }
667 buildCounterFileVideoMediaMetadata--; 695 buildCounterFileVideoMediaMetadata--;
668 } 696 }
669 697
670 core.int buildCounterFile = 0; 698 core.int buildCounterFile = 0;
671 buildFile() { 699 buildFile() {
672 var o = new api.File(); 700 var o = new api.File();
673 buildCounterFile++; 701 buildCounterFile++;
674 if (buildCounterFile < 3) { 702 if (buildCounterFile < 3) {
675 o.appProperties = buildUnnamed1591(); 703 o.appProperties = buildUnnamed1356();
676 o.capabilities = buildFileCapabilities(); 704 o.capabilities = buildFileCapabilities();
677 o.contentHints = buildFileContentHints(); 705 o.contentHints = buildFileContentHints();
678 o.createdTime = core.DateTime.parse("2002-02-27T14:01:02"); 706 o.createdTime = core.DateTime.parse("2002-02-27T14:01:02");
679 o.description = "foo"; 707 o.description = "foo";
680 o.explicitlyTrashed = true; 708 o.explicitlyTrashed = true;
681 o.fileExtension = "foo"; 709 o.fileExtension = "foo";
682 o.folderColorRgb = "foo"; 710 o.folderColorRgb = "foo";
683 o.fullFileExtension = "foo"; 711 o.fullFileExtension = "foo";
712 o.hasAugmentedPermissions = true;
684 o.hasThumbnail = true; 713 o.hasThumbnail = true;
685 o.headRevisionId = "foo"; 714 o.headRevisionId = "foo";
686 o.iconLink = "foo"; 715 o.iconLink = "foo";
687 o.id = "foo"; 716 o.id = "foo";
688 o.imageMediaMetadata = buildFileImageMediaMetadata(); 717 o.imageMediaMetadata = buildFileImageMediaMetadata();
689 o.isAppAuthorized = true; 718 o.isAppAuthorized = true;
690 o.kind = "foo"; 719 o.kind = "foo";
691 o.lastModifyingUser = buildUser(); 720 o.lastModifyingUser = buildUser();
692 o.md5Checksum = "foo"; 721 o.md5Checksum = "foo";
693 o.mimeType = "foo"; 722 o.mimeType = "foo";
694 o.modifiedByMe = true; 723 o.modifiedByMe = true;
695 o.modifiedByMeTime = core.DateTime.parse("2002-02-27T14:01:02"); 724 o.modifiedByMeTime = core.DateTime.parse("2002-02-27T14:01:02");
696 o.modifiedTime = core.DateTime.parse("2002-02-27T14:01:02"); 725 o.modifiedTime = core.DateTime.parse("2002-02-27T14:01:02");
697 o.name = "foo"; 726 o.name = "foo";
698 o.originalFilename = "foo"; 727 o.originalFilename = "foo";
699 o.ownedByMe = true; 728 o.ownedByMe = true;
700 o.owners = buildUnnamed1592(); 729 o.owners = buildUnnamed1357();
701 o.parents = buildUnnamed1593(); 730 o.parents = buildUnnamed1358();
702 o.permissions = buildUnnamed1594(); 731 o.permissions = buildUnnamed1359();
703 o.properties = buildUnnamed1595(); 732 o.properties = buildUnnamed1360();
704 o.quotaBytesUsed = "foo"; 733 o.quotaBytesUsed = "foo";
705 o.shared = true; 734 o.shared = true;
706 o.sharedWithMeTime = core.DateTime.parse("2002-02-27T14:01:02"); 735 o.sharedWithMeTime = core.DateTime.parse("2002-02-27T14:01:02");
707 o.sharingUser = buildUser(); 736 o.sharingUser = buildUser();
708 o.size = "foo"; 737 o.size = "foo";
709 o.spaces = buildUnnamed1596(); 738 o.spaces = buildUnnamed1361();
710 o.starred = true; 739 o.starred = true;
740 o.teamDriveId = "foo";
711 o.thumbnailLink = "foo"; 741 o.thumbnailLink = "foo";
712 o.thumbnailVersion = "foo"; 742 o.thumbnailVersion = "foo";
713 o.trashed = true; 743 o.trashed = true;
744 o.trashedTime = core.DateTime.parse("2002-02-27T14:01:02");
745 o.trashingUser = buildUser();
714 o.version = "foo"; 746 o.version = "foo";
715 o.videoMediaMetadata = buildFileVideoMediaMetadata(); 747 o.videoMediaMetadata = buildFileVideoMediaMetadata();
716 o.viewedByMe = true; 748 o.viewedByMe = true;
717 o.viewedByMeTime = core.DateTime.parse("2002-02-27T14:01:02"); 749 o.viewedByMeTime = core.DateTime.parse("2002-02-27T14:01:02");
718 o.viewersCanCopyContent = true; 750 o.viewersCanCopyContent = true;
719 o.webContentLink = "foo"; 751 o.webContentLink = "foo";
720 o.webViewLink = "foo"; 752 o.webViewLink = "foo";
721 o.writersCanShare = true; 753 o.writersCanShare = true;
722 } 754 }
723 buildCounterFile--; 755 buildCounterFile--;
724 return o; 756 return o;
725 } 757 }
726 758
727 checkFile(api.File o) { 759 checkFile(api.File o) {
728 buildCounterFile++; 760 buildCounterFile++;
729 if (buildCounterFile < 3) { 761 if (buildCounterFile < 3) {
730 checkUnnamed1591(o.appProperties); 762 checkUnnamed1356(o.appProperties);
731 checkFileCapabilities(o.capabilities); 763 checkFileCapabilities(o.capabilities);
732 checkFileContentHints(o.contentHints); 764 checkFileContentHints(o.contentHints);
733 unittest.expect(o.createdTime, unittest.equals(core.DateTime.parse("2002-02- 27T14:01:02"))); 765 unittest.expect(o.createdTime, unittest.equals(core.DateTime.parse("2002-02- 27T14:01:02")));
734 unittest.expect(o.description, unittest.equals('foo')); 766 unittest.expect(o.description, unittest.equals('foo'));
735 unittest.expect(o.explicitlyTrashed, unittest.isTrue); 767 unittest.expect(o.explicitlyTrashed, unittest.isTrue);
736 unittest.expect(o.fileExtension, unittest.equals('foo')); 768 unittest.expect(o.fileExtension, unittest.equals('foo'));
737 unittest.expect(o.folderColorRgb, unittest.equals('foo')); 769 unittest.expect(o.folderColorRgb, unittest.equals('foo'));
738 unittest.expect(o.fullFileExtension, unittest.equals('foo')); 770 unittest.expect(o.fullFileExtension, unittest.equals('foo'));
771 unittest.expect(o.hasAugmentedPermissions, unittest.isTrue);
739 unittest.expect(o.hasThumbnail, unittest.isTrue); 772 unittest.expect(o.hasThumbnail, unittest.isTrue);
740 unittest.expect(o.headRevisionId, unittest.equals('foo')); 773 unittest.expect(o.headRevisionId, unittest.equals('foo'));
741 unittest.expect(o.iconLink, unittest.equals('foo')); 774 unittest.expect(o.iconLink, unittest.equals('foo'));
742 unittest.expect(o.id, unittest.equals('foo')); 775 unittest.expect(o.id, unittest.equals('foo'));
743 checkFileImageMediaMetadata(o.imageMediaMetadata); 776 checkFileImageMediaMetadata(o.imageMediaMetadata);
744 unittest.expect(o.isAppAuthorized, unittest.isTrue); 777 unittest.expect(o.isAppAuthorized, unittest.isTrue);
745 unittest.expect(o.kind, unittest.equals('foo')); 778 unittest.expect(o.kind, unittest.equals('foo'));
746 checkUser(o.lastModifyingUser); 779 checkUser(o.lastModifyingUser);
747 unittest.expect(o.md5Checksum, unittest.equals('foo')); 780 unittest.expect(o.md5Checksum, unittest.equals('foo'));
748 unittest.expect(o.mimeType, unittest.equals('foo')); 781 unittest.expect(o.mimeType, unittest.equals('foo'));
749 unittest.expect(o.modifiedByMe, unittest.isTrue); 782 unittest.expect(o.modifiedByMe, unittest.isTrue);
750 unittest.expect(o.modifiedByMeTime, unittest.equals(core.DateTime.parse("200 2-02-27T14:01:02"))); 783 unittest.expect(o.modifiedByMeTime, unittest.equals(core.DateTime.parse("200 2-02-27T14:01:02")));
751 unittest.expect(o.modifiedTime, unittest.equals(core.DateTime.parse("2002-02 -27T14:01:02"))); 784 unittest.expect(o.modifiedTime, unittest.equals(core.DateTime.parse("2002-02 -27T14:01:02")));
752 unittest.expect(o.name, unittest.equals('foo')); 785 unittest.expect(o.name, unittest.equals('foo'));
753 unittest.expect(o.originalFilename, unittest.equals('foo')); 786 unittest.expect(o.originalFilename, unittest.equals('foo'));
754 unittest.expect(o.ownedByMe, unittest.isTrue); 787 unittest.expect(o.ownedByMe, unittest.isTrue);
755 checkUnnamed1592(o.owners); 788 checkUnnamed1357(o.owners);
756 checkUnnamed1593(o.parents); 789 checkUnnamed1358(o.parents);
757 checkUnnamed1594(o.permissions); 790 checkUnnamed1359(o.permissions);
758 checkUnnamed1595(o.properties); 791 checkUnnamed1360(o.properties);
759 unittest.expect(o.quotaBytesUsed, unittest.equals('foo')); 792 unittest.expect(o.quotaBytesUsed, unittest.equals('foo'));
760 unittest.expect(o.shared, unittest.isTrue); 793 unittest.expect(o.shared, unittest.isTrue);
761 unittest.expect(o.sharedWithMeTime, unittest.equals(core.DateTime.parse("200 2-02-27T14:01:02"))); 794 unittest.expect(o.sharedWithMeTime, unittest.equals(core.DateTime.parse("200 2-02-27T14:01:02")));
762 checkUser(o.sharingUser); 795 checkUser(o.sharingUser);
763 unittest.expect(o.size, unittest.equals('foo')); 796 unittest.expect(o.size, unittest.equals('foo'));
764 checkUnnamed1596(o.spaces); 797 checkUnnamed1361(o.spaces);
765 unittest.expect(o.starred, unittest.isTrue); 798 unittest.expect(o.starred, unittest.isTrue);
799 unittest.expect(o.teamDriveId, unittest.equals('foo'));
766 unittest.expect(o.thumbnailLink, unittest.equals('foo')); 800 unittest.expect(o.thumbnailLink, unittest.equals('foo'));
767 unittest.expect(o.thumbnailVersion, unittest.equals('foo')); 801 unittest.expect(o.thumbnailVersion, unittest.equals('foo'));
768 unittest.expect(o.trashed, unittest.isTrue); 802 unittest.expect(o.trashed, unittest.isTrue);
803 unittest.expect(o.trashedTime, unittest.equals(core.DateTime.parse("2002-02- 27T14:01:02")));
804 checkUser(o.trashingUser);
769 unittest.expect(o.version, unittest.equals('foo')); 805 unittest.expect(o.version, unittest.equals('foo'));
770 checkFileVideoMediaMetadata(o.videoMediaMetadata); 806 checkFileVideoMediaMetadata(o.videoMediaMetadata);
771 unittest.expect(o.viewedByMe, unittest.isTrue); 807 unittest.expect(o.viewedByMe, unittest.isTrue);
772 unittest.expect(o.viewedByMeTime, unittest.equals(core.DateTime.parse("2002- 02-27T14:01:02"))); 808 unittest.expect(o.viewedByMeTime, unittest.equals(core.DateTime.parse("2002- 02-27T14:01:02")));
773 unittest.expect(o.viewersCanCopyContent, unittest.isTrue); 809 unittest.expect(o.viewersCanCopyContent, unittest.isTrue);
774 unittest.expect(o.webContentLink, unittest.equals('foo')); 810 unittest.expect(o.webContentLink, unittest.equals('foo'));
775 unittest.expect(o.webViewLink, unittest.equals('foo')); 811 unittest.expect(o.webViewLink, unittest.equals('foo'));
776 unittest.expect(o.writersCanShare, unittest.isTrue); 812 unittest.expect(o.writersCanShare, unittest.isTrue);
777 } 813 }
778 buildCounterFile--; 814 buildCounterFile--;
779 } 815 }
780 816
781 buildUnnamed1597() { 817 buildUnnamed1362() {
782 var o = new core.List<api.File>(); 818 var o = new core.List<api.File>();
783 o.add(buildFile()); 819 o.add(buildFile());
784 o.add(buildFile()); 820 o.add(buildFile());
785 return o; 821 return o;
786 } 822 }
787 823
788 checkUnnamed1597(core.List<api.File> o) { 824 checkUnnamed1362(core.List<api.File> o) {
789 unittest.expect(o, unittest.hasLength(2)); 825 unittest.expect(o, unittest.hasLength(2));
790 checkFile(o[0]); 826 checkFile(o[0]);
791 checkFile(o[1]); 827 checkFile(o[1]);
792 } 828 }
793 829
794 core.int buildCounterFileList = 0; 830 core.int buildCounterFileList = 0;
795 buildFileList() { 831 buildFileList() {
796 var o = new api.FileList(); 832 var o = new api.FileList();
797 buildCounterFileList++; 833 buildCounterFileList++;
798 if (buildCounterFileList < 3) { 834 if (buildCounterFileList < 3) {
799 o.files = buildUnnamed1597(); 835 o.files = buildUnnamed1362();
836 o.incompleteSearch = true;
800 o.kind = "foo"; 837 o.kind = "foo";
801 o.nextPageToken = "foo"; 838 o.nextPageToken = "foo";
802 } 839 }
803 buildCounterFileList--; 840 buildCounterFileList--;
804 return o; 841 return o;
805 } 842 }
806 843
807 checkFileList(api.FileList o) { 844 checkFileList(api.FileList o) {
808 buildCounterFileList++; 845 buildCounterFileList++;
809 if (buildCounterFileList < 3) { 846 if (buildCounterFileList < 3) {
810 checkUnnamed1597(o.files); 847 checkUnnamed1362(o.files);
848 unittest.expect(o.incompleteSearch, unittest.isTrue);
811 unittest.expect(o.kind, unittest.equals('foo')); 849 unittest.expect(o.kind, unittest.equals('foo'));
812 unittest.expect(o.nextPageToken, unittest.equals('foo')); 850 unittest.expect(o.nextPageToken, unittest.equals('foo'));
813 } 851 }
814 buildCounterFileList--; 852 buildCounterFileList--;
815 } 853 }
816 854
817 buildUnnamed1598() { 855 buildUnnamed1363() {
818 var o = new core.List<core.String>(); 856 var o = new core.List<core.String>();
819 o.add("foo"); 857 o.add("foo");
820 o.add("foo"); 858 o.add("foo");
821 return o; 859 return o;
822 } 860 }
823 861
824 checkUnnamed1598(core.List<core.String> o) { 862 checkUnnamed1363(core.List<core.String> o) {
825 unittest.expect(o, unittest.hasLength(2)); 863 unittest.expect(o, unittest.hasLength(2));
826 unittest.expect(o[0], unittest.equals('foo')); 864 unittest.expect(o[0], unittest.equals('foo'));
827 unittest.expect(o[1], unittest.equals('foo')); 865 unittest.expect(o[1], unittest.equals('foo'));
828 } 866 }
829 867
830 core.int buildCounterGeneratedIds = 0; 868 core.int buildCounterGeneratedIds = 0;
831 buildGeneratedIds() { 869 buildGeneratedIds() {
832 var o = new api.GeneratedIds(); 870 var o = new api.GeneratedIds();
833 buildCounterGeneratedIds++; 871 buildCounterGeneratedIds++;
834 if (buildCounterGeneratedIds < 3) { 872 if (buildCounterGeneratedIds < 3) {
835 o.ids = buildUnnamed1598(); 873 o.ids = buildUnnamed1363();
836 o.kind = "foo"; 874 o.kind = "foo";
837 o.space = "foo"; 875 o.space = "foo";
838 } 876 }
839 buildCounterGeneratedIds--; 877 buildCounterGeneratedIds--;
840 return o; 878 return o;
841 } 879 }
842 880
843 checkGeneratedIds(api.GeneratedIds o) { 881 checkGeneratedIds(api.GeneratedIds o) {
844 buildCounterGeneratedIds++; 882 buildCounterGeneratedIds++;
845 if (buildCounterGeneratedIds < 3) { 883 if (buildCounterGeneratedIds < 3) {
846 checkUnnamed1598(o.ids); 884 checkUnnamed1363(o.ids);
847 unittest.expect(o.kind, unittest.equals('foo')); 885 unittest.expect(o.kind, unittest.equals('foo'));
848 unittest.expect(o.space, unittest.equals('foo')); 886 unittest.expect(o.space, unittest.equals('foo'));
849 } 887 }
850 buildCounterGeneratedIds--; 888 buildCounterGeneratedIds--;
851 } 889 }
852 890
891 core.int buildCounterPermissionTeamDrivePermissionDetails = 0;
892 buildPermissionTeamDrivePermissionDetails() {
893 var o = new api.PermissionTeamDrivePermissionDetails();
894 buildCounterPermissionTeamDrivePermissionDetails++;
895 if (buildCounterPermissionTeamDrivePermissionDetails < 3) {
896 o.inherited = true;
897 o.inheritedFrom = "foo";
898 o.role = "foo";
899 o.teamDrivePermissionType = "foo";
900 }
901 buildCounterPermissionTeamDrivePermissionDetails--;
902 return o;
903 }
904
905 checkPermissionTeamDrivePermissionDetails(api.PermissionTeamDrivePermissionDetai ls o) {
906 buildCounterPermissionTeamDrivePermissionDetails++;
907 if (buildCounterPermissionTeamDrivePermissionDetails < 3) {
908 unittest.expect(o.inherited, unittest.isTrue);
909 unittest.expect(o.inheritedFrom, unittest.equals('foo'));
910 unittest.expect(o.role, unittest.equals('foo'));
911 unittest.expect(o.teamDrivePermissionType, unittest.equals('foo'));
912 }
913 buildCounterPermissionTeamDrivePermissionDetails--;
914 }
915
916 buildUnnamed1364() {
917 var o = new core.List<api.PermissionTeamDrivePermissionDetails>();
918 o.add(buildPermissionTeamDrivePermissionDetails());
919 o.add(buildPermissionTeamDrivePermissionDetails());
920 return o;
921 }
922
923 checkUnnamed1364(core.List<api.PermissionTeamDrivePermissionDetails> o) {
924 unittest.expect(o, unittest.hasLength(2));
925 checkPermissionTeamDrivePermissionDetails(o[0]);
926 checkPermissionTeamDrivePermissionDetails(o[1]);
927 }
928
853 core.int buildCounterPermission = 0; 929 core.int buildCounterPermission = 0;
854 buildPermission() { 930 buildPermission() {
855 var o = new api.Permission(); 931 var o = new api.Permission();
856 buildCounterPermission++; 932 buildCounterPermission++;
857 if (buildCounterPermission < 3) { 933 if (buildCounterPermission < 3) {
858 o.allowFileDiscovery = true; 934 o.allowFileDiscovery = true;
859 o.displayName = "foo"; 935 o.displayName = "foo";
860 o.domain = "foo"; 936 o.domain = "foo";
861 o.emailAddress = "foo"; 937 o.emailAddress = "foo";
862 o.expirationTime = core.DateTime.parse("2002-02-27T14:01:02"); 938 o.expirationTime = core.DateTime.parse("2002-02-27T14:01:02");
863 o.id = "foo"; 939 o.id = "foo";
864 o.kind = "foo"; 940 o.kind = "foo";
865 o.photoLink = "foo"; 941 o.photoLink = "foo";
866 o.role = "foo"; 942 o.role = "foo";
943 o.teamDrivePermissionDetails = buildUnnamed1364();
867 o.type = "foo"; 944 o.type = "foo";
868 } 945 }
869 buildCounterPermission--; 946 buildCounterPermission--;
870 return o; 947 return o;
871 } 948 }
872 949
873 checkPermission(api.Permission o) { 950 checkPermission(api.Permission o) {
874 buildCounterPermission++; 951 buildCounterPermission++;
875 if (buildCounterPermission < 3) { 952 if (buildCounterPermission < 3) {
876 unittest.expect(o.allowFileDiscovery, unittest.isTrue); 953 unittest.expect(o.allowFileDiscovery, unittest.isTrue);
877 unittest.expect(o.displayName, unittest.equals('foo')); 954 unittest.expect(o.displayName, unittest.equals('foo'));
878 unittest.expect(o.domain, unittest.equals('foo')); 955 unittest.expect(o.domain, unittest.equals('foo'));
879 unittest.expect(o.emailAddress, unittest.equals('foo')); 956 unittest.expect(o.emailAddress, unittest.equals('foo'));
880 unittest.expect(o.expirationTime, unittest.equals(core.DateTime.parse("2002- 02-27T14:01:02"))); 957 unittest.expect(o.expirationTime, unittest.equals(core.DateTime.parse("2002- 02-27T14:01:02")));
881 unittest.expect(o.id, unittest.equals('foo')); 958 unittest.expect(o.id, unittest.equals('foo'));
882 unittest.expect(o.kind, unittest.equals('foo')); 959 unittest.expect(o.kind, unittest.equals('foo'));
883 unittest.expect(o.photoLink, unittest.equals('foo')); 960 unittest.expect(o.photoLink, unittest.equals('foo'));
884 unittest.expect(o.role, unittest.equals('foo')); 961 unittest.expect(o.role, unittest.equals('foo'));
962 checkUnnamed1364(o.teamDrivePermissionDetails);
885 unittest.expect(o.type, unittest.equals('foo')); 963 unittest.expect(o.type, unittest.equals('foo'));
886 } 964 }
887 buildCounterPermission--; 965 buildCounterPermission--;
888 } 966 }
889 967
890 buildUnnamed1599() { 968 buildUnnamed1365() {
891 var o = new core.List<api.Permission>(); 969 var o = new core.List<api.Permission>();
892 o.add(buildPermission()); 970 o.add(buildPermission());
893 o.add(buildPermission()); 971 o.add(buildPermission());
894 return o; 972 return o;
895 } 973 }
896 974
897 checkUnnamed1599(core.List<api.Permission> o) { 975 checkUnnamed1365(core.List<api.Permission> o) {
898 unittest.expect(o, unittest.hasLength(2)); 976 unittest.expect(o, unittest.hasLength(2));
899 checkPermission(o[0]); 977 checkPermission(o[0]);
900 checkPermission(o[1]); 978 checkPermission(o[1]);
901 } 979 }
902 980
903 core.int buildCounterPermissionList = 0; 981 core.int buildCounterPermissionList = 0;
904 buildPermissionList() { 982 buildPermissionList() {
905 var o = new api.PermissionList(); 983 var o = new api.PermissionList();
906 buildCounterPermissionList++; 984 buildCounterPermissionList++;
907 if (buildCounterPermissionList < 3) { 985 if (buildCounterPermissionList < 3) {
908 o.kind = "foo"; 986 o.kind = "foo";
909 o.permissions = buildUnnamed1599(); 987 o.nextPageToken = "foo";
988 o.permissions = buildUnnamed1365();
910 } 989 }
911 buildCounterPermissionList--; 990 buildCounterPermissionList--;
912 return o; 991 return o;
913 } 992 }
914 993
915 checkPermissionList(api.PermissionList o) { 994 checkPermissionList(api.PermissionList o) {
916 buildCounterPermissionList++; 995 buildCounterPermissionList++;
917 if (buildCounterPermissionList < 3) { 996 if (buildCounterPermissionList < 3) {
918 unittest.expect(o.kind, unittest.equals('foo')); 997 unittest.expect(o.kind, unittest.equals('foo'));
919 checkUnnamed1599(o.permissions); 998 unittest.expect(o.nextPageToken, unittest.equals('foo'));
999 checkUnnamed1365(o.permissions);
920 } 1000 }
921 buildCounterPermissionList--; 1001 buildCounterPermissionList--;
922 } 1002 }
923 1003
924 core.int buildCounterReply = 0; 1004 core.int buildCounterReply = 0;
925 buildReply() { 1005 buildReply() {
926 var o = new api.Reply(); 1006 var o = new api.Reply();
927 buildCounterReply++; 1007 buildCounterReply++;
928 if (buildCounterReply < 3) { 1008 if (buildCounterReply < 3) {
929 o.action = "foo"; 1009 o.action = "foo";
(...skipping 19 matching lines...) Expand all
949 unittest.expect(o.createdTime, unittest.equals(core.DateTime.parse("2002-02- 27T14:01:02"))); 1029 unittest.expect(o.createdTime, unittest.equals(core.DateTime.parse("2002-02- 27T14:01:02")));
950 unittest.expect(o.deleted, unittest.isTrue); 1030 unittest.expect(o.deleted, unittest.isTrue);
951 unittest.expect(o.htmlContent, unittest.equals('foo')); 1031 unittest.expect(o.htmlContent, unittest.equals('foo'));
952 unittest.expect(o.id, unittest.equals('foo')); 1032 unittest.expect(o.id, unittest.equals('foo'));
953 unittest.expect(o.kind, unittest.equals('foo')); 1033 unittest.expect(o.kind, unittest.equals('foo'));
954 unittest.expect(o.modifiedTime, unittest.equals(core.DateTime.parse("2002-02 -27T14:01:02"))); 1034 unittest.expect(o.modifiedTime, unittest.equals(core.DateTime.parse("2002-02 -27T14:01:02")));
955 } 1035 }
956 buildCounterReply--; 1036 buildCounterReply--;
957 } 1037 }
958 1038
959 buildUnnamed1600() { 1039 buildUnnamed1366() {
960 var o = new core.List<api.Reply>(); 1040 var o = new core.List<api.Reply>();
961 o.add(buildReply()); 1041 o.add(buildReply());
962 o.add(buildReply()); 1042 o.add(buildReply());
963 return o; 1043 return o;
964 } 1044 }
965 1045
966 checkUnnamed1600(core.List<api.Reply> o) { 1046 checkUnnamed1366(core.List<api.Reply> o) {
967 unittest.expect(o, unittest.hasLength(2)); 1047 unittest.expect(o, unittest.hasLength(2));
968 checkReply(o[0]); 1048 checkReply(o[0]);
969 checkReply(o[1]); 1049 checkReply(o[1]);
970 } 1050 }
971 1051
972 core.int buildCounterReplyList = 0; 1052 core.int buildCounterReplyList = 0;
973 buildReplyList() { 1053 buildReplyList() {
974 var o = new api.ReplyList(); 1054 var o = new api.ReplyList();
975 buildCounterReplyList++; 1055 buildCounterReplyList++;
976 if (buildCounterReplyList < 3) { 1056 if (buildCounterReplyList < 3) {
977 o.kind = "foo"; 1057 o.kind = "foo";
978 o.nextPageToken = "foo"; 1058 o.nextPageToken = "foo";
979 o.replies = buildUnnamed1600(); 1059 o.replies = buildUnnamed1366();
980 } 1060 }
981 buildCounterReplyList--; 1061 buildCounterReplyList--;
982 return o; 1062 return o;
983 } 1063 }
984 1064
985 checkReplyList(api.ReplyList o) { 1065 checkReplyList(api.ReplyList o) {
986 buildCounterReplyList++; 1066 buildCounterReplyList++;
987 if (buildCounterReplyList < 3) { 1067 if (buildCounterReplyList < 3) {
988 unittest.expect(o.kind, unittest.equals('foo')); 1068 unittest.expect(o.kind, unittest.equals('foo'));
989 unittest.expect(o.nextPageToken, unittest.equals('foo')); 1069 unittest.expect(o.nextPageToken, unittest.equals('foo'));
990 checkUnnamed1600(o.replies); 1070 checkUnnamed1366(o.replies);
991 } 1071 }
992 buildCounterReplyList--; 1072 buildCounterReplyList--;
993 } 1073 }
994 1074
995 core.int buildCounterRevision = 0; 1075 core.int buildCounterRevision = 0;
996 buildRevision() { 1076 buildRevision() {
997 var o = new api.Revision(); 1077 var o = new api.Revision();
998 buildCounterRevision++; 1078 buildCounterRevision++;
999 if (buildCounterRevision < 3) { 1079 if (buildCounterRevision < 3) {
1000 o.id = "foo"; 1080 o.id = "foo";
(...skipping 25 matching lines...) Expand all
1026 unittest.expect(o.modifiedTime, unittest.equals(core.DateTime.parse("2002-02 -27T14:01:02"))); 1106 unittest.expect(o.modifiedTime, unittest.equals(core.DateTime.parse("2002-02 -27T14:01:02")));
1027 unittest.expect(o.originalFilename, unittest.equals('foo')); 1107 unittest.expect(o.originalFilename, unittest.equals('foo'));
1028 unittest.expect(o.publishAuto, unittest.isTrue); 1108 unittest.expect(o.publishAuto, unittest.isTrue);
1029 unittest.expect(o.published, unittest.isTrue); 1109 unittest.expect(o.published, unittest.isTrue);
1030 unittest.expect(o.publishedOutsideDomain, unittest.isTrue); 1110 unittest.expect(o.publishedOutsideDomain, unittest.isTrue);
1031 unittest.expect(o.size, unittest.equals('foo')); 1111 unittest.expect(o.size, unittest.equals('foo'));
1032 } 1112 }
1033 buildCounterRevision--; 1113 buildCounterRevision--;
1034 } 1114 }
1035 1115
1036 buildUnnamed1601() { 1116 buildUnnamed1367() {
1037 var o = new core.List<api.Revision>(); 1117 var o = new core.List<api.Revision>();
1038 o.add(buildRevision()); 1118 o.add(buildRevision());
1039 o.add(buildRevision()); 1119 o.add(buildRevision());
1040 return o; 1120 return o;
1041 } 1121 }
1042 1122
1043 checkUnnamed1601(core.List<api.Revision> o) { 1123 checkUnnamed1367(core.List<api.Revision> o) {
1044 unittest.expect(o, unittest.hasLength(2)); 1124 unittest.expect(o, unittest.hasLength(2));
1045 checkRevision(o[0]); 1125 checkRevision(o[0]);
1046 checkRevision(o[1]); 1126 checkRevision(o[1]);
1047 } 1127 }
1048 1128
1049 core.int buildCounterRevisionList = 0; 1129 core.int buildCounterRevisionList = 0;
1050 buildRevisionList() { 1130 buildRevisionList() {
1051 var o = new api.RevisionList(); 1131 var o = new api.RevisionList();
1052 buildCounterRevisionList++; 1132 buildCounterRevisionList++;
1053 if (buildCounterRevisionList < 3) { 1133 if (buildCounterRevisionList < 3) {
1054 o.kind = "foo"; 1134 o.kind = "foo";
1055 o.nextPageToken = "foo"; 1135 o.nextPageToken = "foo";
1056 o.revisions = buildUnnamed1601(); 1136 o.revisions = buildUnnamed1367();
1057 } 1137 }
1058 buildCounterRevisionList--; 1138 buildCounterRevisionList--;
1059 return o; 1139 return o;
1060 } 1140 }
1061 1141
1062 checkRevisionList(api.RevisionList o) { 1142 checkRevisionList(api.RevisionList o) {
1063 buildCounterRevisionList++; 1143 buildCounterRevisionList++;
1064 if (buildCounterRevisionList < 3) { 1144 if (buildCounterRevisionList < 3) {
1065 unittest.expect(o.kind, unittest.equals('foo')); 1145 unittest.expect(o.kind, unittest.equals('foo'));
1066 unittest.expect(o.nextPageToken, unittest.equals('foo')); 1146 unittest.expect(o.nextPageToken, unittest.equals('foo'));
1067 checkUnnamed1601(o.revisions); 1147 checkUnnamed1367(o.revisions);
1068 } 1148 }
1069 buildCounterRevisionList--; 1149 buildCounterRevisionList--;
1070 } 1150 }
1071 1151
1072 core.int buildCounterStartPageToken = 0; 1152 core.int buildCounterStartPageToken = 0;
1073 buildStartPageToken() { 1153 buildStartPageToken() {
1074 var o = new api.StartPageToken(); 1154 var o = new api.StartPageToken();
1075 buildCounterStartPageToken++; 1155 buildCounterStartPageToken++;
1076 if (buildCounterStartPageToken < 3) { 1156 if (buildCounterStartPageToken < 3) {
1077 o.kind = "foo"; 1157 o.kind = "foo";
1078 o.startPageToken = "foo"; 1158 o.startPageToken = "foo";
1079 } 1159 }
1080 buildCounterStartPageToken--; 1160 buildCounterStartPageToken--;
1081 return o; 1161 return o;
1082 } 1162 }
1083 1163
1084 checkStartPageToken(api.StartPageToken o) { 1164 checkStartPageToken(api.StartPageToken o) {
1085 buildCounterStartPageToken++; 1165 buildCounterStartPageToken++;
1086 if (buildCounterStartPageToken < 3) { 1166 if (buildCounterStartPageToken < 3) {
1087 unittest.expect(o.kind, unittest.equals('foo')); 1167 unittest.expect(o.kind, unittest.equals('foo'));
1088 unittest.expect(o.startPageToken, unittest.equals('foo')); 1168 unittest.expect(o.startPageToken, unittest.equals('foo'));
1089 } 1169 }
1090 buildCounterStartPageToken--; 1170 buildCounterStartPageToken--;
1091 } 1171 }
1092 1172
1173 core.int buildCounterTeamDriveCapabilities = 0;
1174 buildTeamDriveCapabilities() {
1175 var o = new api.TeamDriveCapabilities();
1176 buildCounterTeamDriveCapabilities++;
1177 if (buildCounterTeamDriveCapabilities < 3) {
1178 o.canAddChildren = true;
1179 o.canComment = true;
1180 o.canCopy = true;
1181 o.canDeleteTeamDrive = true;
1182 o.canDownload = true;
1183 o.canEdit = true;
1184 o.canListChildren = true;
1185 o.canManageMembers = true;
1186 o.canReadRevisions = true;
1187 o.canRemoveChildren = true;
1188 o.canRename = true;
1189 o.canRenameTeamDrive = true;
1190 o.canShare = true;
1191 }
1192 buildCounterTeamDriveCapabilities--;
1193 return o;
1194 }
1195
1196 checkTeamDriveCapabilities(api.TeamDriveCapabilities o) {
1197 buildCounterTeamDriveCapabilities++;
1198 if (buildCounterTeamDriveCapabilities < 3) {
1199 unittest.expect(o.canAddChildren, unittest.isTrue);
1200 unittest.expect(o.canComment, unittest.isTrue);
1201 unittest.expect(o.canCopy, unittest.isTrue);
1202 unittest.expect(o.canDeleteTeamDrive, unittest.isTrue);
1203 unittest.expect(o.canDownload, unittest.isTrue);
1204 unittest.expect(o.canEdit, unittest.isTrue);
1205 unittest.expect(o.canListChildren, unittest.isTrue);
1206 unittest.expect(o.canManageMembers, unittest.isTrue);
1207 unittest.expect(o.canReadRevisions, unittest.isTrue);
1208 unittest.expect(o.canRemoveChildren, unittest.isTrue);
1209 unittest.expect(o.canRename, unittest.isTrue);
1210 unittest.expect(o.canRenameTeamDrive, unittest.isTrue);
1211 unittest.expect(o.canShare, unittest.isTrue);
1212 }
1213 buildCounterTeamDriveCapabilities--;
1214 }
1215
1216 core.int buildCounterTeamDrive = 0;
1217 buildTeamDrive() {
1218 var o = new api.TeamDrive();
1219 buildCounterTeamDrive++;
1220 if (buildCounterTeamDrive < 3) {
1221 o.capabilities = buildTeamDriveCapabilities();
1222 o.id = "foo";
1223 o.kind = "foo";
1224 o.name = "foo";
1225 }
1226 buildCounterTeamDrive--;
1227 return o;
1228 }
1229
1230 checkTeamDrive(api.TeamDrive o) {
1231 buildCounterTeamDrive++;
1232 if (buildCounterTeamDrive < 3) {
1233 checkTeamDriveCapabilities(o.capabilities);
1234 unittest.expect(o.id, unittest.equals('foo'));
1235 unittest.expect(o.kind, unittest.equals('foo'));
1236 unittest.expect(o.name, unittest.equals('foo'));
1237 }
1238 buildCounterTeamDrive--;
1239 }
1240
1241 buildUnnamed1368() {
1242 var o = new core.List<api.TeamDrive>();
1243 o.add(buildTeamDrive());
1244 o.add(buildTeamDrive());
1245 return o;
1246 }
1247
1248 checkUnnamed1368(core.List<api.TeamDrive> o) {
1249 unittest.expect(o, unittest.hasLength(2));
1250 checkTeamDrive(o[0]);
1251 checkTeamDrive(o[1]);
1252 }
1253
1254 core.int buildCounterTeamDriveList = 0;
1255 buildTeamDriveList() {
1256 var o = new api.TeamDriveList();
1257 buildCounterTeamDriveList++;
1258 if (buildCounterTeamDriveList < 3) {
1259 o.kind = "foo";
1260 o.nextPageToken = "foo";
1261 o.teamDrives = buildUnnamed1368();
1262 }
1263 buildCounterTeamDriveList--;
1264 return o;
1265 }
1266
1267 checkTeamDriveList(api.TeamDriveList o) {
1268 buildCounterTeamDriveList++;
1269 if (buildCounterTeamDriveList < 3) {
1270 unittest.expect(o.kind, unittest.equals('foo'));
1271 unittest.expect(o.nextPageToken, unittest.equals('foo'));
1272 checkUnnamed1368(o.teamDrives);
1273 }
1274 buildCounterTeamDriveList--;
1275 }
1276
1093 core.int buildCounterUser = 0; 1277 core.int buildCounterUser = 0;
1094 buildUser() { 1278 buildUser() {
1095 var o = new api.User(); 1279 var o = new api.User();
1096 buildCounterUser++; 1280 buildCounterUser++;
1097 if (buildCounterUser < 3) { 1281 if (buildCounterUser < 3) {
1098 o.displayName = "foo"; 1282 o.displayName = "foo";
1099 o.emailAddress = "foo"; 1283 o.emailAddress = "foo";
1100 o.kind = "foo"; 1284 o.kind = "foo";
1101 o.me = true; 1285 o.me = true;
1102 o.permissionId = "foo"; 1286 o.permissionId = "foo";
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
1267 1451
1268 unittest.group("obj-schema-GeneratedIds", () { 1452 unittest.group("obj-schema-GeneratedIds", () {
1269 unittest.test("to-json--from-json", () { 1453 unittest.test("to-json--from-json", () {
1270 var o = buildGeneratedIds(); 1454 var o = buildGeneratedIds();
1271 var od = new api.GeneratedIds.fromJson(o.toJson()); 1455 var od = new api.GeneratedIds.fromJson(o.toJson());
1272 checkGeneratedIds(od); 1456 checkGeneratedIds(od);
1273 }); 1457 });
1274 }); 1458 });
1275 1459
1276 1460
1461 unittest.group("obj-schema-PermissionTeamDrivePermissionDetails", () {
1462 unittest.test("to-json--from-json", () {
1463 var o = buildPermissionTeamDrivePermissionDetails();
1464 var od = new api.PermissionTeamDrivePermissionDetails.fromJson(o.toJson()) ;
1465 checkPermissionTeamDrivePermissionDetails(od);
1466 });
1467 });
1468
1469
1277 unittest.group("obj-schema-Permission", () { 1470 unittest.group("obj-schema-Permission", () {
1278 unittest.test("to-json--from-json", () { 1471 unittest.test("to-json--from-json", () {
1279 var o = buildPermission(); 1472 var o = buildPermission();
1280 var od = new api.Permission.fromJson(o.toJson()); 1473 var od = new api.Permission.fromJson(o.toJson());
1281 checkPermission(od); 1474 checkPermission(od);
1282 }); 1475 });
1283 }); 1476 });
1284 1477
1285 1478
1286 unittest.group("obj-schema-PermissionList", () { 1479 unittest.group("obj-schema-PermissionList", () {
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
1330 1523
1331 unittest.group("obj-schema-StartPageToken", () { 1524 unittest.group("obj-schema-StartPageToken", () {
1332 unittest.test("to-json--from-json", () { 1525 unittest.test("to-json--from-json", () {
1333 var o = buildStartPageToken(); 1526 var o = buildStartPageToken();
1334 var od = new api.StartPageToken.fromJson(o.toJson()); 1527 var od = new api.StartPageToken.fromJson(o.toJson());
1335 checkStartPageToken(od); 1528 checkStartPageToken(od);
1336 }); 1529 });
1337 }); 1530 });
1338 1531
1339 1532
1533 unittest.group("obj-schema-TeamDriveCapabilities", () {
1534 unittest.test("to-json--from-json", () {
1535 var o = buildTeamDriveCapabilities();
1536 var od = new api.TeamDriveCapabilities.fromJson(o.toJson());
1537 checkTeamDriveCapabilities(od);
1538 });
1539 });
1540
1541
1542 unittest.group("obj-schema-TeamDrive", () {
1543 unittest.test("to-json--from-json", () {
1544 var o = buildTeamDrive();
1545 var od = new api.TeamDrive.fromJson(o.toJson());
1546 checkTeamDrive(od);
1547 });
1548 });
1549
1550
1551 unittest.group("obj-schema-TeamDriveList", () {
1552 unittest.test("to-json--from-json", () {
1553 var o = buildTeamDriveList();
1554 var od = new api.TeamDriveList.fromJson(o.toJson());
1555 checkTeamDriveList(od);
1556 });
1557 });
1558
1559
1340 unittest.group("obj-schema-User", () { 1560 unittest.group("obj-schema-User", () {
1341 unittest.test("to-json--from-json", () { 1561 unittest.test("to-json--from-json", () {
1342 var o = buildUser(); 1562 var o = buildUser();
1343 var od = new api.User.fromJson(o.toJson()); 1563 var od = new api.User.fromJson(o.toJson());
1344 checkUser(od); 1564 checkUser(od);
1345 }); 1565 });
1346 }); 1566 });
1347 1567
1348 1568
1349 unittest.group("resource-AboutResourceApi", () { 1569 unittest.group("resource-AboutResourceApi", () {
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
1393 }); 1613 });
1394 1614
1395 }); 1615 });
1396 1616
1397 1617
1398 unittest.group("resource-ChangesResourceApi", () { 1618 unittest.group("resource-ChangesResourceApi", () {
1399 unittest.test("method--getStartPageToken", () { 1619 unittest.test("method--getStartPageToken", () {
1400 1620
1401 var mock = new HttpServerMock(); 1621 var mock = new HttpServerMock();
1402 api.ChangesResourceApi res = new api.DriveApi(mock).changes; 1622 api.ChangesResourceApi res = new api.DriveApi(mock).changes;
1623 var arg_supportsTeamDrives = true;
1624 var arg_teamDriveId = "foo";
1403 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 1625 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
1404 var path = (req.url).path; 1626 var path = (req.url).path;
1405 var pathOffset = 0; 1627 var pathOffset = 0;
1406 var index; 1628 var index;
1407 var subPart; 1629 var subPart;
1408 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 1630 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
1409 pathOffset += 1; 1631 pathOffset += 1;
1410 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("drive/v3/")); 1632 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("drive/v3/"));
1411 pathOffset += 9; 1633 pathOffset += 9;
1412 unittest.expect(path.substring(pathOffset, pathOffset + 22), unittest.eq uals("changes/startPageToken")); 1634 unittest.expect(path.substring(pathOffset, pathOffset + 22), unittest.eq uals("changes/startPageToken"));
1413 pathOffset += 22; 1635 pathOffset += 22;
1414 1636
1415 var query = (req.url).query; 1637 var query = (req.url).query;
1416 var queryOffset = 0; 1638 var queryOffset = 0;
1417 var queryMap = {}; 1639 var queryMap = {};
1418 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); 1640 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
1419 parseBool(n) { 1641 parseBool(n) {
1420 if (n == "true") return true; 1642 if (n == "true") return true;
1421 if (n == "false") return false; 1643 if (n == "false") return false;
1422 if (n == null) return null; 1644 if (n == null) return null;
1423 throw new core.ArgumentError("Invalid boolean: $n"); 1645 throw new core.ArgumentError("Invalid boolean: $n");
1424 } 1646 }
1425 if (query.length > 0) { 1647 if (query.length > 0) {
1426 for (var part in query.split("&")) { 1648 for (var part in query.split("&")) {
1427 var keyvalue = part.split("="); 1649 var keyvalue = part.split("=");
1428 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1])); 1650 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
1429 } 1651 }
1430 } 1652 }
1653 unittest.expect(queryMap["supportsTeamDrives"].first, unittest.equals("$ arg_supportsTeamDrives"));
1654 unittest.expect(queryMap["teamDriveId"].first, unittest.equals(arg_teamD riveId));
1431 1655
1432 1656
1433 var h = { 1657 var h = {
1434 "content-type" : "application/json; charset=utf-8", 1658 "content-type" : "application/json; charset=utf-8",
1435 }; 1659 };
1436 var resp = convert.JSON.encode(buildStartPageToken()); 1660 var resp = convert.JSON.encode(buildStartPageToken());
1437 return new async.Future.value(stringResponse(200, h, resp)); 1661 return new async.Future.value(stringResponse(200, h, resp));
1438 }), true); 1662 }), true);
1439 res.getStartPageToken().then(unittest.expectAsync(((api.StartPageToken res ponse) { 1663 res.getStartPageToken(supportsTeamDrives: arg_supportsTeamDrives, teamDriv eId: arg_teamDriveId).then(unittest.expectAsync(((api.StartPageToken response) {
1440 checkStartPageToken(response); 1664 checkStartPageToken(response);
1441 }))); 1665 })));
1442 }); 1666 });
1443 1667
1444 unittest.test("method--list", () { 1668 unittest.test("method--list", () {
1445 1669
1446 var mock = new HttpServerMock(); 1670 var mock = new HttpServerMock();
1447 api.ChangesResourceApi res = new api.DriveApi(mock).changes; 1671 api.ChangesResourceApi res = new api.DriveApi(mock).changes;
1448 var arg_pageToken = "foo"; 1672 var arg_pageToken = "foo";
1673 var arg_includeCorpusRemovals = true;
1449 var arg_includeRemoved = true; 1674 var arg_includeRemoved = true;
1675 var arg_includeTeamDriveItems = true;
1450 var arg_pageSize = 42; 1676 var arg_pageSize = 42;
1451 var arg_restrictToMyDrive = true; 1677 var arg_restrictToMyDrive = true;
1452 var arg_spaces = "foo"; 1678 var arg_spaces = "foo";
1679 var arg_supportsTeamDrives = true;
1680 var arg_teamDriveId = "foo";
1453 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 1681 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
1454 var path = (req.url).path; 1682 var path = (req.url).path;
1455 var pathOffset = 0; 1683 var pathOffset = 0;
1456 var index; 1684 var index;
1457 var subPart; 1685 var subPart;
1458 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 1686 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
1459 pathOffset += 1; 1687 pathOffset += 1;
1460 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("drive/v3/")); 1688 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("drive/v3/"));
1461 pathOffset += 9; 1689 pathOffset += 9;
1462 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ als("changes")); 1690 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ als("changes"));
1463 pathOffset += 7; 1691 pathOffset += 7;
1464 1692
1465 var query = (req.url).query; 1693 var query = (req.url).query;
1466 var queryOffset = 0; 1694 var queryOffset = 0;
1467 var queryMap = {}; 1695 var queryMap = {};
1468 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); 1696 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
1469 parseBool(n) { 1697 parseBool(n) {
1470 if (n == "true") return true; 1698 if (n == "true") return true;
1471 if (n == "false") return false; 1699 if (n == "false") return false;
1472 if (n == null) return null; 1700 if (n == null) return null;
1473 throw new core.ArgumentError("Invalid boolean: $n"); 1701 throw new core.ArgumentError("Invalid boolean: $n");
1474 } 1702 }
1475 if (query.length > 0) { 1703 if (query.length > 0) {
1476 for (var part in query.split("&")) { 1704 for (var part in query.split("&")) {
1477 var keyvalue = part.split("="); 1705 var keyvalue = part.split("=");
1478 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1])); 1706 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
1479 } 1707 }
1480 } 1708 }
1481 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en)); 1709 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en));
1710 unittest.expect(queryMap["includeCorpusRemovals"].first, unittest.equals ("$arg_includeCorpusRemovals"));
1482 unittest.expect(queryMap["includeRemoved"].first, unittest.equals("$arg_ includeRemoved")); 1711 unittest.expect(queryMap["includeRemoved"].first, unittest.equals("$arg_ includeRemoved"));
1712 unittest.expect(queryMap["includeTeamDriveItems"].first, unittest.equals ("$arg_includeTeamDriveItems"));
1483 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ als(arg_pageSize)); 1713 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ als(arg_pageSize));
1484 unittest.expect(queryMap["restrictToMyDrive"].first, unittest.equals("$a rg_restrictToMyDrive")); 1714 unittest.expect(queryMap["restrictToMyDrive"].first, unittest.equals("$a rg_restrictToMyDrive"));
1485 unittest.expect(queryMap["spaces"].first, unittest.equals(arg_spaces)); 1715 unittest.expect(queryMap["spaces"].first, unittest.equals(arg_spaces));
1716 unittest.expect(queryMap["supportsTeamDrives"].first, unittest.equals("$ arg_supportsTeamDrives"));
1717 unittest.expect(queryMap["teamDriveId"].first, unittest.equals(arg_teamD riveId));
1486 1718
1487 1719
1488 var h = { 1720 var h = {
1489 "content-type" : "application/json; charset=utf-8", 1721 "content-type" : "application/json; charset=utf-8",
1490 }; 1722 };
1491 var resp = convert.JSON.encode(buildChangeList()); 1723 var resp = convert.JSON.encode(buildChangeList());
1492 return new async.Future.value(stringResponse(200, h, resp)); 1724 return new async.Future.value(stringResponse(200, h, resp));
1493 }), true); 1725 }), true);
1494 res.list(arg_pageToken, includeRemoved: arg_includeRemoved, pageSize: arg_ pageSize, restrictToMyDrive: arg_restrictToMyDrive, spaces: arg_spaces).then(uni ttest.expectAsync(((api.ChangeList response) { 1726 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) {
1495 checkChangeList(response); 1727 checkChangeList(response);
1496 }))); 1728 })));
1497 }); 1729 });
1498 1730
1499 unittest.test("method--watch", () { 1731 unittest.test("method--watch", () {
1500 1732
1501 var mock = new HttpServerMock(); 1733 var mock = new HttpServerMock();
1502 api.ChangesResourceApi res = new api.DriveApi(mock).changes; 1734 api.ChangesResourceApi res = new api.DriveApi(mock).changes;
1503 var arg_request = buildChannel(); 1735 var arg_request = buildChannel();
1504 var arg_pageToken = "foo"; 1736 var arg_pageToken = "foo";
1737 var arg_includeCorpusRemovals = true;
1505 var arg_includeRemoved = true; 1738 var arg_includeRemoved = true;
1739 var arg_includeTeamDriveItems = true;
1506 var arg_pageSize = 42; 1740 var arg_pageSize = 42;
1507 var arg_restrictToMyDrive = true; 1741 var arg_restrictToMyDrive = true;
1508 var arg_spaces = "foo"; 1742 var arg_spaces = "foo";
1743 var arg_supportsTeamDrives = true;
1744 var arg_teamDriveId = "foo";
1509 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 1745 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
1510 var obj = new api.Channel.fromJson(json); 1746 var obj = new api.Channel.fromJson(json);
1511 checkChannel(obj); 1747 checkChannel(obj);
1512 1748
1513 var path = (req.url).path; 1749 var path = (req.url).path;
1514 var pathOffset = 0; 1750 var pathOffset = 0;
1515 var index; 1751 var index;
1516 var subPart; 1752 var subPart;
1517 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 1753 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
1518 pathOffset += 1; 1754 pathOffset += 1;
(...skipping 12 matching lines...) Expand all
1531 if (n == null) return null; 1767 if (n == null) return null;
1532 throw new core.ArgumentError("Invalid boolean: $n"); 1768 throw new core.ArgumentError("Invalid boolean: $n");
1533 } 1769 }
1534 if (query.length > 0) { 1770 if (query.length > 0) {
1535 for (var part in query.split("&")) { 1771 for (var part in query.split("&")) {
1536 var keyvalue = part.split("="); 1772 var keyvalue = part.split("=");
1537 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1])); 1773 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
1538 } 1774 }
1539 } 1775 }
1540 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en)); 1776 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en));
1777 unittest.expect(queryMap["includeCorpusRemovals"].first, unittest.equals ("$arg_includeCorpusRemovals"));
1541 unittest.expect(queryMap["includeRemoved"].first, unittest.equals("$arg_ includeRemoved")); 1778 unittest.expect(queryMap["includeRemoved"].first, unittest.equals("$arg_ includeRemoved"));
1779 unittest.expect(queryMap["includeTeamDriveItems"].first, unittest.equals ("$arg_includeTeamDriveItems"));
1542 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ als(arg_pageSize)); 1780 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ als(arg_pageSize));
1543 unittest.expect(queryMap["restrictToMyDrive"].first, unittest.equals("$a rg_restrictToMyDrive")); 1781 unittest.expect(queryMap["restrictToMyDrive"].first, unittest.equals("$a rg_restrictToMyDrive"));
1544 unittest.expect(queryMap["spaces"].first, unittest.equals(arg_spaces)); 1782 unittest.expect(queryMap["spaces"].first, unittest.equals(arg_spaces));
1783 unittest.expect(queryMap["supportsTeamDrives"].first, unittest.equals("$ arg_supportsTeamDrives"));
1784 unittest.expect(queryMap["teamDriveId"].first, unittest.equals(arg_teamD riveId));
1545 1785
1546 1786
1547 var h = { 1787 var h = {
1548 "content-type" : "application/json; charset=utf-8", 1788 "content-type" : "application/json; charset=utf-8",
1549 }; 1789 };
1550 var resp = convert.JSON.encode(buildChannel()); 1790 var resp = convert.JSON.encode(buildChannel());
1551 return new async.Future.value(stringResponse(200, h, resp)); 1791 return new async.Future.value(stringResponse(200, h, resp));
1552 }), true); 1792 }), true);
1553 res.watch(arg_request, arg_pageToken, includeRemoved: arg_includeRemoved, pageSize: arg_pageSize, restrictToMyDrive: arg_restrictToMyDrive, spaces: arg_sp aces).then(unittest.expectAsync(((api.Channel response) { 1793 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) {
1554 checkChannel(response); 1794 checkChannel(response);
1555 }))); 1795 })));
1556 }); 1796 });
1557 1797
1558 }); 1798 });
1559 1799
1560 1800
1561 unittest.group("resource-ChannelsResourceApi", () { 1801 unittest.group("resource-ChannelsResourceApi", () {
1562 unittest.test("method--stop", () { 1802 unittest.test("method--stop", () {
1563 1803
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after
1909 unittest.group("resource-FilesResourceApi", () { 2149 unittest.group("resource-FilesResourceApi", () {
1910 unittest.test("method--copy", () { 2150 unittest.test("method--copy", () {
1911 2151
1912 var mock = new HttpServerMock(); 2152 var mock = new HttpServerMock();
1913 api.FilesResourceApi res = new api.DriveApi(mock).files; 2153 api.FilesResourceApi res = new api.DriveApi(mock).files;
1914 var arg_request = buildFile(); 2154 var arg_request = buildFile();
1915 var arg_fileId = "foo"; 2155 var arg_fileId = "foo";
1916 var arg_ignoreDefaultVisibility = true; 2156 var arg_ignoreDefaultVisibility = true;
1917 var arg_keepRevisionForever = true; 2157 var arg_keepRevisionForever = true;
1918 var arg_ocrLanguage = "foo"; 2158 var arg_ocrLanguage = "foo";
2159 var arg_supportsTeamDrives = true;
1919 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 2160 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
1920 var obj = new api.File.fromJson(json); 2161 var obj = new api.File.fromJson(json);
1921 checkFile(obj); 2162 checkFile(obj);
1922 2163
1923 var path = (req.url).path; 2164 var path = (req.url).path;
1924 var pathOffset = 0; 2165 var pathOffset = 0;
1925 var index; 2166 var index;
1926 var subPart; 2167 var subPart;
1927 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 2168 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
1928 pathOffset += 1; 2169 pathOffset += 1;
(...skipping 21 matching lines...) Expand all
1950 } 2191 }
1951 if (query.length > 0) { 2192 if (query.length > 0) {
1952 for (var part in query.split("&")) { 2193 for (var part in query.split("&")) {
1953 var keyvalue = part.split("="); 2194 var keyvalue = part.split("=");
1954 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1])); 2195 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
1955 } 2196 }
1956 } 2197 }
1957 unittest.expect(queryMap["ignoreDefaultVisibility"].first, unittest.equa ls("$arg_ignoreDefaultVisibility")); 2198 unittest.expect(queryMap["ignoreDefaultVisibility"].first, unittest.equa ls("$arg_ignoreDefaultVisibility"));
1958 unittest.expect(queryMap["keepRevisionForever"].first, unittest.equals(" $arg_keepRevisionForever")); 2199 unittest.expect(queryMap["keepRevisionForever"].first, unittest.equals(" $arg_keepRevisionForever"));
1959 unittest.expect(queryMap["ocrLanguage"].first, unittest.equals(arg_ocrLa nguage)); 2200 unittest.expect(queryMap["ocrLanguage"].first, unittest.equals(arg_ocrLa nguage));
2201 unittest.expect(queryMap["supportsTeamDrives"].first, unittest.equals("$ arg_supportsTeamDrives"));
1960 2202
1961 2203
1962 var h = { 2204 var h = {
1963 "content-type" : "application/json; charset=utf-8", 2205 "content-type" : "application/json; charset=utf-8",
1964 }; 2206 };
1965 var resp = convert.JSON.encode(buildFile()); 2207 var resp = convert.JSON.encode(buildFile());
1966 return new async.Future.value(stringResponse(200, h, resp)); 2208 return new async.Future.value(stringResponse(200, h, resp));
1967 }), true); 2209 }), true);
1968 res.copy(arg_request, arg_fileId, ignoreDefaultVisibility: arg_ignoreDefau ltVisibility, keepRevisionForever: arg_keepRevisionForever, ocrLanguage: arg_ocr Language).then(unittest.expectAsync(((api.File response) { 2210 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) {
1969 checkFile(response); 2211 checkFile(response);
1970 }))); 2212 })));
1971 }); 2213 });
1972 2214
1973 unittest.test("method--create", () { 2215 unittest.test("method--create", () {
1974 // TODO: Implement tests for media upload; 2216 // TODO: Implement tests for media upload;
1975 // TODO: Implement tests for media download; 2217 // TODO: Implement tests for media download;
1976 2218
1977 var mock = new HttpServerMock(); 2219 var mock = new HttpServerMock();
1978 api.FilesResourceApi res = new api.DriveApi(mock).files; 2220 api.FilesResourceApi res = new api.DriveApi(mock).files;
1979 var arg_request = buildFile(); 2221 var arg_request = buildFile();
1980 var arg_ignoreDefaultVisibility = true; 2222 var arg_ignoreDefaultVisibility = true;
1981 var arg_keepRevisionForever = true; 2223 var arg_keepRevisionForever = true;
1982 var arg_ocrLanguage = "foo"; 2224 var arg_ocrLanguage = "foo";
2225 var arg_supportsTeamDrives = true;
1983 var arg_useContentAsIndexableText = true; 2226 var arg_useContentAsIndexableText = true;
1984 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 2227 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
1985 var obj = new api.File.fromJson(json); 2228 var obj = new api.File.fromJson(json);
1986 checkFile(obj); 2229 checkFile(obj);
1987 2230
1988 var path = (req.url).path; 2231 var path = (req.url).path;
1989 var pathOffset = 0; 2232 var pathOffset = 0;
1990 var index; 2233 var index;
1991 var subPart; 2234 var subPart;
1992 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 2235 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
(...skipping 15 matching lines...) Expand all
2008 } 2251 }
2009 if (query.length > 0) { 2252 if (query.length > 0) {
2010 for (var part in query.split("&")) { 2253 for (var part in query.split("&")) {
2011 var keyvalue = part.split("="); 2254 var keyvalue = part.split("=");
2012 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1])); 2255 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
2013 } 2256 }
2014 } 2257 }
2015 unittest.expect(queryMap["ignoreDefaultVisibility"].first, unittest.equa ls("$arg_ignoreDefaultVisibility")); 2258 unittest.expect(queryMap["ignoreDefaultVisibility"].first, unittest.equa ls("$arg_ignoreDefaultVisibility"));
2016 unittest.expect(queryMap["keepRevisionForever"].first, unittest.equals(" $arg_keepRevisionForever")); 2259 unittest.expect(queryMap["keepRevisionForever"].first, unittest.equals(" $arg_keepRevisionForever"));
2017 unittest.expect(queryMap["ocrLanguage"].first, unittest.equals(arg_ocrLa nguage)); 2260 unittest.expect(queryMap["ocrLanguage"].first, unittest.equals(arg_ocrLa nguage));
2261 unittest.expect(queryMap["supportsTeamDrives"].first, unittest.equals("$ arg_supportsTeamDrives"));
2018 unittest.expect(queryMap["useContentAsIndexableText"].first, unittest.eq uals("$arg_useContentAsIndexableText")); 2262 unittest.expect(queryMap["useContentAsIndexableText"].first, unittest.eq uals("$arg_useContentAsIndexableText"));
2019 2263
2020 2264
2021 var h = { 2265 var h = {
2022 "content-type" : "application/json; charset=utf-8", 2266 "content-type" : "application/json; charset=utf-8",
2023 }; 2267 };
2024 var resp = convert.JSON.encode(buildFile()); 2268 var resp = convert.JSON.encode(buildFile());
2025 return new async.Future.value(stringResponse(200, h, resp)); 2269 return new async.Future.value(stringResponse(200, h, resp));
2026 }), true); 2270 }), true);
2027 res.create(arg_request, ignoreDefaultVisibility: arg_ignoreDefaultVisibili ty, keepRevisionForever: arg_keepRevisionForever, ocrLanguage: arg_ocrLanguage, useContentAsIndexableText: arg_useContentAsIndexableText).then(unittest.expectAs ync(((api.File response) { 2271 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) {
2028 checkFile(response); 2272 checkFile(response);
2029 }))); 2273 })));
2030 }); 2274 });
2031 2275
2032 unittest.test("method--delete", () { 2276 unittest.test("method--delete", () {
2033 2277
2034 var mock = new HttpServerMock(); 2278 var mock = new HttpServerMock();
2035 api.FilesResourceApi res = new api.DriveApi(mock).files; 2279 api.FilesResourceApi res = new api.DriveApi(mock).files;
2036 var arg_fileId = "foo"; 2280 var arg_fileId = "foo";
2281 var arg_supportsTeamDrives = true;
2037 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 2282 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
2038 var path = (req.url).path; 2283 var path = (req.url).path;
2039 var pathOffset = 0; 2284 var pathOffset = 0;
2040 var index; 2285 var index;
2041 var subPart; 2286 var subPart;
2042 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 2287 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
2043 pathOffset += 1; 2288 pathOffset += 1;
2044 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("drive/v3/")); 2289 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("drive/v3/"));
2045 pathOffset += 9; 2290 pathOffset += 9;
2046 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ als("files/")); 2291 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ als("files/"));
(...skipping 11 matching lines...) Expand all
2058 if (n == "false") return false; 2303 if (n == "false") return false;
2059 if (n == null) return null; 2304 if (n == null) return null;
2060 throw new core.ArgumentError("Invalid boolean: $n"); 2305 throw new core.ArgumentError("Invalid boolean: $n");
2061 } 2306 }
2062 if (query.length > 0) { 2307 if (query.length > 0) {
2063 for (var part in query.split("&")) { 2308 for (var part in query.split("&")) {
2064 var keyvalue = part.split("="); 2309 var keyvalue = part.split("=");
2065 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1])); 2310 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
2066 } 2311 }
2067 } 2312 }
2313 unittest.expect(queryMap["supportsTeamDrives"].first, unittest.equals("$ arg_supportsTeamDrives"));
2068 2314
2069 2315
2070 var h = { 2316 var h = {
2071 "content-type" : "application/json; charset=utf-8", 2317 "content-type" : "application/json; charset=utf-8",
2072 }; 2318 };
2073 var resp = ""; 2319 var resp = "";
2074 return new async.Future.value(stringResponse(200, h, resp)); 2320 return new async.Future.value(stringResponse(200, h, resp));
2075 }), true); 2321 }), true);
2076 res.delete(arg_fileId).then(unittest.expectAsync((_) {})); 2322 res.delete(arg_fileId, supportsTeamDrives: arg_supportsTeamDrives).then(un ittest.expectAsync((_) {}));
2077 }); 2323 });
2078 2324
2079 unittest.test("method--emptyTrash", () { 2325 unittest.test("method--emptyTrash", () {
2080 2326
2081 var mock = new HttpServerMock(); 2327 var mock = new HttpServerMock();
2082 api.FilesResourceApi res = new api.DriveApi(mock).files; 2328 api.FilesResourceApi res = new api.DriveApi(mock).files;
2083 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 2329 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
2084 var path = (req.url).path; 2330 var path = (req.url).path;
2085 var pathOffset = 0; 2331 var pathOffset = 0;
2086 var index; 2332 var index;
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
2224 }); 2470 });
2225 2471
2226 unittest.test("method--get", () { 2472 unittest.test("method--get", () {
2227 // TODO: Implement tests for media upload; 2473 // TODO: Implement tests for media upload;
2228 // TODO: Implement tests for media download; 2474 // TODO: Implement tests for media download;
2229 2475
2230 var mock = new HttpServerMock(); 2476 var mock = new HttpServerMock();
2231 api.FilesResourceApi res = new api.DriveApi(mock).files; 2477 api.FilesResourceApi res = new api.DriveApi(mock).files;
2232 var arg_fileId = "foo"; 2478 var arg_fileId = "foo";
2233 var arg_acknowledgeAbuse = true; 2479 var arg_acknowledgeAbuse = true;
2480 var arg_supportsTeamDrives = true;
2234 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 2481 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
2235 var path = (req.url).path; 2482 var path = (req.url).path;
2236 var pathOffset = 0; 2483 var pathOffset = 0;
2237 var index; 2484 var index;
2238 var subPart; 2485 var subPart;
2239 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 2486 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
2240 pathOffset += 1; 2487 pathOffset += 1;
2241 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("drive/v3/")); 2488 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("drive/v3/"));
2242 pathOffset += 9; 2489 pathOffset += 9;
2243 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ als("files/")); 2490 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ als("files/"));
(...skipping 12 matching lines...) Expand all
2256 if (n == null) return null; 2503 if (n == null) return null;
2257 throw new core.ArgumentError("Invalid boolean: $n"); 2504 throw new core.ArgumentError("Invalid boolean: $n");
2258 } 2505 }
2259 if (query.length > 0) { 2506 if (query.length > 0) {
2260 for (var part in query.split("&")) { 2507 for (var part in query.split("&")) {
2261 var keyvalue = part.split("="); 2508 var keyvalue = part.split("=");
2262 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1])); 2509 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
2263 } 2510 }
2264 } 2511 }
2265 unittest.expect(queryMap["acknowledgeAbuse"].first, unittest.equals("$ar g_acknowledgeAbuse")); 2512 unittest.expect(queryMap["acknowledgeAbuse"].first, unittest.equals("$ar g_acknowledgeAbuse"));
2513 unittest.expect(queryMap["supportsTeamDrives"].first, unittest.equals("$ arg_supportsTeamDrives"));
2266 2514
2267 2515
2268 var h = { 2516 var h = {
2269 "content-type" : "application/json; charset=utf-8", 2517 "content-type" : "application/json; charset=utf-8",
2270 }; 2518 };
2271 var resp = convert.JSON.encode(buildFile()); 2519 var resp = convert.JSON.encode(buildFile());
2272 return new async.Future.value(stringResponse(200, h, resp)); 2520 return new async.Future.value(stringResponse(200, h, resp));
2273 }), true); 2521 }), true);
2274 res.get(arg_fileId, acknowledgeAbuse: arg_acknowledgeAbuse).then(unittest. expectAsync(((api.File response) { 2522 res.get(arg_fileId, acknowledgeAbuse: arg_acknowledgeAbuse, supportsTeamDr ives: arg_supportsTeamDrives).then(unittest.expectAsync(((api.File response) {
2275 checkFile(response); 2523 checkFile(response);
2276 }))); 2524 })));
2277 }); 2525 });
2278 2526
2279 unittest.test("method--list", () { 2527 unittest.test("method--list", () {
2280 2528
2281 var mock = new HttpServerMock(); 2529 var mock = new HttpServerMock();
2282 api.FilesResourceApi res = new api.DriveApi(mock).files; 2530 api.FilesResourceApi res = new api.DriveApi(mock).files;
2531 var arg_corpora = "foo";
2283 var arg_corpus = "foo"; 2532 var arg_corpus = "foo";
2533 var arg_includeTeamDriveItems = true;
2284 var arg_orderBy = "foo"; 2534 var arg_orderBy = "foo";
2285 var arg_pageSize = 42; 2535 var arg_pageSize = 42;
2286 var arg_pageToken = "foo"; 2536 var arg_pageToken = "foo";
2287 var arg_q = "foo"; 2537 var arg_q = "foo";
2288 var arg_spaces = "foo"; 2538 var arg_spaces = "foo";
2539 var arg_supportsTeamDrives = true;
2540 var arg_teamDriveId = "foo";
2289 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 2541 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
2290 var path = (req.url).path; 2542 var path = (req.url).path;
2291 var pathOffset = 0; 2543 var pathOffset = 0;
2292 var index; 2544 var index;
2293 var subPart; 2545 var subPart;
2294 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 2546 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
2295 pathOffset += 1; 2547 pathOffset += 1;
2296 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("drive/v3/")); 2548 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("drive/v3/"));
2297 pathOffset += 9; 2549 pathOffset += 9;
2298 unittest.expect(path.substring(pathOffset, pathOffset + 5), unittest.equ als("files")); 2550 unittest.expect(path.substring(pathOffset, pathOffset + 5), unittest.equ als("files"));
2299 pathOffset += 5; 2551 pathOffset += 5;
2300 2552
2301 var query = (req.url).query; 2553 var query = (req.url).query;
2302 var queryOffset = 0; 2554 var queryOffset = 0;
2303 var queryMap = {}; 2555 var queryMap = {};
2304 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); 2556 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
2305 parseBool(n) { 2557 parseBool(n) {
2306 if (n == "true") return true; 2558 if (n == "true") return true;
2307 if (n == "false") return false; 2559 if (n == "false") return false;
2308 if (n == null) return null; 2560 if (n == null) return null;
2309 throw new core.ArgumentError("Invalid boolean: $n"); 2561 throw new core.ArgumentError("Invalid boolean: $n");
2310 } 2562 }
2311 if (query.length > 0) { 2563 if (query.length > 0) {
2312 for (var part in query.split("&")) { 2564 for (var part in query.split("&")) {
2313 var keyvalue = part.split("="); 2565 var keyvalue = part.split("=");
2314 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1])); 2566 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
2315 } 2567 }
2316 } 2568 }
2569 unittest.expect(queryMap["corpora"].first, unittest.equals(arg_corpora)) ;
2317 unittest.expect(queryMap["corpus"].first, unittest.equals(arg_corpus)); 2570 unittest.expect(queryMap["corpus"].first, unittest.equals(arg_corpus));
2571 unittest.expect(queryMap["includeTeamDriveItems"].first, unittest.equals ("$arg_includeTeamDriveItems"));
2318 unittest.expect(queryMap["orderBy"].first, unittest.equals(arg_orderBy)) ; 2572 unittest.expect(queryMap["orderBy"].first, unittest.equals(arg_orderBy)) ;
2319 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ als(arg_pageSize)); 2573 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ als(arg_pageSize));
2320 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en)); 2574 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en));
2321 unittest.expect(queryMap["q"].first, unittest.equals(arg_q)); 2575 unittest.expect(queryMap["q"].first, unittest.equals(arg_q));
2322 unittest.expect(queryMap["spaces"].first, unittest.equals(arg_spaces)); 2576 unittest.expect(queryMap["spaces"].first, unittest.equals(arg_spaces));
2577 unittest.expect(queryMap["supportsTeamDrives"].first, unittest.equals("$ arg_supportsTeamDrives"));
2578 unittest.expect(queryMap["teamDriveId"].first, unittest.equals(arg_teamD riveId));
2323 2579
2324 2580
2325 var h = { 2581 var h = {
2326 "content-type" : "application/json; charset=utf-8", 2582 "content-type" : "application/json; charset=utf-8",
2327 }; 2583 };
2328 var resp = convert.JSON.encode(buildFileList()); 2584 var resp = convert.JSON.encode(buildFileList());
2329 return new async.Future.value(stringResponse(200, h, resp)); 2585 return new async.Future.value(stringResponse(200, h, resp));
2330 }), true); 2586 }), true);
2331 res.list(corpus: arg_corpus, orderBy: arg_orderBy, pageSize: arg_pageSize, pageToken: arg_pageToken, q: arg_q, spaces: arg_spaces).then(unittest.expectAsy nc(((api.FileList response) { 2587 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) {
2332 checkFileList(response); 2588 checkFileList(response);
2333 }))); 2589 })));
2334 }); 2590 });
2335 2591
2336 unittest.test("method--update", () { 2592 unittest.test("method--update", () {
2337 // TODO: Implement tests for media upload; 2593 // TODO: Implement tests for media upload;
2338 // TODO: Implement tests for media download; 2594 // TODO: Implement tests for media download;
2339 2595
2340 var mock = new HttpServerMock(); 2596 var mock = new HttpServerMock();
2341 api.FilesResourceApi res = new api.DriveApi(mock).files; 2597 api.FilesResourceApi res = new api.DriveApi(mock).files;
2342 var arg_request = buildFile(); 2598 var arg_request = buildFile();
2343 var arg_fileId = "foo"; 2599 var arg_fileId = "foo";
2344 var arg_addParents = "foo"; 2600 var arg_addParents = "foo";
2345 var arg_keepRevisionForever = true; 2601 var arg_keepRevisionForever = true;
2346 var arg_ocrLanguage = "foo"; 2602 var arg_ocrLanguage = "foo";
2347 var arg_removeParents = "foo"; 2603 var arg_removeParents = "foo";
2604 var arg_supportsTeamDrives = true;
2348 var arg_useContentAsIndexableText = true; 2605 var arg_useContentAsIndexableText = true;
2349 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 2606 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
2350 var obj = new api.File.fromJson(json); 2607 var obj = new api.File.fromJson(json);
2351 checkFile(obj); 2608 checkFile(obj);
2352 2609
2353 var path = (req.url).path; 2610 var path = (req.url).path;
2354 var pathOffset = 0; 2611 var pathOffset = 0;
2355 var index; 2612 var index;
2356 var subPart; 2613 var subPart;
2357 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 2614 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
(...skipping 19 matching lines...) Expand all
2377 if (query.length > 0) { 2634 if (query.length > 0) {
2378 for (var part in query.split("&")) { 2635 for (var part in query.split("&")) {
2379 var keyvalue = part.split("="); 2636 var keyvalue = part.split("=");
2380 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1])); 2637 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
2381 } 2638 }
2382 } 2639 }
2383 unittest.expect(queryMap["addParents"].first, unittest.equals(arg_addPar ents)); 2640 unittest.expect(queryMap["addParents"].first, unittest.equals(arg_addPar ents));
2384 unittest.expect(queryMap["keepRevisionForever"].first, unittest.equals(" $arg_keepRevisionForever")); 2641 unittest.expect(queryMap["keepRevisionForever"].first, unittest.equals(" $arg_keepRevisionForever"));
2385 unittest.expect(queryMap["ocrLanguage"].first, unittest.equals(arg_ocrLa nguage)); 2642 unittest.expect(queryMap["ocrLanguage"].first, unittest.equals(arg_ocrLa nguage));
2386 unittest.expect(queryMap["removeParents"].first, unittest.equals(arg_rem oveParents)); 2643 unittest.expect(queryMap["removeParents"].first, unittest.equals(arg_rem oveParents));
2644 unittest.expect(queryMap["supportsTeamDrives"].first, unittest.equals("$ arg_supportsTeamDrives"));
2387 unittest.expect(queryMap["useContentAsIndexableText"].first, unittest.eq uals("$arg_useContentAsIndexableText")); 2645 unittest.expect(queryMap["useContentAsIndexableText"].first, unittest.eq uals("$arg_useContentAsIndexableText"));
2388 2646
2389 2647
2390 var h = { 2648 var h = {
2391 "content-type" : "application/json; charset=utf-8", 2649 "content-type" : "application/json; charset=utf-8",
2392 }; 2650 };
2393 var resp = convert.JSON.encode(buildFile()); 2651 var resp = convert.JSON.encode(buildFile());
2394 return new async.Future.value(stringResponse(200, h, resp)); 2652 return new async.Future.value(stringResponse(200, h, resp));
2395 }), true); 2653 }), true);
2396 res.update(arg_request, arg_fileId, addParents: arg_addParents, keepRevisi onForever: arg_keepRevisionForever, ocrLanguage: arg_ocrLanguage, removeParents: arg_removeParents, useContentAsIndexableText: arg_useContentAsIndexableText).th en(unittest.expectAsync(((api.File response) { 2654 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) {
2397 checkFile(response); 2655 checkFile(response);
2398 }))); 2656 })));
2399 }); 2657 });
2400 2658
2401 unittest.test("method--watch", () { 2659 unittest.test("method--watch", () {
2402 // TODO: Implement tests for media upload; 2660 // TODO: Implement tests for media upload;
2403 // TODO: Implement tests for media download; 2661 // TODO: Implement tests for media download;
2404 2662
2405 var mock = new HttpServerMock(); 2663 var mock = new HttpServerMock();
2406 api.FilesResourceApi res = new api.DriveApi(mock).files; 2664 api.FilesResourceApi res = new api.DriveApi(mock).files;
2407 var arg_request = buildChannel(); 2665 var arg_request = buildChannel();
2408 var arg_fileId = "foo"; 2666 var arg_fileId = "foo";
2409 var arg_acknowledgeAbuse = true; 2667 var arg_acknowledgeAbuse = true;
2668 var arg_supportsTeamDrives = true;
2410 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 2669 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
2411 var obj = new api.Channel.fromJson(json); 2670 var obj = new api.Channel.fromJson(json);
2412 checkChannel(obj); 2671 checkChannel(obj);
2413 2672
2414 var path = (req.url).path; 2673 var path = (req.url).path;
2415 var pathOffset = 0; 2674 var pathOffset = 0;
2416 var index; 2675 var index;
2417 var subPart; 2676 var subPart;
2418 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 2677 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
2419 pathOffset += 1; 2678 pathOffset += 1;
(...skipping 19 matching lines...) Expand all
2439 if (n == null) return null; 2698 if (n == null) return null;
2440 throw new core.ArgumentError("Invalid boolean: $n"); 2699 throw new core.ArgumentError("Invalid boolean: $n");
2441 } 2700 }
2442 if (query.length > 0) { 2701 if (query.length > 0) {
2443 for (var part in query.split("&")) { 2702 for (var part in query.split("&")) {
2444 var keyvalue = part.split("="); 2703 var keyvalue = part.split("=");
2445 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1])); 2704 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
2446 } 2705 }
2447 } 2706 }
2448 unittest.expect(queryMap["acknowledgeAbuse"].first, unittest.equals("$ar g_acknowledgeAbuse")); 2707 unittest.expect(queryMap["acknowledgeAbuse"].first, unittest.equals("$ar g_acknowledgeAbuse"));
2708 unittest.expect(queryMap["supportsTeamDrives"].first, unittest.equals("$ arg_supportsTeamDrives"));
2449 2709
2450 2710
2451 var h = { 2711 var h = {
2452 "content-type" : "application/json; charset=utf-8", 2712 "content-type" : "application/json; charset=utf-8",
2453 }; 2713 };
2454 var resp = convert.JSON.encode(buildChannel()); 2714 var resp = convert.JSON.encode(buildChannel());
2455 return new async.Future.value(stringResponse(200, h, resp)); 2715 return new async.Future.value(stringResponse(200, h, resp));
2456 }), true); 2716 }), true);
2457 res.watch(arg_request, arg_fileId, acknowledgeAbuse: arg_acknowledgeAbuse) .then(unittest.expectAsync(((api.Channel response) { 2717 res.watch(arg_request, arg_fileId, acknowledgeAbuse: arg_acknowledgeAbuse, supportsTeamDrives: arg_supportsTeamDrives).then(unittest.expectAsync(((api.Cha nnel response) {
2458 checkChannel(response); 2718 checkChannel(response);
2459 }))); 2719 })));
2460 }); 2720 });
2461 2721
2462 }); 2722 });
2463 2723
2464 2724
2465 unittest.group("resource-PermissionsResourceApi", () { 2725 unittest.group("resource-PermissionsResourceApi", () {
2466 unittest.test("method--create", () { 2726 unittest.test("method--create", () {
2467 2727
2468 var mock = new HttpServerMock(); 2728 var mock = new HttpServerMock();
2469 api.PermissionsResourceApi res = new api.DriveApi(mock).permissions; 2729 api.PermissionsResourceApi res = new api.DriveApi(mock).permissions;
2470 var arg_request = buildPermission(); 2730 var arg_request = buildPermission();
2471 var arg_fileId = "foo"; 2731 var arg_fileId = "foo";
2472 var arg_emailMessage = "foo"; 2732 var arg_emailMessage = "foo";
2473 var arg_sendNotificationEmail = true; 2733 var arg_sendNotificationEmail = true;
2734 var arg_supportsTeamDrives = true;
2474 var arg_transferOwnership = true; 2735 var arg_transferOwnership = true;
2475 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 2736 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
2476 var obj = new api.Permission.fromJson(json); 2737 var obj = new api.Permission.fromJson(json);
2477 checkPermission(obj); 2738 checkPermission(obj);
2478 2739
2479 var path = (req.url).path; 2740 var path = (req.url).path;
2480 var pathOffset = 0; 2741 var pathOffset = 0;
2481 var index; 2742 var index;
2482 var subPart; 2743 var subPart;
2483 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 2744 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
(...skipping 21 matching lines...) Expand all
2505 throw new core.ArgumentError("Invalid boolean: $n"); 2766 throw new core.ArgumentError("Invalid boolean: $n");
2506 } 2767 }
2507 if (query.length > 0) { 2768 if (query.length > 0) {
2508 for (var part in query.split("&")) { 2769 for (var part in query.split("&")) {
2509 var keyvalue = part.split("="); 2770 var keyvalue = part.split("=");
2510 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1])); 2771 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
2511 } 2772 }
2512 } 2773 }
2513 unittest.expect(queryMap["emailMessage"].first, unittest.equals(arg_emai lMessage)); 2774 unittest.expect(queryMap["emailMessage"].first, unittest.equals(arg_emai lMessage));
2514 unittest.expect(queryMap["sendNotificationEmail"].first, unittest.equals ("$arg_sendNotificationEmail")); 2775 unittest.expect(queryMap["sendNotificationEmail"].first, unittest.equals ("$arg_sendNotificationEmail"));
2776 unittest.expect(queryMap["supportsTeamDrives"].first, unittest.equals("$ arg_supportsTeamDrives"));
2515 unittest.expect(queryMap["transferOwnership"].first, unittest.equals("$a rg_transferOwnership")); 2777 unittest.expect(queryMap["transferOwnership"].first, unittest.equals("$a rg_transferOwnership"));
2516 2778
2517 2779
2518 var h = { 2780 var h = {
2519 "content-type" : "application/json; charset=utf-8", 2781 "content-type" : "application/json; charset=utf-8",
2520 }; 2782 };
2521 var resp = convert.JSON.encode(buildPermission()); 2783 var resp = convert.JSON.encode(buildPermission());
2522 return new async.Future.value(stringResponse(200, h, resp)); 2784 return new async.Future.value(stringResponse(200, h, resp));
2523 }), true); 2785 }), true);
2524 res.create(arg_request, arg_fileId, emailMessage: arg_emailMessage, sendNo tificationEmail: arg_sendNotificationEmail, transferOwnership: arg_transferOwner ship).then(unittest.expectAsync(((api.Permission response) { 2786 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) {
2525 checkPermission(response); 2787 checkPermission(response);
2526 }))); 2788 })));
2527 }); 2789 });
2528 2790
2529 unittest.test("method--delete", () { 2791 unittest.test("method--delete", () {
2530 2792
2531 var mock = new HttpServerMock(); 2793 var mock = new HttpServerMock();
2532 api.PermissionsResourceApi res = new api.DriveApi(mock).permissions; 2794 api.PermissionsResourceApi res = new api.DriveApi(mock).permissions;
2533 var arg_fileId = "foo"; 2795 var arg_fileId = "foo";
2534 var arg_permissionId = "foo"; 2796 var arg_permissionId = "foo";
2797 var arg_supportsTeamDrives = true;
2535 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 2798 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
2536 var path = (req.url).path; 2799 var path = (req.url).path;
2537 var pathOffset = 0; 2800 var pathOffset = 0;
2538 var index; 2801 var index;
2539 var subPart; 2802 var subPart;
2540 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 2803 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
2541 pathOffset += 1; 2804 pathOffset += 1;
2542 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("drive/v3/")); 2805 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("drive/v3/"));
2543 pathOffset += 9; 2806 pathOffset += 9;
2544 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ als("files/")); 2807 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ als("files/"));
(...skipping 18 matching lines...) Expand all
2563 if (n == "false") return false; 2826 if (n == "false") return false;
2564 if (n == null) return null; 2827 if (n == null) return null;
2565 throw new core.ArgumentError("Invalid boolean: $n"); 2828 throw new core.ArgumentError("Invalid boolean: $n");
2566 } 2829 }
2567 if (query.length > 0) { 2830 if (query.length > 0) {
2568 for (var part in query.split("&")) { 2831 for (var part in query.split("&")) {
2569 var keyvalue = part.split("="); 2832 var keyvalue = part.split("=");
2570 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1])); 2833 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
2571 } 2834 }
2572 } 2835 }
2836 unittest.expect(queryMap["supportsTeamDrives"].first, unittest.equals("$ arg_supportsTeamDrives"));
2573 2837
2574 2838
2575 var h = { 2839 var h = {
2576 "content-type" : "application/json; charset=utf-8", 2840 "content-type" : "application/json; charset=utf-8",
2577 }; 2841 };
2578 var resp = ""; 2842 var resp = "";
2579 return new async.Future.value(stringResponse(200, h, resp)); 2843 return new async.Future.value(stringResponse(200, h, resp));
2580 }), true); 2844 }), true);
2581 res.delete(arg_fileId, arg_permissionId).then(unittest.expectAsync((_) {}) ); 2845 res.delete(arg_fileId, arg_permissionId, supportsTeamDrives: arg_supportsT eamDrives).then(unittest.expectAsync((_) {}));
2582 }); 2846 });
2583 2847
2584 unittest.test("method--get", () { 2848 unittest.test("method--get", () {
2585 2849
2586 var mock = new HttpServerMock(); 2850 var mock = new HttpServerMock();
2587 api.PermissionsResourceApi res = new api.DriveApi(mock).permissions; 2851 api.PermissionsResourceApi res = new api.DriveApi(mock).permissions;
2588 var arg_fileId = "foo"; 2852 var arg_fileId = "foo";
2589 var arg_permissionId = "foo"; 2853 var arg_permissionId = "foo";
2854 var arg_supportsTeamDrives = true;
2590 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 2855 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
2591 var path = (req.url).path; 2856 var path = (req.url).path;
2592 var pathOffset = 0; 2857 var pathOffset = 0;
2593 var index; 2858 var index;
2594 var subPart; 2859 var subPart;
2595 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 2860 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
2596 pathOffset += 1; 2861 pathOffset += 1;
2597 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("drive/v3/")); 2862 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("drive/v3/"));
2598 pathOffset += 9; 2863 pathOffset += 9;
2599 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ als("files/")); 2864 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ als("files/"));
(...skipping 18 matching lines...) Expand all
2618 if (n == "false") return false; 2883 if (n == "false") return false;
2619 if (n == null) return null; 2884 if (n == null) return null;
2620 throw new core.ArgumentError("Invalid boolean: $n"); 2885 throw new core.ArgumentError("Invalid boolean: $n");
2621 } 2886 }
2622 if (query.length > 0) { 2887 if (query.length > 0) {
2623 for (var part in query.split("&")) { 2888 for (var part in query.split("&")) {
2624 var keyvalue = part.split("="); 2889 var keyvalue = part.split("=");
2625 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1])); 2890 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
2626 } 2891 }
2627 } 2892 }
2893 unittest.expect(queryMap["supportsTeamDrives"].first, unittest.equals("$ arg_supportsTeamDrives"));
2628 2894
2629 2895
2630 var h = { 2896 var h = {
2631 "content-type" : "application/json; charset=utf-8", 2897 "content-type" : "application/json; charset=utf-8",
2632 }; 2898 };
2633 var resp = convert.JSON.encode(buildPermission()); 2899 var resp = convert.JSON.encode(buildPermission());
2634 return new async.Future.value(stringResponse(200, h, resp)); 2900 return new async.Future.value(stringResponse(200, h, resp));
2635 }), true); 2901 }), true);
2636 res.get(arg_fileId, arg_permissionId).then(unittest.expectAsync(((api.Perm ission response) { 2902 res.get(arg_fileId, arg_permissionId, supportsTeamDrives: arg_supportsTeam Drives).then(unittest.expectAsync(((api.Permission response) {
2637 checkPermission(response); 2903 checkPermission(response);
2638 }))); 2904 })));
2639 }); 2905 });
2640 2906
2641 unittest.test("method--list", () { 2907 unittest.test("method--list", () {
2642 2908
2643 var mock = new HttpServerMock(); 2909 var mock = new HttpServerMock();
2644 api.PermissionsResourceApi res = new api.DriveApi(mock).permissions; 2910 api.PermissionsResourceApi res = new api.DriveApi(mock).permissions;
2645 var arg_fileId = "foo"; 2911 var arg_fileId = "foo";
2912 var arg_pageSize = 42;
2913 var arg_pageToken = "foo";
2914 var arg_supportsTeamDrives = true;
2646 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 2915 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
2647 var path = (req.url).path; 2916 var path = (req.url).path;
2648 var pathOffset = 0; 2917 var pathOffset = 0;
2649 var index; 2918 var index;
2650 var subPart; 2919 var subPart;
2651 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 2920 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
2652 pathOffset += 1; 2921 pathOffset += 1;
2653 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("drive/v3/")); 2922 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("drive/v3/"));
2654 pathOffset += 9; 2923 pathOffset += 9;
2655 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ als("files/")); 2924 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ als("files/"));
(...skipping 15 matching lines...) Expand all
2671 if (n == "false") return false; 2940 if (n == "false") return false;
2672 if (n == null) return null; 2941 if (n == null) return null;
2673 throw new core.ArgumentError("Invalid boolean: $n"); 2942 throw new core.ArgumentError("Invalid boolean: $n");
2674 } 2943 }
2675 if (query.length > 0) { 2944 if (query.length > 0) {
2676 for (var part in query.split("&")) { 2945 for (var part in query.split("&")) {
2677 var keyvalue = part.split("="); 2946 var keyvalue = part.split("=");
2678 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1])); 2947 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
2679 } 2948 }
2680 } 2949 }
2950 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ als(arg_pageSize));
2951 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en));
2952 unittest.expect(queryMap["supportsTeamDrives"].first, unittest.equals("$ arg_supportsTeamDrives"));
2681 2953
2682 2954
2683 var h = { 2955 var h = {
2684 "content-type" : "application/json; charset=utf-8", 2956 "content-type" : "application/json; charset=utf-8",
2685 }; 2957 };
2686 var resp = convert.JSON.encode(buildPermissionList()); 2958 var resp = convert.JSON.encode(buildPermissionList());
2687 return new async.Future.value(stringResponse(200, h, resp)); 2959 return new async.Future.value(stringResponse(200, h, resp));
2688 }), true); 2960 }), true);
2689 res.list(arg_fileId).then(unittest.expectAsync(((api.PermissionList respon se) { 2961 res.list(arg_fileId, pageSize: arg_pageSize, pageToken: arg_pageToken, sup portsTeamDrives: arg_supportsTeamDrives).then(unittest.expectAsync(((api.Permiss ionList response) {
2690 checkPermissionList(response); 2962 checkPermissionList(response);
2691 }))); 2963 })));
2692 }); 2964 });
2693 2965
2694 unittest.test("method--update", () { 2966 unittest.test("method--update", () {
2695 2967
2696 var mock = new HttpServerMock(); 2968 var mock = new HttpServerMock();
2697 api.PermissionsResourceApi res = new api.DriveApi(mock).permissions; 2969 api.PermissionsResourceApi res = new api.DriveApi(mock).permissions;
2698 var arg_request = buildPermission(); 2970 var arg_request = buildPermission();
2699 var arg_fileId = "foo"; 2971 var arg_fileId = "foo";
2700 var arg_permissionId = "foo"; 2972 var arg_permissionId = "foo";
2701 var arg_removeExpiration = true; 2973 var arg_removeExpiration = true;
2974 var arg_supportsTeamDrives = true;
2702 var arg_transferOwnership = true; 2975 var arg_transferOwnership = true;
2703 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 2976 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
2704 var obj = new api.Permission.fromJson(json); 2977 var obj = new api.Permission.fromJson(json);
2705 checkPermission(obj); 2978 checkPermission(obj);
2706 2979
2707 var path = (req.url).path; 2980 var path = (req.url).path;
2708 var pathOffset = 0; 2981 var pathOffset = 0;
2709 var index; 2982 var index;
2710 var subPart; 2983 var subPart;
2711 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 2984 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
(...skipping 23 matching lines...) Expand all
2735 if (n == null) return null; 3008 if (n == null) return null;
2736 throw new core.ArgumentError("Invalid boolean: $n"); 3009 throw new core.ArgumentError("Invalid boolean: $n");
2737 } 3010 }
2738 if (query.length > 0) { 3011 if (query.length > 0) {
2739 for (var part in query.split("&")) { 3012 for (var part in query.split("&")) {
2740 var keyvalue = part.split("="); 3013 var keyvalue = part.split("=");
2741 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1])); 3014 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
2742 } 3015 }
2743 } 3016 }
2744 unittest.expect(queryMap["removeExpiration"].first, unittest.equals("$ar g_removeExpiration")); 3017 unittest.expect(queryMap["removeExpiration"].first, unittest.equals("$ar g_removeExpiration"));
3018 unittest.expect(queryMap["supportsTeamDrives"].first, unittest.equals("$ arg_supportsTeamDrives"));
2745 unittest.expect(queryMap["transferOwnership"].first, unittest.equals("$a rg_transferOwnership")); 3019 unittest.expect(queryMap["transferOwnership"].first, unittest.equals("$a rg_transferOwnership"));
2746 3020
2747 3021
2748 var h = { 3022 var h = {
2749 "content-type" : "application/json; charset=utf-8", 3023 "content-type" : "application/json; charset=utf-8",
2750 }; 3024 };
2751 var resp = convert.JSON.encode(buildPermission()); 3025 var resp = convert.JSON.encode(buildPermission());
2752 return new async.Future.value(stringResponse(200, h, resp)); 3026 return new async.Future.value(stringResponse(200, h, resp));
2753 }), true); 3027 }), true);
2754 res.update(arg_request, arg_fileId, arg_permissionId, removeExpiration: ar g_removeExpiration, transferOwnership: arg_transferOwnership).then(unittest.expe ctAsync(((api.Permission response) { 3028 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) {
2755 checkPermission(response); 3029 checkPermission(response);
2756 }))); 3030 })));
2757 }); 3031 });
2758 3032
2759 }); 3033 });
2760 3034
2761 3035
2762 unittest.group("resource-RepliesResourceApi", () { 3036 unittest.group("resource-RepliesResourceApi", () {
2763 unittest.test("method--create", () { 3037 unittest.test("method--create", () {
2764 3038
(...skipping 560 matching lines...) Expand 10 before | Expand all | Expand 10 after
3325 return new async.Future.value(stringResponse(200, h, resp)); 3599 return new async.Future.value(stringResponse(200, h, resp));
3326 }), true); 3600 }), true);
3327 res.update(arg_request, arg_fileId, arg_revisionId).then(unittest.expectAs ync(((api.Revision response) { 3601 res.update(arg_request, arg_fileId, arg_revisionId).then(unittest.expectAs ync(((api.Revision response) {
3328 checkRevision(response); 3602 checkRevision(response);
3329 }))); 3603 })));
3330 }); 3604 });
3331 3605
3332 }); 3606 });
3333 3607
3334 3608
3609 unittest.group("resource-TeamdrivesResourceApi", () {
3610 unittest.test("method--create", () {
3611
3612 var mock = new HttpServerMock();
3613 api.TeamdrivesResourceApi res = new api.DriveApi(mock).teamdrives;
3614 var arg_request = buildTeamDrive();
3615 var arg_requestId = "foo";
3616 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
3617 var obj = new api.TeamDrive.fromJson(json);
3618 checkTeamDrive(obj);
3619
3620 var path = (req.url).path;
3621 var pathOffset = 0;
3622 var index;
3623 var subPart;
3624 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
3625 pathOffset += 1;
3626 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("drive/v3/"));
3627 pathOffset += 9;
3628 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq uals("teamdrives"));
3629 pathOffset += 10;
3630
3631 var query = (req.url).query;
3632 var queryOffset = 0;
3633 var queryMap = {};
3634 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
3635 parseBool(n) {
3636 if (n == "true") return true;
3637 if (n == "false") return false;
3638 if (n == null) return null;
3639 throw new core.ArgumentError("Invalid boolean: $n");
3640 }
3641 if (query.length > 0) {
3642 for (var part in query.split("&")) {
3643 var keyvalue = part.split("=");
3644 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
3645 }
3646 }
3647 unittest.expect(queryMap["requestId"].first, unittest.equals(arg_request Id));
3648
3649
3650 var h = {
3651 "content-type" : "application/json; charset=utf-8",
3652 };
3653 var resp = convert.JSON.encode(buildTeamDrive());
3654 return new async.Future.value(stringResponse(200, h, resp));
3655 }), true);
3656 res.create(arg_request, arg_requestId).then(unittest.expectAsync(((api.Tea mDrive response) {
3657 checkTeamDrive(response);
3658 })));
3659 });
3660
3661 unittest.test("method--delete", () {
3662
3663 var mock = new HttpServerMock();
3664 api.TeamdrivesResourceApi res = new api.DriveApi(mock).teamdrives;
3665 var arg_teamDriveId = "foo";
3666 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
3667 var path = (req.url).path;
3668 var pathOffset = 0;
3669 var index;
3670 var subPart;
3671 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
3672 pathOffset += 1;
3673 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("drive/v3/"));
3674 pathOffset += 9;
3675 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq uals("teamdrives/"));
3676 pathOffset += 11;
3677 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset));
3678 pathOffset = path.length;
3679 unittest.expect(subPart, unittest.equals("$arg_teamDriveId"));
3680
3681 var query = (req.url).query;
3682 var queryOffset = 0;
3683 var queryMap = {};
3684 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
3685 parseBool(n) {
3686 if (n == "true") return true;
3687 if (n == "false") return false;
3688 if (n == null) return null;
3689 throw new core.ArgumentError("Invalid boolean: $n");
3690 }
3691 if (query.length > 0) {
3692 for (var part in query.split("&")) {
3693 var keyvalue = part.split("=");
3694 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
3695 }
3696 }
3697
3698
3699 var h = {
3700 "content-type" : "application/json; charset=utf-8",
3701 };
3702 var resp = "";
3703 return new async.Future.value(stringResponse(200, h, resp));
3704 }), true);
3705 res.delete(arg_teamDriveId).then(unittest.expectAsync((_) {}));
3706 });
3707
3708 unittest.test("method--get", () {
3709
3710 var mock = new HttpServerMock();
3711 api.TeamdrivesResourceApi res = new api.DriveApi(mock).teamdrives;
3712 var arg_teamDriveId = "foo";
3713 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
3714 var path = (req.url).path;
3715 var pathOffset = 0;
3716 var index;
3717 var subPart;
3718 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
3719 pathOffset += 1;
3720 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("drive/v3/"));
3721 pathOffset += 9;
3722 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq uals("teamdrives/"));
3723 pathOffset += 11;
3724 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset));
3725 pathOffset = path.length;
3726 unittest.expect(subPart, unittest.equals("$arg_teamDriveId"));
3727
3728 var query = (req.url).query;
3729 var queryOffset = 0;
3730 var queryMap = {};
3731 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
3732 parseBool(n) {
3733 if (n == "true") return true;
3734 if (n == "false") return false;
3735 if (n == null) return null;
3736 throw new core.ArgumentError("Invalid boolean: $n");
3737 }
3738 if (query.length > 0) {
3739 for (var part in query.split("&")) {
3740 var keyvalue = part.split("=");
3741 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
3742 }
3743 }
3744
3745
3746 var h = {
3747 "content-type" : "application/json; charset=utf-8",
3748 };
3749 var resp = convert.JSON.encode(buildTeamDrive());
3750 return new async.Future.value(stringResponse(200, h, resp));
3751 }), true);
3752 res.get(arg_teamDriveId).then(unittest.expectAsync(((api.TeamDrive respons e) {
3753 checkTeamDrive(response);
3754 })));
3755 });
3756
3757 unittest.test("method--list", () {
3758
3759 var mock = new HttpServerMock();
3760 api.TeamdrivesResourceApi res = new api.DriveApi(mock).teamdrives;
3761 var arg_pageSize = 42;
3762 var arg_pageToken = "foo";
3763 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
3764 var path = (req.url).path;
3765 var pathOffset = 0;
3766 var index;
3767 var subPart;
3768 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
3769 pathOffset += 1;
3770 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("drive/v3/"));
3771 pathOffset += 9;
3772 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq uals("teamdrives"));
3773 pathOffset += 10;
3774
3775 var query = (req.url).query;
3776 var queryOffset = 0;
3777 var queryMap = {};
3778 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
3779 parseBool(n) {
3780 if (n == "true") return true;
3781 if (n == "false") return false;
3782 if (n == null) return null;
3783 throw new core.ArgumentError("Invalid boolean: $n");
3784 }
3785 if (query.length > 0) {
3786 for (var part in query.split("&")) {
3787 var keyvalue = part.split("=");
3788 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
3789 }
3790 }
3791 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ als(arg_pageSize));
3792 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en));
3793
3794
3795 var h = {
3796 "content-type" : "application/json; charset=utf-8",
3797 };
3798 var resp = convert.JSON.encode(buildTeamDriveList());
3799 return new async.Future.value(stringResponse(200, h, resp));
3800 }), true);
3801 res.list(pageSize: arg_pageSize, pageToken: arg_pageToken).then(unittest.e xpectAsync(((api.TeamDriveList response) {
3802 checkTeamDriveList(response);
3803 })));
3804 });
3805
3806 unittest.test("method--update", () {
3807
3808 var mock = new HttpServerMock();
3809 api.TeamdrivesResourceApi res = new api.DriveApi(mock).teamdrives;
3810 var arg_request = buildTeamDrive();
3811 var arg_teamDriveId = "foo";
3812 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
3813 var obj = new api.TeamDrive.fromJson(json);
3814 checkTeamDrive(obj);
3815
3816 var path = (req.url).path;
3817 var pathOffset = 0;
3818 var index;
3819 var subPart;
3820 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
3821 pathOffset += 1;
3822 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("drive/v3/"));
3823 pathOffset += 9;
3824 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq uals("teamdrives/"));
3825 pathOffset += 11;
3826 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset));
3827 pathOffset = path.length;
3828 unittest.expect(subPart, unittest.equals("$arg_teamDriveId"));
3829
3830 var query = (req.url).query;
3831 var queryOffset = 0;
3832 var queryMap = {};
3833 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
3834 parseBool(n) {
3835 if (n == "true") return true;
3836 if (n == "false") return false;
3837 if (n == null) return null;
3838 throw new core.ArgumentError("Invalid boolean: $n");
3839 }
3840 if (query.length > 0) {
3841 for (var part in query.split("&")) {
3842 var keyvalue = part.split("=");
3843 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
3844 }
3845 }
3846
3847
3848 var h = {
3849 "content-type" : "application/json; charset=utf-8",
3850 };
3851 var resp = convert.JSON.encode(buildTeamDrive());
3852 return new async.Future.value(stringResponse(200, h, resp));
3853 }), true);
3854 res.update(arg_request, arg_teamDriveId).then(unittest.expectAsync(((api.T eamDrive response) {
3855 checkTeamDrive(response);
3856 })));
3857 });
3858
3859 });
3860
3861
3335 } 3862 }
3336 3863
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