| 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 buildUnnamed1191() { | 54 buildUnnamed1654() { |
| 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 checkUnnamed1191(core.List<api.Dataset> o) { | 61 checkUnnamed1654(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 = buildUnnamed1191(); | 73 o.dataset = buildUnnamed1654(); |
| 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 checkUnnamed1191(o.dataset); | 87 checkUnnamed1654(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 o.outputDataSourceId = "foo"; | |
| 104 o.outputDataTypeName = "foo"; | |
| 105 } | 103 } |
| 106 buildCounterAggregateBy--; | 104 buildCounterAggregateBy--; |
| 107 return o; | 105 return o; |
| 108 } | 106 } |
| 109 | 107 |
| 110 checkAggregateBy(api.AggregateBy o) { | 108 checkAggregateBy(api.AggregateBy o) { |
| 111 buildCounterAggregateBy++; | 109 buildCounterAggregateBy++; |
| 112 if (buildCounterAggregateBy < 3) { | 110 if (buildCounterAggregateBy < 3) { |
| 113 unittest.expect(o.dataSourceId, unittest.equals('foo')); | 111 unittest.expect(o.dataSourceId, unittest.equals('foo')); |
| 114 unittest.expect(o.dataTypeName, unittest.equals('foo')); | 112 unittest.expect(o.dataTypeName, unittest.equals('foo')); |
| 115 unittest.expect(o.outputDataSourceId, unittest.equals('foo')); | |
| 116 unittest.expect(o.outputDataTypeName, unittest.equals('foo')); | |
| 117 } | 113 } |
| 118 buildCounterAggregateBy--; | 114 buildCounterAggregateBy--; |
| 119 } | 115 } |
| 120 | 116 |
| 121 buildUnnamed1192() { | 117 buildUnnamed1655() { |
| 122 var o = new core.List<api.AggregateBy>(); | 118 var o = new core.List<api.AggregateBy>(); |
| 123 o.add(buildAggregateBy()); | 119 o.add(buildAggregateBy()); |
| 124 o.add(buildAggregateBy()); | 120 o.add(buildAggregateBy()); |
| 125 return o; | 121 return o; |
| 126 } | 122 } |
| 127 | 123 |
| 128 checkUnnamed1192(core.List<api.AggregateBy> o) { | 124 checkUnnamed1655(core.List<api.AggregateBy> o) { |
| 129 unittest.expect(o, unittest.hasLength(2)); | 125 unittest.expect(o, unittest.hasLength(2)); |
| 130 checkAggregateBy(o[0]); | 126 checkAggregateBy(o[0]); |
| 131 checkAggregateBy(o[1]); | 127 checkAggregateBy(o[1]); |
| 132 } | 128 } |
| 133 | 129 |
| 134 core.int buildCounterAggregateRequest = 0; | 130 core.int buildCounterAggregateRequest = 0; |
| 135 buildAggregateRequest() { | 131 buildAggregateRequest() { |
| 136 var o = new api.AggregateRequest(); | 132 var o = new api.AggregateRequest(); |
| 137 buildCounterAggregateRequest++; | 133 buildCounterAggregateRequest++; |
| 138 if (buildCounterAggregateRequest < 3) { | 134 if (buildCounterAggregateRequest < 3) { |
| 139 o.aggregateBy = buildUnnamed1192(); | 135 o.aggregateBy = buildUnnamed1655(); |
| 140 o.bucketByActivitySegment = buildBucketByActivity(); | 136 o.bucketByActivitySegment = buildBucketByActivity(); |
| 141 o.bucketByActivityType = buildBucketByActivity(); | 137 o.bucketByActivityType = buildBucketByActivity(); |
| 142 o.bucketBySession = buildBucketBySession(); | 138 o.bucketBySession = buildBucketBySession(); |
| 143 o.bucketByTime = buildBucketByTime(); | 139 o.bucketByTime = buildBucketByTime(); |
| 144 o.endTimeMillis = "foo"; | 140 o.endTimeMillis = "foo"; |
| 145 o.startTimeMillis = "foo"; | 141 o.startTimeMillis = "foo"; |
| 146 } | 142 } |
| 147 buildCounterAggregateRequest--; | 143 buildCounterAggregateRequest--; |
| 148 return o; | 144 return o; |
| 149 } | 145 } |
| 150 | 146 |
| 151 checkAggregateRequest(api.AggregateRequest o) { | 147 checkAggregateRequest(api.AggregateRequest o) { |
| 152 buildCounterAggregateRequest++; | 148 buildCounterAggregateRequest++; |
| 153 if (buildCounterAggregateRequest < 3) { | 149 if (buildCounterAggregateRequest < 3) { |
| 154 checkUnnamed1192(o.aggregateBy); | 150 checkUnnamed1655(o.aggregateBy); |
| 155 checkBucketByActivity(o.bucketByActivitySegment); | 151 checkBucketByActivity(o.bucketByActivitySegment); |
| 156 checkBucketByActivity(o.bucketByActivityType); | 152 checkBucketByActivity(o.bucketByActivityType); |
| 157 checkBucketBySession(o.bucketBySession); | 153 checkBucketBySession(o.bucketBySession); |
| 158 checkBucketByTime(o.bucketByTime); | 154 checkBucketByTime(o.bucketByTime); |
| 159 unittest.expect(o.endTimeMillis, unittest.equals('foo')); | 155 unittest.expect(o.endTimeMillis, unittest.equals('foo')); |
| 160 unittest.expect(o.startTimeMillis, unittest.equals('foo')); | 156 unittest.expect(o.startTimeMillis, unittest.equals('foo')); |
| 161 } | 157 } |
| 162 buildCounterAggregateRequest--; | 158 buildCounterAggregateRequest--; |
| 163 } | 159 } |
| 164 | 160 |
| 165 buildUnnamed1193() { | 161 buildUnnamed1656() { |
| 166 var o = new core.List<api.AggregateBucket>(); | 162 var o = new core.List<api.AggregateBucket>(); |
| 167 o.add(buildAggregateBucket()); | 163 o.add(buildAggregateBucket()); |
| 168 o.add(buildAggregateBucket()); | 164 o.add(buildAggregateBucket()); |
| 169 return o; | 165 return o; |
| 170 } | 166 } |
| 171 | 167 |
| 172 checkUnnamed1193(core.List<api.AggregateBucket> o) { | 168 checkUnnamed1656(core.List<api.AggregateBucket> o) { |
| 173 unittest.expect(o, unittest.hasLength(2)); | 169 unittest.expect(o, unittest.hasLength(2)); |
| 174 checkAggregateBucket(o[0]); | 170 checkAggregateBucket(o[0]); |
| 175 checkAggregateBucket(o[1]); | 171 checkAggregateBucket(o[1]); |
| 176 } | 172 } |
| 177 | 173 |
| 178 core.int buildCounterAggregateResponse = 0; | 174 core.int buildCounterAggregateResponse = 0; |
| 179 buildAggregateResponse() { | 175 buildAggregateResponse() { |
| 180 var o = new api.AggregateResponse(); | 176 var o = new api.AggregateResponse(); |
| 181 buildCounterAggregateResponse++; | 177 buildCounterAggregateResponse++; |
| 182 if (buildCounterAggregateResponse < 3) { | 178 if (buildCounterAggregateResponse < 3) { |
| 183 o.bucket = buildUnnamed1193(); | 179 o.bucket = buildUnnamed1656(); |
| 184 } | 180 } |
| 185 buildCounterAggregateResponse--; | 181 buildCounterAggregateResponse--; |
| 186 return o; | 182 return o; |
| 187 } | 183 } |
| 188 | 184 |
| 189 checkAggregateResponse(api.AggregateResponse o) { | 185 checkAggregateResponse(api.AggregateResponse o) { |
| 190 buildCounterAggregateResponse++; | 186 buildCounterAggregateResponse++; |
| 191 if (buildCounterAggregateResponse < 3) { | 187 if (buildCounterAggregateResponse < 3) { |
| 192 checkUnnamed1193(o.bucket); | 188 checkUnnamed1656(o.bucket); |
| 193 } | 189 } |
| 194 buildCounterAggregateResponse--; | 190 buildCounterAggregateResponse--; |
| 195 } | 191 } |
| 196 | 192 |
| 197 core.int buildCounterApplication = 0; | 193 core.int buildCounterApplication = 0; |
| 198 buildApplication() { | 194 buildApplication() { |
| 199 var o = new api.Application(); | 195 var o = new api.Application(); |
| 200 buildCounterApplication++; | 196 buildCounterApplication++; |
| 201 if (buildCounterApplication < 3) { | 197 if (buildCounterApplication < 3) { |
| 202 o.detailsUrl = "foo"; | 198 o.detailsUrl = "foo"; |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 271 } | 267 } |
| 272 | 268 |
| 273 checkBucketByTime(api.BucketByTime o) { | 269 checkBucketByTime(api.BucketByTime o) { |
| 274 buildCounterBucketByTime++; | 270 buildCounterBucketByTime++; |
| 275 if (buildCounterBucketByTime < 3) { | 271 if (buildCounterBucketByTime < 3) { |
| 276 unittest.expect(o.durationMillis, unittest.equals('foo')); | 272 unittest.expect(o.durationMillis, unittest.equals('foo')); |
| 277 } | 273 } |
| 278 buildCounterBucketByTime--; | 274 buildCounterBucketByTime--; |
| 279 } | 275 } |
| 280 | 276 |
| 281 buildUnnamed1194() { | 277 buildUnnamed1657() { |
| 282 var o = new core.List<api.Value>(); | 278 var o = new core.List<api.Value>(); |
| 283 o.add(buildValue()); | 279 o.add(buildValue()); |
| 284 o.add(buildValue()); | 280 o.add(buildValue()); |
| 285 return o; | 281 return o; |
| 286 } | 282 } |
| 287 | 283 |
| 288 checkUnnamed1194(core.List<api.Value> o) { | 284 checkUnnamed1657(core.List<api.Value> o) { |
| 289 unittest.expect(o, unittest.hasLength(2)); | 285 unittest.expect(o, unittest.hasLength(2)); |
| 290 checkValue(o[0]); | 286 checkValue(o[0]); |
| 291 checkValue(o[1]); | 287 checkValue(o[1]); |
| 292 } | 288 } |
| 293 | 289 |
| 294 core.int buildCounterDataPoint = 0; | 290 core.int buildCounterDataPoint = 0; |
| 295 buildDataPoint() { | 291 buildDataPoint() { |
| 296 var o = new api.DataPoint(); | 292 var o = new api.DataPoint(); |
| 297 buildCounterDataPoint++; | 293 buildCounterDataPoint++; |
| 298 if (buildCounterDataPoint < 3) { | 294 if (buildCounterDataPoint < 3) { |
| 299 o.computationTimeMillis = "foo"; | 295 o.computationTimeMillis = "foo"; |
| 300 o.dataTypeName = "foo"; | 296 o.dataTypeName = "foo"; |
| 301 o.endTimeNanos = "foo"; | 297 o.endTimeNanos = "foo"; |
| 302 o.modifiedTimeMillis = "foo"; | 298 o.modifiedTimeMillis = "foo"; |
| 303 o.originDataSourceId = "foo"; | 299 o.originDataSourceId = "foo"; |
| 304 o.rawTimestampNanos = "foo"; | 300 o.rawTimestampNanos = "foo"; |
| 305 o.startTimeNanos = "foo"; | 301 o.startTimeNanos = "foo"; |
| 306 o.value = buildUnnamed1194(); | 302 o.value = buildUnnamed1657(); |
| 307 } | 303 } |
| 308 buildCounterDataPoint--; | 304 buildCounterDataPoint--; |
| 309 return o; | 305 return o; |
| 310 } | 306 } |
| 311 | 307 |
| 312 checkDataPoint(api.DataPoint o) { | 308 checkDataPoint(api.DataPoint o) { |
| 313 buildCounterDataPoint++; | 309 buildCounterDataPoint++; |
| 314 if (buildCounterDataPoint < 3) { | 310 if (buildCounterDataPoint < 3) { |
| 315 unittest.expect(o.computationTimeMillis, unittest.equals('foo')); | 311 unittest.expect(o.computationTimeMillis, unittest.equals('foo')); |
| 316 unittest.expect(o.dataTypeName, unittest.equals('foo')); | 312 unittest.expect(o.dataTypeName, unittest.equals('foo')); |
| 317 unittest.expect(o.endTimeNanos, unittest.equals('foo')); | 313 unittest.expect(o.endTimeNanos, unittest.equals('foo')); |
| 318 unittest.expect(o.modifiedTimeMillis, unittest.equals('foo')); | 314 unittest.expect(o.modifiedTimeMillis, unittest.equals('foo')); |
| 319 unittest.expect(o.originDataSourceId, unittest.equals('foo')); | 315 unittest.expect(o.originDataSourceId, unittest.equals('foo')); |
| 320 unittest.expect(o.rawTimestampNanos, unittest.equals('foo')); | 316 unittest.expect(o.rawTimestampNanos, unittest.equals('foo')); |
| 321 unittest.expect(o.startTimeNanos, unittest.equals('foo')); | 317 unittest.expect(o.startTimeNanos, unittest.equals('foo')); |
| 322 checkUnnamed1194(o.value); | 318 checkUnnamed1657(o.value); |
| 323 } | 319 } |
| 324 buildCounterDataPoint--; | 320 buildCounterDataPoint--; |
| 325 } | 321 } |
| 326 | 322 |
| 327 core.int buildCounterDataSource = 0; | 323 core.int buildCounterDataSource = 0; |
| 328 buildDataSource() { | 324 buildDataSource() { |
| 329 var o = new api.DataSource(); | 325 var o = new api.DataSource(); |
| 330 buildCounterDataSource++; | 326 buildCounterDataSource++; |
| 331 if (buildCounterDataSource < 3) { | 327 if (buildCounterDataSource < 3) { |
| 332 o.application = buildApplication(); | 328 o.application = buildApplication(); |
| (...skipping 15 matching lines...) Expand all Loading... |
| 348 unittest.expect(o.dataStreamId, unittest.equals('foo')); | 344 unittest.expect(o.dataStreamId, unittest.equals('foo')); |
| 349 unittest.expect(o.dataStreamName, unittest.equals('foo')); | 345 unittest.expect(o.dataStreamName, unittest.equals('foo')); |
| 350 checkDataType(o.dataType); | 346 checkDataType(o.dataType); |
| 351 checkDevice(o.device); | 347 checkDevice(o.device); |
| 352 unittest.expect(o.name, unittest.equals('foo')); | 348 unittest.expect(o.name, unittest.equals('foo')); |
| 353 unittest.expect(o.type, unittest.equals('foo')); | 349 unittest.expect(o.type, unittest.equals('foo')); |
| 354 } | 350 } |
| 355 buildCounterDataSource--; | 351 buildCounterDataSource--; |
| 356 } | 352 } |
| 357 | 353 |
| 358 buildUnnamed1195() { | 354 buildUnnamed1658() { |
| 359 var o = new core.List<api.DataTypeField>(); | 355 var o = new core.List<api.DataTypeField>(); |
| 360 o.add(buildDataTypeField()); | 356 o.add(buildDataTypeField()); |
| 361 o.add(buildDataTypeField()); | 357 o.add(buildDataTypeField()); |
| 362 return o; | 358 return o; |
| 363 } | 359 } |
| 364 | 360 |
| 365 checkUnnamed1195(core.List<api.DataTypeField> o) { | 361 checkUnnamed1658(core.List<api.DataTypeField> o) { |
| 366 unittest.expect(o, unittest.hasLength(2)); | 362 unittest.expect(o, unittest.hasLength(2)); |
| 367 checkDataTypeField(o[0]); | 363 checkDataTypeField(o[0]); |
| 368 checkDataTypeField(o[1]); | 364 checkDataTypeField(o[1]); |
| 369 } | 365 } |
| 370 | 366 |
| 371 core.int buildCounterDataType = 0; | 367 core.int buildCounterDataType = 0; |
| 372 buildDataType() { | 368 buildDataType() { |
| 373 var o = new api.DataType(); | 369 var o = new api.DataType(); |
| 374 buildCounterDataType++; | 370 buildCounterDataType++; |
| 375 if (buildCounterDataType < 3) { | 371 if (buildCounterDataType < 3) { |
| 376 o.field = buildUnnamed1195(); | 372 o.field = buildUnnamed1658(); |
| 377 o.name = "foo"; | 373 o.name = "foo"; |
| 378 } | 374 } |
| 379 buildCounterDataType--; | 375 buildCounterDataType--; |
| 380 return o; | 376 return o; |
| 381 } | 377 } |
| 382 | 378 |
| 383 checkDataType(api.DataType o) { | 379 checkDataType(api.DataType o) { |
| 384 buildCounterDataType++; | 380 buildCounterDataType++; |
| 385 if (buildCounterDataType < 3) { | 381 if (buildCounterDataType < 3) { |
| 386 checkUnnamed1195(o.field); | 382 checkUnnamed1658(o.field); |
| 387 unittest.expect(o.name, unittest.equals('foo')); | 383 unittest.expect(o.name, unittest.equals('foo')); |
| 388 } | 384 } |
| 389 buildCounterDataType--; | 385 buildCounterDataType--; |
| 390 } | 386 } |
| 391 | 387 |
| 392 core.int buildCounterDataTypeField = 0; | 388 core.int buildCounterDataTypeField = 0; |
| 393 buildDataTypeField() { | 389 buildDataTypeField() { |
| 394 var o = new api.DataTypeField(); | 390 var o = new api.DataTypeField(); |
| 395 buildCounterDataTypeField++; | 391 buildCounterDataTypeField++; |
| 396 if (buildCounterDataTypeField < 3) { | 392 if (buildCounterDataTypeField < 3) { |
| 397 o.format = "foo"; | 393 o.format = "foo"; |
| 398 o.name = "foo"; | 394 o.name = "foo"; |
| 399 o.optional = true; | 395 o.optional = true; |
| 400 } | 396 } |
| 401 buildCounterDataTypeField--; | 397 buildCounterDataTypeField--; |
| 402 return o; | 398 return o; |
| 403 } | 399 } |
| 404 | 400 |
| 405 checkDataTypeField(api.DataTypeField o) { | 401 checkDataTypeField(api.DataTypeField o) { |
| 406 buildCounterDataTypeField++; | 402 buildCounterDataTypeField++; |
| 407 if (buildCounterDataTypeField < 3) { | 403 if (buildCounterDataTypeField < 3) { |
| 408 unittest.expect(o.format, unittest.equals('foo')); | 404 unittest.expect(o.format, unittest.equals('foo')); |
| 409 unittest.expect(o.name, unittest.equals('foo')); | 405 unittest.expect(o.name, unittest.equals('foo')); |
| 410 unittest.expect(o.optional, unittest.isTrue); | 406 unittest.expect(o.optional, unittest.isTrue); |
| 411 } | 407 } |
| 412 buildCounterDataTypeField--; | 408 buildCounterDataTypeField--; |
| 413 } | 409 } |
| 414 | 410 |
| 415 buildUnnamed1196() { | 411 buildUnnamed1659() { |
| 416 var o = new core.List<api.DataPoint>(); | 412 var o = new core.List<api.DataPoint>(); |
| 417 o.add(buildDataPoint()); | 413 o.add(buildDataPoint()); |
| 418 o.add(buildDataPoint()); | 414 o.add(buildDataPoint()); |
| 419 return o; | 415 return o; |
| 420 } | 416 } |
| 421 | 417 |
| 422 checkUnnamed1196(core.List<api.DataPoint> o) { | 418 checkUnnamed1659(core.List<api.DataPoint> o) { |
| 423 unittest.expect(o, unittest.hasLength(2)); | 419 unittest.expect(o, unittest.hasLength(2)); |
| 424 checkDataPoint(o[0]); | 420 checkDataPoint(o[0]); |
| 425 checkDataPoint(o[1]); | 421 checkDataPoint(o[1]); |
| 426 } | 422 } |
| 427 | 423 |
| 428 core.int buildCounterDataset = 0; | 424 core.int buildCounterDataset = 0; |
| 429 buildDataset() { | 425 buildDataset() { |
| 430 var o = new api.Dataset(); | 426 var o = new api.Dataset(); |
| 431 buildCounterDataset++; | 427 buildCounterDataset++; |
| 432 if (buildCounterDataset < 3) { | 428 if (buildCounterDataset < 3) { |
| 433 o.dataSourceId = "foo"; | 429 o.dataSourceId = "foo"; |
| 434 o.maxEndTimeNs = "foo"; | 430 o.maxEndTimeNs = "foo"; |
| 435 o.minStartTimeNs = "foo"; | 431 o.minStartTimeNs = "foo"; |
| 436 o.nextPageToken = "foo"; | 432 o.nextPageToken = "foo"; |
| 437 o.point = buildUnnamed1196(); | 433 o.point = buildUnnamed1659(); |
| 438 } | 434 } |
| 439 buildCounterDataset--; | 435 buildCounterDataset--; |
| 440 return o; | 436 return o; |
| 441 } | 437 } |
| 442 | 438 |
| 443 checkDataset(api.Dataset o) { | 439 checkDataset(api.Dataset o) { |
| 444 buildCounterDataset++; | 440 buildCounterDataset++; |
| 445 if (buildCounterDataset < 3) { | 441 if (buildCounterDataset < 3) { |
| 446 unittest.expect(o.dataSourceId, unittest.equals('foo')); | 442 unittest.expect(o.dataSourceId, unittest.equals('foo')); |
| 447 unittest.expect(o.maxEndTimeNs, unittest.equals('foo')); | 443 unittest.expect(o.maxEndTimeNs, unittest.equals('foo')); |
| 448 unittest.expect(o.minStartTimeNs, unittest.equals('foo')); | 444 unittest.expect(o.minStartTimeNs, unittest.equals('foo')); |
| 449 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 445 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 450 checkUnnamed1196(o.point); | 446 checkUnnamed1659(o.point); |
| 451 } | 447 } |
| 452 buildCounterDataset--; | 448 buildCounterDataset--; |
| 453 } | 449 } |
| 454 | 450 |
| 455 core.int buildCounterDevice = 0; | 451 core.int buildCounterDevice = 0; |
| 456 buildDevice() { | 452 buildDevice() { |
| 457 var o = new api.Device(); | 453 var o = new api.Device(); |
| 458 buildCounterDevice++; | 454 buildCounterDevice++; |
| 459 if (buildCounterDevice < 3) { | 455 if (buildCounterDevice < 3) { |
| 460 o.manufacturer = "foo"; | 456 o.manufacturer = "foo"; |
| (...skipping 11 matching lines...) Expand all Loading... |
| 472 if (buildCounterDevice < 3) { | 468 if (buildCounterDevice < 3) { |
| 473 unittest.expect(o.manufacturer, unittest.equals('foo')); | 469 unittest.expect(o.manufacturer, unittest.equals('foo')); |
| 474 unittest.expect(o.model, unittest.equals('foo')); | 470 unittest.expect(o.model, unittest.equals('foo')); |
| 475 unittest.expect(o.type, unittest.equals('foo')); | 471 unittest.expect(o.type, unittest.equals('foo')); |
| 476 unittest.expect(o.uid, unittest.equals('foo')); | 472 unittest.expect(o.uid, unittest.equals('foo')); |
| 477 unittest.expect(o.version, unittest.equals('foo')); | 473 unittest.expect(o.version, unittest.equals('foo')); |
| 478 } | 474 } |
| 479 buildCounterDevice--; | 475 buildCounterDevice--; |
| 480 } | 476 } |
| 481 | 477 |
| 482 buildUnnamed1197() { | 478 buildUnnamed1660() { |
| 483 var o = new core.List<api.DataSource>(); | 479 var o = new core.List<api.DataSource>(); |
| 484 o.add(buildDataSource()); | 480 o.add(buildDataSource()); |
| 485 o.add(buildDataSource()); | 481 o.add(buildDataSource()); |
| 486 return o; | 482 return o; |
| 487 } | 483 } |
| 488 | 484 |
| 489 checkUnnamed1197(core.List<api.DataSource> o) { | 485 checkUnnamed1660(core.List<api.DataSource> o) { |
| 490 unittest.expect(o, unittest.hasLength(2)); | 486 unittest.expect(o, unittest.hasLength(2)); |
| 491 checkDataSource(o[0]); | 487 checkDataSource(o[0]); |
| 492 checkDataSource(o[1]); | 488 checkDataSource(o[1]); |
| 493 } | 489 } |
| 494 | 490 |
| 495 core.int buildCounterListDataSourcesResponse = 0; | 491 core.int buildCounterListDataSourcesResponse = 0; |
| 496 buildListDataSourcesResponse() { | 492 buildListDataSourcesResponse() { |
| 497 var o = new api.ListDataSourcesResponse(); | 493 var o = new api.ListDataSourcesResponse(); |
| 498 buildCounterListDataSourcesResponse++; | 494 buildCounterListDataSourcesResponse++; |
| 499 if (buildCounterListDataSourcesResponse < 3) { | 495 if (buildCounterListDataSourcesResponse < 3) { |
| 500 o.dataSource = buildUnnamed1197(); | 496 o.dataSource = buildUnnamed1660(); |
| 501 } | 497 } |
| 502 buildCounterListDataSourcesResponse--; | 498 buildCounterListDataSourcesResponse--; |
| 503 return o; | 499 return o; |
| 504 } | 500 } |
| 505 | 501 |
| 506 checkListDataSourcesResponse(api.ListDataSourcesResponse o) { | 502 checkListDataSourcesResponse(api.ListDataSourcesResponse o) { |
| 507 buildCounterListDataSourcesResponse++; | 503 buildCounterListDataSourcesResponse++; |
| 508 if (buildCounterListDataSourcesResponse < 3) { | 504 if (buildCounterListDataSourcesResponse < 3) { |
| 509 checkUnnamed1197(o.dataSource); | 505 checkUnnamed1660(o.dataSource); |
| 510 } | 506 } |
| 511 buildCounterListDataSourcesResponse--; | 507 buildCounterListDataSourcesResponse--; |
| 512 } | 508 } |
| 513 | 509 |
| 514 buildUnnamed1198() { | 510 buildUnnamed1661() { |
| 515 var o = new core.List<api.Session>(); | 511 var o = new core.List<api.Session>(); |
| 516 o.add(buildSession()); | 512 o.add(buildSession()); |
| 517 o.add(buildSession()); | 513 o.add(buildSession()); |
| 518 return o; | 514 return o; |
| 519 } | 515 } |
| 520 | 516 |
| 521 checkUnnamed1198(core.List<api.Session> o) { | 517 checkUnnamed1661(core.List<api.Session> o) { |
| 522 unittest.expect(o, unittest.hasLength(2)); | 518 unittest.expect(o, unittest.hasLength(2)); |
| 523 checkSession(o[0]); | 519 checkSession(o[0]); |
| 524 checkSession(o[1]); | 520 checkSession(o[1]); |
| 525 } | 521 } |
| 526 | 522 |
| 527 buildUnnamed1199() { | 523 buildUnnamed1662() { |
| 528 var o = new core.List<api.Session>(); | 524 var o = new core.List<api.Session>(); |
| 529 o.add(buildSession()); | 525 o.add(buildSession()); |
| 530 o.add(buildSession()); | 526 o.add(buildSession()); |
| 531 return o; | 527 return o; |
| 532 } | 528 } |
| 533 | 529 |
| 534 checkUnnamed1199(core.List<api.Session> o) { | 530 checkUnnamed1662(core.List<api.Session> o) { |
| 535 unittest.expect(o, unittest.hasLength(2)); | 531 unittest.expect(o, unittest.hasLength(2)); |
| 536 checkSession(o[0]); | 532 checkSession(o[0]); |
| 537 checkSession(o[1]); | 533 checkSession(o[1]); |
| 538 } | 534 } |
| 539 | 535 |
| 540 core.int buildCounterListSessionsResponse = 0; | 536 core.int buildCounterListSessionsResponse = 0; |
| 541 buildListSessionsResponse() { | 537 buildListSessionsResponse() { |
| 542 var o = new api.ListSessionsResponse(); | 538 var o = new api.ListSessionsResponse(); |
| 543 buildCounterListSessionsResponse++; | 539 buildCounterListSessionsResponse++; |
| 544 if (buildCounterListSessionsResponse < 3) { | 540 if (buildCounterListSessionsResponse < 3) { |
| 545 o.deletedSession = buildUnnamed1198(); | 541 o.deletedSession = buildUnnamed1661(); |
| 546 o.nextPageToken = "foo"; | 542 o.nextPageToken = "foo"; |
| 547 o.session = buildUnnamed1199(); | 543 o.session = buildUnnamed1662(); |
| 548 } | 544 } |
| 549 buildCounterListSessionsResponse--; | 545 buildCounterListSessionsResponse--; |
| 550 return o; | 546 return o; |
| 551 } | 547 } |
| 552 | 548 |
| 553 checkListSessionsResponse(api.ListSessionsResponse o) { | 549 checkListSessionsResponse(api.ListSessionsResponse o) { |
| 554 buildCounterListSessionsResponse++; | 550 buildCounterListSessionsResponse++; |
| 555 if (buildCounterListSessionsResponse < 3) { | 551 if (buildCounterListSessionsResponse < 3) { |
| 556 checkUnnamed1198(o.deletedSession); | 552 checkUnnamed1661(o.deletedSession); |
| 557 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 553 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 558 checkUnnamed1199(o.session); | 554 checkUnnamed1662(o.session); |
| 559 } | 555 } |
| 560 buildCounterListSessionsResponse--; | 556 buildCounterListSessionsResponse--; |
| 561 } | 557 } |
| 562 | 558 |
| 559 core.int buildCounterMapValue = 0; |
| 560 buildMapValue() { |
| 561 var o = new api.MapValue(); |
| 562 buildCounterMapValue++; |
| 563 if (buildCounterMapValue < 3) { |
| 564 o.fpVal = 42.0; |
| 565 } |
| 566 buildCounterMapValue--; |
| 567 return o; |
| 568 } |
| 569 |
| 570 checkMapValue(api.MapValue o) { |
| 571 buildCounterMapValue++; |
| 572 if (buildCounterMapValue < 3) { |
| 573 unittest.expect(o.fpVal, unittest.equals(42.0)); |
| 574 } |
| 575 buildCounterMapValue--; |
| 576 } |
| 577 |
| 563 core.int buildCounterSession = 0; | 578 core.int buildCounterSession = 0; |
| 564 buildSession() { | 579 buildSession() { |
| 565 var o = new api.Session(); | 580 var o = new api.Session(); |
| 566 buildCounterSession++; | 581 buildCounterSession++; |
| 567 if (buildCounterSession < 3) { | 582 if (buildCounterSession < 3) { |
| 568 o.activeTimeMillis = "foo"; | 583 o.activeTimeMillis = "foo"; |
| 569 o.activityType = 42; | 584 o.activityType = 42; |
| 570 o.application = buildApplication(); | 585 o.application = buildApplication(); |
| 571 o.description = "foo"; | 586 o.description = "foo"; |
| 572 o.endTimeMillis = "foo"; | 587 o.endTimeMillis = "foo"; |
| (...skipping 15 matching lines...) Expand all Loading... |
| 588 unittest.expect(o.description, unittest.equals('foo')); | 603 unittest.expect(o.description, unittest.equals('foo')); |
| 589 unittest.expect(o.endTimeMillis, unittest.equals('foo')); | 604 unittest.expect(o.endTimeMillis, unittest.equals('foo')); |
| 590 unittest.expect(o.id, unittest.equals('foo')); | 605 unittest.expect(o.id, unittest.equals('foo')); |
| 591 unittest.expect(o.modifiedTimeMillis, unittest.equals('foo')); | 606 unittest.expect(o.modifiedTimeMillis, unittest.equals('foo')); |
| 592 unittest.expect(o.name, unittest.equals('foo')); | 607 unittest.expect(o.name, unittest.equals('foo')); |
| 593 unittest.expect(o.startTimeMillis, unittest.equals('foo')); | 608 unittest.expect(o.startTimeMillis, unittest.equals('foo')); |
| 594 } | 609 } |
| 595 buildCounterSession--; | 610 buildCounterSession--; |
| 596 } | 611 } |
| 597 | 612 |
| 613 buildUnnamed1663() { |
| 614 var o = new core.List<api.ValueMapValEntry>(); |
| 615 o.add(buildValueMapValEntry()); |
| 616 o.add(buildValueMapValEntry()); |
| 617 return o; |
| 618 } |
| 619 |
| 620 checkUnnamed1663(core.List<api.ValueMapValEntry> o) { |
| 621 unittest.expect(o, unittest.hasLength(2)); |
| 622 checkValueMapValEntry(o[0]); |
| 623 checkValueMapValEntry(o[1]); |
| 624 } |
| 625 |
| 598 core.int buildCounterValue = 0; | 626 core.int buildCounterValue = 0; |
| 599 buildValue() { | 627 buildValue() { |
| 600 var o = new api.Value(); | 628 var o = new api.Value(); |
| 601 buildCounterValue++; | 629 buildCounterValue++; |
| 602 if (buildCounterValue < 3) { | 630 if (buildCounterValue < 3) { |
| 603 o.fpVal = 42.0; | 631 o.fpVal = 42.0; |
| 604 o.intVal = 42; | 632 o.intVal = 42; |
| 633 o.mapVal = buildUnnamed1663(); |
| 634 o.stringVal = "foo"; |
| 605 } | 635 } |
| 606 buildCounterValue--; | 636 buildCounterValue--; |
| 607 return o; | 637 return o; |
| 608 } | 638 } |
| 609 | 639 |
| 610 checkValue(api.Value o) { | 640 checkValue(api.Value o) { |
| 611 buildCounterValue++; | 641 buildCounterValue++; |
| 612 if (buildCounterValue < 3) { | 642 if (buildCounterValue < 3) { |
| 613 unittest.expect(o.fpVal, unittest.equals(42.0)); | 643 unittest.expect(o.fpVal, unittest.equals(42.0)); |
| 614 unittest.expect(o.intVal, unittest.equals(42)); | 644 unittest.expect(o.intVal, unittest.equals(42)); |
| 645 checkUnnamed1663(o.mapVal); |
| 646 unittest.expect(o.stringVal, unittest.equals('foo')); |
| 615 } | 647 } |
| 616 buildCounterValue--; | 648 buildCounterValue--; |
| 617 } | 649 } |
| 618 | 650 |
| 619 buildUnnamed1200() { | 651 core.int buildCounterValueMapValEntry = 0; |
| 652 buildValueMapValEntry() { |
| 653 var o = new api.ValueMapValEntry(); |
| 654 buildCounterValueMapValEntry++; |
| 655 if (buildCounterValueMapValEntry < 3) { |
| 656 o.key = "foo"; |
| 657 o.value = buildMapValue(); |
| 658 } |
| 659 buildCounterValueMapValEntry--; |
| 660 return o; |
| 661 } |
| 662 |
| 663 checkValueMapValEntry(api.ValueMapValEntry o) { |
| 664 buildCounterValueMapValEntry++; |
| 665 if (buildCounterValueMapValEntry < 3) { |
| 666 unittest.expect(o.key, unittest.equals('foo')); |
| 667 checkMapValue(o.value); |
| 668 } |
| 669 buildCounterValueMapValEntry--; |
| 670 } |
| 671 |
| 672 buildUnnamed1664() { |
| 620 var o = new core.List<core.String>(); | 673 var o = new core.List<core.String>(); |
| 621 o.add("foo"); | 674 o.add("foo"); |
| 622 o.add("foo"); | 675 o.add("foo"); |
| 623 return o; | 676 return o; |
| 624 } | 677 } |
| 625 | 678 |
| 626 checkUnnamed1200(core.List<core.String> o) { | 679 checkUnnamed1664(core.List<core.String> o) { |
| 627 unittest.expect(o, unittest.hasLength(2)); | 680 unittest.expect(o, unittest.hasLength(2)); |
| 628 unittest.expect(o[0], unittest.equals('foo')); | 681 unittest.expect(o[0], unittest.equals('foo')); |
| 629 unittest.expect(o[1], unittest.equals('foo')); | 682 unittest.expect(o[1], unittest.equals('foo')); |
| 630 } | 683 } |
| 631 | 684 |
| 632 | 685 |
| 633 main() { | 686 main() { |
| 634 unittest.group("obj-schema-AggregateBucket", () { | 687 unittest.group("obj-schema-AggregateBucket", () { |
| 635 unittest.test("to-json--from-json", () { | 688 unittest.test("to-json--from-json", () { |
| 636 var o = buildAggregateBucket(); | 689 var o = buildAggregateBucket(); |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 768 | 821 |
| 769 unittest.group("obj-schema-ListSessionsResponse", () { | 822 unittest.group("obj-schema-ListSessionsResponse", () { |
| 770 unittest.test("to-json--from-json", () { | 823 unittest.test("to-json--from-json", () { |
| 771 var o = buildListSessionsResponse(); | 824 var o = buildListSessionsResponse(); |
| 772 var od = new api.ListSessionsResponse.fromJson(o.toJson()); | 825 var od = new api.ListSessionsResponse.fromJson(o.toJson()); |
| 773 checkListSessionsResponse(od); | 826 checkListSessionsResponse(od); |
| 774 }); | 827 }); |
| 775 }); | 828 }); |
| 776 | 829 |
| 777 | 830 |
| 831 unittest.group("obj-schema-MapValue", () { |
| 832 unittest.test("to-json--from-json", () { |
| 833 var o = buildMapValue(); |
| 834 var od = new api.MapValue.fromJson(o.toJson()); |
| 835 checkMapValue(od); |
| 836 }); |
| 837 }); |
| 838 |
| 839 |
| 778 unittest.group("obj-schema-Session", () { | 840 unittest.group("obj-schema-Session", () { |
| 779 unittest.test("to-json--from-json", () { | 841 unittest.test("to-json--from-json", () { |
| 780 var o = buildSession(); | 842 var o = buildSession(); |
| 781 var od = new api.Session.fromJson(o.toJson()); | 843 var od = new api.Session.fromJson(o.toJson()); |
| 782 checkSession(od); | 844 checkSession(od); |
| 783 }); | 845 }); |
| 784 }); | 846 }); |
| 785 | 847 |
| 786 | 848 |
| 787 unittest.group("obj-schema-Value", () { | 849 unittest.group("obj-schema-Value", () { |
| 788 unittest.test("to-json--from-json", () { | 850 unittest.test("to-json--from-json", () { |
| 789 var o = buildValue(); | 851 var o = buildValue(); |
| 790 var od = new api.Value.fromJson(o.toJson()); | 852 var od = new api.Value.fromJson(o.toJson()); |
| 791 checkValue(od); | 853 checkValue(od); |
| 792 }); | 854 }); |
| 793 }); | 855 }); |
| 794 | 856 |
| 795 | 857 |
| 858 unittest.group("obj-schema-ValueMapValEntry", () { |
| 859 unittest.test("to-json--from-json", () { |
| 860 var o = buildValueMapValEntry(); |
| 861 var od = new api.ValueMapValEntry.fromJson(o.toJson()); |
| 862 checkValueMapValEntry(od); |
| 863 }); |
| 864 }); |
| 865 |
| 866 |
| 796 unittest.group("resource-UsersDataSourcesResourceApi", () { | 867 unittest.group("resource-UsersDataSourcesResourceApi", () { |
| 797 unittest.test("method--create", () { | 868 unittest.test("method--create", () { |
| 798 | 869 |
| 799 var mock = new HttpServerMock(); | 870 var mock = new HttpServerMock(); |
| 800 api.UsersDataSourcesResourceApi res = new api.FitnessApi(mock).users.dataS
ources; | 871 api.UsersDataSourcesResourceApi res = new api.FitnessApi(mock).users.dataS
ources; |
| 801 var arg_request = buildDataSource(); | 872 var arg_request = buildDataSource(); |
| 802 var arg_userId = "foo"; | 873 var arg_userId = "foo"; |
| 803 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 874 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 804 var obj = new api.DataSource.fromJson(json); | 875 var obj = new api.DataSource.fromJson(json); |
| 805 checkDataSource(obj); | 876 checkDataSource(obj); |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 924 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) { |
| 925 checkDataSource(response); | 996 checkDataSource(response); |
| 926 }))); | 997 }))); |
| 927 }); | 998 }); |
| 928 | 999 |
| 929 unittest.test("method--list", () { | 1000 unittest.test("method--list", () { |
| 930 | 1001 |
| 931 var mock = new HttpServerMock(); | 1002 var mock = new HttpServerMock(); |
| 932 api.UsersDataSourcesResourceApi res = new api.FitnessApi(mock).users.dataS
ources; | 1003 api.UsersDataSourcesResourceApi res = new api.FitnessApi(mock).users.dataS
ources; |
| 933 var arg_userId = "foo"; | 1004 var arg_userId = "foo"; |
| 934 var arg_dataTypeName = buildUnnamed1200(); | 1005 var arg_dataTypeName = buildUnnamed1664(); |
| 935 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1006 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 936 var path = (req.url).path; | 1007 var path = (req.url).path; |
| 937 var pathOffset = 0; | 1008 var pathOffset = 0; |
| 938 var index; | 1009 var index; |
| 939 var subPart; | 1010 var subPart; |
| 940 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1011 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 941 pathOffset += 1; | 1012 pathOffset += 1; |
| 942 | 1013 |
| 943 var query = (req.url).query; | 1014 var query = (req.url).query; |
| 944 var queryOffset = 0; | 1015 var queryOffset = 0; |
| (...skipping 461 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1406 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) { |
| 1407 checkSession(response); | 1478 checkSession(response); |
| 1408 }))); | 1479 }))); |
| 1409 }); | 1480 }); |
| 1410 | 1481 |
| 1411 }); | 1482 }); |
| 1412 | 1483 |
| 1413 | 1484 |
| 1414 } | 1485 } |
| 1415 | 1486 |
| OLD | NEW |