Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(292)

Side by Side Diff: generated/googleapis/test/fusiontables/v1_test.dart

Issue 2936613002: Api-Roll 50: 2017-06-12 (Closed)
Patch Set: Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 library googleapis.fusiontables.v1.test; 1 library googleapis.fusiontables.v1.test;
2 2
3 import "dart:core" as core; 3 import "dart:core" as core;
4 import "dart:collection" as collection; 4 import "dart:collection" as collection;
5 import "dart:async" as async; 5 import "dart:async" as async;
6 import "dart:convert" as convert; 6 import "dart:convert" as convert;
7 7
8 import 'package:http/http.dart' as http; 8 import 'package:http/http.dart' as http;
9 import 'package:http/testing.dart' as http_testing; 9 import 'package:http/testing.dart' as http_testing;
10 import 'package:unittest/unittest.dart' as unittest; 10 import 'package:test/test.dart' as unittest;
11 11
12 import 'package:googleapis/fusiontables/v1.dart' as api; 12 import 'package:googleapis/fusiontables/v1.dart' as api;
13 13
14 class HttpServerMock extends http.BaseClient { 14 class HttpServerMock extends http.BaseClient {
15 core.Function _callback; 15 core.Function _callback;
16 core.bool _expectJson; 16 core.bool _expectJson;
17 17
18 void register(core.Function callback, core.bool expectJson) { 18 void register(core.Function callback, core.bool expectJson) {
19 _callback = callback; 19 _callback = callback;
20 _expectJson = expectJson; 20 _expectJson = expectJson;
(...skipping 18 matching lines...) Expand all
39 } else { 39 } else {
40 return stream.toBytes().then((data) { 40 return stream.toBytes().then((data) {
41 return _callback(request, data); 41 return _callback(request, data);
42 }); 42 });
43 } 43 }
44 } 44 }
45 } 45 }
46 } 46 }
47 47
48 http.StreamedResponse stringResponse( 48 http.StreamedResponse stringResponse(
49 core.int status, core.Map headers, core.String body) { 49 core.int status, core.Map<core.String, core.String> headers, core.String bod y) {
50 var stream = new async.Stream.fromIterable([convert.UTF8.encode(body)]); 50 var stream = new async.Stream.fromIterable([convert.UTF8.encode(body)]);
51 return new http.StreamedResponse(stream, status, headers: headers); 51 return new http.StreamedResponse(stream, status, headers: headers);
52 } 52 }
53 53
54 core.int buildCounterBucket = 0; 54 core.int buildCounterBucket = 0;
55 buildBucket() { 55 buildBucket() {
56 var o = new api.Bucket(); 56 var o = new api.Bucket();
57 buildCounterBucket++; 57 buildCounterBucket++;
58 if (buildCounterBucket < 3) { 58 if (buildCounterBucket < 3) {
59 o.color = "foo"; 59 o.color = "foo";
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 unittest.expect(o.columnId, unittest.equals(42)); 125 unittest.expect(o.columnId, unittest.equals(42));
126 unittest.expect(o.description, unittest.equals('foo')); 126 unittest.expect(o.description, unittest.equals('foo'));
127 unittest.expect(o.graphPredicate, unittest.equals('foo')); 127 unittest.expect(o.graphPredicate, unittest.equals('foo'));
128 unittest.expect(o.kind, unittest.equals('foo')); 128 unittest.expect(o.kind, unittest.equals('foo'));
129 unittest.expect(o.name, unittest.equals('foo')); 129 unittest.expect(o.name, unittest.equals('foo'));
130 unittest.expect(o.type, unittest.equals('foo')); 130 unittest.expect(o.type, unittest.equals('foo'));
131 } 131 }
132 buildCounterColumn--; 132 buildCounterColumn--;
133 } 133 }
134 134
135 buildUnnamed3034() { 135 buildUnnamed2504() {
136 var o = new core.List<api.Column>(); 136 var o = new core.List<api.Column>();
137 o.add(buildColumn()); 137 o.add(buildColumn());
138 o.add(buildColumn()); 138 o.add(buildColumn());
139 return o; 139 return o;
140 } 140 }
141 141
142 checkUnnamed3034(core.List<api.Column> o) { 142 checkUnnamed2504(core.List<api.Column> o) {
143 unittest.expect(o, unittest.hasLength(2)); 143 unittest.expect(o, unittest.hasLength(2));
144 checkColumn(o[0]); 144 checkColumn(o[0]);
145 checkColumn(o[1]); 145 checkColumn(o[1]);
146 } 146 }
147 147
148 core.int buildCounterColumnList = 0; 148 core.int buildCounterColumnList = 0;
149 buildColumnList() { 149 buildColumnList() {
150 var o = new api.ColumnList(); 150 var o = new api.ColumnList();
151 buildCounterColumnList++; 151 buildCounterColumnList++;
152 if (buildCounterColumnList < 3) { 152 if (buildCounterColumnList < 3) {
153 o.items = buildUnnamed3034(); 153 o.items = buildUnnamed2504();
154 o.kind = "foo"; 154 o.kind = "foo";
155 o.nextPageToken = "foo"; 155 o.nextPageToken = "foo";
156 o.totalItems = 42; 156 o.totalItems = 42;
157 } 157 }
158 buildCounterColumnList--; 158 buildCounterColumnList--;
159 return o; 159 return o;
160 } 160 }
161 161
162 checkColumnList(api.ColumnList o) { 162 checkColumnList(api.ColumnList o) {
163 buildCounterColumnList++; 163 buildCounterColumnList++;
164 if (buildCounterColumnList < 3) { 164 if (buildCounterColumnList < 3) {
165 checkUnnamed3034(o.items); 165 checkUnnamed2504(o.items);
166 unittest.expect(o.kind, unittest.equals('foo')); 166 unittest.expect(o.kind, unittest.equals('foo'));
167 unittest.expect(o.nextPageToken, unittest.equals('foo')); 167 unittest.expect(o.nextPageToken, unittest.equals('foo'));
168 unittest.expect(o.totalItems, unittest.equals(42)); 168 unittest.expect(o.totalItems, unittest.equals(42));
169 } 169 }
170 buildCounterColumnList--; 170 buildCounterColumnList--;
171 } 171 }
172 172
173 buildUnnamed3035() { 173 buildUnnamed2505() {
174 var o = new core.List<core.Object>(); 174 var o = new core.List<core.Object>();
175 o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}); 175 o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'});
176 o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}); 176 o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'});
177 return o; 177 return o;
178 } 178 }
179 179
180 checkUnnamed3035(core.List<core.Object> o) { 180 checkUnnamed2505(core.List<core.Object> o) {
181 unittest.expect(o, unittest.hasLength(2)); 181 unittest.expect(o, unittest.hasLength(2));
182 var casted1 = (o[0]) as core.Map; unittest.expect(casted1, unittest.hasLength( 3)); unittest.expect(casted1["list"], unittest.equals([1, 2, 3])); unittest.expe ct(casted1["bool"], unittest.equals(true)); unittest.expect(casted1["string"], u nittest.equals('foo')); 182 var casted1 = (o[0]) as core.Map; unittest.expect(casted1, unittest.hasLength( 3)); unittest.expect(casted1["list"], unittest.equals([1, 2, 3])); unittest.expe ct(casted1["bool"], unittest.equals(true)); unittest.expect(casted1["string"], u nittest.equals('foo'));
183 var casted2 = (o[1]) as core.Map; unittest.expect(casted2, unittest.hasLength( 3)); unittest.expect(casted2["list"], unittest.equals([1, 2, 3])); unittest.expe ct(casted2["bool"], unittest.equals(true)); unittest.expect(casted2["string"], u nittest.equals('foo')); 183 var casted2 = (o[1]) as core.Map; unittest.expect(casted2, unittest.hasLength( 3)); unittest.expect(casted2["list"], unittest.equals([1, 2, 3])); unittest.expe ct(casted2["bool"], unittest.equals(true)); unittest.expect(casted2["string"], u nittest.equals('foo'));
184 } 184 }
185 185
186 core.int buildCounterGeometry = 0; 186 core.int buildCounterGeometry = 0;
187 buildGeometry() { 187 buildGeometry() {
188 var o = new api.Geometry(); 188 var o = new api.Geometry();
189 buildCounterGeometry++; 189 buildCounterGeometry++;
190 if (buildCounterGeometry < 3) { 190 if (buildCounterGeometry < 3) {
191 o.geometries = buildUnnamed3035(); 191 o.geometries = buildUnnamed2505();
192 o.geometry = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; 192 o.geometry = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'};
193 o.type = "foo"; 193 o.type = "foo";
194 } 194 }
195 buildCounterGeometry--; 195 buildCounterGeometry--;
196 return o; 196 return o;
197 } 197 }
198 198
199 checkGeometry(api.Geometry o) { 199 checkGeometry(api.Geometry o) {
200 buildCounterGeometry++; 200 buildCounterGeometry++;
201 if (buildCounterGeometry < 3) { 201 if (buildCounterGeometry < 3) {
202 checkUnnamed3035(o.geometries); 202 checkUnnamed2505(o.geometries);
203 var casted3 = (o.geometry) as core.Map; unittest.expect(casted3, unittest.ha sLength(3)); unittest.expect(casted3["list"], unittest.equals([1, 2, 3])); unitt est.expect(casted3["bool"], unittest.equals(true)); unittest.expect(casted3["str ing"], unittest.equals('foo')); 203 var casted3 = (o.geometry) as core.Map; unittest.expect(casted3, unittest.ha sLength(3)); unittest.expect(casted3["list"], unittest.equals([1, 2, 3])); unitt est.expect(casted3["bool"], unittest.equals(true)); unittest.expect(casted3["str ing"], unittest.equals('foo'));
204 unittest.expect(o.type, unittest.equals('foo')); 204 unittest.expect(o.type, unittest.equals('foo'));
205 } 205 }
206 buildCounterGeometry--; 206 buildCounterGeometry--;
207 } 207 }
208 208
209 core.int buildCounterImport = 0; 209 core.int buildCounterImport = 0;
210 buildImport() { 210 buildImport() {
211 var o = new api.Import(); 211 var o = new api.Import();
212 buildCounterImport++; 212 buildCounterImport++;
213 if (buildCounterImport < 3) { 213 if (buildCounterImport < 3) {
214 o.kind = "foo"; 214 o.kind = "foo";
215 o.numRowsReceived = "foo"; 215 o.numRowsReceived = "foo";
216 } 216 }
217 buildCounterImport--; 217 buildCounterImport--;
218 return o; 218 return o;
219 } 219 }
220 220
221 checkImport(api.Import o) { 221 checkImport(api.Import o) {
222 buildCounterImport++; 222 buildCounterImport++;
223 if (buildCounterImport < 3) { 223 if (buildCounterImport < 3) {
224 unittest.expect(o.kind, unittest.equals('foo')); 224 unittest.expect(o.kind, unittest.equals('foo'));
225 unittest.expect(o.numRowsReceived, unittest.equals('foo')); 225 unittest.expect(o.numRowsReceived, unittest.equals('foo'));
226 } 226 }
227 buildCounterImport--; 227 buildCounterImport--;
228 } 228 }
229 229
230 buildUnnamed3036() { 230 buildUnnamed2506() {
231 var o = new core.List<core.double>(); 231 var o = new core.List<core.double>();
232 o.add(42.0); 232 o.add(42.0);
233 o.add(42.0); 233 o.add(42.0);
234 return o; 234 return o;
235 } 235 }
236 236
237 checkUnnamed3036(core.List<core.double> o) { 237 checkUnnamed2506(core.List<core.double> o) {
238 unittest.expect(o, unittest.hasLength(2)); 238 unittest.expect(o, unittest.hasLength(2));
239 unittest.expect(o[0], unittest.equals(42.0)); 239 unittest.expect(o[0], unittest.equals(42.0));
240 unittest.expect(o[1], unittest.equals(42.0)); 240 unittest.expect(o[1], unittest.equals(42.0));
241 } 241 }
242 242
243 buildUnnamed3037() { 243 buildUnnamed2507() {
244 var o = new core.List<core.List<core.double>>(); 244 var o = new core.List<core.List<core.double>>();
245 o.add(buildUnnamed3036()); 245 o.add(buildUnnamed2506());
246 o.add(buildUnnamed3036()); 246 o.add(buildUnnamed2506());
247 return o; 247 return o;
248 } 248 }
249 249
250 checkUnnamed3037(core.List<core.List<core.double>> o) { 250 checkUnnamed2507(core.List<core.List<core.double>> o) {
251 unittest.expect(o, unittest.hasLength(2)); 251 unittest.expect(o, unittest.hasLength(2));
252 checkUnnamed3036(o[0]); 252 checkUnnamed2506(o[0]);
253 checkUnnamed3036(o[1]); 253 checkUnnamed2506(o[1]);
254 } 254 }
255 255
256 core.int buildCounterLine = 0; 256 core.int buildCounterLine = 0;
257 buildLine() { 257 buildLine() {
258 var o = new api.Line(); 258 var o = new api.Line();
259 buildCounterLine++; 259 buildCounterLine++;
260 if (buildCounterLine < 3) { 260 if (buildCounterLine < 3) {
261 o.coordinates = buildUnnamed3037(); 261 o.coordinates = buildUnnamed2507();
262 o.type = "foo"; 262 o.type = "foo";
263 } 263 }
264 buildCounterLine--; 264 buildCounterLine--;
265 return o; 265 return o;
266 } 266 }
267 267
268 checkLine(api.Line o) { 268 checkLine(api.Line o) {
269 buildCounterLine++; 269 buildCounterLine++;
270 if (buildCounterLine < 3) { 270 if (buildCounterLine < 3) {
271 checkUnnamed3037(o.coordinates); 271 checkUnnamed2507(o.coordinates);
272 unittest.expect(o.type, unittest.equals('foo')); 272 unittest.expect(o.type, unittest.equals('foo'));
273 } 273 }
274 buildCounterLine--; 274 buildCounterLine--;
275 } 275 }
276 276
277 core.int buildCounterLineStyle = 0; 277 core.int buildCounterLineStyle = 0;
278 buildLineStyle() { 278 buildLineStyle() {
279 var o = new api.LineStyle(); 279 var o = new api.LineStyle();
280 buildCounterLineStyle++; 280 buildCounterLineStyle++;
281 if (buildCounterLineStyle < 3) { 281 if (buildCounterLineStyle < 3) {
(...skipping 12 matching lines...) Expand all
294 if (buildCounterLineStyle < 3) { 294 if (buildCounterLineStyle < 3) {
295 unittest.expect(o.strokeColor, unittest.equals('foo')); 295 unittest.expect(o.strokeColor, unittest.equals('foo'));
296 checkStyleFunction(o.strokeColorStyler); 296 checkStyleFunction(o.strokeColorStyler);
297 unittest.expect(o.strokeOpacity, unittest.equals(42.0)); 297 unittest.expect(o.strokeOpacity, unittest.equals(42.0));
298 unittest.expect(o.strokeWeight, unittest.equals(42)); 298 unittest.expect(o.strokeWeight, unittest.equals(42));
299 checkStyleFunction(o.strokeWeightStyler); 299 checkStyleFunction(o.strokeWeightStyler);
300 } 300 }
301 buildCounterLineStyle--; 301 buildCounterLineStyle--;
302 } 302 }
303 303
304 buildUnnamed3038() { 304 buildUnnamed2508() {
305 var o = new core.List<core.double>(); 305 var o = new core.List<core.double>();
306 o.add(42.0); 306 o.add(42.0);
307 o.add(42.0); 307 o.add(42.0);
308 return o; 308 return o;
309 } 309 }
310 310
311 checkUnnamed3038(core.List<core.double> o) { 311 checkUnnamed2508(core.List<core.double> o) {
312 unittest.expect(o, unittest.hasLength(2)); 312 unittest.expect(o, unittest.hasLength(2));
313 unittest.expect(o[0], unittest.equals(42.0)); 313 unittest.expect(o[0], unittest.equals(42.0));
314 unittest.expect(o[1], unittest.equals(42.0)); 314 unittest.expect(o[1], unittest.equals(42.0));
315 } 315 }
316 316
317 core.int buildCounterPoint = 0; 317 core.int buildCounterPoint = 0;
318 buildPoint() { 318 buildPoint() {
319 var o = new api.Point(); 319 var o = new api.Point();
320 buildCounterPoint++; 320 buildCounterPoint++;
321 if (buildCounterPoint < 3) { 321 if (buildCounterPoint < 3) {
322 o.coordinates = buildUnnamed3038(); 322 o.coordinates = buildUnnamed2508();
323 o.type = "foo"; 323 o.type = "foo";
324 } 324 }
325 buildCounterPoint--; 325 buildCounterPoint--;
326 return o; 326 return o;
327 } 327 }
328 328
329 checkPoint(api.Point o) { 329 checkPoint(api.Point o) {
330 buildCounterPoint++; 330 buildCounterPoint++;
331 if (buildCounterPoint < 3) { 331 if (buildCounterPoint < 3) {
332 checkUnnamed3038(o.coordinates); 332 checkUnnamed2508(o.coordinates);
333 unittest.expect(o.type, unittest.equals('foo')); 333 unittest.expect(o.type, unittest.equals('foo'));
334 } 334 }
335 buildCounterPoint--; 335 buildCounterPoint--;
336 } 336 }
337 337
338 core.int buildCounterPointStyle = 0; 338 core.int buildCounterPointStyle = 0;
339 buildPointStyle() { 339 buildPointStyle() {
340 var o = new api.PointStyle(); 340 var o = new api.PointStyle();
341 buildCounterPointStyle++; 341 buildCounterPointStyle++;
342 if (buildCounterPointStyle < 3) { 342 if (buildCounterPointStyle < 3) {
343 o.iconName = "foo"; 343 o.iconName = "foo";
344 o.iconStyler = buildStyleFunction(); 344 o.iconStyler = buildStyleFunction();
345 } 345 }
346 buildCounterPointStyle--; 346 buildCounterPointStyle--;
347 return o; 347 return o;
348 } 348 }
349 349
350 checkPointStyle(api.PointStyle o) { 350 checkPointStyle(api.PointStyle o) {
351 buildCounterPointStyle++; 351 buildCounterPointStyle++;
352 if (buildCounterPointStyle < 3) { 352 if (buildCounterPointStyle < 3) {
353 unittest.expect(o.iconName, unittest.equals('foo')); 353 unittest.expect(o.iconName, unittest.equals('foo'));
354 checkStyleFunction(o.iconStyler); 354 checkStyleFunction(o.iconStyler);
355 } 355 }
356 buildCounterPointStyle--; 356 buildCounterPointStyle--;
357 } 357 }
358 358
359 buildUnnamed3039() { 359 buildUnnamed2509() {
360 var o = new core.List<core.double>(); 360 var o = new core.List<core.double>();
361 o.add(42.0); 361 o.add(42.0);
362 o.add(42.0); 362 o.add(42.0);
363 return o; 363 return o;
364 } 364 }
365 365
366 checkUnnamed3039(core.List<core.double> o) { 366 checkUnnamed2509(core.List<core.double> o) {
367 unittest.expect(o, unittest.hasLength(2)); 367 unittest.expect(o, unittest.hasLength(2));
368 unittest.expect(o[0], unittest.equals(42.0)); 368 unittest.expect(o[0], unittest.equals(42.0));
369 unittest.expect(o[1], unittest.equals(42.0)); 369 unittest.expect(o[1], unittest.equals(42.0));
370 } 370 }
371 371
372 buildUnnamed3040() { 372 buildUnnamed2510() {
373 var o = new core.List<core.List<core.double>>(); 373 var o = new core.List<core.List<core.double>>();
374 o.add(buildUnnamed3039()); 374 o.add(buildUnnamed2509());
375 o.add(buildUnnamed3039()); 375 o.add(buildUnnamed2509());
376 return o; 376 return o;
377 } 377 }
378 378
379 checkUnnamed3040(core.List<core.List<core.double>> o) { 379 checkUnnamed2510(core.List<core.List<core.double>> o) {
380 unittest.expect(o, unittest.hasLength(2)); 380 unittest.expect(o, unittest.hasLength(2));
381 checkUnnamed3039(o[0]); 381 checkUnnamed2509(o[0]);
382 checkUnnamed3039(o[1]); 382 checkUnnamed2509(o[1]);
383 } 383 }
384 384
385 buildUnnamed3041() { 385 buildUnnamed2511() {
386 var o = new core.List<core.List<core.List<core.double>>>(); 386 var o = new core.List<core.List<core.List<core.double>>>();
387 o.add(buildUnnamed3040()); 387 o.add(buildUnnamed2510());
388 o.add(buildUnnamed3040()); 388 o.add(buildUnnamed2510());
389 return o; 389 return o;
390 } 390 }
391 391
392 checkUnnamed3041(core.List<core.List<core.List<core.double>>> o) { 392 checkUnnamed2511(core.List<core.List<core.List<core.double>>> o) {
393 unittest.expect(o, unittest.hasLength(2)); 393 unittest.expect(o, unittest.hasLength(2));
394 checkUnnamed3040(o[0]); 394 checkUnnamed2510(o[0]);
395 checkUnnamed3040(o[1]); 395 checkUnnamed2510(o[1]);
396 } 396 }
397 397
398 core.int buildCounterPolygon = 0; 398 core.int buildCounterPolygon = 0;
399 buildPolygon() { 399 buildPolygon() {
400 var o = new api.Polygon(); 400 var o = new api.Polygon();
401 buildCounterPolygon++; 401 buildCounterPolygon++;
402 if (buildCounterPolygon < 3) { 402 if (buildCounterPolygon < 3) {
403 o.coordinates = buildUnnamed3041(); 403 o.coordinates = buildUnnamed2511();
404 o.type = "foo"; 404 o.type = "foo";
405 } 405 }
406 buildCounterPolygon--; 406 buildCounterPolygon--;
407 return o; 407 return o;
408 } 408 }
409 409
410 checkPolygon(api.Polygon o) { 410 checkPolygon(api.Polygon o) {
411 buildCounterPolygon++; 411 buildCounterPolygon++;
412 if (buildCounterPolygon < 3) { 412 if (buildCounterPolygon < 3) {
413 checkUnnamed3041(o.coordinates); 413 checkUnnamed2511(o.coordinates);
414 unittest.expect(o.type, unittest.equals('foo')); 414 unittest.expect(o.type, unittest.equals('foo'));
415 } 415 }
416 buildCounterPolygon--; 416 buildCounterPolygon--;
417 } 417 }
418 418
419 core.int buildCounterPolygonStyle = 0; 419 core.int buildCounterPolygonStyle = 0;
420 buildPolygonStyle() { 420 buildPolygonStyle() {
421 var o = new api.PolygonStyle(); 421 var o = new api.PolygonStyle();
422 buildCounterPolygonStyle++; 422 buildCounterPolygonStyle++;
423 if (buildCounterPolygonStyle < 3) { 423 if (buildCounterPolygonStyle < 3) {
(...skipping 18 matching lines...) Expand all
442 unittest.expect(o.fillOpacity, unittest.equals(42.0)); 442 unittest.expect(o.fillOpacity, unittest.equals(42.0));
443 unittest.expect(o.strokeColor, unittest.equals('foo')); 443 unittest.expect(o.strokeColor, unittest.equals('foo'));
444 checkStyleFunction(o.strokeColorStyler); 444 checkStyleFunction(o.strokeColorStyler);
445 unittest.expect(o.strokeOpacity, unittest.equals(42.0)); 445 unittest.expect(o.strokeOpacity, unittest.equals(42.0));
446 unittest.expect(o.strokeWeight, unittest.equals(42)); 446 unittest.expect(o.strokeWeight, unittest.equals(42));
447 checkStyleFunction(o.strokeWeightStyler); 447 checkStyleFunction(o.strokeWeightStyler);
448 } 448 }
449 buildCounterPolygonStyle--; 449 buildCounterPolygonStyle--;
450 } 450 }
451 451
452 buildUnnamed3042() { 452 buildUnnamed2512() {
453 var o = new core.List<core.String>(); 453 var o = new core.List<core.String>();
454 o.add("foo"); 454 o.add("foo");
455 o.add("foo"); 455 o.add("foo");
456 return o; 456 return o;
457 } 457 }
458 458
459 checkUnnamed3042(core.List<core.String> o) { 459 checkUnnamed2512(core.List<core.String> o) {
460 unittest.expect(o, unittest.hasLength(2)); 460 unittest.expect(o, unittest.hasLength(2));
461 unittest.expect(o[0], unittest.equals('foo')); 461 unittest.expect(o[0], unittest.equals('foo'));
462 unittest.expect(o[1], unittest.equals('foo')); 462 unittest.expect(o[1], unittest.equals('foo'));
463 } 463 }
464 464
465 buildUnnamed3043() { 465 buildUnnamed2513() {
466 var o = new core.List<core.Object>(); 466 var o = new core.List<core.Object>();
467 o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}); 467 o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'});
468 o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}); 468 o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'});
469 return o; 469 return o;
470 } 470 }
471 471
472 checkUnnamed3043(core.List<core.Object> o) { 472 checkUnnamed2513(core.List<core.Object> o) {
473 unittest.expect(o, unittest.hasLength(2)); 473 unittest.expect(o, unittest.hasLength(2));
474 var casted4 = (o[0]) as core.Map; unittest.expect(casted4, unittest.hasLength( 3)); unittest.expect(casted4["list"], unittest.equals([1, 2, 3])); unittest.expe ct(casted4["bool"], unittest.equals(true)); unittest.expect(casted4["string"], u nittest.equals('foo')); 474 var casted4 = (o[0]) as core.Map; unittest.expect(casted4, unittest.hasLength( 3)); unittest.expect(casted4["list"], unittest.equals([1, 2, 3])); unittest.expe ct(casted4["bool"], unittest.equals(true)); unittest.expect(casted4["string"], u nittest.equals('foo'));
475 var casted5 = (o[1]) as core.Map; unittest.expect(casted5, unittest.hasLength( 3)); unittest.expect(casted5["list"], unittest.equals([1, 2, 3])); unittest.expe ct(casted5["bool"], unittest.equals(true)); unittest.expect(casted5["string"], u nittest.equals('foo')); 475 var casted5 = (o[1]) as core.Map; unittest.expect(casted5, unittest.hasLength( 3)); unittest.expect(casted5["list"], unittest.equals([1, 2, 3])); unittest.expe ct(casted5["bool"], unittest.equals(true)); unittest.expect(casted5["string"], u nittest.equals('foo'));
476 } 476 }
477 477
478 buildUnnamed3044() { 478 buildUnnamed2514() {
479 var o = new core.List<core.List<core.Object>>(); 479 var o = new core.List<core.List<core.Object>>();
480 o.add(buildUnnamed3043()); 480 o.add(buildUnnamed2513());
481 o.add(buildUnnamed3043()); 481 o.add(buildUnnamed2513());
482 return o; 482 return o;
483 } 483 }
484 484
485 checkUnnamed3044(core.List<core.List<core.Object>> o) { 485 checkUnnamed2514(core.List<core.List<core.Object>> o) {
486 unittest.expect(o, unittest.hasLength(2)); 486 unittest.expect(o, unittest.hasLength(2));
487 checkUnnamed3043(o[0]); 487 checkUnnamed2513(o[0]);
488 checkUnnamed3043(o[1]); 488 checkUnnamed2513(o[1]);
489 } 489 }
490 490
491 core.int buildCounterSqlresponse = 0; 491 core.int buildCounterSqlresponse = 0;
492 buildSqlresponse() { 492 buildSqlresponse() {
493 var o = new api.Sqlresponse(); 493 var o = new api.Sqlresponse();
494 buildCounterSqlresponse++; 494 buildCounterSqlresponse++;
495 if (buildCounterSqlresponse < 3) { 495 if (buildCounterSqlresponse < 3) {
496 o.columns = buildUnnamed3042(); 496 o.columns = buildUnnamed2512();
497 o.kind = "foo"; 497 o.kind = "foo";
498 o.rows = buildUnnamed3044(); 498 o.rows = buildUnnamed2514();
499 } 499 }
500 buildCounterSqlresponse--; 500 buildCounterSqlresponse--;
501 return o; 501 return o;
502 } 502 }
503 503
504 checkSqlresponse(api.Sqlresponse o) { 504 checkSqlresponse(api.Sqlresponse o) {
505 buildCounterSqlresponse++; 505 buildCounterSqlresponse++;
506 if (buildCounterSqlresponse < 3) { 506 if (buildCounterSqlresponse < 3) {
507 checkUnnamed3042(o.columns); 507 checkUnnamed2512(o.columns);
508 unittest.expect(o.kind, unittest.equals('foo')); 508 unittest.expect(o.kind, unittest.equals('foo'));
509 checkUnnamed3044(o.rows); 509 checkUnnamed2514(o.rows);
510 } 510 }
511 buildCounterSqlresponse--; 511 buildCounterSqlresponse--;
512 } 512 }
513 513
514 buildUnnamed3045() { 514 buildUnnamed2515() {
515 var o = new core.List<api.Bucket>(); 515 var o = new core.List<api.Bucket>();
516 o.add(buildBucket()); 516 o.add(buildBucket());
517 o.add(buildBucket()); 517 o.add(buildBucket());
518 return o; 518 return o;
519 } 519 }
520 520
521 checkUnnamed3045(core.List<api.Bucket> o) { 521 checkUnnamed2515(core.List<api.Bucket> o) {
522 unittest.expect(o, unittest.hasLength(2)); 522 unittest.expect(o, unittest.hasLength(2));
523 checkBucket(o[0]); 523 checkBucket(o[0]);
524 checkBucket(o[1]); 524 checkBucket(o[1]);
525 } 525 }
526 526
527 core.int buildCounterStyleFunctionGradientColors = 0; 527 core.int buildCounterStyleFunctionGradientColors = 0;
528 buildStyleFunctionGradientColors() { 528 buildStyleFunctionGradientColors() {
529 var o = new api.StyleFunctionGradientColors(); 529 var o = new api.StyleFunctionGradientColors();
530 buildCounterStyleFunctionGradientColors++; 530 buildCounterStyleFunctionGradientColors++;
531 if (buildCounterStyleFunctionGradientColors < 3) { 531 if (buildCounterStyleFunctionGradientColors < 3) {
532 o.color = "foo"; 532 o.color = "foo";
533 o.opacity = 42.0; 533 o.opacity = 42.0;
534 } 534 }
535 buildCounterStyleFunctionGradientColors--; 535 buildCounterStyleFunctionGradientColors--;
536 return o; 536 return o;
537 } 537 }
538 538
539 checkStyleFunctionGradientColors(api.StyleFunctionGradientColors o) { 539 checkStyleFunctionGradientColors(api.StyleFunctionGradientColors o) {
540 buildCounterStyleFunctionGradientColors++; 540 buildCounterStyleFunctionGradientColors++;
541 if (buildCounterStyleFunctionGradientColors < 3) { 541 if (buildCounterStyleFunctionGradientColors < 3) {
542 unittest.expect(o.color, unittest.equals('foo')); 542 unittest.expect(o.color, unittest.equals('foo'));
543 unittest.expect(o.opacity, unittest.equals(42.0)); 543 unittest.expect(o.opacity, unittest.equals(42.0));
544 } 544 }
545 buildCounterStyleFunctionGradientColors--; 545 buildCounterStyleFunctionGradientColors--;
546 } 546 }
547 547
548 buildUnnamed3046() { 548 buildUnnamed2516() {
549 var o = new core.List<api.StyleFunctionGradientColors>(); 549 var o = new core.List<api.StyleFunctionGradientColors>();
550 o.add(buildStyleFunctionGradientColors()); 550 o.add(buildStyleFunctionGradientColors());
551 o.add(buildStyleFunctionGradientColors()); 551 o.add(buildStyleFunctionGradientColors());
552 return o; 552 return o;
553 } 553 }
554 554
555 checkUnnamed3046(core.List<api.StyleFunctionGradientColors> o) { 555 checkUnnamed2516(core.List<api.StyleFunctionGradientColors> o) {
556 unittest.expect(o, unittest.hasLength(2)); 556 unittest.expect(o, unittest.hasLength(2));
557 checkStyleFunctionGradientColors(o[0]); 557 checkStyleFunctionGradientColors(o[0]);
558 checkStyleFunctionGradientColors(o[1]); 558 checkStyleFunctionGradientColors(o[1]);
559 } 559 }
560 560
561 core.int buildCounterStyleFunctionGradient = 0; 561 core.int buildCounterStyleFunctionGradient = 0;
562 buildStyleFunctionGradient() { 562 buildStyleFunctionGradient() {
563 var o = new api.StyleFunctionGradient(); 563 var o = new api.StyleFunctionGradient();
564 buildCounterStyleFunctionGradient++; 564 buildCounterStyleFunctionGradient++;
565 if (buildCounterStyleFunctionGradient < 3) { 565 if (buildCounterStyleFunctionGradient < 3) {
566 o.colors = buildUnnamed3046(); 566 o.colors = buildUnnamed2516();
567 o.max = 42.0; 567 o.max = 42.0;
568 o.min = 42.0; 568 o.min = 42.0;
569 } 569 }
570 buildCounterStyleFunctionGradient--; 570 buildCounterStyleFunctionGradient--;
571 return o; 571 return o;
572 } 572 }
573 573
574 checkStyleFunctionGradient(api.StyleFunctionGradient o) { 574 checkStyleFunctionGradient(api.StyleFunctionGradient o) {
575 buildCounterStyleFunctionGradient++; 575 buildCounterStyleFunctionGradient++;
576 if (buildCounterStyleFunctionGradient < 3) { 576 if (buildCounterStyleFunctionGradient < 3) {
577 checkUnnamed3046(o.colors); 577 checkUnnamed2516(o.colors);
578 unittest.expect(o.max, unittest.equals(42.0)); 578 unittest.expect(o.max, unittest.equals(42.0));
579 unittest.expect(o.min, unittest.equals(42.0)); 579 unittest.expect(o.min, unittest.equals(42.0));
580 } 580 }
581 buildCounterStyleFunctionGradient--; 581 buildCounterStyleFunctionGradient--;
582 } 582 }
583 583
584 core.int buildCounterStyleFunction = 0; 584 core.int buildCounterStyleFunction = 0;
585 buildStyleFunction() { 585 buildStyleFunction() {
586 var o = new api.StyleFunction(); 586 var o = new api.StyleFunction();
587 buildCounterStyleFunction++; 587 buildCounterStyleFunction++;
588 if (buildCounterStyleFunction < 3) { 588 if (buildCounterStyleFunction < 3) {
589 o.buckets = buildUnnamed3045(); 589 o.buckets = buildUnnamed2515();
590 o.columnName = "foo"; 590 o.columnName = "foo";
591 o.gradient = buildStyleFunctionGradient(); 591 o.gradient = buildStyleFunctionGradient();
592 o.kind = "foo"; 592 o.kind = "foo";
593 } 593 }
594 buildCounterStyleFunction--; 594 buildCounterStyleFunction--;
595 return o; 595 return o;
596 } 596 }
597 597
598 checkStyleFunction(api.StyleFunction o) { 598 checkStyleFunction(api.StyleFunction o) {
599 buildCounterStyleFunction++; 599 buildCounterStyleFunction++;
600 if (buildCounterStyleFunction < 3) { 600 if (buildCounterStyleFunction < 3) {
601 checkUnnamed3045(o.buckets); 601 checkUnnamed2515(o.buckets);
602 unittest.expect(o.columnName, unittest.equals('foo')); 602 unittest.expect(o.columnName, unittest.equals('foo'));
603 checkStyleFunctionGradient(o.gradient); 603 checkStyleFunctionGradient(o.gradient);
604 unittest.expect(o.kind, unittest.equals('foo')); 604 unittest.expect(o.kind, unittest.equals('foo'));
605 } 605 }
606 buildCounterStyleFunction--; 606 buildCounterStyleFunction--;
607 } 607 }
608 608
609 core.int buildCounterStyleSetting = 0; 609 core.int buildCounterStyleSetting = 0;
610 buildStyleSetting() { 610 buildStyleSetting() {
611 var o = new api.StyleSetting(); 611 var o = new api.StyleSetting();
(...skipping 18 matching lines...) Expand all
630 checkPointStyle(o.markerOptions); 630 checkPointStyle(o.markerOptions);
631 unittest.expect(o.name, unittest.equals('foo')); 631 unittest.expect(o.name, unittest.equals('foo'));
632 checkPolygonStyle(o.polygonOptions); 632 checkPolygonStyle(o.polygonOptions);
633 checkLineStyle(o.polylineOptions); 633 checkLineStyle(o.polylineOptions);
634 unittest.expect(o.styleId, unittest.equals(42)); 634 unittest.expect(o.styleId, unittest.equals(42));
635 unittest.expect(o.tableId, unittest.equals('foo')); 635 unittest.expect(o.tableId, unittest.equals('foo'));
636 } 636 }
637 buildCounterStyleSetting--; 637 buildCounterStyleSetting--;
638 } 638 }
639 639
640 buildUnnamed3047() { 640 buildUnnamed2517() {
641 var o = new core.List<api.StyleSetting>(); 641 var o = new core.List<api.StyleSetting>();
642 o.add(buildStyleSetting()); 642 o.add(buildStyleSetting());
643 o.add(buildStyleSetting()); 643 o.add(buildStyleSetting());
644 return o; 644 return o;
645 } 645 }
646 646
647 checkUnnamed3047(core.List<api.StyleSetting> o) { 647 checkUnnamed2517(core.List<api.StyleSetting> o) {
648 unittest.expect(o, unittest.hasLength(2)); 648 unittest.expect(o, unittest.hasLength(2));
649 checkStyleSetting(o[0]); 649 checkStyleSetting(o[0]);
650 checkStyleSetting(o[1]); 650 checkStyleSetting(o[1]);
651 } 651 }
652 652
653 core.int buildCounterStyleSettingList = 0; 653 core.int buildCounterStyleSettingList = 0;
654 buildStyleSettingList() { 654 buildStyleSettingList() {
655 var o = new api.StyleSettingList(); 655 var o = new api.StyleSettingList();
656 buildCounterStyleSettingList++; 656 buildCounterStyleSettingList++;
657 if (buildCounterStyleSettingList < 3) { 657 if (buildCounterStyleSettingList < 3) {
658 o.items = buildUnnamed3047(); 658 o.items = buildUnnamed2517();
659 o.kind = "foo"; 659 o.kind = "foo";
660 o.nextPageToken = "foo"; 660 o.nextPageToken = "foo";
661 o.totalItems = 42; 661 o.totalItems = 42;
662 } 662 }
663 buildCounterStyleSettingList--; 663 buildCounterStyleSettingList--;
664 return o; 664 return o;
665 } 665 }
666 666
667 checkStyleSettingList(api.StyleSettingList o) { 667 checkStyleSettingList(api.StyleSettingList o) {
668 buildCounterStyleSettingList++; 668 buildCounterStyleSettingList++;
669 if (buildCounterStyleSettingList < 3) { 669 if (buildCounterStyleSettingList < 3) {
670 checkUnnamed3047(o.items); 670 checkUnnamed2517(o.items);
671 unittest.expect(o.kind, unittest.equals('foo')); 671 unittest.expect(o.kind, unittest.equals('foo'));
672 unittest.expect(o.nextPageToken, unittest.equals('foo')); 672 unittest.expect(o.nextPageToken, unittest.equals('foo'));
673 unittest.expect(o.totalItems, unittest.equals(42)); 673 unittest.expect(o.totalItems, unittest.equals(42));
674 } 674 }
675 buildCounterStyleSettingList--; 675 buildCounterStyleSettingList--;
676 } 676 }
677 677
678 buildUnnamed3048() { 678 buildUnnamed2518() {
679 var o = new core.List<core.String>(); 679 var o = new core.List<core.String>();
680 o.add("foo"); 680 o.add("foo");
681 o.add("foo"); 681 o.add("foo");
682 return o; 682 return o;
683 } 683 }
684 684
685 checkUnnamed3048(core.List<core.String> o) { 685 checkUnnamed2518(core.List<core.String> o) {
686 unittest.expect(o, unittest.hasLength(2)); 686 unittest.expect(o, unittest.hasLength(2));
687 unittest.expect(o[0], unittest.equals('foo')); 687 unittest.expect(o[0], unittest.equals('foo'));
688 unittest.expect(o[1], unittest.equals('foo')); 688 unittest.expect(o[1], unittest.equals('foo'));
689 } 689 }
690 690
691 buildUnnamed3049() { 691 buildUnnamed2519() {
692 var o = new core.List<api.Column>(); 692 var o = new core.List<api.Column>();
693 o.add(buildColumn()); 693 o.add(buildColumn());
694 o.add(buildColumn()); 694 o.add(buildColumn());
695 return o; 695 return o;
696 } 696 }
697 697
698 checkUnnamed3049(core.List<api.Column> o) { 698 checkUnnamed2519(core.List<api.Column> o) {
699 unittest.expect(o, unittest.hasLength(2)); 699 unittest.expect(o, unittest.hasLength(2));
700 checkColumn(o[0]); 700 checkColumn(o[0]);
701 checkColumn(o[1]); 701 checkColumn(o[1]);
702 } 702 }
703 703
704 core.int buildCounterTable = 0; 704 core.int buildCounterTable = 0;
705 buildTable() { 705 buildTable() {
706 var o = new api.Table(); 706 var o = new api.Table();
707 buildCounterTable++; 707 buildCounterTable++;
708 if (buildCounterTable < 3) { 708 if (buildCounterTable < 3) {
709 o.attribution = "foo"; 709 o.attribution = "foo";
710 o.attributionLink = "foo"; 710 o.attributionLink = "foo";
711 o.baseTableIds = buildUnnamed3048(); 711 o.baseTableIds = buildUnnamed2518();
712 o.columns = buildUnnamed3049(); 712 o.columns = buildUnnamed2519();
713 o.description = "foo"; 713 o.description = "foo";
714 o.isExportable = true; 714 o.isExportable = true;
715 o.kind = "foo"; 715 o.kind = "foo";
716 o.name = "foo"; 716 o.name = "foo";
717 o.sql = "foo"; 717 o.sql = "foo";
718 o.tableId = "foo"; 718 o.tableId = "foo";
719 } 719 }
720 buildCounterTable--; 720 buildCounterTable--;
721 return o; 721 return o;
722 } 722 }
723 723
724 checkTable(api.Table o) { 724 checkTable(api.Table o) {
725 buildCounterTable++; 725 buildCounterTable++;
726 if (buildCounterTable < 3) { 726 if (buildCounterTable < 3) {
727 unittest.expect(o.attribution, unittest.equals('foo')); 727 unittest.expect(o.attribution, unittest.equals('foo'));
728 unittest.expect(o.attributionLink, unittest.equals('foo')); 728 unittest.expect(o.attributionLink, unittest.equals('foo'));
729 checkUnnamed3048(o.baseTableIds); 729 checkUnnamed2518(o.baseTableIds);
730 checkUnnamed3049(o.columns); 730 checkUnnamed2519(o.columns);
731 unittest.expect(o.description, unittest.equals('foo')); 731 unittest.expect(o.description, unittest.equals('foo'));
732 unittest.expect(o.isExportable, unittest.isTrue); 732 unittest.expect(o.isExportable, unittest.isTrue);
733 unittest.expect(o.kind, unittest.equals('foo')); 733 unittest.expect(o.kind, unittest.equals('foo'));
734 unittest.expect(o.name, unittest.equals('foo')); 734 unittest.expect(o.name, unittest.equals('foo'));
735 unittest.expect(o.sql, unittest.equals('foo')); 735 unittest.expect(o.sql, unittest.equals('foo'));
736 unittest.expect(o.tableId, unittest.equals('foo')); 736 unittest.expect(o.tableId, unittest.equals('foo'));
737 } 737 }
738 buildCounterTable--; 738 buildCounterTable--;
739 } 739 }
740 740
741 buildUnnamed3050() { 741 buildUnnamed2520() {
742 var o = new core.List<api.Table>(); 742 var o = new core.List<api.Table>();
743 o.add(buildTable()); 743 o.add(buildTable());
744 o.add(buildTable()); 744 o.add(buildTable());
745 return o; 745 return o;
746 } 746 }
747 747
748 checkUnnamed3050(core.List<api.Table> o) { 748 checkUnnamed2520(core.List<api.Table> o) {
749 unittest.expect(o, unittest.hasLength(2)); 749 unittest.expect(o, unittest.hasLength(2));
750 checkTable(o[0]); 750 checkTable(o[0]);
751 checkTable(o[1]); 751 checkTable(o[1]);
752 } 752 }
753 753
754 core.int buildCounterTableList = 0; 754 core.int buildCounterTableList = 0;
755 buildTableList() { 755 buildTableList() {
756 var o = new api.TableList(); 756 var o = new api.TableList();
757 buildCounterTableList++; 757 buildCounterTableList++;
758 if (buildCounterTableList < 3) { 758 if (buildCounterTableList < 3) {
759 o.items = buildUnnamed3050(); 759 o.items = buildUnnamed2520();
760 o.kind = "foo"; 760 o.kind = "foo";
761 o.nextPageToken = "foo"; 761 o.nextPageToken = "foo";
762 } 762 }
763 buildCounterTableList--; 763 buildCounterTableList--;
764 return o; 764 return o;
765 } 765 }
766 766
767 checkTableList(api.TableList o) { 767 checkTableList(api.TableList o) {
768 buildCounterTableList++; 768 buildCounterTableList++;
769 if (buildCounterTableList < 3) { 769 if (buildCounterTableList < 3) {
770 checkUnnamed3050(o.items); 770 checkUnnamed2520(o.items);
771 unittest.expect(o.kind, unittest.equals('foo')); 771 unittest.expect(o.kind, unittest.equals('foo'));
772 unittest.expect(o.nextPageToken, unittest.equals('foo')); 772 unittest.expect(o.nextPageToken, unittest.equals('foo'));
773 } 773 }
774 buildCounterTableList--; 774 buildCounterTableList--;
775 } 775 }
776 776
777 core.int buildCounterTask = 0; 777 core.int buildCounterTask = 0;
778 buildTask() { 778 buildTask() {
779 var o = new api.Task(); 779 var o = new api.Task();
780 buildCounterTask++; 780 buildCounterTask++;
(...skipping 13 matching lines...) Expand all
794 if (buildCounterTask < 3) { 794 if (buildCounterTask < 3) {
795 unittest.expect(o.kind, unittest.equals('foo')); 795 unittest.expect(o.kind, unittest.equals('foo'));
796 unittest.expect(o.progress, unittest.equals('foo')); 796 unittest.expect(o.progress, unittest.equals('foo'));
797 unittest.expect(o.started, unittest.isTrue); 797 unittest.expect(o.started, unittest.isTrue);
798 unittest.expect(o.taskId, unittest.equals('foo')); 798 unittest.expect(o.taskId, unittest.equals('foo'));
799 unittest.expect(o.type, unittest.equals('foo')); 799 unittest.expect(o.type, unittest.equals('foo'));
800 } 800 }
801 buildCounterTask--; 801 buildCounterTask--;
802 } 802 }
803 803
804 buildUnnamed3051() { 804 buildUnnamed2521() {
805 var o = new core.List<api.Task>(); 805 var o = new core.List<api.Task>();
806 o.add(buildTask()); 806 o.add(buildTask());
807 o.add(buildTask()); 807 o.add(buildTask());
808 return o; 808 return o;
809 } 809 }
810 810
811 checkUnnamed3051(core.List<api.Task> o) { 811 checkUnnamed2521(core.List<api.Task> o) {
812 unittest.expect(o, unittest.hasLength(2)); 812 unittest.expect(o, unittest.hasLength(2));
813 checkTask(o[0]); 813 checkTask(o[0]);
814 checkTask(o[1]); 814 checkTask(o[1]);
815 } 815 }
816 816
817 core.int buildCounterTaskList = 0; 817 core.int buildCounterTaskList = 0;
818 buildTaskList() { 818 buildTaskList() {
819 var o = new api.TaskList(); 819 var o = new api.TaskList();
820 buildCounterTaskList++; 820 buildCounterTaskList++;
821 if (buildCounterTaskList < 3) { 821 if (buildCounterTaskList < 3) {
822 o.items = buildUnnamed3051(); 822 o.items = buildUnnamed2521();
823 o.kind = "foo"; 823 o.kind = "foo";
824 o.nextPageToken = "foo"; 824 o.nextPageToken = "foo";
825 o.totalItems = 42; 825 o.totalItems = 42;
826 } 826 }
827 buildCounterTaskList--; 827 buildCounterTaskList--;
828 return o; 828 return o;
829 } 829 }
830 830
831 checkTaskList(api.TaskList o) { 831 checkTaskList(api.TaskList o) {
832 buildCounterTaskList++; 832 buildCounterTaskList++;
833 if (buildCounterTaskList < 3) { 833 if (buildCounterTaskList < 3) {
834 checkUnnamed3051(o.items); 834 checkUnnamed2521(o.items);
835 unittest.expect(o.kind, unittest.equals('foo')); 835 unittest.expect(o.kind, unittest.equals('foo'));
836 unittest.expect(o.nextPageToken, unittest.equals('foo')); 836 unittest.expect(o.nextPageToken, unittest.equals('foo'));
837 unittest.expect(o.totalItems, unittest.equals(42)); 837 unittest.expect(o.totalItems, unittest.equals(42));
838 } 838 }
839 buildCounterTaskList--; 839 buildCounterTaskList--;
840 } 840 }
841 841
842 buildUnnamed3052() { 842 buildUnnamed2522() {
843 var o = new core.List<core.String>(); 843 var o = new core.List<core.String>();
844 o.add("foo"); 844 o.add("foo");
845 o.add("foo"); 845 o.add("foo");
846 return o; 846 return o;
847 } 847 }
848 848
849 checkUnnamed3052(core.List<core.String> o) { 849 checkUnnamed2522(core.List<core.String> o) {
850 unittest.expect(o, unittest.hasLength(2)); 850 unittest.expect(o, unittest.hasLength(2));
851 unittest.expect(o[0], unittest.equals('foo')); 851 unittest.expect(o[0], unittest.equals('foo'));
852 unittest.expect(o[1], unittest.equals('foo')); 852 unittest.expect(o[1], unittest.equals('foo'));
853 } 853 }
854 854
855 core.int buildCounterTemplate = 0; 855 core.int buildCounterTemplate = 0;
856 buildTemplate() { 856 buildTemplate() {
857 var o = new api.Template(); 857 var o = new api.Template();
858 buildCounterTemplate++; 858 buildCounterTemplate++;
859 if (buildCounterTemplate < 3) { 859 if (buildCounterTemplate < 3) {
860 o.automaticColumnNames = buildUnnamed3052(); 860 o.automaticColumnNames = buildUnnamed2522();
861 o.body = "foo"; 861 o.body = "foo";
862 o.kind = "foo"; 862 o.kind = "foo";
863 o.name = "foo"; 863 o.name = "foo";
864 o.tableId = "foo"; 864 o.tableId = "foo";
865 o.templateId = 42; 865 o.templateId = 42;
866 } 866 }
867 buildCounterTemplate--; 867 buildCounterTemplate--;
868 return o; 868 return o;
869 } 869 }
870 870
871 checkTemplate(api.Template o) { 871 checkTemplate(api.Template o) {
872 buildCounterTemplate++; 872 buildCounterTemplate++;
873 if (buildCounterTemplate < 3) { 873 if (buildCounterTemplate < 3) {
874 checkUnnamed3052(o.automaticColumnNames); 874 checkUnnamed2522(o.automaticColumnNames);
875 unittest.expect(o.body, unittest.equals('foo')); 875 unittest.expect(o.body, unittest.equals('foo'));
876 unittest.expect(o.kind, unittest.equals('foo')); 876 unittest.expect(o.kind, unittest.equals('foo'));
877 unittest.expect(o.name, unittest.equals('foo')); 877 unittest.expect(o.name, unittest.equals('foo'));
878 unittest.expect(o.tableId, unittest.equals('foo')); 878 unittest.expect(o.tableId, unittest.equals('foo'));
879 unittest.expect(o.templateId, unittest.equals(42)); 879 unittest.expect(o.templateId, unittest.equals(42));
880 } 880 }
881 buildCounterTemplate--; 881 buildCounterTemplate--;
882 } 882 }
883 883
884 buildUnnamed3053() { 884 buildUnnamed2523() {
885 var o = new core.List<api.Template>(); 885 var o = new core.List<api.Template>();
886 o.add(buildTemplate()); 886 o.add(buildTemplate());
887 o.add(buildTemplate()); 887 o.add(buildTemplate());
888 return o; 888 return o;
889 } 889 }
890 890
891 checkUnnamed3053(core.List<api.Template> o) { 891 checkUnnamed2523(core.List<api.Template> o) {
892 unittest.expect(o, unittest.hasLength(2)); 892 unittest.expect(o, unittest.hasLength(2));
893 checkTemplate(o[0]); 893 checkTemplate(o[0]);
894 checkTemplate(o[1]); 894 checkTemplate(o[1]);
895 } 895 }
896 896
897 core.int buildCounterTemplateList = 0; 897 core.int buildCounterTemplateList = 0;
898 buildTemplateList() { 898 buildTemplateList() {
899 var o = new api.TemplateList(); 899 var o = new api.TemplateList();
900 buildCounterTemplateList++; 900 buildCounterTemplateList++;
901 if (buildCounterTemplateList < 3) { 901 if (buildCounterTemplateList < 3) {
902 o.items = buildUnnamed3053(); 902 o.items = buildUnnamed2523();
903 o.kind = "foo"; 903 o.kind = "foo";
904 o.nextPageToken = "foo"; 904 o.nextPageToken = "foo";
905 o.totalItems = 42; 905 o.totalItems = 42;
906 } 906 }
907 buildCounterTemplateList--; 907 buildCounterTemplateList--;
908 return o; 908 return o;
909 } 909 }
910 910
911 checkTemplateList(api.TemplateList o) { 911 checkTemplateList(api.TemplateList o) {
912 buildCounterTemplateList++; 912 buildCounterTemplateList++;
913 if (buildCounterTemplateList < 3) { 913 if (buildCounterTemplateList < 3) {
914 checkUnnamed3053(o.items); 914 checkUnnamed2523(o.items);
915 unittest.expect(o.kind, unittest.equals('foo')); 915 unittest.expect(o.kind, unittest.equals('foo'));
916 unittest.expect(o.nextPageToken, unittest.equals('foo')); 916 unittest.expect(o.nextPageToken, unittest.equals('foo'));
917 unittest.expect(o.totalItems, unittest.equals(42)); 917 unittest.expect(o.totalItems, unittest.equals(42));
918 } 918 }
919 buildCounterTemplateList--; 919 buildCounterTemplateList--;
920 } 920 }
921 921
922 922
923 main() { 923 main() {
924 unittest.group("obj-schema-Bucket", () { 924 unittest.group("obj-schema-Bucket", () {
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
1137 }); 1137 });
1138 1138
1139 1139
1140 unittest.group("resource-ColumnResourceApi", () { 1140 unittest.group("resource-ColumnResourceApi", () {
1141 unittest.test("method--delete", () { 1141 unittest.test("method--delete", () {
1142 1142
1143 var mock = new HttpServerMock(); 1143 var mock = new HttpServerMock();
1144 api.ColumnResourceApi res = new api.FusiontablesApi(mock).column; 1144 api.ColumnResourceApi res = new api.FusiontablesApi(mock).column;
1145 var arg_tableId = "foo"; 1145 var arg_tableId = "foo";
1146 var arg_columnId = "foo"; 1146 var arg_columnId = "foo";
1147 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 1147 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
1148 var path = (req.url).path; 1148 var path = (req.url).path;
1149 var pathOffset = 0; 1149 var pathOffset = 0;
1150 var index; 1150 var index;
1151 var subPart; 1151 var subPart;
1152 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 1152 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
1153 pathOffset += 1; 1153 pathOffset += 1;
1154 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("fusiontables/v1/")); 1154 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("fusiontables/v1/"));
1155 pathOffset += 16; 1155 pathOffset += 16;
1156 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ als("tables/")); 1156 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ als("tables/"));
1157 pathOffset += 7; 1157 pathOffset += 7;
(...skipping 25 matching lines...) Expand all
1183 } 1183 }
1184 } 1184 }
1185 1185
1186 1186
1187 var h = { 1187 var h = {
1188 "content-type" : "application/json; charset=utf-8", 1188 "content-type" : "application/json; charset=utf-8",
1189 }; 1189 };
1190 var resp = ""; 1190 var resp = "";
1191 return new async.Future.value(stringResponse(200, h, resp)); 1191 return new async.Future.value(stringResponse(200, h, resp));
1192 }), true); 1192 }), true);
1193 res.delete(arg_tableId, arg_columnId).then(unittest.expectAsync((_) {})); 1193 res.delete(arg_tableId, arg_columnId).then(unittest.expectAsync1((_) {}));
1194 }); 1194 });
1195 1195
1196 unittest.test("method--get", () { 1196 unittest.test("method--get", () {
1197 1197
1198 var mock = new HttpServerMock(); 1198 var mock = new HttpServerMock();
1199 api.ColumnResourceApi res = new api.FusiontablesApi(mock).column; 1199 api.ColumnResourceApi res = new api.FusiontablesApi(mock).column;
1200 var arg_tableId = "foo"; 1200 var arg_tableId = "foo";
1201 var arg_columnId = "foo"; 1201 var arg_columnId = "foo";
1202 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 1202 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
1203 var path = (req.url).path; 1203 var path = (req.url).path;
1204 var pathOffset = 0; 1204 var pathOffset = 0;
1205 var index; 1205 var index;
1206 var subPart; 1206 var subPart;
1207 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 1207 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
1208 pathOffset += 1; 1208 pathOffset += 1;
1209 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("fusiontables/v1/")); 1209 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("fusiontables/v1/"));
1210 pathOffset += 16; 1210 pathOffset += 16;
1211 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ als("tables/")); 1211 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ als("tables/"));
1212 pathOffset += 7; 1212 pathOffset += 7;
(...skipping 25 matching lines...) Expand all
1238 } 1238 }
1239 } 1239 }
1240 1240
1241 1241
1242 var h = { 1242 var h = {
1243 "content-type" : "application/json; charset=utf-8", 1243 "content-type" : "application/json; charset=utf-8",
1244 }; 1244 };
1245 var resp = convert.JSON.encode(buildColumn()); 1245 var resp = convert.JSON.encode(buildColumn());
1246 return new async.Future.value(stringResponse(200, h, resp)); 1246 return new async.Future.value(stringResponse(200, h, resp));
1247 }), true); 1247 }), true);
1248 res.get(arg_tableId, arg_columnId).then(unittest.expectAsync(((api.Column response) { 1248 res.get(arg_tableId, arg_columnId).then(unittest.expectAsync1(((api.Column response) {
1249 checkColumn(response); 1249 checkColumn(response);
1250 }))); 1250 })));
1251 }); 1251 });
1252 1252
1253 unittest.test("method--insert", () { 1253 unittest.test("method--insert", () {
1254 1254
1255 var mock = new HttpServerMock(); 1255 var mock = new HttpServerMock();
1256 api.ColumnResourceApi res = new api.FusiontablesApi(mock).column; 1256 api.ColumnResourceApi res = new api.FusiontablesApi(mock).column;
1257 var arg_request = buildColumn(); 1257 var arg_request = buildColumn();
1258 var arg_tableId = "foo"; 1258 var arg_tableId = "foo";
1259 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 1259 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
1260 var obj = new api.Column.fromJson(json); 1260 var obj = new api.Column.fromJson(json);
1261 checkColumn(obj); 1261 checkColumn(obj);
1262 1262
1263 var path = (req.url).path; 1263 var path = (req.url).path;
1264 var pathOffset = 0; 1264 var pathOffset = 0;
1265 var index; 1265 var index;
1266 var subPart; 1266 var subPart;
1267 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 1267 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
1268 pathOffset += 1; 1268 pathOffset += 1;
1269 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("fusiontables/v1/")); 1269 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("fusiontables/v1/"));
(...skipping 25 matching lines...) Expand all
1295 } 1295 }
1296 } 1296 }
1297 1297
1298 1298
1299 var h = { 1299 var h = {
1300 "content-type" : "application/json; charset=utf-8", 1300 "content-type" : "application/json; charset=utf-8",
1301 }; 1301 };
1302 var resp = convert.JSON.encode(buildColumn()); 1302 var resp = convert.JSON.encode(buildColumn());
1303 return new async.Future.value(stringResponse(200, h, resp)); 1303 return new async.Future.value(stringResponse(200, h, resp));
1304 }), true); 1304 }), true);
1305 res.insert(arg_request, arg_tableId).then(unittest.expectAsync(((api.Colum n response) { 1305 res.insert(arg_request, arg_tableId).then(unittest.expectAsync1(((api.Colu mn response) {
1306 checkColumn(response); 1306 checkColumn(response);
1307 }))); 1307 })));
1308 }); 1308 });
1309 1309
1310 unittest.test("method--list", () { 1310 unittest.test("method--list", () {
1311 1311
1312 var mock = new HttpServerMock(); 1312 var mock = new HttpServerMock();
1313 api.ColumnResourceApi res = new api.FusiontablesApi(mock).column; 1313 api.ColumnResourceApi res = new api.FusiontablesApi(mock).column;
1314 var arg_tableId = "foo"; 1314 var arg_tableId = "foo";
1315 var arg_maxResults = 42; 1315 var arg_maxResults = 42;
1316 var arg_pageToken = "foo"; 1316 var arg_pageToken = "foo";
1317 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 1317 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
1318 var path = (req.url).path; 1318 var path = (req.url).path;
1319 var pathOffset = 0; 1319 var pathOffset = 0;
1320 var index; 1320 var index;
1321 var subPart; 1321 var subPart;
1322 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 1322 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
1323 pathOffset += 1; 1323 pathOffset += 1;
1324 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("fusiontables/v1/")); 1324 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("fusiontables/v1/"));
1325 pathOffset += 16; 1325 pathOffset += 16;
1326 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ als("tables/")); 1326 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ als("tables/"));
1327 pathOffset += 7; 1327 pathOffset += 7;
(...skipping 24 matching lines...) Expand all
1352 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e quals(arg_maxResults)); 1352 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e quals(arg_maxResults));
1353 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en)); 1353 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en));
1354 1354
1355 1355
1356 var h = { 1356 var h = {
1357 "content-type" : "application/json; charset=utf-8", 1357 "content-type" : "application/json; charset=utf-8",
1358 }; 1358 };
1359 var resp = convert.JSON.encode(buildColumnList()); 1359 var resp = convert.JSON.encode(buildColumnList());
1360 return new async.Future.value(stringResponse(200, h, resp)); 1360 return new async.Future.value(stringResponse(200, h, resp));
1361 }), true); 1361 }), true);
1362 res.list(arg_tableId, maxResults: arg_maxResults, pageToken: arg_pageToken ).then(unittest.expectAsync(((api.ColumnList response) { 1362 res.list(arg_tableId, maxResults: arg_maxResults, pageToken: arg_pageToken ).then(unittest.expectAsync1(((api.ColumnList response) {
1363 checkColumnList(response); 1363 checkColumnList(response);
1364 }))); 1364 })));
1365 }); 1365 });
1366 1366
1367 unittest.test("method--patch", () { 1367 unittest.test("method--patch", () {
1368 1368
1369 var mock = new HttpServerMock(); 1369 var mock = new HttpServerMock();
1370 api.ColumnResourceApi res = new api.FusiontablesApi(mock).column; 1370 api.ColumnResourceApi res = new api.FusiontablesApi(mock).column;
1371 var arg_request = buildColumn(); 1371 var arg_request = buildColumn();
1372 var arg_tableId = "foo"; 1372 var arg_tableId = "foo";
1373 var arg_columnId = "foo"; 1373 var arg_columnId = "foo";
1374 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 1374 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
1375 var obj = new api.Column.fromJson(json); 1375 var obj = new api.Column.fromJson(json);
1376 checkColumn(obj); 1376 checkColumn(obj);
1377 1377
1378 var path = (req.url).path; 1378 var path = (req.url).path;
1379 var pathOffset = 0; 1379 var pathOffset = 0;
1380 var index; 1380 var index;
1381 var subPart; 1381 var subPart;
1382 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 1382 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
1383 pathOffset += 1; 1383 pathOffset += 1;
1384 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("fusiontables/v1/")); 1384 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("fusiontables/v1/"));
(...skipping 28 matching lines...) Expand all
1413 } 1413 }
1414 } 1414 }
1415 1415
1416 1416
1417 var h = { 1417 var h = {
1418 "content-type" : "application/json; charset=utf-8", 1418 "content-type" : "application/json; charset=utf-8",
1419 }; 1419 };
1420 var resp = convert.JSON.encode(buildColumn()); 1420 var resp = convert.JSON.encode(buildColumn());
1421 return new async.Future.value(stringResponse(200, h, resp)); 1421 return new async.Future.value(stringResponse(200, h, resp));
1422 }), true); 1422 }), true);
1423 res.patch(arg_request, arg_tableId, arg_columnId).then(unittest.expectAsyn c(((api.Column response) { 1423 res.patch(arg_request, arg_tableId, arg_columnId).then(unittest.expectAsyn c1(((api.Column response) {
1424 checkColumn(response); 1424 checkColumn(response);
1425 }))); 1425 })));
1426 }); 1426 });
1427 1427
1428 unittest.test("method--update", () { 1428 unittest.test("method--update", () {
1429 1429
1430 var mock = new HttpServerMock(); 1430 var mock = new HttpServerMock();
1431 api.ColumnResourceApi res = new api.FusiontablesApi(mock).column; 1431 api.ColumnResourceApi res = new api.FusiontablesApi(mock).column;
1432 var arg_request = buildColumn(); 1432 var arg_request = buildColumn();
1433 var arg_tableId = "foo"; 1433 var arg_tableId = "foo";
1434 var arg_columnId = "foo"; 1434 var arg_columnId = "foo";
1435 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 1435 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
1436 var obj = new api.Column.fromJson(json); 1436 var obj = new api.Column.fromJson(json);
1437 checkColumn(obj); 1437 checkColumn(obj);
1438 1438
1439 var path = (req.url).path; 1439 var path = (req.url).path;
1440 var pathOffset = 0; 1440 var pathOffset = 0;
1441 var index; 1441 var index;
1442 var subPart; 1442 var subPart;
1443 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 1443 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
1444 pathOffset += 1; 1444 pathOffset += 1;
1445 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("fusiontables/v1/")); 1445 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("fusiontables/v1/"));
(...skipping 28 matching lines...) Expand all
1474 } 1474 }
1475 } 1475 }
1476 1476
1477 1477
1478 var h = { 1478 var h = {
1479 "content-type" : "application/json; charset=utf-8", 1479 "content-type" : "application/json; charset=utf-8",
1480 }; 1480 };
1481 var resp = convert.JSON.encode(buildColumn()); 1481 var resp = convert.JSON.encode(buildColumn());
1482 return new async.Future.value(stringResponse(200, h, resp)); 1482 return new async.Future.value(stringResponse(200, h, resp));
1483 }), true); 1483 }), true);
1484 res.update(arg_request, arg_tableId, arg_columnId).then(unittest.expectAsy nc(((api.Column response) { 1484 res.update(arg_request, arg_tableId, arg_columnId).then(unittest.expectAsy nc1(((api.Column response) {
1485 checkColumn(response); 1485 checkColumn(response);
1486 }))); 1486 })));
1487 }); 1487 });
1488 1488
1489 }); 1489 });
1490 1490
1491 1491
1492 unittest.group("resource-QueryResourceApi", () { 1492 unittest.group("resource-QueryResourceApi", () {
1493 unittest.test("method--sql", () { 1493 unittest.test("method--sql", () {
1494 // TODO: Implement tests for media upload; 1494 // TODO: Implement tests for media upload;
1495 // TODO: Implement tests for media download; 1495 // TODO: Implement tests for media download;
1496 1496
1497 var mock = new HttpServerMock(); 1497 var mock = new HttpServerMock();
1498 api.QueryResourceApi res = new api.FusiontablesApi(mock).query; 1498 api.QueryResourceApi res = new api.FusiontablesApi(mock).query;
1499 var arg_sql_1 = "foo"; 1499 var arg_sql_1 = "foo";
1500 var arg_hdrs = true; 1500 var arg_hdrs = true;
1501 var arg_typed = true; 1501 var arg_typed = true;
1502 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 1502 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
1503 var path = (req.url).path; 1503 var path = (req.url).path;
1504 var pathOffset = 0; 1504 var pathOffset = 0;
1505 var index; 1505 var index;
1506 var subPart; 1506 var subPart;
1507 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 1507 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
1508 pathOffset += 1; 1508 pathOffset += 1;
1509 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("fusiontables/v1/")); 1509 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("fusiontables/v1/"));
1510 pathOffset += 16; 1510 pathOffset += 16;
1511 unittest.expect(path.substring(pathOffset, pathOffset + 5), unittest.equ als("query")); 1511 unittest.expect(path.substring(pathOffset, pathOffset + 5), unittest.equ als("query"));
1512 pathOffset += 5; 1512 pathOffset += 5;
(...skipping 18 matching lines...) Expand all
1531 unittest.expect(queryMap["hdrs"].first, unittest.equals("$arg_hdrs")); 1531 unittest.expect(queryMap["hdrs"].first, unittest.equals("$arg_hdrs"));
1532 unittest.expect(queryMap["typed"].first, unittest.equals("$arg_typed")); 1532 unittest.expect(queryMap["typed"].first, unittest.equals("$arg_typed"));
1533 1533
1534 1534
1535 var h = { 1535 var h = {
1536 "content-type" : "application/json; charset=utf-8", 1536 "content-type" : "application/json; charset=utf-8",
1537 }; 1537 };
1538 var resp = convert.JSON.encode(buildSqlresponse()); 1538 var resp = convert.JSON.encode(buildSqlresponse());
1539 return new async.Future.value(stringResponse(200, h, resp)); 1539 return new async.Future.value(stringResponse(200, h, resp));
1540 }), true); 1540 }), true);
1541 res.sql(arg_sql_1, hdrs: arg_hdrs, typed: arg_typed).then(unittest.expectA sync(((api.Sqlresponse response) { 1541 res.sql(arg_sql_1, hdrs: arg_hdrs, typed: arg_typed).then(unittest.expectA sync1(((api.Sqlresponse response) {
1542 checkSqlresponse(response); 1542 checkSqlresponse(response);
1543 }))); 1543 })));
1544 }); 1544 });
1545 1545
1546 unittest.test("method--sqlGet", () { 1546 unittest.test("method--sqlGet", () {
1547 // TODO: Implement tests for media upload; 1547 // TODO: Implement tests for media upload;
1548 // TODO: Implement tests for media download; 1548 // TODO: Implement tests for media download;
1549 1549
1550 var mock = new HttpServerMock(); 1550 var mock = new HttpServerMock();
1551 api.QueryResourceApi res = new api.FusiontablesApi(mock).query; 1551 api.QueryResourceApi res = new api.FusiontablesApi(mock).query;
1552 var arg_sql_1 = "foo"; 1552 var arg_sql_1 = "foo";
1553 var arg_hdrs = true; 1553 var arg_hdrs = true;
1554 var arg_typed = true; 1554 var arg_typed = true;
1555 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 1555 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
1556 var path = (req.url).path; 1556 var path = (req.url).path;
1557 var pathOffset = 0; 1557 var pathOffset = 0;
1558 var index; 1558 var index;
1559 var subPart; 1559 var subPart;
1560 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 1560 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
1561 pathOffset += 1; 1561 pathOffset += 1;
1562 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("fusiontables/v1/")); 1562 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("fusiontables/v1/"));
1563 pathOffset += 16; 1563 pathOffset += 16;
1564 unittest.expect(path.substring(pathOffset, pathOffset + 5), unittest.equ als("query")); 1564 unittest.expect(path.substring(pathOffset, pathOffset + 5), unittest.equ als("query"));
1565 pathOffset += 5; 1565 pathOffset += 5;
(...skipping 18 matching lines...) Expand all
1584 unittest.expect(queryMap["hdrs"].first, unittest.equals("$arg_hdrs")); 1584 unittest.expect(queryMap["hdrs"].first, unittest.equals("$arg_hdrs"));
1585 unittest.expect(queryMap["typed"].first, unittest.equals("$arg_typed")); 1585 unittest.expect(queryMap["typed"].first, unittest.equals("$arg_typed"));
1586 1586
1587 1587
1588 var h = { 1588 var h = {
1589 "content-type" : "application/json; charset=utf-8", 1589 "content-type" : "application/json; charset=utf-8",
1590 }; 1590 };
1591 var resp = convert.JSON.encode(buildSqlresponse()); 1591 var resp = convert.JSON.encode(buildSqlresponse());
1592 return new async.Future.value(stringResponse(200, h, resp)); 1592 return new async.Future.value(stringResponse(200, h, resp));
1593 }), true); 1593 }), true);
1594 res.sqlGet(arg_sql_1, hdrs: arg_hdrs, typed: arg_typed).then(unittest.expe ctAsync(((api.Sqlresponse response) { 1594 res.sqlGet(arg_sql_1, hdrs: arg_hdrs, typed: arg_typed).then(unittest.expe ctAsync1(((api.Sqlresponse response) {
1595 checkSqlresponse(response); 1595 checkSqlresponse(response);
1596 }))); 1596 })));
1597 }); 1597 });
1598 1598
1599 }); 1599 });
1600 1600
1601 1601
1602 unittest.group("resource-StyleResourceApi", () { 1602 unittest.group("resource-StyleResourceApi", () {
1603 unittest.test("method--delete", () { 1603 unittest.test("method--delete", () {
1604 1604
1605 var mock = new HttpServerMock(); 1605 var mock = new HttpServerMock();
1606 api.StyleResourceApi res = new api.FusiontablesApi(mock).style; 1606 api.StyleResourceApi res = new api.FusiontablesApi(mock).style;
1607 var arg_tableId = "foo"; 1607 var arg_tableId = "foo";
1608 var arg_styleId = 42; 1608 var arg_styleId = 42;
1609 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 1609 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
1610 var path = (req.url).path; 1610 var path = (req.url).path;
1611 var pathOffset = 0; 1611 var pathOffset = 0;
1612 var index; 1612 var index;
1613 var subPart; 1613 var subPart;
1614 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 1614 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
1615 pathOffset += 1; 1615 pathOffset += 1;
1616 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("fusiontables/v1/")); 1616 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("fusiontables/v1/"));
1617 pathOffset += 16; 1617 pathOffset += 16;
1618 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ als("tables/")); 1618 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ als("tables/"));
1619 pathOffset += 7; 1619 pathOffset += 7;
(...skipping 25 matching lines...) Expand all
1645 } 1645 }
1646 } 1646 }
1647 1647
1648 1648
1649 var h = { 1649 var h = {
1650 "content-type" : "application/json; charset=utf-8", 1650 "content-type" : "application/json; charset=utf-8",
1651 }; 1651 };
1652 var resp = ""; 1652 var resp = "";
1653 return new async.Future.value(stringResponse(200, h, resp)); 1653 return new async.Future.value(stringResponse(200, h, resp));
1654 }), true); 1654 }), true);
1655 res.delete(arg_tableId, arg_styleId).then(unittest.expectAsync((_) {})); 1655 res.delete(arg_tableId, arg_styleId).then(unittest.expectAsync1((_) {}));
1656 }); 1656 });
1657 1657
1658 unittest.test("method--get", () { 1658 unittest.test("method--get", () {
1659 1659
1660 var mock = new HttpServerMock(); 1660 var mock = new HttpServerMock();
1661 api.StyleResourceApi res = new api.FusiontablesApi(mock).style; 1661 api.StyleResourceApi res = new api.FusiontablesApi(mock).style;
1662 var arg_tableId = "foo"; 1662 var arg_tableId = "foo";
1663 var arg_styleId = 42; 1663 var arg_styleId = 42;
1664 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 1664 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
1665 var path = (req.url).path; 1665 var path = (req.url).path;
1666 var pathOffset = 0; 1666 var pathOffset = 0;
1667 var index; 1667 var index;
1668 var subPart; 1668 var subPart;
1669 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 1669 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
1670 pathOffset += 1; 1670 pathOffset += 1;
1671 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("fusiontables/v1/")); 1671 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("fusiontables/v1/"));
1672 pathOffset += 16; 1672 pathOffset += 16;
1673 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ als("tables/")); 1673 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ als("tables/"));
1674 pathOffset += 7; 1674 pathOffset += 7;
(...skipping 25 matching lines...) Expand all
1700 } 1700 }
1701 } 1701 }
1702 1702
1703 1703
1704 var h = { 1704 var h = {
1705 "content-type" : "application/json; charset=utf-8", 1705 "content-type" : "application/json; charset=utf-8",
1706 }; 1706 };
1707 var resp = convert.JSON.encode(buildStyleSetting()); 1707 var resp = convert.JSON.encode(buildStyleSetting());
1708 return new async.Future.value(stringResponse(200, h, resp)); 1708 return new async.Future.value(stringResponse(200, h, resp));
1709 }), true); 1709 }), true);
1710 res.get(arg_tableId, arg_styleId).then(unittest.expectAsync(((api.StyleSet ting response) { 1710 res.get(arg_tableId, arg_styleId).then(unittest.expectAsync1(((api.StyleSe tting response) {
1711 checkStyleSetting(response); 1711 checkStyleSetting(response);
1712 }))); 1712 })));
1713 }); 1713 });
1714 1714
1715 unittest.test("method--insert", () { 1715 unittest.test("method--insert", () {
1716 1716
1717 var mock = new HttpServerMock(); 1717 var mock = new HttpServerMock();
1718 api.StyleResourceApi res = new api.FusiontablesApi(mock).style; 1718 api.StyleResourceApi res = new api.FusiontablesApi(mock).style;
1719 var arg_request = buildStyleSetting(); 1719 var arg_request = buildStyleSetting();
1720 var arg_tableId = "foo"; 1720 var arg_tableId = "foo";
1721 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 1721 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
1722 var obj = new api.StyleSetting.fromJson(json); 1722 var obj = new api.StyleSetting.fromJson(json);
1723 checkStyleSetting(obj); 1723 checkStyleSetting(obj);
1724 1724
1725 var path = (req.url).path; 1725 var path = (req.url).path;
1726 var pathOffset = 0; 1726 var pathOffset = 0;
1727 var index; 1727 var index;
1728 var subPart; 1728 var subPart;
1729 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 1729 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
1730 pathOffset += 1; 1730 pathOffset += 1;
1731 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("fusiontables/v1/")); 1731 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("fusiontables/v1/"));
(...skipping 25 matching lines...) Expand all
1757 } 1757 }
1758 } 1758 }
1759 1759
1760 1760
1761 var h = { 1761 var h = {
1762 "content-type" : "application/json; charset=utf-8", 1762 "content-type" : "application/json; charset=utf-8",
1763 }; 1763 };
1764 var resp = convert.JSON.encode(buildStyleSetting()); 1764 var resp = convert.JSON.encode(buildStyleSetting());
1765 return new async.Future.value(stringResponse(200, h, resp)); 1765 return new async.Future.value(stringResponse(200, h, resp));
1766 }), true); 1766 }), true);
1767 res.insert(arg_request, arg_tableId).then(unittest.expectAsync(((api.Style Setting response) { 1767 res.insert(arg_request, arg_tableId).then(unittest.expectAsync1(((api.Styl eSetting response) {
1768 checkStyleSetting(response); 1768 checkStyleSetting(response);
1769 }))); 1769 })));
1770 }); 1770 });
1771 1771
1772 unittest.test("method--list", () { 1772 unittest.test("method--list", () {
1773 1773
1774 var mock = new HttpServerMock(); 1774 var mock = new HttpServerMock();
1775 api.StyleResourceApi res = new api.FusiontablesApi(mock).style; 1775 api.StyleResourceApi res = new api.FusiontablesApi(mock).style;
1776 var arg_tableId = "foo"; 1776 var arg_tableId = "foo";
1777 var arg_maxResults = 42; 1777 var arg_maxResults = 42;
1778 var arg_pageToken = "foo"; 1778 var arg_pageToken = "foo";
1779 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 1779 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
1780 var path = (req.url).path; 1780 var path = (req.url).path;
1781 var pathOffset = 0; 1781 var pathOffset = 0;
1782 var index; 1782 var index;
1783 var subPart; 1783 var subPart;
1784 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 1784 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
1785 pathOffset += 1; 1785 pathOffset += 1;
1786 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("fusiontables/v1/")); 1786 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("fusiontables/v1/"));
1787 pathOffset += 16; 1787 pathOffset += 16;
1788 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ als("tables/")); 1788 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ als("tables/"));
1789 pathOffset += 7; 1789 pathOffset += 7;
(...skipping 24 matching lines...) Expand all
1814 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e quals(arg_maxResults)); 1814 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e quals(arg_maxResults));
1815 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en)); 1815 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en));
1816 1816
1817 1817
1818 var h = { 1818 var h = {
1819 "content-type" : "application/json; charset=utf-8", 1819 "content-type" : "application/json; charset=utf-8",
1820 }; 1820 };
1821 var resp = convert.JSON.encode(buildStyleSettingList()); 1821 var resp = convert.JSON.encode(buildStyleSettingList());
1822 return new async.Future.value(stringResponse(200, h, resp)); 1822 return new async.Future.value(stringResponse(200, h, resp));
1823 }), true); 1823 }), true);
1824 res.list(arg_tableId, maxResults: arg_maxResults, pageToken: arg_pageToken ).then(unittest.expectAsync(((api.StyleSettingList response) { 1824 res.list(arg_tableId, maxResults: arg_maxResults, pageToken: arg_pageToken ).then(unittest.expectAsync1(((api.StyleSettingList response) {
1825 checkStyleSettingList(response); 1825 checkStyleSettingList(response);
1826 }))); 1826 })));
1827 }); 1827 });
1828 1828
1829 unittest.test("method--patch", () { 1829 unittest.test("method--patch", () {
1830 1830
1831 var mock = new HttpServerMock(); 1831 var mock = new HttpServerMock();
1832 api.StyleResourceApi res = new api.FusiontablesApi(mock).style; 1832 api.StyleResourceApi res = new api.FusiontablesApi(mock).style;
1833 var arg_request = buildStyleSetting(); 1833 var arg_request = buildStyleSetting();
1834 var arg_tableId = "foo"; 1834 var arg_tableId = "foo";
1835 var arg_styleId = 42; 1835 var arg_styleId = 42;
1836 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 1836 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
1837 var obj = new api.StyleSetting.fromJson(json); 1837 var obj = new api.StyleSetting.fromJson(json);
1838 checkStyleSetting(obj); 1838 checkStyleSetting(obj);
1839 1839
1840 var path = (req.url).path; 1840 var path = (req.url).path;
1841 var pathOffset = 0; 1841 var pathOffset = 0;
1842 var index; 1842 var index;
1843 var subPart; 1843 var subPart;
1844 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 1844 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
1845 pathOffset += 1; 1845 pathOffset += 1;
1846 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("fusiontables/v1/")); 1846 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("fusiontables/v1/"));
(...skipping 28 matching lines...) Expand all
1875 } 1875 }
1876 } 1876 }
1877 1877
1878 1878
1879 var h = { 1879 var h = {
1880 "content-type" : "application/json; charset=utf-8", 1880 "content-type" : "application/json; charset=utf-8",
1881 }; 1881 };
1882 var resp = convert.JSON.encode(buildStyleSetting()); 1882 var resp = convert.JSON.encode(buildStyleSetting());
1883 return new async.Future.value(stringResponse(200, h, resp)); 1883 return new async.Future.value(stringResponse(200, h, resp));
1884 }), true); 1884 }), true);
1885 res.patch(arg_request, arg_tableId, arg_styleId).then(unittest.expectAsync (((api.StyleSetting response) { 1885 res.patch(arg_request, arg_tableId, arg_styleId).then(unittest.expectAsync 1(((api.StyleSetting response) {
1886 checkStyleSetting(response); 1886 checkStyleSetting(response);
1887 }))); 1887 })));
1888 }); 1888 });
1889 1889
1890 unittest.test("method--update", () { 1890 unittest.test("method--update", () {
1891 1891
1892 var mock = new HttpServerMock(); 1892 var mock = new HttpServerMock();
1893 api.StyleResourceApi res = new api.FusiontablesApi(mock).style; 1893 api.StyleResourceApi res = new api.FusiontablesApi(mock).style;
1894 var arg_request = buildStyleSetting(); 1894 var arg_request = buildStyleSetting();
1895 var arg_tableId = "foo"; 1895 var arg_tableId = "foo";
1896 var arg_styleId = 42; 1896 var arg_styleId = 42;
1897 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 1897 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
1898 var obj = new api.StyleSetting.fromJson(json); 1898 var obj = new api.StyleSetting.fromJson(json);
1899 checkStyleSetting(obj); 1899 checkStyleSetting(obj);
1900 1900
1901 var path = (req.url).path; 1901 var path = (req.url).path;
1902 var pathOffset = 0; 1902 var pathOffset = 0;
1903 var index; 1903 var index;
1904 var subPart; 1904 var subPart;
1905 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 1905 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
1906 pathOffset += 1; 1906 pathOffset += 1;
1907 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("fusiontables/v1/")); 1907 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("fusiontables/v1/"));
(...skipping 28 matching lines...) Expand all
1936 } 1936 }
1937 } 1937 }
1938 1938
1939 1939
1940 var h = { 1940 var h = {
1941 "content-type" : "application/json; charset=utf-8", 1941 "content-type" : "application/json; charset=utf-8",
1942 }; 1942 };
1943 var resp = convert.JSON.encode(buildStyleSetting()); 1943 var resp = convert.JSON.encode(buildStyleSetting());
1944 return new async.Future.value(stringResponse(200, h, resp)); 1944 return new async.Future.value(stringResponse(200, h, resp));
1945 }), true); 1945 }), true);
1946 res.update(arg_request, arg_tableId, arg_styleId).then(unittest.expectAsyn c(((api.StyleSetting response) { 1946 res.update(arg_request, arg_tableId, arg_styleId).then(unittest.expectAsyn c1(((api.StyleSetting response) {
1947 checkStyleSetting(response); 1947 checkStyleSetting(response);
1948 }))); 1948 })));
1949 }); 1949 });
1950 1950
1951 }); 1951 });
1952 1952
1953 1953
1954 unittest.group("resource-TableResourceApi", () { 1954 unittest.group("resource-TableResourceApi", () {
1955 unittest.test("method--copy", () { 1955 unittest.test("method--copy", () {
1956 1956
1957 var mock = new HttpServerMock(); 1957 var mock = new HttpServerMock();
1958 api.TableResourceApi res = new api.FusiontablesApi(mock).table; 1958 api.TableResourceApi res = new api.FusiontablesApi(mock).table;
1959 var arg_tableId = "foo"; 1959 var arg_tableId = "foo";
1960 var arg_copyPresentation = true; 1960 var arg_copyPresentation = true;
1961 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 1961 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
1962 var path = (req.url).path; 1962 var path = (req.url).path;
1963 var pathOffset = 0; 1963 var pathOffset = 0;
1964 var index; 1964 var index;
1965 var subPart; 1965 var subPart;
1966 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 1966 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
1967 pathOffset += 1; 1967 pathOffset += 1;
1968 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("fusiontables/v1/")); 1968 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("fusiontables/v1/"));
1969 pathOffset += 16; 1969 pathOffset += 16;
1970 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ als("tables/")); 1970 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ als("tables/"));
1971 pathOffset += 7; 1971 pathOffset += 7;
(...skipping 23 matching lines...) Expand all
1995 } 1995 }
1996 unittest.expect(queryMap["copyPresentation"].first, unittest.equals("$ar g_copyPresentation")); 1996 unittest.expect(queryMap["copyPresentation"].first, unittest.equals("$ar g_copyPresentation"));
1997 1997
1998 1998
1999 var h = { 1999 var h = {
2000 "content-type" : "application/json; charset=utf-8", 2000 "content-type" : "application/json; charset=utf-8",
2001 }; 2001 };
2002 var resp = convert.JSON.encode(buildTable()); 2002 var resp = convert.JSON.encode(buildTable());
2003 return new async.Future.value(stringResponse(200, h, resp)); 2003 return new async.Future.value(stringResponse(200, h, resp));
2004 }), true); 2004 }), true);
2005 res.copy(arg_tableId, copyPresentation: arg_copyPresentation).then(unittes t.expectAsync(((api.Table response) { 2005 res.copy(arg_tableId, copyPresentation: arg_copyPresentation).then(unittes t.expectAsync1(((api.Table response) {
2006 checkTable(response); 2006 checkTable(response);
2007 }))); 2007 })));
2008 }); 2008 });
2009 2009
2010 unittest.test("method--delete", () { 2010 unittest.test("method--delete", () {
2011 2011
2012 var mock = new HttpServerMock(); 2012 var mock = new HttpServerMock();
2013 api.TableResourceApi res = new api.FusiontablesApi(mock).table; 2013 api.TableResourceApi res = new api.FusiontablesApi(mock).table;
2014 var arg_tableId = "foo"; 2014 var arg_tableId = "foo";
2015 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 2015 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
2016 var path = (req.url).path; 2016 var path = (req.url).path;
2017 var pathOffset = 0; 2017 var pathOffset = 0;
2018 var index; 2018 var index;
2019 var subPart; 2019 var subPart;
2020 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 2020 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
2021 pathOffset += 1; 2021 pathOffset += 1;
2022 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("fusiontables/v1/")); 2022 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("fusiontables/v1/"));
2023 pathOffset += 16; 2023 pathOffset += 16;
2024 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ als("tables/")); 2024 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ als("tables/"));
2025 pathOffset += 7; 2025 pathOffset += 7;
(...skipping 18 matching lines...) Expand all
2044 } 2044 }
2045 } 2045 }
2046 2046
2047 2047
2048 var h = { 2048 var h = {
2049 "content-type" : "application/json; charset=utf-8", 2049 "content-type" : "application/json; charset=utf-8",
2050 }; 2050 };
2051 var resp = ""; 2051 var resp = "";
2052 return new async.Future.value(stringResponse(200, h, resp)); 2052 return new async.Future.value(stringResponse(200, h, resp));
2053 }), true); 2053 }), true);
2054 res.delete(arg_tableId).then(unittest.expectAsync((_) {})); 2054 res.delete(arg_tableId).then(unittest.expectAsync1((_) {}));
2055 }); 2055 });
2056 2056
2057 unittest.test("method--get", () { 2057 unittest.test("method--get", () {
2058 2058
2059 var mock = new HttpServerMock(); 2059 var mock = new HttpServerMock();
2060 api.TableResourceApi res = new api.FusiontablesApi(mock).table; 2060 api.TableResourceApi res = new api.FusiontablesApi(mock).table;
2061 var arg_tableId = "foo"; 2061 var arg_tableId = "foo";
2062 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 2062 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
2063 var path = (req.url).path; 2063 var path = (req.url).path;
2064 var pathOffset = 0; 2064 var pathOffset = 0;
2065 var index; 2065 var index;
2066 var subPart; 2066 var subPart;
2067 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 2067 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
2068 pathOffset += 1; 2068 pathOffset += 1;
2069 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("fusiontables/v1/")); 2069 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("fusiontables/v1/"));
2070 pathOffset += 16; 2070 pathOffset += 16;
2071 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ als("tables/")); 2071 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ als("tables/"));
2072 pathOffset += 7; 2072 pathOffset += 7;
(...skipping 18 matching lines...) Expand all
2091 } 2091 }
2092 } 2092 }
2093 2093
2094 2094
2095 var h = { 2095 var h = {
2096 "content-type" : "application/json; charset=utf-8", 2096 "content-type" : "application/json; charset=utf-8",
2097 }; 2097 };
2098 var resp = convert.JSON.encode(buildTable()); 2098 var resp = convert.JSON.encode(buildTable());
2099 return new async.Future.value(stringResponse(200, h, resp)); 2099 return new async.Future.value(stringResponse(200, h, resp));
2100 }), true); 2100 }), true);
2101 res.get(arg_tableId).then(unittest.expectAsync(((api.Table response) { 2101 res.get(arg_tableId).then(unittest.expectAsync1(((api.Table response) {
2102 checkTable(response); 2102 checkTable(response);
2103 }))); 2103 })));
2104 }); 2104 });
2105 2105
2106 unittest.test("method--importRows", () { 2106 unittest.test("method--importRows", () {
2107 // TODO: Implement tests for media upload; 2107 // TODO: Implement tests for media upload;
2108 // TODO: Implement tests for media download; 2108 // TODO: Implement tests for media download;
2109 2109
2110 var mock = new HttpServerMock(); 2110 var mock = new HttpServerMock();
2111 api.TableResourceApi res = new api.FusiontablesApi(mock).table; 2111 api.TableResourceApi res = new api.FusiontablesApi(mock).table;
2112 var arg_tableId = "foo"; 2112 var arg_tableId = "foo";
2113 var arg_delimiter = "foo"; 2113 var arg_delimiter = "foo";
2114 var arg_encoding = "foo"; 2114 var arg_encoding = "foo";
2115 var arg_endLine = 42; 2115 var arg_endLine = 42;
2116 var arg_isStrict = true; 2116 var arg_isStrict = true;
2117 var arg_startLine = 42; 2117 var arg_startLine = 42;
2118 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 2118 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
2119 var path = (req.url).path; 2119 var path = (req.url).path;
2120 var pathOffset = 0; 2120 var pathOffset = 0;
2121 var index; 2121 var index;
2122 var subPart; 2122 var subPart;
2123 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 2123 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
2124 pathOffset += 1; 2124 pathOffset += 1;
2125 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("fusiontables/v1/")); 2125 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("fusiontables/v1/"));
2126 pathOffset += 16; 2126 pathOffset += 16;
2127 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ als("tables/")); 2127 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ als("tables/"));
2128 pathOffset += 7; 2128 pathOffset += 7;
(...skipping 27 matching lines...) Expand all
2156 unittest.expect(queryMap["isStrict"].first, unittest.equals("$arg_isStri ct")); 2156 unittest.expect(queryMap["isStrict"].first, unittest.equals("$arg_isStri ct"));
2157 unittest.expect(core.int.parse(queryMap["startLine"].first), unittest.eq uals(arg_startLine)); 2157 unittest.expect(core.int.parse(queryMap["startLine"].first), unittest.eq uals(arg_startLine));
2158 2158
2159 2159
2160 var h = { 2160 var h = {
2161 "content-type" : "application/json; charset=utf-8", 2161 "content-type" : "application/json; charset=utf-8",
2162 }; 2162 };
2163 var resp = convert.JSON.encode(buildImport()); 2163 var resp = convert.JSON.encode(buildImport());
2164 return new async.Future.value(stringResponse(200, h, resp)); 2164 return new async.Future.value(stringResponse(200, h, resp));
2165 }), true); 2165 }), true);
2166 res.importRows(arg_tableId, delimiter: arg_delimiter, encoding: arg_encodi ng, endLine: arg_endLine, isStrict: arg_isStrict, startLine: arg_startLine).then (unittest.expectAsync(((api.Import response) { 2166 res.importRows(arg_tableId, delimiter: arg_delimiter, encoding: arg_encodi ng, endLine: arg_endLine, isStrict: arg_isStrict, startLine: arg_startLine).then (unittest.expectAsync1(((api.Import response) {
2167 checkImport(response); 2167 checkImport(response);
2168 }))); 2168 })));
2169 }); 2169 });
2170 2170
2171 unittest.test("method--importTable", () { 2171 unittest.test("method--importTable", () {
2172 // TODO: Implement tests for media upload; 2172 // TODO: Implement tests for media upload;
2173 // TODO: Implement tests for media download; 2173 // TODO: Implement tests for media download;
2174 2174
2175 var mock = new HttpServerMock(); 2175 var mock = new HttpServerMock();
2176 api.TableResourceApi res = new api.FusiontablesApi(mock).table; 2176 api.TableResourceApi res = new api.FusiontablesApi(mock).table;
2177 var arg_name = "foo"; 2177 var arg_name = "foo";
2178 var arg_delimiter = "foo"; 2178 var arg_delimiter = "foo";
2179 var arg_encoding = "foo"; 2179 var arg_encoding = "foo";
2180 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 2180 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
2181 var path = (req.url).path; 2181 var path = (req.url).path;
2182 var pathOffset = 0; 2182 var pathOffset = 0;
2183 var index; 2183 var index;
2184 var subPart; 2184 var subPart;
2185 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 2185 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
2186 pathOffset += 1; 2186 pathOffset += 1;
2187 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("fusiontables/v1/")); 2187 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("fusiontables/v1/"));
2188 pathOffset += 16; 2188 pathOffset += 16;
2189 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq uals("tables/import")); 2189 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq uals("tables/import"));
2190 pathOffset += 13; 2190 pathOffset += 13;
(...skipping 18 matching lines...) Expand all
2209 unittest.expect(queryMap["delimiter"].first, unittest.equals(arg_delimit er)); 2209 unittest.expect(queryMap["delimiter"].first, unittest.equals(arg_delimit er));
2210 unittest.expect(queryMap["encoding"].first, unittest.equals(arg_encoding )); 2210 unittest.expect(queryMap["encoding"].first, unittest.equals(arg_encoding ));
2211 2211
2212 2212
2213 var h = { 2213 var h = {
2214 "content-type" : "application/json; charset=utf-8", 2214 "content-type" : "application/json; charset=utf-8",
2215 }; 2215 };
2216 var resp = convert.JSON.encode(buildTable()); 2216 var resp = convert.JSON.encode(buildTable());
2217 return new async.Future.value(stringResponse(200, h, resp)); 2217 return new async.Future.value(stringResponse(200, h, resp));
2218 }), true); 2218 }), true);
2219 res.importTable(arg_name, delimiter: arg_delimiter, encoding: arg_encoding ).then(unittest.expectAsync(((api.Table response) { 2219 res.importTable(arg_name, delimiter: arg_delimiter, encoding: arg_encoding ).then(unittest.expectAsync1(((api.Table response) {
2220 checkTable(response); 2220 checkTable(response);
2221 }))); 2221 })));
2222 }); 2222 });
2223 2223
2224 unittest.test("method--insert", () { 2224 unittest.test("method--insert", () {
2225 2225
2226 var mock = new HttpServerMock(); 2226 var mock = new HttpServerMock();
2227 api.TableResourceApi res = new api.FusiontablesApi(mock).table; 2227 api.TableResourceApi res = new api.FusiontablesApi(mock).table;
2228 var arg_request = buildTable(); 2228 var arg_request = buildTable();
2229 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 2229 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
2230 var obj = new api.Table.fromJson(json); 2230 var obj = new api.Table.fromJson(json);
2231 checkTable(obj); 2231 checkTable(obj);
2232 2232
2233 var path = (req.url).path; 2233 var path = (req.url).path;
2234 var pathOffset = 0; 2234 var pathOffset = 0;
2235 var index; 2235 var index;
2236 var subPart; 2236 var subPart;
2237 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 2237 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
2238 pathOffset += 1; 2238 pathOffset += 1;
2239 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("fusiontables/v1/")); 2239 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("fusiontables/v1/"));
(...skipping 18 matching lines...) Expand all
2258 } 2258 }
2259 } 2259 }
2260 2260
2261 2261
2262 var h = { 2262 var h = {
2263 "content-type" : "application/json; charset=utf-8", 2263 "content-type" : "application/json; charset=utf-8",
2264 }; 2264 };
2265 var resp = convert.JSON.encode(buildTable()); 2265 var resp = convert.JSON.encode(buildTable());
2266 return new async.Future.value(stringResponse(200, h, resp)); 2266 return new async.Future.value(stringResponse(200, h, resp));
2267 }), true); 2267 }), true);
2268 res.insert(arg_request).then(unittest.expectAsync(((api.Table response) { 2268 res.insert(arg_request).then(unittest.expectAsync1(((api.Table response) {
2269 checkTable(response); 2269 checkTable(response);
2270 }))); 2270 })));
2271 }); 2271 });
2272 2272
2273 unittest.test("method--list", () { 2273 unittest.test("method--list", () {
2274 2274
2275 var mock = new HttpServerMock(); 2275 var mock = new HttpServerMock();
2276 api.TableResourceApi res = new api.FusiontablesApi(mock).table; 2276 api.TableResourceApi res = new api.FusiontablesApi(mock).table;
2277 var arg_maxResults = 42; 2277 var arg_maxResults = 42;
2278 var arg_pageToken = "foo"; 2278 var arg_pageToken = "foo";
2279 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 2279 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
2280 var path = (req.url).path; 2280 var path = (req.url).path;
2281 var pathOffset = 0; 2281 var pathOffset = 0;
2282 var index; 2282 var index;
2283 var subPart; 2283 var subPart;
2284 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 2284 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
2285 pathOffset += 1; 2285 pathOffset += 1;
2286 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("fusiontables/v1/")); 2286 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("fusiontables/v1/"));
2287 pathOffset += 16; 2287 pathOffset += 16;
2288 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ als("tables")); 2288 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ als("tables"));
2289 pathOffset += 6; 2289 pathOffset += 6;
(...skipping 17 matching lines...) Expand all
2307 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e quals(arg_maxResults)); 2307 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e quals(arg_maxResults));
2308 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en)); 2308 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en));
2309 2309
2310 2310
2311 var h = { 2311 var h = {
2312 "content-type" : "application/json; charset=utf-8", 2312 "content-type" : "application/json; charset=utf-8",
2313 }; 2313 };
2314 var resp = convert.JSON.encode(buildTableList()); 2314 var resp = convert.JSON.encode(buildTableList());
2315 return new async.Future.value(stringResponse(200, h, resp)); 2315 return new async.Future.value(stringResponse(200, h, resp));
2316 }), true); 2316 }), true);
2317 res.list(maxResults: arg_maxResults, pageToken: arg_pageToken).then(unitte st.expectAsync(((api.TableList response) { 2317 res.list(maxResults: arg_maxResults, pageToken: arg_pageToken).then(unitte st.expectAsync1(((api.TableList response) {
2318 checkTableList(response); 2318 checkTableList(response);
2319 }))); 2319 })));
2320 }); 2320 });
2321 2321
2322 unittest.test("method--patch", () { 2322 unittest.test("method--patch", () {
2323 2323
2324 var mock = new HttpServerMock(); 2324 var mock = new HttpServerMock();
2325 api.TableResourceApi res = new api.FusiontablesApi(mock).table; 2325 api.TableResourceApi res = new api.FusiontablesApi(mock).table;
2326 var arg_request = buildTable(); 2326 var arg_request = buildTable();
2327 var arg_tableId = "foo"; 2327 var arg_tableId = "foo";
2328 var arg_replaceViewDefinition = true; 2328 var arg_replaceViewDefinition = true;
2329 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 2329 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
2330 var obj = new api.Table.fromJson(json); 2330 var obj = new api.Table.fromJson(json);
2331 checkTable(obj); 2331 checkTable(obj);
2332 2332
2333 var path = (req.url).path; 2333 var path = (req.url).path;
2334 var pathOffset = 0; 2334 var pathOffset = 0;
2335 var index; 2335 var index;
2336 var subPart; 2336 var subPart;
2337 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 2337 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
2338 pathOffset += 1; 2338 pathOffset += 1;
2339 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("fusiontables/v1/")); 2339 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("fusiontables/v1/"));
(...skipping 22 matching lines...) Expand all
2362 } 2362 }
2363 unittest.expect(queryMap["replaceViewDefinition"].first, unittest.equals ("$arg_replaceViewDefinition")); 2363 unittest.expect(queryMap["replaceViewDefinition"].first, unittest.equals ("$arg_replaceViewDefinition"));
2364 2364
2365 2365
2366 var h = { 2366 var h = {
2367 "content-type" : "application/json; charset=utf-8", 2367 "content-type" : "application/json; charset=utf-8",
2368 }; 2368 };
2369 var resp = convert.JSON.encode(buildTable()); 2369 var resp = convert.JSON.encode(buildTable());
2370 return new async.Future.value(stringResponse(200, h, resp)); 2370 return new async.Future.value(stringResponse(200, h, resp));
2371 }), true); 2371 }), true);
2372 res.patch(arg_request, arg_tableId, replaceViewDefinition: arg_replaceView Definition).then(unittest.expectAsync(((api.Table response) { 2372 res.patch(arg_request, arg_tableId, replaceViewDefinition: arg_replaceView Definition).then(unittest.expectAsync1(((api.Table response) {
2373 checkTable(response); 2373 checkTable(response);
2374 }))); 2374 })));
2375 }); 2375 });
2376 2376
2377 unittest.test("method--update", () { 2377 unittest.test("method--update", () {
2378 2378
2379 var mock = new HttpServerMock(); 2379 var mock = new HttpServerMock();
2380 api.TableResourceApi res = new api.FusiontablesApi(mock).table; 2380 api.TableResourceApi res = new api.FusiontablesApi(mock).table;
2381 var arg_request = buildTable(); 2381 var arg_request = buildTable();
2382 var arg_tableId = "foo"; 2382 var arg_tableId = "foo";
2383 var arg_replaceViewDefinition = true; 2383 var arg_replaceViewDefinition = true;
2384 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 2384 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
2385 var obj = new api.Table.fromJson(json); 2385 var obj = new api.Table.fromJson(json);
2386 checkTable(obj); 2386 checkTable(obj);
2387 2387
2388 var path = (req.url).path; 2388 var path = (req.url).path;
2389 var pathOffset = 0; 2389 var pathOffset = 0;
2390 var index; 2390 var index;
2391 var subPart; 2391 var subPart;
2392 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 2392 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
2393 pathOffset += 1; 2393 pathOffset += 1;
2394 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("fusiontables/v1/")); 2394 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("fusiontables/v1/"));
(...skipping 22 matching lines...) Expand all
2417 } 2417 }
2418 unittest.expect(queryMap["replaceViewDefinition"].first, unittest.equals ("$arg_replaceViewDefinition")); 2418 unittest.expect(queryMap["replaceViewDefinition"].first, unittest.equals ("$arg_replaceViewDefinition"));
2419 2419
2420 2420
2421 var h = { 2421 var h = {
2422 "content-type" : "application/json; charset=utf-8", 2422 "content-type" : "application/json; charset=utf-8",
2423 }; 2423 };
2424 var resp = convert.JSON.encode(buildTable()); 2424 var resp = convert.JSON.encode(buildTable());
2425 return new async.Future.value(stringResponse(200, h, resp)); 2425 return new async.Future.value(stringResponse(200, h, resp));
2426 }), true); 2426 }), true);
2427 res.update(arg_request, arg_tableId, replaceViewDefinition: arg_replaceVie wDefinition).then(unittest.expectAsync(((api.Table response) { 2427 res.update(arg_request, arg_tableId, replaceViewDefinition: arg_replaceVie wDefinition).then(unittest.expectAsync1(((api.Table response) {
2428 checkTable(response); 2428 checkTable(response);
2429 }))); 2429 })));
2430 }); 2430 });
2431 2431
2432 }); 2432 });
2433 2433
2434 2434
2435 unittest.group("resource-TaskResourceApi", () { 2435 unittest.group("resource-TaskResourceApi", () {
2436 unittest.test("method--delete", () { 2436 unittest.test("method--delete", () {
2437 2437
2438 var mock = new HttpServerMock(); 2438 var mock = new HttpServerMock();
2439 api.TaskResourceApi res = new api.FusiontablesApi(mock).task; 2439 api.TaskResourceApi res = new api.FusiontablesApi(mock).task;
2440 var arg_tableId = "foo"; 2440 var arg_tableId = "foo";
2441 var arg_taskId = "foo"; 2441 var arg_taskId = "foo";
2442 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 2442 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
2443 var path = (req.url).path; 2443 var path = (req.url).path;
2444 var pathOffset = 0; 2444 var pathOffset = 0;
2445 var index; 2445 var index;
2446 var subPart; 2446 var subPart;
2447 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 2447 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
2448 pathOffset += 1; 2448 pathOffset += 1;
2449 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("fusiontables/v1/")); 2449 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("fusiontables/v1/"));
2450 pathOffset += 16; 2450 pathOffset += 16;
2451 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ als("tables/")); 2451 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ als("tables/"));
2452 pathOffset += 7; 2452 pathOffset += 7;
(...skipping 25 matching lines...) Expand all
2478 } 2478 }
2479 } 2479 }
2480 2480
2481 2481
2482 var h = { 2482 var h = {
2483 "content-type" : "application/json; charset=utf-8", 2483 "content-type" : "application/json; charset=utf-8",
2484 }; 2484 };
2485 var resp = ""; 2485 var resp = "";
2486 return new async.Future.value(stringResponse(200, h, resp)); 2486 return new async.Future.value(stringResponse(200, h, resp));
2487 }), true); 2487 }), true);
2488 res.delete(arg_tableId, arg_taskId).then(unittest.expectAsync((_) {})); 2488 res.delete(arg_tableId, arg_taskId).then(unittest.expectAsync1((_) {}));
2489 }); 2489 });
2490 2490
2491 unittest.test("method--get", () { 2491 unittest.test("method--get", () {
2492 2492
2493 var mock = new HttpServerMock(); 2493 var mock = new HttpServerMock();
2494 api.TaskResourceApi res = new api.FusiontablesApi(mock).task; 2494 api.TaskResourceApi res = new api.FusiontablesApi(mock).task;
2495 var arg_tableId = "foo"; 2495 var arg_tableId = "foo";
2496 var arg_taskId = "foo"; 2496 var arg_taskId = "foo";
2497 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 2497 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
2498 var path = (req.url).path; 2498 var path = (req.url).path;
2499 var pathOffset = 0; 2499 var pathOffset = 0;
2500 var index; 2500 var index;
2501 var subPart; 2501 var subPart;
2502 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 2502 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
2503 pathOffset += 1; 2503 pathOffset += 1;
2504 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("fusiontables/v1/")); 2504 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("fusiontables/v1/"));
2505 pathOffset += 16; 2505 pathOffset += 16;
2506 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ als("tables/")); 2506 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ als("tables/"));
2507 pathOffset += 7; 2507 pathOffset += 7;
(...skipping 25 matching lines...) Expand all
2533 } 2533 }
2534 } 2534 }
2535 2535
2536 2536
2537 var h = { 2537 var h = {
2538 "content-type" : "application/json; charset=utf-8", 2538 "content-type" : "application/json; charset=utf-8",
2539 }; 2539 };
2540 var resp = convert.JSON.encode(buildTask()); 2540 var resp = convert.JSON.encode(buildTask());
2541 return new async.Future.value(stringResponse(200, h, resp)); 2541 return new async.Future.value(stringResponse(200, h, resp));
2542 }), true); 2542 }), true);
2543 res.get(arg_tableId, arg_taskId).then(unittest.expectAsync(((api.Task resp onse) { 2543 res.get(arg_tableId, arg_taskId).then(unittest.expectAsync1(((api.Task res ponse) {
2544 checkTask(response); 2544 checkTask(response);
2545 }))); 2545 })));
2546 }); 2546 });
2547 2547
2548 unittest.test("method--list", () { 2548 unittest.test("method--list", () {
2549 2549
2550 var mock = new HttpServerMock(); 2550 var mock = new HttpServerMock();
2551 api.TaskResourceApi res = new api.FusiontablesApi(mock).task; 2551 api.TaskResourceApi res = new api.FusiontablesApi(mock).task;
2552 var arg_tableId = "foo"; 2552 var arg_tableId = "foo";
2553 var arg_maxResults = 42; 2553 var arg_maxResults = 42;
2554 var arg_pageToken = "foo"; 2554 var arg_pageToken = "foo";
2555 var arg_startIndex = 42; 2555 var arg_startIndex = 42;
2556 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 2556 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
2557 var path = (req.url).path; 2557 var path = (req.url).path;
2558 var pathOffset = 0; 2558 var pathOffset = 0;
2559 var index; 2559 var index;
2560 var subPart; 2560 var subPart;
2561 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 2561 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
2562 pathOffset += 1; 2562 pathOffset += 1;
2563 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("fusiontables/v1/")); 2563 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("fusiontables/v1/"));
2564 pathOffset += 16; 2564 pathOffset += 16;
2565 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ als("tables/")); 2565 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ als("tables/"));
2566 pathOffset += 7; 2566 pathOffset += 7;
(...skipping 25 matching lines...) Expand all
2592 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en)); 2592 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en));
2593 unittest.expect(core.int.parse(queryMap["startIndex"].first), unittest.e quals(arg_startIndex)); 2593 unittest.expect(core.int.parse(queryMap["startIndex"].first), unittest.e quals(arg_startIndex));
2594 2594
2595 2595
2596 var h = { 2596 var h = {
2597 "content-type" : "application/json; charset=utf-8", 2597 "content-type" : "application/json; charset=utf-8",
2598 }; 2598 };
2599 var resp = convert.JSON.encode(buildTaskList()); 2599 var resp = convert.JSON.encode(buildTaskList());
2600 return new async.Future.value(stringResponse(200, h, resp)); 2600 return new async.Future.value(stringResponse(200, h, resp));
2601 }), true); 2601 }), true);
2602 res.list(arg_tableId, maxResults: arg_maxResults, pageToken: arg_pageToken , startIndex: arg_startIndex).then(unittest.expectAsync(((api.TaskList response) { 2602 res.list(arg_tableId, maxResults: arg_maxResults, pageToken: arg_pageToken , startIndex: arg_startIndex).then(unittest.expectAsync1(((api.TaskList response ) {
2603 checkTaskList(response); 2603 checkTaskList(response);
2604 }))); 2604 })));
2605 }); 2605 });
2606 2606
2607 }); 2607 });
2608 2608
2609 2609
2610 unittest.group("resource-TemplateResourceApi", () { 2610 unittest.group("resource-TemplateResourceApi", () {
2611 unittest.test("method--delete", () { 2611 unittest.test("method--delete", () {
2612 2612
2613 var mock = new HttpServerMock(); 2613 var mock = new HttpServerMock();
2614 api.TemplateResourceApi res = new api.FusiontablesApi(mock).template; 2614 api.TemplateResourceApi res = new api.FusiontablesApi(mock).template;
2615 var arg_tableId = "foo"; 2615 var arg_tableId = "foo";
2616 var arg_templateId = 42; 2616 var arg_templateId = 42;
2617 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 2617 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
2618 var path = (req.url).path; 2618 var path = (req.url).path;
2619 var pathOffset = 0; 2619 var pathOffset = 0;
2620 var index; 2620 var index;
2621 var subPart; 2621 var subPart;
2622 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 2622 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
2623 pathOffset += 1; 2623 pathOffset += 1;
2624 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("fusiontables/v1/")); 2624 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("fusiontables/v1/"));
2625 pathOffset += 16; 2625 pathOffset += 16;
2626 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ als("tables/")); 2626 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ als("tables/"));
2627 pathOffset += 7; 2627 pathOffset += 7;
(...skipping 25 matching lines...) Expand all
2653 } 2653 }
2654 } 2654 }
2655 2655
2656 2656
2657 var h = { 2657 var h = {
2658 "content-type" : "application/json; charset=utf-8", 2658 "content-type" : "application/json; charset=utf-8",
2659 }; 2659 };
2660 var resp = ""; 2660 var resp = "";
2661 return new async.Future.value(stringResponse(200, h, resp)); 2661 return new async.Future.value(stringResponse(200, h, resp));
2662 }), true); 2662 }), true);
2663 res.delete(arg_tableId, arg_templateId).then(unittest.expectAsync((_) {})) ; 2663 res.delete(arg_tableId, arg_templateId).then(unittest.expectAsync1((_) {}) );
2664 }); 2664 });
2665 2665
2666 unittest.test("method--get", () { 2666 unittest.test("method--get", () {
2667 2667
2668 var mock = new HttpServerMock(); 2668 var mock = new HttpServerMock();
2669 api.TemplateResourceApi res = new api.FusiontablesApi(mock).template; 2669 api.TemplateResourceApi res = new api.FusiontablesApi(mock).template;
2670 var arg_tableId = "foo"; 2670 var arg_tableId = "foo";
2671 var arg_templateId = 42; 2671 var arg_templateId = 42;
2672 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 2672 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
2673 var path = (req.url).path; 2673 var path = (req.url).path;
2674 var pathOffset = 0; 2674 var pathOffset = 0;
2675 var index; 2675 var index;
2676 var subPart; 2676 var subPart;
2677 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 2677 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
2678 pathOffset += 1; 2678 pathOffset += 1;
2679 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("fusiontables/v1/")); 2679 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("fusiontables/v1/"));
2680 pathOffset += 16; 2680 pathOffset += 16;
2681 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ als("tables/")); 2681 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ als("tables/"));
2682 pathOffset += 7; 2682 pathOffset += 7;
(...skipping 25 matching lines...) Expand all
2708 } 2708 }
2709 } 2709 }
2710 2710
2711 2711
2712 var h = { 2712 var h = {
2713 "content-type" : "application/json; charset=utf-8", 2713 "content-type" : "application/json; charset=utf-8",
2714 }; 2714 };
2715 var resp = convert.JSON.encode(buildTemplate()); 2715 var resp = convert.JSON.encode(buildTemplate());
2716 return new async.Future.value(stringResponse(200, h, resp)); 2716 return new async.Future.value(stringResponse(200, h, resp));
2717 }), true); 2717 }), true);
2718 res.get(arg_tableId, arg_templateId).then(unittest.expectAsync(((api.Templ ate response) { 2718 res.get(arg_tableId, arg_templateId).then(unittest.expectAsync1(((api.Temp late response) {
2719 checkTemplate(response); 2719 checkTemplate(response);
2720 }))); 2720 })));
2721 }); 2721 });
2722 2722
2723 unittest.test("method--insert", () { 2723 unittest.test("method--insert", () {
2724 2724
2725 var mock = new HttpServerMock(); 2725 var mock = new HttpServerMock();
2726 api.TemplateResourceApi res = new api.FusiontablesApi(mock).template; 2726 api.TemplateResourceApi res = new api.FusiontablesApi(mock).template;
2727 var arg_request = buildTemplate(); 2727 var arg_request = buildTemplate();
2728 var arg_tableId = "foo"; 2728 var arg_tableId = "foo";
2729 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 2729 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
2730 var obj = new api.Template.fromJson(json); 2730 var obj = new api.Template.fromJson(json);
2731 checkTemplate(obj); 2731 checkTemplate(obj);
2732 2732
2733 var path = (req.url).path; 2733 var path = (req.url).path;
2734 var pathOffset = 0; 2734 var pathOffset = 0;
2735 var index; 2735 var index;
2736 var subPart; 2736 var subPart;
2737 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 2737 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
2738 pathOffset += 1; 2738 pathOffset += 1;
2739 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("fusiontables/v1/")); 2739 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("fusiontables/v1/"));
(...skipping 25 matching lines...) Expand all
2765 } 2765 }
2766 } 2766 }
2767 2767
2768 2768
2769 var h = { 2769 var h = {
2770 "content-type" : "application/json; charset=utf-8", 2770 "content-type" : "application/json; charset=utf-8",
2771 }; 2771 };
2772 var resp = convert.JSON.encode(buildTemplate()); 2772 var resp = convert.JSON.encode(buildTemplate());
2773 return new async.Future.value(stringResponse(200, h, resp)); 2773 return new async.Future.value(stringResponse(200, h, resp));
2774 }), true); 2774 }), true);
2775 res.insert(arg_request, arg_tableId).then(unittest.expectAsync(((api.Templ ate response) { 2775 res.insert(arg_request, arg_tableId).then(unittest.expectAsync1(((api.Temp late response) {
2776 checkTemplate(response); 2776 checkTemplate(response);
2777 }))); 2777 })));
2778 }); 2778 });
2779 2779
2780 unittest.test("method--list", () { 2780 unittest.test("method--list", () {
2781 2781
2782 var mock = new HttpServerMock(); 2782 var mock = new HttpServerMock();
2783 api.TemplateResourceApi res = new api.FusiontablesApi(mock).template; 2783 api.TemplateResourceApi res = new api.FusiontablesApi(mock).template;
2784 var arg_tableId = "foo"; 2784 var arg_tableId = "foo";
2785 var arg_maxResults = 42; 2785 var arg_maxResults = 42;
2786 var arg_pageToken = "foo"; 2786 var arg_pageToken = "foo";
2787 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 2787 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
2788 var path = (req.url).path; 2788 var path = (req.url).path;
2789 var pathOffset = 0; 2789 var pathOffset = 0;
2790 var index; 2790 var index;
2791 var subPart; 2791 var subPart;
2792 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 2792 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
2793 pathOffset += 1; 2793 pathOffset += 1;
2794 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("fusiontables/v1/")); 2794 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("fusiontables/v1/"));
2795 pathOffset += 16; 2795 pathOffset += 16;
2796 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ als("tables/")); 2796 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ als("tables/"));
2797 pathOffset += 7; 2797 pathOffset += 7;
(...skipping 24 matching lines...) Expand all
2822 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e quals(arg_maxResults)); 2822 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e quals(arg_maxResults));
2823 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en)); 2823 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en));
2824 2824
2825 2825
2826 var h = { 2826 var h = {
2827 "content-type" : "application/json; charset=utf-8", 2827 "content-type" : "application/json; charset=utf-8",
2828 }; 2828 };
2829 var resp = convert.JSON.encode(buildTemplateList()); 2829 var resp = convert.JSON.encode(buildTemplateList());
2830 return new async.Future.value(stringResponse(200, h, resp)); 2830 return new async.Future.value(stringResponse(200, h, resp));
2831 }), true); 2831 }), true);
2832 res.list(arg_tableId, maxResults: arg_maxResults, pageToken: arg_pageToken ).then(unittest.expectAsync(((api.TemplateList response) { 2832 res.list(arg_tableId, maxResults: arg_maxResults, pageToken: arg_pageToken ).then(unittest.expectAsync1(((api.TemplateList response) {
2833 checkTemplateList(response); 2833 checkTemplateList(response);
2834 }))); 2834 })));
2835 }); 2835 });
2836 2836
2837 unittest.test("method--patch", () { 2837 unittest.test("method--patch", () {
2838 2838
2839 var mock = new HttpServerMock(); 2839 var mock = new HttpServerMock();
2840 api.TemplateResourceApi res = new api.FusiontablesApi(mock).template; 2840 api.TemplateResourceApi res = new api.FusiontablesApi(mock).template;
2841 var arg_request = buildTemplate(); 2841 var arg_request = buildTemplate();
2842 var arg_tableId = "foo"; 2842 var arg_tableId = "foo";
2843 var arg_templateId = 42; 2843 var arg_templateId = 42;
2844 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 2844 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
2845 var obj = new api.Template.fromJson(json); 2845 var obj = new api.Template.fromJson(json);
2846 checkTemplate(obj); 2846 checkTemplate(obj);
2847 2847
2848 var path = (req.url).path; 2848 var path = (req.url).path;
2849 var pathOffset = 0; 2849 var pathOffset = 0;
2850 var index; 2850 var index;
2851 var subPart; 2851 var subPart;
2852 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 2852 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
2853 pathOffset += 1; 2853 pathOffset += 1;
2854 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("fusiontables/v1/")); 2854 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("fusiontables/v1/"));
(...skipping 28 matching lines...) Expand all
2883 } 2883 }
2884 } 2884 }
2885 2885
2886 2886
2887 var h = { 2887 var h = {
2888 "content-type" : "application/json; charset=utf-8", 2888 "content-type" : "application/json; charset=utf-8",
2889 }; 2889 };
2890 var resp = convert.JSON.encode(buildTemplate()); 2890 var resp = convert.JSON.encode(buildTemplate());
2891 return new async.Future.value(stringResponse(200, h, resp)); 2891 return new async.Future.value(stringResponse(200, h, resp));
2892 }), true); 2892 }), true);
2893 res.patch(arg_request, arg_tableId, arg_templateId).then(unittest.expectAs ync(((api.Template response) { 2893 res.patch(arg_request, arg_tableId, arg_templateId).then(unittest.expectAs ync1(((api.Template response) {
2894 checkTemplate(response); 2894 checkTemplate(response);
2895 }))); 2895 })));
2896 }); 2896 });
2897 2897
2898 unittest.test("method--update", () { 2898 unittest.test("method--update", () {
2899 2899
2900 var mock = new HttpServerMock(); 2900 var mock = new HttpServerMock();
2901 api.TemplateResourceApi res = new api.FusiontablesApi(mock).template; 2901 api.TemplateResourceApi res = new api.FusiontablesApi(mock).template;
2902 var arg_request = buildTemplate(); 2902 var arg_request = buildTemplate();
2903 var arg_tableId = "foo"; 2903 var arg_tableId = "foo";
2904 var arg_templateId = 42; 2904 var arg_templateId = 42;
2905 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 2905 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
2906 var obj = new api.Template.fromJson(json); 2906 var obj = new api.Template.fromJson(json);
2907 checkTemplate(obj); 2907 checkTemplate(obj);
2908 2908
2909 var path = (req.url).path; 2909 var path = (req.url).path;
2910 var pathOffset = 0; 2910 var pathOffset = 0;
2911 var index; 2911 var index;
2912 var subPart; 2912 var subPart;
2913 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 2913 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
2914 pathOffset += 1; 2914 pathOffset += 1;
2915 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("fusiontables/v1/")); 2915 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("fusiontables/v1/"));
(...skipping 28 matching lines...) Expand all
2944 } 2944 }
2945 } 2945 }
2946 2946
2947 2947
2948 var h = { 2948 var h = {
2949 "content-type" : "application/json; charset=utf-8", 2949 "content-type" : "application/json; charset=utf-8",
2950 }; 2950 };
2951 var resp = convert.JSON.encode(buildTemplate()); 2951 var resp = convert.JSON.encode(buildTemplate());
2952 return new async.Future.value(stringResponse(200, h, resp)); 2952 return new async.Future.value(stringResponse(200, h, resp));
2953 }), true); 2953 }), true);
2954 res.update(arg_request, arg_tableId, arg_templateId).then(unittest.expectA sync(((api.Template response) { 2954 res.update(arg_request, arg_tableId, arg_templateId).then(unittest.expectA sync1(((api.Template response) {
2955 checkTemplate(response); 2955 checkTemplate(response);
2956 }))); 2956 })));
2957 }); 2957 });
2958 2958
2959 }); 2959 });
2960 2960
2961 2961
2962 } 2962 }
2963 2963
OLDNEW
« no previous file with comments | « generated/googleapis/test/firebaserules/v1_test.dart ('k') | generated/googleapis/test/fusiontables/v2_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698