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

Side by Side Diff: generated/googleapis/test/fitness/v1_test.dart

Issue 1296863002: Api-roll 22: 2015-08-17 (Closed) Base URL: git@github.com:dart-lang/googleapis.git@master
Patch Set: Created 5 years, 4 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.fitness.v1.test; 1 library googleapis.fitness.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:unittest/unittest.dart' as unittest;
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 headers, core.String body) {
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 buildUnnamed1654() { 54 buildUnnamed1534() {
55 var o = new core.List<api.Dataset>(); 55 var o = new core.List<api.Dataset>();
56 o.add(buildDataset()); 56 o.add(buildDataset());
57 o.add(buildDataset()); 57 o.add(buildDataset());
58 return o; 58 return o;
59 } 59 }
60 60
61 checkUnnamed1654(core.List<api.Dataset> o) { 61 checkUnnamed1534(core.List<api.Dataset> o) {
62 unittest.expect(o, unittest.hasLength(2)); 62 unittest.expect(o, unittest.hasLength(2));
63 checkDataset(o[0]); 63 checkDataset(o[0]);
64 checkDataset(o[1]); 64 checkDataset(o[1]);
65 } 65 }
66 66
67 core.int buildCounterAggregateBucket = 0; 67 core.int buildCounterAggregateBucket = 0;
68 buildAggregateBucket() { 68 buildAggregateBucket() {
69 var o = new api.AggregateBucket(); 69 var o = new api.AggregateBucket();
70 buildCounterAggregateBucket++; 70 buildCounterAggregateBucket++;
71 if (buildCounterAggregateBucket < 3) { 71 if (buildCounterAggregateBucket < 3) {
72 o.activity = 42; 72 o.activity = 42;
73 o.dataset = buildUnnamed1654(); 73 o.dataset = buildUnnamed1534();
74 o.endTimeMillis = "foo"; 74 o.endTimeMillis = "foo";
75 o.session = buildSession(); 75 o.session = buildSession();
76 o.startTimeMillis = "foo"; 76 o.startTimeMillis = "foo";
77 o.type = "foo"; 77 o.type = "foo";
78 } 78 }
79 buildCounterAggregateBucket--; 79 buildCounterAggregateBucket--;
80 return o; 80 return o;
81 } 81 }
82 82
83 checkAggregateBucket(api.AggregateBucket o) { 83 checkAggregateBucket(api.AggregateBucket o) {
84 buildCounterAggregateBucket++; 84 buildCounterAggregateBucket++;
85 if (buildCounterAggregateBucket < 3) { 85 if (buildCounterAggregateBucket < 3) {
86 unittest.expect(o.activity, unittest.equals(42)); 86 unittest.expect(o.activity, unittest.equals(42));
87 checkUnnamed1654(o.dataset); 87 checkUnnamed1534(o.dataset);
88 unittest.expect(o.endTimeMillis, unittest.equals('foo')); 88 unittest.expect(o.endTimeMillis, unittest.equals('foo'));
89 checkSession(o.session); 89 checkSession(o.session);
90 unittest.expect(o.startTimeMillis, unittest.equals('foo')); 90 unittest.expect(o.startTimeMillis, unittest.equals('foo'));
91 unittest.expect(o.type, unittest.equals('foo')); 91 unittest.expect(o.type, unittest.equals('foo'));
92 } 92 }
93 buildCounterAggregateBucket--; 93 buildCounterAggregateBucket--;
94 } 94 }
95 95
96 core.int buildCounterAggregateBy = 0; 96 core.int buildCounterAggregateBy = 0;
97 buildAggregateBy() { 97 buildAggregateBy() {
98 var o = new api.AggregateBy(); 98 var o = new api.AggregateBy();
99 buildCounterAggregateBy++; 99 buildCounterAggregateBy++;
100 if (buildCounterAggregateBy < 3) { 100 if (buildCounterAggregateBy < 3) {
101 o.dataSourceId = "foo"; 101 o.dataSourceId = "foo";
102 o.dataTypeName = "foo"; 102 o.dataTypeName = "foo";
103 } 103 }
104 buildCounterAggregateBy--; 104 buildCounterAggregateBy--;
105 return o; 105 return o;
106 } 106 }
107 107
108 checkAggregateBy(api.AggregateBy o) { 108 checkAggregateBy(api.AggregateBy o) {
109 buildCounterAggregateBy++; 109 buildCounterAggregateBy++;
110 if (buildCounterAggregateBy < 3) { 110 if (buildCounterAggregateBy < 3) {
111 unittest.expect(o.dataSourceId, unittest.equals('foo')); 111 unittest.expect(o.dataSourceId, unittest.equals('foo'));
112 unittest.expect(o.dataTypeName, unittest.equals('foo')); 112 unittest.expect(o.dataTypeName, unittest.equals('foo'));
113 } 113 }
114 buildCounterAggregateBy--; 114 buildCounterAggregateBy--;
115 } 115 }
116 116
117 buildUnnamed1655() { 117 buildUnnamed1535() {
118 var o = new core.List<api.AggregateBy>(); 118 var o = new core.List<api.AggregateBy>();
119 o.add(buildAggregateBy()); 119 o.add(buildAggregateBy());
120 o.add(buildAggregateBy()); 120 o.add(buildAggregateBy());
121 return o; 121 return o;
122 } 122 }
123 123
124 checkUnnamed1655(core.List<api.AggregateBy> o) { 124 checkUnnamed1535(core.List<api.AggregateBy> o) {
125 unittest.expect(o, unittest.hasLength(2)); 125 unittest.expect(o, unittest.hasLength(2));
126 checkAggregateBy(o[0]); 126 checkAggregateBy(o[0]);
127 checkAggregateBy(o[1]); 127 checkAggregateBy(o[1]);
128 } 128 }
129 129
130 core.int buildCounterAggregateRequest = 0; 130 core.int buildCounterAggregateRequest = 0;
131 buildAggregateRequest() { 131 buildAggregateRequest() {
132 var o = new api.AggregateRequest(); 132 var o = new api.AggregateRequest();
133 buildCounterAggregateRequest++; 133 buildCounterAggregateRequest++;
134 if (buildCounterAggregateRequest < 3) { 134 if (buildCounterAggregateRequest < 3) {
135 o.aggregateBy = buildUnnamed1655(); 135 o.aggregateBy = buildUnnamed1535();
136 o.bucketByActivitySegment = buildBucketByActivity(); 136 o.bucketByActivitySegment = buildBucketByActivity();
137 o.bucketByActivityType = buildBucketByActivity(); 137 o.bucketByActivityType = buildBucketByActivity();
138 o.bucketBySession = buildBucketBySession(); 138 o.bucketBySession = buildBucketBySession();
139 o.bucketByTime = buildBucketByTime(); 139 o.bucketByTime = buildBucketByTime();
140 o.endTimeMillis = "foo"; 140 o.endTimeMillis = "foo";
141 o.startTimeMillis = "foo"; 141 o.startTimeMillis = "foo";
142 } 142 }
143 buildCounterAggregateRequest--; 143 buildCounterAggregateRequest--;
144 return o; 144 return o;
145 } 145 }
146 146
147 checkAggregateRequest(api.AggregateRequest o) { 147 checkAggregateRequest(api.AggregateRequest o) {
148 buildCounterAggregateRequest++; 148 buildCounterAggregateRequest++;
149 if (buildCounterAggregateRequest < 3) { 149 if (buildCounterAggregateRequest < 3) {
150 checkUnnamed1655(o.aggregateBy); 150 checkUnnamed1535(o.aggregateBy);
151 checkBucketByActivity(o.bucketByActivitySegment); 151 checkBucketByActivity(o.bucketByActivitySegment);
152 checkBucketByActivity(o.bucketByActivityType); 152 checkBucketByActivity(o.bucketByActivityType);
153 checkBucketBySession(o.bucketBySession); 153 checkBucketBySession(o.bucketBySession);
154 checkBucketByTime(o.bucketByTime); 154 checkBucketByTime(o.bucketByTime);
155 unittest.expect(o.endTimeMillis, unittest.equals('foo')); 155 unittest.expect(o.endTimeMillis, unittest.equals('foo'));
156 unittest.expect(o.startTimeMillis, unittest.equals('foo')); 156 unittest.expect(o.startTimeMillis, unittest.equals('foo'));
157 } 157 }
158 buildCounterAggregateRequest--; 158 buildCounterAggregateRequest--;
159 } 159 }
160 160
161 buildUnnamed1656() { 161 buildUnnamed1536() {
162 var o = new core.List<api.AggregateBucket>(); 162 var o = new core.List<api.AggregateBucket>();
163 o.add(buildAggregateBucket()); 163 o.add(buildAggregateBucket());
164 o.add(buildAggregateBucket()); 164 o.add(buildAggregateBucket());
165 return o; 165 return o;
166 } 166 }
167 167
168 checkUnnamed1656(core.List<api.AggregateBucket> o) { 168 checkUnnamed1536(core.List<api.AggregateBucket> o) {
169 unittest.expect(o, unittest.hasLength(2)); 169 unittest.expect(o, unittest.hasLength(2));
170 checkAggregateBucket(o[0]); 170 checkAggregateBucket(o[0]);
171 checkAggregateBucket(o[1]); 171 checkAggregateBucket(o[1]);
172 } 172 }
173 173
174 core.int buildCounterAggregateResponse = 0; 174 core.int buildCounterAggregateResponse = 0;
175 buildAggregateResponse() { 175 buildAggregateResponse() {
176 var o = new api.AggregateResponse(); 176 var o = new api.AggregateResponse();
177 buildCounterAggregateResponse++; 177 buildCounterAggregateResponse++;
178 if (buildCounterAggregateResponse < 3) { 178 if (buildCounterAggregateResponse < 3) {
179 o.bucket = buildUnnamed1656(); 179 o.bucket = buildUnnamed1536();
180 } 180 }
181 buildCounterAggregateResponse--; 181 buildCounterAggregateResponse--;
182 return o; 182 return o;
183 } 183 }
184 184
185 checkAggregateResponse(api.AggregateResponse o) { 185 checkAggregateResponse(api.AggregateResponse o) {
186 buildCounterAggregateResponse++; 186 buildCounterAggregateResponse++;
187 if (buildCounterAggregateResponse < 3) { 187 if (buildCounterAggregateResponse < 3) {
188 checkUnnamed1656(o.bucket); 188 checkUnnamed1536(o.bucket);
189 } 189 }
190 buildCounterAggregateResponse--; 190 buildCounterAggregateResponse--;
191 } 191 }
192 192
193 core.int buildCounterApplication = 0; 193 core.int buildCounterApplication = 0;
194 buildApplication() { 194 buildApplication() {
195 var o = new api.Application(); 195 var o = new api.Application();
196 buildCounterApplication++; 196 buildCounterApplication++;
197 if (buildCounterApplication < 3) { 197 if (buildCounterApplication < 3) {
198 o.detailsUrl = "foo"; 198 o.detailsUrl = "foo";
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 } 267 }
268 268
269 checkBucketByTime(api.BucketByTime o) { 269 checkBucketByTime(api.BucketByTime o) {
270 buildCounterBucketByTime++; 270 buildCounterBucketByTime++;
271 if (buildCounterBucketByTime < 3) { 271 if (buildCounterBucketByTime < 3) {
272 unittest.expect(o.durationMillis, unittest.equals('foo')); 272 unittest.expect(o.durationMillis, unittest.equals('foo'));
273 } 273 }
274 buildCounterBucketByTime--; 274 buildCounterBucketByTime--;
275 } 275 }
276 276
277 buildUnnamed1657() { 277 buildUnnamed1537() {
278 var o = new core.List<api.Value>(); 278 var o = new core.List<api.Value>();
279 o.add(buildValue()); 279 o.add(buildValue());
280 o.add(buildValue()); 280 o.add(buildValue());
281 return o; 281 return o;
282 } 282 }
283 283
284 checkUnnamed1657(core.List<api.Value> o) { 284 checkUnnamed1537(core.List<api.Value> o) {
285 unittest.expect(o, unittest.hasLength(2)); 285 unittest.expect(o, unittest.hasLength(2));
286 checkValue(o[0]); 286 checkValue(o[0]);
287 checkValue(o[1]); 287 checkValue(o[1]);
288 } 288 }
289 289
290 core.int buildCounterDataPoint = 0; 290 core.int buildCounterDataPoint = 0;
291 buildDataPoint() { 291 buildDataPoint() {
292 var o = new api.DataPoint(); 292 var o = new api.DataPoint();
293 buildCounterDataPoint++; 293 buildCounterDataPoint++;
294 if (buildCounterDataPoint < 3) { 294 if (buildCounterDataPoint < 3) {
295 o.computationTimeMillis = "foo"; 295 o.computationTimeMillis = "foo";
296 o.dataTypeName = "foo"; 296 o.dataTypeName = "foo";
297 o.endTimeNanos = "foo"; 297 o.endTimeNanos = "foo";
298 o.modifiedTimeMillis = "foo"; 298 o.modifiedTimeMillis = "foo";
299 o.originDataSourceId = "foo"; 299 o.originDataSourceId = "foo";
300 o.rawTimestampNanos = "foo"; 300 o.rawTimestampNanos = "foo";
301 o.startTimeNanos = "foo"; 301 o.startTimeNanos = "foo";
302 o.value = buildUnnamed1657(); 302 o.value = buildUnnamed1537();
303 } 303 }
304 buildCounterDataPoint--; 304 buildCounterDataPoint--;
305 return o; 305 return o;
306 } 306 }
307 307
308 checkDataPoint(api.DataPoint o) { 308 checkDataPoint(api.DataPoint o) {
309 buildCounterDataPoint++; 309 buildCounterDataPoint++;
310 if (buildCounterDataPoint < 3) { 310 if (buildCounterDataPoint < 3) {
311 unittest.expect(o.computationTimeMillis, unittest.equals('foo')); 311 unittest.expect(o.computationTimeMillis, unittest.equals('foo'));
312 unittest.expect(o.dataTypeName, unittest.equals('foo')); 312 unittest.expect(o.dataTypeName, unittest.equals('foo'));
313 unittest.expect(o.endTimeNanos, unittest.equals('foo')); 313 unittest.expect(o.endTimeNanos, unittest.equals('foo'));
314 unittest.expect(o.modifiedTimeMillis, unittest.equals('foo')); 314 unittest.expect(o.modifiedTimeMillis, unittest.equals('foo'));
315 unittest.expect(o.originDataSourceId, unittest.equals('foo')); 315 unittest.expect(o.originDataSourceId, unittest.equals('foo'));
316 unittest.expect(o.rawTimestampNanos, unittest.equals('foo')); 316 unittest.expect(o.rawTimestampNanos, unittest.equals('foo'));
317 unittest.expect(o.startTimeNanos, unittest.equals('foo')); 317 unittest.expect(o.startTimeNanos, unittest.equals('foo'));
318 checkUnnamed1657(o.value); 318 checkUnnamed1537(o.value);
319 } 319 }
320 buildCounterDataPoint--; 320 buildCounterDataPoint--;
321 } 321 }
322 322
323 core.int buildCounterDataSource = 0; 323 core.int buildCounterDataSource = 0;
324 buildDataSource() { 324 buildDataSource() {
325 var o = new api.DataSource(); 325 var o = new api.DataSource();
326 buildCounterDataSource++; 326 buildCounterDataSource++;
327 if (buildCounterDataSource < 3) { 327 if (buildCounterDataSource < 3) {
328 o.application = buildApplication(); 328 o.application = buildApplication();
(...skipping 15 matching lines...) Expand all
344 unittest.expect(o.dataStreamId, unittest.equals('foo')); 344 unittest.expect(o.dataStreamId, unittest.equals('foo'));
345 unittest.expect(o.dataStreamName, unittest.equals('foo')); 345 unittest.expect(o.dataStreamName, unittest.equals('foo'));
346 checkDataType(o.dataType); 346 checkDataType(o.dataType);
347 checkDevice(o.device); 347 checkDevice(o.device);
348 unittest.expect(o.name, unittest.equals('foo')); 348 unittest.expect(o.name, unittest.equals('foo'));
349 unittest.expect(o.type, unittest.equals('foo')); 349 unittest.expect(o.type, unittest.equals('foo'));
350 } 350 }
351 buildCounterDataSource--; 351 buildCounterDataSource--;
352 } 352 }
353 353
354 buildUnnamed1658() { 354 buildUnnamed1538() {
355 var o = new core.List<api.DataTypeField>(); 355 var o = new core.List<api.DataTypeField>();
356 o.add(buildDataTypeField()); 356 o.add(buildDataTypeField());
357 o.add(buildDataTypeField()); 357 o.add(buildDataTypeField());
358 return o; 358 return o;
359 } 359 }
360 360
361 checkUnnamed1658(core.List<api.DataTypeField> o) { 361 checkUnnamed1538(core.List<api.DataTypeField> o) {
362 unittest.expect(o, unittest.hasLength(2)); 362 unittest.expect(o, unittest.hasLength(2));
363 checkDataTypeField(o[0]); 363 checkDataTypeField(o[0]);
364 checkDataTypeField(o[1]); 364 checkDataTypeField(o[1]);
365 } 365 }
366 366
367 core.int buildCounterDataType = 0; 367 core.int buildCounterDataType = 0;
368 buildDataType() { 368 buildDataType() {
369 var o = new api.DataType(); 369 var o = new api.DataType();
370 buildCounterDataType++; 370 buildCounterDataType++;
371 if (buildCounterDataType < 3) { 371 if (buildCounterDataType < 3) {
372 o.field = buildUnnamed1658(); 372 o.field = buildUnnamed1538();
373 o.name = "foo"; 373 o.name = "foo";
374 } 374 }
375 buildCounterDataType--; 375 buildCounterDataType--;
376 return o; 376 return o;
377 } 377 }
378 378
379 checkDataType(api.DataType o) { 379 checkDataType(api.DataType o) {
380 buildCounterDataType++; 380 buildCounterDataType++;
381 if (buildCounterDataType < 3) { 381 if (buildCounterDataType < 3) {
382 checkUnnamed1658(o.field); 382 checkUnnamed1538(o.field);
383 unittest.expect(o.name, unittest.equals('foo')); 383 unittest.expect(o.name, unittest.equals('foo'));
384 } 384 }
385 buildCounterDataType--; 385 buildCounterDataType--;
386 } 386 }
387 387
388 core.int buildCounterDataTypeField = 0; 388 core.int buildCounterDataTypeField = 0;
389 buildDataTypeField() { 389 buildDataTypeField() {
390 var o = new api.DataTypeField(); 390 var o = new api.DataTypeField();
391 buildCounterDataTypeField++; 391 buildCounterDataTypeField++;
392 if (buildCounterDataTypeField < 3) { 392 if (buildCounterDataTypeField < 3) {
393 o.format = "foo"; 393 o.format = "foo";
394 o.name = "foo"; 394 o.name = "foo";
395 o.optional = true; 395 o.optional = true;
396 } 396 }
397 buildCounterDataTypeField--; 397 buildCounterDataTypeField--;
398 return o; 398 return o;
399 } 399 }
400 400
401 checkDataTypeField(api.DataTypeField o) { 401 checkDataTypeField(api.DataTypeField o) {
402 buildCounterDataTypeField++; 402 buildCounterDataTypeField++;
403 if (buildCounterDataTypeField < 3) { 403 if (buildCounterDataTypeField < 3) {
404 unittest.expect(o.format, unittest.equals('foo')); 404 unittest.expect(o.format, unittest.equals('foo'));
405 unittest.expect(o.name, unittest.equals('foo')); 405 unittest.expect(o.name, unittest.equals('foo'));
406 unittest.expect(o.optional, unittest.isTrue); 406 unittest.expect(o.optional, unittest.isTrue);
407 } 407 }
408 buildCounterDataTypeField--; 408 buildCounterDataTypeField--;
409 } 409 }
410 410
411 buildUnnamed1659() { 411 buildUnnamed1539() {
412 var o = new core.List<api.DataPoint>(); 412 var o = new core.List<api.DataPoint>();
413 o.add(buildDataPoint()); 413 o.add(buildDataPoint());
414 o.add(buildDataPoint()); 414 o.add(buildDataPoint());
415 return o; 415 return o;
416 } 416 }
417 417
418 checkUnnamed1659(core.List<api.DataPoint> o) { 418 checkUnnamed1539(core.List<api.DataPoint> o) {
419 unittest.expect(o, unittest.hasLength(2)); 419 unittest.expect(o, unittest.hasLength(2));
420 checkDataPoint(o[0]); 420 checkDataPoint(o[0]);
421 checkDataPoint(o[1]); 421 checkDataPoint(o[1]);
422 } 422 }
423 423
424 core.int buildCounterDataset = 0; 424 core.int buildCounterDataset = 0;
425 buildDataset() { 425 buildDataset() {
426 var o = new api.Dataset(); 426 var o = new api.Dataset();
427 buildCounterDataset++; 427 buildCounterDataset++;
428 if (buildCounterDataset < 3) { 428 if (buildCounterDataset < 3) {
429 o.dataSourceId = "foo"; 429 o.dataSourceId = "foo";
430 o.maxEndTimeNs = "foo"; 430 o.maxEndTimeNs = "foo";
431 o.minStartTimeNs = "foo"; 431 o.minStartTimeNs = "foo";
432 o.nextPageToken = "foo"; 432 o.nextPageToken = "foo";
433 o.point = buildUnnamed1659(); 433 o.point = buildUnnamed1539();
434 } 434 }
435 buildCounterDataset--; 435 buildCounterDataset--;
436 return o; 436 return o;
437 } 437 }
438 438
439 checkDataset(api.Dataset o) { 439 checkDataset(api.Dataset o) {
440 buildCounterDataset++; 440 buildCounterDataset++;
441 if (buildCounterDataset < 3) { 441 if (buildCounterDataset < 3) {
442 unittest.expect(o.dataSourceId, unittest.equals('foo')); 442 unittest.expect(o.dataSourceId, unittest.equals('foo'));
443 unittest.expect(o.maxEndTimeNs, unittest.equals('foo')); 443 unittest.expect(o.maxEndTimeNs, unittest.equals('foo'));
444 unittest.expect(o.minStartTimeNs, unittest.equals('foo')); 444 unittest.expect(o.minStartTimeNs, unittest.equals('foo'));
445 unittest.expect(o.nextPageToken, unittest.equals('foo')); 445 unittest.expect(o.nextPageToken, unittest.equals('foo'));
446 checkUnnamed1659(o.point); 446 checkUnnamed1539(o.point);
447 } 447 }
448 buildCounterDataset--; 448 buildCounterDataset--;
449 } 449 }
450 450
451 core.int buildCounterDevice = 0; 451 core.int buildCounterDevice = 0;
452 buildDevice() { 452 buildDevice() {
453 var o = new api.Device(); 453 var o = new api.Device();
454 buildCounterDevice++; 454 buildCounterDevice++;
455 if (buildCounterDevice < 3) { 455 if (buildCounterDevice < 3) {
456 o.manufacturer = "foo"; 456 o.manufacturer = "foo";
(...skipping 11 matching lines...) Expand all
468 if (buildCounterDevice < 3) { 468 if (buildCounterDevice < 3) {
469 unittest.expect(o.manufacturer, unittest.equals('foo')); 469 unittest.expect(o.manufacturer, unittest.equals('foo'));
470 unittest.expect(o.model, unittest.equals('foo')); 470 unittest.expect(o.model, unittest.equals('foo'));
471 unittest.expect(o.type, unittest.equals('foo')); 471 unittest.expect(o.type, unittest.equals('foo'));
472 unittest.expect(o.uid, unittest.equals('foo')); 472 unittest.expect(o.uid, unittest.equals('foo'));
473 unittest.expect(o.version, unittest.equals('foo')); 473 unittest.expect(o.version, unittest.equals('foo'));
474 } 474 }
475 buildCounterDevice--; 475 buildCounterDevice--;
476 } 476 }
477 477
478 buildUnnamed1660() { 478 buildUnnamed1540() {
479 var o = new core.List<api.DataSource>(); 479 var o = new core.List<api.DataSource>();
480 o.add(buildDataSource()); 480 o.add(buildDataSource());
481 o.add(buildDataSource()); 481 o.add(buildDataSource());
482 return o; 482 return o;
483 } 483 }
484 484
485 checkUnnamed1660(core.List<api.DataSource> o) { 485 checkUnnamed1540(core.List<api.DataSource> o) {
486 unittest.expect(o, unittest.hasLength(2)); 486 unittest.expect(o, unittest.hasLength(2));
487 checkDataSource(o[0]); 487 checkDataSource(o[0]);
488 checkDataSource(o[1]); 488 checkDataSource(o[1]);
489 } 489 }
490 490
491 core.int buildCounterListDataSourcesResponse = 0; 491 core.int buildCounterListDataSourcesResponse = 0;
492 buildListDataSourcesResponse() { 492 buildListDataSourcesResponse() {
493 var o = new api.ListDataSourcesResponse(); 493 var o = new api.ListDataSourcesResponse();
494 buildCounterListDataSourcesResponse++; 494 buildCounterListDataSourcesResponse++;
495 if (buildCounterListDataSourcesResponse < 3) { 495 if (buildCounterListDataSourcesResponse < 3) {
496 o.dataSource = buildUnnamed1660(); 496 o.dataSource = buildUnnamed1540();
497 } 497 }
498 buildCounterListDataSourcesResponse--; 498 buildCounterListDataSourcesResponse--;
499 return o; 499 return o;
500 } 500 }
501 501
502 checkListDataSourcesResponse(api.ListDataSourcesResponse o) { 502 checkListDataSourcesResponse(api.ListDataSourcesResponse o) {
503 buildCounterListDataSourcesResponse++; 503 buildCounterListDataSourcesResponse++;
504 if (buildCounterListDataSourcesResponse < 3) { 504 if (buildCounterListDataSourcesResponse < 3) {
505 checkUnnamed1660(o.dataSource); 505 checkUnnamed1540(o.dataSource);
506 } 506 }
507 buildCounterListDataSourcesResponse--; 507 buildCounterListDataSourcesResponse--;
508 } 508 }
509 509
510 buildUnnamed1661() { 510 buildUnnamed1541() {
511 var o = new core.List<api.Session>(); 511 var o = new core.List<api.Session>();
512 o.add(buildSession()); 512 o.add(buildSession());
513 o.add(buildSession()); 513 o.add(buildSession());
514 return o; 514 return o;
515 } 515 }
516 516
517 checkUnnamed1661(core.List<api.Session> o) { 517 checkUnnamed1541(core.List<api.Session> o) {
518 unittest.expect(o, unittest.hasLength(2)); 518 unittest.expect(o, unittest.hasLength(2));
519 checkSession(o[0]); 519 checkSession(o[0]);
520 checkSession(o[1]); 520 checkSession(o[1]);
521 } 521 }
522 522
523 buildUnnamed1662() { 523 buildUnnamed1542() {
524 var o = new core.List<api.Session>(); 524 var o = new core.List<api.Session>();
525 o.add(buildSession()); 525 o.add(buildSession());
526 o.add(buildSession()); 526 o.add(buildSession());
527 return o; 527 return o;
528 } 528 }
529 529
530 checkUnnamed1662(core.List<api.Session> o) { 530 checkUnnamed1542(core.List<api.Session> o) {
531 unittest.expect(o, unittest.hasLength(2)); 531 unittest.expect(o, unittest.hasLength(2));
532 checkSession(o[0]); 532 checkSession(o[0]);
533 checkSession(o[1]); 533 checkSession(o[1]);
534 } 534 }
535 535
536 core.int buildCounterListSessionsResponse = 0; 536 core.int buildCounterListSessionsResponse = 0;
537 buildListSessionsResponse() { 537 buildListSessionsResponse() {
538 var o = new api.ListSessionsResponse(); 538 var o = new api.ListSessionsResponse();
539 buildCounterListSessionsResponse++; 539 buildCounterListSessionsResponse++;
540 if (buildCounterListSessionsResponse < 3) { 540 if (buildCounterListSessionsResponse < 3) {
541 o.deletedSession = buildUnnamed1661(); 541 o.deletedSession = buildUnnamed1541();
542 o.nextPageToken = "foo"; 542 o.nextPageToken = "foo";
543 o.session = buildUnnamed1662(); 543 o.session = buildUnnamed1542();
544 } 544 }
545 buildCounterListSessionsResponse--; 545 buildCounterListSessionsResponse--;
546 return o; 546 return o;
547 } 547 }
548 548
549 checkListSessionsResponse(api.ListSessionsResponse o) { 549 checkListSessionsResponse(api.ListSessionsResponse o) {
550 buildCounterListSessionsResponse++; 550 buildCounterListSessionsResponse++;
551 if (buildCounterListSessionsResponse < 3) { 551 if (buildCounterListSessionsResponse < 3) {
552 checkUnnamed1661(o.deletedSession); 552 checkUnnamed1541(o.deletedSession);
553 unittest.expect(o.nextPageToken, unittest.equals('foo')); 553 unittest.expect(o.nextPageToken, unittest.equals('foo'));
554 checkUnnamed1662(o.session); 554 checkUnnamed1542(o.session);
555 } 555 }
556 buildCounterListSessionsResponse--; 556 buildCounterListSessionsResponse--;
557 } 557 }
558 558
559 core.int buildCounterMapValue = 0; 559 core.int buildCounterMapValue = 0;
560 buildMapValue() { 560 buildMapValue() {
561 var o = new api.MapValue(); 561 var o = new api.MapValue();
562 buildCounterMapValue++; 562 buildCounterMapValue++;
563 if (buildCounterMapValue < 3) { 563 if (buildCounterMapValue < 3) {
564 o.fpVal = 42.0; 564 o.fpVal = 42.0;
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
603 unittest.expect(o.description, unittest.equals('foo')); 603 unittest.expect(o.description, unittest.equals('foo'));
604 unittest.expect(o.endTimeMillis, unittest.equals('foo')); 604 unittest.expect(o.endTimeMillis, unittest.equals('foo'));
605 unittest.expect(o.id, unittest.equals('foo')); 605 unittest.expect(o.id, unittest.equals('foo'));
606 unittest.expect(o.modifiedTimeMillis, unittest.equals('foo')); 606 unittest.expect(o.modifiedTimeMillis, unittest.equals('foo'));
607 unittest.expect(o.name, unittest.equals('foo')); 607 unittest.expect(o.name, unittest.equals('foo'));
608 unittest.expect(o.startTimeMillis, unittest.equals('foo')); 608 unittest.expect(o.startTimeMillis, unittest.equals('foo'));
609 } 609 }
610 buildCounterSession--; 610 buildCounterSession--;
611 } 611 }
612 612
613 buildUnnamed1663() { 613 buildUnnamed1543() {
614 var o = new core.List<api.ValueMapValEntry>(); 614 var o = new core.List<api.ValueMapValEntry>();
615 o.add(buildValueMapValEntry()); 615 o.add(buildValueMapValEntry());
616 o.add(buildValueMapValEntry()); 616 o.add(buildValueMapValEntry());
617 return o; 617 return o;
618 } 618 }
619 619
620 checkUnnamed1663(core.List<api.ValueMapValEntry> o) { 620 checkUnnamed1543(core.List<api.ValueMapValEntry> o) {
621 unittest.expect(o, unittest.hasLength(2)); 621 unittest.expect(o, unittest.hasLength(2));
622 checkValueMapValEntry(o[0]); 622 checkValueMapValEntry(o[0]);
623 checkValueMapValEntry(o[1]); 623 checkValueMapValEntry(o[1]);
624 } 624 }
625 625
626 core.int buildCounterValue = 0; 626 core.int buildCounterValue = 0;
627 buildValue() { 627 buildValue() {
628 var o = new api.Value(); 628 var o = new api.Value();
629 buildCounterValue++; 629 buildCounterValue++;
630 if (buildCounterValue < 3) { 630 if (buildCounterValue < 3) {
631 o.fpVal = 42.0; 631 o.fpVal = 42.0;
632 o.intVal = 42; 632 o.intVal = 42;
633 o.mapVal = buildUnnamed1663(); 633 o.mapVal = buildUnnamed1543();
634 o.stringVal = "foo"; 634 o.stringVal = "foo";
635 } 635 }
636 buildCounterValue--; 636 buildCounterValue--;
637 return o; 637 return o;
638 } 638 }
639 639
640 checkValue(api.Value o) { 640 checkValue(api.Value o) {
641 buildCounterValue++; 641 buildCounterValue++;
642 if (buildCounterValue < 3) { 642 if (buildCounterValue < 3) {
643 unittest.expect(o.fpVal, unittest.equals(42.0)); 643 unittest.expect(o.fpVal, unittest.equals(42.0));
644 unittest.expect(o.intVal, unittest.equals(42)); 644 unittest.expect(o.intVal, unittest.equals(42));
645 checkUnnamed1663(o.mapVal); 645 checkUnnamed1543(o.mapVal);
646 unittest.expect(o.stringVal, unittest.equals('foo')); 646 unittest.expect(o.stringVal, unittest.equals('foo'));
647 } 647 }
648 buildCounterValue--; 648 buildCounterValue--;
649 } 649 }
650 650
651 core.int buildCounterValueMapValEntry = 0; 651 core.int buildCounterValueMapValEntry = 0;
652 buildValueMapValEntry() { 652 buildValueMapValEntry() {
653 var o = new api.ValueMapValEntry(); 653 var o = new api.ValueMapValEntry();
654 buildCounterValueMapValEntry++; 654 buildCounterValueMapValEntry++;
655 if (buildCounterValueMapValEntry < 3) { 655 if (buildCounterValueMapValEntry < 3) {
656 o.key = "foo"; 656 o.key = "foo";
657 o.value = buildMapValue(); 657 o.value = buildMapValue();
658 } 658 }
659 buildCounterValueMapValEntry--; 659 buildCounterValueMapValEntry--;
660 return o; 660 return o;
661 } 661 }
662 662
663 checkValueMapValEntry(api.ValueMapValEntry o) { 663 checkValueMapValEntry(api.ValueMapValEntry o) {
664 buildCounterValueMapValEntry++; 664 buildCounterValueMapValEntry++;
665 if (buildCounterValueMapValEntry < 3) { 665 if (buildCounterValueMapValEntry < 3) {
666 unittest.expect(o.key, unittest.equals('foo')); 666 unittest.expect(o.key, unittest.equals('foo'));
667 checkMapValue(o.value); 667 checkMapValue(o.value);
668 } 668 }
669 buildCounterValueMapValEntry--; 669 buildCounterValueMapValEntry--;
670 } 670 }
671 671
672 buildUnnamed1664() { 672 buildUnnamed1544() {
673 var o = new core.List<core.String>(); 673 var o = new core.List<core.String>();
674 o.add("foo"); 674 o.add("foo");
675 o.add("foo"); 675 o.add("foo");
676 return o; 676 return o;
677 } 677 }
678 678
679 checkUnnamed1664(core.List<core.String> o) { 679 checkUnnamed1544(core.List<core.String> o) {
680 unittest.expect(o, unittest.hasLength(2)); 680 unittest.expect(o, unittest.hasLength(2));
681 unittest.expect(o[0], unittest.equals('foo')); 681 unittest.expect(o[0], unittest.equals('foo'));
682 unittest.expect(o[1], unittest.equals('foo')); 682 unittest.expect(o[1], unittest.equals('foo'));
683 } 683 }
684 684
685 685
686 main() { 686 main() {
687 unittest.group("obj-schema-AggregateBucket", () { 687 unittest.group("obj-schema-AggregateBucket", () {
688 unittest.test("to-json--from-json", () { 688 unittest.test("to-json--from-json", () {
689 var o = buildAggregateBucket(); 689 var o = buildAggregateBucket();
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
995 res.get(arg_userId, arg_dataSourceId).then(unittest.expectAsync(((api.Data Source response) { 995 res.get(arg_userId, arg_dataSourceId).then(unittest.expectAsync(((api.Data Source response) {
996 checkDataSource(response); 996 checkDataSource(response);
997 }))); 997 })));
998 }); 998 });
999 999
1000 unittest.test("method--list", () { 1000 unittest.test("method--list", () {
1001 1001
1002 var mock = new HttpServerMock(); 1002 var mock = new HttpServerMock();
1003 api.UsersDataSourcesResourceApi res = new api.FitnessApi(mock).users.dataS ources; 1003 api.UsersDataSourcesResourceApi res = new api.FitnessApi(mock).users.dataS ources;
1004 var arg_userId = "foo"; 1004 var arg_userId = "foo";
1005 var arg_dataTypeName = buildUnnamed1664(); 1005 var arg_dataTypeName = buildUnnamed1544();
1006 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 1006 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
1007 var path = (req.url).path; 1007 var path = (req.url).path;
1008 var pathOffset = 0; 1008 var pathOffset = 0;
1009 var index; 1009 var index;
1010 var subPart; 1010 var subPart;
1011 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 1011 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
1012 pathOffset += 1; 1012 pathOffset += 1;
1013 1013
1014 var query = (req.url).query; 1014 var query = (req.url).query;
1015 var queryOffset = 0; 1015 var queryOffset = 0;
(...skipping 461 matching lines...) Expand 10 before | Expand all | Expand 10 after
1477 res.update(arg_request, arg_userId, arg_sessionId, currentTimeMillis: arg_ currentTimeMillis).then(unittest.expectAsync(((api.Session response) { 1477 res.update(arg_request, arg_userId, arg_sessionId, currentTimeMillis: arg_ currentTimeMillis).then(unittest.expectAsync(((api.Session response) {
1478 checkSession(response); 1478 checkSession(response);
1479 }))); 1479 })));
1480 }); 1480 });
1481 1481
1482 }); 1482 });
1483 1483
1484 1484
1485 } 1485 }
1486 1486
OLDNEW
« no previous file with comments | « generated/googleapis/test/drive/v2_test.dart ('k') | generated/googleapis/test/freebase/v1_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698