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

Side by Side Diff: generated/googleapis/test/civicinfo/v2_test.dart

Issue 2485703002: Api-roll 42: 2016-11-08 (Closed)
Patch Set: Created 4 years, 1 month 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.civicinfo.v2.test; 1 library googleapis.civicinfo.v2.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
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 buildUnnamed2602() { 54 buildUnnamed2675() {
55 var o = new core.List<api.Source>(); 55 var o = new core.List<api.Source>();
56 o.add(buildSource()); 56 o.add(buildSource());
57 o.add(buildSource()); 57 o.add(buildSource());
58 return o; 58 return o;
59 } 59 }
60 60
61 checkUnnamed2602(core.List<api.Source> o) { 61 checkUnnamed2675(core.List<api.Source> o) {
62 unittest.expect(o, unittest.hasLength(2)); 62 unittest.expect(o, unittest.hasLength(2));
63 checkSource(o[0]); 63 checkSource(o[0]);
64 checkSource(o[1]); 64 checkSource(o[1]);
65 } 65 }
66 66
67 core.int buildCounterAdministrationRegion = 0; 67 core.int buildCounterAdministrationRegion = 0;
68 buildAdministrationRegion() { 68 buildAdministrationRegion() {
69 var o = new api.AdministrationRegion(); 69 var o = new api.AdministrationRegion();
70 buildCounterAdministrationRegion++; 70 buildCounterAdministrationRegion++;
71 if (buildCounterAdministrationRegion < 3) { 71 if (buildCounterAdministrationRegion < 3) {
72 o.electionAdministrationBody = buildAdministrativeBody(); 72 o.electionAdministrationBody = buildAdministrativeBody();
73 o.id = "foo"; 73 o.id = "foo";
74 o.localJurisdiction = buildAdministrationRegion(); 74 o.localJurisdiction = buildAdministrationRegion();
75 o.name = "foo"; 75 o.name = "foo";
76 o.sources = buildUnnamed2602(); 76 o.sources = buildUnnamed2675();
77 } 77 }
78 buildCounterAdministrationRegion--; 78 buildCounterAdministrationRegion--;
79 return o; 79 return o;
80 } 80 }
81 81
82 checkAdministrationRegion(api.AdministrationRegion o) { 82 checkAdministrationRegion(api.AdministrationRegion o) {
83 buildCounterAdministrationRegion++; 83 buildCounterAdministrationRegion++;
84 if (buildCounterAdministrationRegion < 3) { 84 if (buildCounterAdministrationRegion < 3) {
85 checkAdministrativeBody(o.electionAdministrationBody); 85 checkAdministrativeBody(o.electionAdministrationBody);
86 unittest.expect(o.id, unittest.equals('foo')); 86 unittest.expect(o.id, unittest.equals('foo'));
87 checkAdministrationRegion(o.localJurisdiction); 87 checkAdministrationRegion(o.localJurisdiction);
88 unittest.expect(o.name, unittest.equals('foo')); 88 unittest.expect(o.name, unittest.equals('foo'));
89 checkUnnamed2602(o.sources); 89 checkUnnamed2675(o.sources);
90 } 90 }
91 buildCounterAdministrationRegion--; 91 buildCounterAdministrationRegion--;
92 } 92 }
93 93
94 buildUnnamed2603() { 94 buildUnnamed2676() {
95 var o = new core.List<core.String>(); 95 var o = new core.List<core.String>();
96 o.add("foo"); 96 o.add("foo");
97 o.add("foo"); 97 o.add("foo");
98 return o; 98 return o;
99 } 99 }
100 100
101 checkUnnamed2603(core.List<core.String> o) { 101 checkUnnamed2676(core.List<core.String> o) {
102 unittest.expect(o, unittest.hasLength(2)); 102 unittest.expect(o, unittest.hasLength(2));
103 unittest.expect(o[0], unittest.equals('foo')); 103 unittest.expect(o[0], unittest.equals('foo'));
104 unittest.expect(o[1], unittest.equals('foo')); 104 unittest.expect(o[1], unittest.equals('foo'));
105 } 105 }
106 106
107 buildUnnamed2604() { 107 buildUnnamed2677() {
108 var o = new core.List<api.ElectionOfficial>(); 108 var o = new core.List<api.ElectionOfficial>();
109 o.add(buildElectionOfficial()); 109 o.add(buildElectionOfficial());
110 o.add(buildElectionOfficial()); 110 o.add(buildElectionOfficial());
111 return o; 111 return o;
112 } 112 }
113 113
114 checkUnnamed2604(core.List<api.ElectionOfficial> o) { 114 checkUnnamed2677(core.List<api.ElectionOfficial> o) {
115 unittest.expect(o, unittest.hasLength(2)); 115 unittest.expect(o, unittest.hasLength(2));
116 checkElectionOfficial(o[0]); 116 checkElectionOfficial(o[0]);
117 checkElectionOfficial(o[1]); 117 checkElectionOfficial(o[1]);
118 } 118 }
119 119
120 buildUnnamed2605() { 120 buildUnnamed2678() {
121 var o = new core.List<core.String>(); 121 var o = new core.List<core.String>();
122 o.add("foo"); 122 o.add("foo");
123 o.add("foo"); 123 o.add("foo");
124 return o; 124 return o;
125 } 125 }
126 126
127 checkUnnamed2605(core.List<core.String> o) { 127 checkUnnamed2678(core.List<core.String> o) {
128 unittest.expect(o, unittest.hasLength(2)); 128 unittest.expect(o, unittest.hasLength(2));
129 unittest.expect(o[0], unittest.equals('foo')); 129 unittest.expect(o[0], unittest.equals('foo'));
130 unittest.expect(o[1], unittest.equals('foo')); 130 unittest.expect(o[1], unittest.equals('foo'));
131 } 131 }
132 132
133 core.int buildCounterAdministrativeBody = 0; 133 core.int buildCounterAdministrativeBody = 0;
134 buildAdministrativeBody() { 134 buildAdministrativeBody() {
135 var o = new api.AdministrativeBody(); 135 var o = new api.AdministrativeBody();
136 buildCounterAdministrativeBody++; 136 buildCounterAdministrativeBody++;
137 if (buildCounterAdministrativeBody < 3) { 137 if (buildCounterAdministrativeBody < 3) {
138 o.absenteeVotingInfoUrl = "foo"; 138 o.absenteeVotingInfoUrl = "foo";
139 o.addressLines = buildUnnamed2603(); 139 o.addressLines = buildUnnamed2676();
140 o.ballotInfoUrl = "foo"; 140 o.ballotInfoUrl = "foo";
141 o.correspondenceAddress = buildSimpleAddressType(); 141 o.correspondenceAddress = buildSimpleAddressType();
142 o.electionInfoUrl = "foo"; 142 o.electionInfoUrl = "foo";
143 o.electionOfficials = buildUnnamed2604(); 143 o.electionOfficials = buildUnnamed2677();
144 o.electionRegistrationConfirmationUrl = "foo"; 144 o.electionRegistrationConfirmationUrl = "foo";
145 o.electionRegistrationUrl = "foo"; 145 o.electionRegistrationUrl = "foo";
146 o.electionRulesUrl = "foo"; 146 o.electionRulesUrl = "foo";
147 o.hoursOfOperation = "foo"; 147 o.hoursOfOperation = "foo";
148 o.name = "foo"; 148 o.name = "foo";
149 o.physicalAddress = buildSimpleAddressType(); 149 o.physicalAddress = buildSimpleAddressType();
150 o.voterServices = buildUnnamed2605(); 150 o.voterServices = buildUnnamed2678();
151 o.votingLocationFinderUrl = "foo"; 151 o.votingLocationFinderUrl = "foo";
152 } 152 }
153 buildCounterAdministrativeBody--; 153 buildCounterAdministrativeBody--;
154 return o; 154 return o;
155 } 155 }
156 156
157 checkAdministrativeBody(api.AdministrativeBody o) { 157 checkAdministrativeBody(api.AdministrativeBody o) {
158 buildCounterAdministrativeBody++; 158 buildCounterAdministrativeBody++;
159 if (buildCounterAdministrativeBody < 3) { 159 if (buildCounterAdministrativeBody < 3) {
160 unittest.expect(o.absenteeVotingInfoUrl, unittest.equals('foo')); 160 unittest.expect(o.absenteeVotingInfoUrl, unittest.equals('foo'));
161 checkUnnamed2603(o.addressLines); 161 checkUnnamed2676(o.addressLines);
162 unittest.expect(o.ballotInfoUrl, unittest.equals('foo')); 162 unittest.expect(o.ballotInfoUrl, unittest.equals('foo'));
163 checkSimpleAddressType(o.correspondenceAddress); 163 checkSimpleAddressType(o.correspondenceAddress);
164 unittest.expect(o.electionInfoUrl, unittest.equals('foo')); 164 unittest.expect(o.electionInfoUrl, unittest.equals('foo'));
165 checkUnnamed2604(o.electionOfficials); 165 checkUnnamed2677(o.electionOfficials);
166 unittest.expect(o.electionRegistrationConfirmationUrl, unittest.equals('foo' )); 166 unittest.expect(o.electionRegistrationConfirmationUrl, unittest.equals('foo' ));
167 unittest.expect(o.electionRegistrationUrl, unittest.equals('foo')); 167 unittest.expect(o.electionRegistrationUrl, unittest.equals('foo'));
168 unittest.expect(o.electionRulesUrl, unittest.equals('foo')); 168 unittest.expect(o.electionRulesUrl, unittest.equals('foo'));
169 unittest.expect(o.hoursOfOperation, unittest.equals('foo')); 169 unittest.expect(o.hoursOfOperation, unittest.equals('foo'));
170 unittest.expect(o.name, unittest.equals('foo')); 170 unittest.expect(o.name, unittest.equals('foo'));
171 checkSimpleAddressType(o.physicalAddress); 171 checkSimpleAddressType(o.physicalAddress);
172 checkUnnamed2605(o.voterServices); 172 checkUnnamed2678(o.voterServices);
173 unittest.expect(o.votingLocationFinderUrl, unittest.equals('foo')); 173 unittest.expect(o.votingLocationFinderUrl, unittest.equals('foo'));
174 } 174 }
175 buildCounterAdministrativeBody--; 175 buildCounterAdministrativeBody--;
176 } 176 }
177 177
178 buildUnnamed2606() { 178 buildUnnamed2679() {
179 var o = new core.List<api.Channel>(); 179 var o = new core.List<api.Channel>();
180 o.add(buildChannel()); 180 o.add(buildChannel());
181 o.add(buildChannel()); 181 o.add(buildChannel());
182 return o; 182 return o;
183 } 183 }
184 184
185 checkUnnamed2606(core.List<api.Channel> o) { 185 checkUnnamed2679(core.List<api.Channel> o) {
186 unittest.expect(o, unittest.hasLength(2)); 186 unittest.expect(o, unittest.hasLength(2));
187 checkChannel(o[0]); 187 checkChannel(o[0]);
188 checkChannel(o[1]); 188 checkChannel(o[1]);
189 } 189 }
190 190
191 core.int buildCounterCandidate = 0; 191 core.int buildCounterCandidate = 0;
192 buildCandidate() { 192 buildCandidate() {
193 var o = new api.Candidate(); 193 var o = new api.Candidate();
194 buildCounterCandidate++; 194 buildCounterCandidate++;
195 if (buildCounterCandidate < 3) { 195 if (buildCounterCandidate < 3) {
196 o.candidateUrl = "foo"; 196 o.candidateUrl = "foo";
197 o.channels = buildUnnamed2606(); 197 o.channels = buildUnnamed2679();
198 o.email = "foo"; 198 o.email = "foo";
199 o.name = "foo"; 199 o.name = "foo";
200 o.orderOnBallot = "foo"; 200 o.orderOnBallot = "foo";
201 o.party = "foo"; 201 o.party = "foo";
202 o.phone = "foo"; 202 o.phone = "foo";
203 o.photoUrl = "foo"; 203 o.photoUrl = "foo";
204 } 204 }
205 buildCounterCandidate--; 205 buildCounterCandidate--;
206 return o; 206 return o;
207 } 207 }
208 208
209 checkCandidate(api.Candidate o) { 209 checkCandidate(api.Candidate o) {
210 buildCounterCandidate++; 210 buildCounterCandidate++;
211 if (buildCounterCandidate < 3) { 211 if (buildCounterCandidate < 3) {
212 unittest.expect(o.candidateUrl, unittest.equals('foo')); 212 unittest.expect(o.candidateUrl, unittest.equals('foo'));
213 checkUnnamed2606(o.channels); 213 checkUnnamed2679(o.channels);
214 unittest.expect(o.email, unittest.equals('foo')); 214 unittest.expect(o.email, unittest.equals('foo'));
215 unittest.expect(o.name, unittest.equals('foo')); 215 unittest.expect(o.name, unittest.equals('foo'));
216 unittest.expect(o.orderOnBallot, unittest.equals('foo')); 216 unittest.expect(o.orderOnBallot, unittest.equals('foo'));
217 unittest.expect(o.party, unittest.equals('foo')); 217 unittest.expect(o.party, unittest.equals('foo'));
218 unittest.expect(o.phone, unittest.equals('foo')); 218 unittest.expect(o.phone, unittest.equals('foo'));
219 unittest.expect(o.photoUrl, unittest.equals('foo')); 219 unittest.expect(o.photoUrl, unittest.equals('foo'));
220 } 220 }
221 buildCounterCandidate--; 221 buildCounterCandidate--;
222 } 222 }
223 223
(...skipping 11 matching lines...) Expand all
235 235
236 checkChannel(api.Channel o) { 236 checkChannel(api.Channel o) {
237 buildCounterChannel++; 237 buildCounterChannel++;
238 if (buildCounterChannel < 3) { 238 if (buildCounterChannel < 3) {
239 unittest.expect(o.id, unittest.equals('foo')); 239 unittest.expect(o.id, unittest.equals('foo'));
240 unittest.expect(o.type, unittest.equals('foo')); 240 unittest.expect(o.type, unittest.equals('foo'));
241 } 241 }
242 buildCounterChannel--; 242 buildCounterChannel--;
243 } 243 }
244 244
245 buildUnnamed2607() { 245 buildUnnamed2680() {
246 var o = new core.List<api.Candidate>(); 246 var o = new core.List<api.Candidate>();
247 o.add(buildCandidate()); 247 o.add(buildCandidate());
248 o.add(buildCandidate()); 248 o.add(buildCandidate());
249 return o; 249 return o;
250 } 250 }
251 251
252 checkUnnamed2607(core.List<api.Candidate> o) { 252 checkUnnamed2680(core.List<api.Candidate> o) {
253 unittest.expect(o, unittest.hasLength(2)); 253 unittest.expect(o, unittest.hasLength(2));
254 checkCandidate(o[0]); 254 checkCandidate(o[0]);
255 checkCandidate(o[1]); 255 checkCandidate(o[1]);
256 } 256 }
257 257
258 buildUnnamed2608() { 258 buildUnnamed2681() {
259 var o = new core.List<core.String>(); 259 var o = new core.List<core.String>();
260 o.add("foo"); 260 o.add("foo");
261 o.add("foo"); 261 o.add("foo");
262 return o; 262 return o;
263 } 263 }
264 264
265 checkUnnamed2608(core.List<core.String> o) { 265 checkUnnamed2681(core.List<core.String> o) {
266 unittest.expect(o, unittest.hasLength(2)); 266 unittest.expect(o, unittest.hasLength(2));
267 unittest.expect(o[0], unittest.equals('foo')); 267 unittest.expect(o[0], unittest.equals('foo'));
268 unittest.expect(o[1], unittest.equals('foo')); 268 unittest.expect(o[1], unittest.equals('foo'));
269 } 269 }
270 270
271 buildUnnamed2609() { 271 buildUnnamed2682() {
272 var o = new core.List<core.String>(); 272 var o = new core.List<core.String>();
273 o.add("foo"); 273 o.add("foo");
274 o.add("foo"); 274 o.add("foo");
275 return o; 275 return o;
276 } 276 }
277 277
278 checkUnnamed2609(core.List<core.String> o) { 278 checkUnnamed2682(core.List<core.String> o) {
279 unittest.expect(o, unittest.hasLength(2)); 279 unittest.expect(o, unittest.hasLength(2));
280 unittest.expect(o[0], unittest.equals('foo')); 280 unittest.expect(o[0], unittest.equals('foo'));
281 unittest.expect(o[1], unittest.equals('foo')); 281 unittest.expect(o[1], unittest.equals('foo'));
282 } 282 }
283 283
284 buildUnnamed2610() { 284 buildUnnamed2683() {
285 var o = new core.List<core.String>(); 285 var o = new core.List<core.String>();
286 o.add("foo"); 286 o.add("foo");
287 o.add("foo"); 287 o.add("foo");
288 return o; 288 return o;
289 } 289 }
290 290
291 checkUnnamed2610(core.List<core.String> o) { 291 checkUnnamed2683(core.List<core.String> o) {
292 unittest.expect(o, unittest.hasLength(2)); 292 unittest.expect(o, unittest.hasLength(2));
293 unittest.expect(o[0], unittest.equals('foo')); 293 unittest.expect(o[0], unittest.equals('foo'));
294 unittest.expect(o[1], unittest.equals('foo')); 294 unittest.expect(o[1], unittest.equals('foo'));
295 } 295 }
296 296
297 buildUnnamed2611() { 297 buildUnnamed2684() {
298 var o = new core.List<api.Source>(); 298 var o = new core.List<api.Source>();
299 o.add(buildSource()); 299 o.add(buildSource());
300 o.add(buildSource()); 300 o.add(buildSource());
301 return o; 301 return o;
302 } 302 }
303 303
304 checkUnnamed2611(core.List<api.Source> o) { 304 checkUnnamed2684(core.List<api.Source> o) {
305 unittest.expect(o, unittest.hasLength(2)); 305 unittest.expect(o, unittest.hasLength(2));
306 checkSource(o[0]); 306 checkSource(o[0]);
307 checkSource(o[1]); 307 checkSource(o[1]);
308 } 308 }
309 309
310 core.int buildCounterContest = 0; 310 core.int buildCounterContest = 0;
311 buildContest() { 311 buildContest() {
312 var o = new api.Contest(); 312 var o = new api.Contest();
313 buildCounterContest++; 313 buildCounterContest++;
314 if (buildCounterContest < 3) { 314 if (buildCounterContest < 3) {
315 o.ballotPlacement = "foo"; 315 o.ballotPlacement = "foo";
316 o.candidates = buildUnnamed2607(); 316 o.candidates = buildUnnamed2680();
317 o.district = buildElectoralDistrict(); 317 o.district = buildElectoralDistrict();
318 o.electorateSpecifications = "foo"; 318 o.electorateSpecifications = "foo";
319 o.id = "foo"; 319 o.id = "foo";
320 o.level = buildUnnamed2608(); 320 o.level = buildUnnamed2681();
321 o.numberElected = "foo"; 321 o.numberElected = "foo";
322 o.numberVotingFor = "foo"; 322 o.numberVotingFor = "foo";
323 o.office = "foo"; 323 o.office = "foo";
324 o.primaryParty = "foo"; 324 o.primaryParty = "foo";
325 o.referendumBallotResponses = buildUnnamed2609(); 325 o.referendumBallotResponses = buildUnnamed2682();
326 o.referendumBrief = "foo"; 326 o.referendumBrief = "foo";
327 o.referendumConStatement = "foo"; 327 o.referendumConStatement = "foo";
328 o.referendumEffectOfAbstain = "foo"; 328 o.referendumEffectOfAbstain = "foo";
329 o.referendumPassageThreshold = "foo"; 329 o.referendumPassageThreshold = "foo";
330 o.referendumProStatement = "foo"; 330 o.referendumProStatement = "foo";
331 o.referendumSubtitle = "foo"; 331 o.referendumSubtitle = "foo";
332 o.referendumText = "foo"; 332 o.referendumText = "foo";
333 o.referendumTitle = "foo"; 333 o.referendumTitle = "foo";
334 o.referendumUrl = "foo"; 334 o.referendumUrl = "foo";
335 o.roles = buildUnnamed2610(); 335 o.roles = buildUnnamed2683();
336 o.sources = buildUnnamed2611(); 336 o.sources = buildUnnamed2684();
337 o.special = "foo"; 337 o.special = "foo";
338 o.type = "foo"; 338 o.type = "foo";
339 } 339 }
340 buildCounterContest--; 340 buildCounterContest--;
341 return o; 341 return o;
342 } 342 }
343 343
344 checkContest(api.Contest o) { 344 checkContest(api.Contest o) {
345 buildCounterContest++; 345 buildCounterContest++;
346 if (buildCounterContest < 3) { 346 if (buildCounterContest < 3) {
347 unittest.expect(o.ballotPlacement, unittest.equals('foo')); 347 unittest.expect(o.ballotPlacement, unittest.equals('foo'));
348 checkUnnamed2607(o.candidates); 348 checkUnnamed2680(o.candidates);
349 checkElectoralDistrict(o.district); 349 checkElectoralDistrict(o.district);
350 unittest.expect(o.electorateSpecifications, unittest.equals('foo')); 350 unittest.expect(o.electorateSpecifications, unittest.equals('foo'));
351 unittest.expect(o.id, unittest.equals('foo')); 351 unittest.expect(o.id, unittest.equals('foo'));
352 checkUnnamed2608(o.level); 352 checkUnnamed2681(o.level);
353 unittest.expect(o.numberElected, unittest.equals('foo')); 353 unittest.expect(o.numberElected, unittest.equals('foo'));
354 unittest.expect(o.numberVotingFor, unittest.equals('foo')); 354 unittest.expect(o.numberVotingFor, unittest.equals('foo'));
355 unittest.expect(o.office, unittest.equals('foo')); 355 unittest.expect(o.office, unittest.equals('foo'));
356 unittest.expect(o.primaryParty, unittest.equals('foo')); 356 unittest.expect(o.primaryParty, unittest.equals('foo'));
357 checkUnnamed2609(o.referendumBallotResponses); 357 checkUnnamed2682(o.referendumBallotResponses);
358 unittest.expect(o.referendumBrief, unittest.equals('foo')); 358 unittest.expect(o.referendumBrief, unittest.equals('foo'));
359 unittest.expect(o.referendumConStatement, unittest.equals('foo')); 359 unittest.expect(o.referendumConStatement, unittest.equals('foo'));
360 unittest.expect(o.referendumEffectOfAbstain, unittest.equals('foo')); 360 unittest.expect(o.referendumEffectOfAbstain, unittest.equals('foo'));
361 unittest.expect(o.referendumPassageThreshold, unittest.equals('foo')); 361 unittest.expect(o.referendumPassageThreshold, unittest.equals('foo'));
362 unittest.expect(o.referendumProStatement, unittest.equals('foo')); 362 unittest.expect(o.referendumProStatement, unittest.equals('foo'));
363 unittest.expect(o.referendumSubtitle, unittest.equals('foo')); 363 unittest.expect(o.referendumSubtitle, unittest.equals('foo'));
364 unittest.expect(o.referendumText, unittest.equals('foo')); 364 unittest.expect(o.referendumText, unittest.equals('foo'));
365 unittest.expect(o.referendumTitle, unittest.equals('foo')); 365 unittest.expect(o.referendumTitle, unittest.equals('foo'));
366 unittest.expect(o.referendumUrl, unittest.equals('foo')); 366 unittest.expect(o.referendumUrl, unittest.equals('foo'));
367 checkUnnamed2610(o.roles); 367 checkUnnamed2683(o.roles);
368 checkUnnamed2611(o.sources); 368 checkUnnamed2684(o.sources);
369 unittest.expect(o.special, unittest.equals('foo')); 369 unittest.expect(o.special, unittest.equals('foo'));
370 unittest.expect(o.type, unittest.equals('foo')); 370 unittest.expect(o.type, unittest.equals('foo'));
371 } 371 }
372 buildCounterContest--; 372 buildCounterContest--;
373 } 373 }
374 374
375 buildUnnamed2612() { 375 core.int buildCounterContextParams = 0;
376 buildContextParams() {
377 var o = new api.ContextParams();
378 buildCounterContextParams++;
379 if (buildCounterContextParams < 3) {
380 o.clientProfile = "foo";
381 }
382 buildCounterContextParams--;
383 return o;
384 }
385
386 checkContextParams(api.ContextParams o) {
387 buildCounterContextParams++;
388 if (buildCounterContextParams < 3) {
389 unittest.expect(o.clientProfile, unittest.equals('foo'));
390 }
391 buildCounterContextParams--;
392 }
393
394 core.int buildCounterDivisionRepresentativeInfoRequest = 0;
395 buildDivisionRepresentativeInfoRequest() {
396 var o = new api.DivisionRepresentativeInfoRequest();
397 buildCounterDivisionRepresentativeInfoRequest++;
398 if (buildCounterDivisionRepresentativeInfoRequest < 3) {
399 o.contextParams = buildContextParams();
400 }
401 buildCounterDivisionRepresentativeInfoRequest--;
402 return o;
403 }
404
405 checkDivisionRepresentativeInfoRequest(api.DivisionRepresentativeInfoRequest o) {
406 buildCounterDivisionRepresentativeInfoRequest++;
407 if (buildCounterDivisionRepresentativeInfoRequest < 3) {
408 checkContextParams(o.contextParams);
409 }
410 buildCounterDivisionRepresentativeInfoRequest--;
411 }
412
413 core.int buildCounterDivisionSearchRequest = 0;
414 buildDivisionSearchRequest() {
415 var o = new api.DivisionSearchRequest();
416 buildCounterDivisionSearchRequest++;
417 if (buildCounterDivisionSearchRequest < 3) {
418 o.contextParams = buildContextParams();
419 }
420 buildCounterDivisionSearchRequest--;
421 return o;
422 }
423
424 checkDivisionSearchRequest(api.DivisionSearchRequest o) {
425 buildCounterDivisionSearchRequest++;
426 if (buildCounterDivisionSearchRequest < 3) {
427 checkContextParams(o.contextParams);
428 }
429 buildCounterDivisionSearchRequest--;
430 }
431
432 buildUnnamed2685() {
376 var o = new core.List<api.DivisionSearchResult>(); 433 var o = new core.List<api.DivisionSearchResult>();
377 o.add(buildDivisionSearchResult()); 434 o.add(buildDivisionSearchResult());
378 o.add(buildDivisionSearchResult()); 435 o.add(buildDivisionSearchResult());
379 return o; 436 return o;
380 } 437 }
381 438
382 checkUnnamed2612(core.List<api.DivisionSearchResult> o) { 439 checkUnnamed2685(core.List<api.DivisionSearchResult> o) {
383 unittest.expect(o, unittest.hasLength(2)); 440 unittest.expect(o, unittest.hasLength(2));
384 checkDivisionSearchResult(o[0]); 441 checkDivisionSearchResult(o[0]);
385 checkDivisionSearchResult(o[1]); 442 checkDivisionSearchResult(o[1]);
386 } 443 }
387 444
388 core.int buildCounterDivisionSearchResponse = 0; 445 core.int buildCounterDivisionSearchResponse = 0;
389 buildDivisionSearchResponse() { 446 buildDivisionSearchResponse() {
390 var o = new api.DivisionSearchResponse(); 447 var o = new api.DivisionSearchResponse();
391 buildCounterDivisionSearchResponse++; 448 buildCounterDivisionSearchResponse++;
392 if (buildCounterDivisionSearchResponse < 3) { 449 if (buildCounterDivisionSearchResponse < 3) {
393 o.kind = "foo"; 450 o.kind = "foo";
394 o.results = buildUnnamed2612(); 451 o.results = buildUnnamed2685();
395 } 452 }
396 buildCounterDivisionSearchResponse--; 453 buildCounterDivisionSearchResponse--;
397 return o; 454 return o;
398 } 455 }
399 456
400 checkDivisionSearchResponse(api.DivisionSearchResponse o) { 457 checkDivisionSearchResponse(api.DivisionSearchResponse o) {
401 buildCounterDivisionSearchResponse++; 458 buildCounterDivisionSearchResponse++;
402 if (buildCounterDivisionSearchResponse < 3) { 459 if (buildCounterDivisionSearchResponse < 3) {
403 unittest.expect(o.kind, unittest.equals('foo')); 460 unittest.expect(o.kind, unittest.equals('foo'));
404 checkUnnamed2612(o.results); 461 checkUnnamed2685(o.results);
405 } 462 }
406 buildCounterDivisionSearchResponse--; 463 buildCounterDivisionSearchResponse--;
407 } 464 }
408 465
409 buildUnnamed2613() { 466 buildUnnamed2686() {
410 var o = new core.List<core.String>(); 467 var o = new core.List<core.String>();
411 o.add("foo"); 468 o.add("foo");
412 o.add("foo"); 469 o.add("foo");
413 return o; 470 return o;
414 } 471 }
415 472
416 checkUnnamed2613(core.List<core.String> o) { 473 checkUnnamed2686(core.List<core.String> o) {
417 unittest.expect(o, unittest.hasLength(2)); 474 unittest.expect(o, unittest.hasLength(2));
418 unittest.expect(o[0], unittest.equals('foo')); 475 unittest.expect(o[0], unittest.equals('foo'));
419 unittest.expect(o[1], unittest.equals('foo')); 476 unittest.expect(o[1], unittest.equals('foo'));
420 } 477 }
421 478
422 core.int buildCounterDivisionSearchResult = 0; 479 core.int buildCounterDivisionSearchResult = 0;
423 buildDivisionSearchResult() { 480 buildDivisionSearchResult() {
424 var o = new api.DivisionSearchResult(); 481 var o = new api.DivisionSearchResult();
425 buildCounterDivisionSearchResult++; 482 buildCounterDivisionSearchResult++;
426 if (buildCounterDivisionSearchResult < 3) { 483 if (buildCounterDivisionSearchResult < 3) {
427 o.aliases = buildUnnamed2613(); 484 o.aliases = buildUnnamed2686();
428 o.name = "foo"; 485 o.name = "foo";
429 o.ocdId = "foo"; 486 o.ocdId = "foo";
430 } 487 }
431 buildCounterDivisionSearchResult--; 488 buildCounterDivisionSearchResult--;
432 return o; 489 return o;
433 } 490 }
434 491
435 checkDivisionSearchResult(api.DivisionSearchResult o) { 492 checkDivisionSearchResult(api.DivisionSearchResult o) {
436 buildCounterDivisionSearchResult++; 493 buildCounterDivisionSearchResult++;
437 if (buildCounterDivisionSearchResult < 3) { 494 if (buildCounterDivisionSearchResult < 3) {
438 checkUnnamed2613(o.aliases); 495 checkUnnamed2686(o.aliases);
439 unittest.expect(o.name, unittest.equals('foo')); 496 unittest.expect(o.name, unittest.equals('foo'));
440 unittest.expect(o.ocdId, unittest.equals('foo')); 497 unittest.expect(o.ocdId, unittest.equals('foo'));
441 } 498 }
442 buildCounterDivisionSearchResult--; 499 buildCounterDivisionSearchResult--;
443 } 500 }
444 501
445 core.int buildCounterElection = 0; 502 core.int buildCounterElection = 0;
446 buildElection() { 503 buildElection() {
447 var o = new api.Election(); 504 var o = new api.Election();
448 buildCounterElection++; 505 buildCounterElection++;
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
487 if (buildCounterElectionOfficial < 3) { 544 if (buildCounterElectionOfficial < 3) {
488 unittest.expect(o.emailAddress, unittest.equals('foo')); 545 unittest.expect(o.emailAddress, unittest.equals('foo'));
489 unittest.expect(o.faxNumber, unittest.equals('foo')); 546 unittest.expect(o.faxNumber, unittest.equals('foo'));
490 unittest.expect(o.name, unittest.equals('foo')); 547 unittest.expect(o.name, unittest.equals('foo'));
491 unittest.expect(o.officePhoneNumber, unittest.equals('foo')); 548 unittest.expect(o.officePhoneNumber, unittest.equals('foo'));
492 unittest.expect(o.title, unittest.equals('foo')); 549 unittest.expect(o.title, unittest.equals('foo'));
493 } 550 }
494 buildCounterElectionOfficial--; 551 buildCounterElectionOfficial--;
495 } 552 }
496 553
497 buildUnnamed2614() { 554 core.int buildCounterElectionsQueryRequest = 0;
555 buildElectionsQueryRequest() {
556 var o = new api.ElectionsQueryRequest();
557 buildCounterElectionsQueryRequest++;
558 if (buildCounterElectionsQueryRequest < 3) {
559 o.contextParams = buildContextParams();
560 }
561 buildCounterElectionsQueryRequest--;
562 return o;
563 }
564
565 checkElectionsQueryRequest(api.ElectionsQueryRequest o) {
566 buildCounterElectionsQueryRequest++;
567 if (buildCounterElectionsQueryRequest < 3) {
568 checkContextParams(o.contextParams);
569 }
570 buildCounterElectionsQueryRequest--;
571 }
572
573 buildUnnamed2687() {
498 var o = new core.List<api.Election>(); 574 var o = new core.List<api.Election>();
499 o.add(buildElection()); 575 o.add(buildElection());
500 o.add(buildElection()); 576 o.add(buildElection());
501 return o; 577 return o;
502 } 578 }
503 579
504 checkUnnamed2614(core.List<api.Election> o) { 580 checkUnnamed2687(core.List<api.Election> o) {
505 unittest.expect(o, unittest.hasLength(2)); 581 unittest.expect(o, unittest.hasLength(2));
506 checkElection(o[0]); 582 checkElection(o[0]);
507 checkElection(o[1]); 583 checkElection(o[1]);
508 } 584 }
509 585
510 core.int buildCounterElectionsQueryResponse = 0; 586 core.int buildCounterElectionsQueryResponse = 0;
511 buildElectionsQueryResponse() { 587 buildElectionsQueryResponse() {
512 var o = new api.ElectionsQueryResponse(); 588 var o = new api.ElectionsQueryResponse();
513 buildCounterElectionsQueryResponse++; 589 buildCounterElectionsQueryResponse++;
514 if (buildCounterElectionsQueryResponse < 3) { 590 if (buildCounterElectionsQueryResponse < 3) {
515 o.elections = buildUnnamed2614(); 591 o.elections = buildUnnamed2687();
516 o.kind = "foo"; 592 o.kind = "foo";
517 } 593 }
518 buildCounterElectionsQueryResponse--; 594 buildCounterElectionsQueryResponse--;
519 return o; 595 return o;
520 } 596 }
521 597
522 checkElectionsQueryResponse(api.ElectionsQueryResponse o) { 598 checkElectionsQueryResponse(api.ElectionsQueryResponse o) {
523 buildCounterElectionsQueryResponse++; 599 buildCounterElectionsQueryResponse++;
524 if (buildCounterElectionsQueryResponse < 3) { 600 if (buildCounterElectionsQueryResponse < 3) {
525 checkUnnamed2614(o.elections); 601 checkUnnamed2687(o.elections);
526 unittest.expect(o.kind, unittest.equals('foo')); 602 unittest.expect(o.kind, unittest.equals('foo'));
527 } 603 }
528 buildCounterElectionsQueryResponse--; 604 buildCounterElectionsQueryResponse--;
529 } 605 }
530 606
531 core.int buildCounterElectoralDistrict = 0; 607 core.int buildCounterElectoralDistrict = 0;
532 buildElectoralDistrict() { 608 buildElectoralDistrict() {
533 var o = new api.ElectoralDistrict(); 609 var o = new api.ElectoralDistrict();
534 buildCounterElectoralDistrict++; 610 buildCounterElectoralDistrict++;
535 if (buildCounterElectoralDistrict < 3) { 611 if (buildCounterElectoralDistrict < 3) {
(...skipping 10 matching lines...) Expand all
546 buildCounterElectoralDistrict++; 622 buildCounterElectoralDistrict++;
547 if (buildCounterElectoralDistrict < 3) { 623 if (buildCounterElectoralDistrict < 3) {
548 unittest.expect(o.id, unittest.equals('foo')); 624 unittest.expect(o.id, unittest.equals('foo'));
549 unittest.expect(o.kgForeignKey, unittest.equals('foo')); 625 unittest.expect(o.kgForeignKey, unittest.equals('foo'));
550 unittest.expect(o.name, unittest.equals('foo')); 626 unittest.expect(o.name, unittest.equals('foo'));
551 unittest.expect(o.scope, unittest.equals('foo')); 627 unittest.expect(o.scope, unittest.equals('foo'));
552 } 628 }
553 buildCounterElectoralDistrict--; 629 buildCounterElectoralDistrict--;
554 } 630 }
555 631
556 buildUnnamed2615() { 632 buildUnnamed2688() {
557 var o = new core.List<core.String>(); 633 var o = new core.List<core.String>();
558 o.add("foo"); 634 o.add("foo");
559 o.add("foo"); 635 o.add("foo");
560 return o; 636 return o;
561 } 637 }
562 638
563 checkUnnamed2615(core.List<core.String> o) { 639 checkUnnamed2688(core.List<core.String> o) {
564 unittest.expect(o, unittest.hasLength(2)); 640 unittest.expect(o, unittest.hasLength(2));
565 unittest.expect(o[0], unittest.equals('foo')); 641 unittest.expect(o[0], unittest.equals('foo'));
566 unittest.expect(o[1], unittest.equals('foo')); 642 unittest.expect(o[1], unittest.equals('foo'));
567 } 643 }
568 644
569 buildUnnamed2616() { 645 buildUnnamed2689() {
570 var o = new core.List<core.int>(); 646 var o = new core.List<core.int>();
571 o.add(42); 647 o.add(42);
572 o.add(42); 648 o.add(42);
573 return o; 649 return o;
574 } 650 }
575 651
576 checkUnnamed2616(core.List<core.int> o) { 652 checkUnnamed2689(core.List<core.int> o) {
577 unittest.expect(o, unittest.hasLength(2)); 653 unittest.expect(o, unittest.hasLength(2));
578 unittest.expect(o[0], unittest.equals(42)); 654 unittest.expect(o[0], unittest.equals(42));
579 unittest.expect(o[1], unittest.equals(42)); 655 unittest.expect(o[1], unittest.equals(42));
580 } 656 }
581 657
582 core.int buildCounterGeographicDivision = 0; 658 core.int buildCounterGeographicDivision = 0;
583 buildGeographicDivision() { 659 buildGeographicDivision() {
584 var o = new api.GeographicDivision(); 660 var o = new api.GeographicDivision();
585 buildCounterGeographicDivision++; 661 buildCounterGeographicDivision++;
586 if (buildCounterGeographicDivision < 3) { 662 if (buildCounterGeographicDivision < 3) {
587 o.alsoKnownAs = buildUnnamed2615(); 663 o.alsoKnownAs = buildUnnamed2688();
588 o.name = "foo"; 664 o.name = "foo";
589 o.officeIndices = buildUnnamed2616(); 665 o.officeIndices = buildUnnamed2689();
590 } 666 }
591 buildCounterGeographicDivision--; 667 buildCounterGeographicDivision--;
592 return o; 668 return o;
593 } 669 }
594 670
595 checkGeographicDivision(api.GeographicDivision o) { 671 checkGeographicDivision(api.GeographicDivision o) {
596 buildCounterGeographicDivision++; 672 buildCounterGeographicDivision++;
597 if (buildCounterGeographicDivision < 3) { 673 if (buildCounterGeographicDivision < 3) {
598 checkUnnamed2615(o.alsoKnownAs); 674 checkUnnamed2688(o.alsoKnownAs);
599 unittest.expect(o.name, unittest.equals('foo')); 675 unittest.expect(o.name, unittest.equals('foo'));
600 checkUnnamed2616(o.officeIndices); 676 checkUnnamed2689(o.officeIndices);
601 } 677 }
602 buildCounterGeographicDivision--; 678 buildCounterGeographicDivision--;
603 } 679 }
604 680
605 buildUnnamed2617() { 681 buildUnnamed2690() {
606 var o = new core.List<core.String>(); 682 var o = new core.List<core.String>();
607 o.add("foo"); 683 o.add("foo");
608 o.add("foo"); 684 o.add("foo");
609 return o; 685 return o;
610 } 686 }
611 687
612 checkUnnamed2617(core.List<core.String> o) { 688 checkUnnamed2690(core.List<core.String> o) {
613 unittest.expect(o, unittest.hasLength(2)); 689 unittest.expect(o, unittest.hasLength(2));
614 unittest.expect(o[0], unittest.equals('foo')); 690 unittest.expect(o[0], unittest.equals('foo'));
615 unittest.expect(o[1], unittest.equals('foo')); 691 unittest.expect(o[1], unittest.equals('foo'));
616 } 692 }
617 693
618 buildUnnamed2618() { 694 buildUnnamed2691() {
619 var o = new core.List<core.int>(); 695 var o = new core.List<core.int>();
620 o.add(42); 696 o.add(42);
621 o.add(42); 697 o.add(42);
622 return o; 698 return o;
623 } 699 }
624 700
625 checkUnnamed2618(core.List<core.int> o) { 701 checkUnnamed2691(core.List<core.int> o) {
626 unittest.expect(o, unittest.hasLength(2)); 702 unittest.expect(o, unittest.hasLength(2));
627 unittest.expect(o[0], unittest.equals(42)); 703 unittest.expect(o[0], unittest.equals(42));
628 unittest.expect(o[1], unittest.equals(42)); 704 unittest.expect(o[1], unittest.equals(42));
629 } 705 }
630 706
631 buildUnnamed2619() { 707 buildUnnamed2692() {
632 var o = new core.List<core.String>(); 708 var o = new core.List<core.String>();
633 o.add("foo"); 709 o.add("foo");
634 o.add("foo"); 710 o.add("foo");
635 return o; 711 return o;
636 } 712 }
637 713
638 checkUnnamed2619(core.List<core.String> o) { 714 checkUnnamed2692(core.List<core.String> o) {
639 unittest.expect(o, unittest.hasLength(2)); 715 unittest.expect(o, unittest.hasLength(2));
640 unittest.expect(o[0], unittest.equals('foo')); 716 unittest.expect(o[0], unittest.equals('foo'));
641 unittest.expect(o[1], unittest.equals('foo')); 717 unittest.expect(o[1], unittest.equals('foo'));
642 } 718 }
643 719
644 buildUnnamed2620() { 720 buildUnnamed2693() {
645 var o = new core.List<api.Source>(); 721 var o = new core.List<api.Source>();
646 o.add(buildSource()); 722 o.add(buildSource());
647 o.add(buildSource()); 723 o.add(buildSource());
648 return o; 724 return o;
649 } 725 }
650 726
651 checkUnnamed2620(core.List<api.Source> o) { 727 checkUnnamed2693(core.List<api.Source> o) {
652 unittest.expect(o, unittest.hasLength(2)); 728 unittest.expect(o, unittest.hasLength(2));
653 checkSource(o[0]); 729 checkSource(o[0]);
654 checkSource(o[1]); 730 checkSource(o[1]);
655 } 731 }
656 732
657 core.int buildCounterOffice = 0; 733 core.int buildCounterOffice = 0;
658 buildOffice() { 734 buildOffice() {
659 var o = new api.Office(); 735 var o = new api.Office();
660 buildCounterOffice++; 736 buildCounterOffice++;
661 if (buildCounterOffice < 3) { 737 if (buildCounterOffice < 3) {
662 o.divisionId = "foo"; 738 o.divisionId = "foo";
663 o.levels = buildUnnamed2617(); 739 o.levels = buildUnnamed2690();
664 o.name = "foo"; 740 o.name = "foo";
665 o.officialIndices = buildUnnamed2618(); 741 o.officialIndices = buildUnnamed2691();
666 o.roles = buildUnnamed2619(); 742 o.roles = buildUnnamed2692();
667 o.sources = buildUnnamed2620(); 743 o.sources = buildUnnamed2693();
668 } 744 }
669 buildCounterOffice--; 745 buildCounterOffice--;
670 return o; 746 return o;
671 } 747 }
672 748
673 checkOffice(api.Office o) { 749 checkOffice(api.Office o) {
674 buildCounterOffice++; 750 buildCounterOffice++;
675 if (buildCounterOffice < 3) { 751 if (buildCounterOffice < 3) {
676 unittest.expect(o.divisionId, unittest.equals('foo')); 752 unittest.expect(o.divisionId, unittest.equals('foo'));
677 checkUnnamed2617(o.levels); 753 checkUnnamed2690(o.levels);
678 unittest.expect(o.name, unittest.equals('foo')); 754 unittest.expect(o.name, unittest.equals('foo'));
679 checkUnnamed2618(o.officialIndices); 755 checkUnnamed2691(o.officialIndices);
680 checkUnnamed2619(o.roles); 756 checkUnnamed2692(o.roles);
681 checkUnnamed2620(o.sources); 757 checkUnnamed2693(o.sources);
682 } 758 }
683 buildCounterOffice--; 759 buildCounterOffice--;
684 } 760 }
685 761
686 buildUnnamed2621() { 762 buildUnnamed2694() {
687 var o = new core.List<api.SimpleAddressType>(); 763 var o = new core.List<api.SimpleAddressType>();
688 o.add(buildSimpleAddressType()); 764 o.add(buildSimpleAddressType());
689 o.add(buildSimpleAddressType()); 765 o.add(buildSimpleAddressType());
690 return o; 766 return o;
691 } 767 }
692 768
693 checkUnnamed2621(core.List<api.SimpleAddressType> o) { 769 checkUnnamed2694(core.List<api.SimpleAddressType> o) {
694 unittest.expect(o, unittest.hasLength(2)); 770 unittest.expect(o, unittest.hasLength(2));
695 checkSimpleAddressType(o[0]); 771 checkSimpleAddressType(o[0]);
696 checkSimpleAddressType(o[1]); 772 checkSimpleAddressType(o[1]);
697 } 773 }
698 774
699 buildUnnamed2622() { 775 buildUnnamed2695() {
700 var o = new core.List<api.Channel>(); 776 var o = new core.List<api.Channel>();
701 o.add(buildChannel()); 777 o.add(buildChannel());
702 o.add(buildChannel()); 778 o.add(buildChannel());
703 return o; 779 return o;
704 } 780 }
705 781
706 checkUnnamed2622(core.List<api.Channel> o) { 782 checkUnnamed2695(core.List<api.Channel> o) {
707 unittest.expect(o, unittest.hasLength(2)); 783 unittest.expect(o, unittest.hasLength(2));
708 checkChannel(o[0]); 784 checkChannel(o[0]);
709 checkChannel(o[1]); 785 checkChannel(o[1]);
710 } 786 }
711 787
712 buildUnnamed2623() { 788 buildUnnamed2696() {
713 var o = new core.List<core.String>(); 789 var o = new core.List<core.String>();
714 o.add("foo"); 790 o.add("foo");
715 o.add("foo"); 791 o.add("foo");
716 return o; 792 return o;
717 } 793 }
718 794
719 checkUnnamed2623(core.List<core.String> o) { 795 checkUnnamed2696(core.List<core.String> o) {
720 unittest.expect(o, unittest.hasLength(2)); 796 unittest.expect(o, unittest.hasLength(2));
721 unittest.expect(o[0], unittest.equals('foo')); 797 unittest.expect(o[0], unittest.equals('foo'));
722 unittest.expect(o[1], unittest.equals('foo')); 798 unittest.expect(o[1], unittest.equals('foo'));
723 } 799 }
724 800
725 buildUnnamed2624() { 801 buildUnnamed2697() {
726 var o = new core.List<core.String>(); 802 var o = new core.List<core.String>();
727 o.add("foo"); 803 o.add("foo");
728 o.add("foo"); 804 o.add("foo");
729 return o; 805 return o;
730 } 806 }
731 807
732 checkUnnamed2624(core.List<core.String> o) { 808 checkUnnamed2697(core.List<core.String> o) {
733 unittest.expect(o, unittest.hasLength(2)); 809 unittest.expect(o, unittest.hasLength(2));
734 unittest.expect(o[0], unittest.equals('foo')); 810 unittest.expect(o[0], unittest.equals('foo'));
735 unittest.expect(o[1], unittest.equals('foo')); 811 unittest.expect(o[1], unittest.equals('foo'));
736 } 812 }
737 813
738 buildUnnamed2625() { 814 buildUnnamed2698() {
739 var o = new core.List<core.String>(); 815 var o = new core.List<core.String>();
740 o.add("foo"); 816 o.add("foo");
741 o.add("foo"); 817 o.add("foo");
742 return o; 818 return o;
743 } 819 }
744 820
745 checkUnnamed2625(core.List<core.String> o) { 821 checkUnnamed2698(core.List<core.String> o) {
746 unittest.expect(o, unittest.hasLength(2)); 822 unittest.expect(o, unittest.hasLength(2));
747 unittest.expect(o[0], unittest.equals('foo')); 823 unittest.expect(o[0], unittest.equals('foo'));
748 unittest.expect(o[1], unittest.equals('foo')); 824 unittest.expect(o[1], unittest.equals('foo'));
749 } 825 }
750 826
751 core.int buildCounterOfficial = 0; 827 core.int buildCounterOfficial = 0;
752 buildOfficial() { 828 buildOfficial() {
753 var o = new api.Official(); 829 var o = new api.Official();
754 buildCounterOfficial++; 830 buildCounterOfficial++;
755 if (buildCounterOfficial < 3) { 831 if (buildCounterOfficial < 3) {
756 o.address = buildUnnamed2621(); 832 o.address = buildUnnamed2694();
757 o.channels = buildUnnamed2622(); 833 o.channels = buildUnnamed2695();
758 o.emails = buildUnnamed2623(); 834 o.emails = buildUnnamed2696();
759 o.name = "foo"; 835 o.name = "foo";
760 o.party = "foo"; 836 o.party = "foo";
761 o.phones = buildUnnamed2624(); 837 o.phones = buildUnnamed2697();
762 o.photoUrl = "foo"; 838 o.photoUrl = "foo";
763 o.urls = buildUnnamed2625(); 839 o.urls = buildUnnamed2698();
764 } 840 }
765 buildCounterOfficial--; 841 buildCounterOfficial--;
766 return o; 842 return o;
767 } 843 }
768 844
769 checkOfficial(api.Official o) { 845 checkOfficial(api.Official o) {
770 buildCounterOfficial++; 846 buildCounterOfficial++;
771 if (buildCounterOfficial < 3) { 847 if (buildCounterOfficial < 3) {
772 checkUnnamed2621(o.address); 848 checkUnnamed2694(o.address);
773 checkUnnamed2622(o.channels); 849 checkUnnamed2695(o.channels);
774 checkUnnamed2623(o.emails); 850 checkUnnamed2696(o.emails);
775 unittest.expect(o.name, unittest.equals('foo')); 851 unittest.expect(o.name, unittest.equals('foo'));
776 unittest.expect(o.party, unittest.equals('foo')); 852 unittest.expect(o.party, unittest.equals('foo'));
777 checkUnnamed2624(o.phones); 853 checkUnnamed2697(o.phones);
778 unittest.expect(o.photoUrl, unittest.equals('foo')); 854 unittest.expect(o.photoUrl, unittest.equals('foo'));
779 checkUnnamed2625(o.urls); 855 checkUnnamed2698(o.urls);
780 } 856 }
781 buildCounterOfficial--; 857 buildCounterOfficial--;
782 } 858 }
783 859
784 buildUnnamed2626() { 860 buildUnnamed2699() {
785 var o = new core.List<api.Source>(); 861 var o = new core.List<api.Source>();
786 o.add(buildSource()); 862 o.add(buildSource());
787 o.add(buildSource()); 863 o.add(buildSource());
788 return o; 864 return o;
789 } 865 }
790 866
791 checkUnnamed2626(core.List<api.Source> o) { 867 checkUnnamed2699(core.List<api.Source> o) {
792 unittest.expect(o, unittest.hasLength(2)); 868 unittest.expect(o, unittest.hasLength(2));
793 checkSource(o[0]); 869 checkSource(o[0]);
794 checkSource(o[1]); 870 checkSource(o[1]);
795 } 871 }
796 872
797 core.int buildCounterPollingLocation = 0; 873 core.int buildCounterPollingLocation = 0;
798 buildPollingLocation() { 874 buildPollingLocation() {
799 var o = new api.PollingLocation(); 875 var o = new api.PollingLocation();
800 buildCounterPollingLocation++; 876 buildCounterPollingLocation++;
801 if (buildCounterPollingLocation < 3) { 877 if (buildCounterPollingLocation < 3) {
802 o.address = buildSimpleAddressType(); 878 o.address = buildSimpleAddressType();
803 o.endDate = "foo"; 879 o.endDate = "foo";
804 o.id = "foo"; 880 o.id = "foo";
805 o.name = "foo"; 881 o.name = "foo";
806 o.notes = "foo"; 882 o.notes = "foo";
807 o.pollingHours = "foo"; 883 o.pollingHours = "foo";
808 o.sources = buildUnnamed2626(); 884 o.sources = buildUnnamed2699();
809 o.startDate = "foo"; 885 o.startDate = "foo";
810 o.voterServices = "foo"; 886 o.voterServices = "foo";
811 } 887 }
812 buildCounterPollingLocation--; 888 buildCounterPollingLocation--;
813 return o; 889 return o;
814 } 890 }
815 891
816 checkPollingLocation(api.PollingLocation o) { 892 checkPollingLocation(api.PollingLocation o) {
817 buildCounterPollingLocation++; 893 buildCounterPollingLocation++;
818 if (buildCounterPollingLocation < 3) { 894 if (buildCounterPollingLocation < 3) {
819 checkSimpleAddressType(o.address); 895 checkSimpleAddressType(o.address);
820 unittest.expect(o.endDate, unittest.equals('foo')); 896 unittest.expect(o.endDate, unittest.equals('foo'));
821 unittest.expect(o.id, unittest.equals('foo')); 897 unittest.expect(o.id, unittest.equals('foo'));
822 unittest.expect(o.name, unittest.equals('foo')); 898 unittest.expect(o.name, unittest.equals('foo'));
823 unittest.expect(o.notes, unittest.equals('foo')); 899 unittest.expect(o.notes, unittest.equals('foo'));
824 unittest.expect(o.pollingHours, unittest.equals('foo')); 900 unittest.expect(o.pollingHours, unittest.equals('foo'));
825 checkUnnamed2626(o.sources); 901 checkUnnamed2699(o.sources);
826 unittest.expect(o.startDate, unittest.equals('foo')); 902 unittest.expect(o.startDate, unittest.equals('foo'));
827 unittest.expect(o.voterServices, unittest.equals('foo')); 903 unittest.expect(o.voterServices, unittest.equals('foo'));
828 } 904 }
829 buildCounterPollingLocation--; 905 buildCounterPollingLocation--;
830 } 906 }
831 907
832 buildUnnamed2627() { 908 buildUnnamed2700() {
909 var o = new core.List<core.String>();
910 o.add("foo");
911 o.add("foo");
912 return o;
913 }
914
915 checkUnnamed2700(core.List<core.String> o) {
916 unittest.expect(o, unittest.hasLength(2));
917 unittest.expect(o[0], unittest.equals('foo'));
918 unittest.expect(o[1], unittest.equals('foo'));
919 }
920
921 core.int buildCounterPostalAddress = 0;
922 buildPostalAddress() {
923 var o = new api.PostalAddress();
924 buildCounterPostalAddress++;
925 if (buildCounterPostalAddress < 3) {
926 o.addressLines = buildUnnamed2700();
927 o.administrativeAreaName = "foo";
928 o.countryName = "foo";
929 o.countryNameCode = "foo";
930 o.dependentLocalityName = "foo";
931 o.dependentThoroughfareLeadingType = "foo";
932 o.dependentThoroughfareName = "foo";
933 o.dependentThoroughfarePostDirection = "foo";
934 o.dependentThoroughfarePreDirection = "foo";
935 o.dependentThoroughfareTrailingType = "foo";
936 o.dependentThoroughfaresConnector = "foo";
937 o.dependentThoroughfaresIndicator = "foo";
938 o.dependentThoroughfaresType = "foo";
939 o.firmName = "foo";
940 o.isDisputed = true;
941 o.languageCode = "foo";
942 o.localityName = "foo";
943 o.postBoxNumber = "foo";
944 o.postalCodeNumber = "foo";
945 o.postalCodeNumberExtension = "foo";
946 o.premiseName = "foo";
947 o.recipientName = "foo";
948 o.sortingCode = "foo";
949 o.subAdministrativeAreaName = "foo";
950 o.subPremiseName = "foo";
951 o.thoroughfareLeadingType = "foo";
952 o.thoroughfareName = "foo";
953 o.thoroughfareNumber = "foo";
954 o.thoroughfarePostDirection = "foo";
955 o.thoroughfarePreDirection = "foo";
956 o.thoroughfareTrailingType = "foo";
957 }
958 buildCounterPostalAddress--;
959 return o;
960 }
961
962 checkPostalAddress(api.PostalAddress o) {
963 buildCounterPostalAddress++;
964 if (buildCounterPostalAddress < 3) {
965 checkUnnamed2700(o.addressLines);
966 unittest.expect(o.administrativeAreaName, unittest.equals('foo'));
967 unittest.expect(o.countryName, unittest.equals('foo'));
968 unittest.expect(o.countryNameCode, unittest.equals('foo'));
969 unittest.expect(o.dependentLocalityName, unittest.equals('foo'));
970 unittest.expect(o.dependentThoroughfareLeadingType, unittest.equals('foo'));
971 unittest.expect(o.dependentThoroughfareName, unittest.equals('foo'));
972 unittest.expect(o.dependentThoroughfarePostDirection, unittest.equals('foo') );
973 unittest.expect(o.dependentThoroughfarePreDirection, unittest.equals('foo')) ;
974 unittest.expect(o.dependentThoroughfareTrailingType, unittest.equals('foo')) ;
975 unittest.expect(o.dependentThoroughfaresConnector, unittest.equals('foo'));
976 unittest.expect(o.dependentThoroughfaresIndicator, unittest.equals('foo'));
977 unittest.expect(o.dependentThoroughfaresType, unittest.equals('foo'));
978 unittest.expect(o.firmName, unittest.equals('foo'));
979 unittest.expect(o.isDisputed, unittest.isTrue);
980 unittest.expect(o.languageCode, unittest.equals('foo'));
981 unittest.expect(o.localityName, unittest.equals('foo'));
982 unittest.expect(o.postBoxNumber, unittest.equals('foo'));
983 unittest.expect(o.postalCodeNumber, unittest.equals('foo'));
984 unittest.expect(o.postalCodeNumberExtension, unittest.equals('foo'));
985 unittest.expect(o.premiseName, unittest.equals('foo'));
986 unittest.expect(o.recipientName, unittest.equals('foo'));
987 unittest.expect(o.sortingCode, unittest.equals('foo'));
988 unittest.expect(o.subAdministrativeAreaName, unittest.equals('foo'));
989 unittest.expect(o.subPremiseName, unittest.equals('foo'));
990 unittest.expect(o.thoroughfareLeadingType, unittest.equals('foo'));
991 unittest.expect(o.thoroughfareName, unittest.equals('foo'));
992 unittest.expect(o.thoroughfareNumber, unittest.equals('foo'));
993 unittest.expect(o.thoroughfarePostDirection, unittest.equals('foo'));
994 unittest.expect(o.thoroughfarePreDirection, unittest.equals('foo'));
995 unittest.expect(o.thoroughfareTrailingType, unittest.equals('foo'));
996 }
997 buildCounterPostalAddress--;
998 }
999
1000 buildUnnamed2701() {
833 var o = new core.Map<core.String, api.GeographicDivision>(); 1001 var o = new core.Map<core.String, api.GeographicDivision>();
834 o["x"] = buildGeographicDivision(); 1002 o["x"] = buildGeographicDivision();
835 o["y"] = buildGeographicDivision(); 1003 o["y"] = buildGeographicDivision();
836 return o; 1004 return o;
837 } 1005 }
838 1006
839 checkUnnamed2627(core.Map<core.String, api.GeographicDivision> o) { 1007 checkUnnamed2701(core.Map<core.String, api.GeographicDivision> o) {
840 unittest.expect(o, unittest.hasLength(2)); 1008 unittest.expect(o, unittest.hasLength(2));
841 checkGeographicDivision(o["x"]); 1009 checkGeographicDivision(o["x"]);
842 checkGeographicDivision(o["y"]); 1010 checkGeographicDivision(o["y"]);
843 } 1011 }
844 1012
845 buildUnnamed2628() { 1013 buildUnnamed2702() {
846 var o = new core.List<api.Office>(); 1014 var o = new core.List<api.Office>();
847 o.add(buildOffice()); 1015 o.add(buildOffice());
848 o.add(buildOffice()); 1016 o.add(buildOffice());
849 return o; 1017 return o;
850 } 1018 }
851 1019
852 checkUnnamed2628(core.List<api.Office> o) { 1020 checkUnnamed2702(core.List<api.Office> o) {
853 unittest.expect(o, unittest.hasLength(2)); 1021 unittest.expect(o, unittest.hasLength(2));
854 checkOffice(o[0]); 1022 checkOffice(o[0]);
855 checkOffice(o[1]); 1023 checkOffice(o[1]);
856 } 1024 }
857 1025
858 buildUnnamed2629() { 1026 buildUnnamed2703() {
859 var o = new core.List<api.Official>(); 1027 var o = new core.List<api.Official>();
860 o.add(buildOfficial()); 1028 o.add(buildOfficial());
861 o.add(buildOfficial()); 1029 o.add(buildOfficial());
862 return o; 1030 return o;
863 } 1031 }
864 1032
865 checkUnnamed2629(core.List<api.Official> o) { 1033 checkUnnamed2703(core.List<api.Official> o) {
866 unittest.expect(o, unittest.hasLength(2)); 1034 unittest.expect(o, unittest.hasLength(2));
867 checkOfficial(o[0]); 1035 checkOfficial(o[0]);
868 checkOfficial(o[1]); 1036 checkOfficial(o[1]);
869 } 1037 }
870 1038
871 core.int buildCounterRepresentativeInfoData = 0; 1039 core.int buildCounterRepresentativeInfoData = 0;
872 buildRepresentativeInfoData() { 1040 buildRepresentativeInfoData() {
873 var o = new api.RepresentativeInfoData(); 1041 var o = new api.RepresentativeInfoData();
874 buildCounterRepresentativeInfoData++; 1042 buildCounterRepresentativeInfoData++;
875 if (buildCounterRepresentativeInfoData < 3) { 1043 if (buildCounterRepresentativeInfoData < 3) {
876 o.divisions = buildUnnamed2627(); 1044 o.divisions = buildUnnamed2701();
877 o.offices = buildUnnamed2628(); 1045 o.offices = buildUnnamed2702();
878 o.officials = buildUnnamed2629(); 1046 o.officials = buildUnnamed2703();
879 } 1047 }
880 buildCounterRepresentativeInfoData--; 1048 buildCounterRepresentativeInfoData--;
881 return o; 1049 return o;
882 } 1050 }
883 1051
884 checkRepresentativeInfoData(api.RepresentativeInfoData o) { 1052 checkRepresentativeInfoData(api.RepresentativeInfoData o) {
885 buildCounterRepresentativeInfoData++; 1053 buildCounterRepresentativeInfoData++;
886 if (buildCounterRepresentativeInfoData < 3) { 1054 if (buildCounterRepresentativeInfoData < 3) {
887 checkUnnamed2627(o.divisions); 1055 checkUnnamed2701(o.divisions);
888 checkUnnamed2628(o.offices); 1056 checkUnnamed2702(o.offices);
889 checkUnnamed2629(o.officials); 1057 checkUnnamed2703(o.officials);
890 } 1058 }
891 buildCounterRepresentativeInfoData--; 1059 buildCounterRepresentativeInfoData--;
892 } 1060 }
893 1061
894 buildUnnamed2630() { 1062 core.int buildCounterRepresentativeInfoRequest = 0;
1063 buildRepresentativeInfoRequest() {
1064 var o = new api.RepresentativeInfoRequest();
1065 buildCounterRepresentativeInfoRequest++;
1066 if (buildCounterRepresentativeInfoRequest < 3) {
1067 o.contextParams = buildContextParams();
1068 }
1069 buildCounterRepresentativeInfoRequest--;
1070 return o;
1071 }
1072
1073 checkRepresentativeInfoRequest(api.RepresentativeInfoRequest o) {
1074 buildCounterRepresentativeInfoRequest++;
1075 if (buildCounterRepresentativeInfoRequest < 3) {
1076 checkContextParams(o.contextParams);
1077 }
1078 buildCounterRepresentativeInfoRequest--;
1079 }
1080
1081 buildUnnamed2704() {
895 var o = new core.Map<core.String, api.GeographicDivision>(); 1082 var o = new core.Map<core.String, api.GeographicDivision>();
896 o["x"] = buildGeographicDivision(); 1083 o["x"] = buildGeographicDivision();
897 o["y"] = buildGeographicDivision(); 1084 o["y"] = buildGeographicDivision();
898 return o; 1085 return o;
899 } 1086 }
900 1087
901 checkUnnamed2630(core.Map<core.String, api.GeographicDivision> o) { 1088 checkUnnamed2704(core.Map<core.String, api.GeographicDivision> o) {
902 unittest.expect(o, unittest.hasLength(2)); 1089 unittest.expect(o, unittest.hasLength(2));
903 checkGeographicDivision(o["x"]); 1090 checkGeographicDivision(o["x"]);
904 checkGeographicDivision(o["y"]); 1091 checkGeographicDivision(o["y"]);
905 } 1092 }
906 1093
907 buildUnnamed2631() { 1094 buildUnnamed2705() {
908 var o = new core.List<api.Office>(); 1095 var o = new core.List<api.Office>();
909 o.add(buildOffice()); 1096 o.add(buildOffice());
910 o.add(buildOffice()); 1097 o.add(buildOffice());
911 return o; 1098 return o;
912 } 1099 }
913 1100
914 checkUnnamed2631(core.List<api.Office> o) { 1101 checkUnnamed2705(core.List<api.Office> o) {
915 unittest.expect(o, unittest.hasLength(2)); 1102 unittest.expect(o, unittest.hasLength(2));
916 checkOffice(o[0]); 1103 checkOffice(o[0]);
917 checkOffice(o[1]); 1104 checkOffice(o[1]);
918 } 1105 }
919 1106
920 buildUnnamed2632() { 1107 buildUnnamed2706() {
921 var o = new core.List<api.Official>(); 1108 var o = new core.List<api.Official>();
922 o.add(buildOfficial()); 1109 o.add(buildOfficial());
923 o.add(buildOfficial()); 1110 o.add(buildOfficial());
924 return o; 1111 return o;
925 } 1112 }
926 1113
927 checkUnnamed2632(core.List<api.Official> o) { 1114 checkUnnamed2706(core.List<api.Official> o) {
928 unittest.expect(o, unittest.hasLength(2)); 1115 unittest.expect(o, unittest.hasLength(2));
929 checkOfficial(o[0]); 1116 checkOfficial(o[0]);
930 checkOfficial(o[1]); 1117 checkOfficial(o[1]);
931 } 1118 }
932 1119
933 core.int buildCounterRepresentativeInfoResponse = 0; 1120 core.int buildCounterRepresentativeInfoResponse = 0;
934 buildRepresentativeInfoResponse() { 1121 buildRepresentativeInfoResponse() {
935 var o = new api.RepresentativeInfoResponse(); 1122 var o = new api.RepresentativeInfoResponse();
936 buildCounterRepresentativeInfoResponse++; 1123 buildCounterRepresentativeInfoResponse++;
937 if (buildCounterRepresentativeInfoResponse < 3) { 1124 if (buildCounterRepresentativeInfoResponse < 3) {
938 o.divisions = buildUnnamed2630(); 1125 o.divisions = buildUnnamed2704();
939 o.kind = "foo"; 1126 o.kind = "foo";
940 o.normalizedInput = buildSimpleAddressType(); 1127 o.normalizedInput = buildSimpleAddressType();
941 o.offices = buildUnnamed2631(); 1128 o.offices = buildUnnamed2705();
942 o.officials = buildUnnamed2632(); 1129 o.officials = buildUnnamed2706();
943 } 1130 }
944 buildCounterRepresentativeInfoResponse--; 1131 buildCounterRepresentativeInfoResponse--;
945 return o; 1132 return o;
946 } 1133 }
947 1134
948 checkRepresentativeInfoResponse(api.RepresentativeInfoResponse o) { 1135 checkRepresentativeInfoResponse(api.RepresentativeInfoResponse o) {
949 buildCounterRepresentativeInfoResponse++; 1136 buildCounterRepresentativeInfoResponse++;
950 if (buildCounterRepresentativeInfoResponse < 3) { 1137 if (buildCounterRepresentativeInfoResponse < 3) {
951 checkUnnamed2630(o.divisions); 1138 checkUnnamed2704(o.divisions);
952 unittest.expect(o.kind, unittest.equals('foo')); 1139 unittest.expect(o.kind, unittest.equals('foo'));
953 checkSimpleAddressType(o.normalizedInput); 1140 checkSimpleAddressType(o.normalizedInput);
954 checkUnnamed2631(o.offices); 1141 checkUnnamed2705(o.offices);
955 checkUnnamed2632(o.officials); 1142 checkUnnamed2706(o.officials);
956 } 1143 }
957 buildCounterRepresentativeInfoResponse--; 1144 buildCounterRepresentativeInfoResponse--;
958 } 1145 }
959 1146
960 core.int buildCounterSimpleAddressType = 0; 1147 core.int buildCounterSimpleAddressType = 0;
961 buildSimpleAddressType() { 1148 buildSimpleAddressType() {
962 var o = new api.SimpleAddressType(); 1149 var o = new api.SimpleAddressType();
963 buildCounterSimpleAddressType++; 1150 buildCounterSimpleAddressType++;
964 if (buildCounterSimpleAddressType < 3) { 1151 if (buildCounterSimpleAddressType < 3) {
965 o.city = "foo"; 1152 o.city = "foo";
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
1002 1189
1003 checkSource(api.Source o) { 1190 checkSource(api.Source o) {
1004 buildCounterSource++; 1191 buildCounterSource++;
1005 if (buildCounterSource < 3) { 1192 if (buildCounterSource < 3) {
1006 unittest.expect(o.name, unittest.equals('foo')); 1193 unittest.expect(o.name, unittest.equals('foo'));
1007 unittest.expect(o.official, unittest.isTrue); 1194 unittest.expect(o.official, unittest.isTrue);
1008 } 1195 }
1009 buildCounterSource--; 1196 buildCounterSource--;
1010 } 1197 }
1011 1198
1012 buildUnnamed2633() { 1199 core.int buildCounterVoterInfoRequest = 0;
1200 buildVoterInfoRequest() {
1201 var o = new api.VoterInfoRequest();
1202 buildCounterVoterInfoRequest++;
1203 if (buildCounterVoterInfoRequest < 3) {
1204 o.contextParams = buildContextParams();
1205 o.voterInfoSegmentResult = buildVoterInfoSegmentResult();
1206 }
1207 buildCounterVoterInfoRequest--;
1208 return o;
1209 }
1210
1211 checkVoterInfoRequest(api.VoterInfoRequest o) {
1212 buildCounterVoterInfoRequest++;
1213 if (buildCounterVoterInfoRequest < 3) {
1214 checkContextParams(o.contextParams);
1215 checkVoterInfoSegmentResult(o.voterInfoSegmentResult);
1216 }
1217 buildCounterVoterInfoRequest--;
1218 }
1219
1220 buildUnnamed2707() {
1013 var o = new core.List<api.Contest>(); 1221 var o = new core.List<api.Contest>();
1014 o.add(buildContest()); 1222 o.add(buildContest());
1015 o.add(buildContest()); 1223 o.add(buildContest());
1016 return o; 1224 return o;
1017 } 1225 }
1018 1226
1019 checkUnnamed2633(core.List<api.Contest> o) { 1227 checkUnnamed2707(core.List<api.Contest> o) {
1020 unittest.expect(o, unittest.hasLength(2)); 1228 unittest.expect(o, unittest.hasLength(2));
1021 checkContest(o[0]); 1229 checkContest(o[0]);
1022 checkContest(o[1]); 1230 checkContest(o[1]);
1023 } 1231 }
1024 1232
1025 buildUnnamed2634() { 1233 buildUnnamed2708() {
1026 var o = new core.List<api.PollingLocation>(); 1234 var o = new core.List<api.PollingLocation>();
1027 o.add(buildPollingLocation()); 1235 o.add(buildPollingLocation());
1028 o.add(buildPollingLocation()); 1236 o.add(buildPollingLocation());
1029 return o; 1237 return o;
1030 } 1238 }
1031 1239
1032 checkUnnamed2634(core.List<api.PollingLocation> o) { 1240 checkUnnamed2708(core.List<api.PollingLocation> o) {
1033 unittest.expect(o, unittest.hasLength(2)); 1241 unittest.expect(o, unittest.hasLength(2));
1034 checkPollingLocation(o[0]); 1242 checkPollingLocation(o[0]);
1035 checkPollingLocation(o[1]); 1243 checkPollingLocation(o[1]);
1036 } 1244 }
1037 1245
1038 buildUnnamed2635() { 1246 buildUnnamed2709() {
1039 var o = new core.List<api.PollingLocation>(); 1247 var o = new core.List<api.PollingLocation>();
1040 o.add(buildPollingLocation()); 1248 o.add(buildPollingLocation());
1041 o.add(buildPollingLocation()); 1249 o.add(buildPollingLocation());
1042 return o; 1250 return o;
1043 } 1251 }
1044 1252
1045 checkUnnamed2635(core.List<api.PollingLocation> o) { 1253 checkUnnamed2709(core.List<api.PollingLocation> o) {
1046 unittest.expect(o, unittest.hasLength(2)); 1254 unittest.expect(o, unittest.hasLength(2));
1047 checkPollingLocation(o[0]); 1255 checkPollingLocation(o[0]);
1048 checkPollingLocation(o[1]); 1256 checkPollingLocation(o[1]);
1049 } 1257 }
1050 1258
1051 buildUnnamed2636() { 1259 buildUnnamed2710() {
1052 var o = new core.List<api.Election>(); 1260 var o = new core.List<api.Election>();
1053 o.add(buildElection()); 1261 o.add(buildElection());
1054 o.add(buildElection()); 1262 o.add(buildElection());
1055 return o; 1263 return o;
1056 } 1264 }
1057 1265
1058 checkUnnamed2636(core.List<api.Election> o) { 1266 checkUnnamed2710(core.List<api.Election> o) {
1059 unittest.expect(o, unittest.hasLength(2)); 1267 unittest.expect(o, unittest.hasLength(2));
1060 checkElection(o[0]); 1268 checkElection(o[0]);
1061 checkElection(o[1]); 1269 checkElection(o[1]);
1062 } 1270 }
1063 1271
1064 buildUnnamed2637() { 1272 buildUnnamed2711() {
1065 var o = new core.List<api.PollingLocation>(); 1273 var o = new core.List<api.PollingLocation>();
1066 o.add(buildPollingLocation()); 1274 o.add(buildPollingLocation());
1067 o.add(buildPollingLocation()); 1275 o.add(buildPollingLocation());
1068 return o; 1276 return o;
1069 } 1277 }
1070 1278
1071 checkUnnamed2637(core.List<api.PollingLocation> o) { 1279 checkUnnamed2711(core.List<api.PollingLocation> o) {
1072 unittest.expect(o, unittest.hasLength(2)); 1280 unittest.expect(o, unittest.hasLength(2));
1073 checkPollingLocation(o[0]); 1281 checkPollingLocation(o[0]);
1074 checkPollingLocation(o[1]); 1282 checkPollingLocation(o[1]);
1075 } 1283 }
1076 1284
1077 buildUnnamed2638() { 1285 buildUnnamed2712() {
1078 var o = new core.List<api.AdministrationRegion>(); 1286 var o = new core.List<api.AdministrationRegion>();
1079 o.add(buildAdministrationRegion()); 1287 o.add(buildAdministrationRegion());
1080 o.add(buildAdministrationRegion()); 1288 o.add(buildAdministrationRegion());
1081 return o; 1289 return o;
1082 } 1290 }
1083 1291
1084 checkUnnamed2638(core.List<api.AdministrationRegion> o) { 1292 checkUnnamed2712(core.List<api.AdministrationRegion> o) {
1085 unittest.expect(o, unittest.hasLength(2)); 1293 unittest.expect(o, unittest.hasLength(2));
1086 checkAdministrationRegion(o[0]); 1294 checkAdministrationRegion(o[0]);
1087 checkAdministrationRegion(o[1]); 1295 checkAdministrationRegion(o[1]);
1088 } 1296 }
1089 1297
1090 core.int buildCounterVoterInfoResponse = 0; 1298 core.int buildCounterVoterInfoResponse = 0;
1091 buildVoterInfoResponse() { 1299 buildVoterInfoResponse() {
1092 var o = new api.VoterInfoResponse(); 1300 var o = new api.VoterInfoResponse();
1093 buildCounterVoterInfoResponse++; 1301 buildCounterVoterInfoResponse++;
1094 if (buildCounterVoterInfoResponse < 3) { 1302 if (buildCounterVoterInfoResponse < 3) {
1095 o.contests = buildUnnamed2633(); 1303 o.contests = buildUnnamed2707();
1096 o.dropOffLocations = buildUnnamed2634(); 1304 o.dropOffLocations = buildUnnamed2708();
1097 o.earlyVoteSites = buildUnnamed2635(); 1305 o.earlyVoteSites = buildUnnamed2709();
1098 o.election = buildElection(); 1306 o.election = buildElection();
1099 o.kind = "foo"; 1307 o.kind = "foo";
1100 o.mailOnly = true; 1308 o.mailOnly = true;
1101 o.normalizedInput = buildSimpleAddressType(); 1309 o.normalizedInput = buildSimpleAddressType();
1102 o.otherElections = buildUnnamed2636(); 1310 o.otherElections = buildUnnamed2710();
1103 o.pollingLocations = buildUnnamed2637(); 1311 o.pollingLocations = buildUnnamed2711();
1104 o.precinctId = "foo"; 1312 o.precinctId = "foo";
1105 o.state = buildUnnamed2638(); 1313 o.state = buildUnnamed2712();
1106 } 1314 }
1107 buildCounterVoterInfoResponse--; 1315 buildCounterVoterInfoResponse--;
1108 return o; 1316 return o;
1109 } 1317 }
1110 1318
1111 checkVoterInfoResponse(api.VoterInfoResponse o) { 1319 checkVoterInfoResponse(api.VoterInfoResponse o) {
1112 buildCounterVoterInfoResponse++; 1320 buildCounterVoterInfoResponse++;
1113 if (buildCounterVoterInfoResponse < 3) { 1321 if (buildCounterVoterInfoResponse < 3) {
1114 checkUnnamed2633(o.contests); 1322 checkUnnamed2707(o.contests);
1115 checkUnnamed2634(o.dropOffLocations); 1323 checkUnnamed2708(o.dropOffLocations);
1116 checkUnnamed2635(o.earlyVoteSites); 1324 checkUnnamed2709(o.earlyVoteSites);
1117 checkElection(o.election); 1325 checkElection(o.election);
1118 unittest.expect(o.kind, unittest.equals('foo')); 1326 unittest.expect(o.kind, unittest.equals('foo'));
1119 unittest.expect(o.mailOnly, unittest.isTrue); 1327 unittest.expect(o.mailOnly, unittest.isTrue);
1120 checkSimpleAddressType(o.normalizedInput); 1328 checkSimpleAddressType(o.normalizedInput);
1121 checkUnnamed2636(o.otherElections); 1329 checkUnnamed2710(o.otherElections);
1122 checkUnnamed2637(o.pollingLocations); 1330 checkUnnamed2711(o.pollingLocations);
1123 unittest.expect(o.precinctId, unittest.equals('foo')); 1331 unittest.expect(o.precinctId, unittest.equals('foo'));
1124 checkUnnamed2638(o.state); 1332 checkUnnamed2712(o.state);
1125 } 1333 }
1126 buildCounterVoterInfoResponse--; 1334 buildCounterVoterInfoResponse--;
1127 } 1335 }
1128 1336
1129 buildUnnamed2639() { 1337 core.int buildCounterVoterInfoSegmentResult = 0;
1338 buildVoterInfoSegmentResult() {
1339 var o = new api.VoterInfoSegmentResult();
1340 buildCounterVoterInfoSegmentResult++;
1341 if (buildCounterVoterInfoSegmentResult < 3) {
1342 o.generatedMillis = "foo";
1343 o.postalAddress = buildPostalAddress();
1344 o.request = buildVoterInfoRequest();
1345 o.response = buildVoterInfoResponse();
1346 }
1347 buildCounterVoterInfoSegmentResult--;
1348 return o;
1349 }
1350
1351 checkVoterInfoSegmentResult(api.VoterInfoSegmentResult o) {
1352 buildCounterVoterInfoSegmentResult++;
1353 if (buildCounterVoterInfoSegmentResult < 3) {
1354 unittest.expect(o.generatedMillis, unittest.equals('foo'));
1355 checkPostalAddress(o.postalAddress);
1356 checkVoterInfoRequest(o.request);
1357 checkVoterInfoResponse(o.response);
1358 }
1359 buildCounterVoterInfoSegmentResult--;
1360 }
1361
1362 buildUnnamed2713() {
1130 var o = new core.List<core.String>(); 1363 var o = new core.List<core.String>();
1131 o.add("foo"); 1364 o.add("foo");
1132 o.add("foo"); 1365 o.add("foo");
1133 return o; 1366 return o;
1134 } 1367 }
1135 1368
1136 checkUnnamed2639(core.List<core.String> o) { 1369 checkUnnamed2713(core.List<core.String> o) {
1137 unittest.expect(o, unittest.hasLength(2)); 1370 unittest.expect(o, unittest.hasLength(2));
1138 unittest.expect(o[0], unittest.equals('foo')); 1371 unittest.expect(o[0], unittest.equals('foo'));
1139 unittest.expect(o[1], unittest.equals('foo')); 1372 unittest.expect(o[1], unittest.equals('foo'));
1140 } 1373 }
1141 1374
1142 buildUnnamed2640() { 1375 buildUnnamed2714() {
1143 var o = new core.List<core.String>(); 1376 var o = new core.List<core.String>();
1144 o.add("foo"); 1377 o.add("foo");
1145 o.add("foo"); 1378 o.add("foo");
1146 return o; 1379 return o;
1147 } 1380 }
1148 1381
1149 checkUnnamed2640(core.List<core.String> o) { 1382 checkUnnamed2714(core.List<core.String> o) {
1150 unittest.expect(o, unittest.hasLength(2)); 1383 unittest.expect(o, unittest.hasLength(2));
1151 unittest.expect(o[0], unittest.equals('foo')); 1384 unittest.expect(o[0], unittest.equals('foo'));
1152 unittest.expect(o[1], unittest.equals('foo')); 1385 unittest.expect(o[1], unittest.equals('foo'));
1153 } 1386 }
1154 1387
1155 buildUnnamed2641() { 1388 buildUnnamed2715() {
1156 var o = new core.List<core.String>(); 1389 var o = new core.List<core.String>();
1157 o.add("foo"); 1390 o.add("foo");
1158 o.add("foo"); 1391 o.add("foo");
1159 return o; 1392 return o;
1160 } 1393 }
1161 1394
1162 checkUnnamed2641(core.List<core.String> o) { 1395 checkUnnamed2715(core.List<core.String> o) {
1163 unittest.expect(o, unittest.hasLength(2)); 1396 unittest.expect(o, unittest.hasLength(2));
1164 unittest.expect(o[0], unittest.equals('foo')); 1397 unittest.expect(o[0], unittest.equals('foo'));
1165 unittest.expect(o[1], unittest.equals('foo')); 1398 unittest.expect(o[1], unittest.equals('foo'));
1166 } 1399 }
1167 1400
1168 buildUnnamed2642() { 1401 buildUnnamed2716() {
1169 var o = new core.List<core.String>(); 1402 var o = new core.List<core.String>();
1170 o.add("foo"); 1403 o.add("foo");
1171 o.add("foo"); 1404 o.add("foo");
1172 return o; 1405 return o;
1173 } 1406 }
1174 1407
1175 checkUnnamed2642(core.List<core.String> o) { 1408 checkUnnamed2716(core.List<core.String> o) {
1176 unittest.expect(o, unittest.hasLength(2)); 1409 unittest.expect(o, unittest.hasLength(2));
1177 unittest.expect(o[0], unittest.equals('foo')); 1410 unittest.expect(o[0], unittest.equals('foo'));
1178 unittest.expect(o[1], unittest.equals('foo')); 1411 unittest.expect(o[1], unittest.equals('foo'));
1179 } 1412 }
1180 1413
1181 1414
1182 main() { 1415 main() {
1183 unittest.group("obj-schema-AdministrationRegion", () { 1416 unittest.group("obj-schema-AdministrationRegion", () {
1184 unittest.test("to-json--from-json", () { 1417 unittest.test("to-json--from-json", () {
1185 var o = buildAdministrationRegion(); 1418 var o = buildAdministrationRegion();
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
1218 1451
1219 unittest.group("obj-schema-Contest", () { 1452 unittest.group("obj-schema-Contest", () {
1220 unittest.test("to-json--from-json", () { 1453 unittest.test("to-json--from-json", () {
1221 var o = buildContest(); 1454 var o = buildContest();
1222 var od = new api.Contest.fromJson(o.toJson()); 1455 var od = new api.Contest.fromJson(o.toJson());
1223 checkContest(od); 1456 checkContest(od);
1224 }); 1457 });
1225 }); 1458 });
1226 1459
1227 1460
1461 unittest.group("obj-schema-ContextParams", () {
1462 unittest.test("to-json--from-json", () {
1463 var o = buildContextParams();
1464 var od = new api.ContextParams.fromJson(o.toJson());
1465 checkContextParams(od);
1466 });
1467 });
1468
1469
1470 unittest.group("obj-schema-DivisionRepresentativeInfoRequest", () {
1471 unittest.test("to-json--from-json", () {
1472 var o = buildDivisionRepresentativeInfoRequest();
1473 var od = new api.DivisionRepresentativeInfoRequest.fromJson(o.toJson());
1474 checkDivisionRepresentativeInfoRequest(od);
1475 });
1476 });
1477
1478
1479 unittest.group("obj-schema-DivisionSearchRequest", () {
1480 unittest.test("to-json--from-json", () {
1481 var o = buildDivisionSearchRequest();
1482 var od = new api.DivisionSearchRequest.fromJson(o.toJson());
1483 checkDivisionSearchRequest(od);
1484 });
1485 });
1486
1487
1228 unittest.group("obj-schema-DivisionSearchResponse", () { 1488 unittest.group("obj-schema-DivisionSearchResponse", () {
1229 unittest.test("to-json--from-json", () { 1489 unittest.test("to-json--from-json", () {
1230 var o = buildDivisionSearchResponse(); 1490 var o = buildDivisionSearchResponse();
1231 var od = new api.DivisionSearchResponse.fromJson(o.toJson()); 1491 var od = new api.DivisionSearchResponse.fromJson(o.toJson());
1232 checkDivisionSearchResponse(od); 1492 checkDivisionSearchResponse(od);
1233 }); 1493 });
1234 }); 1494 });
1235 1495
1236 1496
1237 unittest.group("obj-schema-DivisionSearchResult", () { 1497 unittest.group("obj-schema-DivisionSearchResult", () {
(...skipping 16 matching lines...) Expand all
1254 1514
1255 unittest.group("obj-schema-ElectionOfficial", () { 1515 unittest.group("obj-schema-ElectionOfficial", () {
1256 unittest.test("to-json--from-json", () { 1516 unittest.test("to-json--from-json", () {
1257 var o = buildElectionOfficial(); 1517 var o = buildElectionOfficial();
1258 var od = new api.ElectionOfficial.fromJson(o.toJson()); 1518 var od = new api.ElectionOfficial.fromJson(o.toJson());
1259 checkElectionOfficial(od); 1519 checkElectionOfficial(od);
1260 }); 1520 });
1261 }); 1521 });
1262 1522
1263 1523
1524 unittest.group("obj-schema-ElectionsQueryRequest", () {
1525 unittest.test("to-json--from-json", () {
1526 var o = buildElectionsQueryRequest();
1527 var od = new api.ElectionsQueryRequest.fromJson(o.toJson());
1528 checkElectionsQueryRequest(od);
1529 });
1530 });
1531
1532
1264 unittest.group("obj-schema-ElectionsQueryResponse", () { 1533 unittest.group("obj-schema-ElectionsQueryResponse", () {
1265 unittest.test("to-json--from-json", () { 1534 unittest.test("to-json--from-json", () {
1266 var o = buildElectionsQueryResponse(); 1535 var o = buildElectionsQueryResponse();
1267 var od = new api.ElectionsQueryResponse.fromJson(o.toJson()); 1536 var od = new api.ElectionsQueryResponse.fromJson(o.toJson());
1268 checkElectionsQueryResponse(od); 1537 checkElectionsQueryResponse(od);
1269 }); 1538 });
1270 }); 1539 });
1271 1540
1272 1541
1273 unittest.group("obj-schema-ElectoralDistrict", () { 1542 unittest.group("obj-schema-ElectoralDistrict", () {
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
1308 1577
1309 unittest.group("obj-schema-PollingLocation", () { 1578 unittest.group("obj-schema-PollingLocation", () {
1310 unittest.test("to-json--from-json", () { 1579 unittest.test("to-json--from-json", () {
1311 var o = buildPollingLocation(); 1580 var o = buildPollingLocation();
1312 var od = new api.PollingLocation.fromJson(o.toJson()); 1581 var od = new api.PollingLocation.fromJson(o.toJson());
1313 checkPollingLocation(od); 1582 checkPollingLocation(od);
1314 }); 1583 });
1315 }); 1584 });
1316 1585
1317 1586
1587 unittest.group("obj-schema-PostalAddress", () {
1588 unittest.test("to-json--from-json", () {
1589 var o = buildPostalAddress();
1590 var od = new api.PostalAddress.fromJson(o.toJson());
1591 checkPostalAddress(od);
1592 });
1593 });
1594
1595
1318 unittest.group("obj-schema-RepresentativeInfoData", () { 1596 unittest.group("obj-schema-RepresentativeInfoData", () {
1319 unittest.test("to-json--from-json", () { 1597 unittest.test("to-json--from-json", () {
1320 var o = buildRepresentativeInfoData(); 1598 var o = buildRepresentativeInfoData();
1321 var od = new api.RepresentativeInfoData.fromJson(o.toJson()); 1599 var od = new api.RepresentativeInfoData.fromJson(o.toJson());
1322 checkRepresentativeInfoData(od); 1600 checkRepresentativeInfoData(od);
1323 }); 1601 });
1324 }); 1602 });
1325 1603
1326 1604
1605 unittest.group("obj-schema-RepresentativeInfoRequest", () {
1606 unittest.test("to-json--from-json", () {
1607 var o = buildRepresentativeInfoRequest();
1608 var od = new api.RepresentativeInfoRequest.fromJson(o.toJson());
1609 checkRepresentativeInfoRequest(od);
1610 });
1611 });
1612
1613
1327 unittest.group("obj-schema-RepresentativeInfoResponse", () { 1614 unittest.group("obj-schema-RepresentativeInfoResponse", () {
1328 unittest.test("to-json--from-json", () { 1615 unittest.test("to-json--from-json", () {
1329 var o = buildRepresentativeInfoResponse(); 1616 var o = buildRepresentativeInfoResponse();
1330 var od = new api.RepresentativeInfoResponse.fromJson(o.toJson()); 1617 var od = new api.RepresentativeInfoResponse.fromJson(o.toJson());
1331 checkRepresentativeInfoResponse(od); 1618 checkRepresentativeInfoResponse(od);
1332 }); 1619 });
1333 }); 1620 });
1334 1621
1335 1622
1336 unittest.group("obj-schema-SimpleAddressType", () { 1623 unittest.group("obj-schema-SimpleAddressType", () {
1337 unittest.test("to-json--from-json", () { 1624 unittest.test("to-json--from-json", () {
1338 var o = buildSimpleAddressType(); 1625 var o = buildSimpleAddressType();
1339 var od = new api.SimpleAddressType.fromJson(o.toJson()); 1626 var od = new api.SimpleAddressType.fromJson(o.toJson());
1340 checkSimpleAddressType(od); 1627 checkSimpleAddressType(od);
1341 }); 1628 });
1342 }); 1629 });
1343 1630
1344 1631
1345 unittest.group("obj-schema-Source", () { 1632 unittest.group("obj-schema-Source", () {
1346 unittest.test("to-json--from-json", () { 1633 unittest.test("to-json--from-json", () {
1347 var o = buildSource(); 1634 var o = buildSource();
1348 var od = new api.Source.fromJson(o.toJson()); 1635 var od = new api.Source.fromJson(o.toJson());
1349 checkSource(od); 1636 checkSource(od);
1350 }); 1637 });
1351 }); 1638 });
1352 1639
1353 1640
1641 unittest.group("obj-schema-VoterInfoRequest", () {
1642 unittest.test("to-json--from-json", () {
1643 var o = buildVoterInfoRequest();
1644 var od = new api.VoterInfoRequest.fromJson(o.toJson());
1645 checkVoterInfoRequest(od);
1646 });
1647 });
1648
1649
1354 unittest.group("obj-schema-VoterInfoResponse", () { 1650 unittest.group("obj-schema-VoterInfoResponse", () {
1355 unittest.test("to-json--from-json", () { 1651 unittest.test("to-json--from-json", () {
1356 var o = buildVoterInfoResponse(); 1652 var o = buildVoterInfoResponse();
1357 var od = new api.VoterInfoResponse.fromJson(o.toJson()); 1653 var od = new api.VoterInfoResponse.fromJson(o.toJson());
1358 checkVoterInfoResponse(od); 1654 checkVoterInfoResponse(od);
1359 }); 1655 });
1360 }); 1656 });
1361 1657
1362 1658
1659 unittest.group("obj-schema-VoterInfoSegmentResult", () {
1660 unittest.test("to-json--from-json", () {
1661 var o = buildVoterInfoSegmentResult();
1662 var od = new api.VoterInfoSegmentResult.fromJson(o.toJson());
1663 checkVoterInfoSegmentResult(od);
1664 });
1665 });
1666
1667
1363 unittest.group("resource-DivisionsResourceApi", () { 1668 unittest.group("resource-DivisionsResourceApi", () {
1364 unittest.test("method--search", () { 1669 unittest.test("method--search", () {
1365 1670
1366 var mock = new HttpServerMock(); 1671 var mock = new HttpServerMock();
1367 api.DivisionsResourceApi res = new api.CivicinfoApi(mock).divisions; 1672 api.DivisionsResourceApi res = new api.CivicinfoApi(mock).divisions;
1673 var arg_request = buildDivisionSearchRequest();
1368 var arg_query = "foo"; 1674 var arg_query = "foo";
1369 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 1675 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
1676 var obj = new api.DivisionSearchRequest.fromJson(json);
1677 checkDivisionSearchRequest(obj);
1678
1370 var path = (req.url).path; 1679 var path = (req.url).path;
1371 var pathOffset = 0; 1680 var pathOffset = 0;
1372 var index; 1681 var index;
1373 var subPart; 1682 var subPart;
1374 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 1683 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
1375 pathOffset += 1; 1684 pathOffset += 1;
1376 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq uals("civicinfo/v2/")); 1685 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq uals("civicinfo/v2/"));
1377 pathOffset += 13; 1686 pathOffset += 13;
1378 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("divisions")); 1687 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("divisions"));
1379 pathOffset += 9; 1688 pathOffset += 9;
(...skipping 16 matching lines...) Expand all
1396 } 1705 }
1397 unittest.expect(queryMap["query"].first, unittest.equals(arg_query)); 1706 unittest.expect(queryMap["query"].first, unittest.equals(arg_query));
1398 1707
1399 1708
1400 var h = { 1709 var h = {
1401 "content-type" : "application/json; charset=utf-8", 1710 "content-type" : "application/json; charset=utf-8",
1402 }; 1711 };
1403 var resp = convert.JSON.encode(buildDivisionSearchResponse()); 1712 var resp = convert.JSON.encode(buildDivisionSearchResponse());
1404 return new async.Future.value(stringResponse(200, h, resp)); 1713 return new async.Future.value(stringResponse(200, h, resp));
1405 }), true); 1714 }), true);
1406 res.search(query: arg_query).then(unittest.expectAsync(((api.DivisionSearc hResponse response) { 1715 res.search(arg_request, query: arg_query).then(unittest.expectAsync(((api. DivisionSearchResponse response) {
1407 checkDivisionSearchResponse(response); 1716 checkDivisionSearchResponse(response);
1408 }))); 1717 })));
1409 }); 1718 });
1410 1719
1411 }); 1720 });
1412 1721
1413 1722
1414 unittest.group("resource-ElectionsResourceApi", () { 1723 unittest.group("resource-ElectionsResourceApi", () {
1415 unittest.test("method--electionQuery", () { 1724 unittest.test("method--electionQuery", () {
1416 1725
1417 var mock = new HttpServerMock(); 1726 var mock = new HttpServerMock();
1418 api.ElectionsResourceApi res = new api.CivicinfoApi(mock).elections; 1727 api.ElectionsResourceApi res = new api.CivicinfoApi(mock).elections;
1728 var arg_request = buildElectionsQueryRequest();
1419 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 1729 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
1730 var obj = new api.ElectionsQueryRequest.fromJson(json);
1731 checkElectionsQueryRequest(obj);
1732
1420 var path = (req.url).path; 1733 var path = (req.url).path;
1421 var pathOffset = 0; 1734 var pathOffset = 0;
1422 var index; 1735 var index;
1423 var subPart; 1736 var subPart;
1424 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 1737 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
1425 pathOffset += 1; 1738 pathOffset += 1;
1426 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq uals("civicinfo/v2/")); 1739 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq uals("civicinfo/v2/"));
1427 pathOffset += 13; 1740 pathOffset += 13;
1428 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("elections")); 1741 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("elections"));
1429 pathOffset += 9; 1742 pathOffset += 9;
(...skipping 15 matching lines...) Expand all
1445 } 1758 }
1446 } 1759 }
1447 1760
1448 1761
1449 var h = { 1762 var h = {
1450 "content-type" : "application/json; charset=utf-8", 1763 "content-type" : "application/json; charset=utf-8",
1451 }; 1764 };
1452 var resp = convert.JSON.encode(buildElectionsQueryResponse()); 1765 var resp = convert.JSON.encode(buildElectionsQueryResponse());
1453 return new async.Future.value(stringResponse(200, h, resp)); 1766 return new async.Future.value(stringResponse(200, h, resp));
1454 }), true); 1767 }), true);
1455 res.electionQuery().then(unittest.expectAsync(((api.ElectionsQueryResponse response) { 1768 res.electionQuery(arg_request).then(unittest.expectAsync(((api.ElectionsQu eryResponse response) {
1456 checkElectionsQueryResponse(response); 1769 checkElectionsQueryResponse(response);
1457 }))); 1770 })));
1458 }); 1771 });
1459 1772
1460 unittest.test("method--voterInfoQuery", () { 1773 unittest.test("method--voterInfoQuery", () {
1461 1774
1462 var mock = new HttpServerMock(); 1775 var mock = new HttpServerMock();
1463 api.ElectionsResourceApi res = new api.CivicinfoApi(mock).elections; 1776 api.ElectionsResourceApi res = new api.CivicinfoApi(mock).elections;
1777 var arg_request = buildVoterInfoRequest();
1464 var arg_address = "foo"; 1778 var arg_address = "foo";
1465 var arg_electionId = "foo"; 1779 var arg_electionId = "foo";
1466 var arg_officialOnly = true; 1780 var arg_officialOnly = true;
1467 var arg_returnAllAvailableData = true; 1781 var arg_returnAllAvailableData = true;
1468 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 1782 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
1783 var obj = new api.VoterInfoRequest.fromJson(json);
1784 checkVoterInfoRequest(obj);
1785
1469 var path = (req.url).path; 1786 var path = (req.url).path;
1470 var pathOffset = 0; 1787 var pathOffset = 0;
1471 var index; 1788 var index;
1472 var subPart; 1789 var subPart;
1473 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 1790 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
1474 pathOffset += 1; 1791 pathOffset += 1;
1475 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq uals("civicinfo/v2/")); 1792 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq uals("civicinfo/v2/"));
1476 pathOffset += 13; 1793 pathOffset += 13;
1477 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("voterinfo")); 1794 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("voterinfo"));
1478 pathOffset += 9; 1795 pathOffset += 9;
(...skipping 19 matching lines...) Expand all
1498 unittest.expect(queryMap["officialOnly"].first, unittest.equals("$arg_of ficialOnly")); 1815 unittest.expect(queryMap["officialOnly"].first, unittest.equals("$arg_of ficialOnly"));
1499 unittest.expect(queryMap["returnAllAvailableData"].first, unittest.equal s("$arg_returnAllAvailableData")); 1816 unittest.expect(queryMap["returnAllAvailableData"].first, unittest.equal s("$arg_returnAllAvailableData"));
1500 1817
1501 1818
1502 var h = { 1819 var h = {
1503 "content-type" : "application/json; charset=utf-8", 1820 "content-type" : "application/json; charset=utf-8",
1504 }; 1821 };
1505 var resp = convert.JSON.encode(buildVoterInfoResponse()); 1822 var resp = convert.JSON.encode(buildVoterInfoResponse());
1506 return new async.Future.value(stringResponse(200, h, resp)); 1823 return new async.Future.value(stringResponse(200, h, resp));
1507 }), true); 1824 }), true);
1508 res.voterInfoQuery(arg_address, electionId: arg_electionId, officialOnly: arg_officialOnly, returnAllAvailableData: arg_returnAllAvailableData).then(unitt est.expectAsync(((api.VoterInfoResponse response) { 1825 res.voterInfoQuery(arg_request, arg_address, electionId: arg_electionId, o fficialOnly: arg_officialOnly, returnAllAvailableData: arg_returnAllAvailableDat a).then(unittest.expectAsync(((api.VoterInfoResponse response) {
1509 checkVoterInfoResponse(response); 1826 checkVoterInfoResponse(response);
1510 }))); 1827 })));
1511 }); 1828 });
1512 1829
1513 }); 1830 });
1514 1831
1515 1832
1516 unittest.group("resource-RepresentativesResourceApi", () { 1833 unittest.group("resource-RepresentativesResourceApi", () {
1517 unittest.test("method--representativeInfoByAddress", () { 1834 unittest.test("method--representativeInfoByAddress", () {
1518 1835
1519 var mock = new HttpServerMock(); 1836 var mock = new HttpServerMock();
1520 api.RepresentativesResourceApi res = new api.CivicinfoApi(mock).representa tives; 1837 api.RepresentativesResourceApi res = new api.CivicinfoApi(mock).representa tives;
1838 var arg_request = buildRepresentativeInfoRequest();
1521 var arg_address = "foo"; 1839 var arg_address = "foo";
1522 var arg_includeOffices = true; 1840 var arg_includeOffices = true;
1523 var arg_levels = buildUnnamed2639(); 1841 var arg_levels = buildUnnamed2713();
1524 var arg_roles = buildUnnamed2640(); 1842 var arg_roles = buildUnnamed2714();
1525 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 1843 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
1844 var obj = new api.RepresentativeInfoRequest.fromJson(json);
1845 checkRepresentativeInfoRequest(obj);
1846
1526 var path = (req.url).path; 1847 var path = (req.url).path;
1527 var pathOffset = 0; 1848 var pathOffset = 0;
1528 var index; 1849 var index;
1529 var subPart; 1850 var subPart;
1530 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 1851 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
1531 pathOffset += 1; 1852 pathOffset += 1;
1532 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq uals("civicinfo/v2/")); 1853 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq uals("civicinfo/v2/"));
1533 pathOffset += 13; 1854 pathOffset += 13;
1534 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq uals("representatives")); 1855 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq uals("representatives"));
1535 pathOffset += 15; 1856 pathOffset += 15;
(...skipping 19 matching lines...) Expand all
1555 unittest.expect(queryMap["levels"], unittest.equals(arg_levels)); 1876 unittest.expect(queryMap["levels"], unittest.equals(arg_levels));
1556 unittest.expect(queryMap["roles"], unittest.equals(arg_roles)); 1877 unittest.expect(queryMap["roles"], unittest.equals(arg_roles));
1557 1878
1558 1879
1559 var h = { 1880 var h = {
1560 "content-type" : "application/json; charset=utf-8", 1881 "content-type" : "application/json; charset=utf-8",
1561 }; 1882 };
1562 var resp = convert.JSON.encode(buildRepresentativeInfoResponse()); 1883 var resp = convert.JSON.encode(buildRepresentativeInfoResponse());
1563 return new async.Future.value(stringResponse(200, h, resp)); 1884 return new async.Future.value(stringResponse(200, h, resp));
1564 }), true); 1885 }), true);
1565 res.representativeInfoByAddress(address: arg_address, includeOffices: arg_ includeOffices, levels: arg_levels, roles: arg_roles).then(unittest.expectAsync( ((api.RepresentativeInfoResponse response) { 1886 res.representativeInfoByAddress(arg_request, address: arg_address, include Offices: arg_includeOffices, levels: arg_levels, roles: arg_roles).then(unittest .expectAsync(((api.RepresentativeInfoResponse response) {
1566 checkRepresentativeInfoResponse(response); 1887 checkRepresentativeInfoResponse(response);
1567 }))); 1888 })));
1568 }); 1889 });
1569 1890
1570 unittest.test("method--representativeInfoByDivision", () { 1891 unittest.test("method--representativeInfoByDivision", () {
1571 1892
1572 var mock = new HttpServerMock(); 1893 var mock = new HttpServerMock();
1573 api.RepresentativesResourceApi res = new api.CivicinfoApi(mock).representa tives; 1894 api.RepresentativesResourceApi res = new api.CivicinfoApi(mock).representa tives;
1895 var arg_request = buildDivisionRepresentativeInfoRequest();
1574 var arg_ocdId = "foo"; 1896 var arg_ocdId = "foo";
1575 var arg_levels = buildUnnamed2641(); 1897 var arg_levels = buildUnnamed2715();
1576 var arg_recursive = true; 1898 var arg_recursive = true;
1577 var arg_roles = buildUnnamed2642(); 1899 var arg_roles = buildUnnamed2716();
1578 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 1900 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
1901 var obj = new api.DivisionRepresentativeInfoRequest.fromJson(json);
1902 checkDivisionRepresentativeInfoRequest(obj);
1903
1579 var path = (req.url).path; 1904 var path = (req.url).path;
1580 var pathOffset = 0; 1905 var pathOffset = 0;
1581 var index; 1906 var index;
1582 var subPart; 1907 var subPart;
1583 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 1908 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
1584 pathOffset += 1; 1909 pathOffset += 1;
1585 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq uals("civicinfo/v2/")); 1910 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq uals("civicinfo/v2/"));
1586 pathOffset += 13; 1911 pathOffset += 13;
1587 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("representatives/")); 1912 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("representatives/"));
1588 pathOffset += 16; 1913 pathOffset += 16;
(...skipping 21 matching lines...) Expand all
1610 unittest.expect(queryMap["recursive"].first, unittest.equals("$arg_recur sive")); 1935 unittest.expect(queryMap["recursive"].first, unittest.equals("$arg_recur sive"));
1611 unittest.expect(queryMap["roles"], unittest.equals(arg_roles)); 1936 unittest.expect(queryMap["roles"], unittest.equals(arg_roles));
1612 1937
1613 1938
1614 var h = { 1939 var h = {
1615 "content-type" : "application/json; charset=utf-8", 1940 "content-type" : "application/json; charset=utf-8",
1616 }; 1941 };
1617 var resp = convert.JSON.encode(buildRepresentativeInfoData()); 1942 var resp = convert.JSON.encode(buildRepresentativeInfoData());
1618 return new async.Future.value(stringResponse(200, h, resp)); 1943 return new async.Future.value(stringResponse(200, h, resp));
1619 }), true); 1944 }), true);
1620 res.representativeInfoByDivision(arg_ocdId, levels: arg_levels, recursive: arg_recursive, roles: arg_roles).then(unittest.expectAsync(((api.Representative InfoData response) { 1945 res.representativeInfoByDivision(arg_request, arg_ocdId, levels: arg_level s, recursive: arg_recursive, roles: arg_roles).then(unittest.expectAsync(((api.R epresentativeInfoData response) {
1621 checkRepresentativeInfoData(response); 1946 checkRepresentativeInfoData(response);
1622 }))); 1947 })));
1623 }); 1948 });
1624 1949
1625 }); 1950 });
1626 1951
1627 1952
1628 } 1953 }
1629 1954
OLDNEW
« no previous file with comments | « generated/googleapis/test/calendar/v3_test.dart ('k') | generated/googleapis/test/classroom/v1_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698