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:test/test.dart' as unittest; |
11 | 11 |
12 import 'package:googleapis/drive/v2.dart' as api; | 12 import 'package:googleapis/drive/v2.dart' as api; |
13 | 13 |
14 class HttpServerMock extends http.BaseClient { | 14 class HttpServerMock extends http.BaseClient { |
15 core.Function _callback; | 15 core.Function _callback; |
16 core.bool _expectJson; | 16 core.bool _expectJson; |
17 | 17 |
18 void register(core.Function callback, core.bool expectJson) { | 18 void register(core.Function callback, core.bool expectJson) { |
19 _callback = callback; | 19 _callback = callback; |
20 _expectJson = expectJson; | 20 _expectJson = expectJson; |
(...skipping 18 matching lines...) Expand all Loading... |
39 } else { | 39 } else { |
40 return stream.toBytes().then((data) { | 40 return stream.toBytes().then((data) { |
41 return _callback(request, data); | 41 return _callback(request, data); |
42 }); | 42 }); |
43 } | 43 } |
44 } | 44 } |
45 } | 45 } |
46 } | 46 } |
47 | 47 |
48 http.StreamedResponse stringResponse( | 48 http.StreamedResponse stringResponse( |
49 core.int status, core.Map headers, core.String body) { | 49 core.int status, core.Map<core.String, core.String> headers, core.String bod
y) { |
50 var stream = new async.Stream.fromIterable([convert.UTF8.encode(body)]); | 50 var stream = new async.Stream.fromIterable([convert.UTF8.encode(body)]); |
51 return new http.StreamedResponse(stream, status, headers: headers); | 51 return new http.StreamedResponse(stream, status, headers: headers); |
52 } | 52 } |
53 | 53 |
54 buildUnnamed631() { | 54 buildUnnamed636() { |
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 checkUnnamed631(core.List<core.String> o) { | 61 checkUnnamed636(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 = buildUnnamed631(); | 72 o.additionalRoles = buildUnnamed636(); |
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 checkUnnamed631(o.additionalRoles); | 82 checkUnnamed636(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 buildUnnamed632() { | 88 buildUnnamed637() { |
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 checkUnnamed632(core.List<api.AboutAdditionalRoleInfoRoleSets> o) { | 95 checkUnnamed637(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 = buildUnnamed632(); | 106 o.roleSets = buildUnnamed637(); |
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 checkUnnamed632(o.roleSets); | 116 checkUnnamed637(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 buildUnnamed633() { | 122 buildUnnamed638() { |
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 checkUnnamed633(core.List<api.AboutAdditionalRoleInfo> o) { | 129 checkUnnamed638(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 buildUnnamed634() { | 135 buildUnnamed639() { |
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 checkUnnamed634(core.List<core.String> o) { | 142 checkUnnamed639(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 = buildUnnamed634(); | 154 o.targets = buildUnnamed639(); |
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 checkUnnamed634(o.targets); | 164 checkUnnamed639(o.targets); |
165 } | 165 } |
166 buildCounterAboutExportFormats--; | 166 buildCounterAboutExportFormats--; |
167 } | 167 } |
168 | 168 |
169 buildUnnamed635() { | 169 buildUnnamed640() { |
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 checkUnnamed635(core.List<api.AboutExportFormats> o) { | 176 checkUnnamed640(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 buildUnnamed636() { | 203 buildUnnamed641() { |
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 checkUnnamed636(core.List<api.AboutFeatures> o) { | 210 checkUnnamed641(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 buildUnnamed637() { | 216 buildUnnamed642() { |
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 checkUnnamed637(core.List<core.String> o) { | 223 checkUnnamed642(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 buildUnnamed638() { | 229 buildUnnamed643() { |
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 checkUnnamed638(core.List<core.String> o) { | 236 checkUnnamed643(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 = buildUnnamed638(); | 248 o.targets = buildUnnamed643(); |
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 checkUnnamed638(o.targets); | 258 checkUnnamed643(o.targets); |
259 } | 259 } |
260 buildCounterAboutImportFormats--; | 260 buildCounterAboutImportFormats--; |
261 } | 261 } |
262 | 262 |
263 buildUnnamed639() { | 263 buildUnnamed644() { |
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 checkUnnamed639(core.List<api.AboutImportFormats> o) { | 270 checkUnnamed644(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 buildUnnamed640() { | 297 buildUnnamed645() { |
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 checkUnnamed640(core.List<api.AboutMaxUploadSizes> o) { | 304 checkUnnamed645(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 buildUnnamed641() { | 331 buildUnnamed646() { |
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 checkUnnamed641(core.List<api.AboutQuotaBytesByService> o) { | 338 checkUnnamed646(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 buildCounterAboutTeamDriveThemes = 0; | 344 core.int buildCounterAboutTeamDriveThemes = 0; |
345 buildAboutTeamDriveThemes() { | 345 buildAboutTeamDriveThemes() { |
346 var o = new api.AboutTeamDriveThemes(); | 346 var o = new api.AboutTeamDriveThemes(); |
347 buildCounterAboutTeamDriveThemes++; | 347 buildCounterAboutTeamDriveThemes++; |
348 if (buildCounterAboutTeamDriveThemes < 3) { | 348 if (buildCounterAboutTeamDriveThemes < 3) { |
349 o.backgroundImageLink = "foo"; | 349 o.backgroundImageLink = "foo"; |
350 o.colorRgb = "foo"; | 350 o.colorRgb = "foo"; |
351 o.id = "foo"; | 351 o.id = "foo"; |
352 } | 352 } |
353 buildCounterAboutTeamDriveThemes--; | 353 buildCounterAboutTeamDriveThemes--; |
354 return o; | 354 return o; |
355 } | 355 } |
356 | 356 |
357 checkAboutTeamDriveThemes(api.AboutTeamDriveThemes o) { | 357 checkAboutTeamDriveThemes(api.AboutTeamDriveThemes o) { |
358 buildCounterAboutTeamDriveThemes++; | 358 buildCounterAboutTeamDriveThemes++; |
359 if (buildCounterAboutTeamDriveThemes < 3) { | 359 if (buildCounterAboutTeamDriveThemes < 3) { |
360 unittest.expect(o.backgroundImageLink, unittest.equals('foo')); | 360 unittest.expect(o.backgroundImageLink, unittest.equals('foo')); |
361 unittest.expect(o.colorRgb, unittest.equals('foo')); | 361 unittest.expect(o.colorRgb, unittest.equals('foo')); |
362 unittest.expect(o.id, unittest.equals('foo')); | 362 unittest.expect(o.id, unittest.equals('foo')); |
363 } | 363 } |
364 buildCounterAboutTeamDriveThemes--; | 364 buildCounterAboutTeamDriveThemes--; |
365 } | 365 } |
366 | 366 |
367 buildUnnamed642() { | 367 buildUnnamed647() { |
368 var o = new core.List<api.AboutTeamDriveThemes>(); | 368 var o = new core.List<api.AboutTeamDriveThemes>(); |
369 o.add(buildAboutTeamDriveThemes()); | 369 o.add(buildAboutTeamDriveThemes()); |
370 o.add(buildAboutTeamDriveThemes()); | 370 o.add(buildAboutTeamDriveThemes()); |
371 return o; | 371 return o; |
372 } | 372 } |
373 | 373 |
374 checkUnnamed642(core.List<api.AboutTeamDriveThemes> o) { | 374 checkUnnamed647(core.List<api.AboutTeamDriveThemes> o) { |
375 unittest.expect(o, unittest.hasLength(2)); | 375 unittest.expect(o, unittest.hasLength(2)); |
376 checkAboutTeamDriveThemes(o[0]); | 376 checkAboutTeamDriveThemes(o[0]); |
377 checkAboutTeamDriveThemes(o[1]); | 377 checkAboutTeamDriveThemes(o[1]); |
378 } | 378 } |
379 | 379 |
380 core.int buildCounterAbout = 0; | 380 core.int buildCounterAbout = 0; |
381 buildAbout() { | 381 buildAbout() { |
382 var o = new api.About(); | 382 var o = new api.About(); |
383 buildCounterAbout++; | 383 buildCounterAbout++; |
384 if (buildCounterAbout < 3) { | 384 if (buildCounterAbout < 3) { |
385 o.additionalRoleInfo = buildUnnamed633(); | 385 o.additionalRoleInfo = buildUnnamed638(); |
386 o.domainSharingPolicy = "foo"; | 386 o.domainSharingPolicy = "foo"; |
387 o.etag = "foo"; | 387 o.etag = "foo"; |
388 o.exportFormats = buildUnnamed635(); | 388 o.exportFormats = buildUnnamed640(); |
389 o.features = buildUnnamed636(); | 389 o.features = buildUnnamed641(); |
390 o.folderColorPalette = buildUnnamed637(); | 390 o.folderColorPalette = buildUnnamed642(); |
391 o.importFormats = buildUnnamed639(); | 391 o.importFormats = buildUnnamed644(); |
392 o.isCurrentAppInstalled = true; | 392 o.isCurrentAppInstalled = true; |
393 o.kind = "foo"; | 393 o.kind = "foo"; |
394 o.languageCode = "foo"; | 394 o.languageCode = "foo"; |
395 o.largestChangeId = "foo"; | 395 o.largestChangeId = "foo"; |
396 o.maxUploadSizes = buildUnnamed640(); | 396 o.maxUploadSizes = buildUnnamed645(); |
397 o.name = "foo"; | 397 o.name = "foo"; |
398 o.permissionId = "foo"; | 398 o.permissionId = "foo"; |
399 o.quotaBytesByService = buildUnnamed641(); | 399 o.quotaBytesByService = buildUnnamed646(); |
400 o.quotaBytesTotal = "foo"; | 400 o.quotaBytesTotal = "foo"; |
401 o.quotaBytesUsed = "foo"; | 401 o.quotaBytesUsed = "foo"; |
402 o.quotaBytesUsedAggregate = "foo"; | 402 o.quotaBytesUsedAggregate = "foo"; |
403 o.quotaBytesUsedInTrash = "foo"; | 403 o.quotaBytesUsedInTrash = "foo"; |
404 o.quotaType = "foo"; | 404 o.quotaType = "foo"; |
405 o.remainingChangeIds = "foo"; | 405 o.remainingChangeIds = "foo"; |
406 o.rootFolderId = "foo"; | 406 o.rootFolderId = "foo"; |
407 o.selfLink = "foo"; | 407 o.selfLink = "foo"; |
408 o.teamDriveThemes = buildUnnamed642(); | 408 o.teamDriveThemes = buildUnnamed647(); |
409 o.user = buildUser(); | 409 o.user = buildUser(); |
410 } | 410 } |
411 buildCounterAbout--; | 411 buildCounterAbout--; |
412 return o; | 412 return o; |
413 } | 413 } |
414 | 414 |
415 checkAbout(api.About o) { | 415 checkAbout(api.About o) { |
416 buildCounterAbout++; | 416 buildCounterAbout++; |
417 if (buildCounterAbout < 3) { | 417 if (buildCounterAbout < 3) { |
418 checkUnnamed633(o.additionalRoleInfo); | 418 checkUnnamed638(o.additionalRoleInfo); |
419 unittest.expect(o.domainSharingPolicy, unittest.equals('foo')); | 419 unittest.expect(o.domainSharingPolicy, unittest.equals('foo')); |
420 unittest.expect(o.etag, unittest.equals('foo')); | 420 unittest.expect(o.etag, unittest.equals('foo')); |
421 checkUnnamed635(o.exportFormats); | 421 checkUnnamed640(o.exportFormats); |
422 checkUnnamed636(o.features); | 422 checkUnnamed641(o.features); |
423 checkUnnamed637(o.folderColorPalette); | 423 checkUnnamed642(o.folderColorPalette); |
424 checkUnnamed639(o.importFormats); | 424 checkUnnamed644(o.importFormats); |
425 unittest.expect(o.isCurrentAppInstalled, unittest.isTrue); | 425 unittest.expect(o.isCurrentAppInstalled, unittest.isTrue); |
426 unittest.expect(o.kind, unittest.equals('foo')); | 426 unittest.expect(o.kind, unittest.equals('foo')); |
427 unittest.expect(o.languageCode, unittest.equals('foo')); | 427 unittest.expect(o.languageCode, unittest.equals('foo')); |
428 unittest.expect(o.largestChangeId, unittest.equals('foo')); | 428 unittest.expect(o.largestChangeId, unittest.equals('foo')); |
429 checkUnnamed640(o.maxUploadSizes); | 429 checkUnnamed645(o.maxUploadSizes); |
430 unittest.expect(o.name, unittest.equals('foo')); | 430 unittest.expect(o.name, unittest.equals('foo')); |
431 unittest.expect(o.permissionId, unittest.equals('foo')); | 431 unittest.expect(o.permissionId, unittest.equals('foo')); |
432 checkUnnamed641(o.quotaBytesByService); | 432 checkUnnamed646(o.quotaBytesByService); |
433 unittest.expect(o.quotaBytesTotal, unittest.equals('foo')); | 433 unittest.expect(o.quotaBytesTotal, unittest.equals('foo')); |
434 unittest.expect(o.quotaBytesUsed, unittest.equals('foo')); | 434 unittest.expect(o.quotaBytesUsed, unittest.equals('foo')); |
435 unittest.expect(o.quotaBytesUsedAggregate, unittest.equals('foo')); | 435 unittest.expect(o.quotaBytesUsedAggregate, unittest.equals('foo')); |
436 unittest.expect(o.quotaBytesUsedInTrash, unittest.equals('foo')); | 436 unittest.expect(o.quotaBytesUsedInTrash, unittest.equals('foo')); |
437 unittest.expect(o.quotaType, unittest.equals('foo')); | 437 unittest.expect(o.quotaType, unittest.equals('foo')); |
438 unittest.expect(o.remainingChangeIds, unittest.equals('foo')); | 438 unittest.expect(o.remainingChangeIds, unittest.equals('foo')); |
439 unittest.expect(o.rootFolderId, unittest.equals('foo')); | 439 unittest.expect(o.rootFolderId, unittest.equals('foo')); |
440 unittest.expect(o.selfLink, unittest.equals('foo')); | 440 unittest.expect(o.selfLink, unittest.equals('foo')); |
441 checkUnnamed642(o.teamDriveThemes); | 441 checkUnnamed647(o.teamDriveThemes); |
442 checkUser(o.user); | 442 checkUser(o.user); |
443 } | 443 } |
444 buildCounterAbout--; | 444 buildCounterAbout--; |
445 } | 445 } |
446 | 446 |
447 core.int buildCounterAppIcons = 0; | 447 core.int buildCounterAppIcons = 0; |
448 buildAppIcons() { | 448 buildAppIcons() { |
449 var o = new api.AppIcons(); | 449 var o = new api.AppIcons(); |
450 buildCounterAppIcons++; | 450 buildCounterAppIcons++; |
451 if (buildCounterAppIcons < 3) { | 451 if (buildCounterAppIcons < 3) { |
452 o.category = "foo"; | 452 o.category = "foo"; |
453 o.iconUrl = "foo"; | 453 o.iconUrl = "foo"; |
454 o.size = 42; | 454 o.size = 42; |
455 } | 455 } |
456 buildCounterAppIcons--; | 456 buildCounterAppIcons--; |
457 return o; | 457 return o; |
458 } | 458 } |
459 | 459 |
460 checkAppIcons(api.AppIcons o) { | 460 checkAppIcons(api.AppIcons o) { |
461 buildCounterAppIcons++; | 461 buildCounterAppIcons++; |
462 if (buildCounterAppIcons < 3) { | 462 if (buildCounterAppIcons < 3) { |
463 unittest.expect(o.category, unittest.equals('foo')); | 463 unittest.expect(o.category, unittest.equals('foo')); |
464 unittest.expect(o.iconUrl, unittest.equals('foo')); | 464 unittest.expect(o.iconUrl, unittest.equals('foo')); |
465 unittest.expect(o.size, unittest.equals(42)); | 465 unittest.expect(o.size, unittest.equals(42)); |
466 } | 466 } |
467 buildCounterAppIcons--; | 467 buildCounterAppIcons--; |
468 } | 468 } |
469 | 469 |
470 buildUnnamed643() { | 470 buildUnnamed648() { |
471 var o = new core.List<api.AppIcons>(); | 471 var o = new core.List<api.AppIcons>(); |
472 o.add(buildAppIcons()); | 472 o.add(buildAppIcons()); |
473 o.add(buildAppIcons()); | 473 o.add(buildAppIcons()); |
474 return o; | 474 return o; |
475 } | 475 } |
476 | 476 |
477 checkUnnamed643(core.List<api.AppIcons> o) { | 477 checkUnnamed648(core.List<api.AppIcons> o) { |
478 unittest.expect(o, unittest.hasLength(2)); | 478 unittest.expect(o, unittest.hasLength(2)); |
479 checkAppIcons(o[0]); | 479 checkAppIcons(o[0]); |
480 checkAppIcons(o[1]); | 480 checkAppIcons(o[1]); |
481 } | 481 } |
482 | 482 |
483 buildUnnamed644() { | 483 buildUnnamed649() { |
484 var o = new core.List<core.String>(); | 484 var o = new core.List<core.String>(); |
485 o.add("foo"); | 485 o.add("foo"); |
486 o.add("foo"); | 486 o.add("foo"); |
487 return o; | 487 return o; |
488 } | 488 } |
489 | 489 |
490 checkUnnamed644(core.List<core.String> o) { | 490 checkUnnamed649(core.List<core.String> o) { |
491 unittest.expect(o, unittest.hasLength(2)); | 491 unittest.expect(o, unittest.hasLength(2)); |
492 unittest.expect(o[0], unittest.equals('foo')); | 492 unittest.expect(o[0], unittest.equals('foo')); |
493 unittest.expect(o[1], unittest.equals('foo')); | 493 unittest.expect(o[1], unittest.equals('foo')); |
494 } | 494 } |
495 | 495 |
496 buildUnnamed645() { | 496 buildUnnamed650() { |
497 var o = new core.List<core.String>(); | 497 var o = new core.List<core.String>(); |
498 o.add("foo"); | 498 o.add("foo"); |
499 o.add("foo"); | 499 o.add("foo"); |
500 return o; | 500 return o; |
501 } | 501 } |
502 | 502 |
503 checkUnnamed645(core.List<core.String> o) { | 503 checkUnnamed650(core.List<core.String> o) { |
504 unittest.expect(o, unittest.hasLength(2)); | 504 unittest.expect(o, unittest.hasLength(2)); |
505 unittest.expect(o[0], unittest.equals('foo')); | 505 unittest.expect(o[0], unittest.equals('foo')); |
506 unittest.expect(o[1], unittest.equals('foo')); | 506 unittest.expect(o[1], unittest.equals('foo')); |
507 } | 507 } |
508 | 508 |
509 buildUnnamed646() { | 509 buildUnnamed651() { |
510 var o = new core.List<core.String>(); | 510 var o = new core.List<core.String>(); |
511 o.add("foo"); | 511 o.add("foo"); |
512 o.add("foo"); | 512 o.add("foo"); |
513 return o; | 513 return o; |
514 } | 514 } |
515 | 515 |
516 checkUnnamed646(core.List<core.String> o) { | 516 checkUnnamed651(core.List<core.String> o) { |
517 unittest.expect(o, unittest.hasLength(2)); | 517 unittest.expect(o, unittest.hasLength(2)); |
518 unittest.expect(o[0], unittest.equals('foo')); | 518 unittest.expect(o[0], unittest.equals('foo')); |
519 unittest.expect(o[1], unittest.equals('foo')); | 519 unittest.expect(o[1], unittest.equals('foo')); |
520 } | 520 } |
521 | 521 |
522 buildUnnamed647() { | 522 buildUnnamed652() { |
523 var o = new core.List<core.String>(); | 523 var o = new core.List<core.String>(); |
524 o.add("foo"); | 524 o.add("foo"); |
525 o.add("foo"); | 525 o.add("foo"); |
526 return o; | 526 return o; |
527 } | 527 } |
528 | 528 |
529 checkUnnamed647(core.List<core.String> o) { | 529 checkUnnamed652(core.List<core.String> o) { |
530 unittest.expect(o, unittest.hasLength(2)); | 530 unittest.expect(o, unittest.hasLength(2)); |
531 unittest.expect(o[0], unittest.equals('foo')); | 531 unittest.expect(o[0], unittest.equals('foo')); |
532 unittest.expect(o[1], unittest.equals('foo')); | 532 unittest.expect(o[1], unittest.equals('foo')); |
533 } | 533 } |
534 | 534 |
535 core.int buildCounterApp = 0; | 535 core.int buildCounterApp = 0; |
536 buildApp() { | 536 buildApp() { |
537 var o = new api.App(); | 537 var o = new api.App(); |
538 buildCounterApp++; | 538 buildCounterApp++; |
539 if (buildCounterApp < 3) { | 539 if (buildCounterApp < 3) { |
540 o.authorized = true; | 540 o.authorized = true; |
541 o.createInFolderTemplate = "foo"; | 541 o.createInFolderTemplate = "foo"; |
542 o.createUrl = "foo"; | 542 o.createUrl = "foo"; |
543 o.hasDriveWideScope = true; | 543 o.hasDriveWideScope = true; |
544 o.icons = buildUnnamed643(); | 544 o.icons = buildUnnamed648(); |
545 o.id = "foo"; | 545 o.id = "foo"; |
546 o.installed = true; | 546 o.installed = true; |
547 o.kind = "foo"; | 547 o.kind = "foo"; |
548 o.longDescription = "foo"; | 548 o.longDescription = "foo"; |
549 o.name = "foo"; | 549 o.name = "foo"; |
550 o.objectType = "foo"; | 550 o.objectType = "foo"; |
551 o.openUrlTemplate = "foo"; | 551 o.openUrlTemplate = "foo"; |
552 o.primaryFileExtensions = buildUnnamed644(); | 552 o.primaryFileExtensions = buildUnnamed649(); |
553 o.primaryMimeTypes = buildUnnamed645(); | 553 o.primaryMimeTypes = buildUnnamed650(); |
554 o.productId = "foo"; | 554 o.productId = "foo"; |
555 o.productUrl = "foo"; | 555 o.productUrl = "foo"; |
556 o.secondaryFileExtensions = buildUnnamed646(); | 556 o.secondaryFileExtensions = buildUnnamed651(); |
557 o.secondaryMimeTypes = buildUnnamed647(); | 557 o.secondaryMimeTypes = buildUnnamed652(); |
558 o.shortDescription = "foo"; | 558 o.shortDescription = "foo"; |
559 o.supportsCreate = true; | 559 o.supportsCreate = true; |
560 o.supportsImport = true; | 560 o.supportsImport = true; |
561 o.supportsMultiOpen = true; | 561 o.supportsMultiOpen = true; |
562 o.supportsOfflineCreate = true; | 562 o.supportsOfflineCreate = true; |
563 o.useByDefault = true; | 563 o.useByDefault = true; |
564 } | 564 } |
565 buildCounterApp--; | 565 buildCounterApp--; |
566 return o; | 566 return o; |
567 } | 567 } |
568 | 568 |
569 checkApp(api.App o) { | 569 checkApp(api.App o) { |
570 buildCounterApp++; | 570 buildCounterApp++; |
571 if (buildCounterApp < 3) { | 571 if (buildCounterApp < 3) { |
572 unittest.expect(o.authorized, unittest.isTrue); | 572 unittest.expect(o.authorized, unittest.isTrue); |
573 unittest.expect(o.createInFolderTemplate, unittest.equals('foo')); | 573 unittest.expect(o.createInFolderTemplate, unittest.equals('foo')); |
574 unittest.expect(o.createUrl, unittest.equals('foo')); | 574 unittest.expect(o.createUrl, unittest.equals('foo')); |
575 unittest.expect(o.hasDriveWideScope, unittest.isTrue); | 575 unittest.expect(o.hasDriveWideScope, unittest.isTrue); |
576 checkUnnamed643(o.icons); | 576 checkUnnamed648(o.icons); |
577 unittest.expect(o.id, unittest.equals('foo')); | 577 unittest.expect(o.id, unittest.equals('foo')); |
578 unittest.expect(o.installed, unittest.isTrue); | 578 unittest.expect(o.installed, unittest.isTrue); |
579 unittest.expect(o.kind, unittest.equals('foo')); | 579 unittest.expect(o.kind, unittest.equals('foo')); |
580 unittest.expect(o.longDescription, unittest.equals('foo')); | 580 unittest.expect(o.longDescription, unittest.equals('foo')); |
581 unittest.expect(o.name, unittest.equals('foo')); | 581 unittest.expect(o.name, unittest.equals('foo')); |
582 unittest.expect(o.objectType, unittest.equals('foo')); | 582 unittest.expect(o.objectType, unittest.equals('foo')); |
583 unittest.expect(o.openUrlTemplate, unittest.equals('foo')); | 583 unittest.expect(o.openUrlTemplate, unittest.equals('foo')); |
584 checkUnnamed644(o.primaryFileExtensions); | 584 checkUnnamed649(o.primaryFileExtensions); |
585 checkUnnamed645(o.primaryMimeTypes); | 585 checkUnnamed650(o.primaryMimeTypes); |
586 unittest.expect(o.productId, unittest.equals('foo')); | 586 unittest.expect(o.productId, unittest.equals('foo')); |
587 unittest.expect(o.productUrl, unittest.equals('foo')); | 587 unittest.expect(o.productUrl, unittest.equals('foo')); |
588 checkUnnamed646(o.secondaryFileExtensions); | 588 checkUnnamed651(o.secondaryFileExtensions); |
589 checkUnnamed647(o.secondaryMimeTypes); | 589 checkUnnamed652(o.secondaryMimeTypes); |
590 unittest.expect(o.shortDescription, unittest.equals('foo')); | 590 unittest.expect(o.shortDescription, unittest.equals('foo')); |
591 unittest.expect(o.supportsCreate, unittest.isTrue); | 591 unittest.expect(o.supportsCreate, unittest.isTrue); |
592 unittest.expect(o.supportsImport, unittest.isTrue); | 592 unittest.expect(o.supportsImport, unittest.isTrue); |
593 unittest.expect(o.supportsMultiOpen, unittest.isTrue); | 593 unittest.expect(o.supportsMultiOpen, unittest.isTrue); |
594 unittest.expect(o.supportsOfflineCreate, unittest.isTrue); | 594 unittest.expect(o.supportsOfflineCreate, unittest.isTrue); |
595 unittest.expect(o.useByDefault, unittest.isTrue); | 595 unittest.expect(o.useByDefault, unittest.isTrue); |
596 } | 596 } |
597 buildCounterApp--; | 597 buildCounterApp--; |
598 } | 598 } |
599 | 599 |
600 buildUnnamed648() { | 600 buildUnnamed653() { |
601 var o = new core.List<core.String>(); | 601 var o = new core.List<core.String>(); |
602 o.add("foo"); | 602 o.add("foo"); |
603 o.add("foo"); | 603 o.add("foo"); |
604 return o; | 604 return o; |
605 } | 605 } |
606 | 606 |
607 checkUnnamed648(core.List<core.String> o) { | 607 checkUnnamed653(core.List<core.String> o) { |
608 unittest.expect(o, unittest.hasLength(2)); | 608 unittest.expect(o, unittest.hasLength(2)); |
609 unittest.expect(o[0], unittest.equals('foo')); | 609 unittest.expect(o[0], unittest.equals('foo')); |
610 unittest.expect(o[1], unittest.equals('foo')); | 610 unittest.expect(o[1], unittest.equals('foo')); |
611 } | 611 } |
612 | 612 |
613 buildUnnamed649() { | 613 buildUnnamed654() { |
614 var o = new core.List<api.App>(); | 614 var o = new core.List<api.App>(); |
615 o.add(buildApp()); | 615 o.add(buildApp()); |
616 o.add(buildApp()); | 616 o.add(buildApp()); |
617 return o; | 617 return o; |
618 } | 618 } |
619 | 619 |
620 checkUnnamed649(core.List<api.App> o) { | 620 checkUnnamed654(core.List<api.App> o) { |
621 unittest.expect(o, unittest.hasLength(2)); | 621 unittest.expect(o, unittest.hasLength(2)); |
622 checkApp(o[0]); | 622 checkApp(o[0]); |
623 checkApp(o[1]); | 623 checkApp(o[1]); |
624 } | 624 } |
625 | 625 |
626 core.int buildCounterAppList = 0; | 626 core.int buildCounterAppList = 0; |
627 buildAppList() { | 627 buildAppList() { |
628 var o = new api.AppList(); | 628 var o = new api.AppList(); |
629 buildCounterAppList++; | 629 buildCounterAppList++; |
630 if (buildCounterAppList < 3) { | 630 if (buildCounterAppList < 3) { |
631 o.defaultAppIds = buildUnnamed648(); | 631 o.defaultAppIds = buildUnnamed653(); |
632 o.etag = "foo"; | 632 o.etag = "foo"; |
633 o.items = buildUnnamed649(); | 633 o.items = buildUnnamed654(); |
634 o.kind = "foo"; | 634 o.kind = "foo"; |
635 o.selfLink = "foo"; | 635 o.selfLink = "foo"; |
636 } | 636 } |
637 buildCounterAppList--; | 637 buildCounterAppList--; |
638 return o; | 638 return o; |
639 } | 639 } |
640 | 640 |
641 checkAppList(api.AppList o) { | 641 checkAppList(api.AppList o) { |
642 buildCounterAppList++; | 642 buildCounterAppList++; |
643 if (buildCounterAppList < 3) { | 643 if (buildCounterAppList < 3) { |
644 checkUnnamed648(o.defaultAppIds); | 644 checkUnnamed653(o.defaultAppIds); |
645 unittest.expect(o.etag, unittest.equals('foo')); | 645 unittest.expect(o.etag, unittest.equals('foo')); |
646 checkUnnamed649(o.items); | 646 checkUnnamed654(o.items); |
647 unittest.expect(o.kind, unittest.equals('foo')); | 647 unittest.expect(o.kind, unittest.equals('foo')); |
648 unittest.expect(o.selfLink, unittest.equals('foo')); | 648 unittest.expect(o.selfLink, unittest.equals('foo')); |
649 } | 649 } |
650 buildCounterAppList--; | 650 buildCounterAppList--; |
651 } | 651 } |
652 | 652 |
653 core.int buildCounterChange = 0; | 653 core.int buildCounterChange = 0; |
654 buildChange() { | 654 buildChange() { |
655 var o = new api.Change(); | 655 var o = new api.Change(); |
656 buildCounterChange++; | 656 buildCounterChange++; |
(...skipping 23 matching lines...) Expand all Loading... |
680 unittest.expect(o.kind, unittest.equals('foo')); | 680 unittest.expect(o.kind, unittest.equals('foo')); |
681 unittest.expect(o.modificationDate, unittest.equals(core.DateTime.parse("200
2-02-27T14:01:02"))); | 681 unittest.expect(o.modificationDate, unittest.equals(core.DateTime.parse("200
2-02-27T14:01:02"))); |
682 unittest.expect(o.selfLink, unittest.equals('foo')); | 682 unittest.expect(o.selfLink, unittest.equals('foo')); |
683 checkTeamDrive(o.teamDrive); | 683 checkTeamDrive(o.teamDrive); |
684 unittest.expect(o.teamDriveId, unittest.equals('foo')); | 684 unittest.expect(o.teamDriveId, unittest.equals('foo')); |
685 unittest.expect(o.type, unittest.equals('foo')); | 685 unittest.expect(o.type, unittest.equals('foo')); |
686 } | 686 } |
687 buildCounterChange--; | 687 buildCounterChange--; |
688 } | 688 } |
689 | 689 |
690 buildUnnamed650() { | 690 buildUnnamed655() { |
691 var o = new core.List<api.Change>(); | 691 var o = new core.List<api.Change>(); |
692 o.add(buildChange()); | 692 o.add(buildChange()); |
693 o.add(buildChange()); | 693 o.add(buildChange()); |
694 return o; | 694 return o; |
695 } | 695 } |
696 | 696 |
697 checkUnnamed650(core.List<api.Change> o) { | 697 checkUnnamed655(core.List<api.Change> o) { |
698 unittest.expect(o, unittest.hasLength(2)); | 698 unittest.expect(o, unittest.hasLength(2)); |
699 checkChange(o[0]); | 699 checkChange(o[0]); |
700 checkChange(o[1]); | 700 checkChange(o[1]); |
701 } | 701 } |
702 | 702 |
703 core.int buildCounterChangeList = 0; | 703 core.int buildCounterChangeList = 0; |
704 buildChangeList() { | 704 buildChangeList() { |
705 var o = new api.ChangeList(); | 705 var o = new api.ChangeList(); |
706 buildCounterChangeList++; | 706 buildCounterChangeList++; |
707 if (buildCounterChangeList < 3) { | 707 if (buildCounterChangeList < 3) { |
708 o.etag = "foo"; | 708 o.etag = "foo"; |
709 o.items = buildUnnamed650(); | 709 o.items = buildUnnamed655(); |
710 o.kind = "foo"; | 710 o.kind = "foo"; |
711 o.largestChangeId = "foo"; | 711 o.largestChangeId = "foo"; |
712 o.newStartPageToken = "foo"; | 712 o.newStartPageToken = "foo"; |
713 o.nextLink = "foo"; | 713 o.nextLink = "foo"; |
714 o.nextPageToken = "foo"; | 714 o.nextPageToken = "foo"; |
715 o.selfLink = "foo"; | 715 o.selfLink = "foo"; |
716 } | 716 } |
717 buildCounterChangeList--; | 717 buildCounterChangeList--; |
718 return o; | 718 return o; |
719 } | 719 } |
720 | 720 |
721 checkChangeList(api.ChangeList o) { | 721 checkChangeList(api.ChangeList o) { |
722 buildCounterChangeList++; | 722 buildCounterChangeList++; |
723 if (buildCounterChangeList < 3) { | 723 if (buildCounterChangeList < 3) { |
724 unittest.expect(o.etag, unittest.equals('foo')); | 724 unittest.expect(o.etag, unittest.equals('foo')); |
725 checkUnnamed650(o.items); | 725 checkUnnamed655(o.items); |
726 unittest.expect(o.kind, unittest.equals('foo')); | 726 unittest.expect(o.kind, unittest.equals('foo')); |
727 unittest.expect(o.largestChangeId, unittest.equals('foo')); | 727 unittest.expect(o.largestChangeId, unittest.equals('foo')); |
728 unittest.expect(o.newStartPageToken, unittest.equals('foo')); | 728 unittest.expect(o.newStartPageToken, unittest.equals('foo')); |
729 unittest.expect(o.nextLink, unittest.equals('foo')); | 729 unittest.expect(o.nextLink, unittest.equals('foo')); |
730 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 730 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
731 unittest.expect(o.selfLink, unittest.equals('foo')); | 731 unittest.expect(o.selfLink, unittest.equals('foo')); |
732 } | 732 } |
733 buildCounterChangeList--; | 733 buildCounterChangeList--; |
734 } | 734 } |
735 | 735 |
736 buildUnnamed651() { | 736 buildUnnamed656() { |
737 var o = new core.Map<core.String, core.String>(); | 737 var o = new core.Map<core.String, core.String>(); |
738 o["x"] = "foo"; | 738 o["x"] = "foo"; |
739 o["y"] = "foo"; | 739 o["y"] = "foo"; |
740 return o; | 740 return o; |
741 } | 741 } |
742 | 742 |
743 checkUnnamed651(core.Map<core.String, core.String> o) { | 743 checkUnnamed656(core.Map<core.String, core.String> o) { |
744 unittest.expect(o, unittest.hasLength(2)); | 744 unittest.expect(o, unittest.hasLength(2)); |
745 unittest.expect(o["x"], unittest.equals('foo')); | 745 unittest.expect(o["x"], unittest.equals('foo')); |
746 unittest.expect(o["y"], unittest.equals('foo')); | 746 unittest.expect(o["y"], unittest.equals('foo')); |
747 } | 747 } |
748 | 748 |
749 core.int buildCounterChannel = 0; | 749 core.int buildCounterChannel = 0; |
750 buildChannel() { | 750 buildChannel() { |
751 var o = new api.Channel(); | 751 var o = new api.Channel(); |
752 buildCounterChannel++; | 752 buildCounterChannel++; |
753 if (buildCounterChannel < 3) { | 753 if (buildCounterChannel < 3) { |
754 o.address = "foo"; | 754 o.address = "foo"; |
755 o.expiration = "foo"; | 755 o.expiration = "foo"; |
756 o.id = "foo"; | 756 o.id = "foo"; |
757 o.kind = "foo"; | 757 o.kind = "foo"; |
758 o.params = buildUnnamed651(); | 758 o.params = buildUnnamed656(); |
759 o.payload = true; | 759 o.payload = true; |
760 o.resourceId = "foo"; | 760 o.resourceId = "foo"; |
761 o.resourceUri = "foo"; | 761 o.resourceUri = "foo"; |
762 o.token = "foo"; | 762 o.token = "foo"; |
763 o.type = "foo"; | 763 o.type = "foo"; |
764 } | 764 } |
765 buildCounterChannel--; | 765 buildCounterChannel--; |
766 return o; | 766 return o; |
767 } | 767 } |
768 | 768 |
769 checkChannel(api.Channel o) { | 769 checkChannel(api.Channel o) { |
770 buildCounterChannel++; | 770 buildCounterChannel++; |
771 if (buildCounterChannel < 3) { | 771 if (buildCounterChannel < 3) { |
772 unittest.expect(o.address, unittest.equals('foo')); | 772 unittest.expect(o.address, unittest.equals('foo')); |
773 unittest.expect(o.expiration, unittest.equals('foo')); | 773 unittest.expect(o.expiration, unittest.equals('foo')); |
774 unittest.expect(o.id, unittest.equals('foo')); | 774 unittest.expect(o.id, unittest.equals('foo')); |
775 unittest.expect(o.kind, unittest.equals('foo')); | 775 unittest.expect(o.kind, unittest.equals('foo')); |
776 checkUnnamed651(o.params); | 776 checkUnnamed656(o.params); |
777 unittest.expect(o.payload, unittest.isTrue); | 777 unittest.expect(o.payload, unittest.isTrue); |
778 unittest.expect(o.resourceId, unittest.equals('foo')); | 778 unittest.expect(o.resourceId, unittest.equals('foo')); |
779 unittest.expect(o.resourceUri, unittest.equals('foo')); | 779 unittest.expect(o.resourceUri, unittest.equals('foo')); |
780 unittest.expect(o.token, unittest.equals('foo')); | 780 unittest.expect(o.token, unittest.equals('foo')); |
781 unittest.expect(o.type, unittest.equals('foo')); | 781 unittest.expect(o.type, unittest.equals('foo')); |
782 } | 782 } |
783 buildCounterChannel--; | 783 buildCounterChannel--; |
784 } | 784 } |
785 | 785 |
786 buildUnnamed652() { | 786 buildUnnamed657() { |
787 var o = new core.List<api.ChildReference>(); | 787 var o = new core.List<api.ChildReference>(); |
788 o.add(buildChildReference()); | 788 o.add(buildChildReference()); |
789 o.add(buildChildReference()); | 789 o.add(buildChildReference()); |
790 return o; | 790 return o; |
791 } | 791 } |
792 | 792 |
793 checkUnnamed652(core.List<api.ChildReference> o) { | 793 checkUnnamed657(core.List<api.ChildReference> o) { |
794 unittest.expect(o, unittest.hasLength(2)); | 794 unittest.expect(o, unittest.hasLength(2)); |
795 checkChildReference(o[0]); | 795 checkChildReference(o[0]); |
796 checkChildReference(o[1]); | 796 checkChildReference(o[1]); |
797 } | 797 } |
798 | 798 |
799 core.int buildCounterChildList = 0; | 799 core.int buildCounterChildList = 0; |
800 buildChildList() { | 800 buildChildList() { |
801 var o = new api.ChildList(); | 801 var o = new api.ChildList(); |
802 buildCounterChildList++; | 802 buildCounterChildList++; |
803 if (buildCounterChildList < 3) { | 803 if (buildCounterChildList < 3) { |
804 o.etag = "foo"; | 804 o.etag = "foo"; |
805 o.items = buildUnnamed652(); | 805 o.items = buildUnnamed657(); |
806 o.kind = "foo"; | 806 o.kind = "foo"; |
807 o.nextLink = "foo"; | 807 o.nextLink = "foo"; |
808 o.nextPageToken = "foo"; | 808 o.nextPageToken = "foo"; |
809 o.selfLink = "foo"; | 809 o.selfLink = "foo"; |
810 } | 810 } |
811 buildCounterChildList--; | 811 buildCounterChildList--; |
812 return o; | 812 return o; |
813 } | 813 } |
814 | 814 |
815 checkChildList(api.ChildList o) { | 815 checkChildList(api.ChildList o) { |
816 buildCounterChildList++; | 816 buildCounterChildList++; |
817 if (buildCounterChildList < 3) { | 817 if (buildCounterChildList < 3) { |
818 unittest.expect(o.etag, unittest.equals('foo')); | 818 unittest.expect(o.etag, unittest.equals('foo')); |
819 checkUnnamed652(o.items); | 819 checkUnnamed657(o.items); |
820 unittest.expect(o.kind, unittest.equals('foo')); | 820 unittest.expect(o.kind, unittest.equals('foo')); |
821 unittest.expect(o.nextLink, unittest.equals('foo')); | 821 unittest.expect(o.nextLink, unittest.equals('foo')); |
822 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 822 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
823 unittest.expect(o.selfLink, unittest.equals('foo')); | 823 unittest.expect(o.selfLink, unittest.equals('foo')); |
824 } | 824 } |
825 buildCounterChildList--; | 825 buildCounterChildList--; |
826 } | 826 } |
827 | 827 |
828 core.int buildCounterChildReference = 0; | 828 core.int buildCounterChildReference = 0; |
829 buildChildReference() { | 829 buildChildReference() { |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
864 | 864 |
865 checkCommentContext(api.CommentContext o) { | 865 checkCommentContext(api.CommentContext o) { |
866 buildCounterCommentContext++; | 866 buildCounterCommentContext++; |
867 if (buildCounterCommentContext < 3) { | 867 if (buildCounterCommentContext < 3) { |
868 unittest.expect(o.type, unittest.equals('foo')); | 868 unittest.expect(o.type, unittest.equals('foo')); |
869 unittest.expect(o.value, unittest.equals('foo')); | 869 unittest.expect(o.value, unittest.equals('foo')); |
870 } | 870 } |
871 buildCounterCommentContext--; | 871 buildCounterCommentContext--; |
872 } | 872 } |
873 | 873 |
874 buildUnnamed653() { | 874 buildUnnamed658() { |
875 var o = new core.List<api.CommentReply>(); | 875 var o = new core.List<api.CommentReply>(); |
876 o.add(buildCommentReply()); | 876 o.add(buildCommentReply()); |
877 o.add(buildCommentReply()); | 877 o.add(buildCommentReply()); |
878 return o; | 878 return o; |
879 } | 879 } |
880 | 880 |
881 checkUnnamed653(core.List<api.CommentReply> o) { | 881 checkUnnamed658(core.List<api.CommentReply> o) { |
882 unittest.expect(o, unittest.hasLength(2)); | 882 unittest.expect(o, unittest.hasLength(2)); |
883 checkCommentReply(o[0]); | 883 checkCommentReply(o[0]); |
884 checkCommentReply(o[1]); | 884 checkCommentReply(o[1]); |
885 } | 885 } |
886 | 886 |
887 core.int buildCounterComment = 0; | 887 core.int buildCounterComment = 0; |
888 buildComment() { | 888 buildComment() { |
889 var o = new api.Comment(); | 889 var o = new api.Comment(); |
890 buildCounterComment++; | 890 buildCounterComment++; |
891 if (buildCounterComment < 3) { | 891 if (buildCounterComment < 3) { |
892 o.anchor = "foo"; | 892 o.anchor = "foo"; |
893 o.author = buildUser(); | 893 o.author = buildUser(); |
894 o.commentId = "foo"; | 894 o.commentId = "foo"; |
895 o.content = "foo"; | 895 o.content = "foo"; |
896 o.context = buildCommentContext(); | 896 o.context = buildCommentContext(); |
897 o.createdDate = core.DateTime.parse("2002-02-27T14:01:02"); | 897 o.createdDate = core.DateTime.parse("2002-02-27T14:01:02"); |
898 o.deleted = true; | 898 o.deleted = true; |
899 o.fileId = "foo"; | 899 o.fileId = "foo"; |
900 o.fileTitle = "foo"; | 900 o.fileTitle = "foo"; |
901 o.htmlContent = "foo"; | 901 o.htmlContent = "foo"; |
902 o.kind = "foo"; | 902 o.kind = "foo"; |
903 o.modifiedDate = core.DateTime.parse("2002-02-27T14:01:02"); | 903 o.modifiedDate = core.DateTime.parse("2002-02-27T14:01:02"); |
904 o.replies = buildUnnamed653(); | 904 o.replies = buildUnnamed658(); |
905 o.selfLink = "foo"; | 905 o.selfLink = "foo"; |
906 o.status = "foo"; | 906 o.status = "foo"; |
907 } | 907 } |
908 buildCounterComment--; | 908 buildCounterComment--; |
909 return o; | 909 return o; |
910 } | 910 } |
911 | 911 |
912 checkComment(api.Comment o) { | 912 checkComment(api.Comment o) { |
913 buildCounterComment++; | 913 buildCounterComment++; |
914 if (buildCounterComment < 3) { | 914 if (buildCounterComment < 3) { |
915 unittest.expect(o.anchor, unittest.equals('foo')); | 915 unittest.expect(o.anchor, unittest.equals('foo')); |
916 checkUser(o.author); | 916 checkUser(o.author); |
917 unittest.expect(o.commentId, unittest.equals('foo')); | 917 unittest.expect(o.commentId, unittest.equals('foo')); |
918 unittest.expect(o.content, unittest.equals('foo')); | 918 unittest.expect(o.content, unittest.equals('foo')); |
919 checkCommentContext(o.context); | 919 checkCommentContext(o.context); |
920 unittest.expect(o.createdDate, unittest.equals(core.DateTime.parse("2002-02-
27T14:01:02"))); | 920 unittest.expect(o.createdDate, unittest.equals(core.DateTime.parse("2002-02-
27T14:01:02"))); |
921 unittest.expect(o.deleted, unittest.isTrue); | 921 unittest.expect(o.deleted, unittest.isTrue); |
922 unittest.expect(o.fileId, unittest.equals('foo')); | 922 unittest.expect(o.fileId, unittest.equals('foo')); |
923 unittest.expect(o.fileTitle, unittest.equals('foo')); | 923 unittest.expect(o.fileTitle, unittest.equals('foo')); |
924 unittest.expect(o.htmlContent, unittest.equals('foo')); | 924 unittest.expect(o.htmlContent, unittest.equals('foo')); |
925 unittest.expect(o.kind, unittest.equals('foo')); | 925 unittest.expect(o.kind, unittest.equals('foo')); |
926 unittest.expect(o.modifiedDate, unittest.equals(core.DateTime.parse("2002-02
-27T14:01:02"))); | 926 unittest.expect(o.modifiedDate, unittest.equals(core.DateTime.parse("2002-02
-27T14:01:02"))); |
927 checkUnnamed653(o.replies); | 927 checkUnnamed658(o.replies); |
928 unittest.expect(o.selfLink, unittest.equals('foo')); | 928 unittest.expect(o.selfLink, unittest.equals('foo')); |
929 unittest.expect(o.status, unittest.equals('foo')); | 929 unittest.expect(o.status, unittest.equals('foo')); |
930 } | 930 } |
931 buildCounterComment--; | 931 buildCounterComment--; |
932 } | 932 } |
933 | 933 |
934 buildUnnamed654() { | 934 buildUnnamed659() { |
935 var o = new core.List<api.Comment>(); | 935 var o = new core.List<api.Comment>(); |
936 o.add(buildComment()); | 936 o.add(buildComment()); |
937 o.add(buildComment()); | 937 o.add(buildComment()); |
938 return o; | 938 return o; |
939 } | 939 } |
940 | 940 |
941 checkUnnamed654(core.List<api.Comment> o) { | 941 checkUnnamed659(core.List<api.Comment> o) { |
942 unittest.expect(o, unittest.hasLength(2)); | 942 unittest.expect(o, unittest.hasLength(2)); |
943 checkComment(o[0]); | 943 checkComment(o[0]); |
944 checkComment(o[1]); | 944 checkComment(o[1]); |
945 } | 945 } |
946 | 946 |
947 core.int buildCounterCommentList = 0; | 947 core.int buildCounterCommentList = 0; |
948 buildCommentList() { | 948 buildCommentList() { |
949 var o = new api.CommentList(); | 949 var o = new api.CommentList(); |
950 buildCounterCommentList++; | 950 buildCounterCommentList++; |
951 if (buildCounterCommentList < 3) { | 951 if (buildCounterCommentList < 3) { |
952 o.items = buildUnnamed654(); | 952 o.items = buildUnnamed659(); |
953 o.kind = "foo"; | 953 o.kind = "foo"; |
954 o.nextLink = "foo"; | 954 o.nextLink = "foo"; |
955 o.nextPageToken = "foo"; | 955 o.nextPageToken = "foo"; |
956 o.selfLink = "foo"; | 956 o.selfLink = "foo"; |
957 } | 957 } |
958 buildCounterCommentList--; | 958 buildCounterCommentList--; |
959 return o; | 959 return o; |
960 } | 960 } |
961 | 961 |
962 checkCommentList(api.CommentList o) { | 962 checkCommentList(api.CommentList o) { |
963 buildCounterCommentList++; | 963 buildCounterCommentList++; |
964 if (buildCounterCommentList < 3) { | 964 if (buildCounterCommentList < 3) { |
965 checkUnnamed654(o.items); | 965 checkUnnamed659(o.items); |
966 unittest.expect(o.kind, unittest.equals('foo')); | 966 unittest.expect(o.kind, unittest.equals('foo')); |
967 unittest.expect(o.nextLink, unittest.equals('foo')); | 967 unittest.expect(o.nextLink, unittest.equals('foo')); |
968 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 968 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
969 unittest.expect(o.selfLink, unittest.equals('foo')); | 969 unittest.expect(o.selfLink, unittest.equals('foo')); |
970 } | 970 } |
971 buildCounterCommentList--; | 971 buildCounterCommentList--; |
972 } | 972 } |
973 | 973 |
974 core.int buildCounterCommentReply = 0; | 974 core.int buildCounterCommentReply = 0; |
975 buildCommentReply() { | 975 buildCommentReply() { |
(...skipping 23 matching lines...) Expand all Loading... |
999 unittest.expect(o.deleted, unittest.isTrue); | 999 unittest.expect(o.deleted, unittest.isTrue); |
1000 unittest.expect(o.htmlContent, unittest.equals('foo')); | 1000 unittest.expect(o.htmlContent, unittest.equals('foo')); |
1001 unittest.expect(o.kind, unittest.equals('foo')); | 1001 unittest.expect(o.kind, unittest.equals('foo')); |
1002 unittest.expect(o.modifiedDate, unittest.equals(core.DateTime.parse("2002-02
-27T14:01:02"))); | 1002 unittest.expect(o.modifiedDate, unittest.equals(core.DateTime.parse("2002-02
-27T14:01:02"))); |
1003 unittest.expect(o.replyId, unittest.equals('foo')); | 1003 unittest.expect(o.replyId, unittest.equals('foo')); |
1004 unittest.expect(o.verb, unittest.equals('foo')); | 1004 unittest.expect(o.verb, unittest.equals('foo')); |
1005 } | 1005 } |
1006 buildCounterCommentReply--; | 1006 buildCounterCommentReply--; |
1007 } | 1007 } |
1008 | 1008 |
1009 buildUnnamed655() { | 1009 buildUnnamed660() { |
1010 var o = new core.List<api.CommentReply>(); | 1010 var o = new core.List<api.CommentReply>(); |
1011 o.add(buildCommentReply()); | 1011 o.add(buildCommentReply()); |
1012 o.add(buildCommentReply()); | 1012 o.add(buildCommentReply()); |
1013 return o; | 1013 return o; |
1014 } | 1014 } |
1015 | 1015 |
1016 checkUnnamed655(core.List<api.CommentReply> o) { | 1016 checkUnnamed660(core.List<api.CommentReply> o) { |
1017 unittest.expect(o, unittest.hasLength(2)); | 1017 unittest.expect(o, unittest.hasLength(2)); |
1018 checkCommentReply(o[0]); | 1018 checkCommentReply(o[0]); |
1019 checkCommentReply(o[1]); | 1019 checkCommentReply(o[1]); |
1020 } | 1020 } |
1021 | 1021 |
1022 core.int buildCounterCommentReplyList = 0; | 1022 core.int buildCounterCommentReplyList = 0; |
1023 buildCommentReplyList() { | 1023 buildCommentReplyList() { |
1024 var o = new api.CommentReplyList(); | 1024 var o = new api.CommentReplyList(); |
1025 buildCounterCommentReplyList++; | 1025 buildCounterCommentReplyList++; |
1026 if (buildCounterCommentReplyList < 3) { | 1026 if (buildCounterCommentReplyList < 3) { |
1027 o.items = buildUnnamed655(); | 1027 o.items = buildUnnamed660(); |
1028 o.kind = "foo"; | 1028 o.kind = "foo"; |
1029 o.nextLink = "foo"; | 1029 o.nextLink = "foo"; |
1030 o.nextPageToken = "foo"; | 1030 o.nextPageToken = "foo"; |
1031 o.selfLink = "foo"; | 1031 o.selfLink = "foo"; |
1032 } | 1032 } |
1033 buildCounterCommentReplyList--; | 1033 buildCounterCommentReplyList--; |
1034 return o; | 1034 return o; |
1035 } | 1035 } |
1036 | 1036 |
1037 checkCommentReplyList(api.CommentReplyList o) { | 1037 checkCommentReplyList(api.CommentReplyList o) { |
1038 buildCounterCommentReplyList++; | 1038 buildCounterCommentReplyList++; |
1039 if (buildCounterCommentReplyList < 3) { | 1039 if (buildCounterCommentReplyList < 3) { |
1040 checkUnnamed655(o.items); | 1040 checkUnnamed660(o.items); |
1041 unittest.expect(o.kind, unittest.equals('foo')); | 1041 unittest.expect(o.kind, unittest.equals('foo')); |
1042 unittest.expect(o.nextLink, unittest.equals('foo')); | 1042 unittest.expect(o.nextLink, unittest.equals('foo')); |
1043 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 1043 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
1044 unittest.expect(o.selfLink, unittest.equals('foo')); | 1044 unittest.expect(o.selfLink, unittest.equals('foo')); |
1045 } | 1045 } |
1046 buildCounterCommentReplyList--; | 1046 buildCounterCommentReplyList--; |
1047 } | 1047 } |
1048 | 1048 |
1049 core.int buildCounterFileCapabilities = 0; | 1049 core.int buildCounterFileCapabilities = 0; |
1050 buildFileCapabilities() { | 1050 buildFileCapabilities() { |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1090 unittest.expect(o.canReadTeamDrive, unittest.isTrue); | 1090 unittest.expect(o.canReadTeamDrive, unittest.isTrue); |
1091 unittest.expect(o.canRemoveChildren, unittest.isTrue); | 1091 unittest.expect(o.canRemoveChildren, unittest.isTrue); |
1092 unittest.expect(o.canRename, unittest.isTrue); | 1092 unittest.expect(o.canRename, unittest.isTrue); |
1093 unittest.expect(o.canShare, unittest.isTrue); | 1093 unittest.expect(o.canShare, unittest.isTrue); |
1094 unittest.expect(o.canTrash, unittest.isTrue); | 1094 unittest.expect(o.canTrash, unittest.isTrue); |
1095 unittest.expect(o.canUntrash, unittest.isTrue); | 1095 unittest.expect(o.canUntrash, unittest.isTrue); |
1096 } | 1096 } |
1097 buildCounterFileCapabilities--; | 1097 buildCounterFileCapabilities--; |
1098 } | 1098 } |
1099 | 1099 |
1100 buildUnnamed656() { | 1100 buildUnnamed661() { |
1101 var o = new core.Map<core.String, core.String>(); | 1101 var o = new core.Map<core.String, core.String>(); |
1102 o["x"] = "foo"; | 1102 o["x"] = "foo"; |
1103 o["y"] = "foo"; | 1103 o["y"] = "foo"; |
1104 return o; | 1104 return o; |
1105 } | 1105 } |
1106 | 1106 |
1107 checkUnnamed656(core.Map<core.String, core.String> o) { | 1107 checkUnnamed661(core.Map<core.String, core.String> o) { |
1108 unittest.expect(o, unittest.hasLength(2)); | 1108 unittest.expect(o, unittest.hasLength(2)); |
1109 unittest.expect(o["x"], unittest.equals('foo')); | 1109 unittest.expect(o["x"], unittest.equals('foo')); |
1110 unittest.expect(o["y"], unittest.equals('foo')); | 1110 unittest.expect(o["y"], unittest.equals('foo')); |
1111 } | 1111 } |
1112 | 1112 |
1113 core.int buildCounterFileImageMediaMetadataLocation = 0; | 1113 core.int buildCounterFileImageMediaMetadataLocation = 0; |
1114 buildFileImageMediaMetadataLocation() { | 1114 buildFileImageMediaMetadataLocation() { |
1115 var o = new api.FileImageMediaMetadataLocation(); | 1115 var o = new api.FileImageMediaMetadataLocation(); |
1116 buildCounterFileImageMediaMetadataLocation++; | 1116 buildCounterFileImageMediaMetadataLocation++; |
1117 if (buildCounterFileImageMediaMetadataLocation < 3) { | 1117 if (buildCounterFileImageMediaMetadataLocation < 3) { |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1233 unittest.expect(o.hidden, unittest.isTrue); | 1233 unittest.expect(o.hidden, unittest.isTrue); |
1234 unittest.expect(o.modified, unittest.isTrue); | 1234 unittest.expect(o.modified, unittest.isTrue); |
1235 unittest.expect(o.restricted, unittest.isTrue); | 1235 unittest.expect(o.restricted, unittest.isTrue); |
1236 unittest.expect(o.starred, unittest.isTrue); | 1236 unittest.expect(o.starred, unittest.isTrue); |
1237 unittest.expect(o.trashed, unittest.isTrue); | 1237 unittest.expect(o.trashed, unittest.isTrue); |
1238 unittest.expect(o.viewed, unittest.isTrue); | 1238 unittest.expect(o.viewed, unittest.isTrue); |
1239 } | 1239 } |
1240 buildCounterFileLabels--; | 1240 buildCounterFileLabels--; |
1241 } | 1241 } |
1242 | 1242 |
1243 buildUnnamed657() { | 1243 buildUnnamed662() { |
1244 var o = new core.Map<core.String, core.String>(); | 1244 var o = new core.Map<core.String, core.String>(); |
1245 o["x"] = "foo"; | 1245 o["x"] = "foo"; |
1246 o["y"] = "foo"; | 1246 o["y"] = "foo"; |
1247 return o; | 1247 return o; |
1248 } | 1248 } |
1249 | 1249 |
1250 checkUnnamed657(core.Map<core.String, core.String> o) { | 1250 checkUnnamed662(core.Map<core.String, core.String> o) { |
1251 unittest.expect(o, unittest.hasLength(2)); | 1251 unittest.expect(o, unittest.hasLength(2)); |
1252 unittest.expect(o["x"], unittest.equals('foo')); | 1252 unittest.expect(o["x"], unittest.equals('foo')); |
1253 unittest.expect(o["y"], unittest.equals('foo')); | 1253 unittest.expect(o["y"], unittest.equals('foo')); |
1254 } | 1254 } |
1255 | 1255 |
1256 buildUnnamed658() { | |
1257 var o = new core.List<core.String>(); | |
1258 o.add("foo"); | |
1259 o.add("foo"); | |
1260 return o; | |
1261 } | |
1262 | |
1263 checkUnnamed658(core.List<core.String> o) { | |
1264 unittest.expect(o, unittest.hasLength(2)); | |
1265 unittest.expect(o[0], unittest.equals('foo')); | |
1266 unittest.expect(o[1], unittest.equals('foo')); | |
1267 } | |
1268 | |
1269 buildUnnamed659() { | |
1270 var o = new core.List<api.User>(); | |
1271 o.add(buildUser()); | |
1272 o.add(buildUser()); | |
1273 return o; | |
1274 } | |
1275 | |
1276 checkUnnamed659(core.List<api.User> o) { | |
1277 unittest.expect(o, unittest.hasLength(2)); | |
1278 checkUser(o[0]); | |
1279 checkUser(o[1]); | |
1280 } | |
1281 | |
1282 buildUnnamed660() { | |
1283 var o = new core.List<api.ParentReference>(); | |
1284 o.add(buildParentReference()); | |
1285 o.add(buildParentReference()); | |
1286 return o; | |
1287 } | |
1288 | |
1289 checkUnnamed660(core.List<api.ParentReference> o) { | |
1290 unittest.expect(o, unittest.hasLength(2)); | |
1291 checkParentReference(o[0]); | |
1292 checkParentReference(o[1]); | |
1293 } | |
1294 | |
1295 buildUnnamed661() { | |
1296 var o = new core.List<api.Permission>(); | |
1297 o.add(buildPermission()); | |
1298 o.add(buildPermission()); | |
1299 return o; | |
1300 } | |
1301 | |
1302 checkUnnamed661(core.List<api.Permission> o) { | |
1303 unittest.expect(o, unittest.hasLength(2)); | |
1304 checkPermission(o[0]); | |
1305 checkPermission(o[1]); | |
1306 } | |
1307 | |
1308 buildUnnamed662() { | |
1309 var o = new core.List<api.Property>(); | |
1310 o.add(buildProperty()); | |
1311 o.add(buildProperty()); | |
1312 return o; | |
1313 } | |
1314 | |
1315 checkUnnamed662(core.List<api.Property> o) { | |
1316 unittest.expect(o, unittest.hasLength(2)); | |
1317 checkProperty(o[0]); | |
1318 checkProperty(o[1]); | |
1319 } | |
1320 | |
1321 buildUnnamed663() { | 1256 buildUnnamed663() { |
1322 var o = new core.List<core.String>(); | 1257 var o = new core.List<core.String>(); |
1323 o.add("foo"); | 1258 o.add("foo"); |
1324 o.add("foo"); | 1259 o.add("foo"); |
1325 return o; | 1260 return o; |
1326 } | 1261 } |
1327 | 1262 |
1328 checkUnnamed663(core.List<core.String> o) { | 1263 checkUnnamed663(core.List<core.String> o) { |
1329 unittest.expect(o, unittest.hasLength(2)); | 1264 unittest.expect(o, unittest.hasLength(2)); |
1330 unittest.expect(o[0], unittest.equals('foo')); | 1265 unittest.expect(o[0], unittest.equals('foo')); |
1331 unittest.expect(o[1], unittest.equals('foo')); | 1266 unittest.expect(o[1], unittest.equals('foo')); |
| 1267 } |
| 1268 |
| 1269 buildUnnamed664() { |
| 1270 var o = new core.List<api.User>(); |
| 1271 o.add(buildUser()); |
| 1272 o.add(buildUser()); |
| 1273 return o; |
| 1274 } |
| 1275 |
| 1276 checkUnnamed664(core.List<api.User> o) { |
| 1277 unittest.expect(o, unittest.hasLength(2)); |
| 1278 checkUser(o[0]); |
| 1279 checkUser(o[1]); |
| 1280 } |
| 1281 |
| 1282 buildUnnamed665() { |
| 1283 var o = new core.List<api.ParentReference>(); |
| 1284 o.add(buildParentReference()); |
| 1285 o.add(buildParentReference()); |
| 1286 return o; |
| 1287 } |
| 1288 |
| 1289 checkUnnamed665(core.List<api.ParentReference> o) { |
| 1290 unittest.expect(o, unittest.hasLength(2)); |
| 1291 checkParentReference(o[0]); |
| 1292 checkParentReference(o[1]); |
| 1293 } |
| 1294 |
| 1295 buildUnnamed666() { |
| 1296 var o = new core.List<api.Permission>(); |
| 1297 o.add(buildPermission()); |
| 1298 o.add(buildPermission()); |
| 1299 return o; |
| 1300 } |
| 1301 |
| 1302 checkUnnamed666(core.List<api.Permission> o) { |
| 1303 unittest.expect(o, unittest.hasLength(2)); |
| 1304 checkPermission(o[0]); |
| 1305 checkPermission(o[1]); |
| 1306 } |
| 1307 |
| 1308 buildUnnamed667() { |
| 1309 var o = new core.List<api.Property>(); |
| 1310 o.add(buildProperty()); |
| 1311 o.add(buildProperty()); |
| 1312 return o; |
| 1313 } |
| 1314 |
| 1315 checkUnnamed667(core.List<api.Property> o) { |
| 1316 unittest.expect(o, unittest.hasLength(2)); |
| 1317 checkProperty(o[0]); |
| 1318 checkProperty(o[1]); |
| 1319 } |
| 1320 |
| 1321 buildUnnamed668() { |
| 1322 var o = new core.List<core.String>(); |
| 1323 o.add("foo"); |
| 1324 o.add("foo"); |
| 1325 return o; |
| 1326 } |
| 1327 |
| 1328 checkUnnamed668(core.List<core.String> o) { |
| 1329 unittest.expect(o, unittest.hasLength(2)); |
| 1330 unittest.expect(o[0], unittest.equals('foo')); |
| 1331 unittest.expect(o[1], unittest.equals('foo')); |
1332 } | 1332 } |
1333 | 1333 |
1334 core.int buildCounterFileThumbnail = 0; | 1334 core.int buildCounterFileThumbnail = 0; |
1335 buildFileThumbnail() { | 1335 buildFileThumbnail() { |
1336 var o = new api.FileThumbnail(); | 1336 var o = new api.FileThumbnail(); |
1337 buildCounterFileThumbnail++; | 1337 buildCounterFileThumbnail++; |
1338 if (buildCounterFileThumbnail < 3) { | 1338 if (buildCounterFileThumbnail < 3) { |
1339 o.image = "foo"; | 1339 o.image = "foo"; |
1340 o.mimeType = "foo"; | 1340 o.mimeType = "foo"; |
1341 } | 1341 } |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1387 o.capabilities = buildFileCapabilities(); | 1387 o.capabilities = buildFileCapabilities(); |
1388 o.copyable = true; | 1388 o.copyable = true; |
1389 o.createdDate = core.DateTime.parse("2002-02-27T14:01:02"); | 1389 o.createdDate = core.DateTime.parse("2002-02-27T14:01:02"); |
1390 o.defaultOpenWithLink = "foo"; | 1390 o.defaultOpenWithLink = "foo"; |
1391 o.description = "foo"; | 1391 o.description = "foo"; |
1392 o.downloadUrl = "foo"; | 1392 o.downloadUrl = "foo"; |
1393 o.editable = true; | 1393 o.editable = true; |
1394 o.embedLink = "foo"; | 1394 o.embedLink = "foo"; |
1395 o.etag = "foo"; | 1395 o.etag = "foo"; |
1396 o.explicitlyTrashed = true; | 1396 o.explicitlyTrashed = true; |
1397 o.exportLinks = buildUnnamed656(); | 1397 o.exportLinks = buildUnnamed661(); |
1398 o.fileExtension = "foo"; | 1398 o.fileExtension = "foo"; |
1399 o.fileSize = "foo"; | 1399 o.fileSize = "foo"; |
1400 o.folderColorRgb = "foo"; | 1400 o.folderColorRgb = "foo"; |
1401 o.fullFileExtension = "foo"; | 1401 o.fullFileExtension = "foo"; |
1402 o.hasAugmentedPermissions = true; | 1402 o.hasAugmentedPermissions = true; |
1403 o.hasThumbnail = true; | 1403 o.hasThumbnail = true; |
1404 o.headRevisionId = "foo"; | 1404 o.headRevisionId = "foo"; |
1405 o.iconLink = "foo"; | 1405 o.iconLink = "foo"; |
1406 o.id = "foo"; | 1406 o.id = "foo"; |
1407 o.imageMediaMetadata = buildFileImageMediaMetadata(); | 1407 o.imageMediaMetadata = buildFileImageMediaMetadata(); |
1408 o.indexableText = buildFileIndexableText(); | 1408 o.indexableText = buildFileIndexableText(); |
1409 o.isAppAuthorized = true; | 1409 o.isAppAuthorized = true; |
1410 o.kind = "foo"; | 1410 o.kind = "foo"; |
1411 o.labels = buildFileLabels(); | 1411 o.labels = buildFileLabels(); |
1412 o.lastModifyingUser = buildUser(); | 1412 o.lastModifyingUser = buildUser(); |
1413 o.lastModifyingUserName = "foo"; | 1413 o.lastModifyingUserName = "foo"; |
1414 o.lastViewedByMeDate = core.DateTime.parse("2002-02-27T14:01:02"); | 1414 o.lastViewedByMeDate = core.DateTime.parse("2002-02-27T14:01:02"); |
1415 o.markedViewedByMeDate = core.DateTime.parse("2002-02-27T14:01:02"); | 1415 o.markedViewedByMeDate = core.DateTime.parse("2002-02-27T14:01:02"); |
1416 o.md5Checksum = "foo"; | 1416 o.md5Checksum = "foo"; |
1417 o.mimeType = "foo"; | 1417 o.mimeType = "foo"; |
1418 o.modifiedByMeDate = core.DateTime.parse("2002-02-27T14:01:02"); | 1418 o.modifiedByMeDate = core.DateTime.parse("2002-02-27T14:01:02"); |
1419 o.modifiedDate = core.DateTime.parse("2002-02-27T14:01:02"); | 1419 o.modifiedDate = core.DateTime.parse("2002-02-27T14:01:02"); |
1420 o.openWithLinks = buildUnnamed657(); | 1420 o.openWithLinks = buildUnnamed662(); |
1421 o.originalFilename = "foo"; | 1421 o.originalFilename = "foo"; |
1422 o.ownedByMe = true; | 1422 o.ownedByMe = true; |
1423 o.ownerNames = buildUnnamed658(); | 1423 o.ownerNames = buildUnnamed663(); |
1424 o.owners = buildUnnamed659(); | 1424 o.owners = buildUnnamed664(); |
1425 o.parents = buildUnnamed660(); | 1425 o.parents = buildUnnamed665(); |
1426 o.permissions = buildUnnamed661(); | 1426 o.permissions = buildUnnamed666(); |
1427 o.properties = buildUnnamed662(); | 1427 o.properties = buildUnnamed667(); |
1428 o.quotaBytesUsed = "foo"; | 1428 o.quotaBytesUsed = "foo"; |
1429 o.selfLink = "foo"; | 1429 o.selfLink = "foo"; |
1430 o.shareable = true; | 1430 o.shareable = true; |
1431 o.shared = true; | 1431 o.shared = true; |
1432 o.sharedWithMeDate = core.DateTime.parse("2002-02-27T14:01:02"); | 1432 o.sharedWithMeDate = core.DateTime.parse("2002-02-27T14:01:02"); |
1433 o.sharingUser = buildUser(); | 1433 o.sharingUser = buildUser(); |
1434 o.spaces = buildUnnamed663(); | 1434 o.spaces = buildUnnamed668(); |
1435 o.teamDriveId = "foo"; | 1435 o.teamDriveId = "foo"; |
1436 o.thumbnail = buildFileThumbnail(); | 1436 o.thumbnail = buildFileThumbnail(); |
1437 o.thumbnailLink = "foo"; | 1437 o.thumbnailLink = "foo"; |
1438 o.thumbnailVersion = "foo"; | 1438 o.thumbnailVersion = "foo"; |
1439 o.title = "foo"; | 1439 o.title = "foo"; |
1440 o.trashedDate = core.DateTime.parse("2002-02-27T14:01:02"); | 1440 o.trashedDate = core.DateTime.parse("2002-02-27T14:01:02"); |
1441 o.trashingUser = buildUser(); | 1441 o.trashingUser = buildUser(); |
1442 o.userPermission = buildPermission(); | 1442 o.userPermission = buildPermission(); |
1443 o.version = "foo"; | 1443 o.version = "foo"; |
1444 o.videoMediaMetadata = buildFileVideoMediaMetadata(); | 1444 o.videoMediaMetadata = buildFileVideoMediaMetadata(); |
(...skipping 15 matching lines...) Expand all Loading... |
1460 checkFileCapabilities(o.capabilities); | 1460 checkFileCapabilities(o.capabilities); |
1461 unittest.expect(o.copyable, unittest.isTrue); | 1461 unittest.expect(o.copyable, unittest.isTrue); |
1462 unittest.expect(o.createdDate, unittest.equals(core.DateTime.parse("2002-02-
27T14:01:02"))); | 1462 unittest.expect(o.createdDate, unittest.equals(core.DateTime.parse("2002-02-
27T14:01:02"))); |
1463 unittest.expect(o.defaultOpenWithLink, unittest.equals('foo')); | 1463 unittest.expect(o.defaultOpenWithLink, unittest.equals('foo')); |
1464 unittest.expect(o.description, unittest.equals('foo')); | 1464 unittest.expect(o.description, unittest.equals('foo')); |
1465 unittest.expect(o.downloadUrl, unittest.equals('foo')); | 1465 unittest.expect(o.downloadUrl, unittest.equals('foo')); |
1466 unittest.expect(o.editable, unittest.isTrue); | 1466 unittest.expect(o.editable, unittest.isTrue); |
1467 unittest.expect(o.embedLink, unittest.equals('foo')); | 1467 unittest.expect(o.embedLink, unittest.equals('foo')); |
1468 unittest.expect(o.etag, unittest.equals('foo')); | 1468 unittest.expect(o.etag, unittest.equals('foo')); |
1469 unittest.expect(o.explicitlyTrashed, unittest.isTrue); | 1469 unittest.expect(o.explicitlyTrashed, unittest.isTrue); |
1470 checkUnnamed656(o.exportLinks); | 1470 checkUnnamed661(o.exportLinks); |
1471 unittest.expect(o.fileExtension, unittest.equals('foo')); | 1471 unittest.expect(o.fileExtension, unittest.equals('foo')); |
1472 unittest.expect(o.fileSize, unittest.equals('foo')); | 1472 unittest.expect(o.fileSize, unittest.equals('foo')); |
1473 unittest.expect(o.folderColorRgb, unittest.equals('foo')); | 1473 unittest.expect(o.folderColorRgb, unittest.equals('foo')); |
1474 unittest.expect(o.fullFileExtension, unittest.equals('foo')); | 1474 unittest.expect(o.fullFileExtension, unittest.equals('foo')); |
1475 unittest.expect(o.hasAugmentedPermissions, unittest.isTrue); | 1475 unittest.expect(o.hasAugmentedPermissions, unittest.isTrue); |
1476 unittest.expect(o.hasThumbnail, unittest.isTrue); | 1476 unittest.expect(o.hasThumbnail, unittest.isTrue); |
1477 unittest.expect(o.headRevisionId, unittest.equals('foo')); | 1477 unittest.expect(o.headRevisionId, unittest.equals('foo')); |
1478 unittest.expect(o.iconLink, unittest.equals('foo')); | 1478 unittest.expect(o.iconLink, unittest.equals('foo')); |
1479 unittest.expect(o.id, unittest.equals('foo')); | 1479 unittest.expect(o.id, unittest.equals('foo')); |
1480 checkFileImageMediaMetadata(o.imageMediaMetadata); | 1480 checkFileImageMediaMetadata(o.imageMediaMetadata); |
1481 checkFileIndexableText(o.indexableText); | 1481 checkFileIndexableText(o.indexableText); |
1482 unittest.expect(o.isAppAuthorized, unittest.isTrue); | 1482 unittest.expect(o.isAppAuthorized, unittest.isTrue); |
1483 unittest.expect(o.kind, unittest.equals('foo')); | 1483 unittest.expect(o.kind, unittest.equals('foo')); |
1484 checkFileLabels(o.labels); | 1484 checkFileLabels(o.labels); |
1485 checkUser(o.lastModifyingUser); | 1485 checkUser(o.lastModifyingUser); |
1486 unittest.expect(o.lastModifyingUserName, unittest.equals('foo')); | 1486 unittest.expect(o.lastModifyingUserName, unittest.equals('foo')); |
1487 unittest.expect(o.lastViewedByMeDate, unittest.equals(core.DateTime.parse("2
002-02-27T14:01:02"))); | 1487 unittest.expect(o.lastViewedByMeDate, unittest.equals(core.DateTime.parse("2
002-02-27T14:01:02"))); |
1488 unittest.expect(o.markedViewedByMeDate, unittest.equals(core.DateTime.parse(
"2002-02-27T14:01:02"))); | 1488 unittest.expect(o.markedViewedByMeDate, unittest.equals(core.DateTime.parse(
"2002-02-27T14:01:02"))); |
1489 unittest.expect(o.md5Checksum, unittest.equals('foo')); | 1489 unittest.expect(o.md5Checksum, unittest.equals('foo')); |
1490 unittest.expect(o.mimeType, unittest.equals('foo')); | 1490 unittest.expect(o.mimeType, unittest.equals('foo')); |
1491 unittest.expect(o.modifiedByMeDate, unittest.equals(core.DateTime.parse("200
2-02-27T14:01:02"))); | 1491 unittest.expect(o.modifiedByMeDate, unittest.equals(core.DateTime.parse("200
2-02-27T14:01:02"))); |
1492 unittest.expect(o.modifiedDate, unittest.equals(core.DateTime.parse("2002-02
-27T14:01:02"))); | 1492 unittest.expect(o.modifiedDate, unittest.equals(core.DateTime.parse("2002-02
-27T14:01:02"))); |
1493 checkUnnamed657(o.openWithLinks); | 1493 checkUnnamed662(o.openWithLinks); |
1494 unittest.expect(o.originalFilename, unittest.equals('foo')); | 1494 unittest.expect(o.originalFilename, unittest.equals('foo')); |
1495 unittest.expect(o.ownedByMe, unittest.isTrue); | 1495 unittest.expect(o.ownedByMe, unittest.isTrue); |
1496 checkUnnamed658(o.ownerNames); | 1496 checkUnnamed663(o.ownerNames); |
1497 checkUnnamed659(o.owners); | 1497 checkUnnamed664(o.owners); |
1498 checkUnnamed660(o.parents); | 1498 checkUnnamed665(o.parents); |
1499 checkUnnamed661(o.permissions); | 1499 checkUnnamed666(o.permissions); |
1500 checkUnnamed662(o.properties); | 1500 checkUnnamed667(o.properties); |
1501 unittest.expect(o.quotaBytesUsed, unittest.equals('foo')); | 1501 unittest.expect(o.quotaBytesUsed, unittest.equals('foo')); |
1502 unittest.expect(o.selfLink, unittest.equals('foo')); | 1502 unittest.expect(o.selfLink, unittest.equals('foo')); |
1503 unittest.expect(o.shareable, unittest.isTrue); | 1503 unittest.expect(o.shareable, unittest.isTrue); |
1504 unittest.expect(o.shared, unittest.isTrue); | 1504 unittest.expect(o.shared, unittest.isTrue); |
1505 unittest.expect(o.sharedWithMeDate, unittest.equals(core.DateTime.parse("200
2-02-27T14:01:02"))); | 1505 unittest.expect(o.sharedWithMeDate, unittest.equals(core.DateTime.parse("200
2-02-27T14:01:02"))); |
1506 checkUser(o.sharingUser); | 1506 checkUser(o.sharingUser); |
1507 checkUnnamed663(o.spaces); | 1507 checkUnnamed668(o.spaces); |
1508 unittest.expect(o.teamDriveId, unittest.equals('foo')); | 1508 unittest.expect(o.teamDriveId, unittest.equals('foo')); |
1509 checkFileThumbnail(o.thumbnail); | 1509 checkFileThumbnail(o.thumbnail); |
1510 unittest.expect(o.thumbnailLink, unittest.equals('foo')); | 1510 unittest.expect(o.thumbnailLink, unittest.equals('foo')); |
1511 unittest.expect(o.thumbnailVersion, unittest.equals('foo')); | 1511 unittest.expect(o.thumbnailVersion, unittest.equals('foo')); |
1512 unittest.expect(o.title, unittest.equals('foo')); | 1512 unittest.expect(o.title, unittest.equals('foo')); |
1513 unittest.expect(o.trashedDate, unittest.equals(core.DateTime.parse("2002-02-
27T14:01:02"))); | 1513 unittest.expect(o.trashedDate, unittest.equals(core.DateTime.parse("2002-02-
27T14:01:02"))); |
1514 checkUser(o.trashingUser); | 1514 checkUser(o.trashingUser); |
1515 checkPermission(o.userPermission); | 1515 checkPermission(o.userPermission); |
1516 unittest.expect(o.version, unittest.equals('foo')); | 1516 unittest.expect(o.version, unittest.equals('foo')); |
1517 checkFileVideoMediaMetadata(o.videoMediaMetadata); | 1517 checkFileVideoMediaMetadata(o.videoMediaMetadata); |
1518 unittest.expect(o.webContentLink, unittest.equals('foo')); | 1518 unittest.expect(o.webContentLink, unittest.equals('foo')); |
1519 unittest.expect(o.webViewLink, unittest.equals('foo')); | 1519 unittest.expect(o.webViewLink, unittest.equals('foo')); |
1520 unittest.expect(o.writersCanShare, unittest.isTrue); | 1520 unittest.expect(o.writersCanShare, unittest.isTrue); |
1521 } | 1521 } |
1522 buildCounterFile--; | 1522 buildCounterFile--; |
1523 } | 1523 } |
1524 | 1524 |
1525 buildUnnamed664() { | 1525 buildUnnamed669() { |
1526 var o = new core.List<api.File>(); | 1526 var o = new core.List<api.File>(); |
1527 o.add(buildFile()); | 1527 o.add(buildFile()); |
1528 o.add(buildFile()); | 1528 o.add(buildFile()); |
1529 return o; | 1529 return o; |
1530 } | 1530 } |
1531 | 1531 |
1532 checkUnnamed664(core.List<api.File> o) { | 1532 checkUnnamed669(core.List<api.File> o) { |
1533 unittest.expect(o, unittest.hasLength(2)); | 1533 unittest.expect(o, unittest.hasLength(2)); |
1534 checkFile(o[0]); | 1534 checkFile(o[0]); |
1535 checkFile(o[1]); | 1535 checkFile(o[1]); |
1536 } | 1536 } |
1537 | 1537 |
1538 core.int buildCounterFileList = 0; | 1538 core.int buildCounterFileList = 0; |
1539 buildFileList() { | 1539 buildFileList() { |
1540 var o = new api.FileList(); | 1540 var o = new api.FileList(); |
1541 buildCounterFileList++; | 1541 buildCounterFileList++; |
1542 if (buildCounterFileList < 3) { | 1542 if (buildCounterFileList < 3) { |
1543 o.etag = "foo"; | 1543 o.etag = "foo"; |
1544 o.incompleteSearch = true; | 1544 o.incompleteSearch = true; |
1545 o.items = buildUnnamed664(); | 1545 o.items = buildUnnamed669(); |
1546 o.kind = "foo"; | 1546 o.kind = "foo"; |
1547 o.nextLink = "foo"; | 1547 o.nextLink = "foo"; |
1548 o.nextPageToken = "foo"; | 1548 o.nextPageToken = "foo"; |
1549 o.selfLink = "foo"; | 1549 o.selfLink = "foo"; |
1550 } | 1550 } |
1551 buildCounterFileList--; | 1551 buildCounterFileList--; |
1552 return o; | 1552 return o; |
1553 } | 1553 } |
1554 | 1554 |
1555 checkFileList(api.FileList o) { | 1555 checkFileList(api.FileList o) { |
1556 buildCounterFileList++; | 1556 buildCounterFileList++; |
1557 if (buildCounterFileList < 3) { | 1557 if (buildCounterFileList < 3) { |
1558 unittest.expect(o.etag, unittest.equals('foo')); | 1558 unittest.expect(o.etag, unittest.equals('foo')); |
1559 unittest.expect(o.incompleteSearch, unittest.isTrue); | 1559 unittest.expect(o.incompleteSearch, unittest.isTrue); |
1560 checkUnnamed664(o.items); | 1560 checkUnnamed669(o.items); |
1561 unittest.expect(o.kind, unittest.equals('foo')); | 1561 unittest.expect(o.kind, unittest.equals('foo')); |
1562 unittest.expect(o.nextLink, unittest.equals('foo')); | 1562 unittest.expect(o.nextLink, unittest.equals('foo')); |
1563 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 1563 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
1564 unittest.expect(o.selfLink, unittest.equals('foo')); | 1564 unittest.expect(o.selfLink, unittest.equals('foo')); |
1565 } | 1565 } |
1566 buildCounterFileList--; | 1566 buildCounterFileList--; |
1567 } | 1567 } |
1568 | 1568 |
1569 buildUnnamed665() { | 1569 buildUnnamed670() { |
1570 var o = new core.List<core.String>(); | 1570 var o = new core.List<core.String>(); |
1571 o.add("foo"); | 1571 o.add("foo"); |
1572 o.add("foo"); | 1572 o.add("foo"); |
1573 return o; | 1573 return o; |
1574 } | 1574 } |
1575 | 1575 |
1576 checkUnnamed665(core.List<core.String> o) { | 1576 checkUnnamed670(core.List<core.String> o) { |
1577 unittest.expect(o, unittest.hasLength(2)); | 1577 unittest.expect(o, unittest.hasLength(2)); |
1578 unittest.expect(o[0], unittest.equals('foo')); | 1578 unittest.expect(o[0], unittest.equals('foo')); |
1579 unittest.expect(o[1], unittest.equals('foo')); | 1579 unittest.expect(o[1], unittest.equals('foo')); |
1580 } | 1580 } |
1581 | 1581 |
1582 core.int buildCounterGeneratedIds = 0; | 1582 core.int buildCounterGeneratedIds = 0; |
1583 buildGeneratedIds() { | 1583 buildGeneratedIds() { |
1584 var o = new api.GeneratedIds(); | 1584 var o = new api.GeneratedIds(); |
1585 buildCounterGeneratedIds++; | 1585 buildCounterGeneratedIds++; |
1586 if (buildCounterGeneratedIds < 3) { | 1586 if (buildCounterGeneratedIds < 3) { |
1587 o.ids = buildUnnamed665(); | 1587 o.ids = buildUnnamed670(); |
1588 o.kind = "foo"; | 1588 o.kind = "foo"; |
1589 o.space = "foo"; | 1589 o.space = "foo"; |
1590 } | 1590 } |
1591 buildCounterGeneratedIds--; | 1591 buildCounterGeneratedIds--; |
1592 return o; | 1592 return o; |
1593 } | 1593 } |
1594 | 1594 |
1595 checkGeneratedIds(api.GeneratedIds o) { | 1595 checkGeneratedIds(api.GeneratedIds o) { |
1596 buildCounterGeneratedIds++; | 1596 buildCounterGeneratedIds++; |
1597 if (buildCounterGeneratedIds < 3) { | 1597 if (buildCounterGeneratedIds < 3) { |
1598 checkUnnamed665(o.ids); | 1598 checkUnnamed670(o.ids); |
1599 unittest.expect(o.kind, unittest.equals('foo')); | 1599 unittest.expect(o.kind, unittest.equals('foo')); |
1600 unittest.expect(o.space, unittest.equals('foo')); | 1600 unittest.expect(o.space, unittest.equals('foo')); |
1601 } | 1601 } |
1602 buildCounterGeneratedIds--; | 1602 buildCounterGeneratedIds--; |
1603 } | 1603 } |
1604 | 1604 |
1605 buildUnnamed666() { | 1605 buildUnnamed671() { |
1606 var o = new core.List<api.ParentReference>(); | 1606 var o = new core.List<api.ParentReference>(); |
1607 o.add(buildParentReference()); | 1607 o.add(buildParentReference()); |
1608 o.add(buildParentReference()); | 1608 o.add(buildParentReference()); |
1609 return o; | 1609 return o; |
1610 } | 1610 } |
1611 | 1611 |
1612 checkUnnamed666(core.List<api.ParentReference> o) { | 1612 checkUnnamed671(core.List<api.ParentReference> o) { |
1613 unittest.expect(o, unittest.hasLength(2)); | 1613 unittest.expect(o, unittest.hasLength(2)); |
1614 checkParentReference(o[0]); | 1614 checkParentReference(o[0]); |
1615 checkParentReference(o[1]); | 1615 checkParentReference(o[1]); |
1616 } | 1616 } |
1617 | 1617 |
1618 core.int buildCounterParentList = 0; | 1618 core.int buildCounterParentList = 0; |
1619 buildParentList() { | 1619 buildParentList() { |
1620 var o = new api.ParentList(); | 1620 var o = new api.ParentList(); |
1621 buildCounterParentList++; | 1621 buildCounterParentList++; |
1622 if (buildCounterParentList < 3) { | 1622 if (buildCounterParentList < 3) { |
1623 o.etag = "foo"; | 1623 o.etag = "foo"; |
1624 o.items = buildUnnamed666(); | 1624 o.items = buildUnnamed671(); |
1625 o.kind = "foo"; | 1625 o.kind = "foo"; |
1626 o.selfLink = "foo"; | 1626 o.selfLink = "foo"; |
1627 } | 1627 } |
1628 buildCounterParentList--; | 1628 buildCounterParentList--; |
1629 return o; | 1629 return o; |
1630 } | 1630 } |
1631 | 1631 |
1632 checkParentList(api.ParentList o) { | 1632 checkParentList(api.ParentList o) { |
1633 buildCounterParentList++; | 1633 buildCounterParentList++; |
1634 if (buildCounterParentList < 3) { | 1634 if (buildCounterParentList < 3) { |
1635 unittest.expect(o.etag, unittest.equals('foo')); | 1635 unittest.expect(o.etag, unittest.equals('foo')); |
1636 checkUnnamed666(o.items); | 1636 checkUnnamed671(o.items); |
1637 unittest.expect(o.kind, unittest.equals('foo')); | 1637 unittest.expect(o.kind, unittest.equals('foo')); |
1638 unittest.expect(o.selfLink, unittest.equals('foo')); | 1638 unittest.expect(o.selfLink, unittest.equals('foo')); |
1639 } | 1639 } |
1640 buildCounterParentList--; | 1640 buildCounterParentList--; |
1641 } | 1641 } |
1642 | 1642 |
1643 core.int buildCounterParentReference = 0; | 1643 core.int buildCounterParentReference = 0; |
1644 buildParentReference() { | 1644 buildParentReference() { |
1645 var o = new api.ParentReference(); | 1645 var o = new api.ParentReference(); |
1646 buildCounterParentReference++; | 1646 buildCounterParentReference++; |
(...skipping 13 matching lines...) Expand all Loading... |
1660 if (buildCounterParentReference < 3) { | 1660 if (buildCounterParentReference < 3) { |
1661 unittest.expect(o.id, unittest.equals('foo')); | 1661 unittest.expect(o.id, unittest.equals('foo')); |
1662 unittest.expect(o.isRoot, unittest.isTrue); | 1662 unittest.expect(o.isRoot, unittest.isTrue); |
1663 unittest.expect(o.kind, unittest.equals('foo')); | 1663 unittest.expect(o.kind, unittest.equals('foo')); |
1664 unittest.expect(o.parentLink, unittest.equals('foo')); | 1664 unittest.expect(o.parentLink, unittest.equals('foo')); |
1665 unittest.expect(o.selfLink, unittest.equals('foo')); | 1665 unittest.expect(o.selfLink, unittest.equals('foo')); |
1666 } | 1666 } |
1667 buildCounterParentReference--; | 1667 buildCounterParentReference--; |
1668 } | 1668 } |
1669 | 1669 |
1670 buildUnnamed667() { | 1670 buildUnnamed672() { |
1671 var o = new core.List<core.String>(); | 1671 var o = new core.List<core.String>(); |
1672 o.add("foo"); | 1672 o.add("foo"); |
1673 o.add("foo"); | 1673 o.add("foo"); |
1674 return o; | 1674 return o; |
1675 } | 1675 } |
1676 | 1676 |
1677 checkUnnamed667(core.List<core.String> o) { | 1677 checkUnnamed672(core.List<core.String> o) { |
1678 unittest.expect(o, unittest.hasLength(2)); | 1678 unittest.expect(o, unittest.hasLength(2)); |
1679 unittest.expect(o[0], unittest.equals('foo')); | 1679 unittest.expect(o[0], unittest.equals('foo')); |
1680 unittest.expect(o[1], unittest.equals('foo')); | 1680 unittest.expect(o[1], unittest.equals('foo')); |
1681 } | 1681 } |
1682 | 1682 |
1683 buildUnnamed668() { | 1683 buildUnnamed673() { |
1684 var o = new core.List<core.String>(); | 1684 var o = new core.List<core.String>(); |
1685 o.add("foo"); | 1685 o.add("foo"); |
1686 o.add("foo"); | 1686 o.add("foo"); |
1687 return o; | 1687 return o; |
1688 } | 1688 } |
1689 | 1689 |
1690 checkUnnamed668(core.List<core.String> o) { | 1690 checkUnnamed673(core.List<core.String> o) { |
1691 unittest.expect(o, unittest.hasLength(2)); | 1691 unittest.expect(o, unittest.hasLength(2)); |
1692 unittest.expect(o[0], unittest.equals('foo')); | 1692 unittest.expect(o[0], unittest.equals('foo')); |
1693 unittest.expect(o[1], unittest.equals('foo')); | 1693 unittest.expect(o[1], unittest.equals('foo')); |
1694 } | 1694 } |
1695 | 1695 |
1696 core.int buildCounterPermissionTeamDrivePermissionDetails = 0; | 1696 core.int buildCounterPermissionTeamDrivePermissionDetails = 0; |
1697 buildPermissionTeamDrivePermissionDetails() { | 1697 buildPermissionTeamDrivePermissionDetails() { |
1698 var o = new api.PermissionTeamDrivePermissionDetails(); | 1698 var o = new api.PermissionTeamDrivePermissionDetails(); |
1699 buildCounterPermissionTeamDrivePermissionDetails++; | 1699 buildCounterPermissionTeamDrivePermissionDetails++; |
1700 if (buildCounterPermissionTeamDrivePermissionDetails < 3) { | 1700 if (buildCounterPermissionTeamDrivePermissionDetails < 3) { |
1701 o.additionalRoles = buildUnnamed668(); | 1701 o.additionalRoles = buildUnnamed673(); |
1702 o.inherited = true; | 1702 o.inherited = true; |
1703 o.inheritedFrom = "foo"; | 1703 o.inheritedFrom = "foo"; |
1704 o.role = "foo"; | 1704 o.role = "foo"; |
1705 o.teamDrivePermissionType = "foo"; | 1705 o.teamDrivePermissionType = "foo"; |
1706 } | 1706 } |
1707 buildCounterPermissionTeamDrivePermissionDetails--; | 1707 buildCounterPermissionTeamDrivePermissionDetails--; |
1708 return o; | 1708 return o; |
1709 } | 1709 } |
1710 | 1710 |
1711 checkPermissionTeamDrivePermissionDetails(api.PermissionTeamDrivePermissionDetai
ls o) { | 1711 checkPermissionTeamDrivePermissionDetails(api.PermissionTeamDrivePermissionDetai
ls o) { |
1712 buildCounterPermissionTeamDrivePermissionDetails++; | 1712 buildCounterPermissionTeamDrivePermissionDetails++; |
1713 if (buildCounterPermissionTeamDrivePermissionDetails < 3) { | 1713 if (buildCounterPermissionTeamDrivePermissionDetails < 3) { |
1714 checkUnnamed668(o.additionalRoles); | 1714 checkUnnamed673(o.additionalRoles); |
1715 unittest.expect(o.inherited, unittest.isTrue); | 1715 unittest.expect(o.inherited, unittest.isTrue); |
1716 unittest.expect(o.inheritedFrom, unittest.equals('foo')); | 1716 unittest.expect(o.inheritedFrom, unittest.equals('foo')); |
1717 unittest.expect(o.role, unittest.equals('foo')); | 1717 unittest.expect(o.role, unittest.equals('foo')); |
1718 unittest.expect(o.teamDrivePermissionType, unittest.equals('foo')); | 1718 unittest.expect(o.teamDrivePermissionType, unittest.equals('foo')); |
1719 } | 1719 } |
1720 buildCounterPermissionTeamDrivePermissionDetails--; | 1720 buildCounterPermissionTeamDrivePermissionDetails--; |
1721 } | 1721 } |
1722 | 1722 |
1723 buildUnnamed669() { | 1723 buildUnnamed674() { |
1724 var o = new core.List<api.PermissionTeamDrivePermissionDetails>(); | 1724 var o = new core.List<api.PermissionTeamDrivePermissionDetails>(); |
1725 o.add(buildPermissionTeamDrivePermissionDetails()); | 1725 o.add(buildPermissionTeamDrivePermissionDetails()); |
1726 o.add(buildPermissionTeamDrivePermissionDetails()); | 1726 o.add(buildPermissionTeamDrivePermissionDetails()); |
1727 return o; | 1727 return o; |
1728 } | 1728 } |
1729 | 1729 |
1730 checkUnnamed669(core.List<api.PermissionTeamDrivePermissionDetails> o) { | 1730 checkUnnamed674(core.List<api.PermissionTeamDrivePermissionDetails> o) { |
1731 unittest.expect(o, unittest.hasLength(2)); | 1731 unittest.expect(o, unittest.hasLength(2)); |
1732 checkPermissionTeamDrivePermissionDetails(o[0]); | 1732 checkPermissionTeamDrivePermissionDetails(o[0]); |
1733 checkPermissionTeamDrivePermissionDetails(o[1]); | 1733 checkPermissionTeamDrivePermissionDetails(o[1]); |
1734 } | 1734 } |
1735 | 1735 |
1736 core.int buildCounterPermission = 0; | 1736 core.int buildCounterPermission = 0; |
1737 buildPermission() { | 1737 buildPermission() { |
1738 var o = new api.Permission(); | 1738 var o = new api.Permission(); |
1739 buildCounterPermission++; | 1739 buildCounterPermission++; |
1740 if (buildCounterPermission < 3) { | 1740 if (buildCounterPermission < 3) { |
1741 o.additionalRoles = buildUnnamed667(); | 1741 o.additionalRoles = buildUnnamed672(); |
1742 o.authKey = "foo"; | 1742 o.authKey = "foo"; |
1743 o.deleted = true; | 1743 o.deleted = true; |
1744 o.domain = "foo"; | 1744 o.domain = "foo"; |
1745 o.emailAddress = "foo"; | 1745 o.emailAddress = "foo"; |
1746 o.etag = "foo"; | 1746 o.etag = "foo"; |
1747 o.expirationDate = core.DateTime.parse("2002-02-27T14:01:02"); | 1747 o.expirationDate = core.DateTime.parse("2002-02-27T14:01:02"); |
1748 o.id = "foo"; | 1748 o.id = "foo"; |
1749 o.kind = "foo"; | 1749 o.kind = "foo"; |
1750 o.name = "foo"; | 1750 o.name = "foo"; |
1751 o.photoLink = "foo"; | 1751 o.photoLink = "foo"; |
1752 o.role = "foo"; | 1752 o.role = "foo"; |
1753 o.selfLink = "foo"; | 1753 o.selfLink = "foo"; |
1754 o.teamDrivePermissionDetails = buildUnnamed669(); | 1754 o.teamDrivePermissionDetails = buildUnnamed674(); |
1755 o.type = "foo"; | 1755 o.type = "foo"; |
1756 o.value = "foo"; | 1756 o.value = "foo"; |
1757 o.withLink = true; | 1757 o.withLink = true; |
1758 } | 1758 } |
1759 buildCounterPermission--; | 1759 buildCounterPermission--; |
1760 return o; | 1760 return o; |
1761 } | 1761 } |
1762 | 1762 |
1763 checkPermission(api.Permission o) { | 1763 checkPermission(api.Permission o) { |
1764 buildCounterPermission++; | 1764 buildCounterPermission++; |
1765 if (buildCounterPermission < 3) { | 1765 if (buildCounterPermission < 3) { |
1766 checkUnnamed667(o.additionalRoles); | 1766 checkUnnamed672(o.additionalRoles); |
1767 unittest.expect(o.authKey, unittest.equals('foo')); | 1767 unittest.expect(o.authKey, unittest.equals('foo')); |
1768 unittest.expect(o.deleted, unittest.isTrue); | 1768 unittest.expect(o.deleted, unittest.isTrue); |
1769 unittest.expect(o.domain, unittest.equals('foo')); | 1769 unittest.expect(o.domain, unittest.equals('foo')); |
1770 unittest.expect(o.emailAddress, unittest.equals('foo')); | 1770 unittest.expect(o.emailAddress, unittest.equals('foo')); |
1771 unittest.expect(o.etag, unittest.equals('foo')); | 1771 unittest.expect(o.etag, unittest.equals('foo')); |
1772 unittest.expect(o.expirationDate, unittest.equals(core.DateTime.parse("2002-
02-27T14:01:02"))); | 1772 unittest.expect(o.expirationDate, unittest.equals(core.DateTime.parse("2002-
02-27T14:01:02"))); |
1773 unittest.expect(o.id, unittest.equals('foo')); | 1773 unittest.expect(o.id, unittest.equals('foo')); |
1774 unittest.expect(o.kind, unittest.equals('foo')); | 1774 unittest.expect(o.kind, unittest.equals('foo')); |
1775 unittest.expect(o.name, unittest.equals('foo')); | 1775 unittest.expect(o.name, unittest.equals('foo')); |
1776 unittest.expect(o.photoLink, unittest.equals('foo')); | 1776 unittest.expect(o.photoLink, unittest.equals('foo')); |
1777 unittest.expect(o.role, unittest.equals('foo')); | 1777 unittest.expect(o.role, unittest.equals('foo')); |
1778 unittest.expect(o.selfLink, unittest.equals('foo')); | 1778 unittest.expect(o.selfLink, unittest.equals('foo')); |
1779 checkUnnamed669(o.teamDrivePermissionDetails); | 1779 checkUnnamed674(o.teamDrivePermissionDetails); |
1780 unittest.expect(o.type, unittest.equals('foo')); | 1780 unittest.expect(o.type, unittest.equals('foo')); |
1781 unittest.expect(o.value, unittest.equals('foo')); | 1781 unittest.expect(o.value, unittest.equals('foo')); |
1782 unittest.expect(o.withLink, unittest.isTrue); | 1782 unittest.expect(o.withLink, unittest.isTrue); |
1783 } | 1783 } |
1784 buildCounterPermission--; | 1784 buildCounterPermission--; |
1785 } | 1785 } |
1786 | 1786 |
1787 core.int buildCounterPermissionId = 0; | 1787 core.int buildCounterPermissionId = 0; |
1788 buildPermissionId() { | 1788 buildPermissionId() { |
1789 var o = new api.PermissionId(); | 1789 var o = new api.PermissionId(); |
1790 buildCounterPermissionId++; | 1790 buildCounterPermissionId++; |
1791 if (buildCounterPermissionId < 3) { | 1791 if (buildCounterPermissionId < 3) { |
1792 o.id = "foo"; | 1792 o.id = "foo"; |
1793 o.kind = "foo"; | 1793 o.kind = "foo"; |
1794 } | 1794 } |
1795 buildCounterPermissionId--; | 1795 buildCounterPermissionId--; |
1796 return o; | 1796 return o; |
1797 } | 1797 } |
1798 | 1798 |
1799 checkPermissionId(api.PermissionId o) { | 1799 checkPermissionId(api.PermissionId o) { |
1800 buildCounterPermissionId++; | 1800 buildCounterPermissionId++; |
1801 if (buildCounterPermissionId < 3) { | 1801 if (buildCounterPermissionId < 3) { |
1802 unittest.expect(o.id, unittest.equals('foo')); | 1802 unittest.expect(o.id, unittest.equals('foo')); |
1803 unittest.expect(o.kind, unittest.equals('foo')); | 1803 unittest.expect(o.kind, unittest.equals('foo')); |
1804 } | 1804 } |
1805 buildCounterPermissionId--; | 1805 buildCounterPermissionId--; |
1806 } | 1806 } |
1807 | 1807 |
1808 buildUnnamed670() { | 1808 buildUnnamed675() { |
1809 var o = new core.List<api.Permission>(); | 1809 var o = new core.List<api.Permission>(); |
1810 o.add(buildPermission()); | 1810 o.add(buildPermission()); |
1811 o.add(buildPermission()); | 1811 o.add(buildPermission()); |
1812 return o; | 1812 return o; |
1813 } | 1813 } |
1814 | 1814 |
1815 checkUnnamed670(core.List<api.Permission> o) { | 1815 checkUnnamed675(core.List<api.Permission> o) { |
1816 unittest.expect(o, unittest.hasLength(2)); | 1816 unittest.expect(o, unittest.hasLength(2)); |
1817 checkPermission(o[0]); | 1817 checkPermission(o[0]); |
1818 checkPermission(o[1]); | 1818 checkPermission(o[1]); |
1819 } | 1819 } |
1820 | 1820 |
1821 core.int buildCounterPermissionList = 0; | 1821 core.int buildCounterPermissionList = 0; |
1822 buildPermissionList() { | 1822 buildPermissionList() { |
1823 var o = new api.PermissionList(); | 1823 var o = new api.PermissionList(); |
1824 buildCounterPermissionList++; | 1824 buildCounterPermissionList++; |
1825 if (buildCounterPermissionList < 3) { | 1825 if (buildCounterPermissionList < 3) { |
1826 o.etag = "foo"; | 1826 o.etag = "foo"; |
1827 o.items = buildUnnamed670(); | 1827 o.items = buildUnnamed675(); |
1828 o.kind = "foo"; | 1828 o.kind = "foo"; |
1829 o.nextPageToken = "foo"; | 1829 o.nextPageToken = "foo"; |
1830 o.selfLink = "foo"; | 1830 o.selfLink = "foo"; |
1831 } | 1831 } |
1832 buildCounterPermissionList--; | 1832 buildCounterPermissionList--; |
1833 return o; | 1833 return o; |
1834 } | 1834 } |
1835 | 1835 |
1836 checkPermissionList(api.PermissionList o) { | 1836 checkPermissionList(api.PermissionList o) { |
1837 buildCounterPermissionList++; | 1837 buildCounterPermissionList++; |
1838 if (buildCounterPermissionList < 3) { | 1838 if (buildCounterPermissionList < 3) { |
1839 unittest.expect(o.etag, unittest.equals('foo')); | 1839 unittest.expect(o.etag, unittest.equals('foo')); |
1840 checkUnnamed670(o.items); | 1840 checkUnnamed675(o.items); |
1841 unittest.expect(o.kind, unittest.equals('foo')); | 1841 unittest.expect(o.kind, unittest.equals('foo')); |
1842 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 1842 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
1843 unittest.expect(o.selfLink, unittest.equals('foo')); | 1843 unittest.expect(o.selfLink, unittest.equals('foo')); |
1844 } | 1844 } |
1845 buildCounterPermissionList--; | 1845 buildCounterPermissionList--; |
1846 } | 1846 } |
1847 | 1847 |
1848 core.int buildCounterProperty = 0; | 1848 core.int buildCounterProperty = 0; |
1849 buildProperty() { | 1849 buildProperty() { |
1850 var o = new api.Property(); | 1850 var o = new api.Property(); |
(...skipping 16 matching lines...) Expand all Loading... |
1867 unittest.expect(o.etag, unittest.equals('foo')); | 1867 unittest.expect(o.etag, unittest.equals('foo')); |
1868 unittest.expect(o.key, unittest.equals('foo')); | 1868 unittest.expect(o.key, unittest.equals('foo')); |
1869 unittest.expect(o.kind, unittest.equals('foo')); | 1869 unittest.expect(o.kind, unittest.equals('foo')); |
1870 unittest.expect(o.selfLink, unittest.equals('foo')); | 1870 unittest.expect(o.selfLink, unittest.equals('foo')); |
1871 unittest.expect(o.value, unittest.equals('foo')); | 1871 unittest.expect(o.value, unittest.equals('foo')); |
1872 unittest.expect(o.visibility, unittest.equals('foo')); | 1872 unittest.expect(o.visibility, unittest.equals('foo')); |
1873 } | 1873 } |
1874 buildCounterProperty--; | 1874 buildCounterProperty--; |
1875 } | 1875 } |
1876 | 1876 |
1877 buildUnnamed671() { | 1877 buildUnnamed676() { |
1878 var o = new core.List<api.Property>(); | 1878 var o = new core.List<api.Property>(); |
1879 o.add(buildProperty()); | 1879 o.add(buildProperty()); |
1880 o.add(buildProperty()); | 1880 o.add(buildProperty()); |
1881 return o; | 1881 return o; |
1882 } | 1882 } |
1883 | 1883 |
1884 checkUnnamed671(core.List<api.Property> o) { | 1884 checkUnnamed676(core.List<api.Property> o) { |
1885 unittest.expect(o, unittest.hasLength(2)); | 1885 unittest.expect(o, unittest.hasLength(2)); |
1886 checkProperty(o[0]); | 1886 checkProperty(o[0]); |
1887 checkProperty(o[1]); | 1887 checkProperty(o[1]); |
1888 } | 1888 } |
1889 | 1889 |
1890 core.int buildCounterPropertyList = 0; | 1890 core.int buildCounterPropertyList = 0; |
1891 buildPropertyList() { | 1891 buildPropertyList() { |
1892 var o = new api.PropertyList(); | 1892 var o = new api.PropertyList(); |
1893 buildCounterPropertyList++; | 1893 buildCounterPropertyList++; |
1894 if (buildCounterPropertyList < 3) { | 1894 if (buildCounterPropertyList < 3) { |
1895 o.etag = "foo"; | 1895 o.etag = "foo"; |
1896 o.items = buildUnnamed671(); | 1896 o.items = buildUnnamed676(); |
1897 o.kind = "foo"; | 1897 o.kind = "foo"; |
1898 o.selfLink = "foo"; | 1898 o.selfLink = "foo"; |
1899 } | 1899 } |
1900 buildCounterPropertyList--; | 1900 buildCounterPropertyList--; |
1901 return o; | 1901 return o; |
1902 } | 1902 } |
1903 | 1903 |
1904 checkPropertyList(api.PropertyList o) { | 1904 checkPropertyList(api.PropertyList o) { |
1905 buildCounterPropertyList++; | 1905 buildCounterPropertyList++; |
1906 if (buildCounterPropertyList < 3) { | 1906 if (buildCounterPropertyList < 3) { |
1907 unittest.expect(o.etag, unittest.equals('foo')); | 1907 unittest.expect(o.etag, unittest.equals('foo')); |
1908 checkUnnamed671(o.items); | 1908 checkUnnamed676(o.items); |
1909 unittest.expect(o.kind, unittest.equals('foo')); | 1909 unittest.expect(o.kind, unittest.equals('foo')); |
1910 unittest.expect(o.selfLink, unittest.equals('foo')); | 1910 unittest.expect(o.selfLink, unittest.equals('foo')); |
1911 } | 1911 } |
1912 buildCounterPropertyList--; | 1912 buildCounterPropertyList--; |
1913 } | 1913 } |
1914 | 1914 |
1915 buildUnnamed672() { | 1915 buildUnnamed677() { |
1916 var o = new core.Map<core.String, core.String>(); | 1916 var o = new core.Map<core.String, core.String>(); |
1917 o["x"] = "foo"; | 1917 o["x"] = "foo"; |
1918 o["y"] = "foo"; | 1918 o["y"] = "foo"; |
1919 return o; | 1919 return o; |
1920 } | 1920 } |
1921 | 1921 |
1922 checkUnnamed672(core.Map<core.String, core.String> o) { | 1922 checkUnnamed677(core.Map<core.String, core.String> o) { |
1923 unittest.expect(o, unittest.hasLength(2)); | 1923 unittest.expect(o, unittest.hasLength(2)); |
1924 unittest.expect(o["x"], unittest.equals('foo')); | 1924 unittest.expect(o["x"], unittest.equals('foo')); |
1925 unittest.expect(o["y"], unittest.equals('foo')); | 1925 unittest.expect(o["y"], unittest.equals('foo')); |
1926 } | 1926 } |
1927 | 1927 |
1928 core.int buildCounterRevision = 0; | 1928 core.int buildCounterRevision = 0; |
1929 buildRevision() { | 1929 buildRevision() { |
1930 var o = new api.Revision(); | 1930 var o = new api.Revision(); |
1931 buildCounterRevision++; | 1931 buildCounterRevision++; |
1932 if (buildCounterRevision < 3) { | 1932 if (buildCounterRevision < 3) { |
1933 o.downloadUrl = "foo"; | 1933 o.downloadUrl = "foo"; |
1934 o.etag = "foo"; | 1934 o.etag = "foo"; |
1935 o.exportLinks = buildUnnamed672(); | 1935 o.exportLinks = buildUnnamed677(); |
1936 o.fileSize = "foo"; | 1936 o.fileSize = "foo"; |
1937 o.id = "foo"; | 1937 o.id = "foo"; |
1938 o.kind = "foo"; | 1938 o.kind = "foo"; |
1939 o.lastModifyingUser = buildUser(); | 1939 o.lastModifyingUser = buildUser(); |
1940 o.lastModifyingUserName = "foo"; | 1940 o.lastModifyingUserName = "foo"; |
1941 o.md5Checksum = "foo"; | 1941 o.md5Checksum = "foo"; |
1942 o.mimeType = "foo"; | 1942 o.mimeType = "foo"; |
1943 o.modifiedDate = core.DateTime.parse("2002-02-27T14:01:02"); | 1943 o.modifiedDate = core.DateTime.parse("2002-02-27T14:01:02"); |
1944 o.originalFilename = "foo"; | 1944 o.originalFilename = "foo"; |
1945 o.pinned = true; | 1945 o.pinned = true; |
1946 o.publishAuto = true; | 1946 o.publishAuto = true; |
1947 o.published = true; | 1947 o.published = true; |
1948 o.publishedLink = "foo"; | 1948 o.publishedLink = "foo"; |
1949 o.publishedOutsideDomain = true; | 1949 o.publishedOutsideDomain = true; |
1950 o.selfLink = "foo"; | 1950 o.selfLink = "foo"; |
1951 } | 1951 } |
1952 buildCounterRevision--; | 1952 buildCounterRevision--; |
1953 return o; | 1953 return o; |
1954 } | 1954 } |
1955 | 1955 |
1956 checkRevision(api.Revision o) { | 1956 checkRevision(api.Revision o) { |
1957 buildCounterRevision++; | 1957 buildCounterRevision++; |
1958 if (buildCounterRevision < 3) { | 1958 if (buildCounterRevision < 3) { |
1959 unittest.expect(o.downloadUrl, unittest.equals('foo')); | 1959 unittest.expect(o.downloadUrl, unittest.equals('foo')); |
1960 unittest.expect(o.etag, unittest.equals('foo')); | 1960 unittest.expect(o.etag, unittest.equals('foo')); |
1961 checkUnnamed672(o.exportLinks); | 1961 checkUnnamed677(o.exportLinks); |
1962 unittest.expect(o.fileSize, unittest.equals('foo')); | 1962 unittest.expect(o.fileSize, unittest.equals('foo')); |
1963 unittest.expect(o.id, unittest.equals('foo')); | 1963 unittest.expect(o.id, unittest.equals('foo')); |
1964 unittest.expect(o.kind, unittest.equals('foo')); | 1964 unittest.expect(o.kind, unittest.equals('foo')); |
1965 checkUser(o.lastModifyingUser); | 1965 checkUser(o.lastModifyingUser); |
1966 unittest.expect(o.lastModifyingUserName, unittest.equals('foo')); | 1966 unittest.expect(o.lastModifyingUserName, unittest.equals('foo')); |
1967 unittest.expect(o.md5Checksum, unittest.equals('foo')); | 1967 unittest.expect(o.md5Checksum, unittest.equals('foo')); |
1968 unittest.expect(o.mimeType, unittest.equals('foo')); | 1968 unittest.expect(o.mimeType, unittest.equals('foo')); |
1969 unittest.expect(o.modifiedDate, unittest.equals(core.DateTime.parse("2002-02
-27T14:01:02"))); | 1969 unittest.expect(o.modifiedDate, unittest.equals(core.DateTime.parse("2002-02
-27T14:01:02"))); |
1970 unittest.expect(o.originalFilename, unittest.equals('foo')); | 1970 unittest.expect(o.originalFilename, unittest.equals('foo')); |
1971 unittest.expect(o.pinned, unittest.isTrue); | 1971 unittest.expect(o.pinned, unittest.isTrue); |
1972 unittest.expect(o.publishAuto, unittest.isTrue); | 1972 unittest.expect(o.publishAuto, unittest.isTrue); |
1973 unittest.expect(o.published, unittest.isTrue); | 1973 unittest.expect(o.published, unittest.isTrue); |
1974 unittest.expect(o.publishedLink, unittest.equals('foo')); | 1974 unittest.expect(o.publishedLink, unittest.equals('foo')); |
1975 unittest.expect(o.publishedOutsideDomain, unittest.isTrue); | 1975 unittest.expect(o.publishedOutsideDomain, unittest.isTrue); |
1976 unittest.expect(o.selfLink, unittest.equals('foo')); | 1976 unittest.expect(o.selfLink, unittest.equals('foo')); |
1977 } | 1977 } |
1978 buildCounterRevision--; | 1978 buildCounterRevision--; |
1979 } | 1979 } |
1980 | 1980 |
1981 buildUnnamed673() { | 1981 buildUnnamed678() { |
1982 var o = new core.List<api.Revision>(); | 1982 var o = new core.List<api.Revision>(); |
1983 o.add(buildRevision()); | 1983 o.add(buildRevision()); |
1984 o.add(buildRevision()); | 1984 o.add(buildRevision()); |
1985 return o; | 1985 return o; |
1986 } | 1986 } |
1987 | 1987 |
1988 checkUnnamed673(core.List<api.Revision> o) { | 1988 checkUnnamed678(core.List<api.Revision> o) { |
1989 unittest.expect(o, unittest.hasLength(2)); | 1989 unittest.expect(o, unittest.hasLength(2)); |
1990 checkRevision(o[0]); | 1990 checkRevision(o[0]); |
1991 checkRevision(o[1]); | 1991 checkRevision(o[1]); |
1992 } | 1992 } |
1993 | 1993 |
1994 core.int buildCounterRevisionList = 0; | 1994 core.int buildCounterRevisionList = 0; |
1995 buildRevisionList() { | 1995 buildRevisionList() { |
1996 var o = new api.RevisionList(); | 1996 var o = new api.RevisionList(); |
1997 buildCounterRevisionList++; | 1997 buildCounterRevisionList++; |
1998 if (buildCounterRevisionList < 3) { | 1998 if (buildCounterRevisionList < 3) { |
1999 o.etag = "foo"; | 1999 o.etag = "foo"; |
2000 o.items = buildUnnamed673(); | 2000 o.items = buildUnnamed678(); |
2001 o.kind = "foo"; | 2001 o.kind = "foo"; |
2002 o.nextPageToken = "foo"; | 2002 o.nextPageToken = "foo"; |
2003 o.selfLink = "foo"; | 2003 o.selfLink = "foo"; |
2004 } | 2004 } |
2005 buildCounterRevisionList--; | 2005 buildCounterRevisionList--; |
2006 return o; | 2006 return o; |
2007 } | 2007 } |
2008 | 2008 |
2009 checkRevisionList(api.RevisionList o) { | 2009 checkRevisionList(api.RevisionList o) { |
2010 buildCounterRevisionList++; | 2010 buildCounterRevisionList++; |
2011 if (buildCounterRevisionList < 3) { | 2011 if (buildCounterRevisionList < 3) { |
2012 unittest.expect(o.etag, unittest.equals('foo')); | 2012 unittest.expect(o.etag, unittest.equals('foo')); |
2013 checkUnnamed673(o.items); | 2013 checkUnnamed678(o.items); |
2014 unittest.expect(o.kind, unittest.equals('foo')); | 2014 unittest.expect(o.kind, unittest.equals('foo')); |
2015 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 2015 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
2016 unittest.expect(o.selfLink, unittest.equals('foo')); | 2016 unittest.expect(o.selfLink, unittest.equals('foo')); |
2017 } | 2017 } |
2018 buildCounterRevisionList--; | 2018 buildCounterRevisionList--; |
2019 } | 2019 } |
2020 | 2020 |
2021 core.int buildCounterStartPageToken = 0; | 2021 core.int buildCounterStartPageToken = 0; |
2022 buildStartPageToken() { | 2022 buildStartPageToken() { |
2023 var o = new api.StartPageToken(); | 2023 var o = new api.StartPageToken(); |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2135 checkTeamDriveCapabilities(o.capabilities); | 2135 checkTeamDriveCapabilities(o.capabilities); |
2136 unittest.expect(o.colorRgb, unittest.equals('foo')); | 2136 unittest.expect(o.colorRgb, unittest.equals('foo')); |
2137 unittest.expect(o.id, unittest.equals('foo')); | 2137 unittest.expect(o.id, unittest.equals('foo')); |
2138 unittest.expect(o.kind, unittest.equals('foo')); | 2138 unittest.expect(o.kind, unittest.equals('foo')); |
2139 unittest.expect(o.name, unittest.equals('foo')); | 2139 unittest.expect(o.name, unittest.equals('foo')); |
2140 unittest.expect(o.themeId, unittest.equals('foo')); | 2140 unittest.expect(o.themeId, unittest.equals('foo')); |
2141 } | 2141 } |
2142 buildCounterTeamDrive--; | 2142 buildCounterTeamDrive--; |
2143 } | 2143 } |
2144 | 2144 |
2145 buildUnnamed674() { | 2145 buildUnnamed679() { |
2146 var o = new core.List<api.TeamDrive>(); | 2146 var o = new core.List<api.TeamDrive>(); |
2147 o.add(buildTeamDrive()); | 2147 o.add(buildTeamDrive()); |
2148 o.add(buildTeamDrive()); | 2148 o.add(buildTeamDrive()); |
2149 return o; | 2149 return o; |
2150 } | 2150 } |
2151 | 2151 |
2152 checkUnnamed674(core.List<api.TeamDrive> o) { | 2152 checkUnnamed679(core.List<api.TeamDrive> o) { |
2153 unittest.expect(o, unittest.hasLength(2)); | 2153 unittest.expect(o, unittest.hasLength(2)); |
2154 checkTeamDrive(o[0]); | 2154 checkTeamDrive(o[0]); |
2155 checkTeamDrive(o[1]); | 2155 checkTeamDrive(o[1]); |
2156 } | 2156 } |
2157 | 2157 |
2158 core.int buildCounterTeamDriveList = 0; | 2158 core.int buildCounterTeamDriveList = 0; |
2159 buildTeamDriveList() { | 2159 buildTeamDriveList() { |
2160 var o = new api.TeamDriveList(); | 2160 var o = new api.TeamDriveList(); |
2161 buildCounterTeamDriveList++; | 2161 buildCounterTeamDriveList++; |
2162 if (buildCounterTeamDriveList < 3) { | 2162 if (buildCounterTeamDriveList < 3) { |
2163 o.items = buildUnnamed674(); | 2163 o.items = buildUnnamed679(); |
2164 o.kind = "foo"; | 2164 o.kind = "foo"; |
2165 o.nextPageToken = "foo"; | 2165 o.nextPageToken = "foo"; |
2166 } | 2166 } |
2167 buildCounterTeamDriveList--; | 2167 buildCounterTeamDriveList--; |
2168 return o; | 2168 return o; |
2169 } | 2169 } |
2170 | 2170 |
2171 checkTeamDriveList(api.TeamDriveList o) { | 2171 checkTeamDriveList(api.TeamDriveList o) { |
2172 buildCounterTeamDriveList++; | 2172 buildCounterTeamDriveList++; |
2173 if (buildCounterTeamDriveList < 3) { | 2173 if (buildCounterTeamDriveList < 3) { |
2174 checkUnnamed674(o.items); | 2174 checkUnnamed679(o.items); |
2175 unittest.expect(o.kind, unittest.equals('foo')); | 2175 unittest.expect(o.kind, unittest.equals('foo')); |
2176 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 2176 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
2177 } | 2177 } |
2178 buildCounterTeamDriveList--; | 2178 buildCounterTeamDriveList--; |
2179 } | 2179 } |
2180 | 2180 |
2181 core.int buildCounterUserPicture = 0; | 2181 core.int buildCounterUserPicture = 0; |
2182 buildUserPicture() { | 2182 buildUserPicture() { |
2183 var o = new api.UserPicture(); | 2183 var o = new api.UserPicture(); |
2184 buildCounterUserPicture++; | 2184 buildCounterUserPicture++; |
(...skipping 485 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2670 | 2670 |
2671 | 2671 |
2672 unittest.group("resource-AboutResourceApi", () { | 2672 unittest.group("resource-AboutResourceApi", () { |
2673 unittest.test("method--get", () { | 2673 unittest.test("method--get", () { |
2674 | 2674 |
2675 var mock = new HttpServerMock(); | 2675 var mock = new HttpServerMock(); |
2676 api.AboutResourceApi res = new api.DriveApi(mock).about; | 2676 api.AboutResourceApi res = new api.DriveApi(mock).about; |
2677 var arg_includeSubscribed = true; | 2677 var arg_includeSubscribed = true; |
2678 var arg_maxChangeIdCount = "foo"; | 2678 var arg_maxChangeIdCount = "foo"; |
2679 var arg_startChangeId = "foo"; | 2679 var arg_startChangeId = "foo"; |
2680 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2680 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
2681 var path = (req.url).path; | 2681 var path = (req.url).path; |
2682 var pathOffset = 0; | 2682 var pathOffset = 0; |
2683 var index; | 2683 var index; |
2684 var subPart; | 2684 var subPart; |
2685 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2685 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
2686 pathOffset += 1; | 2686 pathOffset += 1; |
2687 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); | 2687 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); |
2688 pathOffset += 9; | 2688 pathOffset += 9; |
2689 unittest.expect(path.substring(pathOffset, pathOffset + 5), unittest.equ
als("about")); | 2689 unittest.expect(path.substring(pathOffset, pathOffset + 5), unittest.equ
als("about")); |
2690 pathOffset += 5; | 2690 pathOffset += 5; |
(...skipping 18 matching lines...) Expand all Loading... |
2709 unittest.expect(queryMap["maxChangeIdCount"].first, unittest.equals(arg_
maxChangeIdCount)); | 2709 unittest.expect(queryMap["maxChangeIdCount"].first, unittest.equals(arg_
maxChangeIdCount)); |
2710 unittest.expect(queryMap["startChangeId"].first, unittest.equals(arg_sta
rtChangeId)); | 2710 unittest.expect(queryMap["startChangeId"].first, unittest.equals(arg_sta
rtChangeId)); |
2711 | 2711 |
2712 | 2712 |
2713 var h = { | 2713 var h = { |
2714 "content-type" : "application/json; charset=utf-8", | 2714 "content-type" : "application/json; charset=utf-8", |
2715 }; | 2715 }; |
2716 var resp = convert.JSON.encode(buildAbout()); | 2716 var resp = convert.JSON.encode(buildAbout()); |
2717 return new async.Future.value(stringResponse(200, h, resp)); | 2717 return new async.Future.value(stringResponse(200, h, resp)); |
2718 }), true); | 2718 }), true); |
2719 res.get(includeSubscribed: arg_includeSubscribed, maxChangeIdCount: arg_ma
xChangeIdCount, startChangeId: arg_startChangeId).then(unittest.expectAsync(((ap
i.About response) { | 2719 res.get(includeSubscribed: arg_includeSubscribed, maxChangeIdCount: arg_ma
xChangeIdCount, startChangeId: arg_startChangeId).then(unittest.expectAsync1(((a
pi.About response) { |
2720 checkAbout(response); | 2720 checkAbout(response); |
2721 }))); | 2721 }))); |
2722 }); | 2722 }); |
2723 | 2723 |
2724 }); | 2724 }); |
2725 | 2725 |
2726 | 2726 |
2727 unittest.group("resource-AppsResourceApi", () { | 2727 unittest.group("resource-AppsResourceApi", () { |
2728 unittest.test("method--get", () { | 2728 unittest.test("method--get", () { |
2729 | 2729 |
2730 var mock = new HttpServerMock(); | 2730 var mock = new HttpServerMock(); |
2731 api.AppsResourceApi res = new api.DriveApi(mock).apps; | 2731 api.AppsResourceApi res = new api.DriveApi(mock).apps; |
2732 var arg_appId = "foo"; | 2732 var arg_appId = "foo"; |
2733 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2733 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
2734 var path = (req.url).path; | 2734 var path = (req.url).path; |
2735 var pathOffset = 0; | 2735 var pathOffset = 0; |
2736 var index; | 2736 var index; |
2737 var subPart; | 2737 var subPart; |
2738 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2738 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
2739 pathOffset += 1; | 2739 pathOffset += 1; |
2740 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); | 2740 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); |
2741 pathOffset += 9; | 2741 pathOffset += 9; |
2742 unittest.expect(path.substring(pathOffset, pathOffset + 5), unittest.equ
als("apps/")); | 2742 unittest.expect(path.substring(pathOffset, pathOffset + 5), unittest.equ
als("apps/")); |
2743 pathOffset += 5; | 2743 pathOffset += 5; |
(...skipping 18 matching lines...) Expand all Loading... |
2762 } | 2762 } |
2763 } | 2763 } |
2764 | 2764 |
2765 | 2765 |
2766 var h = { | 2766 var h = { |
2767 "content-type" : "application/json; charset=utf-8", | 2767 "content-type" : "application/json; charset=utf-8", |
2768 }; | 2768 }; |
2769 var resp = convert.JSON.encode(buildApp()); | 2769 var resp = convert.JSON.encode(buildApp()); |
2770 return new async.Future.value(stringResponse(200, h, resp)); | 2770 return new async.Future.value(stringResponse(200, h, resp)); |
2771 }), true); | 2771 }), true); |
2772 res.get(arg_appId).then(unittest.expectAsync(((api.App response) { | 2772 res.get(arg_appId).then(unittest.expectAsync1(((api.App response) { |
2773 checkApp(response); | 2773 checkApp(response); |
2774 }))); | 2774 }))); |
2775 }); | 2775 }); |
2776 | 2776 |
2777 unittest.test("method--list", () { | 2777 unittest.test("method--list", () { |
2778 | 2778 |
2779 var mock = new HttpServerMock(); | 2779 var mock = new HttpServerMock(); |
2780 api.AppsResourceApi res = new api.DriveApi(mock).apps; | 2780 api.AppsResourceApi res = new api.DriveApi(mock).apps; |
2781 var arg_appFilterExtensions = "foo"; | 2781 var arg_appFilterExtensions = "foo"; |
2782 var arg_appFilterMimeTypes = "foo"; | 2782 var arg_appFilterMimeTypes = "foo"; |
2783 var arg_languageCode = "foo"; | 2783 var arg_languageCode = "foo"; |
2784 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2784 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
2785 var path = (req.url).path; | 2785 var path = (req.url).path; |
2786 var pathOffset = 0; | 2786 var pathOffset = 0; |
2787 var index; | 2787 var index; |
2788 var subPart; | 2788 var subPart; |
2789 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2789 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
2790 pathOffset += 1; | 2790 pathOffset += 1; |
2791 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); | 2791 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); |
2792 pathOffset += 9; | 2792 pathOffset += 9; |
2793 unittest.expect(path.substring(pathOffset, pathOffset + 4), unittest.equ
als("apps")); | 2793 unittest.expect(path.substring(pathOffset, pathOffset + 4), unittest.equ
als("apps")); |
2794 pathOffset += 4; | 2794 pathOffset += 4; |
(...skipping 18 matching lines...) Expand all Loading... |
2813 unittest.expect(queryMap["appFilterMimeTypes"].first, unittest.equals(ar
g_appFilterMimeTypes)); | 2813 unittest.expect(queryMap["appFilterMimeTypes"].first, unittest.equals(ar
g_appFilterMimeTypes)); |
2814 unittest.expect(queryMap["languageCode"].first, unittest.equals(arg_lang
uageCode)); | 2814 unittest.expect(queryMap["languageCode"].first, unittest.equals(arg_lang
uageCode)); |
2815 | 2815 |
2816 | 2816 |
2817 var h = { | 2817 var h = { |
2818 "content-type" : "application/json; charset=utf-8", | 2818 "content-type" : "application/json; charset=utf-8", |
2819 }; | 2819 }; |
2820 var resp = convert.JSON.encode(buildAppList()); | 2820 var resp = convert.JSON.encode(buildAppList()); |
2821 return new async.Future.value(stringResponse(200, h, resp)); | 2821 return new async.Future.value(stringResponse(200, h, resp)); |
2822 }), true); | 2822 }), true); |
2823 res.list(appFilterExtensions: arg_appFilterExtensions, appFilterMimeTypes:
arg_appFilterMimeTypes, languageCode: arg_languageCode).then(unittest.expectAsy
nc(((api.AppList response) { | 2823 res.list(appFilterExtensions: arg_appFilterExtensions, appFilterMimeTypes:
arg_appFilterMimeTypes, languageCode: arg_languageCode).then(unittest.expectAsy
nc1(((api.AppList response) { |
2824 checkAppList(response); | 2824 checkAppList(response); |
2825 }))); | 2825 }))); |
2826 }); | 2826 }); |
2827 | 2827 |
2828 }); | 2828 }); |
2829 | 2829 |
2830 | 2830 |
2831 unittest.group("resource-ChangesResourceApi", () { | 2831 unittest.group("resource-ChangesResourceApi", () { |
2832 unittest.test("method--get", () { | 2832 unittest.test("method--get", () { |
2833 | 2833 |
2834 var mock = new HttpServerMock(); | 2834 var mock = new HttpServerMock(); |
2835 api.ChangesResourceApi res = new api.DriveApi(mock).changes; | 2835 api.ChangesResourceApi res = new api.DriveApi(mock).changes; |
2836 var arg_changeId = "foo"; | 2836 var arg_changeId = "foo"; |
2837 var arg_supportsTeamDrives = true; | 2837 var arg_supportsTeamDrives = true; |
2838 var arg_teamDriveId = "foo"; | 2838 var arg_teamDriveId = "foo"; |
2839 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2839 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
2840 var path = (req.url).path; | 2840 var path = (req.url).path; |
2841 var pathOffset = 0; | 2841 var pathOffset = 0; |
2842 var index; | 2842 var index; |
2843 var subPart; | 2843 var subPart; |
2844 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2844 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
2845 pathOffset += 1; | 2845 pathOffset += 1; |
2846 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); | 2846 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); |
2847 pathOffset += 9; | 2847 pathOffset += 9; |
2848 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("changes/")); | 2848 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("changes/")); |
2849 pathOffset += 8; | 2849 pathOffset += 8; |
(...skipping 20 matching lines...) Expand all Loading... |
2870 unittest.expect(queryMap["supportsTeamDrives"].first, unittest.equals("$
arg_supportsTeamDrives")); | 2870 unittest.expect(queryMap["supportsTeamDrives"].first, unittest.equals("$
arg_supportsTeamDrives")); |
2871 unittest.expect(queryMap["teamDriveId"].first, unittest.equals(arg_teamD
riveId)); | 2871 unittest.expect(queryMap["teamDriveId"].first, unittest.equals(arg_teamD
riveId)); |
2872 | 2872 |
2873 | 2873 |
2874 var h = { | 2874 var h = { |
2875 "content-type" : "application/json; charset=utf-8", | 2875 "content-type" : "application/json; charset=utf-8", |
2876 }; | 2876 }; |
2877 var resp = convert.JSON.encode(buildChange()); | 2877 var resp = convert.JSON.encode(buildChange()); |
2878 return new async.Future.value(stringResponse(200, h, resp)); | 2878 return new async.Future.value(stringResponse(200, h, resp)); |
2879 }), true); | 2879 }), true); |
2880 res.get(arg_changeId, supportsTeamDrives: arg_supportsTeamDrives, teamDriv
eId: arg_teamDriveId).then(unittest.expectAsync(((api.Change response) { | 2880 res.get(arg_changeId, supportsTeamDrives: arg_supportsTeamDrives, teamDriv
eId: arg_teamDriveId).then(unittest.expectAsync1(((api.Change response) { |
2881 checkChange(response); | 2881 checkChange(response); |
2882 }))); | 2882 }))); |
2883 }); | 2883 }); |
2884 | 2884 |
2885 unittest.test("method--getStartPageToken", () { | 2885 unittest.test("method--getStartPageToken", () { |
2886 | 2886 |
2887 var mock = new HttpServerMock(); | 2887 var mock = new HttpServerMock(); |
2888 api.ChangesResourceApi res = new api.DriveApi(mock).changes; | 2888 api.ChangesResourceApi res = new api.DriveApi(mock).changes; |
2889 var arg_supportsTeamDrives = true; | 2889 var arg_supportsTeamDrives = true; |
2890 var arg_teamDriveId = "foo"; | 2890 var arg_teamDriveId = "foo"; |
2891 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2891 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
2892 var path = (req.url).path; | 2892 var path = (req.url).path; |
2893 var pathOffset = 0; | 2893 var pathOffset = 0; |
2894 var index; | 2894 var index; |
2895 var subPart; | 2895 var subPart; |
2896 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2896 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
2897 pathOffset += 1; | 2897 pathOffset += 1; |
2898 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); | 2898 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); |
2899 pathOffset += 9; | 2899 pathOffset += 9; |
2900 unittest.expect(path.substring(pathOffset, pathOffset + 22), unittest.eq
uals("changes/startPageToken")); | 2900 unittest.expect(path.substring(pathOffset, pathOffset + 22), unittest.eq
uals("changes/startPageToken")); |
2901 pathOffset += 22; | 2901 pathOffset += 22; |
(...skipping 17 matching lines...) Expand all Loading... |
2919 unittest.expect(queryMap["supportsTeamDrives"].first, unittest.equals("$
arg_supportsTeamDrives")); | 2919 unittest.expect(queryMap["supportsTeamDrives"].first, unittest.equals("$
arg_supportsTeamDrives")); |
2920 unittest.expect(queryMap["teamDriveId"].first, unittest.equals(arg_teamD
riveId)); | 2920 unittest.expect(queryMap["teamDriveId"].first, unittest.equals(arg_teamD
riveId)); |
2921 | 2921 |
2922 | 2922 |
2923 var h = { | 2923 var h = { |
2924 "content-type" : "application/json; charset=utf-8", | 2924 "content-type" : "application/json; charset=utf-8", |
2925 }; | 2925 }; |
2926 var resp = convert.JSON.encode(buildStartPageToken()); | 2926 var resp = convert.JSON.encode(buildStartPageToken()); |
2927 return new async.Future.value(stringResponse(200, h, resp)); | 2927 return new async.Future.value(stringResponse(200, h, resp)); |
2928 }), true); | 2928 }), true); |
2929 res.getStartPageToken(supportsTeamDrives: arg_supportsTeamDrives, teamDriv
eId: arg_teamDriveId).then(unittest.expectAsync(((api.StartPageToken response) { | 2929 res.getStartPageToken(supportsTeamDrives: arg_supportsTeamDrives, teamDriv
eId: arg_teamDriveId).then(unittest.expectAsync1(((api.StartPageToken response)
{ |
2930 checkStartPageToken(response); | 2930 checkStartPageToken(response); |
2931 }))); | 2931 }))); |
2932 }); | 2932 }); |
2933 | 2933 |
2934 unittest.test("method--list", () { | 2934 unittest.test("method--list", () { |
2935 | 2935 |
2936 var mock = new HttpServerMock(); | 2936 var mock = new HttpServerMock(); |
2937 api.ChangesResourceApi res = new api.DriveApi(mock).changes; | 2937 api.ChangesResourceApi res = new api.DriveApi(mock).changes; |
2938 var arg_includeCorpusRemovals = true; | 2938 var arg_includeCorpusRemovals = true; |
2939 var arg_includeDeleted = true; | 2939 var arg_includeDeleted = true; |
2940 var arg_includeSubscribed = true; | 2940 var arg_includeSubscribed = true; |
2941 var arg_includeTeamDriveItems = true; | 2941 var arg_includeTeamDriveItems = true; |
2942 var arg_maxResults = 42; | 2942 var arg_maxResults = 42; |
2943 var arg_pageToken = "foo"; | 2943 var arg_pageToken = "foo"; |
2944 var arg_spaces = "foo"; | 2944 var arg_spaces = "foo"; |
2945 var arg_startChangeId = "foo"; | 2945 var arg_startChangeId = "foo"; |
2946 var arg_supportsTeamDrives = true; | 2946 var arg_supportsTeamDrives = true; |
2947 var arg_teamDriveId = "foo"; | 2947 var arg_teamDriveId = "foo"; |
2948 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2948 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
2949 var path = (req.url).path; | 2949 var path = (req.url).path; |
2950 var pathOffset = 0; | 2950 var pathOffset = 0; |
2951 var index; | 2951 var index; |
2952 var subPart; | 2952 var subPart; |
2953 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2953 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
2954 pathOffset += 1; | 2954 pathOffset += 1; |
2955 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); | 2955 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); |
2956 pathOffset += 9; | 2956 pathOffset += 9; |
2957 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ
als("changes")); | 2957 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ
als("changes")); |
2958 pathOffset += 7; | 2958 pathOffset += 7; |
(...skipping 25 matching lines...) Expand all Loading... |
2984 unittest.expect(queryMap["supportsTeamDrives"].first, unittest.equals("$
arg_supportsTeamDrives")); | 2984 unittest.expect(queryMap["supportsTeamDrives"].first, unittest.equals("$
arg_supportsTeamDrives")); |
2985 unittest.expect(queryMap["teamDriveId"].first, unittest.equals(arg_teamD
riveId)); | 2985 unittest.expect(queryMap["teamDriveId"].first, unittest.equals(arg_teamD
riveId)); |
2986 | 2986 |
2987 | 2987 |
2988 var h = { | 2988 var h = { |
2989 "content-type" : "application/json; charset=utf-8", | 2989 "content-type" : "application/json; charset=utf-8", |
2990 }; | 2990 }; |
2991 var resp = convert.JSON.encode(buildChangeList()); | 2991 var resp = convert.JSON.encode(buildChangeList()); |
2992 return new async.Future.value(stringResponse(200, h, resp)); | 2992 return new async.Future.value(stringResponse(200, h, resp)); |
2993 }), true); | 2993 }), true); |
2994 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) { | 2994 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
1(((api.ChangeList response) { |
2995 checkChangeList(response); | 2995 checkChangeList(response); |
2996 }))); | 2996 }))); |
2997 }); | 2997 }); |
2998 | 2998 |
2999 unittest.test("method--watch", () { | 2999 unittest.test("method--watch", () { |
3000 | 3000 |
3001 var mock = new HttpServerMock(); | 3001 var mock = new HttpServerMock(); |
3002 api.ChangesResourceApi res = new api.DriveApi(mock).changes; | 3002 api.ChangesResourceApi res = new api.DriveApi(mock).changes; |
3003 var arg_request = buildChannel(); | 3003 var arg_request = buildChannel(); |
3004 var arg_includeCorpusRemovals = true; | 3004 var arg_includeCorpusRemovals = true; |
3005 var arg_includeDeleted = true; | 3005 var arg_includeDeleted = true; |
3006 var arg_includeSubscribed = true; | 3006 var arg_includeSubscribed = true; |
3007 var arg_includeTeamDriveItems = true; | 3007 var arg_includeTeamDriveItems = true; |
3008 var arg_maxResults = 42; | 3008 var arg_maxResults = 42; |
3009 var arg_pageToken = "foo"; | 3009 var arg_pageToken = "foo"; |
3010 var arg_spaces = "foo"; | 3010 var arg_spaces = "foo"; |
3011 var arg_startChangeId = "foo"; | 3011 var arg_startChangeId = "foo"; |
3012 var arg_supportsTeamDrives = true; | 3012 var arg_supportsTeamDrives = true; |
3013 var arg_teamDriveId = "foo"; | 3013 var arg_teamDriveId = "foo"; |
3014 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3014 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
3015 var obj = new api.Channel.fromJson(json); | 3015 var obj = new api.Channel.fromJson(json); |
3016 checkChannel(obj); | 3016 checkChannel(obj); |
3017 | 3017 |
3018 var path = (req.url).path; | 3018 var path = (req.url).path; |
3019 var pathOffset = 0; | 3019 var pathOffset = 0; |
3020 var index; | 3020 var index; |
3021 var subPart; | 3021 var subPart; |
3022 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3022 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
3023 pathOffset += 1; | 3023 pathOffset += 1; |
3024 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); | 3024 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); |
(...skipping 28 matching lines...) Expand all Loading... |
3053 unittest.expect(queryMap["supportsTeamDrives"].first, unittest.equals("$
arg_supportsTeamDrives")); | 3053 unittest.expect(queryMap["supportsTeamDrives"].first, unittest.equals("$
arg_supportsTeamDrives")); |
3054 unittest.expect(queryMap["teamDriveId"].first, unittest.equals(arg_teamD
riveId)); | 3054 unittest.expect(queryMap["teamDriveId"].first, unittest.equals(arg_teamD
riveId)); |
3055 | 3055 |
3056 | 3056 |
3057 var h = { | 3057 var h = { |
3058 "content-type" : "application/json; charset=utf-8", | 3058 "content-type" : "application/json; charset=utf-8", |
3059 }; | 3059 }; |
3060 var resp = convert.JSON.encode(buildChannel()); | 3060 var resp = convert.JSON.encode(buildChannel()); |
3061 return new async.Future.value(stringResponse(200, h, resp)); | 3061 return new async.Future.value(stringResponse(200, h, resp)); |
3062 }), true); | 3062 }), true); |
3063 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) { | 3063 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.expectAsync1(((api.Channel response) { |
3064 checkChannel(response); | 3064 checkChannel(response); |
3065 }))); | 3065 }))); |
3066 }); | 3066 }); |
3067 | 3067 |
3068 }); | 3068 }); |
3069 | 3069 |
3070 | 3070 |
3071 unittest.group("resource-ChannelsResourceApi", () { | 3071 unittest.group("resource-ChannelsResourceApi", () { |
3072 unittest.test("method--stop", () { | 3072 unittest.test("method--stop", () { |
3073 | 3073 |
3074 var mock = new HttpServerMock(); | 3074 var mock = new HttpServerMock(); |
3075 api.ChannelsResourceApi res = new api.DriveApi(mock).channels; | 3075 api.ChannelsResourceApi res = new api.DriveApi(mock).channels; |
3076 var arg_request = buildChannel(); | 3076 var arg_request = buildChannel(); |
3077 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3077 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
3078 var obj = new api.Channel.fromJson(json); | 3078 var obj = new api.Channel.fromJson(json); |
3079 checkChannel(obj); | 3079 checkChannel(obj); |
3080 | 3080 |
3081 var path = (req.url).path; | 3081 var path = (req.url).path; |
3082 var pathOffset = 0; | 3082 var pathOffset = 0; |
3083 var index; | 3083 var index; |
3084 var subPart; | 3084 var subPart; |
3085 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3085 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
3086 pathOffset += 1; | 3086 pathOffset += 1; |
3087 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); | 3087 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); |
(...skipping 18 matching lines...) Expand all Loading... |
3106 } | 3106 } |
3107 } | 3107 } |
3108 | 3108 |
3109 | 3109 |
3110 var h = { | 3110 var h = { |
3111 "content-type" : "application/json; charset=utf-8", | 3111 "content-type" : "application/json; charset=utf-8", |
3112 }; | 3112 }; |
3113 var resp = ""; | 3113 var resp = ""; |
3114 return new async.Future.value(stringResponse(200, h, resp)); | 3114 return new async.Future.value(stringResponse(200, h, resp)); |
3115 }), true); | 3115 }), true); |
3116 res.stop(arg_request).then(unittest.expectAsync((_) {})); | 3116 res.stop(arg_request).then(unittest.expectAsync1((_) {})); |
3117 }); | 3117 }); |
3118 | 3118 |
3119 }); | 3119 }); |
3120 | 3120 |
3121 | 3121 |
3122 unittest.group("resource-ChildrenResourceApi", () { | 3122 unittest.group("resource-ChildrenResourceApi", () { |
3123 unittest.test("method--delete", () { | 3123 unittest.test("method--delete", () { |
3124 | 3124 |
3125 var mock = new HttpServerMock(); | 3125 var mock = new HttpServerMock(); |
3126 api.ChildrenResourceApi res = new api.DriveApi(mock).children; | 3126 api.ChildrenResourceApi res = new api.DriveApi(mock).children; |
3127 var arg_folderId = "foo"; | 3127 var arg_folderId = "foo"; |
3128 var arg_childId = "foo"; | 3128 var arg_childId = "foo"; |
3129 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3129 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
3130 var path = (req.url).path; | 3130 var path = (req.url).path; |
3131 var pathOffset = 0; | 3131 var pathOffset = 0; |
3132 var index; | 3132 var index; |
3133 var subPart; | 3133 var subPart; |
3134 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3134 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
3135 pathOffset += 1; | 3135 pathOffset += 1; |
3136 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); | 3136 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); |
3137 pathOffset += 9; | 3137 pathOffset += 9; |
3138 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ
als("files/")); | 3138 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ
als("files/")); |
3139 pathOffset += 6; | 3139 pathOffset += 6; |
(...skipping 25 matching lines...) Expand all Loading... |
3165 } | 3165 } |
3166 } | 3166 } |
3167 | 3167 |
3168 | 3168 |
3169 var h = { | 3169 var h = { |
3170 "content-type" : "application/json; charset=utf-8", | 3170 "content-type" : "application/json; charset=utf-8", |
3171 }; | 3171 }; |
3172 var resp = ""; | 3172 var resp = ""; |
3173 return new async.Future.value(stringResponse(200, h, resp)); | 3173 return new async.Future.value(stringResponse(200, h, resp)); |
3174 }), true); | 3174 }), true); |
3175 res.delete(arg_folderId, arg_childId).then(unittest.expectAsync((_) {})); | 3175 res.delete(arg_folderId, arg_childId).then(unittest.expectAsync1((_) {})); |
3176 }); | 3176 }); |
3177 | 3177 |
3178 unittest.test("method--get", () { | 3178 unittest.test("method--get", () { |
3179 | 3179 |
3180 var mock = new HttpServerMock(); | 3180 var mock = new HttpServerMock(); |
3181 api.ChildrenResourceApi res = new api.DriveApi(mock).children; | 3181 api.ChildrenResourceApi res = new api.DriveApi(mock).children; |
3182 var arg_folderId = "foo"; | 3182 var arg_folderId = "foo"; |
3183 var arg_childId = "foo"; | 3183 var arg_childId = "foo"; |
3184 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3184 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
3185 var path = (req.url).path; | 3185 var path = (req.url).path; |
3186 var pathOffset = 0; | 3186 var pathOffset = 0; |
3187 var index; | 3187 var index; |
3188 var subPart; | 3188 var subPart; |
3189 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3189 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
3190 pathOffset += 1; | 3190 pathOffset += 1; |
3191 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); | 3191 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); |
3192 pathOffset += 9; | 3192 pathOffset += 9; |
3193 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ
als("files/")); | 3193 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ
als("files/")); |
3194 pathOffset += 6; | 3194 pathOffset += 6; |
(...skipping 25 matching lines...) Expand all Loading... |
3220 } | 3220 } |
3221 } | 3221 } |
3222 | 3222 |
3223 | 3223 |
3224 var h = { | 3224 var h = { |
3225 "content-type" : "application/json; charset=utf-8", | 3225 "content-type" : "application/json; charset=utf-8", |
3226 }; | 3226 }; |
3227 var resp = convert.JSON.encode(buildChildReference()); | 3227 var resp = convert.JSON.encode(buildChildReference()); |
3228 return new async.Future.value(stringResponse(200, h, resp)); | 3228 return new async.Future.value(stringResponse(200, h, resp)); |
3229 }), true); | 3229 }), true); |
3230 res.get(arg_folderId, arg_childId).then(unittest.expectAsync(((api.ChildRe
ference response) { | 3230 res.get(arg_folderId, arg_childId).then(unittest.expectAsync1(((api.ChildR
eference response) { |
3231 checkChildReference(response); | 3231 checkChildReference(response); |
3232 }))); | 3232 }))); |
3233 }); | 3233 }); |
3234 | 3234 |
3235 unittest.test("method--insert", () { | 3235 unittest.test("method--insert", () { |
3236 | 3236 |
3237 var mock = new HttpServerMock(); | 3237 var mock = new HttpServerMock(); |
3238 api.ChildrenResourceApi res = new api.DriveApi(mock).children; | 3238 api.ChildrenResourceApi res = new api.DriveApi(mock).children; |
3239 var arg_request = buildChildReference(); | 3239 var arg_request = buildChildReference(); |
3240 var arg_folderId = "foo"; | 3240 var arg_folderId = "foo"; |
3241 var arg_supportsTeamDrives = true; | 3241 var arg_supportsTeamDrives = true; |
3242 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3242 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
3243 var obj = new api.ChildReference.fromJson(json); | 3243 var obj = new api.ChildReference.fromJson(json); |
3244 checkChildReference(obj); | 3244 checkChildReference(obj); |
3245 | 3245 |
3246 var path = (req.url).path; | 3246 var path = (req.url).path; |
3247 var pathOffset = 0; | 3247 var pathOffset = 0; |
3248 var index; | 3248 var index; |
3249 var subPart; | 3249 var subPart; |
3250 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3250 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
3251 pathOffset += 1; | 3251 pathOffset += 1; |
3252 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); | 3252 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); |
(...skipping 26 matching lines...) Expand all Loading... |
3279 } | 3279 } |
3280 unittest.expect(queryMap["supportsTeamDrives"].first, unittest.equals("$
arg_supportsTeamDrives")); | 3280 unittest.expect(queryMap["supportsTeamDrives"].first, unittest.equals("$
arg_supportsTeamDrives")); |
3281 | 3281 |
3282 | 3282 |
3283 var h = { | 3283 var h = { |
3284 "content-type" : "application/json; charset=utf-8", | 3284 "content-type" : "application/json; charset=utf-8", |
3285 }; | 3285 }; |
3286 var resp = convert.JSON.encode(buildChildReference()); | 3286 var resp = convert.JSON.encode(buildChildReference()); |
3287 return new async.Future.value(stringResponse(200, h, resp)); | 3287 return new async.Future.value(stringResponse(200, h, resp)); |
3288 }), true); | 3288 }), true); |
3289 res.insert(arg_request, arg_folderId, supportsTeamDrives: arg_supportsTeam
Drives).then(unittest.expectAsync(((api.ChildReference response) { | 3289 res.insert(arg_request, arg_folderId, supportsTeamDrives: arg_supportsTeam
Drives).then(unittest.expectAsync1(((api.ChildReference response) { |
3290 checkChildReference(response); | 3290 checkChildReference(response); |
3291 }))); | 3291 }))); |
3292 }); | 3292 }); |
3293 | 3293 |
3294 unittest.test("method--list", () { | 3294 unittest.test("method--list", () { |
3295 | 3295 |
3296 var mock = new HttpServerMock(); | 3296 var mock = new HttpServerMock(); |
3297 api.ChildrenResourceApi res = new api.DriveApi(mock).children; | 3297 api.ChildrenResourceApi res = new api.DriveApi(mock).children; |
3298 var arg_folderId = "foo"; | 3298 var arg_folderId = "foo"; |
3299 var arg_maxResults = 42; | 3299 var arg_maxResults = 42; |
3300 var arg_orderBy = "foo"; | 3300 var arg_orderBy = "foo"; |
3301 var arg_pageToken = "foo"; | 3301 var arg_pageToken = "foo"; |
3302 var arg_q = "foo"; | 3302 var arg_q = "foo"; |
3303 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3303 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
3304 var path = (req.url).path; | 3304 var path = (req.url).path; |
3305 var pathOffset = 0; | 3305 var pathOffset = 0; |
3306 var index; | 3306 var index; |
3307 var subPart; | 3307 var subPart; |
3308 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3308 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
3309 pathOffset += 1; | 3309 pathOffset += 1; |
3310 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); | 3310 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); |
3311 pathOffset += 9; | 3311 pathOffset += 9; |
3312 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ
als("files/")); | 3312 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ
als("files/")); |
3313 pathOffset += 6; | 3313 pathOffset += 6; |
(...skipping 26 matching lines...) Expand all Loading... |
3340 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 3340 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
3341 unittest.expect(queryMap["q"].first, unittest.equals(arg_q)); | 3341 unittest.expect(queryMap["q"].first, unittest.equals(arg_q)); |
3342 | 3342 |
3343 | 3343 |
3344 var h = { | 3344 var h = { |
3345 "content-type" : "application/json; charset=utf-8", | 3345 "content-type" : "application/json; charset=utf-8", |
3346 }; | 3346 }; |
3347 var resp = convert.JSON.encode(buildChildList()); | 3347 var resp = convert.JSON.encode(buildChildList()); |
3348 return new async.Future.value(stringResponse(200, h, resp)); | 3348 return new async.Future.value(stringResponse(200, h, resp)); |
3349 }), true); | 3349 }), true); |
3350 res.list(arg_folderId, maxResults: arg_maxResults, orderBy: arg_orderBy, p
ageToken: arg_pageToken, q: arg_q).then(unittest.expectAsync(((api.ChildList res
ponse) { | 3350 res.list(arg_folderId, maxResults: arg_maxResults, orderBy: arg_orderBy, p
ageToken: arg_pageToken, q: arg_q).then(unittest.expectAsync1(((api.ChildList re
sponse) { |
3351 checkChildList(response); | 3351 checkChildList(response); |
3352 }))); | 3352 }))); |
3353 }); | 3353 }); |
3354 | 3354 |
3355 }); | 3355 }); |
3356 | 3356 |
3357 | 3357 |
3358 unittest.group("resource-CommentsResourceApi", () { | 3358 unittest.group("resource-CommentsResourceApi", () { |
3359 unittest.test("method--delete", () { | 3359 unittest.test("method--delete", () { |
3360 | 3360 |
3361 var mock = new HttpServerMock(); | 3361 var mock = new HttpServerMock(); |
3362 api.CommentsResourceApi res = new api.DriveApi(mock).comments; | 3362 api.CommentsResourceApi res = new api.DriveApi(mock).comments; |
3363 var arg_fileId = "foo"; | 3363 var arg_fileId = "foo"; |
3364 var arg_commentId = "foo"; | 3364 var arg_commentId = "foo"; |
3365 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3365 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
3366 var path = (req.url).path; | 3366 var path = (req.url).path; |
3367 var pathOffset = 0; | 3367 var pathOffset = 0; |
3368 var index; | 3368 var index; |
3369 var subPart; | 3369 var subPart; |
3370 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3370 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
3371 pathOffset += 1; | 3371 pathOffset += 1; |
3372 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); | 3372 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); |
3373 pathOffset += 9; | 3373 pathOffset += 9; |
3374 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ
als("files/")); | 3374 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ
als("files/")); |
3375 pathOffset += 6; | 3375 pathOffset += 6; |
(...skipping 25 matching lines...) Expand all Loading... |
3401 } | 3401 } |
3402 } | 3402 } |
3403 | 3403 |
3404 | 3404 |
3405 var h = { | 3405 var h = { |
3406 "content-type" : "application/json; charset=utf-8", | 3406 "content-type" : "application/json; charset=utf-8", |
3407 }; | 3407 }; |
3408 var resp = ""; | 3408 var resp = ""; |
3409 return new async.Future.value(stringResponse(200, h, resp)); | 3409 return new async.Future.value(stringResponse(200, h, resp)); |
3410 }), true); | 3410 }), true); |
3411 res.delete(arg_fileId, arg_commentId).then(unittest.expectAsync((_) {})); | 3411 res.delete(arg_fileId, arg_commentId).then(unittest.expectAsync1((_) {})); |
3412 }); | 3412 }); |
3413 | 3413 |
3414 unittest.test("method--get", () { | 3414 unittest.test("method--get", () { |
3415 | 3415 |
3416 var mock = new HttpServerMock(); | 3416 var mock = new HttpServerMock(); |
3417 api.CommentsResourceApi res = new api.DriveApi(mock).comments; | 3417 api.CommentsResourceApi res = new api.DriveApi(mock).comments; |
3418 var arg_fileId = "foo"; | 3418 var arg_fileId = "foo"; |
3419 var arg_commentId = "foo"; | 3419 var arg_commentId = "foo"; |
3420 var arg_includeDeleted = true; | 3420 var arg_includeDeleted = true; |
3421 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3421 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
3422 var path = (req.url).path; | 3422 var path = (req.url).path; |
3423 var pathOffset = 0; | 3423 var pathOffset = 0; |
3424 var index; | 3424 var index; |
3425 var subPart; | 3425 var subPart; |
3426 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3426 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
3427 pathOffset += 1; | 3427 pathOffset += 1; |
3428 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); | 3428 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); |
3429 pathOffset += 9; | 3429 pathOffset += 9; |
3430 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ
als("files/")); | 3430 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ
als("files/")); |
3431 pathOffset += 6; | 3431 pathOffset += 6; |
(...skipping 26 matching lines...) Expand all Loading... |
3458 } | 3458 } |
3459 unittest.expect(queryMap["includeDeleted"].first, unittest.equals("$arg_
includeDeleted")); | 3459 unittest.expect(queryMap["includeDeleted"].first, unittest.equals("$arg_
includeDeleted")); |
3460 | 3460 |
3461 | 3461 |
3462 var h = { | 3462 var h = { |
3463 "content-type" : "application/json; charset=utf-8", | 3463 "content-type" : "application/json; charset=utf-8", |
3464 }; | 3464 }; |
3465 var resp = convert.JSON.encode(buildComment()); | 3465 var resp = convert.JSON.encode(buildComment()); |
3466 return new async.Future.value(stringResponse(200, h, resp)); | 3466 return new async.Future.value(stringResponse(200, h, resp)); |
3467 }), true); | 3467 }), true); |
3468 res.get(arg_fileId, arg_commentId, includeDeleted: arg_includeDeleted).the
n(unittest.expectAsync(((api.Comment response) { | 3468 res.get(arg_fileId, arg_commentId, includeDeleted: arg_includeDeleted).the
n(unittest.expectAsync1(((api.Comment response) { |
3469 checkComment(response); | 3469 checkComment(response); |
3470 }))); | 3470 }))); |
3471 }); | 3471 }); |
3472 | 3472 |
3473 unittest.test("method--insert", () { | 3473 unittest.test("method--insert", () { |
3474 | 3474 |
3475 var mock = new HttpServerMock(); | 3475 var mock = new HttpServerMock(); |
3476 api.CommentsResourceApi res = new api.DriveApi(mock).comments; | 3476 api.CommentsResourceApi res = new api.DriveApi(mock).comments; |
3477 var arg_request = buildComment(); | 3477 var arg_request = buildComment(); |
3478 var arg_fileId = "foo"; | 3478 var arg_fileId = "foo"; |
3479 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3479 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
3480 var obj = new api.Comment.fromJson(json); | 3480 var obj = new api.Comment.fromJson(json); |
3481 checkComment(obj); | 3481 checkComment(obj); |
3482 | 3482 |
3483 var path = (req.url).path; | 3483 var path = (req.url).path; |
3484 var pathOffset = 0; | 3484 var pathOffset = 0; |
3485 var index; | 3485 var index; |
3486 var subPart; | 3486 var subPart; |
3487 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3487 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
3488 pathOffset += 1; | 3488 pathOffset += 1; |
3489 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); | 3489 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); |
(...skipping 25 matching lines...) Expand all Loading... |
3515 } | 3515 } |
3516 } | 3516 } |
3517 | 3517 |
3518 | 3518 |
3519 var h = { | 3519 var h = { |
3520 "content-type" : "application/json; charset=utf-8", | 3520 "content-type" : "application/json; charset=utf-8", |
3521 }; | 3521 }; |
3522 var resp = convert.JSON.encode(buildComment()); | 3522 var resp = convert.JSON.encode(buildComment()); |
3523 return new async.Future.value(stringResponse(200, h, resp)); | 3523 return new async.Future.value(stringResponse(200, h, resp)); |
3524 }), true); | 3524 }), true); |
3525 res.insert(arg_request, arg_fileId).then(unittest.expectAsync(((api.Commen
t response) { | 3525 res.insert(arg_request, arg_fileId).then(unittest.expectAsync1(((api.Comme
nt response) { |
3526 checkComment(response); | 3526 checkComment(response); |
3527 }))); | 3527 }))); |
3528 }); | 3528 }); |
3529 | 3529 |
3530 unittest.test("method--list", () { | 3530 unittest.test("method--list", () { |
3531 | 3531 |
3532 var mock = new HttpServerMock(); | 3532 var mock = new HttpServerMock(); |
3533 api.CommentsResourceApi res = new api.DriveApi(mock).comments; | 3533 api.CommentsResourceApi res = new api.DriveApi(mock).comments; |
3534 var arg_fileId = "foo"; | 3534 var arg_fileId = "foo"; |
3535 var arg_includeDeleted = true; | 3535 var arg_includeDeleted = true; |
3536 var arg_maxResults = 42; | 3536 var arg_maxResults = 42; |
3537 var arg_pageToken = "foo"; | 3537 var arg_pageToken = "foo"; |
3538 var arg_updatedMin = "foo"; | 3538 var arg_updatedMin = "foo"; |
3539 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3539 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
3540 var path = (req.url).path; | 3540 var path = (req.url).path; |
3541 var pathOffset = 0; | 3541 var pathOffset = 0; |
3542 var index; | 3542 var index; |
3543 var subPart; | 3543 var subPart; |
3544 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3544 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
3545 pathOffset += 1; | 3545 pathOffset += 1; |
3546 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); | 3546 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); |
3547 pathOffset += 9; | 3547 pathOffset += 9; |
3548 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ
als("files/")); | 3548 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ
als("files/")); |
3549 pathOffset += 6; | 3549 pathOffset += 6; |
(...skipping 26 matching lines...) Expand all Loading... |
3576 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 3576 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
3577 unittest.expect(queryMap["updatedMin"].first, unittest.equals(arg_update
dMin)); | 3577 unittest.expect(queryMap["updatedMin"].first, unittest.equals(arg_update
dMin)); |
3578 | 3578 |
3579 | 3579 |
3580 var h = { | 3580 var h = { |
3581 "content-type" : "application/json; charset=utf-8", | 3581 "content-type" : "application/json; charset=utf-8", |
3582 }; | 3582 }; |
3583 var resp = convert.JSON.encode(buildCommentList()); | 3583 var resp = convert.JSON.encode(buildCommentList()); |
3584 return new async.Future.value(stringResponse(200, h, resp)); | 3584 return new async.Future.value(stringResponse(200, h, resp)); |
3585 }), true); | 3585 }), true); |
3586 res.list(arg_fileId, includeDeleted: arg_includeDeleted, maxResults: arg_m
axResults, pageToken: arg_pageToken, updatedMin: arg_updatedMin).then(unittest.e
xpectAsync(((api.CommentList response) { | 3586 res.list(arg_fileId, includeDeleted: arg_includeDeleted, maxResults: arg_m
axResults, pageToken: arg_pageToken, updatedMin: arg_updatedMin).then(unittest.e
xpectAsync1(((api.CommentList response) { |
3587 checkCommentList(response); | 3587 checkCommentList(response); |
3588 }))); | 3588 }))); |
3589 }); | 3589 }); |
3590 | 3590 |
3591 unittest.test("method--patch", () { | 3591 unittest.test("method--patch", () { |
3592 | 3592 |
3593 var mock = new HttpServerMock(); | 3593 var mock = new HttpServerMock(); |
3594 api.CommentsResourceApi res = new api.DriveApi(mock).comments; | 3594 api.CommentsResourceApi res = new api.DriveApi(mock).comments; |
3595 var arg_request = buildComment(); | 3595 var arg_request = buildComment(); |
3596 var arg_fileId = "foo"; | 3596 var arg_fileId = "foo"; |
3597 var arg_commentId = "foo"; | 3597 var arg_commentId = "foo"; |
3598 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3598 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
3599 var obj = new api.Comment.fromJson(json); | 3599 var obj = new api.Comment.fromJson(json); |
3600 checkComment(obj); | 3600 checkComment(obj); |
3601 | 3601 |
3602 var path = (req.url).path; | 3602 var path = (req.url).path; |
3603 var pathOffset = 0; | 3603 var pathOffset = 0; |
3604 var index; | 3604 var index; |
3605 var subPart; | 3605 var subPart; |
3606 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3606 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
3607 pathOffset += 1; | 3607 pathOffset += 1; |
3608 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); | 3608 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); |
(...skipping 28 matching lines...) Expand all Loading... |
3637 } | 3637 } |
3638 } | 3638 } |
3639 | 3639 |
3640 | 3640 |
3641 var h = { | 3641 var h = { |
3642 "content-type" : "application/json; charset=utf-8", | 3642 "content-type" : "application/json; charset=utf-8", |
3643 }; | 3643 }; |
3644 var resp = convert.JSON.encode(buildComment()); | 3644 var resp = convert.JSON.encode(buildComment()); |
3645 return new async.Future.value(stringResponse(200, h, resp)); | 3645 return new async.Future.value(stringResponse(200, h, resp)); |
3646 }), true); | 3646 }), true); |
3647 res.patch(arg_request, arg_fileId, arg_commentId).then(unittest.expectAsyn
c(((api.Comment response) { | 3647 res.patch(arg_request, arg_fileId, arg_commentId).then(unittest.expectAsyn
c1(((api.Comment response) { |
3648 checkComment(response); | 3648 checkComment(response); |
3649 }))); | 3649 }))); |
3650 }); | 3650 }); |
3651 | 3651 |
3652 unittest.test("method--update", () { | 3652 unittest.test("method--update", () { |
3653 | 3653 |
3654 var mock = new HttpServerMock(); | 3654 var mock = new HttpServerMock(); |
3655 api.CommentsResourceApi res = new api.DriveApi(mock).comments; | 3655 api.CommentsResourceApi res = new api.DriveApi(mock).comments; |
3656 var arg_request = buildComment(); | 3656 var arg_request = buildComment(); |
3657 var arg_fileId = "foo"; | 3657 var arg_fileId = "foo"; |
3658 var arg_commentId = "foo"; | 3658 var arg_commentId = "foo"; |
3659 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3659 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
3660 var obj = new api.Comment.fromJson(json); | 3660 var obj = new api.Comment.fromJson(json); |
3661 checkComment(obj); | 3661 checkComment(obj); |
3662 | 3662 |
3663 var path = (req.url).path; | 3663 var path = (req.url).path; |
3664 var pathOffset = 0; | 3664 var pathOffset = 0; |
3665 var index; | 3665 var index; |
3666 var subPart; | 3666 var subPart; |
3667 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3667 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
3668 pathOffset += 1; | 3668 pathOffset += 1; |
3669 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); | 3669 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); |
(...skipping 28 matching lines...) Expand all Loading... |
3698 } | 3698 } |
3699 } | 3699 } |
3700 | 3700 |
3701 | 3701 |
3702 var h = { | 3702 var h = { |
3703 "content-type" : "application/json; charset=utf-8", | 3703 "content-type" : "application/json; charset=utf-8", |
3704 }; | 3704 }; |
3705 var resp = convert.JSON.encode(buildComment()); | 3705 var resp = convert.JSON.encode(buildComment()); |
3706 return new async.Future.value(stringResponse(200, h, resp)); | 3706 return new async.Future.value(stringResponse(200, h, resp)); |
3707 }), true); | 3707 }), true); |
3708 res.update(arg_request, arg_fileId, arg_commentId).then(unittest.expectAsy
nc(((api.Comment response) { | 3708 res.update(arg_request, arg_fileId, arg_commentId).then(unittest.expectAsy
nc1(((api.Comment response) { |
3709 checkComment(response); | 3709 checkComment(response); |
3710 }))); | 3710 }))); |
3711 }); | 3711 }); |
3712 | 3712 |
3713 }); | 3713 }); |
3714 | 3714 |
3715 | 3715 |
3716 unittest.group("resource-FilesResourceApi", () { | 3716 unittest.group("resource-FilesResourceApi", () { |
3717 unittest.test("method--copy", () { | 3717 unittest.test("method--copy", () { |
3718 | 3718 |
3719 var mock = new HttpServerMock(); | 3719 var mock = new HttpServerMock(); |
3720 api.FilesResourceApi res = new api.DriveApi(mock).files; | 3720 api.FilesResourceApi res = new api.DriveApi(mock).files; |
3721 var arg_request = buildFile(); | 3721 var arg_request = buildFile(); |
3722 var arg_fileId = "foo"; | 3722 var arg_fileId = "foo"; |
3723 var arg_convert = true; | 3723 var arg_convert = true; |
3724 var arg_ocr = true; | 3724 var arg_ocr = true; |
3725 var arg_ocrLanguage = "foo"; | 3725 var arg_ocrLanguage = "foo"; |
3726 var arg_pinned = true; | 3726 var arg_pinned = true; |
3727 var arg_supportsTeamDrives = true; | 3727 var arg_supportsTeamDrives = true; |
3728 var arg_timedTextLanguage = "foo"; | 3728 var arg_timedTextLanguage = "foo"; |
3729 var arg_timedTextTrackName = "foo"; | 3729 var arg_timedTextTrackName = "foo"; |
3730 var arg_visibility = "foo"; | 3730 var arg_visibility = "foo"; |
3731 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3731 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
3732 var obj = new api.File.fromJson(json); | 3732 var obj = new api.File.fromJson(json); |
3733 checkFile(obj); | 3733 checkFile(obj); |
3734 | 3734 |
3735 var path = (req.url).path; | 3735 var path = (req.url).path; |
3736 var pathOffset = 0; | 3736 var pathOffset = 0; |
3737 var index; | 3737 var index; |
3738 var subPart; | 3738 var subPart; |
3739 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3739 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
3740 pathOffset += 1; | 3740 pathOffset += 1; |
3741 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); | 3741 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3775 unittest.expect(queryMap["timedTextTrackName"].first, unittest.equals(ar
g_timedTextTrackName)); | 3775 unittest.expect(queryMap["timedTextTrackName"].first, unittest.equals(ar
g_timedTextTrackName)); |
3776 unittest.expect(queryMap["visibility"].first, unittest.equals(arg_visibi
lity)); | 3776 unittest.expect(queryMap["visibility"].first, unittest.equals(arg_visibi
lity)); |
3777 | 3777 |
3778 | 3778 |
3779 var h = { | 3779 var h = { |
3780 "content-type" : "application/json; charset=utf-8", | 3780 "content-type" : "application/json; charset=utf-8", |
3781 }; | 3781 }; |
3782 var resp = convert.JSON.encode(buildFile()); | 3782 var resp = convert.JSON.encode(buildFile()); |
3783 return new async.Future.value(stringResponse(200, h, resp)); | 3783 return new async.Future.value(stringResponse(200, h, resp)); |
3784 }), true); | 3784 }), true); |
3785 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) { | 3785 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.expectAsync1(((api.Fil
e response) { |
3786 checkFile(response); | 3786 checkFile(response); |
3787 }))); | 3787 }))); |
3788 }); | 3788 }); |
3789 | 3789 |
3790 unittest.test("method--delete", () { | 3790 unittest.test("method--delete", () { |
3791 | 3791 |
3792 var mock = new HttpServerMock(); | 3792 var mock = new HttpServerMock(); |
3793 api.FilesResourceApi res = new api.DriveApi(mock).files; | 3793 api.FilesResourceApi res = new api.DriveApi(mock).files; |
3794 var arg_fileId = "foo"; | 3794 var arg_fileId = "foo"; |
3795 var arg_supportsTeamDrives = true; | 3795 var arg_supportsTeamDrives = true; |
3796 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3796 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
3797 var path = (req.url).path; | 3797 var path = (req.url).path; |
3798 var pathOffset = 0; | 3798 var pathOffset = 0; |
3799 var index; | 3799 var index; |
3800 var subPart; | 3800 var subPart; |
3801 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3801 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
3802 pathOffset += 1; | 3802 pathOffset += 1; |
3803 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); | 3803 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); |
3804 pathOffset += 9; | 3804 pathOffset += 9; |
3805 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ
als("files/")); | 3805 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ
als("files/")); |
3806 pathOffset += 6; | 3806 pathOffset += 6; |
(...skipping 19 matching lines...) Expand all Loading... |
3826 } | 3826 } |
3827 unittest.expect(queryMap["supportsTeamDrives"].first, unittest.equals("$
arg_supportsTeamDrives")); | 3827 unittest.expect(queryMap["supportsTeamDrives"].first, unittest.equals("$
arg_supportsTeamDrives")); |
3828 | 3828 |
3829 | 3829 |
3830 var h = { | 3830 var h = { |
3831 "content-type" : "application/json; charset=utf-8", | 3831 "content-type" : "application/json; charset=utf-8", |
3832 }; | 3832 }; |
3833 var resp = ""; | 3833 var resp = ""; |
3834 return new async.Future.value(stringResponse(200, h, resp)); | 3834 return new async.Future.value(stringResponse(200, h, resp)); |
3835 }), true); | 3835 }), true); |
3836 res.delete(arg_fileId, supportsTeamDrives: arg_supportsTeamDrives).then(un
ittest.expectAsync((_) {})); | 3836 res.delete(arg_fileId, supportsTeamDrives: arg_supportsTeamDrives).then(un
ittest.expectAsync1((_) {})); |
3837 }); | 3837 }); |
3838 | 3838 |
3839 unittest.test("method--emptyTrash", () { | 3839 unittest.test("method--emptyTrash", () { |
3840 | 3840 |
3841 var mock = new HttpServerMock(); | 3841 var mock = new HttpServerMock(); |
3842 api.FilesResourceApi res = new api.DriveApi(mock).files; | 3842 api.FilesResourceApi res = new api.DriveApi(mock).files; |
3843 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3843 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
3844 var path = (req.url).path; | 3844 var path = (req.url).path; |
3845 var pathOffset = 0; | 3845 var pathOffset = 0; |
3846 var index; | 3846 var index; |
3847 var subPart; | 3847 var subPart; |
3848 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3848 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
3849 pathOffset += 1; | 3849 pathOffset += 1; |
3850 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); | 3850 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); |
3851 pathOffset += 9; | 3851 pathOffset += 9; |
3852 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("files/trash")); | 3852 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("files/trash")); |
3853 pathOffset += 11; | 3853 pathOffset += 11; |
(...skipping 15 matching lines...) Expand all Loading... |
3869 } | 3869 } |
3870 } | 3870 } |
3871 | 3871 |
3872 | 3872 |
3873 var h = { | 3873 var h = { |
3874 "content-type" : "application/json; charset=utf-8", | 3874 "content-type" : "application/json; charset=utf-8", |
3875 }; | 3875 }; |
3876 var resp = ""; | 3876 var resp = ""; |
3877 return new async.Future.value(stringResponse(200, h, resp)); | 3877 return new async.Future.value(stringResponse(200, h, resp)); |
3878 }), true); | 3878 }), true); |
3879 res.emptyTrash().then(unittest.expectAsync((_) {})); | 3879 res.emptyTrash().then(unittest.expectAsync1((_) {})); |
3880 }); | 3880 }); |
3881 | 3881 |
3882 unittest.test("method--export", () { | 3882 unittest.test("method--export", () { |
3883 // TODO: Implement tests for media upload; | 3883 // TODO: Implement tests for media upload; |
3884 // TODO: Implement tests for media download; | 3884 // TODO: Implement tests for media download; |
3885 | 3885 |
3886 var mock = new HttpServerMock(); | 3886 var mock = new HttpServerMock(); |
3887 api.FilesResourceApi res = new api.DriveApi(mock).files; | 3887 api.FilesResourceApi res = new api.DriveApi(mock).files; |
3888 var arg_fileId = "foo"; | 3888 var arg_fileId = "foo"; |
3889 var arg_mimeType = "foo"; | 3889 var arg_mimeType = "foo"; |
3890 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3890 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
3891 var path = (req.url).path; | 3891 var path = (req.url).path; |
3892 var pathOffset = 0; | 3892 var pathOffset = 0; |
3893 var index; | 3893 var index; |
3894 var subPart; | 3894 var subPart; |
3895 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3895 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
3896 pathOffset += 1; | 3896 pathOffset += 1; |
3897 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); | 3897 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); |
3898 pathOffset += 9; | 3898 pathOffset += 9; |
3899 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ
als("files/")); | 3899 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ
als("files/")); |
3900 pathOffset += 6; | 3900 pathOffset += 6; |
(...skipping 23 matching lines...) Expand all Loading... |
3924 } | 3924 } |
3925 unittest.expect(queryMap["mimeType"].first, unittest.equals(arg_mimeType
)); | 3925 unittest.expect(queryMap["mimeType"].first, unittest.equals(arg_mimeType
)); |
3926 | 3926 |
3927 | 3927 |
3928 var h = { | 3928 var h = { |
3929 "content-type" : "application/json; charset=utf-8", | 3929 "content-type" : "application/json; charset=utf-8", |
3930 }; | 3930 }; |
3931 var resp = ""; | 3931 var resp = ""; |
3932 return new async.Future.value(stringResponse(200, h, resp)); | 3932 return new async.Future.value(stringResponse(200, h, resp)); |
3933 }), true); | 3933 }), true); |
3934 res.export(arg_fileId, arg_mimeType).then(unittest.expectAsync((_) {})); | 3934 res.export(arg_fileId, arg_mimeType).then(unittest.expectAsync1((_) {})); |
3935 }); | 3935 }); |
3936 | 3936 |
3937 unittest.test("method--generateIds", () { | 3937 unittest.test("method--generateIds", () { |
3938 | 3938 |
3939 var mock = new HttpServerMock(); | 3939 var mock = new HttpServerMock(); |
3940 api.FilesResourceApi res = new api.DriveApi(mock).files; | 3940 api.FilesResourceApi res = new api.DriveApi(mock).files; |
3941 var arg_maxResults = 42; | 3941 var arg_maxResults = 42; |
3942 var arg_space = "foo"; | 3942 var arg_space = "foo"; |
3943 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3943 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
3944 var path = (req.url).path; | 3944 var path = (req.url).path; |
3945 var pathOffset = 0; | 3945 var pathOffset = 0; |
3946 var index; | 3946 var index; |
3947 var subPart; | 3947 var subPart; |
3948 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3948 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
3949 pathOffset += 1; | 3949 pathOffset += 1; |
3950 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); | 3950 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); |
3951 pathOffset += 9; | 3951 pathOffset += 9; |
3952 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("files/generateIds")); | 3952 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("files/generateIds")); |
3953 pathOffset += 17; | 3953 pathOffset += 17; |
(...skipping 17 matching lines...) Expand all Loading... |
3971 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | 3971 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); |
3972 unittest.expect(queryMap["space"].first, unittest.equals(arg_space)); | 3972 unittest.expect(queryMap["space"].first, unittest.equals(arg_space)); |
3973 | 3973 |
3974 | 3974 |
3975 var h = { | 3975 var h = { |
3976 "content-type" : "application/json; charset=utf-8", | 3976 "content-type" : "application/json; charset=utf-8", |
3977 }; | 3977 }; |
3978 var resp = convert.JSON.encode(buildGeneratedIds()); | 3978 var resp = convert.JSON.encode(buildGeneratedIds()); |
3979 return new async.Future.value(stringResponse(200, h, resp)); | 3979 return new async.Future.value(stringResponse(200, h, resp)); |
3980 }), true); | 3980 }), true); |
3981 res.generateIds(maxResults: arg_maxResults, space: arg_space).then(unittes
t.expectAsync(((api.GeneratedIds response) { | 3981 res.generateIds(maxResults: arg_maxResults, space: arg_space).then(unittes
t.expectAsync1(((api.GeneratedIds response) { |
3982 checkGeneratedIds(response); | 3982 checkGeneratedIds(response); |
3983 }))); | 3983 }))); |
3984 }); | 3984 }); |
3985 | 3985 |
3986 unittest.test("method--get", () { | 3986 unittest.test("method--get", () { |
3987 // TODO: Implement tests for media upload; | 3987 // TODO: Implement tests for media upload; |
3988 // TODO: Implement tests for media download; | 3988 // TODO: Implement tests for media download; |
3989 | 3989 |
3990 var mock = new HttpServerMock(); | 3990 var mock = new HttpServerMock(); |
3991 api.FilesResourceApi res = new api.DriveApi(mock).files; | 3991 api.FilesResourceApi res = new api.DriveApi(mock).files; |
3992 var arg_fileId = "foo"; | 3992 var arg_fileId = "foo"; |
3993 var arg_acknowledgeAbuse = true; | 3993 var arg_acknowledgeAbuse = true; |
3994 var arg_projection = "foo"; | 3994 var arg_projection = "foo"; |
3995 var arg_revisionId = "foo"; | 3995 var arg_revisionId = "foo"; |
3996 var arg_supportsTeamDrives = true; | 3996 var arg_supportsTeamDrives = true; |
3997 var arg_updateViewedDate = true; | 3997 var arg_updateViewedDate = true; |
3998 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3998 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
3999 var path = (req.url).path; | 3999 var path = (req.url).path; |
4000 var pathOffset = 0; | 4000 var pathOffset = 0; |
4001 var index; | 4001 var index; |
4002 var subPart; | 4002 var subPart; |
4003 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 4003 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
4004 pathOffset += 1; | 4004 pathOffset += 1; |
4005 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); | 4005 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); |
4006 pathOffset += 9; | 4006 pathOffset += 9; |
4007 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ
als("files/")); | 4007 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ
als("files/")); |
4008 pathOffset += 6; | 4008 pathOffset += 6; |
(...skipping 23 matching lines...) Expand all Loading... |
4032 unittest.expect(queryMap["supportsTeamDrives"].first, unittest.equals("$
arg_supportsTeamDrives")); | 4032 unittest.expect(queryMap["supportsTeamDrives"].first, unittest.equals("$
arg_supportsTeamDrives")); |
4033 unittest.expect(queryMap["updateViewedDate"].first, unittest.equals("$ar
g_updateViewedDate")); | 4033 unittest.expect(queryMap["updateViewedDate"].first, unittest.equals("$ar
g_updateViewedDate")); |
4034 | 4034 |
4035 | 4035 |
4036 var h = { | 4036 var h = { |
4037 "content-type" : "application/json; charset=utf-8", | 4037 "content-type" : "application/json; charset=utf-8", |
4038 }; | 4038 }; |
4039 var resp = convert.JSON.encode(buildFile()); | 4039 var resp = convert.JSON.encode(buildFile()); |
4040 return new async.Future.value(stringResponse(200, h, resp)); | 4040 return new async.Future.value(stringResponse(200, h, resp)); |
4041 }), true); | 4041 }), true); |
4042 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) { | 4042 res.get(arg_fileId, acknowledgeAbuse: arg_acknowledgeAbuse, projection: ar
g_projection, revisionId: arg_revisionId, supportsTeamDrives: arg_supportsTeamDr
ives, updateViewedDate: arg_updateViewedDate).then(unittest.expectAsync1(((api.F
ile response) { |
4043 checkFile(response); | 4043 checkFile(response); |
4044 }))); | 4044 }))); |
4045 }); | 4045 }); |
4046 | 4046 |
4047 unittest.test("method--insert", () { | 4047 unittest.test("method--insert", () { |
4048 // TODO: Implement tests for media upload; | 4048 // TODO: Implement tests for media upload; |
4049 // TODO: Implement tests for media download; | 4049 // TODO: Implement tests for media download; |
4050 | 4050 |
4051 var mock = new HttpServerMock(); | 4051 var mock = new HttpServerMock(); |
4052 api.FilesResourceApi res = new api.DriveApi(mock).files; | 4052 api.FilesResourceApi res = new api.DriveApi(mock).files; |
4053 var arg_request = buildFile(); | 4053 var arg_request = buildFile(); |
4054 var arg_convert = true; | 4054 var arg_convert = true; |
4055 var arg_ocr = true; | 4055 var arg_ocr = true; |
4056 var arg_ocrLanguage = "foo"; | 4056 var arg_ocrLanguage = "foo"; |
4057 var arg_pinned = true; | 4057 var arg_pinned = true; |
4058 var arg_supportsTeamDrives = true; | 4058 var arg_supportsTeamDrives = true; |
4059 var arg_timedTextLanguage = "foo"; | 4059 var arg_timedTextLanguage = "foo"; |
4060 var arg_timedTextTrackName = "foo"; | 4060 var arg_timedTextTrackName = "foo"; |
4061 var arg_useContentAsIndexableText = true; | 4061 var arg_useContentAsIndexableText = true; |
4062 var arg_visibility = "foo"; | 4062 var arg_visibility = "foo"; |
4063 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 4063 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
4064 var obj = new api.File.fromJson(json); | 4064 var obj = new api.File.fromJson(json); |
4065 checkFile(obj); | 4065 checkFile(obj); |
4066 | 4066 |
4067 var path = (req.url).path; | 4067 var path = (req.url).path; |
4068 var pathOffset = 0; | 4068 var pathOffset = 0; |
4069 var index; | 4069 var index; |
4070 var subPart; | 4070 var subPart; |
4071 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 4071 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
4072 pathOffset += 1; | 4072 pathOffset += 1; |
4073 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); | 4073 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); |
(...skipping 27 matching lines...) Expand all Loading... |
4101 unittest.expect(queryMap["useContentAsIndexableText"].first, unittest.eq
uals("$arg_useContentAsIndexableText")); | 4101 unittest.expect(queryMap["useContentAsIndexableText"].first, unittest.eq
uals("$arg_useContentAsIndexableText")); |
4102 unittest.expect(queryMap["visibility"].first, unittest.equals(arg_visibi
lity)); | 4102 unittest.expect(queryMap["visibility"].first, unittest.equals(arg_visibi
lity)); |
4103 | 4103 |
4104 | 4104 |
4105 var h = { | 4105 var h = { |
4106 "content-type" : "application/json; charset=utf-8", | 4106 "content-type" : "application/json; charset=utf-8", |
4107 }; | 4107 }; |
4108 var resp = convert.JSON.encode(buildFile()); | 4108 var resp = convert.JSON.encode(buildFile()); |
4109 return new async.Future.value(stringResponse(200, h, resp)); | 4109 return new async.Future.value(stringResponse(200, h, resp)); |
4110 }), true); | 4110 }), true); |
4111 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) { | 4111 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.expectAsync1(((api.File response) { |
4112 checkFile(response); | 4112 checkFile(response); |
4113 }))); | 4113 }))); |
4114 }); | 4114 }); |
4115 | 4115 |
4116 unittest.test("method--list", () { | 4116 unittest.test("method--list", () { |
4117 | 4117 |
4118 var mock = new HttpServerMock(); | 4118 var mock = new HttpServerMock(); |
4119 api.FilesResourceApi res = new api.DriveApi(mock).files; | 4119 api.FilesResourceApi res = new api.DriveApi(mock).files; |
4120 var arg_corpora = "foo"; | 4120 var arg_corpora = "foo"; |
4121 var arg_corpus = "foo"; | 4121 var arg_corpus = "foo"; |
4122 var arg_includeTeamDriveItems = true; | 4122 var arg_includeTeamDriveItems = true; |
4123 var arg_maxResults = 42; | 4123 var arg_maxResults = 42; |
4124 var arg_orderBy = "foo"; | 4124 var arg_orderBy = "foo"; |
4125 var arg_pageToken = "foo"; | 4125 var arg_pageToken = "foo"; |
4126 var arg_projection = "foo"; | 4126 var arg_projection = "foo"; |
4127 var arg_q = "foo"; | 4127 var arg_q = "foo"; |
4128 var arg_spaces = "foo"; | 4128 var arg_spaces = "foo"; |
4129 var arg_supportsTeamDrives = true; | 4129 var arg_supportsTeamDrives = true; |
4130 var arg_teamDriveId = "foo"; | 4130 var arg_teamDriveId = "foo"; |
4131 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 4131 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
4132 var path = (req.url).path; | 4132 var path = (req.url).path; |
4133 var pathOffset = 0; | 4133 var pathOffset = 0; |
4134 var index; | 4134 var index; |
4135 var subPart; | 4135 var subPart; |
4136 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 4136 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
4137 pathOffset += 1; | 4137 pathOffset += 1; |
4138 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); | 4138 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); |
4139 pathOffset += 9; | 4139 pathOffset += 9; |
4140 unittest.expect(path.substring(pathOffset, pathOffset + 5), unittest.equ
als("files")); | 4140 unittest.expect(path.substring(pathOffset, pathOffset + 5), unittest.equ
als("files")); |
4141 pathOffset += 5; | 4141 pathOffset += 5; |
(...skipping 26 matching lines...) Expand all Loading... |
4168 unittest.expect(queryMap["supportsTeamDrives"].first, unittest.equals("$
arg_supportsTeamDrives")); | 4168 unittest.expect(queryMap["supportsTeamDrives"].first, unittest.equals("$
arg_supportsTeamDrives")); |
4169 unittest.expect(queryMap["teamDriveId"].first, unittest.equals(arg_teamD
riveId)); | 4169 unittest.expect(queryMap["teamDriveId"].first, unittest.equals(arg_teamD
riveId)); |
4170 | 4170 |
4171 | 4171 |
4172 var h = { | 4172 var h = { |
4173 "content-type" : "application/json; charset=utf-8", | 4173 "content-type" : "application/json; charset=utf-8", |
4174 }; | 4174 }; |
4175 var resp = convert.JSON.encode(buildFileList()); | 4175 var resp = convert.JSON.encode(buildFileList()); |
4176 return new async.Future.value(stringResponse(200, h, resp)); | 4176 return new async.Future.value(stringResponse(200, h, resp)); |
4177 }), true); | 4177 }), true); |
4178 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) { | 4178 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.expectAsync1(((api.FileList response) { |
4179 checkFileList(response); | 4179 checkFileList(response); |
4180 }))); | 4180 }))); |
4181 }); | 4181 }); |
4182 | 4182 |
4183 unittest.test("method--patch", () { | 4183 unittest.test("method--patch", () { |
4184 | 4184 |
4185 var mock = new HttpServerMock(); | 4185 var mock = new HttpServerMock(); |
4186 api.FilesResourceApi res = new api.DriveApi(mock).files; | 4186 api.FilesResourceApi res = new api.DriveApi(mock).files; |
4187 var arg_request = buildFile(); | 4187 var arg_request = buildFile(); |
4188 var arg_fileId = "foo"; | 4188 var arg_fileId = "foo"; |
4189 var arg_addParents = "foo"; | 4189 var arg_addParents = "foo"; |
4190 var arg_convert = true; | 4190 var arg_convert = true; |
4191 var arg_modifiedDateBehavior = "foo"; | 4191 var arg_modifiedDateBehavior = "foo"; |
4192 var arg_newRevision = true; | 4192 var arg_newRevision = true; |
4193 var arg_ocr = true; | 4193 var arg_ocr = true; |
4194 var arg_ocrLanguage = "foo"; | 4194 var arg_ocrLanguage = "foo"; |
4195 var arg_pinned = true; | 4195 var arg_pinned = true; |
4196 var arg_removeParents = "foo"; | 4196 var arg_removeParents = "foo"; |
4197 var arg_setModifiedDate = true; | 4197 var arg_setModifiedDate = true; |
4198 var arg_supportsTeamDrives = true; | 4198 var arg_supportsTeamDrives = true; |
4199 var arg_timedTextLanguage = "foo"; | 4199 var arg_timedTextLanguage = "foo"; |
4200 var arg_timedTextTrackName = "foo"; | 4200 var arg_timedTextTrackName = "foo"; |
4201 var arg_updateViewedDate = true; | 4201 var arg_updateViewedDate = true; |
4202 var arg_useContentAsIndexableText = true; | 4202 var arg_useContentAsIndexableText = true; |
4203 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 4203 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
4204 var obj = new api.File.fromJson(json); | 4204 var obj = new api.File.fromJson(json); |
4205 checkFile(obj); | 4205 checkFile(obj); |
4206 | 4206 |
4207 var path = (req.url).path; | 4207 var path = (req.url).path; |
4208 var pathOffset = 0; | 4208 var pathOffset = 0; |
4209 var index; | 4209 var index; |
4210 var subPart; | 4210 var subPart; |
4211 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 4211 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
4212 pathOffset += 1; | 4212 pathOffset += 1; |
4213 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); | 4213 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4249 unittest.expect(queryMap["updateViewedDate"].first, unittest.equals("$ar
g_updateViewedDate")); | 4249 unittest.expect(queryMap["updateViewedDate"].first, unittest.equals("$ar
g_updateViewedDate")); |
4250 unittest.expect(queryMap["useContentAsIndexableText"].first, unittest.eq
uals("$arg_useContentAsIndexableText")); | 4250 unittest.expect(queryMap["useContentAsIndexableText"].first, unittest.eq
uals("$arg_useContentAsIndexableText")); |
4251 | 4251 |
4252 | 4252 |
4253 var h = { | 4253 var h = { |
4254 "content-type" : "application/json; charset=utf-8", | 4254 "content-type" : "application/json; charset=utf-8", |
4255 }; | 4255 }; |
4256 var resp = convert.JSON.encode(buildFile()); | 4256 var resp = convert.JSON.encode(buildFile()); |
4257 return new async.Future.value(stringResponse(200, h, resp)); | 4257 return new async.Future.value(stringResponse(200, h, resp)); |
4258 }), true); | 4258 }), true); |
4259 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) { | 4259 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.expectAsync1(
((api.File response) { |
4260 checkFile(response); | 4260 checkFile(response); |
4261 }))); | 4261 }))); |
4262 }); | 4262 }); |
4263 | 4263 |
4264 unittest.test("method--touch", () { | 4264 unittest.test("method--touch", () { |
4265 | 4265 |
4266 var mock = new HttpServerMock(); | 4266 var mock = new HttpServerMock(); |
4267 api.FilesResourceApi res = new api.DriveApi(mock).files; | 4267 api.FilesResourceApi res = new api.DriveApi(mock).files; |
4268 var arg_fileId = "foo"; | 4268 var arg_fileId = "foo"; |
4269 var arg_supportsTeamDrives = true; | 4269 var arg_supportsTeamDrives = true; |
4270 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 4270 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
4271 var path = (req.url).path; | 4271 var path = (req.url).path; |
4272 var pathOffset = 0; | 4272 var pathOffset = 0; |
4273 var index; | 4273 var index; |
4274 var subPart; | 4274 var subPart; |
4275 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 4275 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
4276 pathOffset += 1; | 4276 pathOffset += 1; |
4277 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); | 4277 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); |
4278 pathOffset += 9; | 4278 pathOffset += 9; |
4279 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ
als("files/")); | 4279 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ
als("files/")); |
4280 pathOffset += 6; | 4280 pathOffset += 6; |
(...skipping 23 matching lines...) Expand all Loading... |
4304 } | 4304 } |
4305 unittest.expect(queryMap["supportsTeamDrives"].first, unittest.equals("$
arg_supportsTeamDrives")); | 4305 unittest.expect(queryMap["supportsTeamDrives"].first, unittest.equals("$
arg_supportsTeamDrives")); |
4306 | 4306 |
4307 | 4307 |
4308 var h = { | 4308 var h = { |
4309 "content-type" : "application/json; charset=utf-8", | 4309 "content-type" : "application/json; charset=utf-8", |
4310 }; | 4310 }; |
4311 var resp = convert.JSON.encode(buildFile()); | 4311 var resp = convert.JSON.encode(buildFile()); |
4312 return new async.Future.value(stringResponse(200, h, resp)); | 4312 return new async.Future.value(stringResponse(200, h, resp)); |
4313 }), true); | 4313 }), true); |
4314 res.touch(arg_fileId, supportsTeamDrives: arg_supportsTeamDrives).then(uni
ttest.expectAsync(((api.File response) { | 4314 res.touch(arg_fileId, supportsTeamDrives: arg_supportsTeamDrives).then(uni
ttest.expectAsync1(((api.File response) { |
4315 checkFile(response); | 4315 checkFile(response); |
4316 }))); | 4316 }))); |
4317 }); | 4317 }); |
4318 | 4318 |
4319 unittest.test("method--trash", () { | 4319 unittest.test("method--trash", () { |
4320 | 4320 |
4321 var mock = new HttpServerMock(); | 4321 var mock = new HttpServerMock(); |
4322 api.FilesResourceApi res = new api.DriveApi(mock).files; | 4322 api.FilesResourceApi res = new api.DriveApi(mock).files; |
4323 var arg_fileId = "foo"; | 4323 var arg_fileId = "foo"; |
4324 var arg_supportsTeamDrives = true; | 4324 var arg_supportsTeamDrives = true; |
4325 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 4325 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
4326 var path = (req.url).path; | 4326 var path = (req.url).path; |
4327 var pathOffset = 0; | 4327 var pathOffset = 0; |
4328 var index; | 4328 var index; |
4329 var subPart; | 4329 var subPart; |
4330 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 4330 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
4331 pathOffset += 1; | 4331 pathOffset += 1; |
4332 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); | 4332 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); |
4333 pathOffset += 9; | 4333 pathOffset += 9; |
4334 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ
als("files/")); | 4334 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ
als("files/")); |
4335 pathOffset += 6; | 4335 pathOffset += 6; |
(...skipping 23 matching lines...) Expand all Loading... |
4359 } | 4359 } |
4360 unittest.expect(queryMap["supportsTeamDrives"].first, unittest.equals("$
arg_supportsTeamDrives")); | 4360 unittest.expect(queryMap["supportsTeamDrives"].first, unittest.equals("$
arg_supportsTeamDrives")); |
4361 | 4361 |
4362 | 4362 |
4363 var h = { | 4363 var h = { |
4364 "content-type" : "application/json; charset=utf-8", | 4364 "content-type" : "application/json; charset=utf-8", |
4365 }; | 4365 }; |
4366 var resp = convert.JSON.encode(buildFile()); | 4366 var resp = convert.JSON.encode(buildFile()); |
4367 return new async.Future.value(stringResponse(200, h, resp)); | 4367 return new async.Future.value(stringResponse(200, h, resp)); |
4368 }), true); | 4368 }), true); |
4369 res.trash(arg_fileId, supportsTeamDrives: arg_supportsTeamDrives).then(uni
ttest.expectAsync(((api.File response) { | 4369 res.trash(arg_fileId, supportsTeamDrives: arg_supportsTeamDrives).then(uni
ttest.expectAsync1(((api.File response) { |
4370 checkFile(response); | 4370 checkFile(response); |
4371 }))); | 4371 }))); |
4372 }); | 4372 }); |
4373 | 4373 |
4374 unittest.test("method--untrash", () { | 4374 unittest.test("method--untrash", () { |
4375 | 4375 |
4376 var mock = new HttpServerMock(); | 4376 var mock = new HttpServerMock(); |
4377 api.FilesResourceApi res = new api.DriveApi(mock).files; | 4377 api.FilesResourceApi res = new api.DriveApi(mock).files; |
4378 var arg_fileId = "foo"; | 4378 var arg_fileId = "foo"; |
4379 var arg_supportsTeamDrives = true; | 4379 var arg_supportsTeamDrives = true; |
4380 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 4380 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
4381 var path = (req.url).path; | 4381 var path = (req.url).path; |
4382 var pathOffset = 0; | 4382 var pathOffset = 0; |
4383 var index; | 4383 var index; |
4384 var subPart; | 4384 var subPart; |
4385 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 4385 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
4386 pathOffset += 1; | 4386 pathOffset += 1; |
4387 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); | 4387 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); |
4388 pathOffset += 9; | 4388 pathOffset += 9; |
4389 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ
als("files/")); | 4389 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ
als("files/")); |
4390 pathOffset += 6; | 4390 pathOffset += 6; |
(...skipping 23 matching lines...) Expand all Loading... |
4414 } | 4414 } |
4415 unittest.expect(queryMap["supportsTeamDrives"].first, unittest.equals("$
arg_supportsTeamDrives")); | 4415 unittest.expect(queryMap["supportsTeamDrives"].first, unittest.equals("$
arg_supportsTeamDrives")); |
4416 | 4416 |
4417 | 4417 |
4418 var h = { | 4418 var h = { |
4419 "content-type" : "application/json; charset=utf-8", | 4419 "content-type" : "application/json; charset=utf-8", |
4420 }; | 4420 }; |
4421 var resp = convert.JSON.encode(buildFile()); | 4421 var resp = convert.JSON.encode(buildFile()); |
4422 return new async.Future.value(stringResponse(200, h, resp)); | 4422 return new async.Future.value(stringResponse(200, h, resp)); |
4423 }), true); | 4423 }), true); |
4424 res.untrash(arg_fileId, supportsTeamDrives: arg_supportsTeamDrives).then(u
nittest.expectAsync(((api.File response) { | 4424 res.untrash(arg_fileId, supportsTeamDrives: arg_supportsTeamDrives).then(u
nittest.expectAsync1(((api.File response) { |
4425 checkFile(response); | 4425 checkFile(response); |
4426 }))); | 4426 }))); |
4427 }); | 4427 }); |
4428 | 4428 |
4429 unittest.test("method--update", () { | 4429 unittest.test("method--update", () { |
4430 // TODO: Implement tests for media upload; | 4430 // TODO: Implement tests for media upload; |
4431 // TODO: Implement tests for media download; | 4431 // TODO: Implement tests for media download; |
4432 | 4432 |
4433 var mock = new HttpServerMock(); | 4433 var mock = new HttpServerMock(); |
4434 api.FilesResourceApi res = new api.DriveApi(mock).files; | 4434 api.FilesResourceApi res = new api.DriveApi(mock).files; |
4435 var arg_request = buildFile(); | 4435 var arg_request = buildFile(); |
4436 var arg_fileId = "foo"; | 4436 var arg_fileId = "foo"; |
4437 var arg_addParents = "foo"; | 4437 var arg_addParents = "foo"; |
4438 var arg_convert = true; | 4438 var arg_convert = true; |
4439 var arg_modifiedDateBehavior = "foo"; | 4439 var arg_modifiedDateBehavior = "foo"; |
4440 var arg_newRevision = true; | 4440 var arg_newRevision = true; |
4441 var arg_ocr = true; | 4441 var arg_ocr = true; |
4442 var arg_ocrLanguage = "foo"; | 4442 var arg_ocrLanguage = "foo"; |
4443 var arg_pinned = true; | 4443 var arg_pinned = true; |
4444 var arg_removeParents = "foo"; | 4444 var arg_removeParents = "foo"; |
4445 var arg_setModifiedDate = true; | 4445 var arg_setModifiedDate = true; |
4446 var arg_supportsTeamDrives = true; | 4446 var arg_supportsTeamDrives = true; |
4447 var arg_timedTextLanguage = "foo"; | 4447 var arg_timedTextLanguage = "foo"; |
4448 var arg_timedTextTrackName = "foo"; | 4448 var arg_timedTextTrackName = "foo"; |
4449 var arg_updateViewedDate = true; | 4449 var arg_updateViewedDate = true; |
4450 var arg_useContentAsIndexableText = true; | 4450 var arg_useContentAsIndexableText = true; |
4451 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 4451 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
4452 var obj = new api.File.fromJson(json); | 4452 var obj = new api.File.fromJson(json); |
4453 checkFile(obj); | 4453 checkFile(obj); |
4454 | 4454 |
4455 var path = (req.url).path; | 4455 var path = (req.url).path; |
4456 var pathOffset = 0; | 4456 var pathOffset = 0; |
4457 var index; | 4457 var index; |
4458 var subPart; | 4458 var subPart; |
4459 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 4459 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
4460 pathOffset += 1; | 4460 pathOffset += 1; |
4461 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); | 4461 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4497 unittest.expect(queryMap["updateViewedDate"].first, unittest.equals("$ar
g_updateViewedDate")); | 4497 unittest.expect(queryMap["updateViewedDate"].first, unittest.equals("$ar
g_updateViewedDate")); |
4498 unittest.expect(queryMap["useContentAsIndexableText"].first, unittest.eq
uals("$arg_useContentAsIndexableText")); | 4498 unittest.expect(queryMap["useContentAsIndexableText"].first, unittest.eq
uals("$arg_useContentAsIndexableText")); |
4499 | 4499 |
4500 | 4500 |
4501 var h = { | 4501 var h = { |
4502 "content-type" : "application/json; charset=utf-8", | 4502 "content-type" : "application/json; charset=utf-8", |
4503 }; | 4503 }; |
4504 var resp = convert.JSON.encode(buildFile()); | 4504 var resp = convert.JSON.encode(buildFile()); |
4505 return new async.Future.value(stringResponse(200, h, resp)); | 4505 return new async.Future.value(stringResponse(200, h, resp)); |
4506 }), true); | 4506 }), true); |
4507 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) { | 4507 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.expectAsync1
(((api.File response) { |
4508 checkFile(response); | 4508 checkFile(response); |
4509 }))); | 4509 }))); |
4510 }); | 4510 }); |
4511 | 4511 |
4512 unittest.test("method--watch", () { | 4512 unittest.test("method--watch", () { |
4513 // TODO: Implement tests for media upload; | 4513 // TODO: Implement tests for media upload; |
4514 // TODO: Implement tests for media download; | 4514 // TODO: Implement tests for media download; |
4515 | 4515 |
4516 var mock = new HttpServerMock(); | 4516 var mock = new HttpServerMock(); |
4517 api.FilesResourceApi res = new api.DriveApi(mock).files; | 4517 api.FilesResourceApi res = new api.DriveApi(mock).files; |
4518 var arg_request = buildChannel(); | 4518 var arg_request = buildChannel(); |
4519 var arg_fileId = "foo"; | 4519 var arg_fileId = "foo"; |
4520 var arg_acknowledgeAbuse = true; | 4520 var arg_acknowledgeAbuse = true; |
4521 var arg_projection = "foo"; | 4521 var arg_projection = "foo"; |
4522 var arg_revisionId = "foo"; | 4522 var arg_revisionId = "foo"; |
4523 var arg_supportsTeamDrives = true; | 4523 var arg_supportsTeamDrives = true; |
4524 var arg_updateViewedDate = true; | 4524 var arg_updateViewedDate = true; |
4525 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 4525 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
4526 var obj = new api.Channel.fromJson(json); | 4526 var obj = new api.Channel.fromJson(json); |
4527 checkChannel(obj); | 4527 checkChannel(obj); |
4528 | 4528 |
4529 var path = (req.url).path; | 4529 var path = (req.url).path; |
4530 var pathOffset = 0; | 4530 var pathOffset = 0; |
4531 var index; | 4531 var index; |
4532 var subPart; | 4532 var subPart; |
4533 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 4533 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
4534 pathOffset += 1; | 4534 pathOffset += 1; |
4535 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); | 4535 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); |
(...skipping 30 matching lines...) Expand all Loading... |
4566 unittest.expect(queryMap["supportsTeamDrives"].first, unittest.equals("$
arg_supportsTeamDrives")); | 4566 unittest.expect(queryMap["supportsTeamDrives"].first, unittest.equals("$
arg_supportsTeamDrives")); |
4567 unittest.expect(queryMap["updateViewedDate"].first, unittest.equals("$ar
g_updateViewedDate")); | 4567 unittest.expect(queryMap["updateViewedDate"].first, unittest.equals("$ar
g_updateViewedDate")); |
4568 | 4568 |
4569 | 4569 |
4570 var h = { | 4570 var h = { |
4571 "content-type" : "application/json; charset=utf-8", | 4571 "content-type" : "application/json; charset=utf-8", |
4572 }; | 4572 }; |
4573 var resp = convert.JSON.encode(buildChannel()); | 4573 var resp = convert.JSON.encode(buildChannel()); |
4574 return new async.Future.value(stringResponse(200, h, resp)); | 4574 return new async.Future.value(stringResponse(200, h, resp)); |
4575 }), true); | 4575 }), true); |
4576 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) { | 4576 res.watch(arg_request, arg_fileId, acknowledgeAbuse: arg_acknowledgeAbuse,
projection: arg_projection, revisionId: arg_revisionId, supportsTeamDrives: arg
_supportsTeamDrives, updateViewedDate: arg_updateViewedDate).then(unittest.expec
tAsync1(((api.Channel response) { |
4577 checkChannel(response); | 4577 checkChannel(response); |
4578 }))); | 4578 }))); |
4579 }); | 4579 }); |
4580 | 4580 |
4581 }); | 4581 }); |
4582 | 4582 |
4583 | 4583 |
4584 unittest.group("resource-ParentsResourceApi", () { | 4584 unittest.group("resource-ParentsResourceApi", () { |
4585 unittest.test("method--delete", () { | 4585 unittest.test("method--delete", () { |
4586 | 4586 |
4587 var mock = new HttpServerMock(); | 4587 var mock = new HttpServerMock(); |
4588 api.ParentsResourceApi res = new api.DriveApi(mock).parents; | 4588 api.ParentsResourceApi res = new api.DriveApi(mock).parents; |
4589 var arg_fileId = "foo"; | 4589 var arg_fileId = "foo"; |
4590 var arg_parentId = "foo"; | 4590 var arg_parentId = "foo"; |
4591 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 4591 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
4592 var path = (req.url).path; | 4592 var path = (req.url).path; |
4593 var pathOffset = 0; | 4593 var pathOffset = 0; |
4594 var index; | 4594 var index; |
4595 var subPart; | 4595 var subPart; |
4596 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 4596 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
4597 pathOffset += 1; | 4597 pathOffset += 1; |
4598 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); | 4598 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); |
4599 pathOffset += 9; | 4599 pathOffset += 9; |
4600 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ
als("files/")); | 4600 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ
als("files/")); |
4601 pathOffset += 6; | 4601 pathOffset += 6; |
(...skipping 25 matching lines...) Expand all Loading... |
4627 } | 4627 } |
4628 } | 4628 } |
4629 | 4629 |
4630 | 4630 |
4631 var h = { | 4631 var h = { |
4632 "content-type" : "application/json; charset=utf-8", | 4632 "content-type" : "application/json; charset=utf-8", |
4633 }; | 4633 }; |
4634 var resp = ""; | 4634 var resp = ""; |
4635 return new async.Future.value(stringResponse(200, h, resp)); | 4635 return new async.Future.value(stringResponse(200, h, resp)); |
4636 }), true); | 4636 }), true); |
4637 res.delete(arg_fileId, arg_parentId).then(unittest.expectAsync((_) {})); | 4637 res.delete(arg_fileId, arg_parentId).then(unittest.expectAsync1((_) {})); |
4638 }); | 4638 }); |
4639 | 4639 |
4640 unittest.test("method--get", () { | 4640 unittest.test("method--get", () { |
4641 | 4641 |
4642 var mock = new HttpServerMock(); | 4642 var mock = new HttpServerMock(); |
4643 api.ParentsResourceApi res = new api.DriveApi(mock).parents; | 4643 api.ParentsResourceApi res = new api.DriveApi(mock).parents; |
4644 var arg_fileId = "foo"; | 4644 var arg_fileId = "foo"; |
4645 var arg_parentId = "foo"; | 4645 var arg_parentId = "foo"; |
4646 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 4646 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
4647 var path = (req.url).path; | 4647 var path = (req.url).path; |
4648 var pathOffset = 0; | 4648 var pathOffset = 0; |
4649 var index; | 4649 var index; |
4650 var subPart; | 4650 var subPart; |
4651 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 4651 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
4652 pathOffset += 1; | 4652 pathOffset += 1; |
4653 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); | 4653 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); |
4654 pathOffset += 9; | 4654 pathOffset += 9; |
4655 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ
als("files/")); | 4655 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ
als("files/")); |
4656 pathOffset += 6; | 4656 pathOffset += 6; |
(...skipping 25 matching lines...) Expand all Loading... |
4682 } | 4682 } |
4683 } | 4683 } |
4684 | 4684 |
4685 | 4685 |
4686 var h = { | 4686 var h = { |
4687 "content-type" : "application/json; charset=utf-8", | 4687 "content-type" : "application/json; charset=utf-8", |
4688 }; | 4688 }; |
4689 var resp = convert.JSON.encode(buildParentReference()); | 4689 var resp = convert.JSON.encode(buildParentReference()); |
4690 return new async.Future.value(stringResponse(200, h, resp)); | 4690 return new async.Future.value(stringResponse(200, h, resp)); |
4691 }), true); | 4691 }), true); |
4692 res.get(arg_fileId, arg_parentId).then(unittest.expectAsync(((api.ParentRe
ference response) { | 4692 res.get(arg_fileId, arg_parentId).then(unittest.expectAsync1(((api.ParentR
eference response) { |
4693 checkParentReference(response); | 4693 checkParentReference(response); |
4694 }))); | 4694 }))); |
4695 }); | 4695 }); |
4696 | 4696 |
4697 unittest.test("method--insert", () { | 4697 unittest.test("method--insert", () { |
4698 | 4698 |
4699 var mock = new HttpServerMock(); | 4699 var mock = new HttpServerMock(); |
4700 api.ParentsResourceApi res = new api.DriveApi(mock).parents; | 4700 api.ParentsResourceApi res = new api.DriveApi(mock).parents; |
4701 var arg_request = buildParentReference(); | 4701 var arg_request = buildParentReference(); |
4702 var arg_fileId = "foo"; | 4702 var arg_fileId = "foo"; |
4703 var arg_supportsTeamDrives = true; | 4703 var arg_supportsTeamDrives = true; |
4704 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 4704 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
4705 var obj = new api.ParentReference.fromJson(json); | 4705 var obj = new api.ParentReference.fromJson(json); |
4706 checkParentReference(obj); | 4706 checkParentReference(obj); |
4707 | 4707 |
4708 var path = (req.url).path; | 4708 var path = (req.url).path; |
4709 var pathOffset = 0; | 4709 var pathOffset = 0; |
4710 var index; | 4710 var index; |
4711 var subPart; | 4711 var subPart; |
4712 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 4712 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
4713 pathOffset += 1; | 4713 pathOffset += 1; |
4714 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); | 4714 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); |
(...skipping 26 matching lines...) Expand all Loading... |
4741 } | 4741 } |
4742 unittest.expect(queryMap["supportsTeamDrives"].first, unittest.equals("$
arg_supportsTeamDrives")); | 4742 unittest.expect(queryMap["supportsTeamDrives"].first, unittest.equals("$
arg_supportsTeamDrives")); |
4743 | 4743 |
4744 | 4744 |
4745 var h = { | 4745 var h = { |
4746 "content-type" : "application/json; charset=utf-8", | 4746 "content-type" : "application/json; charset=utf-8", |
4747 }; | 4747 }; |
4748 var resp = convert.JSON.encode(buildParentReference()); | 4748 var resp = convert.JSON.encode(buildParentReference()); |
4749 return new async.Future.value(stringResponse(200, h, resp)); | 4749 return new async.Future.value(stringResponse(200, h, resp)); |
4750 }), true); | 4750 }), true); |
4751 res.insert(arg_request, arg_fileId, supportsTeamDrives: arg_supportsTeamDr
ives).then(unittest.expectAsync(((api.ParentReference response) { | 4751 res.insert(arg_request, arg_fileId, supportsTeamDrives: arg_supportsTeamDr
ives).then(unittest.expectAsync1(((api.ParentReference response) { |
4752 checkParentReference(response); | 4752 checkParentReference(response); |
4753 }))); | 4753 }))); |
4754 }); | 4754 }); |
4755 | 4755 |
4756 unittest.test("method--list", () { | 4756 unittest.test("method--list", () { |
4757 | 4757 |
4758 var mock = new HttpServerMock(); | 4758 var mock = new HttpServerMock(); |
4759 api.ParentsResourceApi res = new api.DriveApi(mock).parents; | 4759 api.ParentsResourceApi res = new api.DriveApi(mock).parents; |
4760 var arg_fileId = "foo"; | 4760 var arg_fileId = "foo"; |
4761 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 4761 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
4762 var path = (req.url).path; | 4762 var path = (req.url).path; |
4763 var pathOffset = 0; | 4763 var pathOffset = 0; |
4764 var index; | 4764 var index; |
4765 var subPart; | 4765 var subPart; |
4766 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 4766 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
4767 pathOffset += 1; | 4767 pathOffset += 1; |
4768 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); | 4768 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); |
4769 pathOffset += 9; | 4769 pathOffset += 9; |
4770 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ
als("files/")); | 4770 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ
als("files/")); |
4771 pathOffset += 6; | 4771 pathOffset += 6; |
(...skipping 22 matching lines...) Expand all Loading... |
4794 } | 4794 } |
4795 } | 4795 } |
4796 | 4796 |
4797 | 4797 |
4798 var h = { | 4798 var h = { |
4799 "content-type" : "application/json; charset=utf-8", | 4799 "content-type" : "application/json; charset=utf-8", |
4800 }; | 4800 }; |
4801 var resp = convert.JSON.encode(buildParentList()); | 4801 var resp = convert.JSON.encode(buildParentList()); |
4802 return new async.Future.value(stringResponse(200, h, resp)); | 4802 return new async.Future.value(stringResponse(200, h, resp)); |
4803 }), true); | 4803 }), true); |
4804 res.list(arg_fileId).then(unittest.expectAsync(((api.ParentList response)
{ | 4804 res.list(arg_fileId).then(unittest.expectAsync1(((api.ParentList response)
{ |
4805 checkParentList(response); | 4805 checkParentList(response); |
4806 }))); | 4806 }))); |
4807 }); | 4807 }); |
4808 | 4808 |
4809 }); | 4809 }); |
4810 | 4810 |
4811 | 4811 |
4812 unittest.group("resource-PermissionsResourceApi", () { | 4812 unittest.group("resource-PermissionsResourceApi", () { |
4813 unittest.test("method--delete", () { | 4813 unittest.test("method--delete", () { |
4814 | 4814 |
4815 var mock = new HttpServerMock(); | 4815 var mock = new HttpServerMock(); |
4816 api.PermissionsResourceApi res = new api.DriveApi(mock).permissions; | 4816 api.PermissionsResourceApi res = new api.DriveApi(mock).permissions; |
4817 var arg_fileId = "foo"; | 4817 var arg_fileId = "foo"; |
4818 var arg_permissionId = "foo"; | 4818 var arg_permissionId = "foo"; |
4819 var arg_supportsTeamDrives = true; | 4819 var arg_supportsTeamDrives = true; |
4820 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 4820 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
4821 var path = (req.url).path; | 4821 var path = (req.url).path; |
4822 var pathOffset = 0; | 4822 var pathOffset = 0; |
4823 var index; | 4823 var index; |
4824 var subPart; | 4824 var subPart; |
4825 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 4825 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
4826 pathOffset += 1; | 4826 pathOffset += 1; |
4827 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); | 4827 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); |
4828 pathOffset += 9; | 4828 pathOffset += 9; |
4829 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ
als("files/")); | 4829 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ
als("files/")); |
4830 pathOffset += 6; | 4830 pathOffset += 6; |
(...skipping 26 matching lines...) Expand all Loading... |
4857 } | 4857 } |
4858 unittest.expect(queryMap["supportsTeamDrives"].first, unittest.equals("$
arg_supportsTeamDrives")); | 4858 unittest.expect(queryMap["supportsTeamDrives"].first, unittest.equals("$
arg_supportsTeamDrives")); |
4859 | 4859 |
4860 | 4860 |
4861 var h = { | 4861 var h = { |
4862 "content-type" : "application/json; charset=utf-8", | 4862 "content-type" : "application/json; charset=utf-8", |
4863 }; | 4863 }; |
4864 var resp = ""; | 4864 var resp = ""; |
4865 return new async.Future.value(stringResponse(200, h, resp)); | 4865 return new async.Future.value(stringResponse(200, h, resp)); |
4866 }), true); | 4866 }), true); |
4867 res.delete(arg_fileId, arg_permissionId, supportsTeamDrives: arg_supportsT
eamDrives).then(unittest.expectAsync((_) {})); | 4867 res.delete(arg_fileId, arg_permissionId, supportsTeamDrives: arg_supportsT
eamDrives).then(unittest.expectAsync1((_) {})); |
4868 }); | 4868 }); |
4869 | 4869 |
4870 unittest.test("method--get", () { | 4870 unittest.test("method--get", () { |
4871 | 4871 |
4872 var mock = new HttpServerMock(); | 4872 var mock = new HttpServerMock(); |
4873 api.PermissionsResourceApi res = new api.DriveApi(mock).permissions; | 4873 api.PermissionsResourceApi res = new api.DriveApi(mock).permissions; |
4874 var arg_fileId = "foo"; | 4874 var arg_fileId = "foo"; |
4875 var arg_permissionId = "foo"; | 4875 var arg_permissionId = "foo"; |
4876 var arg_supportsTeamDrives = true; | 4876 var arg_supportsTeamDrives = true; |
4877 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 4877 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
4878 var path = (req.url).path; | 4878 var path = (req.url).path; |
4879 var pathOffset = 0; | 4879 var pathOffset = 0; |
4880 var index; | 4880 var index; |
4881 var subPart; | 4881 var subPart; |
4882 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 4882 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
4883 pathOffset += 1; | 4883 pathOffset += 1; |
4884 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); | 4884 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); |
4885 pathOffset += 9; | 4885 pathOffset += 9; |
4886 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ
als("files/")); | 4886 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ
als("files/")); |
4887 pathOffset += 6; | 4887 pathOffset += 6; |
(...skipping 26 matching lines...) Expand all Loading... |
4914 } | 4914 } |
4915 unittest.expect(queryMap["supportsTeamDrives"].first, unittest.equals("$
arg_supportsTeamDrives")); | 4915 unittest.expect(queryMap["supportsTeamDrives"].first, unittest.equals("$
arg_supportsTeamDrives")); |
4916 | 4916 |
4917 | 4917 |
4918 var h = { | 4918 var h = { |
4919 "content-type" : "application/json; charset=utf-8", | 4919 "content-type" : "application/json; charset=utf-8", |
4920 }; | 4920 }; |
4921 var resp = convert.JSON.encode(buildPermission()); | 4921 var resp = convert.JSON.encode(buildPermission()); |
4922 return new async.Future.value(stringResponse(200, h, resp)); | 4922 return new async.Future.value(stringResponse(200, h, resp)); |
4923 }), true); | 4923 }), true); |
4924 res.get(arg_fileId, arg_permissionId, supportsTeamDrives: arg_supportsTeam
Drives).then(unittest.expectAsync(((api.Permission response) { | 4924 res.get(arg_fileId, arg_permissionId, supportsTeamDrives: arg_supportsTeam
Drives).then(unittest.expectAsync1(((api.Permission response) { |
4925 checkPermission(response); | 4925 checkPermission(response); |
4926 }))); | 4926 }))); |
4927 }); | 4927 }); |
4928 | 4928 |
4929 unittest.test("method--getIdForEmail", () { | 4929 unittest.test("method--getIdForEmail", () { |
4930 | 4930 |
4931 var mock = new HttpServerMock(); | 4931 var mock = new HttpServerMock(); |
4932 api.PermissionsResourceApi res = new api.DriveApi(mock).permissions; | 4932 api.PermissionsResourceApi res = new api.DriveApi(mock).permissions; |
4933 var arg_email = "foo"; | 4933 var arg_email = "foo"; |
4934 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 4934 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
4935 var path = (req.url).path; | 4935 var path = (req.url).path; |
4936 var pathOffset = 0; | 4936 var pathOffset = 0; |
4937 var index; | 4937 var index; |
4938 var subPart; | 4938 var subPart; |
4939 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 4939 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
4940 pathOffset += 1; | 4940 pathOffset += 1; |
4941 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); | 4941 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); |
4942 pathOffset += 9; | 4942 pathOffset += 9; |
4943 unittest.expect(path.substring(pathOffset, pathOffset + 14), unittest.eq
uals("permissionIds/")); | 4943 unittest.expect(path.substring(pathOffset, pathOffset + 14), unittest.eq
uals("permissionIds/")); |
4944 pathOffset += 14; | 4944 pathOffset += 14; |
(...skipping 18 matching lines...) Expand all Loading... |
4963 } | 4963 } |
4964 } | 4964 } |
4965 | 4965 |
4966 | 4966 |
4967 var h = { | 4967 var h = { |
4968 "content-type" : "application/json; charset=utf-8", | 4968 "content-type" : "application/json; charset=utf-8", |
4969 }; | 4969 }; |
4970 var resp = convert.JSON.encode(buildPermissionId()); | 4970 var resp = convert.JSON.encode(buildPermissionId()); |
4971 return new async.Future.value(stringResponse(200, h, resp)); | 4971 return new async.Future.value(stringResponse(200, h, resp)); |
4972 }), true); | 4972 }), true); |
4973 res.getIdForEmail(arg_email).then(unittest.expectAsync(((api.PermissionId
response) { | 4973 res.getIdForEmail(arg_email).then(unittest.expectAsync1(((api.PermissionId
response) { |
4974 checkPermissionId(response); | 4974 checkPermissionId(response); |
4975 }))); | 4975 }))); |
4976 }); | 4976 }); |
4977 | 4977 |
4978 unittest.test("method--insert", () { | 4978 unittest.test("method--insert", () { |
4979 | 4979 |
4980 var mock = new HttpServerMock(); | 4980 var mock = new HttpServerMock(); |
4981 api.PermissionsResourceApi res = new api.DriveApi(mock).permissions; | 4981 api.PermissionsResourceApi res = new api.DriveApi(mock).permissions; |
4982 var arg_request = buildPermission(); | 4982 var arg_request = buildPermission(); |
4983 var arg_fileId = "foo"; | 4983 var arg_fileId = "foo"; |
4984 var arg_emailMessage = "foo"; | 4984 var arg_emailMessage = "foo"; |
4985 var arg_sendNotificationEmails = true; | 4985 var arg_sendNotificationEmails = true; |
4986 var arg_supportsTeamDrives = true; | 4986 var arg_supportsTeamDrives = true; |
4987 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 4987 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
4988 var obj = new api.Permission.fromJson(json); | 4988 var obj = new api.Permission.fromJson(json); |
4989 checkPermission(obj); | 4989 checkPermission(obj); |
4990 | 4990 |
4991 var path = (req.url).path; | 4991 var path = (req.url).path; |
4992 var pathOffset = 0; | 4992 var pathOffset = 0; |
4993 var index; | 4993 var index; |
4994 var subPart; | 4994 var subPart; |
4995 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 4995 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
4996 pathOffset += 1; | 4996 pathOffset += 1; |
4997 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); | 4997 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); |
(...skipping 28 matching lines...) Expand all Loading... |
5026 unittest.expect(queryMap["sendNotificationEmails"].first, unittest.equal
s("$arg_sendNotificationEmails")); | 5026 unittest.expect(queryMap["sendNotificationEmails"].first, unittest.equal
s("$arg_sendNotificationEmails")); |
5027 unittest.expect(queryMap["supportsTeamDrives"].first, unittest.equals("$
arg_supportsTeamDrives")); | 5027 unittest.expect(queryMap["supportsTeamDrives"].first, unittest.equals("$
arg_supportsTeamDrives")); |
5028 | 5028 |
5029 | 5029 |
5030 var h = { | 5030 var h = { |
5031 "content-type" : "application/json; charset=utf-8", | 5031 "content-type" : "application/json; charset=utf-8", |
5032 }; | 5032 }; |
5033 var resp = convert.JSON.encode(buildPermission()); | 5033 var resp = convert.JSON.encode(buildPermission()); |
5034 return new async.Future.value(stringResponse(200, h, resp)); | 5034 return new async.Future.value(stringResponse(200, h, resp)); |
5035 }), true); | 5035 }), true); |
5036 res.insert(arg_request, arg_fileId, emailMessage: arg_emailMessage, sendNo
tificationEmails: arg_sendNotificationEmails, supportsTeamDrives: arg_supportsTe
amDrives).then(unittest.expectAsync(((api.Permission response) { | 5036 res.insert(arg_request, arg_fileId, emailMessage: arg_emailMessage, sendNo
tificationEmails: arg_sendNotificationEmails, supportsTeamDrives: arg_supportsTe
amDrives).then(unittest.expectAsync1(((api.Permission response) { |
5037 checkPermission(response); | 5037 checkPermission(response); |
5038 }))); | 5038 }))); |
5039 }); | 5039 }); |
5040 | 5040 |
5041 unittest.test("method--list", () { | 5041 unittest.test("method--list", () { |
5042 | 5042 |
5043 var mock = new HttpServerMock(); | 5043 var mock = new HttpServerMock(); |
5044 api.PermissionsResourceApi res = new api.DriveApi(mock).permissions; | 5044 api.PermissionsResourceApi res = new api.DriveApi(mock).permissions; |
5045 var arg_fileId = "foo"; | 5045 var arg_fileId = "foo"; |
5046 var arg_maxResults = 42; | 5046 var arg_maxResults = 42; |
5047 var arg_pageToken = "foo"; | 5047 var arg_pageToken = "foo"; |
5048 var arg_supportsTeamDrives = true; | 5048 var arg_supportsTeamDrives = true; |
5049 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 5049 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
5050 var path = (req.url).path; | 5050 var path = (req.url).path; |
5051 var pathOffset = 0; | 5051 var pathOffset = 0; |
5052 var index; | 5052 var index; |
5053 var subPart; | 5053 var subPart; |
5054 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 5054 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
5055 pathOffset += 1; | 5055 pathOffset += 1; |
5056 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); | 5056 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); |
5057 pathOffset += 9; | 5057 pathOffset += 9; |
5058 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ
als("files/")); | 5058 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ
als("files/")); |
5059 pathOffset += 6; | 5059 pathOffset += 6; |
(...skipping 25 matching lines...) Expand all Loading... |
5085 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 5085 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
5086 unittest.expect(queryMap["supportsTeamDrives"].first, unittest.equals("$
arg_supportsTeamDrives")); | 5086 unittest.expect(queryMap["supportsTeamDrives"].first, unittest.equals("$
arg_supportsTeamDrives")); |
5087 | 5087 |
5088 | 5088 |
5089 var h = { | 5089 var h = { |
5090 "content-type" : "application/json; charset=utf-8", | 5090 "content-type" : "application/json; charset=utf-8", |
5091 }; | 5091 }; |
5092 var resp = convert.JSON.encode(buildPermissionList()); | 5092 var resp = convert.JSON.encode(buildPermissionList()); |
5093 return new async.Future.value(stringResponse(200, h, resp)); | 5093 return new async.Future.value(stringResponse(200, h, resp)); |
5094 }), true); | 5094 }), true); |
5095 res.list(arg_fileId, maxResults: arg_maxResults, pageToken: arg_pageToken,
supportsTeamDrives: arg_supportsTeamDrives).then(unittest.expectAsync(((api.Per
missionList response) { | 5095 res.list(arg_fileId, maxResults: arg_maxResults, pageToken: arg_pageToken,
supportsTeamDrives: arg_supportsTeamDrives).then(unittest.expectAsync1(((api.Pe
rmissionList response) { |
5096 checkPermissionList(response); | 5096 checkPermissionList(response); |
5097 }))); | 5097 }))); |
5098 }); | 5098 }); |
5099 | 5099 |
5100 unittest.test("method--patch", () { | 5100 unittest.test("method--patch", () { |
5101 | 5101 |
5102 var mock = new HttpServerMock(); | 5102 var mock = new HttpServerMock(); |
5103 api.PermissionsResourceApi res = new api.DriveApi(mock).permissions; | 5103 api.PermissionsResourceApi res = new api.DriveApi(mock).permissions; |
5104 var arg_request = buildPermission(); | 5104 var arg_request = buildPermission(); |
5105 var arg_fileId = "foo"; | 5105 var arg_fileId = "foo"; |
5106 var arg_permissionId = "foo"; | 5106 var arg_permissionId = "foo"; |
5107 var arg_removeExpiration = true; | 5107 var arg_removeExpiration = true; |
5108 var arg_supportsTeamDrives = true; | 5108 var arg_supportsTeamDrives = true; |
5109 var arg_transferOwnership = true; | 5109 var arg_transferOwnership = true; |
5110 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 5110 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
5111 var obj = new api.Permission.fromJson(json); | 5111 var obj = new api.Permission.fromJson(json); |
5112 checkPermission(obj); | 5112 checkPermission(obj); |
5113 | 5113 |
5114 var path = (req.url).path; | 5114 var path = (req.url).path; |
5115 var pathOffset = 0; | 5115 var pathOffset = 0; |
5116 var index; | 5116 var index; |
5117 var subPart; | 5117 var subPart; |
5118 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 5118 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
5119 pathOffset += 1; | 5119 pathOffset += 1; |
5120 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); | 5120 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5152 unittest.expect(queryMap["supportsTeamDrives"].first, unittest.equals("$
arg_supportsTeamDrives")); | 5152 unittest.expect(queryMap["supportsTeamDrives"].first, unittest.equals("$
arg_supportsTeamDrives")); |
5153 unittest.expect(queryMap["transferOwnership"].first, unittest.equals("$a
rg_transferOwnership")); | 5153 unittest.expect(queryMap["transferOwnership"].first, unittest.equals("$a
rg_transferOwnership")); |
5154 | 5154 |
5155 | 5155 |
5156 var h = { | 5156 var h = { |
5157 "content-type" : "application/json; charset=utf-8", | 5157 "content-type" : "application/json; charset=utf-8", |
5158 }; | 5158 }; |
5159 var resp = convert.JSON.encode(buildPermission()); | 5159 var resp = convert.JSON.encode(buildPermission()); |
5160 return new async.Future.value(stringResponse(200, h, resp)); | 5160 return new async.Future.value(stringResponse(200, h, resp)); |
5161 }), true); | 5161 }), true); |
5162 res.patch(arg_request, arg_fileId, arg_permissionId, removeExpiration: arg
_removeExpiration, supportsTeamDrives: arg_supportsTeamDrives, transferOwnership
: arg_transferOwnership).then(unittest.expectAsync(((api.Permission response) { | 5162 res.patch(arg_request, arg_fileId, arg_permissionId, removeExpiration: arg
_removeExpiration, supportsTeamDrives: arg_supportsTeamDrives, transferOwnership
: arg_transferOwnership).then(unittest.expectAsync1(((api.Permission response) { |
5163 checkPermission(response); | 5163 checkPermission(response); |
5164 }))); | 5164 }))); |
5165 }); | 5165 }); |
5166 | 5166 |
5167 unittest.test("method--update", () { | 5167 unittest.test("method--update", () { |
5168 | 5168 |
5169 var mock = new HttpServerMock(); | 5169 var mock = new HttpServerMock(); |
5170 api.PermissionsResourceApi res = new api.DriveApi(mock).permissions; | 5170 api.PermissionsResourceApi res = new api.DriveApi(mock).permissions; |
5171 var arg_request = buildPermission(); | 5171 var arg_request = buildPermission(); |
5172 var arg_fileId = "foo"; | 5172 var arg_fileId = "foo"; |
5173 var arg_permissionId = "foo"; | 5173 var arg_permissionId = "foo"; |
5174 var arg_removeExpiration = true; | 5174 var arg_removeExpiration = true; |
5175 var arg_supportsTeamDrives = true; | 5175 var arg_supportsTeamDrives = true; |
5176 var arg_transferOwnership = true; | 5176 var arg_transferOwnership = true; |
5177 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 5177 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
5178 var obj = new api.Permission.fromJson(json); | 5178 var obj = new api.Permission.fromJson(json); |
5179 checkPermission(obj); | 5179 checkPermission(obj); |
5180 | 5180 |
5181 var path = (req.url).path; | 5181 var path = (req.url).path; |
5182 var pathOffset = 0; | 5182 var pathOffset = 0; |
5183 var index; | 5183 var index; |
5184 var subPart; | 5184 var subPart; |
5185 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 5185 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
5186 pathOffset += 1; | 5186 pathOffset += 1; |
5187 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); | 5187 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5219 unittest.expect(queryMap["supportsTeamDrives"].first, unittest.equals("$
arg_supportsTeamDrives")); | 5219 unittest.expect(queryMap["supportsTeamDrives"].first, unittest.equals("$
arg_supportsTeamDrives")); |
5220 unittest.expect(queryMap["transferOwnership"].first, unittest.equals("$a
rg_transferOwnership")); | 5220 unittest.expect(queryMap["transferOwnership"].first, unittest.equals("$a
rg_transferOwnership")); |
5221 | 5221 |
5222 | 5222 |
5223 var h = { | 5223 var h = { |
5224 "content-type" : "application/json; charset=utf-8", | 5224 "content-type" : "application/json; charset=utf-8", |
5225 }; | 5225 }; |
5226 var resp = convert.JSON.encode(buildPermission()); | 5226 var resp = convert.JSON.encode(buildPermission()); |
5227 return new async.Future.value(stringResponse(200, h, resp)); | 5227 return new async.Future.value(stringResponse(200, h, resp)); |
5228 }), true); | 5228 }), true); |
5229 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) { | 5229 res.update(arg_request, arg_fileId, arg_permissionId, removeExpiration: ar
g_removeExpiration, supportsTeamDrives: arg_supportsTeamDrives, transferOwnershi
p: arg_transferOwnership).then(unittest.expectAsync1(((api.Permission response)
{ |
5230 checkPermission(response); | 5230 checkPermission(response); |
5231 }))); | 5231 }))); |
5232 }); | 5232 }); |
5233 | 5233 |
5234 }); | 5234 }); |
5235 | 5235 |
5236 | 5236 |
5237 unittest.group("resource-PropertiesResourceApi", () { | 5237 unittest.group("resource-PropertiesResourceApi", () { |
5238 unittest.test("method--delete", () { | 5238 unittest.test("method--delete", () { |
5239 | 5239 |
5240 var mock = new HttpServerMock(); | 5240 var mock = new HttpServerMock(); |
5241 api.PropertiesResourceApi res = new api.DriveApi(mock).properties; | 5241 api.PropertiesResourceApi res = new api.DriveApi(mock).properties; |
5242 var arg_fileId = "foo"; | 5242 var arg_fileId = "foo"; |
5243 var arg_propertyKey = "foo"; | 5243 var arg_propertyKey = "foo"; |
5244 var arg_visibility = "foo"; | 5244 var arg_visibility = "foo"; |
5245 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 5245 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
5246 var path = (req.url).path; | 5246 var path = (req.url).path; |
5247 var pathOffset = 0; | 5247 var pathOffset = 0; |
5248 var index; | 5248 var index; |
5249 var subPart; | 5249 var subPart; |
5250 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 5250 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
5251 pathOffset += 1; | 5251 pathOffset += 1; |
5252 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); | 5252 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); |
5253 pathOffset += 9; | 5253 pathOffset += 9; |
5254 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ
als("files/")); | 5254 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ
als("files/")); |
5255 pathOffset += 6; | 5255 pathOffset += 6; |
(...skipping 26 matching lines...) Expand all Loading... |
5282 } | 5282 } |
5283 unittest.expect(queryMap["visibility"].first, unittest.equals(arg_visibi
lity)); | 5283 unittest.expect(queryMap["visibility"].first, unittest.equals(arg_visibi
lity)); |
5284 | 5284 |
5285 | 5285 |
5286 var h = { | 5286 var h = { |
5287 "content-type" : "application/json; charset=utf-8", | 5287 "content-type" : "application/json; charset=utf-8", |
5288 }; | 5288 }; |
5289 var resp = ""; | 5289 var resp = ""; |
5290 return new async.Future.value(stringResponse(200, h, resp)); | 5290 return new async.Future.value(stringResponse(200, h, resp)); |
5291 }), true); | 5291 }), true); |
5292 res.delete(arg_fileId, arg_propertyKey, visibility: arg_visibility).then(u
nittest.expectAsync((_) {})); | 5292 res.delete(arg_fileId, arg_propertyKey, visibility: arg_visibility).then(u
nittest.expectAsync1((_) {})); |
5293 }); | 5293 }); |
5294 | 5294 |
5295 unittest.test("method--get", () { | 5295 unittest.test("method--get", () { |
5296 | 5296 |
5297 var mock = new HttpServerMock(); | 5297 var mock = new HttpServerMock(); |
5298 api.PropertiesResourceApi res = new api.DriveApi(mock).properties; | 5298 api.PropertiesResourceApi res = new api.DriveApi(mock).properties; |
5299 var arg_fileId = "foo"; | 5299 var arg_fileId = "foo"; |
5300 var arg_propertyKey = "foo"; | 5300 var arg_propertyKey = "foo"; |
5301 var arg_visibility = "foo"; | 5301 var arg_visibility = "foo"; |
5302 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 5302 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
5303 var path = (req.url).path; | 5303 var path = (req.url).path; |
5304 var pathOffset = 0; | 5304 var pathOffset = 0; |
5305 var index; | 5305 var index; |
5306 var subPart; | 5306 var subPart; |
5307 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 5307 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
5308 pathOffset += 1; | 5308 pathOffset += 1; |
5309 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); | 5309 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); |
5310 pathOffset += 9; | 5310 pathOffset += 9; |
5311 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ
als("files/")); | 5311 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ
als("files/")); |
5312 pathOffset += 6; | 5312 pathOffset += 6; |
(...skipping 26 matching lines...) Expand all Loading... |
5339 } | 5339 } |
5340 unittest.expect(queryMap["visibility"].first, unittest.equals(arg_visibi
lity)); | 5340 unittest.expect(queryMap["visibility"].first, unittest.equals(arg_visibi
lity)); |
5341 | 5341 |
5342 | 5342 |
5343 var h = { | 5343 var h = { |
5344 "content-type" : "application/json; charset=utf-8", | 5344 "content-type" : "application/json; charset=utf-8", |
5345 }; | 5345 }; |
5346 var resp = convert.JSON.encode(buildProperty()); | 5346 var resp = convert.JSON.encode(buildProperty()); |
5347 return new async.Future.value(stringResponse(200, h, resp)); | 5347 return new async.Future.value(stringResponse(200, h, resp)); |
5348 }), true); | 5348 }), true); |
5349 res.get(arg_fileId, arg_propertyKey, visibility: arg_visibility).then(unit
test.expectAsync(((api.Property response) { | 5349 res.get(arg_fileId, arg_propertyKey, visibility: arg_visibility).then(unit
test.expectAsync1(((api.Property response) { |
5350 checkProperty(response); | 5350 checkProperty(response); |
5351 }))); | 5351 }))); |
5352 }); | 5352 }); |
5353 | 5353 |
5354 unittest.test("method--insert", () { | 5354 unittest.test("method--insert", () { |
5355 | 5355 |
5356 var mock = new HttpServerMock(); | 5356 var mock = new HttpServerMock(); |
5357 api.PropertiesResourceApi res = new api.DriveApi(mock).properties; | 5357 api.PropertiesResourceApi res = new api.DriveApi(mock).properties; |
5358 var arg_request = buildProperty(); | 5358 var arg_request = buildProperty(); |
5359 var arg_fileId = "foo"; | 5359 var arg_fileId = "foo"; |
5360 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 5360 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
5361 var obj = new api.Property.fromJson(json); | 5361 var obj = new api.Property.fromJson(json); |
5362 checkProperty(obj); | 5362 checkProperty(obj); |
5363 | 5363 |
5364 var path = (req.url).path; | 5364 var path = (req.url).path; |
5365 var pathOffset = 0; | 5365 var pathOffset = 0; |
5366 var index; | 5366 var index; |
5367 var subPart; | 5367 var subPart; |
5368 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 5368 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
5369 pathOffset += 1; | 5369 pathOffset += 1; |
5370 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); | 5370 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); |
(...skipping 25 matching lines...) Expand all Loading... |
5396 } | 5396 } |
5397 } | 5397 } |
5398 | 5398 |
5399 | 5399 |
5400 var h = { | 5400 var h = { |
5401 "content-type" : "application/json; charset=utf-8", | 5401 "content-type" : "application/json; charset=utf-8", |
5402 }; | 5402 }; |
5403 var resp = convert.JSON.encode(buildProperty()); | 5403 var resp = convert.JSON.encode(buildProperty()); |
5404 return new async.Future.value(stringResponse(200, h, resp)); | 5404 return new async.Future.value(stringResponse(200, h, resp)); |
5405 }), true); | 5405 }), true); |
5406 res.insert(arg_request, arg_fileId).then(unittest.expectAsync(((api.Proper
ty response) { | 5406 res.insert(arg_request, arg_fileId).then(unittest.expectAsync1(((api.Prope
rty response) { |
5407 checkProperty(response); | 5407 checkProperty(response); |
5408 }))); | 5408 }))); |
5409 }); | 5409 }); |
5410 | 5410 |
5411 unittest.test("method--list", () { | 5411 unittest.test("method--list", () { |
5412 | 5412 |
5413 var mock = new HttpServerMock(); | 5413 var mock = new HttpServerMock(); |
5414 api.PropertiesResourceApi res = new api.DriveApi(mock).properties; | 5414 api.PropertiesResourceApi res = new api.DriveApi(mock).properties; |
5415 var arg_fileId = "foo"; | 5415 var arg_fileId = "foo"; |
5416 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 5416 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
5417 var path = (req.url).path; | 5417 var path = (req.url).path; |
5418 var pathOffset = 0; | 5418 var pathOffset = 0; |
5419 var index; | 5419 var index; |
5420 var subPart; | 5420 var subPart; |
5421 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 5421 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
5422 pathOffset += 1; | 5422 pathOffset += 1; |
5423 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); | 5423 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); |
5424 pathOffset += 9; | 5424 pathOffset += 9; |
5425 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ
als("files/")); | 5425 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ
als("files/")); |
5426 pathOffset += 6; | 5426 pathOffset += 6; |
(...skipping 22 matching lines...) Expand all Loading... |
5449 } | 5449 } |
5450 } | 5450 } |
5451 | 5451 |
5452 | 5452 |
5453 var h = { | 5453 var h = { |
5454 "content-type" : "application/json; charset=utf-8", | 5454 "content-type" : "application/json; charset=utf-8", |
5455 }; | 5455 }; |
5456 var resp = convert.JSON.encode(buildPropertyList()); | 5456 var resp = convert.JSON.encode(buildPropertyList()); |
5457 return new async.Future.value(stringResponse(200, h, resp)); | 5457 return new async.Future.value(stringResponse(200, h, resp)); |
5458 }), true); | 5458 }), true); |
5459 res.list(arg_fileId).then(unittest.expectAsync(((api.PropertyList response
) { | 5459 res.list(arg_fileId).then(unittest.expectAsync1(((api.PropertyList respons
e) { |
5460 checkPropertyList(response); | 5460 checkPropertyList(response); |
5461 }))); | 5461 }))); |
5462 }); | 5462 }); |
5463 | 5463 |
5464 unittest.test("method--patch", () { | 5464 unittest.test("method--patch", () { |
5465 | 5465 |
5466 var mock = new HttpServerMock(); | 5466 var mock = new HttpServerMock(); |
5467 api.PropertiesResourceApi res = new api.DriveApi(mock).properties; | 5467 api.PropertiesResourceApi res = new api.DriveApi(mock).properties; |
5468 var arg_request = buildProperty(); | 5468 var arg_request = buildProperty(); |
5469 var arg_fileId = "foo"; | 5469 var arg_fileId = "foo"; |
5470 var arg_propertyKey = "foo"; | 5470 var arg_propertyKey = "foo"; |
5471 var arg_visibility = "foo"; | 5471 var arg_visibility = "foo"; |
5472 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 5472 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
5473 var obj = new api.Property.fromJson(json); | 5473 var obj = new api.Property.fromJson(json); |
5474 checkProperty(obj); | 5474 checkProperty(obj); |
5475 | 5475 |
5476 var path = (req.url).path; | 5476 var path = (req.url).path; |
5477 var pathOffset = 0; | 5477 var pathOffset = 0; |
5478 var index; | 5478 var index; |
5479 var subPart; | 5479 var subPart; |
5480 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 5480 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
5481 pathOffset += 1; | 5481 pathOffset += 1; |
5482 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); | 5482 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); |
(...skipping 29 matching lines...) Expand all Loading... |
5512 } | 5512 } |
5513 unittest.expect(queryMap["visibility"].first, unittest.equals(arg_visibi
lity)); | 5513 unittest.expect(queryMap["visibility"].first, unittest.equals(arg_visibi
lity)); |
5514 | 5514 |
5515 | 5515 |
5516 var h = { | 5516 var h = { |
5517 "content-type" : "application/json; charset=utf-8", | 5517 "content-type" : "application/json; charset=utf-8", |
5518 }; | 5518 }; |
5519 var resp = convert.JSON.encode(buildProperty()); | 5519 var resp = convert.JSON.encode(buildProperty()); |
5520 return new async.Future.value(stringResponse(200, h, resp)); | 5520 return new async.Future.value(stringResponse(200, h, resp)); |
5521 }), true); | 5521 }), true); |
5522 res.patch(arg_request, arg_fileId, arg_propertyKey, visibility: arg_visibi
lity).then(unittest.expectAsync(((api.Property response) { | 5522 res.patch(arg_request, arg_fileId, arg_propertyKey, visibility: arg_visibi
lity).then(unittest.expectAsync1(((api.Property response) { |
5523 checkProperty(response); | 5523 checkProperty(response); |
5524 }))); | 5524 }))); |
5525 }); | 5525 }); |
5526 | 5526 |
5527 unittest.test("method--update", () { | 5527 unittest.test("method--update", () { |
5528 | 5528 |
5529 var mock = new HttpServerMock(); | 5529 var mock = new HttpServerMock(); |
5530 api.PropertiesResourceApi res = new api.DriveApi(mock).properties; | 5530 api.PropertiesResourceApi res = new api.DriveApi(mock).properties; |
5531 var arg_request = buildProperty(); | 5531 var arg_request = buildProperty(); |
5532 var arg_fileId = "foo"; | 5532 var arg_fileId = "foo"; |
5533 var arg_propertyKey = "foo"; | 5533 var arg_propertyKey = "foo"; |
5534 var arg_visibility = "foo"; | 5534 var arg_visibility = "foo"; |
5535 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 5535 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
5536 var obj = new api.Property.fromJson(json); | 5536 var obj = new api.Property.fromJson(json); |
5537 checkProperty(obj); | 5537 checkProperty(obj); |
5538 | 5538 |
5539 var path = (req.url).path; | 5539 var path = (req.url).path; |
5540 var pathOffset = 0; | 5540 var pathOffset = 0; |
5541 var index; | 5541 var index; |
5542 var subPart; | 5542 var subPart; |
5543 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 5543 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
5544 pathOffset += 1; | 5544 pathOffset += 1; |
5545 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); | 5545 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); |
(...skipping 29 matching lines...) Expand all Loading... |
5575 } | 5575 } |
5576 unittest.expect(queryMap["visibility"].first, unittest.equals(arg_visibi
lity)); | 5576 unittest.expect(queryMap["visibility"].first, unittest.equals(arg_visibi
lity)); |
5577 | 5577 |
5578 | 5578 |
5579 var h = { | 5579 var h = { |
5580 "content-type" : "application/json; charset=utf-8", | 5580 "content-type" : "application/json; charset=utf-8", |
5581 }; | 5581 }; |
5582 var resp = convert.JSON.encode(buildProperty()); | 5582 var resp = convert.JSON.encode(buildProperty()); |
5583 return new async.Future.value(stringResponse(200, h, resp)); | 5583 return new async.Future.value(stringResponse(200, h, resp)); |
5584 }), true); | 5584 }), true); |
5585 res.update(arg_request, arg_fileId, arg_propertyKey, visibility: arg_visib
ility).then(unittest.expectAsync(((api.Property response) { | 5585 res.update(arg_request, arg_fileId, arg_propertyKey, visibility: arg_visib
ility).then(unittest.expectAsync1(((api.Property response) { |
5586 checkProperty(response); | 5586 checkProperty(response); |
5587 }))); | 5587 }))); |
5588 }); | 5588 }); |
5589 | 5589 |
5590 }); | 5590 }); |
5591 | 5591 |
5592 | 5592 |
5593 unittest.group("resource-RealtimeResourceApi", () { | 5593 unittest.group("resource-RealtimeResourceApi", () { |
5594 unittest.test("method--get", () { | 5594 unittest.test("method--get", () { |
5595 // TODO: Implement tests for media upload; | 5595 // TODO: Implement tests for media upload; |
5596 // TODO: Implement tests for media download; | 5596 // TODO: Implement tests for media download; |
5597 | 5597 |
5598 var mock = new HttpServerMock(); | 5598 var mock = new HttpServerMock(); |
5599 api.RealtimeResourceApi res = new api.DriveApi(mock).realtime; | 5599 api.RealtimeResourceApi res = new api.DriveApi(mock).realtime; |
5600 var arg_fileId = "foo"; | 5600 var arg_fileId = "foo"; |
5601 var arg_revision = 42; | 5601 var arg_revision = 42; |
5602 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 5602 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
5603 var path = (req.url).path; | 5603 var path = (req.url).path; |
5604 var pathOffset = 0; | 5604 var pathOffset = 0; |
5605 var index; | 5605 var index; |
5606 var subPart; | 5606 var subPart; |
5607 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 5607 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
5608 pathOffset += 1; | 5608 pathOffset += 1; |
5609 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); | 5609 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); |
5610 pathOffset += 9; | 5610 pathOffset += 9; |
5611 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ
als("files/")); | 5611 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ
als("files/")); |
5612 pathOffset += 6; | 5612 pathOffset += 6; |
(...skipping 23 matching lines...) Expand all Loading... |
5636 } | 5636 } |
5637 unittest.expect(core.int.parse(queryMap["revision"].first), unittest.equ
als(arg_revision)); | 5637 unittest.expect(core.int.parse(queryMap["revision"].first), unittest.equ
als(arg_revision)); |
5638 | 5638 |
5639 | 5639 |
5640 var h = { | 5640 var h = { |
5641 "content-type" : "application/json; charset=utf-8", | 5641 "content-type" : "application/json; charset=utf-8", |
5642 }; | 5642 }; |
5643 var resp = ""; | 5643 var resp = ""; |
5644 return new async.Future.value(stringResponse(200, h, resp)); | 5644 return new async.Future.value(stringResponse(200, h, resp)); |
5645 }), true); | 5645 }), true); |
5646 res.get(arg_fileId, revision: arg_revision).then(unittest.expectAsync((_)
{})); | 5646 res.get(arg_fileId, revision: arg_revision).then(unittest.expectAsync1((_)
{})); |
5647 }); | 5647 }); |
5648 | 5648 |
5649 unittest.test("method--update", () { | 5649 unittest.test("method--update", () { |
5650 // TODO: Implement tests for media upload; | 5650 // TODO: Implement tests for media upload; |
5651 // TODO: Implement tests for media download; | 5651 // TODO: Implement tests for media download; |
5652 | 5652 |
5653 var mock = new HttpServerMock(); | 5653 var mock = new HttpServerMock(); |
5654 api.RealtimeResourceApi res = new api.DriveApi(mock).realtime; | 5654 api.RealtimeResourceApi res = new api.DriveApi(mock).realtime; |
5655 var arg_fileId = "foo"; | 5655 var arg_fileId = "foo"; |
5656 var arg_baseRevision = "foo"; | 5656 var arg_baseRevision = "foo"; |
5657 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 5657 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
5658 var path = (req.url).path; | 5658 var path = (req.url).path; |
5659 var pathOffset = 0; | 5659 var pathOffset = 0; |
5660 var index; | 5660 var index; |
5661 var subPart; | 5661 var subPart; |
5662 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 5662 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
5663 pathOffset += 1; | 5663 pathOffset += 1; |
5664 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); | 5664 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); |
5665 pathOffset += 9; | 5665 pathOffset += 9; |
5666 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ
als("files/")); | 5666 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ
als("files/")); |
5667 pathOffset += 6; | 5667 pathOffset += 6; |
(...skipping 23 matching lines...) Expand all Loading... |
5691 } | 5691 } |
5692 unittest.expect(queryMap["baseRevision"].first, unittest.equals(arg_base
Revision)); | 5692 unittest.expect(queryMap["baseRevision"].first, unittest.equals(arg_base
Revision)); |
5693 | 5693 |
5694 | 5694 |
5695 var h = { | 5695 var h = { |
5696 "content-type" : "application/json; charset=utf-8", | 5696 "content-type" : "application/json; charset=utf-8", |
5697 }; | 5697 }; |
5698 var resp = ""; | 5698 var resp = ""; |
5699 return new async.Future.value(stringResponse(200, h, resp)); | 5699 return new async.Future.value(stringResponse(200, h, resp)); |
5700 }), true); | 5700 }), true); |
5701 res.update(arg_fileId, baseRevision: arg_baseRevision).then(unittest.expec
tAsync((_) {})); | 5701 res.update(arg_fileId, baseRevision: arg_baseRevision).then(unittest.expec
tAsync1((_) {})); |
5702 }); | 5702 }); |
5703 | 5703 |
5704 }); | 5704 }); |
5705 | 5705 |
5706 | 5706 |
5707 unittest.group("resource-RepliesResourceApi", () { | 5707 unittest.group("resource-RepliesResourceApi", () { |
5708 unittest.test("method--delete", () { | 5708 unittest.test("method--delete", () { |
5709 | 5709 |
5710 var mock = new HttpServerMock(); | 5710 var mock = new HttpServerMock(); |
5711 api.RepliesResourceApi res = new api.DriveApi(mock).replies; | 5711 api.RepliesResourceApi res = new api.DriveApi(mock).replies; |
5712 var arg_fileId = "foo"; | 5712 var arg_fileId = "foo"; |
5713 var arg_commentId = "foo"; | 5713 var arg_commentId = "foo"; |
5714 var arg_replyId = "foo"; | 5714 var arg_replyId = "foo"; |
5715 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 5715 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
5716 var path = (req.url).path; | 5716 var path = (req.url).path; |
5717 var pathOffset = 0; | 5717 var pathOffset = 0; |
5718 var index; | 5718 var index; |
5719 var subPart; | 5719 var subPart; |
5720 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 5720 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
5721 pathOffset += 1; | 5721 pathOffset += 1; |
5722 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); | 5722 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); |
5723 pathOffset += 9; | 5723 pathOffset += 9; |
5724 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ
als("files/")); | 5724 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ
als("files/")); |
5725 pathOffset += 6; | 5725 pathOffset += 6; |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5758 } | 5758 } |
5759 } | 5759 } |
5760 | 5760 |
5761 | 5761 |
5762 var h = { | 5762 var h = { |
5763 "content-type" : "application/json; charset=utf-8", | 5763 "content-type" : "application/json; charset=utf-8", |
5764 }; | 5764 }; |
5765 var resp = ""; | 5765 var resp = ""; |
5766 return new async.Future.value(stringResponse(200, h, resp)); | 5766 return new async.Future.value(stringResponse(200, h, resp)); |
5767 }), true); | 5767 }), true); |
5768 res.delete(arg_fileId, arg_commentId, arg_replyId).then(unittest.expectAsy
nc((_) {})); | 5768 res.delete(arg_fileId, arg_commentId, arg_replyId).then(unittest.expectAsy
nc1((_) {})); |
5769 }); | 5769 }); |
5770 | 5770 |
5771 unittest.test("method--get", () { | 5771 unittest.test("method--get", () { |
5772 | 5772 |
5773 var mock = new HttpServerMock(); | 5773 var mock = new HttpServerMock(); |
5774 api.RepliesResourceApi res = new api.DriveApi(mock).replies; | 5774 api.RepliesResourceApi res = new api.DriveApi(mock).replies; |
5775 var arg_fileId = "foo"; | 5775 var arg_fileId = "foo"; |
5776 var arg_commentId = "foo"; | 5776 var arg_commentId = "foo"; |
5777 var arg_replyId = "foo"; | 5777 var arg_replyId = "foo"; |
5778 var arg_includeDeleted = true; | 5778 var arg_includeDeleted = true; |
5779 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 5779 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
5780 var path = (req.url).path; | 5780 var path = (req.url).path; |
5781 var pathOffset = 0; | 5781 var pathOffset = 0; |
5782 var index; | 5782 var index; |
5783 var subPart; | 5783 var subPart; |
5784 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 5784 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
5785 pathOffset += 1; | 5785 pathOffset += 1; |
5786 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); | 5786 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); |
5787 pathOffset += 9; | 5787 pathOffset += 9; |
5788 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ
als("files/")); | 5788 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ
als("files/")); |
5789 pathOffset += 6; | 5789 pathOffset += 6; |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5823 } | 5823 } |
5824 unittest.expect(queryMap["includeDeleted"].first, unittest.equals("$arg_
includeDeleted")); | 5824 unittest.expect(queryMap["includeDeleted"].first, unittest.equals("$arg_
includeDeleted")); |
5825 | 5825 |
5826 | 5826 |
5827 var h = { | 5827 var h = { |
5828 "content-type" : "application/json; charset=utf-8", | 5828 "content-type" : "application/json; charset=utf-8", |
5829 }; | 5829 }; |
5830 var resp = convert.JSON.encode(buildCommentReply()); | 5830 var resp = convert.JSON.encode(buildCommentReply()); |
5831 return new async.Future.value(stringResponse(200, h, resp)); | 5831 return new async.Future.value(stringResponse(200, h, resp)); |
5832 }), true); | 5832 }), true); |
5833 res.get(arg_fileId, arg_commentId, arg_replyId, includeDeleted: arg_includ
eDeleted).then(unittest.expectAsync(((api.CommentReply response) { | 5833 res.get(arg_fileId, arg_commentId, arg_replyId, includeDeleted: arg_includ
eDeleted).then(unittest.expectAsync1(((api.CommentReply response) { |
5834 checkCommentReply(response); | 5834 checkCommentReply(response); |
5835 }))); | 5835 }))); |
5836 }); | 5836 }); |
5837 | 5837 |
5838 unittest.test("method--insert", () { | 5838 unittest.test("method--insert", () { |
5839 | 5839 |
5840 var mock = new HttpServerMock(); | 5840 var mock = new HttpServerMock(); |
5841 api.RepliesResourceApi res = new api.DriveApi(mock).replies; | 5841 api.RepliesResourceApi res = new api.DriveApi(mock).replies; |
5842 var arg_request = buildCommentReply(); | 5842 var arg_request = buildCommentReply(); |
5843 var arg_fileId = "foo"; | 5843 var arg_fileId = "foo"; |
5844 var arg_commentId = "foo"; | 5844 var arg_commentId = "foo"; |
5845 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 5845 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
5846 var obj = new api.CommentReply.fromJson(json); | 5846 var obj = new api.CommentReply.fromJson(json); |
5847 checkCommentReply(obj); | 5847 checkCommentReply(obj); |
5848 | 5848 |
5849 var path = (req.url).path; | 5849 var path = (req.url).path; |
5850 var pathOffset = 0; | 5850 var pathOffset = 0; |
5851 var index; | 5851 var index; |
5852 var subPart; | 5852 var subPart; |
5853 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 5853 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
5854 pathOffset += 1; | 5854 pathOffset += 1; |
5855 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); | 5855 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5888 } | 5888 } |
5889 } | 5889 } |
5890 | 5890 |
5891 | 5891 |
5892 var h = { | 5892 var h = { |
5893 "content-type" : "application/json; charset=utf-8", | 5893 "content-type" : "application/json; charset=utf-8", |
5894 }; | 5894 }; |
5895 var resp = convert.JSON.encode(buildCommentReply()); | 5895 var resp = convert.JSON.encode(buildCommentReply()); |
5896 return new async.Future.value(stringResponse(200, h, resp)); | 5896 return new async.Future.value(stringResponse(200, h, resp)); |
5897 }), true); | 5897 }), true); |
5898 res.insert(arg_request, arg_fileId, arg_commentId).then(unittest.expectAsy
nc(((api.CommentReply response) { | 5898 res.insert(arg_request, arg_fileId, arg_commentId).then(unittest.expectAsy
nc1(((api.CommentReply response) { |
5899 checkCommentReply(response); | 5899 checkCommentReply(response); |
5900 }))); | 5900 }))); |
5901 }); | 5901 }); |
5902 | 5902 |
5903 unittest.test("method--list", () { | 5903 unittest.test("method--list", () { |
5904 | 5904 |
5905 var mock = new HttpServerMock(); | 5905 var mock = new HttpServerMock(); |
5906 api.RepliesResourceApi res = new api.DriveApi(mock).replies; | 5906 api.RepliesResourceApi res = new api.DriveApi(mock).replies; |
5907 var arg_fileId = "foo"; | 5907 var arg_fileId = "foo"; |
5908 var arg_commentId = "foo"; | 5908 var arg_commentId = "foo"; |
5909 var arg_includeDeleted = true; | 5909 var arg_includeDeleted = true; |
5910 var arg_maxResults = 42; | 5910 var arg_maxResults = 42; |
5911 var arg_pageToken = "foo"; | 5911 var arg_pageToken = "foo"; |
5912 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 5912 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
5913 var path = (req.url).path; | 5913 var path = (req.url).path; |
5914 var pathOffset = 0; | 5914 var pathOffset = 0; |
5915 var index; | 5915 var index; |
5916 var subPart; | 5916 var subPart; |
5917 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 5917 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
5918 pathOffset += 1; | 5918 pathOffset += 1; |
5919 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); | 5919 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); |
5920 pathOffset += 9; | 5920 pathOffset += 9; |
5921 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ
als("files/")); | 5921 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ
als("files/")); |
5922 pathOffset += 6; | 5922 pathOffset += 6; |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5955 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | 5955 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); |
5956 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 5956 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
5957 | 5957 |
5958 | 5958 |
5959 var h = { | 5959 var h = { |
5960 "content-type" : "application/json; charset=utf-8", | 5960 "content-type" : "application/json; charset=utf-8", |
5961 }; | 5961 }; |
5962 var resp = convert.JSON.encode(buildCommentReplyList()); | 5962 var resp = convert.JSON.encode(buildCommentReplyList()); |
5963 return new async.Future.value(stringResponse(200, h, resp)); | 5963 return new async.Future.value(stringResponse(200, h, resp)); |
5964 }), true); | 5964 }), true); |
5965 res.list(arg_fileId, arg_commentId, includeDeleted: arg_includeDeleted, ma
xResults: arg_maxResults, pageToken: arg_pageToken).then(unittest.expectAsync(((
api.CommentReplyList response) { | 5965 res.list(arg_fileId, arg_commentId, includeDeleted: arg_includeDeleted, ma
xResults: arg_maxResults, pageToken: arg_pageToken).then(unittest.expectAsync1((
(api.CommentReplyList response) { |
5966 checkCommentReplyList(response); | 5966 checkCommentReplyList(response); |
5967 }))); | 5967 }))); |
5968 }); | 5968 }); |
5969 | 5969 |
5970 unittest.test("method--patch", () { | 5970 unittest.test("method--patch", () { |
5971 | 5971 |
5972 var mock = new HttpServerMock(); | 5972 var mock = new HttpServerMock(); |
5973 api.RepliesResourceApi res = new api.DriveApi(mock).replies; | 5973 api.RepliesResourceApi res = new api.DriveApi(mock).replies; |
5974 var arg_request = buildCommentReply(); | 5974 var arg_request = buildCommentReply(); |
5975 var arg_fileId = "foo"; | 5975 var arg_fileId = "foo"; |
5976 var arg_commentId = "foo"; | 5976 var arg_commentId = "foo"; |
5977 var arg_replyId = "foo"; | 5977 var arg_replyId = "foo"; |
5978 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 5978 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
5979 var obj = new api.CommentReply.fromJson(json); | 5979 var obj = new api.CommentReply.fromJson(json); |
5980 checkCommentReply(obj); | 5980 checkCommentReply(obj); |
5981 | 5981 |
5982 var path = (req.url).path; | 5982 var path = (req.url).path; |
5983 var pathOffset = 0; | 5983 var pathOffset = 0; |
5984 var index; | 5984 var index; |
5985 var subPart; | 5985 var subPart; |
5986 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 5986 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
5987 pathOffset += 1; | 5987 pathOffset += 1; |
5988 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); | 5988 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6024 } | 6024 } |
6025 } | 6025 } |
6026 | 6026 |
6027 | 6027 |
6028 var h = { | 6028 var h = { |
6029 "content-type" : "application/json; charset=utf-8", | 6029 "content-type" : "application/json; charset=utf-8", |
6030 }; | 6030 }; |
6031 var resp = convert.JSON.encode(buildCommentReply()); | 6031 var resp = convert.JSON.encode(buildCommentReply()); |
6032 return new async.Future.value(stringResponse(200, h, resp)); | 6032 return new async.Future.value(stringResponse(200, h, resp)); |
6033 }), true); | 6033 }), true); |
6034 res.patch(arg_request, arg_fileId, arg_commentId, arg_replyId).then(unitte
st.expectAsync(((api.CommentReply response) { | 6034 res.patch(arg_request, arg_fileId, arg_commentId, arg_replyId).then(unitte
st.expectAsync1(((api.CommentReply response) { |
6035 checkCommentReply(response); | 6035 checkCommentReply(response); |
6036 }))); | 6036 }))); |
6037 }); | 6037 }); |
6038 | 6038 |
6039 unittest.test("method--update", () { | 6039 unittest.test("method--update", () { |
6040 | 6040 |
6041 var mock = new HttpServerMock(); | 6041 var mock = new HttpServerMock(); |
6042 api.RepliesResourceApi res = new api.DriveApi(mock).replies; | 6042 api.RepliesResourceApi res = new api.DriveApi(mock).replies; |
6043 var arg_request = buildCommentReply(); | 6043 var arg_request = buildCommentReply(); |
6044 var arg_fileId = "foo"; | 6044 var arg_fileId = "foo"; |
6045 var arg_commentId = "foo"; | 6045 var arg_commentId = "foo"; |
6046 var arg_replyId = "foo"; | 6046 var arg_replyId = "foo"; |
6047 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 6047 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
6048 var obj = new api.CommentReply.fromJson(json); | 6048 var obj = new api.CommentReply.fromJson(json); |
6049 checkCommentReply(obj); | 6049 checkCommentReply(obj); |
6050 | 6050 |
6051 var path = (req.url).path; | 6051 var path = (req.url).path; |
6052 var pathOffset = 0; | 6052 var pathOffset = 0; |
6053 var index; | 6053 var index; |
6054 var subPart; | 6054 var subPart; |
6055 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 6055 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
6056 pathOffset += 1; | 6056 pathOffset += 1; |
6057 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); | 6057 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6093 } | 6093 } |
6094 } | 6094 } |
6095 | 6095 |
6096 | 6096 |
6097 var h = { | 6097 var h = { |
6098 "content-type" : "application/json; charset=utf-8", | 6098 "content-type" : "application/json; charset=utf-8", |
6099 }; | 6099 }; |
6100 var resp = convert.JSON.encode(buildCommentReply()); | 6100 var resp = convert.JSON.encode(buildCommentReply()); |
6101 return new async.Future.value(stringResponse(200, h, resp)); | 6101 return new async.Future.value(stringResponse(200, h, resp)); |
6102 }), true); | 6102 }), true); |
6103 res.update(arg_request, arg_fileId, arg_commentId, arg_replyId).then(unitt
est.expectAsync(((api.CommentReply response) { | 6103 res.update(arg_request, arg_fileId, arg_commentId, arg_replyId).then(unitt
est.expectAsync1(((api.CommentReply response) { |
6104 checkCommentReply(response); | 6104 checkCommentReply(response); |
6105 }))); | 6105 }))); |
6106 }); | 6106 }); |
6107 | 6107 |
6108 }); | 6108 }); |
6109 | 6109 |
6110 | 6110 |
6111 unittest.group("resource-RevisionsResourceApi", () { | 6111 unittest.group("resource-RevisionsResourceApi", () { |
6112 unittest.test("method--delete", () { | 6112 unittest.test("method--delete", () { |
6113 | 6113 |
6114 var mock = new HttpServerMock(); | 6114 var mock = new HttpServerMock(); |
6115 api.RevisionsResourceApi res = new api.DriveApi(mock).revisions; | 6115 api.RevisionsResourceApi res = new api.DriveApi(mock).revisions; |
6116 var arg_fileId = "foo"; | 6116 var arg_fileId = "foo"; |
6117 var arg_revisionId = "foo"; | 6117 var arg_revisionId = "foo"; |
6118 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 6118 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
6119 var path = (req.url).path; | 6119 var path = (req.url).path; |
6120 var pathOffset = 0; | 6120 var pathOffset = 0; |
6121 var index; | 6121 var index; |
6122 var subPart; | 6122 var subPart; |
6123 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 6123 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
6124 pathOffset += 1; | 6124 pathOffset += 1; |
6125 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); | 6125 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); |
6126 pathOffset += 9; | 6126 pathOffset += 9; |
6127 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ
als("files/")); | 6127 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ
als("files/")); |
6128 pathOffset += 6; | 6128 pathOffset += 6; |
(...skipping 25 matching lines...) Expand all Loading... |
6154 } | 6154 } |
6155 } | 6155 } |
6156 | 6156 |
6157 | 6157 |
6158 var h = { | 6158 var h = { |
6159 "content-type" : "application/json; charset=utf-8", | 6159 "content-type" : "application/json; charset=utf-8", |
6160 }; | 6160 }; |
6161 var resp = ""; | 6161 var resp = ""; |
6162 return new async.Future.value(stringResponse(200, h, resp)); | 6162 return new async.Future.value(stringResponse(200, h, resp)); |
6163 }), true); | 6163 }), true); |
6164 res.delete(arg_fileId, arg_revisionId).then(unittest.expectAsync((_) {})); | 6164 res.delete(arg_fileId, arg_revisionId).then(unittest.expectAsync1((_) {}))
; |
6165 }); | 6165 }); |
6166 | 6166 |
6167 unittest.test("method--get", () { | 6167 unittest.test("method--get", () { |
6168 | 6168 |
6169 var mock = new HttpServerMock(); | 6169 var mock = new HttpServerMock(); |
6170 api.RevisionsResourceApi res = new api.DriveApi(mock).revisions; | 6170 api.RevisionsResourceApi res = new api.DriveApi(mock).revisions; |
6171 var arg_fileId = "foo"; | 6171 var arg_fileId = "foo"; |
6172 var arg_revisionId = "foo"; | 6172 var arg_revisionId = "foo"; |
6173 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 6173 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
6174 var path = (req.url).path; | 6174 var path = (req.url).path; |
6175 var pathOffset = 0; | 6175 var pathOffset = 0; |
6176 var index; | 6176 var index; |
6177 var subPart; | 6177 var subPart; |
6178 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 6178 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
6179 pathOffset += 1; | 6179 pathOffset += 1; |
6180 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); | 6180 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); |
6181 pathOffset += 9; | 6181 pathOffset += 9; |
6182 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ
als("files/")); | 6182 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ
als("files/")); |
6183 pathOffset += 6; | 6183 pathOffset += 6; |
(...skipping 25 matching lines...) Expand all Loading... |
6209 } | 6209 } |
6210 } | 6210 } |
6211 | 6211 |
6212 | 6212 |
6213 var h = { | 6213 var h = { |
6214 "content-type" : "application/json; charset=utf-8", | 6214 "content-type" : "application/json; charset=utf-8", |
6215 }; | 6215 }; |
6216 var resp = convert.JSON.encode(buildRevision()); | 6216 var resp = convert.JSON.encode(buildRevision()); |
6217 return new async.Future.value(stringResponse(200, h, resp)); | 6217 return new async.Future.value(stringResponse(200, h, resp)); |
6218 }), true); | 6218 }), true); |
6219 res.get(arg_fileId, arg_revisionId).then(unittest.expectAsync(((api.Revisi
on response) { | 6219 res.get(arg_fileId, arg_revisionId).then(unittest.expectAsync1(((api.Revis
ion response) { |
6220 checkRevision(response); | 6220 checkRevision(response); |
6221 }))); | 6221 }))); |
6222 }); | 6222 }); |
6223 | 6223 |
6224 unittest.test("method--list", () { | 6224 unittest.test("method--list", () { |
6225 | 6225 |
6226 var mock = new HttpServerMock(); | 6226 var mock = new HttpServerMock(); |
6227 api.RevisionsResourceApi res = new api.DriveApi(mock).revisions; | 6227 api.RevisionsResourceApi res = new api.DriveApi(mock).revisions; |
6228 var arg_fileId = "foo"; | 6228 var arg_fileId = "foo"; |
6229 var arg_maxResults = 42; | 6229 var arg_maxResults = 42; |
6230 var arg_pageToken = "foo"; | 6230 var arg_pageToken = "foo"; |
6231 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 6231 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
6232 var path = (req.url).path; | 6232 var path = (req.url).path; |
6233 var pathOffset = 0; | 6233 var pathOffset = 0; |
6234 var index; | 6234 var index; |
6235 var subPart; | 6235 var subPart; |
6236 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 6236 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
6237 pathOffset += 1; | 6237 pathOffset += 1; |
6238 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); | 6238 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); |
6239 pathOffset += 9; | 6239 pathOffset += 9; |
6240 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ
als("files/")); | 6240 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ
als("files/")); |
6241 pathOffset += 6; | 6241 pathOffset += 6; |
(...skipping 24 matching lines...) Expand all Loading... |
6266 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | 6266 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); |
6267 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 6267 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
6268 | 6268 |
6269 | 6269 |
6270 var h = { | 6270 var h = { |
6271 "content-type" : "application/json; charset=utf-8", | 6271 "content-type" : "application/json; charset=utf-8", |
6272 }; | 6272 }; |
6273 var resp = convert.JSON.encode(buildRevisionList()); | 6273 var resp = convert.JSON.encode(buildRevisionList()); |
6274 return new async.Future.value(stringResponse(200, h, resp)); | 6274 return new async.Future.value(stringResponse(200, h, resp)); |
6275 }), true); | 6275 }), true); |
6276 res.list(arg_fileId, maxResults: arg_maxResults, pageToken: arg_pageToken)
.then(unittest.expectAsync(((api.RevisionList response) { | 6276 res.list(arg_fileId, maxResults: arg_maxResults, pageToken: arg_pageToken)
.then(unittest.expectAsync1(((api.RevisionList response) { |
6277 checkRevisionList(response); | 6277 checkRevisionList(response); |
6278 }))); | 6278 }))); |
6279 }); | 6279 }); |
6280 | 6280 |
6281 unittest.test("method--patch", () { | 6281 unittest.test("method--patch", () { |
6282 | 6282 |
6283 var mock = new HttpServerMock(); | 6283 var mock = new HttpServerMock(); |
6284 api.RevisionsResourceApi res = new api.DriveApi(mock).revisions; | 6284 api.RevisionsResourceApi res = new api.DriveApi(mock).revisions; |
6285 var arg_request = buildRevision(); | 6285 var arg_request = buildRevision(); |
6286 var arg_fileId = "foo"; | 6286 var arg_fileId = "foo"; |
6287 var arg_revisionId = "foo"; | 6287 var arg_revisionId = "foo"; |
6288 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 6288 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
6289 var obj = new api.Revision.fromJson(json); | 6289 var obj = new api.Revision.fromJson(json); |
6290 checkRevision(obj); | 6290 checkRevision(obj); |
6291 | 6291 |
6292 var path = (req.url).path; | 6292 var path = (req.url).path; |
6293 var pathOffset = 0; | 6293 var pathOffset = 0; |
6294 var index; | 6294 var index; |
6295 var subPart; | 6295 var subPart; |
6296 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 6296 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
6297 pathOffset += 1; | 6297 pathOffset += 1; |
6298 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); | 6298 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); |
(...skipping 28 matching lines...) Expand all Loading... |
6327 } | 6327 } |
6328 } | 6328 } |
6329 | 6329 |
6330 | 6330 |
6331 var h = { | 6331 var h = { |
6332 "content-type" : "application/json; charset=utf-8", | 6332 "content-type" : "application/json; charset=utf-8", |
6333 }; | 6333 }; |
6334 var resp = convert.JSON.encode(buildRevision()); | 6334 var resp = convert.JSON.encode(buildRevision()); |
6335 return new async.Future.value(stringResponse(200, h, resp)); | 6335 return new async.Future.value(stringResponse(200, h, resp)); |
6336 }), true); | 6336 }), true); |
6337 res.patch(arg_request, arg_fileId, arg_revisionId).then(unittest.expectAsy
nc(((api.Revision response) { | 6337 res.patch(arg_request, arg_fileId, arg_revisionId).then(unittest.expectAsy
nc1(((api.Revision response) { |
6338 checkRevision(response); | 6338 checkRevision(response); |
6339 }))); | 6339 }))); |
6340 }); | 6340 }); |
6341 | 6341 |
6342 unittest.test("method--update", () { | 6342 unittest.test("method--update", () { |
6343 | 6343 |
6344 var mock = new HttpServerMock(); | 6344 var mock = new HttpServerMock(); |
6345 api.RevisionsResourceApi res = new api.DriveApi(mock).revisions; | 6345 api.RevisionsResourceApi res = new api.DriveApi(mock).revisions; |
6346 var arg_request = buildRevision(); | 6346 var arg_request = buildRevision(); |
6347 var arg_fileId = "foo"; | 6347 var arg_fileId = "foo"; |
6348 var arg_revisionId = "foo"; | 6348 var arg_revisionId = "foo"; |
6349 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 6349 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
6350 var obj = new api.Revision.fromJson(json); | 6350 var obj = new api.Revision.fromJson(json); |
6351 checkRevision(obj); | 6351 checkRevision(obj); |
6352 | 6352 |
6353 var path = (req.url).path; | 6353 var path = (req.url).path; |
6354 var pathOffset = 0; | 6354 var pathOffset = 0; |
6355 var index; | 6355 var index; |
6356 var subPart; | 6356 var subPart; |
6357 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 6357 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
6358 pathOffset += 1; | 6358 pathOffset += 1; |
6359 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); | 6359 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); |
(...skipping 28 matching lines...) Expand all Loading... |
6388 } | 6388 } |
6389 } | 6389 } |
6390 | 6390 |
6391 | 6391 |
6392 var h = { | 6392 var h = { |
6393 "content-type" : "application/json; charset=utf-8", | 6393 "content-type" : "application/json; charset=utf-8", |
6394 }; | 6394 }; |
6395 var resp = convert.JSON.encode(buildRevision()); | 6395 var resp = convert.JSON.encode(buildRevision()); |
6396 return new async.Future.value(stringResponse(200, h, resp)); | 6396 return new async.Future.value(stringResponse(200, h, resp)); |
6397 }), true); | 6397 }), true); |
6398 res.update(arg_request, arg_fileId, arg_revisionId).then(unittest.expectAs
ync(((api.Revision response) { | 6398 res.update(arg_request, arg_fileId, arg_revisionId).then(unittest.expectAs
ync1(((api.Revision response) { |
6399 checkRevision(response); | 6399 checkRevision(response); |
6400 }))); | 6400 }))); |
6401 }); | 6401 }); |
6402 | 6402 |
6403 }); | 6403 }); |
6404 | 6404 |
6405 | 6405 |
6406 unittest.group("resource-TeamdrivesResourceApi", () { | 6406 unittest.group("resource-TeamdrivesResourceApi", () { |
6407 unittest.test("method--delete", () { | 6407 unittest.test("method--delete", () { |
6408 | 6408 |
6409 var mock = new HttpServerMock(); | 6409 var mock = new HttpServerMock(); |
6410 api.TeamdrivesResourceApi res = new api.DriveApi(mock).teamdrives; | 6410 api.TeamdrivesResourceApi res = new api.DriveApi(mock).teamdrives; |
6411 var arg_teamDriveId = "foo"; | 6411 var arg_teamDriveId = "foo"; |
6412 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 6412 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
6413 var path = (req.url).path; | 6413 var path = (req.url).path; |
6414 var pathOffset = 0; | 6414 var pathOffset = 0; |
6415 var index; | 6415 var index; |
6416 var subPart; | 6416 var subPart; |
6417 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 6417 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
6418 pathOffset += 1; | 6418 pathOffset += 1; |
6419 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); | 6419 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); |
6420 pathOffset += 9; | 6420 pathOffset += 9; |
6421 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("teamdrives/")); | 6421 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("teamdrives/")); |
6422 pathOffset += 11; | 6422 pathOffset += 11; |
(...skipping 18 matching lines...) Expand all Loading... |
6441 } | 6441 } |
6442 } | 6442 } |
6443 | 6443 |
6444 | 6444 |
6445 var h = { | 6445 var h = { |
6446 "content-type" : "application/json; charset=utf-8", | 6446 "content-type" : "application/json; charset=utf-8", |
6447 }; | 6447 }; |
6448 var resp = ""; | 6448 var resp = ""; |
6449 return new async.Future.value(stringResponse(200, h, resp)); | 6449 return new async.Future.value(stringResponse(200, h, resp)); |
6450 }), true); | 6450 }), true); |
6451 res.delete(arg_teamDriveId).then(unittest.expectAsync((_) {})); | 6451 res.delete(arg_teamDriveId).then(unittest.expectAsync1((_) {})); |
6452 }); | 6452 }); |
6453 | 6453 |
6454 unittest.test("method--get", () { | 6454 unittest.test("method--get", () { |
6455 | 6455 |
6456 var mock = new HttpServerMock(); | 6456 var mock = new HttpServerMock(); |
6457 api.TeamdrivesResourceApi res = new api.DriveApi(mock).teamdrives; | 6457 api.TeamdrivesResourceApi res = new api.DriveApi(mock).teamdrives; |
6458 var arg_teamDriveId = "foo"; | 6458 var arg_teamDriveId = "foo"; |
6459 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 6459 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
6460 var path = (req.url).path; | 6460 var path = (req.url).path; |
6461 var pathOffset = 0; | 6461 var pathOffset = 0; |
6462 var index; | 6462 var index; |
6463 var subPart; | 6463 var subPart; |
6464 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 6464 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
6465 pathOffset += 1; | 6465 pathOffset += 1; |
6466 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); | 6466 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); |
6467 pathOffset += 9; | 6467 pathOffset += 9; |
6468 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("teamdrives/")); | 6468 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("teamdrives/")); |
6469 pathOffset += 11; | 6469 pathOffset += 11; |
(...skipping 18 matching lines...) Expand all Loading... |
6488 } | 6488 } |
6489 } | 6489 } |
6490 | 6490 |
6491 | 6491 |
6492 var h = { | 6492 var h = { |
6493 "content-type" : "application/json; charset=utf-8", | 6493 "content-type" : "application/json; charset=utf-8", |
6494 }; | 6494 }; |
6495 var resp = convert.JSON.encode(buildTeamDrive()); | 6495 var resp = convert.JSON.encode(buildTeamDrive()); |
6496 return new async.Future.value(stringResponse(200, h, resp)); | 6496 return new async.Future.value(stringResponse(200, h, resp)); |
6497 }), true); | 6497 }), true); |
6498 res.get(arg_teamDriveId).then(unittest.expectAsync(((api.TeamDrive respons
e) { | 6498 res.get(arg_teamDriveId).then(unittest.expectAsync1(((api.TeamDrive respon
se) { |
6499 checkTeamDrive(response); | 6499 checkTeamDrive(response); |
6500 }))); | 6500 }))); |
6501 }); | 6501 }); |
6502 | 6502 |
6503 unittest.test("method--insert", () { | 6503 unittest.test("method--insert", () { |
6504 | 6504 |
6505 var mock = new HttpServerMock(); | 6505 var mock = new HttpServerMock(); |
6506 api.TeamdrivesResourceApi res = new api.DriveApi(mock).teamdrives; | 6506 api.TeamdrivesResourceApi res = new api.DriveApi(mock).teamdrives; |
6507 var arg_request = buildTeamDrive(); | 6507 var arg_request = buildTeamDrive(); |
6508 var arg_requestId = "foo"; | 6508 var arg_requestId = "foo"; |
6509 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 6509 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
6510 var obj = new api.TeamDrive.fromJson(json); | 6510 var obj = new api.TeamDrive.fromJson(json); |
6511 checkTeamDrive(obj); | 6511 checkTeamDrive(obj); |
6512 | 6512 |
6513 var path = (req.url).path; | 6513 var path = (req.url).path; |
6514 var pathOffset = 0; | 6514 var pathOffset = 0; |
6515 var index; | 6515 var index; |
6516 var subPart; | 6516 var subPart; |
6517 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 6517 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
6518 pathOffset += 1; | 6518 pathOffset += 1; |
6519 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); | 6519 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); |
(...skipping 19 matching lines...) Expand all Loading... |
6539 } | 6539 } |
6540 unittest.expect(queryMap["requestId"].first, unittest.equals(arg_request
Id)); | 6540 unittest.expect(queryMap["requestId"].first, unittest.equals(arg_request
Id)); |
6541 | 6541 |
6542 | 6542 |
6543 var h = { | 6543 var h = { |
6544 "content-type" : "application/json; charset=utf-8", | 6544 "content-type" : "application/json; charset=utf-8", |
6545 }; | 6545 }; |
6546 var resp = convert.JSON.encode(buildTeamDrive()); | 6546 var resp = convert.JSON.encode(buildTeamDrive()); |
6547 return new async.Future.value(stringResponse(200, h, resp)); | 6547 return new async.Future.value(stringResponse(200, h, resp)); |
6548 }), true); | 6548 }), true); |
6549 res.insert(arg_request, arg_requestId).then(unittest.expectAsync(((api.Tea
mDrive response) { | 6549 res.insert(arg_request, arg_requestId).then(unittest.expectAsync1(((api.Te
amDrive response) { |
6550 checkTeamDrive(response); | 6550 checkTeamDrive(response); |
6551 }))); | 6551 }))); |
6552 }); | 6552 }); |
6553 | 6553 |
6554 unittest.test("method--list", () { | 6554 unittest.test("method--list", () { |
6555 | 6555 |
6556 var mock = new HttpServerMock(); | 6556 var mock = new HttpServerMock(); |
6557 api.TeamdrivesResourceApi res = new api.DriveApi(mock).teamdrives; | 6557 api.TeamdrivesResourceApi res = new api.DriveApi(mock).teamdrives; |
6558 var arg_maxResults = 42; | 6558 var arg_maxResults = 42; |
6559 var arg_pageToken = "foo"; | 6559 var arg_pageToken = "foo"; |
6560 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 6560 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
6561 var path = (req.url).path; | 6561 var path = (req.url).path; |
6562 var pathOffset = 0; | 6562 var pathOffset = 0; |
6563 var index; | 6563 var index; |
6564 var subPart; | 6564 var subPart; |
6565 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 6565 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
6566 pathOffset += 1; | 6566 pathOffset += 1; |
6567 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); | 6567 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); |
6568 pathOffset += 9; | 6568 pathOffset += 9; |
6569 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("teamdrives")); | 6569 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("teamdrives")); |
6570 pathOffset += 10; | 6570 pathOffset += 10; |
(...skipping 17 matching lines...) Expand all Loading... |
6588 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | 6588 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); |
6589 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 6589 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
6590 | 6590 |
6591 | 6591 |
6592 var h = { | 6592 var h = { |
6593 "content-type" : "application/json; charset=utf-8", | 6593 "content-type" : "application/json; charset=utf-8", |
6594 }; | 6594 }; |
6595 var resp = convert.JSON.encode(buildTeamDriveList()); | 6595 var resp = convert.JSON.encode(buildTeamDriveList()); |
6596 return new async.Future.value(stringResponse(200, h, resp)); | 6596 return new async.Future.value(stringResponse(200, h, resp)); |
6597 }), true); | 6597 }), true); |
6598 res.list(maxResults: arg_maxResults, pageToken: arg_pageToken).then(unitte
st.expectAsync(((api.TeamDriveList response) { | 6598 res.list(maxResults: arg_maxResults, pageToken: arg_pageToken).then(unitte
st.expectAsync1(((api.TeamDriveList response) { |
6599 checkTeamDriveList(response); | 6599 checkTeamDriveList(response); |
6600 }))); | 6600 }))); |
6601 }); | 6601 }); |
6602 | 6602 |
6603 unittest.test("method--update", () { | 6603 unittest.test("method--update", () { |
6604 | 6604 |
6605 var mock = new HttpServerMock(); | 6605 var mock = new HttpServerMock(); |
6606 api.TeamdrivesResourceApi res = new api.DriveApi(mock).teamdrives; | 6606 api.TeamdrivesResourceApi res = new api.DriveApi(mock).teamdrives; |
6607 var arg_request = buildTeamDrive(); | 6607 var arg_request = buildTeamDrive(); |
6608 var arg_teamDriveId = "foo"; | 6608 var arg_teamDriveId = "foo"; |
6609 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 6609 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
6610 var obj = new api.TeamDrive.fromJson(json); | 6610 var obj = new api.TeamDrive.fromJson(json); |
6611 checkTeamDrive(obj); | 6611 checkTeamDrive(obj); |
6612 | 6612 |
6613 var path = (req.url).path; | 6613 var path = (req.url).path; |
6614 var pathOffset = 0; | 6614 var pathOffset = 0; |
6615 var index; | 6615 var index; |
6616 var subPart; | 6616 var subPart; |
6617 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 6617 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
6618 pathOffset += 1; | 6618 pathOffset += 1; |
6619 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); | 6619 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("drive/v2/")); |
(...skipping 21 matching lines...) Expand all Loading... |
6641 } | 6641 } |
6642 } | 6642 } |
6643 | 6643 |
6644 | 6644 |
6645 var h = { | 6645 var h = { |
6646 "content-type" : "application/json; charset=utf-8", | 6646 "content-type" : "application/json; charset=utf-8", |
6647 }; | 6647 }; |
6648 var resp = convert.JSON.encode(buildTeamDrive()); | 6648 var resp = convert.JSON.encode(buildTeamDrive()); |
6649 return new async.Future.value(stringResponse(200, h, resp)); | 6649 return new async.Future.value(stringResponse(200, h, resp)); |
6650 }), true); | 6650 }), true); |
6651 res.update(arg_request, arg_teamDriveId).then(unittest.expectAsync(((api.T
eamDrive response) { | 6651 res.update(arg_request, arg_teamDriveId).then(unittest.expectAsync1(((api.
TeamDrive response) { |
6652 checkTeamDrive(response); | 6652 checkTeamDrive(response); |
6653 }))); | 6653 }))); |
6654 }); | 6654 }); |
6655 | 6655 |
6656 }); | 6656 }); |
6657 | 6657 |
6658 | 6658 |
6659 } | 6659 } |
6660 | 6660 |
OLD | NEW |