| OLD | NEW |
| (Empty) |
| 1 library googleapis_beta.genomics.v1beta2.test; | |
| 2 | |
| 3 import "dart:core" as core; | |
| 4 import "dart:collection" as collection; | |
| 5 import "dart:async" as async; | |
| 6 import "dart:convert" as convert; | |
| 7 | |
| 8 import 'package:http/http.dart' as http; | |
| 9 import 'package:http/testing.dart' as http_testing; | |
| 10 import 'package:unittest/unittest.dart' as unittest; | |
| 11 | |
| 12 import 'package:googleapis_beta/genomics/v1beta2.dart' as api; | |
| 13 | |
| 14 class HttpServerMock extends http.BaseClient { | |
| 15 core.Function _callback; | |
| 16 core.bool _expectJson; | |
| 17 | |
| 18 void register(core.Function callback, core.bool expectJson) { | |
| 19 _callback = callback; | |
| 20 _expectJson = expectJson; | |
| 21 } | |
| 22 | |
| 23 async.Future<http.StreamedResponse> send(http.BaseRequest request) { | |
| 24 if (_expectJson) { | |
| 25 return request.finalize() | |
| 26 .transform(convert.UTF8.decoder) | |
| 27 .join('') | |
| 28 .then((core.String jsonString) { | |
| 29 if (jsonString.isEmpty) { | |
| 30 return _callback(request, null); | |
| 31 } else { | |
| 32 return _callback(request, convert.JSON.decode(jsonString)); | |
| 33 } | |
| 34 }); | |
| 35 } else { | |
| 36 var stream = request.finalize(); | |
| 37 if (stream == null) { | |
| 38 return _callback(request, []); | |
| 39 } else { | |
| 40 return stream.toBytes().then((data) { | |
| 41 return _callback(request, data); | |
| 42 }); | |
| 43 } | |
| 44 } | |
| 45 } | |
| 46 } | |
| 47 | |
| 48 http.StreamedResponse stringResponse( | |
| 49 core.int status, core.Map headers, core.String body) { | |
| 50 var stream = new async.Stream.fromIterable([convert.UTF8.encode(body)]); | |
| 51 return new http.StreamedResponse(stream, status, headers: headers); | |
| 52 } | |
| 53 | |
| 54 buildUnnamed3272() { | |
| 55 var o = new core.List<core.String>(); | |
| 56 o.add("foo"); | |
| 57 o.add("foo"); | |
| 58 return o; | |
| 59 } | |
| 60 | |
| 61 checkUnnamed3272(core.List<core.String> o) { | |
| 62 unittest.expect(o, unittest.hasLength(2)); | |
| 63 unittest.expect(o[0], unittest.equals('foo')); | |
| 64 unittest.expect(o[1], unittest.equals('foo')); | |
| 65 } | |
| 66 | |
| 67 buildUnnamed3273() { | |
| 68 var o = new core.Map<core.String, core.List<core.String>>(); | |
| 69 o["x"] = buildUnnamed3272(); | |
| 70 o["y"] = buildUnnamed3272(); | |
| 71 return o; | |
| 72 } | |
| 73 | |
| 74 checkUnnamed3273(core.Map<core.String, core.List<core.String>> o) { | |
| 75 unittest.expect(o, unittest.hasLength(2)); | |
| 76 checkUnnamed3272(o["x"]); | |
| 77 checkUnnamed3272(o["y"]); | |
| 78 } | |
| 79 | |
| 80 core.int buildCounterAnnotation = 0; | |
| 81 buildAnnotation() { | |
| 82 var o = new api.Annotation(); | |
| 83 buildCounterAnnotation++; | |
| 84 if (buildCounterAnnotation < 3) { | |
| 85 o.annotationSetId = "foo"; | |
| 86 o.id = "foo"; | |
| 87 o.info = buildUnnamed3273(); | |
| 88 o.name = "foo"; | |
| 89 o.position = buildRangePosition(); | |
| 90 o.transcript = buildTranscript(); | |
| 91 o.type = "foo"; | |
| 92 o.variant = buildVariantAnnotation(); | |
| 93 } | |
| 94 buildCounterAnnotation--; | |
| 95 return o; | |
| 96 } | |
| 97 | |
| 98 checkAnnotation(api.Annotation o) { | |
| 99 buildCounterAnnotation++; | |
| 100 if (buildCounterAnnotation < 3) { | |
| 101 unittest.expect(o.annotationSetId, unittest.equals('foo')); | |
| 102 unittest.expect(o.id, unittest.equals('foo')); | |
| 103 checkUnnamed3273(o.info); | |
| 104 unittest.expect(o.name, unittest.equals('foo')); | |
| 105 checkRangePosition(o.position); | |
| 106 checkTranscript(o.transcript); | |
| 107 unittest.expect(o.type, unittest.equals('foo')); | |
| 108 checkVariantAnnotation(o.variant); | |
| 109 } | |
| 110 buildCounterAnnotation--; | |
| 111 } | |
| 112 | |
| 113 buildUnnamed3274() { | |
| 114 var o = new core.List<core.String>(); | |
| 115 o.add("foo"); | |
| 116 o.add("foo"); | |
| 117 return o; | |
| 118 } | |
| 119 | |
| 120 checkUnnamed3274(core.List<core.String> o) { | |
| 121 unittest.expect(o, unittest.hasLength(2)); | |
| 122 unittest.expect(o[0], unittest.equals('foo')); | |
| 123 unittest.expect(o[1], unittest.equals('foo')); | |
| 124 } | |
| 125 | |
| 126 buildUnnamed3275() { | |
| 127 var o = new core.Map<core.String, core.List<core.String>>(); | |
| 128 o["x"] = buildUnnamed3274(); | |
| 129 o["y"] = buildUnnamed3274(); | |
| 130 return o; | |
| 131 } | |
| 132 | |
| 133 checkUnnamed3275(core.Map<core.String, core.List<core.String>> o) { | |
| 134 unittest.expect(o, unittest.hasLength(2)); | |
| 135 checkUnnamed3274(o["x"]); | |
| 136 checkUnnamed3274(o["y"]); | |
| 137 } | |
| 138 | |
| 139 core.int buildCounterAnnotationSet = 0; | |
| 140 buildAnnotationSet() { | |
| 141 var o = new api.AnnotationSet(); | |
| 142 buildCounterAnnotationSet++; | |
| 143 if (buildCounterAnnotationSet < 3) { | |
| 144 o.datasetId = "foo"; | |
| 145 o.id = "foo"; | |
| 146 o.info = buildUnnamed3275(); | |
| 147 o.name = "foo"; | |
| 148 o.referenceSetId = "foo"; | |
| 149 o.sourceUri = "foo"; | |
| 150 o.type = "foo"; | |
| 151 } | |
| 152 buildCounterAnnotationSet--; | |
| 153 return o; | |
| 154 } | |
| 155 | |
| 156 checkAnnotationSet(api.AnnotationSet o) { | |
| 157 buildCounterAnnotationSet++; | |
| 158 if (buildCounterAnnotationSet < 3) { | |
| 159 unittest.expect(o.datasetId, unittest.equals('foo')); | |
| 160 unittest.expect(o.id, unittest.equals('foo')); | |
| 161 checkUnnamed3275(o.info); | |
| 162 unittest.expect(o.name, unittest.equals('foo')); | |
| 163 unittest.expect(o.referenceSetId, unittest.equals('foo')); | |
| 164 unittest.expect(o.sourceUri, unittest.equals('foo')); | |
| 165 unittest.expect(o.type, unittest.equals('foo')); | |
| 166 } | |
| 167 buildCounterAnnotationSet--; | |
| 168 } | |
| 169 | |
| 170 buildUnnamed3276() { | |
| 171 var o = new core.List<api.BatchAnnotationsResponseEntry>(); | |
| 172 o.add(buildBatchAnnotationsResponseEntry()); | |
| 173 o.add(buildBatchAnnotationsResponseEntry()); | |
| 174 return o; | |
| 175 } | |
| 176 | |
| 177 checkUnnamed3276(core.List<api.BatchAnnotationsResponseEntry> o) { | |
| 178 unittest.expect(o, unittest.hasLength(2)); | |
| 179 checkBatchAnnotationsResponseEntry(o[0]); | |
| 180 checkBatchAnnotationsResponseEntry(o[1]); | |
| 181 } | |
| 182 | |
| 183 core.int buildCounterBatchAnnotationsResponse = 0; | |
| 184 buildBatchAnnotationsResponse() { | |
| 185 var o = new api.BatchAnnotationsResponse(); | |
| 186 buildCounterBatchAnnotationsResponse++; | |
| 187 if (buildCounterBatchAnnotationsResponse < 3) { | |
| 188 o.entries = buildUnnamed3276(); | |
| 189 } | |
| 190 buildCounterBatchAnnotationsResponse--; | |
| 191 return o; | |
| 192 } | |
| 193 | |
| 194 checkBatchAnnotationsResponse(api.BatchAnnotationsResponse o) { | |
| 195 buildCounterBatchAnnotationsResponse++; | |
| 196 if (buildCounterBatchAnnotationsResponse < 3) { | |
| 197 checkUnnamed3276(o.entries); | |
| 198 } | |
| 199 buildCounterBatchAnnotationsResponse--; | |
| 200 } | |
| 201 | |
| 202 core.int buildCounterBatchAnnotationsResponseEntry = 0; | |
| 203 buildBatchAnnotationsResponseEntry() { | |
| 204 var o = new api.BatchAnnotationsResponseEntry(); | |
| 205 buildCounterBatchAnnotationsResponseEntry++; | |
| 206 if (buildCounterBatchAnnotationsResponseEntry < 3) { | |
| 207 o.annotation = buildAnnotation(); | |
| 208 o.status = buildBatchAnnotationsResponseEntryStatus(); | |
| 209 } | |
| 210 buildCounterBatchAnnotationsResponseEntry--; | |
| 211 return o; | |
| 212 } | |
| 213 | |
| 214 checkBatchAnnotationsResponseEntry(api.BatchAnnotationsResponseEntry o) { | |
| 215 buildCounterBatchAnnotationsResponseEntry++; | |
| 216 if (buildCounterBatchAnnotationsResponseEntry < 3) { | |
| 217 checkAnnotation(o.annotation); | |
| 218 checkBatchAnnotationsResponseEntryStatus(o.status); | |
| 219 } | |
| 220 buildCounterBatchAnnotationsResponseEntry--; | |
| 221 } | |
| 222 | |
| 223 core.int buildCounterBatchAnnotationsResponseEntryStatus = 0; | |
| 224 buildBatchAnnotationsResponseEntryStatus() { | |
| 225 var o = new api.BatchAnnotationsResponseEntryStatus(); | |
| 226 buildCounterBatchAnnotationsResponseEntryStatus++; | |
| 227 if (buildCounterBatchAnnotationsResponseEntryStatus < 3) { | |
| 228 o.code = 42; | |
| 229 o.message = "foo"; | |
| 230 } | |
| 231 buildCounterBatchAnnotationsResponseEntryStatus--; | |
| 232 return o; | |
| 233 } | |
| 234 | |
| 235 checkBatchAnnotationsResponseEntryStatus(api.BatchAnnotationsResponseEntryStatus
o) { | |
| 236 buildCounterBatchAnnotationsResponseEntryStatus++; | |
| 237 if (buildCounterBatchAnnotationsResponseEntryStatus < 3) { | |
| 238 unittest.expect(o.code, unittest.equals(42)); | |
| 239 unittest.expect(o.message, unittest.equals('foo')); | |
| 240 } | |
| 241 buildCounterBatchAnnotationsResponseEntryStatus--; | |
| 242 } | |
| 243 | |
| 244 buildUnnamed3277() { | |
| 245 var o = new core.List<api.Annotation>(); | |
| 246 o.add(buildAnnotation()); | |
| 247 o.add(buildAnnotation()); | |
| 248 return o; | |
| 249 } | |
| 250 | |
| 251 checkUnnamed3277(core.List<api.Annotation> o) { | |
| 252 unittest.expect(o, unittest.hasLength(2)); | |
| 253 checkAnnotation(o[0]); | |
| 254 checkAnnotation(o[1]); | |
| 255 } | |
| 256 | |
| 257 core.int buildCounterBatchCreateAnnotationsRequest = 0; | |
| 258 buildBatchCreateAnnotationsRequest() { | |
| 259 var o = new api.BatchCreateAnnotationsRequest(); | |
| 260 buildCounterBatchCreateAnnotationsRequest++; | |
| 261 if (buildCounterBatchCreateAnnotationsRequest < 3) { | |
| 262 o.annotations = buildUnnamed3277(); | |
| 263 } | |
| 264 buildCounterBatchCreateAnnotationsRequest--; | |
| 265 return o; | |
| 266 } | |
| 267 | |
| 268 checkBatchCreateAnnotationsRequest(api.BatchCreateAnnotationsRequest o) { | |
| 269 buildCounterBatchCreateAnnotationsRequest++; | |
| 270 if (buildCounterBatchCreateAnnotationsRequest < 3) { | |
| 271 checkUnnamed3277(o.annotations); | |
| 272 } | |
| 273 buildCounterBatchCreateAnnotationsRequest--; | |
| 274 } | |
| 275 | |
| 276 buildUnnamed3278() { | |
| 277 var o = new core.List<core.int>(); | |
| 278 o.add(42); | |
| 279 o.add(42); | |
| 280 return o; | |
| 281 } | |
| 282 | |
| 283 checkUnnamed3278(core.List<core.int> o) { | |
| 284 unittest.expect(o, unittest.hasLength(2)); | |
| 285 unittest.expect(o[0], unittest.equals(42)); | |
| 286 unittest.expect(o[1], unittest.equals(42)); | |
| 287 } | |
| 288 | |
| 289 buildUnnamed3279() { | |
| 290 var o = new core.List<core.double>(); | |
| 291 o.add(42.0); | |
| 292 o.add(42.0); | |
| 293 return o; | |
| 294 } | |
| 295 | |
| 296 checkUnnamed3279(core.List<core.double> o) { | |
| 297 unittest.expect(o, unittest.hasLength(2)); | |
| 298 unittest.expect(o[0], unittest.equals(42.0)); | |
| 299 unittest.expect(o[1], unittest.equals(42.0)); | |
| 300 } | |
| 301 | |
| 302 buildUnnamed3280() { | |
| 303 var o = new core.List<core.String>(); | |
| 304 o.add("foo"); | |
| 305 o.add("foo"); | |
| 306 return o; | |
| 307 } | |
| 308 | |
| 309 checkUnnamed3280(core.List<core.String> o) { | |
| 310 unittest.expect(o, unittest.hasLength(2)); | |
| 311 unittest.expect(o[0], unittest.equals('foo')); | |
| 312 unittest.expect(o[1], unittest.equals('foo')); | |
| 313 } | |
| 314 | |
| 315 buildUnnamed3281() { | |
| 316 var o = new core.Map<core.String, core.List<core.String>>(); | |
| 317 o["x"] = buildUnnamed3280(); | |
| 318 o["y"] = buildUnnamed3280(); | |
| 319 return o; | |
| 320 } | |
| 321 | |
| 322 checkUnnamed3281(core.Map<core.String, core.List<core.String>> o) { | |
| 323 unittest.expect(o, unittest.hasLength(2)); | |
| 324 checkUnnamed3280(o["x"]); | |
| 325 checkUnnamed3280(o["y"]); | |
| 326 } | |
| 327 | |
| 328 core.int buildCounterCall = 0; | |
| 329 buildCall() { | |
| 330 var o = new api.Call(); | |
| 331 buildCounterCall++; | |
| 332 if (buildCounterCall < 3) { | |
| 333 o.callSetId = "foo"; | |
| 334 o.callSetName = "foo"; | |
| 335 o.genotype = buildUnnamed3278(); | |
| 336 o.genotypeLikelihood = buildUnnamed3279(); | |
| 337 o.info = buildUnnamed3281(); | |
| 338 o.phaseset = "foo"; | |
| 339 } | |
| 340 buildCounterCall--; | |
| 341 return o; | |
| 342 } | |
| 343 | |
| 344 checkCall(api.Call o) { | |
| 345 buildCounterCall++; | |
| 346 if (buildCounterCall < 3) { | |
| 347 unittest.expect(o.callSetId, unittest.equals('foo')); | |
| 348 unittest.expect(o.callSetName, unittest.equals('foo')); | |
| 349 checkUnnamed3278(o.genotype); | |
| 350 checkUnnamed3279(o.genotypeLikelihood); | |
| 351 checkUnnamed3281(o.info); | |
| 352 unittest.expect(o.phaseset, unittest.equals('foo')); | |
| 353 } | |
| 354 buildCounterCall--; | |
| 355 } | |
| 356 | |
| 357 buildUnnamed3282() { | |
| 358 var o = new core.List<core.String>(); | |
| 359 o.add("foo"); | |
| 360 o.add("foo"); | |
| 361 return o; | |
| 362 } | |
| 363 | |
| 364 checkUnnamed3282(core.List<core.String> o) { | |
| 365 unittest.expect(o, unittest.hasLength(2)); | |
| 366 unittest.expect(o[0], unittest.equals('foo')); | |
| 367 unittest.expect(o[1], unittest.equals('foo')); | |
| 368 } | |
| 369 | |
| 370 buildUnnamed3283() { | |
| 371 var o = new core.Map<core.String, core.List<core.String>>(); | |
| 372 o["x"] = buildUnnamed3282(); | |
| 373 o["y"] = buildUnnamed3282(); | |
| 374 return o; | |
| 375 } | |
| 376 | |
| 377 checkUnnamed3283(core.Map<core.String, core.List<core.String>> o) { | |
| 378 unittest.expect(o, unittest.hasLength(2)); | |
| 379 checkUnnamed3282(o["x"]); | |
| 380 checkUnnamed3282(o["y"]); | |
| 381 } | |
| 382 | |
| 383 buildUnnamed3284() { | |
| 384 var o = new core.List<core.String>(); | |
| 385 o.add("foo"); | |
| 386 o.add("foo"); | |
| 387 return o; | |
| 388 } | |
| 389 | |
| 390 checkUnnamed3284(core.List<core.String> o) { | |
| 391 unittest.expect(o, unittest.hasLength(2)); | |
| 392 unittest.expect(o[0], unittest.equals('foo')); | |
| 393 unittest.expect(o[1], unittest.equals('foo')); | |
| 394 } | |
| 395 | |
| 396 core.int buildCounterCallSet = 0; | |
| 397 buildCallSet() { | |
| 398 var o = new api.CallSet(); | |
| 399 buildCounterCallSet++; | |
| 400 if (buildCounterCallSet < 3) { | |
| 401 o.created = "foo"; | |
| 402 o.id = "foo"; | |
| 403 o.info = buildUnnamed3283(); | |
| 404 o.name = "foo"; | |
| 405 o.sampleId = "foo"; | |
| 406 o.variantSetIds = buildUnnamed3284(); | |
| 407 } | |
| 408 buildCounterCallSet--; | |
| 409 return o; | |
| 410 } | |
| 411 | |
| 412 checkCallSet(api.CallSet o) { | |
| 413 buildCounterCallSet++; | |
| 414 if (buildCounterCallSet < 3) { | |
| 415 unittest.expect(o.created, unittest.equals('foo')); | |
| 416 unittest.expect(o.id, unittest.equals('foo')); | |
| 417 checkUnnamed3283(o.info); | |
| 418 unittest.expect(o.name, unittest.equals('foo')); | |
| 419 unittest.expect(o.sampleId, unittest.equals('foo')); | |
| 420 checkUnnamed3284(o.variantSetIds); | |
| 421 } | |
| 422 buildCounterCallSet--; | |
| 423 } | |
| 424 | |
| 425 core.int buildCounterCigarUnit = 0; | |
| 426 buildCigarUnit() { | |
| 427 var o = new api.CigarUnit(); | |
| 428 buildCounterCigarUnit++; | |
| 429 if (buildCounterCigarUnit < 3) { | |
| 430 o.operation = "foo"; | |
| 431 o.operationLength = "foo"; | |
| 432 o.referenceSequence = "foo"; | |
| 433 } | |
| 434 buildCounterCigarUnit--; | |
| 435 return o; | |
| 436 } | |
| 437 | |
| 438 checkCigarUnit(api.CigarUnit o) { | |
| 439 buildCounterCigarUnit++; | |
| 440 if (buildCounterCigarUnit < 3) { | |
| 441 unittest.expect(o.operation, unittest.equals('foo')); | |
| 442 unittest.expect(o.operationLength, unittest.equals('foo')); | |
| 443 unittest.expect(o.referenceSequence, unittest.equals('foo')); | |
| 444 } | |
| 445 buildCounterCigarUnit--; | |
| 446 } | |
| 447 | |
| 448 core.int buildCounterCoverageBucket = 0; | |
| 449 buildCoverageBucket() { | |
| 450 var o = new api.CoverageBucket(); | |
| 451 buildCounterCoverageBucket++; | |
| 452 if (buildCounterCoverageBucket < 3) { | |
| 453 o.meanCoverage = 42.0; | |
| 454 o.range = buildRange(); | |
| 455 } | |
| 456 buildCounterCoverageBucket--; | |
| 457 return o; | |
| 458 } | |
| 459 | |
| 460 checkCoverageBucket(api.CoverageBucket o) { | |
| 461 buildCounterCoverageBucket++; | |
| 462 if (buildCounterCoverageBucket < 3) { | |
| 463 unittest.expect(o.meanCoverage, unittest.equals(42.0)); | |
| 464 checkRange(o.range); | |
| 465 } | |
| 466 buildCounterCoverageBucket--; | |
| 467 } | |
| 468 | |
| 469 core.int buildCounterDataset = 0; | |
| 470 buildDataset() { | |
| 471 var o = new api.Dataset(); | |
| 472 buildCounterDataset++; | |
| 473 if (buildCounterDataset < 3) { | |
| 474 o.createTime = "foo"; | |
| 475 o.id = "foo"; | |
| 476 o.isPublic = true; | |
| 477 o.name = "foo"; | |
| 478 o.projectNumber = "foo"; | |
| 479 } | |
| 480 buildCounterDataset--; | |
| 481 return o; | |
| 482 } | |
| 483 | |
| 484 checkDataset(api.Dataset o) { | |
| 485 buildCounterDataset++; | |
| 486 if (buildCounterDataset < 3) { | |
| 487 unittest.expect(o.createTime, unittest.equals('foo')); | |
| 488 unittest.expect(o.id, unittest.equals('foo')); | |
| 489 unittest.expect(o.isPublic, unittest.isTrue); | |
| 490 unittest.expect(o.name, unittest.equals('foo')); | |
| 491 unittest.expect(o.projectNumber, unittest.equals('foo')); | |
| 492 } | |
| 493 buildCounterDataset--; | |
| 494 } | |
| 495 | |
| 496 buildUnnamed3285() { | |
| 497 var o = new core.List<core.String>(); | |
| 498 o.add("foo"); | |
| 499 o.add("foo"); | |
| 500 return o; | |
| 501 } | |
| 502 | |
| 503 checkUnnamed3285(core.List<core.String> o) { | |
| 504 unittest.expect(o, unittest.hasLength(2)); | |
| 505 unittest.expect(o[0], unittest.equals('foo')); | |
| 506 unittest.expect(o[1], unittest.equals('foo')); | |
| 507 } | |
| 508 | |
| 509 buildUnnamed3286() { | |
| 510 var o = new core.List<core.String>(); | |
| 511 o.add("foo"); | |
| 512 o.add("foo"); | |
| 513 return o; | |
| 514 } | |
| 515 | |
| 516 checkUnnamed3286(core.List<core.String> o) { | |
| 517 unittest.expect(o, unittest.hasLength(2)); | |
| 518 unittest.expect(o[0], unittest.equals('foo')); | |
| 519 unittest.expect(o[1], unittest.equals('foo')); | |
| 520 } | |
| 521 | |
| 522 core.int buildCounterExperimentalCreateJobRequest = 0; | |
| 523 buildExperimentalCreateJobRequest() { | |
| 524 var o = new api.ExperimentalCreateJobRequest(); | |
| 525 buildCounterExperimentalCreateJobRequest++; | |
| 526 if (buildCounterExperimentalCreateJobRequest < 3) { | |
| 527 o.align = true; | |
| 528 o.callVariants = true; | |
| 529 o.gcsOutputPath = "foo"; | |
| 530 o.pairedSourceUris = buildUnnamed3285(); | |
| 531 o.projectNumber = "foo"; | |
| 532 o.sourceUris = buildUnnamed3286(); | |
| 533 } | |
| 534 buildCounterExperimentalCreateJobRequest--; | |
| 535 return o; | |
| 536 } | |
| 537 | |
| 538 checkExperimentalCreateJobRequest(api.ExperimentalCreateJobRequest o) { | |
| 539 buildCounterExperimentalCreateJobRequest++; | |
| 540 if (buildCounterExperimentalCreateJobRequest < 3) { | |
| 541 unittest.expect(o.align, unittest.isTrue); | |
| 542 unittest.expect(o.callVariants, unittest.isTrue); | |
| 543 unittest.expect(o.gcsOutputPath, unittest.equals('foo')); | |
| 544 checkUnnamed3285(o.pairedSourceUris); | |
| 545 unittest.expect(o.projectNumber, unittest.equals('foo')); | |
| 546 checkUnnamed3286(o.sourceUris); | |
| 547 } | |
| 548 buildCounterExperimentalCreateJobRequest--; | |
| 549 } | |
| 550 | |
| 551 core.int buildCounterExperimentalCreateJobResponse = 0; | |
| 552 buildExperimentalCreateJobResponse() { | |
| 553 var o = new api.ExperimentalCreateJobResponse(); | |
| 554 buildCounterExperimentalCreateJobResponse++; | |
| 555 if (buildCounterExperimentalCreateJobResponse < 3) { | |
| 556 o.jobId = "foo"; | |
| 557 } | |
| 558 buildCounterExperimentalCreateJobResponse--; | |
| 559 return o; | |
| 560 } | |
| 561 | |
| 562 checkExperimentalCreateJobResponse(api.ExperimentalCreateJobResponse o) { | |
| 563 buildCounterExperimentalCreateJobResponse++; | |
| 564 if (buildCounterExperimentalCreateJobResponse < 3) { | |
| 565 unittest.expect(o.jobId, unittest.equals('foo')); | |
| 566 } | |
| 567 buildCounterExperimentalCreateJobResponse--; | |
| 568 } | |
| 569 | |
| 570 buildUnnamed3287() { | |
| 571 var o = new core.List<core.String>(); | |
| 572 o.add("foo"); | |
| 573 o.add("foo"); | |
| 574 return o; | |
| 575 } | |
| 576 | |
| 577 checkUnnamed3287(core.List<core.String> o) { | |
| 578 unittest.expect(o, unittest.hasLength(2)); | |
| 579 unittest.expect(o[0], unittest.equals('foo')); | |
| 580 unittest.expect(o[1], unittest.equals('foo')); | |
| 581 } | |
| 582 | |
| 583 buildUnnamed3288() { | |
| 584 var o = new core.List<core.String>(); | |
| 585 o.add("foo"); | |
| 586 o.add("foo"); | |
| 587 return o; | |
| 588 } | |
| 589 | |
| 590 checkUnnamed3288(core.List<core.String> o) { | |
| 591 unittest.expect(o, unittest.hasLength(2)); | |
| 592 unittest.expect(o[0], unittest.equals('foo')); | |
| 593 unittest.expect(o[1], unittest.equals('foo')); | |
| 594 } | |
| 595 | |
| 596 core.int buildCounterExportReadGroupSetsRequest = 0; | |
| 597 buildExportReadGroupSetsRequest() { | |
| 598 var o = new api.ExportReadGroupSetsRequest(); | |
| 599 buildCounterExportReadGroupSetsRequest++; | |
| 600 if (buildCounterExportReadGroupSetsRequest < 3) { | |
| 601 o.exportUri = "foo"; | |
| 602 o.projectNumber = "foo"; | |
| 603 o.readGroupSetIds = buildUnnamed3287(); | |
| 604 o.referenceNames = buildUnnamed3288(); | |
| 605 } | |
| 606 buildCounterExportReadGroupSetsRequest--; | |
| 607 return o; | |
| 608 } | |
| 609 | |
| 610 checkExportReadGroupSetsRequest(api.ExportReadGroupSetsRequest o) { | |
| 611 buildCounterExportReadGroupSetsRequest++; | |
| 612 if (buildCounterExportReadGroupSetsRequest < 3) { | |
| 613 unittest.expect(o.exportUri, unittest.equals('foo')); | |
| 614 unittest.expect(o.projectNumber, unittest.equals('foo')); | |
| 615 checkUnnamed3287(o.readGroupSetIds); | |
| 616 checkUnnamed3288(o.referenceNames); | |
| 617 } | |
| 618 buildCounterExportReadGroupSetsRequest--; | |
| 619 } | |
| 620 | |
| 621 core.int buildCounterExportReadGroupSetsResponse = 0; | |
| 622 buildExportReadGroupSetsResponse() { | |
| 623 var o = new api.ExportReadGroupSetsResponse(); | |
| 624 buildCounterExportReadGroupSetsResponse++; | |
| 625 if (buildCounterExportReadGroupSetsResponse < 3) { | |
| 626 o.jobId = "foo"; | |
| 627 } | |
| 628 buildCounterExportReadGroupSetsResponse--; | |
| 629 return o; | |
| 630 } | |
| 631 | |
| 632 checkExportReadGroupSetsResponse(api.ExportReadGroupSetsResponse o) { | |
| 633 buildCounterExportReadGroupSetsResponse++; | |
| 634 if (buildCounterExportReadGroupSetsResponse < 3) { | |
| 635 unittest.expect(o.jobId, unittest.equals('foo')); | |
| 636 } | |
| 637 buildCounterExportReadGroupSetsResponse--; | |
| 638 } | |
| 639 | |
| 640 buildUnnamed3289() { | |
| 641 var o = new core.List<core.String>(); | |
| 642 o.add("foo"); | |
| 643 o.add("foo"); | |
| 644 return o; | |
| 645 } | |
| 646 | |
| 647 checkUnnamed3289(core.List<core.String> o) { | |
| 648 unittest.expect(o, unittest.hasLength(2)); | |
| 649 unittest.expect(o[0], unittest.equals('foo')); | |
| 650 unittest.expect(o[1], unittest.equals('foo')); | |
| 651 } | |
| 652 | |
| 653 core.int buildCounterExportVariantSetRequest = 0; | |
| 654 buildExportVariantSetRequest() { | |
| 655 var o = new api.ExportVariantSetRequest(); | |
| 656 buildCounterExportVariantSetRequest++; | |
| 657 if (buildCounterExportVariantSetRequest < 3) { | |
| 658 o.bigqueryDataset = "foo"; | |
| 659 o.bigqueryTable = "foo"; | |
| 660 o.callSetIds = buildUnnamed3289(); | |
| 661 o.format = "foo"; | |
| 662 o.projectNumber = "foo"; | |
| 663 } | |
| 664 buildCounterExportVariantSetRequest--; | |
| 665 return o; | |
| 666 } | |
| 667 | |
| 668 checkExportVariantSetRequest(api.ExportVariantSetRequest o) { | |
| 669 buildCounterExportVariantSetRequest++; | |
| 670 if (buildCounterExportVariantSetRequest < 3) { | |
| 671 unittest.expect(o.bigqueryDataset, unittest.equals('foo')); | |
| 672 unittest.expect(o.bigqueryTable, unittest.equals('foo')); | |
| 673 checkUnnamed3289(o.callSetIds); | |
| 674 unittest.expect(o.format, unittest.equals('foo')); | |
| 675 unittest.expect(o.projectNumber, unittest.equals('foo')); | |
| 676 } | |
| 677 buildCounterExportVariantSetRequest--; | |
| 678 } | |
| 679 | |
| 680 core.int buildCounterExportVariantSetResponse = 0; | |
| 681 buildExportVariantSetResponse() { | |
| 682 var o = new api.ExportVariantSetResponse(); | |
| 683 buildCounterExportVariantSetResponse++; | |
| 684 if (buildCounterExportVariantSetResponse < 3) { | |
| 685 o.jobId = "foo"; | |
| 686 } | |
| 687 buildCounterExportVariantSetResponse--; | |
| 688 return o; | |
| 689 } | |
| 690 | |
| 691 checkExportVariantSetResponse(api.ExportVariantSetResponse o) { | |
| 692 buildCounterExportVariantSetResponse++; | |
| 693 if (buildCounterExportVariantSetResponse < 3) { | |
| 694 unittest.expect(o.jobId, unittest.equals('foo')); | |
| 695 } | |
| 696 buildCounterExportVariantSetResponse--; | |
| 697 } | |
| 698 | |
| 699 core.int buildCounterExternalId = 0; | |
| 700 buildExternalId() { | |
| 701 var o = new api.ExternalId(); | |
| 702 buildCounterExternalId++; | |
| 703 if (buildCounterExternalId < 3) { | |
| 704 o.id = "foo"; | |
| 705 o.sourceName = "foo"; | |
| 706 } | |
| 707 buildCounterExternalId--; | |
| 708 return o; | |
| 709 } | |
| 710 | |
| 711 checkExternalId(api.ExternalId o) { | |
| 712 buildCounterExternalId++; | |
| 713 if (buildCounterExternalId < 3) { | |
| 714 unittest.expect(o.id, unittest.equals('foo')); | |
| 715 unittest.expect(o.sourceName, unittest.equals('foo')); | |
| 716 } | |
| 717 buildCounterExternalId--; | |
| 718 } | |
| 719 | |
| 720 buildUnnamed3290() { | |
| 721 var o = new core.List<core.String>(); | |
| 722 o.add("foo"); | |
| 723 o.add("foo"); | |
| 724 return o; | |
| 725 } | |
| 726 | |
| 727 checkUnnamed3290(core.List<core.String> o) { | |
| 728 unittest.expect(o, unittest.hasLength(2)); | |
| 729 unittest.expect(o[0], unittest.equals('foo')); | |
| 730 unittest.expect(o[1], unittest.equals('foo')); | |
| 731 } | |
| 732 | |
| 733 core.int buildCounterImportReadGroupSetsRequest = 0; | |
| 734 buildImportReadGroupSetsRequest() { | |
| 735 var o = new api.ImportReadGroupSetsRequest(); | |
| 736 buildCounterImportReadGroupSetsRequest++; | |
| 737 if (buildCounterImportReadGroupSetsRequest < 3) { | |
| 738 o.datasetId = "foo"; | |
| 739 o.partitionStrategy = "foo"; | |
| 740 o.referenceSetId = "foo"; | |
| 741 o.sourceUris = buildUnnamed3290(); | |
| 742 } | |
| 743 buildCounterImportReadGroupSetsRequest--; | |
| 744 return o; | |
| 745 } | |
| 746 | |
| 747 checkImportReadGroupSetsRequest(api.ImportReadGroupSetsRequest o) { | |
| 748 buildCounterImportReadGroupSetsRequest++; | |
| 749 if (buildCounterImportReadGroupSetsRequest < 3) { | |
| 750 unittest.expect(o.datasetId, unittest.equals('foo')); | |
| 751 unittest.expect(o.partitionStrategy, unittest.equals('foo')); | |
| 752 unittest.expect(o.referenceSetId, unittest.equals('foo')); | |
| 753 checkUnnamed3290(o.sourceUris); | |
| 754 } | |
| 755 buildCounterImportReadGroupSetsRequest--; | |
| 756 } | |
| 757 | |
| 758 core.int buildCounterImportReadGroupSetsResponse = 0; | |
| 759 buildImportReadGroupSetsResponse() { | |
| 760 var o = new api.ImportReadGroupSetsResponse(); | |
| 761 buildCounterImportReadGroupSetsResponse++; | |
| 762 if (buildCounterImportReadGroupSetsResponse < 3) { | |
| 763 o.jobId = "foo"; | |
| 764 } | |
| 765 buildCounterImportReadGroupSetsResponse--; | |
| 766 return o; | |
| 767 } | |
| 768 | |
| 769 checkImportReadGroupSetsResponse(api.ImportReadGroupSetsResponse o) { | |
| 770 buildCounterImportReadGroupSetsResponse++; | |
| 771 if (buildCounterImportReadGroupSetsResponse < 3) { | |
| 772 unittest.expect(o.jobId, unittest.equals('foo')); | |
| 773 } | |
| 774 buildCounterImportReadGroupSetsResponse--; | |
| 775 } | |
| 776 | |
| 777 buildUnnamed3291() { | |
| 778 var o = new core.List<core.String>(); | |
| 779 o.add("foo"); | |
| 780 o.add("foo"); | |
| 781 return o; | |
| 782 } | |
| 783 | |
| 784 checkUnnamed3291(core.List<core.String> o) { | |
| 785 unittest.expect(o, unittest.hasLength(2)); | |
| 786 unittest.expect(o[0], unittest.equals('foo')); | |
| 787 unittest.expect(o[1], unittest.equals('foo')); | |
| 788 } | |
| 789 | |
| 790 core.int buildCounterImportVariantsRequest = 0; | |
| 791 buildImportVariantsRequest() { | |
| 792 var o = new api.ImportVariantsRequest(); | |
| 793 buildCounterImportVariantsRequest++; | |
| 794 if (buildCounterImportVariantsRequest < 3) { | |
| 795 o.format = "foo"; | |
| 796 o.normalizeReferenceNames = true; | |
| 797 o.sourceUris = buildUnnamed3291(); | |
| 798 } | |
| 799 buildCounterImportVariantsRequest--; | |
| 800 return o; | |
| 801 } | |
| 802 | |
| 803 checkImportVariantsRequest(api.ImportVariantsRequest o) { | |
| 804 buildCounterImportVariantsRequest++; | |
| 805 if (buildCounterImportVariantsRequest < 3) { | |
| 806 unittest.expect(o.format, unittest.equals('foo')); | |
| 807 unittest.expect(o.normalizeReferenceNames, unittest.isTrue); | |
| 808 checkUnnamed3291(o.sourceUris); | |
| 809 } | |
| 810 buildCounterImportVariantsRequest--; | |
| 811 } | |
| 812 | |
| 813 core.int buildCounterImportVariantsResponse = 0; | |
| 814 buildImportVariantsResponse() { | |
| 815 var o = new api.ImportVariantsResponse(); | |
| 816 buildCounterImportVariantsResponse++; | |
| 817 if (buildCounterImportVariantsResponse < 3) { | |
| 818 o.jobId = "foo"; | |
| 819 } | |
| 820 buildCounterImportVariantsResponse--; | |
| 821 return o; | |
| 822 } | |
| 823 | |
| 824 checkImportVariantsResponse(api.ImportVariantsResponse o) { | |
| 825 buildCounterImportVariantsResponse++; | |
| 826 if (buildCounterImportVariantsResponse < 3) { | |
| 827 unittest.expect(o.jobId, unittest.equals('foo')); | |
| 828 } | |
| 829 buildCounterImportVariantsResponse--; | |
| 830 } | |
| 831 | |
| 832 core.int buildCounterInt32Value = 0; | |
| 833 buildInt32Value() { | |
| 834 var o = new api.Int32Value(); | |
| 835 buildCounterInt32Value++; | |
| 836 if (buildCounterInt32Value < 3) { | |
| 837 o.value = 42; | |
| 838 } | |
| 839 buildCounterInt32Value--; | |
| 840 return o; | |
| 841 } | |
| 842 | |
| 843 checkInt32Value(api.Int32Value o) { | |
| 844 buildCounterInt32Value++; | |
| 845 if (buildCounterInt32Value < 3) { | |
| 846 unittest.expect(o.value, unittest.equals(42)); | |
| 847 } | |
| 848 buildCounterInt32Value--; | |
| 849 } | |
| 850 | |
| 851 buildUnnamed3292() { | |
| 852 var o = new core.List<core.String>(); | |
| 853 o.add("foo"); | |
| 854 o.add("foo"); | |
| 855 return o; | |
| 856 } | |
| 857 | |
| 858 checkUnnamed3292(core.List<core.String> o) { | |
| 859 unittest.expect(o, unittest.hasLength(2)); | |
| 860 unittest.expect(o[0], unittest.equals('foo')); | |
| 861 unittest.expect(o[1], unittest.equals('foo')); | |
| 862 } | |
| 863 | |
| 864 buildUnnamed3293() { | |
| 865 var o = new core.List<core.String>(); | |
| 866 o.add("foo"); | |
| 867 o.add("foo"); | |
| 868 return o; | |
| 869 } | |
| 870 | |
| 871 checkUnnamed3293(core.List<core.String> o) { | |
| 872 unittest.expect(o, unittest.hasLength(2)); | |
| 873 unittest.expect(o[0], unittest.equals('foo')); | |
| 874 unittest.expect(o[1], unittest.equals('foo')); | |
| 875 } | |
| 876 | |
| 877 buildUnnamed3294() { | |
| 878 var o = new core.List<core.String>(); | |
| 879 o.add("foo"); | |
| 880 o.add("foo"); | |
| 881 return o; | |
| 882 } | |
| 883 | |
| 884 checkUnnamed3294(core.List<core.String> o) { | |
| 885 unittest.expect(o, unittest.hasLength(2)); | |
| 886 unittest.expect(o[0], unittest.equals('foo')); | |
| 887 unittest.expect(o[1], unittest.equals('foo')); | |
| 888 } | |
| 889 | |
| 890 core.int buildCounterJob = 0; | |
| 891 buildJob() { | |
| 892 var o = new api.Job(); | |
| 893 buildCounterJob++; | |
| 894 if (buildCounterJob < 3) { | |
| 895 o.created = "foo"; | |
| 896 o.detailedStatus = "foo"; | |
| 897 o.errors = buildUnnamed3292(); | |
| 898 o.id = "foo"; | |
| 899 o.importedIds = buildUnnamed3293(); | |
| 900 o.projectNumber = "foo"; | |
| 901 o.request = buildJobRequest(); | |
| 902 o.status = "foo"; | |
| 903 o.warnings = buildUnnamed3294(); | |
| 904 } | |
| 905 buildCounterJob--; | |
| 906 return o; | |
| 907 } | |
| 908 | |
| 909 checkJob(api.Job o) { | |
| 910 buildCounterJob++; | |
| 911 if (buildCounterJob < 3) { | |
| 912 unittest.expect(o.created, unittest.equals('foo')); | |
| 913 unittest.expect(o.detailedStatus, unittest.equals('foo')); | |
| 914 checkUnnamed3292(o.errors); | |
| 915 unittest.expect(o.id, unittest.equals('foo')); | |
| 916 checkUnnamed3293(o.importedIds); | |
| 917 unittest.expect(o.projectNumber, unittest.equals('foo')); | |
| 918 checkJobRequest(o.request); | |
| 919 unittest.expect(o.status, unittest.equals('foo')); | |
| 920 checkUnnamed3294(o.warnings); | |
| 921 } | |
| 922 buildCounterJob--; | |
| 923 } | |
| 924 | |
| 925 buildUnnamed3295() { | |
| 926 var o = new core.List<core.String>(); | |
| 927 o.add("foo"); | |
| 928 o.add("foo"); | |
| 929 return o; | |
| 930 } | |
| 931 | |
| 932 checkUnnamed3295(core.List<core.String> o) { | |
| 933 unittest.expect(o, unittest.hasLength(2)); | |
| 934 unittest.expect(o[0], unittest.equals('foo')); | |
| 935 unittest.expect(o[1], unittest.equals('foo')); | |
| 936 } | |
| 937 | |
| 938 buildUnnamed3296() { | |
| 939 var o = new core.List<core.String>(); | |
| 940 o.add("foo"); | |
| 941 o.add("foo"); | |
| 942 return o; | |
| 943 } | |
| 944 | |
| 945 checkUnnamed3296(core.List<core.String> o) { | |
| 946 unittest.expect(o, unittest.hasLength(2)); | |
| 947 unittest.expect(o[0], unittest.equals('foo')); | |
| 948 unittest.expect(o[1], unittest.equals('foo')); | |
| 949 } | |
| 950 | |
| 951 core.int buildCounterJobRequest = 0; | |
| 952 buildJobRequest() { | |
| 953 var o = new api.JobRequest(); | |
| 954 buildCounterJobRequest++; | |
| 955 if (buildCounterJobRequest < 3) { | |
| 956 o.destination = buildUnnamed3295(); | |
| 957 o.source = buildUnnamed3296(); | |
| 958 o.type = "foo"; | |
| 959 } | |
| 960 buildCounterJobRequest--; | |
| 961 return o; | |
| 962 } | |
| 963 | |
| 964 checkJobRequest(api.JobRequest o) { | |
| 965 buildCounterJobRequest++; | |
| 966 if (buildCounterJobRequest < 3) { | |
| 967 checkUnnamed3295(o.destination); | |
| 968 checkUnnamed3296(o.source); | |
| 969 unittest.expect(o.type, unittest.equals('foo')); | |
| 970 } | |
| 971 buildCounterJobRequest--; | |
| 972 } | |
| 973 | |
| 974 buildUnnamed3297() { | |
| 975 var o = new core.List<core.String>(); | |
| 976 o.add("foo"); | |
| 977 o.add("foo"); | |
| 978 return o; | |
| 979 } | |
| 980 | |
| 981 checkUnnamed3297(core.List<core.String> o) { | |
| 982 unittest.expect(o, unittest.hasLength(2)); | |
| 983 unittest.expect(o[0], unittest.equals('foo')); | |
| 984 unittest.expect(o[1], unittest.equals('foo')); | |
| 985 } | |
| 986 | |
| 987 core.int buildCounterKeyValue = 0; | |
| 988 buildKeyValue() { | |
| 989 var o = new api.KeyValue(); | |
| 990 buildCounterKeyValue++; | |
| 991 if (buildCounterKeyValue < 3) { | |
| 992 o.key = "foo"; | |
| 993 o.value = buildUnnamed3297(); | |
| 994 } | |
| 995 buildCounterKeyValue--; | |
| 996 return o; | |
| 997 } | |
| 998 | |
| 999 checkKeyValue(api.KeyValue o) { | |
| 1000 buildCounterKeyValue++; | |
| 1001 if (buildCounterKeyValue < 3) { | |
| 1002 unittest.expect(o.key, unittest.equals('foo')); | |
| 1003 checkUnnamed3297(o.value); | |
| 1004 } | |
| 1005 buildCounterKeyValue--; | |
| 1006 } | |
| 1007 | |
| 1008 buildUnnamed3298() { | |
| 1009 var o = new core.List<api.CigarUnit>(); | |
| 1010 o.add(buildCigarUnit()); | |
| 1011 o.add(buildCigarUnit()); | |
| 1012 return o; | |
| 1013 } | |
| 1014 | |
| 1015 checkUnnamed3298(core.List<api.CigarUnit> o) { | |
| 1016 unittest.expect(o, unittest.hasLength(2)); | |
| 1017 checkCigarUnit(o[0]); | |
| 1018 checkCigarUnit(o[1]); | |
| 1019 } | |
| 1020 | |
| 1021 core.int buildCounterLinearAlignment = 0; | |
| 1022 buildLinearAlignment() { | |
| 1023 var o = new api.LinearAlignment(); | |
| 1024 buildCounterLinearAlignment++; | |
| 1025 if (buildCounterLinearAlignment < 3) { | |
| 1026 o.cigar = buildUnnamed3298(); | |
| 1027 o.mappingQuality = 42; | |
| 1028 o.position = buildPosition(); | |
| 1029 } | |
| 1030 buildCounterLinearAlignment--; | |
| 1031 return o; | |
| 1032 } | |
| 1033 | |
| 1034 checkLinearAlignment(api.LinearAlignment o) { | |
| 1035 buildCounterLinearAlignment++; | |
| 1036 if (buildCounterLinearAlignment < 3) { | |
| 1037 checkUnnamed3298(o.cigar); | |
| 1038 unittest.expect(o.mappingQuality, unittest.equals(42)); | |
| 1039 checkPosition(o.position); | |
| 1040 } | |
| 1041 buildCounterLinearAlignment--; | |
| 1042 } | |
| 1043 | |
| 1044 core.int buildCounterListBasesResponse = 0; | |
| 1045 buildListBasesResponse() { | |
| 1046 var o = new api.ListBasesResponse(); | |
| 1047 buildCounterListBasesResponse++; | |
| 1048 if (buildCounterListBasesResponse < 3) { | |
| 1049 o.nextPageToken = "foo"; | |
| 1050 o.offset = "foo"; | |
| 1051 o.sequence = "foo"; | |
| 1052 } | |
| 1053 buildCounterListBasesResponse--; | |
| 1054 return o; | |
| 1055 } | |
| 1056 | |
| 1057 checkListBasesResponse(api.ListBasesResponse o) { | |
| 1058 buildCounterListBasesResponse++; | |
| 1059 if (buildCounterListBasesResponse < 3) { | |
| 1060 unittest.expect(o.nextPageToken, unittest.equals('foo')); | |
| 1061 unittest.expect(o.offset, unittest.equals('foo')); | |
| 1062 unittest.expect(o.sequence, unittest.equals('foo')); | |
| 1063 } | |
| 1064 buildCounterListBasesResponse--; | |
| 1065 } | |
| 1066 | |
| 1067 buildUnnamed3299() { | |
| 1068 var o = new core.List<api.CoverageBucket>(); | |
| 1069 o.add(buildCoverageBucket()); | |
| 1070 o.add(buildCoverageBucket()); | |
| 1071 return o; | |
| 1072 } | |
| 1073 | |
| 1074 checkUnnamed3299(core.List<api.CoverageBucket> o) { | |
| 1075 unittest.expect(o, unittest.hasLength(2)); | |
| 1076 checkCoverageBucket(o[0]); | |
| 1077 checkCoverageBucket(o[1]); | |
| 1078 } | |
| 1079 | |
| 1080 core.int buildCounterListCoverageBucketsResponse = 0; | |
| 1081 buildListCoverageBucketsResponse() { | |
| 1082 var o = new api.ListCoverageBucketsResponse(); | |
| 1083 buildCounterListCoverageBucketsResponse++; | |
| 1084 if (buildCounterListCoverageBucketsResponse < 3) { | |
| 1085 o.bucketWidth = "foo"; | |
| 1086 o.coverageBuckets = buildUnnamed3299(); | |
| 1087 o.nextPageToken = "foo"; | |
| 1088 } | |
| 1089 buildCounterListCoverageBucketsResponse--; | |
| 1090 return o; | |
| 1091 } | |
| 1092 | |
| 1093 checkListCoverageBucketsResponse(api.ListCoverageBucketsResponse o) { | |
| 1094 buildCounterListCoverageBucketsResponse++; | |
| 1095 if (buildCounterListCoverageBucketsResponse < 3) { | |
| 1096 unittest.expect(o.bucketWidth, unittest.equals('foo')); | |
| 1097 checkUnnamed3299(o.coverageBuckets); | |
| 1098 unittest.expect(o.nextPageToken, unittest.equals('foo')); | |
| 1099 } | |
| 1100 buildCounterListCoverageBucketsResponse--; | |
| 1101 } | |
| 1102 | |
| 1103 buildUnnamed3300() { | |
| 1104 var o = new core.List<api.Dataset>(); | |
| 1105 o.add(buildDataset()); | |
| 1106 o.add(buildDataset()); | |
| 1107 return o; | |
| 1108 } | |
| 1109 | |
| 1110 checkUnnamed3300(core.List<api.Dataset> o) { | |
| 1111 unittest.expect(o, unittest.hasLength(2)); | |
| 1112 checkDataset(o[0]); | |
| 1113 checkDataset(o[1]); | |
| 1114 } | |
| 1115 | |
| 1116 core.int buildCounterListDatasetsResponse = 0; | |
| 1117 buildListDatasetsResponse() { | |
| 1118 var o = new api.ListDatasetsResponse(); | |
| 1119 buildCounterListDatasetsResponse++; | |
| 1120 if (buildCounterListDatasetsResponse < 3) { | |
| 1121 o.datasets = buildUnnamed3300(); | |
| 1122 o.nextPageToken = "foo"; | |
| 1123 } | |
| 1124 buildCounterListDatasetsResponse--; | |
| 1125 return o; | |
| 1126 } | |
| 1127 | |
| 1128 checkListDatasetsResponse(api.ListDatasetsResponse o) { | |
| 1129 buildCounterListDatasetsResponse++; | |
| 1130 if (buildCounterListDatasetsResponse < 3) { | |
| 1131 checkUnnamed3300(o.datasets); | |
| 1132 unittest.expect(o.nextPageToken, unittest.equals('foo')); | |
| 1133 } | |
| 1134 buildCounterListDatasetsResponse--; | |
| 1135 } | |
| 1136 | |
| 1137 buildUnnamed3301() { | |
| 1138 var o = new core.List<api.Variant>(); | |
| 1139 o.add(buildVariant()); | |
| 1140 o.add(buildVariant()); | |
| 1141 return o; | |
| 1142 } | |
| 1143 | |
| 1144 checkUnnamed3301(core.List<api.Variant> o) { | |
| 1145 unittest.expect(o, unittest.hasLength(2)); | |
| 1146 checkVariant(o[0]); | |
| 1147 checkVariant(o[1]); | |
| 1148 } | |
| 1149 | |
| 1150 core.int buildCounterMergeVariantsRequest = 0; | |
| 1151 buildMergeVariantsRequest() { | |
| 1152 var o = new api.MergeVariantsRequest(); | |
| 1153 buildCounterMergeVariantsRequest++; | |
| 1154 if (buildCounterMergeVariantsRequest < 3) { | |
| 1155 o.variants = buildUnnamed3301(); | |
| 1156 } | |
| 1157 buildCounterMergeVariantsRequest--; | |
| 1158 return o; | |
| 1159 } | |
| 1160 | |
| 1161 checkMergeVariantsRequest(api.MergeVariantsRequest o) { | |
| 1162 buildCounterMergeVariantsRequest++; | |
| 1163 if (buildCounterMergeVariantsRequest < 3) { | |
| 1164 checkUnnamed3301(o.variants); | |
| 1165 } | |
| 1166 buildCounterMergeVariantsRequest--; | |
| 1167 } | |
| 1168 | |
| 1169 buildUnnamed3302() { | |
| 1170 var o = new core.List<core.String>(); | |
| 1171 o.add("foo"); | |
| 1172 o.add("foo"); | |
| 1173 return o; | |
| 1174 } | |
| 1175 | |
| 1176 checkUnnamed3302(core.List<core.String> o) { | |
| 1177 unittest.expect(o, unittest.hasLength(2)); | |
| 1178 unittest.expect(o[0], unittest.equals('foo')); | |
| 1179 unittest.expect(o[1], unittest.equals('foo')); | |
| 1180 } | |
| 1181 | |
| 1182 buildUnnamed3303() { | |
| 1183 var o = new core.Map<core.String, core.List<core.String>>(); | |
| 1184 o["x"] = buildUnnamed3302(); | |
| 1185 o["y"] = buildUnnamed3302(); | |
| 1186 return o; | |
| 1187 } | |
| 1188 | |
| 1189 checkUnnamed3303(core.Map<core.String, core.List<core.String>> o) { | |
| 1190 unittest.expect(o, unittest.hasLength(2)); | |
| 1191 checkUnnamed3302(o["x"]); | |
| 1192 checkUnnamed3302(o["y"]); | |
| 1193 } | |
| 1194 | |
| 1195 core.int buildCounterMetadata = 0; | |
| 1196 buildMetadata() { | |
| 1197 var o = new api.Metadata(); | |
| 1198 buildCounterMetadata++; | |
| 1199 if (buildCounterMetadata < 3) { | |
| 1200 o.description = "foo"; | |
| 1201 o.id = "foo"; | |
| 1202 o.info = buildUnnamed3303(); | |
| 1203 o.key = "foo"; | |
| 1204 o.number = "foo"; | |
| 1205 o.type = "foo"; | |
| 1206 o.value = "foo"; | |
| 1207 } | |
| 1208 buildCounterMetadata--; | |
| 1209 return o; | |
| 1210 } | |
| 1211 | |
| 1212 checkMetadata(api.Metadata o) { | |
| 1213 buildCounterMetadata++; | |
| 1214 if (buildCounterMetadata < 3) { | |
| 1215 unittest.expect(o.description, unittest.equals('foo')); | |
| 1216 unittest.expect(o.id, unittest.equals('foo')); | |
| 1217 checkUnnamed3303(o.info); | |
| 1218 unittest.expect(o.key, unittest.equals('foo')); | |
| 1219 unittest.expect(o.number, unittest.equals('foo')); | |
| 1220 unittest.expect(o.type, unittest.equals('foo')); | |
| 1221 unittest.expect(o.value, unittest.equals('foo')); | |
| 1222 } | |
| 1223 buildCounterMetadata--; | |
| 1224 } | |
| 1225 | |
| 1226 core.int buildCounterPosition = 0; | |
| 1227 buildPosition() { | |
| 1228 var o = new api.Position(); | |
| 1229 buildCounterPosition++; | |
| 1230 if (buildCounterPosition < 3) { | |
| 1231 o.position = "foo"; | |
| 1232 o.referenceName = "foo"; | |
| 1233 o.reverseStrand = true; | |
| 1234 } | |
| 1235 buildCounterPosition--; | |
| 1236 return o; | |
| 1237 } | |
| 1238 | |
| 1239 checkPosition(api.Position o) { | |
| 1240 buildCounterPosition++; | |
| 1241 if (buildCounterPosition < 3) { | |
| 1242 unittest.expect(o.position, unittest.equals('foo')); | |
| 1243 unittest.expect(o.referenceName, unittest.equals('foo')); | |
| 1244 unittest.expect(o.reverseStrand, unittest.isTrue); | |
| 1245 } | |
| 1246 buildCounterPosition--; | |
| 1247 } | |
| 1248 | |
| 1249 core.int buildCounterQueryRange = 0; | |
| 1250 buildQueryRange() { | |
| 1251 var o = new api.QueryRange(); | |
| 1252 buildCounterQueryRange++; | |
| 1253 if (buildCounterQueryRange < 3) { | |
| 1254 o.end = "foo"; | |
| 1255 o.referenceId = "foo"; | |
| 1256 o.referenceName = "foo"; | |
| 1257 o.start = "foo"; | |
| 1258 } | |
| 1259 buildCounterQueryRange--; | |
| 1260 return o; | |
| 1261 } | |
| 1262 | |
| 1263 checkQueryRange(api.QueryRange o) { | |
| 1264 buildCounterQueryRange++; | |
| 1265 if (buildCounterQueryRange < 3) { | |
| 1266 unittest.expect(o.end, unittest.equals('foo')); | |
| 1267 unittest.expect(o.referenceId, unittest.equals('foo')); | |
| 1268 unittest.expect(o.referenceName, unittest.equals('foo')); | |
| 1269 unittest.expect(o.start, unittest.equals('foo')); | |
| 1270 } | |
| 1271 buildCounterQueryRange--; | |
| 1272 } | |
| 1273 | |
| 1274 core.int buildCounterRange = 0; | |
| 1275 buildRange() { | |
| 1276 var o = new api.Range(); | |
| 1277 buildCounterRange++; | |
| 1278 if (buildCounterRange < 3) { | |
| 1279 o.end = "foo"; | |
| 1280 o.referenceName = "foo"; | |
| 1281 o.start = "foo"; | |
| 1282 } | |
| 1283 buildCounterRange--; | |
| 1284 return o; | |
| 1285 } | |
| 1286 | |
| 1287 checkRange(api.Range o) { | |
| 1288 buildCounterRange++; | |
| 1289 if (buildCounterRange < 3) { | |
| 1290 unittest.expect(o.end, unittest.equals('foo')); | |
| 1291 unittest.expect(o.referenceName, unittest.equals('foo')); | |
| 1292 unittest.expect(o.start, unittest.equals('foo')); | |
| 1293 } | |
| 1294 buildCounterRange--; | |
| 1295 } | |
| 1296 | |
| 1297 core.int buildCounterRangePosition = 0; | |
| 1298 buildRangePosition() { | |
| 1299 var o = new api.RangePosition(); | |
| 1300 buildCounterRangePosition++; | |
| 1301 if (buildCounterRangePosition < 3) { | |
| 1302 o.end = "foo"; | |
| 1303 o.referenceId = "foo"; | |
| 1304 o.referenceName = "foo"; | |
| 1305 o.reverseStrand = true; | |
| 1306 o.start = "foo"; | |
| 1307 } | |
| 1308 buildCounterRangePosition--; | |
| 1309 return o; | |
| 1310 } | |
| 1311 | |
| 1312 checkRangePosition(api.RangePosition o) { | |
| 1313 buildCounterRangePosition++; | |
| 1314 if (buildCounterRangePosition < 3) { | |
| 1315 unittest.expect(o.end, unittest.equals('foo')); | |
| 1316 unittest.expect(o.referenceId, unittest.equals('foo')); | |
| 1317 unittest.expect(o.referenceName, unittest.equals('foo')); | |
| 1318 unittest.expect(o.reverseStrand, unittest.isTrue); | |
| 1319 unittest.expect(o.start, unittest.equals('foo')); | |
| 1320 } | |
| 1321 buildCounterRangePosition--; | |
| 1322 } | |
| 1323 | |
| 1324 buildUnnamed3304() { | |
| 1325 var o = new core.List<core.int>(); | |
| 1326 o.add(42); | |
| 1327 o.add(42); | |
| 1328 return o; | |
| 1329 } | |
| 1330 | |
| 1331 checkUnnamed3304(core.List<core.int> o) { | |
| 1332 unittest.expect(o, unittest.hasLength(2)); | |
| 1333 unittest.expect(o[0], unittest.equals(42)); | |
| 1334 unittest.expect(o[1], unittest.equals(42)); | |
| 1335 } | |
| 1336 | |
| 1337 buildUnnamed3305() { | |
| 1338 var o = new core.List<core.String>(); | |
| 1339 o.add("foo"); | |
| 1340 o.add("foo"); | |
| 1341 return o; | |
| 1342 } | |
| 1343 | |
| 1344 checkUnnamed3305(core.List<core.String> o) { | |
| 1345 unittest.expect(o, unittest.hasLength(2)); | |
| 1346 unittest.expect(o[0], unittest.equals('foo')); | |
| 1347 unittest.expect(o[1], unittest.equals('foo')); | |
| 1348 } | |
| 1349 | |
| 1350 buildUnnamed3306() { | |
| 1351 var o = new core.Map<core.String, core.List<core.String>>(); | |
| 1352 o["x"] = buildUnnamed3305(); | |
| 1353 o["y"] = buildUnnamed3305(); | |
| 1354 return o; | |
| 1355 } | |
| 1356 | |
| 1357 checkUnnamed3306(core.Map<core.String, core.List<core.String>> o) { | |
| 1358 unittest.expect(o, unittest.hasLength(2)); | |
| 1359 checkUnnamed3305(o["x"]); | |
| 1360 checkUnnamed3305(o["y"]); | |
| 1361 } | |
| 1362 | |
| 1363 core.int buildCounterRead = 0; | |
| 1364 buildRead() { | |
| 1365 var o = new api.Read(); | |
| 1366 buildCounterRead++; | |
| 1367 if (buildCounterRead < 3) { | |
| 1368 o.alignedQuality = buildUnnamed3304(); | |
| 1369 o.alignedSequence = "foo"; | |
| 1370 o.alignment = buildLinearAlignment(); | |
| 1371 o.duplicateFragment = true; | |
| 1372 o.failedVendorQualityChecks = true; | |
| 1373 o.fragmentLength = 42; | |
| 1374 o.fragmentName = "foo"; | |
| 1375 o.id = "foo"; | |
| 1376 o.info = buildUnnamed3306(); | |
| 1377 o.nextMatePosition = buildPosition(); | |
| 1378 o.numberReads = 42; | |
| 1379 o.properPlacement = true; | |
| 1380 o.readGroupId = "foo"; | |
| 1381 o.readGroupSetId = "foo"; | |
| 1382 o.readNumber = 42; | |
| 1383 o.secondaryAlignment = true; | |
| 1384 o.supplementaryAlignment = true; | |
| 1385 } | |
| 1386 buildCounterRead--; | |
| 1387 return o; | |
| 1388 } | |
| 1389 | |
| 1390 checkRead(api.Read o) { | |
| 1391 buildCounterRead++; | |
| 1392 if (buildCounterRead < 3) { | |
| 1393 checkUnnamed3304(o.alignedQuality); | |
| 1394 unittest.expect(o.alignedSequence, unittest.equals('foo')); | |
| 1395 checkLinearAlignment(o.alignment); | |
| 1396 unittest.expect(o.duplicateFragment, unittest.isTrue); | |
| 1397 unittest.expect(o.failedVendorQualityChecks, unittest.isTrue); | |
| 1398 unittest.expect(o.fragmentLength, unittest.equals(42)); | |
| 1399 unittest.expect(o.fragmentName, unittest.equals('foo')); | |
| 1400 unittest.expect(o.id, unittest.equals('foo')); | |
| 1401 checkUnnamed3306(o.info); | |
| 1402 checkPosition(o.nextMatePosition); | |
| 1403 unittest.expect(o.numberReads, unittest.equals(42)); | |
| 1404 unittest.expect(o.properPlacement, unittest.isTrue); | |
| 1405 unittest.expect(o.readGroupId, unittest.equals('foo')); | |
| 1406 unittest.expect(o.readGroupSetId, unittest.equals('foo')); | |
| 1407 unittest.expect(o.readNumber, unittest.equals(42)); | |
| 1408 unittest.expect(o.secondaryAlignment, unittest.isTrue); | |
| 1409 unittest.expect(o.supplementaryAlignment, unittest.isTrue); | |
| 1410 } | |
| 1411 buildCounterRead--; | |
| 1412 } | |
| 1413 | |
| 1414 buildUnnamed3307() { | |
| 1415 var o = new core.List<core.String>(); | |
| 1416 o.add("foo"); | |
| 1417 o.add("foo"); | |
| 1418 return o; | |
| 1419 } | |
| 1420 | |
| 1421 checkUnnamed3307(core.List<core.String> o) { | |
| 1422 unittest.expect(o, unittest.hasLength(2)); | |
| 1423 unittest.expect(o[0], unittest.equals('foo')); | |
| 1424 unittest.expect(o[1], unittest.equals('foo')); | |
| 1425 } | |
| 1426 | |
| 1427 buildUnnamed3308() { | |
| 1428 var o = new core.Map<core.String, core.List<core.String>>(); | |
| 1429 o["x"] = buildUnnamed3307(); | |
| 1430 o["y"] = buildUnnamed3307(); | |
| 1431 return o; | |
| 1432 } | |
| 1433 | |
| 1434 checkUnnamed3308(core.Map<core.String, core.List<core.String>> o) { | |
| 1435 unittest.expect(o, unittest.hasLength(2)); | |
| 1436 checkUnnamed3307(o["x"]); | |
| 1437 checkUnnamed3307(o["y"]); | |
| 1438 } | |
| 1439 | |
| 1440 buildUnnamed3309() { | |
| 1441 var o = new core.List<api.ReadGroupProgram>(); | |
| 1442 o.add(buildReadGroupProgram()); | |
| 1443 o.add(buildReadGroupProgram()); | |
| 1444 return o; | |
| 1445 } | |
| 1446 | |
| 1447 checkUnnamed3309(core.List<api.ReadGroupProgram> o) { | |
| 1448 unittest.expect(o, unittest.hasLength(2)); | |
| 1449 checkReadGroupProgram(o[0]); | |
| 1450 checkReadGroupProgram(o[1]); | |
| 1451 } | |
| 1452 | |
| 1453 core.int buildCounterReadGroup = 0; | |
| 1454 buildReadGroup() { | |
| 1455 var o = new api.ReadGroup(); | |
| 1456 buildCounterReadGroup++; | |
| 1457 if (buildCounterReadGroup < 3) { | |
| 1458 o.datasetId = "foo"; | |
| 1459 o.description = "foo"; | |
| 1460 o.experiment = buildReadGroupExperiment(); | |
| 1461 o.id = "foo"; | |
| 1462 o.info = buildUnnamed3308(); | |
| 1463 o.name = "foo"; | |
| 1464 o.predictedInsertSize = 42; | |
| 1465 o.programs = buildUnnamed3309(); | |
| 1466 o.referenceSetId = "foo"; | |
| 1467 o.sampleId = "foo"; | |
| 1468 } | |
| 1469 buildCounterReadGroup--; | |
| 1470 return o; | |
| 1471 } | |
| 1472 | |
| 1473 checkReadGroup(api.ReadGroup o) { | |
| 1474 buildCounterReadGroup++; | |
| 1475 if (buildCounterReadGroup < 3) { | |
| 1476 unittest.expect(o.datasetId, unittest.equals('foo')); | |
| 1477 unittest.expect(o.description, unittest.equals('foo')); | |
| 1478 checkReadGroupExperiment(o.experiment); | |
| 1479 unittest.expect(o.id, unittest.equals('foo')); | |
| 1480 checkUnnamed3308(o.info); | |
| 1481 unittest.expect(o.name, unittest.equals('foo')); | |
| 1482 unittest.expect(o.predictedInsertSize, unittest.equals(42)); | |
| 1483 checkUnnamed3309(o.programs); | |
| 1484 unittest.expect(o.referenceSetId, unittest.equals('foo')); | |
| 1485 unittest.expect(o.sampleId, unittest.equals('foo')); | |
| 1486 } | |
| 1487 buildCounterReadGroup--; | |
| 1488 } | |
| 1489 | |
| 1490 core.int buildCounterReadGroupExperiment = 0; | |
| 1491 buildReadGroupExperiment() { | |
| 1492 var o = new api.ReadGroupExperiment(); | |
| 1493 buildCounterReadGroupExperiment++; | |
| 1494 if (buildCounterReadGroupExperiment < 3) { | |
| 1495 o.instrumentModel = "foo"; | |
| 1496 o.libraryId = "foo"; | |
| 1497 o.platformUnit = "foo"; | |
| 1498 o.sequencingCenter = "foo"; | |
| 1499 } | |
| 1500 buildCounterReadGroupExperiment--; | |
| 1501 return o; | |
| 1502 } | |
| 1503 | |
| 1504 checkReadGroupExperiment(api.ReadGroupExperiment o) { | |
| 1505 buildCounterReadGroupExperiment++; | |
| 1506 if (buildCounterReadGroupExperiment < 3) { | |
| 1507 unittest.expect(o.instrumentModel, unittest.equals('foo')); | |
| 1508 unittest.expect(o.libraryId, unittest.equals('foo')); | |
| 1509 unittest.expect(o.platformUnit, unittest.equals('foo')); | |
| 1510 unittest.expect(o.sequencingCenter, unittest.equals('foo')); | |
| 1511 } | |
| 1512 buildCounterReadGroupExperiment--; | |
| 1513 } | |
| 1514 | |
| 1515 core.int buildCounterReadGroupProgram = 0; | |
| 1516 buildReadGroupProgram() { | |
| 1517 var o = new api.ReadGroupProgram(); | |
| 1518 buildCounterReadGroupProgram++; | |
| 1519 if (buildCounterReadGroupProgram < 3) { | |
| 1520 o.commandLine = "foo"; | |
| 1521 o.id = "foo"; | |
| 1522 o.name = "foo"; | |
| 1523 o.prevProgramId = "foo"; | |
| 1524 o.version = "foo"; | |
| 1525 } | |
| 1526 buildCounterReadGroupProgram--; | |
| 1527 return o; | |
| 1528 } | |
| 1529 | |
| 1530 checkReadGroupProgram(api.ReadGroupProgram o) { | |
| 1531 buildCounterReadGroupProgram++; | |
| 1532 if (buildCounterReadGroupProgram < 3) { | |
| 1533 unittest.expect(o.commandLine, unittest.equals('foo')); | |
| 1534 unittest.expect(o.id, unittest.equals('foo')); | |
| 1535 unittest.expect(o.name, unittest.equals('foo')); | |
| 1536 unittest.expect(o.prevProgramId, unittest.equals('foo')); | |
| 1537 unittest.expect(o.version, unittest.equals('foo')); | |
| 1538 } | |
| 1539 buildCounterReadGroupProgram--; | |
| 1540 } | |
| 1541 | |
| 1542 buildUnnamed3310() { | |
| 1543 var o = new core.List<core.String>(); | |
| 1544 o.add("foo"); | |
| 1545 o.add("foo"); | |
| 1546 return o; | |
| 1547 } | |
| 1548 | |
| 1549 checkUnnamed3310(core.List<core.String> o) { | |
| 1550 unittest.expect(o, unittest.hasLength(2)); | |
| 1551 unittest.expect(o[0], unittest.equals('foo')); | |
| 1552 unittest.expect(o[1], unittest.equals('foo')); | |
| 1553 } | |
| 1554 | |
| 1555 buildUnnamed3311() { | |
| 1556 var o = new core.Map<core.String, core.List<core.String>>(); | |
| 1557 o["x"] = buildUnnamed3310(); | |
| 1558 o["y"] = buildUnnamed3310(); | |
| 1559 return o; | |
| 1560 } | |
| 1561 | |
| 1562 checkUnnamed3311(core.Map<core.String, core.List<core.String>> o) { | |
| 1563 unittest.expect(o, unittest.hasLength(2)); | |
| 1564 checkUnnamed3310(o["x"]); | |
| 1565 checkUnnamed3310(o["y"]); | |
| 1566 } | |
| 1567 | |
| 1568 buildUnnamed3312() { | |
| 1569 var o = new core.List<api.ReadGroup>(); | |
| 1570 o.add(buildReadGroup()); | |
| 1571 o.add(buildReadGroup()); | |
| 1572 return o; | |
| 1573 } | |
| 1574 | |
| 1575 checkUnnamed3312(core.List<api.ReadGroup> o) { | |
| 1576 unittest.expect(o, unittest.hasLength(2)); | |
| 1577 checkReadGroup(o[0]); | |
| 1578 checkReadGroup(o[1]); | |
| 1579 } | |
| 1580 | |
| 1581 core.int buildCounterReadGroupSet = 0; | |
| 1582 buildReadGroupSet() { | |
| 1583 var o = new api.ReadGroupSet(); | |
| 1584 buildCounterReadGroupSet++; | |
| 1585 if (buildCounterReadGroupSet < 3) { | |
| 1586 o.datasetId = "foo"; | |
| 1587 o.filename = "foo"; | |
| 1588 o.id = "foo"; | |
| 1589 o.info = buildUnnamed3311(); | |
| 1590 o.name = "foo"; | |
| 1591 o.readGroups = buildUnnamed3312(); | |
| 1592 o.referenceSetId = "foo"; | |
| 1593 } | |
| 1594 buildCounterReadGroupSet--; | |
| 1595 return o; | |
| 1596 } | |
| 1597 | |
| 1598 checkReadGroupSet(api.ReadGroupSet o) { | |
| 1599 buildCounterReadGroupSet++; | |
| 1600 if (buildCounterReadGroupSet < 3) { | |
| 1601 unittest.expect(o.datasetId, unittest.equals('foo')); | |
| 1602 unittest.expect(o.filename, unittest.equals('foo')); | |
| 1603 unittest.expect(o.id, unittest.equals('foo')); | |
| 1604 checkUnnamed3311(o.info); | |
| 1605 unittest.expect(o.name, unittest.equals('foo')); | |
| 1606 checkUnnamed3312(o.readGroups); | |
| 1607 unittest.expect(o.referenceSetId, unittest.equals('foo')); | |
| 1608 } | |
| 1609 buildCounterReadGroupSet--; | |
| 1610 } | |
| 1611 | |
| 1612 buildUnnamed3313() { | |
| 1613 var o = new core.List<core.String>(); | |
| 1614 o.add("foo"); | |
| 1615 o.add("foo"); | |
| 1616 return o; | |
| 1617 } | |
| 1618 | |
| 1619 checkUnnamed3313(core.List<core.String> o) { | |
| 1620 unittest.expect(o, unittest.hasLength(2)); | |
| 1621 unittest.expect(o[0], unittest.equals('foo')); | |
| 1622 unittest.expect(o[1], unittest.equals('foo')); | |
| 1623 } | |
| 1624 | |
| 1625 core.int buildCounterReference = 0; | |
| 1626 buildReference() { | |
| 1627 var o = new api.Reference(); | |
| 1628 buildCounterReference++; | |
| 1629 if (buildCounterReference < 3) { | |
| 1630 o.id = "foo"; | |
| 1631 o.length = "foo"; | |
| 1632 o.md5checksum = "foo"; | |
| 1633 o.name = "foo"; | |
| 1634 o.ncbiTaxonId = 42; | |
| 1635 o.sourceAccessions = buildUnnamed3313(); | |
| 1636 o.sourceURI = "foo"; | |
| 1637 } | |
| 1638 buildCounterReference--; | |
| 1639 return o; | |
| 1640 } | |
| 1641 | |
| 1642 checkReference(api.Reference o) { | |
| 1643 buildCounterReference++; | |
| 1644 if (buildCounterReference < 3) { | |
| 1645 unittest.expect(o.id, unittest.equals('foo')); | |
| 1646 unittest.expect(o.length, unittest.equals('foo')); | |
| 1647 unittest.expect(o.md5checksum, unittest.equals('foo')); | |
| 1648 unittest.expect(o.name, unittest.equals('foo')); | |
| 1649 unittest.expect(o.ncbiTaxonId, unittest.equals(42)); | |
| 1650 checkUnnamed3313(o.sourceAccessions); | |
| 1651 unittest.expect(o.sourceURI, unittest.equals('foo')); | |
| 1652 } | |
| 1653 buildCounterReference--; | |
| 1654 } | |
| 1655 | |
| 1656 core.int buildCounterReferenceBound = 0; | |
| 1657 buildReferenceBound() { | |
| 1658 var o = new api.ReferenceBound(); | |
| 1659 buildCounterReferenceBound++; | |
| 1660 if (buildCounterReferenceBound < 3) { | |
| 1661 o.referenceName = "foo"; | |
| 1662 o.upperBound = "foo"; | |
| 1663 } | |
| 1664 buildCounterReferenceBound--; | |
| 1665 return o; | |
| 1666 } | |
| 1667 | |
| 1668 checkReferenceBound(api.ReferenceBound o) { | |
| 1669 buildCounterReferenceBound++; | |
| 1670 if (buildCounterReferenceBound < 3) { | |
| 1671 unittest.expect(o.referenceName, unittest.equals('foo')); | |
| 1672 unittest.expect(o.upperBound, unittest.equals('foo')); | |
| 1673 } | |
| 1674 buildCounterReferenceBound--; | |
| 1675 } | |
| 1676 | |
| 1677 buildUnnamed3314() { | |
| 1678 var o = new core.List<core.String>(); | |
| 1679 o.add("foo"); | |
| 1680 o.add("foo"); | |
| 1681 return o; | |
| 1682 } | |
| 1683 | |
| 1684 checkUnnamed3314(core.List<core.String> o) { | |
| 1685 unittest.expect(o, unittest.hasLength(2)); | |
| 1686 unittest.expect(o[0], unittest.equals('foo')); | |
| 1687 unittest.expect(o[1], unittest.equals('foo')); | |
| 1688 } | |
| 1689 | |
| 1690 buildUnnamed3315() { | |
| 1691 var o = new core.List<core.String>(); | |
| 1692 o.add("foo"); | |
| 1693 o.add("foo"); | |
| 1694 return o; | |
| 1695 } | |
| 1696 | |
| 1697 checkUnnamed3315(core.List<core.String> o) { | |
| 1698 unittest.expect(o, unittest.hasLength(2)); | |
| 1699 unittest.expect(o[0], unittest.equals('foo')); | |
| 1700 unittest.expect(o[1], unittest.equals('foo')); | |
| 1701 } | |
| 1702 | |
| 1703 core.int buildCounterReferenceSet = 0; | |
| 1704 buildReferenceSet() { | |
| 1705 var o = new api.ReferenceSet(); | |
| 1706 buildCounterReferenceSet++; | |
| 1707 if (buildCounterReferenceSet < 3) { | |
| 1708 o.assemblyId = "foo"; | |
| 1709 o.description = "foo"; | |
| 1710 o.id = "foo"; | |
| 1711 o.md5checksum = "foo"; | |
| 1712 o.ncbiTaxonId = 42; | |
| 1713 o.referenceIds = buildUnnamed3314(); | |
| 1714 o.sourceAccessions = buildUnnamed3315(); | |
| 1715 o.sourceURI = "foo"; | |
| 1716 } | |
| 1717 buildCounterReferenceSet--; | |
| 1718 return o; | |
| 1719 } | |
| 1720 | |
| 1721 checkReferenceSet(api.ReferenceSet o) { | |
| 1722 buildCounterReferenceSet++; | |
| 1723 if (buildCounterReferenceSet < 3) { | |
| 1724 unittest.expect(o.assemblyId, unittest.equals('foo')); | |
| 1725 unittest.expect(o.description, unittest.equals('foo')); | |
| 1726 unittest.expect(o.id, unittest.equals('foo')); | |
| 1727 unittest.expect(o.md5checksum, unittest.equals('foo')); | |
| 1728 unittest.expect(o.ncbiTaxonId, unittest.equals(42)); | |
| 1729 checkUnnamed3314(o.referenceIds); | |
| 1730 checkUnnamed3315(o.sourceAccessions); | |
| 1731 unittest.expect(o.sourceURI, unittest.equals('foo')); | |
| 1732 } | |
| 1733 buildCounterReferenceSet--; | |
| 1734 } | |
| 1735 | |
| 1736 buildUnnamed3316() { | |
| 1737 var o = new core.List<core.String>(); | |
| 1738 o.add("foo"); | |
| 1739 o.add("foo"); | |
| 1740 return o; | |
| 1741 } | |
| 1742 | |
| 1743 checkUnnamed3316(core.List<core.String> o) { | |
| 1744 unittest.expect(o, unittest.hasLength(2)); | |
| 1745 unittest.expect(o[0], unittest.equals('foo')); | |
| 1746 unittest.expect(o[1], unittest.equals('foo')); | |
| 1747 } | |
| 1748 | |
| 1749 buildUnnamed3317() { | |
| 1750 var o = new core.List<core.String>(); | |
| 1751 o.add("foo"); | |
| 1752 o.add("foo"); | |
| 1753 return o; | |
| 1754 } | |
| 1755 | |
| 1756 checkUnnamed3317(core.List<core.String> o) { | |
| 1757 unittest.expect(o, unittest.hasLength(2)); | |
| 1758 unittest.expect(o[0], unittest.equals('foo')); | |
| 1759 unittest.expect(o[1], unittest.equals('foo')); | |
| 1760 } | |
| 1761 | |
| 1762 core.int buildCounterSearchAnnotationSetsRequest = 0; | |
| 1763 buildSearchAnnotationSetsRequest() { | |
| 1764 var o = new api.SearchAnnotationSetsRequest(); | |
| 1765 buildCounterSearchAnnotationSetsRequest++; | |
| 1766 if (buildCounterSearchAnnotationSetsRequest < 3) { | |
| 1767 o.datasetIds = buildUnnamed3316(); | |
| 1768 o.name = "foo"; | |
| 1769 o.pageSize = 42; | |
| 1770 o.pageToken = "foo"; | |
| 1771 o.referenceSetId = "foo"; | |
| 1772 o.types = buildUnnamed3317(); | |
| 1773 } | |
| 1774 buildCounterSearchAnnotationSetsRequest--; | |
| 1775 return o; | |
| 1776 } | |
| 1777 | |
| 1778 checkSearchAnnotationSetsRequest(api.SearchAnnotationSetsRequest o) { | |
| 1779 buildCounterSearchAnnotationSetsRequest++; | |
| 1780 if (buildCounterSearchAnnotationSetsRequest < 3) { | |
| 1781 checkUnnamed3316(o.datasetIds); | |
| 1782 unittest.expect(o.name, unittest.equals('foo')); | |
| 1783 unittest.expect(o.pageSize, unittest.equals(42)); | |
| 1784 unittest.expect(o.pageToken, unittest.equals('foo')); | |
| 1785 unittest.expect(o.referenceSetId, unittest.equals('foo')); | |
| 1786 checkUnnamed3317(o.types); | |
| 1787 } | |
| 1788 buildCounterSearchAnnotationSetsRequest--; | |
| 1789 } | |
| 1790 | |
| 1791 buildUnnamed3318() { | |
| 1792 var o = new core.List<api.AnnotationSet>(); | |
| 1793 o.add(buildAnnotationSet()); | |
| 1794 o.add(buildAnnotationSet()); | |
| 1795 return o; | |
| 1796 } | |
| 1797 | |
| 1798 checkUnnamed3318(core.List<api.AnnotationSet> o) { | |
| 1799 unittest.expect(o, unittest.hasLength(2)); | |
| 1800 checkAnnotationSet(o[0]); | |
| 1801 checkAnnotationSet(o[1]); | |
| 1802 } | |
| 1803 | |
| 1804 core.int buildCounterSearchAnnotationSetsResponse = 0; | |
| 1805 buildSearchAnnotationSetsResponse() { | |
| 1806 var o = new api.SearchAnnotationSetsResponse(); | |
| 1807 buildCounterSearchAnnotationSetsResponse++; | |
| 1808 if (buildCounterSearchAnnotationSetsResponse < 3) { | |
| 1809 o.annotationSets = buildUnnamed3318(); | |
| 1810 o.nextPageToken = "foo"; | |
| 1811 } | |
| 1812 buildCounterSearchAnnotationSetsResponse--; | |
| 1813 return o; | |
| 1814 } | |
| 1815 | |
| 1816 checkSearchAnnotationSetsResponse(api.SearchAnnotationSetsResponse o) { | |
| 1817 buildCounterSearchAnnotationSetsResponse++; | |
| 1818 if (buildCounterSearchAnnotationSetsResponse < 3) { | |
| 1819 checkUnnamed3318(o.annotationSets); | |
| 1820 unittest.expect(o.nextPageToken, unittest.equals('foo')); | |
| 1821 } | |
| 1822 buildCounterSearchAnnotationSetsResponse--; | |
| 1823 } | |
| 1824 | |
| 1825 buildUnnamed3319() { | |
| 1826 var o = new core.List<core.String>(); | |
| 1827 o.add("foo"); | |
| 1828 o.add("foo"); | |
| 1829 return o; | |
| 1830 } | |
| 1831 | |
| 1832 checkUnnamed3319(core.List<core.String> o) { | |
| 1833 unittest.expect(o, unittest.hasLength(2)); | |
| 1834 unittest.expect(o[0], unittest.equals('foo')); | |
| 1835 unittest.expect(o[1], unittest.equals('foo')); | |
| 1836 } | |
| 1837 | |
| 1838 core.int buildCounterSearchAnnotationsRequest = 0; | |
| 1839 buildSearchAnnotationsRequest() { | |
| 1840 var o = new api.SearchAnnotationsRequest(); | |
| 1841 buildCounterSearchAnnotationsRequest++; | |
| 1842 if (buildCounterSearchAnnotationsRequest < 3) { | |
| 1843 o.annotationSetIds = buildUnnamed3319(); | |
| 1844 o.pageSize = 42; | |
| 1845 o.pageToken = "foo"; | |
| 1846 o.range = buildQueryRange(); | |
| 1847 } | |
| 1848 buildCounterSearchAnnotationsRequest--; | |
| 1849 return o; | |
| 1850 } | |
| 1851 | |
| 1852 checkSearchAnnotationsRequest(api.SearchAnnotationsRequest o) { | |
| 1853 buildCounterSearchAnnotationsRequest++; | |
| 1854 if (buildCounterSearchAnnotationsRequest < 3) { | |
| 1855 checkUnnamed3319(o.annotationSetIds); | |
| 1856 unittest.expect(o.pageSize, unittest.equals(42)); | |
| 1857 unittest.expect(o.pageToken, unittest.equals('foo')); | |
| 1858 checkQueryRange(o.range); | |
| 1859 } | |
| 1860 buildCounterSearchAnnotationsRequest--; | |
| 1861 } | |
| 1862 | |
| 1863 buildUnnamed3320() { | |
| 1864 var o = new core.List<api.Annotation>(); | |
| 1865 o.add(buildAnnotation()); | |
| 1866 o.add(buildAnnotation()); | |
| 1867 return o; | |
| 1868 } | |
| 1869 | |
| 1870 checkUnnamed3320(core.List<api.Annotation> o) { | |
| 1871 unittest.expect(o, unittest.hasLength(2)); | |
| 1872 checkAnnotation(o[0]); | |
| 1873 checkAnnotation(o[1]); | |
| 1874 } | |
| 1875 | |
| 1876 core.int buildCounterSearchAnnotationsResponse = 0; | |
| 1877 buildSearchAnnotationsResponse() { | |
| 1878 var o = new api.SearchAnnotationsResponse(); | |
| 1879 buildCounterSearchAnnotationsResponse++; | |
| 1880 if (buildCounterSearchAnnotationsResponse < 3) { | |
| 1881 o.annotations = buildUnnamed3320(); | |
| 1882 o.nextPageToken = "foo"; | |
| 1883 } | |
| 1884 buildCounterSearchAnnotationsResponse--; | |
| 1885 return o; | |
| 1886 } | |
| 1887 | |
| 1888 checkSearchAnnotationsResponse(api.SearchAnnotationsResponse o) { | |
| 1889 buildCounterSearchAnnotationsResponse++; | |
| 1890 if (buildCounterSearchAnnotationsResponse < 3) { | |
| 1891 checkUnnamed3320(o.annotations); | |
| 1892 unittest.expect(o.nextPageToken, unittest.equals('foo')); | |
| 1893 } | |
| 1894 buildCounterSearchAnnotationsResponse--; | |
| 1895 } | |
| 1896 | |
| 1897 buildUnnamed3321() { | |
| 1898 var o = new core.List<core.String>(); | |
| 1899 o.add("foo"); | |
| 1900 o.add("foo"); | |
| 1901 return o; | |
| 1902 } | |
| 1903 | |
| 1904 checkUnnamed3321(core.List<core.String> o) { | |
| 1905 unittest.expect(o, unittest.hasLength(2)); | |
| 1906 unittest.expect(o[0], unittest.equals('foo')); | |
| 1907 unittest.expect(o[1], unittest.equals('foo')); | |
| 1908 } | |
| 1909 | |
| 1910 core.int buildCounterSearchCallSetsRequest = 0; | |
| 1911 buildSearchCallSetsRequest() { | |
| 1912 var o = new api.SearchCallSetsRequest(); | |
| 1913 buildCounterSearchCallSetsRequest++; | |
| 1914 if (buildCounterSearchCallSetsRequest < 3) { | |
| 1915 o.name = "foo"; | |
| 1916 o.pageSize = 42; | |
| 1917 o.pageToken = "foo"; | |
| 1918 o.variantSetIds = buildUnnamed3321(); | |
| 1919 } | |
| 1920 buildCounterSearchCallSetsRequest--; | |
| 1921 return o; | |
| 1922 } | |
| 1923 | |
| 1924 checkSearchCallSetsRequest(api.SearchCallSetsRequest o) { | |
| 1925 buildCounterSearchCallSetsRequest++; | |
| 1926 if (buildCounterSearchCallSetsRequest < 3) { | |
| 1927 unittest.expect(o.name, unittest.equals('foo')); | |
| 1928 unittest.expect(o.pageSize, unittest.equals(42)); | |
| 1929 unittest.expect(o.pageToken, unittest.equals('foo')); | |
| 1930 checkUnnamed3321(o.variantSetIds); | |
| 1931 } | |
| 1932 buildCounterSearchCallSetsRequest--; | |
| 1933 } | |
| 1934 | |
| 1935 buildUnnamed3322() { | |
| 1936 var o = new core.List<api.CallSet>(); | |
| 1937 o.add(buildCallSet()); | |
| 1938 o.add(buildCallSet()); | |
| 1939 return o; | |
| 1940 } | |
| 1941 | |
| 1942 checkUnnamed3322(core.List<api.CallSet> o) { | |
| 1943 unittest.expect(o, unittest.hasLength(2)); | |
| 1944 checkCallSet(o[0]); | |
| 1945 checkCallSet(o[1]); | |
| 1946 } | |
| 1947 | |
| 1948 core.int buildCounterSearchCallSetsResponse = 0; | |
| 1949 buildSearchCallSetsResponse() { | |
| 1950 var o = new api.SearchCallSetsResponse(); | |
| 1951 buildCounterSearchCallSetsResponse++; | |
| 1952 if (buildCounterSearchCallSetsResponse < 3) { | |
| 1953 o.callSets = buildUnnamed3322(); | |
| 1954 o.nextPageToken = "foo"; | |
| 1955 } | |
| 1956 buildCounterSearchCallSetsResponse--; | |
| 1957 return o; | |
| 1958 } | |
| 1959 | |
| 1960 checkSearchCallSetsResponse(api.SearchCallSetsResponse o) { | |
| 1961 buildCounterSearchCallSetsResponse++; | |
| 1962 if (buildCounterSearchCallSetsResponse < 3) { | |
| 1963 checkUnnamed3322(o.callSets); | |
| 1964 unittest.expect(o.nextPageToken, unittest.equals('foo')); | |
| 1965 } | |
| 1966 buildCounterSearchCallSetsResponse--; | |
| 1967 } | |
| 1968 | |
| 1969 buildUnnamed3323() { | |
| 1970 var o = new core.List<core.String>(); | |
| 1971 o.add("foo"); | |
| 1972 o.add("foo"); | |
| 1973 return o; | |
| 1974 } | |
| 1975 | |
| 1976 checkUnnamed3323(core.List<core.String> o) { | |
| 1977 unittest.expect(o, unittest.hasLength(2)); | |
| 1978 unittest.expect(o[0], unittest.equals('foo')); | |
| 1979 unittest.expect(o[1], unittest.equals('foo')); | |
| 1980 } | |
| 1981 | |
| 1982 core.int buildCounterSearchJobsRequest = 0; | |
| 1983 buildSearchJobsRequest() { | |
| 1984 var o = new api.SearchJobsRequest(); | |
| 1985 buildCounterSearchJobsRequest++; | |
| 1986 if (buildCounterSearchJobsRequest < 3) { | |
| 1987 o.createdAfter = "foo"; | |
| 1988 o.createdBefore = "foo"; | |
| 1989 o.pageSize = 42; | |
| 1990 o.pageToken = "foo"; | |
| 1991 o.projectNumber = "foo"; | |
| 1992 o.status = buildUnnamed3323(); | |
| 1993 } | |
| 1994 buildCounterSearchJobsRequest--; | |
| 1995 return o; | |
| 1996 } | |
| 1997 | |
| 1998 checkSearchJobsRequest(api.SearchJobsRequest o) { | |
| 1999 buildCounterSearchJobsRequest++; | |
| 2000 if (buildCounterSearchJobsRequest < 3) { | |
| 2001 unittest.expect(o.createdAfter, unittest.equals('foo')); | |
| 2002 unittest.expect(o.createdBefore, unittest.equals('foo')); | |
| 2003 unittest.expect(o.pageSize, unittest.equals(42)); | |
| 2004 unittest.expect(o.pageToken, unittest.equals('foo')); | |
| 2005 unittest.expect(o.projectNumber, unittest.equals('foo')); | |
| 2006 checkUnnamed3323(o.status); | |
| 2007 } | |
| 2008 buildCounterSearchJobsRequest--; | |
| 2009 } | |
| 2010 | |
| 2011 buildUnnamed3324() { | |
| 2012 var o = new core.List<api.Job>(); | |
| 2013 o.add(buildJob()); | |
| 2014 o.add(buildJob()); | |
| 2015 return o; | |
| 2016 } | |
| 2017 | |
| 2018 checkUnnamed3324(core.List<api.Job> o) { | |
| 2019 unittest.expect(o, unittest.hasLength(2)); | |
| 2020 checkJob(o[0]); | |
| 2021 checkJob(o[1]); | |
| 2022 } | |
| 2023 | |
| 2024 core.int buildCounterSearchJobsResponse = 0; | |
| 2025 buildSearchJobsResponse() { | |
| 2026 var o = new api.SearchJobsResponse(); | |
| 2027 buildCounterSearchJobsResponse++; | |
| 2028 if (buildCounterSearchJobsResponse < 3) { | |
| 2029 o.jobs = buildUnnamed3324(); | |
| 2030 o.nextPageToken = "foo"; | |
| 2031 } | |
| 2032 buildCounterSearchJobsResponse--; | |
| 2033 return o; | |
| 2034 } | |
| 2035 | |
| 2036 checkSearchJobsResponse(api.SearchJobsResponse o) { | |
| 2037 buildCounterSearchJobsResponse++; | |
| 2038 if (buildCounterSearchJobsResponse < 3) { | |
| 2039 checkUnnamed3324(o.jobs); | |
| 2040 unittest.expect(o.nextPageToken, unittest.equals('foo')); | |
| 2041 } | |
| 2042 buildCounterSearchJobsResponse--; | |
| 2043 } | |
| 2044 | |
| 2045 buildUnnamed3325() { | |
| 2046 var o = new core.List<core.String>(); | |
| 2047 o.add("foo"); | |
| 2048 o.add("foo"); | |
| 2049 return o; | |
| 2050 } | |
| 2051 | |
| 2052 checkUnnamed3325(core.List<core.String> o) { | |
| 2053 unittest.expect(o, unittest.hasLength(2)); | |
| 2054 unittest.expect(o[0], unittest.equals('foo')); | |
| 2055 unittest.expect(o[1], unittest.equals('foo')); | |
| 2056 } | |
| 2057 | |
| 2058 core.int buildCounterSearchReadGroupSetsRequest = 0; | |
| 2059 buildSearchReadGroupSetsRequest() { | |
| 2060 var o = new api.SearchReadGroupSetsRequest(); | |
| 2061 buildCounterSearchReadGroupSetsRequest++; | |
| 2062 if (buildCounterSearchReadGroupSetsRequest < 3) { | |
| 2063 o.datasetIds = buildUnnamed3325(); | |
| 2064 o.name = "foo"; | |
| 2065 o.pageSize = 42; | |
| 2066 o.pageToken = "foo"; | |
| 2067 } | |
| 2068 buildCounterSearchReadGroupSetsRequest--; | |
| 2069 return o; | |
| 2070 } | |
| 2071 | |
| 2072 checkSearchReadGroupSetsRequest(api.SearchReadGroupSetsRequest o) { | |
| 2073 buildCounterSearchReadGroupSetsRequest++; | |
| 2074 if (buildCounterSearchReadGroupSetsRequest < 3) { | |
| 2075 checkUnnamed3325(o.datasetIds); | |
| 2076 unittest.expect(o.name, unittest.equals('foo')); | |
| 2077 unittest.expect(o.pageSize, unittest.equals(42)); | |
| 2078 unittest.expect(o.pageToken, unittest.equals('foo')); | |
| 2079 } | |
| 2080 buildCounterSearchReadGroupSetsRequest--; | |
| 2081 } | |
| 2082 | |
| 2083 buildUnnamed3326() { | |
| 2084 var o = new core.List<api.ReadGroupSet>(); | |
| 2085 o.add(buildReadGroupSet()); | |
| 2086 o.add(buildReadGroupSet()); | |
| 2087 return o; | |
| 2088 } | |
| 2089 | |
| 2090 checkUnnamed3326(core.List<api.ReadGroupSet> o) { | |
| 2091 unittest.expect(o, unittest.hasLength(2)); | |
| 2092 checkReadGroupSet(o[0]); | |
| 2093 checkReadGroupSet(o[1]); | |
| 2094 } | |
| 2095 | |
| 2096 core.int buildCounterSearchReadGroupSetsResponse = 0; | |
| 2097 buildSearchReadGroupSetsResponse() { | |
| 2098 var o = new api.SearchReadGroupSetsResponse(); | |
| 2099 buildCounterSearchReadGroupSetsResponse++; | |
| 2100 if (buildCounterSearchReadGroupSetsResponse < 3) { | |
| 2101 o.nextPageToken = "foo"; | |
| 2102 o.readGroupSets = buildUnnamed3326(); | |
| 2103 } | |
| 2104 buildCounterSearchReadGroupSetsResponse--; | |
| 2105 return o; | |
| 2106 } | |
| 2107 | |
| 2108 checkSearchReadGroupSetsResponse(api.SearchReadGroupSetsResponse o) { | |
| 2109 buildCounterSearchReadGroupSetsResponse++; | |
| 2110 if (buildCounterSearchReadGroupSetsResponse < 3) { | |
| 2111 unittest.expect(o.nextPageToken, unittest.equals('foo')); | |
| 2112 checkUnnamed3326(o.readGroupSets); | |
| 2113 } | |
| 2114 buildCounterSearchReadGroupSetsResponse--; | |
| 2115 } | |
| 2116 | |
| 2117 buildUnnamed3327() { | |
| 2118 var o = new core.List<core.String>(); | |
| 2119 o.add("foo"); | |
| 2120 o.add("foo"); | |
| 2121 return o; | |
| 2122 } | |
| 2123 | |
| 2124 checkUnnamed3327(core.List<core.String> o) { | |
| 2125 unittest.expect(o, unittest.hasLength(2)); | |
| 2126 unittest.expect(o[0], unittest.equals('foo')); | |
| 2127 unittest.expect(o[1], unittest.equals('foo')); | |
| 2128 } | |
| 2129 | |
| 2130 buildUnnamed3328() { | |
| 2131 var o = new core.List<core.String>(); | |
| 2132 o.add("foo"); | |
| 2133 o.add("foo"); | |
| 2134 return o; | |
| 2135 } | |
| 2136 | |
| 2137 checkUnnamed3328(core.List<core.String> o) { | |
| 2138 unittest.expect(o, unittest.hasLength(2)); | |
| 2139 unittest.expect(o[0], unittest.equals('foo')); | |
| 2140 unittest.expect(o[1], unittest.equals('foo')); | |
| 2141 } | |
| 2142 | |
| 2143 core.int buildCounterSearchReadsRequest = 0; | |
| 2144 buildSearchReadsRequest() { | |
| 2145 var o = new api.SearchReadsRequest(); | |
| 2146 buildCounterSearchReadsRequest++; | |
| 2147 if (buildCounterSearchReadsRequest < 3) { | |
| 2148 o.end = "foo"; | |
| 2149 o.pageSize = 42; | |
| 2150 o.pageToken = "foo"; | |
| 2151 o.readGroupIds = buildUnnamed3327(); | |
| 2152 o.readGroupSetIds = buildUnnamed3328(); | |
| 2153 o.referenceName = "foo"; | |
| 2154 o.start = "foo"; | |
| 2155 } | |
| 2156 buildCounterSearchReadsRequest--; | |
| 2157 return o; | |
| 2158 } | |
| 2159 | |
| 2160 checkSearchReadsRequest(api.SearchReadsRequest o) { | |
| 2161 buildCounterSearchReadsRequest++; | |
| 2162 if (buildCounterSearchReadsRequest < 3) { | |
| 2163 unittest.expect(o.end, unittest.equals('foo')); | |
| 2164 unittest.expect(o.pageSize, unittest.equals(42)); | |
| 2165 unittest.expect(o.pageToken, unittest.equals('foo')); | |
| 2166 checkUnnamed3327(o.readGroupIds); | |
| 2167 checkUnnamed3328(o.readGroupSetIds); | |
| 2168 unittest.expect(o.referenceName, unittest.equals('foo')); | |
| 2169 unittest.expect(o.start, unittest.equals('foo')); | |
| 2170 } | |
| 2171 buildCounterSearchReadsRequest--; | |
| 2172 } | |
| 2173 | |
| 2174 buildUnnamed3329() { | |
| 2175 var o = new core.List<api.Read>(); | |
| 2176 o.add(buildRead()); | |
| 2177 o.add(buildRead()); | |
| 2178 return o; | |
| 2179 } | |
| 2180 | |
| 2181 checkUnnamed3329(core.List<api.Read> o) { | |
| 2182 unittest.expect(o, unittest.hasLength(2)); | |
| 2183 checkRead(o[0]); | |
| 2184 checkRead(o[1]); | |
| 2185 } | |
| 2186 | |
| 2187 core.int buildCounterSearchReadsResponse = 0; | |
| 2188 buildSearchReadsResponse() { | |
| 2189 var o = new api.SearchReadsResponse(); | |
| 2190 buildCounterSearchReadsResponse++; | |
| 2191 if (buildCounterSearchReadsResponse < 3) { | |
| 2192 o.alignments = buildUnnamed3329(); | |
| 2193 o.nextPageToken = "foo"; | |
| 2194 } | |
| 2195 buildCounterSearchReadsResponse--; | |
| 2196 return o; | |
| 2197 } | |
| 2198 | |
| 2199 checkSearchReadsResponse(api.SearchReadsResponse o) { | |
| 2200 buildCounterSearchReadsResponse++; | |
| 2201 if (buildCounterSearchReadsResponse < 3) { | |
| 2202 checkUnnamed3329(o.alignments); | |
| 2203 unittest.expect(o.nextPageToken, unittest.equals('foo')); | |
| 2204 } | |
| 2205 buildCounterSearchReadsResponse--; | |
| 2206 } | |
| 2207 | |
| 2208 buildUnnamed3330() { | |
| 2209 var o = new core.List<core.String>(); | |
| 2210 o.add("foo"); | |
| 2211 o.add("foo"); | |
| 2212 return o; | |
| 2213 } | |
| 2214 | |
| 2215 checkUnnamed3330(core.List<core.String> o) { | |
| 2216 unittest.expect(o, unittest.hasLength(2)); | |
| 2217 unittest.expect(o[0], unittest.equals('foo')); | |
| 2218 unittest.expect(o[1], unittest.equals('foo')); | |
| 2219 } | |
| 2220 | |
| 2221 buildUnnamed3331() { | |
| 2222 var o = new core.List<core.String>(); | |
| 2223 o.add("foo"); | |
| 2224 o.add("foo"); | |
| 2225 return o; | |
| 2226 } | |
| 2227 | |
| 2228 checkUnnamed3331(core.List<core.String> o) { | |
| 2229 unittest.expect(o, unittest.hasLength(2)); | |
| 2230 unittest.expect(o[0], unittest.equals('foo')); | |
| 2231 unittest.expect(o[1], unittest.equals('foo')); | |
| 2232 } | |
| 2233 | |
| 2234 core.int buildCounterSearchReferenceSetsRequest = 0; | |
| 2235 buildSearchReferenceSetsRequest() { | |
| 2236 var o = new api.SearchReferenceSetsRequest(); | |
| 2237 buildCounterSearchReferenceSetsRequest++; | |
| 2238 if (buildCounterSearchReferenceSetsRequest < 3) { | |
| 2239 o.accessions = buildUnnamed3330(); | |
| 2240 o.assemblyId = "foo"; | |
| 2241 o.md5checksums = buildUnnamed3331(); | |
| 2242 o.pageSize = 42; | |
| 2243 o.pageToken = "foo"; | |
| 2244 } | |
| 2245 buildCounterSearchReferenceSetsRequest--; | |
| 2246 return o; | |
| 2247 } | |
| 2248 | |
| 2249 checkSearchReferenceSetsRequest(api.SearchReferenceSetsRequest o) { | |
| 2250 buildCounterSearchReferenceSetsRequest++; | |
| 2251 if (buildCounterSearchReferenceSetsRequest < 3) { | |
| 2252 checkUnnamed3330(o.accessions); | |
| 2253 unittest.expect(o.assemblyId, unittest.equals('foo')); | |
| 2254 checkUnnamed3331(o.md5checksums); | |
| 2255 unittest.expect(o.pageSize, unittest.equals(42)); | |
| 2256 unittest.expect(o.pageToken, unittest.equals('foo')); | |
| 2257 } | |
| 2258 buildCounterSearchReferenceSetsRequest--; | |
| 2259 } | |
| 2260 | |
| 2261 buildUnnamed3332() { | |
| 2262 var o = new core.List<api.ReferenceSet>(); | |
| 2263 o.add(buildReferenceSet()); | |
| 2264 o.add(buildReferenceSet()); | |
| 2265 return o; | |
| 2266 } | |
| 2267 | |
| 2268 checkUnnamed3332(core.List<api.ReferenceSet> o) { | |
| 2269 unittest.expect(o, unittest.hasLength(2)); | |
| 2270 checkReferenceSet(o[0]); | |
| 2271 checkReferenceSet(o[1]); | |
| 2272 } | |
| 2273 | |
| 2274 core.int buildCounterSearchReferenceSetsResponse = 0; | |
| 2275 buildSearchReferenceSetsResponse() { | |
| 2276 var o = new api.SearchReferenceSetsResponse(); | |
| 2277 buildCounterSearchReferenceSetsResponse++; | |
| 2278 if (buildCounterSearchReferenceSetsResponse < 3) { | |
| 2279 o.nextPageToken = "foo"; | |
| 2280 o.referenceSets = buildUnnamed3332(); | |
| 2281 } | |
| 2282 buildCounterSearchReferenceSetsResponse--; | |
| 2283 return o; | |
| 2284 } | |
| 2285 | |
| 2286 checkSearchReferenceSetsResponse(api.SearchReferenceSetsResponse o) { | |
| 2287 buildCounterSearchReferenceSetsResponse++; | |
| 2288 if (buildCounterSearchReferenceSetsResponse < 3) { | |
| 2289 unittest.expect(o.nextPageToken, unittest.equals('foo')); | |
| 2290 checkUnnamed3332(o.referenceSets); | |
| 2291 } | |
| 2292 buildCounterSearchReferenceSetsResponse--; | |
| 2293 } | |
| 2294 | |
| 2295 buildUnnamed3333() { | |
| 2296 var o = new core.List<core.String>(); | |
| 2297 o.add("foo"); | |
| 2298 o.add("foo"); | |
| 2299 return o; | |
| 2300 } | |
| 2301 | |
| 2302 checkUnnamed3333(core.List<core.String> o) { | |
| 2303 unittest.expect(o, unittest.hasLength(2)); | |
| 2304 unittest.expect(o[0], unittest.equals('foo')); | |
| 2305 unittest.expect(o[1], unittest.equals('foo')); | |
| 2306 } | |
| 2307 | |
| 2308 buildUnnamed3334() { | |
| 2309 var o = new core.List<core.String>(); | |
| 2310 o.add("foo"); | |
| 2311 o.add("foo"); | |
| 2312 return o; | |
| 2313 } | |
| 2314 | |
| 2315 checkUnnamed3334(core.List<core.String> o) { | |
| 2316 unittest.expect(o, unittest.hasLength(2)); | |
| 2317 unittest.expect(o[0], unittest.equals('foo')); | |
| 2318 unittest.expect(o[1], unittest.equals('foo')); | |
| 2319 } | |
| 2320 | |
| 2321 core.int buildCounterSearchReferencesRequest = 0; | |
| 2322 buildSearchReferencesRequest() { | |
| 2323 var o = new api.SearchReferencesRequest(); | |
| 2324 buildCounterSearchReferencesRequest++; | |
| 2325 if (buildCounterSearchReferencesRequest < 3) { | |
| 2326 o.accessions = buildUnnamed3333(); | |
| 2327 o.md5checksums = buildUnnamed3334(); | |
| 2328 o.pageSize = 42; | |
| 2329 o.pageToken = "foo"; | |
| 2330 o.referenceSetId = "foo"; | |
| 2331 } | |
| 2332 buildCounterSearchReferencesRequest--; | |
| 2333 return o; | |
| 2334 } | |
| 2335 | |
| 2336 checkSearchReferencesRequest(api.SearchReferencesRequest o) { | |
| 2337 buildCounterSearchReferencesRequest++; | |
| 2338 if (buildCounterSearchReferencesRequest < 3) { | |
| 2339 checkUnnamed3333(o.accessions); | |
| 2340 checkUnnamed3334(o.md5checksums); | |
| 2341 unittest.expect(o.pageSize, unittest.equals(42)); | |
| 2342 unittest.expect(o.pageToken, unittest.equals('foo')); | |
| 2343 unittest.expect(o.referenceSetId, unittest.equals('foo')); | |
| 2344 } | |
| 2345 buildCounterSearchReferencesRequest--; | |
| 2346 } | |
| 2347 | |
| 2348 buildUnnamed3335() { | |
| 2349 var o = new core.List<api.Reference>(); | |
| 2350 o.add(buildReference()); | |
| 2351 o.add(buildReference()); | |
| 2352 return o; | |
| 2353 } | |
| 2354 | |
| 2355 checkUnnamed3335(core.List<api.Reference> o) { | |
| 2356 unittest.expect(o, unittest.hasLength(2)); | |
| 2357 checkReference(o[0]); | |
| 2358 checkReference(o[1]); | |
| 2359 } | |
| 2360 | |
| 2361 core.int buildCounterSearchReferencesResponse = 0; | |
| 2362 buildSearchReferencesResponse() { | |
| 2363 var o = new api.SearchReferencesResponse(); | |
| 2364 buildCounterSearchReferencesResponse++; | |
| 2365 if (buildCounterSearchReferencesResponse < 3) { | |
| 2366 o.nextPageToken = "foo"; | |
| 2367 o.references = buildUnnamed3335(); | |
| 2368 } | |
| 2369 buildCounterSearchReferencesResponse--; | |
| 2370 return o; | |
| 2371 } | |
| 2372 | |
| 2373 checkSearchReferencesResponse(api.SearchReferencesResponse o) { | |
| 2374 buildCounterSearchReferencesResponse++; | |
| 2375 if (buildCounterSearchReferencesResponse < 3) { | |
| 2376 unittest.expect(o.nextPageToken, unittest.equals('foo')); | |
| 2377 checkUnnamed3335(o.references); | |
| 2378 } | |
| 2379 buildCounterSearchReferencesResponse--; | |
| 2380 } | |
| 2381 | |
| 2382 buildUnnamed3336() { | |
| 2383 var o = new core.List<core.String>(); | |
| 2384 o.add("foo"); | |
| 2385 o.add("foo"); | |
| 2386 return o; | |
| 2387 } | |
| 2388 | |
| 2389 checkUnnamed3336(core.List<core.String> o) { | |
| 2390 unittest.expect(o, unittest.hasLength(2)); | |
| 2391 unittest.expect(o[0], unittest.equals('foo')); | |
| 2392 unittest.expect(o[1], unittest.equals('foo')); | |
| 2393 } | |
| 2394 | |
| 2395 core.int buildCounterSearchVariantSetsRequest = 0; | |
| 2396 buildSearchVariantSetsRequest() { | |
| 2397 var o = new api.SearchVariantSetsRequest(); | |
| 2398 buildCounterSearchVariantSetsRequest++; | |
| 2399 if (buildCounterSearchVariantSetsRequest < 3) { | |
| 2400 o.datasetIds = buildUnnamed3336(); | |
| 2401 o.pageSize = 42; | |
| 2402 o.pageToken = "foo"; | |
| 2403 } | |
| 2404 buildCounterSearchVariantSetsRequest--; | |
| 2405 return o; | |
| 2406 } | |
| 2407 | |
| 2408 checkSearchVariantSetsRequest(api.SearchVariantSetsRequest o) { | |
| 2409 buildCounterSearchVariantSetsRequest++; | |
| 2410 if (buildCounterSearchVariantSetsRequest < 3) { | |
| 2411 checkUnnamed3336(o.datasetIds); | |
| 2412 unittest.expect(o.pageSize, unittest.equals(42)); | |
| 2413 unittest.expect(o.pageToken, unittest.equals('foo')); | |
| 2414 } | |
| 2415 buildCounterSearchVariantSetsRequest--; | |
| 2416 } | |
| 2417 | |
| 2418 buildUnnamed3337() { | |
| 2419 var o = new core.List<api.VariantSet>(); | |
| 2420 o.add(buildVariantSet()); | |
| 2421 o.add(buildVariantSet()); | |
| 2422 return o; | |
| 2423 } | |
| 2424 | |
| 2425 checkUnnamed3337(core.List<api.VariantSet> o) { | |
| 2426 unittest.expect(o, unittest.hasLength(2)); | |
| 2427 checkVariantSet(o[0]); | |
| 2428 checkVariantSet(o[1]); | |
| 2429 } | |
| 2430 | |
| 2431 core.int buildCounterSearchVariantSetsResponse = 0; | |
| 2432 buildSearchVariantSetsResponse() { | |
| 2433 var o = new api.SearchVariantSetsResponse(); | |
| 2434 buildCounterSearchVariantSetsResponse++; | |
| 2435 if (buildCounterSearchVariantSetsResponse < 3) { | |
| 2436 o.nextPageToken = "foo"; | |
| 2437 o.variantSets = buildUnnamed3337(); | |
| 2438 } | |
| 2439 buildCounterSearchVariantSetsResponse--; | |
| 2440 return o; | |
| 2441 } | |
| 2442 | |
| 2443 checkSearchVariantSetsResponse(api.SearchVariantSetsResponse o) { | |
| 2444 buildCounterSearchVariantSetsResponse++; | |
| 2445 if (buildCounterSearchVariantSetsResponse < 3) { | |
| 2446 unittest.expect(o.nextPageToken, unittest.equals('foo')); | |
| 2447 checkUnnamed3337(o.variantSets); | |
| 2448 } | |
| 2449 buildCounterSearchVariantSetsResponse--; | |
| 2450 } | |
| 2451 | |
| 2452 buildUnnamed3338() { | |
| 2453 var o = new core.List<core.String>(); | |
| 2454 o.add("foo"); | |
| 2455 o.add("foo"); | |
| 2456 return o; | |
| 2457 } | |
| 2458 | |
| 2459 checkUnnamed3338(core.List<core.String> o) { | |
| 2460 unittest.expect(o, unittest.hasLength(2)); | |
| 2461 unittest.expect(o[0], unittest.equals('foo')); | |
| 2462 unittest.expect(o[1], unittest.equals('foo')); | |
| 2463 } | |
| 2464 | |
| 2465 buildUnnamed3339() { | |
| 2466 var o = new core.List<core.String>(); | |
| 2467 o.add("foo"); | |
| 2468 o.add("foo"); | |
| 2469 return o; | |
| 2470 } | |
| 2471 | |
| 2472 checkUnnamed3339(core.List<core.String> o) { | |
| 2473 unittest.expect(o, unittest.hasLength(2)); | |
| 2474 unittest.expect(o[0], unittest.equals('foo')); | |
| 2475 unittest.expect(o[1], unittest.equals('foo')); | |
| 2476 } | |
| 2477 | |
| 2478 core.int buildCounterSearchVariantsRequest = 0; | |
| 2479 buildSearchVariantsRequest() { | |
| 2480 var o = new api.SearchVariantsRequest(); | |
| 2481 buildCounterSearchVariantsRequest++; | |
| 2482 if (buildCounterSearchVariantsRequest < 3) { | |
| 2483 o.callSetIds = buildUnnamed3338(); | |
| 2484 o.end = "foo"; | |
| 2485 o.maxCalls = 42; | |
| 2486 o.pageSize = 42; | |
| 2487 o.pageToken = "foo"; | |
| 2488 o.referenceName = "foo"; | |
| 2489 o.start = "foo"; | |
| 2490 o.variantName = "foo"; | |
| 2491 o.variantSetIds = buildUnnamed3339(); | |
| 2492 } | |
| 2493 buildCounterSearchVariantsRequest--; | |
| 2494 return o; | |
| 2495 } | |
| 2496 | |
| 2497 checkSearchVariantsRequest(api.SearchVariantsRequest o) { | |
| 2498 buildCounterSearchVariantsRequest++; | |
| 2499 if (buildCounterSearchVariantsRequest < 3) { | |
| 2500 checkUnnamed3338(o.callSetIds); | |
| 2501 unittest.expect(o.end, unittest.equals('foo')); | |
| 2502 unittest.expect(o.maxCalls, unittest.equals(42)); | |
| 2503 unittest.expect(o.pageSize, unittest.equals(42)); | |
| 2504 unittest.expect(o.pageToken, unittest.equals('foo')); | |
| 2505 unittest.expect(o.referenceName, unittest.equals('foo')); | |
| 2506 unittest.expect(o.start, unittest.equals('foo')); | |
| 2507 unittest.expect(o.variantName, unittest.equals('foo')); | |
| 2508 checkUnnamed3339(o.variantSetIds); | |
| 2509 } | |
| 2510 buildCounterSearchVariantsRequest--; | |
| 2511 } | |
| 2512 | |
| 2513 buildUnnamed3340() { | |
| 2514 var o = new core.List<api.Variant>(); | |
| 2515 o.add(buildVariant()); | |
| 2516 o.add(buildVariant()); | |
| 2517 return o; | |
| 2518 } | |
| 2519 | |
| 2520 checkUnnamed3340(core.List<api.Variant> o) { | |
| 2521 unittest.expect(o, unittest.hasLength(2)); | |
| 2522 checkVariant(o[0]); | |
| 2523 checkVariant(o[1]); | |
| 2524 } | |
| 2525 | |
| 2526 core.int buildCounterSearchVariantsResponse = 0; | |
| 2527 buildSearchVariantsResponse() { | |
| 2528 var o = new api.SearchVariantsResponse(); | |
| 2529 buildCounterSearchVariantsResponse++; | |
| 2530 if (buildCounterSearchVariantsResponse < 3) { | |
| 2531 o.nextPageToken = "foo"; | |
| 2532 o.variants = buildUnnamed3340(); | |
| 2533 } | |
| 2534 buildCounterSearchVariantsResponse--; | |
| 2535 return o; | |
| 2536 } | |
| 2537 | |
| 2538 checkSearchVariantsResponse(api.SearchVariantsResponse o) { | |
| 2539 buildCounterSearchVariantsResponse++; | |
| 2540 if (buildCounterSearchVariantsResponse < 3) { | |
| 2541 unittest.expect(o.nextPageToken, unittest.equals('foo')); | |
| 2542 checkUnnamed3340(o.variants); | |
| 2543 } | |
| 2544 buildCounterSearchVariantsResponse--; | |
| 2545 } | |
| 2546 | |
| 2547 buildUnnamed3341() { | |
| 2548 var o = new core.List<api.TranscriptExon>(); | |
| 2549 o.add(buildTranscriptExon()); | |
| 2550 o.add(buildTranscriptExon()); | |
| 2551 return o; | |
| 2552 } | |
| 2553 | |
| 2554 checkUnnamed3341(core.List<api.TranscriptExon> o) { | |
| 2555 unittest.expect(o, unittest.hasLength(2)); | |
| 2556 checkTranscriptExon(o[0]); | |
| 2557 checkTranscriptExon(o[1]); | |
| 2558 } | |
| 2559 | |
| 2560 core.int buildCounterTranscript = 0; | |
| 2561 buildTranscript() { | |
| 2562 var o = new api.Transcript(); | |
| 2563 buildCounterTranscript++; | |
| 2564 if (buildCounterTranscript < 3) { | |
| 2565 o.codingSequence = buildTranscriptCodingSequence(); | |
| 2566 o.exons = buildUnnamed3341(); | |
| 2567 o.geneId = "foo"; | |
| 2568 } | |
| 2569 buildCounterTranscript--; | |
| 2570 return o; | |
| 2571 } | |
| 2572 | |
| 2573 checkTranscript(api.Transcript o) { | |
| 2574 buildCounterTranscript++; | |
| 2575 if (buildCounterTranscript < 3) { | |
| 2576 checkTranscriptCodingSequence(o.codingSequence); | |
| 2577 checkUnnamed3341(o.exons); | |
| 2578 unittest.expect(o.geneId, unittest.equals('foo')); | |
| 2579 } | |
| 2580 buildCounterTranscript--; | |
| 2581 } | |
| 2582 | |
| 2583 core.int buildCounterTranscriptCodingSequence = 0; | |
| 2584 buildTranscriptCodingSequence() { | |
| 2585 var o = new api.TranscriptCodingSequence(); | |
| 2586 buildCounterTranscriptCodingSequence++; | |
| 2587 if (buildCounterTranscriptCodingSequence < 3) { | |
| 2588 o.end = "foo"; | |
| 2589 o.start = "foo"; | |
| 2590 } | |
| 2591 buildCounterTranscriptCodingSequence--; | |
| 2592 return o; | |
| 2593 } | |
| 2594 | |
| 2595 checkTranscriptCodingSequence(api.TranscriptCodingSequence o) { | |
| 2596 buildCounterTranscriptCodingSequence++; | |
| 2597 if (buildCounterTranscriptCodingSequence < 3) { | |
| 2598 unittest.expect(o.end, unittest.equals('foo')); | |
| 2599 unittest.expect(o.start, unittest.equals('foo')); | |
| 2600 } | |
| 2601 buildCounterTranscriptCodingSequence--; | |
| 2602 } | |
| 2603 | |
| 2604 core.int buildCounterTranscriptExon = 0; | |
| 2605 buildTranscriptExon() { | |
| 2606 var o = new api.TranscriptExon(); | |
| 2607 buildCounterTranscriptExon++; | |
| 2608 if (buildCounterTranscriptExon < 3) { | |
| 2609 o.end = "foo"; | |
| 2610 o.frame = buildInt32Value(); | |
| 2611 o.start = "foo"; | |
| 2612 } | |
| 2613 buildCounterTranscriptExon--; | |
| 2614 return o; | |
| 2615 } | |
| 2616 | |
| 2617 checkTranscriptExon(api.TranscriptExon o) { | |
| 2618 buildCounterTranscriptExon++; | |
| 2619 if (buildCounterTranscriptExon < 3) { | |
| 2620 unittest.expect(o.end, unittest.equals('foo')); | |
| 2621 checkInt32Value(o.frame); | |
| 2622 unittest.expect(o.start, unittest.equals('foo')); | |
| 2623 } | |
| 2624 buildCounterTranscriptExon--; | |
| 2625 } | |
| 2626 | |
| 2627 buildUnnamed3342() { | |
| 2628 var o = new core.List<core.String>(); | |
| 2629 o.add("foo"); | |
| 2630 o.add("foo"); | |
| 2631 return o; | |
| 2632 } | |
| 2633 | |
| 2634 checkUnnamed3342(core.List<core.String> o) { | |
| 2635 unittest.expect(o, unittest.hasLength(2)); | |
| 2636 unittest.expect(o[0], unittest.equals('foo')); | |
| 2637 unittest.expect(o[1], unittest.equals('foo')); | |
| 2638 } | |
| 2639 | |
| 2640 buildUnnamed3343() { | |
| 2641 var o = new core.List<api.Call>(); | |
| 2642 o.add(buildCall()); | |
| 2643 o.add(buildCall()); | |
| 2644 return o; | |
| 2645 } | |
| 2646 | |
| 2647 checkUnnamed3343(core.List<api.Call> o) { | |
| 2648 unittest.expect(o, unittest.hasLength(2)); | |
| 2649 checkCall(o[0]); | |
| 2650 checkCall(o[1]); | |
| 2651 } | |
| 2652 | |
| 2653 buildUnnamed3344() { | |
| 2654 var o = new core.List<core.String>(); | |
| 2655 o.add("foo"); | |
| 2656 o.add("foo"); | |
| 2657 return o; | |
| 2658 } | |
| 2659 | |
| 2660 checkUnnamed3344(core.List<core.String> o) { | |
| 2661 unittest.expect(o, unittest.hasLength(2)); | |
| 2662 unittest.expect(o[0], unittest.equals('foo')); | |
| 2663 unittest.expect(o[1], unittest.equals('foo')); | |
| 2664 } | |
| 2665 | |
| 2666 buildUnnamed3345() { | |
| 2667 var o = new core.List<core.String>(); | |
| 2668 o.add("foo"); | |
| 2669 o.add("foo"); | |
| 2670 return o; | |
| 2671 } | |
| 2672 | |
| 2673 checkUnnamed3345(core.List<core.String> o) { | |
| 2674 unittest.expect(o, unittest.hasLength(2)); | |
| 2675 unittest.expect(o[0], unittest.equals('foo')); | |
| 2676 unittest.expect(o[1], unittest.equals('foo')); | |
| 2677 } | |
| 2678 | |
| 2679 buildUnnamed3346() { | |
| 2680 var o = new core.Map<core.String, core.List<core.String>>(); | |
| 2681 o["x"] = buildUnnamed3345(); | |
| 2682 o["y"] = buildUnnamed3345(); | |
| 2683 return o; | |
| 2684 } | |
| 2685 | |
| 2686 checkUnnamed3346(core.Map<core.String, core.List<core.String>> o) { | |
| 2687 unittest.expect(o, unittest.hasLength(2)); | |
| 2688 checkUnnamed3345(o["x"]); | |
| 2689 checkUnnamed3345(o["y"]); | |
| 2690 } | |
| 2691 | |
| 2692 buildUnnamed3347() { | |
| 2693 var o = new core.List<core.String>(); | |
| 2694 o.add("foo"); | |
| 2695 o.add("foo"); | |
| 2696 return o; | |
| 2697 } | |
| 2698 | |
| 2699 checkUnnamed3347(core.List<core.String> o) { | |
| 2700 unittest.expect(o, unittest.hasLength(2)); | |
| 2701 unittest.expect(o[0], unittest.equals('foo')); | |
| 2702 unittest.expect(o[1], unittest.equals('foo')); | |
| 2703 } | |
| 2704 | |
| 2705 core.int buildCounterVariant = 0; | |
| 2706 buildVariant() { | |
| 2707 var o = new api.Variant(); | |
| 2708 buildCounterVariant++; | |
| 2709 if (buildCounterVariant < 3) { | |
| 2710 o.alternateBases = buildUnnamed3342(); | |
| 2711 o.calls = buildUnnamed3343(); | |
| 2712 o.created = "foo"; | |
| 2713 o.end = "foo"; | |
| 2714 o.filter = buildUnnamed3344(); | |
| 2715 o.id = "foo"; | |
| 2716 o.info = buildUnnamed3346(); | |
| 2717 o.names = buildUnnamed3347(); | |
| 2718 o.quality = 42.0; | |
| 2719 o.referenceBases = "foo"; | |
| 2720 o.referenceName = "foo"; | |
| 2721 o.start = "foo"; | |
| 2722 o.variantSetId = "foo"; | |
| 2723 } | |
| 2724 buildCounterVariant--; | |
| 2725 return o; | |
| 2726 } | |
| 2727 | |
| 2728 checkVariant(api.Variant o) { | |
| 2729 buildCounterVariant++; | |
| 2730 if (buildCounterVariant < 3) { | |
| 2731 checkUnnamed3342(o.alternateBases); | |
| 2732 checkUnnamed3343(o.calls); | |
| 2733 unittest.expect(o.created, unittest.equals('foo')); | |
| 2734 unittest.expect(o.end, unittest.equals('foo')); | |
| 2735 checkUnnamed3344(o.filter); | |
| 2736 unittest.expect(o.id, unittest.equals('foo')); | |
| 2737 checkUnnamed3346(o.info); | |
| 2738 checkUnnamed3347(o.names); | |
| 2739 unittest.expect(o.quality, unittest.equals(42.0)); | |
| 2740 unittest.expect(o.referenceBases, unittest.equals('foo')); | |
| 2741 unittest.expect(o.referenceName, unittest.equals('foo')); | |
| 2742 unittest.expect(o.start, unittest.equals('foo')); | |
| 2743 unittest.expect(o.variantSetId, unittest.equals('foo')); | |
| 2744 } | |
| 2745 buildCounterVariant--; | |
| 2746 } | |
| 2747 | |
| 2748 buildUnnamed3348() { | |
| 2749 var o = new core.List<api.VariantAnnotationCondition>(); | |
| 2750 o.add(buildVariantAnnotationCondition()); | |
| 2751 o.add(buildVariantAnnotationCondition()); | |
| 2752 return o; | |
| 2753 } | |
| 2754 | |
| 2755 checkUnnamed3348(core.List<api.VariantAnnotationCondition> o) { | |
| 2756 unittest.expect(o, unittest.hasLength(2)); | |
| 2757 checkVariantAnnotationCondition(o[0]); | |
| 2758 checkVariantAnnotationCondition(o[1]); | |
| 2759 } | |
| 2760 | |
| 2761 buildUnnamed3349() { | |
| 2762 var o = new core.List<core.String>(); | |
| 2763 o.add("foo"); | |
| 2764 o.add("foo"); | |
| 2765 return o; | |
| 2766 } | |
| 2767 | |
| 2768 checkUnnamed3349(core.List<core.String> o) { | |
| 2769 unittest.expect(o, unittest.hasLength(2)); | |
| 2770 unittest.expect(o[0], unittest.equals('foo')); | |
| 2771 unittest.expect(o[1], unittest.equals('foo')); | |
| 2772 } | |
| 2773 | |
| 2774 core.int buildCounterVariantAnnotation = 0; | |
| 2775 buildVariantAnnotation() { | |
| 2776 var o = new api.VariantAnnotation(); | |
| 2777 buildCounterVariantAnnotation++; | |
| 2778 if (buildCounterVariantAnnotation < 3) { | |
| 2779 o.alternateBases = "foo"; | |
| 2780 o.clinicalSignificance = "foo"; | |
| 2781 o.conditions = buildUnnamed3348(); | |
| 2782 o.effect = "foo"; | |
| 2783 o.geneId = "foo"; | |
| 2784 o.transcriptIds = buildUnnamed3349(); | |
| 2785 o.type = "foo"; | |
| 2786 } | |
| 2787 buildCounterVariantAnnotation--; | |
| 2788 return o; | |
| 2789 } | |
| 2790 | |
| 2791 checkVariantAnnotation(api.VariantAnnotation o) { | |
| 2792 buildCounterVariantAnnotation++; | |
| 2793 if (buildCounterVariantAnnotation < 3) { | |
| 2794 unittest.expect(o.alternateBases, unittest.equals('foo')); | |
| 2795 unittest.expect(o.clinicalSignificance, unittest.equals('foo')); | |
| 2796 checkUnnamed3348(o.conditions); | |
| 2797 unittest.expect(o.effect, unittest.equals('foo')); | |
| 2798 unittest.expect(o.geneId, unittest.equals('foo')); | |
| 2799 checkUnnamed3349(o.transcriptIds); | |
| 2800 unittest.expect(o.type, unittest.equals('foo')); | |
| 2801 } | |
| 2802 buildCounterVariantAnnotation--; | |
| 2803 } | |
| 2804 | |
| 2805 buildUnnamed3350() { | |
| 2806 var o = new core.List<api.ExternalId>(); | |
| 2807 o.add(buildExternalId()); | |
| 2808 o.add(buildExternalId()); | |
| 2809 return o; | |
| 2810 } | |
| 2811 | |
| 2812 checkUnnamed3350(core.List<api.ExternalId> o) { | |
| 2813 unittest.expect(o, unittest.hasLength(2)); | |
| 2814 checkExternalId(o[0]); | |
| 2815 checkExternalId(o[1]); | |
| 2816 } | |
| 2817 | |
| 2818 buildUnnamed3351() { | |
| 2819 var o = new core.List<core.String>(); | |
| 2820 o.add("foo"); | |
| 2821 o.add("foo"); | |
| 2822 return o; | |
| 2823 } | |
| 2824 | |
| 2825 checkUnnamed3351(core.List<core.String> o) { | |
| 2826 unittest.expect(o, unittest.hasLength(2)); | |
| 2827 unittest.expect(o[0], unittest.equals('foo')); | |
| 2828 unittest.expect(o[1], unittest.equals('foo')); | |
| 2829 } | |
| 2830 | |
| 2831 core.int buildCounterVariantAnnotationCondition = 0; | |
| 2832 buildVariantAnnotationCondition() { | |
| 2833 var o = new api.VariantAnnotationCondition(); | |
| 2834 buildCounterVariantAnnotationCondition++; | |
| 2835 if (buildCounterVariantAnnotationCondition < 3) { | |
| 2836 o.conceptId = "foo"; | |
| 2837 o.externalIds = buildUnnamed3350(); | |
| 2838 o.names = buildUnnamed3351(); | |
| 2839 o.omimId = "foo"; | |
| 2840 } | |
| 2841 buildCounterVariantAnnotationCondition--; | |
| 2842 return o; | |
| 2843 } | |
| 2844 | |
| 2845 checkVariantAnnotationCondition(api.VariantAnnotationCondition o) { | |
| 2846 buildCounterVariantAnnotationCondition++; | |
| 2847 if (buildCounterVariantAnnotationCondition < 3) { | |
| 2848 unittest.expect(o.conceptId, unittest.equals('foo')); | |
| 2849 checkUnnamed3350(o.externalIds); | |
| 2850 checkUnnamed3351(o.names); | |
| 2851 unittest.expect(o.omimId, unittest.equals('foo')); | |
| 2852 } | |
| 2853 buildCounterVariantAnnotationCondition--; | |
| 2854 } | |
| 2855 | |
| 2856 buildUnnamed3352() { | |
| 2857 var o = new core.List<api.Metadata>(); | |
| 2858 o.add(buildMetadata()); | |
| 2859 o.add(buildMetadata()); | |
| 2860 return o; | |
| 2861 } | |
| 2862 | |
| 2863 checkUnnamed3352(core.List<api.Metadata> o) { | |
| 2864 unittest.expect(o, unittest.hasLength(2)); | |
| 2865 checkMetadata(o[0]); | |
| 2866 checkMetadata(o[1]); | |
| 2867 } | |
| 2868 | |
| 2869 buildUnnamed3353() { | |
| 2870 var o = new core.List<api.ReferenceBound>(); | |
| 2871 o.add(buildReferenceBound()); | |
| 2872 o.add(buildReferenceBound()); | |
| 2873 return o; | |
| 2874 } | |
| 2875 | |
| 2876 checkUnnamed3353(core.List<api.ReferenceBound> o) { | |
| 2877 unittest.expect(o, unittest.hasLength(2)); | |
| 2878 checkReferenceBound(o[0]); | |
| 2879 checkReferenceBound(o[1]); | |
| 2880 } | |
| 2881 | |
| 2882 core.int buildCounterVariantSet = 0; | |
| 2883 buildVariantSet() { | |
| 2884 var o = new api.VariantSet(); | |
| 2885 buildCounterVariantSet++; | |
| 2886 if (buildCounterVariantSet < 3) { | |
| 2887 o.datasetId = "foo"; | |
| 2888 o.description = "foo"; | |
| 2889 o.id = "foo"; | |
| 2890 o.metadata = buildUnnamed3352(); | |
| 2891 o.name = "foo"; | |
| 2892 o.referenceBounds = buildUnnamed3353(); | |
| 2893 o.referenceSetId = "foo"; | |
| 2894 } | |
| 2895 buildCounterVariantSet--; | |
| 2896 return o; | |
| 2897 } | |
| 2898 | |
| 2899 checkVariantSet(api.VariantSet o) { | |
| 2900 buildCounterVariantSet++; | |
| 2901 if (buildCounterVariantSet < 3) { | |
| 2902 unittest.expect(o.datasetId, unittest.equals('foo')); | |
| 2903 unittest.expect(o.description, unittest.equals('foo')); | |
| 2904 unittest.expect(o.id, unittest.equals('foo')); | |
| 2905 checkUnnamed3352(o.metadata); | |
| 2906 unittest.expect(o.name, unittest.equals('foo')); | |
| 2907 checkUnnamed3353(o.referenceBounds); | |
| 2908 unittest.expect(o.referenceSetId, unittest.equals('foo')); | |
| 2909 } | |
| 2910 buildCounterVariantSet--; | |
| 2911 } | |
| 2912 | |
| 2913 | |
| 2914 main() { | |
| 2915 unittest.group("obj-schema-Annotation", () { | |
| 2916 unittest.test("to-json--from-json", () { | |
| 2917 var o = buildAnnotation(); | |
| 2918 var od = new api.Annotation.fromJson(o.toJson()); | |
| 2919 checkAnnotation(od); | |
| 2920 }); | |
| 2921 }); | |
| 2922 | |
| 2923 | |
| 2924 unittest.group("obj-schema-AnnotationSet", () { | |
| 2925 unittest.test("to-json--from-json", () { | |
| 2926 var o = buildAnnotationSet(); | |
| 2927 var od = new api.AnnotationSet.fromJson(o.toJson()); | |
| 2928 checkAnnotationSet(od); | |
| 2929 }); | |
| 2930 }); | |
| 2931 | |
| 2932 | |
| 2933 unittest.group("obj-schema-BatchAnnotationsResponse", () { | |
| 2934 unittest.test("to-json--from-json", () { | |
| 2935 var o = buildBatchAnnotationsResponse(); | |
| 2936 var od = new api.BatchAnnotationsResponse.fromJson(o.toJson()); | |
| 2937 checkBatchAnnotationsResponse(od); | |
| 2938 }); | |
| 2939 }); | |
| 2940 | |
| 2941 | |
| 2942 unittest.group("obj-schema-BatchAnnotationsResponseEntry", () { | |
| 2943 unittest.test("to-json--from-json", () { | |
| 2944 var o = buildBatchAnnotationsResponseEntry(); | |
| 2945 var od = new api.BatchAnnotationsResponseEntry.fromJson(o.toJson()); | |
| 2946 checkBatchAnnotationsResponseEntry(od); | |
| 2947 }); | |
| 2948 }); | |
| 2949 | |
| 2950 | |
| 2951 unittest.group("obj-schema-BatchAnnotationsResponseEntryStatus", () { | |
| 2952 unittest.test("to-json--from-json", () { | |
| 2953 var o = buildBatchAnnotationsResponseEntryStatus(); | |
| 2954 var od = new api.BatchAnnotationsResponseEntryStatus.fromJson(o.toJson()); | |
| 2955 checkBatchAnnotationsResponseEntryStatus(od); | |
| 2956 }); | |
| 2957 }); | |
| 2958 | |
| 2959 | |
| 2960 unittest.group("obj-schema-BatchCreateAnnotationsRequest", () { | |
| 2961 unittest.test("to-json--from-json", () { | |
| 2962 var o = buildBatchCreateAnnotationsRequest(); | |
| 2963 var od = new api.BatchCreateAnnotationsRequest.fromJson(o.toJson()); | |
| 2964 checkBatchCreateAnnotationsRequest(od); | |
| 2965 }); | |
| 2966 }); | |
| 2967 | |
| 2968 | |
| 2969 unittest.group("obj-schema-Call", () { | |
| 2970 unittest.test("to-json--from-json", () { | |
| 2971 var o = buildCall(); | |
| 2972 var od = new api.Call.fromJson(o.toJson()); | |
| 2973 checkCall(od); | |
| 2974 }); | |
| 2975 }); | |
| 2976 | |
| 2977 | |
| 2978 unittest.group("obj-schema-CallSet", () { | |
| 2979 unittest.test("to-json--from-json", () { | |
| 2980 var o = buildCallSet(); | |
| 2981 var od = new api.CallSet.fromJson(o.toJson()); | |
| 2982 checkCallSet(od); | |
| 2983 }); | |
| 2984 }); | |
| 2985 | |
| 2986 | |
| 2987 unittest.group("obj-schema-CigarUnit", () { | |
| 2988 unittest.test("to-json--from-json", () { | |
| 2989 var o = buildCigarUnit(); | |
| 2990 var od = new api.CigarUnit.fromJson(o.toJson()); | |
| 2991 checkCigarUnit(od); | |
| 2992 }); | |
| 2993 }); | |
| 2994 | |
| 2995 | |
| 2996 unittest.group("obj-schema-CoverageBucket", () { | |
| 2997 unittest.test("to-json--from-json", () { | |
| 2998 var o = buildCoverageBucket(); | |
| 2999 var od = new api.CoverageBucket.fromJson(o.toJson()); | |
| 3000 checkCoverageBucket(od); | |
| 3001 }); | |
| 3002 }); | |
| 3003 | |
| 3004 | |
| 3005 unittest.group("obj-schema-Dataset", () { | |
| 3006 unittest.test("to-json--from-json", () { | |
| 3007 var o = buildDataset(); | |
| 3008 var od = new api.Dataset.fromJson(o.toJson()); | |
| 3009 checkDataset(od); | |
| 3010 }); | |
| 3011 }); | |
| 3012 | |
| 3013 | |
| 3014 unittest.group("obj-schema-ExperimentalCreateJobRequest", () { | |
| 3015 unittest.test("to-json--from-json", () { | |
| 3016 var o = buildExperimentalCreateJobRequest(); | |
| 3017 var od = new api.ExperimentalCreateJobRequest.fromJson(o.toJson()); | |
| 3018 checkExperimentalCreateJobRequest(od); | |
| 3019 }); | |
| 3020 }); | |
| 3021 | |
| 3022 | |
| 3023 unittest.group("obj-schema-ExperimentalCreateJobResponse", () { | |
| 3024 unittest.test("to-json--from-json", () { | |
| 3025 var o = buildExperimentalCreateJobResponse(); | |
| 3026 var od = new api.ExperimentalCreateJobResponse.fromJson(o.toJson()); | |
| 3027 checkExperimentalCreateJobResponse(od); | |
| 3028 }); | |
| 3029 }); | |
| 3030 | |
| 3031 | |
| 3032 unittest.group("obj-schema-ExportReadGroupSetsRequest", () { | |
| 3033 unittest.test("to-json--from-json", () { | |
| 3034 var o = buildExportReadGroupSetsRequest(); | |
| 3035 var od = new api.ExportReadGroupSetsRequest.fromJson(o.toJson()); | |
| 3036 checkExportReadGroupSetsRequest(od); | |
| 3037 }); | |
| 3038 }); | |
| 3039 | |
| 3040 | |
| 3041 unittest.group("obj-schema-ExportReadGroupSetsResponse", () { | |
| 3042 unittest.test("to-json--from-json", () { | |
| 3043 var o = buildExportReadGroupSetsResponse(); | |
| 3044 var od = new api.ExportReadGroupSetsResponse.fromJson(o.toJson()); | |
| 3045 checkExportReadGroupSetsResponse(od); | |
| 3046 }); | |
| 3047 }); | |
| 3048 | |
| 3049 | |
| 3050 unittest.group("obj-schema-ExportVariantSetRequest", () { | |
| 3051 unittest.test("to-json--from-json", () { | |
| 3052 var o = buildExportVariantSetRequest(); | |
| 3053 var od = new api.ExportVariantSetRequest.fromJson(o.toJson()); | |
| 3054 checkExportVariantSetRequest(od); | |
| 3055 }); | |
| 3056 }); | |
| 3057 | |
| 3058 | |
| 3059 unittest.group("obj-schema-ExportVariantSetResponse", () { | |
| 3060 unittest.test("to-json--from-json", () { | |
| 3061 var o = buildExportVariantSetResponse(); | |
| 3062 var od = new api.ExportVariantSetResponse.fromJson(o.toJson()); | |
| 3063 checkExportVariantSetResponse(od); | |
| 3064 }); | |
| 3065 }); | |
| 3066 | |
| 3067 | |
| 3068 unittest.group("obj-schema-ExternalId", () { | |
| 3069 unittest.test("to-json--from-json", () { | |
| 3070 var o = buildExternalId(); | |
| 3071 var od = new api.ExternalId.fromJson(o.toJson()); | |
| 3072 checkExternalId(od); | |
| 3073 }); | |
| 3074 }); | |
| 3075 | |
| 3076 | |
| 3077 unittest.group("obj-schema-ImportReadGroupSetsRequest", () { | |
| 3078 unittest.test("to-json--from-json", () { | |
| 3079 var o = buildImportReadGroupSetsRequest(); | |
| 3080 var od = new api.ImportReadGroupSetsRequest.fromJson(o.toJson()); | |
| 3081 checkImportReadGroupSetsRequest(od); | |
| 3082 }); | |
| 3083 }); | |
| 3084 | |
| 3085 | |
| 3086 unittest.group("obj-schema-ImportReadGroupSetsResponse", () { | |
| 3087 unittest.test("to-json--from-json", () { | |
| 3088 var o = buildImportReadGroupSetsResponse(); | |
| 3089 var od = new api.ImportReadGroupSetsResponse.fromJson(o.toJson()); | |
| 3090 checkImportReadGroupSetsResponse(od); | |
| 3091 }); | |
| 3092 }); | |
| 3093 | |
| 3094 | |
| 3095 unittest.group("obj-schema-ImportVariantsRequest", () { | |
| 3096 unittest.test("to-json--from-json", () { | |
| 3097 var o = buildImportVariantsRequest(); | |
| 3098 var od = new api.ImportVariantsRequest.fromJson(o.toJson()); | |
| 3099 checkImportVariantsRequest(od); | |
| 3100 }); | |
| 3101 }); | |
| 3102 | |
| 3103 | |
| 3104 unittest.group("obj-schema-ImportVariantsResponse", () { | |
| 3105 unittest.test("to-json--from-json", () { | |
| 3106 var o = buildImportVariantsResponse(); | |
| 3107 var od = new api.ImportVariantsResponse.fromJson(o.toJson()); | |
| 3108 checkImportVariantsResponse(od); | |
| 3109 }); | |
| 3110 }); | |
| 3111 | |
| 3112 | |
| 3113 unittest.group("obj-schema-Int32Value", () { | |
| 3114 unittest.test("to-json--from-json", () { | |
| 3115 var o = buildInt32Value(); | |
| 3116 var od = new api.Int32Value.fromJson(o.toJson()); | |
| 3117 checkInt32Value(od); | |
| 3118 }); | |
| 3119 }); | |
| 3120 | |
| 3121 | |
| 3122 unittest.group("obj-schema-Job", () { | |
| 3123 unittest.test("to-json--from-json", () { | |
| 3124 var o = buildJob(); | |
| 3125 var od = new api.Job.fromJson(o.toJson()); | |
| 3126 checkJob(od); | |
| 3127 }); | |
| 3128 }); | |
| 3129 | |
| 3130 | |
| 3131 unittest.group("obj-schema-JobRequest", () { | |
| 3132 unittest.test("to-json--from-json", () { | |
| 3133 var o = buildJobRequest(); | |
| 3134 var od = new api.JobRequest.fromJson(o.toJson()); | |
| 3135 checkJobRequest(od); | |
| 3136 }); | |
| 3137 }); | |
| 3138 | |
| 3139 | |
| 3140 unittest.group("obj-schema-KeyValue", () { | |
| 3141 unittest.test("to-json--from-json", () { | |
| 3142 var o = buildKeyValue(); | |
| 3143 var od = new api.KeyValue.fromJson(o.toJson()); | |
| 3144 checkKeyValue(od); | |
| 3145 }); | |
| 3146 }); | |
| 3147 | |
| 3148 | |
| 3149 unittest.group("obj-schema-LinearAlignment", () { | |
| 3150 unittest.test("to-json--from-json", () { | |
| 3151 var o = buildLinearAlignment(); | |
| 3152 var od = new api.LinearAlignment.fromJson(o.toJson()); | |
| 3153 checkLinearAlignment(od); | |
| 3154 }); | |
| 3155 }); | |
| 3156 | |
| 3157 | |
| 3158 unittest.group("obj-schema-ListBasesResponse", () { | |
| 3159 unittest.test("to-json--from-json", () { | |
| 3160 var o = buildListBasesResponse(); | |
| 3161 var od = new api.ListBasesResponse.fromJson(o.toJson()); | |
| 3162 checkListBasesResponse(od); | |
| 3163 }); | |
| 3164 }); | |
| 3165 | |
| 3166 | |
| 3167 unittest.group("obj-schema-ListCoverageBucketsResponse", () { | |
| 3168 unittest.test("to-json--from-json", () { | |
| 3169 var o = buildListCoverageBucketsResponse(); | |
| 3170 var od = new api.ListCoverageBucketsResponse.fromJson(o.toJson()); | |
| 3171 checkListCoverageBucketsResponse(od); | |
| 3172 }); | |
| 3173 }); | |
| 3174 | |
| 3175 | |
| 3176 unittest.group("obj-schema-ListDatasetsResponse", () { | |
| 3177 unittest.test("to-json--from-json", () { | |
| 3178 var o = buildListDatasetsResponse(); | |
| 3179 var od = new api.ListDatasetsResponse.fromJson(o.toJson()); | |
| 3180 checkListDatasetsResponse(od); | |
| 3181 }); | |
| 3182 }); | |
| 3183 | |
| 3184 | |
| 3185 unittest.group("obj-schema-MergeVariantsRequest", () { | |
| 3186 unittest.test("to-json--from-json", () { | |
| 3187 var o = buildMergeVariantsRequest(); | |
| 3188 var od = new api.MergeVariantsRequest.fromJson(o.toJson()); | |
| 3189 checkMergeVariantsRequest(od); | |
| 3190 }); | |
| 3191 }); | |
| 3192 | |
| 3193 | |
| 3194 unittest.group("obj-schema-Metadata", () { | |
| 3195 unittest.test("to-json--from-json", () { | |
| 3196 var o = buildMetadata(); | |
| 3197 var od = new api.Metadata.fromJson(o.toJson()); | |
| 3198 checkMetadata(od); | |
| 3199 }); | |
| 3200 }); | |
| 3201 | |
| 3202 | |
| 3203 unittest.group("obj-schema-Position", () { | |
| 3204 unittest.test("to-json--from-json", () { | |
| 3205 var o = buildPosition(); | |
| 3206 var od = new api.Position.fromJson(o.toJson()); | |
| 3207 checkPosition(od); | |
| 3208 }); | |
| 3209 }); | |
| 3210 | |
| 3211 | |
| 3212 unittest.group("obj-schema-QueryRange", () { | |
| 3213 unittest.test("to-json--from-json", () { | |
| 3214 var o = buildQueryRange(); | |
| 3215 var od = new api.QueryRange.fromJson(o.toJson()); | |
| 3216 checkQueryRange(od); | |
| 3217 }); | |
| 3218 }); | |
| 3219 | |
| 3220 | |
| 3221 unittest.group("obj-schema-Range", () { | |
| 3222 unittest.test("to-json--from-json", () { | |
| 3223 var o = buildRange(); | |
| 3224 var od = new api.Range.fromJson(o.toJson()); | |
| 3225 checkRange(od); | |
| 3226 }); | |
| 3227 }); | |
| 3228 | |
| 3229 | |
| 3230 unittest.group("obj-schema-RangePosition", () { | |
| 3231 unittest.test("to-json--from-json", () { | |
| 3232 var o = buildRangePosition(); | |
| 3233 var od = new api.RangePosition.fromJson(o.toJson()); | |
| 3234 checkRangePosition(od); | |
| 3235 }); | |
| 3236 }); | |
| 3237 | |
| 3238 | |
| 3239 unittest.group("obj-schema-Read", () { | |
| 3240 unittest.test("to-json--from-json", () { | |
| 3241 var o = buildRead(); | |
| 3242 var od = new api.Read.fromJson(o.toJson()); | |
| 3243 checkRead(od); | |
| 3244 }); | |
| 3245 }); | |
| 3246 | |
| 3247 | |
| 3248 unittest.group("obj-schema-ReadGroup", () { | |
| 3249 unittest.test("to-json--from-json", () { | |
| 3250 var o = buildReadGroup(); | |
| 3251 var od = new api.ReadGroup.fromJson(o.toJson()); | |
| 3252 checkReadGroup(od); | |
| 3253 }); | |
| 3254 }); | |
| 3255 | |
| 3256 | |
| 3257 unittest.group("obj-schema-ReadGroupExperiment", () { | |
| 3258 unittest.test("to-json--from-json", () { | |
| 3259 var o = buildReadGroupExperiment(); | |
| 3260 var od = new api.ReadGroupExperiment.fromJson(o.toJson()); | |
| 3261 checkReadGroupExperiment(od); | |
| 3262 }); | |
| 3263 }); | |
| 3264 | |
| 3265 | |
| 3266 unittest.group("obj-schema-ReadGroupProgram", () { | |
| 3267 unittest.test("to-json--from-json", () { | |
| 3268 var o = buildReadGroupProgram(); | |
| 3269 var od = new api.ReadGroupProgram.fromJson(o.toJson()); | |
| 3270 checkReadGroupProgram(od); | |
| 3271 }); | |
| 3272 }); | |
| 3273 | |
| 3274 | |
| 3275 unittest.group("obj-schema-ReadGroupSet", () { | |
| 3276 unittest.test("to-json--from-json", () { | |
| 3277 var o = buildReadGroupSet(); | |
| 3278 var od = new api.ReadGroupSet.fromJson(o.toJson()); | |
| 3279 checkReadGroupSet(od); | |
| 3280 }); | |
| 3281 }); | |
| 3282 | |
| 3283 | |
| 3284 unittest.group("obj-schema-Reference", () { | |
| 3285 unittest.test("to-json--from-json", () { | |
| 3286 var o = buildReference(); | |
| 3287 var od = new api.Reference.fromJson(o.toJson()); | |
| 3288 checkReference(od); | |
| 3289 }); | |
| 3290 }); | |
| 3291 | |
| 3292 | |
| 3293 unittest.group("obj-schema-ReferenceBound", () { | |
| 3294 unittest.test("to-json--from-json", () { | |
| 3295 var o = buildReferenceBound(); | |
| 3296 var od = new api.ReferenceBound.fromJson(o.toJson()); | |
| 3297 checkReferenceBound(od); | |
| 3298 }); | |
| 3299 }); | |
| 3300 | |
| 3301 | |
| 3302 unittest.group("obj-schema-ReferenceSet", () { | |
| 3303 unittest.test("to-json--from-json", () { | |
| 3304 var o = buildReferenceSet(); | |
| 3305 var od = new api.ReferenceSet.fromJson(o.toJson()); | |
| 3306 checkReferenceSet(od); | |
| 3307 }); | |
| 3308 }); | |
| 3309 | |
| 3310 | |
| 3311 unittest.group("obj-schema-SearchAnnotationSetsRequest", () { | |
| 3312 unittest.test("to-json--from-json", () { | |
| 3313 var o = buildSearchAnnotationSetsRequest(); | |
| 3314 var od = new api.SearchAnnotationSetsRequest.fromJson(o.toJson()); | |
| 3315 checkSearchAnnotationSetsRequest(od); | |
| 3316 }); | |
| 3317 }); | |
| 3318 | |
| 3319 | |
| 3320 unittest.group("obj-schema-SearchAnnotationSetsResponse", () { | |
| 3321 unittest.test("to-json--from-json", () { | |
| 3322 var o = buildSearchAnnotationSetsResponse(); | |
| 3323 var od = new api.SearchAnnotationSetsResponse.fromJson(o.toJson()); | |
| 3324 checkSearchAnnotationSetsResponse(od); | |
| 3325 }); | |
| 3326 }); | |
| 3327 | |
| 3328 | |
| 3329 unittest.group("obj-schema-SearchAnnotationsRequest", () { | |
| 3330 unittest.test("to-json--from-json", () { | |
| 3331 var o = buildSearchAnnotationsRequest(); | |
| 3332 var od = new api.SearchAnnotationsRequest.fromJson(o.toJson()); | |
| 3333 checkSearchAnnotationsRequest(od); | |
| 3334 }); | |
| 3335 }); | |
| 3336 | |
| 3337 | |
| 3338 unittest.group("obj-schema-SearchAnnotationsResponse", () { | |
| 3339 unittest.test("to-json--from-json", () { | |
| 3340 var o = buildSearchAnnotationsResponse(); | |
| 3341 var od = new api.SearchAnnotationsResponse.fromJson(o.toJson()); | |
| 3342 checkSearchAnnotationsResponse(od); | |
| 3343 }); | |
| 3344 }); | |
| 3345 | |
| 3346 | |
| 3347 unittest.group("obj-schema-SearchCallSetsRequest", () { | |
| 3348 unittest.test("to-json--from-json", () { | |
| 3349 var o = buildSearchCallSetsRequest(); | |
| 3350 var od = new api.SearchCallSetsRequest.fromJson(o.toJson()); | |
| 3351 checkSearchCallSetsRequest(od); | |
| 3352 }); | |
| 3353 }); | |
| 3354 | |
| 3355 | |
| 3356 unittest.group("obj-schema-SearchCallSetsResponse", () { | |
| 3357 unittest.test("to-json--from-json", () { | |
| 3358 var o = buildSearchCallSetsResponse(); | |
| 3359 var od = new api.SearchCallSetsResponse.fromJson(o.toJson()); | |
| 3360 checkSearchCallSetsResponse(od); | |
| 3361 }); | |
| 3362 }); | |
| 3363 | |
| 3364 | |
| 3365 unittest.group("obj-schema-SearchJobsRequest", () { | |
| 3366 unittest.test("to-json--from-json", () { | |
| 3367 var o = buildSearchJobsRequest(); | |
| 3368 var od = new api.SearchJobsRequest.fromJson(o.toJson()); | |
| 3369 checkSearchJobsRequest(od); | |
| 3370 }); | |
| 3371 }); | |
| 3372 | |
| 3373 | |
| 3374 unittest.group("obj-schema-SearchJobsResponse", () { | |
| 3375 unittest.test("to-json--from-json", () { | |
| 3376 var o = buildSearchJobsResponse(); | |
| 3377 var od = new api.SearchJobsResponse.fromJson(o.toJson()); | |
| 3378 checkSearchJobsResponse(od); | |
| 3379 }); | |
| 3380 }); | |
| 3381 | |
| 3382 | |
| 3383 unittest.group("obj-schema-SearchReadGroupSetsRequest", () { | |
| 3384 unittest.test("to-json--from-json", () { | |
| 3385 var o = buildSearchReadGroupSetsRequest(); | |
| 3386 var od = new api.SearchReadGroupSetsRequest.fromJson(o.toJson()); | |
| 3387 checkSearchReadGroupSetsRequest(od); | |
| 3388 }); | |
| 3389 }); | |
| 3390 | |
| 3391 | |
| 3392 unittest.group("obj-schema-SearchReadGroupSetsResponse", () { | |
| 3393 unittest.test("to-json--from-json", () { | |
| 3394 var o = buildSearchReadGroupSetsResponse(); | |
| 3395 var od = new api.SearchReadGroupSetsResponse.fromJson(o.toJson()); | |
| 3396 checkSearchReadGroupSetsResponse(od); | |
| 3397 }); | |
| 3398 }); | |
| 3399 | |
| 3400 | |
| 3401 unittest.group("obj-schema-SearchReadsRequest", () { | |
| 3402 unittest.test("to-json--from-json", () { | |
| 3403 var o = buildSearchReadsRequest(); | |
| 3404 var od = new api.SearchReadsRequest.fromJson(o.toJson()); | |
| 3405 checkSearchReadsRequest(od); | |
| 3406 }); | |
| 3407 }); | |
| 3408 | |
| 3409 | |
| 3410 unittest.group("obj-schema-SearchReadsResponse", () { | |
| 3411 unittest.test("to-json--from-json", () { | |
| 3412 var o = buildSearchReadsResponse(); | |
| 3413 var od = new api.SearchReadsResponse.fromJson(o.toJson()); | |
| 3414 checkSearchReadsResponse(od); | |
| 3415 }); | |
| 3416 }); | |
| 3417 | |
| 3418 | |
| 3419 unittest.group("obj-schema-SearchReferenceSetsRequest", () { | |
| 3420 unittest.test("to-json--from-json", () { | |
| 3421 var o = buildSearchReferenceSetsRequest(); | |
| 3422 var od = new api.SearchReferenceSetsRequest.fromJson(o.toJson()); | |
| 3423 checkSearchReferenceSetsRequest(od); | |
| 3424 }); | |
| 3425 }); | |
| 3426 | |
| 3427 | |
| 3428 unittest.group("obj-schema-SearchReferenceSetsResponse", () { | |
| 3429 unittest.test("to-json--from-json", () { | |
| 3430 var o = buildSearchReferenceSetsResponse(); | |
| 3431 var od = new api.SearchReferenceSetsResponse.fromJson(o.toJson()); | |
| 3432 checkSearchReferenceSetsResponse(od); | |
| 3433 }); | |
| 3434 }); | |
| 3435 | |
| 3436 | |
| 3437 unittest.group("obj-schema-SearchReferencesRequest", () { | |
| 3438 unittest.test("to-json--from-json", () { | |
| 3439 var o = buildSearchReferencesRequest(); | |
| 3440 var od = new api.SearchReferencesRequest.fromJson(o.toJson()); | |
| 3441 checkSearchReferencesRequest(od); | |
| 3442 }); | |
| 3443 }); | |
| 3444 | |
| 3445 | |
| 3446 unittest.group("obj-schema-SearchReferencesResponse", () { | |
| 3447 unittest.test("to-json--from-json", () { | |
| 3448 var o = buildSearchReferencesResponse(); | |
| 3449 var od = new api.SearchReferencesResponse.fromJson(o.toJson()); | |
| 3450 checkSearchReferencesResponse(od); | |
| 3451 }); | |
| 3452 }); | |
| 3453 | |
| 3454 | |
| 3455 unittest.group("obj-schema-SearchVariantSetsRequest", () { | |
| 3456 unittest.test("to-json--from-json", () { | |
| 3457 var o = buildSearchVariantSetsRequest(); | |
| 3458 var od = new api.SearchVariantSetsRequest.fromJson(o.toJson()); | |
| 3459 checkSearchVariantSetsRequest(od); | |
| 3460 }); | |
| 3461 }); | |
| 3462 | |
| 3463 | |
| 3464 unittest.group("obj-schema-SearchVariantSetsResponse", () { | |
| 3465 unittest.test("to-json--from-json", () { | |
| 3466 var o = buildSearchVariantSetsResponse(); | |
| 3467 var od = new api.SearchVariantSetsResponse.fromJson(o.toJson()); | |
| 3468 checkSearchVariantSetsResponse(od); | |
| 3469 }); | |
| 3470 }); | |
| 3471 | |
| 3472 | |
| 3473 unittest.group("obj-schema-SearchVariantsRequest", () { | |
| 3474 unittest.test("to-json--from-json", () { | |
| 3475 var o = buildSearchVariantsRequest(); | |
| 3476 var od = new api.SearchVariantsRequest.fromJson(o.toJson()); | |
| 3477 checkSearchVariantsRequest(od); | |
| 3478 }); | |
| 3479 }); | |
| 3480 | |
| 3481 | |
| 3482 unittest.group("obj-schema-SearchVariantsResponse", () { | |
| 3483 unittest.test("to-json--from-json", () { | |
| 3484 var o = buildSearchVariantsResponse(); | |
| 3485 var od = new api.SearchVariantsResponse.fromJson(o.toJson()); | |
| 3486 checkSearchVariantsResponse(od); | |
| 3487 }); | |
| 3488 }); | |
| 3489 | |
| 3490 | |
| 3491 unittest.group("obj-schema-Transcript", () { | |
| 3492 unittest.test("to-json--from-json", () { | |
| 3493 var o = buildTranscript(); | |
| 3494 var od = new api.Transcript.fromJson(o.toJson()); | |
| 3495 checkTranscript(od); | |
| 3496 }); | |
| 3497 }); | |
| 3498 | |
| 3499 | |
| 3500 unittest.group("obj-schema-TranscriptCodingSequence", () { | |
| 3501 unittest.test("to-json--from-json", () { | |
| 3502 var o = buildTranscriptCodingSequence(); | |
| 3503 var od = new api.TranscriptCodingSequence.fromJson(o.toJson()); | |
| 3504 checkTranscriptCodingSequence(od); | |
| 3505 }); | |
| 3506 }); | |
| 3507 | |
| 3508 | |
| 3509 unittest.group("obj-schema-TranscriptExon", () { | |
| 3510 unittest.test("to-json--from-json", () { | |
| 3511 var o = buildTranscriptExon(); | |
| 3512 var od = new api.TranscriptExon.fromJson(o.toJson()); | |
| 3513 checkTranscriptExon(od); | |
| 3514 }); | |
| 3515 }); | |
| 3516 | |
| 3517 | |
| 3518 unittest.group("obj-schema-Variant", () { | |
| 3519 unittest.test("to-json--from-json", () { | |
| 3520 var o = buildVariant(); | |
| 3521 var od = new api.Variant.fromJson(o.toJson()); | |
| 3522 checkVariant(od); | |
| 3523 }); | |
| 3524 }); | |
| 3525 | |
| 3526 | |
| 3527 unittest.group("obj-schema-VariantAnnotation", () { | |
| 3528 unittest.test("to-json--from-json", () { | |
| 3529 var o = buildVariantAnnotation(); | |
| 3530 var od = new api.VariantAnnotation.fromJson(o.toJson()); | |
| 3531 checkVariantAnnotation(od); | |
| 3532 }); | |
| 3533 }); | |
| 3534 | |
| 3535 | |
| 3536 unittest.group("obj-schema-VariantAnnotationCondition", () { | |
| 3537 unittest.test("to-json--from-json", () { | |
| 3538 var o = buildVariantAnnotationCondition(); | |
| 3539 var od = new api.VariantAnnotationCondition.fromJson(o.toJson()); | |
| 3540 checkVariantAnnotationCondition(od); | |
| 3541 }); | |
| 3542 }); | |
| 3543 | |
| 3544 | |
| 3545 unittest.group("obj-schema-VariantSet", () { | |
| 3546 unittest.test("to-json--from-json", () { | |
| 3547 var o = buildVariantSet(); | |
| 3548 var od = new api.VariantSet.fromJson(o.toJson()); | |
| 3549 checkVariantSet(od); | |
| 3550 }); | |
| 3551 }); | |
| 3552 | |
| 3553 | |
| 3554 unittest.group("resource-AnnotationSetsResourceApi", () { | |
| 3555 unittest.test("method--create", () { | |
| 3556 | |
| 3557 var mock = new HttpServerMock(); | |
| 3558 api.AnnotationSetsResourceApi res = new api.GenomicsApi(mock).annotationSe
ts; | |
| 3559 var arg_request = buildAnnotationSet(); | |
| 3560 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 3561 var obj = new api.AnnotationSet.fromJson(json); | |
| 3562 checkAnnotationSet(obj); | |
| 3563 | |
| 3564 var path = (req.url).path; | |
| 3565 var pathOffset = 0; | |
| 3566 var index; | |
| 3567 var subPart; | |
| 3568 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 3569 pathOffset += 1; | |
| 3570 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("genomics/v1beta2/")); | |
| 3571 pathOffset += 17; | |
| 3572 unittest.expect(path.substring(pathOffset, pathOffset + 14), unittest.eq
uals("annotationSets")); | |
| 3573 pathOffset += 14; | |
| 3574 | |
| 3575 var query = (req.url).query; | |
| 3576 var queryOffset = 0; | |
| 3577 var queryMap = {}; | |
| 3578 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 3579 parseBool(n) { | |
| 3580 if (n == "true") return true; | |
| 3581 if (n == "false") return false; | |
| 3582 if (n == null) return null; | |
| 3583 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 3584 } | |
| 3585 if (query.length > 0) { | |
| 3586 for (var part in query.split("&")) { | |
| 3587 var keyvalue = part.split("="); | |
| 3588 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 3589 } | |
| 3590 } | |
| 3591 | |
| 3592 | |
| 3593 var h = { | |
| 3594 "content-type" : "application/json; charset=utf-8", | |
| 3595 }; | |
| 3596 var resp = convert.JSON.encode(buildAnnotationSet()); | |
| 3597 return new async.Future.value(stringResponse(200, h, resp)); | |
| 3598 }), true); | |
| 3599 res.create(arg_request).then(unittest.expectAsync(((api.AnnotationSet resp
onse) { | |
| 3600 checkAnnotationSet(response); | |
| 3601 }))); | |
| 3602 }); | |
| 3603 | |
| 3604 unittest.test("method--delete", () { | |
| 3605 | |
| 3606 var mock = new HttpServerMock(); | |
| 3607 api.AnnotationSetsResourceApi res = new api.GenomicsApi(mock).annotationSe
ts; | |
| 3608 var arg_annotationSetId = "foo"; | |
| 3609 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 3610 var path = (req.url).path; | |
| 3611 var pathOffset = 0; | |
| 3612 var index; | |
| 3613 var subPart; | |
| 3614 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 3615 pathOffset += 1; | |
| 3616 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("genomics/v1beta2/")); | |
| 3617 pathOffset += 17; | |
| 3618 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("annotationSets/")); | |
| 3619 pathOffset += 15; | |
| 3620 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 3621 pathOffset = path.length; | |
| 3622 unittest.expect(subPart, unittest.equals("$arg_annotationSetId")); | |
| 3623 | |
| 3624 var query = (req.url).query; | |
| 3625 var queryOffset = 0; | |
| 3626 var queryMap = {}; | |
| 3627 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 3628 parseBool(n) { | |
| 3629 if (n == "true") return true; | |
| 3630 if (n == "false") return false; | |
| 3631 if (n == null) return null; | |
| 3632 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 3633 } | |
| 3634 if (query.length > 0) { | |
| 3635 for (var part in query.split("&")) { | |
| 3636 var keyvalue = part.split("="); | |
| 3637 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 3638 } | |
| 3639 } | |
| 3640 | |
| 3641 | |
| 3642 var h = { | |
| 3643 "content-type" : "application/json; charset=utf-8", | |
| 3644 }; | |
| 3645 var resp = ""; | |
| 3646 return new async.Future.value(stringResponse(200, h, resp)); | |
| 3647 }), true); | |
| 3648 res.delete(arg_annotationSetId).then(unittest.expectAsync((_) {})); | |
| 3649 }); | |
| 3650 | |
| 3651 unittest.test("method--get", () { | |
| 3652 | |
| 3653 var mock = new HttpServerMock(); | |
| 3654 api.AnnotationSetsResourceApi res = new api.GenomicsApi(mock).annotationSe
ts; | |
| 3655 var arg_annotationSetId = "foo"; | |
| 3656 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 3657 var path = (req.url).path; | |
| 3658 var pathOffset = 0; | |
| 3659 var index; | |
| 3660 var subPart; | |
| 3661 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 3662 pathOffset += 1; | |
| 3663 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("genomics/v1beta2/")); | |
| 3664 pathOffset += 17; | |
| 3665 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("annotationSets/")); | |
| 3666 pathOffset += 15; | |
| 3667 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 3668 pathOffset = path.length; | |
| 3669 unittest.expect(subPart, unittest.equals("$arg_annotationSetId")); | |
| 3670 | |
| 3671 var query = (req.url).query; | |
| 3672 var queryOffset = 0; | |
| 3673 var queryMap = {}; | |
| 3674 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 3675 parseBool(n) { | |
| 3676 if (n == "true") return true; | |
| 3677 if (n == "false") return false; | |
| 3678 if (n == null) return null; | |
| 3679 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 3680 } | |
| 3681 if (query.length > 0) { | |
| 3682 for (var part in query.split("&")) { | |
| 3683 var keyvalue = part.split("="); | |
| 3684 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 3685 } | |
| 3686 } | |
| 3687 | |
| 3688 | |
| 3689 var h = { | |
| 3690 "content-type" : "application/json; charset=utf-8", | |
| 3691 }; | |
| 3692 var resp = convert.JSON.encode(buildAnnotationSet()); | |
| 3693 return new async.Future.value(stringResponse(200, h, resp)); | |
| 3694 }), true); | |
| 3695 res.get(arg_annotationSetId).then(unittest.expectAsync(((api.AnnotationSet
response) { | |
| 3696 checkAnnotationSet(response); | |
| 3697 }))); | |
| 3698 }); | |
| 3699 | |
| 3700 unittest.test("method--patch", () { | |
| 3701 | |
| 3702 var mock = new HttpServerMock(); | |
| 3703 api.AnnotationSetsResourceApi res = new api.GenomicsApi(mock).annotationSe
ts; | |
| 3704 var arg_request = buildAnnotationSet(); | |
| 3705 var arg_annotationSetId = "foo"; | |
| 3706 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 3707 var obj = new api.AnnotationSet.fromJson(json); | |
| 3708 checkAnnotationSet(obj); | |
| 3709 | |
| 3710 var path = (req.url).path; | |
| 3711 var pathOffset = 0; | |
| 3712 var index; | |
| 3713 var subPart; | |
| 3714 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 3715 pathOffset += 1; | |
| 3716 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("genomics/v1beta2/")); | |
| 3717 pathOffset += 17; | |
| 3718 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("annotationSets/")); | |
| 3719 pathOffset += 15; | |
| 3720 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 3721 pathOffset = path.length; | |
| 3722 unittest.expect(subPart, unittest.equals("$arg_annotationSetId")); | |
| 3723 | |
| 3724 var query = (req.url).query; | |
| 3725 var queryOffset = 0; | |
| 3726 var queryMap = {}; | |
| 3727 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 3728 parseBool(n) { | |
| 3729 if (n == "true") return true; | |
| 3730 if (n == "false") return false; | |
| 3731 if (n == null) return null; | |
| 3732 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 3733 } | |
| 3734 if (query.length > 0) { | |
| 3735 for (var part in query.split("&")) { | |
| 3736 var keyvalue = part.split("="); | |
| 3737 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 3738 } | |
| 3739 } | |
| 3740 | |
| 3741 | |
| 3742 var h = { | |
| 3743 "content-type" : "application/json; charset=utf-8", | |
| 3744 }; | |
| 3745 var resp = convert.JSON.encode(buildAnnotationSet()); | |
| 3746 return new async.Future.value(stringResponse(200, h, resp)); | |
| 3747 }), true); | |
| 3748 res.patch(arg_request, arg_annotationSetId).then(unittest.expectAsync(((ap
i.AnnotationSet response) { | |
| 3749 checkAnnotationSet(response); | |
| 3750 }))); | |
| 3751 }); | |
| 3752 | |
| 3753 unittest.test("method--search", () { | |
| 3754 | |
| 3755 var mock = new HttpServerMock(); | |
| 3756 api.AnnotationSetsResourceApi res = new api.GenomicsApi(mock).annotationSe
ts; | |
| 3757 var arg_request = buildSearchAnnotationSetsRequest(); | |
| 3758 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 3759 var obj = new api.SearchAnnotationSetsRequest.fromJson(json); | |
| 3760 checkSearchAnnotationSetsRequest(obj); | |
| 3761 | |
| 3762 var path = (req.url).path; | |
| 3763 var pathOffset = 0; | |
| 3764 var index; | |
| 3765 var subPart; | |
| 3766 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 3767 pathOffset += 1; | |
| 3768 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("genomics/v1beta2/")); | |
| 3769 pathOffset += 17; | |
| 3770 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("annotationSets/search")); | |
| 3771 pathOffset += 21; | |
| 3772 | |
| 3773 var query = (req.url).query; | |
| 3774 var queryOffset = 0; | |
| 3775 var queryMap = {}; | |
| 3776 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 3777 parseBool(n) { | |
| 3778 if (n == "true") return true; | |
| 3779 if (n == "false") return false; | |
| 3780 if (n == null) return null; | |
| 3781 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 3782 } | |
| 3783 if (query.length > 0) { | |
| 3784 for (var part in query.split("&")) { | |
| 3785 var keyvalue = part.split("="); | |
| 3786 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 3787 } | |
| 3788 } | |
| 3789 | |
| 3790 | |
| 3791 var h = { | |
| 3792 "content-type" : "application/json; charset=utf-8", | |
| 3793 }; | |
| 3794 var resp = convert.JSON.encode(buildSearchAnnotationSetsResponse()); | |
| 3795 return new async.Future.value(stringResponse(200, h, resp)); | |
| 3796 }), true); | |
| 3797 res.search(arg_request).then(unittest.expectAsync(((api.SearchAnnotationSe
tsResponse response) { | |
| 3798 checkSearchAnnotationSetsResponse(response); | |
| 3799 }))); | |
| 3800 }); | |
| 3801 | |
| 3802 unittest.test("method--update", () { | |
| 3803 | |
| 3804 var mock = new HttpServerMock(); | |
| 3805 api.AnnotationSetsResourceApi res = new api.GenomicsApi(mock).annotationSe
ts; | |
| 3806 var arg_request = buildAnnotationSet(); | |
| 3807 var arg_annotationSetId = "foo"; | |
| 3808 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 3809 var obj = new api.AnnotationSet.fromJson(json); | |
| 3810 checkAnnotationSet(obj); | |
| 3811 | |
| 3812 var path = (req.url).path; | |
| 3813 var pathOffset = 0; | |
| 3814 var index; | |
| 3815 var subPart; | |
| 3816 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 3817 pathOffset += 1; | |
| 3818 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("genomics/v1beta2/")); | |
| 3819 pathOffset += 17; | |
| 3820 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("annotationSets/")); | |
| 3821 pathOffset += 15; | |
| 3822 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 3823 pathOffset = path.length; | |
| 3824 unittest.expect(subPart, unittest.equals("$arg_annotationSetId")); | |
| 3825 | |
| 3826 var query = (req.url).query; | |
| 3827 var queryOffset = 0; | |
| 3828 var queryMap = {}; | |
| 3829 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 3830 parseBool(n) { | |
| 3831 if (n == "true") return true; | |
| 3832 if (n == "false") return false; | |
| 3833 if (n == null) return null; | |
| 3834 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 3835 } | |
| 3836 if (query.length > 0) { | |
| 3837 for (var part in query.split("&")) { | |
| 3838 var keyvalue = part.split("="); | |
| 3839 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 3840 } | |
| 3841 } | |
| 3842 | |
| 3843 | |
| 3844 var h = { | |
| 3845 "content-type" : "application/json; charset=utf-8", | |
| 3846 }; | |
| 3847 var resp = convert.JSON.encode(buildAnnotationSet()); | |
| 3848 return new async.Future.value(stringResponse(200, h, resp)); | |
| 3849 }), true); | |
| 3850 res.update(arg_request, arg_annotationSetId).then(unittest.expectAsync(((a
pi.AnnotationSet response) { | |
| 3851 checkAnnotationSet(response); | |
| 3852 }))); | |
| 3853 }); | |
| 3854 | |
| 3855 }); | |
| 3856 | |
| 3857 | |
| 3858 unittest.group("resource-AnnotationsResourceApi", () { | |
| 3859 unittest.test("method--batchCreate", () { | |
| 3860 | |
| 3861 var mock = new HttpServerMock(); | |
| 3862 api.AnnotationsResourceApi res = new api.GenomicsApi(mock).annotations; | |
| 3863 var arg_request = buildBatchCreateAnnotationsRequest(); | |
| 3864 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 3865 var obj = new api.BatchCreateAnnotationsRequest.fromJson(json); | |
| 3866 checkBatchCreateAnnotationsRequest(obj); | |
| 3867 | |
| 3868 var path = (req.url).path; | |
| 3869 var pathOffset = 0; | |
| 3870 var index; | |
| 3871 var subPart; | |
| 3872 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 3873 pathOffset += 1; | |
| 3874 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("genomics/v1beta2/")); | |
| 3875 pathOffset += 17; | |
| 3876 unittest.expect(path.substring(pathOffset, pathOffset + 23), unittest.eq
uals("annotations:batchCreate")); | |
| 3877 pathOffset += 23; | |
| 3878 | |
| 3879 var query = (req.url).query; | |
| 3880 var queryOffset = 0; | |
| 3881 var queryMap = {}; | |
| 3882 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 3883 parseBool(n) { | |
| 3884 if (n == "true") return true; | |
| 3885 if (n == "false") return false; | |
| 3886 if (n == null) return null; | |
| 3887 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 3888 } | |
| 3889 if (query.length > 0) { | |
| 3890 for (var part in query.split("&")) { | |
| 3891 var keyvalue = part.split("="); | |
| 3892 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 3893 } | |
| 3894 } | |
| 3895 | |
| 3896 | |
| 3897 var h = { | |
| 3898 "content-type" : "application/json; charset=utf-8", | |
| 3899 }; | |
| 3900 var resp = convert.JSON.encode(buildBatchAnnotationsResponse()); | |
| 3901 return new async.Future.value(stringResponse(200, h, resp)); | |
| 3902 }), true); | |
| 3903 res.batchCreate(arg_request).then(unittest.expectAsync(((api.BatchAnnotati
onsResponse response) { | |
| 3904 checkBatchAnnotationsResponse(response); | |
| 3905 }))); | |
| 3906 }); | |
| 3907 | |
| 3908 unittest.test("method--create", () { | |
| 3909 | |
| 3910 var mock = new HttpServerMock(); | |
| 3911 api.AnnotationsResourceApi res = new api.GenomicsApi(mock).annotations; | |
| 3912 var arg_request = buildAnnotation(); | |
| 3913 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 3914 var obj = new api.Annotation.fromJson(json); | |
| 3915 checkAnnotation(obj); | |
| 3916 | |
| 3917 var path = (req.url).path; | |
| 3918 var pathOffset = 0; | |
| 3919 var index; | |
| 3920 var subPart; | |
| 3921 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 3922 pathOffset += 1; | |
| 3923 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("genomics/v1beta2/")); | |
| 3924 pathOffset += 17; | |
| 3925 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("annotations")); | |
| 3926 pathOffset += 11; | |
| 3927 | |
| 3928 var query = (req.url).query; | |
| 3929 var queryOffset = 0; | |
| 3930 var queryMap = {}; | |
| 3931 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 3932 parseBool(n) { | |
| 3933 if (n == "true") return true; | |
| 3934 if (n == "false") return false; | |
| 3935 if (n == null) return null; | |
| 3936 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 3937 } | |
| 3938 if (query.length > 0) { | |
| 3939 for (var part in query.split("&")) { | |
| 3940 var keyvalue = part.split("="); | |
| 3941 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 3942 } | |
| 3943 } | |
| 3944 | |
| 3945 | |
| 3946 var h = { | |
| 3947 "content-type" : "application/json; charset=utf-8", | |
| 3948 }; | |
| 3949 var resp = convert.JSON.encode(buildAnnotation()); | |
| 3950 return new async.Future.value(stringResponse(200, h, resp)); | |
| 3951 }), true); | |
| 3952 res.create(arg_request).then(unittest.expectAsync(((api.Annotation respons
e) { | |
| 3953 checkAnnotation(response); | |
| 3954 }))); | |
| 3955 }); | |
| 3956 | |
| 3957 unittest.test("method--delete", () { | |
| 3958 | |
| 3959 var mock = new HttpServerMock(); | |
| 3960 api.AnnotationsResourceApi res = new api.GenomicsApi(mock).annotations; | |
| 3961 var arg_annotationId = "foo"; | |
| 3962 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 3963 var path = (req.url).path; | |
| 3964 var pathOffset = 0; | |
| 3965 var index; | |
| 3966 var subPart; | |
| 3967 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 3968 pathOffset += 1; | |
| 3969 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("genomics/v1beta2/")); | |
| 3970 pathOffset += 17; | |
| 3971 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("annotations/")); | |
| 3972 pathOffset += 12; | |
| 3973 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 3974 pathOffset = path.length; | |
| 3975 unittest.expect(subPart, unittest.equals("$arg_annotationId")); | |
| 3976 | |
| 3977 var query = (req.url).query; | |
| 3978 var queryOffset = 0; | |
| 3979 var queryMap = {}; | |
| 3980 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 3981 parseBool(n) { | |
| 3982 if (n == "true") return true; | |
| 3983 if (n == "false") return false; | |
| 3984 if (n == null) return null; | |
| 3985 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 3986 } | |
| 3987 if (query.length > 0) { | |
| 3988 for (var part in query.split("&")) { | |
| 3989 var keyvalue = part.split("="); | |
| 3990 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 3991 } | |
| 3992 } | |
| 3993 | |
| 3994 | |
| 3995 var h = { | |
| 3996 "content-type" : "application/json; charset=utf-8", | |
| 3997 }; | |
| 3998 var resp = ""; | |
| 3999 return new async.Future.value(stringResponse(200, h, resp)); | |
| 4000 }), true); | |
| 4001 res.delete(arg_annotationId).then(unittest.expectAsync((_) {})); | |
| 4002 }); | |
| 4003 | |
| 4004 unittest.test("method--get", () { | |
| 4005 | |
| 4006 var mock = new HttpServerMock(); | |
| 4007 api.AnnotationsResourceApi res = new api.GenomicsApi(mock).annotations; | |
| 4008 var arg_annotationId = "foo"; | |
| 4009 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 4010 var path = (req.url).path; | |
| 4011 var pathOffset = 0; | |
| 4012 var index; | |
| 4013 var subPart; | |
| 4014 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 4015 pathOffset += 1; | |
| 4016 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("genomics/v1beta2/")); | |
| 4017 pathOffset += 17; | |
| 4018 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("annotations/")); | |
| 4019 pathOffset += 12; | |
| 4020 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 4021 pathOffset = path.length; | |
| 4022 unittest.expect(subPart, unittest.equals("$arg_annotationId")); | |
| 4023 | |
| 4024 var query = (req.url).query; | |
| 4025 var queryOffset = 0; | |
| 4026 var queryMap = {}; | |
| 4027 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 4028 parseBool(n) { | |
| 4029 if (n == "true") return true; | |
| 4030 if (n == "false") return false; | |
| 4031 if (n == null) return null; | |
| 4032 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 4033 } | |
| 4034 if (query.length > 0) { | |
| 4035 for (var part in query.split("&")) { | |
| 4036 var keyvalue = part.split("="); | |
| 4037 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 4038 } | |
| 4039 } | |
| 4040 | |
| 4041 | |
| 4042 var h = { | |
| 4043 "content-type" : "application/json; charset=utf-8", | |
| 4044 }; | |
| 4045 var resp = convert.JSON.encode(buildAnnotation()); | |
| 4046 return new async.Future.value(stringResponse(200, h, resp)); | |
| 4047 }), true); | |
| 4048 res.get(arg_annotationId).then(unittest.expectAsync(((api.Annotation respo
nse) { | |
| 4049 checkAnnotation(response); | |
| 4050 }))); | |
| 4051 }); | |
| 4052 | |
| 4053 unittest.test("method--patch", () { | |
| 4054 | |
| 4055 var mock = new HttpServerMock(); | |
| 4056 api.AnnotationsResourceApi res = new api.GenomicsApi(mock).annotations; | |
| 4057 var arg_request = buildAnnotation(); | |
| 4058 var arg_annotationId = "foo"; | |
| 4059 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 4060 var obj = new api.Annotation.fromJson(json); | |
| 4061 checkAnnotation(obj); | |
| 4062 | |
| 4063 var path = (req.url).path; | |
| 4064 var pathOffset = 0; | |
| 4065 var index; | |
| 4066 var subPart; | |
| 4067 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 4068 pathOffset += 1; | |
| 4069 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("genomics/v1beta2/")); | |
| 4070 pathOffset += 17; | |
| 4071 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("annotations/")); | |
| 4072 pathOffset += 12; | |
| 4073 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 4074 pathOffset = path.length; | |
| 4075 unittest.expect(subPart, unittest.equals("$arg_annotationId")); | |
| 4076 | |
| 4077 var query = (req.url).query; | |
| 4078 var queryOffset = 0; | |
| 4079 var queryMap = {}; | |
| 4080 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 4081 parseBool(n) { | |
| 4082 if (n == "true") return true; | |
| 4083 if (n == "false") return false; | |
| 4084 if (n == null) return null; | |
| 4085 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 4086 } | |
| 4087 if (query.length > 0) { | |
| 4088 for (var part in query.split("&")) { | |
| 4089 var keyvalue = part.split("="); | |
| 4090 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 4091 } | |
| 4092 } | |
| 4093 | |
| 4094 | |
| 4095 var h = { | |
| 4096 "content-type" : "application/json; charset=utf-8", | |
| 4097 }; | |
| 4098 var resp = convert.JSON.encode(buildAnnotation()); | |
| 4099 return new async.Future.value(stringResponse(200, h, resp)); | |
| 4100 }), true); | |
| 4101 res.patch(arg_request, arg_annotationId).then(unittest.expectAsync(((api.A
nnotation response) { | |
| 4102 checkAnnotation(response); | |
| 4103 }))); | |
| 4104 }); | |
| 4105 | |
| 4106 unittest.test("method--search", () { | |
| 4107 | |
| 4108 var mock = new HttpServerMock(); | |
| 4109 api.AnnotationsResourceApi res = new api.GenomicsApi(mock).annotations; | |
| 4110 var arg_request = buildSearchAnnotationsRequest(); | |
| 4111 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 4112 var obj = new api.SearchAnnotationsRequest.fromJson(json); | |
| 4113 checkSearchAnnotationsRequest(obj); | |
| 4114 | |
| 4115 var path = (req.url).path; | |
| 4116 var pathOffset = 0; | |
| 4117 var index; | |
| 4118 var subPart; | |
| 4119 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 4120 pathOffset += 1; | |
| 4121 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("genomics/v1beta2/")); | |
| 4122 pathOffset += 17; | |
| 4123 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("annotations/search")); | |
| 4124 pathOffset += 18; | |
| 4125 | |
| 4126 var query = (req.url).query; | |
| 4127 var queryOffset = 0; | |
| 4128 var queryMap = {}; | |
| 4129 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 4130 parseBool(n) { | |
| 4131 if (n == "true") return true; | |
| 4132 if (n == "false") return false; | |
| 4133 if (n == null) return null; | |
| 4134 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 4135 } | |
| 4136 if (query.length > 0) { | |
| 4137 for (var part in query.split("&")) { | |
| 4138 var keyvalue = part.split("="); | |
| 4139 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 4140 } | |
| 4141 } | |
| 4142 | |
| 4143 | |
| 4144 var h = { | |
| 4145 "content-type" : "application/json; charset=utf-8", | |
| 4146 }; | |
| 4147 var resp = convert.JSON.encode(buildSearchAnnotationsResponse()); | |
| 4148 return new async.Future.value(stringResponse(200, h, resp)); | |
| 4149 }), true); | |
| 4150 res.search(arg_request).then(unittest.expectAsync(((api.SearchAnnotationsR
esponse response) { | |
| 4151 checkSearchAnnotationsResponse(response); | |
| 4152 }))); | |
| 4153 }); | |
| 4154 | |
| 4155 unittest.test("method--update", () { | |
| 4156 | |
| 4157 var mock = new HttpServerMock(); | |
| 4158 api.AnnotationsResourceApi res = new api.GenomicsApi(mock).annotations; | |
| 4159 var arg_request = buildAnnotation(); | |
| 4160 var arg_annotationId = "foo"; | |
| 4161 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 4162 var obj = new api.Annotation.fromJson(json); | |
| 4163 checkAnnotation(obj); | |
| 4164 | |
| 4165 var path = (req.url).path; | |
| 4166 var pathOffset = 0; | |
| 4167 var index; | |
| 4168 var subPart; | |
| 4169 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 4170 pathOffset += 1; | |
| 4171 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("genomics/v1beta2/")); | |
| 4172 pathOffset += 17; | |
| 4173 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("annotations/")); | |
| 4174 pathOffset += 12; | |
| 4175 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 4176 pathOffset = path.length; | |
| 4177 unittest.expect(subPart, unittest.equals("$arg_annotationId")); | |
| 4178 | |
| 4179 var query = (req.url).query; | |
| 4180 var queryOffset = 0; | |
| 4181 var queryMap = {}; | |
| 4182 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 4183 parseBool(n) { | |
| 4184 if (n == "true") return true; | |
| 4185 if (n == "false") return false; | |
| 4186 if (n == null) return null; | |
| 4187 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 4188 } | |
| 4189 if (query.length > 0) { | |
| 4190 for (var part in query.split("&")) { | |
| 4191 var keyvalue = part.split("="); | |
| 4192 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 4193 } | |
| 4194 } | |
| 4195 | |
| 4196 | |
| 4197 var h = { | |
| 4198 "content-type" : "application/json; charset=utf-8", | |
| 4199 }; | |
| 4200 var resp = convert.JSON.encode(buildAnnotation()); | |
| 4201 return new async.Future.value(stringResponse(200, h, resp)); | |
| 4202 }), true); | |
| 4203 res.update(arg_request, arg_annotationId).then(unittest.expectAsync(((api.
Annotation response) { | |
| 4204 checkAnnotation(response); | |
| 4205 }))); | |
| 4206 }); | |
| 4207 | |
| 4208 }); | |
| 4209 | |
| 4210 | |
| 4211 unittest.group("resource-CallsetsResourceApi", () { | |
| 4212 unittest.test("method--create", () { | |
| 4213 | |
| 4214 var mock = new HttpServerMock(); | |
| 4215 api.CallsetsResourceApi res = new api.GenomicsApi(mock).callsets; | |
| 4216 var arg_request = buildCallSet(); | |
| 4217 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 4218 var obj = new api.CallSet.fromJson(json); | |
| 4219 checkCallSet(obj); | |
| 4220 | |
| 4221 var path = (req.url).path; | |
| 4222 var pathOffset = 0; | |
| 4223 var index; | |
| 4224 var subPart; | |
| 4225 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 4226 pathOffset += 1; | |
| 4227 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("genomics/v1beta2/")); | |
| 4228 pathOffset += 17; | |
| 4229 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("callsets")); | |
| 4230 pathOffset += 8; | |
| 4231 | |
| 4232 var query = (req.url).query; | |
| 4233 var queryOffset = 0; | |
| 4234 var queryMap = {}; | |
| 4235 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 4236 parseBool(n) { | |
| 4237 if (n == "true") return true; | |
| 4238 if (n == "false") return false; | |
| 4239 if (n == null) return null; | |
| 4240 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 4241 } | |
| 4242 if (query.length > 0) { | |
| 4243 for (var part in query.split("&")) { | |
| 4244 var keyvalue = part.split("="); | |
| 4245 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 4246 } | |
| 4247 } | |
| 4248 | |
| 4249 | |
| 4250 var h = { | |
| 4251 "content-type" : "application/json; charset=utf-8", | |
| 4252 }; | |
| 4253 var resp = convert.JSON.encode(buildCallSet()); | |
| 4254 return new async.Future.value(stringResponse(200, h, resp)); | |
| 4255 }), true); | |
| 4256 res.create(arg_request).then(unittest.expectAsync(((api.CallSet response)
{ | |
| 4257 checkCallSet(response); | |
| 4258 }))); | |
| 4259 }); | |
| 4260 | |
| 4261 unittest.test("method--delete", () { | |
| 4262 | |
| 4263 var mock = new HttpServerMock(); | |
| 4264 api.CallsetsResourceApi res = new api.GenomicsApi(mock).callsets; | |
| 4265 var arg_callSetId = "foo"; | |
| 4266 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 4267 var path = (req.url).path; | |
| 4268 var pathOffset = 0; | |
| 4269 var index; | |
| 4270 var subPart; | |
| 4271 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 4272 pathOffset += 1; | |
| 4273 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("genomics/v1beta2/")); | |
| 4274 pathOffset += 17; | |
| 4275 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("callsets/")); | |
| 4276 pathOffset += 9; | |
| 4277 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 4278 pathOffset = path.length; | |
| 4279 unittest.expect(subPart, unittest.equals("$arg_callSetId")); | |
| 4280 | |
| 4281 var query = (req.url).query; | |
| 4282 var queryOffset = 0; | |
| 4283 var queryMap = {}; | |
| 4284 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 4285 parseBool(n) { | |
| 4286 if (n == "true") return true; | |
| 4287 if (n == "false") return false; | |
| 4288 if (n == null) return null; | |
| 4289 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 4290 } | |
| 4291 if (query.length > 0) { | |
| 4292 for (var part in query.split("&")) { | |
| 4293 var keyvalue = part.split("="); | |
| 4294 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 4295 } | |
| 4296 } | |
| 4297 | |
| 4298 | |
| 4299 var h = { | |
| 4300 "content-type" : "application/json; charset=utf-8", | |
| 4301 }; | |
| 4302 var resp = ""; | |
| 4303 return new async.Future.value(stringResponse(200, h, resp)); | |
| 4304 }), true); | |
| 4305 res.delete(arg_callSetId).then(unittest.expectAsync((_) {})); | |
| 4306 }); | |
| 4307 | |
| 4308 unittest.test("method--get", () { | |
| 4309 | |
| 4310 var mock = new HttpServerMock(); | |
| 4311 api.CallsetsResourceApi res = new api.GenomicsApi(mock).callsets; | |
| 4312 var arg_callSetId = "foo"; | |
| 4313 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 4314 var path = (req.url).path; | |
| 4315 var pathOffset = 0; | |
| 4316 var index; | |
| 4317 var subPart; | |
| 4318 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 4319 pathOffset += 1; | |
| 4320 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("genomics/v1beta2/")); | |
| 4321 pathOffset += 17; | |
| 4322 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("callsets/")); | |
| 4323 pathOffset += 9; | |
| 4324 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 4325 pathOffset = path.length; | |
| 4326 unittest.expect(subPart, unittest.equals("$arg_callSetId")); | |
| 4327 | |
| 4328 var query = (req.url).query; | |
| 4329 var queryOffset = 0; | |
| 4330 var queryMap = {}; | |
| 4331 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 4332 parseBool(n) { | |
| 4333 if (n == "true") return true; | |
| 4334 if (n == "false") return false; | |
| 4335 if (n == null) return null; | |
| 4336 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 4337 } | |
| 4338 if (query.length > 0) { | |
| 4339 for (var part in query.split("&")) { | |
| 4340 var keyvalue = part.split("="); | |
| 4341 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 4342 } | |
| 4343 } | |
| 4344 | |
| 4345 | |
| 4346 var h = { | |
| 4347 "content-type" : "application/json; charset=utf-8", | |
| 4348 }; | |
| 4349 var resp = convert.JSON.encode(buildCallSet()); | |
| 4350 return new async.Future.value(stringResponse(200, h, resp)); | |
| 4351 }), true); | |
| 4352 res.get(arg_callSetId).then(unittest.expectAsync(((api.CallSet response) { | |
| 4353 checkCallSet(response); | |
| 4354 }))); | |
| 4355 }); | |
| 4356 | |
| 4357 unittest.test("method--patch", () { | |
| 4358 | |
| 4359 var mock = new HttpServerMock(); | |
| 4360 api.CallsetsResourceApi res = new api.GenomicsApi(mock).callsets; | |
| 4361 var arg_request = buildCallSet(); | |
| 4362 var arg_callSetId = "foo"; | |
| 4363 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 4364 var obj = new api.CallSet.fromJson(json); | |
| 4365 checkCallSet(obj); | |
| 4366 | |
| 4367 var path = (req.url).path; | |
| 4368 var pathOffset = 0; | |
| 4369 var index; | |
| 4370 var subPart; | |
| 4371 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 4372 pathOffset += 1; | |
| 4373 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("genomics/v1beta2/")); | |
| 4374 pathOffset += 17; | |
| 4375 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("callsets/")); | |
| 4376 pathOffset += 9; | |
| 4377 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 4378 pathOffset = path.length; | |
| 4379 unittest.expect(subPart, unittest.equals("$arg_callSetId")); | |
| 4380 | |
| 4381 var query = (req.url).query; | |
| 4382 var queryOffset = 0; | |
| 4383 var queryMap = {}; | |
| 4384 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 4385 parseBool(n) { | |
| 4386 if (n == "true") return true; | |
| 4387 if (n == "false") return false; | |
| 4388 if (n == null) return null; | |
| 4389 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 4390 } | |
| 4391 if (query.length > 0) { | |
| 4392 for (var part in query.split("&")) { | |
| 4393 var keyvalue = part.split("="); | |
| 4394 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 4395 } | |
| 4396 } | |
| 4397 | |
| 4398 | |
| 4399 var h = { | |
| 4400 "content-type" : "application/json; charset=utf-8", | |
| 4401 }; | |
| 4402 var resp = convert.JSON.encode(buildCallSet()); | |
| 4403 return new async.Future.value(stringResponse(200, h, resp)); | |
| 4404 }), true); | |
| 4405 res.patch(arg_request, arg_callSetId).then(unittest.expectAsync(((api.Call
Set response) { | |
| 4406 checkCallSet(response); | |
| 4407 }))); | |
| 4408 }); | |
| 4409 | |
| 4410 unittest.test("method--search", () { | |
| 4411 | |
| 4412 var mock = new HttpServerMock(); | |
| 4413 api.CallsetsResourceApi res = new api.GenomicsApi(mock).callsets; | |
| 4414 var arg_request = buildSearchCallSetsRequest(); | |
| 4415 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 4416 var obj = new api.SearchCallSetsRequest.fromJson(json); | |
| 4417 checkSearchCallSetsRequest(obj); | |
| 4418 | |
| 4419 var path = (req.url).path; | |
| 4420 var pathOffset = 0; | |
| 4421 var index; | |
| 4422 var subPart; | |
| 4423 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 4424 pathOffset += 1; | |
| 4425 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("genomics/v1beta2/")); | |
| 4426 pathOffset += 17; | |
| 4427 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("callsets/search")); | |
| 4428 pathOffset += 15; | |
| 4429 | |
| 4430 var query = (req.url).query; | |
| 4431 var queryOffset = 0; | |
| 4432 var queryMap = {}; | |
| 4433 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 4434 parseBool(n) { | |
| 4435 if (n == "true") return true; | |
| 4436 if (n == "false") return false; | |
| 4437 if (n == null) return null; | |
| 4438 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 4439 } | |
| 4440 if (query.length > 0) { | |
| 4441 for (var part in query.split("&")) { | |
| 4442 var keyvalue = part.split("="); | |
| 4443 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 4444 } | |
| 4445 } | |
| 4446 | |
| 4447 | |
| 4448 var h = { | |
| 4449 "content-type" : "application/json; charset=utf-8", | |
| 4450 }; | |
| 4451 var resp = convert.JSON.encode(buildSearchCallSetsResponse()); | |
| 4452 return new async.Future.value(stringResponse(200, h, resp)); | |
| 4453 }), true); | |
| 4454 res.search(arg_request).then(unittest.expectAsync(((api.SearchCallSetsResp
onse response) { | |
| 4455 checkSearchCallSetsResponse(response); | |
| 4456 }))); | |
| 4457 }); | |
| 4458 | |
| 4459 unittest.test("method--update", () { | |
| 4460 | |
| 4461 var mock = new HttpServerMock(); | |
| 4462 api.CallsetsResourceApi res = new api.GenomicsApi(mock).callsets; | |
| 4463 var arg_request = buildCallSet(); | |
| 4464 var arg_callSetId = "foo"; | |
| 4465 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 4466 var obj = new api.CallSet.fromJson(json); | |
| 4467 checkCallSet(obj); | |
| 4468 | |
| 4469 var path = (req.url).path; | |
| 4470 var pathOffset = 0; | |
| 4471 var index; | |
| 4472 var subPart; | |
| 4473 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 4474 pathOffset += 1; | |
| 4475 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("genomics/v1beta2/")); | |
| 4476 pathOffset += 17; | |
| 4477 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("callsets/")); | |
| 4478 pathOffset += 9; | |
| 4479 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 4480 pathOffset = path.length; | |
| 4481 unittest.expect(subPart, unittest.equals("$arg_callSetId")); | |
| 4482 | |
| 4483 var query = (req.url).query; | |
| 4484 var queryOffset = 0; | |
| 4485 var queryMap = {}; | |
| 4486 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 4487 parseBool(n) { | |
| 4488 if (n == "true") return true; | |
| 4489 if (n == "false") return false; | |
| 4490 if (n == null) return null; | |
| 4491 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 4492 } | |
| 4493 if (query.length > 0) { | |
| 4494 for (var part in query.split("&")) { | |
| 4495 var keyvalue = part.split("="); | |
| 4496 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 4497 } | |
| 4498 } | |
| 4499 | |
| 4500 | |
| 4501 var h = { | |
| 4502 "content-type" : "application/json; charset=utf-8", | |
| 4503 }; | |
| 4504 var resp = convert.JSON.encode(buildCallSet()); | |
| 4505 return new async.Future.value(stringResponse(200, h, resp)); | |
| 4506 }), true); | |
| 4507 res.update(arg_request, arg_callSetId).then(unittest.expectAsync(((api.Cal
lSet response) { | |
| 4508 checkCallSet(response); | |
| 4509 }))); | |
| 4510 }); | |
| 4511 | |
| 4512 }); | |
| 4513 | |
| 4514 | |
| 4515 unittest.group("resource-DatasetsResourceApi", () { | |
| 4516 unittest.test("method--create", () { | |
| 4517 | |
| 4518 var mock = new HttpServerMock(); | |
| 4519 api.DatasetsResourceApi res = new api.GenomicsApi(mock).datasets; | |
| 4520 var arg_request = buildDataset(); | |
| 4521 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 4522 var obj = new api.Dataset.fromJson(json); | |
| 4523 checkDataset(obj); | |
| 4524 | |
| 4525 var path = (req.url).path; | |
| 4526 var pathOffset = 0; | |
| 4527 var index; | |
| 4528 var subPart; | |
| 4529 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 4530 pathOffset += 1; | |
| 4531 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("genomics/v1beta2/")); | |
| 4532 pathOffset += 17; | |
| 4533 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("datasets")); | |
| 4534 pathOffset += 8; | |
| 4535 | |
| 4536 var query = (req.url).query; | |
| 4537 var queryOffset = 0; | |
| 4538 var queryMap = {}; | |
| 4539 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 4540 parseBool(n) { | |
| 4541 if (n == "true") return true; | |
| 4542 if (n == "false") return false; | |
| 4543 if (n == null) return null; | |
| 4544 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 4545 } | |
| 4546 if (query.length > 0) { | |
| 4547 for (var part in query.split("&")) { | |
| 4548 var keyvalue = part.split("="); | |
| 4549 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 4550 } | |
| 4551 } | |
| 4552 | |
| 4553 | |
| 4554 var h = { | |
| 4555 "content-type" : "application/json; charset=utf-8", | |
| 4556 }; | |
| 4557 var resp = convert.JSON.encode(buildDataset()); | |
| 4558 return new async.Future.value(stringResponse(200, h, resp)); | |
| 4559 }), true); | |
| 4560 res.create(arg_request).then(unittest.expectAsync(((api.Dataset response)
{ | |
| 4561 checkDataset(response); | |
| 4562 }))); | |
| 4563 }); | |
| 4564 | |
| 4565 unittest.test("method--delete", () { | |
| 4566 | |
| 4567 var mock = new HttpServerMock(); | |
| 4568 api.DatasetsResourceApi res = new api.GenomicsApi(mock).datasets; | |
| 4569 var arg_datasetId = "foo"; | |
| 4570 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 4571 var path = (req.url).path; | |
| 4572 var pathOffset = 0; | |
| 4573 var index; | |
| 4574 var subPart; | |
| 4575 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 4576 pathOffset += 1; | |
| 4577 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("genomics/v1beta2/")); | |
| 4578 pathOffset += 17; | |
| 4579 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("datasets/")); | |
| 4580 pathOffset += 9; | |
| 4581 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 4582 pathOffset = path.length; | |
| 4583 unittest.expect(subPart, unittest.equals("$arg_datasetId")); | |
| 4584 | |
| 4585 var query = (req.url).query; | |
| 4586 var queryOffset = 0; | |
| 4587 var queryMap = {}; | |
| 4588 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 4589 parseBool(n) { | |
| 4590 if (n == "true") return true; | |
| 4591 if (n == "false") return false; | |
| 4592 if (n == null) return null; | |
| 4593 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 4594 } | |
| 4595 if (query.length > 0) { | |
| 4596 for (var part in query.split("&")) { | |
| 4597 var keyvalue = part.split("="); | |
| 4598 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 4599 } | |
| 4600 } | |
| 4601 | |
| 4602 | |
| 4603 var h = { | |
| 4604 "content-type" : "application/json; charset=utf-8", | |
| 4605 }; | |
| 4606 var resp = ""; | |
| 4607 return new async.Future.value(stringResponse(200, h, resp)); | |
| 4608 }), true); | |
| 4609 res.delete(arg_datasetId).then(unittest.expectAsync((_) {})); | |
| 4610 }); | |
| 4611 | |
| 4612 unittest.test("method--get", () { | |
| 4613 | |
| 4614 var mock = new HttpServerMock(); | |
| 4615 api.DatasetsResourceApi res = new api.GenomicsApi(mock).datasets; | |
| 4616 var arg_datasetId = "foo"; | |
| 4617 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 4618 var path = (req.url).path; | |
| 4619 var pathOffset = 0; | |
| 4620 var index; | |
| 4621 var subPart; | |
| 4622 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 4623 pathOffset += 1; | |
| 4624 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("genomics/v1beta2/")); | |
| 4625 pathOffset += 17; | |
| 4626 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("datasets/")); | |
| 4627 pathOffset += 9; | |
| 4628 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 4629 pathOffset = path.length; | |
| 4630 unittest.expect(subPart, unittest.equals("$arg_datasetId")); | |
| 4631 | |
| 4632 var query = (req.url).query; | |
| 4633 var queryOffset = 0; | |
| 4634 var queryMap = {}; | |
| 4635 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 4636 parseBool(n) { | |
| 4637 if (n == "true") return true; | |
| 4638 if (n == "false") return false; | |
| 4639 if (n == null) return null; | |
| 4640 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 4641 } | |
| 4642 if (query.length > 0) { | |
| 4643 for (var part in query.split("&")) { | |
| 4644 var keyvalue = part.split("="); | |
| 4645 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 4646 } | |
| 4647 } | |
| 4648 | |
| 4649 | |
| 4650 var h = { | |
| 4651 "content-type" : "application/json; charset=utf-8", | |
| 4652 }; | |
| 4653 var resp = convert.JSON.encode(buildDataset()); | |
| 4654 return new async.Future.value(stringResponse(200, h, resp)); | |
| 4655 }), true); | |
| 4656 res.get(arg_datasetId).then(unittest.expectAsync(((api.Dataset response) { | |
| 4657 checkDataset(response); | |
| 4658 }))); | |
| 4659 }); | |
| 4660 | |
| 4661 unittest.test("method--list", () { | |
| 4662 | |
| 4663 var mock = new HttpServerMock(); | |
| 4664 api.DatasetsResourceApi res = new api.GenomicsApi(mock).datasets; | |
| 4665 var arg_pageSize = 42; | |
| 4666 var arg_pageToken = "foo"; | |
| 4667 var arg_projectNumber = "foo"; | |
| 4668 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 4669 var path = (req.url).path; | |
| 4670 var pathOffset = 0; | |
| 4671 var index; | |
| 4672 var subPart; | |
| 4673 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 4674 pathOffset += 1; | |
| 4675 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("genomics/v1beta2/")); | |
| 4676 pathOffset += 17; | |
| 4677 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("datasets")); | |
| 4678 pathOffset += 8; | |
| 4679 | |
| 4680 var query = (req.url).query; | |
| 4681 var queryOffset = 0; | |
| 4682 var queryMap = {}; | |
| 4683 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 4684 parseBool(n) { | |
| 4685 if (n == "true") return true; | |
| 4686 if (n == "false") return false; | |
| 4687 if (n == null) return null; | |
| 4688 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 4689 } | |
| 4690 if (query.length > 0) { | |
| 4691 for (var part in query.split("&")) { | |
| 4692 var keyvalue = part.split("="); | |
| 4693 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 4694 } | |
| 4695 } | |
| 4696 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); | |
| 4697 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 4698 unittest.expect(queryMap["projectNumber"].first, unittest.equals(arg_pro
jectNumber)); | |
| 4699 | |
| 4700 | |
| 4701 var h = { | |
| 4702 "content-type" : "application/json; charset=utf-8", | |
| 4703 }; | |
| 4704 var resp = convert.JSON.encode(buildListDatasetsResponse()); | |
| 4705 return new async.Future.value(stringResponse(200, h, resp)); | |
| 4706 }), true); | |
| 4707 res.list(pageSize: arg_pageSize, pageToken: arg_pageToken, projectNumber:
arg_projectNumber).then(unittest.expectAsync(((api.ListDatasetsResponse response
) { | |
| 4708 checkListDatasetsResponse(response); | |
| 4709 }))); | |
| 4710 }); | |
| 4711 | |
| 4712 unittest.test("method--patch", () { | |
| 4713 | |
| 4714 var mock = new HttpServerMock(); | |
| 4715 api.DatasetsResourceApi res = new api.GenomicsApi(mock).datasets; | |
| 4716 var arg_request = buildDataset(); | |
| 4717 var arg_datasetId = "foo"; | |
| 4718 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 4719 var obj = new api.Dataset.fromJson(json); | |
| 4720 checkDataset(obj); | |
| 4721 | |
| 4722 var path = (req.url).path; | |
| 4723 var pathOffset = 0; | |
| 4724 var index; | |
| 4725 var subPart; | |
| 4726 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 4727 pathOffset += 1; | |
| 4728 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("genomics/v1beta2/")); | |
| 4729 pathOffset += 17; | |
| 4730 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("datasets/")); | |
| 4731 pathOffset += 9; | |
| 4732 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 4733 pathOffset = path.length; | |
| 4734 unittest.expect(subPart, unittest.equals("$arg_datasetId")); | |
| 4735 | |
| 4736 var query = (req.url).query; | |
| 4737 var queryOffset = 0; | |
| 4738 var queryMap = {}; | |
| 4739 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 4740 parseBool(n) { | |
| 4741 if (n == "true") return true; | |
| 4742 if (n == "false") return false; | |
| 4743 if (n == null) return null; | |
| 4744 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 4745 } | |
| 4746 if (query.length > 0) { | |
| 4747 for (var part in query.split("&")) { | |
| 4748 var keyvalue = part.split("="); | |
| 4749 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 4750 } | |
| 4751 } | |
| 4752 | |
| 4753 | |
| 4754 var h = { | |
| 4755 "content-type" : "application/json; charset=utf-8", | |
| 4756 }; | |
| 4757 var resp = convert.JSON.encode(buildDataset()); | |
| 4758 return new async.Future.value(stringResponse(200, h, resp)); | |
| 4759 }), true); | |
| 4760 res.patch(arg_request, arg_datasetId).then(unittest.expectAsync(((api.Data
set response) { | |
| 4761 checkDataset(response); | |
| 4762 }))); | |
| 4763 }); | |
| 4764 | |
| 4765 unittest.test("method--undelete", () { | |
| 4766 | |
| 4767 var mock = new HttpServerMock(); | |
| 4768 api.DatasetsResourceApi res = new api.GenomicsApi(mock).datasets; | |
| 4769 var arg_datasetId = "foo"; | |
| 4770 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 4771 var path = (req.url).path; | |
| 4772 var pathOffset = 0; | |
| 4773 var index; | |
| 4774 var subPart; | |
| 4775 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 4776 pathOffset += 1; | |
| 4777 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("genomics/v1beta2/")); | |
| 4778 pathOffset += 17; | |
| 4779 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("datasets/")); | |
| 4780 pathOffset += 9; | |
| 4781 index = path.indexOf("/undelete", pathOffset); | |
| 4782 unittest.expect(index >= 0, unittest.isTrue); | |
| 4783 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 4784 pathOffset = index; | |
| 4785 unittest.expect(subPart, unittest.equals("$arg_datasetId")); | |
| 4786 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("/undelete")); | |
| 4787 pathOffset += 9; | |
| 4788 | |
| 4789 var query = (req.url).query; | |
| 4790 var queryOffset = 0; | |
| 4791 var queryMap = {}; | |
| 4792 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 4793 parseBool(n) { | |
| 4794 if (n == "true") return true; | |
| 4795 if (n == "false") return false; | |
| 4796 if (n == null) return null; | |
| 4797 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 4798 } | |
| 4799 if (query.length > 0) { | |
| 4800 for (var part in query.split("&")) { | |
| 4801 var keyvalue = part.split("="); | |
| 4802 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 4803 } | |
| 4804 } | |
| 4805 | |
| 4806 | |
| 4807 var h = { | |
| 4808 "content-type" : "application/json; charset=utf-8", | |
| 4809 }; | |
| 4810 var resp = convert.JSON.encode(buildDataset()); | |
| 4811 return new async.Future.value(stringResponse(200, h, resp)); | |
| 4812 }), true); | |
| 4813 res.undelete(arg_datasetId).then(unittest.expectAsync(((api.Dataset respon
se) { | |
| 4814 checkDataset(response); | |
| 4815 }))); | |
| 4816 }); | |
| 4817 | |
| 4818 unittest.test("method--update", () { | |
| 4819 | |
| 4820 var mock = new HttpServerMock(); | |
| 4821 api.DatasetsResourceApi res = new api.GenomicsApi(mock).datasets; | |
| 4822 var arg_request = buildDataset(); | |
| 4823 var arg_datasetId = "foo"; | |
| 4824 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 4825 var obj = new api.Dataset.fromJson(json); | |
| 4826 checkDataset(obj); | |
| 4827 | |
| 4828 var path = (req.url).path; | |
| 4829 var pathOffset = 0; | |
| 4830 var index; | |
| 4831 var subPart; | |
| 4832 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 4833 pathOffset += 1; | |
| 4834 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("genomics/v1beta2/")); | |
| 4835 pathOffset += 17; | |
| 4836 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("datasets/")); | |
| 4837 pathOffset += 9; | |
| 4838 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 4839 pathOffset = path.length; | |
| 4840 unittest.expect(subPart, unittest.equals("$arg_datasetId")); | |
| 4841 | |
| 4842 var query = (req.url).query; | |
| 4843 var queryOffset = 0; | |
| 4844 var queryMap = {}; | |
| 4845 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 4846 parseBool(n) { | |
| 4847 if (n == "true") return true; | |
| 4848 if (n == "false") return false; | |
| 4849 if (n == null) return null; | |
| 4850 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 4851 } | |
| 4852 if (query.length > 0) { | |
| 4853 for (var part in query.split("&")) { | |
| 4854 var keyvalue = part.split("="); | |
| 4855 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 4856 } | |
| 4857 } | |
| 4858 | |
| 4859 | |
| 4860 var h = { | |
| 4861 "content-type" : "application/json; charset=utf-8", | |
| 4862 }; | |
| 4863 var resp = convert.JSON.encode(buildDataset()); | |
| 4864 return new async.Future.value(stringResponse(200, h, resp)); | |
| 4865 }), true); | |
| 4866 res.update(arg_request, arg_datasetId).then(unittest.expectAsync(((api.Dat
aset response) { | |
| 4867 checkDataset(response); | |
| 4868 }))); | |
| 4869 }); | |
| 4870 | |
| 4871 }); | |
| 4872 | |
| 4873 | |
| 4874 unittest.group("resource-ExperimentalJobsResourceApi", () { | |
| 4875 unittest.test("method--create", () { | |
| 4876 | |
| 4877 var mock = new HttpServerMock(); | |
| 4878 api.ExperimentalJobsResourceApi res = new api.GenomicsApi(mock).experiment
al.jobs; | |
| 4879 var arg_request = buildExperimentalCreateJobRequest(); | |
| 4880 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 4881 var obj = new api.ExperimentalCreateJobRequest.fromJson(json); | |
| 4882 checkExperimentalCreateJobRequest(obj); | |
| 4883 | |
| 4884 var path = (req.url).path; | |
| 4885 var pathOffset = 0; | |
| 4886 var index; | |
| 4887 var subPart; | |
| 4888 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 4889 pathOffset += 1; | |
| 4890 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("genomics/v1beta2/")); | |
| 4891 pathOffset += 17; | |
| 4892 unittest.expect(path.substring(pathOffset, pathOffset + 24), unittest.eq
uals("experimental/jobs/create")); | |
| 4893 pathOffset += 24; | |
| 4894 | |
| 4895 var query = (req.url).query; | |
| 4896 var queryOffset = 0; | |
| 4897 var queryMap = {}; | |
| 4898 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 4899 parseBool(n) { | |
| 4900 if (n == "true") return true; | |
| 4901 if (n == "false") return false; | |
| 4902 if (n == null) return null; | |
| 4903 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 4904 } | |
| 4905 if (query.length > 0) { | |
| 4906 for (var part in query.split("&")) { | |
| 4907 var keyvalue = part.split("="); | |
| 4908 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 4909 } | |
| 4910 } | |
| 4911 | |
| 4912 | |
| 4913 var h = { | |
| 4914 "content-type" : "application/json; charset=utf-8", | |
| 4915 }; | |
| 4916 var resp = convert.JSON.encode(buildExperimentalCreateJobResponse()); | |
| 4917 return new async.Future.value(stringResponse(200, h, resp)); | |
| 4918 }), true); | |
| 4919 res.create(arg_request).then(unittest.expectAsync(((api.ExperimentalCreate
JobResponse response) { | |
| 4920 checkExperimentalCreateJobResponse(response); | |
| 4921 }))); | |
| 4922 }); | |
| 4923 | |
| 4924 }); | |
| 4925 | |
| 4926 | |
| 4927 unittest.group("resource-JobsResourceApi", () { | |
| 4928 unittest.test("method--cancel", () { | |
| 4929 | |
| 4930 var mock = new HttpServerMock(); | |
| 4931 api.JobsResourceApi res = new api.GenomicsApi(mock).jobs; | |
| 4932 var arg_jobId = "foo"; | |
| 4933 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 4934 var path = (req.url).path; | |
| 4935 var pathOffset = 0; | |
| 4936 var index; | |
| 4937 var subPart; | |
| 4938 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 4939 pathOffset += 1; | |
| 4940 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("genomics/v1beta2/")); | |
| 4941 pathOffset += 17; | |
| 4942 unittest.expect(path.substring(pathOffset, pathOffset + 5), unittest.equ
als("jobs/")); | |
| 4943 pathOffset += 5; | |
| 4944 index = path.indexOf("/cancel", pathOffset); | |
| 4945 unittest.expect(index >= 0, unittest.isTrue); | |
| 4946 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 4947 pathOffset = index; | |
| 4948 unittest.expect(subPart, unittest.equals("$arg_jobId")); | |
| 4949 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ
als("/cancel")); | |
| 4950 pathOffset += 7; | |
| 4951 | |
| 4952 var query = (req.url).query; | |
| 4953 var queryOffset = 0; | |
| 4954 var queryMap = {}; | |
| 4955 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 4956 parseBool(n) { | |
| 4957 if (n == "true") return true; | |
| 4958 if (n == "false") return false; | |
| 4959 if (n == null) return null; | |
| 4960 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 4961 } | |
| 4962 if (query.length > 0) { | |
| 4963 for (var part in query.split("&")) { | |
| 4964 var keyvalue = part.split("="); | |
| 4965 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 4966 } | |
| 4967 } | |
| 4968 | |
| 4969 | |
| 4970 var h = { | |
| 4971 "content-type" : "application/json; charset=utf-8", | |
| 4972 }; | |
| 4973 var resp = ""; | |
| 4974 return new async.Future.value(stringResponse(200, h, resp)); | |
| 4975 }), true); | |
| 4976 res.cancel(arg_jobId).then(unittest.expectAsync((_) {})); | |
| 4977 }); | |
| 4978 | |
| 4979 unittest.test("method--get", () { | |
| 4980 | |
| 4981 var mock = new HttpServerMock(); | |
| 4982 api.JobsResourceApi res = new api.GenomicsApi(mock).jobs; | |
| 4983 var arg_jobId = "foo"; | |
| 4984 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 4985 var path = (req.url).path; | |
| 4986 var pathOffset = 0; | |
| 4987 var index; | |
| 4988 var subPart; | |
| 4989 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 4990 pathOffset += 1; | |
| 4991 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("genomics/v1beta2/")); | |
| 4992 pathOffset += 17; | |
| 4993 unittest.expect(path.substring(pathOffset, pathOffset + 5), unittest.equ
als("jobs/")); | |
| 4994 pathOffset += 5; | |
| 4995 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 4996 pathOffset = path.length; | |
| 4997 unittest.expect(subPart, unittest.equals("$arg_jobId")); | |
| 4998 | |
| 4999 var query = (req.url).query; | |
| 5000 var queryOffset = 0; | |
| 5001 var queryMap = {}; | |
| 5002 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 5003 parseBool(n) { | |
| 5004 if (n == "true") return true; | |
| 5005 if (n == "false") return false; | |
| 5006 if (n == null) return null; | |
| 5007 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 5008 } | |
| 5009 if (query.length > 0) { | |
| 5010 for (var part in query.split("&")) { | |
| 5011 var keyvalue = part.split("="); | |
| 5012 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 5013 } | |
| 5014 } | |
| 5015 | |
| 5016 | |
| 5017 var h = { | |
| 5018 "content-type" : "application/json; charset=utf-8", | |
| 5019 }; | |
| 5020 var resp = convert.JSON.encode(buildJob()); | |
| 5021 return new async.Future.value(stringResponse(200, h, resp)); | |
| 5022 }), true); | |
| 5023 res.get(arg_jobId).then(unittest.expectAsync(((api.Job response) { | |
| 5024 checkJob(response); | |
| 5025 }))); | |
| 5026 }); | |
| 5027 | |
| 5028 unittest.test("method--search", () { | |
| 5029 | |
| 5030 var mock = new HttpServerMock(); | |
| 5031 api.JobsResourceApi res = new api.GenomicsApi(mock).jobs; | |
| 5032 var arg_request = buildSearchJobsRequest(); | |
| 5033 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 5034 var obj = new api.SearchJobsRequest.fromJson(json); | |
| 5035 checkSearchJobsRequest(obj); | |
| 5036 | |
| 5037 var path = (req.url).path; | |
| 5038 var pathOffset = 0; | |
| 5039 var index; | |
| 5040 var subPart; | |
| 5041 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 5042 pathOffset += 1; | |
| 5043 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("genomics/v1beta2/")); | |
| 5044 pathOffset += 17; | |
| 5045 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("jobs/search")); | |
| 5046 pathOffset += 11; | |
| 5047 | |
| 5048 var query = (req.url).query; | |
| 5049 var queryOffset = 0; | |
| 5050 var queryMap = {}; | |
| 5051 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 5052 parseBool(n) { | |
| 5053 if (n == "true") return true; | |
| 5054 if (n == "false") return false; | |
| 5055 if (n == null) return null; | |
| 5056 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 5057 } | |
| 5058 if (query.length > 0) { | |
| 5059 for (var part in query.split("&")) { | |
| 5060 var keyvalue = part.split("="); | |
| 5061 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 5062 } | |
| 5063 } | |
| 5064 | |
| 5065 | |
| 5066 var h = { | |
| 5067 "content-type" : "application/json; charset=utf-8", | |
| 5068 }; | |
| 5069 var resp = convert.JSON.encode(buildSearchJobsResponse()); | |
| 5070 return new async.Future.value(stringResponse(200, h, resp)); | |
| 5071 }), true); | |
| 5072 res.search(arg_request).then(unittest.expectAsync(((api.SearchJobsResponse
response) { | |
| 5073 checkSearchJobsResponse(response); | |
| 5074 }))); | |
| 5075 }); | |
| 5076 | |
| 5077 }); | |
| 5078 | |
| 5079 | |
| 5080 unittest.group("resource-ReadgroupsetsResourceApi", () { | |
| 5081 unittest.test("method--delete", () { | |
| 5082 | |
| 5083 var mock = new HttpServerMock(); | |
| 5084 api.ReadgroupsetsResourceApi res = new api.GenomicsApi(mock).readgroupsets
; | |
| 5085 var arg_readGroupSetId = "foo"; | |
| 5086 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 5087 var path = (req.url).path; | |
| 5088 var pathOffset = 0; | |
| 5089 var index; | |
| 5090 var subPart; | |
| 5091 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 5092 pathOffset += 1; | |
| 5093 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("genomics/v1beta2/")); | |
| 5094 pathOffset += 17; | |
| 5095 unittest.expect(path.substring(pathOffset, pathOffset + 14), unittest.eq
uals("readgroupsets/")); | |
| 5096 pathOffset += 14; | |
| 5097 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 5098 pathOffset = path.length; | |
| 5099 unittest.expect(subPart, unittest.equals("$arg_readGroupSetId")); | |
| 5100 | |
| 5101 var query = (req.url).query; | |
| 5102 var queryOffset = 0; | |
| 5103 var queryMap = {}; | |
| 5104 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 5105 parseBool(n) { | |
| 5106 if (n == "true") return true; | |
| 5107 if (n == "false") return false; | |
| 5108 if (n == null) return null; | |
| 5109 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 5110 } | |
| 5111 if (query.length > 0) { | |
| 5112 for (var part in query.split("&")) { | |
| 5113 var keyvalue = part.split("="); | |
| 5114 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 5115 } | |
| 5116 } | |
| 5117 | |
| 5118 | |
| 5119 var h = { | |
| 5120 "content-type" : "application/json; charset=utf-8", | |
| 5121 }; | |
| 5122 var resp = ""; | |
| 5123 return new async.Future.value(stringResponse(200, h, resp)); | |
| 5124 }), true); | |
| 5125 res.delete(arg_readGroupSetId).then(unittest.expectAsync((_) {})); | |
| 5126 }); | |
| 5127 | |
| 5128 unittest.test("method--export", () { | |
| 5129 | |
| 5130 var mock = new HttpServerMock(); | |
| 5131 api.ReadgroupsetsResourceApi res = new api.GenomicsApi(mock).readgroupsets
; | |
| 5132 var arg_request = buildExportReadGroupSetsRequest(); | |
| 5133 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 5134 var obj = new api.ExportReadGroupSetsRequest.fromJson(json); | |
| 5135 checkExportReadGroupSetsRequest(obj); | |
| 5136 | |
| 5137 var path = (req.url).path; | |
| 5138 var pathOffset = 0; | |
| 5139 var index; | |
| 5140 var subPart; | |
| 5141 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 5142 pathOffset += 1; | |
| 5143 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("genomics/v1beta2/")); | |
| 5144 pathOffset += 17; | |
| 5145 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("readgroupsets/export")); | |
| 5146 pathOffset += 20; | |
| 5147 | |
| 5148 var query = (req.url).query; | |
| 5149 var queryOffset = 0; | |
| 5150 var queryMap = {}; | |
| 5151 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 5152 parseBool(n) { | |
| 5153 if (n == "true") return true; | |
| 5154 if (n == "false") return false; | |
| 5155 if (n == null) return null; | |
| 5156 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 5157 } | |
| 5158 if (query.length > 0) { | |
| 5159 for (var part in query.split("&")) { | |
| 5160 var keyvalue = part.split("="); | |
| 5161 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 5162 } | |
| 5163 } | |
| 5164 | |
| 5165 | |
| 5166 var h = { | |
| 5167 "content-type" : "application/json; charset=utf-8", | |
| 5168 }; | |
| 5169 var resp = convert.JSON.encode(buildExportReadGroupSetsResponse()); | |
| 5170 return new async.Future.value(stringResponse(200, h, resp)); | |
| 5171 }), true); | |
| 5172 res.export(arg_request).then(unittest.expectAsync(((api.ExportReadGroupSet
sResponse response) { | |
| 5173 checkExportReadGroupSetsResponse(response); | |
| 5174 }))); | |
| 5175 }); | |
| 5176 | |
| 5177 unittest.test("method--get", () { | |
| 5178 | |
| 5179 var mock = new HttpServerMock(); | |
| 5180 api.ReadgroupsetsResourceApi res = new api.GenomicsApi(mock).readgroupsets
; | |
| 5181 var arg_readGroupSetId = "foo"; | |
| 5182 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 5183 var path = (req.url).path; | |
| 5184 var pathOffset = 0; | |
| 5185 var index; | |
| 5186 var subPart; | |
| 5187 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 5188 pathOffset += 1; | |
| 5189 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("genomics/v1beta2/")); | |
| 5190 pathOffset += 17; | |
| 5191 unittest.expect(path.substring(pathOffset, pathOffset + 14), unittest.eq
uals("readgroupsets/")); | |
| 5192 pathOffset += 14; | |
| 5193 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 5194 pathOffset = path.length; | |
| 5195 unittest.expect(subPart, unittest.equals("$arg_readGroupSetId")); | |
| 5196 | |
| 5197 var query = (req.url).query; | |
| 5198 var queryOffset = 0; | |
| 5199 var queryMap = {}; | |
| 5200 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 5201 parseBool(n) { | |
| 5202 if (n == "true") return true; | |
| 5203 if (n == "false") return false; | |
| 5204 if (n == null) return null; | |
| 5205 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 5206 } | |
| 5207 if (query.length > 0) { | |
| 5208 for (var part in query.split("&")) { | |
| 5209 var keyvalue = part.split("="); | |
| 5210 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 5211 } | |
| 5212 } | |
| 5213 | |
| 5214 | |
| 5215 var h = { | |
| 5216 "content-type" : "application/json; charset=utf-8", | |
| 5217 }; | |
| 5218 var resp = convert.JSON.encode(buildReadGroupSet()); | |
| 5219 return new async.Future.value(stringResponse(200, h, resp)); | |
| 5220 }), true); | |
| 5221 res.get(arg_readGroupSetId).then(unittest.expectAsync(((api.ReadGroupSet r
esponse) { | |
| 5222 checkReadGroupSet(response); | |
| 5223 }))); | |
| 5224 }); | |
| 5225 | |
| 5226 unittest.test("method--import", () { | |
| 5227 | |
| 5228 var mock = new HttpServerMock(); | |
| 5229 api.ReadgroupsetsResourceApi res = new api.GenomicsApi(mock).readgroupsets
; | |
| 5230 var arg_request = buildImportReadGroupSetsRequest(); | |
| 5231 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 5232 var obj = new api.ImportReadGroupSetsRequest.fromJson(json); | |
| 5233 checkImportReadGroupSetsRequest(obj); | |
| 5234 | |
| 5235 var path = (req.url).path; | |
| 5236 var pathOffset = 0; | |
| 5237 var index; | |
| 5238 var subPart; | |
| 5239 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 5240 pathOffset += 1; | |
| 5241 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("genomics/v1beta2/")); | |
| 5242 pathOffset += 17; | |
| 5243 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("readgroupsets/import")); | |
| 5244 pathOffset += 20; | |
| 5245 | |
| 5246 var query = (req.url).query; | |
| 5247 var queryOffset = 0; | |
| 5248 var queryMap = {}; | |
| 5249 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 5250 parseBool(n) { | |
| 5251 if (n == "true") return true; | |
| 5252 if (n == "false") return false; | |
| 5253 if (n == null) return null; | |
| 5254 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 5255 } | |
| 5256 if (query.length > 0) { | |
| 5257 for (var part in query.split("&")) { | |
| 5258 var keyvalue = part.split("="); | |
| 5259 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 5260 } | |
| 5261 } | |
| 5262 | |
| 5263 | |
| 5264 var h = { | |
| 5265 "content-type" : "application/json; charset=utf-8", | |
| 5266 }; | |
| 5267 var resp = convert.JSON.encode(buildImportReadGroupSetsResponse()); | |
| 5268 return new async.Future.value(stringResponse(200, h, resp)); | |
| 5269 }), true); | |
| 5270 res.import(arg_request).then(unittest.expectAsync(((api.ImportReadGroupSet
sResponse response) { | |
| 5271 checkImportReadGroupSetsResponse(response); | |
| 5272 }))); | |
| 5273 }); | |
| 5274 | |
| 5275 unittest.test("method--patch", () { | |
| 5276 | |
| 5277 var mock = new HttpServerMock(); | |
| 5278 api.ReadgroupsetsResourceApi res = new api.GenomicsApi(mock).readgroupsets
; | |
| 5279 var arg_request = buildReadGroupSet(); | |
| 5280 var arg_readGroupSetId = "foo"; | |
| 5281 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 5282 var obj = new api.ReadGroupSet.fromJson(json); | |
| 5283 checkReadGroupSet(obj); | |
| 5284 | |
| 5285 var path = (req.url).path; | |
| 5286 var pathOffset = 0; | |
| 5287 var index; | |
| 5288 var subPart; | |
| 5289 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 5290 pathOffset += 1; | |
| 5291 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("genomics/v1beta2/")); | |
| 5292 pathOffset += 17; | |
| 5293 unittest.expect(path.substring(pathOffset, pathOffset + 14), unittest.eq
uals("readgroupsets/")); | |
| 5294 pathOffset += 14; | |
| 5295 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 5296 pathOffset = path.length; | |
| 5297 unittest.expect(subPart, unittest.equals("$arg_readGroupSetId")); | |
| 5298 | |
| 5299 var query = (req.url).query; | |
| 5300 var queryOffset = 0; | |
| 5301 var queryMap = {}; | |
| 5302 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 5303 parseBool(n) { | |
| 5304 if (n == "true") return true; | |
| 5305 if (n == "false") return false; | |
| 5306 if (n == null) return null; | |
| 5307 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 5308 } | |
| 5309 if (query.length > 0) { | |
| 5310 for (var part in query.split("&")) { | |
| 5311 var keyvalue = part.split("="); | |
| 5312 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 5313 } | |
| 5314 } | |
| 5315 | |
| 5316 | |
| 5317 var h = { | |
| 5318 "content-type" : "application/json; charset=utf-8", | |
| 5319 }; | |
| 5320 var resp = convert.JSON.encode(buildReadGroupSet()); | |
| 5321 return new async.Future.value(stringResponse(200, h, resp)); | |
| 5322 }), true); | |
| 5323 res.patch(arg_request, arg_readGroupSetId).then(unittest.expectAsync(((api
.ReadGroupSet response) { | |
| 5324 checkReadGroupSet(response); | |
| 5325 }))); | |
| 5326 }); | |
| 5327 | |
| 5328 unittest.test("method--search", () { | |
| 5329 | |
| 5330 var mock = new HttpServerMock(); | |
| 5331 api.ReadgroupsetsResourceApi res = new api.GenomicsApi(mock).readgroupsets
; | |
| 5332 var arg_request = buildSearchReadGroupSetsRequest(); | |
| 5333 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 5334 var obj = new api.SearchReadGroupSetsRequest.fromJson(json); | |
| 5335 checkSearchReadGroupSetsRequest(obj); | |
| 5336 | |
| 5337 var path = (req.url).path; | |
| 5338 var pathOffset = 0; | |
| 5339 var index; | |
| 5340 var subPart; | |
| 5341 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 5342 pathOffset += 1; | |
| 5343 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("genomics/v1beta2/")); | |
| 5344 pathOffset += 17; | |
| 5345 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("readgroupsets/search")); | |
| 5346 pathOffset += 20; | |
| 5347 | |
| 5348 var query = (req.url).query; | |
| 5349 var queryOffset = 0; | |
| 5350 var queryMap = {}; | |
| 5351 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 5352 parseBool(n) { | |
| 5353 if (n == "true") return true; | |
| 5354 if (n == "false") return false; | |
| 5355 if (n == null) return null; | |
| 5356 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 5357 } | |
| 5358 if (query.length > 0) { | |
| 5359 for (var part in query.split("&")) { | |
| 5360 var keyvalue = part.split("="); | |
| 5361 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 5362 } | |
| 5363 } | |
| 5364 | |
| 5365 | |
| 5366 var h = { | |
| 5367 "content-type" : "application/json; charset=utf-8", | |
| 5368 }; | |
| 5369 var resp = convert.JSON.encode(buildSearchReadGroupSetsResponse()); | |
| 5370 return new async.Future.value(stringResponse(200, h, resp)); | |
| 5371 }), true); | |
| 5372 res.search(arg_request).then(unittest.expectAsync(((api.SearchReadGroupSet
sResponse response) { | |
| 5373 checkSearchReadGroupSetsResponse(response); | |
| 5374 }))); | |
| 5375 }); | |
| 5376 | |
| 5377 unittest.test("method--update", () { | |
| 5378 | |
| 5379 var mock = new HttpServerMock(); | |
| 5380 api.ReadgroupsetsResourceApi res = new api.GenomicsApi(mock).readgroupsets
; | |
| 5381 var arg_request = buildReadGroupSet(); | |
| 5382 var arg_readGroupSetId = "foo"; | |
| 5383 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 5384 var obj = new api.ReadGroupSet.fromJson(json); | |
| 5385 checkReadGroupSet(obj); | |
| 5386 | |
| 5387 var path = (req.url).path; | |
| 5388 var pathOffset = 0; | |
| 5389 var index; | |
| 5390 var subPart; | |
| 5391 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 5392 pathOffset += 1; | |
| 5393 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("genomics/v1beta2/")); | |
| 5394 pathOffset += 17; | |
| 5395 unittest.expect(path.substring(pathOffset, pathOffset + 14), unittest.eq
uals("readgroupsets/")); | |
| 5396 pathOffset += 14; | |
| 5397 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 5398 pathOffset = path.length; | |
| 5399 unittest.expect(subPart, unittest.equals("$arg_readGroupSetId")); | |
| 5400 | |
| 5401 var query = (req.url).query; | |
| 5402 var queryOffset = 0; | |
| 5403 var queryMap = {}; | |
| 5404 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 5405 parseBool(n) { | |
| 5406 if (n == "true") return true; | |
| 5407 if (n == "false") return false; | |
| 5408 if (n == null) return null; | |
| 5409 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 5410 } | |
| 5411 if (query.length > 0) { | |
| 5412 for (var part in query.split("&")) { | |
| 5413 var keyvalue = part.split("="); | |
| 5414 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 5415 } | |
| 5416 } | |
| 5417 | |
| 5418 | |
| 5419 var h = { | |
| 5420 "content-type" : "application/json; charset=utf-8", | |
| 5421 }; | |
| 5422 var resp = convert.JSON.encode(buildReadGroupSet()); | |
| 5423 return new async.Future.value(stringResponse(200, h, resp)); | |
| 5424 }), true); | |
| 5425 res.update(arg_request, arg_readGroupSetId).then(unittest.expectAsync(((ap
i.ReadGroupSet response) { | |
| 5426 checkReadGroupSet(response); | |
| 5427 }))); | |
| 5428 }); | |
| 5429 | |
| 5430 }); | |
| 5431 | |
| 5432 | |
| 5433 unittest.group("resource-ReadgroupsetsCoveragebucketsResourceApi", () { | |
| 5434 unittest.test("method--list", () { | |
| 5435 | |
| 5436 var mock = new HttpServerMock(); | |
| 5437 api.ReadgroupsetsCoveragebucketsResourceApi res = new api.GenomicsApi(mock
).readgroupsets.coveragebuckets; | |
| 5438 var arg_readGroupSetId = "foo"; | |
| 5439 var arg_pageSize = 42; | |
| 5440 var arg_pageToken = "foo"; | |
| 5441 var arg_range_end = "foo"; | |
| 5442 var arg_range_referenceName = "foo"; | |
| 5443 var arg_range_start = "foo"; | |
| 5444 var arg_targetBucketWidth = "foo"; | |
| 5445 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 5446 var path = (req.url).path; | |
| 5447 var pathOffset = 0; | |
| 5448 var index; | |
| 5449 var subPart; | |
| 5450 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 5451 pathOffset += 1; | |
| 5452 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("genomics/v1beta2/")); | |
| 5453 pathOffset += 17; | |
| 5454 unittest.expect(path.substring(pathOffset, pathOffset + 14), unittest.eq
uals("readgroupsets/")); | |
| 5455 pathOffset += 14; | |
| 5456 index = path.indexOf("/coveragebuckets", pathOffset); | |
| 5457 unittest.expect(index >= 0, unittest.isTrue); | |
| 5458 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 5459 pathOffset = index; | |
| 5460 unittest.expect(subPart, unittest.equals("$arg_readGroupSetId")); | |
| 5461 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq
uals("/coveragebuckets")); | |
| 5462 pathOffset += 16; | |
| 5463 | |
| 5464 var query = (req.url).query; | |
| 5465 var queryOffset = 0; | |
| 5466 var queryMap = {}; | |
| 5467 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 5468 parseBool(n) { | |
| 5469 if (n == "true") return true; | |
| 5470 if (n == "false") return false; | |
| 5471 if (n == null) return null; | |
| 5472 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 5473 } | |
| 5474 if (query.length > 0) { | |
| 5475 for (var part in query.split("&")) { | |
| 5476 var keyvalue = part.split("="); | |
| 5477 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 5478 } | |
| 5479 } | |
| 5480 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); | |
| 5481 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 5482 unittest.expect(queryMap["range.end"].first, unittest.equals(arg_range_e
nd)); | |
| 5483 unittest.expect(queryMap["range.referenceName"].first, unittest.equals(a
rg_range_referenceName)); | |
| 5484 unittest.expect(queryMap["range.start"].first, unittest.equals(arg_range
_start)); | |
| 5485 unittest.expect(queryMap["targetBucketWidth"].first, unittest.equals(arg
_targetBucketWidth)); | |
| 5486 | |
| 5487 | |
| 5488 var h = { | |
| 5489 "content-type" : "application/json; charset=utf-8", | |
| 5490 }; | |
| 5491 var resp = convert.JSON.encode(buildListCoverageBucketsResponse()); | |
| 5492 return new async.Future.value(stringResponse(200, h, resp)); | |
| 5493 }), true); | |
| 5494 res.list(arg_readGroupSetId, pageSize: arg_pageSize, pageToken: arg_pageTo
ken, range_end: arg_range_end, range_referenceName: arg_range_referenceName, ran
ge_start: arg_range_start, targetBucketWidth: arg_targetBucketWidth).then(unitte
st.expectAsync(((api.ListCoverageBucketsResponse response) { | |
| 5495 checkListCoverageBucketsResponse(response); | |
| 5496 }))); | |
| 5497 }); | |
| 5498 | |
| 5499 }); | |
| 5500 | |
| 5501 | |
| 5502 unittest.group("resource-ReadsResourceApi", () { | |
| 5503 unittest.test("method--search", () { | |
| 5504 | |
| 5505 var mock = new HttpServerMock(); | |
| 5506 api.ReadsResourceApi res = new api.GenomicsApi(mock).reads; | |
| 5507 var arg_request = buildSearchReadsRequest(); | |
| 5508 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 5509 var obj = new api.SearchReadsRequest.fromJson(json); | |
| 5510 checkSearchReadsRequest(obj); | |
| 5511 | |
| 5512 var path = (req.url).path; | |
| 5513 var pathOffset = 0; | |
| 5514 var index; | |
| 5515 var subPart; | |
| 5516 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 5517 pathOffset += 1; | |
| 5518 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("genomics/v1beta2/")); | |
| 5519 pathOffset += 17; | |
| 5520 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("reads/search")); | |
| 5521 pathOffset += 12; | |
| 5522 | |
| 5523 var query = (req.url).query; | |
| 5524 var queryOffset = 0; | |
| 5525 var queryMap = {}; | |
| 5526 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 5527 parseBool(n) { | |
| 5528 if (n == "true") return true; | |
| 5529 if (n == "false") return false; | |
| 5530 if (n == null) return null; | |
| 5531 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 5532 } | |
| 5533 if (query.length > 0) { | |
| 5534 for (var part in query.split("&")) { | |
| 5535 var keyvalue = part.split("="); | |
| 5536 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 5537 } | |
| 5538 } | |
| 5539 | |
| 5540 | |
| 5541 var h = { | |
| 5542 "content-type" : "application/json; charset=utf-8", | |
| 5543 }; | |
| 5544 var resp = convert.JSON.encode(buildSearchReadsResponse()); | |
| 5545 return new async.Future.value(stringResponse(200, h, resp)); | |
| 5546 }), true); | |
| 5547 res.search(arg_request).then(unittest.expectAsync(((api.SearchReadsRespons
e response) { | |
| 5548 checkSearchReadsResponse(response); | |
| 5549 }))); | |
| 5550 }); | |
| 5551 | |
| 5552 }); | |
| 5553 | |
| 5554 | |
| 5555 unittest.group("resource-ReferencesResourceApi", () { | |
| 5556 unittest.test("method--get", () { | |
| 5557 | |
| 5558 var mock = new HttpServerMock(); | |
| 5559 api.ReferencesResourceApi res = new api.GenomicsApi(mock).references; | |
| 5560 var arg_referenceId = "foo"; | |
| 5561 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 5562 var path = (req.url).path; | |
| 5563 var pathOffset = 0; | |
| 5564 var index; | |
| 5565 var subPart; | |
| 5566 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 5567 pathOffset += 1; | |
| 5568 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("genomics/v1beta2/")); | |
| 5569 pathOffset += 17; | |
| 5570 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("references/")); | |
| 5571 pathOffset += 11; | |
| 5572 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 5573 pathOffset = path.length; | |
| 5574 unittest.expect(subPart, unittest.equals("$arg_referenceId")); | |
| 5575 | |
| 5576 var query = (req.url).query; | |
| 5577 var queryOffset = 0; | |
| 5578 var queryMap = {}; | |
| 5579 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 5580 parseBool(n) { | |
| 5581 if (n == "true") return true; | |
| 5582 if (n == "false") return false; | |
| 5583 if (n == null) return null; | |
| 5584 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 5585 } | |
| 5586 if (query.length > 0) { | |
| 5587 for (var part in query.split("&")) { | |
| 5588 var keyvalue = part.split("="); | |
| 5589 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 5590 } | |
| 5591 } | |
| 5592 | |
| 5593 | |
| 5594 var h = { | |
| 5595 "content-type" : "application/json; charset=utf-8", | |
| 5596 }; | |
| 5597 var resp = convert.JSON.encode(buildReference()); | |
| 5598 return new async.Future.value(stringResponse(200, h, resp)); | |
| 5599 }), true); | |
| 5600 res.get(arg_referenceId).then(unittest.expectAsync(((api.Reference respons
e) { | |
| 5601 checkReference(response); | |
| 5602 }))); | |
| 5603 }); | |
| 5604 | |
| 5605 unittest.test("method--search", () { | |
| 5606 | |
| 5607 var mock = new HttpServerMock(); | |
| 5608 api.ReferencesResourceApi res = new api.GenomicsApi(mock).references; | |
| 5609 var arg_request = buildSearchReferencesRequest(); | |
| 5610 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 5611 var obj = new api.SearchReferencesRequest.fromJson(json); | |
| 5612 checkSearchReferencesRequest(obj); | |
| 5613 | |
| 5614 var path = (req.url).path; | |
| 5615 var pathOffset = 0; | |
| 5616 var index; | |
| 5617 var subPart; | |
| 5618 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 5619 pathOffset += 1; | |
| 5620 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("genomics/v1beta2/")); | |
| 5621 pathOffset += 17; | |
| 5622 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("references/search")); | |
| 5623 pathOffset += 17; | |
| 5624 | |
| 5625 var query = (req.url).query; | |
| 5626 var queryOffset = 0; | |
| 5627 var queryMap = {}; | |
| 5628 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 5629 parseBool(n) { | |
| 5630 if (n == "true") return true; | |
| 5631 if (n == "false") return false; | |
| 5632 if (n == null) return null; | |
| 5633 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 5634 } | |
| 5635 if (query.length > 0) { | |
| 5636 for (var part in query.split("&")) { | |
| 5637 var keyvalue = part.split("="); | |
| 5638 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 5639 } | |
| 5640 } | |
| 5641 | |
| 5642 | |
| 5643 var h = { | |
| 5644 "content-type" : "application/json; charset=utf-8", | |
| 5645 }; | |
| 5646 var resp = convert.JSON.encode(buildSearchReferencesResponse()); | |
| 5647 return new async.Future.value(stringResponse(200, h, resp)); | |
| 5648 }), true); | |
| 5649 res.search(arg_request).then(unittest.expectAsync(((api.SearchReferencesRe
sponse response) { | |
| 5650 checkSearchReferencesResponse(response); | |
| 5651 }))); | |
| 5652 }); | |
| 5653 | |
| 5654 }); | |
| 5655 | |
| 5656 | |
| 5657 unittest.group("resource-ReferencesBasesResourceApi", () { | |
| 5658 unittest.test("method--list", () { | |
| 5659 | |
| 5660 var mock = new HttpServerMock(); | |
| 5661 api.ReferencesBasesResourceApi res = new api.GenomicsApi(mock).references.
bases; | |
| 5662 var arg_referenceId = "foo"; | |
| 5663 var arg_end = "foo"; | |
| 5664 var arg_pageSize = 42; | |
| 5665 var arg_pageToken = "foo"; | |
| 5666 var arg_start = "foo"; | |
| 5667 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 5668 var path = (req.url).path; | |
| 5669 var pathOffset = 0; | |
| 5670 var index; | |
| 5671 var subPart; | |
| 5672 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 5673 pathOffset += 1; | |
| 5674 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("genomics/v1beta2/")); | |
| 5675 pathOffset += 17; | |
| 5676 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("references/")); | |
| 5677 pathOffset += 11; | |
| 5678 index = path.indexOf("/bases", pathOffset); | |
| 5679 unittest.expect(index >= 0, unittest.isTrue); | |
| 5680 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 5681 pathOffset = index; | |
| 5682 unittest.expect(subPart, unittest.equals("$arg_referenceId")); | |
| 5683 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ
als("/bases")); | |
| 5684 pathOffset += 6; | |
| 5685 | |
| 5686 var query = (req.url).query; | |
| 5687 var queryOffset = 0; | |
| 5688 var queryMap = {}; | |
| 5689 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 5690 parseBool(n) { | |
| 5691 if (n == "true") return true; | |
| 5692 if (n == "false") return false; | |
| 5693 if (n == null) return null; | |
| 5694 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 5695 } | |
| 5696 if (query.length > 0) { | |
| 5697 for (var part in query.split("&")) { | |
| 5698 var keyvalue = part.split("="); | |
| 5699 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 5700 } | |
| 5701 } | |
| 5702 unittest.expect(queryMap["end"].first, unittest.equals(arg_end)); | |
| 5703 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); | |
| 5704 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 5705 unittest.expect(queryMap["start"].first, unittest.equals(arg_start)); | |
| 5706 | |
| 5707 | |
| 5708 var h = { | |
| 5709 "content-type" : "application/json; charset=utf-8", | |
| 5710 }; | |
| 5711 var resp = convert.JSON.encode(buildListBasesResponse()); | |
| 5712 return new async.Future.value(stringResponse(200, h, resp)); | |
| 5713 }), true); | |
| 5714 res.list(arg_referenceId, end: arg_end, pageSize: arg_pageSize, pageToken:
arg_pageToken, start: arg_start).then(unittest.expectAsync(((api.ListBasesRespo
nse response) { | |
| 5715 checkListBasesResponse(response); | |
| 5716 }))); | |
| 5717 }); | |
| 5718 | |
| 5719 }); | |
| 5720 | |
| 5721 | |
| 5722 unittest.group("resource-ReferencesetsResourceApi", () { | |
| 5723 unittest.test("method--get", () { | |
| 5724 | |
| 5725 var mock = new HttpServerMock(); | |
| 5726 api.ReferencesetsResourceApi res = new api.GenomicsApi(mock).referencesets
; | |
| 5727 var arg_referenceSetId = "foo"; | |
| 5728 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 5729 var path = (req.url).path; | |
| 5730 var pathOffset = 0; | |
| 5731 var index; | |
| 5732 var subPart; | |
| 5733 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 5734 pathOffset += 1; | |
| 5735 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("genomics/v1beta2/")); | |
| 5736 pathOffset += 17; | |
| 5737 unittest.expect(path.substring(pathOffset, pathOffset + 14), unittest.eq
uals("referencesets/")); | |
| 5738 pathOffset += 14; | |
| 5739 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 5740 pathOffset = path.length; | |
| 5741 unittest.expect(subPart, unittest.equals("$arg_referenceSetId")); | |
| 5742 | |
| 5743 var query = (req.url).query; | |
| 5744 var queryOffset = 0; | |
| 5745 var queryMap = {}; | |
| 5746 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 5747 parseBool(n) { | |
| 5748 if (n == "true") return true; | |
| 5749 if (n == "false") return false; | |
| 5750 if (n == null) return null; | |
| 5751 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 5752 } | |
| 5753 if (query.length > 0) { | |
| 5754 for (var part in query.split("&")) { | |
| 5755 var keyvalue = part.split("="); | |
| 5756 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 5757 } | |
| 5758 } | |
| 5759 | |
| 5760 | |
| 5761 var h = { | |
| 5762 "content-type" : "application/json; charset=utf-8", | |
| 5763 }; | |
| 5764 var resp = convert.JSON.encode(buildReferenceSet()); | |
| 5765 return new async.Future.value(stringResponse(200, h, resp)); | |
| 5766 }), true); | |
| 5767 res.get(arg_referenceSetId).then(unittest.expectAsync(((api.ReferenceSet r
esponse) { | |
| 5768 checkReferenceSet(response); | |
| 5769 }))); | |
| 5770 }); | |
| 5771 | |
| 5772 unittest.test("method--search", () { | |
| 5773 | |
| 5774 var mock = new HttpServerMock(); | |
| 5775 api.ReferencesetsResourceApi res = new api.GenomicsApi(mock).referencesets
; | |
| 5776 var arg_request = buildSearchReferenceSetsRequest(); | |
| 5777 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 5778 var obj = new api.SearchReferenceSetsRequest.fromJson(json); | |
| 5779 checkSearchReferenceSetsRequest(obj); | |
| 5780 | |
| 5781 var path = (req.url).path; | |
| 5782 var pathOffset = 0; | |
| 5783 var index; | |
| 5784 var subPart; | |
| 5785 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 5786 pathOffset += 1; | |
| 5787 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("genomics/v1beta2/")); | |
| 5788 pathOffset += 17; | |
| 5789 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("referencesets/search")); | |
| 5790 pathOffset += 20; | |
| 5791 | |
| 5792 var query = (req.url).query; | |
| 5793 var queryOffset = 0; | |
| 5794 var queryMap = {}; | |
| 5795 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 5796 parseBool(n) { | |
| 5797 if (n == "true") return true; | |
| 5798 if (n == "false") return false; | |
| 5799 if (n == null) return null; | |
| 5800 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 5801 } | |
| 5802 if (query.length > 0) { | |
| 5803 for (var part in query.split("&")) { | |
| 5804 var keyvalue = part.split("="); | |
| 5805 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 5806 } | |
| 5807 } | |
| 5808 | |
| 5809 | |
| 5810 var h = { | |
| 5811 "content-type" : "application/json; charset=utf-8", | |
| 5812 }; | |
| 5813 var resp = convert.JSON.encode(buildSearchReferenceSetsResponse()); | |
| 5814 return new async.Future.value(stringResponse(200, h, resp)); | |
| 5815 }), true); | |
| 5816 res.search(arg_request).then(unittest.expectAsync(((api.SearchReferenceSet
sResponse response) { | |
| 5817 checkSearchReferenceSetsResponse(response); | |
| 5818 }))); | |
| 5819 }); | |
| 5820 | |
| 5821 }); | |
| 5822 | |
| 5823 | |
| 5824 unittest.group("resource-VariantsResourceApi", () { | |
| 5825 unittest.test("method--create", () { | |
| 5826 | |
| 5827 var mock = new HttpServerMock(); | |
| 5828 api.VariantsResourceApi res = new api.GenomicsApi(mock).variants; | |
| 5829 var arg_request = buildVariant(); | |
| 5830 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 5831 var obj = new api.Variant.fromJson(json); | |
| 5832 checkVariant(obj); | |
| 5833 | |
| 5834 var path = (req.url).path; | |
| 5835 var pathOffset = 0; | |
| 5836 var index; | |
| 5837 var subPart; | |
| 5838 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 5839 pathOffset += 1; | |
| 5840 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("genomics/v1beta2/")); | |
| 5841 pathOffset += 17; | |
| 5842 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("variants")); | |
| 5843 pathOffset += 8; | |
| 5844 | |
| 5845 var query = (req.url).query; | |
| 5846 var queryOffset = 0; | |
| 5847 var queryMap = {}; | |
| 5848 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 5849 parseBool(n) { | |
| 5850 if (n == "true") return true; | |
| 5851 if (n == "false") return false; | |
| 5852 if (n == null) return null; | |
| 5853 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 5854 } | |
| 5855 if (query.length > 0) { | |
| 5856 for (var part in query.split("&")) { | |
| 5857 var keyvalue = part.split("="); | |
| 5858 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 5859 } | |
| 5860 } | |
| 5861 | |
| 5862 | |
| 5863 var h = { | |
| 5864 "content-type" : "application/json; charset=utf-8", | |
| 5865 }; | |
| 5866 var resp = convert.JSON.encode(buildVariant()); | |
| 5867 return new async.Future.value(stringResponse(200, h, resp)); | |
| 5868 }), true); | |
| 5869 res.create(arg_request).then(unittest.expectAsync(((api.Variant response)
{ | |
| 5870 checkVariant(response); | |
| 5871 }))); | |
| 5872 }); | |
| 5873 | |
| 5874 unittest.test("method--delete", () { | |
| 5875 | |
| 5876 var mock = new HttpServerMock(); | |
| 5877 api.VariantsResourceApi res = new api.GenomicsApi(mock).variants; | |
| 5878 var arg_variantId = "foo"; | |
| 5879 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 5880 var path = (req.url).path; | |
| 5881 var pathOffset = 0; | |
| 5882 var index; | |
| 5883 var subPart; | |
| 5884 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 5885 pathOffset += 1; | |
| 5886 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("genomics/v1beta2/")); | |
| 5887 pathOffset += 17; | |
| 5888 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("variants/")); | |
| 5889 pathOffset += 9; | |
| 5890 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 5891 pathOffset = path.length; | |
| 5892 unittest.expect(subPart, unittest.equals("$arg_variantId")); | |
| 5893 | |
| 5894 var query = (req.url).query; | |
| 5895 var queryOffset = 0; | |
| 5896 var queryMap = {}; | |
| 5897 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 5898 parseBool(n) { | |
| 5899 if (n == "true") return true; | |
| 5900 if (n == "false") return false; | |
| 5901 if (n == null) return null; | |
| 5902 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 5903 } | |
| 5904 if (query.length > 0) { | |
| 5905 for (var part in query.split("&")) { | |
| 5906 var keyvalue = part.split("="); | |
| 5907 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 5908 } | |
| 5909 } | |
| 5910 | |
| 5911 | |
| 5912 var h = { | |
| 5913 "content-type" : "application/json; charset=utf-8", | |
| 5914 }; | |
| 5915 var resp = ""; | |
| 5916 return new async.Future.value(stringResponse(200, h, resp)); | |
| 5917 }), true); | |
| 5918 res.delete(arg_variantId).then(unittest.expectAsync((_) {})); | |
| 5919 }); | |
| 5920 | |
| 5921 unittest.test("method--get", () { | |
| 5922 | |
| 5923 var mock = new HttpServerMock(); | |
| 5924 api.VariantsResourceApi res = new api.GenomicsApi(mock).variants; | |
| 5925 var arg_variantId = "foo"; | |
| 5926 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 5927 var path = (req.url).path; | |
| 5928 var pathOffset = 0; | |
| 5929 var index; | |
| 5930 var subPart; | |
| 5931 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 5932 pathOffset += 1; | |
| 5933 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("genomics/v1beta2/")); | |
| 5934 pathOffset += 17; | |
| 5935 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("variants/")); | |
| 5936 pathOffset += 9; | |
| 5937 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 5938 pathOffset = path.length; | |
| 5939 unittest.expect(subPart, unittest.equals("$arg_variantId")); | |
| 5940 | |
| 5941 var query = (req.url).query; | |
| 5942 var queryOffset = 0; | |
| 5943 var queryMap = {}; | |
| 5944 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 5945 parseBool(n) { | |
| 5946 if (n == "true") return true; | |
| 5947 if (n == "false") return false; | |
| 5948 if (n == null) return null; | |
| 5949 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 5950 } | |
| 5951 if (query.length > 0) { | |
| 5952 for (var part in query.split("&")) { | |
| 5953 var keyvalue = part.split("="); | |
| 5954 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 5955 } | |
| 5956 } | |
| 5957 | |
| 5958 | |
| 5959 var h = { | |
| 5960 "content-type" : "application/json; charset=utf-8", | |
| 5961 }; | |
| 5962 var resp = convert.JSON.encode(buildVariant()); | |
| 5963 return new async.Future.value(stringResponse(200, h, resp)); | |
| 5964 }), true); | |
| 5965 res.get(arg_variantId).then(unittest.expectAsync(((api.Variant response) { | |
| 5966 checkVariant(response); | |
| 5967 }))); | |
| 5968 }); | |
| 5969 | |
| 5970 unittest.test("method--search", () { | |
| 5971 | |
| 5972 var mock = new HttpServerMock(); | |
| 5973 api.VariantsResourceApi res = new api.GenomicsApi(mock).variants; | |
| 5974 var arg_request = buildSearchVariantsRequest(); | |
| 5975 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 5976 var obj = new api.SearchVariantsRequest.fromJson(json); | |
| 5977 checkSearchVariantsRequest(obj); | |
| 5978 | |
| 5979 var path = (req.url).path; | |
| 5980 var pathOffset = 0; | |
| 5981 var index; | |
| 5982 var subPart; | |
| 5983 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 5984 pathOffset += 1; | |
| 5985 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("genomics/v1beta2/")); | |
| 5986 pathOffset += 17; | |
| 5987 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("variants/search")); | |
| 5988 pathOffset += 15; | |
| 5989 | |
| 5990 var query = (req.url).query; | |
| 5991 var queryOffset = 0; | |
| 5992 var queryMap = {}; | |
| 5993 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 5994 parseBool(n) { | |
| 5995 if (n == "true") return true; | |
| 5996 if (n == "false") return false; | |
| 5997 if (n == null) return null; | |
| 5998 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 5999 } | |
| 6000 if (query.length > 0) { | |
| 6001 for (var part in query.split("&")) { | |
| 6002 var keyvalue = part.split("="); | |
| 6003 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 6004 } | |
| 6005 } | |
| 6006 | |
| 6007 | |
| 6008 var h = { | |
| 6009 "content-type" : "application/json; charset=utf-8", | |
| 6010 }; | |
| 6011 var resp = convert.JSON.encode(buildSearchVariantsResponse()); | |
| 6012 return new async.Future.value(stringResponse(200, h, resp)); | |
| 6013 }), true); | |
| 6014 res.search(arg_request).then(unittest.expectAsync(((api.SearchVariantsResp
onse response) { | |
| 6015 checkSearchVariantsResponse(response); | |
| 6016 }))); | |
| 6017 }); | |
| 6018 | |
| 6019 unittest.test("method--update", () { | |
| 6020 | |
| 6021 var mock = new HttpServerMock(); | |
| 6022 api.VariantsResourceApi res = new api.GenomicsApi(mock).variants; | |
| 6023 var arg_request = buildVariant(); | |
| 6024 var arg_variantId = "foo"; | |
| 6025 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 6026 var obj = new api.Variant.fromJson(json); | |
| 6027 checkVariant(obj); | |
| 6028 | |
| 6029 var path = (req.url).path; | |
| 6030 var pathOffset = 0; | |
| 6031 var index; | |
| 6032 var subPart; | |
| 6033 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 6034 pathOffset += 1; | |
| 6035 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("genomics/v1beta2/")); | |
| 6036 pathOffset += 17; | |
| 6037 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("variants/")); | |
| 6038 pathOffset += 9; | |
| 6039 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 6040 pathOffset = path.length; | |
| 6041 unittest.expect(subPart, unittest.equals("$arg_variantId")); | |
| 6042 | |
| 6043 var query = (req.url).query; | |
| 6044 var queryOffset = 0; | |
| 6045 var queryMap = {}; | |
| 6046 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 6047 parseBool(n) { | |
| 6048 if (n == "true") return true; | |
| 6049 if (n == "false") return false; | |
| 6050 if (n == null) return null; | |
| 6051 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 6052 } | |
| 6053 if (query.length > 0) { | |
| 6054 for (var part in query.split("&")) { | |
| 6055 var keyvalue = part.split("="); | |
| 6056 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 6057 } | |
| 6058 } | |
| 6059 | |
| 6060 | |
| 6061 var h = { | |
| 6062 "content-type" : "application/json; charset=utf-8", | |
| 6063 }; | |
| 6064 var resp = convert.JSON.encode(buildVariant()); | |
| 6065 return new async.Future.value(stringResponse(200, h, resp)); | |
| 6066 }), true); | |
| 6067 res.update(arg_request, arg_variantId).then(unittest.expectAsync(((api.Var
iant response) { | |
| 6068 checkVariant(response); | |
| 6069 }))); | |
| 6070 }); | |
| 6071 | |
| 6072 }); | |
| 6073 | |
| 6074 | |
| 6075 unittest.group("resource-VariantsetsResourceApi", () { | |
| 6076 unittest.test("method--create", () { | |
| 6077 | |
| 6078 var mock = new HttpServerMock(); | |
| 6079 api.VariantsetsResourceApi res = new api.GenomicsApi(mock).variantsets; | |
| 6080 var arg_request = buildVariantSet(); | |
| 6081 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 6082 var obj = new api.VariantSet.fromJson(json); | |
| 6083 checkVariantSet(obj); | |
| 6084 | |
| 6085 var path = (req.url).path; | |
| 6086 var pathOffset = 0; | |
| 6087 var index; | |
| 6088 var subPart; | |
| 6089 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 6090 pathOffset += 1; | |
| 6091 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("genomics/v1beta2/")); | |
| 6092 pathOffset += 17; | |
| 6093 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("variantsets")); | |
| 6094 pathOffset += 11; | |
| 6095 | |
| 6096 var query = (req.url).query; | |
| 6097 var queryOffset = 0; | |
| 6098 var queryMap = {}; | |
| 6099 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 6100 parseBool(n) { | |
| 6101 if (n == "true") return true; | |
| 6102 if (n == "false") return false; | |
| 6103 if (n == null) return null; | |
| 6104 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 6105 } | |
| 6106 if (query.length > 0) { | |
| 6107 for (var part in query.split("&")) { | |
| 6108 var keyvalue = part.split("="); | |
| 6109 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 6110 } | |
| 6111 } | |
| 6112 | |
| 6113 | |
| 6114 var h = { | |
| 6115 "content-type" : "application/json; charset=utf-8", | |
| 6116 }; | |
| 6117 var resp = convert.JSON.encode(buildVariantSet()); | |
| 6118 return new async.Future.value(stringResponse(200, h, resp)); | |
| 6119 }), true); | |
| 6120 res.create(arg_request).then(unittest.expectAsync(((api.VariantSet respons
e) { | |
| 6121 checkVariantSet(response); | |
| 6122 }))); | |
| 6123 }); | |
| 6124 | |
| 6125 unittest.test("method--delete", () { | |
| 6126 | |
| 6127 var mock = new HttpServerMock(); | |
| 6128 api.VariantsetsResourceApi res = new api.GenomicsApi(mock).variantsets; | |
| 6129 var arg_variantSetId = "foo"; | |
| 6130 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 6131 var path = (req.url).path; | |
| 6132 var pathOffset = 0; | |
| 6133 var index; | |
| 6134 var subPart; | |
| 6135 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 6136 pathOffset += 1; | |
| 6137 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("genomics/v1beta2/")); | |
| 6138 pathOffset += 17; | |
| 6139 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("variantsets/")); | |
| 6140 pathOffset += 12; | |
| 6141 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 6142 pathOffset = path.length; | |
| 6143 unittest.expect(subPart, unittest.equals("$arg_variantSetId")); | |
| 6144 | |
| 6145 var query = (req.url).query; | |
| 6146 var queryOffset = 0; | |
| 6147 var queryMap = {}; | |
| 6148 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 6149 parseBool(n) { | |
| 6150 if (n == "true") return true; | |
| 6151 if (n == "false") return false; | |
| 6152 if (n == null) return null; | |
| 6153 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 6154 } | |
| 6155 if (query.length > 0) { | |
| 6156 for (var part in query.split("&")) { | |
| 6157 var keyvalue = part.split("="); | |
| 6158 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 6159 } | |
| 6160 } | |
| 6161 | |
| 6162 | |
| 6163 var h = { | |
| 6164 "content-type" : "application/json; charset=utf-8", | |
| 6165 }; | |
| 6166 var resp = ""; | |
| 6167 return new async.Future.value(stringResponse(200, h, resp)); | |
| 6168 }), true); | |
| 6169 res.delete(arg_variantSetId).then(unittest.expectAsync((_) {})); | |
| 6170 }); | |
| 6171 | |
| 6172 unittest.test("method--export", () { | |
| 6173 | |
| 6174 var mock = new HttpServerMock(); | |
| 6175 api.VariantsetsResourceApi res = new api.GenomicsApi(mock).variantsets; | |
| 6176 var arg_request = buildExportVariantSetRequest(); | |
| 6177 var arg_variantSetId = "foo"; | |
| 6178 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 6179 var obj = new api.ExportVariantSetRequest.fromJson(json); | |
| 6180 checkExportVariantSetRequest(obj); | |
| 6181 | |
| 6182 var path = (req.url).path; | |
| 6183 var pathOffset = 0; | |
| 6184 var index; | |
| 6185 var subPart; | |
| 6186 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 6187 pathOffset += 1; | |
| 6188 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("genomics/v1beta2/")); | |
| 6189 pathOffset += 17; | |
| 6190 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("variantsets/")); | |
| 6191 pathOffset += 12; | |
| 6192 index = path.indexOf("/export", pathOffset); | |
| 6193 unittest.expect(index >= 0, unittest.isTrue); | |
| 6194 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 6195 pathOffset = index; | |
| 6196 unittest.expect(subPart, unittest.equals("$arg_variantSetId")); | |
| 6197 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ
als("/export")); | |
| 6198 pathOffset += 7; | |
| 6199 | |
| 6200 var query = (req.url).query; | |
| 6201 var queryOffset = 0; | |
| 6202 var queryMap = {}; | |
| 6203 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 6204 parseBool(n) { | |
| 6205 if (n == "true") return true; | |
| 6206 if (n == "false") return false; | |
| 6207 if (n == null) return null; | |
| 6208 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 6209 } | |
| 6210 if (query.length > 0) { | |
| 6211 for (var part in query.split("&")) { | |
| 6212 var keyvalue = part.split("="); | |
| 6213 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 6214 } | |
| 6215 } | |
| 6216 | |
| 6217 | |
| 6218 var h = { | |
| 6219 "content-type" : "application/json; charset=utf-8", | |
| 6220 }; | |
| 6221 var resp = convert.JSON.encode(buildExportVariantSetResponse()); | |
| 6222 return new async.Future.value(stringResponse(200, h, resp)); | |
| 6223 }), true); | |
| 6224 res.export(arg_request, arg_variantSetId).then(unittest.expectAsync(((api.
ExportVariantSetResponse response) { | |
| 6225 checkExportVariantSetResponse(response); | |
| 6226 }))); | |
| 6227 }); | |
| 6228 | |
| 6229 unittest.test("method--get", () { | |
| 6230 | |
| 6231 var mock = new HttpServerMock(); | |
| 6232 api.VariantsetsResourceApi res = new api.GenomicsApi(mock).variantsets; | |
| 6233 var arg_variantSetId = "foo"; | |
| 6234 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 6235 var path = (req.url).path; | |
| 6236 var pathOffset = 0; | |
| 6237 var index; | |
| 6238 var subPart; | |
| 6239 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 6240 pathOffset += 1; | |
| 6241 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("genomics/v1beta2/")); | |
| 6242 pathOffset += 17; | |
| 6243 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("variantsets/")); | |
| 6244 pathOffset += 12; | |
| 6245 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 6246 pathOffset = path.length; | |
| 6247 unittest.expect(subPart, unittest.equals("$arg_variantSetId")); | |
| 6248 | |
| 6249 var query = (req.url).query; | |
| 6250 var queryOffset = 0; | |
| 6251 var queryMap = {}; | |
| 6252 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 6253 parseBool(n) { | |
| 6254 if (n == "true") return true; | |
| 6255 if (n == "false") return false; | |
| 6256 if (n == null) return null; | |
| 6257 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 6258 } | |
| 6259 if (query.length > 0) { | |
| 6260 for (var part in query.split("&")) { | |
| 6261 var keyvalue = part.split("="); | |
| 6262 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 6263 } | |
| 6264 } | |
| 6265 | |
| 6266 | |
| 6267 var h = { | |
| 6268 "content-type" : "application/json; charset=utf-8", | |
| 6269 }; | |
| 6270 var resp = convert.JSON.encode(buildVariantSet()); | |
| 6271 return new async.Future.value(stringResponse(200, h, resp)); | |
| 6272 }), true); | |
| 6273 res.get(arg_variantSetId).then(unittest.expectAsync(((api.VariantSet respo
nse) { | |
| 6274 checkVariantSet(response); | |
| 6275 }))); | |
| 6276 }); | |
| 6277 | |
| 6278 unittest.test("method--importVariants", () { | |
| 6279 | |
| 6280 var mock = new HttpServerMock(); | |
| 6281 api.VariantsetsResourceApi res = new api.GenomicsApi(mock).variantsets; | |
| 6282 var arg_request = buildImportVariantsRequest(); | |
| 6283 var arg_variantSetId = "foo"; | |
| 6284 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 6285 var obj = new api.ImportVariantsRequest.fromJson(json); | |
| 6286 checkImportVariantsRequest(obj); | |
| 6287 | |
| 6288 var path = (req.url).path; | |
| 6289 var pathOffset = 0; | |
| 6290 var index; | |
| 6291 var subPart; | |
| 6292 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 6293 pathOffset += 1; | |
| 6294 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("genomics/v1beta2/")); | |
| 6295 pathOffset += 17; | |
| 6296 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("variantsets/")); | |
| 6297 pathOffset += 12; | |
| 6298 index = path.indexOf("/importVariants", pathOffset); | |
| 6299 unittest.expect(index >= 0, unittest.isTrue); | |
| 6300 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 6301 pathOffset = index; | |
| 6302 unittest.expect(subPart, unittest.equals("$arg_variantSetId")); | |
| 6303 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/importVariants")); | |
| 6304 pathOffset += 15; | |
| 6305 | |
| 6306 var query = (req.url).query; | |
| 6307 var queryOffset = 0; | |
| 6308 var queryMap = {}; | |
| 6309 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 6310 parseBool(n) { | |
| 6311 if (n == "true") return true; | |
| 6312 if (n == "false") return false; | |
| 6313 if (n == null) return null; | |
| 6314 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 6315 } | |
| 6316 if (query.length > 0) { | |
| 6317 for (var part in query.split("&")) { | |
| 6318 var keyvalue = part.split("="); | |
| 6319 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 6320 } | |
| 6321 } | |
| 6322 | |
| 6323 | |
| 6324 var h = { | |
| 6325 "content-type" : "application/json; charset=utf-8", | |
| 6326 }; | |
| 6327 var resp = convert.JSON.encode(buildImportVariantsResponse()); | |
| 6328 return new async.Future.value(stringResponse(200, h, resp)); | |
| 6329 }), true); | |
| 6330 res.importVariants(arg_request, arg_variantSetId).then(unittest.expectAsyn
c(((api.ImportVariantsResponse response) { | |
| 6331 checkImportVariantsResponse(response); | |
| 6332 }))); | |
| 6333 }); | |
| 6334 | |
| 6335 unittest.test("method--mergeVariants", () { | |
| 6336 | |
| 6337 var mock = new HttpServerMock(); | |
| 6338 api.VariantsetsResourceApi res = new api.GenomicsApi(mock).variantsets; | |
| 6339 var arg_request = buildMergeVariantsRequest(); | |
| 6340 var arg_variantSetId = "foo"; | |
| 6341 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 6342 var obj = new api.MergeVariantsRequest.fromJson(json); | |
| 6343 checkMergeVariantsRequest(obj); | |
| 6344 | |
| 6345 var path = (req.url).path; | |
| 6346 var pathOffset = 0; | |
| 6347 var index; | |
| 6348 var subPart; | |
| 6349 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 6350 pathOffset += 1; | |
| 6351 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("genomics/v1beta2/")); | |
| 6352 pathOffset += 17; | |
| 6353 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("variantsets/")); | |
| 6354 pathOffset += 12; | |
| 6355 index = path.indexOf("/mergeVariants", pathOffset); | |
| 6356 unittest.expect(index >= 0, unittest.isTrue); | |
| 6357 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 6358 pathOffset = index; | |
| 6359 unittest.expect(subPart, unittest.equals("$arg_variantSetId")); | |
| 6360 unittest.expect(path.substring(pathOffset, pathOffset + 14), unittest.eq
uals("/mergeVariants")); | |
| 6361 pathOffset += 14; | |
| 6362 | |
| 6363 var query = (req.url).query; | |
| 6364 var queryOffset = 0; | |
| 6365 var queryMap = {}; | |
| 6366 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 6367 parseBool(n) { | |
| 6368 if (n == "true") return true; | |
| 6369 if (n == "false") return false; | |
| 6370 if (n == null) return null; | |
| 6371 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 6372 } | |
| 6373 if (query.length > 0) { | |
| 6374 for (var part in query.split("&")) { | |
| 6375 var keyvalue = part.split("="); | |
| 6376 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 6377 } | |
| 6378 } | |
| 6379 | |
| 6380 | |
| 6381 var h = { | |
| 6382 "content-type" : "application/json; charset=utf-8", | |
| 6383 }; | |
| 6384 var resp = ""; | |
| 6385 return new async.Future.value(stringResponse(200, h, resp)); | |
| 6386 }), true); | |
| 6387 res.mergeVariants(arg_request, arg_variantSetId).then(unittest.expectAsync
((_) {})); | |
| 6388 }); | |
| 6389 | |
| 6390 unittest.test("method--patch", () { | |
| 6391 | |
| 6392 var mock = new HttpServerMock(); | |
| 6393 api.VariantsetsResourceApi res = new api.GenomicsApi(mock).variantsets; | |
| 6394 var arg_request = buildVariantSet(); | |
| 6395 var arg_variantSetId = "foo"; | |
| 6396 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 6397 var obj = new api.VariantSet.fromJson(json); | |
| 6398 checkVariantSet(obj); | |
| 6399 | |
| 6400 var path = (req.url).path; | |
| 6401 var pathOffset = 0; | |
| 6402 var index; | |
| 6403 var subPart; | |
| 6404 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 6405 pathOffset += 1; | |
| 6406 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("genomics/v1beta2/")); | |
| 6407 pathOffset += 17; | |
| 6408 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("variantsets/")); | |
| 6409 pathOffset += 12; | |
| 6410 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 6411 pathOffset = path.length; | |
| 6412 unittest.expect(subPart, unittest.equals("$arg_variantSetId")); | |
| 6413 | |
| 6414 var query = (req.url).query; | |
| 6415 var queryOffset = 0; | |
| 6416 var queryMap = {}; | |
| 6417 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 6418 parseBool(n) { | |
| 6419 if (n == "true") return true; | |
| 6420 if (n == "false") return false; | |
| 6421 if (n == null) return null; | |
| 6422 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 6423 } | |
| 6424 if (query.length > 0) { | |
| 6425 for (var part in query.split("&")) { | |
| 6426 var keyvalue = part.split("="); | |
| 6427 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 6428 } | |
| 6429 } | |
| 6430 | |
| 6431 | |
| 6432 var h = { | |
| 6433 "content-type" : "application/json; charset=utf-8", | |
| 6434 }; | |
| 6435 var resp = convert.JSON.encode(buildVariantSet()); | |
| 6436 return new async.Future.value(stringResponse(200, h, resp)); | |
| 6437 }), true); | |
| 6438 res.patch(arg_request, arg_variantSetId).then(unittest.expectAsync(((api.V
ariantSet response) { | |
| 6439 checkVariantSet(response); | |
| 6440 }))); | |
| 6441 }); | |
| 6442 | |
| 6443 unittest.test("method--search", () { | |
| 6444 | |
| 6445 var mock = new HttpServerMock(); | |
| 6446 api.VariantsetsResourceApi res = new api.GenomicsApi(mock).variantsets; | |
| 6447 var arg_request = buildSearchVariantSetsRequest(); | |
| 6448 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 6449 var obj = new api.SearchVariantSetsRequest.fromJson(json); | |
| 6450 checkSearchVariantSetsRequest(obj); | |
| 6451 | |
| 6452 var path = (req.url).path; | |
| 6453 var pathOffset = 0; | |
| 6454 var index; | |
| 6455 var subPart; | |
| 6456 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 6457 pathOffset += 1; | |
| 6458 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("genomics/v1beta2/")); | |
| 6459 pathOffset += 17; | |
| 6460 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("variantsets/search")); | |
| 6461 pathOffset += 18; | |
| 6462 | |
| 6463 var query = (req.url).query; | |
| 6464 var queryOffset = 0; | |
| 6465 var queryMap = {}; | |
| 6466 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 6467 parseBool(n) { | |
| 6468 if (n == "true") return true; | |
| 6469 if (n == "false") return false; | |
| 6470 if (n == null) return null; | |
| 6471 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 6472 } | |
| 6473 if (query.length > 0) { | |
| 6474 for (var part in query.split("&")) { | |
| 6475 var keyvalue = part.split("="); | |
| 6476 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 6477 } | |
| 6478 } | |
| 6479 | |
| 6480 | |
| 6481 var h = { | |
| 6482 "content-type" : "application/json; charset=utf-8", | |
| 6483 }; | |
| 6484 var resp = convert.JSON.encode(buildSearchVariantSetsResponse()); | |
| 6485 return new async.Future.value(stringResponse(200, h, resp)); | |
| 6486 }), true); | |
| 6487 res.search(arg_request).then(unittest.expectAsync(((api.SearchVariantSetsR
esponse response) { | |
| 6488 checkSearchVariantSetsResponse(response); | |
| 6489 }))); | |
| 6490 }); | |
| 6491 | |
| 6492 unittest.test("method--update", () { | |
| 6493 | |
| 6494 var mock = new HttpServerMock(); | |
| 6495 api.VariantsetsResourceApi res = new api.GenomicsApi(mock).variantsets; | |
| 6496 var arg_request = buildVariantSet(); | |
| 6497 var arg_variantSetId = "foo"; | |
| 6498 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 6499 var obj = new api.VariantSet.fromJson(json); | |
| 6500 checkVariantSet(obj); | |
| 6501 | |
| 6502 var path = (req.url).path; | |
| 6503 var pathOffset = 0; | |
| 6504 var index; | |
| 6505 var subPart; | |
| 6506 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 6507 pathOffset += 1; | |
| 6508 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("genomics/v1beta2/")); | |
| 6509 pathOffset += 17; | |
| 6510 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("variantsets/")); | |
| 6511 pathOffset += 12; | |
| 6512 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 6513 pathOffset = path.length; | |
| 6514 unittest.expect(subPart, unittest.equals("$arg_variantSetId")); | |
| 6515 | |
| 6516 var query = (req.url).query; | |
| 6517 var queryOffset = 0; | |
| 6518 var queryMap = {}; | |
| 6519 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 6520 parseBool(n) { | |
| 6521 if (n == "true") return true; | |
| 6522 if (n == "false") return false; | |
| 6523 if (n == null) return null; | |
| 6524 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 6525 } | |
| 6526 if (query.length > 0) { | |
| 6527 for (var part in query.split("&")) { | |
| 6528 var keyvalue = part.split("="); | |
| 6529 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 6530 } | |
| 6531 } | |
| 6532 | |
| 6533 | |
| 6534 var h = { | |
| 6535 "content-type" : "application/json; charset=utf-8", | |
| 6536 }; | |
| 6537 var resp = convert.JSON.encode(buildVariantSet()); | |
| 6538 return new async.Future.value(stringResponse(200, h, resp)); | |
| 6539 }), true); | |
| 6540 res.update(arg_request, arg_variantSetId).then(unittest.expectAsync(((api.
VariantSet response) { | |
| 6541 checkVariantSet(response); | |
| 6542 }))); | |
| 6543 }); | |
| 6544 | |
| 6545 }); | |
| 6546 | |
| 6547 | |
| 6548 } | |
| 6549 | |
| OLD | NEW |