| OLD | NEW |
| 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 Loading... |
| 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 buildUnnamed2217() { | 54 buildUnnamed2100() { |
| 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 checkUnnamed2217(core.List<api.Dataset> o) { | 61 checkUnnamed2100(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 = buildUnnamed2217(); | 73 o.dataset = buildUnnamed2100(); |
| 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 checkUnnamed2217(o.dataset); | 87 checkUnnamed2100(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 buildUnnamed2218() { | 117 buildUnnamed2101() { |
| 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 checkUnnamed2218(core.List<api.AggregateBy> o) { | 124 checkUnnamed2101(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 = buildUnnamed2218(); | 135 o.aggregateBy = buildUnnamed2101(); |
| 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 checkUnnamed2218(o.aggregateBy); | 150 checkUnnamed2101(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 buildUnnamed2219() { | 161 buildUnnamed2102() { |
| 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 checkUnnamed2219(core.List<api.AggregateBucket> o) { | 168 checkUnnamed2102(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 = buildUnnamed2219(); | 179 o.bucket = buildUnnamed2102(); |
| 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 checkUnnamed2219(o.bucket); | 188 checkUnnamed2102(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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 292 checkBucketByTimePeriod(api.BucketByTimePeriod o) { | 292 checkBucketByTimePeriod(api.BucketByTimePeriod o) { |
| 293 buildCounterBucketByTimePeriod++; | 293 buildCounterBucketByTimePeriod++; |
| 294 if (buildCounterBucketByTimePeriod < 3) { | 294 if (buildCounterBucketByTimePeriod < 3) { |
| 295 unittest.expect(o.timeZoneId, unittest.equals('foo')); | 295 unittest.expect(o.timeZoneId, unittest.equals('foo')); |
| 296 unittest.expect(o.type, unittest.equals('foo')); | 296 unittest.expect(o.type, unittest.equals('foo')); |
| 297 unittest.expect(o.value, unittest.equals(42)); | 297 unittest.expect(o.value, unittest.equals(42)); |
| 298 } | 298 } |
| 299 buildCounterBucketByTimePeriod--; | 299 buildCounterBucketByTimePeriod--; |
| 300 } | 300 } |
| 301 | 301 |
| 302 buildUnnamed2220() { | 302 buildUnnamed2103() { |
| 303 var o = new core.List<api.Value>(); | 303 var o = new core.List<api.Value>(); |
| 304 o.add(buildValue()); | 304 o.add(buildValue()); |
| 305 o.add(buildValue()); | 305 o.add(buildValue()); |
| 306 return o; | 306 return o; |
| 307 } | 307 } |
| 308 | 308 |
| 309 checkUnnamed2220(core.List<api.Value> o) { | 309 checkUnnamed2103(core.List<api.Value> o) { |
| 310 unittest.expect(o, unittest.hasLength(2)); | 310 unittest.expect(o, unittest.hasLength(2)); |
| 311 checkValue(o[0]); | 311 checkValue(o[0]); |
| 312 checkValue(o[1]); | 312 checkValue(o[1]); |
| 313 } | 313 } |
| 314 | 314 |
| 315 core.int buildCounterDataPoint = 0; | 315 core.int buildCounterDataPoint = 0; |
| 316 buildDataPoint() { | 316 buildDataPoint() { |
| 317 var o = new api.DataPoint(); | 317 var o = new api.DataPoint(); |
| 318 buildCounterDataPoint++; | 318 buildCounterDataPoint++; |
| 319 if (buildCounterDataPoint < 3) { | 319 if (buildCounterDataPoint < 3) { |
| 320 o.computationTimeMillis = "foo"; | 320 o.computationTimeMillis = "foo"; |
| 321 o.dataTypeName = "foo"; | 321 o.dataTypeName = "foo"; |
| 322 o.endTimeNanos = "foo"; | 322 o.endTimeNanos = "foo"; |
| 323 o.modifiedTimeMillis = "foo"; | 323 o.modifiedTimeMillis = "foo"; |
| 324 o.originDataSourceId = "foo"; | 324 o.originDataSourceId = "foo"; |
| 325 o.rawTimestampNanos = "foo"; | 325 o.rawTimestampNanos = "foo"; |
| 326 o.startTimeNanos = "foo"; | 326 o.startTimeNanos = "foo"; |
| 327 o.value = buildUnnamed2220(); | 327 o.value = buildUnnamed2103(); |
| 328 } | 328 } |
| 329 buildCounterDataPoint--; | 329 buildCounterDataPoint--; |
| 330 return o; | 330 return o; |
| 331 } | 331 } |
| 332 | 332 |
| 333 checkDataPoint(api.DataPoint o) { | 333 checkDataPoint(api.DataPoint o) { |
| 334 buildCounterDataPoint++; | 334 buildCounterDataPoint++; |
| 335 if (buildCounterDataPoint < 3) { | 335 if (buildCounterDataPoint < 3) { |
| 336 unittest.expect(o.computationTimeMillis, unittest.equals('foo')); | 336 unittest.expect(o.computationTimeMillis, unittest.equals('foo')); |
| 337 unittest.expect(o.dataTypeName, unittest.equals('foo')); | 337 unittest.expect(o.dataTypeName, unittest.equals('foo')); |
| 338 unittest.expect(o.endTimeNanos, unittest.equals('foo')); | 338 unittest.expect(o.endTimeNanos, unittest.equals('foo')); |
| 339 unittest.expect(o.modifiedTimeMillis, unittest.equals('foo')); | 339 unittest.expect(o.modifiedTimeMillis, unittest.equals('foo')); |
| 340 unittest.expect(o.originDataSourceId, unittest.equals('foo')); | 340 unittest.expect(o.originDataSourceId, unittest.equals('foo')); |
| 341 unittest.expect(o.rawTimestampNanos, unittest.equals('foo')); | 341 unittest.expect(o.rawTimestampNanos, unittest.equals('foo')); |
| 342 unittest.expect(o.startTimeNanos, unittest.equals('foo')); | 342 unittest.expect(o.startTimeNanos, unittest.equals('foo')); |
| 343 checkUnnamed2220(o.value); | 343 checkUnnamed2103(o.value); |
| 344 } | 344 } |
| 345 buildCounterDataPoint--; | 345 buildCounterDataPoint--; |
| 346 } | 346 } |
| 347 | 347 |
| 348 buildUnnamed2221() { | 348 buildUnnamed2104() { |
| 349 var o = new core.List<core.String>(); | 349 var o = new core.List<core.String>(); |
| 350 o.add("foo"); | 350 o.add("foo"); |
| 351 o.add("foo"); | 351 o.add("foo"); |
| 352 return o; | 352 return o; |
| 353 } | 353 } |
| 354 | 354 |
| 355 checkUnnamed2221(core.List<core.String> o) { | 355 checkUnnamed2104(core.List<core.String> o) { |
| 356 unittest.expect(o, unittest.hasLength(2)); | 356 unittest.expect(o, unittest.hasLength(2)); |
| 357 unittest.expect(o[0], unittest.equals('foo')); | 357 unittest.expect(o[0], unittest.equals('foo')); |
| 358 unittest.expect(o[1], unittest.equals('foo')); | 358 unittest.expect(o[1], unittest.equals('foo')); |
| 359 } | 359 } |
| 360 | 360 |
| 361 core.int buildCounterDataSource = 0; | 361 core.int buildCounterDataSource = 0; |
| 362 buildDataSource() { | 362 buildDataSource() { |
| 363 var o = new api.DataSource(); | 363 var o = new api.DataSource(); |
| 364 buildCounterDataSource++; | 364 buildCounterDataSource++; |
| 365 if (buildCounterDataSource < 3) { | 365 if (buildCounterDataSource < 3) { |
| 366 o.application = buildApplication(); | 366 o.application = buildApplication(); |
| 367 o.dataQualityStandard = buildUnnamed2221(); | 367 o.dataQualityStandard = buildUnnamed2104(); |
| 368 o.dataStreamId = "foo"; | 368 o.dataStreamId = "foo"; |
| 369 o.dataStreamName = "foo"; | 369 o.dataStreamName = "foo"; |
| 370 o.dataType = buildDataType(); | 370 o.dataType = buildDataType(); |
| 371 o.device = buildDevice(); | 371 o.device = buildDevice(); |
| 372 o.name = "foo"; | 372 o.name = "foo"; |
| 373 o.type = "foo"; | 373 o.type = "foo"; |
| 374 } | 374 } |
| 375 buildCounterDataSource--; | 375 buildCounterDataSource--; |
| 376 return o; | 376 return o; |
| 377 } | 377 } |
| 378 | 378 |
| 379 checkDataSource(api.DataSource o) { | 379 checkDataSource(api.DataSource o) { |
| 380 buildCounterDataSource++; | 380 buildCounterDataSource++; |
| 381 if (buildCounterDataSource < 3) { | 381 if (buildCounterDataSource < 3) { |
| 382 checkApplication(o.application); | 382 checkApplication(o.application); |
| 383 checkUnnamed2221(o.dataQualityStandard); | 383 checkUnnamed2104(o.dataQualityStandard); |
| 384 unittest.expect(o.dataStreamId, unittest.equals('foo')); | 384 unittest.expect(o.dataStreamId, unittest.equals('foo')); |
| 385 unittest.expect(o.dataStreamName, unittest.equals('foo')); | 385 unittest.expect(o.dataStreamName, unittest.equals('foo')); |
| 386 checkDataType(o.dataType); | 386 checkDataType(o.dataType); |
| 387 checkDevice(o.device); | 387 checkDevice(o.device); |
| 388 unittest.expect(o.name, unittest.equals('foo')); | 388 unittest.expect(o.name, unittest.equals('foo')); |
| 389 unittest.expect(o.type, unittest.equals('foo')); | 389 unittest.expect(o.type, unittest.equals('foo')); |
| 390 } | 390 } |
| 391 buildCounterDataSource--; | 391 buildCounterDataSource--; |
| 392 } | 392 } |
| 393 | 393 |
| 394 buildUnnamed2222() { | 394 buildUnnamed2105() { |
| 395 var o = new core.List<api.DataTypeField>(); | 395 var o = new core.List<api.DataTypeField>(); |
| 396 o.add(buildDataTypeField()); | 396 o.add(buildDataTypeField()); |
| 397 o.add(buildDataTypeField()); | 397 o.add(buildDataTypeField()); |
| 398 return o; | 398 return o; |
| 399 } | 399 } |
| 400 | 400 |
| 401 checkUnnamed2222(core.List<api.DataTypeField> o) { | 401 checkUnnamed2105(core.List<api.DataTypeField> o) { |
| 402 unittest.expect(o, unittest.hasLength(2)); | 402 unittest.expect(o, unittest.hasLength(2)); |
| 403 checkDataTypeField(o[0]); | 403 checkDataTypeField(o[0]); |
| 404 checkDataTypeField(o[1]); | 404 checkDataTypeField(o[1]); |
| 405 } | 405 } |
| 406 | 406 |
| 407 core.int buildCounterDataType = 0; | 407 core.int buildCounterDataType = 0; |
| 408 buildDataType() { | 408 buildDataType() { |
| 409 var o = new api.DataType(); | 409 var o = new api.DataType(); |
| 410 buildCounterDataType++; | 410 buildCounterDataType++; |
| 411 if (buildCounterDataType < 3) { | 411 if (buildCounterDataType < 3) { |
| 412 o.field = buildUnnamed2222(); | 412 o.field = buildUnnamed2105(); |
| 413 o.name = "foo"; | 413 o.name = "foo"; |
| 414 } | 414 } |
| 415 buildCounterDataType--; | 415 buildCounterDataType--; |
| 416 return o; | 416 return o; |
| 417 } | 417 } |
| 418 | 418 |
| 419 checkDataType(api.DataType o) { | 419 checkDataType(api.DataType o) { |
| 420 buildCounterDataType++; | 420 buildCounterDataType++; |
| 421 if (buildCounterDataType < 3) { | 421 if (buildCounterDataType < 3) { |
| 422 checkUnnamed2222(o.field); | 422 checkUnnamed2105(o.field); |
| 423 unittest.expect(o.name, unittest.equals('foo')); | 423 unittest.expect(o.name, unittest.equals('foo')); |
| 424 } | 424 } |
| 425 buildCounterDataType--; | 425 buildCounterDataType--; |
| 426 } | 426 } |
| 427 | 427 |
| 428 core.int buildCounterDataTypeField = 0; | 428 core.int buildCounterDataTypeField = 0; |
| 429 buildDataTypeField() { | 429 buildDataTypeField() { |
| 430 var o = new api.DataTypeField(); | 430 var o = new api.DataTypeField(); |
| 431 buildCounterDataTypeField++; | 431 buildCounterDataTypeField++; |
| 432 if (buildCounterDataTypeField < 3) { | 432 if (buildCounterDataTypeField < 3) { |
| 433 o.format = "foo"; | 433 o.format = "foo"; |
| 434 o.name = "foo"; | 434 o.name = "foo"; |
| 435 o.optional = true; | 435 o.optional = true; |
| 436 } | 436 } |
| 437 buildCounterDataTypeField--; | 437 buildCounterDataTypeField--; |
| 438 return o; | 438 return o; |
| 439 } | 439 } |
| 440 | 440 |
| 441 checkDataTypeField(api.DataTypeField o) { | 441 checkDataTypeField(api.DataTypeField o) { |
| 442 buildCounterDataTypeField++; | 442 buildCounterDataTypeField++; |
| 443 if (buildCounterDataTypeField < 3) { | 443 if (buildCounterDataTypeField < 3) { |
| 444 unittest.expect(o.format, unittest.equals('foo')); | 444 unittest.expect(o.format, unittest.equals('foo')); |
| 445 unittest.expect(o.name, unittest.equals('foo')); | 445 unittest.expect(o.name, unittest.equals('foo')); |
| 446 unittest.expect(o.optional, unittest.isTrue); | 446 unittest.expect(o.optional, unittest.isTrue); |
| 447 } | 447 } |
| 448 buildCounterDataTypeField--; | 448 buildCounterDataTypeField--; |
| 449 } | 449 } |
| 450 | 450 |
| 451 buildUnnamed2223() { | 451 buildUnnamed2106() { |
| 452 var o = new core.List<api.DataPoint>(); | 452 var o = new core.List<api.DataPoint>(); |
| 453 o.add(buildDataPoint()); | 453 o.add(buildDataPoint()); |
| 454 o.add(buildDataPoint()); | 454 o.add(buildDataPoint()); |
| 455 return o; | 455 return o; |
| 456 } | 456 } |
| 457 | 457 |
| 458 checkUnnamed2223(core.List<api.DataPoint> o) { | 458 checkUnnamed2106(core.List<api.DataPoint> o) { |
| 459 unittest.expect(o, unittest.hasLength(2)); | 459 unittest.expect(o, unittest.hasLength(2)); |
| 460 checkDataPoint(o[0]); | 460 checkDataPoint(o[0]); |
| 461 checkDataPoint(o[1]); | 461 checkDataPoint(o[1]); |
| 462 } | 462 } |
| 463 | 463 |
| 464 core.int buildCounterDataset = 0; | 464 core.int buildCounterDataset = 0; |
| 465 buildDataset() { | 465 buildDataset() { |
| 466 var o = new api.Dataset(); | 466 var o = new api.Dataset(); |
| 467 buildCounterDataset++; | 467 buildCounterDataset++; |
| 468 if (buildCounterDataset < 3) { | 468 if (buildCounterDataset < 3) { |
| 469 o.dataSourceId = "foo"; | 469 o.dataSourceId = "foo"; |
| 470 o.maxEndTimeNs = "foo"; | 470 o.maxEndTimeNs = "foo"; |
| 471 o.minStartTimeNs = "foo"; | 471 o.minStartTimeNs = "foo"; |
| 472 o.nextPageToken = "foo"; | 472 o.nextPageToken = "foo"; |
| 473 o.point = buildUnnamed2223(); | 473 o.point = buildUnnamed2106(); |
| 474 } | 474 } |
| 475 buildCounterDataset--; | 475 buildCounterDataset--; |
| 476 return o; | 476 return o; |
| 477 } | 477 } |
| 478 | 478 |
| 479 checkDataset(api.Dataset o) { | 479 checkDataset(api.Dataset o) { |
| 480 buildCounterDataset++; | 480 buildCounterDataset++; |
| 481 if (buildCounterDataset < 3) { | 481 if (buildCounterDataset < 3) { |
| 482 unittest.expect(o.dataSourceId, unittest.equals('foo')); | 482 unittest.expect(o.dataSourceId, unittest.equals('foo')); |
| 483 unittest.expect(o.maxEndTimeNs, unittest.equals('foo')); | 483 unittest.expect(o.maxEndTimeNs, unittest.equals('foo')); |
| 484 unittest.expect(o.minStartTimeNs, unittest.equals('foo')); | 484 unittest.expect(o.minStartTimeNs, unittest.equals('foo')); |
| 485 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 485 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 486 checkUnnamed2223(o.point); | 486 checkUnnamed2106(o.point); |
| 487 } | 487 } |
| 488 buildCounterDataset--; | 488 buildCounterDataset--; |
| 489 } | 489 } |
| 490 | 490 |
| 491 core.int buildCounterDevice = 0; | 491 core.int buildCounterDevice = 0; |
| 492 buildDevice() { | 492 buildDevice() { |
| 493 var o = new api.Device(); | 493 var o = new api.Device(); |
| 494 buildCounterDevice++; | 494 buildCounterDevice++; |
| 495 if (buildCounterDevice < 3) { | 495 if (buildCounterDevice < 3) { |
| 496 o.manufacturer = "foo"; | 496 o.manufacturer = "foo"; |
| (...skipping 11 matching lines...) Expand all Loading... |
| 508 if (buildCounterDevice < 3) { | 508 if (buildCounterDevice < 3) { |
| 509 unittest.expect(o.manufacturer, unittest.equals('foo')); | 509 unittest.expect(o.manufacturer, unittest.equals('foo')); |
| 510 unittest.expect(o.model, unittest.equals('foo')); | 510 unittest.expect(o.model, unittest.equals('foo')); |
| 511 unittest.expect(o.type, unittest.equals('foo')); | 511 unittest.expect(o.type, unittest.equals('foo')); |
| 512 unittest.expect(o.uid, unittest.equals('foo')); | 512 unittest.expect(o.uid, unittest.equals('foo')); |
| 513 unittest.expect(o.version, unittest.equals('foo')); | 513 unittest.expect(o.version, unittest.equals('foo')); |
| 514 } | 514 } |
| 515 buildCounterDevice--; | 515 buildCounterDevice--; |
| 516 } | 516 } |
| 517 | 517 |
| 518 buildUnnamed2224() { | 518 buildUnnamed2107() { |
| 519 var o = new core.List<api.DataSource>(); | 519 var o = new core.List<api.DataSource>(); |
| 520 o.add(buildDataSource()); | 520 o.add(buildDataSource()); |
| 521 o.add(buildDataSource()); | 521 o.add(buildDataSource()); |
| 522 return o; | 522 return o; |
| 523 } | 523 } |
| 524 | 524 |
| 525 checkUnnamed2224(core.List<api.DataSource> o) { | 525 checkUnnamed2107(core.List<api.DataSource> o) { |
| 526 unittest.expect(o, unittest.hasLength(2)); | 526 unittest.expect(o, unittest.hasLength(2)); |
| 527 checkDataSource(o[0]); | 527 checkDataSource(o[0]); |
| 528 checkDataSource(o[1]); | 528 checkDataSource(o[1]); |
| 529 } | 529 } |
| 530 | 530 |
| 531 core.int buildCounterListDataSourcesResponse = 0; | 531 core.int buildCounterListDataSourcesResponse = 0; |
| 532 buildListDataSourcesResponse() { | 532 buildListDataSourcesResponse() { |
| 533 var o = new api.ListDataSourcesResponse(); | 533 var o = new api.ListDataSourcesResponse(); |
| 534 buildCounterListDataSourcesResponse++; | 534 buildCounterListDataSourcesResponse++; |
| 535 if (buildCounterListDataSourcesResponse < 3) { | 535 if (buildCounterListDataSourcesResponse < 3) { |
| 536 o.dataSource = buildUnnamed2224(); | 536 o.dataSource = buildUnnamed2107(); |
| 537 } | 537 } |
| 538 buildCounterListDataSourcesResponse--; | 538 buildCounterListDataSourcesResponse--; |
| 539 return o; | 539 return o; |
| 540 } | 540 } |
| 541 | 541 |
| 542 checkListDataSourcesResponse(api.ListDataSourcesResponse o) { | 542 checkListDataSourcesResponse(api.ListDataSourcesResponse o) { |
| 543 buildCounterListDataSourcesResponse++; | 543 buildCounterListDataSourcesResponse++; |
| 544 if (buildCounterListDataSourcesResponse < 3) { | 544 if (buildCounterListDataSourcesResponse < 3) { |
| 545 checkUnnamed2224(o.dataSource); | 545 checkUnnamed2107(o.dataSource); |
| 546 } | 546 } |
| 547 buildCounterListDataSourcesResponse--; | 547 buildCounterListDataSourcesResponse--; |
| 548 } | 548 } |
| 549 | 549 |
| 550 buildUnnamed2225() { | 550 buildUnnamed2108() { |
| 551 var o = new core.List<api.Session>(); | 551 var o = new core.List<api.Session>(); |
| 552 o.add(buildSession()); | 552 o.add(buildSession()); |
| 553 o.add(buildSession()); | 553 o.add(buildSession()); |
| 554 return o; | 554 return o; |
| 555 } | 555 } |
| 556 | 556 |
| 557 checkUnnamed2225(core.List<api.Session> o) { | 557 checkUnnamed2108(core.List<api.Session> o) { |
| 558 unittest.expect(o, unittest.hasLength(2)); | 558 unittest.expect(o, unittest.hasLength(2)); |
| 559 checkSession(o[0]); | 559 checkSession(o[0]); |
| 560 checkSession(o[1]); | 560 checkSession(o[1]); |
| 561 } | 561 } |
| 562 | 562 |
| 563 buildUnnamed2226() { | 563 buildUnnamed2109() { |
| 564 var o = new core.List<api.Session>(); | 564 var o = new core.List<api.Session>(); |
| 565 o.add(buildSession()); | 565 o.add(buildSession()); |
| 566 o.add(buildSession()); | 566 o.add(buildSession()); |
| 567 return o; | 567 return o; |
| 568 } | 568 } |
| 569 | 569 |
| 570 checkUnnamed2226(core.List<api.Session> o) { | 570 checkUnnamed2109(core.List<api.Session> o) { |
| 571 unittest.expect(o, unittest.hasLength(2)); | 571 unittest.expect(o, unittest.hasLength(2)); |
| 572 checkSession(o[0]); | 572 checkSession(o[0]); |
| 573 checkSession(o[1]); | 573 checkSession(o[1]); |
| 574 } | 574 } |
| 575 | 575 |
| 576 core.int buildCounterListSessionsResponse = 0; | 576 core.int buildCounterListSessionsResponse = 0; |
| 577 buildListSessionsResponse() { | 577 buildListSessionsResponse() { |
| 578 var o = new api.ListSessionsResponse(); | 578 var o = new api.ListSessionsResponse(); |
| 579 buildCounterListSessionsResponse++; | 579 buildCounterListSessionsResponse++; |
| 580 if (buildCounterListSessionsResponse < 3) { | 580 if (buildCounterListSessionsResponse < 3) { |
| 581 o.deletedSession = buildUnnamed2225(); | 581 o.deletedSession = buildUnnamed2108(); |
| 582 o.nextPageToken = "foo"; | 582 o.nextPageToken = "foo"; |
| 583 o.session = buildUnnamed2226(); | 583 o.session = buildUnnamed2109(); |
| 584 } | 584 } |
| 585 buildCounterListSessionsResponse--; | 585 buildCounterListSessionsResponse--; |
| 586 return o; | 586 return o; |
| 587 } | 587 } |
| 588 | 588 |
| 589 checkListSessionsResponse(api.ListSessionsResponse o) { | 589 checkListSessionsResponse(api.ListSessionsResponse o) { |
| 590 buildCounterListSessionsResponse++; | 590 buildCounterListSessionsResponse++; |
| 591 if (buildCounterListSessionsResponse < 3) { | 591 if (buildCounterListSessionsResponse < 3) { |
| 592 checkUnnamed2225(o.deletedSession); | 592 checkUnnamed2108(o.deletedSession); |
| 593 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 593 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 594 checkUnnamed2226(o.session); | 594 checkUnnamed2109(o.session); |
| 595 } | 595 } |
| 596 buildCounterListSessionsResponse--; | 596 buildCounterListSessionsResponse--; |
| 597 } | 597 } |
| 598 | 598 |
| 599 core.int buildCounterMapValue = 0; | 599 core.int buildCounterMapValue = 0; |
| 600 buildMapValue() { | 600 buildMapValue() { |
| 601 var o = new api.MapValue(); | 601 var o = new api.MapValue(); |
| 602 buildCounterMapValue++; | 602 buildCounterMapValue++; |
| 603 if (buildCounterMapValue < 3) { | 603 if (buildCounterMapValue < 3) { |
| 604 o.fpVal = 42.0; | 604 o.fpVal = 42.0; |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 643 unittest.expect(o.description, unittest.equals('foo')); | 643 unittest.expect(o.description, unittest.equals('foo')); |
| 644 unittest.expect(o.endTimeMillis, unittest.equals('foo')); | 644 unittest.expect(o.endTimeMillis, unittest.equals('foo')); |
| 645 unittest.expect(o.id, unittest.equals('foo')); | 645 unittest.expect(o.id, unittest.equals('foo')); |
| 646 unittest.expect(o.modifiedTimeMillis, unittest.equals('foo')); | 646 unittest.expect(o.modifiedTimeMillis, unittest.equals('foo')); |
| 647 unittest.expect(o.name, unittest.equals('foo')); | 647 unittest.expect(o.name, unittest.equals('foo')); |
| 648 unittest.expect(o.startTimeMillis, unittest.equals('foo')); | 648 unittest.expect(o.startTimeMillis, unittest.equals('foo')); |
| 649 } | 649 } |
| 650 buildCounterSession--; | 650 buildCounterSession--; |
| 651 } | 651 } |
| 652 | 652 |
| 653 buildUnnamed2227() { | 653 buildUnnamed2110() { |
| 654 var o = new core.List<api.ValueMapValEntry>(); | 654 var o = new core.List<api.ValueMapValEntry>(); |
| 655 o.add(buildValueMapValEntry()); | 655 o.add(buildValueMapValEntry()); |
| 656 o.add(buildValueMapValEntry()); | 656 o.add(buildValueMapValEntry()); |
| 657 return o; | 657 return o; |
| 658 } | 658 } |
| 659 | 659 |
| 660 checkUnnamed2227(core.List<api.ValueMapValEntry> o) { | 660 checkUnnamed2110(core.List<api.ValueMapValEntry> o) { |
| 661 unittest.expect(o, unittest.hasLength(2)); | 661 unittest.expect(o, unittest.hasLength(2)); |
| 662 checkValueMapValEntry(o[0]); | 662 checkValueMapValEntry(o[0]); |
| 663 checkValueMapValEntry(o[1]); | 663 checkValueMapValEntry(o[1]); |
| 664 } | 664 } |
| 665 | 665 |
| 666 core.int buildCounterValue = 0; | 666 core.int buildCounterValue = 0; |
| 667 buildValue() { | 667 buildValue() { |
| 668 var o = new api.Value(); | 668 var o = new api.Value(); |
| 669 buildCounterValue++; | 669 buildCounterValue++; |
| 670 if (buildCounterValue < 3) { | 670 if (buildCounterValue < 3) { |
| 671 o.fpVal = 42.0; | 671 o.fpVal = 42.0; |
| 672 o.intVal = 42; | 672 o.intVal = 42; |
| 673 o.mapVal = buildUnnamed2227(); | 673 o.mapVal = buildUnnamed2110(); |
| 674 o.stringVal = "foo"; | 674 o.stringVal = "foo"; |
| 675 } | 675 } |
| 676 buildCounterValue--; | 676 buildCounterValue--; |
| 677 return o; | 677 return o; |
| 678 } | 678 } |
| 679 | 679 |
| 680 checkValue(api.Value o) { | 680 checkValue(api.Value o) { |
| 681 buildCounterValue++; | 681 buildCounterValue++; |
| 682 if (buildCounterValue < 3) { | 682 if (buildCounterValue < 3) { |
| 683 unittest.expect(o.fpVal, unittest.equals(42.0)); | 683 unittest.expect(o.fpVal, unittest.equals(42.0)); |
| 684 unittest.expect(o.intVal, unittest.equals(42)); | 684 unittest.expect(o.intVal, unittest.equals(42)); |
| 685 checkUnnamed2227(o.mapVal); | 685 checkUnnamed2110(o.mapVal); |
| 686 unittest.expect(o.stringVal, unittest.equals('foo')); | 686 unittest.expect(o.stringVal, unittest.equals('foo')); |
| 687 } | 687 } |
| 688 buildCounterValue--; | 688 buildCounterValue--; |
| 689 } | 689 } |
| 690 | 690 |
| 691 core.int buildCounterValueMapValEntry = 0; | 691 core.int buildCounterValueMapValEntry = 0; |
| 692 buildValueMapValEntry() { | 692 buildValueMapValEntry() { |
| 693 var o = new api.ValueMapValEntry(); | 693 var o = new api.ValueMapValEntry(); |
| 694 buildCounterValueMapValEntry++; | 694 buildCounterValueMapValEntry++; |
| 695 if (buildCounterValueMapValEntry < 3) { | 695 if (buildCounterValueMapValEntry < 3) { |
| 696 o.key = "foo"; | 696 o.key = "foo"; |
| 697 o.value = buildMapValue(); | 697 o.value = buildMapValue(); |
| 698 } | 698 } |
| 699 buildCounterValueMapValEntry--; | 699 buildCounterValueMapValEntry--; |
| 700 return o; | 700 return o; |
| 701 } | 701 } |
| 702 | 702 |
| 703 checkValueMapValEntry(api.ValueMapValEntry o) { | 703 checkValueMapValEntry(api.ValueMapValEntry o) { |
| 704 buildCounterValueMapValEntry++; | 704 buildCounterValueMapValEntry++; |
| 705 if (buildCounterValueMapValEntry < 3) { | 705 if (buildCounterValueMapValEntry < 3) { |
| 706 unittest.expect(o.key, unittest.equals('foo')); | 706 unittest.expect(o.key, unittest.equals('foo')); |
| 707 checkMapValue(o.value); | 707 checkMapValue(o.value); |
| 708 } | 708 } |
| 709 buildCounterValueMapValEntry--; | 709 buildCounterValueMapValEntry--; |
| 710 } | 710 } |
| 711 | 711 |
| 712 buildUnnamed2228() { | 712 buildUnnamed2111() { |
| 713 var o = new core.List<core.String>(); | 713 var o = new core.List<core.String>(); |
| 714 o.add("foo"); | 714 o.add("foo"); |
| 715 o.add("foo"); | 715 o.add("foo"); |
| 716 return o; | 716 return o; |
| 717 } | 717 } |
| 718 | 718 |
| 719 checkUnnamed2228(core.List<core.String> o) { | 719 checkUnnamed2111(core.List<core.String> o) { |
| 720 unittest.expect(o, unittest.hasLength(2)); | 720 unittest.expect(o, unittest.hasLength(2)); |
| 721 unittest.expect(o[0], unittest.equals('foo')); | 721 unittest.expect(o[0], unittest.equals('foo')); |
| 722 unittest.expect(o[1], unittest.equals('foo')); | 722 unittest.expect(o[1], unittest.equals('foo')); |
| 723 } | 723 } |
| 724 | 724 |
| 725 | 725 |
| 726 main() { | 726 main() { |
| 727 unittest.group("obj-schema-AggregateBucket", () { | 727 unittest.group("obj-schema-AggregateBucket", () { |
| 728 unittest.test("to-json--from-json", () { | 728 unittest.test("to-json--from-json", () { |
| 729 var o = buildAggregateBucket(); | 729 var o = buildAggregateBucket(); |
| (...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1044 res.get(arg_userId, arg_dataSourceId).then(unittest.expectAsync(((api.Data
Source response) { | 1044 res.get(arg_userId, arg_dataSourceId).then(unittest.expectAsync(((api.Data
Source response) { |
| 1045 checkDataSource(response); | 1045 checkDataSource(response); |
| 1046 }))); | 1046 }))); |
| 1047 }); | 1047 }); |
| 1048 | 1048 |
| 1049 unittest.test("method--list", () { | 1049 unittest.test("method--list", () { |
| 1050 | 1050 |
| 1051 var mock = new HttpServerMock(); | 1051 var mock = new HttpServerMock(); |
| 1052 api.UsersDataSourcesResourceApi res = new api.FitnessApi(mock).users.dataS
ources; | 1052 api.UsersDataSourcesResourceApi res = new api.FitnessApi(mock).users.dataS
ources; |
| 1053 var arg_userId = "foo"; | 1053 var arg_userId = "foo"; |
| 1054 var arg_dataTypeName = buildUnnamed2228(); | 1054 var arg_dataTypeName = buildUnnamed2111(); |
| 1055 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1055 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 1056 var path = (req.url).path; | 1056 var path = (req.url).path; |
| 1057 var pathOffset = 0; | 1057 var pathOffset = 0; |
| 1058 var index; | 1058 var index; |
| 1059 var subPart; | 1059 var subPart; |
| 1060 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1060 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1061 pathOffset += 1; | 1061 pathOffset += 1; |
| 1062 | 1062 |
| 1063 var query = (req.url).query; | 1063 var query = (req.url).query; |
| 1064 var queryOffset = 0; | 1064 var queryOffset = 0; |
| (...skipping 461 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1526 res.update(arg_request, arg_userId, arg_sessionId, currentTimeMillis: arg_
currentTimeMillis).then(unittest.expectAsync(((api.Session response) { | 1526 res.update(arg_request, arg_userId, arg_sessionId, currentTimeMillis: arg_
currentTimeMillis).then(unittest.expectAsync(((api.Session response) { |
| 1527 checkSession(response); | 1527 checkSession(response); |
| 1528 }))); | 1528 }))); |
| 1529 }); | 1529 }); |
| 1530 | 1530 |
| 1531 }); | 1531 }); |
| 1532 | 1532 |
| 1533 | 1533 |
| 1534 } | 1534 } |
| 1535 | 1535 |
| OLD | NEW |