OLD | NEW |
1 library googleapis.calendar.v3.test; | 1 library googleapis.calendar.v3.test; |
2 | 2 |
3 import "dart:core" as core; | 3 import "dart:core" as core; |
4 import "dart:collection" as collection; | 4 import "dart:collection" as collection; |
5 import "dart:async" as async; | 5 import "dart:async" as async; |
6 import "dart:convert" as convert; | 6 import "dart:convert" as convert; |
7 | 7 |
8 import 'package:http/http.dart' as http; | 8 import 'package:http/http.dart' as http; |
9 import 'package:http/testing.dart' as http_testing; | 9 import 'package:http/testing.dart' as http_testing; |
10 import 'package:unittest/unittest.dart' as unittest; | 10 import 'package:unittest/unittest.dart' as unittest; |
11 import 'package:googleapis/common/common.dart' as common; | |
12 import 'package:googleapis/src/common_internal.dart' as common_internal; | |
13 import '../common/common_internal_test.dart' as common_test; | |
14 | 11 |
15 import 'package:googleapis/calendar/v3.dart' as api; | 12 import 'package:googleapis/calendar/v3.dart' as api; |
16 | 13 |
| 14 class HttpServerMock extends http.BaseClient { |
| 15 core.Function _callback; |
| 16 core.bool _expectJson; |
17 | 17 |
| 18 void register(core.Function callback, core.bool expectJson) { |
| 19 _callback = callback; |
| 20 _expectJson = expectJson; |
| 21 } |
18 | 22 |
19 buildUnnamed978() { | 23 async.Future<http.StreamedResponse> send(http.BaseRequest request) { |
| 24 if (_expectJson) { |
| 25 return request.finalize() |
| 26 .transform(convert.UTF8.decoder) |
| 27 .join('') |
| 28 .then((core.String jsonString) { |
| 29 if (jsonString.isEmpty) { |
| 30 return _callback(request, null); |
| 31 } else { |
| 32 return _callback(request, convert.JSON.decode(jsonString)); |
| 33 } |
| 34 }); |
| 35 } else { |
| 36 var stream = request.finalize(); |
| 37 if (stream == null) { |
| 38 return _callback(request, []); |
| 39 } else { |
| 40 return stream.toBytes().then((data) { |
| 41 return _callback(request, data); |
| 42 }); |
| 43 } |
| 44 } |
| 45 } |
| 46 } |
| 47 |
| 48 http.StreamedResponse stringResponse( |
| 49 core.int status, core.Map headers, core.String body) { |
| 50 var stream = new async.Stream.fromIterable([convert.UTF8.encode(body)]); |
| 51 return new http.StreamedResponse(stream, status, headers: headers); |
| 52 } |
| 53 |
| 54 buildUnnamed370() { |
20 var o = new core.List<api.AclRule>(); | 55 var o = new core.List<api.AclRule>(); |
21 o.add(buildAclRule()); | 56 o.add(buildAclRule()); |
22 o.add(buildAclRule()); | 57 o.add(buildAclRule()); |
23 return o; | 58 return o; |
24 } | 59 } |
25 | 60 |
26 checkUnnamed978(core.List<api.AclRule> o) { | 61 checkUnnamed370(core.List<api.AclRule> o) { |
27 unittest.expect(o, unittest.hasLength(2)); | 62 unittest.expect(o, unittest.hasLength(2)); |
28 checkAclRule(o[0]); | 63 checkAclRule(o[0]); |
29 checkAclRule(o[1]); | 64 checkAclRule(o[1]); |
30 } | 65 } |
31 | 66 |
32 core.int buildCounterAcl = 0; | 67 core.int buildCounterAcl = 0; |
33 buildAcl() { | 68 buildAcl() { |
34 var o = new api.Acl(); | 69 var o = new api.Acl(); |
35 buildCounterAcl++; | 70 buildCounterAcl++; |
36 if (buildCounterAcl < 3) { | 71 if (buildCounterAcl < 3) { |
37 o.etag = "foo"; | 72 o.etag = "foo"; |
38 o.items = buildUnnamed978(); | 73 o.items = buildUnnamed370(); |
39 o.kind = "foo"; | 74 o.kind = "foo"; |
40 o.nextPageToken = "foo"; | 75 o.nextPageToken = "foo"; |
41 o.nextSyncToken = "foo"; | 76 o.nextSyncToken = "foo"; |
42 } | 77 } |
43 buildCounterAcl--; | 78 buildCounterAcl--; |
44 return o; | 79 return o; |
45 } | 80 } |
46 | 81 |
47 checkAcl(api.Acl o) { | 82 checkAcl(api.Acl o) { |
48 buildCounterAcl++; | 83 buildCounterAcl++; |
49 if (buildCounterAcl < 3) { | 84 if (buildCounterAcl < 3) { |
50 unittest.expect(o.etag, unittest.equals('foo')); | 85 unittest.expect(o.etag, unittest.equals('foo')); |
51 checkUnnamed978(o.items); | 86 checkUnnamed370(o.items); |
52 unittest.expect(o.kind, unittest.equals('foo')); | 87 unittest.expect(o.kind, unittest.equals('foo')); |
53 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 88 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
54 unittest.expect(o.nextSyncToken, unittest.equals('foo')); | 89 unittest.expect(o.nextSyncToken, unittest.equals('foo')); |
55 } | 90 } |
56 buildCounterAcl--; | 91 buildCounterAcl--; |
57 } | 92 } |
58 | 93 |
59 core.int buildCounterAclRuleScope = 0; | 94 core.int buildCounterAclRuleScope = 0; |
60 buildAclRuleScope() { | 95 buildAclRuleScope() { |
61 var o = new api.AclRuleScope(); | 96 var o = new api.AclRuleScope(); |
(...skipping 66 matching lines...) Loading... |
128 unittest.expect(o.etag, unittest.equals('foo')); | 163 unittest.expect(o.etag, unittest.equals('foo')); |
129 unittest.expect(o.id, unittest.equals('foo')); | 164 unittest.expect(o.id, unittest.equals('foo')); |
130 unittest.expect(o.kind, unittest.equals('foo')); | 165 unittest.expect(o.kind, unittest.equals('foo')); |
131 unittest.expect(o.location, unittest.equals('foo')); | 166 unittest.expect(o.location, unittest.equals('foo')); |
132 unittest.expect(o.summary, unittest.equals('foo')); | 167 unittest.expect(o.summary, unittest.equals('foo')); |
133 unittest.expect(o.timeZone, unittest.equals('foo')); | 168 unittest.expect(o.timeZone, unittest.equals('foo')); |
134 } | 169 } |
135 buildCounterCalendar--; | 170 buildCounterCalendar--; |
136 } | 171 } |
137 | 172 |
138 buildUnnamed979() { | 173 buildUnnamed371() { |
139 var o = new core.List<api.CalendarListEntry>(); | 174 var o = new core.List<api.CalendarListEntry>(); |
140 o.add(buildCalendarListEntry()); | 175 o.add(buildCalendarListEntry()); |
141 o.add(buildCalendarListEntry()); | 176 o.add(buildCalendarListEntry()); |
142 return o; | 177 return o; |
143 } | 178 } |
144 | 179 |
145 checkUnnamed979(core.List<api.CalendarListEntry> o) { | 180 checkUnnamed371(core.List<api.CalendarListEntry> o) { |
146 unittest.expect(o, unittest.hasLength(2)); | 181 unittest.expect(o, unittest.hasLength(2)); |
147 checkCalendarListEntry(o[0]); | 182 checkCalendarListEntry(o[0]); |
148 checkCalendarListEntry(o[1]); | 183 checkCalendarListEntry(o[1]); |
149 } | 184 } |
150 | 185 |
151 core.int buildCounterCalendarList = 0; | 186 core.int buildCounterCalendarList = 0; |
152 buildCalendarList() { | 187 buildCalendarList() { |
153 var o = new api.CalendarList(); | 188 var o = new api.CalendarList(); |
154 buildCounterCalendarList++; | 189 buildCounterCalendarList++; |
155 if (buildCounterCalendarList < 3) { | 190 if (buildCounterCalendarList < 3) { |
156 o.etag = "foo"; | 191 o.etag = "foo"; |
157 o.items = buildUnnamed979(); | 192 o.items = buildUnnamed371(); |
158 o.kind = "foo"; | 193 o.kind = "foo"; |
159 o.nextPageToken = "foo"; | 194 o.nextPageToken = "foo"; |
160 o.nextSyncToken = "foo"; | 195 o.nextSyncToken = "foo"; |
161 } | 196 } |
162 buildCounterCalendarList--; | 197 buildCounterCalendarList--; |
163 return o; | 198 return o; |
164 } | 199 } |
165 | 200 |
166 checkCalendarList(api.CalendarList o) { | 201 checkCalendarList(api.CalendarList o) { |
167 buildCounterCalendarList++; | 202 buildCounterCalendarList++; |
168 if (buildCounterCalendarList < 3) { | 203 if (buildCounterCalendarList < 3) { |
169 unittest.expect(o.etag, unittest.equals('foo')); | 204 unittest.expect(o.etag, unittest.equals('foo')); |
170 checkUnnamed979(o.items); | 205 checkUnnamed371(o.items); |
171 unittest.expect(o.kind, unittest.equals('foo')); | 206 unittest.expect(o.kind, unittest.equals('foo')); |
172 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 207 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
173 unittest.expect(o.nextSyncToken, unittest.equals('foo')); | 208 unittest.expect(o.nextSyncToken, unittest.equals('foo')); |
174 } | 209 } |
175 buildCounterCalendarList--; | 210 buildCounterCalendarList--; |
176 } | 211 } |
177 | 212 |
178 buildUnnamed980() { | 213 buildUnnamed372() { |
179 var o = new core.List<api.EventReminder>(); | 214 var o = new core.List<api.EventReminder>(); |
180 o.add(buildEventReminder()); | 215 o.add(buildEventReminder()); |
181 o.add(buildEventReminder()); | 216 o.add(buildEventReminder()); |
182 return o; | 217 return o; |
183 } | 218 } |
184 | 219 |
185 checkUnnamed980(core.List<api.EventReminder> o) { | 220 checkUnnamed372(core.List<api.EventReminder> o) { |
186 unittest.expect(o, unittest.hasLength(2)); | 221 unittest.expect(o, unittest.hasLength(2)); |
187 checkEventReminder(o[0]); | 222 checkEventReminder(o[0]); |
188 checkEventReminder(o[1]); | 223 checkEventReminder(o[1]); |
189 } | 224 } |
190 | 225 |
191 buildUnnamed981() { | 226 buildUnnamed373() { |
192 var o = new core.List<api.CalendarNotification>(); | 227 var o = new core.List<api.CalendarNotification>(); |
193 o.add(buildCalendarNotification()); | 228 o.add(buildCalendarNotification()); |
194 o.add(buildCalendarNotification()); | 229 o.add(buildCalendarNotification()); |
195 return o; | 230 return o; |
196 } | 231 } |
197 | 232 |
198 checkUnnamed981(core.List<api.CalendarNotification> o) { | 233 checkUnnamed373(core.List<api.CalendarNotification> o) { |
199 unittest.expect(o, unittest.hasLength(2)); | 234 unittest.expect(o, unittest.hasLength(2)); |
200 checkCalendarNotification(o[0]); | 235 checkCalendarNotification(o[0]); |
201 checkCalendarNotification(o[1]); | 236 checkCalendarNotification(o[1]); |
202 } | 237 } |
203 | 238 |
204 core.int buildCounterCalendarListEntryNotificationSettings = 0; | 239 core.int buildCounterCalendarListEntryNotificationSettings = 0; |
205 buildCalendarListEntryNotificationSettings() { | 240 buildCalendarListEntryNotificationSettings() { |
206 var o = new api.CalendarListEntryNotificationSettings(); | 241 var o = new api.CalendarListEntryNotificationSettings(); |
207 buildCounterCalendarListEntryNotificationSettings++; | 242 buildCounterCalendarListEntryNotificationSettings++; |
208 if (buildCounterCalendarListEntryNotificationSettings < 3) { | 243 if (buildCounterCalendarListEntryNotificationSettings < 3) { |
209 o.notifications = buildUnnamed981(); | 244 o.notifications = buildUnnamed373(); |
210 } | 245 } |
211 buildCounterCalendarListEntryNotificationSettings--; | 246 buildCounterCalendarListEntryNotificationSettings--; |
212 return o; | 247 return o; |
213 } | 248 } |
214 | 249 |
215 checkCalendarListEntryNotificationSettings(api.CalendarListEntryNotificationSett
ings o) { | 250 checkCalendarListEntryNotificationSettings(api.CalendarListEntryNotificationSett
ings o) { |
216 buildCounterCalendarListEntryNotificationSettings++; | 251 buildCounterCalendarListEntryNotificationSettings++; |
217 if (buildCounterCalendarListEntryNotificationSettings < 3) { | 252 if (buildCounterCalendarListEntryNotificationSettings < 3) { |
218 checkUnnamed981(o.notifications); | 253 checkUnnamed373(o.notifications); |
219 } | 254 } |
220 buildCounterCalendarListEntryNotificationSettings--; | 255 buildCounterCalendarListEntryNotificationSettings--; |
221 } | 256 } |
222 | 257 |
223 core.int buildCounterCalendarListEntry = 0; | 258 core.int buildCounterCalendarListEntry = 0; |
224 buildCalendarListEntry() { | 259 buildCalendarListEntry() { |
225 var o = new api.CalendarListEntry(); | 260 var o = new api.CalendarListEntry(); |
226 buildCounterCalendarListEntry++; | 261 buildCounterCalendarListEntry++; |
227 if (buildCounterCalendarListEntry < 3) { | 262 if (buildCounterCalendarListEntry < 3) { |
228 o.accessRole = "foo"; | 263 o.accessRole = "foo"; |
229 o.backgroundColor = "foo"; | 264 o.backgroundColor = "foo"; |
230 o.colorId = "foo"; | 265 o.colorId = "foo"; |
231 o.defaultReminders = buildUnnamed980(); | 266 o.defaultReminders = buildUnnamed372(); |
232 o.deleted = true; | 267 o.deleted = true; |
233 o.description = "foo"; | 268 o.description = "foo"; |
234 o.etag = "foo"; | 269 o.etag = "foo"; |
235 o.foregroundColor = "foo"; | 270 o.foregroundColor = "foo"; |
236 o.hidden = true; | 271 o.hidden = true; |
237 o.id = "foo"; | 272 o.id = "foo"; |
238 o.kind = "foo"; | 273 o.kind = "foo"; |
239 o.location = "foo"; | 274 o.location = "foo"; |
240 o.notificationSettings = buildCalendarListEntryNotificationSettings(); | 275 o.notificationSettings = buildCalendarListEntryNotificationSettings(); |
241 o.primary = true; | 276 o.primary = true; |
242 o.selected = true; | 277 o.selected = true; |
243 o.summary = "foo"; | 278 o.summary = "foo"; |
244 o.summaryOverride = "foo"; | 279 o.summaryOverride = "foo"; |
245 o.timeZone = "foo"; | 280 o.timeZone = "foo"; |
246 } | 281 } |
247 buildCounterCalendarListEntry--; | 282 buildCounterCalendarListEntry--; |
248 return o; | 283 return o; |
249 } | 284 } |
250 | 285 |
251 checkCalendarListEntry(api.CalendarListEntry o) { | 286 checkCalendarListEntry(api.CalendarListEntry o) { |
252 buildCounterCalendarListEntry++; | 287 buildCounterCalendarListEntry++; |
253 if (buildCounterCalendarListEntry < 3) { | 288 if (buildCounterCalendarListEntry < 3) { |
254 unittest.expect(o.accessRole, unittest.equals('foo')); | 289 unittest.expect(o.accessRole, unittest.equals('foo')); |
255 unittest.expect(o.backgroundColor, unittest.equals('foo')); | 290 unittest.expect(o.backgroundColor, unittest.equals('foo')); |
256 unittest.expect(o.colorId, unittest.equals('foo')); | 291 unittest.expect(o.colorId, unittest.equals('foo')); |
257 checkUnnamed980(o.defaultReminders); | 292 checkUnnamed372(o.defaultReminders); |
258 unittest.expect(o.deleted, unittest.isTrue); | 293 unittest.expect(o.deleted, unittest.isTrue); |
259 unittest.expect(o.description, unittest.equals('foo')); | 294 unittest.expect(o.description, unittest.equals('foo')); |
260 unittest.expect(o.etag, unittest.equals('foo')); | 295 unittest.expect(o.etag, unittest.equals('foo')); |
261 unittest.expect(o.foregroundColor, unittest.equals('foo')); | 296 unittest.expect(o.foregroundColor, unittest.equals('foo')); |
262 unittest.expect(o.hidden, unittest.isTrue); | 297 unittest.expect(o.hidden, unittest.isTrue); |
263 unittest.expect(o.id, unittest.equals('foo')); | 298 unittest.expect(o.id, unittest.equals('foo')); |
264 unittest.expect(o.kind, unittest.equals('foo')); | 299 unittest.expect(o.kind, unittest.equals('foo')); |
265 unittest.expect(o.location, unittest.equals('foo')); | 300 unittest.expect(o.location, unittest.equals('foo')); |
266 checkCalendarListEntryNotificationSettings(o.notificationSettings); | 301 checkCalendarListEntryNotificationSettings(o.notificationSettings); |
267 unittest.expect(o.primary, unittest.isTrue); | 302 unittest.expect(o.primary, unittest.isTrue); |
(...skipping 19 matching lines...) Loading... |
287 | 322 |
288 checkCalendarNotification(api.CalendarNotification o) { | 323 checkCalendarNotification(api.CalendarNotification o) { |
289 buildCounterCalendarNotification++; | 324 buildCounterCalendarNotification++; |
290 if (buildCounterCalendarNotification < 3) { | 325 if (buildCounterCalendarNotification < 3) { |
291 unittest.expect(o.method, unittest.equals('foo')); | 326 unittest.expect(o.method, unittest.equals('foo')); |
292 unittest.expect(o.type, unittest.equals('foo')); | 327 unittest.expect(o.type, unittest.equals('foo')); |
293 } | 328 } |
294 buildCounterCalendarNotification--; | 329 buildCounterCalendarNotification--; |
295 } | 330 } |
296 | 331 |
297 buildUnnamed982() { | 332 buildUnnamed374() { |
298 var o = new core.Map<core.String, core.String>(); | 333 var o = new core.Map<core.String, core.String>(); |
299 o["x"] = "foo"; | 334 o["x"] = "foo"; |
300 o["y"] = "foo"; | 335 o["y"] = "foo"; |
301 return o; | 336 return o; |
302 } | 337 } |
303 | 338 |
304 checkUnnamed982(core.Map<core.String, core.String> o) { | 339 checkUnnamed374(core.Map<core.String, core.String> o) { |
305 unittest.expect(o, unittest.hasLength(2)); | 340 unittest.expect(o, unittest.hasLength(2)); |
306 unittest.expect(o["x"], unittest.equals('foo')); | 341 unittest.expect(o["x"], unittest.equals('foo')); |
307 unittest.expect(o["y"], unittest.equals('foo')); | 342 unittest.expect(o["y"], unittest.equals('foo')); |
308 } | 343 } |
309 | 344 |
310 core.int buildCounterChannel = 0; | 345 core.int buildCounterChannel = 0; |
311 buildChannel() { | 346 buildChannel() { |
312 var o = new api.Channel(); | 347 var o = new api.Channel(); |
313 buildCounterChannel++; | 348 buildCounterChannel++; |
314 if (buildCounterChannel < 3) { | 349 if (buildCounterChannel < 3) { |
315 o.address = "foo"; | 350 o.address = "foo"; |
316 o.expiration = "foo"; | 351 o.expiration = "foo"; |
317 o.id = "foo"; | 352 o.id = "foo"; |
318 o.kind = "foo"; | 353 o.kind = "foo"; |
319 o.params = buildUnnamed982(); | 354 o.params = buildUnnamed374(); |
320 o.payload = true; | 355 o.payload = true; |
321 o.resourceId = "foo"; | 356 o.resourceId = "foo"; |
322 o.resourceUri = "foo"; | 357 o.resourceUri = "foo"; |
323 o.token = "foo"; | 358 o.token = "foo"; |
324 o.type = "foo"; | 359 o.type = "foo"; |
325 } | 360 } |
326 buildCounterChannel--; | 361 buildCounterChannel--; |
327 return o; | 362 return o; |
328 } | 363 } |
329 | 364 |
330 checkChannel(api.Channel o) { | 365 checkChannel(api.Channel o) { |
331 buildCounterChannel++; | 366 buildCounterChannel++; |
332 if (buildCounterChannel < 3) { | 367 if (buildCounterChannel < 3) { |
333 unittest.expect(o.address, unittest.equals('foo')); | 368 unittest.expect(o.address, unittest.equals('foo')); |
334 unittest.expect(o.expiration, unittest.equals('foo')); | 369 unittest.expect(o.expiration, unittest.equals('foo')); |
335 unittest.expect(o.id, unittest.equals('foo')); | 370 unittest.expect(o.id, unittest.equals('foo')); |
336 unittest.expect(o.kind, unittest.equals('foo')); | 371 unittest.expect(o.kind, unittest.equals('foo')); |
337 checkUnnamed982(o.params); | 372 checkUnnamed374(o.params); |
338 unittest.expect(o.payload, unittest.isTrue); | 373 unittest.expect(o.payload, unittest.isTrue); |
339 unittest.expect(o.resourceId, unittest.equals('foo')); | 374 unittest.expect(o.resourceId, unittest.equals('foo')); |
340 unittest.expect(o.resourceUri, unittest.equals('foo')); | 375 unittest.expect(o.resourceUri, unittest.equals('foo')); |
341 unittest.expect(o.token, unittest.equals('foo')); | 376 unittest.expect(o.token, unittest.equals('foo')); |
342 unittest.expect(o.type, unittest.equals('foo')); | 377 unittest.expect(o.type, unittest.equals('foo')); |
343 } | 378 } |
344 buildCounterChannel--; | 379 buildCounterChannel--; |
345 } | 380 } |
346 | 381 |
347 core.int buildCounterColorDefinition = 0; | 382 core.int buildCounterColorDefinition = 0; |
(...skipping 10 matching lines...) Loading... |
358 | 393 |
359 checkColorDefinition(api.ColorDefinition o) { | 394 checkColorDefinition(api.ColorDefinition o) { |
360 buildCounterColorDefinition++; | 395 buildCounterColorDefinition++; |
361 if (buildCounterColorDefinition < 3) { | 396 if (buildCounterColorDefinition < 3) { |
362 unittest.expect(o.background, unittest.equals('foo')); | 397 unittest.expect(o.background, unittest.equals('foo')); |
363 unittest.expect(o.foreground, unittest.equals('foo')); | 398 unittest.expect(o.foreground, unittest.equals('foo')); |
364 } | 399 } |
365 buildCounterColorDefinition--; | 400 buildCounterColorDefinition--; |
366 } | 401 } |
367 | 402 |
368 buildUnnamed983() { | 403 buildUnnamed375() { |
369 var o = new core.Map<core.String, api.ColorDefinition>(); | 404 var o = new core.Map<core.String, api.ColorDefinition>(); |
370 o["x"] = buildColorDefinition(); | 405 o["x"] = buildColorDefinition(); |
371 o["y"] = buildColorDefinition(); | 406 o["y"] = buildColorDefinition(); |
372 return o; | 407 return o; |
373 } | 408 } |
374 | 409 |
375 checkUnnamed983(core.Map<core.String, api.ColorDefinition> o) { | 410 checkUnnamed375(core.Map<core.String, api.ColorDefinition> o) { |
376 unittest.expect(o, unittest.hasLength(2)); | 411 unittest.expect(o, unittest.hasLength(2)); |
377 checkColorDefinition(o["x"]); | 412 checkColorDefinition(o["x"]); |
378 checkColorDefinition(o["y"]); | 413 checkColorDefinition(o["y"]); |
379 } | 414 } |
380 | 415 |
381 buildUnnamed984() { | 416 buildUnnamed376() { |
382 var o = new core.Map<core.String, api.ColorDefinition>(); | 417 var o = new core.Map<core.String, api.ColorDefinition>(); |
383 o["x"] = buildColorDefinition(); | 418 o["x"] = buildColorDefinition(); |
384 o["y"] = buildColorDefinition(); | 419 o["y"] = buildColorDefinition(); |
385 return o; | 420 return o; |
386 } | 421 } |
387 | 422 |
388 checkUnnamed984(core.Map<core.String, api.ColorDefinition> o) { | 423 checkUnnamed376(core.Map<core.String, api.ColorDefinition> o) { |
389 unittest.expect(o, unittest.hasLength(2)); | 424 unittest.expect(o, unittest.hasLength(2)); |
390 checkColorDefinition(o["x"]); | 425 checkColorDefinition(o["x"]); |
391 checkColorDefinition(o["y"]); | 426 checkColorDefinition(o["y"]); |
392 } | 427 } |
393 | 428 |
394 core.int buildCounterColors = 0; | 429 core.int buildCounterColors = 0; |
395 buildColors() { | 430 buildColors() { |
396 var o = new api.Colors(); | 431 var o = new api.Colors(); |
397 buildCounterColors++; | 432 buildCounterColors++; |
398 if (buildCounterColors < 3) { | 433 if (buildCounterColors < 3) { |
399 o.calendar = buildUnnamed983(); | 434 o.calendar = buildUnnamed375(); |
400 o.event = buildUnnamed984(); | 435 o.event = buildUnnamed376(); |
401 o.kind = "foo"; | 436 o.kind = "foo"; |
402 o.updated = core.DateTime.parse("2002-02-27T14:01:02"); | 437 o.updated = core.DateTime.parse("2002-02-27T14:01:02"); |
403 } | 438 } |
404 buildCounterColors--; | 439 buildCounterColors--; |
405 return o; | 440 return o; |
406 } | 441 } |
407 | 442 |
408 checkColors(api.Colors o) { | 443 checkColors(api.Colors o) { |
409 buildCounterColors++; | 444 buildCounterColors++; |
410 if (buildCounterColors < 3) { | 445 if (buildCounterColors < 3) { |
411 checkUnnamed983(o.calendar); | 446 checkUnnamed375(o.calendar); |
412 checkUnnamed984(o.event); | 447 checkUnnamed376(o.event); |
413 unittest.expect(o.kind, unittest.equals('foo')); | 448 unittest.expect(o.kind, unittest.equals('foo')); |
414 unittest.expect(o.updated, unittest.equals(core.DateTime.parse("2002-02-27T1
4:01:02"))); | 449 unittest.expect(o.updated, unittest.equals(core.DateTime.parse("2002-02-27T1
4:01:02"))); |
415 } | 450 } |
416 buildCounterColors--; | 451 buildCounterColors--; |
417 } | 452 } |
418 | 453 |
419 core.int buildCounterError = 0; | 454 core.int buildCounterError = 0; |
420 buildError() { | 455 buildError() { |
421 var o = new api.Error(); | 456 var o = new api.Error(); |
422 buildCounterError++; | 457 buildCounterError++; |
423 if (buildCounterError < 3) { | 458 if (buildCounterError < 3) { |
424 o.domain = "foo"; | 459 o.domain = "foo"; |
425 o.reason = "foo"; | 460 o.reason = "foo"; |
426 } | 461 } |
427 buildCounterError--; | 462 buildCounterError--; |
428 return o; | 463 return o; |
429 } | 464 } |
430 | 465 |
431 checkError(api.Error o) { | 466 checkError(api.Error o) { |
432 buildCounterError++; | 467 buildCounterError++; |
433 if (buildCounterError < 3) { | 468 if (buildCounterError < 3) { |
434 unittest.expect(o.domain, unittest.equals('foo')); | 469 unittest.expect(o.domain, unittest.equals('foo')); |
435 unittest.expect(o.reason, unittest.equals('foo')); | 470 unittest.expect(o.reason, unittest.equals('foo')); |
436 } | 471 } |
437 buildCounterError--; | 472 buildCounterError--; |
438 } | 473 } |
439 | 474 |
440 buildUnnamed985() { | 475 buildUnnamed377() { |
441 var o = new core.List<api.EventAttendee>(); | 476 var o = new core.List<api.EventAttendee>(); |
442 o.add(buildEventAttendee()); | 477 o.add(buildEventAttendee()); |
443 o.add(buildEventAttendee()); | 478 o.add(buildEventAttendee()); |
444 return o; | 479 return o; |
445 } | 480 } |
446 | 481 |
447 checkUnnamed985(core.List<api.EventAttendee> o) { | 482 checkUnnamed377(core.List<api.EventAttendee> o) { |
448 unittest.expect(o, unittest.hasLength(2)); | 483 unittest.expect(o, unittest.hasLength(2)); |
449 checkEventAttendee(o[0]); | 484 checkEventAttendee(o[0]); |
450 checkEventAttendee(o[1]); | 485 checkEventAttendee(o[1]); |
451 } | 486 } |
452 | 487 |
453 core.int buildCounterEventCreator = 0; | 488 core.int buildCounterEventCreator = 0; |
454 buildEventCreator() { | 489 buildEventCreator() { |
455 var o = new api.EventCreator(); | 490 var o = new api.EventCreator(); |
456 buildCounterEventCreator++; | 491 buildCounterEventCreator++; |
457 if (buildCounterEventCreator < 3) { | 492 if (buildCounterEventCreator < 3) { |
(...skipping 10 matching lines...) Loading... |
468 buildCounterEventCreator++; | 503 buildCounterEventCreator++; |
469 if (buildCounterEventCreator < 3) { | 504 if (buildCounterEventCreator < 3) { |
470 unittest.expect(o.displayName, unittest.equals('foo')); | 505 unittest.expect(o.displayName, unittest.equals('foo')); |
471 unittest.expect(o.email, unittest.equals('foo')); | 506 unittest.expect(o.email, unittest.equals('foo')); |
472 unittest.expect(o.id, unittest.equals('foo')); | 507 unittest.expect(o.id, unittest.equals('foo')); |
473 unittest.expect(o.self, unittest.isTrue); | 508 unittest.expect(o.self, unittest.isTrue); |
474 } | 509 } |
475 buildCounterEventCreator--; | 510 buildCounterEventCreator--; |
476 } | 511 } |
477 | 512 |
478 buildUnnamed986() { | 513 buildUnnamed378() { |
479 var o = new core.Map<core.String, core.String>(); | 514 var o = new core.Map<core.String, core.String>(); |
480 o["x"] = "foo"; | 515 o["x"] = "foo"; |
481 o["y"] = "foo"; | 516 o["y"] = "foo"; |
482 return o; | 517 return o; |
483 } | 518 } |
484 | 519 |
485 checkUnnamed986(core.Map<core.String, core.String> o) { | 520 checkUnnamed378(core.Map<core.String, core.String> o) { |
486 unittest.expect(o, unittest.hasLength(2)); | 521 unittest.expect(o, unittest.hasLength(2)); |
487 unittest.expect(o["x"], unittest.equals('foo')); | 522 unittest.expect(o["x"], unittest.equals('foo')); |
488 unittest.expect(o["y"], unittest.equals('foo')); | 523 unittest.expect(o["y"], unittest.equals('foo')); |
489 } | 524 } |
490 | 525 |
491 buildUnnamed987() { | 526 buildUnnamed379() { |
492 var o = new core.Map<core.String, core.String>(); | 527 var o = new core.Map<core.String, core.String>(); |
493 o["x"] = "foo"; | 528 o["x"] = "foo"; |
494 o["y"] = "foo"; | 529 o["y"] = "foo"; |
495 return o; | 530 return o; |
496 } | 531 } |
497 | 532 |
498 checkUnnamed987(core.Map<core.String, core.String> o) { | 533 checkUnnamed379(core.Map<core.String, core.String> o) { |
499 unittest.expect(o, unittest.hasLength(2)); | 534 unittest.expect(o, unittest.hasLength(2)); |
500 unittest.expect(o["x"], unittest.equals('foo')); | 535 unittest.expect(o["x"], unittest.equals('foo')); |
501 unittest.expect(o["y"], unittest.equals('foo')); | 536 unittest.expect(o["y"], unittest.equals('foo')); |
502 } | 537 } |
503 | 538 |
504 core.int buildCounterEventExtendedProperties = 0; | 539 core.int buildCounterEventExtendedProperties = 0; |
505 buildEventExtendedProperties() { | 540 buildEventExtendedProperties() { |
506 var o = new api.EventExtendedProperties(); | 541 var o = new api.EventExtendedProperties(); |
507 buildCounterEventExtendedProperties++; | 542 buildCounterEventExtendedProperties++; |
508 if (buildCounterEventExtendedProperties < 3) { | 543 if (buildCounterEventExtendedProperties < 3) { |
509 o.private = buildUnnamed986(); | 544 o.private = buildUnnamed378(); |
510 o.shared = buildUnnamed987(); | 545 o.shared = buildUnnamed379(); |
511 } | 546 } |
512 buildCounterEventExtendedProperties--; | 547 buildCounterEventExtendedProperties--; |
513 return o; | 548 return o; |
514 } | 549 } |
515 | 550 |
516 checkEventExtendedProperties(api.EventExtendedProperties o) { | 551 checkEventExtendedProperties(api.EventExtendedProperties o) { |
517 buildCounterEventExtendedProperties++; | 552 buildCounterEventExtendedProperties++; |
518 if (buildCounterEventExtendedProperties < 3) { | 553 if (buildCounterEventExtendedProperties < 3) { |
519 checkUnnamed986(o.private); | 554 checkUnnamed378(o.private); |
520 checkUnnamed987(o.shared); | 555 checkUnnamed379(o.shared); |
521 } | 556 } |
522 buildCounterEventExtendedProperties--; | 557 buildCounterEventExtendedProperties--; |
523 } | 558 } |
524 | 559 |
525 buildUnnamed988() { | 560 buildUnnamed380() { |
526 var o = new core.Map<core.String, core.String>(); | 561 var o = new core.Map<core.String, core.String>(); |
527 o["x"] = "foo"; | 562 o["x"] = "foo"; |
528 o["y"] = "foo"; | 563 o["y"] = "foo"; |
529 return o; | 564 return o; |
530 } | 565 } |
531 | 566 |
532 checkUnnamed988(core.Map<core.String, core.String> o) { | 567 checkUnnamed380(core.Map<core.String, core.String> o) { |
533 unittest.expect(o, unittest.hasLength(2)); | 568 unittest.expect(o, unittest.hasLength(2)); |
534 unittest.expect(o["x"], unittest.equals('foo')); | 569 unittest.expect(o["x"], unittest.equals('foo')); |
535 unittest.expect(o["y"], unittest.equals('foo')); | 570 unittest.expect(o["y"], unittest.equals('foo')); |
536 } | 571 } |
537 | 572 |
538 core.int buildCounterEventGadget = 0; | 573 core.int buildCounterEventGadget = 0; |
539 buildEventGadget() { | 574 buildEventGadget() { |
540 var o = new api.EventGadget(); | 575 var o = new api.EventGadget(); |
541 buildCounterEventGadget++; | 576 buildCounterEventGadget++; |
542 if (buildCounterEventGadget < 3) { | 577 if (buildCounterEventGadget < 3) { |
543 o.display = "foo"; | 578 o.display = "foo"; |
544 o.height = 42; | 579 o.height = 42; |
545 o.iconLink = "foo"; | 580 o.iconLink = "foo"; |
546 o.link = "foo"; | 581 o.link = "foo"; |
547 o.preferences = buildUnnamed988(); | 582 o.preferences = buildUnnamed380(); |
548 o.title = "foo"; | 583 o.title = "foo"; |
549 o.type = "foo"; | 584 o.type = "foo"; |
550 o.width = 42; | 585 o.width = 42; |
551 } | 586 } |
552 buildCounterEventGadget--; | 587 buildCounterEventGadget--; |
553 return o; | 588 return o; |
554 } | 589 } |
555 | 590 |
556 checkEventGadget(api.EventGadget o) { | 591 checkEventGadget(api.EventGadget o) { |
557 buildCounterEventGadget++; | 592 buildCounterEventGadget++; |
558 if (buildCounterEventGadget < 3) { | 593 if (buildCounterEventGadget < 3) { |
559 unittest.expect(o.display, unittest.equals('foo')); | 594 unittest.expect(o.display, unittest.equals('foo')); |
560 unittest.expect(o.height, unittest.equals(42)); | 595 unittest.expect(o.height, unittest.equals(42)); |
561 unittest.expect(o.iconLink, unittest.equals('foo')); | 596 unittest.expect(o.iconLink, unittest.equals('foo')); |
562 unittest.expect(o.link, unittest.equals('foo')); | 597 unittest.expect(o.link, unittest.equals('foo')); |
563 checkUnnamed988(o.preferences); | 598 checkUnnamed380(o.preferences); |
564 unittest.expect(o.title, unittest.equals('foo')); | 599 unittest.expect(o.title, unittest.equals('foo')); |
565 unittest.expect(o.type, unittest.equals('foo')); | 600 unittest.expect(o.type, unittest.equals('foo')); |
566 unittest.expect(o.width, unittest.equals(42)); | 601 unittest.expect(o.width, unittest.equals(42)); |
567 } | 602 } |
568 buildCounterEventGadget--; | 603 buildCounterEventGadget--; |
569 } | 604 } |
570 | 605 |
571 core.int buildCounterEventOrganizer = 0; | 606 core.int buildCounterEventOrganizer = 0; |
572 buildEventOrganizer() { | 607 buildEventOrganizer() { |
573 var o = new api.EventOrganizer(); | 608 var o = new api.EventOrganizer(); |
(...skipping 12 matching lines...) Loading... |
586 buildCounterEventOrganizer++; | 621 buildCounterEventOrganizer++; |
587 if (buildCounterEventOrganizer < 3) { | 622 if (buildCounterEventOrganizer < 3) { |
588 unittest.expect(o.displayName, unittest.equals('foo')); | 623 unittest.expect(o.displayName, unittest.equals('foo')); |
589 unittest.expect(o.email, unittest.equals('foo')); | 624 unittest.expect(o.email, unittest.equals('foo')); |
590 unittest.expect(o.id, unittest.equals('foo')); | 625 unittest.expect(o.id, unittest.equals('foo')); |
591 unittest.expect(o.self, unittest.isTrue); | 626 unittest.expect(o.self, unittest.isTrue); |
592 } | 627 } |
593 buildCounterEventOrganizer--; | 628 buildCounterEventOrganizer--; |
594 } | 629 } |
595 | 630 |
596 buildUnnamed989() { | 631 buildUnnamed381() { |
597 var o = new core.List<core.String>(); | 632 var o = new core.List<core.String>(); |
598 o.add("foo"); | 633 o.add("foo"); |
599 o.add("foo"); | 634 o.add("foo"); |
600 return o; | 635 return o; |
601 } | 636 } |
602 | 637 |
603 checkUnnamed989(core.List<core.String> o) { | 638 checkUnnamed381(core.List<core.String> o) { |
604 unittest.expect(o, unittest.hasLength(2)); | 639 unittest.expect(o, unittest.hasLength(2)); |
605 unittest.expect(o[0], unittest.equals('foo')); | 640 unittest.expect(o[0], unittest.equals('foo')); |
606 unittest.expect(o[1], unittest.equals('foo')); | 641 unittest.expect(o[1], unittest.equals('foo')); |
607 } | 642 } |
608 | 643 |
609 buildUnnamed990() { | 644 buildUnnamed382() { |
610 var o = new core.List<api.EventReminder>(); | 645 var o = new core.List<api.EventReminder>(); |
611 o.add(buildEventReminder()); | 646 o.add(buildEventReminder()); |
612 o.add(buildEventReminder()); | 647 o.add(buildEventReminder()); |
613 return o; | 648 return o; |
614 } | 649 } |
615 | 650 |
616 checkUnnamed990(core.List<api.EventReminder> o) { | 651 checkUnnamed382(core.List<api.EventReminder> o) { |
617 unittest.expect(o, unittest.hasLength(2)); | 652 unittest.expect(o, unittest.hasLength(2)); |
618 checkEventReminder(o[0]); | 653 checkEventReminder(o[0]); |
619 checkEventReminder(o[1]); | 654 checkEventReminder(o[1]); |
620 } | 655 } |
621 | 656 |
622 core.int buildCounterEventReminders = 0; | 657 core.int buildCounterEventReminders = 0; |
623 buildEventReminders() { | 658 buildEventReminders() { |
624 var o = new api.EventReminders(); | 659 var o = new api.EventReminders(); |
625 buildCounterEventReminders++; | 660 buildCounterEventReminders++; |
626 if (buildCounterEventReminders < 3) { | 661 if (buildCounterEventReminders < 3) { |
627 o.overrides = buildUnnamed990(); | 662 o.overrides = buildUnnamed382(); |
628 o.useDefault = true; | 663 o.useDefault = true; |
629 } | 664 } |
630 buildCounterEventReminders--; | 665 buildCounterEventReminders--; |
631 return o; | 666 return o; |
632 } | 667 } |
633 | 668 |
634 checkEventReminders(api.EventReminders o) { | 669 checkEventReminders(api.EventReminders o) { |
635 buildCounterEventReminders++; | 670 buildCounterEventReminders++; |
636 if (buildCounterEventReminders < 3) { | 671 if (buildCounterEventReminders < 3) { |
637 checkUnnamed990(o.overrides); | 672 checkUnnamed382(o.overrides); |
638 unittest.expect(o.useDefault, unittest.isTrue); | 673 unittest.expect(o.useDefault, unittest.isTrue); |
639 } | 674 } |
640 buildCounterEventReminders--; | 675 buildCounterEventReminders--; |
641 } | 676 } |
642 | 677 |
643 core.int buildCounterEventSource = 0; | 678 core.int buildCounterEventSource = 0; |
644 buildEventSource() { | 679 buildEventSource() { |
645 var o = new api.EventSource(); | 680 var o = new api.EventSource(); |
646 buildCounterEventSource++; | 681 buildCounterEventSource++; |
647 if (buildCounterEventSource < 3) { | 682 if (buildCounterEventSource < 3) { |
(...skipping 12 matching lines...) Loading... |
660 } | 695 } |
661 buildCounterEventSource--; | 696 buildCounterEventSource--; |
662 } | 697 } |
663 | 698 |
664 core.int buildCounterEvent = 0; | 699 core.int buildCounterEvent = 0; |
665 buildEvent() { | 700 buildEvent() { |
666 var o = new api.Event(); | 701 var o = new api.Event(); |
667 buildCounterEvent++; | 702 buildCounterEvent++; |
668 if (buildCounterEvent < 3) { | 703 if (buildCounterEvent < 3) { |
669 o.anyoneCanAddSelf = true; | 704 o.anyoneCanAddSelf = true; |
670 o.attendees = buildUnnamed985(); | 705 o.attendees = buildUnnamed377(); |
671 o.attendeesOmitted = true; | 706 o.attendeesOmitted = true; |
672 o.colorId = "foo"; | 707 o.colorId = "foo"; |
673 o.created = core.DateTime.parse("2002-02-27T14:01:02"); | 708 o.created = core.DateTime.parse("2002-02-27T14:01:02"); |
674 o.creator = buildEventCreator(); | 709 o.creator = buildEventCreator(); |
675 o.description = "foo"; | 710 o.description = "foo"; |
676 o.end = buildEventDateTime(); | 711 o.end = buildEventDateTime(); |
677 o.endTimeUnspecified = true; | 712 o.endTimeUnspecified = true; |
678 o.etag = "foo"; | 713 o.etag = "foo"; |
679 o.extendedProperties = buildEventExtendedProperties(); | 714 o.extendedProperties = buildEventExtendedProperties(); |
680 o.gadget = buildEventGadget(); | 715 o.gadget = buildEventGadget(); |
681 o.guestsCanInviteOthers = true; | 716 o.guestsCanInviteOthers = true; |
682 o.guestsCanModify = true; | 717 o.guestsCanModify = true; |
683 o.guestsCanSeeOtherGuests = true; | 718 o.guestsCanSeeOtherGuests = true; |
684 o.hangoutLink = "foo"; | 719 o.hangoutLink = "foo"; |
685 o.htmlLink = "foo"; | 720 o.htmlLink = "foo"; |
686 o.iCalUID = "foo"; | 721 o.iCalUID = "foo"; |
687 o.id = "foo"; | 722 o.id = "foo"; |
688 o.kind = "foo"; | 723 o.kind = "foo"; |
689 o.location = "foo"; | 724 o.location = "foo"; |
690 o.locked = true; | 725 o.locked = true; |
691 o.organizer = buildEventOrganizer(); | 726 o.organizer = buildEventOrganizer(); |
692 o.originalStartTime = buildEventDateTime(); | 727 o.originalStartTime = buildEventDateTime(); |
693 o.privateCopy = true; | 728 o.privateCopy = true; |
694 o.recurrence = buildUnnamed989(); | 729 o.recurrence = buildUnnamed381(); |
695 o.recurringEventId = "foo"; | 730 o.recurringEventId = "foo"; |
696 o.reminders = buildEventReminders(); | 731 o.reminders = buildEventReminders(); |
697 o.sequence = 42; | 732 o.sequence = 42; |
698 o.source = buildEventSource(); | 733 o.source = buildEventSource(); |
699 o.start = buildEventDateTime(); | 734 o.start = buildEventDateTime(); |
700 o.status = "foo"; | 735 o.status = "foo"; |
701 o.summary = "foo"; | 736 o.summary = "foo"; |
702 o.transparency = "foo"; | 737 o.transparency = "foo"; |
703 o.updated = core.DateTime.parse("2002-02-27T14:01:02"); | 738 o.updated = core.DateTime.parse("2002-02-27T14:01:02"); |
704 o.visibility = "foo"; | 739 o.visibility = "foo"; |
705 } | 740 } |
706 buildCounterEvent--; | 741 buildCounterEvent--; |
707 return o; | 742 return o; |
708 } | 743 } |
709 | 744 |
710 checkEvent(api.Event o) { | 745 checkEvent(api.Event o) { |
711 buildCounterEvent++; | 746 buildCounterEvent++; |
712 if (buildCounterEvent < 3) { | 747 if (buildCounterEvent < 3) { |
713 unittest.expect(o.anyoneCanAddSelf, unittest.isTrue); | 748 unittest.expect(o.anyoneCanAddSelf, unittest.isTrue); |
714 checkUnnamed985(o.attendees); | 749 checkUnnamed377(o.attendees); |
715 unittest.expect(o.attendeesOmitted, unittest.isTrue); | 750 unittest.expect(o.attendeesOmitted, unittest.isTrue); |
716 unittest.expect(o.colorId, unittest.equals('foo')); | 751 unittest.expect(o.colorId, unittest.equals('foo')); |
717 unittest.expect(o.created, unittest.equals(core.DateTime.parse("2002-02-27T1
4:01:02"))); | 752 unittest.expect(o.created, unittest.equals(core.DateTime.parse("2002-02-27T1
4:01:02"))); |
718 checkEventCreator(o.creator); | 753 checkEventCreator(o.creator); |
719 unittest.expect(o.description, unittest.equals('foo')); | 754 unittest.expect(o.description, unittest.equals('foo')); |
720 checkEventDateTime(o.end); | 755 checkEventDateTime(o.end); |
721 unittest.expect(o.endTimeUnspecified, unittest.isTrue); | 756 unittest.expect(o.endTimeUnspecified, unittest.isTrue); |
722 unittest.expect(o.etag, unittest.equals('foo')); | 757 unittest.expect(o.etag, unittest.equals('foo')); |
723 checkEventExtendedProperties(o.extendedProperties); | 758 checkEventExtendedProperties(o.extendedProperties); |
724 checkEventGadget(o.gadget); | 759 checkEventGadget(o.gadget); |
725 unittest.expect(o.guestsCanInviteOthers, unittest.isTrue); | 760 unittest.expect(o.guestsCanInviteOthers, unittest.isTrue); |
726 unittest.expect(o.guestsCanModify, unittest.isTrue); | 761 unittest.expect(o.guestsCanModify, unittest.isTrue); |
727 unittest.expect(o.guestsCanSeeOtherGuests, unittest.isTrue); | 762 unittest.expect(o.guestsCanSeeOtherGuests, unittest.isTrue); |
728 unittest.expect(o.hangoutLink, unittest.equals('foo')); | 763 unittest.expect(o.hangoutLink, unittest.equals('foo')); |
729 unittest.expect(o.htmlLink, unittest.equals('foo')); | 764 unittest.expect(o.htmlLink, unittest.equals('foo')); |
730 unittest.expect(o.iCalUID, unittest.equals('foo')); | 765 unittest.expect(o.iCalUID, unittest.equals('foo')); |
731 unittest.expect(o.id, unittest.equals('foo')); | 766 unittest.expect(o.id, unittest.equals('foo')); |
732 unittest.expect(o.kind, unittest.equals('foo')); | 767 unittest.expect(o.kind, unittest.equals('foo')); |
733 unittest.expect(o.location, unittest.equals('foo')); | 768 unittest.expect(o.location, unittest.equals('foo')); |
734 unittest.expect(o.locked, unittest.isTrue); | 769 unittest.expect(o.locked, unittest.isTrue); |
735 checkEventOrganizer(o.organizer); | 770 checkEventOrganizer(o.organizer); |
736 checkEventDateTime(o.originalStartTime); | 771 checkEventDateTime(o.originalStartTime); |
737 unittest.expect(o.privateCopy, unittest.isTrue); | 772 unittest.expect(o.privateCopy, unittest.isTrue); |
738 checkUnnamed989(o.recurrence); | 773 checkUnnamed381(o.recurrence); |
739 unittest.expect(o.recurringEventId, unittest.equals('foo')); | 774 unittest.expect(o.recurringEventId, unittest.equals('foo')); |
740 checkEventReminders(o.reminders); | 775 checkEventReminders(o.reminders); |
741 unittest.expect(o.sequence, unittest.equals(42)); | 776 unittest.expect(o.sequence, unittest.equals(42)); |
742 checkEventSource(o.source); | 777 checkEventSource(o.source); |
743 checkEventDateTime(o.start); | 778 checkEventDateTime(o.start); |
744 unittest.expect(o.status, unittest.equals('foo')); | 779 unittest.expect(o.status, unittest.equals('foo')); |
745 unittest.expect(o.summary, unittest.equals('foo')); | 780 unittest.expect(o.summary, unittest.equals('foo')); |
746 unittest.expect(o.transparency, unittest.equals('foo')); | 781 unittest.expect(o.transparency, unittest.equals('foo')); |
747 unittest.expect(o.updated, unittest.equals(core.DateTime.parse("2002-02-27T1
4:01:02"))); | 782 unittest.expect(o.updated, unittest.equals(core.DateTime.parse("2002-02-27T1
4:01:02"))); |
748 unittest.expect(o.visibility, unittest.equals('foo')); | 783 unittest.expect(o.visibility, unittest.equals('foo')); |
(...skipping 92 matching lines...) Loading... |
841 | 876 |
842 checkEventReminder(api.EventReminder o) { | 877 checkEventReminder(api.EventReminder o) { |
843 buildCounterEventReminder++; | 878 buildCounterEventReminder++; |
844 if (buildCounterEventReminder < 3) { | 879 if (buildCounterEventReminder < 3) { |
845 unittest.expect(o.method, unittest.equals('foo')); | 880 unittest.expect(o.method, unittest.equals('foo')); |
846 unittest.expect(o.minutes, unittest.equals(42)); | 881 unittest.expect(o.minutes, unittest.equals(42)); |
847 } | 882 } |
848 buildCounterEventReminder--; | 883 buildCounterEventReminder--; |
849 } | 884 } |
850 | 885 |
851 buildUnnamed991() { | 886 buildUnnamed383() { |
852 var o = new core.List<api.EventReminder>(); | 887 var o = new core.List<api.EventReminder>(); |
853 o.add(buildEventReminder()); | 888 o.add(buildEventReminder()); |
854 o.add(buildEventReminder()); | 889 o.add(buildEventReminder()); |
855 return o; | 890 return o; |
856 } | 891 } |
857 | 892 |
858 checkUnnamed991(core.List<api.EventReminder> o) { | 893 checkUnnamed383(core.List<api.EventReminder> o) { |
859 unittest.expect(o, unittest.hasLength(2)); | 894 unittest.expect(o, unittest.hasLength(2)); |
860 checkEventReminder(o[0]); | 895 checkEventReminder(o[0]); |
861 checkEventReminder(o[1]); | 896 checkEventReminder(o[1]); |
862 } | 897 } |
863 | 898 |
864 buildUnnamed992() { | 899 buildUnnamed384() { |
865 var o = new core.List<api.Event>(); | 900 var o = new core.List<api.Event>(); |
866 o.add(buildEvent()); | 901 o.add(buildEvent()); |
867 o.add(buildEvent()); | 902 o.add(buildEvent()); |
868 return o; | 903 return o; |
869 } | 904 } |
870 | 905 |
871 checkUnnamed992(core.List<api.Event> o) { | 906 checkUnnamed384(core.List<api.Event> o) { |
872 unittest.expect(o, unittest.hasLength(2)); | 907 unittest.expect(o, unittest.hasLength(2)); |
873 checkEvent(o[0]); | 908 checkEvent(o[0]); |
874 checkEvent(o[1]); | 909 checkEvent(o[1]); |
875 } | 910 } |
876 | 911 |
877 core.int buildCounterEvents = 0; | 912 core.int buildCounterEvents = 0; |
878 buildEvents() { | 913 buildEvents() { |
879 var o = new api.Events(); | 914 var o = new api.Events(); |
880 buildCounterEvents++; | 915 buildCounterEvents++; |
881 if (buildCounterEvents < 3) { | 916 if (buildCounterEvents < 3) { |
882 o.accessRole = "foo"; | 917 o.accessRole = "foo"; |
883 o.defaultReminders = buildUnnamed991(); | 918 o.defaultReminders = buildUnnamed383(); |
884 o.description = "foo"; | 919 o.description = "foo"; |
885 o.etag = "foo"; | 920 o.etag = "foo"; |
886 o.items = buildUnnamed992(); | 921 o.items = buildUnnamed384(); |
887 o.kind = "foo"; | 922 o.kind = "foo"; |
888 o.nextPageToken = "foo"; | 923 o.nextPageToken = "foo"; |
889 o.nextSyncToken = "foo"; | 924 o.nextSyncToken = "foo"; |
890 o.summary = "foo"; | 925 o.summary = "foo"; |
891 o.timeZone = "foo"; | 926 o.timeZone = "foo"; |
892 o.updated = core.DateTime.parse("2002-02-27T14:01:02"); | 927 o.updated = core.DateTime.parse("2002-02-27T14:01:02"); |
893 } | 928 } |
894 buildCounterEvents--; | 929 buildCounterEvents--; |
895 return o; | 930 return o; |
896 } | 931 } |
897 | 932 |
898 checkEvents(api.Events o) { | 933 checkEvents(api.Events o) { |
899 buildCounterEvents++; | 934 buildCounterEvents++; |
900 if (buildCounterEvents < 3) { | 935 if (buildCounterEvents < 3) { |
901 unittest.expect(o.accessRole, unittest.equals('foo')); | 936 unittest.expect(o.accessRole, unittest.equals('foo')); |
902 checkUnnamed991(o.defaultReminders); | 937 checkUnnamed383(o.defaultReminders); |
903 unittest.expect(o.description, unittest.equals('foo')); | 938 unittest.expect(o.description, unittest.equals('foo')); |
904 unittest.expect(o.etag, unittest.equals('foo')); | 939 unittest.expect(o.etag, unittest.equals('foo')); |
905 checkUnnamed992(o.items); | 940 checkUnnamed384(o.items); |
906 unittest.expect(o.kind, unittest.equals('foo')); | 941 unittest.expect(o.kind, unittest.equals('foo')); |
907 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 942 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
908 unittest.expect(o.nextSyncToken, unittest.equals('foo')); | 943 unittest.expect(o.nextSyncToken, unittest.equals('foo')); |
909 unittest.expect(o.summary, unittest.equals('foo')); | 944 unittest.expect(o.summary, unittest.equals('foo')); |
910 unittest.expect(o.timeZone, unittest.equals('foo')); | 945 unittest.expect(o.timeZone, unittest.equals('foo')); |
911 unittest.expect(o.updated, unittest.equals(core.DateTime.parse("2002-02-27T1
4:01:02"))); | 946 unittest.expect(o.updated, unittest.equals(core.DateTime.parse("2002-02-27T1
4:01:02"))); |
912 } | 947 } |
913 buildCounterEvents--; | 948 buildCounterEvents--; |
914 } | 949 } |
915 | 950 |
916 buildUnnamed993() { | 951 buildUnnamed385() { |
917 var o = new core.List<api.TimePeriod>(); | 952 var o = new core.List<api.TimePeriod>(); |
918 o.add(buildTimePeriod()); | 953 o.add(buildTimePeriod()); |
919 o.add(buildTimePeriod()); | 954 o.add(buildTimePeriod()); |
920 return o; | 955 return o; |
921 } | 956 } |
922 | 957 |
923 checkUnnamed993(core.List<api.TimePeriod> o) { | 958 checkUnnamed385(core.List<api.TimePeriod> o) { |
924 unittest.expect(o, unittest.hasLength(2)); | 959 unittest.expect(o, unittest.hasLength(2)); |
925 checkTimePeriod(o[0]); | 960 checkTimePeriod(o[0]); |
926 checkTimePeriod(o[1]); | 961 checkTimePeriod(o[1]); |
927 } | 962 } |
928 | 963 |
929 buildUnnamed994() { | 964 buildUnnamed386() { |
930 var o = new core.List<api.Error>(); | 965 var o = new core.List<api.Error>(); |
931 o.add(buildError()); | 966 o.add(buildError()); |
932 o.add(buildError()); | 967 o.add(buildError()); |
933 return o; | 968 return o; |
934 } | 969 } |
935 | 970 |
936 checkUnnamed994(core.List<api.Error> o) { | 971 checkUnnamed386(core.List<api.Error> o) { |
937 unittest.expect(o, unittest.hasLength(2)); | 972 unittest.expect(o, unittest.hasLength(2)); |
938 checkError(o[0]); | 973 checkError(o[0]); |
939 checkError(o[1]); | 974 checkError(o[1]); |
940 } | 975 } |
941 | 976 |
942 core.int buildCounterFreeBusyCalendar = 0; | 977 core.int buildCounterFreeBusyCalendar = 0; |
943 buildFreeBusyCalendar() { | 978 buildFreeBusyCalendar() { |
944 var o = new api.FreeBusyCalendar(); | 979 var o = new api.FreeBusyCalendar(); |
945 buildCounterFreeBusyCalendar++; | 980 buildCounterFreeBusyCalendar++; |
946 if (buildCounterFreeBusyCalendar < 3) { | 981 if (buildCounterFreeBusyCalendar < 3) { |
947 o.busy = buildUnnamed993(); | 982 o.busy = buildUnnamed385(); |
948 o.errors = buildUnnamed994(); | 983 o.errors = buildUnnamed386(); |
949 } | 984 } |
950 buildCounterFreeBusyCalendar--; | 985 buildCounterFreeBusyCalendar--; |
951 return o; | 986 return o; |
952 } | 987 } |
953 | 988 |
954 checkFreeBusyCalendar(api.FreeBusyCalendar o) { | 989 checkFreeBusyCalendar(api.FreeBusyCalendar o) { |
955 buildCounterFreeBusyCalendar++; | 990 buildCounterFreeBusyCalendar++; |
956 if (buildCounterFreeBusyCalendar < 3) { | 991 if (buildCounterFreeBusyCalendar < 3) { |
957 checkUnnamed993(o.busy); | 992 checkUnnamed385(o.busy); |
958 checkUnnamed994(o.errors); | 993 checkUnnamed386(o.errors); |
959 } | 994 } |
960 buildCounterFreeBusyCalendar--; | 995 buildCounterFreeBusyCalendar--; |
961 } | 996 } |
962 | 997 |
963 buildUnnamed995() { | 998 buildUnnamed387() { |
964 var o = new core.List<core.String>(); | 999 var o = new core.List<core.String>(); |
965 o.add("foo"); | 1000 o.add("foo"); |
966 o.add("foo"); | 1001 o.add("foo"); |
967 return o; | 1002 return o; |
968 } | 1003 } |
969 | 1004 |
970 checkUnnamed995(core.List<core.String> o) { | 1005 checkUnnamed387(core.List<core.String> o) { |
971 unittest.expect(o, unittest.hasLength(2)); | 1006 unittest.expect(o, unittest.hasLength(2)); |
972 unittest.expect(o[0], unittest.equals('foo')); | 1007 unittest.expect(o[0], unittest.equals('foo')); |
973 unittest.expect(o[1], unittest.equals('foo')); | 1008 unittest.expect(o[1], unittest.equals('foo')); |
974 } | 1009 } |
975 | 1010 |
976 buildUnnamed996() { | 1011 buildUnnamed388() { |
977 var o = new core.List<api.Error>(); | 1012 var o = new core.List<api.Error>(); |
978 o.add(buildError()); | 1013 o.add(buildError()); |
979 o.add(buildError()); | 1014 o.add(buildError()); |
980 return o; | 1015 return o; |
981 } | 1016 } |
982 | 1017 |
983 checkUnnamed996(core.List<api.Error> o) { | 1018 checkUnnamed388(core.List<api.Error> o) { |
984 unittest.expect(o, unittest.hasLength(2)); | 1019 unittest.expect(o, unittest.hasLength(2)); |
985 checkError(o[0]); | 1020 checkError(o[0]); |
986 checkError(o[1]); | 1021 checkError(o[1]); |
987 } | 1022 } |
988 | 1023 |
989 core.int buildCounterFreeBusyGroup = 0; | 1024 core.int buildCounterFreeBusyGroup = 0; |
990 buildFreeBusyGroup() { | 1025 buildFreeBusyGroup() { |
991 var o = new api.FreeBusyGroup(); | 1026 var o = new api.FreeBusyGroup(); |
992 buildCounterFreeBusyGroup++; | 1027 buildCounterFreeBusyGroup++; |
993 if (buildCounterFreeBusyGroup < 3) { | 1028 if (buildCounterFreeBusyGroup < 3) { |
994 o.calendars = buildUnnamed995(); | 1029 o.calendars = buildUnnamed387(); |
995 o.errors = buildUnnamed996(); | 1030 o.errors = buildUnnamed388(); |
996 } | 1031 } |
997 buildCounterFreeBusyGroup--; | 1032 buildCounterFreeBusyGroup--; |
998 return o; | 1033 return o; |
999 } | 1034 } |
1000 | 1035 |
1001 checkFreeBusyGroup(api.FreeBusyGroup o) { | 1036 checkFreeBusyGroup(api.FreeBusyGroup o) { |
1002 buildCounterFreeBusyGroup++; | 1037 buildCounterFreeBusyGroup++; |
1003 if (buildCounterFreeBusyGroup < 3) { | 1038 if (buildCounterFreeBusyGroup < 3) { |
1004 checkUnnamed995(o.calendars); | 1039 checkUnnamed387(o.calendars); |
1005 checkUnnamed996(o.errors); | 1040 checkUnnamed388(o.errors); |
1006 } | 1041 } |
1007 buildCounterFreeBusyGroup--; | 1042 buildCounterFreeBusyGroup--; |
1008 } | 1043 } |
1009 | 1044 |
1010 buildUnnamed997() { | 1045 buildUnnamed389() { |
1011 var o = new core.List<api.FreeBusyRequestItem>(); | 1046 var o = new core.List<api.FreeBusyRequestItem>(); |
1012 o.add(buildFreeBusyRequestItem()); | 1047 o.add(buildFreeBusyRequestItem()); |
1013 o.add(buildFreeBusyRequestItem()); | 1048 o.add(buildFreeBusyRequestItem()); |
1014 return o; | 1049 return o; |
1015 } | 1050 } |
1016 | 1051 |
1017 checkUnnamed997(core.List<api.FreeBusyRequestItem> o) { | 1052 checkUnnamed389(core.List<api.FreeBusyRequestItem> o) { |
1018 unittest.expect(o, unittest.hasLength(2)); | 1053 unittest.expect(o, unittest.hasLength(2)); |
1019 checkFreeBusyRequestItem(o[0]); | 1054 checkFreeBusyRequestItem(o[0]); |
1020 checkFreeBusyRequestItem(o[1]); | 1055 checkFreeBusyRequestItem(o[1]); |
1021 } | 1056 } |
1022 | 1057 |
1023 core.int buildCounterFreeBusyRequest = 0; | 1058 core.int buildCounterFreeBusyRequest = 0; |
1024 buildFreeBusyRequest() { | 1059 buildFreeBusyRequest() { |
1025 var o = new api.FreeBusyRequest(); | 1060 var o = new api.FreeBusyRequest(); |
1026 buildCounterFreeBusyRequest++; | 1061 buildCounterFreeBusyRequest++; |
1027 if (buildCounterFreeBusyRequest < 3) { | 1062 if (buildCounterFreeBusyRequest < 3) { |
1028 o.calendarExpansionMax = 42; | 1063 o.calendarExpansionMax = 42; |
1029 o.groupExpansionMax = 42; | 1064 o.groupExpansionMax = 42; |
1030 o.items = buildUnnamed997(); | 1065 o.items = buildUnnamed389(); |
1031 o.timeMax = core.DateTime.parse("2002-02-27T14:01:02"); | 1066 o.timeMax = core.DateTime.parse("2002-02-27T14:01:02"); |
1032 o.timeMin = core.DateTime.parse("2002-02-27T14:01:02"); | 1067 o.timeMin = core.DateTime.parse("2002-02-27T14:01:02"); |
1033 o.timeZone = "foo"; | 1068 o.timeZone = "foo"; |
1034 } | 1069 } |
1035 buildCounterFreeBusyRequest--; | 1070 buildCounterFreeBusyRequest--; |
1036 return o; | 1071 return o; |
1037 } | 1072 } |
1038 | 1073 |
1039 checkFreeBusyRequest(api.FreeBusyRequest o) { | 1074 checkFreeBusyRequest(api.FreeBusyRequest o) { |
1040 buildCounterFreeBusyRequest++; | 1075 buildCounterFreeBusyRequest++; |
1041 if (buildCounterFreeBusyRequest < 3) { | 1076 if (buildCounterFreeBusyRequest < 3) { |
1042 unittest.expect(o.calendarExpansionMax, unittest.equals(42)); | 1077 unittest.expect(o.calendarExpansionMax, unittest.equals(42)); |
1043 unittest.expect(o.groupExpansionMax, unittest.equals(42)); | 1078 unittest.expect(o.groupExpansionMax, unittest.equals(42)); |
1044 checkUnnamed997(o.items); | 1079 checkUnnamed389(o.items); |
1045 unittest.expect(o.timeMax, unittest.equals(core.DateTime.parse("2002-02-27T1
4:01:02"))); | 1080 unittest.expect(o.timeMax, unittest.equals(core.DateTime.parse("2002-02-27T1
4:01:02"))); |
1046 unittest.expect(o.timeMin, unittest.equals(core.DateTime.parse("2002-02-27T1
4:01:02"))); | 1081 unittest.expect(o.timeMin, unittest.equals(core.DateTime.parse("2002-02-27T1
4:01:02"))); |
1047 unittest.expect(o.timeZone, unittest.equals('foo')); | 1082 unittest.expect(o.timeZone, unittest.equals('foo')); |
1048 } | 1083 } |
1049 buildCounterFreeBusyRequest--; | 1084 buildCounterFreeBusyRequest--; |
1050 } | 1085 } |
1051 | 1086 |
1052 core.int buildCounterFreeBusyRequestItem = 0; | 1087 core.int buildCounterFreeBusyRequestItem = 0; |
1053 buildFreeBusyRequestItem() { | 1088 buildFreeBusyRequestItem() { |
1054 var o = new api.FreeBusyRequestItem(); | 1089 var o = new api.FreeBusyRequestItem(); |
1055 buildCounterFreeBusyRequestItem++; | 1090 buildCounterFreeBusyRequestItem++; |
1056 if (buildCounterFreeBusyRequestItem < 3) { | 1091 if (buildCounterFreeBusyRequestItem < 3) { |
1057 o.id = "foo"; | 1092 o.id = "foo"; |
1058 } | 1093 } |
1059 buildCounterFreeBusyRequestItem--; | 1094 buildCounterFreeBusyRequestItem--; |
1060 return o; | 1095 return o; |
1061 } | 1096 } |
1062 | 1097 |
1063 checkFreeBusyRequestItem(api.FreeBusyRequestItem o) { | 1098 checkFreeBusyRequestItem(api.FreeBusyRequestItem o) { |
1064 buildCounterFreeBusyRequestItem++; | 1099 buildCounterFreeBusyRequestItem++; |
1065 if (buildCounterFreeBusyRequestItem < 3) { | 1100 if (buildCounterFreeBusyRequestItem < 3) { |
1066 unittest.expect(o.id, unittest.equals('foo')); | 1101 unittest.expect(o.id, unittest.equals('foo')); |
1067 } | 1102 } |
1068 buildCounterFreeBusyRequestItem--; | 1103 buildCounterFreeBusyRequestItem--; |
1069 } | 1104 } |
1070 | 1105 |
1071 buildUnnamed998() { | 1106 buildUnnamed390() { |
1072 var o = new core.Map<core.String, api.FreeBusyCalendar>(); | 1107 var o = new core.Map<core.String, api.FreeBusyCalendar>(); |
1073 o["x"] = buildFreeBusyCalendar(); | 1108 o["x"] = buildFreeBusyCalendar(); |
1074 o["y"] = buildFreeBusyCalendar(); | 1109 o["y"] = buildFreeBusyCalendar(); |
1075 return o; | 1110 return o; |
1076 } | 1111 } |
1077 | 1112 |
1078 checkUnnamed998(core.Map<core.String, api.FreeBusyCalendar> o) { | 1113 checkUnnamed390(core.Map<core.String, api.FreeBusyCalendar> o) { |
1079 unittest.expect(o, unittest.hasLength(2)); | 1114 unittest.expect(o, unittest.hasLength(2)); |
1080 checkFreeBusyCalendar(o["x"]); | 1115 checkFreeBusyCalendar(o["x"]); |
1081 checkFreeBusyCalendar(o["y"]); | 1116 checkFreeBusyCalendar(o["y"]); |
1082 } | 1117 } |
1083 | 1118 |
1084 buildUnnamed999() { | 1119 buildUnnamed391() { |
1085 var o = new core.Map<core.String, api.FreeBusyGroup>(); | 1120 var o = new core.Map<core.String, api.FreeBusyGroup>(); |
1086 o["x"] = buildFreeBusyGroup(); | 1121 o["x"] = buildFreeBusyGroup(); |
1087 o["y"] = buildFreeBusyGroup(); | 1122 o["y"] = buildFreeBusyGroup(); |
1088 return o; | 1123 return o; |
1089 } | 1124 } |
1090 | 1125 |
1091 checkUnnamed999(core.Map<core.String, api.FreeBusyGroup> o) { | 1126 checkUnnamed391(core.Map<core.String, api.FreeBusyGroup> o) { |
1092 unittest.expect(o, unittest.hasLength(2)); | 1127 unittest.expect(o, unittest.hasLength(2)); |
1093 checkFreeBusyGroup(o["x"]); | 1128 checkFreeBusyGroup(o["x"]); |
1094 checkFreeBusyGroup(o["y"]); | 1129 checkFreeBusyGroup(o["y"]); |
1095 } | 1130 } |
1096 | 1131 |
1097 core.int buildCounterFreeBusyResponse = 0; | 1132 core.int buildCounterFreeBusyResponse = 0; |
1098 buildFreeBusyResponse() { | 1133 buildFreeBusyResponse() { |
1099 var o = new api.FreeBusyResponse(); | 1134 var o = new api.FreeBusyResponse(); |
1100 buildCounterFreeBusyResponse++; | 1135 buildCounterFreeBusyResponse++; |
1101 if (buildCounterFreeBusyResponse < 3) { | 1136 if (buildCounterFreeBusyResponse < 3) { |
1102 o.calendars = buildUnnamed998(); | 1137 o.calendars = buildUnnamed390(); |
1103 o.groups = buildUnnamed999(); | 1138 o.groups = buildUnnamed391(); |
1104 o.kind = "foo"; | 1139 o.kind = "foo"; |
1105 o.timeMax = core.DateTime.parse("2002-02-27T14:01:02"); | 1140 o.timeMax = core.DateTime.parse("2002-02-27T14:01:02"); |
1106 o.timeMin = core.DateTime.parse("2002-02-27T14:01:02"); | 1141 o.timeMin = core.DateTime.parse("2002-02-27T14:01:02"); |
1107 } | 1142 } |
1108 buildCounterFreeBusyResponse--; | 1143 buildCounterFreeBusyResponse--; |
1109 return o; | 1144 return o; |
1110 } | 1145 } |
1111 | 1146 |
1112 checkFreeBusyResponse(api.FreeBusyResponse o) { | 1147 checkFreeBusyResponse(api.FreeBusyResponse o) { |
1113 buildCounterFreeBusyResponse++; | 1148 buildCounterFreeBusyResponse++; |
1114 if (buildCounterFreeBusyResponse < 3) { | 1149 if (buildCounterFreeBusyResponse < 3) { |
1115 checkUnnamed998(o.calendars); | 1150 checkUnnamed390(o.calendars); |
1116 checkUnnamed999(o.groups); | 1151 checkUnnamed391(o.groups); |
1117 unittest.expect(o.kind, unittest.equals('foo')); | 1152 unittest.expect(o.kind, unittest.equals('foo')); |
1118 unittest.expect(o.timeMax, unittest.equals(core.DateTime.parse("2002-02-27T1
4:01:02"))); | 1153 unittest.expect(o.timeMax, unittest.equals(core.DateTime.parse("2002-02-27T1
4:01:02"))); |
1119 unittest.expect(o.timeMin, unittest.equals(core.DateTime.parse("2002-02-27T1
4:01:02"))); | 1154 unittest.expect(o.timeMin, unittest.equals(core.DateTime.parse("2002-02-27T1
4:01:02"))); |
1120 } | 1155 } |
1121 buildCounterFreeBusyResponse--; | 1156 buildCounterFreeBusyResponse--; |
1122 } | 1157 } |
1123 | 1158 |
1124 core.int buildCounterSetting = 0; | 1159 core.int buildCounterSetting = 0; |
1125 buildSetting() { | 1160 buildSetting() { |
1126 var o = new api.Setting(); | 1161 var o = new api.Setting(); |
(...skipping 12 matching lines...) Loading... |
1139 buildCounterSetting++; | 1174 buildCounterSetting++; |
1140 if (buildCounterSetting < 3) { | 1175 if (buildCounterSetting < 3) { |
1141 unittest.expect(o.etag, unittest.equals('foo')); | 1176 unittest.expect(o.etag, unittest.equals('foo')); |
1142 unittest.expect(o.id, unittest.equals('foo')); | 1177 unittest.expect(o.id, unittest.equals('foo')); |
1143 unittest.expect(o.kind, unittest.equals('foo')); | 1178 unittest.expect(o.kind, unittest.equals('foo')); |
1144 unittest.expect(o.value, unittest.equals('foo')); | 1179 unittest.expect(o.value, unittest.equals('foo')); |
1145 } | 1180 } |
1146 buildCounterSetting--; | 1181 buildCounterSetting--; |
1147 } | 1182 } |
1148 | 1183 |
1149 buildUnnamed1000() { | 1184 buildUnnamed392() { |
1150 var o = new core.List<api.Setting>(); | 1185 var o = new core.List<api.Setting>(); |
1151 o.add(buildSetting()); | 1186 o.add(buildSetting()); |
1152 o.add(buildSetting()); | 1187 o.add(buildSetting()); |
1153 return o; | 1188 return o; |
1154 } | 1189 } |
1155 | 1190 |
1156 checkUnnamed1000(core.List<api.Setting> o) { | 1191 checkUnnamed392(core.List<api.Setting> o) { |
1157 unittest.expect(o, unittest.hasLength(2)); | 1192 unittest.expect(o, unittest.hasLength(2)); |
1158 checkSetting(o[0]); | 1193 checkSetting(o[0]); |
1159 checkSetting(o[1]); | 1194 checkSetting(o[1]); |
1160 } | 1195 } |
1161 | 1196 |
1162 core.int buildCounterSettings = 0; | 1197 core.int buildCounterSettings = 0; |
1163 buildSettings() { | 1198 buildSettings() { |
1164 var o = new api.Settings(); | 1199 var o = new api.Settings(); |
1165 buildCounterSettings++; | 1200 buildCounterSettings++; |
1166 if (buildCounterSettings < 3) { | 1201 if (buildCounterSettings < 3) { |
1167 o.etag = "foo"; | 1202 o.etag = "foo"; |
1168 o.items = buildUnnamed1000(); | 1203 o.items = buildUnnamed392(); |
1169 o.kind = "foo"; | 1204 o.kind = "foo"; |
1170 o.nextPageToken = "foo"; | 1205 o.nextPageToken = "foo"; |
1171 o.nextSyncToken = "foo"; | 1206 o.nextSyncToken = "foo"; |
1172 } | 1207 } |
1173 buildCounterSettings--; | 1208 buildCounterSettings--; |
1174 return o; | 1209 return o; |
1175 } | 1210 } |
1176 | 1211 |
1177 checkSettings(api.Settings o) { | 1212 checkSettings(api.Settings o) { |
1178 buildCounterSettings++; | 1213 buildCounterSettings++; |
1179 if (buildCounterSettings < 3) { | 1214 if (buildCounterSettings < 3) { |
1180 unittest.expect(o.etag, unittest.equals('foo')); | 1215 unittest.expect(o.etag, unittest.equals('foo')); |
1181 checkUnnamed1000(o.items); | 1216 checkUnnamed392(o.items); |
1182 unittest.expect(o.kind, unittest.equals('foo')); | 1217 unittest.expect(o.kind, unittest.equals('foo')); |
1183 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 1218 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
1184 unittest.expect(o.nextSyncToken, unittest.equals('foo')); | 1219 unittest.expect(o.nextSyncToken, unittest.equals('foo')); |
1185 } | 1220 } |
1186 buildCounterSettings--; | 1221 buildCounterSettings--; |
1187 } | 1222 } |
1188 | 1223 |
1189 core.int buildCounterTimePeriod = 0; | 1224 core.int buildCounterTimePeriod = 0; |
1190 buildTimePeriod() { | 1225 buildTimePeriod() { |
1191 var o = new api.TimePeriod(); | 1226 var o = new api.TimePeriod(); |
1192 buildCounterTimePeriod++; | 1227 buildCounterTimePeriod++; |
1193 if (buildCounterTimePeriod < 3) { | 1228 if (buildCounterTimePeriod < 3) { |
1194 o.end = core.DateTime.parse("2002-02-27T14:01:02"); | 1229 o.end = core.DateTime.parse("2002-02-27T14:01:02"); |
1195 o.start = core.DateTime.parse("2002-02-27T14:01:02"); | 1230 o.start = core.DateTime.parse("2002-02-27T14:01:02"); |
1196 } | 1231 } |
1197 buildCounterTimePeriod--; | 1232 buildCounterTimePeriod--; |
1198 return o; | 1233 return o; |
1199 } | 1234 } |
1200 | 1235 |
1201 checkTimePeriod(api.TimePeriod o) { | 1236 checkTimePeriod(api.TimePeriod o) { |
1202 buildCounterTimePeriod++; | 1237 buildCounterTimePeriod++; |
1203 if (buildCounterTimePeriod < 3) { | 1238 if (buildCounterTimePeriod < 3) { |
1204 unittest.expect(o.end, unittest.equals(core.DateTime.parse("2002-02-27T14:01
:02"))); | 1239 unittest.expect(o.end, unittest.equals(core.DateTime.parse("2002-02-27T14:01
:02"))); |
1205 unittest.expect(o.start, unittest.equals(core.DateTime.parse("2002-02-27T14:
01:02"))); | 1240 unittest.expect(o.start, unittest.equals(core.DateTime.parse("2002-02-27T14:
01:02"))); |
1206 } | 1241 } |
1207 buildCounterTimePeriod--; | 1242 buildCounterTimePeriod--; |
1208 } | 1243 } |
1209 | 1244 |
1210 buildUnnamed1001() { | 1245 buildUnnamed393() { |
1211 var o = new core.List<core.String>(); | 1246 var o = new core.List<core.String>(); |
1212 o.add("foo"); | 1247 o.add("foo"); |
1213 o.add("foo"); | 1248 o.add("foo"); |
1214 return o; | 1249 return o; |
1215 } | 1250 } |
1216 | 1251 |
1217 checkUnnamed1001(core.List<core.String> o) { | 1252 checkUnnamed393(core.List<core.String> o) { |
1218 unittest.expect(o, unittest.hasLength(2)); | 1253 unittest.expect(o, unittest.hasLength(2)); |
1219 unittest.expect(o[0], unittest.equals('foo')); | 1254 unittest.expect(o[0], unittest.equals('foo')); |
1220 unittest.expect(o[1], unittest.equals('foo')); | 1255 unittest.expect(o[1], unittest.equals('foo')); |
1221 } | 1256 } |
1222 | 1257 |
1223 buildUnnamed1002() { | 1258 buildUnnamed394() { |
1224 var o = new core.List<core.String>(); | 1259 var o = new core.List<core.String>(); |
1225 o.add("foo"); | 1260 o.add("foo"); |
1226 o.add("foo"); | 1261 o.add("foo"); |
1227 return o; | 1262 return o; |
1228 } | 1263 } |
1229 | 1264 |
1230 checkUnnamed1002(core.List<core.String> o) { | 1265 checkUnnamed394(core.List<core.String> o) { |
1231 unittest.expect(o, unittest.hasLength(2)); | 1266 unittest.expect(o, unittest.hasLength(2)); |
1232 unittest.expect(o[0], unittest.equals('foo')); | 1267 unittest.expect(o[0], unittest.equals('foo')); |
1233 unittest.expect(o[1], unittest.equals('foo')); | 1268 unittest.expect(o[1], unittest.equals('foo')); |
1234 } | 1269 } |
1235 | 1270 |
1236 buildUnnamed1003() { | 1271 buildUnnamed395() { |
1237 var o = new core.List<core.String>(); | 1272 var o = new core.List<core.String>(); |
1238 o.add("foo"); | 1273 o.add("foo"); |
1239 o.add("foo"); | 1274 o.add("foo"); |
1240 return o; | 1275 return o; |
1241 } | 1276 } |
1242 | 1277 |
1243 checkUnnamed1003(core.List<core.String> o) { | 1278 checkUnnamed395(core.List<core.String> o) { |
1244 unittest.expect(o, unittest.hasLength(2)); | 1279 unittest.expect(o, unittest.hasLength(2)); |
1245 unittest.expect(o[0], unittest.equals('foo')); | 1280 unittest.expect(o[0], unittest.equals('foo')); |
1246 unittest.expect(o[1], unittest.equals('foo')); | 1281 unittest.expect(o[1], unittest.equals('foo')); |
1247 } | 1282 } |
1248 | 1283 |
1249 buildUnnamed1004() { | 1284 buildUnnamed396() { |
1250 var o = new core.List<core.String>(); | 1285 var o = new core.List<core.String>(); |
1251 o.add("foo"); | 1286 o.add("foo"); |
1252 o.add("foo"); | 1287 o.add("foo"); |
1253 return o; | 1288 return o; |
1254 } | 1289 } |
1255 | 1290 |
1256 checkUnnamed1004(core.List<core.String> o) { | 1291 checkUnnamed396(core.List<core.String> o) { |
1257 unittest.expect(o, unittest.hasLength(2)); | 1292 unittest.expect(o, unittest.hasLength(2)); |
1258 unittest.expect(o[0], unittest.equals('foo')); | 1293 unittest.expect(o[0], unittest.equals('foo')); |
1259 unittest.expect(o[1], unittest.equals('foo')); | 1294 unittest.expect(o[1], unittest.equals('foo')); |
1260 } | 1295 } |
1261 | 1296 |
1262 | 1297 |
1263 main() { | 1298 main() { |
1264 unittest.group("obj-schema-Acl", () { | 1299 unittest.group("obj-schema-Acl", () { |
1265 unittest.test("to-json--from-json", () { | 1300 unittest.test("to-json--from-json", () { |
1266 var o = buildAcl(); | 1301 var o = buildAcl(); |
(...skipping 278 matching lines...) Loading... |
1545 var o = buildTimePeriod(); | 1580 var o = buildTimePeriod(); |
1546 var od = new api.TimePeriod.fromJson(o.toJson()); | 1581 var od = new api.TimePeriod.fromJson(o.toJson()); |
1547 checkTimePeriod(od); | 1582 checkTimePeriod(od); |
1548 }); | 1583 }); |
1549 }); | 1584 }); |
1550 | 1585 |
1551 | 1586 |
1552 unittest.group("resource-AclResourceApi", () { | 1587 unittest.group("resource-AclResourceApi", () { |
1553 unittest.test("method--delete", () { | 1588 unittest.test("method--delete", () { |
1554 | 1589 |
1555 var mock = new common_test.HttpServerMock(); | 1590 var mock = new HttpServerMock(); |
1556 api.AclResourceApi res = new api.CalendarApi(mock).acl; | 1591 api.AclResourceApi res = new api.CalendarApi(mock).acl; |
1557 var arg_calendarId = "foo"; | 1592 var arg_calendarId = "foo"; |
1558 var arg_ruleId = "foo"; | 1593 var arg_ruleId = "foo"; |
1559 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1594 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1560 var path = (req.url).path; | 1595 var path = (req.url).path; |
1561 var pathOffset = 0; | 1596 var pathOffset = 0; |
1562 var index; | 1597 var index; |
1563 var subPart; | 1598 var subPart; |
1564 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1599 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
1565 pathOffset += 1; | 1600 pathOffset += 1; |
(...skipping 27 matching lines...) Loading... |
1593 var keyvalue = part.split("="); | 1628 var keyvalue = part.split("="); |
1594 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1629 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
1595 } | 1630 } |
1596 } | 1631 } |
1597 | 1632 |
1598 | 1633 |
1599 var h = { | 1634 var h = { |
1600 "content-type" : "application/json; charset=utf-8", | 1635 "content-type" : "application/json; charset=utf-8", |
1601 }; | 1636 }; |
1602 var resp = ""; | 1637 var resp = ""; |
1603 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 1638 return new async.Future.value(stringResponse(200, h, resp)); |
1604 }), true); | 1639 }), true); |
1605 res.delete(arg_calendarId, arg_ruleId).then(unittest.expectAsync((_) {})); | 1640 res.delete(arg_calendarId, arg_ruleId).then(unittest.expectAsync((_) {})); |
1606 }); | 1641 }); |
1607 | 1642 |
1608 unittest.test("method--get", () { | 1643 unittest.test("method--get", () { |
1609 | 1644 |
1610 var mock = new common_test.HttpServerMock(); | 1645 var mock = new HttpServerMock(); |
1611 api.AclResourceApi res = new api.CalendarApi(mock).acl; | 1646 api.AclResourceApi res = new api.CalendarApi(mock).acl; |
1612 var arg_calendarId = "foo"; | 1647 var arg_calendarId = "foo"; |
1613 var arg_ruleId = "foo"; | 1648 var arg_ruleId = "foo"; |
1614 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1649 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1615 var path = (req.url).path; | 1650 var path = (req.url).path; |
1616 var pathOffset = 0; | 1651 var pathOffset = 0; |
1617 var index; | 1652 var index; |
1618 var subPart; | 1653 var subPart; |
1619 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1654 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
1620 pathOffset += 1; | 1655 pathOffset += 1; |
(...skipping 27 matching lines...) Loading... |
1648 var keyvalue = part.split("="); | 1683 var keyvalue = part.split("="); |
1649 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1684 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
1650 } | 1685 } |
1651 } | 1686 } |
1652 | 1687 |
1653 | 1688 |
1654 var h = { | 1689 var h = { |
1655 "content-type" : "application/json; charset=utf-8", | 1690 "content-type" : "application/json; charset=utf-8", |
1656 }; | 1691 }; |
1657 var resp = convert.JSON.encode(buildAclRule()); | 1692 var resp = convert.JSON.encode(buildAclRule()); |
1658 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 1693 return new async.Future.value(stringResponse(200, h, resp)); |
1659 }), true); | 1694 }), true); |
1660 res.get(arg_calendarId, arg_ruleId).then(unittest.expectAsync(((api.AclRul
e response) { | 1695 res.get(arg_calendarId, arg_ruleId).then(unittest.expectAsync(((api.AclRul
e response) { |
1661 checkAclRule(response); | 1696 checkAclRule(response); |
1662 }))); | 1697 }))); |
1663 }); | 1698 }); |
1664 | 1699 |
1665 unittest.test("method--insert", () { | 1700 unittest.test("method--insert", () { |
1666 | 1701 |
1667 var mock = new common_test.HttpServerMock(); | 1702 var mock = new HttpServerMock(); |
1668 api.AclResourceApi res = new api.CalendarApi(mock).acl; | 1703 api.AclResourceApi res = new api.CalendarApi(mock).acl; |
1669 var arg_request = buildAclRule(); | 1704 var arg_request = buildAclRule(); |
1670 var arg_calendarId = "foo"; | 1705 var arg_calendarId = "foo"; |
1671 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1706 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1672 var obj = new api.AclRule.fromJson(json); | 1707 var obj = new api.AclRule.fromJson(json); |
1673 checkAclRule(obj); | 1708 checkAclRule(obj); |
1674 | 1709 |
1675 var path = (req.url).path; | 1710 var path = (req.url).path; |
1676 var pathOffset = 0; | 1711 var pathOffset = 0; |
1677 var index; | 1712 var index; |
(...skipping 27 matching lines...) Loading... |
1705 var keyvalue = part.split("="); | 1740 var keyvalue = part.split("="); |
1706 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1741 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
1707 } | 1742 } |
1708 } | 1743 } |
1709 | 1744 |
1710 | 1745 |
1711 var h = { | 1746 var h = { |
1712 "content-type" : "application/json; charset=utf-8", | 1747 "content-type" : "application/json; charset=utf-8", |
1713 }; | 1748 }; |
1714 var resp = convert.JSON.encode(buildAclRule()); | 1749 var resp = convert.JSON.encode(buildAclRule()); |
1715 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 1750 return new async.Future.value(stringResponse(200, h, resp)); |
1716 }), true); | 1751 }), true); |
1717 res.insert(arg_request, arg_calendarId).then(unittest.expectAsync(((api.Ac
lRule response) { | 1752 res.insert(arg_request, arg_calendarId).then(unittest.expectAsync(((api.Ac
lRule response) { |
1718 checkAclRule(response); | 1753 checkAclRule(response); |
1719 }))); | 1754 }))); |
1720 }); | 1755 }); |
1721 | 1756 |
1722 unittest.test("method--list", () { | 1757 unittest.test("method--list", () { |
1723 | 1758 |
1724 var mock = new common_test.HttpServerMock(); | 1759 var mock = new HttpServerMock(); |
1725 api.AclResourceApi res = new api.CalendarApi(mock).acl; | 1760 api.AclResourceApi res = new api.CalendarApi(mock).acl; |
1726 var arg_calendarId = "foo"; | 1761 var arg_calendarId = "foo"; |
1727 var arg_maxResults = 42; | 1762 var arg_maxResults = 42; |
1728 var arg_pageToken = "foo"; | 1763 var arg_pageToken = "foo"; |
1729 var arg_showDeleted = true; | 1764 var arg_showDeleted = true; |
1730 var arg_syncToken = "foo"; | 1765 var arg_syncToken = "foo"; |
1731 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1766 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1732 var path = (req.url).path; | 1767 var path = (req.url).path; |
1733 var pathOffset = 0; | 1768 var pathOffset = 0; |
1734 var index; | 1769 var index; |
(...skipping 31 matching lines...) Loading... |
1766 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | 1801 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); |
1767 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 1802 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
1768 unittest.expect(queryMap["showDeleted"].first, unittest.equals("$arg_sho
wDeleted")); | 1803 unittest.expect(queryMap["showDeleted"].first, unittest.equals("$arg_sho
wDeleted")); |
1769 unittest.expect(queryMap["syncToken"].first, unittest.equals(arg_syncTok
en)); | 1804 unittest.expect(queryMap["syncToken"].first, unittest.equals(arg_syncTok
en)); |
1770 | 1805 |
1771 | 1806 |
1772 var h = { | 1807 var h = { |
1773 "content-type" : "application/json; charset=utf-8", | 1808 "content-type" : "application/json; charset=utf-8", |
1774 }; | 1809 }; |
1775 var resp = convert.JSON.encode(buildAcl()); | 1810 var resp = convert.JSON.encode(buildAcl()); |
1776 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 1811 return new async.Future.value(stringResponse(200, h, resp)); |
1777 }), true); | 1812 }), true); |
1778 res.list(arg_calendarId, maxResults: arg_maxResults, pageToken: arg_pageTo
ken, showDeleted: arg_showDeleted, syncToken: arg_syncToken).then(unittest.expec
tAsync(((api.Acl response) { | 1813 res.list(arg_calendarId, maxResults: arg_maxResults, pageToken: arg_pageTo
ken, showDeleted: arg_showDeleted, syncToken: arg_syncToken).then(unittest.expec
tAsync(((api.Acl response) { |
1779 checkAcl(response); | 1814 checkAcl(response); |
1780 }))); | 1815 }))); |
1781 }); | 1816 }); |
1782 | 1817 |
1783 unittest.test("method--patch", () { | 1818 unittest.test("method--patch", () { |
1784 | 1819 |
1785 var mock = new common_test.HttpServerMock(); | 1820 var mock = new HttpServerMock(); |
1786 api.AclResourceApi res = new api.CalendarApi(mock).acl; | 1821 api.AclResourceApi res = new api.CalendarApi(mock).acl; |
1787 var arg_request = buildAclRule(); | 1822 var arg_request = buildAclRule(); |
1788 var arg_calendarId = "foo"; | 1823 var arg_calendarId = "foo"; |
1789 var arg_ruleId = "foo"; | 1824 var arg_ruleId = "foo"; |
1790 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1825 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1791 var obj = new api.AclRule.fromJson(json); | 1826 var obj = new api.AclRule.fromJson(json); |
1792 checkAclRule(obj); | 1827 checkAclRule(obj); |
1793 | 1828 |
1794 var path = (req.url).path; | 1829 var path = (req.url).path; |
1795 var pathOffset = 0; | 1830 var pathOffset = 0; |
(...skipping 31 matching lines...) Loading... |
1827 var keyvalue = part.split("="); | 1862 var keyvalue = part.split("="); |
1828 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1863 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
1829 } | 1864 } |
1830 } | 1865 } |
1831 | 1866 |
1832 | 1867 |
1833 var h = { | 1868 var h = { |
1834 "content-type" : "application/json; charset=utf-8", | 1869 "content-type" : "application/json; charset=utf-8", |
1835 }; | 1870 }; |
1836 var resp = convert.JSON.encode(buildAclRule()); | 1871 var resp = convert.JSON.encode(buildAclRule()); |
1837 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 1872 return new async.Future.value(stringResponse(200, h, resp)); |
1838 }), true); | 1873 }), true); |
1839 res.patch(arg_request, arg_calendarId, arg_ruleId).then(unittest.expectAsy
nc(((api.AclRule response) { | 1874 res.patch(arg_request, arg_calendarId, arg_ruleId).then(unittest.expectAsy
nc(((api.AclRule response) { |
1840 checkAclRule(response); | 1875 checkAclRule(response); |
1841 }))); | 1876 }))); |
1842 }); | 1877 }); |
1843 | 1878 |
1844 unittest.test("method--update", () { | 1879 unittest.test("method--update", () { |
1845 | 1880 |
1846 var mock = new common_test.HttpServerMock(); | 1881 var mock = new HttpServerMock(); |
1847 api.AclResourceApi res = new api.CalendarApi(mock).acl; | 1882 api.AclResourceApi res = new api.CalendarApi(mock).acl; |
1848 var arg_request = buildAclRule(); | 1883 var arg_request = buildAclRule(); |
1849 var arg_calendarId = "foo"; | 1884 var arg_calendarId = "foo"; |
1850 var arg_ruleId = "foo"; | 1885 var arg_ruleId = "foo"; |
1851 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1886 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1852 var obj = new api.AclRule.fromJson(json); | 1887 var obj = new api.AclRule.fromJson(json); |
1853 checkAclRule(obj); | 1888 checkAclRule(obj); |
1854 | 1889 |
1855 var path = (req.url).path; | 1890 var path = (req.url).path; |
1856 var pathOffset = 0; | 1891 var pathOffset = 0; |
(...skipping 31 matching lines...) Loading... |
1888 var keyvalue = part.split("="); | 1923 var keyvalue = part.split("="); |
1889 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1924 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
1890 } | 1925 } |
1891 } | 1926 } |
1892 | 1927 |
1893 | 1928 |
1894 var h = { | 1929 var h = { |
1895 "content-type" : "application/json; charset=utf-8", | 1930 "content-type" : "application/json; charset=utf-8", |
1896 }; | 1931 }; |
1897 var resp = convert.JSON.encode(buildAclRule()); | 1932 var resp = convert.JSON.encode(buildAclRule()); |
1898 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 1933 return new async.Future.value(stringResponse(200, h, resp)); |
1899 }), true); | 1934 }), true); |
1900 res.update(arg_request, arg_calendarId, arg_ruleId).then(unittest.expectAs
ync(((api.AclRule response) { | 1935 res.update(arg_request, arg_calendarId, arg_ruleId).then(unittest.expectAs
ync(((api.AclRule response) { |
1901 checkAclRule(response); | 1936 checkAclRule(response); |
1902 }))); | 1937 }))); |
1903 }); | 1938 }); |
1904 | 1939 |
1905 unittest.test("method--watch", () { | 1940 unittest.test("method--watch", () { |
1906 | 1941 |
1907 var mock = new common_test.HttpServerMock(); | 1942 var mock = new HttpServerMock(); |
1908 api.AclResourceApi res = new api.CalendarApi(mock).acl; | 1943 api.AclResourceApi res = new api.CalendarApi(mock).acl; |
1909 var arg_request = buildChannel(); | 1944 var arg_request = buildChannel(); |
1910 var arg_calendarId = "foo"; | 1945 var arg_calendarId = "foo"; |
1911 var arg_maxResults = 42; | 1946 var arg_maxResults = 42; |
1912 var arg_pageToken = "foo"; | 1947 var arg_pageToken = "foo"; |
1913 var arg_showDeleted = true; | 1948 var arg_showDeleted = true; |
1914 var arg_syncToken = "foo"; | 1949 var arg_syncToken = "foo"; |
1915 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1950 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1916 var obj = new api.Channel.fromJson(json); | 1951 var obj = new api.Channel.fromJson(json); |
1917 checkChannel(obj); | 1952 checkChannel(obj); |
(...skipping 35 matching lines...) Loading... |
1953 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | 1988 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); |
1954 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 1989 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
1955 unittest.expect(queryMap["showDeleted"].first, unittest.equals("$arg_sho
wDeleted")); | 1990 unittest.expect(queryMap["showDeleted"].first, unittest.equals("$arg_sho
wDeleted")); |
1956 unittest.expect(queryMap["syncToken"].first, unittest.equals(arg_syncTok
en)); | 1991 unittest.expect(queryMap["syncToken"].first, unittest.equals(arg_syncTok
en)); |
1957 | 1992 |
1958 | 1993 |
1959 var h = { | 1994 var h = { |
1960 "content-type" : "application/json; charset=utf-8", | 1995 "content-type" : "application/json; charset=utf-8", |
1961 }; | 1996 }; |
1962 var resp = convert.JSON.encode(buildChannel()); | 1997 var resp = convert.JSON.encode(buildChannel()); |
1963 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 1998 return new async.Future.value(stringResponse(200, h, resp)); |
1964 }), true); | 1999 }), true); |
1965 res.watch(arg_request, arg_calendarId, maxResults: arg_maxResults, pageTok
en: arg_pageToken, showDeleted: arg_showDeleted, syncToken: arg_syncToken).then(
unittest.expectAsync(((api.Channel response) { | 2000 res.watch(arg_request, arg_calendarId, maxResults: arg_maxResults, pageTok
en: arg_pageToken, showDeleted: arg_showDeleted, syncToken: arg_syncToken).then(
unittest.expectAsync(((api.Channel response) { |
1966 checkChannel(response); | 2001 checkChannel(response); |
1967 }))); | 2002 }))); |
1968 }); | 2003 }); |
1969 | 2004 |
1970 }); | 2005 }); |
1971 | 2006 |
1972 | 2007 |
1973 unittest.group("resource-CalendarListResourceApi", () { | 2008 unittest.group("resource-CalendarListResourceApi", () { |
1974 unittest.test("method--delete", () { | 2009 unittest.test("method--delete", () { |
1975 | 2010 |
1976 var mock = new common_test.HttpServerMock(); | 2011 var mock = new HttpServerMock(); |
1977 api.CalendarListResourceApi res = new api.CalendarApi(mock).calendarList; | 2012 api.CalendarListResourceApi res = new api.CalendarApi(mock).calendarList; |
1978 var arg_calendarId = "foo"; | 2013 var arg_calendarId = "foo"; |
1979 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2014 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1980 var path = (req.url).path; | 2015 var path = (req.url).path; |
1981 var pathOffset = 0; | 2016 var pathOffset = 0; |
1982 var index; | 2017 var index; |
1983 var subPart; | 2018 var subPart; |
1984 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2019 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
1985 pathOffset += 1; | 2020 pathOffset += 1; |
1986 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("calendar/v3/")); | 2021 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("calendar/v3/")); |
(...skipping 19 matching lines...) Loading... |
2006 var keyvalue = part.split("="); | 2041 var keyvalue = part.split("="); |
2007 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2042 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
2008 } | 2043 } |
2009 } | 2044 } |
2010 | 2045 |
2011 | 2046 |
2012 var h = { | 2047 var h = { |
2013 "content-type" : "application/json; charset=utf-8", | 2048 "content-type" : "application/json; charset=utf-8", |
2014 }; | 2049 }; |
2015 var resp = ""; | 2050 var resp = ""; |
2016 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2051 return new async.Future.value(stringResponse(200, h, resp)); |
2017 }), true); | 2052 }), true); |
2018 res.delete(arg_calendarId).then(unittest.expectAsync((_) {})); | 2053 res.delete(arg_calendarId).then(unittest.expectAsync((_) {})); |
2019 }); | 2054 }); |
2020 | 2055 |
2021 unittest.test("method--get", () { | 2056 unittest.test("method--get", () { |
2022 | 2057 |
2023 var mock = new common_test.HttpServerMock(); | 2058 var mock = new HttpServerMock(); |
2024 api.CalendarListResourceApi res = new api.CalendarApi(mock).calendarList; | 2059 api.CalendarListResourceApi res = new api.CalendarApi(mock).calendarList; |
2025 var arg_calendarId = "foo"; | 2060 var arg_calendarId = "foo"; |
2026 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2061 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2027 var path = (req.url).path; | 2062 var path = (req.url).path; |
2028 var pathOffset = 0; | 2063 var pathOffset = 0; |
2029 var index; | 2064 var index; |
2030 var subPart; | 2065 var subPart; |
2031 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2066 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
2032 pathOffset += 1; | 2067 pathOffset += 1; |
2033 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("calendar/v3/")); | 2068 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("calendar/v3/")); |
(...skipping 19 matching lines...) Loading... |
2053 var keyvalue = part.split("="); | 2088 var keyvalue = part.split("="); |
2054 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2089 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
2055 } | 2090 } |
2056 } | 2091 } |
2057 | 2092 |
2058 | 2093 |
2059 var h = { | 2094 var h = { |
2060 "content-type" : "application/json; charset=utf-8", | 2095 "content-type" : "application/json; charset=utf-8", |
2061 }; | 2096 }; |
2062 var resp = convert.JSON.encode(buildCalendarListEntry()); | 2097 var resp = convert.JSON.encode(buildCalendarListEntry()); |
2063 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2098 return new async.Future.value(stringResponse(200, h, resp)); |
2064 }), true); | 2099 }), true); |
2065 res.get(arg_calendarId).then(unittest.expectAsync(((api.CalendarListEntry
response) { | 2100 res.get(arg_calendarId).then(unittest.expectAsync(((api.CalendarListEntry
response) { |
2066 checkCalendarListEntry(response); | 2101 checkCalendarListEntry(response); |
2067 }))); | 2102 }))); |
2068 }); | 2103 }); |
2069 | 2104 |
2070 unittest.test("method--insert", () { | 2105 unittest.test("method--insert", () { |
2071 | 2106 |
2072 var mock = new common_test.HttpServerMock(); | 2107 var mock = new HttpServerMock(); |
2073 api.CalendarListResourceApi res = new api.CalendarApi(mock).calendarList; | 2108 api.CalendarListResourceApi res = new api.CalendarApi(mock).calendarList; |
2074 var arg_request = buildCalendarListEntry(); | 2109 var arg_request = buildCalendarListEntry(); |
2075 var arg_colorRgbFormat = true; | 2110 var arg_colorRgbFormat = true; |
2076 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2111 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2077 var obj = new api.CalendarListEntry.fromJson(json); | 2112 var obj = new api.CalendarListEntry.fromJson(json); |
2078 checkCalendarListEntry(obj); | 2113 checkCalendarListEntry(obj); |
2079 | 2114 |
2080 var path = (req.url).path; | 2115 var path = (req.url).path; |
2081 var pathOffset = 0; | 2116 var pathOffset = 0; |
2082 var index; | 2117 var index; |
(...skipping 21 matching lines...) Loading... |
2104 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2139 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
2105 } | 2140 } |
2106 } | 2141 } |
2107 unittest.expect(queryMap["colorRgbFormat"].first, unittest.equals("$arg_
colorRgbFormat")); | 2142 unittest.expect(queryMap["colorRgbFormat"].first, unittest.equals("$arg_
colorRgbFormat")); |
2108 | 2143 |
2109 | 2144 |
2110 var h = { | 2145 var h = { |
2111 "content-type" : "application/json; charset=utf-8", | 2146 "content-type" : "application/json; charset=utf-8", |
2112 }; | 2147 }; |
2113 var resp = convert.JSON.encode(buildCalendarListEntry()); | 2148 var resp = convert.JSON.encode(buildCalendarListEntry()); |
2114 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2149 return new async.Future.value(stringResponse(200, h, resp)); |
2115 }), true); | 2150 }), true); |
2116 res.insert(arg_request, colorRgbFormat: arg_colorRgbFormat).then(unittest.
expectAsync(((api.CalendarListEntry response) { | 2151 res.insert(arg_request, colorRgbFormat: arg_colorRgbFormat).then(unittest.
expectAsync(((api.CalendarListEntry response) { |
2117 checkCalendarListEntry(response); | 2152 checkCalendarListEntry(response); |
2118 }))); | 2153 }))); |
2119 }); | 2154 }); |
2120 | 2155 |
2121 unittest.test("method--list", () { | 2156 unittest.test("method--list", () { |
2122 | 2157 |
2123 var mock = new common_test.HttpServerMock(); | 2158 var mock = new HttpServerMock(); |
2124 api.CalendarListResourceApi res = new api.CalendarApi(mock).calendarList; | 2159 api.CalendarListResourceApi res = new api.CalendarApi(mock).calendarList; |
2125 var arg_maxResults = 42; | 2160 var arg_maxResults = 42; |
2126 var arg_minAccessRole = "foo"; | 2161 var arg_minAccessRole = "foo"; |
2127 var arg_pageToken = "foo"; | 2162 var arg_pageToken = "foo"; |
2128 var arg_showDeleted = true; | 2163 var arg_showDeleted = true; |
2129 var arg_showHidden = true; | 2164 var arg_showHidden = true; |
2130 var arg_syncToken = "foo"; | 2165 var arg_syncToken = "foo"; |
2131 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2166 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2132 var path = (req.url).path; | 2167 var path = (req.url).path; |
2133 var pathOffset = 0; | 2168 var pathOffset = 0; |
(...skipping 27 matching lines...) Loading... |
2161 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 2196 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
2162 unittest.expect(queryMap["showDeleted"].first, unittest.equals("$arg_sho
wDeleted")); | 2197 unittest.expect(queryMap["showDeleted"].first, unittest.equals("$arg_sho
wDeleted")); |
2163 unittest.expect(queryMap["showHidden"].first, unittest.equals("$arg_show
Hidden")); | 2198 unittest.expect(queryMap["showHidden"].first, unittest.equals("$arg_show
Hidden")); |
2164 unittest.expect(queryMap["syncToken"].first, unittest.equals(arg_syncTok
en)); | 2199 unittest.expect(queryMap["syncToken"].first, unittest.equals(arg_syncTok
en)); |
2165 | 2200 |
2166 | 2201 |
2167 var h = { | 2202 var h = { |
2168 "content-type" : "application/json; charset=utf-8", | 2203 "content-type" : "application/json; charset=utf-8", |
2169 }; | 2204 }; |
2170 var resp = convert.JSON.encode(buildCalendarList()); | 2205 var resp = convert.JSON.encode(buildCalendarList()); |
2171 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2206 return new async.Future.value(stringResponse(200, h, resp)); |
2172 }), true); | 2207 }), true); |
2173 res.list(maxResults: arg_maxResults, minAccessRole: arg_minAccessRole, pag
eToken: arg_pageToken, showDeleted: arg_showDeleted, showHidden: arg_showHidden,
syncToken: arg_syncToken).then(unittest.expectAsync(((api.CalendarList response
) { | 2208 res.list(maxResults: arg_maxResults, minAccessRole: arg_minAccessRole, pag
eToken: arg_pageToken, showDeleted: arg_showDeleted, showHidden: arg_showHidden,
syncToken: arg_syncToken).then(unittest.expectAsync(((api.CalendarList response
) { |
2174 checkCalendarList(response); | 2209 checkCalendarList(response); |
2175 }))); | 2210 }))); |
2176 }); | 2211 }); |
2177 | 2212 |
2178 unittest.test("method--patch", () { | 2213 unittest.test("method--patch", () { |
2179 | 2214 |
2180 var mock = new common_test.HttpServerMock(); | 2215 var mock = new HttpServerMock(); |
2181 api.CalendarListResourceApi res = new api.CalendarApi(mock).calendarList; | 2216 api.CalendarListResourceApi res = new api.CalendarApi(mock).calendarList; |
2182 var arg_request = buildCalendarListEntry(); | 2217 var arg_request = buildCalendarListEntry(); |
2183 var arg_calendarId = "foo"; | 2218 var arg_calendarId = "foo"; |
2184 var arg_colorRgbFormat = true; | 2219 var arg_colorRgbFormat = true; |
2185 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2220 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2186 var obj = new api.CalendarListEntry.fromJson(json); | 2221 var obj = new api.CalendarListEntry.fromJson(json); |
2187 checkCalendarListEntry(obj); | 2222 checkCalendarListEntry(obj); |
2188 | 2223 |
2189 var path = (req.url).path; | 2224 var path = (req.url).path; |
2190 var pathOffset = 0; | 2225 var pathOffset = 0; |
(...skipping 25 matching lines...) Loading... |
2216 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2251 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
2217 } | 2252 } |
2218 } | 2253 } |
2219 unittest.expect(queryMap["colorRgbFormat"].first, unittest.equals("$arg_
colorRgbFormat")); | 2254 unittest.expect(queryMap["colorRgbFormat"].first, unittest.equals("$arg_
colorRgbFormat")); |
2220 | 2255 |
2221 | 2256 |
2222 var h = { | 2257 var h = { |
2223 "content-type" : "application/json; charset=utf-8", | 2258 "content-type" : "application/json; charset=utf-8", |
2224 }; | 2259 }; |
2225 var resp = convert.JSON.encode(buildCalendarListEntry()); | 2260 var resp = convert.JSON.encode(buildCalendarListEntry()); |
2226 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2261 return new async.Future.value(stringResponse(200, h, resp)); |
2227 }), true); | 2262 }), true); |
2228 res.patch(arg_request, arg_calendarId, colorRgbFormat: arg_colorRgbFormat)
.then(unittest.expectAsync(((api.CalendarListEntry response) { | 2263 res.patch(arg_request, arg_calendarId, colorRgbFormat: arg_colorRgbFormat)
.then(unittest.expectAsync(((api.CalendarListEntry response) { |
2229 checkCalendarListEntry(response); | 2264 checkCalendarListEntry(response); |
2230 }))); | 2265 }))); |
2231 }); | 2266 }); |
2232 | 2267 |
2233 unittest.test("method--update", () { | 2268 unittest.test("method--update", () { |
2234 | 2269 |
2235 var mock = new common_test.HttpServerMock(); | 2270 var mock = new HttpServerMock(); |
2236 api.CalendarListResourceApi res = new api.CalendarApi(mock).calendarList; | 2271 api.CalendarListResourceApi res = new api.CalendarApi(mock).calendarList; |
2237 var arg_request = buildCalendarListEntry(); | 2272 var arg_request = buildCalendarListEntry(); |
2238 var arg_calendarId = "foo"; | 2273 var arg_calendarId = "foo"; |
2239 var arg_colorRgbFormat = true; | 2274 var arg_colorRgbFormat = true; |
2240 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2275 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2241 var obj = new api.CalendarListEntry.fromJson(json); | 2276 var obj = new api.CalendarListEntry.fromJson(json); |
2242 checkCalendarListEntry(obj); | 2277 checkCalendarListEntry(obj); |
2243 | 2278 |
2244 var path = (req.url).path; | 2279 var path = (req.url).path; |
2245 var pathOffset = 0; | 2280 var pathOffset = 0; |
(...skipping 25 matching lines...) Loading... |
2271 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2306 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
2272 } | 2307 } |
2273 } | 2308 } |
2274 unittest.expect(queryMap["colorRgbFormat"].first, unittest.equals("$arg_
colorRgbFormat")); | 2309 unittest.expect(queryMap["colorRgbFormat"].first, unittest.equals("$arg_
colorRgbFormat")); |
2275 | 2310 |
2276 | 2311 |
2277 var h = { | 2312 var h = { |
2278 "content-type" : "application/json; charset=utf-8", | 2313 "content-type" : "application/json; charset=utf-8", |
2279 }; | 2314 }; |
2280 var resp = convert.JSON.encode(buildCalendarListEntry()); | 2315 var resp = convert.JSON.encode(buildCalendarListEntry()); |
2281 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2316 return new async.Future.value(stringResponse(200, h, resp)); |
2282 }), true); | 2317 }), true); |
2283 res.update(arg_request, arg_calendarId, colorRgbFormat: arg_colorRgbFormat
).then(unittest.expectAsync(((api.CalendarListEntry response) { | 2318 res.update(arg_request, arg_calendarId, colorRgbFormat: arg_colorRgbFormat
).then(unittest.expectAsync(((api.CalendarListEntry response) { |
2284 checkCalendarListEntry(response); | 2319 checkCalendarListEntry(response); |
2285 }))); | 2320 }))); |
2286 }); | 2321 }); |
2287 | 2322 |
2288 unittest.test("method--watch", () { | 2323 unittest.test("method--watch", () { |
2289 | 2324 |
2290 var mock = new common_test.HttpServerMock(); | 2325 var mock = new HttpServerMock(); |
2291 api.CalendarListResourceApi res = new api.CalendarApi(mock).calendarList; | 2326 api.CalendarListResourceApi res = new api.CalendarApi(mock).calendarList; |
2292 var arg_request = buildChannel(); | 2327 var arg_request = buildChannel(); |
2293 var arg_maxResults = 42; | 2328 var arg_maxResults = 42; |
2294 var arg_minAccessRole = "foo"; | 2329 var arg_minAccessRole = "foo"; |
2295 var arg_pageToken = "foo"; | 2330 var arg_pageToken = "foo"; |
2296 var arg_showDeleted = true; | 2331 var arg_showDeleted = true; |
2297 var arg_showHidden = true; | 2332 var arg_showHidden = true; |
2298 var arg_syncToken = "foo"; | 2333 var arg_syncToken = "foo"; |
2299 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2334 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2300 var obj = new api.Channel.fromJson(json); | 2335 var obj = new api.Channel.fromJson(json); |
(...skipping 31 matching lines...) Loading... |
2332 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 2367 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
2333 unittest.expect(queryMap["showDeleted"].first, unittest.equals("$arg_sho
wDeleted")); | 2368 unittest.expect(queryMap["showDeleted"].first, unittest.equals("$arg_sho
wDeleted")); |
2334 unittest.expect(queryMap["showHidden"].first, unittest.equals("$arg_show
Hidden")); | 2369 unittest.expect(queryMap["showHidden"].first, unittest.equals("$arg_show
Hidden")); |
2335 unittest.expect(queryMap["syncToken"].first, unittest.equals(arg_syncTok
en)); | 2370 unittest.expect(queryMap["syncToken"].first, unittest.equals(arg_syncTok
en)); |
2336 | 2371 |
2337 | 2372 |
2338 var h = { | 2373 var h = { |
2339 "content-type" : "application/json; charset=utf-8", | 2374 "content-type" : "application/json; charset=utf-8", |
2340 }; | 2375 }; |
2341 var resp = convert.JSON.encode(buildChannel()); | 2376 var resp = convert.JSON.encode(buildChannel()); |
2342 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2377 return new async.Future.value(stringResponse(200, h, resp)); |
2343 }), true); | 2378 }), true); |
2344 res.watch(arg_request, maxResults: arg_maxResults, minAccessRole: arg_minA
ccessRole, pageToken: arg_pageToken, showDeleted: arg_showDeleted, showHidden: a
rg_showHidden, syncToken: arg_syncToken).then(unittest.expectAsync(((api.Channel
response) { | 2379 res.watch(arg_request, maxResults: arg_maxResults, minAccessRole: arg_minA
ccessRole, pageToken: arg_pageToken, showDeleted: arg_showDeleted, showHidden: a
rg_showHidden, syncToken: arg_syncToken).then(unittest.expectAsync(((api.Channel
response) { |
2345 checkChannel(response); | 2380 checkChannel(response); |
2346 }))); | 2381 }))); |
2347 }); | 2382 }); |
2348 | 2383 |
2349 }); | 2384 }); |
2350 | 2385 |
2351 | 2386 |
2352 unittest.group("resource-CalendarsResourceApi", () { | 2387 unittest.group("resource-CalendarsResourceApi", () { |
2353 unittest.test("method--clear", () { | 2388 unittest.test("method--clear", () { |
2354 | 2389 |
2355 var mock = new common_test.HttpServerMock(); | 2390 var mock = new HttpServerMock(); |
2356 api.CalendarsResourceApi res = new api.CalendarApi(mock).calendars; | 2391 api.CalendarsResourceApi res = new api.CalendarApi(mock).calendars; |
2357 var arg_calendarId = "foo"; | 2392 var arg_calendarId = "foo"; |
2358 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2393 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2359 var path = (req.url).path; | 2394 var path = (req.url).path; |
2360 var pathOffset = 0; | 2395 var pathOffset = 0; |
2361 var index; | 2396 var index; |
2362 var subPart; | 2397 var subPart; |
2363 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2398 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
2364 pathOffset += 1; | 2399 pathOffset += 1; |
2365 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("calendar/v3/")); | 2400 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("calendar/v3/")); |
(...skipping 23 matching lines...) Loading... |
2389 var keyvalue = part.split("="); | 2424 var keyvalue = part.split("="); |
2390 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2425 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
2391 } | 2426 } |
2392 } | 2427 } |
2393 | 2428 |
2394 | 2429 |
2395 var h = { | 2430 var h = { |
2396 "content-type" : "application/json; charset=utf-8", | 2431 "content-type" : "application/json; charset=utf-8", |
2397 }; | 2432 }; |
2398 var resp = ""; | 2433 var resp = ""; |
2399 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2434 return new async.Future.value(stringResponse(200, h, resp)); |
2400 }), true); | 2435 }), true); |
2401 res.clear(arg_calendarId).then(unittest.expectAsync((_) {})); | 2436 res.clear(arg_calendarId).then(unittest.expectAsync((_) {})); |
2402 }); | 2437 }); |
2403 | 2438 |
2404 unittest.test("method--delete", () { | 2439 unittest.test("method--delete", () { |
2405 | 2440 |
2406 var mock = new common_test.HttpServerMock(); | 2441 var mock = new HttpServerMock(); |
2407 api.CalendarsResourceApi res = new api.CalendarApi(mock).calendars; | 2442 api.CalendarsResourceApi res = new api.CalendarApi(mock).calendars; |
2408 var arg_calendarId = "foo"; | 2443 var arg_calendarId = "foo"; |
2409 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2444 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2410 var path = (req.url).path; | 2445 var path = (req.url).path; |
2411 var pathOffset = 0; | 2446 var pathOffset = 0; |
2412 var index; | 2447 var index; |
2413 var subPart; | 2448 var subPart; |
2414 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2449 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
2415 pathOffset += 1; | 2450 pathOffset += 1; |
2416 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("calendar/v3/")); | 2451 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("calendar/v3/")); |
(...skipping 19 matching lines...) Loading... |
2436 var keyvalue = part.split("="); | 2471 var keyvalue = part.split("="); |
2437 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2472 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
2438 } | 2473 } |
2439 } | 2474 } |
2440 | 2475 |
2441 | 2476 |
2442 var h = { | 2477 var h = { |
2443 "content-type" : "application/json; charset=utf-8", | 2478 "content-type" : "application/json; charset=utf-8", |
2444 }; | 2479 }; |
2445 var resp = ""; | 2480 var resp = ""; |
2446 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2481 return new async.Future.value(stringResponse(200, h, resp)); |
2447 }), true); | 2482 }), true); |
2448 res.delete(arg_calendarId).then(unittest.expectAsync((_) {})); | 2483 res.delete(arg_calendarId).then(unittest.expectAsync((_) {})); |
2449 }); | 2484 }); |
2450 | 2485 |
2451 unittest.test("method--get", () { | 2486 unittest.test("method--get", () { |
2452 | 2487 |
2453 var mock = new common_test.HttpServerMock(); | 2488 var mock = new HttpServerMock(); |
2454 api.CalendarsResourceApi res = new api.CalendarApi(mock).calendars; | 2489 api.CalendarsResourceApi res = new api.CalendarApi(mock).calendars; |
2455 var arg_calendarId = "foo"; | 2490 var arg_calendarId = "foo"; |
2456 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2491 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2457 var path = (req.url).path; | 2492 var path = (req.url).path; |
2458 var pathOffset = 0; | 2493 var pathOffset = 0; |
2459 var index; | 2494 var index; |
2460 var subPart; | 2495 var subPart; |
2461 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2496 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
2462 pathOffset += 1; | 2497 pathOffset += 1; |
2463 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("calendar/v3/")); | 2498 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("calendar/v3/")); |
(...skipping 19 matching lines...) Loading... |
2483 var keyvalue = part.split("="); | 2518 var keyvalue = part.split("="); |
2484 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2519 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
2485 } | 2520 } |
2486 } | 2521 } |
2487 | 2522 |
2488 | 2523 |
2489 var h = { | 2524 var h = { |
2490 "content-type" : "application/json; charset=utf-8", | 2525 "content-type" : "application/json; charset=utf-8", |
2491 }; | 2526 }; |
2492 var resp = convert.JSON.encode(buildCalendar()); | 2527 var resp = convert.JSON.encode(buildCalendar()); |
2493 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2528 return new async.Future.value(stringResponse(200, h, resp)); |
2494 }), true); | 2529 }), true); |
2495 res.get(arg_calendarId).then(unittest.expectAsync(((api.Calendar response)
{ | 2530 res.get(arg_calendarId).then(unittest.expectAsync(((api.Calendar response)
{ |
2496 checkCalendar(response); | 2531 checkCalendar(response); |
2497 }))); | 2532 }))); |
2498 }); | 2533 }); |
2499 | 2534 |
2500 unittest.test("method--insert", () { | 2535 unittest.test("method--insert", () { |
2501 | 2536 |
2502 var mock = new common_test.HttpServerMock(); | 2537 var mock = new HttpServerMock(); |
2503 api.CalendarsResourceApi res = new api.CalendarApi(mock).calendars; | 2538 api.CalendarsResourceApi res = new api.CalendarApi(mock).calendars; |
2504 var arg_request = buildCalendar(); | 2539 var arg_request = buildCalendar(); |
2505 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2540 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2506 var obj = new api.Calendar.fromJson(json); | 2541 var obj = new api.Calendar.fromJson(json); |
2507 checkCalendar(obj); | 2542 checkCalendar(obj); |
2508 | 2543 |
2509 var path = (req.url).path; | 2544 var path = (req.url).path; |
2510 var pathOffset = 0; | 2545 var pathOffset = 0; |
2511 var index; | 2546 var index; |
2512 var subPart; | 2547 var subPart; |
(...skipping 19 matching lines...) Loading... |
2532 var keyvalue = part.split("="); | 2567 var keyvalue = part.split("="); |
2533 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2568 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
2534 } | 2569 } |
2535 } | 2570 } |
2536 | 2571 |
2537 | 2572 |
2538 var h = { | 2573 var h = { |
2539 "content-type" : "application/json; charset=utf-8", | 2574 "content-type" : "application/json; charset=utf-8", |
2540 }; | 2575 }; |
2541 var resp = convert.JSON.encode(buildCalendar()); | 2576 var resp = convert.JSON.encode(buildCalendar()); |
2542 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2577 return new async.Future.value(stringResponse(200, h, resp)); |
2543 }), true); | 2578 }), true); |
2544 res.insert(arg_request).then(unittest.expectAsync(((api.Calendar response)
{ | 2579 res.insert(arg_request).then(unittest.expectAsync(((api.Calendar response)
{ |
2545 checkCalendar(response); | 2580 checkCalendar(response); |
2546 }))); | 2581 }))); |
2547 }); | 2582 }); |
2548 | 2583 |
2549 unittest.test("method--patch", () { | 2584 unittest.test("method--patch", () { |
2550 | 2585 |
2551 var mock = new common_test.HttpServerMock(); | 2586 var mock = new HttpServerMock(); |
2552 api.CalendarsResourceApi res = new api.CalendarApi(mock).calendars; | 2587 api.CalendarsResourceApi res = new api.CalendarApi(mock).calendars; |
2553 var arg_request = buildCalendar(); | 2588 var arg_request = buildCalendar(); |
2554 var arg_calendarId = "foo"; | 2589 var arg_calendarId = "foo"; |
2555 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2590 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2556 var obj = new api.Calendar.fromJson(json); | 2591 var obj = new api.Calendar.fromJson(json); |
2557 checkCalendar(obj); | 2592 checkCalendar(obj); |
2558 | 2593 |
2559 var path = (req.url).path; | 2594 var path = (req.url).path; |
2560 var pathOffset = 0; | 2595 var pathOffset = 0; |
2561 var index; | 2596 var index; |
(...skipping 23 matching lines...) Loading... |
2585 var keyvalue = part.split("="); | 2620 var keyvalue = part.split("="); |
2586 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2621 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
2587 } | 2622 } |
2588 } | 2623 } |
2589 | 2624 |
2590 | 2625 |
2591 var h = { | 2626 var h = { |
2592 "content-type" : "application/json; charset=utf-8", | 2627 "content-type" : "application/json; charset=utf-8", |
2593 }; | 2628 }; |
2594 var resp = convert.JSON.encode(buildCalendar()); | 2629 var resp = convert.JSON.encode(buildCalendar()); |
2595 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2630 return new async.Future.value(stringResponse(200, h, resp)); |
2596 }), true); | 2631 }), true); |
2597 res.patch(arg_request, arg_calendarId).then(unittest.expectAsync(((api.Cal
endar response) { | 2632 res.patch(arg_request, arg_calendarId).then(unittest.expectAsync(((api.Cal
endar response) { |
2598 checkCalendar(response); | 2633 checkCalendar(response); |
2599 }))); | 2634 }))); |
2600 }); | 2635 }); |
2601 | 2636 |
2602 unittest.test("method--update", () { | 2637 unittest.test("method--update", () { |
2603 | 2638 |
2604 var mock = new common_test.HttpServerMock(); | 2639 var mock = new HttpServerMock(); |
2605 api.CalendarsResourceApi res = new api.CalendarApi(mock).calendars; | 2640 api.CalendarsResourceApi res = new api.CalendarApi(mock).calendars; |
2606 var arg_request = buildCalendar(); | 2641 var arg_request = buildCalendar(); |
2607 var arg_calendarId = "foo"; | 2642 var arg_calendarId = "foo"; |
2608 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2643 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2609 var obj = new api.Calendar.fromJson(json); | 2644 var obj = new api.Calendar.fromJson(json); |
2610 checkCalendar(obj); | 2645 checkCalendar(obj); |
2611 | 2646 |
2612 var path = (req.url).path; | 2647 var path = (req.url).path; |
2613 var pathOffset = 0; | 2648 var pathOffset = 0; |
2614 var index; | 2649 var index; |
(...skipping 23 matching lines...) Loading... |
2638 var keyvalue = part.split("="); | 2673 var keyvalue = part.split("="); |
2639 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2674 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
2640 } | 2675 } |
2641 } | 2676 } |
2642 | 2677 |
2643 | 2678 |
2644 var h = { | 2679 var h = { |
2645 "content-type" : "application/json; charset=utf-8", | 2680 "content-type" : "application/json; charset=utf-8", |
2646 }; | 2681 }; |
2647 var resp = convert.JSON.encode(buildCalendar()); | 2682 var resp = convert.JSON.encode(buildCalendar()); |
2648 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2683 return new async.Future.value(stringResponse(200, h, resp)); |
2649 }), true); | 2684 }), true); |
2650 res.update(arg_request, arg_calendarId).then(unittest.expectAsync(((api.Ca
lendar response) { | 2685 res.update(arg_request, arg_calendarId).then(unittest.expectAsync(((api.Ca
lendar response) { |
2651 checkCalendar(response); | 2686 checkCalendar(response); |
2652 }))); | 2687 }))); |
2653 }); | 2688 }); |
2654 | 2689 |
2655 }); | 2690 }); |
2656 | 2691 |
2657 | 2692 |
2658 unittest.group("resource-ChannelsResourceApi", () { | 2693 unittest.group("resource-ChannelsResourceApi", () { |
2659 unittest.test("method--stop", () { | 2694 unittest.test("method--stop", () { |
2660 | 2695 |
2661 var mock = new common_test.HttpServerMock(); | 2696 var mock = new HttpServerMock(); |
2662 api.ChannelsResourceApi res = new api.CalendarApi(mock).channels; | 2697 api.ChannelsResourceApi res = new api.CalendarApi(mock).channels; |
2663 var arg_request = buildChannel(); | 2698 var arg_request = buildChannel(); |
2664 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2699 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2665 var obj = new api.Channel.fromJson(json); | 2700 var obj = new api.Channel.fromJson(json); |
2666 checkChannel(obj); | 2701 checkChannel(obj); |
2667 | 2702 |
2668 var path = (req.url).path; | 2703 var path = (req.url).path; |
2669 var pathOffset = 0; | 2704 var pathOffset = 0; |
2670 var index; | 2705 var index; |
2671 var subPart; | 2706 var subPart; |
(...skipping 19 matching lines...) Loading... |
2691 var keyvalue = part.split("="); | 2726 var keyvalue = part.split("="); |
2692 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2727 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
2693 } | 2728 } |
2694 } | 2729 } |
2695 | 2730 |
2696 | 2731 |
2697 var h = { | 2732 var h = { |
2698 "content-type" : "application/json; charset=utf-8", | 2733 "content-type" : "application/json; charset=utf-8", |
2699 }; | 2734 }; |
2700 var resp = ""; | 2735 var resp = ""; |
2701 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2736 return new async.Future.value(stringResponse(200, h, resp)); |
2702 }), true); | 2737 }), true); |
2703 res.stop(arg_request).then(unittest.expectAsync((_) {})); | 2738 res.stop(arg_request).then(unittest.expectAsync((_) {})); |
2704 }); | 2739 }); |
2705 | 2740 |
2706 }); | 2741 }); |
2707 | 2742 |
2708 | 2743 |
2709 unittest.group("resource-ColorsResourceApi", () { | 2744 unittest.group("resource-ColorsResourceApi", () { |
2710 unittest.test("method--get", () { | 2745 unittest.test("method--get", () { |
2711 | 2746 |
2712 var mock = new common_test.HttpServerMock(); | 2747 var mock = new HttpServerMock(); |
2713 api.ColorsResourceApi res = new api.CalendarApi(mock).colors; | 2748 api.ColorsResourceApi res = new api.CalendarApi(mock).colors; |
2714 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2749 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2715 var path = (req.url).path; | 2750 var path = (req.url).path; |
2716 var pathOffset = 0; | 2751 var pathOffset = 0; |
2717 var index; | 2752 var index; |
2718 var subPart; | 2753 var subPart; |
2719 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2754 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
2720 pathOffset += 1; | 2755 pathOffset += 1; |
2721 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("calendar/v3/")); | 2756 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("calendar/v3/")); |
2722 pathOffset += 12; | 2757 pathOffset += 12; |
(...skipping 15 matching lines...) Loading... |
2738 var keyvalue = part.split("="); | 2773 var keyvalue = part.split("="); |
2739 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2774 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
2740 } | 2775 } |
2741 } | 2776 } |
2742 | 2777 |
2743 | 2778 |
2744 var h = { | 2779 var h = { |
2745 "content-type" : "application/json; charset=utf-8", | 2780 "content-type" : "application/json; charset=utf-8", |
2746 }; | 2781 }; |
2747 var resp = convert.JSON.encode(buildColors()); | 2782 var resp = convert.JSON.encode(buildColors()); |
2748 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2783 return new async.Future.value(stringResponse(200, h, resp)); |
2749 }), true); | 2784 }), true); |
2750 res.get().then(unittest.expectAsync(((api.Colors response) { | 2785 res.get().then(unittest.expectAsync(((api.Colors response) { |
2751 checkColors(response); | 2786 checkColors(response); |
2752 }))); | 2787 }))); |
2753 }); | 2788 }); |
2754 | 2789 |
2755 }); | 2790 }); |
2756 | 2791 |
2757 | 2792 |
2758 unittest.group("resource-EventsResourceApi", () { | 2793 unittest.group("resource-EventsResourceApi", () { |
2759 unittest.test("method--delete", () { | 2794 unittest.test("method--delete", () { |
2760 | 2795 |
2761 var mock = new common_test.HttpServerMock(); | 2796 var mock = new HttpServerMock(); |
2762 api.EventsResourceApi res = new api.CalendarApi(mock).events; | 2797 api.EventsResourceApi res = new api.CalendarApi(mock).events; |
2763 var arg_calendarId = "foo"; | 2798 var arg_calendarId = "foo"; |
2764 var arg_eventId = "foo"; | 2799 var arg_eventId = "foo"; |
2765 var arg_sendNotifications = true; | 2800 var arg_sendNotifications = true; |
2766 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2801 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2767 var path = (req.url).path; | 2802 var path = (req.url).path; |
2768 var pathOffset = 0; | 2803 var pathOffset = 0; |
2769 var index; | 2804 var index; |
2770 var subPart; | 2805 var subPart; |
2771 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2806 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
(...skipping 29 matching lines...) Loading... |
2801 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2836 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
2802 } | 2837 } |
2803 } | 2838 } |
2804 unittest.expect(queryMap["sendNotifications"].first, unittest.equals("$a
rg_sendNotifications")); | 2839 unittest.expect(queryMap["sendNotifications"].first, unittest.equals("$a
rg_sendNotifications")); |
2805 | 2840 |
2806 | 2841 |
2807 var h = { | 2842 var h = { |
2808 "content-type" : "application/json; charset=utf-8", | 2843 "content-type" : "application/json; charset=utf-8", |
2809 }; | 2844 }; |
2810 var resp = ""; | 2845 var resp = ""; |
2811 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2846 return new async.Future.value(stringResponse(200, h, resp)); |
2812 }), true); | 2847 }), true); |
2813 res.delete(arg_calendarId, arg_eventId, sendNotifications: arg_sendNotific
ations).then(unittest.expectAsync((_) {})); | 2848 res.delete(arg_calendarId, arg_eventId, sendNotifications: arg_sendNotific
ations).then(unittest.expectAsync((_) {})); |
2814 }); | 2849 }); |
2815 | 2850 |
2816 unittest.test("method--get", () { | 2851 unittest.test("method--get", () { |
2817 | 2852 |
2818 var mock = new common_test.HttpServerMock(); | 2853 var mock = new HttpServerMock(); |
2819 api.EventsResourceApi res = new api.CalendarApi(mock).events; | 2854 api.EventsResourceApi res = new api.CalendarApi(mock).events; |
2820 var arg_calendarId = "foo"; | 2855 var arg_calendarId = "foo"; |
2821 var arg_eventId = "foo"; | 2856 var arg_eventId = "foo"; |
2822 var arg_alwaysIncludeEmail = true; | 2857 var arg_alwaysIncludeEmail = true; |
2823 var arg_maxAttendees = 42; | 2858 var arg_maxAttendees = 42; |
2824 var arg_timeZone = "foo"; | 2859 var arg_timeZone = "foo"; |
2825 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2860 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2826 var path = (req.url).path; | 2861 var path = (req.url).path; |
2827 var pathOffset = 0; | 2862 var pathOffset = 0; |
2828 var index; | 2863 var index; |
(...skipping 33 matching lines...) Loading... |
2862 } | 2897 } |
2863 unittest.expect(queryMap["alwaysIncludeEmail"].first, unittest.equals("$
arg_alwaysIncludeEmail")); | 2898 unittest.expect(queryMap["alwaysIncludeEmail"].first, unittest.equals("$
arg_alwaysIncludeEmail")); |
2864 unittest.expect(core.int.parse(queryMap["maxAttendees"].first), unittest
.equals(arg_maxAttendees)); | 2899 unittest.expect(core.int.parse(queryMap["maxAttendees"].first), unittest
.equals(arg_maxAttendees)); |
2865 unittest.expect(queryMap["timeZone"].first, unittest.equals(arg_timeZone
)); | 2900 unittest.expect(queryMap["timeZone"].first, unittest.equals(arg_timeZone
)); |
2866 | 2901 |
2867 | 2902 |
2868 var h = { | 2903 var h = { |
2869 "content-type" : "application/json; charset=utf-8", | 2904 "content-type" : "application/json; charset=utf-8", |
2870 }; | 2905 }; |
2871 var resp = convert.JSON.encode(buildEvent()); | 2906 var resp = convert.JSON.encode(buildEvent()); |
2872 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2907 return new async.Future.value(stringResponse(200, h, resp)); |
2873 }), true); | 2908 }), true); |
2874 res.get(arg_calendarId, arg_eventId, alwaysIncludeEmail: arg_alwaysInclude
Email, maxAttendees: arg_maxAttendees, timeZone: arg_timeZone).then(unittest.exp
ectAsync(((api.Event response) { | 2909 res.get(arg_calendarId, arg_eventId, alwaysIncludeEmail: arg_alwaysInclude
Email, maxAttendees: arg_maxAttendees, timeZone: arg_timeZone).then(unittest.exp
ectAsync(((api.Event response) { |
2875 checkEvent(response); | 2910 checkEvent(response); |
2876 }))); | 2911 }))); |
2877 }); | 2912 }); |
2878 | 2913 |
2879 unittest.test("method--import", () { | 2914 unittest.test("method--import", () { |
2880 | 2915 |
2881 var mock = new common_test.HttpServerMock(); | 2916 var mock = new HttpServerMock(); |
2882 api.EventsResourceApi res = new api.CalendarApi(mock).events; | 2917 api.EventsResourceApi res = new api.CalendarApi(mock).events; |
2883 var arg_request = buildEvent(); | 2918 var arg_request = buildEvent(); |
2884 var arg_calendarId = "foo"; | 2919 var arg_calendarId = "foo"; |
2885 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2920 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2886 var obj = new api.Event.fromJson(json); | 2921 var obj = new api.Event.fromJson(json); |
2887 checkEvent(obj); | 2922 checkEvent(obj); |
2888 | 2923 |
2889 var path = (req.url).path; | 2924 var path = (req.url).path; |
2890 var pathOffset = 0; | 2925 var pathOffset = 0; |
2891 var index; | 2926 var index; |
(...skipping 27 matching lines...) Loading... |
2919 var keyvalue = part.split("="); | 2954 var keyvalue = part.split("="); |
2920 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2955 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
2921 } | 2956 } |
2922 } | 2957 } |
2923 | 2958 |
2924 | 2959 |
2925 var h = { | 2960 var h = { |
2926 "content-type" : "application/json; charset=utf-8", | 2961 "content-type" : "application/json; charset=utf-8", |
2927 }; | 2962 }; |
2928 var resp = convert.JSON.encode(buildEvent()); | 2963 var resp = convert.JSON.encode(buildEvent()); |
2929 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2964 return new async.Future.value(stringResponse(200, h, resp)); |
2930 }), true); | 2965 }), true); |
2931 res.import(arg_request, arg_calendarId).then(unittest.expectAsync(((api.Ev
ent response) { | 2966 res.import(arg_request, arg_calendarId).then(unittest.expectAsync(((api.Ev
ent response) { |
2932 checkEvent(response); | 2967 checkEvent(response); |
2933 }))); | 2968 }))); |
2934 }); | 2969 }); |
2935 | 2970 |
2936 unittest.test("method--insert", () { | 2971 unittest.test("method--insert", () { |
2937 | 2972 |
2938 var mock = new common_test.HttpServerMock(); | 2973 var mock = new HttpServerMock(); |
2939 api.EventsResourceApi res = new api.CalendarApi(mock).events; | 2974 api.EventsResourceApi res = new api.CalendarApi(mock).events; |
2940 var arg_request = buildEvent(); | 2975 var arg_request = buildEvent(); |
2941 var arg_calendarId = "foo"; | 2976 var arg_calendarId = "foo"; |
2942 var arg_maxAttendees = 42; | 2977 var arg_maxAttendees = 42; |
2943 var arg_sendNotifications = true; | 2978 var arg_sendNotifications = true; |
2944 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2979 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2945 var obj = new api.Event.fromJson(json); | 2980 var obj = new api.Event.fromJson(json); |
2946 checkEvent(obj); | 2981 checkEvent(obj); |
2947 | 2982 |
2948 var path = (req.url).path; | 2983 var path = (req.url).path; |
(...skipping 31 matching lines...) Loading... |
2980 } | 3015 } |
2981 } | 3016 } |
2982 unittest.expect(core.int.parse(queryMap["maxAttendees"].first), unittest
.equals(arg_maxAttendees)); | 3017 unittest.expect(core.int.parse(queryMap["maxAttendees"].first), unittest
.equals(arg_maxAttendees)); |
2983 unittest.expect(queryMap["sendNotifications"].first, unittest.equals("$a
rg_sendNotifications")); | 3018 unittest.expect(queryMap["sendNotifications"].first, unittest.equals("$a
rg_sendNotifications")); |
2984 | 3019 |
2985 | 3020 |
2986 var h = { | 3021 var h = { |
2987 "content-type" : "application/json; charset=utf-8", | 3022 "content-type" : "application/json; charset=utf-8", |
2988 }; | 3023 }; |
2989 var resp = convert.JSON.encode(buildEvent()); | 3024 var resp = convert.JSON.encode(buildEvent()); |
2990 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 3025 return new async.Future.value(stringResponse(200, h, resp)); |
2991 }), true); | 3026 }), true); |
2992 res.insert(arg_request, arg_calendarId, maxAttendees: arg_maxAttendees, se
ndNotifications: arg_sendNotifications).then(unittest.expectAsync(((api.Event re
sponse) { | 3027 res.insert(arg_request, arg_calendarId, maxAttendees: arg_maxAttendees, se
ndNotifications: arg_sendNotifications).then(unittest.expectAsync(((api.Event re
sponse) { |
2993 checkEvent(response); | 3028 checkEvent(response); |
2994 }))); | 3029 }))); |
2995 }); | 3030 }); |
2996 | 3031 |
2997 unittest.test("method--instances", () { | 3032 unittest.test("method--instances", () { |
2998 | 3033 |
2999 var mock = new common_test.HttpServerMock(); | 3034 var mock = new HttpServerMock(); |
3000 api.EventsResourceApi res = new api.CalendarApi(mock).events; | 3035 api.EventsResourceApi res = new api.CalendarApi(mock).events; |
3001 var arg_calendarId = "foo"; | 3036 var arg_calendarId = "foo"; |
3002 var arg_eventId = "foo"; | 3037 var arg_eventId = "foo"; |
3003 var arg_alwaysIncludeEmail = true; | 3038 var arg_alwaysIncludeEmail = true; |
3004 var arg_maxAttendees = 42; | 3039 var arg_maxAttendees = 42; |
3005 var arg_maxResults = 42; | 3040 var arg_maxResults = 42; |
3006 var arg_originalStart = "foo"; | 3041 var arg_originalStart = "foo"; |
3007 var arg_pageToken = "foo"; | 3042 var arg_pageToken = "foo"; |
3008 var arg_showDeleted = true; | 3043 var arg_showDeleted = true; |
3009 var arg_timeMax = core.DateTime.parse("2002-02-27T14:01:02"); | 3044 var arg_timeMax = core.DateTime.parse("2002-02-27T14:01:02"); |
(...skipping 49 matching lines...) Loading... |
3059 unittest.expect(queryMap["showDeleted"].first, unittest.equals("$arg_sho
wDeleted")); | 3094 unittest.expect(queryMap["showDeleted"].first, unittest.equals("$arg_sho
wDeleted")); |
3060 unittest.expect(core.DateTime.parse(queryMap["timeMax"].first), unittest
.equals(arg_timeMax)); | 3095 unittest.expect(core.DateTime.parse(queryMap["timeMax"].first), unittest
.equals(arg_timeMax)); |
3061 unittest.expect(core.DateTime.parse(queryMap["timeMin"].first), unittest
.equals(arg_timeMin)); | 3096 unittest.expect(core.DateTime.parse(queryMap["timeMin"].first), unittest
.equals(arg_timeMin)); |
3062 unittest.expect(queryMap["timeZone"].first, unittest.equals(arg_timeZone
)); | 3097 unittest.expect(queryMap["timeZone"].first, unittest.equals(arg_timeZone
)); |
3063 | 3098 |
3064 | 3099 |
3065 var h = { | 3100 var h = { |
3066 "content-type" : "application/json; charset=utf-8", | 3101 "content-type" : "application/json; charset=utf-8", |
3067 }; | 3102 }; |
3068 var resp = convert.JSON.encode(buildEvents()); | 3103 var resp = convert.JSON.encode(buildEvents()); |
3069 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 3104 return new async.Future.value(stringResponse(200, h, resp)); |
3070 }), true); | 3105 }), true); |
3071 res.instances(arg_calendarId, arg_eventId, alwaysIncludeEmail: arg_alwaysI
ncludeEmail, maxAttendees: arg_maxAttendees, maxResults: arg_maxResults, origina
lStart: arg_originalStart, pageToken: arg_pageToken, showDeleted: arg_showDelete
d, timeMax: arg_timeMax, timeMin: arg_timeMin, timeZone: arg_timeZone).then(unit
test.expectAsync(((api.Events response) { | 3106 res.instances(arg_calendarId, arg_eventId, alwaysIncludeEmail: arg_alwaysI
ncludeEmail, maxAttendees: arg_maxAttendees, maxResults: arg_maxResults, origina
lStart: arg_originalStart, pageToken: arg_pageToken, showDeleted: arg_showDelete
d, timeMax: arg_timeMax, timeMin: arg_timeMin, timeZone: arg_timeZone).then(unit
test.expectAsync(((api.Events response) { |
3072 checkEvents(response); | 3107 checkEvents(response); |
3073 }))); | 3108 }))); |
3074 }); | 3109 }); |
3075 | 3110 |
3076 unittest.test("method--list", () { | 3111 unittest.test("method--list", () { |
3077 | 3112 |
3078 var mock = new common_test.HttpServerMock(); | 3113 var mock = new HttpServerMock(); |
3079 api.EventsResourceApi res = new api.CalendarApi(mock).events; | 3114 api.EventsResourceApi res = new api.CalendarApi(mock).events; |
3080 var arg_calendarId = "foo"; | 3115 var arg_calendarId = "foo"; |
3081 var arg_alwaysIncludeEmail = true; | 3116 var arg_alwaysIncludeEmail = true; |
3082 var arg_iCalUID = "foo"; | 3117 var arg_iCalUID = "foo"; |
3083 var arg_maxAttendees = 42; | 3118 var arg_maxAttendees = 42; |
3084 var arg_maxResults = 42; | 3119 var arg_maxResults = 42; |
3085 var arg_orderBy = "foo"; | 3120 var arg_orderBy = "foo"; |
3086 var arg_pageToken = "foo"; | 3121 var arg_pageToken = "foo"; |
3087 var arg_privateExtendedProperty = buildUnnamed1001(); | 3122 var arg_privateExtendedProperty = buildUnnamed393(); |
3088 var arg_q = "foo"; | 3123 var arg_q = "foo"; |
3089 var arg_sharedExtendedProperty = buildUnnamed1002(); | 3124 var arg_sharedExtendedProperty = buildUnnamed394(); |
3090 var arg_showDeleted = true; | 3125 var arg_showDeleted = true; |
3091 var arg_showHiddenInvitations = true; | 3126 var arg_showHiddenInvitations = true; |
3092 var arg_singleEvents = true; | 3127 var arg_singleEvents = true; |
3093 var arg_syncToken = "foo"; | 3128 var arg_syncToken = "foo"; |
3094 var arg_timeMax = core.DateTime.parse("2002-02-27T14:01:02"); | 3129 var arg_timeMax = core.DateTime.parse("2002-02-27T14:01:02"); |
3095 var arg_timeMin = core.DateTime.parse("2002-02-27T14:01:02"); | 3130 var arg_timeMin = core.DateTime.parse("2002-02-27T14:01:02"); |
3096 var arg_timeZone = "foo"; | 3131 var arg_timeZone = "foo"; |
3097 var arg_updatedMin = core.DateTime.parse("2002-02-27T14:01:02"); | 3132 var arg_updatedMin = core.DateTime.parse("2002-02-27T14:01:02"); |
3098 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3133 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
3099 var path = (req.url).path; | 3134 var path = (req.url).path; |
(...skipping 46 matching lines...) Loading... |
3146 unittest.expect(core.DateTime.parse(queryMap["timeMax"].first), unittest
.equals(arg_timeMax)); | 3181 unittest.expect(core.DateTime.parse(queryMap["timeMax"].first), unittest
.equals(arg_timeMax)); |
3147 unittest.expect(core.DateTime.parse(queryMap["timeMin"].first), unittest
.equals(arg_timeMin)); | 3182 unittest.expect(core.DateTime.parse(queryMap["timeMin"].first), unittest
.equals(arg_timeMin)); |
3148 unittest.expect(queryMap["timeZone"].first, unittest.equals(arg_timeZone
)); | 3183 unittest.expect(queryMap["timeZone"].first, unittest.equals(arg_timeZone
)); |
3149 unittest.expect(core.DateTime.parse(queryMap["updatedMin"].first), unitt
est.equals(arg_updatedMin)); | 3184 unittest.expect(core.DateTime.parse(queryMap["updatedMin"].first), unitt
est.equals(arg_updatedMin)); |
3150 | 3185 |
3151 | 3186 |
3152 var h = { | 3187 var h = { |
3153 "content-type" : "application/json; charset=utf-8", | 3188 "content-type" : "application/json; charset=utf-8", |
3154 }; | 3189 }; |
3155 var resp = convert.JSON.encode(buildEvents()); | 3190 var resp = convert.JSON.encode(buildEvents()); |
3156 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 3191 return new async.Future.value(stringResponse(200, h, resp)); |
3157 }), true); | 3192 }), true); |
3158 res.list(arg_calendarId, alwaysIncludeEmail: arg_alwaysIncludeEmail, iCalU
ID: arg_iCalUID, maxAttendees: arg_maxAttendees, maxResults: arg_maxResults, ord
erBy: arg_orderBy, pageToken: arg_pageToken, privateExtendedProperty: arg_privat
eExtendedProperty, q: arg_q, sharedExtendedProperty: arg_sharedExtendedProperty,
showDeleted: arg_showDeleted, showHiddenInvitations: arg_showHiddenInvitations,
singleEvents: arg_singleEvents, syncToken: arg_syncToken, timeMax: arg_timeMax,
timeMin: arg_timeMin, timeZone: arg_timeZone, updatedMin: arg_updatedMin).then(
unittest.expectAsync(((api.Events response) { | 3193 res.list(arg_calendarId, alwaysIncludeEmail: arg_alwaysIncludeEmail, iCalU
ID: arg_iCalUID, maxAttendees: arg_maxAttendees, maxResults: arg_maxResults, ord
erBy: arg_orderBy, pageToken: arg_pageToken, privateExtendedProperty: arg_privat
eExtendedProperty, q: arg_q, sharedExtendedProperty: arg_sharedExtendedProperty,
showDeleted: arg_showDeleted, showHiddenInvitations: arg_showHiddenInvitations,
singleEvents: arg_singleEvents, syncToken: arg_syncToken, timeMax: arg_timeMax,
timeMin: arg_timeMin, timeZone: arg_timeZone, updatedMin: arg_updatedMin).then(
unittest.expectAsync(((api.Events response) { |
3159 checkEvents(response); | 3194 checkEvents(response); |
3160 }))); | 3195 }))); |
3161 }); | 3196 }); |
3162 | 3197 |
3163 unittest.test("method--move", () { | 3198 unittest.test("method--move", () { |
3164 | 3199 |
3165 var mock = new common_test.HttpServerMock(); | 3200 var mock = new HttpServerMock(); |
3166 api.EventsResourceApi res = new api.CalendarApi(mock).events; | 3201 api.EventsResourceApi res = new api.CalendarApi(mock).events; |
3167 var arg_calendarId = "foo"; | 3202 var arg_calendarId = "foo"; |
3168 var arg_eventId = "foo"; | 3203 var arg_eventId = "foo"; |
3169 var arg_destination = "foo"; | 3204 var arg_destination = "foo"; |
3170 var arg_sendNotifications = true; | 3205 var arg_sendNotifications = true; |
3171 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3206 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
3172 var path = (req.url).path; | 3207 var path = (req.url).path; |
3173 var pathOffset = 0; | 3208 var pathOffset = 0; |
3174 var index; | 3209 var index; |
3175 var subPart; | 3210 var subPart; |
(...skipping 35 matching lines...) Loading... |
3211 } | 3246 } |
3212 } | 3247 } |
3213 unittest.expect(queryMap["destination"].first, unittest.equals(arg_desti
nation)); | 3248 unittest.expect(queryMap["destination"].first, unittest.equals(arg_desti
nation)); |
3214 unittest.expect(queryMap["sendNotifications"].first, unittest.equals("$a
rg_sendNotifications")); | 3249 unittest.expect(queryMap["sendNotifications"].first, unittest.equals("$a
rg_sendNotifications")); |
3215 | 3250 |
3216 | 3251 |
3217 var h = { | 3252 var h = { |
3218 "content-type" : "application/json; charset=utf-8", | 3253 "content-type" : "application/json; charset=utf-8", |
3219 }; | 3254 }; |
3220 var resp = convert.JSON.encode(buildEvent()); | 3255 var resp = convert.JSON.encode(buildEvent()); |
3221 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 3256 return new async.Future.value(stringResponse(200, h, resp)); |
3222 }), true); | 3257 }), true); |
3223 res.move(arg_calendarId, arg_eventId, arg_destination, sendNotifications:
arg_sendNotifications).then(unittest.expectAsync(((api.Event response) { | 3258 res.move(arg_calendarId, arg_eventId, arg_destination, sendNotifications:
arg_sendNotifications).then(unittest.expectAsync(((api.Event response) { |
3224 checkEvent(response); | 3259 checkEvent(response); |
3225 }))); | 3260 }))); |
3226 }); | 3261 }); |
3227 | 3262 |
3228 unittest.test("method--patch", () { | 3263 unittest.test("method--patch", () { |
3229 | 3264 |
3230 var mock = new common_test.HttpServerMock(); | 3265 var mock = new HttpServerMock(); |
3231 api.EventsResourceApi res = new api.CalendarApi(mock).events; | 3266 api.EventsResourceApi res = new api.CalendarApi(mock).events; |
3232 var arg_request = buildEvent(); | 3267 var arg_request = buildEvent(); |
3233 var arg_calendarId = "foo"; | 3268 var arg_calendarId = "foo"; |
3234 var arg_eventId = "foo"; | 3269 var arg_eventId = "foo"; |
3235 var arg_alwaysIncludeEmail = true; | 3270 var arg_alwaysIncludeEmail = true; |
3236 var arg_maxAttendees = 42; | 3271 var arg_maxAttendees = 42; |
3237 var arg_sendNotifications = true; | 3272 var arg_sendNotifications = true; |
3238 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3273 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
3239 var obj = new api.Event.fromJson(json); | 3274 var obj = new api.Event.fromJson(json); |
3240 checkEvent(obj); | 3275 checkEvent(obj); |
(...skipping 37 matching lines...) Loading... |
3278 } | 3313 } |
3279 unittest.expect(queryMap["alwaysIncludeEmail"].first, unittest.equals("$
arg_alwaysIncludeEmail")); | 3314 unittest.expect(queryMap["alwaysIncludeEmail"].first, unittest.equals("$
arg_alwaysIncludeEmail")); |
3280 unittest.expect(core.int.parse(queryMap["maxAttendees"].first), unittest
.equals(arg_maxAttendees)); | 3315 unittest.expect(core.int.parse(queryMap["maxAttendees"].first), unittest
.equals(arg_maxAttendees)); |
3281 unittest.expect(queryMap["sendNotifications"].first, unittest.equals("$a
rg_sendNotifications")); | 3316 unittest.expect(queryMap["sendNotifications"].first, unittest.equals("$a
rg_sendNotifications")); |
3282 | 3317 |
3283 | 3318 |
3284 var h = { | 3319 var h = { |
3285 "content-type" : "application/json; charset=utf-8", | 3320 "content-type" : "application/json; charset=utf-8", |
3286 }; | 3321 }; |
3287 var resp = convert.JSON.encode(buildEvent()); | 3322 var resp = convert.JSON.encode(buildEvent()); |
3288 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 3323 return new async.Future.value(stringResponse(200, h, resp)); |
3289 }), true); | 3324 }), true); |
3290 res.patch(arg_request, arg_calendarId, arg_eventId, alwaysIncludeEmail: ar
g_alwaysIncludeEmail, maxAttendees: arg_maxAttendees, sendNotifications: arg_sen
dNotifications).then(unittest.expectAsync(((api.Event response) { | 3325 res.patch(arg_request, arg_calendarId, arg_eventId, alwaysIncludeEmail: ar
g_alwaysIncludeEmail, maxAttendees: arg_maxAttendees, sendNotifications: arg_sen
dNotifications).then(unittest.expectAsync(((api.Event response) { |
3291 checkEvent(response); | 3326 checkEvent(response); |
3292 }))); | 3327 }))); |
3293 }); | 3328 }); |
3294 | 3329 |
3295 unittest.test("method--quickAdd", () { | 3330 unittest.test("method--quickAdd", () { |
3296 | 3331 |
3297 var mock = new common_test.HttpServerMock(); | 3332 var mock = new HttpServerMock(); |
3298 api.EventsResourceApi res = new api.CalendarApi(mock).events; | 3333 api.EventsResourceApi res = new api.CalendarApi(mock).events; |
3299 var arg_calendarId = "foo"; | 3334 var arg_calendarId = "foo"; |
3300 var arg_text = "foo"; | 3335 var arg_text = "foo"; |
3301 var arg_sendNotifications = true; | 3336 var arg_sendNotifications = true; |
3302 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3337 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
3303 var path = (req.url).path; | 3338 var path = (req.url).path; |
3304 var pathOffset = 0; | 3339 var pathOffset = 0; |
3305 var index; | 3340 var index; |
3306 var subPart; | 3341 var subPart; |
3307 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3342 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
(...skipping 27 matching lines...) Loading... |
3335 } | 3370 } |
3336 } | 3371 } |
3337 unittest.expect(queryMap["text"].first, unittest.equals(arg_text)); | 3372 unittest.expect(queryMap["text"].first, unittest.equals(arg_text)); |
3338 unittest.expect(queryMap["sendNotifications"].first, unittest.equals("$a
rg_sendNotifications")); | 3373 unittest.expect(queryMap["sendNotifications"].first, unittest.equals("$a
rg_sendNotifications")); |
3339 | 3374 |
3340 | 3375 |
3341 var h = { | 3376 var h = { |
3342 "content-type" : "application/json; charset=utf-8", | 3377 "content-type" : "application/json; charset=utf-8", |
3343 }; | 3378 }; |
3344 var resp = convert.JSON.encode(buildEvent()); | 3379 var resp = convert.JSON.encode(buildEvent()); |
3345 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 3380 return new async.Future.value(stringResponse(200, h, resp)); |
3346 }), true); | 3381 }), true); |
3347 res.quickAdd(arg_calendarId, arg_text, sendNotifications: arg_sendNotifica
tions).then(unittest.expectAsync(((api.Event response) { | 3382 res.quickAdd(arg_calendarId, arg_text, sendNotifications: arg_sendNotifica
tions).then(unittest.expectAsync(((api.Event response) { |
3348 checkEvent(response); | 3383 checkEvent(response); |
3349 }))); | 3384 }))); |
3350 }); | 3385 }); |
3351 | 3386 |
3352 unittest.test("method--update", () { | 3387 unittest.test("method--update", () { |
3353 | 3388 |
3354 var mock = new common_test.HttpServerMock(); | 3389 var mock = new HttpServerMock(); |
3355 api.EventsResourceApi res = new api.CalendarApi(mock).events; | 3390 api.EventsResourceApi res = new api.CalendarApi(mock).events; |
3356 var arg_request = buildEvent(); | 3391 var arg_request = buildEvent(); |
3357 var arg_calendarId = "foo"; | 3392 var arg_calendarId = "foo"; |
3358 var arg_eventId = "foo"; | 3393 var arg_eventId = "foo"; |
3359 var arg_alwaysIncludeEmail = true; | 3394 var arg_alwaysIncludeEmail = true; |
3360 var arg_maxAttendees = 42; | 3395 var arg_maxAttendees = 42; |
3361 var arg_sendNotifications = true; | 3396 var arg_sendNotifications = true; |
3362 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3397 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
3363 var obj = new api.Event.fromJson(json); | 3398 var obj = new api.Event.fromJson(json); |
3364 checkEvent(obj); | 3399 checkEvent(obj); |
(...skipping 37 matching lines...) Loading... |
3402 } | 3437 } |
3403 unittest.expect(queryMap["alwaysIncludeEmail"].first, unittest.equals("$
arg_alwaysIncludeEmail")); | 3438 unittest.expect(queryMap["alwaysIncludeEmail"].first, unittest.equals("$
arg_alwaysIncludeEmail")); |
3404 unittest.expect(core.int.parse(queryMap["maxAttendees"].first), unittest
.equals(arg_maxAttendees)); | 3439 unittest.expect(core.int.parse(queryMap["maxAttendees"].first), unittest
.equals(arg_maxAttendees)); |
3405 unittest.expect(queryMap["sendNotifications"].first, unittest.equals("$a
rg_sendNotifications")); | 3440 unittest.expect(queryMap["sendNotifications"].first, unittest.equals("$a
rg_sendNotifications")); |
3406 | 3441 |
3407 | 3442 |
3408 var h = { | 3443 var h = { |
3409 "content-type" : "application/json; charset=utf-8", | 3444 "content-type" : "application/json; charset=utf-8", |
3410 }; | 3445 }; |
3411 var resp = convert.JSON.encode(buildEvent()); | 3446 var resp = convert.JSON.encode(buildEvent()); |
3412 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 3447 return new async.Future.value(stringResponse(200, h, resp)); |
3413 }), true); | 3448 }), true); |
3414 res.update(arg_request, arg_calendarId, arg_eventId, alwaysIncludeEmail: a
rg_alwaysIncludeEmail, maxAttendees: arg_maxAttendees, sendNotifications: arg_se
ndNotifications).then(unittest.expectAsync(((api.Event response) { | 3449 res.update(arg_request, arg_calendarId, arg_eventId, alwaysIncludeEmail: a
rg_alwaysIncludeEmail, maxAttendees: arg_maxAttendees, sendNotifications: arg_se
ndNotifications).then(unittest.expectAsync(((api.Event response) { |
3415 checkEvent(response); | 3450 checkEvent(response); |
3416 }))); | 3451 }))); |
3417 }); | 3452 }); |
3418 | 3453 |
3419 unittest.test("method--watch", () { | 3454 unittest.test("method--watch", () { |
3420 | 3455 |
3421 var mock = new common_test.HttpServerMock(); | 3456 var mock = new HttpServerMock(); |
3422 api.EventsResourceApi res = new api.CalendarApi(mock).events; | 3457 api.EventsResourceApi res = new api.CalendarApi(mock).events; |
3423 var arg_request = buildChannel(); | 3458 var arg_request = buildChannel(); |
3424 var arg_calendarId = "foo"; | 3459 var arg_calendarId = "foo"; |
3425 var arg_alwaysIncludeEmail = true; | 3460 var arg_alwaysIncludeEmail = true; |
3426 var arg_iCalUID = "foo"; | 3461 var arg_iCalUID = "foo"; |
3427 var arg_maxAttendees = 42; | 3462 var arg_maxAttendees = 42; |
3428 var arg_maxResults = 42; | 3463 var arg_maxResults = 42; |
3429 var arg_orderBy = "foo"; | 3464 var arg_orderBy = "foo"; |
3430 var arg_pageToken = "foo"; | 3465 var arg_pageToken = "foo"; |
3431 var arg_privateExtendedProperty = buildUnnamed1003(); | 3466 var arg_privateExtendedProperty = buildUnnamed395(); |
3432 var arg_q = "foo"; | 3467 var arg_q = "foo"; |
3433 var arg_sharedExtendedProperty = buildUnnamed1004(); | 3468 var arg_sharedExtendedProperty = buildUnnamed396(); |
3434 var arg_showDeleted = true; | 3469 var arg_showDeleted = true; |
3435 var arg_showHiddenInvitations = true; | 3470 var arg_showHiddenInvitations = true; |
3436 var arg_singleEvents = true; | 3471 var arg_singleEvents = true; |
3437 var arg_syncToken = "foo"; | 3472 var arg_syncToken = "foo"; |
3438 var arg_timeMax = core.DateTime.parse("2002-02-27T14:01:02"); | 3473 var arg_timeMax = core.DateTime.parse("2002-02-27T14:01:02"); |
3439 var arg_timeMin = core.DateTime.parse("2002-02-27T14:01:02"); | 3474 var arg_timeMin = core.DateTime.parse("2002-02-27T14:01:02"); |
3440 var arg_timeZone = "foo"; | 3475 var arg_timeZone = "foo"; |
3441 var arg_updatedMin = core.DateTime.parse("2002-02-27T14:01:02"); | 3476 var arg_updatedMin = core.DateTime.parse("2002-02-27T14:01:02"); |
3442 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3477 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
3443 var obj = new api.Channel.fromJson(json); | 3478 var obj = new api.Channel.fromJson(json); |
(...skipping 49 matching lines...) Loading... |
3493 unittest.expect(core.DateTime.parse(queryMap["timeMax"].first), unittest
.equals(arg_timeMax)); | 3528 unittest.expect(core.DateTime.parse(queryMap["timeMax"].first), unittest
.equals(arg_timeMax)); |
3494 unittest.expect(core.DateTime.parse(queryMap["timeMin"].first), unittest
.equals(arg_timeMin)); | 3529 unittest.expect(core.DateTime.parse(queryMap["timeMin"].first), unittest
.equals(arg_timeMin)); |
3495 unittest.expect(queryMap["timeZone"].first, unittest.equals(arg_timeZone
)); | 3530 unittest.expect(queryMap["timeZone"].first, unittest.equals(arg_timeZone
)); |
3496 unittest.expect(core.DateTime.parse(queryMap["updatedMin"].first), unitt
est.equals(arg_updatedMin)); | 3531 unittest.expect(core.DateTime.parse(queryMap["updatedMin"].first), unitt
est.equals(arg_updatedMin)); |
3497 | 3532 |
3498 | 3533 |
3499 var h = { | 3534 var h = { |
3500 "content-type" : "application/json; charset=utf-8", | 3535 "content-type" : "application/json; charset=utf-8", |
3501 }; | 3536 }; |
3502 var resp = convert.JSON.encode(buildChannel()); | 3537 var resp = convert.JSON.encode(buildChannel()); |
3503 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 3538 return new async.Future.value(stringResponse(200, h, resp)); |
3504 }), true); | 3539 }), true); |
3505 res.watch(arg_request, arg_calendarId, alwaysIncludeEmail: arg_alwaysInclu
deEmail, iCalUID: arg_iCalUID, maxAttendees: arg_maxAttendees, maxResults: arg_m
axResults, orderBy: arg_orderBy, pageToken: arg_pageToken, privateExtendedProper
ty: arg_privateExtendedProperty, q: arg_q, sharedExtendedProperty: arg_sharedExt
endedProperty, showDeleted: arg_showDeleted, showHiddenInvitations: arg_showHidd
enInvitations, singleEvents: arg_singleEvents, syncToken: arg_syncToken, timeMax
: arg_timeMax, timeMin: arg_timeMin, timeZone: arg_timeZone, updatedMin: arg_upd
atedMin).then(unittest.expectAsync(((api.Channel response) { | 3540 res.watch(arg_request, arg_calendarId, alwaysIncludeEmail: arg_alwaysInclu
deEmail, iCalUID: arg_iCalUID, maxAttendees: arg_maxAttendees, maxResults: arg_m
axResults, orderBy: arg_orderBy, pageToken: arg_pageToken, privateExtendedProper
ty: arg_privateExtendedProperty, q: arg_q, sharedExtendedProperty: arg_sharedExt
endedProperty, showDeleted: arg_showDeleted, showHiddenInvitations: arg_showHidd
enInvitations, singleEvents: arg_singleEvents, syncToken: arg_syncToken, timeMax
: arg_timeMax, timeMin: arg_timeMin, timeZone: arg_timeZone, updatedMin: arg_upd
atedMin).then(unittest.expectAsync(((api.Channel response) { |
3506 checkChannel(response); | 3541 checkChannel(response); |
3507 }))); | 3542 }))); |
3508 }); | 3543 }); |
3509 | 3544 |
3510 }); | 3545 }); |
3511 | 3546 |
3512 | 3547 |
3513 unittest.group("resource-FreebusyResourceApi", () { | 3548 unittest.group("resource-FreebusyResourceApi", () { |
3514 unittest.test("method--query", () { | 3549 unittest.test("method--query", () { |
3515 | 3550 |
3516 var mock = new common_test.HttpServerMock(); | 3551 var mock = new HttpServerMock(); |
3517 api.FreebusyResourceApi res = new api.CalendarApi(mock).freebusy; | 3552 api.FreebusyResourceApi res = new api.CalendarApi(mock).freebusy; |
3518 var arg_request = buildFreeBusyRequest(); | 3553 var arg_request = buildFreeBusyRequest(); |
3519 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3554 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
3520 var obj = new api.FreeBusyRequest.fromJson(json); | 3555 var obj = new api.FreeBusyRequest.fromJson(json); |
3521 checkFreeBusyRequest(obj); | 3556 checkFreeBusyRequest(obj); |
3522 | 3557 |
3523 var path = (req.url).path; | 3558 var path = (req.url).path; |
3524 var pathOffset = 0; | 3559 var pathOffset = 0; |
3525 var index; | 3560 var index; |
3526 var subPart; | 3561 var subPart; |
(...skipping 19 matching lines...) Loading... |
3546 var keyvalue = part.split("="); | 3581 var keyvalue = part.split("="); |
3547 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 3582 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
3548 } | 3583 } |
3549 } | 3584 } |
3550 | 3585 |
3551 | 3586 |
3552 var h = { | 3587 var h = { |
3553 "content-type" : "application/json; charset=utf-8", | 3588 "content-type" : "application/json; charset=utf-8", |
3554 }; | 3589 }; |
3555 var resp = convert.JSON.encode(buildFreeBusyResponse()); | 3590 var resp = convert.JSON.encode(buildFreeBusyResponse()); |
3556 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 3591 return new async.Future.value(stringResponse(200, h, resp)); |
3557 }), true); | 3592 }), true); |
3558 res.query(arg_request).then(unittest.expectAsync(((api.FreeBusyResponse re
sponse) { | 3593 res.query(arg_request).then(unittest.expectAsync(((api.FreeBusyResponse re
sponse) { |
3559 checkFreeBusyResponse(response); | 3594 checkFreeBusyResponse(response); |
3560 }))); | 3595 }))); |
3561 }); | 3596 }); |
3562 | 3597 |
3563 }); | 3598 }); |
3564 | 3599 |
3565 | 3600 |
3566 unittest.group("resource-SettingsResourceApi", () { | 3601 unittest.group("resource-SettingsResourceApi", () { |
3567 unittest.test("method--get", () { | 3602 unittest.test("method--get", () { |
3568 | 3603 |
3569 var mock = new common_test.HttpServerMock(); | 3604 var mock = new HttpServerMock(); |
3570 api.SettingsResourceApi res = new api.CalendarApi(mock).settings; | 3605 api.SettingsResourceApi res = new api.CalendarApi(mock).settings; |
3571 var arg_setting = "foo"; | 3606 var arg_setting = "foo"; |
3572 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3607 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
3573 var path = (req.url).path; | 3608 var path = (req.url).path; |
3574 var pathOffset = 0; | 3609 var pathOffset = 0; |
3575 var index; | 3610 var index; |
3576 var subPart; | 3611 var subPart; |
3577 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3612 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
3578 pathOffset += 1; | 3613 pathOffset += 1; |
3579 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("calendar/v3/")); | 3614 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("calendar/v3/")); |
(...skipping 19 matching lines...) Loading... |
3599 var keyvalue = part.split("="); | 3634 var keyvalue = part.split("="); |
3600 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 3635 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
3601 } | 3636 } |
3602 } | 3637 } |
3603 | 3638 |
3604 | 3639 |
3605 var h = { | 3640 var h = { |
3606 "content-type" : "application/json; charset=utf-8", | 3641 "content-type" : "application/json; charset=utf-8", |
3607 }; | 3642 }; |
3608 var resp = convert.JSON.encode(buildSetting()); | 3643 var resp = convert.JSON.encode(buildSetting()); |
3609 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 3644 return new async.Future.value(stringResponse(200, h, resp)); |
3610 }), true); | 3645 }), true); |
3611 res.get(arg_setting).then(unittest.expectAsync(((api.Setting response) { | 3646 res.get(arg_setting).then(unittest.expectAsync(((api.Setting response) { |
3612 checkSetting(response); | 3647 checkSetting(response); |
3613 }))); | 3648 }))); |
3614 }); | 3649 }); |
3615 | 3650 |
3616 unittest.test("method--list", () { | 3651 unittest.test("method--list", () { |
3617 | 3652 |
3618 var mock = new common_test.HttpServerMock(); | 3653 var mock = new HttpServerMock(); |
3619 api.SettingsResourceApi res = new api.CalendarApi(mock).settings; | 3654 api.SettingsResourceApi res = new api.CalendarApi(mock).settings; |
3620 var arg_maxResults = 42; | 3655 var arg_maxResults = 42; |
3621 var arg_pageToken = "foo"; | 3656 var arg_pageToken = "foo"; |
3622 var arg_syncToken = "foo"; | 3657 var arg_syncToken = "foo"; |
3623 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3658 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
3624 var path = (req.url).path; | 3659 var path = (req.url).path; |
3625 var pathOffset = 0; | 3660 var pathOffset = 0; |
3626 var index; | 3661 var index; |
3627 var subPart; | 3662 var subPart; |
3628 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3663 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
(...skipping 21 matching lines...) Loading... |
3650 } | 3685 } |
3651 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | 3686 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); |
3652 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 3687 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
3653 unittest.expect(queryMap["syncToken"].first, unittest.equals(arg_syncTok
en)); | 3688 unittest.expect(queryMap["syncToken"].first, unittest.equals(arg_syncTok
en)); |
3654 | 3689 |
3655 | 3690 |
3656 var h = { | 3691 var h = { |
3657 "content-type" : "application/json; charset=utf-8", | 3692 "content-type" : "application/json; charset=utf-8", |
3658 }; | 3693 }; |
3659 var resp = convert.JSON.encode(buildSettings()); | 3694 var resp = convert.JSON.encode(buildSettings()); |
3660 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 3695 return new async.Future.value(stringResponse(200, h, resp)); |
3661 }), true); | 3696 }), true); |
3662 res.list(maxResults: arg_maxResults, pageToken: arg_pageToken, syncToken:
arg_syncToken).then(unittest.expectAsync(((api.Settings response) { | 3697 res.list(maxResults: arg_maxResults, pageToken: arg_pageToken, syncToken:
arg_syncToken).then(unittest.expectAsync(((api.Settings response) { |
3663 checkSettings(response); | 3698 checkSettings(response); |
3664 }))); | 3699 }))); |
3665 }); | 3700 }); |
3666 | 3701 |
3667 unittest.test("method--watch", () { | 3702 unittest.test("method--watch", () { |
3668 | 3703 |
3669 var mock = new common_test.HttpServerMock(); | 3704 var mock = new HttpServerMock(); |
3670 api.SettingsResourceApi res = new api.CalendarApi(mock).settings; | 3705 api.SettingsResourceApi res = new api.CalendarApi(mock).settings; |
3671 var arg_request = buildChannel(); | 3706 var arg_request = buildChannel(); |
3672 var arg_maxResults = 42; | 3707 var arg_maxResults = 42; |
3673 var arg_pageToken = "foo"; | 3708 var arg_pageToken = "foo"; |
3674 var arg_syncToken = "foo"; | 3709 var arg_syncToken = "foo"; |
3675 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3710 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
3676 var obj = new api.Channel.fromJson(json); | 3711 var obj = new api.Channel.fromJson(json); |
3677 checkChannel(obj); | 3712 checkChannel(obj); |
3678 | 3713 |
3679 var path = (req.url).path; | 3714 var path = (req.url).path; |
(...skipping 25 matching lines...) Loading... |
3705 } | 3740 } |
3706 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | 3741 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); |
3707 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 3742 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
3708 unittest.expect(queryMap["syncToken"].first, unittest.equals(arg_syncTok
en)); | 3743 unittest.expect(queryMap["syncToken"].first, unittest.equals(arg_syncTok
en)); |
3709 | 3744 |
3710 | 3745 |
3711 var h = { | 3746 var h = { |
3712 "content-type" : "application/json; charset=utf-8", | 3747 "content-type" : "application/json; charset=utf-8", |
3713 }; | 3748 }; |
3714 var resp = convert.JSON.encode(buildChannel()); | 3749 var resp = convert.JSON.encode(buildChannel()); |
3715 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 3750 return new async.Future.value(stringResponse(200, h, resp)); |
3716 }), true); | 3751 }), true); |
3717 res.watch(arg_request, maxResults: arg_maxResults, pageToken: arg_pageToke
n, syncToken: arg_syncToken).then(unittest.expectAsync(((api.Channel response) { | 3752 res.watch(arg_request, maxResults: arg_maxResults, pageToken: arg_pageToke
n, syncToken: arg_syncToken).then(unittest.expectAsync(((api.Channel response) { |
3718 checkChannel(response); | 3753 checkChannel(response); |
3719 }))); | 3754 }))); |
3720 }); | 3755 }); |
3721 | 3756 |
3722 }); | 3757 }); |
3723 | 3758 |
3724 | 3759 |
3725 } | 3760 } |
3726 | 3761 |
OLD | NEW |