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 buildUnnamed961() { | 54 buildUnnamed968() { |
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 checkUnnamed961(core.List<api.Event> o) { | 61 checkUnnamed968(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 = buildUnnamed961(); | 73 o.singleEvents = buildUnnamed968(); |
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 checkUnnamed961(o.singleEvents); | 83 checkUnnamed968(o.singleEvents); |
84 } | 84 } |
85 buildCounterActivity--; | 85 buildCounterActivity--; |
86 } | 86 } |
87 | 87 |
88 buildUnnamed962() { | 88 buildUnnamed969() { |
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 checkUnnamed962(core.List<core.String> o) { | 95 checkUnnamed969(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 buildUnnamed963() { | 101 buildUnnamed970() { |
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 checkUnnamed963(core.List<api.PermissionChange> o) { | 108 checkUnnamed970(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 = buildUnnamed962(); | 119 o.additionalEventTypes = buildUnnamed969(); |
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 = buildUnnamed963(); | 123 o.permissionChanges = buildUnnamed970(); |
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 checkUnnamed962(o.additionalEventTypes); | 136 checkUnnamed969(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 checkUnnamed963(o.permissionChanges); | 140 checkUnnamed970(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 buildUnnamed964() { | 149 buildUnnamed971() { |
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 checkUnnamed964(core.List<api.Activity> o) { | 156 checkUnnamed971(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 = buildUnnamed964(); | 167 o.activities = buildUnnamed971(); |
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 checkUnnamed964(o.activities); | 177 checkUnnamed971(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 buildUnnamed965() { | 183 buildUnnamed972() { |
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 checkUnnamed965(core.List<api.Parent> o) { | 190 checkUnnamed972(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 buildUnnamed966() { | 196 buildUnnamed973() { |
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 checkUnnamed966(core.List<api.Parent> o) { | 203 checkUnnamed973(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 = buildUnnamed965(); | 214 o.addedParents = buildUnnamed972(); |
215 o.removedParents = buildUnnamed966(); | 215 o.removedParents = buildUnnamed973(); |
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 checkUnnamed965(o.addedParents); | 224 checkUnnamed972(o.addedParents); |
225 checkUnnamed966(o.removedParents); | 225 checkUnnamed973(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 buildUnnamed967() { | 282 buildUnnamed974() { |
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 checkUnnamed967(core.List<api.Permission> o) { | 289 checkUnnamed974(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 buildUnnamed968() { | 295 buildUnnamed975() { |
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 checkUnnamed968(core.List<api.Permission> o) { | 302 checkUnnamed975(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 = buildUnnamed967(); | 313 o.addedPermissions = buildUnnamed974(); |
314 o.removedPermissions = buildUnnamed968(); | 314 o.removedPermissions = buildUnnamed975(); |
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 checkUnnamed967(o.addedPermissions); | 323 checkUnnamed974(o.addedPermissions); |
324 checkUnnamed968(o.removedPermissions); | 324 checkUnnamed975(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 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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) { | 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) { |
576 checkListActivitiesResponse(response); | 576 checkListActivitiesResponse(response); |
577 }))); | 577 }))); |
578 }); | 578 }); |
579 | 579 |
580 }); | 580 }); |
581 | 581 |
582 | 582 |
583 } | 583 } |
584 | 584 |
OLD | NEW |