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

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

Issue 2936613002: Api-Roll 50: 2017-06-12 (Closed)
Patch Set: Created 3 years, 6 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:test/test.dart' as unittest;
11 11
12 import 'package:googleapis/doubleclicksearch/v2.dart' as api; 12 import 'package:googleapis/doubleclicksearch/v2.dart' as api;
13 13
14 class HttpServerMock extends http.BaseClient { 14 class HttpServerMock extends http.BaseClient {
15 core.Function _callback; 15 core.Function _callback;
16 core.bool _expectJson; 16 core.bool _expectJson;
17 17
18 void register(core.Function callback, core.bool expectJson) { 18 void register(core.Function callback, core.bool expectJson) {
19 _callback = callback; 19 _callback = callback;
20 _expectJson = expectJson; 20 _expectJson = expectJson;
(...skipping 18 matching lines...) Expand all
39 } else { 39 } else {
40 return stream.toBytes().then((data) { 40 return stream.toBytes().then((data) {
41 return _callback(request, data); 41 return _callback(request, data);
42 }); 42 });
43 } 43 }
44 } 44 }
45 } 45 }
46 } 46 }
47 47
48 http.StreamedResponse stringResponse( 48 http.StreamedResponse stringResponse(
49 core.int status, core.Map headers, core.String body) { 49 core.int status, core.Map<core.String, core.String> headers, core.String bod y) {
50 var stream = new async.Stream.fromIterable([convert.UTF8.encode(body)]); 50 var stream = new async.Stream.fromIterable([convert.UTF8.encode(body)]);
51 return new http.StreamedResponse(stream, status, headers: headers); 51 return new http.StreamedResponse(stream, status, headers: headers);
52 } 52 }
53 53
54 core.int buildCounterAvailability = 0; 54 core.int buildCounterAvailability = 0;
55 buildAvailability() { 55 buildAvailability() {
56 var o = new api.Availability(); 56 var o = new api.Availability();
57 buildCounterAvailability++; 57 buildCounterAvailability++;
58 if (buildCounterAvailability < 3) { 58 if (buildCounterAvailability < 3) {
59 o.advertiserId = "foo"; 59 o.advertiserId = "foo";
(...skipping 13 matching lines...) Expand all
73 unittest.expect(o.advertiserId, unittest.equals('foo')); 73 unittest.expect(o.advertiserId, unittest.equals('foo'));
74 unittest.expect(o.agencyId, unittest.equals('foo')); 74 unittest.expect(o.agencyId, unittest.equals('foo'));
75 unittest.expect(o.availabilityTimestamp, unittest.equals('foo')); 75 unittest.expect(o.availabilityTimestamp, unittest.equals('foo'));
76 unittest.expect(o.segmentationId, unittest.equals('foo')); 76 unittest.expect(o.segmentationId, unittest.equals('foo'));
77 unittest.expect(o.segmentationName, unittest.equals('foo')); 77 unittest.expect(o.segmentationName, unittest.equals('foo'));
78 unittest.expect(o.segmentationType, unittest.equals('foo')); 78 unittest.expect(o.segmentationType, unittest.equals('foo'));
79 } 79 }
80 buildCounterAvailability--; 80 buildCounterAvailability--;
81 } 81 }
82 82
83 buildUnnamed1353() { 83 buildUnnamed1360() {
84 var o = new core.List<api.CustomDimension>(); 84 var o = new core.List<api.CustomDimension>();
85 o.add(buildCustomDimension()); 85 o.add(buildCustomDimension());
86 o.add(buildCustomDimension()); 86 o.add(buildCustomDimension());
87 return o; 87 return o;
88 } 88 }
89 89
90 checkUnnamed1353(core.List<api.CustomDimension> o) { 90 checkUnnamed1360(core.List<api.CustomDimension> o) {
91 unittest.expect(o, unittest.hasLength(2)); 91 unittest.expect(o, unittest.hasLength(2));
92 checkCustomDimension(o[0]); 92 checkCustomDimension(o[0]);
93 checkCustomDimension(o[1]); 93 checkCustomDimension(o[1]);
94 } 94 }
95 95
96 buildUnnamed1354() { 96 buildUnnamed1361() {
97 var o = new core.List<api.CustomMetric>(); 97 var o = new core.List<api.CustomMetric>();
98 o.add(buildCustomMetric()); 98 o.add(buildCustomMetric());
99 o.add(buildCustomMetric()); 99 o.add(buildCustomMetric());
100 return o; 100 return o;
101 } 101 }
102 102
103 checkUnnamed1354(core.List<api.CustomMetric> o) { 103 checkUnnamed1361(core.List<api.CustomMetric> o) {
104 unittest.expect(o, unittest.hasLength(2)); 104 unittest.expect(o, unittest.hasLength(2));
105 checkCustomMetric(o[0]); 105 checkCustomMetric(o[0]);
106 checkCustomMetric(o[1]); 106 checkCustomMetric(o[1]);
107 } 107 }
108 108
109 core.int buildCounterConversion = 0; 109 core.int buildCounterConversion = 0;
110 buildConversion() { 110 buildConversion() {
111 var o = new api.Conversion(); 111 var o = new api.Conversion();
112 buildCounterConversion++; 112 buildCounterConversion++;
113 if (buildCounterConversion < 3) { 113 if (buildCounterConversion < 3) {
114 o.adGroupId = "foo"; 114 o.adGroupId = "foo";
115 o.adId = "foo"; 115 o.adId = "foo";
116 o.advertiserId = "foo"; 116 o.advertiserId = "foo";
117 o.agencyId = "foo"; 117 o.agencyId = "foo";
118 o.attributionModel = "foo"; 118 o.attributionModel = "foo";
119 o.campaignId = "foo"; 119 o.campaignId = "foo";
120 o.channel = "foo"; 120 o.channel = "foo";
121 o.clickId = "foo"; 121 o.clickId = "foo";
122 o.conversionId = "foo"; 122 o.conversionId = "foo";
123 o.conversionModifiedTimestamp = "foo"; 123 o.conversionModifiedTimestamp = "foo";
124 o.conversionTimestamp = "foo"; 124 o.conversionTimestamp = "foo";
125 o.countMillis = "foo"; 125 o.countMillis = "foo";
126 o.criterionId = "foo"; 126 o.criterionId = "foo";
127 o.currencyCode = "foo"; 127 o.currencyCode = "foo";
128 o.customDimension = buildUnnamed1353(); 128 o.customDimension = buildUnnamed1360();
129 o.customMetric = buildUnnamed1354(); 129 o.customMetric = buildUnnamed1361();
130 o.deviceType = "foo"; 130 o.deviceType = "foo";
131 o.dsConversionId = "foo"; 131 o.dsConversionId = "foo";
132 o.engineAccountId = "foo"; 132 o.engineAccountId = "foo";
133 o.floodlightOrderId = "foo"; 133 o.floodlightOrderId = "foo";
134 o.inventoryAccountId = "foo"; 134 o.inventoryAccountId = "foo";
135 o.productCountry = "foo"; 135 o.productCountry = "foo";
136 o.productGroupId = "foo"; 136 o.productGroupId = "foo";
137 o.productId = "foo"; 137 o.productId = "foo";
138 o.productLanguage = "foo"; 138 o.productLanguage = "foo";
139 o.quantityMillis = "foo"; 139 o.quantityMillis = "foo";
(...skipping 19 matching lines...) Expand all
159 unittest.expect(o.attributionModel, unittest.equals('foo')); 159 unittest.expect(o.attributionModel, unittest.equals('foo'));
160 unittest.expect(o.campaignId, unittest.equals('foo')); 160 unittest.expect(o.campaignId, unittest.equals('foo'));
161 unittest.expect(o.channel, unittest.equals('foo')); 161 unittest.expect(o.channel, unittest.equals('foo'));
162 unittest.expect(o.clickId, unittest.equals('foo')); 162 unittest.expect(o.clickId, unittest.equals('foo'));
163 unittest.expect(o.conversionId, unittest.equals('foo')); 163 unittest.expect(o.conversionId, unittest.equals('foo'));
164 unittest.expect(o.conversionModifiedTimestamp, unittest.equals('foo')); 164 unittest.expect(o.conversionModifiedTimestamp, unittest.equals('foo'));
165 unittest.expect(o.conversionTimestamp, unittest.equals('foo')); 165 unittest.expect(o.conversionTimestamp, unittest.equals('foo'));
166 unittest.expect(o.countMillis, unittest.equals('foo')); 166 unittest.expect(o.countMillis, unittest.equals('foo'));
167 unittest.expect(o.criterionId, unittest.equals('foo')); 167 unittest.expect(o.criterionId, unittest.equals('foo'));
168 unittest.expect(o.currencyCode, unittest.equals('foo')); 168 unittest.expect(o.currencyCode, unittest.equals('foo'));
169 checkUnnamed1353(o.customDimension); 169 checkUnnamed1360(o.customDimension);
170 checkUnnamed1354(o.customMetric); 170 checkUnnamed1361(o.customMetric);
171 unittest.expect(o.deviceType, unittest.equals('foo')); 171 unittest.expect(o.deviceType, unittest.equals('foo'));
172 unittest.expect(o.dsConversionId, unittest.equals('foo')); 172 unittest.expect(o.dsConversionId, unittest.equals('foo'));
173 unittest.expect(o.engineAccountId, unittest.equals('foo')); 173 unittest.expect(o.engineAccountId, unittest.equals('foo'));
174 unittest.expect(o.floodlightOrderId, unittest.equals('foo')); 174 unittest.expect(o.floodlightOrderId, unittest.equals('foo'));
175 unittest.expect(o.inventoryAccountId, unittest.equals('foo')); 175 unittest.expect(o.inventoryAccountId, unittest.equals('foo'));
176 unittest.expect(o.productCountry, unittest.equals('foo')); 176 unittest.expect(o.productCountry, unittest.equals('foo'));
177 unittest.expect(o.productGroupId, unittest.equals('foo')); 177 unittest.expect(o.productGroupId, unittest.equals('foo'));
178 unittest.expect(o.productId, unittest.equals('foo')); 178 unittest.expect(o.productId, unittest.equals('foo'));
179 unittest.expect(o.productLanguage, unittest.equals('foo')); 179 unittest.expect(o.productLanguage, unittest.equals('foo'));
180 unittest.expect(o.quantityMillis, unittest.equals('foo')); 180 unittest.expect(o.quantityMillis, unittest.equals('foo'));
181 unittest.expect(o.revenueMicros, unittest.equals('foo')); 181 unittest.expect(o.revenueMicros, unittest.equals('foo'));
182 unittest.expect(o.segmentationId, unittest.equals('foo')); 182 unittest.expect(o.segmentationId, unittest.equals('foo'));
183 unittest.expect(o.segmentationName, unittest.equals('foo')); 183 unittest.expect(o.segmentationName, unittest.equals('foo'));
184 unittest.expect(o.segmentationType, unittest.equals('foo')); 184 unittest.expect(o.segmentationType, unittest.equals('foo'));
185 unittest.expect(o.state, unittest.equals('foo')); 185 unittest.expect(o.state, unittest.equals('foo'));
186 unittest.expect(o.storeId, unittest.equals('foo')); 186 unittest.expect(o.storeId, unittest.equals('foo'));
187 unittest.expect(o.type, unittest.equals('foo')); 187 unittest.expect(o.type, unittest.equals('foo'));
188 } 188 }
189 buildCounterConversion--; 189 buildCounterConversion--;
190 } 190 }
191 191
192 buildUnnamed1355() { 192 buildUnnamed1362() {
193 var o = new core.List<api.Conversion>(); 193 var o = new core.List<api.Conversion>();
194 o.add(buildConversion()); 194 o.add(buildConversion());
195 o.add(buildConversion()); 195 o.add(buildConversion());
196 return o; 196 return o;
197 } 197 }
198 198
199 checkUnnamed1355(core.List<api.Conversion> o) { 199 checkUnnamed1362(core.List<api.Conversion> o) {
200 unittest.expect(o, unittest.hasLength(2)); 200 unittest.expect(o, unittest.hasLength(2));
201 checkConversion(o[0]); 201 checkConversion(o[0]);
202 checkConversion(o[1]); 202 checkConversion(o[1]);
203 } 203 }
204 204
205 core.int buildCounterConversionList = 0; 205 core.int buildCounterConversionList = 0;
206 buildConversionList() { 206 buildConversionList() {
207 var o = new api.ConversionList(); 207 var o = new api.ConversionList();
208 buildCounterConversionList++; 208 buildCounterConversionList++;
209 if (buildCounterConversionList < 3) { 209 if (buildCounterConversionList < 3) {
210 o.conversion = buildUnnamed1355(); 210 o.conversion = buildUnnamed1362();
211 o.kind = "foo"; 211 o.kind = "foo";
212 } 212 }
213 buildCounterConversionList--; 213 buildCounterConversionList--;
214 return o; 214 return o;
215 } 215 }
216 216
217 checkConversionList(api.ConversionList o) { 217 checkConversionList(api.ConversionList o) {
218 buildCounterConversionList++; 218 buildCounterConversionList++;
219 if (buildCounterConversionList < 3) { 219 if (buildCounterConversionList < 3) {
220 checkUnnamed1355(o.conversion); 220 checkUnnamed1362(o.conversion);
221 unittest.expect(o.kind, unittest.equals('foo')); 221 unittest.expect(o.kind, unittest.equals('foo'));
222 } 222 }
223 buildCounterConversionList--; 223 buildCounterConversionList--;
224 } 224 }
225 225
226 core.int buildCounterCustomDimension = 0; 226 core.int buildCounterCustomDimension = 0;
227 buildCustomDimension() { 227 buildCustomDimension() {
228 var o = new api.CustomDimension(); 228 var o = new api.CustomDimension();
229 buildCounterCustomDimension++; 229 buildCounterCustomDimension++;
230 if (buildCounterCustomDimension < 3) { 230 if (buildCounterCustomDimension < 3) {
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 279
280 checkReportFiles(api.ReportFiles o) { 280 checkReportFiles(api.ReportFiles o) {
281 buildCounterReportFiles++; 281 buildCounterReportFiles++;
282 if (buildCounterReportFiles < 3) { 282 if (buildCounterReportFiles < 3) {
283 unittest.expect(o.byteCount, unittest.equals('foo')); 283 unittest.expect(o.byteCount, unittest.equals('foo'));
284 unittest.expect(o.url, unittest.equals('foo')); 284 unittest.expect(o.url, unittest.equals('foo'));
285 } 285 }
286 buildCounterReportFiles--; 286 buildCounterReportFiles--;
287 } 287 }
288 288
289 buildUnnamed1356() { 289 buildUnnamed1363() {
290 var o = new core.List<api.ReportFiles>(); 290 var o = new core.List<api.ReportFiles>();
291 o.add(buildReportFiles()); 291 o.add(buildReportFiles());
292 o.add(buildReportFiles()); 292 o.add(buildReportFiles());
293 return o; 293 return o;
294 } 294 }
295 295
296 checkUnnamed1356(core.List<api.ReportFiles> o) { 296 checkUnnamed1363(core.List<api.ReportFiles> o) {
297 unittest.expect(o, unittest.hasLength(2)); 297 unittest.expect(o, unittest.hasLength(2));
298 checkReportFiles(o[0]); 298 checkReportFiles(o[0]);
299 checkReportFiles(o[1]); 299 checkReportFiles(o[1]);
300 } 300 }
301 301
302 buildUnnamed1357() { 302 buildUnnamed1364() {
303 var o = new core.List<api.ReportRow>(); 303 var o = new core.List<api.ReportRow>();
304 o.add(buildReportRow()); 304 o.add(buildReportRow());
305 o.add(buildReportRow()); 305 o.add(buildReportRow());
306 return o; 306 return o;
307 } 307 }
308 308
309 checkUnnamed1357(core.List<api.ReportRow> o) { 309 checkUnnamed1364(core.List<api.ReportRow> o) {
310 unittest.expect(o, unittest.hasLength(2)); 310 unittest.expect(o, unittest.hasLength(2));
311 checkReportRow(o[0]); 311 checkReportRow(o[0]);
312 checkReportRow(o[1]); 312 checkReportRow(o[1]);
313 } 313 }
314 314
315 core.int buildCounterReport = 0; 315 core.int buildCounterReport = 0;
316 buildReport() { 316 buildReport() {
317 var o = new api.Report(); 317 var o = new api.Report();
318 buildCounterReport++; 318 buildCounterReport++;
319 if (buildCounterReport < 3) { 319 if (buildCounterReport < 3) {
320 o.files = buildUnnamed1356(); 320 o.files = buildUnnamed1363();
321 o.id = "foo"; 321 o.id = "foo";
322 o.isReportReady = true; 322 o.isReportReady = true;
323 o.kind = "foo"; 323 o.kind = "foo";
324 o.request = buildReportRequest(); 324 o.request = buildReportRequest();
325 o.rowCount = 42; 325 o.rowCount = 42;
326 o.rows = buildUnnamed1357(); 326 o.rows = buildUnnamed1364();
327 o.statisticsCurrencyCode = "foo"; 327 o.statisticsCurrencyCode = "foo";
328 o.statisticsTimeZone = "foo"; 328 o.statisticsTimeZone = "foo";
329 } 329 }
330 buildCounterReport--; 330 buildCounterReport--;
331 return o; 331 return o;
332 } 332 }
333 333
334 checkReport(api.Report o) { 334 checkReport(api.Report o) {
335 buildCounterReport++; 335 buildCounterReport++;
336 if (buildCounterReport < 3) { 336 if (buildCounterReport < 3) {
337 checkUnnamed1356(o.files); 337 checkUnnamed1363(o.files);
338 unittest.expect(o.id, unittest.equals('foo')); 338 unittest.expect(o.id, unittest.equals('foo'));
339 unittest.expect(o.isReportReady, unittest.isTrue); 339 unittest.expect(o.isReportReady, unittest.isTrue);
340 unittest.expect(o.kind, unittest.equals('foo')); 340 unittest.expect(o.kind, unittest.equals('foo'));
341 checkReportRequest(o.request); 341 checkReportRequest(o.request);
342 unittest.expect(o.rowCount, unittest.equals(42)); 342 unittest.expect(o.rowCount, unittest.equals(42));
343 checkUnnamed1357(o.rows); 343 checkUnnamed1364(o.rows);
344 unittest.expect(o.statisticsCurrencyCode, unittest.equals('foo')); 344 unittest.expect(o.statisticsCurrencyCode, unittest.equals('foo'));
345 unittest.expect(o.statisticsTimeZone, unittest.equals('foo')); 345 unittest.expect(o.statisticsTimeZone, unittest.equals('foo'));
346 } 346 }
347 buildCounterReport--; 347 buildCounterReport--;
348 } 348 }
349 349
350 core.int buildCounterReportApiColumnSpec = 0; 350 core.int buildCounterReportApiColumnSpec = 0;
351 buildReportApiColumnSpec() { 351 buildReportApiColumnSpec() {
352 var o = new api.ReportApiColumnSpec(); 352 var o = new api.ReportApiColumnSpec();
353 buildCounterReportApiColumnSpec++; 353 buildCounterReportApiColumnSpec++;
(...skipping 23 matching lines...) Expand all
377 unittest.expect(o.groupByColumn, unittest.isTrue); 377 unittest.expect(o.groupByColumn, unittest.isTrue);
378 unittest.expect(o.headerText, unittest.equals('foo')); 378 unittest.expect(o.headerText, unittest.equals('foo'));
379 unittest.expect(o.platformSource, unittest.equals('foo')); 379 unittest.expect(o.platformSource, unittest.equals('foo'));
380 unittest.expect(o.productReportPerspective, unittest.equals('foo')); 380 unittest.expect(o.productReportPerspective, unittest.equals('foo'));
381 unittest.expect(o.savedColumnName, unittest.equals('foo')); 381 unittest.expect(o.savedColumnName, unittest.equals('foo'));
382 unittest.expect(o.startDate, unittest.equals('foo')); 382 unittest.expect(o.startDate, unittest.equals('foo'));
383 } 383 }
384 buildCounterReportApiColumnSpec--; 384 buildCounterReportApiColumnSpec--;
385 } 385 }
386 386
387 buildUnnamed1358() { 387 buildUnnamed1365() {
388 var o = new core.List<api.ReportApiColumnSpec>(); 388 var o = new core.List<api.ReportApiColumnSpec>();
389 o.add(buildReportApiColumnSpec()); 389 o.add(buildReportApiColumnSpec());
390 o.add(buildReportApiColumnSpec()); 390 o.add(buildReportApiColumnSpec());
391 return o; 391 return o;
392 } 392 }
393 393
394 checkUnnamed1358(core.List<api.ReportApiColumnSpec> o) { 394 checkUnnamed1365(core.List<api.ReportApiColumnSpec> o) {
395 unittest.expect(o, unittest.hasLength(2)); 395 unittest.expect(o, unittest.hasLength(2));
396 checkReportApiColumnSpec(o[0]); 396 checkReportApiColumnSpec(o[0]);
397 checkReportApiColumnSpec(o[1]); 397 checkReportApiColumnSpec(o[1]);
398 } 398 }
399 399
400 buildUnnamed1359() { 400 buildUnnamed1366() {
401 var o = new core.List<core.Object>(); 401 var o = new core.List<core.Object>();
402 o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}); 402 o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'});
403 o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}); 403 o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'});
404 return o; 404 return o;
405 } 405 }
406 406
407 checkUnnamed1359(core.List<core.Object> o) { 407 checkUnnamed1366(core.List<core.Object> o) {
408 unittest.expect(o, unittest.hasLength(2)); 408 unittest.expect(o, unittest.hasLength(2));
409 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')); 409 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'));
410 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')); 410 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'));
411 } 411 }
412 412
413 core.int buildCounterReportRequestFilters = 0; 413 core.int buildCounterReportRequestFilters = 0;
414 buildReportRequestFilters() { 414 buildReportRequestFilters() {
415 var o = new api.ReportRequestFilters(); 415 var o = new api.ReportRequestFilters();
416 buildCounterReportRequestFilters++; 416 buildCounterReportRequestFilters++;
417 if (buildCounterReportRequestFilters < 3) { 417 if (buildCounterReportRequestFilters < 3) {
418 o.column = buildReportApiColumnSpec(); 418 o.column = buildReportApiColumnSpec();
419 o.operator = "foo"; 419 o.operator = "foo";
420 o.values = buildUnnamed1359(); 420 o.values = buildUnnamed1366();
421 } 421 }
422 buildCounterReportRequestFilters--; 422 buildCounterReportRequestFilters--;
423 return o; 423 return o;
424 } 424 }
425 425
426 checkReportRequestFilters(api.ReportRequestFilters o) { 426 checkReportRequestFilters(api.ReportRequestFilters o) {
427 buildCounterReportRequestFilters++; 427 buildCounterReportRequestFilters++;
428 if (buildCounterReportRequestFilters < 3) { 428 if (buildCounterReportRequestFilters < 3) {
429 checkReportApiColumnSpec(o.column); 429 checkReportApiColumnSpec(o.column);
430 unittest.expect(o.operator, unittest.equals('foo')); 430 unittest.expect(o.operator, unittest.equals('foo'));
431 checkUnnamed1359(o.values); 431 checkUnnamed1366(o.values);
432 } 432 }
433 buildCounterReportRequestFilters--; 433 buildCounterReportRequestFilters--;
434 } 434 }
435 435
436 buildUnnamed1360() { 436 buildUnnamed1367() {
437 var o = new core.List<api.ReportRequestFilters>(); 437 var o = new core.List<api.ReportRequestFilters>();
438 o.add(buildReportRequestFilters()); 438 o.add(buildReportRequestFilters());
439 o.add(buildReportRequestFilters()); 439 o.add(buildReportRequestFilters());
440 return o; 440 return o;
441 } 441 }
442 442
443 checkUnnamed1360(core.List<api.ReportRequestFilters> o) { 443 checkUnnamed1367(core.List<api.ReportRequestFilters> o) {
444 unittest.expect(o, unittest.hasLength(2)); 444 unittest.expect(o, unittest.hasLength(2));
445 checkReportRequestFilters(o[0]); 445 checkReportRequestFilters(o[0]);
446 checkReportRequestFilters(o[1]); 446 checkReportRequestFilters(o[1]);
447 } 447 }
448 448
449 core.int buildCounterReportRequestOrderBy = 0; 449 core.int buildCounterReportRequestOrderBy = 0;
450 buildReportRequestOrderBy() { 450 buildReportRequestOrderBy() {
451 var o = new api.ReportRequestOrderBy(); 451 var o = new api.ReportRequestOrderBy();
452 buildCounterReportRequestOrderBy++; 452 buildCounterReportRequestOrderBy++;
453 if (buildCounterReportRequestOrderBy < 3) { 453 if (buildCounterReportRequestOrderBy < 3) {
454 o.column = buildReportApiColumnSpec(); 454 o.column = buildReportApiColumnSpec();
455 o.sortOrder = "foo"; 455 o.sortOrder = "foo";
456 } 456 }
457 buildCounterReportRequestOrderBy--; 457 buildCounterReportRequestOrderBy--;
458 return o; 458 return o;
459 } 459 }
460 460
461 checkReportRequestOrderBy(api.ReportRequestOrderBy o) { 461 checkReportRequestOrderBy(api.ReportRequestOrderBy o) {
462 buildCounterReportRequestOrderBy++; 462 buildCounterReportRequestOrderBy++;
463 if (buildCounterReportRequestOrderBy < 3) { 463 if (buildCounterReportRequestOrderBy < 3) {
464 checkReportApiColumnSpec(o.column); 464 checkReportApiColumnSpec(o.column);
465 unittest.expect(o.sortOrder, unittest.equals('foo')); 465 unittest.expect(o.sortOrder, unittest.equals('foo'));
466 } 466 }
467 buildCounterReportRequestOrderBy--; 467 buildCounterReportRequestOrderBy--;
468 } 468 }
469 469
470 buildUnnamed1361() { 470 buildUnnamed1368() {
471 var o = new core.List<api.ReportRequestOrderBy>(); 471 var o = new core.List<api.ReportRequestOrderBy>();
472 o.add(buildReportRequestOrderBy()); 472 o.add(buildReportRequestOrderBy());
473 o.add(buildReportRequestOrderBy()); 473 o.add(buildReportRequestOrderBy());
474 return o; 474 return o;
475 } 475 }
476 476
477 checkUnnamed1361(core.List<api.ReportRequestOrderBy> o) { 477 checkUnnamed1368(core.List<api.ReportRequestOrderBy> o) {
478 unittest.expect(o, unittest.hasLength(2)); 478 unittest.expect(o, unittest.hasLength(2));
479 checkReportRequestOrderBy(o[0]); 479 checkReportRequestOrderBy(o[0]);
480 checkReportRequestOrderBy(o[1]); 480 checkReportRequestOrderBy(o[1]);
481 } 481 }
482 482
483 core.int buildCounterReportRequestReportScope = 0; 483 core.int buildCounterReportRequestReportScope = 0;
484 buildReportRequestReportScope() { 484 buildReportRequestReportScope() {
485 var o = new api.ReportRequestReportScope(); 485 var o = new api.ReportRequestReportScope();
486 buildCounterReportRequestReportScope++; 486 buildCounterReportRequestReportScope++;
487 if (buildCounterReportRequestReportScope < 3) { 487 if (buildCounterReportRequestReportScope < 3) {
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
534 unittest.expect(o.startDate, unittest.equals('foo')); 534 unittest.expect(o.startDate, unittest.equals('foo'));
535 } 535 }
536 buildCounterReportRequestTimeRange--; 536 buildCounterReportRequestTimeRange--;
537 } 537 }
538 538
539 core.int buildCounterReportRequest = 0; 539 core.int buildCounterReportRequest = 0;
540 buildReportRequest() { 540 buildReportRequest() {
541 var o = new api.ReportRequest(); 541 var o = new api.ReportRequest();
542 buildCounterReportRequest++; 542 buildCounterReportRequest++;
543 if (buildCounterReportRequest < 3) { 543 if (buildCounterReportRequest < 3) {
544 o.columns = buildUnnamed1358(); 544 o.columns = buildUnnamed1365();
545 o.downloadFormat = "foo"; 545 o.downloadFormat = "foo";
546 o.filters = buildUnnamed1360(); 546 o.filters = buildUnnamed1367();
547 o.includeDeletedEntities = true; 547 o.includeDeletedEntities = true;
548 o.includeRemovedEntities = true; 548 o.includeRemovedEntities = true;
549 o.maxRowsPerFile = 42; 549 o.maxRowsPerFile = 42;
550 o.orderBy = buildUnnamed1361(); 550 o.orderBy = buildUnnamed1368();
551 o.reportScope = buildReportRequestReportScope(); 551 o.reportScope = buildReportRequestReportScope();
552 o.reportType = "foo"; 552 o.reportType = "foo";
553 o.rowCount = 42; 553 o.rowCount = 42;
554 o.startRow = 42; 554 o.startRow = 42;
555 o.statisticsCurrency = "foo"; 555 o.statisticsCurrency = "foo";
556 o.timeRange = buildReportRequestTimeRange(); 556 o.timeRange = buildReportRequestTimeRange();
557 o.verifySingleTimeZone = true; 557 o.verifySingleTimeZone = true;
558 } 558 }
559 buildCounterReportRequest--; 559 buildCounterReportRequest--;
560 return o; 560 return o;
561 } 561 }
562 562
563 checkReportRequest(api.ReportRequest o) { 563 checkReportRequest(api.ReportRequest o) {
564 buildCounterReportRequest++; 564 buildCounterReportRequest++;
565 if (buildCounterReportRequest < 3) { 565 if (buildCounterReportRequest < 3) {
566 checkUnnamed1358(o.columns); 566 checkUnnamed1365(o.columns);
567 unittest.expect(o.downloadFormat, unittest.equals('foo')); 567 unittest.expect(o.downloadFormat, unittest.equals('foo'));
568 checkUnnamed1360(o.filters); 568 checkUnnamed1367(o.filters);
569 unittest.expect(o.includeDeletedEntities, unittest.isTrue); 569 unittest.expect(o.includeDeletedEntities, unittest.isTrue);
570 unittest.expect(o.includeRemovedEntities, unittest.isTrue); 570 unittest.expect(o.includeRemovedEntities, unittest.isTrue);
571 unittest.expect(o.maxRowsPerFile, unittest.equals(42)); 571 unittest.expect(o.maxRowsPerFile, unittest.equals(42));
572 checkUnnamed1361(o.orderBy); 572 checkUnnamed1368(o.orderBy);
573 checkReportRequestReportScope(o.reportScope); 573 checkReportRequestReportScope(o.reportScope);
574 unittest.expect(o.reportType, unittest.equals('foo')); 574 unittest.expect(o.reportType, unittest.equals('foo'));
575 unittest.expect(o.rowCount, unittest.equals(42)); 575 unittest.expect(o.rowCount, unittest.equals(42));
576 unittest.expect(o.startRow, unittest.equals(42)); 576 unittest.expect(o.startRow, unittest.equals(42));
577 unittest.expect(o.statisticsCurrency, unittest.equals('foo')); 577 unittest.expect(o.statisticsCurrency, unittest.equals('foo'));
578 checkReportRequestTimeRange(o.timeRange); 578 checkReportRequestTimeRange(o.timeRange);
579 unittest.expect(o.verifySingleTimeZone, unittest.isTrue); 579 unittest.expect(o.verifySingleTimeZone, unittest.isTrue);
580 } 580 }
581 buildCounterReportRequest--; 581 buildCounterReportRequest--;
582 } 582 }
(...skipping 27 matching lines...) Expand all
610 checkSavedColumn(api.SavedColumn o) { 610 checkSavedColumn(api.SavedColumn o) {
611 buildCounterSavedColumn++; 611 buildCounterSavedColumn++;
612 if (buildCounterSavedColumn < 3) { 612 if (buildCounterSavedColumn < 3) {
613 unittest.expect(o.kind, unittest.equals('foo')); 613 unittest.expect(o.kind, unittest.equals('foo'));
614 unittest.expect(o.savedColumnName, unittest.equals('foo')); 614 unittest.expect(o.savedColumnName, unittest.equals('foo'));
615 unittest.expect(o.type, unittest.equals('foo')); 615 unittest.expect(o.type, unittest.equals('foo'));
616 } 616 }
617 buildCounterSavedColumn--; 617 buildCounterSavedColumn--;
618 } 618 }
619 619
620 buildUnnamed1362() { 620 buildUnnamed1369() {
621 var o = new core.List<api.SavedColumn>(); 621 var o = new core.List<api.SavedColumn>();
622 o.add(buildSavedColumn()); 622 o.add(buildSavedColumn());
623 o.add(buildSavedColumn()); 623 o.add(buildSavedColumn());
624 return o; 624 return o;
625 } 625 }
626 626
627 checkUnnamed1362(core.List<api.SavedColumn> o) { 627 checkUnnamed1369(core.List<api.SavedColumn> o) {
628 unittest.expect(o, unittest.hasLength(2)); 628 unittest.expect(o, unittest.hasLength(2));
629 checkSavedColumn(o[0]); 629 checkSavedColumn(o[0]);
630 checkSavedColumn(o[1]); 630 checkSavedColumn(o[1]);
631 } 631 }
632 632
633 core.int buildCounterSavedColumnList = 0; 633 core.int buildCounterSavedColumnList = 0;
634 buildSavedColumnList() { 634 buildSavedColumnList() {
635 var o = new api.SavedColumnList(); 635 var o = new api.SavedColumnList();
636 buildCounterSavedColumnList++; 636 buildCounterSavedColumnList++;
637 if (buildCounterSavedColumnList < 3) { 637 if (buildCounterSavedColumnList < 3) {
638 o.items = buildUnnamed1362(); 638 o.items = buildUnnamed1369();
639 o.kind = "foo"; 639 o.kind = "foo";
640 } 640 }
641 buildCounterSavedColumnList--; 641 buildCounterSavedColumnList--;
642 return o; 642 return o;
643 } 643 }
644 644
645 checkSavedColumnList(api.SavedColumnList o) { 645 checkSavedColumnList(api.SavedColumnList o) {
646 buildCounterSavedColumnList++; 646 buildCounterSavedColumnList++;
647 if (buildCounterSavedColumnList < 3) { 647 if (buildCounterSavedColumnList < 3) {
648 checkUnnamed1362(o.items); 648 checkUnnamed1369(o.items);
649 unittest.expect(o.kind, unittest.equals('foo')); 649 unittest.expect(o.kind, unittest.equals('foo'));
650 } 650 }
651 buildCounterSavedColumnList--; 651 buildCounterSavedColumnList--;
652 } 652 }
653 653
654 buildUnnamed1363() { 654 buildUnnamed1370() {
655 var o = new core.List<api.Availability>(); 655 var o = new core.List<api.Availability>();
656 o.add(buildAvailability()); 656 o.add(buildAvailability());
657 o.add(buildAvailability()); 657 o.add(buildAvailability());
658 return o; 658 return o;
659 } 659 }
660 660
661 checkUnnamed1363(core.List<api.Availability> o) { 661 checkUnnamed1370(core.List<api.Availability> o) {
662 unittest.expect(o, unittest.hasLength(2)); 662 unittest.expect(o, unittest.hasLength(2));
663 checkAvailability(o[0]); 663 checkAvailability(o[0]);
664 checkAvailability(o[1]); 664 checkAvailability(o[1]);
665 } 665 }
666 666
667 core.int buildCounterUpdateAvailabilityRequest = 0; 667 core.int buildCounterUpdateAvailabilityRequest = 0;
668 buildUpdateAvailabilityRequest() { 668 buildUpdateAvailabilityRequest() {
669 var o = new api.UpdateAvailabilityRequest(); 669 var o = new api.UpdateAvailabilityRequest();
670 buildCounterUpdateAvailabilityRequest++; 670 buildCounterUpdateAvailabilityRequest++;
671 if (buildCounterUpdateAvailabilityRequest < 3) { 671 if (buildCounterUpdateAvailabilityRequest < 3) {
672 o.availabilities = buildUnnamed1363(); 672 o.availabilities = buildUnnamed1370();
673 } 673 }
674 buildCounterUpdateAvailabilityRequest--; 674 buildCounterUpdateAvailabilityRequest--;
675 return o; 675 return o;
676 } 676 }
677 677
678 checkUpdateAvailabilityRequest(api.UpdateAvailabilityRequest o) { 678 checkUpdateAvailabilityRequest(api.UpdateAvailabilityRequest o) {
679 buildCounterUpdateAvailabilityRequest++; 679 buildCounterUpdateAvailabilityRequest++;
680 if (buildCounterUpdateAvailabilityRequest < 3) { 680 if (buildCounterUpdateAvailabilityRequest < 3) {
681 checkUnnamed1363(o.availabilities); 681 checkUnnamed1370(o.availabilities);
682 } 682 }
683 buildCounterUpdateAvailabilityRequest--; 683 buildCounterUpdateAvailabilityRequest--;
684 } 684 }
685 685
686 buildUnnamed1364() { 686 buildUnnamed1371() {
687 var o = new core.List<api.Availability>(); 687 var o = new core.List<api.Availability>();
688 o.add(buildAvailability()); 688 o.add(buildAvailability());
689 o.add(buildAvailability()); 689 o.add(buildAvailability());
690 return o; 690 return o;
691 } 691 }
692 692
693 checkUnnamed1364(core.List<api.Availability> o) { 693 checkUnnamed1371(core.List<api.Availability> o) {
694 unittest.expect(o, unittest.hasLength(2)); 694 unittest.expect(o, unittest.hasLength(2));
695 checkAvailability(o[0]); 695 checkAvailability(o[0]);
696 checkAvailability(o[1]); 696 checkAvailability(o[1]);
697 } 697 }
698 698
699 core.int buildCounterUpdateAvailabilityResponse = 0; 699 core.int buildCounterUpdateAvailabilityResponse = 0;
700 buildUpdateAvailabilityResponse() { 700 buildUpdateAvailabilityResponse() {
701 var o = new api.UpdateAvailabilityResponse(); 701 var o = new api.UpdateAvailabilityResponse();
702 buildCounterUpdateAvailabilityResponse++; 702 buildCounterUpdateAvailabilityResponse++;
703 if (buildCounterUpdateAvailabilityResponse < 3) { 703 if (buildCounterUpdateAvailabilityResponse < 3) {
704 o.availabilities = buildUnnamed1364(); 704 o.availabilities = buildUnnamed1371();
705 } 705 }
706 buildCounterUpdateAvailabilityResponse--; 706 buildCounterUpdateAvailabilityResponse--;
707 return o; 707 return o;
708 } 708 }
709 709
710 checkUpdateAvailabilityResponse(api.UpdateAvailabilityResponse o) { 710 checkUpdateAvailabilityResponse(api.UpdateAvailabilityResponse o) {
711 buildCounterUpdateAvailabilityResponse++; 711 buildCounterUpdateAvailabilityResponse++;
712 if (buildCounterUpdateAvailabilityResponse < 3) { 712 if (buildCounterUpdateAvailabilityResponse < 3) {
713 checkUnnamed1364(o.availabilities); 713 checkUnnamed1371(o.availabilities);
714 } 714 }
715 buildCounterUpdateAvailabilityResponse--; 715 buildCounterUpdateAvailabilityResponse--;
716 } 716 }
717 717
718 718
719 main() { 719 main() {
720 unittest.group("obj-schema-Availability", () { 720 unittest.group("obj-schema-Availability", () {
721 unittest.test("to-json--from-json", () { 721 unittest.test("to-json--from-json", () {
722 var o = buildAvailability(); 722 var o = buildAvailability();
723 var od = new api.Availability.fromJson(o.toJson()); 723 var od = new api.Availability.fromJson(o.toJson());
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
888 var arg_advertiserId = "foo"; 888 var arg_advertiserId = "foo";
889 var arg_engineAccountId = "foo"; 889 var arg_engineAccountId = "foo";
890 var arg_endDate = 42; 890 var arg_endDate = 42;
891 var arg_rowCount = 42; 891 var arg_rowCount = 42;
892 var arg_startDate = 42; 892 var arg_startDate = 42;
893 var arg_startRow = 42; 893 var arg_startRow = 42;
894 var arg_adGroupId = "foo"; 894 var arg_adGroupId = "foo";
895 var arg_adId = "foo"; 895 var arg_adId = "foo";
896 var arg_campaignId = "foo"; 896 var arg_campaignId = "foo";
897 var arg_criterionId = "foo"; 897 var arg_criterionId = "foo";
898 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 898 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
899 var path = (req.url).path; 899 var path = (req.url).path;
900 var pathOffset = 0; 900 var pathOffset = 0;
901 var index; 901 var index;
902 var subPart; 902 var subPart;
903 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 903 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
904 pathOffset += 1; 904 pathOffset += 1;
905 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq uals("doubleclicksearch/v2/")); 905 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq uals("doubleclicksearch/v2/"));
906 pathOffset += 21; 906 pathOffset += 21;
907 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ als("agency/")); 907 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ als("agency/"));
908 pathOffset += 7; 908 pathOffset += 7;
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
953 unittest.expect(queryMap["campaignId"].first, unittest.equals(arg_campai gnId)); 953 unittest.expect(queryMap["campaignId"].first, unittest.equals(arg_campai gnId));
954 unittest.expect(queryMap["criterionId"].first, unittest.equals(arg_crite rionId)); 954 unittest.expect(queryMap["criterionId"].first, unittest.equals(arg_crite rionId));
955 955
956 956
957 var h = { 957 var h = {
958 "content-type" : "application/json; charset=utf-8", 958 "content-type" : "application/json; charset=utf-8",
959 }; 959 };
960 var resp = convert.JSON.encode(buildConversionList()); 960 var resp = convert.JSON.encode(buildConversionList());
961 return new async.Future.value(stringResponse(200, h, resp)); 961 return new async.Future.value(stringResponse(200, h, resp));
962 }), true); 962 }), true);
963 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) { 963 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 ectAsync1(((api.ConversionList response) {
964 checkConversionList(response); 964 checkConversionList(response);
965 }))); 965 })));
966 }); 966 });
967 967
968 unittest.test("method--insert", () { 968 unittest.test("method--insert", () {
969 969
970 var mock = new HttpServerMock(); 970 var mock = new HttpServerMock();
971 api.ConversionResourceApi res = new api.DoubleclicksearchApi(mock).convers ion; 971 api.ConversionResourceApi res = new api.DoubleclicksearchApi(mock).convers ion;
972 var arg_request = buildConversionList(); 972 var arg_request = buildConversionList();
973 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 973 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
974 var obj = new api.ConversionList.fromJson(json); 974 var obj = new api.ConversionList.fromJson(json);
975 checkConversionList(obj); 975 checkConversionList(obj);
976 976
977 var path = (req.url).path; 977 var path = (req.url).path;
978 var pathOffset = 0; 978 var pathOffset = 0;
979 var index; 979 var index;
980 var subPart; 980 var subPart;
981 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 981 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
982 pathOffset += 1; 982 pathOffset += 1;
983 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq uals("doubleclicksearch/v2/")); 983 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq uals("doubleclicksearch/v2/"));
(...skipping 18 matching lines...) Expand all
1002 } 1002 }
1003 } 1003 }
1004 1004
1005 1005
1006 var h = { 1006 var h = {
1007 "content-type" : "application/json; charset=utf-8", 1007 "content-type" : "application/json; charset=utf-8",
1008 }; 1008 };
1009 var resp = convert.JSON.encode(buildConversionList()); 1009 var resp = convert.JSON.encode(buildConversionList());
1010 return new async.Future.value(stringResponse(200, h, resp)); 1010 return new async.Future.value(stringResponse(200, h, resp));
1011 }), true); 1011 }), true);
1012 res.insert(arg_request).then(unittest.expectAsync(((api.ConversionList res ponse) { 1012 res.insert(arg_request).then(unittest.expectAsync1(((api.ConversionList re sponse) {
1013 checkConversionList(response); 1013 checkConversionList(response);
1014 }))); 1014 })));
1015 }); 1015 });
1016 1016
1017 unittest.test("method--patch", () { 1017 unittest.test("method--patch", () {
1018 1018
1019 var mock = new HttpServerMock(); 1019 var mock = new HttpServerMock();
1020 api.ConversionResourceApi res = new api.DoubleclicksearchApi(mock).convers ion; 1020 api.ConversionResourceApi res = new api.DoubleclicksearchApi(mock).convers ion;
1021 var arg_request = buildConversionList(); 1021 var arg_request = buildConversionList();
1022 var arg_advertiserId = "foo"; 1022 var arg_advertiserId = "foo";
1023 var arg_agencyId = "foo"; 1023 var arg_agencyId = "foo";
1024 var arg_endDate = 42; 1024 var arg_endDate = 42;
1025 var arg_engineAccountId = "foo"; 1025 var arg_engineAccountId = "foo";
1026 var arg_rowCount = 42; 1026 var arg_rowCount = 42;
1027 var arg_startDate = 42; 1027 var arg_startDate = 42;
1028 var arg_startRow = 42; 1028 var arg_startRow = 42;
1029 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 1029 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
1030 var obj = new api.ConversionList.fromJson(json); 1030 var obj = new api.ConversionList.fromJson(json);
1031 checkConversionList(obj); 1031 checkConversionList(obj);
1032 1032
1033 var path = (req.url).path; 1033 var path = (req.url).path;
1034 var pathOffset = 0; 1034 var pathOffset = 0;
1035 var index; 1035 var index;
1036 var subPart; 1036 var subPart;
1037 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 1037 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
1038 pathOffset += 1; 1038 pathOffset += 1;
1039 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq uals("doubleclicksearch/v2/")); 1039 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq uals("doubleclicksearch/v2/"));
(...skipping 25 matching lines...) Expand all
1065 unittest.expect(core.int.parse(queryMap["startDate"].first), unittest.eq uals(arg_startDate)); 1065 unittest.expect(core.int.parse(queryMap["startDate"].first), unittest.eq uals(arg_startDate));
1066 unittest.expect(core.int.parse(queryMap["startRow"].first), unittest.equ als(arg_startRow)); 1066 unittest.expect(core.int.parse(queryMap["startRow"].first), unittest.equ als(arg_startRow));
1067 1067
1068 1068
1069 var h = { 1069 var h = {
1070 "content-type" : "application/json; charset=utf-8", 1070 "content-type" : "application/json; charset=utf-8",
1071 }; 1071 };
1072 var resp = convert.JSON.encode(buildConversionList()); 1072 var resp = convert.JSON.encode(buildConversionList());
1073 return new async.Future.value(stringResponse(200, h, resp)); 1073 return new async.Future.value(stringResponse(200, h, resp));
1074 }), true); 1074 }), true);
1075 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) { 1075 res.patch(arg_request, arg_advertiserId, arg_agencyId, arg_endDate, arg_en gineAccountId, arg_rowCount, arg_startDate, arg_startRow).then(unittest.expectAs ync1(((api.ConversionList response) {
1076 checkConversionList(response); 1076 checkConversionList(response);
1077 }))); 1077 })));
1078 }); 1078 });
1079 1079
1080 unittest.test("method--update", () { 1080 unittest.test("method--update", () {
1081 1081
1082 var mock = new HttpServerMock(); 1082 var mock = new HttpServerMock();
1083 api.ConversionResourceApi res = new api.DoubleclicksearchApi(mock).convers ion; 1083 api.ConversionResourceApi res = new api.DoubleclicksearchApi(mock).convers ion;
1084 var arg_request = buildConversionList(); 1084 var arg_request = buildConversionList();
1085 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 1085 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
1086 var obj = new api.ConversionList.fromJson(json); 1086 var obj = new api.ConversionList.fromJson(json);
1087 checkConversionList(obj); 1087 checkConversionList(obj);
1088 1088
1089 var path = (req.url).path; 1089 var path = (req.url).path;
1090 var pathOffset = 0; 1090 var pathOffset = 0;
1091 var index; 1091 var index;
1092 var subPart; 1092 var subPart;
1093 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 1093 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
1094 pathOffset += 1; 1094 pathOffset += 1;
1095 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq uals("doubleclicksearch/v2/")); 1095 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq uals("doubleclicksearch/v2/"));
(...skipping 18 matching lines...) Expand all
1114 } 1114 }
1115 } 1115 }
1116 1116
1117 1117
1118 var h = { 1118 var h = {
1119 "content-type" : "application/json; charset=utf-8", 1119 "content-type" : "application/json; charset=utf-8",
1120 }; 1120 };
1121 var resp = convert.JSON.encode(buildConversionList()); 1121 var resp = convert.JSON.encode(buildConversionList());
1122 return new async.Future.value(stringResponse(200, h, resp)); 1122 return new async.Future.value(stringResponse(200, h, resp));
1123 }), true); 1123 }), true);
1124 res.update(arg_request).then(unittest.expectAsync(((api.ConversionList res ponse) { 1124 res.update(arg_request).then(unittest.expectAsync1(((api.ConversionList re sponse) {
1125 checkConversionList(response); 1125 checkConversionList(response);
1126 }))); 1126 })));
1127 }); 1127 });
1128 1128
1129 unittest.test("method--updateAvailability", () { 1129 unittest.test("method--updateAvailability", () {
1130 1130
1131 var mock = new HttpServerMock(); 1131 var mock = new HttpServerMock();
1132 api.ConversionResourceApi res = new api.DoubleclicksearchApi(mock).convers ion; 1132 api.ConversionResourceApi res = new api.DoubleclicksearchApi(mock).convers ion;
1133 var arg_request = buildUpdateAvailabilityRequest(); 1133 var arg_request = buildUpdateAvailabilityRequest();
1134 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 1134 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
1135 var obj = new api.UpdateAvailabilityRequest.fromJson(json); 1135 var obj = new api.UpdateAvailabilityRequest.fromJson(json);
1136 checkUpdateAvailabilityRequest(obj); 1136 checkUpdateAvailabilityRequest(obj);
1137 1137
1138 var path = (req.url).path; 1138 var path = (req.url).path;
1139 var pathOffset = 0; 1139 var pathOffset = 0;
1140 var index; 1140 var index;
1141 var subPart; 1141 var subPart;
1142 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 1142 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
1143 pathOffset += 1; 1143 pathOffset += 1;
1144 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq uals("doubleclicksearch/v2/")); 1144 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq uals("doubleclicksearch/v2/"));
(...skipping 18 matching lines...) Expand all
1163 } 1163 }
1164 } 1164 }
1165 1165
1166 1166
1167 var h = { 1167 var h = {
1168 "content-type" : "application/json; charset=utf-8", 1168 "content-type" : "application/json; charset=utf-8",
1169 }; 1169 };
1170 var resp = convert.JSON.encode(buildUpdateAvailabilityResponse()); 1170 var resp = convert.JSON.encode(buildUpdateAvailabilityResponse());
1171 return new async.Future.value(stringResponse(200, h, resp)); 1171 return new async.Future.value(stringResponse(200, h, resp));
1172 }), true); 1172 }), true);
1173 res.updateAvailability(arg_request).then(unittest.expectAsync(((api.Update AvailabilityResponse response) { 1173 res.updateAvailability(arg_request).then(unittest.expectAsync1(((api.Updat eAvailabilityResponse response) {
1174 checkUpdateAvailabilityResponse(response); 1174 checkUpdateAvailabilityResponse(response);
1175 }))); 1175 })));
1176 }); 1176 });
1177 1177
1178 }); 1178 });
1179 1179
1180 1180
1181 unittest.group("resource-ReportsResourceApi", () { 1181 unittest.group("resource-ReportsResourceApi", () {
1182 unittest.test("method--generate", () { 1182 unittest.test("method--generate", () {
1183 1183
1184 var mock = new HttpServerMock(); 1184 var mock = new HttpServerMock();
1185 api.ReportsResourceApi res = new api.DoubleclicksearchApi(mock).reports; 1185 api.ReportsResourceApi res = new api.DoubleclicksearchApi(mock).reports;
1186 var arg_request_1 = buildReportRequest(); 1186 var arg_request_1 = buildReportRequest();
1187 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 1187 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
1188 var obj = new api.ReportRequest.fromJson(json); 1188 var obj = new api.ReportRequest.fromJson(json);
1189 checkReportRequest(obj); 1189 checkReportRequest(obj);
1190 1190
1191 var path = (req.url).path; 1191 var path = (req.url).path;
1192 var pathOffset = 0; 1192 var pathOffset = 0;
1193 var index; 1193 var index;
1194 var subPart; 1194 var subPart;
1195 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 1195 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
1196 pathOffset += 1; 1196 pathOffset += 1;
1197 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq uals("doubleclicksearch/v2/")); 1197 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq uals("doubleclicksearch/v2/"));
(...skipping 18 matching lines...) Expand all
1216 } 1216 }
1217 } 1217 }
1218 1218
1219 1219
1220 var h = { 1220 var h = {
1221 "content-type" : "application/json; charset=utf-8", 1221 "content-type" : "application/json; charset=utf-8",
1222 }; 1222 };
1223 var resp = convert.JSON.encode(buildReport()); 1223 var resp = convert.JSON.encode(buildReport());
1224 return new async.Future.value(stringResponse(200, h, resp)); 1224 return new async.Future.value(stringResponse(200, h, resp));
1225 }), true); 1225 }), true);
1226 res.generate(arg_request_1).then(unittest.expectAsync(((api.Report respons e) { 1226 res.generate(arg_request_1).then(unittest.expectAsync1(((api.Report respon se) {
1227 checkReport(response); 1227 checkReport(response);
1228 }))); 1228 })));
1229 }); 1229 });
1230 1230
1231 unittest.test("method--get", () { 1231 unittest.test("method--get", () {
1232 1232
1233 var mock = new HttpServerMock(); 1233 var mock = new HttpServerMock();
1234 api.ReportsResourceApi res = new api.DoubleclicksearchApi(mock).reports; 1234 api.ReportsResourceApi res = new api.DoubleclicksearchApi(mock).reports;
1235 var arg_reportId = "foo"; 1235 var arg_reportId = "foo";
1236 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 1236 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
1237 var path = (req.url).path; 1237 var path = (req.url).path;
1238 var pathOffset = 0; 1238 var pathOffset = 0;
1239 var index; 1239 var index;
1240 var subPart; 1240 var subPart;
1241 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 1241 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
1242 pathOffset += 1; 1242 pathOffset += 1;
1243 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq uals("doubleclicksearch/v2/")); 1243 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq uals("doubleclicksearch/v2/"));
1244 pathOffset += 21; 1244 pathOffset += 21;
1245 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ als("reports/")); 1245 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ als("reports/"));
1246 pathOffset += 8; 1246 pathOffset += 8;
(...skipping 18 matching lines...) Expand all
1265 } 1265 }
1266 } 1266 }
1267 1267
1268 1268
1269 var h = { 1269 var h = {
1270 "content-type" : "application/json; charset=utf-8", 1270 "content-type" : "application/json; charset=utf-8",
1271 }; 1271 };
1272 var resp = convert.JSON.encode(buildReport()); 1272 var resp = convert.JSON.encode(buildReport());
1273 return new async.Future.value(stringResponse(200, h, resp)); 1273 return new async.Future.value(stringResponse(200, h, resp));
1274 }), true); 1274 }), true);
1275 res.get(arg_reportId).then(unittest.expectAsync(((api.Report response) { 1275 res.get(arg_reportId).then(unittest.expectAsync1(((api.Report response) {
1276 checkReport(response); 1276 checkReport(response);
1277 }))); 1277 })));
1278 }); 1278 });
1279 1279
1280 unittest.test("method--getFile", () { 1280 unittest.test("method--getFile", () {
1281 // TODO: Implement tests for media upload; 1281 // TODO: Implement tests for media upload;
1282 // TODO: Implement tests for media download; 1282 // TODO: Implement tests for media download;
1283 1283
1284 var mock = new HttpServerMock(); 1284 var mock = new HttpServerMock();
1285 api.ReportsResourceApi res = new api.DoubleclicksearchApi(mock).reports; 1285 api.ReportsResourceApi res = new api.DoubleclicksearchApi(mock).reports;
1286 var arg_reportId = "foo"; 1286 var arg_reportId = "foo";
1287 var arg_reportFragment = 42; 1287 var arg_reportFragment = 42;
1288 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 1288 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
1289 var path = (req.url).path; 1289 var path = (req.url).path;
1290 var pathOffset = 0; 1290 var pathOffset = 0;
1291 var index; 1291 var index;
1292 var subPart; 1292 var subPart;
1293 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 1293 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
1294 pathOffset += 1; 1294 pathOffset += 1;
1295 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq uals("doubleclicksearch/v2/")); 1295 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq uals("doubleclicksearch/v2/"));
1296 pathOffset += 21; 1296 pathOffset += 21;
1297 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ als("reports/")); 1297 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ als("reports/"));
1298 pathOffset += 8; 1298 pathOffset += 8;
(...skipping 25 matching lines...) Expand all
1324 } 1324 }
1325 } 1325 }
1326 1326
1327 1327
1328 var h = { 1328 var h = {
1329 "content-type" : "application/json; charset=utf-8", 1329 "content-type" : "application/json; charset=utf-8",
1330 }; 1330 };
1331 var resp = ""; 1331 var resp = "";
1332 return new async.Future.value(stringResponse(200, h, resp)); 1332 return new async.Future.value(stringResponse(200, h, resp));
1333 }), true); 1333 }), true);
1334 res.getFile(arg_reportId, arg_reportFragment).then(unittest.expectAsync((_ ) {})); 1334 res.getFile(arg_reportId, arg_reportFragment).then(unittest.expectAsync1(( _) {}));
1335 }); 1335 });
1336 1336
1337 unittest.test("method--request", () { 1337 unittest.test("method--request", () {
1338 1338
1339 var mock = new HttpServerMock(); 1339 var mock = new HttpServerMock();
1340 api.ReportsResourceApi res = new api.DoubleclicksearchApi(mock).reports; 1340 api.ReportsResourceApi res = new api.DoubleclicksearchApi(mock).reports;
1341 var arg_request_1 = buildReportRequest(); 1341 var arg_request_1 = buildReportRequest();
1342 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 1342 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
1343 var obj = new api.ReportRequest.fromJson(json); 1343 var obj = new api.ReportRequest.fromJson(json);
1344 checkReportRequest(obj); 1344 checkReportRequest(obj);
1345 1345
1346 var path = (req.url).path; 1346 var path = (req.url).path;
1347 var pathOffset = 0; 1347 var pathOffset = 0;
1348 var index; 1348 var index;
1349 var subPart; 1349 var subPart;
1350 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 1350 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
1351 pathOffset += 1; 1351 pathOffset += 1;
1352 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq uals("doubleclicksearch/v2/")); 1352 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq uals("doubleclicksearch/v2/"));
(...skipping 18 matching lines...) Expand all
1371 } 1371 }
1372 } 1372 }
1373 1373
1374 1374
1375 var h = { 1375 var h = {
1376 "content-type" : "application/json; charset=utf-8", 1376 "content-type" : "application/json; charset=utf-8",
1377 }; 1377 };
1378 var resp = convert.JSON.encode(buildReport()); 1378 var resp = convert.JSON.encode(buildReport());
1379 return new async.Future.value(stringResponse(200, h, resp)); 1379 return new async.Future.value(stringResponse(200, h, resp));
1380 }), true); 1380 }), true);
1381 res.request(arg_request_1).then(unittest.expectAsync(((api.Report response ) { 1381 res.request(arg_request_1).then(unittest.expectAsync1(((api.Report respons e) {
1382 checkReport(response); 1382 checkReport(response);
1383 }))); 1383 })));
1384 }); 1384 });
1385 1385
1386 }); 1386 });
1387 1387
1388 1388
1389 unittest.group("resource-SavedColumnsResourceApi", () { 1389 unittest.group("resource-SavedColumnsResourceApi", () {
1390 unittest.test("method--list", () { 1390 unittest.test("method--list", () {
1391 1391
1392 var mock = new HttpServerMock(); 1392 var mock = new HttpServerMock();
1393 api.SavedColumnsResourceApi res = new api.DoubleclicksearchApi(mock).saved Columns; 1393 api.SavedColumnsResourceApi res = new api.DoubleclicksearchApi(mock).saved Columns;
1394 var arg_agencyId = "foo"; 1394 var arg_agencyId = "foo";
1395 var arg_advertiserId = "foo"; 1395 var arg_advertiserId = "foo";
1396 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 1396 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
1397 var path = (req.url).path; 1397 var path = (req.url).path;
1398 var pathOffset = 0; 1398 var pathOffset = 0;
1399 var index; 1399 var index;
1400 var subPart; 1400 var subPart;
1401 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 1401 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
1402 pathOffset += 1; 1402 pathOffset += 1;
1403 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq uals("doubleclicksearch/v2/")); 1403 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq uals("doubleclicksearch/v2/"));
1404 pathOffset += 21; 1404 pathOffset += 21;
1405 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ als("agency/")); 1405 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ als("agency/"));
1406 pathOffset += 7; 1406 pathOffset += 7;
(...skipping 29 matching lines...) Expand all
1436 } 1436 }
1437 } 1437 }
1438 1438
1439 1439
1440 var h = { 1440 var h = {
1441 "content-type" : "application/json; charset=utf-8", 1441 "content-type" : "application/json; charset=utf-8",
1442 }; 1442 };
1443 var resp = convert.JSON.encode(buildSavedColumnList()); 1443 var resp = convert.JSON.encode(buildSavedColumnList());
1444 return new async.Future.value(stringResponse(200, h, resp)); 1444 return new async.Future.value(stringResponse(200, h, resp));
1445 }), true); 1445 }), true);
1446 res.list(arg_agencyId, arg_advertiserId).then(unittest.expectAsync(((api.S avedColumnList response) { 1446 res.list(arg_agencyId, arg_advertiserId).then(unittest.expectAsync1(((api. SavedColumnList response) {
1447 checkSavedColumnList(response); 1447 checkSavedColumnList(response);
1448 }))); 1448 })));
1449 }); 1449 });
1450 1450
1451 }); 1451 });
1452 1452
1453 1453
1454 } 1454 }
1455 1455
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