OLD | NEW |
1 library googleapis.bigquery.v2.test; | 1 library googleapis.bigquery.v2.test; |
2 | 2 |
3 import "dart:core" as core; | 3 import "dart:core" as core; |
4 import "dart:collection" as collection; | 4 import "dart:collection" as collection; |
5 import "dart:async" as async; | 5 import "dart:async" as async; |
6 import "dart:convert" as convert; | 6 import "dart:convert" as convert; |
7 | 7 |
8 import 'package:http/http.dart' as http; | 8 import 'package:http/http.dart' as http; |
9 import 'package:http/testing.dart' as http_testing; | 9 import 'package:http/testing.dart' as http_testing; |
10 import 'package:unittest/unittest.dart' as unittest; | 10 import 'package:unittest/unittest.dart' as unittest; |
11 import 'package:googleapis/common/common.dart' as common; | |
12 import 'package:googleapis/src/common_internal.dart' as common_internal; | |
13 import '../common/common_internal_test.dart' as common_test; | |
14 | 11 |
15 import 'package:googleapis/bigquery/v2.dart' as api; | 12 import 'package:googleapis/bigquery/v2.dart' as api; |
16 | 13 |
| 14 class HttpServerMock extends http.BaseClient { |
| 15 core.Function _callback; |
| 16 core.bool _expectJson; |
17 | 17 |
| 18 void register(core.Function callback, core.bool expectJson) { |
| 19 _callback = callback; |
| 20 _expectJson = expectJson; |
| 21 } |
| 22 |
| 23 async.Future<http.StreamedResponse> send(http.BaseRequest request) { |
| 24 if (_expectJson) { |
| 25 return request.finalize() |
| 26 .transform(convert.UTF8.decoder) |
| 27 .join('') |
| 28 .then((core.String jsonString) { |
| 29 if (jsonString.isEmpty) { |
| 30 return _callback(request, null); |
| 31 } else { |
| 32 return _callback(request, convert.JSON.decode(jsonString)); |
| 33 } |
| 34 }); |
| 35 } else { |
| 36 var stream = request.finalize(); |
| 37 if (stream == null) { |
| 38 return _callback(request, []); |
| 39 } else { |
| 40 return stream.toBytes().then((data) { |
| 41 return _callback(request, data); |
| 42 }); |
| 43 } |
| 44 } |
| 45 } |
| 46 } |
| 47 |
| 48 http.StreamedResponse stringResponse( |
| 49 core.int status, core.Map headers, core.String body) { |
| 50 var stream = new async.Stream.fromIterable([convert.UTF8.encode(body)]); |
| 51 return new http.StreamedResponse(stream, status, headers: headers); |
| 52 } |
| 53 |
| 54 core.int buildCounterCsvOptions = 0; |
| 55 buildCsvOptions() { |
| 56 var o = new api.CsvOptions(); |
| 57 buildCounterCsvOptions++; |
| 58 if (buildCounterCsvOptions < 3) { |
| 59 o.allowJaggedRows = true; |
| 60 o.allowQuotedNewlines = true; |
| 61 o.encoding = "foo"; |
| 62 o.fieldDelimiter = "foo"; |
| 63 o.quote = "foo"; |
| 64 o.skipLeadingRows = 42; |
| 65 } |
| 66 buildCounterCsvOptions--; |
| 67 return o; |
| 68 } |
| 69 |
| 70 checkCsvOptions(api.CsvOptions o) { |
| 71 buildCounterCsvOptions++; |
| 72 if (buildCounterCsvOptions < 3) { |
| 73 unittest.expect(o.allowJaggedRows, unittest.isTrue); |
| 74 unittest.expect(o.allowQuotedNewlines, unittest.isTrue); |
| 75 unittest.expect(o.encoding, unittest.equals('foo')); |
| 76 unittest.expect(o.fieldDelimiter, unittest.equals('foo')); |
| 77 unittest.expect(o.quote, unittest.equals('foo')); |
| 78 unittest.expect(o.skipLeadingRows, unittest.equals(42)); |
| 79 } |
| 80 buildCounterCsvOptions--; |
| 81 } |
18 | 82 |
19 core.int buildCounterDatasetAccess = 0; | 83 core.int buildCounterDatasetAccess = 0; |
20 buildDatasetAccess() { | 84 buildDatasetAccess() { |
21 var o = new api.DatasetAccess(); | 85 var o = new api.DatasetAccess(); |
22 buildCounterDatasetAccess++; | 86 buildCounterDatasetAccess++; |
23 if (buildCounterDatasetAccess < 3) { | 87 if (buildCounterDatasetAccess < 3) { |
24 o.domain = "foo"; | 88 o.domain = "foo"; |
25 o.groupByEmail = "foo"; | 89 o.groupByEmail = "foo"; |
26 o.role = "foo"; | 90 o.role = "foo"; |
27 o.specialGroup = "foo"; | 91 o.specialGroup = "foo"; |
(...skipping 10 matching lines...) Expand all Loading... |
38 unittest.expect(o.domain, unittest.equals('foo')); | 102 unittest.expect(o.domain, unittest.equals('foo')); |
39 unittest.expect(o.groupByEmail, unittest.equals('foo')); | 103 unittest.expect(o.groupByEmail, unittest.equals('foo')); |
40 unittest.expect(o.role, unittest.equals('foo')); | 104 unittest.expect(o.role, unittest.equals('foo')); |
41 unittest.expect(o.specialGroup, unittest.equals('foo')); | 105 unittest.expect(o.specialGroup, unittest.equals('foo')); |
42 unittest.expect(o.userByEmail, unittest.equals('foo')); | 106 unittest.expect(o.userByEmail, unittest.equals('foo')); |
43 checkTableReference(o.view); | 107 checkTableReference(o.view); |
44 } | 108 } |
45 buildCounterDatasetAccess--; | 109 buildCounterDatasetAccess--; |
46 } | 110 } |
47 | 111 |
48 buildUnnamed1457() { | 112 buildUnnamed285() { |
49 var o = new core.List<api.DatasetAccess>(); | 113 var o = new core.List<api.DatasetAccess>(); |
50 o.add(buildDatasetAccess()); | 114 o.add(buildDatasetAccess()); |
51 o.add(buildDatasetAccess()); | 115 o.add(buildDatasetAccess()); |
52 return o; | 116 return o; |
53 } | 117 } |
54 | 118 |
55 checkUnnamed1457(core.List<api.DatasetAccess> o) { | 119 checkUnnamed285(core.List<api.DatasetAccess> o) { |
56 unittest.expect(o, unittest.hasLength(2)); | 120 unittest.expect(o, unittest.hasLength(2)); |
57 checkDatasetAccess(o[0]); | 121 checkDatasetAccess(o[0]); |
58 checkDatasetAccess(o[1]); | 122 checkDatasetAccess(o[1]); |
59 } | 123 } |
60 | 124 |
61 core.int buildCounterDataset = 0; | 125 core.int buildCounterDataset = 0; |
62 buildDataset() { | 126 buildDataset() { |
63 var o = new api.Dataset(); | 127 var o = new api.Dataset(); |
64 buildCounterDataset++; | 128 buildCounterDataset++; |
65 if (buildCounterDataset < 3) { | 129 if (buildCounterDataset < 3) { |
66 o.access = buildUnnamed1457(); | 130 o.access = buildUnnamed285(); |
67 o.creationTime = "foo"; | 131 o.creationTime = "foo"; |
68 o.datasetReference = buildDatasetReference(); | 132 o.datasetReference = buildDatasetReference(); |
| 133 o.defaultTableExpirationMs = "foo"; |
69 o.description = "foo"; | 134 o.description = "foo"; |
70 o.etag = "foo"; | 135 o.etag = "foo"; |
71 o.friendlyName = "foo"; | 136 o.friendlyName = "foo"; |
72 o.id = "foo"; | 137 o.id = "foo"; |
73 o.kind = "foo"; | 138 o.kind = "foo"; |
74 o.lastModifiedTime = "foo"; | 139 o.lastModifiedTime = "foo"; |
75 o.selfLink = "foo"; | 140 o.selfLink = "foo"; |
76 } | 141 } |
77 buildCounterDataset--; | 142 buildCounterDataset--; |
78 return o; | 143 return o; |
79 } | 144 } |
80 | 145 |
81 checkDataset(api.Dataset o) { | 146 checkDataset(api.Dataset o) { |
82 buildCounterDataset++; | 147 buildCounterDataset++; |
83 if (buildCounterDataset < 3) { | 148 if (buildCounterDataset < 3) { |
84 checkUnnamed1457(o.access); | 149 checkUnnamed285(o.access); |
85 unittest.expect(o.creationTime, unittest.equals('foo')); | 150 unittest.expect(o.creationTime, unittest.equals('foo')); |
86 checkDatasetReference(o.datasetReference); | 151 checkDatasetReference(o.datasetReference); |
| 152 unittest.expect(o.defaultTableExpirationMs, unittest.equals('foo')); |
87 unittest.expect(o.description, unittest.equals('foo')); | 153 unittest.expect(o.description, unittest.equals('foo')); |
88 unittest.expect(o.etag, unittest.equals('foo')); | 154 unittest.expect(o.etag, unittest.equals('foo')); |
89 unittest.expect(o.friendlyName, unittest.equals('foo')); | 155 unittest.expect(o.friendlyName, unittest.equals('foo')); |
90 unittest.expect(o.id, unittest.equals('foo')); | 156 unittest.expect(o.id, unittest.equals('foo')); |
91 unittest.expect(o.kind, unittest.equals('foo')); | 157 unittest.expect(o.kind, unittest.equals('foo')); |
92 unittest.expect(o.lastModifiedTime, unittest.equals('foo')); | 158 unittest.expect(o.lastModifiedTime, unittest.equals('foo')); |
93 unittest.expect(o.selfLink, unittest.equals('foo')); | 159 unittest.expect(o.selfLink, unittest.equals('foo')); |
94 } | 160 } |
95 buildCounterDataset--; | 161 buildCounterDataset--; |
96 } | 162 } |
(...skipping 16 matching lines...) Expand all Loading... |
113 buildCounterDatasetListDatasets++; | 179 buildCounterDatasetListDatasets++; |
114 if (buildCounterDatasetListDatasets < 3) { | 180 if (buildCounterDatasetListDatasets < 3) { |
115 checkDatasetReference(o.datasetReference); | 181 checkDatasetReference(o.datasetReference); |
116 unittest.expect(o.friendlyName, unittest.equals('foo')); | 182 unittest.expect(o.friendlyName, unittest.equals('foo')); |
117 unittest.expect(o.id, unittest.equals('foo')); | 183 unittest.expect(o.id, unittest.equals('foo')); |
118 unittest.expect(o.kind, unittest.equals('foo')); | 184 unittest.expect(o.kind, unittest.equals('foo')); |
119 } | 185 } |
120 buildCounterDatasetListDatasets--; | 186 buildCounterDatasetListDatasets--; |
121 } | 187 } |
122 | 188 |
123 buildUnnamed1458() { | 189 buildUnnamed286() { |
124 var o = new core.List<api.DatasetListDatasets>(); | 190 var o = new core.List<api.DatasetListDatasets>(); |
125 o.add(buildDatasetListDatasets()); | 191 o.add(buildDatasetListDatasets()); |
126 o.add(buildDatasetListDatasets()); | 192 o.add(buildDatasetListDatasets()); |
127 return o; | 193 return o; |
128 } | 194 } |
129 | 195 |
130 checkUnnamed1458(core.List<api.DatasetListDatasets> o) { | 196 checkUnnamed286(core.List<api.DatasetListDatasets> o) { |
131 unittest.expect(o, unittest.hasLength(2)); | 197 unittest.expect(o, unittest.hasLength(2)); |
132 checkDatasetListDatasets(o[0]); | 198 checkDatasetListDatasets(o[0]); |
133 checkDatasetListDatasets(o[1]); | 199 checkDatasetListDatasets(o[1]); |
134 } | 200 } |
135 | 201 |
136 core.int buildCounterDatasetList = 0; | 202 core.int buildCounterDatasetList = 0; |
137 buildDatasetList() { | 203 buildDatasetList() { |
138 var o = new api.DatasetList(); | 204 var o = new api.DatasetList(); |
139 buildCounterDatasetList++; | 205 buildCounterDatasetList++; |
140 if (buildCounterDatasetList < 3) { | 206 if (buildCounterDatasetList < 3) { |
141 o.datasets = buildUnnamed1458(); | 207 o.datasets = buildUnnamed286(); |
142 o.etag = "foo"; | 208 o.etag = "foo"; |
143 o.kind = "foo"; | 209 o.kind = "foo"; |
144 o.nextPageToken = "foo"; | 210 o.nextPageToken = "foo"; |
145 } | 211 } |
146 buildCounterDatasetList--; | 212 buildCounterDatasetList--; |
147 return o; | 213 return o; |
148 } | 214 } |
149 | 215 |
150 checkDatasetList(api.DatasetList o) { | 216 checkDatasetList(api.DatasetList o) { |
151 buildCounterDatasetList++; | 217 buildCounterDatasetList++; |
152 if (buildCounterDatasetList < 3) { | 218 if (buildCounterDatasetList < 3) { |
153 checkUnnamed1458(o.datasets); | 219 checkUnnamed286(o.datasets); |
154 unittest.expect(o.etag, unittest.equals('foo')); | 220 unittest.expect(o.etag, unittest.equals('foo')); |
155 unittest.expect(o.kind, unittest.equals('foo')); | 221 unittest.expect(o.kind, unittest.equals('foo')); |
156 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 222 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
157 } | 223 } |
158 buildCounterDatasetList--; | 224 buildCounterDatasetList--; |
159 } | 225 } |
160 | 226 |
161 core.int buildCounterDatasetReference = 0; | 227 core.int buildCounterDatasetReference = 0; |
162 buildDatasetReference() { | 228 buildDatasetReference() { |
163 var o = new api.DatasetReference(); | 229 var o = new api.DatasetReference(); |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
197 buildCounterErrorProto++; | 263 buildCounterErrorProto++; |
198 if (buildCounterErrorProto < 3) { | 264 if (buildCounterErrorProto < 3) { |
199 unittest.expect(o.debugInfo, unittest.equals('foo')); | 265 unittest.expect(o.debugInfo, unittest.equals('foo')); |
200 unittest.expect(o.location, unittest.equals('foo')); | 266 unittest.expect(o.location, unittest.equals('foo')); |
201 unittest.expect(o.message, unittest.equals('foo')); | 267 unittest.expect(o.message, unittest.equals('foo')); |
202 unittest.expect(o.reason, unittest.equals('foo')); | 268 unittest.expect(o.reason, unittest.equals('foo')); |
203 } | 269 } |
204 buildCounterErrorProto--; | 270 buildCounterErrorProto--; |
205 } | 271 } |
206 | 272 |
207 buildUnnamed1459() { | 273 buildUnnamed287() { |
| 274 var o = new core.List<core.String>(); |
| 275 o.add("foo"); |
| 276 o.add("foo"); |
| 277 return o; |
| 278 } |
| 279 |
| 280 checkUnnamed287(core.List<core.String> o) { |
| 281 unittest.expect(o, unittest.hasLength(2)); |
| 282 unittest.expect(o[0], unittest.equals('foo')); |
| 283 unittest.expect(o[1], unittest.equals('foo')); |
| 284 } |
| 285 |
| 286 core.int buildCounterExternalDataConfiguration = 0; |
| 287 buildExternalDataConfiguration() { |
| 288 var o = new api.ExternalDataConfiguration(); |
| 289 buildCounterExternalDataConfiguration++; |
| 290 if (buildCounterExternalDataConfiguration < 3) { |
| 291 o.compression = "foo"; |
| 292 o.csvOptions = buildCsvOptions(); |
| 293 o.ignoreUnknownValues = true; |
| 294 o.maxBadRecords = 42; |
| 295 o.schema = buildTableSchema(); |
| 296 o.sourceFormat = "foo"; |
| 297 o.sourceUris = buildUnnamed287(); |
| 298 } |
| 299 buildCounterExternalDataConfiguration--; |
| 300 return o; |
| 301 } |
| 302 |
| 303 checkExternalDataConfiguration(api.ExternalDataConfiguration o) { |
| 304 buildCounterExternalDataConfiguration++; |
| 305 if (buildCounterExternalDataConfiguration < 3) { |
| 306 unittest.expect(o.compression, unittest.equals('foo')); |
| 307 checkCsvOptions(o.csvOptions); |
| 308 unittest.expect(o.ignoreUnknownValues, unittest.isTrue); |
| 309 unittest.expect(o.maxBadRecords, unittest.equals(42)); |
| 310 checkTableSchema(o.schema); |
| 311 unittest.expect(o.sourceFormat, unittest.equals('foo')); |
| 312 checkUnnamed287(o.sourceUris); |
| 313 } |
| 314 buildCounterExternalDataConfiguration--; |
| 315 } |
| 316 |
| 317 buildUnnamed288() { |
208 var o = new core.List<api.TableRow>(); | 318 var o = new core.List<api.TableRow>(); |
209 o.add(buildTableRow()); | 319 o.add(buildTableRow()); |
210 o.add(buildTableRow()); | 320 o.add(buildTableRow()); |
211 return o; | 321 return o; |
212 } | 322 } |
213 | 323 |
214 checkUnnamed1459(core.List<api.TableRow> o) { | 324 checkUnnamed288(core.List<api.TableRow> o) { |
215 unittest.expect(o, unittest.hasLength(2)); | 325 unittest.expect(o, unittest.hasLength(2)); |
216 checkTableRow(o[0]); | 326 checkTableRow(o[0]); |
217 checkTableRow(o[1]); | 327 checkTableRow(o[1]); |
218 } | 328 } |
219 | 329 |
220 core.int buildCounterGetQueryResultsResponse = 0; | 330 core.int buildCounterGetQueryResultsResponse = 0; |
221 buildGetQueryResultsResponse() { | 331 buildGetQueryResultsResponse() { |
222 var o = new api.GetQueryResultsResponse(); | 332 var o = new api.GetQueryResultsResponse(); |
223 buildCounterGetQueryResultsResponse++; | 333 buildCounterGetQueryResultsResponse++; |
224 if (buildCounterGetQueryResultsResponse < 3) { | 334 if (buildCounterGetQueryResultsResponse < 3) { |
225 o.cacheHit = true; | 335 o.cacheHit = true; |
226 o.etag = "foo"; | 336 o.etag = "foo"; |
227 o.jobComplete = true; | 337 o.jobComplete = true; |
228 o.jobReference = buildJobReference(); | 338 o.jobReference = buildJobReference(); |
229 o.kind = "foo"; | 339 o.kind = "foo"; |
230 o.pageToken = "foo"; | 340 o.pageToken = "foo"; |
231 o.rows = buildUnnamed1459(); | 341 o.rows = buildUnnamed288(); |
232 o.schema = buildTableSchema(); | 342 o.schema = buildTableSchema(); |
233 o.totalBytesProcessed = "foo"; | 343 o.totalBytesProcessed = "foo"; |
234 o.totalRows = "foo"; | 344 o.totalRows = "foo"; |
235 } | 345 } |
236 buildCounterGetQueryResultsResponse--; | 346 buildCounterGetQueryResultsResponse--; |
237 return o; | 347 return o; |
238 } | 348 } |
239 | 349 |
240 checkGetQueryResultsResponse(api.GetQueryResultsResponse o) { | 350 checkGetQueryResultsResponse(api.GetQueryResultsResponse o) { |
241 buildCounterGetQueryResultsResponse++; | 351 buildCounterGetQueryResultsResponse++; |
242 if (buildCounterGetQueryResultsResponse < 3) { | 352 if (buildCounterGetQueryResultsResponse < 3) { |
243 unittest.expect(o.cacheHit, unittest.isTrue); | 353 unittest.expect(o.cacheHit, unittest.isTrue); |
244 unittest.expect(o.etag, unittest.equals('foo')); | 354 unittest.expect(o.etag, unittest.equals('foo')); |
245 unittest.expect(o.jobComplete, unittest.isTrue); | 355 unittest.expect(o.jobComplete, unittest.isTrue); |
246 checkJobReference(o.jobReference); | 356 checkJobReference(o.jobReference); |
247 unittest.expect(o.kind, unittest.equals('foo')); | 357 unittest.expect(o.kind, unittest.equals('foo')); |
248 unittest.expect(o.pageToken, unittest.equals('foo')); | 358 unittest.expect(o.pageToken, unittest.equals('foo')); |
249 checkUnnamed1459(o.rows); | 359 checkUnnamed288(o.rows); |
250 checkTableSchema(o.schema); | 360 checkTableSchema(o.schema); |
251 unittest.expect(o.totalBytesProcessed, unittest.equals('foo')); | 361 unittest.expect(o.totalBytesProcessed, unittest.equals('foo')); |
252 unittest.expect(o.totalRows, unittest.equals('foo')); | 362 unittest.expect(o.totalRows, unittest.equals('foo')); |
253 } | 363 } |
254 buildCounterGetQueryResultsResponse--; | 364 buildCounterGetQueryResultsResponse--; |
255 } | 365 } |
256 | 366 |
257 core.int buildCounterJob = 0; | 367 core.int buildCounterJob = 0; |
258 buildJob() { | 368 buildJob() { |
259 var o = new api.Job(); | 369 var o = new api.Job(); |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
311 checkJobConfigurationTableCopy(o.copy); | 421 checkJobConfigurationTableCopy(o.copy); |
312 unittest.expect(o.dryRun, unittest.isTrue); | 422 unittest.expect(o.dryRun, unittest.isTrue); |
313 checkJobConfigurationExtract(o.extract); | 423 checkJobConfigurationExtract(o.extract); |
314 checkJobConfigurationLink(o.link); | 424 checkJobConfigurationLink(o.link); |
315 checkJobConfigurationLoad(o.load); | 425 checkJobConfigurationLoad(o.load); |
316 checkJobConfigurationQuery(o.query); | 426 checkJobConfigurationQuery(o.query); |
317 } | 427 } |
318 buildCounterJobConfiguration--; | 428 buildCounterJobConfiguration--; |
319 } | 429 } |
320 | 430 |
321 buildUnnamed1460() { | 431 buildUnnamed289() { |
322 var o = new core.List<core.String>(); | 432 var o = new core.List<core.String>(); |
323 o.add("foo"); | 433 o.add("foo"); |
324 o.add("foo"); | 434 o.add("foo"); |
325 return o; | 435 return o; |
326 } | 436 } |
327 | 437 |
328 checkUnnamed1460(core.List<core.String> o) { | 438 checkUnnamed289(core.List<core.String> o) { |
329 unittest.expect(o, unittest.hasLength(2)); | 439 unittest.expect(o, unittest.hasLength(2)); |
330 unittest.expect(o[0], unittest.equals('foo')); | 440 unittest.expect(o[0], unittest.equals('foo')); |
331 unittest.expect(o[1], unittest.equals('foo')); | 441 unittest.expect(o[1], unittest.equals('foo')); |
332 } | 442 } |
333 | 443 |
334 core.int buildCounterJobConfigurationExtract = 0; | 444 core.int buildCounterJobConfigurationExtract = 0; |
335 buildJobConfigurationExtract() { | 445 buildJobConfigurationExtract() { |
336 var o = new api.JobConfigurationExtract(); | 446 var o = new api.JobConfigurationExtract(); |
337 buildCounterJobConfigurationExtract++; | 447 buildCounterJobConfigurationExtract++; |
338 if (buildCounterJobConfigurationExtract < 3) { | 448 if (buildCounterJobConfigurationExtract < 3) { |
339 o.compression = "foo"; | 449 o.compression = "foo"; |
340 o.destinationFormat = "foo"; | 450 o.destinationFormat = "foo"; |
341 o.destinationUri = "foo"; | 451 o.destinationUri = "foo"; |
342 o.destinationUris = buildUnnamed1460(); | 452 o.destinationUris = buildUnnamed289(); |
343 o.fieldDelimiter = "foo"; | 453 o.fieldDelimiter = "foo"; |
344 o.printHeader = true; | 454 o.printHeader = true; |
345 o.sourceTable = buildTableReference(); | 455 o.sourceTable = buildTableReference(); |
346 } | 456 } |
347 buildCounterJobConfigurationExtract--; | 457 buildCounterJobConfigurationExtract--; |
348 return o; | 458 return o; |
349 } | 459 } |
350 | 460 |
351 checkJobConfigurationExtract(api.JobConfigurationExtract o) { | 461 checkJobConfigurationExtract(api.JobConfigurationExtract o) { |
352 buildCounterJobConfigurationExtract++; | 462 buildCounterJobConfigurationExtract++; |
353 if (buildCounterJobConfigurationExtract < 3) { | 463 if (buildCounterJobConfigurationExtract < 3) { |
354 unittest.expect(o.compression, unittest.equals('foo')); | 464 unittest.expect(o.compression, unittest.equals('foo')); |
355 unittest.expect(o.destinationFormat, unittest.equals('foo')); | 465 unittest.expect(o.destinationFormat, unittest.equals('foo')); |
356 unittest.expect(o.destinationUri, unittest.equals('foo')); | 466 unittest.expect(o.destinationUri, unittest.equals('foo')); |
357 checkUnnamed1460(o.destinationUris); | 467 checkUnnamed289(o.destinationUris); |
358 unittest.expect(o.fieldDelimiter, unittest.equals('foo')); | 468 unittest.expect(o.fieldDelimiter, unittest.equals('foo')); |
359 unittest.expect(o.printHeader, unittest.isTrue); | 469 unittest.expect(o.printHeader, unittest.isTrue); |
360 checkTableReference(o.sourceTable); | 470 checkTableReference(o.sourceTable); |
361 } | 471 } |
362 buildCounterJobConfigurationExtract--; | 472 buildCounterJobConfigurationExtract--; |
363 } | 473 } |
364 | 474 |
365 buildUnnamed1461() { | 475 buildUnnamed290() { |
366 var o = new core.List<core.String>(); | 476 var o = new core.List<core.String>(); |
367 o.add("foo"); | 477 o.add("foo"); |
368 o.add("foo"); | 478 o.add("foo"); |
369 return o; | 479 return o; |
370 } | 480 } |
371 | 481 |
372 checkUnnamed1461(core.List<core.String> o) { | 482 checkUnnamed290(core.List<core.String> o) { |
373 unittest.expect(o, unittest.hasLength(2)); | 483 unittest.expect(o, unittest.hasLength(2)); |
374 unittest.expect(o[0], unittest.equals('foo')); | 484 unittest.expect(o[0], unittest.equals('foo')); |
375 unittest.expect(o[1], unittest.equals('foo')); | 485 unittest.expect(o[1], unittest.equals('foo')); |
376 } | 486 } |
377 | 487 |
378 core.int buildCounterJobConfigurationLink = 0; | 488 core.int buildCounterJobConfigurationLink = 0; |
379 buildJobConfigurationLink() { | 489 buildJobConfigurationLink() { |
380 var o = new api.JobConfigurationLink(); | 490 var o = new api.JobConfigurationLink(); |
381 buildCounterJobConfigurationLink++; | 491 buildCounterJobConfigurationLink++; |
382 if (buildCounterJobConfigurationLink < 3) { | 492 if (buildCounterJobConfigurationLink < 3) { |
383 o.createDisposition = "foo"; | 493 o.createDisposition = "foo"; |
384 o.destinationTable = buildTableReference(); | 494 o.destinationTable = buildTableReference(); |
385 o.sourceUri = buildUnnamed1461(); | 495 o.sourceUri = buildUnnamed290(); |
386 o.writeDisposition = "foo"; | 496 o.writeDisposition = "foo"; |
387 } | 497 } |
388 buildCounterJobConfigurationLink--; | 498 buildCounterJobConfigurationLink--; |
389 return o; | 499 return o; |
390 } | 500 } |
391 | 501 |
392 checkJobConfigurationLink(api.JobConfigurationLink o) { | 502 checkJobConfigurationLink(api.JobConfigurationLink o) { |
393 buildCounterJobConfigurationLink++; | 503 buildCounterJobConfigurationLink++; |
394 if (buildCounterJobConfigurationLink < 3) { | 504 if (buildCounterJobConfigurationLink < 3) { |
395 unittest.expect(o.createDisposition, unittest.equals('foo')); | 505 unittest.expect(o.createDisposition, unittest.equals('foo')); |
396 checkTableReference(o.destinationTable); | 506 checkTableReference(o.destinationTable); |
397 checkUnnamed1461(o.sourceUri); | 507 checkUnnamed290(o.sourceUri); |
398 unittest.expect(o.writeDisposition, unittest.equals('foo')); | 508 unittest.expect(o.writeDisposition, unittest.equals('foo')); |
399 } | 509 } |
400 buildCounterJobConfigurationLink--; | 510 buildCounterJobConfigurationLink--; |
401 } | 511 } |
402 | 512 |
403 buildUnnamed1462() { | 513 buildUnnamed291() { |
404 var o = new core.List<core.String>(); | 514 var o = new core.List<core.String>(); |
405 o.add("foo"); | 515 o.add("foo"); |
406 o.add("foo"); | 516 o.add("foo"); |
407 return o; | 517 return o; |
408 } | 518 } |
409 | 519 |
410 checkUnnamed1462(core.List<core.String> o) { | 520 checkUnnamed291(core.List<core.String> o) { |
411 unittest.expect(o, unittest.hasLength(2)); | 521 unittest.expect(o, unittest.hasLength(2)); |
412 unittest.expect(o[0], unittest.equals('foo')); | 522 unittest.expect(o[0], unittest.equals('foo')); |
413 unittest.expect(o[1], unittest.equals('foo')); | 523 unittest.expect(o[1], unittest.equals('foo')); |
414 } | 524 } |
415 | 525 |
416 buildUnnamed1463() { | 526 buildUnnamed292() { |
417 var o = new core.List<core.String>(); | 527 var o = new core.List<core.String>(); |
418 o.add("foo"); | 528 o.add("foo"); |
419 o.add("foo"); | 529 o.add("foo"); |
420 return o; | 530 return o; |
421 } | 531 } |
422 | 532 |
423 checkUnnamed1463(core.List<core.String> o) { | 533 checkUnnamed292(core.List<core.String> o) { |
424 unittest.expect(o, unittest.hasLength(2)); | 534 unittest.expect(o, unittest.hasLength(2)); |
425 unittest.expect(o[0], unittest.equals('foo')); | 535 unittest.expect(o[0], unittest.equals('foo')); |
426 unittest.expect(o[1], unittest.equals('foo')); | 536 unittest.expect(o[1], unittest.equals('foo')); |
427 } | 537 } |
428 | 538 |
429 core.int buildCounterJobConfigurationLoad = 0; | 539 core.int buildCounterJobConfigurationLoad = 0; |
430 buildJobConfigurationLoad() { | 540 buildJobConfigurationLoad() { |
431 var o = new api.JobConfigurationLoad(); | 541 var o = new api.JobConfigurationLoad(); |
432 buildCounterJobConfigurationLoad++; | 542 buildCounterJobConfigurationLoad++; |
433 if (buildCounterJobConfigurationLoad < 3) { | 543 if (buildCounterJobConfigurationLoad < 3) { |
434 o.allowJaggedRows = true; | 544 o.allowJaggedRows = true; |
435 o.allowQuotedNewlines = true; | 545 o.allowQuotedNewlines = true; |
436 o.createDisposition = "foo"; | 546 o.createDisposition = "foo"; |
437 o.destinationTable = buildTableReference(); | 547 o.destinationTable = buildTableReference(); |
438 o.encoding = "foo"; | 548 o.encoding = "foo"; |
439 o.fieldDelimiter = "foo"; | 549 o.fieldDelimiter = "foo"; |
440 o.ignoreUnknownValues = true; | 550 o.ignoreUnknownValues = true; |
441 o.maxBadRecords = 42; | 551 o.maxBadRecords = 42; |
442 o.projectionFields = buildUnnamed1462(); | 552 o.projectionFields = buildUnnamed291(); |
443 o.quote = "foo"; | 553 o.quote = "foo"; |
444 o.schema = buildTableSchema(); | 554 o.schema = buildTableSchema(); |
445 o.schemaInline = "foo"; | 555 o.schemaInline = "foo"; |
446 o.schemaInlineFormat = "foo"; | 556 o.schemaInlineFormat = "foo"; |
447 o.skipLeadingRows = 42; | 557 o.skipLeadingRows = 42; |
448 o.sourceFormat = "foo"; | 558 o.sourceFormat = "foo"; |
449 o.sourceUris = buildUnnamed1463(); | 559 o.sourceUris = buildUnnamed292(); |
450 o.writeDisposition = "foo"; | 560 o.writeDisposition = "foo"; |
451 } | 561 } |
452 buildCounterJobConfigurationLoad--; | 562 buildCounterJobConfigurationLoad--; |
453 return o; | 563 return o; |
454 } | 564 } |
455 | 565 |
456 checkJobConfigurationLoad(api.JobConfigurationLoad o) { | 566 checkJobConfigurationLoad(api.JobConfigurationLoad o) { |
457 buildCounterJobConfigurationLoad++; | 567 buildCounterJobConfigurationLoad++; |
458 if (buildCounterJobConfigurationLoad < 3) { | 568 if (buildCounterJobConfigurationLoad < 3) { |
459 unittest.expect(o.allowJaggedRows, unittest.isTrue); | 569 unittest.expect(o.allowJaggedRows, unittest.isTrue); |
460 unittest.expect(o.allowQuotedNewlines, unittest.isTrue); | 570 unittest.expect(o.allowQuotedNewlines, unittest.isTrue); |
461 unittest.expect(o.createDisposition, unittest.equals('foo')); | 571 unittest.expect(o.createDisposition, unittest.equals('foo')); |
462 checkTableReference(o.destinationTable); | 572 checkTableReference(o.destinationTable); |
463 unittest.expect(o.encoding, unittest.equals('foo')); | 573 unittest.expect(o.encoding, unittest.equals('foo')); |
464 unittest.expect(o.fieldDelimiter, unittest.equals('foo')); | 574 unittest.expect(o.fieldDelimiter, unittest.equals('foo')); |
465 unittest.expect(o.ignoreUnknownValues, unittest.isTrue); | 575 unittest.expect(o.ignoreUnknownValues, unittest.isTrue); |
466 unittest.expect(o.maxBadRecords, unittest.equals(42)); | 576 unittest.expect(o.maxBadRecords, unittest.equals(42)); |
467 checkUnnamed1462(o.projectionFields); | 577 checkUnnamed291(o.projectionFields); |
468 unittest.expect(o.quote, unittest.equals('foo')); | 578 unittest.expect(o.quote, unittest.equals('foo')); |
469 checkTableSchema(o.schema); | 579 checkTableSchema(o.schema); |
470 unittest.expect(o.schemaInline, unittest.equals('foo')); | 580 unittest.expect(o.schemaInline, unittest.equals('foo')); |
471 unittest.expect(o.schemaInlineFormat, unittest.equals('foo')); | 581 unittest.expect(o.schemaInlineFormat, unittest.equals('foo')); |
472 unittest.expect(o.skipLeadingRows, unittest.equals(42)); | 582 unittest.expect(o.skipLeadingRows, unittest.equals(42)); |
473 unittest.expect(o.sourceFormat, unittest.equals('foo')); | 583 unittest.expect(o.sourceFormat, unittest.equals('foo')); |
474 checkUnnamed1463(o.sourceUris); | 584 checkUnnamed292(o.sourceUris); |
475 unittest.expect(o.writeDisposition, unittest.equals('foo')); | 585 unittest.expect(o.writeDisposition, unittest.equals('foo')); |
476 } | 586 } |
477 buildCounterJobConfigurationLoad--; | 587 buildCounterJobConfigurationLoad--; |
478 } | 588 } |
479 | 589 |
| 590 buildUnnamed293() { |
| 591 var o = new core.Map<core.String, api.ExternalDataConfiguration>(); |
| 592 o["x"] = buildExternalDataConfiguration(); |
| 593 o["y"] = buildExternalDataConfiguration(); |
| 594 return o; |
| 595 } |
| 596 |
| 597 checkUnnamed293(core.Map<core.String, api.ExternalDataConfiguration> o) { |
| 598 unittest.expect(o, unittest.hasLength(2)); |
| 599 checkExternalDataConfiguration(o["x"]); |
| 600 checkExternalDataConfiguration(o["y"]); |
| 601 } |
| 602 |
480 core.int buildCounterJobConfigurationQuery = 0; | 603 core.int buildCounterJobConfigurationQuery = 0; |
481 buildJobConfigurationQuery() { | 604 buildJobConfigurationQuery() { |
482 var o = new api.JobConfigurationQuery(); | 605 var o = new api.JobConfigurationQuery(); |
483 buildCounterJobConfigurationQuery++; | 606 buildCounterJobConfigurationQuery++; |
484 if (buildCounterJobConfigurationQuery < 3) { | 607 if (buildCounterJobConfigurationQuery < 3) { |
485 o.allowLargeResults = true; | 608 o.allowLargeResults = true; |
486 o.createDisposition = "foo"; | 609 o.createDisposition = "foo"; |
487 o.defaultDataset = buildDatasetReference(); | 610 o.defaultDataset = buildDatasetReference(); |
488 o.destinationTable = buildTableReference(); | 611 o.destinationTable = buildTableReference(); |
489 o.flattenResults = true; | 612 o.flattenResults = true; |
490 o.preserveNulls = true; | 613 o.preserveNulls = true; |
491 o.priority = "foo"; | 614 o.priority = "foo"; |
492 o.query = "foo"; | 615 o.query = "foo"; |
| 616 o.tableDefinitions = buildUnnamed293(); |
493 o.useQueryCache = true; | 617 o.useQueryCache = true; |
494 o.writeDisposition = "foo"; | 618 o.writeDisposition = "foo"; |
495 } | 619 } |
496 buildCounterJobConfigurationQuery--; | 620 buildCounterJobConfigurationQuery--; |
497 return o; | 621 return o; |
498 } | 622 } |
499 | 623 |
500 checkJobConfigurationQuery(api.JobConfigurationQuery o) { | 624 checkJobConfigurationQuery(api.JobConfigurationQuery o) { |
501 buildCounterJobConfigurationQuery++; | 625 buildCounterJobConfigurationQuery++; |
502 if (buildCounterJobConfigurationQuery < 3) { | 626 if (buildCounterJobConfigurationQuery < 3) { |
503 unittest.expect(o.allowLargeResults, unittest.isTrue); | 627 unittest.expect(o.allowLargeResults, unittest.isTrue); |
504 unittest.expect(o.createDisposition, unittest.equals('foo')); | 628 unittest.expect(o.createDisposition, unittest.equals('foo')); |
505 checkDatasetReference(o.defaultDataset); | 629 checkDatasetReference(o.defaultDataset); |
506 checkTableReference(o.destinationTable); | 630 checkTableReference(o.destinationTable); |
507 unittest.expect(o.flattenResults, unittest.isTrue); | 631 unittest.expect(o.flattenResults, unittest.isTrue); |
508 unittest.expect(o.preserveNulls, unittest.isTrue); | 632 unittest.expect(o.preserveNulls, unittest.isTrue); |
509 unittest.expect(o.priority, unittest.equals('foo')); | 633 unittest.expect(o.priority, unittest.equals('foo')); |
510 unittest.expect(o.query, unittest.equals('foo')); | 634 unittest.expect(o.query, unittest.equals('foo')); |
| 635 checkUnnamed293(o.tableDefinitions); |
511 unittest.expect(o.useQueryCache, unittest.isTrue); | 636 unittest.expect(o.useQueryCache, unittest.isTrue); |
512 unittest.expect(o.writeDisposition, unittest.equals('foo')); | 637 unittest.expect(o.writeDisposition, unittest.equals('foo')); |
513 } | 638 } |
514 buildCounterJobConfigurationQuery--; | 639 buildCounterJobConfigurationQuery--; |
515 } | 640 } |
516 | 641 |
517 buildUnnamed1464() { | 642 buildUnnamed294() { |
518 var o = new core.List<api.TableReference>(); | 643 var o = new core.List<api.TableReference>(); |
519 o.add(buildTableReference()); | 644 o.add(buildTableReference()); |
520 o.add(buildTableReference()); | 645 o.add(buildTableReference()); |
521 return o; | 646 return o; |
522 } | 647 } |
523 | 648 |
524 checkUnnamed1464(core.List<api.TableReference> o) { | 649 checkUnnamed294(core.List<api.TableReference> o) { |
525 unittest.expect(o, unittest.hasLength(2)); | 650 unittest.expect(o, unittest.hasLength(2)); |
526 checkTableReference(o[0]); | 651 checkTableReference(o[0]); |
527 checkTableReference(o[1]); | 652 checkTableReference(o[1]); |
528 } | 653 } |
529 | 654 |
530 core.int buildCounterJobConfigurationTableCopy = 0; | 655 core.int buildCounterJobConfigurationTableCopy = 0; |
531 buildJobConfigurationTableCopy() { | 656 buildJobConfigurationTableCopy() { |
532 var o = new api.JobConfigurationTableCopy(); | 657 var o = new api.JobConfigurationTableCopy(); |
533 buildCounterJobConfigurationTableCopy++; | 658 buildCounterJobConfigurationTableCopy++; |
534 if (buildCounterJobConfigurationTableCopy < 3) { | 659 if (buildCounterJobConfigurationTableCopy < 3) { |
535 o.createDisposition = "foo"; | 660 o.createDisposition = "foo"; |
536 o.destinationTable = buildTableReference(); | 661 o.destinationTable = buildTableReference(); |
537 o.sourceTable = buildTableReference(); | 662 o.sourceTable = buildTableReference(); |
538 o.sourceTables = buildUnnamed1464(); | 663 o.sourceTables = buildUnnamed294(); |
539 o.writeDisposition = "foo"; | 664 o.writeDisposition = "foo"; |
540 } | 665 } |
541 buildCounterJobConfigurationTableCopy--; | 666 buildCounterJobConfigurationTableCopy--; |
542 return o; | 667 return o; |
543 } | 668 } |
544 | 669 |
545 checkJobConfigurationTableCopy(api.JobConfigurationTableCopy o) { | 670 checkJobConfigurationTableCopy(api.JobConfigurationTableCopy o) { |
546 buildCounterJobConfigurationTableCopy++; | 671 buildCounterJobConfigurationTableCopy++; |
547 if (buildCounterJobConfigurationTableCopy < 3) { | 672 if (buildCounterJobConfigurationTableCopy < 3) { |
548 unittest.expect(o.createDisposition, unittest.equals('foo')); | 673 unittest.expect(o.createDisposition, unittest.equals('foo')); |
549 checkTableReference(o.destinationTable); | 674 checkTableReference(o.destinationTable); |
550 checkTableReference(o.sourceTable); | 675 checkTableReference(o.sourceTable); |
551 checkUnnamed1464(o.sourceTables); | 676 checkUnnamed294(o.sourceTables); |
552 unittest.expect(o.writeDisposition, unittest.equals('foo')); | 677 unittest.expect(o.writeDisposition, unittest.equals('foo')); |
553 } | 678 } |
554 buildCounterJobConfigurationTableCopy--; | 679 buildCounterJobConfigurationTableCopy--; |
555 } | 680 } |
556 | 681 |
557 core.int buildCounterJobListJobs = 0; | 682 core.int buildCounterJobListJobs = 0; |
558 buildJobListJobs() { | 683 buildJobListJobs() { |
559 var o = new api.JobListJobs(); | 684 var o = new api.JobListJobs(); |
560 buildCounterJobListJobs++; | 685 buildCounterJobListJobs++; |
561 if (buildCounterJobListJobs < 3) { | 686 if (buildCounterJobListJobs < 3) { |
(...skipping 20 matching lines...) Expand all Loading... |
582 checkJobReference(o.jobReference); | 707 checkJobReference(o.jobReference); |
583 unittest.expect(o.kind, unittest.equals('foo')); | 708 unittest.expect(o.kind, unittest.equals('foo')); |
584 unittest.expect(o.state, unittest.equals('foo')); | 709 unittest.expect(o.state, unittest.equals('foo')); |
585 checkJobStatistics(o.statistics); | 710 checkJobStatistics(o.statistics); |
586 checkJobStatus(o.status); | 711 checkJobStatus(o.status); |
587 unittest.expect(o.userEmail, unittest.equals('foo')); | 712 unittest.expect(o.userEmail, unittest.equals('foo')); |
588 } | 713 } |
589 buildCounterJobListJobs--; | 714 buildCounterJobListJobs--; |
590 } | 715 } |
591 | 716 |
592 buildUnnamed1465() { | 717 buildUnnamed295() { |
593 var o = new core.List<api.JobListJobs>(); | 718 var o = new core.List<api.JobListJobs>(); |
594 o.add(buildJobListJobs()); | 719 o.add(buildJobListJobs()); |
595 o.add(buildJobListJobs()); | 720 o.add(buildJobListJobs()); |
596 return o; | 721 return o; |
597 } | 722 } |
598 | 723 |
599 checkUnnamed1465(core.List<api.JobListJobs> o) { | 724 checkUnnamed295(core.List<api.JobListJobs> o) { |
600 unittest.expect(o, unittest.hasLength(2)); | 725 unittest.expect(o, unittest.hasLength(2)); |
601 checkJobListJobs(o[0]); | 726 checkJobListJobs(o[0]); |
602 checkJobListJobs(o[1]); | 727 checkJobListJobs(o[1]); |
603 } | 728 } |
604 | 729 |
605 core.int buildCounterJobList = 0; | 730 core.int buildCounterJobList = 0; |
606 buildJobList() { | 731 buildJobList() { |
607 var o = new api.JobList(); | 732 var o = new api.JobList(); |
608 buildCounterJobList++; | 733 buildCounterJobList++; |
609 if (buildCounterJobList < 3) { | 734 if (buildCounterJobList < 3) { |
610 o.etag = "foo"; | 735 o.etag = "foo"; |
611 o.jobs = buildUnnamed1465(); | 736 o.jobs = buildUnnamed295(); |
612 o.kind = "foo"; | 737 o.kind = "foo"; |
613 o.nextPageToken = "foo"; | 738 o.nextPageToken = "foo"; |
614 o.totalItems = 42; | 739 o.totalItems = 42; |
615 } | 740 } |
616 buildCounterJobList--; | 741 buildCounterJobList--; |
617 return o; | 742 return o; |
618 } | 743 } |
619 | 744 |
620 checkJobList(api.JobList o) { | 745 checkJobList(api.JobList o) { |
621 buildCounterJobList++; | 746 buildCounterJobList++; |
622 if (buildCounterJobList < 3) { | 747 if (buildCounterJobList < 3) { |
623 unittest.expect(o.etag, unittest.equals('foo')); | 748 unittest.expect(o.etag, unittest.equals('foo')); |
624 checkUnnamed1465(o.jobs); | 749 checkUnnamed295(o.jobs); |
625 unittest.expect(o.kind, unittest.equals('foo')); | 750 unittest.expect(o.kind, unittest.equals('foo')); |
626 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 751 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
627 unittest.expect(o.totalItems, unittest.equals(42)); | 752 unittest.expect(o.totalItems, unittest.equals(42)); |
628 } | 753 } |
629 buildCounterJobList--; | 754 buildCounterJobList--; |
630 } | 755 } |
631 | 756 |
632 core.int buildCounterJobReference = 0; | 757 core.int buildCounterJobReference = 0; |
633 buildJobReference() { | 758 buildJobReference() { |
634 var o = new api.JobReference(); | 759 var o = new api.JobReference(); |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
720 buildCounterJobStatistics3++; | 845 buildCounterJobStatistics3++; |
721 if (buildCounterJobStatistics3 < 3) { | 846 if (buildCounterJobStatistics3 < 3) { |
722 unittest.expect(o.inputFileBytes, unittest.equals('foo')); | 847 unittest.expect(o.inputFileBytes, unittest.equals('foo')); |
723 unittest.expect(o.inputFiles, unittest.equals('foo')); | 848 unittest.expect(o.inputFiles, unittest.equals('foo')); |
724 unittest.expect(o.outputBytes, unittest.equals('foo')); | 849 unittest.expect(o.outputBytes, unittest.equals('foo')); |
725 unittest.expect(o.outputRows, unittest.equals('foo')); | 850 unittest.expect(o.outputRows, unittest.equals('foo')); |
726 } | 851 } |
727 buildCounterJobStatistics3--; | 852 buildCounterJobStatistics3--; |
728 } | 853 } |
729 | 854 |
730 buildUnnamed1466() { | 855 buildUnnamed296() { |
731 var o = new core.List<core.String>(); | 856 var o = new core.List<core.String>(); |
732 o.add("foo"); | 857 o.add("foo"); |
733 o.add("foo"); | 858 o.add("foo"); |
734 return o; | 859 return o; |
735 } | 860 } |
736 | 861 |
737 checkUnnamed1466(core.List<core.String> o) { | 862 checkUnnamed296(core.List<core.String> o) { |
738 unittest.expect(o, unittest.hasLength(2)); | 863 unittest.expect(o, unittest.hasLength(2)); |
739 unittest.expect(o[0], unittest.equals('foo')); | 864 unittest.expect(o[0], unittest.equals('foo')); |
740 unittest.expect(o[1], unittest.equals('foo')); | 865 unittest.expect(o[1], unittest.equals('foo')); |
741 } | 866 } |
742 | 867 |
743 core.int buildCounterJobStatistics4 = 0; | 868 core.int buildCounterJobStatistics4 = 0; |
744 buildJobStatistics4() { | 869 buildJobStatistics4() { |
745 var o = new api.JobStatistics4(); | 870 var o = new api.JobStatistics4(); |
746 buildCounterJobStatistics4++; | 871 buildCounterJobStatistics4++; |
747 if (buildCounterJobStatistics4 < 3) { | 872 if (buildCounterJobStatistics4 < 3) { |
748 o.destinationUriFileCounts = buildUnnamed1466(); | 873 o.destinationUriFileCounts = buildUnnamed296(); |
749 } | 874 } |
750 buildCounterJobStatistics4--; | 875 buildCounterJobStatistics4--; |
751 return o; | 876 return o; |
752 } | 877 } |
753 | 878 |
754 checkJobStatistics4(api.JobStatistics4 o) { | 879 checkJobStatistics4(api.JobStatistics4 o) { |
755 buildCounterJobStatistics4++; | 880 buildCounterJobStatistics4++; |
756 if (buildCounterJobStatistics4 < 3) { | 881 if (buildCounterJobStatistics4 < 3) { |
757 checkUnnamed1466(o.destinationUriFileCounts); | 882 checkUnnamed296(o.destinationUriFileCounts); |
758 } | 883 } |
759 buildCounterJobStatistics4--; | 884 buildCounterJobStatistics4--; |
760 } | 885 } |
761 | 886 |
762 buildUnnamed1467() { | 887 buildUnnamed297() { |
763 var o = new core.List<api.ErrorProto>(); | 888 var o = new core.List<api.ErrorProto>(); |
764 o.add(buildErrorProto()); | 889 o.add(buildErrorProto()); |
765 o.add(buildErrorProto()); | 890 o.add(buildErrorProto()); |
766 return o; | 891 return o; |
767 } | 892 } |
768 | 893 |
769 checkUnnamed1467(core.List<api.ErrorProto> o) { | 894 checkUnnamed297(core.List<api.ErrorProto> o) { |
770 unittest.expect(o, unittest.hasLength(2)); | 895 unittest.expect(o, unittest.hasLength(2)); |
771 checkErrorProto(o[0]); | 896 checkErrorProto(o[0]); |
772 checkErrorProto(o[1]); | 897 checkErrorProto(o[1]); |
773 } | 898 } |
774 | 899 |
775 core.int buildCounterJobStatus = 0; | 900 core.int buildCounterJobStatus = 0; |
776 buildJobStatus() { | 901 buildJobStatus() { |
777 var o = new api.JobStatus(); | 902 var o = new api.JobStatus(); |
778 buildCounterJobStatus++; | 903 buildCounterJobStatus++; |
779 if (buildCounterJobStatus < 3) { | 904 if (buildCounterJobStatus < 3) { |
780 o.errorResult = buildErrorProto(); | 905 o.errorResult = buildErrorProto(); |
781 o.errors = buildUnnamed1467(); | 906 o.errors = buildUnnamed297(); |
782 o.state = "foo"; | 907 o.state = "foo"; |
783 } | 908 } |
784 buildCounterJobStatus--; | 909 buildCounterJobStatus--; |
785 return o; | 910 return o; |
786 } | 911 } |
787 | 912 |
788 checkJobStatus(api.JobStatus o) { | 913 checkJobStatus(api.JobStatus o) { |
789 buildCounterJobStatus++; | 914 buildCounterJobStatus++; |
790 if (buildCounterJobStatus < 3) { | 915 if (buildCounterJobStatus < 3) { |
791 checkErrorProto(o.errorResult); | 916 checkErrorProto(o.errorResult); |
792 checkUnnamed1467(o.errors); | 917 checkUnnamed297(o.errors); |
793 unittest.expect(o.state, unittest.equals('foo')); | 918 unittest.expect(o.state, unittest.equals('foo')); |
794 } | 919 } |
795 buildCounterJobStatus--; | 920 buildCounterJobStatus--; |
796 } | 921 } |
797 | 922 |
798 buildJsonObject() { | 923 buildJsonObject() { |
799 var o = new api.JsonObject(); | 924 var o = new api.JsonObject(); |
800 o["a"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 925 o["a"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
801 o["b"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 926 o["b"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; |
802 return o; | 927 return o; |
(...skipping 25 matching lines...) Expand all Loading... |
828 if (buildCounterProjectListProjects < 3) { | 953 if (buildCounterProjectListProjects < 3) { |
829 unittest.expect(o.friendlyName, unittest.equals('foo')); | 954 unittest.expect(o.friendlyName, unittest.equals('foo')); |
830 unittest.expect(o.id, unittest.equals('foo')); | 955 unittest.expect(o.id, unittest.equals('foo')); |
831 unittest.expect(o.kind, unittest.equals('foo')); | 956 unittest.expect(o.kind, unittest.equals('foo')); |
832 unittest.expect(o.numericId, unittest.equals('foo')); | 957 unittest.expect(o.numericId, unittest.equals('foo')); |
833 checkProjectReference(o.projectReference); | 958 checkProjectReference(o.projectReference); |
834 } | 959 } |
835 buildCounterProjectListProjects--; | 960 buildCounterProjectListProjects--; |
836 } | 961 } |
837 | 962 |
838 buildUnnamed1468() { | 963 buildUnnamed298() { |
839 var o = new core.List<api.ProjectListProjects>(); | 964 var o = new core.List<api.ProjectListProjects>(); |
840 o.add(buildProjectListProjects()); | 965 o.add(buildProjectListProjects()); |
841 o.add(buildProjectListProjects()); | 966 o.add(buildProjectListProjects()); |
842 return o; | 967 return o; |
843 } | 968 } |
844 | 969 |
845 checkUnnamed1468(core.List<api.ProjectListProjects> o) { | 970 checkUnnamed298(core.List<api.ProjectListProjects> o) { |
846 unittest.expect(o, unittest.hasLength(2)); | 971 unittest.expect(o, unittest.hasLength(2)); |
847 checkProjectListProjects(o[0]); | 972 checkProjectListProjects(o[0]); |
848 checkProjectListProjects(o[1]); | 973 checkProjectListProjects(o[1]); |
849 } | 974 } |
850 | 975 |
851 core.int buildCounterProjectList = 0; | 976 core.int buildCounterProjectList = 0; |
852 buildProjectList() { | 977 buildProjectList() { |
853 var o = new api.ProjectList(); | 978 var o = new api.ProjectList(); |
854 buildCounterProjectList++; | 979 buildCounterProjectList++; |
855 if (buildCounterProjectList < 3) { | 980 if (buildCounterProjectList < 3) { |
856 o.etag = "foo"; | 981 o.etag = "foo"; |
857 o.kind = "foo"; | 982 o.kind = "foo"; |
858 o.nextPageToken = "foo"; | 983 o.nextPageToken = "foo"; |
859 o.projects = buildUnnamed1468(); | 984 o.projects = buildUnnamed298(); |
860 o.totalItems = 42; | 985 o.totalItems = 42; |
861 } | 986 } |
862 buildCounterProjectList--; | 987 buildCounterProjectList--; |
863 return o; | 988 return o; |
864 } | 989 } |
865 | 990 |
866 checkProjectList(api.ProjectList o) { | 991 checkProjectList(api.ProjectList o) { |
867 buildCounterProjectList++; | 992 buildCounterProjectList++; |
868 if (buildCounterProjectList < 3) { | 993 if (buildCounterProjectList < 3) { |
869 unittest.expect(o.etag, unittest.equals('foo')); | 994 unittest.expect(o.etag, unittest.equals('foo')); |
870 unittest.expect(o.kind, unittest.equals('foo')); | 995 unittest.expect(o.kind, unittest.equals('foo')); |
871 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 996 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
872 checkUnnamed1468(o.projects); | 997 checkUnnamed298(o.projects); |
873 unittest.expect(o.totalItems, unittest.equals(42)); | 998 unittest.expect(o.totalItems, unittest.equals(42)); |
874 } | 999 } |
875 buildCounterProjectList--; | 1000 buildCounterProjectList--; |
876 } | 1001 } |
877 | 1002 |
878 core.int buildCounterProjectReference = 0; | 1003 core.int buildCounterProjectReference = 0; |
879 buildProjectReference() { | 1004 buildProjectReference() { |
880 var o = new api.ProjectReference(); | 1005 var o = new api.ProjectReference(); |
881 buildCounterProjectReference++; | 1006 buildCounterProjectReference++; |
882 if (buildCounterProjectReference < 3) { | 1007 if (buildCounterProjectReference < 3) { |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
920 unittest.expect(o.kind, unittest.equals('foo')); | 1045 unittest.expect(o.kind, unittest.equals('foo')); |
921 unittest.expect(o.maxResults, unittest.equals(42)); | 1046 unittest.expect(o.maxResults, unittest.equals(42)); |
922 unittest.expect(o.preserveNulls, unittest.isTrue); | 1047 unittest.expect(o.preserveNulls, unittest.isTrue); |
923 unittest.expect(o.query, unittest.equals('foo')); | 1048 unittest.expect(o.query, unittest.equals('foo')); |
924 unittest.expect(o.timeoutMs, unittest.equals(42)); | 1049 unittest.expect(o.timeoutMs, unittest.equals(42)); |
925 unittest.expect(o.useQueryCache, unittest.isTrue); | 1050 unittest.expect(o.useQueryCache, unittest.isTrue); |
926 } | 1051 } |
927 buildCounterQueryRequest--; | 1052 buildCounterQueryRequest--; |
928 } | 1053 } |
929 | 1054 |
930 buildUnnamed1469() { | 1055 buildUnnamed299() { |
931 var o = new core.List<api.TableRow>(); | 1056 var o = new core.List<api.TableRow>(); |
932 o.add(buildTableRow()); | 1057 o.add(buildTableRow()); |
933 o.add(buildTableRow()); | 1058 o.add(buildTableRow()); |
934 return o; | 1059 return o; |
935 } | 1060 } |
936 | 1061 |
937 checkUnnamed1469(core.List<api.TableRow> o) { | 1062 checkUnnamed299(core.List<api.TableRow> o) { |
938 unittest.expect(o, unittest.hasLength(2)); | 1063 unittest.expect(o, unittest.hasLength(2)); |
939 checkTableRow(o[0]); | 1064 checkTableRow(o[0]); |
940 checkTableRow(o[1]); | 1065 checkTableRow(o[1]); |
941 } | 1066 } |
942 | 1067 |
943 core.int buildCounterQueryResponse = 0; | 1068 core.int buildCounterQueryResponse = 0; |
944 buildQueryResponse() { | 1069 buildQueryResponse() { |
945 var o = new api.QueryResponse(); | 1070 var o = new api.QueryResponse(); |
946 buildCounterQueryResponse++; | 1071 buildCounterQueryResponse++; |
947 if (buildCounterQueryResponse < 3) { | 1072 if (buildCounterQueryResponse < 3) { |
948 o.cacheHit = true; | 1073 o.cacheHit = true; |
949 o.jobComplete = true; | 1074 o.jobComplete = true; |
950 o.jobReference = buildJobReference(); | 1075 o.jobReference = buildJobReference(); |
951 o.kind = "foo"; | 1076 o.kind = "foo"; |
952 o.pageToken = "foo"; | 1077 o.pageToken = "foo"; |
953 o.rows = buildUnnamed1469(); | 1078 o.rows = buildUnnamed299(); |
954 o.schema = buildTableSchema(); | 1079 o.schema = buildTableSchema(); |
955 o.totalBytesProcessed = "foo"; | 1080 o.totalBytesProcessed = "foo"; |
956 o.totalRows = "foo"; | 1081 o.totalRows = "foo"; |
957 } | 1082 } |
958 buildCounterQueryResponse--; | 1083 buildCounterQueryResponse--; |
959 return o; | 1084 return o; |
960 } | 1085 } |
961 | 1086 |
962 checkQueryResponse(api.QueryResponse o) { | 1087 checkQueryResponse(api.QueryResponse o) { |
963 buildCounterQueryResponse++; | 1088 buildCounterQueryResponse++; |
964 if (buildCounterQueryResponse < 3) { | 1089 if (buildCounterQueryResponse < 3) { |
965 unittest.expect(o.cacheHit, unittest.isTrue); | 1090 unittest.expect(o.cacheHit, unittest.isTrue); |
966 unittest.expect(o.jobComplete, unittest.isTrue); | 1091 unittest.expect(o.jobComplete, unittest.isTrue); |
967 checkJobReference(o.jobReference); | 1092 checkJobReference(o.jobReference); |
968 unittest.expect(o.kind, unittest.equals('foo')); | 1093 unittest.expect(o.kind, unittest.equals('foo')); |
969 unittest.expect(o.pageToken, unittest.equals('foo')); | 1094 unittest.expect(o.pageToken, unittest.equals('foo')); |
970 checkUnnamed1469(o.rows); | 1095 checkUnnamed299(o.rows); |
971 checkTableSchema(o.schema); | 1096 checkTableSchema(o.schema); |
972 unittest.expect(o.totalBytesProcessed, unittest.equals('foo')); | 1097 unittest.expect(o.totalBytesProcessed, unittest.equals('foo')); |
973 unittest.expect(o.totalRows, unittest.equals('foo')); | 1098 unittest.expect(o.totalRows, unittest.equals('foo')); |
974 } | 1099 } |
975 buildCounterQueryResponse--; | 1100 buildCounterQueryResponse--; |
976 } | 1101 } |
977 | 1102 |
978 core.int buildCounterTable = 0; | 1103 core.int buildCounterTable = 0; |
979 buildTable() { | 1104 buildTable() { |
980 var o = new api.Table(); | 1105 var o = new api.Table(); |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1055 | 1180 |
1056 checkTableDataInsertAllRequestRows(api.TableDataInsertAllRequestRows o) { | 1181 checkTableDataInsertAllRequestRows(api.TableDataInsertAllRequestRows o) { |
1057 buildCounterTableDataInsertAllRequestRows++; | 1182 buildCounterTableDataInsertAllRequestRows++; |
1058 if (buildCounterTableDataInsertAllRequestRows < 3) { | 1183 if (buildCounterTableDataInsertAllRequestRows < 3) { |
1059 unittest.expect(o.insertId, unittest.equals('foo')); | 1184 unittest.expect(o.insertId, unittest.equals('foo')); |
1060 checkJsonObject(o.json); | 1185 checkJsonObject(o.json); |
1061 } | 1186 } |
1062 buildCounterTableDataInsertAllRequestRows--; | 1187 buildCounterTableDataInsertAllRequestRows--; |
1063 } | 1188 } |
1064 | 1189 |
1065 buildUnnamed1470() { | 1190 buildUnnamed300() { |
1066 var o = new core.List<api.TableDataInsertAllRequestRows>(); | 1191 var o = new core.List<api.TableDataInsertAllRequestRows>(); |
1067 o.add(buildTableDataInsertAllRequestRows()); | 1192 o.add(buildTableDataInsertAllRequestRows()); |
1068 o.add(buildTableDataInsertAllRequestRows()); | 1193 o.add(buildTableDataInsertAllRequestRows()); |
1069 return o; | 1194 return o; |
1070 } | 1195 } |
1071 | 1196 |
1072 checkUnnamed1470(core.List<api.TableDataInsertAllRequestRows> o) { | 1197 checkUnnamed300(core.List<api.TableDataInsertAllRequestRows> o) { |
1073 unittest.expect(o, unittest.hasLength(2)); | 1198 unittest.expect(o, unittest.hasLength(2)); |
1074 checkTableDataInsertAllRequestRows(o[0]); | 1199 checkTableDataInsertAllRequestRows(o[0]); |
1075 checkTableDataInsertAllRequestRows(o[1]); | 1200 checkTableDataInsertAllRequestRows(o[1]); |
1076 } | 1201 } |
1077 | 1202 |
1078 core.int buildCounterTableDataInsertAllRequest = 0; | 1203 core.int buildCounterTableDataInsertAllRequest = 0; |
1079 buildTableDataInsertAllRequest() { | 1204 buildTableDataInsertAllRequest() { |
1080 var o = new api.TableDataInsertAllRequest(); | 1205 var o = new api.TableDataInsertAllRequest(); |
1081 buildCounterTableDataInsertAllRequest++; | 1206 buildCounterTableDataInsertAllRequest++; |
1082 if (buildCounterTableDataInsertAllRequest < 3) { | 1207 if (buildCounterTableDataInsertAllRequest < 3) { |
| 1208 o.ignoreUnknownValues = true; |
1083 o.kind = "foo"; | 1209 o.kind = "foo"; |
1084 o.rows = buildUnnamed1470(); | 1210 o.rows = buildUnnamed300(); |
| 1211 o.skipInvalidRows = true; |
1085 } | 1212 } |
1086 buildCounterTableDataInsertAllRequest--; | 1213 buildCounterTableDataInsertAllRequest--; |
1087 return o; | 1214 return o; |
1088 } | 1215 } |
1089 | 1216 |
1090 checkTableDataInsertAllRequest(api.TableDataInsertAllRequest o) { | 1217 checkTableDataInsertAllRequest(api.TableDataInsertAllRequest o) { |
1091 buildCounterTableDataInsertAllRequest++; | 1218 buildCounterTableDataInsertAllRequest++; |
1092 if (buildCounterTableDataInsertAllRequest < 3) { | 1219 if (buildCounterTableDataInsertAllRequest < 3) { |
| 1220 unittest.expect(o.ignoreUnknownValues, unittest.isTrue); |
1093 unittest.expect(o.kind, unittest.equals('foo')); | 1221 unittest.expect(o.kind, unittest.equals('foo')); |
1094 checkUnnamed1470(o.rows); | 1222 checkUnnamed300(o.rows); |
| 1223 unittest.expect(o.skipInvalidRows, unittest.isTrue); |
1095 } | 1224 } |
1096 buildCounterTableDataInsertAllRequest--; | 1225 buildCounterTableDataInsertAllRequest--; |
1097 } | 1226 } |
1098 | 1227 |
1099 buildUnnamed1471() { | 1228 buildUnnamed301() { |
1100 var o = new core.List<api.ErrorProto>(); | 1229 var o = new core.List<api.ErrorProto>(); |
1101 o.add(buildErrorProto()); | 1230 o.add(buildErrorProto()); |
1102 o.add(buildErrorProto()); | 1231 o.add(buildErrorProto()); |
1103 return o; | 1232 return o; |
1104 } | 1233 } |
1105 | 1234 |
1106 checkUnnamed1471(core.List<api.ErrorProto> o) { | 1235 checkUnnamed301(core.List<api.ErrorProto> o) { |
1107 unittest.expect(o, unittest.hasLength(2)); | 1236 unittest.expect(o, unittest.hasLength(2)); |
1108 checkErrorProto(o[0]); | 1237 checkErrorProto(o[0]); |
1109 checkErrorProto(o[1]); | 1238 checkErrorProto(o[1]); |
1110 } | 1239 } |
1111 | 1240 |
1112 core.int buildCounterTableDataInsertAllResponseInsertErrors = 0; | 1241 core.int buildCounterTableDataInsertAllResponseInsertErrors = 0; |
1113 buildTableDataInsertAllResponseInsertErrors() { | 1242 buildTableDataInsertAllResponseInsertErrors() { |
1114 var o = new api.TableDataInsertAllResponseInsertErrors(); | 1243 var o = new api.TableDataInsertAllResponseInsertErrors(); |
1115 buildCounterTableDataInsertAllResponseInsertErrors++; | 1244 buildCounterTableDataInsertAllResponseInsertErrors++; |
1116 if (buildCounterTableDataInsertAllResponseInsertErrors < 3) { | 1245 if (buildCounterTableDataInsertAllResponseInsertErrors < 3) { |
1117 o.errors = buildUnnamed1471(); | 1246 o.errors = buildUnnamed301(); |
1118 o.index = 42; | 1247 o.index = 42; |
1119 } | 1248 } |
1120 buildCounterTableDataInsertAllResponseInsertErrors--; | 1249 buildCounterTableDataInsertAllResponseInsertErrors--; |
1121 return o; | 1250 return o; |
1122 } | 1251 } |
1123 | 1252 |
1124 checkTableDataInsertAllResponseInsertErrors(api.TableDataInsertAllResponseInsert
Errors o) { | 1253 checkTableDataInsertAllResponseInsertErrors(api.TableDataInsertAllResponseInsert
Errors o) { |
1125 buildCounterTableDataInsertAllResponseInsertErrors++; | 1254 buildCounterTableDataInsertAllResponseInsertErrors++; |
1126 if (buildCounterTableDataInsertAllResponseInsertErrors < 3) { | 1255 if (buildCounterTableDataInsertAllResponseInsertErrors < 3) { |
1127 checkUnnamed1471(o.errors); | 1256 checkUnnamed301(o.errors); |
1128 unittest.expect(o.index, unittest.equals(42)); | 1257 unittest.expect(o.index, unittest.equals(42)); |
1129 } | 1258 } |
1130 buildCounterTableDataInsertAllResponseInsertErrors--; | 1259 buildCounterTableDataInsertAllResponseInsertErrors--; |
1131 } | 1260 } |
1132 | 1261 |
1133 buildUnnamed1472() { | 1262 buildUnnamed302() { |
1134 var o = new core.List<api.TableDataInsertAllResponseInsertErrors>(); | 1263 var o = new core.List<api.TableDataInsertAllResponseInsertErrors>(); |
1135 o.add(buildTableDataInsertAllResponseInsertErrors()); | 1264 o.add(buildTableDataInsertAllResponseInsertErrors()); |
1136 o.add(buildTableDataInsertAllResponseInsertErrors()); | 1265 o.add(buildTableDataInsertAllResponseInsertErrors()); |
1137 return o; | 1266 return o; |
1138 } | 1267 } |
1139 | 1268 |
1140 checkUnnamed1472(core.List<api.TableDataInsertAllResponseInsertErrors> o) { | 1269 checkUnnamed302(core.List<api.TableDataInsertAllResponseInsertErrors> o) { |
1141 unittest.expect(o, unittest.hasLength(2)); | 1270 unittest.expect(o, unittest.hasLength(2)); |
1142 checkTableDataInsertAllResponseInsertErrors(o[0]); | 1271 checkTableDataInsertAllResponseInsertErrors(o[0]); |
1143 checkTableDataInsertAllResponseInsertErrors(o[1]); | 1272 checkTableDataInsertAllResponseInsertErrors(o[1]); |
1144 } | 1273 } |
1145 | 1274 |
1146 core.int buildCounterTableDataInsertAllResponse = 0; | 1275 core.int buildCounterTableDataInsertAllResponse = 0; |
1147 buildTableDataInsertAllResponse() { | 1276 buildTableDataInsertAllResponse() { |
1148 var o = new api.TableDataInsertAllResponse(); | 1277 var o = new api.TableDataInsertAllResponse(); |
1149 buildCounterTableDataInsertAllResponse++; | 1278 buildCounterTableDataInsertAllResponse++; |
1150 if (buildCounterTableDataInsertAllResponse < 3) { | 1279 if (buildCounterTableDataInsertAllResponse < 3) { |
1151 o.insertErrors = buildUnnamed1472(); | 1280 o.insertErrors = buildUnnamed302(); |
1152 o.kind = "foo"; | 1281 o.kind = "foo"; |
1153 } | 1282 } |
1154 buildCounterTableDataInsertAllResponse--; | 1283 buildCounterTableDataInsertAllResponse--; |
1155 return o; | 1284 return o; |
1156 } | 1285 } |
1157 | 1286 |
1158 checkTableDataInsertAllResponse(api.TableDataInsertAllResponse o) { | 1287 checkTableDataInsertAllResponse(api.TableDataInsertAllResponse o) { |
1159 buildCounterTableDataInsertAllResponse++; | 1288 buildCounterTableDataInsertAllResponse++; |
1160 if (buildCounterTableDataInsertAllResponse < 3) { | 1289 if (buildCounterTableDataInsertAllResponse < 3) { |
1161 checkUnnamed1472(o.insertErrors); | 1290 checkUnnamed302(o.insertErrors); |
1162 unittest.expect(o.kind, unittest.equals('foo')); | 1291 unittest.expect(o.kind, unittest.equals('foo')); |
1163 } | 1292 } |
1164 buildCounterTableDataInsertAllResponse--; | 1293 buildCounterTableDataInsertAllResponse--; |
1165 } | 1294 } |
1166 | 1295 |
1167 buildUnnamed1473() { | 1296 buildUnnamed303() { |
1168 var o = new core.List<api.TableRow>(); | 1297 var o = new core.List<api.TableRow>(); |
1169 o.add(buildTableRow()); | 1298 o.add(buildTableRow()); |
1170 o.add(buildTableRow()); | 1299 o.add(buildTableRow()); |
1171 return o; | 1300 return o; |
1172 } | 1301 } |
1173 | 1302 |
1174 checkUnnamed1473(core.List<api.TableRow> o) { | 1303 checkUnnamed303(core.List<api.TableRow> o) { |
1175 unittest.expect(o, unittest.hasLength(2)); | 1304 unittest.expect(o, unittest.hasLength(2)); |
1176 checkTableRow(o[0]); | 1305 checkTableRow(o[0]); |
1177 checkTableRow(o[1]); | 1306 checkTableRow(o[1]); |
1178 } | 1307 } |
1179 | 1308 |
1180 core.int buildCounterTableDataList = 0; | 1309 core.int buildCounterTableDataList = 0; |
1181 buildTableDataList() { | 1310 buildTableDataList() { |
1182 var o = new api.TableDataList(); | 1311 var o = new api.TableDataList(); |
1183 buildCounterTableDataList++; | 1312 buildCounterTableDataList++; |
1184 if (buildCounterTableDataList < 3) { | 1313 if (buildCounterTableDataList < 3) { |
1185 o.etag = "foo"; | 1314 o.etag = "foo"; |
1186 o.kind = "foo"; | 1315 o.kind = "foo"; |
1187 o.pageToken = "foo"; | 1316 o.pageToken = "foo"; |
1188 o.rows = buildUnnamed1473(); | 1317 o.rows = buildUnnamed303(); |
1189 o.totalRows = "foo"; | 1318 o.totalRows = "foo"; |
1190 } | 1319 } |
1191 buildCounterTableDataList--; | 1320 buildCounterTableDataList--; |
1192 return o; | 1321 return o; |
1193 } | 1322 } |
1194 | 1323 |
1195 checkTableDataList(api.TableDataList o) { | 1324 checkTableDataList(api.TableDataList o) { |
1196 buildCounterTableDataList++; | 1325 buildCounterTableDataList++; |
1197 if (buildCounterTableDataList < 3) { | 1326 if (buildCounterTableDataList < 3) { |
1198 unittest.expect(o.etag, unittest.equals('foo')); | 1327 unittest.expect(o.etag, unittest.equals('foo')); |
1199 unittest.expect(o.kind, unittest.equals('foo')); | 1328 unittest.expect(o.kind, unittest.equals('foo')); |
1200 unittest.expect(o.pageToken, unittest.equals('foo')); | 1329 unittest.expect(o.pageToken, unittest.equals('foo')); |
1201 checkUnnamed1473(o.rows); | 1330 checkUnnamed303(o.rows); |
1202 unittest.expect(o.totalRows, unittest.equals('foo')); | 1331 unittest.expect(o.totalRows, unittest.equals('foo')); |
1203 } | 1332 } |
1204 buildCounterTableDataList--; | 1333 buildCounterTableDataList--; |
1205 } | 1334 } |
1206 | 1335 |
1207 buildUnnamed1474() { | 1336 buildUnnamed304() { |
1208 var o = new core.List<api.TableFieldSchema>(); | 1337 var o = new core.List<api.TableFieldSchema>(); |
1209 o.add(buildTableFieldSchema()); | 1338 o.add(buildTableFieldSchema()); |
1210 o.add(buildTableFieldSchema()); | 1339 o.add(buildTableFieldSchema()); |
1211 return o; | 1340 return o; |
1212 } | 1341 } |
1213 | 1342 |
1214 checkUnnamed1474(core.List<api.TableFieldSchema> o) { | 1343 checkUnnamed304(core.List<api.TableFieldSchema> o) { |
1215 unittest.expect(o, unittest.hasLength(2)); | 1344 unittest.expect(o, unittest.hasLength(2)); |
1216 checkTableFieldSchema(o[0]); | 1345 checkTableFieldSchema(o[0]); |
1217 checkTableFieldSchema(o[1]); | 1346 checkTableFieldSchema(o[1]); |
1218 } | 1347 } |
1219 | 1348 |
1220 core.int buildCounterTableFieldSchema = 0; | 1349 core.int buildCounterTableFieldSchema = 0; |
1221 buildTableFieldSchema() { | 1350 buildTableFieldSchema() { |
1222 var o = new api.TableFieldSchema(); | 1351 var o = new api.TableFieldSchema(); |
1223 buildCounterTableFieldSchema++; | 1352 buildCounterTableFieldSchema++; |
1224 if (buildCounterTableFieldSchema < 3) { | 1353 if (buildCounterTableFieldSchema < 3) { |
1225 o.description = "foo"; | 1354 o.description = "foo"; |
1226 o.fields = buildUnnamed1474(); | 1355 o.fields = buildUnnamed304(); |
1227 o.mode = "foo"; | 1356 o.mode = "foo"; |
1228 o.name = "foo"; | 1357 o.name = "foo"; |
1229 o.type = "foo"; | 1358 o.type = "foo"; |
1230 } | 1359 } |
1231 buildCounterTableFieldSchema--; | 1360 buildCounterTableFieldSchema--; |
1232 return o; | 1361 return o; |
1233 } | 1362 } |
1234 | 1363 |
1235 checkTableFieldSchema(api.TableFieldSchema o) { | 1364 checkTableFieldSchema(api.TableFieldSchema o) { |
1236 buildCounterTableFieldSchema++; | 1365 buildCounterTableFieldSchema++; |
1237 if (buildCounterTableFieldSchema < 3) { | 1366 if (buildCounterTableFieldSchema < 3) { |
1238 unittest.expect(o.description, unittest.equals('foo')); | 1367 unittest.expect(o.description, unittest.equals('foo')); |
1239 checkUnnamed1474(o.fields); | 1368 checkUnnamed304(o.fields); |
1240 unittest.expect(o.mode, unittest.equals('foo')); | 1369 unittest.expect(o.mode, unittest.equals('foo')); |
1241 unittest.expect(o.name, unittest.equals('foo')); | 1370 unittest.expect(o.name, unittest.equals('foo')); |
1242 unittest.expect(o.type, unittest.equals('foo')); | 1371 unittest.expect(o.type, unittest.equals('foo')); |
1243 } | 1372 } |
1244 buildCounterTableFieldSchema--; | 1373 buildCounterTableFieldSchema--; |
1245 } | 1374 } |
1246 | 1375 |
1247 core.int buildCounterTableListTables = 0; | 1376 core.int buildCounterTableListTables = 0; |
1248 buildTableListTables() { | 1377 buildTableListTables() { |
1249 var o = new api.TableListTables(); | 1378 var o = new api.TableListTables(); |
(...skipping 14 matching lines...) Expand all Loading... |
1264 if (buildCounterTableListTables < 3) { | 1393 if (buildCounterTableListTables < 3) { |
1265 unittest.expect(o.friendlyName, unittest.equals('foo')); | 1394 unittest.expect(o.friendlyName, unittest.equals('foo')); |
1266 unittest.expect(o.id, unittest.equals('foo')); | 1395 unittest.expect(o.id, unittest.equals('foo')); |
1267 unittest.expect(o.kind, unittest.equals('foo')); | 1396 unittest.expect(o.kind, unittest.equals('foo')); |
1268 checkTableReference(o.tableReference); | 1397 checkTableReference(o.tableReference); |
1269 unittest.expect(o.type, unittest.equals('foo')); | 1398 unittest.expect(o.type, unittest.equals('foo')); |
1270 } | 1399 } |
1271 buildCounterTableListTables--; | 1400 buildCounterTableListTables--; |
1272 } | 1401 } |
1273 | 1402 |
1274 buildUnnamed1475() { | 1403 buildUnnamed305() { |
1275 var o = new core.List<api.TableListTables>(); | 1404 var o = new core.List<api.TableListTables>(); |
1276 o.add(buildTableListTables()); | 1405 o.add(buildTableListTables()); |
1277 o.add(buildTableListTables()); | 1406 o.add(buildTableListTables()); |
1278 return o; | 1407 return o; |
1279 } | 1408 } |
1280 | 1409 |
1281 checkUnnamed1475(core.List<api.TableListTables> o) { | 1410 checkUnnamed305(core.List<api.TableListTables> o) { |
1282 unittest.expect(o, unittest.hasLength(2)); | 1411 unittest.expect(o, unittest.hasLength(2)); |
1283 checkTableListTables(o[0]); | 1412 checkTableListTables(o[0]); |
1284 checkTableListTables(o[1]); | 1413 checkTableListTables(o[1]); |
1285 } | 1414 } |
1286 | 1415 |
1287 core.int buildCounterTableList = 0; | 1416 core.int buildCounterTableList = 0; |
1288 buildTableList() { | 1417 buildTableList() { |
1289 var o = new api.TableList(); | 1418 var o = new api.TableList(); |
1290 buildCounterTableList++; | 1419 buildCounterTableList++; |
1291 if (buildCounterTableList < 3) { | 1420 if (buildCounterTableList < 3) { |
1292 o.etag = "foo"; | 1421 o.etag = "foo"; |
1293 o.kind = "foo"; | 1422 o.kind = "foo"; |
1294 o.nextPageToken = "foo"; | 1423 o.nextPageToken = "foo"; |
1295 o.tables = buildUnnamed1475(); | 1424 o.tables = buildUnnamed305(); |
1296 o.totalItems = 42; | 1425 o.totalItems = 42; |
1297 } | 1426 } |
1298 buildCounterTableList--; | 1427 buildCounterTableList--; |
1299 return o; | 1428 return o; |
1300 } | 1429 } |
1301 | 1430 |
1302 checkTableList(api.TableList o) { | 1431 checkTableList(api.TableList o) { |
1303 buildCounterTableList++; | 1432 buildCounterTableList++; |
1304 if (buildCounterTableList < 3) { | 1433 if (buildCounterTableList < 3) { |
1305 unittest.expect(o.etag, unittest.equals('foo')); | 1434 unittest.expect(o.etag, unittest.equals('foo')); |
1306 unittest.expect(o.kind, unittest.equals('foo')); | 1435 unittest.expect(o.kind, unittest.equals('foo')); |
1307 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 1436 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
1308 checkUnnamed1475(o.tables); | 1437 checkUnnamed305(o.tables); |
1309 unittest.expect(o.totalItems, unittest.equals(42)); | 1438 unittest.expect(o.totalItems, unittest.equals(42)); |
1310 } | 1439 } |
1311 buildCounterTableList--; | 1440 buildCounterTableList--; |
1312 } | 1441 } |
1313 | 1442 |
1314 core.int buildCounterTableReference = 0; | 1443 core.int buildCounterTableReference = 0; |
1315 buildTableReference() { | 1444 buildTableReference() { |
1316 var o = new api.TableReference(); | 1445 var o = new api.TableReference(); |
1317 buildCounterTableReference++; | 1446 buildCounterTableReference++; |
1318 if (buildCounterTableReference < 3) { | 1447 if (buildCounterTableReference < 3) { |
1319 o.datasetId = "foo"; | 1448 o.datasetId = "foo"; |
1320 o.projectId = "foo"; | 1449 o.projectId = "foo"; |
1321 o.tableId = "foo"; | 1450 o.tableId = "foo"; |
1322 } | 1451 } |
1323 buildCounterTableReference--; | 1452 buildCounterTableReference--; |
1324 return o; | 1453 return o; |
1325 } | 1454 } |
1326 | 1455 |
1327 checkTableReference(api.TableReference o) { | 1456 checkTableReference(api.TableReference o) { |
1328 buildCounterTableReference++; | 1457 buildCounterTableReference++; |
1329 if (buildCounterTableReference < 3) { | 1458 if (buildCounterTableReference < 3) { |
1330 unittest.expect(o.datasetId, unittest.equals('foo')); | 1459 unittest.expect(o.datasetId, unittest.equals('foo')); |
1331 unittest.expect(o.projectId, unittest.equals('foo')); | 1460 unittest.expect(o.projectId, unittest.equals('foo')); |
1332 unittest.expect(o.tableId, unittest.equals('foo')); | 1461 unittest.expect(o.tableId, unittest.equals('foo')); |
1333 } | 1462 } |
1334 buildCounterTableReference--; | 1463 buildCounterTableReference--; |
1335 } | 1464 } |
1336 | 1465 |
1337 buildUnnamed1476() { | 1466 buildUnnamed306() { |
1338 var o = new core.List<api.TableCell>(); | 1467 var o = new core.List<api.TableCell>(); |
1339 o.add(buildTableCell()); | 1468 o.add(buildTableCell()); |
1340 o.add(buildTableCell()); | 1469 o.add(buildTableCell()); |
1341 return o; | 1470 return o; |
1342 } | 1471 } |
1343 | 1472 |
1344 checkUnnamed1476(core.List<api.TableCell> o) { | 1473 checkUnnamed306(core.List<api.TableCell> o) { |
1345 unittest.expect(o, unittest.hasLength(2)); | 1474 unittest.expect(o, unittest.hasLength(2)); |
1346 checkTableCell(o[0]); | 1475 checkTableCell(o[0]); |
1347 checkTableCell(o[1]); | 1476 checkTableCell(o[1]); |
1348 } | 1477 } |
1349 | 1478 |
1350 core.int buildCounterTableRow = 0; | 1479 core.int buildCounterTableRow = 0; |
1351 buildTableRow() { | 1480 buildTableRow() { |
1352 var o = new api.TableRow(); | 1481 var o = new api.TableRow(); |
1353 buildCounterTableRow++; | 1482 buildCounterTableRow++; |
1354 if (buildCounterTableRow < 3) { | 1483 if (buildCounterTableRow < 3) { |
1355 o.f = buildUnnamed1476(); | 1484 o.f = buildUnnamed306(); |
1356 } | 1485 } |
1357 buildCounterTableRow--; | 1486 buildCounterTableRow--; |
1358 return o; | 1487 return o; |
1359 } | 1488 } |
1360 | 1489 |
1361 checkTableRow(api.TableRow o) { | 1490 checkTableRow(api.TableRow o) { |
1362 buildCounterTableRow++; | 1491 buildCounterTableRow++; |
1363 if (buildCounterTableRow < 3) { | 1492 if (buildCounterTableRow < 3) { |
1364 checkUnnamed1476(o.f); | 1493 checkUnnamed306(o.f); |
1365 } | 1494 } |
1366 buildCounterTableRow--; | 1495 buildCounterTableRow--; |
1367 } | 1496 } |
1368 | 1497 |
1369 buildUnnamed1477() { | 1498 buildUnnamed307() { |
1370 var o = new core.List<api.TableFieldSchema>(); | 1499 var o = new core.List<api.TableFieldSchema>(); |
1371 o.add(buildTableFieldSchema()); | 1500 o.add(buildTableFieldSchema()); |
1372 o.add(buildTableFieldSchema()); | 1501 o.add(buildTableFieldSchema()); |
1373 return o; | 1502 return o; |
1374 } | 1503 } |
1375 | 1504 |
1376 checkUnnamed1477(core.List<api.TableFieldSchema> o) { | 1505 checkUnnamed307(core.List<api.TableFieldSchema> o) { |
1377 unittest.expect(o, unittest.hasLength(2)); | 1506 unittest.expect(o, unittest.hasLength(2)); |
1378 checkTableFieldSchema(o[0]); | 1507 checkTableFieldSchema(o[0]); |
1379 checkTableFieldSchema(o[1]); | 1508 checkTableFieldSchema(o[1]); |
1380 } | 1509 } |
1381 | 1510 |
1382 core.int buildCounterTableSchema = 0; | 1511 core.int buildCounterTableSchema = 0; |
1383 buildTableSchema() { | 1512 buildTableSchema() { |
1384 var o = new api.TableSchema(); | 1513 var o = new api.TableSchema(); |
1385 buildCounterTableSchema++; | 1514 buildCounterTableSchema++; |
1386 if (buildCounterTableSchema < 3) { | 1515 if (buildCounterTableSchema < 3) { |
1387 o.fields = buildUnnamed1477(); | 1516 o.fields = buildUnnamed307(); |
1388 } | 1517 } |
1389 buildCounterTableSchema--; | 1518 buildCounterTableSchema--; |
1390 return o; | 1519 return o; |
1391 } | 1520 } |
1392 | 1521 |
1393 checkTableSchema(api.TableSchema o) { | 1522 checkTableSchema(api.TableSchema o) { |
1394 buildCounterTableSchema++; | 1523 buildCounterTableSchema++; |
1395 if (buildCounterTableSchema < 3) { | 1524 if (buildCounterTableSchema < 3) { |
1396 checkUnnamed1477(o.fields); | 1525 checkUnnamed307(o.fields); |
1397 } | 1526 } |
1398 buildCounterTableSchema--; | 1527 buildCounterTableSchema--; |
1399 } | 1528 } |
1400 | 1529 |
1401 core.int buildCounterViewDefinition = 0; | 1530 core.int buildCounterViewDefinition = 0; |
1402 buildViewDefinition() { | 1531 buildViewDefinition() { |
1403 var o = new api.ViewDefinition(); | 1532 var o = new api.ViewDefinition(); |
1404 buildCounterViewDefinition++; | 1533 buildCounterViewDefinition++; |
1405 if (buildCounterViewDefinition < 3) { | 1534 if (buildCounterViewDefinition < 3) { |
1406 o.query = "foo"; | 1535 o.query = "foo"; |
1407 } | 1536 } |
1408 buildCounterViewDefinition--; | 1537 buildCounterViewDefinition--; |
1409 return o; | 1538 return o; |
1410 } | 1539 } |
1411 | 1540 |
1412 checkViewDefinition(api.ViewDefinition o) { | 1541 checkViewDefinition(api.ViewDefinition o) { |
1413 buildCounterViewDefinition++; | 1542 buildCounterViewDefinition++; |
1414 if (buildCounterViewDefinition < 3) { | 1543 if (buildCounterViewDefinition < 3) { |
1415 unittest.expect(o.query, unittest.equals('foo')); | 1544 unittest.expect(o.query, unittest.equals('foo')); |
1416 } | 1545 } |
1417 buildCounterViewDefinition--; | 1546 buildCounterViewDefinition--; |
1418 } | 1547 } |
1419 | 1548 |
1420 buildUnnamed1478() { | 1549 buildUnnamed308() { |
1421 var o = new core.List<core.String>(); | 1550 var o = new core.List<core.String>(); |
1422 o.add("foo"); | 1551 o.add("foo"); |
1423 o.add("foo"); | 1552 o.add("foo"); |
1424 return o; | 1553 return o; |
1425 } | 1554 } |
1426 | 1555 |
1427 checkUnnamed1478(core.List<core.String> o) { | 1556 checkUnnamed308(core.List<core.String> o) { |
1428 unittest.expect(o, unittest.hasLength(2)); | 1557 unittest.expect(o, unittest.hasLength(2)); |
1429 unittest.expect(o[0], unittest.equals('foo')); | 1558 unittest.expect(o[0], unittest.equals('foo')); |
1430 unittest.expect(o[1], unittest.equals('foo')); | 1559 unittest.expect(o[1], unittest.equals('foo')); |
1431 } | 1560 } |
1432 | 1561 |
1433 | 1562 |
1434 main() { | 1563 main() { |
| 1564 unittest.group("obj-schema-CsvOptions", () { |
| 1565 unittest.test("to-json--from-json", () { |
| 1566 var o = buildCsvOptions(); |
| 1567 var od = new api.CsvOptions.fromJson(o.toJson()); |
| 1568 checkCsvOptions(od); |
| 1569 }); |
| 1570 }); |
| 1571 |
| 1572 |
1435 unittest.group("obj-schema-DatasetAccess", () { | 1573 unittest.group("obj-schema-DatasetAccess", () { |
1436 unittest.test("to-json--from-json", () { | 1574 unittest.test("to-json--from-json", () { |
1437 var o = buildDatasetAccess(); | 1575 var o = buildDatasetAccess(); |
1438 var od = new api.DatasetAccess.fromJson(o.toJson()); | 1576 var od = new api.DatasetAccess.fromJson(o.toJson()); |
1439 checkDatasetAccess(od); | 1577 checkDatasetAccess(od); |
1440 }); | 1578 }); |
1441 }); | 1579 }); |
1442 | 1580 |
1443 | 1581 |
1444 unittest.group("obj-schema-Dataset", () { | 1582 unittest.group("obj-schema-Dataset", () { |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1479 | 1617 |
1480 unittest.group("obj-schema-ErrorProto", () { | 1618 unittest.group("obj-schema-ErrorProto", () { |
1481 unittest.test("to-json--from-json", () { | 1619 unittest.test("to-json--from-json", () { |
1482 var o = buildErrorProto(); | 1620 var o = buildErrorProto(); |
1483 var od = new api.ErrorProto.fromJson(o.toJson()); | 1621 var od = new api.ErrorProto.fromJson(o.toJson()); |
1484 checkErrorProto(od); | 1622 checkErrorProto(od); |
1485 }); | 1623 }); |
1486 }); | 1624 }); |
1487 | 1625 |
1488 | 1626 |
| 1627 unittest.group("obj-schema-ExternalDataConfiguration", () { |
| 1628 unittest.test("to-json--from-json", () { |
| 1629 var o = buildExternalDataConfiguration(); |
| 1630 var od = new api.ExternalDataConfiguration.fromJson(o.toJson()); |
| 1631 checkExternalDataConfiguration(od); |
| 1632 }); |
| 1633 }); |
| 1634 |
| 1635 |
1489 unittest.group("obj-schema-GetQueryResultsResponse", () { | 1636 unittest.group("obj-schema-GetQueryResultsResponse", () { |
1490 unittest.test("to-json--from-json", () { | 1637 unittest.test("to-json--from-json", () { |
1491 var o = buildGetQueryResultsResponse(); | 1638 var o = buildGetQueryResultsResponse(); |
1492 var od = new api.GetQueryResultsResponse.fromJson(o.toJson()); | 1639 var od = new api.GetQueryResultsResponse.fromJson(o.toJson()); |
1493 checkGetQueryResultsResponse(od); | 1640 checkGetQueryResultsResponse(od); |
1494 }); | 1641 }); |
1495 }); | 1642 }); |
1496 | 1643 |
1497 | 1644 |
1498 unittest.group("obj-schema-Job", () { | 1645 unittest.group("obj-schema-Job", () { |
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1806 var o = buildViewDefinition(); | 1953 var o = buildViewDefinition(); |
1807 var od = new api.ViewDefinition.fromJson(o.toJson()); | 1954 var od = new api.ViewDefinition.fromJson(o.toJson()); |
1808 checkViewDefinition(od); | 1955 checkViewDefinition(od); |
1809 }); | 1956 }); |
1810 }); | 1957 }); |
1811 | 1958 |
1812 | 1959 |
1813 unittest.group("resource-DatasetsResourceApi", () { | 1960 unittest.group("resource-DatasetsResourceApi", () { |
1814 unittest.test("method--delete", () { | 1961 unittest.test("method--delete", () { |
1815 | 1962 |
1816 var mock = new common_test.HttpServerMock(); | 1963 var mock = new HttpServerMock(); |
1817 api.DatasetsResourceApi res = new api.BigqueryApi(mock).datasets; | 1964 api.DatasetsResourceApi res = new api.BigqueryApi(mock).datasets; |
1818 var arg_projectId = "foo"; | 1965 var arg_projectId = "foo"; |
1819 var arg_datasetId = "foo"; | 1966 var arg_datasetId = "foo"; |
1820 var arg_deleteContents = true; | 1967 var arg_deleteContents = true; |
1821 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1968 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1822 var path = (req.url).path; | 1969 var path = (req.url).path; |
1823 var pathOffset = 0; | 1970 var pathOffset = 0; |
1824 var index; | 1971 var index; |
1825 var subPart; | 1972 var subPart; |
1826 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1973 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
(...skipping 29 matching lines...) Expand all Loading... |
1856 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2003 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
1857 } | 2004 } |
1858 } | 2005 } |
1859 unittest.expect(queryMap["deleteContents"].first, unittest.equals("$arg_
deleteContents")); | 2006 unittest.expect(queryMap["deleteContents"].first, unittest.equals("$arg_
deleteContents")); |
1860 | 2007 |
1861 | 2008 |
1862 var h = { | 2009 var h = { |
1863 "content-type" : "application/json; charset=utf-8", | 2010 "content-type" : "application/json; charset=utf-8", |
1864 }; | 2011 }; |
1865 var resp = ""; | 2012 var resp = ""; |
1866 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2013 return new async.Future.value(stringResponse(200, h, resp)); |
1867 }), true); | 2014 }), true); |
1868 res.delete(arg_projectId, arg_datasetId, deleteContents: arg_deleteContent
s).then(unittest.expectAsync((_) {})); | 2015 res.delete(arg_projectId, arg_datasetId, deleteContents: arg_deleteContent
s).then(unittest.expectAsync((_) {})); |
1869 }); | 2016 }); |
1870 | 2017 |
1871 unittest.test("method--get", () { | 2018 unittest.test("method--get", () { |
1872 | 2019 |
1873 var mock = new common_test.HttpServerMock(); | 2020 var mock = new HttpServerMock(); |
1874 api.DatasetsResourceApi res = new api.BigqueryApi(mock).datasets; | 2021 api.DatasetsResourceApi res = new api.BigqueryApi(mock).datasets; |
1875 var arg_projectId = "foo"; | 2022 var arg_projectId = "foo"; |
1876 var arg_datasetId = "foo"; | 2023 var arg_datasetId = "foo"; |
1877 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2024 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1878 var path = (req.url).path; | 2025 var path = (req.url).path; |
1879 var pathOffset = 0; | 2026 var pathOffset = 0; |
1880 var index; | 2027 var index; |
1881 var subPart; | 2028 var subPart; |
1882 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2029 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
1883 pathOffset += 1; | 2030 pathOffset += 1; |
(...skipping 27 matching lines...) Expand all Loading... |
1911 var keyvalue = part.split("="); | 2058 var keyvalue = part.split("="); |
1912 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2059 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
1913 } | 2060 } |
1914 } | 2061 } |
1915 | 2062 |
1916 | 2063 |
1917 var h = { | 2064 var h = { |
1918 "content-type" : "application/json; charset=utf-8", | 2065 "content-type" : "application/json; charset=utf-8", |
1919 }; | 2066 }; |
1920 var resp = convert.JSON.encode(buildDataset()); | 2067 var resp = convert.JSON.encode(buildDataset()); |
1921 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2068 return new async.Future.value(stringResponse(200, h, resp)); |
1922 }), true); | 2069 }), true); |
1923 res.get(arg_projectId, arg_datasetId).then(unittest.expectAsync(((api.Data
set response) { | 2070 res.get(arg_projectId, arg_datasetId).then(unittest.expectAsync(((api.Data
set response) { |
1924 checkDataset(response); | 2071 checkDataset(response); |
1925 }))); | 2072 }))); |
1926 }); | 2073 }); |
1927 | 2074 |
1928 unittest.test("method--insert", () { | 2075 unittest.test("method--insert", () { |
1929 | 2076 |
1930 var mock = new common_test.HttpServerMock(); | 2077 var mock = new HttpServerMock(); |
1931 api.DatasetsResourceApi res = new api.BigqueryApi(mock).datasets; | 2078 api.DatasetsResourceApi res = new api.BigqueryApi(mock).datasets; |
1932 var arg_request = buildDataset(); | 2079 var arg_request = buildDataset(); |
1933 var arg_projectId = "foo"; | 2080 var arg_projectId = "foo"; |
1934 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2081 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1935 var obj = new api.Dataset.fromJson(json); | 2082 var obj = new api.Dataset.fromJson(json); |
1936 checkDataset(obj); | 2083 checkDataset(obj); |
1937 | 2084 |
1938 var path = (req.url).path; | 2085 var path = (req.url).path; |
1939 var pathOffset = 0; | 2086 var pathOffset = 0; |
1940 var index; | 2087 var index; |
(...skipping 27 matching lines...) Expand all Loading... |
1968 var keyvalue = part.split("="); | 2115 var keyvalue = part.split("="); |
1969 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2116 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
1970 } | 2117 } |
1971 } | 2118 } |
1972 | 2119 |
1973 | 2120 |
1974 var h = { | 2121 var h = { |
1975 "content-type" : "application/json; charset=utf-8", | 2122 "content-type" : "application/json; charset=utf-8", |
1976 }; | 2123 }; |
1977 var resp = convert.JSON.encode(buildDataset()); | 2124 var resp = convert.JSON.encode(buildDataset()); |
1978 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2125 return new async.Future.value(stringResponse(200, h, resp)); |
1979 }), true); | 2126 }), true); |
1980 res.insert(arg_request, arg_projectId).then(unittest.expectAsync(((api.Dat
aset response) { | 2127 res.insert(arg_request, arg_projectId).then(unittest.expectAsync(((api.Dat
aset response) { |
1981 checkDataset(response); | 2128 checkDataset(response); |
1982 }))); | 2129 }))); |
1983 }); | 2130 }); |
1984 | 2131 |
1985 unittest.test("method--list", () { | 2132 unittest.test("method--list", () { |
1986 | 2133 |
1987 var mock = new common_test.HttpServerMock(); | 2134 var mock = new HttpServerMock(); |
1988 api.DatasetsResourceApi res = new api.BigqueryApi(mock).datasets; | 2135 api.DatasetsResourceApi res = new api.BigqueryApi(mock).datasets; |
1989 var arg_projectId = "foo"; | 2136 var arg_projectId = "foo"; |
1990 var arg_all = true; | 2137 var arg_all = true; |
1991 var arg_maxResults = 42; | 2138 var arg_maxResults = 42; |
1992 var arg_pageToken = "foo"; | 2139 var arg_pageToken = "foo"; |
1993 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2140 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1994 var path = (req.url).path; | 2141 var path = (req.url).path; |
1995 var pathOffset = 0; | 2142 var pathOffset = 0; |
1996 var index; | 2143 var index; |
1997 var subPart; | 2144 var subPart; |
(...skipping 29 matching lines...) Expand all Loading... |
2027 } | 2174 } |
2028 unittest.expect(queryMap["all"].first, unittest.equals("$arg_all")); | 2175 unittest.expect(queryMap["all"].first, unittest.equals("$arg_all")); |
2029 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | 2176 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); |
2030 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 2177 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
2031 | 2178 |
2032 | 2179 |
2033 var h = { | 2180 var h = { |
2034 "content-type" : "application/json; charset=utf-8", | 2181 "content-type" : "application/json; charset=utf-8", |
2035 }; | 2182 }; |
2036 var resp = convert.JSON.encode(buildDatasetList()); | 2183 var resp = convert.JSON.encode(buildDatasetList()); |
2037 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2184 return new async.Future.value(stringResponse(200, h, resp)); |
2038 }), true); | 2185 }), true); |
2039 res.list(arg_projectId, all: arg_all, maxResults: arg_maxResults, pageToke
n: arg_pageToken).then(unittest.expectAsync(((api.DatasetList response) { | 2186 res.list(arg_projectId, all: arg_all, maxResults: arg_maxResults, pageToke
n: arg_pageToken).then(unittest.expectAsync(((api.DatasetList response) { |
2040 checkDatasetList(response); | 2187 checkDatasetList(response); |
2041 }))); | 2188 }))); |
2042 }); | 2189 }); |
2043 | 2190 |
2044 unittest.test("method--patch", () { | 2191 unittest.test("method--patch", () { |
2045 | 2192 |
2046 var mock = new common_test.HttpServerMock(); | 2193 var mock = new HttpServerMock(); |
2047 api.DatasetsResourceApi res = new api.BigqueryApi(mock).datasets; | 2194 api.DatasetsResourceApi res = new api.BigqueryApi(mock).datasets; |
2048 var arg_request = buildDataset(); | 2195 var arg_request = buildDataset(); |
2049 var arg_projectId = "foo"; | 2196 var arg_projectId = "foo"; |
2050 var arg_datasetId = "foo"; | 2197 var arg_datasetId = "foo"; |
2051 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2198 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2052 var obj = new api.Dataset.fromJson(json); | 2199 var obj = new api.Dataset.fromJson(json); |
2053 checkDataset(obj); | 2200 checkDataset(obj); |
2054 | 2201 |
2055 var path = (req.url).path; | 2202 var path = (req.url).path; |
2056 var pathOffset = 0; | 2203 var pathOffset = 0; |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2088 var keyvalue = part.split("="); | 2235 var keyvalue = part.split("="); |
2089 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2236 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
2090 } | 2237 } |
2091 } | 2238 } |
2092 | 2239 |
2093 | 2240 |
2094 var h = { | 2241 var h = { |
2095 "content-type" : "application/json; charset=utf-8", | 2242 "content-type" : "application/json; charset=utf-8", |
2096 }; | 2243 }; |
2097 var resp = convert.JSON.encode(buildDataset()); | 2244 var resp = convert.JSON.encode(buildDataset()); |
2098 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2245 return new async.Future.value(stringResponse(200, h, resp)); |
2099 }), true); | 2246 }), true); |
2100 res.patch(arg_request, arg_projectId, arg_datasetId).then(unittest.expectA
sync(((api.Dataset response) { | 2247 res.patch(arg_request, arg_projectId, arg_datasetId).then(unittest.expectA
sync(((api.Dataset response) { |
2101 checkDataset(response); | 2248 checkDataset(response); |
2102 }))); | 2249 }))); |
2103 }); | 2250 }); |
2104 | 2251 |
2105 unittest.test("method--update", () { | 2252 unittest.test("method--update", () { |
2106 | 2253 |
2107 var mock = new common_test.HttpServerMock(); | 2254 var mock = new HttpServerMock(); |
2108 api.DatasetsResourceApi res = new api.BigqueryApi(mock).datasets; | 2255 api.DatasetsResourceApi res = new api.BigqueryApi(mock).datasets; |
2109 var arg_request = buildDataset(); | 2256 var arg_request = buildDataset(); |
2110 var arg_projectId = "foo"; | 2257 var arg_projectId = "foo"; |
2111 var arg_datasetId = "foo"; | 2258 var arg_datasetId = "foo"; |
2112 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2259 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2113 var obj = new api.Dataset.fromJson(json); | 2260 var obj = new api.Dataset.fromJson(json); |
2114 checkDataset(obj); | 2261 checkDataset(obj); |
2115 | 2262 |
2116 var path = (req.url).path; | 2263 var path = (req.url).path; |
2117 var pathOffset = 0; | 2264 var pathOffset = 0; |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2149 var keyvalue = part.split("="); | 2296 var keyvalue = part.split("="); |
2150 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2297 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
2151 } | 2298 } |
2152 } | 2299 } |
2153 | 2300 |
2154 | 2301 |
2155 var h = { | 2302 var h = { |
2156 "content-type" : "application/json; charset=utf-8", | 2303 "content-type" : "application/json; charset=utf-8", |
2157 }; | 2304 }; |
2158 var resp = convert.JSON.encode(buildDataset()); | 2305 var resp = convert.JSON.encode(buildDataset()); |
2159 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2306 return new async.Future.value(stringResponse(200, h, resp)); |
2160 }), true); | 2307 }), true); |
2161 res.update(arg_request, arg_projectId, arg_datasetId).then(unittest.expect
Async(((api.Dataset response) { | 2308 res.update(arg_request, arg_projectId, arg_datasetId).then(unittest.expect
Async(((api.Dataset response) { |
2162 checkDataset(response); | 2309 checkDataset(response); |
2163 }))); | 2310 }))); |
2164 }); | 2311 }); |
2165 | 2312 |
2166 }); | 2313 }); |
2167 | 2314 |
2168 | 2315 |
2169 unittest.group("resource-JobsResourceApi", () { | 2316 unittest.group("resource-JobsResourceApi", () { |
2170 unittest.test("method--get", () { | 2317 unittest.test("method--get", () { |
2171 | 2318 |
2172 var mock = new common_test.HttpServerMock(); | 2319 var mock = new HttpServerMock(); |
2173 api.JobsResourceApi res = new api.BigqueryApi(mock).jobs; | 2320 api.JobsResourceApi res = new api.BigqueryApi(mock).jobs; |
2174 var arg_projectId = "foo"; | 2321 var arg_projectId = "foo"; |
2175 var arg_jobId = "foo"; | 2322 var arg_jobId = "foo"; |
2176 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2323 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2177 var path = (req.url).path; | 2324 var path = (req.url).path; |
2178 var pathOffset = 0; | 2325 var pathOffset = 0; |
2179 var index; | 2326 var index; |
2180 var subPart; | 2327 var subPart; |
2181 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2328 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
2182 pathOffset += 1; | 2329 pathOffset += 1; |
(...skipping 27 matching lines...) Expand all Loading... |
2210 var keyvalue = part.split("="); | 2357 var keyvalue = part.split("="); |
2211 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2358 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
2212 } | 2359 } |
2213 } | 2360 } |
2214 | 2361 |
2215 | 2362 |
2216 var h = { | 2363 var h = { |
2217 "content-type" : "application/json; charset=utf-8", | 2364 "content-type" : "application/json; charset=utf-8", |
2218 }; | 2365 }; |
2219 var resp = convert.JSON.encode(buildJob()); | 2366 var resp = convert.JSON.encode(buildJob()); |
2220 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2367 return new async.Future.value(stringResponse(200, h, resp)); |
2221 }), true); | 2368 }), true); |
2222 res.get(arg_projectId, arg_jobId).then(unittest.expectAsync(((api.Job resp
onse) { | 2369 res.get(arg_projectId, arg_jobId).then(unittest.expectAsync(((api.Job resp
onse) { |
2223 checkJob(response); | 2370 checkJob(response); |
2224 }))); | 2371 }))); |
2225 }); | 2372 }); |
2226 | 2373 |
2227 unittest.test("method--getQueryResults", () { | 2374 unittest.test("method--getQueryResults", () { |
2228 | 2375 |
2229 var mock = new common_test.HttpServerMock(); | 2376 var mock = new HttpServerMock(); |
2230 api.JobsResourceApi res = new api.BigqueryApi(mock).jobs; | 2377 api.JobsResourceApi res = new api.BigqueryApi(mock).jobs; |
2231 var arg_projectId = "foo"; | 2378 var arg_projectId = "foo"; |
2232 var arg_jobId = "foo"; | 2379 var arg_jobId = "foo"; |
2233 var arg_maxResults = 42; | 2380 var arg_maxResults = 42; |
2234 var arg_pageToken = "foo"; | 2381 var arg_pageToken = "foo"; |
2235 var arg_startIndex = "foo"; | 2382 var arg_startIndex = "foo"; |
2236 var arg_timeoutMs = 42; | 2383 var arg_timeoutMs = 42; |
2237 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2384 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2238 var path = (req.url).path; | 2385 var path = (req.url).path; |
2239 var pathOffset = 0; | 2386 var pathOffset = 0; |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2275 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | 2422 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); |
2276 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 2423 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
2277 unittest.expect(queryMap["startIndex"].first, unittest.equals(arg_startI
ndex)); | 2424 unittest.expect(queryMap["startIndex"].first, unittest.equals(arg_startI
ndex)); |
2278 unittest.expect(core.int.parse(queryMap["timeoutMs"].first), unittest.eq
uals(arg_timeoutMs)); | 2425 unittest.expect(core.int.parse(queryMap["timeoutMs"].first), unittest.eq
uals(arg_timeoutMs)); |
2279 | 2426 |
2280 | 2427 |
2281 var h = { | 2428 var h = { |
2282 "content-type" : "application/json; charset=utf-8", | 2429 "content-type" : "application/json; charset=utf-8", |
2283 }; | 2430 }; |
2284 var resp = convert.JSON.encode(buildGetQueryResultsResponse()); | 2431 var resp = convert.JSON.encode(buildGetQueryResultsResponse()); |
2285 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2432 return new async.Future.value(stringResponse(200, h, resp)); |
2286 }), true); | 2433 }), true); |
2287 res.getQueryResults(arg_projectId, arg_jobId, maxResults: arg_maxResults,
pageToken: arg_pageToken, startIndex: arg_startIndex, timeoutMs: arg_timeoutMs).
then(unittest.expectAsync(((api.GetQueryResultsResponse response) { | 2434 res.getQueryResults(arg_projectId, arg_jobId, maxResults: arg_maxResults,
pageToken: arg_pageToken, startIndex: arg_startIndex, timeoutMs: arg_timeoutMs).
then(unittest.expectAsync(((api.GetQueryResultsResponse response) { |
2288 checkGetQueryResultsResponse(response); | 2435 checkGetQueryResultsResponse(response); |
2289 }))); | 2436 }))); |
2290 }); | 2437 }); |
2291 | 2438 |
2292 unittest.test("method--insert", () { | 2439 unittest.test("method--insert", () { |
2293 // TODO: Implement tests for media upload; | 2440 // TODO: Implement tests for media upload; |
2294 // TODO: Implement tests for media download; | 2441 // TODO: Implement tests for media download; |
2295 | 2442 |
2296 var mock = new common_test.HttpServerMock(); | 2443 var mock = new HttpServerMock(); |
2297 api.JobsResourceApi res = new api.BigqueryApi(mock).jobs; | 2444 api.JobsResourceApi res = new api.BigqueryApi(mock).jobs; |
2298 var arg_request = buildJob(); | 2445 var arg_request = buildJob(); |
2299 var arg_projectId = "foo"; | 2446 var arg_projectId = "foo"; |
2300 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2447 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2301 var obj = new api.Job.fromJson(json); | 2448 var obj = new api.Job.fromJson(json); |
2302 checkJob(obj); | 2449 checkJob(obj); |
2303 | 2450 |
2304 var path = (req.url).path; | 2451 var path = (req.url).path; |
2305 var pathOffset = 0; | 2452 var pathOffset = 0; |
2306 var index; | 2453 var index; |
(...skipping 27 matching lines...) Expand all Loading... |
2334 var keyvalue = part.split("="); | 2481 var keyvalue = part.split("="); |
2335 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2482 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
2336 } | 2483 } |
2337 } | 2484 } |
2338 | 2485 |
2339 | 2486 |
2340 var h = { | 2487 var h = { |
2341 "content-type" : "application/json; charset=utf-8", | 2488 "content-type" : "application/json; charset=utf-8", |
2342 }; | 2489 }; |
2343 var resp = convert.JSON.encode(buildJob()); | 2490 var resp = convert.JSON.encode(buildJob()); |
2344 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2491 return new async.Future.value(stringResponse(200, h, resp)); |
2345 }), true); | 2492 }), true); |
2346 res.insert(arg_request, arg_projectId).then(unittest.expectAsync(((api.Job
response) { | 2493 res.insert(arg_request, arg_projectId).then(unittest.expectAsync(((api.Job
response) { |
2347 checkJob(response); | 2494 checkJob(response); |
2348 }))); | 2495 }))); |
2349 }); | 2496 }); |
2350 | 2497 |
2351 unittest.test("method--list", () { | 2498 unittest.test("method--list", () { |
2352 | 2499 |
2353 var mock = new common_test.HttpServerMock(); | 2500 var mock = new HttpServerMock(); |
2354 api.JobsResourceApi res = new api.BigqueryApi(mock).jobs; | 2501 api.JobsResourceApi res = new api.BigqueryApi(mock).jobs; |
2355 var arg_projectId = "foo"; | 2502 var arg_projectId = "foo"; |
2356 var arg_allUsers = true; | 2503 var arg_allUsers = true; |
2357 var arg_maxResults = 42; | 2504 var arg_maxResults = 42; |
2358 var arg_pageToken = "foo"; | 2505 var arg_pageToken = "foo"; |
2359 var arg_projection = "foo"; | 2506 var arg_projection = "foo"; |
2360 var arg_stateFilter = buildUnnamed1478(); | 2507 var arg_stateFilter = buildUnnamed308(); |
2361 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2508 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2362 var path = (req.url).path; | 2509 var path = (req.url).path; |
2363 var pathOffset = 0; | 2510 var pathOffset = 0; |
2364 var index; | 2511 var index; |
2365 var subPart; | 2512 var subPart; |
2366 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2513 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
2367 pathOffset += 1; | 2514 pathOffset += 1; |
2368 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("bigquery/v2/")); | 2515 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("bigquery/v2/")); |
2369 pathOffset += 12; | 2516 pathOffset += 12; |
2370 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("projects/")); | 2517 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("projects/")); |
(...skipping 26 matching lines...) Expand all Loading... |
2397 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | 2544 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); |
2398 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 2545 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
2399 unittest.expect(queryMap["projection"].first, unittest.equals(arg_projec
tion)); | 2546 unittest.expect(queryMap["projection"].first, unittest.equals(arg_projec
tion)); |
2400 unittest.expect(queryMap["stateFilter"], unittest.equals(arg_stateFilter
)); | 2547 unittest.expect(queryMap["stateFilter"], unittest.equals(arg_stateFilter
)); |
2401 | 2548 |
2402 | 2549 |
2403 var h = { | 2550 var h = { |
2404 "content-type" : "application/json; charset=utf-8", | 2551 "content-type" : "application/json; charset=utf-8", |
2405 }; | 2552 }; |
2406 var resp = convert.JSON.encode(buildJobList()); | 2553 var resp = convert.JSON.encode(buildJobList()); |
2407 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2554 return new async.Future.value(stringResponse(200, h, resp)); |
2408 }), true); | 2555 }), true); |
2409 res.list(arg_projectId, allUsers: arg_allUsers, maxResults: arg_maxResults
, pageToken: arg_pageToken, projection: arg_projection, stateFilter: arg_stateFi
lter).then(unittest.expectAsync(((api.JobList response) { | 2556 res.list(arg_projectId, allUsers: arg_allUsers, maxResults: arg_maxResults
, pageToken: arg_pageToken, projection: arg_projection, stateFilter: arg_stateFi
lter).then(unittest.expectAsync(((api.JobList response) { |
2410 checkJobList(response); | 2557 checkJobList(response); |
2411 }))); | 2558 }))); |
2412 }); | 2559 }); |
2413 | 2560 |
2414 unittest.test("method--query", () { | 2561 unittest.test("method--query", () { |
2415 | 2562 |
2416 var mock = new common_test.HttpServerMock(); | 2563 var mock = new HttpServerMock(); |
2417 api.JobsResourceApi res = new api.BigqueryApi(mock).jobs; | 2564 api.JobsResourceApi res = new api.BigqueryApi(mock).jobs; |
2418 var arg_request = buildQueryRequest(); | 2565 var arg_request = buildQueryRequest(); |
2419 var arg_projectId = "foo"; | 2566 var arg_projectId = "foo"; |
2420 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2567 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2421 var obj = new api.QueryRequest.fromJson(json); | 2568 var obj = new api.QueryRequest.fromJson(json); |
2422 checkQueryRequest(obj); | 2569 checkQueryRequest(obj); |
2423 | 2570 |
2424 var path = (req.url).path; | 2571 var path = (req.url).path; |
2425 var pathOffset = 0; | 2572 var pathOffset = 0; |
2426 var index; | 2573 var index; |
(...skipping 27 matching lines...) Expand all Loading... |
2454 var keyvalue = part.split("="); | 2601 var keyvalue = part.split("="); |
2455 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2602 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
2456 } | 2603 } |
2457 } | 2604 } |
2458 | 2605 |
2459 | 2606 |
2460 var h = { | 2607 var h = { |
2461 "content-type" : "application/json; charset=utf-8", | 2608 "content-type" : "application/json; charset=utf-8", |
2462 }; | 2609 }; |
2463 var resp = convert.JSON.encode(buildQueryResponse()); | 2610 var resp = convert.JSON.encode(buildQueryResponse()); |
2464 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2611 return new async.Future.value(stringResponse(200, h, resp)); |
2465 }), true); | 2612 }), true); |
2466 res.query(arg_request, arg_projectId).then(unittest.expectAsync(((api.Quer
yResponse response) { | 2613 res.query(arg_request, arg_projectId).then(unittest.expectAsync(((api.Quer
yResponse response) { |
2467 checkQueryResponse(response); | 2614 checkQueryResponse(response); |
2468 }))); | 2615 }))); |
2469 }); | 2616 }); |
2470 | 2617 |
2471 }); | 2618 }); |
2472 | 2619 |
2473 | 2620 |
2474 unittest.group("resource-ProjectsResourceApi", () { | 2621 unittest.group("resource-ProjectsResourceApi", () { |
2475 unittest.test("method--list", () { | 2622 unittest.test("method--list", () { |
2476 | 2623 |
2477 var mock = new common_test.HttpServerMock(); | 2624 var mock = new HttpServerMock(); |
2478 api.ProjectsResourceApi res = new api.BigqueryApi(mock).projects; | 2625 api.ProjectsResourceApi res = new api.BigqueryApi(mock).projects; |
2479 var arg_maxResults = 42; | 2626 var arg_maxResults = 42; |
2480 var arg_pageToken = "foo"; | 2627 var arg_pageToken = "foo"; |
2481 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2628 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2482 var path = (req.url).path; | 2629 var path = (req.url).path; |
2483 var pathOffset = 0; | 2630 var pathOffset = 0; |
2484 var index; | 2631 var index; |
2485 var subPart; | 2632 var subPart; |
2486 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2633 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
2487 pathOffset += 1; | 2634 pathOffset += 1; |
(...skipping 19 matching lines...) Expand all Loading... |
2507 } | 2654 } |
2508 } | 2655 } |
2509 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | 2656 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); |
2510 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 2657 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
2511 | 2658 |
2512 | 2659 |
2513 var h = { | 2660 var h = { |
2514 "content-type" : "application/json; charset=utf-8", | 2661 "content-type" : "application/json; charset=utf-8", |
2515 }; | 2662 }; |
2516 var resp = convert.JSON.encode(buildProjectList()); | 2663 var resp = convert.JSON.encode(buildProjectList()); |
2517 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2664 return new async.Future.value(stringResponse(200, h, resp)); |
2518 }), true); | 2665 }), true); |
2519 res.list(maxResults: arg_maxResults, pageToken: arg_pageToken).then(unitte
st.expectAsync(((api.ProjectList response) { | 2666 res.list(maxResults: arg_maxResults, pageToken: arg_pageToken).then(unitte
st.expectAsync(((api.ProjectList response) { |
2520 checkProjectList(response); | 2667 checkProjectList(response); |
2521 }))); | 2668 }))); |
2522 }); | 2669 }); |
2523 | 2670 |
2524 }); | 2671 }); |
2525 | 2672 |
2526 | 2673 |
2527 unittest.group("resource-TabledataResourceApi", () { | 2674 unittest.group("resource-TabledataResourceApi", () { |
2528 unittest.test("method--insertAll", () { | 2675 unittest.test("method--insertAll", () { |
2529 | 2676 |
2530 var mock = new common_test.HttpServerMock(); | 2677 var mock = new HttpServerMock(); |
2531 api.TabledataResourceApi res = new api.BigqueryApi(mock).tabledata; | 2678 api.TabledataResourceApi res = new api.BigqueryApi(mock).tabledata; |
2532 var arg_request = buildTableDataInsertAllRequest(); | 2679 var arg_request = buildTableDataInsertAllRequest(); |
2533 var arg_projectId = "foo"; | 2680 var arg_projectId = "foo"; |
2534 var arg_datasetId = "foo"; | 2681 var arg_datasetId = "foo"; |
2535 var arg_tableId = "foo"; | 2682 var arg_tableId = "foo"; |
2536 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2683 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2537 var obj = new api.TableDataInsertAllRequest.fromJson(json); | 2684 var obj = new api.TableDataInsertAllRequest.fromJson(json); |
2538 checkTableDataInsertAllRequest(obj); | 2685 checkTableDataInsertAllRequest(obj); |
2539 | 2686 |
2540 var path = (req.url).path; | 2687 var path = (req.url).path; |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2584 var keyvalue = part.split("="); | 2731 var keyvalue = part.split("="); |
2585 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2732 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
2586 } | 2733 } |
2587 } | 2734 } |
2588 | 2735 |
2589 | 2736 |
2590 var h = { | 2737 var h = { |
2591 "content-type" : "application/json; charset=utf-8", | 2738 "content-type" : "application/json; charset=utf-8", |
2592 }; | 2739 }; |
2593 var resp = convert.JSON.encode(buildTableDataInsertAllResponse()); | 2740 var resp = convert.JSON.encode(buildTableDataInsertAllResponse()); |
2594 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2741 return new async.Future.value(stringResponse(200, h, resp)); |
2595 }), true); | 2742 }), true); |
2596 res.insertAll(arg_request, arg_projectId, arg_datasetId, arg_tableId).then
(unittest.expectAsync(((api.TableDataInsertAllResponse response) { | 2743 res.insertAll(arg_request, arg_projectId, arg_datasetId, arg_tableId).then
(unittest.expectAsync(((api.TableDataInsertAllResponse response) { |
2597 checkTableDataInsertAllResponse(response); | 2744 checkTableDataInsertAllResponse(response); |
2598 }))); | 2745 }))); |
2599 }); | 2746 }); |
2600 | 2747 |
2601 unittest.test("method--list", () { | 2748 unittest.test("method--list", () { |
2602 | 2749 |
2603 var mock = new common_test.HttpServerMock(); | 2750 var mock = new HttpServerMock(); |
2604 api.TabledataResourceApi res = new api.BigqueryApi(mock).tabledata; | 2751 api.TabledataResourceApi res = new api.BigqueryApi(mock).tabledata; |
2605 var arg_projectId = "foo"; | 2752 var arg_projectId = "foo"; |
2606 var arg_datasetId = "foo"; | 2753 var arg_datasetId = "foo"; |
2607 var arg_tableId = "foo"; | 2754 var arg_tableId = "foo"; |
2608 var arg_maxResults = 42; | 2755 var arg_maxResults = 42; |
2609 var arg_pageToken = "foo"; | 2756 var arg_pageToken = "foo"; |
2610 var arg_startIndex = "foo"; | 2757 var arg_startIndex = "foo"; |
2611 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2758 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2612 var path = (req.url).path; | 2759 var path = (req.url).path; |
2613 var pathOffset = 0; | 2760 var pathOffset = 0; |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2659 } | 2806 } |
2660 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | 2807 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); |
2661 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 2808 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
2662 unittest.expect(queryMap["startIndex"].first, unittest.equals(arg_startI
ndex)); | 2809 unittest.expect(queryMap["startIndex"].first, unittest.equals(arg_startI
ndex)); |
2663 | 2810 |
2664 | 2811 |
2665 var h = { | 2812 var h = { |
2666 "content-type" : "application/json; charset=utf-8", | 2813 "content-type" : "application/json; charset=utf-8", |
2667 }; | 2814 }; |
2668 var resp = convert.JSON.encode(buildTableDataList()); | 2815 var resp = convert.JSON.encode(buildTableDataList()); |
2669 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2816 return new async.Future.value(stringResponse(200, h, resp)); |
2670 }), true); | 2817 }), true); |
2671 res.list(arg_projectId, arg_datasetId, arg_tableId, maxResults: arg_maxRes
ults, pageToken: arg_pageToken, startIndex: arg_startIndex).then(unittest.expect
Async(((api.TableDataList response) { | 2818 res.list(arg_projectId, arg_datasetId, arg_tableId, maxResults: arg_maxRes
ults, pageToken: arg_pageToken, startIndex: arg_startIndex).then(unittest.expect
Async(((api.TableDataList response) { |
2672 checkTableDataList(response); | 2819 checkTableDataList(response); |
2673 }))); | 2820 }))); |
2674 }); | 2821 }); |
2675 | 2822 |
2676 }); | 2823 }); |
2677 | 2824 |
2678 | 2825 |
2679 unittest.group("resource-TablesResourceApi", () { | 2826 unittest.group("resource-TablesResourceApi", () { |
2680 unittest.test("method--delete", () { | 2827 unittest.test("method--delete", () { |
2681 | 2828 |
2682 var mock = new common_test.HttpServerMock(); | 2829 var mock = new HttpServerMock(); |
2683 api.TablesResourceApi res = new api.BigqueryApi(mock).tables; | 2830 api.TablesResourceApi res = new api.BigqueryApi(mock).tables; |
2684 var arg_projectId = "foo"; | 2831 var arg_projectId = "foo"; |
2685 var arg_datasetId = "foo"; | 2832 var arg_datasetId = "foo"; |
2686 var arg_tableId = "foo"; | 2833 var arg_tableId = "foo"; |
2687 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2834 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2688 var path = (req.url).path; | 2835 var path = (req.url).path; |
2689 var pathOffset = 0; | 2836 var pathOffset = 0; |
2690 var index; | 2837 var index; |
2691 var subPart; | 2838 var subPart; |
2692 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2839 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2728 var keyvalue = part.split("="); | 2875 var keyvalue = part.split("="); |
2729 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2876 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
2730 } | 2877 } |
2731 } | 2878 } |
2732 | 2879 |
2733 | 2880 |
2734 var h = { | 2881 var h = { |
2735 "content-type" : "application/json; charset=utf-8", | 2882 "content-type" : "application/json; charset=utf-8", |
2736 }; | 2883 }; |
2737 var resp = ""; | 2884 var resp = ""; |
2738 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2885 return new async.Future.value(stringResponse(200, h, resp)); |
2739 }), true); | 2886 }), true); |
2740 res.delete(arg_projectId, arg_datasetId, arg_tableId).then(unittest.expect
Async((_) {})); | 2887 res.delete(arg_projectId, arg_datasetId, arg_tableId).then(unittest.expect
Async((_) {})); |
2741 }); | 2888 }); |
2742 | 2889 |
2743 unittest.test("method--get", () { | 2890 unittest.test("method--get", () { |
2744 | 2891 |
2745 var mock = new common_test.HttpServerMock(); | 2892 var mock = new HttpServerMock(); |
2746 api.TablesResourceApi res = new api.BigqueryApi(mock).tables; | 2893 api.TablesResourceApi res = new api.BigqueryApi(mock).tables; |
2747 var arg_projectId = "foo"; | 2894 var arg_projectId = "foo"; |
2748 var arg_datasetId = "foo"; | 2895 var arg_datasetId = "foo"; |
2749 var arg_tableId = "foo"; | 2896 var arg_tableId = "foo"; |
2750 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2897 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2751 var path = (req.url).path; | 2898 var path = (req.url).path; |
2752 var pathOffset = 0; | 2899 var pathOffset = 0; |
2753 var index; | 2900 var index; |
2754 var subPart; | 2901 var subPart; |
2755 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2902 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2791 var keyvalue = part.split("="); | 2938 var keyvalue = part.split("="); |
2792 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2939 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
2793 } | 2940 } |
2794 } | 2941 } |
2795 | 2942 |
2796 | 2943 |
2797 var h = { | 2944 var h = { |
2798 "content-type" : "application/json; charset=utf-8", | 2945 "content-type" : "application/json; charset=utf-8", |
2799 }; | 2946 }; |
2800 var resp = convert.JSON.encode(buildTable()); | 2947 var resp = convert.JSON.encode(buildTable()); |
2801 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 2948 return new async.Future.value(stringResponse(200, h, resp)); |
2802 }), true); | 2949 }), true); |
2803 res.get(arg_projectId, arg_datasetId, arg_tableId).then(unittest.expectAsy
nc(((api.Table response) { | 2950 res.get(arg_projectId, arg_datasetId, arg_tableId).then(unittest.expectAsy
nc(((api.Table response) { |
2804 checkTable(response); | 2951 checkTable(response); |
2805 }))); | 2952 }))); |
2806 }); | 2953 }); |
2807 | 2954 |
2808 unittest.test("method--insert", () { | 2955 unittest.test("method--insert", () { |
2809 | 2956 |
2810 var mock = new common_test.HttpServerMock(); | 2957 var mock = new HttpServerMock(); |
2811 api.TablesResourceApi res = new api.BigqueryApi(mock).tables; | 2958 api.TablesResourceApi res = new api.BigqueryApi(mock).tables; |
2812 var arg_request = buildTable(); | 2959 var arg_request = buildTable(); |
2813 var arg_projectId = "foo"; | 2960 var arg_projectId = "foo"; |
2814 var arg_datasetId = "foo"; | 2961 var arg_datasetId = "foo"; |
2815 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2962 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2816 var obj = new api.Table.fromJson(json); | 2963 var obj = new api.Table.fromJson(json); |
2817 checkTable(obj); | 2964 checkTable(obj); |
2818 | 2965 |
2819 var path = (req.url).path; | 2966 var path = (req.url).path; |
2820 var pathOffset = 0; | 2967 var pathOffset = 0; |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2856 var keyvalue = part.split("="); | 3003 var keyvalue = part.split("="); |
2857 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 3004 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
2858 } | 3005 } |
2859 } | 3006 } |
2860 | 3007 |
2861 | 3008 |
2862 var h = { | 3009 var h = { |
2863 "content-type" : "application/json; charset=utf-8", | 3010 "content-type" : "application/json; charset=utf-8", |
2864 }; | 3011 }; |
2865 var resp = convert.JSON.encode(buildTable()); | 3012 var resp = convert.JSON.encode(buildTable()); |
2866 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 3013 return new async.Future.value(stringResponse(200, h, resp)); |
2867 }), true); | 3014 }), true); |
2868 res.insert(arg_request, arg_projectId, arg_datasetId).then(unittest.expect
Async(((api.Table response) { | 3015 res.insert(arg_request, arg_projectId, arg_datasetId).then(unittest.expect
Async(((api.Table response) { |
2869 checkTable(response); | 3016 checkTable(response); |
2870 }))); | 3017 }))); |
2871 }); | 3018 }); |
2872 | 3019 |
2873 unittest.test("method--list", () { | 3020 unittest.test("method--list", () { |
2874 | 3021 |
2875 var mock = new common_test.HttpServerMock(); | 3022 var mock = new HttpServerMock(); |
2876 api.TablesResourceApi res = new api.BigqueryApi(mock).tables; | 3023 api.TablesResourceApi res = new api.BigqueryApi(mock).tables; |
2877 var arg_projectId = "foo"; | 3024 var arg_projectId = "foo"; |
2878 var arg_datasetId = "foo"; | 3025 var arg_datasetId = "foo"; |
2879 var arg_maxResults = 42; | 3026 var arg_maxResults = 42; |
2880 var arg_pageToken = "foo"; | 3027 var arg_pageToken = "foo"; |
2881 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3028 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2882 var path = (req.url).path; | 3029 var path = (req.url).path; |
2883 var pathOffset = 0; | 3030 var pathOffset = 0; |
2884 var index; | 3031 var index; |
2885 var subPart; | 3032 var subPart; |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2921 } | 3068 } |
2922 } | 3069 } |
2923 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | 3070 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); |
2924 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 3071 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
2925 | 3072 |
2926 | 3073 |
2927 var h = { | 3074 var h = { |
2928 "content-type" : "application/json; charset=utf-8", | 3075 "content-type" : "application/json; charset=utf-8", |
2929 }; | 3076 }; |
2930 var resp = convert.JSON.encode(buildTableList()); | 3077 var resp = convert.JSON.encode(buildTableList()); |
2931 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 3078 return new async.Future.value(stringResponse(200, h, resp)); |
2932 }), true); | 3079 }), true); |
2933 res.list(arg_projectId, arg_datasetId, maxResults: arg_maxResults, pageTok
en: arg_pageToken).then(unittest.expectAsync(((api.TableList response) { | 3080 res.list(arg_projectId, arg_datasetId, maxResults: arg_maxResults, pageTok
en: arg_pageToken).then(unittest.expectAsync(((api.TableList response) { |
2934 checkTableList(response); | 3081 checkTableList(response); |
2935 }))); | 3082 }))); |
2936 }); | 3083 }); |
2937 | 3084 |
2938 unittest.test("method--patch", () { | 3085 unittest.test("method--patch", () { |
2939 | 3086 |
2940 var mock = new common_test.HttpServerMock(); | 3087 var mock = new HttpServerMock(); |
2941 api.TablesResourceApi res = new api.BigqueryApi(mock).tables; | 3088 api.TablesResourceApi res = new api.BigqueryApi(mock).tables; |
2942 var arg_request = buildTable(); | 3089 var arg_request = buildTable(); |
2943 var arg_projectId = "foo"; | 3090 var arg_projectId = "foo"; |
2944 var arg_datasetId = "foo"; | 3091 var arg_datasetId = "foo"; |
2945 var arg_tableId = "foo"; | 3092 var arg_tableId = "foo"; |
2946 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3093 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
2947 var obj = new api.Table.fromJson(json); | 3094 var obj = new api.Table.fromJson(json); |
2948 checkTable(obj); | 3095 checkTable(obj); |
2949 | 3096 |
2950 var path = (req.url).path; | 3097 var path = (req.url).path; |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2990 var keyvalue = part.split("="); | 3137 var keyvalue = part.split("="); |
2991 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 3138 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
2992 } | 3139 } |
2993 } | 3140 } |
2994 | 3141 |
2995 | 3142 |
2996 var h = { | 3143 var h = { |
2997 "content-type" : "application/json; charset=utf-8", | 3144 "content-type" : "application/json; charset=utf-8", |
2998 }; | 3145 }; |
2999 var resp = convert.JSON.encode(buildTable()); | 3146 var resp = convert.JSON.encode(buildTable()); |
3000 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 3147 return new async.Future.value(stringResponse(200, h, resp)); |
3001 }), true); | 3148 }), true); |
3002 res.patch(arg_request, arg_projectId, arg_datasetId, arg_tableId).then(uni
ttest.expectAsync(((api.Table response) { | 3149 res.patch(arg_request, arg_projectId, arg_datasetId, arg_tableId).then(uni
ttest.expectAsync(((api.Table response) { |
3003 checkTable(response); | 3150 checkTable(response); |
3004 }))); | 3151 }))); |
3005 }); | 3152 }); |
3006 | 3153 |
3007 unittest.test("method--update", () { | 3154 unittest.test("method--update", () { |
3008 | 3155 |
3009 var mock = new common_test.HttpServerMock(); | 3156 var mock = new HttpServerMock(); |
3010 api.TablesResourceApi res = new api.BigqueryApi(mock).tables; | 3157 api.TablesResourceApi res = new api.BigqueryApi(mock).tables; |
3011 var arg_request = buildTable(); | 3158 var arg_request = buildTable(); |
3012 var arg_projectId = "foo"; | 3159 var arg_projectId = "foo"; |
3013 var arg_datasetId = "foo"; | 3160 var arg_datasetId = "foo"; |
3014 var arg_tableId = "foo"; | 3161 var arg_tableId = "foo"; |
3015 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 3162 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
3016 var obj = new api.Table.fromJson(json); | 3163 var obj = new api.Table.fromJson(json); |
3017 checkTable(obj); | 3164 checkTable(obj); |
3018 | 3165 |
3019 var path = (req.url).path; | 3166 var path = (req.url).path; |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3059 var keyvalue = part.split("="); | 3206 var keyvalue = part.split("="); |
3060 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 3207 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
3061 } | 3208 } |
3062 } | 3209 } |
3063 | 3210 |
3064 | 3211 |
3065 var h = { | 3212 var h = { |
3066 "content-type" : "application/json; charset=utf-8", | 3213 "content-type" : "application/json; charset=utf-8", |
3067 }; | 3214 }; |
3068 var resp = convert.JSON.encode(buildTable()); | 3215 var resp = convert.JSON.encode(buildTable()); |
3069 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 3216 return new async.Future.value(stringResponse(200, h, resp)); |
3070 }), true); | 3217 }), true); |
3071 res.update(arg_request, arg_projectId, arg_datasetId, arg_tableId).then(un
ittest.expectAsync(((api.Table response) { | 3218 res.update(arg_request, arg_projectId, arg_datasetId, arg_tableId).then(un
ittest.expectAsync(((api.Table response) { |
3072 checkTable(response); | 3219 checkTable(response); |
3073 }))); | 3220 }))); |
3074 }); | 3221 }); |
3075 | 3222 |
3076 }); | 3223 }); |
3077 | 3224 |
3078 | 3225 |
3079 } | 3226 } |
3080 | 3227 |
OLD | NEW |