Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 1 | library googleapis.books.v1.test; |
| 2 | |
| 3 | import "dart:core" as core; |
| 4 | import "dart:async" as async; |
| 5 | import "dart:convert" as convert; |
| 6 | |
| 7 | import 'package:http/http.dart' as http; |
| 8 | import 'package:test/test.dart' as unittest; |
| 9 | |
| 10 | import 'package:googleapis/books/v1.dart' as api; |
| 11 | |
| 12 | class HttpServerMock extends http.BaseClient { |
| 13 | core.Function _callback; |
| 14 | core.bool _expectJson; |
| 15 | |
| 16 | void register(core.Function callback, core.bool expectJson) { |
| 17 | _callback = callback; |
| 18 | _expectJson = expectJson; |
| 19 | } |
| 20 | |
| 21 | async.Future<http.StreamedResponse> send(http.BaseRequest request) { |
| 22 | if (_expectJson) { |
| 23 | return request |
| 24 | .finalize() |
| 25 | .transform(convert.UTF8.decoder) |
| 26 | .join('') |
| 27 | .then((core.String jsonString) { |
| 28 | if (jsonString.isEmpty) { |
| 29 | return _callback(request, null); |
| 30 | } else { |
| 31 | return _callback(request, convert.JSON.decode(jsonString)); |
| 32 | } |
| 33 | }); |
| 34 | } else { |
| 35 | var stream = request.finalize(); |
| 36 | if (stream == null) { |
| 37 | return _callback(request, []); |
| 38 | } else { |
| 39 | return stream.toBytes().then((data) { |
| 40 | return _callback(request, data); |
| 41 | }); |
| 42 | } |
| 43 | } |
| 44 | } |
| 45 | } |
| 46 | |
| 47 | http.StreamedResponse stringResponse(core.int status, |
| 48 | core.Map<core.String, core.String> headers, core.String body) { |
| 49 | var stream = new async.Stream.fromIterable([convert.UTF8.encode(body)]); |
| 50 | return new http.StreamedResponse(stream, status, headers: headers); |
| 51 | } |
| 52 | |
| 53 | core.int buildCounterAnnotationClientVersionRanges = 0; |
| 54 | buildAnnotationClientVersionRanges() { |
| 55 | var o = new api.AnnotationClientVersionRanges(); |
| 56 | buildCounterAnnotationClientVersionRanges++; |
| 57 | if (buildCounterAnnotationClientVersionRanges < 3) { |
| 58 | o.cfiRange = buildBooksAnnotationsRange(); |
| 59 | o.contentVersion = "foo"; |
| 60 | o.gbImageRange = buildBooksAnnotationsRange(); |
| 61 | o.gbTextRange = buildBooksAnnotationsRange(); |
| 62 | o.imageCfiRange = buildBooksAnnotationsRange(); |
| 63 | } |
| 64 | buildCounterAnnotationClientVersionRanges--; |
| 65 | return o; |
| 66 | } |
| 67 | |
| 68 | checkAnnotationClientVersionRanges(api.AnnotationClientVersionRanges o) { |
| 69 | buildCounterAnnotationClientVersionRanges++; |
| 70 | if (buildCounterAnnotationClientVersionRanges < 3) { |
| 71 | checkBooksAnnotationsRange(o.cfiRange); |
| 72 | unittest.expect(o.contentVersion, unittest.equals('foo')); |
| 73 | checkBooksAnnotationsRange(o.gbImageRange); |
| 74 | checkBooksAnnotationsRange(o.gbTextRange); |
| 75 | checkBooksAnnotationsRange(o.imageCfiRange); |
| 76 | } |
| 77 | buildCounterAnnotationClientVersionRanges--; |
| 78 | } |
| 79 | |
| 80 | core.int buildCounterAnnotationCurrentVersionRanges = 0; |
| 81 | buildAnnotationCurrentVersionRanges() { |
| 82 | var o = new api.AnnotationCurrentVersionRanges(); |
| 83 | buildCounterAnnotationCurrentVersionRanges++; |
| 84 | if (buildCounterAnnotationCurrentVersionRanges < 3) { |
| 85 | o.cfiRange = buildBooksAnnotationsRange(); |
| 86 | o.contentVersion = "foo"; |
| 87 | o.gbImageRange = buildBooksAnnotationsRange(); |
| 88 | o.gbTextRange = buildBooksAnnotationsRange(); |
| 89 | o.imageCfiRange = buildBooksAnnotationsRange(); |
| 90 | } |
| 91 | buildCounterAnnotationCurrentVersionRanges--; |
| 92 | return o; |
| 93 | } |
| 94 | |
| 95 | checkAnnotationCurrentVersionRanges(api.AnnotationCurrentVersionRanges o) { |
| 96 | buildCounterAnnotationCurrentVersionRanges++; |
| 97 | if (buildCounterAnnotationCurrentVersionRanges < 3) { |
| 98 | checkBooksAnnotationsRange(o.cfiRange); |
| 99 | unittest.expect(o.contentVersion, unittest.equals('foo')); |
| 100 | checkBooksAnnotationsRange(o.gbImageRange); |
| 101 | checkBooksAnnotationsRange(o.gbTextRange); |
| 102 | checkBooksAnnotationsRange(o.imageCfiRange); |
| 103 | } |
| 104 | buildCounterAnnotationCurrentVersionRanges--; |
| 105 | } |
| 106 | |
| 107 | core.int buildCounterAnnotationLayerSummary = 0; |
| 108 | buildAnnotationLayerSummary() { |
| 109 | var o = new api.AnnotationLayerSummary(); |
| 110 | buildCounterAnnotationLayerSummary++; |
| 111 | if (buildCounterAnnotationLayerSummary < 3) { |
| 112 | o.allowedCharacterCount = 42; |
| 113 | o.limitType = "foo"; |
| 114 | o.remainingCharacterCount = 42; |
| 115 | } |
| 116 | buildCounterAnnotationLayerSummary--; |
| 117 | return o; |
| 118 | } |
| 119 | |
| 120 | checkAnnotationLayerSummary(api.AnnotationLayerSummary o) { |
| 121 | buildCounterAnnotationLayerSummary++; |
| 122 | if (buildCounterAnnotationLayerSummary < 3) { |
| 123 | unittest.expect(o.allowedCharacterCount, unittest.equals(42)); |
| 124 | unittest.expect(o.limitType, unittest.equals('foo')); |
| 125 | unittest.expect(o.remainingCharacterCount, unittest.equals(42)); |
| 126 | } |
| 127 | buildCounterAnnotationLayerSummary--; |
| 128 | } |
| 129 | |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 130 | buildUnnamed969() { |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 131 | var o = new core.List<core.String>(); |
| 132 | o.add("foo"); |
| 133 | o.add("foo"); |
| 134 | return o; |
| 135 | } |
| 136 | |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 137 | checkUnnamed969(core.List<core.String> o) { |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 138 | unittest.expect(o, unittest.hasLength(2)); |
| 139 | unittest.expect(o[0], unittest.equals('foo')); |
| 140 | unittest.expect(o[1], unittest.equals('foo')); |
| 141 | } |
| 142 | |
| 143 | core.int buildCounterAnnotation = 0; |
| 144 | buildAnnotation() { |
| 145 | var o = new api.Annotation(); |
| 146 | buildCounterAnnotation++; |
| 147 | if (buildCounterAnnotation < 3) { |
| 148 | o.afterSelectedText = "foo"; |
| 149 | o.beforeSelectedText = "foo"; |
| 150 | o.clientVersionRanges = buildAnnotationClientVersionRanges(); |
| 151 | o.created = core.DateTime.parse("2002-02-27T14:01:02"); |
| 152 | o.currentVersionRanges = buildAnnotationCurrentVersionRanges(); |
| 153 | o.data = "foo"; |
| 154 | o.deleted = true; |
| 155 | o.highlightStyle = "foo"; |
| 156 | o.id = "foo"; |
| 157 | o.kind = "foo"; |
| 158 | o.layerId = "foo"; |
| 159 | o.layerSummary = buildAnnotationLayerSummary(); |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 160 | o.pageIds = buildUnnamed969(); |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 161 | o.selectedText = "foo"; |
| 162 | o.selfLink = "foo"; |
| 163 | o.updated = core.DateTime.parse("2002-02-27T14:01:02"); |
| 164 | o.volumeId = "foo"; |
| 165 | } |
| 166 | buildCounterAnnotation--; |
| 167 | return o; |
| 168 | } |
| 169 | |
| 170 | checkAnnotation(api.Annotation o) { |
| 171 | buildCounterAnnotation++; |
| 172 | if (buildCounterAnnotation < 3) { |
| 173 | unittest.expect(o.afterSelectedText, unittest.equals('foo')); |
| 174 | unittest.expect(o.beforeSelectedText, unittest.equals('foo')); |
| 175 | checkAnnotationClientVersionRanges(o.clientVersionRanges); |
| 176 | unittest.expect( |
| 177 | o.created, unittest.equals(core.DateTime.parse("2002-02-27T14:01:02"))); |
| 178 | checkAnnotationCurrentVersionRanges(o.currentVersionRanges); |
| 179 | unittest.expect(o.data, unittest.equals('foo')); |
| 180 | unittest.expect(o.deleted, unittest.isTrue); |
| 181 | unittest.expect(o.highlightStyle, unittest.equals('foo')); |
| 182 | unittest.expect(o.id, unittest.equals('foo')); |
| 183 | unittest.expect(o.kind, unittest.equals('foo')); |
| 184 | unittest.expect(o.layerId, unittest.equals('foo')); |
| 185 | checkAnnotationLayerSummary(o.layerSummary); |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 186 | checkUnnamed969(o.pageIds); |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 187 | unittest.expect(o.selectedText, unittest.equals('foo')); |
| 188 | unittest.expect(o.selfLink, unittest.equals('foo')); |
| 189 | unittest.expect( |
| 190 | o.updated, unittest.equals(core.DateTime.parse("2002-02-27T14:01:02"))); |
| 191 | unittest.expect(o.volumeId, unittest.equals('foo')); |
| 192 | } |
| 193 | buildCounterAnnotation--; |
| 194 | } |
| 195 | |
| 196 | core.int buildCounterAnnotationdata = 0; |
| 197 | buildAnnotationdata() { |
| 198 | var o = new api.Annotationdata(); |
| 199 | buildCounterAnnotationdata++; |
| 200 | if (buildCounterAnnotationdata < 3) { |
| 201 | o.annotationType = "foo"; |
| 202 | o.data = { |
| 203 | 'list': [1, 2, 3], |
| 204 | 'bool': true, |
| 205 | 'string': 'foo' |
| 206 | }; |
| 207 | o.encodedData = "foo"; |
| 208 | o.id = "foo"; |
| 209 | o.kind = "foo"; |
| 210 | o.layerId = "foo"; |
| 211 | o.selfLink = "foo"; |
| 212 | o.updated = core.DateTime.parse("2002-02-27T14:01:02"); |
| 213 | o.volumeId = "foo"; |
| 214 | } |
| 215 | buildCounterAnnotationdata--; |
| 216 | return o; |
| 217 | } |
| 218 | |
| 219 | checkAnnotationdata(api.Annotationdata o) { |
| 220 | buildCounterAnnotationdata++; |
| 221 | if (buildCounterAnnotationdata < 3) { |
| 222 | unittest.expect(o.annotationType, unittest.equals('foo')); |
| 223 | var casted1 = (o.data) as core.Map; |
| 224 | unittest.expect(casted1, unittest.hasLength(3)); |
| 225 | unittest.expect(casted1["list"], unittest.equals([1, 2, 3])); |
| 226 | unittest.expect(casted1["bool"], unittest.equals(true)); |
| 227 | unittest.expect(casted1["string"], unittest.equals('foo')); |
| 228 | unittest.expect(o.encodedData, unittest.equals('foo')); |
| 229 | unittest.expect(o.id, unittest.equals('foo')); |
| 230 | unittest.expect(o.kind, unittest.equals('foo')); |
| 231 | unittest.expect(o.layerId, unittest.equals('foo')); |
| 232 | unittest.expect(o.selfLink, unittest.equals('foo')); |
| 233 | unittest.expect( |
| 234 | o.updated, unittest.equals(core.DateTime.parse("2002-02-27T14:01:02"))); |
| 235 | unittest.expect(o.volumeId, unittest.equals('foo')); |
| 236 | } |
| 237 | buildCounterAnnotationdata--; |
| 238 | } |
| 239 | |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 240 | buildUnnamed970() { |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 241 | var o = new core.List<api.Annotation>(); |
| 242 | o.add(buildAnnotation()); |
| 243 | o.add(buildAnnotation()); |
| 244 | return o; |
| 245 | } |
| 246 | |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 247 | checkUnnamed970(core.List<api.Annotation> o) { |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 248 | unittest.expect(o, unittest.hasLength(2)); |
| 249 | checkAnnotation(o[0]); |
| 250 | checkAnnotation(o[1]); |
| 251 | } |
| 252 | |
| 253 | core.int buildCounterAnnotations = 0; |
| 254 | buildAnnotations() { |
| 255 | var o = new api.Annotations(); |
| 256 | buildCounterAnnotations++; |
| 257 | if (buildCounterAnnotations < 3) { |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 258 | o.items = buildUnnamed970(); |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 259 | o.kind = "foo"; |
| 260 | o.nextPageToken = "foo"; |
| 261 | o.totalItems = 42; |
| 262 | } |
| 263 | buildCounterAnnotations--; |
| 264 | return o; |
| 265 | } |
| 266 | |
| 267 | checkAnnotations(api.Annotations o) { |
| 268 | buildCounterAnnotations++; |
| 269 | if (buildCounterAnnotations < 3) { |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 270 | checkUnnamed970(o.items); |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 271 | unittest.expect(o.kind, unittest.equals('foo')); |
| 272 | unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 273 | unittest.expect(o.totalItems, unittest.equals(42)); |
| 274 | } |
| 275 | buildCounterAnnotations--; |
| 276 | } |
| 277 | |
| 278 | core.int buildCounterAnnotationsSummaryLayers = 0; |
| 279 | buildAnnotationsSummaryLayers() { |
| 280 | var o = new api.AnnotationsSummaryLayers(); |
| 281 | buildCounterAnnotationsSummaryLayers++; |
| 282 | if (buildCounterAnnotationsSummaryLayers < 3) { |
| 283 | o.allowedCharacterCount = 42; |
| 284 | o.layerId = "foo"; |
| 285 | o.limitType = "foo"; |
| 286 | o.remainingCharacterCount = 42; |
| 287 | o.updated = core.DateTime.parse("2002-02-27T14:01:02"); |
| 288 | } |
| 289 | buildCounterAnnotationsSummaryLayers--; |
| 290 | return o; |
| 291 | } |
| 292 | |
| 293 | checkAnnotationsSummaryLayers(api.AnnotationsSummaryLayers o) { |
| 294 | buildCounterAnnotationsSummaryLayers++; |
| 295 | if (buildCounterAnnotationsSummaryLayers < 3) { |
| 296 | unittest.expect(o.allowedCharacterCount, unittest.equals(42)); |
| 297 | unittest.expect(o.layerId, unittest.equals('foo')); |
| 298 | unittest.expect(o.limitType, unittest.equals('foo')); |
| 299 | unittest.expect(o.remainingCharacterCount, unittest.equals(42)); |
| 300 | unittest.expect( |
| 301 | o.updated, unittest.equals(core.DateTime.parse("2002-02-27T14:01:02"))); |
| 302 | } |
| 303 | buildCounterAnnotationsSummaryLayers--; |
| 304 | } |
| 305 | |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 306 | buildUnnamed971() { |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 307 | var o = new core.List<api.AnnotationsSummaryLayers>(); |
| 308 | o.add(buildAnnotationsSummaryLayers()); |
| 309 | o.add(buildAnnotationsSummaryLayers()); |
| 310 | return o; |
| 311 | } |
| 312 | |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 313 | checkUnnamed971(core.List<api.AnnotationsSummaryLayers> o) { |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 314 | unittest.expect(o, unittest.hasLength(2)); |
| 315 | checkAnnotationsSummaryLayers(o[0]); |
| 316 | checkAnnotationsSummaryLayers(o[1]); |
| 317 | } |
| 318 | |
| 319 | core.int buildCounterAnnotationsSummary = 0; |
| 320 | buildAnnotationsSummary() { |
| 321 | var o = new api.AnnotationsSummary(); |
| 322 | buildCounterAnnotationsSummary++; |
| 323 | if (buildCounterAnnotationsSummary < 3) { |
| 324 | o.kind = "foo"; |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 325 | o.layers = buildUnnamed971(); |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 326 | } |
| 327 | buildCounterAnnotationsSummary--; |
| 328 | return o; |
| 329 | } |
| 330 | |
| 331 | checkAnnotationsSummary(api.AnnotationsSummary o) { |
| 332 | buildCounterAnnotationsSummary++; |
| 333 | if (buildCounterAnnotationsSummary < 3) { |
| 334 | unittest.expect(o.kind, unittest.equals('foo')); |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 335 | checkUnnamed971(o.layers); |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 336 | } |
| 337 | buildCounterAnnotationsSummary--; |
| 338 | } |
| 339 | |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 340 | buildUnnamed972() { |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 341 | var o = new core.List<api.Annotationdata>(); |
| 342 | o.add(buildAnnotationdata()); |
| 343 | o.add(buildAnnotationdata()); |
| 344 | return o; |
| 345 | } |
| 346 | |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 347 | checkUnnamed972(core.List<api.Annotationdata> o) { |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 348 | unittest.expect(o, unittest.hasLength(2)); |
| 349 | checkAnnotationdata(o[0]); |
| 350 | checkAnnotationdata(o[1]); |
| 351 | } |
| 352 | |
| 353 | core.int buildCounterAnnotationsdata = 0; |
| 354 | buildAnnotationsdata() { |
| 355 | var o = new api.Annotationsdata(); |
| 356 | buildCounterAnnotationsdata++; |
| 357 | if (buildCounterAnnotationsdata < 3) { |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 358 | o.items = buildUnnamed972(); |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 359 | o.kind = "foo"; |
| 360 | o.nextPageToken = "foo"; |
| 361 | o.totalItems = 42; |
| 362 | } |
| 363 | buildCounterAnnotationsdata--; |
| 364 | return o; |
| 365 | } |
| 366 | |
| 367 | checkAnnotationsdata(api.Annotationsdata o) { |
| 368 | buildCounterAnnotationsdata++; |
| 369 | if (buildCounterAnnotationsdata < 3) { |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 370 | checkUnnamed972(o.items); |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 371 | unittest.expect(o.kind, unittest.equals('foo')); |
| 372 | unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 373 | unittest.expect(o.totalItems, unittest.equals(42)); |
| 374 | } |
| 375 | buildCounterAnnotationsdata--; |
| 376 | } |
| 377 | |
| 378 | core.int buildCounterBooksAnnotationsRange = 0; |
| 379 | buildBooksAnnotationsRange() { |
| 380 | var o = new api.BooksAnnotationsRange(); |
| 381 | buildCounterBooksAnnotationsRange++; |
| 382 | if (buildCounterBooksAnnotationsRange < 3) { |
| 383 | o.endOffset = "foo"; |
| 384 | o.endPosition = "foo"; |
| 385 | o.startOffset = "foo"; |
| 386 | o.startPosition = "foo"; |
| 387 | } |
| 388 | buildCounterBooksAnnotationsRange--; |
| 389 | return o; |
| 390 | } |
| 391 | |
| 392 | checkBooksAnnotationsRange(api.BooksAnnotationsRange o) { |
| 393 | buildCounterBooksAnnotationsRange++; |
| 394 | if (buildCounterBooksAnnotationsRange < 3) { |
| 395 | unittest.expect(o.endOffset, unittest.equals('foo')); |
| 396 | unittest.expect(o.endPosition, unittest.equals('foo')); |
| 397 | unittest.expect(o.startOffset, unittest.equals('foo')); |
| 398 | unittest.expect(o.startPosition, unittest.equals('foo')); |
| 399 | } |
| 400 | buildCounterBooksAnnotationsRange--; |
| 401 | } |
| 402 | |
| 403 | core.int buildCounterBooksCloudloadingResource = 0; |
| 404 | buildBooksCloudloadingResource() { |
| 405 | var o = new api.BooksCloudloadingResource(); |
| 406 | buildCounterBooksCloudloadingResource++; |
| 407 | if (buildCounterBooksCloudloadingResource < 3) { |
| 408 | o.author = "foo"; |
| 409 | o.processingState = "foo"; |
| 410 | o.title = "foo"; |
| 411 | o.volumeId = "foo"; |
| 412 | } |
| 413 | buildCounterBooksCloudloadingResource--; |
| 414 | return o; |
| 415 | } |
| 416 | |
| 417 | checkBooksCloudloadingResource(api.BooksCloudloadingResource o) { |
| 418 | buildCounterBooksCloudloadingResource++; |
| 419 | if (buildCounterBooksCloudloadingResource < 3) { |
| 420 | unittest.expect(o.author, unittest.equals('foo')); |
| 421 | unittest.expect(o.processingState, unittest.equals('foo')); |
| 422 | unittest.expect(o.title, unittest.equals('foo')); |
| 423 | unittest.expect(o.volumeId, unittest.equals('foo')); |
| 424 | } |
| 425 | buildCounterBooksCloudloadingResource--; |
| 426 | } |
| 427 | |
| 428 | core.int buildCounterBooksVolumesRecommendedRateResponse = 0; |
| 429 | buildBooksVolumesRecommendedRateResponse() { |
| 430 | var o = new api.BooksVolumesRecommendedRateResponse(); |
| 431 | buildCounterBooksVolumesRecommendedRateResponse++; |
| 432 | if (buildCounterBooksVolumesRecommendedRateResponse < 3) { |
| 433 | o.consistencyToken = "foo"; |
| 434 | } |
| 435 | buildCounterBooksVolumesRecommendedRateResponse--; |
| 436 | return o; |
| 437 | } |
| 438 | |
| 439 | checkBooksVolumesRecommendedRateResponse( |
| 440 | api.BooksVolumesRecommendedRateResponse o) { |
| 441 | buildCounterBooksVolumesRecommendedRateResponse++; |
| 442 | if (buildCounterBooksVolumesRecommendedRateResponse < 3) { |
| 443 | unittest.expect(o.consistencyToken, unittest.equals('foo')); |
| 444 | } |
| 445 | buildCounterBooksVolumesRecommendedRateResponse--; |
| 446 | } |
| 447 | |
| 448 | core.int buildCounterBookshelf = 0; |
| 449 | buildBookshelf() { |
| 450 | var o = new api.Bookshelf(); |
| 451 | buildCounterBookshelf++; |
| 452 | if (buildCounterBookshelf < 3) { |
| 453 | o.access = "foo"; |
| 454 | o.created = core.DateTime.parse("2002-02-27T14:01:02"); |
| 455 | o.description = "foo"; |
| 456 | o.id = 42; |
| 457 | o.kind = "foo"; |
| 458 | o.selfLink = "foo"; |
| 459 | o.title = "foo"; |
| 460 | o.updated = core.DateTime.parse("2002-02-27T14:01:02"); |
| 461 | o.volumeCount = 42; |
| 462 | o.volumesLastUpdated = core.DateTime.parse("2002-02-27T14:01:02"); |
| 463 | } |
| 464 | buildCounterBookshelf--; |
| 465 | return o; |
| 466 | } |
| 467 | |
| 468 | checkBookshelf(api.Bookshelf o) { |
| 469 | buildCounterBookshelf++; |
| 470 | if (buildCounterBookshelf < 3) { |
| 471 | unittest.expect(o.access, unittest.equals('foo')); |
| 472 | unittest.expect( |
| 473 | o.created, unittest.equals(core.DateTime.parse("2002-02-27T14:01:02"))); |
| 474 | unittest.expect(o.description, unittest.equals('foo')); |
| 475 | unittest.expect(o.id, unittest.equals(42)); |
| 476 | unittest.expect(o.kind, unittest.equals('foo')); |
| 477 | unittest.expect(o.selfLink, unittest.equals('foo')); |
| 478 | unittest.expect(o.title, unittest.equals('foo')); |
| 479 | unittest.expect( |
| 480 | o.updated, unittest.equals(core.DateTime.parse("2002-02-27T14:01:02"))); |
| 481 | unittest.expect(o.volumeCount, unittest.equals(42)); |
| 482 | unittest.expect(o.volumesLastUpdated, |
| 483 | unittest.equals(core.DateTime.parse("2002-02-27T14:01:02"))); |
| 484 | } |
| 485 | buildCounterBookshelf--; |
| 486 | } |
| 487 | |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 488 | buildUnnamed973() { |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 489 | var o = new core.List<api.Bookshelf>(); |
| 490 | o.add(buildBookshelf()); |
| 491 | o.add(buildBookshelf()); |
| 492 | return o; |
| 493 | } |
| 494 | |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 495 | checkUnnamed973(core.List<api.Bookshelf> o) { |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 496 | unittest.expect(o, unittest.hasLength(2)); |
| 497 | checkBookshelf(o[0]); |
| 498 | checkBookshelf(o[1]); |
| 499 | } |
| 500 | |
| 501 | core.int buildCounterBookshelves = 0; |
| 502 | buildBookshelves() { |
| 503 | var o = new api.Bookshelves(); |
| 504 | buildCounterBookshelves++; |
| 505 | if (buildCounterBookshelves < 3) { |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 506 | o.items = buildUnnamed973(); |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 507 | o.kind = "foo"; |
| 508 | } |
| 509 | buildCounterBookshelves--; |
| 510 | return o; |
| 511 | } |
| 512 | |
| 513 | checkBookshelves(api.Bookshelves o) { |
| 514 | buildCounterBookshelves++; |
| 515 | if (buildCounterBookshelves < 3) { |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 516 | checkUnnamed973(o.items); |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 517 | unittest.expect(o.kind, unittest.equals('foo')); |
| 518 | } |
| 519 | buildCounterBookshelves--; |
| 520 | } |
| 521 | |
| 522 | core.int buildCounterCategoryItems = 0; |
| 523 | buildCategoryItems() { |
| 524 | var o = new api.CategoryItems(); |
| 525 | buildCounterCategoryItems++; |
| 526 | if (buildCounterCategoryItems < 3) { |
| 527 | o.badgeUrl = "foo"; |
| 528 | o.categoryId = "foo"; |
| 529 | o.name = "foo"; |
| 530 | } |
| 531 | buildCounterCategoryItems--; |
| 532 | return o; |
| 533 | } |
| 534 | |
| 535 | checkCategoryItems(api.CategoryItems o) { |
| 536 | buildCounterCategoryItems++; |
| 537 | if (buildCounterCategoryItems < 3) { |
| 538 | unittest.expect(o.badgeUrl, unittest.equals('foo')); |
| 539 | unittest.expect(o.categoryId, unittest.equals('foo')); |
| 540 | unittest.expect(o.name, unittest.equals('foo')); |
| 541 | } |
| 542 | buildCounterCategoryItems--; |
| 543 | } |
| 544 | |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 545 | buildUnnamed974() { |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 546 | var o = new core.List<api.CategoryItems>(); |
| 547 | o.add(buildCategoryItems()); |
| 548 | o.add(buildCategoryItems()); |
| 549 | return o; |
| 550 | } |
| 551 | |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 552 | checkUnnamed974(core.List<api.CategoryItems> o) { |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 553 | unittest.expect(o, unittest.hasLength(2)); |
| 554 | checkCategoryItems(o[0]); |
| 555 | checkCategoryItems(o[1]); |
| 556 | } |
| 557 | |
| 558 | core.int buildCounterCategory = 0; |
| 559 | buildCategory() { |
| 560 | var o = new api.Category(); |
| 561 | buildCounterCategory++; |
| 562 | if (buildCounterCategory < 3) { |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 563 | o.items = buildUnnamed974(); |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 564 | o.kind = "foo"; |
| 565 | } |
| 566 | buildCounterCategory--; |
| 567 | return o; |
| 568 | } |
| 569 | |
| 570 | checkCategory(api.Category o) { |
| 571 | buildCounterCategory++; |
| 572 | if (buildCounterCategory < 3) { |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 573 | checkUnnamed974(o.items); |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 574 | unittest.expect(o.kind, unittest.equals('foo')); |
| 575 | } |
| 576 | buildCounterCategory--; |
| 577 | } |
| 578 | |
| 579 | core.int buildCounterConcurrentAccessRestriction = 0; |
| 580 | buildConcurrentAccessRestriction() { |
| 581 | var o = new api.ConcurrentAccessRestriction(); |
| 582 | buildCounterConcurrentAccessRestriction++; |
| 583 | if (buildCounterConcurrentAccessRestriction < 3) { |
| 584 | o.deviceAllowed = true; |
| 585 | o.kind = "foo"; |
| 586 | o.maxConcurrentDevices = 42; |
| 587 | o.message = "foo"; |
| 588 | o.nonce = "foo"; |
| 589 | o.reasonCode = "foo"; |
| 590 | o.restricted = true; |
| 591 | o.signature = "foo"; |
| 592 | o.source = "foo"; |
| 593 | o.timeWindowSeconds = 42; |
| 594 | o.volumeId = "foo"; |
| 595 | } |
| 596 | buildCounterConcurrentAccessRestriction--; |
| 597 | return o; |
| 598 | } |
| 599 | |
| 600 | checkConcurrentAccessRestriction(api.ConcurrentAccessRestriction o) { |
| 601 | buildCounterConcurrentAccessRestriction++; |
| 602 | if (buildCounterConcurrentAccessRestriction < 3) { |
| 603 | unittest.expect(o.deviceAllowed, unittest.isTrue); |
| 604 | unittest.expect(o.kind, unittest.equals('foo')); |
| 605 | unittest.expect(o.maxConcurrentDevices, unittest.equals(42)); |
| 606 | unittest.expect(o.message, unittest.equals('foo')); |
| 607 | unittest.expect(o.nonce, unittest.equals('foo')); |
| 608 | unittest.expect(o.reasonCode, unittest.equals('foo')); |
| 609 | unittest.expect(o.restricted, unittest.isTrue); |
| 610 | unittest.expect(o.signature, unittest.equals('foo')); |
| 611 | unittest.expect(o.source, unittest.equals('foo')); |
| 612 | unittest.expect(o.timeWindowSeconds, unittest.equals(42)); |
| 613 | unittest.expect(o.volumeId, unittest.equals('foo')); |
| 614 | } |
| 615 | buildCounterConcurrentAccessRestriction--; |
| 616 | } |
| 617 | |
| 618 | core.int buildCounterDictlayerdataCommon = 0; |
| 619 | buildDictlayerdataCommon() { |
| 620 | var o = new api.DictlayerdataCommon(); |
| 621 | buildCounterDictlayerdataCommon++; |
| 622 | if (buildCounterDictlayerdataCommon < 3) { |
| 623 | o.title = "foo"; |
| 624 | } |
| 625 | buildCounterDictlayerdataCommon--; |
| 626 | return o; |
| 627 | } |
| 628 | |
| 629 | checkDictlayerdataCommon(api.DictlayerdataCommon o) { |
| 630 | buildCounterDictlayerdataCommon++; |
| 631 | if (buildCounterDictlayerdataCommon < 3) { |
| 632 | unittest.expect(o.title, unittest.equals('foo')); |
| 633 | } |
| 634 | buildCounterDictlayerdataCommon--; |
| 635 | } |
| 636 | |
| 637 | core.int buildCounterDictlayerdataDictSource = 0; |
| 638 | buildDictlayerdataDictSource() { |
| 639 | var o = new api.DictlayerdataDictSource(); |
| 640 | buildCounterDictlayerdataDictSource++; |
| 641 | if (buildCounterDictlayerdataDictSource < 3) { |
| 642 | o.attribution = "foo"; |
| 643 | o.url = "foo"; |
| 644 | } |
| 645 | buildCounterDictlayerdataDictSource--; |
| 646 | return o; |
| 647 | } |
| 648 | |
| 649 | checkDictlayerdataDictSource(api.DictlayerdataDictSource o) { |
| 650 | buildCounterDictlayerdataDictSource++; |
| 651 | if (buildCounterDictlayerdataDictSource < 3) { |
| 652 | unittest.expect(o.attribution, unittest.equals('foo')); |
| 653 | unittest.expect(o.url, unittest.equals('foo')); |
| 654 | } |
| 655 | buildCounterDictlayerdataDictSource--; |
| 656 | } |
| 657 | |
| 658 | core.int buildCounterDictlayerdataDictWordsDerivativesSource = 0; |
| 659 | buildDictlayerdataDictWordsDerivativesSource() { |
| 660 | var o = new api.DictlayerdataDictWordsDerivativesSource(); |
| 661 | buildCounterDictlayerdataDictWordsDerivativesSource++; |
| 662 | if (buildCounterDictlayerdataDictWordsDerivativesSource < 3) { |
| 663 | o.attribution = "foo"; |
| 664 | o.url = "foo"; |
| 665 | } |
| 666 | buildCounterDictlayerdataDictWordsDerivativesSource--; |
| 667 | return o; |
| 668 | } |
| 669 | |
| 670 | checkDictlayerdataDictWordsDerivativesSource( |
| 671 | api.DictlayerdataDictWordsDerivativesSource o) { |
| 672 | buildCounterDictlayerdataDictWordsDerivativesSource++; |
| 673 | if (buildCounterDictlayerdataDictWordsDerivativesSource < 3) { |
| 674 | unittest.expect(o.attribution, unittest.equals('foo')); |
| 675 | unittest.expect(o.url, unittest.equals('foo')); |
| 676 | } |
| 677 | buildCounterDictlayerdataDictWordsDerivativesSource--; |
| 678 | } |
| 679 | |
| 680 | core.int buildCounterDictlayerdataDictWordsDerivatives = 0; |
| 681 | buildDictlayerdataDictWordsDerivatives() { |
| 682 | var o = new api.DictlayerdataDictWordsDerivatives(); |
| 683 | buildCounterDictlayerdataDictWordsDerivatives++; |
| 684 | if (buildCounterDictlayerdataDictWordsDerivatives < 3) { |
| 685 | o.source = buildDictlayerdataDictWordsDerivativesSource(); |
| 686 | o.text = "foo"; |
| 687 | } |
| 688 | buildCounterDictlayerdataDictWordsDerivatives--; |
| 689 | return o; |
| 690 | } |
| 691 | |
| 692 | checkDictlayerdataDictWordsDerivatives( |
| 693 | api.DictlayerdataDictWordsDerivatives o) { |
| 694 | buildCounterDictlayerdataDictWordsDerivatives++; |
| 695 | if (buildCounterDictlayerdataDictWordsDerivatives < 3) { |
| 696 | checkDictlayerdataDictWordsDerivativesSource(o.source); |
| 697 | unittest.expect(o.text, unittest.equals('foo')); |
| 698 | } |
| 699 | buildCounterDictlayerdataDictWordsDerivatives--; |
| 700 | } |
| 701 | |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 702 | buildUnnamed975() { |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 703 | var o = new core.List<api.DictlayerdataDictWordsDerivatives>(); |
| 704 | o.add(buildDictlayerdataDictWordsDerivatives()); |
| 705 | o.add(buildDictlayerdataDictWordsDerivatives()); |
| 706 | return o; |
| 707 | } |
| 708 | |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 709 | checkUnnamed975(core.List<api.DictlayerdataDictWordsDerivatives> o) { |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 710 | unittest.expect(o, unittest.hasLength(2)); |
| 711 | checkDictlayerdataDictWordsDerivatives(o[0]); |
| 712 | checkDictlayerdataDictWordsDerivatives(o[1]); |
| 713 | } |
| 714 | |
| 715 | core.int buildCounterDictlayerdataDictWordsExamplesSource = 0; |
| 716 | buildDictlayerdataDictWordsExamplesSource() { |
| 717 | var o = new api.DictlayerdataDictWordsExamplesSource(); |
| 718 | buildCounterDictlayerdataDictWordsExamplesSource++; |
| 719 | if (buildCounterDictlayerdataDictWordsExamplesSource < 3) { |
| 720 | o.attribution = "foo"; |
| 721 | o.url = "foo"; |
| 722 | } |
| 723 | buildCounterDictlayerdataDictWordsExamplesSource--; |
| 724 | return o; |
| 725 | } |
| 726 | |
| 727 | checkDictlayerdataDictWordsExamplesSource( |
| 728 | api.DictlayerdataDictWordsExamplesSource o) { |
| 729 | buildCounterDictlayerdataDictWordsExamplesSource++; |
| 730 | if (buildCounterDictlayerdataDictWordsExamplesSource < 3) { |
| 731 | unittest.expect(o.attribution, unittest.equals('foo')); |
| 732 | unittest.expect(o.url, unittest.equals('foo')); |
| 733 | } |
| 734 | buildCounterDictlayerdataDictWordsExamplesSource--; |
| 735 | } |
| 736 | |
| 737 | core.int buildCounterDictlayerdataDictWordsExamples = 0; |
| 738 | buildDictlayerdataDictWordsExamples() { |
| 739 | var o = new api.DictlayerdataDictWordsExamples(); |
| 740 | buildCounterDictlayerdataDictWordsExamples++; |
| 741 | if (buildCounterDictlayerdataDictWordsExamples < 3) { |
| 742 | o.source = buildDictlayerdataDictWordsExamplesSource(); |
| 743 | o.text = "foo"; |
| 744 | } |
| 745 | buildCounterDictlayerdataDictWordsExamples--; |
| 746 | return o; |
| 747 | } |
| 748 | |
| 749 | checkDictlayerdataDictWordsExamples(api.DictlayerdataDictWordsExamples o) { |
| 750 | buildCounterDictlayerdataDictWordsExamples++; |
| 751 | if (buildCounterDictlayerdataDictWordsExamples < 3) { |
| 752 | checkDictlayerdataDictWordsExamplesSource(o.source); |
| 753 | unittest.expect(o.text, unittest.equals('foo')); |
| 754 | } |
| 755 | buildCounterDictlayerdataDictWordsExamples--; |
| 756 | } |
| 757 | |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 758 | buildUnnamed976() { |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 759 | var o = new core.List<api.DictlayerdataDictWordsExamples>(); |
| 760 | o.add(buildDictlayerdataDictWordsExamples()); |
| 761 | o.add(buildDictlayerdataDictWordsExamples()); |
| 762 | return o; |
| 763 | } |
| 764 | |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 765 | checkUnnamed976(core.List<api.DictlayerdataDictWordsExamples> o) { |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 766 | unittest.expect(o, unittest.hasLength(2)); |
| 767 | checkDictlayerdataDictWordsExamples(o[0]); |
| 768 | checkDictlayerdataDictWordsExamples(o[1]); |
| 769 | } |
| 770 | |
| 771 | core.int buildCounterDictlayerdataDictWordsSensesConjugations = 0; |
| 772 | buildDictlayerdataDictWordsSensesConjugations() { |
| 773 | var o = new api.DictlayerdataDictWordsSensesConjugations(); |
| 774 | buildCounterDictlayerdataDictWordsSensesConjugations++; |
| 775 | if (buildCounterDictlayerdataDictWordsSensesConjugations < 3) { |
| 776 | o.type = "foo"; |
| 777 | o.value = "foo"; |
| 778 | } |
| 779 | buildCounterDictlayerdataDictWordsSensesConjugations--; |
| 780 | return o; |
| 781 | } |
| 782 | |
| 783 | checkDictlayerdataDictWordsSensesConjugations( |
| 784 | api.DictlayerdataDictWordsSensesConjugations o) { |
| 785 | buildCounterDictlayerdataDictWordsSensesConjugations++; |
| 786 | if (buildCounterDictlayerdataDictWordsSensesConjugations < 3) { |
| 787 | unittest.expect(o.type, unittest.equals('foo')); |
| 788 | unittest.expect(o.value, unittest.equals('foo')); |
| 789 | } |
| 790 | buildCounterDictlayerdataDictWordsSensesConjugations--; |
| 791 | } |
| 792 | |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 793 | buildUnnamed977() { |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 794 | var o = new core.List<api.DictlayerdataDictWordsSensesConjugations>(); |
| 795 | o.add(buildDictlayerdataDictWordsSensesConjugations()); |
| 796 | o.add(buildDictlayerdataDictWordsSensesConjugations()); |
| 797 | return o; |
| 798 | } |
| 799 | |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 800 | checkUnnamed977(core.List<api.DictlayerdataDictWordsSensesConjugations> o) { |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 801 | unittest.expect(o, unittest.hasLength(2)); |
| 802 | checkDictlayerdataDictWordsSensesConjugations(o[0]); |
| 803 | checkDictlayerdataDictWordsSensesConjugations(o[1]); |
| 804 | } |
| 805 | |
| 806 | core.int buildCounterDictlayerdataDictWordsSensesDefinitionsExamplesSource = 0; |
| 807 | buildDictlayerdataDictWordsSensesDefinitionsExamplesSource() { |
| 808 | var o = new api.DictlayerdataDictWordsSensesDefinitionsExamplesSource(); |
| 809 | buildCounterDictlayerdataDictWordsSensesDefinitionsExamplesSource++; |
| 810 | if (buildCounterDictlayerdataDictWordsSensesDefinitionsExamplesSource < 3) { |
| 811 | o.attribution = "foo"; |
| 812 | o.url = "foo"; |
| 813 | } |
| 814 | buildCounterDictlayerdataDictWordsSensesDefinitionsExamplesSource--; |
| 815 | return o; |
| 816 | } |
| 817 | |
| 818 | checkDictlayerdataDictWordsSensesDefinitionsExamplesSource( |
| 819 | api.DictlayerdataDictWordsSensesDefinitionsExamplesSource o) { |
| 820 | buildCounterDictlayerdataDictWordsSensesDefinitionsExamplesSource++; |
| 821 | if (buildCounterDictlayerdataDictWordsSensesDefinitionsExamplesSource < 3) { |
| 822 | unittest.expect(o.attribution, unittest.equals('foo')); |
| 823 | unittest.expect(o.url, unittest.equals('foo')); |
| 824 | } |
| 825 | buildCounterDictlayerdataDictWordsSensesDefinitionsExamplesSource--; |
| 826 | } |
| 827 | |
| 828 | core.int buildCounterDictlayerdataDictWordsSensesDefinitionsExamples = 0; |
| 829 | buildDictlayerdataDictWordsSensesDefinitionsExamples() { |
| 830 | var o = new api.DictlayerdataDictWordsSensesDefinitionsExamples(); |
| 831 | buildCounterDictlayerdataDictWordsSensesDefinitionsExamples++; |
| 832 | if (buildCounterDictlayerdataDictWordsSensesDefinitionsExamples < 3) { |
| 833 | o.source = buildDictlayerdataDictWordsSensesDefinitionsExamplesSource(); |
| 834 | o.text = "foo"; |
| 835 | } |
| 836 | buildCounterDictlayerdataDictWordsSensesDefinitionsExamples--; |
| 837 | return o; |
| 838 | } |
| 839 | |
| 840 | checkDictlayerdataDictWordsSensesDefinitionsExamples( |
| 841 | api.DictlayerdataDictWordsSensesDefinitionsExamples o) { |
| 842 | buildCounterDictlayerdataDictWordsSensesDefinitionsExamples++; |
| 843 | if (buildCounterDictlayerdataDictWordsSensesDefinitionsExamples < 3) { |
| 844 | checkDictlayerdataDictWordsSensesDefinitionsExamplesSource(o.source); |
| 845 | unittest.expect(o.text, unittest.equals('foo')); |
| 846 | } |
| 847 | buildCounterDictlayerdataDictWordsSensesDefinitionsExamples--; |
| 848 | } |
| 849 | |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 850 | buildUnnamed978() { |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 851 | var o = new core.List<api.DictlayerdataDictWordsSensesDefinitionsExamples>(); |
| 852 | o.add(buildDictlayerdataDictWordsSensesDefinitionsExamples()); |
| 853 | o.add(buildDictlayerdataDictWordsSensesDefinitionsExamples()); |
| 854 | return o; |
| 855 | } |
| 856 | |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 857 | checkUnnamed978( |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 858 | core.List<api.DictlayerdataDictWordsSensesDefinitionsExamples> o) { |
| 859 | unittest.expect(o, unittest.hasLength(2)); |
| 860 | checkDictlayerdataDictWordsSensesDefinitionsExamples(o[0]); |
| 861 | checkDictlayerdataDictWordsSensesDefinitionsExamples(o[1]); |
| 862 | } |
| 863 | |
| 864 | core.int buildCounterDictlayerdataDictWordsSensesDefinitions = 0; |
| 865 | buildDictlayerdataDictWordsSensesDefinitions() { |
| 866 | var o = new api.DictlayerdataDictWordsSensesDefinitions(); |
| 867 | buildCounterDictlayerdataDictWordsSensesDefinitions++; |
| 868 | if (buildCounterDictlayerdataDictWordsSensesDefinitions < 3) { |
| 869 | o.definition = "foo"; |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 870 | o.examples = buildUnnamed978(); |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 871 | } |
| 872 | buildCounterDictlayerdataDictWordsSensesDefinitions--; |
| 873 | return o; |
| 874 | } |
| 875 | |
| 876 | checkDictlayerdataDictWordsSensesDefinitions( |
| 877 | api.DictlayerdataDictWordsSensesDefinitions o) { |
| 878 | buildCounterDictlayerdataDictWordsSensesDefinitions++; |
| 879 | if (buildCounterDictlayerdataDictWordsSensesDefinitions < 3) { |
| 880 | unittest.expect(o.definition, unittest.equals('foo')); |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 881 | checkUnnamed978(o.examples); |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 882 | } |
| 883 | buildCounterDictlayerdataDictWordsSensesDefinitions--; |
| 884 | } |
| 885 | |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 886 | buildUnnamed979() { |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 887 | var o = new core.List<api.DictlayerdataDictWordsSensesDefinitions>(); |
| 888 | o.add(buildDictlayerdataDictWordsSensesDefinitions()); |
| 889 | o.add(buildDictlayerdataDictWordsSensesDefinitions()); |
| 890 | return o; |
| 891 | } |
| 892 | |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 893 | checkUnnamed979(core.List<api.DictlayerdataDictWordsSensesDefinitions> o) { |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 894 | unittest.expect(o, unittest.hasLength(2)); |
| 895 | checkDictlayerdataDictWordsSensesDefinitions(o[0]); |
| 896 | checkDictlayerdataDictWordsSensesDefinitions(o[1]); |
| 897 | } |
| 898 | |
| 899 | core.int buildCounterDictlayerdataDictWordsSensesSource = 0; |
| 900 | buildDictlayerdataDictWordsSensesSource() { |
| 901 | var o = new api.DictlayerdataDictWordsSensesSource(); |
| 902 | buildCounterDictlayerdataDictWordsSensesSource++; |
| 903 | if (buildCounterDictlayerdataDictWordsSensesSource < 3) { |
| 904 | o.attribution = "foo"; |
| 905 | o.url = "foo"; |
| 906 | } |
| 907 | buildCounterDictlayerdataDictWordsSensesSource--; |
| 908 | return o; |
| 909 | } |
| 910 | |
| 911 | checkDictlayerdataDictWordsSensesSource( |
| 912 | api.DictlayerdataDictWordsSensesSource o) { |
| 913 | buildCounterDictlayerdataDictWordsSensesSource++; |
| 914 | if (buildCounterDictlayerdataDictWordsSensesSource < 3) { |
| 915 | unittest.expect(o.attribution, unittest.equals('foo')); |
| 916 | unittest.expect(o.url, unittest.equals('foo')); |
| 917 | } |
| 918 | buildCounterDictlayerdataDictWordsSensesSource--; |
| 919 | } |
| 920 | |
| 921 | core.int buildCounterDictlayerdataDictWordsSensesSynonymsSource = 0; |
| 922 | buildDictlayerdataDictWordsSensesSynonymsSource() { |
| 923 | var o = new api.DictlayerdataDictWordsSensesSynonymsSource(); |
| 924 | buildCounterDictlayerdataDictWordsSensesSynonymsSource++; |
| 925 | if (buildCounterDictlayerdataDictWordsSensesSynonymsSource < 3) { |
| 926 | o.attribution = "foo"; |
| 927 | o.url = "foo"; |
| 928 | } |
| 929 | buildCounterDictlayerdataDictWordsSensesSynonymsSource--; |
| 930 | return o; |
| 931 | } |
| 932 | |
| 933 | checkDictlayerdataDictWordsSensesSynonymsSource( |
| 934 | api.DictlayerdataDictWordsSensesSynonymsSource o) { |
| 935 | buildCounterDictlayerdataDictWordsSensesSynonymsSource++; |
| 936 | if (buildCounterDictlayerdataDictWordsSensesSynonymsSource < 3) { |
| 937 | unittest.expect(o.attribution, unittest.equals('foo')); |
| 938 | unittest.expect(o.url, unittest.equals('foo')); |
| 939 | } |
| 940 | buildCounterDictlayerdataDictWordsSensesSynonymsSource--; |
| 941 | } |
| 942 | |
| 943 | core.int buildCounterDictlayerdataDictWordsSensesSynonyms = 0; |
| 944 | buildDictlayerdataDictWordsSensesSynonyms() { |
| 945 | var o = new api.DictlayerdataDictWordsSensesSynonyms(); |
| 946 | buildCounterDictlayerdataDictWordsSensesSynonyms++; |
| 947 | if (buildCounterDictlayerdataDictWordsSensesSynonyms < 3) { |
| 948 | o.source = buildDictlayerdataDictWordsSensesSynonymsSource(); |
| 949 | o.text = "foo"; |
| 950 | } |
| 951 | buildCounterDictlayerdataDictWordsSensesSynonyms--; |
| 952 | return o; |
| 953 | } |
| 954 | |
| 955 | checkDictlayerdataDictWordsSensesSynonyms( |
| 956 | api.DictlayerdataDictWordsSensesSynonyms o) { |
| 957 | buildCounterDictlayerdataDictWordsSensesSynonyms++; |
| 958 | if (buildCounterDictlayerdataDictWordsSensesSynonyms < 3) { |
| 959 | checkDictlayerdataDictWordsSensesSynonymsSource(o.source); |
| 960 | unittest.expect(o.text, unittest.equals('foo')); |
| 961 | } |
| 962 | buildCounterDictlayerdataDictWordsSensesSynonyms--; |
| 963 | } |
| 964 | |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 965 | buildUnnamed980() { |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 966 | var o = new core.List<api.DictlayerdataDictWordsSensesSynonyms>(); |
| 967 | o.add(buildDictlayerdataDictWordsSensesSynonyms()); |
| 968 | o.add(buildDictlayerdataDictWordsSensesSynonyms()); |
| 969 | return o; |
| 970 | } |
| 971 | |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 972 | checkUnnamed980(core.List<api.DictlayerdataDictWordsSensesSynonyms> o) { |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 973 | unittest.expect(o, unittest.hasLength(2)); |
| 974 | checkDictlayerdataDictWordsSensesSynonyms(o[0]); |
| 975 | checkDictlayerdataDictWordsSensesSynonyms(o[1]); |
| 976 | } |
| 977 | |
| 978 | core.int buildCounterDictlayerdataDictWordsSenses = 0; |
| 979 | buildDictlayerdataDictWordsSenses() { |
| 980 | var o = new api.DictlayerdataDictWordsSenses(); |
| 981 | buildCounterDictlayerdataDictWordsSenses++; |
| 982 | if (buildCounterDictlayerdataDictWordsSenses < 3) { |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 983 | o.conjugations = buildUnnamed977(); |
| 984 | o.definitions = buildUnnamed979(); |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 985 | o.partOfSpeech = "foo"; |
| 986 | o.pronunciation = "foo"; |
| 987 | o.pronunciationUrl = "foo"; |
| 988 | o.source = buildDictlayerdataDictWordsSensesSource(); |
| 989 | o.syllabification = "foo"; |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 990 | o.synonyms = buildUnnamed980(); |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 991 | } |
| 992 | buildCounterDictlayerdataDictWordsSenses--; |
| 993 | return o; |
| 994 | } |
| 995 | |
| 996 | checkDictlayerdataDictWordsSenses(api.DictlayerdataDictWordsSenses o) { |
| 997 | buildCounterDictlayerdataDictWordsSenses++; |
| 998 | if (buildCounterDictlayerdataDictWordsSenses < 3) { |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 999 | checkUnnamed977(o.conjugations); |
| 1000 | checkUnnamed979(o.definitions); |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 1001 | unittest.expect(o.partOfSpeech, unittest.equals('foo')); |
| 1002 | unittest.expect(o.pronunciation, unittest.equals('foo')); |
| 1003 | unittest.expect(o.pronunciationUrl, unittest.equals('foo')); |
| 1004 | checkDictlayerdataDictWordsSensesSource(o.source); |
| 1005 | unittest.expect(o.syllabification, unittest.equals('foo')); |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 1006 | checkUnnamed980(o.synonyms); |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 1007 | } |
| 1008 | buildCounterDictlayerdataDictWordsSenses--; |
| 1009 | } |
| 1010 | |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 1011 | buildUnnamed981() { |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 1012 | var o = new core.List<api.DictlayerdataDictWordsSenses>(); |
| 1013 | o.add(buildDictlayerdataDictWordsSenses()); |
| 1014 | o.add(buildDictlayerdataDictWordsSenses()); |
| 1015 | return o; |
| 1016 | } |
| 1017 | |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 1018 | checkUnnamed981(core.List<api.DictlayerdataDictWordsSenses> o) { |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 1019 | unittest.expect(o, unittest.hasLength(2)); |
| 1020 | checkDictlayerdataDictWordsSenses(o[0]); |
| 1021 | checkDictlayerdataDictWordsSenses(o[1]); |
| 1022 | } |
| 1023 | |
| 1024 | core.int buildCounterDictlayerdataDictWordsSource = 0; |
| 1025 | buildDictlayerdataDictWordsSource() { |
| 1026 | var o = new api.DictlayerdataDictWordsSource(); |
| 1027 | buildCounterDictlayerdataDictWordsSource++; |
| 1028 | if (buildCounterDictlayerdataDictWordsSource < 3) { |
| 1029 | o.attribution = "foo"; |
| 1030 | o.url = "foo"; |
| 1031 | } |
| 1032 | buildCounterDictlayerdataDictWordsSource--; |
| 1033 | return o; |
| 1034 | } |
| 1035 | |
| 1036 | checkDictlayerdataDictWordsSource(api.DictlayerdataDictWordsSource o) { |
| 1037 | buildCounterDictlayerdataDictWordsSource++; |
| 1038 | if (buildCounterDictlayerdataDictWordsSource < 3) { |
| 1039 | unittest.expect(o.attribution, unittest.equals('foo')); |
| 1040 | unittest.expect(o.url, unittest.equals('foo')); |
| 1041 | } |
| 1042 | buildCounterDictlayerdataDictWordsSource--; |
| 1043 | } |
| 1044 | |
| 1045 | core.int buildCounterDictlayerdataDictWords = 0; |
| 1046 | buildDictlayerdataDictWords() { |
| 1047 | var o = new api.DictlayerdataDictWords(); |
| 1048 | buildCounterDictlayerdataDictWords++; |
| 1049 | if (buildCounterDictlayerdataDictWords < 3) { |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 1050 | o.derivatives = buildUnnamed975(); |
| 1051 | o.examples = buildUnnamed976(); |
| 1052 | o.senses = buildUnnamed981(); |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 1053 | o.source = buildDictlayerdataDictWordsSource(); |
| 1054 | } |
| 1055 | buildCounterDictlayerdataDictWords--; |
| 1056 | return o; |
| 1057 | } |
| 1058 | |
| 1059 | checkDictlayerdataDictWords(api.DictlayerdataDictWords o) { |
| 1060 | buildCounterDictlayerdataDictWords++; |
| 1061 | if (buildCounterDictlayerdataDictWords < 3) { |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 1062 | checkUnnamed975(o.derivatives); |
| 1063 | checkUnnamed976(o.examples); |
| 1064 | checkUnnamed981(o.senses); |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 1065 | checkDictlayerdataDictWordsSource(o.source); |
| 1066 | } |
| 1067 | buildCounterDictlayerdataDictWords--; |
| 1068 | } |
| 1069 | |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 1070 | buildUnnamed982() { |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 1071 | var o = new core.List<api.DictlayerdataDictWords>(); |
| 1072 | o.add(buildDictlayerdataDictWords()); |
| 1073 | o.add(buildDictlayerdataDictWords()); |
| 1074 | return o; |
| 1075 | } |
| 1076 | |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 1077 | checkUnnamed982(core.List<api.DictlayerdataDictWords> o) { |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 1078 | unittest.expect(o, unittest.hasLength(2)); |
| 1079 | checkDictlayerdataDictWords(o[0]); |
| 1080 | checkDictlayerdataDictWords(o[1]); |
| 1081 | } |
| 1082 | |
| 1083 | core.int buildCounterDictlayerdataDict = 0; |
| 1084 | buildDictlayerdataDict() { |
| 1085 | var o = new api.DictlayerdataDict(); |
| 1086 | buildCounterDictlayerdataDict++; |
| 1087 | if (buildCounterDictlayerdataDict < 3) { |
| 1088 | o.source = buildDictlayerdataDictSource(); |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 1089 | o.words = buildUnnamed982(); |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 1090 | } |
| 1091 | buildCounterDictlayerdataDict--; |
| 1092 | return o; |
| 1093 | } |
| 1094 | |
| 1095 | checkDictlayerdataDict(api.DictlayerdataDict o) { |
| 1096 | buildCounterDictlayerdataDict++; |
| 1097 | if (buildCounterDictlayerdataDict < 3) { |
| 1098 | checkDictlayerdataDictSource(o.source); |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 1099 | checkUnnamed982(o.words); |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 1100 | } |
| 1101 | buildCounterDictlayerdataDict--; |
| 1102 | } |
| 1103 | |
| 1104 | core.int buildCounterDictlayerdata = 0; |
| 1105 | buildDictlayerdata() { |
| 1106 | var o = new api.Dictlayerdata(); |
| 1107 | buildCounterDictlayerdata++; |
| 1108 | if (buildCounterDictlayerdata < 3) { |
| 1109 | o.common = buildDictlayerdataCommon(); |
| 1110 | o.dict = buildDictlayerdataDict(); |
| 1111 | o.kind = "foo"; |
| 1112 | } |
| 1113 | buildCounterDictlayerdata--; |
| 1114 | return o; |
| 1115 | } |
| 1116 | |
| 1117 | checkDictlayerdata(api.Dictlayerdata o) { |
| 1118 | buildCounterDictlayerdata++; |
| 1119 | if (buildCounterDictlayerdata < 3) { |
| 1120 | checkDictlayerdataCommon(o.common); |
| 1121 | checkDictlayerdataDict(o.dict); |
| 1122 | unittest.expect(o.kind, unittest.equals('foo')); |
| 1123 | } |
| 1124 | buildCounterDictlayerdata--; |
| 1125 | } |
| 1126 | |
| 1127 | core.int buildCounterDiscoveryclustersClustersBannerWithContentContainer = 0; |
| 1128 | buildDiscoveryclustersClustersBannerWithContentContainer() { |
| 1129 | var o = new api.DiscoveryclustersClustersBannerWithContentContainer(); |
| 1130 | buildCounterDiscoveryclustersClustersBannerWithContentContainer++; |
| 1131 | if (buildCounterDiscoveryclustersClustersBannerWithContentContainer < 3) { |
| 1132 | o.fillColorArgb = "foo"; |
| 1133 | o.imageUrl = "foo"; |
| 1134 | o.maskColorArgb = "foo"; |
| 1135 | o.moreButtonText = "foo"; |
| 1136 | o.moreButtonUrl = "foo"; |
| 1137 | o.textColorArgb = "foo"; |
| 1138 | } |
| 1139 | buildCounterDiscoveryclustersClustersBannerWithContentContainer--; |
| 1140 | return o; |
| 1141 | } |
| 1142 | |
| 1143 | checkDiscoveryclustersClustersBannerWithContentContainer( |
| 1144 | api.DiscoveryclustersClustersBannerWithContentContainer o) { |
| 1145 | buildCounterDiscoveryclustersClustersBannerWithContentContainer++; |
| 1146 | if (buildCounterDiscoveryclustersClustersBannerWithContentContainer < 3) { |
| 1147 | unittest.expect(o.fillColorArgb, unittest.equals('foo')); |
| 1148 | unittest.expect(o.imageUrl, unittest.equals('foo')); |
| 1149 | unittest.expect(o.maskColorArgb, unittest.equals('foo')); |
| 1150 | unittest.expect(o.moreButtonText, unittest.equals('foo')); |
| 1151 | unittest.expect(o.moreButtonUrl, unittest.equals('foo')); |
| 1152 | unittest.expect(o.textColorArgb, unittest.equals('foo')); |
| 1153 | } |
| 1154 | buildCounterDiscoveryclustersClustersBannerWithContentContainer--; |
| 1155 | } |
| 1156 | |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 1157 | buildUnnamed983() { |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 1158 | var o = new core.List<api.Volume>(); |
| 1159 | o.add(buildVolume()); |
| 1160 | o.add(buildVolume()); |
| 1161 | return o; |
| 1162 | } |
| 1163 | |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 1164 | checkUnnamed983(core.List<api.Volume> o) { |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 1165 | unittest.expect(o, unittest.hasLength(2)); |
| 1166 | checkVolume(o[0]); |
| 1167 | checkVolume(o[1]); |
| 1168 | } |
| 1169 | |
| 1170 | core.int buildCounterDiscoveryclustersClusters = 0; |
| 1171 | buildDiscoveryclustersClusters() { |
| 1172 | var o = new api.DiscoveryclustersClusters(); |
| 1173 | buildCounterDiscoveryclustersClusters++; |
| 1174 | if (buildCounterDiscoveryclustersClusters < 3) { |
| 1175 | o.bannerWithContentContainer = |
| 1176 | buildDiscoveryclustersClustersBannerWithContentContainer(); |
| 1177 | o.subTitle = "foo"; |
| 1178 | o.title = "foo"; |
| 1179 | o.totalVolumes = 42; |
| 1180 | o.uid = "foo"; |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 1181 | o.volumes = buildUnnamed983(); |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 1182 | } |
| 1183 | buildCounterDiscoveryclustersClusters--; |
| 1184 | return o; |
| 1185 | } |
| 1186 | |
| 1187 | checkDiscoveryclustersClusters(api.DiscoveryclustersClusters o) { |
| 1188 | buildCounterDiscoveryclustersClusters++; |
| 1189 | if (buildCounterDiscoveryclustersClusters < 3) { |
| 1190 | checkDiscoveryclustersClustersBannerWithContentContainer( |
| 1191 | o.bannerWithContentContainer); |
| 1192 | unittest.expect(o.subTitle, unittest.equals('foo')); |
| 1193 | unittest.expect(o.title, unittest.equals('foo')); |
| 1194 | unittest.expect(o.totalVolumes, unittest.equals(42)); |
| 1195 | unittest.expect(o.uid, unittest.equals('foo')); |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 1196 | checkUnnamed983(o.volumes); |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 1197 | } |
| 1198 | buildCounterDiscoveryclustersClusters--; |
| 1199 | } |
| 1200 | |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 1201 | buildUnnamed984() { |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 1202 | var o = new core.List<api.DiscoveryclustersClusters>(); |
| 1203 | o.add(buildDiscoveryclustersClusters()); |
| 1204 | o.add(buildDiscoveryclustersClusters()); |
| 1205 | return o; |
| 1206 | } |
| 1207 | |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 1208 | checkUnnamed984(core.List<api.DiscoveryclustersClusters> o) { |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 1209 | unittest.expect(o, unittest.hasLength(2)); |
| 1210 | checkDiscoveryclustersClusters(o[0]); |
| 1211 | checkDiscoveryclustersClusters(o[1]); |
| 1212 | } |
| 1213 | |
| 1214 | core.int buildCounterDiscoveryclusters = 0; |
| 1215 | buildDiscoveryclusters() { |
| 1216 | var o = new api.Discoveryclusters(); |
| 1217 | buildCounterDiscoveryclusters++; |
| 1218 | if (buildCounterDiscoveryclusters < 3) { |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 1219 | o.clusters = buildUnnamed984(); |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 1220 | o.kind = "foo"; |
| 1221 | o.totalClusters = 42; |
| 1222 | } |
| 1223 | buildCounterDiscoveryclusters--; |
| 1224 | return o; |
| 1225 | } |
| 1226 | |
| 1227 | checkDiscoveryclusters(api.Discoveryclusters o) { |
| 1228 | buildCounterDiscoveryclusters++; |
| 1229 | if (buildCounterDiscoveryclusters < 3) { |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 1230 | checkUnnamed984(o.clusters); |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 1231 | unittest.expect(o.kind, unittest.equals('foo')); |
| 1232 | unittest.expect(o.totalClusters, unittest.equals(42)); |
| 1233 | } |
| 1234 | buildCounterDiscoveryclusters--; |
| 1235 | } |
| 1236 | |
| 1237 | core.int buildCounterDownloadAccessRestriction = 0; |
| 1238 | buildDownloadAccessRestriction() { |
| 1239 | var o = new api.DownloadAccessRestriction(); |
| 1240 | buildCounterDownloadAccessRestriction++; |
| 1241 | if (buildCounterDownloadAccessRestriction < 3) { |
| 1242 | o.deviceAllowed = true; |
| 1243 | o.downloadsAcquired = 42; |
| 1244 | o.justAcquired = true; |
| 1245 | o.kind = "foo"; |
| 1246 | o.maxDownloadDevices = 42; |
| 1247 | o.message = "foo"; |
| 1248 | o.nonce = "foo"; |
| 1249 | o.reasonCode = "foo"; |
| 1250 | o.restricted = true; |
| 1251 | o.signature = "foo"; |
| 1252 | o.source = "foo"; |
| 1253 | o.volumeId = "foo"; |
| 1254 | } |
| 1255 | buildCounterDownloadAccessRestriction--; |
| 1256 | return o; |
| 1257 | } |
| 1258 | |
| 1259 | checkDownloadAccessRestriction(api.DownloadAccessRestriction o) { |
| 1260 | buildCounterDownloadAccessRestriction++; |
| 1261 | if (buildCounterDownloadAccessRestriction < 3) { |
| 1262 | unittest.expect(o.deviceAllowed, unittest.isTrue); |
| 1263 | unittest.expect(o.downloadsAcquired, unittest.equals(42)); |
| 1264 | unittest.expect(o.justAcquired, unittest.isTrue); |
| 1265 | unittest.expect(o.kind, unittest.equals('foo')); |
| 1266 | unittest.expect(o.maxDownloadDevices, unittest.equals(42)); |
| 1267 | unittest.expect(o.message, unittest.equals('foo')); |
| 1268 | unittest.expect(o.nonce, unittest.equals('foo')); |
| 1269 | unittest.expect(o.reasonCode, unittest.equals('foo')); |
| 1270 | unittest.expect(o.restricted, unittest.isTrue); |
| 1271 | unittest.expect(o.signature, unittest.equals('foo')); |
| 1272 | unittest.expect(o.source, unittest.equals('foo')); |
| 1273 | unittest.expect(o.volumeId, unittest.equals('foo')); |
| 1274 | } |
| 1275 | buildCounterDownloadAccessRestriction--; |
| 1276 | } |
| 1277 | |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 1278 | buildUnnamed985() { |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 1279 | var o = new core.List<api.DownloadAccessRestriction>(); |
| 1280 | o.add(buildDownloadAccessRestriction()); |
| 1281 | o.add(buildDownloadAccessRestriction()); |
| 1282 | return o; |
| 1283 | } |
| 1284 | |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 1285 | checkUnnamed985(core.List<api.DownloadAccessRestriction> o) { |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 1286 | unittest.expect(o, unittest.hasLength(2)); |
| 1287 | checkDownloadAccessRestriction(o[0]); |
| 1288 | checkDownloadAccessRestriction(o[1]); |
| 1289 | } |
| 1290 | |
| 1291 | core.int buildCounterDownloadAccesses = 0; |
| 1292 | buildDownloadAccesses() { |
| 1293 | var o = new api.DownloadAccesses(); |
| 1294 | buildCounterDownloadAccesses++; |
| 1295 | if (buildCounterDownloadAccesses < 3) { |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 1296 | o.downloadAccessList = buildUnnamed985(); |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 1297 | o.kind = "foo"; |
| 1298 | } |
| 1299 | buildCounterDownloadAccesses--; |
| 1300 | return o; |
| 1301 | } |
| 1302 | |
| 1303 | checkDownloadAccesses(api.DownloadAccesses o) { |
| 1304 | buildCounterDownloadAccesses++; |
| 1305 | if (buildCounterDownloadAccesses < 3) { |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 1306 | checkUnnamed985(o.downloadAccessList); |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 1307 | unittest.expect(o.kind, unittest.equals('foo')); |
| 1308 | } |
| 1309 | buildCounterDownloadAccesses--; |
| 1310 | } |
| 1311 | |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 1312 | core.int buildCounterFamilyInfoMembership = 0; |
| 1313 | buildFamilyInfoMembership() { |
| 1314 | var o = new api.FamilyInfoMembership(); |
| 1315 | buildCounterFamilyInfoMembership++; |
| 1316 | if (buildCounterFamilyInfoMembership < 3) { |
| 1317 | o.acquirePermission = "foo"; |
| 1318 | o.ageGroup = "foo"; |
| 1319 | o.allowedMaturityRating = "foo"; |
| 1320 | o.isInFamily = true; |
| 1321 | o.role = "foo"; |
| 1322 | } |
| 1323 | buildCounterFamilyInfoMembership--; |
| 1324 | return o; |
| 1325 | } |
| 1326 | |
| 1327 | checkFamilyInfoMembership(api.FamilyInfoMembership o) { |
| 1328 | buildCounterFamilyInfoMembership++; |
| 1329 | if (buildCounterFamilyInfoMembership < 3) { |
| 1330 | unittest.expect(o.acquirePermission, unittest.equals('foo')); |
| 1331 | unittest.expect(o.ageGroup, unittest.equals('foo')); |
| 1332 | unittest.expect(o.allowedMaturityRating, unittest.equals('foo')); |
| 1333 | unittest.expect(o.isInFamily, unittest.isTrue); |
| 1334 | unittest.expect(o.role, unittest.equals('foo')); |
| 1335 | } |
| 1336 | buildCounterFamilyInfoMembership--; |
| 1337 | } |
| 1338 | |
| 1339 | core.int buildCounterFamilyInfo = 0; |
| 1340 | buildFamilyInfo() { |
| 1341 | var o = new api.FamilyInfo(); |
| 1342 | buildCounterFamilyInfo++; |
| 1343 | if (buildCounterFamilyInfo < 3) { |
| 1344 | o.kind = "foo"; |
| 1345 | o.membership = buildFamilyInfoMembership(); |
| 1346 | } |
| 1347 | buildCounterFamilyInfo--; |
| 1348 | return o; |
| 1349 | } |
| 1350 | |
| 1351 | checkFamilyInfo(api.FamilyInfo o) { |
| 1352 | buildCounterFamilyInfo++; |
| 1353 | if (buildCounterFamilyInfo < 3) { |
| 1354 | unittest.expect(o.kind, unittest.equals('foo')); |
| 1355 | checkFamilyInfoMembership(o.membership); |
| 1356 | } |
| 1357 | buildCounterFamilyInfo--; |
| 1358 | } |
| 1359 | |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 1360 | core.int buildCounterGeolayerdataCommon = 0; |
| 1361 | buildGeolayerdataCommon() { |
| 1362 | var o = new api.GeolayerdataCommon(); |
| 1363 | buildCounterGeolayerdataCommon++; |
| 1364 | if (buildCounterGeolayerdataCommon < 3) { |
| 1365 | o.lang = "foo"; |
| 1366 | o.previewImageUrl = "foo"; |
| 1367 | o.snippet = "foo"; |
| 1368 | o.snippetUrl = "foo"; |
| 1369 | o.title = "foo"; |
| 1370 | } |
| 1371 | buildCounterGeolayerdataCommon--; |
| 1372 | return o; |
| 1373 | } |
| 1374 | |
| 1375 | checkGeolayerdataCommon(api.GeolayerdataCommon o) { |
| 1376 | buildCounterGeolayerdataCommon++; |
| 1377 | if (buildCounterGeolayerdataCommon < 3) { |
| 1378 | unittest.expect(o.lang, unittest.equals('foo')); |
| 1379 | unittest.expect(o.previewImageUrl, unittest.equals('foo')); |
| 1380 | unittest.expect(o.snippet, unittest.equals('foo')); |
| 1381 | unittest.expect(o.snippetUrl, unittest.equals('foo')); |
| 1382 | unittest.expect(o.title, unittest.equals('foo')); |
| 1383 | } |
| 1384 | buildCounterGeolayerdataCommon--; |
| 1385 | } |
| 1386 | |
| 1387 | core.int buildCounterGeolayerdataGeoBoundary = 0; |
| 1388 | buildGeolayerdataGeoBoundary() { |
| 1389 | var o = new api.GeolayerdataGeoBoundary(); |
| 1390 | buildCounterGeolayerdataGeoBoundary++; |
| 1391 | if (buildCounterGeolayerdataGeoBoundary < 3) { |
| 1392 | o.latitude = 42; |
| 1393 | o.longitude = 42; |
| 1394 | } |
| 1395 | buildCounterGeolayerdataGeoBoundary--; |
| 1396 | return o; |
| 1397 | } |
| 1398 | |
| 1399 | checkGeolayerdataGeoBoundary(api.GeolayerdataGeoBoundary o) { |
| 1400 | buildCounterGeolayerdataGeoBoundary++; |
| 1401 | if (buildCounterGeolayerdataGeoBoundary < 3) { |
| 1402 | unittest.expect(o.latitude, unittest.equals(42)); |
| 1403 | unittest.expect(o.longitude, unittest.equals(42)); |
| 1404 | } |
| 1405 | buildCounterGeolayerdataGeoBoundary--; |
| 1406 | } |
| 1407 | |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 1408 | buildUnnamed986() { |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 1409 | var o = new core.List<api.GeolayerdataGeoBoundary>(); |
| 1410 | o.add(buildGeolayerdataGeoBoundary()); |
| 1411 | o.add(buildGeolayerdataGeoBoundary()); |
| 1412 | return o; |
| 1413 | } |
| 1414 | |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 1415 | checkUnnamed986(core.List<api.GeolayerdataGeoBoundary> o) { |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 1416 | unittest.expect(o, unittest.hasLength(2)); |
| 1417 | checkGeolayerdataGeoBoundary(o[0]); |
| 1418 | checkGeolayerdataGeoBoundary(o[1]); |
| 1419 | } |
| 1420 | |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 1421 | buildUnnamed987() { |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 1422 | var o = new core.List<core.List<api.GeolayerdataGeoBoundary>>(); |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 1423 | o.add(buildUnnamed986()); |
| 1424 | o.add(buildUnnamed986()); |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 1425 | return o; |
| 1426 | } |
| 1427 | |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 1428 | checkUnnamed987(core.List<core.List<api.GeolayerdataGeoBoundary>> o) { |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 1429 | unittest.expect(o, unittest.hasLength(2)); |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 1430 | checkUnnamed986(o[0]); |
| 1431 | checkUnnamed986(o[1]); |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 1432 | } |
| 1433 | |
| 1434 | core.int buildCounterGeolayerdataGeoViewportHi = 0; |
| 1435 | buildGeolayerdataGeoViewportHi() { |
| 1436 | var o = new api.GeolayerdataGeoViewportHi(); |
| 1437 | buildCounterGeolayerdataGeoViewportHi++; |
| 1438 | if (buildCounterGeolayerdataGeoViewportHi < 3) { |
| 1439 | o.latitude = 42.0; |
| 1440 | o.longitude = 42.0; |
| 1441 | } |
| 1442 | buildCounterGeolayerdataGeoViewportHi--; |
| 1443 | return o; |
| 1444 | } |
| 1445 | |
| 1446 | checkGeolayerdataGeoViewportHi(api.GeolayerdataGeoViewportHi o) { |
| 1447 | buildCounterGeolayerdataGeoViewportHi++; |
| 1448 | if (buildCounterGeolayerdataGeoViewportHi < 3) { |
| 1449 | unittest.expect(o.latitude, unittest.equals(42.0)); |
| 1450 | unittest.expect(o.longitude, unittest.equals(42.0)); |
| 1451 | } |
| 1452 | buildCounterGeolayerdataGeoViewportHi--; |
| 1453 | } |
| 1454 | |
| 1455 | core.int buildCounterGeolayerdataGeoViewportLo = 0; |
| 1456 | buildGeolayerdataGeoViewportLo() { |
| 1457 | var o = new api.GeolayerdataGeoViewportLo(); |
| 1458 | buildCounterGeolayerdataGeoViewportLo++; |
| 1459 | if (buildCounterGeolayerdataGeoViewportLo < 3) { |
| 1460 | o.latitude = 42.0; |
| 1461 | o.longitude = 42.0; |
| 1462 | } |
| 1463 | buildCounterGeolayerdataGeoViewportLo--; |
| 1464 | return o; |
| 1465 | } |
| 1466 | |
| 1467 | checkGeolayerdataGeoViewportLo(api.GeolayerdataGeoViewportLo o) { |
| 1468 | buildCounterGeolayerdataGeoViewportLo++; |
| 1469 | if (buildCounterGeolayerdataGeoViewportLo < 3) { |
| 1470 | unittest.expect(o.latitude, unittest.equals(42.0)); |
| 1471 | unittest.expect(o.longitude, unittest.equals(42.0)); |
| 1472 | } |
| 1473 | buildCounterGeolayerdataGeoViewportLo--; |
| 1474 | } |
| 1475 | |
| 1476 | core.int buildCounterGeolayerdataGeoViewport = 0; |
| 1477 | buildGeolayerdataGeoViewport() { |
| 1478 | var o = new api.GeolayerdataGeoViewport(); |
| 1479 | buildCounterGeolayerdataGeoViewport++; |
| 1480 | if (buildCounterGeolayerdataGeoViewport < 3) { |
| 1481 | o.hi = buildGeolayerdataGeoViewportHi(); |
| 1482 | o.lo = buildGeolayerdataGeoViewportLo(); |
| 1483 | } |
| 1484 | buildCounterGeolayerdataGeoViewport--; |
| 1485 | return o; |
| 1486 | } |
| 1487 | |
| 1488 | checkGeolayerdataGeoViewport(api.GeolayerdataGeoViewport o) { |
| 1489 | buildCounterGeolayerdataGeoViewport++; |
| 1490 | if (buildCounterGeolayerdataGeoViewport < 3) { |
| 1491 | checkGeolayerdataGeoViewportHi(o.hi); |
| 1492 | checkGeolayerdataGeoViewportLo(o.lo); |
| 1493 | } |
| 1494 | buildCounterGeolayerdataGeoViewport--; |
| 1495 | } |
| 1496 | |
| 1497 | core.int buildCounterGeolayerdataGeo = 0; |
| 1498 | buildGeolayerdataGeo() { |
| 1499 | var o = new api.GeolayerdataGeo(); |
| 1500 | buildCounterGeolayerdataGeo++; |
| 1501 | if (buildCounterGeolayerdataGeo < 3) { |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 1502 | o.boundary = buildUnnamed987(); |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 1503 | o.cachePolicy = "foo"; |
| 1504 | o.countryCode = "foo"; |
| 1505 | o.latitude = 42.0; |
| 1506 | o.longitude = 42.0; |
| 1507 | o.mapType = "foo"; |
| 1508 | o.viewport = buildGeolayerdataGeoViewport(); |
| 1509 | o.zoom = 42; |
| 1510 | } |
| 1511 | buildCounterGeolayerdataGeo--; |
| 1512 | return o; |
| 1513 | } |
| 1514 | |
| 1515 | checkGeolayerdataGeo(api.GeolayerdataGeo o) { |
| 1516 | buildCounterGeolayerdataGeo++; |
| 1517 | if (buildCounterGeolayerdataGeo < 3) { |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 1518 | checkUnnamed987(o.boundary); |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 1519 | unittest.expect(o.cachePolicy, unittest.equals('foo')); |
| 1520 | unittest.expect(o.countryCode, unittest.equals('foo')); |
| 1521 | unittest.expect(o.latitude, unittest.equals(42.0)); |
| 1522 | unittest.expect(o.longitude, unittest.equals(42.0)); |
| 1523 | unittest.expect(o.mapType, unittest.equals('foo')); |
| 1524 | checkGeolayerdataGeoViewport(o.viewport); |
| 1525 | unittest.expect(o.zoom, unittest.equals(42)); |
| 1526 | } |
| 1527 | buildCounterGeolayerdataGeo--; |
| 1528 | } |
| 1529 | |
| 1530 | core.int buildCounterGeolayerdata = 0; |
| 1531 | buildGeolayerdata() { |
| 1532 | var o = new api.Geolayerdata(); |
| 1533 | buildCounterGeolayerdata++; |
| 1534 | if (buildCounterGeolayerdata < 3) { |
| 1535 | o.common = buildGeolayerdataCommon(); |
| 1536 | o.geo = buildGeolayerdataGeo(); |
| 1537 | o.kind = "foo"; |
| 1538 | } |
| 1539 | buildCounterGeolayerdata--; |
| 1540 | return o; |
| 1541 | } |
| 1542 | |
| 1543 | checkGeolayerdata(api.Geolayerdata o) { |
| 1544 | buildCounterGeolayerdata++; |
| 1545 | if (buildCounterGeolayerdata < 3) { |
| 1546 | checkGeolayerdataCommon(o.common); |
| 1547 | checkGeolayerdataGeo(o.geo); |
| 1548 | unittest.expect(o.kind, unittest.equals('foo')); |
| 1549 | } |
| 1550 | buildCounterGeolayerdata--; |
| 1551 | } |
| 1552 | |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 1553 | buildUnnamed988() { |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 1554 | var o = new core.List<api.Layersummary>(); |
| 1555 | o.add(buildLayersummary()); |
| 1556 | o.add(buildLayersummary()); |
| 1557 | return o; |
| 1558 | } |
| 1559 | |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 1560 | checkUnnamed988(core.List<api.Layersummary> o) { |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 1561 | unittest.expect(o, unittest.hasLength(2)); |
| 1562 | checkLayersummary(o[0]); |
| 1563 | checkLayersummary(o[1]); |
| 1564 | } |
| 1565 | |
| 1566 | core.int buildCounterLayersummaries = 0; |
| 1567 | buildLayersummaries() { |
| 1568 | var o = new api.Layersummaries(); |
| 1569 | buildCounterLayersummaries++; |
| 1570 | if (buildCounterLayersummaries < 3) { |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 1571 | o.items = buildUnnamed988(); |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 1572 | o.kind = "foo"; |
| 1573 | o.totalItems = 42; |
| 1574 | } |
| 1575 | buildCounterLayersummaries--; |
| 1576 | return o; |
| 1577 | } |
| 1578 | |
| 1579 | checkLayersummaries(api.Layersummaries o) { |
| 1580 | buildCounterLayersummaries++; |
| 1581 | if (buildCounterLayersummaries < 3) { |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 1582 | checkUnnamed988(o.items); |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 1583 | unittest.expect(o.kind, unittest.equals('foo')); |
| 1584 | unittest.expect(o.totalItems, unittest.equals(42)); |
| 1585 | } |
| 1586 | buildCounterLayersummaries--; |
| 1587 | } |
| 1588 | |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 1589 | buildUnnamed989() { |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 1590 | var o = new core.List<core.String>(); |
| 1591 | o.add("foo"); |
| 1592 | o.add("foo"); |
| 1593 | return o; |
| 1594 | } |
| 1595 | |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 1596 | checkUnnamed989(core.List<core.String> o) { |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 1597 | unittest.expect(o, unittest.hasLength(2)); |
| 1598 | unittest.expect(o[0], unittest.equals('foo')); |
| 1599 | unittest.expect(o[1], unittest.equals('foo')); |
| 1600 | } |
| 1601 | |
| 1602 | core.int buildCounterLayersummary = 0; |
| 1603 | buildLayersummary() { |
| 1604 | var o = new api.Layersummary(); |
| 1605 | buildCounterLayersummary++; |
| 1606 | if (buildCounterLayersummary < 3) { |
| 1607 | o.annotationCount = 42; |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 1608 | o.annotationTypes = buildUnnamed989(); |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 1609 | o.annotationsDataLink = "foo"; |
| 1610 | o.annotationsLink = "foo"; |
| 1611 | o.contentVersion = "foo"; |
| 1612 | o.dataCount = 42; |
| 1613 | o.id = "foo"; |
| 1614 | o.kind = "foo"; |
| 1615 | o.layerId = "foo"; |
| 1616 | o.selfLink = "foo"; |
| 1617 | o.updated = core.DateTime.parse("2002-02-27T14:01:02"); |
| 1618 | o.volumeAnnotationsVersion = "foo"; |
| 1619 | o.volumeId = "foo"; |
| 1620 | } |
| 1621 | buildCounterLayersummary--; |
| 1622 | return o; |
| 1623 | } |
| 1624 | |
| 1625 | checkLayersummary(api.Layersummary o) { |
| 1626 | buildCounterLayersummary++; |
| 1627 | if (buildCounterLayersummary < 3) { |
| 1628 | unittest.expect(o.annotationCount, unittest.equals(42)); |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 1629 | checkUnnamed989(o.annotationTypes); |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 1630 | unittest.expect(o.annotationsDataLink, unittest.equals('foo')); |
| 1631 | unittest.expect(o.annotationsLink, unittest.equals('foo')); |
| 1632 | unittest.expect(o.contentVersion, unittest.equals('foo')); |
| 1633 | unittest.expect(o.dataCount, unittest.equals(42)); |
| 1634 | unittest.expect(o.id, unittest.equals('foo')); |
| 1635 | unittest.expect(o.kind, unittest.equals('foo')); |
| 1636 | unittest.expect(o.layerId, unittest.equals('foo')); |
| 1637 | unittest.expect(o.selfLink, unittest.equals('foo')); |
| 1638 | unittest.expect( |
| 1639 | o.updated, unittest.equals(core.DateTime.parse("2002-02-27T14:01:02"))); |
| 1640 | unittest.expect(o.volumeAnnotationsVersion, unittest.equals('foo')); |
| 1641 | unittest.expect(o.volumeId, unittest.equals('foo')); |
| 1642 | } |
| 1643 | buildCounterLayersummary--; |
| 1644 | } |
| 1645 | |
| 1646 | core.int buildCounterMetadataItems = 0; |
| 1647 | buildMetadataItems() { |
| 1648 | var o = new api.MetadataItems(); |
| 1649 | buildCounterMetadataItems++; |
| 1650 | if (buildCounterMetadataItems < 3) { |
| 1651 | o.downloadUrl = "foo"; |
| 1652 | o.encryptedKey = "foo"; |
| 1653 | o.language = "foo"; |
| 1654 | o.size = "foo"; |
| 1655 | o.version = "foo"; |
| 1656 | } |
| 1657 | buildCounterMetadataItems--; |
| 1658 | return o; |
| 1659 | } |
| 1660 | |
| 1661 | checkMetadataItems(api.MetadataItems o) { |
| 1662 | buildCounterMetadataItems++; |
| 1663 | if (buildCounterMetadataItems < 3) { |
| 1664 | unittest.expect(o.downloadUrl, unittest.equals('foo')); |
| 1665 | unittest.expect(o.encryptedKey, unittest.equals('foo')); |
| 1666 | unittest.expect(o.language, unittest.equals('foo')); |
| 1667 | unittest.expect(o.size, unittest.equals('foo')); |
| 1668 | unittest.expect(o.version, unittest.equals('foo')); |
| 1669 | } |
| 1670 | buildCounterMetadataItems--; |
| 1671 | } |
| 1672 | |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 1673 | buildUnnamed990() { |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 1674 | var o = new core.List<api.MetadataItems>(); |
| 1675 | o.add(buildMetadataItems()); |
| 1676 | o.add(buildMetadataItems()); |
| 1677 | return o; |
| 1678 | } |
| 1679 | |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 1680 | checkUnnamed990(core.List<api.MetadataItems> o) { |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 1681 | unittest.expect(o, unittest.hasLength(2)); |
| 1682 | checkMetadataItems(o[0]); |
| 1683 | checkMetadataItems(o[1]); |
| 1684 | } |
| 1685 | |
| 1686 | core.int buildCounterMetadata = 0; |
| 1687 | buildMetadata() { |
| 1688 | var o = new api.Metadata(); |
| 1689 | buildCounterMetadata++; |
| 1690 | if (buildCounterMetadata < 3) { |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 1691 | o.items = buildUnnamed990(); |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 1692 | o.kind = "foo"; |
| 1693 | } |
| 1694 | buildCounterMetadata--; |
| 1695 | return o; |
| 1696 | } |
| 1697 | |
| 1698 | checkMetadata(api.Metadata o) { |
| 1699 | buildCounterMetadata++; |
| 1700 | if (buildCounterMetadata < 3) { |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 1701 | checkUnnamed990(o.items); |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 1702 | unittest.expect(o.kind, unittest.equals('foo')); |
| 1703 | } |
| 1704 | buildCounterMetadata--; |
| 1705 | } |
| 1706 | |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 1707 | buildUnnamed991() { |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 1708 | var o = new core.List<core.String>(); |
| 1709 | o.add("foo"); |
| 1710 | o.add("foo"); |
| 1711 | return o; |
| 1712 | } |
| 1713 | |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 1714 | checkUnnamed991(core.List<core.String> o) { |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 1715 | unittest.expect(o, unittest.hasLength(2)); |
| 1716 | unittest.expect(o[0], unittest.equals('foo')); |
| 1717 | unittest.expect(o[1], unittest.equals('foo')); |
| 1718 | } |
| 1719 | |
| 1720 | core.int buildCounterNotification = 0; |
| 1721 | buildNotification() { |
| 1722 | var o = new api.Notification(); |
| 1723 | buildCounterNotification++; |
| 1724 | if (buildCounterNotification < 3) { |
| 1725 | o.body = "foo"; |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 1726 | o.crmExperimentIds = buildUnnamed991(); |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 1727 | o.docId = "foo"; |
| 1728 | o.docType = "foo"; |
| 1729 | o.dontShowNotification = true; |
| 1730 | o.iconUrl = "foo"; |
| 1731 | o.kind = "foo"; |
| 1732 | o.notificationGroup = "foo"; |
| 1733 | o.notificationType = "foo"; |
| 1734 | o.pcampaignId = "foo"; |
| 1735 | o.reason = "foo"; |
| 1736 | o.showNotificationSettingsAction = true; |
| 1737 | o.targetUrl = "foo"; |
| 1738 | o.title = "foo"; |
| 1739 | } |
| 1740 | buildCounterNotification--; |
| 1741 | return o; |
| 1742 | } |
| 1743 | |
| 1744 | checkNotification(api.Notification o) { |
| 1745 | buildCounterNotification++; |
| 1746 | if (buildCounterNotification < 3) { |
| 1747 | unittest.expect(o.body, unittest.equals('foo')); |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 1748 | checkUnnamed991(o.crmExperimentIds); |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 1749 | unittest.expect(o.docId, unittest.equals('foo')); |
| 1750 | unittest.expect(o.docType, unittest.equals('foo')); |
| 1751 | unittest.expect(o.dontShowNotification, unittest.isTrue); |
| 1752 | unittest.expect(o.iconUrl, unittest.equals('foo')); |
| 1753 | unittest.expect(o.kind, unittest.equals('foo')); |
| 1754 | unittest.expect(o.notificationGroup, unittest.equals('foo')); |
| 1755 | unittest.expect(o.notificationType, unittest.equals('foo')); |
| 1756 | unittest.expect(o.pcampaignId, unittest.equals('foo')); |
| 1757 | unittest.expect(o.reason, unittest.equals('foo')); |
| 1758 | unittest.expect(o.showNotificationSettingsAction, unittest.isTrue); |
| 1759 | unittest.expect(o.targetUrl, unittest.equals('foo')); |
| 1760 | unittest.expect(o.title, unittest.equals('foo')); |
| 1761 | } |
| 1762 | buildCounterNotification--; |
| 1763 | } |
| 1764 | |
| 1765 | core.int buildCounterOffersItemsItems = 0; |
| 1766 | buildOffersItemsItems() { |
| 1767 | var o = new api.OffersItemsItems(); |
| 1768 | buildCounterOffersItemsItems++; |
| 1769 | if (buildCounterOffersItemsItems < 3) { |
| 1770 | o.author = "foo"; |
| 1771 | o.canonicalVolumeLink = "foo"; |
| 1772 | o.coverUrl = "foo"; |
| 1773 | o.description = "foo"; |
| 1774 | o.title = "foo"; |
| 1775 | o.volumeId = "foo"; |
| 1776 | } |
| 1777 | buildCounterOffersItemsItems--; |
| 1778 | return o; |
| 1779 | } |
| 1780 | |
| 1781 | checkOffersItemsItems(api.OffersItemsItems o) { |
| 1782 | buildCounterOffersItemsItems++; |
| 1783 | if (buildCounterOffersItemsItems < 3) { |
| 1784 | unittest.expect(o.author, unittest.equals('foo')); |
| 1785 | unittest.expect(o.canonicalVolumeLink, unittest.equals('foo')); |
| 1786 | unittest.expect(o.coverUrl, unittest.equals('foo')); |
| 1787 | unittest.expect(o.description, unittest.equals('foo')); |
| 1788 | unittest.expect(o.title, unittest.equals('foo')); |
| 1789 | unittest.expect(o.volumeId, unittest.equals('foo')); |
| 1790 | } |
| 1791 | buildCounterOffersItemsItems--; |
| 1792 | } |
| 1793 | |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 1794 | buildUnnamed992() { |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 1795 | var o = new core.List<api.OffersItemsItems>(); |
| 1796 | o.add(buildOffersItemsItems()); |
| 1797 | o.add(buildOffersItemsItems()); |
| 1798 | return o; |
| 1799 | } |
| 1800 | |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 1801 | checkUnnamed992(core.List<api.OffersItemsItems> o) { |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 1802 | unittest.expect(o, unittest.hasLength(2)); |
| 1803 | checkOffersItemsItems(o[0]); |
| 1804 | checkOffersItemsItems(o[1]); |
| 1805 | } |
| 1806 | |
| 1807 | core.int buildCounterOffersItems = 0; |
| 1808 | buildOffersItems() { |
| 1809 | var o = new api.OffersItems(); |
| 1810 | buildCounterOffersItems++; |
| 1811 | if (buildCounterOffersItems < 3) { |
| 1812 | o.artUrl = "foo"; |
| 1813 | o.gservicesKey = "foo"; |
| 1814 | o.id = "foo"; |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 1815 | o.items = buildUnnamed992(); |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 1816 | } |
| 1817 | buildCounterOffersItems--; |
| 1818 | return o; |
| 1819 | } |
| 1820 | |
| 1821 | checkOffersItems(api.OffersItems o) { |
| 1822 | buildCounterOffersItems++; |
| 1823 | if (buildCounterOffersItems < 3) { |
| 1824 | unittest.expect(o.artUrl, unittest.equals('foo')); |
| 1825 | unittest.expect(o.gservicesKey, unittest.equals('foo')); |
| 1826 | unittest.expect(o.id, unittest.equals('foo')); |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 1827 | checkUnnamed992(o.items); |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 1828 | } |
| 1829 | buildCounterOffersItems--; |
| 1830 | } |
| 1831 | |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 1832 | buildUnnamed993() { |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 1833 | var o = new core.List<api.OffersItems>(); |
| 1834 | o.add(buildOffersItems()); |
| 1835 | o.add(buildOffersItems()); |
| 1836 | return o; |
| 1837 | } |
| 1838 | |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 1839 | checkUnnamed993(core.List<api.OffersItems> o) { |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 1840 | unittest.expect(o, unittest.hasLength(2)); |
| 1841 | checkOffersItems(o[0]); |
| 1842 | checkOffersItems(o[1]); |
| 1843 | } |
| 1844 | |
| 1845 | core.int buildCounterOffers = 0; |
| 1846 | buildOffers() { |
| 1847 | var o = new api.Offers(); |
| 1848 | buildCounterOffers++; |
| 1849 | if (buildCounterOffers < 3) { |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 1850 | o.items = buildUnnamed993(); |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 1851 | o.kind = "foo"; |
| 1852 | } |
| 1853 | buildCounterOffers--; |
| 1854 | return o; |
| 1855 | } |
| 1856 | |
| 1857 | checkOffers(api.Offers o) { |
| 1858 | buildCounterOffers++; |
| 1859 | if (buildCounterOffers < 3) { |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 1860 | checkUnnamed993(o.items); |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 1861 | unittest.expect(o.kind, unittest.equals('foo')); |
| 1862 | } |
| 1863 | buildCounterOffers--; |
| 1864 | } |
| 1865 | |
| 1866 | core.int buildCounterReadingPosition = 0; |
| 1867 | buildReadingPosition() { |
| 1868 | var o = new api.ReadingPosition(); |
| 1869 | buildCounterReadingPosition++; |
| 1870 | if (buildCounterReadingPosition < 3) { |
| 1871 | o.epubCfiPosition = "foo"; |
| 1872 | o.gbImagePosition = "foo"; |
| 1873 | o.gbTextPosition = "foo"; |
| 1874 | o.kind = "foo"; |
| 1875 | o.pdfPosition = "foo"; |
| 1876 | o.updated = core.DateTime.parse("2002-02-27T14:01:02"); |
| 1877 | o.volumeId = "foo"; |
| 1878 | } |
| 1879 | buildCounterReadingPosition--; |
| 1880 | return o; |
| 1881 | } |
| 1882 | |
| 1883 | checkReadingPosition(api.ReadingPosition o) { |
| 1884 | buildCounterReadingPosition++; |
| 1885 | if (buildCounterReadingPosition < 3) { |
| 1886 | unittest.expect(o.epubCfiPosition, unittest.equals('foo')); |
| 1887 | unittest.expect(o.gbImagePosition, unittest.equals('foo')); |
| 1888 | unittest.expect(o.gbTextPosition, unittest.equals('foo')); |
| 1889 | unittest.expect(o.kind, unittest.equals('foo')); |
| 1890 | unittest.expect(o.pdfPosition, unittest.equals('foo')); |
| 1891 | unittest.expect( |
| 1892 | o.updated, unittest.equals(core.DateTime.parse("2002-02-27T14:01:02"))); |
| 1893 | unittest.expect(o.volumeId, unittest.equals('foo')); |
| 1894 | } |
| 1895 | buildCounterReadingPosition--; |
| 1896 | } |
| 1897 | |
| 1898 | core.int buildCounterRequestAccess = 0; |
| 1899 | buildRequestAccess() { |
| 1900 | var o = new api.RequestAccess(); |
| 1901 | buildCounterRequestAccess++; |
| 1902 | if (buildCounterRequestAccess < 3) { |
| 1903 | o.concurrentAccess = buildConcurrentAccessRestriction(); |
| 1904 | o.downloadAccess = buildDownloadAccessRestriction(); |
| 1905 | o.kind = "foo"; |
| 1906 | } |
| 1907 | buildCounterRequestAccess--; |
| 1908 | return o; |
| 1909 | } |
| 1910 | |
| 1911 | checkRequestAccess(api.RequestAccess o) { |
| 1912 | buildCounterRequestAccess++; |
| 1913 | if (buildCounterRequestAccess < 3) { |
| 1914 | checkConcurrentAccessRestriction(o.concurrentAccess); |
| 1915 | checkDownloadAccessRestriction(o.downloadAccess); |
| 1916 | unittest.expect(o.kind, unittest.equals('foo')); |
| 1917 | } |
| 1918 | buildCounterRequestAccess--; |
| 1919 | } |
| 1920 | |
| 1921 | core.int buildCounterReviewAuthor = 0; |
| 1922 | buildReviewAuthor() { |
| 1923 | var o = new api.ReviewAuthor(); |
| 1924 | buildCounterReviewAuthor++; |
| 1925 | if (buildCounterReviewAuthor < 3) { |
| 1926 | o.displayName = "foo"; |
| 1927 | } |
| 1928 | buildCounterReviewAuthor--; |
| 1929 | return o; |
| 1930 | } |
| 1931 | |
| 1932 | checkReviewAuthor(api.ReviewAuthor o) { |
| 1933 | buildCounterReviewAuthor++; |
| 1934 | if (buildCounterReviewAuthor < 3) { |
| 1935 | unittest.expect(o.displayName, unittest.equals('foo')); |
| 1936 | } |
| 1937 | buildCounterReviewAuthor--; |
| 1938 | } |
| 1939 | |
| 1940 | core.int buildCounterReviewSource = 0; |
| 1941 | buildReviewSource() { |
| 1942 | var o = new api.ReviewSource(); |
| 1943 | buildCounterReviewSource++; |
| 1944 | if (buildCounterReviewSource < 3) { |
| 1945 | o.description = "foo"; |
| 1946 | o.extraDescription = "foo"; |
| 1947 | o.url = "foo"; |
| 1948 | } |
| 1949 | buildCounterReviewSource--; |
| 1950 | return o; |
| 1951 | } |
| 1952 | |
| 1953 | checkReviewSource(api.ReviewSource o) { |
| 1954 | buildCounterReviewSource++; |
| 1955 | if (buildCounterReviewSource < 3) { |
| 1956 | unittest.expect(o.description, unittest.equals('foo')); |
| 1957 | unittest.expect(o.extraDescription, unittest.equals('foo')); |
| 1958 | unittest.expect(o.url, unittest.equals('foo')); |
| 1959 | } |
| 1960 | buildCounterReviewSource--; |
| 1961 | } |
| 1962 | |
| 1963 | core.int buildCounterReview = 0; |
| 1964 | buildReview() { |
| 1965 | var o = new api.Review(); |
| 1966 | buildCounterReview++; |
| 1967 | if (buildCounterReview < 3) { |
| 1968 | o.author = buildReviewAuthor(); |
| 1969 | o.content = "foo"; |
| 1970 | o.date = "foo"; |
| 1971 | o.fullTextUrl = "foo"; |
| 1972 | o.kind = "foo"; |
| 1973 | o.rating = "foo"; |
| 1974 | o.source = buildReviewSource(); |
| 1975 | o.title = "foo"; |
| 1976 | o.type = "foo"; |
| 1977 | o.volumeId = "foo"; |
| 1978 | } |
| 1979 | buildCounterReview--; |
| 1980 | return o; |
| 1981 | } |
| 1982 | |
| 1983 | checkReview(api.Review o) { |
| 1984 | buildCounterReview++; |
| 1985 | if (buildCounterReview < 3) { |
| 1986 | checkReviewAuthor(o.author); |
| 1987 | unittest.expect(o.content, unittest.equals('foo')); |
| 1988 | unittest.expect(o.date, unittest.equals('foo')); |
| 1989 | unittest.expect(o.fullTextUrl, unittest.equals('foo')); |
| 1990 | unittest.expect(o.kind, unittest.equals('foo')); |
| 1991 | unittest.expect(o.rating, unittest.equals('foo')); |
| 1992 | checkReviewSource(o.source); |
| 1993 | unittest.expect(o.title, unittest.equals('foo')); |
| 1994 | unittest.expect(o.type, unittest.equals('foo')); |
| 1995 | unittest.expect(o.volumeId, unittest.equals('foo')); |
| 1996 | } |
| 1997 | buildCounterReview--; |
| 1998 | } |
| 1999 | |
| 2000 | core.int buildCounterSeriesSeries = 0; |
| 2001 | buildSeriesSeries() { |
| 2002 | var o = new api.SeriesSeries(); |
| 2003 | buildCounterSeriesSeries++; |
| 2004 | if (buildCounterSeriesSeries < 3) { |
| 2005 | o.bannerImageUrl = "foo"; |
| 2006 | o.imageUrl = "foo"; |
| 2007 | o.seriesId = "foo"; |
| 2008 | o.seriesType = "foo"; |
| 2009 | o.title = "foo"; |
| 2010 | } |
| 2011 | buildCounterSeriesSeries--; |
| 2012 | return o; |
| 2013 | } |
| 2014 | |
| 2015 | checkSeriesSeries(api.SeriesSeries o) { |
| 2016 | buildCounterSeriesSeries++; |
| 2017 | if (buildCounterSeriesSeries < 3) { |
| 2018 | unittest.expect(o.bannerImageUrl, unittest.equals('foo')); |
| 2019 | unittest.expect(o.imageUrl, unittest.equals('foo')); |
| 2020 | unittest.expect(o.seriesId, unittest.equals('foo')); |
| 2021 | unittest.expect(o.seriesType, unittest.equals('foo')); |
| 2022 | unittest.expect(o.title, unittest.equals('foo')); |
| 2023 | } |
| 2024 | buildCounterSeriesSeries--; |
| 2025 | } |
| 2026 | |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 2027 | buildUnnamed994() { |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 2028 | var o = new core.List<api.SeriesSeries>(); |
| 2029 | o.add(buildSeriesSeries()); |
| 2030 | o.add(buildSeriesSeries()); |
| 2031 | return o; |
| 2032 | } |
| 2033 | |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 2034 | checkUnnamed994(core.List<api.SeriesSeries> o) { |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 2035 | unittest.expect(o, unittest.hasLength(2)); |
| 2036 | checkSeriesSeries(o[0]); |
| 2037 | checkSeriesSeries(o[1]); |
| 2038 | } |
| 2039 | |
| 2040 | core.int buildCounterSeries = 0; |
| 2041 | buildSeries() { |
| 2042 | var o = new api.Series(); |
| 2043 | buildCounterSeries++; |
| 2044 | if (buildCounterSeries < 3) { |
| 2045 | o.kind = "foo"; |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 2046 | o.series = buildUnnamed994(); |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 2047 | } |
| 2048 | buildCounterSeries--; |
| 2049 | return o; |
| 2050 | } |
| 2051 | |
| 2052 | checkSeries(api.Series o) { |
| 2053 | buildCounterSeries++; |
| 2054 | if (buildCounterSeries < 3) { |
| 2055 | unittest.expect(o.kind, unittest.equals('foo')); |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 2056 | checkUnnamed994(o.series); |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 2057 | } |
| 2058 | buildCounterSeries--; |
| 2059 | } |
| 2060 | |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 2061 | buildUnnamed995() { |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 2062 | var o = new core.List<api.Volume>(); |
| 2063 | o.add(buildVolume()); |
| 2064 | o.add(buildVolume()); |
| 2065 | return o; |
| 2066 | } |
| 2067 | |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 2068 | checkUnnamed995(core.List<api.Volume> o) { |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 2069 | unittest.expect(o, unittest.hasLength(2)); |
| 2070 | checkVolume(o[0]); |
| 2071 | checkVolume(o[1]); |
| 2072 | } |
| 2073 | |
| 2074 | core.int buildCounterSeriesmembership = 0; |
| 2075 | buildSeriesmembership() { |
| 2076 | var o = new api.Seriesmembership(); |
| 2077 | buildCounterSeriesmembership++; |
| 2078 | if (buildCounterSeriesmembership < 3) { |
| 2079 | o.kind = "foo"; |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 2080 | o.member = buildUnnamed995(); |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 2081 | o.nextPageToken = "foo"; |
| 2082 | } |
| 2083 | buildCounterSeriesmembership--; |
| 2084 | return o; |
| 2085 | } |
| 2086 | |
| 2087 | checkSeriesmembership(api.Seriesmembership o) { |
| 2088 | buildCounterSeriesmembership++; |
| 2089 | if (buildCounterSeriesmembership < 3) { |
| 2090 | unittest.expect(o.kind, unittest.equals('foo')); |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 2091 | checkUnnamed995(o.member); |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 2092 | unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 2093 | } |
| 2094 | buildCounterSeriesmembership--; |
| 2095 | } |
| 2096 | |
| 2097 | core.int buildCounterUsersettingsNotesExport = 0; |
| 2098 | buildUsersettingsNotesExport() { |
| 2099 | var o = new api.UsersettingsNotesExport(); |
| 2100 | buildCounterUsersettingsNotesExport++; |
| 2101 | if (buildCounterUsersettingsNotesExport < 3) { |
| 2102 | o.folderName = "foo"; |
| 2103 | o.isEnabled = true; |
| 2104 | } |
| 2105 | buildCounterUsersettingsNotesExport--; |
| 2106 | return o; |
| 2107 | } |
| 2108 | |
| 2109 | checkUsersettingsNotesExport(api.UsersettingsNotesExport o) { |
| 2110 | buildCounterUsersettingsNotesExport++; |
| 2111 | if (buildCounterUsersettingsNotesExport < 3) { |
| 2112 | unittest.expect(o.folderName, unittest.equals('foo')); |
| 2113 | unittest.expect(o.isEnabled, unittest.isTrue); |
| 2114 | } |
| 2115 | buildCounterUsersettingsNotesExport--; |
| 2116 | } |
| 2117 | |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 2118 | core.int buildCounterUsersettingsNotificationMatchMyInterests = 0; |
| 2119 | buildUsersettingsNotificationMatchMyInterests() { |
| 2120 | var o = new api.UsersettingsNotificationMatchMyInterests(); |
| 2121 | buildCounterUsersettingsNotificationMatchMyInterests++; |
| 2122 | if (buildCounterUsersettingsNotificationMatchMyInterests < 3) { |
| 2123 | o.optedState = "foo"; |
| 2124 | } |
| 2125 | buildCounterUsersettingsNotificationMatchMyInterests--; |
| 2126 | return o; |
| 2127 | } |
| 2128 | |
| 2129 | checkUsersettingsNotificationMatchMyInterests( |
| 2130 | api.UsersettingsNotificationMatchMyInterests o) { |
| 2131 | buildCounterUsersettingsNotificationMatchMyInterests++; |
| 2132 | if (buildCounterUsersettingsNotificationMatchMyInterests < 3) { |
| 2133 | unittest.expect(o.optedState, unittest.equals('foo')); |
| 2134 | } |
| 2135 | buildCounterUsersettingsNotificationMatchMyInterests--; |
| 2136 | } |
| 2137 | |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 2138 | core.int buildCounterUsersettingsNotificationMoreFromAuthors = 0; |
| 2139 | buildUsersettingsNotificationMoreFromAuthors() { |
| 2140 | var o = new api.UsersettingsNotificationMoreFromAuthors(); |
| 2141 | buildCounterUsersettingsNotificationMoreFromAuthors++; |
| 2142 | if (buildCounterUsersettingsNotificationMoreFromAuthors < 3) { |
| 2143 | o.optedState = "foo"; |
| 2144 | } |
| 2145 | buildCounterUsersettingsNotificationMoreFromAuthors--; |
| 2146 | return o; |
| 2147 | } |
| 2148 | |
| 2149 | checkUsersettingsNotificationMoreFromAuthors( |
| 2150 | api.UsersettingsNotificationMoreFromAuthors o) { |
| 2151 | buildCounterUsersettingsNotificationMoreFromAuthors++; |
| 2152 | if (buildCounterUsersettingsNotificationMoreFromAuthors < 3) { |
| 2153 | unittest.expect(o.optedState, unittest.equals('foo')); |
| 2154 | } |
| 2155 | buildCounterUsersettingsNotificationMoreFromAuthors--; |
| 2156 | } |
| 2157 | |
| 2158 | core.int buildCounterUsersettingsNotificationMoreFromSeries = 0; |
| 2159 | buildUsersettingsNotificationMoreFromSeries() { |
| 2160 | var o = new api.UsersettingsNotificationMoreFromSeries(); |
| 2161 | buildCounterUsersettingsNotificationMoreFromSeries++; |
| 2162 | if (buildCounterUsersettingsNotificationMoreFromSeries < 3) { |
| 2163 | o.optedState = "foo"; |
| 2164 | } |
| 2165 | buildCounterUsersettingsNotificationMoreFromSeries--; |
| 2166 | return o; |
| 2167 | } |
| 2168 | |
| 2169 | checkUsersettingsNotificationMoreFromSeries( |
| 2170 | api.UsersettingsNotificationMoreFromSeries o) { |
| 2171 | buildCounterUsersettingsNotificationMoreFromSeries++; |
| 2172 | if (buildCounterUsersettingsNotificationMoreFromSeries < 3) { |
| 2173 | unittest.expect(o.optedState, unittest.equals('foo')); |
| 2174 | } |
| 2175 | buildCounterUsersettingsNotificationMoreFromSeries--; |
| 2176 | } |
| 2177 | |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 2178 | core.int buildCounterUsersettingsNotificationPriceDrop = 0; |
| 2179 | buildUsersettingsNotificationPriceDrop() { |
| 2180 | var o = new api.UsersettingsNotificationPriceDrop(); |
| 2181 | buildCounterUsersettingsNotificationPriceDrop++; |
| 2182 | if (buildCounterUsersettingsNotificationPriceDrop < 3) { |
| 2183 | o.optedState = "foo"; |
| 2184 | } |
| 2185 | buildCounterUsersettingsNotificationPriceDrop--; |
| 2186 | return o; |
| 2187 | } |
| 2188 | |
| 2189 | checkUsersettingsNotificationPriceDrop( |
| 2190 | api.UsersettingsNotificationPriceDrop o) { |
| 2191 | buildCounterUsersettingsNotificationPriceDrop++; |
| 2192 | if (buildCounterUsersettingsNotificationPriceDrop < 3) { |
| 2193 | unittest.expect(o.optedState, unittest.equals('foo')); |
| 2194 | } |
| 2195 | buildCounterUsersettingsNotificationPriceDrop--; |
| 2196 | } |
| 2197 | |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 2198 | core.int buildCounterUsersettingsNotificationRewardExpirations = 0; |
| 2199 | buildUsersettingsNotificationRewardExpirations() { |
| 2200 | var o = new api.UsersettingsNotificationRewardExpirations(); |
| 2201 | buildCounterUsersettingsNotificationRewardExpirations++; |
| 2202 | if (buildCounterUsersettingsNotificationRewardExpirations < 3) { |
| 2203 | o.optedState = "foo"; |
| 2204 | } |
| 2205 | buildCounterUsersettingsNotificationRewardExpirations--; |
| 2206 | return o; |
| 2207 | } |
| 2208 | |
| 2209 | checkUsersettingsNotificationRewardExpirations( |
| 2210 | api.UsersettingsNotificationRewardExpirations o) { |
| 2211 | buildCounterUsersettingsNotificationRewardExpirations++; |
| 2212 | if (buildCounterUsersettingsNotificationRewardExpirations < 3) { |
| 2213 | unittest.expect(o.optedState, unittest.equals('foo')); |
| 2214 | } |
| 2215 | buildCounterUsersettingsNotificationRewardExpirations--; |
| 2216 | } |
| 2217 | |
| 2218 | core.int buildCounterUsersettingsNotification = 0; |
| 2219 | buildUsersettingsNotification() { |
| 2220 | var o = new api.UsersettingsNotification(); |
| 2221 | buildCounterUsersettingsNotification++; |
| 2222 | if (buildCounterUsersettingsNotification < 3) { |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 2223 | o.matchMyInterests = buildUsersettingsNotificationMatchMyInterests(); |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 2224 | o.moreFromAuthors = buildUsersettingsNotificationMoreFromAuthors(); |
| 2225 | o.moreFromSeries = buildUsersettingsNotificationMoreFromSeries(); |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 2226 | o.priceDrop = buildUsersettingsNotificationPriceDrop(); |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 2227 | o.rewardExpirations = buildUsersettingsNotificationRewardExpirations(); |
| 2228 | } |
| 2229 | buildCounterUsersettingsNotification--; |
| 2230 | return o; |
| 2231 | } |
| 2232 | |
| 2233 | checkUsersettingsNotification(api.UsersettingsNotification o) { |
| 2234 | buildCounterUsersettingsNotification++; |
| 2235 | if (buildCounterUsersettingsNotification < 3) { |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 2236 | checkUsersettingsNotificationMatchMyInterests(o.matchMyInterests); |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 2237 | checkUsersettingsNotificationMoreFromAuthors(o.moreFromAuthors); |
| 2238 | checkUsersettingsNotificationMoreFromSeries(o.moreFromSeries); |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 2239 | checkUsersettingsNotificationPriceDrop(o.priceDrop); |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 2240 | checkUsersettingsNotificationRewardExpirations(o.rewardExpirations); |
| 2241 | } |
| 2242 | buildCounterUsersettingsNotification--; |
| 2243 | } |
| 2244 | |
| 2245 | core.int buildCounterUsersettings = 0; |
| 2246 | buildUsersettings() { |
| 2247 | var o = new api.Usersettings(); |
| 2248 | buildCounterUsersettings++; |
| 2249 | if (buildCounterUsersettings < 3) { |
| 2250 | o.kind = "foo"; |
| 2251 | o.notesExport = buildUsersettingsNotesExport(); |
| 2252 | o.notification = buildUsersettingsNotification(); |
| 2253 | } |
| 2254 | buildCounterUsersettings--; |
| 2255 | return o; |
| 2256 | } |
| 2257 | |
| 2258 | checkUsersettings(api.Usersettings o) { |
| 2259 | buildCounterUsersettings++; |
| 2260 | if (buildCounterUsersettings < 3) { |
| 2261 | unittest.expect(o.kind, unittest.equals('foo')); |
| 2262 | checkUsersettingsNotesExport(o.notesExport); |
| 2263 | checkUsersettingsNotification(o.notification); |
| 2264 | } |
| 2265 | buildCounterUsersettings--; |
| 2266 | } |
| 2267 | |
| 2268 | core.int buildCounterVolumeAccessInfoEpub = 0; |
| 2269 | buildVolumeAccessInfoEpub() { |
| 2270 | var o = new api.VolumeAccessInfoEpub(); |
| 2271 | buildCounterVolumeAccessInfoEpub++; |
| 2272 | if (buildCounterVolumeAccessInfoEpub < 3) { |
| 2273 | o.acsTokenLink = "foo"; |
| 2274 | o.downloadLink = "foo"; |
| 2275 | o.isAvailable = true; |
| 2276 | } |
| 2277 | buildCounterVolumeAccessInfoEpub--; |
| 2278 | return o; |
| 2279 | } |
| 2280 | |
| 2281 | checkVolumeAccessInfoEpub(api.VolumeAccessInfoEpub o) { |
| 2282 | buildCounterVolumeAccessInfoEpub++; |
| 2283 | if (buildCounterVolumeAccessInfoEpub < 3) { |
| 2284 | unittest.expect(o.acsTokenLink, unittest.equals('foo')); |
| 2285 | unittest.expect(o.downloadLink, unittest.equals('foo')); |
| 2286 | unittest.expect(o.isAvailable, unittest.isTrue); |
| 2287 | } |
| 2288 | buildCounterVolumeAccessInfoEpub--; |
| 2289 | } |
| 2290 | |
| 2291 | core.int buildCounterVolumeAccessInfoPdf = 0; |
| 2292 | buildVolumeAccessInfoPdf() { |
| 2293 | var o = new api.VolumeAccessInfoPdf(); |
| 2294 | buildCounterVolumeAccessInfoPdf++; |
| 2295 | if (buildCounterVolumeAccessInfoPdf < 3) { |
| 2296 | o.acsTokenLink = "foo"; |
| 2297 | o.downloadLink = "foo"; |
| 2298 | o.isAvailable = true; |
| 2299 | } |
| 2300 | buildCounterVolumeAccessInfoPdf--; |
| 2301 | return o; |
| 2302 | } |
| 2303 | |
| 2304 | checkVolumeAccessInfoPdf(api.VolumeAccessInfoPdf o) { |
| 2305 | buildCounterVolumeAccessInfoPdf++; |
| 2306 | if (buildCounterVolumeAccessInfoPdf < 3) { |
| 2307 | unittest.expect(o.acsTokenLink, unittest.equals('foo')); |
| 2308 | unittest.expect(o.downloadLink, unittest.equals('foo')); |
| 2309 | unittest.expect(o.isAvailable, unittest.isTrue); |
| 2310 | } |
| 2311 | buildCounterVolumeAccessInfoPdf--; |
| 2312 | } |
| 2313 | |
| 2314 | core.int buildCounterVolumeAccessInfo = 0; |
| 2315 | buildVolumeAccessInfo() { |
| 2316 | var o = new api.VolumeAccessInfo(); |
| 2317 | buildCounterVolumeAccessInfo++; |
| 2318 | if (buildCounterVolumeAccessInfo < 3) { |
| 2319 | o.accessViewStatus = "foo"; |
| 2320 | o.country = "foo"; |
| 2321 | o.downloadAccess = buildDownloadAccessRestriction(); |
| 2322 | o.driveImportedContentLink = "foo"; |
| 2323 | o.embeddable = true; |
| 2324 | o.epub = buildVolumeAccessInfoEpub(); |
| 2325 | o.explicitOfflineLicenseManagement = true; |
| 2326 | o.pdf = buildVolumeAccessInfoPdf(); |
| 2327 | o.publicDomain = true; |
| 2328 | o.quoteSharingAllowed = true; |
| 2329 | o.textToSpeechPermission = "foo"; |
| 2330 | o.viewOrderUrl = "foo"; |
| 2331 | o.viewability = "foo"; |
| 2332 | o.webReaderLink = "foo"; |
| 2333 | } |
| 2334 | buildCounterVolumeAccessInfo--; |
| 2335 | return o; |
| 2336 | } |
| 2337 | |
| 2338 | checkVolumeAccessInfo(api.VolumeAccessInfo o) { |
| 2339 | buildCounterVolumeAccessInfo++; |
| 2340 | if (buildCounterVolumeAccessInfo < 3) { |
| 2341 | unittest.expect(o.accessViewStatus, unittest.equals('foo')); |
| 2342 | unittest.expect(o.country, unittest.equals('foo')); |
| 2343 | checkDownloadAccessRestriction(o.downloadAccess); |
| 2344 | unittest.expect(o.driveImportedContentLink, unittest.equals('foo')); |
| 2345 | unittest.expect(o.embeddable, unittest.isTrue); |
| 2346 | checkVolumeAccessInfoEpub(o.epub); |
| 2347 | unittest.expect(o.explicitOfflineLicenseManagement, unittest.isTrue); |
| 2348 | checkVolumeAccessInfoPdf(o.pdf); |
| 2349 | unittest.expect(o.publicDomain, unittest.isTrue); |
| 2350 | unittest.expect(o.quoteSharingAllowed, unittest.isTrue); |
| 2351 | unittest.expect(o.textToSpeechPermission, unittest.equals('foo')); |
| 2352 | unittest.expect(o.viewOrderUrl, unittest.equals('foo')); |
| 2353 | unittest.expect(o.viewability, unittest.equals('foo')); |
| 2354 | unittest.expect(o.webReaderLink, unittest.equals('foo')); |
| 2355 | } |
| 2356 | buildCounterVolumeAccessInfo--; |
| 2357 | } |
| 2358 | |
| 2359 | core.int buildCounterVolumeLayerInfoLayers = 0; |
| 2360 | buildVolumeLayerInfoLayers() { |
| 2361 | var o = new api.VolumeLayerInfoLayers(); |
| 2362 | buildCounterVolumeLayerInfoLayers++; |
| 2363 | if (buildCounterVolumeLayerInfoLayers < 3) { |
| 2364 | o.layerId = "foo"; |
| 2365 | o.volumeAnnotationsVersion = "foo"; |
| 2366 | } |
| 2367 | buildCounterVolumeLayerInfoLayers--; |
| 2368 | return o; |
| 2369 | } |
| 2370 | |
| 2371 | checkVolumeLayerInfoLayers(api.VolumeLayerInfoLayers o) { |
| 2372 | buildCounterVolumeLayerInfoLayers++; |
| 2373 | if (buildCounterVolumeLayerInfoLayers < 3) { |
| 2374 | unittest.expect(o.layerId, unittest.equals('foo')); |
| 2375 | unittest.expect(o.volumeAnnotationsVersion, unittest.equals('foo')); |
| 2376 | } |
| 2377 | buildCounterVolumeLayerInfoLayers--; |
| 2378 | } |
| 2379 | |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 2380 | buildUnnamed996() { |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 2381 | var o = new core.List<api.VolumeLayerInfoLayers>(); |
| 2382 | o.add(buildVolumeLayerInfoLayers()); |
| 2383 | o.add(buildVolumeLayerInfoLayers()); |
| 2384 | return o; |
| 2385 | } |
| 2386 | |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 2387 | checkUnnamed996(core.List<api.VolumeLayerInfoLayers> o) { |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 2388 | unittest.expect(o, unittest.hasLength(2)); |
| 2389 | checkVolumeLayerInfoLayers(o[0]); |
| 2390 | checkVolumeLayerInfoLayers(o[1]); |
| 2391 | } |
| 2392 | |
| 2393 | core.int buildCounterVolumeLayerInfo = 0; |
| 2394 | buildVolumeLayerInfo() { |
| 2395 | var o = new api.VolumeLayerInfo(); |
| 2396 | buildCounterVolumeLayerInfo++; |
| 2397 | if (buildCounterVolumeLayerInfo < 3) { |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 2398 | o.layers = buildUnnamed996(); |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 2399 | } |
| 2400 | buildCounterVolumeLayerInfo--; |
| 2401 | return o; |
| 2402 | } |
| 2403 | |
| 2404 | checkVolumeLayerInfo(api.VolumeLayerInfo o) { |
| 2405 | buildCounterVolumeLayerInfo++; |
| 2406 | if (buildCounterVolumeLayerInfo < 3) { |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 2407 | checkUnnamed996(o.layers); |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 2408 | } |
| 2409 | buildCounterVolumeLayerInfo--; |
| 2410 | } |
| 2411 | |
| 2412 | core.int buildCounterVolumeRecommendedInfo = 0; |
| 2413 | buildVolumeRecommendedInfo() { |
| 2414 | var o = new api.VolumeRecommendedInfo(); |
| 2415 | buildCounterVolumeRecommendedInfo++; |
| 2416 | if (buildCounterVolumeRecommendedInfo < 3) { |
| 2417 | o.explanation = "foo"; |
| 2418 | } |
| 2419 | buildCounterVolumeRecommendedInfo--; |
| 2420 | return o; |
| 2421 | } |
| 2422 | |
| 2423 | checkVolumeRecommendedInfo(api.VolumeRecommendedInfo o) { |
| 2424 | buildCounterVolumeRecommendedInfo++; |
| 2425 | if (buildCounterVolumeRecommendedInfo < 3) { |
| 2426 | unittest.expect(o.explanation, unittest.equals('foo')); |
| 2427 | } |
| 2428 | buildCounterVolumeRecommendedInfo--; |
| 2429 | } |
| 2430 | |
| 2431 | core.int buildCounterVolumeSaleInfoListPrice = 0; |
| 2432 | buildVolumeSaleInfoListPrice() { |
| 2433 | var o = new api.VolumeSaleInfoListPrice(); |
| 2434 | buildCounterVolumeSaleInfoListPrice++; |
| 2435 | if (buildCounterVolumeSaleInfoListPrice < 3) { |
| 2436 | o.amount = 42.0; |
| 2437 | o.currencyCode = "foo"; |
| 2438 | } |
| 2439 | buildCounterVolumeSaleInfoListPrice--; |
| 2440 | return o; |
| 2441 | } |
| 2442 | |
| 2443 | checkVolumeSaleInfoListPrice(api.VolumeSaleInfoListPrice o) { |
| 2444 | buildCounterVolumeSaleInfoListPrice++; |
| 2445 | if (buildCounterVolumeSaleInfoListPrice < 3) { |
| 2446 | unittest.expect(o.amount, unittest.equals(42.0)); |
| 2447 | unittest.expect(o.currencyCode, unittest.equals('foo')); |
| 2448 | } |
| 2449 | buildCounterVolumeSaleInfoListPrice--; |
| 2450 | } |
| 2451 | |
| 2452 | core.int buildCounterVolumeSaleInfoOffersListPrice = 0; |
| 2453 | buildVolumeSaleInfoOffersListPrice() { |
| 2454 | var o = new api.VolumeSaleInfoOffersListPrice(); |
| 2455 | buildCounterVolumeSaleInfoOffersListPrice++; |
| 2456 | if (buildCounterVolumeSaleInfoOffersListPrice < 3) { |
| 2457 | o.amountInMicros = 42.0; |
| 2458 | o.currencyCode = "foo"; |
| 2459 | } |
| 2460 | buildCounterVolumeSaleInfoOffersListPrice--; |
| 2461 | return o; |
| 2462 | } |
| 2463 | |
| 2464 | checkVolumeSaleInfoOffersListPrice(api.VolumeSaleInfoOffersListPrice o) { |
| 2465 | buildCounterVolumeSaleInfoOffersListPrice++; |
| 2466 | if (buildCounterVolumeSaleInfoOffersListPrice < 3) { |
| 2467 | unittest.expect(o.amountInMicros, unittest.equals(42.0)); |
| 2468 | unittest.expect(o.currencyCode, unittest.equals('foo')); |
| 2469 | } |
| 2470 | buildCounterVolumeSaleInfoOffersListPrice--; |
| 2471 | } |
| 2472 | |
| 2473 | core.int buildCounterVolumeSaleInfoOffersRentalDuration = 0; |
| 2474 | buildVolumeSaleInfoOffersRentalDuration() { |
| 2475 | var o = new api.VolumeSaleInfoOffersRentalDuration(); |
| 2476 | buildCounterVolumeSaleInfoOffersRentalDuration++; |
| 2477 | if (buildCounterVolumeSaleInfoOffersRentalDuration < 3) { |
| 2478 | o.count = 42.0; |
| 2479 | o.unit = "foo"; |
| 2480 | } |
| 2481 | buildCounterVolumeSaleInfoOffersRentalDuration--; |
| 2482 | return o; |
| 2483 | } |
| 2484 | |
| 2485 | checkVolumeSaleInfoOffersRentalDuration( |
| 2486 | api.VolumeSaleInfoOffersRentalDuration o) { |
| 2487 | buildCounterVolumeSaleInfoOffersRentalDuration++; |
| 2488 | if (buildCounterVolumeSaleInfoOffersRentalDuration < 3) { |
| 2489 | unittest.expect(o.count, unittest.equals(42.0)); |
| 2490 | unittest.expect(o.unit, unittest.equals('foo')); |
| 2491 | } |
| 2492 | buildCounterVolumeSaleInfoOffersRentalDuration--; |
| 2493 | } |
| 2494 | |
| 2495 | core.int buildCounterVolumeSaleInfoOffersRetailPrice = 0; |
| 2496 | buildVolumeSaleInfoOffersRetailPrice() { |
| 2497 | var o = new api.VolumeSaleInfoOffersRetailPrice(); |
| 2498 | buildCounterVolumeSaleInfoOffersRetailPrice++; |
| 2499 | if (buildCounterVolumeSaleInfoOffersRetailPrice < 3) { |
| 2500 | o.amountInMicros = 42.0; |
| 2501 | o.currencyCode = "foo"; |
| 2502 | } |
| 2503 | buildCounterVolumeSaleInfoOffersRetailPrice--; |
| 2504 | return o; |
| 2505 | } |
| 2506 | |
| 2507 | checkVolumeSaleInfoOffersRetailPrice(api.VolumeSaleInfoOffersRetailPrice o) { |
| 2508 | buildCounterVolumeSaleInfoOffersRetailPrice++; |
| 2509 | if (buildCounterVolumeSaleInfoOffersRetailPrice < 3) { |
| 2510 | unittest.expect(o.amountInMicros, unittest.equals(42.0)); |
| 2511 | unittest.expect(o.currencyCode, unittest.equals('foo')); |
| 2512 | } |
| 2513 | buildCounterVolumeSaleInfoOffersRetailPrice--; |
| 2514 | } |
| 2515 | |
| 2516 | core.int buildCounterVolumeSaleInfoOffers = 0; |
| 2517 | buildVolumeSaleInfoOffers() { |
| 2518 | var o = new api.VolumeSaleInfoOffers(); |
| 2519 | buildCounterVolumeSaleInfoOffers++; |
| 2520 | if (buildCounterVolumeSaleInfoOffers < 3) { |
| 2521 | o.finskyOfferType = 42; |
| 2522 | o.giftable = true; |
| 2523 | o.listPrice = buildVolumeSaleInfoOffersListPrice(); |
| 2524 | o.rentalDuration = buildVolumeSaleInfoOffersRentalDuration(); |
| 2525 | o.retailPrice = buildVolumeSaleInfoOffersRetailPrice(); |
| 2526 | } |
| 2527 | buildCounterVolumeSaleInfoOffers--; |
| 2528 | return o; |
| 2529 | } |
| 2530 | |
| 2531 | checkVolumeSaleInfoOffers(api.VolumeSaleInfoOffers o) { |
| 2532 | buildCounterVolumeSaleInfoOffers++; |
| 2533 | if (buildCounterVolumeSaleInfoOffers < 3) { |
| 2534 | unittest.expect(o.finskyOfferType, unittest.equals(42)); |
| 2535 | unittest.expect(o.giftable, unittest.isTrue); |
| 2536 | checkVolumeSaleInfoOffersListPrice(o.listPrice); |
| 2537 | checkVolumeSaleInfoOffersRentalDuration(o.rentalDuration); |
| 2538 | checkVolumeSaleInfoOffersRetailPrice(o.retailPrice); |
| 2539 | } |
| 2540 | buildCounterVolumeSaleInfoOffers--; |
| 2541 | } |
| 2542 | |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 2543 | buildUnnamed997() { |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 2544 | var o = new core.List<api.VolumeSaleInfoOffers>(); |
| 2545 | o.add(buildVolumeSaleInfoOffers()); |
| 2546 | o.add(buildVolumeSaleInfoOffers()); |
| 2547 | return o; |
| 2548 | } |
| 2549 | |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 2550 | checkUnnamed997(core.List<api.VolumeSaleInfoOffers> o) { |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 2551 | unittest.expect(o, unittest.hasLength(2)); |
| 2552 | checkVolumeSaleInfoOffers(o[0]); |
| 2553 | checkVolumeSaleInfoOffers(o[1]); |
| 2554 | } |
| 2555 | |
| 2556 | core.int buildCounterVolumeSaleInfoRetailPrice = 0; |
| 2557 | buildVolumeSaleInfoRetailPrice() { |
| 2558 | var o = new api.VolumeSaleInfoRetailPrice(); |
| 2559 | buildCounterVolumeSaleInfoRetailPrice++; |
| 2560 | if (buildCounterVolumeSaleInfoRetailPrice < 3) { |
| 2561 | o.amount = 42.0; |
| 2562 | o.currencyCode = "foo"; |
| 2563 | } |
| 2564 | buildCounterVolumeSaleInfoRetailPrice--; |
| 2565 | return o; |
| 2566 | } |
| 2567 | |
| 2568 | checkVolumeSaleInfoRetailPrice(api.VolumeSaleInfoRetailPrice o) { |
| 2569 | buildCounterVolumeSaleInfoRetailPrice++; |
| 2570 | if (buildCounterVolumeSaleInfoRetailPrice < 3) { |
| 2571 | unittest.expect(o.amount, unittest.equals(42.0)); |
| 2572 | unittest.expect(o.currencyCode, unittest.equals('foo')); |
| 2573 | } |
| 2574 | buildCounterVolumeSaleInfoRetailPrice--; |
| 2575 | } |
| 2576 | |
| 2577 | core.int buildCounterVolumeSaleInfo = 0; |
| 2578 | buildVolumeSaleInfo() { |
| 2579 | var o = new api.VolumeSaleInfo(); |
| 2580 | buildCounterVolumeSaleInfo++; |
| 2581 | if (buildCounterVolumeSaleInfo < 3) { |
| 2582 | o.buyLink = "foo"; |
| 2583 | o.country = "foo"; |
| 2584 | o.isEbook = true; |
| 2585 | o.listPrice = buildVolumeSaleInfoListPrice(); |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 2586 | o.offers = buildUnnamed997(); |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 2587 | o.onSaleDate = core.DateTime.parse("2002-02-27T14:01:02"); |
| 2588 | o.retailPrice = buildVolumeSaleInfoRetailPrice(); |
| 2589 | o.saleability = "foo"; |
| 2590 | } |
| 2591 | buildCounterVolumeSaleInfo--; |
| 2592 | return o; |
| 2593 | } |
| 2594 | |
| 2595 | checkVolumeSaleInfo(api.VolumeSaleInfo o) { |
| 2596 | buildCounterVolumeSaleInfo++; |
| 2597 | if (buildCounterVolumeSaleInfo < 3) { |
| 2598 | unittest.expect(o.buyLink, unittest.equals('foo')); |
| 2599 | unittest.expect(o.country, unittest.equals('foo')); |
| 2600 | unittest.expect(o.isEbook, unittest.isTrue); |
| 2601 | checkVolumeSaleInfoListPrice(o.listPrice); |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 2602 | checkUnnamed997(o.offers); |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 2603 | unittest.expect(o.onSaleDate, |
| 2604 | unittest.equals(core.DateTime.parse("2002-02-27T14:01:02"))); |
| 2605 | checkVolumeSaleInfoRetailPrice(o.retailPrice); |
| 2606 | unittest.expect(o.saleability, unittest.equals('foo')); |
| 2607 | } |
| 2608 | buildCounterVolumeSaleInfo--; |
| 2609 | } |
| 2610 | |
| 2611 | core.int buildCounterVolumeSearchInfo = 0; |
| 2612 | buildVolumeSearchInfo() { |
| 2613 | var o = new api.VolumeSearchInfo(); |
| 2614 | buildCounterVolumeSearchInfo++; |
| 2615 | if (buildCounterVolumeSearchInfo < 3) { |
| 2616 | o.textSnippet = "foo"; |
| 2617 | } |
| 2618 | buildCounterVolumeSearchInfo--; |
| 2619 | return o; |
| 2620 | } |
| 2621 | |
| 2622 | checkVolumeSearchInfo(api.VolumeSearchInfo o) { |
| 2623 | buildCounterVolumeSearchInfo++; |
| 2624 | if (buildCounterVolumeSearchInfo < 3) { |
| 2625 | unittest.expect(o.textSnippet, unittest.equals('foo')); |
| 2626 | } |
| 2627 | buildCounterVolumeSearchInfo--; |
| 2628 | } |
| 2629 | |
| 2630 | core.int buildCounterVolumeUserInfoCopy = 0; |
| 2631 | buildVolumeUserInfoCopy() { |
| 2632 | var o = new api.VolumeUserInfoCopy(); |
| 2633 | buildCounterVolumeUserInfoCopy++; |
| 2634 | if (buildCounterVolumeUserInfoCopy < 3) { |
| 2635 | o.allowedCharacterCount = 42; |
| 2636 | o.limitType = "foo"; |
| 2637 | o.remainingCharacterCount = 42; |
| 2638 | o.updated = core.DateTime.parse("2002-02-27T14:01:02"); |
| 2639 | } |
| 2640 | buildCounterVolumeUserInfoCopy--; |
| 2641 | return o; |
| 2642 | } |
| 2643 | |
| 2644 | checkVolumeUserInfoCopy(api.VolumeUserInfoCopy o) { |
| 2645 | buildCounterVolumeUserInfoCopy++; |
| 2646 | if (buildCounterVolumeUserInfoCopy < 3) { |
| 2647 | unittest.expect(o.allowedCharacterCount, unittest.equals(42)); |
| 2648 | unittest.expect(o.limitType, unittest.equals('foo')); |
| 2649 | unittest.expect(o.remainingCharacterCount, unittest.equals(42)); |
| 2650 | unittest.expect( |
| 2651 | o.updated, unittest.equals(core.DateTime.parse("2002-02-27T14:01:02"))); |
| 2652 | } |
| 2653 | buildCounterVolumeUserInfoCopy--; |
| 2654 | } |
| 2655 | |
| 2656 | core.int buildCounterVolumeUserInfoFamilySharing = 0; |
| 2657 | buildVolumeUserInfoFamilySharing() { |
| 2658 | var o = new api.VolumeUserInfoFamilySharing(); |
| 2659 | buildCounterVolumeUserInfoFamilySharing++; |
| 2660 | if (buildCounterVolumeUserInfoFamilySharing < 3) { |
| 2661 | o.familyRole = "foo"; |
| 2662 | o.isSharingAllowed = true; |
| 2663 | o.isSharingDisabledByFop = true; |
| 2664 | } |
| 2665 | buildCounterVolumeUserInfoFamilySharing--; |
| 2666 | return o; |
| 2667 | } |
| 2668 | |
| 2669 | checkVolumeUserInfoFamilySharing(api.VolumeUserInfoFamilySharing o) { |
| 2670 | buildCounterVolumeUserInfoFamilySharing++; |
| 2671 | if (buildCounterVolumeUserInfoFamilySharing < 3) { |
| 2672 | unittest.expect(o.familyRole, unittest.equals('foo')); |
| 2673 | unittest.expect(o.isSharingAllowed, unittest.isTrue); |
| 2674 | unittest.expect(o.isSharingDisabledByFop, unittest.isTrue); |
| 2675 | } |
| 2676 | buildCounterVolumeUserInfoFamilySharing--; |
| 2677 | } |
| 2678 | |
| 2679 | core.int buildCounterVolumeUserInfoRentalPeriod = 0; |
| 2680 | buildVolumeUserInfoRentalPeriod() { |
| 2681 | var o = new api.VolumeUserInfoRentalPeriod(); |
| 2682 | buildCounterVolumeUserInfoRentalPeriod++; |
| 2683 | if (buildCounterVolumeUserInfoRentalPeriod < 3) { |
| 2684 | o.endUtcSec = "foo"; |
| 2685 | o.startUtcSec = "foo"; |
| 2686 | } |
| 2687 | buildCounterVolumeUserInfoRentalPeriod--; |
| 2688 | return o; |
| 2689 | } |
| 2690 | |
| 2691 | checkVolumeUserInfoRentalPeriod(api.VolumeUserInfoRentalPeriod o) { |
| 2692 | buildCounterVolumeUserInfoRentalPeriod++; |
| 2693 | if (buildCounterVolumeUserInfoRentalPeriod < 3) { |
| 2694 | unittest.expect(o.endUtcSec, unittest.equals('foo')); |
| 2695 | unittest.expect(o.startUtcSec, unittest.equals('foo')); |
| 2696 | } |
| 2697 | buildCounterVolumeUserInfoRentalPeriod--; |
| 2698 | } |
| 2699 | |
| 2700 | core.int buildCounterVolumeUserInfoUserUploadedVolumeInfo = 0; |
| 2701 | buildVolumeUserInfoUserUploadedVolumeInfo() { |
| 2702 | var o = new api.VolumeUserInfoUserUploadedVolumeInfo(); |
| 2703 | buildCounterVolumeUserInfoUserUploadedVolumeInfo++; |
| 2704 | if (buildCounterVolumeUserInfoUserUploadedVolumeInfo < 3) { |
| 2705 | o.processingState = "foo"; |
| 2706 | } |
| 2707 | buildCounterVolumeUserInfoUserUploadedVolumeInfo--; |
| 2708 | return o; |
| 2709 | } |
| 2710 | |
| 2711 | checkVolumeUserInfoUserUploadedVolumeInfo( |
| 2712 | api.VolumeUserInfoUserUploadedVolumeInfo o) { |
| 2713 | buildCounterVolumeUserInfoUserUploadedVolumeInfo++; |
| 2714 | if (buildCounterVolumeUserInfoUserUploadedVolumeInfo < 3) { |
| 2715 | unittest.expect(o.processingState, unittest.equals('foo')); |
| 2716 | } |
| 2717 | buildCounterVolumeUserInfoUserUploadedVolumeInfo--; |
| 2718 | } |
| 2719 | |
| 2720 | core.int buildCounterVolumeUserInfo = 0; |
| 2721 | buildVolumeUserInfo() { |
| 2722 | var o = new api.VolumeUserInfo(); |
| 2723 | buildCounterVolumeUserInfo++; |
| 2724 | if (buildCounterVolumeUserInfo < 3) { |
| 2725 | o.acquiredTime = core.DateTime.parse("2002-02-27T14:01:02"); |
| 2726 | o.acquisitionType = 42; |
| 2727 | o.copy = buildVolumeUserInfoCopy(); |
| 2728 | o.entitlementType = 42; |
| 2729 | o.familySharing = buildVolumeUserInfoFamilySharing(); |
| 2730 | o.isFamilySharedFromUser = true; |
| 2731 | o.isFamilySharedToUser = true; |
| 2732 | o.isFamilySharingAllowed = true; |
| 2733 | o.isFamilySharingDisabledByFop = true; |
| 2734 | o.isInMyBooks = true; |
| 2735 | o.isPreordered = true; |
| 2736 | o.isPurchased = true; |
| 2737 | o.isUploaded = true; |
| 2738 | o.readingPosition = buildReadingPosition(); |
| 2739 | o.rentalPeriod = buildVolumeUserInfoRentalPeriod(); |
| 2740 | o.rentalState = "foo"; |
| 2741 | o.review = buildReview(); |
| 2742 | o.updated = core.DateTime.parse("2002-02-27T14:01:02"); |
| 2743 | o.userUploadedVolumeInfo = buildVolumeUserInfoUserUploadedVolumeInfo(); |
| 2744 | } |
| 2745 | buildCounterVolumeUserInfo--; |
| 2746 | return o; |
| 2747 | } |
| 2748 | |
| 2749 | checkVolumeUserInfo(api.VolumeUserInfo o) { |
| 2750 | buildCounterVolumeUserInfo++; |
| 2751 | if (buildCounterVolumeUserInfo < 3) { |
| 2752 | unittest.expect(o.acquiredTime, |
| 2753 | unittest.equals(core.DateTime.parse("2002-02-27T14:01:02"))); |
| 2754 | unittest.expect(o.acquisitionType, unittest.equals(42)); |
| 2755 | checkVolumeUserInfoCopy(o.copy); |
| 2756 | unittest.expect(o.entitlementType, unittest.equals(42)); |
| 2757 | checkVolumeUserInfoFamilySharing(o.familySharing); |
| 2758 | unittest.expect(o.isFamilySharedFromUser, unittest.isTrue); |
| 2759 | unittest.expect(o.isFamilySharedToUser, unittest.isTrue); |
| 2760 | unittest.expect(o.isFamilySharingAllowed, unittest.isTrue); |
| 2761 | unittest.expect(o.isFamilySharingDisabledByFop, unittest.isTrue); |
| 2762 | unittest.expect(o.isInMyBooks, unittest.isTrue); |
| 2763 | unittest.expect(o.isPreordered, unittest.isTrue); |
| 2764 | unittest.expect(o.isPurchased, unittest.isTrue); |
| 2765 | unittest.expect(o.isUploaded, unittest.isTrue); |
| 2766 | checkReadingPosition(o.readingPosition); |
| 2767 | checkVolumeUserInfoRentalPeriod(o.rentalPeriod); |
| 2768 | unittest.expect(o.rentalState, unittest.equals('foo')); |
| 2769 | checkReview(o.review); |
| 2770 | unittest.expect( |
| 2771 | o.updated, unittest.equals(core.DateTime.parse("2002-02-27T14:01:02"))); |
| 2772 | checkVolumeUserInfoUserUploadedVolumeInfo(o.userUploadedVolumeInfo); |
| 2773 | } |
| 2774 | buildCounterVolumeUserInfo--; |
| 2775 | } |
| 2776 | |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 2777 | buildUnnamed998() { |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 2778 | var o = new core.List<core.String>(); |
| 2779 | o.add("foo"); |
| 2780 | o.add("foo"); |
| 2781 | return o; |
| 2782 | } |
| 2783 | |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 2784 | checkUnnamed998(core.List<core.String> o) { |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 2785 | unittest.expect(o, unittest.hasLength(2)); |
| 2786 | unittest.expect(o[0], unittest.equals('foo')); |
| 2787 | unittest.expect(o[1], unittest.equals('foo')); |
| 2788 | } |
| 2789 | |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 2790 | buildUnnamed999() { |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 2791 | var o = new core.List<core.String>(); |
| 2792 | o.add("foo"); |
| 2793 | o.add("foo"); |
| 2794 | return o; |
| 2795 | } |
| 2796 | |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 2797 | checkUnnamed999(core.List<core.String> o) { |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 2798 | unittest.expect(o, unittest.hasLength(2)); |
| 2799 | unittest.expect(o[0], unittest.equals('foo')); |
| 2800 | unittest.expect(o[1], unittest.equals('foo')); |
| 2801 | } |
| 2802 | |
| 2803 | core.int buildCounterVolumeVolumeInfoDimensions = 0; |
| 2804 | buildVolumeVolumeInfoDimensions() { |
| 2805 | var o = new api.VolumeVolumeInfoDimensions(); |
| 2806 | buildCounterVolumeVolumeInfoDimensions++; |
| 2807 | if (buildCounterVolumeVolumeInfoDimensions < 3) { |
| 2808 | o.height = "foo"; |
| 2809 | o.thickness = "foo"; |
| 2810 | o.width = "foo"; |
| 2811 | } |
| 2812 | buildCounterVolumeVolumeInfoDimensions--; |
| 2813 | return o; |
| 2814 | } |
| 2815 | |
| 2816 | checkVolumeVolumeInfoDimensions(api.VolumeVolumeInfoDimensions o) { |
| 2817 | buildCounterVolumeVolumeInfoDimensions++; |
| 2818 | if (buildCounterVolumeVolumeInfoDimensions < 3) { |
| 2819 | unittest.expect(o.height, unittest.equals('foo')); |
| 2820 | unittest.expect(o.thickness, unittest.equals('foo')); |
| 2821 | unittest.expect(o.width, unittest.equals('foo')); |
| 2822 | } |
| 2823 | buildCounterVolumeVolumeInfoDimensions--; |
| 2824 | } |
| 2825 | |
| 2826 | core.int buildCounterVolumeVolumeInfoImageLinks = 0; |
| 2827 | buildVolumeVolumeInfoImageLinks() { |
| 2828 | var o = new api.VolumeVolumeInfoImageLinks(); |
| 2829 | buildCounterVolumeVolumeInfoImageLinks++; |
| 2830 | if (buildCounterVolumeVolumeInfoImageLinks < 3) { |
| 2831 | o.extraLarge = "foo"; |
| 2832 | o.large = "foo"; |
| 2833 | o.medium = "foo"; |
| 2834 | o.small = "foo"; |
| 2835 | o.smallThumbnail = "foo"; |
| 2836 | o.thumbnail = "foo"; |
| 2837 | } |
| 2838 | buildCounterVolumeVolumeInfoImageLinks--; |
| 2839 | return o; |
| 2840 | } |
| 2841 | |
| 2842 | checkVolumeVolumeInfoImageLinks(api.VolumeVolumeInfoImageLinks o) { |
| 2843 | buildCounterVolumeVolumeInfoImageLinks++; |
| 2844 | if (buildCounterVolumeVolumeInfoImageLinks < 3) { |
| 2845 | unittest.expect(o.extraLarge, unittest.equals('foo')); |
| 2846 | unittest.expect(o.large, unittest.equals('foo')); |
| 2847 | unittest.expect(o.medium, unittest.equals('foo')); |
| 2848 | unittest.expect(o.small, unittest.equals('foo')); |
| 2849 | unittest.expect(o.smallThumbnail, unittest.equals('foo')); |
| 2850 | unittest.expect(o.thumbnail, unittest.equals('foo')); |
| 2851 | } |
| 2852 | buildCounterVolumeVolumeInfoImageLinks--; |
| 2853 | } |
| 2854 | |
| 2855 | core.int buildCounterVolumeVolumeInfoIndustryIdentifiers = 0; |
| 2856 | buildVolumeVolumeInfoIndustryIdentifiers() { |
| 2857 | var o = new api.VolumeVolumeInfoIndustryIdentifiers(); |
| 2858 | buildCounterVolumeVolumeInfoIndustryIdentifiers++; |
| 2859 | if (buildCounterVolumeVolumeInfoIndustryIdentifiers < 3) { |
| 2860 | o.identifier = "foo"; |
| 2861 | o.type = "foo"; |
| 2862 | } |
| 2863 | buildCounterVolumeVolumeInfoIndustryIdentifiers--; |
| 2864 | return o; |
| 2865 | } |
| 2866 | |
| 2867 | checkVolumeVolumeInfoIndustryIdentifiers( |
| 2868 | api.VolumeVolumeInfoIndustryIdentifiers o) { |
| 2869 | buildCounterVolumeVolumeInfoIndustryIdentifiers++; |
| 2870 | if (buildCounterVolumeVolumeInfoIndustryIdentifiers < 3) { |
| 2871 | unittest.expect(o.identifier, unittest.equals('foo')); |
| 2872 | unittest.expect(o.type, unittest.equals('foo')); |
| 2873 | } |
| 2874 | buildCounterVolumeVolumeInfoIndustryIdentifiers--; |
| 2875 | } |
| 2876 | |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 2877 | buildUnnamed1000() { |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 2878 | var o = new core.List<api.VolumeVolumeInfoIndustryIdentifiers>(); |
| 2879 | o.add(buildVolumeVolumeInfoIndustryIdentifiers()); |
| 2880 | o.add(buildVolumeVolumeInfoIndustryIdentifiers()); |
| 2881 | return o; |
| 2882 | } |
| 2883 | |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 2884 | checkUnnamed1000(core.List<api.VolumeVolumeInfoIndustryIdentifiers> o) { |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 2885 | unittest.expect(o, unittest.hasLength(2)); |
| 2886 | checkVolumeVolumeInfoIndustryIdentifiers(o[0]); |
| 2887 | checkVolumeVolumeInfoIndustryIdentifiers(o[1]); |
| 2888 | } |
| 2889 | |
| 2890 | core.int buildCounterVolumeVolumeInfoPanelizationSummary = 0; |
| 2891 | buildVolumeVolumeInfoPanelizationSummary() { |
| 2892 | var o = new api.VolumeVolumeInfoPanelizationSummary(); |
| 2893 | buildCounterVolumeVolumeInfoPanelizationSummary++; |
| 2894 | if (buildCounterVolumeVolumeInfoPanelizationSummary < 3) { |
| 2895 | o.containsEpubBubbles = true; |
| 2896 | o.containsImageBubbles = true; |
| 2897 | o.epubBubbleVersion = "foo"; |
| 2898 | o.imageBubbleVersion = "foo"; |
| 2899 | } |
| 2900 | buildCounterVolumeVolumeInfoPanelizationSummary--; |
| 2901 | return o; |
| 2902 | } |
| 2903 | |
| 2904 | checkVolumeVolumeInfoPanelizationSummary( |
| 2905 | api.VolumeVolumeInfoPanelizationSummary o) { |
| 2906 | buildCounterVolumeVolumeInfoPanelizationSummary++; |
| 2907 | if (buildCounterVolumeVolumeInfoPanelizationSummary < 3) { |
| 2908 | unittest.expect(o.containsEpubBubbles, unittest.isTrue); |
| 2909 | unittest.expect(o.containsImageBubbles, unittest.isTrue); |
| 2910 | unittest.expect(o.epubBubbleVersion, unittest.equals('foo')); |
| 2911 | unittest.expect(o.imageBubbleVersion, unittest.equals('foo')); |
| 2912 | } |
| 2913 | buildCounterVolumeVolumeInfoPanelizationSummary--; |
| 2914 | } |
| 2915 | |
| 2916 | core.int buildCounterVolumeVolumeInfo = 0; |
| 2917 | buildVolumeVolumeInfo() { |
| 2918 | var o = new api.VolumeVolumeInfo(); |
| 2919 | buildCounterVolumeVolumeInfo++; |
| 2920 | if (buildCounterVolumeVolumeInfo < 3) { |
| 2921 | o.allowAnonLogging = true; |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 2922 | o.authors = buildUnnamed998(); |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 2923 | o.averageRating = 42.0; |
| 2924 | o.canonicalVolumeLink = "foo"; |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 2925 | o.categories = buildUnnamed999(); |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 2926 | o.contentVersion = "foo"; |
| 2927 | o.description = "foo"; |
| 2928 | o.dimensions = buildVolumeVolumeInfoDimensions(); |
| 2929 | o.imageLinks = buildVolumeVolumeInfoImageLinks(); |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 2930 | o.industryIdentifiers = buildUnnamed1000(); |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 2931 | o.infoLink = "foo"; |
| 2932 | o.language = "foo"; |
| 2933 | o.mainCategory = "foo"; |
| 2934 | o.maturityRating = "foo"; |
| 2935 | o.pageCount = 42; |
| 2936 | o.panelizationSummary = buildVolumeVolumeInfoPanelizationSummary(); |
| 2937 | o.previewLink = "foo"; |
| 2938 | o.printType = "foo"; |
| 2939 | o.printedPageCount = 42; |
| 2940 | o.publishedDate = "foo"; |
| 2941 | o.publisher = "foo"; |
| 2942 | o.ratingsCount = 42; |
| 2943 | o.readingModes = { |
| 2944 | 'list': [1, 2, 3], |
| 2945 | 'bool': true, |
| 2946 | 'string': 'foo' |
| 2947 | }; |
| 2948 | o.samplePageCount = 42; |
| 2949 | o.seriesInfo = buildVolumeseriesinfo(); |
| 2950 | o.subtitle = "foo"; |
| 2951 | o.title = "foo"; |
| 2952 | } |
| 2953 | buildCounterVolumeVolumeInfo--; |
| 2954 | return o; |
| 2955 | } |
| 2956 | |
| 2957 | checkVolumeVolumeInfo(api.VolumeVolumeInfo o) { |
| 2958 | buildCounterVolumeVolumeInfo++; |
| 2959 | if (buildCounterVolumeVolumeInfo < 3) { |
| 2960 | unittest.expect(o.allowAnonLogging, unittest.isTrue); |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 2961 | checkUnnamed998(o.authors); |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 2962 | unittest.expect(o.averageRating, unittest.equals(42.0)); |
| 2963 | unittest.expect(o.canonicalVolumeLink, unittest.equals('foo')); |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 2964 | checkUnnamed999(o.categories); |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 2965 | unittest.expect(o.contentVersion, unittest.equals('foo')); |
| 2966 | unittest.expect(o.description, unittest.equals('foo')); |
| 2967 | checkVolumeVolumeInfoDimensions(o.dimensions); |
| 2968 | checkVolumeVolumeInfoImageLinks(o.imageLinks); |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 2969 | checkUnnamed1000(o.industryIdentifiers); |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 2970 | unittest.expect(o.infoLink, unittest.equals('foo')); |
| 2971 | unittest.expect(o.language, unittest.equals('foo')); |
| 2972 | unittest.expect(o.mainCategory, unittest.equals('foo')); |
| 2973 | unittest.expect(o.maturityRating, unittest.equals('foo')); |
| 2974 | unittest.expect(o.pageCount, unittest.equals(42)); |
| 2975 | checkVolumeVolumeInfoPanelizationSummary(o.panelizationSummary); |
| 2976 | unittest.expect(o.previewLink, unittest.equals('foo')); |
| 2977 | unittest.expect(o.printType, unittest.equals('foo')); |
| 2978 | unittest.expect(o.printedPageCount, unittest.equals(42)); |
| 2979 | unittest.expect(o.publishedDate, unittest.equals('foo')); |
| 2980 | unittest.expect(o.publisher, unittest.equals('foo')); |
| 2981 | unittest.expect(o.ratingsCount, unittest.equals(42)); |
| 2982 | var casted2 = (o.readingModes) as core.Map; |
| 2983 | unittest.expect(casted2, unittest.hasLength(3)); |
| 2984 | unittest.expect(casted2["list"], unittest.equals([1, 2, 3])); |
| 2985 | unittest.expect(casted2["bool"], unittest.equals(true)); |
| 2986 | unittest.expect(casted2["string"], unittest.equals('foo')); |
| 2987 | unittest.expect(o.samplePageCount, unittest.equals(42)); |
| 2988 | checkVolumeseriesinfo(o.seriesInfo); |
| 2989 | unittest.expect(o.subtitle, unittest.equals('foo')); |
| 2990 | unittest.expect(o.title, unittest.equals('foo')); |
| 2991 | } |
| 2992 | buildCounterVolumeVolumeInfo--; |
| 2993 | } |
| 2994 | |
| 2995 | core.int buildCounterVolume = 0; |
| 2996 | buildVolume() { |
| 2997 | var o = new api.Volume(); |
| 2998 | buildCounterVolume++; |
| 2999 | if (buildCounterVolume < 3) { |
| 3000 | o.accessInfo = buildVolumeAccessInfo(); |
| 3001 | o.etag = "foo"; |
| 3002 | o.id = "foo"; |
| 3003 | o.kind = "foo"; |
| 3004 | o.layerInfo = buildVolumeLayerInfo(); |
| 3005 | o.recommendedInfo = buildVolumeRecommendedInfo(); |
| 3006 | o.saleInfo = buildVolumeSaleInfo(); |
| 3007 | o.searchInfo = buildVolumeSearchInfo(); |
| 3008 | o.selfLink = "foo"; |
| 3009 | o.userInfo = buildVolumeUserInfo(); |
| 3010 | o.volumeInfo = buildVolumeVolumeInfo(); |
| 3011 | } |
| 3012 | buildCounterVolume--; |
| 3013 | return o; |
| 3014 | } |
| 3015 | |
| 3016 | checkVolume(api.Volume o) { |
| 3017 | buildCounterVolume++; |
| 3018 | if (buildCounterVolume < 3) { |
| 3019 | checkVolumeAccessInfo(o.accessInfo); |
| 3020 | unittest.expect(o.etag, unittest.equals('foo')); |
| 3021 | unittest.expect(o.id, unittest.equals('foo')); |
| 3022 | unittest.expect(o.kind, unittest.equals('foo')); |
| 3023 | checkVolumeLayerInfo(o.layerInfo); |
| 3024 | checkVolumeRecommendedInfo(o.recommendedInfo); |
| 3025 | checkVolumeSaleInfo(o.saleInfo); |
| 3026 | checkVolumeSearchInfo(o.searchInfo); |
| 3027 | unittest.expect(o.selfLink, unittest.equals('foo')); |
| 3028 | checkVolumeUserInfo(o.userInfo); |
| 3029 | checkVolumeVolumeInfo(o.volumeInfo); |
| 3030 | } |
| 3031 | buildCounterVolume--; |
| 3032 | } |
| 3033 | |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 3034 | buildUnnamed1001() { |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 3035 | var o = new core.List<api.Volume>(); |
| 3036 | o.add(buildVolume()); |
| 3037 | o.add(buildVolume()); |
| 3038 | return o; |
| 3039 | } |
| 3040 | |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 3041 | checkUnnamed1001(core.List<api.Volume> o) { |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 3042 | unittest.expect(o, unittest.hasLength(2)); |
| 3043 | checkVolume(o[0]); |
| 3044 | checkVolume(o[1]); |
| 3045 | } |
| 3046 | |
| 3047 | core.int buildCounterVolume2 = 0; |
| 3048 | buildVolume2() { |
| 3049 | var o = new api.Volume2(); |
| 3050 | buildCounterVolume2++; |
| 3051 | if (buildCounterVolume2 < 3) { |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 3052 | o.items = buildUnnamed1001(); |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 3053 | o.kind = "foo"; |
| 3054 | o.nextPageToken = "foo"; |
| 3055 | } |
| 3056 | buildCounterVolume2--; |
| 3057 | return o; |
| 3058 | } |
| 3059 | |
| 3060 | checkVolume2(api.Volume2 o) { |
| 3061 | buildCounterVolume2++; |
| 3062 | if (buildCounterVolume2 < 3) { |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 3063 | checkUnnamed1001(o.items); |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 3064 | unittest.expect(o.kind, unittest.equals('foo')); |
| 3065 | unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 3066 | } |
| 3067 | buildCounterVolume2--; |
| 3068 | } |
| 3069 | |
| 3070 | core.int buildCounterVolumeannotationContentRanges = 0; |
| 3071 | buildVolumeannotationContentRanges() { |
| 3072 | var o = new api.VolumeannotationContentRanges(); |
| 3073 | buildCounterVolumeannotationContentRanges++; |
| 3074 | if (buildCounterVolumeannotationContentRanges < 3) { |
| 3075 | o.cfiRange = buildBooksAnnotationsRange(); |
| 3076 | o.contentVersion = "foo"; |
| 3077 | o.gbImageRange = buildBooksAnnotationsRange(); |
| 3078 | o.gbTextRange = buildBooksAnnotationsRange(); |
| 3079 | } |
| 3080 | buildCounterVolumeannotationContentRanges--; |
| 3081 | return o; |
| 3082 | } |
| 3083 | |
| 3084 | checkVolumeannotationContentRanges(api.VolumeannotationContentRanges o) { |
| 3085 | buildCounterVolumeannotationContentRanges++; |
| 3086 | if (buildCounterVolumeannotationContentRanges < 3) { |
| 3087 | checkBooksAnnotationsRange(o.cfiRange); |
| 3088 | unittest.expect(o.contentVersion, unittest.equals('foo')); |
| 3089 | checkBooksAnnotationsRange(o.gbImageRange); |
| 3090 | checkBooksAnnotationsRange(o.gbTextRange); |
| 3091 | } |
| 3092 | buildCounterVolumeannotationContentRanges--; |
| 3093 | } |
| 3094 | |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 3095 | buildUnnamed1002() { |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 3096 | var o = new core.List<core.String>(); |
| 3097 | o.add("foo"); |
| 3098 | o.add("foo"); |
| 3099 | return o; |
| 3100 | } |
| 3101 | |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 3102 | checkUnnamed1002(core.List<core.String> o) { |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 3103 | unittest.expect(o, unittest.hasLength(2)); |
| 3104 | unittest.expect(o[0], unittest.equals('foo')); |
| 3105 | unittest.expect(o[1], unittest.equals('foo')); |
| 3106 | } |
| 3107 | |
| 3108 | core.int buildCounterVolumeannotation = 0; |
| 3109 | buildVolumeannotation() { |
| 3110 | var o = new api.Volumeannotation(); |
| 3111 | buildCounterVolumeannotation++; |
| 3112 | if (buildCounterVolumeannotation < 3) { |
| 3113 | o.annotationDataId = "foo"; |
| 3114 | o.annotationDataLink = "foo"; |
| 3115 | o.annotationType = "foo"; |
| 3116 | o.contentRanges = buildVolumeannotationContentRanges(); |
| 3117 | o.data = "foo"; |
| 3118 | o.deleted = true; |
| 3119 | o.id = "foo"; |
| 3120 | o.kind = "foo"; |
| 3121 | o.layerId = "foo"; |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 3122 | o.pageIds = buildUnnamed1002(); |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 3123 | o.selectedText = "foo"; |
| 3124 | o.selfLink = "foo"; |
| 3125 | o.updated = core.DateTime.parse("2002-02-27T14:01:02"); |
| 3126 | o.volumeId = "foo"; |
| 3127 | } |
| 3128 | buildCounterVolumeannotation--; |
| 3129 | return o; |
| 3130 | } |
| 3131 | |
| 3132 | checkVolumeannotation(api.Volumeannotation o) { |
| 3133 | buildCounterVolumeannotation++; |
| 3134 | if (buildCounterVolumeannotation < 3) { |
| 3135 | unittest.expect(o.annotationDataId, unittest.equals('foo')); |
| 3136 | unittest.expect(o.annotationDataLink, unittest.equals('foo')); |
| 3137 | unittest.expect(o.annotationType, unittest.equals('foo')); |
| 3138 | checkVolumeannotationContentRanges(o.contentRanges); |
| 3139 | unittest.expect(o.data, unittest.equals('foo')); |
| 3140 | unittest.expect(o.deleted, unittest.isTrue); |
| 3141 | unittest.expect(o.id, unittest.equals('foo')); |
| 3142 | unittest.expect(o.kind, unittest.equals('foo')); |
| 3143 | unittest.expect(o.layerId, unittest.equals('foo')); |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 3144 | checkUnnamed1002(o.pageIds); |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 3145 | unittest.expect(o.selectedText, unittest.equals('foo')); |
| 3146 | unittest.expect(o.selfLink, unittest.equals('foo')); |
| 3147 | unittest.expect( |
| 3148 | o.updated, unittest.equals(core.DateTime.parse("2002-02-27T14:01:02"))); |
| 3149 | unittest.expect(o.volumeId, unittest.equals('foo')); |
| 3150 | } |
| 3151 | buildCounterVolumeannotation--; |
| 3152 | } |
| 3153 | |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 3154 | buildUnnamed1003() { |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 3155 | var o = new core.List<api.Volumeannotation>(); |
| 3156 | o.add(buildVolumeannotation()); |
| 3157 | o.add(buildVolumeannotation()); |
| 3158 | return o; |
| 3159 | } |
| 3160 | |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 3161 | checkUnnamed1003(core.List<api.Volumeannotation> o) { |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 3162 | unittest.expect(o, unittest.hasLength(2)); |
| 3163 | checkVolumeannotation(o[0]); |
| 3164 | checkVolumeannotation(o[1]); |
| 3165 | } |
| 3166 | |
| 3167 | core.int buildCounterVolumeannotations = 0; |
| 3168 | buildVolumeannotations() { |
| 3169 | var o = new api.Volumeannotations(); |
| 3170 | buildCounterVolumeannotations++; |
| 3171 | if (buildCounterVolumeannotations < 3) { |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 3172 | o.items = buildUnnamed1003(); |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 3173 | o.kind = "foo"; |
| 3174 | o.nextPageToken = "foo"; |
| 3175 | o.totalItems = 42; |
| 3176 | o.version = "foo"; |
| 3177 | } |
| 3178 | buildCounterVolumeannotations--; |
| 3179 | return o; |
| 3180 | } |
| 3181 | |
| 3182 | checkVolumeannotations(api.Volumeannotations o) { |
| 3183 | buildCounterVolumeannotations++; |
| 3184 | if (buildCounterVolumeannotations < 3) { |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 3185 | checkUnnamed1003(o.items); |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 3186 | unittest.expect(o.kind, unittest.equals('foo')); |
| 3187 | unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 3188 | unittest.expect(o.totalItems, unittest.equals(42)); |
| 3189 | unittest.expect(o.version, unittest.equals('foo')); |
| 3190 | } |
| 3191 | buildCounterVolumeannotations--; |
| 3192 | } |
| 3193 | |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 3194 | buildUnnamed1004() { |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 3195 | var o = new core.List<api.Volume>(); |
| 3196 | o.add(buildVolume()); |
| 3197 | o.add(buildVolume()); |
| 3198 | return o; |
| 3199 | } |
| 3200 | |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 3201 | checkUnnamed1004(core.List<api.Volume> o) { |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 3202 | unittest.expect(o, unittest.hasLength(2)); |
| 3203 | checkVolume(o[0]); |
| 3204 | checkVolume(o[1]); |
| 3205 | } |
| 3206 | |
| 3207 | core.int buildCounterVolumes = 0; |
| 3208 | buildVolumes() { |
| 3209 | var o = new api.Volumes(); |
| 3210 | buildCounterVolumes++; |
| 3211 | if (buildCounterVolumes < 3) { |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 3212 | o.items = buildUnnamed1004(); |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 3213 | o.kind = "foo"; |
| 3214 | o.totalItems = 42; |
| 3215 | } |
| 3216 | buildCounterVolumes--; |
| 3217 | return o; |
| 3218 | } |
| 3219 | |
| 3220 | checkVolumes(api.Volumes o) { |
| 3221 | buildCounterVolumes++; |
| 3222 | if (buildCounterVolumes < 3) { |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 3223 | checkUnnamed1004(o.items); |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 3224 | unittest.expect(o.kind, unittest.equals('foo')); |
| 3225 | unittest.expect(o.totalItems, unittest.equals(42)); |
| 3226 | } |
| 3227 | buildCounterVolumes--; |
| 3228 | } |
| 3229 | |
| 3230 | core.int buildCounterVolumeseriesinfoVolumeSeriesIssue = 0; |
| 3231 | buildVolumeseriesinfoVolumeSeriesIssue() { |
| 3232 | var o = new api.VolumeseriesinfoVolumeSeriesIssue(); |
| 3233 | buildCounterVolumeseriesinfoVolumeSeriesIssue++; |
| 3234 | if (buildCounterVolumeseriesinfoVolumeSeriesIssue < 3) { |
| 3235 | o.issueDisplayNumber = "foo"; |
| 3236 | o.issueOrderNumber = 42; |
| 3237 | } |
| 3238 | buildCounterVolumeseriesinfoVolumeSeriesIssue--; |
| 3239 | return o; |
| 3240 | } |
| 3241 | |
| 3242 | checkVolumeseriesinfoVolumeSeriesIssue( |
| 3243 | api.VolumeseriesinfoVolumeSeriesIssue o) { |
| 3244 | buildCounterVolumeseriesinfoVolumeSeriesIssue++; |
| 3245 | if (buildCounterVolumeseriesinfoVolumeSeriesIssue < 3) { |
| 3246 | unittest.expect(o.issueDisplayNumber, unittest.equals('foo')); |
| 3247 | unittest.expect(o.issueOrderNumber, unittest.equals(42)); |
| 3248 | } |
| 3249 | buildCounterVolumeseriesinfoVolumeSeriesIssue--; |
| 3250 | } |
| 3251 | |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 3252 | buildUnnamed1005() { |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 3253 | var o = new core.List<api.VolumeseriesinfoVolumeSeriesIssue>(); |
| 3254 | o.add(buildVolumeseriesinfoVolumeSeriesIssue()); |
| 3255 | o.add(buildVolumeseriesinfoVolumeSeriesIssue()); |
| 3256 | return o; |
| 3257 | } |
| 3258 | |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 3259 | checkUnnamed1005(core.List<api.VolumeseriesinfoVolumeSeriesIssue> o) { |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 3260 | unittest.expect(o, unittest.hasLength(2)); |
| 3261 | checkVolumeseriesinfoVolumeSeriesIssue(o[0]); |
| 3262 | checkVolumeseriesinfoVolumeSeriesIssue(o[1]); |
| 3263 | } |
| 3264 | |
| 3265 | core.int buildCounterVolumeseriesinfoVolumeSeries = 0; |
| 3266 | buildVolumeseriesinfoVolumeSeries() { |
| 3267 | var o = new api.VolumeseriesinfoVolumeSeries(); |
| 3268 | buildCounterVolumeseriesinfoVolumeSeries++; |
| 3269 | if (buildCounterVolumeseriesinfoVolumeSeries < 3) { |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 3270 | o.issue = buildUnnamed1005(); |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 3271 | o.orderNumber = 42; |
| 3272 | o.seriesBookType = "foo"; |
| 3273 | o.seriesId = "foo"; |
| 3274 | } |
| 3275 | buildCounterVolumeseriesinfoVolumeSeries--; |
| 3276 | return o; |
| 3277 | } |
| 3278 | |
| 3279 | checkVolumeseriesinfoVolumeSeries(api.VolumeseriesinfoVolumeSeries o) { |
| 3280 | buildCounterVolumeseriesinfoVolumeSeries++; |
| 3281 | if (buildCounterVolumeseriesinfoVolumeSeries < 3) { |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 3282 | checkUnnamed1005(o.issue); |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 3283 | unittest.expect(o.orderNumber, unittest.equals(42)); |
| 3284 | unittest.expect(o.seriesBookType, unittest.equals('foo')); |
| 3285 | unittest.expect(o.seriesId, unittest.equals('foo')); |
| 3286 | } |
| 3287 | buildCounterVolumeseriesinfoVolumeSeries--; |
| 3288 | } |
| 3289 | |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 3290 | buildUnnamed1006() { |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 3291 | var o = new core.List<api.VolumeseriesinfoVolumeSeries>(); |
| 3292 | o.add(buildVolumeseriesinfoVolumeSeries()); |
| 3293 | o.add(buildVolumeseriesinfoVolumeSeries()); |
| 3294 | return o; |
| 3295 | } |
| 3296 | |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 3297 | checkUnnamed1006(core.List<api.VolumeseriesinfoVolumeSeries> o) { |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 3298 | unittest.expect(o, unittest.hasLength(2)); |
| 3299 | checkVolumeseriesinfoVolumeSeries(o[0]); |
| 3300 | checkVolumeseriesinfoVolumeSeries(o[1]); |
| 3301 | } |
| 3302 | |
| 3303 | core.int buildCounterVolumeseriesinfo = 0; |
| 3304 | buildVolumeseriesinfo() { |
| 3305 | var o = new api.Volumeseriesinfo(); |
| 3306 | buildCounterVolumeseriesinfo++; |
| 3307 | if (buildCounterVolumeseriesinfo < 3) { |
| 3308 | o.bookDisplayNumber = "foo"; |
| 3309 | o.kind = "foo"; |
| 3310 | o.shortSeriesBookTitle = "foo"; |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 3311 | o.volumeSeries = buildUnnamed1006(); |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 3312 | } |
| 3313 | buildCounterVolumeseriesinfo--; |
| 3314 | return o; |
| 3315 | } |
| 3316 | |
| 3317 | checkVolumeseriesinfo(api.Volumeseriesinfo o) { |
| 3318 | buildCounterVolumeseriesinfo++; |
| 3319 | if (buildCounterVolumeseriesinfo < 3) { |
| 3320 | unittest.expect(o.bookDisplayNumber, unittest.equals('foo')); |
| 3321 | unittest.expect(o.kind, unittest.equals('foo')); |
| 3322 | unittest.expect(o.shortSeriesBookTitle, unittest.equals('foo')); |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 3323 | checkUnnamed1006(o.volumeSeries); |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 3324 | } |
| 3325 | buildCounterVolumeseriesinfo--; |
| 3326 | } |
| 3327 | |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 3328 | buildUnnamed1007() { |
Martin Kustermann | be20048 | 2017-12-04 11:42:32 +0100 | [diff] [blame] | 3329 | var o = new core.List<core.String>(); |
| 3330 | o.add("foo"); |
| 3331 | o.add("foo"); |
| 3332 | return o; |
| 3333 | } |
| 3334 | |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 3335 | checkUnnamed1007(core.List<core.String> o) { |
Martin Kustermann | be20048 | 2017-12-04 11:42:32 +0100 | [diff] [blame] | 3336 | unittest.expect(o, unittest.hasLength(2)); |
| 3337 | unittest.expect(o[0], unittest.equals('foo')); |
| 3338 | unittest.expect(o[1], unittest.equals('foo')); |
| 3339 | } |
| 3340 | |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 3341 | buildUnnamed1008() { |
Martin Kustermann | be20048 | 2017-12-04 11:42:32 +0100 | [diff] [blame] | 3342 | var o = new core.List<core.String>(); |
| 3343 | o.add("foo"); |
| 3344 | o.add("foo"); |
| 3345 | return o; |
| 3346 | } |
| 3347 | |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 3348 | checkUnnamed1008(core.List<core.String> o) { |
Martin Kustermann | be20048 | 2017-12-04 11:42:32 +0100 | [diff] [blame] | 3349 | unittest.expect(o, unittest.hasLength(2)); |
| 3350 | unittest.expect(o[0], unittest.equals('foo')); |
| 3351 | unittest.expect(o[1], unittest.equals('foo')); |
| 3352 | } |
| 3353 | |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 3354 | buildUnnamed1009() { |
Martin Kustermann | be20048 | 2017-12-04 11:42:32 +0100 | [diff] [blame] | 3355 | var o = new core.List<core.String>(); |
| 3356 | o.add("foo"); |
| 3357 | o.add("foo"); |
| 3358 | return o; |
| 3359 | } |
| 3360 | |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 3361 | checkUnnamed1009(core.List<core.String> o) { |
Martin Kustermann | be20048 | 2017-12-04 11:42:32 +0100 | [diff] [blame] | 3362 | unittest.expect(o, unittest.hasLength(2)); |
| 3363 | unittest.expect(o[0], unittest.equals('foo')); |
| 3364 | unittest.expect(o[1], unittest.equals('foo')); |
| 3365 | } |
| 3366 | |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 3367 | buildUnnamed1010() { |
Martin Kustermann | f9109a8 | 2018-01-08 15:24:20 +0100 | [diff] [blame] | 3368 | var o = new core.List<core.String>(); |
| 3369 | o.add("foo"); |
| 3370 | o.add("foo"); |
| 3371 | return o; |
| 3372 | } |
| 3373 | |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 3374 | checkUnnamed1010(core.List<core.String> o) { |
Martin Kustermann | f9109a8 | 2018-01-08 15:24:20 +0100 | [diff] [blame] | 3375 | unittest.expect(o, unittest.hasLength(2)); |
| 3376 | unittest.expect(o[0], unittest.equals('foo')); |
| 3377 | unittest.expect(o[1], unittest.equals('foo')); |
| 3378 | } |
| 3379 | |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 3380 | buildUnnamed1011() { |
Martin Kustermann | f9109a8 | 2018-01-08 15:24:20 +0100 | [diff] [blame] | 3381 | var o = new core.List<core.String>(); |
| 3382 | o.add("foo"); |
| 3383 | o.add("foo"); |
| 3384 | return o; |
| 3385 | } |
| 3386 | |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 3387 | checkUnnamed1011(core.List<core.String> o) { |
Martin Kustermann | f9109a8 | 2018-01-08 15:24:20 +0100 | [diff] [blame] | 3388 | unittest.expect(o, unittest.hasLength(2)); |
| 3389 | unittest.expect(o[0], unittest.equals('foo')); |
| 3390 | unittest.expect(o[1], unittest.equals('foo')); |
| 3391 | } |
| 3392 | |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 3393 | buildUnnamed1012() { |
Martin Kustermann | f9109a8 | 2018-01-08 15:24:20 +0100 | [diff] [blame] | 3394 | var o = new core.List<core.String>(); |
| 3395 | o.add("foo"); |
| 3396 | o.add("foo"); |
| 3397 | return o; |
| 3398 | } |
| 3399 | |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 3400 | checkUnnamed1012(core.List<core.String> o) { |
Martin Kustermann | f9109a8 | 2018-01-08 15:24:20 +0100 | [diff] [blame] | 3401 | unittest.expect(o, unittest.hasLength(2)); |
| 3402 | unittest.expect(o[0], unittest.equals('foo')); |
| 3403 | unittest.expect(o[1], unittest.equals('foo')); |
| 3404 | } |
| 3405 | |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 3406 | buildUnnamed1013() { |
Martin Kustermann | f9109a8 | 2018-01-08 15:24:20 +0100 | [diff] [blame] | 3407 | var o = new core.List<core.String>(); |
| 3408 | o.add("foo"); |
| 3409 | o.add("foo"); |
| 3410 | return o; |
| 3411 | } |
| 3412 | |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 3413 | checkUnnamed1013(core.List<core.String> o) { |
Martin Kustermann | f9109a8 | 2018-01-08 15:24:20 +0100 | [diff] [blame] | 3414 | unittest.expect(o, unittest.hasLength(2)); |
| 3415 | unittest.expect(o[0], unittest.equals('foo')); |
| 3416 | unittest.expect(o[1], unittest.equals('foo')); |
| 3417 | } |
| 3418 | |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 3419 | buildUnnamed1014() { |
Martin Kustermann | f9109a8 | 2018-01-08 15:24:20 +0100 | [diff] [blame] | 3420 | var o = new core.List<core.String>(); |
| 3421 | o.add("foo"); |
| 3422 | o.add("foo"); |
| 3423 | return o; |
| 3424 | } |
| 3425 | |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 3426 | checkUnnamed1014(core.List<core.String> o) { |
Martin Kustermann | f9109a8 | 2018-01-08 15:24:20 +0100 | [diff] [blame] | 3427 | unittest.expect(o, unittest.hasLength(2)); |
| 3428 | unittest.expect(o[0], unittest.equals('foo')); |
| 3429 | unittest.expect(o[1], unittest.equals('foo')); |
| 3430 | } |
| 3431 | |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 3432 | buildUnnamed1015() { |
Martin Kustermann | f9109a8 | 2018-01-08 15:24:20 +0100 | [diff] [blame] | 3433 | var o = new core.List<core.String>(); |
| 3434 | o.add("foo"); |
| 3435 | o.add("foo"); |
| 3436 | return o; |
| 3437 | } |
| 3438 | |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 3439 | checkUnnamed1015(core.List<core.String> o) { |
Martin Kustermann | f9109a8 | 2018-01-08 15:24:20 +0100 | [diff] [blame] | 3440 | unittest.expect(o, unittest.hasLength(2)); |
| 3441 | unittest.expect(o[0], unittest.equals('foo')); |
| 3442 | unittest.expect(o[1], unittest.equals('foo')); |
| 3443 | } |
| 3444 | |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 3445 | buildUnnamed1016() { |
Martin Kustermann | f9109a8 | 2018-01-08 15:24:20 +0100 | [diff] [blame] | 3446 | var o = new core.List<core.String>(); |
| 3447 | o.add("foo"); |
| 3448 | o.add("foo"); |
| 3449 | return o; |
| 3450 | } |
| 3451 | |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 3452 | checkUnnamed1016(core.List<core.String> o) { |
Martin Kustermann | f9109a8 | 2018-01-08 15:24:20 +0100 | [diff] [blame] | 3453 | unittest.expect(o, unittest.hasLength(2)); |
| 3454 | unittest.expect(o[0], unittest.equals('foo')); |
| 3455 | unittest.expect(o[1], unittest.equals('foo')); |
| 3456 | } |
| 3457 | |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 3458 | buildUnnamed1017() { |
Martin Kustermann | f9109a8 | 2018-01-08 15:24:20 +0100 | [diff] [blame] | 3459 | var o = new core.List<core.String>(); |
| 3460 | o.add("foo"); |
| 3461 | o.add("foo"); |
| 3462 | return o; |
| 3463 | } |
| 3464 | |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 3465 | checkUnnamed1017(core.List<core.String> o) { |
Martin Kustermann | f9109a8 | 2018-01-08 15:24:20 +0100 | [diff] [blame] | 3466 | unittest.expect(o, unittest.hasLength(2)); |
| 3467 | unittest.expect(o[0], unittest.equals('foo')); |
| 3468 | unittest.expect(o[1], unittest.equals('foo')); |
| 3469 | } |
| 3470 | |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 3471 | buildUnnamed1018() { |
Martin Kustermann | f9109a8 | 2018-01-08 15:24:20 +0100 | [diff] [blame] | 3472 | var o = new core.List<core.String>(); |
| 3473 | o.add("foo"); |
| 3474 | o.add("foo"); |
| 3475 | return o; |
| 3476 | } |
| 3477 | |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 3478 | checkUnnamed1018(core.List<core.String> o) { |
Martin Kustermann | f9109a8 | 2018-01-08 15:24:20 +0100 | [diff] [blame] | 3479 | unittest.expect(o, unittest.hasLength(2)); |
| 3480 | unittest.expect(o[0], unittest.equals('foo')); |
| 3481 | unittest.expect(o[1], unittest.equals('foo')); |
| 3482 | } |
| 3483 | |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 3484 | main() { |
| 3485 | unittest.group("obj-schema-AnnotationClientVersionRanges", () { |
| 3486 | unittest.test("to-json--from-json", () { |
| 3487 | var o = buildAnnotationClientVersionRanges(); |
| 3488 | var od = new api.AnnotationClientVersionRanges.fromJson(o.toJson()); |
| 3489 | checkAnnotationClientVersionRanges(od); |
| 3490 | }); |
| 3491 | }); |
| 3492 | |
| 3493 | unittest.group("obj-schema-AnnotationCurrentVersionRanges", () { |
| 3494 | unittest.test("to-json--from-json", () { |
| 3495 | var o = buildAnnotationCurrentVersionRanges(); |
| 3496 | var od = new api.AnnotationCurrentVersionRanges.fromJson(o.toJson()); |
| 3497 | checkAnnotationCurrentVersionRanges(od); |
| 3498 | }); |
| 3499 | }); |
| 3500 | |
| 3501 | unittest.group("obj-schema-AnnotationLayerSummary", () { |
| 3502 | unittest.test("to-json--from-json", () { |
| 3503 | var o = buildAnnotationLayerSummary(); |
| 3504 | var od = new api.AnnotationLayerSummary.fromJson(o.toJson()); |
| 3505 | checkAnnotationLayerSummary(od); |
| 3506 | }); |
| 3507 | }); |
| 3508 | |
| 3509 | unittest.group("obj-schema-Annotation", () { |
| 3510 | unittest.test("to-json--from-json", () { |
| 3511 | var o = buildAnnotation(); |
| 3512 | var od = new api.Annotation.fromJson(o.toJson()); |
| 3513 | checkAnnotation(od); |
| 3514 | }); |
| 3515 | }); |
| 3516 | |
| 3517 | unittest.group("obj-schema-Annotationdata", () { |
| 3518 | unittest.test("to-json--from-json", () { |
| 3519 | var o = buildAnnotationdata(); |
| 3520 | var od = new api.Annotationdata.fromJson(o.toJson()); |
| 3521 | checkAnnotationdata(od); |
| 3522 | }); |
| 3523 | }); |
| 3524 | |
| 3525 | unittest.group("obj-schema-Annotations", () { |
| 3526 | unittest.test("to-json--from-json", () { |
| 3527 | var o = buildAnnotations(); |
| 3528 | var od = new api.Annotations.fromJson(o.toJson()); |
| 3529 | checkAnnotations(od); |
| 3530 | }); |
| 3531 | }); |
| 3532 | |
| 3533 | unittest.group("obj-schema-AnnotationsSummaryLayers", () { |
| 3534 | unittest.test("to-json--from-json", () { |
| 3535 | var o = buildAnnotationsSummaryLayers(); |
| 3536 | var od = new api.AnnotationsSummaryLayers.fromJson(o.toJson()); |
| 3537 | checkAnnotationsSummaryLayers(od); |
| 3538 | }); |
| 3539 | }); |
| 3540 | |
| 3541 | unittest.group("obj-schema-AnnotationsSummary", () { |
| 3542 | unittest.test("to-json--from-json", () { |
| 3543 | var o = buildAnnotationsSummary(); |
| 3544 | var od = new api.AnnotationsSummary.fromJson(o.toJson()); |
| 3545 | checkAnnotationsSummary(od); |
| 3546 | }); |
| 3547 | }); |
| 3548 | |
| 3549 | unittest.group("obj-schema-Annotationsdata", () { |
| 3550 | unittest.test("to-json--from-json", () { |
| 3551 | var o = buildAnnotationsdata(); |
| 3552 | var od = new api.Annotationsdata.fromJson(o.toJson()); |
| 3553 | checkAnnotationsdata(od); |
| 3554 | }); |
| 3555 | }); |
| 3556 | |
| 3557 | unittest.group("obj-schema-BooksAnnotationsRange", () { |
| 3558 | unittest.test("to-json--from-json", () { |
| 3559 | var o = buildBooksAnnotationsRange(); |
| 3560 | var od = new api.BooksAnnotationsRange.fromJson(o.toJson()); |
| 3561 | checkBooksAnnotationsRange(od); |
| 3562 | }); |
| 3563 | }); |
| 3564 | |
| 3565 | unittest.group("obj-schema-BooksCloudloadingResource", () { |
| 3566 | unittest.test("to-json--from-json", () { |
| 3567 | var o = buildBooksCloudloadingResource(); |
| 3568 | var od = new api.BooksCloudloadingResource.fromJson(o.toJson()); |
| 3569 | checkBooksCloudloadingResource(od); |
| 3570 | }); |
| 3571 | }); |
| 3572 | |
| 3573 | unittest.group("obj-schema-BooksVolumesRecommendedRateResponse", () { |
| 3574 | unittest.test("to-json--from-json", () { |
| 3575 | var o = buildBooksVolumesRecommendedRateResponse(); |
| 3576 | var od = new api.BooksVolumesRecommendedRateResponse.fromJson(o.toJson()); |
| 3577 | checkBooksVolumesRecommendedRateResponse(od); |
| 3578 | }); |
| 3579 | }); |
| 3580 | |
| 3581 | unittest.group("obj-schema-Bookshelf", () { |
| 3582 | unittest.test("to-json--from-json", () { |
| 3583 | var o = buildBookshelf(); |
| 3584 | var od = new api.Bookshelf.fromJson(o.toJson()); |
| 3585 | checkBookshelf(od); |
| 3586 | }); |
| 3587 | }); |
| 3588 | |
| 3589 | unittest.group("obj-schema-Bookshelves", () { |
| 3590 | unittest.test("to-json--from-json", () { |
| 3591 | var o = buildBookshelves(); |
| 3592 | var od = new api.Bookshelves.fromJson(o.toJson()); |
| 3593 | checkBookshelves(od); |
| 3594 | }); |
| 3595 | }); |
| 3596 | |
| 3597 | unittest.group("obj-schema-CategoryItems", () { |
| 3598 | unittest.test("to-json--from-json", () { |
| 3599 | var o = buildCategoryItems(); |
| 3600 | var od = new api.CategoryItems.fromJson(o.toJson()); |
| 3601 | checkCategoryItems(od); |
| 3602 | }); |
| 3603 | }); |
| 3604 | |
| 3605 | unittest.group("obj-schema-Category", () { |
| 3606 | unittest.test("to-json--from-json", () { |
| 3607 | var o = buildCategory(); |
| 3608 | var od = new api.Category.fromJson(o.toJson()); |
| 3609 | checkCategory(od); |
| 3610 | }); |
| 3611 | }); |
| 3612 | |
| 3613 | unittest.group("obj-schema-ConcurrentAccessRestriction", () { |
| 3614 | unittest.test("to-json--from-json", () { |
| 3615 | var o = buildConcurrentAccessRestriction(); |
| 3616 | var od = new api.ConcurrentAccessRestriction.fromJson(o.toJson()); |
| 3617 | checkConcurrentAccessRestriction(od); |
| 3618 | }); |
| 3619 | }); |
| 3620 | |
| 3621 | unittest.group("obj-schema-DictlayerdataCommon", () { |
| 3622 | unittest.test("to-json--from-json", () { |
| 3623 | var o = buildDictlayerdataCommon(); |
| 3624 | var od = new api.DictlayerdataCommon.fromJson(o.toJson()); |
| 3625 | checkDictlayerdataCommon(od); |
| 3626 | }); |
| 3627 | }); |
| 3628 | |
| 3629 | unittest.group("obj-schema-DictlayerdataDictSource", () { |
| 3630 | unittest.test("to-json--from-json", () { |
| 3631 | var o = buildDictlayerdataDictSource(); |
| 3632 | var od = new api.DictlayerdataDictSource.fromJson(o.toJson()); |
| 3633 | checkDictlayerdataDictSource(od); |
| 3634 | }); |
| 3635 | }); |
| 3636 | |
| 3637 | unittest.group("obj-schema-DictlayerdataDictWordsDerivativesSource", () { |
| 3638 | unittest.test("to-json--from-json", () { |
| 3639 | var o = buildDictlayerdataDictWordsDerivativesSource(); |
| 3640 | var od = |
| 3641 | new api.DictlayerdataDictWordsDerivativesSource.fromJson(o.toJson()); |
| 3642 | checkDictlayerdataDictWordsDerivativesSource(od); |
| 3643 | }); |
| 3644 | }); |
| 3645 | |
| 3646 | unittest.group("obj-schema-DictlayerdataDictWordsDerivatives", () { |
| 3647 | unittest.test("to-json--from-json", () { |
| 3648 | var o = buildDictlayerdataDictWordsDerivatives(); |
| 3649 | var od = new api.DictlayerdataDictWordsDerivatives.fromJson(o.toJson()); |
| 3650 | checkDictlayerdataDictWordsDerivatives(od); |
| 3651 | }); |
| 3652 | }); |
| 3653 | |
| 3654 | unittest.group("obj-schema-DictlayerdataDictWordsExamplesSource", () { |
| 3655 | unittest.test("to-json--from-json", () { |
| 3656 | var o = buildDictlayerdataDictWordsExamplesSource(); |
| 3657 | var od = |
| 3658 | new api.DictlayerdataDictWordsExamplesSource.fromJson(o.toJson()); |
| 3659 | checkDictlayerdataDictWordsExamplesSource(od); |
| 3660 | }); |
| 3661 | }); |
| 3662 | |
| 3663 | unittest.group("obj-schema-DictlayerdataDictWordsExamples", () { |
| 3664 | unittest.test("to-json--from-json", () { |
| 3665 | var o = buildDictlayerdataDictWordsExamples(); |
| 3666 | var od = new api.DictlayerdataDictWordsExamples.fromJson(o.toJson()); |
| 3667 | checkDictlayerdataDictWordsExamples(od); |
| 3668 | }); |
| 3669 | }); |
| 3670 | |
| 3671 | unittest.group("obj-schema-DictlayerdataDictWordsSensesConjugations", () { |
| 3672 | unittest.test("to-json--from-json", () { |
| 3673 | var o = buildDictlayerdataDictWordsSensesConjugations(); |
| 3674 | var od = |
| 3675 | new api.DictlayerdataDictWordsSensesConjugations.fromJson(o.toJson()); |
| 3676 | checkDictlayerdataDictWordsSensesConjugations(od); |
| 3677 | }); |
| 3678 | }); |
| 3679 | |
| 3680 | unittest.group( |
| 3681 | "obj-schema-DictlayerdataDictWordsSensesDefinitionsExamplesSource", () { |
| 3682 | unittest.test("to-json--from-json", () { |
| 3683 | var o = buildDictlayerdataDictWordsSensesDefinitionsExamplesSource(); |
| 3684 | var od = new api |
| 3685 | .DictlayerdataDictWordsSensesDefinitionsExamplesSource.fromJson( |
| 3686 | o.toJson()); |
| 3687 | checkDictlayerdataDictWordsSensesDefinitionsExamplesSource(od); |
| 3688 | }); |
| 3689 | }); |
| 3690 | |
| 3691 | unittest.group("obj-schema-DictlayerdataDictWordsSensesDefinitionsExamples", |
| 3692 | () { |
| 3693 | unittest.test("to-json--from-json", () { |
| 3694 | var o = buildDictlayerdataDictWordsSensesDefinitionsExamples(); |
| 3695 | var od = new api.DictlayerdataDictWordsSensesDefinitionsExamples.fromJson( |
| 3696 | o.toJson()); |
| 3697 | checkDictlayerdataDictWordsSensesDefinitionsExamples(od); |
| 3698 | }); |
| 3699 | }); |
| 3700 | |
| 3701 | unittest.group("obj-schema-DictlayerdataDictWordsSensesDefinitions", () { |
| 3702 | unittest.test("to-json--from-json", () { |
| 3703 | var o = buildDictlayerdataDictWordsSensesDefinitions(); |
| 3704 | var od = |
| 3705 | new api.DictlayerdataDictWordsSensesDefinitions.fromJson(o.toJson()); |
| 3706 | checkDictlayerdataDictWordsSensesDefinitions(od); |
| 3707 | }); |
| 3708 | }); |
| 3709 | |
| 3710 | unittest.group("obj-schema-DictlayerdataDictWordsSensesSource", () { |
| 3711 | unittest.test("to-json--from-json", () { |
| 3712 | var o = buildDictlayerdataDictWordsSensesSource(); |
| 3713 | var od = new api.DictlayerdataDictWordsSensesSource.fromJson(o.toJson()); |
| 3714 | checkDictlayerdataDictWordsSensesSource(od); |
| 3715 | }); |
| 3716 | }); |
| 3717 | |
| 3718 | unittest.group("obj-schema-DictlayerdataDictWordsSensesSynonymsSource", () { |
| 3719 | unittest.test("to-json--from-json", () { |
| 3720 | var o = buildDictlayerdataDictWordsSensesSynonymsSource(); |
| 3721 | var od = new api.DictlayerdataDictWordsSensesSynonymsSource.fromJson( |
| 3722 | o.toJson()); |
| 3723 | checkDictlayerdataDictWordsSensesSynonymsSource(od); |
| 3724 | }); |
| 3725 | }); |
| 3726 | |
| 3727 | unittest.group("obj-schema-DictlayerdataDictWordsSensesSynonyms", () { |
| 3728 | unittest.test("to-json--from-json", () { |
| 3729 | var o = buildDictlayerdataDictWordsSensesSynonyms(); |
| 3730 | var od = |
| 3731 | new api.DictlayerdataDictWordsSensesSynonyms.fromJson(o.toJson()); |
| 3732 | checkDictlayerdataDictWordsSensesSynonyms(od); |
| 3733 | }); |
| 3734 | }); |
| 3735 | |
| 3736 | unittest.group("obj-schema-DictlayerdataDictWordsSenses", () { |
| 3737 | unittest.test("to-json--from-json", () { |
| 3738 | var o = buildDictlayerdataDictWordsSenses(); |
| 3739 | var od = new api.DictlayerdataDictWordsSenses.fromJson(o.toJson()); |
| 3740 | checkDictlayerdataDictWordsSenses(od); |
| 3741 | }); |
| 3742 | }); |
| 3743 | |
| 3744 | unittest.group("obj-schema-DictlayerdataDictWordsSource", () { |
| 3745 | unittest.test("to-json--from-json", () { |
| 3746 | var o = buildDictlayerdataDictWordsSource(); |
| 3747 | var od = new api.DictlayerdataDictWordsSource.fromJson(o.toJson()); |
| 3748 | checkDictlayerdataDictWordsSource(od); |
| 3749 | }); |
| 3750 | }); |
| 3751 | |
| 3752 | unittest.group("obj-schema-DictlayerdataDictWords", () { |
| 3753 | unittest.test("to-json--from-json", () { |
| 3754 | var o = buildDictlayerdataDictWords(); |
| 3755 | var od = new api.DictlayerdataDictWords.fromJson(o.toJson()); |
| 3756 | checkDictlayerdataDictWords(od); |
| 3757 | }); |
| 3758 | }); |
| 3759 | |
| 3760 | unittest.group("obj-schema-DictlayerdataDict", () { |
| 3761 | unittest.test("to-json--from-json", () { |
| 3762 | var o = buildDictlayerdataDict(); |
| 3763 | var od = new api.DictlayerdataDict.fromJson(o.toJson()); |
| 3764 | checkDictlayerdataDict(od); |
| 3765 | }); |
| 3766 | }); |
| 3767 | |
| 3768 | unittest.group("obj-schema-Dictlayerdata", () { |
| 3769 | unittest.test("to-json--from-json", () { |
| 3770 | var o = buildDictlayerdata(); |
| 3771 | var od = new api.Dictlayerdata.fromJson(o.toJson()); |
| 3772 | checkDictlayerdata(od); |
| 3773 | }); |
| 3774 | }); |
| 3775 | |
| 3776 | unittest.group( |
| 3777 | "obj-schema-DiscoveryclustersClustersBannerWithContentContainer", () { |
| 3778 | unittest.test("to-json--from-json", () { |
| 3779 | var o = buildDiscoveryclustersClustersBannerWithContentContainer(); |
| 3780 | var od = |
| 3781 | new api.DiscoveryclustersClustersBannerWithContentContainer.fromJson( |
| 3782 | o.toJson()); |
| 3783 | checkDiscoveryclustersClustersBannerWithContentContainer(od); |
| 3784 | }); |
| 3785 | }); |
| 3786 | |
| 3787 | unittest.group("obj-schema-DiscoveryclustersClusters", () { |
| 3788 | unittest.test("to-json--from-json", () { |
| 3789 | var o = buildDiscoveryclustersClusters(); |
| 3790 | var od = new api.DiscoveryclustersClusters.fromJson(o.toJson()); |
| 3791 | checkDiscoveryclustersClusters(od); |
| 3792 | }); |
| 3793 | }); |
| 3794 | |
| 3795 | unittest.group("obj-schema-Discoveryclusters", () { |
| 3796 | unittest.test("to-json--from-json", () { |
| 3797 | var o = buildDiscoveryclusters(); |
| 3798 | var od = new api.Discoveryclusters.fromJson(o.toJson()); |
| 3799 | checkDiscoveryclusters(od); |
| 3800 | }); |
| 3801 | }); |
| 3802 | |
| 3803 | unittest.group("obj-schema-DownloadAccessRestriction", () { |
| 3804 | unittest.test("to-json--from-json", () { |
| 3805 | var o = buildDownloadAccessRestriction(); |
| 3806 | var od = new api.DownloadAccessRestriction.fromJson(o.toJson()); |
| 3807 | checkDownloadAccessRestriction(od); |
| 3808 | }); |
| 3809 | }); |
| 3810 | |
| 3811 | unittest.group("obj-schema-DownloadAccesses", () { |
| 3812 | unittest.test("to-json--from-json", () { |
| 3813 | var o = buildDownloadAccesses(); |
| 3814 | var od = new api.DownloadAccesses.fromJson(o.toJson()); |
| 3815 | checkDownloadAccesses(od); |
| 3816 | }); |
| 3817 | }); |
| 3818 | |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 3819 | unittest.group("obj-schema-FamilyInfoMembership", () { |
| 3820 | unittest.test("to-json--from-json", () { |
| 3821 | var o = buildFamilyInfoMembership(); |
| 3822 | var od = new api.FamilyInfoMembership.fromJson(o.toJson()); |
| 3823 | checkFamilyInfoMembership(od); |
| 3824 | }); |
| 3825 | }); |
| 3826 | |
| 3827 | unittest.group("obj-schema-FamilyInfo", () { |
| 3828 | unittest.test("to-json--from-json", () { |
| 3829 | var o = buildFamilyInfo(); |
| 3830 | var od = new api.FamilyInfo.fromJson(o.toJson()); |
| 3831 | checkFamilyInfo(od); |
| 3832 | }); |
| 3833 | }); |
| 3834 | |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 3835 | unittest.group("obj-schema-GeolayerdataCommon", () { |
| 3836 | unittest.test("to-json--from-json", () { |
| 3837 | var o = buildGeolayerdataCommon(); |
| 3838 | var od = new api.GeolayerdataCommon.fromJson(o.toJson()); |
| 3839 | checkGeolayerdataCommon(od); |
| 3840 | }); |
| 3841 | }); |
| 3842 | |
| 3843 | unittest.group("obj-schema-GeolayerdataGeoBoundary", () { |
| 3844 | unittest.test("to-json--from-json", () { |
| 3845 | var o = buildGeolayerdataGeoBoundary(); |
| 3846 | var od = new api.GeolayerdataGeoBoundary.fromJson(o.toJson()); |
| 3847 | checkGeolayerdataGeoBoundary(od); |
| 3848 | }); |
| 3849 | }); |
| 3850 | |
| 3851 | unittest.group("obj-schema-GeolayerdataGeoViewportHi", () { |
| 3852 | unittest.test("to-json--from-json", () { |
| 3853 | var o = buildGeolayerdataGeoViewportHi(); |
| 3854 | var od = new api.GeolayerdataGeoViewportHi.fromJson(o.toJson()); |
| 3855 | checkGeolayerdataGeoViewportHi(od); |
| 3856 | }); |
| 3857 | }); |
| 3858 | |
| 3859 | unittest.group("obj-schema-GeolayerdataGeoViewportLo", () { |
| 3860 | unittest.test("to-json--from-json", () { |
| 3861 | var o = buildGeolayerdataGeoViewportLo(); |
| 3862 | var od = new api.GeolayerdataGeoViewportLo.fromJson(o.toJson()); |
| 3863 | checkGeolayerdataGeoViewportLo(od); |
| 3864 | }); |
| 3865 | }); |
| 3866 | |
| 3867 | unittest.group("obj-schema-GeolayerdataGeoViewport", () { |
| 3868 | unittest.test("to-json--from-json", () { |
| 3869 | var o = buildGeolayerdataGeoViewport(); |
| 3870 | var od = new api.GeolayerdataGeoViewport.fromJson(o.toJson()); |
| 3871 | checkGeolayerdataGeoViewport(od); |
| 3872 | }); |
| 3873 | }); |
| 3874 | |
| 3875 | unittest.group("obj-schema-GeolayerdataGeo", () { |
| 3876 | unittest.test("to-json--from-json", () { |
| 3877 | var o = buildGeolayerdataGeo(); |
| 3878 | var od = new api.GeolayerdataGeo.fromJson(o.toJson()); |
| 3879 | checkGeolayerdataGeo(od); |
| 3880 | }); |
| 3881 | }); |
| 3882 | |
| 3883 | unittest.group("obj-schema-Geolayerdata", () { |
| 3884 | unittest.test("to-json--from-json", () { |
| 3885 | var o = buildGeolayerdata(); |
| 3886 | var od = new api.Geolayerdata.fromJson(o.toJson()); |
| 3887 | checkGeolayerdata(od); |
| 3888 | }); |
| 3889 | }); |
| 3890 | |
| 3891 | unittest.group("obj-schema-Layersummaries", () { |
| 3892 | unittest.test("to-json--from-json", () { |
| 3893 | var o = buildLayersummaries(); |
| 3894 | var od = new api.Layersummaries.fromJson(o.toJson()); |
| 3895 | checkLayersummaries(od); |
| 3896 | }); |
| 3897 | }); |
| 3898 | |
| 3899 | unittest.group("obj-schema-Layersummary", () { |
| 3900 | unittest.test("to-json--from-json", () { |
| 3901 | var o = buildLayersummary(); |
| 3902 | var od = new api.Layersummary.fromJson(o.toJson()); |
| 3903 | checkLayersummary(od); |
| 3904 | }); |
| 3905 | }); |
| 3906 | |
| 3907 | unittest.group("obj-schema-MetadataItems", () { |
| 3908 | unittest.test("to-json--from-json", () { |
| 3909 | var o = buildMetadataItems(); |
| 3910 | var od = new api.MetadataItems.fromJson(o.toJson()); |
| 3911 | checkMetadataItems(od); |
| 3912 | }); |
| 3913 | }); |
| 3914 | |
| 3915 | unittest.group("obj-schema-Metadata", () { |
| 3916 | unittest.test("to-json--from-json", () { |
| 3917 | var o = buildMetadata(); |
| 3918 | var od = new api.Metadata.fromJson(o.toJson()); |
| 3919 | checkMetadata(od); |
| 3920 | }); |
| 3921 | }); |
| 3922 | |
| 3923 | unittest.group("obj-schema-Notification", () { |
| 3924 | unittest.test("to-json--from-json", () { |
| 3925 | var o = buildNotification(); |
| 3926 | var od = new api.Notification.fromJson(o.toJson()); |
| 3927 | checkNotification(od); |
| 3928 | }); |
| 3929 | }); |
| 3930 | |
| 3931 | unittest.group("obj-schema-OffersItemsItems", () { |
| 3932 | unittest.test("to-json--from-json", () { |
| 3933 | var o = buildOffersItemsItems(); |
| 3934 | var od = new api.OffersItemsItems.fromJson(o.toJson()); |
| 3935 | checkOffersItemsItems(od); |
| 3936 | }); |
| 3937 | }); |
| 3938 | |
| 3939 | unittest.group("obj-schema-OffersItems", () { |
| 3940 | unittest.test("to-json--from-json", () { |
| 3941 | var o = buildOffersItems(); |
| 3942 | var od = new api.OffersItems.fromJson(o.toJson()); |
| 3943 | checkOffersItems(od); |
| 3944 | }); |
| 3945 | }); |
| 3946 | |
| 3947 | unittest.group("obj-schema-Offers", () { |
| 3948 | unittest.test("to-json--from-json", () { |
| 3949 | var o = buildOffers(); |
| 3950 | var od = new api.Offers.fromJson(o.toJson()); |
| 3951 | checkOffers(od); |
| 3952 | }); |
| 3953 | }); |
| 3954 | |
| 3955 | unittest.group("obj-schema-ReadingPosition", () { |
| 3956 | unittest.test("to-json--from-json", () { |
| 3957 | var o = buildReadingPosition(); |
| 3958 | var od = new api.ReadingPosition.fromJson(o.toJson()); |
| 3959 | checkReadingPosition(od); |
| 3960 | }); |
| 3961 | }); |
| 3962 | |
| 3963 | unittest.group("obj-schema-RequestAccess", () { |
| 3964 | unittest.test("to-json--from-json", () { |
| 3965 | var o = buildRequestAccess(); |
| 3966 | var od = new api.RequestAccess.fromJson(o.toJson()); |
| 3967 | checkRequestAccess(od); |
| 3968 | }); |
| 3969 | }); |
| 3970 | |
| 3971 | unittest.group("obj-schema-ReviewAuthor", () { |
| 3972 | unittest.test("to-json--from-json", () { |
| 3973 | var o = buildReviewAuthor(); |
| 3974 | var od = new api.ReviewAuthor.fromJson(o.toJson()); |
| 3975 | checkReviewAuthor(od); |
| 3976 | }); |
| 3977 | }); |
| 3978 | |
| 3979 | unittest.group("obj-schema-ReviewSource", () { |
| 3980 | unittest.test("to-json--from-json", () { |
| 3981 | var o = buildReviewSource(); |
| 3982 | var od = new api.ReviewSource.fromJson(o.toJson()); |
| 3983 | checkReviewSource(od); |
| 3984 | }); |
| 3985 | }); |
| 3986 | |
| 3987 | unittest.group("obj-schema-Review", () { |
| 3988 | unittest.test("to-json--from-json", () { |
| 3989 | var o = buildReview(); |
| 3990 | var od = new api.Review.fromJson(o.toJson()); |
| 3991 | checkReview(od); |
| 3992 | }); |
| 3993 | }); |
| 3994 | |
| 3995 | unittest.group("obj-schema-SeriesSeries", () { |
| 3996 | unittest.test("to-json--from-json", () { |
| 3997 | var o = buildSeriesSeries(); |
| 3998 | var od = new api.SeriesSeries.fromJson(o.toJson()); |
| 3999 | checkSeriesSeries(od); |
| 4000 | }); |
| 4001 | }); |
| 4002 | |
| 4003 | unittest.group("obj-schema-Series", () { |
| 4004 | unittest.test("to-json--from-json", () { |
| 4005 | var o = buildSeries(); |
| 4006 | var od = new api.Series.fromJson(o.toJson()); |
| 4007 | checkSeries(od); |
| 4008 | }); |
| 4009 | }); |
| 4010 | |
| 4011 | unittest.group("obj-schema-Seriesmembership", () { |
| 4012 | unittest.test("to-json--from-json", () { |
| 4013 | var o = buildSeriesmembership(); |
| 4014 | var od = new api.Seriesmembership.fromJson(o.toJson()); |
| 4015 | checkSeriesmembership(od); |
| 4016 | }); |
| 4017 | }); |
| 4018 | |
| 4019 | unittest.group("obj-schema-UsersettingsNotesExport", () { |
| 4020 | unittest.test("to-json--from-json", () { |
| 4021 | var o = buildUsersettingsNotesExport(); |
| 4022 | var od = new api.UsersettingsNotesExport.fromJson(o.toJson()); |
| 4023 | checkUsersettingsNotesExport(od); |
| 4024 | }); |
| 4025 | }); |
| 4026 | |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 4027 | unittest.group("obj-schema-UsersettingsNotificationMatchMyInterests", () { |
| 4028 | unittest.test("to-json--from-json", () { |
| 4029 | var o = buildUsersettingsNotificationMatchMyInterests(); |
| 4030 | var od = |
| 4031 | new api.UsersettingsNotificationMatchMyInterests.fromJson(o.toJson()); |
| 4032 | checkUsersettingsNotificationMatchMyInterests(od); |
| 4033 | }); |
| 4034 | }); |
| 4035 | |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 4036 | unittest.group("obj-schema-UsersettingsNotificationMoreFromAuthors", () { |
| 4037 | unittest.test("to-json--from-json", () { |
| 4038 | var o = buildUsersettingsNotificationMoreFromAuthors(); |
| 4039 | var od = |
| 4040 | new api.UsersettingsNotificationMoreFromAuthors.fromJson(o.toJson()); |
| 4041 | checkUsersettingsNotificationMoreFromAuthors(od); |
| 4042 | }); |
| 4043 | }); |
| 4044 | |
| 4045 | unittest.group("obj-schema-UsersettingsNotificationMoreFromSeries", () { |
| 4046 | unittest.test("to-json--from-json", () { |
| 4047 | var o = buildUsersettingsNotificationMoreFromSeries(); |
| 4048 | var od = |
| 4049 | new api.UsersettingsNotificationMoreFromSeries.fromJson(o.toJson()); |
| 4050 | checkUsersettingsNotificationMoreFromSeries(od); |
| 4051 | }); |
| 4052 | }); |
| 4053 | |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 4054 | unittest.group("obj-schema-UsersettingsNotificationPriceDrop", () { |
| 4055 | unittest.test("to-json--from-json", () { |
| 4056 | var o = buildUsersettingsNotificationPriceDrop(); |
| 4057 | var od = new api.UsersettingsNotificationPriceDrop.fromJson(o.toJson()); |
| 4058 | checkUsersettingsNotificationPriceDrop(od); |
| 4059 | }); |
| 4060 | }); |
| 4061 | |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 4062 | unittest.group("obj-schema-UsersettingsNotificationRewardExpirations", () { |
| 4063 | unittest.test("to-json--from-json", () { |
| 4064 | var o = buildUsersettingsNotificationRewardExpirations(); |
| 4065 | var od = new api.UsersettingsNotificationRewardExpirations.fromJson( |
| 4066 | o.toJson()); |
| 4067 | checkUsersettingsNotificationRewardExpirations(od); |
| 4068 | }); |
| 4069 | }); |
| 4070 | |
| 4071 | unittest.group("obj-schema-UsersettingsNotification", () { |
| 4072 | unittest.test("to-json--from-json", () { |
| 4073 | var o = buildUsersettingsNotification(); |
| 4074 | var od = new api.UsersettingsNotification.fromJson(o.toJson()); |
| 4075 | checkUsersettingsNotification(od); |
| 4076 | }); |
| 4077 | }); |
| 4078 | |
| 4079 | unittest.group("obj-schema-Usersettings", () { |
| 4080 | unittest.test("to-json--from-json", () { |
| 4081 | var o = buildUsersettings(); |
| 4082 | var od = new api.Usersettings.fromJson(o.toJson()); |
| 4083 | checkUsersettings(od); |
| 4084 | }); |
| 4085 | }); |
| 4086 | |
| 4087 | unittest.group("obj-schema-VolumeAccessInfoEpub", () { |
| 4088 | unittest.test("to-json--from-json", () { |
| 4089 | var o = buildVolumeAccessInfoEpub(); |
| 4090 | var od = new api.VolumeAccessInfoEpub.fromJson(o.toJson()); |
| 4091 | checkVolumeAccessInfoEpub(od); |
| 4092 | }); |
| 4093 | }); |
| 4094 | |
| 4095 | unittest.group("obj-schema-VolumeAccessInfoPdf", () { |
| 4096 | unittest.test("to-json--from-json", () { |
| 4097 | var o = buildVolumeAccessInfoPdf(); |
| 4098 | var od = new api.VolumeAccessInfoPdf.fromJson(o.toJson()); |
| 4099 | checkVolumeAccessInfoPdf(od); |
| 4100 | }); |
| 4101 | }); |
| 4102 | |
| 4103 | unittest.group("obj-schema-VolumeAccessInfo", () { |
| 4104 | unittest.test("to-json--from-json", () { |
| 4105 | var o = buildVolumeAccessInfo(); |
| 4106 | var od = new api.VolumeAccessInfo.fromJson(o.toJson()); |
| 4107 | checkVolumeAccessInfo(od); |
| 4108 | }); |
| 4109 | }); |
| 4110 | |
| 4111 | unittest.group("obj-schema-VolumeLayerInfoLayers", () { |
| 4112 | unittest.test("to-json--from-json", () { |
| 4113 | var o = buildVolumeLayerInfoLayers(); |
| 4114 | var od = new api.VolumeLayerInfoLayers.fromJson(o.toJson()); |
| 4115 | checkVolumeLayerInfoLayers(od); |
| 4116 | }); |
| 4117 | }); |
| 4118 | |
| 4119 | unittest.group("obj-schema-VolumeLayerInfo", () { |
| 4120 | unittest.test("to-json--from-json", () { |
| 4121 | var o = buildVolumeLayerInfo(); |
| 4122 | var od = new api.VolumeLayerInfo.fromJson(o.toJson()); |
| 4123 | checkVolumeLayerInfo(od); |
| 4124 | }); |
| 4125 | }); |
| 4126 | |
| 4127 | unittest.group("obj-schema-VolumeRecommendedInfo", () { |
| 4128 | unittest.test("to-json--from-json", () { |
| 4129 | var o = buildVolumeRecommendedInfo(); |
| 4130 | var od = new api.VolumeRecommendedInfo.fromJson(o.toJson()); |
| 4131 | checkVolumeRecommendedInfo(od); |
| 4132 | }); |
| 4133 | }); |
| 4134 | |
| 4135 | unittest.group("obj-schema-VolumeSaleInfoListPrice", () { |
| 4136 | unittest.test("to-json--from-json", () { |
| 4137 | var o = buildVolumeSaleInfoListPrice(); |
| 4138 | var od = new api.VolumeSaleInfoListPrice.fromJson(o.toJson()); |
| 4139 | checkVolumeSaleInfoListPrice(od); |
| 4140 | }); |
| 4141 | }); |
| 4142 | |
| 4143 | unittest.group("obj-schema-VolumeSaleInfoOffersListPrice", () { |
| 4144 | unittest.test("to-json--from-json", () { |
| 4145 | var o = buildVolumeSaleInfoOffersListPrice(); |
| 4146 | var od = new api.VolumeSaleInfoOffersListPrice.fromJson(o.toJson()); |
| 4147 | checkVolumeSaleInfoOffersListPrice(od); |
| 4148 | }); |
| 4149 | }); |
| 4150 | |
| 4151 | unittest.group("obj-schema-VolumeSaleInfoOffersRentalDuration", () { |
| 4152 | unittest.test("to-json--from-json", () { |
| 4153 | var o = buildVolumeSaleInfoOffersRentalDuration(); |
| 4154 | var od = new api.VolumeSaleInfoOffersRentalDuration.fromJson(o.toJson()); |
| 4155 | checkVolumeSaleInfoOffersRentalDuration(od); |
| 4156 | }); |
| 4157 | }); |
| 4158 | |
| 4159 | unittest.group("obj-schema-VolumeSaleInfoOffersRetailPrice", () { |
| 4160 | unittest.test("to-json--from-json", () { |
| 4161 | var o = buildVolumeSaleInfoOffersRetailPrice(); |
| 4162 | var od = new api.VolumeSaleInfoOffersRetailPrice.fromJson(o.toJson()); |
| 4163 | checkVolumeSaleInfoOffersRetailPrice(od); |
| 4164 | }); |
| 4165 | }); |
| 4166 | |
| 4167 | unittest.group("obj-schema-VolumeSaleInfoOffers", () { |
| 4168 | unittest.test("to-json--from-json", () { |
| 4169 | var o = buildVolumeSaleInfoOffers(); |
| 4170 | var od = new api.VolumeSaleInfoOffers.fromJson(o.toJson()); |
| 4171 | checkVolumeSaleInfoOffers(od); |
| 4172 | }); |
| 4173 | }); |
| 4174 | |
| 4175 | unittest.group("obj-schema-VolumeSaleInfoRetailPrice", () { |
| 4176 | unittest.test("to-json--from-json", () { |
| 4177 | var o = buildVolumeSaleInfoRetailPrice(); |
| 4178 | var od = new api.VolumeSaleInfoRetailPrice.fromJson(o.toJson()); |
| 4179 | checkVolumeSaleInfoRetailPrice(od); |
| 4180 | }); |
| 4181 | }); |
| 4182 | |
| 4183 | unittest.group("obj-schema-VolumeSaleInfo", () { |
| 4184 | unittest.test("to-json--from-json", () { |
| 4185 | var o = buildVolumeSaleInfo(); |
| 4186 | var od = new api.VolumeSaleInfo.fromJson(o.toJson()); |
| 4187 | checkVolumeSaleInfo(od); |
| 4188 | }); |
| 4189 | }); |
| 4190 | |
| 4191 | unittest.group("obj-schema-VolumeSearchInfo", () { |
| 4192 | unittest.test("to-json--from-json", () { |
| 4193 | var o = buildVolumeSearchInfo(); |
| 4194 | var od = new api.VolumeSearchInfo.fromJson(o.toJson()); |
| 4195 | checkVolumeSearchInfo(od); |
| 4196 | }); |
| 4197 | }); |
| 4198 | |
| 4199 | unittest.group("obj-schema-VolumeUserInfoCopy", () { |
| 4200 | unittest.test("to-json--from-json", () { |
| 4201 | var o = buildVolumeUserInfoCopy(); |
| 4202 | var od = new api.VolumeUserInfoCopy.fromJson(o.toJson()); |
| 4203 | checkVolumeUserInfoCopy(od); |
| 4204 | }); |
| 4205 | }); |
| 4206 | |
| 4207 | unittest.group("obj-schema-VolumeUserInfoFamilySharing", () { |
| 4208 | unittest.test("to-json--from-json", () { |
| 4209 | var o = buildVolumeUserInfoFamilySharing(); |
| 4210 | var od = new api.VolumeUserInfoFamilySharing.fromJson(o.toJson()); |
| 4211 | checkVolumeUserInfoFamilySharing(od); |
| 4212 | }); |
| 4213 | }); |
| 4214 | |
| 4215 | unittest.group("obj-schema-VolumeUserInfoRentalPeriod", () { |
| 4216 | unittest.test("to-json--from-json", () { |
| 4217 | var o = buildVolumeUserInfoRentalPeriod(); |
| 4218 | var od = new api.VolumeUserInfoRentalPeriod.fromJson(o.toJson()); |
| 4219 | checkVolumeUserInfoRentalPeriod(od); |
| 4220 | }); |
| 4221 | }); |
| 4222 | |
| 4223 | unittest.group("obj-schema-VolumeUserInfoUserUploadedVolumeInfo", () { |
| 4224 | unittest.test("to-json--from-json", () { |
| 4225 | var o = buildVolumeUserInfoUserUploadedVolumeInfo(); |
| 4226 | var od = |
| 4227 | new api.VolumeUserInfoUserUploadedVolumeInfo.fromJson(o.toJson()); |
| 4228 | checkVolumeUserInfoUserUploadedVolumeInfo(od); |
| 4229 | }); |
| 4230 | }); |
| 4231 | |
| 4232 | unittest.group("obj-schema-VolumeUserInfo", () { |
| 4233 | unittest.test("to-json--from-json", () { |
| 4234 | var o = buildVolumeUserInfo(); |
| 4235 | var od = new api.VolumeUserInfo.fromJson(o.toJson()); |
| 4236 | checkVolumeUserInfo(od); |
| 4237 | }); |
| 4238 | }); |
| 4239 | |
| 4240 | unittest.group("obj-schema-VolumeVolumeInfoDimensions", () { |
| 4241 | unittest.test("to-json--from-json", () { |
| 4242 | var o = buildVolumeVolumeInfoDimensions(); |
| 4243 | var od = new api.VolumeVolumeInfoDimensions.fromJson(o.toJson()); |
| 4244 | checkVolumeVolumeInfoDimensions(od); |
| 4245 | }); |
| 4246 | }); |
| 4247 | |
| 4248 | unittest.group("obj-schema-VolumeVolumeInfoImageLinks", () { |
| 4249 | unittest.test("to-json--from-json", () { |
| 4250 | var o = buildVolumeVolumeInfoImageLinks(); |
| 4251 | var od = new api.VolumeVolumeInfoImageLinks.fromJson(o.toJson()); |
| 4252 | checkVolumeVolumeInfoImageLinks(od); |
| 4253 | }); |
| 4254 | }); |
| 4255 | |
| 4256 | unittest.group("obj-schema-VolumeVolumeInfoIndustryIdentifiers", () { |
| 4257 | unittest.test("to-json--from-json", () { |
| 4258 | var o = buildVolumeVolumeInfoIndustryIdentifiers(); |
| 4259 | var od = new api.VolumeVolumeInfoIndustryIdentifiers.fromJson(o.toJson()); |
| 4260 | checkVolumeVolumeInfoIndustryIdentifiers(od); |
| 4261 | }); |
| 4262 | }); |
| 4263 | |
| 4264 | unittest.group("obj-schema-VolumeVolumeInfoPanelizationSummary", () { |
| 4265 | unittest.test("to-json--from-json", () { |
| 4266 | var o = buildVolumeVolumeInfoPanelizationSummary(); |
| 4267 | var od = new api.VolumeVolumeInfoPanelizationSummary.fromJson(o.toJson()); |
| 4268 | checkVolumeVolumeInfoPanelizationSummary(od); |
| 4269 | }); |
| 4270 | }); |
| 4271 | |
| 4272 | unittest.group("obj-schema-VolumeVolumeInfo", () { |
| 4273 | unittest.test("to-json--from-json", () { |
| 4274 | var o = buildVolumeVolumeInfo(); |
| 4275 | var od = new api.VolumeVolumeInfo.fromJson(o.toJson()); |
| 4276 | checkVolumeVolumeInfo(od); |
| 4277 | }); |
| 4278 | }); |
| 4279 | |
| 4280 | unittest.group("obj-schema-Volume", () { |
| 4281 | unittest.test("to-json--from-json", () { |
| 4282 | var o = buildVolume(); |
| 4283 | var od = new api.Volume.fromJson(o.toJson()); |
| 4284 | checkVolume(od); |
| 4285 | }); |
| 4286 | }); |
| 4287 | |
| 4288 | unittest.group("obj-schema-Volume2", () { |
| 4289 | unittest.test("to-json--from-json", () { |
| 4290 | var o = buildVolume2(); |
| 4291 | var od = new api.Volume2.fromJson(o.toJson()); |
| 4292 | checkVolume2(od); |
| 4293 | }); |
| 4294 | }); |
| 4295 | |
| 4296 | unittest.group("obj-schema-VolumeannotationContentRanges", () { |
| 4297 | unittest.test("to-json--from-json", () { |
| 4298 | var o = buildVolumeannotationContentRanges(); |
| 4299 | var od = new api.VolumeannotationContentRanges.fromJson(o.toJson()); |
| 4300 | checkVolumeannotationContentRanges(od); |
| 4301 | }); |
| 4302 | }); |
| 4303 | |
| 4304 | unittest.group("obj-schema-Volumeannotation", () { |
| 4305 | unittest.test("to-json--from-json", () { |
| 4306 | var o = buildVolumeannotation(); |
| 4307 | var od = new api.Volumeannotation.fromJson(o.toJson()); |
| 4308 | checkVolumeannotation(od); |
| 4309 | }); |
| 4310 | }); |
| 4311 | |
| 4312 | unittest.group("obj-schema-Volumeannotations", () { |
| 4313 | unittest.test("to-json--from-json", () { |
| 4314 | var o = buildVolumeannotations(); |
| 4315 | var od = new api.Volumeannotations.fromJson(o.toJson()); |
| 4316 | checkVolumeannotations(od); |
| 4317 | }); |
| 4318 | }); |
| 4319 | |
| 4320 | unittest.group("obj-schema-Volumes", () { |
| 4321 | unittest.test("to-json--from-json", () { |
| 4322 | var o = buildVolumes(); |
| 4323 | var od = new api.Volumes.fromJson(o.toJson()); |
| 4324 | checkVolumes(od); |
| 4325 | }); |
| 4326 | }); |
| 4327 | |
| 4328 | unittest.group("obj-schema-VolumeseriesinfoVolumeSeriesIssue", () { |
| 4329 | unittest.test("to-json--from-json", () { |
| 4330 | var o = buildVolumeseriesinfoVolumeSeriesIssue(); |
| 4331 | var od = new api.VolumeseriesinfoVolumeSeriesIssue.fromJson(o.toJson()); |
| 4332 | checkVolumeseriesinfoVolumeSeriesIssue(od); |
| 4333 | }); |
| 4334 | }); |
| 4335 | |
| 4336 | unittest.group("obj-schema-VolumeseriesinfoVolumeSeries", () { |
| 4337 | unittest.test("to-json--from-json", () { |
| 4338 | var o = buildVolumeseriesinfoVolumeSeries(); |
| 4339 | var od = new api.VolumeseriesinfoVolumeSeries.fromJson(o.toJson()); |
| 4340 | checkVolumeseriesinfoVolumeSeries(od); |
| 4341 | }); |
| 4342 | }); |
| 4343 | |
| 4344 | unittest.group("obj-schema-Volumeseriesinfo", () { |
| 4345 | unittest.test("to-json--from-json", () { |
| 4346 | var o = buildVolumeseriesinfo(); |
| 4347 | var od = new api.Volumeseriesinfo.fromJson(o.toJson()); |
| 4348 | checkVolumeseriesinfo(od); |
| 4349 | }); |
| 4350 | }); |
| 4351 | |
| 4352 | unittest.group("resource-BookshelvesResourceApi", () { |
| 4353 | unittest.test("method--get", () { |
| 4354 | var mock = new HttpServerMock(); |
| 4355 | api.BookshelvesResourceApi res = new api.BooksApi(mock).bookshelves; |
| 4356 | var arg_userId = "foo"; |
| 4357 | var arg_shelf = "foo"; |
| 4358 | var arg_source = "foo"; |
| 4359 | var arg_$fields = "foo"; |
| 4360 | mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 4361 | var path = (req.url).path; |
| 4362 | var pathOffset = 0; |
| 4363 | var index; |
| 4364 | var subPart; |
| 4365 | unittest.expect( |
| 4366 | path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 4367 | pathOffset += 1; |
| 4368 | unittest.expect(path.substring(pathOffset, pathOffset + 9), |
| 4369 | unittest.equals("books/v1/")); |
| 4370 | pathOffset += 9; |
| 4371 | unittest.expect(path.substring(pathOffset, pathOffset + 6), |
| 4372 | unittest.equals("users/")); |
| 4373 | pathOffset += 6; |
| 4374 | index = path.indexOf("/bookshelves/", pathOffset); |
| 4375 | unittest.expect(index >= 0, unittest.isTrue); |
| 4376 | subPart = |
| 4377 | core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 4378 | pathOffset = index; |
| 4379 | unittest.expect(subPart, unittest.equals("$arg_userId")); |
| 4380 | unittest.expect(path.substring(pathOffset, pathOffset + 13), |
| 4381 | unittest.equals("/bookshelves/")); |
| 4382 | pathOffset += 13; |
| 4383 | subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| 4384 | pathOffset = path.length; |
| 4385 | unittest.expect(subPart, unittest.equals("$arg_shelf")); |
| 4386 | |
| 4387 | var query = (req.url).query; |
| 4388 | var queryOffset = 0; |
| 4389 | var queryMap = {}; |
| 4390 | addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 4391 | parseBool(n) { |
| 4392 | if (n == "true") return true; |
| 4393 | if (n == "false") return false; |
| 4394 | if (n == null) return null; |
| 4395 | throw new core.ArgumentError("Invalid boolean: $n"); |
| 4396 | } |
| 4397 | |
| 4398 | if (query.length > 0) { |
| 4399 | for (var part in query.split("&")) { |
| 4400 | var keyvalue = part.split("="); |
| 4401 | addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 4402 | core.Uri.decodeQueryComponent(keyvalue[1])); |
| 4403 | } |
| 4404 | } |
| 4405 | unittest.expect(queryMap["source"].first, unittest.equals(arg_source)); |
| 4406 | unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); |
| 4407 | |
| 4408 | var h = { |
| 4409 | "content-type": "application/json; charset=utf-8", |
| 4410 | }; |
| 4411 | var resp = convert.JSON.encode(buildBookshelf()); |
| 4412 | return new async.Future.value(stringResponse(200, h, resp)); |
| 4413 | }), true); |
| 4414 | res |
| 4415 | .get(arg_userId, arg_shelf, source: arg_source, $fields: arg_$fields) |
| 4416 | .then(unittest.expectAsync1(((api.Bookshelf response) { |
| 4417 | checkBookshelf(response); |
| 4418 | }))); |
| 4419 | }); |
| 4420 | |
| 4421 | unittest.test("method--list", () { |
| 4422 | var mock = new HttpServerMock(); |
| 4423 | api.BookshelvesResourceApi res = new api.BooksApi(mock).bookshelves; |
| 4424 | var arg_userId = "foo"; |
| 4425 | var arg_source = "foo"; |
| 4426 | var arg_$fields = "foo"; |
| 4427 | mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 4428 | var path = (req.url).path; |
| 4429 | var pathOffset = 0; |
| 4430 | var index; |
| 4431 | var subPart; |
| 4432 | unittest.expect( |
| 4433 | path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 4434 | pathOffset += 1; |
| 4435 | unittest.expect(path.substring(pathOffset, pathOffset + 9), |
| 4436 | unittest.equals("books/v1/")); |
| 4437 | pathOffset += 9; |
| 4438 | unittest.expect(path.substring(pathOffset, pathOffset + 6), |
| 4439 | unittest.equals("users/")); |
| 4440 | pathOffset += 6; |
| 4441 | index = path.indexOf("/bookshelves", pathOffset); |
| 4442 | unittest.expect(index >= 0, unittest.isTrue); |
| 4443 | subPart = |
| 4444 | core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 4445 | pathOffset = index; |
| 4446 | unittest.expect(subPart, unittest.equals("$arg_userId")); |
| 4447 | unittest.expect(path.substring(pathOffset, pathOffset + 12), |
| 4448 | unittest.equals("/bookshelves")); |
| 4449 | pathOffset += 12; |
| 4450 | |
| 4451 | var query = (req.url).query; |
| 4452 | var queryOffset = 0; |
| 4453 | var queryMap = {}; |
| 4454 | addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 4455 | parseBool(n) { |
| 4456 | if (n == "true") return true; |
| 4457 | if (n == "false") return false; |
| 4458 | if (n == null) return null; |
| 4459 | throw new core.ArgumentError("Invalid boolean: $n"); |
| 4460 | } |
| 4461 | |
| 4462 | if (query.length > 0) { |
| 4463 | for (var part in query.split("&")) { |
| 4464 | var keyvalue = part.split("="); |
| 4465 | addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 4466 | core.Uri.decodeQueryComponent(keyvalue[1])); |
| 4467 | } |
| 4468 | } |
| 4469 | unittest.expect(queryMap["source"].first, unittest.equals(arg_source)); |
| 4470 | unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); |
| 4471 | |
| 4472 | var h = { |
| 4473 | "content-type": "application/json; charset=utf-8", |
| 4474 | }; |
| 4475 | var resp = convert.JSON.encode(buildBookshelves()); |
| 4476 | return new async.Future.value(stringResponse(200, h, resp)); |
| 4477 | }), true); |
| 4478 | res |
| 4479 | .list(arg_userId, source: arg_source, $fields: arg_$fields) |
| 4480 | .then(unittest.expectAsync1(((api.Bookshelves response) { |
| 4481 | checkBookshelves(response); |
| 4482 | }))); |
| 4483 | }); |
| 4484 | }); |
| 4485 | |
| 4486 | unittest.group("resource-BookshelvesVolumesResourceApi", () { |
| 4487 | unittest.test("method--list", () { |
| 4488 | var mock = new HttpServerMock(); |
| 4489 | api.BookshelvesVolumesResourceApi res = |
| 4490 | new api.BooksApi(mock).bookshelves.volumes; |
| 4491 | var arg_userId = "foo"; |
| 4492 | var arg_shelf = "foo"; |
| 4493 | var arg_maxResults = 42; |
| 4494 | var arg_showPreorders = true; |
| 4495 | var arg_source = "foo"; |
| 4496 | var arg_startIndex = 42; |
| 4497 | var arg_$fields = "foo"; |
| 4498 | mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 4499 | var path = (req.url).path; |
| 4500 | var pathOffset = 0; |
| 4501 | var index; |
| 4502 | var subPart; |
| 4503 | unittest.expect( |
| 4504 | path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 4505 | pathOffset += 1; |
| 4506 | unittest.expect(path.substring(pathOffset, pathOffset + 9), |
| 4507 | unittest.equals("books/v1/")); |
| 4508 | pathOffset += 9; |
| 4509 | unittest.expect(path.substring(pathOffset, pathOffset + 6), |
| 4510 | unittest.equals("users/")); |
| 4511 | pathOffset += 6; |
| 4512 | index = path.indexOf("/bookshelves/", pathOffset); |
| 4513 | unittest.expect(index >= 0, unittest.isTrue); |
| 4514 | subPart = |
| 4515 | core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 4516 | pathOffset = index; |
| 4517 | unittest.expect(subPart, unittest.equals("$arg_userId")); |
| 4518 | unittest.expect(path.substring(pathOffset, pathOffset + 13), |
| 4519 | unittest.equals("/bookshelves/")); |
| 4520 | pathOffset += 13; |
| 4521 | index = path.indexOf("/volumes", pathOffset); |
| 4522 | unittest.expect(index >= 0, unittest.isTrue); |
| 4523 | subPart = |
| 4524 | core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 4525 | pathOffset = index; |
| 4526 | unittest.expect(subPart, unittest.equals("$arg_shelf")); |
| 4527 | unittest.expect(path.substring(pathOffset, pathOffset + 8), |
| 4528 | unittest.equals("/volumes")); |
| 4529 | pathOffset += 8; |
| 4530 | |
| 4531 | var query = (req.url).query; |
| 4532 | var queryOffset = 0; |
| 4533 | var queryMap = {}; |
| 4534 | addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 4535 | parseBool(n) { |
| 4536 | if (n == "true") return true; |
| 4537 | if (n == "false") return false; |
| 4538 | if (n == null) return null; |
| 4539 | throw new core.ArgumentError("Invalid boolean: $n"); |
| 4540 | } |
| 4541 | |
| 4542 | if (query.length > 0) { |
| 4543 | for (var part in query.split("&")) { |
| 4544 | var keyvalue = part.split("="); |
| 4545 | addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 4546 | core.Uri.decodeQueryComponent(keyvalue[1])); |
| 4547 | } |
| 4548 | } |
| 4549 | unittest.expect(core.int.parse(queryMap["maxResults"].first), |
| 4550 | unittest.equals(arg_maxResults)); |
| 4551 | unittest.expect(queryMap["showPreorders"].first, |
| 4552 | unittest.equals("$arg_showPreorders")); |
| 4553 | unittest.expect(queryMap["source"].first, unittest.equals(arg_source)); |
| 4554 | unittest.expect(core.int.parse(queryMap["startIndex"].first), |
| 4555 | unittest.equals(arg_startIndex)); |
| 4556 | unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); |
| 4557 | |
| 4558 | var h = { |
| 4559 | "content-type": "application/json; charset=utf-8", |
| 4560 | }; |
| 4561 | var resp = convert.JSON.encode(buildVolumes()); |
| 4562 | return new async.Future.value(stringResponse(200, h, resp)); |
| 4563 | }), true); |
| 4564 | res |
| 4565 | .list(arg_userId, arg_shelf, |
| 4566 | maxResults: arg_maxResults, |
| 4567 | showPreorders: arg_showPreorders, |
| 4568 | source: arg_source, |
| 4569 | startIndex: arg_startIndex, |
| 4570 | $fields: arg_$fields) |
| 4571 | .then(unittest.expectAsync1(((api.Volumes response) { |
| 4572 | checkVolumes(response); |
| 4573 | }))); |
| 4574 | }); |
| 4575 | }); |
| 4576 | |
| 4577 | unittest.group("resource-CloudloadingResourceApi", () { |
| 4578 | unittest.test("method--addBook", () { |
| 4579 | var mock = new HttpServerMock(); |
| 4580 | api.CloudloadingResourceApi res = new api.BooksApi(mock).cloudloading; |
| 4581 | var arg_driveDocumentId = "foo"; |
| 4582 | var arg_mimeType = "foo"; |
| 4583 | var arg_name = "foo"; |
| 4584 | var arg_uploadClientToken = "foo"; |
| 4585 | var arg_$fields = "foo"; |
| 4586 | mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 4587 | var path = (req.url).path; |
| 4588 | var pathOffset = 0; |
| 4589 | var index; |
| 4590 | var subPart; |
| 4591 | unittest.expect( |
| 4592 | path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 4593 | pathOffset += 1; |
| 4594 | unittest.expect(path.substring(pathOffset, pathOffset + 9), |
| 4595 | unittest.equals("books/v1/")); |
| 4596 | pathOffset += 9; |
| 4597 | unittest.expect(path.substring(pathOffset, pathOffset + 20), |
| 4598 | unittest.equals("cloudloading/addBook")); |
| 4599 | pathOffset += 20; |
| 4600 | |
| 4601 | var query = (req.url).query; |
| 4602 | var queryOffset = 0; |
| 4603 | var queryMap = {}; |
| 4604 | addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 4605 | parseBool(n) { |
| 4606 | if (n == "true") return true; |
| 4607 | if (n == "false") return false; |
| 4608 | if (n == null) return null; |
| 4609 | throw new core.ArgumentError("Invalid boolean: $n"); |
| 4610 | } |
| 4611 | |
| 4612 | if (query.length > 0) { |
| 4613 | for (var part in query.split("&")) { |
| 4614 | var keyvalue = part.split("="); |
| 4615 | addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 4616 | core.Uri.decodeQueryComponent(keyvalue[1])); |
| 4617 | } |
| 4618 | } |
| 4619 | unittest.expect(queryMap["drive_document_id"].first, |
| 4620 | unittest.equals(arg_driveDocumentId)); |
| 4621 | unittest.expect( |
| 4622 | queryMap["mime_type"].first, unittest.equals(arg_mimeType)); |
| 4623 | unittest.expect(queryMap["name"].first, unittest.equals(arg_name)); |
| 4624 | unittest.expect(queryMap["upload_client_token"].first, |
| 4625 | unittest.equals(arg_uploadClientToken)); |
| 4626 | unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); |
| 4627 | |
| 4628 | var h = { |
| 4629 | "content-type": "application/json; charset=utf-8", |
| 4630 | }; |
| 4631 | var resp = convert.JSON.encode(buildBooksCloudloadingResource()); |
| 4632 | return new async.Future.value(stringResponse(200, h, resp)); |
| 4633 | }), true); |
| 4634 | res |
| 4635 | .addBook( |
| 4636 | driveDocumentId: arg_driveDocumentId, |
| 4637 | mimeType: arg_mimeType, |
| 4638 | name: arg_name, |
| 4639 | uploadClientToken: arg_uploadClientToken, |
| 4640 | $fields: arg_$fields) |
| 4641 | .then( |
| 4642 | unittest.expectAsync1(((api.BooksCloudloadingResource response) { |
| 4643 | checkBooksCloudloadingResource(response); |
| 4644 | }))); |
| 4645 | }); |
| 4646 | |
| 4647 | unittest.test("method--deleteBook", () { |
| 4648 | var mock = new HttpServerMock(); |
| 4649 | api.CloudloadingResourceApi res = new api.BooksApi(mock).cloudloading; |
| 4650 | var arg_volumeId = "foo"; |
| 4651 | var arg_$fields = "foo"; |
| 4652 | mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 4653 | var path = (req.url).path; |
| 4654 | var pathOffset = 0; |
| 4655 | var index; |
| 4656 | var subPart; |
| 4657 | unittest.expect( |
| 4658 | path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 4659 | pathOffset += 1; |
| 4660 | unittest.expect(path.substring(pathOffset, pathOffset + 9), |
| 4661 | unittest.equals("books/v1/")); |
| 4662 | pathOffset += 9; |
| 4663 | unittest.expect(path.substring(pathOffset, pathOffset + 23), |
| 4664 | unittest.equals("cloudloading/deleteBook")); |
| 4665 | pathOffset += 23; |
| 4666 | |
| 4667 | var query = (req.url).query; |
| 4668 | var queryOffset = 0; |
| 4669 | var queryMap = {}; |
| 4670 | addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 4671 | parseBool(n) { |
| 4672 | if (n == "true") return true; |
| 4673 | if (n == "false") return false; |
| 4674 | if (n == null) return null; |
| 4675 | throw new core.ArgumentError("Invalid boolean: $n"); |
| 4676 | } |
| 4677 | |
| 4678 | if (query.length > 0) { |
| 4679 | for (var part in query.split("&")) { |
| 4680 | var keyvalue = part.split("="); |
| 4681 | addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 4682 | core.Uri.decodeQueryComponent(keyvalue[1])); |
| 4683 | } |
| 4684 | } |
| 4685 | unittest.expect( |
| 4686 | queryMap["volumeId"].first, unittest.equals(arg_volumeId)); |
| 4687 | unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); |
| 4688 | |
| 4689 | var h = { |
| 4690 | "content-type": "application/json; charset=utf-8", |
| 4691 | }; |
| 4692 | var resp = ""; |
| 4693 | return new async.Future.value(stringResponse(200, h, resp)); |
| 4694 | }), true); |
| 4695 | res |
| 4696 | .deleteBook(arg_volumeId, $fields: arg_$fields) |
| 4697 | .then(unittest.expectAsync1((_) {})); |
| 4698 | }); |
| 4699 | |
| 4700 | unittest.test("method--updateBook", () { |
| 4701 | var mock = new HttpServerMock(); |
| 4702 | api.CloudloadingResourceApi res = new api.BooksApi(mock).cloudloading; |
| 4703 | var arg_request = buildBooksCloudloadingResource(); |
| 4704 | var arg_$fields = "foo"; |
| 4705 | mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 4706 | var obj = new api.BooksCloudloadingResource.fromJson(json); |
| 4707 | checkBooksCloudloadingResource(obj); |
| 4708 | |
| 4709 | var path = (req.url).path; |
| 4710 | var pathOffset = 0; |
| 4711 | var index; |
| 4712 | var subPart; |
| 4713 | unittest.expect( |
| 4714 | path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 4715 | pathOffset += 1; |
| 4716 | unittest.expect(path.substring(pathOffset, pathOffset + 9), |
| 4717 | unittest.equals("books/v1/")); |
| 4718 | pathOffset += 9; |
| 4719 | unittest.expect(path.substring(pathOffset, pathOffset + 23), |
| 4720 | unittest.equals("cloudloading/updateBook")); |
| 4721 | pathOffset += 23; |
| 4722 | |
| 4723 | var query = (req.url).query; |
| 4724 | var queryOffset = 0; |
| 4725 | var queryMap = {}; |
| 4726 | addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 4727 | parseBool(n) { |
| 4728 | if (n == "true") return true; |
| 4729 | if (n == "false") return false; |
| 4730 | if (n == null) return null; |
| 4731 | throw new core.ArgumentError("Invalid boolean: $n"); |
| 4732 | } |
| 4733 | |
| 4734 | if (query.length > 0) { |
| 4735 | for (var part in query.split("&")) { |
| 4736 | var keyvalue = part.split("="); |
| 4737 | addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 4738 | core.Uri.decodeQueryComponent(keyvalue[1])); |
| 4739 | } |
| 4740 | } |
| 4741 | unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); |
| 4742 | |
| 4743 | var h = { |
| 4744 | "content-type": "application/json; charset=utf-8", |
| 4745 | }; |
| 4746 | var resp = convert.JSON.encode(buildBooksCloudloadingResource()); |
| 4747 | return new async.Future.value(stringResponse(200, h, resp)); |
| 4748 | }), true); |
| 4749 | res.updateBook(arg_request, $fields: arg_$fields).then( |
| 4750 | unittest.expectAsync1(((api.BooksCloudloadingResource response) { |
| 4751 | checkBooksCloudloadingResource(response); |
| 4752 | }))); |
| 4753 | }); |
| 4754 | }); |
| 4755 | |
| 4756 | unittest.group("resource-DictionaryResourceApi", () { |
| 4757 | unittest.test("method--listOfflineMetadata", () { |
| 4758 | var mock = new HttpServerMock(); |
| 4759 | api.DictionaryResourceApi res = new api.BooksApi(mock).dictionary; |
| 4760 | var arg_cpksver = "foo"; |
| 4761 | var arg_$fields = "foo"; |
| 4762 | mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 4763 | var path = (req.url).path; |
| 4764 | var pathOffset = 0; |
| 4765 | var index; |
| 4766 | var subPart; |
| 4767 | unittest.expect( |
| 4768 | path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 4769 | pathOffset += 1; |
| 4770 | unittest.expect(path.substring(pathOffset, pathOffset + 9), |
| 4771 | unittest.equals("books/v1/")); |
| 4772 | pathOffset += 9; |
| 4773 | unittest.expect(path.substring(pathOffset, pathOffset + 30), |
| 4774 | unittest.equals("dictionary/listOfflineMetadata")); |
| 4775 | pathOffset += 30; |
| 4776 | |
| 4777 | var query = (req.url).query; |
| 4778 | var queryOffset = 0; |
| 4779 | var queryMap = {}; |
| 4780 | addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 4781 | parseBool(n) { |
| 4782 | if (n == "true") return true; |
| 4783 | if (n == "false") return false; |
| 4784 | if (n == null) return null; |
| 4785 | throw new core.ArgumentError("Invalid boolean: $n"); |
| 4786 | } |
| 4787 | |
| 4788 | if (query.length > 0) { |
| 4789 | for (var part in query.split("&")) { |
| 4790 | var keyvalue = part.split("="); |
| 4791 | addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 4792 | core.Uri.decodeQueryComponent(keyvalue[1])); |
| 4793 | } |
| 4794 | } |
| 4795 | unittest.expect( |
| 4796 | queryMap["cpksver"].first, unittest.equals(arg_cpksver)); |
| 4797 | unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); |
| 4798 | |
| 4799 | var h = { |
| 4800 | "content-type": "application/json; charset=utf-8", |
| 4801 | }; |
| 4802 | var resp = convert.JSON.encode(buildMetadata()); |
| 4803 | return new async.Future.value(stringResponse(200, h, resp)); |
| 4804 | }), true); |
| 4805 | res |
| 4806 | .listOfflineMetadata(arg_cpksver, $fields: arg_$fields) |
| 4807 | .then(unittest.expectAsync1(((api.Metadata response) { |
| 4808 | checkMetadata(response); |
| 4809 | }))); |
| 4810 | }); |
| 4811 | }); |
| 4812 | |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 4813 | unittest.group("resource-FamilysharingResourceApi", () { |
| 4814 | unittest.test("method--getFamilyInfo", () { |
| 4815 | var mock = new HttpServerMock(); |
| 4816 | api.FamilysharingResourceApi res = new api.BooksApi(mock).familysharing; |
| 4817 | var arg_source = "foo"; |
| 4818 | var arg_$fields = "foo"; |
| 4819 | mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 4820 | var path = (req.url).path; |
| 4821 | var pathOffset = 0; |
| 4822 | var index; |
| 4823 | var subPart; |
| 4824 | unittest.expect( |
| 4825 | path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 4826 | pathOffset += 1; |
| 4827 | unittest.expect(path.substring(pathOffset, pathOffset + 9), |
| 4828 | unittest.equals("books/v1/")); |
| 4829 | pathOffset += 9; |
| 4830 | unittest.expect(path.substring(pathOffset, pathOffset + 27), |
| 4831 | unittest.equals("familysharing/getFamilyInfo")); |
| 4832 | pathOffset += 27; |
| 4833 | |
| 4834 | var query = (req.url).query; |
| 4835 | var queryOffset = 0; |
| 4836 | var queryMap = {}; |
| 4837 | addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 4838 | parseBool(n) { |
| 4839 | if (n == "true") return true; |
| 4840 | if (n == "false") return false; |
| 4841 | if (n == null) return null; |
| 4842 | throw new core.ArgumentError("Invalid boolean: $n"); |
| 4843 | } |
| 4844 | |
| 4845 | if (query.length > 0) { |
| 4846 | for (var part in query.split("&")) { |
| 4847 | var keyvalue = part.split("="); |
| 4848 | addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 4849 | core.Uri.decodeQueryComponent(keyvalue[1])); |
| 4850 | } |
| 4851 | } |
| 4852 | unittest.expect(queryMap["source"].first, unittest.equals(arg_source)); |
| 4853 | unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); |
| 4854 | |
| 4855 | var h = { |
| 4856 | "content-type": "application/json; charset=utf-8", |
| 4857 | }; |
| 4858 | var resp = convert.JSON.encode(buildFamilyInfo()); |
| 4859 | return new async.Future.value(stringResponse(200, h, resp)); |
| 4860 | }), true); |
| 4861 | res |
| 4862 | .getFamilyInfo(source: arg_source, $fields: arg_$fields) |
| 4863 | .then(unittest.expectAsync1(((api.FamilyInfo response) { |
| 4864 | checkFamilyInfo(response); |
| 4865 | }))); |
| 4866 | }); |
| 4867 | |
| 4868 | unittest.test("method--share", () { |
| 4869 | var mock = new HttpServerMock(); |
| 4870 | api.FamilysharingResourceApi res = new api.BooksApi(mock).familysharing; |
| 4871 | var arg_docId = "foo"; |
| 4872 | var arg_source = "foo"; |
| 4873 | var arg_volumeId = "foo"; |
| 4874 | var arg_$fields = "foo"; |
| 4875 | mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 4876 | var path = (req.url).path; |
| 4877 | var pathOffset = 0; |
| 4878 | var index; |
| 4879 | var subPart; |
| 4880 | unittest.expect( |
| 4881 | path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 4882 | pathOffset += 1; |
| 4883 | unittest.expect(path.substring(pathOffset, pathOffset + 9), |
| 4884 | unittest.equals("books/v1/")); |
| 4885 | pathOffset += 9; |
| 4886 | unittest.expect(path.substring(pathOffset, pathOffset + 19), |
| 4887 | unittest.equals("familysharing/share")); |
| 4888 | pathOffset += 19; |
| 4889 | |
| 4890 | var query = (req.url).query; |
| 4891 | var queryOffset = 0; |
| 4892 | var queryMap = {}; |
| 4893 | addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 4894 | parseBool(n) { |
| 4895 | if (n == "true") return true; |
| 4896 | if (n == "false") return false; |
| 4897 | if (n == null) return null; |
| 4898 | throw new core.ArgumentError("Invalid boolean: $n"); |
| 4899 | } |
| 4900 | |
| 4901 | if (query.length > 0) { |
| 4902 | for (var part in query.split("&")) { |
| 4903 | var keyvalue = part.split("="); |
| 4904 | addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 4905 | core.Uri.decodeQueryComponent(keyvalue[1])); |
| 4906 | } |
| 4907 | } |
| 4908 | unittest.expect(queryMap["docId"].first, unittest.equals(arg_docId)); |
| 4909 | unittest.expect(queryMap["source"].first, unittest.equals(arg_source)); |
| 4910 | unittest.expect( |
| 4911 | queryMap["volumeId"].first, unittest.equals(arg_volumeId)); |
| 4912 | unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); |
| 4913 | |
| 4914 | var h = { |
| 4915 | "content-type": "application/json; charset=utf-8", |
| 4916 | }; |
| 4917 | var resp = ""; |
| 4918 | return new async.Future.value(stringResponse(200, h, resp)); |
| 4919 | }), true); |
| 4920 | res |
| 4921 | .share( |
| 4922 | docId: arg_docId, |
| 4923 | source: arg_source, |
| 4924 | volumeId: arg_volumeId, |
| 4925 | $fields: arg_$fields) |
| 4926 | .then(unittest.expectAsync1((_) {})); |
| 4927 | }); |
| 4928 | |
| 4929 | unittest.test("method--unshare", () { |
| 4930 | var mock = new HttpServerMock(); |
| 4931 | api.FamilysharingResourceApi res = new api.BooksApi(mock).familysharing; |
| 4932 | var arg_docId = "foo"; |
| 4933 | var arg_source = "foo"; |
| 4934 | var arg_volumeId = "foo"; |
| 4935 | var arg_$fields = "foo"; |
| 4936 | mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 4937 | var path = (req.url).path; |
| 4938 | var pathOffset = 0; |
| 4939 | var index; |
| 4940 | var subPart; |
| 4941 | unittest.expect( |
| 4942 | path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 4943 | pathOffset += 1; |
| 4944 | unittest.expect(path.substring(pathOffset, pathOffset + 9), |
| 4945 | unittest.equals("books/v1/")); |
| 4946 | pathOffset += 9; |
| 4947 | unittest.expect(path.substring(pathOffset, pathOffset + 21), |
| 4948 | unittest.equals("familysharing/unshare")); |
| 4949 | pathOffset += 21; |
| 4950 | |
| 4951 | var query = (req.url).query; |
| 4952 | var queryOffset = 0; |
| 4953 | var queryMap = {}; |
| 4954 | addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 4955 | parseBool(n) { |
| 4956 | if (n == "true") return true; |
| 4957 | if (n == "false") return false; |
| 4958 | if (n == null) return null; |
| 4959 | throw new core.ArgumentError("Invalid boolean: $n"); |
| 4960 | } |
| 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]), |
| 4966 | core.Uri.decodeQueryComponent(keyvalue[1])); |
| 4967 | } |
| 4968 | } |
| 4969 | unittest.expect(queryMap["docId"].first, unittest.equals(arg_docId)); |
| 4970 | unittest.expect(queryMap["source"].first, unittest.equals(arg_source)); |
| 4971 | unittest.expect( |
| 4972 | queryMap["volumeId"].first, unittest.equals(arg_volumeId)); |
| 4973 | unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); |
| 4974 | |
| 4975 | var h = { |
| 4976 | "content-type": "application/json; charset=utf-8", |
| 4977 | }; |
| 4978 | var resp = ""; |
| 4979 | return new async.Future.value(stringResponse(200, h, resp)); |
| 4980 | }), true); |
| 4981 | res |
| 4982 | .unshare( |
| 4983 | docId: arg_docId, |
| 4984 | source: arg_source, |
| 4985 | volumeId: arg_volumeId, |
| 4986 | $fields: arg_$fields) |
| 4987 | .then(unittest.expectAsync1((_) {})); |
| 4988 | }); |
| 4989 | }); |
| 4990 | |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 4991 | unittest.group("resource-LayersResourceApi", () { |
| 4992 | unittest.test("method--get", () { |
| 4993 | var mock = new HttpServerMock(); |
| 4994 | api.LayersResourceApi res = new api.BooksApi(mock).layers; |
| 4995 | var arg_volumeId = "foo"; |
| 4996 | var arg_summaryId = "foo"; |
| 4997 | var arg_contentVersion = "foo"; |
| 4998 | var arg_source = "foo"; |
| 4999 | var arg_$fields = "foo"; |
| 5000 | mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 5001 | var path = (req.url).path; |
| 5002 | var pathOffset = 0; |
| 5003 | var index; |
| 5004 | var subPart; |
| 5005 | unittest.expect( |
| 5006 | path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 5007 | pathOffset += 1; |
| 5008 | unittest.expect(path.substring(pathOffset, pathOffset + 9), |
| 5009 | unittest.equals("books/v1/")); |
| 5010 | pathOffset += 9; |
| 5011 | unittest.expect(path.substring(pathOffset, pathOffset + 8), |
| 5012 | unittest.equals("volumes/")); |
| 5013 | pathOffset += 8; |
| 5014 | index = path.indexOf("/layersummary/", pathOffset); |
| 5015 | unittest.expect(index >= 0, unittest.isTrue); |
| 5016 | subPart = |
| 5017 | core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 5018 | pathOffset = index; |
| 5019 | unittest.expect(subPart, unittest.equals("$arg_volumeId")); |
| 5020 | unittest.expect(path.substring(pathOffset, pathOffset + 14), |
| 5021 | unittest.equals("/layersummary/")); |
| 5022 | pathOffset += 14; |
| 5023 | subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| 5024 | pathOffset = path.length; |
| 5025 | unittest.expect(subPart, unittest.equals("$arg_summaryId")); |
| 5026 | |
| 5027 | var query = (req.url).query; |
| 5028 | var queryOffset = 0; |
| 5029 | var queryMap = {}; |
| 5030 | addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 5031 | parseBool(n) { |
| 5032 | if (n == "true") return true; |
| 5033 | if (n == "false") return false; |
| 5034 | if (n == null) return null; |
| 5035 | throw new core.ArgumentError("Invalid boolean: $n"); |
| 5036 | } |
| 5037 | |
| 5038 | if (query.length > 0) { |
| 5039 | for (var part in query.split("&")) { |
| 5040 | var keyvalue = part.split("="); |
| 5041 | addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 5042 | core.Uri.decodeQueryComponent(keyvalue[1])); |
| 5043 | } |
| 5044 | } |
| 5045 | unittest.expect(queryMap["contentVersion"].first, |
| 5046 | unittest.equals(arg_contentVersion)); |
| 5047 | unittest.expect(queryMap["source"].first, unittest.equals(arg_source)); |
| 5048 | unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); |
| 5049 | |
| 5050 | var h = { |
| 5051 | "content-type": "application/json; charset=utf-8", |
| 5052 | }; |
| 5053 | var resp = convert.JSON.encode(buildLayersummary()); |
| 5054 | return new async.Future.value(stringResponse(200, h, resp)); |
| 5055 | }), true); |
| 5056 | res |
| 5057 | .get(arg_volumeId, arg_summaryId, |
| 5058 | contentVersion: arg_contentVersion, |
| 5059 | source: arg_source, |
| 5060 | $fields: arg_$fields) |
| 5061 | .then(unittest.expectAsync1(((api.Layersummary response) { |
| 5062 | checkLayersummary(response); |
| 5063 | }))); |
| 5064 | }); |
| 5065 | |
| 5066 | unittest.test("method--list", () { |
| 5067 | var mock = new HttpServerMock(); |
| 5068 | api.LayersResourceApi res = new api.BooksApi(mock).layers; |
| 5069 | var arg_volumeId = "foo"; |
| 5070 | var arg_contentVersion = "foo"; |
| 5071 | var arg_maxResults = 42; |
| 5072 | var arg_pageToken = "foo"; |
| 5073 | var arg_source = "foo"; |
| 5074 | var arg_$fields = "foo"; |
| 5075 | mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 5076 | var path = (req.url).path; |
| 5077 | var pathOffset = 0; |
| 5078 | var index; |
| 5079 | var subPart; |
| 5080 | unittest.expect( |
| 5081 | path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 5082 | pathOffset += 1; |
| 5083 | unittest.expect(path.substring(pathOffset, pathOffset + 9), |
| 5084 | unittest.equals("books/v1/")); |
| 5085 | pathOffset += 9; |
| 5086 | unittest.expect(path.substring(pathOffset, pathOffset + 8), |
| 5087 | unittest.equals("volumes/")); |
| 5088 | pathOffset += 8; |
| 5089 | index = path.indexOf("/layersummary", pathOffset); |
| 5090 | unittest.expect(index >= 0, unittest.isTrue); |
| 5091 | subPart = |
| 5092 | core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 5093 | pathOffset = index; |
| 5094 | unittest.expect(subPart, unittest.equals("$arg_volumeId")); |
| 5095 | unittest.expect(path.substring(pathOffset, pathOffset + 13), |
| 5096 | unittest.equals("/layersummary")); |
| 5097 | pathOffset += 13; |
| 5098 | |
| 5099 | var query = (req.url).query; |
| 5100 | var queryOffset = 0; |
| 5101 | var queryMap = {}; |
| 5102 | addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 5103 | parseBool(n) { |
| 5104 | if (n == "true") return true; |
| 5105 | if (n == "false") return false; |
| 5106 | if (n == null) return null; |
| 5107 | throw new core.ArgumentError("Invalid boolean: $n"); |
| 5108 | } |
| 5109 | |
| 5110 | if (query.length > 0) { |
| 5111 | for (var part in query.split("&")) { |
| 5112 | var keyvalue = part.split("="); |
| 5113 | addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 5114 | core.Uri.decodeQueryComponent(keyvalue[1])); |
| 5115 | } |
| 5116 | } |
| 5117 | unittest.expect(queryMap["contentVersion"].first, |
| 5118 | unittest.equals(arg_contentVersion)); |
| 5119 | unittest.expect(core.int.parse(queryMap["maxResults"].first), |
| 5120 | unittest.equals(arg_maxResults)); |
| 5121 | unittest.expect( |
| 5122 | queryMap["pageToken"].first, unittest.equals(arg_pageToken)); |
| 5123 | unittest.expect(queryMap["source"].first, unittest.equals(arg_source)); |
| 5124 | unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); |
| 5125 | |
| 5126 | var h = { |
| 5127 | "content-type": "application/json; charset=utf-8", |
| 5128 | }; |
| 5129 | var resp = convert.JSON.encode(buildLayersummaries()); |
| 5130 | return new async.Future.value(stringResponse(200, h, resp)); |
| 5131 | }), true); |
| 5132 | res |
| 5133 | .list(arg_volumeId, |
| 5134 | contentVersion: arg_contentVersion, |
| 5135 | maxResults: arg_maxResults, |
| 5136 | pageToken: arg_pageToken, |
| 5137 | source: arg_source, |
| 5138 | $fields: arg_$fields) |
| 5139 | .then(unittest.expectAsync1(((api.Layersummaries response) { |
| 5140 | checkLayersummaries(response); |
| 5141 | }))); |
| 5142 | }); |
| 5143 | }); |
| 5144 | |
| 5145 | unittest.group("resource-LayersAnnotationDataResourceApi", () { |
| 5146 | unittest.test("method--get", () { |
| 5147 | var mock = new HttpServerMock(); |
| 5148 | api.LayersAnnotationDataResourceApi res = |
| 5149 | new api.BooksApi(mock).layers.annotationData; |
| 5150 | var arg_volumeId = "foo"; |
| 5151 | var arg_layerId = "foo"; |
| 5152 | var arg_annotationDataId = "foo"; |
| 5153 | var arg_contentVersion = "foo"; |
| 5154 | var arg_allowWebDefinitions = true; |
| 5155 | var arg_h = 42; |
| 5156 | var arg_locale = "foo"; |
| 5157 | var arg_scale = 42; |
| 5158 | var arg_source = "foo"; |
| 5159 | var arg_w = 42; |
| 5160 | var arg_$fields = "foo"; |
| 5161 | mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 5162 | var path = (req.url).path; |
| 5163 | var pathOffset = 0; |
| 5164 | var index; |
| 5165 | var subPart; |
| 5166 | unittest.expect( |
| 5167 | path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 5168 | pathOffset += 1; |
| 5169 | unittest.expect(path.substring(pathOffset, pathOffset + 9), |
| 5170 | unittest.equals("books/v1/")); |
| 5171 | pathOffset += 9; |
| 5172 | unittest.expect(path.substring(pathOffset, pathOffset + 8), |
| 5173 | unittest.equals("volumes/")); |
| 5174 | pathOffset += 8; |
| 5175 | index = path.indexOf("/layers/", pathOffset); |
| 5176 | unittest.expect(index >= 0, unittest.isTrue); |
| 5177 | subPart = |
| 5178 | core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 5179 | pathOffset = index; |
| 5180 | unittest.expect(subPart, unittest.equals("$arg_volumeId")); |
| 5181 | unittest.expect(path.substring(pathOffset, pathOffset + 8), |
| 5182 | unittest.equals("/layers/")); |
| 5183 | pathOffset += 8; |
| 5184 | index = path.indexOf("/data/", pathOffset); |
| 5185 | unittest.expect(index >= 0, unittest.isTrue); |
| 5186 | subPart = |
| 5187 | core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 5188 | pathOffset = index; |
| 5189 | unittest.expect(subPart, unittest.equals("$arg_layerId")); |
| 5190 | unittest.expect(path.substring(pathOffset, pathOffset + 6), |
| 5191 | unittest.equals("/data/")); |
| 5192 | pathOffset += 6; |
| 5193 | subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| 5194 | pathOffset = path.length; |
| 5195 | unittest.expect(subPart, unittest.equals("$arg_annotationDataId")); |
| 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 | |
| 5208 | if (query.length > 0) { |
| 5209 | for (var part in query.split("&")) { |
| 5210 | var keyvalue = part.split("="); |
| 5211 | addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 5212 | core.Uri.decodeQueryComponent(keyvalue[1])); |
| 5213 | } |
| 5214 | } |
| 5215 | unittest.expect(queryMap["contentVersion"].first, |
| 5216 | unittest.equals(arg_contentVersion)); |
| 5217 | unittest.expect(queryMap["allowWebDefinitions"].first, |
| 5218 | unittest.equals("$arg_allowWebDefinitions")); |
| 5219 | unittest.expect( |
| 5220 | core.int.parse(queryMap["h"].first), unittest.equals(arg_h)); |
| 5221 | unittest.expect(queryMap["locale"].first, unittest.equals(arg_locale)); |
| 5222 | unittest.expect(core.int.parse(queryMap["scale"].first), |
| 5223 | unittest.equals(arg_scale)); |
| 5224 | unittest.expect(queryMap["source"].first, unittest.equals(arg_source)); |
| 5225 | unittest.expect( |
| 5226 | core.int.parse(queryMap["w"].first), unittest.equals(arg_w)); |
| 5227 | unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); |
| 5228 | |
| 5229 | var h = { |
| 5230 | "content-type": "application/json; charset=utf-8", |
| 5231 | }; |
| 5232 | var resp = convert.JSON.encode(buildAnnotationdata()); |
| 5233 | return new async.Future.value(stringResponse(200, h, resp)); |
| 5234 | }), true); |
| 5235 | res |
| 5236 | .get(arg_volumeId, arg_layerId, arg_annotationDataId, |
| 5237 | arg_contentVersion, |
| 5238 | allowWebDefinitions: arg_allowWebDefinitions, |
| 5239 | h: arg_h, |
| 5240 | locale: arg_locale, |
| 5241 | scale: arg_scale, |
| 5242 | source: arg_source, |
| 5243 | w: arg_w, |
| 5244 | $fields: arg_$fields) |
| 5245 | .then(unittest.expectAsync1(((api.Annotationdata response) { |
| 5246 | checkAnnotationdata(response); |
| 5247 | }))); |
| 5248 | }); |
| 5249 | |
| 5250 | unittest.test("method--list", () { |
| 5251 | var mock = new HttpServerMock(); |
| 5252 | api.LayersAnnotationDataResourceApi res = |
| 5253 | new api.BooksApi(mock).layers.annotationData; |
| 5254 | var arg_volumeId = "foo"; |
| 5255 | var arg_layerId = "foo"; |
| 5256 | var arg_contentVersion = "foo"; |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 5257 | var arg_annotationDataId = buildUnnamed1007(); |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 5258 | var arg_h = 42; |
| 5259 | var arg_locale = "foo"; |
| 5260 | var arg_maxResults = 42; |
| 5261 | var arg_pageToken = "foo"; |
| 5262 | var arg_scale = 42; |
| 5263 | var arg_source = "foo"; |
| 5264 | var arg_updatedMax = "foo"; |
| 5265 | var arg_updatedMin = "foo"; |
| 5266 | var arg_w = 42; |
| 5267 | var arg_$fields = "foo"; |
| 5268 | mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 5269 | var path = (req.url).path; |
| 5270 | var pathOffset = 0; |
| 5271 | var index; |
| 5272 | var subPart; |
| 5273 | unittest.expect( |
| 5274 | path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 5275 | pathOffset += 1; |
| 5276 | unittest.expect(path.substring(pathOffset, pathOffset + 9), |
| 5277 | unittest.equals("books/v1/")); |
| 5278 | pathOffset += 9; |
| 5279 | unittest.expect(path.substring(pathOffset, pathOffset + 8), |
| 5280 | unittest.equals("volumes/")); |
| 5281 | pathOffset += 8; |
| 5282 | index = path.indexOf("/layers/", pathOffset); |
| 5283 | unittest.expect(index >= 0, unittest.isTrue); |
| 5284 | subPart = |
| 5285 | core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 5286 | pathOffset = index; |
| 5287 | unittest.expect(subPart, unittest.equals("$arg_volumeId")); |
| 5288 | unittest.expect(path.substring(pathOffset, pathOffset + 8), |
| 5289 | unittest.equals("/layers/")); |
| 5290 | pathOffset += 8; |
| 5291 | index = path.indexOf("/data", pathOffset); |
| 5292 | unittest.expect(index >= 0, unittest.isTrue); |
| 5293 | subPart = |
| 5294 | core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 5295 | pathOffset = index; |
| 5296 | unittest.expect(subPart, unittest.equals("$arg_layerId")); |
| 5297 | unittest.expect(path.substring(pathOffset, pathOffset + 5), |
| 5298 | unittest.equals("/data")); |
| 5299 | pathOffset += 5; |
| 5300 | |
| 5301 | var query = (req.url).query; |
| 5302 | var queryOffset = 0; |
| 5303 | var queryMap = {}; |
| 5304 | addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 5305 | parseBool(n) { |
| 5306 | if (n == "true") return true; |
| 5307 | if (n == "false") return false; |
| 5308 | if (n == null) return null; |
| 5309 | throw new core.ArgumentError("Invalid boolean: $n"); |
| 5310 | } |
| 5311 | |
| 5312 | if (query.length > 0) { |
| 5313 | for (var part in query.split("&")) { |
| 5314 | var keyvalue = part.split("="); |
| 5315 | addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 5316 | core.Uri.decodeQueryComponent(keyvalue[1])); |
| 5317 | } |
| 5318 | } |
| 5319 | unittest.expect(queryMap["contentVersion"].first, |
| 5320 | unittest.equals(arg_contentVersion)); |
| 5321 | unittest.expect(queryMap["annotationDataId"], |
| 5322 | unittest.equals(arg_annotationDataId)); |
| 5323 | unittest.expect( |
| 5324 | core.int.parse(queryMap["h"].first), unittest.equals(arg_h)); |
| 5325 | unittest.expect(queryMap["locale"].first, unittest.equals(arg_locale)); |
| 5326 | unittest.expect(core.int.parse(queryMap["maxResults"].first), |
| 5327 | unittest.equals(arg_maxResults)); |
| 5328 | unittest.expect( |
| 5329 | queryMap["pageToken"].first, unittest.equals(arg_pageToken)); |
| 5330 | unittest.expect(core.int.parse(queryMap["scale"].first), |
| 5331 | unittest.equals(arg_scale)); |
| 5332 | unittest.expect(queryMap["source"].first, unittest.equals(arg_source)); |
| 5333 | unittest.expect( |
| 5334 | queryMap["updatedMax"].first, unittest.equals(arg_updatedMax)); |
| 5335 | unittest.expect( |
| 5336 | queryMap["updatedMin"].first, unittest.equals(arg_updatedMin)); |
| 5337 | unittest.expect( |
| 5338 | core.int.parse(queryMap["w"].first), unittest.equals(arg_w)); |
| 5339 | unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); |
| 5340 | |
| 5341 | var h = { |
| 5342 | "content-type": "application/json; charset=utf-8", |
| 5343 | }; |
| 5344 | var resp = convert.JSON.encode(buildAnnotationsdata()); |
| 5345 | return new async.Future.value(stringResponse(200, h, resp)); |
| 5346 | }), true); |
| 5347 | res |
| 5348 | .list(arg_volumeId, arg_layerId, arg_contentVersion, |
| 5349 | annotationDataId: arg_annotationDataId, |
| 5350 | h: arg_h, |
| 5351 | locale: arg_locale, |
| 5352 | maxResults: arg_maxResults, |
| 5353 | pageToken: arg_pageToken, |
| 5354 | scale: arg_scale, |
| 5355 | source: arg_source, |
| 5356 | updatedMax: arg_updatedMax, |
| 5357 | updatedMin: arg_updatedMin, |
| 5358 | w: arg_w, |
| 5359 | $fields: arg_$fields) |
| 5360 | .then(unittest.expectAsync1(((api.Annotationsdata response) { |
| 5361 | checkAnnotationsdata(response); |
| 5362 | }))); |
| 5363 | }); |
| 5364 | }); |
| 5365 | |
| 5366 | unittest.group("resource-LayersVolumeAnnotationsResourceApi", () { |
| 5367 | unittest.test("method--get", () { |
| 5368 | var mock = new HttpServerMock(); |
| 5369 | api.LayersVolumeAnnotationsResourceApi res = |
| 5370 | new api.BooksApi(mock).layers.volumeAnnotations; |
| 5371 | var arg_volumeId = "foo"; |
| 5372 | var arg_layerId = "foo"; |
| 5373 | var arg_annotationId = "foo"; |
| 5374 | var arg_locale = "foo"; |
| 5375 | var arg_source = "foo"; |
| 5376 | var arg_$fields = "foo"; |
| 5377 | mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 5378 | var path = (req.url).path; |
| 5379 | var pathOffset = 0; |
| 5380 | var index; |
| 5381 | var subPart; |
| 5382 | unittest.expect( |
| 5383 | path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 5384 | pathOffset += 1; |
| 5385 | unittest.expect(path.substring(pathOffset, pathOffset + 9), |
| 5386 | unittest.equals("books/v1/")); |
| 5387 | pathOffset += 9; |
| 5388 | unittest.expect(path.substring(pathOffset, pathOffset + 8), |
| 5389 | unittest.equals("volumes/")); |
| 5390 | pathOffset += 8; |
| 5391 | index = path.indexOf("/layers/", pathOffset); |
| 5392 | unittest.expect(index >= 0, unittest.isTrue); |
| 5393 | subPart = |
| 5394 | core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 5395 | pathOffset = index; |
| 5396 | unittest.expect(subPart, unittest.equals("$arg_volumeId")); |
| 5397 | unittest.expect(path.substring(pathOffset, pathOffset + 8), |
| 5398 | unittest.equals("/layers/")); |
| 5399 | pathOffset += 8; |
| 5400 | index = path.indexOf("/annotations/", pathOffset); |
| 5401 | unittest.expect(index >= 0, unittest.isTrue); |
| 5402 | subPart = |
| 5403 | core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 5404 | pathOffset = index; |
| 5405 | unittest.expect(subPart, unittest.equals("$arg_layerId")); |
| 5406 | unittest.expect(path.substring(pathOffset, pathOffset + 13), |
| 5407 | unittest.equals("/annotations/")); |
| 5408 | pathOffset += 13; |
| 5409 | subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| 5410 | pathOffset = path.length; |
| 5411 | unittest.expect(subPart, unittest.equals("$arg_annotationId")); |
| 5412 | |
| 5413 | var query = (req.url).query; |
| 5414 | var queryOffset = 0; |
| 5415 | var queryMap = {}; |
| 5416 | addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 5417 | parseBool(n) { |
| 5418 | if (n == "true") return true; |
| 5419 | if (n == "false") return false; |
| 5420 | if (n == null) return null; |
| 5421 | throw new core.ArgumentError("Invalid boolean: $n"); |
| 5422 | } |
| 5423 | |
| 5424 | if (query.length > 0) { |
| 5425 | for (var part in query.split("&")) { |
| 5426 | var keyvalue = part.split("="); |
| 5427 | addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 5428 | core.Uri.decodeQueryComponent(keyvalue[1])); |
| 5429 | } |
| 5430 | } |
| 5431 | unittest.expect(queryMap["locale"].first, unittest.equals(arg_locale)); |
| 5432 | unittest.expect(queryMap["source"].first, unittest.equals(arg_source)); |
| 5433 | unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); |
| 5434 | |
| 5435 | var h = { |
| 5436 | "content-type": "application/json; charset=utf-8", |
| 5437 | }; |
| 5438 | var resp = convert.JSON.encode(buildVolumeannotation()); |
| 5439 | return new async.Future.value(stringResponse(200, h, resp)); |
| 5440 | }), true); |
| 5441 | res |
| 5442 | .get(arg_volumeId, arg_layerId, arg_annotationId, |
| 5443 | locale: arg_locale, source: arg_source, $fields: arg_$fields) |
| 5444 | .then(unittest.expectAsync1(((api.Volumeannotation response) { |
| 5445 | checkVolumeannotation(response); |
| 5446 | }))); |
| 5447 | }); |
| 5448 | |
| 5449 | unittest.test("method--list", () { |
| 5450 | var mock = new HttpServerMock(); |
| 5451 | api.LayersVolumeAnnotationsResourceApi res = |
| 5452 | new api.BooksApi(mock).layers.volumeAnnotations; |
| 5453 | var arg_volumeId = "foo"; |
| 5454 | var arg_layerId = "foo"; |
| 5455 | var arg_contentVersion = "foo"; |
| 5456 | var arg_endOffset = "foo"; |
| 5457 | var arg_endPosition = "foo"; |
| 5458 | var arg_locale = "foo"; |
| 5459 | var arg_maxResults = 42; |
| 5460 | var arg_pageToken = "foo"; |
| 5461 | var arg_showDeleted = true; |
| 5462 | var arg_source = "foo"; |
| 5463 | var arg_startOffset = "foo"; |
| 5464 | var arg_startPosition = "foo"; |
| 5465 | var arg_updatedMax = "foo"; |
| 5466 | var arg_updatedMin = "foo"; |
| 5467 | var arg_volumeAnnotationsVersion = "foo"; |
| 5468 | var arg_$fields = "foo"; |
| 5469 | mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 5470 | var path = (req.url).path; |
| 5471 | var pathOffset = 0; |
| 5472 | var index; |
| 5473 | var subPart; |
| 5474 | unittest.expect( |
| 5475 | path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 5476 | pathOffset += 1; |
| 5477 | unittest.expect(path.substring(pathOffset, pathOffset + 9), |
| 5478 | unittest.equals("books/v1/")); |
| 5479 | pathOffset += 9; |
| 5480 | unittest.expect(path.substring(pathOffset, pathOffset + 8), |
| 5481 | unittest.equals("volumes/")); |
| 5482 | pathOffset += 8; |
| 5483 | index = path.indexOf("/layers/", pathOffset); |
| 5484 | unittest.expect(index >= 0, unittest.isTrue); |
| 5485 | subPart = |
| 5486 | core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 5487 | pathOffset = index; |
| 5488 | unittest.expect(subPart, unittest.equals("$arg_volumeId")); |
| 5489 | unittest.expect(path.substring(pathOffset, pathOffset + 8), |
| 5490 | unittest.equals("/layers/")); |
| 5491 | pathOffset += 8; |
| 5492 | subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| 5493 | pathOffset = path.length; |
| 5494 | unittest.expect(subPart, unittest.equals("$arg_layerId")); |
| 5495 | |
| 5496 | var query = (req.url).query; |
| 5497 | var queryOffset = 0; |
| 5498 | var queryMap = {}; |
| 5499 | addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 5500 | parseBool(n) { |
| 5501 | if (n == "true") return true; |
| 5502 | if (n == "false") return false; |
| 5503 | if (n == null) return null; |
| 5504 | throw new core.ArgumentError("Invalid boolean: $n"); |
| 5505 | } |
| 5506 | |
| 5507 | if (query.length > 0) { |
| 5508 | for (var part in query.split("&")) { |
| 5509 | var keyvalue = part.split("="); |
| 5510 | addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 5511 | core.Uri.decodeQueryComponent(keyvalue[1])); |
| 5512 | } |
| 5513 | } |
| 5514 | unittest.expect(queryMap["contentVersion"].first, |
| 5515 | unittest.equals(arg_contentVersion)); |
| 5516 | unittest.expect( |
| 5517 | queryMap["endOffset"].first, unittest.equals(arg_endOffset)); |
| 5518 | unittest.expect( |
| 5519 | queryMap["endPosition"].first, unittest.equals(arg_endPosition)); |
| 5520 | unittest.expect(queryMap["locale"].first, unittest.equals(arg_locale)); |
| 5521 | unittest.expect(core.int.parse(queryMap["maxResults"].first), |
| 5522 | unittest.equals(arg_maxResults)); |
| 5523 | unittest.expect( |
| 5524 | queryMap["pageToken"].first, unittest.equals(arg_pageToken)); |
| 5525 | unittest.expect( |
| 5526 | queryMap["showDeleted"].first, unittest.equals("$arg_showDeleted")); |
| 5527 | unittest.expect(queryMap["source"].first, unittest.equals(arg_source)); |
| 5528 | unittest.expect( |
| 5529 | queryMap["startOffset"].first, unittest.equals(arg_startOffset)); |
| 5530 | unittest.expect(queryMap["startPosition"].first, |
| 5531 | unittest.equals(arg_startPosition)); |
| 5532 | unittest.expect( |
| 5533 | queryMap["updatedMax"].first, unittest.equals(arg_updatedMax)); |
| 5534 | unittest.expect( |
| 5535 | queryMap["updatedMin"].first, unittest.equals(arg_updatedMin)); |
| 5536 | unittest.expect(queryMap["volumeAnnotationsVersion"].first, |
| 5537 | unittest.equals(arg_volumeAnnotationsVersion)); |
| 5538 | unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); |
| 5539 | |
| 5540 | var h = { |
| 5541 | "content-type": "application/json; charset=utf-8", |
| 5542 | }; |
| 5543 | var resp = convert.JSON.encode(buildVolumeannotations()); |
| 5544 | return new async.Future.value(stringResponse(200, h, resp)); |
| 5545 | }), true); |
| 5546 | res |
| 5547 | .list(arg_volumeId, arg_layerId, arg_contentVersion, |
| 5548 | endOffset: arg_endOffset, |
| 5549 | endPosition: arg_endPosition, |
| 5550 | locale: arg_locale, |
| 5551 | maxResults: arg_maxResults, |
| 5552 | pageToken: arg_pageToken, |
| 5553 | showDeleted: arg_showDeleted, |
| 5554 | source: arg_source, |
| 5555 | startOffset: arg_startOffset, |
| 5556 | startPosition: arg_startPosition, |
| 5557 | updatedMax: arg_updatedMax, |
| 5558 | updatedMin: arg_updatedMin, |
| 5559 | volumeAnnotationsVersion: arg_volumeAnnotationsVersion, |
| 5560 | $fields: arg_$fields) |
| 5561 | .then(unittest.expectAsync1(((api.Volumeannotations response) { |
| 5562 | checkVolumeannotations(response); |
| 5563 | }))); |
| 5564 | }); |
| 5565 | }); |
| 5566 | |
| 5567 | unittest.group("resource-MyconfigResourceApi", () { |
| 5568 | unittest.test("method--getUserSettings", () { |
| 5569 | var mock = new HttpServerMock(); |
| 5570 | api.MyconfigResourceApi res = new api.BooksApi(mock).myconfig; |
| 5571 | var arg_$fields = "foo"; |
| 5572 | mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 5573 | var path = (req.url).path; |
| 5574 | var pathOffset = 0; |
| 5575 | var index; |
| 5576 | var subPart; |
| 5577 | unittest.expect( |
| 5578 | path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 5579 | pathOffset += 1; |
| 5580 | unittest.expect(path.substring(pathOffset, pathOffset + 9), |
| 5581 | unittest.equals("books/v1/")); |
| 5582 | pathOffset += 9; |
| 5583 | unittest.expect(path.substring(pathOffset, pathOffset + 24), |
| 5584 | unittest.equals("myconfig/getUserSettings")); |
| 5585 | pathOffset += 24; |
| 5586 | |
| 5587 | var query = (req.url).query; |
| 5588 | var queryOffset = 0; |
| 5589 | var queryMap = {}; |
| 5590 | addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 5591 | parseBool(n) { |
| 5592 | if (n == "true") return true; |
| 5593 | if (n == "false") return false; |
| 5594 | if (n == null) return null; |
| 5595 | throw new core.ArgumentError("Invalid boolean: $n"); |
| 5596 | } |
| 5597 | |
| 5598 | if (query.length > 0) { |
| 5599 | for (var part in query.split("&")) { |
| 5600 | var keyvalue = part.split("="); |
| 5601 | addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 5602 | core.Uri.decodeQueryComponent(keyvalue[1])); |
| 5603 | } |
| 5604 | } |
| 5605 | unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); |
| 5606 | |
| 5607 | var h = { |
| 5608 | "content-type": "application/json; charset=utf-8", |
| 5609 | }; |
| 5610 | var resp = convert.JSON.encode(buildUsersettings()); |
| 5611 | return new async.Future.value(stringResponse(200, h, resp)); |
| 5612 | }), true); |
| 5613 | res |
| 5614 | .getUserSettings($fields: arg_$fields) |
| 5615 | .then(unittest.expectAsync1(((api.Usersettings response) { |
| 5616 | checkUsersettings(response); |
| 5617 | }))); |
| 5618 | }); |
| 5619 | |
| 5620 | unittest.test("method--releaseDownloadAccess", () { |
| 5621 | var mock = new HttpServerMock(); |
| 5622 | api.MyconfigResourceApi res = new api.BooksApi(mock).myconfig; |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 5623 | var arg_volumeIds = buildUnnamed1008(); |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 5624 | var arg_cpksver = "foo"; |
| 5625 | var arg_locale = "foo"; |
| 5626 | var arg_source = "foo"; |
| 5627 | var arg_$fields = "foo"; |
| 5628 | mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 5629 | var path = (req.url).path; |
| 5630 | var pathOffset = 0; |
| 5631 | var index; |
| 5632 | var subPart; |
| 5633 | unittest.expect( |
| 5634 | path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 5635 | pathOffset += 1; |
| 5636 | unittest.expect(path.substring(pathOffset, pathOffset + 9), |
| 5637 | unittest.equals("books/v1/")); |
| 5638 | pathOffset += 9; |
| 5639 | unittest.expect(path.substring(pathOffset, pathOffset + 30), |
| 5640 | unittest.equals("myconfig/releaseDownloadAccess")); |
| 5641 | pathOffset += 30; |
| 5642 | |
| 5643 | var query = (req.url).query; |
| 5644 | var queryOffset = 0; |
| 5645 | var queryMap = {}; |
| 5646 | addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 5647 | parseBool(n) { |
| 5648 | if (n == "true") return true; |
| 5649 | if (n == "false") return false; |
| 5650 | if (n == null) return null; |
| 5651 | throw new core.ArgumentError("Invalid boolean: $n"); |
| 5652 | } |
| 5653 | |
| 5654 | if (query.length > 0) { |
| 5655 | for (var part in query.split("&")) { |
| 5656 | var keyvalue = part.split("="); |
| 5657 | addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 5658 | core.Uri.decodeQueryComponent(keyvalue[1])); |
| 5659 | } |
| 5660 | } |
| 5661 | unittest.expect(queryMap["volumeIds"], unittest.equals(arg_volumeIds)); |
| 5662 | unittest.expect( |
| 5663 | queryMap["cpksver"].first, unittest.equals(arg_cpksver)); |
| 5664 | unittest.expect(queryMap["locale"].first, unittest.equals(arg_locale)); |
| 5665 | unittest.expect(queryMap["source"].first, unittest.equals(arg_source)); |
| 5666 | unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); |
| 5667 | |
| 5668 | var h = { |
| 5669 | "content-type": "application/json; charset=utf-8", |
| 5670 | }; |
| 5671 | var resp = convert.JSON.encode(buildDownloadAccesses()); |
| 5672 | return new async.Future.value(stringResponse(200, h, resp)); |
| 5673 | }), true); |
| 5674 | res |
| 5675 | .releaseDownloadAccess(arg_volumeIds, arg_cpksver, |
| 5676 | locale: arg_locale, source: arg_source, $fields: arg_$fields) |
| 5677 | .then(unittest.expectAsync1(((api.DownloadAccesses response) { |
| 5678 | checkDownloadAccesses(response); |
| 5679 | }))); |
| 5680 | }); |
| 5681 | |
| 5682 | unittest.test("method--requestAccess", () { |
| 5683 | var mock = new HttpServerMock(); |
| 5684 | api.MyconfigResourceApi res = new api.BooksApi(mock).myconfig; |
| 5685 | var arg_source = "foo"; |
| 5686 | var arg_volumeId = "foo"; |
| 5687 | var arg_nonce = "foo"; |
| 5688 | var arg_cpksver = "foo"; |
| 5689 | var arg_licenseTypes = "foo"; |
| 5690 | var arg_locale = "foo"; |
| 5691 | var arg_$fields = "foo"; |
| 5692 | mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 5693 | var path = (req.url).path; |
| 5694 | var pathOffset = 0; |
| 5695 | var index; |
| 5696 | var subPart; |
| 5697 | unittest.expect( |
| 5698 | path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 5699 | pathOffset += 1; |
| 5700 | unittest.expect(path.substring(pathOffset, pathOffset + 9), |
| 5701 | unittest.equals("books/v1/")); |
| 5702 | pathOffset += 9; |
| 5703 | unittest.expect(path.substring(pathOffset, pathOffset + 22), |
| 5704 | unittest.equals("myconfig/requestAccess")); |
| 5705 | pathOffset += 22; |
| 5706 | |
| 5707 | var query = (req.url).query; |
| 5708 | var queryOffset = 0; |
| 5709 | var queryMap = {}; |
| 5710 | addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 5711 | parseBool(n) { |
| 5712 | if (n == "true") return true; |
| 5713 | if (n == "false") return false; |
| 5714 | if (n == null) return null; |
| 5715 | throw new core.ArgumentError("Invalid boolean: $n"); |
| 5716 | } |
| 5717 | |
| 5718 | if (query.length > 0) { |
| 5719 | for (var part in query.split("&")) { |
| 5720 | var keyvalue = part.split("="); |
| 5721 | addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 5722 | core.Uri.decodeQueryComponent(keyvalue[1])); |
| 5723 | } |
| 5724 | } |
| 5725 | unittest.expect(queryMap["source"].first, unittest.equals(arg_source)); |
| 5726 | unittest.expect( |
| 5727 | queryMap["volumeId"].first, unittest.equals(arg_volumeId)); |
| 5728 | unittest.expect(queryMap["nonce"].first, unittest.equals(arg_nonce)); |
| 5729 | unittest.expect( |
| 5730 | queryMap["cpksver"].first, unittest.equals(arg_cpksver)); |
| 5731 | unittest.expect( |
| 5732 | queryMap["licenseTypes"].first, unittest.equals(arg_licenseTypes)); |
| 5733 | unittest.expect(queryMap["locale"].first, unittest.equals(arg_locale)); |
| 5734 | unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); |
| 5735 | |
| 5736 | var h = { |
| 5737 | "content-type": "application/json; charset=utf-8", |
| 5738 | }; |
| 5739 | var resp = convert.JSON.encode(buildRequestAccess()); |
| 5740 | return new async.Future.value(stringResponse(200, h, resp)); |
| 5741 | }), true); |
| 5742 | res |
| 5743 | .requestAccess(arg_source, arg_volumeId, arg_nonce, arg_cpksver, |
| 5744 | licenseTypes: arg_licenseTypes, |
| 5745 | locale: arg_locale, |
| 5746 | $fields: arg_$fields) |
| 5747 | .then(unittest.expectAsync1(((api.RequestAccess response) { |
| 5748 | checkRequestAccess(response); |
| 5749 | }))); |
| 5750 | }); |
| 5751 | |
| 5752 | unittest.test("method--syncVolumeLicenses", () { |
| 5753 | var mock = new HttpServerMock(); |
| 5754 | api.MyconfigResourceApi res = new api.BooksApi(mock).myconfig; |
| 5755 | var arg_source = "foo"; |
| 5756 | var arg_nonce = "foo"; |
| 5757 | var arg_cpksver = "foo"; |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 5758 | var arg_features = buildUnnamed1009(); |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 5759 | var arg_includeNonComicsSeries = true; |
| 5760 | var arg_locale = "foo"; |
| 5761 | var arg_showPreorders = true; |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 5762 | var arg_volumeIds = buildUnnamed1010(); |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 5763 | var arg_$fields = "foo"; |
| 5764 | mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 5765 | var path = (req.url).path; |
| 5766 | var pathOffset = 0; |
| 5767 | var index; |
| 5768 | var subPart; |
| 5769 | unittest.expect( |
| 5770 | path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 5771 | pathOffset += 1; |
| 5772 | unittest.expect(path.substring(pathOffset, pathOffset + 9), |
| 5773 | unittest.equals("books/v1/")); |
| 5774 | pathOffset += 9; |
| 5775 | unittest.expect(path.substring(pathOffset, pathOffset + 27), |
| 5776 | unittest.equals("myconfig/syncVolumeLicenses")); |
| 5777 | pathOffset += 27; |
| 5778 | |
| 5779 | var query = (req.url).query; |
| 5780 | var queryOffset = 0; |
| 5781 | var queryMap = {}; |
| 5782 | addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 5783 | parseBool(n) { |
| 5784 | if (n == "true") return true; |
| 5785 | if (n == "false") return false; |
| 5786 | if (n == null) return null; |
| 5787 | throw new core.ArgumentError("Invalid boolean: $n"); |
| 5788 | } |
| 5789 | |
| 5790 | if (query.length > 0) { |
| 5791 | for (var part in query.split("&")) { |
| 5792 | var keyvalue = part.split("="); |
| 5793 | addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 5794 | core.Uri.decodeQueryComponent(keyvalue[1])); |
| 5795 | } |
| 5796 | } |
| 5797 | unittest.expect(queryMap["source"].first, unittest.equals(arg_source)); |
| 5798 | unittest.expect(queryMap["nonce"].first, unittest.equals(arg_nonce)); |
| 5799 | unittest.expect( |
| 5800 | queryMap["cpksver"].first, unittest.equals(arg_cpksver)); |
| 5801 | unittest.expect(queryMap["features"], unittest.equals(arg_features)); |
| 5802 | unittest.expect(queryMap["includeNonComicsSeries"].first, |
| 5803 | unittest.equals("$arg_includeNonComicsSeries")); |
| 5804 | unittest.expect(queryMap["locale"].first, unittest.equals(arg_locale)); |
| 5805 | unittest.expect(queryMap["showPreorders"].first, |
| 5806 | unittest.equals("$arg_showPreorders")); |
| 5807 | unittest.expect(queryMap["volumeIds"], unittest.equals(arg_volumeIds)); |
| 5808 | unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); |
| 5809 | |
| 5810 | var h = { |
| 5811 | "content-type": "application/json; charset=utf-8", |
| 5812 | }; |
| 5813 | var resp = convert.JSON.encode(buildVolumes()); |
| 5814 | return new async.Future.value(stringResponse(200, h, resp)); |
| 5815 | }), true); |
| 5816 | res |
| 5817 | .syncVolumeLicenses(arg_source, arg_nonce, arg_cpksver, |
| 5818 | features: arg_features, |
| 5819 | includeNonComicsSeries: arg_includeNonComicsSeries, |
| 5820 | locale: arg_locale, |
| 5821 | showPreorders: arg_showPreorders, |
| 5822 | volumeIds: arg_volumeIds, |
| 5823 | $fields: arg_$fields) |
| 5824 | .then(unittest.expectAsync1(((api.Volumes response) { |
| 5825 | checkVolumes(response); |
| 5826 | }))); |
| 5827 | }); |
| 5828 | |
| 5829 | unittest.test("method--updateUserSettings", () { |
| 5830 | var mock = new HttpServerMock(); |
| 5831 | api.MyconfigResourceApi res = new api.BooksApi(mock).myconfig; |
| 5832 | var arg_request = buildUsersettings(); |
| 5833 | var arg_$fields = "foo"; |
| 5834 | mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 5835 | var obj = new api.Usersettings.fromJson(json); |
| 5836 | checkUsersettings(obj); |
| 5837 | |
| 5838 | var path = (req.url).path; |
| 5839 | var pathOffset = 0; |
| 5840 | var index; |
| 5841 | var subPart; |
| 5842 | unittest.expect( |
| 5843 | path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 5844 | pathOffset += 1; |
| 5845 | unittest.expect(path.substring(pathOffset, pathOffset + 9), |
| 5846 | unittest.equals("books/v1/")); |
| 5847 | pathOffset += 9; |
| 5848 | unittest.expect(path.substring(pathOffset, pathOffset + 27), |
| 5849 | unittest.equals("myconfig/updateUserSettings")); |
| 5850 | pathOffset += 27; |
| 5851 | |
| 5852 | var query = (req.url).query; |
| 5853 | var queryOffset = 0; |
| 5854 | var queryMap = {}; |
| 5855 | addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 5856 | parseBool(n) { |
| 5857 | if (n == "true") return true; |
| 5858 | if (n == "false") return false; |
| 5859 | if (n == null) return null; |
| 5860 | throw new core.ArgumentError("Invalid boolean: $n"); |
| 5861 | } |
| 5862 | |
| 5863 | if (query.length > 0) { |
| 5864 | for (var part in query.split("&")) { |
| 5865 | var keyvalue = part.split("="); |
| 5866 | addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 5867 | core.Uri.decodeQueryComponent(keyvalue[1])); |
| 5868 | } |
| 5869 | } |
| 5870 | unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); |
| 5871 | |
| 5872 | var h = { |
| 5873 | "content-type": "application/json; charset=utf-8", |
| 5874 | }; |
| 5875 | var resp = convert.JSON.encode(buildUsersettings()); |
| 5876 | return new async.Future.value(stringResponse(200, h, resp)); |
| 5877 | }), true); |
| 5878 | res |
| 5879 | .updateUserSettings(arg_request, $fields: arg_$fields) |
| 5880 | .then(unittest.expectAsync1(((api.Usersettings response) { |
| 5881 | checkUsersettings(response); |
| 5882 | }))); |
| 5883 | }); |
| 5884 | }); |
| 5885 | |
| 5886 | unittest.group("resource-MylibraryAnnotationsResourceApi", () { |
| 5887 | unittest.test("method--delete", () { |
| 5888 | var mock = new HttpServerMock(); |
| 5889 | api.MylibraryAnnotationsResourceApi res = |
| 5890 | new api.BooksApi(mock).mylibrary.annotations; |
| 5891 | var arg_annotationId = "foo"; |
| 5892 | var arg_source = "foo"; |
| 5893 | var arg_$fields = "foo"; |
| 5894 | mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 5895 | var path = (req.url).path; |
| 5896 | var pathOffset = 0; |
| 5897 | var index; |
| 5898 | var subPart; |
| 5899 | unittest.expect( |
| 5900 | path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 5901 | pathOffset += 1; |
| 5902 | unittest.expect(path.substring(pathOffset, pathOffset + 9), |
| 5903 | unittest.equals("books/v1/")); |
| 5904 | pathOffset += 9; |
| 5905 | unittest.expect(path.substring(pathOffset, pathOffset + 22), |
| 5906 | unittest.equals("mylibrary/annotations/")); |
| 5907 | pathOffset += 22; |
| 5908 | subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| 5909 | pathOffset = path.length; |
| 5910 | unittest.expect(subPart, unittest.equals("$arg_annotationId")); |
| 5911 | |
| 5912 | var query = (req.url).query; |
| 5913 | var queryOffset = 0; |
| 5914 | var queryMap = {}; |
| 5915 | addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 5916 | parseBool(n) { |
| 5917 | if (n == "true") return true; |
| 5918 | if (n == "false") return false; |
| 5919 | if (n == null) return null; |
| 5920 | throw new core.ArgumentError("Invalid boolean: $n"); |
| 5921 | } |
| 5922 | |
| 5923 | if (query.length > 0) { |
| 5924 | for (var part in query.split("&")) { |
| 5925 | var keyvalue = part.split("="); |
| 5926 | addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 5927 | core.Uri.decodeQueryComponent(keyvalue[1])); |
| 5928 | } |
| 5929 | } |
| 5930 | unittest.expect(queryMap["source"].first, unittest.equals(arg_source)); |
| 5931 | unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); |
| 5932 | |
| 5933 | var h = { |
| 5934 | "content-type": "application/json; charset=utf-8", |
| 5935 | }; |
| 5936 | var resp = ""; |
| 5937 | return new async.Future.value(stringResponse(200, h, resp)); |
| 5938 | }), true); |
| 5939 | res |
| 5940 | .delete(arg_annotationId, source: arg_source, $fields: arg_$fields) |
| 5941 | .then(unittest.expectAsync1((_) {})); |
| 5942 | }); |
| 5943 | |
| 5944 | unittest.test("method--insert", () { |
| 5945 | var mock = new HttpServerMock(); |
| 5946 | api.MylibraryAnnotationsResourceApi res = |
| 5947 | new api.BooksApi(mock).mylibrary.annotations; |
| 5948 | var arg_request = buildAnnotation(); |
| 5949 | var arg_annotationId = "foo"; |
| 5950 | var arg_country = "foo"; |
| 5951 | var arg_showOnlySummaryInResponse = true; |
| 5952 | var arg_source = "foo"; |
| 5953 | var arg_$fields = "foo"; |
| 5954 | mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 5955 | var obj = new api.Annotation.fromJson(json); |
| 5956 | checkAnnotation(obj); |
| 5957 | |
| 5958 | var path = (req.url).path; |
| 5959 | var pathOffset = 0; |
| 5960 | var index; |
| 5961 | var subPart; |
| 5962 | unittest.expect( |
| 5963 | path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 5964 | pathOffset += 1; |
| 5965 | unittest.expect(path.substring(pathOffset, pathOffset + 9), |
| 5966 | unittest.equals("books/v1/")); |
| 5967 | pathOffset += 9; |
| 5968 | unittest.expect(path.substring(pathOffset, pathOffset + 21), |
| 5969 | unittest.equals("mylibrary/annotations")); |
| 5970 | pathOffset += 21; |
| 5971 | |
| 5972 | var query = (req.url).query; |
| 5973 | var queryOffset = 0; |
| 5974 | var queryMap = {}; |
| 5975 | addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 5976 | parseBool(n) { |
| 5977 | if (n == "true") return true; |
| 5978 | if (n == "false") return false; |
| 5979 | if (n == null) return null; |
| 5980 | throw new core.ArgumentError("Invalid boolean: $n"); |
| 5981 | } |
| 5982 | |
| 5983 | if (query.length > 0) { |
| 5984 | for (var part in query.split("&")) { |
| 5985 | var keyvalue = part.split("="); |
| 5986 | addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 5987 | core.Uri.decodeQueryComponent(keyvalue[1])); |
| 5988 | } |
| 5989 | } |
| 5990 | unittest.expect( |
| 5991 | queryMap["annotationId"].first, unittest.equals(arg_annotationId)); |
| 5992 | unittest.expect( |
| 5993 | queryMap["country"].first, unittest.equals(arg_country)); |
| 5994 | unittest.expect(queryMap["showOnlySummaryInResponse"].first, |
| 5995 | unittest.equals("$arg_showOnlySummaryInResponse")); |
| 5996 | unittest.expect(queryMap["source"].first, unittest.equals(arg_source)); |
| 5997 | unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); |
| 5998 | |
| 5999 | var h = { |
| 6000 | "content-type": "application/json; charset=utf-8", |
| 6001 | }; |
| 6002 | var resp = convert.JSON.encode(buildAnnotation()); |
| 6003 | return new async.Future.value(stringResponse(200, h, resp)); |
| 6004 | }), true); |
| 6005 | res |
| 6006 | .insert(arg_request, |
| 6007 | annotationId: arg_annotationId, |
| 6008 | country: arg_country, |
| 6009 | showOnlySummaryInResponse: arg_showOnlySummaryInResponse, |
| 6010 | source: arg_source, |
| 6011 | $fields: arg_$fields) |
| 6012 | .then(unittest.expectAsync1(((api.Annotation response) { |
| 6013 | checkAnnotation(response); |
| 6014 | }))); |
| 6015 | }); |
| 6016 | |
| 6017 | unittest.test("method--list", () { |
| 6018 | var mock = new HttpServerMock(); |
| 6019 | api.MylibraryAnnotationsResourceApi res = |
| 6020 | new api.BooksApi(mock).mylibrary.annotations; |
| 6021 | var arg_contentVersion = "foo"; |
| 6022 | var arg_layerId = "foo"; |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 6023 | var arg_layerIds = buildUnnamed1011(); |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 6024 | var arg_maxResults = 42; |
| 6025 | var arg_pageToken = "foo"; |
| 6026 | var arg_showDeleted = true; |
| 6027 | var arg_source = "foo"; |
| 6028 | var arg_updatedMax = "foo"; |
| 6029 | var arg_updatedMin = "foo"; |
| 6030 | var arg_volumeId = "foo"; |
| 6031 | var arg_$fields = "foo"; |
| 6032 | mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 6033 | var path = (req.url).path; |
| 6034 | var pathOffset = 0; |
| 6035 | var index; |
| 6036 | var subPart; |
| 6037 | unittest.expect( |
| 6038 | path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 6039 | pathOffset += 1; |
| 6040 | unittest.expect(path.substring(pathOffset, pathOffset + 9), |
| 6041 | unittest.equals("books/v1/")); |
| 6042 | pathOffset += 9; |
| 6043 | unittest.expect(path.substring(pathOffset, pathOffset + 21), |
| 6044 | unittest.equals("mylibrary/annotations")); |
| 6045 | pathOffset += 21; |
| 6046 | |
| 6047 | var query = (req.url).query; |
| 6048 | var queryOffset = 0; |
| 6049 | var queryMap = {}; |
| 6050 | addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 6051 | parseBool(n) { |
| 6052 | if (n == "true") return true; |
| 6053 | if (n == "false") return false; |
| 6054 | if (n == null) return null; |
| 6055 | throw new core.ArgumentError("Invalid boolean: $n"); |
| 6056 | } |
| 6057 | |
| 6058 | if (query.length > 0) { |
| 6059 | for (var part in query.split("&")) { |
| 6060 | var keyvalue = part.split("="); |
| 6061 | addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 6062 | core.Uri.decodeQueryComponent(keyvalue[1])); |
| 6063 | } |
| 6064 | } |
| 6065 | unittest.expect(queryMap["contentVersion"].first, |
| 6066 | unittest.equals(arg_contentVersion)); |
| 6067 | unittest.expect( |
| 6068 | queryMap["layerId"].first, unittest.equals(arg_layerId)); |
| 6069 | unittest.expect(queryMap["layerIds"], unittest.equals(arg_layerIds)); |
| 6070 | unittest.expect(core.int.parse(queryMap["maxResults"].first), |
| 6071 | unittest.equals(arg_maxResults)); |
| 6072 | unittest.expect( |
| 6073 | queryMap["pageToken"].first, unittest.equals(arg_pageToken)); |
| 6074 | unittest.expect( |
| 6075 | queryMap["showDeleted"].first, unittest.equals("$arg_showDeleted")); |
| 6076 | unittest.expect(queryMap["source"].first, unittest.equals(arg_source)); |
| 6077 | unittest.expect( |
| 6078 | queryMap["updatedMax"].first, unittest.equals(arg_updatedMax)); |
| 6079 | unittest.expect( |
| 6080 | queryMap["updatedMin"].first, unittest.equals(arg_updatedMin)); |
| 6081 | unittest.expect( |
| 6082 | queryMap["volumeId"].first, unittest.equals(arg_volumeId)); |
| 6083 | unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); |
| 6084 | |
| 6085 | var h = { |
| 6086 | "content-type": "application/json; charset=utf-8", |
| 6087 | }; |
| 6088 | var resp = convert.JSON.encode(buildAnnotations()); |
| 6089 | return new async.Future.value(stringResponse(200, h, resp)); |
| 6090 | }), true); |
| 6091 | res |
| 6092 | .list( |
| 6093 | contentVersion: arg_contentVersion, |
| 6094 | layerId: arg_layerId, |
| 6095 | layerIds: arg_layerIds, |
| 6096 | maxResults: arg_maxResults, |
| 6097 | pageToken: arg_pageToken, |
| 6098 | showDeleted: arg_showDeleted, |
| 6099 | source: arg_source, |
| 6100 | updatedMax: arg_updatedMax, |
| 6101 | updatedMin: arg_updatedMin, |
| 6102 | volumeId: arg_volumeId, |
| 6103 | $fields: arg_$fields) |
| 6104 | .then(unittest.expectAsync1(((api.Annotations response) { |
| 6105 | checkAnnotations(response); |
| 6106 | }))); |
| 6107 | }); |
| 6108 | |
| 6109 | unittest.test("method--summary", () { |
| 6110 | var mock = new HttpServerMock(); |
| 6111 | api.MylibraryAnnotationsResourceApi res = |
| 6112 | new api.BooksApi(mock).mylibrary.annotations; |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 6113 | var arg_layerIds = buildUnnamed1012(); |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 6114 | var arg_volumeId = "foo"; |
| 6115 | var arg_$fields = "foo"; |
| 6116 | mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 6117 | var path = (req.url).path; |
| 6118 | var pathOffset = 0; |
| 6119 | var index; |
| 6120 | var subPart; |
| 6121 | unittest.expect( |
| 6122 | path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 6123 | pathOffset += 1; |
| 6124 | unittest.expect(path.substring(pathOffset, pathOffset + 9), |
| 6125 | unittest.equals("books/v1/")); |
| 6126 | pathOffset += 9; |
| 6127 | unittest.expect(path.substring(pathOffset, pathOffset + 29), |
| 6128 | unittest.equals("mylibrary/annotations/summary")); |
| 6129 | pathOffset += 29; |
| 6130 | |
| 6131 | var query = (req.url).query; |
| 6132 | var queryOffset = 0; |
| 6133 | var queryMap = {}; |
| 6134 | addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 6135 | parseBool(n) { |
| 6136 | if (n == "true") return true; |
| 6137 | if (n == "false") return false; |
| 6138 | if (n == null) return null; |
| 6139 | throw new core.ArgumentError("Invalid boolean: $n"); |
| 6140 | } |
| 6141 | |
| 6142 | if (query.length > 0) { |
| 6143 | for (var part in query.split("&")) { |
| 6144 | var keyvalue = part.split("="); |
| 6145 | addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 6146 | core.Uri.decodeQueryComponent(keyvalue[1])); |
| 6147 | } |
| 6148 | } |
| 6149 | unittest.expect(queryMap["layerIds"], unittest.equals(arg_layerIds)); |
| 6150 | unittest.expect( |
| 6151 | queryMap["volumeId"].first, unittest.equals(arg_volumeId)); |
| 6152 | unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); |
| 6153 | |
| 6154 | var h = { |
| 6155 | "content-type": "application/json; charset=utf-8", |
| 6156 | }; |
| 6157 | var resp = convert.JSON.encode(buildAnnotationsSummary()); |
| 6158 | return new async.Future.value(stringResponse(200, h, resp)); |
| 6159 | }), true); |
| 6160 | res |
| 6161 | .summary(arg_layerIds, arg_volumeId, $fields: arg_$fields) |
| 6162 | .then(unittest.expectAsync1(((api.AnnotationsSummary response) { |
| 6163 | checkAnnotationsSummary(response); |
| 6164 | }))); |
| 6165 | }); |
| 6166 | |
| 6167 | unittest.test("method--update", () { |
| 6168 | var mock = new HttpServerMock(); |
| 6169 | api.MylibraryAnnotationsResourceApi res = |
| 6170 | new api.BooksApi(mock).mylibrary.annotations; |
| 6171 | var arg_request = buildAnnotation(); |
| 6172 | var arg_annotationId = "foo"; |
| 6173 | var arg_source = "foo"; |
| 6174 | var arg_$fields = "foo"; |
| 6175 | mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 6176 | var obj = new api.Annotation.fromJson(json); |
| 6177 | checkAnnotation(obj); |
| 6178 | |
| 6179 | var path = (req.url).path; |
| 6180 | var pathOffset = 0; |
| 6181 | var index; |
| 6182 | var subPart; |
| 6183 | unittest.expect( |
| 6184 | path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 6185 | pathOffset += 1; |
| 6186 | unittest.expect(path.substring(pathOffset, pathOffset + 9), |
| 6187 | unittest.equals("books/v1/")); |
| 6188 | pathOffset += 9; |
| 6189 | unittest.expect(path.substring(pathOffset, pathOffset + 22), |
| 6190 | unittest.equals("mylibrary/annotations/")); |
| 6191 | pathOffset += 22; |
| 6192 | subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| 6193 | pathOffset = path.length; |
| 6194 | unittest.expect(subPart, unittest.equals("$arg_annotationId")); |
| 6195 | |
| 6196 | var query = (req.url).query; |
| 6197 | var queryOffset = 0; |
| 6198 | var queryMap = {}; |
| 6199 | addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 6200 | parseBool(n) { |
| 6201 | if (n == "true") return true; |
| 6202 | if (n == "false") return false; |
| 6203 | if (n == null) return null; |
| 6204 | throw new core.ArgumentError("Invalid boolean: $n"); |
| 6205 | } |
| 6206 | |
| 6207 | if (query.length > 0) { |
| 6208 | for (var part in query.split("&")) { |
| 6209 | var keyvalue = part.split("="); |
| 6210 | addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 6211 | core.Uri.decodeQueryComponent(keyvalue[1])); |
| 6212 | } |
| 6213 | } |
| 6214 | unittest.expect(queryMap["source"].first, unittest.equals(arg_source)); |
| 6215 | unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); |
| 6216 | |
| 6217 | var h = { |
| 6218 | "content-type": "application/json; charset=utf-8", |
| 6219 | }; |
| 6220 | var resp = convert.JSON.encode(buildAnnotation()); |
| 6221 | return new async.Future.value(stringResponse(200, h, resp)); |
| 6222 | }), true); |
| 6223 | res |
| 6224 | .update(arg_request, arg_annotationId, |
| 6225 | source: arg_source, $fields: arg_$fields) |
| 6226 | .then(unittest.expectAsync1(((api.Annotation response) { |
| 6227 | checkAnnotation(response); |
| 6228 | }))); |
| 6229 | }); |
| 6230 | }); |
| 6231 | |
| 6232 | unittest.group("resource-MylibraryBookshelvesResourceApi", () { |
| 6233 | unittest.test("method--addVolume", () { |
| 6234 | var mock = new HttpServerMock(); |
| 6235 | api.MylibraryBookshelvesResourceApi res = |
| 6236 | new api.BooksApi(mock).mylibrary.bookshelves; |
| 6237 | var arg_shelf = "foo"; |
| 6238 | var arg_volumeId = "foo"; |
| 6239 | var arg_reason = "foo"; |
| 6240 | var arg_source = "foo"; |
| 6241 | var arg_$fields = "foo"; |
| 6242 | mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 6243 | var path = (req.url).path; |
| 6244 | var pathOffset = 0; |
| 6245 | var index; |
| 6246 | var subPart; |
| 6247 | unittest.expect( |
| 6248 | path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 6249 | pathOffset += 1; |
| 6250 | unittest.expect(path.substring(pathOffset, pathOffset + 9), |
| 6251 | unittest.equals("books/v1/")); |
| 6252 | pathOffset += 9; |
| 6253 | unittest.expect(path.substring(pathOffset, pathOffset + 22), |
| 6254 | unittest.equals("mylibrary/bookshelves/")); |
| 6255 | pathOffset += 22; |
| 6256 | index = path.indexOf("/addVolume", pathOffset); |
| 6257 | unittest.expect(index >= 0, unittest.isTrue); |
| 6258 | subPart = |
| 6259 | core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 6260 | pathOffset = index; |
| 6261 | unittest.expect(subPart, unittest.equals("$arg_shelf")); |
| 6262 | unittest.expect(path.substring(pathOffset, pathOffset + 10), |
| 6263 | unittest.equals("/addVolume")); |
| 6264 | pathOffset += 10; |
| 6265 | |
| 6266 | var query = (req.url).query; |
| 6267 | var queryOffset = 0; |
| 6268 | var queryMap = {}; |
| 6269 | addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 6270 | parseBool(n) { |
| 6271 | if (n == "true") return true; |
| 6272 | if (n == "false") return false; |
| 6273 | if (n == null) return null; |
| 6274 | throw new core.ArgumentError("Invalid boolean: $n"); |
| 6275 | } |
| 6276 | |
| 6277 | if (query.length > 0) { |
| 6278 | for (var part in query.split("&")) { |
| 6279 | var keyvalue = part.split("="); |
| 6280 | addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 6281 | core.Uri.decodeQueryComponent(keyvalue[1])); |
| 6282 | } |
| 6283 | } |
| 6284 | unittest.expect( |
| 6285 | queryMap["volumeId"].first, unittest.equals(arg_volumeId)); |
| 6286 | unittest.expect(queryMap["reason"].first, unittest.equals(arg_reason)); |
| 6287 | unittest.expect(queryMap["source"].first, unittest.equals(arg_source)); |
| 6288 | unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); |
| 6289 | |
| 6290 | var h = { |
| 6291 | "content-type": "application/json; charset=utf-8", |
| 6292 | }; |
| 6293 | var resp = ""; |
| 6294 | return new async.Future.value(stringResponse(200, h, resp)); |
| 6295 | }), true); |
| 6296 | res |
| 6297 | .addVolume(arg_shelf, arg_volumeId, |
| 6298 | reason: arg_reason, source: arg_source, $fields: arg_$fields) |
| 6299 | .then(unittest.expectAsync1((_) {})); |
| 6300 | }); |
| 6301 | |
| 6302 | unittest.test("method--clearVolumes", () { |
| 6303 | var mock = new HttpServerMock(); |
| 6304 | api.MylibraryBookshelvesResourceApi res = |
| 6305 | new api.BooksApi(mock).mylibrary.bookshelves; |
| 6306 | var arg_shelf = "foo"; |
| 6307 | var arg_source = "foo"; |
| 6308 | var arg_$fields = "foo"; |
| 6309 | mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 6310 | var path = (req.url).path; |
| 6311 | var pathOffset = 0; |
| 6312 | var index; |
| 6313 | var subPart; |
| 6314 | unittest.expect( |
| 6315 | path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 6316 | pathOffset += 1; |
| 6317 | unittest.expect(path.substring(pathOffset, pathOffset + 9), |
| 6318 | unittest.equals("books/v1/")); |
| 6319 | pathOffset += 9; |
| 6320 | unittest.expect(path.substring(pathOffset, pathOffset + 22), |
| 6321 | unittest.equals("mylibrary/bookshelves/")); |
| 6322 | pathOffset += 22; |
| 6323 | index = path.indexOf("/clearVolumes", pathOffset); |
| 6324 | unittest.expect(index >= 0, unittest.isTrue); |
| 6325 | subPart = |
| 6326 | core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 6327 | pathOffset = index; |
| 6328 | unittest.expect(subPart, unittest.equals("$arg_shelf")); |
| 6329 | unittest.expect(path.substring(pathOffset, pathOffset + 13), |
| 6330 | unittest.equals("/clearVolumes")); |
| 6331 | pathOffset += 13; |
| 6332 | |
| 6333 | var query = (req.url).query; |
| 6334 | var queryOffset = 0; |
| 6335 | var queryMap = {}; |
| 6336 | addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 6337 | parseBool(n) { |
| 6338 | if (n == "true") return true; |
| 6339 | if (n == "false") return false; |
| 6340 | if (n == null) return null; |
| 6341 | throw new core.ArgumentError("Invalid boolean: $n"); |
| 6342 | } |
| 6343 | |
| 6344 | if (query.length > 0) { |
| 6345 | for (var part in query.split("&")) { |
| 6346 | var keyvalue = part.split("="); |
| 6347 | addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 6348 | core.Uri.decodeQueryComponent(keyvalue[1])); |
| 6349 | } |
| 6350 | } |
| 6351 | unittest.expect(queryMap["source"].first, unittest.equals(arg_source)); |
| 6352 | unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); |
| 6353 | |
| 6354 | var h = { |
| 6355 | "content-type": "application/json; charset=utf-8", |
| 6356 | }; |
| 6357 | var resp = ""; |
| 6358 | return new async.Future.value(stringResponse(200, h, resp)); |
| 6359 | }), true); |
| 6360 | res |
| 6361 | .clearVolumes(arg_shelf, source: arg_source, $fields: arg_$fields) |
| 6362 | .then(unittest.expectAsync1((_) {})); |
| 6363 | }); |
| 6364 | |
| 6365 | unittest.test("method--get", () { |
| 6366 | var mock = new HttpServerMock(); |
| 6367 | api.MylibraryBookshelvesResourceApi res = |
| 6368 | new api.BooksApi(mock).mylibrary.bookshelves; |
| 6369 | var arg_shelf = "foo"; |
| 6370 | var arg_source = "foo"; |
| 6371 | var arg_$fields = "foo"; |
| 6372 | mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 6373 | var path = (req.url).path; |
| 6374 | var pathOffset = 0; |
| 6375 | var index; |
| 6376 | var subPart; |
| 6377 | unittest.expect( |
| 6378 | path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 6379 | pathOffset += 1; |
| 6380 | unittest.expect(path.substring(pathOffset, pathOffset + 9), |
| 6381 | unittest.equals("books/v1/")); |
| 6382 | pathOffset += 9; |
| 6383 | unittest.expect(path.substring(pathOffset, pathOffset + 22), |
| 6384 | unittest.equals("mylibrary/bookshelves/")); |
| 6385 | pathOffset += 22; |
| 6386 | subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| 6387 | pathOffset = path.length; |
| 6388 | unittest.expect(subPart, unittest.equals("$arg_shelf")); |
| 6389 | |
| 6390 | var query = (req.url).query; |
| 6391 | var queryOffset = 0; |
| 6392 | var queryMap = {}; |
| 6393 | addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 6394 | parseBool(n) { |
| 6395 | if (n == "true") return true; |
| 6396 | if (n == "false") return false; |
| 6397 | if (n == null) return null; |
| 6398 | throw new core.ArgumentError("Invalid boolean: $n"); |
| 6399 | } |
| 6400 | |
| 6401 | if (query.length > 0) { |
| 6402 | for (var part in query.split("&")) { |
| 6403 | var keyvalue = part.split("="); |
| 6404 | addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 6405 | core.Uri.decodeQueryComponent(keyvalue[1])); |
| 6406 | } |
| 6407 | } |
| 6408 | unittest.expect(queryMap["source"].first, unittest.equals(arg_source)); |
| 6409 | unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); |
| 6410 | |
| 6411 | var h = { |
| 6412 | "content-type": "application/json; charset=utf-8", |
| 6413 | }; |
| 6414 | var resp = convert.JSON.encode(buildBookshelf()); |
| 6415 | return new async.Future.value(stringResponse(200, h, resp)); |
| 6416 | }), true); |
| 6417 | res |
| 6418 | .get(arg_shelf, source: arg_source, $fields: arg_$fields) |
| 6419 | .then(unittest.expectAsync1(((api.Bookshelf response) { |
| 6420 | checkBookshelf(response); |
| 6421 | }))); |
| 6422 | }); |
| 6423 | |
| 6424 | unittest.test("method--list", () { |
| 6425 | var mock = new HttpServerMock(); |
| 6426 | api.MylibraryBookshelvesResourceApi res = |
| 6427 | new api.BooksApi(mock).mylibrary.bookshelves; |
| 6428 | var arg_source = "foo"; |
| 6429 | var arg_$fields = "foo"; |
| 6430 | mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 6431 | var path = (req.url).path; |
| 6432 | var pathOffset = 0; |
| 6433 | var index; |
| 6434 | var subPart; |
| 6435 | unittest.expect( |
| 6436 | path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 6437 | pathOffset += 1; |
| 6438 | unittest.expect(path.substring(pathOffset, pathOffset + 9), |
| 6439 | unittest.equals("books/v1/")); |
| 6440 | pathOffset += 9; |
| 6441 | unittest.expect(path.substring(pathOffset, pathOffset + 21), |
| 6442 | unittest.equals("mylibrary/bookshelves")); |
| 6443 | pathOffset += 21; |
| 6444 | |
| 6445 | var query = (req.url).query; |
| 6446 | var queryOffset = 0; |
| 6447 | var queryMap = {}; |
| 6448 | addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 6449 | parseBool(n) { |
| 6450 | if (n == "true") return true; |
| 6451 | if (n == "false") return false; |
| 6452 | if (n == null) return null; |
| 6453 | throw new core.ArgumentError("Invalid boolean: $n"); |
| 6454 | } |
| 6455 | |
| 6456 | if (query.length > 0) { |
| 6457 | for (var part in query.split("&")) { |
| 6458 | var keyvalue = part.split("="); |
| 6459 | addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 6460 | core.Uri.decodeQueryComponent(keyvalue[1])); |
| 6461 | } |
| 6462 | } |
| 6463 | unittest.expect(queryMap["source"].first, unittest.equals(arg_source)); |
| 6464 | unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); |
| 6465 | |
| 6466 | var h = { |
| 6467 | "content-type": "application/json; charset=utf-8", |
| 6468 | }; |
| 6469 | var resp = convert.JSON.encode(buildBookshelves()); |
| 6470 | return new async.Future.value(stringResponse(200, h, resp)); |
| 6471 | }), true); |
| 6472 | res |
| 6473 | .list(source: arg_source, $fields: arg_$fields) |
| 6474 | .then(unittest.expectAsync1(((api.Bookshelves response) { |
| 6475 | checkBookshelves(response); |
| 6476 | }))); |
| 6477 | }); |
| 6478 | |
| 6479 | unittest.test("method--moveVolume", () { |
| 6480 | var mock = new HttpServerMock(); |
| 6481 | api.MylibraryBookshelvesResourceApi res = |
| 6482 | new api.BooksApi(mock).mylibrary.bookshelves; |
| 6483 | var arg_shelf = "foo"; |
| 6484 | var arg_volumeId = "foo"; |
| 6485 | var arg_volumePosition = 42; |
| 6486 | var arg_source = "foo"; |
| 6487 | var arg_$fields = "foo"; |
| 6488 | mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 6489 | var path = (req.url).path; |
| 6490 | var pathOffset = 0; |
| 6491 | var index; |
| 6492 | var subPart; |
| 6493 | unittest.expect( |
| 6494 | path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 6495 | pathOffset += 1; |
| 6496 | unittest.expect(path.substring(pathOffset, pathOffset + 9), |
| 6497 | unittest.equals("books/v1/")); |
| 6498 | pathOffset += 9; |
| 6499 | unittest.expect(path.substring(pathOffset, pathOffset + 22), |
| 6500 | unittest.equals("mylibrary/bookshelves/")); |
| 6501 | pathOffset += 22; |
| 6502 | index = path.indexOf("/moveVolume", pathOffset); |
| 6503 | unittest.expect(index >= 0, unittest.isTrue); |
| 6504 | subPart = |
| 6505 | core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 6506 | pathOffset = index; |
| 6507 | unittest.expect(subPart, unittest.equals("$arg_shelf")); |
| 6508 | unittest.expect(path.substring(pathOffset, pathOffset + 11), |
| 6509 | unittest.equals("/moveVolume")); |
| 6510 | pathOffset += 11; |
| 6511 | |
| 6512 | var query = (req.url).query; |
| 6513 | var queryOffset = 0; |
| 6514 | var queryMap = {}; |
| 6515 | addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 6516 | parseBool(n) { |
| 6517 | if (n == "true") return true; |
| 6518 | if (n == "false") return false; |
| 6519 | if (n == null) return null; |
| 6520 | throw new core.ArgumentError("Invalid boolean: $n"); |
| 6521 | } |
| 6522 | |
| 6523 | if (query.length > 0) { |
| 6524 | for (var part in query.split("&")) { |
| 6525 | var keyvalue = part.split("="); |
| 6526 | addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 6527 | core.Uri.decodeQueryComponent(keyvalue[1])); |
| 6528 | } |
| 6529 | } |
| 6530 | unittest.expect( |
| 6531 | queryMap["volumeId"].first, unittest.equals(arg_volumeId)); |
| 6532 | unittest.expect(core.int.parse(queryMap["volumePosition"].first), |
| 6533 | unittest.equals(arg_volumePosition)); |
| 6534 | unittest.expect(queryMap["source"].first, unittest.equals(arg_source)); |
| 6535 | unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); |
| 6536 | |
| 6537 | var h = { |
| 6538 | "content-type": "application/json; charset=utf-8", |
| 6539 | }; |
| 6540 | var resp = ""; |
| 6541 | return new async.Future.value(stringResponse(200, h, resp)); |
| 6542 | }), true); |
| 6543 | res |
| 6544 | .moveVolume(arg_shelf, arg_volumeId, arg_volumePosition, |
| 6545 | source: arg_source, $fields: arg_$fields) |
| 6546 | .then(unittest.expectAsync1((_) {})); |
| 6547 | }); |
| 6548 | |
| 6549 | unittest.test("method--removeVolume", () { |
| 6550 | var mock = new HttpServerMock(); |
| 6551 | api.MylibraryBookshelvesResourceApi res = |
| 6552 | new api.BooksApi(mock).mylibrary.bookshelves; |
| 6553 | var arg_shelf = "foo"; |
| 6554 | var arg_volumeId = "foo"; |
| 6555 | var arg_reason = "foo"; |
| 6556 | var arg_source = "foo"; |
| 6557 | var arg_$fields = "foo"; |
| 6558 | mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 6559 | var path = (req.url).path; |
| 6560 | var pathOffset = 0; |
| 6561 | var index; |
| 6562 | var subPart; |
| 6563 | unittest.expect( |
| 6564 | path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 6565 | pathOffset += 1; |
| 6566 | unittest.expect(path.substring(pathOffset, pathOffset + 9), |
| 6567 | unittest.equals("books/v1/")); |
| 6568 | pathOffset += 9; |
| 6569 | unittest.expect(path.substring(pathOffset, pathOffset + 22), |
| 6570 | unittest.equals("mylibrary/bookshelves/")); |
| 6571 | pathOffset += 22; |
| 6572 | index = path.indexOf("/removeVolume", pathOffset); |
| 6573 | unittest.expect(index >= 0, unittest.isTrue); |
| 6574 | subPart = |
| 6575 | core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 6576 | pathOffset = index; |
| 6577 | unittest.expect(subPart, unittest.equals("$arg_shelf")); |
| 6578 | unittest.expect(path.substring(pathOffset, pathOffset + 13), |
| 6579 | unittest.equals("/removeVolume")); |
| 6580 | pathOffset += 13; |
| 6581 | |
| 6582 | var query = (req.url).query; |
| 6583 | var queryOffset = 0; |
| 6584 | var queryMap = {}; |
| 6585 | addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 6586 | parseBool(n) { |
| 6587 | if (n == "true") return true; |
| 6588 | if (n == "false") return false; |
| 6589 | if (n == null) return null; |
| 6590 | throw new core.ArgumentError("Invalid boolean: $n"); |
| 6591 | } |
| 6592 | |
| 6593 | if (query.length > 0) { |
| 6594 | for (var part in query.split("&")) { |
| 6595 | var keyvalue = part.split("="); |
| 6596 | addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 6597 | core.Uri.decodeQueryComponent(keyvalue[1])); |
| 6598 | } |
| 6599 | } |
| 6600 | unittest.expect( |
| 6601 | queryMap["volumeId"].first, unittest.equals(arg_volumeId)); |
| 6602 | unittest.expect(queryMap["reason"].first, unittest.equals(arg_reason)); |
| 6603 | unittest.expect(queryMap["source"].first, unittest.equals(arg_source)); |
| 6604 | unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); |
| 6605 | |
| 6606 | var h = { |
| 6607 | "content-type": "application/json; charset=utf-8", |
| 6608 | }; |
| 6609 | var resp = ""; |
| 6610 | return new async.Future.value(stringResponse(200, h, resp)); |
| 6611 | }), true); |
| 6612 | res |
| 6613 | .removeVolume(arg_shelf, arg_volumeId, |
| 6614 | reason: arg_reason, source: arg_source, $fields: arg_$fields) |
| 6615 | .then(unittest.expectAsync1((_) {})); |
| 6616 | }); |
| 6617 | }); |
| 6618 | |
| 6619 | unittest.group("resource-MylibraryBookshelvesVolumesResourceApi", () { |
| 6620 | unittest.test("method--list", () { |
| 6621 | var mock = new HttpServerMock(); |
| 6622 | api.MylibraryBookshelvesVolumesResourceApi res = |
| 6623 | new api.BooksApi(mock).mylibrary.bookshelves.volumes; |
| 6624 | var arg_shelf = "foo"; |
| 6625 | var arg_country = "foo"; |
| 6626 | var arg_maxResults = 42; |
| 6627 | var arg_projection = "foo"; |
| 6628 | var arg_q = "foo"; |
| 6629 | var arg_showPreorders = true; |
| 6630 | var arg_source = "foo"; |
| 6631 | var arg_startIndex = 42; |
| 6632 | var arg_$fields = "foo"; |
| 6633 | mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 6634 | var path = (req.url).path; |
| 6635 | var pathOffset = 0; |
| 6636 | var index; |
| 6637 | var subPart; |
| 6638 | unittest.expect( |
| 6639 | path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 6640 | pathOffset += 1; |
| 6641 | unittest.expect(path.substring(pathOffset, pathOffset + 9), |
| 6642 | unittest.equals("books/v1/")); |
| 6643 | pathOffset += 9; |
| 6644 | unittest.expect(path.substring(pathOffset, pathOffset + 22), |
| 6645 | unittest.equals("mylibrary/bookshelves/")); |
| 6646 | pathOffset += 22; |
| 6647 | index = path.indexOf("/volumes", pathOffset); |
| 6648 | unittest.expect(index >= 0, unittest.isTrue); |
| 6649 | subPart = |
| 6650 | core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 6651 | pathOffset = index; |
| 6652 | unittest.expect(subPart, unittest.equals("$arg_shelf")); |
| 6653 | unittest.expect(path.substring(pathOffset, pathOffset + 8), |
| 6654 | unittest.equals("/volumes")); |
| 6655 | pathOffset += 8; |
| 6656 | |
| 6657 | var query = (req.url).query; |
| 6658 | var queryOffset = 0; |
| 6659 | var queryMap = {}; |
| 6660 | addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 6661 | parseBool(n) { |
| 6662 | if (n == "true") return true; |
| 6663 | if (n == "false") return false; |
| 6664 | if (n == null) return null; |
| 6665 | throw new core.ArgumentError("Invalid boolean: $n"); |
| 6666 | } |
| 6667 | |
| 6668 | if (query.length > 0) { |
| 6669 | for (var part in query.split("&")) { |
| 6670 | var keyvalue = part.split("="); |
| 6671 | addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 6672 | core.Uri.decodeQueryComponent(keyvalue[1])); |
| 6673 | } |
| 6674 | } |
| 6675 | unittest.expect( |
| 6676 | queryMap["country"].first, unittest.equals(arg_country)); |
| 6677 | unittest.expect(core.int.parse(queryMap["maxResults"].first), |
| 6678 | unittest.equals(arg_maxResults)); |
| 6679 | unittest.expect( |
| 6680 | queryMap["projection"].first, unittest.equals(arg_projection)); |
| 6681 | unittest.expect(queryMap["q"].first, unittest.equals(arg_q)); |
| 6682 | unittest.expect(queryMap["showPreorders"].first, |
| 6683 | unittest.equals("$arg_showPreorders")); |
| 6684 | unittest.expect(queryMap["source"].first, unittest.equals(arg_source)); |
| 6685 | unittest.expect(core.int.parse(queryMap["startIndex"].first), |
| 6686 | unittest.equals(arg_startIndex)); |
| 6687 | unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); |
| 6688 | |
| 6689 | var h = { |
| 6690 | "content-type": "application/json; charset=utf-8", |
| 6691 | }; |
| 6692 | var resp = convert.JSON.encode(buildVolumes()); |
| 6693 | return new async.Future.value(stringResponse(200, h, resp)); |
| 6694 | }), true); |
| 6695 | res |
| 6696 | .list(arg_shelf, |
| 6697 | country: arg_country, |
| 6698 | maxResults: arg_maxResults, |
| 6699 | projection: arg_projection, |
| 6700 | q: arg_q, |
| 6701 | showPreorders: arg_showPreorders, |
| 6702 | source: arg_source, |
| 6703 | startIndex: arg_startIndex, |
| 6704 | $fields: arg_$fields) |
| 6705 | .then(unittest.expectAsync1(((api.Volumes response) { |
| 6706 | checkVolumes(response); |
| 6707 | }))); |
| 6708 | }); |
| 6709 | }); |
| 6710 | |
| 6711 | unittest.group("resource-MylibraryReadingpositionsResourceApi", () { |
| 6712 | unittest.test("method--get", () { |
| 6713 | var mock = new HttpServerMock(); |
| 6714 | api.MylibraryReadingpositionsResourceApi res = |
| 6715 | new api.BooksApi(mock).mylibrary.readingpositions; |
| 6716 | var arg_volumeId = "foo"; |
| 6717 | var arg_contentVersion = "foo"; |
| 6718 | var arg_source = "foo"; |
| 6719 | var arg_$fields = "foo"; |
| 6720 | mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 6721 | var path = (req.url).path; |
| 6722 | var pathOffset = 0; |
| 6723 | var index; |
| 6724 | var subPart; |
| 6725 | unittest.expect( |
| 6726 | path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 6727 | pathOffset += 1; |
| 6728 | unittest.expect(path.substring(pathOffset, pathOffset + 9), |
| 6729 | unittest.equals("books/v1/")); |
| 6730 | pathOffset += 9; |
| 6731 | unittest.expect(path.substring(pathOffset, pathOffset + 27), |
| 6732 | unittest.equals("mylibrary/readingpositions/")); |
| 6733 | pathOffset += 27; |
| 6734 | subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| 6735 | pathOffset = path.length; |
| 6736 | unittest.expect(subPart, unittest.equals("$arg_volumeId")); |
| 6737 | |
| 6738 | var query = (req.url).query; |
| 6739 | var queryOffset = 0; |
| 6740 | var queryMap = {}; |
| 6741 | addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 6742 | parseBool(n) { |
| 6743 | if (n == "true") return true; |
| 6744 | if (n == "false") return false; |
| 6745 | if (n == null) return null; |
| 6746 | throw new core.ArgumentError("Invalid boolean: $n"); |
| 6747 | } |
| 6748 | |
| 6749 | if (query.length > 0) { |
| 6750 | for (var part in query.split("&")) { |
| 6751 | var keyvalue = part.split("="); |
| 6752 | addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 6753 | core.Uri.decodeQueryComponent(keyvalue[1])); |
| 6754 | } |
| 6755 | } |
| 6756 | unittest.expect(queryMap["contentVersion"].first, |
| 6757 | unittest.equals(arg_contentVersion)); |
| 6758 | unittest.expect(queryMap["source"].first, unittest.equals(arg_source)); |
| 6759 | unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); |
| 6760 | |
| 6761 | var h = { |
| 6762 | "content-type": "application/json; charset=utf-8", |
| 6763 | }; |
| 6764 | var resp = convert.JSON.encode(buildReadingPosition()); |
| 6765 | return new async.Future.value(stringResponse(200, h, resp)); |
| 6766 | }), true); |
| 6767 | res |
| 6768 | .get(arg_volumeId, |
| 6769 | contentVersion: arg_contentVersion, |
| 6770 | source: arg_source, |
| 6771 | $fields: arg_$fields) |
| 6772 | .then(unittest.expectAsync1(((api.ReadingPosition response) { |
| 6773 | checkReadingPosition(response); |
| 6774 | }))); |
| 6775 | }); |
| 6776 | |
| 6777 | unittest.test("method--setPosition", () { |
| 6778 | var mock = new HttpServerMock(); |
| 6779 | api.MylibraryReadingpositionsResourceApi res = |
| 6780 | new api.BooksApi(mock).mylibrary.readingpositions; |
| 6781 | var arg_volumeId = "foo"; |
| 6782 | var arg_timestamp = "foo"; |
| 6783 | var arg_position = "foo"; |
| 6784 | var arg_action = "foo"; |
| 6785 | var arg_contentVersion = "foo"; |
| 6786 | var arg_deviceCookie = "foo"; |
| 6787 | var arg_source = "foo"; |
| 6788 | var arg_$fields = "foo"; |
| 6789 | mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 6790 | var path = (req.url).path; |
| 6791 | var pathOffset = 0; |
| 6792 | var index; |
| 6793 | var subPart; |
| 6794 | unittest.expect( |
| 6795 | path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 6796 | pathOffset += 1; |
| 6797 | unittest.expect(path.substring(pathOffset, pathOffset + 9), |
| 6798 | unittest.equals("books/v1/")); |
| 6799 | pathOffset += 9; |
| 6800 | unittest.expect(path.substring(pathOffset, pathOffset + 27), |
| 6801 | unittest.equals("mylibrary/readingpositions/")); |
| 6802 | pathOffset += 27; |
| 6803 | index = path.indexOf("/setPosition", pathOffset); |
| 6804 | unittest.expect(index >= 0, unittest.isTrue); |
| 6805 | subPart = |
| 6806 | core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 6807 | pathOffset = index; |
| 6808 | unittest.expect(subPart, unittest.equals("$arg_volumeId")); |
| 6809 | unittest.expect(path.substring(pathOffset, pathOffset + 12), |
| 6810 | unittest.equals("/setPosition")); |
| 6811 | pathOffset += 12; |
| 6812 | |
| 6813 | var query = (req.url).query; |
| 6814 | var queryOffset = 0; |
| 6815 | var queryMap = {}; |
| 6816 | addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 6817 | parseBool(n) { |
| 6818 | if (n == "true") return true; |
| 6819 | if (n == "false") return false; |
| 6820 | if (n == null) return null; |
| 6821 | throw new core.ArgumentError("Invalid boolean: $n"); |
| 6822 | } |
| 6823 | |
| 6824 | if (query.length > 0) { |
| 6825 | for (var part in query.split("&")) { |
| 6826 | var keyvalue = part.split("="); |
| 6827 | addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 6828 | core.Uri.decodeQueryComponent(keyvalue[1])); |
| 6829 | } |
| 6830 | } |
| 6831 | unittest.expect( |
| 6832 | queryMap["timestamp"].first, unittest.equals(arg_timestamp)); |
| 6833 | unittest.expect( |
| 6834 | queryMap["position"].first, unittest.equals(arg_position)); |
| 6835 | unittest.expect(queryMap["action"].first, unittest.equals(arg_action)); |
| 6836 | unittest.expect(queryMap["contentVersion"].first, |
| 6837 | unittest.equals(arg_contentVersion)); |
| 6838 | unittest.expect( |
| 6839 | queryMap["deviceCookie"].first, unittest.equals(arg_deviceCookie)); |
| 6840 | unittest.expect(queryMap["source"].first, unittest.equals(arg_source)); |
| 6841 | unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); |
| 6842 | |
| 6843 | var h = { |
| 6844 | "content-type": "application/json; charset=utf-8", |
| 6845 | }; |
| 6846 | var resp = ""; |
| 6847 | return new async.Future.value(stringResponse(200, h, resp)); |
| 6848 | }), true); |
| 6849 | res |
| 6850 | .setPosition(arg_volumeId, arg_timestamp, arg_position, |
| 6851 | action: arg_action, |
| 6852 | contentVersion: arg_contentVersion, |
| 6853 | deviceCookie: arg_deviceCookie, |
| 6854 | source: arg_source, |
| 6855 | $fields: arg_$fields) |
| 6856 | .then(unittest.expectAsync1((_) {})); |
| 6857 | }); |
| 6858 | }); |
| 6859 | |
| 6860 | unittest.group("resource-NotificationResourceApi", () { |
| 6861 | unittest.test("method--get", () { |
| 6862 | var mock = new HttpServerMock(); |
| 6863 | api.NotificationResourceApi res = new api.BooksApi(mock).notification; |
| 6864 | var arg_notificationId = "foo"; |
| 6865 | var arg_locale = "foo"; |
| 6866 | var arg_source = "foo"; |
| 6867 | var arg_$fields = "foo"; |
| 6868 | mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 6869 | var path = (req.url).path; |
| 6870 | var pathOffset = 0; |
| 6871 | var index; |
| 6872 | var subPart; |
| 6873 | unittest.expect( |
| 6874 | path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 6875 | pathOffset += 1; |
| 6876 | unittest.expect(path.substring(pathOffset, pathOffset + 9), |
| 6877 | unittest.equals("books/v1/")); |
| 6878 | pathOffset += 9; |
| 6879 | unittest.expect(path.substring(pathOffset, pathOffset + 16), |
| 6880 | unittest.equals("notification/get")); |
| 6881 | pathOffset += 16; |
| 6882 | |
| 6883 | var query = (req.url).query; |
| 6884 | var queryOffset = 0; |
| 6885 | var queryMap = {}; |
| 6886 | addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 6887 | parseBool(n) { |
| 6888 | if (n == "true") return true; |
| 6889 | if (n == "false") return false; |
| 6890 | if (n == null) return null; |
| 6891 | throw new core.ArgumentError("Invalid boolean: $n"); |
| 6892 | } |
| 6893 | |
| 6894 | if (query.length > 0) { |
| 6895 | for (var part in query.split("&")) { |
| 6896 | var keyvalue = part.split("="); |
| 6897 | addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 6898 | core.Uri.decodeQueryComponent(keyvalue[1])); |
| 6899 | } |
| 6900 | } |
| 6901 | unittest.expect(queryMap["notification_id"].first, |
| 6902 | unittest.equals(arg_notificationId)); |
| 6903 | unittest.expect(queryMap["locale"].first, unittest.equals(arg_locale)); |
| 6904 | unittest.expect(queryMap["source"].first, unittest.equals(arg_source)); |
| 6905 | unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); |
| 6906 | |
| 6907 | var h = { |
| 6908 | "content-type": "application/json; charset=utf-8", |
| 6909 | }; |
| 6910 | var resp = convert.JSON.encode(buildNotification()); |
| 6911 | return new async.Future.value(stringResponse(200, h, resp)); |
| 6912 | }), true); |
| 6913 | res |
| 6914 | .get(arg_notificationId, |
| 6915 | locale: arg_locale, source: arg_source, $fields: arg_$fields) |
| 6916 | .then(unittest.expectAsync1(((api.Notification response) { |
| 6917 | checkNotification(response); |
| 6918 | }))); |
| 6919 | }); |
| 6920 | }); |
| 6921 | |
| 6922 | unittest.group("resource-OnboardingResourceApi", () { |
| 6923 | unittest.test("method--listCategories", () { |
| 6924 | var mock = new HttpServerMock(); |
| 6925 | api.OnboardingResourceApi res = new api.BooksApi(mock).onboarding; |
| 6926 | var arg_locale = "foo"; |
| 6927 | var arg_$fields = "foo"; |
| 6928 | mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 6929 | var path = (req.url).path; |
| 6930 | var pathOffset = 0; |
| 6931 | var index; |
| 6932 | var subPart; |
| 6933 | unittest.expect( |
| 6934 | path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 6935 | pathOffset += 1; |
| 6936 | unittest.expect(path.substring(pathOffset, pathOffset + 9), |
| 6937 | unittest.equals("books/v1/")); |
| 6938 | pathOffset += 9; |
| 6939 | unittest.expect(path.substring(pathOffset, pathOffset + 25), |
| 6940 | unittest.equals("onboarding/listCategories")); |
| 6941 | pathOffset += 25; |
| 6942 | |
| 6943 | var query = (req.url).query; |
| 6944 | var queryOffset = 0; |
| 6945 | var queryMap = {}; |
| 6946 | addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 6947 | parseBool(n) { |
| 6948 | if (n == "true") return true; |
| 6949 | if (n == "false") return false; |
| 6950 | if (n == null) return null; |
| 6951 | throw new core.ArgumentError("Invalid boolean: $n"); |
| 6952 | } |
| 6953 | |
| 6954 | if (query.length > 0) { |
| 6955 | for (var part in query.split("&")) { |
| 6956 | var keyvalue = part.split("="); |
| 6957 | addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 6958 | core.Uri.decodeQueryComponent(keyvalue[1])); |
| 6959 | } |
| 6960 | } |
| 6961 | unittest.expect(queryMap["locale"].first, unittest.equals(arg_locale)); |
| 6962 | unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); |
| 6963 | |
| 6964 | var h = { |
| 6965 | "content-type": "application/json; charset=utf-8", |
| 6966 | }; |
| 6967 | var resp = convert.JSON.encode(buildCategory()); |
| 6968 | return new async.Future.value(stringResponse(200, h, resp)); |
| 6969 | }), true); |
| 6970 | res |
| 6971 | .listCategories(locale: arg_locale, $fields: arg_$fields) |
| 6972 | .then(unittest.expectAsync1(((api.Category response) { |
| 6973 | checkCategory(response); |
| 6974 | }))); |
| 6975 | }); |
| 6976 | |
| 6977 | unittest.test("method--listCategoryVolumes", () { |
| 6978 | var mock = new HttpServerMock(); |
| 6979 | api.OnboardingResourceApi res = new api.BooksApi(mock).onboarding; |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 6980 | var arg_categoryId = buildUnnamed1013(); |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 6981 | var arg_locale = "foo"; |
| 6982 | var arg_maxAllowedMaturityRating = "foo"; |
| 6983 | var arg_pageSize = 42; |
| 6984 | var arg_pageToken = "foo"; |
| 6985 | var arg_$fields = "foo"; |
| 6986 | mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 6987 | var path = (req.url).path; |
| 6988 | var pathOffset = 0; |
| 6989 | var index; |
| 6990 | var subPart; |
| 6991 | unittest.expect( |
| 6992 | path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 6993 | pathOffset += 1; |
| 6994 | unittest.expect(path.substring(pathOffset, pathOffset + 9), |
| 6995 | unittest.equals("books/v1/")); |
| 6996 | pathOffset += 9; |
| 6997 | unittest.expect(path.substring(pathOffset, pathOffset + 30), |
| 6998 | unittest.equals("onboarding/listCategoryVolumes")); |
| 6999 | pathOffset += 30; |
| 7000 | |
| 7001 | var query = (req.url).query; |
| 7002 | var queryOffset = 0; |
| 7003 | var queryMap = {}; |
| 7004 | addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 7005 | parseBool(n) { |
| 7006 | if (n == "true") return true; |
| 7007 | if (n == "false") return false; |
| 7008 | if (n == null) return null; |
| 7009 | throw new core.ArgumentError("Invalid boolean: $n"); |
| 7010 | } |
| 7011 | |
| 7012 | if (query.length > 0) { |
| 7013 | for (var part in query.split("&")) { |
| 7014 | var keyvalue = part.split("="); |
| 7015 | addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 7016 | core.Uri.decodeQueryComponent(keyvalue[1])); |
| 7017 | } |
| 7018 | } |
| 7019 | unittest.expect( |
| 7020 | queryMap["categoryId"], unittest.equals(arg_categoryId)); |
| 7021 | unittest.expect(queryMap["locale"].first, unittest.equals(arg_locale)); |
| 7022 | unittest.expect(queryMap["maxAllowedMaturityRating"].first, |
| 7023 | unittest.equals(arg_maxAllowedMaturityRating)); |
| 7024 | unittest.expect(core.int.parse(queryMap["pageSize"].first), |
| 7025 | unittest.equals(arg_pageSize)); |
| 7026 | unittest.expect( |
| 7027 | queryMap["pageToken"].first, unittest.equals(arg_pageToken)); |
| 7028 | unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); |
| 7029 | |
| 7030 | var h = { |
| 7031 | "content-type": "application/json; charset=utf-8", |
| 7032 | }; |
| 7033 | var resp = convert.JSON.encode(buildVolume2()); |
| 7034 | return new async.Future.value(stringResponse(200, h, resp)); |
| 7035 | }), true); |
| 7036 | res |
| 7037 | .listCategoryVolumes( |
| 7038 | categoryId: arg_categoryId, |
| 7039 | locale: arg_locale, |
| 7040 | maxAllowedMaturityRating: arg_maxAllowedMaturityRating, |
| 7041 | pageSize: arg_pageSize, |
| 7042 | pageToken: arg_pageToken, |
| 7043 | $fields: arg_$fields) |
| 7044 | .then(unittest.expectAsync1(((api.Volume2 response) { |
| 7045 | checkVolume2(response); |
| 7046 | }))); |
| 7047 | }); |
| 7048 | }); |
| 7049 | |
| 7050 | unittest.group("resource-PersonalizedstreamResourceApi", () { |
| 7051 | unittest.test("method--get", () { |
| 7052 | var mock = new HttpServerMock(); |
| 7053 | api.PersonalizedstreamResourceApi res = |
| 7054 | new api.BooksApi(mock).personalizedstream; |
| 7055 | var arg_locale = "foo"; |
| 7056 | var arg_maxAllowedMaturityRating = "foo"; |
| 7057 | var arg_source = "foo"; |
| 7058 | var arg_$fields = "foo"; |
| 7059 | mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 7060 | var path = (req.url).path; |
| 7061 | var pathOffset = 0; |
| 7062 | var index; |
| 7063 | var subPart; |
| 7064 | unittest.expect( |
| 7065 | path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 7066 | pathOffset += 1; |
| 7067 | unittest.expect(path.substring(pathOffset, pathOffset + 9), |
| 7068 | unittest.equals("books/v1/")); |
| 7069 | pathOffset += 9; |
| 7070 | unittest.expect(path.substring(pathOffset, pathOffset + 22), |
| 7071 | unittest.equals("personalizedstream/get")); |
| 7072 | pathOffset += 22; |
| 7073 | |
| 7074 | var query = (req.url).query; |
| 7075 | var queryOffset = 0; |
| 7076 | var queryMap = {}; |
| 7077 | addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 7078 | parseBool(n) { |
| 7079 | if (n == "true") return true; |
| 7080 | if (n == "false") return false; |
| 7081 | if (n == null) return null; |
| 7082 | throw new core.ArgumentError("Invalid boolean: $n"); |
| 7083 | } |
| 7084 | |
| 7085 | if (query.length > 0) { |
| 7086 | for (var part in query.split("&")) { |
| 7087 | var keyvalue = part.split("="); |
| 7088 | addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 7089 | core.Uri.decodeQueryComponent(keyvalue[1])); |
| 7090 | } |
| 7091 | } |
| 7092 | unittest.expect(queryMap["locale"].first, unittest.equals(arg_locale)); |
| 7093 | unittest.expect(queryMap["maxAllowedMaturityRating"].first, |
| 7094 | unittest.equals(arg_maxAllowedMaturityRating)); |
| 7095 | unittest.expect(queryMap["source"].first, unittest.equals(arg_source)); |
| 7096 | unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); |
| 7097 | |
| 7098 | var h = { |
| 7099 | "content-type": "application/json; charset=utf-8", |
| 7100 | }; |
| 7101 | var resp = convert.JSON.encode(buildDiscoveryclusters()); |
| 7102 | return new async.Future.value(stringResponse(200, h, resp)); |
| 7103 | }), true); |
| 7104 | res |
| 7105 | .get( |
| 7106 | locale: arg_locale, |
| 7107 | maxAllowedMaturityRating: arg_maxAllowedMaturityRating, |
| 7108 | source: arg_source, |
| 7109 | $fields: arg_$fields) |
| 7110 | .then(unittest.expectAsync1(((api.Discoveryclusters response) { |
| 7111 | checkDiscoveryclusters(response); |
| 7112 | }))); |
| 7113 | }); |
| 7114 | }); |
| 7115 | |
| 7116 | unittest.group("resource-PromoofferResourceApi", () { |
| 7117 | unittest.test("method--accept", () { |
| 7118 | var mock = new HttpServerMock(); |
| 7119 | api.PromoofferResourceApi res = new api.BooksApi(mock).promooffer; |
| 7120 | var arg_androidId = "foo"; |
| 7121 | var arg_device = "foo"; |
| 7122 | var arg_manufacturer = "foo"; |
| 7123 | var arg_model = "foo"; |
| 7124 | var arg_offerId = "foo"; |
| 7125 | var arg_product = "foo"; |
| 7126 | var arg_serial = "foo"; |
| 7127 | var arg_volumeId = "foo"; |
| 7128 | var arg_$fields = "foo"; |
| 7129 | mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 7130 | var path = (req.url).path; |
| 7131 | var pathOffset = 0; |
| 7132 | var index; |
| 7133 | var subPart; |
| 7134 | unittest.expect( |
| 7135 | path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 7136 | pathOffset += 1; |
| 7137 | unittest.expect(path.substring(pathOffset, pathOffset + 9), |
| 7138 | unittest.equals("books/v1/")); |
| 7139 | pathOffset += 9; |
| 7140 | unittest.expect(path.substring(pathOffset, pathOffset + 17), |
| 7141 | unittest.equals("promooffer/accept")); |
| 7142 | pathOffset += 17; |
| 7143 | |
| 7144 | var query = (req.url).query; |
| 7145 | var queryOffset = 0; |
| 7146 | var queryMap = {}; |
| 7147 | addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 7148 | parseBool(n) { |
| 7149 | if (n == "true") return true; |
| 7150 | if (n == "false") return false; |
| 7151 | if (n == null) return null; |
| 7152 | throw new core.ArgumentError("Invalid boolean: $n"); |
| 7153 | } |
| 7154 | |
| 7155 | if (query.length > 0) { |
| 7156 | for (var part in query.split("&")) { |
| 7157 | var keyvalue = part.split("="); |
| 7158 | addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 7159 | core.Uri.decodeQueryComponent(keyvalue[1])); |
| 7160 | } |
| 7161 | } |
| 7162 | unittest.expect( |
| 7163 | queryMap["androidId"].first, unittest.equals(arg_androidId)); |
| 7164 | unittest.expect(queryMap["device"].first, unittest.equals(arg_device)); |
| 7165 | unittest.expect( |
| 7166 | queryMap["manufacturer"].first, unittest.equals(arg_manufacturer)); |
| 7167 | unittest.expect(queryMap["model"].first, unittest.equals(arg_model)); |
| 7168 | unittest.expect( |
| 7169 | queryMap["offerId"].first, unittest.equals(arg_offerId)); |
| 7170 | unittest.expect( |
| 7171 | queryMap["product"].first, unittest.equals(arg_product)); |
| 7172 | unittest.expect(queryMap["serial"].first, unittest.equals(arg_serial)); |
| 7173 | unittest.expect( |
| 7174 | queryMap["volumeId"].first, unittest.equals(arg_volumeId)); |
| 7175 | unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); |
| 7176 | |
| 7177 | var h = { |
| 7178 | "content-type": "application/json; charset=utf-8", |
| 7179 | }; |
| 7180 | var resp = ""; |
| 7181 | return new async.Future.value(stringResponse(200, h, resp)); |
| 7182 | }), true); |
| 7183 | res |
| 7184 | .accept( |
| 7185 | androidId: arg_androidId, |
| 7186 | device: arg_device, |
| 7187 | manufacturer: arg_manufacturer, |
| 7188 | model: arg_model, |
| 7189 | offerId: arg_offerId, |
| 7190 | product: arg_product, |
| 7191 | serial: arg_serial, |
| 7192 | volumeId: arg_volumeId, |
| 7193 | $fields: arg_$fields) |
| 7194 | .then(unittest.expectAsync1((_) {})); |
| 7195 | }); |
| 7196 | |
| 7197 | unittest.test("method--dismiss", () { |
| 7198 | var mock = new HttpServerMock(); |
| 7199 | api.PromoofferResourceApi res = new api.BooksApi(mock).promooffer; |
| 7200 | var arg_androidId = "foo"; |
| 7201 | var arg_device = "foo"; |
| 7202 | var arg_manufacturer = "foo"; |
| 7203 | var arg_model = "foo"; |
| 7204 | var arg_offerId = "foo"; |
| 7205 | var arg_product = "foo"; |
| 7206 | var arg_serial = "foo"; |
| 7207 | var arg_$fields = "foo"; |
| 7208 | mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 7209 | var path = (req.url).path; |
| 7210 | var pathOffset = 0; |
| 7211 | var index; |
| 7212 | var subPart; |
| 7213 | unittest.expect( |
| 7214 | path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 7215 | pathOffset += 1; |
| 7216 | unittest.expect(path.substring(pathOffset, pathOffset + 9), |
| 7217 | unittest.equals("books/v1/")); |
| 7218 | pathOffset += 9; |
| 7219 | unittest.expect(path.substring(pathOffset, pathOffset + 18), |
| 7220 | unittest.equals("promooffer/dismiss")); |
| 7221 | pathOffset += 18; |
| 7222 | |
| 7223 | var query = (req.url).query; |
| 7224 | var queryOffset = 0; |
| 7225 | var queryMap = {}; |
| 7226 | addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 7227 | parseBool(n) { |
| 7228 | if (n == "true") return true; |
| 7229 | if (n == "false") return false; |
| 7230 | if (n == null) return null; |
| 7231 | throw new core.ArgumentError("Invalid boolean: $n"); |
| 7232 | } |
| 7233 | |
| 7234 | if (query.length > 0) { |
| 7235 | for (var part in query.split("&")) { |
| 7236 | var keyvalue = part.split("="); |
| 7237 | addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 7238 | core.Uri.decodeQueryComponent(keyvalue[1])); |
| 7239 | } |
| 7240 | } |
| 7241 | unittest.expect( |
| 7242 | queryMap["androidId"].first, unittest.equals(arg_androidId)); |
| 7243 | unittest.expect(queryMap["device"].first, unittest.equals(arg_device)); |
| 7244 | unittest.expect( |
| 7245 | queryMap["manufacturer"].first, unittest.equals(arg_manufacturer)); |
| 7246 | unittest.expect(queryMap["model"].first, unittest.equals(arg_model)); |
| 7247 | unittest.expect( |
| 7248 | queryMap["offerId"].first, unittest.equals(arg_offerId)); |
| 7249 | unittest.expect( |
| 7250 | queryMap["product"].first, unittest.equals(arg_product)); |
| 7251 | unittest.expect(queryMap["serial"].first, unittest.equals(arg_serial)); |
| 7252 | unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); |
| 7253 | |
| 7254 | var h = { |
| 7255 | "content-type": "application/json; charset=utf-8", |
| 7256 | }; |
| 7257 | var resp = ""; |
| 7258 | return new async.Future.value(stringResponse(200, h, resp)); |
| 7259 | }), true); |
| 7260 | res |
| 7261 | .dismiss( |
| 7262 | androidId: arg_androidId, |
| 7263 | device: arg_device, |
| 7264 | manufacturer: arg_manufacturer, |
| 7265 | model: arg_model, |
| 7266 | offerId: arg_offerId, |
| 7267 | product: arg_product, |
| 7268 | serial: arg_serial, |
| 7269 | $fields: arg_$fields) |
| 7270 | .then(unittest.expectAsync1((_) {})); |
| 7271 | }); |
| 7272 | |
| 7273 | unittest.test("method--get", () { |
| 7274 | var mock = new HttpServerMock(); |
| 7275 | api.PromoofferResourceApi res = new api.BooksApi(mock).promooffer; |
| 7276 | var arg_androidId = "foo"; |
| 7277 | var arg_device = "foo"; |
| 7278 | var arg_manufacturer = "foo"; |
| 7279 | var arg_model = "foo"; |
| 7280 | var arg_product = "foo"; |
| 7281 | var arg_serial = "foo"; |
| 7282 | var arg_$fields = "foo"; |
| 7283 | mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 7284 | var path = (req.url).path; |
| 7285 | var pathOffset = 0; |
| 7286 | var index; |
| 7287 | var subPart; |
| 7288 | unittest.expect( |
| 7289 | path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 7290 | pathOffset += 1; |
| 7291 | unittest.expect(path.substring(pathOffset, pathOffset + 9), |
| 7292 | unittest.equals("books/v1/")); |
| 7293 | pathOffset += 9; |
| 7294 | unittest.expect(path.substring(pathOffset, pathOffset + 14), |
| 7295 | unittest.equals("promooffer/get")); |
| 7296 | pathOffset += 14; |
| 7297 | |
| 7298 | var query = (req.url).query; |
| 7299 | var queryOffset = 0; |
| 7300 | var queryMap = {}; |
| 7301 | addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 7302 | parseBool(n) { |
| 7303 | if (n == "true") return true; |
| 7304 | if (n == "false") return false; |
| 7305 | if (n == null) return null; |
| 7306 | throw new core.ArgumentError("Invalid boolean: $n"); |
| 7307 | } |
| 7308 | |
| 7309 | if (query.length > 0) { |
| 7310 | for (var part in query.split("&")) { |
| 7311 | var keyvalue = part.split("="); |
| 7312 | addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 7313 | core.Uri.decodeQueryComponent(keyvalue[1])); |
| 7314 | } |
| 7315 | } |
| 7316 | unittest.expect( |
| 7317 | queryMap["androidId"].first, unittest.equals(arg_androidId)); |
| 7318 | unittest.expect(queryMap["device"].first, unittest.equals(arg_device)); |
| 7319 | unittest.expect( |
| 7320 | queryMap["manufacturer"].first, unittest.equals(arg_manufacturer)); |
| 7321 | unittest.expect(queryMap["model"].first, unittest.equals(arg_model)); |
| 7322 | unittest.expect( |
| 7323 | queryMap["product"].first, unittest.equals(arg_product)); |
| 7324 | unittest.expect(queryMap["serial"].first, unittest.equals(arg_serial)); |
| 7325 | unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); |
| 7326 | |
| 7327 | var h = { |
| 7328 | "content-type": "application/json; charset=utf-8", |
| 7329 | }; |
| 7330 | var resp = convert.JSON.encode(buildOffers()); |
| 7331 | return new async.Future.value(stringResponse(200, h, resp)); |
| 7332 | }), true); |
| 7333 | res |
| 7334 | .get( |
| 7335 | androidId: arg_androidId, |
| 7336 | device: arg_device, |
| 7337 | manufacturer: arg_manufacturer, |
| 7338 | model: arg_model, |
| 7339 | product: arg_product, |
| 7340 | serial: arg_serial, |
| 7341 | $fields: arg_$fields) |
| 7342 | .then(unittest.expectAsync1(((api.Offers response) { |
| 7343 | checkOffers(response); |
| 7344 | }))); |
| 7345 | }); |
| 7346 | }); |
| 7347 | |
| 7348 | unittest.group("resource-SeriesResourceApi", () { |
| 7349 | unittest.test("method--get", () { |
| 7350 | var mock = new HttpServerMock(); |
| 7351 | api.SeriesResourceApi res = new api.BooksApi(mock).series; |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 7352 | var arg_seriesId = buildUnnamed1014(); |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 7353 | var arg_$fields = "foo"; |
| 7354 | mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 7355 | var path = (req.url).path; |
| 7356 | var pathOffset = 0; |
| 7357 | var index; |
| 7358 | var subPart; |
| 7359 | unittest.expect( |
| 7360 | path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 7361 | pathOffset += 1; |
| 7362 | unittest.expect(path.substring(pathOffset, pathOffset + 9), |
| 7363 | unittest.equals("books/v1/")); |
| 7364 | pathOffset += 9; |
| 7365 | unittest.expect(path.substring(pathOffset, pathOffset + 10), |
| 7366 | unittest.equals("series/get")); |
| 7367 | pathOffset += 10; |
| 7368 | |
| 7369 | var query = (req.url).query; |
| 7370 | var queryOffset = 0; |
| 7371 | var queryMap = {}; |
| 7372 | addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 7373 | parseBool(n) { |
| 7374 | if (n == "true") return true; |
| 7375 | if (n == "false") return false; |
| 7376 | if (n == null) return null; |
| 7377 | throw new core.ArgumentError("Invalid boolean: $n"); |
| 7378 | } |
| 7379 | |
| 7380 | if (query.length > 0) { |
| 7381 | for (var part in query.split("&")) { |
| 7382 | var keyvalue = part.split("="); |
| 7383 | addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 7384 | core.Uri.decodeQueryComponent(keyvalue[1])); |
| 7385 | } |
| 7386 | } |
| 7387 | unittest.expect(queryMap["series_id"], unittest.equals(arg_seriesId)); |
| 7388 | unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); |
| 7389 | |
| 7390 | var h = { |
| 7391 | "content-type": "application/json; charset=utf-8", |
| 7392 | }; |
| 7393 | var resp = convert.JSON.encode(buildSeries()); |
| 7394 | return new async.Future.value(stringResponse(200, h, resp)); |
| 7395 | }), true); |
| 7396 | res |
| 7397 | .get(arg_seriesId, $fields: arg_$fields) |
| 7398 | .then(unittest.expectAsync1(((api.Series response) { |
| 7399 | checkSeries(response); |
| 7400 | }))); |
| 7401 | }); |
| 7402 | }); |
| 7403 | |
| 7404 | unittest.group("resource-SeriesMembershipResourceApi", () { |
| 7405 | unittest.test("method--get", () { |
| 7406 | var mock = new HttpServerMock(); |
| 7407 | api.SeriesMembershipResourceApi res = |
| 7408 | new api.BooksApi(mock).series.membership; |
| 7409 | var arg_seriesId = "foo"; |
| 7410 | var arg_pageSize = 42; |
| 7411 | var arg_pageToken = "foo"; |
| 7412 | var arg_$fields = "foo"; |
| 7413 | mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 7414 | var path = (req.url).path; |
| 7415 | var pathOffset = 0; |
| 7416 | var index; |
| 7417 | var subPart; |
| 7418 | unittest.expect( |
| 7419 | path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 7420 | pathOffset += 1; |
| 7421 | unittest.expect(path.substring(pathOffset, pathOffset + 9), |
| 7422 | unittest.equals("books/v1/")); |
| 7423 | pathOffset += 9; |
| 7424 | unittest.expect(path.substring(pathOffset, pathOffset + 21), |
| 7425 | unittest.equals("series/membership/get")); |
| 7426 | pathOffset += 21; |
| 7427 | |
| 7428 | var query = (req.url).query; |
| 7429 | var queryOffset = 0; |
| 7430 | var queryMap = {}; |
| 7431 | addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 7432 | parseBool(n) { |
| 7433 | if (n == "true") return true; |
| 7434 | if (n == "false") return false; |
| 7435 | if (n == null) return null; |
| 7436 | throw new core.ArgumentError("Invalid boolean: $n"); |
| 7437 | } |
| 7438 | |
| 7439 | if (query.length > 0) { |
| 7440 | for (var part in query.split("&")) { |
| 7441 | var keyvalue = part.split("="); |
| 7442 | addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 7443 | core.Uri.decodeQueryComponent(keyvalue[1])); |
| 7444 | } |
| 7445 | } |
| 7446 | unittest.expect( |
| 7447 | queryMap["series_id"].first, unittest.equals(arg_seriesId)); |
| 7448 | unittest.expect(core.int.parse(queryMap["page_size"].first), |
| 7449 | unittest.equals(arg_pageSize)); |
| 7450 | unittest.expect( |
| 7451 | queryMap["page_token"].first, unittest.equals(arg_pageToken)); |
| 7452 | unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); |
| 7453 | |
| 7454 | var h = { |
| 7455 | "content-type": "application/json; charset=utf-8", |
| 7456 | }; |
| 7457 | var resp = convert.JSON.encode(buildSeriesmembership()); |
| 7458 | return new async.Future.value(stringResponse(200, h, resp)); |
| 7459 | }), true); |
| 7460 | res |
| 7461 | .get(arg_seriesId, |
| 7462 | pageSize: arg_pageSize, |
| 7463 | pageToken: arg_pageToken, |
| 7464 | $fields: arg_$fields) |
| 7465 | .then(unittest.expectAsync1(((api.Seriesmembership response) { |
| 7466 | checkSeriesmembership(response); |
| 7467 | }))); |
| 7468 | }); |
| 7469 | }); |
| 7470 | |
| 7471 | unittest.group("resource-VolumesResourceApi", () { |
| 7472 | unittest.test("method--get", () { |
| 7473 | var mock = new HttpServerMock(); |
| 7474 | api.VolumesResourceApi res = new api.BooksApi(mock).volumes; |
| 7475 | var arg_volumeId = "foo"; |
| 7476 | var arg_country = "foo"; |
| 7477 | var arg_includeNonComicsSeries = true; |
| 7478 | var arg_partner = "foo"; |
| 7479 | var arg_projection = "foo"; |
| 7480 | var arg_source = "foo"; |
| 7481 | var arg_userLibraryConsistentRead = true; |
| 7482 | var arg_$fields = "foo"; |
| 7483 | mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 7484 | var path = (req.url).path; |
| 7485 | var pathOffset = 0; |
| 7486 | var index; |
| 7487 | var subPart; |
| 7488 | unittest.expect( |
| 7489 | path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 7490 | pathOffset += 1; |
| 7491 | unittest.expect(path.substring(pathOffset, pathOffset + 9), |
| 7492 | unittest.equals("books/v1/")); |
| 7493 | pathOffset += 9; |
| 7494 | unittest.expect(path.substring(pathOffset, pathOffset + 8), |
| 7495 | unittest.equals("volumes/")); |
| 7496 | pathOffset += 8; |
| 7497 | subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); |
| 7498 | pathOffset = path.length; |
| 7499 | unittest.expect(subPart, unittest.equals("$arg_volumeId")); |
| 7500 | |
| 7501 | var query = (req.url).query; |
| 7502 | var queryOffset = 0; |
| 7503 | var queryMap = {}; |
| 7504 | addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 7505 | parseBool(n) { |
| 7506 | if (n == "true") return true; |
| 7507 | if (n == "false") return false; |
| 7508 | if (n == null) return null; |
| 7509 | throw new core.ArgumentError("Invalid boolean: $n"); |
| 7510 | } |
| 7511 | |
| 7512 | if (query.length > 0) { |
| 7513 | for (var part in query.split("&")) { |
| 7514 | var keyvalue = part.split("="); |
| 7515 | addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 7516 | core.Uri.decodeQueryComponent(keyvalue[1])); |
| 7517 | } |
| 7518 | } |
| 7519 | unittest.expect( |
| 7520 | queryMap["country"].first, unittest.equals(arg_country)); |
| 7521 | unittest.expect(queryMap["includeNonComicsSeries"].first, |
| 7522 | unittest.equals("$arg_includeNonComicsSeries")); |
| 7523 | unittest.expect( |
| 7524 | queryMap["partner"].first, unittest.equals(arg_partner)); |
| 7525 | unittest.expect( |
| 7526 | queryMap["projection"].first, unittest.equals(arg_projection)); |
| 7527 | unittest.expect(queryMap["source"].first, unittest.equals(arg_source)); |
| 7528 | unittest.expect(queryMap["user_library_consistent_read"].first, |
| 7529 | unittest.equals("$arg_userLibraryConsistentRead")); |
| 7530 | unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); |
| 7531 | |
| 7532 | var h = { |
| 7533 | "content-type": "application/json; charset=utf-8", |
| 7534 | }; |
| 7535 | var resp = convert.JSON.encode(buildVolume()); |
| 7536 | return new async.Future.value(stringResponse(200, h, resp)); |
| 7537 | }), true); |
| 7538 | res |
| 7539 | .get(arg_volumeId, |
| 7540 | country: arg_country, |
| 7541 | includeNonComicsSeries: arg_includeNonComicsSeries, |
| 7542 | partner: arg_partner, |
| 7543 | projection: arg_projection, |
| 7544 | source: arg_source, |
| 7545 | userLibraryConsistentRead: arg_userLibraryConsistentRead, |
| 7546 | $fields: arg_$fields) |
| 7547 | .then(unittest.expectAsync1(((api.Volume response) { |
| 7548 | checkVolume(response); |
| 7549 | }))); |
| 7550 | }); |
| 7551 | |
| 7552 | unittest.test("method--list", () { |
| 7553 | var mock = new HttpServerMock(); |
| 7554 | api.VolumesResourceApi res = new api.BooksApi(mock).volumes; |
| 7555 | var arg_q = "foo"; |
| 7556 | var arg_download = "foo"; |
| 7557 | var arg_filter = "foo"; |
| 7558 | var arg_langRestrict = "foo"; |
| 7559 | var arg_libraryRestrict = "foo"; |
| 7560 | var arg_maxAllowedMaturityRating = "foo"; |
| 7561 | var arg_maxResults = 42; |
| 7562 | var arg_orderBy = "foo"; |
| 7563 | var arg_partner = "foo"; |
| 7564 | var arg_printType = "foo"; |
| 7565 | var arg_projection = "foo"; |
| 7566 | var arg_showPreorders = true; |
| 7567 | var arg_source = "foo"; |
| 7568 | var arg_startIndex = 42; |
| 7569 | var arg_$fields = "foo"; |
| 7570 | mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 7571 | var path = (req.url).path; |
| 7572 | var pathOffset = 0; |
| 7573 | var index; |
| 7574 | var subPart; |
| 7575 | unittest.expect( |
| 7576 | path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 7577 | pathOffset += 1; |
| 7578 | unittest.expect(path.substring(pathOffset, pathOffset + 9), |
| 7579 | unittest.equals("books/v1/")); |
| 7580 | pathOffset += 9; |
| 7581 | unittest.expect(path.substring(pathOffset, pathOffset + 7), |
| 7582 | unittest.equals("volumes")); |
| 7583 | pathOffset += 7; |
| 7584 | |
| 7585 | var query = (req.url).query; |
| 7586 | var queryOffset = 0; |
| 7587 | var queryMap = {}; |
| 7588 | addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 7589 | parseBool(n) { |
| 7590 | if (n == "true") return true; |
| 7591 | if (n == "false") return false; |
| 7592 | if (n == null) return null; |
| 7593 | throw new core.ArgumentError("Invalid boolean: $n"); |
| 7594 | } |
| 7595 | |
| 7596 | if (query.length > 0) { |
| 7597 | for (var part in query.split("&")) { |
| 7598 | var keyvalue = part.split("="); |
| 7599 | addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 7600 | core.Uri.decodeQueryComponent(keyvalue[1])); |
| 7601 | } |
| 7602 | } |
| 7603 | unittest.expect(queryMap["q"].first, unittest.equals(arg_q)); |
| 7604 | unittest.expect( |
| 7605 | queryMap["download"].first, unittest.equals(arg_download)); |
| 7606 | unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); |
| 7607 | unittest.expect( |
| 7608 | queryMap["langRestrict"].first, unittest.equals(arg_langRestrict)); |
| 7609 | unittest.expect(queryMap["libraryRestrict"].first, |
| 7610 | unittest.equals(arg_libraryRestrict)); |
| 7611 | unittest.expect(queryMap["maxAllowedMaturityRating"].first, |
| 7612 | unittest.equals(arg_maxAllowedMaturityRating)); |
| 7613 | unittest.expect(core.int.parse(queryMap["maxResults"].first), |
| 7614 | unittest.equals(arg_maxResults)); |
| 7615 | unittest.expect( |
| 7616 | queryMap["orderBy"].first, unittest.equals(arg_orderBy)); |
| 7617 | unittest.expect( |
| 7618 | queryMap["partner"].first, unittest.equals(arg_partner)); |
| 7619 | unittest.expect( |
| 7620 | queryMap["printType"].first, unittest.equals(arg_printType)); |
| 7621 | unittest.expect( |
| 7622 | queryMap["projection"].first, unittest.equals(arg_projection)); |
| 7623 | unittest.expect(queryMap["showPreorders"].first, |
| 7624 | unittest.equals("$arg_showPreorders")); |
| 7625 | unittest.expect(queryMap["source"].first, unittest.equals(arg_source)); |
| 7626 | unittest.expect(core.int.parse(queryMap["startIndex"].first), |
| 7627 | unittest.equals(arg_startIndex)); |
| 7628 | unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); |
| 7629 | |
| 7630 | var h = { |
| 7631 | "content-type": "application/json; charset=utf-8", |
| 7632 | }; |
| 7633 | var resp = convert.JSON.encode(buildVolumes()); |
| 7634 | return new async.Future.value(stringResponse(200, h, resp)); |
| 7635 | }), true); |
| 7636 | res |
| 7637 | .list(arg_q, |
| 7638 | download: arg_download, |
| 7639 | filter: arg_filter, |
| 7640 | langRestrict: arg_langRestrict, |
| 7641 | libraryRestrict: arg_libraryRestrict, |
| 7642 | maxAllowedMaturityRating: arg_maxAllowedMaturityRating, |
| 7643 | maxResults: arg_maxResults, |
| 7644 | orderBy: arg_orderBy, |
| 7645 | partner: arg_partner, |
| 7646 | printType: arg_printType, |
| 7647 | projection: arg_projection, |
| 7648 | showPreorders: arg_showPreorders, |
| 7649 | source: arg_source, |
| 7650 | startIndex: arg_startIndex, |
| 7651 | $fields: arg_$fields) |
| 7652 | .then(unittest.expectAsync1(((api.Volumes response) { |
| 7653 | checkVolumes(response); |
| 7654 | }))); |
| 7655 | }); |
| 7656 | }); |
| 7657 | |
| 7658 | unittest.group("resource-VolumesAssociatedResourceApi", () { |
| 7659 | unittest.test("method--list", () { |
| 7660 | var mock = new HttpServerMock(); |
| 7661 | api.VolumesAssociatedResourceApi res = |
| 7662 | new api.BooksApi(mock).volumes.associated; |
| 7663 | var arg_volumeId = "foo"; |
| 7664 | var arg_association = "foo"; |
| 7665 | var arg_locale = "foo"; |
| 7666 | var arg_maxAllowedMaturityRating = "foo"; |
| 7667 | var arg_source = "foo"; |
| 7668 | var arg_$fields = "foo"; |
| 7669 | mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 7670 | var path = (req.url).path; |
| 7671 | var pathOffset = 0; |
| 7672 | var index; |
| 7673 | var subPart; |
| 7674 | unittest.expect( |
| 7675 | path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 7676 | pathOffset += 1; |
| 7677 | unittest.expect(path.substring(pathOffset, pathOffset + 9), |
| 7678 | unittest.equals("books/v1/")); |
| 7679 | pathOffset += 9; |
| 7680 | unittest.expect(path.substring(pathOffset, pathOffset + 8), |
| 7681 | unittest.equals("volumes/")); |
| 7682 | pathOffset += 8; |
| 7683 | index = path.indexOf("/associated", pathOffset); |
| 7684 | unittest.expect(index >= 0, unittest.isTrue); |
| 7685 | subPart = |
| 7686 | core.Uri.decodeQueryComponent(path.substring(pathOffset, index)); |
| 7687 | pathOffset = index; |
| 7688 | unittest.expect(subPart, unittest.equals("$arg_volumeId")); |
| 7689 | unittest.expect(path.substring(pathOffset, pathOffset + 11), |
| 7690 | unittest.equals("/associated")); |
| 7691 | pathOffset += 11; |
| 7692 | |
| 7693 | var query = (req.url).query; |
| 7694 | var queryOffset = 0; |
| 7695 | var queryMap = {}; |
| 7696 | addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 7697 | parseBool(n) { |
| 7698 | if (n == "true") return true; |
| 7699 | if (n == "false") return false; |
| 7700 | if (n == null) return null; |
| 7701 | throw new core.ArgumentError("Invalid boolean: $n"); |
| 7702 | } |
| 7703 | |
| 7704 | if (query.length > 0) { |
| 7705 | for (var part in query.split("&")) { |
| 7706 | var keyvalue = part.split("="); |
| 7707 | addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 7708 | core.Uri.decodeQueryComponent(keyvalue[1])); |
| 7709 | } |
| 7710 | } |
| 7711 | unittest.expect( |
| 7712 | queryMap["association"].first, unittest.equals(arg_association)); |
| 7713 | unittest.expect(queryMap["locale"].first, unittest.equals(arg_locale)); |
| 7714 | unittest.expect(queryMap["maxAllowedMaturityRating"].first, |
| 7715 | unittest.equals(arg_maxAllowedMaturityRating)); |
| 7716 | unittest.expect(queryMap["source"].first, unittest.equals(arg_source)); |
| 7717 | unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); |
| 7718 | |
| 7719 | var h = { |
| 7720 | "content-type": "application/json; charset=utf-8", |
| 7721 | }; |
| 7722 | var resp = convert.JSON.encode(buildVolumes()); |
| 7723 | return new async.Future.value(stringResponse(200, h, resp)); |
| 7724 | }), true); |
| 7725 | res |
| 7726 | .list(arg_volumeId, |
| 7727 | association: arg_association, |
| 7728 | locale: arg_locale, |
| 7729 | maxAllowedMaturityRating: arg_maxAllowedMaturityRating, |
| 7730 | source: arg_source, |
| 7731 | $fields: arg_$fields) |
| 7732 | .then(unittest.expectAsync1(((api.Volumes response) { |
| 7733 | checkVolumes(response); |
| 7734 | }))); |
| 7735 | }); |
| 7736 | }); |
| 7737 | |
| 7738 | unittest.group("resource-VolumesMybooksResourceApi", () { |
| 7739 | unittest.test("method--list", () { |
| 7740 | var mock = new HttpServerMock(); |
| 7741 | api.VolumesMybooksResourceApi res = |
| 7742 | new api.BooksApi(mock).volumes.mybooks; |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 7743 | var arg_acquireMethod = buildUnnamed1015(); |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 7744 | var arg_country = "foo"; |
| 7745 | var arg_locale = "foo"; |
| 7746 | var arg_maxResults = 42; |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 7747 | var arg_processingState = buildUnnamed1016(); |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 7748 | var arg_source = "foo"; |
| 7749 | var arg_startIndex = 42; |
| 7750 | var arg_$fields = "foo"; |
| 7751 | mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 7752 | var path = (req.url).path; |
| 7753 | var pathOffset = 0; |
| 7754 | var index; |
| 7755 | var subPart; |
| 7756 | unittest.expect( |
| 7757 | path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 7758 | pathOffset += 1; |
| 7759 | unittest.expect(path.substring(pathOffset, pathOffset + 9), |
| 7760 | unittest.equals("books/v1/")); |
| 7761 | pathOffset += 9; |
| 7762 | unittest.expect(path.substring(pathOffset, pathOffset + 15), |
| 7763 | unittest.equals("volumes/mybooks")); |
| 7764 | pathOffset += 15; |
| 7765 | |
| 7766 | var query = (req.url).query; |
| 7767 | var queryOffset = 0; |
| 7768 | var queryMap = {}; |
| 7769 | addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 7770 | parseBool(n) { |
| 7771 | if (n == "true") return true; |
| 7772 | if (n == "false") return false; |
| 7773 | if (n == null) return null; |
| 7774 | throw new core.ArgumentError("Invalid boolean: $n"); |
| 7775 | } |
| 7776 | |
| 7777 | if (query.length > 0) { |
| 7778 | for (var part in query.split("&")) { |
| 7779 | var keyvalue = part.split("="); |
| 7780 | addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 7781 | core.Uri.decodeQueryComponent(keyvalue[1])); |
| 7782 | } |
| 7783 | } |
| 7784 | unittest.expect( |
| 7785 | queryMap["acquireMethod"], unittest.equals(arg_acquireMethod)); |
| 7786 | unittest.expect( |
| 7787 | queryMap["country"].first, unittest.equals(arg_country)); |
| 7788 | unittest.expect(queryMap["locale"].first, unittest.equals(arg_locale)); |
| 7789 | unittest.expect(core.int.parse(queryMap["maxResults"].first), |
| 7790 | unittest.equals(arg_maxResults)); |
| 7791 | unittest.expect( |
| 7792 | queryMap["processingState"], unittest.equals(arg_processingState)); |
| 7793 | unittest.expect(queryMap["source"].first, unittest.equals(arg_source)); |
| 7794 | unittest.expect(core.int.parse(queryMap["startIndex"].first), |
| 7795 | unittest.equals(arg_startIndex)); |
| 7796 | unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); |
| 7797 | |
| 7798 | var h = { |
| 7799 | "content-type": "application/json; charset=utf-8", |
| 7800 | }; |
| 7801 | var resp = convert.JSON.encode(buildVolumes()); |
| 7802 | return new async.Future.value(stringResponse(200, h, resp)); |
| 7803 | }), true); |
| 7804 | res |
| 7805 | .list( |
| 7806 | acquireMethod: arg_acquireMethod, |
| 7807 | country: arg_country, |
| 7808 | locale: arg_locale, |
| 7809 | maxResults: arg_maxResults, |
| 7810 | processingState: arg_processingState, |
| 7811 | source: arg_source, |
| 7812 | startIndex: arg_startIndex, |
| 7813 | $fields: arg_$fields) |
| 7814 | .then(unittest.expectAsync1(((api.Volumes response) { |
| 7815 | checkVolumes(response); |
| 7816 | }))); |
| 7817 | }); |
| 7818 | }); |
| 7819 | |
| 7820 | unittest.group("resource-VolumesRecommendedResourceApi", () { |
| 7821 | unittest.test("method--list", () { |
| 7822 | var mock = new HttpServerMock(); |
| 7823 | api.VolumesRecommendedResourceApi res = |
| 7824 | new api.BooksApi(mock).volumes.recommended; |
| 7825 | var arg_locale = "foo"; |
| 7826 | var arg_maxAllowedMaturityRating = "foo"; |
| 7827 | var arg_source = "foo"; |
| 7828 | var arg_$fields = "foo"; |
| 7829 | mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 7830 | var path = (req.url).path; |
| 7831 | var pathOffset = 0; |
| 7832 | var index; |
| 7833 | var subPart; |
| 7834 | unittest.expect( |
| 7835 | path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 7836 | pathOffset += 1; |
| 7837 | unittest.expect(path.substring(pathOffset, pathOffset + 9), |
| 7838 | unittest.equals("books/v1/")); |
| 7839 | pathOffset += 9; |
| 7840 | unittest.expect(path.substring(pathOffset, pathOffset + 19), |
| 7841 | unittest.equals("volumes/recommended")); |
| 7842 | pathOffset += 19; |
| 7843 | |
| 7844 | var query = (req.url).query; |
| 7845 | var queryOffset = 0; |
| 7846 | var queryMap = {}; |
| 7847 | addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 7848 | parseBool(n) { |
| 7849 | if (n == "true") return true; |
| 7850 | if (n == "false") return false; |
| 7851 | if (n == null) return null; |
| 7852 | throw new core.ArgumentError("Invalid boolean: $n"); |
| 7853 | } |
| 7854 | |
| 7855 | if (query.length > 0) { |
| 7856 | for (var part in query.split("&")) { |
| 7857 | var keyvalue = part.split("="); |
| 7858 | addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 7859 | core.Uri.decodeQueryComponent(keyvalue[1])); |
| 7860 | } |
| 7861 | } |
| 7862 | unittest.expect(queryMap["locale"].first, unittest.equals(arg_locale)); |
| 7863 | unittest.expect(queryMap["maxAllowedMaturityRating"].first, |
| 7864 | unittest.equals(arg_maxAllowedMaturityRating)); |
| 7865 | unittest.expect(queryMap["source"].first, unittest.equals(arg_source)); |
| 7866 | unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); |
| 7867 | |
| 7868 | var h = { |
| 7869 | "content-type": "application/json; charset=utf-8", |
| 7870 | }; |
| 7871 | var resp = convert.JSON.encode(buildVolumes()); |
| 7872 | return new async.Future.value(stringResponse(200, h, resp)); |
| 7873 | }), true); |
| 7874 | res |
| 7875 | .list( |
| 7876 | locale: arg_locale, |
| 7877 | maxAllowedMaturityRating: arg_maxAllowedMaturityRating, |
| 7878 | source: arg_source, |
| 7879 | $fields: arg_$fields) |
| 7880 | .then(unittest.expectAsync1(((api.Volumes response) { |
| 7881 | checkVolumes(response); |
| 7882 | }))); |
| 7883 | }); |
| 7884 | |
| 7885 | unittest.test("method--rate", () { |
| 7886 | var mock = new HttpServerMock(); |
| 7887 | api.VolumesRecommendedResourceApi res = |
| 7888 | new api.BooksApi(mock).volumes.recommended; |
| 7889 | var arg_rating = "foo"; |
| 7890 | var arg_volumeId = "foo"; |
| 7891 | var arg_locale = "foo"; |
| 7892 | var arg_source = "foo"; |
| 7893 | var arg_$fields = "foo"; |
| 7894 | mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 7895 | var path = (req.url).path; |
| 7896 | var pathOffset = 0; |
| 7897 | var index; |
| 7898 | var subPart; |
| 7899 | unittest.expect( |
| 7900 | path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 7901 | pathOffset += 1; |
| 7902 | unittest.expect(path.substring(pathOffset, pathOffset + 9), |
| 7903 | unittest.equals("books/v1/")); |
| 7904 | pathOffset += 9; |
| 7905 | unittest.expect(path.substring(pathOffset, pathOffset + 24), |
| 7906 | unittest.equals("volumes/recommended/rate")); |
| 7907 | pathOffset += 24; |
| 7908 | |
| 7909 | var query = (req.url).query; |
| 7910 | var queryOffset = 0; |
| 7911 | var queryMap = {}; |
| 7912 | addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 7913 | parseBool(n) { |
| 7914 | if (n == "true") return true; |
| 7915 | if (n == "false") return false; |
| 7916 | if (n == null) return null; |
| 7917 | throw new core.ArgumentError("Invalid boolean: $n"); |
| 7918 | } |
| 7919 | |
| 7920 | if (query.length > 0) { |
| 7921 | for (var part in query.split("&")) { |
| 7922 | var keyvalue = part.split("="); |
| 7923 | addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 7924 | core.Uri.decodeQueryComponent(keyvalue[1])); |
| 7925 | } |
| 7926 | } |
| 7927 | unittest.expect(queryMap["rating"].first, unittest.equals(arg_rating)); |
| 7928 | unittest.expect( |
| 7929 | queryMap["volumeId"].first, unittest.equals(arg_volumeId)); |
| 7930 | unittest.expect(queryMap["locale"].first, unittest.equals(arg_locale)); |
| 7931 | unittest.expect(queryMap["source"].first, unittest.equals(arg_source)); |
| 7932 | unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); |
| 7933 | |
| 7934 | var h = { |
| 7935 | "content-type": "application/json; charset=utf-8", |
| 7936 | }; |
| 7937 | var resp = |
| 7938 | convert.JSON.encode(buildBooksVolumesRecommendedRateResponse()); |
| 7939 | return new async.Future.value(stringResponse(200, h, resp)); |
| 7940 | }), true); |
| 7941 | res |
| 7942 | .rate(arg_rating, arg_volumeId, |
| 7943 | locale: arg_locale, source: arg_source, $fields: arg_$fields) |
| 7944 | .then(unittest.expectAsync1( |
| 7945 | ((api.BooksVolumesRecommendedRateResponse response) { |
| 7946 | checkBooksVolumesRecommendedRateResponse(response); |
| 7947 | }))); |
| 7948 | }); |
| 7949 | }); |
| 7950 | |
| 7951 | unittest.group("resource-VolumesUseruploadedResourceApi", () { |
| 7952 | unittest.test("method--list", () { |
| 7953 | var mock = new HttpServerMock(); |
| 7954 | api.VolumesUseruploadedResourceApi res = |
| 7955 | new api.BooksApi(mock).volumes.useruploaded; |
| 7956 | var arg_locale = "foo"; |
| 7957 | var arg_maxResults = 42; |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 7958 | var arg_processingState = buildUnnamed1017(); |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 7959 | var arg_source = "foo"; |
| 7960 | var arg_startIndex = 42; |
Martin Kustermann | 67f25a2 | 2018-01-26 23:31:34 +0100 | [diff] [blame^] | 7961 | var arg_volumeId = buildUnnamed1018(); |
Martin Kustermann | 7a3b5f5 | 2017-10-23 11:34:19 +0200 | [diff] [blame] | 7962 | var arg_$fields = "foo"; |
| 7963 | mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
| 7964 | var path = (req.url).path; |
| 7965 | var pathOffset = 0; |
| 7966 | var index; |
| 7967 | var subPart; |
| 7968 | unittest.expect( |
| 7969 | path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
| 7970 | pathOffset += 1; |
| 7971 | unittest.expect(path.substring(pathOffset, pathOffset + 9), |
| 7972 | unittest.equals("books/v1/")); |
| 7973 | pathOffset += 9; |
| 7974 | unittest.expect(path.substring(pathOffset, pathOffset + 20), |
| 7975 | unittest.equals("volumes/useruploaded")); |
| 7976 | pathOffset += 20; |
| 7977 | |
| 7978 | var query = (req.url).query; |
| 7979 | var queryOffset = 0; |
| 7980 | var queryMap = {}; |
| 7981 | addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 7982 | parseBool(n) { |
| 7983 | if (n == "true") return true; |
| 7984 | if (n == "false") return false; |
| 7985 | if (n == null) return null; |
| 7986 | throw new core.ArgumentError("Invalid boolean: $n"); |
| 7987 | } |
| 7988 | |
| 7989 | if (query.length > 0) { |
| 7990 | for (var part in query.split("&")) { |
| 7991 | var keyvalue = part.split("="); |
| 7992 | addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 7993 | core.Uri.decodeQueryComponent(keyvalue[1])); |
| 7994 | } |
| 7995 | } |
| 7996 | unittest.expect(queryMap["locale"].first, unittest.equals(arg_locale)); |
| 7997 | unittest.expect(core.int.parse(queryMap["maxResults"].first), |
| 7998 | unittest.equals(arg_maxResults)); |
| 7999 | unittest.expect( |
| 8000 | queryMap["processingState"], unittest.equals(arg_processingState)); |
| 8001 | unittest.expect(queryMap["source"].first, unittest.equals(arg_source)); |
| 8002 | unittest.expect(core.int.parse(queryMap["startIndex"].first), |
| 8003 | unittest.equals(arg_startIndex)); |
| 8004 | unittest.expect(queryMap["volumeId"], unittest.equals(arg_volumeId)); |
| 8005 | unittest.expect(queryMap["fields"].first, unittest.equals(arg_$fields)); |
| 8006 | |
| 8007 | var h = { |
| 8008 | "content-type": "application/json; charset=utf-8", |
| 8009 | }; |
| 8010 | var resp = convert.JSON.encode(buildVolumes()); |
| 8011 | return new async.Future.value(stringResponse(200, h, resp)); |
| 8012 | }), true); |
| 8013 | res |
| 8014 | .list( |
| 8015 | locale: arg_locale, |
| 8016 | maxResults: arg_maxResults, |
| 8017 | processingState: arg_processingState, |
| 8018 | source: arg_source, |
| 8019 | startIndex: arg_startIndex, |
| 8020 | volumeId: arg_volumeId, |
| 8021 | $fields: arg_$fields) |
| 8022 | .then(unittest.expectAsync1(((api.Volumes response) { |
| 8023 | checkVolumes(response); |
| 8024 | }))); |
| 8025 | }); |
| 8026 | }); |
| 8027 | } |