OLD | NEW |
1 library googleapis.appsactivity.v1.test; | 1 library googleapis.appsactivity.v1.test; |
2 | 2 |
3 import "dart:core" as core; | 3 import "dart:core" as core; |
4 import "dart:collection" as collection; | 4 import "dart:collection" as collection; |
5 import "dart:async" as async; | 5 import "dart:async" as async; |
6 import "dart:convert" as convert; | 6 import "dart:convert" as convert; |
7 | 7 |
8 import 'package:http/http.dart' as http; | 8 import 'package:http/http.dart' as http; |
9 import 'package:http/testing.dart' as http_testing; | 9 import 'package:http/testing.dart' as http_testing; |
10 import 'package:unittest/unittest.dart' as unittest; | 10 import 'package:unittest/unittest.dart' as unittest; |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 } | 44 } |
45 } | 45 } |
46 } | 46 } |
47 | 47 |
48 http.StreamedResponse stringResponse( | 48 http.StreamedResponse stringResponse( |
49 core.int status, core.Map headers, core.String body) { | 49 core.int status, core.Map headers, core.String body) { |
50 var stream = new async.Stream.fromIterable([convert.UTF8.encode(body)]); | 50 var stream = new async.Stream.fromIterable([convert.UTF8.encode(body)]); |
51 return new http.StreamedResponse(stream, status, headers: headers); | 51 return new http.StreamedResponse(stream, status, headers: headers); |
52 } | 52 } |
53 | 53 |
54 buildUnnamed1184() { | 54 buildUnnamed1210() { |
55 var o = new core.List<api.Event>(); | 55 var o = new core.List<api.Event>(); |
56 o.add(buildEvent()); | 56 o.add(buildEvent()); |
57 o.add(buildEvent()); | 57 o.add(buildEvent()); |
58 return o; | 58 return o; |
59 } | 59 } |
60 | 60 |
61 checkUnnamed1184(core.List<api.Event> o) { | 61 checkUnnamed1210(core.List<api.Event> o) { |
62 unittest.expect(o, unittest.hasLength(2)); | 62 unittest.expect(o, unittest.hasLength(2)); |
63 checkEvent(o[0]); | 63 checkEvent(o[0]); |
64 checkEvent(o[1]); | 64 checkEvent(o[1]); |
65 } | 65 } |
66 | 66 |
67 core.int buildCounterActivity = 0; | 67 core.int buildCounterActivity = 0; |
68 buildActivity() { | 68 buildActivity() { |
69 var o = new api.Activity(); | 69 var o = new api.Activity(); |
70 buildCounterActivity++; | 70 buildCounterActivity++; |
71 if (buildCounterActivity < 3) { | 71 if (buildCounterActivity < 3) { |
72 o.combinedEvent = buildEvent(); | 72 o.combinedEvent = buildEvent(); |
73 o.singleEvents = buildUnnamed1184(); | 73 o.singleEvents = buildUnnamed1210(); |
74 } | 74 } |
75 buildCounterActivity--; | 75 buildCounterActivity--; |
76 return o; | 76 return o; |
77 } | 77 } |
78 | 78 |
79 checkActivity(api.Activity o) { | 79 checkActivity(api.Activity o) { |
80 buildCounterActivity++; | 80 buildCounterActivity++; |
81 if (buildCounterActivity < 3) { | 81 if (buildCounterActivity < 3) { |
82 checkEvent(o.combinedEvent); | 82 checkEvent(o.combinedEvent); |
83 checkUnnamed1184(o.singleEvents); | 83 checkUnnamed1210(o.singleEvents); |
84 } | 84 } |
85 buildCounterActivity--; | 85 buildCounterActivity--; |
86 } | 86 } |
87 | 87 |
88 buildUnnamed1185() { | 88 buildUnnamed1211() { |
89 var o = new core.List<core.String>(); | 89 var o = new core.List<core.String>(); |
90 o.add("foo"); | 90 o.add("foo"); |
91 o.add("foo"); | 91 o.add("foo"); |
92 return o; | 92 return o; |
93 } | 93 } |
94 | 94 |
95 checkUnnamed1185(core.List<core.String> o) { | 95 checkUnnamed1211(core.List<core.String> o) { |
96 unittest.expect(o, unittest.hasLength(2)); | 96 unittest.expect(o, unittest.hasLength(2)); |
97 unittest.expect(o[0], unittest.equals('foo')); | 97 unittest.expect(o[0], unittest.equals('foo')); |
98 unittest.expect(o[1], unittest.equals('foo')); | 98 unittest.expect(o[1], unittest.equals('foo')); |
99 } | 99 } |
100 | 100 |
101 buildUnnamed1186() { | 101 buildUnnamed1212() { |
102 var o = new core.List<api.PermissionChange>(); | 102 var o = new core.List<api.PermissionChange>(); |
103 o.add(buildPermissionChange()); | 103 o.add(buildPermissionChange()); |
104 o.add(buildPermissionChange()); | 104 o.add(buildPermissionChange()); |
105 return o; | 105 return o; |
106 } | 106 } |
107 | 107 |
108 checkUnnamed1186(core.List<api.PermissionChange> o) { | 108 checkUnnamed1212(core.List<api.PermissionChange> o) { |
109 unittest.expect(o, unittest.hasLength(2)); | 109 unittest.expect(o, unittest.hasLength(2)); |
110 checkPermissionChange(o[0]); | 110 checkPermissionChange(o[0]); |
111 checkPermissionChange(o[1]); | 111 checkPermissionChange(o[1]); |
112 } | 112 } |
113 | 113 |
114 core.int buildCounterEvent = 0; | 114 core.int buildCounterEvent = 0; |
115 buildEvent() { | 115 buildEvent() { |
116 var o = new api.Event(); | 116 var o = new api.Event(); |
117 buildCounterEvent++; | 117 buildCounterEvent++; |
118 if (buildCounterEvent < 3) { | 118 if (buildCounterEvent < 3) { |
119 o.additionalEventTypes = buildUnnamed1185(); | 119 o.additionalEventTypes = buildUnnamed1211(); |
120 o.eventTimeMillis = "foo"; | 120 o.eventTimeMillis = "foo"; |
121 o.fromUserDeletion = true; | 121 o.fromUserDeletion = true; |
122 o.move = buildMove(); | 122 o.move = buildMove(); |
123 o.permissionChanges = buildUnnamed1186(); | 123 o.permissionChanges = buildUnnamed1212(); |
124 o.primaryEventType = "foo"; | 124 o.primaryEventType = "foo"; |
125 o.rename = buildRename(); | 125 o.rename = buildRename(); |
126 o.target = buildTarget(); | 126 o.target = buildTarget(); |
127 o.user = buildUser(); | 127 o.user = buildUser(); |
128 } | 128 } |
129 buildCounterEvent--; | 129 buildCounterEvent--; |
130 return o; | 130 return o; |
131 } | 131 } |
132 | 132 |
133 checkEvent(api.Event o) { | 133 checkEvent(api.Event o) { |
134 buildCounterEvent++; | 134 buildCounterEvent++; |
135 if (buildCounterEvent < 3) { | 135 if (buildCounterEvent < 3) { |
136 checkUnnamed1185(o.additionalEventTypes); | 136 checkUnnamed1211(o.additionalEventTypes); |
137 unittest.expect(o.eventTimeMillis, unittest.equals('foo')); | 137 unittest.expect(o.eventTimeMillis, unittest.equals('foo')); |
138 unittest.expect(o.fromUserDeletion, unittest.isTrue); | 138 unittest.expect(o.fromUserDeletion, unittest.isTrue); |
139 checkMove(o.move); | 139 checkMove(o.move); |
140 checkUnnamed1186(o.permissionChanges); | 140 checkUnnamed1212(o.permissionChanges); |
141 unittest.expect(o.primaryEventType, unittest.equals('foo')); | 141 unittest.expect(o.primaryEventType, unittest.equals('foo')); |
142 checkRename(o.rename); | 142 checkRename(o.rename); |
143 checkTarget(o.target); | 143 checkTarget(o.target); |
144 checkUser(o.user); | 144 checkUser(o.user); |
145 } | 145 } |
146 buildCounterEvent--; | 146 buildCounterEvent--; |
147 } | 147 } |
148 | 148 |
149 buildUnnamed1187() { | 149 buildUnnamed1213() { |
150 var o = new core.List<api.Activity>(); | 150 var o = new core.List<api.Activity>(); |
151 o.add(buildActivity()); | 151 o.add(buildActivity()); |
152 o.add(buildActivity()); | 152 o.add(buildActivity()); |
153 return o; | 153 return o; |
154 } | 154 } |
155 | 155 |
156 checkUnnamed1187(core.List<api.Activity> o) { | 156 checkUnnamed1213(core.List<api.Activity> o) { |
157 unittest.expect(o, unittest.hasLength(2)); | 157 unittest.expect(o, unittest.hasLength(2)); |
158 checkActivity(o[0]); | 158 checkActivity(o[0]); |
159 checkActivity(o[1]); | 159 checkActivity(o[1]); |
160 } | 160 } |
161 | 161 |
162 core.int buildCounterListActivitiesResponse = 0; | 162 core.int buildCounterListActivitiesResponse = 0; |
163 buildListActivitiesResponse() { | 163 buildListActivitiesResponse() { |
164 var o = new api.ListActivitiesResponse(); | 164 var o = new api.ListActivitiesResponse(); |
165 buildCounterListActivitiesResponse++; | 165 buildCounterListActivitiesResponse++; |
166 if (buildCounterListActivitiesResponse < 3) { | 166 if (buildCounterListActivitiesResponse < 3) { |
167 o.activities = buildUnnamed1187(); | 167 o.activities = buildUnnamed1213(); |
168 o.nextPageToken = "foo"; | 168 o.nextPageToken = "foo"; |
169 } | 169 } |
170 buildCounterListActivitiesResponse--; | 170 buildCounterListActivitiesResponse--; |
171 return o; | 171 return o; |
172 } | 172 } |
173 | 173 |
174 checkListActivitiesResponse(api.ListActivitiesResponse o) { | 174 checkListActivitiesResponse(api.ListActivitiesResponse o) { |
175 buildCounterListActivitiesResponse++; | 175 buildCounterListActivitiesResponse++; |
176 if (buildCounterListActivitiesResponse < 3) { | 176 if (buildCounterListActivitiesResponse < 3) { |
177 checkUnnamed1187(o.activities); | 177 checkUnnamed1213(o.activities); |
178 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 178 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
179 } | 179 } |
180 buildCounterListActivitiesResponse--; | 180 buildCounterListActivitiesResponse--; |
181 } | 181 } |
182 | 182 |
183 buildUnnamed1188() { | 183 buildUnnamed1214() { |
184 var o = new core.List<api.Parent>(); | 184 var o = new core.List<api.Parent>(); |
185 o.add(buildParent()); | 185 o.add(buildParent()); |
186 o.add(buildParent()); | 186 o.add(buildParent()); |
187 return o; | 187 return o; |
188 } | 188 } |
189 | 189 |
190 checkUnnamed1188(core.List<api.Parent> o) { | 190 checkUnnamed1214(core.List<api.Parent> o) { |
191 unittest.expect(o, unittest.hasLength(2)); | 191 unittest.expect(o, unittest.hasLength(2)); |
192 checkParent(o[0]); | 192 checkParent(o[0]); |
193 checkParent(o[1]); | 193 checkParent(o[1]); |
194 } | 194 } |
195 | 195 |
196 buildUnnamed1189() { | 196 buildUnnamed1215() { |
197 var o = new core.List<api.Parent>(); | 197 var o = new core.List<api.Parent>(); |
198 o.add(buildParent()); | 198 o.add(buildParent()); |
199 o.add(buildParent()); | 199 o.add(buildParent()); |
200 return o; | 200 return o; |
201 } | 201 } |
202 | 202 |
203 checkUnnamed1189(core.List<api.Parent> o) { | 203 checkUnnamed1215(core.List<api.Parent> o) { |
204 unittest.expect(o, unittest.hasLength(2)); | 204 unittest.expect(o, unittest.hasLength(2)); |
205 checkParent(o[0]); | 205 checkParent(o[0]); |
206 checkParent(o[1]); | 206 checkParent(o[1]); |
207 } | 207 } |
208 | 208 |
209 core.int buildCounterMove = 0; | 209 core.int buildCounterMove = 0; |
210 buildMove() { | 210 buildMove() { |
211 var o = new api.Move(); | 211 var o = new api.Move(); |
212 buildCounterMove++; | 212 buildCounterMove++; |
213 if (buildCounterMove < 3) { | 213 if (buildCounterMove < 3) { |
214 o.addedParents = buildUnnamed1188(); | 214 o.addedParents = buildUnnamed1214(); |
215 o.removedParents = buildUnnamed1189(); | 215 o.removedParents = buildUnnamed1215(); |
216 } | 216 } |
217 buildCounterMove--; | 217 buildCounterMove--; |
218 return o; | 218 return o; |
219 } | 219 } |
220 | 220 |
221 checkMove(api.Move o) { | 221 checkMove(api.Move o) { |
222 buildCounterMove++; | 222 buildCounterMove++; |
223 if (buildCounterMove < 3) { | 223 if (buildCounterMove < 3) { |
224 checkUnnamed1188(o.addedParents); | 224 checkUnnamed1214(o.addedParents); |
225 checkUnnamed1189(o.removedParents); | 225 checkUnnamed1215(o.removedParents); |
226 } | 226 } |
227 buildCounterMove--; | 227 buildCounterMove--; |
228 } | 228 } |
229 | 229 |
230 core.int buildCounterParent = 0; | 230 core.int buildCounterParent = 0; |
231 buildParent() { | 231 buildParent() { |
232 var o = new api.Parent(); | 232 var o = new api.Parent(); |
233 buildCounterParent++; | 233 buildCounterParent++; |
234 if (buildCounterParent < 3) { | 234 if (buildCounterParent < 3) { |
235 o.id = "foo"; | 235 o.id = "foo"; |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
272 unittest.expect(o.name, unittest.equals('foo')); | 272 unittest.expect(o.name, unittest.equals('foo')); |
273 unittest.expect(o.permissionId, unittest.equals('foo')); | 273 unittest.expect(o.permissionId, unittest.equals('foo')); |
274 unittest.expect(o.role, unittest.equals('foo')); | 274 unittest.expect(o.role, unittest.equals('foo')); |
275 unittest.expect(o.type, unittest.equals('foo')); | 275 unittest.expect(o.type, unittest.equals('foo')); |
276 checkUser(o.user); | 276 checkUser(o.user); |
277 unittest.expect(o.withLink, unittest.isTrue); | 277 unittest.expect(o.withLink, unittest.isTrue); |
278 } | 278 } |
279 buildCounterPermission--; | 279 buildCounterPermission--; |
280 } | 280 } |
281 | 281 |
282 buildUnnamed1190() { | 282 buildUnnamed1216() { |
283 var o = new core.List<api.Permission>(); | 283 var o = new core.List<api.Permission>(); |
284 o.add(buildPermission()); | 284 o.add(buildPermission()); |
285 o.add(buildPermission()); | 285 o.add(buildPermission()); |
286 return o; | 286 return o; |
287 } | 287 } |
288 | 288 |
289 checkUnnamed1190(core.List<api.Permission> o) { | 289 checkUnnamed1216(core.List<api.Permission> o) { |
290 unittest.expect(o, unittest.hasLength(2)); | 290 unittest.expect(o, unittest.hasLength(2)); |
291 checkPermission(o[0]); | 291 checkPermission(o[0]); |
292 checkPermission(o[1]); | 292 checkPermission(o[1]); |
293 } | 293 } |
294 | 294 |
295 buildUnnamed1191() { | 295 buildUnnamed1217() { |
296 var o = new core.List<api.Permission>(); | 296 var o = new core.List<api.Permission>(); |
297 o.add(buildPermission()); | 297 o.add(buildPermission()); |
298 o.add(buildPermission()); | 298 o.add(buildPermission()); |
299 return o; | 299 return o; |
300 } | 300 } |
301 | 301 |
302 checkUnnamed1191(core.List<api.Permission> o) { | 302 checkUnnamed1217(core.List<api.Permission> o) { |
303 unittest.expect(o, unittest.hasLength(2)); | 303 unittest.expect(o, unittest.hasLength(2)); |
304 checkPermission(o[0]); | 304 checkPermission(o[0]); |
305 checkPermission(o[1]); | 305 checkPermission(o[1]); |
306 } | 306 } |
307 | 307 |
308 core.int buildCounterPermissionChange = 0; | 308 core.int buildCounterPermissionChange = 0; |
309 buildPermissionChange() { | 309 buildPermissionChange() { |
310 var o = new api.PermissionChange(); | 310 var o = new api.PermissionChange(); |
311 buildCounterPermissionChange++; | 311 buildCounterPermissionChange++; |
312 if (buildCounterPermissionChange < 3) { | 312 if (buildCounterPermissionChange < 3) { |
313 o.addedPermissions = buildUnnamed1190(); | 313 o.addedPermissions = buildUnnamed1216(); |
314 o.removedPermissions = buildUnnamed1191(); | 314 o.removedPermissions = buildUnnamed1217(); |
315 } | 315 } |
316 buildCounterPermissionChange--; | 316 buildCounterPermissionChange--; |
317 return o; | 317 return o; |
318 } | 318 } |
319 | 319 |
320 checkPermissionChange(api.PermissionChange o) { | 320 checkPermissionChange(api.PermissionChange o) { |
321 buildCounterPermissionChange++; | 321 buildCounterPermissionChange++; |
322 if (buildCounterPermissionChange < 3) { | 322 if (buildCounterPermissionChange < 3) { |
323 checkUnnamed1190(o.addedPermissions); | 323 checkUnnamed1216(o.addedPermissions); |
324 checkUnnamed1191(o.removedPermissions); | 324 checkUnnamed1217(o.removedPermissions); |
325 } | 325 } |
326 buildCounterPermissionChange--; | 326 buildCounterPermissionChange--; |
327 } | 327 } |
328 | 328 |
329 core.int buildCounterPhoto = 0; | 329 core.int buildCounterPhoto = 0; |
330 buildPhoto() { | 330 buildPhoto() { |
331 var o = new api.Photo(); | 331 var o = new api.Photo(); |
332 buildCounterPhoto++; | 332 buildCounterPhoto++; |
333 if (buildCounterPhoto < 3) { | 333 if (buildCounterPhoto < 3) { |
334 o.url = "foo"; | 334 o.url = "foo"; |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
388 } | 388 } |
389 buildCounterTarget--; | 389 buildCounterTarget--; |
390 } | 390 } |
391 | 391 |
392 core.int buildCounterUser = 0; | 392 core.int buildCounterUser = 0; |
393 buildUser() { | 393 buildUser() { |
394 var o = new api.User(); | 394 var o = new api.User(); |
395 buildCounterUser++; | 395 buildCounterUser++; |
396 if (buildCounterUser < 3) { | 396 if (buildCounterUser < 3) { |
397 o.isDeleted = true; | 397 o.isDeleted = true; |
| 398 o.isMe = true; |
398 o.name = "foo"; | 399 o.name = "foo"; |
399 o.permissionId = "foo"; | 400 o.permissionId = "foo"; |
400 o.photo = buildPhoto(); | 401 o.photo = buildPhoto(); |
401 } | 402 } |
402 buildCounterUser--; | 403 buildCounterUser--; |
403 return o; | 404 return o; |
404 } | 405 } |
405 | 406 |
406 checkUser(api.User o) { | 407 checkUser(api.User o) { |
407 buildCounterUser++; | 408 buildCounterUser++; |
408 if (buildCounterUser < 3) { | 409 if (buildCounterUser < 3) { |
409 unittest.expect(o.isDeleted, unittest.isTrue); | 410 unittest.expect(o.isDeleted, unittest.isTrue); |
| 411 unittest.expect(o.isMe, unittest.isTrue); |
410 unittest.expect(o.name, unittest.equals('foo')); | 412 unittest.expect(o.name, unittest.equals('foo')); |
411 unittest.expect(o.permissionId, unittest.equals('foo')); | 413 unittest.expect(o.permissionId, unittest.equals('foo')); |
412 checkPhoto(o.photo); | 414 checkPhoto(o.photo); |
413 } | 415 } |
414 buildCounterUser--; | 416 buildCounterUser--; |
415 } | 417 } |
416 | 418 |
417 | 419 |
418 main() { | 420 main() { |
419 unittest.group("obj-schema-Activity", () { | 421 unittest.group("obj-schema-Activity", () { |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
573 res.list(drive_ancestorId: arg_drive_ancestorId, drive_fileId: arg_drive_f
ileId, groupingStrategy: arg_groupingStrategy, pageSize: arg_pageSize, pageToken
: arg_pageToken, source: arg_source, userId: arg_userId).then(unittest.expectAsy
nc(((api.ListActivitiesResponse response) { | 575 res.list(drive_ancestorId: arg_drive_ancestorId, drive_fileId: arg_drive_f
ileId, groupingStrategy: arg_groupingStrategy, pageSize: arg_pageSize, pageToken
: arg_pageToken, source: arg_source, userId: arg_userId).then(unittest.expectAsy
nc(((api.ListActivitiesResponse response) { |
574 checkListActivitiesResponse(response); | 576 checkListActivitiesResponse(response); |
575 }))); | 577 }))); |
576 }); | 578 }); |
577 | 579 |
578 }); | 580 }); |
579 | 581 |
580 | 582 |
581 } | 583 } |
582 | 584 |
OLD | NEW |