Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(491)

Side by Side Diff: generated/googleapis/test/classroom/v1_test.dart

Issue 2281923002: Api-roll 41: 2016-08-26 (Closed) Base URL: git@github.com:dart-lang/googleapis.git@master
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 } 63 }
64 64
65 checkAssignment(api.Assignment o) { 65 checkAssignment(api.Assignment o) {
66 buildCounterAssignment++; 66 buildCounterAssignment++;
67 if (buildCounterAssignment < 3) { 67 if (buildCounterAssignment < 3) {
68 checkDriveFolder(o.studentWorkFolder); 68 checkDriveFolder(o.studentWorkFolder);
69 } 69 }
70 buildCounterAssignment--; 70 buildCounterAssignment--;
71 } 71 }
72 72
73 buildUnnamed658() { 73 buildUnnamed879() {
74 var o = new core.List<api.Attachment>(); 74 var o = new core.List<api.Attachment>();
75 o.add(buildAttachment()); 75 o.add(buildAttachment());
76 o.add(buildAttachment()); 76 o.add(buildAttachment());
77 return o; 77 return o;
78 } 78 }
79 79
80 checkUnnamed658(core.List<api.Attachment> o) { 80 checkUnnamed879(core.List<api.Attachment> o) {
81 unittest.expect(o, unittest.hasLength(2)); 81 unittest.expect(o, unittest.hasLength(2));
82 checkAttachment(o[0]); 82 checkAttachment(o[0]);
83 checkAttachment(o[1]); 83 checkAttachment(o[1]);
84 } 84 }
85 85
86 core.int buildCounterAssignmentSubmission = 0; 86 core.int buildCounterAssignmentSubmission = 0;
87 buildAssignmentSubmission() { 87 buildAssignmentSubmission() {
88 var o = new api.AssignmentSubmission(); 88 var o = new api.AssignmentSubmission();
89 buildCounterAssignmentSubmission++; 89 buildCounterAssignmentSubmission++;
90 if (buildCounterAssignmentSubmission < 3) { 90 if (buildCounterAssignmentSubmission < 3) {
91 o.attachments = buildUnnamed658(); 91 o.attachments = buildUnnamed879();
92 } 92 }
93 buildCounterAssignmentSubmission--; 93 buildCounterAssignmentSubmission--;
94 return o; 94 return o;
95 } 95 }
96 96
97 checkAssignmentSubmission(api.AssignmentSubmission o) { 97 checkAssignmentSubmission(api.AssignmentSubmission o) {
98 buildCounterAssignmentSubmission++; 98 buildCounterAssignmentSubmission++;
99 if (buildCounterAssignmentSubmission < 3) { 99 if (buildCounterAssignmentSubmission < 3) {
100 checkUnnamed658(o.attachments); 100 checkUnnamed879(o.attachments);
101 } 101 }
102 buildCounterAssignmentSubmission--; 102 buildCounterAssignmentSubmission--;
103 } 103 }
104 104
105 core.int buildCounterAttachment = 0; 105 core.int buildCounterAttachment = 0;
106 buildAttachment() { 106 buildAttachment() {
107 var o = new api.Attachment(); 107 var o = new api.Attachment();
108 buildCounterAttachment++; 108 buildCounterAttachment++;
109 if (buildCounterAttachment < 3) { 109 if (buildCounterAttachment < 3) {
110 o.driveFile = buildDriveFile(); 110 o.driveFile = buildDriveFile();
111 o.form = buildForm(); 111 o.form = buildForm();
112 o.link = buildLink(); 112 o.link = buildLink();
113 o.youTubeVideo = buildYouTubeVideo(); 113 o.youTubeVideo = buildYouTubeVideo();
114 } 114 }
115 buildCounterAttachment--; 115 buildCounterAttachment--;
116 return o; 116 return o;
117 } 117 }
118 118
119 checkAttachment(api.Attachment o) { 119 checkAttachment(api.Attachment o) {
120 buildCounterAttachment++; 120 buildCounterAttachment++;
121 if (buildCounterAttachment < 3) { 121 if (buildCounterAttachment < 3) {
122 checkDriveFile(o.driveFile); 122 checkDriveFile(o.driveFile);
123 checkForm(o.form); 123 checkForm(o.form);
124 checkLink(o.link); 124 checkLink(o.link);
125 checkYouTubeVideo(o.youTubeVideo); 125 checkYouTubeVideo(o.youTubeVideo);
126 } 126 }
127 buildCounterAttachment--; 127 buildCounterAttachment--;
128 } 128 }
129 129
130 buildUnnamed659() { 130 buildUnnamed880() {
131 var o = new core.List<api.CourseMaterialSet>(); 131 var o = new core.List<api.CourseMaterialSet>();
132 o.add(buildCourseMaterialSet()); 132 o.add(buildCourseMaterialSet());
133 o.add(buildCourseMaterialSet()); 133 o.add(buildCourseMaterialSet());
134 return o; 134 return o;
135 } 135 }
136 136
137 checkUnnamed659(core.List<api.CourseMaterialSet> o) { 137 checkUnnamed880(core.List<api.CourseMaterialSet> o) {
138 unittest.expect(o, unittest.hasLength(2)); 138 unittest.expect(o, unittest.hasLength(2));
139 checkCourseMaterialSet(o[0]); 139 checkCourseMaterialSet(o[0]);
140 checkCourseMaterialSet(o[1]); 140 checkCourseMaterialSet(o[1]);
141 } 141 }
142 142
143 core.int buildCounterCourse = 0; 143 core.int buildCounterCourse = 0;
144 buildCourse() { 144 buildCourse() {
145 var o = new api.Course(); 145 var o = new api.Course();
146 buildCounterCourse++; 146 buildCounterCourse++;
147 if (buildCounterCourse < 3) { 147 if (buildCounterCourse < 3) {
148 o.alternateLink = "foo"; 148 o.alternateLink = "foo";
149 o.courseGroupEmail = "foo"; 149 o.courseGroupEmail = "foo";
150 o.courseMaterialSets = buildUnnamed659(); 150 o.courseMaterialSets = buildUnnamed880();
151 o.courseState = "foo"; 151 o.courseState = "foo";
152 o.creationTime = "foo"; 152 o.creationTime = "foo";
153 o.description = "foo"; 153 o.description = "foo";
154 o.descriptionHeading = "foo"; 154 o.descriptionHeading = "foo";
155 o.enrollmentCode = "foo"; 155 o.enrollmentCode = "foo";
156 o.id = "foo"; 156 o.id = "foo";
157 o.name = "foo"; 157 o.name = "foo";
158 o.ownerId = "foo"; 158 o.ownerId = "foo";
159 o.room = "foo"; 159 o.room = "foo";
160 o.section = "foo"; 160 o.section = "foo";
161 o.teacherFolder = buildDriveFolder(); 161 o.teacherFolder = buildDriveFolder();
162 o.teacherGroupEmail = "foo"; 162 o.teacherGroupEmail = "foo";
163 o.updateTime = "foo"; 163 o.updateTime = "foo";
164 } 164 }
165 buildCounterCourse--; 165 buildCounterCourse--;
166 return o; 166 return o;
167 } 167 }
168 168
169 checkCourse(api.Course o) { 169 checkCourse(api.Course o) {
170 buildCounterCourse++; 170 buildCounterCourse++;
171 if (buildCounterCourse < 3) { 171 if (buildCounterCourse < 3) {
172 unittest.expect(o.alternateLink, unittest.equals('foo')); 172 unittest.expect(o.alternateLink, unittest.equals('foo'));
173 unittest.expect(o.courseGroupEmail, unittest.equals('foo')); 173 unittest.expect(o.courseGroupEmail, unittest.equals('foo'));
174 checkUnnamed659(o.courseMaterialSets); 174 checkUnnamed880(o.courseMaterialSets);
175 unittest.expect(o.courseState, unittest.equals('foo')); 175 unittest.expect(o.courseState, unittest.equals('foo'));
176 unittest.expect(o.creationTime, unittest.equals('foo')); 176 unittest.expect(o.creationTime, unittest.equals('foo'));
177 unittest.expect(o.description, unittest.equals('foo')); 177 unittest.expect(o.description, unittest.equals('foo'));
178 unittest.expect(o.descriptionHeading, unittest.equals('foo')); 178 unittest.expect(o.descriptionHeading, unittest.equals('foo'));
179 unittest.expect(o.enrollmentCode, unittest.equals('foo')); 179 unittest.expect(o.enrollmentCode, unittest.equals('foo'));
180 unittest.expect(o.id, unittest.equals('foo')); 180 unittest.expect(o.id, unittest.equals('foo'));
181 unittest.expect(o.name, unittest.equals('foo')); 181 unittest.expect(o.name, unittest.equals('foo'));
182 unittest.expect(o.ownerId, unittest.equals('foo')); 182 unittest.expect(o.ownerId, unittest.equals('foo'));
183 unittest.expect(o.room, unittest.equals('foo')); 183 unittest.expect(o.room, unittest.equals('foo'));
184 unittest.expect(o.section, unittest.equals('foo')); 184 unittest.expect(o.section, unittest.equals('foo'));
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 buildCounterCourseMaterial++; 226 buildCounterCourseMaterial++;
227 if (buildCounterCourseMaterial < 3) { 227 if (buildCounterCourseMaterial < 3) {
228 checkDriveFile(o.driveFile); 228 checkDriveFile(o.driveFile);
229 checkForm(o.form); 229 checkForm(o.form);
230 checkLink(o.link); 230 checkLink(o.link);
231 checkYouTubeVideo(o.youTubeVideo); 231 checkYouTubeVideo(o.youTubeVideo);
232 } 232 }
233 buildCounterCourseMaterial--; 233 buildCounterCourseMaterial--;
234 } 234 }
235 235
236 buildUnnamed660() { 236 buildUnnamed881() {
237 var o = new core.List<api.CourseMaterial>(); 237 var o = new core.List<api.CourseMaterial>();
238 o.add(buildCourseMaterial()); 238 o.add(buildCourseMaterial());
239 o.add(buildCourseMaterial()); 239 o.add(buildCourseMaterial());
240 return o; 240 return o;
241 } 241 }
242 242
243 checkUnnamed660(core.List<api.CourseMaterial> o) { 243 checkUnnamed881(core.List<api.CourseMaterial> o) {
244 unittest.expect(o, unittest.hasLength(2)); 244 unittest.expect(o, unittest.hasLength(2));
245 checkCourseMaterial(o[0]); 245 checkCourseMaterial(o[0]);
246 checkCourseMaterial(o[1]); 246 checkCourseMaterial(o[1]);
247 } 247 }
248 248
249 core.int buildCounterCourseMaterialSet = 0; 249 core.int buildCounterCourseMaterialSet = 0;
250 buildCourseMaterialSet() { 250 buildCourseMaterialSet() {
251 var o = new api.CourseMaterialSet(); 251 var o = new api.CourseMaterialSet();
252 buildCounterCourseMaterialSet++; 252 buildCounterCourseMaterialSet++;
253 if (buildCounterCourseMaterialSet < 3) { 253 if (buildCounterCourseMaterialSet < 3) {
254 o.materials = buildUnnamed660(); 254 o.materials = buildUnnamed881();
255 o.title = "foo"; 255 o.title = "foo";
256 } 256 }
257 buildCounterCourseMaterialSet--; 257 buildCounterCourseMaterialSet--;
258 return o; 258 return o;
259 } 259 }
260 260
261 checkCourseMaterialSet(api.CourseMaterialSet o) { 261 checkCourseMaterialSet(api.CourseMaterialSet o) {
262 buildCounterCourseMaterialSet++; 262 buildCounterCourseMaterialSet++;
263 if (buildCounterCourseMaterialSet < 3) { 263 if (buildCounterCourseMaterialSet < 3) {
264 checkUnnamed660(o.materials); 264 checkUnnamed881(o.materials);
265 unittest.expect(o.title, unittest.equals('foo')); 265 unittest.expect(o.title, unittest.equals('foo'));
266 } 266 }
267 buildCounterCourseMaterialSet--; 267 buildCounterCourseMaterialSet--;
268 } 268 }
269 269
270 buildUnnamed661() { 270 buildUnnamed882() {
271 var o = new core.List<api.Material>(); 271 var o = new core.List<api.Material>();
272 o.add(buildMaterial()); 272 o.add(buildMaterial());
273 o.add(buildMaterial()); 273 o.add(buildMaterial());
274 return o; 274 return o;
275 } 275 }
276 276
277 checkUnnamed661(core.List<api.Material> o) { 277 checkUnnamed882(core.List<api.Material> o) {
278 unittest.expect(o, unittest.hasLength(2)); 278 unittest.expect(o, unittest.hasLength(2));
279 checkMaterial(o[0]); 279 checkMaterial(o[0]);
280 checkMaterial(o[1]); 280 checkMaterial(o[1]);
281 } 281 }
282 282
283 core.int buildCounterCourseWork = 0; 283 core.int buildCounterCourseWork = 0;
284 buildCourseWork() { 284 buildCourseWork() {
285 var o = new api.CourseWork(); 285 var o = new api.CourseWork();
286 buildCounterCourseWork++; 286 buildCounterCourseWork++;
287 if (buildCounterCourseWork < 3) { 287 if (buildCounterCourseWork < 3) {
288 o.alternateLink = "foo"; 288 o.alternateLink = "foo";
289 o.assignment = buildAssignment(); 289 o.assignment = buildAssignment();
290 o.associatedWithDeveloper = true; 290 o.associatedWithDeveloper = true;
291 o.courseId = "foo"; 291 o.courseId = "foo";
292 o.creationTime = "foo"; 292 o.creationTime = "foo";
293 o.description = "foo"; 293 o.description = "foo";
294 o.dueDate = buildDate(); 294 o.dueDate = buildDate();
295 o.dueTime = buildTimeOfDay(); 295 o.dueTime = buildTimeOfDay();
296 o.id = "foo"; 296 o.id = "foo";
297 o.materials = buildUnnamed661(); 297 o.materials = buildUnnamed882();
298 o.maxPoints = 42.0; 298 o.maxPoints = 42.0;
299 o.multipleChoiceQuestion = buildMultipleChoiceQuestion(); 299 o.multipleChoiceQuestion = buildMultipleChoiceQuestion();
300 o.state = "foo"; 300 o.state = "foo";
301 o.submissionModificationMode = "foo"; 301 o.submissionModificationMode = "foo";
302 o.title = "foo"; 302 o.title = "foo";
303 o.updateTime = "foo"; 303 o.updateTime = "foo";
304 o.workType = "foo"; 304 o.workType = "foo";
305 } 305 }
306 buildCounterCourseWork--; 306 buildCounterCourseWork--;
307 return o; 307 return o;
308 } 308 }
309 309
310 checkCourseWork(api.CourseWork o) { 310 checkCourseWork(api.CourseWork o) {
311 buildCounterCourseWork++; 311 buildCounterCourseWork++;
312 if (buildCounterCourseWork < 3) { 312 if (buildCounterCourseWork < 3) {
313 unittest.expect(o.alternateLink, unittest.equals('foo')); 313 unittest.expect(o.alternateLink, unittest.equals('foo'));
314 checkAssignment(o.assignment); 314 checkAssignment(o.assignment);
315 unittest.expect(o.associatedWithDeveloper, unittest.isTrue); 315 unittest.expect(o.associatedWithDeveloper, unittest.isTrue);
316 unittest.expect(o.courseId, unittest.equals('foo')); 316 unittest.expect(o.courseId, unittest.equals('foo'));
317 unittest.expect(o.creationTime, unittest.equals('foo')); 317 unittest.expect(o.creationTime, unittest.equals('foo'));
318 unittest.expect(o.description, unittest.equals('foo')); 318 unittest.expect(o.description, unittest.equals('foo'));
319 checkDate(o.dueDate); 319 checkDate(o.dueDate);
320 checkTimeOfDay(o.dueTime); 320 checkTimeOfDay(o.dueTime);
321 unittest.expect(o.id, unittest.equals('foo')); 321 unittest.expect(o.id, unittest.equals('foo'));
322 checkUnnamed661(o.materials); 322 checkUnnamed882(o.materials);
323 unittest.expect(o.maxPoints, unittest.equals(42.0)); 323 unittest.expect(o.maxPoints, unittest.equals(42.0));
324 checkMultipleChoiceQuestion(o.multipleChoiceQuestion); 324 checkMultipleChoiceQuestion(o.multipleChoiceQuestion);
325 unittest.expect(o.state, unittest.equals('foo')); 325 unittest.expect(o.state, unittest.equals('foo'));
326 unittest.expect(o.submissionModificationMode, unittest.equals('foo')); 326 unittest.expect(o.submissionModificationMode, unittest.equals('foo'));
327 unittest.expect(o.title, unittest.equals('foo')); 327 unittest.expect(o.title, unittest.equals('foo'));
328 unittest.expect(o.updateTime, unittest.equals('foo')); 328 unittest.expect(o.updateTime, unittest.equals('foo'));
329 unittest.expect(o.workType, unittest.equals('foo')); 329 unittest.expect(o.workType, unittest.equals('foo'));
330 } 330 }
331 buildCounterCourseWork--; 331 buildCounterCourseWork--;
332 } 332 }
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
456 } 456 }
457 457
458 checkGlobalPermission(api.GlobalPermission o) { 458 checkGlobalPermission(api.GlobalPermission o) {
459 buildCounterGlobalPermission++; 459 buildCounterGlobalPermission++;
460 if (buildCounterGlobalPermission < 3) { 460 if (buildCounterGlobalPermission < 3) {
461 unittest.expect(o.permission, unittest.equals('foo')); 461 unittest.expect(o.permission, unittest.equals('foo'));
462 } 462 }
463 buildCounterGlobalPermission--; 463 buildCounterGlobalPermission--;
464 } 464 }
465 465
466 core.int buildCounterGuardian = 0;
467 buildGuardian() {
468 var o = new api.Guardian();
469 buildCounterGuardian++;
470 if (buildCounterGuardian < 3) {
471 o.guardianId = "foo";
472 o.guardianProfile = buildUserProfile();
473 o.invitedEmailAddress = "foo";
474 o.studentId = "foo";
475 }
476 buildCounterGuardian--;
477 return o;
478 }
479
480 checkGuardian(api.Guardian o) {
481 buildCounterGuardian++;
482 if (buildCounterGuardian < 3) {
483 unittest.expect(o.guardianId, unittest.equals('foo'));
484 checkUserProfile(o.guardianProfile);
485 unittest.expect(o.invitedEmailAddress, unittest.equals('foo'));
486 unittest.expect(o.studentId, unittest.equals('foo'));
487 }
488 buildCounterGuardian--;
489 }
490
491 core.int buildCounterGuardianInvitation = 0;
492 buildGuardianInvitation() {
493 var o = new api.GuardianInvitation();
494 buildCounterGuardianInvitation++;
495 if (buildCounterGuardianInvitation < 3) {
496 o.creationTime = "foo";
497 o.invitationId = "foo";
498 o.invitedEmailAddress = "foo";
499 o.state = "foo";
500 o.studentId = "foo";
501 }
502 buildCounterGuardianInvitation--;
503 return o;
504 }
505
506 checkGuardianInvitation(api.GuardianInvitation o) {
507 buildCounterGuardianInvitation++;
508 if (buildCounterGuardianInvitation < 3) {
509 unittest.expect(o.creationTime, unittest.equals('foo'));
510 unittest.expect(o.invitationId, unittest.equals('foo'));
511 unittest.expect(o.invitedEmailAddress, unittest.equals('foo'));
512 unittest.expect(o.state, unittest.equals('foo'));
513 unittest.expect(o.studentId, unittest.equals('foo'));
514 }
515 buildCounterGuardianInvitation--;
516 }
517
466 core.int buildCounterInvitation = 0; 518 core.int buildCounterInvitation = 0;
467 buildInvitation() { 519 buildInvitation() {
468 var o = new api.Invitation(); 520 var o = new api.Invitation();
469 buildCounterInvitation++; 521 buildCounterInvitation++;
470 if (buildCounterInvitation < 3) { 522 if (buildCounterInvitation < 3) {
471 o.courseId = "foo"; 523 o.courseId = "foo";
472 o.id = "foo"; 524 o.id = "foo";
473 o.role = "foo"; 525 o.role = "foo";
474 o.userId = "foo"; 526 o.userId = "foo";
475 } 527 }
(...skipping 28 matching lines...) Expand all
504 checkLink(api.Link o) { 556 checkLink(api.Link o) {
505 buildCounterLink++; 557 buildCounterLink++;
506 if (buildCounterLink < 3) { 558 if (buildCounterLink < 3) {
507 unittest.expect(o.thumbnailUrl, unittest.equals('foo')); 559 unittest.expect(o.thumbnailUrl, unittest.equals('foo'));
508 unittest.expect(o.title, unittest.equals('foo')); 560 unittest.expect(o.title, unittest.equals('foo'));
509 unittest.expect(o.url, unittest.equals('foo')); 561 unittest.expect(o.url, unittest.equals('foo'));
510 } 562 }
511 buildCounterLink--; 563 buildCounterLink--;
512 } 564 }
513 565
514 buildUnnamed662() { 566 buildUnnamed883() {
515 var o = new core.List<api.CourseAlias>(); 567 var o = new core.List<api.CourseAlias>();
516 o.add(buildCourseAlias()); 568 o.add(buildCourseAlias());
517 o.add(buildCourseAlias()); 569 o.add(buildCourseAlias());
518 return o; 570 return o;
519 } 571 }
520 572
521 checkUnnamed662(core.List<api.CourseAlias> o) { 573 checkUnnamed883(core.List<api.CourseAlias> o) {
522 unittest.expect(o, unittest.hasLength(2)); 574 unittest.expect(o, unittest.hasLength(2));
523 checkCourseAlias(o[0]); 575 checkCourseAlias(o[0]);
524 checkCourseAlias(o[1]); 576 checkCourseAlias(o[1]);
525 } 577 }
526 578
527 core.int buildCounterListCourseAliasesResponse = 0; 579 core.int buildCounterListCourseAliasesResponse = 0;
528 buildListCourseAliasesResponse() { 580 buildListCourseAliasesResponse() {
529 var o = new api.ListCourseAliasesResponse(); 581 var o = new api.ListCourseAliasesResponse();
530 buildCounterListCourseAliasesResponse++; 582 buildCounterListCourseAliasesResponse++;
531 if (buildCounterListCourseAliasesResponse < 3) { 583 if (buildCounterListCourseAliasesResponse < 3) {
532 o.aliases = buildUnnamed662(); 584 o.aliases = buildUnnamed883();
533 o.nextPageToken = "foo"; 585 o.nextPageToken = "foo";
534 } 586 }
535 buildCounterListCourseAliasesResponse--; 587 buildCounterListCourseAliasesResponse--;
536 return o; 588 return o;
537 } 589 }
538 590
539 checkListCourseAliasesResponse(api.ListCourseAliasesResponse o) { 591 checkListCourseAliasesResponse(api.ListCourseAliasesResponse o) {
540 buildCounterListCourseAliasesResponse++; 592 buildCounterListCourseAliasesResponse++;
541 if (buildCounterListCourseAliasesResponse < 3) { 593 if (buildCounterListCourseAliasesResponse < 3) {
542 checkUnnamed662(o.aliases); 594 checkUnnamed883(o.aliases);
543 unittest.expect(o.nextPageToken, unittest.equals('foo')); 595 unittest.expect(o.nextPageToken, unittest.equals('foo'));
544 } 596 }
545 buildCounterListCourseAliasesResponse--; 597 buildCounterListCourseAliasesResponse--;
546 } 598 }
547 599
548 buildUnnamed663() { 600 buildUnnamed884() {
549 var o = new core.List<api.CourseWork>(); 601 var o = new core.List<api.CourseWork>();
550 o.add(buildCourseWork()); 602 o.add(buildCourseWork());
551 o.add(buildCourseWork()); 603 o.add(buildCourseWork());
552 return o; 604 return o;
553 } 605 }
554 606
555 checkUnnamed663(core.List<api.CourseWork> o) { 607 checkUnnamed884(core.List<api.CourseWork> o) {
556 unittest.expect(o, unittest.hasLength(2)); 608 unittest.expect(o, unittest.hasLength(2));
557 checkCourseWork(o[0]); 609 checkCourseWork(o[0]);
558 checkCourseWork(o[1]); 610 checkCourseWork(o[1]);
559 } 611 }
560 612
561 core.int buildCounterListCourseWorkResponse = 0; 613 core.int buildCounterListCourseWorkResponse = 0;
562 buildListCourseWorkResponse() { 614 buildListCourseWorkResponse() {
563 var o = new api.ListCourseWorkResponse(); 615 var o = new api.ListCourseWorkResponse();
564 buildCounterListCourseWorkResponse++; 616 buildCounterListCourseWorkResponse++;
565 if (buildCounterListCourseWorkResponse < 3) { 617 if (buildCounterListCourseWorkResponse < 3) {
566 o.courseWork = buildUnnamed663(); 618 o.courseWork = buildUnnamed884();
567 o.nextPageToken = "foo"; 619 o.nextPageToken = "foo";
568 } 620 }
569 buildCounterListCourseWorkResponse--; 621 buildCounterListCourseWorkResponse--;
570 return o; 622 return o;
571 } 623 }
572 624
573 checkListCourseWorkResponse(api.ListCourseWorkResponse o) { 625 checkListCourseWorkResponse(api.ListCourseWorkResponse o) {
574 buildCounterListCourseWorkResponse++; 626 buildCounterListCourseWorkResponse++;
575 if (buildCounterListCourseWorkResponse < 3) { 627 if (buildCounterListCourseWorkResponse < 3) {
576 checkUnnamed663(o.courseWork); 628 checkUnnamed884(o.courseWork);
577 unittest.expect(o.nextPageToken, unittest.equals('foo')); 629 unittest.expect(o.nextPageToken, unittest.equals('foo'));
578 } 630 }
579 buildCounterListCourseWorkResponse--; 631 buildCounterListCourseWorkResponse--;
580 } 632 }
581 633
582 buildUnnamed664() { 634 buildUnnamed885() {
583 var o = new core.List<api.Course>(); 635 var o = new core.List<api.Course>();
584 o.add(buildCourse()); 636 o.add(buildCourse());
585 o.add(buildCourse()); 637 o.add(buildCourse());
586 return o; 638 return o;
587 } 639 }
588 640
589 checkUnnamed664(core.List<api.Course> o) { 641 checkUnnamed885(core.List<api.Course> o) {
590 unittest.expect(o, unittest.hasLength(2)); 642 unittest.expect(o, unittest.hasLength(2));
591 checkCourse(o[0]); 643 checkCourse(o[0]);
592 checkCourse(o[1]); 644 checkCourse(o[1]);
593 } 645 }
594 646
595 core.int buildCounterListCoursesResponse = 0; 647 core.int buildCounterListCoursesResponse = 0;
596 buildListCoursesResponse() { 648 buildListCoursesResponse() {
597 var o = new api.ListCoursesResponse(); 649 var o = new api.ListCoursesResponse();
598 buildCounterListCoursesResponse++; 650 buildCounterListCoursesResponse++;
599 if (buildCounterListCoursesResponse < 3) { 651 if (buildCounterListCoursesResponse < 3) {
600 o.courses = buildUnnamed664(); 652 o.courses = buildUnnamed885();
601 o.nextPageToken = "foo"; 653 o.nextPageToken = "foo";
602 } 654 }
603 buildCounterListCoursesResponse--; 655 buildCounterListCoursesResponse--;
604 return o; 656 return o;
605 } 657 }
606 658
607 checkListCoursesResponse(api.ListCoursesResponse o) { 659 checkListCoursesResponse(api.ListCoursesResponse o) {
608 buildCounterListCoursesResponse++; 660 buildCounterListCoursesResponse++;
609 if (buildCounterListCoursesResponse < 3) { 661 if (buildCounterListCoursesResponse < 3) {
610 checkUnnamed664(o.courses); 662 checkUnnamed885(o.courses);
611 unittest.expect(o.nextPageToken, unittest.equals('foo')); 663 unittest.expect(o.nextPageToken, unittest.equals('foo'));
612 } 664 }
613 buildCounterListCoursesResponse--; 665 buildCounterListCoursesResponse--;
614 } 666 }
615 667
616 buildUnnamed665() { 668 buildUnnamed886() {
669 var o = new core.List<api.GuardianInvitation>();
670 o.add(buildGuardianInvitation());
671 o.add(buildGuardianInvitation());
672 return o;
673 }
674
675 checkUnnamed886(core.List<api.GuardianInvitation> o) {
676 unittest.expect(o, unittest.hasLength(2));
677 checkGuardianInvitation(o[0]);
678 checkGuardianInvitation(o[1]);
679 }
680
681 core.int buildCounterListGuardianInvitationsResponse = 0;
682 buildListGuardianInvitationsResponse() {
683 var o = new api.ListGuardianInvitationsResponse();
684 buildCounterListGuardianInvitationsResponse++;
685 if (buildCounterListGuardianInvitationsResponse < 3) {
686 o.guardianInvitations = buildUnnamed886();
687 o.nextPageToken = "foo";
688 }
689 buildCounterListGuardianInvitationsResponse--;
690 return o;
691 }
692
693 checkListGuardianInvitationsResponse(api.ListGuardianInvitationsResponse o) {
694 buildCounterListGuardianInvitationsResponse++;
695 if (buildCounterListGuardianInvitationsResponse < 3) {
696 checkUnnamed886(o.guardianInvitations);
697 unittest.expect(o.nextPageToken, unittest.equals('foo'));
698 }
699 buildCounterListGuardianInvitationsResponse--;
700 }
701
702 buildUnnamed887() {
703 var o = new core.List<api.Guardian>();
704 o.add(buildGuardian());
705 o.add(buildGuardian());
706 return o;
707 }
708
709 checkUnnamed887(core.List<api.Guardian> o) {
710 unittest.expect(o, unittest.hasLength(2));
711 checkGuardian(o[0]);
712 checkGuardian(o[1]);
713 }
714
715 core.int buildCounterListGuardiansResponse = 0;
716 buildListGuardiansResponse() {
717 var o = new api.ListGuardiansResponse();
718 buildCounterListGuardiansResponse++;
719 if (buildCounterListGuardiansResponse < 3) {
720 o.guardians = buildUnnamed887();
721 o.nextPageToken = "foo";
722 }
723 buildCounterListGuardiansResponse--;
724 return o;
725 }
726
727 checkListGuardiansResponse(api.ListGuardiansResponse o) {
728 buildCounterListGuardiansResponse++;
729 if (buildCounterListGuardiansResponse < 3) {
730 checkUnnamed887(o.guardians);
731 unittest.expect(o.nextPageToken, unittest.equals('foo'));
732 }
733 buildCounterListGuardiansResponse--;
734 }
735
736 buildUnnamed888() {
617 var o = new core.List<api.Invitation>(); 737 var o = new core.List<api.Invitation>();
618 o.add(buildInvitation()); 738 o.add(buildInvitation());
619 o.add(buildInvitation()); 739 o.add(buildInvitation());
620 return o; 740 return o;
621 } 741 }
622 742
623 checkUnnamed665(core.List<api.Invitation> o) { 743 checkUnnamed888(core.List<api.Invitation> o) {
624 unittest.expect(o, unittest.hasLength(2)); 744 unittest.expect(o, unittest.hasLength(2));
625 checkInvitation(o[0]); 745 checkInvitation(o[0]);
626 checkInvitation(o[1]); 746 checkInvitation(o[1]);
627 } 747 }
628 748
629 core.int buildCounterListInvitationsResponse = 0; 749 core.int buildCounterListInvitationsResponse = 0;
630 buildListInvitationsResponse() { 750 buildListInvitationsResponse() {
631 var o = new api.ListInvitationsResponse(); 751 var o = new api.ListInvitationsResponse();
632 buildCounterListInvitationsResponse++; 752 buildCounterListInvitationsResponse++;
633 if (buildCounterListInvitationsResponse < 3) { 753 if (buildCounterListInvitationsResponse < 3) {
634 o.invitations = buildUnnamed665(); 754 o.invitations = buildUnnamed888();
635 o.nextPageToken = "foo"; 755 o.nextPageToken = "foo";
636 } 756 }
637 buildCounterListInvitationsResponse--; 757 buildCounterListInvitationsResponse--;
638 return o; 758 return o;
639 } 759 }
640 760
641 checkListInvitationsResponse(api.ListInvitationsResponse o) { 761 checkListInvitationsResponse(api.ListInvitationsResponse o) {
642 buildCounterListInvitationsResponse++; 762 buildCounterListInvitationsResponse++;
643 if (buildCounterListInvitationsResponse < 3) { 763 if (buildCounterListInvitationsResponse < 3) {
644 checkUnnamed665(o.invitations); 764 checkUnnamed888(o.invitations);
645 unittest.expect(o.nextPageToken, unittest.equals('foo')); 765 unittest.expect(o.nextPageToken, unittest.equals('foo'));
646 } 766 }
647 buildCounterListInvitationsResponse--; 767 buildCounterListInvitationsResponse--;
648 } 768 }
649 769
650 buildUnnamed666() { 770 buildUnnamed889() {
651 var o = new core.List<api.StudentSubmission>(); 771 var o = new core.List<api.StudentSubmission>();
652 o.add(buildStudentSubmission()); 772 o.add(buildStudentSubmission());
653 o.add(buildStudentSubmission()); 773 o.add(buildStudentSubmission());
654 return o; 774 return o;
655 } 775 }
656 776
657 checkUnnamed666(core.List<api.StudentSubmission> o) { 777 checkUnnamed889(core.List<api.StudentSubmission> o) {
658 unittest.expect(o, unittest.hasLength(2)); 778 unittest.expect(o, unittest.hasLength(2));
659 checkStudentSubmission(o[0]); 779 checkStudentSubmission(o[0]);
660 checkStudentSubmission(o[1]); 780 checkStudentSubmission(o[1]);
661 } 781 }
662 782
663 core.int buildCounterListStudentSubmissionsResponse = 0; 783 core.int buildCounterListStudentSubmissionsResponse = 0;
664 buildListStudentSubmissionsResponse() { 784 buildListStudentSubmissionsResponse() {
665 var o = new api.ListStudentSubmissionsResponse(); 785 var o = new api.ListStudentSubmissionsResponse();
666 buildCounterListStudentSubmissionsResponse++; 786 buildCounterListStudentSubmissionsResponse++;
667 if (buildCounterListStudentSubmissionsResponse < 3) { 787 if (buildCounterListStudentSubmissionsResponse < 3) {
668 o.nextPageToken = "foo"; 788 o.nextPageToken = "foo";
669 o.studentSubmissions = buildUnnamed666(); 789 o.studentSubmissions = buildUnnamed889();
670 } 790 }
671 buildCounterListStudentSubmissionsResponse--; 791 buildCounterListStudentSubmissionsResponse--;
672 return o; 792 return o;
673 } 793 }
674 794
675 checkListStudentSubmissionsResponse(api.ListStudentSubmissionsResponse o) { 795 checkListStudentSubmissionsResponse(api.ListStudentSubmissionsResponse o) {
676 buildCounterListStudentSubmissionsResponse++; 796 buildCounterListStudentSubmissionsResponse++;
677 if (buildCounterListStudentSubmissionsResponse < 3) { 797 if (buildCounterListStudentSubmissionsResponse < 3) {
678 unittest.expect(o.nextPageToken, unittest.equals('foo')); 798 unittest.expect(o.nextPageToken, unittest.equals('foo'));
679 checkUnnamed666(o.studentSubmissions); 799 checkUnnamed889(o.studentSubmissions);
680 } 800 }
681 buildCounterListStudentSubmissionsResponse--; 801 buildCounterListStudentSubmissionsResponse--;
682 } 802 }
683 803
684 buildUnnamed667() { 804 buildUnnamed890() {
685 var o = new core.List<api.Student>(); 805 var o = new core.List<api.Student>();
686 o.add(buildStudent()); 806 o.add(buildStudent());
687 o.add(buildStudent()); 807 o.add(buildStudent());
688 return o; 808 return o;
689 } 809 }
690 810
691 checkUnnamed667(core.List<api.Student> o) { 811 checkUnnamed890(core.List<api.Student> o) {
692 unittest.expect(o, unittest.hasLength(2)); 812 unittest.expect(o, unittest.hasLength(2));
693 checkStudent(o[0]); 813 checkStudent(o[0]);
694 checkStudent(o[1]); 814 checkStudent(o[1]);
695 } 815 }
696 816
697 core.int buildCounterListStudentsResponse = 0; 817 core.int buildCounterListStudentsResponse = 0;
698 buildListStudentsResponse() { 818 buildListStudentsResponse() {
699 var o = new api.ListStudentsResponse(); 819 var o = new api.ListStudentsResponse();
700 buildCounterListStudentsResponse++; 820 buildCounterListStudentsResponse++;
701 if (buildCounterListStudentsResponse < 3) { 821 if (buildCounterListStudentsResponse < 3) {
702 o.nextPageToken = "foo"; 822 o.nextPageToken = "foo";
703 o.students = buildUnnamed667(); 823 o.students = buildUnnamed890();
704 } 824 }
705 buildCounterListStudentsResponse--; 825 buildCounterListStudentsResponse--;
706 return o; 826 return o;
707 } 827 }
708 828
709 checkListStudentsResponse(api.ListStudentsResponse o) { 829 checkListStudentsResponse(api.ListStudentsResponse o) {
710 buildCounterListStudentsResponse++; 830 buildCounterListStudentsResponse++;
711 if (buildCounterListStudentsResponse < 3) { 831 if (buildCounterListStudentsResponse < 3) {
712 unittest.expect(o.nextPageToken, unittest.equals('foo')); 832 unittest.expect(o.nextPageToken, unittest.equals('foo'));
713 checkUnnamed667(o.students); 833 checkUnnamed890(o.students);
714 } 834 }
715 buildCounterListStudentsResponse--; 835 buildCounterListStudentsResponse--;
716 } 836 }
717 837
718 buildUnnamed668() { 838 buildUnnamed891() {
719 var o = new core.List<api.Teacher>(); 839 var o = new core.List<api.Teacher>();
720 o.add(buildTeacher()); 840 o.add(buildTeacher());
721 o.add(buildTeacher()); 841 o.add(buildTeacher());
722 return o; 842 return o;
723 } 843 }
724 844
725 checkUnnamed668(core.List<api.Teacher> o) { 845 checkUnnamed891(core.List<api.Teacher> o) {
726 unittest.expect(o, unittest.hasLength(2)); 846 unittest.expect(o, unittest.hasLength(2));
727 checkTeacher(o[0]); 847 checkTeacher(o[0]);
728 checkTeacher(o[1]); 848 checkTeacher(o[1]);
729 } 849 }
730 850
731 core.int buildCounterListTeachersResponse = 0; 851 core.int buildCounterListTeachersResponse = 0;
732 buildListTeachersResponse() { 852 buildListTeachersResponse() {
733 var o = new api.ListTeachersResponse(); 853 var o = new api.ListTeachersResponse();
734 buildCounterListTeachersResponse++; 854 buildCounterListTeachersResponse++;
735 if (buildCounterListTeachersResponse < 3) { 855 if (buildCounterListTeachersResponse < 3) {
736 o.nextPageToken = "foo"; 856 o.nextPageToken = "foo";
737 o.teachers = buildUnnamed668(); 857 o.teachers = buildUnnamed891();
738 } 858 }
739 buildCounterListTeachersResponse--; 859 buildCounterListTeachersResponse--;
740 return o; 860 return o;
741 } 861 }
742 862
743 checkListTeachersResponse(api.ListTeachersResponse o) { 863 checkListTeachersResponse(api.ListTeachersResponse o) {
744 buildCounterListTeachersResponse++; 864 buildCounterListTeachersResponse++;
745 if (buildCounterListTeachersResponse < 3) { 865 if (buildCounterListTeachersResponse < 3) {
746 unittest.expect(o.nextPageToken, unittest.equals('foo')); 866 unittest.expect(o.nextPageToken, unittest.equals('foo'));
747 checkUnnamed668(o.teachers); 867 checkUnnamed891(o.teachers);
748 } 868 }
749 buildCounterListTeachersResponse--; 869 buildCounterListTeachersResponse--;
750 } 870 }
751 871
752 core.int buildCounterMaterial = 0; 872 core.int buildCounterMaterial = 0;
753 buildMaterial() { 873 buildMaterial() {
754 var o = new api.Material(); 874 var o = new api.Material();
755 buildCounterMaterial++; 875 buildCounterMaterial++;
756 if (buildCounterMaterial < 3) { 876 if (buildCounterMaterial < 3) {
757 o.driveFile = buildSharedDriveFile(); 877 o.driveFile = buildSharedDriveFile();
758 o.form = buildForm(); 878 o.form = buildForm();
759 o.link = buildLink(); 879 o.link = buildLink();
760 o.youtubeVideo = buildYouTubeVideo(); 880 o.youtubeVideo = buildYouTubeVideo();
761 } 881 }
762 buildCounterMaterial--; 882 buildCounterMaterial--;
763 return o; 883 return o;
764 } 884 }
765 885
766 checkMaterial(api.Material o) { 886 checkMaterial(api.Material o) {
767 buildCounterMaterial++; 887 buildCounterMaterial++;
768 if (buildCounterMaterial < 3) { 888 if (buildCounterMaterial < 3) {
769 checkSharedDriveFile(o.driveFile); 889 checkSharedDriveFile(o.driveFile);
770 checkForm(o.form); 890 checkForm(o.form);
771 checkLink(o.link); 891 checkLink(o.link);
772 checkYouTubeVideo(o.youtubeVideo); 892 checkYouTubeVideo(o.youtubeVideo);
773 } 893 }
774 buildCounterMaterial--; 894 buildCounterMaterial--;
775 } 895 }
776 896
777 buildUnnamed669() { 897 buildUnnamed892() {
778 var o = new core.List<api.Attachment>(); 898 var o = new core.List<api.Attachment>();
779 o.add(buildAttachment()); 899 o.add(buildAttachment());
780 o.add(buildAttachment()); 900 o.add(buildAttachment());
781 return o; 901 return o;
782 } 902 }
783 903
784 checkUnnamed669(core.List<api.Attachment> o) { 904 checkUnnamed892(core.List<api.Attachment> o) {
785 unittest.expect(o, unittest.hasLength(2)); 905 unittest.expect(o, unittest.hasLength(2));
786 checkAttachment(o[0]); 906 checkAttachment(o[0]);
787 checkAttachment(o[1]); 907 checkAttachment(o[1]);
788 } 908 }
789 909
790 core.int buildCounterModifyAttachmentsRequest = 0; 910 core.int buildCounterModifyAttachmentsRequest = 0;
791 buildModifyAttachmentsRequest() { 911 buildModifyAttachmentsRequest() {
792 var o = new api.ModifyAttachmentsRequest(); 912 var o = new api.ModifyAttachmentsRequest();
793 buildCounterModifyAttachmentsRequest++; 913 buildCounterModifyAttachmentsRequest++;
794 if (buildCounterModifyAttachmentsRequest < 3) { 914 if (buildCounterModifyAttachmentsRequest < 3) {
795 o.addAttachments = buildUnnamed669(); 915 o.addAttachments = buildUnnamed892();
796 } 916 }
797 buildCounterModifyAttachmentsRequest--; 917 buildCounterModifyAttachmentsRequest--;
798 return o; 918 return o;
799 } 919 }
800 920
801 checkModifyAttachmentsRequest(api.ModifyAttachmentsRequest o) { 921 checkModifyAttachmentsRequest(api.ModifyAttachmentsRequest o) {
802 buildCounterModifyAttachmentsRequest++; 922 buildCounterModifyAttachmentsRequest++;
803 if (buildCounterModifyAttachmentsRequest < 3) { 923 if (buildCounterModifyAttachmentsRequest < 3) {
804 checkUnnamed669(o.addAttachments); 924 checkUnnamed892(o.addAttachments);
805 } 925 }
806 buildCounterModifyAttachmentsRequest--; 926 buildCounterModifyAttachmentsRequest--;
807 } 927 }
808 928
809 buildUnnamed670() { 929 buildUnnamed893() {
810 var o = new core.List<core.String>(); 930 var o = new core.List<core.String>();
811 o.add("foo"); 931 o.add("foo");
812 o.add("foo"); 932 o.add("foo");
813 return o; 933 return o;
814 } 934 }
815 935
816 checkUnnamed670(core.List<core.String> o) { 936 checkUnnamed893(core.List<core.String> o) {
817 unittest.expect(o, unittest.hasLength(2)); 937 unittest.expect(o, unittest.hasLength(2));
818 unittest.expect(o[0], unittest.equals('foo')); 938 unittest.expect(o[0], unittest.equals('foo'));
819 unittest.expect(o[1], unittest.equals('foo')); 939 unittest.expect(o[1], unittest.equals('foo'));
820 } 940 }
821 941
822 core.int buildCounterMultipleChoiceQuestion = 0; 942 core.int buildCounterMultipleChoiceQuestion = 0;
823 buildMultipleChoiceQuestion() { 943 buildMultipleChoiceQuestion() {
824 var o = new api.MultipleChoiceQuestion(); 944 var o = new api.MultipleChoiceQuestion();
825 buildCounterMultipleChoiceQuestion++; 945 buildCounterMultipleChoiceQuestion++;
826 if (buildCounterMultipleChoiceQuestion < 3) { 946 if (buildCounterMultipleChoiceQuestion < 3) {
827 o.choices = buildUnnamed670(); 947 o.choices = buildUnnamed893();
828 } 948 }
829 buildCounterMultipleChoiceQuestion--; 949 buildCounterMultipleChoiceQuestion--;
830 return o; 950 return o;
831 } 951 }
832 952
833 checkMultipleChoiceQuestion(api.MultipleChoiceQuestion o) { 953 checkMultipleChoiceQuestion(api.MultipleChoiceQuestion o) {
834 buildCounterMultipleChoiceQuestion++; 954 buildCounterMultipleChoiceQuestion++;
835 if (buildCounterMultipleChoiceQuestion < 3) { 955 if (buildCounterMultipleChoiceQuestion < 3) {
836 checkUnnamed670(o.choices); 956 checkUnnamed893(o.choices);
837 } 957 }
838 buildCounterMultipleChoiceQuestion--; 958 buildCounterMultipleChoiceQuestion--;
839 } 959 }
840 960
841 core.int buildCounterMultipleChoiceSubmission = 0; 961 core.int buildCounterMultipleChoiceSubmission = 0;
842 buildMultipleChoiceSubmission() { 962 buildMultipleChoiceSubmission() {
843 var o = new api.MultipleChoiceSubmission(); 963 var o = new api.MultipleChoiceSubmission();
844 buildCounterMultipleChoiceSubmission++; 964 buildCounterMultipleChoiceSubmission++;
845 if (buildCounterMultipleChoiceSubmission < 3) { 965 if (buildCounterMultipleChoiceSubmission < 3) {
846 o.answer = "foo"; 966 o.answer = "foo";
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
1086 return o; 1206 return o;
1087 } 1207 }
1088 1208
1089 checkTurnInStudentSubmissionRequest(api.TurnInStudentSubmissionRequest o) { 1209 checkTurnInStudentSubmissionRequest(api.TurnInStudentSubmissionRequest o) {
1090 buildCounterTurnInStudentSubmissionRequest++; 1210 buildCounterTurnInStudentSubmissionRequest++;
1091 if (buildCounterTurnInStudentSubmissionRequest < 3) { 1211 if (buildCounterTurnInStudentSubmissionRequest < 3) {
1092 } 1212 }
1093 buildCounterTurnInStudentSubmissionRequest--; 1213 buildCounterTurnInStudentSubmissionRequest--;
1094 } 1214 }
1095 1215
1096 buildUnnamed671() { 1216 buildUnnamed894() {
1097 var o = new core.List<api.GlobalPermission>(); 1217 var o = new core.List<api.GlobalPermission>();
1098 o.add(buildGlobalPermission()); 1218 o.add(buildGlobalPermission());
1099 o.add(buildGlobalPermission()); 1219 o.add(buildGlobalPermission());
1100 return o; 1220 return o;
1101 } 1221 }
1102 1222
1103 checkUnnamed671(core.List<api.GlobalPermission> o) { 1223 checkUnnamed894(core.List<api.GlobalPermission> o) {
1104 unittest.expect(o, unittest.hasLength(2)); 1224 unittest.expect(o, unittest.hasLength(2));
1105 checkGlobalPermission(o[0]); 1225 checkGlobalPermission(o[0]);
1106 checkGlobalPermission(o[1]); 1226 checkGlobalPermission(o[1]);
1107 } 1227 }
1108 1228
1109 core.int buildCounterUserProfile = 0; 1229 core.int buildCounterUserProfile = 0;
1110 buildUserProfile() { 1230 buildUserProfile() {
1111 var o = new api.UserProfile(); 1231 var o = new api.UserProfile();
1112 buildCounterUserProfile++; 1232 buildCounterUserProfile++;
1113 if (buildCounterUserProfile < 3) { 1233 if (buildCounterUserProfile < 3) {
1114 o.emailAddress = "foo"; 1234 o.emailAddress = "foo";
1115 o.id = "foo"; 1235 o.id = "foo";
1116 o.name = buildName(); 1236 o.name = buildName();
1117 o.permissions = buildUnnamed671(); 1237 o.permissions = buildUnnamed894();
1118 o.photoUrl = "foo"; 1238 o.photoUrl = "foo";
1119 } 1239 }
1120 buildCounterUserProfile--; 1240 buildCounterUserProfile--;
1121 return o; 1241 return o;
1122 } 1242 }
1123 1243
1124 checkUserProfile(api.UserProfile o) { 1244 checkUserProfile(api.UserProfile o) {
1125 buildCounterUserProfile++; 1245 buildCounterUserProfile++;
1126 if (buildCounterUserProfile < 3) { 1246 if (buildCounterUserProfile < 3) {
1127 unittest.expect(o.emailAddress, unittest.equals('foo')); 1247 unittest.expect(o.emailAddress, unittest.equals('foo'));
1128 unittest.expect(o.id, unittest.equals('foo')); 1248 unittest.expect(o.id, unittest.equals('foo'));
1129 checkName(o.name); 1249 checkName(o.name);
1130 checkUnnamed671(o.permissions); 1250 checkUnnamed894(o.permissions);
1131 unittest.expect(o.photoUrl, unittest.equals('foo')); 1251 unittest.expect(o.photoUrl, unittest.equals('foo'));
1132 } 1252 }
1133 buildCounterUserProfile--; 1253 buildCounterUserProfile--;
1134 } 1254 }
1135 1255
1136 core.int buildCounterYouTubeVideo = 0; 1256 core.int buildCounterYouTubeVideo = 0;
1137 buildYouTubeVideo() { 1257 buildYouTubeVideo() {
1138 var o = new api.YouTubeVideo(); 1258 var o = new api.YouTubeVideo();
1139 buildCounterYouTubeVideo++; 1259 buildCounterYouTubeVideo++;
1140 if (buildCounterYouTubeVideo < 3) { 1260 if (buildCounterYouTubeVideo < 3) {
(...skipping 10 matching lines...) Expand all
1151 buildCounterYouTubeVideo++; 1271 buildCounterYouTubeVideo++;
1152 if (buildCounterYouTubeVideo < 3) { 1272 if (buildCounterYouTubeVideo < 3) {
1153 unittest.expect(o.alternateLink, unittest.equals('foo')); 1273 unittest.expect(o.alternateLink, unittest.equals('foo'));
1154 unittest.expect(o.id, unittest.equals('foo')); 1274 unittest.expect(o.id, unittest.equals('foo'));
1155 unittest.expect(o.thumbnailUrl, unittest.equals('foo')); 1275 unittest.expect(o.thumbnailUrl, unittest.equals('foo'));
1156 unittest.expect(o.title, unittest.equals('foo')); 1276 unittest.expect(o.title, unittest.equals('foo'));
1157 } 1277 }
1158 buildCounterYouTubeVideo--; 1278 buildCounterYouTubeVideo--;
1159 } 1279 }
1160 1280
1161 buildUnnamed672() { 1281 buildUnnamed895() {
1162 var o = new core.List<core.String>(); 1282 var o = new core.List<core.String>();
1163 o.add("foo"); 1283 o.add("foo");
1164 o.add("foo"); 1284 o.add("foo");
1165 return o; 1285 return o;
1166 } 1286 }
1167 1287
1168 checkUnnamed672(core.List<core.String> o) { 1288 checkUnnamed895(core.List<core.String> o) {
1169 unittest.expect(o, unittest.hasLength(2)); 1289 unittest.expect(o, unittest.hasLength(2));
1170 unittest.expect(o[0], unittest.equals('foo')); 1290 unittest.expect(o[0], unittest.equals('foo'));
1171 unittest.expect(o[1], unittest.equals('foo')); 1291 unittest.expect(o[1], unittest.equals('foo'));
1172 } 1292 }
1173 1293
1174 buildUnnamed673() { 1294 buildUnnamed896() {
1175 var o = new core.List<core.String>(); 1295 var o = new core.List<core.String>();
1176 o.add("foo"); 1296 o.add("foo");
1177 o.add("foo"); 1297 o.add("foo");
1178 return o; 1298 return o;
1179 } 1299 }
1180 1300
1181 checkUnnamed673(core.List<core.String> o) { 1301 checkUnnamed896(core.List<core.String> o) {
1182 unittest.expect(o, unittest.hasLength(2)); 1302 unittest.expect(o, unittest.hasLength(2));
1183 unittest.expect(o[0], unittest.equals('foo')); 1303 unittest.expect(o[0], unittest.equals('foo'));
1184 unittest.expect(o[1], unittest.equals('foo')); 1304 unittest.expect(o[1], unittest.equals('foo'));
1305 }
1306
1307 buildUnnamed897() {
1308 var o = new core.List<core.String>();
1309 o.add("foo");
1310 o.add("foo");
1311 return o;
1312 }
1313
1314 checkUnnamed897(core.List<core.String> o) {
1315 unittest.expect(o, unittest.hasLength(2));
1316 unittest.expect(o[0], unittest.equals('foo'));
1317 unittest.expect(o[1], unittest.equals('foo'));
1185 } 1318 }
1186 1319
1187 1320
1188 main() { 1321 main() {
1189 unittest.group("obj-schema-Assignment", () { 1322 unittest.group("obj-schema-Assignment", () {
1190 unittest.test("to-json--from-json", () { 1323 unittest.test("to-json--from-json", () {
1191 var o = buildAssignment(); 1324 var o = buildAssignment();
1192 var od = new api.Assignment.fromJson(o.toJson()); 1325 var od = new api.Assignment.fromJson(o.toJson());
1193 checkAssignment(od); 1326 checkAssignment(od);
1194 }); 1327 });
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
1305 1438
1306 unittest.group("obj-schema-GlobalPermission", () { 1439 unittest.group("obj-schema-GlobalPermission", () {
1307 unittest.test("to-json--from-json", () { 1440 unittest.test("to-json--from-json", () {
1308 var o = buildGlobalPermission(); 1441 var o = buildGlobalPermission();
1309 var od = new api.GlobalPermission.fromJson(o.toJson()); 1442 var od = new api.GlobalPermission.fromJson(o.toJson());
1310 checkGlobalPermission(od); 1443 checkGlobalPermission(od);
1311 }); 1444 });
1312 }); 1445 });
1313 1446
1314 1447
1448 unittest.group("obj-schema-Guardian", () {
1449 unittest.test("to-json--from-json", () {
1450 var o = buildGuardian();
1451 var od = new api.Guardian.fromJson(o.toJson());
1452 checkGuardian(od);
1453 });
1454 });
1455
1456
1457 unittest.group("obj-schema-GuardianInvitation", () {
1458 unittest.test("to-json--from-json", () {
1459 var o = buildGuardianInvitation();
1460 var od = new api.GuardianInvitation.fromJson(o.toJson());
1461 checkGuardianInvitation(od);
1462 });
1463 });
1464
1465
1315 unittest.group("obj-schema-Invitation", () { 1466 unittest.group("obj-schema-Invitation", () {
1316 unittest.test("to-json--from-json", () { 1467 unittest.test("to-json--from-json", () {
1317 var o = buildInvitation(); 1468 var o = buildInvitation();
1318 var od = new api.Invitation.fromJson(o.toJson()); 1469 var od = new api.Invitation.fromJson(o.toJson());
1319 checkInvitation(od); 1470 checkInvitation(od);
1320 }); 1471 });
1321 }); 1472 });
1322 1473
1323 1474
1324 unittest.group("obj-schema-Link", () { 1475 unittest.group("obj-schema-Link", () {
(...skipping 25 matching lines...) Expand all
1350 1501
1351 unittest.group("obj-schema-ListCoursesResponse", () { 1502 unittest.group("obj-schema-ListCoursesResponse", () {
1352 unittest.test("to-json--from-json", () { 1503 unittest.test("to-json--from-json", () {
1353 var o = buildListCoursesResponse(); 1504 var o = buildListCoursesResponse();
1354 var od = new api.ListCoursesResponse.fromJson(o.toJson()); 1505 var od = new api.ListCoursesResponse.fromJson(o.toJson());
1355 checkListCoursesResponse(od); 1506 checkListCoursesResponse(od);
1356 }); 1507 });
1357 }); 1508 });
1358 1509
1359 1510
1511 unittest.group("obj-schema-ListGuardianInvitationsResponse", () {
1512 unittest.test("to-json--from-json", () {
1513 var o = buildListGuardianInvitationsResponse();
1514 var od = new api.ListGuardianInvitationsResponse.fromJson(o.toJson());
1515 checkListGuardianInvitationsResponse(od);
1516 });
1517 });
1518
1519
1520 unittest.group("obj-schema-ListGuardiansResponse", () {
1521 unittest.test("to-json--from-json", () {
1522 var o = buildListGuardiansResponse();
1523 var od = new api.ListGuardiansResponse.fromJson(o.toJson());
1524 checkListGuardiansResponse(od);
1525 });
1526 });
1527
1528
1360 unittest.group("obj-schema-ListInvitationsResponse", () { 1529 unittest.group("obj-schema-ListInvitationsResponse", () {
1361 unittest.test("to-json--from-json", () { 1530 unittest.test("to-json--from-json", () {
1362 var o = buildListInvitationsResponse(); 1531 var o = buildListInvitationsResponse();
1363 var od = new api.ListInvitationsResponse.fromJson(o.toJson()); 1532 var od = new api.ListInvitationsResponse.fromJson(o.toJson());
1364 checkListInvitationsResponse(od); 1533 checkListInvitationsResponse(od);
1365 }); 1534 });
1366 }); 1535 });
1367 1536
1368 1537
1369 unittest.group("obj-schema-ListStudentSubmissionsResponse", () { 1538 unittest.group("obj-schema-ListStudentSubmissionsResponse", () {
(...skipping 745 matching lines...) Expand 10 before | Expand all | Expand 10 after
2115 res.get(arg_courseId, arg_id).then(unittest.expectAsync(((api.CourseWork r esponse) { 2284 res.get(arg_courseId, arg_id).then(unittest.expectAsync(((api.CourseWork r esponse) {
2116 checkCourseWork(response); 2285 checkCourseWork(response);
2117 }))); 2286 })));
2118 }); 2287 });
2119 2288
2120 unittest.test("method--list", () { 2289 unittest.test("method--list", () {
2121 2290
2122 var mock = new HttpServerMock(); 2291 var mock = new HttpServerMock();
2123 api.CoursesCourseWorkResourceApi res = new api.ClassroomApi(mock).courses. courseWork; 2292 api.CoursesCourseWorkResourceApi res = new api.ClassroomApi(mock).courses. courseWork;
2124 var arg_courseId = "foo"; 2293 var arg_courseId = "foo";
2125 var arg_courseWorkStates = buildUnnamed672(); 2294 var arg_courseWorkStates = buildUnnamed895();
2126 var arg_orderBy = "foo"; 2295 var arg_orderBy = "foo";
2127 var arg_pageSize = 42; 2296 var arg_pageSize = 42;
2128 var arg_pageToken = "foo"; 2297 var arg_pageToken = "foo";
2129 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 2298 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
2130 var path = (req.url).path; 2299 var path = (req.url).path;
2131 var pathOffset = 0; 2300 var pathOffset = 0;
2132 var index; 2301 var index;
2133 var subPart; 2302 var subPart;
2134 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 2303 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
2135 pathOffset += 1; 2304 pathOffset += 1;
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
2243 }))); 2412 })));
2244 }); 2413 });
2245 2414
2246 unittest.test("method--list", () { 2415 unittest.test("method--list", () {
2247 2416
2248 var mock = new HttpServerMock(); 2417 var mock = new HttpServerMock();
2249 api.CoursesCourseWorkStudentSubmissionsResourceApi res = new api.Classroom Api(mock).courses.courseWork.studentSubmissions; 2418 api.CoursesCourseWorkStudentSubmissionsResourceApi res = new api.Classroom Api(mock).courses.courseWork.studentSubmissions;
2250 var arg_courseId = "foo"; 2419 var arg_courseId = "foo";
2251 var arg_courseWorkId = "foo"; 2420 var arg_courseWorkId = "foo";
2252 var arg_userId = "foo"; 2421 var arg_userId = "foo";
2253 var arg_states = buildUnnamed673(); 2422 var arg_states = buildUnnamed896();
2254 var arg_late = "foo"; 2423 var arg_late = "foo";
2255 var arg_pageSize = 42; 2424 var arg_pageSize = 42;
2256 var arg_pageToken = "foo"; 2425 var arg_pageToken = "foo";
2257 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 2426 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
2258 var path = (req.url).path; 2427 var path = (req.url).path;
2259 var pathOffset = 0; 2428 var pathOffset = 0;
2260 var index; 2429 var index;
2261 var subPart; 2430 var subPart;
2262 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 2431 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
2263 pathOffset += 1; 2432 pathOffset += 1;
(...skipping 1145 matching lines...) Expand 10 before | Expand all | Expand 10 after
3409 return new async.Future.value(stringResponse(200, h, resp)); 3578 return new async.Future.value(stringResponse(200, h, resp));
3410 }), true); 3579 }), true);
3411 res.get(arg_userId).then(unittest.expectAsync(((api.UserProfile response) { 3580 res.get(arg_userId).then(unittest.expectAsync(((api.UserProfile response) {
3412 checkUserProfile(response); 3581 checkUserProfile(response);
3413 }))); 3582 })));
3414 }); 3583 });
3415 3584
3416 }); 3585 });
3417 3586
3418 3587
3588 unittest.group("resource-UserProfilesGuardianInvitationsResourceApi", () {
3589 unittest.test("method--create", () {
3590
3591 var mock = new HttpServerMock();
3592 api.UserProfilesGuardianInvitationsResourceApi res = new api.ClassroomApi( mock).userProfiles.guardianInvitations;
3593 var arg_request = buildGuardianInvitation();
3594 var arg_studentId = "foo";
3595 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
3596 var obj = new api.GuardianInvitation.fromJson(json);
3597 checkGuardianInvitation(obj);
3598
3599 var path = (req.url).path;
3600 var pathOffset = 0;
3601 var index;
3602 var subPart;
3603 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
3604 pathOffset += 1;
3605 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("v1/userProfiles/"));
3606 pathOffset += 16;
3607 index = path.indexOf("/guardianInvitations", pathOffset);
3608 unittest.expect(index >= 0, unittest.isTrue);
3609 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index ));
3610 pathOffset = index;
3611 unittest.expect(subPart, unittest.equals("$arg_studentId"));
3612 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq uals("/guardianInvitations"));
3613 pathOffset += 20;
3614
3615 var query = (req.url).query;
3616 var queryOffset = 0;
3617 var queryMap = {};
3618 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
3619 parseBool(n) {
3620 if (n == "true") return true;
3621 if (n == "false") return false;
3622 if (n == null) return null;
3623 throw new core.ArgumentError("Invalid boolean: $n");
3624 }
3625 if (query.length > 0) {
3626 for (var part in query.split("&")) {
3627 var keyvalue = part.split("=");
3628 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
3629 }
3630 }
3631
3632
3633 var h = {
3634 "content-type" : "application/json; charset=utf-8",
3635 };
3636 var resp = convert.JSON.encode(buildGuardianInvitation());
3637 return new async.Future.value(stringResponse(200, h, resp));
3638 }), true);
3639 res.create(arg_request, arg_studentId).then(unittest.expectAsync(((api.Gua rdianInvitation response) {
3640 checkGuardianInvitation(response);
3641 })));
3642 });
3643
3644 unittest.test("method--get", () {
3645
3646 var mock = new HttpServerMock();
3647 api.UserProfilesGuardianInvitationsResourceApi res = new api.ClassroomApi( mock).userProfiles.guardianInvitations;
3648 var arg_studentId = "foo";
3649 var arg_invitationId = "foo";
3650 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
3651 var path = (req.url).path;
3652 var pathOffset = 0;
3653 var index;
3654 var subPart;
3655 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
3656 pathOffset += 1;
3657 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("v1/userProfiles/"));
3658 pathOffset += 16;
3659 index = path.indexOf("/guardianInvitations/", pathOffset);
3660 unittest.expect(index >= 0, unittest.isTrue);
3661 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index ));
3662 pathOffset = index;
3663 unittest.expect(subPart, unittest.equals("$arg_studentId"));
3664 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq uals("/guardianInvitations/"));
3665 pathOffset += 21;
3666 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset));
3667 pathOffset = path.length;
3668 unittest.expect(subPart, unittest.equals("$arg_invitationId"));
3669
3670 var query = (req.url).query;
3671 var queryOffset = 0;
3672 var queryMap = {};
3673 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
3674 parseBool(n) {
3675 if (n == "true") return true;
3676 if (n == "false") return false;
3677 if (n == null) return null;
3678 throw new core.ArgumentError("Invalid boolean: $n");
3679 }
3680 if (query.length > 0) {
3681 for (var part in query.split("&")) {
3682 var keyvalue = part.split("=");
3683 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
3684 }
3685 }
3686
3687
3688 var h = {
3689 "content-type" : "application/json; charset=utf-8",
3690 };
3691 var resp = convert.JSON.encode(buildGuardianInvitation());
3692 return new async.Future.value(stringResponse(200, h, resp));
3693 }), true);
3694 res.get(arg_studentId, arg_invitationId).then(unittest.expectAsync(((api.G uardianInvitation response) {
3695 checkGuardianInvitation(response);
3696 })));
3697 });
3698
3699 unittest.test("method--list", () {
3700
3701 var mock = new HttpServerMock();
3702 api.UserProfilesGuardianInvitationsResourceApi res = new api.ClassroomApi( mock).userProfiles.guardianInvitations;
3703 var arg_studentId = "foo";
3704 var arg_invitedEmailAddress = "foo";
3705 var arg_states = buildUnnamed897();
3706 var arg_pageToken = "foo";
3707 var arg_pageSize = 42;
3708 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
3709 var path = (req.url).path;
3710 var pathOffset = 0;
3711 var index;
3712 var subPart;
3713 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
3714 pathOffset += 1;
3715 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("v1/userProfiles/"));
3716 pathOffset += 16;
3717 index = path.indexOf("/guardianInvitations", pathOffset);
3718 unittest.expect(index >= 0, unittest.isTrue);
3719 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index ));
3720 pathOffset = index;
3721 unittest.expect(subPart, unittest.equals("$arg_studentId"));
3722 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq uals("/guardianInvitations"));
3723 pathOffset += 20;
3724
3725 var query = (req.url).query;
3726 var queryOffset = 0;
3727 var queryMap = {};
3728 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
3729 parseBool(n) {
3730 if (n == "true") return true;
3731 if (n == "false") return false;
3732 if (n == null) return null;
3733 throw new core.ArgumentError("Invalid boolean: $n");
3734 }
3735 if (query.length > 0) {
3736 for (var part in query.split("&")) {
3737 var keyvalue = part.split("=");
3738 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
3739 }
3740 }
3741 unittest.expect(queryMap["invitedEmailAddress"].first, unittest.equals(a rg_invitedEmailAddress));
3742 unittest.expect(queryMap["states"], unittest.equals(arg_states));
3743 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en));
3744 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ als(arg_pageSize));
3745
3746
3747 var h = {
3748 "content-type" : "application/json; charset=utf-8",
3749 };
3750 var resp = convert.JSON.encode(buildListGuardianInvitationsResponse());
3751 return new async.Future.value(stringResponse(200, h, resp));
3752 }), true);
3753 res.list(arg_studentId, invitedEmailAddress: arg_invitedEmailAddress, stat es: arg_states, pageToken: arg_pageToken, pageSize: arg_pageSize).then(unittest. expectAsync(((api.ListGuardianInvitationsResponse response) {
3754 checkListGuardianInvitationsResponse(response);
3755 })));
3756 });
3757
3758 unittest.test("method--patch", () {
3759
3760 var mock = new HttpServerMock();
3761 api.UserProfilesGuardianInvitationsResourceApi res = new api.ClassroomApi( mock).userProfiles.guardianInvitations;
3762 var arg_request = buildGuardianInvitation();
3763 var arg_studentId = "foo";
3764 var arg_invitationId = "foo";
3765 var arg_updateMask = "foo";
3766 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
3767 var obj = new api.GuardianInvitation.fromJson(json);
3768 checkGuardianInvitation(obj);
3769
3770 var path = (req.url).path;
3771 var pathOffset = 0;
3772 var index;
3773 var subPart;
3774 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
3775 pathOffset += 1;
3776 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("v1/userProfiles/"));
3777 pathOffset += 16;
3778 index = path.indexOf("/guardianInvitations/", pathOffset);
3779 unittest.expect(index >= 0, unittest.isTrue);
3780 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index ));
3781 pathOffset = index;
3782 unittest.expect(subPart, unittest.equals("$arg_studentId"));
3783 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq uals("/guardianInvitations/"));
3784 pathOffset += 21;
3785 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset));
3786 pathOffset = path.length;
3787 unittest.expect(subPart, unittest.equals("$arg_invitationId"));
3788
3789 var query = (req.url).query;
3790 var queryOffset = 0;
3791 var queryMap = {};
3792 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
3793 parseBool(n) {
3794 if (n == "true") return true;
3795 if (n == "false") return false;
3796 if (n == null) return null;
3797 throw new core.ArgumentError("Invalid boolean: $n");
3798 }
3799 if (query.length > 0) {
3800 for (var part in query.split("&")) {
3801 var keyvalue = part.split("=");
3802 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
3803 }
3804 }
3805 unittest.expect(queryMap["updateMask"].first, unittest.equals(arg_update Mask));
3806
3807
3808 var h = {
3809 "content-type" : "application/json; charset=utf-8",
3810 };
3811 var resp = convert.JSON.encode(buildGuardianInvitation());
3812 return new async.Future.value(stringResponse(200, h, resp));
3813 }), true);
3814 res.patch(arg_request, arg_studentId, arg_invitationId, updateMask: arg_up dateMask).then(unittest.expectAsync(((api.GuardianInvitation response) {
3815 checkGuardianInvitation(response);
3816 })));
3817 });
3818
3819 });
3820
3821
3822 unittest.group("resource-UserProfilesGuardiansResourceApi", () {
3823 unittest.test("method--delete", () {
3824
3825 var mock = new HttpServerMock();
3826 api.UserProfilesGuardiansResourceApi res = new api.ClassroomApi(mock).user Profiles.guardians;
3827 var arg_studentId = "foo";
3828 var arg_guardianId = "foo";
3829 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
3830 var path = (req.url).path;
3831 var pathOffset = 0;
3832 var index;
3833 var subPart;
3834 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
3835 pathOffset += 1;
3836 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("v1/userProfiles/"));
3837 pathOffset += 16;
3838 index = path.indexOf("/guardians/", pathOffset);
3839 unittest.expect(index >= 0, unittest.isTrue);
3840 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index ));
3841 pathOffset = index;
3842 unittest.expect(subPart, unittest.equals("$arg_studentId"));
3843 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq uals("/guardians/"));
3844 pathOffset += 11;
3845 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset));
3846 pathOffset = path.length;
3847 unittest.expect(subPart, unittest.equals("$arg_guardianId"));
3848
3849 var query = (req.url).query;
3850 var queryOffset = 0;
3851 var queryMap = {};
3852 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
3853 parseBool(n) {
3854 if (n == "true") return true;
3855 if (n == "false") return false;
3856 if (n == null) return null;
3857 throw new core.ArgumentError("Invalid boolean: $n");
3858 }
3859 if (query.length > 0) {
3860 for (var part in query.split("&")) {
3861 var keyvalue = part.split("=");
3862 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
3863 }
3864 }
3865
3866
3867 var h = {
3868 "content-type" : "application/json; charset=utf-8",
3869 };
3870 var resp = convert.JSON.encode(buildEmpty());
3871 return new async.Future.value(stringResponse(200, h, resp));
3872 }), true);
3873 res.delete(arg_studentId, arg_guardianId).then(unittest.expectAsync(((api. Empty response) {
3874 checkEmpty(response);
3875 })));
3876 });
3877
3878 unittest.test("method--get", () {
3879
3880 var mock = new HttpServerMock();
3881 api.UserProfilesGuardiansResourceApi res = new api.ClassroomApi(mock).user Profiles.guardians;
3882 var arg_studentId = "foo";
3883 var arg_guardianId = "foo";
3884 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
3885 var path = (req.url).path;
3886 var pathOffset = 0;
3887 var index;
3888 var subPart;
3889 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
3890 pathOffset += 1;
3891 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("v1/userProfiles/"));
3892 pathOffset += 16;
3893 index = path.indexOf("/guardians/", pathOffset);
3894 unittest.expect(index >= 0, unittest.isTrue);
3895 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index ));
3896 pathOffset = index;
3897 unittest.expect(subPart, unittest.equals("$arg_studentId"));
3898 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq uals("/guardians/"));
3899 pathOffset += 11;
3900 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset));
3901 pathOffset = path.length;
3902 unittest.expect(subPart, unittest.equals("$arg_guardianId"));
3903
3904 var query = (req.url).query;
3905 var queryOffset = 0;
3906 var queryMap = {};
3907 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
3908 parseBool(n) {
3909 if (n == "true") return true;
3910 if (n == "false") return false;
3911 if (n == null) return null;
3912 throw new core.ArgumentError("Invalid boolean: $n");
3913 }
3914 if (query.length > 0) {
3915 for (var part in query.split("&")) {
3916 var keyvalue = part.split("=");
3917 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
3918 }
3919 }
3920
3921
3922 var h = {
3923 "content-type" : "application/json; charset=utf-8",
3924 };
3925 var resp = convert.JSON.encode(buildGuardian());
3926 return new async.Future.value(stringResponse(200, h, resp));
3927 }), true);
3928 res.get(arg_studentId, arg_guardianId).then(unittest.expectAsync(((api.Gua rdian response) {
3929 checkGuardian(response);
3930 })));
3931 });
3932
3933 unittest.test("method--list", () {
3934
3935 var mock = new HttpServerMock();
3936 api.UserProfilesGuardiansResourceApi res = new api.ClassroomApi(mock).user Profiles.guardians;
3937 var arg_studentId = "foo";
3938 var arg_invitedEmailAddress = "foo";
3939 var arg_pageToken = "foo";
3940 var arg_pageSize = 42;
3941 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
3942 var path = (req.url).path;
3943 var pathOffset = 0;
3944 var index;
3945 var subPart;
3946 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
3947 pathOffset += 1;
3948 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("v1/userProfiles/"));
3949 pathOffset += 16;
3950 index = path.indexOf("/guardians", pathOffset);
3951 unittest.expect(index >= 0, unittest.isTrue);
3952 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index ));
3953 pathOffset = index;
3954 unittest.expect(subPart, unittest.equals("$arg_studentId"));
3955 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq uals("/guardians"));
3956 pathOffset += 10;
3957
3958 var query = (req.url).query;
3959 var queryOffset = 0;
3960 var queryMap = {};
3961 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
3962 parseBool(n) {
3963 if (n == "true") return true;
3964 if (n == "false") return false;
3965 if (n == null) return null;
3966 throw new core.ArgumentError("Invalid boolean: $n");
3967 }
3968 if (query.length > 0) {
3969 for (var part in query.split("&")) {
3970 var keyvalue = part.split("=");
3971 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
3972 }
3973 }
3974 unittest.expect(queryMap["invitedEmailAddress"].first, unittest.equals(a rg_invitedEmailAddress));
3975 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en));
3976 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ als(arg_pageSize));
3977
3978
3979 var h = {
3980 "content-type" : "application/json; charset=utf-8",
3981 };
3982 var resp = convert.JSON.encode(buildListGuardiansResponse());
3983 return new async.Future.value(stringResponse(200, h, resp));
3984 }), true);
3985 res.list(arg_studentId, invitedEmailAddress: arg_invitedEmailAddress, page Token: arg_pageToken, pageSize: arg_pageSize).then(unittest.expectAsync(((api.Li stGuardiansResponse response) {
3986 checkListGuardiansResponse(response);
3987 })));
3988 });
3989
3990 });
3991
3992
3419 } 3993 }
3420 3994
OLDNEW
« no previous file with comments | « generated/googleapis/test/civicinfo/v2_test.dart ('k') | generated/googleapis/test/cloudbilling/v1_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698