| OLD | NEW |
| 1 library googleapis.adexchangeseller.v2_0.test; | 1 library googleapis.adexchangeseller.v2_0.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/adexchangeseller/v2_0.dart' as api; | 12 import 'package:googleapis/adexchangeseller/v2_0.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 } |
| 18 | 53 |
| 19 core.int buildCounterAccount = 0; | 54 core.int buildCounterAccount = 0; |
| 20 buildAccount() { | 55 buildAccount() { |
| 21 var o = new api.Account(); | 56 var o = new api.Account(); |
| 22 buildCounterAccount++; | 57 buildCounterAccount++; |
| 23 if (buildCounterAccount < 3) { | 58 if (buildCounterAccount < 3) { |
| 24 o.id = "foo"; | 59 o.id = "foo"; |
| 25 o.kind = "foo"; | 60 o.kind = "foo"; |
| 26 o.name = "foo"; | 61 o.name = "foo"; |
| 27 } | 62 } |
| 28 buildCounterAccount--; | 63 buildCounterAccount--; |
| 29 return o; | 64 return o; |
| 30 } | 65 } |
| 31 | 66 |
| 32 checkAccount(api.Account o) { | 67 checkAccount(api.Account o) { |
| 33 buildCounterAccount++; | 68 buildCounterAccount++; |
| 34 if (buildCounterAccount < 3) { | 69 if (buildCounterAccount < 3) { |
| 35 unittest.expect(o.id, unittest.equals('foo')); | 70 unittest.expect(o.id, unittest.equals('foo')); |
| 36 unittest.expect(o.kind, unittest.equals('foo')); | 71 unittest.expect(o.kind, unittest.equals('foo')); |
| 37 unittest.expect(o.name, unittest.equals('foo')); | 72 unittest.expect(o.name, unittest.equals('foo')); |
| 38 } | 73 } |
| 39 buildCounterAccount--; | 74 buildCounterAccount--; |
| 40 } | 75 } |
| 41 | 76 |
| 42 buildUnnamed1130() { | 77 buildUnnamed67() { |
| 43 var o = new core.List<api.Account>(); | 78 var o = new core.List<api.Account>(); |
| 44 o.add(buildAccount()); | 79 o.add(buildAccount()); |
| 45 o.add(buildAccount()); | 80 o.add(buildAccount()); |
| 46 return o; | 81 return o; |
| 47 } | 82 } |
| 48 | 83 |
| 49 checkUnnamed1130(core.List<api.Account> o) { | 84 checkUnnamed67(core.List<api.Account> o) { |
| 50 unittest.expect(o, unittest.hasLength(2)); | 85 unittest.expect(o, unittest.hasLength(2)); |
| 51 checkAccount(o[0]); | 86 checkAccount(o[0]); |
| 52 checkAccount(o[1]); | 87 checkAccount(o[1]); |
| 53 } | 88 } |
| 54 | 89 |
| 55 core.int buildCounterAccounts = 0; | 90 core.int buildCounterAccounts = 0; |
| 56 buildAccounts() { | 91 buildAccounts() { |
| 57 var o = new api.Accounts(); | 92 var o = new api.Accounts(); |
| 58 buildCounterAccounts++; | 93 buildCounterAccounts++; |
| 59 if (buildCounterAccounts < 3) { | 94 if (buildCounterAccounts < 3) { |
| 60 o.etag = "foo"; | 95 o.etag = "foo"; |
| 61 o.items = buildUnnamed1130(); | 96 o.items = buildUnnamed67(); |
| 62 o.kind = "foo"; | 97 o.kind = "foo"; |
| 63 o.nextPageToken = "foo"; | 98 o.nextPageToken = "foo"; |
| 64 } | 99 } |
| 65 buildCounterAccounts--; | 100 buildCounterAccounts--; |
| 66 return o; | 101 return o; |
| 67 } | 102 } |
| 68 | 103 |
| 69 checkAccounts(api.Accounts o) { | 104 checkAccounts(api.Accounts o) { |
| 70 buildCounterAccounts++; | 105 buildCounterAccounts++; |
| 71 if (buildCounterAccounts < 3) { | 106 if (buildCounterAccounts < 3) { |
| 72 unittest.expect(o.etag, unittest.equals('foo')); | 107 unittest.expect(o.etag, unittest.equals('foo')); |
| 73 checkUnnamed1130(o.items); | 108 checkUnnamed67(o.items); |
| 74 unittest.expect(o.kind, unittest.equals('foo')); | 109 unittest.expect(o.kind, unittest.equals('foo')); |
| 75 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 110 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 76 } | 111 } |
| 77 buildCounterAccounts--; | 112 buildCounterAccounts--; |
| 78 } | 113 } |
| 79 | 114 |
| 80 core.int buildCounterAdClient = 0; | 115 core.int buildCounterAdClient = 0; |
| 81 buildAdClient() { | 116 buildAdClient() { |
| 82 var o = new api.AdClient(); | 117 var o = new api.AdClient(); |
| 83 buildCounterAdClient++; | 118 buildCounterAdClient++; |
| (...skipping 13 matching lines...) Expand all Loading... |
| 97 if (buildCounterAdClient < 3) { | 132 if (buildCounterAdClient < 3) { |
| 98 unittest.expect(o.arcOptIn, unittest.isTrue); | 133 unittest.expect(o.arcOptIn, unittest.isTrue); |
| 99 unittest.expect(o.id, unittest.equals('foo')); | 134 unittest.expect(o.id, unittest.equals('foo')); |
| 100 unittest.expect(o.kind, unittest.equals('foo')); | 135 unittest.expect(o.kind, unittest.equals('foo')); |
| 101 unittest.expect(o.productCode, unittest.equals('foo')); | 136 unittest.expect(o.productCode, unittest.equals('foo')); |
| 102 unittest.expect(o.supportsReporting, unittest.isTrue); | 137 unittest.expect(o.supportsReporting, unittest.isTrue); |
| 103 } | 138 } |
| 104 buildCounterAdClient--; | 139 buildCounterAdClient--; |
| 105 } | 140 } |
| 106 | 141 |
| 107 buildUnnamed1131() { | 142 buildUnnamed68() { |
| 108 var o = new core.List<api.AdClient>(); | 143 var o = new core.List<api.AdClient>(); |
| 109 o.add(buildAdClient()); | 144 o.add(buildAdClient()); |
| 110 o.add(buildAdClient()); | 145 o.add(buildAdClient()); |
| 111 return o; | 146 return o; |
| 112 } | 147 } |
| 113 | 148 |
| 114 checkUnnamed1131(core.List<api.AdClient> o) { | 149 checkUnnamed68(core.List<api.AdClient> o) { |
| 115 unittest.expect(o, unittest.hasLength(2)); | 150 unittest.expect(o, unittest.hasLength(2)); |
| 116 checkAdClient(o[0]); | 151 checkAdClient(o[0]); |
| 117 checkAdClient(o[1]); | 152 checkAdClient(o[1]); |
| 118 } | 153 } |
| 119 | 154 |
| 120 core.int buildCounterAdClients = 0; | 155 core.int buildCounterAdClients = 0; |
| 121 buildAdClients() { | 156 buildAdClients() { |
| 122 var o = new api.AdClients(); | 157 var o = new api.AdClients(); |
| 123 buildCounterAdClients++; | 158 buildCounterAdClients++; |
| 124 if (buildCounterAdClients < 3) { | 159 if (buildCounterAdClients < 3) { |
| 125 o.etag = "foo"; | 160 o.etag = "foo"; |
| 126 o.items = buildUnnamed1131(); | 161 o.items = buildUnnamed68(); |
| 127 o.kind = "foo"; | 162 o.kind = "foo"; |
| 128 o.nextPageToken = "foo"; | 163 o.nextPageToken = "foo"; |
| 129 } | 164 } |
| 130 buildCounterAdClients--; | 165 buildCounterAdClients--; |
| 131 return o; | 166 return o; |
| 132 } | 167 } |
| 133 | 168 |
| 134 checkAdClients(api.AdClients o) { | 169 checkAdClients(api.AdClients o) { |
| 135 buildCounterAdClients++; | 170 buildCounterAdClients++; |
| 136 if (buildCounterAdClients < 3) { | 171 if (buildCounterAdClients < 3) { |
| 137 unittest.expect(o.etag, unittest.equals('foo')); | 172 unittest.expect(o.etag, unittest.equals('foo')); |
| 138 checkUnnamed1131(o.items); | 173 checkUnnamed68(o.items); |
| 139 unittest.expect(o.kind, unittest.equals('foo')); | 174 unittest.expect(o.kind, unittest.equals('foo')); |
| 140 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 175 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 141 } | 176 } |
| 142 buildCounterAdClients--; | 177 buildCounterAdClients--; |
| 143 } | 178 } |
| 144 | 179 |
| 145 core.int buildCounterAlert = 0; | 180 core.int buildCounterAlert = 0; |
| 146 buildAlert() { | 181 buildAlert() { |
| 147 var o = new api.Alert(); | 182 var o = new api.Alert(); |
| 148 buildCounterAlert++; | 183 buildCounterAlert++; |
| (...skipping 13 matching lines...) Expand all Loading... |
| 162 if (buildCounterAlert < 3) { | 197 if (buildCounterAlert < 3) { |
| 163 unittest.expect(o.id, unittest.equals('foo')); | 198 unittest.expect(o.id, unittest.equals('foo')); |
| 164 unittest.expect(o.kind, unittest.equals('foo')); | 199 unittest.expect(o.kind, unittest.equals('foo')); |
| 165 unittest.expect(o.message, unittest.equals('foo')); | 200 unittest.expect(o.message, unittest.equals('foo')); |
| 166 unittest.expect(o.severity, unittest.equals('foo')); | 201 unittest.expect(o.severity, unittest.equals('foo')); |
| 167 unittest.expect(o.type, unittest.equals('foo')); | 202 unittest.expect(o.type, unittest.equals('foo')); |
| 168 } | 203 } |
| 169 buildCounterAlert--; | 204 buildCounterAlert--; |
| 170 } | 205 } |
| 171 | 206 |
| 172 buildUnnamed1132() { | 207 buildUnnamed69() { |
| 173 var o = new core.List<api.Alert>(); | 208 var o = new core.List<api.Alert>(); |
| 174 o.add(buildAlert()); | 209 o.add(buildAlert()); |
| 175 o.add(buildAlert()); | 210 o.add(buildAlert()); |
| 176 return o; | 211 return o; |
| 177 } | 212 } |
| 178 | 213 |
| 179 checkUnnamed1132(core.List<api.Alert> o) { | 214 checkUnnamed69(core.List<api.Alert> o) { |
| 180 unittest.expect(o, unittest.hasLength(2)); | 215 unittest.expect(o, unittest.hasLength(2)); |
| 181 checkAlert(o[0]); | 216 checkAlert(o[0]); |
| 182 checkAlert(o[1]); | 217 checkAlert(o[1]); |
| 183 } | 218 } |
| 184 | 219 |
| 185 core.int buildCounterAlerts = 0; | 220 core.int buildCounterAlerts = 0; |
| 186 buildAlerts() { | 221 buildAlerts() { |
| 187 var o = new api.Alerts(); | 222 var o = new api.Alerts(); |
| 188 buildCounterAlerts++; | 223 buildCounterAlerts++; |
| 189 if (buildCounterAlerts < 3) { | 224 if (buildCounterAlerts < 3) { |
| 190 o.items = buildUnnamed1132(); | 225 o.items = buildUnnamed69(); |
| 191 o.kind = "foo"; | 226 o.kind = "foo"; |
| 192 } | 227 } |
| 193 buildCounterAlerts--; | 228 buildCounterAlerts--; |
| 194 return o; | 229 return o; |
| 195 } | 230 } |
| 196 | 231 |
| 197 checkAlerts(api.Alerts o) { | 232 checkAlerts(api.Alerts o) { |
| 198 buildCounterAlerts++; | 233 buildCounterAlerts++; |
| 199 if (buildCounterAlerts < 3) { | 234 if (buildCounterAlerts < 3) { |
| 200 checkUnnamed1132(o.items); | 235 checkUnnamed69(o.items); |
| 201 unittest.expect(o.kind, unittest.equals('foo')); | 236 unittest.expect(o.kind, unittest.equals('foo')); |
| 202 } | 237 } |
| 203 buildCounterAlerts--; | 238 buildCounterAlerts--; |
| 204 } | 239 } |
| 205 | 240 |
| 206 core.int buildCounterCustomChannelTargetingInfo = 0; | 241 core.int buildCounterCustomChannelTargetingInfo = 0; |
| 207 buildCustomChannelTargetingInfo() { | 242 buildCustomChannelTargetingInfo() { |
| 208 var o = new api.CustomChannelTargetingInfo(); | 243 var o = new api.CustomChannelTargetingInfo(); |
| 209 buildCounterCustomChannelTargetingInfo++; | 244 buildCounterCustomChannelTargetingInfo++; |
| 210 if (buildCounterCustomChannelTargetingInfo < 3) { | 245 if (buildCounterCustomChannelTargetingInfo < 3) { |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 248 if (buildCounterCustomChannel < 3) { | 283 if (buildCounterCustomChannel < 3) { |
| 249 unittest.expect(o.code, unittest.equals('foo')); | 284 unittest.expect(o.code, unittest.equals('foo')); |
| 250 unittest.expect(o.id, unittest.equals('foo')); | 285 unittest.expect(o.id, unittest.equals('foo')); |
| 251 unittest.expect(o.kind, unittest.equals('foo')); | 286 unittest.expect(o.kind, unittest.equals('foo')); |
| 252 unittest.expect(o.name, unittest.equals('foo')); | 287 unittest.expect(o.name, unittest.equals('foo')); |
| 253 checkCustomChannelTargetingInfo(o.targetingInfo); | 288 checkCustomChannelTargetingInfo(o.targetingInfo); |
| 254 } | 289 } |
| 255 buildCounterCustomChannel--; | 290 buildCounterCustomChannel--; |
| 256 } | 291 } |
| 257 | 292 |
| 258 buildUnnamed1133() { | 293 buildUnnamed70() { |
| 259 var o = new core.List<api.CustomChannel>(); | 294 var o = new core.List<api.CustomChannel>(); |
| 260 o.add(buildCustomChannel()); | 295 o.add(buildCustomChannel()); |
| 261 o.add(buildCustomChannel()); | 296 o.add(buildCustomChannel()); |
| 262 return o; | 297 return o; |
| 263 } | 298 } |
| 264 | 299 |
| 265 checkUnnamed1133(core.List<api.CustomChannel> o) { | 300 checkUnnamed70(core.List<api.CustomChannel> o) { |
| 266 unittest.expect(o, unittest.hasLength(2)); | 301 unittest.expect(o, unittest.hasLength(2)); |
| 267 checkCustomChannel(o[0]); | 302 checkCustomChannel(o[0]); |
| 268 checkCustomChannel(o[1]); | 303 checkCustomChannel(o[1]); |
| 269 } | 304 } |
| 270 | 305 |
| 271 core.int buildCounterCustomChannels = 0; | 306 core.int buildCounterCustomChannels = 0; |
| 272 buildCustomChannels() { | 307 buildCustomChannels() { |
| 273 var o = new api.CustomChannels(); | 308 var o = new api.CustomChannels(); |
| 274 buildCounterCustomChannels++; | 309 buildCounterCustomChannels++; |
| 275 if (buildCounterCustomChannels < 3) { | 310 if (buildCounterCustomChannels < 3) { |
| 276 o.etag = "foo"; | 311 o.etag = "foo"; |
| 277 o.items = buildUnnamed1133(); | 312 o.items = buildUnnamed70(); |
| 278 o.kind = "foo"; | 313 o.kind = "foo"; |
| 279 o.nextPageToken = "foo"; | 314 o.nextPageToken = "foo"; |
| 280 } | 315 } |
| 281 buildCounterCustomChannels--; | 316 buildCounterCustomChannels--; |
| 282 return o; | 317 return o; |
| 283 } | 318 } |
| 284 | 319 |
| 285 checkCustomChannels(api.CustomChannels o) { | 320 checkCustomChannels(api.CustomChannels o) { |
| 286 buildCounterCustomChannels++; | 321 buildCounterCustomChannels++; |
| 287 if (buildCounterCustomChannels < 3) { | 322 if (buildCounterCustomChannels < 3) { |
| 288 unittest.expect(o.etag, unittest.equals('foo')); | 323 unittest.expect(o.etag, unittest.equals('foo')); |
| 289 checkUnnamed1133(o.items); | 324 checkUnnamed70(o.items); |
| 290 unittest.expect(o.kind, unittest.equals('foo')); | 325 unittest.expect(o.kind, unittest.equals('foo')); |
| 291 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 326 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 292 } | 327 } |
| 293 buildCounterCustomChannels--; | 328 buildCounterCustomChannels--; |
| 294 } | 329 } |
| 295 | 330 |
| 296 buildUnnamed1134() { | 331 buildUnnamed71() { |
| 297 var o = new core.List<api.ReportingMetadataEntry>(); | 332 var o = new core.List<api.ReportingMetadataEntry>(); |
| 298 o.add(buildReportingMetadataEntry()); | 333 o.add(buildReportingMetadataEntry()); |
| 299 o.add(buildReportingMetadataEntry()); | 334 o.add(buildReportingMetadataEntry()); |
| 300 return o; | 335 return o; |
| 301 } | 336 } |
| 302 | 337 |
| 303 checkUnnamed1134(core.List<api.ReportingMetadataEntry> o) { | 338 checkUnnamed71(core.List<api.ReportingMetadataEntry> o) { |
| 304 unittest.expect(o, unittest.hasLength(2)); | 339 unittest.expect(o, unittest.hasLength(2)); |
| 305 checkReportingMetadataEntry(o[0]); | 340 checkReportingMetadataEntry(o[0]); |
| 306 checkReportingMetadataEntry(o[1]); | 341 checkReportingMetadataEntry(o[1]); |
| 307 } | 342 } |
| 308 | 343 |
| 309 core.int buildCounterMetadata = 0; | 344 core.int buildCounterMetadata = 0; |
| 310 buildMetadata() { | 345 buildMetadata() { |
| 311 var o = new api.Metadata(); | 346 var o = new api.Metadata(); |
| 312 buildCounterMetadata++; | 347 buildCounterMetadata++; |
| 313 if (buildCounterMetadata < 3) { | 348 if (buildCounterMetadata < 3) { |
| 314 o.items = buildUnnamed1134(); | 349 o.items = buildUnnamed71(); |
| 315 o.kind = "foo"; | 350 o.kind = "foo"; |
| 316 } | 351 } |
| 317 buildCounterMetadata--; | 352 buildCounterMetadata--; |
| 318 return o; | 353 return o; |
| 319 } | 354 } |
| 320 | 355 |
| 321 checkMetadata(api.Metadata o) { | 356 checkMetadata(api.Metadata o) { |
| 322 buildCounterMetadata++; | 357 buildCounterMetadata++; |
| 323 if (buildCounterMetadata < 3) { | 358 if (buildCounterMetadata < 3) { |
| 324 checkUnnamed1134(o.items); | 359 checkUnnamed71(o.items); |
| 325 unittest.expect(o.kind, unittest.equals('foo')); | 360 unittest.expect(o.kind, unittest.equals('foo')); |
| 326 } | 361 } |
| 327 buildCounterMetadata--; | 362 buildCounterMetadata--; |
| 328 } | 363 } |
| 329 | 364 |
| 330 core.int buildCounterPreferredDeal = 0; | 365 core.int buildCounterPreferredDeal = 0; |
| 331 buildPreferredDeal() { | 366 buildPreferredDeal() { |
| 332 var o = new api.PreferredDeal(); | 367 var o = new api.PreferredDeal(); |
| 333 buildCounterPreferredDeal++; | 368 buildCounterPreferredDeal++; |
| 334 if (buildCounterPreferredDeal < 3) { | 369 if (buildCounterPreferredDeal < 3) { |
| (...skipping 18 matching lines...) Expand all Loading... |
| 353 unittest.expect(o.currencyCode, unittest.equals('foo')); | 388 unittest.expect(o.currencyCode, unittest.equals('foo')); |
| 354 unittest.expect(o.endTime, unittest.equals('foo')); | 389 unittest.expect(o.endTime, unittest.equals('foo')); |
| 355 unittest.expect(o.fixedCpm, unittest.equals('foo')); | 390 unittest.expect(o.fixedCpm, unittest.equals('foo')); |
| 356 unittest.expect(o.id, unittest.equals('foo')); | 391 unittest.expect(o.id, unittest.equals('foo')); |
| 357 unittest.expect(o.kind, unittest.equals('foo')); | 392 unittest.expect(o.kind, unittest.equals('foo')); |
| 358 unittest.expect(o.startTime, unittest.equals('foo')); | 393 unittest.expect(o.startTime, unittest.equals('foo')); |
| 359 } | 394 } |
| 360 buildCounterPreferredDeal--; | 395 buildCounterPreferredDeal--; |
| 361 } | 396 } |
| 362 | 397 |
| 363 buildUnnamed1135() { | 398 buildUnnamed72() { |
| 364 var o = new core.List<api.PreferredDeal>(); | 399 var o = new core.List<api.PreferredDeal>(); |
| 365 o.add(buildPreferredDeal()); | 400 o.add(buildPreferredDeal()); |
| 366 o.add(buildPreferredDeal()); | 401 o.add(buildPreferredDeal()); |
| 367 return o; | 402 return o; |
| 368 } | 403 } |
| 369 | 404 |
| 370 checkUnnamed1135(core.List<api.PreferredDeal> o) { | 405 checkUnnamed72(core.List<api.PreferredDeal> o) { |
| 371 unittest.expect(o, unittest.hasLength(2)); | 406 unittest.expect(o, unittest.hasLength(2)); |
| 372 checkPreferredDeal(o[0]); | 407 checkPreferredDeal(o[0]); |
| 373 checkPreferredDeal(o[1]); | 408 checkPreferredDeal(o[1]); |
| 374 } | 409 } |
| 375 | 410 |
| 376 core.int buildCounterPreferredDeals = 0; | 411 core.int buildCounterPreferredDeals = 0; |
| 377 buildPreferredDeals() { | 412 buildPreferredDeals() { |
| 378 var o = new api.PreferredDeals(); | 413 var o = new api.PreferredDeals(); |
| 379 buildCounterPreferredDeals++; | 414 buildCounterPreferredDeals++; |
| 380 if (buildCounterPreferredDeals < 3) { | 415 if (buildCounterPreferredDeals < 3) { |
| 381 o.items = buildUnnamed1135(); | 416 o.items = buildUnnamed72(); |
| 382 o.kind = "foo"; | 417 o.kind = "foo"; |
| 383 } | 418 } |
| 384 buildCounterPreferredDeals--; | 419 buildCounterPreferredDeals--; |
| 385 return o; | 420 return o; |
| 386 } | 421 } |
| 387 | 422 |
| 388 checkPreferredDeals(api.PreferredDeals o) { | 423 checkPreferredDeals(api.PreferredDeals o) { |
| 389 buildCounterPreferredDeals++; | 424 buildCounterPreferredDeals++; |
| 390 if (buildCounterPreferredDeals < 3) { | 425 if (buildCounterPreferredDeals < 3) { |
| 391 checkUnnamed1135(o.items); | 426 checkUnnamed72(o.items); |
| 392 unittest.expect(o.kind, unittest.equals('foo')); | 427 unittest.expect(o.kind, unittest.equals('foo')); |
| 393 } | 428 } |
| 394 buildCounterPreferredDeals--; | 429 buildCounterPreferredDeals--; |
| 395 } | 430 } |
| 396 | 431 |
| 397 buildUnnamed1136() { | 432 buildUnnamed73() { |
| 398 var o = new core.List<core.String>(); | 433 var o = new core.List<core.String>(); |
| 399 o.add("foo"); | 434 o.add("foo"); |
| 400 o.add("foo"); | 435 o.add("foo"); |
| 401 return o; | 436 return o; |
| 402 } | 437 } |
| 403 | 438 |
| 404 checkUnnamed1136(core.List<core.String> o) { | 439 checkUnnamed73(core.List<core.String> o) { |
| 405 unittest.expect(o, unittest.hasLength(2)); | 440 unittest.expect(o, unittest.hasLength(2)); |
| 406 unittest.expect(o[0], unittest.equals('foo')); | 441 unittest.expect(o[0], unittest.equals('foo')); |
| 407 unittest.expect(o[1], unittest.equals('foo')); | 442 unittest.expect(o[1], unittest.equals('foo')); |
| 408 } | 443 } |
| 409 | 444 |
| 410 core.int buildCounterReportHeaders = 0; | 445 core.int buildCounterReportHeaders = 0; |
| 411 buildReportHeaders() { | 446 buildReportHeaders() { |
| 412 var o = new api.ReportHeaders(); | 447 var o = new api.ReportHeaders(); |
| 413 buildCounterReportHeaders++; | 448 buildCounterReportHeaders++; |
| 414 if (buildCounterReportHeaders < 3) { | 449 if (buildCounterReportHeaders < 3) { |
| 415 o.currency = "foo"; | 450 o.currency = "foo"; |
| 416 o.name = "foo"; | 451 o.name = "foo"; |
| 417 o.type = "foo"; | 452 o.type = "foo"; |
| 418 } | 453 } |
| 419 buildCounterReportHeaders--; | 454 buildCounterReportHeaders--; |
| 420 return o; | 455 return o; |
| 421 } | 456 } |
| 422 | 457 |
| 423 checkReportHeaders(api.ReportHeaders o) { | 458 checkReportHeaders(api.ReportHeaders o) { |
| 424 buildCounterReportHeaders++; | 459 buildCounterReportHeaders++; |
| 425 if (buildCounterReportHeaders < 3) { | 460 if (buildCounterReportHeaders < 3) { |
| 426 unittest.expect(o.currency, unittest.equals('foo')); | 461 unittest.expect(o.currency, unittest.equals('foo')); |
| 427 unittest.expect(o.name, unittest.equals('foo')); | 462 unittest.expect(o.name, unittest.equals('foo')); |
| 428 unittest.expect(o.type, unittest.equals('foo')); | 463 unittest.expect(o.type, unittest.equals('foo')); |
| 429 } | 464 } |
| 430 buildCounterReportHeaders--; | 465 buildCounterReportHeaders--; |
| 431 } | 466 } |
| 432 | 467 |
| 433 buildUnnamed1137() { | 468 buildUnnamed74() { |
| 434 var o = new core.List<api.ReportHeaders>(); | 469 var o = new core.List<api.ReportHeaders>(); |
| 435 o.add(buildReportHeaders()); | 470 o.add(buildReportHeaders()); |
| 436 o.add(buildReportHeaders()); | 471 o.add(buildReportHeaders()); |
| 437 return o; | 472 return o; |
| 438 } | 473 } |
| 439 | 474 |
| 440 checkUnnamed1137(core.List<api.ReportHeaders> o) { | 475 checkUnnamed74(core.List<api.ReportHeaders> o) { |
| 441 unittest.expect(o, unittest.hasLength(2)); | 476 unittest.expect(o, unittest.hasLength(2)); |
| 442 checkReportHeaders(o[0]); | 477 checkReportHeaders(o[0]); |
| 443 checkReportHeaders(o[1]); | 478 checkReportHeaders(o[1]); |
| 444 } | 479 } |
| 445 | 480 |
| 446 buildUnnamed1138() { | 481 buildUnnamed75() { |
| 447 var o = new core.List<core.String>(); | 482 var o = new core.List<core.String>(); |
| 448 o.add("foo"); | 483 o.add("foo"); |
| 449 o.add("foo"); | 484 o.add("foo"); |
| 450 return o; | 485 return o; |
| 451 } | 486 } |
| 452 | 487 |
| 453 checkUnnamed1138(core.List<core.String> o) { | 488 checkUnnamed75(core.List<core.String> o) { |
| 454 unittest.expect(o, unittest.hasLength(2)); | 489 unittest.expect(o, unittest.hasLength(2)); |
| 455 unittest.expect(o[0], unittest.equals('foo')); | 490 unittest.expect(o[0], unittest.equals('foo')); |
| 456 unittest.expect(o[1], unittest.equals('foo')); | 491 unittest.expect(o[1], unittest.equals('foo')); |
| 457 } | 492 } |
| 458 | 493 |
| 459 buildUnnamed1139() { | 494 buildUnnamed76() { |
| 460 var o = new core.List<core.List<core.String>>(); | 495 var o = new core.List<core.List<core.String>>(); |
| 461 o.add(buildUnnamed1138()); | 496 o.add(buildUnnamed75()); |
| 462 o.add(buildUnnamed1138()); | 497 o.add(buildUnnamed75()); |
| 463 return o; | 498 return o; |
| 464 } | 499 } |
| 465 | 500 |
| 466 checkUnnamed1139(core.List<core.List<core.String>> o) { | 501 checkUnnamed76(core.List<core.List<core.String>> o) { |
| 467 unittest.expect(o, unittest.hasLength(2)); | 502 unittest.expect(o, unittest.hasLength(2)); |
| 468 checkUnnamed1138(o[0]); | 503 checkUnnamed75(o[0]); |
| 469 checkUnnamed1138(o[1]); | 504 checkUnnamed75(o[1]); |
| 470 } | 505 } |
| 471 | 506 |
| 472 buildUnnamed1140() { | 507 buildUnnamed77() { |
| 473 var o = new core.List<core.String>(); | 508 var o = new core.List<core.String>(); |
| 474 o.add("foo"); | 509 o.add("foo"); |
| 475 o.add("foo"); | 510 o.add("foo"); |
| 476 return o; | 511 return o; |
| 477 } | 512 } |
| 478 | 513 |
| 479 checkUnnamed1140(core.List<core.String> o) { | 514 checkUnnamed77(core.List<core.String> o) { |
| 480 unittest.expect(o, unittest.hasLength(2)); | 515 unittest.expect(o, unittest.hasLength(2)); |
| 481 unittest.expect(o[0], unittest.equals('foo')); | 516 unittest.expect(o[0], unittest.equals('foo')); |
| 482 unittest.expect(o[1], unittest.equals('foo')); | 517 unittest.expect(o[1], unittest.equals('foo')); |
| 483 } | 518 } |
| 484 | 519 |
| 485 buildUnnamed1141() { | 520 buildUnnamed78() { |
| 486 var o = new core.List<core.String>(); | 521 var o = new core.List<core.String>(); |
| 487 o.add("foo"); | 522 o.add("foo"); |
| 488 o.add("foo"); | 523 o.add("foo"); |
| 489 return o; | 524 return o; |
| 490 } | 525 } |
| 491 | 526 |
| 492 checkUnnamed1141(core.List<core.String> o) { | 527 checkUnnamed78(core.List<core.String> o) { |
| 493 unittest.expect(o, unittest.hasLength(2)); | 528 unittest.expect(o, unittest.hasLength(2)); |
| 494 unittest.expect(o[0], unittest.equals('foo')); | 529 unittest.expect(o[0], unittest.equals('foo')); |
| 495 unittest.expect(o[1], unittest.equals('foo')); | 530 unittest.expect(o[1], unittest.equals('foo')); |
| 496 } | 531 } |
| 497 | 532 |
| 498 core.int buildCounterReport = 0; | 533 core.int buildCounterReport = 0; |
| 499 buildReport() { | 534 buildReport() { |
| 500 var o = new api.Report(); | 535 var o = new api.Report(); |
| 501 buildCounterReport++; | 536 buildCounterReport++; |
| 502 if (buildCounterReport < 3) { | 537 if (buildCounterReport < 3) { |
| 503 o.averages = buildUnnamed1136(); | 538 o.averages = buildUnnamed73(); |
| 504 o.headers = buildUnnamed1137(); | 539 o.headers = buildUnnamed74(); |
| 505 o.kind = "foo"; | 540 o.kind = "foo"; |
| 506 o.rows = buildUnnamed1139(); | 541 o.rows = buildUnnamed76(); |
| 507 o.totalMatchedRows = "foo"; | 542 o.totalMatchedRows = "foo"; |
| 508 o.totals = buildUnnamed1140(); | 543 o.totals = buildUnnamed77(); |
| 509 o.warnings = buildUnnamed1141(); | 544 o.warnings = buildUnnamed78(); |
| 510 } | 545 } |
| 511 buildCounterReport--; | 546 buildCounterReport--; |
| 512 return o; | 547 return o; |
| 513 } | 548 } |
| 514 | 549 |
| 515 checkReport(api.Report o) { | 550 checkReport(api.Report o) { |
| 516 buildCounterReport++; | 551 buildCounterReport++; |
| 517 if (buildCounterReport < 3) { | 552 if (buildCounterReport < 3) { |
| 518 checkUnnamed1136(o.averages); | 553 checkUnnamed73(o.averages); |
| 519 checkUnnamed1137(o.headers); | 554 checkUnnamed74(o.headers); |
| 520 unittest.expect(o.kind, unittest.equals('foo')); | 555 unittest.expect(o.kind, unittest.equals('foo')); |
| 521 checkUnnamed1139(o.rows); | 556 checkUnnamed76(o.rows); |
| 522 unittest.expect(o.totalMatchedRows, unittest.equals('foo')); | 557 unittest.expect(o.totalMatchedRows, unittest.equals('foo')); |
| 523 checkUnnamed1140(o.totals); | 558 checkUnnamed77(o.totals); |
| 524 checkUnnamed1141(o.warnings); | 559 checkUnnamed78(o.warnings); |
| 525 } | 560 } |
| 526 buildCounterReport--; | 561 buildCounterReport--; |
| 527 } | 562 } |
| 528 | 563 |
| 529 buildUnnamed1142() { | 564 buildUnnamed79() { |
| 530 var o = new core.List<core.String>(); | 565 var o = new core.List<core.String>(); |
| 531 o.add("foo"); | 566 o.add("foo"); |
| 532 o.add("foo"); | 567 o.add("foo"); |
| 533 return o; | 568 return o; |
| 534 } | 569 } |
| 535 | 570 |
| 536 checkUnnamed1142(core.List<core.String> o) { | 571 checkUnnamed79(core.List<core.String> o) { |
| 537 unittest.expect(o, unittest.hasLength(2)); | 572 unittest.expect(o, unittest.hasLength(2)); |
| 538 unittest.expect(o[0], unittest.equals('foo')); | 573 unittest.expect(o[0], unittest.equals('foo')); |
| 539 unittest.expect(o[1], unittest.equals('foo')); | 574 unittest.expect(o[1], unittest.equals('foo')); |
| 540 } | 575 } |
| 541 | 576 |
| 542 buildUnnamed1143() { | 577 buildUnnamed80() { |
| 543 var o = new core.List<core.String>(); | 578 var o = new core.List<core.String>(); |
| 544 o.add("foo"); | 579 o.add("foo"); |
| 545 o.add("foo"); | 580 o.add("foo"); |
| 546 return o; | 581 return o; |
| 547 } | 582 } |
| 548 | 583 |
| 549 checkUnnamed1143(core.List<core.String> o) { | 584 checkUnnamed80(core.List<core.String> o) { |
| 550 unittest.expect(o, unittest.hasLength(2)); | 585 unittest.expect(o, unittest.hasLength(2)); |
| 551 unittest.expect(o[0], unittest.equals('foo')); | 586 unittest.expect(o[0], unittest.equals('foo')); |
| 552 unittest.expect(o[1], unittest.equals('foo')); | 587 unittest.expect(o[1], unittest.equals('foo')); |
| 553 } | 588 } |
| 554 | 589 |
| 555 buildUnnamed1144() { | 590 buildUnnamed81() { |
| 556 var o = new core.List<core.String>(); | 591 var o = new core.List<core.String>(); |
| 557 o.add("foo"); | 592 o.add("foo"); |
| 558 o.add("foo"); | 593 o.add("foo"); |
| 559 return o; | 594 return o; |
| 560 } | 595 } |
| 561 | 596 |
| 562 checkUnnamed1144(core.List<core.String> o) { | 597 checkUnnamed81(core.List<core.String> o) { |
| 563 unittest.expect(o, unittest.hasLength(2)); | 598 unittest.expect(o, unittest.hasLength(2)); |
| 564 unittest.expect(o[0], unittest.equals('foo')); | 599 unittest.expect(o[0], unittest.equals('foo')); |
| 565 unittest.expect(o[1], unittest.equals('foo')); | 600 unittest.expect(o[1], unittest.equals('foo')); |
| 566 } | 601 } |
| 567 | 602 |
| 568 buildUnnamed1145() { | 603 buildUnnamed82() { |
| 569 var o = new core.List<core.String>(); | 604 var o = new core.List<core.String>(); |
| 570 o.add("foo"); | 605 o.add("foo"); |
| 571 o.add("foo"); | 606 o.add("foo"); |
| 572 return o; | 607 return o; |
| 573 } | 608 } |
| 574 | 609 |
| 575 checkUnnamed1145(core.List<core.String> o) { | 610 checkUnnamed82(core.List<core.String> o) { |
| 576 unittest.expect(o, unittest.hasLength(2)); | 611 unittest.expect(o, unittest.hasLength(2)); |
| 577 unittest.expect(o[0], unittest.equals('foo')); | 612 unittest.expect(o[0], unittest.equals('foo')); |
| 578 unittest.expect(o[1], unittest.equals('foo')); | 613 unittest.expect(o[1], unittest.equals('foo')); |
| 579 } | 614 } |
| 580 | 615 |
| 581 buildUnnamed1146() { | 616 buildUnnamed83() { |
| 582 var o = new core.List<core.String>(); | 617 var o = new core.List<core.String>(); |
| 583 o.add("foo"); | 618 o.add("foo"); |
| 584 o.add("foo"); | 619 o.add("foo"); |
| 585 return o; | 620 return o; |
| 586 } | 621 } |
| 587 | 622 |
| 588 checkUnnamed1146(core.List<core.String> o) { | 623 checkUnnamed83(core.List<core.String> o) { |
| 589 unittest.expect(o, unittest.hasLength(2)); | 624 unittest.expect(o, unittest.hasLength(2)); |
| 590 unittest.expect(o[0], unittest.equals('foo')); | 625 unittest.expect(o[0], unittest.equals('foo')); |
| 591 unittest.expect(o[1], unittest.equals('foo')); | 626 unittest.expect(o[1], unittest.equals('foo')); |
| 592 } | 627 } |
| 593 | 628 |
| 594 core.int buildCounterReportingMetadataEntry = 0; | 629 core.int buildCounterReportingMetadataEntry = 0; |
| 595 buildReportingMetadataEntry() { | 630 buildReportingMetadataEntry() { |
| 596 var o = new api.ReportingMetadataEntry(); | 631 var o = new api.ReportingMetadataEntry(); |
| 597 buildCounterReportingMetadataEntry++; | 632 buildCounterReportingMetadataEntry++; |
| 598 if (buildCounterReportingMetadataEntry < 3) { | 633 if (buildCounterReportingMetadataEntry < 3) { |
| 599 o.compatibleDimensions = buildUnnamed1142(); | 634 o.compatibleDimensions = buildUnnamed79(); |
| 600 o.compatibleMetrics = buildUnnamed1143(); | 635 o.compatibleMetrics = buildUnnamed80(); |
| 601 o.id = "foo"; | 636 o.id = "foo"; |
| 602 o.kind = "foo"; | 637 o.kind = "foo"; |
| 603 o.requiredDimensions = buildUnnamed1144(); | 638 o.requiredDimensions = buildUnnamed81(); |
| 604 o.requiredMetrics = buildUnnamed1145(); | 639 o.requiredMetrics = buildUnnamed82(); |
| 605 o.supportedProducts = buildUnnamed1146(); | 640 o.supportedProducts = buildUnnamed83(); |
| 606 } | 641 } |
| 607 buildCounterReportingMetadataEntry--; | 642 buildCounterReportingMetadataEntry--; |
| 608 return o; | 643 return o; |
| 609 } | 644 } |
| 610 | 645 |
| 611 checkReportingMetadataEntry(api.ReportingMetadataEntry o) { | 646 checkReportingMetadataEntry(api.ReportingMetadataEntry o) { |
| 612 buildCounterReportingMetadataEntry++; | 647 buildCounterReportingMetadataEntry++; |
| 613 if (buildCounterReportingMetadataEntry < 3) { | 648 if (buildCounterReportingMetadataEntry < 3) { |
| 614 checkUnnamed1142(o.compatibleDimensions); | 649 checkUnnamed79(o.compatibleDimensions); |
| 615 checkUnnamed1143(o.compatibleMetrics); | 650 checkUnnamed80(o.compatibleMetrics); |
| 616 unittest.expect(o.id, unittest.equals('foo')); | 651 unittest.expect(o.id, unittest.equals('foo')); |
| 617 unittest.expect(o.kind, unittest.equals('foo')); | 652 unittest.expect(o.kind, unittest.equals('foo')); |
| 618 checkUnnamed1144(o.requiredDimensions); | 653 checkUnnamed81(o.requiredDimensions); |
| 619 checkUnnamed1145(o.requiredMetrics); | 654 checkUnnamed82(o.requiredMetrics); |
| 620 checkUnnamed1146(o.supportedProducts); | 655 checkUnnamed83(o.supportedProducts); |
| 621 } | 656 } |
| 622 buildCounterReportingMetadataEntry--; | 657 buildCounterReportingMetadataEntry--; |
| 623 } | 658 } |
| 624 | 659 |
| 625 core.int buildCounterSavedReport = 0; | 660 core.int buildCounterSavedReport = 0; |
| 626 buildSavedReport() { | 661 buildSavedReport() { |
| 627 var o = new api.SavedReport(); | 662 var o = new api.SavedReport(); |
| 628 buildCounterSavedReport++; | 663 buildCounterSavedReport++; |
| 629 if (buildCounterSavedReport < 3) { | 664 if (buildCounterSavedReport < 3) { |
| 630 o.id = "foo"; | 665 o.id = "foo"; |
| 631 o.kind = "foo"; | 666 o.kind = "foo"; |
| 632 o.name = "foo"; | 667 o.name = "foo"; |
| 633 } | 668 } |
| 634 buildCounterSavedReport--; | 669 buildCounterSavedReport--; |
| 635 return o; | 670 return o; |
| 636 } | 671 } |
| 637 | 672 |
| 638 checkSavedReport(api.SavedReport o) { | 673 checkSavedReport(api.SavedReport o) { |
| 639 buildCounterSavedReport++; | 674 buildCounterSavedReport++; |
| 640 if (buildCounterSavedReport < 3) { | 675 if (buildCounterSavedReport < 3) { |
| 641 unittest.expect(o.id, unittest.equals('foo')); | 676 unittest.expect(o.id, unittest.equals('foo')); |
| 642 unittest.expect(o.kind, unittest.equals('foo')); | 677 unittest.expect(o.kind, unittest.equals('foo')); |
| 643 unittest.expect(o.name, unittest.equals('foo')); | 678 unittest.expect(o.name, unittest.equals('foo')); |
| 644 } | 679 } |
| 645 buildCounterSavedReport--; | 680 buildCounterSavedReport--; |
| 646 } | 681 } |
| 647 | 682 |
| 648 buildUnnamed1147() { | 683 buildUnnamed84() { |
| 649 var o = new core.List<api.SavedReport>(); | 684 var o = new core.List<api.SavedReport>(); |
| 650 o.add(buildSavedReport()); | 685 o.add(buildSavedReport()); |
| 651 o.add(buildSavedReport()); | 686 o.add(buildSavedReport()); |
| 652 return o; | 687 return o; |
| 653 } | 688 } |
| 654 | 689 |
| 655 checkUnnamed1147(core.List<api.SavedReport> o) { | 690 checkUnnamed84(core.List<api.SavedReport> o) { |
| 656 unittest.expect(o, unittest.hasLength(2)); | 691 unittest.expect(o, unittest.hasLength(2)); |
| 657 checkSavedReport(o[0]); | 692 checkSavedReport(o[0]); |
| 658 checkSavedReport(o[1]); | 693 checkSavedReport(o[1]); |
| 659 } | 694 } |
| 660 | 695 |
| 661 core.int buildCounterSavedReports = 0; | 696 core.int buildCounterSavedReports = 0; |
| 662 buildSavedReports() { | 697 buildSavedReports() { |
| 663 var o = new api.SavedReports(); | 698 var o = new api.SavedReports(); |
| 664 buildCounterSavedReports++; | 699 buildCounterSavedReports++; |
| 665 if (buildCounterSavedReports < 3) { | 700 if (buildCounterSavedReports < 3) { |
| 666 o.etag = "foo"; | 701 o.etag = "foo"; |
| 667 o.items = buildUnnamed1147(); | 702 o.items = buildUnnamed84(); |
| 668 o.kind = "foo"; | 703 o.kind = "foo"; |
| 669 o.nextPageToken = "foo"; | 704 o.nextPageToken = "foo"; |
| 670 } | 705 } |
| 671 buildCounterSavedReports--; | 706 buildCounterSavedReports--; |
| 672 return o; | 707 return o; |
| 673 } | 708 } |
| 674 | 709 |
| 675 checkSavedReports(api.SavedReports o) { | 710 checkSavedReports(api.SavedReports o) { |
| 676 buildCounterSavedReports++; | 711 buildCounterSavedReports++; |
| 677 if (buildCounterSavedReports < 3) { | 712 if (buildCounterSavedReports < 3) { |
| 678 unittest.expect(o.etag, unittest.equals('foo')); | 713 unittest.expect(o.etag, unittest.equals('foo')); |
| 679 checkUnnamed1147(o.items); | 714 checkUnnamed84(o.items); |
| 680 unittest.expect(o.kind, unittest.equals('foo')); | 715 unittest.expect(o.kind, unittest.equals('foo')); |
| 681 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 716 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 682 } | 717 } |
| 683 buildCounterSavedReports--; | 718 buildCounterSavedReports--; |
| 684 } | 719 } |
| 685 | 720 |
| 686 core.int buildCounterUrlChannel = 0; | 721 core.int buildCounterUrlChannel = 0; |
| 687 buildUrlChannel() { | 722 buildUrlChannel() { |
| 688 var o = new api.UrlChannel(); | 723 var o = new api.UrlChannel(); |
| 689 buildCounterUrlChannel++; | 724 buildCounterUrlChannel++; |
| 690 if (buildCounterUrlChannel < 3) { | 725 if (buildCounterUrlChannel < 3) { |
| 691 o.id = "foo"; | 726 o.id = "foo"; |
| 692 o.kind = "foo"; | 727 o.kind = "foo"; |
| 693 o.urlPattern = "foo"; | 728 o.urlPattern = "foo"; |
| 694 } | 729 } |
| 695 buildCounterUrlChannel--; | 730 buildCounterUrlChannel--; |
| 696 return o; | 731 return o; |
| 697 } | 732 } |
| 698 | 733 |
| 699 checkUrlChannel(api.UrlChannel o) { | 734 checkUrlChannel(api.UrlChannel o) { |
| 700 buildCounterUrlChannel++; | 735 buildCounterUrlChannel++; |
| 701 if (buildCounterUrlChannel < 3) { | 736 if (buildCounterUrlChannel < 3) { |
| 702 unittest.expect(o.id, unittest.equals('foo')); | 737 unittest.expect(o.id, unittest.equals('foo')); |
| 703 unittest.expect(o.kind, unittest.equals('foo')); | 738 unittest.expect(o.kind, unittest.equals('foo')); |
| 704 unittest.expect(o.urlPattern, unittest.equals('foo')); | 739 unittest.expect(o.urlPattern, unittest.equals('foo')); |
| 705 } | 740 } |
| 706 buildCounterUrlChannel--; | 741 buildCounterUrlChannel--; |
| 707 } | 742 } |
| 708 | 743 |
| 709 buildUnnamed1148() { | 744 buildUnnamed85() { |
| 710 var o = new core.List<api.UrlChannel>(); | 745 var o = new core.List<api.UrlChannel>(); |
| 711 o.add(buildUrlChannel()); | 746 o.add(buildUrlChannel()); |
| 712 o.add(buildUrlChannel()); | 747 o.add(buildUrlChannel()); |
| 713 return o; | 748 return o; |
| 714 } | 749 } |
| 715 | 750 |
| 716 checkUnnamed1148(core.List<api.UrlChannel> o) { | 751 checkUnnamed85(core.List<api.UrlChannel> o) { |
| 717 unittest.expect(o, unittest.hasLength(2)); | 752 unittest.expect(o, unittest.hasLength(2)); |
| 718 checkUrlChannel(o[0]); | 753 checkUrlChannel(o[0]); |
| 719 checkUrlChannel(o[1]); | 754 checkUrlChannel(o[1]); |
| 720 } | 755 } |
| 721 | 756 |
| 722 core.int buildCounterUrlChannels = 0; | 757 core.int buildCounterUrlChannels = 0; |
| 723 buildUrlChannels() { | 758 buildUrlChannels() { |
| 724 var o = new api.UrlChannels(); | 759 var o = new api.UrlChannels(); |
| 725 buildCounterUrlChannels++; | 760 buildCounterUrlChannels++; |
| 726 if (buildCounterUrlChannels < 3) { | 761 if (buildCounterUrlChannels < 3) { |
| 727 o.etag = "foo"; | 762 o.etag = "foo"; |
| 728 o.items = buildUnnamed1148(); | 763 o.items = buildUnnamed85(); |
| 729 o.kind = "foo"; | 764 o.kind = "foo"; |
| 730 o.nextPageToken = "foo"; | 765 o.nextPageToken = "foo"; |
| 731 } | 766 } |
| 732 buildCounterUrlChannels--; | 767 buildCounterUrlChannels--; |
| 733 return o; | 768 return o; |
| 734 } | 769 } |
| 735 | 770 |
| 736 checkUrlChannels(api.UrlChannels o) { | 771 checkUrlChannels(api.UrlChannels o) { |
| 737 buildCounterUrlChannels++; | 772 buildCounterUrlChannels++; |
| 738 if (buildCounterUrlChannels < 3) { | 773 if (buildCounterUrlChannels < 3) { |
| 739 unittest.expect(o.etag, unittest.equals('foo')); | 774 unittest.expect(o.etag, unittest.equals('foo')); |
| 740 checkUnnamed1148(o.items); | 775 checkUnnamed85(o.items); |
| 741 unittest.expect(o.kind, unittest.equals('foo')); | 776 unittest.expect(o.kind, unittest.equals('foo')); |
| 742 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 777 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 743 } | 778 } |
| 744 buildCounterUrlChannels--; | 779 buildCounterUrlChannels--; |
| 745 } | 780 } |
| 746 | 781 |
| 747 buildUnnamed1149() { | 782 buildUnnamed86() { |
| 748 var o = new core.List<core.String>(); | 783 var o = new core.List<core.String>(); |
| 749 o.add("foo"); | 784 o.add("foo"); |
| 750 o.add("foo"); | 785 o.add("foo"); |
| 751 return o; | 786 return o; |
| 752 } | 787 } |
| 753 | 788 |
| 754 checkUnnamed1149(core.List<core.String> o) { | 789 checkUnnamed86(core.List<core.String> o) { |
| 755 unittest.expect(o, unittest.hasLength(2)); | 790 unittest.expect(o, unittest.hasLength(2)); |
| 756 unittest.expect(o[0], unittest.equals('foo')); | 791 unittest.expect(o[0], unittest.equals('foo')); |
| 757 unittest.expect(o[1], unittest.equals('foo')); | 792 unittest.expect(o[1], unittest.equals('foo')); |
| 758 } | 793 } |
| 759 | 794 |
| 760 buildUnnamed1150() { | 795 buildUnnamed87() { |
| 761 var o = new core.List<core.String>(); | 796 var o = new core.List<core.String>(); |
| 762 o.add("foo"); | 797 o.add("foo"); |
| 763 o.add("foo"); | 798 o.add("foo"); |
| 764 return o; | 799 return o; |
| 765 } | 800 } |
| 766 | 801 |
| 767 checkUnnamed1150(core.List<core.String> o) { | 802 checkUnnamed87(core.List<core.String> o) { |
| 768 unittest.expect(o, unittest.hasLength(2)); | 803 unittest.expect(o, unittest.hasLength(2)); |
| 769 unittest.expect(o[0], unittest.equals('foo')); | 804 unittest.expect(o[0], unittest.equals('foo')); |
| 770 unittest.expect(o[1], unittest.equals('foo')); | 805 unittest.expect(o[1], unittest.equals('foo')); |
| 771 } | 806 } |
| 772 | 807 |
| 773 buildUnnamed1151() { | 808 buildUnnamed88() { |
| 774 var o = new core.List<core.String>(); | 809 var o = new core.List<core.String>(); |
| 775 o.add("foo"); | 810 o.add("foo"); |
| 776 o.add("foo"); | 811 o.add("foo"); |
| 777 return o; | 812 return o; |
| 778 } | 813 } |
| 779 | 814 |
| 780 checkUnnamed1151(core.List<core.String> o) { | 815 checkUnnamed88(core.List<core.String> o) { |
| 781 unittest.expect(o, unittest.hasLength(2)); | 816 unittest.expect(o, unittest.hasLength(2)); |
| 782 unittest.expect(o[0], unittest.equals('foo')); | 817 unittest.expect(o[0], unittest.equals('foo')); |
| 783 unittest.expect(o[1], unittest.equals('foo')); | 818 unittest.expect(o[1], unittest.equals('foo')); |
| 784 } | 819 } |
| 785 | 820 |
| 786 buildUnnamed1152() { | 821 buildUnnamed89() { |
| 787 var o = new core.List<core.String>(); | 822 var o = new core.List<core.String>(); |
| 788 o.add("foo"); | 823 o.add("foo"); |
| 789 o.add("foo"); | 824 o.add("foo"); |
| 790 return o; | 825 return o; |
| 791 } | 826 } |
| 792 | 827 |
| 793 checkUnnamed1152(core.List<core.String> o) { | 828 checkUnnamed89(core.List<core.String> o) { |
| 794 unittest.expect(o, unittest.hasLength(2)); | 829 unittest.expect(o, unittest.hasLength(2)); |
| 795 unittest.expect(o[0], unittest.equals('foo')); | 830 unittest.expect(o[0], unittest.equals('foo')); |
| 796 unittest.expect(o[1], unittest.equals('foo')); | 831 unittest.expect(o[1], unittest.equals('foo')); |
| 797 } | 832 } |
| 798 | 833 |
| 799 | 834 |
| 800 main() { | 835 main() { |
| 801 unittest.group("obj-schema-Account", () { | 836 unittest.group("obj-schema-Account", () { |
| 802 unittest.test("to-json--from-json", () { | 837 unittest.test("to-json--from-json", () { |
| 803 var o = buildAccount(); | 838 var o = buildAccount(); |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 965 var o = buildUrlChannels(); | 1000 var o = buildUrlChannels(); |
| 966 var od = new api.UrlChannels.fromJson(o.toJson()); | 1001 var od = new api.UrlChannels.fromJson(o.toJson()); |
| 967 checkUrlChannels(od); | 1002 checkUrlChannels(od); |
| 968 }); | 1003 }); |
| 969 }); | 1004 }); |
| 970 | 1005 |
| 971 | 1006 |
| 972 unittest.group("resource-AccountsResourceApi", () { | 1007 unittest.group("resource-AccountsResourceApi", () { |
| 973 unittest.test("method--get", () { | 1008 unittest.test("method--get", () { |
| 974 | 1009 |
| 975 var mock = new common_test.HttpServerMock(); | 1010 var mock = new HttpServerMock(); |
| 976 api.AccountsResourceApi res = new api.AdexchangesellerApi(mock).accounts; | 1011 api.AccountsResourceApi res = new api.AdexchangesellerApi(mock).accounts; |
| 977 var arg_accountId = "foo"; | 1012 var arg_accountId = "foo"; |
| 978 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1013 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 979 var path = (req.url).path; | 1014 var path = (req.url).path; |
| 980 var pathOffset = 0; | 1015 var pathOffset = 0; |
| 981 var index; | 1016 var index; |
| 982 var subPart; | 1017 var subPart; |
| 983 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1018 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 984 pathOffset += 1; | 1019 pathOffset += 1; |
| 985 unittest.expect(path.substring(pathOffset, pathOffset + 22), unittest.eq
uals("adexchangeseller/v2.0/")); | 1020 unittest.expect(path.substring(pathOffset, pathOffset + 22), unittest.eq
uals("adexchangeseller/v2.0/")); |
| (...skipping 19 matching lines...) Expand all Loading... |
| 1005 var keyvalue = part.split("="); | 1040 var keyvalue = part.split("="); |
| 1006 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1041 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 1007 } | 1042 } |
| 1008 } | 1043 } |
| 1009 | 1044 |
| 1010 | 1045 |
| 1011 var h = { | 1046 var h = { |
| 1012 "content-type" : "application/json; charset=utf-8", | 1047 "content-type" : "application/json; charset=utf-8", |
| 1013 }; | 1048 }; |
| 1014 var resp = convert.JSON.encode(buildAccount()); | 1049 var resp = convert.JSON.encode(buildAccount()); |
| 1015 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 1050 return new async.Future.value(stringResponse(200, h, resp)); |
| 1016 }), true); | 1051 }), true); |
| 1017 res.get(arg_accountId).then(unittest.expectAsync(((api.Account response) { | 1052 res.get(arg_accountId).then(unittest.expectAsync(((api.Account response) { |
| 1018 checkAccount(response); | 1053 checkAccount(response); |
| 1019 }))); | 1054 }))); |
| 1020 }); | 1055 }); |
| 1021 | 1056 |
| 1022 unittest.test("method--list", () { | 1057 unittest.test("method--list", () { |
| 1023 | 1058 |
| 1024 var mock = new common_test.HttpServerMock(); | 1059 var mock = new HttpServerMock(); |
| 1025 api.AccountsResourceApi res = new api.AdexchangesellerApi(mock).accounts; | 1060 api.AccountsResourceApi res = new api.AdexchangesellerApi(mock).accounts; |
| 1026 var arg_maxResults = 42; | 1061 var arg_maxResults = 42; |
| 1027 var arg_pageToken = "foo"; | 1062 var arg_pageToken = "foo"; |
| 1028 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1063 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 1029 var path = (req.url).path; | 1064 var path = (req.url).path; |
| 1030 var pathOffset = 0; | 1065 var pathOffset = 0; |
| 1031 var index; | 1066 var index; |
| 1032 var subPart; | 1067 var subPart; |
| 1033 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1068 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1034 pathOffset += 1; | 1069 pathOffset += 1; |
| (...skipping 19 matching lines...) Expand all Loading... |
| 1054 } | 1089 } |
| 1055 } | 1090 } |
| 1056 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | 1091 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); |
| 1057 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 1092 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
| 1058 | 1093 |
| 1059 | 1094 |
| 1060 var h = { | 1095 var h = { |
| 1061 "content-type" : "application/json; charset=utf-8", | 1096 "content-type" : "application/json; charset=utf-8", |
| 1062 }; | 1097 }; |
| 1063 var resp = convert.JSON.encode(buildAccounts()); | 1098 var resp = convert.JSON.encode(buildAccounts()); |
| 1064 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 1099 return new async.Future.value(stringResponse(200, h, resp)); |
| 1065 }), true); | 1100 }), true); |
| 1066 res.list(maxResults: arg_maxResults, pageToken: arg_pageToken).then(unitte
st.expectAsync(((api.Accounts response) { | 1101 res.list(maxResults: arg_maxResults, pageToken: arg_pageToken).then(unitte
st.expectAsync(((api.Accounts response) { |
| 1067 checkAccounts(response); | 1102 checkAccounts(response); |
| 1068 }))); | 1103 }))); |
| 1069 }); | 1104 }); |
| 1070 | 1105 |
| 1071 }); | 1106 }); |
| 1072 | 1107 |
| 1073 | 1108 |
| 1074 unittest.group("resource-AccountsAdclientsResourceApi", () { | 1109 unittest.group("resource-AccountsAdclientsResourceApi", () { |
| 1075 unittest.test("method--list", () { | 1110 unittest.test("method--list", () { |
| 1076 | 1111 |
| 1077 var mock = new common_test.HttpServerMock(); | 1112 var mock = new HttpServerMock(); |
| 1078 api.AccountsAdclientsResourceApi res = new api.AdexchangesellerApi(mock).a
ccounts.adclients; | 1113 api.AccountsAdclientsResourceApi res = new api.AdexchangesellerApi(mock).a
ccounts.adclients; |
| 1079 var arg_accountId = "foo"; | 1114 var arg_accountId = "foo"; |
| 1080 var arg_maxResults = 42; | 1115 var arg_maxResults = 42; |
| 1081 var arg_pageToken = "foo"; | 1116 var arg_pageToken = "foo"; |
| 1082 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1117 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 1083 var path = (req.url).path; | 1118 var path = (req.url).path; |
| 1084 var pathOffset = 0; | 1119 var pathOffset = 0; |
| 1085 var index; | 1120 var index; |
| 1086 var subPart; | 1121 var subPart; |
| 1087 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1122 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| (...skipping 27 matching lines...) Expand all Loading... |
| 1115 } | 1150 } |
| 1116 } | 1151 } |
| 1117 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | 1152 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); |
| 1118 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 1153 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
| 1119 | 1154 |
| 1120 | 1155 |
| 1121 var h = { | 1156 var h = { |
| 1122 "content-type" : "application/json; charset=utf-8", | 1157 "content-type" : "application/json; charset=utf-8", |
| 1123 }; | 1158 }; |
| 1124 var resp = convert.JSON.encode(buildAdClients()); | 1159 var resp = convert.JSON.encode(buildAdClients()); |
| 1125 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 1160 return new async.Future.value(stringResponse(200, h, resp)); |
| 1126 }), true); | 1161 }), true); |
| 1127 res.list(arg_accountId, maxResults: arg_maxResults, pageToken: arg_pageTok
en).then(unittest.expectAsync(((api.AdClients response) { | 1162 res.list(arg_accountId, maxResults: arg_maxResults, pageToken: arg_pageTok
en).then(unittest.expectAsync(((api.AdClients response) { |
| 1128 checkAdClients(response); | 1163 checkAdClients(response); |
| 1129 }))); | 1164 }))); |
| 1130 }); | 1165 }); |
| 1131 | 1166 |
| 1132 }); | 1167 }); |
| 1133 | 1168 |
| 1134 | 1169 |
| 1135 unittest.group("resource-AccountsAlertsResourceApi", () { | 1170 unittest.group("resource-AccountsAlertsResourceApi", () { |
| 1136 unittest.test("method--list", () { | 1171 unittest.test("method--list", () { |
| 1137 | 1172 |
| 1138 var mock = new common_test.HttpServerMock(); | 1173 var mock = new HttpServerMock(); |
| 1139 api.AccountsAlertsResourceApi res = new api.AdexchangesellerApi(mock).acco
unts.alerts; | 1174 api.AccountsAlertsResourceApi res = new api.AdexchangesellerApi(mock).acco
unts.alerts; |
| 1140 var arg_accountId = "foo"; | 1175 var arg_accountId = "foo"; |
| 1141 var arg_locale = "foo"; | 1176 var arg_locale = "foo"; |
| 1142 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1177 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 1143 var path = (req.url).path; | 1178 var path = (req.url).path; |
| 1144 var pathOffset = 0; | 1179 var pathOffset = 0; |
| 1145 var index; | 1180 var index; |
| 1146 var subPart; | 1181 var subPart; |
| 1147 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1182 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1148 pathOffset += 1; | 1183 pathOffset += 1; |
| (...skipping 25 matching lines...) Expand all Loading... |
| 1174 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1209 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 1175 } | 1210 } |
| 1176 } | 1211 } |
| 1177 unittest.expect(queryMap["locale"].first, unittest.equals(arg_locale)); | 1212 unittest.expect(queryMap["locale"].first, unittest.equals(arg_locale)); |
| 1178 | 1213 |
| 1179 | 1214 |
| 1180 var h = { | 1215 var h = { |
| 1181 "content-type" : "application/json; charset=utf-8", | 1216 "content-type" : "application/json; charset=utf-8", |
| 1182 }; | 1217 }; |
| 1183 var resp = convert.JSON.encode(buildAlerts()); | 1218 var resp = convert.JSON.encode(buildAlerts()); |
| 1184 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 1219 return new async.Future.value(stringResponse(200, h, resp)); |
| 1185 }), true); | 1220 }), true); |
| 1186 res.list(arg_accountId, locale: arg_locale).then(unittest.expectAsync(((ap
i.Alerts response) { | 1221 res.list(arg_accountId, locale: arg_locale).then(unittest.expectAsync(((ap
i.Alerts response) { |
| 1187 checkAlerts(response); | 1222 checkAlerts(response); |
| 1188 }))); | 1223 }))); |
| 1189 }); | 1224 }); |
| 1190 | 1225 |
| 1191 }); | 1226 }); |
| 1192 | 1227 |
| 1193 | 1228 |
| 1194 unittest.group("resource-AccountsCustomchannelsResourceApi", () { | 1229 unittest.group("resource-AccountsCustomchannelsResourceApi", () { |
| 1195 unittest.test("method--get", () { | 1230 unittest.test("method--get", () { |
| 1196 | 1231 |
| 1197 var mock = new common_test.HttpServerMock(); | 1232 var mock = new HttpServerMock(); |
| 1198 api.AccountsCustomchannelsResourceApi res = new api.AdexchangesellerApi(mo
ck).accounts.customchannels; | 1233 api.AccountsCustomchannelsResourceApi res = new api.AdexchangesellerApi(mo
ck).accounts.customchannels; |
| 1199 var arg_accountId = "foo"; | 1234 var arg_accountId = "foo"; |
| 1200 var arg_adClientId = "foo"; | 1235 var arg_adClientId = "foo"; |
| 1201 var arg_customChannelId = "foo"; | 1236 var arg_customChannelId = "foo"; |
| 1202 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1237 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 1203 var path = (req.url).path; | 1238 var path = (req.url).path; |
| 1204 var pathOffset = 0; | 1239 var pathOffset = 0; |
| 1205 var index; | 1240 var index; |
| 1206 var subPart; | 1241 var subPart; |
| 1207 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1242 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1243 var keyvalue = part.split("="); | 1278 var keyvalue = part.split("="); |
| 1244 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1279 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 1245 } | 1280 } |
| 1246 } | 1281 } |
| 1247 | 1282 |
| 1248 | 1283 |
| 1249 var h = { | 1284 var h = { |
| 1250 "content-type" : "application/json; charset=utf-8", | 1285 "content-type" : "application/json; charset=utf-8", |
| 1251 }; | 1286 }; |
| 1252 var resp = convert.JSON.encode(buildCustomChannel()); | 1287 var resp = convert.JSON.encode(buildCustomChannel()); |
| 1253 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 1288 return new async.Future.value(stringResponse(200, h, resp)); |
| 1254 }), true); | 1289 }), true); |
| 1255 res.get(arg_accountId, arg_adClientId, arg_customChannelId).then(unittest.
expectAsync(((api.CustomChannel response) { | 1290 res.get(arg_accountId, arg_adClientId, arg_customChannelId).then(unittest.
expectAsync(((api.CustomChannel response) { |
| 1256 checkCustomChannel(response); | 1291 checkCustomChannel(response); |
| 1257 }))); | 1292 }))); |
| 1258 }); | 1293 }); |
| 1259 | 1294 |
| 1260 unittest.test("method--list", () { | 1295 unittest.test("method--list", () { |
| 1261 | 1296 |
| 1262 var mock = new common_test.HttpServerMock(); | 1297 var mock = new HttpServerMock(); |
| 1263 api.AccountsCustomchannelsResourceApi res = new api.AdexchangesellerApi(mo
ck).accounts.customchannels; | 1298 api.AccountsCustomchannelsResourceApi res = new api.AdexchangesellerApi(mo
ck).accounts.customchannels; |
| 1264 var arg_accountId = "foo"; | 1299 var arg_accountId = "foo"; |
| 1265 var arg_adClientId = "foo"; | 1300 var arg_adClientId = "foo"; |
| 1266 var arg_maxResults = 42; | 1301 var arg_maxResults = 42; |
| 1267 var arg_pageToken = "foo"; | 1302 var arg_pageToken = "foo"; |
| 1268 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1303 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 1269 var path = (req.url).path; | 1304 var path = (req.url).path; |
| 1270 var pathOffset = 0; | 1305 var pathOffset = 0; |
| 1271 var index; | 1306 var index; |
| 1272 var subPart; | 1307 var subPart; |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1308 } | 1343 } |
| 1309 } | 1344 } |
| 1310 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | 1345 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); |
| 1311 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 1346 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
| 1312 | 1347 |
| 1313 | 1348 |
| 1314 var h = { | 1349 var h = { |
| 1315 "content-type" : "application/json; charset=utf-8", | 1350 "content-type" : "application/json; charset=utf-8", |
| 1316 }; | 1351 }; |
| 1317 var resp = convert.JSON.encode(buildCustomChannels()); | 1352 var resp = convert.JSON.encode(buildCustomChannels()); |
| 1318 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 1353 return new async.Future.value(stringResponse(200, h, resp)); |
| 1319 }), true); | 1354 }), true); |
| 1320 res.list(arg_accountId, arg_adClientId, maxResults: arg_maxResults, pageTo
ken: arg_pageToken).then(unittest.expectAsync(((api.CustomChannels response) { | 1355 res.list(arg_accountId, arg_adClientId, maxResults: arg_maxResults, pageTo
ken: arg_pageToken).then(unittest.expectAsync(((api.CustomChannels response) { |
| 1321 checkCustomChannels(response); | 1356 checkCustomChannels(response); |
| 1322 }))); | 1357 }))); |
| 1323 }); | 1358 }); |
| 1324 | 1359 |
| 1325 }); | 1360 }); |
| 1326 | 1361 |
| 1327 | 1362 |
| 1328 unittest.group("resource-AccountsMetadataDimensionsResourceApi", () { | 1363 unittest.group("resource-AccountsMetadataDimensionsResourceApi", () { |
| 1329 unittest.test("method--list", () { | 1364 unittest.test("method--list", () { |
| 1330 | 1365 |
| 1331 var mock = new common_test.HttpServerMock(); | 1366 var mock = new HttpServerMock(); |
| 1332 api.AccountsMetadataDimensionsResourceApi res = new api.AdexchangesellerAp
i(mock).accounts.metadata.dimensions; | 1367 api.AccountsMetadataDimensionsResourceApi res = new api.AdexchangesellerAp
i(mock).accounts.metadata.dimensions; |
| 1333 var arg_accountId = "foo"; | 1368 var arg_accountId = "foo"; |
| 1334 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1369 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 1335 var path = (req.url).path; | 1370 var path = (req.url).path; |
| 1336 var pathOffset = 0; | 1371 var pathOffset = 0; |
| 1337 var index; | 1372 var index; |
| 1338 var subPart; | 1373 var subPart; |
| 1339 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1374 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1340 pathOffset += 1; | 1375 pathOffset += 1; |
| 1341 unittest.expect(path.substring(pathOffset, pathOffset + 22), unittest.eq
uals("adexchangeseller/v2.0/")); | 1376 unittest.expect(path.substring(pathOffset, pathOffset + 22), unittest.eq
uals("adexchangeseller/v2.0/")); |
| (...skipping 23 matching lines...) Expand all Loading... |
| 1365 var keyvalue = part.split("="); | 1400 var keyvalue = part.split("="); |
| 1366 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1401 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 1367 } | 1402 } |
| 1368 } | 1403 } |
| 1369 | 1404 |
| 1370 | 1405 |
| 1371 var h = { | 1406 var h = { |
| 1372 "content-type" : "application/json; charset=utf-8", | 1407 "content-type" : "application/json; charset=utf-8", |
| 1373 }; | 1408 }; |
| 1374 var resp = convert.JSON.encode(buildMetadata()); | 1409 var resp = convert.JSON.encode(buildMetadata()); |
| 1375 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 1410 return new async.Future.value(stringResponse(200, h, resp)); |
| 1376 }), true); | 1411 }), true); |
| 1377 res.list(arg_accountId).then(unittest.expectAsync(((api.Metadata response)
{ | 1412 res.list(arg_accountId).then(unittest.expectAsync(((api.Metadata response)
{ |
| 1378 checkMetadata(response); | 1413 checkMetadata(response); |
| 1379 }))); | 1414 }))); |
| 1380 }); | 1415 }); |
| 1381 | 1416 |
| 1382 }); | 1417 }); |
| 1383 | 1418 |
| 1384 | 1419 |
| 1385 unittest.group("resource-AccountsMetadataMetricsResourceApi", () { | 1420 unittest.group("resource-AccountsMetadataMetricsResourceApi", () { |
| 1386 unittest.test("method--list", () { | 1421 unittest.test("method--list", () { |
| 1387 | 1422 |
| 1388 var mock = new common_test.HttpServerMock(); | 1423 var mock = new HttpServerMock(); |
| 1389 api.AccountsMetadataMetricsResourceApi res = new api.AdexchangesellerApi(m
ock).accounts.metadata.metrics; | 1424 api.AccountsMetadataMetricsResourceApi res = new api.AdexchangesellerApi(m
ock).accounts.metadata.metrics; |
| 1390 var arg_accountId = "foo"; | 1425 var arg_accountId = "foo"; |
| 1391 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1426 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 1392 var path = (req.url).path; | 1427 var path = (req.url).path; |
| 1393 var pathOffset = 0; | 1428 var pathOffset = 0; |
| 1394 var index; | 1429 var index; |
| 1395 var subPart; | 1430 var subPart; |
| 1396 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1431 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1397 pathOffset += 1; | 1432 pathOffset += 1; |
| 1398 unittest.expect(path.substring(pathOffset, pathOffset + 22), unittest.eq
uals("adexchangeseller/v2.0/")); | 1433 unittest.expect(path.substring(pathOffset, pathOffset + 22), unittest.eq
uals("adexchangeseller/v2.0/")); |
| (...skipping 23 matching lines...) Expand all Loading... |
| 1422 var keyvalue = part.split("="); | 1457 var keyvalue = part.split("="); |
| 1423 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1458 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 1424 } | 1459 } |
| 1425 } | 1460 } |
| 1426 | 1461 |
| 1427 | 1462 |
| 1428 var h = { | 1463 var h = { |
| 1429 "content-type" : "application/json; charset=utf-8", | 1464 "content-type" : "application/json; charset=utf-8", |
| 1430 }; | 1465 }; |
| 1431 var resp = convert.JSON.encode(buildMetadata()); | 1466 var resp = convert.JSON.encode(buildMetadata()); |
| 1432 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 1467 return new async.Future.value(stringResponse(200, h, resp)); |
| 1433 }), true); | 1468 }), true); |
| 1434 res.list(arg_accountId).then(unittest.expectAsync(((api.Metadata response)
{ | 1469 res.list(arg_accountId).then(unittest.expectAsync(((api.Metadata response)
{ |
| 1435 checkMetadata(response); | 1470 checkMetadata(response); |
| 1436 }))); | 1471 }))); |
| 1437 }); | 1472 }); |
| 1438 | 1473 |
| 1439 }); | 1474 }); |
| 1440 | 1475 |
| 1441 | 1476 |
| 1442 unittest.group("resource-AccountsPreferreddealsResourceApi", () { | 1477 unittest.group("resource-AccountsPreferreddealsResourceApi", () { |
| 1443 unittest.test("method--get", () { | 1478 unittest.test("method--get", () { |
| 1444 | 1479 |
| 1445 var mock = new common_test.HttpServerMock(); | 1480 var mock = new HttpServerMock(); |
| 1446 api.AccountsPreferreddealsResourceApi res = new api.AdexchangesellerApi(mo
ck).accounts.preferreddeals; | 1481 api.AccountsPreferreddealsResourceApi res = new api.AdexchangesellerApi(mo
ck).accounts.preferreddeals; |
| 1447 var arg_accountId = "foo"; | 1482 var arg_accountId = "foo"; |
| 1448 var arg_dealId = "foo"; | 1483 var arg_dealId = "foo"; |
| 1449 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1484 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 1450 var path = (req.url).path; | 1485 var path = (req.url).path; |
| 1451 var pathOffset = 0; | 1486 var pathOffset = 0; |
| 1452 var index; | 1487 var index; |
| 1453 var subPart; | 1488 var subPart; |
| 1454 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1489 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1455 pathOffset += 1; | 1490 pathOffset += 1; |
| (...skipping 27 matching lines...) Expand all Loading... |
| 1483 var keyvalue = part.split("="); | 1518 var keyvalue = part.split("="); |
| 1484 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1519 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 1485 } | 1520 } |
| 1486 } | 1521 } |
| 1487 | 1522 |
| 1488 | 1523 |
| 1489 var h = { | 1524 var h = { |
| 1490 "content-type" : "application/json; charset=utf-8", | 1525 "content-type" : "application/json; charset=utf-8", |
| 1491 }; | 1526 }; |
| 1492 var resp = convert.JSON.encode(buildPreferredDeal()); | 1527 var resp = convert.JSON.encode(buildPreferredDeal()); |
| 1493 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 1528 return new async.Future.value(stringResponse(200, h, resp)); |
| 1494 }), true); | 1529 }), true); |
| 1495 res.get(arg_accountId, arg_dealId).then(unittest.expectAsync(((api.Preferr
edDeal response) { | 1530 res.get(arg_accountId, arg_dealId).then(unittest.expectAsync(((api.Preferr
edDeal response) { |
| 1496 checkPreferredDeal(response); | 1531 checkPreferredDeal(response); |
| 1497 }))); | 1532 }))); |
| 1498 }); | 1533 }); |
| 1499 | 1534 |
| 1500 unittest.test("method--list", () { | 1535 unittest.test("method--list", () { |
| 1501 | 1536 |
| 1502 var mock = new common_test.HttpServerMock(); | 1537 var mock = new HttpServerMock(); |
| 1503 api.AccountsPreferreddealsResourceApi res = new api.AdexchangesellerApi(mo
ck).accounts.preferreddeals; | 1538 api.AccountsPreferreddealsResourceApi res = new api.AdexchangesellerApi(mo
ck).accounts.preferreddeals; |
| 1504 var arg_accountId = "foo"; | 1539 var arg_accountId = "foo"; |
| 1505 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1540 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 1506 var path = (req.url).path; | 1541 var path = (req.url).path; |
| 1507 var pathOffset = 0; | 1542 var pathOffset = 0; |
| 1508 var index; | 1543 var index; |
| 1509 var subPart; | 1544 var subPart; |
| 1510 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1545 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1511 pathOffset += 1; | 1546 pathOffset += 1; |
| 1512 unittest.expect(path.substring(pathOffset, pathOffset + 22), unittest.eq
uals("adexchangeseller/v2.0/")); | 1547 unittest.expect(path.substring(pathOffset, pathOffset + 22), unittest.eq
uals("adexchangeseller/v2.0/")); |
| (...skipping 23 matching lines...) Expand all Loading... |
| 1536 var keyvalue = part.split("="); | 1571 var keyvalue = part.split("="); |
| 1537 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1572 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 1538 } | 1573 } |
| 1539 } | 1574 } |
| 1540 | 1575 |
| 1541 | 1576 |
| 1542 var h = { | 1577 var h = { |
| 1543 "content-type" : "application/json; charset=utf-8", | 1578 "content-type" : "application/json; charset=utf-8", |
| 1544 }; | 1579 }; |
| 1545 var resp = convert.JSON.encode(buildPreferredDeals()); | 1580 var resp = convert.JSON.encode(buildPreferredDeals()); |
| 1546 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 1581 return new async.Future.value(stringResponse(200, h, resp)); |
| 1547 }), true); | 1582 }), true); |
| 1548 res.list(arg_accountId).then(unittest.expectAsync(((api.PreferredDeals res
ponse) { | 1583 res.list(arg_accountId).then(unittest.expectAsync(((api.PreferredDeals res
ponse) { |
| 1549 checkPreferredDeals(response); | 1584 checkPreferredDeals(response); |
| 1550 }))); | 1585 }))); |
| 1551 }); | 1586 }); |
| 1552 | 1587 |
| 1553 }); | 1588 }); |
| 1554 | 1589 |
| 1555 | 1590 |
| 1556 unittest.group("resource-AccountsReportsResourceApi", () { | 1591 unittest.group("resource-AccountsReportsResourceApi", () { |
| 1557 unittest.test("method--generate", () { | 1592 unittest.test("method--generate", () { |
| 1558 // TODO: Implement tests for media upload; | 1593 // TODO: Implement tests for media upload; |
| 1559 // TODO: Implement tests for media download; | 1594 // TODO: Implement tests for media download; |
| 1560 | 1595 |
| 1561 var mock = new common_test.HttpServerMock(); | 1596 var mock = new HttpServerMock(); |
| 1562 api.AccountsReportsResourceApi res = new api.AdexchangesellerApi(mock).acc
ounts.reports; | 1597 api.AccountsReportsResourceApi res = new api.AdexchangesellerApi(mock).acc
ounts.reports; |
| 1563 var arg_accountId = "foo"; | 1598 var arg_accountId = "foo"; |
| 1564 var arg_startDate = "foo"; | 1599 var arg_startDate = "foo"; |
| 1565 var arg_endDate = "foo"; | 1600 var arg_endDate = "foo"; |
| 1566 var arg_dimension = buildUnnamed1149(); | 1601 var arg_dimension = buildUnnamed86(); |
| 1567 var arg_filter = buildUnnamed1150(); | 1602 var arg_filter = buildUnnamed87(); |
| 1568 var arg_locale = "foo"; | 1603 var arg_locale = "foo"; |
| 1569 var arg_maxResults = 42; | 1604 var arg_maxResults = 42; |
| 1570 var arg_metric = buildUnnamed1151(); | 1605 var arg_metric = buildUnnamed88(); |
| 1571 var arg_sort = buildUnnamed1152(); | 1606 var arg_sort = buildUnnamed89(); |
| 1572 var arg_startIndex = 42; | 1607 var arg_startIndex = 42; |
| 1573 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1608 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 1574 var path = (req.url).path; | 1609 var path = (req.url).path; |
| 1575 var pathOffset = 0; | 1610 var pathOffset = 0; |
| 1576 var index; | 1611 var index; |
| 1577 var subPart; | 1612 var subPart; |
| 1578 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1613 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1579 pathOffset += 1; | 1614 pathOffset += 1; |
| 1580 unittest.expect(path.substring(pathOffset, pathOffset + 22), unittest.eq
uals("adexchangeseller/v2.0/")); | 1615 unittest.expect(path.substring(pathOffset, pathOffset + 22), unittest.eq
uals("adexchangeseller/v2.0/")); |
| 1581 pathOffset += 22; | 1616 pathOffset += 22; |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1613 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | 1648 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); |
| 1614 unittest.expect(queryMap["metric"], unittest.equals(arg_metric)); | 1649 unittest.expect(queryMap["metric"], unittest.equals(arg_metric)); |
| 1615 unittest.expect(queryMap["sort"], unittest.equals(arg_sort)); | 1650 unittest.expect(queryMap["sort"], unittest.equals(arg_sort)); |
| 1616 unittest.expect(core.int.parse(queryMap["startIndex"].first), unittest.e
quals(arg_startIndex)); | 1651 unittest.expect(core.int.parse(queryMap["startIndex"].first), unittest.e
quals(arg_startIndex)); |
| 1617 | 1652 |
| 1618 | 1653 |
| 1619 var h = { | 1654 var h = { |
| 1620 "content-type" : "application/json; charset=utf-8", | 1655 "content-type" : "application/json; charset=utf-8", |
| 1621 }; | 1656 }; |
| 1622 var resp = convert.JSON.encode(buildReport()); | 1657 var resp = convert.JSON.encode(buildReport()); |
| 1623 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 1658 return new async.Future.value(stringResponse(200, h, resp)); |
| 1624 }), true); | 1659 }), true); |
| 1625 res.generate(arg_accountId, arg_startDate, arg_endDate, dimension: arg_dim
ension, filter: arg_filter, locale: arg_locale, maxResults: arg_maxResults, metr
ic: arg_metric, sort: arg_sort, startIndex: arg_startIndex).then(unittest.expect
Async(((api.Report response) { | 1660 res.generate(arg_accountId, arg_startDate, arg_endDate, dimension: arg_dim
ension, filter: arg_filter, locale: arg_locale, maxResults: arg_maxResults, metr
ic: arg_metric, sort: arg_sort, startIndex: arg_startIndex).then(unittest.expect
Async(((api.Report response) { |
| 1626 checkReport(response); | 1661 checkReport(response); |
| 1627 }))); | 1662 }))); |
| 1628 }); | 1663 }); |
| 1629 | 1664 |
| 1630 }); | 1665 }); |
| 1631 | 1666 |
| 1632 | 1667 |
| 1633 unittest.group("resource-AccountsReportsSavedResourceApi", () { | 1668 unittest.group("resource-AccountsReportsSavedResourceApi", () { |
| 1634 unittest.test("method--generate", () { | 1669 unittest.test("method--generate", () { |
| 1635 | 1670 |
| 1636 var mock = new common_test.HttpServerMock(); | 1671 var mock = new HttpServerMock(); |
| 1637 api.AccountsReportsSavedResourceApi res = new api.AdexchangesellerApi(mock
).accounts.reports.saved; | 1672 api.AccountsReportsSavedResourceApi res = new api.AdexchangesellerApi(mock
).accounts.reports.saved; |
| 1638 var arg_accountId = "foo"; | 1673 var arg_accountId = "foo"; |
| 1639 var arg_savedReportId = "foo"; | 1674 var arg_savedReportId = "foo"; |
| 1640 var arg_locale = "foo"; | 1675 var arg_locale = "foo"; |
| 1641 var arg_maxResults = 42; | 1676 var arg_maxResults = 42; |
| 1642 var arg_startIndex = 42; | 1677 var arg_startIndex = 42; |
| 1643 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1678 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 1644 var path = (req.url).path; | 1679 var path = (req.url).path; |
| 1645 var pathOffset = 0; | 1680 var pathOffset = 0; |
| 1646 var index; | 1681 var index; |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1680 } | 1715 } |
| 1681 unittest.expect(queryMap["locale"].first, unittest.equals(arg_locale)); | 1716 unittest.expect(queryMap["locale"].first, unittest.equals(arg_locale)); |
| 1682 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | 1717 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); |
| 1683 unittest.expect(core.int.parse(queryMap["startIndex"].first), unittest.e
quals(arg_startIndex)); | 1718 unittest.expect(core.int.parse(queryMap["startIndex"].first), unittest.e
quals(arg_startIndex)); |
| 1684 | 1719 |
| 1685 | 1720 |
| 1686 var h = { | 1721 var h = { |
| 1687 "content-type" : "application/json; charset=utf-8", | 1722 "content-type" : "application/json; charset=utf-8", |
| 1688 }; | 1723 }; |
| 1689 var resp = convert.JSON.encode(buildReport()); | 1724 var resp = convert.JSON.encode(buildReport()); |
| 1690 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 1725 return new async.Future.value(stringResponse(200, h, resp)); |
| 1691 }), true); | 1726 }), true); |
| 1692 res.generate(arg_accountId, arg_savedReportId, locale: arg_locale, maxResu
lts: arg_maxResults, startIndex: arg_startIndex).then(unittest.expectAsync(((api
.Report response) { | 1727 res.generate(arg_accountId, arg_savedReportId, locale: arg_locale, maxResu
lts: arg_maxResults, startIndex: arg_startIndex).then(unittest.expectAsync(((api
.Report response) { |
| 1693 checkReport(response); | 1728 checkReport(response); |
| 1694 }))); | 1729 }))); |
| 1695 }); | 1730 }); |
| 1696 | 1731 |
| 1697 unittest.test("method--list", () { | 1732 unittest.test("method--list", () { |
| 1698 | 1733 |
| 1699 var mock = new common_test.HttpServerMock(); | 1734 var mock = new HttpServerMock(); |
| 1700 api.AccountsReportsSavedResourceApi res = new api.AdexchangesellerApi(mock
).accounts.reports.saved; | 1735 api.AccountsReportsSavedResourceApi res = new api.AdexchangesellerApi(mock
).accounts.reports.saved; |
| 1701 var arg_accountId = "foo"; | 1736 var arg_accountId = "foo"; |
| 1702 var arg_maxResults = 42; | 1737 var arg_maxResults = 42; |
| 1703 var arg_pageToken = "foo"; | 1738 var arg_pageToken = "foo"; |
| 1704 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1739 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 1705 var path = (req.url).path; | 1740 var path = (req.url).path; |
| 1706 var pathOffset = 0; | 1741 var pathOffset = 0; |
| 1707 var index; | 1742 var index; |
| 1708 var subPart; | 1743 var subPart; |
| 1709 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1744 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| (...skipping 27 matching lines...) Expand all Loading... |
| 1737 } | 1772 } |
| 1738 } | 1773 } |
| 1739 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | 1774 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); |
| 1740 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 1775 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
| 1741 | 1776 |
| 1742 | 1777 |
| 1743 var h = { | 1778 var h = { |
| 1744 "content-type" : "application/json; charset=utf-8", | 1779 "content-type" : "application/json; charset=utf-8", |
| 1745 }; | 1780 }; |
| 1746 var resp = convert.JSON.encode(buildSavedReports()); | 1781 var resp = convert.JSON.encode(buildSavedReports()); |
| 1747 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 1782 return new async.Future.value(stringResponse(200, h, resp)); |
| 1748 }), true); | 1783 }), true); |
| 1749 res.list(arg_accountId, maxResults: arg_maxResults, pageToken: arg_pageTok
en).then(unittest.expectAsync(((api.SavedReports response) { | 1784 res.list(arg_accountId, maxResults: arg_maxResults, pageToken: arg_pageTok
en).then(unittest.expectAsync(((api.SavedReports response) { |
| 1750 checkSavedReports(response); | 1785 checkSavedReports(response); |
| 1751 }))); | 1786 }))); |
| 1752 }); | 1787 }); |
| 1753 | 1788 |
| 1754 }); | 1789 }); |
| 1755 | 1790 |
| 1756 | 1791 |
| 1757 unittest.group("resource-AccountsUrlchannelsResourceApi", () { | 1792 unittest.group("resource-AccountsUrlchannelsResourceApi", () { |
| 1758 unittest.test("method--list", () { | 1793 unittest.test("method--list", () { |
| 1759 | 1794 |
| 1760 var mock = new common_test.HttpServerMock(); | 1795 var mock = new HttpServerMock(); |
| 1761 api.AccountsUrlchannelsResourceApi res = new api.AdexchangesellerApi(mock)
.accounts.urlchannels; | 1796 api.AccountsUrlchannelsResourceApi res = new api.AdexchangesellerApi(mock)
.accounts.urlchannels; |
| 1762 var arg_accountId = "foo"; | 1797 var arg_accountId = "foo"; |
| 1763 var arg_adClientId = "foo"; | 1798 var arg_adClientId = "foo"; |
| 1764 var arg_maxResults = 42; | 1799 var arg_maxResults = 42; |
| 1765 var arg_pageToken = "foo"; | 1800 var arg_pageToken = "foo"; |
| 1766 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1801 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 1767 var path = (req.url).path; | 1802 var path = (req.url).path; |
| 1768 var pathOffset = 0; | 1803 var pathOffset = 0; |
| 1769 var index; | 1804 var index; |
| 1770 var subPart; | 1805 var subPart; |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1806 } | 1841 } |
| 1807 } | 1842 } |
| 1808 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | 1843 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); |
| 1809 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 1844 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
| 1810 | 1845 |
| 1811 | 1846 |
| 1812 var h = { | 1847 var h = { |
| 1813 "content-type" : "application/json; charset=utf-8", | 1848 "content-type" : "application/json; charset=utf-8", |
| 1814 }; | 1849 }; |
| 1815 var resp = convert.JSON.encode(buildUrlChannels()); | 1850 var resp = convert.JSON.encode(buildUrlChannels()); |
| 1816 return new async.Future.value(common_test.stringResponse(200, h, resp)); | 1851 return new async.Future.value(stringResponse(200, h, resp)); |
| 1817 }), true); | 1852 }), true); |
| 1818 res.list(arg_accountId, arg_adClientId, maxResults: arg_maxResults, pageTo
ken: arg_pageToken).then(unittest.expectAsync(((api.UrlChannels response) { | 1853 res.list(arg_accountId, arg_adClientId, maxResults: arg_maxResults, pageTo
ken: arg_pageToken).then(unittest.expectAsync(((api.UrlChannels response) { |
| 1819 checkUrlChannels(response); | 1854 checkUrlChannels(response); |
| 1820 }))); | 1855 }))); |
| 1821 }); | 1856 }); |
| 1822 | 1857 |
| 1823 }); | 1858 }); |
| 1824 | 1859 |
| 1825 | 1860 |
| 1826 } | 1861 } |
| 1827 | 1862 |
| OLD | NEW |