OLD | NEW |
1 library googleapis.fusiontables.v2.test; | 1 library googleapis.fusiontables.v2.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/v2.dart' as api; | 12 import 'package:googleapis/fusiontables/v2.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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 | 94 |
60 checkColumnBaseColumn(api.ColumnBaseColumn o) { | 95 checkColumnBaseColumn(api.ColumnBaseColumn o) { |
61 buildCounterColumnBaseColumn++; | 96 buildCounterColumnBaseColumn++; |
62 if (buildCounterColumnBaseColumn < 3) { | 97 if (buildCounterColumnBaseColumn < 3) { |
63 unittest.expect(o.columnId, unittest.equals(42)); | 98 unittest.expect(o.columnId, unittest.equals(42)); |
64 unittest.expect(o.tableIndex, unittest.equals(42)); | 99 unittest.expect(o.tableIndex, unittest.equals(42)); |
65 } | 100 } |
66 buildCounterColumnBaseColumn--; | 101 buildCounterColumnBaseColumn--; |
67 } | 102 } |
68 | 103 |
69 buildUnnamed598() { | 104 buildUnnamed1051() { |
70 var o = new core.List<core.String>(); | 105 var o = new core.List<core.String>(); |
71 o.add("foo"); | 106 o.add("foo"); |
72 o.add("foo"); | 107 o.add("foo"); |
73 return o; | 108 return o; |
74 } | 109 } |
75 | 110 |
76 checkUnnamed598(core.List<core.String> o) { | 111 checkUnnamed1051(core.List<core.String> o) { |
77 unittest.expect(o, unittest.hasLength(2)); | 112 unittest.expect(o, unittest.hasLength(2)); |
78 unittest.expect(o[0], unittest.equals('foo')); | 113 unittest.expect(o[0], unittest.equals('foo')); |
79 unittest.expect(o[1], unittest.equals('foo')); | 114 unittest.expect(o[1], unittest.equals('foo')); |
80 } | 115 } |
81 | 116 |
82 core.int buildCounterColumn = 0; | 117 core.int buildCounterColumn = 0; |
83 buildColumn() { | 118 buildColumn() { |
84 var o = new api.Column(); | 119 var o = new api.Column(); |
85 buildCounterColumn++; | 120 buildCounterColumn++; |
86 if (buildCounterColumn < 3) { | 121 if (buildCounterColumn < 3) { |
87 o.baseColumn = buildColumnBaseColumn(); | 122 o.baseColumn = buildColumnBaseColumn(); |
88 o.columnId = 42; | 123 o.columnId = 42; |
89 o.columnJsonSchema = "foo"; | 124 o.columnJsonSchema = "foo"; |
90 o.columnPropertiesJson = "foo"; | 125 o.columnPropertiesJson = "foo"; |
91 o.description = "foo"; | 126 o.description = "foo"; |
92 o.formatPattern = "foo"; | 127 o.formatPattern = "foo"; |
93 o.graphPredicate = "foo"; | 128 o.graphPredicate = "foo"; |
94 o.kind = "foo"; | 129 o.kind = "foo"; |
95 o.name = "foo"; | 130 o.name = "foo"; |
96 o.type = "foo"; | 131 o.type = "foo"; |
97 o.validValues = buildUnnamed598(); | 132 o.validValues = buildUnnamed1051(); |
98 o.validateData = true; | 133 o.validateData = true; |
99 } | 134 } |
100 buildCounterColumn--; | 135 buildCounterColumn--; |
101 return o; | 136 return o; |
102 } | 137 } |
103 | 138 |
104 checkColumn(api.Column o) { | 139 checkColumn(api.Column o) { |
105 buildCounterColumn++; | 140 buildCounterColumn++; |
106 if (buildCounterColumn < 3) { | 141 if (buildCounterColumn < 3) { |
107 checkColumnBaseColumn(o.baseColumn); | 142 checkColumnBaseColumn(o.baseColumn); |
108 unittest.expect(o.columnId, unittest.equals(42)); | 143 unittest.expect(o.columnId, unittest.equals(42)); |
109 unittest.expect(o.columnJsonSchema, unittest.equals('foo')); | 144 unittest.expect(o.columnJsonSchema, unittest.equals('foo')); |
110 unittest.expect(o.columnPropertiesJson, unittest.equals('foo')); | 145 unittest.expect(o.columnPropertiesJson, unittest.equals('foo')); |
111 unittest.expect(o.description, unittest.equals('foo')); | 146 unittest.expect(o.description, unittest.equals('foo')); |
112 unittest.expect(o.formatPattern, unittest.equals('foo')); | 147 unittest.expect(o.formatPattern, unittest.equals('foo')); |
113 unittest.expect(o.graphPredicate, unittest.equals('foo')); | 148 unittest.expect(o.graphPredicate, unittest.equals('foo')); |
114 unittest.expect(o.kind, unittest.equals('foo')); | 149 unittest.expect(o.kind, unittest.equals('foo')); |
115 unittest.expect(o.name, unittest.equals('foo')); | 150 unittest.expect(o.name, unittest.equals('foo')); |
116 unittest.expect(o.type, unittest.equals('foo')); | 151 unittest.expect(o.type, unittest.equals('foo')); |
117 checkUnnamed598(o.validValues); | 152 checkUnnamed1051(o.validValues); |
118 unittest.expect(o.validateData, unittest.isTrue); | 153 unittest.expect(o.validateData, unittest.isTrue); |
119 } | 154 } |
120 buildCounterColumn--; | 155 buildCounterColumn--; |
121 } | 156 } |
122 | 157 |
123 buildUnnamed599() { | 158 buildUnnamed1052() { |
124 var o = new core.List<api.Column>(); | 159 var o = new core.List<api.Column>(); |
125 o.add(buildColumn()); | 160 o.add(buildColumn()); |
126 o.add(buildColumn()); | 161 o.add(buildColumn()); |
127 return o; | 162 return o; |
128 } | 163 } |
129 | 164 |
130 checkUnnamed599(core.List<api.Column> o) { | 165 checkUnnamed1052(core.List<api.Column> o) { |
131 unittest.expect(o, unittest.hasLength(2)); | 166 unittest.expect(o, unittest.hasLength(2)); |
132 checkColumn(o[0]); | 167 checkColumn(o[0]); |
133 checkColumn(o[1]); | 168 checkColumn(o[1]); |
134 } | 169 } |
135 | 170 |
136 core.int buildCounterColumnList = 0; | 171 core.int buildCounterColumnList = 0; |
137 buildColumnList() { | 172 buildColumnList() { |
138 var o = new api.ColumnList(); | 173 var o = new api.ColumnList(); |
139 buildCounterColumnList++; | 174 buildCounterColumnList++; |
140 if (buildCounterColumnList < 3) { | 175 if (buildCounterColumnList < 3) { |
141 o.items = buildUnnamed599(); | 176 o.items = buildUnnamed1052(); |
142 o.kind = "foo"; | 177 o.kind = "foo"; |
143 o.nextPageToken = "foo"; | 178 o.nextPageToken = "foo"; |
144 o.totalItems = 42; | 179 o.totalItems = 42; |
145 } | 180 } |
146 buildCounterColumnList--; | 181 buildCounterColumnList--; |
147 return o; | 182 return o; |
148 } | 183 } |
149 | 184 |
150 checkColumnList(api.ColumnList o) { | 185 checkColumnList(api.ColumnList o) { |
151 buildCounterColumnList++; | 186 buildCounterColumnList++; |
152 if (buildCounterColumnList < 3) { | 187 if (buildCounterColumnList < 3) { |
153 checkUnnamed599(o.items); | 188 checkUnnamed1052(o.items); |
154 unittest.expect(o.kind, unittest.equals('foo')); | 189 unittest.expect(o.kind, unittest.equals('foo')); |
155 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 190 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
156 unittest.expect(o.totalItems, unittest.equals(42)); | 191 unittest.expect(o.totalItems, unittest.equals(42)); |
157 } | 192 } |
158 buildCounterColumnList--; | 193 buildCounterColumnList--; |
159 } | 194 } |
160 | 195 |
161 buildUnnamed600() { | 196 buildUnnamed1053() { |
162 var o = new core.List<core.Object>(); | 197 var o = new core.List<core.Object>(); |
163 o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}); | 198 o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}); |
164 o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}); | 199 o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}); |
165 return o; | 200 return o; |
166 } | 201 } |
167 | 202 |
168 checkUnnamed600(core.List<core.Object> o) { | 203 checkUnnamed1053(core.List<core.Object> o) { |
169 unittest.expect(o, unittest.hasLength(2)); | 204 unittest.expect(o, unittest.hasLength(2)); |
170 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')); | 205 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')); |
171 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')); | 206 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')); |
172 } | 207 } |
173 | 208 |
174 core.int buildCounterGeometry = 0; | 209 core.int buildCounterGeometry = 0; |
175 buildGeometry() { | 210 buildGeometry() { |
176 var o = new api.Geometry(); | 211 var o = new api.Geometry(); |
177 buildCounterGeometry++; | 212 buildCounterGeometry++; |
178 if (buildCounterGeometry < 3) { | 213 if (buildCounterGeometry < 3) { |
179 o.geometries = buildUnnamed600(); | 214 o.geometries = buildUnnamed1053(); |
180 o.geometry = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 215 o.geometry = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
181 o.type = "foo"; | 216 o.type = "foo"; |
182 } | 217 } |
183 buildCounterGeometry--; | 218 buildCounterGeometry--; |
184 return o; | 219 return o; |
185 } | 220 } |
186 | 221 |
187 checkGeometry(api.Geometry o) { | 222 checkGeometry(api.Geometry o) { |
188 buildCounterGeometry++; | 223 buildCounterGeometry++; |
189 if (buildCounterGeometry < 3) { | 224 if (buildCounterGeometry < 3) { |
190 checkUnnamed600(o.geometries); | 225 checkUnnamed1053(o.geometries); |
191 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')); | 226 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')); |
192 unittest.expect(o.type, unittest.equals('foo')); | 227 unittest.expect(o.type, unittest.equals('foo')); |
193 } | 228 } |
194 buildCounterGeometry--; | 229 buildCounterGeometry--; |
195 } | 230 } |
196 | 231 |
197 core.int buildCounterImport = 0; | 232 core.int buildCounterImport = 0; |
198 buildImport() { | 233 buildImport() { |
199 var o = new api.Import(); | 234 var o = new api.Import(); |
200 buildCounterImport++; | 235 buildCounterImport++; |
201 if (buildCounterImport < 3) { | 236 if (buildCounterImport < 3) { |
202 o.kind = "foo"; | 237 o.kind = "foo"; |
203 o.numRowsReceived = "foo"; | 238 o.numRowsReceived = "foo"; |
204 } | 239 } |
205 buildCounterImport--; | 240 buildCounterImport--; |
206 return o; | 241 return o; |
207 } | 242 } |
208 | 243 |
209 checkImport(api.Import o) { | 244 checkImport(api.Import o) { |
210 buildCounterImport++; | 245 buildCounterImport++; |
211 if (buildCounterImport < 3) { | 246 if (buildCounterImport < 3) { |
212 unittest.expect(o.kind, unittest.equals('foo')); | 247 unittest.expect(o.kind, unittest.equals('foo')); |
213 unittest.expect(o.numRowsReceived, unittest.equals('foo')); | 248 unittest.expect(o.numRowsReceived, unittest.equals('foo')); |
214 } | 249 } |
215 buildCounterImport--; | 250 buildCounterImport--; |
216 } | 251 } |
217 | 252 |
218 buildUnnamed601() { | 253 buildUnnamed1054() { |
219 var o = new core.List<core.double>(); | 254 var o = new core.List<core.double>(); |
220 o.add(42.0); | 255 o.add(42.0); |
221 o.add(42.0); | 256 o.add(42.0); |
222 return o; | 257 return o; |
223 } | 258 } |
224 | 259 |
225 checkUnnamed601(core.List<core.double> o) { | 260 checkUnnamed1054(core.List<core.double> o) { |
226 unittest.expect(o, unittest.hasLength(2)); | 261 unittest.expect(o, unittest.hasLength(2)); |
227 unittest.expect(o[0], unittest.equals(42.0)); | 262 unittest.expect(o[0], unittest.equals(42.0)); |
228 unittest.expect(o[1], unittest.equals(42.0)); | 263 unittest.expect(o[1], unittest.equals(42.0)); |
229 } | 264 } |
230 | 265 |
231 buildUnnamed602() { | 266 buildUnnamed1055() { |
232 var o = new core.List<core.List<core.double>>(); | 267 var o = new core.List<core.List<core.double>>(); |
233 o.add(buildUnnamed601()); | 268 o.add(buildUnnamed1054()); |
234 o.add(buildUnnamed601()); | 269 o.add(buildUnnamed1054()); |
235 return o; | 270 return o; |
236 } | 271 } |
237 | 272 |
238 checkUnnamed602(core.List<core.List<core.double>> o) { | 273 checkUnnamed1055(core.List<core.List<core.double>> o) { |
239 unittest.expect(o, unittest.hasLength(2)); | 274 unittest.expect(o, unittest.hasLength(2)); |
240 checkUnnamed601(o[0]); | 275 checkUnnamed1054(o[0]); |
241 checkUnnamed601(o[1]); | 276 checkUnnamed1054(o[1]); |
242 } | 277 } |
243 | 278 |
244 core.int buildCounterLine = 0; | 279 core.int buildCounterLine = 0; |
245 buildLine() { | 280 buildLine() { |
246 var o = new api.Line(); | 281 var o = new api.Line(); |
247 buildCounterLine++; | 282 buildCounterLine++; |
248 if (buildCounterLine < 3) { | 283 if (buildCounterLine < 3) { |
249 o.coordinates = buildUnnamed602(); | 284 o.coordinates = buildUnnamed1055(); |
250 o.type = "foo"; | 285 o.type = "foo"; |
251 } | 286 } |
252 buildCounterLine--; | 287 buildCounterLine--; |
253 return o; | 288 return o; |
254 } | 289 } |
255 | 290 |
256 checkLine(api.Line o) { | 291 checkLine(api.Line o) { |
257 buildCounterLine++; | 292 buildCounterLine++; |
258 if (buildCounterLine < 3) { | 293 if (buildCounterLine < 3) { |
259 checkUnnamed602(o.coordinates); | 294 checkUnnamed1055(o.coordinates); |
260 unittest.expect(o.type, unittest.equals('foo')); | 295 unittest.expect(o.type, unittest.equals('foo')); |
261 } | 296 } |
262 buildCounterLine--; | 297 buildCounterLine--; |
263 } | 298 } |
264 | 299 |
265 core.int buildCounterLineStyle = 0; | 300 core.int buildCounterLineStyle = 0; |
266 buildLineStyle() { | 301 buildLineStyle() { |
267 var o = new api.LineStyle(); | 302 var o = new api.LineStyle(); |
268 buildCounterLineStyle++; | 303 buildCounterLineStyle++; |
269 if (buildCounterLineStyle < 3) { | 304 if (buildCounterLineStyle < 3) { |
(...skipping 12 matching lines...) Expand all Loading... |
282 if (buildCounterLineStyle < 3) { | 317 if (buildCounterLineStyle < 3) { |
283 unittest.expect(o.strokeColor, unittest.equals('foo')); | 318 unittest.expect(o.strokeColor, unittest.equals('foo')); |
284 checkStyleFunction(o.strokeColorStyler); | 319 checkStyleFunction(o.strokeColorStyler); |
285 unittest.expect(o.strokeOpacity, unittest.equals(42.0)); | 320 unittest.expect(o.strokeOpacity, unittest.equals(42.0)); |
286 unittest.expect(o.strokeWeight, unittest.equals(42)); | 321 unittest.expect(o.strokeWeight, unittest.equals(42)); |
287 checkStyleFunction(o.strokeWeightStyler); | 322 checkStyleFunction(o.strokeWeightStyler); |
288 } | 323 } |
289 buildCounterLineStyle--; | 324 buildCounterLineStyle--; |
290 } | 325 } |
291 | 326 |
292 buildUnnamed603() { | 327 buildUnnamed1056() { |
293 var o = new core.List<core.double>(); | 328 var o = new core.List<core.double>(); |
294 o.add(42.0); | 329 o.add(42.0); |
295 o.add(42.0); | 330 o.add(42.0); |
296 return o; | 331 return o; |
297 } | 332 } |
298 | 333 |
299 checkUnnamed603(core.List<core.double> o) { | 334 checkUnnamed1056(core.List<core.double> o) { |
300 unittest.expect(o, unittest.hasLength(2)); | 335 unittest.expect(o, unittest.hasLength(2)); |
301 unittest.expect(o[0], unittest.equals(42.0)); | 336 unittest.expect(o[0], unittest.equals(42.0)); |
302 unittest.expect(o[1], unittest.equals(42.0)); | 337 unittest.expect(o[1], unittest.equals(42.0)); |
303 } | 338 } |
304 | 339 |
305 core.int buildCounterPoint = 0; | 340 core.int buildCounterPoint = 0; |
306 buildPoint() { | 341 buildPoint() { |
307 var o = new api.Point(); | 342 var o = new api.Point(); |
308 buildCounterPoint++; | 343 buildCounterPoint++; |
309 if (buildCounterPoint < 3) { | 344 if (buildCounterPoint < 3) { |
310 o.coordinates = buildUnnamed603(); | 345 o.coordinates = buildUnnamed1056(); |
311 o.type = "foo"; | 346 o.type = "foo"; |
312 } | 347 } |
313 buildCounterPoint--; | 348 buildCounterPoint--; |
314 return o; | 349 return o; |
315 } | 350 } |
316 | 351 |
317 checkPoint(api.Point o) { | 352 checkPoint(api.Point o) { |
318 buildCounterPoint++; | 353 buildCounterPoint++; |
319 if (buildCounterPoint < 3) { | 354 if (buildCounterPoint < 3) { |
320 checkUnnamed603(o.coordinates); | 355 checkUnnamed1056(o.coordinates); |
321 unittest.expect(o.type, unittest.equals('foo')); | 356 unittest.expect(o.type, unittest.equals('foo')); |
322 } | 357 } |
323 buildCounterPoint--; | 358 buildCounterPoint--; |
324 } | 359 } |
325 | 360 |
326 core.int buildCounterPointStyle = 0; | 361 core.int buildCounterPointStyle = 0; |
327 buildPointStyle() { | 362 buildPointStyle() { |
328 var o = new api.PointStyle(); | 363 var o = new api.PointStyle(); |
329 buildCounterPointStyle++; | 364 buildCounterPointStyle++; |
330 if (buildCounterPointStyle < 3) { | 365 if (buildCounterPointStyle < 3) { |
331 o.iconName = "foo"; | 366 o.iconName = "foo"; |
332 o.iconStyler = buildStyleFunction(); | 367 o.iconStyler = buildStyleFunction(); |
333 } | 368 } |
334 buildCounterPointStyle--; | 369 buildCounterPointStyle--; |
335 return o; | 370 return o; |
336 } | 371 } |
337 | 372 |
338 checkPointStyle(api.PointStyle o) { | 373 checkPointStyle(api.PointStyle o) { |
339 buildCounterPointStyle++; | 374 buildCounterPointStyle++; |
340 if (buildCounterPointStyle < 3) { | 375 if (buildCounterPointStyle < 3) { |
341 unittest.expect(o.iconName, unittest.equals('foo')); | 376 unittest.expect(o.iconName, unittest.equals('foo')); |
342 checkStyleFunction(o.iconStyler); | 377 checkStyleFunction(o.iconStyler); |
343 } | 378 } |
344 buildCounterPointStyle--; | 379 buildCounterPointStyle--; |
345 } | 380 } |
346 | 381 |
347 buildUnnamed604() { | 382 buildUnnamed1057() { |
348 var o = new core.List<core.double>(); | 383 var o = new core.List<core.double>(); |
349 o.add(42.0); | 384 o.add(42.0); |
350 o.add(42.0); | 385 o.add(42.0); |
351 return o; | 386 return o; |
352 } | 387 } |
353 | 388 |
354 checkUnnamed604(core.List<core.double> o) { | 389 checkUnnamed1057(core.List<core.double> o) { |
355 unittest.expect(o, unittest.hasLength(2)); | 390 unittest.expect(o, unittest.hasLength(2)); |
356 unittest.expect(o[0], unittest.equals(42.0)); | 391 unittest.expect(o[0], unittest.equals(42.0)); |
357 unittest.expect(o[1], unittest.equals(42.0)); | 392 unittest.expect(o[1], unittest.equals(42.0)); |
358 } | 393 } |
359 | 394 |
360 buildUnnamed605() { | 395 buildUnnamed1058() { |
361 var o = new core.List<core.List<core.double>>(); | 396 var o = new core.List<core.List<core.double>>(); |
362 o.add(buildUnnamed604()); | 397 o.add(buildUnnamed1057()); |
363 o.add(buildUnnamed604()); | 398 o.add(buildUnnamed1057()); |
364 return o; | 399 return o; |
365 } | 400 } |
366 | 401 |
367 checkUnnamed605(core.List<core.List<core.double>> o) { | 402 checkUnnamed1058(core.List<core.List<core.double>> o) { |
368 unittest.expect(o, unittest.hasLength(2)); | 403 unittest.expect(o, unittest.hasLength(2)); |
369 checkUnnamed604(o[0]); | 404 checkUnnamed1057(o[0]); |
370 checkUnnamed604(o[1]); | 405 checkUnnamed1057(o[1]); |
371 } | 406 } |
372 | 407 |
373 buildUnnamed606() { | 408 buildUnnamed1059() { |
374 var o = new core.List<core.List<core.List<core.double>>>(); | 409 var o = new core.List<core.List<core.List<core.double>>>(); |
375 o.add(buildUnnamed605()); | 410 o.add(buildUnnamed1058()); |
376 o.add(buildUnnamed605()); | 411 o.add(buildUnnamed1058()); |
377 return o; | 412 return o; |
378 } | 413 } |
379 | 414 |
380 checkUnnamed606(core.List<core.List<core.List<core.double>>> o) { | 415 checkUnnamed1059(core.List<core.List<core.List<core.double>>> o) { |
381 unittest.expect(o, unittest.hasLength(2)); | 416 unittest.expect(o, unittest.hasLength(2)); |
382 checkUnnamed605(o[0]); | 417 checkUnnamed1058(o[0]); |
383 checkUnnamed605(o[1]); | 418 checkUnnamed1058(o[1]); |
384 } | 419 } |
385 | 420 |
386 core.int buildCounterPolygon = 0; | 421 core.int buildCounterPolygon = 0; |
387 buildPolygon() { | 422 buildPolygon() { |
388 var o = new api.Polygon(); | 423 var o = new api.Polygon(); |
389 buildCounterPolygon++; | 424 buildCounterPolygon++; |
390 if (buildCounterPolygon < 3) { | 425 if (buildCounterPolygon < 3) { |
391 o.coordinates = buildUnnamed606(); | 426 o.coordinates = buildUnnamed1059(); |
392 o.type = "foo"; | 427 o.type = "foo"; |
393 } | 428 } |
394 buildCounterPolygon--; | 429 buildCounterPolygon--; |
395 return o; | 430 return o; |
396 } | 431 } |
397 | 432 |
398 checkPolygon(api.Polygon o) { | 433 checkPolygon(api.Polygon o) { |
399 buildCounterPolygon++; | 434 buildCounterPolygon++; |
400 if (buildCounterPolygon < 3) { | 435 if (buildCounterPolygon < 3) { |
401 checkUnnamed606(o.coordinates); | 436 checkUnnamed1059(o.coordinates); |
402 unittest.expect(o.type, unittest.equals('foo')); | 437 unittest.expect(o.type, unittest.equals('foo')); |
403 } | 438 } |
404 buildCounterPolygon--; | 439 buildCounterPolygon--; |
405 } | 440 } |
406 | 441 |
407 core.int buildCounterPolygonStyle = 0; | 442 core.int buildCounterPolygonStyle = 0; |
408 buildPolygonStyle() { | 443 buildPolygonStyle() { |
409 var o = new api.PolygonStyle(); | 444 var o = new api.PolygonStyle(); |
410 buildCounterPolygonStyle++; | 445 buildCounterPolygonStyle++; |
411 if (buildCounterPolygonStyle < 3) { | 446 if (buildCounterPolygonStyle < 3) { |
(...skipping 18 matching lines...) Expand all Loading... |
430 unittest.expect(o.fillOpacity, unittest.equals(42.0)); | 465 unittest.expect(o.fillOpacity, unittest.equals(42.0)); |
431 unittest.expect(o.strokeColor, unittest.equals('foo')); | 466 unittest.expect(o.strokeColor, unittest.equals('foo')); |
432 checkStyleFunction(o.strokeColorStyler); | 467 checkStyleFunction(o.strokeColorStyler); |
433 unittest.expect(o.strokeOpacity, unittest.equals(42.0)); | 468 unittest.expect(o.strokeOpacity, unittest.equals(42.0)); |
434 unittest.expect(o.strokeWeight, unittest.equals(42)); | 469 unittest.expect(o.strokeWeight, unittest.equals(42)); |
435 checkStyleFunction(o.strokeWeightStyler); | 470 checkStyleFunction(o.strokeWeightStyler); |
436 } | 471 } |
437 buildCounterPolygonStyle--; | 472 buildCounterPolygonStyle--; |
438 } | 473 } |
439 | 474 |
440 buildUnnamed607() { | 475 buildUnnamed1060() { |
441 var o = new core.List<core.String>(); | 476 var o = new core.List<core.String>(); |
442 o.add("foo"); | 477 o.add("foo"); |
443 o.add("foo"); | 478 o.add("foo"); |
444 return o; | 479 return o; |
445 } | 480 } |
446 | 481 |
447 checkUnnamed607(core.List<core.String> o) { | 482 checkUnnamed1060(core.List<core.String> o) { |
448 unittest.expect(o, unittest.hasLength(2)); | 483 unittest.expect(o, unittest.hasLength(2)); |
449 unittest.expect(o[0], unittest.equals('foo')); | 484 unittest.expect(o[0], unittest.equals('foo')); |
450 unittest.expect(o[1], unittest.equals('foo')); | 485 unittest.expect(o[1], unittest.equals('foo')); |
451 } | 486 } |
452 | 487 |
453 buildUnnamed608() { | 488 buildUnnamed1061() { |
454 var o = new core.List<core.Object>(); | 489 var o = new core.List<core.Object>(); |
455 o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}); | 490 o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}); |
456 o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}); | 491 o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}); |
457 return o; | 492 return o; |
458 } | 493 } |
459 | 494 |
460 checkUnnamed608(core.List<core.Object> o) { | 495 checkUnnamed1061(core.List<core.Object> o) { |
461 unittest.expect(o, unittest.hasLength(2)); | 496 unittest.expect(o, unittest.hasLength(2)); |
462 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')); | 497 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')); |
463 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')); | 498 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')); |
464 } | 499 } |
465 | 500 |
466 buildUnnamed609() { | 501 buildUnnamed1062() { |
467 var o = new core.List<core.List<core.Object>>(); | 502 var o = new core.List<core.List<core.Object>>(); |
468 o.add(buildUnnamed608()); | 503 o.add(buildUnnamed1061()); |
469 o.add(buildUnnamed608()); | 504 o.add(buildUnnamed1061()); |
470 return o; | 505 return o; |
471 } | 506 } |
472 | 507 |
473 checkUnnamed609(core.List<core.List<core.Object>> o) { | 508 checkUnnamed1062(core.List<core.List<core.Object>> o) { |
474 unittest.expect(o, unittest.hasLength(2)); | 509 unittest.expect(o, unittest.hasLength(2)); |
475 checkUnnamed608(o[0]); | 510 checkUnnamed1061(o[0]); |
476 checkUnnamed608(o[1]); | 511 checkUnnamed1061(o[1]); |
477 } | 512 } |
478 | 513 |
479 core.int buildCounterSqlresponse = 0; | 514 core.int buildCounterSqlresponse = 0; |
480 buildSqlresponse() { | 515 buildSqlresponse() { |
481 var o = new api.Sqlresponse(); | 516 var o = new api.Sqlresponse(); |
482 buildCounterSqlresponse++; | 517 buildCounterSqlresponse++; |
483 if (buildCounterSqlresponse < 3) { | 518 if (buildCounterSqlresponse < 3) { |
484 o.columns = buildUnnamed607(); | 519 o.columns = buildUnnamed1060(); |
485 o.kind = "foo"; | 520 o.kind = "foo"; |
486 o.rows = buildUnnamed609(); | 521 o.rows = buildUnnamed1062(); |
487 } | 522 } |
488 buildCounterSqlresponse--; | 523 buildCounterSqlresponse--; |
489 return o; | 524 return o; |
490 } | 525 } |
491 | 526 |
492 checkSqlresponse(api.Sqlresponse o) { | 527 checkSqlresponse(api.Sqlresponse o) { |
493 buildCounterSqlresponse++; | 528 buildCounterSqlresponse++; |
494 if (buildCounterSqlresponse < 3) { | 529 if (buildCounterSqlresponse < 3) { |
495 checkUnnamed607(o.columns); | 530 checkUnnamed1060(o.columns); |
496 unittest.expect(o.kind, unittest.equals('foo')); | 531 unittest.expect(o.kind, unittest.equals('foo')); |
497 checkUnnamed609(o.rows); | 532 checkUnnamed1062(o.rows); |
498 } | 533 } |
499 buildCounterSqlresponse--; | 534 buildCounterSqlresponse--; |
500 } | 535 } |
501 | 536 |
502 buildUnnamed610() { | 537 buildUnnamed1063() { |
503 var o = new core.List<api.Bucket>(); | 538 var o = new core.List<api.Bucket>(); |
504 o.add(buildBucket()); | 539 o.add(buildBucket()); |
505 o.add(buildBucket()); | 540 o.add(buildBucket()); |
506 return o; | 541 return o; |
507 } | 542 } |
508 | 543 |
509 checkUnnamed610(core.List<api.Bucket> o) { | 544 checkUnnamed1063(core.List<api.Bucket> o) { |
510 unittest.expect(o, unittest.hasLength(2)); | 545 unittest.expect(o, unittest.hasLength(2)); |
511 checkBucket(o[0]); | 546 checkBucket(o[0]); |
512 checkBucket(o[1]); | 547 checkBucket(o[1]); |
513 } | 548 } |
514 | 549 |
515 core.int buildCounterStyleFunctionGradientColors = 0; | 550 core.int buildCounterStyleFunctionGradientColors = 0; |
516 buildStyleFunctionGradientColors() { | 551 buildStyleFunctionGradientColors() { |
517 var o = new api.StyleFunctionGradientColors(); | 552 var o = new api.StyleFunctionGradientColors(); |
518 buildCounterStyleFunctionGradientColors++; | 553 buildCounterStyleFunctionGradientColors++; |
519 if (buildCounterStyleFunctionGradientColors < 3) { | 554 if (buildCounterStyleFunctionGradientColors < 3) { |
520 o.color = "foo"; | 555 o.color = "foo"; |
521 o.opacity = 42.0; | 556 o.opacity = 42.0; |
522 } | 557 } |
523 buildCounterStyleFunctionGradientColors--; | 558 buildCounterStyleFunctionGradientColors--; |
524 return o; | 559 return o; |
525 } | 560 } |
526 | 561 |
527 checkStyleFunctionGradientColors(api.StyleFunctionGradientColors o) { | 562 checkStyleFunctionGradientColors(api.StyleFunctionGradientColors o) { |
528 buildCounterStyleFunctionGradientColors++; | 563 buildCounterStyleFunctionGradientColors++; |
529 if (buildCounterStyleFunctionGradientColors < 3) { | 564 if (buildCounterStyleFunctionGradientColors < 3) { |
530 unittest.expect(o.color, unittest.equals('foo')); | 565 unittest.expect(o.color, unittest.equals('foo')); |
531 unittest.expect(o.opacity, unittest.equals(42.0)); | 566 unittest.expect(o.opacity, unittest.equals(42.0)); |
532 } | 567 } |
533 buildCounterStyleFunctionGradientColors--; | 568 buildCounterStyleFunctionGradientColors--; |
534 } | 569 } |
535 | 570 |
536 buildUnnamed611() { | 571 buildUnnamed1064() { |
537 var o = new core.List<api.StyleFunctionGradientColors>(); | 572 var o = new core.List<api.StyleFunctionGradientColors>(); |
538 o.add(buildStyleFunctionGradientColors()); | 573 o.add(buildStyleFunctionGradientColors()); |
539 o.add(buildStyleFunctionGradientColors()); | 574 o.add(buildStyleFunctionGradientColors()); |
540 return o; | 575 return o; |
541 } | 576 } |
542 | 577 |
543 checkUnnamed611(core.List<api.StyleFunctionGradientColors> o) { | 578 checkUnnamed1064(core.List<api.StyleFunctionGradientColors> o) { |
544 unittest.expect(o, unittest.hasLength(2)); | 579 unittest.expect(o, unittest.hasLength(2)); |
545 checkStyleFunctionGradientColors(o[0]); | 580 checkStyleFunctionGradientColors(o[0]); |
546 checkStyleFunctionGradientColors(o[1]); | 581 checkStyleFunctionGradientColors(o[1]); |
547 } | 582 } |
548 | 583 |
549 core.int buildCounterStyleFunctionGradient = 0; | 584 core.int buildCounterStyleFunctionGradient = 0; |
550 buildStyleFunctionGradient() { | 585 buildStyleFunctionGradient() { |
551 var o = new api.StyleFunctionGradient(); | 586 var o = new api.StyleFunctionGradient(); |
552 buildCounterStyleFunctionGradient++; | 587 buildCounterStyleFunctionGradient++; |
553 if (buildCounterStyleFunctionGradient < 3) { | 588 if (buildCounterStyleFunctionGradient < 3) { |
554 o.colors = buildUnnamed611(); | 589 o.colors = buildUnnamed1064(); |
555 o.max = 42.0; | 590 o.max = 42.0; |
556 o.min = 42.0; | 591 o.min = 42.0; |
557 } | 592 } |
558 buildCounterStyleFunctionGradient--; | 593 buildCounterStyleFunctionGradient--; |
559 return o; | 594 return o; |
560 } | 595 } |
561 | 596 |
562 checkStyleFunctionGradient(api.StyleFunctionGradient o) { | 597 checkStyleFunctionGradient(api.StyleFunctionGradient o) { |
563 buildCounterStyleFunctionGradient++; | 598 buildCounterStyleFunctionGradient++; |
564 if (buildCounterStyleFunctionGradient < 3) { | 599 if (buildCounterStyleFunctionGradient < 3) { |
565 checkUnnamed611(o.colors); | 600 checkUnnamed1064(o.colors); |
566 unittest.expect(o.max, unittest.equals(42.0)); | 601 unittest.expect(o.max, unittest.equals(42.0)); |
567 unittest.expect(o.min, unittest.equals(42.0)); | 602 unittest.expect(o.min, unittest.equals(42.0)); |
568 } | 603 } |
569 buildCounterStyleFunctionGradient--; | 604 buildCounterStyleFunctionGradient--; |
570 } | 605 } |
571 | 606 |
572 core.int buildCounterStyleFunction = 0; | 607 core.int buildCounterStyleFunction = 0; |
573 buildStyleFunction() { | 608 buildStyleFunction() { |
574 var o = new api.StyleFunction(); | 609 var o = new api.StyleFunction(); |
575 buildCounterStyleFunction++; | 610 buildCounterStyleFunction++; |
576 if (buildCounterStyleFunction < 3) { | 611 if (buildCounterStyleFunction < 3) { |
577 o.buckets = buildUnnamed610(); | 612 o.buckets = buildUnnamed1063(); |
578 o.columnName = "foo"; | 613 o.columnName = "foo"; |
579 o.gradient = buildStyleFunctionGradient(); | 614 o.gradient = buildStyleFunctionGradient(); |
580 o.kind = "foo"; | 615 o.kind = "foo"; |
581 } | 616 } |
582 buildCounterStyleFunction--; | 617 buildCounterStyleFunction--; |
583 return o; | 618 return o; |
584 } | 619 } |
585 | 620 |
586 checkStyleFunction(api.StyleFunction o) { | 621 checkStyleFunction(api.StyleFunction o) { |
587 buildCounterStyleFunction++; | 622 buildCounterStyleFunction++; |
588 if (buildCounterStyleFunction < 3) { | 623 if (buildCounterStyleFunction < 3) { |
589 checkUnnamed610(o.buckets); | 624 checkUnnamed1063(o.buckets); |
590 unittest.expect(o.columnName, unittest.equals('foo')); | 625 unittest.expect(o.columnName, unittest.equals('foo')); |
591 checkStyleFunctionGradient(o.gradient); | 626 checkStyleFunctionGradient(o.gradient); |
592 unittest.expect(o.kind, unittest.equals('foo')); | 627 unittest.expect(o.kind, unittest.equals('foo')); |
593 } | 628 } |
594 buildCounterStyleFunction--; | 629 buildCounterStyleFunction--; |
595 } | 630 } |
596 | 631 |
597 core.int buildCounterStyleSetting = 0; | 632 core.int buildCounterStyleSetting = 0; |
598 buildStyleSetting() { | 633 buildStyleSetting() { |
599 var o = new api.StyleSetting(); | 634 var o = new api.StyleSetting(); |
(...skipping 18 matching lines...) Expand all Loading... |
618 checkPointStyle(o.markerOptions); | 653 checkPointStyle(o.markerOptions); |
619 unittest.expect(o.name, unittest.equals('foo')); | 654 unittest.expect(o.name, unittest.equals('foo')); |
620 checkPolygonStyle(o.polygonOptions); | 655 checkPolygonStyle(o.polygonOptions); |
621 checkLineStyle(o.polylineOptions); | 656 checkLineStyle(o.polylineOptions); |
622 unittest.expect(o.styleId, unittest.equals(42)); | 657 unittest.expect(o.styleId, unittest.equals(42)); |
623 unittest.expect(o.tableId, unittest.equals('foo')); | 658 unittest.expect(o.tableId, unittest.equals('foo')); |
624 } | 659 } |
625 buildCounterStyleSetting--; | 660 buildCounterStyleSetting--; |
626 } | 661 } |
627 | 662 |
628 buildUnnamed612() { | 663 buildUnnamed1065() { |
629 var o = new core.List<api.StyleSetting>(); | 664 var o = new core.List<api.StyleSetting>(); |
630 o.add(buildStyleSetting()); | 665 o.add(buildStyleSetting()); |
631 o.add(buildStyleSetting()); | 666 o.add(buildStyleSetting()); |
632 return o; | 667 return o; |
633 } | 668 } |
634 | 669 |
635 checkUnnamed612(core.List<api.StyleSetting> o) { | 670 checkUnnamed1065(core.List<api.StyleSetting> o) { |
636 unittest.expect(o, unittest.hasLength(2)); | 671 unittest.expect(o, unittest.hasLength(2)); |
637 checkStyleSetting(o[0]); | 672 checkStyleSetting(o[0]); |
638 checkStyleSetting(o[1]); | 673 checkStyleSetting(o[1]); |
639 } | 674 } |
640 | 675 |
641 core.int buildCounterStyleSettingList = 0; | 676 core.int buildCounterStyleSettingList = 0; |
642 buildStyleSettingList() { | 677 buildStyleSettingList() { |
643 var o = new api.StyleSettingList(); | 678 var o = new api.StyleSettingList(); |
644 buildCounterStyleSettingList++; | 679 buildCounterStyleSettingList++; |
645 if (buildCounterStyleSettingList < 3) { | 680 if (buildCounterStyleSettingList < 3) { |
646 o.items = buildUnnamed612(); | 681 o.items = buildUnnamed1065(); |
647 o.kind = "foo"; | 682 o.kind = "foo"; |
648 o.nextPageToken = "foo"; | 683 o.nextPageToken = "foo"; |
649 o.totalItems = 42; | 684 o.totalItems = 42; |
650 } | 685 } |
651 buildCounterStyleSettingList--; | 686 buildCounterStyleSettingList--; |
652 return o; | 687 return o; |
653 } | 688 } |
654 | 689 |
655 checkStyleSettingList(api.StyleSettingList o) { | 690 checkStyleSettingList(api.StyleSettingList o) { |
656 buildCounterStyleSettingList++; | 691 buildCounterStyleSettingList++; |
657 if (buildCounterStyleSettingList < 3) { | 692 if (buildCounterStyleSettingList < 3) { |
658 checkUnnamed612(o.items); | 693 checkUnnamed1065(o.items); |
659 unittest.expect(o.kind, unittest.equals('foo')); | 694 unittest.expect(o.kind, unittest.equals('foo')); |
660 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 695 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
661 unittest.expect(o.totalItems, unittest.equals(42)); | 696 unittest.expect(o.totalItems, unittest.equals(42)); |
662 } | 697 } |
663 buildCounterStyleSettingList--; | 698 buildCounterStyleSettingList--; |
664 } | 699 } |
665 | 700 |
666 buildUnnamed613() { | 701 buildUnnamed1066() { |
667 var o = new core.List<core.String>(); | 702 var o = new core.List<core.String>(); |
668 o.add("foo"); | 703 o.add("foo"); |
669 o.add("foo"); | 704 o.add("foo"); |
670 return o; | 705 return o; |
671 } | 706 } |
672 | 707 |
673 checkUnnamed613(core.List<core.String> o) { | 708 checkUnnamed1066(core.List<core.String> o) { |
674 unittest.expect(o, unittest.hasLength(2)); | 709 unittest.expect(o, unittest.hasLength(2)); |
675 unittest.expect(o[0], unittest.equals('foo')); | 710 unittest.expect(o[0], unittest.equals('foo')); |
676 unittest.expect(o[1], unittest.equals('foo')); | 711 unittest.expect(o[1], unittest.equals('foo')); |
677 } | 712 } |
678 | 713 |
679 buildUnnamed614() { | 714 buildUnnamed1067() { |
680 var o = new core.List<api.Column>(); | 715 var o = new core.List<api.Column>(); |
681 o.add(buildColumn()); | 716 o.add(buildColumn()); |
682 o.add(buildColumn()); | 717 o.add(buildColumn()); |
683 return o; | 718 return o; |
684 } | 719 } |
685 | 720 |
686 checkUnnamed614(core.List<api.Column> o) { | 721 checkUnnamed1067(core.List<api.Column> o) { |
687 unittest.expect(o, unittest.hasLength(2)); | 722 unittest.expect(o, unittest.hasLength(2)); |
688 checkColumn(o[0]); | 723 checkColumn(o[0]); |
689 checkColumn(o[1]); | 724 checkColumn(o[1]); |
690 } | 725 } |
691 | 726 |
692 core.int buildCounterTable = 0; | 727 core.int buildCounterTable = 0; |
693 buildTable() { | 728 buildTable() { |
694 var o = new api.Table(); | 729 var o = new api.Table(); |
695 buildCounterTable++; | 730 buildCounterTable++; |
696 if (buildCounterTable < 3) { | 731 if (buildCounterTable < 3) { |
697 o.attribution = "foo"; | 732 o.attribution = "foo"; |
698 o.attributionLink = "foo"; | 733 o.attributionLink = "foo"; |
699 o.baseTableIds = buildUnnamed613(); | 734 o.baseTableIds = buildUnnamed1066(); |
700 o.columnPropertiesJsonSchema = "foo"; | 735 o.columnPropertiesJsonSchema = "foo"; |
701 o.columns = buildUnnamed614(); | 736 o.columns = buildUnnamed1067(); |
702 o.description = "foo"; | 737 o.description = "foo"; |
703 o.isExportable = true; | 738 o.isExportable = true; |
704 o.kind = "foo"; | 739 o.kind = "foo"; |
705 o.name = "foo"; | 740 o.name = "foo"; |
706 o.sql = "foo"; | 741 o.sql = "foo"; |
707 o.tableId = "foo"; | 742 o.tableId = "foo"; |
708 o.tablePropertiesJson = "foo"; | 743 o.tablePropertiesJson = "foo"; |
709 o.tablePropertiesJsonSchema = "foo"; | 744 o.tablePropertiesJsonSchema = "foo"; |
710 } | 745 } |
711 buildCounterTable--; | 746 buildCounterTable--; |
712 return o; | 747 return o; |
713 } | 748 } |
714 | 749 |
715 checkTable(api.Table o) { | 750 checkTable(api.Table o) { |
716 buildCounterTable++; | 751 buildCounterTable++; |
717 if (buildCounterTable < 3) { | 752 if (buildCounterTable < 3) { |
718 unittest.expect(o.attribution, unittest.equals('foo')); | 753 unittest.expect(o.attribution, unittest.equals('foo')); |
719 unittest.expect(o.attributionLink, unittest.equals('foo')); | 754 unittest.expect(o.attributionLink, unittest.equals('foo')); |
720 checkUnnamed613(o.baseTableIds); | 755 checkUnnamed1066(o.baseTableIds); |
721 unittest.expect(o.columnPropertiesJsonSchema, unittest.equals('foo')); | 756 unittest.expect(o.columnPropertiesJsonSchema, unittest.equals('foo')); |
722 checkUnnamed614(o.columns); | 757 checkUnnamed1067(o.columns); |
723 unittest.expect(o.description, unittest.equals('foo')); | 758 unittest.expect(o.description, unittest.equals('foo')); |
724 unittest.expect(o.isExportable, unittest.isTrue); | 759 unittest.expect(o.isExportable, unittest.isTrue); |
725 unittest.expect(o.kind, unittest.equals('foo')); | 760 unittest.expect(o.kind, unittest.equals('foo')); |
726 unittest.expect(o.name, unittest.equals('foo')); | 761 unittest.expect(o.name, unittest.equals('foo')); |
727 unittest.expect(o.sql, unittest.equals('foo')); | 762 unittest.expect(o.sql, unittest.equals('foo')); |
728 unittest.expect(o.tableId, unittest.equals('foo')); | 763 unittest.expect(o.tableId, unittest.equals('foo')); |
729 unittest.expect(o.tablePropertiesJson, unittest.equals('foo')); | 764 unittest.expect(o.tablePropertiesJson, unittest.equals('foo')); |
730 unittest.expect(o.tablePropertiesJsonSchema, unittest.equals('foo')); | 765 unittest.expect(o.tablePropertiesJsonSchema, unittest.equals('foo')); |
731 } | 766 } |
732 buildCounterTable--; | 767 buildCounterTable--; |
733 } | 768 } |
734 | 769 |
735 buildUnnamed615() { | 770 buildUnnamed1068() { |
736 var o = new core.List<api.Table>(); | 771 var o = new core.List<api.Table>(); |
737 o.add(buildTable()); | 772 o.add(buildTable()); |
738 o.add(buildTable()); | 773 o.add(buildTable()); |
739 return o; | 774 return o; |
740 } | 775 } |
741 | 776 |
742 checkUnnamed615(core.List<api.Table> o) { | 777 checkUnnamed1068(core.List<api.Table> o) { |
743 unittest.expect(o, unittest.hasLength(2)); | 778 unittest.expect(o, unittest.hasLength(2)); |
744 checkTable(o[0]); | 779 checkTable(o[0]); |
745 checkTable(o[1]); | 780 checkTable(o[1]); |
746 } | 781 } |
747 | 782 |
748 core.int buildCounterTableList = 0; | 783 core.int buildCounterTableList = 0; |
749 buildTableList() { | 784 buildTableList() { |
750 var o = new api.TableList(); | 785 var o = new api.TableList(); |
751 buildCounterTableList++; | 786 buildCounterTableList++; |
752 if (buildCounterTableList < 3) { | 787 if (buildCounterTableList < 3) { |
753 o.items = buildUnnamed615(); | 788 o.items = buildUnnamed1068(); |
754 o.kind = "foo"; | 789 o.kind = "foo"; |
755 o.nextPageToken = "foo"; | 790 o.nextPageToken = "foo"; |
756 } | 791 } |
757 buildCounterTableList--; | 792 buildCounterTableList--; |
758 return o; | 793 return o; |
759 } | 794 } |
760 | 795 |
761 checkTableList(api.TableList o) { | 796 checkTableList(api.TableList o) { |
762 buildCounterTableList++; | 797 buildCounterTableList++; |
763 if (buildCounterTableList < 3) { | 798 if (buildCounterTableList < 3) { |
764 checkUnnamed615(o.items); | 799 checkUnnamed1068(o.items); |
765 unittest.expect(o.kind, unittest.equals('foo')); | 800 unittest.expect(o.kind, unittest.equals('foo')); |
766 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 801 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
767 } | 802 } |
768 buildCounterTableList--; | 803 buildCounterTableList--; |
769 } | 804 } |
770 | 805 |
771 core.int buildCounterTask = 0; | 806 core.int buildCounterTask = 0; |
772 buildTask() { | 807 buildTask() { |
773 var o = new api.Task(); | 808 var o = new api.Task(); |
774 buildCounterTask++; | 809 buildCounterTask++; |
(...skipping 13 matching lines...) Expand all Loading... |
788 if (buildCounterTask < 3) { | 823 if (buildCounterTask < 3) { |
789 unittest.expect(o.kind, unittest.equals('foo')); | 824 unittest.expect(o.kind, unittest.equals('foo')); |
790 unittest.expect(o.progress, unittest.equals('foo')); | 825 unittest.expect(o.progress, unittest.equals('foo')); |
791 unittest.expect(o.started, unittest.isTrue); | 826 unittest.expect(o.started, unittest.isTrue); |
792 unittest.expect(o.taskId, unittest.equals('foo')); | 827 unittest.expect(o.taskId, unittest.equals('foo')); |
793 unittest.expect(o.type, unittest.equals('foo')); | 828 unittest.expect(o.type, unittest.equals('foo')); |
794 } | 829 } |
795 buildCounterTask--; | 830 buildCounterTask--; |
796 } | 831 } |
797 | 832 |
798 buildUnnamed616() { | 833 buildUnnamed1069() { |
799 var o = new core.List<api.Task>(); | 834 var o = new core.List<api.Task>(); |
800 o.add(buildTask()); | 835 o.add(buildTask()); |
801 o.add(buildTask()); | 836 o.add(buildTask()); |
802 return o; | 837 return o; |
803 } | 838 } |
804 | 839 |
805 checkUnnamed616(core.List<api.Task> o) { | 840 checkUnnamed1069(core.List<api.Task> o) { |
806 unittest.expect(o, unittest.hasLength(2)); | 841 unittest.expect(o, unittest.hasLength(2)); |
807 checkTask(o[0]); | 842 checkTask(o[0]); |
808 checkTask(o[1]); | 843 checkTask(o[1]); |
809 } | 844 } |
810 | 845 |
811 core.int buildCounterTaskList = 0; | 846 core.int buildCounterTaskList = 0; |
812 buildTaskList() { | 847 buildTaskList() { |
813 var o = new api.TaskList(); | 848 var o = new api.TaskList(); |
814 buildCounterTaskList++; | 849 buildCounterTaskList++; |
815 if (buildCounterTaskList < 3) { | 850 if (buildCounterTaskList < 3) { |
816 o.items = buildUnnamed616(); | 851 o.items = buildUnnamed1069(); |
817 o.kind = "foo"; | 852 o.kind = "foo"; |
818 o.nextPageToken = "foo"; | 853 o.nextPageToken = "foo"; |
819 o.totalItems = 42; | 854 o.totalItems = 42; |
820 } | 855 } |
821 buildCounterTaskList--; | 856 buildCounterTaskList--; |
822 return o; | 857 return o; |
823 } | 858 } |
824 | 859 |
825 checkTaskList(api.TaskList o) { | 860 checkTaskList(api.TaskList o) { |
826 buildCounterTaskList++; | 861 buildCounterTaskList++; |
827 if (buildCounterTaskList < 3) { | 862 if (buildCounterTaskList < 3) { |
828 checkUnnamed616(o.items); | 863 checkUnnamed1069(o.items); |
829 unittest.expect(o.kind, unittest.equals('foo')); | 864 unittest.expect(o.kind, unittest.equals('foo')); |
830 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 865 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
831 unittest.expect(o.totalItems, unittest.equals(42)); | 866 unittest.expect(o.totalItems, unittest.equals(42)); |
832 } | 867 } |
833 buildCounterTaskList--; | 868 buildCounterTaskList--; |
834 } | 869 } |
835 | 870 |
836 buildUnnamed617() { | 871 buildUnnamed1070() { |
837 var o = new core.List<core.String>(); | 872 var o = new core.List<core.String>(); |
838 o.add("foo"); | 873 o.add("foo"); |
839 o.add("foo"); | 874 o.add("foo"); |
840 return o; | 875 return o; |
841 } | 876 } |
842 | 877 |
843 checkUnnamed617(core.List<core.String> o) { | 878 checkUnnamed1070(core.List<core.String> o) { |
844 unittest.expect(o, unittest.hasLength(2)); | 879 unittest.expect(o, unittest.hasLength(2)); |
845 unittest.expect(o[0], unittest.equals('foo')); | 880 unittest.expect(o[0], unittest.equals('foo')); |
846 unittest.expect(o[1], unittest.equals('foo')); | 881 unittest.expect(o[1], unittest.equals('foo')); |
847 } | 882 } |
848 | 883 |
849 core.int buildCounterTemplate = 0; | 884 core.int buildCounterTemplate = 0; |
850 buildTemplate() { | 885 buildTemplate() { |
851 var o = new api.Template(); | 886 var o = new api.Template(); |
852 buildCounterTemplate++; | 887 buildCounterTemplate++; |
853 if (buildCounterTemplate < 3) { | 888 if (buildCounterTemplate < 3) { |
854 o.automaticColumnNames = buildUnnamed617(); | 889 o.automaticColumnNames = buildUnnamed1070(); |
855 o.body = "foo"; | 890 o.body = "foo"; |
856 o.kind = "foo"; | 891 o.kind = "foo"; |
857 o.name = "foo"; | 892 o.name = "foo"; |
858 o.tableId = "foo"; | 893 o.tableId = "foo"; |
859 o.templateId = 42; | 894 o.templateId = 42; |
860 } | 895 } |
861 buildCounterTemplate--; | 896 buildCounterTemplate--; |
862 return o; | 897 return o; |
863 } | 898 } |
864 | 899 |
865 checkTemplate(api.Template o) { | 900 checkTemplate(api.Template o) { |
866 buildCounterTemplate++; | 901 buildCounterTemplate++; |
867 if (buildCounterTemplate < 3) { | 902 if (buildCounterTemplate < 3) { |
868 checkUnnamed617(o.automaticColumnNames); | 903 checkUnnamed1070(o.automaticColumnNames); |
869 unittest.expect(o.body, unittest.equals('foo')); | 904 unittest.expect(o.body, unittest.equals('foo')); |
870 unittest.expect(o.kind, unittest.equals('foo')); | 905 unittest.expect(o.kind, unittest.equals('foo')); |
871 unittest.expect(o.name, unittest.equals('foo')); | 906 unittest.expect(o.name, unittest.equals('foo')); |
872 unittest.expect(o.tableId, unittest.equals('foo')); | 907 unittest.expect(o.tableId, unittest.equals('foo')); |
873 unittest.expect(o.templateId, unittest.equals(42)); | 908 unittest.expect(o.templateId, unittest.equals(42)); |
874 } | 909 } |
875 buildCounterTemplate--; | 910 buildCounterTemplate--; |
876 } | 911 } |
877 | 912 |
878 buildUnnamed618() { | 913 buildUnnamed1071() { |
879 var o = new core.List<api.Template>(); | 914 var o = new core.List<api.Template>(); |
880 o.add(buildTemplate()); | 915 o.add(buildTemplate()); |
881 o.add(buildTemplate()); | 916 o.add(buildTemplate()); |
882 return o; | 917 return o; |
883 } | 918 } |
884 | 919 |
885 checkUnnamed618(core.List<api.Template> o) { | 920 checkUnnamed1071(core.List<api.Template> o) { |
886 unittest.expect(o, unittest.hasLength(2)); | 921 unittest.expect(o, unittest.hasLength(2)); |
887 checkTemplate(o[0]); | 922 checkTemplate(o[0]); |
888 checkTemplate(o[1]); | 923 checkTemplate(o[1]); |
889 } | 924 } |
890 | 925 |
891 core.int buildCounterTemplateList = 0; | 926 core.int buildCounterTemplateList = 0; |
892 buildTemplateList() { | 927 buildTemplateList() { |
893 var o = new api.TemplateList(); | 928 var o = new api.TemplateList(); |
894 buildCounterTemplateList++; | 929 buildCounterTemplateList++; |
895 if (buildCounterTemplateList < 3) { | 930 if (buildCounterTemplateList < 3) { |
896 o.items = buildUnnamed618(); | 931 o.items = buildUnnamed1071(); |
897 o.kind = "foo"; | 932 o.kind = "foo"; |
898 o.nextPageToken = "foo"; | 933 o.nextPageToken = "foo"; |
899 o.totalItems = 42; | 934 o.totalItems = 42; |
900 } | 935 } |
901 buildCounterTemplateList--; | 936 buildCounterTemplateList--; |
902 return o; | 937 return o; |
903 } | 938 } |
904 | 939 |
905 checkTemplateList(api.TemplateList o) { | 940 checkTemplateList(api.TemplateList o) { |
906 buildCounterTemplateList++; | 941 buildCounterTemplateList++; |
907 if (buildCounterTemplateList < 3) { | 942 if (buildCounterTemplateList < 3) { |
908 checkUnnamed618(o.items); | 943 checkUnnamed1071(o.items); |
909 unittest.expect(o.kind, unittest.equals('foo')); | 944 unittest.expect(o.kind, unittest.equals('foo')); |
910 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 945 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
911 unittest.expect(o.totalItems, unittest.equals(42)); | 946 unittest.expect(o.totalItems, unittest.equals(42)); |
912 } | 947 } |
913 buildCounterTemplateList--; | 948 buildCounterTemplateList--; |
914 } | 949 } |
915 | 950 |
916 | 951 |
917 main() { | 952 main() { |
918 unittest.group("obj-schema-Bucket", () { | 953 unittest.group("obj-schema-Bucket", () { |
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1127 var o = buildTemplateList(); | 1162 var o = buildTemplateList(); |
1128 var od = new api.TemplateList.fromJson(o.toJson()); | 1163 var od = new api.TemplateList.fromJson(o.toJson()); |
1129 checkTemplateList(od); | 1164 checkTemplateList(od); |
1130 }); | 1165 }); |
1131 }); | 1166 }); |
1132 | 1167 |
1133 | 1168 |
1134 unittest.group("resource-ColumnResourceApi", () { | 1169 unittest.group("resource-ColumnResourceApi", () { |
1135 unittest.test("method--delete", () { | 1170 unittest.test("method--delete", () { |
1136 | 1171 |
1137 var mock = new common_test.HttpServerMock(); | 1172 var mock = new HttpServerMock(); |
1138 api.ColumnResourceApi res = new api.FusiontablesApi(mock).column; | 1173 api.ColumnResourceApi res = new api.FusiontablesApi(mock).column; |
1139 var arg_tableId = "foo"; | 1174 var arg_tableId = "foo"; |
1140 var arg_columnId = "foo"; | 1175 var arg_columnId = "foo"; |
1141 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1176 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1142 var path = (req.url).path; | 1177 var path = (req.url).path; |
1143 var pathOffset = 0; | 1178 var pathOffset = 0; |
1144 var index; | 1179 var index; |
1145 var subPart; | 1180 var subPart; |
1146 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1181 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
1147 pathOffset += 1; | 1182 pathOffset += 1; |
(...skipping 27 matching lines...) Expand all Loading... |
1175 var keyvalue = part.split("="); | 1210 var keyvalue = part.split("="); |
1176 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1211 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
1177 } | 1212 } |
1178 } | 1213 } |
1179 | 1214 |
1180 | 1215 |
1181 var h = { | 1216 var h = { |
1182 "content-type" : "application/json; charset=utf-8", | 1217 "content-type" : "application/json; charset=utf-8", |
1183 }; | 1218 }; |
1184 var resp = ""; | 1219 var resp = ""; |
1185 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 1220 return new async.Future.value(stringResponse(200, h, resp)); |
1186 }), true); | 1221 }), true); |
1187 res.delete(arg_tableId, arg_columnId).then(unittest.expectAsync((_) {})); | 1222 res.delete(arg_tableId, arg_columnId).then(unittest.expectAsync((_) {})); |
1188 }); | 1223 }); |
1189 | 1224 |
1190 unittest.test("method--get", () { | 1225 unittest.test("method--get", () { |
1191 | 1226 |
1192 var mock = new common_test.HttpServerMock(); | 1227 var mock = new HttpServerMock(); |
1193 api.ColumnResourceApi res = new api.FusiontablesApi(mock).column; | 1228 api.ColumnResourceApi res = new api.FusiontablesApi(mock).column; |
1194 var arg_tableId = "foo"; | 1229 var arg_tableId = "foo"; |
1195 var arg_columnId = "foo"; | 1230 var arg_columnId = "foo"; |
1196 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1231 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1197 var path = (req.url).path; | 1232 var path = (req.url).path; |
1198 var pathOffset = 0; | 1233 var pathOffset = 0; |
1199 var index; | 1234 var index; |
1200 var subPart; | 1235 var subPart; |
1201 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1236 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
1202 pathOffset += 1; | 1237 pathOffset += 1; |
(...skipping 27 matching lines...) Expand all Loading... |
1230 var keyvalue = part.split("="); | 1265 var keyvalue = part.split("="); |
1231 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1266 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
1232 } | 1267 } |
1233 } | 1268 } |
1234 | 1269 |
1235 | 1270 |
1236 var h = { | 1271 var h = { |
1237 "content-type" : "application/json; charset=utf-8", | 1272 "content-type" : "application/json; charset=utf-8", |
1238 }; | 1273 }; |
1239 var resp = convert.JSON.encode(buildColumn()); | 1274 var resp = convert.JSON.encode(buildColumn()); |
1240 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 1275 return new async.Future.value(stringResponse(200, h, resp)); |
1241 }), true); | 1276 }), true); |
1242 res.get(arg_tableId, arg_columnId).then(unittest.expectAsync(((api.Column
response) { | 1277 res.get(arg_tableId, arg_columnId).then(unittest.expectAsync(((api.Column
response) { |
1243 checkColumn(response); | 1278 checkColumn(response); |
1244 }))); | 1279 }))); |
1245 }); | 1280 }); |
1246 | 1281 |
1247 unittest.test("method--insert", () { | 1282 unittest.test("method--insert", () { |
1248 | 1283 |
1249 var mock = new common_test.HttpServerMock(); | 1284 var mock = new HttpServerMock(); |
1250 api.ColumnResourceApi res = new api.FusiontablesApi(mock).column; | 1285 api.ColumnResourceApi res = new api.FusiontablesApi(mock).column; |
1251 var arg_request = buildColumn(); | 1286 var arg_request = buildColumn(); |
1252 var arg_tableId = "foo"; | 1287 var arg_tableId = "foo"; |
1253 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1288 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1254 var obj = new api.Column.fromJson(json); | 1289 var obj = new api.Column.fromJson(json); |
1255 checkColumn(obj); | 1290 checkColumn(obj); |
1256 | 1291 |
1257 var path = (req.url).path; | 1292 var path = (req.url).path; |
1258 var pathOffset = 0; | 1293 var pathOffset = 0; |
1259 var index; | 1294 var index; |
(...skipping 27 matching lines...) Expand all Loading... |
1287 var keyvalue = part.split("="); | 1322 var keyvalue = part.split("="); |
1288 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1323 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
1289 } | 1324 } |
1290 } | 1325 } |
1291 | 1326 |
1292 | 1327 |
1293 var h = { | 1328 var h = { |
1294 "content-type" : "application/json; charset=utf-8", | 1329 "content-type" : "application/json; charset=utf-8", |
1295 }; | 1330 }; |
1296 var resp = convert.JSON.encode(buildColumn()); | 1331 var resp = convert.JSON.encode(buildColumn()); |
1297 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 1332 return new async.Future.value(stringResponse(200, h, resp)); |
1298 }), true); | 1333 }), true); |
1299 res.insert(arg_request, arg_tableId).then(unittest.expectAsync(((api.Colum
n response) { | 1334 res.insert(arg_request, arg_tableId).then(unittest.expectAsync(((api.Colum
n response) { |
1300 checkColumn(response); | 1335 checkColumn(response); |
1301 }))); | 1336 }))); |
1302 }); | 1337 }); |
1303 | 1338 |
1304 unittest.test("method--list", () { | 1339 unittest.test("method--list", () { |
1305 | 1340 |
1306 var mock = new common_test.HttpServerMock(); | 1341 var mock = new HttpServerMock(); |
1307 api.ColumnResourceApi res = new api.FusiontablesApi(mock).column; | 1342 api.ColumnResourceApi res = new api.FusiontablesApi(mock).column; |
1308 var arg_tableId = "foo"; | 1343 var arg_tableId = "foo"; |
1309 var arg_maxResults = 42; | 1344 var arg_maxResults = 42; |
1310 var arg_pageToken = "foo"; | 1345 var arg_pageToken = "foo"; |
1311 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1346 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1312 var path = (req.url).path; | 1347 var path = (req.url).path; |
1313 var pathOffset = 0; | 1348 var pathOffset = 0; |
1314 var index; | 1349 var index; |
1315 var subPart; | 1350 var subPart; |
1316 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1351 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
(...skipping 27 matching lines...) Expand all Loading... |
1344 } | 1379 } |
1345 } | 1380 } |
1346 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | 1381 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); |
1347 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 1382 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
1348 | 1383 |
1349 | 1384 |
1350 var h = { | 1385 var h = { |
1351 "content-type" : "application/json; charset=utf-8", | 1386 "content-type" : "application/json; charset=utf-8", |
1352 }; | 1387 }; |
1353 var resp = convert.JSON.encode(buildColumnList()); | 1388 var resp = convert.JSON.encode(buildColumnList()); |
1354 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 1389 return new async.Future.value(stringResponse(200, h, resp)); |
1355 }), true); | 1390 }), true); |
1356 res.list(arg_tableId, maxResults: arg_maxResults, pageToken: arg_pageToken
).then(unittest.expectAsync(((api.ColumnList response) { | 1391 res.list(arg_tableId, maxResults: arg_maxResults, pageToken: arg_pageToken
).then(unittest.expectAsync(((api.ColumnList response) { |
1357 checkColumnList(response); | 1392 checkColumnList(response); |
1358 }))); | 1393 }))); |
1359 }); | 1394 }); |
1360 | 1395 |
1361 unittest.test("method--patch", () { | 1396 unittest.test("method--patch", () { |
1362 | 1397 |
1363 var mock = new common_test.HttpServerMock(); | 1398 var mock = new HttpServerMock(); |
1364 api.ColumnResourceApi res = new api.FusiontablesApi(mock).column; | 1399 api.ColumnResourceApi res = new api.FusiontablesApi(mock).column; |
1365 var arg_request = buildColumn(); | 1400 var arg_request = buildColumn(); |
1366 var arg_tableId = "foo"; | 1401 var arg_tableId = "foo"; |
1367 var arg_columnId = "foo"; | 1402 var arg_columnId = "foo"; |
1368 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1403 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1369 var obj = new api.Column.fromJson(json); | 1404 var obj = new api.Column.fromJson(json); |
1370 checkColumn(obj); | 1405 checkColumn(obj); |
1371 | 1406 |
1372 var path = (req.url).path; | 1407 var path = (req.url).path; |
1373 var pathOffset = 0; | 1408 var pathOffset = 0; |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1405 var keyvalue = part.split("="); | 1440 var keyvalue = part.split("="); |
1406 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1441 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
1407 } | 1442 } |
1408 } | 1443 } |
1409 | 1444 |
1410 | 1445 |
1411 var h = { | 1446 var h = { |
1412 "content-type" : "application/json; charset=utf-8", | 1447 "content-type" : "application/json; charset=utf-8", |
1413 }; | 1448 }; |
1414 var resp = convert.JSON.encode(buildColumn()); | 1449 var resp = convert.JSON.encode(buildColumn()); |
1415 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 1450 return new async.Future.value(stringResponse(200, h, resp)); |
1416 }), true); | 1451 }), true); |
1417 res.patch(arg_request, arg_tableId, arg_columnId).then(unittest.expectAsyn
c(((api.Column response) { | 1452 res.patch(arg_request, arg_tableId, arg_columnId).then(unittest.expectAsyn
c(((api.Column response) { |
1418 checkColumn(response); | 1453 checkColumn(response); |
1419 }))); | 1454 }))); |
1420 }); | 1455 }); |
1421 | 1456 |
1422 unittest.test("method--update", () { | 1457 unittest.test("method--update", () { |
1423 | 1458 |
1424 var mock = new common_test.HttpServerMock(); | 1459 var mock = new HttpServerMock(); |
1425 api.ColumnResourceApi res = new api.FusiontablesApi(mock).column; | 1460 api.ColumnResourceApi res = new api.FusiontablesApi(mock).column; |
1426 var arg_request = buildColumn(); | 1461 var arg_request = buildColumn(); |
1427 var arg_tableId = "foo"; | 1462 var arg_tableId = "foo"; |
1428 var arg_columnId = "foo"; | 1463 var arg_columnId = "foo"; |
1429 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1464 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1430 var obj = new api.Column.fromJson(json); | 1465 var obj = new api.Column.fromJson(json); |
1431 checkColumn(obj); | 1466 checkColumn(obj); |
1432 | 1467 |
1433 var path = (req.url).path; | 1468 var path = (req.url).path; |
1434 var pathOffset = 0; | 1469 var pathOffset = 0; |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1466 var keyvalue = part.split("="); | 1501 var keyvalue = part.split("="); |
1467 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1502 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
1468 } | 1503 } |
1469 } | 1504 } |
1470 | 1505 |
1471 | 1506 |
1472 var h = { | 1507 var h = { |
1473 "content-type" : "application/json; charset=utf-8", | 1508 "content-type" : "application/json; charset=utf-8", |
1474 }; | 1509 }; |
1475 var resp = convert.JSON.encode(buildColumn()); | 1510 var resp = convert.JSON.encode(buildColumn()); |
1476 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 1511 return new async.Future.value(stringResponse(200, h, resp)); |
1477 }), true); | 1512 }), true); |
1478 res.update(arg_request, arg_tableId, arg_columnId).then(unittest.expectAsy
nc(((api.Column response) { | 1513 res.update(arg_request, arg_tableId, arg_columnId).then(unittest.expectAsy
nc(((api.Column response) { |
1479 checkColumn(response); | 1514 checkColumn(response); |
1480 }))); | 1515 }))); |
1481 }); | 1516 }); |
1482 | 1517 |
1483 }); | 1518 }); |
1484 | 1519 |
1485 | 1520 |
1486 unittest.group("resource-QueryResourceApi", () { | 1521 unittest.group("resource-QueryResourceApi", () { |
1487 unittest.test("method--sql", () { | 1522 unittest.test("method--sql", () { |
1488 // TODO: Implement tests for media upload; | 1523 // TODO: Implement tests for media upload; |
1489 // TODO: Implement tests for media download; | 1524 // TODO: Implement tests for media download; |
1490 | 1525 |
1491 var mock = new common_test.HttpServerMock(); | 1526 var mock = new HttpServerMock(); |
1492 api.QueryResourceApi res = new api.FusiontablesApi(mock).query; | 1527 api.QueryResourceApi res = new api.FusiontablesApi(mock).query; |
1493 var arg_sql_1 = "foo"; | 1528 var arg_sql_1 = "foo"; |
1494 var arg_hdrs = true; | 1529 var arg_hdrs = true; |
1495 var arg_typed = true; | 1530 var arg_typed = true; |
1496 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1531 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1497 var path = (req.url).path; | 1532 var path = (req.url).path; |
1498 var pathOffset = 0; | 1533 var pathOffset = 0; |
1499 var index; | 1534 var index; |
1500 var subPart; | 1535 var subPart; |
1501 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1536 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
(...skipping 21 matching lines...) Expand all Loading... |
1523 } | 1558 } |
1524 unittest.expect(queryMap["sql"].first, unittest.equals(arg_sql_1)); | 1559 unittest.expect(queryMap["sql"].first, unittest.equals(arg_sql_1)); |
1525 unittest.expect(queryMap["hdrs"].first, unittest.equals("$arg_hdrs")); | 1560 unittest.expect(queryMap["hdrs"].first, unittest.equals("$arg_hdrs")); |
1526 unittest.expect(queryMap["typed"].first, unittest.equals("$arg_typed")); | 1561 unittest.expect(queryMap["typed"].first, unittest.equals("$arg_typed")); |
1527 | 1562 |
1528 | 1563 |
1529 var h = { | 1564 var h = { |
1530 "content-type" : "application/json; charset=utf-8", | 1565 "content-type" : "application/json; charset=utf-8", |
1531 }; | 1566 }; |
1532 var resp = convert.JSON.encode(buildSqlresponse()); | 1567 var resp = convert.JSON.encode(buildSqlresponse()); |
1533 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 1568 return new async.Future.value(stringResponse(200, h, resp)); |
1534 }), true); | 1569 }), true); |
1535 res.sql(arg_sql_1, hdrs: arg_hdrs, typed: arg_typed).then(unittest.expectA
sync(((api.Sqlresponse response) { | 1570 res.sql(arg_sql_1, hdrs: arg_hdrs, typed: arg_typed).then(unittest.expectA
sync(((api.Sqlresponse response) { |
1536 checkSqlresponse(response); | 1571 checkSqlresponse(response); |
1537 }))); | 1572 }))); |
1538 }); | 1573 }); |
1539 | 1574 |
1540 unittest.test("method--sqlGet", () { | 1575 unittest.test("method--sqlGet", () { |
1541 // TODO: Implement tests for media upload; | 1576 // TODO: Implement tests for media upload; |
1542 // TODO: Implement tests for media download; | 1577 // TODO: Implement tests for media download; |
1543 | 1578 |
1544 var mock = new common_test.HttpServerMock(); | 1579 var mock = new HttpServerMock(); |
1545 api.QueryResourceApi res = new api.FusiontablesApi(mock).query; | 1580 api.QueryResourceApi res = new api.FusiontablesApi(mock).query; |
1546 var arg_sql_1 = "foo"; | 1581 var arg_sql_1 = "foo"; |
1547 var arg_hdrs = true; | 1582 var arg_hdrs = true; |
1548 var arg_typed = true; | 1583 var arg_typed = true; |
1549 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1584 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1550 var path = (req.url).path; | 1585 var path = (req.url).path; |
1551 var pathOffset = 0; | 1586 var pathOffset = 0; |
1552 var index; | 1587 var index; |
1553 var subPart; | 1588 var subPart; |
1554 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1589 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
(...skipping 21 matching lines...) Expand all Loading... |
1576 } | 1611 } |
1577 unittest.expect(queryMap["sql"].first, unittest.equals(arg_sql_1)); | 1612 unittest.expect(queryMap["sql"].first, unittest.equals(arg_sql_1)); |
1578 unittest.expect(queryMap["hdrs"].first, unittest.equals("$arg_hdrs")); | 1613 unittest.expect(queryMap["hdrs"].first, unittest.equals("$arg_hdrs")); |
1579 unittest.expect(queryMap["typed"].first, unittest.equals("$arg_typed")); | 1614 unittest.expect(queryMap["typed"].first, unittest.equals("$arg_typed")); |
1580 | 1615 |
1581 | 1616 |
1582 var h = { | 1617 var h = { |
1583 "content-type" : "application/json; charset=utf-8", | 1618 "content-type" : "application/json; charset=utf-8", |
1584 }; | 1619 }; |
1585 var resp = convert.JSON.encode(buildSqlresponse()); | 1620 var resp = convert.JSON.encode(buildSqlresponse()); |
1586 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 1621 return new async.Future.value(stringResponse(200, h, resp)); |
1587 }), true); | 1622 }), true); |
1588 res.sqlGet(arg_sql_1, hdrs: arg_hdrs, typed: arg_typed).then(unittest.expe
ctAsync(((api.Sqlresponse response) { | 1623 res.sqlGet(arg_sql_1, hdrs: arg_hdrs, typed: arg_typed).then(unittest.expe
ctAsync(((api.Sqlresponse response) { |
1589 checkSqlresponse(response); | 1624 checkSqlresponse(response); |
1590 }))); | 1625 }))); |
1591 }); | 1626 }); |
1592 | 1627 |
1593 }); | 1628 }); |
1594 | 1629 |
1595 | 1630 |
1596 unittest.group("resource-StyleResourceApi", () { | 1631 unittest.group("resource-StyleResourceApi", () { |
1597 unittest.test("method--delete", () { | 1632 unittest.test("method--delete", () { |
1598 | 1633 |
1599 var mock = new common_test.HttpServerMock(); | 1634 var mock = new HttpServerMock(); |
1600 api.StyleResourceApi res = new api.FusiontablesApi(mock).style; | 1635 api.StyleResourceApi res = new api.FusiontablesApi(mock).style; |
1601 var arg_tableId = "foo"; | 1636 var arg_tableId = "foo"; |
1602 var arg_styleId = 42; | 1637 var arg_styleId = 42; |
1603 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1638 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1604 var path = (req.url).path; | 1639 var path = (req.url).path; |
1605 var pathOffset = 0; | 1640 var pathOffset = 0; |
1606 var index; | 1641 var index; |
1607 var subPart; | 1642 var subPart; |
1608 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1643 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
1609 pathOffset += 1; | 1644 pathOffset += 1; |
(...skipping 27 matching lines...) Expand all Loading... |
1637 var keyvalue = part.split("="); | 1672 var keyvalue = part.split("="); |
1638 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1673 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
1639 } | 1674 } |
1640 } | 1675 } |
1641 | 1676 |
1642 | 1677 |
1643 var h = { | 1678 var h = { |
1644 "content-type" : "application/json; charset=utf-8", | 1679 "content-type" : "application/json; charset=utf-8", |
1645 }; | 1680 }; |
1646 var resp = ""; | 1681 var resp = ""; |
1647 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 1682 return new async.Future.value(stringResponse(200, h, resp)); |
1648 }), true); | 1683 }), true); |
1649 res.delete(arg_tableId, arg_styleId).then(unittest.expectAsync((_) {})); | 1684 res.delete(arg_tableId, arg_styleId).then(unittest.expectAsync((_) {})); |
1650 }); | 1685 }); |
1651 | 1686 |
1652 unittest.test("method--get", () { | 1687 unittest.test("method--get", () { |
1653 | 1688 |
1654 var mock = new common_test.HttpServerMock(); | 1689 var mock = new HttpServerMock(); |
1655 api.StyleResourceApi res = new api.FusiontablesApi(mock).style; | 1690 api.StyleResourceApi res = new api.FusiontablesApi(mock).style; |
1656 var arg_tableId = "foo"; | 1691 var arg_tableId = "foo"; |
1657 var arg_styleId = 42; | 1692 var arg_styleId = 42; |
1658 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1693 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1659 var path = (req.url).path; | 1694 var path = (req.url).path; |
1660 var pathOffset = 0; | 1695 var pathOffset = 0; |
1661 var index; | 1696 var index; |
1662 var subPart; | 1697 var subPart; |
1663 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1698 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
1664 pathOffset += 1; | 1699 pathOffset += 1; |
(...skipping 27 matching lines...) Expand all Loading... |
1692 var keyvalue = part.split("="); | 1727 var keyvalue = part.split("="); |
1693 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1728 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
1694 } | 1729 } |
1695 } | 1730 } |
1696 | 1731 |
1697 | 1732 |
1698 var h = { | 1733 var h = { |
1699 "content-type" : "application/json; charset=utf-8", | 1734 "content-type" : "application/json; charset=utf-8", |
1700 }; | 1735 }; |
1701 var resp = convert.JSON.encode(buildStyleSetting()); | 1736 var resp = convert.JSON.encode(buildStyleSetting()); |
1702 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 1737 return new async.Future.value(stringResponse(200, h, resp)); |
1703 }), true); | 1738 }), true); |
1704 res.get(arg_tableId, arg_styleId).then(unittest.expectAsync(((api.StyleSet
ting response) { | 1739 res.get(arg_tableId, arg_styleId).then(unittest.expectAsync(((api.StyleSet
ting response) { |
1705 checkStyleSetting(response); | 1740 checkStyleSetting(response); |
1706 }))); | 1741 }))); |
1707 }); | 1742 }); |
1708 | 1743 |
1709 unittest.test("method--insert", () { | 1744 unittest.test("method--insert", () { |
1710 | 1745 |
1711 var mock = new common_test.HttpServerMock(); | 1746 var mock = new HttpServerMock(); |
1712 api.StyleResourceApi res = new api.FusiontablesApi(mock).style; | 1747 api.StyleResourceApi res = new api.FusiontablesApi(mock).style; |
1713 var arg_request = buildStyleSetting(); | 1748 var arg_request = buildStyleSetting(); |
1714 var arg_tableId = "foo"; | 1749 var arg_tableId = "foo"; |
1715 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1750 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1716 var obj = new api.StyleSetting.fromJson(json); | 1751 var obj = new api.StyleSetting.fromJson(json); |
1717 checkStyleSetting(obj); | 1752 checkStyleSetting(obj); |
1718 | 1753 |
1719 var path = (req.url).path; | 1754 var path = (req.url).path; |
1720 var pathOffset = 0; | 1755 var pathOffset = 0; |
1721 var index; | 1756 var index; |
(...skipping 27 matching lines...) Expand all Loading... |
1749 var keyvalue = part.split("="); | 1784 var keyvalue = part.split("="); |
1750 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1785 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
1751 } | 1786 } |
1752 } | 1787 } |
1753 | 1788 |
1754 | 1789 |
1755 var h = { | 1790 var h = { |
1756 "content-type" : "application/json; charset=utf-8", | 1791 "content-type" : "application/json; charset=utf-8", |
1757 }; | 1792 }; |
1758 var resp = convert.JSON.encode(buildStyleSetting()); | 1793 var resp = convert.JSON.encode(buildStyleSetting()); |
1759 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 1794 return new async.Future.value(stringResponse(200, h, resp)); |
1760 }), true); | 1795 }), true); |
1761 res.insert(arg_request, arg_tableId).then(unittest.expectAsync(((api.Style
Setting response) { | 1796 res.insert(arg_request, arg_tableId).then(unittest.expectAsync(((api.Style
Setting response) { |
1762 checkStyleSetting(response); | 1797 checkStyleSetting(response); |
1763 }))); | 1798 }))); |
1764 }); | 1799 }); |
1765 | 1800 |
1766 unittest.test("method--list", () { | 1801 unittest.test("method--list", () { |
1767 | 1802 |
1768 var mock = new common_test.HttpServerMock(); | 1803 var mock = new HttpServerMock(); |
1769 api.StyleResourceApi res = new api.FusiontablesApi(mock).style; | 1804 api.StyleResourceApi res = new api.FusiontablesApi(mock).style; |
1770 var arg_tableId = "foo"; | 1805 var arg_tableId = "foo"; |
1771 var arg_maxResults = 42; | 1806 var arg_maxResults = 42; |
1772 var arg_pageToken = "foo"; | 1807 var arg_pageToken = "foo"; |
1773 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1808 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1774 var path = (req.url).path; | 1809 var path = (req.url).path; |
1775 var pathOffset = 0; | 1810 var pathOffset = 0; |
1776 var index; | 1811 var index; |
1777 var subPart; | 1812 var subPart; |
1778 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1813 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
(...skipping 27 matching lines...) Expand all Loading... |
1806 } | 1841 } |
1807 } | 1842 } |
1808 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | 1843 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); |
1809 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 1844 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
1810 | 1845 |
1811 | 1846 |
1812 var h = { | 1847 var h = { |
1813 "content-type" : "application/json; charset=utf-8", | 1848 "content-type" : "application/json; charset=utf-8", |
1814 }; | 1849 }; |
1815 var resp = convert.JSON.encode(buildStyleSettingList()); | 1850 var resp = convert.JSON.encode(buildStyleSettingList()); |
1816 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 1851 return new async.Future.value(stringResponse(200, h, resp)); |
1817 }), true); | 1852 }), true); |
1818 res.list(arg_tableId, maxResults: arg_maxResults, pageToken: arg_pageToken
).then(unittest.expectAsync(((api.StyleSettingList response) { | 1853 res.list(arg_tableId, maxResults: arg_maxResults, pageToken: arg_pageToken
).then(unittest.expectAsync(((api.StyleSettingList response) { |
1819 checkStyleSettingList(response); | 1854 checkStyleSettingList(response); |
1820 }))); | 1855 }))); |
1821 }); | 1856 }); |
1822 | 1857 |
1823 unittest.test("method--patch", () { | 1858 unittest.test("method--patch", () { |
1824 | 1859 |
1825 var mock = new common_test.HttpServerMock(); | 1860 var mock = new HttpServerMock(); |
1826 api.StyleResourceApi res = new api.FusiontablesApi(mock).style; | 1861 api.StyleResourceApi res = new api.FusiontablesApi(mock).style; |
1827 var arg_request = buildStyleSetting(); | 1862 var arg_request = buildStyleSetting(); |
1828 var arg_tableId = "foo"; | 1863 var arg_tableId = "foo"; |
1829 var arg_styleId = 42; | 1864 var arg_styleId = 42; |
1830 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1865 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1831 var obj = new api.StyleSetting.fromJson(json); | 1866 var obj = new api.StyleSetting.fromJson(json); |
1832 checkStyleSetting(obj); | 1867 checkStyleSetting(obj); |
1833 | 1868 |
1834 var path = (req.url).path; | 1869 var path = (req.url).path; |
1835 var pathOffset = 0; | 1870 var pathOffset = 0; |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1867 var keyvalue = part.split("="); | 1902 var keyvalue = part.split("="); |
1868 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1903 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
1869 } | 1904 } |
1870 } | 1905 } |
1871 | 1906 |
1872 | 1907 |
1873 var h = { | 1908 var h = { |
1874 "content-type" : "application/json; charset=utf-8", | 1909 "content-type" : "application/json; charset=utf-8", |
1875 }; | 1910 }; |
1876 var resp = convert.JSON.encode(buildStyleSetting()); | 1911 var resp = convert.JSON.encode(buildStyleSetting()); |
1877 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 1912 return new async.Future.value(stringResponse(200, h, resp)); |
1878 }), true); | 1913 }), true); |
1879 res.patch(arg_request, arg_tableId, arg_styleId).then(unittest.expectAsync
(((api.StyleSetting response) { | 1914 res.patch(arg_request, arg_tableId, arg_styleId).then(unittest.expectAsync
(((api.StyleSetting response) { |
1880 checkStyleSetting(response); | 1915 checkStyleSetting(response); |
1881 }))); | 1916 }))); |
1882 }); | 1917 }); |
1883 | 1918 |
1884 unittest.test("method--update", () { | 1919 unittest.test("method--update", () { |
1885 | 1920 |
1886 var mock = new common_test.HttpServerMock(); | 1921 var mock = new HttpServerMock(); |
1887 api.StyleResourceApi res = new api.FusiontablesApi(mock).style; | 1922 api.StyleResourceApi res = new api.FusiontablesApi(mock).style; |
1888 var arg_request = buildStyleSetting(); | 1923 var arg_request = buildStyleSetting(); |
1889 var arg_tableId = "foo"; | 1924 var arg_tableId = "foo"; |
1890 var arg_styleId = 42; | 1925 var arg_styleId = 42; |
1891 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1926 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1892 var obj = new api.StyleSetting.fromJson(json); | 1927 var obj = new api.StyleSetting.fromJson(json); |
1893 checkStyleSetting(obj); | 1928 checkStyleSetting(obj); |
1894 | 1929 |
1895 var path = (req.url).path; | 1930 var path = (req.url).path; |
1896 var pathOffset = 0; | 1931 var pathOffset = 0; |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1928 var keyvalue = part.split("="); | 1963 var keyvalue = part.split("="); |
1929 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1964 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
1930 } | 1965 } |
1931 } | 1966 } |
1932 | 1967 |
1933 | 1968 |
1934 var h = { | 1969 var h = { |
1935 "content-type" : "application/json; charset=utf-8", | 1970 "content-type" : "application/json; charset=utf-8", |
1936 }; | 1971 }; |
1937 var resp = convert.JSON.encode(buildStyleSetting()); | 1972 var resp = convert.JSON.encode(buildStyleSetting()); |
1938 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 1973 return new async.Future.value(stringResponse(200, h, resp)); |
1939 }), true); | 1974 }), true); |
1940 res.update(arg_request, arg_tableId, arg_styleId).then(unittest.expectAsyn
c(((api.StyleSetting response) { | 1975 res.update(arg_request, arg_tableId, arg_styleId).then(unittest.expectAsyn
c(((api.StyleSetting response) { |
1941 checkStyleSetting(response); | 1976 checkStyleSetting(response); |
1942 }))); | 1977 }))); |
1943 }); | 1978 }); |
1944 | 1979 |
1945 }); | 1980 }); |
1946 | 1981 |
1947 | 1982 |
1948 unittest.group("resource-TableResourceApi", () { | 1983 unittest.group("resource-TableResourceApi", () { |
1949 unittest.test("method--copy", () { | 1984 unittest.test("method--copy", () { |
1950 | 1985 |
1951 var mock = new common_test.HttpServerMock(); | 1986 var mock = new HttpServerMock(); |
1952 api.TableResourceApi res = new api.FusiontablesApi(mock).table; | 1987 api.TableResourceApi res = new api.FusiontablesApi(mock).table; |
1953 var arg_tableId = "foo"; | 1988 var arg_tableId = "foo"; |
1954 var arg_copyPresentation = true; | 1989 var arg_copyPresentation = true; |
1955 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1990 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1956 var path = (req.url).path; | 1991 var path = (req.url).path; |
1957 var pathOffset = 0; | 1992 var pathOffset = 0; |
1958 var index; | 1993 var index; |
1959 var subPart; | 1994 var subPart; |
1960 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1995 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
1961 pathOffset += 1; | 1996 pathOffset += 1; |
(...skipping 25 matching lines...) Expand all Loading... |
1987 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2022 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
1988 } | 2023 } |
1989 } | 2024 } |
1990 unittest.expect(queryMap["copyPresentation"].first, unittest.equals("$ar
g_copyPresentation")); | 2025 unittest.expect(queryMap["copyPresentation"].first, unittest.equals("$ar
g_copyPresentation")); |
1991 | 2026 |
1992 | 2027 |
1993 var h = { | 2028 var h = { |
1994 "content-type" : "application/json; charset=utf-8", | 2029 "content-type" : "application/json; charset=utf-8", |
1995 }; | 2030 }; |
1996 var resp = convert.JSON.encode(buildTable()); | 2031 var resp = convert.JSON.encode(buildTable()); |
1997 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2032 return new async.Future.value(stringResponse(200, h, resp)); |
1998 }), true); | 2033 }), true); |
1999 res.copy(arg_tableId, copyPresentation: arg_copyPresentation).then(unittes
t.expectAsync(((api.Table response) { | 2034 res.copy(arg_tableId, copyPresentation: arg_copyPresentation).then(unittes
t.expectAsync(((api.Table response) { |
2000 checkTable(response); | 2035 checkTable(response); |
2001 }))); | 2036 }))); |
2002 }); | 2037 }); |
2003 | 2038 |
2004 unittest.test("method--delete", () { | 2039 unittest.test("method--delete", () { |
2005 | 2040 |
2006 var mock = new common_test.HttpServerMock(); | 2041 var mock = new HttpServerMock(); |
2007 api.TableResourceApi res = new api.FusiontablesApi(mock).table; | 2042 api.TableResourceApi res = new api.FusiontablesApi(mock).table; |
2008 var arg_tableId = "foo"; | 2043 var arg_tableId = "foo"; |
2009 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2044 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2010 var path = (req.url).path; | 2045 var path = (req.url).path; |
2011 var pathOffset = 0; | 2046 var pathOffset = 0; |
2012 var index; | 2047 var index; |
2013 var subPart; | 2048 var subPart; |
2014 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2049 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
2015 pathOffset += 1; | 2050 pathOffset += 1; |
2016 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq
uals("fusiontables/v2/")); | 2051 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq
uals("fusiontables/v2/")); |
(...skipping 19 matching lines...) Expand all Loading... |
2036 var keyvalue = part.split("="); | 2071 var keyvalue = part.split("="); |
2037 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2072 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
2038 } | 2073 } |
2039 } | 2074 } |
2040 | 2075 |
2041 | 2076 |
2042 var h = { | 2077 var h = { |
2043 "content-type" : "application/json; charset=utf-8", | 2078 "content-type" : "application/json; charset=utf-8", |
2044 }; | 2079 }; |
2045 var resp = ""; | 2080 var resp = ""; |
2046 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2081 return new async.Future.value(stringResponse(200, h, resp)); |
2047 }), true); | 2082 }), true); |
2048 res.delete(arg_tableId).then(unittest.expectAsync((_) {})); | 2083 res.delete(arg_tableId).then(unittest.expectAsync((_) {})); |
2049 }); | 2084 }); |
2050 | 2085 |
2051 unittest.test("method--get", () { | 2086 unittest.test("method--get", () { |
2052 | 2087 |
2053 var mock = new common_test.HttpServerMock(); | 2088 var mock = new HttpServerMock(); |
2054 api.TableResourceApi res = new api.FusiontablesApi(mock).table; | 2089 api.TableResourceApi res = new api.FusiontablesApi(mock).table; |
2055 var arg_tableId = "foo"; | 2090 var arg_tableId = "foo"; |
2056 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2091 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2057 var path = (req.url).path; | 2092 var path = (req.url).path; |
2058 var pathOffset = 0; | 2093 var pathOffset = 0; |
2059 var index; | 2094 var index; |
2060 var subPart; | 2095 var subPart; |
2061 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2096 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
2062 pathOffset += 1; | 2097 pathOffset += 1; |
2063 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq
uals("fusiontables/v2/")); | 2098 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq
uals("fusiontables/v2/")); |
(...skipping 19 matching lines...) Expand all Loading... |
2083 var keyvalue = part.split("="); | 2118 var keyvalue = part.split("="); |
2084 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2119 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
2085 } | 2120 } |
2086 } | 2121 } |
2087 | 2122 |
2088 | 2123 |
2089 var h = { | 2124 var h = { |
2090 "content-type" : "application/json; charset=utf-8", | 2125 "content-type" : "application/json; charset=utf-8", |
2091 }; | 2126 }; |
2092 var resp = convert.JSON.encode(buildTable()); | 2127 var resp = convert.JSON.encode(buildTable()); |
2093 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2128 return new async.Future.value(stringResponse(200, h, resp)); |
2094 }), true); | 2129 }), true); |
2095 res.get(arg_tableId).then(unittest.expectAsync(((api.Table response) { | 2130 res.get(arg_tableId).then(unittest.expectAsync(((api.Table response) { |
2096 checkTable(response); | 2131 checkTable(response); |
2097 }))); | 2132 }))); |
2098 }); | 2133 }); |
2099 | 2134 |
2100 unittest.test("method--importRows", () { | 2135 unittest.test("method--importRows", () { |
2101 // TODO: Implement tests for media upload; | 2136 // TODO: Implement tests for media upload; |
2102 // TODO: Implement tests for media download; | 2137 // TODO: Implement tests for media download; |
2103 | 2138 |
2104 var mock = new common_test.HttpServerMock(); | 2139 var mock = new HttpServerMock(); |
2105 api.TableResourceApi res = new api.FusiontablesApi(mock).table; | 2140 api.TableResourceApi res = new api.FusiontablesApi(mock).table; |
2106 var arg_tableId = "foo"; | 2141 var arg_tableId = "foo"; |
2107 var arg_delimiter = "foo"; | 2142 var arg_delimiter = "foo"; |
2108 var arg_encoding = "foo"; | 2143 var arg_encoding = "foo"; |
2109 var arg_endLine = 42; | 2144 var arg_endLine = 42; |
2110 var arg_isStrict = true; | 2145 var arg_isStrict = true; |
2111 var arg_startLine = 42; | 2146 var arg_startLine = 42; |
2112 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2147 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2113 var path = (req.url).path; | 2148 var path = (req.url).path; |
2114 var pathOffset = 0; | 2149 var pathOffset = 0; |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2148 unittest.expect(queryMap["encoding"].first, unittest.equals(arg_encoding
)); | 2183 unittest.expect(queryMap["encoding"].first, unittest.equals(arg_encoding
)); |
2149 unittest.expect(core.int.parse(queryMap["endLine"].first), unittest.equa
ls(arg_endLine)); | 2184 unittest.expect(core.int.parse(queryMap["endLine"].first), unittest.equa
ls(arg_endLine)); |
2150 unittest.expect(queryMap["isStrict"].first, unittest.equals("$arg_isStri
ct")); | 2185 unittest.expect(queryMap["isStrict"].first, unittest.equals("$arg_isStri
ct")); |
2151 unittest.expect(core.int.parse(queryMap["startLine"].first), unittest.eq
uals(arg_startLine)); | 2186 unittest.expect(core.int.parse(queryMap["startLine"].first), unittest.eq
uals(arg_startLine)); |
2152 | 2187 |
2153 | 2188 |
2154 var h = { | 2189 var h = { |
2155 "content-type" : "application/json; charset=utf-8", | 2190 "content-type" : "application/json; charset=utf-8", |
2156 }; | 2191 }; |
2157 var resp = convert.JSON.encode(buildImport()); | 2192 var resp = convert.JSON.encode(buildImport()); |
2158 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2193 return new async.Future.value(stringResponse(200, h, resp)); |
2159 }), true); | 2194 }), true); |
2160 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) { | 2195 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) { |
2161 checkImport(response); | 2196 checkImport(response); |
2162 }))); | 2197 }))); |
2163 }); | 2198 }); |
2164 | 2199 |
2165 unittest.test("method--importTable", () { | 2200 unittest.test("method--importTable", () { |
2166 // TODO: Implement tests for media upload; | 2201 // TODO: Implement tests for media upload; |
2167 // TODO: Implement tests for media download; | 2202 // TODO: Implement tests for media download; |
2168 | 2203 |
2169 var mock = new common_test.HttpServerMock(); | 2204 var mock = new HttpServerMock(); |
2170 api.TableResourceApi res = new api.FusiontablesApi(mock).table; | 2205 api.TableResourceApi res = new api.FusiontablesApi(mock).table; |
2171 var arg_name = "foo"; | 2206 var arg_name = "foo"; |
2172 var arg_delimiter = "foo"; | 2207 var arg_delimiter = "foo"; |
2173 var arg_encoding = "foo"; | 2208 var arg_encoding = "foo"; |
2174 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2209 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2175 var path = (req.url).path; | 2210 var path = (req.url).path; |
2176 var pathOffset = 0; | 2211 var pathOffset = 0; |
2177 var index; | 2212 var index; |
2178 var subPart; | 2213 var subPart; |
2179 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2214 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
(...skipping 21 matching lines...) Expand all Loading... |
2201 } | 2236 } |
2202 unittest.expect(queryMap["name"].first, unittest.equals(arg_name)); | 2237 unittest.expect(queryMap["name"].first, unittest.equals(arg_name)); |
2203 unittest.expect(queryMap["delimiter"].first, unittest.equals(arg_delimit
er)); | 2238 unittest.expect(queryMap["delimiter"].first, unittest.equals(arg_delimit
er)); |
2204 unittest.expect(queryMap["encoding"].first, unittest.equals(arg_encoding
)); | 2239 unittest.expect(queryMap["encoding"].first, unittest.equals(arg_encoding
)); |
2205 | 2240 |
2206 | 2241 |
2207 var h = { | 2242 var h = { |
2208 "content-type" : "application/json; charset=utf-8", | 2243 "content-type" : "application/json; charset=utf-8", |
2209 }; | 2244 }; |
2210 var resp = convert.JSON.encode(buildTable()); | 2245 var resp = convert.JSON.encode(buildTable()); |
2211 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2246 return new async.Future.value(stringResponse(200, h, resp)); |
2212 }), true); | 2247 }), true); |
2213 res.importTable(arg_name, delimiter: arg_delimiter, encoding: arg_encoding
).then(unittest.expectAsync(((api.Table response) { | 2248 res.importTable(arg_name, delimiter: arg_delimiter, encoding: arg_encoding
).then(unittest.expectAsync(((api.Table response) { |
2214 checkTable(response); | 2249 checkTable(response); |
2215 }))); | 2250 }))); |
2216 }); | 2251 }); |
2217 | 2252 |
2218 unittest.test("method--insert", () { | 2253 unittest.test("method--insert", () { |
2219 | 2254 |
2220 var mock = new common_test.HttpServerMock(); | 2255 var mock = new HttpServerMock(); |
2221 api.TableResourceApi res = new api.FusiontablesApi(mock).table; | 2256 api.TableResourceApi res = new api.FusiontablesApi(mock).table; |
2222 var arg_request = buildTable(); | 2257 var arg_request = buildTable(); |
2223 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2258 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2224 var obj = new api.Table.fromJson(json); | 2259 var obj = new api.Table.fromJson(json); |
2225 checkTable(obj); | 2260 checkTable(obj); |
2226 | 2261 |
2227 var path = (req.url).path; | 2262 var path = (req.url).path; |
2228 var pathOffset = 0; | 2263 var pathOffset = 0; |
2229 var index; | 2264 var index; |
2230 var subPart; | 2265 var subPart; |
(...skipping 19 matching lines...) Expand all Loading... |
2250 var keyvalue = part.split("="); | 2285 var keyvalue = part.split("="); |
2251 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2286 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
2252 } | 2287 } |
2253 } | 2288 } |
2254 | 2289 |
2255 | 2290 |
2256 var h = { | 2291 var h = { |
2257 "content-type" : "application/json; charset=utf-8", | 2292 "content-type" : "application/json; charset=utf-8", |
2258 }; | 2293 }; |
2259 var resp = convert.JSON.encode(buildTable()); | 2294 var resp = convert.JSON.encode(buildTable()); |
2260 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2295 return new async.Future.value(stringResponse(200, h, resp)); |
2261 }), true); | 2296 }), true); |
2262 res.insert(arg_request).then(unittest.expectAsync(((api.Table response) { | 2297 res.insert(arg_request).then(unittest.expectAsync(((api.Table response) { |
2263 checkTable(response); | 2298 checkTable(response); |
2264 }))); | 2299 }))); |
2265 }); | 2300 }); |
2266 | 2301 |
2267 unittest.test("method--list", () { | 2302 unittest.test("method--list", () { |
2268 | 2303 |
2269 var mock = new common_test.HttpServerMock(); | 2304 var mock = new HttpServerMock(); |
2270 api.TableResourceApi res = new api.FusiontablesApi(mock).table; | 2305 api.TableResourceApi res = new api.FusiontablesApi(mock).table; |
2271 var arg_maxResults = 42; | 2306 var arg_maxResults = 42; |
2272 var arg_pageToken = "foo"; | 2307 var arg_pageToken = "foo"; |
2273 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2308 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2274 var path = (req.url).path; | 2309 var path = (req.url).path; |
2275 var pathOffset = 0; | 2310 var pathOffset = 0; |
2276 var index; | 2311 var index; |
2277 var subPart; | 2312 var subPart; |
2278 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2313 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
2279 pathOffset += 1; | 2314 pathOffset += 1; |
(...skipping 19 matching lines...) Expand all Loading... |
2299 } | 2334 } |
2300 } | 2335 } |
2301 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | 2336 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); |
2302 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 2337 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
2303 | 2338 |
2304 | 2339 |
2305 var h = { | 2340 var h = { |
2306 "content-type" : "application/json; charset=utf-8", | 2341 "content-type" : "application/json; charset=utf-8", |
2307 }; | 2342 }; |
2308 var resp = convert.JSON.encode(buildTableList()); | 2343 var resp = convert.JSON.encode(buildTableList()); |
2309 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2344 return new async.Future.value(stringResponse(200, h, resp)); |
2310 }), true); | 2345 }), true); |
2311 res.list(maxResults: arg_maxResults, pageToken: arg_pageToken).then(unitte
st.expectAsync(((api.TableList response) { | 2346 res.list(maxResults: arg_maxResults, pageToken: arg_pageToken).then(unitte
st.expectAsync(((api.TableList response) { |
2312 checkTableList(response); | 2347 checkTableList(response); |
2313 }))); | 2348 }))); |
2314 }); | 2349 }); |
2315 | 2350 |
2316 unittest.test("method--patch", () { | 2351 unittest.test("method--patch", () { |
2317 | 2352 |
2318 var mock = new common_test.HttpServerMock(); | 2353 var mock = new HttpServerMock(); |
2319 api.TableResourceApi res = new api.FusiontablesApi(mock).table; | 2354 api.TableResourceApi res = new api.FusiontablesApi(mock).table; |
2320 var arg_request = buildTable(); | 2355 var arg_request = buildTable(); |
2321 var arg_tableId = "foo"; | 2356 var arg_tableId = "foo"; |
2322 var arg_replaceViewDefinition = true; | 2357 var arg_replaceViewDefinition = true; |
2323 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2358 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2324 var obj = new api.Table.fromJson(json); | 2359 var obj = new api.Table.fromJson(json); |
2325 checkTable(obj); | 2360 checkTable(obj); |
2326 | 2361 |
2327 var path = (req.url).path; | 2362 var path = (req.url).path; |
2328 var pathOffset = 0; | 2363 var pathOffset = 0; |
(...skipping 25 matching lines...) Expand all Loading... |
2354 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2389 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
2355 } | 2390 } |
2356 } | 2391 } |
2357 unittest.expect(queryMap["replaceViewDefinition"].first, unittest.equals
("$arg_replaceViewDefinition")); | 2392 unittest.expect(queryMap["replaceViewDefinition"].first, unittest.equals
("$arg_replaceViewDefinition")); |
2358 | 2393 |
2359 | 2394 |
2360 var h = { | 2395 var h = { |
2361 "content-type" : "application/json; charset=utf-8", | 2396 "content-type" : "application/json; charset=utf-8", |
2362 }; | 2397 }; |
2363 var resp = convert.JSON.encode(buildTable()); | 2398 var resp = convert.JSON.encode(buildTable()); |
2364 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2399 return new async.Future.value(stringResponse(200, h, resp)); |
2365 }), true); | 2400 }), true); |
2366 res.patch(arg_request, arg_tableId, replaceViewDefinition: arg_replaceView
Definition).then(unittest.expectAsync(((api.Table response) { | 2401 res.patch(arg_request, arg_tableId, replaceViewDefinition: arg_replaceView
Definition).then(unittest.expectAsync(((api.Table response) { |
2367 checkTable(response); | 2402 checkTable(response); |
2368 }))); | 2403 }))); |
2369 }); | 2404 }); |
2370 | 2405 |
2371 unittest.test("method--replaceRows", () { | 2406 unittest.test("method--replaceRows", () { |
2372 // TODO: Implement tests for media upload; | 2407 // TODO: Implement tests for media upload; |
2373 // TODO: Implement tests for media download; | 2408 // TODO: Implement tests for media download; |
2374 | 2409 |
2375 var mock = new common_test.HttpServerMock(); | 2410 var mock = new HttpServerMock(); |
2376 api.TableResourceApi res = new api.FusiontablesApi(mock).table; | 2411 api.TableResourceApi res = new api.FusiontablesApi(mock).table; |
2377 var arg_tableId = "foo"; | 2412 var arg_tableId = "foo"; |
2378 var arg_delimiter = "foo"; | 2413 var arg_delimiter = "foo"; |
2379 var arg_encoding = "foo"; | 2414 var arg_encoding = "foo"; |
2380 var arg_endLine = 42; | 2415 var arg_endLine = 42; |
2381 var arg_isStrict = true; | 2416 var arg_isStrict = true; |
2382 var arg_startLine = 42; | 2417 var arg_startLine = 42; |
2383 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2418 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2384 var path = (req.url).path; | 2419 var path = (req.url).path; |
2385 var pathOffset = 0; | 2420 var pathOffset = 0; |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2419 unittest.expect(queryMap["encoding"].first, unittest.equals(arg_encoding
)); | 2454 unittest.expect(queryMap["encoding"].first, unittest.equals(arg_encoding
)); |
2420 unittest.expect(core.int.parse(queryMap["endLine"].first), unittest.equa
ls(arg_endLine)); | 2455 unittest.expect(core.int.parse(queryMap["endLine"].first), unittest.equa
ls(arg_endLine)); |
2421 unittest.expect(queryMap["isStrict"].first, unittest.equals("$arg_isStri
ct")); | 2456 unittest.expect(queryMap["isStrict"].first, unittest.equals("$arg_isStri
ct")); |
2422 unittest.expect(core.int.parse(queryMap["startLine"].first), unittest.eq
uals(arg_startLine)); | 2457 unittest.expect(core.int.parse(queryMap["startLine"].first), unittest.eq
uals(arg_startLine)); |
2423 | 2458 |
2424 | 2459 |
2425 var h = { | 2460 var h = { |
2426 "content-type" : "application/json; charset=utf-8", | 2461 "content-type" : "application/json; charset=utf-8", |
2427 }; | 2462 }; |
2428 var resp = convert.JSON.encode(buildTask()); | 2463 var resp = convert.JSON.encode(buildTask()); |
2429 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2464 return new async.Future.value(stringResponse(200, h, resp)); |
2430 }), true); | 2465 }), true); |
2431 res.replaceRows(arg_tableId, delimiter: arg_delimiter, encoding: arg_encod
ing, endLine: arg_endLine, isStrict: arg_isStrict, startLine: arg_startLine).the
n(unittest.expectAsync(((api.Task response) { | 2466 res.replaceRows(arg_tableId, delimiter: arg_delimiter, encoding: arg_encod
ing, endLine: arg_endLine, isStrict: arg_isStrict, startLine: arg_startLine).the
n(unittest.expectAsync(((api.Task response) { |
2432 checkTask(response); | 2467 checkTask(response); |
2433 }))); | 2468 }))); |
2434 }); | 2469 }); |
2435 | 2470 |
2436 unittest.test("method--update", () { | 2471 unittest.test("method--update", () { |
2437 | 2472 |
2438 var mock = new common_test.HttpServerMock(); | 2473 var mock = new HttpServerMock(); |
2439 api.TableResourceApi res = new api.FusiontablesApi(mock).table; | 2474 api.TableResourceApi res = new api.FusiontablesApi(mock).table; |
2440 var arg_request = buildTable(); | 2475 var arg_request = buildTable(); |
2441 var arg_tableId = "foo"; | 2476 var arg_tableId = "foo"; |
2442 var arg_replaceViewDefinition = true; | 2477 var arg_replaceViewDefinition = true; |
2443 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2478 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2444 var obj = new api.Table.fromJson(json); | 2479 var obj = new api.Table.fromJson(json); |
2445 checkTable(obj); | 2480 checkTable(obj); |
2446 | 2481 |
2447 var path = (req.url).path; | 2482 var path = (req.url).path; |
2448 var pathOffset = 0; | 2483 var pathOffset = 0; |
(...skipping 25 matching lines...) Expand all Loading... |
2474 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2509 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
2475 } | 2510 } |
2476 } | 2511 } |
2477 unittest.expect(queryMap["replaceViewDefinition"].first, unittest.equals
("$arg_replaceViewDefinition")); | 2512 unittest.expect(queryMap["replaceViewDefinition"].first, unittest.equals
("$arg_replaceViewDefinition")); |
2478 | 2513 |
2479 | 2514 |
2480 var h = { | 2515 var h = { |
2481 "content-type" : "application/json; charset=utf-8", | 2516 "content-type" : "application/json; charset=utf-8", |
2482 }; | 2517 }; |
2483 var resp = convert.JSON.encode(buildTable()); | 2518 var resp = convert.JSON.encode(buildTable()); |
2484 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2519 return new async.Future.value(stringResponse(200, h, resp)); |
2485 }), true); | 2520 }), true); |
2486 res.update(arg_request, arg_tableId, replaceViewDefinition: arg_replaceVie
wDefinition).then(unittest.expectAsync(((api.Table response) { | 2521 res.update(arg_request, arg_tableId, replaceViewDefinition: arg_replaceVie
wDefinition).then(unittest.expectAsync(((api.Table response) { |
2487 checkTable(response); | 2522 checkTable(response); |
2488 }))); | 2523 }))); |
2489 }); | 2524 }); |
2490 | 2525 |
2491 }); | 2526 }); |
2492 | 2527 |
2493 | 2528 |
2494 unittest.group("resource-TaskResourceApi", () { | 2529 unittest.group("resource-TaskResourceApi", () { |
2495 unittest.test("method--delete", () { | 2530 unittest.test("method--delete", () { |
2496 | 2531 |
2497 var mock = new common_test.HttpServerMock(); | 2532 var mock = new HttpServerMock(); |
2498 api.TaskResourceApi res = new api.FusiontablesApi(mock).task; | 2533 api.TaskResourceApi res = new api.FusiontablesApi(mock).task; |
2499 var arg_tableId = "foo"; | 2534 var arg_tableId = "foo"; |
2500 var arg_taskId = "foo"; | 2535 var arg_taskId = "foo"; |
2501 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2536 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2502 var path = (req.url).path; | 2537 var path = (req.url).path; |
2503 var pathOffset = 0; | 2538 var pathOffset = 0; |
2504 var index; | 2539 var index; |
2505 var subPart; | 2540 var subPart; |
2506 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2541 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
2507 pathOffset += 1; | 2542 pathOffset += 1; |
(...skipping 27 matching lines...) Expand all Loading... |
2535 var keyvalue = part.split("="); | 2570 var keyvalue = part.split("="); |
2536 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2571 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
2537 } | 2572 } |
2538 } | 2573 } |
2539 | 2574 |
2540 | 2575 |
2541 var h = { | 2576 var h = { |
2542 "content-type" : "application/json; charset=utf-8", | 2577 "content-type" : "application/json; charset=utf-8", |
2543 }; | 2578 }; |
2544 var resp = ""; | 2579 var resp = ""; |
2545 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2580 return new async.Future.value(stringResponse(200, h, resp)); |
2546 }), true); | 2581 }), true); |
2547 res.delete(arg_tableId, arg_taskId).then(unittest.expectAsync((_) {})); | 2582 res.delete(arg_tableId, arg_taskId).then(unittest.expectAsync((_) {})); |
2548 }); | 2583 }); |
2549 | 2584 |
2550 unittest.test("method--get", () { | 2585 unittest.test("method--get", () { |
2551 | 2586 |
2552 var mock = new common_test.HttpServerMock(); | 2587 var mock = new HttpServerMock(); |
2553 api.TaskResourceApi res = new api.FusiontablesApi(mock).task; | 2588 api.TaskResourceApi res = new api.FusiontablesApi(mock).task; |
2554 var arg_tableId = "foo"; | 2589 var arg_tableId = "foo"; |
2555 var arg_taskId = "foo"; | 2590 var arg_taskId = "foo"; |
2556 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2591 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2557 var path = (req.url).path; | 2592 var path = (req.url).path; |
2558 var pathOffset = 0; | 2593 var pathOffset = 0; |
2559 var index; | 2594 var index; |
2560 var subPart; | 2595 var subPart; |
2561 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2596 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
2562 pathOffset += 1; | 2597 pathOffset += 1; |
(...skipping 27 matching lines...) Expand all Loading... |
2590 var keyvalue = part.split("="); | 2625 var keyvalue = part.split("="); |
2591 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2626 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
2592 } | 2627 } |
2593 } | 2628 } |
2594 | 2629 |
2595 | 2630 |
2596 var h = { | 2631 var h = { |
2597 "content-type" : "application/json; charset=utf-8", | 2632 "content-type" : "application/json; charset=utf-8", |
2598 }; | 2633 }; |
2599 var resp = convert.JSON.encode(buildTask()); | 2634 var resp = convert.JSON.encode(buildTask()); |
2600 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2635 return new async.Future.value(stringResponse(200, h, resp)); |
2601 }), true); | 2636 }), true); |
2602 res.get(arg_tableId, arg_taskId).then(unittest.expectAsync(((api.Task resp
onse) { | 2637 res.get(arg_tableId, arg_taskId).then(unittest.expectAsync(((api.Task resp
onse) { |
2603 checkTask(response); | 2638 checkTask(response); |
2604 }))); | 2639 }))); |
2605 }); | 2640 }); |
2606 | 2641 |
2607 unittest.test("method--list", () { | 2642 unittest.test("method--list", () { |
2608 | 2643 |
2609 var mock = new common_test.HttpServerMock(); | 2644 var mock = new HttpServerMock(); |
2610 api.TaskResourceApi res = new api.FusiontablesApi(mock).task; | 2645 api.TaskResourceApi res = new api.FusiontablesApi(mock).task; |
2611 var arg_tableId = "foo"; | 2646 var arg_tableId = "foo"; |
2612 var arg_maxResults = 42; | 2647 var arg_maxResults = 42; |
2613 var arg_pageToken = "foo"; | 2648 var arg_pageToken = "foo"; |
2614 var arg_startIndex = 42; | 2649 var arg_startIndex = 42; |
2615 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2650 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2616 var path = (req.url).path; | 2651 var path = (req.url).path; |
2617 var pathOffset = 0; | 2652 var pathOffset = 0; |
2618 var index; | 2653 var index; |
2619 var subPart; | 2654 var subPart; |
(...skipping 29 matching lines...) Expand all Loading... |
2649 } | 2684 } |
2650 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | 2685 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); |
2651 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 2686 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
2652 unittest.expect(core.int.parse(queryMap["startIndex"].first), unittest.e
quals(arg_startIndex)); | 2687 unittest.expect(core.int.parse(queryMap["startIndex"].first), unittest.e
quals(arg_startIndex)); |
2653 | 2688 |
2654 | 2689 |
2655 var h = { | 2690 var h = { |
2656 "content-type" : "application/json; charset=utf-8", | 2691 "content-type" : "application/json; charset=utf-8", |
2657 }; | 2692 }; |
2658 var resp = convert.JSON.encode(buildTaskList()); | 2693 var resp = convert.JSON.encode(buildTaskList()); |
2659 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2694 return new async.Future.value(stringResponse(200, h, resp)); |
2660 }), true); | 2695 }), true); |
2661 res.list(arg_tableId, maxResults: arg_maxResults, pageToken: arg_pageToken
, startIndex: arg_startIndex).then(unittest.expectAsync(((api.TaskList response)
{ | 2696 res.list(arg_tableId, maxResults: arg_maxResults, pageToken: arg_pageToken
, startIndex: arg_startIndex).then(unittest.expectAsync(((api.TaskList response)
{ |
2662 checkTaskList(response); | 2697 checkTaskList(response); |
2663 }))); | 2698 }))); |
2664 }); | 2699 }); |
2665 | 2700 |
2666 }); | 2701 }); |
2667 | 2702 |
2668 | 2703 |
2669 unittest.group("resource-TemplateResourceApi", () { | 2704 unittest.group("resource-TemplateResourceApi", () { |
2670 unittest.test("method--delete", () { | 2705 unittest.test("method--delete", () { |
2671 | 2706 |
2672 var mock = new common_test.HttpServerMock(); | 2707 var mock = new HttpServerMock(); |
2673 api.TemplateResourceApi res = new api.FusiontablesApi(mock).template; | 2708 api.TemplateResourceApi res = new api.FusiontablesApi(mock).template; |
2674 var arg_tableId = "foo"; | 2709 var arg_tableId = "foo"; |
2675 var arg_templateId = 42; | 2710 var arg_templateId = 42; |
2676 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2711 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2677 var path = (req.url).path; | 2712 var path = (req.url).path; |
2678 var pathOffset = 0; | 2713 var pathOffset = 0; |
2679 var index; | 2714 var index; |
2680 var subPart; | 2715 var subPart; |
2681 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2716 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
2682 pathOffset += 1; | 2717 pathOffset += 1; |
(...skipping 27 matching lines...) Expand all Loading... |
2710 var keyvalue = part.split("="); | 2745 var keyvalue = part.split("="); |
2711 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2746 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
2712 } | 2747 } |
2713 } | 2748 } |
2714 | 2749 |
2715 | 2750 |
2716 var h = { | 2751 var h = { |
2717 "content-type" : "application/json; charset=utf-8", | 2752 "content-type" : "application/json; charset=utf-8", |
2718 }; | 2753 }; |
2719 var resp = ""; | 2754 var resp = ""; |
2720 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2755 return new async.Future.value(stringResponse(200, h, resp)); |
2721 }), true); | 2756 }), true); |
2722 res.delete(arg_tableId, arg_templateId).then(unittest.expectAsync((_) {}))
; | 2757 res.delete(arg_tableId, arg_templateId).then(unittest.expectAsync((_) {}))
; |
2723 }); | 2758 }); |
2724 | 2759 |
2725 unittest.test("method--get", () { | 2760 unittest.test("method--get", () { |
2726 | 2761 |
2727 var mock = new common_test.HttpServerMock(); | 2762 var mock = new HttpServerMock(); |
2728 api.TemplateResourceApi res = new api.FusiontablesApi(mock).template; | 2763 api.TemplateResourceApi res = new api.FusiontablesApi(mock).template; |
2729 var arg_tableId = "foo"; | 2764 var arg_tableId = "foo"; |
2730 var arg_templateId = 42; | 2765 var arg_templateId = 42; |
2731 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2766 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2732 var path = (req.url).path; | 2767 var path = (req.url).path; |
2733 var pathOffset = 0; | 2768 var pathOffset = 0; |
2734 var index; | 2769 var index; |
2735 var subPart; | 2770 var subPart; |
2736 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2771 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
2737 pathOffset += 1; | 2772 pathOffset += 1; |
(...skipping 27 matching lines...) Expand all Loading... |
2765 var keyvalue = part.split("="); | 2800 var keyvalue = part.split("="); |
2766 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2801 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
2767 } | 2802 } |
2768 } | 2803 } |
2769 | 2804 |
2770 | 2805 |
2771 var h = { | 2806 var h = { |
2772 "content-type" : "application/json; charset=utf-8", | 2807 "content-type" : "application/json; charset=utf-8", |
2773 }; | 2808 }; |
2774 var resp = convert.JSON.encode(buildTemplate()); | 2809 var resp = convert.JSON.encode(buildTemplate()); |
2775 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2810 return new async.Future.value(stringResponse(200, h, resp)); |
2776 }), true); | 2811 }), true); |
2777 res.get(arg_tableId, arg_templateId).then(unittest.expectAsync(((api.Templ
ate response) { | 2812 res.get(arg_tableId, arg_templateId).then(unittest.expectAsync(((api.Templ
ate response) { |
2778 checkTemplate(response); | 2813 checkTemplate(response); |
2779 }))); | 2814 }))); |
2780 }); | 2815 }); |
2781 | 2816 |
2782 unittest.test("method--insert", () { | 2817 unittest.test("method--insert", () { |
2783 | 2818 |
2784 var mock = new common_test.HttpServerMock(); | 2819 var mock = new HttpServerMock(); |
2785 api.TemplateResourceApi res = new api.FusiontablesApi(mock).template; | 2820 api.TemplateResourceApi res = new api.FusiontablesApi(mock).template; |
2786 var arg_request = buildTemplate(); | 2821 var arg_request = buildTemplate(); |
2787 var arg_tableId = "foo"; | 2822 var arg_tableId = "foo"; |
2788 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2823 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2789 var obj = new api.Template.fromJson(json); | 2824 var obj = new api.Template.fromJson(json); |
2790 checkTemplate(obj); | 2825 checkTemplate(obj); |
2791 | 2826 |
2792 var path = (req.url).path; | 2827 var path = (req.url).path; |
2793 var pathOffset = 0; | 2828 var pathOffset = 0; |
2794 var index; | 2829 var index; |
(...skipping 27 matching lines...) Expand all Loading... |
2822 var keyvalue = part.split("="); | 2857 var keyvalue = part.split("="); |
2823 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2858 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
2824 } | 2859 } |
2825 } | 2860 } |
2826 | 2861 |
2827 | 2862 |
2828 var h = { | 2863 var h = { |
2829 "content-type" : "application/json; charset=utf-8", | 2864 "content-type" : "application/json; charset=utf-8", |
2830 }; | 2865 }; |
2831 var resp = convert.JSON.encode(buildTemplate()); | 2866 var resp = convert.JSON.encode(buildTemplate()); |
2832 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2867 return new async.Future.value(stringResponse(200, h, resp)); |
2833 }), true); | 2868 }), true); |
2834 res.insert(arg_request, arg_tableId).then(unittest.expectAsync(((api.Templ
ate response) { | 2869 res.insert(arg_request, arg_tableId).then(unittest.expectAsync(((api.Templ
ate response) { |
2835 checkTemplate(response); | 2870 checkTemplate(response); |
2836 }))); | 2871 }))); |
2837 }); | 2872 }); |
2838 | 2873 |
2839 unittest.test("method--list", () { | 2874 unittest.test("method--list", () { |
2840 | 2875 |
2841 var mock = new common_test.HttpServerMock(); | 2876 var mock = new HttpServerMock(); |
2842 api.TemplateResourceApi res = new api.FusiontablesApi(mock).template; | 2877 api.TemplateResourceApi res = new api.FusiontablesApi(mock).template; |
2843 var arg_tableId = "foo"; | 2878 var arg_tableId = "foo"; |
2844 var arg_maxResults = 42; | 2879 var arg_maxResults = 42; |
2845 var arg_pageToken = "foo"; | 2880 var arg_pageToken = "foo"; |
2846 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2881 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2847 var path = (req.url).path; | 2882 var path = (req.url).path; |
2848 var pathOffset = 0; | 2883 var pathOffset = 0; |
2849 var index; | 2884 var index; |
2850 var subPart; | 2885 var subPart; |
2851 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2886 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
(...skipping 27 matching lines...) Expand all Loading... |
2879 } | 2914 } |
2880 } | 2915 } |
2881 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | 2916 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); |
2882 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 2917 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
2883 | 2918 |
2884 | 2919 |
2885 var h = { | 2920 var h = { |
2886 "content-type" : "application/json; charset=utf-8", | 2921 "content-type" : "application/json; charset=utf-8", |
2887 }; | 2922 }; |
2888 var resp = convert.JSON.encode(buildTemplateList()); | 2923 var resp = convert.JSON.encode(buildTemplateList()); |
2889 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2924 return new async.Future.value(stringResponse(200, h, resp)); |
2890 }), true); | 2925 }), true); |
2891 res.list(arg_tableId, maxResults: arg_maxResults, pageToken: arg_pageToken
).then(unittest.expectAsync(((api.TemplateList response) { | 2926 res.list(arg_tableId, maxResults: arg_maxResults, pageToken: arg_pageToken
).then(unittest.expectAsync(((api.TemplateList response) { |
2892 checkTemplateList(response); | 2927 checkTemplateList(response); |
2893 }))); | 2928 }))); |
2894 }); | 2929 }); |
2895 | 2930 |
2896 unittest.test("method--patch", () { | 2931 unittest.test("method--patch", () { |
2897 | 2932 |
2898 var mock = new common_test.HttpServerMock(); | 2933 var mock = new HttpServerMock(); |
2899 api.TemplateResourceApi res = new api.FusiontablesApi(mock).template; | 2934 api.TemplateResourceApi res = new api.FusiontablesApi(mock).template; |
2900 var arg_request = buildTemplate(); | 2935 var arg_request = buildTemplate(); |
2901 var arg_tableId = "foo"; | 2936 var arg_tableId = "foo"; |
2902 var arg_templateId = 42; | 2937 var arg_templateId = 42; |
2903 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2938 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2904 var obj = new api.Template.fromJson(json); | 2939 var obj = new api.Template.fromJson(json); |
2905 checkTemplate(obj); | 2940 checkTemplate(obj); |
2906 | 2941 |
2907 var path = (req.url).path; | 2942 var path = (req.url).path; |
2908 var pathOffset = 0; | 2943 var pathOffset = 0; |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2940 var keyvalue = part.split("="); | 2975 var keyvalue = part.split("="); |
2941 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2976 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
2942 } | 2977 } |
2943 } | 2978 } |
2944 | 2979 |
2945 | 2980 |
2946 var h = { | 2981 var h = { |
2947 "content-type" : "application/json; charset=utf-8", | 2982 "content-type" : "application/json; charset=utf-8", |
2948 }; | 2983 }; |
2949 var resp = convert.JSON.encode(buildTemplate()); | 2984 var resp = convert.JSON.encode(buildTemplate()); |
2950 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2985 return new async.Future.value(stringResponse(200, h, resp)); |
2951 }), true); | 2986 }), true); |
2952 res.patch(arg_request, arg_tableId, arg_templateId).then(unittest.expectAs
ync(((api.Template response) { | 2987 res.patch(arg_request, arg_tableId, arg_templateId).then(unittest.expectAs
ync(((api.Template response) { |
2953 checkTemplate(response); | 2988 checkTemplate(response); |
2954 }))); | 2989 }))); |
2955 }); | 2990 }); |
2956 | 2991 |
2957 unittest.test("method--update", () { | 2992 unittest.test("method--update", () { |
2958 | 2993 |
2959 var mock = new common_test.HttpServerMock(); | 2994 var mock = new HttpServerMock(); |
2960 api.TemplateResourceApi res = new api.FusiontablesApi(mock).template; | 2995 api.TemplateResourceApi res = new api.FusiontablesApi(mock).template; |
2961 var arg_request = buildTemplate(); | 2996 var arg_request = buildTemplate(); |
2962 var arg_tableId = "foo"; | 2997 var arg_tableId = "foo"; |
2963 var arg_templateId = 42; | 2998 var arg_templateId = 42; |
2964 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2999 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2965 var obj = new api.Template.fromJson(json); | 3000 var obj = new api.Template.fromJson(json); |
2966 checkTemplate(obj); | 3001 checkTemplate(obj); |
2967 | 3002 |
2968 var path = (req.url).path; | 3003 var path = (req.url).path; |
2969 var pathOffset = 0; | 3004 var pathOffset = 0; |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3001 var keyvalue = part.split("="); | 3036 var keyvalue = part.split("="); |
3002 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 3037 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
3003 } | 3038 } |
3004 } | 3039 } |
3005 | 3040 |
3006 | 3041 |
3007 var h = { | 3042 var h = { |
3008 "content-type" : "application/json; charset=utf-8", | 3043 "content-type" : "application/json; charset=utf-8", |
3009 }; | 3044 }; |
3010 var resp = convert.JSON.encode(buildTemplate()); | 3045 var resp = convert.JSON.encode(buildTemplate()); |
3011 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 3046 return new async.Future.value(stringResponse(200, h, resp)); |
3012 }), true); | 3047 }), true); |
3013 res.update(arg_request, arg_tableId, arg_templateId).then(unittest.expectA
sync(((api.Template response) { | 3048 res.update(arg_request, arg_tableId, arg_templateId).then(unittest.expectA
sync(((api.Template response) { |
3014 checkTemplate(response); | 3049 checkTemplate(response); |
3015 }))); | 3050 }))); |
3016 }); | 3051 }); |
3017 | 3052 |
3018 }); | 3053 }); |
3019 | 3054 |
3020 | 3055 |
3021 } | 3056 } |
3022 | 3057 |
OLD | NEW |