OLD | NEW |
1 library googleapis.classroom.v1.test; | 1 library googleapis.classroom.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 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 buildCounterInvitation++; | 165 buildCounterInvitation++; |
166 if (buildCounterInvitation < 3) { | 166 if (buildCounterInvitation < 3) { |
167 unittest.expect(o.courseId, unittest.equals('foo')); | 167 unittest.expect(o.courseId, unittest.equals('foo')); |
168 unittest.expect(o.id, unittest.equals('foo')); | 168 unittest.expect(o.id, unittest.equals('foo')); |
169 unittest.expect(o.role, unittest.equals('foo')); | 169 unittest.expect(o.role, unittest.equals('foo')); |
170 unittest.expect(o.userId, unittest.equals('foo')); | 170 unittest.expect(o.userId, unittest.equals('foo')); |
171 } | 171 } |
172 buildCounterInvitation--; | 172 buildCounterInvitation--; |
173 } | 173 } |
174 | 174 |
175 buildUnnamed491() { | 175 buildUnnamed738() { |
176 var o = new core.List<api.CourseAlias>(); | 176 var o = new core.List<api.CourseAlias>(); |
177 o.add(buildCourseAlias()); | 177 o.add(buildCourseAlias()); |
178 o.add(buildCourseAlias()); | 178 o.add(buildCourseAlias()); |
179 return o; | 179 return o; |
180 } | 180 } |
181 | 181 |
182 checkUnnamed491(core.List<api.CourseAlias> o) { | 182 checkUnnamed738(core.List<api.CourseAlias> o) { |
183 unittest.expect(o, unittest.hasLength(2)); | 183 unittest.expect(o, unittest.hasLength(2)); |
184 checkCourseAlias(o[0]); | 184 checkCourseAlias(o[0]); |
185 checkCourseAlias(o[1]); | 185 checkCourseAlias(o[1]); |
186 } | 186 } |
187 | 187 |
188 core.int buildCounterListCourseAliasesResponse = 0; | 188 core.int buildCounterListCourseAliasesResponse = 0; |
189 buildListCourseAliasesResponse() { | 189 buildListCourseAliasesResponse() { |
190 var o = new api.ListCourseAliasesResponse(); | 190 var o = new api.ListCourseAliasesResponse(); |
191 buildCounterListCourseAliasesResponse++; | 191 buildCounterListCourseAliasesResponse++; |
192 if (buildCounterListCourseAliasesResponse < 3) { | 192 if (buildCounterListCourseAliasesResponse < 3) { |
193 o.aliases = buildUnnamed491(); | 193 o.aliases = buildUnnamed738(); |
194 o.nextPageToken = "foo"; | 194 o.nextPageToken = "foo"; |
195 } | 195 } |
196 buildCounterListCourseAliasesResponse--; | 196 buildCounterListCourseAliasesResponse--; |
197 return o; | 197 return o; |
198 } | 198 } |
199 | 199 |
200 checkListCourseAliasesResponse(api.ListCourseAliasesResponse o) { | 200 checkListCourseAliasesResponse(api.ListCourseAliasesResponse o) { |
201 buildCounterListCourseAliasesResponse++; | 201 buildCounterListCourseAliasesResponse++; |
202 if (buildCounterListCourseAliasesResponse < 3) { | 202 if (buildCounterListCourseAliasesResponse < 3) { |
203 checkUnnamed491(o.aliases); | 203 checkUnnamed738(o.aliases); |
204 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 204 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
205 } | 205 } |
206 buildCounterListCourseAliasesResponse--; | 206 buildCounterListCourseAliasesResponse--; |
207 } | 207 } |
208 | 208 |
209 buildUnnamed492() { | 209 buildUnnamed739() { |
210 var o = new core.List<api.Course>(); | 210 var o = new core.List<api.Course>(); |
211 o.add(buildCourse()); | 211 o.add(buildCourse()); |
212 o.add(buildCourse()); | 212 o.add(buildCourse()); |
213 return o; | 213 return o; |
214 } | 214 } |
215 | 215 |
216 checkUnnamed492(core.List<api.Course> o) { | 216 checkUnnamed739(core.List<api.Course> o) { |
217 unittest.expect(o, unittest.hasLength(2)); | 217 unittest.expect(o, unittest.hasLength(2)); |
218 checkCourse(o[0]); | 218 checkCourse(o[0]); |
219 checkCourse(o[1]); | 219 checkCourse(o[1]); |
220 } | 220 } |
221 | 221 |
222 core.int buildCounterListCoursesResponse = 0; | 222 core.int buildCounterListCoursesResponse = 0; |
223 buildListCoursesResponse() { | 223 buildListCoursesResponse() { |
224 var o = new api.ListCoursesResponse(); | 224 var o = new api.ListCoursesResponse(); |
225 buildCounterListCoursesResponse++; | 225 buildCounterListCoursesResponse++; |
226 if (buildCounterListCoursesResponse < 3) { | 226 if (buildCounterListCoursesResponse < 3) { |
227 o.courses = buildUnnamed492(); | 227 o.courses = buildUnnamed739(); |
228 o.nextPageToken = "foo"; | 228 o.nextPageToken = "foo"; |
229 } | 229 } |
230 buildCounterListCoursesResponse--; | 230 buildCounterListCoursesResponse--; |
231 return o; | 231 return o; |
232 } | 232 } |
233 | 233 |
234 checkListCoursesResponse(api.ListCoursesResponse o) { | 234 checkListCoursesResponse(api.ListCoursesResponse o) { |
235 buildCounterListCoursesResponse++; | 235 buildCounterListCoursesResponse++; |
236 if (buildCounterListCoursesResponse < 3) { | 236 if (buildCounterListCoursesResponse < 3) { |
237 checkUnnamed492(o.courses); | 237 checkUnnamed739(o.courses); |
238 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 238 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
239 } | 239 } |
240 buildCounterListCoursesResponse--; | 240 buildCounterListCoursesResponse--; |
241 } | 241 } |
242 | 242 |
243 buildUnnamed493() { | 243 buildUnnamed740() { |
244 var o = new core.List<api.Invitation>(); | 244 var o = new core.List<api.Invitation>(); |
245 o.add(buildInvitation()); | 245 o.add(buildInvitation()); |
246 o.add(buildInvitation()); | 246 o.add(buildInvitation()); |
247 return o; | 247 return o; |
248 } | 248 } |
249 | 249 |
250 checkUnnamed493(core.List<api.Invitation> o) { | 250 checkUnnamed740(core.List<api.Invitation> o) { |
251 unittest.expect(o, unittest.hasLength(2)); | 251 unittest.expect(o, unittest.hasLength(2)); |
252 checkInvitation(o[0]); | 252 checkInvitation(o[0]); |
253 checkInvitation(o[1]); | 253 checkInvitation(o[1]); |
254 } | 254 } |
255 | 255 |
256 core.int buildCounterListInvitationsResponse = 0; | 256 core.int buildCounterListInvitationsResponse = 0; |
257 buildListInvitationsResponse() { | 257 buildListInvitationsResponse() { |
258 var o = new api.ListInvitationsResponse(); | 258 var o = new api.ListInvitationsResponse(); |
259 buildCounterListInvitationsResponse++; | 259 buildCounterListInvitationsResponse++; |
260 if (buildCounterListInvitationsResponse < 3) { | 260 if (buildCounterListInvitationsResponse < 3) { |
261 o.invitations = buildUnnamed493(); | 261 o.invitations = buildUnnamed740(); |
262 o.nextPageToken = "foo"; | 262 o.nextPageToken = "foo"; |
263 } | 263 } |
264 buildCounterListInvitationsResponse--; | 264 buildCounterListInvitationsResponse--; |
265 return o; | 265 return o; |
266 } | 266 } |
267 | 267 |
268 checkListInvitationsResponse(api.ListInvitationsResponse o) { | 268 checkListInvitationsResponse(api.ListInvitationsResponse o) { |
269 buildCounterListInvitationsResponse++; | 269 buildCounterListInvitationsResponse++; |
270 if (buildCounterListInvitationsResponse < 3) { | 270 if (buildCounterListInvitationsResponse < 3) { |
271 checkUnnamed493(o.invitations); | 271 checkUnnamed740(o.invitations); |
272 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 272 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
273 } | 273 } |
274 buildCounterListInvitationsResponse--; | 274 buildCounterListInvitationsResponse--; |
275 } | 275 } |
276 | 276 |
277 buildUnnamed494() { | 277 buildUnnamed741() { |
278 var o = new core.List<api.Student>(); | 278 var o = new core.List<api.Student>(); |
279 o.add(buildStudent()); | 279 o.add(buildStudent()); |
280 o.add(buildStudent()); | 280 o.add(buildStudent()); |
281 return o; | 281 return o; |
282 } | 282 } |
283 | 283 |
284 checkUnnamed494(core.List<api.Student> o) { | 284 checkUnnamed741(core.List<api.Student> o) { |
285 unittest.expect(o, unittest.hasLength(2)); | 285 unittest.expect(o, unittest.hasLength(2)); |
286 checkStudent(o[0]); | 286 checkStudent(o[0]); |
287 checkStudent(o[1]); | 287 checkStudent(o[1]); |
288 } | 288 } |
289 | 289 |
290 core.int buildCounterListStudentsResponse = 0; | 290 core.int buildCounterListStudentsResponse = 0; |
291 buildListStudentsResponse() { | 291 buildListStudentsResponse() { |
292 var o = new api.ListStudentsResponse(); | 292 var o = new api.ListStudentsResponse(); |
293 buildCounterListStudentsResponse++; | 293 buildCounterListStudentsResponse++; |
294 if (buildCounterListStudentsResponse < 3) { | 294 if (buildCounterListStudentsResponse < 3) { |
295 o.nextPageToken = "foo"; | 295 o.nextPageToken = "foo"; |
296 o.students = buildUnnamed494(); | 296 o.students = buildUnnamed741(); |
297 } | 297 } |
298 buildCounterListStudentsResponse--; | 298 buildCounterListStudentsResponse--; |
299 return o; | 299 return o; |
300 } | 300 } |
301 | 301 |
302 checkListStudentsResponse(api.ListStudentsResponse o) { | 302 checkListStudentsResponse(api.ListStudentsResponse o) { |
303 buildCounterListStudentsResponse++; | 303 buildCounterListStudentsResponse++; |
304 if (buildCounterListStudentsResponse < 3) { | 304 if (buildCounterListStudentsResponse < 3) { |
305 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 305 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
306 checkUnnamed494(o.students); | 306 checkUnnamed741(o.students); |
307 } | 307 } |
308 buildCounterListStudentsResponse--; | 308 buildCounterListStudentsResponse--; |
309 } | 309 } |
310 | 310 |
311 buildUnnamed495() { | 311 buildUnnamed742() { |
312 var o = new core.List<api.Teacher>(); | 312 var o = new core.List<api.Teacher>(); |
313 o.add(buildTeacher()); | 313 o.add(buildTeacher()); |
314 o.add(buildTeacher()); | 314 o.add(buildTeacher()); |
315 return o; | 315 return o; |
316 } | 316 } |
317 | 317 |
318 checkUnnamed495(core.List<api.Teacher> o) { | 318 checkUnnamed742(core.List<api.Teacher> o) { |
319 unittest.expect(o, unittest.hasLength(2)); | 319 unittest.expect(o, unittest.hasLength(2)); |
320 checkTeacher(o[0]); | 320 checkTeacher(o[0]); |
321 checkTeacher(o[1]); | 321 checkTeacher(o[1]); |
322 } | 322 } |
323 | 323 |
324 core.int buildCounterListTeachersResponse = 0; | 324 core.int buildCounterListTeachersResponse = 0; |
325 buildListTeachersResponse() { | 325 buildListTeachersResponse() { |
326 var o = new api.ListTeachersResponse(); | 326 var o = new api.ListTeachersResponse(); |
327 buildCounterListTeachersResponse++; | 327 buildCounterListTeachersResponse++; |
328 if (buildCounterListTeachersResponse < 3) { | 328 if (buildCounterListTeachersResponse < 3) { |
329 o.nextPageToken = "foo"; | 329 o.nextPageToken = "foo"; |
330 o.teachers = buildUnnamed495(); | 330 o.teachers = buildUnnamed742(); |
331 } | 331 } |
332 buildCounterListTeachersResponse--; | 332 buildCounterListTeachersResponse--; |
333 return o; | 333 return o; |
334 } | 334 } |
335 | 335 |
336 checkListTeachersResponse(api.ListTeachersResponse o) { | 336 checkListTeachersResponse(api.ListTeachersResponse o) { |
337 buildCounterListTeachersResponse++; | 337 buildCounterListTeachersResponse++; |
338 if (buildCounterListTeachersResponse < 3) { | 338 if (buildCounterListTeachersResponse < 3) { |
339 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 339 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
340 checkUnnamed495(o.teachers); | 340 checkUnnamed742(o.teachers); |
341 } | 341 } |
342 buildCounterListTeachersResponse--; | 342 buildCounterListTeachersResponse--; |
343 } | 343 } |
344 | 344 |
345 core.int buildCounterName = 0; | 345 core.int buildCounterName = 0; |
346 buildName() { | 346 buildName() { |
347 var o = new api.Name(); | 347 var o = new api.Name(); |
348 buildCounterName++; | 348 buildCounterName++; |
349 if (buildCounterName < 3) { | 349 if (buildCounterName < 3) { |
350 o.familyName = "foo"; | 350 o.familyName = "foo"; |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
404 checkTeacher(api.Teacher o) { | 404 checkTeacher(api.Teacher o) { |
405 buildCounterTeacher++; | 405 buildCounterTeacher++; |
406 if (buildCounterTeacher < 3) { | 406 if (buildCounterTeacher < 3) { |
407 unittest.expect(o.courseId, unittest.equals('foo')); | 407 unittest.expect(o.courseId, unittest.equals('foo')); |
408 checkUserProfile(o.profile); | 408 checkUserProfile(o.profile); |
409 unittest.expect(o.userId, unittest.equals('foo')); | 409 unittest.expect(o.userId, unittest.equals('foo')); |
410 } | 410 } |
411 buildCounterTeacher--; | 411 buildCounterTeacher--; |
412 } | 412 } |
413 | 413 |
414 buildUnnamed496() { | 414 buildUnnamed743() { |
415 var o = new core.List<api.GlobalPermission>(); | 415 var o = new core.List<api.GlobalPermission>(); |
416 o.add(buildGlobalPermission()); | 416 o.add(buildGlobalPermission()); |
417 o.add(buildGlobalPermission()); | 417 o.add(buildGlobalPermission()); |
418 return o; | 418 return o; |
419 } | 419 } |
420 | 420 |
421 checkUnnamed496(core.List<api.GlobalPermission> o) { | 421 checkUnnamed743(core.List<api.GlobalPermission> o) { |
422 unittest.expect(o, unittest.hasLength(2)); | 422 unittest.expect(o, unittest.hasLength(2)); |
423 checkGlobalPermission(o[0]); | 423 checkGlobalPermission(o[0]); |
424 checkGlobalPermission(o[1]); | 424 checkGlobalPermission(o[1]); |
425 } | 425 } |
426 | 426 |
427 core.int buildCounterUserProfile = 0; | 427 core.int buildCounterUserProfile = 0; |
428 buildUserProfile() { | 428 buildUserProfile() { |
429 var o = new api.UserProfile(); | 429 var o = new api.UserProfile(); |
430 buildCounterUserProfile++; | 430 buildCounterUserProfile++; |
431 if (buildCounterUserProfile < 3) { | 431 if (buildCounterUserProfile < 3) { |
432 o.emailAddress = "foo"; | 432 o.emailAddress = "foo"; |
433 o.id = "foo"; | 433 o.id = "foo"; |
434 o.name = buildName(); | 434 o.name = buildName(); |
435 o.permissions = buildUnnamed496(); | 435 o.permissions = buildUnnamed743(); |
436 o.photoUrl = "foo"; | 436 o.photoUrl = "foo"; |
437 } | 437 } |
438 buildCounterUserProfile--; | 438 buildCounterUserProfile--; |
439 return o; | 439 return o; |
440 } | 440 } |
441 | 441 |
442 checkUserProfile(api.UserProfile o) { | 442 checkUserProfile(api.UserProfile o) { |
443 buildCounterUserProfile++; | 443 buildCounterUserProfile++; |
444 if (buildCounterUserProfile < 3) { | 444 if (buildCounterUserProfile < 3) { |
445 unittest.expect(o.emailAddress, unittest.equals('foo')); | 445 unittest.expect(o.emailAddress, unittest.equals('foo')); |
446 unittest.expect(o.id, unittest.equals('foo')); | 446 unittest.expect(o.id, unittest.equals('foo')); |
447 checkName(o.name); | 447 checkName(o.name); |
448 checkUnnamed496(o.permissions); | 448 checkUnnamed743(o.permissions); |
449 unittest.expect(o.photoUrl, unittest.equals('foo')); | 449 unittest.expect(o.photoUrl, unittest.equals('foo')); |
450 } | 450 } |
451 buildCounterUserProfile--; | 451 buildCounterUserProfile--; |
452 } | 452 } |
453 | 453 |
454 | 454 |
455 main() { | 455 main() { |
456 unittest.group("obj-schema-Course", () { | 456 unittest.group("obj-schema-Course", () { |
457 unittest.test("to-json--from-json", () { | 457 unittest.test("to-json--from-json", () { |
458 var o = buildCourse(); | 458 var o = buildCourse(); |
(...skipping 1332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1791 res.get(arg_userId).then(unittest.expectAsync(((api.UserProfile response)
{ | 1791 res.get(arg_userId).then(unittest.expectAsync(((api.UserProfile response)
{ |
1792 checkUserProfile(response); | 1792 checkUserProfile(response); |
1793 }))); | 1793 }))); |
1794 }); | 1794 }); |
1795 | 1795 |
1796 }); | 1796 }); |
1797 | 1797 |
1798 | 1798 |
1799 } | 1799 } |
1800 | 1800 |
OLD | NEW |