OLD | NEW |
1 library googleapis.drive.v2.test; | 1 library googleapis.drive.v2.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 Loading... |
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 buildUnnamed593() { | 54 buildUnnamed610() { |
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 checkUnnamed593(core.List<core.String> o) { | 61 checkUnnamed610(core.List<core.String> o) { |
62 unittest.expect(o, unittest.hasLength(2)); | 62 unittest.expect(o, unittest.hasLength(2)); |
63 unittest.expect(o[0], unittest.equals('foo')); | 63 unittest.expect(o[0], unittest.equals('foo')); |
64 unittest.expect(o[1], unittest.equals('foo')); | 64 unittest.expect(o[1], unittest.equals('foo')); |
65 } | 65 } |
66 | 66 |
67 core.int buildCounterAboutAdditionalRoleInfoRoleSets = 0; | 67 core.int buildCounterAboutAdditionalRoleInfoRoleSets = 0; |
68 buildAboutAdditionalRoleInfoRoleSets() { | 68 buildAboutAdditionalRoleInfoRoleSets() { |
69 var o = new api.AboutAdditionalRoleInfoRoleSets(); | 69 var o = new api.AboutAdditionalRoleInfoRoleSets(); |
70 buildCounterAboutAdditionalRoleInfoRoleSets++; | 70 buildCounterAboutAdditionalRoleInfoRoleSets++; |
71 if (buildCounterAboutAdditionalRoleInfoRoleSets < 3) { | 71 if (buildCounterAboutAdditionalRoleInfoRoleSets < 3) { |
72 o.additionalRoles = buildUnnamed593(); | 72 o.additionalRoles = buildUnnamed610(); |
73 o.primaryRole = "foo"; | 73 o.primaryRole = "foo"; |
74 } | 74 } |
75 buildCounterAboutAdditionalRoleInfoRoleSets--; | 75 buildCounterAboutAdditionalRoleInfoRoleSets--; |
76 return o; | 76 return o; |
77 } | 77 } |
78 | 78 |
79 checkAboutAdditionalRoleInfoRoleSets(api.AboutAdditionalRoleInfoRoleSets o) { | 79 checkAboutAdditionalRoleInfoRoleSets(api.AboutAdditionalRoleInfoRoleSets o) { |
80 buildCounterAboutAdditionalRoleInfoRoleSets++; | 80 buildCounterAboutAdditionalRoleInfoRoleSets++; |
81 if (buildCounterAboutAdditionalRoleInfoRoleSets < 3) { | 81 if (buildCounterAboutAdditionalRoleInfoRoleSets < 3) { |
82 checkUnnamed593(o.additionalRoles); | 82 checkUnnamed610(o.additionalRoles); |
83 unittest.expect(o.primaryRole, unittest.equals('foo')); | 83 unittest.expect(o.primaryRole, unittest.equals('foo')); |
84 } | 84 } |
85 buildCounterAboutAdditionalRoleInfoRoleSets--; | 85 buildCounterAboutAdditionalRoleInfoRoleSets--; |
86 } | 86 } |
87 | 87 |
88 buildUnnamed594() { | 88 buildUnnamed611() { |
89 var o = new core.List<api.AboutAdditionalRoleInfoRoleSets>(); | 89 var o = new core.List<api.AboutAdditionalRoleInfoRoleSets>(); |
90 o.add(buildAboutAdditionalRoleInfoRoleSets()); | 90 o.add(buildAboutAdditionalRoleInfoRoleSets()); |
91 o.add(buildAboutAdditionalRoleInfoRoleSets()); | 91 o.add(buildAboutAdditionalRoleInfoRoleSets()); |
92 return o; | 92 return o; |
93 } | 93 } |
94 | 94 |
95 checkUnnamed594(core.List<api.AboutAdditionalRoleInfoRoleSets> o) { | 95 checkUnnamed611(core.List<api.AboutAdditionalRoleInfoRoleSets> o) { |
96 unittest.expect(o, unittest.hasLength(2)); | 96 unittest.expect(o, unittest.hasLength(2)); |
97 checkAboutAdditionalRoleInfoRoleSets(o[0]); | 97 checkAboutAdditionalRoleInfoRoleSets(o[0]); |
98 checkAboutAdditionalRoleInfoRoleSets(o[1]); | 98 checkAboutAdditionalRoleInfoRoleSets(o[1]); |
99 } | 99 } |
100 | 100 |
101 core.int buildCounterAboutAdditionalRoleInfo = 0; | 101 core.int buildCounterAboutAdditionalRoleInfo = 0; |
102 buildAboutAdditionalRoleInfo() { | 102 buildAboutAdditionalRoleInfo() { |
103 var o = new api.AboutAdditionalRoleInfo(); | 103 var o = new api.AboutAdditionalRoleInfo(); |
104 buildCounterAboutAdditionalRoleInfo++; | 104 buildCounterAboutAdditionalRoleInfo++; |
105 if (buildCounterAboutAdditionalRoleInfo < 3) { | 105 if (buildCounterAboutAdditionalRoleInfo < 3) { |
106 o.roleSets = buildUnnamed594(); | 106 o.roleSets = buildUnnamed611(); |
107 o.type = "foo"; | 107 o.type = "foo"; |
108 } | 108 } |
109 buildCounterAboutAdditionalRoleInfo--; | 109 buildCounterAboutAdditionalRoleInfo--; |
110 return o; | 110 return o; |
111 } | 111 } |
112 | 112 |
113 checkAboutAdditionalRoleInfo(api.AboutAdditionalRoleInfo o) { | 113 checkAboutAdditionalRoleInfo(api.AboutAdditionalRoleInfo o) { |
114 buildCounterAboutAdditionalRoleInfo++; | 114 buildCounterAboutAdditionalRoleInfo++; |
115 if (buildCounterAboutAdditionalRoleInfo < 3) { | 115 if (buildCounterAboutAdditionalRoleInfo < 3) { |
116 checkUnnamed594(o.roleSets); | 116 checkUnnamed611(o.roleSets); |
117 unittest.expect(o.type, unittest.equals('foo')); | 117 unittest.expect(o.type, unittest.equals('foo')); |
118 } | 118 } |
119 buildCounterAboutAdditionalRoleInfo--; | 119 buildCounterAboutAdditionalRoleInfo--; |
120 } | 120 } |
121 | 121 |
122 buildUnnamed595() { | 122 buildUnnamed612() { |
123 var o = new core.List<api.AboutAdditionalRoleInfo>(); | 123 var o = new core.List<api.AboutAdditionalRoleInfo>(); |
124 o.add(buildAboutAdditionalRoleInfo()); | 124 o.add(buildAboutAdditionalRoleInfo()); |
125 o.add(buildAboutAdditionalRoleInfo()); | 125 o.add(buildAboutAdditionalRoleInfo()); |
126 return o; | 126 return o; |
127 } | 127 } |
128 | 128 |
129 checkUnnamed595(core.List<api.AboutAdditionalRoleInfo> o) { | 129 checkUnnamed612(core.List<api.AboutAdditionalRoleInfo> o) { |
130 unittest.expect(o, unittest.hasLength(2)); | 130 unittest.expect(o, unittest.hasLength(2)); |
131 checkAboutAdditionalRoleInfo(o[0]); | 131 checkAboutAdditionalRoleInfo(o[0]); |
132 checkAboutAdditionalRoleInfo(o[1]); | 132 checkAboutAdditionalRoleInfo(o[1]); |
133 } | 133 } |
134 | 134 |
135 buildUnnamed596() { | 135 buildUnnamed613() { |
136 var o = new core.List<core.String>(); | 136 var o = new core.List<core.String>(); |
137 o.add("foo"); | 137 o.add("foo"); |
138 o.add("foo"); | 138 o.add("foo"); |
139 return o; | 139 return o; |
140 } | 140 } |
141 | 141 |
142 checkUnnamed596(core.List<core.String> o) { | 142 checkUnnamed613(core.List<core.String> o) { |
143 unittest.expect(o, unittest.hasLength(2)); | 143 unittest.expect(o, unittest.hasLength(2)); |
144 unittest.expect(o[0], unittest.equals('foo')); | 144 unittest.expect(o[0], unittest.equals('foo')); |
145 unittest.expect(o[1], unittest.equals('foo')); | 145 unittest.expect(o[1], unittest.equals('foo')); |
146 } | 146 } |
147 | 147 |
148 core.int buildCounterAboutExportFormats = 0; | 148 core.int buildCounterAboutExportFormats = 0; |
149 buildAboutExportFormats() { | 149 buildAboutExportFormats() { |
150 var o = new api.AboutExportFormats(); | 150 var o = new api.AboutExportFormats(); |
151 buildCounterAboutExportFormats++; | 151 buildCounterAboutExportFormats++; |
152 if (buildCounterAboutExportFormats < 3) { | 152 if (buildCounterAboutExportFormats < 3) { |
153 o.source = "foo"; | 153 o.source = "foo"; |
154 o.targets = buildUnnamed596(); | 154 o.targets = buildUnnamed613(); |
155 } | 155 } |
156 buildCounterAboutExportFormats--; | 156 buildCounterAboutExportFormats--; |
157 return o; | 157 return o; |
158 } | 158 } |
159 | 159 |
160 checkAboutExportFormats(api.AboutExportFormats o) { | 160 checkAboutExportFormats(api.AboutExportFormats o) { |
161 buildCounterAboutExportFormats++; | 161 buildCounterAboutExportFormats++; |
162 if (buildCounterAboutExportFormats < 3) { | 162 if (buildCounterAboutExportFormats < 3) { |
163 unittest.expect(o.source, unittest.equals('foo')); | 163 unittest.expect(o.source, unittest.equals('foo')); |
164 checkUnnamed596(o.targets); | 164 checkUnnamed613(o.targets); |
165 } | 165 } |
166 buildCounterAboutExportFormats--; | 166 buildCounterAboutExportFormats--; |
167 } | 167 } |
168 | 168 |
169 buildUnnamed597() { | 169 buildUnnamed614() { |
170 var o = new core.List<api.AboutExportFormats>(); | 170 var o = new core.List<api.AboutExportFormats>(); |
171 o.add(buildAboutExportFormats()); | 171 o.add(buildAboutExportFormats()); |
172 o.add(buildAboutExportFormats()); | 172 o.add(buildAboutExportFormats()); |
173 return o; | 173 return o; |
174 } | 174 } |
175 | 175 |
176 checkUnnamed597(core.List<api.AboutExportFormats> o) { | 176 checkUnnamed614(core.List<api.AboutExportFormats> o) { |
177 unittest.expect(o, unittest.hasLength(2)); | 177 unittest.expect(o, unittest.hasLength(2)); |
178 checkAboutExportFormats(o[0]); | 178 checkAboutExportFormats(o[0]); |
179 checkAboutExportFormats(o[1]); | 179 checkAboutExportFormats(o[1]); |
180 } | 180 } |
181 | 181 |
182 core.int buildCounterAboutFeatures = 0; | 182 core.int buildCounterAboutFeatures = 0; |
183 buildAboutFeatures() { | 183 buildAboutFeatures() { |
184 var o = new api.AboutFeatures(); | 184 var o = new api.AboutFeatures(); |
185 buildCounterAboutFeatures++; | 185 buildCounterAboutFeatures++; |
186 if (buildCounterAboutFeatures < 3) { | 186 if (buildCounterAboutFeatures < 3) { |
187 o.featureName = "foo"; | 187 o.featureName = "foo"; |
188 o.featureRate = 42.0; | 188 o.featureRate = 42.0; |
189 } | 189 } |
190 buildCounterAboutFeatures--; | 190 buildCounterAboutFeatures--; |
191 return o; | 191 return o; |
192 } | 192 } |
193 | 193 |
194 checkAboutFeatures(api.AboutFeatures o) { | 194 checkAboutFeatures(api.AboutFeatures o) { |
195 buildCounterAboutFeatures++; | 195 buildCounterAboutFeatures++; |
196 if (buildCounterAboutFeatures < 3) { | 196 if (buildCounterAboutFeatures < 3) { |
197 unittest.expect(o.featureName, unittest.equals('foo')); | 197 unittest.expect(o.featureName, unittest.equals('foo')); |
198 unittest.expect(o.featureRate, unittest.equals(42.0)); | 198 unittest.expect(o.featureRate, unittest.equals(42.0)); |
199 } | 199 } |
200 buildCounterAboutFeatures--; | 200 buildCounterAboutFeatures--; |
201 } | 201 } |
202 | 202 |
203 buildUnnamed598() { | 203 buildUnnamed615() { |
204 var o = new core.List<api.AboutFeatures>(); | 204 var o = new core.List<api.AboutFeatures>(); |
205 o.add(buildAboutFeatures()); | 205 o.add(buildAboutFeatures()); |
206 o.add(buildAboutFeatures()); | 206 o.add(buildAboutFeatures()); |
207 return o; | 207 return o; |
208 } | 208 } |
209 | 209 |
210 checkUnnamed598(core.List<api.AboutFeatures> o) { | 210 checkUnnamed615(core.List<api.AboutFeatures> o) { |
211 unittest.expect(o, unittest.hasLength(2)); | 211 unittest.expect(o, unittest.hasLength(2)); |
212 checkAboutFeatures(o[0]); | 212 checkAboutFeatures(o[0]); |
213 checkAboutFeatures(o[1]); | 213 checkAboutFeatures(o[1]); |
214 } | 214 } |
215 | 215 |
216 buildUnnamed599() { | 216 buildUnnamed616() { |
217 var o = new core.List<core.String>(); | 217 var o = new core.List<core.String>(); |
218 o.add("foo"); | 218 o.add("foo"); |
219 o.add("foo"); | 219 o.add("foo"); |
220 return o; | 220 return o; |
221 } | 221 } |
222 | 222 |
223 checkUnnamed599(core.List<core.String> o) { | 223 checkUnnamed616(core.List<core.String> o) { |
224 unittest.expect(o, unittest.hasLength(2)); | 224 unittest.expect(o, unittest.hasLength(2)); |
225 unittest.expect(o[0], unittest.equals('foo')); | 225 unittest.expect(o[0], unittest.equals('foo')); |
226 unittest.expect(o[1], unittest.equals('foo')); | 226 unittest.expect(o[1], unittest.equals('foo')); |
227 } | 227 } |
228 | 228 |
229 buildUnnamed600() { | 229 buildUnnamed617() { |
230 var o = new core.List<core.String>(); | 230 var o = new core.List<core.String>(); |
231 o.add("foo"); | 231 o.add("foo"); |
232 o.add("foo"); | 232 o.add("foo"); |
233 return o; | 233 return o; |
234 } | 234 } |
235 | 235 |
236 checkUnnamed600(core.List<core.String> o) { | 236 checkUnnamed617(core.List<core.String> o) { |
237 unittest.expect(o, unittest.hasLength(2)); | 237 unittest.expect(o, unittest.hasLength(2)); |
238 unittest.expect(o[0], unittest.equals('foo')); | 238 unittest.expect(o[0], unittest.equals('foo')); |
239 unittest.expect(o[1], unittest.equals('foo')); | 239 unittest.expect(o[1], unittest.equals('foo')); |
240 } | 240 } |
241 | 241 |
242 core.int buildCounterAboutImportFormats = 0; | 242 core.int buildCounterAboutImportFormats = 0; |
243 buildAboutImportFormats() { | 243 buildAboutImportFormats() { |
244 var o = new api.AboutImportFormats(); | 244 var o = new api.AboutImportFormats(); |
245 buildCounterAboutImportFormats++; | 245 buildCounterAboutImportFormats++; |
246 if (buildCounterAboutImportFormats < 3) { | 246 if (buildCounterAboutImportFormats < 3) { |
247 o.source = "foo"; | 247 o.source = "foo"; |
248 o.targets = buildUnnamed600(); | 248 o.targets = buildUnnamed617(); |
249 } | 249 } |
250 buildCounterAboutImportFormats--; | 250 buildCounterAboutImportFormats--; |
251 return o; | 251 return o; |
252 } | 252 } |
253 | 253 |
254 checkAboutImportFormats(api.AboutImportFormats o) { | 254 checkAboutImportFormats(api.AboutImportFormats o) { |
255 buildCounterAboutImportFormats++; | 255 buildCounterAboutImportFormats++; |
256 if (buildCounterAboutImportFormats < 3) { | 256 if (buildCounterAboutImportFormats < 3) { |
257 unittest.expect(o.source, unittest.equals('foo')); | 257 unittest.expect(o.source, unittest.equals('foo')); |
258 checkUnnamed600(o.targets); | 258 checkUnnamed617(o.targets); |
259 } | 259 } |
260 buildCounterAboutImportFormats--; | 260 buildCounterAboutImportFormats--; |
261 } | 261 } |
262 | 262 |
263 buildUnnamed601() { | 263 buildUnnamed618() { |
264 var o = new core.List<api.AboutImportFormats>(); | 264 var o = new core.List<api.AboutImportFormats>(); |
265 o.add(buildAboutImportFormats()); | 265 o.add(buildAboutImportFormats()); |
266 o.add(buildAboutImportFormats()); | 266 o.add(buildAboutImportFormats()); |
267 return o; | 267 return o; |
268 } | 268 } |
269 | 269 |
270 checkUnnamed601(core.List<api.AboutImportFormats> o) { | 270 checkUnnamed618(core.List<api.AboutImportFormats> o) { |
271 unittest.expect(o, unittest.hasLength(2)); | 271 unittest.expect(o, unittest.hasLength(2)); |
272 checkAboutImportFormats(o[0]); | 272 checkAboutImportFormats(o[0]); |
273 checkAboutImportFormats(o[1]); | 273 checkAboutImportFormats(o[1]); |
274 } | 274 } |
275 | 275 |
276 core.int buildCounterAboutMaxUploadSizes = 0; | 276 core.int buildCounterAboutMaxUploadSizes = 0; |
277 buildAboutMaxUploadSizes() { | 277 buildAboutMaxUploadSizes() { |
278 var o = new api.AboutMaxUploadSizes(); | 278 var o = new api.AboutMaxUploadSizes(); |
279 buildCounterAboutMaxUploadSizes++; | 279 buildCounterAboutMaxUploadSizes++; |
280 if (buildCounterAboutMaxUploadSizes < 3) { | 280 if (buildCounterAboutMaxUploadSizes < 3) { |
281 o.size = "foo"; | 281 o.size = "foo"; |
282 o.type = "foo"; | 282 o.type = "foo"; |
283 } | 283 } |
284 buildCounterAboutMaxUploadSizes--; | 284 buildCounterAboutMaxUploadSizes--; |
285 return o; | 285 return o; |
286 } | 286 } |
287 | 287 |
288 checkAboutMaxUploadSizes(api.AboutMaxUploadSizes o) { | 288 checkAboutMaxUploadSizes(api.AboutMaxUploadSizes o) { |
289 buildCounterAboutMaxUploadSizes++; | 289 buildCounterAboutMaxUploadSizes++; |
290 if (buildCounterAboutMaxUploadSizes < 3) { | 290 if (buildCounterAboutMaxUploadSizes < 3) { |
291 unittest.expect(o.size, unittest.equals('foo')); | 291 unittest.expect(o.size, unittest.equals('foo')); |
292 unittest.expect(o.type, unittest.equals('foo')); | 292 unittest.expect(o.type, unittest.equals('foo')); |
293 } | 293 } |
294 buildCounterAboutMaxUploadSizes--; | 294 buildCounterAboutMaxUploadSizes--; |
295 } | 295 } |
296 | 296 |
297 buildUnnamed602() { | 297 buildUnnamed619() { |
298 var o = new core.List<api.AboutMaxUploadSizes>(); | 298 var o = new core.List<api.AboutMaxUploadSizes>(); |
299 o.add(buildAboutMaxUploadSizes()); | 299 o.add(buildAboutMaxUploadSizes()); |
300 o.add(buildAboutMaxUploadSizes()); | 300 o.add(buildAboutMaxUploadSizes()); |
301 return o; | 301 return o; |
302 } | 302 } |
303 | 303 |
304 checkUnnamed602(core.List<api.AboutMaxUploadSizes> o) { | 304 checkUnnamed619(core.List<api.AboutMaxUploadSizes> o) { |
305 unittest.expect(o, unittest.hasLength(2)); | 305 unittest.expect(o, unittest.hasLength(2)); |
306 checkAboutMaxUploadSizes(o[0]); | 306 checkAboutMaxUploadSizes(o[0]); |
307 checkAboutMaxUploadSizes(o[1]); | 307 checkAboutMaxUploadSizes(o[1]); |
308 } | 308 } |
309 | 309 |
310 core.int buildCounterAboutQuotaBytesByService = 0; | 310 core.int buildCounterAboutQuotaBytesByService = 0; |
311 buildAboutQuotaBytesByService() { | 311 buildAboutQuotaBytesByService() { |
312 var o = new api.AboutQuotaBytesByService(); | 312 var o = new api.AboutQuotaBytesByService(); |
313 buildCounterAboutQuotaBytesByService++; | 313 buildCounterAboutQuotaBytesByService++; |
314 if (buildCounterAboutQuotaBytesByService < 3) { | 314 if (buildCounterAboutQuotaBytesByService < 3) { |
315 o.bytesUsed = "foo"; | 315 o.bytesUsed = "foo"; |
316 o.serviceName = "foo"; | 316 o.serviceName = "foo"; |
317 } | 317 } |
318 buildCounterAboutQuotaBytesByService--; | 318 buildCounterAboutQuotaBytesByService--; |
319 return o; | 319 return o; |
320 } | 320 } |
321 | 321 |
322 checkAboutQuotaBytesByService(api.AboutQuotaBytesByService o) { | 322 checkAboutQuotaBytesByService(api.AboutQuotaBytesByService o) { |
323 buildCounterAboutQuotaBytesByService++; | 323 buildCounterAboutQuotaBytesByService++; |
324 if (buildCounterAboutQuotaBytesByService < 3) { | 324 if (buildCounterAboutQuotaBytesByService < 3) { |
325 unittest.expect(o.bytesUsed, unittest.equals('foo')); | 325 unittest.expect(o.bytesUsed, unittest.equals('foo')); |
326 unittest.expect(o.serviceName, unittest.equals('foo')); | 326 unittest.expect(o.serviceName, unittest.equals('foo')); |
327 } | 327 } |
328 buildCounterAboutQuotaBytesByService--; | 328 buildCounterAboutQuotaBytesByService--; |
329 } | 329 } |
330 | 330 |
331 buildUnnamed603() { | 331 buildUnnamed620() { |
332 var o = new core.List<api.AboutQuotaBytesByService>(); | 332 var o = new core.List<api.AboutQuotaBytesByService>(); |
333 o.add(buildAboutQuotaBytesByService()); | 333 o.add(buildAboutQuotaBytesByService()); |
334 o.add(buildAboutQuotaBytesByService()); | 334 o.add(buildAboutQuotaBytesByService()); |
335 return o; | 335 return o; |
336 } | 336 } |
337 | 337 |
338 checkUnnamed603(core.List<api.AboutQuotaBytesByService> o) { | 338 checkUnnamed620(core.List<api.AboutQuotaBytesByService> o) { |
339 unittest.expect(o, unittest.hasLength(2)); | 339 unittest.expect(o, unittest.hasLength(2)); |
340 checkAboutQuotaBytesByService(o[0]); | 340 checkAboutQuotaBytesByService(o[0]); |
341 checkAboutQuotaBytesByService(o[1]); | 341 checkAboutQuotaBytesByService(o[1]); |
342 } | 342 } |
343 | 343 |
344 core.int buildCounterAbout = 0; | 344 core.int buildCounterAbout = 0; |
345 buildAbout() { | 345 buildAbout() { |
346 var o = new api.About(); | 346 var o = new api.About(); |
347 buildCounterAbout++; | 347 buildCounterAbout++; |
348 if (buildCounterAbout < 3) { | 348 if (buildCounterAbout < 3) { |
349 o.additionalRoleInfo = buildUnnamed595(); | 349 o.additionalRoleInfo = buildUnnamed612(); |
350 o.domainSharingPolicy = "foo"; | 350 o.domainSharingPolicy = "foo"; |
351 o.etag = "foo"; | 351 o.etag = "foo"; |
352 o.exportFormats = buildUnnamed597(); | 352 o.exportFormats = buildUnnamed614(); |
353 o.features = buildUnnamed598(); | 353 o.features = buildUnnamed615(); |
354 o.folderColorPalette = buildUnnamed599(); | 354 o.folderColorPalette = buildUnnamed616(); |
355 o.importFormats = buildUnnamed601(); | 355 o.importFormats = buildUnnamed618(); |
356 o.isCurrentAppInstalled = true; | 356 o.isCurrentAppInstalled = true; |
357 o.kind = "foo"; | 357 o.kind = "foo"; |
358 o.languageCode = "foo"; | 358 o.languageCode = "foo"; |
359 o.largestChangeId = "foo"; | 359 o.largestChangeId = "foo"; |
360 o.maxUploadSizes = buildUnnamed602(); | 360 o.maxUploadSizes = buildUnnamed619(); |
361 o.name = "foo"; | 361 o.name = "foo"; |
362 o.permissionId = "foo"; | 362 o.permissionId = "foo"; |
363 o.quotaBytesByService = buildUnnamed603(); | 363 o.quotaBytesByService = buildUnnamed620(); |
364 o.quotaBytesTotal = "foo"; | 364 o.quotaBytesTotal = "foo"; |
365 o.quotaBytesUsed = "foo"; | 365 o.quotaBytesUsed = "foo"; |
366 o.quotaBytesUsedAggregate = "foo"; | 366 o.quotaBytesUsedAggregate = "foo"; |
367 o.quotaBytesUsedInTrash = "foo"; | 367 o.quotaBytesUsedInTrash = "foo"; |
368 o.quotaType = "foo"; | 368 o.quotaType = "foo"; |
369 o.remainingChangeIds = "foo"; | 369 o.remainingChangeIds = "foo"; |
370 o.rootFolderId = "foo"; | 370 o.rootFolderId = "foo"; |
371 o.selfLink = "foo"; | 371 o.selfLink = "foo"; |
372 o.user = buildUser(); | 372 o.user = buildUser(); |
373 } | 373 } |
374 buildCounterAbout--; | 374 buildCounterAbout--; |
375 return o; | 375 return o; |
376 } | 376 } |
377 | 377 |
378 checkAbout(api.About o) { | 378 checkAbout(api.About o) { |
379 buildCounterAbout++; | 379 buildCounterAbout++; |
380 if (buildCounterAbout < 3) { | 380 if (buildCounterAbout < 3) { |
381 checkUnnamed595(o.additionalRoleInfo); | 381 checkUnnamed612(o.additionalRoleInfo); |
382 unittest.expect(o.domainSharingPolicy, unittest.equals('foo')); | 382 unittest.expect(o.domainSharingPolicy, unittest.equals('foo')); |
383 unittest.expect(o.etag, unittest.equals('foo')); | 383 unittest.expect(o.etag, unittest.equals('foo')); |
384 checkUnnamed597(o.exportFormats); | 384 checkUnnamed614(o.exportFormats); |
385 checkUnnamed598(o.features); | 385 checkUnnamed615(o.features); |
386 checkUnnamed599(o.folderColorPalette); | 386 checkUnnamed616(o.folderColorPalette); |
387 checkUnnamed601(o.importFormats); | 387 checkUnnamed618(o.importFormats); |
388 unittest.expect(o.isCurrentAppInstalled, unittest.isTrue); | 388 unittest.expect(o.isCurrentAppInstalled, unittest.isTrue); |
389 unittest.expect(o.kind, unittest.equals('foo')); | 389 unittest.expect(o.kind, unittest.equals('foo')); |
390 unittest.expect(o.languageCode, unittest.equals('foo')); | 390 unittest.expect(o.languageCode, unittest.equals('foo')); |
391 unittest.expect(o.largestChangeId, unittest.equals('foo')); | 391 unittest.expect(o.largestChangeId, unittest.equals('foo')); |
392 checkUnnamed602(o.maxUploadSizes); | 392 checkUnnamed619(o.maxUploadSizes); |
393 unittest.expect(o.name, unittest.equals('foo')); | 393 unittest.expect(o.name, unittest.equals('foo')); |
394 unittest.expect(o.permissionId, unittest.equals('foo')); | 394 unittest.expect(o.permissionId, unittest.equals('foo')); |
395 checkUnnamed603(o.quotaBytesByService); | 395 checkUnnamed620(o.quotaBytesByService); |
396 unittest.expect(o.quotaBytesTotal, unittest.equals('foo')); | 396 unittest.expect(o.quotaBytesTotal, unittest.equals('foo')); |
397 unittest.expect(o.quotaBytesUsed, unittest.equals('foo')); | 397 unittest.expect(o.quotaBytesUsed, unittest.equals('foo')); |
398 unittest.expect(o.quotaBytesUsedAggregate, unittest.equals('foo')); | 398 unittest.expect(o.quotaBytesUsedAggregate, unittest.equals('foo')); |
399 unittest.expect(o.quotaBytesUsedInTrash, unittest.equals('foo')); | 399 unittest.expect(o.quotaBytesUsedInTrash, unittest.equals('foo')); |
400 unittest.expect(o.quotaType, unittest.equals('foo')); | 400 unittest.expect(o.quotaType, unittest.equals('foo')); |
401 unittest.expect(o.remainingChangeIds, unittest.equals('foo')); | 401 unittest.expect(o.remainingChangeIds, unittest.equals('foo')); |
402 unittest.expect(o.rootFolderId, unittest.equals('foo')); | 402 unittest.expect(o.rootFolderId, unittest.equals('foo')); |
403 unittest.expect(o.selfLink, unittest.equals('foo')); | 403 unittest.expect(o.selfLink, unittest.equals('foo')); |
404 checkUser(o.user); | 404 checkUser(o.user); |
405 } | 405 } |
(...skipping 16 matching lines...) Expand all Loading... |
422 checkAppIcons(api.AppIcons o) { | 422 checkAppIcons(api.AppIcons o) { |
423 buildCounterAppIcons++; | 423 buildCounterAppIcons++; |
424 if (buildCounterAppIcons < 3) { | 424 if (buildCounterAppIcons < 3) { |
425 unittest.expect(o.category, unittest.equals('foo')); | 425 unittest.expect(o.category, unittest.equals('foo')); |
426 unittest.expect(o.iconUrl, unittest.equals('foo')); | 426 unittest.expect(o.iconUrl, unittest.equals('foo')); |
427 unittest.expect(o.size, unittest.equals(42)); | 427 unittest.expect(o.size, unittest.equals(42)); |
428 } | 428 } |
429 buildCounterAppIcons--; | 429 buildCounterAppIcons--; |
430 } | 430 } |
431 | 431 |
432 buildUnnamed604() { | 432 buildUnnamed621() { |
433 var o = new core.List<api.AppIcons>(); | 433 var o = new core.List<api.AppIcons>(); |
434 o.add(buildAppIcons()); | 434 o.add(buildAppIcons()); |
435 o.add(buildAppIcons()); | 435 o.add(buildAppIcons()); |
436 return o; | 436 return o; |
437 } | 437 } |
438 | 438 |
439 checkUnnamed604(core.List<api.AppIcons> o) { | 439 checkUnnamed621(core.List<api.AppIcons> o) { |
440 unittest.expect(o, unittest.hasLength(2)); | 440 unittest.expect(o, unittest.hasLength(2)); |
441 checkAppIcons(o[0]); | 441 checkAppIcons(o[0]); |
442 checkAppIcons(o[1]); | 442 checkAppIcons(o[1]); |
443 } | 443 } |
444 | 444 |
445 buildUnnamed605() { | 445 buildUnnamed622() { |
446 var o = new core.List<core.String>(); | 446 var o = new core.List<core.String>(); |
447 o.add("foo"); | 447 o.add("foo"); |
448 o.add("foo"); | 448 o.add("foo"); |
449 return o; | 449 return o; |
450 } | 450 } |
451 | 451 |
452 checkUnnamed605(core.List<core.String> o) { | 452 checkUnnamed622(core.List<core.String> o) { |
453 unittest.expect(o, unittest.hasLength(2)); | 453 unittest.expect(o, unittest.hasLength(2)); |
454 unittest.expect(o[0], unittest.equals('foo')); | 454 unittest.expect(o[0], unittest.equals('foo')); |
455 unittest.expect(o[1], unittest.equals('foo')); | 455 unittest.expect(o[1], unittest.equals('foo')); |
456 } | 456 } |
457 | 457 |
458 buildUnnamed606() { | 458 buildUnnamed623() { |
459 var o = new core.List<core.String>(); | 459 var o = new core.List<core.String>(); |
460 o.add("foo"); | 460 o.add("foo"); |
461 o.add("foo"); | 461 o.add("foo"); |
462 return o; | 462 return o; |
463 } | 463 } |
464 | 464 |
465 checkUnnamed606(core.List<core.String> o) { | 465 checkUnnamed623(core.List<core.String> o) { |
466 unittest.expect(o, unittest.hasLength(2)); | 466 unittest.expect(o, unittest.hasLength(2)); |
467 unittest.expect(o[0], unittest.equals('foo')); | 467 unittest.expect(o[0], unittest.equals('foo')); |
468 unittest.expect(o[1], unittest.equals('foo')); | 468 unittest.expect(o[1], unittest.equals('foo')); |
469 } | 469 } |
470 | 470 |
471 buildUnnamed607() { | 471 buildUnnamed624() { |
472 var o = new core.List<core.String>(); | 472 var o = new core.List<core.String>(); |
473 o.add("foo"); | 473 o.add("foo"); |
474 o.add("foo"); | 474 o.add("foo"); |
475 return o; | 475 return o; |
476 } | 476 } |
477 | 477 |
478 checkUnnamed607(core.List<core.String> o) { | 478 checkUnnamed624(core.List<core.String> o) { |
479 unittest.expect(o, unittest.hasLength(2)); | 479 unittest.expect(o, unittest.hasLength(2)); |
480 unittest.expect(o[0], unittest.equals('foo')); | 480 unittest.expect(o[0], unittest.equals('foo')); |
481 unittest.expect(o[1], unittest.equals('foo')); | 481 unittest.expect(o[1], unittest.equals('foo')); |
482 } | 482 } |
483 | 483 |
484 buildUnnamed608() { | 484 buildUnnamed625() { |
485 var o = new core.List<core.String>(); | 485 var o = new core.List<core.String>(); |
486 o.add("foo"); | 486 o.add("foo"); |
487 o.add("foo"); | 487 o.add("foo"); |
488 return o; | 488 return o; |
489 } | 489 } |
490 | 490 |
491 checkUnnamed608(core.List<core.String> o) { | 491 checkUnnamed625(core.List<core.String> o) { |
492 unittest.expect(o, unittest.hasLength(2)); | 492 unittest.expect(o, unittest.hasLength(2)); |
493 unittest.expect(o[0], unittest.equals('foo')); | 493 unittest.expect(o[0], unittest.equals('foo')); |
494 unittest.expect(o[1], unittest.equals('foo')); | 494 unittest.expect(o[1], unittest.equals('foo')); |
495 } | 495 } |
496 | 496 |
497 core.int buildCounterApp = 0; | 497 core.int buildCounterApp = 0; |
498 buildApp() { | 498 buildApp() { |
499 var o = new api.App(); | 499 var o = new api.App(); |
500 buildCounterApp++; | 500 buildCounterApp++; |
501 if (buildCounterApp < 3) { | 501 if (buildCounterApp < 3) { |
502 o.authorized = true; | 502 o.authorized = true; |
503 o.createInFolderTemplate = "foo"; | 503 o.createInFolderTemplate = "foo"; |
504 o.createUrl = "foo"; | 504 o.createUrl = "foo"; |
505 o.hasDriveWideScope = true; | 505 o.hasDriveWideScope = true; |
506 o.icons = buildUnnamed604(); | 506 o.icons = buildUnnamed621(); |
507 o.id = "foo"; | 507 o.id = "foo"; |
508 o.installed = true; | 508 o.installed = true; |
509 o.kind = "foo"; | 509 o.kind = "foo"; |
510 o.longDescription = "foo"; | 510 o.longDescription = "foo"; |
511 o.name = "foo"; | 511 o.name = "foo"; |
512 o.objectType = "foo"; | 512 o.objectType = "foo"; |
513 o.openUrlTemplate = "foo"; | 513 o.openUrlTemplate = "foo"; |
514 o.primaryFileExtensions = buildUnnamed605(); | 514 o.primaryFileExtensions = buildUnnamed622(); |
515 o.primaryMimeTypes = buildUnnamed606(); | 515 o.primaryMimeTypes = buildUnnamed623(); |
516 o.productId = "foo"; | 516 o.productId = "foo"; |
517 o.productUrl = "foo"; | 517 o.productUrl = "foo"; |
518 o.secondaryFileExtensions = buildUnnamed607(); | 518 o.secondaryFileExtensions = buildUnnamed624(); |
519 o.secondaryMimeTypes = buildUnnamed608(); | 519 o.secondaryMimeTypes = buildUnnamed625(); |
520 o.shortDescription = "foo"; | 520 o.shortDescription = "foo"; |
521 o.supportsCreate = true; | 521 o.supportsCreate = true; |
522 o.supportsImport = true; | 522 o.supportsImport = true; |
523 o.supportsMultiOpen = true; | 523 o.supportsMultiOpen = true; |
524 o.supportsOfflineCreate = true; | 524 o.supportsOfflineCreate = true; |
525 o.useByDefault = true; | 525 o.useByDefault = true; |
526 } | 526 } |
527 buildCounterApp--; | 527 buildCounterApp--; |
528 return o; | 528 return o; |
529 } | 529 } |
530 | 530 |
531 checkApp(api.App o) { | 531 checkApp(api.App o) { |
532 buildCounterApp++; | 532 buildCounterApp++; |
533 if (buildCounterApp < 3) { | 533 if (buildCounterApp < 3) { |
534 unittest.expect(o.authorized, unittest.isTrue); | 534 unittest.expect(o.authorized, unittest.isTrue); |
535 unittest.expect(o.createInFolderTemplate, unittest.equals('foo')); | 535 unittest.expect(o.createInFolderTemplate, unittest.equals('foo')); |
536 unittest.expect(o.createUrl, unittest.equals('foo')); | 536 unittest.expect(o.createUrl, unittest.equals('foo')); |
537 unittest.expect(o.hasDriveWideScope, unittest.isTrue); | 537 unittest.expect(o.hasDriveWideScope, unittest.isTrue); |
538 checkUnnamed604(o.icons); | 538 checkUnnamed621(o.icons); |
539 unittest.expect(o.id, unittest.equals('foo')); | 539 unittest.expect(o.id, unittest.equals('foo')); |
540 unittest.expect(o.installed, unittest.isTrue); | 540 unittest.expect(o.installed, unittest.isTrue); |
541 unittest.expect(o.kind, unittest.equals('foo')); | 541 unittest.expect(o.kind, unittest.equals('foo')); |
542 unittest.expect(o.longDescription, unittest.equals('foo')); | 542 unittest.expect(o.longDescription, unittest.equals('foo')); |
543 unittest.expect(o.name, unittest.equals('foo')); | 543 unittest.expect(o.name, unittest.equals('foo')); |
544 unittest.expect(o.objectType, unittest.equals('foo')); | 544 unittest.expect(o.objectType, unittest.equals('foo')); |
545 unittest.expect(o.openUrlTemplate, unittest.equals('foo')); | 545 unittest.expect(o.openUrlTemplate, unittest.equals('foo')); |
546 checkUnnamed605(o.primaryFileExtensions); | 546 checkUnnamed622(o.primaryFileExtensions); |
547 checkUnnamed606(o.primaryMimeTypes); | 547 checkUnnamed623(o.primaryMimeTypes); |
548 unittest.expect(o.productId, unittest.equals('foo')); | 548 unittest.expect(o.productId, unittest.equals('foo')); |
549 unittest.expect(o.productUrl, unittest.equals('foo')); | 549 unittest.expect(o.productUrl, unittest.equals('foo')); |
550 checkUnnamed607(o.secondaryFileExtensions); | 550 checkUnnamed624(o.secondaryFileExtensions); |
551 checkUnnamed608(o.secondaryMimeTypes); | 551 checkUnnamed625(o.secondaryMimeTypes); |
552 unittest.expect(o.shortDescription, unittest.equals('foo')); | 552 unittest.expect(o.shortDescription, unittest.equals('foo')); |
553 unittest.expect(o.supportsCreate, unittest.isTrue); | 553 unittest.expect(o.supportsCreate, unittest.isTrue); |
554 unittest.expect(o.supportsImport, unittest.isTrue); | 554 unittest.expect(o.supportsImport, unittest.isTrue); |
555 unittest.expect(o.supportsMultiOpen, unittest.isTrue); | 555 unittest.expect(o.supportsMultiOpen, unittest.isTrue); |
556 unittest.expect(o.supportsOfflineCreate, unittest.isTrue); | 556 unittest.expect(o.supportsOfflineCreate, unittest.isTrue); |
557 unittest.expect(o.useByDefault, unittest.isTrue); | 557 unittest.expect(o.useByDefault, unittest.isTrue); |
558 } | 558 } |
559 buildCounterApp--; | 559 buildCounterApp--; |
560 } | 560 } |
561 | 561 |
562 buildUnnamed609() { | 562 buildUnnamed626() { |
563 var o = new core.List<core.String>(); | 563 var o = new core.List<core.String>(); |
564 o.add("foo"); | 564 o.add("foo"); |
565 o.add("foo"); | 565 o.add("foo"); |
566 return o; | 566 return o; |
567 } | 567 } |
568 | 568 |
569 checkUnnamed609(core.List<core.String> o) { | 569 checkUnnamed626(core.List<core.String> o) { |
570 unittest.expect(o, unittest.hasLength(2)); | 570 unittest.expect(o, unittest.hasLength(2)); |
571 unittest.expect(o[0], unittest.equals('foo')); | 571 unittest.expect(o[0], unittest.equals('foo')); |
572 unittest.expect(o[1], unittest.equals('foo')); | 572 unittest.expect(o[1], unittest.equals('foo')); |
573 } | 573 } |
574 | 574 |
575 buildUnnamed610() { | 575 buildUnnamed627() { |
576 var o = new core.List<api.App>(); | 576 var o = new core.List<api.App>(); |
577 o.add(buildApp()); | 577 o.add(buildApp()); |
578 o.add(buildApp()); | 578 o.add(buildApp()); |
579 return o; | 579 return o; |
580 } | 580 } |
581 | 581 |
582 checkUnnamed610(core.List<api.App> o) { | 582 checkUnnamed627(core.List<api.App> o) { |
583 unittest.expect(o, unittest.hasLength(2)); | 583 unittest.expect(o, unittest.hasLength(2)); |
584 checkApp(o[0]); | 584 checkApp(o[0]); |
585 checkApp(o[1]); | 585 checkApp(o[1]); |
586 } | 586 } |
587 | 587 |
588 core.int buildCounterAppList = 0; | 588 core.int buildCounterAppList = 0; |
589 buildAppList() { | 589 buildAppList() { |
590 var o = new api.AppList(); | 590 var o = new api.AppList(); |
591 buildCounterAppList++; | 591 buildCounterAppList++; |
592 if (buildCounterAppList < 3) { | 592 if (buildCounterAppList < 3) { |
593 o.defaultAppIds = buildUnnamed609(); | 593 o.defaultAppIds = buildUnnamed626(); |
594 o.etag = "foo"; | 594 o.etag = "foo"; |
595 o.items = buildUnnamed610(); | 595 o.items = buildUnnamed627(); |
596 o.kind = "foo"; | 596 o.kind = "foo"; |
597 o.selfLink = "foo"; | 597 o.selfLink = "foo"; |
598 } | 598 } |
599 buildCounterAppList--; | 599 buildCounterAppList--; |
600 return o; | 600 return o; |
601 } | 601 } |
602 | 602 |
603 checkAppList(api.AppList o) { | 603 checkAppList(api.AppList o) { |
604 buildCounterAppList++; | 604 buildCounterAppList++; |
605 if (buildCounterAppList < 3) { | 605 if (buildCounterAppList < 3) { |
606 checkUnnamed609(o.defaultAppIds); | 606 checkUnnamed626(o.defaultAppIds); |
607 unittest.expect(o.etag, unittest.equals('foo')); | 607 unittest.expect(o.etag, unittest.equals('foo')); |
608 checkUnnamed610(o.items); | 608 checkUnnamed627(o.items); |
609 unittest.expect(o.kind, unittest.equals('foo')); | 609 unittest.expect(o.kind, unittest.equals('foo')); |
610 unittest.expect(o.selfLink, unittest.equals('foo')); | 610 unittest.expect(o.selfLink, unittest.equals('foo')); |
611 } | 611 } |
612 buildCounterAppList--; | 612 buildCounterAppList--; |
613 } | 613 } |
614 | 614 |
615 core.int buildCounterChange = 0; | 615 core.int buildCounterChange = 0; |
616 buildChange() { | 616 buildChange() { |
617 var o = new api.Change(); | 617 var o = new api.Change(); |
618 buildCounterChange++; | 618 buildCounterChange++; |
619 if (buildCounterChange < 3) { | 619 if (buildCounterChange < 3) { |
620 o.deleted = true; | 620 o.deleted = true; |
621 o.file = buildFile(); | 621 o.file = buildFile(); |
622 o.fileId = "foo"; | 622 o.fileId = "foo"; |
623 o.id = "foo"; | 623 o.id = "foo"; |
624 o.kind = "foo"; | 624 o.kind = "foo"; |
625 o.modificationDate = core.DateTime.parse("2002-02-27T14:01:02"); | 625 o.modificationDate = core.DateTime.parse("2002-02-27T14:01:02"); |
626 o.selfLink = "foo"; | 626 o.selfLink = "foo"; |
| 627 o.teamDrive = buildTeamDrive(); |
| 628 o.teamDriveId = "foo"; |
| 629 o.type = "foo"; |
627 } | 630 } |
628 buildCounterChange--; | 631 buildCounterChange--; |
629 return o; | 632 return o; |
630 } | 633 } |
631 | 634 |
632 checkChange(api.Change o) { | 635 checkChange(api.Change o) { |
633 buildCounterChange++; | 636 buildCounterChange++; |
634 if (buildCounterChange < 3) { | 637 if (buildCounterChange < 3) { |
635 unittest.expect(o.deleted, unittest.isTrue); | 638 unittest.expect(o.deleted, unittest.isTrue); |
636 checkFile(o.file); | 639 checkFile(o.file); |
637 unittest.expect(o.fileId, unittest.equals('foo')); | 640 unittest.expect(o.fileId, unittest.equals('foo')); |
638 unittest.expect(o.id, unittest.equals('foo')); | 641 unittest.expect(o.id, unittest.equals('foo')); |
639 unittest.expect(o.kind, unittest.equals('foo')); | 642 unittest.expect(o.kind, unittest.equals('foo')); |
640 unittest.expect(o.modificationDate, unittest.equals(core.DateTime.parse("200
2-02-27T14:01:02"))); | 643 unittest.expect(o.modificationDate, unittest.equals(core.DateTime.parse("200
2-02-27T14:01:02"))); |
641 unittest.expect(o.selfLink, unittest.equals('foo')); | 644 unittest.expect(o.selfLink, unittest.equals('foo')); |
| 645 checkTeamDrive(o.teamDrive); |
| 646 unittest.expect(o.teamDriveId, unittest.equals('foo')); |
| 647 unittest.expect(o.type, unittest.equals('foo')); |
642 } | 648 } |
643 buildCounterChange--; | 649 buildCounterChange--; |
644 } | 650 } |
645 | 651 |
646 buildUnnamed611() { | 652 buildUnnamed628() { |
647 var o = new core.List<api.Change>(); | 653 var o = new core.List<api.Change>(); |
648 o.add(buildChange()); | 654 o.add(buildChange()); |
649 o.add(buildChange()); | 655 o.add(buildChange()); |
650 return o; | 656 return o; |
651 } | 657 } |
652 | 658 |
653 checkUnnamed611(core.List<api.Change> o) { | 659 checkUnnamed628(core.List<api.Change> o) { |
654 unittest.expect(o, unittest.hasLength(2)); | 660 unittest.expect(o, unittest.hasLength(2)); |
655 checkChange(o[0]); | 661 checkChange(o[0]); |
656 checkChange(o[1]); | 662 checkChange(o[1]); |
657 } | 663 } |
658 | 664 |
659 core.int buildCounterChangeList = 0; | 665 core.int buildCounterChangeList = 0; |
660 buildChangeList() { | 666 buildChangeList() { |
661 var o = new api.ChangeList(); | 667 var o = new api.ChangeList(); |
662 buildCounterChangeList++; | 668 buildCounterChangeList++; |
663 if (buildCounterChangeList < 3) { | 669 if (buildCounterChangeList < 3) { |
664 o.etag = "foo"; | 670 o.etag = "foo"; |
665 o.items = buildUnnamed611(); | 671 o.items = buildUnnamed628(); |
666 o.kind = "foo"; | 672 o.kind = "foo"; |
667 o.largestChangeId = "foo"; | 673 o.largestChangeId = "foo"; |
| 674 o.newStartPageToken = "foo"; |
668 o.nextLink = "foo"; | 675 o.nextLink = "foo"; |
669 o.nextPageToken = "foo"; | 676 o.nextPageToken = "foo"; |
670 o.selfLink = "foo"; | 677 o.selfLink = "foo"; |
671 } | 678 } |
672 buildCounterChangeList--; | 679 buildCounterChangeList--; |
673 return o; | 680 return o; |
674 } | 681 } |
675 | 682 |
676 checkChangeList(api.ChangeList o) { | 683 checkChangeList(api.ChangeList o) { |
677 buildCounterChangeList++; | 684 buildCounterChangeList++; |
678 if (buildCounterChangeList < 3) { | 685 if (buildCounterChangeList < 3) { |
679 unittest.expect(o.etag, unittest.equals('foo')); | 686 unittest.expect(o.etag, unittest.equals('foo')); |
680 checkUnnamed611(o.items); | 687 checkUnnamed628(o.items); |
681 unittest.expect(o.kind, unittest.equals('foo')); | 688 unittest.expect(o.kind, unittest.equals('foo')); |
682 unittest.expect(o.largestChangeId, unittest.equals('foo')); | 689 unittest.expect(o.largestChangeId, unittest.equals('foo')); |
| 690 unittest.expect(o.newStartPageToken, unittest.equals('foo')); |
683 unittest.expect(o.nextLink, unittest.equals('foo')); | 691 unittest.expect(o.nextLink, unittest.equals('foo')); |
684 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 692 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
685 unittest.expect(o.selfLink, unittest.equals('foo')); | 693 unittest.expect(o.selfLink, unittest.equals('foo')); |
686 } | 694 } |
687 buildCounterChangeList--; | 695 buildCounterChangeList--; |
688 } | 696 } |
689 | 697 |
690 buildUnnamed612() { | 698 buildUnnamed629() { |
691 var o = new core.Map<core.String, core.String>(); | 699 var o = new core.Map<core.String, core.String>(); |
692 o["x"] = "foo"; | 700 o["x"] = "foo"; |
693 o["y"] = "foo"; | 701 o["y"] = "foo"; |
694 return o; | 702 return o; |
695 } | 703 } |
696 | 704 |
697 checkUnnamed612(core.Map<core.String, core.String> o) { | 705 checkUnnamed629(core.Map<core.String, core.String> o) { |
698 unittest.expect(o, unittest.hasLength(2)); | 706 unittest.expect(o, unittest.hasLength(2)); |
699 unittest.expect(o["x"], unittest.equals('foo')); | 707 unittest.expect(o["x"], unittest.equals('foo')); |
700 unittest.expect(o["y"], unittest.equals('foo')); | 708 unittest.expect(o["y"], unittest.equals('foo')); |
701 } | 709 } |
702 | 710 |
703 core.int buildCounterChannel = 0; | 711 core.int buildCounterChannel = 0; |
704 buildChannel() { | 712 buildChannel() { |
705 var o = new api.Channel(); | 713 var o = new api.Channel(); |
706 buildCounterChannel++; | 714 buildCounterChannel++; |
707 if (buildCounterChannel < 3) { | 715 if (buildCounterChannel < 3) { |
708 o.address = "foo"; | 716 o.address = "foo"; |
709 o.expiration = "foo"; | 717 o.expiration = "foo"; |
710 o.id = "foo"; | 718 o.id = "foo"; |
711 o.kind = "foo"; | 719 o.kind = "foo"; |
712 o.params = buildUnnamed612(); | 720 o.params = buildUnnamed629(); |
713 o.payload = true; | 721 o.payload = true; |
714 o.resourceId = "foo"; | 722 o.resourceId = "foo"; |
715 o.resourceUri = "foo"; | 723 o.resourceUri = "foo"; |
716 o.token = "foo"; | 724 o.token = "foo"; |
717 o.type = "foo"; | 725 o.type = "foo"; |
718 } | 726 } |
719 buildCounterChannel--; | 727 buildCounterChannel--; |
720 return o; | 728 return o; |
721 } | 729 } |
722 | 730 |
723 checkChannel(api.Channel o) { | 731 checkChannel(api.Channel o) { |
724 buildCounterChannel++; | 732 buildCounterChannel++; |
725 if (buildCounterChannel < 3) { | 733 if (buildCounterChannel < 3) { |
726 unittest.expect(o.address, unittest.equals('foo')); | 734 unittest.expect(o.address, unittest.equals('foo')); |
727 unittest.expect(o.expiration, unittest.equals('foo')); | 735 unittest.expect(o.expiration, unittest.equals('foo')); |
728 unittest.expect(o.id, unittest.equals('foo')); | 736 unittest.expect(o.id, unittest.equals('foo')); |
729 unittest.expect(o.kind, unittest.equals('foo')); | 737 unittest.expect(o.kind, unittest.equals('foo')); |
730 checkUnnamed612(o.params); | 738 checkUnnamed629(o.params); |
731 unittest.expect(o.payload, unittest.isTrue); | 739 unittest.expect(o.payload, unittest.isTrue); |
732 unittest.expect(o.resourceId, unittest.equals('foo')); | 740 unittest.expect(o.resourceId, unittest.equals('foo')); |
733 unittest.expect(o.resourceUri, unittest.equals('foo')); | 741 unittest.expect(o.resourceUri, unittest.equals('foo')); |
734 unittest.expect(o.token, unittest.equals('foo')); | 742 unittest.expect(o.token, unittest.equals('foo')); |
735 unittest.expect(o.type, unittest.equals('foo')); | 743 unittest.expect(o.type, unittest.equals('foo')); |
736 } | 744 } |
737 buildCounterChannel--; | 745 buildCounterChannel--; |
738 } | 746 } |
739 | 747 |
740 buildUnnamed613() { | 748 buildUnnamed630() { |
741 var o = new core.List<api.ChildReference>(); | 749 var o = new core.List<api.ChildReference>(); |
742 o.add(buildChildReference()); | 750 o.add(buildChildReference()); |
743 o.add(buildChildReference()); | 751 o.add(buildChildReference()); |
744 return o; | 752 return o; |
745 } | 753 } |
746 | 754 |
747 checkUnnamed613(core.List<api.ChildReference> o) { | 755 checkUnnamed630(core.List<api.ChildReference> o) { |
748 unittest.expect(o, unittest.hasLength(2)); | 756 unittest.expect(o, unittest.hasLength(2)); |
749 checkChildReference(o[0]); | 757 checkChildReference(o[0]); |
750 checkChildReference(o[1]); | 758 checkChildReference(o[1]); |
751 } | 759 } |
752 | 760 |
753 core.int buildCounterChildList = 0; | 761 core.int buildCounterChildList = 0; |
754 buildChildList() { | 762 buildChildList() { |
755 var o = new api.ChildList(); | 763 var o = new api.ChildList(); |
756 buildCounterChildList++; | 764 buildCounterChildList++; |
757 if (buildCounterChildList < 3) { | 765 if (buildCounterChildList < 3) { |
758 o.etag = "foo"; | 766 o.etag = "foo"; |
759 o.items = buildUnnamed613(); | 767 o.items = buildUnnamed630(); |
760 o.kind = "foo"; | 768 o.kind = "foo"; |
761 o.nextLink = "foo"; | 769 o.nextLink = "foo"; |
762 o.nextPageToken = "foo"; | 770 o.nextPageToken = "foo"; |
763 o.selfLink = "foo"; | 771 o.selfLink = "foo"; |
764 } | 772 } |
765 buildCounterChildList--; | 773 buildCounterChildList--; |
766 return o; | 774 return o; |
767 } | 775 } |
768 | 776 |
769 checkChildList(api.ChildList o) { | 777 checkChildList(api.ChildList o) { |
770 buildCounterChildList++; | 778 buildCounterChildList++; |
771 if (buildCounterChildList < 3) { | 779 if (buildCounterChildList < 3) { |
772 unittest.expect(o.etag, unittest.equals('foo')); | 780 unittest.expect(o.etag, unittest.equals('foo')); |
773 checkUnnamed613(o.items); | 781 checkUnnamed630(o.items); |
774 unittest.expect(o.kind, unittest.equals('foo')); | 782 unittest.expect(o.kind, unittest.equals('foo')); |
775 unittest.expect(o.nextLink, unittest.equals('foo')); | 783 unittest.expect(o.nextLink, unittest.equals('foo')); |
776 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 784 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
777 unittest.expect(o.selfLink, unittest.equals('foo')); | 785 unittest.expect(o.selfLink, unittest.equals('foo')); |
778 } | 786 } |
779 buildCounterChildList--; | 787 buildCounterChildList--; |
780 } | 788 } |
781 | 789 |
782 core.int buildCounterChildReference = 0; | 790 core.int buildCounterChildReference = 0; |
783 buildChildReference() { | 791 buildChildReference() { |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
818 | 826 |
819 checkCommentContext(api.CommentContext o) { | 827 checkCommentContext(api.CommentContext o) { |
820 buildCounterCommentContext++; | 828 buildCounterCommentContext++; |
821 if (buildCounterCommentContext < 3) { | 829 if (buildCounterCommentContext < 3) { |
822 unittest.expect(o.type, unittest.equals('foo')); | 830 unittest.expect(o.type, unittest.equals('foo')); |
823 unittest.expect(o.value, unittest.equals('foo')); | 831 unittest.expect(o.value, unittest.equals('foo')); |
824 } | 832 } |
825 buildCounterCommentContext--; | 833 buildCounterCommentContext--; |
826 } | 834 } |
827 | 835 |
828 buildUnnamed614() { | 836 buildUnnamed631() { |
829 var o = new core.List<api.CommentReply>(); | 837 var o = new core.List<api.CommentReply>(); |
830 o.add(buildCommentReply()); | 838 o.add(buildCommentReply()); |
831 o.add(buildCommentReply()); | 839 o.add(buildCommentReply()); |
832 return o; | 840 return o; |
833 } | 841 } |
834 | 842 |
835 checkUnnamed614(core.List<api.CommentReply> o) { | 843 checkUnnamed631(core.List<api.CommentReply> o) { |
836 unittest.expect(o, unittest.hasLength(2)); | 844 unittest.expect(o, unittest.hasLength(2)); |
837 checkCommentReply(o[0]); | 845 checkCommentReply(o[0]); |
838 checkCommentReply(o[1]); | 846 checkCommentReply(o[1]); |
839 } | 847 } |
840 | 848 |
841 core.int buildCounterComment = 0; | 849 core.int buildCounterComment = 0; |
842 buildComment() { | 850 buildComment() { |
843 var o = new api.Comment(); | 851 var o = new api.Comment(); |
844 buildCounterComment++; | 852 buildCounterComment++; |
845 if (buildCounterComment < 3) { | 853 if (buildCounterComment < 3) { |
846 o.anchor = "foo"; | 854 o.anchor = "foo"; |
847 o.author = buildUser(); | 855 o.author = buildUser(); |
848 o.commentId = "foo"; | 856 o.commentId = "foo"; |
849 o.content = "foo"; | 857 o.content = "foo"; |
850 o.context = buildCommentContext(); | 858 o.context = buildCommentContext(); |
851 o.createdDate = core.DateTime.parse("2002-02-27T14:01:02"); | 859 o.createdDate = core.DateTime.parse("2002-02-27T14:01:02"); |
852 o.deleted = true; | 860 o.deleted = true; |
853 o.fileId = "foo"; | 861 o.fileId = "foo"; |
854 o.fileTitle = "foo"; | 862 o.fileTitle = "foo"; |
855 o.htmlContent = "foo"; | 863 o.htmlContent = "foo"; |
856 o.kind = "foo"; | 864 o.kind = "foo"; |
857 o.modifiedDate = core.DateTime.parse("2002-02-27T14:01:02"); | 865 o.modifiedDate = core.DateTime.parse("2002-02-27T14:01:02"); |
858 o.replies = buildUnnamed614(); | 866 o.replies = buildUnnamed631(); |
859 o.selfLink = "foo"; | 867 o.selfLink = "foo"; |
860 o.status = "foo"; | 868 o.status = "foo"; |
861 } | 869 } |
862 buildCounterComment--; | 870 buildCounterComment--; |
863 return o; | 871 return o; |
864 } | 872 } |
865 | 873 |
866 checkComment(api.Comment o) { | 874 checkComment(api.Comment o) { |
867 buildCounterComment++; | 875 buildCounterComment++; |
868 if (buildCounterComment < 3) { | 876 if (buildCounterComment < 3) { |
869 unittest.expect(o.anchor, unittest.equals('foo')); | 877 unittest.expect(o.anchor, unittest.equals('foo')); |
870 checkUser(o.author); | 878 checkUser(o.author); |
871 unittest.expect(o.commentId, unittest.equals('foo')); | 879 unittest.expect(o.commentId, unittest.equals('foo')); |
872 unittest.expect(o.content, unittest.equals('foo')); | 880 unittest.expect(o.content, unittest.equals('foo')); |
873 checkCommentContext(o.context); | 881 checkCommentContext(o.context); |
874 unittest.expect(o.createdDate, unittest.equals(core.DateTime.parse("2002-02-
27T14:01:02"))); | 882 unittest.expect(o.createdDate, unittest.equals(core.DateTime.parse("2002-02-
27T14:01:02"))); |
875 unittest.expect(o.deleted, unittest.isTrue); | 883 unittest.expect(o.deleted, unittest.isTrue); |
876 unittest.expect(o.fileId, unittest.equals('foo')); | 884 unittest.expect(o.fileId, unittest.equals('foo')); |
877 unittest.expect(o.fileTitle, unittest.equals('foo')); | 885 unittest.expect(o.fileTitle, unittest.equals('foo')); |
878 unittest.expect(o.htmlContent, unittest.equals('foo')); | 886 unittest.expect(o.htmlContent, unittest.equals('foo')); |
879 unittest.expect(o.kind, unittest.equals('foo')); | 887 unittest.expect(o.kind, unittest.equals('foo')); |
880 unittest.expect(o.modifiedDate, unittest.equals(core.DateTime.parse("2002-02
-27T14:01:02"))); | 888 unittest.expect(o.modifiedDate, unittest.equals(core.DateTime.parse("2002-02
-27T14:01:02"))); |
881 checkUnnamed614(o.replies); | 889 checkUnnamed631(o.replies); |
882 unittest.expect(o.selfLink, unittest.equals('foo')); | 890 unittest.expect(o.selfLink, unittest.equals('foo')); |
883 unittest.expect(o.status, unittest.equals('foo')); | 891 unittest.expect(o.status, unittest.equals('foo')); |
884 } | 892 } |
885 buildCounterComment--; | 893 buildCounterComment--; |
886 } | 894 } |
887 | 895 |
888 buildUnnamed615() { | 896 buildUnnamed632() { |
889 var o = new core.List<api.Comment>(); | 897 var o = new core.List<api.Comment>(); |
890 o.add(buildComment()); | 898 o.add(buildComment()); |
891 o.add(buildComment()); | 899 o.add(buildComment()); |
892 return o; | 900 return o; |
893 } | 901 } |
894 | 902 |
895 checkUnnamed615(core.List<api.Comment> o) { | 903 checkUnnamed632(core.List<api.Comment> o) { |
896 unittest.expect(o, unittest.hasLength(2)); | 904 unittest.expect(o, unittest.hasLength(2)); |
897 checkComment(o[0]); | 905 checkComment(o[0]); |
898 checkComment(o[1]); | 906 checkComment(o[1]); |
899 } | 907 } |
900 | 908 |
901 core.int buildCounterCommentList = 0; | 909 core.int buildCounterCommentList = 0; |
902 buildCommentList() { | 910 buildCommentList() { |
903 var o = new api.CommentList(); | 911 var o = new api.CommentList(); |
904 buildCounterCommentList++; | 912 buildCounterCommentList++; |
905 if (buildCounterCommentList < 3) { | 913 if (buildCounterCommentList < 3) { |
906 o.items = buildUnnamed615(); | 914 o.items = buildUnnamed632(); |
907 o.kind = "foo"; | 915 o.kind = "foo"; |
908 o.nextLink = "foo"; | 916 o.nextLink = "foo"; |
909 o.nextPageToken = "foo"; | 917 o.nextPageToken = "foo"; |
910 o.selfLink = "foo"; | 918 o.selfLink = "foo"; |
911 } | 919 } |
912 buildCounterCommentList--; | 920 buildCounterCommentList--; |
913 return o; | 921 return o; |
914 } | 922 } |
915 | 923 |
916 checkCommentList(api.CommentList o) { | 924 checkCommentList(api.CommentList o) { |
917 buildCounterCommentList++; | 925 buildCounterCommentList++; |
918 if (buildCounterCommentList < 3) { | 926 if (buildCounterCommentList < 3) { |
919 checkUnnamed615(o.items); | 927 checkUnnamed632(o.items); |
920 unittest.expect(o.kind, unittest.equals('foo')); | 928 unittest.expect(o.kind, unittest.equals('foo')); |
921 unittest.expect(o.nextLink, unittest.equals('foo')); | 929 unittest.expect(o.nextLink, unittest.equals('foo')); |
922 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 930 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
923 unittest.expect(o.selfLink, unittest.equals('foo')); | 931 unittest.expect(o.selfLink, unittest.equals('foo')); |
924 } | 932 } |
925 buildCounterCommentList--; | 933 buildCounterCommentList--; |
926 } | 934 } |
927 | 935 |
928 core.int buildCounterCommentReply = 0; | 936 core.int buildCounterCommentReply = 0; |
929 buildCommentReply() { | 937 buildCommentReply() { |
(...skipping 23 matching lines...) Expand all Loading... |
953 unittest.expect(o.deleted, unittest.isTrue); | 961 unittest.expect(o.deleted, unittest.isTrue); |
954 unittest.expect(o.htmlContent, unittest.equals('foo')); | 962 unittest.expect(o.htmlContent, unittest.equals('foo')); |
955 unittest.expect(o.kind, unittest.equals('foo')); | 963 unittest.expect(o.kind, unittest.equals('foo')); |
956 unittest.expect(o.modifiedDate, unittest.equals(core.DateTime.parse("2002-02
-27T14:01:02"))); | 964 unittest.expect(o.modifiedDate, unittest.equals(core.DateTime.parse("2002-02
-27T14:01:02"))); |
957 unittest.expect(o.replyId, unittest.equals('foo')); | 965 unittest.expect(o.replyId, unittest.equals('foo')); |
958 unittest.expect(o.verb, unittest.equals('foo')); | 966 unittest.expect(o.verb, unittest.equals('foo')); |
959 } | 967 } |
960 buildCounterCommentReply--; | 968 buildCounterCommentReply--; |
961 } | 969 } |
962 | 970 |
963 buildUnnamed616() { | 971 buildUnnamed633() { |
964 var o = new core.List<api.CommentReply>(); | 972 var o = new core.List<api.CommentReply>(); |
965 o.add(buildCommentReply()); | 973 o.add(buildCommentReply()); |
966 o.add(buildCommentReply()); | 974 o.add(buildCommentReply()); |
967 return o; | 975 return o; |
968 } | 976 } |
969 | 977 |
970 checkUnnamed616(core.List<api.CommentReply> o) { | 978 checkUnnamed633(core.List<api.CommentReply> o) { |
971 unittest.expect(o, unittest.hasLength(2)); | 979 unittest.expect(o, unittest.hasLength(2)); |
972 checkCommentReply(o[0]); | 980 checkCommentReply(o[0]); |
973 checkCommentReply(o[1]); | 981 checkCommentReply(o[1]); |
974 } | 982 } |
975 | 983 |
976 core.int buildCounterCommentReplyList = 0; | 984 core.int buildCounterCommentReplyList = 0; |
977 buildCommentReplyList() { | 985 buildCommentReplyList() { |
978 var o = new api.CommentReplyList(); | 986 var o = new api.CommentReplyList(); |
979 buildCounterCommentReplyList++; | 987 buildCounterCommentReplyList++; |
980 if (buildCounterCommentReplyList < 3) { | 988 if (buildCounterCommentReplyList < 3) { |
981 o.items = buildUnnamed616(); | 989 o.items = buildUnnamed633(); |
982 o.kind = "foo"; | 990 o.kind = "foo"; |
983 o.nextLink = "foo"; | 991 o.nextLink = "foo"; |
984 o.nextPageToken = "foo"; | 992 o.nextPageToken = "foo"; |
985 o.selfLink = "foo"; | 993 o.selfLink = "foo"; |
986 } | 994 } |
987 buildCounterCommentReplyList--; | 995 buildCounterCommentReplyList--; |
988 return o; | 996 return o; |
989 } | 997 } |
990 | 998 |
991 checkCommentReplyList(api.CommentReplyList o) { | 999 checkCommentReplyList(api.CommentReplyList o) { |
992 buildCounterCommentReplyList++; | 1000 buildCounterCommentReplyList++; |
993 if (buildCounterCommentReplyList < 3) { | 1001 if (buildCounterCommentReplyList < 3) { |
994 checkUnnamed616(o.items); | 1002 checkUnnamed633(o.items); |
995 unittest.expect(o.kind, unittest.equals('foo')); | 1003 unittest.expect(o.kind, unittest.equals('foo')); |
996 unittest.expect(o.nextLink, unittest.equals('foo')); | 1004 unittest.expect(o.nextLink, unittest.equals('foo')); |
997 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 1005 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
998 unittest.expect(o.selfLink, unittest.equals('foo')); | 1006 unittest.expect(o.selfLink, unittest.equals('foo')); |
999 } | 1007 } |
1000 buildCounterCommentReplyList--; | 1008 buildCounterCommentReplyList--; |
1001 } | 1009 } |
1002 | 1010 |
1003 buildUnnamed617() { | 1011 core.int buildCounterFileCapabilities = 0; |
| 1012 buildFileCapabilities() { |
| 1013 var o = new api.FileCapabilities(); |
| 1014 buildCounterFileCapabilities++; |
| 1015 if (buildCounterFileCapabilities < 3) { |
| 1016 o.canAddChildren = true; |
| 1017 o.canComment = true; |
| 1018 o.canCopy = true; |
| 1019 o.canDelete = true; |
| 1020 o.canDownload = true; |
| 1021 o.canEdit = true; |
| 1022 o.canListChildren = true; |
| 1023 o.canMoveItemIntoTeamDrive = true; |
| 1024 o.canMoveTeamDriveItem = true; |
| 1025 o.canReadRevisions = true; |
| 1026 o.canReadTeamDrive = true; |
| 1027 o.canRemoveChildren = true; |
| 1028 o.canRename = true; |
| 1029 o.canShare = true; |
| 1030 o.canTrash = true; |
| 1031 o.canUntrash = true; |
| 1032 } |
| 1033 buildCounterFileCapabilities--; |
| 1034 return o; |
| 1035 } |
| 1036 |
| 1037 checkFileCapabilities(api.FileCapabilities o) { |
| 1038 buildCounterFileCapabilities++; |
| 1039 if (buildCounterFileCapabilities < 3) { |
| 1040 unittest.expect(o.canAddChildren, unittest.isTrue); |
| 1041 unittest.expect(o.canComment, unittest.isTrue); |
| 1042 unittest.expect(o.canCopy, unittest.isTrue); |
| 1043 unittest.expect(o.canDelete, unittest.isTrue); |
| 1044 unittest.expect(o.canDownload, unittest.isTrue); |
| 1045 unittest.expect(o.canEdit, unittest.isTrue); |
| 1046 unittest.expect(o.canListChildren, unittest.isTrue); |
| 1047 unittest.expect(o.canMoveItemIntoTeamDrive, unittest.isTrue); |
| 1048 unittest.expect(o.canMoveTeamDriveItem, unittest.isTrue); |
| 1049 unittest.expect(o.canReadRevisions, unittest.isTrue); |
| 1050 unittest.expect(o.canReadTeamDrive, unittest.isTrue); |
| 1051 unittest.expect(o.canRemoveChildren, unittest.isTrue); |
| 1052 unittest.expect(o.canRename, unittest.isTrue); |
| 1053 unittest.expect(o.canShare, unittest.isTrue); |
| 1054 unittest.expect(o.canTrash, unittest.isTrue); |
| 1055 unittest.expect(o.canUntrash, unittest.isTrue); |
| 1056 } |
| 1057 buildCounterFileCapabilities--; |
| 1058 } |
| 1059 |
| 1060 buildUnnamed634() { |
1004 var o = new core.Map<core.String, core.String>(); | 1061 var o = new core.Map<core.String, core.String>(); |
1005 o["x"] = "foo"; | 1062 o["x"] = "foo"; |
1006 o["y"] = "foo"; | 1063 o["y"] = "foo"; |
1007 return o; | 1064 return o; |
1008 } | 1065 } |
1009 | 1066 |
1010 checkUnnamed617(core.Map<core.String, core.String> o) { | 1067 checkUnnamed634(core.Map<core.String, core.String> o) { |
1011 unittest.expect(o, unittest.hasLength(2)); | 1068 unittest.expect(o, unittest.hasLength(2)); |
1012 unittest.expect(o["x"], unittest.equals('foo')); | 1069 unittest.expect(o["x"], unittest.equals('foo')); |
1013 unittest.expect(o["y"], unittest.equals('foo')); | 1070 unittest.expect(o["y"], unittest.equals('foo')); |
1014 } | 1071 } |
1015 | 1072 |
1016 core.int buildCounterFileImageMediaMetadataLocation = 0; | 1073 core.int buildCounterFileImageMediaMetadataLocation = 0; |
1017 buildFileImageMediaMetadataLocation() { | 1074 buildFileImageMediaMetadataLocation() { |
1018 var o = new api.FileImageMediaMetadataLocation(); | 1075 var o = new api.FileImageMediaMetadataLocation(); |
1019 buildCounterFileImageMediaMetadataLocation++; | 1076 buildCounterFileImageMediaMetadataLocation++; |
1020 if (buildCounterFileImageMediaMetadataLocation < 3) { | 1077 if (buildCounterFileImageMediaMetadataLocation < 3) { |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1136 unittest.expect(o.hidden, unittest.isTrue); | 1193 unittest.expect(o.hidden, unittest.isTrue); |
1137 unittest.expect(o.modified, unittest.isTrue); | 1194 unittest.expect(o.modified, unittest.isTrue); |
1138 unittest.expect(o.restricted, unittest.isTrue); | 1195 unittest.expect(o.restricted, unittest.isTrue); |
1139 unittest.expect(o.starred, unittest.isTrue); | 1196 unittest.expect(o.starred, unittest.isTrue); |
1140 unittest.expect(o.trashed, unittest.isTrue); | 1197 unittest.expect(o.trashed, unittest.isTrue); |
1141 unittest.expect(o.viewed, unittest.isTrue); | 1198 unittest.expect(o.viewed, unittest.isTrue); |
1142 } | 1199 } |
1143 buildCounterFileLabels--; | 1200 buildCounterFileLabels--; |
1144 } | 1201 } |
1145 | 1202 |
1146 buildUnnamed618() { | 1203 buildUnnamed635() { |
1147 var o = new core.Map<core.String, core.String>(); | 1204 var o = new core.Map<core.String, core.String>(); |
1148 o["x"] = "foo"; | 1205 o["x"] = "foo"; |
1149 o["y"] = "foo"; | 1206 o["y"] = "foo"; |
1150 return o; | 1207 return o; |
1151 } | 1208 } |
1152 | 1209 |
1153 checkUnnamed618(core.Map<core.String, core.String> o) { | 1210 checkUnnamed635(core.Map<core.String, core.String> o) { |
1154 unittest.expect(o, unittest.hasLength(2)); | 1211 unittest.expect(o, unittest.hasLength(2)); |
1155 unittest.expect(o["x"], unittest.equals('foo')); | 1212 unittest.expect(o["x"], unittest.equals('foo')); |
1156 unittest.expect(o["y"], unittest.equals('foo')); | 1213 unittest.expect(o["y"], unittest.equals('foo')); |
1157 } | 1214 } |
1158 | 1215 |
1159 buildUnnamed619() { | 1216 buildUnnamed636() { |
1160 var o = new core.List<core.String>(); | 1217 var o = new core.List<core.String>(); |
1161 o.add("foo"); | 1218 o.add("foo"); |
1162 o.add("foo"); | 1219 o.add("foo"); |
1163 return o; | 1220 return o; |
1164 } | 1221 } |
1165 | 1222 |
1166 checkUnnamed619(core.List<core.String> o) { | 1223 checkUnnamed636(core.List<core.String> o) { |
1167 unittest.expect(o, unittest.hasLength(2)); | 1224 unittest.expect(o, unittest.hasLength(2)); |
1168 unittest.expect(o[0], unittest.equals('foo')); | 1225 unittest.expect(o[0], unittest.equals('foo')); |
1169 unittest.expect(o[1], unittest.equals('foo')); | 1226 unittest.expect(o[1], unittest.equals('foo')); |
1170 } | 1227 } |
1171 | 1228 |
1172 buildUnnamed620() { | 1229 buildUnnamed637() { |
1173 var o = new core.List<api.User>(); | 1230 var o = new core.List<api.User>(); |
1174 o.add(buildUser()); | 1231 o.add(buildUser()); |
1175 o.add(buildUser()); | 1232 o.add(buildUser()); |
1176 return o; | 1233 return o; |
1177 } | 1234 } |
1178 | 1235 |
1179 checkUnnamed620(core.List<api.User> o) { | 1236 checkUnnamed637(core.List<api.User> o) { |
1180 unittest.expect(o, unittest.hasLength(2)); | 1237 unittest.expect(o, unittest.hasLength(2)); |
1181 checkUser(o[0]); | 1238 checkUser(o[0]); |
1182 checkUser(o[1]); | 1239 checkUser(o[1]); |
1183 } | 1240 } |
1184 | 1241 |
1185 buildUnnamed621() { | 1242 buildUnnamed638() { |
1186 var o = new core.List<api.ParentReference>(); | 1243 var o = new core.List<api.ParentReference>(); |
1187 o.add(buildParentReference()); | 1244 o.add(buildParentReference()); |
1188 o.add(buildParentReference()); | 1245 o.add(buildParentReference()); |
1189 return o; | 1246 return o; |
1190 } | 1247 } |
1191 | 1248 |
1192 checkUnnamed621(core.List<api.ParentReference> o) { | 1249 checkUnnamed638(core.List<api.ParentReference> o) { |
1193 unittest.expect(o, unittest.hasLength(2)); | 1250 unittest.expect(o, unittest.hasLength(2)); |
1194 checkParentReference(o[0]); | 1251 checkParentReference(o[0]); |
1195 checkParentReference(o[1]); | 1252 checkParentReference(o[1]); |
1196 } | 1253 } |
1197 | 1254 |
1198 buildUnnamed622() { | 1255 buildUnnamed639() { |
1199 var o = new core.List<api.Permission>(); | 1256 var o = new core.List<api.Permission>(); |
1200 o.add(buildPermission()); | 1257 o.add(buildPermission()); |
1201 o.add(buildPermission()); | 1258 o.add(buildPermission()); |
1202 return o; | 1259 return o; |
1203 } | 1260 } |
1204 | 1261 |
1205 checkUnnamed622(core.List<api.Permission> o) { | 1262 checkUnnamed639(core.List<api.Permission> o) { |
1206 unittest.expect(o, unittest.hasLength(2)); | 1263 unittest.expect(o, unittest.hasLength(2)); |
1207 checkPermission(o[0]); | 1264 checkPermission(o[0]); |
1208 checkPermission(o[1]); | 1265 checkPermission(o[1]); |
1209 } | 1266 } |
1210 | 1267 |
1211 buildUnnamed623() { | 1268 buildUnnamed640() { |
1212 var o = new core.List<api.Property>(); | 1269 var o = new core.List<api.Property>(); |
1213 o.add(buildProperty()); | 1270 o.add(buildProperty()); |
1214 o.add(buildProperty()); | 1271 o.add(buildProperty()); |
1215 return o; | 1272 return o; |
1216 } | 1273 } |
1217 | 1274 |
1218 checkUnnamed623(core.List<api.Property> o) { | 1275 checkUnnamed640(core.List<api.Property> o) { |
1219 unittest.expect(o, unittest.hasLength(2)); | 1276 unittest.expect(o, unittest.hasLength(2)); |
1220 checkProperty(o[0]); | 1277 checkProperty(o[0]); |
1221 checkProperty(o[1]); | 1278 checkProperty(o[1]); |
1222 } | 1279 } |
1223 | 1280 |
1224 buildUnnamed624() { | 1281 buildUnnamed641() { |
1225 var o = new core.List<core.String>(); | 1282 var o = new core.List<core.String>(); |
1226 o.add("foo"); | 1283 o.add("foo"); |
1227 o.add("foo"); | 1284 o.add("foo"); |
1228 return o; | 1285 return o; |
1229 } | 1286 } |
1230 | 1287 |
1231 checkUnnamed624(core.List<core.String> o) { | 1288 checkUnnamed641(core.List<core.String> o) { |
1232 unittest.expect(o, unittest.hasLength(2)); | 1289 unittest.expect(o, unittest.hasLength(2)); |
1233 unittest.expect(o[0], unittest.equals('foo')); | 1290 unittest.expect(o[0], unittest.equals('foo')); |
1234 unittest.expect(o[1], unittest.equals('foo')); | 1291 unittest.expect(o[1], unittest.equals('foo')); |
1235 } | 1292 } |
1236 | 1293 |
1237 core.int buildCounterFileThumbnail = 0; | 1294 core.int buildCounterFileThumbnail = 0; |
1238 buildFileThumbnail() { | 1295 buildFileThumbnail() { |
1239 var o = new api.FileThumbnail(); | 1296 var o = new api.FileThumbnail(); |
1240 buildCounterFileThumbnail++; | 1297 buildCounterFileThumbnail++; |
1241 if (buildCounterFileThumbnail < 3) { | 1298 if (buildCounterFileThumbnail < 3) { |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1280 | 1337 |
1281 core.int buildCounterFile = 0; | 1338 core.int buildCounterFile = 0; |
1282 buildFile() { | 1339 buildFile() { |
1283 var o = new api.File(); | 1340 var o = new api.File(); |
1284 buildCounterFile++; | 1341 buildCounterFile++; |
1285 if (buildCounterFile < 3) { | 1342 if (buildCounterFile < 3) { |
1286 o.alternateLink = "foo"; | 1343 o.alternateLink = "foo"; |
1287 o.appDataContents = true; | 1344 o.appDataContents = true; |
1288 o.canComment = true; | 1345 o.canComment = true; |
1289 o.canReadRevisions = true; | 1346 o.canReadRevisions = true; |
| 1347 o.capabilities = buildFileCapabilities(); |
1290 o.copyable = true; | 1348 o.copyable = true; |
1291 o.createdDate = core.DateTime.parse("2002-02-27T14:01:02"); | 1349 o.createdDate = core.DateTime.parse("2002-02-27T14:01:02"); |
1292 o.defaultOpenWithLink = "foo"; | 1350 o.defaultOpenWithLink = "foo"; |
1293 o.description = "foo"; | 1351 o.description = "foo"; |
1294 o.downloadUrl = "foo"; | 1352 o.downloadUrl = "foo"; |
1295 o.editable = true; | 1353 o.editable = true; |
1296 o.embedLink = "foo"; | 1354 o.embedLink = "foo"; |
1297 o.etag = "foo"; | 1355 o.etag = "foo"; |
1298 o.explicitlyTrashed = true; | 1356 o.explicitlyTrashed = true; |
1299 o.exportLinks = buildUnnamed617(); | 1357 o.exportLinks = buildUnnamed634(); |
1300 o.fileExtension = "foo"; | 1358 o.fileExtension = "foo"; |
1301 o.fileSize = "foo"; | 1359 o.fileSize = "foo"; |
1302 o.folderColorRgb = "foo"; | 1360 o.folderColorRgb = "foo"; |
1303 o.fullFileExtension = "foo"; | 1361 o.fullFileExtension = "foo"; |
| 1362 o.hasAugmentedPermissions = true; |
1304 o.hasThumbnail = true; | 1363 o.hasThumbnail = true; |
1305 o.headRevisionId = "foo"; | 1364 o.headRevisionId = "foo"; |
1306 o.iconLink = "foo"; | 1365 o.iconLink = "foo"; |
1307 o.id = "foo"; | 1366 o.id = "foo"; |
1308 o.imageMediaMetadata = buildFileImageMediaMetadata(); | 1367 o.imageMediaMetadata = buildFileImageMediaMetadata(); |
1309 o.indexableText = buildFileIndexableText(); | 1368 o.indexableText = buildFileIndexableText(); |
1310 o.isAppAuthorized = true; | 1369 o.isAppAuthorized = true; |
1311 o.kind = "foo"; | 1370 o.kind = "foo"; |
1312 o.labels = buildFileLabels(); | 1371 o.labels = buildFileLabels(); |
1313 o.lastModifyingUser = buildUser(); | 1372 o.lastModifyingUser = buildUser(); |
1314 o.lastModifyingUserName = "foo"; | 1373 o.lastModifyingUserName = "foo"; |
1315 o.lastViewedByMeDate = core.DateTime.parse("2002-02-27T14:01:02"); | 1374 o.lastViewedByMeDate = core.DateTime.parse("2002-02-27T14:01:02"); |
1316 o.markedViewedByMeDate = core.DateTime.parse("2002-02-27T14:01:02"); | 1375 o.markedViewedByMeDate = core.DateTime.parse("2002-02-27T14:01:02"); |
1317 o.md5Checksum = "foo"; | 1376 o.md5Checksum = "foo"; |
1318 o.mimeType = "foo"; | 1377 o.mimeType = "foo"; |
1319 o.modifiedByMeDate = core.DateTime.parse("2002-02-27T14:01:02"); | 1378 o.modifiedByMeDate = core.DateTime.parse("2002-02-27T14:01:02"); |
1320 o.modifiedDate = core.DateTime.parse("2002-02-27T14:01:02"); | 1379 o.modifiedDate = core.DateTime.parse("2002-02-27T14:01:02"); |
1321 o.openWithLinks = buildUnnamed618(); | 1380 o.openWithLinks = buildUnnamed635(); |
1322 o.originalFilename = "foo"; | 1381 o.originalFilename = "foo"; |
1323 o.ownedByMe = true; | 1382 o.ownedByMe = true; |
1324 o.ownerNames = buildUnnamed619(); | 1383 o.ownerNames = buildUnnamed636(); |
1325 o.owners = buildUnnamed620(); | 1384 o.owners = buildUnnamed637(); |
1326 o.parents = buildUnnamed621(); | 1385 o.parents = buildUnnamed638(); |
1327 o.permissions = buildUnnamed622(); | 1386 o.permissions = buildUnnamed639(); |
1328 o.properties = buildUnnamed623(); | 1387 o.properties = buildUnnamed640(); |
1329 o.quotaBytesUsed = "foo"; | 1388 o.quotaBytesUsed = "foo"; |
1330 o.selfLink = "foo"; | 1389 o.selfLink = "foo"; |
1331 o.shareable = true; | 1390 o.shareable = true; |
1332 o.shared = true; | 1391 o.shared = true; |
1333 o.sharedWithMeDate = core.DateTime.parse("2002-02-27T14:01:02"); | 1392 o.sharedWithMeDate = core.DateTime.parse("2002-02-27T14:01:02"); |
1334 o.sharingUser = buildUser(); | 1393 o.sharingUser = buildUser(); |
1335 o.spaces = buildUnnamed624(); | 1394 o.spaces = buildUnnamed641(); |
| 1395 o.teamDriveId = "foo"; |
1336 o.thumbnail = buildFileThumbnail(); | 1396 o.thumbnail = buildFileThumbnail(); |
1337 o.thumbnailLink = "foo"; | 1397 o.thumbnailLink = "foo"; |
1338 o.thumbnailVersion = "foo"; | 1398 o.thumbnailVersion = "foo"; |
1339 o.title = "foo"; | 1399 o.title = "foo"; |
| 1400 o.trashedDate = core.DateTime.parse("2002-02-27T14:01:02"); |
| 1401 o.trashingUser = buildUser(); |
1340 o.userPermission = buildPermission(); | 1402 o.userPermission = buildPermission(); |
1341 o.version = "foo"; | 1403 o.version = "foo"; |
1342 o.videoMediaMetadata = buildFileVideoMediaMetadata(); | 1404 o.videoMediaMetadata = buildFileVideoMediaMetadata(); |
1343 o.webContentLink = "foo"; | 1405 o.webContentLink = "foo"; |
1344 o.webViewLink = "foo"; | 1406 o.webViewLink = "foo"; |
1345 o.writersCanShare = true; | 1407 o.writersCanShare = true; |
1346 } | 1408 } |
1347 buildCounterFile--; | 1409 buildCounterFile--; |
1348 return o; | 1410 return o; |
1349 } | 1411 } |
1350 | 1412 |
1351 checkFile(api.File o) { | 1413 checkFile(api.File o) { |
1352 buildCounterFile++; | 1414 buildCounterFile++; |
1353 if (buildCounterFile < 3) { | 1415 if (buildCounterFile < 3) { |
1354 unittest.expect(o.alternateLink, unittest.equals('foo')); | 1416 unittest.expect(o.alternateLink, unittest.equals('foo')); |
1355 unittest.expect(o.appDataContents, unittest.isTrue); | 1417 unittest.expect(o.appDataContents, unittest.isTrue); |
1356 unittest.expect(o.canComment, unittest.isTrue); | 1418 unittest.expect(o.canComment, unittest.isTrue); |
1357 unittest.expect(o.canReadRevisions, unittest.isTrue); | 1419 unittest.expect(o.canReadRevisions, unittest.isTrue); |
| 1420 checkFileCapabilities(o.capabilities); |
1358 unittest.expect(o.copyable, unittest.isTrue); | 1421 unittest.expect(o.copyable, unittest.isTrue); |
1359 unittest.expect(o.createdDate, unittest.equals(core.DateTime.parse("2002-02-
27T14:01:02"))); | 1422 unittest.expect(o.createdDate, unittest.equals(core.DateTime.parse("2002-02-
27T14:01:02"))); |
1360 unittest.expect(o.defaultOpenWithLink, unittest.equals('foo')); | 1423 unittest.expect(o.defaultOpenWithLink, unittest.equals('foo')); |
1361 unittest.expect(o.description, unittest.equals('foo')); | 1424 unittest.expect(o.description, unittest.equals('foo')); |
1362 unittest.expect(o.downloadUrl, unittest.equals('foo')); | 1425 unittest.expect(o.downloadUrl, unittest.equals('foo')); |
1363 unittest.expect(o.editable, unittest.isTrue); | 1426 unittest.expect(o.editable, unittest.isTrue); |
1364 unittest.expect(o.embedLink, unittest.equals('foo')); | 1427 unittest.expect(o.embedLink, unittest.equals('foo')); |
1365 unittest.expect(o.etag, unittest.equals('foo')); | 1428 unittest.expect(o.etag, unittest.equals('foo')); |
1366 unittest.expect(o.explicitlyTrashed, unittest.isTrue); | 1429 unittest.expect(o.explicitlyTrashed, unittest.isTrue); |
1367 checkUnnamed617(o.exportLinks); | 1430 checkUnnamed634(o.exportLinks); |
1368 unittest.expect(o.fileExtension, unittest.equals('foo')); | 1431 unittest.expect(o.fileExtension, unittest.equals('foo')); |
1369 unittest.expect(o.fileSize, unittest.equals('foo')); | 1432 unittest.expect(o.fileSize, unittest.equals('foo')); |
1370 unittest.expect(o.folderColorRgb, unittest.equals('foo')); | 1433 unittest.expect(o.folderColorRgb, unittest.equals('foo')); |
1371 unittest.expect(o.fullFileExtension, unittest.equals('foo')); | 1434 unittest.expect(o.fullFileExtension, unittest.equals('foo')); |
| 1435 unittest.expect(o.hasAugmentedPermissions, unittest.isTrue); |
1372 unittest.expect(o.hasThumbnail, unittest.isTrue); | 1436 unittest.expect(o.hasThumbnail, unittest.isTrue); |
1373 unittest.expect(o.headRevisionId, unittest.equals('foo')); | 1437 unittest.expect(o.headRevisionId, unittest.equals('foo')); |
1374 unittest.expect(o.iconLink, unittest.equals('foo')); | 1438 unittest.expect(o.iconLink, unittest.equals('foo')); |
1375 unittest.expect(o.id, unittest.equals('foo')); | 1439 unittest.expect(o.id, unittest.equals('foo')); |
1376 checkFileImageMediaMetadata(o.imageMediaMetadata); | 1440 checkFileImageMediaMetadata(o.imageMediaMetadata); |
1377 checkFileIndexableText(o.indexableText); | 1441 checkFileIndexableText(o.indexableText); |
1378 unittest.expect(o.isAppAuthorized, unittest.isTrue); | 1442 unittest.expect(o.isAppAuthorized, unittest.isTrue); |
1379 unittest.expect(o.kind, unittest.equals('foo')); | 1443 unittest.expect(o.kind, unittest.equals('foo')); |
1380 checkFileLabels(o.labels); | 1444 checkFileLabels(o.labels); |
1381 checkUser(o.lastModifyingUser); | 1445 checkUser(o.lastModifyingUser); |
1382 unittest.expect(o.lastModifyingUserName, unittest.equals('foo')); | 1446 unittest.expect(o.lastModifyingUserName, unittest.equals('foo')); |
1383 unittest.expect(o.lastViewedByMeDate, unittest.equals(core.DateTime.parse("2
002-02-27T14:01:02"))); | 1447 unittest.expect(o.lastViewedByMeDate, unittest.equals(core.DateTime.parse("2
002-02-27T14:01:02"))); |
1384 unittest.expect(o.markedViewedByMeDate, unittest.equals(core.DateTime.parse(
"2002-02-27T14:01:02"))); | 1448 unittest.expect(o.markedViewedByMeDate, unittest.equals(core.DateTime.parse(
"2002-02-27T14:01:02"))); |
1385 unittest.expect(o.md5Checksum, unittest.equals('foo')); | 1449 unittest.expect(o.md5Checksum, unittest.equals('foo')); |
1386 unittest.expect(o.mimeType, unittest.equals('foo')); | 1450 unittest.expect(o.mimeType, unittest.equals('foo')); |
1387 unittest.expect(o.modifiedByMeDate, unittest.equals(core.DateTime.parse("200
2-02-27T14:01:02"))); | 1451 unittest.expect(o.modifiedByMeDate, unittest.equals(core.DateTime.parse("200
2-02-27T14:01:02"))); |
1388 unittest.expect(o.modifiedDate, unittest.equals(core.DateTime.parse("2002-02
-27T14:01:02"))); | 1452 unittest.expect(o.modifiedDate, unittest.equals(core.DateTime.parse("2002-02
-27T14:01:02"))); |
1389 checkUnnamed618(o.openWithLinks); | 1453 checkUnnamed635(o.openWithLinks); |
1390 unittest.expect(o.originalFilename, unittest.equals('foo')); | 1454 unittest.expect(o.originalFilename, unittest.equals('foo')); |
1391 unittest.expect(o.ownedByMe, unittest.isTrue); | 1455 unittest.expect(o.ownedByMe, unittest.isTrue); |
1392 checkUnnamed619(o.ownerNames); | 1456 checkUnnamed636(o.ownerNames); |
1393 checkUnnamed620(o.owners); | 1457 checkUnnamed637(o.owners); |
1394 checkUnnamed621(o.parents); | 1458 checkUnnamed638(o.parents); |
1395 checkUnnamed622(o.permissions); | 1459 checkUnnamed639(o.permissions); |
1396 checkUnnamed623(o.properties); | 1460 checkUnnamed640(o.properties); |
1397 unittest.expect(o.quotaBytesUsed, unittest.equals('foo')); | 1461 unittest.expect(o.quotaBytesUsed, unittest.equals('foo')); |
1398 unittest.expect(o.selfLink, unittest.equals('foo')); | 1462 unittest.expect(o.selfLink, unittest.equals('foo')); |
1399 unittest.expect(o.shareable, unittest.isTrue); | 1463 unittest.expect(o.shareable, unittest.isTrue); |
1400 unittest.expect(o.shared, unittest.isTrue); | 1464 unittest.expect(o.shared, unittest.isTrue); |
1401 unittest.expect(o.sharedWithMeDate, unittest.equals(core.DateTime.parse("200
2-02-27T14:01:02"))); | 1465 unittest.expect(o.sharedWithMeDate, unittest.equals(core.DateTime.parse("200
2-02-27T14:01:02"))); |
1402 checkUser(o.sharingUser); | 1466 checkUser(o.sharingUser); |
1403 checkUnnamed624(o.spaces); | 1467 checkUnnamed641(o.spaces); |
| 1468 unittest.expect(o.teamDriveId, unittest.equals('foo')); |
1404 checkFileThumbnail(o.thumbnail); | 1469 checkFileThumbnail(o.thumbnail); |
1405 unittest.expect(o.thumbnailLink, unittest.equals('foo')); | 1470 unittest.expect(o.thumbnailLink, unittest.equals('foo')); |
1406 unittest.expect(o.thumbnailVersion, unittest.equals('foo')); | 1471 unittest.expect(o.thumbnailVersion, unittest.equals('foo')); |
1407 unittest.expect(o.title, unittest.equals('foo')); | 1472 unittest.expect(o.title, unittest.equals('foo')); |
| 1473 unittest.expect(o.trashedDate, unittest.equals(core.DateTime.parse("2002-02-
27T14:01:02"))); |
| 1474 checkUser(o.trashingUser); |
1408 checkPermission(o.userPermission); | 1475 checkPermission(o.userPermission); |
1409 unittest.expect(o.version, unittest.equals('foo')); | 1476 unittest.expect(o.version, unittest.equals('foo')); |
1410 checkFileVideoMediaMetadata(o.videoMediaMetadata); | 1477 checkFileVideoMediaMetadata(o.videoMediaMetadata); |
1411 unittest.expect(o.webContentLink, unittest.equals('foo')); | 1478 unittest.expect(o.webContentLink, unittest.equals('foo')); |
1412 unittest.expect(o.webViewLink, unittest.equals('foo')); | 1479 unittest.expect(o.webViewLink, unittest.equals('foo')); |
1413 unittest.expect(o.writersCanShare, unittest.isTrue); | 1480 unittest.expect(o.writersCanShare, unittest.isTrue); |
1414 } | 1481 } |
1415 buildCounterFile--; | 1482 buildCounterFile--; |
1416 } | 1483 } |
1417 | 1484 |
1418 buildUnnamed625() { | 1485 buildUnnamed642() { |
1419 var o = new core.List<api.File>(); | 1486 var o = new core.List<api.File>(); |
1420 o.add(buildFile()); | 1487 o.add(buildFile()); |
1421 o.add(buildFile()); | 1488 o.add(buildFile()); |
1422 return o; | 1489 return o; |
1423 } | 1490 } |
1424 | 1491 |
1425 checkUnnamed625(core.List<api.File> o) { | 1492 checkUnnamed642(core.List<api.File> o) { |
1426 unittest.expect(o, unittest.hasLength(2)); | 1493 unittest.expect(o, unittest.hasLength(2)); |
1427 checkFile(o[0]); | 1494 checkFile(o[0]); |
1428 checkFile(o[1]); | 1495 checkFile(o[1]); |
1429 } | 1496 } |
1430 | 1497 |
1431 core.int buildCounterFileList = 0; | 1498 core.int buildCounterFileList = 0; |
1432 buildFileList() { | 1499 buildFileList() { |
1433 var o = new api.FileList(); | 1500 var o = new api.FileList(); |
1434 buildCounterFileList++; | 1501 buildCounterFileList++; |
1435 if (buildCounterFileList < 3) { | 1502 if (buildCounterFileList < 3) { |
1436 o.etag = "foo"; | 1503 o.etag = "foo"; |
1437 o.items = buildUnnamed625(); | 1504 o.incompleteSearch = true; |
| 1505 o.items = buildUnnamed642(); |
1438 o.kind = "foo"; | 1506 o.kind = "foo"; |
1439 o.nextLink = "foo"; | 1507 o.nextLink = "foo"; |
1440 o.nextPageToken = "foo"; | 1508 o.nextPageToken = "foo"; |
1441 o.selfLink = "foo"; | 1509 o.selfLink = "foo"; |
1442 } | 1510 } |
1443 buildCounterFileList--; | 1511 buildCounterFileList--; |
1444 return o; | 1512 return o; |
1445 } | 1513 } |
1446 | 1514 |
1447 checkFileList(api.FileList o) { | 1515 checkFileList(api.FileList o) { |
1448 buildCounterFileList++; | 1516 buildCounterFileList++; |
1449 if (buildCounterFileList < 3) { | 1517 if (buildCounterFileList < 3) { |
1450 unittest.expect(o.etag, unittest.equals('foo')); | 1518 unittest.expect(o.etag, unittest.equals('foo')); |
1451 checkUnnamed625(o.items); | 1519 unittest.expect(o.incompleteSearch, unittest.isTrue); |
| 1520 checkUnnamed642(o.items); |
1452 unittest.expect(o.kind, unittest.equals('foo')); | 1521 unittest.expect(o.kind, unittest.equals('foo')); |
1453 unittest.expect(o.nextLink, unittest.equals('foo')); | 1522 unittest.expect(o.nextLink, unittest.equals('foo')); |
1454 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 1523 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
1455 unittest.expect(o.selfLink, unittest.equals('foo')); | 1524 unittest.expect(o.selfLink, unittest.equals('foo')); |
1456 } | 1525 } |
1457 buildCounterFileList--; | 1526 buildCounterFileList--; |
1458 } | 1527 } |
1459 | 1528 |
1460 buildUnnamed626() { | 1529 buildUnnamed643() { |
1461 var o = new core.List<core.String>(); | 1530 var o = new core.List<core.String>(); |
1462 o.add("foo"); | 1531 o.add("foo"); |
1463 o.add("foo"); | 1532 o.add("foo"); |
1464 return o; | 1533 return o; |
1465 } | 1534 } |
1466 | 1535 |
1467 checkUnnamed626(core.List<core.String> o) { | 1536 checkUnnamed643(core.List<core.String> o) { |
1468 unittest.expect(o, unittest.hasLength(2)); | 1537 unittest.expect(o, unittest.hasLength(2)); |
1469 unittest.expect(o[0], unittest.equals('foo')); | 1538 unittest.expect(o[0], unittest.equals('foo')); |
1470 unittest.expect(o[1], unittest.equals('foo')); | 1539 unittest.expect(o[1], unittest.equals('foo')); |
1471 } | 1540 } |
1472 | 1541 |
1473 core.int buildCounterGeneratedIds = 0; | 1542 core.int buildCounterGeneratedIds = 0; |
1474 buildGeneratedIds() { | 1543 buildGeneratedIds() { |
1475 var o = new api.GeneratedIds(); | 1544 var o = new api.GeneratedIds(); |
1476 buildCounterGeneratedIds++; | 1545 buildCounterGeneratedIds++; |
1477 if (buildCounterGeneratedIds < 3) { | 1546 if (buildCounterGeneratedIds < 3) { |
1478 o.ids = buildUnnamed626(); | 1547 o.ids = buildUnnamed643(); |
1479 o.kind = "foo"; | 1548 o.kind = "foo"; |
1480 o.space = "foo"; | 1549 o.space = "foo"; |
1481 } | 1550 } |
1482 buildCounterGeneratedIds--; | 1551 buildCounterGeneratedIds--; |
1483 return o; | 1552 return o; |
1484 } | 1553 } |
1485 | 1554 |
1486 checkGeneratedIds(api.GeneratedIds o) { | 1555 checkGeneratedIds(api.GeneratedIds o) { |
1487 buildCounterGeneratedIds++; | 1556 buildCounterGeneratedIds++; |
1488 if (buildCounterGeneratedIds < 3) { | 1557 if (buildCounterGeneratedIds < 3) { |
1489 checkUnnamed626(o.ids); | 1558 checkUnnamed643(o.ids); |
1490 unittest.expect(o.kind, unittest.equals('foo')); | 1559 unittest.expect(o.kind, unittest.equals('foo')); |
1491 unittest.expect(o.space, unittest.equals('foo')); | 1560 unittest.expect(o.space, unittest.equals('foo')); |
1492 } | 1561 } |
1493 buildCounterGeneratedIds--; | 1562 buildCounterGeneratedIds--; |
1494 } | 1563 } |
1495 | 1564 |
1496 buildUnnamed627() { | 1565 buildUnnamed644() { |
1497 var o = new core.List<api.ParentReference>(); | 1566 var o = new core.List<api.ParentReference>(); |
1498 o.add(buildParentReference()); | 1567 o.add(buildParentReference()); |
1499 o.add(buildParentReference()); | 1568 o.add(buildParentReference()); |
1500 return o; | 1569 return o; |
1501 } | 1570 } |
1502 | 1571 |
1503 checkUnnamed627(core.List<api.ParentReference> o) { | 1572 checkUnnamed644(core.List<api.ParentReference> o) { |
1504 unittest.expect(o, unittest.hasLength(2)); | 1573 unittest.expect(o, unittest.hasLength(2)); |
1505 checkParentReference(o[0]); | 1574 checkParentReference(o[0]); |
1506 checkParentReference(o[1]); | 1575 checkParentReference(o[1]); |
1507 } | 1576 } |
1508 | 1577 |
1509 core.int buildCounterParentList = 0; | 1578 core.int buildCounterParentList = 0; |
1510 buildParentList() { | 1579 buildParentList() { |
1511 var o = new api.ParentList(); | 1580 var o = new api.ParentList(); |
1512 buildCounterParentList++; | 1581 buildCounterParentList++; |
1513 if (buildCounterParentList < 3) { | 1582 if (buildCounterParentList < 3) { |
1514 o.etag = "foo"; | 1583 o.etag = "foo"; |
1515 o.items = buildUnnamed627(); | 1584 o.items = buildUnnamed644(); |
1516 o.kind = "foo"; | 1585 o.kind = "foo"; |
1517 o.selfLink = "foo"; | 1586 o.selfLink = "foo"; |
1518 } | 1587 } |
1519 buildCounterParentList--; | 1588 buildCounterParentList--; |
1520 return o; | 1589 return o; |
1521 } | 1590 } |
1522 | 1591 |
1523 checkParentList(api.ParentList o) { | 1592 checkParentList(api.ParentList o) { |
1524 buildCounterParentList++; | 1593 buildCounterParentList++; |
1525 if (buildCounterParentList < 3) { | 1594 if (buildCounterParentList < 3) { |
1526 unittest.expect(o.etag, unittest.equals('foo')); | 1595 unittest.expect(o.etag, unittest.equals('foo')); |
1527 checkUnnamed627(o.items); | 1596 checkUnnamed644(o.items); |
1528 unittest.expect(o.kind, unittest.equals('foo')); | 1597 unittest.expect(o.kind, unittest.equals('foo')); |
1529 unittest.expect(o.selfLink, unittest.equals('foo')); | 1598 unittest.expect(o.selfLink, unittest.equals('foo')); |
1530 } | 1599 } |
1531 buildCounterParentList--; | 1600 buildCounterParentList--; |
1532 } | 1601 } |
1533 | 1602 |
1534 core.int buildCounterParentReference = 0; | 1603 core.int buildCounterParentReference = 0; |
1535 buildParentReference() { | 1604 buildParentReference() { |
1536 var o = new api.ParentReference(); | 1605 var o = new api.ParentReference(); |
1537 buildCounterParentReference++; | 1606 buildCounterParentReference++; |
(...skipping 13 matching lines...) Expand all Loading... |
1551 if (buildCounterParentReference < 3) { | 1620 if (buildCounterParentReference < 3) { |
1552 unittest.expect(o.id, unittest.equals('foo')); | 1621 unittest.expect(o.id, unittest.equals('foo')); |
1553 unittest.expect(o.isRoot, unittest.isTrue); | 1622 unittest.expect(o.isRoot, unittest.isTrue); |
1554 unittest.expect(o.kind, unittest.equals('foo')); | 1623 unittest.expect(o.kind, unittest.equals('foo')); |
1555 unittest.expect(o.parentLink, unittest.equals('foo')); | 1624 unittest.expect(o.parentLink, unittest.equals('foo')); |
1556 unittest.expect(o.selfLink, unittest.equals('foo')); | 1625 unittest.expect(o.selfLink, unittest.equals('foo')); |
1557 } | 1626 } |
1558 buildCounterParentReference--; | 1627 buildCounterParentReference--; |
1559 } | 1628 } |
1560 | 1629 |
1561 buildUnnamed628() { | 1630 buildUnnamed645() { |
1562 var o = new core.List<core.String>(); | 1631 var o = new core.List<core.String>(); |
1563 o.add("foo"); | 1632 o.add("foo"); |
1564 o.add("foo"); | 1633 o.add("foo"); |
1565 return o; | 1634 return o; |
1566 } | 1635 } |
1567 | 1636 |
1568 checkUnnamed628(core.List<core.String> o) { | 1637 checkUnnamed645(core.List<core.String> o) { |
1569 unittest.expect(o, unittest.hasLength(2)); | 1638 unittest.expect(o, unittest.hasLength(2)); |
1570 unittest.expect(o[0], unittest.equals('foo')); | 1639 unittest.expect(o[0], unittest.equals('foo')); |
1571 unittest.expect(o[1], unittest.equals('foo')); | 1640 unittest.expect(o[1], unittest.equals('foo')); |
1572 } | 1641 } |
1573 | 1642 |
| 1643 buildUnnamed646() { |
| 1644 var o = new core.List<core.String>(); |
| 1645 o.add("foo"); |
| 1646 o.add("foo"); |
| 1647 return o; |
| 1648 } |
| 1649 |
| 1650 checkUnnamed646(core.List<core.String> o) { |
| 1651 unittest.expect(o, unittest.hasLength(2)); |
| 1652 unittest.expect(o[0], unittest.equals('foo')); |
| 1653 unittest.expect(o[1], unittest.equals('foo')); |
| 1654 } |
| 1655 |
| 1656 core.int buildCounterPermissionTeamDrivePermissionDetails = 0; |
| 1657 buildPermissionTeamDrivePermissionDetails() { |
| 1658 var o = new api.PermissionTeamDrivePermissionDetails(); |
| 1659 buildCounterPermissionTeamDrivePermissionDetails++; |
| 1660 if (buildCounterPermissionTeamDrivePermissionDetails < 3) { |
| 1661 o.additionalRoles = buildUnnamed646(); |
| 1662 o.inherited = true; |
| 1663 o.inheritedFrom = "foo"; |
| 1664 o.role = "foo"; |
| 1665 o.teamDrivePermissionType = "foo"; |
| 1666 } |
| 1667 buildCounterPermissionTeamDrivePermissionDetails--; |
| 1668 return o; |
| 1669 } |
| 1670 |
| 1671 checkPermissionTeamDrivePermissionDetails(api.PermissionTeamDrivePermissionDetai
ls o) { |
| 1672 buildCounterPermissionTeamDrivePermissionDetails++; |
| 1673 if (buildCounterPermissionTeamDrivePermissionDetails < 3) { |
| 1674 checkUnnamed646(o.additionalRoles); |
| 1675 unittest.expect(o.inherited, unittest.isTrue); |
| 1676 unittest.expect(o.inheritedFrom, unittest.equals('foo')); |
| 1677 unittest.expect(o.role, unittest.equals('foo')); |
| 1678 unittest.expect(o.teamDrivePermissionType, unittest.equals('foo')); |
| 1679 } |
| 1680 buildCounterPermissionTeamDrivePermissionDetails--; |
| 1681 } |
| 1682 |
| 1683 buildUnnamed647() { |
| 1684 var o = new core.List<api.PermissionTeamDrivePermissionDetails>(); |
| 1685 o.add(buildPermissionTeamDrivePermissionDetails()); |
| 1686 o.add(buildPermissionTeamDrivePermissionDetails()); |
| 1687 return o; |
| 1688 } |
| 1689 |
| 1690 checkUnnamed647(core.List<api.PermissionTeamDrivePermissionDetails> o) { |
| 1691 unittest.expect(o, unittest.hasLength(2)); |
| 1692 checkPermissionTeamDrivePermissionDetails(o[0]); |
| 1693 checkPermissionTeamDrivePermissionDetails(o[1]); |
| 1694 } |
| 1695 |
1574 core.int buildCounterPermission = 0; | 1696 core.int buildCounterPermission = 0; |
1575 buildPermission() { | 1697 buildPermission() { |
1576 var o = new api.Permission(); | 1698 var o = new api.Permission(); |
1577 buildCounterPermission++; | 1699 buildCounterPermission++; |
1578 if (buildCounterPermission < 3) { | 1700 if (buildCounterPermission < 3) { |
1579 o.additionalRoles = buildUnnamed628(); | 1701 o.additionalRoles = buildUnnamed645(); |
1580 o.authKey = "foo"; | 1702 o.authKey = "foo"; |
1581 o.domain = "foo"; | 1703 o.domain = "foo"; |
1582 o.emailAddress = "foo"; | 1704 o.emailAddress = "foo"; |
1583 o.etag = "foo"; | 1705 o.etag = "foo"; |
1584 o.expirationDate = core.DateTime.parse("2002-02-27T14:01:02"); | 1706 o.expirationDate = core.DateTime.parse("2002-02-27T14:01:02"); |
1585 o.id = "foo"; | 1707 o.id = "foo"; |
1586 o.kind = "foo"; | 1708 o.kind = "foo"; |
1587 o.name = "foo"; | 1709 o.name = "foo"; |
1588 o.photoLink = "foo"; | 1710 o.photoLink = "foo"; |
1589 o.role = "foo"; | 1711 o.role = "foo"; |
1590 o.selfLink = "foo"; | 1712 o.selfLink = "foo"; |
| 1713 o.teamDrivePermissionDetails = buildUnnamed647(); |
1591 o.type = "foo"; | 1714 o.type = "foo"; |
1592 o.value = "foo"; | 1715 o.value = "foo"; |
1593 o.withLink = true; | 1716 o.withLink = true; |
1594 } | 1717 } |
1595 buildCounterPermission--; | 1718 buildCounterPermission--; |
1596 return o; | 1719 return o; |
1597 } | 1720 } |
1598 | 1721 |
1599 checkPermission(api.Permission o) { | 1722 checkPermission(api.Permission o) { |
1600 buildCounterPermission++; | 1723 buildCounterPermission++; |
1601 if (buildCounterPermission < 3) { | 1724 if (buildCounterPermission < 3) { |
1602 checkUnnamed628(o.additionalRoles); | 1725 checkUnnamed645(o.additionalRoles); |
1603 unittest.expect(o.authKey, unittest.equals('foo')); | 1726 unittest.expect(o.authKey, unittest.equals('foo')); |
1604 unittest.expect(o.domain, unittest.equals('foo')); | 1727 unittest.expect(o.domain, unittest.equals('foo')); |
1605 unittest.expect(o.emailAddress, unittest.equals('foo')); | 1728 unittest.expect(o.emailAddress, unittest.equals('foo')); |
1606 unittest.expect(o.etag, unittest.equals('foo')); | 1729 unittest.expect(o.etag, unittest.equals('foo')); |
1607 unittest.expect(o.expirationDate, unittest.equals(core.DateTime.parse("2002-
02-27T14:01:02"))); | 1730 unittest.expect(o.expirationDate, unittest.equals(core.DateTime.parse("2002-
02-27T14:01:02"))); |
1608 unittest.expect(o.id, unittest.equals('foo')); | 1731 unittest.expect(o.id, unittest.equals('foo')); |
1609 unittest.expect(o.kind, unittest.equals('foo')); | 1732 unittest.expect(o.kind, unittest.equals('foo')); |
1610 unittest.expect(o.name, unittest.equals('foo')); | 1733 unittest.expect(o.name, unittest.equals('foo')); |
1611 unittest.expect(o.photoLink, unittest.equals('foo')); | 1734 unittest.expect(o.photoLink, unittest.equals('foo')); |
1612 unittest.expect(o.role, unittest.equals('foo')); | 1735 unittest.expect(o.role, unittest.equals('foo')); |
1613 unittest.expect(o.selfLink, unittest.equals('foo')); | 1736 unittest.expect(o.selfLink, unittest.equals('foo')); |
| 1737 checkUnnamed647(o.teamDrivePermissionDetails); |
1614 unittest.expect(o.type, unittest.equals('foo')); | 1738 unittest.expect(o.type, unittest.equals('foo')); |
1615 unittest.expect(o.value, unittest.equals('foo')); | 1739 unittest.expect(o.value, unittest.equals('foo')); |
1616 unittest.expect(o.withLink, unittest.isTrue); | 1740 unittest.expect(o.withLink, unittest.isTrue); |
1617 } | 1741 } |
1618 buildCounterPermission--; | 1742 buildCounterPermission--; |
1619 } | 1743 } |
1620 | 1744 |
1621 core.int buildCounterPermissionId = 0; | 1745 core.int buildCounterPermissionId = 0; |
1622 buildPermissionId() { | 1746 buildPermissionId() { |
1623 var o = new api.PermissionId(); | 1747 var o = new api.PermissionId(); |
1624 buildCounterPermissionId++; | 1748 buildCounterPermissionId++; |
1625 if (buildCounterPermissionId < 3) { | 1749 if (buildCounterPermissionId < 3) { |
1626 o.id = "foo"; | 1750 o.id = "foo"; |
1627 o.kind = "foo"; | 1751 o.kind = "foo"; |
1628 } | 1752 } |
1629 buildCounterPermissionId--; | 1753 buildCounterPermissionId--; |
1630 return o; | 1754 return o; |
1631 } | 1755 } |
1632 | 1756 |
1633 checkPermissionId(api.PermissionId o) { | 1757 checkPermissionId(api.PermissionId o) { |
1634 buildCounterPermissionId++; | 1758 buildCounterPermissionId++; |
1635 if (buildCounterPermissionId < 3) { | 1759 if (buildCounterPermissionId < 3) { |
1636 unittest.expect(o.id, unittest.equals('foo')); | 1760 unittest.expect(o.id, unittest.equals('foo')); |
1637 unittest.expect(o.kind, unittest.equals('foo')); | 1761 unittest.expect(o.kind, unittest.equals('foo')); |
1638 } | 1762 } |
1639 buildCounterPermissionId--; | 1763 buildCounterPermissionId--; |
1640 } | 1764 } |
1641 | 1765 |
1642 buildUnnamed629() { | 1766 buildUnnamed648() { |
1643 var o = new core.List<api.Permission>(); | 1767 var o = new core.List<api.Permission>(); |
1644 o.add(buildPermission()); | 1768 o.add(buildPermission()); |
1645 o.add(buildPermission()); | 1769 o.add(buildPermission()); |
1646 return o; | 1770 return o; |
1647 } | 1771 } |
1648 | 1772 |
1649 checkUnnamed629(core.List<api.Permission> o) { | 1773 checkUnnamed648(core.List<api.Permission> o) { |
1650 unittest.expect(o, unittest.hasLength(2)); | 1774 unittest.expect(o, unittest.hasLength(2)); |
1651 checkPermission(o[0]); | 1775 checkPermission(o[0]); |
1652 checkPermission(o[1]); | 1776 checkPermission(o[1]); |
1653 } | 1777 } |
1654 | 1778 |
1655 core.int buildCounterPermissionList = 0; | 1779 core.int buildCounterPermissionList = 0; |
1656 buildPermissionList() { | 1780 buildPermissionList() { |
1657 var o = new api.PermissionList(); | 1781 var o = new api.PermissionList(); |
1658 buildCounterPermissionList++; | 1782 buildCounterPermissionList++; |
1659 if (buildCounterPermissionList < 3) { | 1783 if (buildCounterPermissionList < 3) { |
1660 o.etag = "foo"; | 1784 o.etag = "foo"; |
1661 o.items = buildUnnamed629(); | 1785 o.items = buildUnnamed648(); |
1662 o.kind = "foo"; | 1786 o.kind = "foo"; |
| 1787 o.nextPageToken = "foo"; |
1663 o.selfLink = "foo"; | 1788 o.selfLink = "foo"; |
1664 } | 1789 } |
1665 buildCounterPermissionList--; | 1790 buildCounterPermissionList--; |
1666 return o; | 1791 return o; |
1667 } | 1792 } |
1668 | 1793 |
1669 checkPermissionList(api.PermissionList o) { | 1794 checkPermissionList(api.PermissionList o) { |
1670 buildCounterPermissionList++; | 1795 buildCounterPermissionList++; |
1671 if (buildCounterPermissionList < 3) { | 1796 if (buildCounterPermissionList < 3) { |
1672 unittest.expect(o.etag, unittest.equals('foo')); | 1797 unittest.expect(o.etag, unittest.equals('foo')); |
1673 checkUnnamed629(o.items); | 1798 checkUnnamed648(o.items); |
1674 unittest.expect(o.kind, unittest.equals('foo')); | 1799 unittest.expect(o.kind, unittest.equals('foo')); |
| 1800 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
1675 unittest.expect(o.selfLink, unittest.equals('foo')); | 1801 unittest.expect(o.selfLink, unittest.equals('foo')); |
1676 } | 1802 } |
1677 buildCounterPermissionList--; | 1803 buildCounterPermissionList--; |
1678 } | 1804 } |
1679 | 1805 |
1680 core.int buildCounterProperty = 0; | 1806 core.int buildCounterProperty = 0; |
1681 buildProperty() { | 1807 buildProperty() { |
1682 var o = new api.Property(); | 1808 var o = new api.Property(); |
1683 buildCounterProperty++; | 1809 buildCounterProperty++; |
1684 if (buildCounterProperty < 3) { | 1810 if (buildCounterProperty < 3) { |
(...skipping 14 matching lines...) Expand all Loading... |
1699 unittest.expect(o.etag, unittest.equals('foo')); | 1825 unittest.expect(o.etag, unittest.equals('foo')); |
1700 unittest.expect(o.key, unittest.equals('foo')); | 1826 unittest.expect(o.key, unittest.equals('foo')); |
1701 unittest.expect(o.kind, unittest.equals('foo')); | 1827 unittest.expect(o.kind, unittest.equals('foo')); |
1702 unittest.expect(o.selfLink, unittest.equals('foo')); | 1828 unittest.expect(o.selfLink, unittest.equals('foo')); |
1703 unittest.expect(o.value, unittest.equals('foo')); | 1829 unittest.expect(o.value, unittest.equals('foo')); |
1704 unittest.expect(o.visibility, unittest.equals('foo')); | 1830 unittest.expect(o.visibility, unittest.equals('foo')); |
1705 } | 1831 } |
1706 buildCounterProperty--; | 1832 buildCounterProperty--; |
1707 } | 1833 } |
1708 | 1834 |
1709 buildUnnamed630() { | 1835 buildUnnamed649() { |
1710 var o = new core.List<api.Property>(); | 1836 var o = new core.List<api.Property>(); |
1711 o.add(buildProperty()); | 1837 o.add(buildProperty()); |
1712 o.add(buildProperty()); | 1838 o.add(buildProperty()); |
1713 return o; | 1839 return o; |
1714 } | 1840 } |
1715 | 1841 |
1716 checkUnnamed630(core.List<api.Property> o) { | 1842 checkUnnamed649(core.List<api.Property> o) { |
1717 unittest.expect(o, unittest.hasLength(2)); | 1843 unittest.expect(o, unittest.hasLength(2)); |
1718 checkProperty(o[0]); | 1844 checkProperty(o[0]); |
1719 checkProperty(o[1]); | 1845 checkProperty(o[1]); |
1720 } | 1846 } |
1721 | 1847 |
1722 core.int buildCounterPropertyList = 0; | 1848 core.int buildCounterPropertyList = 0; |
1723 buildPropertyList() { | 1849 buildPropertyList() { |
1724 var o = new api.PropertyList(); | 1850 var o = new api.PropertyList(); |
1725 buildCounterPropertyList++; | 1851 buildCounterPropertyList++; |
1726 if (buildCounterPropertyList < 3) { | 1852 if (buildCounterPropertyList < 3) { |
1727 o.etag = "foo"; | 1853 o.etag = "foo"; |
1728 o.items = buildUnnamed630(); | 1854 o.items = buildUnnamed649(); |
1729 o.kind = "foo"; | 1855 o.kind = "foo"; |
1730 o.selfLink = "foo"; | 1856 o.selfLink = "foo"; |
1731 } | 1857 } |
1732 buildCounterPropertyList--; | 1858 buildCounterPropertyList--; |
1733 return o; | 1859 return o; |
1734 } | 1860 } |
1735 | 1861 |
1736 checkPropertyList(api.PropertyList o) { | 1862 checkPropertyList(api.PropertyList o) { |
1737 buildCounterPropertyList++; | 1863 buildCounterPropertyList++; |
1738 if (buildCounterPropertyList < 3) { | 1864 if (buildCounterPropertyList < 3) { |
1739 unittest.expect(o.etag, unittest.equals('foo')); | 1865 unittest.expect(o.etag, unittest.equals('foo')); |
1740 checkUnnamed630(o.items); | 1866 checkUnnamed649(o.items); |
1741 unittest.expect(o.kind, unittest.equals('foo')); | 1867 unittest.expect(o.kind, unittest.equals('foo')); |
1742 unittest.expect(o.selfLink, unittest.equals('foo')); | 1868 unittest.expect(o.selfLink, unittest.equals('foo')); |
1743 } | 1869 } |
1744 buildCounterPropertyList--; | 1870 buildCounterPropertyList--; |
1745 } | 1871 } |
1746 | 1872 |
1747 buildUnnamed631() { | 1873 buildUnnamed650() { |
1748 var o = new core.Map<core.String, core.String>(); | 1874 var o = new core.Map<core.String, core.String>(); |
1749 o["x"] = "foo"; | 1875 o["x"] = "foo"; |
1750 o["y"] = "foo"; | 1876 o["y"] = "foo"; |
1751 return o; | 1877 return o; |
1752 } | 1878 } |
1753 | 1879 |
1754 checkUnnamed631(core.Map<core.String, core.String> o) { | 1880 checkUnnamed650(core.Map<core.String, core.String> o) { |
1755 unittest.expect(o, unittest.hasLength(2)); | 1881 unittest.expect(o, unittest.hasLength(2)); |
1756 unittest.expect(o["x"], unittest.equals('foo')); | 1882 unittest.expect(o["x"], unittest.equals('foo')); |
1757 unittest.expect(o["y"], unittest.equals('foo')); | 1883 unittest.expect(o["y"], unittest.equals('foo')); |
1758 } | 1884 } |
1759 | 1885 |
1760 core.int buildCounterRevision = 0; | 1886 core.int buildCounterRevision = 0; |
1761 buildRevision() { | 1887 buildRevision() { |
1762 var o = new api.Revision(); | 1888 var o = new api.Revision(); |
1763 buildCounterRevision++; | 1889 buildCounterRevision++; |
1764 if (buildCounterRevision < 3) { | 1890 if (buildCounterRevision < 3) { |
1765 o.downloadUrl = "foo"; | 1891 o.downloadUrl = "foo"; |
1766 o.etag = "foo"; | 1892 o.etag = "foo"; |
1767 o.exportLinks = buildUnnamed631(); | 1893 o.exportLinks = buildUnnamed650(); |
1768 o.fileSize = "foo"; | 1894 o.fileSize = "foo"; |
1769 o.id = "foo"; | 1895 o.id = "foo"; |
1770 o.kind = "foo"; | 1896 o.kind = "foo"; |
1771 o.lastModifyingUser = buildUser(); | 1897 o.lastModifyingUser = buildUser(); |
1772 o.lastModifyingUserName = "foo"; | 1898 o.lastModifyingUserName = "foo"; |
1773 o.md5Checksum = "foo"; | 1899 o.md5Checksum = "foo"; |
1774 o.mimeType = "foo"; | 1900 o.mimeType = "foo"; |
1775 o.modifiedDate = core.DateTime.parse("2002-02-27T14:01:02"); | 1901 o.modifiedDate = core.DateTime.parse("2002-02-27T14:01:02"); |
1776 o.originalFilename = "foo"; | 1902 o.originalFilename = "foo"; |
1777 o.pinned = true; | 1903 o.pinned = true; |
1778 o.publishAuto = true; | 1904 o.publishAuto = true; |
1779 o.published = true; | 1905 o.published = true; |
1780 o.publishedLink = "foo"; | 1906 o.publishedLink = "foo"; |
1781 o.publishedOutsideDomain = true; | 1907 o.publishedOutsideDomain = true; |
1782 o.selfLink = "foo"; | 1908 o.selfLink = "foo"; |
1783 } | 1909 } |
1784 buildCounterRevision--; | 1910 buildCounterRevision--; |
1785 return o; | 1911 return o; |
1786 } | 1912 } |
1787 | 1913 |
1788 checkRevision(api.Revision o) { | 1914 checkRevision(api.Revision o) { |
1789 buildCounterRevision++; | 1915 buildCounterRevision++; |
1790 if (buildCounterRevision < 3) { | 1916 if (buildCounterRevision < 3) { |
1791 unittest.expect(o.downloadUrl, unittest.equals('foo')); | 1917 unittest.expect(o.downloadUrl, unittest.equals('foo')); |
1792 unittest.expect(o.etag, unittest.equals('foo')); | 1918 unittest.expect(o.etag, unittest.equals('foo')); |
1793 checkUnnamed631(o.exportLinks); | 1919 checkUnnamed650(o.exportLinks); |
1794 unittest.expect(o.fileSize, unittest.equals('foo')); | 1920 unittest.expect(o.fileSize, unittest.equals('foo')); |
1795 unittest.expect(o.id, unittest.equals('foo')); | 1921 unittest.expect(o.id, unittest.equals('foo')); |
1796 unittest.expect(o.kind, unittest.equals('foo')); | 1922 unittest.expect(o.kind, unittest.equals('foo')); |
1797 checkUser(o.lastModifyingUser); | 1923 checkUser(o.lastModifyingUser); |
1798 unittest.expect(o.lastModifyingUserName, unittest.equals('foo')); | 1924 unittest.expect(o.lastModifyingUserName, unittest.equals('foo')); |
1799 unittest.expect(o.md5Checksum, unittest.equals('foo')); | 1925 unittest.expect(o.md5Checksum, unittest.equals('foo')); |
1800 unittest.expect(o.mimeType, unittest.equals('foo')); | 1926 unittest.expect(o.mimeType, unittest.equals('foo')); |
1801 unittest.expect(o.modifiedDate, unittest.equals(core.DateTime.parse("2002-02
-27T14:01:02"))); | 1927 unittest.expect(o.modifiedDate, unittest.equals(core.DateTime.parse("2002-02
-27T14:01:02"))); |
1802 unittest.expect(o.originalFilename, unittest.equals('foo')); | 1928 unittest.expect(o.originalFilename, unittest.equals('foo')); |
1803 unittest.expect(o.pinned, unittest.isTrue); | 1929 unittest.expect(o.pinned, unittest.isTrue); |
1804 unittest.expect(o.publishAuto, unittest.isTrue); | 1930 unittest.expect(o.publishAuto, unittest.isTrue); |
1805 unittest.expect(o.published, unittest.isTrue); | 1931 unittest.expect(o.published, unittest.isTrue); |
1806 unittest.expect(o.publishedLink, unittest.equals('foo')); | 1932 unittest.expect(o.publishedLink, unittest.equals('foo')); |
1807 unittest.expect(o.publishedOutsideDomain, unittest.isTrue); | 1933 unittest.expect(o.publishedOutsideDomain, unittest.isTrue); |
1808 unittest.expect(o.selfLink, unittest.equals('foo')); | 1934 unittest.expect(o.selfLink, unittest.equals('foo')); |
1809 } | 1935 } |
1810 buildCounterRevision--; | 1936 buildCounterRevision--; |
1811 } | 1937 } |
1812 | 1938 |
1813 buildUnnamed632() { | 1939 buildUnnamed651() { |
1814 var o = new core.List<api.Revision>(); | 1940 var o = new core.List<api.Revision>(); |
1815 o.add(buildRevision()); | 1941 o.add(buildRevision()); |
1816 o.add(buildRevision()); | 1942 o.add(buildRevision()); |
1817 return o; | 1943 return o; |
1818 } | 1944 } |
1819 | 1945 |
1820 checkUnnamed632(core.List<api.Revision> o) { | 1946 checkUnnamed651(core.List<api.Revision> o) { |
1821 unittest.expect(o, unittest.hasLength(2)); | 1947 unittest.expect(o, unittest.hasLength(2)); |
1822 checkRevision(o[0]); | 1948 checkRevision(o[0]); |
1823 checkRevision(o[1]); | 1949 checkRevision(o[1]); |
1824 } | 1950 } |
1825 | 1951 |
1826 core.int buildCounterRevisionList = 0; | 1952 core.int buildCounterRevisionList = 0; |
1827 buildRevisionList() { | 1953 buildRevisionList() { |
1828 var o = new api.RevisionList(); | 1954 var o = new api.RevisionList(); |
1829 buildCounterRevisionList++; | 1955 buildCounterRevisionList++; |
1830 if (buildCounterRevisionList < 3) { | 1956 if (buildCounterRevisionList < 3) { |
1831 o.etag = "foo"; | 1957 o.etag = "foo"; |
1832 o.items = buildUnnamed632(); | 1958 o.items = buildUnnamed651(); |
1833 o.kind = "foo"; | 1959 o.kind = "foo"; |
1834 o.nextPageToken = "foo"; | 1960 o.nextPageToken = "foo"; |
1835 o.selfLink = "foo"; | 1961 o.selfLink = "foo"; |
1836 } | 1962 } |
1837 buildCounterRevisionList--; | 1963 buildCounterRevisionList--; |
1838 return o; | 1964 return o; |
1839 } | 1965 } |
1840 | 1966 |
1841 checkRevisionList(api.RevisionList o) { | 1967 checkRevisionList(api.RevisionList o) { |
1842 buildCounterRevisionList++; | 1968 buildCounterRevisionList++; |
1843 if (buildCounterRevisionList < 3) { | 1969 if (buildCounterRevisionList < 3) { |
1844 unittest.expect(o.etag, unittest.equals('foo')); | 1970 unittest.expect(o.etag, unittest.equals('foo')); |
1845 checkUnnamed632(o.items); | 1971 checkUnnamed651(o.items); |
1846 unittest.expect(o.kind, unittest.equals('foo')); | 1972 unittest.expect(o.kind, unittest.equals('foo')); |
1847 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 1973 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
1848 unittest.expect(o.selfLink, unittest.equals('foo')); | 1974 unittest.expect(o.selfLink, unittest.equals('foo')); |
1849 } | 1975 } |
1850 buildCounterRevisionList--; | 1976 buildCounterRevisionList--; |
1851 } | 1977 } |
1852 | 1978 |
1853 core.int buildCounterStartPageToken = 0; | 1979 core.int buildCounterStartPageToken = 0; |
1854 buildStartPageToken() { | 1980 buildStartPageToken() { |
1855 var o = new api.StartPageToken(); | 1981 var o = new api.StartPageToken(); |
1856 buildCounterStartPageToken++; | 1982 buildCounterStartPageToken++; |
1857 if (buildCounterStartPageToken < 3) { | 1983 if (buildCounterStartPageToken < 3) { |
1858 o.kind = "foo"; | 1984 o.kind = "foo"; |
1859 o.startPageToken = "foo"; | 1985 o.startPageToken = "foo"; |
1860 } | 1986 } |
1861 buildCounterStartPageToken--; | 1987 buildCounterStartPageToken--; |
1862 return o; | 1988 return o; |
1863 } | 1989 } |
1864 | 1990 |
1865 checkStartPageToken(api.StartPageToken o) { | 1991 checkStartPageToken(api.StartPageToken o) { |
1866 buildCounterStartPageToken++; | 1992 buildCounterStartPageToken++; |
1867 if (buildCounterStartPageToken < 3) { | 1993 if (buildCounterStartPageToken < 3) { |
1868 unittest.expect(o.kind, unittest.equals('foo')); | 1994 unittest.expect(o.kind, unittest.equals('foo')); |
1869 unittest.expect(o.startPageToken, unittest.equals('foo')); | 1995 unittest.expect(o.startPageToken, unittest.equals('foo')); |
1870 } | 1996 } |
1871 buildCounterStartPageToken--; | 1997 buildCounterStartPageToken--; |
1872 } | 1998 } |
1873 | 1999 |
| 2000 core.int buildCounterTeamDriveCapabilities = 0; |
| 2001 buildTeamDriveCapabilities() { |
| 2002 var o = new api.TeamDriveCapabilities(); |
| 2003 buildCounterTeamDriveCapabilities++; |
| 2004 if (buildCounterTeamDriveCapabilities < 3) { |
| 2005 o.canAddChildren = true; |
| 2006 o.canComment = true; |
| 2007 o.canCopy = true; |
| 2008 o.canDeleteTeamDrive = true; |
| 2009 o.canDownload = true; |
| 2010 o.canEdit = true; |
| 2011 o.canListChildren = true; |
| 2012 o.canManageMembers = true; |
| 2013 o.canReadRevisions = true; |
| 2014 o.canRemoveChildren = true; |
| 2015 o.canRename = true; |
| 2016 o.canRenameTeamDrive = true; |
| 2017 o.canShare = true; |
| 2018 } |
| 2019 buildCounterTeamDriveCapabilities--; |
| 2020 return o; |
| 2021 } |
| 2022 |
| 2023 checkTeamDriveCapabilities(api.TeamDriveCapabilities o) { |
| 2024 buildCounterTeamDriveCapabilities++; |
| 2025 if (buildCounterTeamDriveCapabilities < 3) { |
| 2026 unittest.expect(o.canAddChildren, unittest.isTrue); |
| 2027 unittest.expect(o.canComment, unittest.isTrue); |
| 2028 unittest.expect(o.canCopy, unittest.isTrue); |
| 2029 unittest.expect(o.canDeleteTeamDrive, unittest.isTrue); |
| 2030 unittest.expect(o.canDownload, unittest.isTrue); |
| 2031 unittest.expect(o.canEdit, unittest.isTrue); |
| 2032 unittest.expect(o.canListChildren, unittest.isTrue); |
| 2033 unittest.expect(o.canManageMembers, unittest.isTrue); |
| 2034 unittest.expect(o.canReadRevisions, unittest.isTrue); |
| 2035 unittest.expect(o.canRemoveChildren, unittest.isTrue); |
| 2036 unittest.expect(o.canRename, unittest.isTrue); |
| 2037 unittest.expect(o.canRenameTeamDrive, unittest.isTrue); |
| 2038 unittest.expect(o.canShare, unittest.isTrue); |
| 2039 } |
| 2040 buildCounterTeamDriveCapabilities--; |
| 2041 } |
| 2042 |
| 2043 core.int buildCounterTeamDrive = 0; |
| 2044 buildTeamDrive() { |
| 2045 var o = new api.TeamDrive(); |
| 2046 buildCounterTeamDrive++; |
| 2047 if (buildCounterTeamDrive < 3) { |
| 2048 o.capabilities = buildTeamDriveCapabilities(); |
| 2049 o.id = "foo"; |
| 2050 o.kind = "foo"; |
| 2051 o.name = "foo"; |
| 2052 } |
| 2053 buildCounterTeamDrive--; |
| 2054 return o; |
| 2055 } |
| 2056 |
| 2057 checkTeamDrive(api.TeamDrive o) { |
| 2058 buildCounterTeamDrive++; |
| 2059 if (buildCounterTeamDrive < 3) { |
| 2060 checkTeamDriveCapabilities(o.capabilities); |
| 2061 unittest.expect(o.id, unittest.equals('foo')); |
| 2062 unittest.expect(o.kind, unittest.equals('foo')); |
| 2063 unittest.expect(o.name, unittest.equals('foo')); |
| 2064 } |
| 2065 buildCounterTeamDrive--; |
| 2066 } |
| 2067 |
| 2068 buildUnnamed652() { |
| 2069 var o = new core.List<api.TeamDrive>(); |
| 2070 o.add(buildTeamDrive()); |
| 2071 o.add(buildTeamDrive()); |
| 2072 return o; |
| 2073 } |
| 2074 |
| 2075 checkUnnamed652(core.List<api.TeamDrive> o) { |
| 2076 unittest.expect(o, unittest.hasLength(2)); |
| 2077 checkTeamDrive(o[0]); |
| 2078 checkTeamDrive(o[1]); |
| 2079 } |
| 2080 |
| 2081 core.int buildCounterTeamDriveList = 0; |
| 2082 buildTeamDriveList() { |
| 2083 var o = new api.TeamDriveList(); |
| 2084 buildCounterTeamDriveList++; |
| 2085 if (buildCounterTeamDriveList < 3) { |
| 2086 o.items = buildUnnamed652(); |
| 2087 o.kind = "foo"; |
| 2088 o.nextPageToken = "foo"; |
| 2089 } |
| 2090 buildCounterTeamDriveList--; |
| 2091 return o; |
| 2092 } |
| 2093 |
| 2094 checkTeamDriveList(api.TeamDriveList o) { |
| 2095 buildCounterTeamDriveList++; |
| 2096 if (buildCounterTeamDriveList < 3) { |
| 2097 checkUnnamed652(o.items); |
| 2098 unittest.expect(o.kind, unittest.equals('foo')); |
| 2099 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 2100 } |
| 2101 buildCounterTeamDriveList--; |
| 2102 } |
| 2103 |
1874 core.int buildCounterUserPicture = 0; | 2104 core.int buildCounterUserPicture = 0; |
1875 buildUserPicture() { | 2105 buildUserPicture() { |
1876 var o = new api.UserPicture(); | 2106 var o = new api.UserPicture(); |
1877 buildCounterUserPicture++; | 2107 buildCounterUserPicture++; |
1878 if (buildCounterUserPicture < 3) { | 2108 if (buildCounterUserPicture < 3) { |
1879 o.url = "foo"; | 2109 o.url = "foo"; |
1880 } | 2110 } |
1881 buildCounterUserPicture--; | 2111 buildCounterUserPicture--; |
1882 return o; | 2112 return o; |
1883 } | 2113 } |
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2103 | 2333 |
2104 unittest.group("obj-schema-CommentReplyList", () { | 2334 unittest.group("obj-schema-CommentReplyList", () { |
2105 unittest.test("to-json--from-json", () { | 2335 unittest.test("to-json--from-json", () { |
2106 var o = buildCommentReplyList(); | 2336 var o = buildCommentReplyList(); |
2107 var od = new api.CommentReplyList.fromJson(o.toJson()); | 2337 var od = new api.CommentReplyList.fromJson(o.toJson()); |
2108 checkCommentReplyList(od); | 2338 checkCommentReplyList(od); |
2109 }); | 2339 }); |
2110 }); | 2340 }); |
2111 | 2341 |
2112 | 2342 |
| 2343 unittest.group("obj-schema-FileCapabilities", () { |
| 2344 unittest.test("to-json--from-json", () { |
| 2345 var o = buildFileCapabilities(); |
| 2346 var od = new api.FileCapabilities.fromJson(o.toJson()); |
| 2347 checkFileCapabilities(od); |
| 2348 }); |
| 2349 }); |
| 2350 |
| 2351 |
2113 unittest.group("obj-schema-FileImageMediaMetadataLocation", () { | 2352 unittest.group("obj-schema-FileImageMediaMetadataLocation", () { |
2114 unittest.test("to-json--from-json", () { | 2353 unittest.test("to-json--from-json", () { |
2115 var o = buildFileImageMediaMetadataLocation(); | 2354 var o = buildFileImageMediaMetadataLocation(); |
2116 var od = new api.FileImageMediaMetadataLocation.fromJson(o.toJson()); | 2355 var od = new api.FileImageMediaMetadataLocation.fromJson(o.toJson()); |
2117 checkFileImageMediaMetadataLocation(od); | 2356 checkFileImageMediaMetadataLocation(od); |
2118 }); | 2357 }); |
2119 }); | 2358 }); |
2120 | 2359 |
2121 | 2360 |
2122 unittest.group("obj-schema-FileImageMediaMetadata", () { | 2361 unittest.group("obj-schema-FileImageMediaMetadata", () { |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2202 | 2441 |
2203 unittest.group("obj-schema-ParentReference", () { | 2442 unittest.group("obj-schema-ParentReference", () { |
2204 unittest.test("to-json--from-json", () { | 2443 unittest.test("to-json--from-json", () { |
2205 var o = buildParentReference(); | 2444 var o = buildParentReference(); |
2206 var od = new api.ParentReference.fromJson(o.toJson()); | 2445 var od = new api.ParentReference.fromJson(o.toJson()); |
2207 checkParentReference(od); | 2446 checkParentReference(od); |
2208 }); | 2447 }); |
2209 }); | 2448 }); |
2210 | 2449 |
2211 | 2450 |
| 2451 unittest.group("obj-schema-PermissionTeamDrivePermissionDetails", () { |
| 2452 unittest.test("to-json--from-json", () { |
| 2453 var o = buildPermissionTeamDrivePermissionDetails(); |
| 2454 var od = new api.PermissionTeamDrivePermissionDetails.fromJson(o.toJson())
; |
| 2455 checkPermissionTeamDrivePermissionDetails(od); |
| 2456 }); |
| 2457 }); |
| 2458 |
| 2459 |
2212 unittest.group("obj-schema-Permission", () { | 2460 unittest.group("obj-schema-Permission", () { |
2213 unittest.test("to-json--from-json", () { | 2461 unittest.test("to-json--from-json", () { |
2214 var o = buildPermission(); | 2462 var o = buildPermission(); |
2215 var od = new api.Permission.fromJson(o.toJson()); | 2463 var od = new api.Permission.fromJson(o.toJson()); |
2216 checkPermission(od); | 2464 checkPermission(od); |
2217 }); | 2465 }); |
2218 }); | 2466 }); |
2219 | 2467 |
2220 | 2468 |
2221 unittest.group("obj-schema-PermissionId", () { | 2469 unittest.group("obj-schema-PermissionId", () { |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2274 | 2522 |
2275 unittest.group("obj-schema-StartPageToken", () { | 2523 unittest.group("obj-schema-StartPageToken", () { |
2276 unittest.test("to-json--from-json", () { | 2524 unittest.test("to-json--from-json", () { |
2277 var o = buildStartPageToken(); | 2525 var o = buildStartPageToken(); |
2278 var od = new api.StartPageToken.fromJson(o.toJson()); | 2526 var od = new api.StartPageToken.fromJson(o.toJson()); |
2279 checkStartPageToken(od); | 2527 checkStartPageToken(od); |
2280 }); | 2528 }); |
2281 }); | 2529 }); |
2282 | 2530 |
2283 | 2531 |
| 2532 unittest.group("obj-schema-TeamDriveCapabilities", () { |
| 2533 unittest.test("to-json--from-json", () { |
| 2534 var o = buildTeamDriveCapabilities(); |
| 2535 var od = new api.TeamDriveCapabilities.fromJson(o.toJson()); |
| 2536 checkTeamDriveCapabilities(od); |
| 2537 }); |
| 2538 }); |
| 2539 |
| 2540 |
| 2541 unittest.group("obj-schema-TeamDrive", () { |
| 2542 unittest.test("to-json--from-json", () { |
| 2543 var o = buildTeamDrive(); |
| 2544 var od = new api.TeamDrive.fromJson(o.toJson()); |
| 2545 checkTeamDrive(od); |
| 2546 }); |
| 2547 }); |
| 2548 |
| 2549 |
| 2550 unittest.group("obj-schema-TeamDriveList", () { |
| 2551 unittest.test("to-json--from-json", () { |
| 2552 var o = buildTeamDriveList(); |
| 2553 var od = new api.TeamDriveList.fromJson(o.toJson()); |
| 2554 checkTeamDriveList(od); |
| 2555 }); |
| 2556 }); |
| 2557 |
| 2558 |
2284 unittest.group("obj-schema-UserPicture", () { | 2559 unittest.group("obj-schema-UserPicture", () { |
2285 unittest.test("to-json--from-json", () { | 2560 unittest.test("to-json--from-json", () { |
2286 var o = buildUserPicture(); | 2561 var o = buildUserPicture(); |
2287 var od = new api.UserPicture.fromJson(o.toJson()); | 2562 var od = new api.UserPicture.fromJson(o.toJson()); |
2288 checkUserPicture(od); | 2563 checkUserPicture(od); |
2289 }); | 2564 }); |
2290 }); | 2565 }); |
2291 | 2566 |
2292 | 2567 |
2293 unittest.group("obj-schema-User", () { | 2568 unittest.group("obj-schema-User", () { |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2457 | 2732 |
2458 }); | 2733 }); |
2459 | 2734 |
2460 | 2735 |
2461 unittest.group("resource-ChangesResourceApi", () { | 2736 unittest.group("resource-ChangesResourceApi", () { |
2462 unittest.test("method--get", () { | 2737 unittest.test("method--get", () { |
2463 | 2738 |
2464 var mock = new HttpServerMock(); | 2739 var mock = new HttpServerMock(); |
2465 api.ChangesResourceApi res = new api.DriveApi(mock).changes; | 2740 api.ChangesResourceApi res = new api.DriveApi(mock).changes; |
2466 var arg_changeId = "foo"; | 2741 var arg_changeId = "foo"; |
| 2742 var arg_supportsTeamDrives = true; |
| 2743 var arg_teamDriveId = "foo"; |
2467 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2744 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2468 var path = (req.url).path; | 2745 var path = (req.url).path; |
2469 var pathOffset = 0; | 2746 var pathOffset = 0; |
2470 var index; | 2747 var index; |
2471 var subPart; | 2748 var subPart; |
2472 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2749 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
2473 pathOffset += 1; | 2750 pathOffset += 1; |
2474 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); | 2751 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); |
2475 pathOffset += 9; | 2752 pathOffset += 9; |
2476 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("changes/")); | 2753 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("changes/")); |
(...skipping 11 matching lines...) Expand all Loading... |
2488 if (n == "false") return false; | 2765 if (n == "false") return false; |
2489 if (n == null) return null; | 2766 if (n == null) return null; |
2490 throw new core.ArgumentError("Invalid boolean: $n"); | 2767 throw new core.ArgumentError("Invalid boolean: $n"); |
2491 } | 2768 } |
2492 if (query.length > 0) { | 2769 if (query.length > 0) { |
2493 for (var part in query.split("&")) { | 2770 for (var part in query.split("&")) { |
2494 var keyvalue = part.split("="); | 2771 var keyvalue = part.split("="); |
2495 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2772 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
2496 } | 2773 } |
2497 } | 2774 } |
| 2775 unittest.expect(queryMap["supportsTeamDrives"].first, unittest.equals("$
arg_supportsTeamDrives")); |
| 2776 unittest.expect(queryMap["teamDriveId"].first, unittest.equals(arg_teamD
riveId)); |
2498 | 2777 |
2499 | 2778 |
2500 var h = { | 2779 var h = { |
2501 "content-type" : "application/json; charset=utf-8", | 2780 "content-type" : "application/json; charset=utf-8", |
2502 }; | 2781 }; |
2503 var resp = convert.JSON.encode(buildChange()); | 2782 var resp = convert.JSON.encode(buildChange()); |
2504 return new async.Future.value(stringResponse(200, h, resp)); | 2783 return new async.Future.value(stringResponse(200, h, resp)); |
2505 }), true); | 2784 }), true); |
2506 res.get(arg_changeId).then(unittest.expectAsync(((api.Change response) { | 2785 res.get(arg_changeId, supportsTeamDrives: arg_supportsTeamDrives, teamDriv
eId: arg_teamDriveId).then(unittest.expectAsync(((api.Change response) { |
2507 checkChange(response); | 2786 checkChange(response); |
2508 }))); | 2787 }))); |
2509 }); | 2788 }); |
2510 | 2789 |
2511 unittest.test("method--getStartPageToken", () { | 2790 unittest.test("method--getStartPageToken", () { |
2512 | 2791 |
2513 var mock = new HttpServerMock(); | 2792 var mock = new HttpServerMock(); |
2514 api.ChangesResourceApi res = new api.DriveApi(mock).changes; | 2793 api.ChangesResourceApi res = new api.DriveApi(mock).changes; |
| 2794 var arg_supportsTeamDrives = true; |
| 2795 var arg_teamDriveId = "foo"; |
2515 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2796 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2516 var path = (req.url).path; | 2797 var path = (req.url).path; |
2517 var pathOffset = 0; | 2798 var pathOffset = 0; |
2518 var index; | 2799 var index; |
2519 var subPart; | 2800 var subPart; |
2520 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2801 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
2521 pathOffset += 1; | 2802 pathOffset += 1; |
2522 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); | 2803 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); |
2523 pathOffset += 9; | 2804 pathOffset += 9; |
2524 unittest.expect(path.substring(pathOffset, pathOffset + 22), unittest.eq
uals("changes/startPageToken")); | 2805 unittest.expect(path.substring(pathOffset, pathOffset + 22), unittest.eq
uals("changes/startPageToken")); |
2525 pathOffset += 22; | 2806 pathOffset += 22; |
2526 | 2807 |
2527 var query = (req.url).query; | 2808 var query = (req.url).query; |
2528 var queryOffset = 0; | 2809 var queryOffset = 0; |
2529 var queryMap = {}; | 2810 var queryMap = {}; |
2530 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 2811 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
2531 parseBool(n) { | 2812 parseBool(n) { |
2532 if (n == "true") return true; | 2813 if (n == "true") return true; |
2533 if (n == "false") return false; | 2814 if (n == "false") return false; |
2534 if (n == null) return null; | 2815 if (n == null) return null; |
2535 throw new core.ArgumentError("Invalid boolean: $n"); | 2816 throw new core.ArgumentError("Invalid boolean: $n"); |
2536 } | 2817 } |
2537 if (query.length > 0) { | 2818 if (query.length > 0) { |
2538 for (var part in query.split("&")) { | 2819 for (var part in query.split("&")) { |
2539 var keyvalue = part.split("="); | 2820 var keyvalue = part.split("="); |
2540 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2821 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
2541 } | 2822 } |
2542 } | 2823 } |
| 2824 unittest.expect(queryMap["supportsTeamDrives"].first, unittest.equals("$
arg_supportsTeamDrives")); |
| 2825 unittest.expect(queryMap["teamDriveId"].first, unittest.equals(arg_teamD
riveId)); |
2543 | 2826 |
2544 | 2827 |
2545 var h = { | 2828 var h = { |
2546 "content-type" : "application/json; charset=utf-8", | 2829 "content-type" : "application/json; charset=utf-8", |
2547 }; | 2830 }; |
2548 var resp = convert.JSON.encode(buildStartPageToken()); | 2831 var resp = convert.JSON.encode(buildStartPageToken()); |
2549 return new async.Future.value(stringResponse(200, h, resp)); | 2832 return new async.Future.value(stringResponse(200, h, resp)); |
2550 }), true); | 2833 }), true); |
2551 res.getStartPageToken().then(unittest.expectAsync(((api.StartPageToken res
ponse) { | 2834 res.getStartPageToken(supportsTeamDrives: arg_supportsTeamDrives, teamDriv
eId: arg_teamDriveId).then(unittest.expectAsync(((api.StartPageToken response) { |
2552 checkStartPageToken(response); | 2835 checkStartPageToken(response); |
2553 }))); | 2836 }))); |
2554 }); | 2837 }); |
2555 | 2838 |
2556 unittest.test("method--list", () { | 2839 unittest.test("method--list", () { |
2557 | 2840 |
2558 var mock = new HttpServerMock(); | 2841 var mock = new HttpServerMock(); |
2559 api.ChangesResourceApi res = new api.DriveApi(mock).changes; | 2842 api.ChangesResourceApi res = new api.DriveApi(mock).changes; |
| 2843 var arg_includeCorpusRemovals = true; |
2560 var arg_includeDeleted = true; | 2844 var arg_includeDeleted = true; |
2561 var arg_includeSubscribed = true; | 2845 var arg_includeSubscribed = true; |
| 2846 var arg_includeTeamDriveItems = true; |
2562 var arg_maxResults = 42; | 2847 var arg_maxResults = 42; |
2563 var arg_pageToken = "foo"; | 2848 var arg_pageToken = "foo"; |
2564 var arg_spaces = "foo"; | 2849 var arg_spaces = "foo"; |
2565 var arg_startChangeId = "foo"; | 2850 var arg_startChangeId = "foo"; |
| 2851 var arg_supportsTeamDrives = true; |
| 2852 var arg_teamDriveId = "foo"; |
2566 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2853 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2567 var path = (req.url).path; | 2854 var path = (req.url).path; |
2568 var pathOffset = 0; | 2855 var pathOffset = 0; |
2569 var index; | 2856 var index; |
2570 var subPart; | 2857 var subPart; |
2571 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2858 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
2572 pathOffset += 1; | 2859 pathOffset += 1; |
2573 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); | 2860 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); |
2574 pathOffset += 9; | 2861 pathOffset += 9; |
2575 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ
als("changes")); | 2862 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ
als("changes")); |
2576 pathOffset += 7; | 2863 pathOffset += 7; |
2577 | 2864 |
2578 var query = (req.url).query; | 2865 var query = (req.url).query; |
2579 var queryOffset = 0; | 2866 var queryOffset = 0; |
2580 var queryMap = {}; | 2867 var queryMap = {}; |
2581 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 2868 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
2582 parseBool(n) { | 2869 parseBool(n) { |
2583 if (n == "true") return true; | 2870 if (n == "true") return true; |
2584 if (n == "false") return false; | 2871 if (n == "false") return false; |
2585 if (n == null) return null; | 2872 if (n == null) return null; |
2586 throw new core.ArgumentError("Invalid boolean: $n"); | 2873 throw new core.ArgumentError("Invalid boolean: $n"); |
2587 } | 2874 } |
2588 if (query.length > 0) { | 2875 if (query.length > 0) { |
2589 for (var part in query.split("&")) { | 2876 for (var part in query.split("&")) { |
2590 var keyvalue = part.split("="); | 2877 var keyvalue = part.split("="); |
2591 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2878 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
2592 } | 2879 } |
2593 } | 2880 } |
| 2881 unittest.expect(queryMap["includeCorpusRemovals"].first, unittest.equals
("$arg_includeCorpusRemovals")); |
2594 unittest.expect(queryMap["includeDeleted"].first, unittest.equals("$arg_
includeDeleted")); | 2882 unittest.expect(queryMap["includeDeleted"].first, unittest.equals("$arg_
includeDeleted")); |
2595 unittest.expect(queryMap["includeSubscribed"].first, unittest.equals("$a
rg_includeSubscribed")); | 2883 unittest.expect(queryMap["includeSubscribed"].first, unittest.equals("$a
rg_includeSubscribed")); |
| 2884 unittest.expect(queryMap["includeTeamDriveItems"].first, unittest.equals
("$arg_includeTeamDriveItems")); |
2596 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | 2885 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); |
2597 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 2886 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
2598 unittest.expect(queryMap["spaces"].first, unittest.equals(arg_spaces)); | 2887 unittest.expect(queryMap["spaces"].first, unittest.equals(arg_spaces)); |
2599 unittest.expect(queryMap["startChangeId"].first, unittest.equals(arg_sta
rtChangeId)); | 2888 unittest.expect(queryMap["startChangeId"].first, unittest.equals(arg_sta
rtChangeId)); |
| 2889 unittest.expect(queryMap["supportsTeamDrives"].first, unittest.equals("$
arg_supportsTeamDrives")); |
| 2890 unittest.expect(queryMap["teamDriveId"].first, unittest.equals(arg_teamD
riveId)); |
2600 | 2891 |
2601 | 2892 |
2602 var h = { | 2893 var h = { |
2603 "content-type" : "application/json; charset=utf-8", | 2894 "content-type" : "application/json; charset=utf-8", |
2604 }; | 2895 }; |
2605 var resp = convert.JSON.encode(buildChangeList()); | 2896 var resp = convert.JSON.encode(buildChangeList()); |
2606 return new async.Future.value(stringResponse(200, h, resp)); | 2897 return new async.Future.value(stringResponse(200, h, resp)); |
2607 }), true); | 2898 }), true); |
2608 res.list(includeDeleted: arg_includeDeleted, includeSubscribed: arg_includ
eSubscribed, maxResults: arg_maxResults, pageToken: arg_pageToken, spaces: arg_s
paces, startChangeId: arg_startChangeId).then(unittest.expectAsync(((api.ChangeL
ist response) { | 2899 res.list(includeCorpusRemovals: arg_includeCorpusRemovals, includeDeleted:
arg_includeDeleted, includeSubscribed: arg_includeSubscribed, includeTeamDriveI
tems: arg_includeTeamDriveItems, maxResults: arg_maxResults, pageToken: arg_page
Token, spaces: arg_spaces, startChangeId: arg_startChangeId, supportsTeamDrives:
arg_supportsTeamDrives, teamDriveId: arg_teamDriveId).then(unittest.expectAsync
(((api.ChangeList response) { |
2609 checkChangeList(response); | 2900 checkChangeList(response); |
2610 }))); | 2901 }))); |
2611 }); | 2902 }); |
2612 | 2903 |
2613 unittest.test("method--watch", () { | 2904 unittest.test("method--watch", () { |
2614 | 2905 |
2615 var mock = new HttpServerMock(); | 2906 var mock = new HttpServerMock(); |
2616 api.ChangesResourceApi res = new api.DriveApi(mock).changes; | 2907 api.ChangesResourceApi res = new api.DriveApi(mock).changes; |
2617 var arg_request = buildChannel(); | 2908 var arg_request = buildChannel(); |
| 2909 var arg_includeCorpusRemovals = true; |
2618 var arg_includeDeleted = true; | 2910 var arg_includeDeleted = true; |
2619 var arg_includeSubscribed = true; | 2911 var arg_includeSubscribed = true; |
| 2912 var arg_includeTeamDriveItems = true; |
2620 var arg_maxResults = 42; | 2913 var arg_maxResults = 42; |
2621 var arg_pageToken = "foo"; | 2914 var arg_pageToken = "foo"; |
2622 var arg_spaces = "foo"; | 2915 var arg_spaces = "foo"; |
2623 var arg_startChangeId = "foo"; | 2916 var arg_startChangeId = "foo"; |
| 2917 var arg_supportsTeamDrives = true; |
| 2918 var arg_teamDriveId = "foo"; |
2624 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2919 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2625 var obj = new api.Channel.fromJson(json); | 2920 var obj = new api.Channel.fromJson(json); |
2626 checkChannel(obj); | 2921 checkChannel(obj); |
2627 | 2922 |
2628 var path = (req.url).path; | 2923 var path = (req.url).path; |
2629 var pathOffset = 0; | 2924 var pathOffset = 0; |
2630 var index; | 2925 var index; |
2631 var subPart; | 2926 var subPart; |
2632 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2927 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
2633 pathOffset += 1; | 2928 pathOffset += 1; |
(...skipping 11 matching lines...) Expand all Loading... |
2645 if (n == "false") return false; | 2940 if (n == "false") return false; |
2646 if (n == null) return null; | 2941 if (n == null) return null; |
2647 throw new core.ArgumentError("Invalid boolean: $n"); | 2942 throw new core.ArgumentError("Invalid boolean: $n"); |
2648 } | 2943 } |
2649 if (query.length > 0) { | 2944 if (query.length > 0) { |
2650 for (var part in query.split("&")) { | 2945 for (var part in query.split("&")) { |
2651 var keyvalue = part.split("="); | 2946 var keyvalue = part.split("="); |
2652 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])); |
2653 } | 2948 } |
2654 } | 2949 } |
| 2950 unittest.expect(queryMap["includeCorpusRemovals"].first, unittest.equals
("$arg_includeCorpusRemovals")); |
2655 unittest.expect(queryMap["includeDeleted"].first, unittest.equals("$arg_
includeDeleted")); | 2951 unittest.expect(queryMap["includeDeleted"].first, unittest.equals("$arg_
includeDeleted")); |
2656 unittest.expect(queryMap["includeSubscribed"].first, unittest.equals("$a
rg_includeSubscribed")); | 2952 unittest.expect(queryMap["includeSubscribed"].first, unittest.equals("$a
rg_includeSubscribed")); |
| 2953 unittest.expect(queryMap["includeTeamDriveItems"].first, unittest.equals
("$arg_includeTeamDriveItems")); |
2657 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | 2954 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); |
2658 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 2955 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
2659 unittest.expect(queryMap["spaces"].first, unittest.equals(arg_spaces)); | 2956 unittest.expect(queryMap["spaces"].first, unittest.equals(arg_spaces)); |
2660 unittest.expect(queryMap["startChangeId"].first, unittest.equals(arg_sta
rtChangeId)); | 2957 unittest.expect(queryMap["startChangeId"].first, unittest.equals(arg_sta
rtChangeId)); |
| 2958 unittest.expect(queryMap["supportsTeamDrives"].first, unittest.equals("$
arg_supportsTeamDrives")); |
| 2959 unittest.expect(queryMap["teamDriveId"].first, unittest.equals(arg_teamD
riveId)); |
2661 | 2960 |
2662 | 2961 |
2663 var h = { | 2962 var h = { |
2664 "content-type" : "application/json; charset=utf-8", | 2963 "content-type" : "application/json; charset=utf-8", |
2665 }; | 2964 }; |
2666 var resp = convert.JSON.encode(buildChannel()); | 2965 var resp = convert.JSON.encode(buildChannel()); |
2667 return new async.Future.value(stringResponse(200, h, resp)); | 2966 return new async.Future.value(stringResponse(200, h, resp)); |
2668 }), true); | 2967 }), true); |
2669 res.watch(arg_request, includeDeleted: arg_includeDeleted, includeSubscrib
ed: arg_includeSubscribed, maxResults: arg_maxResults, pageToken: arg_pageToken,
spaces: arg_spaces, startChangeId: arg_startChangeId).then(unittest.expectAsync
(((api.Channel response) { | 2968 res.watch(arg_request, includeCorpusRemovals: arg_includeCorpusRemovals, i
ncludeDeleted: arg_includeDeleted, includeSubscribed: arg_includeSubscribed, inc
ludeTeamDriveItems: arg_includeTeamDriveItems, maxResults: arg_maxResults, pageT
oken: arg_pageToken, spaces: arg_spaces, startChangeId: arg_startChangeId, suppo
rtsTeamDrives: arg_supportsTeamDrives, teamDriveId: arg_teamDriveId).then(unitte
st.expectAsync(((api.Channel response) { |
2670 checkChannel(response); | 2969 checkChannel(response); |
2671 }))); | 2970 }))); |
2672 }); | 2971 }); |
2673 | 2972 |
2674 }); | 2973 }); |
2675 | 2974 |
2676 | 2975 |
2677 unittest.group("resource-ChannelsResourceApi", () { | 2976 unittest.group("resource-ChannelsResourceApi", () { |
2678 unittest.test("method--stop", () { | 2977 unittest.test("method--stop", () { |
2679 | 2978 |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2837 checkChildReference(response); | 3136 checkChildReference(response); |
2838 }))); | 3137 }))); |
2839 }); | 3138 }); |
2840 | 3139 |
2841 unittest.test("method--insert", () { | 3140 unittest.test("method--insert", () { |
2842 | 3141 |
2843 var mock = new HttpServerMock(); | 3142 var mock = new HttpServerMock(); |
2844 api.ChildrenResourceApi res = new api.DriveApi(mock).children; | 3143 api.ChildrenResourceApi res = new api.DriveApi(mock).children; |
2845 var arg_request = buildChildReference(); | 3144 var arg_request = buildChildReference(); |
2846 var arg_folderId = "foo"; | 3145 var arg_folderId = "foo"; |
| 3146 var arg_supportsTeamDrives = true; |
2847 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3147 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2848 var obj = new api.ChildReference.fromJson(json); | 3148 var obj = new api.ChildReference.fromJson(json); |
2849 checkChildReference(obj); | 3149 checkChildReference(obj); |
2850 | 3150 |
2851 var path = (req.url).path; | 3151 var path = (req.url).path; |
2852 var pathOffset = 0; | 3152 var pathOffset = 0; |
2853 var index; | 3153 var index; |
2854 var subPart; | 3154 var subPart; |
2855 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3155 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
2856 pathOffset += 1; | 3156 pathOffset += 1; |
(...skipping 18 matching lines...) Expand all Loading... |
2875 if (n == "false") return false; | 3175 if (n == "false") return false; |
2876 if (n == null) return null; | 3176 if (n == null) return null; |
2877 throw new core.ArgumentError("Invalid boolean: $n"); | 3177 throw new core.ArgumentError("Invalid boolean: $n"); |
2878 } | 3178 } |
2879 if (query.length > 0) { | 3179 if (query.length > 0) { |
2880 for (var part in query.split("&")) { | 3180 for (var part in query.split("&")) { |
2881 var keyvalue = part.split("="); | 3181 var keyvalue = part.split("="); |
2882 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 3182 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
2883 } | 3183 } |
2884 } | 3184 } |
| 3185 unittest.expect(queryMap["supportsTeamDrives"].first, unittest.equals("$
arg_supportsTeamDrives")); |
2885 | 3186 |
2886 | 3187 |
2887 var h = { | 3188 var h = { |
2888 "content-type" : "application/json; charset=utf-8", | 3189 "content-type" : "application/json; charset=utf-8", |
2889 }; | 3190 }; |
2890 var resp = convert.JSON.encode(buildChildReference()); | 3191 var resp = convert.JSON.encode(buildChildReference()); |
2891 return new async.Future.value(stringResponse(200, h, resp)); | 3192 return new async.Future.value(stringResponse(200, h, resp)); |
2892 }), true); | 3193 }), true); |
2893 res.insert(arg_request, arg_folderId).then(unittest.expectAsync(((api.Chil
dReference response) { | 3194 res.insert(arg_request, arg_folderId, supportsTeamDrives: arg_supportsTeam
Drives).then(unittest.expectAsync(((api.ChildReference response) { |
2894 checkChildReference(response); | 3195 checkChildReference(response); |
2895 }))); | 3196 }))); |
2896 }); | 3197 }); |
2897 | 3198 |
2898 unittest.test("method--list", () { | 3199 unittest.test("method--list", () { |
2899 | 3200 |
2900 var mock = new HttpServerMock(); | 3201 var mock = new HttpServerMock(); |
2901 api.ChildrenResourceApi res = new api.DriveApi(mock).children; | 3202 api.ChildrenResourceApi res = new api.DriveApi(mock).children; |
2902 var arg_folderId = "foo"; | 3203 var arg_folderId = "foo"; |
2903 var arg_maxResults = 42; | 3204 var arg_maxResults = 42; |
(...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3321 unittest.test("method--copy", () { | 3622 unittest.test("method--copy", () { |
3322 | 3623 |
3323 var mock = new HttpServerMock(); | 3624 var mock = new HttpServerMock(); |
3324 api.FilesResourceApi res = new api.DriveApi(mock).files; | 3625 api.FilesResourceApi res = new api.DriveApi(mock).files; |
3325 var arg_request = buildFile(); | 3626 var arg_request = buildFile(); |
3326 var arg_fileId = "foo"; | 3627 var arg_fileId = "foo"; |
3327 var arg_convert = true; | 3628 var arg_convert = true; |
3328 var arg_ocr = true; | 3629 var arg_ocr = true; |
3329 var arg_ocrLanguage = "foo"; | 3630 var arg_ocrLanguage = "foo"; |
3330 var arg_pinned = true; | 3631 var arg_pinned = true; |
| 3632 var arg_supportsTeamDrives = true; |
3331 var arg_timedTextLanguage = "foo"; | 3633 var arg_timedTextLanguage = "foo"; |
3332 var arg_timedTextTrackName = "foo"; | 3634 var arg_timedTextTrackName = "foo"; |
3333 var arg_visibility = "foo"; | 3635 var arg_visibility = "foo"; |
3334 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3636 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
3335 var obj = new api.File.fromJson(json); | 3637 var obj = new api.File.fromJson(json); |
3336 checkFile(obj); | 3638 checkFile(obj); |
3337 | 3639 |
3338 var path = (req.url).path; | 3640 var path = (req.url).path; |
3339 var pathOffset = 0; | 3641 var pathOffset = 0; |
3340 var index; | 3642 var index; |
(...skipping 25 matching lines...) Expand all Loading... |
3366 if (query.length > 0) { | 3668 if (query.length > 0) { |
3367 for (var part in query.split("&")) { | 3669 for (var part in query.split("&")) { |
3368 var keyvalue = part.split("="); | 3670 var keyvalue = part.split("="); |
3369 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 3671 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
3370 } | 3672 } |
3371 } | 3673 } |
3372 unittest.expect(queryMap["convert"].first, unittest.equals("$arg_convert
")); | 3674 unittest.expect(queryMap["convert"].first, unittest.equals("$arg_convert
")); |
3373 unittest.expect(queryMap["ocr"].first, unittest.equals("$arg_ocr")); | 3675 unittest.expect(queryMap["ocr"].first, unittest.equals("$arg_ocr")); |
3374 unittest.expect(queryMap["ocrLanguage"].first, unittest.equals(arg_ocrLa
nguage)); | 3676 unittest.expect(queryMap["ocrLanguage"].first, unittest.equals(arg_ocrLa
nguage)); |
3375 unittest.expect(queryMap["pinned"].first, unittest.equals("$arg_pinned")
); | 3677 unittest.expect(queryMap["pinned"].first, unittest.equals("$arg_pinned")
); |
| 3678 unittest.expect(queryMap["supportsTeamDrives"].first, unittest.equals("$
arg_supportsTeamDrives")); |
3376 unittest.expect(queryMap["timedTextLanguage"].first, unittest.equals(arg
_timedTextLanguage)); | 3679 unittest.expect(queryMap["timedTextLanguage"].first, unittest.equals(arg
_timedTextLanguage)); |
3377 unittest.expect(queryMap["timedTextTrackName"].first, unittest.equals(ar
g_timedTextTrackName)); | 3680 unittest.expect(queryMap["timedTextTrackName"].first, unittest.equals(ar
g_timedTextTrackName)); |
3378 unittest.expect(queryMap["visibility"].first, unittest.equals(arg_visibi
lity)); | 3681 unittest.expect(queryMap["visibility"].first, unittest.equals(arg_visibi
lity)); |
3379 | 3682 |
3380 | 3683 |
3381 var h = { | 3684 var h = { |
3382 "content-type" : "application/json; charset=utf-8", | 3685 "content-type" : "application/json; charset=utf-8", |
3383 }; | 3686 }; |
3384 var resp = convert.JSON.encode(buildFile()); | 3687 var resp = convert.JSON.encode(buildFile()); |
3385 return new async.Future.value(stringResponse(200, h, resp)); | 3688 return new async.Future.value(stringResponse(200, h, resp)); |
3386 }), true); | 3689 }), true); |
3387 res.copy(arg_request, arg_fileId, convert: arg_convert, ocr: arg_ocr, ocrL
anguage: arg_ocrLanguage, pinned: arg_pinned, timedTextLanguage: arg_timedTextLa
nguage, timedTextTrackName: arg_timedTextTrackName, visibility: arg_visibility).
then(unittest.expectAsync(((api.File response) { | 3690 res.copy(arg_request, arg_fileId, convert: arg_convert, ocr: arg_ocr, ocrL
anguage: arg_ocrLanguage, pinned: arg_pinned, supportsTeamDrives: arg_supportsTe
amDrives, timedTextLanguage: arg_timedTextLanguage, timedTextTrackName: arg_time
dTextTrackName, visibility: arg_visibility).then(unittest.expectAsync(((api.File
response) { |
3388 checkFile(response); | 3691 checkFile(response); |
3389 }))); | 3692 }))); |
3390 }); | 3693 }); |
3391 | 3694 |
3392 unittest.test("method--delete", () { | 3695 unittest.test("method--delete", () { |
3393 | 3696 |
3394 var mock = new HttpServerMock(); | 3697 var mock = new HttpServerMock(); |
3395 api.FilesResourceApi res = new api.DriveApi(mock).files; | 3698 api.FilesResourceApi res = new api.DriveApi(mock).files; |
3396 var arg_fileId = "foo"; | 3699 var arg_fileId = "foo"; |
| 3700 var arg_supportsTeamDrives = true; |
3397 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3701 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
3398 var path = (req.url).path; | 3702 var path = (req.url).path; |
3399 var pathOffset = 0; | 3703 var pathOffset = 0; |
3400 var index; | 3704 var index; |
3401 var subPart; | 3705 var subPart; |
3402 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3706 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
3403 pathOffset += 1; | 3707 pathOffset += 1; |
3404 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); | 3708 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); |
3405 pathOffset += 9; | 3709 pathOffset += 9; |
3406 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ
als("files/")); | 3710 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ
als("files/")); |
(...skipping 11 matching lines...) Expand all Loading... |
3418 if (n == "false") return false; | 3722 if (n == "false") return false; |
3419 if (n == null) return null; | 3723 if (n == null) return null; |
3420 throw new core.ArgumentError("Invalid boolean: $n"); | 3724 throw new core.ArgumentError("Invalid boolean: $n"); |
3421 } | 3725 } |
3422 if (query.length > 0) { | 3726 if (query.length > 0) { |
3423 for (var part in query.split("&")) { | 3727 for (var part in query.split("&")) { |
3424 var keyvalue = part.split("="); | 3728 var keyvalue = part.split("="); |
3425 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 3729 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
3426 } | 3730 } |
3427 } | 3731 } |
| 3732 unittest.expect(queryMap["supportsTeamDrives"].first, unittest.equals("$
arg_supportsTeamDrives")); |
3428 | 3733 |
3429 | 3734 |
3430 var h = { | 3735 var h = { |
3431 "content-type" : "application/json; charset=utf-8", | 3736 "content-type" : "application/json; charset=utf-8", |
3432 }; | 3737 }; |
3433 var resp = ""; | 3738 var resp = ""; |
3434 return new async.Future.value(stringResponse(200, h, resp)); | 3739 return new async.Future.value(stringResponse(200, h, resp)); |
3435 }), true); | 3740 }), true); |
3436 res.delete(arg_fileId).then(unittest.expectAsync((_) {})); | 3741 res.delete(arg_fileId, supportsTeamDrives: arg_supportsTeamDrives).then(un
ittest.expectAsync((_) {})); |
3437 }); | 3742 }); |
3438 | 3743 |
3439 unittest.test("method--emptyTrash", () { | 3744 unittest.test("method--emptyTrash", () { |
3440 | 3745 |
3441 var mock = new HttpServerMock(); | 3746 var mock = new HttpServerMock(); |
3442 api.FilesResourceApi res = new api.DriveApi(mock).files; | 3747 api.FilesResourceApi res = new api.DriveApi(mock).files; |
3443 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3748 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
3444 var path = (req.url).path; | 3749 var path = (req.url).path; |
3445 var pathOffset = 0; | 3750 var pathOffset = 0; |
3446 var index; | 3751 var index; |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3586 unittest.test("method--get", () { | 3891 unittest.test("method--get", () { |
3587 // TODO: Implement tests for media upload; | 3892 // TODO: Implement tests for media upload; |
3588 // TODO: Implement tests for media download; | 3893 // TODO: Implement tests for media download; |
3589 | 3894 |
3590 var mock = new HttpServerMock(); | 3895 var mock = new HttpServerMock(); |
3591 api.FilesResourceApi res = new api.DriveApi(mock).files; | 3896 api.FilesResourceApi res = new api.DriveApi(mock).files; |
3592 var arg_fileId = "foo"; | 3897 var arg_fileId = "foo"; |
3593 var arg_acknowledgeAbuse = true; | 3898 var arg_acknowledgeAbuse = true; |
3594 var arg_projection = "foo"; | 3899 var arg_projection = "foo"; |
3595 var arg_revisionId = "foo"; | 3900 var arg_revisionId = "foo"; |
| 3901 var arg_supportsTeamDrives = true; |
3596 var arg_updateViewedDate = true; | 3902 var arg_updateViewedDate = true; |
3597 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3903 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
3598 var path = (req.url).path; | 3904 var path = (req.url).path; |
3599 var pathOffset = 0; | 3905 var pathOffset = 0; |
3600 var index; | 3906 var index; |
3601 var subPart; | 3907 var subPart; |
3602 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3908 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
3603 pathOffset += 1; | 3909 pathOffset += 1; |
3604 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); | 3910 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); |
3605 pathOffset += 9; | 3911 pathOffset += 9; |
(...skipping 15 matching lines...) Expand all Loading... |
3621 } | 3927 } |
3622 if (query.length > 0) { | 3928 if (query.length > 0) { |
3623 for (var part in query.split("&")) { | 3929 for (var part in query.split("&")) { |
3624 var keyvalue = part.split("="); | 3930 var keyvalue = part.split("="); |
3625 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 3931 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
3626 } | 3932 } |
3627 } | 3933 } |
3628 unittest.expect(queryMap["acknowledgeAbuse"].first, unittest.equals("$ar
g_acknowledgeAbuse")); | 3934 unittest.expect(queryMap["acknowledgeAbuse"].first, unittest.equals("$ar
g_acknowledgeAbuse")); |
3629 unittest.expect(queryMap["projection"].first, unittest.equals(arg_projec
tion)); | 3935 unittest.expect(queryMap["projection"].first, unittest.equals(arg_projec
tion)); |
3630 unittest.expect(queryMap["revisionId"].first, unittest.equals(arg_revisi
onId)); | 3936 unittest.expect(queryMap["revisionId"].first, unittest.equals(arg_revisi
onId)); |
| 3937 unittest.expect(queryMap["supportsTeamDrives"].first, unittest.equals("$
arg_supportsTeamDrives")); |
3631 unittest.expect(queryMap["updateViewedDate"].first, unittest.equals("$ar
g_updateViewedDate")); | 3938 unittest.expect(queryMap["updateViewedDate"].first, unittest.equals("$ar
g_updateViewedDate")); |
3632 | 3939 |
3633 | 3940 |
3634 var h = { | 3941 var h = { |
3635 "content-type" : "application/json; charset=utf-8", | 3942 "content-type" : "application/json; charset=utf-8", |
3636 }; | 3943 }; |
3637 var resp = convert.JSON.encode(buildFile()); | 3944 var resp = convert.JSON.encode(buildFile()); |
3638 return new async.Future.value(stringResponse(200, h, resp)); | 3945 return new async.Future.value(stringResponse(200, h, resp)); |
3639 }), true); | 3946 }), true); |
3640 res.get(arg_fileId, acknowledgeAbuse: arg_acknowledgeAbuse, projection: ar
g_projection, revisionId: arg_revisionId, updateViewedDate: arg_updateViewedDate
).then(unittest.expectAsync(((api.File response) { | 3947 res.get(arg_fileId, acknowledgeAbuse: arg_acknowledgeAbuse, projection: ar
g_projection, revisionId: arg_revisionId, supportsTeamDrives: arg_supportsTeamDr
ives, updateViewedDate: arg_updateViewedDate).then(unittest.expectAsync(((api.Fi
le response) { |
3641 checkFile(response); | 3948 checkFile(response); |
3642 }))); | 3949 }))); |
3643 }); | 3950 }); |
3644 | 3951 |
3645 unittest.test("method--insert", () { | 3952 unittest.test("method--insert", () { |
3646 // TODO: Implement tests for media upload; | 3953 // TODO: Implement tests for media upload; |
3647 // TODO: Implement tests for media download; | 3954 // TODO: Implement tests for media download; |
3648 | 3955 |
3649 var mock = new HttpServerMock(); | 3956 var mock = new HttpServerMock(); |
3650 api.FilesResourceApi res = new api.DriveApi(mock).files; | 3957 api.FilesResourceApi res = new api.DriveApi(mock).files; |
3651 var arg_request = buildFile(); | 3958 var arg_request = buildFile(); |
3652 var arg_convert = true; | 3959 var arg_convert = true; |
3653 var arg_ocr = true; | 3960 var arg_ocr = true; |
3654 var arg_ocrLanguage = "foo"; | 3961 var arg_ocrLanguage = "foo"; |
3655 var arg_pinned = true; | 3962 var arg_pinned = true; |
| 3963 var arg_supportsTeamDrives = true; |
3656 var arg_timedTextLanguage = "foo"; | 3964 var arg_timedTextLanguage = "foo"; |
3657 var arg_timedTextTrackName = "foo"; | 3965 var arg_timedTextTrackName = "foo"; |
3658 var arg_useContentAsIndexableText = true; | 3966 var arg_useContentAsIndexableText = true; |
3659 var arg_visibility = "foo"; | 3967 var arg_visibility = "foo"; |
3660 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3968 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
3661 var obj = new api.File.fromJson(json); | 3969 var obj = new api.File.fromJson(json); |
3662 checkFile(obj); | 3970 checkFile(obj); |
3663 | 3971 |
3664 var path = (req.url).path; | 3972 var path = (req.url).path; |
3665 var pathOffset = 0; | 3973 var pathOffset = 0; |
(...skipping 19 matching lines...) Expand all Loading... |
3685 if (query.length > 0) { | 3993 if (query.length > 0) { |
3686 for (var part in query.split("&")) { | 3994 for (var part in query.split("&")) { |
3687 var keyvalue = part.split("="); | 3995 var keyvalue = part.split("="); |
3688 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 3996 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
3689 } | 3997 } |
3690 } | 3998 } |
3691 unittest.expect(queryMap["convert"].first, unittest.equals("$arg_convert
")); | 3999 unittest.expect(queryMap["convert"].first, unittest.equals("$arg_convert
")); |
3692 unittest.expect(queryMap["ocr"].first, unittest.equals("$arg_ocr")); | 4000 unittest.expect(queryMap["ocr"].first, unittest.equals("$arg_ocr")); |
3693 unittest.expect(queryMap["ocrLanguage"].first, unittest.equals(arg_ocrLa
nguage)); | 4001 unittest.expect(queryMap["ocrLanguage"].first, unittest.equals(arg_ocrLa
nguage)); |
3694 unittest.expect(queryMap["pinned"].first, unittest.equals("$arg_pinned")
); | 4002 unittest.expect(queryMap["pinned"].first, unittest.equals("$arg_pinned")
); |
| 4003 unittest.expect(queryMap["supportsTeamDrives"].first, unittest.equals("$
arg_supportsTeamDrives")); |
3695 unittest.expect(queryMap["timedTextLanguage"].first, unittest.equals(arg
_timedTextLanguage)); | 4004 unittest.expect(queryMap["timedTextLanguage"].first, unittest.equals(arg
_timedTextLanguage)); |
3696 unittest.expect(queryMap["timedTextTrackName"].first, unittest.equals(ar
g_timedTextTrackName)); | 4005 unittest.expect(queryMap["timedTextTrackName"].first, unittest.equals(ar
g_timedTextTrackName)); |
3697 unittest.expect(queryMap["useContentAsIndexableText"].first, unittest.eq
uals("$arg_useContentAsIndexableText")); | 4006 unittest.expect(queryMap["useContentAsIndexableText"].first, unittest.eq
uals("$arg_useContentAsIndexableText")); |
3698 unittest.expect(queryMap["visibility"].first, unittest.equals(arg_visibi
lity)); | 4007 unittest.expect(queryMap["visibility"].first, unittest.equals(arg_visibi
lity)); |
3699 | 4008 |
3700 | 4009 |
3701 var h = { | 4010 var h = { |
3702 "content-type" : "application/json; charset=utf-8", | 4011 "content-type" : "application/json; charset=utf-8", |
3703 }; | 4012 }; |
3704 var resp = convert.JSON.encode(buildFile()); | 4013 var resp = convert.JSON.encode(buildFile()); |
3705 return new async.Future.value(stringResponse(200, h, resp)); | 4014 return new async.Future.value(stringResponse(200, h, resp)); |
3706 }), true); | 4015 }), true); |
3707 res.insert(arg_request, convert: arg_convert, ocr: arg_ocr, ocrLanguage: a
rg_ocrLanguage, pinned: arg_pinned, timedTextLanguage: arg_timedTextLanguage, ti
medTextTrackName: arg_timedTextTrackName, useContentAsIndexableText: arg_useCont
entAsIndexableText, visibility: arg_visibility).then(unittest.expectAsync(((api.
File response) { | 4016 res.insert(arg_request, convert: arg_convert, ocr: arg_ocr, ocrLanguage: a
rg_ocrLanguage, pinned: arg_pinned, supportsTeamDrives: arg_supportsTeamDrives,
timedTextLanguage: arg_timedTextLanguage, timedTextTrackName: arg_timedTextTrack
Name, useContentAsIndexableText: arg_useContentAsIndexableText, visibility: arg_
visibility).then(unittest.expectAsync(((api.File response) { |
3708 checkFile(response); | 4017 checkFile(response); |
3709 }))); | 4018 }))); |
3710 }); | 4019 }); |
3711 | 4020 |
3712 unittest.test("method--list", () { | 4021 unittest.test("method--list", () { |
3713 | 4022 |
3714 var mock = new HttpServerMock(); | 4023 var mock = new HttpServerMock(); |
3715 api.FilesResourceApi res = new api.DriveApi(mock).files; | 4024 api.FilesResourceApi res = new api.DriveApi(mock).files; |
| 4025 var arg_corpora = "foo"; |
3716 var arg_corpus = "foo"; | 4026 var arg_corpus = "foo"; |
| 4027 var arg_includeTeamDriveItems = true; |
3717 var arg_maxResults = 42; | 4028 var arg_maxResults = 42; |
3718 var arg_orderBy = "foo"; | 4029 var arg_orderBy = "foo"; |
3719 var arg_pageToken = "foo"; | 4030 var arg_pageToken = "foo"; |
3720 var arg_projection = "foo"; | 4031 var arg_projection = "foo"; |
3721 var arg_q = "foo"; | 4032 var arg_q = "foo"; |
3722 var arg_spaces = "foo"; | 4033 var arg_spaces = "foo"; |
| 4034 var arg_supportsTeamDrives = true; |
| 4035 var arg_teamDriveId = "foo"; |
3723 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 4036 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
3724 var path = (req.url).path; | 4037 var path = (req.url).path; |
3725 var pathOffset = 0; | 4038 var pathOffset = 0; |
3726 var index; | 4039 var index; |
3727 var subPart; | 4040 var subPart; |
3728 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 4041 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
3729 pathOffset += 1; | 4042 pathOffset += 1; |
3730 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); | 4043 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); |
3731 pathOffset += 9; | 4044 pathOffset += 9; |
3732 unittest.expect(path.substring(pathOffset, pathOffset + 5), unittest.equ
als("files")); | 4045 unittest.expect(path.substring(pathOffset, pathOffset + 5), unittest.equ
als("files")); |
3733 pathOffset += 5; | 4046 pathOffset += 5; |
3734 | 4047 |
3735 var query = (req.url).query; | 4048 var query = (req.url).query; |
3736 var queryOffset = 0; | 4049 var queryOffset = 0; |
3737 var queryMap = {}; | 4050 var queryMap = {}; |
3738 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 4051 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
3739 parseBool(n) { | 4052 parseBool(n) { |
3740 if (n == "true") return true; | 4053 if (n == "true") return true; |
3741 if (n == "false") return false; | 4054 if (n == "false") return false; |
3742 if (n == null) return null; | 4055 if (n == null) return null; |
3743 throw new core.ArgumentError("Invalid boolean: $n"); | 4056 throw new core.ArgumentError("Invalid boolean: $n"); |
3744 } | 4057 } |
3745 if (query.length > 0) { | 4058 if (query.length > 0) { |
3746 for (var part in query.split("&")) { | 4059 for (var part in query.split("&")) { |
3747 var keyvalue = part.split("="); | 4060 var keyvalue = part.split("="); |
3748 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 4061 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
3749 } | 4062 } |
3750 } | 4063 } |
| 4064 unittest.expect(queryMap["corpora"].first, unittest.equals(arg_corpora))
; |
3751 unittest.expect(queryMap["corpus"].first, unittest.equals(arg_corpus)); | 4065 unittest.expect(queryMap["corpus"].first, unittest.equals(arg_corpus)); |
| 4066 unittest.expect(queryMap["includeTeamDriveItems"].first, unittest.equals
("$arg_includeTeamDriveItems")); |
3752 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | 4067 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); |
3753 unittest.expect(queryMap["orderBy"].first, unittest.equals(arg_orderBy))
; | 4068 unittest.expect(queryMap["orderBy"].first, unittest.equals(arg_orderBy))
; |
3754 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 4069 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
3755 unittest.expect(queryMap["projection"].first, unittest.equals(arg_projec
tion)); | 4070 unittest.expect(queryMap["projection"].first, unittest.equals(arg_projec
tion)); |
3756 unittest.expect(queryMap["q"].first, unittest.equals(arg_q)); | 4071 unittest.expect(queryMap["q"].first, unittest.equals(arg_q)); |
3757 unittest.expect(queryMap["spaces"].first, unittest.equals(arg_spaces)); | 4072 unittest.expect(queryMap["spaces"].first, unittest.equals(arg_spaces)); |
| 4073 unittest.expect(queryMap["supportsTeamDrives"].first, unittest.equals("$
arg_supportsTeamDrives")); |
| 4074 unittest.expect(queryMap["teamDriveId"].first, unittest.equals(arg_teamD
riveId)); |
3758 | 4075 |
3759 | 4076 |
3760 var h = { | 4077 var h = { |
3761 "content-type" : "application/json; charset=utf-8", | 4078 "content-type" : "application/json; charset=utf-8", |
3762 }; | 4079 }; |
3763 var resp = convert.JSON.encode(buildFileList()); | 4080 var resp = convert.JSON.encode(buildFileList()); |
3764 return new async.Future.value(stringResponse(200, h, resp)); | 4081 return new async.Future.value(stringResponse(200, h, resp)); |
3765 }), true); | 4082 }), true); |
3766 res.list(corpus: arg_corpus, maxResults: arg_maxResults, orderBy: arg_orde
rBy, pageToken: arg_pageToken, projection: arg_projection, q: arg_q, spaces: arg
_spaces).then(unittest.expectAsync(((api.FileList response) { | 4083 res.list(corpora: arg_corpora, corpus: arg_corpus, includeTeamDriveItems:
arg_includeTeamDriveItems, maxResults: arg_maxResults, orderBy: arg_orderBy, pag
eToken: arg_pageToken, projection: arg_projection, q: arg_q, spaces: arg_spaces,
supportsTeamDrives: arg_supportsTeamDrives, teamDriveId: arg_teamDriveId).then(
unittest.expectAsync(((api.FileList response) { |
3767 checkFileList(response); | 4084 checkFileList(response); |
3768 }))); | 4085 }))); |
3769 }); | 4086 }); |
3770 | 4087 |
3771 unittest.test("method--patch", () { | 4088 unittest.test("method--patch", () { |
3772 | 4089 |
3773 var mock = new HttpServerMock(); | 4090 var mock = new HttpServerMock(); |
3774 api.FilesResourceApi res = new api.DriveApi(mock).files; | 4091 api.FilesResourceApi res = new api.DriveApi(mock).files; |
3775 var arg_request = buildFile(); | 4092 var arg_request = buildFile(); |
3776 var arg_fileId = "foo"; | 4093 var arg_fileId = "foo"; |
3777 var arg_addParents = "foo"; | 4094 var arg_addParents = "foo"; |
3778 var arg_convert = true; | 4095 var arg_convert = true; |
3779 var arg_modifiedDateBehavior = "foo"; | 4096 var arg_modifiedDateBehavior = "foo"; |
3780 var arg_newRevision = true; | 4097 var arg_newRevision = true; |
3781 var arg_ocr = true; | 4098 var arg_ocr = true; |
3782 var arg_ocrLanguage = "foo"; | 4099 var arg_ocrLanguage = "foo"; |
3783 var arg_pinned = true; | 4100 var arg_pinned = true; |
3784 var arg_removeParents = "foo"; | 4101 var arg_removeParents = "foo"; |
3785 var arg_setModifiedDate = true; | 4102 var arg_setModifiedDate = true; |
| 4103 var arg_supportsTeamDrives = true; |
3786 var arg_timedTextLanguage = "foo"; | 4104 var arg_timedTextLanguage = "foo"; |
3787 var arg_timedTextTrackName = "foo"; | 4105 var arg_timedTextTrackName = "foo"; |
3788 var arg_updateViewedDate = true; | 4106 var arg_updateViewedDate = true; |
3789 var arg_useContentAsIndexableText = true; | 4107 var arg_useContentAsIndexableText = true; |
3790 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 4108 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
3791 var obj = new api.File.fromJson(json); | 4109 var obj = new api.File.fromJson(json); |
3792 checkFile(obj); | 4110 checkFile(obj); |
3793 | 4111 |
3794 var path = (req.url).path; | 4112 var path = (req.url).path; |
3795 var pathOffset = 0; | 4113 var pathOffset = 0; |
(...skipping 27 matching lines...) Expand all Loading... |
3823 } | 4141 } |
3824 unittest.expect(queryMap["addParents"].first, unittest.equals(arg_addPar
ents)); | 4142 unittest.expect(queryMap["addParents"].first, unittest.equals(arg_addPar
ents)); |
3825 unittest.expect(queryMap["convert"].first, unittest.equals("$arg_convert
")); | 4143 unittest.expect(queryMap["convert"].first, unittest.equals("$arg_convert
")); |
3826 unittest.expect(queryMap["modifiedDateBehavior"].first, unittest.equals(
arg_modifiedDateBehavior)); | 4144 unittest.expect(queryMap["modifiedDateBehavior"].first, unittest.equals(
arg_modifiedDateBehavior)); |
3827 unittest.expect(queryMap["newRevision"].first, unittest.equals("$arg_new
Revision")); | 4145 unittest.expect(queryMap["newRevision"].first, unittest.equals("$arg_new
Revision")); |
3828 unittest.expect(queryMap["ocr"].first, unittest.equals("$arg_ocr")); | 4146 unittest.expect(queryMap["ocr"].first, unittest.equals("$arg_ocr")); |
3829 unittest.expect(queryMap["ocrLanguage"].first, unittest.equals(arg_ocrLa
nguage)); | 4147 unittest.expect(queryMap["ocrLanguage"].first, unittest.equals(arg_ocrLa
nguage)); |
3830 unittest.expect(queryMap["pinned"].first, unittest.equals("$arg_pinned")
); | 4148 unittest.expect(queryMap["pinned"].first, unittest.equals("$arg_pinned")
); |
3831 unittest.expect(queryMap["removeParents"].first, unittest.equals(arg_rem
oveParents)); | 4149 unittest.expect(queryMap["removeParents"].first, unittest.equals(arg_rem
oveParents)); |
3832 unittest.expect(queryMap["setModifiedDate"].first, unittest.equals("$arg
_setModifiedDate")); | 4150 unittest.expect(queryMap["setModifiedDate"].first, unittest.equals("$arg
_setModifiedDate")); |
| 4151 unittest.expect(queryMap["supportsTeamDrives"].first, unittest.equals("$
arg_supportsTeamDrives")); |
3833 unittest.expect(queryMap["timedTextLanguage"].first, unittest.equals(arg
_timedTextLanguage)); | 4152 unittest.expect(queryMap["timedTextLanguage"].first, unittest.equals(arg
_timedTextLanguage)); |
3834 unittest.expect(queryMap["timedTextTrackName"].first, unittest.equals(ar
g_timedTextTrackName)); | 4153 unittest.expect(queryMap["timedTextTrackName"].first, unittest.equals(ar
g_timedTextTrackName)); |
3835 unittest.expect(queryMap["updateViewedDate"].first, unittest.equals("$ar
g_updateViewedDate")); | 4154 unittest.expect(queryMap["updateViewedDate"].first, unittest.equals("$ar
g_updateViewedDate")); |
3836 unittest.expect(queryMap["useContentAsIndexableText"].first, unittest.eq
uals("$arg_useContentAsIndexableText")); | 4155 unittest.expect(queryMap["useContentAsIndexableText"].first, unittest.eq
uals("$arg_useContentAsIndexableText")); |
3837 | 4156 |
3838 | 4157 |
3839 var h = { | 4158 var h = { |
3840 "content-type" : "application/json; charset=utf-8", | 4159 "content-type" : "application/json; charset=utf-8", |
3841 }; | 4160 }; |
3842 var resp = convert.JSON.encode(buildFile()); | 4161 var resp = convert.JSON.encode(buildFile()); |
3843 return new async.Future.value(stringResponse(200, h, resp)); | 4162 return new async.Future.value(stringResponse(200, h, resp)); |
3844 }), true); | 4163 }), true); |
3845 res.patch(arg_request, arg_fileId, addParents: arg_addParents, convert: ar
g_convert, modifiedDateBehavior: arg_modifiedDateBehavior, newRevision: arg_newR
evision, ocr: arg_ocr, ocrLanguage: arg_ocrLanguage, pinned: arg_pinned, removeP
arents: arg_removeParents, setModifiedDate: arg_setModifiedDate, timedTextLangua
ge: arg_timedTextLanguage, timedTextTrackName: arg_timedTextTrackName, updateVie
wedDate: arg_updateViewedDate, useContentAsIndexableText: arg_useContentAsIndexa
bleText).then(unittest.expectAsync(((api.File response) { | 4164 res.patch(arg_request, arg_fileId, addParents: arg_addParents, convert: ar
g_convert, modifiedDateBehavior: arg_modifiedDateBehavior, newRevision: arg_newR
evision, ocr: arg_ocr, ocrLanguage: arg_ocrLanguage, pinned: arg_pinned, removeP
arents: arg_removeParents, setModifiedDate: arg_setModifiedDate, supportsTeamDri
ves: arg_supportsTeamDrives, timedTextLanguage: arg_timedTextLanguage, timedText
TrackName: arg_timedTextTrackName, updateViewedDate: arg_updateViewedDate, useCo
ntentAsIndexableText: arg_useContentAsIndexableText).then(unittest.expectAsync((
(api.File response) { |
3846 checkFile(response); | 4165 checkFile(response); |
3847 }))); | 4166 }))); |
3848 }); | 4167 }); |
3849 | 4168 |
3850 unittest.test("method--touch", () { | 4169 unittest.test("method--touch", () { |
3851 | 4170 |
3852 var mock = new HttpServerMock(); | 4171 var mock = new HttpServerMock(); |
3853 api.FilesResourceApi res = new api.DriveApi(mock).files; | 4172 api.FilesResourceApi res = new api.DriveApi(mock).files; |
3854 var arg_fileId = "foo"; | 4173 var arg_fileId = "foo"; |
| 4174 var arg_supportsTeamDrives = true; |
3855 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 4175 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
3856 var path = (req.url).path; | 4176 var path = (req.url).path; |
3857 var pathOffset = 0; | 4177 var pathOffset = 0; |
3858 var index; | 4178 var index; |
3859 var subPart; | 4179 var subPart; |
3860 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 4180 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
3861 pathOffset += 1; | 4181 pathOffset += 1; |
3862 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); | 4182 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); |
3863 pathOffset += 9; | 4183 pathOffset += 9; |
3864 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ
als("files/")); | 4184 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ
als("files/")); |
(...skipping 15 matching lines...) Expand all Loading... |
3880 if (n == "false") return false; | 4200 if (n == "false") return false; |
3881 if (n == null) return null; | 4201 if (n == null) return null; |
3882 throw new core.ArgumentError("Invalid boolean: $n"); | 4202 throw new core.ArgumentError("Invalid boolean: $n"); |
3883 } | 4203 } |
3884 if (query.length > 0) { | 4204 if (query.length > 0) { |
3885 for (var part in query.split("&")) { | 4205 for (var part in query.split("&")) { |
3886 var keyvalue = part.split("="); | 4206 var keyvalue = part.split("="); |
3887 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 4207 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
3888 } | 4208 } |
3889 } | 4209 } |
| 4210 unittest.expect(queryMap["supportsTeamDrives"].first, unittest.equals("$
arg_supportsTeamDrives")); |
3890 | 4211 |
3891 | 4212 |
3892 var h = { | 4213 var h = { |
3893 "content-type" : "application/json; charset=utf-8", | 4214 "content-type" : "application/json; charset=utf-8", |
3894 }; | 4215 }; |
3895 var resp = convert.JSON.encode(buildFile()); | 4216 var resp = convert.JSON.encode(buildFile()); |
3896 return new async.Future.value(stringResponse(200, h, resp)); | 4217 return new async.Future.value(stringResponse(200, h, resp)); |
3897 }), true); | 4218 }), true); |
3898 res.touch(arg_fileId).then(unittest.expectAsync(((api.File response) { | 4219 res.touch(arg_fileId, supportsTeamDrives: arg_supportsTeamDrives).then(uni
ttest.expectAsync(((api.File response) { |
3899 checkFile(response); | 4220 checkFile(response); |
3900 }))); | 4221 }))); |
3901 }); | 4222 }); |
3902 | 4223 |
3903 unittest.test("method--trash", () { | 4224 unittest.test("method--trash", () { |
3904 | 4225 |
3905 var mock = new HttpServerMock(); | 4226 var mock = new HttpServerMock(); |
3906 api.FilesResourceApi res = new api.DriveApi(mock).files; | 4227 api.FilesResourceApi res = new api.DriveApi(mock).files; |
3907 var arg_fileId = "foo"; | 4228 var arg_fileId = "foo"; |
| 4229 var arg_supportsTeamDrives = true; |
3908 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 4230 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
3909 var path = (req.url).path; | 4231 var path = (req.url).path; |
3910 var pathOffset = 0; | 4232 var pathOffset = 0; |
3911 var index; | 4233 var index; |
3912 var subPart; | 4234 var subPart; |
3913 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 4235 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
3914 pathOffset += 1; | 4236 pathOffset += 1; |
3915 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); | 4237 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); |
3916 pathOffset += 9; | 4238 pathOffset += 9; |
3917 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ
als("files/")); | 4239 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ
als("files/")); |
(...skipping 15 matching lines...) Expand all Loading... |
3933 if (n == "false") return false; | 4255 if (n == "false") return false; |
3934 if (n == null) return null; | 4256 if (n == null) return null; |
3935 throw new core.ArgumentError("Invalid boolean: $n"); | 4257 throw new core.ArgumentError("Invalid boolean: $n"); |
3936 } | 4258 } |
3937 if (query.length > 0) { | 4259 if (query.length > 0) { |
3938 for (var part in query.split("&")) { | 4260 for (var part in query.split("&")) { |
3939 var keyvalue = part.split("="); | 4261 var keyvalue = part.split("="); |
3940 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 4262 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
3941 } | 4263 } |
3942 } | 4264 } |
| 4265 unittest.expect(queryMap["supportsTeamDrives"].first, unittest.equals("$
arg_supportsTeamDrives")); |
3943 | 4266 |
3944 | 4267 |
3945 var h = { | 4268 var h = { |
3946 "content-type" : "application/json; charset=utf-8", | 4269 "content-type" : "application/json; charset=utf-8", |
3947 }; | 4270 }; |
3948 var resp = convert.JSON.encode(buildFile()); | 4271 var resp = convert.JSON.encode(buildFile()); |
3949 return new async.Future.value(stringResponse(200, h, resp)); | 4272 return new async.Future.value(stringResponse(200, h, resp)); |
3950 }), true); | 4273 }), true); |
3951 res.trash(arg_fileId).then(unittest.expectAsync(((api.File response) { | 4274 res.trash(arg_fileId, supportsTeamDrives: arg_supportsTeamDrives).then(uni
ttest.expectAsync(((api.File response) { |
3952 checkFile(response); | 4275 checkFile(response); |
3953 }))); | 4276 }))); |
3954 }); | 4277 }); |
3955 | 4278 |
3956 unittest.test("method--untrash", () { | 4279 unittest.test("method--untrash", () { |
3957 | 4280 |
3958 var mock = new HttpServerMock(); | 4281 var mock = new HttpServerMock(); |
3959 api.FilesResourceApi res = new api.DriveApi(mock).files; | 4282 api.FilesResourceApi res = new api.DriveApi(mock).files; |
3960 var arg_fileId = "foo"; | 4283 var arg_fileId = "foo"; |
| 4284 var arg_supportsTeamDrives = true; |
3961 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 4285 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
3962 var path = (req.url).path; | 4286 var path = (req.url).path; |
3963 var pathOffset = 0; | 4287 var pathOffset = 0; |
3964 var index; | 4288 var index; |
3965 var subPart; | 4289 var subPart; |
3966 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 4290 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
3967 pathOffset += 1; | 4291 pathOffset += 1; |
3968 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); | 4292 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); |
3969 pathOffset += 9; | 4293 pathOffset += 9; |
3970 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ
als("files/")); | 4294 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ
als("files/")); |
(...skipping 15 matching lines...) Expand all Loading... |
3986 if (n == "false") return false; | 4310 if (n == "false") return false; |
3987 if (n == null) return null; | 4311 if (n == null) return null; |
3988 throw new core.ArgumentError("Invalid boolean: $n"); | 4312 throw new core.ArgumentError("Invalid boolean: $n"); |
3989 } | 4313 } |
3990 if (query.length > 0) { | 4314 if (query.length > 0) { |
3991 for (var part in query.split("&")) { | 4315 for (var part in query.split("&")) { |
3992 var keyvalue = part.split("="); | 4316 var keyvalue = part.split("="); |
3993 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 4317 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
3994 } | 4318 } |
3995 } | 4319 } |
| 4320 unittest.expect(queryMap["supportsTeamDrives"].first, unittest.equals("$
arg_supportsTeamDrives")); |
3996 | 4321 |
3997 | 4322 |
3998 var h = { | 4323 var h = { |
3999 "content-type" : "application/json; charset=utf-8", | 4324 "content-type" : "application/json; charset=utf-8", |
4000 }; | 4325 }; |
4001 var resp = convert.JSON.encode(buildFile()); | 4326 var resp = convert.JSON.encode(buildFile()); |
4002 return new async.Future.value(stringResponse(200, h, resp)); | 4327 return new async.Future.value(stringResponse(200, h, resp)); |
4003 }), true); | 4328 }), true); |
4004 res.untrash(arg_fileId).then(unittest.expectAsync(((api.File response) { | 4329 res.untrash(arg_fileId, supportsTeamDrives: arg_supportsTeamDrives).then(u
nittest.expectAsync(((api.File response) { |
4005 checkFile(response); | 4330 checkFile(response); |
4006 }))); | 4331 }))); |
4007 }); | 4332 }); |
4008 | 4333 |
4009 unittest.test("method--update", () { | 4334 unittest.test("method--update", () { |
4010 // TODO: Implement tests for media upload; | 4335 // TODO: Implement tests for media upload; |
4011 // TODO: Implement tests for media download; | 4336 // TODO: Implement tests for media download; |
4012 | 4337 |
4013 var mock = new HttpServerMock(); | 4338 var mock = new HttpServerMock(); |
4014 api.FilesResourceApi res = new api.DriveApi(mock).files; | 4339 api.FilesResourceApi res = new api.DriveApi(mock).files; |
4015 var arg_request = buildFile(); | 4340 var arg_request = buildFile(); |
4016 var arg_fileId = "foo"; | 4341 var arg_fileId = "foo"; |
4017 var arg_addParents = "foo"; | 4342 var arg_addParents = "foo"; |
4018 var arg_convert = true; | 4343 var arg_convert = true; |
4019 var arg_modifiedDateBehavior = "foo"; | 4344 var arg_modifiedDateBehavior = "foo"; |
4020 var arg_newRevision = true; | 4345 var arg_newRevision = true; |
4021 var arg_ocr = true; | 4346 var arg_ocr = true; |
4022 var arg_ocrLanguage = "foo"; | 4347 var arg_ocrLanguage = "foo"; |
4023 var arg_pinned = true; | 4348 var arg_pinned = true; |
4024 var arg_removeParents = "foo"; | 4349 var arg_removeParents = "foo"; |
4025 var arg_setModifiedDate = true; | 4350 var arg_setModifiedDate = true; |
| 4351 var arg_supportsTeamDrives = true; |
4026 var arg_timedTextLanguage = "foo"; | 4352 var arg_timedTextLanguage = "foo"; |
4027 var arg_timedTextTrackName = "foo"; | 4353 var arg_timedTextTrackName = "foo"; |
4028 var arg_updateViewedDate = true; | 4354 var arg_updateViewedDate = true; |
4029 var arg_useContentAsIndexableText = true; | 4355 var arg_useContentAsIndexableText = true; |
4030 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 4356 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
4031 var obj = new api.File.fromJson(json); | 4357 var obj = new api.File.fromJson(json); |
4032 checkFile(obj); | 4358 checkFile(obj); |
4033 | 4359 |
4034 var path = (req.url).path; | 4360 var path = (req.url).path; |
4035 var pathOffset = 0; | 4361 var pathOffset = 0; |
(...skipping 27 matching lines...) Expand all Loading... |
4063 } | 4389 } |
4064 unittest.expect(queryMap["addParents"].first, unittest.equals(arg_addPar
ents)); | 4390 unittest.expect(queryMap["addParents"].first, unittest.equals(arg_addPar
ents)); |
4065 unittest.expect(queryMap["convert"].first, unittest.equals("$arg_convert
")); | 4391 unittest.expect(queryMap["convert"].first, unittest.equals("$arg_convert
")); |
4066 unittest.expect(queryMap["modifiedDateBehavior"].first, unittest.equals(
arg_modifiedDateBehavior)); | 4392 unittest.expect(queryMap["modifiedDateBehavior"].first, unittest.equals(
arg_modifiedDateBehavior)); |
4067 unittest.expect(queryMap["newRevision"].first, unittest.equals("$arg_new
Revision")); | 4393 unittest.expect(queryMap["newRevision"].first, unittest.equals("$arg_new
Revision")); |
4068 unittest.expect(queryMap["ocr"].first, unittest.equals("$arg_ocr")); | 4394 unittest.expect(queryMap["ocr"].first, unittest.equals("$arg_ocr")); |
4069 unittest.expect(queryMap["ocrLanguage"].first, unittest.equals(arg_ocrLa
nguage)); | 4395 unittest.expect(queryMap["ocrLanguage"].first, unittest.equals(arg_ocrLa
nguage)); |
4070 unittest.expect(queryMap["pinned"].first, unittest.equals("$arg_pinned")
); | 4396 unittest.expect(queryMap["pinned"].first, unittest.equals("$arg_pinned")
); |
4071 unittest.expect(queryMap["removeParents"].first, unittest.equals(arg_rem
oveParents)); | 4397 unittest.expect(queryMap["removeParents"].first, unittest.equals(arg_rem
oveParents)); |
4072 unittest.expect(queryMap["setModifiedDate"].first, unittest.equals("$arg
_setModifiedDate")); | 4398 unittest.expect(queryMap["setModifiedDate"].first, unittest.equals("$arg
_setModifiedDate")); |
| 4399 unittest.expect(queryMap["supportsTeamDrives"].first, unittest.equals("$
arg_supportsTeamDrives")); |
4073 unittest.expect(queryMap["timedTextLanguage"].first, unittest.equals(arg
_timedTextLanguage)); | 4400 unittest.expect(queryMap["timedTextLanguage"].first, unittest.equals(arg
_timedTextLanguage)); |
4074 unittest.expect(queryMap["timedTextTrackName"].first, unittest.equals(ar
g_timedTextTrackName)); | 4401 unittest.expect(queryMap["timedTextTrackName"].first, unittest.equals(ar
g_timedTextTrackName)); |
4075 unittest.expect(queryMap["updateViewedDate"].first, unittest.equals("$ar
g_updateViewedDate")); | 4402 unittest.expect(queryMap["updateViewedDate"].first, unittest.equals("$ar
g_updateViewedDate")); |
4076 unittest.expect(queryMap["useContentAsIndexableText"].first, unittest.eq
uals("$arg_useContentAsIndexableText")); | 4403 unittest.expect(queryMap["useContentAsIndexableText"].first, unittest.eq
uals("$arg_useContentAsIndexableText")); |
4077 | 4404 |
4078 | 4405 |
4079 var h = { | 4406 var h = { |
4080 "content-type" : "application/json; charset=utf-8", | 4407 "content-type" : "application/json; charset=utf-8", |
4081 }; | 4408 }; |
4082 var resp = convert.JSON.encode(buildFile()); | 4409 var resp = convert.JSON.encode(buildFile()); |
4083 return new async.Future.value(stringResponse(200, h, resp)); | 4410 return new async.Future.value(stringResponse(200, h, resp)); |
4084 }), true); | 4411 }), true); |
4085 res.update(arg_request, arg_fileId, addParents: arg_addParents, convert: a
rg_convert, modifiedDateBehavior: arg_modifiedDateBehavior, newRevision: arg_new
Revision, ocr: arg_ocr, ocrLanguage: arg_ocrLanguage, pinned: arg_pinned, remove
Parents: arg_removeParents, setModifiedDate: arg_setModifiedDate, timedTextLangu
age: arg_timedTextLanguage, timedTextTrackName: arg_timedTextTrackName, updateVi
ewedDate: arg_updateViewedDate, useContentAsIndexableText: arg_useContentAsIndex
ableText).then(unittest.expectAsync(((api.File response) { | 4412 res.update(arg_request, arg_fileId, addParents: arg_addParents, convert: a
rg_convert, modifiedDateBehavior: arg_modifiedDateBehavior, newRevision: arg_new
Revision, ocr: arg_ocr, ocrLanguage: arg_ocrLanguage, pinned: arg_pinned, remove
Parents: arg_removeParents, setModifiedDate: arg_setModifiedDate, supportsTeamDr
ives: arg_supportsTeamDrives, timedTextLanguage: arg_timedTextLanguage, timedTex
tTrackName: arg_timedTextTrackName, updateViewedDate: arg_updateViewedDate, useC
ontentAsIndexableText: arg_useContentAsIndexableText).then(unittest.expectAsync(
((api.File response) { |
4086 checkFile(response); | 4413 checkFile(response); |
4087 }))); | 4414 }))); |
4088 }); | 4415 }); |
4089 | 4416 |
4090 unittest.test("method--watch", () { | 4417 unittest.test("method--watch", () { |
4091 // TODO: Implement tests for media upload; | 4418 // TODO: Implement tests for media upload; |
4092 // TODO: Implement tests for media download; | 4419 // TODO: Implement tests for media download; |
4093 | 4420 |
4094 var mock = new HttpServerMock(); | 4421 var mock = new HttpServerMock(); |
4095 api.FilesResourceApi res = new api.DriveApi(mock).files; | 4422 api.FilesResourceApi res = new api.DriveApi(mock).files; |
4096 var arg_request = buildChannel(); | 4423 var arg_request = buildChannel(); |
4097 var arg_fileId = "foo"; | 4424 var arg_fileId = "foo"; |
4098 var arg_acknowledgeAbuse = true; | 4425 var arg_acknowledgeAbuse = true; |
4099 var arg_projection = "foo"; | 4426 var arg_projection = "foo"; |
4100 var arg_revisionId = "foo"; | 4427 var arg_revisionId = "foo"; |
| 4428 var arg_supportsTeamDrives = true; |
4101 var arg_updateViewedDate = true; | 4429 var arg_updateViewedDate = true; |
4102 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 4430 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
4103 var obj = new api.Channel.fromJson(json); | 4431 var obj = new api.Channel.fromJson(json); |
4104 checkChannel(obj); | 4432 checkChannel(obj); |
4105 | 4433 |
4106 var path = (req.url).path; | 4434 var path = (req.url).path; |
4107 var pathOffset = 0; | 4435 var pathOffset = 0; |
4108 var index; | 4436 var index; |
4109 var subPart; | 4437 var subPart; |
4110 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 4438 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
(...skipping 22 matching lines...) Expand all Loading... |
4133 } | 4461 } |
4134 if (query.length > 0) { | 4462 if (query.length > 0) { |
4135 for (var part in query.split("&")) { | 4463 for (var part in query.split("&")) { |
4136 var keyvalue = part.split("="); | 4464 var keyvalue = part.split("="); |
4137 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 4465 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
4138 } | 4466 } |
4139 } | 4467 } |
4140 unittest.expect(queryMap["acknowledgeAbuse"].first, unittest.equals("$ar
g_acknowledgeAbuse")); | 4468 unittest.expect(queryMap["acknowledgeAbuse"].first, unittest.equals("$ar
g_acknowledgeAbuse")); |
4141 unittest.expect(queryMap["projection"].first, unittest.equals(arg_projec
tion)); | 4469 unittest.expect(queryMap["projection"].first, unittest.equals(arg_projec
tion)); |
4142 unittest.expect(queryMap["revisionId"].first, unittest.equals(arg_revisi
onId)); | 4470 unittest.expect(queryMap["revisionId"].first, unittest.equals(arg_revisi
onId)); |
| 4471 unittest.expect(queryMap["supportsTeamDrives"].first, unittest.equals("$
arg_supportsTeamDrives")); |
4143 unittest.expect(queryMap["updateViewedDate"].first, unittest.equals("$ar
g_updateViewedDate")); | 4472 unittest.expect(queryMap["updateViewedDate"].first, unittest.equals("$ar
g_updateViewedDate")); |
4144 | 4473 |
4145 | 4474 |
4146 var h = { | 4475 var h = { |
4147 "content-type" : "application/json; charset=utf-8", | 4476 "content-type" : "application/json; charset=utf-8", |
4148 }; | 4477 }; |
4149 var resp = convert.JSON.encode(buildChannel()); | 4478 var resp = convert.JSON.encode(buildChannel()); |
4150 return new async.Future.value(stringResponse(200, h, resp)); | 4479 return new async.Future.value(stringResponse(200, h, resp)); |
4151 }), true); | 4480 }), true); |
4152 res.watch(arg_request, arg_fileId, acknowledgeAbuse: arg_acknowledgeAbuse,
projection: arg_projection, revisionId: arg_revisionId, updateViewedDate: arg_u
pdateViewedDate).then(unittest.expectAsync(((api.Channel response) { | 4481 res.watch(arg_request, arg_fileId, acknowledgeAbuse: arg_acknowledgeAbuse,
projection: arg_projection, revisionId: arg_revisionId, supportsTeamDrives: arg
_supportsTeamDrives, updateViewedDate: arg_updateViewedDate).then(unittest.expec
tAsync(((api.Channel response) { |
4153 checkChannel(response); | 4482 checkChannel(response); |
4154 }))); | 4483 }))); |
4155 }); | 4484 }); |
4156 | 4485 |
4157 }); | 4486 }); |
4158 | 4487 |
4159 | 4488 |
4160 unittest.group("resource-ParentsResourceApi", () { | 4489 unittest.group("resource-ParentsResourceApi", () { |
4161 unittest.test("method--delete", () { | 4490 unittest.test("method--delete", () { |
4162 | 4491 |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4269 checkParentReference(response); | 4598 checkParentReference(response); |
4270 }))); | 4599 }))); |
4271 }); | 4600 }); |
4272 | 4601 |
4273 unittest.test("method--insert", () { | 4602 unittest.test("method--insert", () { |
4274 | 4603 |
4275 var mock = new HttpServerMock(); | 4604 var mock = new HttpServerMock(); |
4276 api.ParentsResourceApi res = new api.DriveApi(mock).parents; | 4605 api.ParentsResourceApi res = new api.DriveApi(mock).parents; |
4277 var arg_request = buildParentReference(); | 4606 var arg_request = buildParentReference(); |
4278 var arg_fileId = "foo"; | 4607 var arg_fileId = "foo"; |
| 4608 var arg_supportsTeamDrives = true; |
4279 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 4609 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
4280 var obj = new api.ParentReference.fromJson(json); | 4610 var obj = new api.ParentReference.fromJson(json); |
4281 checkParentReference(obj); | 4611 checkParentReference(obj); |
4282 | 4612 |
4283 var path = (req.url).path; | 4613 var path = (req.url).path; |
4284 var pathOffset = 0; | 4614 var pathOffset = 0; |
4285 var index; | 4615 var index; |
4286 var subPart; | 4616 var subPart; |
4287 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 4617 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
4288 pathOffset += 1; | 4618 pathOffset += 1; |
(...skipping 18 matching lines...) Expand all Loading... |
4307 if (n == "false") return false; | 4637 if (n == "false") return false; |
4308 if (n == null) return null; | 4638 if (n == null) return null; |
4309 throw new core.ArgumentError("Invalid boolean: $n"); | 4639 throw new core.ArgumentError("Invalid boolean: $n"); |
4310 } | 4640 } |
4311 if (query.length > 0) { | 4641 if (query.length > 0) { |
4312 for (var part in query.split("&")) { | 4642 for (var part in query.split("&")) { |
4313 var keyvalue = part.split("="); | 4643 var keyvalue = part.split("="); |
4314 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 4644 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
4315 } | 4645 } |
4316 } | 4646 } |
| 4647 unittest.expect(queryMap["supportsTeamDrives"].first, unittest.equals("$
arg_supportsTeamDrives")); |
4317 | 4648 |
4318 | 4649 |
4319 var h = { | 4650 var h = { |
4320 "content-type" : "application/json; charset=utf-8", | 4651 "content-type" : "application/json; charset=utf-8", |
4321 }; | 4652 }; |
4322 var resp = convert.JSON.encode(buildParentReference()); | 4653 var resp = convert.JSON.encode(buildParentReference()); |
4323 return new async.Future.value(stringResponse(200, h, resp)); | 4654 return new async.Future.value(stringResponse(200, h, resp)); |
4324 }), true); | 4655 }), true); |
4325 res.insert(arg_request, arg_fileId).then(unittest.expectAsync(((api.Parent
Reference response) { | 4656 res.insert(arg_request, arg_fileId, supportsTeamDrives: arg_supportsTeamDr
ives).then(unittest.expectAsync(((api.ParentReference response) { |
4326 checkParentReference(response); | 4657 checkParentReference(response); |
4327 }))); | 4658 }))); |
4328 }); | 4659 }); |
4329 | 4660 |
4330 unittest.test("method--list", () { | 4661 unittest.test("method--list", () { |
4331 | 4662 |
4332 var mock = new HttpServerMock(); | 4663 var mock = new HttpServerMock(); |
4333 api.ParentsResourceApi res = new api.DriveApi(mock).parents; | 4664 api.ParentsResourceApi res = new api.DriveApi(mock).parents; |
4334 var arg_fileId = "foo"; | 4665 var arg_fileId = "foo"; |
4335 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 4666 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4383 }); | 4714 }); |
4384 | 4715 |
4385 | 4716 |
4386 unittest.group("resource-PermissionsResourceApi", () { | 4717 unittest.group("resource-PermissionsResourceApi", () { |
4387 unittest.test("method--delete", () { | 4718 unittest.test("method--delete", () { |
4388 | 4719 |
4389 var mock = new HttpServerMock(); | 4720 var mock = new HttpServerMock(); |
4390 api.PermissionsResourceApi res = new api.DriveApi(mock).permissions; | 4721 api.PermissionsResourceApi res = new api.DriveApi(mock).permissions; |
4391 var arg_fileId = "foo"; | 4722 var arg_fileId = "foo"; |
4392 var arg_permissionId = "foo"; | 4723 var arg_permissionId = "foo"; |
| 4724 var arg_supportsTeamDrives = true; |
4393 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 4725 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
4394 var path = (req.url).path; | 4726 var path = (req.url).path; |
4395 var pathOffset = 0; | 4727 var pathOffset = 0; |
4396 var index; | 4728 var index; |
4397 var subPart; | 4729 var subPart; |
4398 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 4730 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
4399 pathOffset += 1; | 4731 pathOffset += 1; |
4400 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); | 4732 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); |
4401 pathOffset += 9; | 4733 pathOffset += 9; |
4402 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ
als("files/")); | 4734 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ
als("files/")); |
(...skipping 18 matching lines...) Expand all Loading... |
4421 if (n == "false") return false; | 4753 if (n == "false") return false; |
4422 if (n == null) return null; | 4754 if (n == null) return null; |
4423 throw new core.ArgumentError("Invalid boolean: $n"); | 4755 throw new core.ArgumentError("Invalid boolean: $n"); |
4424 } | 4756 } |
4425 if (query.length > 0) { | 4757 if (query.length > 0) { |
4426 for (var part in query.split("&")) { | 4758 for (var part in query.split("&")) { |
4427 var keyvalue = part.split("="); | 4759 var keyvalue = part.split("="); |
4428 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 4760 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
4429 } | 4761 } |
4430 } | 4762 } |
| 4763 unittest.expect(queryMap["supportsTeamDrives"].first, unittest.equals("$
arg_supportsTeamDrives")); |
4431 | 4764 |
4432 | 4765 |
4433 var h = { | 4766 var h = { |
4434 "content-type" : "application/json; charset=utf-8", | 4767 "content-type" : "application/json; charset=utf-8", |
4435 }; | 4768 }; |
4436 var resp = ""; | 4769 var resp = ""; |
4437 return new async.Future.value(stringResponse(200, h, resp)); | 4770 return new async.Future.value(stringResponse(200, h, resp)); |
4438 }), true); | 4771 }), true); |
4439 res.delete(arg_fileId, arg_permissionId).then(unittest.expectAsync((_) {})
); | 4772 res.delete(arg_fileId, arg_permissionId, supportsTeamDrives: arg_supportsT
eamDrives).then(unittest.expectAsync((_) {})); |
4440 }); | 4773 }); |
4441 | 4774 |
4442 unittest.test("method--get", () { | 4775 unittest.test("method--get", () { |
4443 | 4776 |
4444 var mock = new HttpServerMock(); | 4777 var mock = new HttpServerMock(); |
4445 api.PermissionsResourceApi res = new api.DriveApi(mock).permissions; | 4778 api.PermissionsResourceApi res = new api.DriveApi(mock).permissions; |
4446 var arg_fileId = "foo"; | 4779 var arg_fileId = "foo"; |
4447 var arg_permissionId = "foo"; | 4780 var arg_permissionId = "foo"; |
| 4781 var arg_supportsTeamDrives = true; |
4448 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 4782 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
4449 var path = (req.url).path; | 4783 var path = (req.url).path; |
4450 var pathOffset = 0; | 4784 var pathOffset = 0; |
4451 var index; | 4785 var index; |
4452 var subPart; | 4786 var subPart; |
4453 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 4787 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
4454 pathOffset += 1; | 4788 pathOffset += 1; |
4455 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); | 4789 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); |
4456 pathOffset += 9; | 4790 pathOffset += 9; |
4457 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ
als("files/")); | 4791 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ
als("files/")); |
(...skipping 18 matching lines...) Expand all Loading... |
4476 if (n == "false") return false; | 4810 if (n == "false") return false; |
4477 if (n == null) return null; | 4811 if (n == null) return null; |
4478 throw new core.ArgumentError("Invalid boolean: $n"); | 4812 throw new core.ArgumentError("Invalid boolean: $n"); |
4479 } | 4813 } |
4480 if (query.length > 0) { | 4814 if (query.length > 0) { |
4481 for (var part in query.split("&")) { | 4815 for (var part in query.split("&")) { |
4482 var keyvalue = part.split("="); | 4816 var keyvalue = part.split("="); |
4483 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 4817 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
4484 } | 4818 } |
4485 } | 4819 } |
| 4820 unittest.expect(queryMap["supportsTeamDrives"].first, unittest.equals("$
arg_supportsTeamDrives")); |
4486 | 4821 |
4487 | 4822 |
4488 var h = { | 4823 var h = { |
4489 "content-type" : "application/json; charset=utf-8", | 4824 "content-type" : "application/json; charset=utf-8", |
4490 }; | 4825 }; |
4491 var resp = convert.JSON.encode(buildPermission()); | 4826 var resp = convert.JSON.encode(buildPermission()); |
4492 return new async.Future.value(stringResponse(200, h, resp)); | 4827 return new async.Future.value(stringResponse(200, h, resp)); |
4493 }), true); | 4828 }), true); |
4494 res.get(arg_fileId, arg_permissionId).then(unittest.expectAsync(((api.Perm
ission response) { | 4829 res.get(arg_fileId, arg_permissionId, supportsTeamDrives: arg_supportsTeam
Drives).then(unittest.expectAsync(((api.Permission response) { |
4495 checkPermission(response); | 4830 checkPermission(response); |
4496 }))); | 4831 }))); |
4497 }); | 4832 }); |
4498 | 4833 |
4499 unittest.test("method--getIdForEmail", () { | 4834 unittest.test("method--getIdForEmail", () { |
4500 | 4835 |
4501 var mock = new HttpServerMock(); | 4836 var mock = new HttpServerMock(); |
4502 api.PermissionsResourceApi res = new api.DriveApi(mock).permissions; | 4837 api.PermissionsResourceApi res = new api.DriveApi(mock).permissions; |
4503 var arg_email = "foo"; | 4838 var arg_email = "foo"; |
4504 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 4839 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4546 }); | 4881 }); |
4547 | 4882 |
4548 unittest.test("method--insert", () { | 4883 unittest.test("method--insert", () { |
4549 | 4884 |
4550 var mock = new HttpServerMock(); | 4885 var mock = new HttpServerMock(); |
4551 api.PermissionsResourceApi res = new api.DriveApi(mock).permissions; | 4886 api.PermissionsResourceApi res = new api.DriveApi(mock).permissions; |
4552 var arg_request = buildPermission(); | 4887 var arg_request = buildPermission(); |
4553 var arg_fileId = "foo"; | 4888 var arg_fileId = "foo"; |
4554 var arg_emailMessage = "foo"; | 4889 var arg_emailMessage = "foo"; |
4555 var arg_sendNotificationEmails = true; | 4890 var arg_sendNotificationEmails = true; |
| 4891 var arg_supportsTeamDrives = true; |
4556 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 4892 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
4557 var obj = new api.Permission.fromJson(json); | 4893 var obj = new api.Permission.fromJson(json); |
4558 checkPermission(obj); | 4894 checkPermission(obj); |
4559 | 4895 |
4560 var path = (req.url).path; | 4896 var path = (req.url).path; |
4561 var pathOffset = 0; | 4897 var pathOffset = 0; |
4562 var index; | 4898 var index; |
4563 var subPart; | 4899 var subPart; |
4564 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 4900 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
4565 pathOffset += 1; | 4901 pathOffset += 1; |
(...skipping 20 matching lines...) Expand all Loading... |
4586 throw new core.ArgumentError("Invalid boolean: $n"); | 4922 throw new core.ArgumentError("Invalid boolean: $n"); |
4587 } | 4923 } |
4588 if (query.length > 0) { | 4924 if (query.length > 0) { |
4589 for (var part in query.split("&")) { | 4925 for (var part in query.split("&")) { |
4590 var keyvalue = part.split("="); | 4926 var keyvalue = part.split("="); |
4591 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 4927 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
4592 } | 4928 } |
4593 } | 4929 } |
4594 unittest.expect(queryMap["emailMessage"].first, unittest.equals(arg_emai
lMessage)); | 4930 unittest.expect(queryMap["emailMessage"].first, unittest.equals(arg_emai
lMessage)); |
4595 unittest.expect(queryMap["sendNotificationEmails"].first, unittest.equal
s("$arg_sendNotificationEmails")); | 4931 unittest.expect(queryMap["sendNotificationEmails"].first, unittest.equal
s("$arg_sendNotificationEmails")); |
| 4932 unittest.expect(queryMap["supportsTeamDrives"].first, unittest.equals("$
arg_supportsTeamDrives")); |
4596 | 4933 |
4597 | 4934 |
4598 var h = { | 4935 var h = { |
4599 "content-type" : "application/json; charset=utf-8", | 4936 "content-type" : "application/json; charset=utf-8", |
4600 }; | 4937 }; |
4601 var resp = convert.JSON.encode(buildPermission()); | 4938 var resp = convert.JSON.encode(buildPermission()); |
4602 return new async.Future.value(stringResponse(200, h, resp)); | 4939 return new async.Future.value(stringResponse(200, h, resp)); |
4603 }), true); | 4940 }), true); |
4604 res.insert(arg_request, arg_fileId, emailMessage: arg_emailMessage, sendNo
tificationEmails: arg_sendNotificationEmails).then(unittest.expectAsync(((api.Pe
rmission response) { | 4941 res.insert(arg_request, arg_fileId, emailMessage: arg_emailMessage, sendNo
tificationEmails: arg_sendNotificationEmails, supportsTeamDrives: arg_supportsTe
amDrives).then(unittest.expectAsync(((api.Permission response) { |
4605 checkPermission(response); | 4942 checkPermission(response); |
4606 }))); | 4943 }))); |
4607 }); | 4944 }); |
4608 | 4945 |
4609 unittest.test("method--list", () { | 4946 unittest.test("method--list", () { |
4610 | 4947 |
4611 var mock = new HttpServerMock(); | 4948 var mock = new HttpServerMock(); |
4612 api.PermissionsResourceApi res = new api.DriveApi(mock).permissions; | 4949 api.PermissionsResourceApi res = new api.DriveApi(mock).permissions; |
4613 var arg_fileId = "foo"; | 4950 var arg_fileId = "foo"; |
| 4951 var arg_maxResults = 42; |
| 4952 var arg_pageToken = "foo"; |
| 4953 var arg_supportsTeamDrives = true; |
4614 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 4954 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
4615 var path = (req.url).path; | 4955 var path = (req.url).path; |
4616 var pathOffset = 0; | 4956 var pathOffset = 0; |
4617 var index; | 4957 var index; |
4618 var subPart; | 4958 var subPart; |
4619 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 4959 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
4620 pathOffset += 1; | 4960 pathOffset += 1; |
4621 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); | 4961 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); |
4622 pathOffset += 9; | 4962 pathOffset += 9; |
4623 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ
als("files/")); | 4963 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ
als("files/")); |
(...skipping 15 matching lines...) Expand all Loading... |
4639 if (n == "false") return false; | 4979 if (n == "false") return false; |
4640 if (n == null) return null; | 4980 if (n == null) return null; |
4641 throw new core.ArgumentError("Invalid boolean: $n"); | 4981 throw new core.ArgumentError("Invalid boolean: $n"); |
4642 } | 4982 } |
4643 if (query.length > 0) { | 4983 if (query.length > 0) { |
4644 for (var part in query.split("&")) { | 4984 for (var part in query.split("&")) { |
4645 var keyvalue = part.split("="); | 4985 var keyvalue = part.split("="); |
4646 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 4986 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
4647 } | 4987 } |
4648 } | 4988 } |
| 4989 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); |
| 4990 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
| 4991 unittest.expect(queryMap["supportsTeamDrives"].first, unittest.equals("$
arg_supportsTeamDrives")); |
4649 | 4992 |
4650 | 4993 |
4651 var h = { | 4994 var h = { |
4652 "content-type" : "application/json; charset=utf-8", | 4995 "content-type" : "application/json; charset=utf-8", |
4653 }; | 4996 }; |
4654 var resp = convert.JSON.encode(buildPermissionList()); | 4997 var resp = convert.JSON.encode(buildPermissionList()); |
4655 return new async.Future.value(stringResponse(200, h, resp)); | 4998 return new async.Future.value(stringResponse(200, h, resp)); |
4656 }), true); | 4999 }), true); |
4657 res.list(arg_fileId).then(unittest.expectAsync(((api.PermissionList respon
se) { | 5000 res.list(arg_fileId, maxResults: arg_maxResults, pageToken: arg_pageToken,
supportsTeamDrives: arg_supportsTeamDrives).then(unittest.expectAsync(((api.Per
missionList response) { |
4658 checkPermissionList(response); | 5001 checkPermissionList(response); |
4659 }))); | 5002 }))); |
4660 }); | 5003 }); |
4661 | 5004 |
4662 unittest.test("method--patch", () { | 5005 unittest.test("method--patch", () { |
4663 | 5006 |
4664 var mock = new HttpServerMock(); | 5007 var mock = new HttpServerMock(); |
4665 api.PermissionsResourceApi res = new api.DriveApi(mock).permissions; | 5008 api.PermissionsResourceApi res = new api.DriveApi(mock).permissions; |
4666 var arg_request = buildPermission(); | 5009 var arg_request = buildPermission(); |
4667 var arg_fileId = "foo"; | 5010 var arg_fileId = "foo"; |
4668 var arg_permissionId = "foo"; | 5011 var arg_permissionId = "foo"; |
4669 var arg_removeExpiration = true; | 5012 var arg_removeExpiration = true; |
| 5013 var arg_supportsTeamDrives = true; |
4670 var arg_transferOwnership = true; | 5014 var arg_transferOwnership = true; |
4671 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 5015 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
4672 var obj = new api.Permission.fromJson(json); | 5016 var obj = new api.Permission.fromJson(json); |
4673 checkPermission(obj); | 5017 checkPermission(obj); |
4674 | 5018 |
4675 var path = (req.url).path; | 5019 var path = (req.url).path; |
4676 var pathOffset = 0; | 5020 var pathOffset = 0; |
4677 var index; | 5021 var index; |
4678 var subPart; | 5022 var subPart; |
4679 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 5023 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
(...skipping 23 matching lines...) Expand all Loading... |
4703 if (n == null) return null; | 5047 if (n == null) return null; |
4704 throw new core.ArgumentError("Invalid boolean: $n"); | 5048 throw new core.ArgumentError("Invalid boolean: $n"); |
4705 } | 5049 } |
4706 if (query.length > 0) { | 5050 if (query.length > 0) { |
4707 for (var part in query.split("&")) { | 5051 for (var part in query.split("&")) { |
4708 var keyvalue = part.split("="); | 5052 var keyvalue = part.split("="); |
4709 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 5053 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
4710 } | 5054 } |
4711 } | 5055 } |
4712 unittest.expect(queryMap["removeExpiration"].first, unittest.equals("$ar
g_removeExpiration")); | 5056 unittest.expect(queryMap["removeExpiration"].first, unittest.equals("$ar
g_removeExpiration")); |
| 5057 unittest.expect(queryMap["supportsTeamDrives"].first, unittest.equals("$
arg_supportsTeamDrives")); |
4713 unittest.expect(queryMap["transferOwnership"].first, unittest.equals("$a
rg_transferOwnership")); | 5058 unittest.expect(queryMap["transferOwnership"].first, unittest.equals("$a
rg_transferOwnership")); |
4714 | 5059 |
4715 | 5060 |
4716 var h = { | 5061 var h = { |
4717 "content-type" : "application/json; charset=utf-8", | 5062 "content-type" : "application/json; charset=utf-8", |
4718 }; | 5063 }; |
4719 var resp = convert.JSON.encode(buildPermission()); | 5064 var resp = convert.JSON.encode(buildPermission()); |
4720 return new async.Future.value(stringResponse(200, h, resp)); | 5065 return new async.Future.value(stringResponse(200, h, resp)); |
4721 }), true); | 5066 }), true); |
4722 res.patch(arg_request, arg_fileId, arg_permissionId, removeExpiration: arg
_removeExpiration, transferOwnership: arg_transferOwnership).then(unittest.expec
tAsync(((api.Permission response) { | 5067 res.patch(arg_request, arg_fileId, arg_permissionId, removeExpiration: arg
_removeExpiration, supportsTeamDrives: arg_supportsTeamDrives, transferOwnership
: arg_transferOwnership).then(unittest.expectAsync(((api.Permission response) { |
4723 checkPermission(response); | 5068 checkPermission(response); |
4724 }))); | 5069 }))); |
4725 }); | 5070 }); |
4726 | 5071 |
4727 unittest.test("method--update", () { | 5072 unittest.test("method--update", () { |
4728 | 5073 |
4729 var mock = new HttpServerMock(); | 5074 var mock = new HttpServerMock(); |
4730 api.PermissionsResourceApi res = new api.DriveApi(mock).permissions; | 5075 api.PermissionsResourceApi res = new api.DriveApi(mock).permissions; |
4731 var arg_request = buildPermission(); | 5076 var arg_request = buildPermission(); |
4732 var arg_fileId = "foo"; | 5077 var arg_fileId = "foo"; |
4733 var arg_permissionId = "foo"; | 5078 var arg_permissionId = "foo"; |
4734 var arg_removeExpiration = true; | 5079 var arg_removeExpiration = true; |
| 5080 var arg_supportsTeamDrives = true; |
4735 var arg_transferOwnership = true; | 5081 var arg_transferOwnership = true; |
4736 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 5082 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
4737 var obj = new api.Permission.fromJson(json); | 5083 var obj = new api.Permission.fromJson(json); |
4738 checkPermission(obj); | 5084 checkPermission(obj); |
4739 | 5085 |
4740 var path = (req.url).path; | 5086 var path = (req.url).path; |
4741 var pathOffset = 0; | 5087 var pathOffset = 0; |
4742 var index; | 5088 var index; |
4743 var subPart; | 5089 var subPart; |
4744 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 5090 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
(...skipping 23 matching lines...) Expand all Loading... |
4768 if (n == null) return null; | 5114 if (n == null) return null; |
4769 throw new core.ArgumentError("Invalid boolean: $n"); | 5115 throw new core.ArgumentError("Invalid boolean: $n"); |
4770 } | 5116 } |
4771 if (query.length > 0) { | 5117 if (query.length > 0) { |
4772 for (var part in query.split("&")) { | 5118 for (var part in query.split("&")) { |
4773 var keyvalue = part.split("="); | 5119 var keyvalue = part.split("="); |
4774 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 5120 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
4775 } | 5121 } |
4776 } | 5122 } |
4777 unittest.expect(queryMap["removeExpiration"].first, unittest.equals("$ar
g_removeExpiration")); | 5123 unittest.expect(queryMap["removeExpiration"].first, unittest.equals("$ar
g_removeExpiration")); |
| 5124 unittest.expect(queryMap["supportsTeamDrives"].first, unittest.equals("$
arg_supportsTeamDrives")); |
4778 unittest.expect(queryMap["transferOwnership"].first, unittest.equals("$a
rg_transferOwnership")); | 5125 unittest.expect(queryMap["transferOwnership"].first, unittest.equals("$a
rg_transferOwnership")); |
4779 | 5126 |
4780 | 5127 |
4781 var h = { | 5128 var h = { |
4782 "content-type" : "application/json; charset=utf-8", | 5129 "content-type" : "application/json; charset=utf-8", |
4783 }; | 5130 }; |
4784 var resp = convert.JSON.encode(buildPermission()); | 5131 var resp = convert.JSON.encode(buildPermission()); |
4785 return new async.Future.value(stringResponse(200, h, resp)); | 5132 return new async.Future.value(stringResponse(200, h, resp)); |
4786 }), true); | 5133 }), true); |
4787 res.update(arg_request, arg_fileId, arg_permissionId, removeExpiration: ar
g_removeExpiration, transferOwnership: arg_transferOwnership).then(unittest.expe
ctAsync(((api.Permission response) { | 5134 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) { |
4788 checkPermission(response); | 5135 checkPermission(response); |
4789 }))); | 5136 }))); |
4790 }); | 5137 }); |
4791 | 5138 |
4792 }); | 5139 }); |
4793 | 5140 |
4794 | 5141 |
4795 unittest.group("resource-PropertiesResourceApi", () { | 5142 unittest.group("resource-PropertiesResourceApi", () { |
4796 unittest.test("method--delete", () { | 5143 unittest.test("method--delete", () { |
4797 | 5144 |
(...skipping 1156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5954 return new async.Future.value(stringResponse(200, h, resp)); | 6301 return new async.Future.value(stringResponse(200, h, resp)); |
5955 }), true); | 6302 }), true); |
5956 res.update(arg_request, arg_fileId, arg_revisionId).then(unittest.expectAs
ync(((api.Revision response) { | 6303 res.update(arg_request, arg_fileId, arg_revisionId).then(unittest.expectAs
ync(((api.Revision response) { |
5957 checkRevision(response); | 6304 checkRevision(response); |
5958 }))); | 6305 }))); |
5959 }); | 6306 }); |
5960 | 6307 |
5961 }); | 6308 }); |
5962 | 6309 |
5963 | 6310 |
| 6311 unittest.group("resource-TeamdrivesResourceApi", () { |
| 6312 unittest.test("method--delete", () { |
| 6313 |
| 6314 var mock = new HttpServerMock(); |
| 6315 api.TeamdrivesResourceApi res = new api.DriveApi(mock).teamdrives; |
| 6316 var arg_teamDriveId = "foo"; |
| 6317 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 6318 var path = (req.url).path; |
| 6319 var pathOffset = 0; |
| 6320 var index; |
| 6321 var subPart; |
| 6322 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 6323 pathOffset += 1; |
| 6324 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); |
| 6325 pathOffset += 9; |
| 6326 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("teamdrives/")); |
| 6327 pathOffset += 11; |
| 6328 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| 6329 pathOffset = path.length; |
| 6330 unittest.expect(subPart, unittest.equals("$arg_teamDriveId")); |
| 6331 |
| 6332 var query = (req.url).query; |
| 6333 var queryOffset = 0; |
| 6334 var queryMap = {}; |
| 6335 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 6336 parseBool(n) { |
| 6337 if (n == "true") return true; |
| 6338 if (n == "false") return false; |
| 6339 if (n == null) return null; |
| 6340 throw new core.ArgumentError("Invalid boolean: $n"); |
| 6341 } |
| 6342 if (query.length > 0) { |
| 6343 for (var part in query.split("&")) { |
| 6344 var keyvalue = part.split("="); |
| 6345 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 6346 } |
| 6347 } |
| 6348 |
| 6349 |
| 6350 var h = { |
| 6351 "content-type" : "application/json; charset=utf-8", |
| 6352 }; |
| 6353 var resp = ""; |
| 6354 return new async.Future.value(stringResponse(200, h, resp)); |
| 6355 }), true); |
| 6356 res.delete(arg_teamDriveId).then(unittest.expectAsync((_) {})); |
| 6357 }); |
| 6358 |
| 6359 unittest.test("method--get", () { |
| 6360 |
| 6361 var mock = new HttpServerMock(); |
| 6362 api.TeamdrivesResourceApi res = new api.DriveApi(mock).teamdrives; |
| 6363 var arg_teamDriveId = "foo"; |
| 6364 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 6365 var path = (req.url).path; |
| 6366 var pathOffset = 0; |
| 6367 var index; |
| 6368 var subPart; |
| 6369 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 6370 pathOffset += 1; |
| 6371 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); |
| 6372 pathOffset += 9; |
| 6373 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("teamdrives/")); |
| 6374 pathOffset += 11; |
| 6375 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| 6376 pathOffset = path.length; |
| 6377 unittest.expect(subPart, unittest.equals("$arg_teamDriveId")); |
| 6378 |
| 6379 var query = (req.url).query; |
| 6380 var queryOffset = 0; |
| 6381 var queryMap = {}; |
| 6382 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 6383 parseBool(n) { |
| 6384 if (n == "true") return true; |
| 6385 if (n == "false") return false; |
| 6386 if (n == null) return null; |
| 6387 throw new core.ArgumentError("Invalid boolean: $n"); |
| 6388 } |
| 6389 if (query.length > 0) { |
| 6390 for (var part in query.split("&")) { |
| 6391 var keyvalue = part.split("="); |
| 6392 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 6393 } |
| 6394 } |
| 6395 |
| 6396 |
| 6397 var h = { |
| 6398 "content-type" : "application/json; charset=utf-8", |
| 6399 }; |
| 6400 var resp = convert.JSON.encode(buildTeamDrive()); |
| 6401 return new async.Future.value(stringResponse(200, h, resp)); |
| 6402 }), true); |
| 6403 res.get(arg_teamDriveId).then(unittest.expectAsync(((api.TeamDrive respons
e) { |
| 6404 checkTeamDrive(response); |
| 6405 }))); |
| 6406 }); |
| 6407 |
| 6408 unittest.test("method--insert", () { |
| 6409 |
| 6410 var mock = new HttpServerMock(); |
| 6411 api.TeamdrivesResourceApi res = new api.DriveApi(mock).teamdrives; |
| 6412 var arg_request = buildTeamDrive(); |
| 6413 var arg_requestId = "foo"; |
| 6414 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 6415 var obj = new api.TeamDrive.fromJson(json); |
| 6416 checkTeamDrive(obj); |
| 6417 |
| 6418 var path = (req.url).path; |
| 6419 var pathOffset = 0; |
| 6420 var index; |
| 6421 var subPart; |
| 6422 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 6423 pathOffset += 1; |
| 6424 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); |
| 6425 pathOffset += 9; |
| 6426 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("teamdrives")); |
| 6427 pathOffset += 10; |
| 6428 |
| 6429 var query = (req.url).query; |
| 6430 var queryOffset = 0; |
| 6431 var queryMap = {}; |
| 6432 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 6433 parseBool(n) { |
| 6434 if (n == "true") return true; |
| 6435 if (n == "false") return false; |
| 6436 if (n == null) return null; |
| 6437 throw new core.ArgumentError("Invalid boolean: $n"); |
| 6438 } |
| 6439 if (query.length > 0) { |
| 6440 for (var part in query.split("&")) { |
| 6441 var keyvalue = part.split("="); |
| 6442 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 6443 } |
| 6444 } |
| 6445 unittest.expect(queryMap["requestId"].first, unittest.equals(arg_request
Id)); |
| 6446 |
| 6447 |
| 6448 var h = { |
| 6449 "content-type" : "application/json; charset=utf-8", |
| 6450 }; |
| 6451 var resp = convert.JSON.encode(buildTeamDrive()); |
| 6452 return new async.Future.value(stringResponse(200, h, resp)); |
| 6453 }), true); |
| 6454 res.insert(arg_request, arg_requestId).then(unittest.expectAsync(((api.Tea
mDrive response) { |
| 6455 checkTeamDrive(response); |
| 6456 }))); |
| 6457 }); |
| 6458 |
| 6459 unittest.test("method--list", () { |
| 6460 |
| 6461 var mock = new HttpServerMock(); |
| 6462 api.TeamdrivesResourceApi res = new api.DriveApi(mock).teamdrives; |
| 6463 var arg_maxResults = 42; |
| 6464 var arg_pageToken = "foo"; |
| 6465 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 6466 var path = (req.url).path; |
| 6467 var pathOffset = 0; |
| 6468 var index; |
| 6469 var subPart; |
| 6470 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 6471 pathOffset += 1; |
| 6472 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); |
| 6473 pathOffset += 9; |
| 6474 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("teamdrives")); |
| 6475 pathOffset += 10; |
| 6476 |
| 6477 var query = (req.url).query; |
| 6478 var queryOffset = 0; |
| 6479 var queryMap = {}; |
| 6480 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 6481 parseBool(n) { |
| 6482 if (n == "true") return true; |
| 6483 if (n == "false") return false; |
| 6484 if (n == null) return null; |
| 6485 throw new core.ArgumentError("Invalid boolean: $n"); |
| 6486 } |
| 6487 if (query.length > 0) { |
| 6488 for (var part in query.split("&")) { |
| 6489 var keyvalue = part.split("="); |
| 6490 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 6491 } |
| 6492 } |
| 6493 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); |
| 6494 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
| 6495 |
| 6496 |
| 6497 var h = { |
| 6498 "content-type" : "application/json; charset=utf-8", |
| 6499 }; |
| 6500 var resp = convert.JSON.encode(buildTeamDriveList()); |
| 6501 return new async.Future.value(stringResponse(200, h, resp)); |
| 6502 }), true); |
| 6503 res.list(maxResults: arg_maxResults, pageToken: arg_pageToken).then(unitte
st.expectAsync(((api.TeamDriveList response) { |
| 6504 checkTeamDriveList(response); |
| 6505 }))); |
| 6506 }); |
| 6507 |
| 6508 unittest.test("method--update", () { |
| 6509 |
| 6510 var mock = new HttpServerMock(); |
| 6511 api.TeamdrivesResourceApi res = new api.DriveApi(mock).teamdrives; |
| 6512 var arg_request = buildTeamDrive(); |
| 6513 var arg_teamDriveId = "foo"; |
| 6514 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 6515 var obj = new api.TeamDrive.fromJson(json); |
| 6516 checkTeamDrive(obj); |
| 6517 |
| 6518 var path = (req.url).path; |
| 6519 var pathOffset = 0; |
| 6520 var index; |
| 6521 var subPart; |
| 6522 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 6523 pathOffset += 1; |
| 6524 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); |
| 6525 pathOffset += 9; |
| 6526 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("teamdrives/")); |
| 6527 pathOffset += 11; |
| 6528 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| 6529 pathOffset = path.length; |
| 6530 unittest.expect(subPart, unittest.equals("$arg_teamDriveId")); |
| 6531 |
| 6532 var query = (req.url).query; |
| 6533 var queryOffset = 0; |
| 6534 var queryMap = {}; |
| 6535 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 6536 parseBool(n) { |
| 6537 if (n == "true") return true; |
| 6538 if (n == "false") return false; |
| 6539 if (n == null) return null; |
| 6540 throw new core.ArgumentError("Invalid boolean: $n"); |
| 6541 } |
| 6542 if (query.length > 0) { |
| 6543 for (var part in query.split("&")) { |
| 6544 var keyvalue = part.split("="); |
| 6545 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 6546 } |
| 6547 } |
| 6548 |
| 6549 |
| 6550 var h = { |
| 6551 "content-type" : "application/json; charset=utf-8", |
| 6552 }; |
| 6553 var resp = convert.JSON.encode(buildTeamDrive()); |
| 6554 return new async.Future.value(stringResponse(200, h, resp)); |
| 6555 }), true); |
| 6556 res.update(arg_request, arg_teamDriveId).then(unittest.expectAsync(((api.T
eamDrive response) { |
| 6557 checkTeamDrive(response); |
| 6558 }))); |
| 6559 }); |
| 6560 |
| 6561 }); |
| 6562 |
| 6563 |
5964 } | 6564 } |
5965 | 6565 |
OLD | NEW |