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

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

Issue 1078053002: Roll of googleapis as of 4/7/2015. (Closed) Base URL: https://github.com/dart-lang/googleapis.git@master
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 library googleapis.doubleclicksearch.v2.test; 1 library googleapis.doubleclicksearch.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/doubleclicksearch/v2.dart' as api; 12 import 'package:googleapis/doubleclicksearch/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 }
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 buildCounterAvailability = 0; 54 core.int buildCounterAvailability = 0;
20 buildAvailability() { 55 buildAvailability() {
21 var o = new api.Availability(); 56 var o = new api.Availability();
22 buildCounterAvailability++; 57 buildCounterAvailability++;
23 if (buildCounterAvailability < 3) { 58 if (buildCounterAvailability < 3) {
24 o.advertiserId = "foo"; 59 o.advertiserId = "foo";
25 o.agencyId = "foo"; 60 o.agencyId = "foo";
26 o.availabilityTimestamp = "foo"; 61 o.availabilityTimestamp = "foo";
27 o.segmentationId = "foo"; 62 o.segmentationId = "foo";
(...skipping 10 matching lines...) Expand all
38 unittest.expect(o.advertiserId, unittest.equals('foo')); 73 unittest.expect(o.advertiserId, unittest.equals('foo'));
39 unittest.expect(o.agencyId, unittest.equals('foo')); 74 unittest.expect(o.agencyId, unittest.equals('foo'));
40 unittest.expect(o.availabilityTimestamp, unittest.equals('foo')); 75 unittest.expect(o.availabilityTimestamp, unittest.equals('foo'));
41 unittest.expect(o.segmentationId, unittest.equals('foo')); 76 unittest.expect(o.segmentationId, unittest.equals('foo'));
42 unittest.expect(o.segmentationName, unittest.equals('foo')); 77 unittest.expect(o.segmentationName, unittest.equals('foo'));
43 unittest.expect(o.segmentationType, unittest.equals('foo')); 78 unittest.expect(o.segmentationType, unittest.equals('foo'));
44 } 79 }
45 buildCounterAvailability--; 80 buildCounterAvailability--;
46 } 81 }
47 82
48 buildUnnamed1057() { 83 buildUnnamed962() {
49 var o = new core.List<api.CustomDimension>(); 84 var o = new core.List<api.CustomDimension>();
50 o.add(buildCustomDimension()); 85 o.add(buildCustomDimension());
51 o.add(buildCustomDimension()); 86 o.add(buildCustomDimension());
52 return o; 87 return o;
53 } 88 }
54 89
55 checkUnnamed1057(core.List<api.CustomDimension> o) { 90 checkUnnamed962(core.List<api.CustomDimension> o) {
56 unittest.expect(o, unittest.hasLength(2)); 91 unittest.expect(o, unittest.hasLength(2));
57 checkCustomDimension(o[0]); 92 checkCustomDimension(o[0]);
58 checkCustomDimension(o[1]); 93 checkCustomDimension(o[1]);
59 } 94 }
60 95
61 buildUnnamed1058() { 96 buildUnnamed963() {
62 var o = new core.List<api.CustomMetric>(); 97 var o = new core.List<api.CustomMetric>();
63 o.add(buildCustomMetric()); 98 o.add(buildCustomMetric());
64 o.add(buildCustomMetric()); 99 o.add(buildCustomMetric());
65 return o; 100 return o;
66 } 101 }
67 102
68 checkUnnamed1058(core.List<api.CustomMetric> o) { 103 checkUnnamed963(core.List<api.CustomMetric> o) {
69 unittest.expect(o, unittest.hasLength(2)); 104 unittest.expect(o, unittest.hasLength(2));
70 checkCustomMetric(o[0]); 105 checkCustomMetric(o[0]);
71 checkCustomMetric(o[1]); 106 checkCustomMetric(o[1]);
72 } 107 }
73 108
74 core.int buildCounterConversion = 0; 109 core.int buildCounterConversion = 0;
75 buildConversion() { 110 buildConversion() {
76 var o = new api.Conversion(); 111 var o = new api.Conversion();
77 buildCounterConversion++; 112 buildCounterConversion++;
78 if (buildCounterConversion < 3) { 113 if (buildCounterConversion < 3) {
79 o.adGroupId = "foo"; 114 o.adGroupId = "foo";
80 o.adId = "foo"; 115 o.adId = "foo";
81 o.advertiserId = "foo"; 116 o.advertiserId = "foo";
82 o.agencyId = "foo"; 117 o.agencyId = "foo";
83 o.attributionModel = "foo"; 118 o.attributionModel = "foo";
84 o.campaignId = "foo"; 119 o.campaignId = "foo";
85 o.clickId = "foo"; 120 o.clickId = "foo";
86 o.conversionId = "foo"; 121 o.conversionId = "foo";
87 o.conversionModifiedTimestamp = "foo"; 122 o.conversionModifiedTimestamp = "foo";
88 o.conversionTimestamp = "foo"; 123 o.conversionTimestamp = "foo";
89 o.countMillis = "foo"; 124 o.countMillis = "foo";
90 o.criterionId = "foo"; 125 o.criterionId = "foo";
91 o.currencyCode = "foo"; 126 o.currencyCode = "foo";
92 o.customDimension = buildUnnamed1057(); 127 o.customDimension = buildUnnamed962();
93 o.customMetric = buildUnnamed1058(); 128 o.customMetric = buildUnnamed963();
94 o.dsConversionId = "foo"; 129 o.dsConversionId = "foo";
95 o.engineAccountId = "foo"; 130 o.engineAccountId = "foo";
96 o.floodlightOrderId = "foo"; 131 o.floodlightOrderId = "foo";
97 o.quantityMillis = "foo"; 132 o.quantityMillis = "foo";
98 o.revenueMicros = "foo"; 133 o.revenueMicros = "foo";
99 o.segmentationId = "foo"; 134 o.segmentationId = "foo";
100 o.segmentationName = "foo"; 135 o.segmentationName = "foo";
101 o.segmentationType = "foo"; 136 o.segmentationType = "foo";
102 o.state = "foo"; 137 o.state = "foo";
103 o.type = "foo"; 138 o.type = "foo";
(...skipping 11 matching lines...) Expand all
115 unittest.expect(o.agencyId, unittest.equals('foo')); 150 unittest.expect(o.agencyId, unittest.equals('foo'));
116 unittest.expect(o.attributionModel, unittest.equals('foo')); 151 unittest.expect(o.attributionModel, unittest.equals('foo'));
117 unittest.expect(o.campaignId, unittest.equals('foo')); 152 unittest.expect(o.campaignId, unittest.equals('foo'));
118 unittest.expect(o.clickId, unittest.equals('foo')); 153 unittest.expect(o.clickId, unittest.equals('foo'));
119 unittest.expect(o.conversionId, unittest.equals('foo')); 154 unittest.expect(o.conversionId, unittest.equals('foo'));
120 unittest.expect(o.conversionModifiedTimestamp, unittest.equals('foo')); 155 unittest.expect(o.conversionModifiedTimestamp, unittest.equals('foo'));
121 unittest.expect(o.conversionTimestamp, unittest.equals('foo')); 156 unittest.expect(o.conversionTimestamp, unittest.equals('foo'));
122 unittest.expect(o.countMillis, unittest.equals('foo')); 157 unittest.expect(o.countMillis, unittest.equals('foo'));
123 unittest.expect(o.criterionId, unittest.equals('foo')); 158 unittest.expect(o.criterionId, unittest.equals('foo'));
124 unittest.expect(o.currencyCode, unittest.equals('foo')); 159 unittest.expect(o.currencyCode, unittest.equals('foo'));
125 checkUnnamed1057(o.customDimension); 160 checkUnnamed962(o.customDimension);
126 checkUnnamed1058(o.customMetric); 161 checkUnnamed963(o.customMetric);
127 unittest.expect(o.dsConversionId, unittest.equals('foo')); 162 unittest.expect(o.dsConversionId, unittest.equals('foo'));
128 unittest.expect(o.engineAccountId, unittest.equals('foo')); 163 unittest.expect(o.engineAccountId, unittest.equals('foo'));
129 unittest.expect(o.floodlightOrderId, unittest.equals('foo')); 164 unittest.expect(o.floodlightOrderId, unittest.equals('foo'));
130 unittest.expect(o.quantityMillis, unittest.equals('foo')); 165 unittest.expect(o.quantityMillis, unittest.equals('foo'));
131 unittest.expect(o.revenueMicros, unittest.equals('foo')); 166 unittest.expect(o.revenueMicros, unittest.equals('foo'));
132 unittest.expect(o.segmentationId, unittest.equals('foo')); 167 unittest.expect(o.segmentationId, unittest.equals('foo'));
133 unittest.expect(o.segmentationName, unittest.equals('foo')); 168 unittest.expect(o.segmentationName, unittest.equals('foo'));
134 unittest.expect(o.segmentationType, unittest.equals('foo')); 169 unittest.expect(o.segmentationType, unittest.equals('foo'));
135 unittest.expect(o.state, unittest.equals('foo')); 170 unittest.expect(o.state, unittest.equals('foo'));
136 unittest.expect(o.type, unittest.equals('foo')); 171 unittest.expect(o.type, unittest.equals('foo'));
137 } 172 }
138 buildCounterConversion--; 173 buildCounterConversion--;
139 } 174 }
140 175
141 buildUnnamed1059() { 176 buildUnnamed964() {
142 var o = new core.List<api.Conversion>(); 177 var o = new core.List<api.Conversion>();
143 o.add(buildConversion()); 178 o.add(buildConversion());
144 o.add(buildConversion()); 179 o.add(buildConversion());
145 return o; 180 return o;
146 } 181 }
147 182
148 checkUnnamed1059(core.List<api.Conversion> o) { 183 checkUnnamed964(core.List<api.Conversion> o) {
149 unittest.expect(o, unittest.hasLength(2)); 184 unittest.expect(o, unittest.hasLength(2));
150 checkConversion(o[0]); 185 checkConversion(o[0]);
151 checkConversion(o[1]); 186 checkConversion(o[1]);
152 } 187 }
153 188
154 core.int buildCounterConversionList = 0; 189 core.int buildCounterConversionList = 0;
155 buildConversionList() { 190 buildConversionList() {
156 var o = new api.ConversionList(); 191 var o = new api.ConversionList();
157 buildCounterConversionList++; 192 buildCounterConversionList++;
158 if (buildCounterConversionList < 3) { 193 if (buildCounterConversionList < 3) {
159 o.conversion = buildUnnamed1059(); 194 o.conversion = buildUnnamed964();
160 o.kind = "foo"; 195 o.kind = "foo";
161 } 196 }
162 buildCounterConversionList--; 197 buildCounterConversionList--;
163 return o; 198 return o;
164 } 199 }
165 200
166 checkConversionList(api.ConversionList o) { 201 checkConversionList(api.ConversionList o) {
167 buildCounterConversionList++; 202 buildCounterConversionList++;
168 if (buildCounterConversionList < 3) { 203 if (buildCounterConversionList < 3) {
169 checkUnnamed1059(o.conversion); 204 checkUnnamed964(o.conversion);
170 unittest.expect(o.kind, unittest.equals('foo')); 205 unittest.expect(o.kind, unittest.equals('foo'));
171 } 206 }
172 buildCounterConversionList--; 207 buildCounterConversionList--;
173 } 208 }
174 209
175 core.int buildCounterCustomDimension = 0; 210 core.int buildCounterCustomDimension = 0;
176 buildCustomDimension() { 211 buildCustomDimension() {
177 var o = new api.CustomDimension(); 212 var o = new api.CustomDimension();
178 buildCounterCustomDimension++; 213 buildCounterCustomDimension++;
179 if (buildCounterCustomDimension < 3) { 214 if (buildCounterCustomDimension < 3) {
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 263
229 checkReportFiles(api.ReportFiles o) { 264 checkReportFiles(api.ReportFiles o) {
230 buildCounterReportFiles++; 265 buildCounterReportFiles++;
231 if (buildCounterReportFiles < 3) { 266 if (buildCounterReportFiles < 3) {
232 unittest.expect(o.byteCount, unittest.equals('foo')); 267 unittest.expect(o.byteCount, unittest.equals('foo'));
233 unittest.expect(o.url, unittest.equals('foo')); 268 unittest.expect(o.url, unittest.equals('foo'));
234 } 269 }
235 buildCounterReportFiles--; 270 buildCounterReportFiles--;
236 } 271 }
237 272
238 buildUnnamed1060() { 273 buildUnnamed965() {
239 var o = new core.List<api.ReportFiles>(); 274 var o = new core.List<api.ReportFiles>();
240 o.add(buildReportFiles()); 275 o.add(buildReportFiles());
241 o.add(buildReportFiles()); 276 o.add(buildReportFiles());
242 return o; 277 return o;
243 } 278 }
244 279
245 checkUnnamed1060(core.List<api.ReportFiles> o) { 280 checkUnnamed965(core.List<api.ReportFiles> o) {
246 unittest.expect(o, unittest.hasLength(2)); 281 unittest.expect(o, unittest.hasLength(2));
247 checkReportFiles(o[0]); 282 checkReportFiles(o[0]);
248 checkReportFiles(o[1]); 283 checkReportFiles(o[1]);
249 } 284 }
250 285
251 buildUnnamed1061() { 286 buildUnnamed966() {
252 var o = new core.List<api.ReportRow>(); 287 var o = new core.List<api.ReportRow>();
253 o.add(buildReportRow()); 288 o.add(buildReportRow());
254 o.add(buildReportRow()); 289 o.add(buildReportRow());
255 return o; 290 return o;
256 } 291 }
257 292
258 checkUnnamed1061(core.List<api.ReportRow> o) { 293 checkUnnamed966(core.List<api.ReportRow> o) {
259 unittest.expect(o, unittest.hasLength(2)); 294 unittest.expect(o, unittest.hasLength(2));
260 checkReportRow(o[0]); 295 checkReportRow(o[0]);
261 checkReportRow(o[1]); 296 checkReportRow(o[1]);
262 } 297 }
263 298
264 core.int buildCounterReport = 0; 299 core.int buildCounterReport = 0;
265 buildReport() { 300 buildReport() {
266 var o = new api.Report(); 301 var o = new api.Report();
267 buildCounterReport++; 302 buildCounterReport++;
268 if (buildCounterReport < 3) { 303 if (buildCounterReport < 3) {
269 o.files = buildUnnamed1060(); 304 o.files = buildUnnamed965();
270 o.id = "foo"; 305 o.id = "foo";
271 o.isReportReady = true; 306 o.isReportReady = true;
272 o.kind = "foo"; 307 o.kind = "foo";
273 o.request = buildReportRequest(); 308 o.request = buildReportRequest();
274 o.rowCount = 42; 309 o.rowCount = 42;
275 o.rows = buildUnnamed1061(); 310 o.rows = buildUnnamed966();
276 o.statisticsCurrencyCode = "foo"; 311 o.statisticsCurrencyCode = "foo";
277 o.statisticsTimeZone = "foo"; 312 o.statisticsTimeZone = "foo";
278 } 313 }
279 buildCounterReport--; 314 buildCounterReport--;
280 return o; 315 return o;
281 } 316 }
282 317
283 checkReport(api.Report o) { 318 checkReport(api.Report o) {
284 buildCounterReport++; 319 buildCounterReport++;
285 if (buildCounterReport < 3) { 320 if (buildCounterReport < 3) {
286 checkUnnamed1060(o.files); 321 checkUnnamed965(o.files);
287 unittest.expect(o.id, unittest.equals('foo')); 322 unittest.expect(o.id, unittest.equals('foo'));
288 unittest.expect(o.isReportReady, unittest.isTrue); 323 unittest.expect(o.isReportReady, unittest.isTrue);
289 unittest.expect(o.kind, unittest.equals('foo')); 324 unittest.expect(o.kind, unittest.equals('foo'));
290 checkReportRequest(o.request); 325 checkReportRequest(o.request);
291 unittest.expect(o.rowCount, unittest.equals(42)); 326 unittest.expect(o.rowCount, unittest.equals(42));
292 checkUnnamed1061(o.rows); 327 checkUnnamed966(o.rows);
293 unittest.expect(o.statisticsCurrencyCode, unittest.equals('foo')); 328 unittest.expect(o.statisticsCurrencyCode, unittest.equals('foo'));
294 unittest.expect(o.statisticsTimeZone, unittest.equals('foo')); 329 unittest.expect(o.statisticsTimeZone, unittest.equals('foo'));
295 } 330 }
296 buildCounterReport--; 331 buildCounterReport--;
297 } 332 }
298 333
299 core.int buildCounterReportApiColumnSpec = 0; 334 core.int buildCounterReportApiColumnSpec = 0;
300 buildReportApiColumnSpec() { 335 buildReportApiColumnSpec() {
301 var o = new api.ReportApiColumnSpec(); 336 var o = new api.ReportApiColumnSpec();
302 buildCounterReportApiColumnSpec++; 337 buildCounterReportApiColumnSpec++;
(...skipping 21 matching lines...) Expand all
324 unittest.expect(o.endDate, unittest.equals('foo')); 359 unittest.expect(o.endDate, unittest.equals('foo'));
325 unittest.expect(o.groupByColumn, unittest.isTrue); 360 unittest.expect(o.groupByColumn, unittest.isTrue);
326 unittest.expect(o.headerText, unittest.equals('foo')); 361 unittest.expect(o.headerText, unittest.equals('foo'));
327 unittest.expect(o.platformSource, unittest.equals('foo')); 362 unittest.expect(o.platformSource, unittest.equals('foo'));
328 unittest.expect(o.savedColumnName, unittest.equals('foo')); 363 unittest.expect(o.savedColumnName, unittest.equals('foo'));
329 unittest.expect(o.startDate, unittest.equals('foo')); 364 unittest.expect(o.startDate, unittest.equals('foo'));
330 } 365 }
331 buildCounterReportApiColumnSpec--; 366 buildCounterReportApiColumnSpec--;
332 } 367 }
333 368
334 buildUnnamed1062() { 369 buildUnnamed967() {
335 var o = new core.List<api.ReportApiColumnSpec>(); 370 var o = new core.List<api.ReportApiColumnSpec>();
336 o.add(buildReportApiColumnSpec()); 371 o.add(buildReportApiColumnSpec());
337 o.add(buildReportApiColumnSpec()); 372 o.add(buildReportApiColumnSpec());
338 return o; 373 return o;
339 } 374 }
340 375
341 checkUnnamed1062(core.List<api.ReportApiColumnSpec> o) { 376 checkUnnamed967(core.List<api.ReportApiColumnSpec> o) {
342 unittest.expect(o, unittest.hasLength(2)); 377 unittest.expect(o, unittest.hasLength(2));
343 checkReportApiColumnSpec(o[0]); 378 checkReportApiColumnSpec(o[0]);
344 checkReportApiColumnSpec(o[1]); 379 checkReportApiColumnSpec(o[1]);
345 } 380 }
346 381
347 buildUnnamed1063() { 382 buildUnnamed968() {
348 var o = new core.List<core.Object>(); 383 var o = new core.List<core.Object>();
349 o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}); 384 o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'});
350 o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}); 385 o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'});
351 return o; 386 return o;
352 } 387 }
353 388
354 checkUnnamed1063(core.List<core.Object> o) { 389 checkUnnamed968(core.List<core.Object> o) {
355 unittest.expect(o, unittest.hasLength(2)); 390 unittest.expect(o, unittest.hasLength(2));
356 var casted1 = (o[0]) as core.Map; unittest.expect(casted1, unittest.hasLength( 3)); unittest.expect(casted1["list"], unittest.equals([1, 2, 3])); unittest.expe ct(casted1["bool"], unittest.equals(true)); unittest.expect(casted1["string"], u nittest.equals('foo')); 391 var casted1 = (o[0]) as core.Map; unittest.expect(casted1, unittest.hasLength( 3)); unittest.expect(casted1["list"], unittest.equals([1, 2, 3])); unittest.expe ct(casted1["bool"], unittest.equals(true)); unittest.expect(casted1["string"], u nittest.equals('foo'));
357 var casted2 = (o[1]) as core.Map; unittest.expect(casted2, unittest.hasLength( 3)); unittest.expect(casted2["list"], unittest.equals([1, 2, 3])); unittest.expe ct(casted2["bool"], unittest.equals(true)); unittest.expect(casted2["string"], u nittest.equals('foo')); 392 var casted2 = (o[1]) as core.Map; unittest.expect(casted2, unittest.hasLength( 3)); unittest.expect(casted2["list"], unittest.equals([1, 2, 3])); unittest.expe ct(casted2["bool"], unittest.equals(true)); unittest.expect(casted2["string"], u nittest.equals('foo'));
358 } 393 }
359 394
360 core.int buildCounterReportRequestFilters = 0; 395 core.int buildCounterReportRequestFilters = 0;
361 buildReportRequestFilters() { 396 buildReportRequestFilters() {
362 var o = new api.ReportRequestFilters(); 397 var o = new api.ReportRequestFilters();
363 buildCounterReportRequestFilters++; 398 buildCounterReportRequestFilters++;
364 if (buildCounterReportRequestFilters < 3) { 399 if (buildCounterReportRequestFilters < 3) {
365 o.column = buildReportApiColumnSpec(); 400 o.column = buildReportApiColumnSpec();
366 o.operator = "foo"; 401 o.operator = "foo";
367 o.values = buildUnnamed1063(); 402 o.values = buildUnnamed968();
368 } 403 }
369 buildCounterReportRequestFilters--; 404 buildCounterReportRequestFilters--;
370 return o; 405 return o;
371 } 406 }
372 407
373 checkReportRequestFilters(api.ReportRequestFilters o) { 408 checkReportRequestFilters(api.ReportRequestFilters o) {
374 buildCounterReportRequestFilters++; 409 buildCounterReportRequestFilters++;
375 if (buildCounterReportRequestFilters < 3) { 410 if (buildCounterReportRequestFilters < 3) {
376 checkReportApiColumnSpec(o.column); 411 checkReportApiColumnSpec(o.column);
377 unittest.expect(o.operator, unittest.equals('foo')); 412 unittest.expect(o.operator, unittest.equals('foo'));
378 checkUnnamed1063(o.values); 413 checkUnnamed968(o.values);
379 } 414 }
380 buildCounterReportRequestFilters--; 415 buildCounterReportRequestFilters--;
381 } 416 }
382 417
383 buildUnnamed1064() { 418 buildUnnamed969() {
384 var o = new core.List<api.ReportRequestFilters>(); 419 var o = new core.List<api.ReportRequestFilters>();
385 o.add(buildReportRequestFilters()); 420 o.add(buildReportRequestFilters());
386 o.add(buildReportRequestFilters()); 421 o.add(buildReportRequestFilters());
387 return o; 422 return o;
388 } 423 }
389 424
390 checkUnnamed1064(core.List<api.ReportRequestFilters> o) { 425 checkUnnamed969(core.List<api.ReportRequestFilters> o) {
391 unittest.expect(o, unittest.hasLength(2)); 426 unittest.expect(o, unittest.hasLength(2));
392 checkReportRequestFilters(o[0]); 427 checkReportRequestFilters(o[0]);
393 checkReportRequestFilters(o[1]); 428 checkReportRequestFilters(o[1]);
394 } 429 }
395 430
396 core.int buildCounterReportRequestOrderBy = 0; 431 core.int buildCounterReportRequestOrderBy = 0;
397 buildReportRequestOrderBy() { 432 buildReportRequestOrderBy() {
398 var o = new api.ReportRequestOrderBy(); 433 var o = new api.ReportRequestOrderBy();
399 buildCounterReportRequestOrderBy++; 434 buildCounterReportRequestOrderBy++;
400 if (buildCounterReportRequestOrderBy < 3) { 435 if (buildCounterReportRequestOrderBy < 3) {
401 o.column = buildReportApiColumnSpec(); 436 o.column = buildReportApiColumnSpec();
402 o.sortOrder = "foo"; 437 o.sortOrder = "foo";
403 } 438 }
404 buildCounterReportRequestOrderBy--; 439 buildCounterReportRequestOrderBy--;
405 return o; 440 return o;
406 } 441 }
407 442
408 checkReportRequestOrderBy(api.ReportRequestOrderBy o) { 443 checkReportRequestOrderBy(api.ReportRequestOrderBy o) {
409 buildCounterReportRequestOrderBy++; 444 buildCounterReportRequestOrderBy++;
410 if (buildCounterReportRequestOrderBy < 3) { 445 if (buildCounterReportRequestOrderBy < 3) {
411 checkReportApiColumnSpec(o.column); 446 checkReportApiColumnSpec(o.column);
412 unittest.expect(o.sortOrder, unittest.equals('foo')); 447 unittest.expect(o.sortOrder, unittest.equals('foo'));
413 } 448 }
414 buildCounterReportRequestOrderBy--; 449 buildCounterReportRequestOrderBy--;
415 } 450 }
416 451
417 buildUnnamed1065() { 452 buildUnnamed970() {
418 var o = new core.List<api.ReportRequestOrderBy>(); 453 var o = new core.List<api.ReportRequestOrderBy>();
419 o.add(buildReportRequestOrderBy()); 454 o.add(buildReportRequestOrderBy());
420 o.add(buildReportRequestOrderBy()); 455 o.add(buildReportRequestOrderBy());
421 return o; 456 return o;
422 } 457 }
423 458
424 checkUnnamed1065(core.List<api.ReportRequestOrderBy> o) { 459 checkUnnamed970(core.List<api.ReportRequestOrderBy> o) {
425 unittest.expect(o, unittest.hasLength(2)); 460 unittest.expect(o, unittest.hasLength(2));
426 checkReportRequestOrderBy(o[0]); 461 checkReportRequestOrderBy(o[0]);
427 checkReportRequestOrderBy(o[1]); 462 checkReportRequestOrderBy(o[1]);
428 } 463 }
429 464
430 core.int buildCounterReportRequestReportScope = 0; 465 core.int buildCounterReportRequestReportScope = 0;
431 buildReportRequestReportScope() { 466 buildReportRequestReportScope() {
432 var o = new api.ReportRequestReportScope(); 467 var o = new api.ReportRequestReportScope();
433 buildCounterReportRequestReportScope++; 468 buildCounterReportRequestReportScope++;
434 if (buildCounterReportRequestReportScope < 3) { 469 if (buildCounterReportRequestReportScope < 3) {
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
481 unittest.expect(o.startDate, unittest.equals('foo')); 516 unittest.expect(o.startDate, unittest.equals('foo'));
482 } 517 }
483 buildCounterReportRequestTimeRange--; 518 buildCounterReportRequestTimeRange--;
484 } 519 }
485 520
486 core.int buildCounterReportRequest = 0; 521 core.int buildCounterReportRequest = 0;
487 buildReportRequest() { 522 buildReportRequest() {
488 var o = new api.ReportRequest(); 523 var o = new api.ReportRequest();
489 buildCounterReportRequest++; 524 buildCounterReportRequest++;
490 if (buildCounterReportRequest < 3) { 525 if (buildCounterReportRequest < 3) {
491 o.columns = buildUnnamed1062(); 526 o.columns = buildUnnamed967();
492 o.downloadFormat = "foo"; 527 o.downloadFormat = "foo";
493 o.filters = buildUnnamed1064(); 528 o.filters = buildUnnamed969();
494 o.includeDeletedEntities = true; 529 o.includeDeletedEntities = true;
495 o.includeRemovedEntities = true; 530 o.includeRemovedEntities = true;
496 o.maxRowsPerFile = 42; 531 o.maxRowsPerFile = 42;
497 o.orderBy = buildUnnamed1065(); 532 o.orderBy = buildUnnamed970();
498 o.reportScope = buildReportRequestReportScope(); 533 o.reportScope = buildReportRequestReportScope();
499 o.reportType = "foo"; 534 o.reportType = "foo";
500 o.rowCount = 42; 535 o.rowCount = 42;
501 o.startRow = 42; 536 o.startRow = 42;
502 o.statisticsCurrency = "foo"; 537 o.statisticsCurrency = "foo";
503 o.timeRange = buildReportRequestTimeRange(); 538 o.timeRange = buildReportRequestTimeRange();
504 o.verifySingleTimeZone = true; 539 o.verifySingleTimeZone = true;
505 } 540 }
506 buildCounterReportRequest--; 541 buildCounterReportRequest--;
507 return o; 542 return o;
508 } 543 }
509 544
510 checkReportRequest(api.ReportRequest o) { 545 checkReportRequest(api.ReportRequest o) {
511 buildCounterReportRequest++; 546 buildCounterReportRequest++;
512 if (buildCounterReportRequest < 3) { 547 if (buildCounterReportRequest < 3) {
513 checkUnnamed1062(o.columns); 548 checkUnnamed967(o.columns);
514 unittest.expect(o.downloadFormat, unittest.equals('foo')); 549 unittest.expect(o.downloadFormat, unittest.equals('foo'));
515 checkUnnamed1064(o.filters); 550 checkUnnamed969(o.filters);
516 unittest.expect(o.includeDeletedEntities, unittest.isTrue); 551 unittest.expect(o.includeDeletedEntities, unittest.isTrue);
517 unittest.expect(o.includeRemovedEntities, unittest.isTrue); 552 unittest.expect(o.includeRemovedEntities, unittest.isTrue);
518 unittest.expect(o.maxRowsPerFile, unittest.equals(42)); 553 unittest.expect(o.maxRowsPerFile, unittest.equals(42));
519 checkUnnamed1065(o.orderBy); 554 checkUnnamed970(o.orderBy);
520 checkReportRequestReportScope(o.reportScope); 555 checkReportRequestReportScope(o.reportScope);
521 unittest.expect(o.reportType, unittest.equals('foo')); 556 unittest.expect(o.reportType, unittest.equals('foo'));
522 unittest.expect(o.rowCount, unittest.equals(42)); 557 unittest.expect(o.rowCount, unittest.equals(42));
523 unittest.expect(o.startRow, unittest.equals(42)); 558 unittest.expect(o.startRow, unittest.equals(42));
524 unittest.expect(o.statisticsCurrency, unittest.equals('foo')); 559 unittest.expect(o.statisticsCurrency, unittest.equals('foo'));
525 checkReportRequestTimeRange(o.timeRange); 560 checkReportRequestTimeRange(o.timeRange);
526 unittest.expect(o.verifySingleTimeZone, unittest.isTrue); 561 unittest.expect(o.verifySingleTimeZone, unittest.isTrue);
527 } 562 }
528 buildCounterReportRequest--; 563 buildCounterReportRequest--;
529 } 564 }
(...skipping 27 matching lines...) Expand all
557 checkSavedColumn(api.SavedColumn o) { 592 checkSavedColumn(api.SavedColumn o) {
558 buildCounterSavedColumn++; 593 buildCounterSavedColumn++;
559 if (buildCounterSavedColumn < 3) { 594 if (buildCounterSavedColumn < 3) {
560 unittest.expect(o.kind, unittest.equals('foo')); 595 unittest.expect(o.kind, unittest.equals('foo'));
561 unittest.expect(o.savedColumnName, unittest.equals('foo')); 596 unittest.expect(o.savedColumnName, unittest.equals('foo'));
562 unittest.expect(o.type, unittest.equals('foo')); 597 unittest.expect(o.type, unittest.equals('foo'));
563 } 598 }
564 buildCounterSavedColumn--; 599 buildCounterSavedColumn--;
565 } 600 }
566 601
567 buildUnnamed1066() { 602 buildUnnamed971() {
568 var o = new core.List<api.SavedColumn>(); 603 var o = new core.List<api.SavedColumn>();
569 o.add(buildSavedColumn()); 604 o.add(buildSavedColumn());
570 o.add(buildSavedColumn()); 605 o.add(buildSavedColumn());
571 return o; 606 return o;
572 } 607 }
573 608
574 checkUnnamed1066(core.List<api.SavedColumn> o) { 609 checkUnnamed971(core.List<api.SavedColumn> o) {
575 unittest.expect(o, unittest.hasLength(2)); 610 unittest.expect(o, unittest.hasLength(2));
576 checkSavedColumn(o[0]); 611 checkSavedColumn(o[0]);
577 checkSavedColumn(o[1]); 612 checkSavedColumn(o[1]);
578 } 613 }
579 614
580 core.int buildCounterSavedColumnList = 0; 615 core.int buildCounterSavedColumnList = 0;
581 buildSavedColumnList() { 616 buildSavedColumnList() {
582 var o = new api.SavedColumnList(); 617 var o = new api.SavedColumnList();
583 buildCounterSavedColumnList++; 618 buildCounterSavedColumnList++;
584 if (buildCounterSavedColumnList < 3) { 619 if (buildCounterSavedColumnList < 3) {
585 o.items = buildUnnamed1066(); 620 o.items = buildUnnamed971();
586 o.kind = "foo"; 621 o.kind = "foo";
587 } 622 }
588 buildCounterSavedColumnList--; 623 buildCounterSavedColumnList--;
589 return o; 624 return o;
590 } 625 }
591 626
592 checkSavedColumnList(api.SavedColumnList o) { 627 checkSavedColumnList(api.SavedColumnList o) {
593 buildCounterSavedColumnList++; 628 buildCounterSavedColumnList++;
594 if (buildCounterSavedColumnList < 3) { 629 if (buildCounterSavedColumnList < 3) {
595 checkUnnamed1066(o.items); 630 checkUnnamed971(o.items);
596 unittest.expect(o.kind, unittest.equals('foo')); 631 unittest.expect(o.kind, unittest.equals('foo'));
597 } 632 }
598 buildCounterSavedColumnList--; 633 buildCounterSavedColumnList--;
599 } 634 }
600 635
601 buildUnnamed1067() { 636 buildUnnamed972() {
602 var o = new core.List<api.Availability>(); 637 var o = new core.List<api.Availability>();
603 o.add(buildAvailability()); 638 o.add(buildAvailability());
604 o.add(buildAvailability()); 639 o.add(buildAvailability());
605 return o; 640 return o;
606 } 641 }
607 642
608 checkUnnamed1067(core.List<api.Availability> o) { 643 checkUnnamed972(core.List<api.Availability> o) {
609 unittest.expect(o, unittest.hasLength(2)); 644 unittest.expect(o, unittest.hasLength(2));
610 checkAvailability(o[0]); 645 checkAvailability(o[0]);
611 checkAvailability(o[1]); 646 checkAvailability(o[1]);
612 } 647 }
613 648
614 core.int buildCounterUpdateAvailabilityRequest = 0; 649 core.int buildCounterUpdateAvailabilityRequest = 0;
615 buildUpdateAvailabilityRequest() { 650 buildUpdateAvailabilityRequest() {
616 var o = new api.UpdateAvailabilityRequest(); 651 var o = new api.UpdateAvailabilityRequest();
617 buildCounterUpdateAvailabilityRequest++; 652 buildCounterUpdateAvailabilityRequest++;
618 if (buildCounterUpdateAvailabilityRequest < 3) { 653 if (buildCounterUpdateAvailabilityRequest < 3) {
619 o.availabilities = buildUnnamed1067(); 654 o.availabilities = buildUnnamed972();
620 } 655 }
621 buildCounterUpdateAvailabilityRequest--; 656 buildCounterUpdateAvailabilityRequest--;
622 return o; 657 return o;
623 } 658 }
624 659
625 checkUpdateAvailabilityRequest(api.UpdateAvailabilityRequest o) { 660 checkUpdateAvailabilityRequest(api.UpdateAvailabilityRequest o) {
626 buildCounterUpdateAvailabilityRequest++; 661 buildCounterUpdateAvailabilityRequest++;
627 if (buildCounterUpdateAvailabilityRequest < 3) { 662 if (buildCounterUpdateAvailabilityRequest < 3) {
628 checkUnnamed1067(o.availabilities); 663 checkUnnamed972(o.availabilities);
629 } 664 }
630 buildCounterUpdateAvailabilityRequest--; 665 buildCounterUpdateAvailabilityRequest--;
631 } 666 }
632 667
633 buildUnnamed1068() { 668 buildUnnamed973() {
634 var o = new core.List<api.Availability>(); 669 var o = new core.List<api.Availability>();
635 o.add(buildAvailability()); 670 o.add(buildAvailability());
636 o.add(buildAvailability()); 671 o.add(buildAvailability());
637 return o; 672 return o;
638 } 673 }
639 674
640 checkUnnamed1068(core.List<api.Availability> o) { 675 checkUnnamed973(core.List<api.Availability> o) {
641 unittest.expect(o, unittest.hasLength(2)); 676 unittest.expect(o, unittest.hasLength(2));
642 checkAvailability(o[0]); 677 checkAvailability(o[0]);
643 checkAvailability(o[1]); 678 checkAvailability(o[1]);
644 } 679 }
645 680
646 core.int buildCounterUpdateAvailabilityResponse = 0; 681 core.int buildCounterUpdateAvailabilityResponse = 0;
647 buildUpdateAvailabilityResponse() { 682 buildUpdateAvailabilityResponse() {
648 var o = new api.UpdateAvailabilityResponse(); 683 var o = new api.UpdateAvailabilityResponse();
649 buildCounterUpdateAvailabilityResponse++; 684 buildCounterUpdateAvailabilityResponse++;
650 if (buildCounterUpdateAvailabilityResponse < 3) { 685 if (buildCounterUpdateAvailabilityResponse < 3) {
651 o.availabilities = buildUnnamed1068(); 686 o.availabilities = buildUnnamed973();
652 } 687 }
653 buildCounterUpdateAvailabilityResponse--; 688 buildCounterUpdateAvailabilityResponse--;
654 return o; 689 return o;
655 } 690 }
656 691
657 checkUpdateAvailabilityResponse(api.UpdateAvailabilityResponse o) { 692 checkUpdateAvailabilityResponse(api.UpdateAvailabilityResponse o) {
658 buildCounterUpdateAvailabilityResponse++; 693 buildCounterUpdateAvailabilityResponse++;
659 if (buildCounterUpdateAvailabilityResponse < 3) { 694 if (buildCounterUpdateAvailabilityResponse < 3) {
660 checkUnnamed1068(o.availabilities); 695 checkUnnamed973(o.availabilities);
661 } 696 }
662 buildCounterUpdateAvailabilityResponse--; 697 buildCounterUpdateAvailabilityResponse--;
663 } 698 }
664 699
665 700
666 main() { 701 main() {
667 unittest.group("obj-schema-Availability", () { 702 unittest.group("obj-schema-Availability", () {
668 unittest.test("to-json--from-json", () { 703 unittest.test("to-json--from-json", () {
669 var o = buildAvailability(); 704 var o = buildAvailability();
670 var od = new api.Availability.fromJson(o.toJson()); 705 var od = new api.Availability.fromJson(o.toJson());
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
822 var o = buildUpdateAvailabilityResponse(); 857 var o = buildUpdateAvailabilityResponse();
823 var od = new api.UpdateAvailabilityResponse.fromJson(o.toJson()); 858 var od = new api.UpdateAvailabilityResponse.fromJson(o.toJson());
824 checkUpdateAvailabilityResponse(od); 859 checkUpdateAvailabilityResponse(od);
825 }); 860 });
826 }); 861 });
827 862
828 863
829 unittest.group("resource-ConversionResourceApi", () { 864 unittest.group("resource-ConversionResourceApi", () {
830 unittest.test("method--get", () { 865 unittest.test("method--get", () {
831 866
832 var mock = new common_test.HttpServerMock(); 867 var mock = new HttpServerMock();
833 api.ConversionResourceApi res = new api.DoubleclicksearchApi(mock).convers ion; 868 api.ConversionResourceApi res = new api.DoubleclicksearchApi(mock).convers ion;
834 var arg_agencyId = "foo"; 869 var arg_agencyId = "foo";
835 var arg_advertiserId = "foo"; 870 var arg_advertiserId = "foo";
836 var arg_engineAccountId = "foo"; 871 var arg_engineAccountId = "foo";
837 var arg_endDate = 42; 872 var arg_endDate = 42;
838 var arg_rowCount = 42; 873 var arg_rowCount = 42;
839 var arg_startDate = 42; 874 var arg_startDate = 42;
840 var arg_startRow = 42; 875 var arg_startRow = 42;
841 var arg_adGroupId = "foo"; 876 var arg_adGroupId = "foo";
842 var arg_adId = "foo"; 877 var arg_adId = "foo";
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
898 unittest.expect(queryMap["adGroupId"].first, unittest.equals(arg_adGroup Id)); 933 unittest.expect(queryMap["adGroupId"].first, unittest.equals(arg_adGroup Id));
899 unittest.expect(queryMap["adId"].first, unittest.equals(arg_adId)); 934 unittest.expect(queryMap["adId"].first, unittest.equals(arg_adId));
900 unittest.expect(queryMap["campaignId"].first, unittest.equals(arg_campai gnId)); 935 unittest.expect(queryMap["campaignId"].first, unittest.equals(arg_campai gnId));
901 unittest.expect(queryMap["criterionId"].first, unittest.equals(arg_crite rionId)); 936 unittest.expect(queryMap["criterionId"].first, unittest.equals(arg_crite rionId));
902 937
903 938
904 var h = { 939 var h = {
905 "content-type" : "application/json; charset=utf-8", 940 "content-type" : "application/json; charset=utf-8",
906 }; 941 };
907 var resp = convert.JSON.encode(buildConversionList()); 942 var resp = convert.JSON.encode(buildConversionList());
908 return new async.Future.value(common_test.stringResponse(200, h, resp)); 943 return new async.Future.value(stringResponse(200, h, resp));
909 }), true); 944 }), true);
910 res.get(arg_agencyId, arg_advertiserId, arg_engineAccountId, arg_endDate, arg_rowCount, arg_startDate, arg_startRow, adGroupId: arg_adGroupId, adId: arg_a dId, campaignId: arg_campaignId, criterionId: arg_criterionId).then(unittest.exp ectAsync(((api.ConversionList response) { 945 res.get(arg_agencyId, arg_advertiserId, arg_engineAccountId, arg_endDate, arg_rowCount, arg_startDate, arg_startRow, adGroupId: arg_adGroupId, adId: arg_a dId, campaignId: arg_campaignId, criterionId: arg_criterionId).then(unittest.exp ectAsync(((api.ConversionList response) {
911 checkConversionList(response); 946 checkConversionList(response);
912 }))); 947 })));
913 }); 948 });
914 949
915 unittest.test("method--insert", () { 950 unittest.test("method--insert", () {
916 951
917 var mock = new common_test.HttpServerMock(); 952 var mock = new HttpServerMock();
918 api.ConversionResourceApi res = new api.DoubleclicksearchApi(mock).convers ion; 953 api.ConversionResourceApi res = new api.DoubleclicksearchApi(mock).convers ion;
919 var arg_request = buildConversionList(); 954 var arg_request = buildConversionList();
920 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 955 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
921 var obj = new api.ConversionList.fromJson(json); 956 var obj = new api.ConversionList.fromJson(json);
922 checkConversionList(obj); 957 checkConversionList(obj);
923 958
924 var path = (req.url).path; 959 var path = (req.url).path;
925 var pathOffset = 0; 960 var pathOffset = 0;
926 var index; 961 var index;
927 var subPart; 962 var subPart;
(...skipping 19 matching lines...) Expand all
947 var keyvalue = part.split("="); 982 var keyvalue = part.split("=");
948 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1])); 983 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
949 } 984 }
950 } 985 }
951 986
952 987
953 var h = { 988 var h = {
954 "content-type" : "application/json; charset=utf-8", 989 "content-type" : "application/json; charset=utf-8",
955 }; 990 };
956 var resp = convert.JSON.encode(buildConversionList()); 991 var resp = convert.JSON.encode(buildConversionList());
957 return new async.Future.value(common_test.stringResponse(200, h, resp)); 992 return new async.Future.value(stringResponse(200, h, resp));
958 }), true); 993 }), true);
959 res.insert(arg_request).then(unittest.expectAsync(((api.ConversionList res ponse) { 994 res.insert(arg_request).then(unittest.expectAsync(((api.ConversionList res ponse) {
960 checkConversionList(response); 995 checkConversionList(response);
961 }))); 996 })));
962 }); 997 });
963 998
964 unittest.test("method--patch", () { 999 unittest.test("method--patch", () {
965 1000
966 var mock = new common_test.HttpServerMock(); 1001 var mock = new HttpServerMock();
967 api.ConversionResourceApi res = new api.DoubleclicksearchApi(mock).convers ion; 1002 api.ConversionResourceApi res = new api.DoubleclicksearchApi(mock).convers ion;
968 var arg_request = buildConversionList(); 1003 var arg_request = buildConversionList();
969 var arg_advertiserId = "foo"; 1004 var arg_advertiserId = "foo";
970 var arg_agencyId = "foo"; 1005 var arg_agencyId = "foo";
971 var arg_endDate = 42; 1006 var arg_endDate = 42;
972 var arg_engineAccountId = "foo"; 1007 var arg_engineAccountId = "foo";
973 var arg_rowCount = 42; 1008 var arg_rowCount = 42;
974 var arg_startDate = 42; 1009 var arg_startDate = 42;
975 var arg_startRow = 42; 1010 var arg_startRow = 42;
976 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 1011 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
1010 unittest.expect(queryMap["engineAccountId"].first, unittest.equals(arg_e ngineAccountId)); 1045 unittest.expect(queryMap["engineAccountId"].first, unittest.equals(arg_e ngineAccountId));
1011 unittest.expect(core.int.parse(queryMap["rowCount"].first), unittest.equ als(arg_rowCount)); 1046 unittest.expect(core.int.parse(queryMap["rowCount"].first), unittest.equ als(arg_rowCount));
1012 unittest.expect(core.int.parse(queryMap["startDate"].first), unittest.eq uals(arg_startDate)); 1047 unittest.expect(core.int.parse(queryMap["startDate"].first), unittest.eq uals(arg_startDate));
1013 unittest.expect(core.int.parse(queryMap["startRow"].first), unittest.equ als(arg_startRow)); 1048 unittest.expect(core.int.parse(queryMap["startRow"].first), unittest.equ als(arg_startRow));
1014 1049
1015 1050
1016 var h = { 1051 var h = {
1017 "content-type" : "application/json; charset=utf-8", 1052 "content-type" : "application/json; charset=utf-8",
1018 }; 1053 };
1019 var resp = convert.JSON.encode(buildConversionList()); 1054 var resp = convert.JSON.encode(buildConversionList());
1020 return new async.Future.value(common_test.stringResponse(200, h, resp)); 1055 return new async.Future.value(stringResponse(200, h, resp));
1021 }), true); 1056 }), true);
1022 res.patch(arg_request, arg_advertiserId, arg_agencyId, arg_endDate, arg_en gineAccountId, arg_rowCount, arg_startDate, arg_startRow).then(unittest.expectAs ync(((api.ConversionList response) { 1057 res.patch(arg_request, arg_advertiserId, arg_agencyId, arg_endDate, arg_en gineAccountId, arg_rowCount, arg_startDate, arg_startRow).then(unittest.expectAs ync(((api.ConversionList response) {
1023 checkConversionList(response); 1058 checkConversionList(response);
1024 }))); 1059 })));
1025 }); 1060 });
1026 1061
1027 unittest.test("method--update", () { 1062 unittest.test("method--update", () {
1028 1063
1029 var mock = new common_test.HttpServerMock(); 1064 var mock = new HttpServerMock();
1030 api.ConversionResourceApi res = new api.DoubleclicksearchApi(mock).convers ion; 1065 api.ConversionResourceApi res = new api.DoubleclicksearchApi(mock).convers ion;
1031 var arg_request = buildConversionList(); 1066 var arg_request = buildConversionList();
1032 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 1067 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
1033 var obj = new api.ConversionList.fromJson(json); 1068 var obj = new api.ConversionList.fromJson(json);
1034 checkConversionList(obj); 1069 checkConversionList(obj);
1035 1070
1036 var path = (req.url).path; 1071 var path = (req.url).path;
1037 var pathOffset = 0; 1072 var pathOffset = 0;
1038 var index; 1073 var index;
1039 var subPart; 1074 var subPart;
(...skipping 19 matching lines...) Expand all
1059 var keyvalue = part.split("="); 1094 var keyvalue = part.split("=");
1060 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1])); 1095 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
1061 } 1096 }
1062 } 1097 }
1063 1098
1064 1099
1065 var h = { 1100 var h = {
1066 "content-type" : "application/json; charset=utf-8", 1101 "content-type" : "application/json; charset=utf-8",
1067 }; 1102 };
1068 var resp = convert.JSON.encode(buildConversionList()); 1103 var resp = convert.JSON.encode(buildConversionList());
1069 return new async.Future.value(common_test.stringResponse(200, h, resp)); 1104 return new async.Future.value(stringResponse(200, h, resp));
1070 }), true); 1105 }), true);
1071 res.update(arg_request).then(unittest.expectAsync(((api.ConversionList res ponse) { 1106 res.update(arg_request).then(unittest.expectAsync(((api.ConversionList res ponse) {
1072 checkConversionList(response); 1107 checkConversionList(response);
1073 }))); 1108 })));
1074 }); 1109 });
1075 1110
1076 unittest.test("method--updateAvailability", () { 1111 unittest.test("method--updateAvailability", () {
1077 1112
1078 var mock = new common_test.HttpServerMock(); 1113 var mock = new HttpServerMock();
1079 api.ConversionResourceApi res = new api.DoubleclicksearchApi(mock).convers ion; 1114 api.ConversionResourceApi res = new api.DoubleclicksearchApi(mock).convers ion;
1080 var arg_request = buildUpdateAvailabilityRequest(); 1115 var arg_request = buildUpdateAvailabilityRequest();
1081 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 1116 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
1082 var obj = new api.UpdateAvailabilityRequest.fromJson(json); 1117 var obj = new api.UpdateAvailabilityRequest.fromJson(json);
1083 checkUpdateAvailabilityRequest(obj); 1118 checkUpdateAvailabilityRequest(obj);
1084 1119
1085 var path = (req.url).path; 1120 var path = (req.url).path;
1086 var pathOffset = 0; 1121 var pathOffset = 0;
1087 var index; 1122 var index;
1088 var subPart; 1123 var subPart;
(...skipping 19 matching lines...) Expand all
1108 var keyvalue = part.split("="); 1143 var keyvalue = part.split("=");
1109 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1])); 1144 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
1110 } 1145 }
1111 } 1146 }
1112 1147
1113 1148
1114 var h = { 1149 var h = {
1115 "content-type" : "application/json; charset=utf-8", 1150 "content-type" : "application/json; charset=utf-8",
1116 }; 1151 };
1117 var resp = convert.JSON.encode(buildUpdateAvailabilityResponse()); 1152 var resp = convert.JSON.encode(buildUpdateAvailabilityResponse());
1118 return new async.Future.value(common_test.stringResponse(200, h, resp)); 1153 return new async.Future.value(stringResponse(200, h, resp));
1119 }), true); 1154 }), true);
1120 res.updateAvailability(arg_request).then(unittest.expectAsync(((api.Update AvailabilityResponse response) { 1155 res.updateAvailability(arg_request).then(unittest.expectAsync(((api.Update AvailabilityResponse response) {
1121 checkUpdateAvailabilityResponse(response); 1156 checkUpdateAvailabilityResponse(response);
1122 }))); 1157 })));
1123 }); 1158 });
1124 1159
1125 }); 1160 });
1126 1161
1127 1162
1128 unittest.group("resource-ReportsResourceApi", () { 1163 unittest.group("resource-ReportsResourceApi", () {
1129 unittest.test("method--generate", () { 1164 unittest.test("method--generate", () {
1130 1165
1131 var mock = new common_test.HttpServerMock(); 1166 var mock = new HttpServerMock();
1132 api.ReportsResourceApi res = new api.DoubleclicksearchApi(mock).reports; 1167 api.ReportsResourceApi res = new api.DoubleclicksearchApi(mock).reports;
1133 var arg_request_1 = buildReportRequest(); 1168 var arg_request_1 = buildReportRequest();
1134 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 1169 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
1135 var obj = new api.ReportRequest.fromJson(json); 1170 var obj = new api.ReportRequest.fromJson(json);
1136 checkReportRequest(obj); 1171 checkReportRequest(obj);
1137 1172
1138 var path = (req.url).path; 1173 var path = (req.url).path;
1139 var pathOffset = 0; 1174 var pathOffset = 0;
1140 var index; 1175 var index;
1141 var subPart; 1176 var subPart;
(...skipping 19 matching lines...) Expand all
1161 var keyvalue = part.split("="); 1196 var keyvalue = part.split("=");
1162 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1])); 1197 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
1163 } 1198 }
1164 } 1199 }
1165 1200
1166 1201
1167 var h = { 1202 var h = {
1168 "content-type" : "application/json; charset=utf-8", 1203 "content-type" : "application/json; charset=utf-8",
1169 }; 1204 };
1170 var resp = convert.JSON.encode(buildReport()); 1205 var resp = convert.JSON.encode(buildReport());
1171 return new async.Future.value(common_test.stringResponse(200, h, resp)); 1206 return new async.Future.value(stringResponse(200, h, resp));
1172 }), true); 1207 }), true);
1173 res.generate(arg_request_1).then(unittest.expectAsync(((api.Report respons e) { 1208 res.generate(arg_request_1).then(unittest.expectAsync(((api.Report respons e) {
1174 checkReport(response); 1209 checkReport(response);
1175 }))); 1210 })));
1176 }); 1211 });
1177 1212
1178 unittest.test("method--get", () { 1213 unittest.test("method--get", () {
1179 1214
1180 var mock = new common_test.HttpServerMock(); 1215 var mock = new HttpServerMock();
1181 api.ReportsResourceApi res = new api.DoubleclicksearchApi(mock).reports; 1216 api.ReportsResourceApi res = new api.DoubleclicksearchApi(mock).reports;
1182 var arg_reportId = "foo"; 1217 var arg_reportId = "foo";
1183 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 1218 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
1184 var path = (req.url).path; 1219 var path = (req.url).path;
1185 var pathOffset = 0; 1220 var pathOffset = 0;
1186 var index; 1221 var index;
1187 var subPart; 1222 var subPart;
1188 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 1223 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
1189 pathOffset += 1; 1224 pathOffset += 1;
1190 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq uals("doubleclicksearch/v2/")); 1225 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq uals("doubleclicksearch/v2/"));
(...skipping 19 matching lines...) Expand all
1210 var keyvalue = part.split("="); 1245 var keyvalue = part.split("=");
1211 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1])); 1246 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
1212 } 1247 }
1213 } 1248 }
1214 1249
1215 1250
1216 var h = { 1251 var h = {
1217 "content-type" : "application/json; charset=utf-8", 1252 "content-type" : "application/json; charset=utf-8",
1218 }; 1253 };
1219 var resp = convert.JSON.encode(buildReport()); 1254 var resp = convert.JSON.encode(buildReport());
1220 return new async.Future.value(common_test.stringResponse(200, h, resp)); 1255 return new async.Future.value(stringResponse(200, h, resp));
1221 }), true); 1256 }), true);
1222 res.get(arg_reportId).then(unittest.expectAsync(((api.Report response) { 1257 res.get(arg_reportId).then(unittest.expectAsync(((api.Report response) {
1223 checkReport(response); 1258 checkReport(response);
1224 }))); 1259 })));
1225 }); 1260 });
1226 1261
1227 unittest.test("method--getFile", () { 1262 unittest.test("method--getFile", () {
1228 // TODO: Implement tests for media upload; 1263 // TODO: Implement tests for media upload;
1229 // TODO: Implement tests for media download; 1264 // TODO: Implement tests for media download;
1230 1265
1231 var mock = new common_test.HttpServerMock(); 1266 var mock = new HttpServerMock();
1232 api.ReportsResourceApi res = new api.DoubleclicksearchApi(mock).reports; 1267 api.ReportsResourceApi res = new api.DoubleclicksearchApi(mock).reports;
1233 var arg_reportId = "foo"; 1268 var arg_reportId = "foo";
1234 var arg_reportFragment = 42; 1269 var arg_reportFragment = 42;
1235 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 1270 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
1236 var path = (req.url).path; 1271 var path = (req.url).path;
1237 var pathOffset = 0; 1272 var pathOffset = 0;
1238 var index; 1273 var index;
1239 var subPart; 1274 var subPart;
1240 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 1275 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
1241 pathOffset += 1; 1276 pathOffset += 1;
(...skipping 27 matching lines...) Expand all
1269 var keyvalue = part.split("="); 1304 var keyvalue = part.split("=");
1270 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1])); 1305 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
1271 } 1306 }
1272 } 1307 }
1273 1308
1274 1309
1275 var h = { 1310 var h = {
1276 "content-type" : "application/json; charset=utf-8", 1311 "content-type" : "application/json; charset=utf-8",
1277 }; 1312 };
1278 var resp = ""; 1313 var resp = "";
1279 return new async.Future.value(common_test.stringResponse(200, h, resp)); 1314 return new async.Future.value(stringResponse(200, h, resp));
1280 }), true); 1315 }), true);
1281 res.getFile(arg_reportId, arg_reportFragment).then(unittest.expectAsync((_ ) {})); 1316 res.getFile(arg_reportId, arg_reportFragment).then(unittest.expectAsync((_ ) {}));
1282 }); 1317 });
1283 1318
1284 unittest.test("method--request", () { 1319 unittest.test("method--request", () {
1285 1320
1286 var mock = new common_test.HttpServerMock(); 1321 var mock = new HttpServerMock();
1287 api.ReportsResourceApi res = new api.DoubleclicksearchApi(mock).reports; 1322 api.ReportsResourceApi res = new api.DoubleclicksearchApi(mock).reports;
1288 var arg_request_1 = buildReportRequest(); 1323 var arg_request_1 = buildReportRequest();
1289 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 1324 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
1290 var obj = new api.ReportRequest.fromJson(json); 1325 var obj = new api.ReportRequest.fromJson(json);
1291 checkReportRequest(obj); 1326 checkReportRequest(obj);
1292 1327
1293 var path = (req.url).path; 1328 var path = (req.url).path;
1294 var pathOffset = 0; 1329 var pathOffset = 0;
1295 var index; 1330 var index;
1296 var subPart; 1331 var subPart;
(...skipping 19 matching lines...) Expand all
1316 var keyvalue = part.split("="); 1351 var keyvalue = part.split("=");
1317 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1])); 1352 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
1318 } 1353 }
1319 } 1354 }
1320 1355
1321 1356
1322 var h = { 1357 var h = {
1323 "content-type" : "application/json; charset=utf-8", 1358 "content-type" : "application/json; charset=utf-8",
1324 }; 1359 };
1325 var resp = convert.JSON.encode(buildReport()); 1360 var resp = convert.JSON.encode(buildReport());
1326 return new async.Future.value(common_test.stringResponse(200, h, resp)); 1361 return new async.Future.value(stringResponse(200, h, resp));
1327 }), true); 1362 }), true);
1328 res.request(arg_request_1).then(unittest.expectAsync(((api.Report response ) { 1363 res.request(arg_request_1).then(unittest.expectAsync(((api.Report response ) {
1329 checkReport(response); 1364 checkReport(response);
1330 }))); 1365 })));
1331 }); 1366 });
1332 1367
1333 }); 1368 });
1334 1369
1335 1370
1336 unittest.group("resource-SavedColumnsResourceApi", () { 1371 unittest.group("resource-SavedColumnsResourceApi", () {
1337 unittest.test("method--list", () { 1372 unittest.test("method--list", () {
1338 1373
1339 var mock = new common_test.HttpServerMock(); 1374 var mock = new HttpServerMock();
1340 api.SavedColumnsResourceApi res = new api.DoubleclicksearchApi(mock).saved Columns; 1375 api.SavedColumnsResourceApi res = new api.DoubleclicksearchApi(mock).saved Columns;
1341 var arg_agencyId = "foo"; 1376 var arg_agencyId = "foo";
1342 var arg_advertiserId = "foo"; 1377 var arg_advertiserId = "foo";
1343 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 1378 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
1344 var path = (req.url).path; 1379 var path = (req.url).path;
1345 var pathOffset = 0; 1380 var pathOffset = 0;
1346 var index; 1381 var index;
1347 var subPart; 1382 var subPart;
1348 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 1383 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
1349 pathOffset += 1; 1384 pathOffset += 1;
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
1381 var keyvalue = part.split("="); 1416 var keyvalue = part.split("=");
1382 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1])); 1417 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
1383 } 1418 }
1384 } 1419 }
1385 1420
1386 1421
1387 var h = { 1422 var h = {
1388 "content-type" : "application/json; charset=utf-8", 1423 "content-type" : "application/json; charset=utf-8",
1389 }; 1424 };
1390 var resp = convert.JSON.encode(buildSavedColumnList()); 1425 var resp = convert.JSON.encode(buildSavedColumnList());
1391 return new async.Future.value(common_test.stringResponse(200, h, resp)); 1426 return new async.Future.value(stringResponse(200, h, resp));
1392 }), true); 1427 }), true);
1393 res.list(arg_agencyId, arg_advertiserId).then(unittest.expectAsync(((api.S avedColumnList response) { 1428 res.list(arg_agencyId, arg_advertiserId).then(unittest.expectAsync(((api.S avedColumnList response) {
1394 checkSavedColumnList(response); 1429 checkSavedColumnList(response);
1395 }))); 1430 })));
1396 }); 1431 });
1397 1432
1398 }); 1433 });
1399 1434
1400 1435
1401 } 1436 }
1402 1437
OLDNEW
« no previous file with comments | « generated/googleapis/test/doubleclickbidmanager/v1_test.dart ('k') | generated/googleapis/test/drive/v2_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698