| OLD | NEW |
| 1 library googleapis.fusiontables.v1.test; | 1 library googleapis.fusiontables.v1.test; |
| 2 | 2 |
| 3 import "dart:core" as core; | 3 import "dart:core" as core; |
| 4 import "dart:collection" as collection; | 4 import "dart:collection" as collection; |
| 5 import "dart:async" as async; | 5 import "dart:async" as async; |
| 6 import "dart:convert" as convert; | 6 import "dart:convert" as convert; |
| 7 | 7 |
| 8 import 'package:http/http.dart' as http; | 8 import 'package:http/http.dart' as http; |
| 9 import 'package:http/testing.dart' as http_testing; | 9 import 'package:http/testing.dart' as http_testing; |
| 10 import 'package:unittest/unittest.dart' as unittest; | 10 import 'package:unittest/unittest.dart' as unittest; |
| 11 import 'package:googleapis/common/common.dart' as common; | |
| 12 import 'package:googleapis/src/common_internal.dart' as common_internal; | |
| 13 import '../common/common_internal_test.dart' as common_test; | |
| 14 | 11 |
| 15 import 'package:googleapis/fusiontables/v1.dart' as api; | 12 import 'package:googleapis/fusiontables/v1.dart' as api; |
| 16 | 13 |
| 14 class HttpServerMock extends http.BaseClient { |
| 15 core.Function _callback; |
| 16 core.bool _expectJson; |
| 17 | 17 |
| 18 void register(core.Function callback, core.bool expectJson) { |
| 19 _callback = callback; |
| 20 _expectJson = expectJson; |
| 21 } |
| 22 |
| 23 async.Future<http.StreamedResponse> send(http.BaseRequest request) { |
| 24 if (_expectJson) { |
| 25 return request.finalize() |
| 26 .transform(convert.UTF8.decoder) |
| 27 .join('') |
| 28 .then((core.String jsonString) { |
| 29 if (jsonString.isEmpty) { |
| 30 return _callback(request, null); |
| 31 } else { |
| 32 return _callback(request, convert.JSON.decode(jsonString)); |
| 33 } |
| 34 }); |
| 35 } else { |
| 36 var stream = request.finalize(); |
| 37 if (stream == null) { |
| 38 return _callback(request, []); |
| 39 } else { |
| 40 return stream.toBytes().then((data) { |
| 41 return _callback(request, data); |
| 42 }); |
| 43 } |
| 44 } |
| 45 } |
| 46 } |
| 47 |
| 48 http.StreamedResponse stringResponse( |
| 49 core.int status, core.Map headers, core.String body) { |
| 50 var stream = new async.Stream.fromIterable([convert.UTF8.encode(body)]); |
| 51 return new http.StreamedResponse(stream, status, headers: headers); |
| 52 } |
| 18 | 53 |
| 19 core.int buildCounterBucket = 0; | 54 core.int buildCounterBucket = 0; |
| 20 buildBucket() { | 55 buildBucket() { |
| 21 var o = new api.Bucket(); | 56 var o = new api.Bucket(); |
| 22 buildCounterBucket++; | 57 buildCounterBucket++; |
| 23 if (buildCounterBucket < 3) { | 58 if (buildCounterBucket < 3) { |
| 24 o.color = "foo"; | 59 o.color = "foo"; |
| 25 o.icon = "foo"; | 60 o.icon = "foo"; |
| 26 o.max = 42.0; | 61 o.max = 42.0; |
| 27 o.min = 42.0; | 62 o.min = 42.0; |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 unittest.expect(o.columnId, unittest.equals(42)); | 125 unittest.expect(o.columnId, unittest.equals(42)); |
| 91 unittest.expect(o.description, unittest.equals('foo')); | 126 unittest.expect(o.description, unittest.equals('foo')); |
| 92 unittest.expect(o.graphPredicate, unittest.equals('foo')); | 127 unittest.expect(o.graphPredicate, unittest.equals('foo')); |
| 93 unittest.expect(o.kind, unittest.equals('foo')); | 128 unittest.expect(o.kind, unittest.equals('foo')); |
| 94 unittest.expect(o.name, unittest.equals('foo')); | 129 unittest.expect(o.name, unittest.equals('foo')); |
| 95 unittest.expect(o.type, unittest.equals('foo')); | 130 unittest.expect(o.type, unittest.equals('foo')); |
| 96 } | 131 } |
| 97 buildCounterColumn--; | 132 buildCounterColumn--; |
| 98 } | 133 } |
| 99 | 134 |
| 100 buildUnnamed1434() { | 135 buildUnnamed1031() { |
| 101 var o = new core.List<api.Column>(); | 136 var o = new core.List<api.Column>(); |
| 102 o.add(buildColumn()); | 137 o.add(buildColumn()); |
| 103 o.add(buildColumn()); | 138 o.add(buildColumn()); |
| 104 return o; | 139 return o; |
| 105 } | 140 } |
| 106 | 141 |
| 107 checkUnnamed1434(core.List<api.Column> o) { | 142 checkUnnamed1031(core.List<api.Column> o) { |
| 108 unittest.expect(o, unittest.hasLength(2)); | 143 unittest.expect(o, unittest.hasLength(2)); |
| 109 checkColumn(o[0]); | 144 checkColumn(o[0]); |
| 110 checkColumn(o[1]); | 145 checkColumn(o[1]); |
| 111 } | 146 } |
| 112 | 147 |
| 113 core.int buildCounterColumnList = 0; | 148 core.int buildCounterColumnList = 0; |
| 114 buildColumnList() { | 149 buildColumnList() { |
| 115 var o = new api.ColumnList(); | 150 var o = new api.ColumnList(); |
| 116 buildCounterColumnList++; | 151 buildCounterColumnList++; |
| 117 if (buildCounterColumnList < 3) { | 152 if (buildCounterColumnList < 3) { |
| 118 o.items = buildUnnamed1434(); | 153 o.items = buildUnnamed1031(); |
| 119 o.kind = "foo"; | 154 o.kind = "foo"; |
| 120 o.nextPageToken = "foo"; | 155 o.nextPageToken = "foo"; |
| 121 o.totalItems = 42; | 156 o.totalItems = 42; |
| 122 } | 157 } |
| 123 buildCounterColumnList--; | 158 buildCounterColumnList--; |
| 124 return o; | 159 return o; |
| 125 } | 160 } |
| 126 | 161 |
| 127 checkColumnList(api.ColumnList o) { | 162 checkColumnList(api.ColumnList o) { |
| 128 buildCounterColumnList++; | 163 buildCounterColumnList++; |
| 129 if (buildCounterColumnList < 3) { | 164 if (buildCounterColumnList < 3) { |
| 130 checkUnnamed1434(o.items); | 165 checkUnnamed1031(o.items); |
| 131 unittest.expect(o.kind, unittest.equals('foo')); | 166 unittest.expect(o.kind, unittest.equals('foo')); |
| 132 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 167 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 133 unittest.expect(o.totalItems, unittest.equals(42)); | 168 unittest.expect(o.totalItems, unittest.equals(42)); |
| 134 } | 169 } |
| 135 buildCounterColumnList--; | 170 buildCounterColumnList--; |
| 136 } | 171 } |
| 137 | 172 |
| 138 buildUnnamed1435() { | 173 buildUnnamed1032() { |
| 139 var o = new core.List<core.Object>(); | 174 var o = new core.List<core.Object>(); |
| 140 o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}); | 175 o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}); |
| 141 o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}); | 176 o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}); |
| 142 return o; | 177 return o; |
| 143 } | 178 } |
| 144 | 179 |
| 145 checkUnnamed1435(core.List<core.Object> o) { | 180 checkUnnamed1032(core.List<core.Object> o) { |
| 146 unittest.expect(o, unittest.hasLength(2)); | 181 unittest.expect(o, unittest.hasLength(2)); |
| 147 var casted1 = (o[0]) as core.Map; unittest.expect(casted1, unittest.hasLength(
3)); unittest.expect(casted1["list"], unittest.equals([1, 2, 3])); unittest.expe
ct(casted1["bool"], unittest.equals(true)); unittest.expect(casted1["string"], u
nittest.equals('foo')); | 182 var casted1 = (o[0]) as core.Map; unittest.expect(casted1, unittest.hasLength(
3)); unittest.expect(casted1["list"], unittest.equals([1, 2, 3])); unittest.expe
ct(casted1["bool"], unittest.equals(true)); unittest.expect(casted1["string"], u
nittest.equals('foo')); |
| 148 var casted2 = (o[1]) as core.Map; unittest.expect(casted2, unittest.hasLength(
3)); unittest.expect(casted2["list"], unittest.equals([1, 2, 3])); unittest.expe
ct(casted2["bool"], unittest.equals(true)); unittest.expect(casted2["string"], u
nittest.equals('foo')); | 183 var casted2 = (o[1]) as core.Map; unittest.expect(casted2, unittest.hasLength(
3)); unittest.expect(casted2["list"], unittest.equals([1, 2, 3])); unittest.expe
ct(casted2["bool"], unittest.equals(true)); unittest.expect(casted2["string"], u
nittest.equals('foo')); |
| 149 } | 184 } |
| 150 | 185 |
| 151 core.int buildCounterGeometry = 0; | 186 core.int buildCounterGeometry = 0; |
| 152 buildGeometry() { | 187 buildGeometry() { |
| 153 var o = new api.Geometry(); | 188 var o = new api.Geometry(); |
| 154 buildCounterGeometry++; | 189 buildCounterGeometry++; |
| 155 if (buildCounterGeometry < 3) { | 190 if (buildCounterGeometry < 3) { |
| 156 o.geometries = buildUnnamed1435(); | 191 o.geometries = buildUnnamed1032(); |
| 157 o.geometry = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 192 o.geometry = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
| 158 o.type = "foo"; | 193 o.type = "foo"; |
| 159 } | 194 } |
| 160 buildCounterGeometry--; | 195 buildCounterGeometry--; |
| 161 return o; | 196 return o; |
| 162 } | 197 } |
| 163 | 198 |
| 164 checkGeometry(api.Geometry o) { | 199 checkGeometry(api.Geometry o) { |
| 165 buildCounterGeometry++; | 200 buildCounterGeometry++; |
| 166 if (buildCounterGeometry < 3) { | 201 if (buildCounterGeometry < 3) { |
| 167 checkUnnamed1435(o.geometries); | 202 checkUnnamed1032(o.geometries); |
| 168 var casted3 = (o.geometry) as core.Map; unittest.expect(casted3, unittest.ha
sLength(3)); unittest.expect(casted3["list"], unittest.equals([1, 2, 3])); unitt
est.expect(casted3["bool"], unittest.equals(true)); unittest.expect(casted3["str
ing"], unittest.equals('foo')); | 203 var casted3 = (o.geometry) as core.Map; unittest.expect(casted3, unittest.ha
sLength(3)); unittest.expect(casted3["list"], unittest.equals([1, 2, 3])); unitt
est.expect(casted3["bool"], unittest.equals(true)); unittest.expect(casted3["str
ing"], unittest.equals('foo')); |
| 169 unittest.expect(o.type, unittest.equals('foo')); | 204 unittest.expect(o.type, unittest.equals('foo')); |
| 170 } | 205 } |
| 171 buildCounterGeometry--; | 206 buildCounterGeometry--; |
| 172 } | 207 } |
| 173 | 208 |
| 174 core.int buildCounterImport = 0; | 209 core.int buildCounterImport = 0; |
| 175 buildImport() { | 210 buildImport() { |
| 176 var o = new api.Import(); | 211 var o = new api.Import(); |
| 177 buildCounterImport++; | 212 buildCounterImport++; |
| 178 if (buildCounterImport < 3) { | 213 if (buildCounterImport < 3) { |
| 179 o.kind = "foo"; | 214 o.kind = "foo"; |
| 180 o.numRowsReceived = "foo"; | 215 o.numRowsReceived = "foo"; |
| 181 } | 216 } |
| 182 buildCounterImport--; | 217 buildCounterImport--; |
| 183 return o; | 218 return o; |
| 184 } | 219 } |
| 185 | 220 |
| 186 checkImport(api.Import o) { | 221 checkImport(api.Import o) { |
| 187 buildCounterImport++; | 222 buildCounterImport++; |
| 188 if (buildCounterImport < 3) { | 223 if (buildCounterImport < 3) { |
| 189 unittest.expect(o.kind, unittest.equals('foo')); | 224 unittest.expect(o.kind, unittest.equals('foo')); |
| 190 unittest.expect(o.numRowsReceived, unittest.equals('foo')); | 225 unittest.expect(o.numRowsReceived, unittest.equals('foo')); |
| 191 } | 226 } |
| 192 buildCounterImport--; | 227 buildCounterImport--; |
| 193 } | 228 } |
| 194 | 229 |
| 195 buildUnnamed1436() { | 230 buildUnnamed1033() { |
| 196 var o = new core.List<core.double>(); | 231 var o = new core.List<core.double>(); |
| 197 o.add(42.0); | 232 o.add(42.0); |
| 198 o.add(42.0); | 233 o.add(42.0); |
| 199 return o; | 234 return o; |
| 200 } | 235 } |
| 201 | 236 |
| 202 checkUnnamed1436(core.List<core.double> o) { | 237 checkUnnamed1033(core.List<core.double> o) { |
| 203 unittest.expect(o, unittest.hasLength(2)); | 238 unittest.expect(o, unittest.hasLength(2)); |
| 204 unittest.expect(o[0], unittest.equals(42.0)); | 239 unittest.expect(o[0], unittest.equals(42.0)); |
| 205 unittest.expect(o[1], unittest.equals(42.0)); | 240 unittest.expect(o[1], unittest.equals(42.0)); |
| 206 } | 241 } |
| 207 | 242 |
| 208 buildUnnamed1437() { | 243 buildUnnamed1034() { |
| 209 var o = new core.List<core.List<core.double>>(); | 244 var o = new core.List<core.List<core.double>>(); |
| 210 o.add(buildUnnamed1436()); | 245 o.add(buildUnnamed1033()); |
| 211 o.add(buildUnnamed1436()); | 246 o.add(buildUnnamed1033()); |
| 212 return o; | 247 return o; |
| 213 } | 248 } |
| 214 | 249 |
| 215 checkUnnamed1437(core.List<core.List<core.double>> o) { | 250 checkUnnamed1034(core.List<core.List<core.double>> o) { |
| 216 unittest.expect(o, unittest.hasLength(2)); | 251 unittest.expect(o, unittest.hasLength(2)); |
| 217 checkUnnamed1436(o[0]); | 252 checkUnnamed1033(o[0]); |
| 218 checkUnnamed1436(o[1]); | 253 checkUnnamed1033(o[1]); |
| 219 } | 254 } |
| 220 | 255 |
| 221 core.int buildCounterLine = 0; | 256 core.int buildCounterLine = 0; |
| 222 buildLine() { | 257 buildLine() { |
| 223 var o = new api.Line(); | 258 var o = new api.Line(); |
| 224 buildCounterLine++; | 259 buildCounterLine++; |
| 225 if (buildCounterLine < 3) { | 260 if (buildCounterLine < 3) { |
| 226 o.coordinates = buildUnnamed1437(); | 261 o.coordinates = buildUnnamed1034(); |
| 227 o.type = "foo"; | 262 o.type = "foo"; |
| 228 } | 263 } |
| 229 buildCounterLine--; | 264 buildCounterLine--; |
| 230 return o; | 265 return o; |
| 231 } | 266 } |
| 232 | 267 |
| 233 checkLine(api.Line o) { | 268 checkLine(api.Line o) { |
| 234 buildCounterLine++; | 269 buildCounterLine++; |
| 235 if (buildCounterLine < 3) { | 270 if (buildCounterLine < 3) { |
| 236 checkUnnamed1437(o.coordinates); | 271 checkUnnamed1034(o.coordinates); |
| 237 unittest.expect(o.type, unittest.equals('foo')); | 272 unittest.expect(o.type, unittest.equals('foo')); |
| 238 } | 273 } |
| 239 buildCounterLine--; | 274 buildCounterLine--; |
| 240 } | 275 } |
| 241 | 276 |
| 242 core.int buildCounterLineStyle = 0; | 277 core.int buildCounterLineStyle = 0; |
| 243 buildLineStyle() { | 278 buildLineStyle() { |
| 244 var o = new api.LineStyle(); | 279 var o = new api.LineStyle(); |
| 245 buildCounterLineStyle++; | 280 buildCounterLineStyle++; |
| 246 if (buildCounterLineStyle < 3) { | 281 if (buildCounterLineStyle < 3) { |
| (...skipping 12 matching lines...) Expand all Loading... |
| 259 if (buildCounterLineStyle < 3) { | 294 if (buildCounterLineStyle < 3) { |
| 260 unittest.expect(o.strokeColor, unittest.equals('foo')); | 295 unittest.expect(o.strokeColor, unittest.equals('foo')); |
| 261 checkStyleFunction(o.strokeColorStyler); | 296 checkStyleFunction(o.strokeColorStyler); |
| 262 unittest.expect(o.strokeOpacity, unittest.equals(42.0)); | 297 unittest.expect(o.strokeOpacity, unittest.equals(42.0)); |
| 263 unittest.expect(o.strokeWeight, unittest.equals(42)); | 298 unittest.expect(o.strokeWeight, unittest.equals(42)); |
| 264 checkStyleFunction(o.strokeWeightStyler); | 299 checkStyleFunction(o.strokeWeightStyler); |
| 265 } | 300 } |
| 266 buildCounterLineStyle--; | 301 buildCounterLineStyle--; |
| 267 } | 302 } |
| 268 | 303 |
| 269 buildUnnamed1438() { | 304 buildUnnamed1035() { |
| 270 var o = new core.List<core.double>(); | 305 var o = new core.List<core.double>(); |
| 271 o.add(42.0); | 306 o.add(42.0); |
| 272 o.add(42.0); | 307 o.add(42.0); |
| 273 return o; | 308 return o; |
| 274 } | 309 } |
| 275 | 310 |
| 276 checkUnnamed1438(core.List<core.double> o) { | 311 checkUnnamed1035(core.List<core.double> o) { |
| 277 unittest.expect(o, unittest.hasLength(2)); | 312 unittest.expect(o, unittest.hasLength(2)); |
| 278 unittest.expect(o[0], unittest.equals(42.0)); | 313 unittest.expect(o[0], unittest.equals(42.0)); |
| 279 unittest.expect(o[1], unittest.equals(42.0)); | 314 unittest.expect(o[1], unittest.equals(42.0)); |
| 280 } | 315 } |
| 281 | 316 |
| 282 core.int buildCounterPoint = 0; | 317 core.int buildCounterPoint = 0; |
| 283 buildPoint() { | 318 buildPoint() { |
| 284 var o = new api.Point(); | 319 var o = new api.Point(); |
| 285 buildCounterPoint++; | 320 buildCounterPoint++; |
| 286 if (buildCounterPoint < 3) { | 321 if (buildCounterPoint < 3) { |
| 287 o.coordinates = buildUnnamed1438(); | 322 o.coordinates = buildUnnamed1035(); |
| 288 o.type = "foo"; | 323 o.type = "foo"; |
| 289 } | 324 } |
| 290 buildCounterPoint--; | 325 buildCounterPoint--; |
| 291 return o; | 326 return o; |
| 292 } | 327 } |
| 293 | 328 |
| 294 checkPoint(api.Point o) { | 329 checkPoint(api.Point o) { |
| 295 buildCounterPoint++; | 330 buildCounterPoint++; |
| 296 if (buildCounterPoint < 3) { | 331 if (buildCounterPoint < 3) { |
| 297 checkUnnamed1438(o.coordinates); | 332 checkUnnamed1035(o.coordinates); |
| 298 unittest.expect(o.type, unittest.equals('foo')); | 333 unittest.expect(o.type, unittest.equals('foo')); |
| 299 } | 334 } |
| 300 buildCounterPoint--; | 335 buildCounterPoint--; |
| 301 } | 336 } |
| 302 | 337 |
| 303 core.int buildCounterPointStyle = 0; | 338 core.int buildCounterPointStyle = 0; |
| 304 buildPointStyle() { | 339 buildPointStyle() { |
| 305 var o = new api.PointStyle(); | 340 var o = new api.PointStyle(); |
| 306 buildCounterPointStyle++; | 341 buildCounterPointStyle++; |
| 307 if (buildCounterPointStyle < 3) { | 342 if (buildCounterPointStyle < 3) { |
| 308 o.iconName = "foo"; | 343 o.iconName = "foo"; |
| 309 o.iconStyler = buildStyleFunction(); | 344 o.iconStyler = buildStyleFunction(); |
| 310 } | 345 } |
| 311 buildCounterPointStyle--; | 346 buildCounterPointStyle--; |
| 312 return o; | 347 return o; |
| 313 } | 348 } |
| 314 | 349 |
| 315 checkPointStyle(api.PointStyle o) { | 350 checkPointStyle(api.PointStyle o) { |
| 316 buildCounterPointStyle++; | 351 buildCounterPointStyle++; |
| 317 if (buildCounterPointStyle < 3) { | 352 if (buildCounterPointStyle < 3) { |
| 318 unittest.expect(o.iconName, unittest.equals('foo')); | 353 unittest.expect(o.iconName, unittest.equals('foo')); |
| 319 checkStyleFunction(o.iconStyler); | 354 checkStyleFunction(o.iconStyler); |
| 320 } | 355 } |
| 321 buildCounterPointStyle--; | 356 buildCounterPointStyle--; |
| 322 } | 357 } |
| 323 | 358 |
| 324 buildUnnamed1439() { | 359 buildUnnamed1036() { |
| 325 var o = new core.List<core.double>(); | 360 var o = new core.List<core.double>(); |
| 326 o.add(42.0); | 361 o.add(42.0); |
| 327 o.add(42.0); | 362 o.add(42.0); |
| 328 return o; | 363 return o; |
| 329 } | 364 } |
| 330 | 365 |
| 331 checkUnnamed1439(core.List<core.double> o) { | 366 checkUnnamed1036(core.List<core.double> o) { |
| 332 unittest.expect(o, unittest.hasLength(2)); | 367 unittest.expect(o, unittest.hasLength(2)); |
| 333 unittest.expect(o[0], unittest.equals(42.0)); | 368 unittest.expect(o[0], unittest.equals(42.0)); |
| 334 unittest.expect(o[1], unittest.equals(42.0)); | 369 unittest.expect(o[1], unittest.equals(42.0)); |
| 335 } | 370 } |
| 336 | 371 |
| 337 buildUnnamed1440() { | 372 buildUnnamed1037() { |
| 338 var o = new core.List<core.List<core.double>>(); | 373 var o = new core.List<core.List<core.double>>(); |
| 339 o.add(buildUnnamed1439()); | 374 o.add(buildUnnamed1036()); |
| 340 o.add(buildUnnamed1439()); | 375 o.add(buildUnnamed1036()); |
| 341 return o; | 376 return o; |
| 342 } | 377 } |
| 343 | 378 |
| 344 checkUnnamed1440(core.List<core.List<core.double>> o) { | 379 checkUnnamed1037(core.List<core.List<core.double>> o) { |
| 345 unittest.expect(o, unittest.hasLength(2)); | 380 unittest.expect(o, unittest.hasLength(2)); |
| 346 checkUnnamed1439(o[0]); | 381 checkUnnamed1036(o[0]); |
| 347 checkUnnamed1439(o[1]); | 382 checkUnnamed1036(o[1]); |
| 348 } | 383 } |
| 349 | 384 |
| 350 buildUnnamed1441() { | 385 buildUnnamed1038() { |
| 351 var o = new core.List<core.List<core.List<core.double>>>(); | 386 var o = new core.List<core.List<core.List<core.double>>>(); |
| 352 o.add(buildUnnamed1440()); | 387 o.add(buildUnnamed1037()); |
| 353 o.add(buildUnnamed1440()); | 388 o.add(buildUnnamed1037()); |
| 354 return o; | 389 return o; |
| 355 } | 390 } |
| 356 | 391 |
| 357 checkUnnamed1441(core.List<core.List<core.List<core.double>>> o) { | 392 checkUnnamed1038(core.List<core.List<core.List<core.double>>> o) { |
| 358 unittest.expect(o, unittest.hasLength(2)); | 393 unittest.expect(o, unittest.hasLength(2)); |
| 359 checkUnnamed1440(o[0]); | 394 checkUnnamed1037(o[0]); |
| 360 checkUnnamed1440(o[1]); | 395 checkUnnamed1037(o[1]); |
| 361 } | 396 } |
| 362 | 397 |
| 363 core.int buildCounterPolygon = 0; | 398 core.int buildCounterPolygon = 0; |
| 364 buildPolygon() { | 399 buildPolygon() { |
| 365 var o = new api.Polygon(); | 400 var o = new api.Polygon(); |
| 366 buildCounterPolygon++; | 401 buildCounterPolygon++; |
| 367 if (buildCounterPolygon < 3) { | 402 if (buildCounterPolygon < 3) { |
| 368 o.coordinates = buildUnnamed1441(); | 403 o.coordinates = buildUnnamed1038(); |
| 369 o.type = "foo"; | 404 o.type = "foo"; |
| 370 } | 405 } |
| 371 buildCounterPolygon--; | 406 buildCounterPolygon--; |
| 372 return o; | 407 return o; |
| 373 } | 408 } |
| 374 | 409 |
| 375 checkPolygon(api.Polygon o) { | 410 checkPolygon(api.Polygon o) { |
| 376 buildCounterPolygon++; | 411 buildCounterPolygon++; |
| 377 if (buildCounterPolygon < 3) { | 412 if (buildCounterPolygon < 3) { |
| 378 checkUnnamed1441(o.coordinates); | 413 checkUnnamed1038(o.coordinates); |
| 379 unittest.expect(o.type, unittest.equals('foo')); | 414 unittest.expect(o.type, unittest.equals('foo')); |
| 380 } | 415 } |
| 381 buildCounterPolygon--; | 416 buildCounterPolygon--; |
| 382 } | 417 } |
| 383 | 418 |
| 384 core.int buildCounterPolygonStyle = 0; | 419 core.int buildCounterPolygonStyle = 0; |
| 385 buildPolygonStyle() { | 420 buildPolygonStyle() { |
| 386 var o = new api.PolygonStyle(); | 421 var o = new api.PolygonStyle(); |
| 387 buildCounterPolygonStyle++; | 422 buildCounterPolygonStyle++; |
| 388 if (buildCounterPolygonStyle < 3) { | 423 if (buildCounterPolygonStyle < 3) { |
| (...skipping 18 matching lines...) Expand all Loading... |
| 407 unittest.expect(o.fillOpacity, unittest.equals(42.0)); | 442 unittest.expect(o.fillOpacity, unittest.equals(42.0)); |
| 408 unittest.expect(o.strokeColor, unittest.equals('foo')); | 443 unittest.expect(o.strokeColor, unittest.equals('foo')); |
| 409 checkStyleFunction(o.strokeColorStyler); | 444 checkStyleFunction(o.strokeColorStyler); |
| 410 unittest.expect(o.strokeOpacity, unittest.equals(42.0)); | 445 unittest.expect(o.strokeOpacity, unittest.equals(42.0)); |
| 411 unittest.expect(o.strokeWeight, unittest.equals(42)); | 446 unittest.expect(o.strokeWeight, unittest.equals(42)); |
| 412 checkStyleFunction(o.strokeWeightStyler); | 447 checkStyleFunction(o.strokeWeightStyler); |
| 413 } | 448 } |
| 414 buildCounterPolygonStyle--; | 449 buildCounterPolygonStyle--; |
| 415 } | 450 } |
| 416 | 451 |
| 417 buildUnnamed1442() { | 452 buildUnnamed1039() { |
| 418 var o = new core.List<core.String>(); | 453 var o = new core.List<core.String>(); |
| 419 o.add("foo"); | 454 o.add("foo"); |
| 420 o.add("foo"); | 455 o.add("foo"); |
| 421 return o; | 456 return o; |
| 422 } | 457 } |
| 423 | 458 |
| 424 checkUnnamed1442(core.List<core.String> o) { | 459 checkUnnamed1039(core.List<core.String> o) { |
| 425 unittest.expect(o, unittest.hasLength(2)); | 460 unittest.expect(o, unittest.hasLength(2)); |
| 426 unittest.expect(o[0], unittest.equals('foo')); | 461 unittest.expect(o[0], unittest.equals('foo')); |
| 427 unittest.expect(o[1], unittest.equals('foo')); | 462 unittest.expect(o[1], unittest.equals('foo')); |
| 428 } | 463 } |
| 429 | 464 |
| 430 buildUnnamed1443() { | 465 buildUnnamed1040() { |
| 431 var o = new core.List<core.Object>(); | 466 var o = new core.List<core.Object>(); |
| 432 o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}); | 467 o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}); |
| 433 o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}); | 468 o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}); |
| 434 return o; | 469 return o; |
| 435 } | 470 } |
| 436 | 471 |
| 437 checkUnnamed1443(core.List<core.Object> o) { | 472 checkUnnamed1040(core.List<core.Object> o) { |
| 438 unittest.expect(o, unittest.hasLength(2)); | 473 unittest.expect(o, unittest.hasLength(2)); |
| 439 var casted4 = (o[0]) as core.Map; unittest.expect(casted4, unittest.hasLength(
3)); unittest.expect(casted4["list"], unittest.equals([1, 2, 3])); unittest.expe
ct(casted4["bool"], unittest.equals(true)); unittest.expect(casted4["string"], u
nittest.equals('foo')); | 474 var casted4 = (o[0]) as core.Map; unittest.expect(casted4, unittest.hasLength(
3)); unittest.expect(casted4["list"], unittest.equals([1, 2, 3])); unittest.expe
ct(casted4["bool"], unittest.equals(true)); unittest.expect(casted4["string"], u
nittest.equals('foo')); |
| 440 var casted5 = (o[1]) as core.Map; unittest.expect(casted5, unittest.hasLength(
3)); unittest.expect(casted5["list"], unittest.equals([1, 2, 3])); unittest.expe
ct(casted5["bool"], unittest.equals(true)); unittest.expect(casted5["string"], u
nittest.equals('foo')); | 475 var casted5 = (o[1]) as core.Map; unittest.expect(casted5, unittest.hasLength(
3)); unittest.expect(casted5["list"], unittest.equals([1, 2, 3])); unittest.expe
ct(casted5["bool"], unittest.equals(true)); unittest.expect(casted5["string"], u
nittest.equals('foo')); |
| 441 } | 476 } |
| 442 | 477 |
| 443 buildUnnamed1444() { | 478 buildUnnamed1041() { |
| 444 var o = new core.List<core.List<core.Object>>(); | 479 var o = new core.List<core.List<core.Object>>(); |
| 445 o.add(buildUnnamed1443()); | 480 o.add(buildUnnamed1040()); |
| 446 o.add(buildUnnamed1443()); | 481 o.add(buildUnnamed1040()); |
| 447 return o; | 482 return o; |
| 448 } | 483 } |
| 449 | 484 |
| 450 checkUnnamed1444(core.List<core.List<core.Object>> o) { | 485 checkUnnamed1041(core.List<core.List<core.Object>> o) { |
| 451 unittest.expect(o, unittest.hasLength(2)); | 486 unittest.expect(o, unittest.hasLength(2)); |
| 452 checkUnnamed1443(o[0]); | 487 checkUnnamed1040(o[0]); |
| 453 checkUnnamed1443(o[1]); | 488 checkUnnamed1040(o[1]); |
| 454 } | 489 } |
| 455 | 490 |
| 456 core.int buildCounterSqlresponse = 0; | 491 core.int buildCounterSqlresponse = 0; |
| 457 buildSqlresponse() { | 492 buildSqlresponse() { |
| 458 var o = new api.Sqlresponse(); | 493 var o = new api.Sqlresponse(); |
| 459 buildCounterSqlresponse++; | 494 buildCounterSqlresponse++; |
| 460 if (buildCounterSqlresponse < 3) { | 495 if (buildCounterSqlresponse < 3) { |
| 461 o.columns = buildUnnamed1442(); | 496 o.columns = buildUnnamed1039(); |
| 462 o.kind = "foo"; | 497 o.kind = "foo"; |
| 463 o.rows = buildUnnamed1444(); | 498 o.rows = buildUnnamed1041(); |
| 464 } | 499 } |
| 465 buildCounterSqlresponse--; | 500 buildCounterSqlresponse--; |
| 466 return o; | 501 return o; |
| 467 } | 502 } |
| 468 | 503 |
| 469 checkSqlresponse(api.Sqlresponse o) { | 504 checkSqlresponse(api.Sqlresponse o) { |
| 470 buildCounterSqlresponse++; | 505 buildCounterSqlresponse++; |
| 471 if (buildCounterSqlresponse < 3) { | 506 if (buildCounterSqlresponse < 3) { |
| 472 checkUnnamed1442(o.columns); | 507 checkUnnamed1039(o.columns); |
| 473 unittest.expect(o.kind, unittest.equals('foo')); | 508 unittest.expect(o.kind, unittest.equals('foo')); |
| 474 checkUnnamed1444(o.rows); | 509 checkUnnamed1041(o.rows); |
| 475 } | 510 } |
| 476 buildCounterSqlresponse--; | 511 buildCounterSqlresponse--; |
| 477 } | 512 } |
| 478 | 513 |
| 479 buildUnnamed1445() { | 514 buildUnnamed1042() { |
| 480 var o = new core.List<api.Bucket>(); | 515 var o = new core.List<api.Bucket>(); |
| 481 o.add(buildBucket()); | 516 o.add(buildBucket()); |
| 482 o.add(buildBucket()); | 517 o.add(buildBucket()); |
| 483 return o; | 518 return o; |
| 484 } | 519 } |
| 485 | 520 |
| 486 checkUnnamed1445(core.List<api.Bucket> o) { | 521 checkUnnamed1042(core.List<api.Bucket> o) { |
| 487 unittest.expect(o, unittest.hasLength(2)); | 522 unittest.expect(o, unittest.hasLength(2)); |
| 488 checkBucket(o[0]); | 523 checkBucket(o[0]); |
| 489 checkBucket(o[1]); | 524 checkBucket(o[1]); |
| 490 } | 525 } |
| 491 | 526 |
| 492 core.int buildCounterStyleFunctionGradientColors = 0; | 527 core.int buildCounterStyleFunctionGradientColors = 0; |
| 493 buildStyleFunctionGradientColors() { | 528 buildStyleFunctionGradientColors() { |
| 494 var o = new api.StyleFunctionGradientColors(); | 529 var o = new api.StyleFunctionGradientColors(); |
| 495 buildCounterStyleFunctionGradientColors++; | 530 buildCounterStyleFunctionGradientColors++; |
| 496 if (buildCounterStyleFunctionGradientColors < 3) { | 531 if (buildCounterStyleFunctionGradientColors < 3) { |
| 497 o.color = "foo"; | 532 o.color = "foo"; |
| 498 o.opacity = 42.0; | 533 o.opacity = 42.0; |
| 499 } | 534 } |
| 500 buildCounterStyleFunctionGradientColors--; | 535 buildCounterStyleFunctionGradientColors--; |
| 501 return o; | 536 return o; |
| 502 } | 537 } |
| 503 | 538 |
| 504 checkStyleFunctionGradientColors(api.StyleFunctionGradientColors o) { | 539 checkStyleFunctionGradientColors(api.StyleFunctionGradientColors o) { |
| 505 buildCounterStyleFunctionGradientColors++; | 540 buildCounterStyleFunctionGradientColors++; |
| 506 if (buildCounterStyleFunctionGradientColors < 3) { | 541 if (buildCounterStyleFunctionGradientColors < 3) { |
| 507 unittest.expect(o.color, unittest.equals('foo')); | 542 unittest.expect(o.color, unittest.equals('foo')); |
| 508 unittest.expect(o.opacity, unittest.equals(42.0)); | 543 unittest.expect(o.opacity, unittest.equals(42.0)); |
| 509 } | 544 } |
| 510 buildCounterStyleFunctionGradientColors--; | 545 buildCounterStyleFunctionGradientColors--; |
| 511 } | 546 } |
| 512 | 547 |
| 513 buildUnnamed1446() { | 548 buildUnnamed1043() { |
| 514 var o = new core.List<api.StyleFunctionGradientColors>(); | 549 var o = new core.List<api.StyleFunctionGradientColors>(); |
| 515 o.add(buildStyleFunctionGradientColors()); | 550 o.add(buildStyleFunctionGradientColors()); |
| 516 o.add(buildStyleFunctionGradientColors()); | 551 o.add(buildStyleFunctionGradientColors()); |
| 517 return o; | 552 return o; |
| 518 } | 553 } |
| 519 | 554 |
| 520 checkUnnamed1446(core.List<api.StyleFunctionGradientColors> o) { | 555 checkUnnamed1043(core.List<api.StyleFunctionGradientColors> o) { |
| 521 unittest.expect(o, unittest.hasLength(2)); | 556 unittest.expect(o, unittest.hasLength(2)); |
| 522 checkStyleFunctionGradientColors(o[0]); | 557 checkStyleFunctionGradientColors(o[0]); |
| 523 checkStyleFunctionGradientColors(o[1]); | 558 checkStyleFunctionGradientColors(o[1]); |
| 524 } | 559 } |
| 525 | 560 |
| 526 core.int buildCounterStyleFunctionGradient = 0; | 561 core.int buildCounterStyleFunctionGradient = 0; |
| 527 buildStyleFunctionGradient() { | 562 buildStyleFunctionGradient() { |
| 528 var o = new api.StyleFunctionGradient(); | 563 var o = new api.StyleFunctionGradient(); |
| 529 buildCounterStyleFunctionGradient++; | 564 buildCounterStyleFunctionGradient++; |
| 530 if (buildCounterStyleFunctionGradient < 3) { | 565 if (buildCounterStyleFunctionGradient < 3) { |
| 531 o.colors = buildUnnamed1446(); | 566 o.colors = buildUnnamed1043(); |
| 532 o.max = 42.0; | 567 o.max = 42.0; |
| 533 o.min = 42.0; | 568 o.min = 42.0; |
| 534 } | 569 } |
| 535 buildCounterStyleFunctionGradient--; | 570 buildCounterStyleFunctionGradient--; |
| 536 return o; | 571 return o; |
| 537 } | 572 } |
| 538 | 573 |
| 539 checkStyleFunctionGradient(api.StyleFunctionGradient o) { | 574 checkStyleFunctionGradient(api.StyleFunctionGradient o) { |
| 540 buildCounterStyleFunctionGradient++; | 575 buildCounterStyleFunctionGradient++; |
| 541 if (buildCounterStyleFunctionGradient < 3) { | 576 if (buildCounterStyleFunctionGradient < 3) { |
| 542 checkUnnamed1446(o.colors); | 577 checkUnnamed1043(o.colors); |
| 543 unittest.expect(o.max, unittest.equals(42.0)); | 578 unittest.expect(o.max, unittest.equals(42.0)); |
| 544 unittest.expect(o.min, unittest.equals(42.0)); | 579 unittest.expect(o.min, unittest.equals(42.0)); |
| 545 } | 580 } |
| 546 buildCounterStyleFunctionGradient--; | 581 buildCounterStyleFunctionGradient--; |
| 547 } | 582 } |
| 548 | 583 |
| 549 core.int buildCounterStyleFunction = 0; | 584 core.int buildCounterStyleFunction = 0; |
| 550 buildStyleFunction() { | 585 buildStyleFunction() { |
| 551 var o = new api.StyleFunction(); | 586 var o = new api.StyleFunction(); |
| 552 buildCounterStyleFunction++; | 587 buildCounterStyleFunction++; |
| 553 if (buildCounterStyleFunction < 3) { | 588 if (buildCounterStyleFunction < 3) { |
| 554 o.buckets = buildUnnamed1445(); | 589 o.buckets = buildUnnamed1042(); |
| 555 o.columnName = "foo"; | 590 o.columnName = "foo"; |
| 556 o.gradient = buildStyleFunctionGradient(); | 591 o.gradient = buildStyleFunctionGradient(); |
| 557 o.kind = "foo"; | 592 o.kind = "foo"; |
| 558 } | 593 } |
| 559 buildCounterStyleFunction--; | 594 buildCounterStyleFunction--; |
| 560 return o; | 595 return o; |
| 561 } | 596 } |
| 562 | 597 |
| 563 checkStyleFunction(api.StyleFunction o) { | 598 checkStyleFunction(api.StyleFunction o) { |
| 564 buildCounterStyleFunction++; | 599 buildCounterStyleFunction++; |
| 565 if (buildCounterStyleFunction < 3) { | 600 if (buildCounterStyleFunction < 3) { |
| 566 checkUnnamed1445(o.buckets); | 601 checkUnnamed1042(o.buckets); |
| 567 unittest.expect(o.columnName, unittest.equals('foo')); | 602 unittest.expect(o.columnName, unittest.equals('foo')); |
| 568 checkStyleFunctionGradient(o.gradient); | 603 checkStyleFunctionGradient(o.gradient); |
| 569 unittest.expect(o.kind, unittest.equals('foo')); | 604 unittest.expect(o.kind, unittest.equals('foo')); |
| 570 } | 605 } |
| 571 buildCounterStyleFunction--; | 606 buildCounterStyleFunction--; |
| 572 } | 607 } |
| 573 | 608 |
| 574 core.int buildCounterStyleSetting = 0; | 609 core.int buildCounterStyleSetting = 0; |
| 575 buildStyleSetting() { | 610 buildStyleSetting() { |
| 576 var o = new api.StyleSetting(); | 611 var o = new api.StyleSetting(); |
| (...skipping 18 matching lines...) Expand all Loading... |
| 595 checkPointStyle(o.markerOptions); | 630 checkPointStyle(o.markerOptions); |
| 596 unittest.expect(o.name, unittest.equals('foo')); | 631 unittest.expect(o.name, unittest.equals('foo')); |
| 597 checkPolygonStyle(o.polygonOptions); | 632 checkPolygonStyle(o.polygonOptions); |
| 598 checkLineStyle(o.polylineOptions); | 633 checkLineStyle(o.polylineOptions); |
| 599 unittest.expect(o.styleId, unittest.equals(42)); | 634 unittest.expect(o.styleId, unittest.equals(42)); |
| 600 unittest.expect(o.tableId, unittest.equals('foo')); | 635 unittest.expect(o.tableId, unittest.equals('foo')); |
| 601 } | 636 } |
| 602 buildCounterStyleSetting--; | 637 buildCounterStyleSetting--; |
| 603 } | 638 } |
| 604 | 639 |
| 605 buildUnnamed1447() { | 640 buildUnnamed1044() { |
| 606 var o = new core.List<api.StyleSetting>(); | 641 var o = new core.List<api.StyleSetting>(); |
| 607 o.add(buildStyleSetting()); | 642 o.add(buildStyleSetting()); |
| 608 o.add(buildStyleSetting()); | 643 o.add(buildStyleSetting()); |
| 609 return o; | 644 return o; |
| 610 } | 645 } |
| 611 | 646 |
| 612 checkUnnamed1447(core.List<api.StyleSetting> o) { | 647 checkUnnamed1044(core.List<api.StyleSetting> o) { |
| 613 unittest.expect(o, unittest.hasLength(2)); | 648 unittest.expect(o, unittest.hasLength(2)); |
| 614 checkStyleSetting(o[0]); | 649 checkStyleSetting(o[0]); |
| 615 checkStyleSetting(o[1]); | 650 checkStyleSetting(o[1]); |
| 616 } | 651 } |
| 617 | 652 |
| 618 core.int buildCounterStyleSettingList = 0; | 653 core.int buildCounterStyleSettingList = 0; |
| 619 buildStyleSettingList() { | 654 buildStyleSettingList() { |
| 620 var o = new api.StyleSettingList(); | 655 var o = new api.StyleSettingList(); |
| 621 buildCounterStyleSettingList++; | 656 buildCounterStyleSettingList++; |
| 622 if (buildCounterStyleSettingList < 3) { | 657 if (buildCounterStyleSettingList < 3) { |
| 623 o.items = buildUnnamed1447(); | 658 o.items = buildUnnamed1044(); |
| 624 o.kind = "foo"; | 659 o.kind = "foo"; |
| 625 o.nextPageToken = "foo"; | 660 o.nextPageToken = "foo"; |
| 626 o.totalItems = 42; | 661 o.totalItems = 42; |
| 627 } | 662 } |
| 628 buildCounterStyleSettingList--; | 663 buildCounterStyleSettingList--; |
| 629 return o; | 664 return o; |
| 630 } | 665 } |
| 631 | 666 |
| 632 checkStyleSettingList(api.StyleSettingList o) { | 667 checkStyleSettingList(api.StyleSettingList o) { |
| 633 buildCounterStyleSettingList++; | 668 buildCounterStyleSettingList++; |
| 634 if (buildCounterStyleSettingList < 3) { | 669 if (buildCounterStyleSettingList < 3) { |
| 635 checkUnnamed1447(o.items); | 670 checkUnnamed1044(o.items); |
| 636 unittest.expect(o.kind, unittest.equals('foo')); | 671 unittest.expect(o.kind, unittest.equals('foo')); |
| 637 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 672 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 638 unittest.expect(o.totalItems, unittest.equals(42)); | 673 unittest.expect(o.totalItems, unittest.equals(42)); |
| 639 } | 674 } |
| 640 buildCounterStyleSettingList--; | 675 buildCounterStyleSettingList--; |
| 641 } | 676 } |
| 642 | 677 |
| 643 buildUnnamed1448() { | 678 buildUnnamed1045() { |
| 644 var o = new core.List<core.String>(); | 679 var o = new core.List<core.String>(); |
| 645 o.add("foo"); | 680 o.add("foo"); |
| 646 o.add("foo"); | 681 o.add("foo"); |
| 647 return o; | 682 return o; |
| 648 } | 683 } |
| 649 | 684 |
| 650 checkUnnamed1448(core.List<core.String> o) { | 685 checkUnnamed1045(core.List<core.String> o) { |
| 651 unittest.expect(o, unittest.hasLength(2)); | 686 unittest.expect(o, unittest.hasLength(2)); |
| 652 unittest.expect(o[0], unittest.equals('foo')); | 687 unittest.expect(o[0], unittest.equals('foo')); |
| 653 unittest.expect(o[1], unittest.equals('foo')); | 688 unittest.expect(o[1], unittest.equals('foo')); |
| 654 } | 689 } |
| 655 | 690 |
| 656 buildUnnamed1449() { | 691 buildUnnamed1046() { |
| 657 var o = new core.List<api.Column>(); | 692 var o = new core.List<api.Column>(); |
| 658 o.add(buildColumn()); | 693 o.add(buildColumn()); |
| 659 o.add(buildColumn()); | 694 o.add(buildColumn()); |
| 660 return o; | 695 return o; |
| 661 } | 696 } |
| 662 | 697 |
| 663 checkUnnamed1449(core.List<api.Column> o) { | 698 checkUnnamed1046(core.List<api.Column> o) { |
| 664 unittest.expect(o, unittest.hasLength(2)); | 699 unittest.expect(o, unittest.hasLength(2)); |
| 665 checkColumn(o[0]); | 700 checkColumn(o[0]); |
| 666 checkColumn(o[1]); | 701 checkColumn(o[1]); |
| 667 } | 702 } |
| 668 | 703 |
| 669 core.int buildCounterTable = 0; | 704 core.int buildCounterTable = 0; |
| 670 buildTable() { | 705 buildTable() { |
| 671 var o = new api.Table(); | 706 var o = new api.Table(); |
| 672 buildCounterTable++; | 707 buildCounterTable++; |
| 673 if (buildCounterTable < 3) { | 708 if (buildCounterTable < 3) { |
| 674 o.attribution = "foo"; | 709 o.attribution = "foo"; |
| 675 o.attributionLink = "foo"; | 710 o.attributionLink = "foo"; |
| 676 o.baseTableIds = buildUnnamed1448(); | 711 o.baseTableIds = buildUnnamed1045(); |
| 677 o.columns = buildUnnamed1449(); | 712 o.columns = buildUnnamed1046(); |
| 678 o.description = "foo"; | 713 o.description = "foo"; |
| 679 o.isExportable = true; | 714 o.isExportable = true; |
| 680 o.kind = "foo"; | 715 o.kind = "foo"; |
| 681 o.name = "foo"; | 716 o.name = "foo"; |
| 682 o.sql = "foo"; | 717 o.sql = "foo"; |
| 683 o.tableId = "foo"; | 718 o.tableId = "foo"; |
| 684 } | 719 } |
| 685 buildCounterTable--; | 720 buildCounterTable--; |
| 686 return o; | 721 return o; |
| 687 } | 722 } |
| 688 | 723 |
| 689 checkTable(api.Table o) { | 724 checkTable(api.Table o) { |
| 690 buildCounterTable++; | 725 buildCounterTable++; |
| 691 if (buildCounterTable < 3) { | 726 if (buildCounterTable < 3) { |
| 692 unittest.expect(o.attribution, unittest.equals('foo')); | 727 unittest.expect(o.attribution, unittest.equals('foo')); |
| 693 unittest.expect(o.attributionLink, unittest.equals('foo')); | 728 unittest.expect(o.attributionLink, unittest.equals('foo')); |
| 694 checkUnnamed1448(o.baseTableIds); | 729 checkUnnamed1045(o.baseTableIds); |
| 695 checkUnnamed1449(o.columns); | 730 checkUnnamed1046(o.columns); |
| 696 unittest.expect(o.description, unittest.equals('foo')); | 731 unittest.expect(o.description, unittest.equals('foo')); |
| 697 unittest.expect(o.isExportable, unittest.isTrue); | 732 unittest.expect(o.isExportable, unittest.isTrue); |
| 698 unittest.expect(o.kind, unittest.equals('foo')); | 733 unittest.expect(o.kind, unittest.equals('foo')); |
| 699 unittest.expect(o.name, unittest.equals('foo')); | 734 unittest.expect(o.name, unittest.equals('foo')); |
| 700 unittest.expect(o.sql, unittest.equals('foo')); | 735 unittest.expect(o.sql, unittest.equals('foo')); |
| 701 unittest.expect(o.tableId, unittest.equals('foo')); | 736 unittest.expect(o.tableId, unittest.equals('foo')); |
| 702 } | 737 } |
| 703 buildCounterTable--; | 738 buildCounterTable--; |
| 704 } | 739 } |
| 705 | 740 |
| 706 buildUnnamed1450() { | 741 buildUnnamed1047() { |
| 707 var o = new core.List<api.Table>(); | 742 var o = new core.List<api.Table>(); |
| 708 o.add(buildTable()); | 743 o.add(buildTable()); |
| 709 o.add(buildTable()); | 744 o.add(buildTable()); |
| 710 return o; | 745 return o; |
| 711 } | 746 } |
| 712 | 747 |
| 713 checkUnnamed1450(core.List<api.Table> o) { | 748 checkUnnamed1047(core.List<api.Table> o) { |
| 714 unittest.expect(o, unittest.hasLength(2)); | 749 unittest.expect(o, unittest.hasLength(2)); |
| 715 checkTable(o[0]); | 750 checkTable(o[0]); |
| 716 checkTable(o[1]); | 751 checkTable(o[1]); |
| 717 } | 752 } |
| 718 | 753 |
| 719 core.int buildCounterTableList = 0; | 754 core.int buildCounterTableList = 0; |
| 720 buildTableList() { | 755 buildTableList() { |
| 721 var o = new api.TableList(); | 756 var o = new api.TableList(); |
| 722 buildCounterTableList++; | 757 buildCounterTableList++; |
| 723 if (buildCounterTableList < 3) { | 758 if (buildCounterTableList < 3) { |
| 724 o.items = buildUnnamed1450(); | 759 o.items = buildUnnamed1047(); |
| 725 o.kind = "foo"; | 760 o.kind = "foo"; |
| 726 o.nextPageToken = "foo"; | 761 o.nextPageToken = "foo"; |
| 727 } | 762 } |
| 728 buildCounterTableList--; | 763 buildCounterTableList--; |
| 729 return o; | 764 return o; |
| 730 } | 765 } |
| 731 | 766 |
| 732 checkTableList(api.TableList o) { | 767 checkTableList(api.TableList o) { |
| 733 buildCounterTableList++; | 768 buildCounterTableList++; |
| 734 if (buildCounterTableList < 3) { | 769 if (buildCounterTableList < 3) { |
| 735 checkUnnamed1450(o.items); | 770 checkUnnamed1047(o.items); |
| 736 unittest.expect(o.kind, unittest.equals('foo')); | 771 unittest.expect(o.kind, unittest.equals('foo')); |
| 737 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 772 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 738 } | 773 } |
| 739 buildCounterTableList--; | 774 buildCounterTableList--; |
| 740 } | 775 } |
| 741 | 776 |
| 742 core.int buildCounterTask = 0; | 777 core.int buildCounterTask = 0; |
| 743 buildTask() { | 778 buildTask() { |
| 744 var o = new api.Task(); | 779 var o = new api.Task(); |
| 745 buildCounterTask++; | 780 buildCounterTask++; |
| (...skipping 13 matching lines...) Expand all Loading... |
| 759 if (buildCounterTask < 3) { | 794 if (buildCounterTask < 3) { |
| 760 unittest.expect(o.kind, unittest.equals('foo')); | 795 unittest.expect(o.kind, unittest.equals('foo')); |
| 761 unittest.expect(o.progress, unittest.equals('foo')); | 796 unittest.expect(o.progress, unittest.equals('foo')); |
| 762 unittest.expect(o.started, unittest.isTrue); | 797 unittest.expect(o.started, unittest.isTrue); |
| 763 unittest.expect(o.taskId, unittest.equals('foo')); | 798 unittest.expect(o.taskId, unittest.equals('foo')); |
| 764 unittest.expect(o.type, unittest.equals('foo')); | 799 unittest.expect(o.type, unittest.equals('foo')); |
| 765 } | 800 } |
| 766 buildCounterTask--; | 801 buildCounterTask--; |
| 767 } | 802 } |
| 768 | 803 |
| 769 buildUnnamed1451() { | 804 buildUnnamed1048() { |
| 770 var o = new core.List<api.Task>(); | 805 var o = new core.List<api.Task>(); |
| 771 o.add(buildTask()); | 806 o.add(buildTask()); |
| 772 o.add(buildTask()); | 807 o.add(buildTask()); |
| 773 return o; | 808 return o; |
| 774 } | 809 } |
| 775 | 810 |
| 776 checkUnnamed1451(core.List<api.Task> o) { | 811 checkUnnamed1048(core.List<api.Task> o) { |
| 777 unittest.expect(o, unittest.hasLength(2)); | 812 unittest.expect(o, unittest.hasLength(2)); |
| 778 checkTask(o[0]); | 813 checkTask(o[0]); |
| 779 checkTask(o[1]); | 814 checkTask(o[1]); |
| 780 } | 815 } |
| 781 | 816 |
| 782 core.int buildCounterTaskList = 0; | 817 core.int buildCounterTaskList = 0; |
| 783 buildTaskList() { | 818 buildTaskList() { |
| 784 var o = new api.TaskList(); | 819 var o = new api.TaskList(); |
| 785 buildCounterTaskList++; | 820 buildCounterTaskList++; |
| 786 if (buildCounterTaskList < 3) { | 821 if (buildCounterTaskList < 3) { |
| 787 o.items = buildUnnamed1451(); | 822 o.items = buildUnnamed1048(); |
| 788 o.kind = "foo"; | 823 o.kind = "foo"; |
| 789 o.nextPageToken = "foo"; | 824 o.nextPageToken = "foo"; |
| 790 o.totalItems = 42; | 825 o.totalItems = 42; |
| 791 } | 826 } |
| 792 buildCounterTaskList--; | 827 buildCounterTaskList--; |
| 793 return o; | 828 return o; |
| 794 } | 829 } |
| 795 | 830 |
| 796 checkTaskList(api.TaskList o) { | 831 checkTaskList(api.TaskList o) { |
| 797 buildCounterTaskList++; | 832 buildCounterTaskList++; |
| 798 if (buildCounterTaskList < 3) { | 833 if (buildCounterTaskList < 3) { |
| 799 checkUnnamed1451(o.items); | 834 checkUnnamed1048(o.items); |
| 800 unittest.expect(o.kind, unittest.equals('foo')); | 835 unittest.expect(o.kind, unittest.equals('foo')); |
| 801 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 836 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 802 unittest.expect(o.totalItems, unittest.equals(42)); | 837 unittest.expect(o.totalItems, unittest.equals(42)); |
| 803 } | 838 } |
| 804 buildCounterTaskList--; | 839 buildCounterTaskList--; |
| 805 } | 840 } |
| 806 | 841 |
| 807 buildUnnamed1452() { | 842 buildUnnamed1049() { |
| 808 var o = new core.List<core.String>(); | 843 var o = new core.List<core.String>(); |
| 809 o.add("foo"); | 844 o.add("foo"); |
| 810 o.add("foo"); | 845 o.add("foo"); |
| 811 return o; | 846 return o; |
| 812 } | 847 } |
| 813 | 848 |
| 814 checkUnnamed1452(core.List<core.String> o) { | 849 checkUnnamed1049(core.List<core.String> o) { |
| 815 unittest.expect(o, unittest.hasLength(2)); | 850 unittest.expect(o, unittest.hasLength(2)); |
| 816 unittest.expect(o[0], unittest.equals('foo')); | 851 unittest.expect(o[0], unittest.equals('foo')); |
| 817 unittest.expect(o[1], unittest.equals('foo')); | 852 unittest.expect(o[1], unittest.equals('foo')); |
| 818 } | 853 } |
| 819 | 854 |
| 820 core.int buildCounterTemplate = 0; | 855 core.int buildCounterTemplate = 0; |
| 821 buildTemplate() { | 856 buildTemplate() { |
| 822 var o = new api.Template(); | 857 var o = new api.Template(); |
| 823 buildCounterTemplate++; | 858 buildCounterTemplate++; |
| 824 if (buildCounterTemplate < 3) { | 859 if (buildCounterTemplate < 3) { |
| 825 o.automaticColumnNames = buildUnnamed1452(); | 860 o.automaticColumnNames = buildUnnamed1049(); |
| 826 o.body = "foo"; | 861 o.body = "foo"; |
| 827 o.kind = "foo"; | 862 o.kind = "foo"; |
| 828 o.name = "foo"; | 863 o.name = "foo"; |
| 829 o.tableId = "foo"; | 864 o.tableId = "foo"; |
| 830 o.templateId = 42; | 865 o.templateId = 42; |
| 831 } | 866 } |
| 832 buildCounterTemplate--; | 867 buildCounterTemplate--; |
| 833 return o; | 868 return o; |
| 834 } | 869 } |
| 835 | 870 |
| 836 checkTemplate(api.Template o) { | 871 checkTemplate(api.Template o) { |
| 837 buildCounterTemplate++; | 872 buildCounterTemplate++; |
| 838 if (buildCounterTemplate < 3) { | 873 if (buildCounterTemplate < 3) { |
| 839 checkUnnamed1452(o.automaticColumnNames); | 874 checkUnnamed1049(o.automaticColumnNames); |
| 840 unittest.expect(o.body, unittest.equals('foo')); | 875 unittest.expect(o.body, unittest.equals('foo')); |
| 841 unittest.expect(o.kind, unittest.equals('foo')); | 876 unittest.expect(o.kind, unittest.equals('foo')); |
| 842 unittest.expect(o.name, unittest.equals('foo')); | 877 unittest.expect(o.name, unittest.equals('foo')); |
| 843 unittest.expect(o.tableId, unittest.equals('foo')); | 878 unittest.expect(o.tableId, unittest.equals('foo')); |
| 844 unittest.expect(o.templateId, unittest.equals(42)); | 879 unittest.expect(o.templateId, unittest.equals(42)); |
| 845 } | 880 } |
| 846 buildCounterTemplate--; | 881 buildCounterTemplate--; |
| 847 } | 882 } |
| 848 | 883 |
| 849 buildUnnamed1453() { | 884 buildUnnamed1050() { |
| 850 var o = new core.List<api.Template>(); | 885 var o = new core.List<api.Template>(); |
| 851 o.add(buildTemplate()); | 886 o.add(buildTemplate()); |
| 852 o.add(buildTemplate()); | 887 o.add(buildTemplate()); |
| 853 return o; | 888 return o; |
| 854 } | 889 } |
| 855 | 890 |
| 856 checkUnnamed1453(core.List<api.Template> o) { | 891 checkUnnamed1050(core.List<api.Template> o) { |
| 857 unittest.expect(o, unittest.hasLength(2)); | 892 unittest.expect(o, unittest.hasLength(2)); |
| 858 checkTemplate(o[0]); | 893 checkTemplate(o[0]); |
| 859 checkTemplate(o[1]); | 894 checkTemplate(o[1]); |
| 860 } | 895 } |
| 861 | 896 |
| 862 core.int buildCounterTemplateList = 0; | 897 core.int buildCounterTemplateList = 0; |
| 863 buildTemplateList() { | 898 buildTemplateList() { |
| 864 var o = new api.TemplateList(); | 899 var o = new api.TemplateList(); |
| 865 buildCounterTemplateList++; | 900 buildCounterTemplateList++; |
| 866 if (buildCounterTemplateList < 3) { | 901 if (buildCounterTemplateList < 3) { |
| 867 o.items = buildUnnamed1453(); | 902 o.items = buildUnnamed1050(); |
| 868 o.kind = "foo"; | 903 o.kind = "foo"; |
| 869 o.nextPageToken = "foo"; | 904 o.nextPageToken = "foo"; |
| 870 o.totalItems = 42; | 905 o.totalItems = 42; |
| 871 } | 906 } |
| 872 buildCounterTemplateList--; | 907 buildCounterTemplateList--; |
| 873 return o; | 908 return o; |
| 874 } | 909 } |
| 875 | 910 |
| 876 checkTemplateList(api.TemplateList o) { | 911 checkTemplateList(api.TemplateList o) { |
| 877 buildCounterTemplateList++; | 912 buildCounterTemplateList++; |
| 878 if (buildCounterTemplateList < 3) { | 913 if (buildCounterTemplateList < 3) { |
| 879 checkUnnamed1453(o.items); | 914 checkUnnamed1050(o.items); |
| 880 unittest.expect(o.kind, unittest.equals('foo')); | 915 unittest.expect(o.kind, unittest.equals('foo')); |
| 881 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 916 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 882 unittest.expect(o.totalItems, unittest.equals(42)); | 917 unittest.expect(o.totalItems, unittest.equals(42)); |
| 883 } | 918 } |
| 884 buildCounterTemplateList--; | 919 buildCounterTemplateList--; |
| 885 } | 920 } |
| 886 | 921 |
| 887 | 922 |
| 888 main() { | 923 main() { |
| 889 unittest.group("obj-schema-Bucket", () { | 924 unittest.group("obj-schema-Bucket", () { |
| (...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1098 var o = buildTemplateList(); | 1133 var o = buildTemplateList(); |
| 1099 var od = new api.TemplateList.fromJson(o.toJson()); | 1134 var od = new api.TemplateList.fromJson(o.toJson()); |
| 1100 checkTemplateList(od); | 1135 checkTemplateList(od); |
| 1101 }); | 1136 }); |
| 1102 }); | 1137 }); |
| 1103 | 1138 |
| 1104 | 1139 |
| 1105 unittest.group("resource-ColumnResourceApi", () { | 1140 unittest.group("resource-ColumnResourceApi", () { |
| 1106 unittest.test("method--delete", () { | 1141 unittest.test("method--delete", () { |
| 1107 | 1142 |
| 1108 var mock = new common_test.HttpServerMock(); | 1143 var mock = new HttpServerMock(); |
| 1109 api.ColumnResourceApi res = new api.FusiontablesApi(mock).column; | 1144 api.ColumnResourceApi res = new api.FusiontablesApi(mock).column; |
| 1110 var arg_tableId = "foo"; | 1145 var arg_tableId = "foo"; |
| 1111 var arg_columnId = "foo"; | 1146 var arg_columnId = "foo"; |
| 1112 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1147 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 1113 var path = (req.url).path; | 1148 var path = (req.url).path; |
| 1114 var pathOffset = 0; | 1149 var pathOffset = 0; |
| 1115 var index; | 1150 var index; |
| 1116 var subPart; | 1151 var subPart; |
| 1117 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1152 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1118 pathOffset += 1; | 1153 pathOffset += 1; |
| (...skipping 27 matching lines...) Expand all Loading... |
| 1146 var keyvalue = part.split("="); | 1181 var keyvalue = part.split("="); |
| 1147 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1182 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 1148 } | 1183 } |
| 1149 } | 1184 } |
| 1150 | 1185 |
| 1151 | 1186 |
| 1152 var h = { | 1187 var h = { |
| 1153 "content-type" : "application/json; charset=utf-8", | 1188 "content-type" : "application/json; charset=utf-8", |
| 1154 }; | 1189 }; |
| 1155 var resp = ""; | 1190 var resp = ""; |
| 1156 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 1191 return new async.Future.value(stringResponse(200, h, resp)); |
| 1157 }), true); | 1192 }), true); |
| 1158 res.delete(arg_tableId, arg_columnId).then(unittest.expectAsync((_) {})); | 1193 res.delete(arg_tableId, arg_columnId).then(unittest.expectAsync((_) {})); |
| 1159 }); | 1194 }); |
| 1160 | 1195 |
| 1161 unittest.test("method--get", () { | 1196 unittest.test("method--get", () { |
| 1162 | 1197 |
| 1163 var mock = new common_test.HttpServerMock(); | 1198 var mock = new HttpServerMock(); |
| 1164 api.ColumnResourceApi res = new api.FusiontablesApi(mock).column; | 1199 api.ColumnResourceApi res = new api.FusiontablesApi(mock).column; |
| 1165 var arg_tableId = "foo"; | 1200 var arg_tableId = "foo"; |
| 1166 var arg_columnId = "foo"; | 1201 var arg_columnId = "foo"; |
| 1167 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1202 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 1168 var path = (req.url).path; | 1203 var path = (req.url).path; |
| 1169 var pathOffset = 0; | 1204 var pathOffset = 0; |
| 1170 var index; | 1205 var index; |
| 1171 var subPart; | 1206 var subPart; |
| 1172 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1207 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1173 pathOffset += 1; | 1208 pathOffset += 1; |
| (...skipping 27 matching lines...) Expand all Loading... |
| 1201 var keyvalue = part.split("="); | 1236 var keyvalue = part.split("="); |
| 1202 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1237 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 1203 } | 1238 } |
| 1204 } | 1239 } |
| 1205 | 1240 |
| 1206 | 1241 |
| 1207 var h = { | 1242 var h = { |
| 1208 "content-type" : "application/json; charset=utf-8", | 1243 "content-type" : "application/json; charset=utf-8", |
| 1209 }; | 1244 }; |
| 1210 var resp = convert.JSON.encode(buildColumn()); | 1245 var resp = convert.JSON.encode(buildColumn()); |
| 1211 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 1246 return new async.Future.value(stringResponse(200, h, resp)); |
| 1212 }), true); | 1247 }), true); |
| 1213 res.get(arg_tableId, arg_columnId).then(unittest.expectAsync(((api.Column
response) { | 1248 res.get(arg_tableId, arg_columnId).then(unittest.expectAsync(((api.Column
response) { |
| 1214 checkColumn(response); | 1249 checkColumn(response); |
| 1215 }))); | 1250 }))); |
| 1216 }); | 1251 }); |
| 1217 | 1252 |
| 1218 unittest.test("method--insert", () { | 1253 unittest.test("method--insert", () { |
| 1219 | 1254 |
| 1220 var mock = new common_test.HttpServerMock(); | 1255 var mock = new HttpServerMock(); |
| 1221 api.ColumnResourceApi res = new api.FusiontablesApi(mock).column; | 1256 api.ColumnResourceApi res = new api.FusiontablesApi(mock).column; |
| 1222 var arg_request = buildColumn(); | 1257 var arg_request = buildColumn(); |
| 1223 var arg_tableId = "foo"; | 1258 var arg_tableId = "foo"; |
| 1224 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1259 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 1225 var obj = new api.Column.fromJson(json); | 1260 var obj = new api.Column.fromJson(json); |
| 1226 checkColumn(obj); | 1261 checkColumn(obj); |
| 1227 | 1262 |
| 1228 var path = (req.url).path; | 1263 var path = (req.url).path; |
| 1229 var pathOffset = 0; | 1264 var pathOffset = 0; |
| 1230 var index; | 1265 var index; |
| (...skipping 27 matching lines...) Expand all Loading... |
| 1258 var keyvalue = part.split("="); | 1293 var keyvalue = part.split("="); |
| 1259 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1294 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 1260 } | 1295 } |
| 1261 } | 1296 } |
| 1262 | 1297 |
| 1263 | 1298 |
| 1264 var h = { | 1299 var h = { |
| 1265 "content-type" : "application/json; charset=utf-8", | 1300 "content-type" : "application/json; charset=utf-8", |
| 1266 }; | 1301 }; |
| 1267 var resp = convert.JSON.encode(buildColumn()); | 1302 var resp = convert.JSON.encode(buildColumn()); |
| 1268 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 1303 return new async.Future.value(stringResponse(200, h, resp)); |
| 1269 }), true); | 1304 }), true); |
| 1270 res.insert(arg_request, arg_tableId).then(unittest.expectAsync(((api.Colum
n response) { | 1305 res.insert(arg_request, arg_tableId).then(unittest.expectAsync(((api.Colum
n response) { |
| 1271 checkColumn(response); | 1306 checkColumn(response); |
| 1272 }))); | 1307 }))); |
| 1273 }); | 1308 }); |
| 1274 | 1309 |
| 1275 unittest.test("method--list", () { | 1310 unittest.test("method--list", () { |
| 1276 | 1311 |
| 1277 var mock = new common_test.HttpServerMock(); | 1312 var mock = new HttpServerMock(); |
| 1278 api.ColumnResourceApi res = new api.FusiontablesApi(mock).column; | 1313 api.ColumnResourceApi res = new api.FusiontablesApi(mock).column; |
| 1279 var arg_tableId = "foo"; | 1314 var arg_tableId = "foo"; |
| 1280 var arg_maxResults = 42; | 1315 var arg_maxResults = 42; |
| 1281 var arg_pageToken = "foo"; | 1316 var arg_pageToken = "foo"; |
| 1282 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1317 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 1283 var path = (req.url).path; | 1318 var path = (req.url).path; |
| 1284 var pathOffset = 0; | 1319 var pathOffset = 0; |
| 1285 var index; | 1320 var index; |
| 1286 var subPart; | 1321 var subPart; |
| 1287 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1322 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| (...skipping 27 matching lines...) Expand all Loading... |
| 1315 } | 1350 } |
| 1316 } | 1351 } |
| 1317 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | 1352 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); |
| 1318 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 1353 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
| 1319 | 1354 |
| 1320 | 1355 |
| 1321 var h = { | 1356 var h = { |
| 1322 "content-type" : "application/json; charset=utf-8", | 1357 "content-type" : "application/json; charset=utf-8", |
| 1323 }; | 1358 }; |
| 1324 var resp = convert.JSON.encode(buildColumnList()); | 1359 var resp = convert.JSON.encode(buildColumnList()); |
| 1325 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 1360 return new async.Future.value(stringResponse(200, h, resp)); |
| 1326 }), true); | 1361 }), true); |
| 1327 res.list(arg_tableId, maxResults: arg_maxResults, pageToken: arg_pageToken
).then(unittest.expectAsync(((api.ColumnList response) { | 1362 res.list(arg_tableId, maxResults: arg_maxResults, pageToken: arg_pageToken
).then(unittest.expectAsync(((api.ColumnList response) { |
| 1328 checkColumnList(response); | 1363 checkColumnList(response); |
| 1329 }))); | 1364 }))); |
| 1330 }); | 1365 }); |
| 1331 | 1366 |
| 1332 unittest.test("method--patch", () { | 1367 unittest.test("method--patch", () { |
| 1333 | 1368 |
| 1334 var mock = new common_test.HttpServerMock(); | 1369 var mock = new HttpServerMock(); |
| 1335 api.ColumnResourceApi res = new api.FusiontablesApi(mock).column; | 1370 api.ColumnResourceApi res = new api.FusiontablesApi(mock).column; |
| 1336 var arg_request = buildColumn(); | 1371 var arg_request = buildColumn(); |
| 1337 var arg_tableId = "foo"; | 1372 var arg_tableId = "foo"; |
| 1338 var arg_columnId = "foo"; | 1373 var arg_columnId = "foo"; |
| 1339 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1374 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 1340 var obj = new api.Column.fromJson(json); | 1375 var obj = new api.Column.fromJson(json); |
| 1341 checkColumn(obj); | 1376 checkColumn(obj); |
| 1342 | 1377 |
| 1343 var path = (req.url).path; | 1378 var path = (req.url).path; |
| 1344 var pathOffset = 0; | 1379 var pathOffset = 0; |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1376 var keyvalue = part.split("="); | 1411 var keyvalue = part.split("="); |
| 1377 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1412 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 1378 } | 1413 } |
| 1379 } | 1414 } |
| 1380 | 1415 |
| 1381 | 1416 |
| 1382 var h = { | 1417 var h = { |
| 1383 "content-type" : "application/json; charset=utf-8", | 1418 "content-type" : "application/json; charset=utf-8", |
| 1384 }; | 1419 }; |
| 1385 var resp = convert.JSON.encode(buildColumn()); | 1420 var resp = convert.JSON.encode(buildColumn()); |
| 1386 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 1421 return new async.Future.value(stringResponse(200, h, resp)); |
| 1387 }), true); | 1422 }), true); |
| 1388 res.patch(arg_request, arg_tableId, arg_columnId).then(unittest.expectAsyn
c(((api.Column response) { | 1423 res.patch(arg_request, arg_tableId, arg_columnId).then(unittest.expectAsyn
c(((api.Column response) { |
| 1389 checkColumn(response); | 1424 checkColumn(response); |
| 1390 }))); | 1425 }))); |
| 1391 }); | 1426 }); |
| 1392 | 1427 |
| 1393 unittest.test("method--update", () { | 1428 unittest.test("method--update", () { |
| 1394 | 1429 |
| 1395 var mock = new common_test.HttpServerMock(); | 1430 var mock = new HttpServerMock(); |
| 1396 api.ColumnResourceApi res = new api.FusiontablesApi(mock).column; | 1431 api.ColumnResourceApi res = new api.FusiontablesApi(mock).column; |
| 1397 var arg_request = buildColumn(); | 1432 var arg_request = buildColumn(); |
| 1398 var arg_tableId = "foo"; | 1433 var arg_tableId = "foo"; |
| 1399 var arg_columnId = "foo"; | 1434 var arg_columnId = "foo"; |
| 1400 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1435 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 1401 var obj = new api.Column.fromJson(json); | 1436 var obj = new api.Column.fromJson(json); |
| 1402 checkColumn(obj); | 1437 checkColumn(obj); |
| 1403 | 1438 |
| 1404 var path = (req.url).path; | 1439 var path = (req.url).path; |
| 1405 var pathOffset = 0; | 1440 var pathOffset = 0; |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1437 var keyvalue = part.split("="); | 1472 var keyvalue = part.split("="); |
| 1438 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1473 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 1439 } | 1474 } |
| 1440 } | 1475 } |
| 1441 | 1476 |
| 1442 | 1477 |
| 1443 var h = { | 1478 var h = { |
| 1444 "content-type" : "application/json; charset=utf-8", | 1479 "content-type" : "application/json; charset=utf-8", |
| 1445 }; | 1480 }; |
| 1446 var resp = convert.JSON.encode(buildColumn()); | 1481 var resp = convert.JSON.encode(buildColumn()); |
| 1447 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 1482 return new async.Future.value(stringResponse(200, h, resp)); |
| 1448 }), true); | 1483 }), true); |
| 1449 res.update(arg_request, arg_tableId, arg_columnId).then(unittest.expectAsy
nc(((api.Column response) { | 1484 res.update(arg_request, arg_tableId, arg_columnId).then(unittest.expectAsy
nc(((api.Column response) { |
| 1450 checkColumn(response); | 1485 checkColumn(response); |
| 1451 }))); | 1486 }))); |
| 1452 }); | 1487 }); |
| 1453 | 1488 |
| 1454 }); | 1489 }); |
| 1455 | 1490 |
| 1456 | 1491 |
| 1457 unittest.group("resource-QueryResourceApi", () { | 1492 unittest.group("resource-QueryResourceApi", () { |
| 1458 unittest.test("method--sql", () { | 1493 unittest.test("method--sql", () { |
| 1459 // TODO: Implement tests for media upload; | 1494 // TODO: Implement tests for media upload; |
| 1460 // TODO: Implement tests for media download; | 1495 // TODO: Implement tests for media download; |
| 1461 | 1496 |
| 1462 var mock = new common_test.HttpServerMock(); | 1497 var mock = new HttpServerMock(); |
| 1463 api.QueryResourceApi res = new api.FusiontablesApi(mock).query; | 1498 api.QueryResourceApi res = new api.FusiontablesApi(mock).query; |
| 1464 var arg_sql_1 = "foo"; | 1499 var arg_sql_1 = "foo"; |
| 1465 var arg_hdrs = true; | 1500 var arg_hdrs = true; |
| 1466 var arg_typed = true; | 1501 var arg_typed = true; |
| 1467 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1502 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 1468 var path = (req.url).path; | 1503 var path = (req.url).path; |
| 1469 var pathOffset = 0; | 1504 var pathOffset = 0; |
| 1470 var index; | 1505 var index; |
| 1471 var subPart; | 1506 var subPart; |
| 1472 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1507 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| (...skipping 21 matching lines...) Expand all Loading... |
| 1494 } | 1529 } |
| 1495 unittest.expect(queryMap["sql"].first, unittest.equals(arg_sql_1)); | 1530 unittest.expect(queryMap["sql"].first, unittest.equals(arg_sql_1)); |
| 1496 unittest.expect(queryMap["hdrs"].first, unittest.equals("$arg_hdrs")); | 1531 unittest.expect(queryMap["hdrs"].first, unittest.equals("$arg_hdrs")); |
| 1497 unittest.expect(queryMap["typed"].first, unittest.equals("$arg_typed")); | 1532 unittest.expect(queryMap["typed"].first, unittest.equals("$arg_typed")); |
| 1498 | 1533 |
| 1499 | 1534 |
| 1500 var h = { | 1535 var h = { |
| 1501 "content-type" : "application/json; charset=utf-8", | 1536 "content-type" : "application/json; charset=utf-8", |
| 1502 }; | 1537 }; |
| 1503 var resp = convert.JSON.encode(buildSqlresponse()); | 1538 var resp = convert.JSON.encode(buildSqlresponse()); |
| 1504 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 1539 return new async.Future.value(stringResponse(200, h, resp)); |
| 1505 }), true); | 1540 }), true); |
| 1506 res.sql(arg_sql_1, hdrs: arg_hdrs, typed: arg_typed).then(unittest.expectA
sync(((api.Sqlresponse response) { | 1541 res.sql(arg_sql_1, hdrs: arg_hdrs, typed: arg_typed).then(unittest.expectA
sync(((api.Sqlresponse response) { |
| 1507 checkSqlresponse(response); | 1542 checkSqlresponse(response); |
| 1508 }))); | 1543 }))); |
| 1509 }); | 1544 }); |
| 1510 | 1545 |
| 1511 unittest.test("method--sqlGet", () { | 1546 unittest.test("method--sqlGet", () { |
| 1512 // TODO: Implement tests for media upload; | 1547 // TODO: Implement tests for media upload; |
| 1513 // TODO: Implement tests for media download; | 1548 // TODO: Implement tests for media download; |
| 1514 | 1549 |
| 1515 var mock = new common_test.HttpServerMock(); | 1550 var mock = new HttpServerMock(); |
| 1516 api.QueryResourceApi res = new api.FusiontablesApi(mock).query; | 1551 api.QueryResourceApi res = new api.FusiontablesApi(mock).query; |
| 1517 var arg_sql_1 = "foo"; | 1552 var arg_sql_1 = "foo"; |
| 1518 var arg_hdrs = true; | 1553 var arg_hdrs = true; |
| 1519 var arg_typed = true; | 1554 var arg_typed = true; |
| 1520 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1555 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 1521 var path = (req.url).path; | 1556 var path = (req.url).path; |
| 1522 var pathOffset = 0; | 1557 var pathOffset = 0; |
| 1523 var index; | 1558 var index; |
| 1524 var subPart; | 1559 var subPart; |
| 1525 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1560 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| (...skipping 21 matching lines...) Expand all Loading... |
| 1547 } | 1582 } |
| 1548 unittest.expect(queryMap["sql"].first, unittest.equals(arg_sql_1)); | 1583 unittest.expect(queryMap["sql"].first, unittest.equals(arg_sql_1)); |
| 1549 unittest.expect(queryMap["hdrs"].first, unittest.equals("$arg_hdrs")); | 1584 unittest.expect(queryMap["hdrs"].first, unittest.equals("$arg_hdrs")); |
| 1550 unittest.expect(queryMap["typed"].first, unittest.equals("$arg_typed")); | 1585 unittest.expect(queryMap["typed"].first, unittest.equals("$arg_typed")); |
| 1551 | 1586 |
| 1552 | 1587 |
| 1553 var h = { | 1588 var h = { |
| 1554 "content-type" : "application/json; charset=utf-8", | 1589 "content-type" : "application/json; charset=utf-8", |
| 1555 }; | 1590 }; |
| 1556 var resp = convert.JSON.encode(buildSqlresponse()); | 1591 var resp = convert.JSON.encode(buildSqlresponse()); |
| 1557 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 1592 return new async.Future.value(stringResponse(200, h, resp)); |
| 1558 }), true); | 1593 }), true); |
| 1559 res.sqlGet(arg_sql_1, hdrs: arg_hdrs, typed: arg_typed).then(unittest.expe
ctAsync(((api.Sqlresponse response) { | 1594 res.sqlGet(arg_sql_1, hdrs: arg_hdrs, typed: arg_typed).then(unittest.expe
ctAsync(((api.Sqlresponse response) { |
| 1560 checkSqlresponse(response); | 1595 checkSqlresponse(response); |
| 1561 }))); | 1596 }))); |
| 1562 }); | 1597 }); |
| 1563 | 1598 |
| 1564 }); | 1599 }); |
| 1565 | 1600 |
| 1566 | 1601 |
| 1567 unittest.group("resource-StyleResourceApi", () { | 1602 unittest.group("resource-StyleResourceApi", () { |
| 1568 unittest.test("method--delete", () { | 1603 unittest.test("method--delete", () { |
| 1569 | 1604 |
| 1570 var mock = new common_test.HttpServerMock(); | 1605 var mock = new HttpServerMock(); |
| 1571 api.StyleResourceApi res = new api.FusiontablesApi(mock).style; | 1606 api.StyleResourceApi res = new api.FusiontablesApi(mock).style; |
| 1572 var arg_tableId = "foo"; | 1607 var arg_tableId = "foo"; |
| 1573 var arg_styleId = 42; | 1608 var arg_styleId = 42; |
| 1574 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1609 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 1575 var path = (req.url).path; | 1610 var path = (req.url).path; |
| 1576 var pathOffset = 0; | 1611 var pathOffset = 0; |
| 1577 var index; | 1612 var index; |
| 1578 var subPart; | 1613 var subPart; |
| 1579 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1614 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1580 pathOffset += 1; | 1615 pathOffset += 1; |
| (...skipping 27 matching lines...) Expand all Loading... |
| 1608 var keyvalue = part.split("="); | 1643 var keyvalue = part.split("="); |
| 1609 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1644 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 1610 } | 1645 } |
| 1611 } | 1646 } |
| 1612 | 1647 |
| 1613 | 1648 |
| 1614 var h = { | 1649 var h = { |
| 1615 "content-type" : "application/json; charset=utf-8", | 1650 "content-type" : "application/json; charset=utf-8", |
| 1616 }; | 1651 }; |
| 1617 var resp = ""; | 1652 var resp = ""; |
| 1618 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 1653 return new async.Future.value(stringResponse(200, h, resp)); |
| 1619 }), true); | 1654 }), true); |
| 1620 res.delete(arg_tableId, arg_styleId).then(unittest.expectAsync((_) {})); | 1655 res.delete(arg_tableId, arg_styleId).then(unittest.expectAsync((_) {})); |
| 1621 }); | 1656 }); |
| 1622 | 1657 |
| 1623 unittest.test("method--get", () { | 1658 unittest.test("method--get", () { |
| 1624 | 1659 |
| 1625 var mock = new common_test.HttpServerMock(); | 1660 var mock = new HttpServerMock(); |
| 1626 api.StyleResourceApi res = new api.FusiontablesApi(mock).style; | 1661 api.StyleResourceApi res = new api.FusiontablesApi(mock).style; |
| 1627 var arg_tableId = "foo"; | 1662 var arg_tableId = "foo"; |
| 1628 var arg_styleId = 42; | 1663 var arg_styleId = 42; |
| 1629 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1664 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 1630 var path = (req.url).path; | 1665 var path = (req.url).path; |
| 1631 var pathOffset = 0; | 1666 var pathOffset = 0; |
| 1632 var index; | 1667 var index; |
| 1633 var subPart; | 1668 var subPart; |
| 1634 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1669 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1635 pathOffset += 1; | 1670 pathOffset += 1; |
| (...skipping 27 matching lines...) Expand all Loading... |
| 1663 var keyvalue = part.split("="); | 1698 var keyvalue = part.split("="); |
| 1664 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1699 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 1665 } | 1700 } |
| 1666 } | 1701 } |
| 1667 | 1702 |
| 1668 | 1703 |
| 1669 var h = { | 1704 var h = { |
| 1670 "content-type" : "application/json; charset=utf-8", | 1705 "content-type" : "application/json; charset=utf-8", |
| 1671 }; | 1706 }; |
| 1672 var resp = convert.JSON.encode(buildStyleSetting()); | 1707 var resp = convert.JSON.encode(buildStyleSetting()); |
| 1673 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 1708 return new async.Future.value(stringResponse(200, h, resp)); |
| 1674 }), true); | 1709 }), true); |
| 1675 res.get(arg_tableId, arg_styleId).then(unittest.expectAsync(((api.StyleSet
ting response) { | 1710 res.get(arg_tableId, arg_styleId).then(unittest.expectAsync(((api.StyleSet
ting response) { |
| 1676 checkStyleSetting(response); | 1711 checkStyleSetting(response); |
| 1677 }))); | 1712 }))); |
| 1678 }); | 1713 }); |
| 1679 | 1714 |
| 1680 unittest.test("method--insert", () { | 1715 unittest.test("method--insert", () { |
| 1681 | 1716 |
| 1682 var mock = new common_test.HttpServerMock(); | 1717 var mock = new HttpServerMock(); |
| 1683 api.StyleResourceApi res = new api.FusiontablesApi(mock).style; | 1718 api.StyleResourceApi res = new api.FusiontablesApi(mock).style; |
| 1684 var arg_request = buildStyleSetting(); | 1719 var arg_request = buildStyleSetting(); |
| 1685 var arg_tableId = "foo"; | 1720 var arg_tableId = "foo"; |
| 1686 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1721 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 1687 var obj = new api.StyleSetting.fromJson(json); | 1722 var obj = new api.StyleSetting.fromJson(json); |
| 1688 checkStyleSetting(obj); | 1723 checkStyleSetting(obj); |
| 1689 | 1724 |
| 1690 var path = (req.url).path; | 1725 var path = (req.url).path; |
| 1691 var pathOffset = 0; | 1726 var pathOffset = 0; |
| 1692 var index; | 1727 var index; |
| (...skipping 27 matching lines...) Expand all Loading... |
| 1720 var keyvalue = part.split("="); | 1755 var keyvalue = part.split("="); |
| 1721 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1756 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 1722 } | 1757 } |
| 1723 } | 1758 } |
| 1724 | 1759 |
| 1725 | 1760 |
| 1726 var h = { | 1761 var h = { |
| 1727 "content-type" : "application/json; charset=utf-8", | 1762 "content-type" : "application/json; charset=utf-8", |
| 1728 }; | 1763 }; |
| 1729 var resp = convert.JSON.encode(buildStyleSetting()); | 1764 var resp = convert.JSON.encode(buildStyleSetting()); |
| 1730 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 1765 return new async.Future.value(stringResponse(200, h, resp)); |
| 1731 }), true); | 1766 }), true); |
| 1732 res.insert(arg_request, arg_tableId).then(unittest.expectAsync(((api.Style
Setting response) { | 1767 res.insert(arg_request, arg_tableId).then(unittest.expectAsync(((api.Style
Setting response) { |
| 1733 checkStyleSetting(response); | 1768 checkStyleSetting(response); |
| 1734 }))); | 1769 }))); |
| 1735 }); | 1770 }); |
| 1736 | 1771 |
| 1737 unittest.test("method--list", () { | 1772 unittest.test("method--list", () { |
| 1738 | 1773 |
| 1739 var mock = new common_test.HttpServerMock(); | 1774 var mock = new HttpServerMock(); |
| 1740 api.StyleResourceApi res = new api.FusiontablesApi(mock).style; | 1775 api.StyleResourceApi res = new api.FusiontablesApi(mock).style; |
| 1741 var arg_tableId = "foo"; | 1776 var arg_tableId = "foo"; |
| 1742 var arg_maxResults = 42; | 1777 var arg_maxResults = 42; |
| 1743 var arg_pageToken = "foo"; | 1778 var arg_pageToken = "foo"; |
| 1744 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1779 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 1745 var path = (req.url).path; | 1780 var path = (req.url).path; |
| 1746 var pathOffset = 0; | 1781 var pathOffset = 0; |
| 1747 var index; | 1782 var index; |
| 1748 var subPart; | 1783 var subPart; |
| 1749 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1784 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| (...skipping 27 matching lines...) Expand all Loading... |
| 1777 } | 1812 } |
| 1778 } | 1813 } |
| 1779 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | 1814 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); |
| 1780 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 1815 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
| 1781 | 1816 |
| 1782 | 1817 |
| 1783 var h = { | 1818 var h = { |
| 1784 "content-type" : "application/json; charset=utf-8", | 1819 "content-type" : "application/json; charset=utf-8", |
| 1785 }; | 1820 }; |
| 1786 var resp = convert.JSON.encode(buildStyleSettingList()); | 1821 var resp = convert.JSON.encode(buildStyleSettingList()); |
| 1787 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 1822 return new async.Future.value(stringResponse(200, h, resp)); |
| 1788 }), true); | 1823 }), true); |
| 1789 res.list(arg_tableId, maxResults: arg_maxResults, pageToken: arg_pageToken
).then(unittest.expectAsync(((api.StyleSettingList response) { | 1824 res.list(arg_tableId, maxResults: arg_maxResults, pageToken: arg_pageToken
).then(unittest.expectAsync(((api.StyleSettingList response) { |
| 1790 checkStyleSettingList(response); | 1825 checkStyleSettingList(response); |
| 1791 }))); | 1826 }))); |
| 1792 }); | 1827 }); |
| 1793 | 1828 |
| 1794 unittest.test("method--patch", () { | 1829 unittest.test("method--patch", () { |
| 1795 | 1830 |
| 1796 var mock = new common_test.HttpServerMock(); | 1831 var mock = new HttpServerMock(); |
| 1797 api.StyleResourceApi res = new api.FusiontablesApi(mock).style; | 1832 api.StyleResourceApi res = new api.FusiontablesApi(mock).style; |
| 1798 var arg_request = buildStyleSetting(); | 1833 var arg_request = buildStyleSetting(); |
| 1799 var arg_tableId = "foo"; | 1834 var arg_tableId = "foo"; |
| 1800 var arg_styleId = 42; | 1835 var arg_styleId = 42; |
| 1801 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1836 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 1802 var obj = new api.StyleSetting.fromJson(json); | 1837 var obj = new api.StyleSetting.fromJson(json); |
| 1803 checkStyleSetting(obj); | 1838 checkStyleSetting(obj); |
| 1804 | 1839 |
| 1805 var path = (req.url).path; | 1840 var path = (req.url).path; |
| 1806 var pathOffset = 0; | 1841 var pathOffset = 0; |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1838 var keyvalue = part.split("="); | 1873 var keyvalue = part.split("="); |
| 1839 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1874 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 1840 } | 1875 } |
| 1841 } | 1876 } |
| 1842 | 1877 |
| 1843 | 1878 |
| 1844 var h = { | 1879 var h = { |
| 1845 "content-type" : "application/json; charset=utf-8", | 1880 "content-type" : "application/json; charset=utf-8", |
| 1846 }; | 1881 }; |
| 1847 var resp = convert.JSON.encode(buildStyleSetting()); | 1882 var resp = convert.JSON.encode(buildStyleSetting()); |
| 1848 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 1883 return new async.Future.value(stringResponse(200, h, resp)); |
| 1849 }), true); | 1884 }), true); |
| 1850 res.patch(arg_request, arg_tableId, arg_styleId).then(unittest.expectAsync
(((api.StyleSetting response) { | 1885 res.patch(arg_request, arg_tableId, arg_styleId).then(unittest.expectAsync
(((api.StyleSetting response) { |
| 1851 checkStyleSetting(response); | 1886 checkStyleSetting(response); |
| 1852 }))); | 1887 }))); |
| 1853 }); | 1888 }); |
| 1854 | 1889 |
| 1855 unittest.test("method--update", () { | 1890 unittest.test("method--update", () { |
| 1856 | 1891 |
| 1857 var mock = new common_test.HttpServerMock(); | 1892 var mock = new HttpServerMock(); |
| 1858 api.StyleResourceApi res = new api.FusiontablesApi(mock).style; | 1893 api.StyleResourceApi res = new api.FusiontablesApi(mock).style; |
| 1859 var arg_request = buildStyleSetting(); | 1894 var arg_request = buildStyleSetting(); |
| 1860 var arg_tableId = "foo"; | 1895 var arg_tableId = "foo"; |
| 1861 var arg_styleId = 42; | 1896 var arg_styleId = 42; |
| 1862 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1897 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 1863 var obj = new api.StyleSetting.fromJson(json); | 1898 var obj = new api.StyleSetting.fromJson(json); |
| 1864 checkStyleSetting(obj); | 1899 checkStyleSetting(obj); |
| 1865 | 1900 |
| 1866 var path = (req.url).path; | 1901 var path = (req.url).path; |
| 1867 var pathOffset = 0; | 1902 var pathOffset = 0; |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1899 var keyvalue = part.split("="); | 1934 var keyvalue = part.split("="); |
| 1900 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1935 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 1901 } | 1936 } |
| 1902 } | 1937 } |
| 1903 | 1938 |
| 1904 | 1939 |
| 1905 var h = { | 1940 var h = { |
| 1906 "content-type" : "application/json; charset=utf-8", | 1941 "content-type" : "application/json; charset=utf-8", |
| 1907 }; | 1942 }; |
| 1908 var resp = convert.JSON.encode(buildStyleSetting()); | 1943 var resp = convert.JSON.encode(buildStyleSetting()); |
| 1909 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 1944 return new async.Future.value(stringResponse(200, h, resp)); |
| 1910 }), true); | 1945 }), true); |
| 1911 res.update(arg_request, arg_tableId, arg_styleId).then(unittest.expectAsyn
c(((api.StyleSetting response) { | 1946 res.update(arg_request, arg_tableId, arg_styleId).then(unittest.expectAsyn
c(((api.StyleSetting response) { |
| 1912 checkStyleSetting(response); | 1947 checkStyleSetting(response); |
| 1913 }))); | 1948 }))); |
| 1914 }); | 1949 }); |
| 1915 | 1950 |
| 1916 }); | 1951 }); |
| 1917 | 1952 |
| 1918 | 1953 |
| 1919 unittest.group("resource-TableResourceApi", () { | 1954 unittest.group("resource-TableResourceApi", () { |
| 1920 unittest.test("method--copy", () { | 1955 unittest.test("method--copy", () { |
| 1921 | 1956 |
| 1922 var mock = new common_test.HttpServerMock(); | 1957 var mock = new HttpServerMock(); |
| 1923 api.TableResourceApi res = new api.FusiontablesApi(mock).table; | 1958 api.TableResourceApi res = new api.FusiontablesApi(mock).table; |
| 1924 var arg_tableId = "foo"; | 1959 var arg_tableId = "foo"; |
| 1925 var arg_copyPresentation = true; | 1960 var arg_copyPresentation = true; |
| 1926 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1961 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 1927 var path = (req.url).path; | 1962 var path = (req.url).path; |
| 1928 var pathOffset = 0; | 1963 var pathOffset = 0; |
| 1929 var index; | 1964 var index; |
| 1930 var subPart; | 1965 var subPart; |
| 1931 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1966 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1932 pathOffset += 1; | 1967 pathOffset += 1; |
| (...skipping 25 matching lines...) Expand all Loading... |
| 1958 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1993 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 1959 } | 1994 } |
| 1960 } | 1995 } |
| 1961 unittest.expect(queryMap["copyPresentation"].first, unittest.equals("$ar
g_copyPresentation")); | 1996 unittest.expect(queryMap["copyPresentation"].first, unittest.equals("$ar
g_copyPresentation")); |
| 1962 | 1997 |
| 1963 | 1998 |
| 1964 var h = { | 1999 var h = { |
| 1965 "content-type" : "application/json; charset=utf-8", | 2000 "content-type" : "application/json; charset=utf-8", |
| 1966 }; | 2001 }; |
| 1967 var resp = convert.JSON.encode(buildTable()); | 2002 var resp = convert.JSON.encode(buildTable()); |
| 1968 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2003 return new async.Future.value(stringResponse(200, h, resp)); |
| 1969 }), true); | 2004 }), true); |
| 1970 res.copy(arg_tableId, copyPresentation: arg_copyPresentation).then(unittes
t.expectAsync(((api.Table response) { | 2005 res.copy(arg_tableId, copyPresentation: arg_copyPresentation).then(unittes
t.expectAsync(((api.Table response) { |
| 1971 checkTable(response); | 2006 checkTable(response); |
| 1972 }))); | 2007 }))); |
| 1973 }); | 2008 }); |
| 1974 | 2009 |
| 1975 unittest.test("method--delete", () { | 2010 unittest.test("method--delete", () { |
| 1976 | 2011 |
| 1977 var mock = new common_test.HttpServerMock(); | 2012 var mock = new HttpServerMock(); |
| 1978 api.TableResourceApi res = new api.FusiontablesApi(mock).table; | 2013 api.TableResourceApi res = new api.FusiontablesApi(mock).table; |
| 1979 var arg_tableId = "foo"; | 2014 var arg_tableId = "foo"; |
| 1980 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2015 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 1981 var path = (req.url).path; | 2016 var path = (req.url).path; |
| 1982 var pathOffset = 0; | 2017 var pathOffset = 0; |
| 1983 var index; | 2018 var index; |
| 1984 var subPart; | 2019 var subPart; |
| 1985 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2020 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1986 pathOffset += 1; | 2021 pathOffset += 1; |
| 1987 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq
uals("fusiontables/v1/")); | 2022 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq
uals("fusiontables/v1/")); |
| (...skipping 19 matching lines...) Expand all Loading... |
| 2007 var keyvalue = part.split("="); | 2042 var keyvalue = part.split("="); |
| 2008 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2043 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 2009 } | 2044 } |
| 2010 } | 2045 } |
| 2011 | 2046 |
| 2012 | 2047 |
| 2013 var h = { | 2048 var h = { |
| 2014 "content-type" : "application/json; charset=utf-8", | 2049 "content-type" : "application/json; charset=utf-8", |
| 2015 }; | 2050 }; |
| 2016 var resp = ""; | 2051 var resp = ""; |
| 2017 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2052 return new async.Future.value(stringResponse(200, h, resp)); |
| 2018 }), true); | 2053 }), true); |
| 2019 res.delete(arg_tableId).then(unittest.expectAsync((_) {})); | 2054 res.delete(arg_tableId).then(unittest.expectAsync((_) {})); |
| 2020 }); | 2055 }); |
| 2021 | 2056 |
| 2022 unittest.test("method--get", () { | 2057 unittest.test("method--get", () { |
| 2023 | 2058 |
| 2024 var mock = new common_test.HttpServerMock(); | 2059 var mock = new HttpServerMock(); |
| 2025 api.TableResourceApi res = new api.FusiontablesApi(mock).table; | 2060 api.TableResourceApi res = new api.FusiontablesApi(mock).table; |
| 2026 var arg_tableId = "foo"; | 2061 var arg_tableId = "foo"; |
| 2027 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2062 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 2028 var path = (req.url).path; | 2063 var path = (req.url).path; |
| 2029 var pathOffset = 0; | 2064 var pathOffset = 0; |
| 2030 var index; | 2065 var index; |
| 2031 var subPart; | 2066 var subPart; |
| 2032 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2067 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2033 pathOffset += 1; | 2068 pathOffset += 1; |
| 2034 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq
uals("fusiontables/v1/")); | 2069 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq
uals("fusiontables/v1/")); |
| (...skipping 19 matching lines...) Expand all Loading... |
| 2054 var keyvalue = part.split("="); | 2089 var keyvalue = part.split("="); |
| 2055 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2090 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 2056 } | 2091 } |
| 2057 } | 2092 } |
| 2058 | 2093 |
| 2059 | 2094 |
| 2060 var h = { | 2095 var h = { |
| 2061 "content-type" : "application/json; charset=utf-8", | 2096 "content-type" : "application/json; charset=utf-8", |
| 2062 }; | 2097 }; |
| 2063 var resp = convert.JSON.encode(buildTable()); | 2098 var resp = convert.JSON.encode(buildTable()); |
| 2064 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2099 return new async.Future.value(stringResponse(200, h, resp)); |
| 2065 }), true); | 2100 }), true); |
| 2066 res.get(arg_tableId).then(unittest.expectAsync(((api.Table response) { | 2101 res.get(arg_tableId).then(unittest.expectAsync(((api.Table response) { |
| 2067 checkTable(response); | 2102 checkTable(response); |
| 2068 }))); | 2103 }))); |
| 2069 }); | 2104 }); |
| 2070 | 2105 |
| 2071 unittest.test("method--importRows", () { | 2106 unittest.test("method--importRows", () { |
| 2072 // TODO: Implement tests for media upload; | 2107 // TODO: Implement tests for media upload; |
| 2073 // TODO: Implement tests for media download; | 2108 // TODO: Implement tests for media download; |
| 2074 | 2109 |
| 2075 var mock = new common_test.HttpServerMock(); | 2110 var mock = new HttpServerMock(); |
| 2076 api.TableResourceApi res = new api.FusiontablesApi(mock).table; | 2111 api.TableResourceApi res = new api.FusiontablesApi(mock).table; |
| 2077 var arg_tableId = "foo"; | 2112 var arg_tableId = "foo"; |
| 2078 var arg_delimiter = "foo"; | 2113 var arg_delimiter = "foo"; |
| 2079 var arg_encoding = "foo"; | 2114 var arg_encoding = "foo"; |
| 2080 var arg_endLine = 42; | 2115 var arg_endLine = 42; |
| 2081 var arg_isStrict = true; | 2116 var arg_isStrict = true; |
| 2082 var arg_startLine = 42; | 2117 var arg_startLine = 42; |
| 2083 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2118 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 2084 var path = (req.url).path; | 2119 var path = (req.url).path; |
| 2085 var pathOffset = 0; | 2120 var pathOffset = 0; |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2119 unittest.expect(queryMap["encoding"].first, unittest.equals(arg_encoding
)); | 2154 unittest.expect(queryMap["encoding"].first, unittest.equals(arg_encoding
)); |
| 2120 unittest.expect(core.int.parse(queryMap["endLine"].first), unittest.equa
ls(arg_endLine)); | 2155 unittest.expect(core.int.parse(queryMap["endLine"].first), unittest.equa
ls(arg_endLine)); |
| 2121 unittest.expect(queryMap["isStrict"].first, unittest.equals("$arg_isStri
ct")); | 2156 unittest.expect(queryMap["isStrict"].first, unittest.equals("$arg_isStri
ct")); |
| 2122 unittest.expect(core.int.parse(queryMap["startLine"].first), unittest.eq
uals(arg_startLine)); | 2157 unittest.expect(core.int.parse(queryMap["startLine"].first), unittest.eq
uals(arg_startLine)); |
| 2123 | 2158 |
| 2124 | 2159 |
| 2125 var h = { | 2160 var h = { |
| 2126 "content-type" : "application/json; charset=utf-8", | 2161 "content-type" : "application/json; charset=utf-8", |
| 2127 }; | 2162 }; |
| 2128 var resp = convert.JSON.encode(buildImport()); | 2163 var resp = convert.JSON.encode(buildImport()); |
| 2129 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2164 return new async.Future.value(stringResponse(200, h, resp)); |
| 2130 }), true); | 2165 }), true); |
| 2131 res.importRows(arg_tableId, delimiter: arg_delimiter, encoding: arg_encodi
ng, endLine: arg_endLine, isStrict: arg_isStrict, startLine: arg_startLine).then
(unittest.expectAsync(((api.Import response) { | 2166 res.importRows(arg_tableId, delimiter: arg_delimiter, encoding: arg_encodi
ng, endLine: arg_endLine, isStrict: arg_isStrict, startLine: arg_startLine).then
(unittest.expectAsync(((api.Import response) { |
| 2132 checkImport(response); | 2167 checkImport(response); |
| 2133 }))); | 2168 }))); |
| 2134 }); | 2169 }); |
| 2135 | 2170 |
| 2136 unittest.test("method--importTable", () { | 2171 unittest.test("method--importTable", () { |
| 2137 // TODO: Implement tests for media upload; | 2172 // TODO: Implement tests for media upload; |
| 2138 // TODO: Implement tests for media download; | 2173 // TODO: Implement tests for media download; |
| 2139 | 2174 |
| 2140 var mock = new common_test.HttpServerMock(); | 2175 var mock = new HttpServerMock(); |
| 2141 api.TableResourceApi res = new api.FusiontablesApi(mock).table; | 2176 api.TableResourceApi res = new api.FusiontablesApi(mock).table; |
| 2142 var arg_name = "foo"; | 2177 var arg_name = "foo"; |
| 2143 var arg_delimiter = "foo"; | 2178 var arg_delimiter = "foo"; |
| 2144 var arg_encoding = "foo"; | 2179 var arg_encoding = "foo"; |
| 2145 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2180 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 2146 var path = (req.url).path; | 2181 var path = (req.url).path; |
| 2147 var pathOffset = 0; | 2182 var pathOffset = 0; |
| 2148 var index; | 2183 var index; |
| 2149 var subPart; | 2184 var subPart; |
| 2150 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2185 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| (...skipping 21 matching lines...) Expand all Loading... |
| 2172 } | 2207 } |
| 2173 unittest.expect(queryMap["name"].first, unittest.equals(arg_name)); | 2208 unittest.expect(queryMap["name"].first, unittest.equals(arg_name)); |
| 2174 unittest.expect(queryMap["delimiter"].first, unittest.equals(arg_delimit
er)); | 2209 unittest.expect(queryMap["delimiter"].first, unittest.equals(arg_delimit
er)); |
| 2175 unittest.expect(queryMap["encoding"].first, unittest.equals(arg_encoding
)); | 2210 unittest.expect(queryMap["encoding"].first, unittest.equals(arg_encoding
)); |
| 2176 | 2211 |
| 2177 | 2212 |
| 2178 var h = { | 2213 var h = { |
| 2179 "content-type" : "application/json; charset=utf-8", | 2214 "content-type" : "application/json; charset=utf-8", |
| 2180 }; | 2215 }; |
| 2181 var resp = convert.JSON.encode(buildTable()); | 2216 var resp = convert.JSON.encode(buildTable()); |
| 2182 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2217 return new async.Future.value(stringResponse(200, h, resp)); |
| 2183 }), true); | 2218 }), true); |
| 2184 res.importTable(arg_name, delimiter: arg_delimiter, encoding: arg_encoding
).then(unittest.expectAsync(((api.Table response) { | 2219 res.importTable(arg_name, delimiter: arg_delimiter, encoding: arg_encoding
).then(unittest.expectAsync(((api.Table response) { |
| 2185 checkTable(response); | 2220 checkTable(response); |
| 2186 }))); | 2221 }))); |
| 2187 }); | 2222 }); |
| 2188 | 2223 |
| 2189 unittest.test("method--insert", () { | 2224 unittest.test("method--insert", () { |
| 2190 | 2225 |
| 2191 var mock = new common_test.HttpServerMock(); | 2226 var mock = new HttpServerMock(); |
| 2192 api.TableResourceApi res = new api.FusiontablesApi(mock).table; | 2227 api.TableResourceApi res = new api.FusiontablesApi(mock).table; |
| 2193 var arg_request = buildTable(); | 2228 var arg_request = buildTable(); |
| 2194 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2229 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 2195 var obj = new api.Table.fromJson(json); | 2230 var obj = new api.Table.fromJson(json); |
| 2196 checkTable(obj); | 2231 checkTable(obj); |
| 2197 | 2232 |
| 2198 var path = (req.url).path; | 2233 var path = (req.url).path; |
| 2199 var pathOffset = 0; | 2234 var pathOffset = 0; |
| 2200 var index; | 2235 var index; |
| 2201 var subPart; | 2236 var subPart; |
| (...skipping 19 matching lines...) Expand all Loading... |
| 2221 var keyvalue = part.split("="); | 2256 var keyvalue = part.split("="); |
| 2222 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2257 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 2223 } | 2258 } |
| 2224 } | 2259 } |
| 2225 | 2260 |
| 2226 | 2261 |
| 2227 var h = { | 2262 var h = { |
| 2228 "content-type" : "application/json; charset=utf-8", | 2263 "content-type" : "application/json; charset=utf-8", |
| 2229 }; | 2264 }; |
| 2230 var resp = convert.JSON.encode(buildTable()); | 2265 var resp = convert.JSON.encode(buildTable()); |
| 2231 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2266 return new async.Future.value(stringResponse(200, h, resp)); |
| 2232 }), true); | 2267 }), true); |
| 2233 res.insert(arg_request).then(unittest.expectAsync(((api.Table response) { | 2268 res.insert(arg_request).then(unittest.expectAsync(((api.Table response) { |
| 2234 checkTable(response); | 2269 checkTable(response); |
| 2235 }))); | 2270 }))); |
| 2236 }); | 2271 }); |
| 2237 | 2272 |
| 2238 unittest.test("method--list", () { | 2273 unittest.test("method--list", () { |
| 2239 | 2274 |
| 2240 var mock = new common_test.HttpServerMock(); | 2275 var mock = new HttpServerMock(); |
| 2241 api.TableResourceApi res = new api.FusiontablesApi(mock).table; | 2276 api.TableResourceApi res = new api.FusiontablesApi(mock).table; |
| 2242 var arg_maxResults = 42; | 2277 var arg_maxResults = 42; |
| 2243 var arg_pageToken = "foo"; | 2278 var arg_pageToken = "foo"; |
| 2244 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2279 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 2245 var path = (req.url).path; | 2280 var path = (req.url).path; |
| 2246 var pathOffset = 0; | 2281 var pathOffset = 0; |
| 2247 var index; | 2282 var index; |
| 2248 var subPart; | 2283 var subPart; |
| 2249 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2284 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2250 pathOffset += 1; | 2285 pathOffset += 1; |
| (...skipping 19 matching lines...) Expand all Loading... |
| 2270 } | 2305 } |
| 2271 } | 2306 } |
| 2272 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | 2307 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); |
| 2273 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 2308 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
| 2274 | 2309 |
| 2275 | 2310 |
| 2276 var h = { | 2311 var h = { |
| 2277 "content-type" : "application/json; charset=utf-8", | 2312 "content-type" : "application/json; charset=utf-8", |
| 2278 }; | 2313 }; |
| 2279 var resp = convert.JSON.encode(buildTableList()); | 2314 var resp = convert.JSON.encode(buildTableList()); |
| 2280 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2315 return new async.Future.value(stringResponse(200, h, resp)); |
| 2281 }), true); | 2316 }), true); |
| 2282 res.list(maxResults: arg_maxResults, pageToken: arg_pageToken).then(unitte
st.expectAsync(((api.TableList response) { | 2317 res.list(maxResults: arg_maxResults, pageToken: arg_pageToken).then(unitte
st.expectAsync(((api.TableList response) { |
| 2283 checkTableList(response); | 2318 checkTableList(response); |
| 2284 }))); | 2319 }))); |
| 2285 }); | 2320 }); |
| 2286 | 2321 |
| 2287 unittest.test("method--patch", () { | 2322 unittest.test("method--patch", () { |
| 2288 | 2323 |
| 2289 var mock = new common_test.HttpServerMock(); | 2324 var mock = new HttpServerMock(); |
| 2290 api.TableResourceApi res = new api.FusiontablesApi(mock).table; | 2325 api.TableResourceApi res = new api.FusiontablesApi(mock).table; |
| 2291 var arg_request = buildTable(); | 2326 var arg_request = buildTable(); |
| 2292 var arg_tableId = "foo"; | 2327 var arg_tableId = "foo"; |
| 2293 var arg_replaceViewDefinition = true; | 2328 var arg_replaceViewDefinition = true; |
| 2294 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2329 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 2295 var obj = new api.Table.fromJson(json); | 2330 var obj = new api.Table.fromJson(json); |
| 2296 checkTable(obj); | 2331 checkTable(obj); |
| 2297 | 2332 |
| 2298 var path = (req.url).path; | 2333 var path = (req.url).path; |
| 2299 var pathOffset = 0; | 2334 var pathOffset = 0; |
| (...skipping 25 matching lines...) Expand all Loading... |
| 2325 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2360 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 2326 } | 2361 } |
| 2327 } | 2362 } |
| 2328 unittest.expect(queryMap["replaceViewDefinition"].first, unittest.equals
("$arg_replaceViewDefinition")); | 2363 unittest.expect(queryMap["replaceViewDefinition"].first, unittest.equals
("$arg_replaceViewDefinition")); |
| 2329 | 2364 |
| 2330 | 2365 |
| 2331 var h = { | 2366 var h = { |
| 2332 "content-type" : "application/json; charset=utf-8", | 2367 "content-type" : "application/json; charset=utf-8", |
| 2333 }; | 2368 }; |
| 2334 var resp = convert.JSON.encode(buildTable()); | 2369 var resp = convert.JSON.encode(buildTable()); |
| 2335 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2370 return new async.Future.value(stringResponse(200, h, resp)); |
| 2336 }), true); | 2371 }), true); |
| 2337 res.patch(arg_request, arg_tableId, replaceViewDefinition: arg_replaceView
Definition).then(unittest.expectAsync(((api.Table response) { | 2372 res.patch(arg_request, arg_tableId, replaceViewDefinition: arg_replaceView
Definition).then(unittest.expectAsync(((api.Table response) { |
| 2338 checkTable(response); | 2373 checkTable(response); |
| 2339 }))); | 2374 }))); |
| 2340 }); | 2375 }); |
| 2341 | 2376 |
| 2342 unittest.test("method--update", () { | 2377 unittest.test("method--update", () { |
| 2343 | 2378 |
| 2344 var mock = new common_test.HttpServerMock(); | 2379 var mock = new HttpServerMock(); |
| 2345 api.TableResourceApi res = new api.FusiontablesApi(mock).table; | 2380 api.TableResourceApi res = new api.FusiontablesApi(mock).table; |
| 2346 var arg_request = buildTable(); | 2381 var arg_request = buildTable(); |
| 2347 var arg_tableId = "foo"; | 2382 var arg_tableId = "foo"; |
| 2348 var arg_replaceViewDefinition = true; | 2383 var arg_replaceViewDefinition = true; |
| 2349 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2384 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 2350 var obj = new api.Table.fromJson(json); | 2385 var obj = new api.Table.fromJson(json); |
| 2351 checkTable(obj); | 2386 checkTable(obj); |
| 2352 | 2387 |
| 2353 var path = (req.url).path; | 2388 var path = (req.url).path; |
| 2354 var pathOffset = 0; | 2389 var pathOffset = 0; |
| (...skipping 25 matching lines...) Expand all Loading... |
| 2380 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2415 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 2381 } | 2416 } |
| 2382 } | 2417 } |
| 2383 unittest.expect(queryMap["replaceViewDefinition"].first, unittest.equals
("$arg_replaceViewDefinition")); | 2418 unittest.expect(queryMap["replaceViewDefinition"].first, unittest.equals
("$arg_replaceViewDefinition")); |
| 2384 | 2419 |
| 2385 | 2420 |
| 2386 var h = { | 2421 var h = { |
| 2387 "content-type" : "application/json; charset=utf-8", | 2422 "content-type" : "application/json; charset=utf-8", |
| 2388 }; | 2423 }; |
| 2389 var resp = convert.JSON.encode(buildTable()); | 2424 var resp = convert.JSON.encode(buildTable()); |
| 2390 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2425 return new async.Future.value(stringResponse(200, h, resp)); |
| 2391 }), true); | 2426 }), true); |
| 2392 res.update(arg_request, arg_tableId, replaceViewDefinition: arg_replaceVie
wDefinition).then(unittest.expectAsync(((api.Table response) { | 2427 res.update(arg_request, arg_tableId, replaceViewDefinition: arg_replaceVie
wDefinition).then(unittest.expectAsync(((api.Table response) { |
| 2393 checkTable(response); | 2428 checkTable(response); |
| 2394 }))); | 2429 }))); |
| 2395 }); | 2430 }); |
| 2396 | 2431 |
| 2397 }); | 2432 }); |
| 2398 | 2433 |
| 2399 | 2434 |
| 2400 unittest.group("resource-TaskResourceApi", () { | 2435 unittest.group("resource-TaskResourceApi", () { |
| 2401 unittest.test("method--delete", () { | 2436 unittest.test("method--delete", () { |
| 2402 | 2437 |
| 2403 var mock = new common_test.HttpServerMock(); | 2438 var mock = new HttpServerMock(); |
| 2404 api.TaskResourceApi res = new api.FusiontablesApi(mock).task; | 2439 api.TaskResourceApi res = new api.FusiontablesApi(mock).task; |
| 2405 var arg_tableId = "foo"; | 2440 var arg_tableId = "foo"; |
| 2406 var arg_taskId = "foo"; | 2441 var arg_taskId = "foo"; |
| 2407 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2442 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 2408 var path = (req.url).path; | 2443 var path = (req.url).path; |
| 2409 var pathOffset = 0; | 2444 var pathOffset = 0; |
| 2410 var index; | 2445 var index; |
| 2411 var subPart; | 2446 var subPart; |
| 2412 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2447 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2413 pathOffset += 1; | 2448 pathOffset += 1; |
| (...skipping 27 matching lines...) Expand all Loading... |
| 2441 var keyvalue = part.split("="); | 2476 var keyvalue = part.split("="); |
| 2442 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2477 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 2443 } | 2478 } |
| 2444 } | 2479 } |
| 2445 | 2480 |
| 2446 | 2481 |
| 2447 var h = { | 2482 var h = { |
| 2448 "content-type" : "application/json; charset=utf-8", | 2483 "content-type" : "application/json; charset=utf-8", |
| 2449 }; | 2484 }; |
| 2450 var resp = ""; | 2485 var resp = ""; |
| 2451 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2486 return new async.Future.value(stringResponse(200, h, resp)); |
| 2452 }), true); | 2487 }), true); |
| 2453 res.delete(arg_tableId, arg_taskId).then(unittest.expectAsync((_) {})); | 2488 res.delete(arg_tableId, arg_taskId).then(unittest.expectAsync((_) {})); |
| 2454 }); | 2489 }); |
| 2455 | 2490 |
| 2456 unittest.test("method--get", () { | 2491 unittest.test("method--get", () { |
| 2457 | 2492 |
| 2458 var mock = new common_test.HttpServerMock(); | 2493 var mock = new HttpServerMock(); |
| 2459 api.TaskResourceApi res = new api.FusiontablesApi(mock).task; | 2494 api.TaskResourceApi res = new api.FusiontablesApi(mock).task; |
| 2460 var arg_tableId = "foo"; | 2495 var arg_tableId = "foo"; |
| 2461 var arg_taskId = "foo"; | 2496 var arg_taskId = "foo"; |
| 2462 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2497 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 2463 var path = (req.url).path; | 2498 var path = (req.url).path; |
| 2464 var pathOffset = 0; | 2499 var pathOffset = 0; |
| 2465 var index; | 2500 var index; |
| 2466 var subPart; | 2501 var subPart; |
| 2467 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2502 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2468 pathOffset += 1; | 2503 pathOffset += 1; |
| (...skipping 27 matching lines...) Expand all Loading... |
| 2496 var keyvalue = part.split("="); | 2531 var keyvalue = part.split("="); |
| 2497 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2532 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 2498 } | 2533 } |
| 2499 } | 2534 } |
| 2500 | 2535 |
| 2501 | 2536 |
| 2502 var h = { | 2537 var h = { |
| 2503 "content-type" : "application/json; charset=utf-8", | 2538 "content-type" : "application/json; charset=utf-8", |
| 2504 }; | 2539 }; |
| 2505 var resp = convert.JSON.encode(buildTask()); | 2540 var resp = convert.JSON.encode(buildTask()); |
| 2506 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2541 return new async.Future.value(stringResponse(200, h, resp)); |
| 2507 }), true); | 2542 }), true); |
| 2508 res.get(arg_tableId, arg_taskId).then(unittest.expectAsync(((api.Task resp
onse) { | 2543 res.get(arg_tableId, arg_taskId).then(unittest.expectAsync(((api.Task resp
onse) { |
| 2509 checkTask(response); | 2544 checkTask(response); |
| 2510 }))); | 2545 }))); |
| 2511 }); | 2546 }); |
| 2512 | 2547 |
| 2513 unittest.test("method--list", () { | 2548 unittest.test("method--list", () { |
| 2514 | 2549 |
| 2515 var mock = new common_test.HttpServerMock(); | 2550 var mock = new HttpServerMock(); |
| 2516 api.TaskResourceApi res = new api.FusiontablesApi(mock).task; | 2551 api.TaskResourceApi res = new api.FusiontablesApi(mock).task; |
| 2517 var arg_tableId = "foo"; | 2552 var arg_tableId = "foo"; |
| 2518 var arg_maxResults = 42; | 2553 var arg_maxResults = 42; |
| 2519 var arg_pageToken = "foo"; | 2554 var arg_pageToken = "foo"; |
| 2520 var arg_startIndex = 42; | 2555 var arg_startIndex = 42; |
| 2521 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2556 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 2522 var path = (req.url).path; | 2557 var path = (req.url).path; |
| 2523 var pathOffset = 0; | 2558 var pathOffset = 0; |
| 2524 var index; | 2559 var index; |
| 2525 var subPart; | 2560 var subPart; |
| (...skipping 29 matching lines...) Expand all Loading... |
| 2555 } | 2590 } |
| 2556 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | 2591 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); |
| 2557 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 2592 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
| 2558 unittest.expect(core.int.parse(queryMap["startIndex"].first), unittest.e
quals(arg_startIndex)); | 2593 unittest.expect(core.int.parse(queryMap["startIndex"].first), unittest.e
quals(arg_startIndex)); |
| 2559 | 2594 |
| 2560 | 2595 |
| 2561 var h = { | 2596 var h = { |
| 2562 "content-type" : "application/json; charset=utf-8", | 2597 "content-type" : "application/json; charset=utf-8", |
| 2563 }; | 2598 }; |
| 2564 var resp = convert.JSON.encode(buildTaskList()); | 2599 var resp = convert.JSON.encode(buildTaskList()); |
| 2565 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2600 return new async.Future.value(stringResponse(200, h, resp)); |
| 2566 }), true); | 2601 }), true); |
| 2567 res.list(arg_tableId, maxResults: arg_maxResults, pageToken: arg_pageToken
, startIndex: arg_startIndex).then(unittest.expectAsync(((api.TaskList response)
{ | 2602 res.list(arg_tableId, maxResults: arg_maxResults, pageToken: arg_pageToken
, startIndex: arg_startIndex).then(unittest.expectAsync(((api.TaskList response)
{ |
| 2568 checkTaskList(response); | 2603 checkTaskList(response); |
| 2569 }))); | 2604 }))); |
| 2570 }); | 2605 }); |
| 2571 | 2606 |
| 2572 }); | 2607 }); |
| 2573 | 2608 |
| 2574 | 2609 |
| 2575 unittest.group("resource-TemplateResourceApi", () { | 2610 unittest.group("resource-TemplateResourceApi", () { |
| 2576 unittest.test("method--delete", () { | 2611 unittest.test("method--delete", () { |
| 2577 | 2612 |
| 2578 var mock = new common_test.HttpServerMock(); | 2613 var mock = new HttpServerMock(); |
| 2579 api.TemplateResourceApi res = new api.FusiontablesApi(mock).template; | 2614 api.TemplateResourceApi res = new api.FusiontablesApi(mock).template; |
| 2580 var arg_tableId = "foo"; | 2615 var arg_tableId = "foo"; |
| 2581 var arg_templateId = 42; | 2616 var arg_templateId = 42; |
| 2582 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2617 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 2583 var path = (req.url).path; | 2618 var path = (req.url).path; |
| 2584 var pathOffset = 0; | 2619 var pathOffset = 0; |
| 2585 var index; | 2620 var index; |
| 2586 var subPart; | 2621 var subPart; |
| 2587 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2622 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2588 pathOffset += 1; | 2623 pathOffset += 1; |
| (...skipping 27 matching lines...) Expand all Loading... |
| 2616 var keyvalue = part.split("="); | 2651 var keyvalue = part.split("="); |
| 2617 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2652 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 2618 } | 2653 } |
| 2619 } | 2654 } |
| 2620 | 2655 |
| 2621 | 2656 |
| 2622 var h = { | 2657 var h = { |
| 2623 "content-type" : "application/json; charset=utf-8", | 2658 "content-type" : "application/json; charset=utf-8", |
| 2624 }; | 2659 }; |
| 2625 var resp = ""; | 2660 var resp = ""; |
| 2626 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2661 return new async.Future.value(stringResponse(200, h, resp)); |
| 2627 }), true); | 2662 }), true); |
| 2628 res.delete(arg_tableId, arg_templateId).then(unittest.expectAsync((_) {}))
; | 2663 res.delete(arg_tableId, arg_templateId).then(unittest.expectAsync((_) {}))
; |
| 2629 }); | 2664 }); |
| 2630 | 2665 |
| 2631 unittest.test("method--get", () { | 2666 unittest.test("method--get", () { |
| 2632 | 2667 |
| 2633 var mock = new common_test.HttpServerMock(); | 2668 var mock = new HttpServerMock(); |
| 2634 api.TemplateResourceApi res = new api.FusiontablesApi(mock).template; | 2669 api.TemplateResourceApi res = new api.FusiontablesApi(mock).template; |
| 2635 var arg_tableId = "foo"; | 2670 var arg_tableId = "foo"; |
| 2636 var arg_templateId = 42; | 2671 var arg_templateId = 42; |
| 2637 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2672 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 2638 var path = (req.url).path; | 2673 var path = (req.url).path; |
| 2639 var pathOffset = 0; | 2674 var pathOffset = 0; |
| 2640 var index; | 2675 var index; |
| 2641 var subPart; | 2676 var subPart; |
| 2642 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2677 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2643 pathOffset += 1; | 2678 pathOffset += 1; |
| (...skipping 27 matching lines...) Expand all Loading... |
| 2671 var keyvalue = part.split("="); | 2706 var keyvalue = part.split("="); |
| 2672 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2707 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 2673 } | 2708 } |
| 2674 } | 2709 } |
| 2675 | 2710 |
| 2676 | 2711 |
| 2677 var h = { | 2712 var h = { |
| 2678 "content-type" : "application/json; charset=utf-8", | 2713 "content-type" : "application/json; charset=utf-8", |
| 2679 }; | 2714 }; |
| 2680 var resp = convert.JSON.encode(buildTemplate()); | 2715 var resp = convert.JSON.encode(buildTemplate()); |
| 2681 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2716 return new async.Future.value(stringResponse(200, h, resp)); |
| 2682 }), true); | 2717 }), true); |
| 2683 res.get(arg_tableId, arg_templateId).then(unittest.expectAsync(((api.Templ
ate response) { | 2718 res.get(arg_tableId, arg_templateId).then(unittest.expectAsync(((api.Templ
ate response) { |
| 2684 checkTemplate(response); | 2719 checkTemplate(response); |
| 2685 }))); | 2720 }))); |
| 2686 }); | 2721 }); |
| 2687 | 2722 |
| 2688 unittest.test("method--insert", () { | 2723 unittest.test("method--insert", () { |
| 2689 | 2724 |
| 2690 var mock = new common_test.HttpServerMock(); | 2725 var mock = new HttpServerMock(); |
| 2691 api.TemplateResourceApi res = new api.FusiontablesApi(mock).template; | 2726 api.TemplateResourceApi res = new api.FusiontablesApi(mock).template; |
| 2692 var arg_request = buildTemplate(); | 2727 var arg_request = buildTemplate(); |
| 2693 var arg_tableId = "foo"; | 2728 var arg_tableId = "foo"; |
| 2694 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2729 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 2695 var obj = new api.Template.fromJson(json); | 2730 var obj = new api.Template.fromJson(json); |
| 2696 checkTemplate(obj); | 2731 checkTemplate(obj); |
| 2697 | 2732 |
| 2698 var path = (req.url).path; | 2733 var path = (req.url).path; |
| 2699 var pathOffset = 0; | 2734 var pathOffset = 0; |
| 2700 var index; | 2735 var index; |
| (...skipping 27 matching lines...) Expand all Loading... |
| 2728 var keyvalue = part.split("="); | 2763 var keyvalue = part.split("="); |
| 2729 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2764 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 2730 } | 2765 } |
| 2731 } | 2766 } |
| 2732 | 2767 |
| 2733 | 2768 |
| 2734 var h = { | 2769 var h = { |
| 2735 "content-type" : "application/json; charset=utf-8", | 2770 "content-type" : "application/json; charset=utf-8", |
| 2736 }; | 2771 }; |
| 2737 var resp = convert.JSON.encode(buildTemplate()); | 2772 var resp = convert.JSON.encode(buildTemplate()); |
| 2738 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2773 return new async.Future.value(stringResponse(200, h, resp)); |
| 2739 }), true); | 2774 }), true); |
| 2740 res.insert(arg_request, arg_tableId).then(unittest.expectAsync(((api.Templ
ate response) { | 2775 res.insert(arg_request, arg_tableId).then(unittest.expectAsync(((api.Templ
ate response) { |
| 2741 checkTemplate(response); | 2776 checkTemplate(response); |
| 2742 }))); | 2777 }))); |
| 2743 }); | 2778 }); |
| 2744 | 2779 |
| 2745 unittest.test("method--list", () { | 2780 unittest.test("method--list", () { |
| 2746 | 2781 |
| 2747 var mock = new common_test.HttpServerMock(); | 2782 var mock = new HttpServerMock(); |
| 2748 api.TemplateResourceApi res = new api.FusiontablesApi(mock).template; | 2783 api.TemplateResourceApi res = new api.FusiontablesApi(mock).template; |
| 2749 var arg_tableId = "foo"; | 2784 var arg_tableId = "foo"; |
| 2750 var arg_maxResults = 42; | 2785 var arg_maxResults = 42; |
| 2751 var arg_pageToken = "foo"; | 2786 var arg_pageToken = "foo"; |
| 2752 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2787 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 2753 var path = (req.url).path; | 2788 var path = (req.url).path; |
| 2754 var pathOffset = 0; | 2789 var pathOffset = 0; |
| 2755 var index; | 2790 var index; |
| 2756 var subPart; | 2791 var subPart; |
| 2757 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2792 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| (...skipping 27 matching lines...) Expand all Loading... |
| 2785 } | 2820 } |
| 2786 } | 2821 } |
| 2787 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | 2822 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); |
| 2788 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 2823 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
| 2789 | 2824 |
| 2790 | 2825 |
| 2791 var h = { | 2826 var h = { |
| 2792 "content-type" : "application/json; charset=utf-8", | 2827 "content-type" : "application/json; charset=utf-8", |
| 2793 }; | 2828 }; |
| 2794 var resp = convert.JSON.encode(buildTemplateList()); | 2829 var resp = convert.JSON.encode(buildTemplateList()); |
| 2795 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2830 return new async.Future.value(stringResponse(200, h, resp)); |
| 2796 }), true); | 2831 }), true); |
| 2797 res.list(arg_tableId, maxResults: arg_maxResults, pageToken: arg_pageToken
).then(unittest.expectAsync(((api.TemplateList response) { | 2832 res.list(arg_tableId, maxResults: arg_maxResults, pageToken: arg_pageToken
).then(unittest.expectAsync(((api.TemplateList response) { |
| 2798 checkTemplateList(response); | 2833 checkTemplateList(response); |
| 2799 }))); | 2834 }))); |
| 2800 }); | 2835 }); |
| 2801 | 2836 |
| 2802 unittest.test("method--patch", () { | 2837 unittest.test("method--patch", () { |
| 2803 | 2838 |
| 2804 var mock = new common_test.HttpServerMock(); | 2839 var mock = new HttpServerMock(); |
| 2805 api.TemplateResourceApi res = new api.FusiontablesApi(mock).template; | 2840 api.TemplateResourceApi res = new api.FusiontablesApi(mock).template; |
| 2806 var arg_request = buildTemplate(); | 2841 var arg_request = buildTemplate(); |
| 2807 var arg_tableId = "foo"; | 2842 var arg_tableId = "foo"; |
| 2808 var arg_templateId = 42; | 2843 var arg_templateId = 42; |
| 2809 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2844 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 2810 var obj = new api.Template.fromJson(json); | 2845 var obj = new api.Template.fromJson(json); |
| 2811 checkTemplate(obj); | 2846 checkTemplate(obj); |
| 2812 | 2847 |
| 2813 var path = (req.url).path; | 2848 var path = (req.url).path; |
| 2814 var pathOffset = 0; | 2849 var pathOffset = 0; |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2846 var keyvalue = part.split("="); | 2881 var keyvalue = part.split("="); |
| 2847 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2882 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 2848 } | 2883 } |
| 2849 } | 2884 } |
| 2850 | 2885 |
| 2851 | 2886 |
| 2852 var h = { | 2887 var h = { |
| 2853 "content-type" : "application/json; charset=utf-8", | 2888 "content-type" : "application/json; charset=utf-8", |
| 2854 }; | 2889 }; |
| 2855 var resp = convert.JSON.encode(buildTemplate()); | 2890 var resp = convert.JSON.encode(buildTemplate()); |
| 2856 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2891 return new async.Future.value(stringResponse(200, h, resp)); |
| 2857 }), true); | 2892 }), true); |
| 2858 res.patch(arg_request, arg_tableId, arg_templateId).then(unittest.expectAs
ync(((api.Template response) { | 2893 res.patch(arg_request, arg_tableId, arg_templateId).then(unittest.expectAs
ync(((api.Template response) { |
| 2859 checkTemplate(response); | 2894 checkTemplate(response); |
| 2860 }))); | 2895 }))); |
| 2861 }); | 2896 }); |
| 2862 | 2897 |
| 2863 unittest.test("method--update", () { | 2898 unittest.test("method--update", () { |
| 2864 | 2899 |
| 2865 var mock = new common_test.HttpServerMock(); | 2900 var mock = new HttpServerMock(); |
| 2866 api.TemplateResourceApi res = new api.FusiontablesApi(mock).template; | 2901 api.TemplateResourceApi res = new api.FusiontablesApi(mock).template; |
| 2867 var arg_request = buildTemplate(); | 2902 var arg_request = buildTemplate(); |
| 2868 var arg_tableId = "foo"; | 2903 var arg_tableId = "foo"; |
| 2869 var arg_templateId = 42; | 2904 var arg_templateId = 42; |
| 2870 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2905 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 2871 var obj = new api.Template.fromJson(json); | 2906 var obj = new api.Template.fromJson(json); |
| 2872 checkTemplate(obj); | 2907 checkTemplate(obj); |
| 2873 | 2908 |
| 2874 var path = (req.url).path; | 2909 var path = (req.url).path; |
| 2875 var pathOffset = 0; | 2910 var pathOffset = 0; |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2907 var keyvalue = part.split("="); | 2942 var keyvalue = part.split("="); |
| 2908 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2943 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 2909 } | 2944 } |
| 2910 } | 2945 } |
| 2911 | 2946 |
| 2912 | 2947 |
| 2913 var h = { | 2948 var h = { |
| 2914 "content-type" : "application/json; charset=utf-8", | 2949 "content-type" : "application/json; charset=utf-8", |
| 2915 }; | 2950 }; |
| 2916 var resp = convert.JSON.encode(buildTemplate()); | 2951 var resp = convert.JSON.encode(buildTemplate()); |
| 2917 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2952 return new async.Future.value(stringResponse(200, h, resp)); |
| 2918 }), true); | 2953 }), true); |
| 2919 res.update(arg_request, arg_tableId, arg_templateId).then(unittest.expectA
sync(((api.Template response) { | 2954 res.update(arg_request, arg_tableId, arg_templateId).then(unittest.expectA
sync(((api.Template response) { |
| 2920 checkTemplate(response); | 2955 checkTemplate(response); |
| 2921 }))); | 2956 }))); |
| 2922 }); | 2957 }); |
| 2923 | 2958 |
| 2924 }); | 2959 }); |
| 2925 | 2960 |
| 2926 | 2961 |
| 2927 } | 2962 } |
| 2928 | 2963 |
| OLD | NEW |