OLD | NEW |
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; |
11 import 'package:googleapis/common/common.dart' as common; | |
12 import 'package:googleapis/src/common_internal.dart' as common_internal; | |
13 import '../common/common_internal_test.dart' as common_test; | |
14 | 11 |
15 import 'package:googleapis/civicinfo/v2.dart' as api; | 12 import 'package:googleapis/civicinfo/v2.dart' as api; |
16 | 13 |
| 14 class HttpServerMock extends http.BaseClient { |
| 15 core.Function _callback; |
| 16 core.bool _expectJson; |
17 | 17 |
| 18 void register(core.Function callback, core.bool expectJson) { |
| 19 _callback = callback; |
| 20 _expectJson = expectJson; |
| 21 } |
18 | 22 |
19 buildUnnamed1343() { | 23 async.Future<http.StreamedResponse> send(http.BaseRequest request) { |
| 24 if (_expectJson) { |
| 25 return request.finalize() |
| 26 .transform(convert.UTF8.decoder) |
| 27 .join('') |
| 28 .then((core.String jsonString) { |
| 29 if (jsonString.isEmpty) { |
| 30 return _callback(request, null); |
| 31 } else { |
| 32 return _callback(request, convert.JSON.decode(jsonString)); |
| 33 } |
| 34 }); |
| 35 } else { |
| 36 var stream = request.finalize(); |
| 37 if (stream == null) { |
| 38 return _callback(request, []); |
| 39 } else { |
| 40 return stream.toBytes().then((data) { |
| 41 return _callback(request, data); |
| 42 }); |
| 43 } |
| 44 } |
| 45 } |
| 46 } |
| 47 |
| 48 http.StreamedResponse stringResponse( |
| 49 core.int status, core.Map headers, core.String body) { |
| 50 var stream = new async.Stream.fromIterable([convert.UTF8.encode(body)]); |
| 51 return new http.StreamedResponse(stream, status, headers: headers); |
| 52 } |
| 53 |
| 54 buildUnnamed397() { |
20 var o = new core.List<api.Source>(); | 55 var o = new core.List<api.Source>(); |
21 o.add(buildSource()); | 56 o.add(buildSource()); |
22 o.add(buildSource()); | 57 o.add(buildSource()); |
23 return o; | 58 return o; |
24 } | 59 } |
25 | 60 |
26 checkUnnamed1343(core.List<api.Source> o) { | 61 checkUnnamed397(core.List<api.Source> o) { |
27 unittest.expect(o, unittest.hasLength(2)); | 62 unittest.expect(o, unittest.hasLength(2)); |
28 checkSource(o[0]); | 63 checkSource(o[0]); |
29 checkSource(o[1]); | 64 checkSource(o[1]); |
30 } | 65 } |
31 | 66 |
32 core.int buildCounterAdministrationRegion = 0; | 67 core.int buildCounterAdministrationRegion = 0; |
33 buildAdministrationRegion() { | 68 buildAdministrationRegion() { |
34 var o = new api.AdministrationRegion(); | 69 var o = new api.AdministrationRegion(); |
35 buildCounterAdministrationRegion++; | 70 buildCounterAdministrationRegion++; |
36 if (buildCounterAdministrationRegion < 3) { | 71 if (buildCounterAdministrationRegion < 3) { |
37 o.electionAdministrationBody = buildAdministrativeBody(); | 72 o.electionAdministrationBody = buildAdministrativeBody(); |
38 o.id = "foo"; | 73 o.id = "foo"; |
39 o.localJurisdiction = buildAdministrationRegion(); | 74 o.localJurisdiction = buildAdministrationRegion(); |
40 o.name = "foo"; | 75 o.name = "foo"; |
41 o.sources = buildUnnamed1343(); | 76 o.sources = buildUnnamed397(); |
42 } | 77 } |
43 buildCounterAdministrationRegion--; | 78 buildCounterAdministrationRegion--; |
44 return o; | 79 return o; |
45 } | 80 } |
46 | 81 |
47 checkAdministrationRegion(api.AdministrationRegion o) { | 82 checkAdministrationRegion(api.AdministrationRegion o) { |
48 buildCounterAdministrationRegion++; | 83 buildCounterAdministrationRegion++; |
49 if (buildCounterAdministrationRegion < 3) { | 84 if (buildCounterAdministrationRegion < 3) { |
50 checkAdministrativeBody(o.electionAdministrationBody); | 85 checkAdministrativeBody(o.electionAdministrationBody); |
51 unittest.expect(o.id, unittest.equals('foo')); | 86 unittest.expect(o.id, unittest.equals('foo')); |
52 checkAdministrationRegion(o.localJurisdiction); | 87 checkAdministrationRegion(o.localJurisdiction); |
53 unittest.expect(o.name, unittest.equals('foo')); | 88 unittest.expect(o.name, unittest.equals('foo')); |
54 checkUnnamed1343(o.sources); | 89 checkUnnamed397(o.sources); |
55 } | 90 } |
56 buildCounterAdministrationRegion--; | 91 buildCounterAdministrationRegion--; |
57 } | 92 } |
58 | 93 |
59 buildUnnamed1344() { | 94 buildUnnamed398() { |
60 var o = new core.List<api.ElectionOfficial>(); | 95 var o = new core.List<api.ElectionOfficial>(); |
61 o.add(buildElectionOfficial()); | 96 o.add(buildElectionOfficial()); |
62 o.add(buildElectionOfficial()); | 97 o.add(buildElectionOfficial()); |
63 return o; | 98 return o; |
64 } | 99 } |
65 | 100 |
66 checkUnnamed1344(core.List<api.ElectionOfficial> o) { | 101 checkUnnamed398(core.List<api.ElectionOfficial> o) { |
67 unittest.expect(o, unittest.hasLength(2)); | 102 unittest.expect(o, unittest.hasLength(2)); |
68 checkElectionOfficial(o[0]); | 103 checkElectionOfficial(o[0]); |
69 checkElectionOfficial(o[1]); | 104 checkElectionOfficial(o[1]); |
70 } | 105 } |
71 | 106 |
72 buildUnnamed1345() { | 107 buildUnnamed399() { |
73 var o = new core.List<core.String>(); | 108 var o = new core.List<core.String>(); |
74 o.add("foo"); | 109 o.add("foo"); |
75 o.add("foo"); | 110 o.add("foo"); |
76 return o; | 111 return o; |
77 } | 112 } |
78 | 113 |
79 checkUnnamed1345(core.List<core.String> o) { | 114 checkUnnamed399(core.List<core.String> o) { |
80 unittest.expect(o, unittest.hasLength(2)); | 115 unittest.expect(o, unittest.hasLength(2)); |
81 unittest.expect(o[0], unittest.equals('foo')); | 116 unittest.expect(o[0], unittest.equals('foo')); |
82 unittest.expect(o[1], unittest.equals('foo')); | 117 unittest.expect(o[1], unittest.equals('foo')); |
83 } | 118 } |
84 | 119 |
85 core.int buildCounterAdministrativeBody = 0; | 120 core.int buildCounterAdministrativeBody = 0; |
86 buildAdministrativeBody() { | 121 buildAdministrativeBody() { |
87 var o = new api.AdministrativeBody(); | 122 var o = new api.AdministrativeBody(); |
88 buildCounterAdministrativeBody++; | 123 buildCounterAdministrativeBody++; |
89 if (buildCounterAdministrativeBody < 3) { | 124 if (buildCounterAdministrativeBody < 3) { |
90 o.absenteeVotingInfoUrl = "foo"; | 125 o.absenteeVotingInfoUrl = "foo"; |
91 o.ballotInfoUrl = "foo"; | 126 o.ballotInfoUrl = "foo"; |
92 o.correspondenceAddress = buildSimpleAddressType(); | 127 o.correspondenceAddress = buildSimpleAddressType(); |
93 o.electionInfoUrl = "foo"; | 128 o.electionInfoUrl = "foo"; |
94 o.electionOfficials = buildUnnamed1344(); | 129 o.electionOfficials = buildUnnamed398(); |
95 o.electionRegistrationConfirmationUrl = "foo"; | 130 o.electionRegistrationConfirmationUrl = "foo"; |
96 o.electionRegistrationUrl = "foo"; | 131 o.electionRegistrationUrl = "foo"; |
97 o.electionRulesUrl = "foo"; | 132 o.electionRulesUrl = "foo"; |
98 o.hoursOfOperation = "foo"; | 133 o.hoursOfOperation = "foo"; |
99 o.name = "foo"; | 134 o.name = "foo"; |
100 o.physicalAddress = buildSimpleAddressType(); | 135 o.physicalAddress = buildSimpleAddressType(); |
101 o.voterServices = buildUnnamed1345(); | 136 o.voterServices = buildUnnamed399(); |
102 o.votingLocationFinderUrl = "foo"; | 137 o.votingLocationFinderUrl = "foo"; |
103 } | 138 } |
104 buildCounterAdministrativeBody--; | 139 buildCounterAdministrativeBody--; |
105 return o; | 140 return o; |
106 } | 141 } |
107 | 142 |
108 checkAdministrativeBody(api.AdministrativeBody o) { | 143 checkAdministrativeBody(api.AdministrativeBody o) { |
109 buildCounterAdministrativeBody++; | 144 buildCounterAdministrativeBody++; |
110 if (buildCounterAdministrativeBody < 3) { | 145 if (buildCounterAdministrativeBody < 3) { |
111 unittest.expect(o.absenteeVotingInfoUrl, unittest.equals('foo')); | 146 unittest.expect(o.absenteeVotingInfoUrl, unittest.equals('foo')); |
112 unittest.expect(o.ballotInfoUrl, unittest.equals('foo')); | 147 unittest.expect(o.ballotInfoUrl, unittest.equals('foo')); |
113 checkSimpleAddressType(o.correspondenceAddress); | 148 checkSimpleAddressType(o.correspondenceAddress); |
114 unittest.expect(o.electionInfoUrl, unittest.equals('foo')); | 149 unittest.expect(o.electionInfoUrl, unittest.equals('foo')); |
115 checkUnnamed1344(o.electionOfficials); | 150 checkUnnamed398(o.electionOfficials); |
116 unittest.expect(o.electionRegistrationConfirmationUrl, unittest.equals('foo'
)); | 151 unittest.expect(o.electionRegistrationConfirmationUrl, unittest.equals('foo'
)); |
117 unittest.expect(o.electionRegistrationUrl, unittest.equals('foo')); | 152 unittest.expect(o.electionRegistrationUrl, unittest.equals('foo')); |
118 unittest.expect(o.electionRulesUrl, unittest.equals('foo')); | 153 unittest.expect(o.electionRulesUrl, unittest.equals('foo')); |
119 unittest.expect(o.hoursOfOperation, unittest.equals('foo')); | 154 unittest.expect(o.hoursOfOperation, unittest.equals('foo')); |
120 unittest.expect(o.name, unittest.equals('foo')); | 155 unittest.expect(o.name, unittest.equals('foo')); |
121 checkSimpleAddressType(o.physicalAddress); | 156 checkSimpleAddressType(o.physicalAddress); |
122 checkUnnamed1345(o.voterServices); | 157 checkUnnamed399(o.voterServices); |
123 unittest.expect(o.votingLocationFinderUrl, unittest.equals('foo')); | 158 unittest.expect(o.votingLocationFinderUrl, unittest.equals('foo')); |
124 } | 159 } |
125 buildCounterAdministrativeBody--; | 160 buildCounterAdministrativeBody--; |
126 } | 161 } |
127 | 162 |
128 buildUnnamed1346() { | 163 buildUnnamed400() { |
129 var o = new core.List<api.Channel>(); | 164 var o = new core.List<api.Channel>(); |
130 o.add(buildChannel()); | 165 o.add(buildChannel()); |
131 o.add(buildChannel()); | 166 o.add(buildChannel()); |
132 return o; | 167 return o; |
133 } | 168 } |
134 | 169 |
135 checkUnnamed1346(core.List<api.Channel> o) { | 170 checkUnnamed400(core.List<api.Channel> o) { |
136 unittest.expect(o, unittest.hasLength(2)); | 171 unittest.expect(o, unittest.hasLength(2)); |
137 checkChannel(o[0]); | 172 checkChannel(o[0]); |
138 checkChannel(o[1]); | 173 checkChannel(o[1]); |
139 } | 174 } |
140 | 175 |
141 core.int buildCounterCandidate = 0; | 176 core.int buildCounterCandidate = 0; |
142 buildCandidate() { | 177 buildCandidate() { |
143 var o = new api.Candidate(); | 178 var o = new api.Candidate(); |
144 buildCounterCandidate++; | 179 buildCounterCandidate++; |
145 if (buildCounterCandidate < 3) { | 180 if (buildCounterCandidate < 3) { |
146 o.candidateUrl = "foo"; | 181 o.candidateUrl = "foo"; |
147 o.channels = buildUnnamed1346(); | 182 o.channels = buildUnnamed400(); |
148 o.email = "foo"; | 183 o.email = "foo"; |
149 o.name = "foo"; | 184 o.name = "foo"; |
150 o.orderOnBallot = "foo"; | 185 o.orderOnBallot = "foo"; |
151 o.party = "foo"; | 186 o.party = "foo"; |
152 o.phone = "foo"; | 187 o.phone = "foo"; |
153 o.photoUrl = "foo"; | 188 o.photoUrl = "foo"; |
154 } | 189 } |
155 buildCounterCandidate--; | 190 buildCounterCandidate--; |
156 return o; | 191 return o; |
157 } | 192 } |
158 | 193 |
159 checkCandidate(api.Candidate o) { | 194 checkCandidate(api.Candidate o) { |
160 buildCounterCandidate++; | 195 buildCounterCandidate++; |
161 if (buildCounterCandidate < 3) { | 196 if (buildCounterCandidate < 3) { |
162 unittest.expect(o.candidateUrl, unittest.equals('foo')); | 197 unittest.expect(o.candidateUrl, unittest.equals('foo')); |
163 checkUnnamed1346(o.channels); | 198 checkUnnamed400(o.channels); |
164 unittest.expect(o.email, unittest.equals('foo')); | 199 unittest.expect(o.email, unittest.equals('foo')); |
165 unittest.expect(o.name, unittest.equals('foo')); | 200 unittest.expect(o.name, unittest.equals('foo')); |
166 unittest.expect(o.orderOnBallot, unittest.equals('foo')); | 201 unittest.expect(o.orderOnBallot, unittest.equals('foo')); |
167 unittest.expect(o.party, unittest.equals('foo')); | 202 unittest.expect(o.party, unittest.equals('foo')); |
168 unittest.expect(o.phone, unittest.equals('foo')); | 203 unittest.expect(o.phone, unittest.equals('foo')); |
169 unittest.expect(o.photoUrl, unittest.equals('foo')); | 204 unittest.expect(o.photoUrl, unittest.equals('foo')); |
170 } | 205 } |
171 buildCounterCandidate--; | 206 buildCounterCandidate--; |
172 } | 207 } |
173 | 208 |
(...skipping 11 matching lines...) Expand all Loading... |
185 | 220 |
186 checkChannel(api.Channel o) { | 221 checkChannel(api.Channel o) { |
187 buildCounterChannel++; | 222 buildCounterChannel++; |
188 if (buildCounterChannel < 3) { | 223 if (buildCounterChannel < 3) { |
189 unittest.expect(o.id, unittest.equals('foo')); | 224 unittest.expect(o.id, unittest.equals('foo')); |
190 unittest.expect(o.type, unittest.equals('foo')); | 225 unittest.expect(o.type, unittest.equals('foo')); |
191 } | 226 } |
192 buildCounterChannel--; | 227 buildCounterChannel--; |
193 } | 228 } |
194 | 229 |
195 buildUnnamed1347() { | 230 buildUnnamed401() { |
196 var o = new core.List<api.Candidate>(); | 231 var o = new core.List<api.Candidate>(); |
197 o.add(buildCandidate()); | 232 o.add(buildCandidate()); |
198 o.add(buildCandidate()); | 233 o.add(buildCandidate()); |
199 return o; | 234 return o; |
200 } | 235 } |
201 | 236 |
202 checkUnnamed1347(core.List<api.Candidate> o) { | 237 checkUnnamed401(core.List<api.Candidate> o) { |
203 unittest.expect(o, unittest.hasLength(2)); | 238 unittest.expect(o, unittest.hasLength(2)); |
204 checkCandidate(o[0]); | 239 checkCandidate(o[0]); |
205 checkCandidate(o[1]); | 240 checkCandidate(o[1]); |
206 } | 241 } |
207 | 242 |
208 buildUnnamed1348() { | 243 buildUnnamed402() { |
209 var o = new core.List<core.String>(); | 244 var o = new core.List<core.String>(); |
210 o.add("foo"); | 245 o.add("foo"); |
211 o.add("foo"); | 246 o.add("foo"); |
212 return o; | 247 return o; |
213 } | 248 } |
214 | 249 |
215 checkUnnamed1348(core.List<core.String> o) { | 250 checkUnnamed402(core.List<core.String> o) { |
216 unittest.expect(o, unittest.hasLength(2)); | 251 unittest.expect(o, unittest.hasLength(2)); |
217 unittest.expect(o[0], unittest.equals('foo')); | 252 unittest.expect(o[0], unittest.equals('foo')); |
218 unittest.expect(o[1], unittest.equals('foo')); | 253 unittest.expect(o[1], unittest.equals('foo')); |
219 } | 254 } |
220 | 255 |
221 buildUnnamed1349() { | 256 buildUnnamed403() { |
222 var o = new core.List<core.String>(); | 257 var o = new core.List<core.String>(); |
223 o.add("foo"); | 258 o.add("foo"); |
224 o.add("foo"); | 259 o.add("foo"); |
225 return o; | 260 return o; |
226 } | 261 } |
227 | 262 |
228 checkUnnamed1349(core.List<core.String> o) { | 263 checkUnnamed403(core.List<core.String> o) { |
229 unittest.expect(o, unittest.hasLength(2)); | 264 unittest.expect(o, unittest.hasLength(2)); |
230 unittest.expect(o[0], unittest.equals('foo')); | 265 unittest.expect(o[0], unittest.equals('foo')); |
231 unittest.expect(o[1], unittest.equals('foo')); | 266 unittest.expect(o[1], unittest.equals('foo')); |
232 } | 267 } |
233 | 268 |
234 buildUnnamed1350() { | 269 buildUnnamed404() { |
235 var o = new core.List<api.Source>(); | 270 var o = new core.List<api.Source>(); |
236 o.add(buildSource()); | 271 o.add(buildSource()); |
237 o.add(buildSource()); | 272 o.add(buildSource()); |
238 return o; | 273 return o; |
239 } | 274 } |
240 | 275 |
241 checkUnnamed1350(core.List<api.Source> o) { | 276 checkUnnamed404(core.List<api.Source> o) { |
242 unittest.expect(o, unittest.hasLength(2)); | 277 unittest.expect(o, unittest.hasLength(2)); |
243 checkSource(o[0]); | 278 checkSource(o[0]); |
244 checkSource(o[1]); | 279 checkSource(o[1]); |
245 } | 280 } |
246 | 281 |
247 core.int buildCounterContest = 0; | 282 core.int buildCounterContest = 0; |
248 buildContest() { | 283 buildContest() { |
249 var o = new api.Contest(); | 284 var o = new api.Contest(); |
250 buildCounterContest++; | 285 buildCounterContest++; |
251 if (buildCounterContest < 3) { | 286 if (buildCounterContest < 3) { |
252 o.ballotPlacement = "foo"; | 287 o.ballotPlacement = "foo"; |
253 o.candidates = buildUnnamed1347(); | 288 o.candidates = buildUnnamed401(); |
254 o.district = buildElectoralDistrict(); | 289 o.district = buildElectoralDistrict(); |
255 o.electorateSpecifications = "foo"; | 290 o.electorateSpecifications = "foo"; |
256 o.id = "foo"; | 291 o.id = "foo"; |
257 o.level = buildUnnamed1348(); | 292 o.level = buildUnnamed402(); |
258 o.numberElected = "foo"; | 293 o.numberElected = "foo"; |
259 o.numberVotingFor = "foo"; | 294 o.numberVotingFor = "foo"; |
260 o.office = "foo"; | 295 o.office = "foo"; |
261 o.primaryParty = "foo"; | 296 o.primaryParty = "foo"; |
262 o.referendumSubtitle = "foo"; | 297 o.referendumSubtitle = "foo"; |
263 o.referendumTitle = "foo"; | 298 o.referendumTitle = "foo"; |
264 o.referendumUrl = "foo"; | 299 o.referendumUrl = "foo"; |
265 o.roles = buildUnnamed1349(); | 300 o.roles = buildUnnamed403(); |
266 o.sources = buildUnnamed1350(); | 301 o.sources = buildUnnamed404(); |
267 o.special = "foo"; | 302 o.special = "foo"; |
268 o.type = "foo"; | 303 o.type = "foo"; |
269 } | 304 } |
270 buildCounterContest--; | 305 buildCounterContest--; |
271 return o; | 306 return o; |
272 } | 307 } |
273 | 308 |
274 checkContest(api.Contest o) { | 309 checkContest(api.Contest o) { |
275 buildCounterContest++; | 310 buildCounterContest++; |
276 if (buildCounterContest < 3) { | 311 if (buildCounterContest < 3) { |
277 unittest.expect(o.ballotPlacement, unittest.equals('foo')); | 312 unittest.expect(o.ballotPlacement, unittest.equals('foo')); |
278 checkUnnamed1347(o.candidates); | 313 checkUnnamed401(o.candidates); |
279 checkElectoralDistrict(o.district); | 314 checkElectoralDistrict(o.district); |
280 unittest.expect(o.electorateSpecifications, unittest.equals('foo')); | 315 unittest.expect(o.electorateSpecifications, unittest.equals('foo')); |
281 unittest.expect(o.id, unittest.equals('foo')); | 316 unittest.expect(o.id, unittest.equals('foo')); |
282 checkUnnamed1348(o.level); | 317 checkUnnamed402(o.level); |
283 unittest.expect(o.numberElected, unittest.equals('foo')); | 318 unittest.expect(o.numberElected, unittest.equals('foo')); |
284 unittest.expect(o.numberVotingFor, unittest.equals('foo')); | 319 unittest.expect(o.numberVotingFor, unittest.equals('foo')); |
285 unittest.expect(o.office, unittest.equals('foo')); | 320 unittest.expect(o.office, unittest.equals('foo')); |
286 unittest.expect(o.primaryParty, unittest.equals('foo')); | 321 unittest.expect(o.primaryParty, unittest.equals('foo')); |
287 unittest.expect(o.referendumSubtitle, unittest.equals('foo')); | 322 unittest.expect(o.referendumSubtitle, unittest.equals('foo')); |
288 unittest.expect(o.referendumTitle, unittest.equals('foo')); | 323 unittest.expect(o.referendumTitle, unittest.equals('foo')); |
289 unittest.expect(o.referendumUrl, unittest.equals('foo')); | 324 unittest.expect(o.referendumUrl, unittest.equals('foo')); |
290 checkUnnamed1349(o.roles); | 325 checkUnnamed403(o.roles); |
291 checkUnnamed1350(o.sources); | 326 checkUnnamed404(o.sources); |
292 unittest.expect(o.special, unittest.equals('foo')); | 327 unittest.expect(o.special, unittest.equals('foo')); |
293 unittest.expect(o.type, unittest.equals('foo')); | 328 unittest.expect(o.type, unittest.equals('foo')); |
294 } | 329 } |
295 buildCounterContest--; | 330 buildCounterContest--; |
296 } | 331 } |
297 | 332 |
298 buildUnnamed1351() { | 333 buildUnnamed405() { |
299 var o = new core.List<api.DivisionSearchResult>(); | 334 var o = new core.List<api.DivisionSearchResult>(); |
300 o.add(buildDivisionSearchResult()); | 335 o.add(buildDivisionSearchResult()); |
301 o.add(buildDivisionSearchResult()); | 336 o.add(buildDivisionSearchResult()); |
302 return o; | 337 return o; |
303 } | 338 } |
304 | 339 |
305 checkUnnamed1351(core.List<api.DivisionSearchResult> o) { | 340 checkUnnamed405(core.List<api.DivisionSearchResult> o) { |
306 unittest.expect(o, unittest.hasLength(2)); | 341 unittest.expect(o, unittest.hasLength(2)); |
307 checkDivisionSearchResult(o[0]); | 342 checkDivisionSearchResult(o[0]); |
308 checkDivisionSearchResult(o[1]); | 343 checkDivisionSearchResult(o[1]); |
309 } | 344 } |
310 | 345 |
311 core.int buildCounterDivisionSearchResponse = 0; | 346 core.int buildCounterDivisionSearchResponse = 0; |
312 buildDivisionSearchResponse() { | 347 buildDivisionSearchResponse() { |
313 var o = new api.DivisionSearchResponse(); | 348 var o = new api.DivisionSearchResponse(); |
314 buildCounterDivisionSearchResponse++; | 349 buildCounterDivisionSearchResponse++; |
315 if (buildCounterDivisionSearchResponse < 3) { | 350 if (buildCounterDivisionSearchResponse < 3) { |
316 o.kind = "foo"; | 351 o.kind = "foo"; |
317 o.results = buildUnnamed1351(); | 352 o.results = buildUnnamed405(); |
318 } | 353 } |
319 buildCounterDivisionSearchResponse--; | 354 buildCounterDivisionSearchResponse--; |
320 return o; | 355 return o; |
321 } | 356 } |
322 | 357 |
323 checkDivisionSearchResponse(api.DivisionSearchResponse o) { | 358 checkDivisionSearchResponse(api.DivisionSearchResponse o) { |
324 buildCounterDivisionSearchResponse++; | 359 buildCounterDivisionSearchResponse++; |
325 if (buildCounterDivisionSearchResponse < 3) { | 360 if (buildCounterDivisionSearchResponse < 3) { |
326 unittest.expect(o.kind, unittest.equals('foo')); | 361 unittest.expect(o.kind, unittest.equals('foo')); |
327 checkUnnamed1351(o.results); | 362 checkUnnamed405(o.results); |
328 } | 363 } |
329 buildCounterDivisionSearchResponse--; | 364 buildCounterDivisionSearchResponse--; |
330 } | 365 } |
331 | 366 |
332 buildUnnamed1352() { | 367 buildUnnamed406() { |
333 var o = new core.List<core.String>(); | 368 var o = new core.List<core.String>(); |
334 o.add("foo"); | 369 o.add("foo"); |
335 o.add("foo"); | 370 o.add("foo"); |
336 return o; | 371 return o; |
337 } | 372 } |
338 | 373 |
339 checkUnnamed1352(core.List<core.String> o) { | 374 checkUnnamed406(core.List<core.String> o) { |
340 unittest.expect(o, unittest.hasLength(2)); | 375 unittest.expect(o, unittest.hasLength(2)); |
341 unittest.expect(o[0], unittest.equals('foo')); | 376 unittest.expect(o[0], unittest.equals('foo')); |
342 unittest.expect(o[1], unittest.equals('foo')); | 377 unittest.expect(o[1], unittest.equals('foo')); |
343 } | 378 } |
344 | 379 |
345 core.int buildCounterDivisionSearchResult = 0; | 380 core.int buildCounterDivisionSearchResult = 0; |
346 buildDivisionSearchResult() { | 381 buildDivisionSearchResult() { |
347 var o = new api.DivisionSearchResult(); | 382 var o = new api.DivisionSearchResult(); |
348 buildCounterDivisionSearchResult++; | 383 buildCounterDivisionSearchResult++; |
349 if (buildCounterDivisionSearchResult < 3) { | 384 if (buildCounterDivisionSearchResult < 3) { |
350 o.aliases = buildUnnamed1352(); | 385 o.aliases = buildUnnamed406(); |
351 o.name = "foo"; | 386 o.name = "foo"; |
352 o.ocdId = "foo"; | 387 o.ocdId = "foo"; |
353 } | 388 } |
354 buildCounterDivisionSearchResult--; | 389 buildCounterDivisionSearchResult--; |
355 return o; | 390 return o; |
356 } | 391 } |
357 | 392 |
358 checkDivisionSearchResult(api.DivisionSearchResult o) { | 393 checkDivisionSearchResult(api.DivisionSearchResult o) { |
359 buildCounterDivisionSearchResult++; | 394 buildCounterDivisionSearchResult++; |
360 if (buildCounterDivisionSearchResult < 3) { | 395 if (buildCounterDivisionSearchResult < 3) { |
361 checkUnnamed1352(o.aliases); | 396 checkUnnamed406(o.aliases); |
362 unittest.expect(o.name, unittest.equals('foo')); | 397 unittest.expect(o.name, unittest.equals('foo')); |
363 unittest.expect(o.ocdId, unittest.equals('foo')); | 398 unittest.expect(o.ocdId, unittest.equals('foo')); |
364 } | 399 } |
365 buildCounterDivisionSearchResult--; | 400 buildCounterDivisionSearchResult--; |
366 } | 401 } |
367 | 402 |
368 core.int buildCounterElection = 0; | 403 core.int buildCounterElection = 0; |
369 buildElection() { | 404 buildElection() { |
370 var o = new api.Election(); | 405 var o = new api.Election(); |
371 buildCounterElection++; | 406 buildCounterElection++; |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
408 if (buildCounterElectionOfficial < 3) { | 443 if (buildCounterElectionOfficial < 3) { |
409 unittest.expect(o.emailAddress, unittest.equals('foo')); | 444 unittest.expect(o.emailAddress, unittest.equals('foo')); |
410 unittest.expect(o.faxNumber, unittest.equals('foo')); | 445 unittest.expect(o.faxNumber, unittest.equals('foo')); |
411 unittest.expect(o.name, unittest.equals('foo')); | 446 unittest.expect(o.name, unittest.equals('foo')); |
412 unittest.expect(o.officePhoneNumber, unittest.equals('foo')); | 447 unittest.expect(o.officePhoneNumber, unittest.equals('foo')); |
413 unittest.expect(o.title, unittest.equals('foo')); | 448 unittest.expect(o.title, unittest.equals('foo')); |
414 } | 449 } |
415 buildCounterElectionOfficial--; | 450 buildCounterElectionOfficial--; |
416 } | 451 } |
417 | 452 |
418 buildUnnamed1353() { | 453 buildUnnamed407() { |
419 var o = new core.List<api.Election>(); | 454 var o = new core.List<api.Election>(); |
420 o.add(buildElection()); | 455 o.add(buildElection()); |
421 o.add(buildElection()); | 456 o.add(buildElection()); |
422 return o; | 457 return o; |
423 } | 458 } |
424 | 459 |
425 checkUnnamed1353(core.List<api.Election> o) { | 460 checkUnnamed407(core.List<api.Election> o) { |
426 unittest.expect(o, unittest.hasLength(2)); | 461 unittest.expect(o, unittest.hasLength(2)); |
427 checkElection(o[0]); | 462 checkElection(o[0]); |
428 checkElection(o[1]); | 463 checkElection(o[1]); |
429 } | 464 } |
430 | 465 |
431 core.int buildCounterElectionsQueryResponse = 0; | 466 core.int buildCounterElectionsQueryResponse = 0; |
432 buildElectionsQueryResponse() { | 467 buildElectionsQueryResponse() { |
433 var o = new api.ElectionsQueryResponse(); | 468 var o = new api.ElectionsQueryResponse(); |
434 buildCounterElectionsQueryResponse++; | 469 buildCounterElectionsQueryResponse++; |
435 if (buildCounterElectionsQueryResponse < 3) { | 470 if (buildCounterElectionsQueryResponse < 3) { |
436 o.elections = buildUnnamed1353(); | 471 o.elections = buildUnnamed407(); |
437 o.kind = "foo"; | 472 o.kind = "foo"; |
438 } | 473 } |
439 buildCounterElectionsQueryResponse--; | 474 buildCounterElectionsQueryResponse--; |
440 return o; | 475 return o; |
441 } | 476 } |
442 | 477 |
443 checkElectionsQueryResponse(api.ElectionsQueryResponse o) { | 478 checkElectionsQueryResponse(api.ElectionsQueryResponse o) { |
444 buildCounterElectionsQueryResponse++; | 479 buildCounterElectionsQueryResponse++; |
445 if (buildCounterElectionsQueryResponse < 3) { | 480 if (buildCounterElectionsQueryResponse < 3) { |
446 checkUnnamed1353(o.elections); | 481 checkUnnamed407(o.elections); |
447 unittest.expect(o.kind, unittest.equals('foo')); | 482 unittest.expect(o.kind, unittest.equals('foo')); |
448 } | 483 } |
449 buildCounterElectionsQueryResponse--; | 484 buildCounterElectionsQueryResponse--; |
450 } | 485 } |
451 | 486 |
452 core.int buildCounterElectoralDistrict = 0; | 487 core.int buildCounterElectoralDistrict = 0; |
453 buildElectoralDistrict() { | 488 buildElectoralDistrict() { |
454 var o = new api.ElectoralDistrict(); | 489 var o = new api.ElectoralDistrict(); |
455 buildCounterElectoralDistrict++; | 490 buildCounterElectoralDistrict++; |
456 if (buildCounterElectoralDistrict < 3) { | 491 if (buildCounterElectoralDistrict < 3) { |
457 o.id = "foo"; | 492 o.id = "foo"; |
458 o.name = "foo"; | 493 o.name = "foo"; |
459 o.scope = "foo"; | 494 o.scope = "foo"; |
460 } | 495 } |
461 buildCounterElectoralDistrict--; | 496 buildCounterElectoralDistrict--; |
462 return o; | 497 return o; |
463 } | 498 } |
464 | 499 |
465 checkElectoralDistrict(api.ElectoralDistrict o) { | 500 checkElectoralDistrict(api.ElectoralDistrict o) { |
466 buildCounterElectoralDistrict++; | 501 buildCounterElectoralDistrict++; |
467 if (buildCounterElectoralDistrict < 3) { | 502 if (buildCounterElectoralDistrict < 3) { |
468 unittest.expect(o.id, unittest.equals('foo')); | 503 unittest.expect(o.id, unittest.equals('foo')); |
469 unittest.expect(o.name, unittest.equals('foo')); | 504 unittest.expect(o.name, unittest.equals('foo')); |
470 unittest.expect(o.scope, unittest.equals('foo')); | 505 unittest.expect(o.scope, unittest.equals('foo')); |
471 } | 506 } |
472 buildCounterElectoralDistrict--; | 507 buildCounterElectoralDistrict--; |
473 } | 508 } |
474 | 509 |
475 buildUnnamed1354() { | 510 buildUnnamed408() { |
476 var o = new core.List<core.String>(); | 511 var o = new core.List<core.String>(); |
477 o.add("foo"); | 512 o.add("foo"); |
478 o.add("foo"); | 513 o.add("foo"); |
479 return o; | 514 return o; |
480 } | 515 } |
481 | 516 |
482 checkUnnamed1354(core.List<core.String> o) { | 517 checkUnnamed408(core.List<core.String> o) { |
483 unittest.expect(o, unittest.hasLength(2)); | 518 unittest.expect(o, unittest.hasLength(2)); |
484 unittest.expect(o[0], unittest.equals('foo')); | 519 unittest.expect(o[0], unittest.equals('foo')); |
485 unittest.expect(o[1], unittest.equals('foo')); | 520 unittest.expect(o[1], unittest.equals('foo')); |
486 } | 521 } |
487 | 522 |
488 buildUnnamed1355() { | 523 buildUnnamed409() { |
489 var o = new core.List<core.int>(); | 524 var o = new core.List<core.int>(); |
490 o.add(42); | 525 o.add(42); |
491 o.add(42); | 526 o.add(42); |
492 return o; | 527 return o; |
493 } | 528 } |
494 | 529 |
495 checkUnnamed1355(core.List<core.int> o) { | 530 checkUnnamed409(core.List<core.int> o) { |
496 unittest.expect(o, unittest.hasLength(2)); | 531 unittest.expect(o, unittest.hasLength(2)); |
497 unittest.expect(o[0], unittest.equals(42)); | 532 unittest.expect(o[0], unittest.equals(42)); |
498 unittest.expect(o[1], unittest.equals(42)); | 533 unittest.expect(o[1], unittest.equals(42)); |
499 } | 534 } |
500 | 535 |
501 core.int buildCounterGeographicDivision = 0; | 536 core.int buildCounterGeographicDivision = 0; |
502 buildGeographicDivision() { | 537 buildGeographicDivision() { |
503 var o = new api.GeographicDivision(); | 538 var o = new api.GeographicDivision(); |
504 buildCounterGeographicDivision++; | 539 buildCounterGeographicDivision++; |
505 if (buildCounterGeographicDivision < 3) { | 540 if (buildCounterGeographicDivision < 3) { |
506 o.alsoKnownAs = buildUnnamed1354(); | 541 o.alsoKnownAs = buildUnnamed408(); |
507 o.name = "foo"; | 542 o.name = "foo"; |
508 o.officeIndices = buildUnnamed1355(); | 543 o.officeIndices = buildUnnamed409(); |
509 } | 544 } |
510 buildCounterGeographicDivision--; | 545 buildCounterGeographicDivision--; |
511 return o; | 546 return o; |
512 } | 547 } |
513 | 548 |
514 checkGeographicDivision(api.GeographicDivision o) { | 549 checkGeographicDivision(api.GeographicDivision o) { |
515 buildCounterGeographicDivision++; | 550 buildCounterGeographicDivision++; |
516 if (buildCounterGeographicDivision < 3) { | 551 if (buildCounterGeographicDivision < 3) { |
517 checkUnnamed1354(o.alsoKnownAs); | 552 checkUnnamed408(o.alsoKnownAs); |
518 unittest.expect(o.name, unittest.equals('foo')); | 553 unittest.expect(o.name, unittest.equals('foo')); |
519 checkUnnamed1355(o.officeIndices); | 554 checkUnnamed409(o.officeIndices); |
520 } | 555 } |
521 buildCounterGeographicDivision--; | 556 buildCounterGeographicDivision--; |
522 } | 557 } |
523 | 558 |
524 buildUnnamed1356() { | 559 buildUnnamed410() { |
525 var o = new core.List<core.String>(); | 560 var o = new core.List<core.String>(); |
526 o.add("foo"); | 561 o.add("foo"); |
527 o.add("foo"); | 562 o.add("foo"); |
528 return o; | 563 return o; |
529 } | 564 } |
530 | 565 |
531 checkUnnamed1356(core.List<core.String> o) { | 566 checkUnnamed410(core.List<core.String> o) { |
532 unittest.expect(o, unittest.hasLength(2)); | 567 unittest.expect(o, unittest.hasLength(2)); |
533 unittest.expect(o[0], unittest.equals('foo')); | 568 unittest.expect(o[0], unittest.equals('foo')); |
534 unittest.expect(o[1], unittest.equals('foo')); | 569 unittest.expect(o[1], unittest.equals('foo')); |
535 } | 570 } |
536 | 571 |
537 buildUnnamed1357() { | 572 buildUnnamed411() { |
538 var o = new core.List<core.int>(); | 573 var o = new core.List<core.int>(); |
539 o.add(42); | 574 o.add(42); |
540 o.add(42); | 575 o.add(42); |
541 return o; | 576 return o; |
542 } | 577 } |
543 | 578 |
544 checkUnnamed1357(core.List<core.int> o) { | 579 checkUnnamed411(core.List<core.int> o) { |
545 unittest.expect(o, unittest.hasLength(2)); | 580 unittest.expect(o, unittest.hasLength(2)); |
546 unittest.expect(o[0], unittest.equals(42)); | 581 unittest.expect(o[0], unittest.equals(42)); |
547 unittest.expect(o[1], unittest.equals(42)); | 582 unittest.expect(o[1], unittest.equals(42)); |
548 } | 583 } |
549 | 584 |
550 buildUnnamed1358() { | 585 buildUnnamed412() { |
551 var o = new core.List<core.String>(); | 586 var o = new core.List<core.String>(); |
552 o.add("foo"); | 587 o.add("foo"); |
553 o.add("foo"); | 588 o.add("foo"); |
554 return o; | 589 return o; |
555 } | 590 } |
556 | 591 |
557 checkUnnamed1358(core.List<core.String> o) { | 592 checkUnnamed412(core.List<core.String> o) { |
558 unittest.expect(o, unittest.hasLength(2)); | 593 unittest.expect(o, unittest.hasLength(2)); |
559 unittest.expect(o[0], unittest.equals('foo')); | 594 unittest.expect(o[0], unittest.equals('foo')); |
560 unittest.expect(o[1], unittest.equals('foo')); | 595 unittest.expect(o[1], unittest.equals('foo')); |
561 } | 596 } |
562 | 597 |
563 buildUnnamed1359() { | 598 buildUnnamed413() { |
564 var o = new core.List<api.Source>(); | 599 var o = new core.List<api.Source>(); |
565 o.add(buildSource()); | 600 o.add(buildSource()); |
566 o.add(buildSource()); | 601 o.add(buildSource()); |
567 return o; | 602 return o; |
568 } | 603 } |
569 | 604 |
570 checkUnnamed1359(core.List<api.Source> o) { | 605 checkUnnamed413(core.List<api.Source> o) { |
571 unittest.expect(o, unittest.hasLength(2)); | 606 unittest.expect(o, unittest.hasLength(2)); |
572 checkSource(o[0]); | 607 checkSource(o[0]); |
573 checkSource(o[1]); | 608 checkSource(o[1]); |
574 } | 609 } |
575 | 610 |
576 core.int buildCounterOffice = 0; | 611 core.int buildCounterOffice = 0; |
577 buildOffice() { | 612 buildOffice() { |
578 var o = new api.Office(); | 613 var o = new api.Office(); |
579 buildCounterOffice++; | 614 buildCounterOffice++; |
580 if (buildCounterOffice < 3) { | 615 if (buildCounterOffice < 3) { |
581 o.divisionId = "foo"; | 616 o.divisionId = "foo"; |
582 o.levels = buildUnnamed1356(); | 617 o.levels = buildUnnamed410(); |
583 o.name = "foo"; | 618 o.name = "foo"; |
584 o.officialIndices = buildUnnamed1357(); | 619 o.officialIndices = buildUnnamed411(); |
585 o.roles = buildUnnamed1358(); | 620 o.roles = buildUnnamed412(); |
586 o.sources = buildUnnamed1359(); | 621 o.sources = buildUnnamed413(); |
587 } | 622 } |
588 buildCounterOffice--; | 623 buildCounterOffice--; |
589 return o; | 624 return o; |
590 } | 625 } |
591 | 626 |
592 checkOffice(api.Office o) { | 627 checkOffice(api.Office o) { |
593 buildCounterOffice++; | 628 buildCounterOffice++; |
594 if (buildCounterOffice < 3) { | 629 if (buildCounterOffice < 3) { |
595 unittest.expect(o.divisionId, unittest.equals('foo')); | 630 unittest.expect(o.divisionId, unittest.equals('foo')); |
596 checkUnnamed1356(o.levels); | 631 checkUnnamed410(o.levels); |
597 unittest.expect(o.name, unittest.equals('foo')); | 632 unittest.expect(o.name, unittest.equals('foo')); |
598 checkUnnamed1357(o.officialIndices); | 633 checkUnnamed411(o.officialIndices); |
599 checkUnnamed1358(o.roles); | 634 checkUnnamed412(o.roles); |
600 checkUnnamed1359(o.sources); | 635 checkUnnamed413(o.sources); |
601 } | 636 } |
602 buildCounterOffice--; | 637 buildCounterOffice--; |
603 } | 638 } |
604 | 639 |
605 buildUnnamed1360() { | 640 buildUnnamed414() { |
606 var o = new core.List<api.SimpleAddressType>(); | 641 var o = new core.List<api.SimpleAddressType>(); |
607 o.add(buildSimpleAddressType()); | 642 o.add(buildSimpleAddressType()); |
608 o.add(buildSimpleAddressType()); | 643 o.add(buildSimpleAddressType()); |
609 return o; | 644 return o; |
610 } | 645 } |
611 | 646 |
612 checkUnnamed1360(core.List<api.SimpleAddressType> o) { | 647 checkUnnamed414(core.List<api.SimpleAddressType> o) { |
613 unittest.expect(o, unittest.hasLength(2)); | 648 unittest.expect(o, unittest.hasLength(2)); |
614 checkSimpleAddressType(o[0]); | 649 checkSimpleAddressType(o[0]); |
615 checkSimpleAddressType(o[1]); | 650 checkSimpleAddressType(o[1]); |
616 } | 651 } |
617 | 652 |
618 buildUnnamed1361() { | 653 buildUnnamed415() { |
619 var o = new core.List<api.Channel>(); | 654 var o = new core.List<api.Channel>(); |
620 o.add(buildChannel()); | 655 o.add(buildChannel()); |
621 o.add(buildChannel()); | 656 o.add(buildChannel()); |
622 return o; | 657 return o; |
623 } | 658 } |
624 | 659 |
625 checkUnnamed1361(core.List<api.Channel> o) { | 660 checkUnnamed415(core.List<api.Channel> o) { |
626 unittest.expect(o, unittest.hasLength(2)); | 661 unittest.expect(o, unittest.hasLength(2)); |
627 checkChannel(o[0]); | 662 checkChannel(o[0]); |
628 checkChannel(o[1]); | 663 checkChannel(o[1]); |
629 } | 664 } |
630 | 665 |
631 buildUnnamed1362() { | 666 buildUnnamed416() { |
632 var o = new core.List<core.String>(); | 667 var o = new core.List<core.String>(); |
633 o.add("foo"); | 668 o.add("foo"); |
634 o.add("foo"); | 669 o.add("foo"); |
635 return o; | 670 return o; |
636 } | 671 } |
637 | 672 |
638 checkUnnamed1362(core.List<core.String> o) { | 673 checkUnnamed416(core.List<core.String> o) { |
639 unittest.expect(o, unittest.hasLength(2)); | 674 unittest.expect(o, unittest.hasLength(2)); |
640 unittest.expect(o[0], unittest.equals('foo')); | 675 unittest.expect(o[0], unittest.equals('foo')); |
641 unittest.expect(o[1], unittest.equals('foo')); | 676 unittest.expect(o[1], unittest.equals('foo')); |
642 } | 677 } |
643 | 678 |
644 buildUnnamed1363() { | 679 buildUnnamed417() { |
645 var o = new core.List<core.String>(); | 680 var o = new core.List<core.String>(); |
646 o.add("foo"); | 681 o.add("foo"); |
647 o.add("foo"); | 682 o.add("foo"); |
648 return o; | 683 return o; |
649 } | 684 } |
650 | 685 |
651 checkUnnamed1363(core.List<core.String> o) { | 686 checkUnnamed417(core.List<core.String> o) { |
652 unittest.expect(o, unittest.hasLength(2)); | 687 unittest.expect(o, unittest.hasLength(2)); |
653 unittest.expect(o[0], unittest.equals('foo')); | 688 unittest.expect(o[0], unittest.equals('foo')); |
654 unittest.expect(o[1], unittest.equals('foo')); | 689 unittest.expect(o[1], unittest.equals('foo')); |
655 } | 690 } |
656 | 691 |
657 buildUnnamed1364() { | 692 buildUnnamed418() { |
658 var o = new core.List<core.String>(); | 693 var o = new core.List<core.String>(); |
659 o.add("foo"); | 694 o.add("foo"); |
660 o.add("foo"); | 695 o.add("foo"); |
661 return o; | 696 return o; |
662 } | 697 } |
663 | 698 |
664 checkUnnamed1364(core.List<core.String> o) { | 699 checkUnnamed418(core.List<core.String> o) { |
665 unittest.expect(o, unittest.hasLength(2)); | 700 unittest.expect(o, unittest.hasLength(2)); |
666 unittest.expect(o[0], unittest.equals('foo')); | 701 unittest.expect(o[0], unittest.equals('foo')); |
667 unittest.expect(o[1], unittest.equals('foo')); | 702 unittest.expect(o[1], unittest.equals('foo')); |
668 } | 703 } |
669 | 704 |
670 core.int buildCounterOfficial = 0; | 705 core.int buildCounterOfficial = 0; |
671 buildOfficial() { | 706 buildOfficial() { |
672 var o = new api.Official(); | 707 var o = new api.Official(); |
673 buildCounterOfficial++; | 708 buildCounterOfficial++; |
674 if (buildCounterOfficial < 3) { | 709 if (buildCounterOfficial < 3) { |
675 o.address = buildUnnamed1360(); | 710 o.address = buildUnnamed414(); |
676 o.channels = buildUnnamed1361(); | 711 o.channels = buildUnnamed415(); |
677 o.emails = buildUnnamed1362(); | 712 o.emails = buildUnnamed416(); |
678 o.name = "foo"; | 713 o.name = "foo"; |
679 o.party = "foo"; | 714 o.party = "foo"; |
680 o.phones = buildUnnamed1363(); | 715 o.phones = buildUnnamed417(); |
681 o.photoUrl = "foo"; | 716 o.photoUrl = "foo"; |
682 o.urls = buildUnnamed1364(); | 717 o.urls = buildUnnamed418(); |
683 } | 718 } |
684 buildCounterOfficial--; | 719 buildCounterOfficial--; |
685 return o; | 720 return o; |
686 } | 721 } |
687 | 722 |
688 checkOfficial(api.Official o) { | 723 checkOfficial(api.Official o) { |
689 buildCounterOfficial++; | 724 buildCounterOfficial++; |
690 if (buildCounterOfficial < 3) { | 725 if (buildCounterOfficial < 3) { |
691 checkUnnamed1360(o.address); | 726 checkUnnamed414(o.address); |
692 checkUnnamed1361(o.channels); | 727 checkUnnamed415(o.channels); |
693 checkUnnamed1362(o.emails); | 728 checkUnnamed416(o.emails); |
694 unittest.expect(o.name, unittest.equals('foo')); | 729 unittest.expect(o.name, unittest.equals('foo')); |
695 unittest.expect(o.party, unittest.equals('foo')); | 730 unittest.expect(o.party, unittest.equals('foo')); |
696 checkUnnamed1363(o.phones); | 731 checkUnnamed417(o.phones); |
697 unittest.expect(o.photoUrl, unittest.equals('foo')); | 732 unittest.expect(o.photoUrl, unittest.equals('foo')); |
698 checkUnnamed1364(o.urls); | 733 checkUnnamed418(o.urls); |
699 } | 734 } |
700 buildCounterOfficial--; | 735 buildCounterOfficial--; |
701 } | 736 } |
702 | 737 |
703 buildUnnamed1365() { | 738 buildUnnamed419() { |
704 var o = new core.List<api.Source>(); | 739 var o = new core.List<api.Source>(); |
705 o.add(buildSource()); | 740 o.add(buildSource()); |
706 o.add(buildSource()); | 741 o.add(buildSource()); |
707 return o; | 742 return o; |
708 } | 743 } |
709 | 744 |
710 checkUnnamed1365(core.List<api.Source> o) { | 745 checkUnnamed419(core.List<api.Source> o) { |
711 unittest.expect(o, unittest.hasLength(2)); | 746 unittest.expect(o, unittest.hasLength(2)); |
712 checkSource(o[0]); | 747 checkSource(o[0]); |
713 checkSource(o[1]); | 748 checkSource(o[1]); |
714 } | 749 } |
715 | 750 |
716 core.int buildCounterPollingLocation = 0; | 751 core.int buildCounterPollingLocation = 0; |
717 buildPollingLocation() { | 752 buildPollingLocation() { |
718 var o = new api.PollingLocation(); | 753 var o = new api.PollingLocation(); |
719 buildCounterPollingLocation++; | 754 buildCounterPollingLocation++; |
720 if (buildCounterPollingLocation < 3) { | 755 if (buildCounterPollingLocation < 3) { |
721 o.address = buildSimpleAddressType(); | 756 o.address = buildSimpleAddressType(); |
722 o.endDate = "foo"; | 757 o.endDate = "foo"; |
723 o.id = "foo"; | 758 o.id = "foo"; |
724 o.name = "foo"; | 759 o.name = "foo"; |
725 o.notes = "foo"; | 760 o.notes = "foo"; |
726 o.pollingHours = "foo"; | 761 o.pollingHours = "foo"; |
727 o.sources = buildUnnamed1365(); | 762 o.sources = buildUnnamed419(); |
728 o.startDate = "foo"; | 763 o.startDate = "foo"; |
729 o.voterServices = "foo"; | 764 o.voterServices = "foo"; |
730 } | 765 } |
731 buildCounterPollingLocation--; | 766 buildCounterPollingLocation--; |
732 return o; | 767 return o; |
733 } | 768 } |
734 | 769 |
735 checkPollingLocation(api.PollingLocation o) { | 770 checkPollingLocation(api.PollingLocation o) { |
736 buildCounterPollingLocation++; | 771 buildCounterPollingLocation++; |
737 if (buildCounterPollingLocation < 3) { | 772 if (buildCounterPollingLocation < 3) { |
738 checkSimpleAddressType(o.address); | 773 checkSimpleAddressType(o.address); |
739 unittest.expect(o.endDate, unittest.equals('foo')); | 774 unittest.expect(o.endDate, unittest.equals('foo')); |
740 unittest.expect(o.id, unittest.equals('foo')); | 775 unittest.expect(o.id, unittest.equals('foo')); |
741 unittest.expect(o.name, unittest.equals('foo')); | 776 unittest.expect(o.name, unittest.equals('foo')); |
742 unittest.expect(o.notes, unittest.equals('foo')); | 777 unittest.expect(o.notes, unittest.equals('foo')); |
743 unittest.expect(o.pollingHours, unittest.equals('foo')); | 778 unittest.expect(o.pollingHours, unittest.equals('foo')); |
744 checkUnnamed1365(o.sources); | 779 checkUnnamed419(o.sources); |
745 unittest.expect(o.startDate, unittest.equals('foo')); | 780 unittest.expect(o.startDate, unittest.equals('foo')); |
746 unittest.expect(o.voterServices, unittest.equals('foo')); | 781 unittest.expect(o.voterServices, unittest.equals('foo')); |
747 } | 782 } |
748 buildCounterPollingLocation--; | 783 buildCounterPollingLocation--; |
749 } | 784 } |
750 | 785 |
751 buildUnnamed1366() { | 786 buildUnnamed420() { |
752 var o = new core.Map<core.String, api.GeographicDivision>(); | 787 var o = new core.Map<core.String, api.GeographicDivision>(); |
753 o["x"] = buildGeographicDivision(); | 788 o["x"] = buildGeographicDivision(); |
754 o["y"] = buildGeographicDivision(); | 789 o["y"] = buildGeographicDivision(); |
755 return o; | 790 return o; |
756 } | 791 } |
757 | 792 |
758 checkUnnamed1366(core.Map<core.String, api.GeographicDivision> o) { | 793 checkUnnamed420(core.Map<core.String, api.GeographicDivision> o) { |
759 unittest.expect(o, unittest.hasLength(2)); | 794 unittest.expect(o, unittest.hasLength(2)); |
760 checkGeographicDivision(o["x"]); | 795 checkGeographicDivision(o["x"]); |
761 checkGeographicDivision(o["y"]); | 796 checkGeographicDivision(o["y"]); |
762 } | 797 } |
763 | 798 |
764 buildUnnamed1367() { | 799 buildUnnamed421() { |
765 var o = new core.List<api.Office>(); | 800 var o = new core.List<api.Office>(); |
766 o.add(buildOffice()); | 801 o.add(buildOffice()); |
767 o.add(buildOffice()); | 802 o.add(buildOffice()); |
768 return o; | 803 return o; |
769 } | 804 } |
770 | 805 |
771 checkUnnamed1367(core.List<api.Office> o) { | 806 checkUnnamed421(core.List<api.Office> o) { |
772 unittest.expect(o, unittest.hasLength(2)); | 807 unittest.expect(o, unittest.hasLength(2)); |
773 checkOffice(o[0]); | 808 checkOffice(o[0]); |
774 checkOffice(o[1]); | 809 checkOffice(o[1]); |
775 } | 810 } |
776 | 811 |
777 buildUnnamed1368() { | 812 buildUnnamed422() { |
778 var o = new core.List<api.Official>(); | 813 var o = new core.List<api.Official>(); |
779 o.add(buildOfficial()); | 814 o.add(buildOfficial()); |
780 o.add(buildOfficial()); | 815 o.add(buildOfficial()); |
781 return o; | 816 return o; |
782 } | 817 } |
783 | 818 |
784 checkUnnamed1368(core.List<api.Official> o) { | 819 checkUnnamed422(core.List<api.Official> o) { |
785 unittest.expect(o, unittest.hasLength(2)); | 820 unittest.expect(o, unittest.hasLength(2)); |
786 checkOfficial(o[0]); | 821 checkOfficial(o[0]); |
787 checkOfficial(o[1]); | 822 checkOfficial(o[1]); |
788 } | 823 } |
789 | 824 |
790 core.int buildCounterRepresentativeInfoData = 0; | 825 core.int buildCounterRepresentativeInfoData = 0; |
791 buildRepresentativeInfoData() { | 826 buildRepresentativeInfoData() { |
792 var o = new api.RepresentativeInfoData(); | 827 var o = new api.RepresentativeInfoData(); |
793 buildCounterRepresentativeInfoData++; | 828 buildCounterRepresentativeInfoData++; |
794 if (buildCounterRepresentativeInfoData < 3) { | 829 if (buildCounterRepresentativeInfoData < 3) { |
795 o.divisions = buildUnnamed1366(); | 830 o.divisions = buildUnnamed420(); |
796 o.offices = buildUnnamed1367(); | 831 o.offices = buildUnnamed421(); |
797 o.officials = buildUnnamed1368(); | 832 o.officials = buildUnnamed422(); |
798 } | 833 } |
799 buildCounterRepresentativeInfoData--; | 834 buildCounterRepresentativeInfoData--; |
800 return o; | 835 return o; |
801 } | 836 } |
802 | 837 |
803 checkRepresentativeInfoData(api.RepresentativeInfoData o) { | 838 checkRepresentativeInfoData(api.RepresentativeInfoData o) { |
804 buildCounterRepresentativeInfoData++; | 839 buildCounterRepresentativeInfoData++; |
805 if (buildCounterRepresentativeInfoData < 3) { | 840 if (buildCounterRepresentativeInfoData < 3) { |
806 checkUnnamed1366(o.divisions); | 841 checkUnnamed420(o.divisions); |
807 checkUnnamed1367(o.offices); | 842 checkUnnamed421(o.offices); |
808 checkUnnamed1368(o.officials); | 843 checkUnnamed422(o.officials); |
809 } | 844 } |
810 buildCounterRepresentativeInfoData--; | 845 buildCounterRepresentativeInfoData--; |
811 } | 846 } |
812 | 847 |
813 buildUnnamed1369() { | 848 buildUnnamed423() { |
814 var o = new core.Map<core.String, api.GeographicDivision>(); | 849 var o = new core.Map<core.String, api.GeographicDivision>(); |
815 o["x"] = buildGeographicDivision(); | 850 o["x"] = buildGeographicDivision(); |
816 o["y"] = buildGeographicDivision(); | 851 o["y"] = buildGeographicDivision(); |
817 return o; | 852 return o; |
818 } | 853 } |
819 | 854 |
820 checkUnnamed1369(core.Map<core.String, api.GeographicDivision> o) { | 855 checkUnnamed423(core.Map<core.String, api.GeographicDivision> o) { |
821 unittest.expect(o, unittest.hasLength(2)); | 856 unittest.expect(o, unittest.hasLength(2)); |
822 checkGeographicDivision(o["x"]); | 857 checkGeographicDivision(o["x"]); |
823 checkGeographicDivision(o["y"]); | 858 checkGeographicDivision(o["y"]); |
824 } | 859 } |
825 | 860 |
826 buildUnnamed1370() { | 861 buildUnnamed424() { |
827 var o = new core.List<api.Office>(); | 862 var o = new core.List<api.Office>(); |
828 o.add(buildOffice()); | 863 o.add(buildOffice()); |
829 o.add(buildOffice()); | 864 o.add(buildOffice()); |
830 return o; | 865 return o; |
831 } | 866 } |
832 | 867 |
833 checkUnnamed1370(core.List<api.Office> o) { | 868 checkUnnamed424(core.List<api.Office> o) { |
834 unittest.expect(o, unittest.hasLength(2)); | 869 unittest.expect(o, unittest.hasLength(2)); |
835 checkOffice(o[0]); | 870 checkOffice(o[0]); |
836 checkOffice(o[1]); | 871 checkOffice(o[1]); |
837 } | 872 } |
838 | 873 |
839 buildUnnamed1371() { | 874 buildUnnamed425() { |
840 var o = new core.List<api.Official>(); | 875 var o = new core.List<api.Official>(); |
841 o.add(buildOfficial()); | 876 o.add(buildOfficial()); |
842 o.add(buildOfficial()); | 877 o.add(buildOfficial()); |
843 return o; | 878 return o; |
844 } | 879 } |
845 | 880 |
846 checkUnnamed1371(core.List<api.Official> o) { | 881 checkUnnamed425(core.List<api.Official> o) { |
847 unittest.expect(o, unittest.hasLength(2)); | 882 unittest.expect(o, unittest.hasLength(2)); |
848 checkOfficial(o[0]); | 883 checkOfficial(o[0]); |
849 checkOfficial(o[1]); | 884 checkOfficial(o[1]); |
850 } | 885 } |
851 | 886 |
852 core.int buildCounterRepresentativeInfoResponse = 0; | 887 core.int buildCounterRepresentativeInfoResponse = 0; |
853 buildRepresentativeInfoResponse() { | 888 buildRepresentativeInfoResponse() { |
854 var o = new api.RepresentativeInfoResponse(); | 889 var o = new api.RepresentativeInfoResponse(); |
855 buildCounterRepresentativeInfoResponse++; | 890 buildCounterRepresentativeInfoResponse++; |
856 if (buildCounterRepresentativeInfoResponse < 3) { | 891 if (buildCounterRepresentativeInfoResponse < 3) { |
857 o.divisions = buildUnnamed1369(); | 892 o.divisions = buildUnnamed423(); |
858 o.kind = "foo"; | 893 o.kind = "foo"; |
859 o.normalizedInput = buildSimpleAddressType(); | 894 o.normalizedInput = buildSimpleAddressType(); |
860 o.offices = buildUnnamed1370(); | 895 o.offices = buildUnnamed424(); |
861 o.officials = buildUnnamed1371(); | 896 o.officials = buildUnnamed425(); |
862 } | 897 } |
863 buildCounterRepresentativeInfoResponse--; | 898 buildCounterRepresentativeInfoResponse--; |
864 return o; | 899 return o; |
865 } | 900 } |
866 | 901 |
867 checkRepresentativeInfoResponse(api.RepresentativeInfoResponse o) { | 902 checkRepresentativeInfoResponse(api.RepresentativeInfoResponse o) { |
868 buildCounterRepresentativeInfoResponse++; | 903 buildCounterRepresentativeInfoResponse++; |
869 if (buildCounterRepresentativeInfoResponse < 3) { | 904 if (buildCounterRepresentativeInfoResponse < 3) { |
870 checkUnnamed1369(o.divisions); | 905 checkUnnamed423(o.divisions); |
871 unittest.expect(o.kind, unittest.equals('foo')); | 906 unittest.expect(o.kind, unittest.equals('foo')); |
872 checkSimpleAddressType(o.normalizedInput); | 907 checkSimpleAddressType(o.normalizedInput); |
873 checkUnnamed1370(o.offices); | 908 checkUnnamed424(o.offices); |
874 checkUnnamed1371(o.officials); | 909 checkUnnamed425(o.officials); |
875 } | 910 } |
876 buildCounterRepresentativeInfoResponse--; | 911 buildCounterRepresentativeInfoResponse--; |
877 } | 912 } |
878 | 913 |
879 core.int buildCounterSimpleAddressType = 0; | 914 core.int buildCounterSimpleAddressType = 0; |
880 buildSimpleAddressType() { | 915 buildSimpleAddressType() { |
881 var o = new api.SimpleAddressType(); | 916 var o = new api.SimpleAddressType(); |
882 buildCounterSimpleAddressType++; | 917 buildCounterSimpleAddressType++; |
883 if (buildCounterSimpleAddressType < 3) { | 918 if (buildCounterSimpleAddressType < 3) { |
884 o.city = "foo"; | 919 o.city = "foo"; |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
921 | 956 |
922 checkSource(api.Source o) { | 957 checkSource(api.Source o) { |
923 buildCounterSource++; | 958 buildCounterSource++; |
924 if (buildCounterSource < 3) { | 959 if (buildCounterSource < 3) { |
925 unittest.expect(o.name, unittest.equals('foo')); | 960 unittest.expect(o.name, unittest.equals('foo')); |
926 unittest.expect(o.official, unittest.isTrue); | 961 unittest.expect(o.official, unittest.isTrue); |
927 } | 962 } |
928 buildCounterSource--; | 963 buildCounterSource--; |
929 } | 964 } |
930 | 965 |
931 buildUnnamed1372() { | 966 buildUnnamed426() { |
932 var o = new core.List<api.Contest>(); | 967 var o = new core.List<api.Contest>(); |
933 o.add(buildContest()); | 968 o.add(buildContest()); |
934 o.add(buildContest()); | 969 o.add(buildContest()); |
935 return o; | 970 return o; |
936 } | 971 } |
937 | 972 |
938 checkUnnamed1372(core.List<api.Contest> o) { | 973 checkUnnamed426(core.List<api.Contest> o) { |
939 unittest.expect(o, unittest.hasLength(2)); | 974 unittest.expect(o, unittest.hasLength(2)); |
940 checkContest(o[0]); | 975 checkContest(o[0]); |
941 checkContest(o[1]); | 976 checkContest(o[1]); |
942 } | 977 } |
943 | 978 |
944 buildUnnamed1373() { | 979 buildUnnamed427() { |
945 var o = new core.List<api.PollingLocation>(); | 980 var o = new core.List<api.PollingLocation>(); |
946 o.add(buildPollingLocation()); | 981 o.add(buildPollingLocation()); |
947 o.add(buildPollingLocation()); | 982 o.add(buildPollingLocation()); |
948 return o; | 983 return o; |
949 } | 984 } |
950 | 985 |
951 checkUnnamed1373(core.List<api.PollingLocation> o) { | 986 checkUnnamed427(core.List<api.PollingLocation> o) { |
952 unittest.expect(o, unittest.hasLength(2)); | 987 unittest.expect(o, unittest.hasLength(2)); |
953 checkPollingLocation(o[0]); | 988 checkPollingLocation(o[0]); |
954 checkPollingLocation(o[1]); | 989 checkPollingLocation(o[1]); |
955 } | 990 } |
956 | 991 |
957 buildUnnamed1374() { | 992 buildUnnamed428() { |
958 var o = new core.List<api.PollingLocation>(); | 993 var o = new core.List<api.PollingLocation>(); |
959 o.add(buildPollingLocation()); | 994 o.add(buildPollingLocation()); |
960 o.add(buildPollingLocation()); | 995 o.add(buildPollingLocation()); |
961 return o; | 996 return o; |
962 } | 997 } |
963 | 998 |
964 checkUnnamed1374(core.List<api.PollingLocation> o) { | 999 checkUnnamed428(core.List<api.PollingLocation> o) { |
965 unittest.expect(o, unittest.hasLength(2)); | 1000 unittest.expect(o, unittest.hasLength(2)); |
966 checkPollingLocation(o[0]); | 1001 checkPollingLocation(o[0]); |
967 checkPollingLocation(o[1]); | 1002 checkPollingLocation(o[1]); |
968 } | 1003 } |
969 | 1004 |
970 buildUnnamed1375() { | 1005 buildUnnamed429() { |
971 var o = new core.List<api.Election>(); | 1006 var o = new core.List<api.Election>(); |
972 o.add(buildElection()); | 1007 o.add(buildElection()); |
973 o.add(buildElection()); | 1008 o.add(buildElection()); |
974 return o; | 1009 return o; |
975 } | 1010 } |
976 | 1011 |
977 checkUnnamed1375(core.List<api.Election> o) { | 1012 checkUnnamed429(core.List<api.Election> o) { |
978 unittest.expect(o, unittest.hasLength(2)); | 1013 unittest.expect(o, unittest.hasLength(2)); |
979 checkElection(o[0]); | 1014 checkElection(o[0]); |
980 checkElection(o[1]); | 1015 checkElection(o[1]); |
981 } | 1016 } |
982 | 1017 |
983 buildUnnamed1376() { | 1018 buildUnnamed430() { |
984 var o = new core.List<api.PollingLocation>(); | 1019 var o = new core.List<api.PollingLocation>(); |
985 o.add(buildPollingLocation()); | 1020 o.add(buildPollingLocation()); |
986 o.add(buildPollingLocation()); | 1021 o.add(buildPollingLocation()); |
987 return o; | 1022 return o; |
988 } | 1023 } |
989 | 1024 |
990 checkUnnamed1376(core.List<api.PollingLocation> o) { | 1025 checkUnnamed430(core.List<api.PollingLocation> o) { |
991 unittest.expect(o, unittest.hasLength(2)); | 1026 unittest.expect(o, unittest.hasLength(2)); |
992 checkPollingLocation(o[0]); | 1027 checkPollingLocation(o[0]); |
993 checkPollingLocation(o[1]); | 1028 checkPollingLocation(o[1]); |
994 } | 1029 } |
995 | 1030 |
996 buildUnnamed1377() { | 1031 buildUnnamed431() { |
997 var o = new core.List<api.AdministrationRegion>(); | 1032 var o = new core.List<api.AdministrationRegion>(); |
998 o.add(buildAdministrationRegion()); | 1033 o.add(buildAdministrationRegion()); |
999 o.add(buildAdministrationRegion()); | 1034 o.add(buildAdministrationRegion()); |
1000 return o; | 1035 return o; |
1001 } | 1036 } |
1002 | 1037 |
1003 checkUnnamed1377(core.List<api.AdministrationRegion> o) { | 1038 checkUnnamed431(core.List<api.AdministrationRegion> o) { |
1004 unittest.expect(o, unittest.hasLength(2)); | 1039 unittest.expect(o, unittest.hasLength(2)); |
1005 checkAdministrationRegion(o[0]); | 1040 checkAdministrationRegion(o[0]); |
1006 checkAdministrationRegion(o[1]); | 1041 checkAdministrationRegion(o[1]); |
1007 } | 1042 } |
1008 | 1043 |
1009 core.int buildCounterVoterInfoResponse = 0; | 1044 core.int buildCounterVoterInfoResponse = 0; |
1010 buildVoterInfoResponse() { | 1045 buildVoterInfoResponse() { |
1011 var o = new api.VoterInfoResponse(); | 1046 var o = new api.VoterInfoResponse(); |
1012 buildCounterVoterInfoResponse++; | 1047 buildCounterVoterInfoResponse++; |
1013 if (buildCounterVoterInfoResponse < 3) { | 1048 if (buildCounterVoterInfoResponse < 3) { |
1014 o.contests = buildUnnamed1372(); | 1049 o.contests = buildUnnamed426(); |
1015 o.dropOffLocations = buildUnnamed1373(); | 1050 o.dropOffLocations = buildUnnamed427(); |
1016 o.earlyVoteSites = buildUnnamed1374(); | 1051 o.earlyVoteSites = buildUnnamed428(); |
1017 o.election = buildElection(); | 1052 o.election = buildElection(); |
1018 o.kind = "foo"; | 1053 o.kind = "foo"; |
1019 o.normalizedInput = buildSimpleAddressType(); | 1054 o.normalizedInput = buildSimpleAddressType(); |
1020 o.otherElections = buildUnnamed1375(); | 1055 o.otherElections = buildUnnamed429(); |
1021 o.pollingLocations = buildUnnamed1376(); | 1056 o.pollingLocations = buildUnnamed430(); |
1022 o.precinctId = "foo"; | 1057 o.precinctId = "foo"; |
1023 o.state = buildUnnamed1377(); | 1058 o.state = buildUnnamed431(); |
1024 } | 1059 } |
1025 buildCounterVoterInfoResponse--; | 1060 buildCounterVoterInfoResponse--; |
1026 return o; | 1061 return o; |
1027 } | 1062 } |
1028 | 1063 |
1029 checkVoterInfoResponse(api.VoterInfoResponse o) { | 1064 checkVoterInfoResponse(api.VoterInfoResponse o) { |
1030 buildCounterVoterInfoResponse++; | 1065 buildCounterVoterInfoResponse++; |
1031 if (buildCounterVoterInfoResponse < 3) { | 1066 if (buildCounterVoterInfoResponse < 3) { |
1032 checkUnnamed1372(o.contests); | 1067 checkUnnamed426(o.contests); |
1033 checkUnnamed1373(o.dropOffLocations); | 1068 checkUnnamed427(o.dropOffLocations); |
1034 checkUnnamed1374(o.earlyVoteSites); | 1069 checkUnnamed428(o.earlyVoteSites); |
1035 checkElection(o.election); | 1070 checkElection(o.election); |
1036 unittest.expect(o.kind, unittest.equals('foo')); | 1071 unittest.expect(o.kind, unittest.equals('foo')); |
1037 checkSimpleAddressType(o.normalizedInput); | 1072 checkSimpleAddressType(o.normalizedInput); |
1038 checkUnnamed1375(o.otherElections); | 1073 checkUnnamed429(o.otherElections); |
1039 checkUnnamed1376(o.pollingLocations); | 1074 checkUnnamed430(o.pollingLocations); |
1040 unittest.expect(o.precinctId, unittest.equals('foo')); | 1075 unittest.expect(o.precinctId, unittest.equals('foo')); |
1041 checkUnnamed1377(o.state); | 1076 checkUnnamed431(o.state); |
1042 } | 1077 } |
1043 buildCounterVoterInfoResponse--; | 1078 buildCounterVoterInfoResponse--; |
1044 } | 1079 } |
1045 | 1080 |
1046 buildUnnamed1378() { | 1081 buildUnnamed432() { |
1047 var o = new core.List<core.String>(); | 1082 var o = new core.List<core.String>(); |
1048 o.add("foo"); | 1083 o.add("foo"); |
1049 o.add("foo"); | 1084 o.add("foo"); |
1050 return o; | 1085 return o; |
1051 } | 1086 } |
1052 | 1087 |
1053 checkUnnamed1378(core.List<core.String> o) { | 1088 checkUnnamed432(core.List<core.String> o) { |
1054 unittest.expect(o, unittest.hasLength(2)); | 1089 unittest.expect(o, unittest.hasLength(2)); |
1055 unittest.expect(o[0], unittest.equals('foo')); | 1090 unittest.expect(o[0], unittest.equals('foo')); |
1056 unittest.expect(o[1], unittest.equals('foo')); | 1091 unittest.expect(o[1], unittest.equals('foo')); |
1057 } | 1092 } |
1058 | 1093 |
1059 buildUnnamed1379() { | 1094 buildUnnamed433() { |
1060 var o = new core.List<core.String>(); | 1095 var o = new core.List<core.String>(); |
1061 o.add("foo"); | 1096 o.add("foo"); |
1062 o.add("foo"); | 1097 o.add("foo"); |
1063 return o; | 1098 return o; |
1064 } | 1099 } |
1065 | 1100 |
1066 checkUnnamed1379(core.List<core.String> o) { | 1101 checkUnnamed433(core.List<core.String> o) { |
1067 unittest.expect(o, unittest.hasLength(2)); | 1102 unittest.expect(o, unittest.hasLength(2)); |
1068 unittest.expect(o[0], unittest.equals('foo')); | 1103 unittest.expect(o[0], unittest.equals('foo')); |
1069 unittest.expect(o[1], unittest.equals('foo')); | 1104 unittest.expect(o[1], unittest.equals('foo')); |
1070 } | 1105 } |
1071 | 1106 |
1072 buildUnnamed1380() { | 1107 buildUnnamed434() { |
1073 var o = new core.List<core.String>(); | 1108 var o = new core.List<core.String>(); |
1074 o.add("foo"); | 1109 o.add("foo"); |
1075 o.add("foo"); | 1110 o.add("foo"); |
1076 return o; | 1111 return o; |
1077 } | 1112 } |
1078 | 1113 |
1079 checkUnnamed1380(core.List<core.String> o) { | 1114 checkUnnamed434(core.List<core.String> o) { |
1080 unittest.expect(o, unittest.hasLength(2)); | 1115 unittest.expect(o, unittest.hasLength(2)); |
1081 unittest.expect(o[0], unittest.equals('foo')); | 1116 unittest.expect(o[0], unittest.equals('foo')); |
1082 unittest.expect(o[1], unittest.equals('foo')); | 1117 unittest.expect(o[1], unittest.equals('foo')); |
1083 } | 1118 } |
1084 | 1119 |
1085 buildUnnamed1381() { | 1120 buildUnnamed435() { |
1086 var o = new core.List<core.String>(); | 1121 var o = new core.List<core.String>(); |
1087 o.add("foo"); | 1122 o.add("foo"); |
1088 o.add("foo"); | 1123 o.add("foo"); |
1089 return o; | 1124 return o; |
1090 } | 1125 } |
1091 | 1126 |
1092 checkUnnamed1381(core.List<core.String> o) { | 1127 checkUnnamed435(core.List<core.String> o) { |
1093 unittest.expect(o, unittest.hasLength(2)); | 1128 unittest.expect(o, unittest.hasLength(2)); |
1094 unittest.expect(o[0], unittest.equals('foo')); | 1129 unittest.expect(o[0], unittest.equals('foo')); |
1095 unittest.expect(o[1], unittest.equals('foo')); | 1130 unittest.expect(o[1], unittest.equals('foo')); |
1096 } | 1131 } |
1097 | 1132 |
1098 | 1133 |
1099 main() { | 1134 main() { |
1100 unittest.group("obj-schema-AdministrationRegion", () { | 1135 unittest.group("obj-schema-AdministrationRegion", () { |
1101 unittest.test("to-json--from-json", () { | 1136 unittest.test("to-json--from-json", () { |
1102 var o = buildAdministrationRegion(); | 1137 var o = buildAdministrationRegion(); |
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1273 var o = buildVoterInfoResponse(); | 1308 var o = buildVoterInfoResponse(); |
1274 var od = new api.VoterInfoResponse.fromJson(o.toJson()); | 1309 var od = new api.VoterInfoResponse.fromJson(o.toJson()); |
1275 checkVoterInfoResponse(od); | 1310 checkVoterInfoResponse(od); |
1276 }); | 1311 }); |
1277 }); | 1312 }); |
1278 | 1313 |
1279 | 1314 |
1280 unittest.group("resource-DivisionsResourceApi", () { | 1315 unittest.group("resource-DivisionsResourceApi", () { |
1281 unittest.test("method--search", () { | 1316 unittest.test("method--search", () { |
1282 | 1317 |
1283 var mock = new common_test.HttpServerMock(); | 1318 var mock = new HttpServerMock(); |
1284 api.DivisionsResourceApi res = new api.CivicinfoApi(mock).divisions; | 1319 api.DivisionsResourceApi res = new api.CivicinfoApi(mock).divisions; |
1285 var arg_query = "foo"; | 1320 var arg_query = "foo"; |
1286 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1321 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1287 var path = (req.url).path; | 1322 var path = (req.url).path; |
1288 var pathOffset = 0; | 1323 var pathOffset = 0; |
1289 var index; | 1324 var index; |
1290 var subPart; | 1325 var subPart; |
1291 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1326 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
1292 pathOffset += 1; | 1327 pathOffset += 1; |
1293 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("civicinfo/v2/")); | 1328 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("civicinfo/v2/")); |
(...skipping 17 matching lines...) Expand all Loading... |
1311 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1346 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
1312 } | 1347 } |
1313 } | 1348 } |
1314 unittest.expect(queryMap["query"].first, unittest.equals(arg_query)); | 1349 unittest.expect(queryMap["query"].first, unittest.equals(arg_query)); |
1315 | 1350 |
1316 | 1351 |
1317 var h = { | 1352 var h = { |
1318 "content-type" : "application/json; charset=utf-8", | 1353 "content-type" : "application/json; charset=utf-8", |
1319 }; | 1354 }; |
1320 var resp = convert.JSON.encode(buildDivisionSearchResponse()); | 1355 var resp = convert.JSON.encode(buildDivisionSearchResponse()); |
1321 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 1356 return new async.Future.value(stringResponse(200, h, resp)); |
1322 }), true); | 1357 }), true); |
1323 res.search(query: arg_query).then(unittest.expectAsync(((api.DivisionSearc
hResponse response) { | 1358 res.search(query: arg_query).then(unittest.expectAsync(((api.DivisionSearc
hResponse response) { |
1324 checkDivisionSearchResponse(response); | 1359 checkDivisionSearchResponse(response); |
1325 }))); | 1360 }))); |
1326 }); | 1361 }); |
1327 | 1362 |
1328 }); | 1363 }); |
1329 | 1364 |
1330 | 1365 |
1331 unittest.group("resource-ElectionsResourceApi", () { | 1366 unittest.group("resource-ElectionsResourceApi", () { |
1332 unittest.test("method--electionQuery", () { | 1367 unittest.test("method--electionQuery", () { |
1333 | 1368 |
1334 var mock = new common_test.HttpServerMock(); | 1369 var mock = new HttpServerMock(); |
1335 api.ElectionsResourceApi res = new api.CivicinfoApi(mock).elections; | 1370 api.ElectionsResourceApi res = new api.CivicinfoApi(mock).elections; |
1336 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1371 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1337 var path = (req.url).path; | 1372 var path = (req.url).path; |
1338 var pathOffset = 0; | 1373 var pathOffset = 0; |
1339 var index; | 1374 var index; |
1340 var subPart; | 1375 var subPart; |
1341 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1376 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
1342 pathOffset += 1; | 1377 pathOffset += 1; |
1343 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("civicinfo/v2/")); | 1378 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("civicinfo/v2/")); |
1344 pathOffset += 13; | 1379 pathOffset += 13; |
(...skipping 15 matching lines...) Expand all Loading... |
1360 var keyvalue = part.split("="); | 1395 var keyvalue = part.split("="); |
1361 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1396 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
1362 } | 1397 } |
1363 } | 1398 } |
1364 | 1399 |
1365 | 1400 |
1366 var h = { | 1401 var h = { |
1367 "content-type" : "application/json; charset=utf-8", | 1402 "content-type" : "application/json; charset=utf-8", |
1368 }; | 1403 }; |
1369 var resp = convert.JSON.encode(buildElectionsQueryResponse()); | 1404 var resp = convert.JSON.encode(buildElectionsQueryResponse()); |
1370 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 1405 return new async.Future.value(stringResponse(200, h, resp)); |
1371 }), true); | 1406 }), true); |
1372 res.electionQuery().then(unittest.expectAsync(((api.ElectionsQueryResponse
response) { | 1407 res.electionQuery().then(unittest.expectAsync(((api.ElectionsQueryResponse
response) { |
1373 checkElectionsQueryResponse(response); | 1408 checkElectionsQueryResponse(response); |
1374 }))); | 1409 }))); |
1375 }); | 1410 }); |
1376 | 1411 |
1377 unittest.test("method--voterInfoQuery", () { | 1412 unittest.test("method--voterInfoQuery", () { |
1378 | 1413 |
1379 var mock = new common_test.HttpServerMock(); | 1414 var mock = new HttpServerMock(); |
1380 api.ElectionsResourceApi res = new api.CivicinfoApi(mock).elections; | 1415 api.ElectionsResourceApi res = new api.CivicinfoApi(mock).elections; |
1381 var arg_address = "foo"; | 1416 var arg_address = "foo"; |
1382 var arg_electionId = "foo"; | 1417 var arg_electionId = "foo"; |
1383 var arg_officialOnly = true; | 1418 var arg_officialOnly = true; |
1384 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1419 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1385 var path = (req.url).path; | 1420 var path = (req.url).path; |
1386 var pathOffset = 0; | 1421 var pathOffset = 0; |
1387 var index; | 1422 var index; |
1388 var subPart; | 1423 var subPart; |
1389 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1424 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
(...skipping 21 matching lines...) Expand all Loading... |
1411 } | 1446 } |
1412 unittest.expect(queryMap["address"].first, unittest.equals(arg_address))
; | 1447 unittest.expect(queryMap["address"].first, unittest.equals(arg_address))
; |
1413 unittest.expect(queryMap["electionId"].first, unittest.equals(arg_electi
onId)); | 1448 unittest.expect(queryMap["electionId"].first, unittest.equals(arg_electi
onId)); |
1414 unittest.expect(queryMap["officialOnly"].first, unittest.equals("$arg_of
ficialOnly")); | 1449 unittest.expect(queryMap["officialOnly"].first, unittest.equals("$arg_of
ficialOnly")); |
1415 | 1450 |
1416 | 1451 |
1417 var h = { | 1452 var h = { |
1418 "content-type" : "application/json; charset=utf-8", | 1453 "content-type" : "application/json; charset=utf-8", |
1419 }; | 1454 }; |
1420 var resp = convert.JSON.encode(buildVoterInfoResponse()); | 1455 var resp = convert.JSON.encode(buildVoterInfoResponse()); |
1421 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 1456 return new async.Future.value(stringResponse(200, h, resp)); |
1422 }), true); | 1457 }), true); |
1423 res.voterInfoQuery(arg_address, electionId: arg_electionId, officialOnly:
arg_officialOnly).then(unittest.expectAsync(((api.VoterInfoResponse response) { | 1458 res.voterInfoQuery(arg_address, electionId: arg_electionId, officialOnly:
arg_officialOnly).then(unittest.expectAsync(((api.VoterInfoResponse response) { |
1424 checkVoterInfoResponse(response); | 1459 checkVoterInfoResponse(response); |
1425 }))); | 1460 }))); |
1426 }); | 1461 }); |
1427 | 1462 |
1428 }); | 1463 }); |
1429 | 1464 |
1430 | 1465 |
1431 unittest.group("resource-RepresentativesResourceApi", () { | 1466 unittest.group("resource-RepresentativesResourceApi", () { |
1432 unittest.test("method--representativeInfoByAddress", () { | 1467 unittest.test("method--representativeInfoByAddress", () { |
1433 | 1468 |
1434 var mock = new common_test.HttpServerMock(); | 1469 var mock = new HttpServerMock(); |
1435 api.RepresentativesResourceApi res = new api.CivicinfoApi(mock).representa
tives; | 1470 api.RepresentativesResourceApi res = new api.CivicinfoApi(mock).representa
tives; |
1436 var arg_address = "foo"; | 1471 var arg_address = "foo"; |
1437 var arg_includeOffices = true; | 1472 var arg_includeOffices = true; |
1438 var arg_levels = buildUnnamed1378(); | 1473 var arg_levels = buildUnnamed432(); |
1439 var arg_roles = buildUnnamed1379(); | 1474 var arg_roles = buildUnnamed433(); |
1440 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1475 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1441 var path = (req.url).path; | 1476 var path = (req.url).path; |
1442 var pathOffset = 0; | 1477 var pathOffset = 0; |
1443 var index; | 1478 var index; |
1444 var subPart; | 1479 var subPart; |
1445 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1480 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
1446 pathOffset += 1; | 1481 pathOffset += 1; |
1447 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("civicinfo/v2/")); | 1482 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("civicinfo/v2/")); |
1448 pathOffset += 13; | 1483 pathOffset += 13; |
1449 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("representatives")); | 1484 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("representatives")); |
(...skipping 18 matching lines...) Expand all Loading... |
1468 unittest.expect(queryMap["address"].first, unittest.equals(arg_address))
; | 1503 unittest.expect(queryMap["address"].first, unittest.equals(arg_address))
; |
1469 unittest.expect(queryMap["includeOffices"].first, unittest.equals("$arg_
includeOffices")); | 1504 unittest.expect(queryMap["includeOffices"].first, unittest.equals("$arg_
includeOffices")); |
1470 unittest.expect(queryMap["levels"], unittest.equals(arg_levels)); | 1505 unittest.expect(queryMap["levels"], unittest.equals(arg_levels)); |
1471 unittest.expect(queryMap["roles"], unittest.equals(arg_roles)); | 1506 unittest.expect(queryMap["roles"], unittest.equals(arg_roles)); |
1472 | 1507 |
1473 | 1508 |
1474 var h = { | 1509 var h = { |
1475 "content-type" : "application/json; charset=utf-8", | 1510 "content-type" : "application/json; charset=utf-8", |
1476 }; | 1511 }; |
1477 var resp = convert.JSON.encode(buildRepresentativeInfoResponse()); | 1512 var resp = convert.JSON.encode(buildRepresentativeInfoResponse()); |
1478 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 1513 return new async.Future.value(stringResponse(200, h, resp)); |
1479 }), true); | 1514 }), true); |
1480 res.representativeInfoByAddress(address: arg_address, includeOffices: arg_
includeOffices, levels: arg_levels, roles: arg_roles).then(unittest.expectAsync(
((api.RepresentativeInfoResponse response) { | 1515 res.representativeInfoByAddress(address: arg_address, includeOffices: arg_
includeOffices, levels: arg_levels, roles: arg_roles).then(unittest.expectAsync(
((api.RepresentativeInfoResponse response) { |
1481 checkRepresentativeInfoResponse(response); | 1516 checkRepresentativeInfoResponse(response); |
1482 }))); | 1517 }))); |
1483 }); | 1518 }); |
1484 | 1519 |
1485 unittest.test("method--representativeInfoByDivision", () { | 1520 unittest.test("method--representativeInfoByDivision", () { |
1486 | 1521 |
1487 var mock = new common_test.HttpServerMock(); | 1522 var mock = new HttpServerMock(); |
1488 api.RepresentativesResourceApi res = new api.CivicinfoApi(mock).representa
tives; | 1523 api.RepresentativesResourceApi res = new api.CivicinfoApi(mock).representa
tives; |
1489 var arg_ocdId = "foo"; | 1524 var arg_ocdId = "foo"; |
1490 var arg_levels = buildUnnamed1380(); | 1525 var arg_levels = buildUnnamed434(); |
1491 var arg_recursive = true; | 1526 var arg_recursive = true; |
1492 var arg_roles = buildUnnamed1381(); | 1527 var arg_roles = buildUnnamed435(); |
1493 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1528 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1494 var path = (req.url).path; | 1529 var path = (req.url).path; |
1495 var pathOffset = 0; | 1530 var pathOffset = 0; |
1496 var index; | 1531 var index; |
1497 var subPart; | 1532 var subPart; |
1498 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1533 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
1499 pathOffset += 1; | 1534 pathOffset += 1; |
1500 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("civicinfo/v2/")); | 1535 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("civicinfo/v2/")); |
1501 pathOffset += 13; | 1536 pathOffset += 13; |
1502 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq
uals("representatives/")); | 1537 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq
uals("representatives/")); |
(...skipping 20 matching lines...) Expand all Loading... |
1523 } | 1558 } |
1524 unittest.expect(queryMap["levels"], unittest.equals(arg_levels)); | 1559 unittest.expect(queryMap["levels"], unittest.equals(arg_levels)); |
1525 unittest.expect(queryMap["recursive"].first, unittest.equals("$arg_recur
sive")); | 1560 unittest.expect(queryMap["recursive"].first, unittest.equals("$arg_recur
sive")); |
1526 unittest.expect(queryMap["roles"], unittest.equals(arg_roles)); | 1561 unittest.expect(queryMap["roles"], unittest.equals(arg_roles)); |
1527 | 1562 |
1528 | 1563 |
1529 var h = { | 1564 var h = { |
1530 "content-type" : "application/json; charset=utf-8", | 1565 "content-type" : "application/json; charset=utf-8", |
1531 }; | 1566 }; |
1532 var resp = convert.JSON.encode(buildRepresentativeInfoData()); | 1567 var resp = convert.JSON.encode(buildRepresentativeInfoData()); |
1533 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 1568 return new async.Future.value(stringResponse(200, h, resp)); |
1534 }), true); | 1569 }), true); |
1535 res.representativeInfoByDivision(arg_ocdId, levels: arg_levels, recursive:
arg_recursive, roles: arg_roles).then(unittest.expectAsync(((api.Representative
InfoData response) { | 1570 res.representativeInfoByDivision(arg_ocdId, levels: arg_levels, recursive:
arg_recursive, roles: arg_roles).then(unittest.expectAsync(((api.Representative
InfoData response) { |
1536 checkRepresentativeInfoData(response); | 1571 checkRepresentativeInfoData(response); |
1537 }))); | 1572 }))); |
1538 }); | 1573 }); |
1539 | 1574 |
1540 }); | 1575 }); |
1541 | 1576 |
1542 | 1577 |
1543 } | 1578 } |
1544 | 1579 |
OLD | NEW |