OLD | NEW |
1 library googleapis.adexchangeseller.v1_1.test; | 1 library googleapis.adexchangeseller.v1_1.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/adexchangeseller/v1_1.dart' as api; | 12 import 'package:googleapis/adexchangeseller/v1_1.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 } |
| 22 |
| 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 } |
18 | 53 |
19 core.int buildCounterAccount = 0; | 54 core.int buildCounterAccount = 0; |
20 buildAccount() { | 55 buildAccount() { |
21 var o = new api.Account(); | 56 var o = new api.Account(); |
22 buildCounterAccount++; | 57 buildCounterAccount++; |
23 if (buildCounterAccount < 3) { | 58 if (buildCounterAccount < 3) { |
24 o.id = "foo"; | 59 o.id = "foo"; |
25 o.kind = "foo"; | 60 o.kind = "foo"; |
26 o.name = "foo"; | 61 o.name = "foo"; |
27 } | 62 } |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 if (buildCounterAdClient < 3) { | 94 if (buildCounterAdClient < 3) { |
60 unittest.expect(o.arcOptIn, unittest.isTrue); | 95 unittest.expect(o.arcOptIn, unittest.isTrue); |
61 unittest.expect(o.id, unittest.equals('foo')); | 96 unittest.expect(o.id, unittest.equals('foo')); |
62 unittest.expect(o.kind, unittest.equals('foo')); | 97 unittest.expect(o.kind, unittest.equals('foo')); |
63 unittest.expect(o.productCode, unittest.equals('foo')); | 98 unittest.expect(o.productCode, unittest.equals('foo')); |
64 unittest.expect(o.supportsReporting, unittest.isTrue); | 99 unittest.expect(o.supportsReporting, unittest.isTrue); |
65 } | 100 } |
66 buildCounterAdClient--; | 101 buildCounterAdClient--; |
67 } | 102 } |
68 | 103 |
69 buildUnnamed250() { | 104 buildUnnamed44() { |
70 var o = new core.List<api.AdClient>(); | 105 var o = new core.List<api.AdClient>(); |
71 o.add(buildAdClient()); | 106 o.add(buildAdClient()); |
72 o.add(buildAdClient()); | 107 o.add(buildAdClient()); |
73 return o; | 108 return o; |
74 } | 109 } |
75 | 110 |
76 checkUnnamed250(core.List<api.AdClient> o) { | 111 checkUnnamed44(core.List<api.AdClient> o) { |
77 unittest.expect(o, unittest.hasLength(2)); | 112 unittest.expect(o, unittest.hasLength(2)); |
78 checkAdClient(o[0]); | 113 checkAdClient(o[0]); |
79 checkAdClient(o[1]); | 114 checkAdClient(o[1]); |
80 } | 115 } |
81 | 116 |
82 core.int buildCounterAdClients = 0; | 117 core.int buildCounterAdClients = 0; |
83 buildAdClients() { | 118 buildAdClients() { |
84 var o = new api.AdClients(); | 119 var o = new api.AdClients(); |
85 buildCounterAdClients++; | 120 buildCounterAdClients++; |
86 if (buildCounterAdClients < 3) { | 121 if (buildCounterAdClients < 3) { |
87 o.etag = "foo"; | 122 o.etag = "foo"; |
88 o.items = buildUnnamed250(); | 123 o.items = buildUnnamed44(); |
89 o.kind = "foo"; | 124 o.kind = "foo"; |
90 o.nextPageToken = "foo"; | 125 o.nextPageToken = "foo"; |
91 } | 126 } |
92 buildCounterAdClients--; | 127 buildCounterAdClients--; |
93 return o; | 128 return o; |
94 } | 129 } |
95 | 130 |
96 checkAdClients(api.AdClients o) { | 131 checkAdClients(api.AdClients o) { |
97 buildCounterAdClients++; | 132 buildCounterAdClients++; |
98 if (buildCounterAdClients < 3) { | 133 if (buildCounterAdClients < 3) { |
99 unittest.expect(o.etag, unittest.equals('foo')); | 134 unittest.expect(o.etag, unittest.equals('foo')); |
100 checkUnnamed250(o.items); | 135 checkUnnamed44(o.items); |
101 unittest.expect(o.kind, unittest.equals('foo')); | 136 unittest.expect(o.kind, unittest.equals('foo')); |
102 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 137 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
103 } | 138 } |
104 buildCounterAdClients--; | 139 buildCounterAdClients--; |
105 } | 140 } |
106 | 141 |
107 core.int buildCounterAdUnit = 0; | 142 core.int buildCounterAdUnit = 0; |
108 buildAdUnit() { | 143 buildAdUnit() { |
109 var o = new api.AdUnit(); | 144 var o = new api.AdUnit(); |
110 buildCounterAdUnit++; | 145 buildCounterAdUnit++; |
(...skipping 13 matching lines...) Expand all Loading... |
124 if (buildCounterAdUnit < 3) { | 159 if (buildCounterAdUnit < 3) { |
125 unittest.expect(o.code, unittest.equals('foo')); | 160 unittest.expect(o.code, unittest.equals('foo')); |
126 unittest.expect(o.id, unittest.equals('foo')); | 161 unittest.expect(o.id, unittest.equals('foo')); |
127 unittest.expect(o.kind, unittest.equals('foo')); | 162 unittest.expect(o.kind, unittest.equals('foo')); |
128 unittest.expect(o.name, unittest.equals('foo')); | 163 unittest.expect(o.name, unittest.equals('foo')); |
129 unittest.expect(o.status, unittest.equals('foo')); | 164 unittest.expect(o.status, unittest.equals('foo')); |
130 } | 165 } |
131 buildCounterAdUnit--; | 166 buildCounterAdUnit--; |
132 } | 167 } |
133 | 168 |
134 buildUnnamed251() { | 169 buildUnnamed45() { |
135 var o = new core.List<api.AdUnit>(); | 170 var o = new core.List<api.AdUnit>(); |
136 o.add(buildAdUnit()); | 171 o.add(buildAdUnit()); |
137 o.add(buildAdUnit()); | 172 o.add(buildAdUnit()); |
138 return o; | 173 return o; |
139 } | 174 } |
140 | 175 |
141 checkUnnamed251(core.List<api.AdUnit> o) { | 176 checkUnnamed45(core.List<api.AdUnit> o) { |
142 unittest.expect(o, unittest.hasLength(2)); | 177 unittest.expect(o, unittest.hasLength(2)); |
143 checkAdUnit(o[0]); | 178 checkAdUnit(o[0]); |
144 checkAdUnit(o[1]); | 179 checkAdUnit(o[1]); |
145 } | 180 } |
146 | 181 |
147 core.int buildCounterAdUnits = 0; | 182 core.int buildCounterAdUnits = 0; |
148 buildAdUnits() { | 183 buildAdUnits() { |
149 var o = new api.AdUnits(); | 184 var o = new api.AdUnits(); |
150 buildCounterAdUnits++; | 185 buildCounterAdUnits++; |
151 if (buildCounterAdUnits < 3) { | 186 if (buildCounterAdUnits < 3) { |
152 o.etag = "foo"; | 187 o.etag = "foo"; |
153 o.items = buildUnnamed251(); | 188 o.items = buildUnnamed45(); |
154 o.kind = "foo"; | 189 o.kind = "foo"; |
155 o.nextPageToken = "foo"; | 190 o.nextPageToken = "foo"; |
156 } | 191 } |
157 buildCounterAdUnits--; | 192 buildCounterAdUnits--; |
158 return o; | 193 return o; |
159 } | 194 } |
160 | 195 |
161 checkAdUnits(api.AdUnits o) { | 196 checkAdUnits(api.AdUnits o) { |
162 buildCounterAdUnits++; | 197 buildCounterAdUnits++; |
163 if (buildCounterAdUnits < 3) { | 198 if (buildCounterAdUnits < 3) { |
164 unittest.expect(o.etag, unittest.equals('foo')); | 199 unittest.expect(o.etag, unittest.equals('foo')); |
165 checkUnnamed251(o.items); | 200 checkUnnamed45(o.items); |
166 unittest.expect(o.kind, unittest.equals('foo')); | 201 unittest.expect(o.kind, unittest.equals('foo')); |
167 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 202 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
168 } | 203 } |
169 buildCounterAdUnits--; | 204 buildCounterAdUnits--; |
170 } | 205 } |
171 | 206 |
172 core.int buildCounterAlert = 0; | 207 core.int buildCounterAlert = 0; |
173 buildAlert() { | 208 buildAlert() { |
174 var o = new api.Alert(); | 209 var o = new api.Alert(); |
175 buildCounterAlert++; | 210 buildCounterAlert++; |
(...skipping 13 matching lines...) Expand all Loading... |
189 if (buildCounterAlert < 3) { | 224 if (buildCounterAlert < 3) { |
190 unittest.expect(o.id, unittest.equals('foo')); | 225 unittest.expect(o.id, unittest.equals('foo')); |
191 unittest.expect(o.kind, unittest.equals('foo')); | 226 unittest.expect(o.kind, unittest.equals('foo')); |
192 unittest.expect(o.message, unittest.equals('foo')); | 227 unittest.expect(o.message, unittest.equals('foo')); |
193 unittest.expect(o.severity, unittest.equals('foo')); | 228 unittest.expect(o.severity, unittest.equals('foo')); |
194 unittest.expect(o.type, unittest.equals('foo')); | 229 unittest.expect(o.type, unittest.equals('foo')); |
195 } | 230 } |
196 buildCounterAlert--; | 231 buildCounterAlert--; |
197 } | 232 } |
198 | 233 |
199 buildUnnamed252() { | 234 buildUnnamed46() { |
200 var o = new core.List<api.Alert>(); | 235 var o = new core.List<api.Alert>(); |
201 o.add(buildAlert()); | 236 o.add(buildAlert()); |
202 o.add(buildAlert()); | 237 o.add(buildAlert()); |
203 return o; | 238 return o; |
204 } | 239 } |
205 | 240 |
206 checkUnnamed252(core.List<api.Alert> o) { | 241 checkUnnamed46(core.List<api.Alert> o) { |
207 unittest.expect(o, unittest.hasLength(2)); | 242 unittest.expect(o, unittest.hasLength(2)); |
208 checkAlert(o[0]); | 243 checkAlert(o[0]); |
209 checkAlert(o[1]); | 244 checkAlert(o[1]); |
210 } | 245 } |
211 | 246 |
212 core.int buildCounterAlerts = 0; | 247 core.int buildCounterAlerts = 0; |
213 buildAlerts() { | 248 buildAlerts() { |
214 var o = new api.Alerts(); | 249 var o = new api.Alerts(); |
215 buildCounterAlerts++; | 250 buildCounterAlerts++; |
216 if (buildCounterAlerts < 3) { | 251 if (buildCounterAlerts < 3) { |
217 o.items = buildUnnamed252(); | 252 o.items = buildUnnamed46(); |
218 o.kind = "foo"; | 253 o.kind = "foo"; |
219 } | 254 } |
220 buildCounterAlerts--; | 255 buildCounterAlerts--; |
221 return o; | 256 return o; |
222 } | 257 } |
223 | 258 |
224 checkAlerts(api.Alerts o) { | 259 checkAlerts(api.Alerts o) { |
225 buildCounterAlerts++; | 260 buildCounterAlerts++; |
226 if (buildCounterAlerts < 3) { | 261 if (buildCounterAlerts < 3) { |
227 checkUnnamed252(o.items); | 262 checkUnnamed46(o.items); |
228 unittest.expect(o.kind, unittest.equals('foo')); | 263 unittest.expect(o.kind, unittest.equals('foo')); |
229 } | 264 } |
230 buildCounterAlerts--; | 265 buildCounterAlerts--; |
231 } | 266 } |
232 | 267 |
233 core.int buildCounterCustomChannelTargetingInfo = 0; | 268 core.int buildCounterCustomChannelTargetingInfo = 0; |
234 buildCustomChannelTargetingInfo() { | 269 buildCustomChannelTargetingInfo() { |
235 var o = new api.CustomChannelTargetingInfo(); | 270 var o = new api.CustomChannelTargetingInfo(); |
236 buildCounterCustomChannelTargetingInfo++; | 271 buildCounterCustomChannelTargetingInfo++; |
237 if (buildCounterCustomChannelTargetingInfo < 3) { | 272 if (buildCounterCustomChannelTargetingInfo < 3) { |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
275 if (buildCounterCustomChannel < 3) { | 310 if (buildCounterCustomChannel < 3) { |
276 unittest.expect(o.code, unittest.equals('foo')); | 311 unittest.expect(o.code, unittest.equals('foo')); |
277 unittest.expect(o.id, unittest.equals('foo')); | 312 unittest.expect(o.id, unittest.equals('foo')); |
278 unittest.expect(o.kind, unittest.equals('foo')); | 313 unittest.expect(o.kind, unittest.equals('foo')); |
279 unittest.expect(o.name, unittest.equals('foo')); | 314 unittest.expect(o.name, unittest.equals('foo')); |
280 checkCustomChannelTargetingInfo(o.targetingInfo); | 315 checkCustomChannelTargetingInfo(o.targetingInfo); |
281 } | 316 } |
282 buildCounterCustomChannel--; | 317 buildCounterCustomChannel--; |
283 } | 318 } |
284 | 319 |
285 buildUnnamed253() { | 320 buildUnnamed47() { |
286 var o = new core.List<api.CustomChannel>(); | 321 var o = new core.List<api.CustomChannel>(); |
287 o.add(buildCustomChannel()); | 322 o.add(buildCustomChannel()); |
288 o.add(buildCustomChannel()); | 323 o.add(buildCustomChannel()); |
289 return o; | 324 return o; |
290 } | 325 } |
291 | 326 |
292 checkUnnamed253(core.List<api.CustomChannel> o) { | 327 checkUnnamed47(core.List<api.CustomChannel> o) { |
293 unittest.expect(o, unittest.hasLength(2)); | 328 unittest.expect(o, unittest.hasLength(2)); |
294 checkCustomChannel(o[0]); | 329 checkCustomChannel(o[0]); |
295 checkCustomChannel(o[1]); | 330 checkCustomChannel(o[1]); |
296 } | 331 } |
297 | 332 |
298 core.int buildCounterCustomChannels = 0; | 333 core.int buildCounterCustomChannels = 0; |
299 buildCustomChannels() { | 334 buildCustomChannels() { |
300 var o = new api.CustomChannels(); | 335 var o = new api.CustomChannels(); |
301 buildCounterCustomChannels++; | 336 buildCounterCustomChannels++; |
302 if (buildCounterCustomChannels < 3) { | 337 if (buildCounterCustomChannels < 3) { |
303 o.etag = "foo"; | 338 o.etag = "foo"; |
304 o.items = buildUnnamed253(); | 339 o.items = buildUnnamed47(); |
305 o.kind = "foo"; | 340 o.kind = "foo"; |
306 o.nextPageToken = "foo"; | 341 o.nextPageToken = "foo"; |
307 } | 342 } |
308 buildCounterCustomChannels--; | 343 buildCounterCustomChannels--; |
309 return o; | 344 return o; |
310 } | 345 } |
311 | 346 |
312 checkCustomChannels(api.CustomChannels o) { | 347 checkCustomChannels(api.CustomChannels o) { |
313 buildCounterCustomChannels++; | 348 buildCounterCustomChannels++; |
314 if (buildCounterCustomChannels < 3) { | 349 if (buildCounterCustomChannels < 3) { |
315 unittest.expect(o.etag, unittest.equals('foo')); | 350 unittest.expect(o.etag, unittest.equals('foo')); |
316 checkUnnamed253(o.items); | 351 checkUnnamed47(o.items); |
317 unittest.expect(o.kind, unittest.equals('foo')); | 352 unittest.expect(o.kind, unittest.equals('foo')); |
318 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 353 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
319 } | 354 } |
320 buildCounterCustomChannels--; | 355 buildCounterCustomChannels--; |
321 } | 356 } |
322 | 357 |
323 buildUnnamed254() { | 358 buildUnnamed48() { |
324 var o = new core.List<api.ReportingMetadataEntry>(); | 359 var o = new core.List<api.ReportingMetadataEntry>(); |
325 o.add(buildReportingMetadataEntry()); | 360 o.add(buildReportingMetadataEntry()); |
326 o.add(buildReportingMetadataEntry()); | 361 o.add(buildReportingMetadataEntry()); |
327 return o; | 362 return o; |
328 } | 363 } |
329 | 364 |
330 checkUnnamed254(core.List<api.ReportingMetadataEntry> o) { | 365 checkUnnamed48(core.List<api.ReportingMetadataEntry> o) { |
331 unittest.expect(o, unittest.hasLength(2)); | 366 unittest.expect(o, unittest.hasLength(2)); |
332 checkReportingMetadataEntry(o[0]); | 367 checkReportingMetadataEntry(o[0]); |
333 checkReportingMetadataEntry(o[1]); | 368 checkReportingMetadataEntry(o[1]); |
334 } | 369 } |
335 | 370 |
336 core.int buildCounterMetadata = 0; | 371 core.int buildCounterMetadata = 0; |
337 buildMetadata() { | 372 buildMetadata() { |
338 var o = new api.Metadata(); | 373 var o = new api.Metadata(); |
339 buildCounterMetadata++; | 374 buildCounterMetadata++; |
340 if (buildCounterMetadata < 3) { | 375 if (buildCounterMetadata < 3) { |
341 o.items = buildUnnamed254(); | 376 o.items = buildUnnamed48(); |
342 o.kind = "foo"; | 377 o.kind = "foo"; |
343 } | 378 } |
344 buildCounterMetadata--; | 379 buildCounterMetadata--; |
345 return o; | 380 return o; |
346 } | 381 } |
347 | 382 |
348 checkMetadata(api.Metadata o) { | 383 checkMetadata(api.Metadata o) { |
349 buildCounterMetadata++; | 384 buildCounterMetadata++; |
350 if (buildCounterMetadata < 3) { | 385 if (buildCounterMetadata < 3) { |
351 checkUnnamed254(o.items); | 386 checkUnnamed48(o.items); |
352 unittest.expect(o.kind, unittest.equals('foo')); | 387 unittest.expect(o.kind, unittest.equals('foo')); |
353 } | 388 } |
354 buildCounterMetadata--; | 389 buildCounterMetadata--; |
355 } | 390 } |
356 | 391 |
357 core.int buildCounterPreferredDeal = 0; | 392 core.int buildCounterPreferredDeal = 0; |
358 buildPreferredDeal() { | 393 buildPreferredDeal() { |
359 var o = new api.PreferredDeal(); | 394 var o = new api.PreferredDeal(); |
360 buildCounterPreferredDeal++; | 395 buildCounterPreferredDeal++; |
361 if (buildCounterPreferredDeal < 3) { | 396 if (buildCounterPreferredDeal < 3) { |
(...skipping 18 matching lines...) Expand all Loading... |
380 unittest.expect(o.currencyCode, unittest.equals('foo')); | 415 unittest.expect(o.currencyCode, unittest.equals('foo')); |
381 unittest.expect(o.endTime, unittest.equals('foo')); | 416 unittest.expect(o.endTime, unittest.equals('foo')); |
382 unittest.expect(o.fixedCpm, unittest.equals('foo')); | 417 unittest.expect(o.fixedCpm, unittest.equals('foo')); |
383 unittest.expect(o.id, unittest.equals('foo')); | 418 unittest.expect(o.id, unittest.equals('foo')); |
384 unittest.expect(o.kind, unittest.equals('foo')); | 419 unittest.expect(o.kind, unittest.equals('foo')); |
385 unittest.expect(o.startTime, unittest.equals('foo')); | 420 unittest.expect(o.startTime, unittest.equals('foo')); |
386 } | 421 } |
387 buildCounterPreferredDeal--; | 422 buildCounterPreferredDeal--; |
388 } | 423 } |
389 | 424 |
390 buildUnnamed255() { | 425 buildUnnamed49() { |
391 var o = new core.List<api.PreferredDeal>(); | 426 var o = new core.List<api.PreferredDeal>(); |
392 o.add(buildPreferredDeal()); | 427 o.add(buildPreferredDeal()); |
393 o.add(buildPreferredDeal()); | 428 o.add(buildPreferredDeal()); |
394 return o; | 429 return o; |
395 } | 430 } |
396 | 431 |
397 checkUnnamed255(core.List<api.PreferredDeal> o) { | 432 checkUnnamed49(core.List<api.PreferredDeal> o) { |
398 unittest.expect(o, unittest.hasLength(2)); | 433 unittest.expect(o, unittest.hasLength(2)); |
399 checkPreferredDeal(o[0]); | 434 checkPreferredDeal(o[0]); |
400 checkPreferredDeal(o[1]); | 435 checkPreferredDeal(o[1]); |
401 } | 436 } |
402 | 437 |
403 core.int buildCounterPreferredDeals = 0; | 438 core.int buildCounterPreferredDeals = 0; |
404 buildPreferredDeals() { | 439 buildPreferredDeals() { |
405 var o = new api.PreferredDeals(); | 440 var o = new api.PreferredDeals(); |
406 buildCounterPreferredDeals++; | 441 buildCounterPreferredDeals++; |
407 if (buildCounterPreferredDeals < 3) { | 442 if (buildCounterPreferredDeals < 3) { |
408 o.items = buildUnnamed255(); | 443 o.items = buildUnnamed49(); |
409 o.kind = "foo"; | 444 o.kind = "foo"; |
410 } | 445 } |
411 buildCounterPreferredDeals--; | 446 buildCounterPreferredDeals--; |
412 return o; | 447 return o; |
413 } | 448 } |
414 | 449 |
415 checkPreferredDeals(api.PreferredDeals o) { | 450 checkPreferredDeals(api.PreferredDeals o) { |
416 buildCounterPreferredDeals++; | 451 buildCounterPreferredDeals++; |
417 if (buildCounterPreferredDeals < 3) { | 452 if (buildCounterPreferredDeals < 3) { |
418 checkUnnamed255(o.items); | 453 checkUnnamed49(o.items); |
419 unittest.expect(o.kind, unittest.equals('foo')); | 454 unittest.expect(o.kind, unittest.equals('foo')); |
420 } | 455 } |
421 buildCounterPreferredDeals--; | 456 buildCounterPreferredDeals--; |
422 } | 457 } |
423 | 458 |
424 buildUnnamed256() { | 459 buildUnnamed50() { |
425 var o = new core.List<core.String>(); | 460 var o = new core.List<core.String>(); |
426 o.add("foo"); | 461 o.add("foo"); |
427 o.add("foo"); | 462 o.add("foo"); |
428 return o; | 463 return o; |
429 } | 464 } |
430 | 465 |
431 checkUnnamed256(core.List<core.String> o) { | 466 checkUnnamed50(core.List<core.String> o) { |
432 unittest.expect(o, unittest.hasLength(2)); | 467 unittest.expect(o, unittest.hasLength(2)); |
433 unittest.expect(o[0], unittest.equals('foo')); | 468 unittest.expect(o[0], unittest.equals('foo')); |
434 unittest.expect(o[1], unittest.equals('foo')); | 469 unittest.expect(o[1], unittest.equals('foo')); |
435 } | 470 } |
436 | 471 |
437 core.int buildCounterReportHeaders = 0; | 472 core.int buildCounterReportHeaders = 0; |
438 buildReportHeaders() { | 473 buildReportHeaders() { |
439 var o = new api.ReportHeaders(); | 474 var o = new api.ReportHeaders(); |
440 buildCounterReportHeaders++; | 475 buildCounterReportHeaders++; |
441 if (buildCounterReportHeaders < 3) { | 476 if (buildCounterReportHeaders < 3) { |
442 o.currency = "foo"; | 477 o.currency = "foo"; |
443 o.name = "foo"; | 478 o.name = "foo"; |
444 o.type = "foo"; | 479 o.type = "foo"; |
445 } | 480 } |
446 buildCounterReportHeaders--; | 481 buildCounterReportHeaders--; |
447 return o; | 482 return o; |
448 } | 483 } |
449 | 484 |
450 checkReportHeaders(api.ReportHeaders o) { | 485 checkReportHeaders(api.ReportHeaders o) { |
451 buildCounterReportHeaders++; | 486 buildCounterReportHeaders++; |
452 if (buildCounterReportHeaders < 3) { | 487 if (buildCounterReportHeaders < 3) { |
453 unittest.expect(o.currency, unittest.equals('foo')); | 488 unittest.expect(o.currency, unittest.equals('foo')); |
454 unittest.expect(o.name, unittest.equals('foo')); | 489 unittest.expect(o.name, unittest.equals('foo')); |
455 unittest.expect(o.type, unittest.equals('foo')); | 490 unittest.expect(o.type, unittest.equals('foo')); |
456 } | 491 } |
457 buildCounterReportHeaders--; | 492 buildCounterReportHeaders--; |
458 } | 493 } |
459 | 494 |
460 buildUnnamed257() { | 495 buildUnnamed51() { |
461 var o = new core.List<api.ReportHeaders>(); | 496 var o = new core.List<api.ReportHeaders>(); |
462 o.add(buildReportHeaders()); | 497 o.add(buildReportHeaders()); |
463 o.add(buildReportHeaders()); | 498 o.add(buildReportHeaders()); |
464 return o; | 499 return o; |
465 } | 500 } |
466 | 501 |
467 checkUnnamed257(core.List<api.ReportHeaders> o) { | 502 checkUnnamed51(core.List<api.ReportHeaders> o) { |
468 unittest.expect(o, unittest.hasLength(2)); | 503 unittest.expect(o, unittest.hasLength(2)); |
469 checkReportHeaders(o[0]); | 504 checkReportHeaders(o[0]); |
470 checkReportHeaders(o[1]); | 505 checkReportHeaders(o[1]); |
471 } | 506 } |
472 | 507 |
473 buildUnnamed258() { | 508 buildUnnamed52() { |
474 var o = new core.List<core.String>(); | 509 var o = new core.List<core.String>(); |
475 o.add("foo"); | 510 o.add("foo"); |
476 o.add("foo"); | 511 o.add("foo"); |
477 return o; | 512 return o; |
478 } | 513 } |
479 | 514 |
480 checkUnnamed258(core.List<core.String> o) { | 515 checkUnnamed52(core.List<core.String> o) { |
481 unittest.expect(o, unittest.hasLength(2)); | 516 unittest.expect(o, unittest.hasLength(2)); |
482 unittest.expect(o[0], unittest.equals('foo')); | 517 unittest.expect(o[0], unittest.equals('foo')); |
483 unittest.expect(o[1], unittest.equals('foo')); | 518 unittest.expect(o[1], unittest.equals('foo')); |
484 } | 519 } |
485 | 520 |
486 buildUnnamed259() { | 521 buildUnnamed53() { |
487 var o = new core.List<core.List<core.String>>(); | 522 var o = new core.List<core.List<core.String>>(); |
488 o.add(buildUnnamed258()); | 523 o.add(buildUnnamed52()); |
489 o.add(buildUnnamed258()); | 524 o.add(buildUnnamed52()); |
490 return o; | 525 return o; |
491 } | 526 } |
492 | 527 |
493 checkUnnamed259(core.List<core.List<core.String>> o) { | 528 checkUnnamed53(core.List<core.List<core.String>> o) { |
494 unittest.expect(o, unittest.hasLength(2)); | 529 unittest.expect(o, unittest.hasLength(2)); |
495 checkUnnamed258(o[0]); | 530 checkUnnamed52(o[0]); |
496 checkUnnamed258(o[1]); | 531 checkUnnamed52(o[1]); |
497 } | 532 } |
498 | 533 |
499 buildUnnamed260() { | 534 buildUnnamed54() { |
500 var o = new core.List<core.String>(); | 535 var o = new core.List<core.String>(); |
501 o.add("foo"); | 536 o.add("foo"); |
502 o.add("foo"); | 537 o.add("foo"); |
503 return o; | 538 return o; |
504 } | 539 } |
505 | 540 |
506 checkUnnamed260(core.List<core.String> o) { | 541 checkUnnamed54(core.List<core.String> o) { |
507 unittest.expect(o, unittest.hasLength(2)); | 542 unittest.expect(o, unittest.hasLength(2)); |
508 unittest.expect(o[0], unittest.equals('foo')); | 543 unittest.expect(o[0], unittest.equals('foo')); |
509 unittest.expect(o[1], unittest.equals('foo')); | 544 unittest.expect(o[1], unittest.equals('foo')); |
510 } | 545 } |
511 | 546 |
512 buildUnnamed261() { | 547 buildUnnamed55() { |
513 var o = new core.List<core.String>(); | 548 var o = new core.List<core.String>(); |
514 o.add("foo"); | 549 o.add("foo"); |
515 o.add("foo"); | 550 o.add("foo"); |
516 return o; | 551 return o; |
517 } | 552 } |
518 | 553 |
519 checkUnnamed261(core.List<core.String> o) { | 554 checkUnnamed55(core.List<core.String> o) { |
520 unittest.expect(o, unittest.hasLength(2)); | 555 unittest.expect(o, unittest.hasLength(2)); |
521 unittest.expect(o[0], unittest.equals('foo')); | 556 unittest.expect(o[0], unittest.equals('foo')); |
522 unittest.expect(o[1], unittest.equals('foo')); | 557 unittest.expect(o[1], unittest.equals('foo')); |
523 } | 558 } |
524 | 559 |
525 core.int buildCounterReport = 0; | 560 core.int buildCounterReport = 0; |
526 buildReport() { | 561 buildReport() { |
527 var o = new api.Report(); | 562 var o = new api.Report(); |
528 buildCounterReport++; | 563 buildCounterReport++; |
529 if (buildCounterReport < 3) { | 564 if (buildCounterReport < 3) { |
530 o.averages = buildUnnamed256(); | 565 o.averages = buildUnnamed50(); |
531 o.headers = buildUnnamed257(); | 566 o.headers = buildUnnamed51(); |
532 o.kind = "foo"; | 567 o.kind = "foo"; |
533 o.rows = buildUnnamed259(); | 568 o.rows = buildUnnamed53(); |
534 o.totalMatchedRows = "foo"; | 569 o.totalMatchedRows = "foo"; |
535 o.totals = buildUnnamed260(); | 570 o.totals = buildUnnamed54(); |
536 o.warnings = buildUnnamed261(); | 571 o.warnings = buildUnnamed55(); |
537 } | 572 } |
538 buildCounterReport--; | 573 buildCounterReport--; |
539 return o; | 574 return o; |
540 } | 575 } |
541 | 576 |
542 checkReport(api.Report o) { | 577 checkReport(api.Report o) { |
543 buildCounterReport++; | 578 buildCounterReport++; |
544 if (buildCounterReport < 3) { | 579 if (buildCounterReport < 3) { |
545 checkUnnamed256(o.averages); | 580 checkUnnamed50(o.averages); |
546 checkUnnamed257(o.headers); | 581 checkUnnamed51(o.headers); |
547 unittest.expect(o.kind, unittest.equals('foo')); | 582 unittest.expect(o.kind, unittest.equals('foo')); |
548 checkUnnamed259(o.rows); | 583 checkUnnamed53(o.rows); |
549 unittest.expect(o.totalMatchedRows, unittest.equals('foo')); | 584 unittest.expect(o.totalMatchedRows, unittest.equals('foo')); |
550 checkUnnamed260(o.totals); | 585 checkUnnamed54(o.totals); |
551 checkUnnamed261(o.warnings); | 586 checkUnnamed55(o.warnings); |
552 } | 587 } |
553 buildCounterReport--; | 588 buildCounterReport--; |
554 } | 589 } |
555 | 590 |
556 buildUnnamed262() { | 591 buildUnnamed56() { |
557 var o = new core.List<core.String>(); | 592 var o = new core.List<core.String>(); |
558 o.add("foo"); | 593 o.add("foo"); |
559 o.add("foo"); | 594 o.add("foo"); |
560 return o; | 595 return o; |
561 } | 596 } |
562 | 597 |
563 checkUnnamed262(core.List<core.String> o) { | 598 checkUnnamed56(core.List<core.String> o) { |
564 unittest.expect(o, unittest.hasLength(2)); | 599 unittest.expect(o, unittest.hasLength(2)); |
565 unittest.expect(o[0], unittest.equals('foo')); | 600 unittest.expect(o[0], unittest.equals('foo')); |
566 unittest.expect(o[1], unittest.equals('foo')); | 601 unittest.expect(o[1], unittest.equals('foo')); |
567 } | 602 } |
568 | 603 |
569 buildUnnamed263() { | 604 buildUnnamed57() { |
570 var o = new core.List<core.String>(); | 605 var o = new core.List<core.String>(); |
571 o.add("foo"); | 606 o.add("foo"); |
572 o.add("foo"); | 607 o.add("foo"); |
573 return o; | 608 return o; |
574 } | 609 } |
575 | 610 |
576 checkUnnamed263(core.List<core.String> o) { | 611 checkUnnamed57(core.List<core.String> o) { |
577 unittest.expect(o, unittest.hasLength(2)); | 612 unittest.expect(o, unittest.hasLength(2)); |
578 unittest.expect(o[0], unittest.equals('foo')); | 613 unittest.expect(o[0], unittest.equals('foo')); |
579 unittest.expect(o[1], unittest.equals('foo')); | 614 unittest.expect(o[1], unittest.equals('foo')); |
580 } | 615 } |
581 | 616 |
582 buildUnnamed264() { | 617 buildUnnamed58() { |
583 var o = new core.List<core.String>(); | 618 var o = new core.List<core.String>(); |
584 o.add("foo"); | 619 o.add("foo"); |
585 o.add("foo"); | 620 o.add("foo"); |
586 return o; | 621 return o; |
587 } | 622 } |
588 | 623 |
589 checkUnnamed264(core.List<core.String> o) { | 624 checkUnnamed58(core.List<core.String> o) { |
590 unittest.expect(o, unittest.hasLength(2)); | 625 unittest.expect(o, unittest.hasLength(2)); |
591 unittest.expect(o[0], unittest.equals('foo')); | 626 unittest.expect(o[0], unittest.equals('foo')); |
592 unittest.expect(o[1], unittest.equals('foo')); | 627 unittest.expect(o[1], unittest.equals('foo')); |
593 } | 628 } |
594 | 629 |
595 buildUnnamed265() { | 630 buildUnnamed59() { |
596 var o = new core.List<core.String>(); | 631 var o = new core.List<core.String>(); |
597 o.add("foo"); | 632 o.add("foo"); |
598 o.add("foo"); | 633 o.add("foo"); |
599 return o; | 634 return o; |
600 } | 635 } |
601 | 636 |
602 checkUnnamed265(core.List<core.String> o) { | 637 checkUnnamed59(core.List<core.String> o) { |
603 unittest.expect(o, unittest.hasLength(2)); | 638 unittest.expect(o, unittest.hasLength(2)); |
604 unittest.expect(o[0], unittest.equals('foo')); | 639 unittest.expect(o[0], unittest.equals('foo')); |
605 unittest.expect(o[1], unittest.equals('foo')); | 640 unittest.expect(o[1], unittest.equals('foo')); |
606 } | 641 } |
607 | 642 |
608 buildUnnamed266() { | 643 buildUnnamed60() { |
609 var o = new core.List<core.String>(); | 644 var o = new core.List<core.String>(); |
610 o.add("foo"); | 645 o.add("foo"); |
611 o.add("foo"); | 646 o.add("foo"); |
612 return o; | 647 return o; |
613 } | 648 } |
614 | 649 |
615 checkUnnamed266(core.List<core.String> o) { | 650 checkUnnamed60(core.List<core.String> o) { |
616 unittest.expect(o, unittest.hasLength(2)); | 651 unittest.expect(o, unittest.hasLength(2)); |
617 unittest.expect(o[0], unittest.equals('foo')); | 652 unittest.expect(o[0], unittest.equals('foo')); |
618 unittest.expect(o[1], unittest.equals('foo')); | 653 unittest.expect(o[1], unittest.equals('foo')); |
619 } | 654 } |
620 | 655 |
621 core.int buildCounterReportingMetadataEntry = 0; | 656 core.int buildCounterReportingMetadataEntry = 0; |
622 buildReportingMetadataEntry() { | 657 buildReportingMetadataEntry() { |
623 var o = new api.ReportingMetadataEntry(); | 658 var o = new api.ReportingMetadataEntry(); |
624 buildCounterReportingMetadataEntry++; | 659 buildCounterReportingMetadataEntry++; |
625 if (buildCounterReportingMetadataEntry < 3) { | 660 if (buildCounterReportingMetadataEntry < 3) { |
626 o.compatibleDimensions = buildUnnamed262(); | 661 o.compatibleDimensions = buildUnnamed56(); |
627 o.compatibleMetrics = buildUnnamed263(); | 662 o.compatibleMetrics = buildUnnamed57(); |
628 o.id = "foo"; | 663 o.id = "foo"; |
629 o.kind = "foo"; | 664 o.kind = "foo"; |
630 o.requiredDimensions = buildUnnamed264(); | 665 o.requiredDimensions = buildUnnamed58(); |
631 o.requiredMetrics = buildUnnamed265(); | 666 o.requiredMetrics = buildUnnamed59(); |
632 o.supportedProducts = buildUnnamed266(); | 667 o.supportedProducts = buildUnnamed60(); |
633 } | 668 } |
634 buildCounterReportingMetadataEntry--; | 669 buildCounterReportingMetadataEntry--; |
635 return o; | 670 return o; |
636 } | 671 } |
637 | 672 |
638 checkReportingMetadataEntry(api.ReportingMetadataEntry o) { | 673 checkReportingMetadataEntry(api.ReportingMetadataEntry o) { |
639 buildCounterReportingMetadataEntry++; | 674 buildCounterReportingMetadataEntry++; |
640 if (buildCounterReportingMetadataEntry < 3) { | 675 if (buildCounterReportingMetadataEntry < 3) { |
641 checkUnnamed262(o.compatibleDimensions); | 676 checkUnnamed56(o.compatibleDimensions); |
642 checkUnnamed263(o.compatibleMetrics); | 677 checkUnnamed57(o.compatibleMetrics); |
643 unittest.expect(o.id, unittest.equals('foo')); | 678 unittest.expect(o.id, unittest.equals('foo')); |
644 unittest.expect(o.kind, unittest.equals('foo')); | 679 unittest.expect(o.kind, unittest.equals('foo')); |
645 checkUnnamed264(o.requiredDimensions); | 680 checkUnnamed58(o.requiredDimensions); |
646 checkUnnamed265(o.requiredMetrics); | 681 checkUnnamed59(o.requiredMetrics); |
647 checkUnnamed266(o.supportedProducts); | 682 checkUnnamed60(o.supportedProducts); |
648 } | 683 } |
649 buildCounterReportingMetadataEntry--; | 684 buildCounterReportingMetadataEntry--; |
650 } | 685 } |
651 | 686 |
652 core.int buildCounterSavedReport = 0; | 687 core.int buildCounterSavedReport = 0; |
653 buildSavedReport() { | 688 buildSavedReport() { |
654 var o = new api.SavedReport(); | 689 var o = new api.SavedReport(); |
655 buildCounterSavedReport++; | 690 buildCounterSavedReport++; |
656 if (buildCounterSavedReport < 3) { | 691 if (buildCounterSavedReport < 3) { |
657 o.id = "foo"; | 692 o.id = "foo"; |
658 o.kind = "foo"; | 693 o.kind = "foo"; |
659 o.name = "foo"; | 694 o.name = "foo"; |
660 } | 695 } |
661 buildCounterSavedReport--; | 696 buildCounterSavedReport--; |
662 return o; | 697 return o; |
663 } | 698 } |
664 | 699 |
665 checkSavedReport(api.SavedReport o) { | 700 checkSavedReport(api.SavedReport o) { |
666 buildCounterSavedReport++; | 701 buildCounterSavedReport++; |
667 if (buildCounterSavedReport < 3) { | 702 if (buildCounterSavedReport < 3) { |
668 unittest.expect(o.id, unittest.equals('foo')); | 703 unittest.expect(o.id, unittest.equals('foo')); |
669 unittest.expect(o.kind, unittest.equals('foo')); | 704 unittest.expect(o.kind, unittest.equals('foo')); |
670 unittest.expect(o.name, unittest.equals('foo')); | 705 unittest.expect(o.name, unittest.equals('foo')); |
671 } | 706 } |
672 buildCounterSavedReport--; | 707 buildCounterSavedReport--; |
673 } | 708 } |
674 | 709 |
675 buildUnnamed267() { | 710 buildUnnamed61() { |
676 var o = new core.List<api.SavedReport>(); | 711 var o = new core.List<api.SavedReport>(); |
677 o.add(buildSavedReport()); | 712 o.add(buildSavedReport()); |
678 o.add(buildSavedReport()); | 713 o.add(buildSavedReport()); |
679 return o; | 714 return o; |
680 } | 715 } |
681 | 716 |
682 checkUnnamed267(core.List<api.SavedReport> o) { | 717 checkUnnamed61(core.List<api.SavedReport> o) { |
683 unittest.expect(o, unittest.hasLength(2)); | 718 unittest.expect(o, unittest.hasLength(2)); |
684 checkSavedReport(o[0]); | 719 checkSavedReport(o[0]); |
685 checkSavedReport(o[1]); | 720 checkSavedReport(o[1]); |
686 } | 721 } |
687 | 722 |
688 core.int buildCounterSavedReports = 0; | 723 core.int buildCounterSavedReports = 0; |
689 buildSavedReports() { | 724 buildSavedReports() { |
690 var o = new api.SavedReports(); | 725 var o = new api.SavedReports(); |
691 buildCounterSavedReports++; | 726 buildCounterSavedReports++; |
692 if (buildCounterSavedReports < 3) { | 727 if (buildCounterSavedReports < 3) { |
693 o.etag = "foo"; | 728 o.etag = "foo"; |
694 o.items = buildUnnamed267(); | 729 o.items = buildUnnamed61(); |
695 o.kind = "foo"; | 730 o.kind = "foo"; |
696 o.nextPageToken = "foo"; | 731 o.nextPageToken = "foo"; |
697 } | 732 } |
698 buildCounterSavedReports--; | 733 buildCounterSavedReports--; |
699 return o; | 734 return o; |
700 } | 735 } |
701 | 736 |
702 checkSavedReports(api.SavedReports o) { | 737 checkSavedReports(api.SavedReports o) { |
703 buildCounterSavedReports++; | 738 buildCounterSavedReports++; |
704 if (buildCounterSavedReports < 3) { | 739 if (buildCounterSavedReports < 3) { |
705 unittest.expect(o.etag, unittest.equals('foo')); | 740 unittest.expect(o.etag, unittest.equals('foo')); |
706 checkUnnamed267(o.items); | 741 checkUnnamed61(o.items); |
707 unittest.expect(o.kind, unittest.equals('foo')); | 742 unittest.expect(o.kind, unittest.equals('foo')); |
708 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 743 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
709 } | 744 } |
710 buildCounterSavedReports--; | 745 buildCounterSavedReports--; |
711 } | 746 } |
712 | 747 |
713 core.int buildCounterUrlChannel = 0; | 748 core.int buildCounterUrlChannel = 0; |
714 buildUrlChannel() { | 749 buildUrlChannel() { |
715 var o = new api.UrlChannel(); | 750 var o = new api.UrlChannel(); |
716 buildCounterUrlChannel++; | 751 buildCounterUrlChannel++; |
717 if (buildCounterUrlChannel < 3) { | 752 if (buildCounterUrlChannel < 3) { |
718 o.id = "foo"; | 753 o.id = "foo"; |
719 o.kind = "foo"; | 754 o.kind = "foo"; |
720 o.urlPattern = "foo"; | 755 o.urlPattern = "foo"; |
721 } | 756 } |
722 buildCounterUrlChannel--; | 757 buildCounterUrlChannel--; |
723 return o; | 758 return o; |
724 } | 759 } |
725 | 760 |
726 checkUrlChannel(api.UrlChannel o) { | 761 checkUrlChannel(api.UrlChannel o) { |
727 buildCounterUrlChannel++; | 762 buildCounterUrlChannel++; |
728 if (buildCounterUrlChannel < 3) { | 763 if (buildCounterUrlChannel < 3) { |
729 unittest.expect(o.id, unittest.equals('foo')); | 764 unittest.expect(o.id, unittest.equals('foo')); |
730 unittest.expect(o.kind, unittest.equals('foo')); | 765 unittest.expect(o.kind, unittest.equals('foo')); |
731 unittest.expect(o.urlPattern, unittest.equals('foo')); | 766 unittest.expect(o.urlPattern, unittest.equals('foo')); |
732 } | 767 } |
733 buildCounterUrlChannel--; | 768 buildCounterUrlChannel--; |
734 } | 769 } |
735 | 770 |
736 buildUnnamed268() { | 771 buildUnnamed62() { |
737 var o = new core.List<api.UrlChannel>(); | 772 var o = new core.List<api.UrlChannel>(); |
738 o.add(buildUrlChannel()); | 773 o.add(buildUrlChannel()); |
739 o.add(buildUrlChannel()); | 774 o.add(buildUrlChannel()); |
740 return o; | 775 return o; |
741 } | 776 } |
742 | 777 |
743 checkUnnamed268(core.List<api.UrlChannel> o) { | 778 checkUnnamed62(core.List<api.UrlChannel> o) { |
744 unittest.expect(o, unittest.hasLength(2)); | 779 unittest.expect(o, unittest.hasLength(2)); |
745 checkUrlChannel(o[0]); | 780 checkUrlChannel(o[0]); |
746 checkUrlChannel(o[1]); | 781 checkUrlChannel(o[1]); |
747 } | 782 } |
748 | 783 |
749 core.int buildCounterUrlChannels = 0; | 784 core.int buildCounterUrlChannels = 0; |
750 buildUrlChannels() { | 785 buildUrlChannels() { |
751 var o = new api.UrlChannels(); | 786 var o = new api.UrlChannels(); |
752 buildCounterUrlChannels++; | 787 buildCounterUrlChannels++; |
753 if (buildCounterUrlChannels < 3) { | 788 if (buildCounterUrlChannels < 3) { |
754 o.etag = "foo"; | 789 o.etag = "foo"; |
755 o.items = buildUnnamed268(); | 790 o.items = buildUnnamed62(); |
756 o.kind = "foo"; | 791 o.kind = "foo"; |
757 o.nextPageToken = "foo"; | 792 o.nextPageToken = "foo"; |
758 } | 793 } |
759 buildCounterUrlChannels--; | 794 buildCounterUrlChannels--; |
760 return o; | 795 return o; |
761 } | 796 } |
762 | 797 |
763 checkUrlChannels(api.UrlChannels o) { | 798 checkUrlChannels(api.UrlChannels o) { |
764 buildCounterUrlChannels++; | 799 buildCounterUrlChannels++; |
765 if (buildCounterUrlChannels < 3) { | 800 if (buildCounterUrlChannels < 3) { |
766 unittest.expect(o.etag, unittest.equals('foo')); | 801 unittest.expect(o.etag, unittest.equals('foo')); |
767 checkUnnamed268(o.items); | 802 checkUnnamed62(o.items); |
768 unittest.expect(o.kind, unittest.equals('foo')); | 803 unittest.expect(o.kind, unittest.equals('foo')); |
769 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 804 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
770 } | 805 } |
771 buildCounterUrlChannels--; | 806 buildCounterUrlChannels--; |
772 } | 807 } |
773 | 808 |
774 buildUnnamed269() { | 809 buildUnnamed63() { |
775 var o = new core.List<core.String>(); | 810 var o = new core.List<core.String>(); |
776 o.add("foo"); | 811 o.add("foo"); |
777 o.add("foo"); | 812 o.add("foo"); |
778 return o; | 813 return o; |
779 } | 814 } |
780 | 815 |
781 checkUnnamed269(core.List<core.String> o) { | 816 checkUnnamed63(core.List<core.String> o) { |
782 unittest.expect(o, unittest.hasLength(2)); | 817 unittest.expect(o, unittest.hasLength(2)); |
783 unittest.expect(o[0], unittest.equals('foo')); | 818 unittest.expect(o[0], unittest.equals('foo')); |
784 unittest.expect(o[1], unittest.equals('foo')); | 819 unittest.expect(o[1], unittest.equals('foo')); |
785 } | 820 } |
786 | 821 |
787 buildUnnamed270() { | 822 buildUnnamed64() { |
788 var o = new core.List<core.String>(); | 823 var o = new core.List<core.String>(); |
789 o.add("foo"); | 824 o.add("foo"); |
790 o.add("foo"); | 825 o.add("foo"); |
791 return o; | 826 return o; |
792 } | 827 } |
793 | 828 |
794 checkUnnamed270(core.List<core.String> o) { | 829 checkUnnamed64(core.List<core.String> o) { |
795 unittest.expect(o, unittest.hasLength(2)); | 830 unittest.expect(o, unittest.hasLength(2)); |
796 unittest.expect(o[0], unittest.equals('foo')); | 831 unittest.expect(o[0], unittest.equals('foo')); |
797 unittest.expect(o[1], unittest.equals('foo')); | 832 unittest.expect(o[1], unittest.equals('foo')); |
798 } | 833 } |
799 | 834 |
800 buildUnnamed271() { | 835 buildUnnamed65() { |
801 var o = new core.List<core.String>(); | 836 var o = new core.List<core.String>(); |
802 o.add("foo"); | 837 o.add("foo"); |
803 o.add("foo"); | 838 o.add("foo"); |
804 return o; | 839 return o; |
805 } | 840 } |
806 | 841 |
807 checkUnnamed271(core.List<core.String> o) { | 842 checkUnnamed65(core.List<core.String> o) { |
808 unittest.expect(o, unittest.hasLength(2)); | 843 unittest.expect(o, unittest.hasLength(2)); |
809 unittest.expect(o[0], unittest.equals('foo')); | 844 unittest.expect(o[0], unittest.equals('foo')); |
810 unittest.expect(o[1], unittest.equals('foo')); | 845 unittest.expect(o[1], unittest.equals('foo')); |
811 } | 846 } |
812 | 847 |
813 buildUnnamed272() { | 848 buildUnnamed66() { |
814 var o = new core.List<core.String>(); | 849 var o = new core.List<core.String>(); |
815 o.add("foo"); | 850 o.add("foo"); |
816 o.add("foo"); | 851 o.add("foo"); |
817 return o; | 852 return o; |
818 } | 853 } |
819 | 854 |
820 checkUnnamed272(core.List<core.String> o) { | 855 checkUnnamed66(core.List<core.String> o) { |
821 unittest.expect(o, unittest.hasLength(2)); | 856 unittest.expect(o, unittest.hasLength(2)); |
822 unittest.expect(o[0], unittest.equals('foo')); | 857 unittest.expect(o[0], unittest.equals('foo')); |
823 unittest.expect(o[1], unittest.equals('foo')); | 858 unittest.expect(o[1], unittest.equals('foo')); |
824 } | 859 } |
825 | 860 |
826 | 861 |
827 main() { | 862 main() { |
828 unittest.group("obj-schema-Account", () { | 863 unittest.group("obj-schema-Account", () { |
829 unittest.test("to-json--from-json", () { | 864 unittest.test("to-json--from-json", () { |
830 var o = buildAccount(); | 865 var o = buildAccount(); |
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1001 var o = buildUrlChannels(); | 1036 var o = buildUrlChannels(); |
1002 var od = new api.UrlChannels.fromJson(o.toJson()); | 1037 var od = new api.UrlChannels.fromJson(o.toJson()); |
1003 checkUrlChannels(od); | 1038 checkUrlChannels(od); |
1004 }); | 1039 }); |
1005 }); | 1040 }); |
1006 | 1041 |
1007 | 1042 |
1008 unittest.group("resource-AccountsResourceApi", () { | 1043 unittest.group("resource-AccountsResourceApi", () { |
1009 unittest.test("method--get", () { | 1044 unittest.test("method--get", () { |
1010 | 1045 |
1011 var mock = new common_test.HttpServerMock(); | 1046 var mock = new HttpServerMock(); |
1012 api.AccountsResourceApi res = new api.AdexchangesellerApi(mock).accounts; | 1047 api.AccountsResourceApi res = new api.AdexchangesellerApi(mock).accounts; |
1013 var arg_accountId = "foo"; | 1048 var arg_accountId = "foo"; |
1014 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1049 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1015 var path = (req.url).path; | 1050 var path = (req.url).path; |
1016 var pathOffset = 0; | 1051 var pathOffset = 0; |
1017 var index; | 1052 var index; |
1018 var subPart; | 1053 var subPart; |
1019 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1054 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
1020 pathOffset += 1; | 1055 pathOffset += 1; |
1021 unittest.expect(path.substring(pathOffset, pathOffset + 22), unittest.eq
uals("adexchangeseller/v1.1/")); | 1056 unittest.expect(path.substring(pathOffset, pathOffset + 22), unittest.eq
uals("adexchangeseller/v1.1/")); |
(...skipping 19 matching lines...) Expand all Loading... |
1041 var keyvalue = part.split("="); | 1076 var keyvalue = part.split("="); |
1042 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1077 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
1043 } | 1078 } |
1044 } | 1079 } |
1045 | 1080 |
1046 | 1081 |
1047 var h = { | 1082 var h = { |
1048 "content-type" : "application/json; charset=utf-8", | 1083 "content-type" : "application/json; charset=utf-8", |
1049 }; | 1084 }; |
1050 var resp = convert.JSON.encode(buildAccount()); | 1085 var resp = convert.JSON.encode(buildAccount()); |
1051 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 1086 return new async.Future.value(stringResponse(200, h, resp)); |
1052 }), true); | 1087 }), true); |
1053 res.get(arg_accountId).then(unittest.expectAsync(((api.Account response) { | 1088 res.get(arg_accountId).then(unittest.expectAsync(((api.Account response) { |
1054 checkAccount(response); | 1089 checkAccount(response); |
1055 }))); | 1090 }))); |
1056 }); | 1091 }); |
1057 | 1092 |
1058 }); | 1093 }); |
1059 | 1094 |
1060 | 1095 |
1061 unittest.group("resource-AdclientsResourceApi", () { | 1096 unittest.group("resource-AdclientsResourceApi", () { |
1062 unittest.test("method--list", () { | 1097 unittest.test("method--list", () { |
1063 | 1098 |
1064 var mock = new common_test.HttpServerMock(); | 1099 var mock = new HttpServerMock(); |
1065 api.AdclientsResourceApi res = new api.AdexchangesellerApi(mock).adclients
; | 1100 api.AdclientsResourceApi res = new api.AdexchangesellerApi(mock).adclients
; |
1066 var arg_maxResults = 42; | 1101 var arg_maxResults = 42; |
1067 var arg_pageToken = "foo"; | 1102 var arg_pageToken = "foo"; |
1068 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1103 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1069 var path = (req.url).path; | 1104 var path = (req.url).path; |
1070 var pathOffset = 0; | 1105 var pathOffset = 0; |
1071 var index; | 1106 var index; |
1072 var subPart; | 1107 var subPart; |
1073 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1108 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
1074 pathOffset += 1; | 1109 pathOffset += 1; |
(...skipping 19 matching lines...) Expand all Loading... |
1094 } | 1129 } |
1095 } | 1130 } |
1096 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | 1131 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); |
1097 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 1132 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
1098 | 1133 |
1099 | 1134 |
1100 var h = { | 1135 var h = { |
1101 "content-type" : "application/json; charset=utf-8", | 1136 "content-type" : "application/json; charset=utf-8", |
1102 }; | 1137 }; |
1103 var resp = convert.JSON.encode(buildAdClients()); | 1138 var resp = convert.JSON.encode(buildAdClients()); |
1104 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 1139 return new async.Future.value(stringResponse(200, h, resp)); |
1105 }), true); | 1140 }), true); |
1106 res.list(maxResults: arg_maxResults, pageToken: arg_pageToken).then(unitte
st.expectAsync(((api.AdClients response) { | 1141 res.list(maxResults: arg_maxResults, pageToken: arg_pageToken).then(unitte
st.expectAsync(((api.AdClients response) { |
1107 checkAdClients(response); | 1142 checkAdClients(response); |
1108 }))); | 1143 }))); |
1109 }); | 1144 }); |
1110 | 1145 |
1111 }); | 1146 }); |
1112 | 1147 |
1113 | 1148 |
1114 unittest.group("resource-AdunitsResourceApi", () { | 1149 unittest.group("resource-AdunitsResourceApi", () { |
1115 unittest.test("method--get", () { | 1150 unittest.test("method--get", () { |
1116 | 1151 |
1117 var mock = new common_test.HttpServerMock(); | 1152 var mock = new HttpServerMock(); |
1118 api.AdunitsResourceApi res = new api.AdexchangesellerApi(mock).adunits; | 1153 api.AdunitsResourceApi res = new api.AdexchangesellerApi(mock).adunits; |
1119 var arg_adClientId = "foo"; | 1154 var arg_adClientId = "foo"; |
1120 var arg_adUnitId = "foo"; | 1155 var arg_adUnitId = "foo"; |
1121 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1156 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1122 var path = (req.url).path; | 1157 var path = (req.url).path; |
1123 var pathOffset = 0; | 1158 var pathOffset = 0; |
1124 var index; | 1159 var index; |
1125 var subPart; | 1160 var subPart; |
1126 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1161 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
1127 pathOffset += 1; | 1162 pathOffset += 1; |
(...skipping 27 matching lines...) Expand all Loading... |
1155 var keyvalue = part.split("="); | 1190 var keyvalue = part.split("="); |
1156 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1191 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
1157 } | 1192 } |
1158 } | 1193 } |
1159 | 1194 |
1160 | 1195 |
1161 var h = { | 1196 var h = { |
1162 "content-type" : "application/json; charset=utf-8", | 1197 "content-type" : "application/json; charset=utf-8", |
1163 }; | 1198 }; |
1164 var resp = convert.JSON.encode(buildAdUnit()); | 1199 var resp = convert.JSON.encode(buildAdUnit()); |
1165 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 1200 return new async.Future.value(stringResponse(200, h, resp)); |
1166 }), true); | 1201 }), true); |
1167 res.get(arg_adClientId, arg_adUnitId).then(unittest.expectAsync(((api.AdUn
it response) { | 1202 res.get(arg_adClientId, arg_adUnitId).then(unittest.expectAsync(((api.AdUn
it response) { |
1168 checkAdUnit(response); | 1203 checkAdUnit(response); |
1169 }))); | 1204 }))); |
1170 }); | 1205 }); |
1171 | 1206 |
1172 unittest.test("method--list", () { | 1207 unittest.test("method--list", () { |
1173 | 1208 |
1174 var mock = new common_test.HttpServerMock(); | 1209 var mock = new HttpServerMock(); |
1175 api.AdunitsResourceApi res = new api.AdexchangesellerApi(mock).adunits; | 1210 api.AdunitsResourceApi res = new api.AdexchangesellerApi(mock).adunits; |
1176 var arg_adClientId = "foo"; | 1211 var arg_adClientId = "foo"; |
1177 var arg_includeInactive = true; | 1212 var arg_includeInactive = true; |
1178 var arg_maxResults = 42; | 1213 var arg_maxResults = 42; |
1179 var arg_pageToken = "foo"; | 1214 var arg_pageToken = "foo"; |
1180 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1215 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1181 var path = (req.url).path; | 1216 var path = (req.url).path; |
1182 var pathOffset = 0; | 1217 var pathOffset = 0; |
1183 var index; | 1218 var index; |
1184 var subPart; | 1219 var subPart; |
(...skipping 29 matching lines...) Expand all Loading... |
1214 } | 1249 } |
1215 unittest.expect(queryMap["includeInactive"].first, unittest.equals("$arg
_includeInactive")); | 1250 unittest.expect(queryMap["includeInactive"].first, unittest.equals("$arg
_includeInactive")); |
1216 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | 1251 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); |
1217 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 1252 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
1218 | 1253 |
1219 | 1254 |
1220 var h = { | 1255 var h = { |
1221 "content-type" : "application/json; charset=utf-8", | 1256 "content-type" : "application/json; charset=utf-8", |
1222 }; | 1257 }; |
1223 var resp = convert.JSON.encode(buildAdUnits()); | 1258 var resp = convert.JSON.encode(buildAdUnits()); |
1224 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 1259 return new async.Future.value(stringResponse(200, h, resp)); |
1225 }), true); | 1260 }), true); |
1226 res.list(arg_adClientId, includeInactive: arg_includeInactive, maxResults:
arg_maxResults, pageToken: arg_pageToken).then(unittest.expectAsync(((api.AdUni
ts response) { | 1261 res.list(arg_adClientId, includeInactive: arg_includeInactive, maxResults:
arg_maxResults, pageToken: arg_pageToken).then(unittest.expectAsync(((api.AdUni
ts response) { |
1227 checkAdUnits(response); | 1262 checkAdUnits(response); |
1228 }))); | 1263 }))); |
1229 }); | 1264 }); |
1230 | 1265 |
1231 }); | 1266 }); |
1232 | 1267 |
1233 | 1268 |
1234 unittest.group("resource-AdunitsCustomchannelsResourceApi", () { | 1269 unittest.group("resource-AdunitsCustomchannelsResourceApi", () { |
1235 unittest.test("method--list", () { | 1270 unittest.test("method--list", () { |
1236 | 1271 |
1237 var mock = new common_test.HttpServerMock(); | 1272 var mock = new HttpServerMock(); |
1238 api.AdunitsCustomchannelsResourceApi res = new api.AdexchangesellerApi(moc
k).adunits.customchannels; | 1273 api.AdunitsCustomchannelsResourceApi res = new api.AdexchangesellerApi(moc
k).adunits.customchannels; |
1239 var arg_adClientId = "foo"; | 1274 var arg_adClientId = "foo"; |
1240 var arg_adUnitId = "foo"; | 1275 var arg_adUnitId = "foo"; |
1241 var arg_maxResults = 42; | 1276 var arg_maxResults = 42; |
1242 var arg_pageToken = "foo"; | 1277 var arg_pageToken = "foo"; |
1243 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1278 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1244 var path = (req.url).path; | 1279 var path = (req.url).path; |
1245 var pathOffset = 0; | 1280 var pathOffset = 0; |
1246 var index; | 1281 var index; |
1247 var subPart; | 1282 var subPart; |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1283 } | 1318 } |
1284 } | 1319 } |
1285 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | 1320 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); |
1286 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 1321 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
1287 | 1322 |
1288 | 1323 |
1289 var h = { | 1324 var h = { |
1290 "content-type" : "application/json; charset=utf-8", | 1325 "content-type" : "application/json; charset=utf-8", |
1291 }; | 1326 }; |
1292 var resp = convert.JSON.encode(buildCustomChannels()); | 1327 var resp = convert.JSON.encode(buildCustomChannels()); |
1293 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 1328 return new async.Future.value(stringResponse(200, h, resp)); |
1294 }), true); | 1329 }), true); |
1295 res.list(arg_adClientId, arg_adUnitId, maxResults: arg_maxResults, pageTok
en: arg_pageToken).then(unittest.expectAsync(((api.CustomChannels response) { | 1330 res.list(arg_adClientId, arg_adUnitId, maxResults: arg_maxResults, pageTok
en: arg_pageToken).then(unittest.expectAsync(((api.CustomChannels response) { |
1296 checkCustomChannels(response); | 1331 checkCustomChannels(response); |
1297 }))); | 1332 }))); |
1298 }); | 1333 }); |
1299 | 1334 |
1300 }); | 1335 }); |
1301 | 1336 |
1302 | 1337 |
1303 unittest.group("resource-AlertsResourceApi", () { | 1338 unittest.group("resource-AlertsResourceApi", () { |
1304 unittest.test("method--list", () { | 1339 unittest.test("method--list", () { |
1305 | 1340 |
1306 var mock = new common_test.HttpServerMock(); | 1341 var mock = new HttpServerMock(); |
1307 api.AlertsResourceApi res = new api.AdexchangesellerApi(mock).alerts; | 1342 api.AlertsResourceApi res = new api.AdexchangesellerApi(mock).alerts; |
1308 var arg_locale = "foo"; | 1343 var arg_locale = "foo"; |
1309 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1344 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1310 var path = (req.url).path; | 1345 var path = (req.url).path; |
1311 var pathOffset = 0; | 1346 var pathOffset = 0; |
1312 var index; | 1347 var index; |
1313 var subPart; | 1348 var subPart; |
1314 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1349 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
1315 pathOffset += 1; | 1350 pathOffset += 1; |
1316 unittest.expect(path.substring(pathOffset, pathOffset + 22), unittest.eq
uals("adexchangeseller/v1.1/")); | 1351 unittest.expect(path.substring(pathOffset, pathOffset + 22), unittest.eq
uals("adexchangeseller/v1.1/")); |
(...skipping 17 matching lines...) Expand all Loading... |
1334 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1369 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
1335 } | 1370 } |
1336 } | 1371 } |
1337 unittest.expect(queryMap["locale"].first, unittest.equals(arg_locale)); | 1372 unittest.expect(queryMap["locale"].first, unittest.equals(arg_locale)); |
1338 | 1373 |
1339 | 1374 |
1340 var h = { | 1375 var h = { |
1341 "content-type" : "application/json; charset=utf-8", | 1376 "content-type" : "application/json; charset=utf-8", |
1342 }; | 1377 }; |
1343 var resp = convert.JSON.encode(buildAlerts()); | 1378 var resp = convert.JSON.encode(buildAlerts()); |
1344 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 1379 return new async.Future.value(stringResponse(200, h, resp)); |
1345 }), true); | 1380 }), true); |
1346 res.list(locale: arg_locale).then(unittest.expectAsync(((api.Alerts respon
se) { | 1381 res.list(locale: arg_locale).then(unittest.expectAsync(((api.Alerts respon
se) { |
1347 checkAlerts(response); | 1382 checkAlerts(response); |
1348 }))); | 1383 }))); |
1349 }); | 1384 }); |
1350 | 1385 |
1351 }); | 1386 }); |
1352 | 1387 |
1353 | 1388 |
1354 unittest.group("resource-CustomchannelsResourceApi", () { | 1389 unittest.group("resource-CustomchannelsResourceApi", () { |
1355 unittest.test("method--get", () { | 1390 unittest.test("method--get", () { |
1356 | 1391 |
1357 var mock = new common_test.HttpServerMock(); | 1392 var mock = new HttpServerMock(); |
1358 api.CustomchannelsResourceApi res = new api.AdexchangesellerApi(mock).cust
omchannels; | 1393 api.CustomchannelsResourceApi res = new api.AdexchangesellerApi(mock).cust
omchannels; |
1359 var arg_adClientId = "foo"; | 1394 var arg_adClientId = "foo"; |
1360 var arg_customChannelId = "foo"; | 1395 var arg_customChannelId = "foo"; |
1361 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1396 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1362 var path = (req.url).path; | 1397 var path = (req.url).path; |
1363 var pathOffset = 0; | 1398 var pathOffset = 0; |
1364 var index; | 1399 var index; |
1365 var subPart; | 1400 var subPart; |
1366 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1401 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
1367 pathOffset += 1; | 1402 pathOffset += 1; |
(...skipping 27 matching lines...) Expand all Loading... |
1395 var keyvalue = part.split("="); | 1430 var keyvalue = part.split("="); |
1396 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1431 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
1397 } | 1432 } |
1398 } | 1433 } |
1399 | 1434 |
1400 | 1435 |
1401 var h = { | 1436 var h = { |
1402 "content-type" : "application/json; charset=utf-8", | 1437 "content-type" : "application/json; charset=utf-8", |
1403 }; | 1438 }; |
1404 var resp = convert.JSON.encode(buildCustomChannel()); | 1439 var resp = convert.JSON.encode(buildCustomChannel()); |
1405 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 1440 return new async.Future.value(stringResponse(200, h, resp)); |
1406 }), true); | 1441 }), true); |
1407 res.get(arg_adClientId, arg_customChannelId).then(unittest.expectAsync(((a
pi.CustomChannel response) { | 1442 res.get(arg_adClientId, arg_customChannelId).then(unittest.expectAsync(((a
pi.CustomChannel response) { |
1408 checkCustomChannel(response); | 1443 checkCustomChannel(response); |
1409 }))); | 1444 }))); |
1410 }); | 1445 }); |
1411 | 1446 |
1412 unittest.test("method--list", () { | 1447 unittest.test("method--list", () { |
1413 | 1448 |
1414 var mock = new common_test.HttpServerMock(); | 1449 var mock = new HttpServerMock(); |
1415 api.CustomchannelsResourceApi res = new api.AdexchangesellerApi(mock).cust
omchannels; | 1450 api.CustomchannelsResourceApi res = new api.AdexchangesellerApi(mock).cust
omchannels; |
1416 var arg_adClientId = "foo"; | 1451 var arg_adClientId = "foo"; |
1417 var arg_maxResults = 42; | 1452 var arg_maxResults = 42; |
1418 var arg_pageToken = "foo"; | 1453 var arg_pageToken = "foo"; |
1419 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1454 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1420 var path = (req.url).path; | 1455 var path = (req.url).path; |
1421 var pathOffset = 0; | 1456 var pathOffset = 0; |
1422 var index; | 1457 var index; |
1423 var subPart; | 1458 var subPart; |
1424 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1459 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
(...skipping 27 matching lines...) Expand all Loading... |
1452 } | 1487 } |
1453 } | 1488 } |
1454 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | 1489 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); |
1455 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 1490 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
1456 | 1491 |
1457 | 1492 |
1458 var h = { | 1493 var h = { |
1459 "content-type" : "application/json; charset=utf-8", | 1494 "content-type" : "application/json; charset=utf-8", |
1460 }; | 1495 }; |
1461 var resp = convert.JSON.encode(buildCustomChannels()); | 1496 var resp = convert.JSON.encode(buildCustomChannels()); |
1462 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 1497 return new async.Future.value(stringResponse(200, h, resp)); |
1463 }), true); | 1498 }), true); |
1464 res.list(arg_adClientId, maxResults: arg_maxResults, pageToken: arg_pageTo
ken).then(unittest.expectAsync(((api.CustomChannels response) { | 1499 res.list(arg_adClientId, maxResults: arg_maxResults, pageToken: arg_pageTo
ken).then(unittest.expectAsync(((api.CustomChannels response) { |
1465 checkCustomChannels(response); | 1500 checkCustomChannels(response); |
1466 }))); | 1501 }))); |
1467 }); | 1502 }); |
1468 | 1503 |
1469 }); | 1504 }); |
1470 | 1505 |
1471 | 1506 |
1472 unittest.group("resource-CustomchannelsAdunitsResourceApi", () { | 1507 unittest.group("resource-CustomchannelsAdunitsResourceApi", () { |
1473 unittest.test("method--list", () { | 1508 unittest.test("method--list", () { |
1474 | 1509 |
1475 var mock = new common_test.HttpServerMock(); | 1510 var mock = new HttpServerMock(); |
1476 api.CustomchannelsAdunitsResourceApi res = new api.AdexchangesellerApi(moc
k).customchannels.adunits; | 1511 api.CustomchannelsAdunitsResourceApi res = new api.AdexchangesellerApi(moc
k).customchannels.adunits; |
1477 var arg_adClientId = "foo"; | 1512 var arg_adClientId = "foo"; |
1478 var arg_customChannelId = "foo"; | 1513 var arg_customChannelId = "foo"; |
1479 var arg_includeInactive = true; | 1514 var arg_includeInactive = true; |
1480 var arg_maxResults = 42; | 1515 var arg_maxResults = 42; |
1481 var arg_pageToken = "foo"; | 1516 var arg_pageToken = "foo"; |
1482 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1517 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1483 var path = (req.url).path; | 1518 var path = (req.url).path; |
1484 var pathOffset = 0; | 1519 var pathOffset = 0; |
1485 var index; | 1520 var index; |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1523 } | 1558 } |
1524 unittest.expect(queryMap["includeInactive"].first, unittest.equals("$arg
_includeInactive")); | 1559 unittest.expect(queryMap["includeInactive"].first, unittest.equals("$arg
_includeInactive")); |
1525 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | 1560 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); |
1526 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 1561 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
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(buildAdUnits()); | 1567 var resp = convert.JSON.encode(buildAdUnits()); |
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.list(arg_adClientId, arg_customChannelId, includeInactive: arg_include
Inactive, maxResults: arg_maxResults, pageToken: arg_pageToken).then(unittest.ex
pectAsync(((api.AdUnits response) { | 1570 res.list(arg_adClientId, arg_customChannelId, includeInactive: arg_include
Inactive, maxResults: arg_maxResults, pageToken: arg_pageToken).then(unittest.ex
pectAsync(((api.AdUnits response) { |
1536 checkAdUnits(response); | 1571 checkAdUnits(response); |
1537 }))); | 1572 }))); |
1538 }); | 1573 }); |
1539 | 1574 |
1540 }); | 1575 }); |
1541 | 1576 |
1542 | 1577 |
1543 unittest.group("resource-MetadataDimensionsResourceApi", () { | 1578 unittest.group("resource-MetadataDimensionsResourceApi", () { |
1544 unittest.test("method--list", () { | 1579 unittest.test("method--list", () { |
1545 | 1580 |
1546 var mock = new common_test.HttpServerMock(); | 1581 var mock = new HttpServerMock(); |
1547 api.MetadataDimensionsResourceApi res = new api.AdexchangesellerApi(mock).
metadata.dimensions; | 1582 api.MetadataDimensionsResourceApi res = new api.AdexchangesellerApi(mock).
metadata.dimensions; |
1548 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1583 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1549 var path = (req.url).path; | 1584 var path = (req.url).path; |
1550 var pathOffset = 0; | 1585 var pathOffset = 0; |
1551 var index; | 1586 var index; |
1552 var subPart; | 1587 var subPart; |
1553 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1588 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
1554 pathOffset += 1; | 1589 pathOffset += 1; |
1555 unittest.expect(path.substring(pathOffset, pathOffset + 22), unittest.eq
uals("adexchangeseller/v1.1/")); | 1590 unittest.expect(path.substring(pathOffset, pathOffset + 22), unittest.eq
uals("adexchangeseller/v1.1/")); |
1556 pathOffset += 22; | 1591 pathOffset += 22; |
(...skipping 15 matching lines...) Expand all Loading... |
1572 var keyvalue = part.split("="); | 1607 var keyvalue = part.split("="); |
1573 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1608 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
1574 } | 1609 } |
1575 } | 1610 } |
1576 | 1611 |
1577 | 1612 |
1578 var h = { | 1613 var h = { |
1579 "content-type" : "application/json; charset=utf-8", | 1614 "content-type" : "application/json; charset=utf-8", |
1580 }; | 1615 }; |
1581 var resp = convert.JSON.encode(buildMetadata()); | 1616 var resp = convert.JSON.encode(buildMetadata()); |
1582 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 1617 return new async.Future.value(stringResponse(200, h, resp)); |
1583 }), true); | 1618 }), true); |
1584 res.list().then(unittest.expectAsync(((api.Metadata response) { | 1619 res.list().then(unittest.expectAsync(((api.Metadata response) { |
1585 checkMetadata(response); | 1620 checkMetadata(response); |
1586 }))); | 1621 }))); |
1587 }); | 1622 }); |
1588 | 1623 |
1589 }); | 1624 }); |
1590 | 1625 |
1591 | 1626 |
1592 unittest.group("resource-MetadataMetricsResourceApi", () { | 1627 unittest.group("resource-MetadataMetricsResourceApi", () { |
1593 unittest.test("method--list", () { | 1628 unittest.test("method--list", () { |
1594 | 1629 |
1595 var mock = new common_test.HttpServerMock(); | 1630 var mock = new HttpServerMock(); |
1596 api.MetadataMetricsResourceApi res = new api.AdexchangesellerApi(mock).met
adata.metrics; | 1631 api.MetadataMetricsResourceApi res = new api.AdexchangesellerApi(mock).met
adata.metrics; |
1597 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1632 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1598 var path = (req.url).path; | 1633 var path = (req.url).path; |
1599 var pathOffset = 0; | 1634 var pathOffset = 0; |
1600 var index; | 1635 var index; |
1601 var subPart; | 1636 var subPart; |
1602 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1637 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
1603 pathOffset += 1; | 1638 pathOffset += 1; |
1604 unittest.expect(path.substring(pathOffset, pathOffset + 22), unittest.eq
uals("adexchangeseller/v1.1/")); | 1639 unittest.expect(path.substring(pathOffset, pathOffset + 22), unittest.eq
uals("adexchangeseller/v1.1/")); |
1605 pathOffset += 22; | 1640 pathOffset += 22; |
(...skipping 15 matching lines...) Expand all Loading... |
1621 var keyvalue = part.split("="); | 1656 var keyvalue = part.split("="); |
1622 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1657 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
1623 } | 1658 } |
1624 } | 1659 } |
1625 | 1660 |
1626 | 1661 |
1627 var h = { | 1662 var h = { |
1628 "content-type" : "application/json; charset=utf-8", | 1663 "content-type" : "application/json; charset=utf-8", |
1629 }; | 1664 }; |
1630 var resp = convert.JSON.encode(buildMetadata()); | 1665 var resp = convert.JSON.encode(buildMetadata()); |
1631 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 1666 return new async.Future.value(stringResponse(200, h, resp)); |
1632 }), true); | 1667 }), true); |
1633 res.list().then(unittest.expectAsync(((api.Metadata response) { | 1668 res.list().then(unittest.expectAsync(((api.Metadata response) { |
1634 checkMetadata(response); | 1669 checkMetadata(response); |
1635 }))); | 1670 }))); |
1636 }); | 1671 }); |
1637 | 1672 |
1638 }); | 1673 }); |
1639 | 1674 |
1640 | 1675 |
1641 unittest.group("resource-PreferreddealsResourceApi", () { | 1676 unittest.group("resource-PreferreddealsResourceApi", () { |
1642 unittest.test("method--get", () { | 1677 unittest.test("method--get", () { |
1643 | 1678 |
1644 var mock = new common_test.HttpServerMock(); | 1679 var mock = new HttpServerMock(); |
1645 api.PreferreddealsResourceApi res = new api.AdexchangesellerApi(mock).pref
erreddeals; | 1680 api.PreferreddealsResourceApi res = new api.AdexchangesellerApi(mock).pref
erreddeals; |
1646 var arg_dealId = "foo"; | 1681 var arg_dealId = "foo"; |
1647 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1682 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1648 var path = (req.url).path; | 1683 var path = (req.url).path; |
1649 var pathOffset = 0; | 1684 var pathOffset = 0; |
1650 var index; | 1685 var index; |
1651 var subPart; | 1686 var subPart; |
1652 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1687 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
1653 pathOffset += 1; | 1688 pathOffset += 1; |
1654 unittest.expect(path.substring(pathOffset, pathOffset + 22), unittest.eq
uals("adexchangeseller/v1.1/")); | 1689 unittest.expect(path.substring(pathOffset, pathOffset + 22), unittest.eq
uals("adexchangeseller/v1.1/")); |
(...skipping 19 matching lines...) Expand all Loading... |
1674 var keyvalue = part.split("="); | 1709 var keyvalue = part.split("="); |
1675 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1710 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
1676 } | 1711 } |
1677 } | 1712 } |
1678 | 1713 |
1679 | 1714 |
1680 var h = { | 1715 var h = { |
1681 "content-type" : "application/json; charset=utf-8", | 1716 "content-type" : "application/json; charset=utf-8", |
1682 }; | 1717 }; |
1683 var resp = convert.JSON.encode(buildPreferredDeal()); | 1718 var resp = convert.JSON.encode(buildPreferredDeal()); |
1684 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 1719 return new async.Future.value(stringResponse(200, h, resp)); |
1685 }), true); | 1720 }), true); |
1686 res.get(arg_dealId).then(unittest.expectAsync(((api.PreferredDeal response
) { | 1721 res.get(arg_dealId).then(unittest.expectAsync(((api.PreferredDeal response
) { |
1687 checkPreferredDeal(response); | 1722 checkPreferredDeal(response); |
1688 }))); | 1723 }))); |
1689 }); | 1724 }); |
1690 | 1725 |
1691 unittest.test("method--list", () { | 1726 unittest.test("method--list", () { |
1692 | 1727 |
1693 var mock = new common_test.HttpServerMock(); | 1728 var mock = new HttpServerMock(); |
1694 api.PreferreddealsResourceApi res = new api.AdexchangesellerApi(mock).pref
erreddeals; | 1729 api.PreferreddealsResourceApi res = new api.AdexchangesellerApi(mock).pref
erreddeals; |
1695 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1730 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1696 var path = (req.url).path; | 1731 var path = (req.url).path; |
1697 var pathOffset = 0; | 1732 var pathOffset = 0; |
1698 var index; | 1733 var index; |
1699 var subPart; | 1734 var subPart; |
1700 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1735 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
1701 pathOffset += 1; | 1736 pathOffset += 1; |
1702 unittest.expect(path.substring(pathOffset, pathOffset + 22), unittest.eq
uals("adexchangeseller/v1.1/")); | 1737 unittest.expect(path.substring(pathOffset, pathOffset + 22), unittest.eq
uals("adexchangeseller/v1.1/")); |
1703 pathOffset += 22; | 1738 pathOffset += 22; |
(...skipping 15 matching lines...) Expand all Loading... |
1719 var keyvalue = part.split("="); | 1754 var keyvalue = part.split("="); |
1720 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1755 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
1721 } | 1756 } |
1722 } | 1757 } |
1723 | 1758 |
1724 | 1759 |
1725 var h = { | 1760 var h = { |
1726 "content-type" : "application/json; charset=utf-8", | 1761 "content-type" : "application/json; charset=utf-8", |
1727 }; | 1762 }; |
1728 var resp = convert.JSON.encode(buildPreferredDeals()); | 1763 var resp = convert.JSON.encode(buildPreferredDeals()); |
1729 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 1764 return new async.Future.value(stringResponse(200, h, resp)); |
1730 }), true); | 1765 }), true); |
1731 res.list().then(unittest.expectAsync(((api.PreferredDeals response) { | 1766 res.list().then(unittest.expectAsync(((api.PreferredDeals response) { |
1732 checkPreferredDeals(response); | 1767 checkPreferredDeals(response); |
1733 }))); | 1768 }))); |
1734 }); | 1769 }); |
1735 | 1770 |
1736 }); | 1771 }); |
1737 | 1772 |
1738 | 1773 |
1739 unittest.group("resource-ReportsResourceApi", () { | 1774 unittest.group("resource-ReportsResourceApi", () { |
1740 unittest.test("method--generate", () { | 1775 unittest.test("method--generate", () { |
1741 // TODO: Implement tests for media upload; | 1776 // TODO: Implement tests for media upload; |
1742 // TODO: Implement tests for media download; | 1777 // TODO: Implement tests for media download; |
1743 | 1778 |
1744 var mock = new common_test.HttpServerMock(); | 1779 var mock = new HttpServerMock(); |
1745 api.ReportsResourceApi res = new api.AdexchangesellerApi(mock).reports; | 1780 api.ReportsResourceApi res = new api.AdexchangesellerApi(mock).reports; |
1746 var arg_startDate = "foo"; | 1781 var arg_startDate = "foo"; |
1747 var arg_endDate = "foo"; | 1782 var arg_endDate = "foo"; |
1748 var arg_dimension = buildUnnamed269(); | 1783 var arg_dimension = buildUnnamed63(); |
1749 var arg_filter = buildUnnamed270(); | 1784 var arg_filter = buildUnnamed64(); |
1750 var arg_locale = "foo"; | 1785 var arg_locale = "foo"; |
1751 var arg_maxResults = 42; | 1786 var arg_maxResults = 42; |
1752 var arg_metric = buildUnnamed271(); | 1787 var arg_metric = buildUnnamed65(); |
1753 var arg_sort = buildUnnamed272(); | 1788 var arg_sort = buildUnnamed66(); |
1754 var arg_startIndex = 42; | 1789 var arg_startIndex = 42; |
1755 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1790 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1756 var path = (req.url).path; | 1791 var path = (req.url).path; |
1757 var pathOffset = 0; | 1792 var pathOffset = 0; |
1758 var index; | 1793 var index; |
1759 var subPart; | 1794 var subPart; |
1760 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1795 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
1761 pathOffset += 1; | 1796 pathOffset += 1; |
1762 unittest.expect(path.substring(pathOffset, pathOffset + 22), unittest.eq
uals("adexchangeseller/v1.1/")); | 1797 unittest.expect(path.substring(pathOffset, pathOffset + 22), unittest.eq
uals("adexchangeseller/v1.1/")); |
1763 pathOffset += 22; | 1798 pathOffset += 22; |
(...skipping 24 matching lines...) Expand all Loading... |
1788 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | 1823 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); |
1789 unittest.expect(queryMap["metric"], unittest.equals(arg_metric)); | 1824 unittest.expect(queryMap["metric"], unittest.equals(arg_metric)); |
1790 unittest.expect(queryMap["sort"], unittest.equals(arg_sort)); | 1825 unittest.expect(queryMap["sort"], unittest.equals(arg_sort)); |
1791 unittest.expect(core.int.parse(queryMap["startIndex"].first), unittest.e
quals(arg_startIndex)); | 1826 unittest.expect(core.int.parse(queryMap["startIndex"].first), unittest.e
quals(arg_startIndex)); |
1792 | 1827 |
1793 | 1828 |
1794 var h = { | 1829 var h = { |
1795 "content-type" : "application/json; charset=utf-8", | 1830 "content-type" : "application/json; charset=utf-8", |
1796 }; | 1831 }; |
1797 var resp = convert.JSON.encode(buildReport()); | 1832 var resp = convert.JSON.encode(buildReport()); |
1798 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 1833 return new async.Future.value(stringResponse(200, h, resp)); |
1799 }), true); | 1834 }), true); |
1800 res.generate(arg_startDate, arg_endDate, dimension: arg_dimension, filter:
arg_filter, locale: arg_locale, maxResults: arg_maxResults, metric: arg_metric,
sort: arg_sort, startIndex: arg_startIndex).then(unittest.expectAsync(((api.Rep
ort response) { | 1835 res.generate(arg_startDate, arg_endDate, dimension: arg_dimension, filter:
arg_filter, locale: arg_locale, maxResults: arg_maxResults, metric: arg_metric,
sort: arg_sort, startIndex: arg_startIndex).then(unittest.expectAsync(((api.Rep
ort response) { |
1801 checkReport(response); | 1836 checkReport(response); |
1802 }))); | 1837 }))); |
1803 }); | 1838 }); |
1804 | 1839 |
1805 }); | 1840 }); |
1806 | 1841 |
1807 | 1842 |
1808 unittest.group("resource-ReportsSavedResourceApi", () { | 1843 unittest.group("resource-ReportsSavedResourceApi", () { |
1809 unittest.test("method--generate", () { | 1844 unittest.test("method--generate", () { |
1810 | 1845 |
1811 var mock = new common_test.HttpServerMock(); | 1846 var mock = new HttpServerMock(); |
1812 api.ReportsSavedResourceApi res = new api.AdexchangesellerApi(mock).report
s.saved; | 1847 api.ReportsSavedResourceApi res = new api.AdexchangesellerApi(mock).report
s.saved; |
1813 var arg_savedReportId = "foo"; | 1848 var arg_savedReportId = "foo"; |
1814 var arg_locale = "foo"; | 1849 var arg_locale = "foo"; |
1815 var arg_maxResults = 42; | 1850 var arg_maxResults = 42; |
1816 var arg_startIndex = 42; | 1851 var arg_startIndex = 42; |
1817 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1852 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1818 var path = (req.url).path; | 1853 var path = (req.url).path; |
1819 var pathOffset = 0; | 1854 var pathOffset = 0; |
1820 var index; | 1855 var index; |
1821 var subPart; | 1856 var subPart; |
(...skipping 25 matching lines...) Expand all Loading... |
1847 } | 1882 } |
1848 unittest.expect(queryMap["locale"].first, unittest.equals(arg_locale)); | 1883 unittest.expect(queryMap["locale"].first, unittest.equals(arg_locale)); |
1849 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | 1884 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); |
1850 unittest.expect(core.int.parse(queryMap["startIndex"].first), unittest.e
quals(arg_startIndex)); | 1885 unittest.expect(core.int.parse(queryMap["startIndex"].first), unittest.e
quals(arg_startIndex)); |
1851 | 1886 |
1852 | 1887 |
1853 var h = { | 1888 var h = { |
1854 "content-type" : "application/json; charset=utf-8", | 1889 "content-type" : "application/json; charset=utf-8", |
1855 }; | 1890 }; |
1856 var resp = convert.JSON.encode(buildReport()); | 1891 var resp = convert.JSON.encode(buildReport()); |
1857 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 1892 return new async.Future.value(stringResponse(200, h, resp)); |
1858 }), true); | 1893 }), true); |
1859 res.generate(arg_savedReportId, locale: arg_locale, maxResults: arg_maxRes
ults, startIndex: arg_startIndex).then(unittest.expectAsync(((api.Report respons
e) { | 1894 res.generate(arg_savedReportId, locale: arg_locale, maxResults: arg_maxRes
ults, startIndex: arg_startIndex).then(unittest.expectAsync(((api.Report respons
e) { |
1860 checkReport(response); | 1895 checkReport(response); |
1861 }))); | 1896 }))); |
1862 }); | 1897 }); |
1863 | 1898 |
1864 unittest.test("method--list", () { | 1899 unittest.test("method--list", () { |
1865 | 1900 |
1866 var mock = new common_test.HttpServerMock(); | 1901 var mock = new HttpServerMock(); |
1867 api.ReportsSavedResourceApi res = new api.AdexchangesellerApi(mock).report
s.saved; | 1902 api.ReportsSavedResourceApi res = new api.AdexchangesellerApi(mock).report
s.saved; |
1868 var arg_maxResults = 42; | 1903 var arg_maxResults = 42; |
1869 var arg_pageToken = "foo"; | 1904 var arg_pageToken = "foo"; |
1870 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1905 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1871 var path = (req.url).path; | 1906 var path = (req.url).path; |
1872 var pathOffset = 0; | 1907 var pathOffset = 0; |
1873 var index; | 1908 var index; |
1874 var subPart; | 1909 var subPart; |
1875 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1910 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
1876 pathOffset += 1; | 1911 pathOffset += 1; |
(...skipping 19 matching lines...) Expand all Loading... |
1896 } | 1931 } |
1897 } | 1932 } |
1898 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | 1933 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); |
1899 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 1934 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
1900 | 1935 |
1901 | 1936 |
1902 var h = { | 1937 var h = { |
1903 "content-type" : "application/json; charset=utf-8", | 1938 "content-type" : "application/json; charset=utf-8", |
1904 }; | 1939 }; |
1905 var resp = convert.JSON.encode(buildSavedReports()); | 1940 var resp = convert.JSON.encode(buildSavedReports()); |
1906 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 1941 return new async.Future.value(stringResponse(200, h, resp)); |
1907 }), true); | 1942 }), true); |
1908 res.list(maxResults: arg_maxResults, pageToken: arg_pageToken).then(unitte
st.expectAsync(((api.SavedReports response) { | 1943 res.list(maxResults: arg_maxResults, pageToken: arg_pageToken).then(unitte
st.expectAsync(((api.SavedReports response) { |
1909 checkSavedReports(response); | 1944 checkSavedReports(response); |
1910 }))); | 1945 }))); |
1911 }); | 1946 }); |
1912 | 1947 |
1913 }); | 1948 }); |
1914 | 1949 |
1915 | 1950 |
1916 unittest.group("resource-UrlchannelsResourceApi", () { | 1951 unittest.group("resource-UrlchannelsResourceApi", () { |
1917 unittest.test("method--list", () { | 1952 unittest.test("method--list", () { |
1918 | 1953 |
1919 var mock = new common_test.HttpServerMock(); | 1954 var mock = new HttpServerMock(); |
1920 api.UrlchannelsResourceApi res = new api.AdexchangesellerApi(mock).urlchan
nels; | 1955 api.UrlchannelsResourceApi res = new api.AdexchangesellerApi(mock).urlchan
nels; |
1921 var arg_adClientId = "foo"; | 1956 var arg_adClientId = "foo"; |
1922 var arg_maxResults = 42; | 1957 var arg_maxResults = 42; |
1923 var arg_pageToken = "foo"; | 1958 var arg_pageToken = "foo"; |
1924 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1959 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1925 var path = (req.url).path; | 1960 var path = (req.url).path; |
1926 var pathOffset = 0; | 1961 var pathOffset = 0; |
1927 var index; | 1962 var index; |
1928 var subPart; | 1963 var subPart; |
1929 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1964 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
(...skipping 27 matching lines...) Expand all Loading... |
1957 } | 1992 } |
1958 } | 1993 } |
1959 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | 1994 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); |
1960 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 1995 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
1961 | 1996 |
1962 | 1997 |
1963 var h = { | 1998 var h = { |
1964 "content-type" : "application/json; charset=utf-8", | 1999 "content-type" : "application/json; charset=utf-8", |
1965 }; | 2000 }; |
1966 var resp = convert.JSON.encode(buildUrlChannels()); | 2001 var resp = convert.JSON.encode(buildUrlChannels()); |
1967 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2002 return new async.Future.value(stringResponse(200, h, resp)); |
1968 }), true); | 2003 }), true); |
1969 res.list(arg_adClientId, maxResults: arg_maxResults, pageToken: arg_pageTo
ken).then(unittest.expectAsync(((api.UrlChannels response) { | 2004 res.list(arg_adClientId, maxResults: arg_maxResults, pageToken: arg_pageTo
ken).then(unittest.expectAsync(((api.UrlChannels response) { |
1970 checkUrlChannels(response); | 2005 checkUrlChannels(response); |
1971 }))); | 2006 }))); |
1972 }); | 2007 }); |
1973 | 2008 |
1974 }); | 2009 }); |
1975 | 2010 |
1976 | 2011 |
1977 } | 2012 } |
1978 | 2013 |
OLD | NEW |