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

Side by Side Diff: generated/googleapis/test/doubleclickbidmanager/v1_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.doubleclickbidmanager.v1.test; 1 library googleapis.doubleclickbidmanager.v1.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/doubleclickbidmanager/v1.dart' as api; 12 import 'package:googleapis/doubleclickbidmanager/v1.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 buildUnnamed1175() { 54 buildUnnamed1182() {
55 var o = new core.List<core.String>(); 55 var o = new core.List<core.String>();
56 o.add("foo"); 56 o.add("foo");
57 o.add("foo"); 57 o.add("foo");
58 return o; 58 return o;
59 } 59 }
60 60
61 checkUnnamed1175(core.List<core.String> o) { 61 checkUnnamed1182(core.List<core.String> o) {
62 unittest.expect(o, unittest.hasLength(2)); 62 unittest.expect(o, unittest.hasLength(2));
63 unittest.expect(o[0], unittest.equals('foo')); 63 unittest.expect(o[0], unittest.equals('foo'));
64 unittest.expect(o[1], unittest.equals('foo')); 64 unittest.expect(o[1], unittest.equals('foo'));
65 } 65 }
66 66
67 core.int buildCounterDownloadLineItemsRequest = 0; 67 core.int buildCounterDownloadLineItemsRequest = 0;
68 buildDownloadLineItemsRequest() { 68 buildDownloadLineItemsRequest() {
69 var o = new api.DownloadLineItemsRequest(); 69 var o = new api.DownloadLineItemsRequest();
70 buildCounterDownloadLineItemsRequest++; 70 buildCounterDownloadLineItemsRequest++;
71 if (buildCounterDownloadLineItemsRequest < 3) { 71 if (buildCounterDownloadLineItemsRequest < 3) {
72 o.fileSpec = "foo"; 72 o.fileSpec = "foo";
73 o.filterIds = buildUnnamed1175(); 73 o.filterIds = buildUnnamed1182();
74 o.filterType = "foo"; 74 o.filterType = "foo";
75 o.format = "foo"; 75 o.format = "foo";
76 } 76 }
77 buildCounterDownloadLineItemsRequest--; 77 buildCounterDownloadLineItemsRequest--;
78 return o; 78 return o;
79 } 79 }
80 80
81 checkDownloadLineItemsRequest(api.DownloadLineItemsRequest o) { 81 checkDownloadLineItemsRequest(api.DownloadLineItemsRequest o) {
82 buildCounterDownloadLineItemsRequest++; 82 buildCounterDownloadLineItemsRequest++;
83 if (buildCounterDownloadLineItemsRequest < 3) { 83 if (buildCounterDownloadLineItemsRequest < 3) {
84 unittest.expect(o.fileSpec, unittest.equals('foo')); 84 unittest.expect(o.fileSpec, unittest.equals('foo'));
85 checkUnnamed1175(o.filterIds); 85 checkUnnamed1182(o.filterIds);
86 unittest.expect(o.filterType, unittest.equals('foo')); 86 unittest.expect(o.filterType, unittest.equals('foo'));
87 unittest.expect(o.format, unittest.equals('foo')); 87 unittest.expect(o.format, unittest.equals('foo'));
88 } 88 }
89 buildCounterDownloadLineItemsRequest--; 89 buildCounterDownloadLineItemsRequest--;
90 } 90 }
91 91
92 core.int buildCounterDownloadLineItemsResponse = 0; 92 core.int buildCounterDownloadLineItemsResponse = 0;
93 buildDownloadLineItemsResponse() { 93 buildDownloadLineItemsResponse() {
94 var o = new api.DownloadLineItemsResponse(); 94 var o = new api.DownloadLineItemsResponse();
95 buildCounterDownloadLineItemsResponse++; 95 buildCounterDownloadLineItemsResponse++;
96 if (buildCounterDownloadLineItemsResponse < 3) { 96 if (buildCounterDownloadLineItemsResponse < 3) {
97 o.lineItems = "foo"; 97 o.lineItems = "foo";
98 } 98 }
99 buildCounterDownloadLineItemsResponse--; 99 buildCounterDownloadLineItemsResponse--;
100 return o; 100 return o;
101 } 101 }
102 102
103 checkDownloadLineItemsResponse(api.DownloadLineItemsResponse o) { 103 checkDownloadLineItemsResponse(api.DownloadLineItemsResponse o) {
104 buildCounterDownloadLineItemsResponse++; 104 buildCounterDownloadLineItemsResponse++;
105 if (buildCounterDownloadLineItemsResponse < 3) { 105 if (buildCounterDownloadLineItemsResponse < 3) {
106 unittest.expect(o.lineItems, unittest.equals('foo')); 106 unittest.expect(o.lineItems, unittest.equals('foo'));
107 } 107 }
108 buildCounterDownloadLineItemsResponse--; 108 buildCounterDownloadLineItemsResponse--;
109 } 109 }
110 110
111 buildUnnamed1176() { 111 buildUnnamed1183() {
112 var o = new core.List<core.String>(); 112 var o = new core.List<core.String>();
113 o.add("foo"); 113 o.add("foo");
114 o.add("foo"); 114 o.add("foo");
115 return o; 115 return o;
116 } 116 }
117 117
118 checkUnnamed1176(core.List<core.String> o) { 118 checkUnnamed1183(core.List<core.String> o) {
119 unittest.expect(o, unittest.hasLength(2)); 119 unittest.expect(o, unittest.hasLength(2));
120 unittest.expect(o[0], unittest.equals('foo')); 120 unittest.expect(o[0], unittest.equals('foo'));
121 unittest.expect(o[1], unittest.equals('foo')); 121 unittest.expect(o[1], unittest.equals('foo'));
122 } 122 }
123 123
124 buildUnnamed1177() { 124 buildUnnamed1184() {
125 var o = new core.List<core.String>(); 125 var o = new core.List<core.String>();
126 o.add("foo"); 126 o.add("foo");
127 o.add("foo"); 127 o.add("foo");
128 return o; 128 return o;
129 } 129 }
130 130
131 checkUnnamed1177(core.List<core.String> o) { 131 checkUnnamed1184(core.List<core.String> o) {
132 unittest.expect(o, unittest.hasLength(2)); 132 unittest.expect(o, unittest.hasLength(2));
133 unittest.expect(o[0], unittest.equals('foo')); 133 unittest.expect(o[0], unittest.equals('foo'));
134 unittest.expect(o[1], unittest.equals('foo')); 134 unittest.expect(o[1], unittest.equals('foo'));
135 } 135 }
136 136
137 core.int buildCounterDownloadRequest = 0; 137 core.int buildCounterDownloadRequest = 0;
138 buildDownloadRequest() { 138 buildDownloadRequest() {
139 var o = new api.DownloadRequest(); 139 var o = new api.DownloadRequest();
140 buildCounterDownloadRequest++; 140 buildCounterDownloadRequest++;
141 if (buildCounterDownloadRequest < 3) { 141 if (buildCounterDownloadRequest < 3) {
142 o.fileTypes = buildUnnamed1176(); 142 o.fileTypes = buildUnnamed1183();
143 o.filterIds = buildUnnamed1177(); 143 o.filterIds = buildUnnamed1184();
144 o.filterType = "foo"; 144 o.filterType = "foo";
145 o.version = "foo"; 145 o.version = "foo";
146 } 146 }
147 buildCounterDownloadRequest--; 147 buildCounterDownloadRequest--;
148 return o; 148 return o;
149 } 149 }
150 150
151 checkDownloadRequest(api.DownloadRequest o) { 151 checkDownloadRequest(api.DownloadRequest o) {
152 buildCounterDownloadRequest++; 152 buildCounterDownloadRequest++;
153 if (buildCounterDownloadRequest < 3) { 153 if (buildCounterDownloadRequest < 3) {
154 checkUnnamed1176(o.fileTypes); 154 checkUnnamed1183(o.fileTypes);
155 checkUnnamed1177(o.filterIds); 155 checkUnnamed1184(o.filterIds);
156 unittest.expect(o.filterType, unittest.equals('foo')); 156 unittest.expect(o.filterType, unittest.equals('foo'));
157 unittest.expect(o.version, unittest.equals('foo')); 157 unittest.expect(o.version, unittest.equals('foo'));
158 } 158 }
159 buildCounterDownloadRequest--; 159 buildCounterDownloadRequest--;
160 } 160 }
161 161
162 core.int buildCounterDownloadResponse = 0; 162 core.int buildCounterDownloadResponse = 0;
163 buildDownloadResponse() { 163 buildDownloadResponse() {
164 var o = new api.DownloadResponse(); 164 var o = new api.DownloadResponse();
165 buildCounterDownloadResponse++; 165 buildCounterDownloadResponse++;
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 198
199 checkFilterPair(api.FilterPair o) { 199 checkFilterPair(api.FilterPair o) {
200 buildCounterFilterPair++; 200 buildCounterFilterPair++;
201 if (buildCounterFilterPair < 3) { 201 if (buildCounterFilterPair < 3) {
202 unittest.expect(o.type, unittest.equals('foo')); 202 unittest.expect(o.type, unittest.equals('foo'));
203 unittest.expect(o.value, unittest.equals('foo')); 203 unittest.expect(o.value, unittest.equals('foo'));
204 } 204 }
205 buildCounterFilterPair--; 205 buildCounterFilterPair--;
206 } 206 }
207 207
208 buildUnnamed1178() { 208 buildUnnamed1185() {
209 var o = new core.List<api.Query>(); 209 var o = new core.List<api.Query>();
210 o.add(buildQuery()); 210 o.add(buildQuery());
211 o.add(buildQuery()); 211 o.add(buildQuery());
212 return o; 212 return o;
213 } 213 }
214 214
215 checkUnnamed1178(core.List<api.Query> o) { 215 checkUnnamed1185(core.List<api.Query> o) {
216 unittest.expect(o, unittest.hasLength(2)); 216 unittest.expect(o, unittest.hasLength(2));
217 checkQuery(o[0]); 217 checkQuery(o[0]);
218 checkQuery(o[1]); 218 checkQuery(o[1]);
219 } 219 }
220 220
221 core.int buildCounterListQueriesResponse = 0; 221 core.int buildCounterListQueriesResponse = 0;
222 buildListQueriesResponse() { 222 buildListQueriesResponse() {
223 var o = new api.ListQueriesResponse(); 223 var o = new api.ListQueriesResponse();
224 buildCounterListQueriesResponse++; 224 buildCounterListQueriesResponse++;
225 if (buildCounterListQueriesResponse < 3) { 225 if (buildCounterListQueriesResponse < 3) {
226 o.kind = "foo"; 226 o.kind = "foo";
227 o.queries = buildUnnamed1178(); 227 o.queries = buildUnnamed1185();
228 } 228 }
229 buildCounterListQueriesResponse--; 229 buildCounterListQueriesResponse--;
230 return o; 230 return o;
231 } 231 }
232 232
233 checkListQueriesResponse(api.ListQueriesResponse o) { 233 checkListQueriesResponse(api.ListQueriesResponse o) {
234 buildCounterListQueriesResponse++; 234 buildCounterListQueriesResponse++;
235 if (buildCounterListQueriesResponse < 3) { 235 if (buildCounterListQueriesResponse < 3) {
236 unittest.expect(o.kind, unittest.equals('foo')); 236 unittest.expect(o.kind, unittest.equals('foo'));
237 checkUnnamed1178(o.queries); 237 checkUnnamed1185(o.queries);
238 } 238 }
239 buildCounterListQueriesResponse--; 239 buildCounterListQueriesResponse--;
240 } 240 }
241 241
242 buildUnnamed1179() { 242 buildUnnamed1186() {
243 var o = new core.List<api.Report>(); 243 var o = new core.List<api.Report>();
244 o.add(buildReport()); 244 o.add(buildReport());
245 o.add(buildReport()); 245 o.add(buildReport());
246 return o; 246 return o;
247 } 247 }
248 248
249 checkUnnamed1179(core.List<api.Report> o) { 249 checkUnnamed1186(core.List<api.Report> o) {
250 unittest.expect(o, unittest.hasLength(2)); 250 unittest.expect(o, unittest.hasLength(2));
251 checkReport(o[0]); 251 checkReport(o[0]);
252 checkReport(o[1]); 252 checkReport(o[1]);
253 } 253 }
254 254
255 core.int buildCounterListReportsResponse = 0; 255 core.int buildCounterListReportsResponse = 0;
256 buildListReportsResponse() { 256 buildListReportsResponse() {
257 var o = new api.ListReportsResponse(); 257 var o = new api.ListReportsResponse();
258 buildCounterListReportsResponse++; 258 buildCounterListReportsResponse++;
259 if (buildCounterListReportsResponse < 3) { 259 if (buildCounterListReportsResponse < 3) {
260 o.kind = "foo"; 260 o.kind = "foo";
261 o.reports = buildUnnamed1179(); 261 o.reports = buildUnnamed1186();
262 } 262 }
263 buildCounterListReportsResponse--; 263 buildCounterListReportsResponse--;
264 return o; 264 return o;
265 } 265 }
266 266
267 checkListReportsResponse(api.ListReportsResponse o) { 267 checkListReportsResponse(api.ListReportsResponse o) {
268 buildCounterListReportsResponse++; 268 buildCounterListReportsResponse++;
269 if (buildCounterListReportsResponse < 3) { 269 if (buildCounterListReportsResponse < 3) {
270 unittest.expect(o.kind, unittest.equals('foo')); 270 unittest.expect(o.kind, unittest.equals('foo'));
271 checkUnnamed1179(o.reports); 271 checkUnnamed1186(o.reports);
272 } 272 }
273 buildCounterListReportsResponse--; 273 buildCounterListReportsResponse--;
274 } 274 }
275 275
276 buildUnnamed1180() { 276 buildUnnamed1187() {
277 var o = new core.List<api.FilterPair>(); 277 var o = new core.List<api.FilterPair>();
278 o.add(buildFilterPair()); 278 o.add(buildFilterPair());
279 o.add(buildFilterPair()); 279 o.add(buildFilterPair());
280 return o; 280 return o;
281 } 281 }
282 282
283 checkUnnamed1180(core.List<api.FilterPair> o) { 283 checkUnnamed1187(core.List<api.FilterPair> o) {
284 unittest.expect(o, unittest.hasLength(2)); 284 unittest.expect(o, unittest.hasLength(2));
285 checkFilterPair(o[0]); 285 checkFilterPair(o[0]);
286 checkFilterPair(o[1]); 286 checkFilterPair(o[1]);
287 } 287 }
288 288
289 buildUnnamed1181() { 289 buildUnnamed1188() {
290 var o = new core.List<core.String>(); 290 var o = new core.List<core.String>();
291 o.add("foo"); 291 o.add("foo");
292 o.add("foo"); 292 o.add("foo");
293 return o; 293 return o;
294 } 294 }
295 295
296 checkUnnamed1181(core.List<core.String> o) { 296 checkUnnamed1188(core.List<core.String> o) {
297 unittest.expect(o, unittest.hasLength(2)); 297 unittest.expect(o, unittest.hasLength(2));
298 unittest.expect(o[0], unittest.equals('foo')); 298 unittest.expect(o[0], unittest.equals('foo'));
299 unittest.expect(o[1], unittest.equals('foo')); 299 unittest.expect(o[1], unittest.equals('foo'));
300 } 300 }
301 301
302 buildUnnamed1182() { 302 buildUnnamed1189() {
303 var o = new core.List<core.String>(); 303 var o = new core.List<core.String>();
304 o.add("foo"); 304 o.add("foo");
305 o.add("foo"); 305 o.add("foo");
306 return o; 306 return o;
307 } 307 }
308 308
309 checkUnnamed1182(core.List<core.String> o) { 309 checkUnnamed1189(core.List<core.String> o) {
310 unittest.expect(o, unittest.hasLength(2)); 310 unittest.expect(o, unittest.hasLength(2));
311 unittest.expect(o[0], unittest.equals('foo')); 311 unittest.expect(o[0], unittest.equals('foo'));
312 unittest.expect(o[1], unittest.equals('foo')); 312 unittest.expect(o[1], unittest.equals('foo'));
313 } 313 }
314 314
315 core.int buildCounterParameters = 0; 315 core.int buildCounterParameters = 0;
316 buildParameters() { 316 buildParameters() {
317 var o = new api.Parameters(); 317 var o = new api.Parameters();
318 buildCounterParameters++; 318 buildCounterParameters++;
319 if (buildCounterParameters < 3) { 319 if (buildCounterParameters < 3) {
320 o.filters = buildUnnamed1180(); 320 o.filters = buildUnnamed1187();
321 o.groupBys = buildUnnamed1181(); 321 o.groupBys = buildUnnamed1188();
322 o.includeInviteData = true; 322 o.includeInviteData = true;
323 o.metrics = buildUnnamed1182(); 323 o.metrics = buildUnnamed1189();
324 o.type = "foo"; 324 o.type = "foo";
325 } 325 }
326 buildCounterParameters--; 326 buildCounterParameters--;
327 return o; 327 return o;
328 } 328 }
329 329
330 checkParameters(api.Parameters o) { 330 checkParameters(api.Parameters o) {
331 buildCounterParameters++; 331 buildCounterParameters++;
332 if (buildCounterParameters < 3) { 332 if (buildCounterParameters < 3) {
333 checkUnnamed1180(o.filters); 333 checkUnnamed1187(o.filters);
334 checkUnnamed1181(o.groupBys); 334 checkUnnamed1188(o.groupBys);
335 unittest.expect(o.includeInviteData, unittest.isTrue); 335 unittest.expect(o.includeInviteData, unittest.isTrue);
336 checkUnnamed1182(o.metrics); 336 checkUnnamed1189(o.metrics);
337 unittest.expect(o.type, unittest.equals('foo')); 337 unittest.expect(o.type, unittest.equals('foo'));
338 } 338 }
339 buildCounterParameters--; 339 buildCounterParameters--;
340 } 340 }
341 341
342 core.int buildCounterQuery = 0; 342 core.int buildCounterQuery = 0;
343 buildQuery() { 343 buildQuery() {
344 var o = new api.Query(); 344 var o = new api.Query();
345 buildCounterQuery++; 345 buildCounterQuery++;
346 if (buildCounterQuery < 3) { 346 if (buildCounterQuery < 3) {
(...skipping 18 matching lines...) Expand all
365 checkParameters(o.params); 365 checkParameters(o.params);
366 unittest.expect(o.queryId, unittest.equals('foo')); 366 unittest.expect(o.queryId, unittest.equals('foo'));
367 unittest.expect(o.reportDataEndTimeMs, unittest.equals('foo')); 367 unittest.expect(o.reportDataEndTimeMs, unittest.equals('foo'));
368 unittest.expect(o.reportDataStartTimeMs, unittest.equals('foo')); 368 unittest.expect(o.reportDataStartTimeMs, unittest.equals('foo'));
369 checkQuerySchedule(o.schedule); 369 checkQuerySchedule(o.schedule);
370 unittest.expect(o.timezoneCode, unittest.equals('foo')); 370 unittest.expect(o.timezoneCode, unittest.equals('foo'));
371 } 371 }
372 buildCounterQuery--; 372 buildCounterQuery--;
373 } 373 }
374 374
375 buildUnnamed1183() { 375 buildUnnamed1190() {
376 var o = new core.List<core.String>(); 376 var o = new core.List<core.String>();
377 o.add("foo"); 377 o.add("foo");
378 o.add("foo"); 378 o.add("foo");
379 return o; 379 return o;
380 } 380 }
381 381
382 checkUnnamed1183(core.List<core.String> o) { 382 checkUnnamed1190(core.List<core.String> o) {
383 unittest.expect(o, unittest.hasLength(2)); 383 unittest.expect(o, unittest.hasLength(2));
384 unittest.expect(o[0], unittest.equals('foo')); 384 unittest.expect(o[0], unittest.equals('foo'));
385 unittest.expect(o[1], unittest.equals('foo')); 385 unittest.expect(o[1], unittest.equals('foo'));
386 } 386 }
387 387
388 core.int buildCounterQueryMetadata = 0; 388 core.int buildCounterQueryMetadata = 0;
389 buildQueryMetadata() { 389 buildQueryMetadata() {
390 var o = new api.QueryMetadata(); 390 var o = new api.QueryMetadata();
391 buildCounterQueryMetadata++; 391 buildCounterQueryMetadata++;
392 if (buildCounterQueryMetadata < 3) { 392 if (buildCounterQueryMetadata < 3) {
393 o.dataRange = "foo"; 393 o.dataRange = "foo";
394 o.format = "foo"; 394 o.format = "foo";
395 o.googleCloudStoragePathForLatestReport = "foo"; 395 o.googleCloudStoragePathForLatestReport = "foo";
396 o.googleDrivePathForLatestReport = "foo"; 396 o.googleDrivePathForLatestReport = "foo";
397 o.latestReportRunTimeMs = "foo"; 397 o.latestReportRunTimeMs = "foo";
398 o.locale = "foo"; 398 o.locale = "foo";
399 o.reportCount = 42; 399 o.reportCount = 42;
400 o.running = true; 400 o.running = true;
401 o.sendNotification = true; 401 o.sendNotification = true;
402 o.shareEmailAddress = buildUnnamed1183(); 402 o.shareEmailAddress = buildUnnamed1190();
403 o.title = "foo"; 403 o.title = "foo";
404 } 404 }
405 buildCounterQueryMetadata--; 405 buildCounterQueryMetadata--;
406 return o; 406 return o;
407 } 407 }
408 408
409 checkQueryMetadata(api.QueryMetadata o) { 409 checkQueryMetadata(api.QueryMetadata o) {
410 buildCounterQueryMetadata++; 410 buildCounterQueryMetadata++;
411 if (buildCounterQueryMetadata < 3) { 411 if (buildCounterQueryMetadata < 3) {
412 unittest.expect(o.dataRange, unittest.equals('foo')); 412 unittest.expect(o.dataRange, unittest.equals('foo'));
413 unittest.expect(o.format, unittest.equals('foo')); 413 unittest.expect(o.format, unittest.equals('foo'));
414 unittest.expect(o.googleCloudStoragePathForLatestReport, unittest.equals('fo o')); 414 unittest.expect(o.googleCloudStoragePathForLatestReport, unittest.equals('fo o'));
415 unittest.expect(o.googleDrivePathForLatestReport, unittest.equals('foo')); 415 unittest.expect(o.googleDrivePathForLatestReport, unittest.equals('foo'));
416 unittest.expect(o.latestReportRunTimeMs, unittest.equals('foo')); 416 unittest.expect(o.latestReportRunTimeMs, unittest.equals('foo'));
417 unittest.expect(o.locale, unittest.equals('foo')); 417 unittest.expect(o.locale, unittest.equals('foo'));
418 unittest.expect(o.reportCount, unittest.equals(42)); 418 unittest.expect(o.reportCount, unittest.equals(42));
419 unittest.expect(o.running, unittest.isTrue); 419 unittest.expect(o.running, unittest.isTrue);
420 unittest.expect(o.sendNotification, unittest.isTrue); 420 unittest.expect(o.sendNotification, unittest.isTrue);
421 checkUnnamed1183(o.shareEmailAddress); 421 checkUnnamed1190(o.shareEmailAddress);
422 unittest.expect(o.title, unittest.equals('foo')); 422 unittest.expect(o.title, unittest.equals('foo'));
423 } 423 }
424 buildCounterQueryMetadata--; 424 buildCounterQueryMetadata--;
425 } 425 }
426 426
427 core.int buildCounterQuerySchedule = 0; 427 core.int buildCounterQuerySchedule = 0;
428 buildQuerySchedule() { 428 buildQuerySchedule() {
429 var o = new api.QuerySchedule(); 429 var o = new api.QuerySchedule();
430 buildCounterQuerySchedule++; 430 buildCounterQuerySchedule++;
431 if (buildCounterQuerySchedule < 3) { 431 if (buildCounterQuerySchedule < 3) {
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
555 buildCounterReportStatus++; 555 buildCounterReportStatus++;
556 if (buildCounterReportStatus < 3) { 556 if (buildCounterReportStatus < 3) {
557 checkReportFailure(o.failure); 557 checkReportFailure(o.failure);
558 unittest.expect(o.finishTimeMs, unittest.equals('foo')); 558 unittest.expect(o.finishTimeMs, unittest.equals('foo'));
559 unittest.expect(o.format, unittest.equals('foo')); 559 unittest.expect(o.format, unittest.equals('foo'));
560 unittest.expect(o.state, unittest.equals('foo')); 560 unittest.expect(o.state, unittest.equals('foo'));
561 } 561 }
562 buildCounterReportStatus--; 562 buildCounterReportStatus--;
563 } 563 }
564 564
565 buildUnnamed1184() { 565 buildUnnamed1191() {
566 var o = new core.List<core.String>(); 566 var o = new core.List<core.String>();
567 o.add("foo"); 567 o.add("foo");
568 o.add("foo"); 568 o.add("foo");
569 return o; 569 return o;
570 } 570 }
571 571
572 checkUnnamed1184(core.List<core.String> o) { 572 checkUnnamed1191(core.List<core.String> o) {
573 unittest.expect(o, unittest.hasLength(2)); 573 unittest.expect(o, unittest.hasLength(2));
574 unittest.expect(o[0], unittest.equals('foo')); 574 unittest.expect(o[0], unittest.equals('foo'));
575 unittest.expect(o[1], unittest.equals('foo')); 575 unittest.expect(o[1], unittest.equals('foo'));
576 } 576 }
577 577
578 core.int buildCounterRowStatus = 0; 578 core.int buildCounterRowStatus = 0;
579 buildRowStatus() { 579 buildRowStatus() {
580 var o = new api.RowStatus(); 580 var o = new api.RowStatus();
581 buildCounterRowStatus++; 581 buildCounterRowStatus++;
582 if (buildCounterRowStatus < 3) { 582 if (buildCounterRowStatus < 3) {
583 o.changed = true; 583 o.changed = true;
584 o.entityId = "foo"; 584 o.entityId = "foo";
585 o.entityName = "foo"; 585 o.entityName = "foo";
586 o.errors = buildUnnamed1184(); 586 o.errors = buildUnnamed1191();
587 o.persisted = true; 587 o.persisted = true;
588 o.rowNumber = 42; 588 o.rowNumber = 42;
589 } 589 }
590 buildCounterRowStatus--; 590 buildCounterRowStatus--;
591 return o; 591 return o;
592 } 592 }
593 593
594 checkRowStatus(api.RowStatus o) { 594 checkRowStatus(api.RowStatus o) {
595 buildCounterRowStatus++; 595 buildCounterRowStatus++;
596 if (buildCounterRowStatus < 3) { 596 if (buildCounterRowStatus < 3) {
597 unittest.expect(o.changed, unittest.isTrue); 597 unittest.expect(o.changed, unittest.isTrue);
598 unittest.expect(o.entityId, unittest.equals('foo')); 598 unittest.expect(o.entityId, unittest.equals('foo'));
599 unittest.expect(o.entityName, unittest.equals('foo')); 599 unittest.expect(o.entityName, unittest.equals('foo'));
600 checkUnnamed1184(o.errors); 600 checkUnnamed1191(o.errors);
601 unittest.expect(o.persisted, unittest.isTrue); 601 unittest.expect(o.persisted, unittest.isTrue);
602 unittest.expect(o.rowNumber, unittest.equals(42)); 602 unittest.expect(o.rowNumber, unittest.equals(42));
603 } 603 }
604 buildCounterRowStatus--; 604 buildCounterRowStatus--;
605 } 605 }
606 606
607 core.int buildCounterRunQueryRequest = 0; 607 core.int buildCounterRunQueryRequest = 0;
608 buildRunQueryRequest() { 608 buildRunQueryRequest() {
609 var o = new api.RunQueryRequest(); 609 var o = new api.RunQueryRequest();
610 buildCounterRunQueryRequest++; 610 buildCounterRunQueryRequest++;
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
664 } 664 }
665 665
666 checkUploadLineItemsResponse(api.UploadLineItemsResponse o) { 666 checkUploadLineItemsResponse(api.UploadLineItemsResponse o) {
667 buildCounterUploadLineItemsResponse++; 667 buildCounterUploadLineItemsResponse++;
668 if (buildCounterUploadLineItemsResponse < 3) { 668 if (buildCounterUploadLineItemsResponse < 3) {
669 checkUploadStatus(o.uploadStatus); 669 checkUploadStatus(o.uploadStatus);
670 } 670 }
671 buildCounterUploadLineItemsResponse--; 671 buildCounterUploadLineItemsResponse--;
672 } 672 }
673 673
674 buildUnnamed1185() { 674 buildUnnamed1192() {
675 var o = new core.List<core.String>(); 675 var o = new core.List<core.String>();
676 o.add("foo"); 676 o.add("foo");
677 o.add("foo"); 677 o.add("foo");
678 return o; 678 return o;
679 } 679 }
680 680
681 checkUnnamed1185(core.List<core.String> o) { 681 checkUnnamed1192(core.List<core.String> o) {
682 unittest.expect(o, unittest.hasLength(2)); 682 unittest.expect(o, unittest.hasLength(2));
683 unittest.expect(o[0], unittest.equals('foo')); 683 unittest.expect(o[0], unittest.equals('foo'));
684 unittest.expect(o[1], unittest.equals('foo')); 684 unittest.expect(o[1], unittest.equals('foo'));
685 } 685 }
686 686
687 buildUnnamed1186() { 687 buildUnnamed1193() {
688 var o = new core.List<api.RowStatus>(); 688 var o = new core.List<api.RowStatus>();
689 o.add(buildRowStatus()); 689 o.add(buildRowStatus());
690 o.add(buildRowStatus()); 690 o.add(buildRowStatus());
691 return o; 691 return o;
692 } 692 }
693 693
694 checkUnnamed1186(core.List<api.RowStatus> o) { 694 checkUnnamed1193(core.List<api.RowStatus> o) {
695 unittest.expect(o, unittest.hasLength(2)); 695 unittest.expect(o, unittest.hasLength(2));
696 checkRowStatus(o[0]); 696 checkRowStatus(o[0]);
697 checkRowStatus(o[1]); 697 checkRowStatus(o[1]);
698 } 698 }
699 699
700 core.int buildCounterUploadStatus = 0; 700 core.int buildCounterUploadStatus = 0;
701 buildUploadStatus() { 701 buildUploadStatus() {
702 var o = new api.UploadStatus(); 702 var o = new api.UploadStatus();
703 buildCounterUploadStatus++; 703 buildCounterUploadStatus++;
704 if (buildCounterUploadStatus < 3) { 704 if (buildCounterUploadStatus < 3) {
705 o.errors = buildUnnamed1185(); 705 o.errors = buildUnnamed1192();
706 o.rowStatus = buildUnnamed1186(); 706 o.rowStatus = buildUnnamed1193();
707 } 707 }
708 buildCounterUploadStatus--; 708 buildCounterUploadStatus--;
709 return o; 709 return o;
710 } 710 }
711 711
712 checkUploadStatus(api.UploadStatus o) { 712 checkUploadStatus(api.UploadStatus o) {
713 buildCounterUploadStatus++; 713 buildCounterUploadStatus++;
714 if (buildCounterUploadStatus < 3) { 714 if (buildCounterUploadStatus < 3) {
715 checkUnnamed1185(o.errors); 715 checkUnnamed1192(o.errors);
716 checkUnnamed1186(o.rowStatus); 716 checkUnnamed1193(o.rowStatus);
717 } 717 }
718 buildCounterUploadStatus--; 718 buildCounterUploadStatus--;
719 } 719 }
720 720
721 721
722 main() { 722 main() {
723 unittest.group("obj-schema-DownloadLineItemsRequest", () { 723 unittest.group("obj-schema-DownloadLineItemsRequest", () {
724 unittest.test("to-json--from-json", () { 724 unittest.test("to-json--from-json", () {
725 var o = buildDownloadLineItemsRequest(); 725 var o = buildDownloadLineItemsRequest();
726 var od = new api.DownloadLineItemsRequest.fromJson(o.toJson()); 726 var od = new api.DownloadLineItemsRequest.fromJson(o.toJson());
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
908 }); 908 });
909 }); 909 });
910 910
911 911
912 unittest.group("resource-LineitemsResourceApi", () { 912 unittest.group("resource-LineitemsResourceApi", () {
913 unittest.test("method--downloadlineitems", () { 913 unittest.test("method--downloadlineitems", () {
914 914
915 var mock = new HttpServerMock(); 915 var mock = new HttpServerMock();
916 api.LineitemsResourceApi res = new api.DoubleclickbidmanagerApi(mock).line items; 916 api.LineitemsResourceApi res = new api.DoubleclickbidmanagerApi(mock).line items;
917 var arg_request = buildDownloadLineItemsRequest(); 917 var arg_request = buildDownloadLineItemsRequest();
918 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 918 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
919 var obj = new api.DownloadLineItemsRequest.fromJson(json); 919 var obj = new api.DownloadLineItemsRequest.fromJson(json);
920 checkDownloadLineItemsRequest(obj); 920 checkDownloadLineItemsRequest(obj);
921 921
922 var path = (req.url).path; 922 var path = (req.url).path;
923 var pathOffset = 0; 923 var pathOffset = 0;
924 var index; 924 var index;
925 var subPart; 925 var subPart;
926 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 926 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
927 pathOffset += 1; 927 pathOffset += 1;
928 unittest.expect(path.substring(pathOffset, pathOffset + 25), unittest.eq uals("doubleclickbidmanager/v1/")); 928 unittest.expect(path.substring(pathOffset, pathOffset + 25), unittest.eq uals("doubleclickbidmanager/v1/"));
(...skipping 18 matching lines...) Expand all
947 } 947 }
948 } 948 }
949 949
950 950
951 var h = { 951 var h = {
952 "content-type" : "application/json; charset=utf-8", 952 "content-type" : "application/json; charset=utf-8",
953 }; 953 };
954 var resp = convert.JSON.encode(buildDownloadLineItemsResponse()); 954 var resp = convert.JSON.encode(buildDownloadLineItemsResponse());
955 return new async.Future.value(stringResponse(200, h, resp)); 955 return new async.Future.value(stringResponse(200, h, resp));
956 }), true); 956 }), true);
957 res.downloadlineitems(arg_request).then(unittest.expectAsync(((api.Downloa dLineItemsResponse response) { 957 res.downloadlineitems(arg_request).then(unittest.expectAsync1(((api.Downlo adLineItemsResponse response) {
958 checkDownloadLineItemsResponse(response); 958 checkDownloadLineItemsResponse(response);
959 }))); 959 })));
960 }); 960 });
961 961
962 unittest.test("method--uploadlineitems", () { 962 unittest.test("method--uploadlineitems", () {
963 963
964 var mock = new HttpServerMock(); 964 var mock = new HttpServerMock();
965 api.LineitemsResourceApi res = new api.DoubleclickbidmanagerApi(mock).line items; 965 api.LineitemsResourceApi res = new api.DoubleclickbidmanagerApi(mock).line items;
966 var arg_request = buildUploadLineItemsRequest(); 966 var arg_request = buildUploadLineItemsRequest();
967 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 967 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
968 var obj = new api.UploadLineItemsRequest.fromJson(json); 968 var obj = new api.UploadLineItemsRequest.fromJson(json);
969 checkUploadLineItemsRequest(obj); 969 checkUploadLineItemsRequest(obj);
970 970
971 var path = (req.url).path; 971 var path = (req.url).path;
972 var pathOffset = 0; 972 var pathOffset = 0;
973 var index; 973 var index;
974 var subPart; 974 var subPart;
975 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 975 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
976 pathOffset += 1; 976 pathOffset += 1;
977 unittest.expect(path.substring(pathOffset, pathOffset + 25), unittest.eq uals("doubleclickbidmanager/v1/")); 977 unittest.expect(path.substring(pathOffset, pathOffset + 25), unittest.eq uals("doubleclickbidmanager/v1/"));
(...skipping 18 matching lines...) Expand all
996 } 996 }
997 } 997 }
998 998
999 999
1000 var h = { 1000 var h = {
1001 "content-type" : "application/json; charset=utf-8", 1001 "content-type" : "application/json; charset=utf-8",
1002 }; 1002 };
1003 var resp = convert.JSON.encode(buildUploadLineItemsResponse()); 1003 var resp = convert.JSON.encode(buildUploadLineItemsResponse());
1004 return new async.Future.value(stringResponse(200, h, resp)); 1004 return new async.Future.value(stringResponse(200, h, resp));
1005 }), true); 1005 }), true);
1006 res.uploadlineitems(arg_request).then(unittest.expectAsync(((api.UploadLin eItemsResponse response) { 1006 res.uploadlineitems(arg_request).then(unittest.expectAsync1(((api.UploadLi neItemsResponse response) {
1007 checkUploadLineItemsResponse(response); 1007 checkUploadLineItemsResponse(response);
1008 }))); 1008 })));
1009 }); 1009 });
1010 1010
1011 }); 1011 });
1012 1012
1013 1013
1014 unittest.group("resource-QueriesResourceApi", () { 1014 unittest.group("resource-QueriesResourceApi", () {
1015 unittest.test("method--createquery", () { 1015 unittest.test("method--createquery", () {
1016 1016
1017 var mock = new HttpServerMock(); 1017 var mock = new HttpServerMock();
1018 api.QueriesResourceApi res = new api.DoubleclickbidmanagerApi(mock).querie s; 1018 api.QueriesResourceApi res = new api.DoubleclickbidmanagerApi(mock).querie s;
1019 var arg_request = buildQuery(); 1019 var arg_request = buildQuery();
1020 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 1020 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
1021 var obj = new api.Query.fromJson(json); 1021 var obj = new api.Query.fromJson(json);
1022 checkQuery(obj); 1022 checkQuery(obj);
1023 1023
1024 var path = (req.url).path; 1024 var path = (req.url).path;
1025 var pathOffset = 0; 1025 var pathOffset = 0;
1026 var index; 1026 var index;
1027 var subPart; 1027 var subPart;
1028 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 1028 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
1029 pathOffset += 1; 1029 pathOffset += 1;
1030 unittest.expect(path.substring(pathOffset, pathOffset + 25), unittest.eq uals("doubleclickbidmanager/v1/")); 1030 unittest.expect(path.substring(pathOffset, pathOffset + 25), unittest.eq uals("doubleclickbidmanager/v1/"));
(...skipping 18 matching lines...) Expand all
1049 } 1049 }
1050 } 1050 }
1051 1051
1052 1052
1053 var h = { 1053 var h = {
1054 "content-type" : "application/json; charset=utf-8", 1054 "content-type" : "application/json; charset=utf-8",
1055 }; 1055 };
1056 var resp = convert.JSON.encode(buildQuery()); 1056 var resp = convert.JSON.encode(buildQuery());
1057 return new async.Future.value(stringResponse(200, h, resp)); 1057 return new async.Future.value(stringResponse(200, h, resp));
1058 }), true); 1058 }), true);
1059 res.createquery(arg_request).then(unittest.expectAsync(((api.Query respons e) { 1059 res.createquery(arg_request).then(unittest.expectAsync1(((api.Query respon se) {
1060 checkQuery(response); 1060 checkQuery(response);
1061 }))); 1061 })));
1062 }); 1062 });
1063 1063
1064 unittest.test("method--deletequery", () { 1064 unittest.test("method--deletequery", () {
1065 1065
1066 var mock = new HttpServerMock(); 1066 var mock = new HttpServerMock();
1067 api.QueriesResourceApi res = new api.DoubleclickbidmanagerApi(mock).querie s; 1067 api.QueriesResourceApi res = new api.DoubleclickbidmanagerApi(mock).querie s;
1068 var arg_queryId = "foo"; 1068 var arg_queryId = "foo";
1069 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 1069 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
1070 var path = (req.url).path; 1070 var path = (req.url).path;
1071 var pathOffset = 0; 1071 var pathOffset = 0;
1072 var index; 1072 var index;
1073 var subPart; 1073 var subPart;
1074 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 1074 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
1075 pathOffset += 1; 1075 pathOffset += 1;
1076 unittest.expect(path.substring(pathOffset, pathOffset + 25), unittest.eq uals("doubleclickbidmanager/v1/")); 1076 unittest.expect(path.substring(pathOffset, pathOffset + 25), unittest.eq uals("doubleclickbidmanager/v1/"));
1077 pathOffset += 25; 1077 pathOffset += 25;
1078 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ als("query/")); 1078 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ als("query/"));
1079 pathOffset += 6; 1079 pathOffset += 6;
(...skipping 18 matching lines...) Expand all
1098 } 1098 }
1099 } 1099 }
1100 1100
1101 1101
1102 var h = { 1102 var h = {
1103 "content-type" : "application/json; charset=utf-8", 1103 "content-type" : "application/json; charset=utf-8",
1104 }; 1104 };
1105 var resp = ""; 1105 var resp = "";
1106 return new async.Future.value(stringResponse(200, h, resp)); 1106 return new async.Future.value(stringResponse(200, h, resp));
1107 }), true); 1107 }), true);
1108 res.deletequery(arg_queryId).then(unittest.expectAsync((_) {})); 1108 res.deletequery(arg_queryId).then(unittest.expectAsync1((_) {}));
1109 }); 1109 });
1110 1110
1111 unittest.test("method--getquery", () { 1111 unittest.test("method--getquery", () {
1112 1112
1113 var mock = new HttpServerMock(); 1113 var mock = new HttpServerMock();
1114 api.QueriesResourceApi res = new api.DoubleclickbidmanagerApi(mock).querie s; 1114 api.QueriesResourceApi res = new api.DoubleclickbidmanagerApi(mock).querie s;
1115 var arg_queryId = "foo"; 1115 var arg_queryId = "foo";
1116 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 1116 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
1117 var path = (req.url).path; 1117 var path = (req.url).path;
1118 var pathOffset = 0; 1118 var pathOffset = 0;
1119 var index; 1119 var index;
1120 var subPart; 1120 var subPart;
1121 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 1121 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
1122 pathOffset += 1; 1122 pathOffset += 1;
1123 unittest.expect(path.substring(pathOffset, pathOffset + 25), unittest.eq uals("doubleclickbidmanager/v1/")); 1123 unittest.expect(path.substring(pathOffset, pathOffset + 25), unittest.eq uals("doubleclickbidmanager/v1/"));
1124 pathOffset += 25; 1124 pathOffset += 25;
1125 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ als("query/")); 1125 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ als("query/"));
1126 pathOffset += 6; 1126 pathOffset += 6;
(...skipping 18 matching lines...) Expand all
1145 } 1145 }
1146 } 1146 }
1147 1147
1148 1148
1149 var h = { 1149 var h = {
1150 "content-type" : "application/json; charset=utf-8", 1150 "content-type" : "application/json; charset=utf-8",
1151 }; 1151 };
1152 var resp = convert.JSON.encode(buildQuery()); 1152 var resp = convert.JSON.encode(buildQuery());
1153 return new async.Future.value(stringResponse(200, h, resp)); 1153 return new async.Future.value(stringResponse(200, h, resp));
1154 }), true); 1154 }), true);
1155 res.getquery(arg_queryId).then(unittest.expectAsync(((api.Query response) { 1155 res.getquery(arg_queryId).then(unittest.expectAsync1(((api.Query response) {
1156 checkQuery(response); 1156 checkQuery(response);
1157 }))); 1157 })));
1158 }); 1158 });
1159 1159
1160 unittest.test("method--listqueries", () { 1160 unittest.test("method--listqueries", () {
1161 1161
1162 var mock = new HttpServerMock(); 1162 var mock = new HttpServerMock();
1163 api.QueriesResourceApi res = new api.DoubleclickbidmanagerApi(mock).querie s; 1163 api.QueriesResourceApi res = new api.DoubleclickbidmanagerApi(mock).querie s;
1164 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 1164 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
1165 var path = (req.url).path; 1165 var path = (req.url).path;
1166 var pathOffset = 0; 1166 var pathOffset = 0;
1167 var index; 1167 var index;
1168 var subPart; 1168 var subPart;
1169 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 1169 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
1170 pathOffset += 1; 1170 pathOffset += 1;
1171 unittest.expect(path.substring(pathOffset, pathOffset + 25), unittest.eq uals("doubleclickbidmanager/v1/")); 1171 unittest.expect(path.substring(pathOffset, pathOffset + 25), unittest.eq uals("doubleclickbidmanager/v1/"));
1172 pathOffset += 25; 1172 pathOffset += 25;
1173 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ als("queries")); 1173 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ als("queries"));
1174 pathOffset += 7; 1174 pathOffset += 7;
(...skipping 15 matching lines...) Expand all
1190 } 1190 }
1191 } 1191 }
1192 1192
1193 1193
1194 var h = { 1194 var h = {
1195 "content-type" : "application/json; charset=utf-8", 1195 "content-type" : "application/json; charset=utf-8",
1196 }; 1196 };
1197 var resp = convert.JSON.encode(buildListQueriesResponse()); 1197 var resp = convert.JSON.encode(buildListQueriesResponse());
1198 return new async.Future.value(stringResponse(200, h, resp)); 1198 return new async.Future.value(stringResponse(200, h, resp));
1199 }), true); 1199 }), true);
1200 res.listqueries().then(unittest.expectAsync(((api.ListQueriesResponse resp onse) { 1200 res.listqueries().then(unittest.expectAsync1(((api.ListQueriesResponse res ponse) {
1201 checkListQueriesResponse(response); 1201 checkListQueriesResponse(response);
1202 }))); 1202 })));
1203 }); 1203 });
1204 1204
1205 unittest.test("method--runquery", () { 1205 unittest.test("method--runquery", () {
1206 1206
1207 var mock = new HttpServerMock(); 1207 var mock = new HttpServerMock();
1208 api.QueriesResourceApi res = new api.DoubleclickbidmanagerApi(mock).querie s; 1208 api.QueriesResourceApi res = new api.DoubleclickbidmanagerApi(mock).querie s;
1209 var arg_request = buildRunQueryRequest(); 1209 var arg_request = buildRunQueryRequest();
1210 var arg_queryId = "foo"; 1210 var arg_queryId = "foo";
1211 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 1211 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
1212 var obj = new api.RunQueryRequest.fromJson(json); 1212 var obj = new api.RunQueryRequest.fromJson(json);
1213 checkRunQueryRequest(obj); 1213 checkRunQueryRequest(obj);
1214 1214
1215 var path = (req.url).path; 1215 var path = (req.url).path;
1216 var pathOffset = 0; 1216 var pathOffset = 0;
1217 var index; 1217 var index;
1218 var subPart; 1218 var subPart;
1219 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 1219 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
1220 pathOffset += 1; 1220 pathOffset += 1;
1221 unittest.expect(path.substring(pathOffset, pathOffset + 25), unittest.eq uals("doubleclickbidmanager/v1/")); 1221 unittest.expect(path.substring(pathOffset, pathOffset + 25), unittest.eq uals("doubleclickbidmanager/v1/"));
(...skipping 21 matching lines...) Expand all
1243 } 1243 }
1244 } 1244 }
1245 1245
1246 1246
1247 var h = { 1247 var h = {
1248 "content-type" : "application/json; charset=utf-8", 1248 "content-type" : "application/json; charset=utf-8",
1249 }; 1249 };
1250 var resp = ""; 1250 var resp = "";
1251 return new async.Future.value(stringResponse(200, h, resp)); 1251 return new async.Future.value(stringResponse(200, h, resp));
1252 }), true); 1252 }), true);
1253 res.runquery(arg_request, arg_queryId).then(unittest.expectAsync((_) {})); 1253 res.runquery(arg_request, arg_queryId).then(unittest.expectAsync1((_) {})) ;
1254 }); 1254 });
1255 1255
1256 }); 1256 });
1257 1257
1258 1258
1259 unittest.group("resource-ReportsResourceApi", () { 1259 unittest.group("resource-ReportsResourceApi", () {
1260 unittest.test("method--listreports", () { 1260 unittest.test("method--listreports", () {
1261 1261
1262 var mock = new HttpServerMock(); 1262 var mock = new HttpServerMock();
1263 api.ReportsResourceApi res = new api.DoubleclickbidmanagerApi(mock).report s; 1263 api.ReportsResourceApi res = new api.DoubleclickbidmanagerApi(mock).report s;
1264 var arg_queryId = "foo"; 1264 var arg_queryId = "foo";
1265 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 1265 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
1266 var path = (req.url).path; 1266 var path = (req.url).path;
1267 var pathOffset = 0; 1267 var pathOffset = 0;
1268 var index; 1268 var index;
1269 var subPart; 1269 var subPart;
1270 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 1270 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
1271 pathOffset += 1; 1271 pathOffset += 1;
1272 unittest.expect(path.substring(pathOffset, pathOffset + 25), unittest.eq uals("doubleclickbidmanager/v1/")); 1272 unittest.expect(path.substring(pathOffset, pathOffset + 25), unittest.eq uals("doubleclickbidmanager/v1/"));
1273 pathOffset += 25; 1273 pathOffset += 25;
1274 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ als("queries/")); 1274 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ als("queries/"));
1275 pathOffset += 8; 1275 pathOffset += 8;
(...skipping 22 matching lines...) Expand all
1298 } 1298 }
1299 } 1299 }
1300 1300
1301 1301
1302 var h = { 1302 var h = {
1303 "content-type" : "application/json; charset=utf-8", 1303 "content-type" : "application/json; charset=utf-8",
1304 }; 1304 };
1305 var resp = convert.JSON.encode(buildListReportsResponse()); 1305 var resp = convert.JSON.encode(buildListReportsResponse());
1306 return new async.Future.value(stringResponse(200, h, resp)); 1306 return new async.Future.value(stringResponse(200, h, resp));
1307 }), true); 1307 }), true);
1308 res.listreports(arg_queryId).then(unittest.expectAsync(((api.ListReportsRe sponse response) { 1308 res.listreports(arg_queryId).then(unittest.expectAsync1(((api.ListReportsR esponse response) {
1309 checkListReportsResponse(response); 1309 checkListReportsResponse(response);
1310 }))); 1310 })));
1311 }); 1311 });
1312 1312
1313 }); 1313 });
1314 1314
1315 1315
1316 unittest.group("resource-SdfResourceApi", () { 1316 unittest.group("resource-SdfResourceApi", () {
1317 unittest.test("method--download", () { 1317 unittest.test("method--download", () {
1318 1318
1319 var mock = new HttpServerMock(); 1319 var mock = new HttpServerMock();
1320 api.SdfResourceApi res = new api.DoubleclickbidmanagerApi(mock).sdf; 1320 api.SdfResourceApi res = new api.DoubleclickbidmanagerApi(mock).sdf;
1321 var arg_request = buildDownloadRequest(); 1321 var arg_request = buildDownloadRequest();
1322 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 1322 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
1323 var obj = new api.DownloadRequest.fromJson(json); 1323 var obj = new api.DownloadRequest.fromJson(json);
1324 checkDownloadRequest(obj); 1324 checkDownloadRequest(obj);
1325 1325
1326 var path = (req.url).path; 1326 var path = (req.url).path;
1327 var pathOffset = 0; 1327 var pathOffset = 0;
1328 var index; 1328 var index;
1329 var subPart; 1329 var subPart;
1330 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 1330 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
1331 pathOffset += 1; 1331 pathOffset += 1;
1332 unittest.expect(path.substring(pathOffset, pathOffset + 25), unittest.eq uals("doubleclickbidmanager/v1/")); 1332 unittest.expect(path.substring(pathOffset, pathOffset + 25), unittest.eq uals("doubleclickbidmanager/v1/"));
(...skipping 18 matching lines...) Expand all
1351 } 1351 }
1352 } 1352 }
1353 1353
1354 1354
1355 var h = { 1355 var h = {
1356 "content-type" : "application/json; charset=utf-8", 1356 "content-type" : "application/json; charset=utf-8",
1357 }; 1357 };
1358 var resp = convert.JSON.encode(buildDownloadResponse()); 1358 var resp = convert.JSON.encode(buildDownloadResponse());
1359 return new async.Future.value(stringResponse(200, h, resp)); 1359 return new async.Future.value(stringResponse(200, h, resp));
1360 }), true); 1360 }), true);
1361 res.download(arg_request).then(unittest.expectAsync(((api.DownloadResponse response) { 1361 res.download(arg_request).then(unittest.expectAsync1(((api.DownloadRespons e response) {
1362 checkDownloadResponse(response); 1362 checkDownloadResponse(response);
1363 }))); 1363 })));
1364 }); 1364 });
1365 1365
1366 }); 1366 });
1367 1367
1368 1368
1369 } 1369 }
1370 1370
OLDNEW
« no previous file with comments | « generated/googleapis/test/dns/v1_test.dart ('k') | generated/googleapis/test/doubleclicksearch/v2_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698