OLD | NEW |
1 library googleapis.youtubeAnalytics.v1.test; | 1 library googleapis.youtubeAnalytics.v1.test; |
2 | 2 |
3 import "dart:core" as core; | 3 import "dart:core" as core; |
4 import "dart:collection" as collection; | 4 import "dart:collection" as collection; |
5 import "dart:async" as async; | 5 import "dart:async" as async; |
6 import "dart:convert" as convert; | 6 import "dart:convert" as convert; |
7 | 7 |
8 import 'package:http/http.dart' as http; | 8 import 'package:http/http.dart' as http; |
9 import 'package:http/testing.dart' as http_testing; | 9 import 'package:http/testing.dart' as http_testing; |
10 import 'package:test/test.dart' as unittest; | 10 import 'package:test/test.dart' as unittest; |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 if (buildCounterGroupItem < 3) { | 161 if (buildCounterGroupItem < 3) { |
162 unittest.expect(o.etag, unittest.equals('foo')); | 162 unittest.expect(o.etag, unittest.equals('foo')); |
163 unittest.expect(o.groupId, unittest.equals('foo')); | 163 unittest.expect(o.groupId, unittest.equals('foo')); |
164 unittest.expect(o.id, unittest.equals('foo')); | 164 unittest.expect(o.id, unittest.equals('foo')); |
165 unittest.expect(o.kind, unittest.equals('foo')); | 165 unittest.expect(o.kind, unittest.equals('foo')); |
166 checkGroupItemResource(o.resource); | 166 checkGroupItemResource(o.resource); |
167 } | 167 } |
168 buildCounterGroupItem--; | 168 buildCounterGroupItem--; |
169 } | 169 } |
170 | 170 |
171 buildUnnamed266() { | 171 buildUnnamed271() { |
172 var o = new core.List<api.GroupItem>(); | 172 var o = new core.List<api.GroupItem>(); |
173 o.add(buildGroupItem()); | 173 o.add(buildGroupItem()); |
174 o.add(buildGroupItem()); | 174 o.add(buildGroupItem()); |
175 return o; | 175 return o; |
176 } | 176 } |
177 | 177 |
178 checkUnnamed266(core.List<api.GroupItem> o) { | 178 checkUnnamed271(core.List<api.GroupItem> o) { |
179 unittest.expect(o, unittest.hasLength(2)); | 179 unittest.expect(o, unittest.hasLength(2)); |
180 checkGroupItem(o[0]); | 180 checkGroupItem(o[0]); |
181 checkGroupItem(o[1]); | 181 checkGroupItem(o[1]); |
182 } | 182 } |
183 | 183 |
184 core.int buildCounterGroupItemListResponse = 0; | 184 core.int buildCounterGroupItemListResponse = 0; |
185 buildGroupItemListResponse() { | 185 buildGroupItemListResponse() { |
186 var o = new api.GroupItemListResponse(); | 186 var o = new api.GroupItemListResponse(); |
187 buildCounterGroupItemListResponse++; | 187 buildCounterGroupItemListResponse++; |
188 if (buildCounterGroupItemListResponse < 3) { | 188 if (buildCounterGroupItemListResponse < 3) { |
189 o.etag = "foo"; | 189 o.etag = "foo"; |
190 o.items = buildUnnamed266(); | 190 o.items = buildUnnamed271(); |
191 o.kind = "foo"; | 191 o.kind = "foo"; |
192 } | 192 } |
193 buildCounterGroupItemListResponse--; | 193 buildCounterGroupItemListResponse--; |
194 return o; | 194 return o; |
195 } | 195 } |
196 | 196 |
197 checkGroupItemListResponse(api.GroupItemListResponse o) { | 197 checkGroupItemListResponse(api.GroupItemListResponse o) { |
198 buildCounterGroupItemListResponse++; | 198 buildCounterGroupItemListResponse++; |
199 if (buildCounterGroupItemListResponse < 3) { | 199 if (buildCounterGroupItemListResponse < 3) { |
200 unittest.expect(o.etag, unittest.equals('foo')); | 200 unittest.expect(o.etag, unittest.equals('foo')); |
201 checkUnnamed266(o.items); | 201 checkUnnamed271(o.items); |
202 unittest.expect(o.kind, unittest.equals('foo')); | 202 unittest.expect(o.kind, unittest.equals('foo')); |
203 } | 203 } |
204 buildCounterGroupItemListResponse--; | 204 buildCounterGroupItemListResponse--; |
205 } | 205 } |
206 | 206 |
207 buildUnnamed267() { | 207 buildUnnamed272() { |
208 var o = new core.List<api.Group>(); | 208 var o = new core.List<api.Group>(); |
209 o.add(buildGroup()); | 209 o.add(buildGroup()); |
210 o.add(buildGroup()); | 210 o.add(buildGroup()); |
211 return o; | 211 return o; |
212 } | 212 } |
213 | 213 |
214 checkUnnamed267(core.List<api.Group> o) { | 214 checkUnnamed272(core.List<api.Group> o) { |
215 unittest.expect(o, unittest.hasLength(2)); | 215 unittest.expect(o, unittest.hasLength(2)); |
216 checkGroup(o[0]); | 216 checkGroup(o[0]); |
217 checkGroup(o[1]); | 217 checkGroup(o[1]); |
218 } | 218 } |
219 | 219 |
220 core.int buildCounterGroupListResponse = 0; | 220 core.int buildCounterGroupListResponse = 0; |
221 buildGroupListResponse() { | 221 buildGroupListResponse() { |
222 var o = new api.GroupListResponse(); | 222 var o = new api.GroupListResponse(); |
223 buildCounterGroupListResponse++; | 223 buildCounterGroupListResponse++; |
224 if (buildCounterGroupListResponse < 3) { | 224 if (buildCounterGroupListResponse < 3) { |
225 o.etag = "foo"; | 225 o.etag = "foo"; |
226 o.items = buildUnnamed267(); | 226 o.items = buildUnnamed272(); |
227 o.kind = "foo"; | 227 o.kind = "foo"; |
228 o.nextPageToken = "foo"; | 228 o.nextPageToken = "foo"; |
229 } | 229 } |
230 buildCounterGroupListResponse--; | 230 buildCounterGroupListResponse--; |
231 return o; | 231 return o; |
232 } | 232 } |
233 | 233 |
234 checkGroupListResponse(api.GroupListResponse o) { | 234 checkGroupListResponse(api.GroupListResponse o) { |
235 buildCounterGroupListResponse++; | 235 buildCounterGroupListResponse++; |
236 if (buildCounterGroupListResponse < 3) { | 236 if (buildCounterGroupListResponse < 3) { |
237 unittest.expect(o.etag, unittest.equals('foo')); | 237 unittest.expect(o.etag, unittest.equals('foo')); |
238 checkUnnamed267(o.items); | 238 checkUnnamed272(o.items); |
239 unittest.expect(o.kind, unittest.equals('foo')); | 239 unittest.expect(o.kind, unittest.equals('foo')); |
240 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 240 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
241 } | 241 } |
242 buildCounterGroupListResponse--; | 242 buildCounterGroupListResponse--; |
243 } | 243 } |
244 | 244 |
245 core.int buildCounterResultTableColumnHeaders = 0; | 245 core.int buildCounterResultTableColumnHeaders = 0; |
246 buildResultTableColumnHeaders() { | 246 buildResultTableColumnHeaders() { |
247 var o = new api.ResultTableColumnHeaders(); | 247 var o = new api.ResultTableColumnHeaders(); |
248 buildCounterResultTableColumnHeaders++; | 248 buildCounterResultTableColumnHeaders++; |
249 if (buildCounterResultTableColumnHeaders < 3) { | 249 if (buildCounterResultTableColumnHeaders < 3) { |
250 o.columnType = "foo"; | 250 o.columnType = "foo"; |
251 o.dataType = "foo"; | 251 o.dataType = "foo"; |
252 o.name = "foo"; | 252 o.name = "foo"; |
253 } | 253 } |
254 buildCounterResultTableColumnHeaders--; | 254 buildCounterResultTableColumnHeaders--; |
255 return o; | 255 return o; |
256 } | 256 } |
257 | 257 |
258 checkResultTableColumnHeaders(api.ResultTableColumnHeaders o) { | 258 checkResultTableColumnHeaders(api.ResultTableColumnHeaders o) { |
259 buildCounterResultTableColumnHeaders++; | 259 buildCounterResultTableColumnHeaders++; |
260 if (buildCounterResultTableColumnHeaders < 3) { | 260 if (buildCounterResultTableColumnHeaders < 3) { |
261 unittest.expect(o.columnType, unittest.equals('foo')); | 261 unittest.expect(o.columnType, unittest.equals('foo')); |
262 unittest.expect(o.dataType, unittest.equals('foo')); | 262 unittest.expect(o.dataType, unittest.equals('foo')); |
263 unittest.expect(o.name, unittest.equals('foo')); | 263 unittest.expect(o.name, unittest.equals('foo')); |
264 } | 264 } |
265 buildCounterResultTableColumnHeaders--; | 265 buildCounterResultTableColumnHeaders--; |
266 } | 266 } |
267 | 267 |
268 buildUnnamed268() { | 268 buildUnnamed273() { |
269 var o = new core.List<api.ResultTableColumnHeaders>(); | 269 var o = new core.List<api.ResultTableColumnHeaders>(); |
270 o.add(buildResultTableColumnHeaders()); | 270 o.add(buildResultTableColumnHeaders()); |
271 o.add(buildResultTableColumnHeaders()); | 271 o.add(buildResultTableColumnHeaders()); |
272 return o; | 272 return o; |
273 } | 273 } |
274 | 274 |
275 checkUnnamed268(core.List<api.ResultTableColumnHeaders> o) { | 275 checkUnnamed273(core.List<api.ResultTableColumnHeaders> o) { |
276 unittest.expect(o, unittest.hasLength(2)); | 276 unittest.expect(o, unittest.hasLength(2)); |
277 checkResultTableColumnHeaders(o[0]); | 277 checkResultTableColumnHeaders(o[0]); |
278 checkResultTableColumnHeaders(o[1]); | 278 checkResultTableColumnHeaders(o[1]); |
279 } | 279 } |
280 | 280 |
281 buildUnnamed269() { | 281 buildUnnamed274() { |
282 var o = new core.List<core.Object>(); | 282 var o = new core.List<core.Object>(); |
283 o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}); | 283 o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}); |
284 o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}); | 284 o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}); |
285 return o; | 285 return o; |
286 } | 286 } |
287 | 287 |
288 checkUnnamed269(core.List<core.Object> o) { | 288 checkUnnamed274(core.List<core.Object> o) { |
289 unittest.expect(o, unittest.hasLength(2)); | 289 unittest.expect(o, unittest.hasLength(2)); |
290 var casted1 = (o[0]) as core.Map; unittest.expect(casted1, unittest.hasLength(
3)); unittest.expect(casted1["list"], unittest.equals([1, 2, 3])); unittest.expe
ct(casted1["bool"], unittest.equals(true)); unittest.expect(casted1["string"], u
nittest.equals('foo')); | 290 var casted1 = (o[0]) as core.Map; unittest.expect(casted1, unittest.hasLength(
3)); unittest.expect(casted1["list"], unittest.equals([1, 2, 3])); unittest.expe
ct(casted1["bool"], unittest.equals(true)); unittest.expect(casted1["string"], u
nittest.equals('foo')); |
291 var casted2 = (o[1]) as core.Map; unittest.expect(casted2, unittest.hasLength(
3)); unittest.expect(casted2["list"], unittest.equals([1, 2, 3])); unittest.expe
ct(casted2["bool"], unittest.equals(true)); unittest.expect(casted2["string"], u
nittest.equals('foo')); | 291 var casted2 = (o[1]) as core.Map; unittest.expect(casted2, unittest.hasLength(
3)); unittest.expect(casted2["list"], unittest.equals([1, 2, 3])); unittest.expe
ct(casted2["bool"], unittest.equals(true)); unittest.expect(casted2["string"], u
nittest.equals('foo')); |
292 } | 292 } |
293 | 293 |
294 buildUnnamed270() { | 294 buildUnnamed275() { |
295 var o = new core.List<core.List<core.Object>>(); | 295 var o = new core.List<core.List<core.Object>>(); |
296 o.add(buildUnnamed269()); | 296 o.add(buildUnnamed274()); |
297 o.add(buildUnnamed269()); | 297 o.add(buildUnnamed274()); |
298 return o; | 298 return o; |
299 } | 299 } |
300 | 300 |
301 checkUnnamed270(core.List<core.List<core.Object>> o) { | 301 checkUnnamed275(core.List<core.List<core.Object>> o) { |
302 unittest.expect(o, unittest.hasLength(2)); | 302 unittest.expect(o, unittest.hasLength(2)); |
303 checkUnnamed269(o[0]); | 303 checkUnnamed274(o[0]); |
304 checkUnnamed269(o[1]); | 304 checkUnnamed274(o[1]); |
305 } | 305 } |
306 | 306 |
307 core.int buildCounterResultTable = 0; | 307 core.int buildCounterResultTable = 0; |
308 buildResultTable() { | 308 buildResultTable() { |
309 var o = new api.ResultTable(); | 309 var o = new api.ResultTable(); |
310 buildCounterResultTable++; | 310 buildCounterResultTable++; |
311 if (buildCounterResultTable < 3) { | 311 if (buildCounterResultTable < 3) { |
312 o.columnHeaders = buildUnnamed268(); | 312 o.columnHeaders = buildUnnamed273(); |
313 o.kind = "foo"; | 313 o.kind = "foo"; |
314 o.rows = buildUnnamed270(); | 314 o.rows = buildUnnamed275(); |
315 } | 315 } |
316 buildCounterResultTable--; | 316 buildCounterResultTable--; |
317 return o; | 317 return o; |
318 } | 318 } |
319 | 319 |
320 checkResultTable(api.ResultTable o) { | 320 checkResultTable(api.ResultTable o) { |
321 buildCounterResultTable++; | 321 buildCounterResultTable++; |
322 if (buildCounterResultTable < 3) { | 322 if (buildCounterResultTable < 3) { |
323 checkUnnamed268(o.columnHeaders); | 323 checkUnnamed273(o.columnHeaders); |
324 unittest.expect(o.kind, unittest.equals('foo')); | 324 unittest.expect(o.kind, unittest.equals('foo')); |
325 checkUnnamed270(o.rows); | 325 checkUnnamed275(o.rows); |
326 } | 326 } |
327 buildCounterResultTable--; | 327 buildCounterResultTable--; |
328 } | 328 } |
329 | 329 |
330 | 330 |
331 main() { | 331 main() { |
332 unittest.group("obj-schema-GroupContentDetails", () { | 332 unittest.group("obj-schema-GroupContentDetails", () { |
333 unittest.test("to-json--from-json", () { | 333 unittest.test("to-json--from-json", () { |
334 var o = buildGroupContentDetails(); | 334 var o = buildGroupContentDetails(); |
335 var od = new api.GroupContentDetails.fromJson(o.toJson()); | 335 var od = new api.GroupContentDetails.fromJson(o.toJson()); |
(...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
833 res.query(arg_ids, arg_start_date, arg_end_date, arg_metrics, currency: ar
g_currency, dimensions: arg_dimensions, filters: arg_filters, include_historical
_channel_data: arg_include_historical_channel_data, max_results: arg_max_results
, sort: arg_sort, start_index: arg_start_index).then(unittest.expectAsync1(((api
.ResultTable response) { | 833 res.query(arg_ids, arg_start_date, arg_end_date, arg_metrics, currency: ar
g_currency, dimensions: arg_dimensions, filters: arg_filters, include_historical
_channel_data: arg_include_historical_channel_data, max_results: arg_max_results
, sort: arg_sort, start_index: arg_start_index).then(unittest.expectAsync1(((api
.ResultTable response) { |
834 checkResultTable(response); | 834 checkResultTable(response); |
835 }))); | 835 }))); |
836 }); | 836 }); |
837 | 837 |
838 }); | 838 }); |
839 | 839 |
840 | 840 |
841 } | 841 } |
842 | 842 |
OLD | NEW |