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

Side by Side Diff: generated/googleapis/test/fusiontables/v2_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.v2.test; 1 library googleapis.fusiontables.v2.test;
2 2
3 import "dart:core" as core; 3 import "dart:core" as core;
4 import "dart:collection" as collection; 4 import "dart:collection" as collection;
5 import "dart:async" as async; 5 import "dart:async" as async;
6 import "dart:convert" as convert; 6 import "dart:convert" as convert;
7 7
8 import 'package:http/http.dart' as http; 8 import 'package:http/http.dart' as http;
9 import 'package:http/testing.dart' as http_testing; 9 import 'package:http/testing.dart' as http_testing;
10 import 'package:unittest/unittest.dart' as unittest; 10 import 'package:test/test.dart' as unittest;
11 11
12 import 'package:googleapis/fusiontables/v2.dart' as api; 12 import 'package:googleapis/fusiontables/v2.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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 94
95 checkColumnBaseColumn(api.ColumnBaseColumn o) { 95 checkColumnBaseColumn(api.ColumnBaseColumn o) {
96 buildCounterColumnBaseColumn++; 96 buildCounterColumnBaseColumn++;
97 if (buildCounterColumnBaseColumn < 3) { 97 if (buildCounterColumnBaseColumn < 3) {
98 unittest.expect(o.columnId, unittest.equals(42)); 98 unittest.expect(o.columnId, unittest.equals(42));
99 unittest.expect(o.tableIndex, unittest.equals(42)); 99 unittest.expect(o.tableIndex, unittest.equals(42));
100 } 100 }
101 buildCounterColumnBaseColumn--; 101 buildCounterColumnBaseColumn--;
102 } 102 }
103 103
104 buildUnnamed415() { 104 buildUnnamed419() {
105 var o = new core.List<core.String>(); 105 var o = new core.List<core.String>();
106 o.add("foo"); 106 o.add("foo");
107 o.add("foo"); 107 o.add("foo");
108 return o; 108 return o;
109 } 109 }
110 110
111 checkUnnamed415(core.List<core.String> o) { 111 checkUnnamed419(core.List<core.String> o) {
112 unittest.expect(o, unittest.hasLength(2)); 112 unittest.expect(o, unittest.hasLength(2));
113 unittest.expect(o[0], unittest.equals('foo')); 113 unittest.expect(o[0], unittest.equals('foo'));
114 unittest.expect(o[1], unittest.equals('foo')); 114 unittest.expect(o[1], unittest.equals('foo'));
115 } 115 }
116 116
117 core.int buildCounterColumn = 0; 117 core.int buildCounterColumn = 0;
118 buildColumn() { 118 buildColumn() {
119 var o = new api.Column(); 119 var o = new api.Column();
120 buildCounterColumn++; 120 buildCounterColumn++;
121 if (buildCounterColumn < 3) { 121 if (buildCounterColumn < 3) {
122 o.baseColumn = buildColumnBaseColumn(); 122 o.baseColumn = buildColumnBaseColumn();
123 o.columnId = 42; 123 o.columnId = 42;
124 o.columnJsonSchema = "foo"; 124 o.columnJsonSchema = "foo";
125 o.columnPropertiesJson = "foo"; 125 o.columnPropertiesJson = "foo";
126 o.description = "foo"; 126 o.description = "foo";
127 o.formatPattern = "foo"; 127 o.formatPattern = "foo";
128 o.graphPredicate = "foo"; 128 o.graphPredicate = "foo";
129 o.kind = "foo"; 129 o.kind = "foo";
130 o.name = "foo"; 130 o.name = "foo";
131 o.type = "foo"; 131 o.type = "foo";
132 o.validValues = buildUnnamed415(); 132 o.validValues = buildUnnamed419();
133 o.validateData = true; 133 o.validateData = true;
134 } 134 }
135 buildCounterColumn--; 135 buildCounterColumn--;
136 return o; 136 return o;
137 } 137 }
138 138
139 checkColumn(api.Column o) { 139 checkColumn(api.Column o) {
140 buildCounterColumn++; 140 buildCounterColumn++;
141 if (buildCounterColumn < 3) { 141 if (buildCounterColumn < 3) {
142 checkColumnBaseColumn(o.baseColumn); 142 checkColumnBaseColumn(o.baseColumn);
143 unittest.expect(o.columnId, unittest.equals(42)); 143 unittest.expect(o.columnId, unittest.equals(42));
144 unittest.expect(o.columnJsonSchema, unittest.equals('foo')); 144 unittest.expect(o.columnJsonSchema, unittest.equals('foo'));
145 unittest.expect(o.columnPropertiesJson, unittest.equals('foo')); 145 unittest.expect(o.columnPropertiesJson, unittest.equals('foo'));
146 unittest.expect(o.description, unittest.equals('foo')); 146 unittest.expect(o.description, unittest.equals('foo'));
147 unittest.expect(o.formatPattern, unittest.equals('foo')); 147 unittest.expect(o.formatPattern, unittest.equals('foo'));
148 unittest.expect(o.graphPredicate, unittest.equals('foo')); 148 unittest.expect(o.graphPredicate, unittest.equals('foo'));
149 unittest.expect(o.kind, unittest.equals('foo')); 149 unittest.expect(o.kind, unittest.equals('foo'));
150 unittest.expect(o.name, unittest.equals('foo')); 150 unittest.expect(o.name, unittest.equals('foo'));
151 unittest.expect(o.type, unittest.equals('foo')); 151 unittest.expect(o.type, unittest.equals('foo'));
152 checkUnnamed415(o.validValues); 152 checkUnnamed419(o.validValues);
153 unittest.expect(o.validateData, unittest.isTrue); 153 unittest.expect(o.validateData, unittest.isTrue);
154 } 154 }
155 buildCounterColumn--; 155 buildCounterColumn--;
156 } 156 }
157 157
158 buildUnnamed416() { 158 buildUnnamed420() {
159 var o = new core.List<api.Column>(); 159 var o = new core.List<api.Column>();
160 o.add(buildColumn()); 160 o.add(buildColumn());
161 o.add(buildColumn()); 161 o.add(buildColumn());
162 return o; 162 return o;
163 } 163 }
164 164
165 checkUnnamed416(core.List<api.Column> o) { 165 checkUnnamed420(core.List<api.Column> o) {
166 unittest.expect(o, unittest.hasLength(2)); 166 unittest.expect(o, unittest.hasLength(2));
167 checkColumn(o[0]); 167 checkColumn(o[0]);
168 checkColumn(o[1]); 168 checkColumn(o[1]);
169 } 169 }
170 170
171 core.int buildCounterColumnList = 0; 171 core.int buildCounterColumnList = 0;
172 buildColumnList() { 172 buildColumnList() {
173 var o = new api.ColumnList(); 173 var o = new api.ColumnList();
174 buildCounterColumnList++; 174 buildCounterColumnList++;
175 if (buildCounterColumnList < 3) { 175 if (buildCounterColumnList < 3) {
176 o.items = buildUnnamed416(); 176 o.items = buildUnnamed420();
177 o.kind = "foo"; 177 o.kind = "foo";
178 o.nextPageToken = "foo"; 178 o.nextPageToken = "foo";
179 o.totalItems = 42; 179 o.totalItems = 42;
180 } 180 }
181 buildCounterColumnList--; 181 buildCounterColumnList--;
182 return o; 182 return o;
183 } 183 }
184 184
185 checkColumnList(api.ColumnList o) { 185 checkColumnList(api.ColumnList o) {
186 buildCounterColumnList++; 186 buildCounterColumnList++;
187 if (buildCounterColumnList < 3) { 187 if (buildCounterColumnList < 3) {
188 checkUnnamed416(o.items); 188 checkUnnamed420(o.items);
189 unittest.expect(o.kind, unittest.equals('foo')); 189 unittest.expect(o.kind, unittest.equals('foo'));
190 unittest.expect(o.nextPageToken, unittest.equals('foo')); 190 unittest.expect(o.nextPageToken, unittest.equals('foo'));
191 unittest.expect(o.totalItems, unittest.equals(42)); 191 unittest.expect(o.totalItems, unittest.equals(42));
192 } 192 }
193 buildCounterColumnList--; 193 buildCounterColumnList--;
194 } 194 }
195 195
196 buildUnnamed417() { 196 buildUnnamed421() {
197 var o = new core.List<core.Object>(); 197 var o = new core.List<core.Object>();
198 o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}); 198 o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'});
199 o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}); 199 o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'});
200 return o; 200 return o;
201 } 201 }
202 202
203 checkUnnamed417(core.List<core.Object> o) { 203 checkUnnamed421(core.List<core.Object> o) {
204 unittest.expect(o, unittest.hasLength(2)); 204 unittest.expect(o, unittest.hasLength(2));
205 var casted1 = (o[0]) as core.Map; unittest.expect(casted1, unittest.hasLength( 3)); unittest.expect(casted1["list"], unittest.equals([1, 2, 3])); unittest.expe ct(casted1["bool"], unittest.equals(true)); unittest.expect(casted1["string"], u nittest.equals('foo')); 205 var casted1 = (o[0]) as core.Map; unittest.expect(casted1, unittest.hasLength( 3)); unittest.expect(casted1["list"], unittest.equals([1, 2, 3])); unittest.expe ct(casted1["bool"], unittest.equals(true)); unittest.expect(casted1["string"], u nittest.equals('foo'));
206 var casted2 = (o[1]) as core.Map; unittest.expect(casted2, unittest.hasLength( 3)); unittest.expect(casted2["list"], unittest.equals([1, 2, 3])); unittest.expe ct(casted2["bool"], unittest.equals(true)); unittest.expect(casted2["string"], u nittest.equals('foo')); 206 var casted2 = (o[1]) as core.Map; unittest.expect(casted2, unittest.hasLength( 3)); unittest.expect(casted2["list"], unittest.equals([1, 2, 3])); unittest.expe ct(casted2["bool"], unittest.equals(true)); unittest.expect(casted2["string"], u nittest.equals('foo'));
207 } 207 }
208 208
209 core.int buildCounterGeometry = 0; 209 core.int buildCounterGeometry = 0;
210 buildGeometry() { 210 buildGeometry() {
211 var o = new api.Geometry(); 211 var o = new api.Geometry();
212 buildCounterGeometry++; 212 buildCounterGeometry++;
213 if (buildCounterGeometry < 3) { 213 if (buildCounterGeometry < 3) {
214 o.geometries = buildUnnamed417(); 214 o.geometries = buildUnnamed421();
215 o.geometry = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; 215 o.geometry = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'};
216 o.type = "foo"; 216 o.type = "foo";
217 } 217 }
218 buildCounterGeometry--; 218 buildCounterGeometry--;
219 return o; 219 return o;
220 } 220 }
221 221
222 checkGeometry(api.Geometry o) { 222 checkGeometry(api.Geometry o) {
223 buildCounterGeometry++; 223 buildCounterGeometry++;
224 if (buildCounterGeometry < 3) { 224 if (buildCounterGeometry < 3) {
225 checkUnnamed417(o.geometries); 225 checkUnnamed421(o.geometries);
226 var casted3 = (o.geometry) as core.Map; unittest.expect(casted3, unittest.ha sLength(3)); unittest.expect(casted3["list"], unittest.equals([1, 2, 3])); unitt est.expect(casted3["bool"], unittest.equals(true)); unittest.expect(casted3["str ing"], unittest.equals('foo')); 226 var casted3 = (o.geometry) as core.Map; unittest.expect(casted3, unittest.ha sLength(3)); unittest.expect(casted3["list"], unittest.equals([1, 2, 3])); unitt est.expect(casted3["bool"], unittest.equals(true)); unittest.expect(casted3["str ing"], unittest.equals('foo'));
227 unittest.expect(o.type, unittest.equals('foo')); 227 unittest.expect(o.type, unittest.equals('foo'));
228 } 228 }
229 buildCounterGeometry--; 229 buildCounterGeometry--;
230 } 230 }
231 231
232 core.int buildCounterImport = 0; 232 core.int buildCounterImport = 0;
233 buildImport() { 233 buildImport() {
234 var o = new api.Import(); 234 var o = new api.Import();
235 buildCounterImport++; 235 buildCounterImport++;
236 if (buildCounterImport < 3) { 236 if (buildCounterImport < 3) {
237 o.kind = "foo"; 237 o.kind = "foo";
238 o.numRowsReceived = "foo"; 238 o.numRowsReceived = "foo";
239 } 239 }
240 buildCounterImport--; 240 buildCounterImport--;
241 return o; 241 return o;
242 } 242 }
243 243
244 checkImport(api.Import o) { 244 checkImport(api.Import o) {
245 buildCounterImport++; 245 buildCounterImport++;
246 if (buildCounterImport < 3) { 246 if (buildCounterImport < 3) {
247 unittest.expect(o.kind, unittest.equals('foo')); 247 unittest.expect(o.kind, unittest.equals('foo'));
248 unittest.expect(o.numRowsReceived, unittest.equals('foo')); 248 unittest.expect(o.numRowsReceived, unittest.equals('foo'));
249 } 249 }
250 buildCounterImport--; 250 buildCounterImport--;
251 } 251 }
252 252
253 buildUnnamed418() { 253 buildUnnamed422() {
254 var o = new core.List<core.double>(); 254 var o = new core.List<core.double>();
255 o.add(42.0); 255 o.add(42.0);
256 o.add(42.0); 256 o.add(42.0);
257 return o; 257 return o;
258 } 258 }
259 259
260 checkUnnamed418(core.List<core.double> o) { 260 checkUnnamed422(core.List<core.double> o) {
261 unittest.expect(o, unittest.hasLength(2)); 261 unittest.expect(o, unittest.hasLength(2));
262 unittest.expect(o[0], unittest.equals(42.0)); 262 unittest.expect(o[0], unittest.equals(42.0));
263 unittest.expect(o[1], unittest.equals(42.0)); 263 unittest.expect(o[1], unittest.equals(42.0));
264 } 264 }
265 265
266 buildUnnamed419() { 266 buildUnnamed423() {
267 var o = new core.List<core.List<core.double>>(); 267 var o = new core.List<core.List<core.double>>();
268 o.add(buildUnnamed418()); 268 o.add(buildUnnamed422());
269 o.add(buildUnnamed418()); 269 o.add(buildUnnamed422());
270 return o; 270 return o;
271 } 271 }
272 272
273 checkUnnamed419(core.List<core.List<core.double>> o) { 273 checkUnnamed423(core.List<core.List<core.double>> o) {
274 unittest.expect(o, unittest.hasLength(2)); 274 unittest.expect(o, unittest.hasLength(2));
275 checkUnnamed418(o[0]); 275 checkUnnamed422(o[0]);
276 checkUnnamed418(o[1]); 276 checkUnnamed422(o[1]);
277 } 277 }
278 278
279 core.int buildCounterLine = 0; 279 core.int buildCounterLine = 0;
280 buildLine() { 280 buildLine() {
281 var o = new api.Line(); 281 var o = new api.Line();
282 buildCounterLine++; 282 buildCounterLine++;
283 if (buildCounterLine < 3) { 283 if (buildCounterLine < 3) {
284 o.coordinates = buildUnnamed419(); 284 o.coordinates = buildUnnamed423();
285 o.type = "foo"; 285 o.type = "foo";
286 } 286 }
287 buildCounterLine--; 287 buildCounterLine--;
288 return o; 288 return o;
289 } 289 }
290 290
291 checkLine(api.Line o) { 291 checkLine(api.Line o) {
292 buildCounterLine++; 292 buildCounterLine++;
293 if (buildCounterLine < 3) { 293 if (buildCounterLine < 3) {
294 checkUnnamed419(o.coordinates); 294 checkUnnamed423(o.coordinates);
295 unittest.expect(o.type, unittest.equals('foo')); 295 unittest.expect(o.type, unittest.equals('foo'));
296 } 296 }
297 buildCounterLine--; 297 buildCounterLine--;
298 } 298 }
299 299
300 core.int buildCounterLineStyle = 0; 300 core.int buildCounterLineStyle = 0;
301 buildLineStyle() { 301 buildLineStyle() {
302 var o = new api.LineStyle(); 302 var o = new api.LineStyle();
303 buildCounterLineStyle++; 303 buildCounterLineStyle++;
304 if (buildCounterLineStyle < 3) { 304 if (buildCounterLineStyle < 3) {
(...skipping 12 matching lines...) Expand all
317 if (buildCounterLineStyle < 3) { 317 if (buildCounterLineStyle < 3) {
318 unittest.expect(o.strokeColor, unittest.equals('foo')); 318 unittest.expect(o.strokeColor, unittest.equals('foo'));
319 checkStyleFunction(o.strokeColorStyler); 319 checkStyleFunction(o.strokeColorStyler);
320 unittest.expect(o.strokeOpacity, unittest.equals(42.0)); 320 unittest.expect(o.strokeOpacity, unittest.equals(42.0));
321 unittest.expect(o.strokeWeight, unittest.equals(42)); 321 unittest.expect(o.strokeWeight, unittest.equals(42));
322 checkStyleFunction(o.strokeWeightStyler); 322 checkStyleFunction(o.strokeWeightStyler);
323 } 323 }
324 buildCounterLineStyle--; 324 buildCounterLineStyle--;
325 } 325 }
326 326
327 buildUnnamed420() { 327 buildUnnamed424() {
328 var o = new core.List<core.double>(); 328 var o = new core.List<core.double>();
329 o.add(42.0); 329 o.add(42.0);
330 o.add(42.0); 330 o.add(42.0);
331 return o; 331 return o;
332 } 332 }
333 333
334 checkUnnamed420(core.List<core.double> o) { 334 checkUnnamed424(core.List<core.double> o) {
335 unittest.expect(o, unittest.hasLength(2)); 335 unittest.expect(o, unittest.hasLength(2));
336 unittest.expect(o[0], unittest.equals(42.0)); 336 unittest.expect(o[0], unittest.equals(42.0));
337 unittest.expect(o[1], unittest.equals(42.0)); 337 unittest.expect(o[1], unittest.equals(42.0));
338 } 338 }
339 339
340 core.int buildCounterPoint = 0; 340 core.int buildCounterPoint = 0;
341 buildPoint() { 341 buildPoint() {
342 var o = new api.Point(); 342 var o = new api.Point();
343 buildCounterPoint++; 343 buildCounterPoint++;
344 if (buildCounterPoint < 3) { 344 if (buildCounterPoint < 3) {
345 o.coordinates = buildUnnamed420(); 345 o.coordinates = buildUnnamed424();
346 o.type = "foo"; 346 o.type = "foo";
347 } 347 }
348 buildCounterPoint--; 348 buildCounterPoint--;
349 return o; 349 return o;
350 } 350 }
351 351
352 checkPoint(api.Point o) { 352 checkPoint(api.Point o) {
353 buildCounterPoint++; 353 buildCounterPoint++;
354 if (buildCounterPoint < 3) { 354 if (buildCounterPoint < 3) {
355 checkUnnamed420(o.coordinates); 355 checkUnnamed424(o.coordinates);
356 unittest.expect(o.type, unittest.equals('foo')); 356 unittest.expect(o.type, unittest.equals('foo'));
357 } 357 }
358 buildCounterPoint--; 358 buildCounterPoint--;
359 } 359 }
360 360
361 core.int buildCounterPointStyle = 0; 361 core.int buildCounterPointStyle = 0;
362 buildPointStyle() { 362 buildPointStyle() {
363 var o = new api.PointStyle(); 363 var o = new api.PointStyle();
364 buildCounterPointStyle++; 364 buildCounterPointStyle++;
365 if (buildCounterPointStyle < 3) { 365 if (buildCounterPointStyle < 3) {
366 o.iconName = "foo"; 366 o.iconName = "foo";
367 o.iconStyler = buildStyleFunction(); 367 o.iconStyler = buildStyleFunction();
368 } 368 }
369 buildCounterPointStyle--; 369 buildCounterPointStyle--;
370 return o; 370 return o;
371 } 371 }
372 372
373 checkPointStyle(api.PointStyle o) { 373 checkPointStyle(api.PointStyle o) {
374 buildCounterPointStyle++; 374 buildCounterPointStyle++;
375 if (buildCounterPointStyle < 3) { 375 if (buildCounterPointStyle < 3) {
376 unittest.expect(o.iconName, unittest.equals('foo')); 376 unittest.expect(o.iconName, unittest.equals('foo'));
377 checkStyleFunction(o.iconStyler); 377 checkStyleFunction(o.iconStyler);
378 } 378 }
379 buildCounterPointStyle--; 379 buildCounterPointStyle--;
380 } 380 }
381 381
382 buildUnnamed421() { 382 buildUnnamed425() {
383 var o = new core.List<core.double>(); 383 var o = new core.List<core.double>();
384 o.add(42.0); 384 o.add(42.0);
385 o.add(42.0); 385 o.add(42.0);
386 return o; 386 return o;
387 } 387 }
388 388
389 checkUnnamed421(core.List<core.double> o) { 389 checkUnnamed425(core.List<core.double> o) {
390 unittest.expect(o, unittest.hasLength(2)); 390 unittest.expect(o, unittest.hasLength(2));
391 unittest.expect(o[0], unittest.equals(42.0)); 391 unittest.expect(o[0], unittest.equals(42.0));
392 unittest.expect(o[1], unittest.equals(42.0)); 392 unittest.expect(o[1], unittest.equals(42.0));
393 } 393 }
394 394
395 buildUnnamed422() { 395 buildUnnamed426() {
396 var o = new core.List<core.List<core.double>>(); 396 var o = new core.List<core.List<core.double>>();
397 o.add(buildUnnamed421()); 397 o.add(buildUnnamed425());
398 o.add(buildUnnamed421()); 398 o.add(buildUnnamed425());
399 return o; 399 return o;
400 } 400 }
401 401
402 checkUnnamed422(core.List<core.List<core.double>> o) { 402 checkUnnamed426(core.List<core.List<core.double>> o) {
403 unittest.expect(o, unittest.hasLength(2)); 403 unittest.expect(o, unittest.hasLength(2));
404 checkUnnamed421(o[0]); 404 checkUnnamed425(o[0]);
405 checkUnnamed421(o[1]); 405 checkUnnamed425(o[1]);
406 } 406 }
407 407
408 buildUnnamed423() { 408 buildUnnamed427() {
409 var o = new core.List<core.List<core.List<core.double>>>(); 409 var o = new core.List<core.List<core.List<core.double>>>();
410 o.add(buildUnnamed422()); 410 o.add(buildUnnamed426());
411 o.add(buildUnnamed422()); 411 o.add(buildUnnamed426());
412 return o; 412 return o;
413 } 413 }
414 414
415 checkUnnamed423(core.List<core.List<core.List<core.double>>> o) { 415 checkUnnamed427(core.List<core.List<core.List<core.double>>> o) {
416 unittest.expect(o, unittest.hasLength(2)); 416 unittest.expect(o, unittest.hasLength(2));
417 checkUnnamed422(o[0]); 417 checkUnnamed426(o[0]);
418 checkUnnamed422(o[1]); 418 checkUnnamed426(o[1]);
419 } 419 }
420 420
421 core.int buildCounterPolygon = 0; 421 core.int buildCounterPolygon = 0;
422 buildPolygon() { 422 buildPolygon() {
423 var o = new api.Polygon(); 423 var o = new api.Polygon();
424 buildCounterPolygon++; 424 buildCounterPolygon++;
425 if (buildCounterPolygon < 3) { 425 if (buildCounterPolygon < 3) {
426 o.coordinates = buildUnnamed423(); 426 o.coordinates = buildUnnamed427();
427 o.type = "foo"; 427 o.type = "foo";
428 } 428 }
429 buildCounterPolygon--; 429 buildCounterPolygon--;
430 return o; 430 return o;
431 } 431 }
432 432
433 checkPolygon(api.Polygon o) { 433 checkPolygon(api.Polygon o) {
434 buildCounterPolygon++; 434 buildCounterPolygon++;
435 if (buildCounterPolygon < 3) { 435 if (buildCounterPolygon < 3) {
436 checkUnnamed423(o.coordinates); 436 checkUnnamed427(o.coordinates);
437 unittest.expect(o.type, unittest.equals('foo')); 437 unittest.expect(o.type, unittest.equals('foo'));
438 } 438 }
439 buildCounterPolygon--; 439 buildCounterPolygon--;
440 } 440 }
441 441
442 core.int buildCounterPolygonStyle = 0; 442 core.int buildCounterPolygonStyle = 0;
443 buildPolygonStyle() { 443 buildPolygonStyle() {
444 var o = new api.PolygonStyle(); 444 var o = new api.PolygonStyle();
445 buildCounterPolygonStyle++; 445 buildCounterPolygonStyle++;
446 if (buildCounterPolygonStyle < 3) { 446 if (buildCounterPolygonStyle < 3) {
(...skipping 18 matching lines...) Expand all
465 unittest.expect(o.fillOpacity, unittest.equals(42.0)); 465 unittest.expect(o.fillOpacity, unittest.equals(42.0));
466 unittest.expect(o.strokeColor, unittest.equals('foo')); 466 unittest.expect(o.strokeColor, unittest.equals('foo'));
467 checkStyleFunction(o.strokeColorStyler); 467 checkStyleFunction(o.strokeColorStyler);
468 unittest.expect(o.strokeOpacity, unittest.equals(42.0)); 468 unittest.expect(o.strokeOpacity, unittest.equals(42.0));
469 unittest.expect(o.strokeWeight, unittest.equals(42)); 469 unittest.expect(o.strokeWeight, unittest.equals(42));
470 checkStyleFunction(o.strokeWeightStyler); 470 checkStyleFunction(o.strokeWeightStyler);
471 } 471 }
472 buildCounterPolygonStyle--; 472 buildCounterPolygonStyle--;
473 } 473 }
474 474
475 buildUnnamed424() { 475 buildUnnamed428() {
476 var o = new core.List<core.String>(); 476 var o = new core.List<core.String>();
477 o.add("foo"); 477 o.add("foo");
478 o.add("foo"); 478 o.add("foo");
479 return o; 479 return o;
480 } 480 }
481 481
482 checkUnnamed424(core.List<core.String> o) { 482 checkUnnamed428(core.List<core.String> o) {
483 unittest.expect(o, unittest.hasLength(2)); 483 unittest.expect(o, unittest.hasLength(2));
484 unittest.expect(o[0], unittest.equals('foo')); 484 unittest.expect(o[0], unittest.equals('foo'));
485 unittest.expect(o[1], unittest.equals('foo')); 485 unittest.expect(o[1], unittest.equals('foo'));
486 } 486 }
487 487
488 buildUnnamed425() { 488 buildUnnamed429() {
489 var o = new core.List<core.Object>(); 489 var o = new core.List<core.Object>();
490 o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}); 490 o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'});
491 o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}); 491 o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'});
492 return o; 492 return o;
493 } 493 }
494 494
495 checkUnnamed425(core.List<core.Object> o) { 495 checkUnnamed429(core.List<core.Object> o) {
496 unittest.expect(o, unittest.hasLength(2)); 496 unittest.expect(o, unittest.hasLength(2));
497 var casted4 = (o[0]) as core.Map; unittest.expect(casted4, unittest.hasLength( 3)); unittest.expect(casted4["list"], unittest.equals([1, 2, 3])); unittest.expe ct(casted4["bool"], unittest.equals(true)); unittest.expect(casted4["string"], u nittest.equals('foo')); 497 var casted4 = (o[0]) as core.Map; unittest.expect(casted4, unittest.hasLength( 3)); unittest.expect(casted4["list"], unittest.equals([1, 2, 3])); unittest.expe ct(casted4["bool"], unittest.equals(true)); unittest.expect(casted4["string"], u nittest.equals('foo'));
498 var casted5 = (o[1]) as core.Map; unittest.expect(casted5, unittest.hasLength( 3)); unittest.expect(casted5["list"], unittest.equals([1, 2, 3])); unittest.expe ct(casted5["bool"], unittest.equals(true)); unittest.expect(casted5["string"], u nittest.equals('foo')); 498 var casted5 = (o[1]) as core.Map; unittest.expect(casted5, unittest.hasLength( 3)); unittest.expect(casted5["list"], unittest.equals([1, 2, 3])); unittest.expe ct(casted5["bool"], unittest.equals(true)); unittest.expect(casted5["string"], u nittest.equals('foo'));
499 } 499 }
500 500
501 buildUnnamed426() { 501 buildUnnamed430() {
502 var o = new core.List<core.List<core.Object>>(); 502 var o = new core.List<core.List<core.Object>>();
503 o.add(buildUnnamed425()); 503 o.add(buildUnnamed429());
504 o.add(buildUnnamed425()); 504 o.add(buildUnnamed429());
505 return o; 505 return o;
506 } 506 }
507 507
508 checkUnnamed426(core.List<core.List<core.Object>> o) { 508 checkUnnamed430(core.List<core.List<core.Object>> o) {
509 unittest.expect(o, unittest.hasLength(2)); 509 unittest.expect(o, unittest.hasLength(2));
510 checkUnnamed425(o[0]); 510 checkUnnamed429(o[0]);
511 checkUnnamed425(o[1]); 511 checkUnnamed429(o[1]);
512 } 512 }
513 513
514 core.int buildCounterSqlresponse = 0; 514 core.int buildCounterSqlresponse = 0;
515 buildSqlresponse() { 515 buildSqlresponse() {
516 var o = new api.Sqlresponse(); 516 var o = new api.Sqlresponse();
517 buildCounterSqlresponse++; 517 buildCounterSqlresponse++;
518 if (buildCounterSqlresponse < 3) { 518 if (buildCounterSqlresponse < 3) {
519 o.columns = buildUnnamed424(); 519 o.columns = buildUnnamed428();
520 o.kind = "foo"; 520 o.kind = "foo";
521 o.rows = buildUnnamed426(); 521 o.rows = buildUnnamed430();
522 } 522 }
523 buildCounterSqlresponse--; 523 buildCounterSqlresponse--;
524 return o; 524 return o;
525 } 525 }
526 526
527 checkSqlresponse(api.Sqlresponse o) { 527 checkSqlresponse(api.Sqlresponse o) {
528 buildCounterSqlresponse++; 528 buildCounterSqlresponse++;
529 if (buildCounterSqlresponse < 3) { 529 if (buildCounterSqlresponse < 3) {
530 checkUnnamed424(o.columns); 530 checkUnnamed428(o.columns);
531 unittest.expect(o.kind, unittest.equals('foo')); 531 unittest.expect(o.kind, unittest.equals('foo'));
532 checkUnnamed426(o.rows); 532 checkUnnamed430(o.rows);
533 } 533 }
534 buildCounterSqlresponse--; 534 buildCounterSqlresponse--;
535 } 535 }
536 536
537 buildUnnamed427() { 537 buildUnnamed431() {
538 var o = new core.List<api.Bucket>(); 538 var o = new core.List<api.Bucket>();
539 o.add(buildBucket()); 539 o.add(buildBucket());
540 o.add(buildBucket()); 540 o.add(buildBucket());
541 return o; 541 return o;
542 } 542 }
543 543
544 checkUnnamed427(core.List<api.Bucket> o) { 544 checkUnnamed431(core.List<api.Bucket> o) {
545 unittest.expect(o, unittest.hasLength(2)); 545 unittest.expect(o, unittest.hasLength(2));
546 checkBucket(o[0]); 546 checkBucket(o[0]);
547 checkBucket(o[1]); 547 checkBucket(o[1]);
548 } 548 }
549 549
550 core.int buildCounterStyleFunctionGradientColors = 0; 550 core.int buildCounterStyleFunctionGradientColors = 0;
551 buildStyleFunctionGradientColors() { 551 buildStyleFunctionGradientColors() {
552 var o = new api.StyleFunctionGradientColors(); 552 var o = new api.StyleFunctionGradientColors();
553 buildCounterStyleFunctionGradientColors++; 553 buildCounterStyleFunctionGradientColors++;
554 if (buildCounterStyleFunctionGradientColors < 3) { 554 if (buildCounterStyleFunctionGradientColors < 3) {
555 o.color = "foo"; 555 o.color = "foo";
556 o.opacity = 42.0; 556 o.opacity = 42.0;
557 } 557 }
558 buildCounterStyleFunctionGradientColors--; 558 buildCounterStyleFunctionGradientColors--;
559 return o; 559 return o;
560 } 560 }
561 561
562 checkStyleFunctionGradientColors(api.StyleFunctionGradientColors o) { 562 checkStyleFunctionGradientColors(api.StyleFunctionGradientColors o) {
563 buildCounterStyleFunctionGradientColors++; 563 buildCounterStyleFunctionGradientColors++;
564 if (buildCounterStyleFunctionGradientColors < 3) { 564 if (buildCounterStyleFunctionGradientColors < 3) {
565 unittest.expect(o.color, unittest.equals('foo')); 565 unittest.expect(o.color, unittest.equals('foo'));
566 unittest.expect(o.opacity, unittest.equals(42.0)); 566 unittest.expect(o.opacity, unittest.equals(42.0));
567 } 567 }
568 buildCounterStyleFunctionGradientColors--; 568 buildCounterStyleFunctionGradientColors--;
569 } 569 }
570 570
571 buildUnnamed428() { 571 buildUnnamed432() {
572 var o = new core.List<api.StyleFunctionGradientColors>(); 572 var o = new core.List<api.StyleFunctionGradientColors>();
573 o.add(buildStyleFunctionGradientColors()); 573 o.add(buildStyleFunctionGradientColors());
574 o.add(buildStyleFunctionGradientColors()); 574 o.add(buildStyleFunctionGradientColors());
575 return o; 575 return o;
576 } 576 }
577 577
578 checkUnnamed428(core.List<api.StyleFunctionGradientColors> o) { 578 checkUnnamed432(core.List<api.StyleFunctionGradientColors> o) {
579 unittest.expect(o, unittest.hasLength(2)); 579 unittest.expect(o, unittest.hasLength(2));
580 checkStyleFunctionGradientColors(o[0]); 580 checkStyleFunctionGradientColors(o[0]);
581 checkStyleFunctionGradientColors(o[1]); 581 checkStyleFunctionGradientColors(o[1]);
582 } 582 }
583 583
584 core.int buildCounterStyleFunctionGradient = 0; 584 core.int buildCounterStyleFunctionGradient = 0;
585 buildStyleFunctionGradient() { 585 buildStyleFunctionGradient() {
586 var o = new api.StyleFunctionGradient(); 586 var o = new api.StyleFunctionGradient();
587 buildCounterStyleFunctionGradient++; 587 buildCounterStyleFunctionGradient++;
588 if (buildCounterStyleFunctionGradient < 3) { 588 if (buildCounterStyleFunctionGradient < 3) {
589 o.colors = buildUnnamed428(); 589 o.colors = buildUnnamed432();
590 o.max = 42.0; 590 o.max = 42.0;
591 o.min = 42.0; 591 o.min = 42.0;
592 } 592 }
593 buildCounterStyleFunctionGradient--; 593 buildCounterStyleFunctionGradient--;
594 return o; 594 return o;
595 } 595 }
596 596
597 checkStyleFunctionGradient(api.StyleFunctionGradient o) { 597 checkStyleFunctionGradient(api.StyleFunctionGradient o) {
598 buildCounterStyleFunctionGradient++; 598 buildCounterStyleFunctionGradient++;
599 if (buildCounterStyleFunctionGradient < 3) { 599 if (buildCounterStyleFunctionGradient < 3) {
600 checkUnnamed428(o.colors); 600 checkUnnamed432(o.colors);
601 unittest.expect(o.max, unittest.equals(42.0)); 601 unittest.expect(o.max, unittest.equals(42.0));
602 unittest.expect(o.min, unittest.equals(42.0)); 602 unittest.expect(o.min, unittest.equals(42.0));
603 } 603 }
604 buildCounterStyleFunctionGradient--; 604 buildCounterStyleFunctionGradient--;
605 } 605 }
606 606
607 core.int buildCounterStyleFunction = 0; 607 core.int buildCounterStyleFunction = 0;
608 buildStyleFunction() { 608 buildStyleFunction() {
609 var o = new api.StyleFunction(); 609 var o = new api.StyleFunction();
610 buildCounterStyleFunction++; 610 buildCounterStyleFunction++;
611 if (buildCounterStyleFunction < 3) { 611 if (buildCounterStyleFunction < 3) {
612 o.buckets = buildUnnamed427(); 612 o.buckets = buildUnnamed431();
613 o.columnName = "foo"; 613 o.columnName = "foo";
614 o.gradient = buildStyleFunctionGradient(); 614 o.gradient = buildStyleFunctionGradient();
615 o.kind = "foo"; 615 o.kind = "foo";
616 } 616 }
617 buildCounterStyleFunction--; 617 buildCounterStyleFunction--;
618 return o; 618 return o;
619 } 619 }
620 620
621 checkStyleFunction(api.StyleFunction o) { 621 checkStyleFunction(api.StyleFunction o) {
622 buildCounterStyleFunction++; 622 buildCounterStyleFunction++;
623 if (buildCounterStyleFunction < 3) { 623 if (buildCounterStyleFunction < 3) {
624 checkUnnamed427(o.buckets); 624 checkUnnamed431(o.buckets);
625 unittest.expect(o.columnName, unittest.equals('foo')); 625 unittest.expect(o.columnName, unittest.equals('foo'));
626 checkStyleFunctionGradient(o.gradient); 626 checkStyleFunctionGradient(o.gradient);
627 unittest.expect(o.kind, unittest.equals('foo')); 627 unittest.expect(o.kind, unittest.equals('foo'));
628 } 628 }
629 buildCounterStyleFunction--; 629 buildCounterStyleFunction--;
630 } 630 }
631 631
632 core.int buildCounterStyleSetting = 0; 632 core.int buildCounterStyleSetting = 0;
633 buildStyleSetting() { 633 buildStyleSetting() {
634 var o = new api.StyleSetting(); 634 var o = new api.StyleSetting();
(...skipping 18 matching lines...) Expand all
653 checkPointStyle(o.markerOptions); 653 checkPointStyle(o.markerOptions);
654 unittest.expect(o.name, unittest.equals('foo')); 654 unittest.expect(o.name, unittest.equals('foo'));
655 checkPolygonStyle(o.polygonOptions); 655 checkPolygonStyle(o.polygonOptions);
656 checkLineStyle(o.polylineOptions); 656 checkLineStyle(o.polylineOptions);
657 unittest.expect(o.styleId, unittest.equals(42)); 657 unittest.expect(o.styleId, unittest.equals(42));
658 unittest.expect(o.tableId, unittest.equals('foo')); 658 unittest.expect(o.tableId, unittest.equals('foo'));
659 } 659 }
660 buildCounterStyleSetting--; 660 buildCounterStyleSetting--;
661 } 661 }
662 662
663 buildUnnamed429() { 663 buildUnnamed433() {
664 var o = new core.List<api.StyleSetting>(); 664 var o = new core.List<api.StyleSetting>();
665 o.add(buildStyleSetting()); 665 o.add(buildStyleSetting());
666 o.add(buildStyleSetting()); 666 o.add(buildStyleSetting());
667 return o; 667 return o;
668 } 668 }
669 669
670 checkUnnamed429(core.List<api.StyleSetting> o) { 670 checkUnnamed433(core.List<api.StyleSetting> o) {
671 unittest.expect(o, unittest.hasLength(2)); 671 unittest.expect(o, unittest.hasLength(2));
672 checkStyleSetting(o[0]); 672 checkStyleSetting(o[0]);
673 checkStyleSetting(o[1]); 673 checkStyleSetting(o[1]);
674 } 674 }
675 675
676 core.int buildCounterStyleSettingList = 0; 676 core.int buildCounterStyleSettingList = 0;
677 buildStyleSettingList() { 677 buildStyleSettingList() {
678 var o = new api.StyleSettingList(); 678 var o = new api.StyleSettingList();
679 buildCounterStyleSettingList++; 679 buildCounterStyleSettingList++;
680 if (buildCounterStyleSettingList < 3) { 680 if (buildCounterStyleSettingList < 3) {
681 o.items = buildUnnamed429(); 681 o.items = buildUnnamed433();
682 o.kind = "foo"; 682 o.kind = "foo";
683 o.nextPageToken = "foo"; 683 o.nextPageToken = "foo";
684 o.totalItems = 42; 684 o.totalItems = 42;
685 } 685 }
686 buildCounterStyleSettingList--; 686 buildCounterStyleSettingList--;
687 return o; 687 return o;
688 } 688 }
689 689
690 checkStyleSettingList(api.StyleSettingList o) { 690 checkStyleSettingList(api.StyleSettingList o) {
691 buildCounterStyleSettingList++; 691 buildCounterStyleSettingList++;
692 if (buildCounterStyleSettingList < 3) { 692 if (buildCounterStyleSettingList < 3) {
693 checkUnnamed429(o.items); 693 checkUnnamed433(o.items);
694 unittest.expect(o.kind, unittest.equals('foo')); 694 unittest.expect(o.kind, unittest.equals('foo'));
695 unittest.expect(o.nextPageToken, unittest.equals('foo')); 695 unittest.expect(o.nextPageToken, unittest.equals('foo'));
696 unittest.expect(o.totalItems, unittest.equals(42)); 696 unittest.expect(o.totalItems, unittest.equals(42));
697 } 697 }
698 buildCounterStyleSettingList--; 698 buildCounterStyleSettingList--;
699 } 699 }
700 700
701 buildUnnamed430() { 701 buildUnnamed434() {
702 var o = new core.List<core.String>(); 702 var o = new core.List<core.String>();
703 o.add("foo"); 703 o.add("foo");
704 o.add("foo"); 704 o.add("foo");
705 return o; 705 return o;
706 } 706 }
707 707
708 checkUnnamed430(core.List<core.String> o) { 708 checkUnnamed434(core.List<core.String> o) {
709 unittest.expect(o, unittest.hasLength(2)); 709 unittest.expect(o, unittest.hasLength(2));
710 unittest.expect(o[0], unittest.equals('foo')); 710 unittest.expect(o[0], unittest.equals('foo'));
711 unittest.expect(o[1], unittest.equals('foo')); 711 unittest.expect(o[1], unittest.equals('foo'));
712 } 712 }
713 713
714 buildUnnamed431() { 714 buildUnnamed435() {
715 var o = new core.List<api.Column>(); 715 var o = new core.List<api.Column>();
716 o.add(buildColumn()); 716 o.add(buildColumn());
717 o.add(buildColumn()); 717 o.add(buildColumn());
718 return o; 718 return o;
719 } 719 }
720 720
721 checkUnnamed431(core.List<api.Column> o) { 721 checkUnnamed435(core.List<api.Column> o) {
722 unittest.expect(o, unittest.hasLength(2)); 722 unittest.expect(o, unittest.hasLength(2));
723 checkColumn(o[0]); 723 checkColumn(o[0]);
724 checkColumn(o[1]); 724 checkColumn(o[1]);
725 } 725 }
726 726
727 core.int buildCounterTable = 0; 727 core.int buildCounterTable = 0;
728 buildTable() { 728 buildTable() {
729 var o = new api.Table(); 729 var o = new api.Table();
730 buildCounterTable++; 730 buildCounterTable++;
731 if (buildCounterTable < 3) { 731 if (buildCounterTable < 3) {
732 o.attribution = "foo"; 732 o.attribution = "foo";
733 o.attributionLink = "foo"; 733 o.attributionLink = "foo";
734 o.baseTableIds = buildUnnamed430(); 734 o.baseTableIds = buildUnnamed434();
735 o.columnPropertiesJsonSchema = "foo"; 735 o.columnPropertiesJsonSchema = "foo";
736 o.columns = buildUnnamed431(); 736 o.columns = buildUnnamed435();
737 o.description = "foo"; 737 o.description = "foo";
738 o.isExportable = true; 738 o.isExportable = true;
739 o.kind = "foo"; 739 o.kind = "foo";
740 o.name = "foo"; 740 o.name = "foo";
741 o.sql = "foo"; 741 o.sql = "foo";
742 o.tableId = "foo"; 742 o.tableId = "foo";
743 o.tablePropertiesJson = "foo"; 743 o.tablePropertiesJson = "foo";
744 o.tablePropertiesJsonSchema = "foo"; 744 o.tablePropertiesJsonSchema = "foo";
745 } 745 }
746 buildCounterTable--; 746 buildCounterTable--;
747 return o; 747 return o;
748 } 748 }
749 749
750 checkTable(api.Table o) { 750 checkTable(api.Table o) {
751 buildCounterTable++; 751 buildCounterTable++;
752 if (buildCounterTable < 3) { 752 if (buildCounterTable < 3) {
753 unittest.expect(o.attribution, unittest.equals('foo')); 753 unittest.expect(o.attribution, unittest.equals('foo'));
754 unittest.expect(o.attributionLink, unittest.equals('foo')); 754 unittest.expect(o.attributionLink, unittest.equals('foo'));
755 checkUnnamed430(o.baseTableIds); 755 checkUnnamed434(o.baseTableIds);
756 unittest.expect(o.columnPropertiesJsonSchema, unittest.equals('foo')); 756 unittest.expect(o.columnPropertiesJsonSchema, unittest.equals('foo'));
757 checkUnnamed431(o.columns); 757 checkUnnamed435(o.columns);
758 unittest.expect(o.description, unittest.equals('foo')); 758 unittest.expect(o.description, unittest.equals('foo'));
759 unittest.expect(o.isExportable, unittest.isTrue); 759 unittest.expect(o.isExportable, unittest.isTrue);
760 unittest.expect(o.kind, unittest.equals('foo')); 760 unittest.expect(o.kind, unittest.equals('foo'));
761 unittest.expect(o.name, unittest.equals('foo')); 761 unittest.expect(o.name, unittest.equals('foo'));
762 unittest.expect(o.sql, unittest.equals('foo')); 762 unittest.expect(o.sql, unittest.equals('foo'));
763 unittest.expect(o.tableId, unittest.equals('foo')); 763 unittest.expect(o.tableId, unittest.equals('foo'));
764 unittest.expect(o.tablePropertiesJson, unittest.equals('foo')); 764 unittest.expect(o.tablePropertiesJson, unittest.equals('foo'));
765 unittest.expect(o.tablePropertiesJsonSchema, unittest.equals('foo')); 765 unittest.expect(o.tablePropertiesJsonSchema, unittest.equals('foo'));
766 } 766 }
767 buildCounterTable--; 767 buildCounterTable--;
768 } 768 }
769 769
770 buildUnnamed432() { 770 buildUnnamed436() {
771 var o = new core.List<api.Table>(); 771 var o = new core.List<api.Table>();
772 o.add(buildTable()); 772 o.add(buildTable());
773 o.add(buildTable()); 773 o.add(buildTable());
774 return o; 774 return o;
775 } 775 }
776 776
777 checkUnnamed432(core.List<api.Table> o) { 777 checkUnnamed436(core.List<api.Table> o) {
778 unittest.expect(o, unittest.hasLength(2)); 778 unittest.expect(o, unittest.hasLength(2));
779 checkTable(o[0]); 779 checkTable(o[0]);
780 checkTable(o[1]); 780 checkTable(o[1]);
781 } 781 }
782 782
783 core.int buildCounterTableList = 0; 783 core.int buildCounterTableList = 0;
784 buildTableList() { 784 buildTableList() {
785 var o = new api.TableList(); 785 var o = new api.TableList();
786 buildCounterTableList++; 786 buildCounterTableList++;
787 if (buildCounterTableList < 3) { 787 if (buildCounterTableList < 3) {
788 o.items = buildUnnamed432(); 788 o.items = buildUnnamed436();
789 o.kind = "foo"; 789 o.kind = "foo";
790 o.nextPageToken = "foo"; 790 o.nextPageToken = "foo";
791 } 791 }
792 buildCounterTableList--; 792 buildCounterTableList--;
793 return o; 793 return o;
794 } 794 }
795 795
796 checkTableList(api.TableList o) { 796 checkTableList(api.TableList o) {
797 buildCounterTableList++; 797 buildCounterTableList++;
798 if (buildCounterTableList < 3) { 798 if (buildCounterTableList < 3) {
799 checkUnnamed432(o.items); 799 checkUnnamed436(o.items);
800 unittest.expect(o.kind, unittest.equals('foo')); 800 unittest.expect(o.kind, unittest.equals('foo'));
801 unittest.expect(o.nextPageToken, unittest.equals('foo')); 801 unittest.expect(o.nextPageToken, unittest.equals('foo'));
802 } 802 }
803 buildCounterTableList--; 803 buildCounterTableList--;
804 } 804 }
805 805
806 core.int buildCounterTask = 0; 806 core.int buildCounterTask = 0;
807 buildTask() { 807 buildTask() {
808 var o = new api.Task(); 808 var o = new api.Task();
809 buildCounterTask++; 809 buildCounterTask++;
(...skipping 13 matching lines...) Expand all
823 if (buildCounterTask < 3) { 823 if (buildCounterTask < 3) {
824 unittest.expect(o.kind, unittest.equals('foo')); 824 unittest.expect(o.kind, unittest.equals('foo'));
825 unittest.expect(o.progress, unittest.equals('foo')); 825 unittest.expect(o.progress, unittest.equals('foo'));
826 unittest.expect(o.started, unittest.isTrue); 826 unittest.expect(o.started, unittest.isTrue);
827 unittest.expect(o.taskId, unittest.equals('foo')); 827 unittest.expect(o.taskId, unittest.equals('foo'));
828 unittest.expect(o.type, unittest.equals('foo')); 828 unittest.expect(o.type, unittest.equals('foo'));
829 } 829 }
830 buildCounterTask--; 830 buildCounterTask--;
831 } 831 }
832 832
833 buildUnnamed433() { 833 buildUnnamed437() {
834 var o = new core.List<api.Task>(); 834 var o = new core.List<api.Task>();
835 o.add(buildTask()); 835 o.add(buildTask());
836 o.add(buildTask()); 836 o.add(buildTask());
837 return o; 837 return o;
838 } 838 }
839 839
840 checkUnnamed433(core.List<api.Task> o) { 840 checkUnnamed437(core.List<api.Task> o) {
841 unittest.expect(o, unittest.hasLength(2)); 841 unittest.expect(o, unittest.hasLength(2));
842 checkTask(o[0]); 842 checkTask(o[0]);
843 checkTask(o[1]); 843 checkTask(o[1]);
844 } 844 }
845 845
846 core.int buildCounterTaskList = 0; 846 core.int buildCounterTaskList = 0;
847 buildTaskList() { 847 buildTaskList() {
848 var o = new api.TaskList(); 848 var o = new api.TaskList();
849 buildCounterTaskList++; 849 buildCounterTaskList++;
850 if (buildCounterTaskList < 3) { 850 if (buildCounterTaskList < 3) {
851 o.items = buildUnnamed433(); 851 o.items = buildUnnamed437();
852 o.kind = "foo"; 852 o.kind = "foo";
853 o.nextPageToken = "foo"; 853 o.nextPageToken = "foo";
854 o.totalItems = 42; 854 o.totalItems = 42;
855 } 855 }
856 buildCounterTaskList--; 856 buildCounterTaskList--;
857 return o; 857 return o;
858 } 858 }
859 859
860 checkTaskList(api.TaskList o) { 860 checkTaskList(api.TaskList o) {
861 buildCounterTaskList++; 861 buildCounterTaskList++;
862 if (buildCounterTaskList < 3) { 862 if (buildCounterTaskList < 3) {
863 checkUnnamed433(o.items); 863 checkUnnamed437(o.items);
864 unittest.expect(o.kind, unittest.equals('foo')); 864 unittest.expect(o.kind, unittest.equals('foo'));
865 unittest.expect(o.nextPageToken, unittest.equals('foo')); 865 unittest.expect(o.nextPageToken, unittest.equals('foo'));
866 unittest.expect(o.totalItems, unittest.equals(42)); 866 unittest.expect(o.totalItems, unittest.equals(42));
867 } 867 }
868 buildCounterTaskList--; 868 buildCounterTaskList--;
869 } 869 }
870 870
871 buildUnnamed434() { 871 buildUnnamed438() {
872 var o = new core.List<core.String>(); 872 var o = new core.List<core.String>();
873 o.add("foo"); 873 o.add("foo");
874 o.add("foo"); 874 o.add("foo");
875 return o; 875 return o;
876 } 876 }
877 877
878 checkUnnamed434(core.List<core.String> o) { 878 checkUnnamed438(core.List<core.String> o) {
879 unittest.expect(o, unittest.hasLength(2)); 879 unittest.expect(o, unittest.hasLength(2));
880 unittest.expect(o[0], unittest.equals('foo')); 880 unittest.expect(o[0], unittest.equals('foo'));
881 unittest.expect(o[1], unittest.equals('foo')); 881 unittest.expect(o[1], unittest.equals('foo'));
882 } 882 }
883 883
884 core.int buildCounterTemplate = 0; 884 core.int buildCounterTemplate = 0;
885 buildTemplate() { 885 buildTemplate() {
886 var o = new api.Template(); 886 var o = new api.Template();
887 buildCounterTemplate++; 887 buildCounterTemplate++;
888 if (buildCounterTemplate < 3) { 888 if (buildCounterTemplate < 3) {
889 o.automaticColumnNames = buildUnnamed434(); 889 o.automaticColumnNames = buildUnnamed438();
890 o.body = "foo"; 890 o.body = "foo";
891 o.kind = "foo"; 891 o.kind = "foo";
892 o.name = "foo"; 892 o.name = "foo";
893 o.tableId = "foo"; 893 o.tableId = "foo";
894 o.templateId = 42; 894 o.templateId = 42;
895 } 895 }
896 buildCounterTemplate--; 896 buildCounterTemplate--;
897 return o; 897 return o;
898 } 898 }
899 899
900 checkTemplate(api.Template o) { 900 checkTemplate(api.Template o) {
901 buildCounterTemplate++; 901 buildCounterTemplate++;
902 if (buildCounterTemplate < 3) { 902 if (buildCounterTemplate < 3) {
903 checkUnnamed434(o.automaticColumnNames); 903 checkUnnamed438(o.automaticColumnNames);
904 unittest.expect(o.body, unittest.equals('foo')); 904 unittest.expect(o.body, unittest.equals('foo'));
905 unittest.expect(o.kind, unittest.equals('foo')); 905 unittest.expect(o.kind, unittest.equals('foo'));
906 unittest.expect(o.name, unittest.equals('foo')); 906 unittest.expect(o.name, unittest.equals('foo'));
907 unittest.expect(o.tableId, unittest.equals('foo')); 907 unittest.expect(o.tableId, unittest.equals('foo'));
908 unittest.expect(o.templateId, unittest.equals(42)); 908 unittest.expect(o.templateId, unittest.equals(42));
909 } 909 }
910 buildCounterTemplate--; 910 buildCounterTemplate--;
911 } 911 }
912 912
913 buildUnnamed435() { 913 buildUnnamed439() {
914 var o = new core.List<api.Template>(); 914 var o = new core.List<api.Template>();
915 o.add(buildTemplate()); 915 o.add(buildTemplate());
916 o.add(buildTemplate()); 916 o.add(buildTemplate());
917 return o; 917 return o;
918 } 918 }
919 919
920 checkUnnamed435(core.List<api.Template> o) { 920 checkUnnamed439(core.List<api.Template> o) {
921 unittest.expect(o, unittest.hasLength(2)); 921 unittest.expect(o, unittest.hasLength(2));
922 checkTemplate(o[0]); 922 checkTemplate(o[0]);
923 checkTemplate(o[1]); 923 checkTemplate(o[1]);
924 } 924 }
925 925
926 core.int buildCounterTemplateList = 0; 926 core.int buildCounterTemplateList = 0;
927 buildTemplateList() { 927 buildTemplateList() {
928 var o = new api.TemplateList(); 928 var o = new api.TemplateList();
929 buildCounterTemplateList++; 929 buildCounterTemplateList++;
930 if (buildCounterTemplateList < 3) { 930 if (buildCounterTemplateList < 3) {
931 o.items = buildUnnamed435(); 931 o.items = buildUnnamed439();
932 o.kind = "foo"; 932 o.kind = "foo";
933 o.nextPageToken = "foo"; 933 o.nextPageToken = "foo";
934 o.totalItems = 42; 934 o.totalItems = 42;
935 } 935 }
936 buildCounterTemplateList--; 936 buildCounterTemplateList--;
937 return o; 937 return o;
938 } 938 }
939 939
940 checkTemplateList(api.TemplateList o) { 940 checkTemplateList(api.TemplateList o) {
941 buildCounterTemplateList++; 941 buildCounterTemplateList++;
942 if (buildCounterTemplateList < 3) { 942 if (buildCounterTemplateList < 3) {
943 checkUnnamed435(o.items); 943 checkUnnamed439(o.items);
944 unittest.expect(o.kind, unittest.equals('foo')); 944 unittest.expect(o.kind, unittest.equals('foo'));
945 unittest.expect(o.nextPageToken, unittest.equals('foo')); 945 unittest.expect(o.nextPageToken, unittest.equals('foo'));
946 unittest.expect(o.totalItems, unittest.equals(42)); 946 unittest.expect(o.totalItems, unittest.equals(42));
947 } 947 }
948 buildCounterTemplateList--; 948 buildCounterTemplateList--;
949 } 949 }
950 950
951 951
952 main() { 952 main() {
953 unittest.group("obj-schema-Bucket", () { 953 unittest.group("obj-schema-Bucket", () {
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
1166 }); 1166 });
1167 1167
1168 1168
1169 unittest.group("resource-ColumnResourceApi", () { 1169 unittest.group("resource-ColumnResourceApi", () {
1170 unittest.test("method--delete", () { 1170 unittest.test("method--delete", () {
1171 1171
1172 var mock = new HttpServerMock(); 1172 var mock = new HttpServerMock();
1173 api.ColumnResourceApi res = new api.FusiontablesApi(mock).column; 1173 api.ColumnResourceApi res = new api.FusiontablesApi(mock).column;
1174 var arg_tableId = "foo"; 1174 var arg_tableId = "foo";
1175 var arg_columnId = "foo"; 1175 var arg_columnId = "foo";
1176 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 1176 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
1177 var path = (req.url).path; 1177 var path = (req.url).path;
1178 var pathOffset = 0; 1178 var pathOffset = 0;
1179 var index; 1179 var index;
1180 var subPart; 1180 var subPart;
1181 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 1181 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
1182 pathOffset += 1; 1182 pathOffset += 1;
1183 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("fusiontables/v2/")); 1183 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("fusiontables/v2/"));
1184 pathOffset += 16; 1184 pathOffset += 16;
1185 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ als("tables/")); 1185 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ als("tables/"));
1186 pathOffset += 7; 1186 pathOffset += 7;
(...skipping 25 matching lines...) Expand all
1212 } 1212 }
1213 } 1213 }
1214 1214
1215 1215
1216 var h = { 1216 var h = {
1217 "content-type" : "application/json; charset=utf-8", 1217 "content-type" : "application/json; charset=utf-8",
1218 }; 1218 };
1219 var resp = ""; 1219 var resp = "";
1220 return new async.Future.value(stringResponse(200, h, resp)); 1220 return new async.Future.value(stringResponse(200, h, resp));
1221 }), true); 1221 }), true);
1222 res.delete(arg_tableId, arg_columnId).then(unittest.expectAsync((_) {})); 1222 res.delete(arg_tableId, arg_columnId).then(unittest.expectAsync1((_) {}));
1223 }); 1223 });
1224 1224
1225 unittest.test("method--get", () { 1225 unittest.test("method--get", () {
1226 1226
1227 var mock = new HttpServerMock(); 1227 var mock = new HttpServerMock();
1228 api.ColumnResourceApi res = new api.FusiontablesApi(mock).column; 1228 api.ColumnResourceApi res = new api.FusiontablesApi(mock).column;
1229 var arg_tableId = "foo"; 1229 var arg_tableId = "foo";
1230 var arg_columnId = "foo"; 1230 var arg_columnId = "foo";
1231 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 1231 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
1232 var path = (req.url).path; 1232 var path = (req.url).path;
1233 var pathOffset = 0; 1233 var pathOffset = 0;
1234 var index; 1234 var index;
1235 var subPart; 1235 var subPart;
1236 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 1236 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
1237 pathOffset += 1; 1237 pathOffset += 1;
1238 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("fusiontables/v2/")); 1238 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("fusiontables/v2/"));
1239 pathOffset += 16; 1239 pathOffset += 16;
1240 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ als("tables/")); 1240 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ als("tables/"));
1241 pathOffset += 7; 1241 pathOffset += 7;
(...skipping 25 matching lines...) Expand all
1267 } 1267 }
1268 } 1268 }
1269 1269
1270 1270
1271 var h = { 1271 var h = {
1272 "content-type" : "application/json; charset=utf-8", 1272 "content-type" : "application/json; charset=utf-8",
1273 }; 1273 };
1274 var resp = convert.JSON.encode(buildColumn()); 1274 var resp = convert.JSON.encode(buildColumn());
1275 return new async.Future.value(stringResponse(200, h, resp)); 1275 return new async.Future.value(stringResponse(200, h, resp));
1276 }), true); 1276 }), true);
1277 res.get(arg_tableId, arg_columnId).then(unittest.expectAsync(((api.Column response) { 1277 res.get(arg_tableId, arg_columnId).then(unittest.expectAsync1(((api.Column response) {
1278 checkColumn(response); 1278 checkColumn(response);
1279 }))); 1279 })));
1280 }); 1280 });
1281 1281
1282 unittest.test("method--insert", () { 1282 unittest.test("method--insert", () {
1283 1283
1284 var mock = new HttpServerMock(); 1284 var mock = new HttpServerMock();
1285 api.ColumnResourceApi res = new api.FusiontablesApi(mock).column; 1285 api.ColumnResourceApi res = new api.FusiontablesApi(mock).column;
1286 var arg_request = buildColumn(); 1286 var arg_request = buildColumn();
1287 var arg_tableId = "foo"; 1287 var arg_tableId = "foo";
1288 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 1288 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
1289 var obj = new api.Column.fromJson(json); 1289 var obj = new api.Column.fromJson(json);
1290 checkColumn(obj); 1290 checkColumn(obj);
1291 1291
1292 var path = (req.url).path; 1292 var path = (req.url).path;
1293 var pathOffset = 0; 1293 var pathOffset = 0;
1294 var index; 1294 var index;
1295 var subPart; 1295 var subPart;
1296 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 1296 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
1297 pathOffset += 1; 1297 pathOffset += 1;
1298 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("fusiontables/v2/")); 1298 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("fusiontables/v2/"));
(...skipping 25 matching lines...) Expand all
1324 } 1324 }
1325 } 1325 }
1326 1326
1327 1327
1328 var h = { 1328 var h = {
1329 "content-type" : "application/json; charset=utf-8", 1329 "content-type" : "application/json; charset=utf-8",
1330 }; 1330 };
1331 var resp = convert.JSON.encode(buildColumn()); 1331 var resp = convert.JSON.encode(buildColumn());
1332 return new async.Future.value(stringResponse(200, h, resp)); 1332 return new async.Future.value(stringResponse(200, h, resp));
1333 }), true); 1333 }), true);
1334 res.insert(arg_request, arg_tableId).then(unittest.expectAsync(((api.Colum n response) { 1334 res.insert(arg_request, arg_tableId).then(unittest.expectAsync1(((api.Colu mn response) {
1335 checkColumn(response); 1335 checkColumn(response);
1336 }))); 1336 })));
1337 }); 1337 });
1338 1338
1339 unittest.test("method--list", () { 1339 unittest.test("method--list", () {
1340 1340
1341 var mock = new HttpServerMock(); 1341 var mock = new HttpServerMock();
1342 api.ColumnResourceApi res = new api.FusiontablesApi(mock).column; 1342 api.ColumnResourceApi res = new api.FusiontablesApi(mock).column;
1343 var arg_tableId = "foo"; 1343 var arg_tableId = "foo";
1344 var arg_maxResults = 42; 1344 var arg_maxResults = 42;
1345 var arg_pageToken = "foo"; 1345 var arg_pageToken = "foo";
1346 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 1346 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
1347 var path = (req.url).path; 1347 var path = (req.url).path;
1348 var pathOffset = 0; 1348 var pathOffset = 0;
1349 var index; 1349 var index;
1350 var subPart; 1350 var subPart;
1351 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 1351 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
1352 pathOffset += 1; 1352 pathOffset += 1;
1353 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("fusiontables/v2/")); 1353 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("fusiontables/v2/"));
1354 pathOffset += 16; 1354 pathOffset += 16;
1355 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ als("tables/")); 1355 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ als("tables/"));
1356 pathOffset += 7; 1356 pathOffset += 7;
(...skipping 24 matching lines...) Expand all
1381 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e quals(arg_maxResults)); 1381 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e quals(arg_maxResults));
1382 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en)); 1382 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en));
1383 1383
1384 1384
1385 var h = { 1385 var h = {
1386 "content-type" : "application/json; charset=utf-8", 1386 "content-type" : "application/json; charset=utf-8",
1387 }; 1387 };
1388 var resp = convert.JSON.encode(buildColumnList()); 1388 var resp = convert.JSON.encode(buildColumnList());
1389 return new async.Future.value(stringResponse(200, h, resp)); 1389 return new async.Future.value(stringResponse(200, h, resp));
1390 }), true); 1390 }), true);
1391 res.list(arg_tableId, maxResults: arg_maxResults, pageToken: arg_pageToken ).then(unittest.expectAsync(((api.ColumnList response) { 1391 res.list(arg_tableId, maxResults: arg_maxResults, pageToken: arg_pageToken ).then(unittest.expectAsync1(((api.ColumnList response) {
1392 checkColumnList(response); 1392 checkColumnList(response);
1393 }))); 1393 })));
1394 }); 1394 });
1395 1395
1396 unittest.test("method--patch", () { 1396 unittest.test("method--patch", () {
1397 1397
1398 var mock = new HttpServerMock(); 1398 var mock = new HttpServerMock();
1399 api.ColumnResourceApi res = new api.FusiontablesApi(mock).column; 1399 api.ColumnResourceApi res = new api.FusiontablesApi(mock).column;
1400 var arg_request = buildColumn(); 1400 var arg_request = buildColumn();
1401 var arg_tableId = "foo"; 1401 var arg_tableId = "foo";
1402 var arg_columnId = "foo"; 1402 var arg_columnId = "foo";
1403 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 1403 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
1404 var obj = new api.Column.fromJson(json); 1404 var obj = new api.Column.fromJson(json);
1405 checkColumn(obj); 1405 checkColumn(obj);
1406 1406
1407 var path = (req.url).path; 1407 var path = (req.url).path;
1408 var pathOffset = 0; 1408 var pathOffset = 0;
1409 var index; 1409 var index;
1410 var subPart; 1410 var subPart;
1411 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 1411 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
1412 pathOffset += 1; 1412 pathOffset += 1;
1413 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("fusiontables/v2/")); 1413 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("fusiontables/v2/"));
(...skipping 28 matching lines...) Expand all
1442 } 1442 }
1443 } 1443 }
1444 1444
1445 1445
1446 var h = { 1446 var h = {
1447 "content-type" : "application/json; charset=utf-8", 1447 "content-type" : "application/json; charset=utf-8",
1448 }; 1448 };
1449 var resp = convert.JSON.encode(buildColumn()); 1449 var resp = convert.JSON.encode(buildColumn());
1450 return new async.Future.value(stringResponse(200, h, resp)); 1450 return new async.Future.value(stringResponse(200, h, resp));
1451 }), true); 1451 }), true);
1452 res.patch(arg_request, arg_tableId, arg_columnId).then(unittest.expectAsyn c(((api.Column response) { 1452 res.patch(arg_request, arg_tableId, arg_columnId).then(unittest.expectAsyn c1(((api.Column response) {
1453 checkColumn(response); 1453 checkColumn(response);
1454 }))); 1454 })));
1455 }); 1455 });
1456 1456
1457 unittest.test("method--update", () { 1457 unittest.test("method--update", () {
1458 1458
1459 var mock = new HttpServerMock(); 1459 var mock = new HttpServerMock();
1460 api.ColumnResourceApi res = new api.FusiontablesApi(mock).column; 1460 api.ColumnResourceApi res = new api.FusiontablesApi(mock).column;
1461 var arg_request = buildColumn(); 1461 var arg_request = buildColumn();
1462 var arg_tableId = "foo"; 1462 var arg_tableId = "foo";
1463 var arg_columnId = "foo"; 1463 var arg_columnId = "foo";
1464 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 1464 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
1465 var obj = new api.Column.fromJson(json); 1465 var obj = new api.Column.fromJson(json);
1466 checkColumn(obj); 1466 checkColumn(obj);
1467 1467
1468 var path = (req.url).path; 1468 var path = (req.url).path;
1469 var pathOffset = 0; 1469 var pathOffset = 0;
1470 var index; 1470 var index;
1471 var subPart; 1471 var subPart;
1472 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 1472 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
1473 pathOffset += 1; 1473 pathOffset += 1;
1474 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("fusiontables/v2/")); 1474 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("fusiontables/v2/"));
(...skipping 28 matching lines...) Expand all
1503 } 1503 }
1504 } 1504 }
1505 1505
1506 1506
1507 var h = { 1507 var h = {
1508 "content-type" : "application/json; charset=utf-8", 1508 "content-type" : "application/json; charset=utf-8",
1509 }; 1509 };
1510 var resp = convert.JSON.encode(buildColumn()); 1510 var resp = convert.JSON.encode(buildColumn());
1511 return new async.Future.value(stringResponse(200, h, resp)); 1511 return new async.Future.value(stringResponse(200, h, resp));
1512 }), true); 1512 }), true);
1513 res.update(arg_request, arg_tableId, arg_columnId).then(unittest.expectAsy nc(((api.Column response) { 1513 res.update(arg_request, arg_tableId, arg_columnId).then(unittest.expectAsy nc1(((api.Column response) {
1514 checkColumn(response); 1514 checkColumn(response);
1515 }))); 1515 })));
1516 }); 1516 });
1517 1517
1518 }); 1518 });
1519 1519
1520 1520
1521 unittest.group("resource-QueryResourceApi", () { 1521 unittest.group("resource-QueryResourceApi", () {
1522 unittest.test("method--sql", () { 1522 unittest.test("method--sql", () {
1523 // TODO: Implement tests for media upload; 1523 // TODO: Implement tests for media upload;
1524 // TODO: Implement tests for media download; 1524 // TODO: Implement tests for media download;
1525 1525
1526 var mock = new HttpServerMock(); 1526 var mock = new HttpServerMock();
1527 api.QueryResourceApi res = new api.FusiontablesApi(mock).query; 1527 api.QueryResourceApi res = new api.FusiontablesApi(mock).query;
1528 var arg_sql_1 = "foo"; 1528 var arg_sql_1 = "foo";
1529 var arg_hdrs = true; 1529 var arg_hdrs = true;
1530 var arg_typed = true; 1530 var arg_typed = true;
1531 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 1531 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
1532 var path = (req.url).path; 1532 var path = (req.url).path;
1533 var pathOffset = 0; 1533 var pathOffset = 0;
1534 var index; 1534 var index;
1535 var subPart; 1535 var subPart;
1536 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 1536 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
1537 pathOffset += 1; 1537 pathOffset += 1;
1538 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("fusiontables/v2/")); 1538 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("fusiontables/v2/"));
1539 pathOffset += 16; 1539 pathOffset += 16;
1540 unittest.expect(path.substring(pathOffset, pathOffset + 5), unittest.equ als("query")); 1540 unittest.expect(path.substring(pathOffset, pathOffset + 5), unittest.equ als("query"));
1541 pathOffset += 5; 1541 pathOffset += 5;
(...skipping 18 matching lines...) Expand all
1560 unittest.expect(queryMap["hdrs"].first, unittest.equals("$arg_hdrs")); 1560 unittest.expect(queryMap["hdrs"].first, unittest.equals("$arg_hdrs"));
1561 unittest.expect(queryMap["typed"].first, unittest.equals("$arg_typed")); 1561 unittest.expect(queryMap["typed"].first, unittest.equals("$arg_typed"));
1562 1562
1563 1563
1564 var h = { 1564 var h = {
1565 "content-type" : "application/json; charset=utf-8", 1565 "content-type" : "application/json; charset=utf-8",
1566 }; 1566 };
1567 var resp = convert.JSON.encode(buildSqlresponse()); 1567 var resp = convert.JSON.encode(buildSqlresponse());
1568 return new async.Future.value(stringResponse(200, h, resp)); 1568 return new async.Future.value(stringResponse(200, h, resp));
1569 }), true); 1569 }), true);
1570 res.sql(arg_sql_1, hdrs: arg_hdrs, typed: arg_typed).then(unittest.expectA sync(((api.Sqlresponse response) { 1570 res.sql(arg_sql_1, hdrs: arg_hdrs, typed: arg_typed).then(unittest.expectA sync1(((api.Sqlresponse response) {
1571 checkSqlresponse(response); 1571 checkSqlresponse(response);
1572 }))); 1572 })));
1573 }); 1573 });
1574 1574
1575 unittest.test("method--sqlGet", () { 1575 unittest.test("method--sqlGet", () {
1576 // TODO: Implement tests for media upload; 1576 // TODO: Implement tests for media upload;
1577 // TODO: Implement tests for media download; 1577 // TODO: Implement tests for media download;
1578 1578
1579 var mock = new HttpServerMock(); 1579 var mock = new HttpServerMock();
1580 api.QueryResourceApi res = new api.FusiontablesApi(mock).query; 1580 api.QueryResourceApi res = new api.FusiontablesApi(mock).query;
1581 var arg_sql_1 = "foo"; 1581 var arg_sql_1 = "foo";
1582 var arg_hdrs = true; 1582 var arg_hdrs = true;
1583 var arg_typed = true; 1583 var arg_typed = true;
1584 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 1584 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
1585 var path = (req.url).path; 1585 var path = (req.url).path;
1586 var pathOffset = 0; 1586 var pathOffset = 0;
1587 var index; 1587 var index;
1588 var subPart; 1588 var subPart;
1589 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 1589 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
1590 pathOffset += 1; 1590 pathOffset += 1;
1591 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("fusiontables/v2/")); 1591 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("fusiontables/v2/"));
1592 pathOffset += 16; 1592 pathOffset += 16;
1593 unittest.expect(path.substring(pathOffset, pathOffset + 5), unittest.equ als("query")); 1593 unittest.expect(path.substring(pathOffset, pathOffset + 5), unittest.equ als("query"));
1594 pathOffset += 5; 1594 pathOffset += 5;
(...skipping 18 matching lines...) Expand all
1613 unittest.expect(queryMap["hdrs"].first, unittest.equals("$arg_hdrs")); 1613 unittest.expect(queryMap["hdrs"].first, unittest.equals("$arg_hdrs"));
1614 unittest.expect(queryMap["typed"].first, unittest.equals("$arg_typed")); 1614 unittest.expect(queryMap["typed"].first, unittest.equals("$arg_typed"));
1615 1615
1616 1616
1617 var h = { 1617 var h = {
1618 "content-type" : "application/json; charset=utf-8", 1618 "content-type" : "application/json; charset=utf-8",
1619 }; 1619 };
1620 var resp = convert.JSON.encode(buildSqlresponse()); 1620 var resp = convert.JSON.encode(buildSqlresponse());
1621 return new async.Future.value(stringResponse(200, h, resp)); 1621 return new async.Future.value(stringResponse(200, h, resp));
1622 }), true); 1622 }), true);
1623 res.sqlGet(arg_sql_1, hdrs: arg_hdrs, typed: arg_typed).then(unittest.expe ctAsync(((api.Sqlresponse response) { 1623 res.sqlGet(arg_sql_1, hdrs: arg_hdrs, typed: arg_typed).then(unittest.expe ctAsync1(((api.Sqlresponse response) {
1624 checkSqlresponse(response); 1624 checkSqlresponse(response);
1625 }))); 1625 })));
1626 }); 1626 });
1627 1627
1628 }); 1628 });
1629 1629
1630 1630
1631 unittest.group("resource-StyleResourceApi", () { 1631 unittest.group("resource-StyleResourceApi", () {
1632 unittest.test("method--delete", () { 1632 unittest.test("method--delete", () {
1633 1633
1634 var mock = new HttpServerMock(); 1634 var mock = new HttpServerMock();
1635 api.StyleResourceApi res = new api.FusiontablesApi(mock).style; 1635 api.StyleResourceApi res = new api.FusiontablesApi(mock).style;
1636 var arg_tableId = "foo"; 1636 var arg_tableId = "foo";
1637 var arg_styleId = 42; 1637 var arg_styleId = 42;
1638 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 1638 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
1639 var path = (req.url).path; 1639 var path = (req.url).path;
1640 var pathOffset = 0; 1640 var pathOffset = 0;
1641 var index; 1641 var index;
1642 var subPart; 1642 var subPart;
1643 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 1643 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
1644 pathOffset += 1; 1644 pathOffset += 1;
1645 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("fusiontables/v2/")); 1645 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("fusiontables/v2/"));
1646 pathOffset += 16; 1646 pathOffset += 16;
1647 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ als("tables/")); 1647 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ als("tables/"));
1648 pathOffset += 7; 1648 pathOffset += 7;
(...skipping 25 matching lines...) Expand all
1674 } 1674 }
1675 } 1675 }
1676 1676
1677 1677
1678 var h = { 1678 var h = {
1679 "content-type" : "application/json; charset=utf-8", 1679 "content-type" : "application/json; charset=utf-8",
1680 }; 1680 };
1681 var resp = ""; 1681 var resp = "";
1682 return new async.Future.value(stringResponse(200, h, resp)); 1682 return new async.Future.value(stringResponse(200, h, resp));
1683 }), true); 1683 }), true);
1684 res.delete(arg_tableId, arg_styleId).then(unittest.expectAsync((_) {})); 1684 res.delete(arg_tableId, arg_styleId).then(unittest.expectAsync1((_) {}));
1685 }); 1685 });
1686 1686
1687 unittest.test("method--get", () { 1687 unittest.test("method--get", () {
1688 1688
1689 var mock = new HttpServerMock(); 1689 var mock = new HttpServerMock();
1690 api.StyleResourceApi res = new api.FusiontablesApi(mock).style; 1690 api.StyleResourceApi res = new api.FusiontablesApi(mock).style;
1691 var arg_tableId = "foo"; 1691 var arg_tableId = "foo";
1692 var arg_styleId = 42; 1692 var arg_styleId = 42;
1693 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 1693 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
1694 var path = (req.url).path; 1694 var path = (req.url).path;
1695 var pathOffset = 0; 1695 var pathOffset = 0;
1696 var index; 1696 var index;
1697 var subPart; 1697 var subPart;
1698 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 1698 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
1699 pathOffset += 1; 1699 pathOffset += 1;
1700 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("fusiontables/v2/")); 1700 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("fusiontables/v2/"));
1701 pathOffset += 16; 1701 pathOffset += 16;
1702 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ als("tables/")); 1702 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ als("tables/"));
1703 pathOffset += 7; 1703 pathOffset += 7;
(...skipping 25 matching lines...) Expand all
1729 } 1729 }
1730 } 1730 }
1731 1731
1732 1732
1733 var h = { 1733 var h = {
1734 "content-type" : "application/json; charset=utf-8", 1734 "content-type" : "application/json; charset=utf-8",
1735 }; 1735 };
1736 var resp = convert.JSON.encode(buildStyleSetting()); 1736 var resp = convert.JSON.encode(buildStyleSetting());
1737 return new async.Future.value(stringResponse(200, h, resp)); 1737 return new async.Future.value(stringResponse(200, h, resp));
1738 }), true); 1738 }), true);
1739 res.get(arg_tableId, arg_styleId).then(unittest.expectAsync(((api.StyleSet ting response) { 1739 res.get(arg_tableId, arg_styleId).then(unittest.expectAsync1(((api.StyleSe tting response) {
1740 checkStyleSetting(response); 1740 checkStyleSetting(response);
1741 }))); 1741 })));
1742 }); 1742 });
1743 1743
1744 unittest.test("method--insert", () { 1744 unittest.test("method--insert", () {
1745 1745
1746 var mock = new HttpServerMock(); 1746 var mock = new HttpServerMock();
1747 api.StyleResourceApi res = new api.FusiontablesApi(mock).style; 1747 api.StyleResourceApi res = new api.FusiontablesApi(mock).style;
1748 var arg_request = buildStyleSetting(); 1748 var arg_request = buildStyleSetting();
1749 var arg_tableId = "foo"; 1749 var arg_tableId = "foo";
1750 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 1750 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
1751 var obj = new api.StyleSetting.fromJson(json); 1751 var obj = new api.StyleSetting.fromJson(json);
1752 checkStyleSetting(obj); 1752 checkStyleSetting(obj);
1753 1753
1754 var path = (req.url).path; 1754 var path = (req.url).path;
1755 var pathOffset = 0; 1755 var pathOffset = 0;
1756 var index; 1756 var index;
1757 var subPart; 1757 var subPart;
1758 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 1758 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
1759 pathOffset += 1; 1759 pathOffset += 1;
1760 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("fusiontables/v2/")); 1760 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("fusiontables/v2/"));
(...skipping 25 matching lines...) Expand all
1786 } 1786 }
1787 } 1787 }
1788 1788
1789 1789
1790 var h = { 1790 var h = {
1791 "content-type" : "application/json; charset=utf-8", 1791 "content-type" : "application/json; charset=utf-8",
1792 }; 1792 };
1793 var resp = convert.JSON.encode(buildStyleSetting()); 1793 var resp = convert.JSON.encode(buildStyleSetting());
1794 return new async.Future.value(stringResponse(200, h, resp)); 1794 return new async.Future.value(stringResponse(200, h, resp));
1795 }), true); 1795 }), true);
1796 res.insert(arg_request, arg_tableId).then(unittest.expectAsync(((api.Style Setting response) { 1796 res.insert(arg_request, arg_tableId).then(unittest.expectAsync1(((api.Styl eSetting response) {
1797 checkStyleSetting(response); 1797 checkStyleSetting(response);
1798 }))); 1798 })));
1799 }); 1799 });
1800 1800
1801 unittest.test("method--list", () { 1801 unittest.test("method--list", () {
1802 1802
1803 var mock = new HttpServerMock(); 1803 var mock = new HttpServerMock();
1804 api.StyleResourceApi res = new api.FusiontablesApi(mock).style; 1804 api.StyleResourceApi res = new api.FusiontablesApi(mock).style;
1805 var arg_tableId = "foo"; 1805 var arg_tableId = "foo";
1806 var arg_maxResults = 42; 1806 var arg_maxResults = 42;
1807 var arg_pageToken = "foo"; 1807 var arg_pageToken = "foo";
1808 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 1808 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
1809 var path = (req.url).path; 1809 var path = (req.url).path;
1810 var pathOffset = 0; 1810 var pathOffset = 0;
1811 var index; 1811 var index;
1812 var subPart; 1812 var subPart;
1813 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 1813 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
1814 pathOffset += 1; 1814 pathOffset += 1;
1815 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("fusiontables/v2/")); 1815 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("fusiontables/v2/"));
1816 pathOffset += 16; 1816 pathOffset += 16;
1817 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ als("tables/")); 1817 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ als("tables/"));
1818 pathOffset += 7; 1818 pathOffset += 7;
(...skipping 24 matching lines...) Expand all
1843 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e quals(arg_maxResults)); 1843 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e quals(arg_maxResults));
1844 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en)); 1844 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en));
1845 1845
1846 1846
1847 var h = { 1847 var h = {
1848 "content-type" : "application/json; charset=utf-8", 1848 "content-type" : "application/json; charset=utf-8",
1849 }; 1849 };
1850 var resp = convert.JSON.encode(buildStyleSettingList()); 1850 var resp = convert.JSON.encode(buildStyleSettingList());
1851 return new async.Future.value(stringResponse(200, h, resp)); 1851 return new async.Future.value(stringResponse(200, h, resp));
1852 }), true); 1852 }), true);
1853 res.list(arg_tableId, maxResults: arg_maxResults, pageToken: arg_pageToken ).then(unittest.expectAsync(((api.StyleSettingList response) { 1853 res.list(arg_tableId, maxResults: arg_maxResults, pageToken: arg_pageToken ).then(unittest.expectAsync1(((api.StyleSettingList response) {
1854 checkStyleSettingList(response); 1854 checkStyleSettingList(response);
1855 }))); 1855 })));
1856 }); 1856 });
1857 1857
1858 unittest.test("method--patch", () { 1858 unittest.test("method--patch", () {
1859 1859
1860 var mock = new HttpServerMock(); 1860 var mock = new HttpServerMock();
1861 api.StyleResourceApi res = new api.FusiontablesApi(mock).style; 1861 api.StyleResourceApi res = new api.FusiontablesApi(mock).style;
1862 var arg_request = buildStyleSetting(); 1862 var arg_request = buildStyleSetting();
1863 var arg_tableId = "foo"; 1863 var arg_tableId = "foo";
1864 var arg_styleId = 42; 1864 var arg_styleId = 42;
1865 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 1865 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
1866 var obj = new api.StyleSetting.fromJson(json); 1866 var obj = new api.StyleSetting.fromJson(json);
1867 checkStyleSetting(obj); 1867 checkStyleSetting(obj);
1868 1868
1869 var path = (req.url).path; 1869 var path = (req.url).path;
1870 var pathOffset = 0; 1870 var pathOffset = 0;
1871 var index; 1871 var index;
1872 var subPart; 1872 var subPart;
1873 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 1873 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
1874 pathOffset += 1; 1874 pathOffset += 1;
1875 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("fusiontables/v2/")); 1875 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("fusiontables/v2/"));
(...skipping 28 matching lines...) Expand all
1904 } 1904 }
1905 } 1905 }
1906 1906
1907 1907
1908 var h = { 1908 var h = {
1909 "content-type" : "application/json; charset=utf-8", 1909 "content-type" : "application/json; charset=utf-8",
1910 }; 1910 };
1911 var resp = convert.JSON.encode(buildStyleSetting()); 1911 var resp = convert.JSON.encode(buildStyleSetting());
1912 return new async.Future.value(stringResponse(200, h, resp)); 1912 return new async.Future.value(stringResponse(200, h, resp));
1913 }), true); 1913 }), true);
1914 res.patch(arg_request, arg_tableId, arg_styleId).then(unittest.expectAsync (((api.StyleSetting response) { 1914 res.patch(arg_request, arg_tableId, arg_styleId).then(unittest.expectAsync 1(((api.StyleSetting response) {
1915 checkStyleSetting(response); 1915 checkStyleSetting(response);
1916 }))); 1916 })));
1917 }); 1917 });
1918 1918
1919 unittest.test("method--update", () { 1919 unittest.test("method--update", () {
1920 1920
1921 var mock = new HttpServerMock(); 1921 var mock = new HttpServerMock();
1922 api.StyleResourceApi res = new api.FusiontablesApi(mock).style; 1922 api.StyleResourceApi res = new api.FusiontablesApi(mock).style;
1923 var arg_request = buildStyleSetting(); 1923 var arg_request = buildStyleSetting();
1924 var arg_tableId = "foo"; 1924 var arg_tableId = "foo";
1925 var arg_styleId = 42; 1925 var arg_styleId = 42;
1926 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 1926 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
1927 var obj = new api.StyleSetting.fromJson(json); 1927 var obj = new api.StyleSetting.fromJson(json);
1928 checkStyleSetting(obj); 1928 checkStyleSetting(obj);
1929 1929
1930 var path = (req.url).path; 1930 var path = (req.url).path;
1931 var pathOffset = 0; 1931 var pathOffset = 0;
1932 var index; 1932 var index;
1933 var subPart; 1933 var subPart;
1934 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 1934 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
1935 pathOffset += 1; 1935 pathOffset += 1;
1936 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("fusiontables/v2/")); 1936 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("fusiontables/v2/"));
(...skipping 28 matching lines...) Expand all
1965 } 1965 }
1966 } 1966 }
1967 1967
1968 1968
1969 var h = { 1969 var h = {
1970 "content-type" : "application/json; charset=utf-8", 1970 "content-type" : "application/json; charset=utf-8",
1971 }; 1971 };
1972 var resp = convert.JSON.encode(buildStyleSetting()); 1972 var resp = convert.JSON.encode(buildStyleSetting());
1973 return new async.Future.value(stringResponse(200, h, resp)); 1973 return new async.Future.value(stringResponse(200, h, resp));
1974 }), true); 1974 }), true);
1975 res.update(arg_request, arg_tableId, arg_styleId).then(unittest.expectAsyn c(((api.StyleSetting response) { 1975 res.update(arg_request, arg_tableId, arg_styleId).then(unittest.expectAsyn c1(((api.StyleSetting response) {
1976 checkStyleSetting(response); 1976 checkStyleSetting(response);
1977 }))); 1977 })));
1978 }); 1978 });
1979 1979
1980 }); 1980 });
1981 1981
1982 1982
1983 unittest.group("resource-TableResourceApi", () { 1983 unittest.group("resource-TableResourceApi", () {
1984 unittest.test("method--copy", () { 1984 unittest.test("method--copy", () {
1985 1985
1986 var mock = new HttpServerMock(); 1986 var mock = new HttpServerMock();
1987 api.TableResourceApi res = new api.FusiontablesApi(mock).table; 1987 api.TableResourceApi res = new api.FusiontablesApi(mock).table;
1988 var arg_tableId = "foo"; 1988 var arg_tableId = "foo";
1989 var arg_copyPresentation = true; 1989 var arg_copyPresentation = true;
1990 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 1990 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
1991 var path = (req.url).path; 1991 var path = (req.url).path;
1992 var pathOffset = 0; 1992 var pathOffset = 0;
1993 var index; 1993 var index;
1994 var subPart; 1994 var subPart;
1995 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 1995 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
1996 pathOffset += 1; 1996 pathOffset += 1;
1997 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("fusiontables/v2/")); 1997 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("fusiontables/v2/"));
1998 pathOffset += 16; 1998 pathOffset += 16;
1999 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ als("tables/")); 1999 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ als("tables/"));
2000 pathOffset += 7; 2000 pathOffset += 7;
(...skipping 23 matching lines...) Expand all
2024 } 2024 }
2025 unittest.expect(queryMap["copyPresentation"].first, unittest.equals("$ar g_copyPresentation")); 2025 unittest.expect(queryMap["copyPresentation"].first, unittest.equals("$ar g_copyPresentation"));
2026 2026
2027 2027
2028 var h = { 2028 var h = {
2029 "content-type" : "application/json; charset=utf-8", 2029 "content-type" : "application/json; charset=utf-8",
2030 }; 2030 };
2031 var resp = convert.JSON.encode(buildTable()); 2031 var resp = convert.JSON.encode(buildTable());
2032 return new async.Future.value(stringResponse(200, h, resp)); 2032 return new async.Future.value(stringResponse(200, h, resp));
2033 }), true); 2033 }), true);
2034 res.copy(arg_tableId, copyPresentation: arg_copyPresentation).then(unittes t.expectAsync(((api.Table response) { 2034 res.copy(arg_tableId, copyPresentation: arg_copyPresentation).then(unittes t.expectAsync1(((api.Table response) {
2035 checkTable(response); 2035 checkTable(response);
2036 }))); 2036 })));
2037 }); 2037 });
2038 2038
2039 unittest.test("method--delete", () { 2039 unittest.test("method--delete", () {
2040 2040
2041 var mock = new HttpServerMock(); 2041 var mock = new HttpServerMock();
2042 api.TableResourceApi res = new api.FusiontablesApi(mock).table; 2042 api.TableResourceApi res = new api.FusiontablesApi(mock).table;
2043 var arg_tableId = "foo"; 2043 var arg_tableId = "foo";
2044 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 2044 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
2045 var path = (req.url).path; 2045 var path = (req.url).path;
2046 var pathOffset = 0; 2046 var pathOffset = 0;
2047 var index; 2047 var index;
2048 var subPart; 2048 var subPart;
2049 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 2049 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
2050 pathOffset += 1; 2050 pathOffset += 1;
2051 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("fusiontables/v2/")); 2051 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("fusiontables/v2/"));
2052 pathOffset += 16; 2052 pathOffset += 16;
2053 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ als("tables/")); 2053 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ als("tables/"));
2054 pathOffset += 7; 2054 pathOffset += 7;
(...skipping 18 matching lines...) Expand all
2073 } 2073 }
2074 } 2074 }
2075 2075
2076 2076
2077 var h = { 2077 var h = {
2078 "content-type" : "application/json; charset=utf-8", 2078 "content-type" : "application/json; charset=utf-8",
2079 }; 2079 };
2080 var resp = ""; 2080 var resp = "";
2081 return new async.Future.value(stringResponse(200, h, resp)); 2081 return new async.Future.value(stringResponse(200, h, resp));
2082 }), true); 2082 }), true);
2083 res.delete(arg_tableId).then(unittest.expectAsync((_) {})); 2083 res.delete(arg_tableId).then(unittest.expectAsync1((_) {}));
2084 }); 2084 });
2085 2085
2086 unittest.test("method--get", () { 2086 unittest.test("method--get", () {
2087 2087
2088 var mock = new HttpServerMock(); 2088 var mock = new HttpServerMock();
2089 api.TableResourceApi res = new api.FusiontablesApi(mock).table; 2089 api.TableResourceApi res = new api.FusiontablesApi(mock).table;
2090 var arg_tableId = "foo"; 2090 var arg_tableId = "foo";
2091 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 2091 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
2092 var path = (req.url).path; 2092 var path = (req.url).path;
2093 var pathOffset = 0; 2093 var pathOffset = 0;
2094 var index; 2094 var index;
2095 var subPart; 2095 var subPart;
2096 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 2096 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
2097 pathOffset += 1; 2097 pathOffset += 1;
2098 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("fusiontables/v2/")); 2098 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("fusiontables/v2/"));
2099 pathOffset += 16; 2099 pathOffset += 16;
2100 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ als("tables/")); 2100 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ als("tables/"));
2101 pathOffset += 7; 2101 pathOffset += 7;
(...skipping 18 matching lines...) Expand all
2120 } 2120 }
2121 } 2121 }
2122 2122
2123 2123
2124 var h = { 2124 var h = {
2125 "content-type" : "application/json; charset=utf-8", 2125 "content-type" : "application/json; charset=utf-8",
2126 }; 2126 };
2127 var resp = convert.JSON.encode(buildTable()); 2127 var resp = convert.JSON.encode(buildTable());
2128 return new async.Future.value(stringResponse(200, h, resp)); 2128 return new async.Future.value(stringResponse(200, h, resp));
2129 }), true); 2129 }), true);
2130 res.get(arg_tableId).then(unittest.expectAsync(((api.Table response) { 2130 res.get(arg_tableId).then(unittest.expectAsync1(((api.Table response) {
2131 checkTable(response); 2131 checkTable(response);
2132 }))); 2132 })));
2133 }); 2133 });
2134 2134
2135 unittest.test("method--importRows", () { 2135 unittest.test("method--importRows", () {
2136 // TODO: Implement tests for media upload; 2136 // TODO: Implement tests for media upload;
2137 // TODO: Implement tests for media download; 2137 // TODO: Implement tests for media download;
2138 2138
2139 var mock = new HttpServerMock(); 2139 var mock = new HttpServerMock();
2140 api.TableResourceApi res = new api.FusiontablesApi(mock).table; 2140 api.TableResourceApi res = new api.FusiontablesApi(mock).table;
2141 var arg_tableId = "foo"; 2141 var arg_tableId = "foo";
2142 var arg_delimiter = "foo"; 2142 var arg_delimiter = "foo";
2143 var arg_encoding = "foo"; 2143 var arg_encoding = "foo";
2144 var arg_endLine = 42; 2144 var arg_endLine = 42;
2145 var arg_isStrict = true; 2145 var arg_isStrict = true;
2146 var arg_startLine = 42; 2146 var arg_startLine = 42;
2147 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 2147 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
2148 var path = (req.url).path; 2148 var path = (req.url).path;
2149 var pathOffset = 0; 2149 var pathOffset = 0;
2150 var index; 2150 var index;
2151 var subPart; 2151 var subPart;
2152 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 2152 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
2153 pathOffset += 1; 2153 pathOffset += 1;
2154 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("fusiontables/v2/")); 2154 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("fusiontables/v2/"));
2155 pathOffset += 16; 2155 pathOffset += 16;
2156 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ als("tables/")); 2156 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ als("tables/"));
2157 pathOffset += 7; 2157 pathOffset += 7;
(...skipping 27 matching lines...) Expand all
2185 unittest.expect(queryMap["isStrict"].first, unittest.equals("$arg_isStri ct")); 2185 unittest.expect(queryMap["isStrict"].first, unittest.equals("$arg_isStri ct"));
2186 unittest.expect(core.int.parse(queryMap["startLine"].first), unittest.eq uals(arg_startLine)); 2186 unittest.expect(core.int.parse(queryMap["startLine"].first), unittest.eq uals(arg_startLine));
2187 2187
2188 2188
2189 var h = { 2189 var h = {
2190 "content-type" : "application/json; charset=utf-8", 2190 "content-type" : "application/json; charset=utf-8",
2191 }; 2191 };
2192 var resp = convert.JSON.encode(buildImport()); 2192 var resp = convert.JSON.encode(buildImport());
2193 return new async.Future.value(stringResponse(200, h, resp)); 2193 return new async.Future.value(stringResponse(200, h, resp));
2194 }), true); 2194 }), true);
2195 res.importRows(arg_tableId, delimiter: arg_delimiter, encoding: arg_encodi ng, endLine: arg_endLine, isStrict: arg_isStrict, startLine: arg_startLine).then (unittest.expectAsync(((api.Import response) { 2195 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) {
2196 checkImport(response); 2196 checkImport(response);
2197 }))); 2197 })));
2198 }); 2198 });
2199 2199
2200 unittest.test("method--importTable", () { 2200 unittest.test("method--importTable", () {
2201 // TODO: Implement tests for media upload; 2201 // TODO: Implement tests for media upload;
2202 // TODO: Implement tests for media download; 2202 // TODO: Implement tests for media download;
2203 2203
2204 var mock = new HttpServerMock(); 2204 var mock = new HttpServerMock();
2205 api.TableResourceApi res = new api.FusiontablesApi(mock).table; 2205 api.TableResourceApi res = new api.FusiontablesApi(mock).table;
2206 var arg_name = "foo"; 2206 var arg_name = "foo";
2207 var arg_delimiter = "foo"; 2207 var arg_delimiter = "foo";
2208 var arg_encoding = "foo"; 2208 var arg_encoding = "foo";
2209 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 2209 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
2210 var path = (req.url).path; 2210 var path = (req.url).path;
2211 var pathOffset = 0; 2211 var pathOffset = 0;
2212 var index; 2212 var index;
2213 var subPart; 2213 var subPart;
2214 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 2214 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
2215 pathOffset += 1; 2215 pathOffset += 1;
2216 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("fusiontables/v2/")); 2216 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("fusiontables/v2/"));
2217 pathOffset += 16; 2217 pathOffset += 16;
2218 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq uals("tables/import")); 2218 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq uals("tables/import"));
2219 pathOffset += 13; 2219 pathOffset += 13;
(...skipping 18 matching lines...) Expand all
2238 unittest.expect(queryMap["delimiter"].first, unittest.equals(arg_delimit er)); 2238 unittest.expect(queryMap["delimiter"].first, unittest.equals(arg_delimit er));
2239 unittest.expect(queryMap["encoding"].first, unittest.equals(arg_encoding )); 2239 unittest.expect(queryMap["encoding"].first, unittest.equals(arg_encoding ));
2240 2240
2241 2241
2242 var h = { 2242 var h = {
2243 "content-type" : "application/json; charset=utf-8", 2243 "content-type" : "application/json; charset=utf-8",
2244 }; 2244 };
2245 var resp = convert.JSON.encode(buildTable()); 2245 var resp = convert.JSON.encode(buildTable());
2246 return new async.Future.value(stringResponse(200, h, resp)); 2246 return new async.Future.value(stringResponse(200, h, resp));
2247 }), true); 2247 }), true);
2248 res.importTable(arg_name, delimiter: arg_delimiter, encoding: arg_encoding ).then(unittest.expectAsync(((api.Table response) { 2248 res.importTable(arg_name, delimiter: arg_delimiter, encoding: arg_encoding ).then(unittest.expectAsync1(((api.Table response) {
2249 checkTable(response); 2249 checkTable(response);
2250 }))); 2250 })));
2251 }); 2251 });
2252 2252
2253 unittest.test("method--insert", () { 2253 unittest.test("method--insert", () {
2254 2254
2255 var mock = new HttpServerMock(); 2255 var mock = new HttpServerMock();
2256 api.TableResourceApi res = new api.FusiontablesApi(mock).table; 2256 api.TableResourceApi res = new api.FusiontablesApi(mock).table;
2257 var arg_request = buildTable(); 2257 var arg_request = buildTable();
2258 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 2258 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
2259 var obj = new api.Table.fromJson(json); 2259 var obj = new api.Table.fromJson(json);
2260 checkTable(obj); 2260 checkTable(obj);
2261 2261
2262 var path = (req.url).path; 2262 var path = (req.url).path;
2263 var pathOffset = 0; 2263 var pathOffset = 0;
2264 var index; 2264 var index;
2265 var subPart; 2265 var subPart;
2266 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 2266 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
2267 pathOffset += 1; 2267 pathOffset += 1;
2268 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("fusiontables/v2/")); 2268 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("fusiontables/v2/"));
(...skipping 18 matching lines...) Expand all
2287 } 2287 }
2288 } 2288 }
2289 2289
2290 2290
2291 var h = { 2291 var h = {
2292 "content-type" : "application/json; charset=utf-8", 2292 "content-type" : "application/json; charset=utf-8",
2293 }; 2293 };
2294 var resp = convert.JSON.encode(buildTable()); 2294 var resp = convert.JSON.encode(buildTable());
2295 return new async.Future.value(stringResponse(200, h, resp)); 2295 return new async.Future.value(stringResponse(200, h, resp));
2296 }), true); 2296 }), true);
2297 res.insert(arg_request).then(unittest.expectAsync(((api.Table response) { 2297 res.insert(arg_request).then(unittest.expectAsync1(((api.Table response) {
2298 checkTable(response); 2298 checkTable(response);
2299 }))); 2299 })));
2300 }); 2300 });
2301 2301
2302 unittest.test("method--list", () { 2302 unittest.test("method--list", () {
2303 2303
2304 var mock = new HttpServerMock(); 2304 var mock = new HttpServerMock();
2305 api.TableResourceApi res = new api.FusiontablesApi(mock).table; 2305 api.TableResourceApi res = new api.FusiontablesApi(mock).table;
2306 var arg_maxResults = 42; 2306 var arg_maxResults = 42;
2307 var arg_pageToken = "foo"; 2307 var arg_pageToken = "foo";
2308 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 2308 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
2309 var path = (req.url).path; 2309 var path = (req.url).path;
2310 var pathOffset = 0; 2310 var pathOffset = 0;
2311 var index; 2311 var index;
2312 var subPart; 2312 var subPart;
2313 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 2313 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
2314 pathOffset += 1; 2314 pathOffset += 1;
2315 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("fusiontables/v2/")); 2315 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("fusiontables/v2/"));
2316 pathOffset += 16; 2316 pathOffset += 16;
2317 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ als("tables")); 2317 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ als("tables"));
2318 pathOffset += 6; 2318 pathOffset += 6;
(...skipping 17 matching lines...) Expand all
2336 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e quals(arg_maxResults)); 2336 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e quals(arg_maxResults));
2337 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en)); 2337 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en));
2338 2338
2339 2339
2340 var h = { 2340 var h = {
2341 "content-type" : "application/json; charset=utf-8", 2341 "content-type" : "application/json; charset=utf-8",
2342 }; 2342 };
2343 var resp = convert.JSON.encode(buildTableList()); 2343 var resp = convert.JSON.encode(buildTableList());
2344 return new async.Future.value(stringResponse(200, h, resp)); 2344 return new async.Future.value(stringResponse(200, h, resp));
2345 }), true); 2345 }), true);
2346 res.list(maxResults: arg_maxResults, pageToken: arg_pageToken).then(unitte st.expectAsync(((api.TableList response) { 2346 res.list(maxResults: arg_maxResults, pageToken: arg_pageToken).then(unitte st.expectAsync1(((api.TableList response) {
2347 checkTableList(response); 2347 checkTableList(response);
2348 }))); 2348 })));
2349 }); 2349 });
2350 2350
2351 unittest.test("method--patch", () { 2351 unittest.test("method--patch", () {
2352 2352
2353 var mock = new HttpServerMock(); 2353 var mock = new HttpServerMock();
2354 api.TableResourceApi res = new api.FusiontablesApi(mock).table; 2354 api.TableResourceApi res = new api.FusiontablesApi(mock).table;
2355 var arg_request = buildTable(); 2355 var arg_request = buildTable();
2356 var arg_tableId = "foo"; 2356 var arg_tableId = "foo";
2357 var arg_replaceViewDefinition = true; 2357 var arg_replaceViewDefinition = true;
2358 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 2358 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
2359 var obj = new api.Table.fromJson(json); 2359 var obj = new api.Table.fromJson(json);
2360 checkTable(obj); 2360 checkTable(obj);
2361 2361
2362 var path = (req.url).path; 2362 var path = (req.url).path;
2363 var pathOffset = 0; 2363 var pathOffset = 0;
2364 var index; 2364 var index;
2365 var subPart; 2365 var subPart;
2366 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 2366 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
2367 pathOffset += 1; 2367 pathOffset += 1;
2368 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("fusiontables/v2/")); 2368 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("fusiontables/v2/"));
(...skipping 22 matching lines...) Expand all
2391 } 2391 }
2392 unittest.expect(queryMap["replaceViewDefinition"].first, unittest.equals ("$arg_replaceViewDefinition")); 2392 unittest.expect(queryMap["replaceViewDefinition"].first, unittest.equals ("$arg_replaceViewDefinition"));
2393 2393
2394 2394
2395 var h = { 2395 var h = {
2396 "content-type" : "application/json; charset=utf-8", 2396 "content-type" : "application/json; charset=utf-8",
2397 }; 2397 };
2398 var resp = convert.JSON.encode(buildTable()); 2398 var resp = convert.JSON.encode(buildTable());
2399 return new async.Future.value(stringResponse(200, h, resp)); 2399 return new async.Future.value(stringResponse(200, h, resp));
2400 }), true); 2400 }), true);
2401 res.patch(arg_request, arg_tableId, replaceViewDefinition: arg_replaceView Definition).then(unittest.expectAsync(((api.Table response) { 2401 res.patch(arg_request, arg_tableId, replaceViewDefinition: arg_replaceView Definition).then(unittest.expectAsync1(((api.Table response) {
2402 checkTable(response); 2402 checkTable(response);
2403 }))); 2403 })));
2404 }); 2404 });
2405 2405
2406 unittest.test("method--replaceRows", () { 2406 unittest.test("method--replaceRows", () {
2407 // TODO: Implement tests for media upload; 2407 // TODO: Implement tests for media upload;
2408 // TODO: Implement tests for media download; 2408 // TODO: Implement tests for media download;
2409 2409
2410 var mock = new HttpServerMock(); 2410 var mock = new HttpServerMock();
2411 api.TableResourceApi res = new api.FusiontablesApi(mock).table; 2411 api.TableResourceApi res = new api.FusiontablesApi(mock).table;
2412 var arg_tableId = "foo"; 2412 var arg_tableId = "foo";
2413 var arg_delimiter = "foo"; 2413 var arg_delimiter = "foo";
2414 var arg_encoding = "foo"; 2414 var arg_encoding = "foo";
2415 var arg_endLine = 42; 2415 var arg_endLine = 42;
2416 var arg_isStrict = true; 2416 var arg_isStrict = true;
2417 var arg_startLine = 42; 2417 var arg_startLine = 42;
2418 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 2418 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
2419 var path = (req.url).path; 2419 var path = (req.url).path;
2420 var pathOffset = 0; 2420 var pathOffset = 0;
2421 var index; 2421 var index;
2422 var subPart; 2422 var subPart;
2423 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 2423 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
2424 pathOffset += 1; 2424 pathOffset += 1;
2425 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("fusiontables/v2/")); 2425 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("fusiontables/v2/"));
2426 pathOffset += 16; 2426 pathOffset += 16;
2427 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ als("tables/")); 2427 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ als("tables/"));
2428 pathOffset += 7; 2428 pathOffset += 7;
(...skipping 27 matching lines...) Expand all
2456 unittest.expect(queryMap["isStrict"].first, unittest.equals("$arg_isStri ct")); 2456 unittest.expect(queryMap["isStrict"].first, unittest.equals("$arg_isStri ct"));
2457 unittest.expect(core.int.parse(queryMap["startLine"].first), unittest.eq uals(arg_startLine)); 2457 unittest.expect(core.int.parse(queryMap["startLine"].first), unittest.eq uals(arg_startLine));
2458 2458
2459 2459
2460 var h = { 2460 var h = {
2461 "content-type" : "application/json; charset=utf-8", 2461 "content-type" : "application/json; charset=utf-8",
2462 }; 2462 };
2463 var resp = convert.JSON.encode(buildTask()); 2463 var resp = convert.JSON.encode(buildTask());
2464 return new async.Future.value(stringResponse(200, h, resp)); 2464 return new async.Future.value(stringResponse(200, h, resp));
2465 }), true); 2465 }), true);
2466 res.replaceRows(arg_tableId, delimiter: arg_delimiter, encoding: arg_encod ing, endLine: arg_endLine, isStrict: arg_isStrict, startLine: arg_startLine).the n(unittest.expectAsync(((api.Task response) { 2466 res.replaceRows(arg_tableId, delimiter: arg_delimiter, encoding: arg_encod ing, endLine: arg_endLine, isStrict: arg_isStrict, startLine: arg_startLine).the n(unittest.expectAsync1(((api.Task response) {
2467 checkTask(response); 2467 checkTask(response);
2468 }))); 2468 })));
2469 }); 2469 });
2470 2470
2471 unittest.test("method--update", () { 2471 unittest.test("method--update", () {
2472 2472
2473 var mock = new HttpServerMock(); 2473 var mock = new HttpServerMock();
2474 api.TableResourceApi res = new api.FusiontablesApi(mock).table; 2474 api.TableResourceApi res = new api.FusiontablesApi(mock).table;
2475 var arg_request = buildTable(); 2475 var arg_request = buildTable();
2476 var arg_tableId = "foo"; 2476 var arg_tableId = "foo";
2477 var arg_replaceViewDefinition = true; 2477 var arg_replaceViewDefinition = true;
2478 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 2478 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
2479 var obj = new api.Table.fromJson(json); 2479 var obj = new api.Table.fromJson(json);
2480 checkTable(obj); 2480 checkTable(obj);
2481 2481
2482 var path = (req.url).path; 2482 var path = (req.url).path;
2483 var pathOffset = 0; 2483 var pathOffset = 0;
2484 var index; 2484 var index;
2485 var subPart; 2485 var subPart;
2486 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 2486 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
2487 pathOffset += 1; 2487 pathOffset += 1;
2488 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("fusiontables/v2/")); 2488 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("fusiontables/v2/"));
(...skipping 22 matching lines...) Expand all
2511 } 2511 }
2512 unittest.expect(queryMap["replaceViewDefinition"].first, unittest.equals ("$arg_replaceViewDefinition")); 2512 unittest.expect(queryMap["replaceViewDefinition"].first, unittest.equals ("$arg_replaceViewDefinition"));
2513 2513
2514 2514
2515 var h = { 2515 var h = {
2516 "content-type" : "application/json; charset=utf-8", 2516 "content-type" : "application/json; charset=utf-8",
2517 }; 2517 };
2518 var resp = convert.JSON.encode(buildTable()); 2518 var resp = convert.JSON.encode(buildTable());
2519 return new async.Future.value(stringResponse(200, h, resp)); 2519 return new async.Future.value(stringResponse(200, h, resp));
2520 }), true); 2520 }), true);
2521 res.update(arg_request, arg_tableId, replaceViewDefinition: arg_replaceVie wDefinition).then(unittest.expectAsync(((api.Table response) { 2521 res.update(arg_request, arg_tableId, replaceViewDefinition: arg_replaceVie wDefinition).then(unittest.expectAsync1(((api.Table response) {
2522 checkTable(response); 2522 checkTable(response);
2523 }))); 2523 })));
2524 }); 2524 });
2525 2525
2526 }); 2526 });
2527 2527
2528 2528
2529 unittest.group("resource-TaskResourceApi", () { 2529 unittest.group("resource-TaskResourceApi", () {
2530 unittest.test("method--delete", () { 2530 unittest.test("method--delete", () {
2531 2531
2532 var mock = new HttpServerMock(); 2532 var mock = new HttpServerMock();
2533 api.TaskResourceApi res = new api.FusiontablesApi(mock).task; 2533 api.TaskResourceApi res = new api.FusiontablesApi(mock).task;
2534 var arg_tableId = "foo"; 2534 var arg_tableId = "foo";
2535 var arg_taskId = "foo"; 2535 var arg_taskId = "foo";
2536 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 2536 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
2537 var path = (req.url).path; 2537 var path = (req.url).path;
2538 var pathOffset = 0; 2538 var pathOffset = 0;
2539 var index; 2539 var index;
2540 var subPart; 2540 var subPart;
2541 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 2541 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
2542 pathOffset += 1; 2542 pathOffset += 1;
2543 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("fusiontables/v2/")); 2543 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("fusiontables/v2/"));
2544 pathOffset += 16; 2544 pathOffset += 16;
2545 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ als("tables/")); 2545 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ als("tables/"));
2546 pathOffset += 7; 2546 pathOffset += 7;
(...skipping 25 matching lines...) Expand all
2572 } 2572 }
2573 } 2573 }
2574 2574
2575 2575
2576 var h = { 2576 var h = {
2577 "content-type" : "application/json; charset=utf-8", 2577 "content-type" : "application/json; charset=utf-8",
2578 }; 2578 };
2579 var resp = ""; 2579 var resp = "";
2580 return new async.Future.value(stringResponse(200, h, resp)); 2580 return new async.Future.value(stringResponse(200, h, resp));
2581 }), true); 2581 }), true);
2582 res.delete(arg_tableId, arg_taskId).then(unittest.expectAsync((_) {})); 2582 res.delete(arg_tableId, arg_taskId).then(unittest.expectAsync1((_) {}));
2583 }); 2583 });
2584 2584
2585 unittest.test("method--get", () { 2585 unittest.test("method--get", () {
2586 2586
2587 var mock = new HttpServerMock(); 2587 var mock = new HttpServerMock();
2588 api.TaskResourceApi res = new api.FusiontablesApi(mock).task; 2588 api.TaskResourceApi res = new api.FusiontablesApi(mock).task;
2589 var arg_tableId = "foo"; 2589 var arg_tableId = "foo";
2590 var arg_taskId = "foo"; 2590 var arg_taskId = "foo";
2591 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 2591 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
2592 var path = (req.url).path; 2592 var path = (req.url).path;
2593 var pathOffset = 0; 2593 var pathOffset = 0;
2594 var index; 2594 var index;
2595 var subPart; 2595 var subPart;
2596 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 2596 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
2597 pathOffset += 1; 2597 pathOffset += 1;
2598 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("fusiontables/v2/")); 2598 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("fusiontables/v2/"));
2599 pathOffset += 16; 2599 pathOffset += 16;
2600 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ als("tables/")); 2600 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ als("tables/"));
2601 pathOffset += 7; 2601 pathOffset += 7;
(...skipping 25 matching lines...) Expand all
2627 } 2627 }
2628 } 2628 }
2629 2629
2630 2630
2631 var h = { 2631 var h = {
2632 "content-type" : "application/json; charset=utf-8", 2632 "content-type" : "application/json; charset=utf-8",
2633 }; 2633 };
2634 var resp = convert.JSON.encode(buildTask()); 2634 var resp = convert.JSON.encode(buildTask());
2635 return new async.Future.value(stringResponse(200, h, resp)); 2635 return new async.Future.value(stringResponse(200, h, resp));
2636 }), true); 2636 }), true);
2637 res.get(arg_tableId, arg_taskId).then(unittest.expectAsync(((api.Task resp onse) { 2637 res.get(arg_tableId, arg_taskId).then(unittest.expectAsync1(((api.Task res ponse) {
2638 checkTask(response); 2638 checkTask(response);
2639 }))); 2639 })));
2640 }); 2640 });
2641 2641
2642 unittest.test("method--list", () { 2642 unittest.test("method--list", () {
2643 2643
2644 var mock = new HttpServerMock(); 2644 var mock = new HttpServerMock();
2645 api.TaskResourceApi res = new api.FusiontablesApi(mock).task; 2645 api.TaskResourceApi res = new api.FusiontablesApi(mock).task;
2646 var arg_tableId = "foo"; 2646 var arg_tableId = "foo";
2647 var arg_maxResults = 42; 2647 var arg_maxResults = 42;
2648 var arg_pageToken = "foo"; 2648 var arg_pageToken = "foo";
2649 var arg_startIndex = 42; 2649 var arg_startIndex = 42;
2650 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 2650 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
2651 var path = (req.url).path; 2651 var path = (req.url).path;
2652 var pathOffset = 0; 2652 var pathOffset = 0;
2653 var index; 2653 var index;
2654 var subPart; 2654 var subPart;
2655 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 2655 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
2656 pathOffset += 1; 2656 pathOffset += 1;
2657 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("fusiontables/v2/")); 2657 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("fusiontables/v2/"));
2658 pathOffset += 16; 2658 pathOffset += 16;
2659 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ als("tables/")); 2659 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ als("tables/"));
2660 pathOffset += 7; 2660 pathOffset += 7;
(...skipping 25 matching lines...) Expand all
2686 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en)); 2686 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en));
2687 unittest.expect(core.int.parse(queryMap["startIndex"].first), unittest.e quals(arg_startIndex)); 2687 unittest.expect(core.int.parse(queryMap["startIndex"].first), unittest.e quals(arg_startIndex));
2688 2688
2689 2689
2690 var h = { 2690 var h = {
2691 "content-type" : "application/json; charset=utf-8", 2691 "content-type" : "application/json; charset=utf-8",
2692 }; 2692 };
2693 var resp = convert.JSON.encode(buildTaskList()); 2693 var resp = convert.JSON.encode(buildTaskList());
2694 return new async.Future.value(stringResponse(200, h, resp)); 2694 return new async.Future.value(stringResponse(200, h, resp));
2695 }), true); 2695 }), true);
2696 res.list(arg_tableId, maxResults: arg_maxResults, pageToken: arg_pageToken , startIndex: arg_startIndex).then(unittest.expectAsync(((api.TaskList response) { 2696 res.list(arg_tableId, maxResults: arg_maxResults, pageToken: arg_pageToken , startIndex: arg_startIndex).then(unittest.expectAsync1(((api.TaskList response ) {
2697 checkTaskList(response); 2697 checkTaskList(response);
2698 }))); 2698 })));
2699 }); 2699 });
2700 2700
2701 }); 2701 });
2702 2702
2703 2703
2704 unittest.group("resource-TemplateResourceApi", () { 2704 unittest.group("resource-TemplateResourceApi", () {
2705 unittest.test("method--delete", () { 2705 unittest.test("method--delete", () {
2706 2706
2707 var mock = new HttpServerMock(); 2707 var mock = new HttpServerMock();
2708 api.TemplateResourceApi res = new api.FusiontablesApi(mock).template; 2708 api.TemplateResourceApi res = new api.FusiontablesApi(mock).template;
2709 var arg_tableId = "foo"; 2709 var arg_tableId = "foo";
2710 var arg_templateId = 42; 2710 var arg_templateId = 42;
2711 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 2711 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
2712 var path = (req.url).path; 2712 var path = (req.url).path;
2713 var pathOffset = 0; 2713 var pathOffset = 0;
2714 var index; 2714 var index;
2715 var subPart; 2715 var subPart;
2716 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 2716 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
2717 pathOffset += 1; 2717 pathOffset += 1;
2718 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("fusiontables/v2/")); 2718 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("fusiontables/v2/"));
2719 pathOffset += 16; 2719 pathOffset += 16;
2720 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ als("tables/")); 2720 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ als("tables/"));
2721 pathOffset += 7; 2721 pathOffset += 7;
(...skipping 25 matching lines...) Expand all
2747 } 2747 }
2748 } 2748 }
2749 2749
2750 2750
2751 var h = { 2751 var h = {
2752 "content-type" : "application/json; charset=utf-8", 2752 "content-type" : "application/json; charset=utf-8",
2753 }; 2753 };
2754 var resp = ""; 2754 var resp = "";
2755 return new async.Future.value(stringResponse(200, h, resp)); 2755 return new async.Future.value(stringResponse(200, h, resp));
2756 }), true); 2756 }), true);
2757 res.delete(arg_tableId, arg_templateId).then(unittest.expectAsync((_) {})) ; 2757 res.delete(arg_tableId, arg_templateId).then(unittest.expectAsync1((_) {}) );
2758 }); 2758 });
2759 2759
2760 unittest.test("method--get", () { 2760 unittest.test("method--get", () {
2761 2761
2762 var mock = new HttpServerMock(); 2762 var mock = new HttpServerMock();
2763 api.TemplateResourceApi res = new api.FusiontablesApi(mock).template; 2763 api.TemplateResourceApi res = new api.FusiontablesApi(mock).template;
2764 var arg_tableId = "foo"; 2764 var arg_tableId = "foo";
2765 var arg_templateId = 42; 2765 var arg_templateId = 42;
2766 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 2766 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
2767 var path = (req.url).path; 2767 var path = (req.url).path;
2768 var pathOffset = 0; 2768 var pathOffset = 0;
2769 var index; 2769 var index;
2770 var subPart; 2770 var subPart;
2771 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 2771 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
2772 pathOffset += 1; 2772 pathOffset += 1;
2773 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("fusiontables/v2/")); 2773 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("fusiontables/v2/"));
2774 pathOffset += 16; 2774 pathOffset += 16;
2775 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ als("tables/")); 2775 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ als("tables/"));
2776 pathOffset += 7; 2776 pathOffset += 7;
(...skipping 25 matching lines...) Expand all
2802 } 2802 }
2803 } 2803 }
2804 2804
2805 2805
2806 var h = { 2806 var h = {
2807 "content-type" : "application/json; charset=utf-8", 2807 "content-type" : "application/json; charset=utf-8",
2808 }; 2808 };
2809 var resp = convert.JSON.encode(buildTemplate()); 2809 var resp = convert.JSON.encode(buildTemplate());
2810 return new async.Future.value(stringResponse(200, h, resp)); 2810 return new async.Future.value(stringResponse(200, h, resp));
2811 }), true); 2811 }), true);
2812 res.get(arg_tableId, arg_templateId).then(unittest.expectAsync(((api.Templ ate response) { 2812 res.get(arg_tableId, arg_templateId).then(unittest.expectAsync1(((api.Temp late response) {
2813 checkTemplate(response); 2813 checkTemplate(response);
2814 }))); 2814 })));
2815 }); 2815 });
2816 2816
2817 unittest.test("method--insert", () { 2817 unittest.test("method--insert", () {
2818 2818
2819 var mock = new HttpServerMock(); 2819 var mock = new HttpServerMock();
2820 api.TemplateResourceApi res = new api.FusiontablesApi(mock).template; 2820 api.TemplateResourceApi res = new api.FusiontablesApi(mock).template;
2821 var arg_request = buildTemplate(); 2821 var arg_request = buildTemplate();
2822 var arg_tableId = "foo"; 2822 var arg_tableId = "foo";
2823 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 2823 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
2824 var obj = new api.Template.fromJson(json); 2824 var obj = new api.Template.fromJson(json);
2825 checkTemplate(obj); 2825 checkTemplate(obj);
2826 2826
2827 var path = (req.url).path; 2827 var path = (req.url).path;
2828 var pathOffset = 0; 2828 var pathOffset = 0;
2829 var index; 2829 var index;
2830 var subPart; 2830 var subPart;
2831 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 2831 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
2832 pathOffset += 1; 2832 pathOffset += 1;
2833 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("fusiontables/v2/")); 2833 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("fusiontables/v2/"));
(...skipping 25 matching lines...) Expand all
2859 } 2859 }
2860 } 2860 }
2861 2861
2862 2862
2863 var h = { 2863 var h = {
2864 "content-type" : "application/json; charset=utf-8", 2864 "content-type" : "application/json; charset=utf-8",
2865 }; 2865 };
2866 var resp = convert.JSON.encode(buildTemplate()); 2866 var resp = convert.JSON.encode(buildTemplate());
2867 return new async.Future.value(stringResponse(200, h, resp)); 2867 return new async.Future.value(stringResponse(200, h, resp));
2868 }), true); 2868 }), true);
2869 res.insert(arg_request, arg_tableId).then(unittest.expectAsync(((api.Templ ate response) { 2869 res.insert(arg_request, arg_tableId).then(unittest.expectAsync1(((api.Temp late response) {
2870 checkTemplate(response); 2870 checkTemplate(response);
2871 }))); 2871 })));
2872 }); 2872 });
2873 2873
2874 unittest.test("method--list", () { 2874 unittest.test("method--list", () {
2875 2875
2876 var mock = new HttpServerMock(); 2876 var mock = new HttpServerMock();
2877 api.TemplateResourceApi res = new api.FusiontablesApi(mock).template; 2877 api.TemplateResourceApi res = new api.FusiontablesApi(mock).template;
2878 var arg_tableId = "foo"; 2878 var arg_tableId = "foo";
2879 var arg_maxResults = 42; 2879 var arg_maxResults = 42;
2880 var arg_pageToken = "foo"; 2880 var arg_pageToken = "foo";
2881 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 2881 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
2882 var path = (req.url).path; 2882 var path = (req.url).path;
2883 var pathOffset = 0; 2883 var pathOffset = 0;
2884 var index; 2884 var index;
2885 var subPart; 2885 var subPart;
2886 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 2886 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
2887 pathOffset += 1; 2887 pathOffset += 1;
2888 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("fusiontables/v2/")); 2888 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("fusiontables/v2/"));
2889 pathOffset += 16; 2889 pathOffset += 16;
2890 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ als("tables/")); 2890 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ als("tables/"));
2891 pathOffset += 7; 2891 pathOffset += 7;
(...skipping 24 matching lines...) Expand all
2916 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e quals(arg_maxResults)); 2916 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e quals(arg_maxResults));
2917 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en)); 2917 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en));
2918 2918
2919 2919
2920 var h = { 2920 var h = {
2921 "content-type" : "application/json; charset=utf-8", 2921 "content-type" : "application/json; charset=utf-8",
2922 }; 2922 };
2923 var resp = convert.JSON.encode(buildTemplateList()); 2923 var resp = convert.JSON.encode(buildTemplateList());
2924 return new async.Future.value(stringResponse(200, h, resp)); 2924 return new async.Future.value(stringResponse(200, h, resp));
2925 }), true); 2925 }), true);
2926 res.list(arg_tableId, maxResults: arg_maxResults, pageToken: arg_pageToken ).then(unittest.expectAsync(((api.TemplateList response) { 2926 res.list(arg_tableId, maxResults: arg_maxResults, pageToken: arg_pageToken ).then(unittest.expectAsync1(((api.TemplateList response) {
2927 checkTemplateList(response); 2927 checkTemplateList(response);
2928 }))); 2928 })));
2929 }); 2929 });
2930 2930
2931 unittest.test("method--patch", () { 2931 unittest.test("method--patch", () {
2932 2932
2933 var mock = new HttpServerMock(); 2933 var mock = new HttpServerMock();
2934 api.TemplateResourceApi res = new api.FusiontablesApi(mock).template; 2934 api.TemplateResourceApi res = new api.FusiontablesApi(mock).template;
2935 var arg_request = buildTemplate(); 2935 var arg_request = buildTemplate();
2936 var arg_tableId = "foo"; 2936 var arg_tableId = "foo";
2937 var arg_templateId = 42; 2937 var arg_templateId = 42;
2938 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 2938 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
2939 var obj = new api.Template.fromJson(json); 2939 var obj = new api.Template.fromJson(json);
2940 checkTemplate(obj); 2940 checkTemplate(obj);
2941 2941
2942 var path = (req.url).path; 2942 var path = (req.url).path;
2943 var pathOffset = 0; 2943 var pathOffset = 0;
2944 var index; 2944 var index;
2945 var subPart; 2945 var subPart;
2946 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 2946 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
2947 pathOffset += 1; 2947 pathOffset += 1;
2948 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("fusiontables/v2/")); 2948 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("fusiontables/v2/"));
(...skipping 28 matching lines...) Expand all
2977 } 2977 }
2978 } 2978 }
2979 2979
2980 2980
2981 var h = { 2981 var h = {
2982 "content-type" : "application/json; charset=utf-8", 2982 "content-type" : "application/json; charset=utf-8",
2983 }; 2983 };
2984 var resp = convert.JSON.encode(buildTemplate()); 2984 var resp = convert.JSON.encode(buildTemplate());
2985 return new async.Future.value(stringResponse(200, h, resp)); 2985 return new async.Future.value(stringResponse(200, h, resp));
2986 }), true); 2986 }), true);
2987 res.patch(arg_request, arg_tableId, arg_templateId).then(unittest.expectAs ync(((api.Template response) { 2987 res.patch(arg_request, arg_tableId, arg_templateId).then(unittest.expectAs ync1(((api.Template response) {
2988 checkTemplate(response); 2988 checkTemplate(response);
2989 }))); 2989 })));
2990 }); 2990 });
2991 2991
2992 unittest.test("method--update", () { 2992 unittest.test("method--update", () {
2993 2993
2994 var mock = new HttpServerMock(); 2994 var mock = new HttpServerMock();
2995 api.TemplateResourceApi res = new api.FusiontablesApi(mock).template; 2995 api.TemplateResourceApi res = new api.FusiontablesApi(mock).template;
2996 var arg_request = buildTemplate(); 2996 var arg_request = buildTemplate();
2997 var arg_tableId = "foo"; 2997 var arg_tableId = "foo";
2998 var arg_templateId = 42; 2998 var arg_templateId = 42;
2999 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 2999 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
3000 var obj = new api.Template.fromJson(json); 3000 var obj = new api.Template.fromJson(json);
3001 checkTemplate(obj); 3001 checkTemplate(obj);
3002 3002
3003 var path = (req.url).path; 3003 var path = (req.url).path;
3004 var pathOffset = 0; 3004 var pathOffset = 0;
3005 var index; 3005 var index;
3006 var subPart; 3006 var subPart;
3007 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 3007 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
3008 pathOffset += 1; 3008 pathOffset += 1;
3009 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("fusiontables/v2/")); 3009 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("fusiontables/v2/"));
(...skipping 28 matching lines...) Expand all
3038 } 3038 }
3039 } 3039 }
3040 3040
3041 3041
3042 var h = { 3042 var h = {
3043 "content-type" : "application/json; charset=utf-8", 3043 "content-type" : "application/json; charset=utf-8",
3044 }; 3044 };
3045 var resp = convert.JSON.encode(buildTemplate()); 3045 var resp = convert.JSON.encode(buildTemplate());
3046 return new async.Future.value(stringResponse(200, h, resp)); 3046 return new async.Future.value(stringResponse(200, h, resp));
3047 }), true); 3047 }), true);
3048 res.update(arg_request, arg_tableId, arg_templateId).then(unittest.expectA sync(((api.Template response) { 3048 res.update(arg_request, arg_tableId, arg_templateId).then(unittest.expectA sync1(((api.Template response) {
3049 checkTemplate(response); 3049 checkTemplate(response);
3050 }))); 3050 })));
3051 }); 3051 });
3052 3052
3053 }); 3053 });
3054 3054
3055 3055
3056 } 3056 }
3057 3057
OLDNEW
« no previous file with comments | « generated/googleapis/test/fusiontables/v1_test.dart ('k') | generated/googleapis/test/games/v1_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698