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

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

Issue 2695743002: Api-roll 45: 2017-02-13 (Closed)
Patch Set: reverted local changes to pubspec file Created 3 years, 10 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 buildUnnamed1769() { 54 buildUnnamed1863() {
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 checkUnnamed1769(core.List<api.Dataset> o) { 61 checkUnnamed1863(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 = buildUnnamed1769(); 73 o.dataset = buildUnnamed1863();
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 checkUnnamed1769(o.dataset); 87 checkUnnamed1863(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 buildUnnamed1770() { 117 buildUnnamed1864() {
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 checkUnnamed1770(core.List<api.AggregateBy> o) { 124 checkUnnamed1864(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 buildUnnamed1771() { 130 buildUnnamed1865() {
131 var o = new core.List<core.String>(); 131 var o = new core.List<core.String>();
132 o.add("foo"); 132 o.add("foo");
133 o.add("foo"); 133 o.add("foo");
134 return o; 134 return o;
135 } 135 }
136 136
137 checkUnnamed1771(core.List<core.String> o) { 137 checkUnnamed1865(core.List<core.String> o) {
138 unittest.expect(o, unittest.hasLength(2)); 138 unittest.expect(o, unittest.hasLength(2));
139 unittest.expect(o[0], unittest.equals('foo')); 139 unittest.expect(o[0], unittest.equals('foo'));
140 unittest.expect(o[1], unittest.equals('foo')); 140 unittest.expect(o[1], unittest.equals('foo'));
141 } 141 }
142 142
143 core.int buildCounterAggregateRequest = 0; 143 core.int buildCounterAggregateRequest = 0;
144 buildAggregateRequest() { 144 buildAggregateRequest() {
145 var o = new api.AggregateRequest(); 145 var o = new api.AggregateRequest();
146 buildCounterAggregateRequest++; 146 buildCounterAggregateRequest++;
147 if (buildCounterAggregateRequest < 3) { 147 if (buildCounterAggregateRequest < 3) {
148 o.aggregateBy = buildUnnamed1770(); 148 o.aggregateBy = buildUnnamed1864();
149 o.bucketByActivitySegment = buildBucketByActivity(); 149 o.bucketByActivitySegment = buildBucketByActivity();
150 o.bucketByActivityType = buildBucketByActivity(); 150 o.bucketByActivityType = buildBucketByActivity();
151 o.bucketBySession = buildBucketBySession(); 151 o.bucketBySession = buildBucketBySession();
152 o.bucketByTime = buildBucketByTime(); 152 o.bucketByTime = buildBucketByTime();
153 o.endTimeMillis = "foo"; 153 o.endTimeMillis = "foo";
154 o.filteredDataQualityStandard = buildUnnamed1771(); 154 o.filteredDataQualityStandard = buildUnnamed1865();
155 o.startTimeMillis = "foo"; 155 o.startTimeMillis = "foo";
156 } 156 }
157 buildCounterAggregateRequest--; 157 buildCounterAggregateRequest--;
158 return o; 158 return o;
159 } 159 }
160 160
161 checkAggregateRequest(api.AggregateRequest o) { 161 checkAggregateRequest(api.AggregateRequest o) {
162 buildCounterAggregateRequest++; 162 buildCounterAggregateRequest++;
163 if (buildCounterAggregateRequest < 3) { 163 if (buildCounterAggregateRequest < 3) {
164 checkUnnamed1770(o.aggregateBy); 164 checkUnnamed1864(o.aggregateBy);
165 checkBucketByActivity(o.bucketByActivitySegment); 165 checkBucketByActivity(o.bucketByActivitySegment);
166 checkBucketByActivity(o.bucketByActivityType); 166 checkBucketByActivity(o.bucketByActivityType);
167 checkBucketBySession(o.bucketBySession); 167 checkBucketBySession(o.bucketBySession);
168 checkBucketByTime(o.bucketByTime); 168 checkBucketByTime(o.bucketByTime);
169 unittest.expect(o.endTimeMillis, unittest.equals('foo')); 169 unittest.expect(o.endTimeMillis, unittest.equals('foo'));
170 checkUnnamed1771(o.filteredDataQualityStandard); 170 checkUnnamed1865(o.filteredDataQualityStandard);
171 unittest.expect(o.startTimeMillis, unittest.equals('foo')); 171 unittest.expect(o.startTimeMillis, unittest.equals('foo'));
172 } 172 }
173 buildCounterAggregateRequest--; 173 buildCounterAggregateRequest--;
174 } 174 }
175 175
176 buildUnnamed1772() { 176 buildUnnamed1866() {
177 var o = new core.List<api.AggregateBucket>(); 177 var o = new core.List<api.AggregateBucket>();
178 o.add(buildAggregateBucket()); 178 o.add(buildAggregateBucket());
179 o.add(buildAggregateBucket()); 179 o.add(buildAggregateBucket());
180 return o; 180 return o;
181 } 181 }
182 182
183 checkUnnamed1772(core.List<api.AggregateBucket> o) { 183 checkUnnamed1866(core.List<api.AggregateBucket> o) {
184 unittest.expect(o, unittest.hasLength(2)); 184 unittest.expect(o, unittest.hasLength(2));
185 checkAggregateBucket(o[0]); 185 checkAggregateBucket(o[0]);
186 checkAggregateBucket(o[1]); 186 checkAggregateBucket(o[1]);
187 } 187 }
188 188
189 core.int buildCounterAggregateResponse = 0; 189 core.int buildCounterAggregateResponse = 0;
190 buildAggregateResponse() { 190 buildAggregateResponse() {
191 var o = new api.AggregateResponse(); 191 var o = new api.AggregateResponse();
192 buildCounterAggregateResponse++; 192 buildCounterAggregateResponse++;
193 if (buildCounterAggregateResponse < 3) { 193 if (buildCounterAggregateResponse < 3) {
194 o.bucket = buildUnnamed1772(); 194 o.bucket = buildUnnamed1866();
195 } 195 }
196 buildCounterAggregateResponse--; 196 buildCounterAggregateResponse--;
197 return o; 197 return o;
198 } 198 }
199 199
200 checkAggregateResponse(api.AggregateResponse o) { 200 checkAggregateResponse(api.AggregateResponse o) {
201 buildCounterAggregateResponse++; 201 buildCounterAggregateResponse++;
202 if (buildCounterAggregateResponse < 3) { 202 if (buildCounterAggregateResponse < 3) {
203 checkUnnamed1772(o.bucket); 203 checkUnnamed1866(o.bucket);
204 } 204 }
205 buildCounterAggregateResponse--; 205 buildCounterAggregateResponse--;
206 } 206 }
207 207
208 core.int buildCounterApplication = 0; 208 core.int buildCounterApplication = 0;
209 buildApplication() { 209 buildApplication() {
210 var o = new api.Application(); 210 var o = new api.Application();
211 buildCounterApplication++; 211 buildCounterApplication++;
212 if (buildCounterApplication < 3) { 212 if (buildCounterApplication < 3) {
213 o.detailsUrl = "foo"; 213 o.detailsUrl = "foo";
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 checkBucketByTimePeriod(api.BucketByTimePeriod o) { 307 checkBucketByTimePeriod(api.BucketByTimePeriod o) {
308 buildCounterBucketByTimePeriod++; 308 buildCounterBucketByTimePeriod++;
309 if (buildCounterBucketByTimePeriod < 3) { 309 if (buildCounterBucketByTimePeriod < 3) {
310 unittest.expect(o.timeZoneId, unittest.equals('foo')); 310 unittest.expect(o.timeZoneId, unittest.equals('foo'));
311 unittest.expect(o.type, unittest.equals('foo')); 311 unittest.expect(o.type, unittest.equals('foo'));
312 unittest.expect(o.value, unittest.equals(42)); 312 unittest.expect(o.value, unittest.equals(42));
313 } 313 }
314 buildCounterBucketByTimePeriod--; 314 buildCounterBucketByTimePeriod--;
315 } 315 }
316 316
317 buildUnnamed1773() { 317 buildUnnamed1867() {
318 var o = new core.List<api.Value>(); 318 var o = new core.List<api.Value>();
319 o.add(buildValue()); 319 o.add(buildValue());
320 o.add(buildValue()); 320 o.add(buildValue());
321 return o; 321 return o;
322 } 322 }
323 323
324 checkUnnamed1773(core.List<api.Value> o) { 324 checkUnnamed1867(core.List<api.Value> o) {
325 unittest.expect(o, unittest.hasLength(2)); 325 unittest.expect(o, unittest.hasLength(2));
326 checkValue(o[0]); 326 checkValue(o[0]);
327 checkValue(o[1]); 327 checkValue(o[1]);
328 } 328 }
329 329
330 core.int buildCounterDataPoint = 0; 330 core.int buildCounterDataPoint = 0;
331 buildDataPoint() { 331 buildDataPoint() {
332 var o = new api.DataPoint(); 332 var o = new api.DataPoint();
333 buildCounterDataPoint++; 333 buildCounterDataPoint++;
334 if (buildCounterDataPoint < 3) { 334 if (buildCounterDataPoint < 3) {
335 o.computationTimeMillis = "foo"; 335 o.computationTimeMillis = "foo";
336 o.dataTypeName = "foo"; 336 o.dataTypeName = "foo";
337 o.endTimeNanos = "foo"; 337 o.endTimeNanos = "foo";
338 o.modifiedTimeMillis = "foo"; 338 o.modifiedTimeMillis = "foo";
339 o.originDataSourceId = "foo"; 339 o.originDataSourceId = "foo";
340 o.rawTimestampNanos = "foo"; 340 o.rawTimestampNanos = "foo";
341 o.startTimeNanos = "foo"; 341 o.startTimeNanos = "foo";
342 o.value = buildUnnamed1773(); 342 o.value = buildUnnamed1867();
343 } 343 }
344 buildCounterDataPoint--; 344 buildCounterDataPoint--;
345 return o; 345 return o;
346 } 346 }
347 347
348 checkDataPoint(api.DataPoint o) { 348 checkDataPoint(api.DataPoint o) {
349 buildCounterDataPoint++; 349 buildCounterDataPoint++;
350 if (buildCounterDataPoint < 3) { 350 if (buildCounterDataPoint < 3) {
351 unittest.expect(o.computationTimeMillis, unittest.equals('foo')); 351 unittest.expect(o.computationTimeMillis, unittest.equals('foo'));
352 unittest.expect(o.dataTypeName, unittest.equals('foo')); 352 unittest.expect(o.dataTypeName, unittest.equals('foo'));
353 unittest.expect(o.endTimeNanos, unittest.equals('foo')); 353 unittest.expect(o.endTimeNanos, unittest.equals('foo'));
354 unittest.expect(o.modifiedTimeMillis, unittest.equals('foo')); 354 unittest.expect(o.modifiedTimeMillis, unittest.equals('foo'));
355 unittest.expect(o.originDataSourceId, unittest.equals('foo')); 355 unittest.expect(o.originDataSourceId, unittest.equals('foo'));
356 unittest.expect(o.rawTimestampNanos, unittest.equals('foo')); 356 unittest.expect(o.rawTimestampNanos, unittest.equals('foo'));
357 unittest.expect(o.startTimeNanos, unittest.equals('foo')); 357 unittest.expect(o.startTimeNanos, unittest.equals('foo'));
358 checkUnnamed1773(o.value); 358 checkUnnamed1867(o.value);
359 } 359 }
360 buildCounterDataPoint--; 360 buildCounterDataPoint--;
361 } 361 }
362 362
363 buildUnnamed1774() { 363 buildUnnamed1868() {
364 var o = new core.List<core.String>(); 364 var o = new core.List<core.String>();
365 o.add("foo"); 365 o.add("foo");
366 o.add("foo"); 366 o.add("foo");
367 return o; 367 return o;
368 } 368 }
369 369
370 checkUnnamed1774(core.List<core.String> o) { 370 checkUnnamed1868(core.List<core.String> o) {
371 unittest.expect(o, unittest.hasLength(2)); 371 unittest.expect(o, unittest.hasLength(2));
372 unittest.expect(o[0], unittest.equals('foo')); 372 unittest.expect(o[0], unittest.equals('foo'));
373 unittest.expect(o[1], unittest.equals('foo')); 373 unittest.expect(o[1], unittest.equals('foo'));
374 } 374 }
375 375
376 core.int buildCounterDataSource = 0; 376 core.int buildCounterDataSource = 0;
377 buildDataSource() { 377 buildDataSource() {
378 var o = new api.DataSource(); 378 var o = new api.DataSource();
379 buildCounterDataSource++; 379 buildCounterDataSource++;
380 if (buildCounterDataSource < 3) { 380 if (buildCounterDataSource < 3) {
381 o.application = buildApplication(); 381 o.application = buildApplication();
382 o.dataQualityStandard = buildUnnamed1774(); 382 o.dataQualityStandard = buildUnnamed1868();
383 o.dataStreamId = "foo"; 383 o.dataStreamId = "foo";
384 o.dataStreamName = "foo"; 384 o.dataStreamName = "foo";
385 o.dataType = buildDataType(); 385 o.dataType = buildDataType();
386 o.device = buildDevice(); 386 o.device = buildDevice();
387 o.name = "foo"; 387 o.name = "foo";
388 o.type = "foo"; 388 o.type = "foo";
389 } 389 }
390 buildCounterDataSource--; 390 buildCounterDataSource--;
391 return o; 391 return o;
392 } 392 }
393 393
394 checkDataSource(api.DataSource o) { 394 checkDataSource(api.DataSource o) {
395 buildCounterDataSource++; 395 buildCounterDataSource++;
396 if (buildCounterDataSource < 3) { 396 if (buildCounterDataSource < 3) {
397 checkApplication(o.application); 397 checkApplication(o.application);
398 checkUnnamed1774(o.dataQualityStandard); 398 checkUnnamed1868(o.dataQualityStandard);
399 unittest.expect(o.dataStreamId, unittest.equals('foo')); 399 unittest.expect(o.dataStreamId, unittest.equals('foo'));
400 unittest.expect(o.dataStreamName, unittest.equals('foo')); 400 unittest.expect(o.dataStreamName, unittest.equals('foo'));
401 checkDataType(o.dataType); 401 checkDataType(o.dataType);
402 checkDevice(o.device); 402 checkDevice(o.device);
403 unittest.expect(o.name, unittest.equals('foo')); 403 unittest.expect(o.name, unittest.equals('foo'));
404 unittest.expect(o.type, unittest.equals('foo')); 404 unittest.expect(o.type, unittest.equals('foo'));
405 } 405 }
406 buildCounterDataSource--; 406 buildCounterDataSource--;
407 } 407 }
408 408
409 buildUnnamed1775() { 409 buildUnnamed1869() {
410 var o = new core.List<api.DataTypeField>(); 410 var o = new core.List<api.DataTypeField>();
411 o.add(buildDataTypeField()); 411 o.add(buildDataTypeField());
412 o.add(buildDataTypeField()); 412 o.add(buildDataTypeField());
413 return o; 413 return o;
414 } 414 }
415 415
416 checkUnnamed1775(core.List<api.DataTypeField> o) { 416 checkUnnamed1869(core.List<api.DataTypeField> o) {
417 unittest.expect(o, unittest.hasLength(2)); 417 unittest.expect(o, unittest.hasLength(2));
418 checkDataTypeField(o[0]); 418 checkDataTypeField(o[0]);
419 checkDataTypeField(o[1]); 419 checkDataTypeField(o[1]);
420 } 420 }
421 421
422 core.int buildCounterDataType = 0; 422 core.int buildCounterDataType = 0;
423 buildDataType() { 423 buildDataType() {
424 var o = new api.DataType(); 424 var o = new api.DataType();
425 buildCounterDataType++; 425 buildCounterDataType++;
426 if (buildCounterDataType < 3) { 426 if (buildCounterDataType < 3) {
427 o.field = buildUnnamed1775(); 427 o.field = buildUnnamed1869();
428 o.name = "foo"; 428 o.name = "foo";
429 } 429 }
430 buildCounterDataType--; 430 buildCounterDataType--;
431 return o; 431 return o;
432 } 432 }
433 433
434 checkDataType(api.DataType o) { 434 checkDataType(api.DataType o) {
435 buildCounterDataType++; 435 buildCounterDataType++;
436 if (buildCounterDataType < 3) { 436 if (buildCounterDataType < 3) {
437 checkUnnamed1775(o.field); 437 checkUnnamed1869(o.field);
438 unittest.expect(o.name, unittest.equals('foo')); 438 unittest.expect(o.name, unittest.equals('foo'));
439 } 439 }
440 buildCounterDataType--; 440 buildCounterDataType--;
441 } 441 }
442 442
443 core.int buildCounterDataTypeField = 0; 443 core.int buildCounterDataTypeField = 0;
444 buildDataTypeField() { 444 buildDataTypeField() {
445 var o = new api.DataTypeField(); 445 var o = new api.DataTypeField();
446 buildCounterDataTypeField++; 446 buildCounterDataTypeField++;
447 if (buildCounterDataTypeField < 3) { 447 if (buildCounterDataTypeField < 3) {
448 o.format = "foo"; 448 o.format = "foo";
449 o.name = "foo"; 449 o.name = "foo";
450 o.optional = true; 450 o.optional = true;
451 } 451 }
452 buildCounterDataTypeField--; 452 buildCounterDataTypeField--;
453 return o; 453 return o;
454 } 454 }
455 455
456 checkDataTypeField(api.DataTypeField o) { 456 checkDataTypeField(api.DataTypeField o) {
457 buildCounterDataTypeField++; 457 buildCounterDataTypeField++;
458 if (buildCounterDataTypeField < 3) { 458 if (buildCounterDataTypeField < 3) {
459 unittest.expect(o.format, unittest.equals('foo')); 459 unittest.expect(o.format, unittest.equals('foo'));
460 unittest.expect(o.name, unittest.equals('foo')); 460 unittest.expect(o.name, unittest.equals('foo'));
461 unittest.expect(o.optional, unittest.isTrue); 461 unittest.expect(o.optional, unittest.isTrue);
462 } 462 }
463 buildCounterDataTypeField--; 463 buildCounterDataTypeField--;
464 } 464 }
465 465
466 buildUnnamed1776() { 466 buildUnnamed1870() {
467 var o = new core.List<api.DataPoint>(); 467 var o = new core.List<api.DataPoint>();
468 o.add(buildDataPoint()); 468 o.add(buildDataPoint());
469 o.add(buildDataPoint()); 469 o.add(buildDataPoint());
470 return o; 470 return o;
471 } 471 }
472 472
473 checkUnnamed1776(core.List<api.DataPoint> o) { 473 checkUnnamed1870(core.List<api.DataPoint> o) {
474 unittest.expect(o, unittest.hasLength(2)); 474 unittest.expect(o, unittest.hasLength(2));
475 checkDataPoint(o[0]); 475 checkDataPoint(o[0]);
476 checkDataPoint(o[1]); 476 checkDataPoint(o[1]);
477 } 477 }
478 478
479 core.int buildCounterDataset = 0; 479 core.int buildCounterDataset = 0;
480 buildDataset() { 480 buildDataset() {
481 var o = new api.Dataset(); 481 var o = new api.Dataset();
482 buildCounterDataset++; 482 buildCounterDataset++;
483 if (buildCounterDataset < 3) { 483 if (buildCounterDataset < 3) {
484 o.dataSourceId = "foo"; 484 o.dataSourceId = "foo";
485 o.maxEndTimeNs = "foo"; 485 o.maxEndTimeNs = "foo";
486 o.minStartTimeNs = "foo"; 486 o.minStartTimeNs = "foo";
487 o.nextPageToken = "foo"; 487 o.nextPageToken = "foo";
488 o.point = buildUnnamed1776(); 488 o.point = buildUnnamed1870();
489 } 489 }
490 buildCounterDataset--; 490 buildCounterDataset--;
491 return o; 491 return o;
492 } 492 }
493 493
494 checkDataset(api.Dataset o) { 494 checkDataset(api.Dataset o) {
495 buildCounterDataset++; 495 buildCounterDataset++;
496 if (buildCounterDataset < 3) { 496 if (buildCounterDataset < 3) {
497 unittest.expect(o.dataSourceId, unittest.equals('foo')); 497 unittest.expect(o.dataSourceId, unittest.equals('foo'));
498 unittest.expect(o.maxEndTimeNs, unittest.equals('foo')); 498 unittest.expect(o.maxEndTimeNs, unittest.equals('foo'));
499 unittest.expect(o.minStartTimeNs, unittest.equals('foo')); 499 unittest.expect(o.minStartTimeNs, unittest.equals('foo'));
500 unittest.expect(o.nextPageToken, unittest.equals('foo')); 500 unittest.expect(o.nextPageToken, unittest.equals('foo'));
501 checkUnnamed1776(o.point); 501 checkUnnamed1870(o.point);
502 } 502 }
503 buildCounterDataset--; 503 buildCounterDataset--;
504 } 504 }
505 505
506 core.int buildCounterDevice = 0; 506 core.int buildCounterDevice = 0;
507 buildDevice() { 507 buildDevice() {
508 var o = new api.Device(); 508 var o = new api.Device();
509 buildCounterDevice++; 509 buildCounterDevice++;
510 if (buildCounterDevice < 3) { 510 if (buildCounterDevice < 3) {
511 o.manufacturer = "foo"; 511 o.manufacturer = "foo";
(...skipping 11 matching lines...) Expand all
523 if (buildCounterDevice < 3) { 523 if (buildCounterDevice < 3) {
524 unittest.expect(o.manufacturer, unittest.equals('foo')); 524 unittest.expect(o.manufacturer, unittest.equals('foo'));
525 unittest.expect(o.model, unittest.equals('foo')); 525 unittest.expect(o.model, unittest.equals('foo'));
526 unittest.expect(o.type, unittest.equals('foo')); 526 unittest.expect(o.type, unittest.equals('foo'));
527 unittest.expect(o.uid, unittest.equals('foo')); 527 unittest.expect(o.uid, unittest.equals('foo'));
528 unittest.expect(o.version, unittest.equals('foo')); 528 unittest.expect(o.version, unittest.equals('foo'));
529 } 529 }
530 buildCounterDevice--; 530 buildCounterDevice--;
531 } 531 }
532 532
533 buildUnnamed1777() { 533 buildUnnamed1871() {
534 var o = new core.List<api.DataSource>(); 534 var o = new core.List<api.DataSource>();
535 o.add(buildDataSource()); 535 o.add(buildDataSource());
536 o.add(buildDataSource()); 536 o.add(buildDataSource());
537 return o; 537 return o;
538 } 538 }
539 539
540 checkUnnamed1777(core.List<api.DataSource> o) { 540 checkUnnamed1871(core.List<api.DataSource> o) {
541 unittest.expect(o, unittest.hasLength(2)); 541 unittest.expect(o, unittest.hasLength(2));
542 checkDataSource(o[0]); 542 checkDataSource(o[0]);
543 checkDataSource(o[1]); 543 checkDataSource(o[1]);
544 } 544 }
545 545
546 core.int buildCounterListDataSourcesResponse = 0; 546 core.int buildCounterListDataSourcesResponse = 0;
547 buildListDataSourcesResponse() { 547 buildListDataSourcesResponse() {
548 var o = new api.ListDataSourcesResponse(); 548 var o = new api.ListDataSourcesResponse();
549 buildCounterListDataSourcesResponse++; 549 buildCounterListDataSourcesResponse++;
550 if (buildCounterListDataSourcesResponse < 3) { 550 if (buildCounterListDataSourcesResponse < 3) {
551 o.dataSource = buildUnnamed1777(); 551 o.dataSource = buildUnnamed1871();
552 } 552 }
553 buildCounterListDataSourcesResponse--; 553 buildCounterListDataSourcesResponse--;
554 return o; 554 return o;
555 } 555 }
556 556
557 checkListDataSourcesResponse(api.ListDataSourcesResponse o) { 557 checkListDataSourcesResponse(api.ListDataSourcesResponse o) {
558 buildCounterListDataSourcesResponse++; 558 buildCounterListDataSourcesResponse++;
559 if (buildCounterListDataSourcesResponse < 3) { 559 if (buildCounterListDataSourcesResponse < 3) {
560 checkUnnamed1777(o.dataSource); 560 checkUnnamed1871(o.dataSource);
561 } 561 }
562 buildCounterListDataSourcesResponse--; 562 buildCounterListDataSourcesResponse--;
563 } 563 }
564 564
565 buildUnnamed1778() { 565 buildUnnamed1872() {
566 var o = new core.List<api.Session>(); 566 var o = new core.List<api.Session>();
567 o.add(buildSession()); 567 o.add(buildSession());
568 o.add(buildSession()); 568 o.add(buildSession());
569 return o; 569 return o;
570 } 570 }
571 571
572 checkUnnamed1778(core.List<api.Session> o) { 572 checkUnnamed1872(core.List<api.Session> o) {
573 unittest.expect(o, unittest.hasLength(2)); 573 unittest.expect(o, unittest.hasLength(2));
574 checkSession(o[0]); 574 checkSession(o[0]);
575 checkSession(o[1]); 575 checkSession(o[1]);
576 } 576 }
577 577
578 buildUnnamed1779() { 578 buildUnnamed1873() {
579 var o = new core.List<api.Session>(); 579 var o = new core.List<api.Session>();
580 o.add(buildSession()); 580 o.add(buildSession());
581 o.add(buildSession()); 581 o.add(buildSession());
582 return o; 582 return o;
583 } 583 }
584 584
585 checkUnnamed1779(core.List<api.Session> o) { 585 checkUnnamed1873(core.List<api.Session> o) {
586 unittest.expect(o, unittest.hasLength(2)); 586 unittest.expect(o, unittest.hasLength(2));
587 checkSession(o[0]); 587 checkSession(o[0]);
588 checkSession(o[1]); 588 checkSession(o[1]);
589 } 589 }
590 590
591 core.int buildCounterListSessionsResponse = 0; 591 core.int buildCounterListSessionsResponse = 0;
592 buildListSessionsResponse() { 592 buildListSessionsResponse() {
593 var o = new api.ListSessionsResponse(); 593 var o = new api.ListSessionsResponse();
594 buildCounterListSessionsResponse++; 594 buildCounterListSessionsResponse++;
595 if (buildCounterListSessionsResponse < 3) { 595 if (buildCounterListSessionsResponse < 3) {
596 o.deletedSession = buildUnnamed1778(); 596 o.deletedSession = buildUnnamed1872();
597 o.hasMoreData = true; 597 o.hasMoreData = true;
598 o.nextPageToken = "foo"; 598 o.nextPageToken = "foo";
599 o.session = buildUnnamed1779(); 599 o.session = buildUnnamed1873();
600 } 600 }
601 buildCounterListSessionsResponse--; 601 buildCounterListSessionsResponse--;
602 return o; 602 return o;
603 } 603 }
604 604
605 checkListSessionsResponse(api.ListSessionsResponse o) { 605 checkListSessionsResponse(api.ListSessionsResponse o) {
606 buildCounterListSessionsResponse++; 606 buildCounterListSessionsResponse++;
607 if (buildCounterListSessionsResponse < 3) { 607 if (buildCounterListSessionsResponse < 3) {
608 checkUnnamed1778(o.deletedSession); 608 checkUnnamed1872(o.deletedSession);
609 unittest.expect(o.hasMoreData, unittest.isTrue); 609 unittest.expect(o.hasMoreData, unittest.isTrue);
610 unittest.expect(o.nextPageToken, unittest.equals('foo')); 610 unittest.expect(o.nextPageToken, unittest.equals('foo'));
611 checkUnnamed1779(o.session); 611 checkUnnamed1873(o.session);
612 } 612 }
613 buildCounterListSessionsResponse--; 613 buildCounterListSessionsResponse--;
614 } 614 }
615 615
616 core.int buildCounterMapValue = 0; 616 core.int buildCounterMapValue = 0;
617 buildMapValue() { 617 buildMapValue() {
618 var o = new api.MapValue(); 618 var o = new api.MapValue();
619 buildCounterMapValue++; 619 buildCounterMapValue++;
620 if (buildCounterMapValue < 3) { 620 if (buildCounterMapValue < 3) {
621 o.fpVal = 42.0; 621 o.fpVal = 42.0;
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
660 unittest.expect(o.description, unittest.equals('foo')); 660 unittest.expect(o.description, unittest.equals('foo'));
661 unittest.expect(o.endTimeMillis, unittest.equals('foo')); 661 unittest.expect(o.endTimeMillis, unittest.equals('foo'));
662 unittest.expect(o.id, unittest.equals('foo')); 662 unittest.expect(o.id, unittest.equals('foo'));
663 unittest.expect(o.modifiedTimeMillis, unittest.equals('foo')); 663 unittest.expect(o.modifiedTimeMillis, unittest.equals('foo'));
664 unittest.expect(o.name, unittest.equals('foo')); 664 unittest.expect(o.name, unittest.equals('foo'));
665 unittest.expect(o.startTimeMillis, unittest.equals('foo')); 665 unittest.expect(o.startTimeMillis, unittest.equals('foo'));
666 } 666 }
667 buildCounterSession--; 667 buildCounterSession--;
668 } 668 }
669 669
670 buildUnnamed1780() { 670 buildUnnamed1874() {
671 var o = new core.List<api.ValueMapValEntry>(); 671 var o = new core.List<api.ValueMapValEntry>();
672 o.add(buildValueMapValEntry()); 672 o.add(buildValueMapValEntry());
673 o.add(buildValueMapValEntry()); 673 o.add(buildValueMapValEntry());
674 return o; 674 return o;
675 } 675 }
676 676
677 checkUnnamed1780(core.List<api.ValueMapValEntry> o) { 677 checkUnnamed1874(core.List<api.ValueMapValEntry> o) {
678 unittest.expect(o, unittest.hasLength(2)); 678 unittest.expect(o, unittest.hasLength(2));
679 checkValueMapValEntry(o[0]); 679 checkValueMapValEntry(o[0]);
680 checkValueMapValEntry(o[1]); 680 checkValueMapValEntry(o[1]);
681 } 681 }
682 682
683 core.int buildCounterValue = 0; 683 core.int buildCounterValue = 0;
684 buildValue() { 684 buildValue() {
685 var o = new api.Value(); 685 var o = new api.Value();
686 buildCounterValue++; 686 buildCounterValue++;
687 if (buildCounterValue < 3) { 687 if (buildCounterValue < 3) {
688 o.fpVal = 42.0; 688 o.fpVal = 42.0;
689 o.intVal = 42; 689 o.intVal = 42;
690 o.mapVal = buildUnnamed1780(); 690 o.mapVal = buildUnnamed1874();
691 o.stringVal = "foo"; 691 o.stringVal = "foo";
692 } 692 }
693 buildCounterValue--; 693 buildCounterValue--;
694 return o; 694 return o;
695 } 695 }
696 696
697 checkValue(api.Value o) { 697 checkValue(api.Value o) {
698 buildCounterValue++; 698 buildCounterValue++;
699 if (buildCounterValue < 3) { 699 if (buildCounterValue < 3) {
700 unittest.expect(o.fpVal, unittest.equals(42.0)); 700 unittest.expect(o.fpVal, unittest.equals(42.0));
701 unittest.expect(o.intVal, unittest.equals(42)); 701 unittest.expect(o.intVal, unittest.equals(42));
702 checkUnnamed1780(o.mapVal); 702 checkUnnamed1874(o.mapVal);
703 unittest.expect(o.stringVal, unittest.equals('foo')); 703 unittest.expect(o.stringVal, unittest.equals('foo'));
704 } 704 }
705 buildCounterValue--; 705 buildCounterValue--;
706 } 706 }
707 707
708 core.int buildCounterValueMapValEntry = 0; 708 core.int buildCounterValueMapValEntry = 0;
709 buildValueMapValEntry() { 709 buildValueMapValEntry() {
710 var o = new api.ValueMapValEntry(); 710 var o = new api.ValueMapValEntry();
711 buildCounterValueMapValEntry++; 711 buildCounterValueMapValEntry++;
712 if (buildCounterValueMapValEntry < 3) { 712 if (buildCounterValueMapValEntry < 3) {
713 o.key = "foo"; 713 o.key = "foo";
714 o.value = buildMapValue(); 714 o.value = buildMapValue();
715 } 715 }
716 buildCounterValueMapValEntry--; 716 buildCounterValueMapValEntry--;
717 return o; 717 return o;
718 } 718 }
719 719
720 checkValueMapValEntry(api.ValueMapValEntry o) { 720 checkValueMapValEntry(api.ValueMapValEntry o) {
721 buildCounterValueMapValEntry++; 721 buildCounterValueMapValEntry++;
722 if (buildCounterValueMapValEntry < 3) { 722 if (buildCounterValueMapValEntry < 3) {
723 unittest.expect(o.key, unittest.equals('foo')); 723 unittest.expect(o.key, unittest.equals('foo'));
724 checkMapValue(o.value); 724 checkMapValue(o.value);
725 } 725 }
726 buildCounterValueMapValEntry--; 726 buildCounterValueMapValEntry--;
727 } 727 }
728 728
729 buildUnnamed1781() { 729 buildUnnamed1875() {
730 var o = new core.List<core.String>(); 730 var o = new core.List<core.String>();
731 o.add("foo"); 731 o.add("foo");
732 o.add("foo"); 732 o.add("foo");
733 return o; 733 return o;
734 } 734 }
735 735
736 checkUnnamed1781(core.List<core.String> o) { 736 checkUnnamed1875(core.List<core.String> o) {
737 unittest.expect(o, unittest.hasLength(2)); 737 unittest.expect(o, unittest.hasLength(2));
738 unittest.expect(o[0], unittest.equals('foo')); 738 unittest.expect(o[0], unittest.equals('foo'));
739 unittest.expect(o[1], unittest.equals('foo')); 739 unittest.expect(o[1], unittest.equals('foo'));
740 } 740 }
741 741
742 742
743 main() { 743 main() {
744 unittest.group("obj-schema-AggregateBucket", () { 744 unittest.group("obj-schema-AggregateBucket", () {
745 unittest.test("to-json--from-json", () { 745 unittest.test("to-json--from-json", () {
746 var o = buildAggregateBucket(); 746 var o = buildAggregateBucket();
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
1061 res.get(arg_userId, arg_dataSourceId).then(unittest.expectAsync(((api.Data Source response) { 1061 res.get(arg_userId, arg_dataSourceId).then(unittest.expectAsync(((api.Data Source response) {
1062 checkDataSource(response); 1062 checkDataSource(response);
1063 }))); 1063 })));
1064 }); 1064 });
1065 1065
1066 unittest.test("method--list", () { 1066 unittest.test("method--list", () {
1067 1067
1068 var mock = new HttpServerMock(); 1068 var mock = new HttpServerMock();
1069 api.UsersDataSourcesResourceApi res = new api.FitnessApi(mock).users.dataS ources; 1069 api.UsersDataSourcesResourceApi res = new api.FitnessApi(mock).users.dataS ources;
1070 var arg_userId = "foo"; 1070 var arg_userId = "foo";
1071 var arg_dataTypeName = buildUnnamed1781(); 1071 var arg_dataTypeName = buildUnnamed1875();
1072 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 1072 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
1073 var path = (req.url).path; 1073 var path = (req.url).path;
1074 var pathOffset = 0; 1074 var pathOffset = 0;
1075 var index; 1075 var index;
1076 var subPart; 1076 var subPart;
1077 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 1077 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
1078 pathOffset += 1; 1078 pathOffset += 1;
1079 1079
1080 var query = (req.url).query; 1080 var query = (req.url).query;
1081 var queryOffset = 0; 1081 var queryOffset = 0;
(...skipping 461 matching lines...) Expand 10 before | Expand all | Expand 10 after
1543 res.update(arg_request, arg_userId, arg_sessionId, currentTimeMillis: arg_ currentTimeMillis).then(unittest.expectAsync(((api.Session response) { 1543 res.update(arg_request, arg_userId, arg_sessionId, currentTimeMillis: arg_ currentTimeMillis).then(unittest.expectAsync(((api.Session response) {
1544 checkSession(response); 1544 checkSession(response);
1545 }))); 1545 })));
1546 }); 1546 });
1547 1547
1548 }); 1548 });
1549 1549
1550 1550
1551 } 1551 }
1552 1552
OLDNEW
« no previous file with comments | « generated/googleapis/test/firebaserules/v1_test.dart ('k') | generated/googleapis/test/fusiontables/v1_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698