| 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:unittest/unittest.dart' as unittest; | 10 import 'package:unittest/unittest.dart' as unittest; |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 checkBatchReportOutputs(api.BatchReportOutputs o) { | 32 checkBatchReportOutputs(api.BatchReportOutputs o) { |
| 33 buildCounterBatchReportOutputs++; | 33 buildCounterBatchReportOutputs++; |
| 34 if (buildCounterBatchReportOutputs < 3) { | 34 if (buildCounterBatchReportOutputs < 3) { |
| 35 unittest.expect(o.downloadUrl, unittest.equals('foo')); | 35 unittest.expect(o.downloadUrl, unittest.equals('foo')); |
| 36 unittest.expect(o.format, unittest.equals('foo')); | 36 unittest.expect(o.format, unittest.equals('foo')); |
| 37 unittest.expect(o.type, unittest.equals('foo')); | 37 unittest.expect(o.type, unittest.equals('foo')); |
| 38 } | 38 } |
| 39 buildCounterBatchReportOutputs--; | 39 buildCounterBatchReportOutputs--; |
| 40 } | 40 } |
| 41 | 41 |
| 42 buildUnnamed1180() { | 42 buildUnnamed182() { |
| 43 var o = new core.List<api.BatchReportOutputs>(); | 43 var o = new core.List<api.BatchReportOutputs>(); |
| 44 o.add(buildBatchReportOutputs()); | 44 o.add(buildBatchReportOutputs()); |
| 45 o.add(buildBatchReportOutputs()); | 45 o.add(buildBatchReportOutputs()); |
| 46 return o; | 46 return o; |
| 47 } | 47 } |
| 48 | 48 |
| 49 checkUnnamed1180(core.List<api.BatchReportOutputs> o) { | 49 checkUnnamed182(core.List<api.BatchReportOutputs> o) { |
| 50 unittest.expect(o, unittest.hasLength(2)); | 50 unittest.expect(o, unittest.hasLength(2)); |
| 51 checkBatchReportOutputs(o[0]); | 51 checkBatchReportOutputs(o[0]); |
| 52 checkBatchReportOutputs(o[1]); | 52 checkBatchReportOutputs(o[1]); |
| 53 } | 53 } |
| 54 | 54 |
| 55 core.int buildCounterBatchReportTimeSpan = 0; | 55 core.int buildCounterBatchReportTimeSpan = 0; |
| 56 buildBatchReportTimeSpan() { | 56 buildBatchReportTimeSpan() { |
| 57 var o = new api.BatchReportTimeSpan(); | 57 var o = new api.BatchReportTimeSpan(); |
| 58 buildCounterBatchReportTimeSpan++; | 58 buildCounterBatchReportTimeSpan++; |
| 59 if (buildCounterBatchReportTimeSpan < 3) { | 59 if (buildCounterBatchReportTimeSpan < 3) { |
| (...skipping 13 matching lines...) Expand all Loading... |
| 73 buildCounterBatchReportTimeSpan--; | 73 buildCounterBatchReportTimeSpan--; |
| 74 } | 74 } |
| 75 | 75 |
| 76 core.int buildCounterBatchReport = 0; | 76 core.int buildCounterBatchReport = 0; |
| 77 buildBatchReport() { | 77 buildBatchReport() { |
| 78 var o = new api.BatchReport(); | 78 var o = new api.BatchReport(); |
| 79 buildCounterBatchReport++; | 79 buildCounterBatchReport++; |
| 80 if (buildCounterBatchReport < 3) { | 80 if (buildCounterBatchReport < 3) { |
| 81 o.id = "foo"; | 81 o.id = "foo"; |
| 82 o.kind = "foo"; | 82 o.kind = "foo"; |
| 83 o.outputs = buildUnnamed1180(); | 83 o.outputs = buildUnnamed182(); |
| 84 o.reportId = "foo"; | 84 o.reportId = "foo"; |
| 85 o.timeSpan = buildBatchReportTimeSpan(); | 85 o.timeSpan = buildBatchReportTimeSpan(); |
| 86 o.timeUpdated = core.DateTime.parse("2002-02-27T14:01:02"); | 86 o.timeUpdated = core.DateTime.parse("2002-02-27T14:01:02"); |
| 87 } | 87 } |
| 88 buildCounterBatchReport--; | 88 buildCounterBatchReport--; |
| 89 return o; | 89 return o; |
| 90 } | 90 } |
| 91 | 91 |
| 92 checkBatchReport(api.BatchReport o) { | 92 checkBatchReport(api.BatchReport o) { |
| 93 buildCounterBatchReport++; | 93 buildCounterBatchReport++; |
| 94 if (buildCounterBatchReport < 3) { | 94 if (buildCounterBatchReport < 3) { |
| 95 unittest.expect(o.id, unittest.equals('foo')); | 95 unittest.expect(o.id, unittest.equals('foo')); |
| 96 unittest.expect(o.kind, unittest.equals('foo')); | 96 unittest.expect(o.kind, unittest.equals('foo')); |
| 97 checkUnnamed1180(o.outputs); | 97 checkUnnamed182(o.outputs); |
| 98 unittest.expect(o.reportId, unittest.equals('foo')); | 98 unittest.expect(o.reportId, unittest.equals('foo')); |
| 99 checkBatchReportTimeSpan(o.timeSpan); | 99 checkBatchReportTimeSpan(o.timeSpan); |
| 100 unittest.expect(o.timeUpdated, unittest.equals(core.DateTime.parse("2002-02-
27T14:01:02"))); | 100 unittest.expect(o.timeUpdated, unittest.equals(core.DateTime.parse("2002-02-
27T14:01:02"))); |
| 101 } | 101 } |
| 102 buildCounterBatchReport--; | 102 buildCounterBatchReport--; |
| 103 } | 103 } |
| 104 | 104 |
| 105 core.int buildCounterBatchReportDefinition = 0; | 105 core.int buildCounterBatchReportDefinition = 0; |
| 106 buildBatchReportDefinition() { | 106 buildBatchReportDefinition() { |
| 107 var o = new api.BatchReportDefinition(); | 107 var o = new api.BatchReportDefinition(); |
| (...skipping 14 matching lines...) Expand all Loading... |
| 122 if (buildCounterBatchReportDefinition < 3) { | 122 if (buildCounterBatchReportDefinition < 3) { |
| 123 unittest.expect(o.id, unittest.equals('foo')); | 123 unittest.expect(o.id, unittest.equals('foo')); |
| 124 unittest.expect(o.kind, unittest.equals('foo')); | 124 unittest.expect(o.kind, unittest.equals('foo')); |
| 125 unittest.expect(o.name, unittest.equals('foo')); | 125 unittest.expect(o.name, unittest.equals('foo')); |
| 126 unittest.expect(o.status, unittest.equals('foo')); | 126 unittest.expect(o.status, unittest.equals('foo')); |
| 127 unittest.expect(o.type, unittest.equals('foo')); | 127 unittest.expect(o.type, unittest.equals('foo')); |
| 128 } | 128 } |
| 129 buildCounterBatchReportDefinition--; | 129 buildCounterBatchReportDefinition--; |
| 130 } | 130 } |
| 131 | 131 |
| 132 buildUnnamed1181() { | 132 buildUnnamed183() { |
| 133 var o = new core.List<api.BatchReportDefinition>(); | 133 var o = new core.List<api.BatchReportDefinition>(); |
| 134 o.add(buildBatchReportDefinition()); | 134 o.add(buildBatchReportDefinition()); |
| 135 o.add(buildBatchReportDefinition()); | 135 o.add(buildBatchReportDefinition()); |
| 136 return o; | 136 return o; |
| 137 } | 137 } |
| 138 | 138 |
| 139 checkUnnamed1181(core.List<api.BatchReportDefinition> o) { | 139 checkUnnamed183(core.List<api.BatchReportDefinition> o) { |
| 140 unittest.expect(o, unittest.hasLength(2)); | 140 unittest.expect(o, unittest.hasLength(2)); |
| 141 checkBatchReportDefinition(o[0]); | 141 checkBatchReportDefinition(o[0]); |
| 142 checkBatchReportDefinition(o[1]); | 142 checkBatchReportDefinition(o[1]); |
| 143 } | 143 } |
| 144 | 144 |
| 145 core.int buildCounterBatchReportDefinitionList = 0; | 145 core.int buildCounterBatchReportDefinitionList = 0; |
| 146 buildBatchReportDefinitionList() { | 146 buildBatchReportDefinitionList() { |
| 147 var o = new api.BatchReportDefinitionList(); | 147 var o = new api.BatchReportDefinitionList(); |
| 148 buildCounterBatchReportDefinitionList++; | 148 buildCounterBatchReportDefinitionList++; |
| 149 if (buildCounterBatchReportDefinitionList < 3) { | 149 if (buildCounterBatchReportDefinitionList < 3) { |
| 150 o.items = buildUnnamed1181(); | 150 o.items = buildUnnamed183(); |
| 151 o.kind = "foo"; | 151 o.kind = "foo"; |
| 152 } | 152 } |
| 153 buildCounterBatchReportDefinitionList--; | 153 buildCounterBatchReportDefinitionList--; |
| 154 return o; | 154 return o; |
| 155 } | 155 } |
| 156 | 156 |
| 157 checkBatchReportDefinitionList(api.BatchReportDefinitionList o) { | 157 checkBatchReportDefinitionList(api.BatchReportDefinitionList o) { |
| 158 buildCounterBatchReportDefinitionList++; | 158 buildCounterBatchReportDefinitionList++; |
| 159 if (buildCounterBatchReportDefinitionList < 3) { | 159 if (buildCounterBatchReportDefinitionList < 3) { |
| 160 checkUnnamed1181(o.items); | 160 checkUnnamed183(o.items); |
| 161 unittest.expect(o.kind, unittest.equals('foo')); | 161 unittest.expect(o.kind, unittest.equals('foo')); |
| 162 } | 162 } |
| 163 buildCounterBatchReportDefinitionList--; | 163 buildCounterBatchReportDefinitionList--; |
| 164 } | 164 } |
| 165 | 165 |
| 166 buildUnnamed1182() { | 166 buildUnnamed184() { |
| 167 var o = new core.List<api.BatchReport>(); | 167 var o = new core.List<api.BatchReport>(); |
| 168 o.add(buildBatchReport()); | 168 o.add(buildBatchReport()); |
| 169 o.add(buildBatchReport()); | 169 o.add(buildBatchReport()); |
| 170 return o; | 170 return o; |
| 171 } | 171 } |
| 172 | 172 |
| 173 checkUnnamed1182(core.List<api.BatchReport> o) { | 173 checkUnnamed184(core.List<api.BatchReport> o) { |
| 174 unittest.expect(o, unittest.hasLength(2)); | 174 unittest.expect(o, unittest.hasLength(2)); |
| 175 checkBatchReport(o[0]); | 175 checkBatchReport(o[0]); |
| 176 checkBatchReport(o[1]); | 176 checkBatchReport(o[1]); |
| 177 } | 177 } |
| 178 | 178 |
| 179 core.int buildCounterBatchReportList = 0; | 179 core.int buildCounterBatchReportList = 0; |
| 180 buildBatchReportList() { | 180 buildBatchReportList() { |
| 181 var o = new api.BatchReportList(); | 181 var o = new api.BatchReportList(); |
| 182 buildCounterBatchReportList++; | 182 buildCounterBatchReportList++; |
| 183 if (buildCounterBatchReportList < 3) { | 183 if (buildCounterBatchReportList < 3) { |
| 184 o.items = buildUnnamed1182(); | 184 o.items = buildUnnamed184(); |
| 185 o.kind = "foo"; | 185 o.kind = "foo"; |
| 186 } | 186 } |
| 187 buildCounterBatchReportList--; | 187 buildCounterBatchReportList--; |
| 188 return o; | 188 return o; |
| 189 } | 189 } |
| 190 | 190 |
| 191 checkBatchReportList(api.BatchReportList o) { | 191 checkBatchReportList(api.BatchReportList o) { |
| 192 buildCounterBatchReportList++; | 192 buildCounterBatchReportList++; |
| 193 if (buildCounterBatchReportList < 3) { | 193 if (buildCounterBatchReportList < 3) { |
| 194 checkUnnamed1182(o.items); | 194 checkUnnamed184(o.items); |
| 195 unittest.expect(o.kind, unittest.equals('foo')); | 195 unittest.expect(o.kind, unittest.equals('foo')); |
| 196 } | 196 } |
| 197 buildCounterBatchReportList--; | 197 buildCounterBatchReportList--; |
| 198 } | 198 } |
| 199 | 199 |
| 200 core.int buildCounterResultTableColumnHeaders = 0; | 200 core.int buildCounterResultTableColumnHeaders = 0; |
| 201 buildResultTableColumnHeaders() { | 201 buildResultTableColumnHeaders() { |
| 202 var o = new api.ResultTableColumnHeaders(); | 202 var o = new api.ResultTableColumnHeaders(); |
| 203 buildCounterResultTableColumnHeaders++; | 203 buildCounterResultTableColumnHeaders++; |
| 204 if (buildCounterResultTableColumnHeaders < 3) { | 204 if (buildCounterResultTableColumnHeaders < 3) { |
| 205 o.columnType = "foo"; | 205 o.columnType = "foo"; |
| 206 o.dataType = "foo"; | 206 o.dataType = "foo"; |
| 207 o.name = "foo"; | 207 o.name = "foo"; |
| 208 } | 208 } |
| 209 buildCounterResultTableColumnHeaders--; | 209 buildCounterResultTableColumnHeaders--; |
| 210 return o; | 210 return o; |
| 211 } | 211 } |
| 212 | 212 |
| 213 checkResultTableColumnHeaders(api.ResultTableColumnHeaders o) { | 213 checkResultTableColumnHeaders(api.ResultTableColumnHeaders o) { |
| 214 buildCounterResultTableColumnHeaders++; | 214 buildCounterResultTableColumnHeaders++; |
| 215 if (buildCounterResultTableColumnHeaders < 3) { | 215 if (buildCounterResultTableColumnHeaders < 3) { |
| 216 unittest.expect(o.columnType, unittest.equals('foo')); | 216 unittest.expect(o.columnType, unittest.equals('foo')); |
| 217 unittest.expect(o.dataType, unittest.equals('foo')); | 217 unittest.expect(o.dataType, unittest.equals('foo')); |
| 218 unittest.expect(o.name, unittest.equals('foo')); | 218 unittest.expect(o.name, unittest.equals('foo')); |
| 219 } | 219 } |
| 220 buildCounterResultTableColumnHeaders--; | 220 buildCounterResultTableColumnHeaders--; |
| 221 } | 221 } |
| 222 | 222 |
| 223 buildUnnamed1183() { | 223 buildUnnamed185() { |
| 224 var o = new core.List<api.ResultTableColumnHeaders>(); | 224 var o = new core.List<api.ResultTableColumnHeaders>(); |
| 225 o.add(buildResultTableColumnHeaders()); | 225 o.add(buildResultTableColumnHeaders()); |
| 226 o.add(buildResultTableColumnHeaders()); | 226 o.add(buildResultTableColumnHeaders()); |
| 227 return o; | 227 return o; |
| 228 } | 228 } |
| 229 | 229 |
| 230 checkUnnamed1183(core.List<api.ResultTableColumnHeaders> o) { | 230 checkUnnamed185(core.List<api.ResultTableColumnHeaders> o) { |
| 231 unittest.expect(o, unittest.hasLength(2)); | 231 unittest.expect(o, unittest.hasLength(2)); |
| 232 checkResultTableColumnHeaders(o[0]); | 232 checkResultTableColumnHeaders(o[0]); |
| 233 checkResultTableColumnHeaders(o[1]); | 233 checkResultTableColumnHeaders(o[1]); |
| 234 } | 234 } |
| 235 | 235 |
| 236 buildUnnamed1184() { | 236 buildUnnamed186() { |
| 237 var o = new core.List<core.Object>(); | 237 var o = new core.List<core.Object>(); |
| 238 o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}); | 238 o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}); |
| 239 o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}); | 239 o.add({'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}); |
| 240 return o; | 240 return o; |
| 241 } | 241 } |
| 242 | 242 |
| 243 checkUnnamed1184(core.List<core.Object> o) { | 243 checkUnnamed186(core.List<core.Object> o) { |
| 244 unittest.expect(o, unittest.hasLength(2)); | 244 unittest.expect(o, unittest.hasLength(2)); |
| 245 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')); | 245 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')); |
| 246 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')); | 246 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')); |
| 247 } | 247 } |
| 248 | 248 |
| 249 buildUnnamed1185() { | 249 buildUnnamed187() { |
| 250 var o = new core.List<core.List<core.Object>>(); | 250 var o = new core.List<core.List<core.Object>>(); |
| 251 o.add(buildUnnamed1184()); | 251 o.add(buildUnnamed186()); |
| 252 o.add(buildUnnamed1184()); | 252 o.add(buildUnnamed186()); |
| 253 return o; | 253 return o; |
| 254 } | 254 } |
| 255 | 255 |
| 256 checkUnnamed1185(core.List<core.List<core.Object>> o) { | 256 checkUnnamed187(core.List<core.List<core.Object>> o) { |
| 257 unittest.expect(o, unittest.hasLength(2)); | 257 unittest.expect(o, unittest.hasLength(2)); |
| 258 checkUnnamed1184(o[0]); | 258 checkUnnamed186(o[0]); |
| 259 checkUnnamed1184(o[1]); | 259 checkUnnamed186(o[1]); |
| 260 } | 260 } |
| 261 | 261 |
| 262 core.int buildCounterResultTable = 0; | 262 core.int buildCounterResultTable = 0; |
| 263 buildResultTable() { | 263 buildResultTable() { |
| 264 var o = new api.ResultTable(); | 264 var o = new api.ResultTable(); |
| 265 buildCounterResultTable++; | 265 buildCounterResultTable++; |
| 266 if (buildCounterResultTable < 3) { | 266 if (buildCounterResultTable < 3) { |
| 267 o.columnHeaders = buildUnnamed1183(); | 267 o.columnHeaders = buildUnnamed185(); |
| 268 o.kind = "foo"; | 268 o.kind = "foo"; |
| 269 o.rows = buildUnnamed1185(); | 269 o.rows = buildUnnamed187(); |
| 270 } | 270 } |
| 271 buildCounterResultTable--; | 271 buildCounterResultTable--; |
| 272 return o; | 272 return o; |
| 273 } | 273 } |
| 274 | 274 |
| 275 checkResultTable(api.ResultTable o) { | 275 checkResultTable(api.ResultTable o) { |
| 276 buildCounterResultTable++; | 276 buildCounterResultTable++; |
| 277 if (buildCounterResultTable < 3) { | 277 if (buildCounterResultTable < 3) { |
| 278 checkUnnamed1183(o.columnHeaders); | 278 checkUnnamed185(o.columnHeaders); |
| 279 unittest.expect(o.kind, unittest.equals('foo')); | 279 unittest.expect(o.kind, unittest.equals('foo')); |
| 280 checkUnnamed1185(o.rows); | 280 checkUnnamed187(o.rows); |
| 281 } | 281 } |
| 282 buildCounterResultTable--; | 282 buildCounterResultTable--; |
| 283 } | 283 } |
| 284 | 284 |
| 285 | 285 |
| 286 main() { | 286 main() { |
| 287 unittest.group("obj-schema-BatchReportOutputs", () { | 287 unittest.group("obj-schema-BatchReportOutputs", () { |
| 288 unittest.test("to-json--from-json", () { | 288 unittest.test("to-json--from-json", () { |
| 289 var o = buildBatchReportOutputs(); | 289 var o = buildBatchReportOutputs(); |
| 290 var od = new api.BatchReportOutputs.fromJson(o.toJson()); | 290 var od = new api.BatchReportOutputs.fromJson(o.toJson()); |
| (...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 522 res.query(arg_ids, arg_start_date, arg_end_date, arg_metrics, dimensions:
arg_dimensions, filters: arg_filters, max_results: arg_max_results, sort: arg_so
rt, start_index: arg_start_index).then(unittest.expectAsync(((api.ResultTable re
sponse) { | 522 res.query(arg_ids, arg_start_date, arg_end_date, arg_metrics, dimensions:
arg_dimensions, filters: arg_filters, max_results: arg_max_results, sort: arg_so
rt, start_index: arg_start_index).then(unittest.expectAsync(((api.ResultTable re
sponse) { |
| 523 checkResultTable(response); | 523 checkResultTable(response); |
| 524 }))); | 524 }))); |
| 525 }); | 525 }); |
| 526 | 526 |
| 527 }); | 527 }); |
| 528 | 528 |
| 529 | 529 |
| 530 } | 530 } |
| 531 | 531 |
| OLD | NEW |