| OLD | NEW |
| (Empty) |
| 1 library googleapis.dfareporting.v2_5.test; | |
| 2 | |
| 3 import "dart:core" as core; | |
| 4 import "dart:collection" as collection; | |
| 5 import "dart:async" as async; | |
| 6 import "dart:convert" as convert; | |
| 7 | |
| 8 import 'package:http/http.dart' as http; | |
| 9 import 'package:http/testing.dart' as http_testing; | |
| 10 import 'package:unittest/unittest.dart' as unittest; | |
| 11 | |
| 12 import 'package:googleapis/dfareporting/v2_5.dart' as api; | |
| 13 | |
| 14 class HttpServerMock extends http.BaseClient { | |
| 15 core.Function _callback; | |
| 16 core.bool _expectJson; | |
| 17 | |
| 18 void register(core.Function callback, core.bool expectJson) { | |
| 19 _callback = callback; | |
| 20 _expectJson = expectJson; | |
| 21 } | |
| 22 | |
| 23 async.Future<http.StreamedResponse> send(http.BaseRequest request) { | |
| 24 if (_expectJson) { | |
| 25 return request.finalize() | |
| 26 .transform(convert.UTF8.decoder) | |
| 27 .join('') | |
| 28 .then((core.String jsonString) { | |
| 29 if (jsonString.isEmpty) { | |
| 30 return _callback(request, null); | |
| 31 } else { | |
| 32 return _callback(request, convert.JSON.decode(jsonString)); | |
| 33 } | |
| 34 }); | |
| 35 } else { | |
| 36 var stream = request.finalize(); | |
| 37 if (stream == null) { | |
| 38 return _callback(request, []); | |
| 39 } else { | |
| 40 return stream.toBytes().then((data) { | |
| 41 return _callback(request, data); | |
| 42 }); | |
| 43 } | |
| 44 } | |
| 45 } | |
| 46 } | |
| 47 | |
| 48 http.StreamedResponse stringResponse( | |
| 49 core.int status, core.Map headers, core.String body) { | |
| 50 var stream = new async.Stream.fromIterable([convert.UTF8.encode(body)]); | |
| 51 return new http.StreamedResponse(stream, status, headers: headers); | |
| 52 } | |
| 53 | |
| 54 buildUnnamed1308() { | |
| 55 var o = new core.List<core.String>(); | |
| 56 o.add("foo"); | |
| 57 o.add("foo"); | |
| 58 return o; | |
| 59 } | |
| 60 | |
| 61 checkUnnamed1308(core.List<core.String> o) { | |
| 62 unittest.expect(o, unittest.hasLength(2)); | |
| 63 unittest.expect(o[0], unittest.equals('foo')); | |
| 64 unittest.expect(o[1], unittest.equals('foo')); | |
| 65 } | |
| 66 | |
| 67 buildUnnamed1309() { | |
| 68 var o = new core.List<core.String>(); | |
| 69 o.add("foo"); | |
| 70 o.add("foo"); | |
| 71 return o; | |
| 72 } | |
| 73 | |
| 74 checkUnnamed1309(core.List<core.String> o) { | |
| 75 unittest.expect(o, unittest.hasLength(2)); | |
| 76 unittest.expect(o[0], unittest.equals('foo')); | |
| 77 unittest.expect(o[1], unittest.equals('foo')); | |
| 78 } | |
| 79 | |
| 80 core.int buildCounterAccount = 0; | |
| 81 buildAccount() { | |
| 82 var o = new api.Account(); | |
| 83 buildCounterAccount++; | |
| 84 if (buildCounterAccount < 3) { | |
| 85 o.accountPermissionIds = buildUnnamed1308(); | |
| 86 o.accountProfile = "foo"; | |
| 87 o.active = true; | |
| 88 o.activeAdsLimitTier = "foo"; | |
| 89 o.activeViewOptOut = true; | |
| 90 o.availablePermissionIds = buildUnnamed1309(); | |
| 91 o.comscoreVceEnabled = true; | |
| 92 o.countryId = "foo"; | |
| 93 o.currencyId = "foo"; | |
| 94 o.defaultCreativeSizeId = "foo"; | |
| 95 o.description = "foo"; | |
| 96 o.id = "foo"; | |
| 97 o.kind = "foo"; | |
| 98 o.locale = "foo"; | |
| 99 o.maximumImageSize = "foo"; | |
| 100 o.name = "foo"; | |
| 101 o.nielsenOcrEnabled = true; | |
| 102 o.reportsConfiguration = buildReportsConfiguration(); | |
| 103 o.teaserSizeLimit = "foo"; | |
| 104 } | |
| 105 buildCounterAccount--; | |
| 106 return o; | |
| 107 } | |
| 108 | |
| 109 checkAccount(api.Account o) { | |
| 110 buildCounterAccount++; | |
| 111 if (buildCounterAccount < 3) { | |
| 112 checkUnnamed1308(o.accountPermissionIds); | |
| 113 unittest.expect(o.accountProfile, unittest.equals('foo')); | |
| 114 unittest.expect(o.active, unittest.isTrue); | |
| 115 unittest.expect(o.activeAdsLimitTier, unittest.equals('foo')); | |
| 116 unittest.expect(o.activeViewOptOut, unittest.isTrue); | |
| 117 checkUnnamed1309(o.availablePermissionIds); | |
| 118 unittest.expect(o.comscoreVceEnabled, unittest.isTrue); | |
| 119 unittest.expect(o.countryId, unittest.equals('foo')); | |
| 120 unittest.expect(o.currencyId, unittest.equals('foo')); | |
| 121 unittest.expect(o.defaultCreativeSizeId, unittest.equals('foo')); | |
| 122 unittest.expect(o.description, unittest.equals('foo')); | |
| 123 unittest.expect(o.id, unittest.equals('foo')); | |
| 124 unittest.expect(o.kind, unittest.equals('foo')); | |
| 125 unittest.expect(o.locale, unittest.equals('foo')); | |
| 126 unittest.expect(o.maximumImageSize, unittest.equals('foo')); | |
| 127 unittest.expect(o.name, unittest.equals('foo')); | |
| 128 unittest.expect(o.nielsenOcrEnabled, unittest.isTrue); | |
| 129 checkReportsConfiguration(o.reportsConfiguration); | |
| 130 unittest.expect(o.teaserSizeLimit, unittest.equals('foo')); | |
| 131 } | |
| 132 buildCounterAccount--; | |
| 133 } | |
| 134 | |
| 135 core.int buildCounterAccountActiveAdSummary = 0; | |
| 136 buildAccountActiveAdSummary() { | |
| 137 var o = new api.AccountActiveAdSummary(); | |
| 138 buildCounterAccountActiveAdSummary++; | |
| 139 if (buildCounterAccountActiveAdSummary < 3) { | |
| 140 o.accountId = "foo"; | |
| 141 o.activeAds = "foo"; | |
| 142 o.activeAdsLimitTier = "foo"; | |
| 143 o.availableAds = "foo"; | |
| 144 o.kind = "foo"; | |
| 145 } | |
| 146 buildCounterAccountActiveAdSummary--; | |
| 147 return o; | |
| 148 } | |
| 149 | |
| 150 checkAccountActiveAdSummary(api.AccountActiveAdSummary o) { | |
| 151 buildCounterAccountActiveAdSummary++; | |
| 152 if (buildCounterAccountActiveAdSummary < 3) { | |
| 153 unittest.expect(o.accountId, unittest.equals('foo')); | |
| 154 unittest.expect(o.activeAds, unittest.equals('foo')); | |
| 155 unittest.expect(o.activeAdsLimitTier, unittest.equals('foo')); | |
| 156 unittest.expect(o.availableAds, unittest.equals('foo')); | |
| 157 unittest.expect(o.kind, unittest.equals('foo')); | |
| 158 } | |
| 159 buildCounterAccountActiveAdSummary--; | |
| 160 } | |
| 161 | |
| 162 buildUnnamed1310() { | |
| 163 var o = new core.List<core.String>(); | |
| 164 o.add("foo"); | |
| 165 o.add("foo"); | |
| 166 return o; | |
| 167 } | |
| 168 | |
| 169 checkUnnamed1310(core.List<core.String> o) { | |
| 170 unittest.expect(o, unittest.hasLength(2)); | |
| 171 unittest.expect(o[0], unittest.equals('foo')); | |
| 172 unittest.expect(o[1], unittest.equals('foo')); | |
| 173 } | |
| 174 | |
| 175 core.int buildCounterAccountPermission = 0; | |
| 176 buildAccountPermission() { | |
| 177 var o = new api.AccountPermission(); | |
| 178 buildCounterAccountPermission++; | |
| 179 if (buildCounterAccountPermission < 3) { | |
| 180 o.accountProfiles = buildUnnamed1310(); | |
| 181 o.id = "foo"; | |
| 182 o.kind = "foo"; | |
| 183 o.level = "foo"; | |
| 184 o.name = "foo"; | |
| 185 o.permissionGroupId = "foo"; | |
| 186 } | |
| 187 buildCounterAccountPermission--; | |
| 188 return o; | |
| 189 } | |
| 190 | |
| 191 checkAccountPermission(api.AccountPermission o) { | |
| 192 buildCounterAccountPermission++; | |
| 193 if (buildCounterAccountPermission < 3) { | |
| 194 checkUnnamed1310(o.accountProfiles); | |
| 195 unittest.expect(o.id, unittest.equals('foo')); | |
| 196 unittest.expect(o.kind, unittest.equals('foo')); | |
| 197 unittest.expect(o.level, unittest.equals('foo')); | |
| 198 unittest.expect(o.name, unittest.equals('foo')); | |
| 199 unittest.expect(o.permissionGroupId, unittest.equals('foo')); | |
| 200 } | |
| 201 buildCounterAccountPermission--; | |
| 202 } | |
| 203 | |
| 204 core.int buildCounterAccountPermissionGroup = 0; | |
| 205 buildAccountPermissionGroup() { | |
| 206 var o = new api.AccountPermissionGroup(); | |
| 207 buildCounterAccountPermissionGroup++; | |
| 208 if (buildCounterAccountPermissionGroup < 3) { | |
| 209 o.id = "foo"; | |
| 210 o.kind = "foo"; | |
| 211 o.name = "foo"; | |
| 212 } | |
| 213 buildCounterAccountPermissionGroup--; | |
| 214 return o; | |
| 215 } | |
| 216 | |
| 217 checkAccountPermissionGroup(api.AccountPermissionGroup o) { | |
| 218 buildCounterAccountPermissionGroup++; | |
| 219 if (buildCounterAccountPermissionGroup < 3) { | |
| 220 unittest.expect(o.id, unittest.equals('foo')); | |
| 221 unittest.expect(o.kind, unittest.equals('foo')); | |
| 222 unittest.expect(o.name, unittest.equals('foo')); | |
| 223 } | |
| 224 buildCounterAccountPermissionGroup--; | |
| 225 } | |
| 226 | |
| 227 buildUnnamed1311() { | |
| 228 var o = new core.List<api.AccountPermissionGroup>(); | |
| 229 o.add(buildAccountPermissionGroup()); | |
| 230 o.add(buildAccountPermissionGroup()); | |
| 231 return o; | |
| 232 } | |
| 233 | |
| 234 checkUnnamed1311(core.List<api.AccountPermissionGroup> o) { | |
| 235 unittest.expect(o, unittest.hasLength(2)); | |
| 236 checkAccountPermissionGroup(o[0]); | |
| 237 checkAccountPermissionGroup(o[1]); | |
| 238 } | |
| 239 | |
| 240 core.int buildCounterAccountPermissionGroupsListResponse = 0; | |
| 241 buildAccountPermissionGroupsListResponse() { | |
| 242 var o = new api.AccountPermissionGroupsListResponse(); | |
| 243 buildCounterAccountPermissionGroupsListResponse++; | |
| 244 if (buildCounterAccountPermissionGroupsListResponse < 3) { | |
| 245 o.accountPermissionGroups = buildUnnamed1311(); | |
| 246 o.kind = "foo"; | |
| 247 } | |
| 248 buildCounterAccountPermissionGroupsListResponse--; | |
| 249 return o; | |
| 250 } | |
| 251 | |
| 252 checkAccountPermissionGroupsListResponse(api.AccountPermissionGroupsListResponse
o) { | |
| 253 buildCounterAccountPermissionGroupsListResponse++; | |
| 254 if (buildCounterAccountPermissionGroupsListResponse < 3) { | |
| 255 checkUnnamed1311(o.accountPermissionGroups); | |
| 256 unittest.expect(o.kind, unittest.equals('foo')); | |
| 257 } | |
| 258 buildCounterAccountPermissionGroupsListResponse--; | |
| 259 } | |
| 260 | |
| 261 buildUnnamed1312() { | |
| 262 var o = new core.List<api.AccountPermission>(); | |
| 263 o.add(buildAccountPermission()); | |
| 264 o.add(buildAccountPermission()); | |
| 265 return o; | |
| 266 } | |
| 267 | |
| 268 checkUnnamed1312(core.List<api.AccountPermission> o) { | |
| 269 unittest.expect(o, unittest.hasLength(2)); | |
| 270 checkAccountPermission(o[0]); | |
| 271 checkAccountPermission(o[1]); | |
| 272 } | |
| 273 | |
| 274 core.int buildCounterAccountPermissionsListResponse = 0; | |
| 275 buildAccountPermissionsListResponse() { | |
| 276 var o = new api.AccountPermissionsListResponse(); | |
| 277 buildCounterAccountPermissionsListResponse++; | |
| 278 if (buildCounterAccountPermissionsListResponse < 3) { | |
| 279 o.accountPermissions = buildUnnamed1312(); | |
| 280 o.kind = "foo"; | |
| 281 } | |
| 282 buildCounterAccountPermissionsListResponse--; | |
| 283 return o; | |
| 284 } | |
| 285 | |
| 286 checkAccountPermissionsListResponse(api.AccountPermissionsListResponse o) { | |
| 287 buildCounterAccountPermissionsListResponse++; | |
| 288 if (buildCounterAccountPermissionsListResponse < 3) { | |
| 289 checkUnnamed1312(o.accountPermissions); | |
| 290 unittest.expect(o.kind, unittest.equals('foo')); | |
| 291 } | |
| 292 buildCounterAccountPermissionsListResponse--; | |
| 293 } | |
| 294 | |
| 295 core.int buildCounterAccountUserProfile = 0; | |
| 296 buildAccountUserProfile() { | |
| 297 var o = new api.AccountUserProfile(); | |
| 298 buildCounterAccountUserProfile++; | |
| 299 if (buildCounterAccountUserProfile < 3) { | |
| 300 o.accountId = "foo"; | |
| 301 o.active = true; | |
| 302 o.advertiserFilter = buildObjectFilter(); | |
| 303 o.campaignFilter = buildObjectFilter(); | |
| 304 o.comments = "foo"; | |
| 305 o.email = "foo"; | |
| 306 o.id = "foo"; | |
| 307 o.kind = "foo"; | |
| 308 o.locale = "foo"; | |
| 309 o.name = "foo"; | |
| 310 o.siteFilter = buildObjectFilter(); | |
| 311 o.subaccountId = "foo"; | |
| 312 o.traffickerType = "foo"; | |
| 313 o.userAccessType = "foo"; | |
| 314 o.userRoleFilter = buildObjectFilter(); | |
| 315 o.userRoleId = "foo"; | |
| 316 } | |
| 317 buildCounterAccountUserProfile--; | |
| 318 return o; | |
| 319 } | |
| 320 | |
| 321 checkAccountUserProfile(api.AccountUserProfile o) { | |
| 322 buildCounterAccountUserProfile++; | |
| 323 if (buildCounterAccountUserProfile < 3) { | |
| 324 unittest.expect(o.accountId, unittest.equals('foo')); | |
| 325 unittest.expect(o.active, unittest.isTrue); | |
| 326 checkObjectFilter(o.advertiserFilter); | |
| 327 checkObjectFilter(o.campaignFilter); | |
| 328 unittest.expect(o.comments, unittest.equals('foo')); | |
| 329 unittest.expect(o.email, unittest.equals('foo')); | |
| 330 unittest.expect(o.id, unittest.equals('foo')); | |
| 331 unittest.expect(o.kind, unittest.equals('foo')); | |
| 332 unittest.expect(o.locale, unittest.equals('foo')); | |
| 333 unittest.expect(o.name, unittest.equals('foo')); | |
| 334 checkObjectFilter(o.siteFilter); | |
| 335 unittest.expect(o.subaccountId, unittest.equals('foo')); | |
| 336 unittest.expect(o.traffickerType, unittest.equals('foo')); | |
| 337 unittest.expect(o.userAccessType, unittest.equals('foo')); | |
| 338 checkObjectFilter(o.userRoleFilter); | |
| 339 unittest.expect(o.userRoleId, unittest.equals('foo')); | |
| 340 } | |
| 341 buildCounterAccountUserProfile--; | |
| 342 } | |
| 343 | |
| 344 buildUnnamed1313() { | |
| 345 var o = new core.List<api.AccountUserProfile>(); | |
| 346 o.add(buildAccountUserProfile()); | |
| 347 o.add(buildAccountUserProfile()); | |
| 348 return o; | |
| 349 } | |
| 350 | |
| 351 checkUnnamed1313(core.List<api.AccountUserProfile> o) { | |
| 352 unittest.expect(o, unittest.hasLength(2)); | |
| 353 checkAccountUserProfile(o[0]); | |
| 354 checkAccountUserProfile(o[1]); | |
| 355 } | |
| 356 | |
| 357 core.int buildCounterAccountUserProfilesListResponse = 0; | |
| 358 buildAccountUserProfilesListResponse() { | |
| 359 var o = new api.AccountUserProfilesListResponse(); | |
| 360 buildCounterAccountUserProfilesListResponse++; | |
| 361 if (buildCounterAccountUserProfilesListResponse < 3) { | |
| 362 o.accountUserProfiles = buildUnnamed1313(); | |
| 363 o.kind = "foo"; | |
| 364 o.nextPageToken = "foo"; | |
| 365 } | |
| 366 buildCounterAccountUserProfilesListResponse--; | |
| 367 return o; | |
| 368 } | |
| 369 | |
| 370 checkAccountUserProfilesListResponse(api.AccountUserProfilesListResponse o) { | |
| 371 buildCounterAccountUserProfilesListResponse++; | |
| 372 if (buildCounterAccountUserProfilesListResponse < 3) { | |
| 373 checkUnnamed1313(o.accountUserProfiles); | |
| 374 unittest.expect(o.kind, unittest.equals('foo')); | |
| 375 unittest.expect(o.nextPageToken, unittest.equals('foo')); | |
| 376 } | |
| 377 buildCounterAccountUserProfilesListResponse--; | |
| 378 } | |
| 379 | |
| 380 buildUnnamed1314() { | |
| 381 var o = new core.List<api.Account>(); | |
| 382 o.add(buildAccount()); | |
| 383 o.add(buildAccount()); | |
| 384 return o; | |
| 385 } | |
| 386 | |
| 387 checkUnnamed1314(core.List<api.Account> o) { | |
| 388 unittest.expect(o, unittest.hasLength(2)); | |
| 389 checkAccount(o[0]); | |
| 390 checkAccount(o[1]); | |
| 391 } | |
| 392 | |
| 393 core.int buildCounterAccountsListResponse = 0; | |
| 394 buildAccountsListResponse() { | |
| 395 var o = new api.AccountsListResponse(); | |
| 396 buildCounterAccountsListResponse++; | |
| 397 if (buildCounterAccountsListResponse < 3) { | |
| 398 o.accounts = buildUnnamed1314(); | |
| 399 o.kind = "foo"; | |
| 400 o.nextPageToken = "foo"; | |
| 401 } | |
| 402 buildCounterAccountsListResponse--; | |
| 403 return o; | |
| 404 } | |
| 405 | |
| 406 checkAccountsListResponse(api.AccountsListResponse o) { | |
| 407 buildCounterAccountsListResponse++; | |
| 408 if (buildCounterAccountsListResponse < 3) { | |
| 409 checkUnnamed1314(o.accounts); | |
| 410 unittest.expect(o.kind, unittest.equals('foo')); | |
| 411 unittest.expect(o.nextPageToken, unittest.equals('foo')); | |
| 412 } | |
| 413 buildCounterAccountsListResponse--; | |
| 414 } | |
| 415 | |
| 416 buildUnnamed1315() { | |
| 417 var o = new core.List<api.DimensionValue>(); | |
| 418 o.add(buildDimensionValue()); | |
| 419 o.add(buildDimensionValue()); | |
| 420 return o; | |
| 421 } | |
| 422 | |
| 423 checkUnnamed1315(core.List<api.DimensionValue> o) { | |
| 424 unittest.expect(o, unittest.hasLength(2)); | |
| 425 checkDimensionValue(o[0]); | |
| 426 checkDimensionValue(o[1]); | |
| 427 } | |
| 428 | |
| 429 buildUnnamed1316() { | |
| 430 var o = new core.List<core.String>(); | |
| 431 o.add("foo"); | |
| 432 o.add("foo"); | |
| 433 return o; | |
| 434 } | |
| 435 | |
| 436 checkUnnamed1316(core.List<core.String> o) { | |
| 437 unittest.expect(o, unittest.hasLength(2)); | |
| 438 unittest.expect(o[0], unittest.equals('foo')); | |
| 439 unittest.expect(o[1], unittest.equals('foo')); | |
| 440 } | |
| 441 | |
| 442 core.int buildCounterActivities = 0; | |
| 443 buildActivities() { | |
| 444 var o = new api.Activities(); | |
| 445 buildCounterActivities++; | |
| 446 if (buildCounterActivities < 3) { | |
| 447 o.filters = buildUnnamed1315(); | |
| 448 o.kind = "foo"; | |
| 449 o.metricNames = buildUnnamed1316(); | |
| 450 } | |
| 451 buildCounterActivities--; | |
| 452 return o; | |
| 453 } | |
| 454 | |
| 455 checkActivities(api.Activities o) { | |
| 456 buildCounterActivities++; | |
| 457 if (buildCounterActivities < 3) { | |
| 458 checkUnnamed1315(o.filters); | |
| 459 unittest.expect(o.kind, unittest.equals('foo')); | |
| 460 checkUnnamed1316(o.metricNames); | |
| 461 } | |
| 462 buildCounterActivities--; | |
| 463 } | |
| 464 | |
| 465 buildUnnamed1317() { | |
| 466 var o = new core.List<api.CreativeGroupAssignment>(); | |
| 467 o.add(buildCreativeGroupAssignment()); | |
| 468 o.add(buildCreativeGroupAssignment()); | |
| 469 return o; | |
| 470 } | |
| 471 | |
| 472 checkUnnamed1317(core.List<api.CreativeGroupAssignment> o) { | |
| 473 unittest.expect(o, unittest.hasLength(2)); | |
| 474 checkCreativeGroupAssignment(o[0]); | |
| 475 checkCreativeGroupAssignment(o[1]); | |
| 476 } | |
| 477 | |
| 478 buildUnnamed1318() { | |
| 479 var o = new core.List<api.EventTagOverride>(); | |
| 480 o.add(buildEventTagOverride()); | |
| 481 o.add(buildEventTagOverride()); | |
| 482 return o; | |
| 483 } | |
| 484 | |
| 485 checkUnnamed1318(core.List<api.EventTagOverride> o) { | |
| 486 unittest.expect(o, unittest.hasLength(2)); | |
| 487 checkEventTagOverride(o[0]); | |
| 488 checkEventTagOverride(o[1]); | |
| 489 } | |
| 490 | |
| 491 buildUnnamed1319() { | |
| 492 var o = new core.List<api.PlacementAssignment>(); | |
| 493 o.add(buildPlacementAssignment()); | |
| 494 o.add(buildPlacementAssignment()); | |
| 495 return o; | |
| 496 } | |
| 497 | |
| 498 checkUnnamed1319(core.List<api.PlacementAssignment> o) { | |
| 499 unittest.expect(o, unittest.hasLength(2)); | |
| 500 checkPlacementAssignment(o[0]); | |
| 501 checkPlacementAssignment(o[1]); | |
| 502 } | |
| 503 | |
| 504 core.int buildCounterAd = 0; | |
| 505 buildAd() { | |
| 506 var o = new api.Ad(); | |
| 507 buildCounterAd++; | |
| 508 if (buildCounterAd < 3) { | |
| 509 o.accountId = "foo"; | |
| 510 o.active = true; | |
| 511 o.advertiserId = "foo"; | |
| 512 o.advertiserIdDimensionValue = buildDimensionValue(); | |
| 513 o.archived = true; | |
| 514 o.audienceSegmentId = "foo"; | |
| 515 o.campaignId = "foo"; | |
| 516 o.campaignIdDimensionValue = buildDimensionValue(); | |
| 517 o.clickThroughUrl = buildClickThroughUrl(); | |
| 518 o.clickThroughUrlSuffixProperties = buildClickThroughUrlSuffixProperties(); | |
| 519 o.comments = "foo"; | |
| 520 o.compatibility = "foo"; | |
| 521 o.createInfo = buildLastModifiedInfo(); | |
| 522 o.creativeGroupAssignments = buildUnnamed1317(); | |
| 523 o.creativeRotation = buildCreativeRotation(); | |
| 524 o.dayPartTargeting = buildDayPartTargeting(); | |
| 525 o.defaultClickThroughEventTagProperties = buildDefaultClickThroughEventTagPr
operties(); | |
| 526 o.deliverySchedule = buildDeliverySchedule(); | |
| 527 o.dynamicClickTracker = true; | |
| 528 o.endTime = core.DateTime.parse("2002-02-27T14:01:02"); | |
| 529 o.eventTagOverrides = buildUnnamed1318(); | |
| 530 o.geoTargeting = buildGeoTargeting(); | |
| 531 o.id = "foo"; | |
| 532 o.idDimensionValue = buildDimensionValue(); | |
| 533 o.keyValueTargetingExpression = buildKeyValueTargetingExpression(); | |
| 534 o.kind = "foo"; | |
| 535 o.lastModifiedInfo = buildLastModifiedInfo(); | |
| 536 o.name = "foo"; | |
| 537 o.placementAssignments = buildUnnamed1319(); | |
| 538 o.remarketingListExpression = buildListTargetingExpression(); | |
| 539 o.size = buildSize(); | |
| 540 o.sslCompliant = true; | |
| 541 o.sslRequired = true; | |
| 542 o.startTime = core.DateTime.parse("2002-02-27T14:01:02"); | |
| 543 o.subaccountId = "foo"; | |
| 544 o.technologyTargeting = buildTechnologyTargeting(); | |
| 545 o.type = "foo"; | |
| 546 } | |
| 547 buildCounterAd--; | |
| 548 return o; | |
| 549 } | |
| 550 | |
| 551 checkAd(api.Ad o) { | |
| 552 buildCounterAd++; | |
| 553 if (buildCounterAd < 3) { | |
| 554 unittest.expect(o.accountId, unittest.equals('foo')); | |
| 555 unittest.expect(o.active, unittest.isTrue); | |
| 556 unittest.expect(o.advertiserId, unittest.equals('foo')); | |
| 557 checkDimensionValue(o.advertiserIdDimensionValue); | |
| 558 unittest.expect(o.archived, unittest.isTrue); | |
| 559 unittest.expect(o.audienceSegmentId, unittest.equals('foo')); | |
| 560 unittest.expect(o.campaignId, unittest.equals('foo')); | |
| 561 checkDimensionValue(o.campaignIdDimensionValue); | |
| 562 checkClickThroughUrl(o.clickThroughUrl); | |
| 563 checkClickThroughUrlSuffixProperties(o.clickThroughUrlSuffixProperties); | |
| 564 unittest.expect(o.comments, unittest.equals('foo')); | |
| 565 unittest.expect(o.compatibility, unittest.equals('foo')); | |
| 566 checkLastModifiedInfo(o.createInfo); | |
| 567 checkUnnamed1317(o.creativeGroupAssignments); | |
| 568 checkCreativeRotation(o.creativeRotation); | |
| 569 checkDayPartTargeting(o.dayPartTargeting); | |
| 570 checkDefaultClickThroughEventTagProperties(o.defaultClickThroughEventTagProp
erties); | |
| 571 checkDeliverySchedule(o.deliverySchedule); | |
| 572 unittest.expect(o.dynamicClickTracker, unittest.isTrue); | |
| 573 unittest.expect(o.endTime, unittest.equals(core.DateTime.parse("2002-02-27T1
4:01:02"))); | |
| 574 checkUnnamed1318(o.eventTagOverrides); | |
| 575 checkGeoTargeting(o.geoTargeting); | |
| 576 unittest.expect(o.id, unittest.equals('foo')); | |
| 577 checkDimensionValue(o.idDimensionValue); | |
| 578 checkKeyValueTargetingExpression(o.keyValueTargetingExpression); | |
| 579 unittest.expect(o.kind, unittest.equals('foo')); | |
| 580 checkLastModifiedInfo(o.lastModifiedInfo); | |
| 581 unittest.expect(o.name, unittest.equals('foo')); | |
| 582 checkUnnamed1319(o.placementAssignments); | |
| 583 checkListTargetingExpression(o.remarketingListExpression); | |
| 584 checkSize(o.size); | |
| 585 unittest.expect(o.sslCompliant, unittest.isTrue); | |
| 586 unittest.expect(o.sslRequired, unittest.isTrue); | |
| 587 unittest.expect(o.startTime, unittest.equals(core.DateTime.parse("2002-02-27
T14:01:02"))); | |
| 588 unittest.expect(o.subaccountId, unittest.equals('foo')); | |
| 589 checkTechnologyTargeting(o.technologyTargeting); | |
| 590 unittest.expect(o.type, unittest.equals('foo')); | |
| 591 } | |
| 592 buildCounterAd--; | |
| 593 } | |
| 594 | |
| 595 core.int buildCounterAdSlot = 0; | |
| 596 buildAdSlot() { | |
| 597 var o = new api.AdSlot(); | |
| 598 buildCounterAdSlot++; | |
| 599 if (buildCounterAdSlot < 3) { | |
| 600 o.comment = "foo"; | |
| 601 o.compatibility = "foo"; | |
| 602 o.height = "foo"; | |
| 603 o.linkedPlacementId = "foo"; | |
| 604 o.name = "foo"; | |
| 605 o.paymentSourceType = "foo"; | |
| 606 o.primary = true; | |
| 607 o.width = "foo"; | |
| 608 } | |
| 609 buildCounterAdSlot--; | |
| 610 return o; | |
| 611 } | |
| 612 | |
| 613 checkAdSlot(api.AdSlot o) { | |
| 614 buildCounterAdSlot++; | |
| 615 if (buildCounterAdSlot < 3) { | |
| 616 unittest.expect(o.comment, unittest.equals('foo')); | |
| 617 unittest.expect(o.compatibility, unittest.equals('foo')); | |
| 618 unittest.expect(o.height, unittest.equals('foo')); | |
| 619 unittest.expect(o.linkedPlacementId, unittest.equals('foo')); | |
| 620 unittest.expect(o.name, unittest.equals('foo')); | |
| 621 unittest.expect(o.paymentSourceType, unittest.equals('foo')); | |
| 622 unittest.expect(o.primary, unittest.isTrue); | |
| 623 unittest.expect(o.width, unittest.equals('foo')); | |
| 624 } | |
| 625 buildCounterAdSlot--; | |
| 626 } | |
| 627 | |
| 628 buildUnnamed1320() { | |
| 629 var o = new core.List<api.Ad>(); | |
| 630 o.add(buildAd()); | |
| 631 o.add(buildAd()); | |
| 632 return o; | |
| 633 } | |
| 634 | |
| 635 checkUnnamed1320(core.List<api.Ad> o) { | |
| 636 unittest.expect(o, unittest.hasLength(2)); | |
| 637 checkAd(o[0]); | |
| 638 checkAd(o[1]); | |
| 639 } | |
| 640 | |
| 641 core.int buildCounterAdsListResponse = 0; | |
| 642 buildAdsListResponse() { | |
| 643 var o = new api.AdsListResponse(); | |
| 644 buildCounterAdsListResponse++; | |
| 645 if (buildCounterAdsListResponse < 3) { | |
| 646 o.ads = buildUnnamed1320(); | |
| 647 o.kind = "foo"; | |
| 648 o.nextPageToken = "foo"; | |
| 649 } | |
| 650 buildCounterAdsListResponse--; | |
| 651 return o; | |
| 652 } | |
| 653 | |
| 654 checkAdsListResponse(api.AdsListResponse o) { | |
| 655 buildCounterAdsListResponse++; | |
| 656 if (buildCounterAdsListResponse < 3) { | |
| 657 checkUnnamed1320(o.ads); | |
| 658 unittest.expect(o.kind, unittest.equals('foo')); | |
| 659 unittest.expect(o.nextPageToken, unittest.equals('foo')); | |
| 660 } | |
| 661 buildCounterAdsListResponse--; | |
| 662 } | |
| 663 | |
| 664 core.int buildCounterAdvertiser = 0; | |
| 665 buildAdvertiser() { | |
| 666 var o = new api.Advertiser(); | |
| 667 buildCounterAdvertiser++; | |
| 668 if (buildCounterAdvertiser < 3) { | |
| 669 o.accountId = "foo"; | |
| 670 o.advertiserGroupId = "foo"; | |
| 671 o.clickThroughUrlSuffix = "foo"; | |
| 672 o.defaultClickThroughEventTagId = "foo"; | |
| 673 o.defaultEmail = "foo"; | |
| 674 o.floodlightConfigurationId = "foo"; | |
| 675 o.floodlightConfigurationIdDimensionValue = buildDimensionValue(); | |
| 676 o.id = "foo"; | |
| 677 o.idDimensionValue = buildDimensionValue(); | |
| 678 o.kind = "foo"; | |
| 679 o.name = "foo"; | |
| 680 o.originalFloodlightConfigurationId = "foo"; | |
| 681 o.status = "foo"; | |
| 682 o.subaccountId = "foo"; | |
| 683 o.suspended = true; | |
| 684 } | |
| 685 buildCounterAdvertiser--; | |
| 686 return o; | |
| 687 } | |
| 688 | |
| 689 checkAdvertiser(api.Advertiser o) { | |
| 690 buildCounterAdvertiser++; | |
| 691 if (buildCounterAdvertiser < 3) { | |
| 692 unittest.expect(o.accountId, unittest.equals('foo')); | |
| 693 unittest.expect(o.advertiserGroupId, unittest.equals('foo')); | |
| 694 unittest.expect(o.clickThroughUrlSuffix, unittest.equals('foo')); | |
| 695 unittest.expect(o.defaultClickThroughEventTagId, unittest.equals('foo')); | |
| 696 unittest.expect(o.defaultEmail, unittest.equals('foo')); | |
| 697 unittest.expect(o.floodlightConfigurationId, unittest.equals('foo')); | |
| 698 checkDimensionValue(o.floodlightConfigurationIdDimensionValue); | |
| 699 unittest.expect(o.id, unittest.equals('foo')); | |
| 700 checkDimensionValue(o.idDimensionValue); | |
| 701 unittest.expect(o.kind, unittest.equals('foo')); | |
| 702 unittest.expect(o.name, unittest.equals('foo')); | |
| 703 unittest.expect(o.originalFloodlightConfigurationId, unittest.equals('foo'))
; | |
| 704 unittest.expect(o.status, unittest.equals('foo')); | |
| 705 unittest.expect(o.subaccountId, unittest.equals('foo')); | |
| 706 unittest.expect(o.suspended, unittest.isTrue); | |
| 707 } | |
| 708 buildCounterAdvertiser--; | |
| 709 } | |
| 710 | |
| 711 core.int buildCounterAdvertiserGroup = 0; | |
| 712 buildAdvertiserGroup() { | |
| 713 var o = new api.AdvertiserGroup(); | |
| 714 buildCounterAdvertiserGroup++; | |
| 715 if (buildCounterAdvertiserGroup < 3) { | |
| 716 o.accountId = "foo"; | |
| 717 o.id = "foo"; | |
| 718 o.kind = "foo"; | |
| 719 o.name = "foo"; | |
| 720 } | |
| 721 buildCounterAdvertiserGroup--; | |
| 722 return o; | |
| 723 } | |
| 724 | |
| 725 checkAdvertiserGroup(api.AdvertiserGroup o) { | |
| 726 buildCounterAdvertiserGroup++; | |
| 727 if (buildCounterAdvertiserGroup < 3) { | |
| 728 unittest.expect(o.accountId, unittest.equals('foo')); | |
| 729 unittest.expect(o.id, unittest.equals('foo')); | |
| 730 unittest.expect(o.kind, unittest.equals('foo')); | |
| 731 unittest.expect(o.name, unittest.equals('foo')); | |
| 732 } | |
| 733 buildCounterAdvertiserGroup--; | |
| 734 } | |
| 735 | |
| 736 buildUnnamed1321() { | |
| 737 var o = new core.List<api.AdvertiserGroup>(); | |
| 738 o.add(buildAdvertiserGroup()); | |
| 739 o.add(buildAdvertiserGroup()); | |
| 740 return o; | |
| 741 } | |
| 742 | |
| 743 checkUnnamed1321(core.List<api.AdvertiserGroup> o) { | |
| 744 unittest.expect(o, unittest.hasLength(2)); | |
| 745 checkAdvertiserGroup(o[0]); | |
| 746 checkAdvertiserGroup(o[1]); | |
| 747 } | |
| 748 | |
| 749 core.int buildCounterAdvertiserGroupsListResponse = 0; | |
| 750 buildAdvertiserGroupsListResponse() { | |
| 751 var o = new api.AdvertiserGroupsListResponse(); | |
| 752 buildCounterAdvertiserGroupsListResponse++; | |
| 753 if (buildCounterAdvertiserGroupsListResponse < 3) { | |
| 754 o.advertiserGroups = buildUnnamed1321(); | |
| 755 o.kind = "foo"; | |
| 756 o.nextPageToken = "foo"; | |
| 757 } | |
| 758 buildCounterAdvertiserGroupsListResponse--; | |
| 759 return o; | |
| 760 } | |
| 761 | |
| 762 checkAdvertiserGroupsListResponse(api.AdvertiserGroupsListResponse o) { | |
| 763 buildCounterAdvertiserGroupsListResponse++; | |
| 764 if (buildCounterAdvertiserGroupsListResponse < 3) { | |
| 765 checkUnnamed1321(o.advertiserGroups); | |
| 766 unittest.expect(o.kind, unittest.equals('foo')); | |
| 767 unittest.expect(o.nextPageToken, unittest.equals('foo')); | |
| 768 } | |
| 769 buildCounterAdvertiserGroupsListResponse--; | |
| 770 } | |
| 771 | |
| 772 buildUnnamed1322() { | |
| 773 var o = new core.List<api.Advertiser>(); | |
| 774 o.add(buildAdvertiser()); | |
| 775 o.add(buildAdvertiser()); | |
| 776 return o; | |
| 777 } | |
| 778 | |
| 779 checkUnnamed1322(core.List<api.Advertiser> o) { | |
| 780 unittest.expect(o, unittest.hasLength(2)); | |
| 781 checkAdvertiser(o[0]); | |
| 782 checkAdvertiser(o[1]); | |
| 783 } | |
| 784 | |
| 785 core.int buildCounterAdvertisersListResponse = 0; | |
| 786 buildAdvertisersListResponse() { | |
| 787 var o = new api.AdvertisersListResponse(); | |
| 788 buildCounterAdvertisersListResponse++; | |
| 789 if (buildCounterAdvertisersListResponse < 3) { | |
| 790 o.advertisers = buildUnnamed1322(); | |
| 791 o.kind = "foo"; | |
| 792 o.nextPageToken = "foo"; | |
| 793 } | |
| 794 buildCounterAdvertisersListResponse--; | |
| 795 return o; | |
| 796 } | |
| 797 | |
| 798 checkAdvertisersListResponse(api.AdvertisersListResponse o) { | |
| 799 buildCounterAdvertisersListResponse++; | |
| 800 if (buildCounterAdvertisersListResponse < 3) { | |
| 801 checkUnnamed1322(o.advertisers); | |
| 802 unittest.expect(o.kind, unittest.equals('foo')); | |
| 803 unittest.expect(o.nextPageToken, unittest.equals('foo')); | |
| 804 } | |
| 805 buildCounterAdvertisersListResponse--; | |
| 806 } | |
| 807 | |
| 808 core.int buildCounterAudienceSegment = 0; | |
| 809 buildAudienceSegment() { | |
| 810 var o = new api.AudienceSegment(); | |
| 811 buildCounterAudienceSegment++; | |
| 812 if (buildCounterAudienceSegment < 3) { | |
| 813 o.allocation = 42; | |
| 814 o.id = "foo"; | |
| 815 o.name = "foo"; | |
| 816 } | |
| 817 buildCounterAudienceSegment--; | |
| 818 return o; | |
| 819 } | |
| 820 | |
| 821 checkAudienceSegment(api.AudienceSegment o) { | |
| 822 buildCounterAudienceSegment++; | |
| 823 if (buildCounterAudienceSegment < 3) { | |
| 824 unittest.expect(o.allocation, unittest.equals(42)); | |
| 825 unittest.expect(o.id, unittest.equals('foo')); | |
| 826 unittest.expect(o.name, unittest.equals('foo')); | |
| 827 } | |
| 828 buildCounterAudienceSegment--; | |
| 829 } | |
| 830 | |
| 831 buildUnnamed1323() { | |
| 832 var o = new core.List<api.AudienceSegment>(); | |
| 833 o.add(buildAudienceSegment()); | |
| 834 o.add(buildAudienceSegment()); | |
| 835 return o; | |
| 836 } | |
| 837 | |
| 838 checkUnnamed1323(core.List<api.AudienceSegment> o) { | |
| 839 unittest.expect(o, unittest.hasLength(2)); | |
| 840 checkAudienceSegment(o[0]); | |
| 841 checkAudienceSegment(o[1]); | |
| 842 } | |
| 843 | |
| 844 core.int buildCounterAudienceSegmentGroup = 0; | |
| 845 buildAudienceSegmentGroup() { | |
| 846 var o = new api.AudienceSegmentGroup(); | |
| 847 buildCounterAudienceSegmentGroup++; | |
| 848 if (buildCounterAudienceSegmentGroup < 3) { | |
| 849 o.audienceSegments = buildUnnamed1323(); | |
| 850 o.id = "foo"; | |
| 851 o.name = "foo"; | |
| 852 } | |
| 853 buildCounterAudienceSegmentGroup--; | |
| 854 return o; | |
| 855 } | |
| 856 | |
| 857 checkAudienceSegmentGroup(api.AudienceSegmentGroup o) { | |
| 858 buildCounterAudienceSegmentGroup++; | |
| 859 if (buildCounterAudienceSegmentGroup < 3) { | |
| 860 checkUnnamed1323(o.audienceSegments); | |
| 861 unittest.expect(o.id, unittest.equals('foo')); | |
| 862 unittest.expect(o.name, unittest.equals('foo')); | |
| 863 } | |
| 864 buildCounterAudienceSegmentGroup--; | |
| 865 } | |
| 866 | |
| 867 core.int buildCounterBrowser = 0; | |
| 868 buildBrowser() { | |
| 869 var o = new api.Browser(); | |
| 870 buildCounterBrowser++; | |
| 871 if (buildCounterBrowser < 3) { | |
| 872 o.browserVersionId = "foo"; | |
| 873 o.dartId = "foo"; | |
| 874 o.kind = "foo"; | |
| 875 o.majorVersion = "foo"; | |
| 876 o.minorVersion = "foo"; | |
| 877 o.name = "foo"; | |
| 878 } | |
| 879 buildCounterBrowser--; | |
| 880 return o; | |
| 881 } | |
| 882 | |
| 883 checkBrowser(api.Browser o) { | |
| 884 buildCounterBrowser++; | |
| 885 if (buildCounterBrowser < 3) { | |
| 886 unittest.expect(o.browserVersionId, unittest.equals('foo')); | |
| 887 unittest.expect(o.dartId, unittest.equals('foo')); | |
| 888 unittest.expect(o.kind, unittest.equals('foo')); | |
| 889 unittest.expect(o.majorVersion, unittest.equals('foo')); | |
| 890 unittest.expect(o.minorVersion, unittest.equals('foo')); | |
| 891 unittest.expect(o.name, unittest.equals('foo')); | |
| 892 } | |
| 893 buildCounterBrowser--; | |
| 894 } | |
| 895 | |
| 896 buildUnnamed1324() { | |
| 897 var o = new core.List<api.Browser>(); | |
| 898 o.add(buildBrowser()); | |
| 899 o.add(buildBrowser()); | |
| 900 return o; | |
| 901 } | |
| 902 | |
| 903 checkUnnamed1324(core.List<api.Browser> o) { | |
| 904 unittest.expect(o, unittest.hasLength(2)); | |
| 905 checkBrowser(o[0]); | |
| 906 checkBrowser(o[1]); | |
| 907 } | |
| 908 | |
| 909 core.int buildCounterBrowsersListResponse = 0; | |
| 910 buildBrowsersListResponse() { | |
| 911 var o = new api.BrowsersListResponse(); | |
| 912 buildCounterBrowsersListResponse++; | |
| 913 if (buildCounterBrowsersListResponse < 3) { | |
| 914 o.browsers = buildUnnamed1324(); | |
| 915 o.kind = "foo"; | |
| 916 } | |
| 917 buildCounterBrowsersListResponse--; | |
| 918 return o; | |
| 919 } | |
| 920 | |
| 921 checkBrowsersListResponse(api.BrowsersListResponse o) { | |
| 922 buildCounterBrowsersListResponse++; | |
| 923 if (buildCounterBrowsersListResponse < 3) { | |
| 924 checkUnnamed1324(o.browsers); | |
| 925 unittest.expect(o.kind, unittest.equals('foo')); | |
| 926 } | |
| 927 buildCounterBrowsersListResponse--; | |
| 928 } | |
| 929 | |
| 930 buildUnnamed1325() { | |
| 931 var o = new core.List<api.CreativeOptimizationConfiguration>(); | |
| 932 o.add(buildCreativeOptimizationConfiguration()); | |
| 933 o.add(buildCreativeOptimizationConfiguration()); | |
| 934 return o; | |
| 935 } | |
| 936 | |
| 937 checkUnnamed1325(core.List<api.CreativeOptimizationConfiguration> o) { | |
| 938 unittest.expect(o, unittest.hasLength(2)); | |
| 939 checkCreativeOptimizationConfiguration(o[0]); | |
| 940 checkCreativeOptimizationConfiguration(o[1]); | |
| 941 } | |
| 942 | |
| 943 buildUnnamed1326() { | |
| 944 var o = new core.List<api.AudienceSegmentGroup>(); | |
| 945 o.add(buildAudienceSegmentGroup()); | |
| 946 o.add(buildAudienceSegmentGroup()); | |
| 947 return o; | |
| 948 } | |
| 949 | |
| 950 checkUnnamed1326(core.List<api.AudienceSegmentGroup> o) { | |
| 951 unittest.expect(o, unittest.hasLength(2)); | |
| 952 checkAudienceSegmentGroup(o[0]); | |
| 953 checkAudienceSegmentGroup(o[1]); | |
| 954 } | |
| 955 | |
| 956 buildUnnamed1327() { | |
| 957 var o = new core.List<core.String>(); | |
| 958 o.add("foo"); | |
| 959 o.add("foo"); | |
| 960 return o; | |
| 961 } | |
| 962 | |
| 963 checkUnnamed1327(core.List<core.String> o) { | |
| 964 unittest.expect(o, unittest.hasLength(2)); | |
| 965 unittest.expect(o[0], unittest.equals('foo')); | |
| 966 unittest.expect(o[1], unittest.equals('foo')); | |
| 967 } | |
| 968 | |
| 969 buildUnnamed1328() { | |
| 970 var o = new core.List<api.EventTagOverride>(); | |
| 971 o.add(buildEventTagOverride()); | |
| 972 o.add(buildEventTagOverride()); | |
| 973 return o; | |
| 974 } | |
| 975 | |
| 976 checkUnnamed1328(core.List<api.EventTagOverride> o) { | |
| 977 unittest.expect(o, unittest.hasLength(2)); | |
| 978 checkEventTagOverride(o[0]); | |
| 979 checkEventTagOverride(o[1]); | |
| 980 } | |
| 981 | |
| 982 buildUnnamed1329() { | |
| 983 var o = new core.List<core.String>(); | |
| 984 o.add("foo"); | |
| 985 o.add("foo"); | |
| 986 return o; | |
| 987 } | |
| 988 | |
| 989 checkUnnamed1329(core.List<core.String> o) { | |
| 990 unittest.expect(o, unittest.hasLength(2)); | |
| 991 unittest.expect(o[0], unittest.equals('foo')); | |
| 992 unittest.expect(o[1], unittest.equals('foo')); | |
| 993 } | |
| 994 | |
| 995 core.int buildCounterCampaign = 0; | |
| 996 buildCampaign() { | |
| 997 var o = new api.Campaign(); | |
| 998 buildCounterCampaign++; | |
| 999 if (buildCounterCampaign < 3) { | |
| 1000 o.accountId = "foo"; | |
| 1001 o.additionalCreativeOptimizationConfigurations = buildUnnamed1325(); | |
| 1002 o.advertiserGroupId = "foo"; | |
| 1003 o.advertiserId = "foo"; | |
| 1004 o.advertiserIdDimensionValue = buildDimensionValue(); | |
| 1005 o.archived = true; | |
| 1006 o.audienceSegmentGroups = buildUnnamed1326(); | |
| 1007 o.billingInvoiceCode = "foo"; | |
| 1008 o.clickThroughUrlSuffixProperties = buildClickThroughUrlSuffixProperties(); | |
| 1009 o.comment = "foo"; | |
| 1010 o.comscoreVceEnabled = true; | |
| 1011 o.createInfo = buildLastModifiedInfo(); | |
| 1012 o.creativeGroupIds = buildUnnamed1327(); | |
| 1013 o.creativeOptimizationConfiguration = buildCreativeOptimizationConfiguration
(); | |
| 1014 o.defaultClickThroughEventTagProperties = buildDefaultClickThroughEventTagPr
operties(); | |
| 1015 o.endDate = core.DateTime.parse("2002-02-27T14:01:02Z"); | |
| 1016 o.eventTagOverrides = buildUnnamed1328(); | |
| 1017 o.externalId = "foo"; | |
| 1018 o.id = "foo"; | |
| 1019 o.idDimensionValue = buildDimensionValue(); | |
| 1020 o.kind = "foo"; | |
| 1021 o.lastModifiedInfo = buildLastModifiedInfo(); | |
| 1022 o.lookbackConfiguration = buildLookbackConfiguration(); | |
| 1023 o.name = "foo"; | |
| 1024 o.nielsenOcrEnabled = true; | |
| 1025 o.startDate = core.DateTime.parse("2002-02-27T14:01:02Z"); | |
| 1026 o.subaccountId = "foo"; | |
| 1027 o.traffickerEmails = buildUnnamed1329(); | |
| 1028 } | |
| 1029 buildCounterCampaign--; | |
| 1030 return o; | |
| 1031 } | |
| 1032 | |
| 1033 checkCampaign(api.Campaign o) { | |
| 1034 buildCounterCampaign++; | |
| 1035 if (buildCounterCampaign < 3) { | |
| 1036 unittest.expect(o.accountId, unittest.equals('foo')); | |
| 1037 checkUnnamed1325(o.additionalCreativeOptimizationConfigurations); | |
| 1038 unittest.expect(o.advertiserGroupId, unittest.equals('foo')); | |
| 1039 unittest.expect(o.advertiserId, unittest.equals('foo')); | |
| 1040 checkDimensionValue(o.advertiserIdDimensionValue); | |
| 1041 unittest.expect(o.archived, unittest.isTrue); | |
| 1042 checkUnnamed1326(o.audienceSegmentGroups); | |
| 1043 unittest.expect(o.billingInvoiceCode, unittest.equals('foo')); | |
| 1044 checkClickThroughUrlSuffixProperties(o.clickThroughUrlSuffixProperties); | |
| 1045 unittest.expect(o.comment, unittest.equals('foo')); | |
| 1046 unittest.expect(o.comscoreVceEnabled, unittest.isTrue); | |
| 1047 checkLastModifiedInfo(o.createInfo); | |
| 1048 checkUnnamed1327(o.creativeGroupIds); | |
| 1049 checkCreativeOptimizationConfiguration(o.creativeOptimizationConfiguration); | |
| 1050 checkDefaultClickThroughEventTagProperties(o.defaultClickThroughEventTagProp
erties); | |
| 1051 unittest.expect(o.endDate, unittest.equals(core.DateTime.parse("2002-02-27T0
0:00:00"))); | |
| 1052 checkUnnamed1328(o.eventTagOverrides); | |
| 1053 unittest.expect(o.externalId, unittest.equals('foo')); | |
| 1054 unittest.expect(o.id, unittest.equals('foo')); | |
| 1055 checkDimensionValue(o.idDimensionValue); | |
| 1056 unittest.expect(o.kind, unittest.equals('foo')); | |
| 1057 checkLastModifiedInfo(o.lastModifiedInfo); | |
| 1058 checkLookbackConfiguration(o.lookbackConfiguration); | |
| 1059 unittest.expect(o.name, unittest.equals('foo')); | |
| 1060 unittest.expect(o.nielsenOcrEnabled, unittest.isTrue); | |
| 1061 unittest.expect(o.startDate, unittest.equals(core.DateTime.parse("2002-02-27
T00:00:00"))); | |
| 1062 unittest.expect(o.subaccountId, unittest.equals('foo')); | |
| 1063 checkUnnamed1329(o.traffickerEmails); | |
| 1064 } | |
| 1065 buildCounterCampaign--; | |
| 1066 } | |
| 1067 | |
| 1068 core.int buildCounterCampaignCreativeAssociation = 0; | |
| 1069 buildCampaignCreativeAssociation() { | |
| 1070 var o = new api.CampaignCreativeAssociation(); | |
| 1071 buildCounterCampaignCreativeAssociation++; | |
| 1072 if (buildCounterCampaignCreativeAssociation < 3) { | |
| 1073 o.creativeId = "foo"; | |
| 1074 o.kind = "foo"; | |
| 1075 } | |
| 1076 buildCounterCampaignCreativeAssociation--; | |
| 1077 return o; | |
| 1078 } | |
| 1079 | |
| 1080 checkCampaignCreativeAssociation(api.CampaignCreativeAssociation o) { | |
| 1081 buildCounterCampaignCreativeAssociation++; | |
| 1082 if (buildCounterCampaignCreativeAssociation < 3) { | |
| 1083 unittest.expect(o.creativeId, unittest.equals('foo')); | |
| 1084 unittest.expect(o.kind, unittest.equals('foo')); | |
| 1085 } | |
| 1086 buildCounterCampaignCreativeAssociation--; | |
| 1087 } | |
| 1088 | |
| 1089 buildUnnamed1330() { | |
| 1090 var o = new core.List<api.CampaignCreativeAssociation>(); | |
| 1091 o.add(buildCampaignCreativeAssociation()); | |
| 1092 o.add(buildCampaignCreativeAssociation()); | |
| 1093 return o; | |
| 1094 } | |
| 1095 | |
| 1096 checkUnnamed1330(core.List<api.CampaignCreativeAssociation> o) { | |
| 1097 unittest.expect(o, unittest.hasLength(2)); | |
| 1098 checkCampaignCreativeAssociation(o[0]); | |
| 1099 checkCampaignCreativeAssociation(o[1]); | |
| 1100 } | |
| 1101 | |
| 1102 core.int buildCounterCampaignCreativeAssociationsListResponse = 0; | |
| 1103 buildCampaignCreativeAssociationsListResponse() { | |
| 1104 var o = new api.CampaignCreativeAssociationsListResponse(); | |
| 1105 buildCounterCampaignCreativeAssociationsListResponse++; | |
| 1106 if (buildCounterCampaignCreativeAssociationsListResponse < 3) { | |
| 1107 o.campaignCreativeAssociations = buildUnnamed1330(); | |
| 1108 o.kind = "foo"; | |
| 1109 o.nextPageToken = "foo"; | |
| 1110 } | |
| 1111 buildCounterCampaignCreativeAssociationsListResponse--; | |
| 1112 return o; | |
| 1113 } | |
| 1114 | |
| 1115 checkCampaignCreativeAssociationsListResponse(api.CampaignCreativeAssociationsLi
stResponse o) { | |
| 1116 buildCounterCampaignCreativeAssociationsListResponse++; | |
| 1117 if (buildCounterCampaignCreativeAssociationsListResponse < 3) { | |
| 1118 checkUnnamed1330(o.campaignCreativeAssociations); | |
| 1119 unittest.expect(o.kind, unittest.equals('foo')); | |
| 1120 unittest.expect(o.nextPageToken, unittest.equals('foo')); | |
| 1121 } | |
| 1122 buildCounterCampaignCreativeAssociationsListResponse--; | |
| 1123 } | |
| 1124 | |
| 1125 buildUnnamed1331() { | |
| 1126 var o = new core.List<api.Campaign>(); | |
| 1127 o.add(buildCampaign()); | |
| 1128 o.add(buildCampaign()); | |
| 1129 return o; | |
| 1130 } | |
| 1131 | |
| 1132 checkUnnamed1331(core.List<api.Campaign> o) { | |
| 1133 unittest.expect(o, unittest.hasLength(2)); | |
| 1134 checkCampaign(o[0]); | |
| 1135 checkCampaign(o[1]); | |
| 1136 } | |
| 1137 | |
| 1138 core.int buildCounterCampaignsListResponse = 0; | |
| 1139 buildCampaignsListResponse() { | |
| 1140 var o = new api.CampaignsListResponse(); | |
| 1141 buildCounterCampaignsListResponse++; | |
| 1142 if (buildCounterCampaignsListResponse < 3) { | |
| 1143 o.campaigns = buildUnnamed1331(); | |
| 1144 o.kind = "foo"; | |
| 1145 o.nextPageToken = "foo"; | |
| 1146 } | |
| 1147 buildCounterCampaignsListResponse--; | |
| 1148 return o; | |
| 1149 } | |
| 1150 | |
| 1151 checkCampaignsListResponse(api.CampaignsListResponse o) { | |
| 1152 buildCounterCampaignsListResponse++; | |
| 1153 if (buildCounterCampaignsListResponse < 3) { | |
| 1154 checkUnnamed1331(o.campaigns); | |
| 1155 unittest.expect(o.kind, unittest.equals('foo')); | |
| 1156 unittest.expect(o.nextPageToken, unittest.equals('foo')); | |
| 1157 } | |
| 1158 buildCounterCampaignsListResponse--; | |
| 1159 } | |
| 1160 | |
| 1161 core.int buildCounterChangeLog = 0; | |
| 1162 buildChangeLog() { | |
| 1163 var o = new api.ChangeLog(); | |
| 1164 buildCounterChangeLog++; | |
| 1165 if (buildCounterChangeLog < 3) { | |
| 1166 o.accountId = "foo"; | |
| 1167 o.action = "foo"; | |
| 1168 o.changeTime = core.DateTime.parse("2002-02-27T14:01:02"); | |
| 1169 o.fieldName = "foo"; | |
| 1170 o.id = "foo"; | |
| 1171 o.kind = "foo"; | |
| 1172 o.newValue = "foo"; | |
| 1173 o.objectId = "foo"; | |
| 1174 o.objectType = "foo"; | |
| 1175 o.oldValue = "foo"; | |
| 1176 o.subaccountId = "foo"; | |
| 1177 o.transactionId = "foo"; | |
| 1178 o.userProfileId = "foo"; | |
| 1179 o.userProfileName = "foo"; | |
| 1180 } | |
| 1181 buildCounterChangeLog--; | |
| 1182 return o; | |
| 1183 } | |
| 1184 | |
| 1185 checkChangeLog(api.ChangeLog o) { | |
| 1186 buildCounterChangeLog++; | |
| 1187 if (buildCounterChangeLog < 3) { | |
| 1188 unittest.expect(o.accountId, unittest.equals('foo')); | |
| 1189 unittest.expect(o.action, unittest.equals('foo')); | |
| 1190 unittest.expect(o.changeTime, unittest.equals(core.DateTime.parse("2002-02-2
7T14:01:02"))); | |
| 1191 unittest.expect(o.fieldName, unittest.equals('foo')); | |
| 1192 unittest.expect(o.id, unittest.equals('foo')); | |
| 1193 unittest.expect(o.kind, unittest.equals('foo')); | |
| 1194 unittest.expect(o.newValue, unittest.equals('foo')); | |
| 1195 unittest.expect(o.objectId, unittest.equals('foo')); | |
| 1196 unittest.expect(o.objectType, unittest.equals('foo')); | |
| 1197 unittest.expect(o.oldValue, unittest.equals('foo')); | |
| 1198 unittest.expect(o.subaccountId, unittest.equals('foo')); | |
| 1199 unittest.expect(o.transactionId, unittest.equals('foo')); | |
| 1200 unittest.expect(o.userProfileId, unittest.equals('foo')); | |
| 1201 unittest.expect(o.userProfileName, unittest.equals('foo')); | |
| 1202 } | |
| 1203 buildCounterChangeLog--; | |
| 1204 } | |
| 1205 | |
| 1206 buildUnnamed1332() { | |
| 1207 var o = new core.List<api.ChangeLog>(); | |
| 1208 o.add(buildChangeLog()); | |
| 1209 o.add(buildChangeLog()); | |
| 1210 return o; | |
| 1211 } | |
| 1212 | |
| 1213 checkUnnamed1332(core.List<api.ChangeLog> o) { | |
| 1214 unittest.expect(o, unittest.hasLength(2)); | |
| 1215 checkChangeLog(o[0]); | |
| 1216 checkChangeLog(o[1]); | |
| 1217 } | |
| 1218 | |
| 1219 core.int buildCounterChangeLogsListResponse = 0; | |
| 1220 buildChangeLogsListResponse() { | |
| 1221 var o = new api.ChangeLogsListResponse(); | |
| 1222 buildCounterChangeLogsListResponse++; | |
| 1223 if (buildCounterChangeLogsListResponse < 3) { | |
| 1224 o.changeLogs = buildUnnamed1332(); | |
| 1225 o.kind = "foo"; | |
| 1226 o.nextPageToken = "foo"; | |
| 1227 } | |
| 1228 buildCounterChangeLogsListResponse--; | |
| 1229 return o; | |
| 1230 } | |
| 1231 | |
| 1232 checkChangeLogsListResponse(api.ChangeLogsListResponse o) { | |
| 1233 buildCounterChangeLogsListResponse++; | |
| 1234 if (buildCounterChangeLogsListResponse < 3) { | |
| 1235 checkUnnamed1332(o.changeLogs); | |
| 1236 unittest.expect(o.kind, unittest.equals('foo')); | |
| 1237 unittest.expect(o.nextPageToken, unittest.equals('foo')); | |
| 1238 } | |
| 1239 buildCounterChangeLogsListResponse--; | |
| 1240 } | |
| 1241 | |
| 1242 buildUnnamed1333() { | |
| 1243 var o = new core.List<api.City>(); | |
| 1244 o.add(buildCity()); | |
| 1245 o.add(buildCity()); | |
| 1246 return o; | |
| 1247 } | |
| 1248 | |
| 1249 checkUnnamed1333(core.List<api.City> o) { | |
| 1250 unittest.expect(o, unittest.hasLength(2)); | |
| 1251 checkCity(o[0]); | |
| 1252 checkCity(o[1]); | |
| 1253 } | |
| 1254 | |
| 1255 core.int buildCounterCitiesListResponse = 0; | |
| 1256 buildCitiesListResponse() { | |
| 1257 var o = new api.CitiesListResponse(); | |
| 1258 buildCounterCitiesListResponse++; | |
| 1259 if (buildCounterCitiesListResponse < 3) { | |
| 1260 o.cities = buildUnnamed1333(); | |
| 1261 o.kind = "foo"; | |
| 1262 } | |
| 1263 buildCounterCitiesListResponse--; | |
| 1264 return o; | |
| 1265 } | |
| 1266 | |
| 1267 checkCitiesListResponse(api.CitiesListResponse o) { | |
| 1268 buildCounterCitiesListResponse++; | |
| 1269 if (buildCounterCitiesListResponse < 3) { | |
| 1270 checkUnnamed1333(o.cities); | |
| 1271 unittest.expect(o.kind, unittest.equals('foo')); | |
| 1272 } | |
| 1273 buildCounterCitiesListResponse--; | |
| 1274 } | |
| 1275 | |
| 1276 core.int buildCounterCity = 0; | |
| 1277 buildCity() { | |
| 1278 var o = new api.City(); | |
| 1279 buildCounterCity++; | |
| 1280 if (buildCounterCity < 3) { | |
| 1281 o.countryCode = "foo"; | |
| 1282 o.countryDartId = "foo"; | |
| 1283 o.dartId = "foo"; | |
| 1284 o.kind = "foo"; | |
| 1285 o.metroCode = "foo"; | |
| 1286 o.metroDmaId = "foo"; | |
| 1287 o.name = "foo"; | |
| 1288 o.regionCode = "foo"; | |
| 1289 o.regionDartId = "foo"; | |
| 1290 } | |
| 1291 buildCounterCity--; | |
| 1292 return o; | |
| 1293 } | |
| 1294 | |
| 1295 checkCity(api.City o) { | |
| 1296 buildCounterCity++; | |
| 1297 if (buildCounterCity < 3) { | |
| 1298 unittest.expect(o.countryCode, unittest.equals('foo')); | |
| 1299 unittest.expect(o.countryDartId, unittest.equals('foo')); | |
| 1300 unittest.expect(o.dartId, unittest.equals('foo')); | |
| 1301 unittest.expect(o.kind, unittest.equals('foo')); | |
| 1302 unittest.expect(o.metroCode, unittest.equals('foo')); | |
| 1303 unittest.expect(o.metroDmaId, unittest.equals('foo')); | |
| 1304 unittest.expect(o.name, unittest.equals('foo')); | |
| 1305 unittest.expect(o.regionCode, unittest.equals('foo')); | |
| 1306 unittest.expect(o.regionDartId, unittest.equals('foo')); | |
| 1307 } | |
| 1308 buildCounterCity--; | |
| 1309 } | |
| 1310 | |
| 1311 core.int buildCounterClickTag = 0; | |
| 1312 buildClickTag() { | |
| 1313 var o = new api.ClickTag(); | |
| 1314 buildCounterClickTag++; | |
| 1315 if (buildCounterClickTag < 3) { | |
| 1316 o.eventName = "foo"; | |
| 1317 o.name = "foo"; | |
| 1318 o.value = "foo"; | |
| 1319 } | |
| 1320 buildCounterClickTag--; | |
| 1321 return o; | |
| 1322 } | |
| 1323 | |
| 1324 checkClickTag(api.ClickTag o) { | |
| 1325 buildCounterClickTag++; | |
| 1326 if (buildCounterClickTag < 3) { | |
| 1327 unittest.expect(o.eventName, unittest.equals('foo')); | |
| 1328 unittest.expect(o.name, unittest.equals('foo')); | |
| 1329 unittest.expect(o.value, unittest.equals('foo')); | |
| 1330 } | |
| 1331 buildCounterClickTag--; | |
| 1332 } | |
| 1333 | |
| 1334 core.int buildCounterClickThroughUrl = 0; | |
| 1335 buildClickThroughUrl() { | |
| 1336 var o = new api.ClickThroughUrl(); | |
| 1337 buildCounterClickThroughUrl++; | |
| 1338 if (buildCounterClickThroughUrl < 3) { | |
| 1339 o.computedClickThroughUrl = "foo"; | |
| 1340 o.customClickThroughUrl = "foo"; | |
| 1341 o.defaultLandingPage = true; | |
| 1342 o.landingPageId = "foo"; | |
| 1343 } | |
| 1344 buildCounterClickThroughUrl--; | |
| 1345 return o; | |
| 1346 } | |
| 1347 | |
| 1348 checkClickThroughUrl(api.ClickThroughUrl o) { | |
| 1349 buildCounterClickThroughUrl++; | |
| 1350 if (buildCounterClickThroughUrl < 3) { | |
| 1351 unittest.expect(o.computedClickThroughUrl, unittest.equals('foo')); | |
| 1352 unittest.expect(o.customClickThroughUrl, unittest.equals('foo')); | |
| 1353 unittest.expect(o.defaultLandingPage, unittest.isTrue); | |
| 1354 unittest.expect(o.landingPageId, unittest.equals('foo')); | |
| 1355 } | |
| 1356 buildCounterClickThroughUrl--; | |
| 1357 } | |
| 1358 | |
| 1359 core.int buildCounterClickThroughUrlSuffixProperties = 0; | |
| 1360 buildClickThroughUrlSuffixProperties() { | |
| 1361 var o = new api.ClickThroughUrlSuffixProperties(); | |
| 1362 buildCounterClickThroughUrlSuffixProperties++; | |
| 1363 if (buildCounterClickThroughUrlSuffixProperties < 3) { | |
| 1364 o.clickThroughUrlSuffix = "foo"; | |
| 1365 o.overrideInheritedSuffix = true; | |
| 1366 } | |
| 1367 buildCounterClickThroughUrlSuffixProperties--; | |
| 1368 return o; | |
| 1369 } | |
| 1370 | |
| 1371 checkClickThroughUrlSuffixProperties(api.ClickThroughUrlSuffixProperties o) { | |
| 1372 buildCounterClickThroughUrlSuffixProperties++; | |
| 1373 if (buildCounterClickThroughUrlSuffixProperties < 3) { | |
| 1374 unittest.expect(o.clickThroughUrlSuffix, unittest.equals('foo')); | |
| 1375 unittest.expect(o.overrideInheritedSuffix, unittest.isTrue); | |
| 1376 } | |
| 1377 buildCounterClickThroughUrlSuffixProperties--; | |
| 1378 } | |
| 1379 | |
| 1380 core.int buildCounterCompanionClickThroughOverride = 0; | |
| 1381 buildCompanionClickThroughOverride() { | |
| 1382 var o = new api.CompanionClickThroughOverride(); | |
| 1383 buildCounterCompanionClickThroughOverride++; | |
| 1384 if (buildCounterCompanionClickThroughOverride < 3) { | |
| 1385 o.clickThroughUrl = buildClickThroughUrl(); | |
| 1386 o.creativeId = "foo"; | |
| 1387 } | |
| 1388 buildCounterCompanionClickThroughOverride--; | |
| 1389 return o; | |
| 1390 } | |
| 1391 | |
| 1392 checkCompanionClickThroughOverride(api.CompanionClickThroughOverride o) { | |
| 1393 buildCounterCompanionClickThroughOverride++; | |
| 1394 if (buildCounterCompanionClickThroughOverride < 3) { | |
| 1395 checkClickThroughUrl(o.clickThroughUrl); | |
| 1396 unittest.expect(o.creativeId, unittest.equals('foo')); | |
| 1397 } | |
| 1398 buildCounterCompanionClickThroughOverride--; | |
| 1399 } | |
| 1400 | |
| 1401 core.int buildCounterCompatibleFields = 0; | |
| 1402 buildCompatibleFields() { | |
| 1403 var o = new api.CompatibleFields(); | |
| 1404 buildCounterCompatibleFields++; | |
| 1405 if (buildCounterCompatibleFields < 3) { | |
| 1406 o.crossDimensionReachReportCompatibleFields = buildCrossDimensionReachReport
CompatibleFields(); | |
| 1407 o.floodlightReportCompatibleFields = buildFloodlightReportCompatibleFields()
; | |
| 1408 o.kind = "foo"; | |
| 1409 o.pathToConversionReportCompatibleFields = buildPathToConversionReportCompat
ibleFields(); | |
| 1410 o.reachReportCompatibleFields = buildReachReportCompatibleFields(); | |
| 1411 o.reportCompatibleFields = buildReportCompatibleFields(); | |
| 1412 } | |
| 1413 buildCounterCompatibleFields--; | |
| 1414 return o; | |
| 1415 } | |
| 1416 | |
| 1417 checkCompatibleFields(api.CompatibleFields o) { | |
| 1418 buildCounterCompatibleFields++; | |
| 1419 if (buildCounterCompatibleFields < 3) { | |
| 1420 checkCrossDimensionReachReportCompatibleFields(o.crossDimensionReachReportCo
mpatibleFields); | |
| 1421 checkFloodlightReportCompatibleFields(o.floodlightReportCompatibleFields); | |
| 1422 unittest.expect(o.kind, unittest.equals('foo')); | |
| 1423 checkPathToConversionReportCompatibleFields(o.pathToConversionReportCompatib
leFields); | |
| 1424 checkReachReportCompatibleFields(o.reachReportCompatibleFields); | |
| 1425 checkReportCompatibleFields(o.reportCompatibleFields); | |
| 1426 } | |
| 1427 buildCounterCompatibleFields--; | |
| 1428 } | |
| 1429 | |
| 1430 core.int buildCounterConnectionType = 0; | |
| 1431 buildConnectionType() { | |
| 1432 var o = new api.ConnectionType(); | |
| 1433 buildCounterConnectionType++; | |
| 1434 if (buildCounterConnectionType < 3) { | |
| 1435 o.id = "foo"; | |
| 1436 o.kind = "foo"; | |
| 1437 o.name = "foo"; | |
| 1438 } | |
| 1439 buildCounterConnectionType--; | |
| 1440 return o; | |
| 1441 } | |
| 1442 | |
| 1443 checkConnectionType(api.ConnectionType o) { | |
| 1444 buildCounterConnectionType++; | |
| 1445 if (buildCounterConnectionType < 3) { | |
| 1446 unittest.expect(o.id, unittest.equals('foo')); | |
| 1447 unittest.expect(o.kind, unittest.equals('foo')); | |
| 1448 unittest.expect(o.name, unittest.equals('foo')); | |
| 1449 } | |
| 1450 buildCounterConnectionType--; | |
| 1451 } | |
| 1452 | |
| 1453 buildUnnamed1334() { | |
| 1454 var o = new core.List<api.ConnectionType>(); | |
| 1455 o.add(buildConnectionType()); | |
| 1456 o.add(buildConnectionType()); | |
| 1457 return o; | |
| 1458 } | |
| 1459 | |
| 1460 checkUnnamed1334(core.List<api.ConnectionType> o) { | |
| 1461 unittest.expect(o, unittest.hasLength(2)); | |
| 1462 checkConnectionType(o[0]); | |
| 1463 checkConnectionType(o[1]); | |
| 1464 } | |
| 1465 | |
| 1466 core.int buildCounterConnectionTypesListResponse = 0; | |
| 1467 buildConnectionTypesListResponse() { | |
| 1468 var o = new api.ConnectionTypesListResponse(); | |
| 1469 buildCounterConnectionTypesListResponse++; | |
| 1470 if (buildCounterConnectionTypesListResponse < 3) { | |
| 1471 o.connectionTypes = buildUnnamed1334(); | |
| 1472 o.kind = "foo"; | |
| 1473 } | |
| 1474 buildCounterConnectionTypesListResponse--; | |
| 1475 return o; | |
| 1476 } | |
| 1477 | |
| 1478 checkConnectionTypesListResponse(api.ConnectionTypesListResponse o) { | |
| 1479 buildCounterConnectionTypesListResponse++; | |
| 1480 if (buildCounterConnectionTypesListResponse < 3) { | |
| 1481 checkUnnamed1334(o.connectionTypes); | |
| 1482 unittest.expect(o.kind, unittest.equals('foo')); | |
| 1483 } | |
| 1484 buildCounterConnectionTypesListResponse--; | |
| 1485 } | |
| 1486 | |
| 1487 buildUnnamed1335() { | |
| 1488 var o = new core.List<api.ContentCategory>(); | |
| 1489 o.add(buildContentCategory()); | |
| 1490 o.add(buildContentCategory()); | |
| 1491 return o; | |
| 1492 } | |
| 1493 | |
| 1494 checkUnnamed1335(core.List<api.ContentCategory> o) { | |
| 1495 unittest.expect(o, unittest.hasLength(2)); | |
| 1496 checkContentCategory(o[0]); | |
| 1497 checkContentCategory(o[1]); | |
| 1498 } | |
| 1499 | |
| 1500 core.int buildCounterContentCategoriesListResponse = 0; | |
| 1501 buildContentCategoriesListResponse() { | |
| 1502 var o = new api.ContentCategoriesListResponse(); | |
| 1503 buildCounterContentCategoriesListResponse++; | |
| 1504 if (buildCounterContentCategoriesListResponse < 3) { | |
| 1505 o.contentCategories = buildUnnamed1335(); | |
| 1506 o.kind = "foo"; | |
| 1507 o.nextPageToken = "foo"; | |
| 1508 } | |
| 1509 buildCounterContentCategoriesListResponse--; | |
| 1510 return o; | |
| 1511 } | |
| 1512 | |
| 1513 checkContentCategoriesListResponse(api.ContentCategoriesListResponse o) { | |
| 1514 buildCounterContentCategoriesListResponse++; | |
| 1515 if (buildCounterContentCategoriesListResponse < 3) { | |
| 1516 checkUnnamed1335(o.contentCategories); | |
| 1517 unittest.expect(o.kind, unittest.equals('foo')); | |
| 1518 unittest.expect(o.nextPageToken, unittest.equals('foo')); | |
| 1519 } | |
| 1520 buildCounterContentCategoriesListResponse--; | |
| 1521 } | |
| 1522 | |
| 1523 core.int buildCounterContentCategory = 0; | |
| 1524 buildContentCategory() { | |
| 1525 var o = new api.ContentCategory(); | |
| 1526 buildCounterContentCategory++; | |
| 1527 if (buildCounterContentCategory < 3) { | |
| 1528 o.accountId = "foo"; | |
| 1529 o.id = "foo"; | |
| 1530 o.kind = "foo"; | |
| 1531 o.name = "foo"; | |
| 1532 } | |
| 1533 buildCounterContentCategory--; | |
| 1534 return o; | |
| 1535 } | |
| 1536 | |
| 1537 checkContentCategory(api.ContentCategory o) { | |
| 1538 buildCounterContentCategory++; | |
| 1539 if (buildCounterContentCategory < 3) { | |
| 1540 unittest.expect(o.accountId, unittest.equals('foo')); | |
| 1541 unittest.expect(o.id, unittest.equals('foo')); | |
| 1542 unittest.expect(o.kind, unittest.equals('foo')); | |
| 1543 unittest.expect(o.name, unittest.equals('foo')); | |
| 1544 } | |
| 1545 buildCounterContentCategory--; | |
| 1546 } | |
| 1547 | |
| 1548 buildUnnamed1336() { | |
| 1549 var o = new core.List<api.CustomFloodlightVariable>(); | |
| 1550 o.add(buildCustomFloodlightVariable()); | |
| 1551 o.add(buildCustomFloodlightVariable()); | |
| 1552 return o; | |
| 1553 } | |
| 1554 | |
| 1555 checkUnnamed1336(core.List<api.CustomFloodlightVariable> o) { | |
| 1556 unittest.expect(o, unittest.hasLength(2)); | |
| 1557 checkCustomFloodlightVariable(o[0]); | |
| 1558 checkCustomFloodlightVariable(o[1]); | |
| 1559 } | |
| 1560 | |
| 1561 core.int buildCounterConversion = 0; | |
| 1562 buildConversion() { | |
| 1563 var o = new api.Conversion(); | |
| 1564 buildCounterConversion++; | |
| 1565 if (buildCounterConversion < 3) { | |
| 1566 o.childDirectedTreatment = true; | |
| 1567 o.customVariables = buildUnnamed1336(); | |
| 1568 o.encryptedUserId = "foo"; | |
| 1569 o.floodlightActivityId = "foo"; | |
| 1570 o.floodlightConfigurationId = "foo"; | |
| 1571 o.kind = "foo"; | |
| 1572 o.limitAdTracking = true; | |
| 1573 o.mobileDeviceId = "foo"; | |
| 1574 o.ordinal = "foo"; | |
| 1575 o.quantity = "foo"; | |
| 1576 o.timestampMicros = "foo"; | |
| 1577 o.value = 42.0; | |
| 1578 } | |
| 1579 buildCounterConversion--; | |
| 1580 return o; | |
| 1581 } | |
| 1582 | |
| 1583 checkConversion(api.Conversion o) { | |
| 1584 buildCounterConversion++; | |
| 1585 if (buildCounterConversion < 3) { | |
| 1586 unittest.expect(o.childDirectedTreatment, unittest.isTrue); | |
| 1587 checkUnnamed1336(o.customVariables); | |
| 1588 unittest.expect(o.encryptedUserId, unittest.equals('foo')); | |
| 1589 unittest.expect(o.floodlightActivityId, unittest.equals('foo')); | |
| 1590 unittest.expect(o.floodlightConfigurationId, unittest.equals('foo')); | |
| 1591 unittest.expect(o.kind, unittest.equals('foo')); | |
| 1592 unittest.expect(o.limitAdTracking, unittest.isTrue); | |
| 1593 unittest.expect(o.mobileDeviceId, unittest.equals('foo')); | |
| 1594 unittest.expect(o.ordinal, unittest.equals('foo')); | |
| 1595 unittest.expect(o.quantity, unittest.equals('foo')); | |
| 1596 unittest.expect(o.timestampMicros, unittest.equals('foo')); | |
| 1597 unittest.expect(o.value, unittest.equals(42.0)); | |
| 1598 } | |
| 1599 buildCounterConversion--; | |
| 1600 } | |
| 1601 | |
| 1602 core.int buildCounterConversionError = 0; | |
| 1603 buildConversionError() { | |
| 1604 var o = new api.ConversionError(); | |
| 1605 buildCounterConversionError++; | |
| 1606 if (buildCounterConversionError < 3) { | |
| 1607 o.code = "foo"; | |
| 1608 o.kind = "foo"; | |
| 1609 o.message = "foo"; | |
| 1610 } | |
| 1611 buildCounterConversionError--; | |
| 1612 return o; | |
| 1613 } | |
| 1614 | |
| 1615 checkConversionError(api.ConversionError o) { | |
| 1616 buildCounterConversionError++; | |
| 1617 if (buildCounterConversionError < 3) { | |
| 1618 unittest.expect(o.code, unittest.equals('foo')); | |
| 1619 unittest.expect(o.kind, unittest.equals('foo')); | |
| 1620 unittest.expect(o.message, unittest.equals('foo')); | |
| 1621 } | |
| 1622 buildCounterConversionError--; | |
| 1623 } | |
| 1624 | |
| 1625 buildUnnamed1337() { | |
| 1626 var o = new core.List<api.ConversionError>(); | |
| 1627 o.add(buildConversionError()); | |
| 1628 o.add(buildConversionError()); | |
| 1629 return o; | |
| 1630 } | |
| 1631 | |
| 1632 checkUnnamed1337(core.List<api.ConversionError> o) { | |
| 1633 unittest.expect(o, unittest.hasLength(2)); | |
| 1634 checkConversionError(o[0]); | |
| 1635 checkConversionError(o[1]); | |
| 1636 } | |
| 1637 | |
| 1638 core.int buildCounterConversionStatus = 0; | |
| 1639 buildConversionStatus() { | |
| 1640 var o = new api.ConversionStatus(); | |
| 1641 buildCounterConversionStatus++; | |
| 1642 if (buildCounterConversionStatus < 3) { | |
| 1643 o.conversion = buildConversion(); | |
| 1644 o.errors = buildUnnamed1337(); | |
| 1645 o.kind = "foo"; | |
| 1646 } | |
| 1647 buildCounterConversionStatus--; | |
| 1648 return o; | |
| 1649 } | |
| 1650 | |
| 1651 checkConversionStatus(api.ConversionStatus o) { | |
| 1652 buildCounterConversionStatus++; | |
| 1653 if (buildCounterConversionStatus < 3) { | |
| 1654 checkConversion(o.conversion); | |
| 1655 checkUnnamed1337(o.errors); | |
| 1656 unittest.expect(o.kind, unittest.equals('foo')); | |
| 1657 } | |
| 1658 buildCounterConversionStatus--; | |
| 1659 } | |
| 1660 | |
| 1661 buildUnnamed1338() { | |
| 1662 var o = new core.List<api.Conversion>(); | |
| 1663 o.add(buildConversion()); | |
| 1664 o.add(buildConversion()); | |
| 1665 return o; | |
| 1666 } | |
| 1667 | |
| 1668 checkUnnamed1338(core.List<api.Conversion> o) { | |
| 1669 unittest.expect(o, unittest.hasLength(2)); | |
| 1670 checkConversion(o[0]); | |
| 1671 checkConversion(o[1]); | |
| 1672 } | |
| 1673 | |
| 1674 core.int buildCounterConversionsBatchInsertRequest = 0; | |
| 1675 buildConversionsBatchInsertRequest() { | |
| 1676 var o = new api.ConversionsBatchInsertRequest(); | |
| 1677 buildCounterConversionsBatchInsertRequest++; | |
| 1678 if (buildCounterConversionsBatchInsertRequest < 3) { | |
| 1679 o.conversions = buildUnnamed1338(); | |
| 1680 o.encryptionInfo = buildEncryptionInfo(); | |
| 1681 o.kind = "foo"; | |
| 1682 } | |
| 1683 buildCounterConversionsBatchInsertRequest--; | |
| 1684 return o; | |
| 1685 } | |
| 1686 | |
| 1687 checkConversionsBatchInsertRequest(api.ConversionsBatchInsertRequest o) { | |
| 1688 buildCounterConversionsBatchInsertRequest++; | |
| 1689 if (buildCounterConversionsBatchInsertRequest < 3) { | |
| 1690 checkUnnamed1338(o.conversions); | |
| 1691 checkEncryptionInfo(o.encryptionInfo); | |
| 1692 unittest.expect(o.kind, unittest.equals('foo')); | |
| 1693 } | |
| 1694 buildCounterConversionsBatchInsertRequest--; | |
| 1695 } | |
| 1696 | |
| 1697 buildUnnamed1339() { | |
| 1698 var o = new core.List<api.ConversionStatus>(); | |
| 1699 o.add(buildConversionStatus()); | |
| 1700 o.add(buildConversionStatus()); | |
| 1701 return o; | |
| 1702 } | |
| 1703 | |
| 1704 checkUnnamed1339(core.List<api.ConversionStatus> o) { | |
| 1705 unittest.expect(o, unittest.hasLength(2)); | |
| 1706 checkConversionStatus(o[0]); | |
| 1707 checkConversionStatus(o[1]); | |
| 1708 } | |
| 1709 | |
| 1710 core.int buildCounterConversionsBatchInsertResponse = 0; | |
| 1711 buildConversionsBatchInsertResponse() { | |
| 1712 var o = new api.ConversionsBatchInsertResponse(); | |
| 1713 buildCounterConversionsBatchInsertResponse++; | |
| 1714 if (buildCounterConversionsBatchInsertResponse < 3) { | |
| 1715 o.hasFailures = true; | |
| 1716 o.kind = "foo"; | |
| 1717 o.status = buildUnnamed1339(); | |
| 1718 } | |
| 1719 buildCounterConversionsBatchInsertResponse--; | |
| 1720 return o; | |
| 1721 } | |
| 1722 | |
| 1723 checkConversionsBatchInsertResponse(api.ConversionsBatchInsertResponse o) { | |
| 1724 buildCounterConversionsBatchInsertResponse++; | |
| 1725 if (buildCounterConversionsBatchInsertResponse < 3) { | |
| 1726 unittest.expect(o.hasFailures, unittest.isTrue); | |
| 1727 unittest.expect(o.kind, unittest.equals('foo')); | |
| 1728 checkUnnamed1339(o.status); | |
| 1729 } | |
| 1730 buildCounterConversionsBatchInsertResponse--; | |
| 1731 } | |
| 1732 | |
| 1733 buildUnnamed1340() { | |
| 1734 var o = new core.List<api.Country>(); | |
| 1735 o.add(buildCountry()); | |
| 1736 o.add(buildCountry()); | |
| 1737 return o; | |
| 1738 } | |
| 1739 | |
| 1740 checkUnnamed1340(core.List<api.Country> o) { | |
| 1741 unittest.expect(o, unittest.hasLength(2)); | |
| 1742 checkCountry(o[0]); | |
| 1743 checkCountry(o[1]); | |
| 1744 } | |
| 1745 | |
| 1746 core.int buildCounterCountriesListResponse = 0; | |
| 1747 buildCountriesListResponse() { | |
| 1748 var o = new api.CountriesListResponse(); | |
| 1749 buildCounterCountriesListResponse++; | |
| 1750 if (buildCounterCountriesListResponse < 3) { | |
| 1751 o.countries = buildUnnamed1340(); | |
| 1752 o.kind = "foo"; | |
| 1753 } | |
| 1754 buildCounterCountriesListResponse--; | |
| 1755 return o; | |
| 1756 } | |
| 1757 | |
| 1758 checkCountriesListResponse(api.CountriesListResponse o) { | |
| 1759 buildCounterCountriesListResponse++; | |
| 1760 if (buildCounterCountriesListResponse < 3) { | |
| 1761 checkUnnamed1340(o.countries); | |
| 1762 unittest.expect(o.kind, unittest.equals('foo')); | |
| 1763 } | |
| 1764 buildCounterCountriesListResponse--; | |
| 1765 } | |
| 1766 | |
| 1767 core.int buildCounterCountry = 0; | |
| 1768 buildCountry() { | |
| 1769 var o = new api.Country(); | |
| 1770 buildCounterCountry++; | |
| 1771 if (buildCounterCountry < 3) { | |
| 1772 o.countryCode = "foo"; | |
| 1773 o.dartId = "foo"; | |
| 1774 o.kind = "foo"; | |
| 1775 o.name = "foo"; | |
| 1776 o.sslEnabled = true; | |
| 1777 } | |
| 1778 buildCounterCountry--; | |
| 1779 return o; | |
| 1780 } | |
| 1781 | |
| 1782 checkCountry(api.Country o) { | |
| 1783 buildCounterCountry++; | |
| 1784 if (buildCounterCountry < 3) { | |
| 1785 unittest.expect(o.countryCode, unittest.equals('foo')); | |
| 1786 unittest.expect(o.dartId, unittest.equals('foo')); | |
| 1787 unittest.expect(o.kind, unittest.equals('foo')); | |
| 1788 unittest.expect(o.name, unittest.equals('foo')); | |
| 1789 unittest.expect(o.sslEnabled, unittest.isTrue); | |
| 1790 } | |
| 1791 buildCounterCountry--; | |
| 1792 } | |
| 1793 | |
| 1794 buildUnnamed1341() { | |
| 1795 var o = new core.List<core.String>(); | |
| 1796 o.add("foo"); | |
| 1797 o.add("foo"); | |
| 1798 return o; | |
| 1799 } | |
| 1800 | |
| 1801 checkUnnamed1341(core.List<core.String> o) { | |
| 1802 unittest.expect(o, unittest.hasLength(2)); | |
| 1803 unittest.expect(o[0], unittest.equals('foo')); | |
| 1804 unittest.expect(o[1], unittest.equals('foo')); | |
| 1805 } | |
| 1806 | |
| 1807 buildUnnamed1342() { | |
| 1808 var o = new core.List<core.String>(); | |
| 1809 o.add("foo"); | |
| 1810 o.add("foo"); | |
| 1811 return o; | |
| 1812 } | |
| 1813 | |
| 1814 checkUnnamed1342(core.List<core.String> o) { | |
| 1815 unittest.expect(o, unittest.hasLength(2)); | |
| 1816 unittest.expect(o[0], unittest.equals('foo')); | |
| 1817 unittest.expect(o[1], unittest.equals('foo')); | |
| 1818 } | |
| 1819 | |
| 1820 buildUnnamed1343() { | |
| 1821 var o = new core.List<api.ClickTag>(); | |
| 1822 o.add(buildClickTag()); | |
| 1823 o.add(buildClickTag()); | |
| 1824 return o; | |
| 1825 } | |
| 1826 | |
| 1827 checkUnnamed1343(core.List<api.ClickTag> o) { | |
| 1828 unittest.expect(o, unittest.hasLength(2)); | |
| 1829 checkClickTag(o[0]); | |
| 1830 checkClickTag(o[1]); | |
| 1831 } | |
| 1832 | |
| 1833 buildUnnamed1344() { | |
| 1834 var o = new core.List<core.String>(); | |
| 1835 o.add("foo"); | |
| 1836 o.add("foo"); | |
| 1837 return o; | |
| 1838 } | |
| 1839 | |
| 1840 checkUnnamed1344(core.List<core.String> o) { | |
| 1841 unittest.expect(o, unittest.hasLength(2)); | |
| 1842 unittest.expect(o[0], unittest.equals('foo')); | |
| 1843 unittest.expect(o[1], unittest.equals('foo')); | |
| 1844 } | |
| 1845 | |
| 1846 buildUnnamed1345() { | |
| 1847 var o = new core.List<core.String>(); | |
| 1848 o.add("foo"); | |
| 1849 o.add("foo"); | |
| 1850 return o; | |
| 1851 } | |
| 1852 | |
| 1853 checkUnnamed1345(core.List<core.String> o) { | |
| 1854 unittest.expect(o, unittest.hasLength(2)); | |
| 1855 unittest.expect(o[0], unittest.equals('foo')); | |
| 1856 unittest.expect(o[1], unittest.equals('foo')); | |
| 1857 } | |
| 1858 | |
| 1859 buildUnnamed1346() { | |
| 1860 var o = new core.List<api.CreativeCustomEvent>(); | |
| 1861 o.add(buildCreativeCustomEvent()); | |
| 1862 o.add(buildCreativeCustomEvent()); | |
| 1863 return o; | |
| 1864 } | |
| 1865 | |
| 1866 checkUnnamed1346(core.List<api.CreativeCustomEvent> o) { | |
| 1867 unittest.expect(o, unittest.hasLength(2)); | |
| 1868 checkCreativeCustomEvent(o[0]); | |
| 1869 checkCreativeCustomEvent(o[1]); | |
| 1870 } | |
| 1871 | |
| 1872 buildUnnamed1347() { | |
| 1873 var o = new core.List<api.CreativeAsset>(); | |
| 1874 o.add(buildCreativeAsset()); | |
| 1875 o.add(buildCreativeAsset()); | |
| 1876 return o; | |
| 1877 } | |
| 1878 | |
| 1879 checkUnnamed1347(core.List<api.CreativeAsset> o) { | |
| 1880 unittest.expect(o, unittest.hasLength(2)); | |
| 1881 checkCreativeAsset(o[0]); | |
| 1882 checkCreativeAsset(o[1]); | |
| 1883 } | |
| 1884 | |
| 1885 buildUnnamed1348() { | |
| 1886 var o = new core.List<api.CreativeFieldAssignment>(); | |
| 1887 o.add(buildCreativeFieldAssignment()); | |
| 1888 o.add(buildCreativeFieldAssignment()); | |
| 1889 return o; | |
| 1890 } | |
| 1891 | |
| 1892 checkUnnamed1348(core.List<api.CreativeFieldAssignment> o) { | |
| 1893 unittest.expect(o, unittest.hasLength(2)); | |
| 1894 checkCreativeFieldAssignment(o[0]); | |
| 1895 checkCreativeFieldAssignment(o[1]); | |
| 1896 } | |
| 1897 | |
| 1898 buildUnnamed1349() { | |
| 1899 var o = new core.List<core.String>(); | |
| 1900 o.add("foo"); | |
| 1901 o.add("foo"); | |
| 1902 return o; | |
| 1903 } | |
| 1904 | |
| 1905 checkUnnamed1349(core.List<core.String> o) { | |
| 1906 unittest.expect(o, unittest.hasLength(2)); | |
| 1907 unittest.expect(o[0], unittest.equals('foo')); | |
| 1908 unittest.expect(o[1], unittest.equals('foo')); | |
| 1909 } | |
| 1910 | |
| 1911 buildUnnamed1350() { | |
| 1912 var o = new core.List<api.CreativeCustomEvent>(); | |
| 1913 o.add(buildCreativeCustomEvent()); | |
| 1914 o.add(buildCreativeCustomEvent()); | |
| 1915 return o; | |
| 1916 } | |
| 1917 | |
| 1918 checkUnnamed1350(core.List<api.CreativeCustomEvent> o) { | |
| 1919 unittest.expect(o, unittest.hasLength(2)); | |
| 1920 checkCreativeCustomEvent(o[0]); | |
| 1921 checkCreativeCustomEvent(o[1]); | |
| 1922 } | |
| 1923 | |
| 1924 buildUnnamed1351() { | |
| 1925 var o = new core.List<api.ThirdPartyTrackingUrl>(); | |
| 1926 o.add(buildThirdPartyTrackingUrl()); | |
| 1927 o.add(buildThirdPartyTrackingUrl()); | |
| 1928 return o; | |
| 1929 } | |
| 1930 | |
| 1931 checkUnnamed1351(core.List<api.ThirdPartyTrackingUrl> o) { | |
| 1932 unittest.expect(o, unittest.hasLength(2)); | |
| 1933 checkThirdPartyTrackingUrl(o[0]); | |
| 1934 checkThirdPartyTrackingUrl(o[1]); | |
| 1935 } | |
| 1936 | |
| 1937 buildUnnamed1352() { | |
| 1938 var o = new core.List<api.CreativeCustomEvent>(); | |
| 1939 o.add(buildCreativeCustomEvent()); | |
| 1940 o.add(buildCreativeCustomEvent()); | |
| 1941 return o; | |
| 1942 } | |
| 1943 | |
| 1944 checkUnnamed1352(core.List<api.CreativeCustomEvent> o) { | |
| 1945 unittest.expect(o, unittest.hasLength(2)); | |
| 1946 checkCreativeCustomEvent(o[0]); | |
| 1947 checkCreativeCustomEvent(o[1]); | |
| 1948 } | |
| 1949 | |
| 1950 core.int buildCounterCreative = 0; | |
| 1951 buildCreative() { | |
| 1952 var o = new api.Creative(); | |
| 1953 buildCounterCreative++; | |
| 1954 if (buildCounterCreative < 3) { | |
| 1955 o.accountId = "foo"; | |
| 1956 o.active = true; | |
| 1957 o.adParameters = "foo"; | |
| 1958 o.adTagKeys = buildUnnamed1341(); | |
| 1959 o.advertiserId = "foo"; | |
| 1960 o.allowScriptAccess = true; | |
| 1961 o.archived = true; | |
| 1962 o.artworkType = "foo"; | |
| 1963 o.authoringSource = "foo"; | |
| 1964 o.authoringTool = "foo"; | |
| 1965 o.autoAdvanceImages = true; | |
| 1966 o.backgroundColor = "foo"; | |
| 1967 o.backupImageClickThroughUrl = "foo"; | |
| 1968 o.backupImageFeatures = buildUnnamed1342(); | |
| 1969 o.backupImageReportingLabel = "foo"; | |
| 1970 o.backupImageTargetWindow = buildTargetWindow(); | |
| 1971 o.clickTags = buildUnnamed1343(); | |
| 1972 o.commercialId = "foo"; | |
| 1973 o.companionCreatives = buildUnnamed1344(); | |
| 1974 o.compatibility = buildUnnamed1345(); | |
| 1975 o.convertFlashToHtml5 = true; | |
| 1976 o.counterCustomEvents = buildUnnamed1346(); | |
| 1977 o.creativeAssets = buildUnnamed1347(); | |
| 1978 o.creativeFieldAssignments = buildUnnamed1348(); | |
| 1979 o.customKeyValues = buildUnnamed1349(); | |
| 1980 o.exitCustomEvents = buildUnnamed1350(); | |
| 1981 o.fsCommand = buildFsCommand(); | |
| 1982 o.htmlCode = "foo"; | |
| 1983 o.htmlCodeLocked = true; | |
| 1984 o.id = "foo"; | |
| 1985 o.idDimensionValue = buildDimensionValue(); | |
| 1986 o.kind = "foo"; | |
| 1987 o.lastModifiedInfo = buildLastModifiedInfo(); | |
| 1988 o.latestTraffickedCreativeId = "foo"; | |
| 1989 o.name = "foo"; | |
| 1990 o.overrideCss = "foo"; | |
| 1991 o.redirectUrl = "foo"; | |
| 1992 o.renderingId = "foo"; | |
| 1993 o.renderingIdDimensionValue = buildDimensionValue(); | |
| 1994 o.requiredFlashPluginVersion = "foo"; | |
| 1995 o.requiredFlashVersion = 42; | |
| 1996 o.size = buildSize(); | |
| 1997 o.skippable = true; | |
| 1998 o.sslCompliant = true; | |
| 1999 o.sslOverride = true; | |
| 2000 o.studioAdvertiserId = "foo"; | |
| 2001 o.studioCreativeId = "foo"; | |
| 2002 o.studioTraffickedCreativeId = "foo"; | |
| 2003 o.subaccountId = "foo"; | |
| 2004 o.thirdPartyBackupImageImpressionsUrl = "foo"; | |
| 2005 o.thirdPartyRichMediaImpressionsUrl = "foo"; | |
| 2006 o.thirdPartyUrls = buildUnnamed1351(); | |
| 2007 o.timerCustomEvents = buildUnnamed1352(); | |
| 2008 o.totalFileSize = "foo"; | |
| 2009 o.type = "foo"; | |
| 2010 o.version = 42; | |
| 2011 o.videoDescription = "foo"; | |
| 2012 o.videoDuration = 42.0; | |
| 2013 } | |
| 2014 buildCounterCreative--; | |
| 2015 return o; | |
| 2016 } | |
| 2017 | |
| 2018 checkCreative(api.Creative o) { | |
| 2019 buildCounterCreative++; | |
| 2020 if (buildCounterCreative < 3) { | |
| 2021 unittest.expect(o.accountId, unittest.equals('foo')); | |
| 2022 unittest.expect(o.active, unittest.isTrue); | |
| 2023 unittest.expect(o.adParameters, unittest.equals('foo')); | |
| 2024 checkUnnamed1341(o.adTagKeys); | |
| 2025 unittest.expect(o.advertiserId, unittest.equals('foo')); | |
| 2026 unittest.expect(o.allowScriptAccess, unittest.isTrue); | |
| 2027 unittest.expect(o.archived, unittest.isTrue); | |
| 2028 unittest.expect(o.artworkType, unittest.equals('foo')); | |
| 2029 unittest.expect(o.authoringSource, unittest.equals('foo')); | |
| 2030 unittest.expect(o.authoringTool, unittest.equals('foo')); | |
| 2031 unittest.expect(o.autoAdvanceImages, unittest.isTrue); | |
| 2032 unittest.expect(o.backgroundColor, unittest.equals('foo')); | |
| 2033 unittest.expect(o.backupImageClickThroughUrl, unittest.equals('foo')); | |
| 2034 checkUnnamed1342(o.backupImageFeatures); | |
| 2035 unittest.expect(o.backupImageReportingLabel, unittest.equals('foo')); | |
| 2036 checkTargetWindow(o.backupImageTargetWindow); | |
| 2037 checkUnnamed1343(o.clickTags); | |
| 2038 unittest.expect(o.commercialId, unittest.equals('foo')); | |
| 2039 checkUnnamed1344(o.companionCreatives); | |
| 2040 checkUnnamed1345(o.compatibility); | |
| 2041 unittest.expect(o.convertFlashToHtml5, unittest.isTrue); | |
| 2042 checkUnnamed1346(o.counterCustomEvents); | |
| 2043 checkUnnamed1347(o.creativeAssets); | |
| 2044 checkUnnamed1348(o.creativeFieldAssignments); | |
| 2045 checkUnnamed1349(o.customKeyValues); | |
| 2046 checkUnnamed1350(o.exitCustomEvents); | |
| 2047 checkFsCommand(o.fsCommand); | |
| 2048 unittest.expect(o.htmlCode, unittest.equals('foo')); | |
| 2049 unittest.expect(o.htmlCodeLocked, unittest.isTrue); | |
| 2050 unittest.expect(o.id, unittest.equals('foo')); | |
| 2051 checkDimensionValue(o.idDimensionValue); | |
| 2052 unittest.expect(o.kind, unittest.equals('foo')); | |
| 2053 checkLastModifiedInfo(o.lastModifiedInfo); | |
| 2054 unittest.expect(o.latestTraffickedCreativeId, unittest.equals('foo')); | |
| 2055 unittest.expect(o.name, unittest.equals('foo')); | |
| 2056 unittest.expect(o.overrideCss, unittest.equals('foo')); | |
| 2057 unittest.expect(o.redirectUrl, unittest.equals('foo')); | |
| 2058 unittest.expect(o.renderingId, unittest.equals('foo')); | |
| 2059 checkDimensionValue(o.renderingIdDimensionValue); | |
| 2060 unittest.expect(o.requiredFlashPluginVersion, unittest.equals('foo')); | |
| 2061 unittest.expect(o.requiredFlashVersion, unittest.equals(42)); | |
| 2062 checkSize(o.size); | |
| 2063 unittest.expect(o.skippable, unittest.isTrue); | |
| 2064 unittest.expect(o.sslCompliant, unittest.isTrue); | |
| 2065 unittest.expect(o.sslOverride, unittest.isTrue); | |
| 2066 unittest.expect(o.studioAdvertiserId, unittest.equals('foo')); | |
| 2067 unittest.expect(o.studioCreativeId, unittest.equals('foo')); | |
| 2068 unittest.expect(o.studioTraffickedCreativeId, unittest.equals('foo')); | |
| 2069 unittest.expect(o.subaccountId, unittest.equals('foo')); | |
| 2070 unittest.expect(o.thirdPartyBackupImageImpressionsUrl, unittest.equals('foo'
)); | |
| 2071 unittest.expect(o.thirdPartyRichMediaImpressionsUrl, unittest.equals('foo'))
; | |
| 2072 checkUnnamed1351(o.thirdPartyUrls); | |
| 2073 checkUnnamed1352(o.timerCustomEvents); | |
| 2074 unittest.expect(o.totalFileSize, unittest.equals('foo')); | |
| 2075 unittest.expect(o.type, unittest.equals('foo')); | |
| 2076 unittest.expect(o.version, unittest.equals(42)); | |
| 2077 unittest.expect(o.videoDescription, unittest.equals('foo')); | |
| 2078 unittest.expect(o.videoDuration, unittest.equals(42.0)); | |
| 2079 } | |
| 2080 buildCounterCreative--; | |
| 2081 } | |
| 2082 | |
| 2083 buildUnnamed1353() { | |
| 2084 var o = new core.List<core.String>(); | |
| 2085 o.add("foo"); | |
| 2086 o.add("foo"); | |
| 2087 return o; | |
| 2088 } | |
| 2089 | |
| 2090 checkUnnamed1353(core.List<core.String> o) { | |
| 2091 unittest.expect(o, unittest.hasLength(2)); | |
| 2092 unittest.expect(o[0], unittest.equals('foo')); | |
| 2093 unittest.expect(o[1], unittest.equals('foo')); | |
| 2094 } | |
| 2095 | |
| 2096 core.int buildCounterCreativeAsset = 0; | |
| 2097 buildCreativeAsset() { | |
| 2098 var o = new api.CreativeAsset(); | |
| 2099 buildCounterCreativeAsset++; | |
| 2100 if (buildCounterCreativeAsset < 3) { | |
| 2101 o.actionScript3 = true; | |
| 2102 o.active = true; | |
| 2103 o.alignment = "foo"; | |
| 2104 o.artworkType = "foo"; | |
| 2105 o.assetIdentifier = buildCreativeAssetId(); | |
| 2106 o.backupImageExit = buildCreativeCustomEvent(); | |
| 2107 o.bitRate = 42; | |
| 2108 o.childAssetType = "foo"; | |
| 2109 o.collapsedSize = buildSize(); | |
| 2110 o.customStartTimeValue = 42; | |
| 2111 o.detectedFeatures = buildUnnamed1353(); | |
| 2112 o.displayType = "foo"; | |
| 2113 o.duration = 42; | |
| 2114 o.durationType = "foo"; | |
| 2115 o.expandedDimension = buildSize(); | |
| 2116 o.fileSize = "foo"; | |
| 2117 o.flashVersion = 42; | |
| 2118 o.hideFlashObjects = true; | |
| 2119 o.hideSelectionBoxes = true; | |
| 2120 o.horizontallyLocked = true; | |
| 2121 o.id = "foo"; | |
| 2122 o.mimeType = "foo"; | |
| 2123 o.offset = buildOffsetPosition(); | |
| 2124 o.originalBackup = true; | |
| 2125 o.position = buildOffsetPosition(); | |
| 2126 o.positionLeftUnit = "foo"; | |
| 2127 o.positionTopUnit = "foo"; | |
| 2128 o.progressiveServingUrl = "foo"; | |
| 2129 o.pushdown = true; | |
| 2130 o.pushdownDuration = 42.0; | |
| 2131 o.role = "foo"; | |
| 2132 o.size = buildSize(); | |
| 2133 o.sslCompliant = true; | |
| 2134 o.startTimeType = "foo"; | |
| 2135 o.streamingServingUrl = "foo"; | |
| 2136 o.transparency = true; | |
| 2137 o.verticallyLocked = true; | |
| 2138 o.videoDuration = 42.0; | |
| 2139 o.windowMode = "foo"; | |
| 2140 o.zIndex = 42; | |
| 2141 o.zipFilename = "foo"; | |
| 2142 o.zipFilesize = "foo"; | |
| 2143 } | |
| 2144 buildCounterCreativeAsset--; | |
| 2145 return o; | |
| 2146 } | |
| 2147 | |
| 2148 checkCreativeAsset(api.CreativeAsset o) { | |
| 2149 buildCounterCreativeAsset++; | |
| 2150 if (buildCounterCreativeAsset < 3) { | |
| 2151 unittest.expect(o.actionScript3, unittest.isTrue); | |
| 2152 unittest.expect(o.active, unittest.isTrue); | |
| 2153 unittest.expect(o.alignment, unittest.equals('foo')); | |
| 2154 unittest.expect(o.artworkType, unittest.equals('foo')); | |
| 2155 checkCreativeAssetId(o.assetIdentifier); | |
| 2156 checkCreativeCustomEvent(o.backupImageExit); | |
| 2157 unittest.expect(o.bitRate, unittest.equals(42)); | |
| 2158 unittest.expect(o.childAssetType, unittest.equals('foo')); | |
| 2159 checkSize(o.collapsedSize); | |
| 2160 unittest.expect(o.customStartTimeValue, unittest.equals(42)); | |
| 2161 checkUnnamed1353(o.detectedFeatures); | |
| 2162 unittest.expect(o.displayType, unittest.equals('foo')); | |
| 2163 unittest.expect(o.duration, unittest.equals(42)); | |
| 2164 unittest.expect(o.durationType, unittest.equals('foo')); | |
| 2165 checkSize(o.expandedDimension); | |
| 2166 unittest.expect(o.fileSize, unittest.equals('foo')); | |
| 2167 unittest.expect(o.flashVersion, unittest.equals(42)); | |
| 2168 unittest.expect(o.hideFlashObjects, unittest.isTrue); | |
| 2169 unittest.expect(o.hideSelectionBoxes, unittest.isTrue); | |
| 2170 unittest.expect(o.horizontallyLocked, unittest.isTrue); | |
| 2171 unittest.expect(o.id, unittest.equals('foo')); | |
| 2172 unittest.expect(o.mimeType, unittest.equals('foo')); | |
| 2173 checkOffsetPosition(o.offset); | |
| 2174 unittest.expect(o.originalBackup, unittest.isTrue); | |
| 2175 checkOffsetPosition(o.position); | |
| 2176 unittest.expect(o.positionLeftUnit, unittest.equals('foo')); | |
| 2177 unittest.expect(o.positionTopUnit, unittest.equals('foo')); | |
| 2178 unittest.expect(o.progressiveServingUrl, unittest.equals('foo')); | |
| 2179 unittest.expect(o.pushdown, unittest.isTrue); | |
| 2180 unittest.expect(o.pushdownDuration, unittest.equals(42.0)); | |
| 2181 unittest.expect(o.role, unittest.equals('foo')); | |
| 2182 checkSize(o.size); | |
| 2183 unittest.expect(o.sslCompliant, unittest.isTrue); | |
| 2184 unittest.expect(o.startTimeType, unittest.equals('foo')); | |
| 2185 unittest.expect(o.streamingServingUrl, unittest.equals('foo')); | |
| 2186 unittest.expect(o.transparency, unittest.isTrue); | |
| 2187 unittest.expect(o.verticallyLocked, unittest.isTrue); | |
| 2188 unittest.expect(o.videoDuration, unittest.equals(42.0)); | |
| 2189 unittest.expect(o.windowMode, unittest.equals('foo')); | |
| 2190 unittest.expect(o.zIndex, unittest.equals(42)); | |
| 2191 unittest.expect(o.zipFilename, unittest.equals('foo')); | |
| 2192 unittest.expect(o.zipFilesize, unittest.equals('foo')); | |
| 2193 } | |
| 2194 buildCounterCreativeAsset--; | |
| 2195 } | |
| 2196 | |
| 2197 core.int buildCounterCreativeAssetId = 0; | |
| 2198 buildCreativeAssetId() { | |
| 2199 var o = new api.CreativeAssetId(); | |
| 2200 buildCounterCreativeAssetId++; | |
| 2201 if (buildCounterCreativeAssetId < 3) { | |
| 2202 o.name = "foo"; | |
| 2203 o.type = "foo"; | |
| 2204 } | |
| 2205 buildCounterCreativeAssetId--; | |
| 2206 return o; | |
| 2207 } | |
| 2208 | |
| 2209 checkCreativeAssetId(api.CreativeAssetId o) { | |
| 2210 buildCounterCreativeAssetId++; | |
| 2211 if (buildCounterCreativeAssetId < 3) { | |
| 2212 unittest.expect(o.name, unittest.equals('foo')); | |
| 2213 unittest.expect(o.type, unittest.equals('foo')); | |
| 2214 } | |
| 2215 buildCounterCreativeAssetId--; | |
| 2216 } | |
| 2217 | |
| 2218 buildUnnamed1354() { | |
| 2219 var o = new core.List<api.ClickTag>(); | |
| 2220 o.add(buildClickTag()); | |
| 2221 o.add(buildClickTag()); | |
| 2222 return o; | |
| 2223 } | |
| 2224 | |
| 2225 checkUnnamed1354(core.List<api.ClickTag> o) { | |
| 2226 unittest.expect(o, unittest.hasLength(2)); | |
| 2227 checkClickTag(o[0]); | |
| 2228 checkClickTag(o[1]); | |
| 2229 } | |
| 2230 | |
| 2231 buildUnnamed1355() { | |
| 2232 var o = new core.List<core.String>(); | |
| 2233 o.add("foo"); | |
| 2234 o.add("foo"); | |
| 2235 return o; | |
| 2236 } | |
| 2237 | |
| 2238 checkUnnamed1355(core.List<core.String> o) { | |
| 2239 unittest.expect(o, unittest.hasLength(2)); | |
| 2240 unittest.expect(o[0], unittest.equals('foo')); | |
| 2241 unittest.expect(o[1], unittest.equals('foo')); | |
| 2242 } | |
| 2243 | |
| 2244 buildUnnamed1356() { | |
| 2245 var o = new core.List<core.String>(); | |
| 2246 o.add("foo"); | |
| 2247 o.add("foo"); | |
| 2248 return o; | |
| 2249 } | |
| 2250 | |
| 2251 checkUnnamed1356(core.List<core.String> o) { | |
| 2252 unittest.expect(o, unittest.hasLength(2)); | |
| 2253 unittest.expect(o[0], unittest.equals('foo')); | |
| 2254 unittest.expect(o[1], unittest.equals('foo')); | |
| 2255 } | |
| 2256 | |
| 2257 core.int buildCounterCreativeAssetMetadata = 0; | |
| 2258 buildCreativeAssetMetadata() { | |
| 2259 var o = new api.CreativeAssetMetadata(); | |
| 2260 buildCounterCreativeAssetMetadata++; | |
| 2261 if (buildCounterCreativeAssetMetadata < 3) { | |
| 2262 o.assetIdentifier = buildCreativeAssetId(); | |
| 2263 o.clickTags = buildUnnamed1354(); | |
| 2264 o.detectedFeatures = buildUnnamed1355(); | |
| 2265 o.kind = "foo"; | |
| 2266 o.warnedValidationRules = buildUnnamed1356(); | |
| 2267 } | |
| 2268 buildCounterCreativeAssetMetadata--; | |
| 2269 return o; | |
| 2270 } | |
| 2271 | |
| 2272 checkCreativeAssetMetadata(api.CreativeAssetMetadata o) { | |
| 2273 buildCounterCreativeAssetMetadata++; | |
| 2274 if (buildCounterCreativeAssetMetadata < 3) { | |
| 2275 checkCreativeAssetId(o.assetIdentifier); | |
| 2276 checkUnnamed1354(o.clickTags); | |
| 2277 checkUnnamed1355(o.detectedFeatures); | |
| 2278 unittest.expect(o.kind, unittest.equals('foo')); | |
| 2279 checkUnnamed1356(o.warnedValidationRules); | |
| 2280 } | |
| 2281 buildCounterCreativeAssetMetadata--; | |
| 2282 } | |
| 2283 | |
| 2284 buildUnnamed1357() { | |
| 2285 var o = new core.List<api.CompanionClickThroughOverride>(); | |
| 2286 o.add(buildCompanionClickThroughOverride()); | |
| 2287 o.add(buildCompanionClickThroughOverride()); | |
| 2288 return o; | |
| 2289 } | |
| 2290 | |
| 2291 checkUnnamed1357(core.List<api.CompanionClickThroughOverride> o) { | |
| 2292 unittest.expect(o, unittest.hasLength(2)); | |
| 2293 checkCompanionClickThroughOverride(o[0]); | |
| 2294 checkCompanionClickThroughOverride(o[1]); | |
| 2295 } | |
| 2296 | |
| 2297 buildUnnamed1358() { | |
| 2298 var o = new core.List<api.CreativeGroupAssignment>(); | |
| 2299 o.add(buildCreativeGroupAssignment()); | |
| 2300 o.add(buildCreativeGroupAssignment()); | |
| 2301 return o; | |
| 2302 } | |
| 2303 | |
| 2304 checkUnnamed1358(core.List<api.CreativeGroupAssignment> o) { | |
| 2305 unittest.expect(o, unittest.hasLength(2)); | |
| 2306 checkCreativeGroupAssignment(o[0]); | |
| 2307 checkCreativeGroupAssignment(o[1]); | |
| 2308 } | |
| 2309 | |
| 2310 buildUnnamed1359() { | |
| 2311 var o = new core.List<api.RichMediaExitOverride>(); | |
| 2312 o.add(buildRichMediaExitOverride()); | |
| 2313 o.add(buildRichMediaExitOverride()); | |
| 2314 return o; | |
| 2315 } | |
| 2316 | |
| 2317 checkUnnamed1359(core.List<api.RichMediaExitOverride> o) { | |
| 2318 unittest.expect(o, unittest.hasLength(2)); | |
| 2319 checkRichMediaExitOverride(o[0]); | |
| 2320 checkRichMediaExitOverride(o[1]); | |
| 2321 } | |
| 2322 | |
| 2323 core.int buildCounterCreativeAssignment = 0; | |
| 2324 buildCreativeAssignment() { | |
| 2325 var o = new api.CreativeAssignment(); | |
| 2326 buildCounterCreativeAssignment++; | |
| 2327 if (buildCounterCreativeAssignment < 3) { | |
| 2328 o.active = true; | |
| 2329 o.applyEventTags = true; | |
| 2330 o.clickThroughUrl = buildClickThroughUrl(); | |
| 2331 o.companionCreativeOverrides = buildUnnamed1357(); | |
| 2332 o.creativeGroupAssignments = buildUnnamed1358(); | |
| 2333 o.creativeId = "foo"; | |
| 2334 o.creativeIdDimensionValue = buildDimensionValue(); | |
| 2335 o.endTime = core.DateTime.parse("2002-02-27T14:01:02"); | |
| 2336 o.richMediaExitOverrides = buildUnnamed1359(); | |
| 2337 o.sequence = 42; | |
| 2338 o.sslCompliant = true; | |
| 2339 o.startTime = core.DateTime.parse("2002-02-27T14:01:02"); | |
| 2340 o.weight = 42; | |
| 2341 } | |
| 2342 buildCounterCreativeAssignment--; | |
| 2343 return o; | |
| 2344 } | |
| 2345 | |
| 2346 checkCreativeAssignment(api.CreativeAssignment o) { | |
| 2347 buildCounterCreativeAssignment++; | |
| 2348 if (buildCounterCreativeAssignment < 3) { | |
| 2349 unittest.expect(o.active, unittest.isTrue); | |
| 2350 unittest.expect(o.applyEventTags, unittest.isTrue); | |
| 2351 checkClickThroughUrl(o.clickThroughUrl); | |
| 2352 checkUnnamed1357(o.companionCreativeOverrides); | |
| 2353 checkUnnamed1358(o.creativeGroupAssignments); | |
| 2354 unittest.expect(o.creativeId, unittest.equals('foo')); | |
| 2355 checkDimensionValue(o.creativeIdDimensionValue); | |
| 2356 unittest.expect(o.endTime, unittest.equals(core.DateTime.parse("2002-02-27T1
4:01:02"))); | |
| 2357 checkUnnamed1359(o.richMediaExitOverrides); | |
| 2358 unittest.expect(o.sequence, unittest.equals(42)); | |
| 2359 unittest.expect(o.sslCompliant, unittest.isTrue); | |
| 2360 unittest.expect(o.startTime, unittest.equals(core.DateTime.parse("2002-02-27
T14:01:02"))); | |
| 2361 unittest.expect(o.weight, unittest.equals(42)); | |
| 2362 } | |
| 2363 buildCounterCreativeAssignment--; | |
| 2364 } | |
| 2365 | |
| 2366 core.int buildCounterCreativeCustomEvent = 0; | |
| 2367 buildCreativeCustomEvent() { | |
| 2368 var o = new api.CreativeCustomEvent(); | |
| 2369 buildCounterCreativeCustomEvent++; | |
| 2370 if (buildCounterCreativeCustomEvent < 3) { | |
| 2371 o.advertiserCustomEventId = "foo"; | |
| 2372 o.advertiserCustomEventName = "foo"; | |
| 2373 o.advertiserCustomEventType = "foo"; | |
| 2374 o.artworkLabel = "foo"; | |
| 2375 o.artworkType = "foo"; | |
| 2376 o.exitUrl = "foo"; | |
| 2377 o.id = "foo"; | |
| 2378 o.popupWindowProperties = buildPopupWindowProperties(); | |
| 2379 o.targetType = "foo"; | |
| 2380 o.videoReportingId = "foo"; | |
| 2381 } | |
| 2382 buildCounterCreativeCustomEvent--; | |
| 2383 return o; | |
| 2384 } | |
| 2385 | |
| 2386 checkCreativeCustomEvent(api.CreativeCustomEvent o) { | |
| 2387 buildCounterCreativeCustomEvent++; | |
| 2388 if (buildCounterCreativeCustomEvent < 3) { | |
| 2389 unittest.expect(o.advertiserCustomEventId, unittest.equals('foo')); | |
| 2390 unittest.expect(o.advertiserCustomEventName, unittest.equals('foo')); | |
| 2391 unittest.expect(o.advertiserCustomEventType, unittest.equals('foo')); | |
| 2392 unittest.expect(o.artworkLabel, unittest.equals('foo')); | |
| 2393 unittest.expect(o.artworkType, unittest.equals('foo')); | |
| 2394 unittest.expect(o.exitUrl, unittest.equals('foo')); | |
| 2395 unittest.expect(o.id, unittest.equals('foo')); | |
| 2396 checkPopupWindowProperties(o.popupWindowProperties); | |
| 2397 unittest.expect(o.targetType, unittest.equals('foo')); | |
| 2398 unittest.expect(o.videoReportingId, unittest.equals('foo')); | |
| 2399 } | |
| 2400 buildCounterCreativeCustomEvent--; | |
| 2401 } | |
| 2402 | |
| 2403 core.int buildCounterCreativeField = 0; | |
| 2404 buildCreativeField() { | |
| 2405 var o = new api.CreativeField(); | |
| 2406 buildCounterCreativeField++; | |
| 2407 if (buildCounterCreativeField < 3) { | |
| 2408 o.accountId = "foo"; | |
| 2409 o.advertiserId = "foo"; | |
| 2410 o.advertiserIdDimensionValue = buildDimensionValue(); | |
| 2411 o.id = "foo"; | |
| 2412 o.kind = "foo"; | |
| 2413 o.name = "foo"; | |
| 2414 o.subaccountId = "foo"; | |
| 2415 } | |
| 2416 buildCounterCreativeField--; | |
| 2417 return o; | |
| 2418 } | |
| 2419 | |
| 2420 checkCreativeField(api.CreativeField o) { | |
| 2421 buildCounterCreativeField++; | |
| 2422 if (buildCounterCreativeField < 3) { | |
| 2423 unittest.expect(o.accountId, unittest.equals('foo')); | |
| 2424 unittest.expect(o.advertiserId, unittest.equals('foo')); | |
| 2425 checkDimensionValue(o.advertiserIdDimensionValue); | |
| 2426 unittest.expect(o.id, unittest.equals('foo')); | |
| 2427 unittest.expect(o.kind, unittest.equals('foo')); | |
| 2428 unittest.expect(o.name, unittest.equals('foo')); | |
| 2429 unittest.expect(o.subaccountId, unittest.equals('foo')); | |
| 2430 } | |
| 2431 buildCounterCreativeField--; | |
| 2432 } | |
| 2433 | |
| 2434 core.int buildCounterCreativeFieldAssignment = 0; | |
| 2435 buildCreativeFieldAssignment() { | |
| 2436 var o = new api.CreativeFieldAssignment(); | |
| 2437 buildCounterCreativeFieldAssignment++; | |
| 2438 if (buildCounterCreativeFieldAssignment < 3) { | |
| 2439 o.creativeFieldId = "foo"; | |
| 2440 o.creativeFieldValueId = "foo"; | |
| 2441 } | |
| 2442 buildCounterCreativeFieldAssignment--; | |
| 2443 return o; | |
| 2444 } | |
| 2445 | |
| 2446 checkCreativeFieldAssignment(api.CreativeFieldAssignment o) { | |
| 2447 buildCounterCreativeFieldAssignment++; | |
| 2448 if (buildCounterCreativeFieldAssignment < 3) { | |
| 2449 unittest.expect(o.creativeFieldId, unittest.equals('foo')); | |
| 2450 unittest.expect(o.creativeFieldValueId, unittest.equals('foo')); | |
| 2451 } | |
| 2452 buildCounterCreativeFieldAssignment--; | |
| 2453 } | |
| 2454 | |
| 2455 core.int buildCounterCreativeFieldValue = 0; | |
| 2456 buildCreativeFieldValue() { | |
| 2457 var o = new api.CreativeFieldValue(); | |
| 2458 buildCounterCreativeFieldValue++; | |
| 2459 if (buildCounterCreativeFieldValue < 3) { | |
| 2460 o.id = "foo"; | |
| 2461 o.kind = "foo"; | |
| 2462 o.value = "foo"; | |
| 2463 } | |
| 2464 buildCounterCreativeFieldValue--; | |
| 2465 return o; | |
| 2466 } | |
| 2467 | |
| 2468 checkCreativeFieldValue(api.CreativeFieldValue o) { | |
| 2469 buildCounterCreativeFieldValue++; | |
| 2470 if (buildCounterCreativeFieldValue < 3) { | |
| 2471 unittest.expect(o.id, unittest.equals('foo')); | |
| 2472 unittest.expect(o.kind, unittest.equals('foo')); | |
| 2473 unittest.expect(o.value, unittest.equals('foo')); | |
| 2474 } | |
| 2475 buildCounterCreativeFieldValue--; | |
| 2476 } | |
| 2477 | |
| 2478 buildUnnamed1360() { | |
| 2479 var o = new core.List<api.CreativeFieldValue>(); | |
| 2480 o.add(buildCreativeFieldValue()); | |
| 2481 o.add(buildCreativeFieldValue()); | |
| 2482 return o; | |
| 2483 } | |
| 2484 | |
| 2485 checkUnnamed1360(core.List<api.CreativeFieldValue> o) { | |
| 2486 unittest.expect(o, unittest.hasLength(2)); | |
| 2487 checkCreativeFieldValue(o[0]); | |
| 2488 checkCreativeFieldValue(o[1]); | |
| 2489 } | |
| 2490 | |
| 2491 core.int buildCounterCreativeFieldValuesListResponse = 0; | |
| 2492 buildCreativeFieldValuesListResponse() { | |
| 2493 var o = new api.CreativeFieldValuesListResponse(); | |
| 2494 buildCounterCreativeFieldValuesListResponse++; | |
| 2495 if (buildCounterCreativeFieldValuesListResponse < 3) { | |
| 2496 o.creativeFieldValues = buildUnnamed1360(); | |
| 2497 o.kind = "foo"; | |
| 2498 o.nextPageToken = "foo"; | |
| 2499 } | |
| 2500 buildCounterCreativeFieldValuesListResponse--; | |
| 2501 return o; | |
| 2502 } | |
| 2503 | |
| 2504 checkCreativeFieldValuesListResponse(api.CreativeFieldValuesListResponse o) { | |
| 2505 buildCounterCreativeFieldValuesListResponse++; | |
| 2506 if (buildCounterCreativeFieldValuesListResponse < 3) { | |
| 2507 checkUnnamed1360(o.creativeFieldValues); | |
| 2508 unittest.expect(o.kind, unittest.equals('foo')); | |
| 2509 unittest.expect(o.nextPageToken, unittest.equals('foo')); | |
| 2510 } | |
| 2511 buildCounterCreativeFieldValuesListResponse--; | |
| 2512 } | |
| 2513 | |
| 2514 buildUnnamed1361() { | |
| 2515 var o = new core.List<api.CreativeField>(); | |
| 2516 o.add(buildCreativeField()); | |
| 2517 o.add(buildCreativeField()); | |
| 2518 return o; | |
| 2519 } | |
| 2520 | |
| 2521 checkUnnamed1361(core.List<api.CreativeField> o) { | |
| 2522 unittest.expect(o, unittest.hasLength(2)); | |
| 2523 checkCreativeField(o[0]); | |
| 2524 checkCreativeField(o[1]); | |
| 2525 } | |
| 2526 | |
| 2527 core.int buildCounterCreativeFieldsListResponse = 0; | |
| 2528 buildCreativeFieldsListResponse() { | |
| 2529 var o = new api.CreativeFieldsListResponse(); | |
| 2530 buildCounterCreativeFieldsListResponse++; | |
| 2531 if (buildCounterCreativeFieldsListResponse < 3) { | |
| 2532 o.creativeFields = buildUnnamed1361(); | |
| 2533 o.kind = "foo"; | |
| 2534 o.nextPageToken = "foo"; | |
| 2535 } | |
| 2536 buildCounterCreativeFieldsListResponse--; | |
| 2537 return o; | |
| 2538 } | |
| 2539 | |
| 2540 checkCreativeFieldsListResponse(api.CreativeFieldsListResponse o) { | |
| 2541 buildCounterCreativeFieldsListResponse++; | |
| 2542 if (buildCounterCreativeFieldsListResponse < 3) { | |
| 2543 checkUnnamed1361(o.creativeFields); | |
| 2544 unittest.expect(o.kind, unittest.equals('foo')); | |
| 2545 unittest.expect(o.nextPageToken, unittest.equals('foo')); | |
| 2546 } | |
| 2547 buildCounterCreativeFieldsListResponse--; | |
| 2548 } | |
| 2549 | |
| 2550 core.int buildCounterCreativeGroup = 0; | |
| 2551 buildCreativeGroup() { | |
| 2552 var o = new api.CreativeGroup(); | |
| 2553 buildCounterCreativeGroup++; | |
| 2554 if (buildCounterCreativeGroup < 3) { | |
| 2555 o.accountId = "foo"; | |
| 2556 o.advertiserId = "foo"; | |
| 2557 o.advertiserIdDimensionValue = buildDimensionValue(); | |
| 2558 o.groupNumber = 42; | |
| 2559 o.id = "foo"; | |
| 2560 o.kind = "foo"; | |
| 2561 o.name = "foo"; | |
| 2562 o.subaccountId = "foo"; | |
| 2563 } | |
| 2564 buildCounterCreativeGroup--; | |
| 2565 return o; | |
| 2566 } | |
| 2567 | |
| 2568 checkCreativeGroup(api.CreativeGroup o) { | |
| 2569 buildCounterCreativeGroup++; | |
| 2570 if (buildCounterCreativeGroup < 3) { | |
| 2571 unittest.expect(o.accountId, unittest.equals('foo')); | |
| 2572 unittest.expect(o.advertiserId, unittest.equals('foo')); | |
| 2573 checkDimensionValue(o.advertiserIdDimensionValue); | |
| 2574 unittest.expect(o.groupNumber, unittest.equals(42)); | |
| 2575 unittest.expect(o.id, unittest.equals('foo')); | |
| 2576 unittest.expect(o.kind, unittest.equals('foo')); | |
| 2577 unittest.expect(o.name, unittest.equals('foo')); | |
| 2578 unittest.expect(o.subaccountId, unittest.equals('foo')); | |
| 2579 } | |
| 2580 buildCounterCreativeGroup--; | |
| 2581 } | |
| 2582 | |
| 2583 core.int buildCounterCreativeGroupAssignment = 0; | |
| 2584 buildCreativeGroupAssignment() { | |
| 2585 var o = new api.CreativeGroupAssignment(); | |
| 2586 buildCounterCreativeGroupAssignment++; | |
| 2587 if (buildCounterCreativeGroupAssignment < 3) { | |
| 2588 o.creativeGroupId = "foo"; | |
| 2589 o.creativeGroupNumber = "foo"; | |
| 2590 } | |
| 2591 buildCounterCreativeGroupAssignment--; | |
| 2592 return o; | |
| 2593 } | |
| 2594 | |
| 2595 checkCreativeGroupAssignment(api.CreativeGroupAssignment o) { | |
| 2596 buildCounterCreativeGroupAssignment++; | |
| 2597 if (buildCounterCreativeGroupAssignment < 3) { | |
| 2598 unittest.expect(o.creativeGroupId, unittest.equals('foo')); | |
| 2599 unittest.expect(o.creativeGroupNumber, unittest.equals('foo')); | |
| 2600 } | |
| 2601 buildCounterCreativeGroupAssignment--; | |
| 2602 } | |
| 2603 | |
| 2604 buildUnnamed1362() { | |
| 2605 var o = new core.List<api.CreativeGroup>(); | |
| 2606 o.add(buildCreativeGroup()); | |
| 2607 o.add(buildCreativeGroup()); | |
| 2608 return o; | |
| 2609 } | |
| 2610 | |
| 2611 checkUnnamed1362(core.List<api.CreativeGroup> o) { | |
| 2612 unittest.expect(o, unittest.hasLength(2)); | |
| 2613 checkCreativeGroup(o[0]); | |
| 2614 checkCreativeGroup(o[1]); | |
| 2615 } | |
| 2616 | |
| 2617 core.int buildCounterCreativeGroupsListResponse = 0; | |
| 2618 buildCreativeGroupsListResponse() { | |
| 2619 var o = new api.CreativeGroupsListResponse(); | |
| 2620 buildCounterCreativeGroupsListResponse++; | |
| 2621 if (buildCounterCreativeGroupsListResponse < 3) { | |
| 2622 o.creativeGroups = buildUnnamed1362(); | |
| 2623 o.kind = "foo"; | |
| 2624 o.nextPageToken = "foo"; | |
| 2625 } | |
| 2626 buildCounterCreativeGroupsListResponse--; | |
| 2627 return o; | |
| 2628 } | |
| 2629 | |
| 2630 checkCreativeGroupsListResponse(api.CreativeGroupsListResponse o) { | |
| 2631 buildCounterCreativeGroupsListResponse++; | |
| 2632 if (buildCounterCreativeGroupsListResponse < 3) { | |
| 2633 checkUnnamed1362(o.creativeGroups); | |
| 2634 unittest.expect(o.kind, unittest.equals('foo')); | |
| 2635 unittest.expect(o.nextPageToken, unittest.equals('foo')); | |
| 2636 } | |
| 2637 buildCounterCreativeGroupsListResponse--; | |
| 2638 } | |
| 2639 | |
| 2640 buildUnnamed1363() { | |
| 2641 var o = new core.List<api.OptimizationActivity>(); | |
| 2642 o.add(buildOptimizationActivity()); | |
| 2643 o.add(buildOptimizationActivity()); | |
| 2644 return o; | |
| 2645 } | |
| 2646 | |
| 2647 checkUnnamed1363(core.List<api.OptimizationActivity> o) { | |
| 2648 unittest.expect(o, unittest.hasLength(2)); | |
| 2649 checkOptimizationActivity(o[0]); | |
| 2650 checkOptimizationActivity(o[1]); | |
| 2651 } | |
| 2652 | |
| 2653 core.int buildCounterCreativeOptimizationConfiguration = 0; | |
| 2654 buildCreativeOptimizationConfiguration() { | |
| 2655 var o = new api.CreativeOptimizationConfiguration(); | |
| 2656 buildCounterCreativeOptimizationConfiguration++; | |
| 2657 if (buildCounterCreativeOptimizationConfiguration < 3) { | |
| 2658 o.id = "foo"; | |
| 2659 o.name = "foo"; | |
| 2660 o.optimizationActivitys = buildUnnamed1363(); | |
| 2661 o.optimizationModel = "foo"; | |
| 2662 } | |
| 2663 buildCounterCreativeOptimizationConfiguration--; | |
| 2664 return o; | |
| 2665 } | |
| 2666 | |
| 2667 checkCreativeOptimizationConfiguration(api.CreativeOptimizationConfiguration o)
{ | |
| 2668 buildCounterCreativeOptimizationConfiguration++; | |
| 2669 if (buildCounterCreativeOptimizationConfiguration < 3) { | |
| 2670 unittest.expect(o.id, unittest.equals('foo')); | |
| 2671 unittest.expect(o.name, unittest.equals('foo')); | |
| 2672 checkUnnamed1363(o.optimizationActivitys); | |
| 2673 unittest.expect(o.optimizationModel, unittest.equals('foo')); | |
| 2674 } | |
| 2675 buildCounterCreativeOptimizationConfiguration--; | |
| 2676 } | |
| 2677 | |
| 2678 buildUnnamed1364() { | |
| 2679 var o = new core.List<api.CreativeAssignment>(); | |
| 2680 o.add(buildCreativeAssignment()); | |
| 2681 o.add(buildCreativeAssignment()); | |
| 2682 return o; | |
| 2683 } | |
| 2684 | |
| 2685 checkUnnamed1364(core.List<api.CreativeAssignment> o) { | |
| 2686 unittest.expect(o, unittest.hasLength(2)); | |
| 2687 checkCreativeAssignment(o[0]); | |
| 2688 checkCreativeAssignment(o[1]); | |
| 2689 } | |
| 2690 | |
| 2691 core.int buildCounterCreativeRotation = 0; | |
| 2692 buildCreativeRotation() { | |
| 2693 var o = new api.CreativeRotation(); | |
| 2694 buildCounterCreativeRotation++; | |
| 2695 if (buildCounterCreativeRotation < 3) { | |
| 2696 o.creativeAssignments = buildUnnamed1364(); | |
| 2697 o.creativeOptimizationConfigurationId = "foo"; | |
| 2698 o.type = "foo"; | |
| 2699 o.weightCalculationStrategy = "foo"; | |
| 2700 } | |
| 2701 buildCounterCreativeRotation--; | |
| 2702 return o; | |
| 2703 } | |
| 2704 | |
| 2705 checkCreativeRotation(api.CreativeRotation o) { | |
| 2706 buildCounterCreativeRotation++; | |
| 2707 if (buildCounterCreativeRotation < 3) { | |
| 2708 checkUnnamed1364(o.creativeAssignments); | |
| 2709 unittest.expect(o.creativeOptimizationConfigurationId, unittest.equals('foo'
)); | |
| 2710 unittest.expect(o.type, unittest.equals('foo')); | |
| 2711 unittest.expect(o.weightCalculationStrategy, unittest.equals('foo')); | |
| 2712 } | |
| 2713 buildCounterCreativeRotation--; | |
| 2714 } | |
| 2715 | |
| 2716 core.int buildCounterCreativeSettings = 0; | |
| 2717 buildCreativeSettings() { | |
| 2718 var o = new api.CreativeSettings(); | |
| 2719 buildCounterCreativeSettings++; | |
| 2720 if (buildCounterCreativeSettings < 3) { | |
| 2721 o.iFrameFooter = "foo"; | |
| 2722 o.iFrameHeader = "foo"; | |
| 2723 } | |
| 2724 buildCounterCreativeSettings--; | |
| 2725 return o; | |
| 2726 } | |
| 2727 | |
| 2728 checkCreativeSettings(api.CreativeSettings o) { | |
| 2729 buildCounterCreativeSettings++; | |
| 2730 if (buildCounterCreativeSettings < 3) { | |
| 2731 unittest.expect(o.iFrameFooter, unittest.equals('foo')); | |
| 2732 unittest.expect(o.iFrameHeader, unittest.equals('foo')); | |
| 2733 } | |
| 2734 buildCounterCreativeSettings--; | |
| 2735 } | |
| 2736 | |
| 2737 buildUnnamed1365() { | |
| 2738 var o = new core.List<api.Creative>(); | |
| 2739 o.add(buildCreative()); | |
| 2740 o.add(buildCreative()); | |
| 2741 return o; | |
| 2742 } | |
| 2743 | |
| 2744 checkUnnamed1365(core.List<api.Creative> o) { | |
| 2745 unittest.expect(o, unittest.hasLength(2)); | |
| 2746 checkCreative(o[0]); | |
| 2747 checkCreative(o[1]); | |
| 2748 } | |
| 2749 | |
| 2750 core.int buildCounterCreativesListResponse = 0; | |
| 2751 buildCreativesListResponse() { | |
| 2752 var o = new api.CreativesListResponse(); | |
| 2753 buildCounterCreativesListResponse++; | |
| 2754 if (buildCounterCreativesListResponse < 3) { | |
| 2755 o.creatives = buildUnnamed1365(); | |
| 2756 o.kind = "foo"; | |
| 2757 o.nextPageToken = "foo"; | |
| 2758 } | |
| 2759 buildCounterCreativesListResponse--; | |
| 2760 return o; | |
| 2761 } | |
| 2762 | |
| 2763 checkCreativesListResponse(api.CreativesListResponse o) { | |
| 2764 buildCounterCreativesListResponse++; | |
| 2765 if (buildCounterCreativesListResponse < 3) { | |
| 2766 checkUnnamed1365(o.creatives); | |
| 2767 unittest.expect(o.kind, unittest.equals('foo')); | |
| 2768 unittest.expect(o.nextPageToken, unittest.equals('foo')); | |
| 2769 } | |
| 2770 buildCounterCreativesListResponse--; | |
| 2771 } | |
| 2772 | |
| 2773 buildUnnamed1366() { | |
| 2774 var o = new core.List<api.Dimension>(); | |
| 2775 o.add(buildDimension()); | |
| 2776 o.add(buildDimension()); | |
| 2777 return o; | |
| 2778 } | |
| 2779 | |
| 2780 checkUnnamed1366(core.List<api.Dimension> o) { | |
| 2781 unittest.expect(o, unittest.hasLength(2)); | |
| 2782 checkDimension(o[0]); | |
| 2783 checkDimension(o[1]); | |
| 2784 } | |
| 2785 | |
| 2786 buildUnnamed1367() { | |
| 2787 var o = new core.List<api.Dimension>(); | |
| 2788 o.add(buildDimension()); | |
| 2789 o.add(buildDimension()); | |
| 2790 return o; | |
| 2791 } | |
| 2792 | |
| 2793 checkUnnamed1367(core.List<api.Dimension> o) { | |
| 2794 unittest.expect(o, unittest.hasLength(2)); | |
| 2795 checkDimension(o[0]); | |
| 2796 checkDimension(o[1]); | |
| 2797 } | |
| 2798 | |
| 2799 buildUnnamed1368() { | |
| 2800 var o = new core.List<api.Metric>(); | |
| 2801 o.add(buildMetric()); | |
| 2802 o.add(buildMetric()); | |
| 2803 return o; | |
| 2804 } | |
| 2805 | |
| 2806 checkUnnamed1368(core.List<api.Metric> o) { | |
| 2807 unittest.expect(o, unittest.hasLength(2)); | |
| 2808 checkMetric(o[0]); | |
| 2809 checkMetric(o[1]); | |
| 2810 } | |
| 2811 | |
| 2812 buildUnnamed1369() { | |
| 2813 var o = new core.List<api.Metric>(); | |
| 2814 o.add(buildMetric()); | |
| 2815 o.add(buildMetric()); | |
| 2816 return o; | |
| 2817 } | |
| 2818 | |
| 2819 checkUnnamed1369(core.List<api.Metric> o) { | |
| 2820 unittest.expect(o, unittest.hasLength(2)); | |
| 2821 checkMetric(o[0]); | |
| 2822 checkMetric(o[1]); | |
| 2823 } | |
| 2824 | |
| 2825 core.int buildCounterCrossDimensionReachReportCompatibleFields = 0; | |
| 2826 buildCrossDimensionReachReportCompatibleFields() { | |
| 2827 var o = new api.CrossDimensionReachReportCompatibleFields(); | |
| 2828 buildCounterCrossDimensionReachReportCompatibleFields++; | |
| 2829 if (buildCounterCrossDimensionReachReportCompatibleFields < 3) { | |
| 2830 o.breakdown = buildUnnamed1366(); | |
| 2831 o.dimensionFilters = buildUnnamed1367(); | |
| 2832 o.kind = "foo"; | |
| 2833 o.metrics = buildUnnamed1368(); | |
| 2834 o.overlapMetrics = buildUnnamed1369(); | |
| 2835 } | |
| 2836 buildCounterCrossDimensionReachReportCompatibleFields--; | |
| 2837 return o; | |
| 2838 } | |
| 2839 | |
| 2840 checkCrossDimensionReachReportCompatibleFields(api.CrossDimensionReachReportComp
atibleFields o) { | |
| 2841 buildCounterCrossDimensionReachReportCompatibleFields++; | |
| 2842 if (buildCounterCrossDimensionReachReportCompatibleFields < 3) { | |
| 2843 checkUnnamed1366(o.breakdown); | |
| 2844 checkUnnamed1367(o.dimensionFilters); | |
| 2845 unittest.expect(o.kind, unittest.equals('foo')); | |
| 2846 checkUnnamed1368(o.metrics); | |
| 2847 checkUnnamed1369(o.overlapMetrics); | |
| 2848 } | |
| 2849 buildCounterCrossDimensionReachReportCompatibleFields--; | |
| 2850 } | |
| 2851 | |
| 2852 core.int buildCounterCustomFloodlightVariable = 0; | |
| 2853 buildCustomFloodlightVariable() { | |
| 2854 var o = new api.CustomFloodlightVariable(); | |
| 2855 buildCounterCustomFloodlightVariable++; | |
| 2856 if (buildCounterCustomFloodlightVariable < 3) { | |
| 2857 o.kind = "foo"; | |
| 2858 o.type = "foo"; | |
| 2859 o.value = "foo"; | |
| 2860 } | |
| 2861 buildCounterCustomFloodlightVariable--; | |
| 2862 return o; | |
| 2863 } | |
| 2864 | |
| 2865 checkCustomFloodlightVariable(api.CustomFloodlightVariable o) { | |
| 2866 buildCounterCustomFloodlightVariable++; | |
| 2867 if (buildCounterCustomFloodlightVariable < 3) { | |
| 2868 unittest.expect(o.kind, unittest.equals('foo')); | |
| 2869 unittest.expect(o.type, unittest.equals('foo')); | |
| 2870 unittest.expect(o.value, unittest.equals('foo')); | |
| 2871 } | |
| 2872 buildCounterCustomFloodlightVariable--; | |
| 2873 } | |
| 2874 | |
| 2875 buildUnnamed1370() { | |
| 2876 var o = new core.List<api.DimensionValue>(); | |
| 2877 o.add(buildDimensionValue()); | |
| 2878 o.add(buildDimensionValue()); | |
| 2879 return o; | |
| 2880 } | |
| 2881 | |
| 2882 checkUnnamed1370(core.List<api.DimensionValue> o) { | |
| 2883 unittest.expect(o, unittest.hasLength(2)); | |
| 2884 checkDimensionValue(o[0]); | |
| 2885 checkDimensionValue(o[1]); | |
| 2886 } | |
| 2887 | |
| 2888 core.int buildCounterCustomRichMediaEvents = 0; | |
| 2889 buildCustomRichMediaEvents() { | |
| 2890 var o = new api.CustomRichMediaEvents(); | |
| 2891 buildCounterCustomRichMediaEvents++; | |
| 2892 if (buildCounterCustomRichMediaEvents < 3) { | |
| 2893 o.filteredEventIds = buildUnnamed1370(); | |
| 2894 o.kind = "foo"; | |
| 2895 } | |
| 2896 buildCounterCustomRichMediaEvents--; | |
| 2897 return o; | |
| 2898 } | |
| 2899 | |
| 2900 checkCustomRichMediaEvents(api.CustomRichMediaEvents o) { | |
| 2901 buildCounterCustomRichMediaEvents++; | |
| 2902 if (buildCounterCustomRichMediaEvents < 3) { | |
| 2903 checkUnnamed1370(o.filteredEventIds); | |
| 2904 unittest.expect(o.kind, unittest.equals('foo')); | |
| 2905 } | |
| 2906 buildCounterCustomRichMediaEvents--; | |
| 2907 } | |
| 2908 | |
| 2909 core.int buildCounterDateRange = 0; | |
| 2910 buildDateRange() { | |
| 2911 var o = new api.DateRange(); | |
| 2912 buildCounterDateRange++; | |
| 2913 if (buildCounterDateRange < 3) { | |
| 2914 o.endDate = core.DateTime.parse("2002-02-27T14:01:02Z"); | |
| 2915 o.kind = "foo"; | |
| 2916 o.relativeDateRange = "foo"; | |
| 2917 o.startDate = core.DateTime.parse("2002-02-27T14:01:02Z"); | |
| 2918 } | |
| 2919 buildCounterDateRange--; | |
| 2920 return o; | |
| 2921 } | |
| 2922 | |
| 2923 checkDateRange(api.DateRange o) { | |
| 2924 buildCounterDateRange++; | |
| 2925 if (buildCounterDateRange < 3) { | |
| 2926 unittest.expect(o.endDate, unittest.equals(core.DateTime.parse("2002-02-27T0
0:00:00"))); | |
| 2927 unittest.expect(o.kind, unittest.equals('foo')); | |
| 2928 unittest.expect(o.relativeDateRange, unittest.equals('foo')); | |
| 2929 unittest.expect(o.startDate, unittest.equals(core.DateTime.parse("2002-02-27
T00:00:00"))); | |
| 2930 } | |
| 2931 buildCounterDateRange--; | |
| 2932 } | |
| 2933 | |
| 2934 buildUnnamed1371() { | |
| 2935 var o = new core.List<core.String>(); | |
| 2936 o.add("foo"); | |
| 2937 o.add("foo"); | |
| 2938 return o; | |
| 2939 } | |
| 2940 | |
| 2941 checkUnnamed1371(core.List<core.String> o) { | |
| 2942 unittest.expect(o, unittest.hasLength(2)); | |
| 2943 unittest.expect(o[0], unittest.equals('foo')); | |
| 2944 unittest.expect(o[1], unittest.equals('foo')); | |
| 2945 } | |
| 2946 | |
| 2947 buildUnnamed1372() { | |
| 2948 var o = new core.List<core.int>(); | |
| 2949 o.add(42); | |
| 2950 o.add(42); | |
| 2951 return o; | |
| 2952 } | |
| 2953 | |
| 2954 checkUnnamed1372(core.List<core.int> o) { | |
| 2955 unittest.expect(o, unittest.hasLength(2)); | |
| 2956 unittest.expect(o[0], unittest.equals(42)); | |
| 2957 unittest.expect(o[1], unittest.equals(42)); | |
| 2958 } | |
| 2959 | |
| 2960 core.int buildCounterDayPartTargeting = 0; | |
| 2961 buildDayPartTargeting() { | |
| 2962 var o = new api.DayPartTargeting(); | |
| 2963 buildCounterDayPartTargeting++; | |
| 2964 if (buildCounterDayPartTargeting < 3) { | |
| 2965 o.daysOfWeek = buildUnnamed1371(); | |
| 2966 o.hoursOfDay = buildUnnamed1372(); | |
| 2967 o.userLocalTime = true; | |
| 2968 } | |
| 2969 buildCounterDayPartTargeting--; | |
| 2970 return o; | |
| 2971 } | |
| 2972 | |
| 2973 checkDayPartTargeting(api.DayPartTargeting o) { | |
| 2974 buildCounterDayPartTargeting++; | |
| 2975 if (buildCounterDayPartTargeting < 3) { | |
| 2976 checkUnnamed1371(o.daysOfWeek); | |
| 2977 checkUnnamed1372(o.hoursOfDay); | |
| 2978 unittest.expect(o.userLocalTime, unittest.isTrue); | |
| 2979 } | |
| 2980 buildCounterDayPartTargeting--; | |
| 2981 } | |
| 2982 | |
| 2983 core.int buildCounterDefaultClickThroughEventTagProperties = 0; | |
| 2984 buildDefaultClickThroughEventTagProperties() { | |
| 2985 var o = new api.DefaultClickThroughEventTagProperties(); | |
| 2986 buildCounterDefaultClickThroughEventTagProperties++; | |
| 2987 if (buildCounterDefaultClickThroughEventTagProperties < 3) { | |
| 2988 o.defaultClickThroughEventTagId = "foo"; | |
| 2989 o.overrideInheritedEventTag = true; | |
| 2990 } | |
| 2991 buildCounterDefaultClickThroughEventTagProperties--; | |
| 2992 return o; | |
| 2993 } | |
| 2994 | |
| 2995 checkDefaultClickThroughEventTagProperties(api.DefaultClickThroughEventTagProper
ties o) { | |
| 2996 buildCounterDefaultClickThroughEventTagProperties++; | |
| 2997 if (buildCounterDefaultClickThroughEventTagProperties < 3) { | |
| 2998 unittest.expect(o.defaultClickThroughEventTagId, unittest.equals('foo')); | |
| 2999 unittest.expect(o.overrideInheritedEventTag, unittest.isTrue); | |
| 3000 } | |
| 3001 buildCounterDefaultClickThroughEventTagProperties--; | |
| 3002 } | |
| 3003 | |
| 3004 core.int buildCounterDeliverySchedule = 0; | |
| 3005 buildDeliverySchedule() { | |
| 3006 var o = new api.DeliverySchedule(); | |
| 3007 buildCounterDeliverySchedule++; | |
| 3008 if (buildCounterDeliverySchedule < 3) { | |
| 3009 o.frequencyCap = buildFrequencyCap(); | |
| 3010 o.hardCutoff = true; | |
| 3011 o.impressionRatio = "foo"; | |
| 3012 o.priority = "foo"; | |
| 3013 } | |
| 3014 buildCounterDeliverySchedule--; | |
| 3015 return o; | |
| 3016 } | |
| 3017 | |
| 3018 checkDeliverySchedule(api.DeliverySchedule o) { | |
| 3019 buildCounterDeliverySchedule++; | |
| 3020 if (buildCounterDeliverySchedule < 3) { | |
| 3021 checkFrequencyCap(o.frequencyCap); | |
| 3022 unittest.expect(o.hardCutoff, unittest.isTrue); | |
| 3023 unittest.expect(o.impressionRatio, unittest.equals('foo')); | |
| 3024 unittest.expect(o.priority, unittest.equals('foo')); | |
| 3025 } | |
| 3026 buildCounterDeliverySchedule--; | |
| 3027 } | |
| 3028 | |
| 3029 core.int buildCounterDfpSettings = 0; | |
| 3030 buildDfpSettings() { | |
| 3031 var o = new api.DfpSettings(); | |
| 3032 buildCounterDfpSettings++; | |
| 3033 if (buildCounterDfpSettings < 3) { | |
| 3034 o.dfpNetworkCode = "foo"; | |
| 3035 o.dfpNetworkName = "foo"; | |
| 3036 o.programmaticPlacementAccepted = true; | |
| 3037 o.pubPaidPlacementAccepted = true; | |
| 3038 o.publisherPortalOnly = true; | |
| 3039 } | |
| 3040 buildCounterDfpSettings--; | |
| 3041 return o; | |
| 3042 } | |
| 3043 | |
| 3044 checkDfpSettings(api.DfpSettings o) { | |
| 3045 buildCounterDfpSettings++; | |
| 3046 if (buildCounterDfpSettings < 3) { | |
| 3047 unittest.expect(o.dfpNetworkCode, unittest.equals('foo')); | |
| 3048 unittest.expect(o.dfpNetworkName, unittest.equals('foo')); | |
| 3049 unittest.expect(o.programmaticPlacementAccepted, unittest.isTrue); | |
| 3050 unittest.expect(o.pubPaidPlacementAccepted, unittest.isTrue); | |
| 3051 unittest.expect(o.publisherPortalOnly, unittest.isTrue); | |
| 3052 } | |
| 3053 buildCounterDfpSettings--; | |
| 3054 } | |
| 3055 | |
| 3056 core.int buildCounterDimension = 0; | |
| 3057 buildDimension() { | |
| 3058 var o = new api.Dimension(); | |
| 3059 buildCounterDimension++; | |
| 3060 if (buildCounterDimension < 3) { | |
| 3061 o.kind = "foo"; | |
| 3062 o.name = "foo"; | |
| 3063 } | |
| 3064 buildCounterDimension--; | |
| 3065 return o; | |
| 3066 } | |
| 3067 | |
| 3068 checkDimension(api.Dimension o) { | |
| 3069 buildCounterDimension++; | |
| 3070 if (buildCounterDimension < 3) { | |
| 3071 unittest.expect(o.kind, unittest.equals('foo')); | |
| 3072 unittest.expect(o.name, unittest.equals('foo')); | |
| 3073 } | |
| 3074 buildCounterDimension--; | |
| 3075 } | |
| 3076 | |
| 3077 core.int buildCounterDimensionFilter = 0; | |
| 3078 buildDimensionFilter() { | |
| 3079 var o = new api.DimensionFilter(); | |
| 3080 buildCounterDimensionFilter++; | |
| 3081 if (buildCounterDimensionFilter < 3) { | |
| 3082 o.dimensionName = "foo"; | |
| 3083 o.kind = "foo"; | |
| 3084 o.value = "foo"; | |
| 3085 } | |
| 3086 buildCounterDimensionFilter--; | |
| 3087 return o; | |
| 3088 } | |
| 3089 | |
| 3090 checkDimensionFilter(api.DimensionFilter o) { | |
| 3091 buildCounterDimensionFilter++; | |
| 3092 if (buildCounterDimensionFilter < 3) { | |
| 3093 unittest.expect(o.dimensionName, unittest.equals('foo')); | |
| 3094 unittest.expect(o.kind, unittest.equals('foo')); | |
| 3095 unittest.expect(o.value, unittest.equals('foo')); | |
| 3096 } | |
| 3097 buildCounterDimensionFilter--; | |
| 3098 } | |
| 3099 | |
| 3100 core.int buildCounterDimensionValue = 0; | |
| 3101 buildDimensionValue() { | |
| 3102 var o = new api.DimensionValue(); | |
| 3103 buildCounterDimensionValue++; | |
| 3104 if (buildCounterDimensionValue < 3) { | |
| 3105 o.dimensionName = "foo"; | |
| 3106 o.etag = "foo"; | |
| 3107 o.id = "foo"; | |
| 3108 o.kind = "foo"; | |
| 3109 o.matchType = "foo"; | |
| 3110 o.value = "foo"; | |
| 3111 } | |
| 3112 buildCounterDimensionValue--; | |
| 3113 return o; | |
| 3114 } | |
| 3115 | |
| 3116 checkDimensionValue(api.DimensionValue o) { | |
| 3117 buildCounterDimensionValue++; | |
| 3118 if (buildCounterDimensionValue < 3) { | |
| 3119 unittest.expect(o.dimensionName, unittest.equals('foo')); | |
| 3120 unittest.expect(o.etag, unittest.equals('foo')); | |
| 3121 unittest.expect(o.id, unittest.equals('foo')); | |
| 3122 unittest.expect(o.kind, unittest.equals('foo')); | |
| 3123 unittest.expect(o.matchType, unittest.equals('foo')); | |
| 3124 unittest.expect(o.value, unittest.equals('foo')); | |
| 3125 } | |
| 3126 buildCounterDimensionValue--; | |
| 3127 } | |
| 3128 | |
| 3129 buildUnnamed1373() { | |
| 3130 var o = new core.List<api.DimensionValue>(); | |
| 3131 o.add(buildDimensionValue()); | |
| 3132 o.add(buildDimensionValue()); | |
| 3133 return o; | |
| 3134 } | |
| 3135 | |
| 3136 checkUnnamed1373(core.List<api.DimensionValue> o) { | |
| 3137 unittest.expect(o, unittest.hasLength(2)); | |
| 3138 checkDimensionValue(o[0]); | |
| 3139 checkDimensionValue(o[1]); | |
| 3140 } | |
| 3141 | |
| 3142 core.int buildCounterDimensionValueList = 0; | |
| 3143 buildDimensionValueList() { | |
| 3144 var o = new api.DimensionValueList(); | |
| 3145 buildCounterDimensionValueList++; | |
| 3146 if (buildCounterDimensionValueList < 3) { | |
| 3147 o.etag = "foo"; | |
| 3148 o.items = buildUnnamed1373(); | |
| 3149 o.kind = "foo"; | |
| 3150 o.nextPageToken = "foo"; | |
| 3151 } | |
| 3152 buildCounterDimensionValueList--; | |
| 3153 return o; | |
| 3154 } | |
| 3155 | |
| 3156 checkDimensionValueList(api.DimensionValueList o) { | |
| 3157 buildCounterDimensionValueList++; | |
| 3158 if (buildCounterDimensionValueList < 3) { | |
| 3159 unittest.expect(o.etag, unittest.equals('foo')); | |
| 3160 checkUnnamed1373(o.items); | |
| 3161 unittest.expect(o.kind, unittest.equals('foo')); | |
| 3162 unittest.expect(o.nextPageToken, unittest.equals('foo')); | |
| 3163 } | |
| 3164 buildCounterDimensionValueList--; | |
| 3165 } | |
| 3166 | |
| 3167 buildUnnamed1374() { | |
| 3168 var o = new core.List<api.DimensionFilter>(); | |
| 3169 o.add(buildDimensionFilter()); | |
| 3170 o.add(buildDimensionFilter()); | |
| 3171 return o; | |
| 3172 } | |
| 3173 | |
| 3174 checkUnnamed1374(core.List<api.DimensionFilter> o) { | |
| 3175 unittest.expect(o, unittest.hasLength(2)); | |
| 3176 checkDimensionFilter(o[0]); | |
| 3177 checkDimensionFilter(o[1]); | |
| 3178 } | |
| 3179 | |
| 3180 core.int buildCounterDimensionValueRequest = 0; | |
| 3181 buildDimensionValueRequest() { | |
| 3182 var o = new api.DimensionValueRequest(); | |
| 3183 buildCounterDimensionValueRequest++; | |
| 3184 if (buildCounterDimensionValueRequest < 3) { | |
| 3185 o.dimensionName = "foo"; | |
| 3186 o.endDate = core.DateTime.parse("2002-02-27T14:01:02Z"); | |
| 3187 o.filters = buildUnnamed1374(); | |
| 3188 o.kind = "foo"; | |
| 3189 o.startDate = core.DateTime.parse("2002-02-27T14:01:02Z"); | |
| 3190 } | |
| 3191 buildCounterDimensionValueRequest--; | |
| 3192 return o; | |
| 3193 } | |
| 3194 | |
| 3195 checkDimensionValueRequest(api.DimensionValueRequest o) { | |
| 3196 buildCounterDimensionValueRequest++; | |
| 3197 if (buildCounterDimensionValueRequest < 3) { | |
| 3198 unittest.expect(o.dimensionName, unittest.equals('foo')); | |
| 3199 unittest.expect(o.endDate, unittest.equals(core.DateTime.parse("2002-02-27T0
0:00:00"))); | |
| 3200 checkUnnamed1374(o.filters); | |
| 3201 unittest.expect(o.kind, unittest.equals('foo')); | |
| 3202 unittest.expect(o.startDate, unittest.equals(core.DateTime.parse("2002-02-27
T00:00:00"))); | |
| 3203 } | |
| 3204 buildCounterDimensionValueRequest--; | |
| 3205 } | |
| 3206 | |
| 3207 buildUnnamed1375() { | |
| 3208 var o = new core.List<api.DirectorySiteContactAssignment>(); | |
| 3209 o.add(buildDirectorySiteContactAssignment()); | |
| 3210 o.add(buildDirectorySiteContactAssignment()); | |
| 3211 return o; | |
| 3212 } | |
| 3213 | |
| 3214 checkUnnamed1375(core.List<api.DirectorySiteContactAssignment> o) { | |
| 3215 unittest.expect(o, unittest.hasLength(2)); | |
| 3216 checkDirectorySiteContactAssignment(o[0]); | |
| 3217 checkDirectorySiteContactAssignment(o[1]); | |
| 3218 } | |
| 3219 | |
| 3220 buildUnnamed1376() { | |
| 3221 var o = new core.List<core.String>(); | |
| 3222 o.add("foo"); | |
| 3223 o.add("foo"); | |
| 3224 return o; | |
| 3225 } | |
| 3226 | |
| 3227 checkUnnamed1376(core.List<core.String> o) { | |
| 3228 unittest.expect(o, unittest.hasLength(2)); | |
| 3229 unittest.expect(o[0], unittest.equals('foo')); | |
| 3230 unittest.expect(o[1], unittest.equals('foo')); | |
| 3231 } | |
| 3232 | |
| 3233 buildUnnamed1377() { | |
| 3234 var o = new core.List<core.String>(); | |
| 3235 o.add("foo"); | |
| 3236 o.add("foo"); | |
| 3237 return o; | |
| 3238 } | |
| 3239 | |
| 3240 checkUnnamed1377(core.List<core.String> o) { | |
| 3241 unittest.expect(o, unittest.hasLength(2)); | |
| 3242 unittest.expect(o[0], unittest.equals('foo')); | |
| 3243 unittest.expect(o[1], unittest.equals('foo')); | |
| 3244 } | |
| 3245 | |
| 3246 core.int buildCounterDirectorySite = 0; | |
| 3247 buildDirectorySite() { | |
| 3248 var o = new api.DirectorySite(); | |
| 3249 buildCounterDirectorySite++; | |
| 3250 if (buildCounterDirectorySite < 3) { | |
| 3251 o.active = true; | |
| 3252 o.contactAssignments = buildUnnamed1375(); | |
| 3253 o.countryId = "foo"; | |
| 3254 o.currencyId = "foo"; | |
| 3255 o.description = "foo"; | |
| 3256 o.id = "foo"; | |
| 3257 o.idDimensionValue = buildDimensionValue(); | |
| 3258 o.inpageTagFormats = buildUnnamed1376(); | |
| 3259 o.interstitialTagFormats = buildUnnamed1377(); | |
| 3260 o.kind = "foo"; | |
| 3261 o.name = "foo"; | |
| 3262 o.parentId = "foo"; | |
| 3263 o.settings = buildDirectorySiteSettings(); | |
| 3264 o.url = "foo"; | |
| 3265 } | |
| 3266 buildCounterDirectorySite--; | |
| 3267 return o; | |
| 3268 } | |
| 3269 | |
| 3270 checkDirectorySite(api.DirectorySite o) { | |
| 3271 buildCounterDirectorySite++; | |
| 3272 if (buildCounterDirectorySite < 3) { | |
| 3273 unittest.expect(o.active, unittest.isTrue); | |
| 3274 checkUnnamed1375(o.contactAssignments); | |
| 3275 unittest.expect(o.countryId, unittest.equals('foo')); | |
| 3276 unittest.expect(o.currencyId, unittest.equals('foo')); | |
| 3277 unittest.expect(o.description, unittest.equals('foo')); | |
| 3278 unittest.expect(o.id, unittest.equals('foo')); | |
| 3279 checkDimensionValue(o.idDimensionValue); | |
| 3280 checkUnnamed1376(o.inpageTagFormats); | |
| 3281 checkUnnamed1377(o.interstitialTagFormats); | |
| 3282 unittest.expect(o.kind, unittest.equals('foo')); | |
| 3283 unittest.expect(o.name, unittest.equals('foo')); | |
| 3284 unittest.expect(o.parentId, unittest.equals('foo')); | |
| 3285 checkDirectorySiteSettings(o.settings); | |
| 3286 unittest.expect(o.url, unittest.equals('foo')); | |
| 3287 } | |
| 3288 buildCounterDirectorySite--; | |
| 3289 } | |
| 3290 | |
| 3291 core.int buildCounterDirectorySiteContact = 0; | |
| 3292 buildDirectorySiteContact() { | |
| 3293 var o = new api.DirectorySiteContact(); | |
| 3294 buildCounterDirectorySiteContact++; | |
| 3295 if (buildCounterDirectorySiteContact < 3) { | |
| 3296 o.address = "foo"; | |
| 3297 o.email = "foo"; | |
| 3298 o.firstName = "foo"; | |
| 3299 o.id = "foo"; | |
| 3300 o.kind = "foo"; | |
| 3301 o.lastName = "foo"; | |
| 3302 o.phone = "foo"; | |
| 3303 o.role = "foo"; | |
| 3304 o.title = "foo"; | |
| 3305 o.type = "foo"; | |
| 3306 } | |
| 3307 buildCounterDirectorySiteContact--; | |
| 3308 return o; | |
| 3309 } | |
| 3310 | |
| 3311 checkDirectorySiteContact(api.DirectorySiteContact o) { | |
| 3312 buildCounterDirectorySiteContact++; | |
| 3313 if (buildCounterDirectorySiteContact < 3) { | |
| 3314 unittest.expect(o.address, unittest.equals('foo')); | |
| 3315 unittest.expect(o.email, unittest.equals('foo')); | |
| 3316 unittest.expect(o.firstName, unittest.equals('foo')); | |
| 3317 unittest.expect(o.id, unittest.equals('foo')); | |
| 3318 unittest.expect(o.kind, unittest.equals('foo')); | |
| 3319 unittest.expect(o.lastName, unittest.equals('foo')); | |
| 3320 unittest.expect(o.phone, unittest.equals('foo')); | |
| 3321 unittest.expect(o.role, unittest.equals('foo')); | |
| 3322 unittest.expect(o.title, unittest.equals('foo')); | |
| 3323 unittest.expect(o.type, unittest.equals('foo')); | |
| 3324 } | |
| 3325 buildCounterDirectorySiteContact--; | |
| 3326 } | |
| 3327 | |
| 3328 core.int buildCounterDirectorySiteContactAssignment = 0; | |
| 3329 buildDirectorySiteContactAssignment() { | |
| 3330 var o = new api.DirectorySiteContactAssignment(); | |
| 3331 buildCounterDirectorySiteContactAssignment++; | |
| 3332 if (buildCounterDirectorySiteContactAssignment < 3) { | |
| 3333 o.contactId = "foo"; | |
| 3334 o.visibility = "foo"; | |
| 3335 } | |
| 3336 buildCounterDirectorySiteContactAssignment--; | |
| 3337 return o; | |
| 3338 } | |
| 3339 | |
| 3340 checkDirectorySiteContactAssignment(api.DirectorySiteContactAssignment o) { | |
| 3341 buildCounterDirectorySiteContactAssignment++; | |
| 3342 if (buildCounterDirectorySiteContactAssignment < 3) { | |
| 3343 unittest.expect(o.contactId, unittest.equals('foo')); | |
| 3344 unittest.expect(o.visibility, unittest.equals('foo')); | |
| 3345 } | |
| 3346 buildCounterDirectorySiteContactAssignment--; | |
| 3347 } | |
| 3348 | |
| 3349 buildUnnamed1378() { | |
| 3350 var o = new core.List<api.DirectorySiteContact>(); | |
| 3351 o.add(buildDirectorySiteContact()); | |
| 3352 o.add(buildDirectorySiteContact()); | |
| 3353 return o; | |
| 3354 } | |
| 3355 | |
| 3356 checkUnnamed1378(core.List<api.DirectorySiteContact> o) { | |
| 3357 unittest.expect(o, unittest.hasLength(2)); | |
| 3358 checkDirectorySiteContact(o[0]); | |
| 3359 checkDirectorySiteContact(o[1]); | |
| 3360 } | |
| 3361 | |
| 3362 core.int buildCounterDirectorySiteContactsListResponse = 0; | |
| 3363 buildDirectorySiteContactsListResponse() { | |
| 3364 var o = new api.DirectorySiteContactsListResponse(); | |
| 3365 buildCounterDirectorySiteContactsListResponse++; | |
| 3366 if (buildCounterDirectorySiteContactsListResponse < 3) { | |
| 3367 o.directorySiteContacts = buildUnnamed1378(); | |
| 3368 o.kind = "foo"; | |
| 3369 o.nextPageToken = "foo"; | |
| 3370 } | |
| 3371 buildCounterDirectorySiteContactsListResponse--; | |
| 3372 return o; | |
| 3373 } | |
| 3374 | |
| 3375 checkDirectorySiteContactsListResponse(api.DirectorySiteContactsListResponse o)
{ | |
| 3376 buildCounterDirectorySiteContactsListResponse++; | |
| 3377 if (buildCounterDirectorySiteContactsListResponse < 3) { | |
| 3378 checkUnnamed1378(o.directorySiteContacts); | |
| 3379 unittest.expect(o.kind, unittest.equals('foo')); | |
| 3380 unittest.expect(o.nextPageToken, unittest.equals('foo')); | |
| 3381 } | |
| 3382 buildCounterDirectorySiteContactsListResponse--; | |
| 3383 } | |
| 3384 | |
| 3385 core.int buildCounterDirectorySiteSettings = 0; | |
| 3386 buildDirectorySiteSettings() { | |
| 3387 var o = new api.DirectorySiteSettings(); | |
| 3388 buildCounterDirectorySiteSettings++; | |
| 3389 if (buildCounterDirectorySiteSettings < 3) { | |
| 3390 o.activeViewOptOut = true; | |
| 3391 o.dfpSettings = buildDfpSettings(); | |
| 3392 o.instreamVideoPlacementAccepted = true; | |
| 3393 o.interstitialPlacementAccepted = true; | |
| 3394 o.nielsenOcrOptOut = true; | |
| 3395 o.verificationTagOptOut = true; | |
| 3396 o.videoActiveViewOptOut = true; | |
| 3397 } | |
| 3398 buildCounterDirectorySiteSettings--; | |
| 3399 return o; | |
| 3400 } | |
| 3401 | |
| 3402 checkDirectorySiteSettings(api.DirectorySiteSettings o) { | |
| 3403 buildCounterDirectorySiteSettings++; | |
| 3404 if (buildCounterDirectorySiteSettings < 3) { | |
| 3405 unittest.expect(o.activeViewOptOut, unittest.isTrue); | |
| 3406 checkDfpSettings(o.dfpSettings); | |
| 3407 unittest.expect(o.instreamVideoPlacementAccepted, unittest.isTrue); | |
| 3408 unittest.expect(o.interstitialPlacementAccepted, unittest.isTrue); | |
| 3409 unittest.expect(o.nielsenOcrOptOut, unittest.isTrue); | |
| 3410 unittest.expect(o.verificationTagOptOut, unittest.isTrue); | |
| 3411 unittest.expect(o.videoActiveViewOptOut, unittest.isTrue); | |
| 3412 } | |
| 3413 buildCounterDirectorySiteSettings--; | |
| 3414 } | |
| 3415 | |
| 3416 buildUnnamed1379() { | |
| 3417 var o = new core.List<api.DirectorySite>(); | |
| 3418 o.add(buildDirectorySite()); | |
| 3419 o.add(buildDirectorySite()); | |
| 3420 return o; | |
| 3421 } | |
| 3422 | |
| 3423 checkUnnamed1379(core.List<api.DirectorySite> o) { | |
| 3424 unittest.expect(o, unittest.hasLength(2)); | |
| 3425 checkDirectorySite(o[0]); | |
| 3426 checkDirectorySite(o[1]); | |
| 3427 } | |
| 3428 | |
| 3429 core.int buildCounterDirectorySitesListResponse = 0; | |
| 3430 buildDirectorySitesListResponse() { | |
| 3431 var o = new api.DirectorySitesListResponse(); | |
| 3432 buildCounterDirectorySitesListResponse++; | |
| 3433 if (buildCounterDirectorySitesListResponse < 3) { | |
| 3434 o.directorySites = buildUnnamed1379(); | |
| 3435 o.kind = "foo"; | |
| 3436 o.nextPageToken = "foo"; | |
| 3437 } | |
| 3438 buildCounterDirectorySitesListResponse--; | |
| 3439 return o; | |
| 3440 } | |
| 3441 | |
| 3442 checkDirectorySitesListResponse(api.DirectorySitesListResponse o) { | |
| 3443 buildCounterDirectorySitesListResponse++; | |
| 3444 if (buildCounterDirectorySitesListResponse < 3) { | |
| 3445 checkUnnamed1379(o.directorySites); | |
| 3446 unittest.expect(o.kind, unittest.equals('foo')); | |
| 3447 unittest.expect(o.nextPageToken, unittest.equals('foo')); | |
| 3448 } | |
| 3449 buildCounterDirectorySitesListResponse--; | |
| 3450 } | |
| 3451 | |
| 3452 core.int buildCounterDynamicTargetingKey = 0; | |
| 3453 buildDynamicTargetingKey() { | |
| 3454 var o = new api.DynamicTargetingKey(); | |
| 3455 buildCounterDynamicTargetingKey++; | |
| 3456 if (buildCounterDynamicTargetingKey < 3) { | |
| 3457 o.kind = "foo"; | |
| 3458 o.name = "foo"; | |
| 3459 o.objectId = "foo"; | |
| 3460 o.objectType = "foo"; | |
| 3461 } | |
| 3462 buildCounterDynamicTargetingKey--; | |
| 3463 return o; | |
| 3464 } | |
| 3465 | |
| 3466 checkDynamicTargetingKey(api.DynamicTargetingKey o) { | |
| 3467 buildCounterDynamicTargetingKey++; | |
| 3468 if (buildCounterDynamicTargetingKey < 3) { | |
| 3469 unittest.expect(o.kind, unittest.equals('foo')); | |
| 3470 unittest.expect(o.name, unittest.equals('foo')); | |
| 3471 unittest.expect(o.objectId, unittest.equals('foo')); | |
| 3472 unittest.expect(o.objectType, unittest.equals('foo')); | |
| 3473 } | |
| 3474 buildCounterDynamicTargetingKey--; | |
| 3475 } | |
| 3476 | |
| 3477 buildUnnamed1380() { | |
| 3478 var o = new core.List<api.DynamicTargetingKey>(); | |
| 3479 o.add(buildDynamicTargetingKey()); | |
| 3480 o.add(buildDynamicTargetingKey()); | |
| 3481 return o; | |
| 3482 } | |
| 3483 | |
| 3484 checkUnnamed1380(core.List<api.DynamicTargetingKey> o) { | |
| 3485 unittest.expect(o, unittest.hasLength(2)); | |
| 3486 checkDynamicTargetingKey(o[0]); | |
| 3487 checkDynamicTargetingKey(o[1]); | |
| 3488 } | |
| 3489 | |
| 3490 core.int buildCounterDynamicTargetingKeysListResponse = 0; | |
| 3491 buildDynamicTargetingKeysListResponse() { | |
| 3492 var o = new api.DynamicTargetingKeysListResponse(); | |
| 3493 buildCounterDynamicTargetingKeysListResponse++; | |
| 3494 if (buildCounterDynamicTargetingKeysListResponse < 3) { | |
| 3495 o.dynamicTargetingKeys = buildUnnamed1380(); | |
| 3496 o.kind = "foo"; | |
| 3497 } | |
| 3498 buildCounterDynamicTargetingKeysListResponse--; | |
| 3499 return o; | |
| 3500 } | |
| 3501 | |
| 3502 checkDynamicTargetingKeysListResponse(api.DynamicTargetingKeysListResponse o) { | |
| 3503 buildCounterDynamicTargetingKeysListResponse++; | |
| 3504 if (buildCounterDynamicTargetingKeysListResponse < 3) { | |
| 3505 checkUnnamed1380(o.dynamicTargetingKeys); | |
| 3506 unittest.expect(o.kind, unittest.equals('foo')); | |
| 3507 } | |
| 3508 buildCounterDynamicTargetingKeysListResponse--; | |
| 3509 } | |
| 3510 | |
| 3511 core.int buildCounterEncryptionInfo = 0; | |
| 3512 buildEncryptionInfo() { | |
| 3513 var o = new api.EncryptionInfo(); | |
| 3514 buildCounterEncryptionInfo++; | |
| 3515 if (buildCounterEncryptionInfo < 3) { | |
| 3516 o.encryptionEntityId = "foo"; | |
| 3517 o.encryptionEntityType = "foo"; | |
| 3518 o.encryptionSource = "foo"; | |
| 3519 o.kind = "foo"; | |
| 3520 } | |
| 3521 buildCounterEncryptionInfo--; | |
| 3522 return o; | |
| 3523 } | |
| 3524 | |
| 3525 checkEncryptionInfo(api.EncryptionInfo o) { | |
| 3526 buildCounterEncryptionInfo++; | |
| 3527 if (buildCounterEncryptionInfo < 3) { | |
| 3528 unittest.expect(o.encryptionEntityId, unittest.equals('foo')); | |
| 3529 unittest.expect(o.encryptionEntityType, unittest.equals('foo')); | |
| 3530 unittest.expect(o.encryptionSource, unittest.equals('foo')); | |
| 3531 unittest.expect(o.kind, unittest.equals('foo')); | |
| 3532 } | |
| 3533 buildCounterEncryptionInfo--; | |
| 3534 } | |
| 3535 | |
| 3536 buildUnnamed1381() { | |
| 3537 var o = new core.List<core.String>(); | |
| 3538 o.add("foo"); | |
| 3539 o.add("foo"); | |
| 3540 return o; | |
| 3541 } | |
| 3542 | |
| 3543 checkUnnamed1381(core.List<core.String> o) { | |
| 3544 unittest.expect(o, unittest.hasLength(2)); | |
| 3545 unittest.expect(o[0], unittest.equals('foo')); | |
| 3546 unittest.expect(o[1], unittest.equals('foo')); | |
| 3547 } | |
| 3548 | |
| 3549 core.int buildCounterEventTag = 0; | |
| 3550 buildEventTag() { | |
| 3551 var o = new api.EventTag(); | |
| 3552 buildCounterEventTag++; | |
| 3553 if (buildCounterEventTag < 3) { | |
| 3554 o.accountId = "foo"; | |
| 3555 o.advertiserId = "foo"; | |
| 3556 o.advertiserIdDimensionValue = buildDimensionValue(); | |
| 3557 o.campaignId = "foo"; | |
| 3558 o.campaignIdDimensionValue = buildDimensionValue(); | |
| 3559 o.enabledByDefault = true; | |
| 3560 o.excludeFromAdxRequests = true; | |
| 3561 o.id = "foo"; | |
| 3562 o.kind = "foo"; | |
| 3563 o.name = "foo"; | |
| 3564 o.siteFilterType = "foo"; | |
| 3565 o.siteIds = buildUnnamed1381(); | |
| 3566 o.sslCompliant = true; | |
| 3567 o.status = "foo"; | |
| 3568 o.subaccountId = "foo"; | |
| 3569 o.type = "foo"; | |
| 3570 o.url = "foo"; | |
| 3571 o.urlEscapeLevels = 42; | |
| 3572 } | |
| 3573 buildCounterEventTag--; | |
| 3574 return o; | |
| 3575 } | |
| 3576 | |
| 3577 checkEventTag(api.EventTag o) { | |
| 3578 buildCounterEventTag++; | |
| 3579 if (buildCounterEventTag < 3) { | |
| 3580 unittest.expect(o.accountId, unittest.equals('foo')); | |
| 3581 unittest.expect(o.advertiserId, unittest.equals('foo')); | |
| 3582 checkDimensionValue(o.advertiserIdDimensionValue); | |
| 3583 unittest.expect(o.campaignId, unittest.equals('foo')); | |
| 3584 checkDimensionValue(o.campaignIdDimensionValue); | |
| 3585 unittest.expect(o.enabledByDefault, unittest.isTrue); | |
| 3586 unittest.expect(o.excludeFromAdxRequests, unittest.isTrue); | |
| 3587 unittest.expect(o.id, unittest.equals('foo')); | |
| 3588 unittest.expect(o.kind, unittest.equals('foo')); | |
| 3589 unittest.expect(o.name, unittest.equals('foo')); | |
| 3590 unittest.expect(o.siteFilterType, unittest.equals('foo')); | |
| 3591 checkUnnamed1381(o.siteIds); | |
| 3592 unittest.expect(o.sslCompliant, unittest.isTrue); | |
| 3593 unittest.expect(o.status, unittest.equals('foo')); | |
| 3594 unittest.expect(o.subaccountId, unittest.equals('foo')); | |
| 3595 unittest.expect(o.type, unittest.equals('foo')); | |
| 3596 unittest.expect(o.url, unittest.equals('foo')); | |
| 3597 unittest.expect(o.urlEscapeLevels, unittest.equals(42)); | |
| 3598 } | |
| 3599 buildCounterEventTag--; | |
| 3600 } | |
| 3601 | |
| 3602 core.int buildCounterEventTagOverride = 0; | |
| 3603 buildEventTagOverride() { | |
| 3604 var o = new api.EventTagOverride(); | |
| 3605 buildCounterEventTagOverride++; | |
| 3606 if (buildCounterEventTagOverride < 3) { | |
| 3607 o.enabled = true; | |
| 3608 o.id = "foo"; | |
| 3609 } | |
| 3610 buildCounterEventTagOverride--; | |
| 3611 return o; | |
| 3612 } | |
| 3613 | |
| 3614 checkEventTagOverride(api.EventTagOverride o) { | |
| 3615 buildCounterEventTagOverride++; | |
| 3616 if (buildCounterEventTagOverride < 3) { | |
| 3617 unittest.expect(o.enabled, unittest.isTrue); | |
| 3618 unittest.expect(o.id, unittest.equals('foo')); | |
| 3619 } | |
| 3620 buildCounterEventTagOverride--; | |
| 3621 } | |
| 3622 | |
| 3623 buildUnnamed1382() { | |
| 3624 var o = new core.List<api.EventTag>(); | |
| 3625 o.add(buildEventTag()); | |
| 3626 o.add(buildEventTag()); | |
| 3627 return o; | |
| 3628 } | |
| 3629 | |
| 3630 checkUnnamed1382(core.List<api.EventTag> o) { | |
| 3631 unittest.expect(o, unittest.hasLength(2)); | |
| 3632 checkEventTag(o[0]); | |
| 3633 checkEventTag(o[1]); | |
| 3634 } | |
| 3635 | |
| 3636 core.int buildCounterEventTagsListResponse = 0; | |
| 3637 buildEventTagsListResponse() { | |
| 3638 var o = new api.EventTagsListResponse(); | |
| 3639 buildCounterEventTagsListResponse++; | |
| 3640 if (buildCounterEventTagsListResponse < 3) { | |
| 3641 o.eventTags = buildUnnamed1382(); | |
| 3642 o.kind = "foo"; | |
| 3643 } | |
| 3644 buildCounterEventTagsListResponse--; | |
| 3645 return o; | |
| 3646 } | |
| 3647 | |
| 3648 checkEventTagsListResponse(api.EventTagsListResponse o) { | |
| 3649 buildCounterEventTagsListResponse++; | |
| 3650 if (buildCounterEventTagsListResponse < 3) { | |
| 3651 checkUnnamed1382(o.eventTags); | |
| 3652 unittest.expect(o.kind, unittest.equals('foo')); | |
| 3653 } | |
| 3654 buildCounterEventTagsListResponse--; | |
| 3655 } | |
| 3656 | |
| 3657 core.int buildCounterFileUrls = 0; | |
| 3658 buildFileUrls() { | |
| 3659 var o = new api.FileUrls(); | |
| 3660 buildCounterFileUrls++; | |
| 3661 if (buildCounterFileUrls < 3) { | |
| 3662 o.apiUrl = "foo"; | |
| 3663 o.browserUrl = "foo"; | |
| 3664 } | |
| 3665 buildCounterFileUrls--; | |
| 3666 return o; | |
| 3667 } | |
| 3668 | |
| 3669 checkFileUrls(api.FileUrls o) { | |
| 3670 buildCounterFileUrls++; | |
| 3671 if (buildCounterFileUrls < 3) { | |
| 3672 unittest.expect(o.apiUrl, unittest.equals('foo')); | |
| 3673 unittest.expect(o.browserUrl, unittest.equals('foo')); | |
| 3674 } | |
| 3675 buildCounterFileUrls--; | |
| 3676 } | |
| 3677 | |
| 3678 core.int buildCounterFile = 0; | |
| 3679 buildFile() { | |
| 3680 var o = new api.File(); | |
| 3681 buildCounterFile++; | |
| 3682 if (buildCounterFile < 3) { | |
| 3683 o.dateRange = buildDateRange(); | |
| 3684 o.etag = "foo"; | |
| 3685 o.fileName = "foo"; | |
| 3686 o.format = "foo"; | |
| 3687 o.id = "foo"; | |
| 3688 o.kind = "foo"; | |
| 3689 o.lastModifiedTime = "foo"; | |
| 3690 o.reportId = "foo"; | |
| 3691 o.status = "foo"; | |
| 3692 o.urls = buildFileUrls(); | |
| 3693 } | |
| 3694 buildCounterFile--; | |
| 3695 return o; | |
| 3696 } | |
| 3697 | |
| 3698 checkFile(api.File o) { | |
| 3699 buildCounterFile++; | |
| 3700 if (buildCounterFile < 3) { | |
| 3701 checkDateRange(o.dateRange); | |
| 3702 unittest.expect(o.etag, unittest.equals('foo')); | |
| 3703 unittest.expect(o.fileName, unittest.equals('foo')); | |
| 3704 unittest.expect(o.format, unittest.equals('foo')); | |
| 3705 unittest.expect(o.id, unittest.equals('foo')); | |
| 3706 unittest.expect(o.kind, unittest.equals('foo')); | |
| 3707 unittest.expect(o.lastModifiedTime, unittest.equals('foo')); | |
| 3708 unittest.expect(o.reportId, unittest.equals('foo')); | |
| 3709 unittest.expect(o.status, unittest.equals('foo')); | |
| 3710 checkFileUrls(o.urls); | |
| 3711 } | |
| 3712 buildCounterFile--; | |
| 3713 } | |
| 3714 | |
| 3715 buildUnnamed1383() { | |
| 3716 var o = new core.List<api.File>(); | |
| 3717 o.add(buildFile()); | |
| 3718 o.add(buildFile()); | |
| 3719 return o; | |
| 3720 } | |
| 3721 | |
| 3722 checkUnnamed1383(core.List<api.File> o) { | |
| 3723 unittest.expect(o, unittest.hasLength(2)); | |
| 3724 checkFile(o[0]); | |
| 3725 checkFile(o[1]); | |
| 3726 } | |
| 3727 | |
| 3728 core.int buildCounterFileList = 0; | |
| 3729 buildFileList() { | |
| 3730 var o = new api.FileList(); | |
| 3731 buildCounterFileList++; | |
| 3732 if (buildCounterFileList < 3) { | |
| 3733 o.etag = "foo"; | |
| 3734 o.items = buildUnnamed1383(); | |
| 3735 o.kind = "foo"; | |
| 3736 o.nextPageToken = "foo"; | |
| 3737 } | |
| 3738 buildCounterFileList--; | |
| 3739 return o; | |
| 3740 } | |
| 3741 | |
| 3742 checkFileList(api.FileList o) { | |
| 3743 buildCounterFileList++; | |
| 3744 if (buildCounterFileList < 3) { | |
| 3745 unittest.expect(o.etag, unittest.equals('foo')); | |
| 3746 checkUnnamed1383(o.items); | |
| 3747 unittest.expect(o.kind, unittest.equals('foo')); | |
| 3748 unittest.expect(o.nextPageToken, unittest.equals('foo')); | |
| 3749 } | |
| 3750 buildCounterFileList--; | |
| 3751 } | |
| 3752 | |
| 3753 core.int buildCounterFlight = 0; | |
| 3754 buildFlight() { | |
| 3755 var o = new api.Flight(); | |
| 3756 buildCounterFlight++; | |
| 3757 if (buildCounterFlight < 3) { | |
| 3758 o.endDate = core.DateTime.parse("2002-02-27T14:01:02Z"); | |
| 3759 o.rateOrCost = "foo"; | |
| 3760 o.startDate = core.DateTime.parse("2002-02-27T14:01:02Z"); | |
| 3761 o.units = "foo"; | |
| 3762 } | |
| 3763 buildCounterFlight--; | |
| 3764 return o; | |
| 3765 } | |
| 3766 | |
| 3767 checkFlight(api.Flight o) { | |
| 3768 buildCounterFlight++; | |
| 3769 if (buildCounterFlight < 3) { | |
| 3770 unittest.expect(o.endDate, unittest.equals(core.DateTime.parse("2002-02-27T0
0:00:00"))); | |
| 3771 unittest.expect(o.rateOrCost, unittest.equals('foo')); | |
| 3772 unittest.expect(o.startDate, unittest.equals(core.DateTime.parse("2002-02-27
T00:00:00"))); | |
| 3773 unittest.expect(o.units, unittest.equals('foo')); | |
| 3774 } | |
| 3775 buildCounterFlight--; | |
| 3776 } | |
| 3777 | |
| 3778 core.int buildCounterFloodlightActivitiesGenerateTagResponse = 0; | |
| 3779 buildFloodlightActivitiesGenerateTagResponse() { | |
| 3780 var o = new api.FloodlightActivitiesGenerateTagResponse(); | |
| 3781 buildCounterFloodlightActivitiesGenerateTagResponse++; | |
| 3782 if (buildCounterFloodlightActivitiesGenerateTagResponse < 3) { | |
| 3783 o.floodlightActivityTag = "foo"; | |
| 3784 o.kind = "foo"; | |
| 3785 } | |
| 3786 buildCounterFloodlightActivitiesGenerateTagResponse--; | |
| 3787 return o; | |
| 3788 } | |
| 3789 | |
| 3790 checkFloodlightActivitiesGenerateTagResponse(api.FloodlightActivitiesGenerateTag
Response o) { | |
| 3791 buildCounterFloodlightActivitiesGenerateTagResponse++; | |
| 3792 if (buildCounterFloodlightActivitiesGenerateTagResponse < 3) { | |
| 3793 unittest.expect(o.floodlightActivityTag, unittest.equals('foo')); | |
| 3794 unittest.expect(o.kind, unittest.equals('foo')); | |
| 3795 } | |
| 3796 buildCounterFloodlightActivitiesGenerateTagResponse--; | |
| 3797 } | |
| 3798 | |
| 3799 buildUnnamed1384() { | |
| 3800 var o = new core.List<api.FloodlightActivity>(); | |
| 3801 o.add(buildFloodlightActivity()); | |
| 3802 o.add(buildFloodlightActivity()); | |
| 3803 return o; | |
| 3804 } | |
| 3805 | |
| 3806 checkUnnamed1384(core.List<api.FloodlightActivity> o) { | |
| 3807 unittest.expect(o, unittest.hasLength(2)); | |
| 3808 checkFloodlightActivity(o[0]); | |
| 3809 checkFloodlightActivity(o[1]); | |
| 3810 } | |
| 3811 | |
| 3812 core.int buildCounterFloodlightActivitiesListResponse = 0; | |
| 3813 buildFloodlightActivitiesListResponse() { | |
| 3814 var o = new api.FloodlightActivitiesListResponse(); | |
| 3815 buildCounterFloodlightActivitiesListResponse++; | |
| 3816 if (buildCounterFloodlightActivitiesListResponse < 3) { | |
| 3817 o.floodlightActivities = buildUnnamed1384(); | |
| 3818 o.kind = "foo"; | |
| 3819 o.nextPageToken = "foo"; | |
| 3820 } | |
| 3821 buildCounterFloodlightActivitiesListResponse--; | |
| 3822 return o; | |
| 3823 } | |
| 3824 | |
| 3825 checkFloodlightActivitiesListResponse(api.FloodlightActivitiesListResponse o) { | |
| 3826 buildCounterFloodlightActivitiesListResponse++; | |
| 3827 if (buildCounterFloodlightActivitiesListResponse < 3) { | |
| 3828 checkUnnamed1384(o.floodlightActivities); | |
| 3829 unittest.expect(o.kind, unittest.equals('foo')); | |
| 3830 unittest.expect(o.nextPageToken, unittest.equals('foo')); | |
| 3831 } | |
| 3832 buildCounterFloodlightActivitiesListResponse--; | |
| 3833 } | |
| 3834 | |
| 3835 buildUnnamed1385() { | |
| 3836 var o = new core.List<api.FloodlightActivityDynamicTag>(); | |
| 3837 o.add(buildFloodlightActivityDynamicTag()); | |
| 3838 o.add(buildFloodlightActivityDynamicTag()); | |
| 3839 return o; | |
| 3840 } | |
| 3841 | |
| 3842 checkUnnamed1385(core.List<api.FloodlightActivityDynamicTag> o) { | |
| 3843 unittest.expect(o, unittest.hasLength(2)); | |
| 3844 checkFloodlightActivityDynamicTag(o[0]); | |
| 3845 checkFloodlightActivityDynamicTag(o[1]); | |
| 3846 } | |
| 3847 | |
| 3848 buildUnnamed1386() { | |
| 3849 var o = new core.List<api.FloodlightActivityPublisherDynamicTag>(); | |
| 3850 o.add(buildFloodlightActivityPublisherDynamicTag()); | |
| 3851 o.add(buildFloodlightActivityPublisherDynamicTag()); | |
| 3852 return o; | |
| 3853 } | |
| 3854 | |
| 3855 checkUnnamed1386(core.List<api.FloodlightActivityPublisherDynamicTag> o) { | |
| 3856 unittest.expect(o, unittest.hasLength(2)); | |
| 3857 checkFloodlightActivityPublisherDynamicTag(o[0]); | |
| 3858 checkFloodlightActivityPublisherDynamicTag(o[1]); | |
| 3859 } | |
| 3860 | |
| 3861 buildUnnamed1387() { | |
| 3862 var o = new core.List<core.String>(); | |
| 3863 o.add("foo"); | |
| 3864 o.add("foo"); | |
| 3865 return o; | |
| 3866 } | |
| 3867 | |
| 3868 checkUnnamed1387(core.List<core.String> o) { | |
| 3869 unittest.expect(o, unittest.hasLength(2)); | |
| 3870 unittest.expect(o[0], unittest.equals('foo')); | |
| 3871 unittest.expect(o[1], unittest.equals('foo')); | |
| 3872 } | |
| 3873 | |
| 3874 core.int buildCounterFloodlightActivity = 0; | |
| 3875 buildFloodlightActivity() { | |
| 3876 var o = new api.FloodlightActivity(); | |
| 3877 buildCounterFloodlightActivity++; | |
| 3878 if (buildCounterFloodlightActivity < 3) { | |
| 3879 o.accountId = "foo"; | |
| 3880 o.advertiserId = "foo"; | |
| 3881 o.advertiserIdDimensionValue = buildDimensionValue(); | |
| 3882 o.cacheBustingType = "foo"; | |
| 3883 o.countingMethod = "foo"; | |
| 3884 o.defaultTags = buildUnnamed1385(); | |
| 3885 o.expectedUrl = "foo"; | |
| 3886 o.floodlightActivityGroupId = "foo"; | |
| 3887 o.floodlightActivityGroupName = "foo"; | |
| 3888 o.floodlightActivityGroupTagString = "foo"; | |
| 3889 o.floodlightActivityGroupType = "foo"; | |
| 3890 o.floodlightConfigurationId = "foo"; | |
| 3891 o.floodlightConfigurationIdDimensionValue = buildDimensionValue(); | |
| 3892 o.hidden = true; | |
| 3893 o.id = "foo"; | |
| 3894 o.idDimensionValue = buildDimensionValue(); | |
| 3895 o.imageTagEnabled = true; | |
| 3896 o.kind = "foo"; | |
| 3897 o.name = "foo"; | |
| 3898 o.notes = "foo"; | |
| 3899 o.publisherTags = buildUnnamed1386(); | |
| 3900 o.secure = true; | |
| 3901 o.sslCompliant = true; | |
| 3902 o.sslRequired = true; | |
| 3903 o.subaccountId = "foo"; | |
| 3904 o.tagFormat = "foo"; | |
| 3905 o.tagString = "foo"; | |
| 3906 o.userDefinedVariableTypes = buildUnnamed1387(); | |
| 3907 } | |
| 3908 buildCounterFloodlightActivity--; | |
| 3909 return o; | |
| 3910 } | |
| 3911 | |
| 3912 checkFloodlightActivity(api.FloodlightActivity o) { | |
| 3913 buildCounterFloodlightActivity++; | |
| 3914 if (buildCounterFloodlightActivity < 3) { | |
| 3915 unittest.expect(o.accountId, unittest.equals('foo')); | |
| 3916 unittest.expect(o.advertiserId, unittest.equals('foo')); | |
| 3917 checkDimensionValue(o.advertiserIdDimensionValue); | |
| 3918 unittest.expect(o.cacheBustingType, unittest.equals('foo')); | |
| 3919 unittest.expect(o.countingMethod, unittest.equals('foo')); | |
| 3920 checkUnnamed1385(o.defaultTags); | |
| 3921 unittest.expect(o.expectedUrl, unittest.equals('foo')); | |
| 3922 unittest.expect(o.floodlightActivityGroupId, unittest.equals('foo')); | |
| 3923 unittest.expect(o.floodlightActivityGroupName, unittest.equals('foo')); | |
| 3924 unittest.expect(o.floodlightActivityGroupTagString, unittest.equals('foo')); | |
| 3925 unittest.expect(o.floodlightActivityGroupType, unittest.equals('foo')); | |
| 3926 unittest.expect(o.floodlightConfigurationId, unittest.equals('foo')); | |
| 3927 checkDimensionValue(o.floodlightConfigurationIdDimensionValue); | |
| 3928 unittest.expect(o.hidden, unittest.isTrue); | |
| 3929 unittest.expect(o.id, unittest.equals('foo')); | |
| 3930 checkDimensionValue(o.idDimensionValue); | |
| 3931 unittest.expect(o.imageTagEnabled, unittest.isTrue); | |
| 3932 unittest.expect(o.kind, unittest.equals('foo')); | |
| 3933 unittest.expect(o.name, unittest.equals('foo')); | |
| 3934 unittest.expect(o.notes, unittest.equals('foo')); | |
| 3935 checkUnnamed1386(o.publisherTags); | |
| 3936 unittest.expect(o.secure, unittest.isTrue); | |
| 3937 unittest.expect(o.sslCompliant, unittest.isTrue); | |
| 3938 unittest.expect(o.sslRequired, unittest.isTrue); | |
| 3939 unittest.expect(o.subaccountId, unittest.equals('foo')); | |
| 3940 unittest.expect(o.tagFormat, unittest.equals('foo')); | |
| 3941 unittest.expect(o.tagString, unittest.equals('foo')); | |
| 3942 checkUnnamed1387(o.userDefinedVariableTypes); | |
| 3943 } | |
| 3944 buildCounterFloodlightActivity--; | |
| 3945 } | |
| 3946 | |
| 3947 core.int buildCounterFloodlightActivityDynamicTag = 0; | |
| 3948 buildFloodlightActivityDynamicTag() { | |
| 3949 var o = new api.FloodlightActivityDynamicTag(); | |
| 3950 buildCounterFloodlightActivityDynamicTag++; | |
| 3951 if (buildCounterFloodlightActivityDynamicTag < 3) { | |
| 3952 o.id = "foo"; | |
| 3953 o.name = "foo"; | |
| 3954 o.tag = "foo"; | |
| 3955 } | |
| 3956 buildCounterFloodlightActivityDynamicTag--; | |
| 3957 return o; | |
| 3958 } | |
| 3959 | |
| 3960 checkFloodlightActivityDynamicTag(api.FloodlightActivityDynamicTag o) { | |
| 3961 buildCounterFloodlightActivityDynamicTag++; | |
| 3962 if (buildCounterFloodlightActivityDynamicTag < 3) { | |
| 3963 unittest.expect(o.id, unittest.equals('foo')); | |
| 3964 unittest.expect(o.name, unittest.equals('foo')); | |
| 3965 unittest.expect(o.tag, unittest.equals('foo')); | |
| 3966 } | |
| 3967 buildCounterFloodlightActivityDynamicTag--; | |
| 3968 } | |
| 3969 | |
| 3970 core.int buildCounterFloodlightActivityGroup = 0; | |
| 3971 buildFloodlightActivityGroup() { | |
| 3972 var o = new api.FloodlightActivityGroup(); | |
| 3973 buildCounterFloodlightActivityGroup++; | |
| 3974 if (buildCounterFloodlightActivityGroup < 3) { | |
| 3975 o.accountId = "foo"; | |
| 3976 o.advertiserId = "foo"; | |
| 3977 o.advertiserIdDimensionValue = buildDimensionValue(); | |
| 3978 o.floodlightConfigurationId = "foo"; | |
| 3979 o.floodlightConfigurationIdDimensionValue = buildDimensionValue(); | |
| 3980 o.id = "foo"; | |
| 3981 o.idDimensionValue = buildDimensionValue(); | |
| 3982 o.kind = "foo"; | |
| 3983 o.name = "foo"; | |
| 3984 o.subaccountId = "foo"; | |
| 3985 o.tagString = "foo"; | |
| 3986 o.type = "foo"; | |
| 3987 } | |
| 3988 buildCounterFloodlightActivityGroup--; | |
| 3989 return o; | |
| 3990 } | |
| 3991 | |
| 3992 checkFloodlightActivityGroup(api.FloodlightActivityGroup o) { | |
| 3993 buildCounterFloodlightActivityGroup++; | |
| 3994 if (buildCounterFloodlightActivityGroup < 3) { | |
| 3995 unittest.expect(o.accountId, unittest.equals('foo')); | |
| 3996 unittest.expect(o.advertiserId, unittest.equals('foo')); | |
| 3997 checkDimensionValue(o.advertiserIdDimensionValue); | |
| 3998 unittest.expect(o.floodlightConfigurationId, unittest.equals('foo')); | |
| 3999 checkDimensionValue(o.floodlightConfigurationIdDimensionValue); | |
| 4000 unittest.expect(o.id, unittest.equals('foo')); | |
| 4001 checkDimensionValue(o.idDimensionValue); | |
| 4002 unittest.expect(o.kind, unittest.equals('foo')); | |
| 4003 unittest.expect(o.name, unittest.equals('foo')); | |
| 4004 unittest.expect(o.subaccountId, unittest.equals('foo')); | |
| 4005 unittest.expect(o.tagString, unittest.equals('foo')); | |
| 4006 unittest.expect(o.type, unittest.equals('foo')); | |
| 4007 } | |
| 4008 buildCounterFloodlightActivityGroup--; | |
| 4009 } | |
| 4010 | |
| 4011 buildUnnamed1388() { | |
| 4012 var o = new core.List<api.FloodlightActivityGroup>(); | |
| 4013 o.add(buildFloodlightActivityGroup()); | |
| 4014 o.add(buildFloodlightActivityGroup()); | |
| 4015 return o; | |
| 4016 } | |
| 4017 | |
| 4018 checkUnnamed1388(core.List<api.FloodlightActivityGroup> o) { | |
| 4019 unittest.expect(o, unittest.hasLength(2)); | |
| 4020 checkFloodlightActivityGroup(o[0]); | |
| 4021 checkFloodlightActivityGroup(o[1]); | |
| 4022 } | |
| 4023 | |
| 4024 core.int buildCounterFloodlightActivityGroupsListResponse = 0; | |
| 4025 buildFloodlightActivityGroupsListResponse() { | |
| 4026 var o = new api.FloodlightActivityGroupsListResponse(); | |
| 4027 buildCounterFloodlightActivityGroupsListResponse++; | |
| 4028 if (buildCounterFloodlightActivityGroupsListResponse < 3) { | |
| 4029 o.floodlightActivityGroups = buildUnnamed1388(); | |
| 4030 o.kind = "foo"; | |
| 4031 o.nextPageToken = "foo"; | |
| 4032 } | |
| 4033 buildCounterFloodlightActivityGroupsListResponse--; | |
| 4034 return o; | |
| 4035 } | |
| 4036 | |
| 4037 checkFloodlightActivityGroupsListResponse(api.FloodlightActivityGroupsListRespon
se o) { | |
| 4038 buildCounterFloodlightActivityGroupsListResponse++; | |
| 4039 if (buildCounterFloodlightActivityGroupsListResponse < 3) { | |
| 4040 checkUnnamed1388(o.floodlightActivityGroups); | |
| 4041 unittest.expect(o.kind, unittest.equals('foo')); | |
| 4042 unittest.expect(o.nextPageToken, unittest.equals('foo')); | |
| 4043 } | |
| 4044 buildCounterFloodlightActivityGroupsListResponse--; | |
| 4045 } | |
| 4046 | |
| 4047 core.int buildCounterFloodlightActivityPublisherDynamicTag = 0; | |
| 4048 buildFloodlightActivityPublisherDynamicTag() { | |
| 4049 var o = new api.FloodlightActivityPublisherDynamicTag(); | |
| 4050 buildCounterFloodlightActivityPublisherDynamicTag++; | |
| 4051 if (buildCounterFloodlightActivityPublisherDynamicTag < 3) { | |
| 4052 o.clickThrough = true; | |
| 4053 o.directorySiteId = "foo"; | |
| 4054 o.dynamicTag = buildFloodlightActivityDynamicTag(); | |
| 4055 o.siteId = "foo"; | |
| 4056 o.siteIdDimensionValue = buildDimensionValue(); | |
| 4057 o.viewThrough = true; | |
| 4058 } | |
| 4059 buildCounterFloodlightActivityPublisherDynamicTag--; | |
| 4060 return o; | |
| 4061 } | |
| 4062 | |
| 4063 checkFloodlightActivityPublisherDynamicTag(api.FloodlightActivityPublisherDynami
cTag o) { | |
| 4064 buildCounterFloodlightActivityPublisherDynamicTag++; | |
| 4065 if (buildCounterFloodlightActivityPublisherDynamicTag < 3) { | |
| 4066 unittest.expect(o.clickThrough, unittest.isTrue); | |
| 4067 unittest.expect(o.directorySiteId, unittest.equals('foo')); | |
| 4068 checkFloodlightActivityDynamicTag(o.dynamicTag); | |
| 4069 unittest.expect(o.siteId, unittest.equals('foo')); | |
| 4070 checkDimensionValue(o.siteIdDimensionValue); | |
| 4071 unittest.expect(o.viewThrough, unittest.isTrue); | |
| 4072 } | |
| 4073 buildCounterFloodlightActivityPublisherDynamicTag--; | |
| 4074 } | |
| 4075 | |
| 4076 buildUnnamed1389() { | |
| 4077 var o = new core.List<core.String>(); | |
| 4078 o.add("foo"); | |
| 4079 o.add("foo"); | |
| 4080 return o; | |
| 4081 } | |
| 4082 | |
| 4083 checkUnnamed1389(core.List<core.String> o) { | |
| 4084 unittest.expect(o, unittest.hasLength(2)); | |
| 4085 unittest.expect(o[0], unittest.equals('foo')); | |
| 4086 unittest.expect(o[1], unittest.equals('foo')); | |
| 4087 } | |
| 4088 | |
| 4089 buildUnnamed1390() { | |
| 4090 var o = new core.List<api.ThirdPartyAuthenticationToken>(); | |
| 4091 o.add(buildThirdPartyAuthenticationToken()); | |
| 4092 o.add(buildThirdPartyAuthenticationToken()); | |
| 4093 return o; | |
| 4094 } | |
| 4095 | |
| 4096 checkUnnamed1390(core.List<api.ThirdPartyAuthenticationToken> o) { | |
| 4097 unittest.expect(o, unittest.hasLength(2)); | |
| 4098 checkThirdPartyAuthenticationToken(o[0]); | |
| 4099 checkThirdPartyAuthenticationToken(o[1]); | |
| 4100 } | |
| 4101 | |
| 4102 buildUnnamed1391() { | |
| 4103 var o = new core.List<api.UserDefinedVariableConfiguration>(); | |
| 4104 o.add(buildUserDefinedVariableConfiguration()); | |
| 4105 o.add(buildUserDefinedVariableConfiguration()); | |
| 4106 return o; | |
| 4107 } | |
| 4108 | |
| 4109 checkUnnamed1391(core.List<api.UserDefinedVariableConfiguration> o) { | |
| 4110 unittest.expect(o, unittest.hasLength(2)); | |
| 4111 checkUserDefinedVariableConfiguration(o[0]); | |
| 4112 checkUserDefinedVariableConfiguration(o[1]); | |
| 4113 } | |
| 4114 | |
| 4115 core.int buildCounterFloodlightConfiguration = 0; | |
| 4116 buildFloodlightConfiguration() { | |
| 4117 var o = new api.FloodlightConfiguration(); | |
| 4118 buildCounterFloodlightConfiguration++; | |
| 4119 if (buildCounterFloodlightConfiguration < 3) { | |
| 4120 o.accountId = "foo"; | |
| 4121 o.advertiserId = "foo"; | |
| 4122 o.advertiserIdDimensionValue = buildDimensionValue(); | |
| 4123 o.analyticsDataSharingEnabled = true; | |
| 4124 o.exposureToConversionEnabled = true; | |
| 4125 o.firstDayOfWeek = "foo"; | |
| 4126 o.id = "foo"; | |
| 4127 o.idDimensionValue = buildDimensionValue(); | |
| 4128 o.inAppAttributionTrackingEnabled = true; | |
| 4129 o.kind = "foo"; | |
| 4130 o.lookbackConfiguration = buildLookbackConfiguration(); | |
| 4131 o.naturalSearchConversionAttributionOption = "foo"; | |
| 4132 o.omnitureSettings = buildOmnitureSettings(); | |
| 4133 o.standardVariableTypes = buildUnnamed1389(); | |
| 4134 o.subaccountId = "foo"; | |
| 4135 o.tagSettings = buildTagSettings(); | |
| 4136 o.thirdPartyAuthenticationTokens = buildUnnamed1390(); | |
| 4137 o.userDefinedVariableConfigurations = buildUnnamed1391(); | |
| 4138 } | |
| 4139 buildCounterFloodlightConfiguration--; | |
| 4140 return o; | |
| 4141 } | |
| 4142 | |
| 4143 checkFloodlightConfiguration(api.FloodlightConfiguration o) { | |
| 4144 buildCounterFloodlightConfiguration++; | |
| 4145 if (buildCounterFloodlightConfiguration < 3) { | |
| 4146 unittest.expect(o.accountId, unittest.equals('foo')); | |
| 4147 unittest.expect(o.advertiserId, unittest.equals('foo')); | |
| 4148 checkDimensionValue(o.advertiserIdDimensionValue); | |
| 4149 unittest.expect(o.analyticsDataSharingEnabled, unittest.isTrue); | |
| 4150 unittest.expect(o.exposureToConversionEnabled, unittest.isTrue); | |
| 4151 unittest.expect(o.firstDayOfWeek, unittest.equals('foo')); | |
| 4152 unittest.expect(o.id, unittest.equals('foo')); | |
| 4153 checkDimensionValue(o.idDimensionValue); | |
| 4154 unittest.expect(o.inAppAttributionTrackingEnabled, unittest.isTrue); | |
| 4155 unittest.expect(o.kind, unittest.equals('foo')); | |
| 4156 checkLookbackConfiguration(o.lookbackConfiguration); | |
| 4157 unittest.expect(o.naturalSearchConversionAttributionOption, unittest.equals(
'foo')); | |
| 4158 checkOmnitureSettings(o.omnitureSettings); | |
| 4159 checkUnnamed1389(o.standardVariableTypes); | |
| 4160 unittest.expect(o.subaccountId, unittest.equals('foo')); | |
| 4161 checkTagSettings(o.tagSettings); | |
| 4162 checkUnnamed1390(o.thirdPartyAuthenticationTokens); | |
| 4163 checkUnnamed1391(o.userDefinedVariableConfigurations); | |
| 4164 } | |
| 4165 buildCounterFloodlightConfiguration--; | |
| 4166 } | |
| 4167 | |
| 4168 buildUnnamed1392() { | |
| 4169 var o = new core.List<api.FloodlightConfiguration>(); | |
| 4170 o.add(buildFloodlightConfiguration()); | |
| 4171 o.add(buildFloodlightConfiguration()); | |
| 4172 return o; | |
| 4173 } | |
| 4174 | |
| 4175 checkUnnamed1392(core.List<api.FloodlightConfiguration> o) { | |
| 4176 unittest.expect(o, unittest.hasLength(2)); | |
| 4177 checkFloodlightConfiguration(o[0]); | |
| 4178 checkFloodlightConfiguration(o[1]); | |
| 4179 } | |
| 4180 | |
| 4181 core.int buildCounterFloodlightConfigurationsListResponse = 0; | |
| 4182 buildFloodlightConfigurationsListResponse() { | |
| 4183 var o = new api.FloodlightConfigurationsListResponse(); | |
| 4184 buildCounterFloodlightConfigurationsListResponse++; | |
| 4185 if (buildCounterFloodlightConfigurationsListResponse < 3) { | |
| 4186 o.floodlightConfigurations = buildUnnamed1392(); | |
| 4187 o.kind = "foo"; | |
| 4188 } | |
| 4189 buildCounterFloodlightConfigurationsListResponse--; | |
| 4190 return o; | |
| 4191 } | |
| 4192 | |
| 4193 checkFloodlightConfigurationsListResponse(api.FloodlightConfigurationsListRespon
se o) { | |
| 4194 buildCounterFloodlightConfigurationsListResponse++; | |
| 4195 if (buildCounterFloodlightConfigurationsListResponse < 3) { | |
| 4196 checkUnnamed1392(o.floodlightConfigurations); | |
| 4197 unittest.expect(o.kind, unittest.equals('foo')); | |
| 4198 } | |
| 4199 buildCounterFloodlightConfigurationsListResponse--; | |
| 4200 } | |
| 4201 | |
| 4202 buildUnnamed1393() { | |
| 4203 var o = new core.List<api.Dimension>(); | |
| 4204 o.add(buildDimension()); | |
| 4205 o.add(buildDimension()); | |
| 4206 return o; | |
| 4207 } | |
| 4208 | |
| 4209 checkUnnamed1393(core.List<api.Dimension> o) { | |
| 4210 unittest.expect(o, unittest.hasLength(2)); | |
| 4211 checkDimension(o[0]); | |
| 4212 checkDimension(o[1]); | |
| 4213 } | |
| 4214 | |
| 4215 buildUnnamed1394() { | |
| 4216 var o = new core.List<api.Dimension>(); | |
| 4217 o.add(buildDimension()); | |
| 4218 o.add(buildDimension()); | |
| 4219 return o; | |
| 4220 } | |
| 4221 | |
| 4222 checkUnnamed1394(core.List<api.Dimension> o) { | |
| 4223 unittest.expect(o, unittest.hasLength(2)); | |
| 4224 checkDimension(o[0]); | |
| 4225 checkDimension(o[1]); | |
| 4226 } | |
| 4227 | |
| 4228 buildUnnamed1395() { | |
| 4229 var o = new core.List<api.Metric>(); | |
| 4230 o.add(buildMetric()); | |
| 4231 o.add(buildMetric()); | |
| 4232 return o; | |
| 4233 } | |
| 4234 | |
| 4235 checkUnnamed1395(core.List<api.Metric> o) { | |
| 4236 unittest.expect(o, unittest.hasLength(2)); | |
| 4237 checkMetric(o[0]); | |
| 4238 checkMetric(o[1]); | |
| 4239 } | |
| 4240 | |
| 4241 core.int buildCounterFloodlightReportCompatibleFields = 0; | |
| 4242 buildFloodlightReportCompatibleFields() { | |
| 4243 var o = new api.FloodlightReportCompatibleFields(); | |
| 4244 buildCounterFloodlightReportCompatibleFields++; | |
| 4245 if (buildCounterFloodlightReportCompatibleFields < 3) { | |
| 4246 o.dimensionFilters = buildUnnamed1393(); | |
| 4247 o.dimensions = buildUnnamed1394(); | |
| 4248 o.kind = "foo"; | |
| 4249 o.metrics = buildUnnamed1395(); | |
| 4250 } | |
| 4251 buildCounterFloodlightReportCompatibleFields--; | |
| 4252 return o; | |
| 4253 } | |
| 4254 | |
| 4255 checkFloodlightReportCompatibleFields(api.FloodlightReportCompatibleFields o) { | |
| 4256 buildCounterFloodlightReportCompatibleFields++; | |
| 4257 if (buildCounterFloodlightReportCompatibleFields < 3) { | |
| 4258 checkUnnamed1393(o.dimensionFilters); | |
| 4259 checkUnnamed1394(o.dimensions); | |
| 4260 unittest.expect(o.kind, unittest.equals('foo')); | |
| 4261 checkUnnamed1395(o.metrics); | |
| 4262 } | |
| 4263 buildCounterFloodlightReportCompatibleFields--; | |
| 4264 } | |
| 4265 | |
| 4266 core.int buildCounterFrequencyCap = 0; | |
| 4267 buildFrequencyCap() { | |
| 4268 var o = new api.FrequencyCap(); | |
| 4269 buildCounterFrequencyCap++; | |
| 4270 if (buildCounterFrequencyCap < 3) { | |
| 4271 o.duration = "foo"; | |
| 4272 o.impressions = "foo"; | |
| 4273 } | |
| 4274 buildCounterFrequencyCap--; | |
| 4275 return o; | |
| 4276 } | |
| 4277 | |
| 4278 checkFrequencyCap(api.FrequencyCap o) { | |
| 4279 buildCounterFrequencyCap++; | |
| 4280 if (buildCounterFrequencyCap < 3) { | |
| 4281 unittest.expect(o.duration, unittest.equals('foo')); | |
| 4282 unittest.expect(o.impressions, unittest.equals('foo')); | |
| 4283 } | |
| 4284 buildCounterFrequencyCap--; | |
| 4285 } | |
| 4286 | |
| 4287 core.int buildCounterFsCommand = 0; | |
| 4288 buildFsCommand() { | |
| 4289 var o = new api.FsCommand(); | |
| 4290 buildCounterFsCommand++; | |
| 4291 if (buildCounterFsCommand < 3) { | |
| 4292 o.left = 42; | |
| 4293 o.positionOption = "foo"; | |
| 4294 o.top = 42; | |
| 4295 o.windowHeight = 42; | |
| 4296 o.windowWidth = 42; | |
| 4297 } | |
| 4298 buildCounterFsCommand--; | |
| 4299 return o; | |
| 4300 } | |
| 4301 | |
| 4302 checkFsCommand(api.FsCommand o) { | |
| 4303 buildCounterFsCommand++; | |
| 4304 if (buildCounterFsCommand < 3) { | |
| 4305 unittest.expect(o.left, unittest.equals(42)); | |
| 4306 unittest.expect(o.positionOption, unittest.equals('foo')); | |
| 4307 unittest.expect(o.top, unittest.equals(42)); | |
| 4308 unittest.expect(o.windowHeight, unittest.equals(42)); | |
| 4309 unittest.expect(o.windowWidth, unittest.equals(42)); | |
| 4310 } | |
| 4311 buildCounterFsCommand--; | |
| 4312 } | |
| 4313 | |
| 4314 buildUnnamed1396() { | |
| 4315 var o = new core.List<api.City>(); | |
| 4316 o.add(buildCity()); | |
| 4317 o.add(buildCity()); | |
| 4318 return o; | |
| 4319 } | |
| 4320 | |
| 4321 checkUnnamed1396(core.List<api.City> o) { | |
| 4322 unittest.expect(o, unittest.hasLength(2)); | |
| 4323 checkCity(o[0]); | |
| 4324 checkCity(o[1]); | |
| 4325 } | |
| 4326 | |
| 4327 buildUnnamed1397() { | |
| 4328 var o = new core.List<api.Country>(); | |
| 4329 o.add(buildCountry()); | |
| 4330 o.add(buildCountry()); | |
| 4331 return o; | |
| 4332 } | |
| 4333 | |
| 4334 checkUnnamed1397(core.List<api.Country> o) { | |
| 4335 unittest.expect(o, unittest.hasLength(2)); | |
| 4336 checkCountry(o[0]); | |
| 4337 checkCountry(o[1]); | |
| 4338 } | |
| 4339 | |
| 4340 buildUnnamed1398() { | |
| 4341 var o = new core.List<api.Metro>(); | |
| 4342 o.add(buildMetro()); | |
| 4343 o.add(buildMetro()); | |
| 4344 return o; | |
| 4345 } | |
| 4346 | |
| 4347 checkUnnamed1398(core.List<api.Metro> o) { | |
| 4348 unittest.expect(o, unittest.hasLength(2)); | |
| 4349 checkMetro(o[0]); | |
| 4350 checkMetro(o[1]); | |
| 4351 } | |
| 4352 | |
| 4353 buildUnnamed1399() { | |
| 4354 var o = new core.List<api.PostalCode>(); | |
| 4355 o.add(buildPostalCode()); | |
| 4356 o.add(buildPostalCode()); | |
| 4357 return o; | |
| 4358 } | |
| 4359 | |
| 4360 checkUnnamed1399(core.List<api.PostalCode> o) { | |
| 4361 unittest.expect(o, unittest.hasLength(2)); | |
| 4362 checkPostalCode(o[0]); | |
| 4363 checkPostalCode(o[1]); | |
| 4364 } | |
| 4365 | |
| 4366 buildUnnamed1400() { | |
| 4367 var o = new core.List<api.Region>(); | |
| 4368 o.add(buildRegion()); | |
| 4369 o.add(buildRegion()); | |
| 4370 return o; | |
| 4371 } | |
| 4372 | |
| 4373 checkUnnamed1400(core.List<api.Region> o) { | |
| 4374 unittest.expect(o, unittest.hasLength(2)); | |
| 4375 checkRegion(o[0]); | |
| 4376 checkRegion(o[1]); | |
| 4377 } | |
| 4378 | |
| 4379 core.int buildCounterGeoTargeting = 0; | |
| 4380 buildGeoTargeting() { | |
| 4381 var o = new api.GeoTargeting(); | |
| 4382 buildCounterGeoTargeting++; | |
| 4383 if (buildCounterGeoTargeting < 3) { | |
| 4384 o.cities = buildUnnamed1396(); | |
| 4385 o.countries = buildUnnamed1397(); | |
| 4386 o.excludeCountries = true; | |
| 4387 o.metros = buildUnnamed1398(); | |
| 4388 o.postalCodes = buildUnnamed1399(); | |
| 4389 o.regions = buildUnnamed1400(); | |
| 4390 } | |
| 4391 buildCounterGeoTargeting--; | |
| 4392 return o; | |
| 4393 } | |
| 4394 | |
| 4395 checkGeoTargeting(api.GeoTargeting o) { | |
| 4396 buildCounterGeoTargeting++; | |
| 4397 if (buildCounterGeoTargeting < 3) { | |
| 4398 checkUnnamed1396(o.cities); | |
| 4399 checkUnnamed1397(o.countries); | |
| 4400 unittest.expect(o.excludeCountries, unittest.isTrue); | |
| 4401 checkUnnamed1398(o.metros); | |
| 4402 checkUnnamed1399(o.postalCodes); | |
| 4403 checkUnnamed1400(o.regions); | |
| 4404 } | |
| 4405 buildCounterGeoTargeting--; | |
| 4406 } | |
| 4407 | |
| 4408 buildUnnamed1401() { | |
| 4409 var o = new core.List<api.AdSlot>(); | |
| 4410 o.add(buildAdSlot()); | |
| 4411 o.add(buildAdSlot()); | |
| 4412 return o; | |
| 4413 } | |
| 4414 | |
| 4415 checkUnnamed1401(core.List<api.AdSlot> o) { | |
| 4416 unittest.expect(o, unittest.hasLength(2)); | |
| 4417 checkAdSlot(o[0]); | |
| 4418 checkAdSlot(o[1]); | |
| 4419 } | |
| 4420 | |
| 4421 core.int buildCounterInventoryItem = 0; | |
| 4422 buildInventoryItem() { | |
| 4423 var o = new api.InventoryItem(); | |
| 4424 buildCounterInventoryItem++; | |
| 4425 if (buildCounterInventoryItem < 3) { | |
| 4426 o.accountId = "foo"; | |
| 4427 o.adSlots = buildUnnamed1401(); | |
| 4428 o.advertiserId = "foo"; | |
| 4429 o.contentCategoryId = "foo"; | |
| 4430 o.estimatedClickThroughRate = "foo"; | |
| 4431 o.estimatedConversionRate = "foo"; | |
| 4432 o.id = "foo"; | |
| 4433 o.inPlan = true; | |
| 4434 o.kind = "foo"; | |
| 4435 o.lastModifiedInfo = buildLastModifiedInfo(); | |
| 4436 o.name = "foo"; | |
| 4437 o.negotiationChannelId = "foo"; | |
| 4438 o.orderId = "foo"; | |
| 4439 o.placementStrategyId = "foo"; | |
| 4440 o.pricing = buildPricing(); | |
| 4441 o.projectId = "foo"; | |
| 4442 o.rfpId = "foo"; | |
| 4443 o.siteId = "foo"; | |
| 4444 o.subaccountId = "foo"; | |
| 4445 o.type = "foo"; | |
| 4446 } | |
| 4447 buildCounterInventoryItem--; | |
| 4448 return o; | |
| 4449 } | |
| 4450 | |
| 4451 checkInventoryItem(api.InventoryItem o) { | |
| 4452 buildCounterInventoryItem++; | |
| 4453 if (buildCounterInventoryItem < 3) { | |
| 4454 unittest.expect(o.accountId, unittest.equals('foo')); | |
| 4455 checkUnnamed1401(o.adSlots); | |
| 4456 unittest.expect(o.advertiserId, unittest.equals('foo')); | |
| 4457 unittest.expect(o.contentCategoryId, unittest.equals('foo')); | |
| 4458 unittest.expect(o.estimatedClickThroughRate, unittest.equals('foo')); | |
| 4459 unittest.expect(o.estimatedConversionRate, unittest.equals('foo')); | |
| 4460 unittest.expect(o.id, unittest.equals('foo')); | |
| 4461 unittest.expect(o.inPlan, unittest.isTrue); | |
| 4462 unittest.expect(o.kind, unittest.equals('foo')); | |
| 4463 checkLastModifiedInfo(o.lastModifiedInfo); | |
| 4464 unittest.expect(o.name, unittest.equals('foo')); | |
| 4465 unittest.expect(o.negotiationChannelId, unittest.equals('foo')); | |
| 4466 unittest.expect(o.orderId, unittest.equals('foo')); | |
| 4467 unittest.expect(o.placementStrategyId, unittest.equals('foo')); | |
| 4468 checkPricing(o.pricing); | |
| 4469 unittest.expect(o.projectId, unittest.equals('foo')); | |
| 4470 unittest.expect(o.rfpId, unittest.equals('foo')); | |
| 4471 unittest.expect(o.siteId, unittest.equals('foo')); | |
| 4472 unittest.expect(o.subaccountId, unittest.equals('foo')); | |
| 4473 unittest.expect(o.type, unittest.equals('foo')); | |
| 4474 } | |
| 4475 buildCounterInventoryItem--; | |
| 4476 } | |
| 4477 | |
| 4478 buildUnnamed1402() { | |
| 4479 var o = new core.List<api.InventoryItem>(); | |
| 4480 o.add(buildInventoryItem()); | |
| 4481 o.add(buildInventoryItem()); | |
| 4482 return o; | |
| 4483 } | |
| 4484 | |
| 4485 checkUnnamed1402(core.List<api.InventoryItem> o) { | |
| 4486 unittest.expect(o, unittest.hasLength(2)); | |
| 4487 checkInventoryItem(o[0]); | |
| 4488 checkInventoryItem(o[1]); | |
| 4489 } | |
| 4490 | |
| 4491 core.int buildCounterInventoryItemsListResponse = 0; | |
| 4492 buildInventoryItemsListResponse() { | |
| 4493 var o = new api.InventoryItemsListResponse(); | |
| 4494 buildCounterInventoryItemsListResponse++; | |
| 4495 if (buildCounterInventoryItemsListResponse < 3) { | |
| 4496 o.inventoryItems = buildUnnamed1402(); | |
| 4497 o.kind = "foo"; | |
| 4498 o.nextPageToken = "foo"; | |
| 4499 } | |
| 4500 buildCounterInventoryItemsListResponse--; | |
| 4501 return o; | |
| 4502 } | |
| 4503 | |
| 4504 checkInventoryItemsListResponse(api.InventoryItemsListResponse o) { | |
| 4505 buildCounterInventoryItemsListResponse++; | |
| 4506 if (buildCounterInventoryItemsListResponse < 3) { | |
| 4507 checkUnnamed1402(o.inventoryItems); | |
| 4508 unittest.expect(o.kind, unittest.equals('foo')); | |
| 4509 unittest.expect(o.nextPageToken, unittest.equals('foo')); | |
| 4510 } | |
| 4511 buildCounterInventoryItemsListResponse--; | |
| 4512 } | |
| 4513 | |
| 4514 core.int buildCounterKeyValueTargetingExpression = 0; | |
| 4515 buildKeyValueTargetingExpression() { | |
| 4516 var o = new api.KeyValueTargetingExpression(); | |
| 4517 buildCounterKeyValueTargetingExpression++; | |
| 4518 if (buildCounterKeyValueTargetingExpression < 3) { | |
| 4519 o.expression = "foo"; | |
| 4520 } | |
| 4521 buildCounterKeyValueTargetingExpression--; | |
| 4522 return o; | |
| 4523 } | |
| 4524 | |
| 4525 checkKeyValueTargetingExpression(api.KeyValueTargetingExpression o) { | |
| 4526 buildCounterKeyValueTargetingExpression++; | |
| 4527 if (buildCounterKeyValueTargetingExpression < 3) { | |
| 4528 unittest.expect(o.expression, unittest.equals('foo')); | |
| 4529 } | |
| 4530 buildCounterKeyValueTargetingExpression--; | |
| 4531 } | |
| 4532 | |
| 4533 core.int buildCounterLandingPage = 0; | |
| 4534 buildLandingPage() { | |
| 4535 var o = new api.LandingPage(); | |
| 4536 buildCounterLandingPage++; | |
| 4537 if (buildCounterLandingPage < 3) { | |
| 4538 o.default_ = true; | |
| 4539 o.id = "foo"; | |
| 4540 o.kind = "foo"; | |
| 4541 o.name = "foo"; | |
| 4542 o.url = "foo"; | |
| 4543 } | |
| 4544 buildCounterLandingPage--; | |
| 4545 return o; | |
| 4546 } | |
| 4547 | |
| 4548 checkLandingPage(api.LandingPage o) { | |
| 4549 buildCounterLandingPage++; | |
| 4550 if (buildCounterLandingPage < 3) { | |
| 4551 unittest.expect(o.default_, unittest.isTrue); | |
| 4552 unittest.expect(o.id, unittest.equals('foo')); | |
| 4553 unittest.expect(o.kind, unittest.equals('foo')); | |
| 4554 unittest.expect(o.name, unittest.equals('foo')); | |
| 4555 unittest.expect(o.url, unittest.equals('foo')); | |
| 4556 } | |
| 4557 buildCounterLandingPage--; | |
| 4558 } | |
| 4559 | |
| 4560 buildUnnamed1403() { | |
| 4561 var o = new core.List<api.LandingPage>(); | |
| 4562 o.add(buildLandingPage()); | |
| 4563 o.add(buildLandingPage()); | |
| 4564 return o; | |
| 4565 } | |
| 4566 | |
| 4567 checkUnnamed1403(core.List<api.LandingPage> o) { | |
| 4568 unittest.expect(o, unittest.hasLength(2)); | |
| 4569 checkLandingPage(o[0]); | |
| 4570 checkLandingPage(o[1]); | |
| 4571 } | |
| 4572 | |
| 4573 core.int buildCounterLandingPagesListResponse = 0; | |
| 4574 buildLandingPagesListResponse() { | |
| 4575 var o = new api.LandingPagesListResponse(); | |
| 4576 buildCounterLandingPagesListResponse++; | |
| 4577 if (buildCounterLandingPagesListResponse < 3) { | |
| 4578 o.kind = "foo"; | |
| 4579 o.landingPages = buildUnnamed1403(); | |
| 4580 } | |
| 4581 buildCounterLandingPagesListResponse--; | |
| 4582 return o; | |
| 4583 } | |
| 4584 | |
| 4585 checkLandingPagesListResponse(api.LandingPagesListResponse o) { | |
| 4586 buildCounterLandingPagesListResponse++; | |
| 4587 if (buildCounterLandingPagesListResponse < 3) { | |
| 4588 unittest.expect(o.kind, unittest.equals('foo')); | |
| 4589 checkUnnamed1403(o.landingPages); | |
| 4590 } | |
| 4591 buildCounterLandingPagesListResponse--; | |
| 4592 } | |
| 4593 | |
| 4594 core.int buildCounterLastModifiedInfo = 0; | |
| 4595 buildLastModifiedInfo() { | |
| 4596 var o = new api.LastModifiedInfo(); | |
| 4597 buildCounterLastModifiedInfo++; | |
| 4598 if (buildCounterLastModifiedInfo < 3) { | |
| 4599 o.time = "foo"; | |
| 4600 } | |
| 4601 buildCounterLastModifiedInfo--; | |
| 4602 return o; | |
| 4603 } | |
| 4604 | |
| 4605 checkLastModifiedInfo(api.LastModifiedInfo o) { | |
| 4606 buildCounterLastModifiedInfo++; | |
| 4607 if (buildCounterLastModifiedInfo < 3) { | |
| 4608 unittest.expect(o.time, unittest.equals('foo')); | |
| 4609 } | |
| 4610 buildCounterLastModifiedInfo--; | |
| 4611 } | |
| 4612 | |
| 4613 buildUnnamed1404() { | |
| 4614 var o = new core.List<api.ListPopulationTerm>(); | |
| 4615 o.add(buildListPopulationTerm()); | |
| 4616 o.add(buildListPopulationTerm()); | |
| 4617 return o; | |
| 4618 } | |
| 4619 | |
| 4620 checkUnnamed1404(core.List<api.ListPopulationTerm> o) { | |
| 4621 unittest.expect(o, unittest.hasLength(2)); | |
| 4622 checkListPopulationTerm(o[0]); | |
| 4623 checkListPopulationTerm(o[1]); | |
| 4624 } | |
| 4625 | |
| 4626 core.int buildCounterListPopulationClause = 0; | |
| 4627 buildListPopulationClause() { | |
| 4628 var o = new api.ListPopulationClause(); | |
| 4629 buildCounterListPopulationClause++; | |
| 4630 if (buildCounterListPopulationClause < 3) { | |
| 4631 o.terms = buildUnnamed1404(); | |
| 4632 } | |
| 4633 buildCounterListPopulationClause--; | |
| 4634 return o; | |
| 4635 } | |
| 4636 | |
| 4637 checkListPopulationClause(api.ListPopulationClause o) { | |
| 4638 buildCounterListPopulationClause++; | |
| 4639 if (buildCounterListPopulationClause < 3) { | |
| 4640 checkUnnamed1404(o.terms); | |
| 4641 } | |
| 4642 buildCounterListPopulationClause--; | |
| 4643 } | |
| 4644 | |
| 4645 buildUnnamed1405() { | |
| 4646 var o = new core.List<api.ListPopulationClause>(); | |
| 4647 o.add(buildListPopulationClause()); | |
| 4648 o.add(buildListPopulationClause()); | |
| 4649 return o; | |
| 4650 } | |
| 4651 | |
| 4652 checkUnnamed1405(core.List<api.ListPopulationClause> o) { | |
| 4653 unittest.expect(o, unittest.hasLength(2)); | |
| 4654 checkListPopulationClause(o[0]); | |
| 4655 checkListPopulationClause(o[1]); | |
| 4656 } | |
| 4657 | |
| 4658 core.int buildCounterListPopulationRule = 0; | |
| 4659 buildListPopulationRule() { | |
| 4660 var o = new api.ListPopulationRule(); | |
| 4661 buildCounterListPopulationRule++; | |
| 4662 if (buildCounterListPopulationRule < 3) { | |
| 4663 o.floodlightActivityId = "foo"; | |
| 4664 o.floodlightActivityName = "foo"; | |
| 4665 o.listPopulationClauses = buildUnnamed1405(); | |
| 4666 } | |
| 4667 buildCounterListPopulationRule--; | |
| 4668 return o; | |
| 4669 } | |
| 4670 | |
| 4671 checkListPopulationRule(api.ListPopulationRule o) { | |
| 4672 buildCounterListPopulationRule++; | |
| 4673 if (buildCounterListPopulationRule < 3) { | |
| 4674 unittest.expect(o.floodlightActivityId, unittest.equals('foo')); | |
| 4675 unittest.expect(o.floodlightActivityName, unittest.equals('foo')); | |
| 4676 checkUnnamed1405(o.listPopulationClauses); | |
| 4677 } | |
| 4678 buildCounterListPopulationRule--; | |
| 4679 } | |
| 4680 | |
| 4681 core.int buildCounterListPopulationTerm = 0; | |
| 4682 buildListPopulationTerm() { | |
| 4683 var o = new api.ListPopulationTerm(); | |
| 4684 buildCounterListPopulationTerm++; | |
| 4685 if (buildCounterListPopulationTerm < 3) { | |
| 4686 o.contains = true; | |
| 4687 o.negation = true; | |
| 4688 o.operator = "foo"; | |
| 4689 o.remarketingListId = "foo"; | |
| 4690 o.type = "foo"; | |
| 4691 o.value = "foo"; | |
| 4692 o.variableFriendlyName = "foo"; | |
| 4693 o.variableName = "foo"; | |
| 4694 } | |
| 4695 buildCounterListPopulationTerm--; | |
| 4696 return o; | |
| 4697 } | |
| 4698 | |
| 4699 checkListPopulationTerm(api.ListPopulationTerm o) { | |
| 4700 buildCounterListPopulationTerm++; | |
| 4701 if (buildCounterListPopulationTerm < 3) { | |
| 4702 unittest.expect(o.contains, unittest.isTrue); | |
| 4703 unittest.expect(o.negation, unittest.isTrue); | |
| 4704 unittest.expect(o.operator, unittest.equals('foo')); | |
| 4705 unittest.expect(o.remarketingListId, unittest.equals('foo')); | |
| 4706 unittest.expect(o.type, unittest.equals('foo')); | |
| 4707 unittest.expect(o.value, unittest.equals('foo')); | |
| 4708 unittest.expect(o.variableFriendlyName, unittest.equals('foo')); | |
| 4709 unittest.expect(o.variableName, unittest.equals('foo')); | |
| 4710 } | |
| 4711 buildCounterListPopulationTerm--; | |
| 4712 } | |
| 4713 | |
| 4714 core.int buildCounterListTargetingExpression = 0; | |
| 4715 buildListTargetingExpression() { | |
| 4716 var o = new api.ListTargetingExpression(); | |
| 4717 buildCounterListTargetingExpression++; | |
| 4718 if (buildCounterListTargetingExpression < 3) { | |
| 4719 o.expression = "foo"; | |
| 4720 } | |
| 4721 buildCounterListTargetingExpression--; | |
| 4722 return o; | |
| 4723 } | |
| 4724 | |
| 4725 checkListTargetingExpression(api.ListTargetingExpression o) { | |
| 4726 buildCounterListTargetingExpression++; | |
| 4727 if (buildCounterListTargetingExpression < 3) { | |
| 4728 unittest.expect(o.expression, unittest.equals('foo')); | |
| 4729 } | |
| 4730 buildCounterListTargetingExpression--; | |
| 4731 } | |
| 4732 | |
| 4733 core.int buildCounterLookbackConfiguration = 0; | |
| 4734 buildLookbackConfiguration() { | |
| 4735 var o = new api.LookbackConfiguration(); | |
| 4736 buildCounterLookbackConfiguration++; | |
| 4737 if (buildCounterLookbackConfiguration < 3) { | |
| 4738 o.clickDuration = 42; | |
| 4739 o.postImpressionActivitiesDuration = 42; | |
| 4740 } | |
| 4741 buildCounterLookbackConfiguration--; | |
| 4742 return o; | |
| 4743 } | |
| 4744 | |
| 4745 checkLookbackConfiguration(api.LookbackConfiguration o) { | |
| 4746 buildCounterLookbackConfiguration++; | |
| 4747 if (buildCounterLookbackConfiguration < 3) { | |
| 4748 unittest.expect(o.clickDuration, unittest.equals(42)); | |
| 4749 unittest.expect(o.postImpressionActivitiesDuration, unittest.equals(42)); | |
| 4750 } | |
| 4751 buildCounterLookbackConfiguration--; | |
| 4752 } | |
| 4753 | |
| 4754 core.int buildCounterMetric = 0; | |
| 4755 buildMetric() { | |
| 4756 var o = new api.Metric(); | |
| 4757 buildCounterMetric++; | |
| 4758 if (buildCounterMetric < 3) { | |
| 4759 o.kind = "foo"; | |
| 4760 o.name = "foo"; | |
| 4761 } | |
| 4762 buildCounterMetric--; | |
| 4763 return o; | |
| 4764 } | |
| 4765 | |
| 4766 checkMetric(api.Metric o) { | |
| 4767 buildCounterMetric++; | |
| 4768 if (buildCounterMetric < 3) { | |
| 4769 unittest.expect(o.kind, unittest.equals('foo')); | |
| 4770 unittest.expect(o.name, unittest.equals('foo')); | |
| 4771 } | |
| 4772 buildCounterMetric--; | |
| 4773 } | |
| 4774 | |
| 4775 core.int buildCounterMetro = 0; | |
| 4776 buildMetro() { | |
| 4777 var o = new api.Metro(); | |
| 4778 buildCounterMetro++; | |
| 4779 if (buildCounterMetro < 3) { | |
| 4780 o.countryCode = "foo"; | |
| 4781 o.countryDartId = "foo"; | |
| 4782 o.dartId = "foo"; | |
| 4783 o.dmaId = "foo"; | |
| 4784 o.kind = "foo"; | |
| 4785 o.metroCode = "foo"; | |
| 4786 o.name = "foo"; | |
| 4787 } | |
| 4788 buildCounterMetro--; | |
| 4789 return o; | |
| 4790 } | |
| 4791 | |
| 4792 checkMetro(api.Metro o) { | |
| 4793 buildCounterMetro++; | |
| 4794 if (buildCounterMetro < 3) { | |
| 4795 unittest.expect(o.countryCode, unittest.equals('foo')); | |
| 4796 unittest.expect(o.countryDartId, unittest.equals('foo')); | |
| 4797 unittest.expect(o.dartId, unittest.equals('foo')); | |
| 4798 unittest.expect(o.dmaId, unittest.equals('foo')); | |
| 4799 unittest.expect(o.kind, unittest.equals('foo')); | |
| 4800 unittest.expect(o.metroCode, unittest.equals('foo')); | |
| 4801 unittest.expect(o.name, unittest.equals('foo')); | |
| 4802 } | |
| 4803 buildCounterMetro--; | |
| 4804 } | |
| 4805 | |
| 4806 buildUnnamed1406() { | |
| 4807 var o = new core.List<api.Metro>(); | |
| 4808 o.add(buildMetro()); | |
| 4809 o.add(buildMetro()); | |
| 4810 return o; | |
| 4811 } | |
| 4812 | |
| 4813 checkUnnamed1406(core.List<api.Metro> o) { | |
| 4814 unittest.expect(o, unittest.hasLength(2)); | |
| 4815 checkMetro(o[0]); | |
| 4816 checkMetro(o[1]); | |
| 4817 } | |
| 4818 | |
| 4819 core.int buildCounterMetrosListResponse = 0; | |
| 4820 buildMetrosListResponse() { | |
| 4821 var o = new api.MetrosListResponse(); | |
| 4822 buildCounterMetrosListResponse++; | |
| 4823 if (buildCounterMetrosListResponse < 3) { | |
| 4824 o.kind = "foo"; | |
| 4825 o.metros = buildUnnamed1406(); | |
| 4826 } | |
| 4827 buildCounterMetrosListResponse--; | |
| 4828 return o; | |
| 4829 } | |
| 4830 | |
| 4831 checkMetrosListResponse(api.MetrosListResponse o) { | |
| 4832 buildCounterMetrosListResponse++; | |
| 4833 if (buildCounterMetrosListResponse < 3) { | |
| 4834 unittest.expect(o.kind, unittest.equals('foo')); | |
| 4835 checkUnnamed1406(o.metros); | |
| 4836 } | |
| 4837 buildCounterMetrosListResponse--; | |
| 4838 } | |
| 4839 | |
| 4840 core.int buildCounterMobileCarrier = 0; | |
| 4841 buildMobileCarrier() { | |
| 4842 var o = new api.MobileCarrier(); | |
| 4843 buildCounterMobileCarrier++; | |
| 4844 if (buildCounterMobileCarrier < 3) { | |
| 4845 o.countryCode = "foo"; | |
| 4846 o.countryDartId = "foo"; | |
| 4847 o.id = "foo"; | |
| 4848 o.kind = "foo"; | |
| 4849 o.name = "foo"; | |
| 4850 } | |
| 4851 buildCounterMobileCarrier--; | |
| 4852 return o; | |
| 4853 } | |
| 4854 | |
| 4855 checkMobileCarrier(api.MobileCarrier o) { | |
| 4856 buildCounterMobileCarrier++; | |
| 4857 if (buildCounterMobileCarrier < 3) { | |
| 4858 unittest.expect(o.countryCode, unittest.equals('foo')); | |
| 4859 unittest.expect(o.countryDartId, unittest.equals('foo')); | |
| 4860 unittest.expect(o.id, unittest.equals('foo')); | |
| 4861 unittest.expect(o.kind, unittest.equals('foo')); | |
| 4862 unittest.expect(o.name, unittest.equals('foo')); | |
| 4863 } | |
| 4864 buildCounterMobileCarrier--; | |
| 4865 } | |
| 4866 | |
| 4867 buildUnnamed1407() { | |
| 4868 var o = new core.List<api.MobileCarrier>(); | |
| 4869 o.add(buildMobileCarrier()); | |
| 4870 o.add(buildMobileCarrier()); | |
| 4871 return o; | |
| 4872 } | |
| 4873 | |
| 4874 checkUnnamed1407(core.List<api.MobileCarrier> o) { | |
| 4875 unittest.expect(o, unittest.hasLength(2)); | |
| 4876 checkMobileCarrier(o[0]); | |
| 4877 checkMobileCarrier(o[1]); | |
| 4878 } | |
| 4879 | |
| 4880 core.int buildCounterMobileCarriersListResponse = 0; | |
| 4881 buildMobileCarriersListResponse() { | |
| 4882 var o = new api.MobileCarriersListResponse(); | |
| 4883 buildCounterMobileCarriersListResponse++; | |
| 4884 if (buildCounterMobileCarriersListResponse < 3) { | |
| 4885 o.kind = "foo"; | |
| 4886 o.mobileCarriers = buildUnnamed1407(); | |
| 4887 } | |
| 4888 buildCounterMobileCarriersListResponse--; | |
| 4889 return o; | |
| 4890 } | |
| 4891 | |
| 4892 checkMobileCarriersListResponse(api.MobileCarriersListResponse o) { | |
| 4893 buildCounterMobileCarriersListResponse++; | |
| 4894 if (buildCounterMobileCarriersListResponse < 3) { | |
| 4895 unittest.expect(o.kind, unittest.equals('foo')); | |
| 4896 checkUnnamed1407(o.mobileCarriers); | |
| 4897 } | |
| 4898 buildCounterMobileCarriersListResponse--; | |
| 4899 } | |
| 4900 | |
| 4901 buildUnnamed1408() { | |
| 4902 var o = new core.List<core.String>(); | |
| 4903 o.add("foo"); | |
| 4904 o.add("foo"); | |
| 4905 return o; | |
| 4906 } | |
| 4907 | |
| 4908 checkUnnamed1408(core.List<core.String> o) { | |
| 4909 unittest.expect(o, unittest.hasLength(2)); | |
| 4910 unittest.expect(o[0], unittest.equals('foo')); | |
| 4911 unittest.expect(o[1], unittest.equals('foo')); | |
| 4912 } | |
| 4913 | |
| 4914 core.int buildCounterObjectFilter = 0; | |
| 4915 buildObjectFilter() { | |
| 4916 var o = new api.ObjectFilter(); | |
| 4917 buildCounterObjectFilter++; | |
| 4918 if (buildCounterObjectFilter < 3) { | |
| 4919 o.kind = "foo"; | |
| 4920 o.objectIds = buildUnnamed1408(); | |
| 4921 o.status = "foo"; | |
| 4922 } | |
| 4923 buildCounterObjectFilter--; | |
| 4924 return o; | |
| 4925 } | |
| 4926 | |
| 4927 checkObjectFilter(api.ObjectFilter o) { | |
| 4928 buildCounterObjectFilter++; | |
| 4929 if (buildCounterObjectFilter < 3) { | |
| 4930 unittest.expect(o.kind, unittest.equals('foo')); | |
| 4931 checkUnnamed1408(o.objectIds); | |
| 4932 unittest.expect(o.status, unittest.equals('foo')); | |
| 4933 } | |
| 4934 buildCounterObjectFilter--; | |
| 4935 } | |
| 4936 | |
| 4937 core.int buildCounterOffsetPosition = 0; | |
| 4938 buildOffsetPosition() { | |
| 4939 var o = new api.OffsetPosition(); | |
| 4940 buildCounterOffsetPosition++; | |
| 4941 if (buildCounterOffsetPosition < 3) { | |
| 4942 o.left = 42; | |
| 4943 o.top = 42; | |
| 4944 } | |
| 4945 buildCounterOffsetPosition--; | |
| 4946 return o; | |
| 4947 } | |
| 4948 | |
| 4949 checkOffsetPosition(api.OffsetPosition o) { | |
| 4950 buildCounterOffsetPosition++; | |
| 4951 if (buildCounterOffsetPosition < 3) { | |
| 4952 unittest.expect(o.left, unittest.equals(42)); | |
| 4953 unittest.expect(o.top, unittest.equals(42)); | |
| 4954 } | |
| 4955 buildCounterOffsetPosition--; | |
| 4956 } | |
| 4957 | |
| 4958 core.int buildCounterOmnitureSettings = 0; | |
| 4959 buildOmnitureSettings() { | |
| 4960 var o = new api.OmnitureSettings(); | |
| 4961 buildCounterOmnitureSettings++; | |
| 4962 if (buildCounterOmnitureSettings < 3) { | |
| 4963 o.omnitureCostDataEnabled = true; | |
| 4964 o.omnitureIntegrationEnabled = true; | |
| 4965 } | |
| 4966 buildCounterOmnitureSettings--; | |
| 4967 return o; | |
| 4968 } | |
| 4969 | |
| 4970 checkOmnitureSettings(api.OmnitureSettings o) { | |
| 4971 buildCounterOmnitureSettings++; | |
| 4972 if (buildCounterOmnitureSettings < 3) { | |
| 4973 unittest.expect(o.omnitureCostDataEnabled, unittest.isTrue); | |
| 4974 unittest.expect(o.omnitureIntegrationEnabled, unittest.isTrue); | |
| 4975 } | |
| 4976 buildCounterOmnitureSettings--; | |
| 4977 } | |
| 4978 | |
| 4979 core.int buildCounterOperatingSystem = 0; | |
| 4980 buildOperatingSystem() { | |
| 4981 var o = new api.OperatingSystem(); | |
| 4982 buildCounterOperatingSystem++; | |
| 4983 if (buildCounterOperatingSystem < 3) { | |
| 4984 o.dartId = "foo"; | |
| 4985 o.desktop = true; | |
| 4986 o.kind = "foo"; | |
| 4987 o.mobile = true; | |
| 4988 o.name = "foo"; | |
| 4989 } | |
| 4990 buildCounterOperatingSystem--; | |
| 4991 return o; | |
| 4992 } | |
| 4993 | |
| 4994 checkOperatingSystem(api.OperatingSystem o) { | |
| 4995 buildCounterOperatingSystem++; | |
| 4996 if (buildCounterOperatingSystem < 3) { | |
| 4997 unittest.expect(o.dartId, unittest.equals('foo')); | |
| 4998 unittest.expect(o.desktop, unittest.isTrue); | |
| 4999 unittest.expect(o.kind, unittest.equals('foo')); | |
| 5000 unittest.expect(o.mobile, unittest.isTrue); | |
| 5001 unittest.expect(o.name, unittest.equals('foo')); | |
| 5002 } | |
| 5003 buildCounterOperatingSystem--; | |
| 5004 } | |
| 5005 | |
| 5006 core.int buildCounterOperatingSystemVersion = 0; | |
| 5007 buildOperatingSystemVersion() { | |
| 5008 var o = new api.OperatingSystemVersion(); | |
| 5009 buildCounterOperatingSystemVersion++; | |
| 5010 if (buildCounterOperatingSystemVersion < 3) { | |
| 5011 o.id = "foo"; | |
| 5012 o.kind = "foo"; | |
| 5013 o.majorVersion = "foo"; | |
| 5014 o.minorVersion = "foo"; | |
| 5015 o.name = "foo"; | |
| 5016 o.operatingSystem = buildOperatingSystem(); | |
| 5017 } | |
| 5018 buildCounterOperatingSystemVersion--; | |
| 5019 return o; | |
| 5020 } | |
| 5021 | |
| 5022 checkOperatingSystemVersion(api.OperatingSystemVersion o) { | |
| 5023 buildCounterOperatingSystemVersion++; | |
| 5024 if (buildCounterOperatingSystemVersion < 3) { | |
| 5025 unittest.expect(o.id, unittest.equals('foo')); | |
| 5026 unittest.expect(o.kind, unittest.equals('foo')); | |
| 5027 unittest.expect(o.majorVersion, unittest.equals('foo')); | |
| 5028 unittest.expect(o.minorVersion, unittest.equals('foo')); | |
| 5029 unittest.expect(o.name, unittest.equals('foo')); | |
| 5030 checkOperatingSystem(o.operatingSystem); | |
| 5031 } | |
| 5032 buildCounterOperatingSystemVersion--; | |
| 5033 } | |
| 5034 | |
| 5035 buildUnnamed1409() { | |
| 5036 var o = new core.List<api.OperatingSystemVersion>(); | |
| 5037 o.add(buildOperatingSystemVersion()); | |
| 5038 o.add(buildOperatingSystemVersion()); | |
| 5039 return o; | |
| 5040 } | |
| 5041 | |
| 5042 checkUnnamed1409(core.List<api.OperatingSystemVersion> o) { | |
| 5043 unittest.expect(o, unittest.hasLength(2)); | |
| 5044 checkOperatingSystemVersion(o[0]); | |
| 5045 checkOperatingSystemVersion(o[1]); | |
| 5046 } | |
| 5047 | |
| 5048 core.int buildCounterOperatingSystemVersionsListResponse = 0; | |
| 5049 buildOperatingSystemVersionsListResponse() { | |
| 5050 var o = new api.OperatingSystemVersionsListResponse(); | |
| 5051 buildCounterOperatingSystemVersionsListResponse++; | |
| 5052 if (buildCounterOperatingSystemVersionsListResponse < 3) { | |
| 5053 o.kind = "foo"; | |
| 5054 o.operatingSystemVersions = buildUnnamed1409(); | |
| 5055 } | |
| 5056 buildCounterOperatingSystemVersionsListResponse--; | |
| 5057 return o; | |
| 5058 } | |
| 5059 | |
| 5060 checkOperatingSystemVersionsListResponse(api.OperatingSystemVersionsListResponse
o) { | |
| 5061 buildCounterOperatingSystemVersionsListResponse++; | |
| 5062 if (buildCounterOperatingSystemVersionsListResponse < 3) { | |
| 5063 unittest.expect(o.kind, unittest.equals('foo')); | |
| 5064 checkUnnamed1409(o.operatingSystemVersions); | |
| 5065 } | |
| 5066 buildCounterOperatingSystemVersionsListResponse--; | |
| 5067 } | |
| 5068 | |
| 5069 buildUnnamed1410() { | |
| 5070 var o = new core.List<api.OperatingSystem>(); | |
| 5071 o.add(buildOperatingSystem()); | |
| 5072 o.add(buildOperatingSystem()); | |
| 5073 return o; | |
| 5074 } | |
| 5075 | |
| 5076 checkUnnamed1410(core.List<api.OperatingSystem> o) { | |
| 5077 unittest.expect(o, unittest.hasLength(2)); | |
| 5078 checkOperatingSystem(o[0]); | |
| 5079 checkOperatingSystem(o[1]); | |
| 5080 } | |
| 5081 | |
| 5082 core.int buildCounterOperatingSystemsListResponse = 0; | |
| 5083 buildOperatingSystemsListResponse() { | |
| 5084 var o = new api.OperatingSystemsListResponse(); | |
| 5085 buildCounterOperatingSystemsListResponse++; | |
| 5086 if (buildCounterOperatingSystemsListResponse < 3) { | |
| 5087 o.kind = "foo"; | |
| 5088 o.operatingSystems = buildUnnamed1410(); | |
| 5089 } | |
| 5090 buildCounterOperatingSystemsListResponse--; | |
| 5091 return o; | |
| 5092 } | |
| 5093 | |
| 5094 checkOperatingSystemsListResponse(api.OperatingSystemsListResponse o) { | |
| 5095 buildCounterOperatingSystemsListResponse++; | |
| 5096 if (buildCounterOperatingSystemsListResponse < 3) { | |
| 5097 unittest.expect(o.kind, unittest.equals('foo')); | |
| 5098 checkUnnamed1410(o.operatingSystems); | |
| 5099 } | |
| 5100 buildCounterOperatingSystemsListResponse--; | |
| 5101 } | |
| 5102 | |
| 5103 core.int buildCounterOptimizationActivity = 0; | |
| 5104 buildOptimizationActivity() { | |
| 5105 var o = new api.OptimizationActivity(); | |
| 5106 buildCounterOptimizationActivity++; | |
| 5107 if (buildCounterOptimizationActivity < 3) { | |
| 5108 o.floodlightActivityId = "foo"; | |
| 5109 o.floodlightActivityIdDimensionValue = buildDimensionValue(); | |
| 5110 o.weight = 42; | |
| 5111 } | |
| 5112 buildCounterOptimizationActivity--; | |
| 5113 return o; | |
| 5114 } | |
| 5115 | |
| 5116 checkOptimizationActivity(api.OptimizationActivity o) { | |
| 5117 buildCounterOptimizationActivity++; | |
| 5118 if (buildCounterOptimizationActivity < 3) { | |
| 5119 unittest.expect(o.floodlightActivityId, unittest.equals('foo')); | |
| 5120 checkDimensionValue(o.floodlightActivityIdDimensionValue); | |
| 5121 unittest.expect(o.weight, unittest.equals(42)); | |
| 5122 } | |
| 5123 buildCounterOptimizationActivity--; | |
| 5124 } | |
| 5125 | |
| 5126 buildUnnamed1411() { | |
| 5127 var o = new core.List<core.String>(); | |
| 5128 o.add("foo"); | |
| 5129 o.add("foo"); | |
| 5130 return o; | |
| 5131 } | |
| 5132 | |
| 5133 checkUnnamed1411(core.List<core.String> o) { | |
| 5134 unittest.expect(o, unittest.hasLength(2)); | |
| 5135 unittest.expect(o[0], unittest.equals('foo')); | |
| 5136 unittest.expect(o[1], unittest.equals('foo')); | |
| 5137 } | |
| 5138 | |
| 5139 buildUnnamed1412() { | |
| 5140 var o = new core.List<api.OrderContact>(); | |
| 5141 o.add(buildOrderContact()); | |
| 5142 o.add(buildOrderContact()); | |
| 5143 return o; | |
| 5144 } | |
| 5145 | |
| 5146 checkUnnamed1412(core.List<api.OrderContact> o) { | |
| 5147 unittest.expect(o, unittest.hasLength(2)); | |
| 5148 checkOrderContact(o[0]); | |
| 5149 checkOrderContact(o[1]); | |
| 5150 } | |
| 5151 | |
| 5152 buildUnnamed1413() { | |
| 5153 var o = new core.List<core.String>(); | |
| 5154 o.add("foo"); | |
| 5155 o.add("foo"); | |
| 5156 return o; | |
| 5157 } | |
| 5158 | |
| 5159 checkUnnamed1413(core.List<core.String> o) { | |
| 5160 unittest.expect(o, unittest.hasLength(2)); | |
| 5161 unittest.expect(o[0], unittest.equals('foo')); | |
| 5162 unittest.expect(o[1], unittest.equals('foo')); | |
| 5163 } | |
| 5164 | |
| 5165 buildUnnamed1414() { | |
| 5166 var o = new core.List<core.String>(); | |
| 5167 o.add("foo"); | |
| 5168 o.add("foo"); | |
| 5169 return o; | |
| 5170 } | |
| 5171 | |
| 5172 checkUnnamed1414(core.List<core.String> o) { | |
| 5173 unittest.expect(o, unittest.hasLength(2)); | |
| 5174 unittest.expect(o[0], unittest.equals('foo')); | |
| 5175 unittest.expect(o[1], unittest.equals('foo')); | |
| 5176 } | |
| 5177 | |
| 5178 core.int buildCounterOrder = 0; | |
| 5179 buildOrder() { | |
| 5180 var o = new api.Order(); | |
| 5181 buildCounterOrder++; | |
| 5182 if (buildCounterOrder < 3) { | |
| 5183 o.accountId = "foo"; | |
| 5184 o.advertiserId = "foo"; | |
| 5185 o.approverUserProfileIds = buildUnnamed1411(); | |
| 5186 o.buyerInvoiceId = "foo"; | |
| 5187 o.buyerOrganizationName = "foo"; | |
| 5188 o.comments = "foo"; | |
| 5189 o.contacts = buildUnnamed1412(); | |
| 5190 o.id = "foo"; | |
| 5191 o.kind = "foo"; | |
| 5192 o.lastModifiedInfo = buildLastModifiedInfo(); | |
| 5193 o.name = "foo"; | |
| 5194 o.notes = "foo"; | |
| 5195 o.planningTermId = "foo"; | |
| 5196 o.projectId = "foo"; | |
| 5197 o.sellerOrderId = "foo"; | |
| 5198 o.sellerOrganizationName = "foo"; | |
| 5199 o.siteId = buildUnnamed1413(); | |
| 5200 o.siteNames = buildUnnamed1414(); | |
| 5201 o.subaccountId = "foo"; | |
| 5202 o.termsAndConditions = "foo"; | |
| 5203 } | |
| 5204 buildCounterOrder--; | |
| 5205 return o; | |
| 5206 } | |
| 5207 | |
| 5208 checkOrder(api.Order o) { | |
| 5209 buildCounterOrder++; | |
| 5210 if (buildCounterOrder < 3) { | |
| 5211 unittest.expect(o.accountId, unittest.equals('foo')); | |
| 5212 unittest.expect(o.advertiserId, unittest.equals('foo')); | |
| 5213 checkUnnamed1411(o.approverUserProfileIds); | |
| 5214 unittest.expect(o.buyerInvoiceId, unittest.equals('foo')); | |
| 5215 unittest.expect(o.buyerOrganizationName, unittest.equals('foo')); | |
| 5216 unittest.expect(o.comments, unittest.equals('foo')); | |
| 5217 checkUnnamed1412(o.contacts); | |
| 5218 unittest.expect(o.id, unittest.equals('foo')); | |
| 5219 unittest.expect(o.kind, unittest.equals('foo')); | |
| 5220 checkLastModifiedInfo(o.lastModifiedInfo); | |
| 5221 unittest.expect(o.name, unittest.equals('foo')); | |
| 5222 unittest.expect(o.notes, unittest.equals('foo')); | |
| 5223 unittest.expect(o.planningTermId, unittest.equals('foo')); | |
| 5224 unittest.expect(o.projectId, unittest.equals('foo')); | |
| 5225 unittest.expect(o.sellerOrderId, unittest.equals('foo')); | |
| 5226 unittest.expect(o.sellerOrganizationName, unittest.equals('foo')); | |
| 5227 checkUnnamed1413(o.siteId); | |
| 5228 checkUnnamed1414(o.siteNames); | |
| 5229 unittest.expect(o.subaccountId, unittest.equals('foo')); | |
| 5230 unittest.expect(o.termsAndConditions, unittest.equals('foo')); | |
| 5231 } | |
| 5232 buildCounterOrder--; | |
| 5233 } | |
| 5234 | |
| 5235 core.int buildCounterOrderContact = 0; | |
| 5236 buildOrderContact() { | |
| 5237 var o = new api.OrderContact(); | |
| 5238 buildCounterOrderContact++; | |
| 5239 if (buildCounterOrderContact < 3) { | |
| 5240 o.contactInfo = "foo"; | |
| 5241 o.contactName = "foo"; | |
| 5242 o.contactTitle = "foo"; | |
| 5243 o.contactType = "foo"; | |
| 5244 o.signatureUserProfileId = "foo"; | |
| 5245 } | |
| 5246 buildCounterOrderContact--; | |
| 5247 return o; | |
| 5248 } | |
| 5249 | |
| 5250 checkOrderContact(api.OrderContact o) { | |
| 5251 buildCounterOrderContact++; | |
| 5252 if (buildCounterOrderContact < 3) { | |
| 5253 unittest.expect(o.contactInfo, unittest.equals('foo')); | |
| 5254 unittest.expect(o.contactName, unittest.equals('foo')); | |
| 5255 unittest.expect(o.contactTitle, unittest.equals('foo')); | |
| 5256 unittest.expect(o.contactType, unittest.equals('foo')); | |
| 5257 unittest.expect(o.signatureUserProfileId, unittest.equals('foo')); | |
| 5258 } | |
| 5259 buildCounterOrderContact--; | |
| 5260 } | |
| 5261 | |
| 5262 buildUnnamed1415() { | |
| 5263 var o = new core.List<core.String>(); | |
| 5264 o.add("foo"); | |
| 5265 o.add("foo"); | |
| 5266 return o; | |
| 5267 } | |
| 5268 | |
| 5269 checkUnnamed1415(core.List<core.String> o) { | |
| 5270 unittest.expect(o, unittest.hasLength(2)); | |
| 5271 unittest.expect(o[0], unittest.equals('foo')); | |
| 5272 unittest.expect(o[1], unittest.equals('foo')); | |
| 5273 } | |
| 5274 | |
| 5275 buildUnnamed1416() { | |
| 5276 var o = new core.List<core.String>(); | |
| 5277 o.add("foo"); | |
| 5278 o.add("foo"); | |
| 5279 return o; | |
| 5280 } | |
| 5281 | |
| 5282 checkUnnamed1416(core.List<core.String> o) { | |
| 5283 unittest.expect(o, unittest.hasLength(2)); | |
| 5284 unittest.expect(o[0], unittest.equals('foo')); | |
| 5285 unittest.expect(o[1], unittest.equals('foo')); | |
| 5286 } | |
| 5287 | |
| 5288 core.int buildCounterOrderDocument = 0; | |
| 5289 buildOrderDocument() { | |
| 5290 var o = new api.OrderDocument(); | |
| 5291 buildCounterOrderDocument++; | |
| 5292 if (buildCounterOrderDocument < 3) { | |
| 5293 o.accountId = "foo"; | |
| 5294 o.advertiserId = "foo"; | |
| 5295 o.amendedOrderDocumentId = "foo"; | |
| 5296 o.approvedByUserProfileIds = buildUnnamed1415(); | |
| 5297 o.cancelled = true; | |
| 5298 o.createdInfo = buildLastModifiedInfo(); | |
| 5299 o.effectiveDate = core.DateTime.parse("2002-02-27T14:01:02Z"); | |
| 5300 o.id = "foo"; | |
| 5301 o.kind = "foo"; | |
| 5302 o.lastSentRecipients = buildUnnamed1416(); | |
| 5303 o.lastSentTime = core.DateTime.parse("2002-02-27T14:01:02"); | |
| 5304 o.orderId = "foo"; | |
| 5305 o.projectId = "foo"; | |
| 5306 o.signed = true; | |
| 5307 o.subaccountId = "foo"; | |
| 5308 o.title = "foo"; | |
| 5309 o.type = "foo"; | |
| 5310 } | |
| 5311 buildCounterOrderDocument--; | |
| 5312 return o; | |
| 5313 } | |
| 5314 | |
| 5315 checkOrderDocument(api.OrderDocument o) { | |
| 5316 buildCounterOrderDocument++; | |
| 5317 if (buildCounterOrderDocument < 3) { | |
| 5318 unittest.expect(o.accountId, unittest.equals('foo')); | |
| 5319 unittest.expect(o.advertiserId, unittest.equals('foo')); | |
| 5320 unittest.expect(o.amendedOrderDocumentId, unittest.equals('foo')); | |
| 5321 checkUnnamed1415(o.approvedByUserProfileIds); | |
| 5322 unittest.expect(o.cancelled, unittest.isTrue); | |
| 5323 checkLastModifiedInfo(o.createdInfo); | |
| 5324 unittest.expect(o.effectiveDate, unittest.equals(core.DateTime.parse("2002-0
2-27T00:00:00"))); | |
| 5325 unittest.expect(o.id, unittest.equals('foo')); | |
| 5326 unittest.expect(o.kind, unittest.equals('foo')); | |
| 5327 checkUnnamed1416(o.lastSentRecipients); | |
| 5328 unittest.expect(o.lastSentTime, unittest.equals(core.DateTime.parse("2002-02
-27T14:01:02"))); | |
| 5329 unittest.expect(o.orderId, unittest.equals('foo')); | |
| 5330 unittest.expect(o.projectId, unittest.equals('foo')); | |
| 5331 unittest.expect(o.signed, unittest.isTrue); | |
| 5332 unittest.expect(o.subaccountId, unittest.equals('foo')); | |
| 5333 unittest.expect(o.title, unittest.equals('foo')); | |
| 5334 unittest.expect(o.type, unittest.equals('foo')); | |
| 5335 } | |
| 5336 buildCounterOrderDocument--; | |
| 5337 } | |
| 5338 | |
| 5339 buildUnnamed1417() { | |
| 5340 var o = new core.List<api.OrderDocument>(); | |
| 5341 o.add(buildOrderDocument()); | |
| 5342 o.add(buildOrderDocument()); | |
| 5343 return o; | |
| 5344 } | |
| 5345 | |
| 5346 checkUnnamed1417(core.List<api.OrderDocument> o) { | |
| 5347 unittest.expect(o, unittest.hasLength(2)); | |
| 5348 checkOrderDocument(o[0]); | |
| 5349 checkOrderDocument(o[1]); | |
| 5350 } | |
| 5351 | |
| 5352 core.int buildCounterOrderDocumentsListResponse = 0; | |
| 5353 buildOrderDocumentsListResponse() { | |
| 5354 var o = new api.OrderDocumentsListResponse(); | |
| 5355 buildCounterOrderDocumentsListResponse++; | |
| 5356 if (buildCounterOrderDocumentsListResponse < 3) { | |
| 5357 o.kind = "foo"; | |
| 5358 o.nextPageToken = "foo"; | |
| 5359 o.orderDocuments = buildUnnamed1417(); | |
| 5360 } | |
| 5361 buildCounterOrderDocumentsListResponse--; | |
| 5362 return o; | |
| 5363 } | |
| 5364 | |
| 5365 checkOrderDocumentsListResponse(api.OrderDocumentsListResponse o) { | |
| 5366 buildCounterOrderDocumentsListResponse++; | |
| 5367 if (buildCounterOrderDocumentsListResponse < 3) { | |
| 5368 unittest.expect(o.kind, unittest.equals('foo')); | |
| 5369 unittest.expect(o.nextPageToken, unittest.equals('foo')); | |
| 5370 checkUnnamed1417(o.orderDocuments); | |
| 5371 } | |
| 5372 buildCounterOrderDocumentsListResponse--; | |
| 5373 } | |
| 5374 | |
| 5375 buildUnnamed1418() { | |
| 5376 var o = new core.List<api.Order>(); | |
| 5377 o.add(buildOrder()); | |
| 5378 o.add(buildOrder()); | |
| 5379 return o; | |
| 5380 } | |
| 5381 | |
| 5382 checkUnnamed1418(core.List<api.Order> o) { | |
| 5383 unittest.expect(o, unittest.hasLength(2)); | |
| 5384 checkOrder(o[0]); | |
| 5385 checkOrder(o[1]); | |
| 5386 } | |
| 5387 | |
| 5388 core.int buildCounterOrdersListResponse = 0; | |
| 5389 buildOrdersListResponse() { | |
| 5390 var o = new api.OrdersListResponse(); | |
| 5391 buildCounterOrdersListResponse++; | |
| 5392 if (buildCounterOrdersListResponse < 3) { | |
| 5393 o.kind = "foo"; | |
| 5394 o.nextPageToken = "foo"; | |
| 5395 o.orders = buildUnnamed1418(); | |
| 5396 } | |
| 5397 buildCounterOrdersListResponse--; | |
| 5398 return o; | |
| 5399 } | |
| 5400 | |
| 5401 checkOrdersListResponse(api.OrdersListResponse o) { | |
| 5402 buildCounterOrdersListResponse++; | |
| 5403 if (buildCounterOrdersListResponse < 3) { | |
| 5404 unittest.expect(o.kind, unittest.equals('foo')); | |
| 5405 unittest.expect(o.nextPageToken, unittest.equals('foo')); | |
| 5406 checkUnnamed1418(o.orders); | |
| 5407 } | |
| 5408 buildCounterOrdersListResponse--; | |
| 5409 } | |
| 5410 | |
| 5411 buildUnnamed1419() { | |
| 5412 var o = new core.List<api.Dimension>(); | |
| 5413 o.add(buildDimension()); | |
| 5414 o.add(buildDimension()); | |
| 5415 return o; | |
| 5416 } | |
| 5417 | |
| 5418 checkUnnamed1419(core.List<api.Dimension> o) { | |
| 5419 unittest.expect(o, unittest.hasLength(2)); | |
| 5420 checkDimension(o[0]); | |
| 5421 checkDimension(o[1]); | |
| 5422 } | |
| 5423 | |
| 5424 buildUnnamed1420() { | |
| 5425 var o = new core.List<api.Dimension>(); | |
| 5426 o.add(buildDimension()); | |
| 5427 o.add(buildDimension()); | |
| 5428 return o; | |
| 5429 } | |
| 5430 | |
| 5431 checkUnnamed1420(core.List<api.Dimension> o) { | |
| 5432 unittest.expect(o, unittest.hasLength(2)); | |
| 5433 checkDimension(o[0]); | |
| 5434 checkDimension(o[1]); | |
| 5435 } | |
| 5436 | |
| 5437 buildUnnamed1421() { | |
| 5438 var o = new core.List<api.Metric>(); | |
| 5439 o.add(buildMetric()); | |
| 5440 o.add(buildMetric()); | |
| 5441 return o; | |
| 5442 } | |
| 5443 | |
| 5444 checkUnnamed1421(core.List<api.Metric> o) { | |
| 5445 unittest.expect(o, unittest.hasLength(2)); | |
| 5446 checkMetric(o[0]); | |
| 5447 checkMetric(o[1]); | |
| 5448 } | |
| 5449 | |
| 5450 buildUnnamed1422() { | |
| 5451 var o = new core.List<api.Dimension>(); | |
| 5452 o.add(buildDimension()); | |
| 5453 o.add(buildDimension()); | |
| 5454 return o; | |
| 5455 } | |
| 5456 | |
| 5457 checkUnnamed1422(core.List<api.Dimension> o) { | |
| 5458 unittest.expect(o, unittest.hasLength(2)); | |
| 5459 checkDimension(o[0]); | |
| 5460 checkDimension(o[1]); | |
| 5461 } | |
| 5462 | |
| 5463 core.int buildCounterPathToConversionReportCompatibleFields = 0; | |
| 5464 buildPathToConversionReportCompatibleFields() { | |
| 5465 var o = new api.PathToConversionReportCompatibleFields(); | |
| 5466 buildCounterPathToConversionReportCompatibleFields++; | |
| 5467 if (buildCounterPathToConversionReportCompatibleFields < 3) { | |
| 5468 o.conversionDimensions = buildUnnamed1419(); | |
| 5469 o.customFloodlightVariables = buildUnnamed1420(); | |
| 5470 o.kind = "foo"; | |
| 5471 o.metrics = buildUnnamed1421(); | |
| 5472 o.perInteractionDimensions = buildUnnamed1422(); | |
| 5473 } | |
| 5474 buildCounterPathToConversionReportCompatibleFields--; | |
| 5475 return o; | |
| 5476 } | |
| 5477 | |
| 5478 checkPathToConversionReportCompatibleFields(api.PathToConversionReportCompatible
Fields o) { | |
| 5479 buildCounterPathToConversionReportCompatibleFields++; | |
| 5480 if (buildCounterPathToConversionReportCompatibleFields < 3) { | |
| 5481 checkUnnamed1419(o.conversionDimensions); | |
| 5482 checkUnnamed1420(o.customFloodlightVariables); | |
| 5483 unittest.expect(o.kind, unittest.equals('foo')); | |
| 5484 checkUnnamed1421(o.metrics); | |
| 5485 checkUnnamed1422(o.perInteractionDimensions); | |
| 5486 } | |
| 5487 buildCounterPathToConversionReportCompatibleFields--; | |
| 5488 } | |
| 5489 | |
| 5490 buildUnnamed1423() { | |
| 5491 var o = new core.List<core.String>(); | |
| 5492 o.add("foo"); | |
| 5493 o.add("foo"); | |
| 5494 return o; | |
| 5495 } | |
| 5496 | |
| 5497 checkUnnamed1423(core.List<core.String> o) { | |
| 5498 unittest.expect(o, unittest.hasLength(2)); | |
| 5499 unittest.expect(o[0], unittest.equals('foo')); | |
| 5500 unittest.expect(o[1], unittest.equals('foo')); | |
| 5501 } | |
| 5502 | |
| 5503 core.int buildCounterPlacement = 0; | |
| 5504 buildPlacement() { | |
| 5505 var o = new api.Placement(); | |
| 5506 buildCounterPlacement++; | |
| 5507 if (buildCounterPlacement < 3) { | |
| 5508 o.accountId = "foo"; | |
| 5509 o.advertiserId = "foo"; | |
| 5510 o.advertiserIdDimensionValue = buildDimensionValue(); | |
| 5511 o.archived = true; | |
| 5512 o.campaignId = "foo"; | |
| 5513 o.campaignIdDimensionValue = buildDimensionValue(); | |
| 5514 o.comment = "foo"; | |
| 5515 o.compatibility = "foo"; | |
| 5516 o.contentCategoryId = "foo"; | |
| 5517 o.createInfo = buildLastModifiedInfo(); | |
| 5518 o.directorySiteId = "foo"; | |
| 5519 o.directorySiteIdDimensionValue = buildDimensionValue(); | |
| 5520 o.externalId = "foo"; | |
| 5521 o.id = "foo"; | |
| 5522 o.idDimensionValue = buildDimensionValue(); | |
| 5523 o.keyName = "foo"; | |
| 5524 o.kind = "foo"; | |
| 5525 o.lastModifiedInfo = buildLastModifiedInfo(); | |
| 5526 o.lookbackConfiguration = buildLookbackConfiguration(); | |
| 5527 o.name = "foo"; | |
| 5528 o.paymentApproved = true; | |
| 5529 o.paymentSource = "foo"; | |
| 5530 o.placementGroupId = "foo"; | |
| 5531 o.placementGroupIdDimensionValue = buildDimensionValue(); | |
| 5532 o.placementStrategyId = "foo"; | |
| 5533 o.pricingSchedule = buildPricingSchedule(); | |
| 5534 o.primary = true; | |
| 5535 o.publisherUpdateInfo = buildLastModifiedInfo(); | |
| 5536 o.siteId = "foo"; | |
| 5537 o.siteIdDimensionValue = buildDimensionValue(); | |
| 5538 o.size = buildSize(); | |
| 5539 o.sslRequired = true; | |
| 5540 o.status = "foo"; | |
| 5541 o.subaccountId = "foo"; | |
| 5542 o.tagFormats = buildUnnamed1423(); | |
| 5543 o.tagSetting = buildTagSetting(); | |
| 5544 } | |
| 5545 buildCounterPlacement--; | |
| 5546 return o; | |
| 5547 } | |
| 5548 | |
| 5549 checkPlacement(api.Placement o) { | |
| 5550 buildCounterPlacement++; | |
| 5551 if (buildCounterPlacement < 3) { | |
| 5552 unittest.expect(o.accountId, unittest.equals('foo')); | |
| 5553 unittest.expect(o.advertiserId, unittest.equals('foo')); | |
| 5554 checkDimensionValue(o.advertiserIdDimensionValue); | |
| 5555 unittest.expect(o.archived, unittest.isTrue); | |
| 5556 unittest.expect(o.campaignId, unittest.equals('foo')); | |
| 5557 checkDimensionValue(o.campaignIdDimensionValue); | |
| 5558 unittest.expect(o.comment, unittest.equals('foo')); | |
| 5559 unittest.expect(o.compatibility, unittest.equals('foo')); | |
| 5560 unittest.expect(o.contentCategoryId, unittest.equals('foo')); | |
| 5561 checkLastModifiedInfo(o.createInfo); | |
| 5562 unittest.expect(o.directorySiteId, unittest.equals('foo')); | |
| 5563 checkDimensionValue(o.directorySiteIdDimensionValue); | |
| 5564 unittest.expect(o.externalId, unittest.equals('foo')); | |
| 5565 unittest.expect(o.id, unittest.equals('foo')); | |
| 5566 checkDimensionValue(o.idDimensionValue); | |
| 5567 unittest.expect(o.keyName, unittest.equals('foo')); | |
| 5568 unittest.expect(o.kind, unittest.equals('foo')); | |
| 5569 checkLastModifiedInfo(o.lastModifiedInfo); | |
| 5570 checkLookbackConfiguration(o.lookbackConfiguration); | |
| 5571 unittest.expect(o.name, unittest.equals('foo')); | |
| 5572 unittest.expect(o.paymentApproved, unittest.isTrue); | |
| 5573 unittest.expect(o.paymentSource, unittest.equals('foo')); | |
| 5574 unittest.expect(o.placementGroupId, unittest.equals('foo')); | |
| 5575 checkDimensionValue(o.placementGroupIdDimensionValue); | |
| 5576 unittest.expect(o.placementStrategyId, unittest.equals('foo')); | |
| 5577 checkPricingSchedule(o.pricingSchedule); | |
| 5578 unittest.expect(o.primary, unittest.isTrue); | |
| 5579 checkLastModifiedInfo(o.publisherUpdateInfo); | |
| 5580 unittest.expect(o.siteId, unittest.equals('foo')); | |
| 5581 checkDimensionValue(o.siteIdDimensionValue); | |
| 5582 checkSize(o.size); | |
| 5583 unittest.expect(o.sslRequired, unittest.isTrue); | |
| 5584 unittest.expect(o.status, unittest.equals('foo')); | |
| 5585 unittest.expect(o.subaccountId, unittest.equals('foo')); | |
| 5586 checkUnnamed1423(o.tagFormats); | |
| 5587 checkTagSetting(o.tagSetting); | |
| 5588 } | |
| 5589 buildCounterPlacement--; | |
| 5590 } | |
| 5591 | |
| 5592 core.int buildCounterPlacementAssignment = 0; | |
| 5593 buildPlacementAssignment() { | |
| 5594 var o = new api.PlacementAssignment(); | |
| 5595 buildCounterPlacementAssignment++; | |
| 5596 if (buildCounterPlacementAssignment < 3) { | |
| 5597 o.active = true; | |
| 5598 o.placementId = "foo"; | |
| 5599 o.placementIdDimensionValue = buildDimensionValue(); | |
| 5600 o.sslRequired = true; | |
| 5601 } | |
| 5602 buildCounterPlacementAssignment--; | |
| 5603 return o; | |
| 5604 } | |
| 5605 | |
| 5606 checkPlacementAssignment(api.PlacementAssignment o) { | |
| 5607 buildCounterPlacementAssignment++; | |
| 5608 if (buildCounterPlacementAssignment < 3) { | |
| 5609 unittest.expect(o.active, unittest.isTrue); | |
| 5610 unittest.expect(o.placementId, unittest.equals('foo')); | |
| 5611 checkDimensionValue(o.placementIdDimensionValue); | |
| 5612 unittest.expect(o.sslRequired, unittest.isTrue); | |
| 5613 } | |
| 5614 buildCounterPlacementAssignment--; | |
| 5615 } | |
| 5616 | |
| 5617 buildUnnamed1424() { | |
| 5618 var o = new core.List<core.String>(); | |
| 5619 o.add("foo"); | |
| 5620 o.add("foo"); | |
| 5621 return o; | |
| 5622 } | |
| 5623 | |
| 5624 checkUnnamed1424(core.List<core.String> o) { | |
| 5625 unittest.expect(o, unittest.hasLength(2)); | |
| 5626 unittest.expect(o[0], unittest.equals('foo')); | |
| 5627 unittest.expect(o[1], unittest.equals('foo')); | |
| 5628 } | |
| 5629 | |
| 5630 core.int buildCounterPlacementGroup = 0; | |
| 5631 buildPlacementGroup() { | |
| 5632 var o = new api.PlacementGroup(); | |
| 5633 buildCounterPlacementGroup++; | |
| 5634 if (buildCounterPlacementGroup < 3) { | |
| 5635 o.accountId = "foo"; | |
| 5636 o.advertiserId = "foo"; | |
| 5637 o.advertiserIdDimensionValue = buildDimensionValue(); | |
| 5638 o.archived = true; | |
| 5639 o.campaignId = "foo"; | |
| 5640 o.campaignIdDimensionValue = buildDimensionValue(); | |
| 5641 o.childPlacementIds = buildUnnamed1424(); | |
| 5642 o.comment = "foo"; | |
| 5643 o.contentCategoryId = "foo"; | |
| 5644 o.createInfo = buildLastModifiedInfo(); | |
| 5645 o.directorySiteId = "foo"; | |
| 5646 o.directorySiteIdDimensionValue = buildDimensionValue(); | |
| 5647 o.externalId = "foo"; | |
| 5648 o.id = "foo"; | |
| 5649 o.idDimensionValue = buildDimensionValue(); | |
| 5650 o.kind = "foo"; | |
| 5651 o.lastModifiedInfo = buildLastModifiedInfo(); | |
| 5652 o.name = "foo"; | |
| 5653 o.placementGroupType = "foo"; | |
| 5654 o.placementStrategyId = "foo"; | |
| 5655 o.pricingSchedule = buildPricingSchedule(); | |
| 5656 o.primaryPlacementId = "foo"; | |
| 5657 o.primaryPlacementIdDimensionValue = buildDimensionValue(); | |
| 5658 o.siteId = "foo"; | |
| 5659 o.siteIdDimensionValue = buildDimensionValue(); | |
| 5660 o.subaccountId = "foo"; | |
| 5661 } | |
| 5662 buildCounterPlacementGroup--; | |
| 5663 return o; | |
| 5664 } | |
| 5665 | |
| 5666 checkPlacementGroup(api.PlacementGroup o) { | |
| 5667 buildCounterPlacementGroup++; | |
| 5668 if (buildCounterPlacementGroup < 3) { | |
| 5669 unittest.expect(o.accountId, unittest.equals('foo')); | |
| 5670 unittest.expect(o.advertiserId, unittest.equals('foo')); | |
| 5671 checkDimensionValue(o.advertiserIdDimensionValue); | |
| 5672 unittest.expect(o.archived, unittest.isTrue); | |
| 5673 unittest.expect(o.campaignId, unittest.equals('foo')); | |
| 5674 checkDimensionValue(o.campaignIdDimensionValue); | |
| 5675 checkUnnamed1424(o.childPlacementIds); | |
| 5676 unittest.expect(o.comment, unittest.equals('foo')); | |
| 5677 unittest.expect(o.contentCategoryId, unittest.equals('foo')); | |
| 5678 checkLastModifiedInfo(o.createInfo); | |
| 5679 unittest.expect(o.directorySiteId, unittest.equals('foo')); | |
| 5680 checkDimensionValue(o.directorySiteIdDimensionValue); | |
| 5681 unittest.expect(o.externalId, unittest.equals('foo')); | |
| 5682 unittest.expect(o.id, unittest.equals('foo')); | |
| 5683 checkDimensionValue(o.idDimensionValue); | |
| 5684 unittest.expect(o.kind, unittest.equals('foo')); | |
| 5685 checkLastModifiedInfo(o.lastModifiedInfo); | |
| 5686 unittest.expect(o.name, unittest.equals('foo')); | |
| 5687 unittest.expect(o.placementGroupType, unittest.equals('foo')); | |
| 5688 unittest.expect(o.placementStrategyId, unittest.equals('foo')); | |
| 5689 checkPricingSchedule(o.pricingSchedule); | |
| 5690 unittest.expect(o.primaryPlacementId, unittest.equals('foo')); | |
| 5691 checkDimensionValue(o.primaryPlacementIdDimensionValue); | |
| 5692 unittest.expect(o.siteId, unittest.equals('foo')); | |
| 5693 checkDimensionValue(o.siteIdDimensionValue); | |
| 5694 unittest.expect(o.subaccountId, unittest.equals('foo')); | |
| 5695 } | |
| 5696 buildCounterPlacementGroup--; | |
| 5697 } | |
| 5698 | |
| 5699 buildUnnamed1425() { | |
| 5700 var o = new core.List<api.PlacementGroup>(); | |
| 5701 o.add(buildPlacementGroup()); | |
| 5702 o.add(buildPlacementGroup()); | |
| 5703 return o; | |
| 5704 } | |
| 5705 | |
| 5706 checkUnnamed1425(core.List<api.PlacementGroup> o) { | |
| 5707 unittest.expect(o, unittest.hasLength(2)); | |
| 5708 checkPlacementGroup(o[0]); | |
| 5709 checkPlacementGroup(o[1]); | |
| 5710 } | |
| 5711 | |
| 5712 core.int buildCounterPlacementGroupsListResponse = 0; | |
| 5713 buildPlacementGroupsListResponse() { | |
| 5714 var o = new api.PlacementGroupsListResponse(); | |
| 5715 buildCounterPlacementGroupsListResponse++; | |
| 5716 if (buildCounterPlacementGroupsListResponse < 3) { | |
| 5717 o.kind = "foo"; | |
| 5718 o.nextPageToken = "foo"; | |
| 5719 o.placementGroups = buildUnnamed1425(); | |
| 5720 } | |
| 5721 buildCounterPlacementGroupsListResponse--; | |
| 5722 return o; | |
| 5723 } | |
| 5724 | |
| 5725 checkPlacementGroupsListResponse(api.PlacementGroupsListResponse o) { | |
| 5726 buildCounterPlacementGroupsListResponse++; | |
| 5727 if (buildCounterPlacementGroupsListResponse < 3) { | |
| 5728 unittest.expect(o.kind, unittest.equals('foo')); | |
| 5729 unittest.expect(o.nextPageToken, unittest.equals('foo')); | |
| 5730 checkUnnamed1425(o.placementGroups); | |
| 5731 } | |
| 5732 buildCounterPlacementGroupsListResponse--; | |
| 5733 } | |
| 5734 | |
| 5735 buildUnnamed1426() { | |
| 5736 var o = new core.List<api.PlacementStrategy>(); | |
| 5737 o.add(buildPlacementStrategy()); | |
| 5738 o.add(buildPlacementStrategy()); | |
| 5739 return o; | |
| 5740 } | |
| 5741 | |
| 5742 checkUnnamed1426(core.List<api.PlacementStrategy> o) { | |
| 5743 unittest.expect(o, unittest.hasLength(2)); | |
| 5744 checkPlacementStrategy(o[0]); | |
| 5745 checkPlacementStrategy(o[1]); | |
| 5746 } | |
| 5747 | |
| 5748 core.int buildCounterPlacementStrategiesListResponse = 0; | |
| 5749 buildPlacementStrategiesListResponse() { | |
| 5750 var o = new api.PlacementStrategiesListResponse(); | |
| 5751 buildCounterPlacementStrategiesListResponse++; | |
| 5752 if (buildCounterPlacementStrategiesListResponse < 3) { | |
| 5753 o.kind = "foo"; | |
| 5754 o.nextPageToken = "foo"; | |
| 5755 o.placementStrategies = buildUnnamed1426(); | |
| 5756 } | |
| 5757 buildCounterPlacementStrategiesListResponse--; | |
| 5758 return o; | |
| 5759 } | |
| 5760 | |
| 5761 checkPlacementStrategiesListResponse(api.PlacementStrategiesListResponse o) { | |
| 5762 buildCounterPlacementStrategiesListResponse++; | |
| 5763 if (buildCounterPlacementStrategiesListResponse < 3) { | |
| 5764 unittest.expect(o.kind, unittest.equals('foo')); | |
| 5765 unittest.expect(o.nextPageToken, unittest.equals('foo')); | |
| 5766 checkUnnamed1426(o.placementStrategies); | |
| 5767 } | |
| 5768 buildCounterPlacementStrategiesListResponse--; | |
| 5769 } | |
| 5770 | |
| 5771 core.int buildCounterPlacementStrategy = 0; | |
| 5772 buildPlacementStrategy() { | |
| 5773 var o = new api.PlacementStrategy(); | |
| 5774 buildCounterPlacementStrategy++; | |
| 5775 if (buildCounterPlacementStrategy < 3) { | |
| 5776 o.accountId = "foo"; | |
| 5777 o.id = "foo"; | |
| 5778 o.kind = "foo"; | |
| 5779 o.name = "foo"; | |
| 5780 } | |
| 5781 buildCounterPlacementStrategy--; | |
| 5782 return o; | |
| 5783 } | |
| 5784 | |
| 5785 checkPlacementStrategy(api.PlacementStrategy o) { | |
| 5786 buildCounterPlacementStrategy++; | |
| 5787 if (buildCounterPlacementStrategy < 3) { | |
| 5788 unittest.expect(o.accountId, unittest.equals('foo')); | |
| 5789 unittest.expect(o.id, unittest.equals('foo')); | |
| 5790 unittest.expect(o.kind, unittest.equals('foo')); | |
| 5791 unittest.expect(o.name, unittest.equals('foo')); | |
| 5792 } | |
| 5793 buildCounterPlacementStrategy--; | |
| 5794 } | |
| 5795 | |
| 5796 buildUnnamed1427() { | |
| 5797 var o = new core.List<api.TagData>(); | |
| 5798 o.add(buildTagData()); | |
| 5799 o.add(buildTagData()); | |
| 5800 return o; | |
| 5801 } | |
| 5802 | |
| 5803 checkUnnamed1427(core.List<api.TagData> o) { | |
| 5804 unittest.expect(o, unittest.hasLength(2)); | |
| 5805 checkTagData(o[0]); | |
| 5806 checkTagData(o[1]); | |
| 5807 } | |
| 5808 | |
| 5809 core.int buildCounterPlacementTag = 0; | |
| 5810 buildPlacementTag() { | |
| 5811 var o = new api.PlacementTag(); | |
| 5812 buildCounterPlacementTag++; | |
| 5813 if (buildCounterPlacementTag < 3) { | |
| 5814 o.placementId = "foo"; | |
| 5815 o.tagDatas = buildUnnamed1427(); | |
| 5816 } | |
| 5817 buildCounterPlacementTag--; | |
| 5818 return o; | |
| 5819 } | |
| 5820 | |
| 5821 checkPlacementTag(api.PlacementTag o) { | |
| 5822 buildCounterPlacementTag++; | |
| 5823 if (buildCounterPlacementTag < 3) { | |
| 5824 unittest.expect(o.placementId, unittest.equals('foo')); | |
| 5825 checkUnnamed1427(o.tagDatas); | |
| 5826 } | |
| 5827 buildCounterPlacementTag--; | |
| 5828 } | |
| 5829 | |
| 5830 buildUnnamed1428() { | |
| 5831 var o = new core.List<api.PlacementTag>(); | |
| 5832 o.add(buildPlacementTag()); | |
| 5833 o.add(buildPlacementTag()); | |
| 5834 return o; | |
| 5835 } | |
| 5836 | |
| 5837 checkUnnamed1428(core.List<api.PlacementTag> o) { | |
| 5838 unittest.expect(o, unittest.hasLength(2)); | |
| 5839 checkPlacementTag(o[0]); | |
| 5840 checkPlacementTag(o[1]); | |
| 5841 } | |
| 5842 | |
| 5843 core.int buildCounterPlacementsGenerateTagsResponse = 0; | |
| 5844 buildPlacementsGenerateTagsResponse() { | |
| 5845 var o = new api.PlacementsGenerateTagsResponse(); | |
| 5846 buildCounterPlacementsGenerateTagsResponse++; | |
| 5847 if (buildCounterPlacementsGenerateTagsResponse < 3) { | |
| 5848 o.kind = "foo"; | |
| 5849 o.placementTags = buildUnnamed1428(); | |
| 5850 } | |
| 5851 buildCounterPlacementsGenerateTagsResponse--; | |
| 5852 return o; | |
| 5853 } | |
| 5854 | |
| 5855 checkPlacementsGenerateTagsResponse(api.PlacementsGenerateTagsResponse o) { | |
| 5856 buildCounterPlacementsGenerateTagsResponse++; | |
| 5857 if (buildCounterPlacementsGenerateTagsResponse < 3) { | |
| 5858 unittest.expect(o.kind, unittest.equals('foo')); | |
| 5859 checkUnnamed1428(o.placementTags); | |
| 5860 } | |
| 5861 buildCounterPlacementsGenerateTagsResponse--; | |
| 5862 } | |
| 5863 | |
| 5864 buildUnnamed1429() { | |
| 5865 var o = new core.List<api.Placement>(); | |
| 5866 o.add(buildPlacement()); | |
| 5867 o.add(buildPlacement()); | |
| 5868 return o; | |
| 5869 } | |
| 5870 | |
| 5871 checkUnnamed1429(core.List<api.Placement> o) { | |
| 5872 unittest.expect(o, unittest.hasLength(2)); | |
| 5873 checkPlacement(o[0]); | |
| 5874 checkPlacement(o[1]); | |
| 5875 } | |
| 5876 | |
| 5877 core.int buildCounterPlacementsListResponse = 0; | |
| 5878 buildPlacementsListResponse() { | |
| 5879 var o = new api.PlacementsListResponse(); | |
| 5880 buildCounterPlacementsListResponse++; | |
| 5881 if (buildCounterPlacementsListResponse < 3) { | |
| 5882 o.kind = "foo"; | |
| 5883 o.nextPageToken = "foo"; | |
| 5884 o.placements = buildUnnamed1429(); | |
| 5885 } | |
| 5886 buildCounterPlacementsListResponse--; | |
| 5887 return o; | |
| 5888 } | |
| 5889 | |
| 5890 checkPlacementsListResponse(api.PlacementsListResponse o) { | |
| 5891 buildCounterPlacementsListResponse++; | |
| 5892 if (buildCounterPlacementsListResponse < 3) { | |
| 5893 unittest.expect(o.kind, unittest.equals('foo')); | |
| 5894 unittest.expect(o.nextPageToken, unittest.equals('foo')); | |
| 5895 checkUnnamed1429(o.placements); | |
| 5896 } | |
| 5897 buildCounterPlacementsListResponse--; | |
| 5898 } | |
| 5899 | |
| 5900 core.int buildCounterPlatformType = 0; | |
| 5901 buildPlatformType() { | |
| 5902 var o = new api.PlatformType(); | |
| 5903 buildCounterPlatformType++; | |
| 5904 if (buildCounterPlatformType < 3) { | |
| 5905 o.id = "foo"; | |
| 5906 o.kind = "foo"; | |
| 5907 o.name = "foo"; | |
| 5908 } | |
| 5909 buildCounterPlatformType--; | |
| 5910 return o; | |
| 5911 } | |
| 5912 | |
| 5913 checkPlatformType(api.PlatformType o) { | |
| 5914 buildCounterPlatformType++; | |
| 5915 if (buildCounterPlatformType < 3) { | |
| 5916 unittest.expect(o.id, unittest.equals('foo')); | |
| 5917 unittest.expect(o.kind, unittest.equals('foo')); | |
| 5918 unittest.expect(o.name, unittest.equals('foo')); | |
| 5919 } | |
| 5920 buildCounterPlatformType--; | |
| 5921 } | |
| 5922 | |
| 5923 buildUnnamed1430() { | |
| 5924 var o = new core.List<api.PlatformType>(); | |
| 5925 o.add(buildPlatformType()); | |
| 5926 o.add(buildPlatformType()); | |
| 5927 return o; | |
| 5928 } | |
| 5929 | |
| 5930 checkUnnamed1430(core.List<api.PlatformType> o) { | |
| 5931 unittest.expect(o, unittest.hasLength(2)); | |
| 5932 checkPlatformType(o[0]); | |
| 5933 checkPlatformType(o[1]); | |
| 5934 } | |
| 5935 | |
| 5936 core.int buildCounterPlatformTypesListResponse = 0; | |
| 5937 buildPlatformTypesListResponse() { | |
| 5938 var o = new api.PlatformTypesListResponse(); | |
| 5939 buildCounterPlatformTypesListResponse++; | |
| 5940 if (buildCounterPlatformTypesListResponse < 3) { | |
| 5941 o.kind = "foo"; | |
| 5942 o.platformTypes = buildUnnamed1430(); | |
| 5943 } | |
| 5944 buildCounterPlatformTypesListResponse--; | |
| 5945 return o; | |
| 5946 } | |
| 5947 | |
| 5948 checkPlatformTypesListResponse(api.PlatformTypesListResponse o) { | |
| 5949 buildCounterPlatformTypesListResponse++; | |
| 5950 if (buildCounterPlatformTypesListResponse < 3) { | |
| 5951 unittest.expect(o.kind, unittest.equals('foo')); | |
| 5952 checkUnnamed1430(o.platformTypes); | |
| 5953 } | |
| 5954 buildCounterPlatformTypesListResponse--; | |
| 5955 } | |
| 5956 | |
| 5957 core.int buildCounterPopupWindowProperties = 0; | |
| 5958 buildPopupWindowProperties() { | |
| 5959 var o = new api.PopupWindowProperties(); | |
| 5960 buildCounterPopupWindowProperties++; | |
| 5961 if (buildCounterPopupWindowProperties < 3) { | |
| 5962 o.dimension = buildSize(); | |
| 5963 o.offset = buildOffsetPosition(); | |
| 5964 o.positionType = "foo"; | |
| 5965 o.showAddressBar = true; | |
| 5966 o.showMenuBar = true; | |
| 5967 o.showScrollBar = true; | |
| 5968 o.showStatusBar = true; | |
| 5969 o.showToolBar = true; | |
| 5970 o.title = "foo"; | |
| 5971 } | |
| 5972 buildCounterPopupWindowProperties--; | |
| 5973 return o; | |
| 5974 } | |
| 5975 | |
| 5976 checkPopupWindowProperties(api.PopupWindowProperties o) { | |
| 5977 buildCounterPopupWindowProperties++; | |
| 5978 if (buildCounterPopupWindowProperties < 3) { | |
| 5979 checkSize(o.dimension); | |
| 5980 checkOffsetPosition(o.offset); | |
| 5981 unittest.expect(o.positionType, unittest.equals('foo')); | |
| 5982 unittest.expect(o.showAddressBar, unittest.isTrue); | |
| 5983 unittest.expect(o.showMenuBar, unittest.isTrue); | |
| 5984 unittest.expect(o.showScrollBar, unittest.isTrue); | |
| 5985 unittest.expect(o.showStatusBar, unittest.isTrue); | |
| 5986 unittest.expect(o.showToolBar, unittest.isTrue); | |
| 5987 unittest.expect(o.title, unittest.equals('foo')); | |
| 5988 } | |
| 5989 buildCounterPopupWindowProperties--; | |
| 5990 } | |
| 5991 | |
| 5992 core.int buildCounterPostalCode = 0; | |
| 5993 buildPostalCode() { | |
| 5994 var o = new api.PostalCode(); | |
| 5995 buildCounterPostalCode++; | |
| 5996 if (buildCounterPostalCode < 3) { | |
| 5997 o.code = "foo"; | |
| 5998 o.countryCode = "foo"; | |
| 5999 o.countryDartId = "foo"; | |
| 6000 o.id = "foo"; | |
| 6001 o.kind = "foo"; | |
| 6002 } | |
| 6003 buildCounterPostalCode--; | |
| 6004 return o; | |
| 6005 } | |
| 6006 | |
| 6007 checkPostalCode(api.PostalCode o) { | |
| 6008 buildCounterPostalCode++; | |
| 6009 if (buildCounterPostalCode < 3) { | |
| 6010 unittest.expect(o.code, unittest.equals('foo')); | |
| 6011 unittest.expect(o.countryCode, unittest.equals('foo')); | |
| 6012 unittest.expect(o.countryDartId, unittest.equals('foo')); | |
| 6013 unittest.expect(o.id, unittest.equals('foo')); | |
| 6014 unittest.expect(o.kind, unittest.equals('foo')); | |
| 6015 } | |
| 6016 buildCounterPostalCode--; | |
| 6017 } | |
| 6018 | |
| 6019 buildUnnamed1431() { | |
| 6020 var o = new core.List<api.PostalCode>(); | |
| 6021 o.add(buildPostalCode()); | |
| 6022 o.add(buildPostalCode()); | |
| 6023 return o; | |
| 6024 } | |
| 6025 | |
| 6026 checkUnnamed1431(core.List<api.PostalCode> o) { | |
| 6027 unittest.expect(o, unittest.hasLength(2)); | |
| 6028 checkPostalCode(o[0]); | |
| 6029 checkPostalCode(o[1]); | |
| 6030 } | |
| 6031 | |
| 6032 core.int buildCounterPostalCodesListResponse = 0; | |
| 6033 buildPostalCodesListResponse() { | |
| 6034 var o = new api.PostalCodesListResponse(); | |
| 6035 buildCounterPostalCodesListResponse++; | |
| 6036 if (buildCounterPostalCodesListResponse < 3) { | |
| 6037 o.kind = "foo"; | |
| 6038 o.postalCodes = buildUnnamed1431(); | |
| 6039 } | |
| 6040 buildCounterPostalCodesListResponse--; | |
| 6041 return o; | |
| 6042 } | |
| 6043 | |
| 6044 checkPostalCodesListResponse(api.PostalCodesListResponse o) { | |
| 6045 buildCounterPostalCodesListResponse++; | |
| 6046 if (buildCounterPostalCodesListResponse < 3) { | |
| 6047 unittest.expect(o.kind, unittest.equals('foo')); | |
| 6048 checkUnnamed1431(o.postalCodes); | |
| 6049 } | |
| 6050 buildCounterPostalCodesListResponse--; | |
| 6051 } | |
| 6052 | |
| 6053 buildUnnamed1432() { | |
| 6054 var o = new core.List<api.Flight>(); | |
| 6055 o.add(buildFlight()); | |
| 6056 o.add(buildFlight()); | |
| 6057 return o; | |
| 6058 } | |
| 6059 | |
| 6060 checkUnnamed1432(core.List<api.Flight> o) { | |
| 6061 unittest.expect(o, unittest.hasLength(2)); | |
| 6062 checkFlight(o[0]); | |
| 6063 checkFlight(o[1]); | |
| 6064 } | |
| 6065 | |
| 6066 core.int buildCounterPricing = 0; | |
| 6067 buildPricing() { | |
| 6068 var o = new api.Pricing(); | |
| 6069 buildCounterPricing++; | |
| 6070 if (buildCounterPricing < 3) { | |
| 6071 o.capCostType = "foo"; | |
| 6072 o.endDate = core.DateTime.parse("2002-02-27T14:01:02Z"); | |
| 6073 o.flights = buildUnnamed1432(); | |
| 6074 o.groupType = "foo"; | |
| 6075 o.pricingType = "foo"; | |
| 6076 o.startDate = core.DateTime.parse("2002-02-27T14:01:02Z"); | |
| 6077 } | |
| 6078 buildCounterPricing--; | |
| 6079 return o; | |
| 6080 } | |
| 6081 | |
| 6082 checkPricing(api.Pricing o) { | |
| 6083 buildCounterPricing++; | |
| 6084 if (buildCounterPricing < 3) { | |
| 6085 unittest.expect(o.capCostType, unittest.equals('foo')); | |
| 6086 unittest.expect(o.endDate, unittest.equals(core.DateTime.parse("2002-02-27T0
0:00:00"))); | |
| 6087 checkUnnamed1432(o.flights); | |
| 6088 unittest.expect(o.groupType, unittest.equals('foo')); | |
| 6089 unittest.expect(o.pricingType, unittest.equals('foo')); | |
| 6090 unittest.expect(o.startDate, unittest.equals(core.DateTime.parse("2002-02-27
T00:00:00"))); | |
| 6091 } | |
| 6092 buildCounterPricing--; | |
| 6093 } | |
| 6094 | |
| 6095 buildUnnamed1433() { | |
| 6096 var o = new core.List<api.PricingSchedulePricingPeriod>(); | |
| 6097 o.add(buildPricingSchedulePricingPeriod()); | |
| 6098 o.add(buildPricingSchedulePricingPeriod()); | |
| 6099 return o; | |
| 6100 } | |
| 6101 | |
| 6102 checkUnnamed1433(core.List<api.PricingSchedulePricingPeriod> o) { | |
| 6103 unittest.expect(o, unittest.hasLength(2)); | |
| 6104 checkPricingSchedulePricingPeriod(o[0]); | |
| 6105 checkPricingSchedulePricingPeriod(o[1]); | |
| 6106 } | |
| 6107 | |
| 6108 core.int buildCounterPricingSchedule = 0; | |
| 6109 buildPricingSchedule() { | |
| 6110 var o = new api.PricingSchedule(); | |
| 6111 buildCounterPricingSchedule++; | |
| 6112 if (buildCounterPricingSchedule < 3) { | |
| 6113 o.capCostOption = "foo"; | |
| 6114 o.disregardOverdelivery = true; | |
| 6115 o.endDate = core.DateTime.parse("2002-02-27T14:01:02Z"); | |
| 6116 o.flighted = true; | |
| 6117 o.floodlightActivityId = "foo"; | |
| 6118 o.pricingPeriods = buildUnnamed1433(); | |
| 6119 o.pricingType = "foo"; | |
| 6120 o.startDate = core.DateTime.parse("2002-02-27T14:01:02Z"); | |
| 6121 o.testingStartDate = core.DateTime.parse("2002-02-27T14:01:02Z"); | |
| 6122 } | |
| 6123 buildCounterPricingSchedule--; | |
| 6124 return o; | |
| 6125 } | |
| 6126 | |
| 6127 checkPricingSchedule(api.PricingSchedule o) { | |
| 6128 buildCounterPricingSchedule++; | |
| 6129 if (buildCounterPricingSchedule < 3) { | |
| 6130 unittest.expect(o.capCostOption, unittest.equals('foo')); | |
| 6131 unittest.expect(o.disregardOverdelivery, unittest.isTrue); | |
| 6132 unittest.expect(o.endDate, unittest.equals(core.DateTime.parse("2002-02-27T0
0:00:00"))); | |
| 6133 unittest.expect(o.flighted, unittest.isTrue); | |
| 6134 unittest.expect(o.floodlightActivityId, unittest.equals('foo')); | |
| 6135 checkUnnamed1433(o.pricingPeriods); | |
| 6136 unittest.expect(o.pricingType, unittest.equals('foo')); | |
| 6137 unittest.expect(o.startDate, unittest.equals(core.DateTime.parse("2002-02-27
T00:00:00"))); | |
| 6138 unittest.expect(o.testingStartDate, unittest.equals(core.DateTime.parse("200
2-02-27T00:00:00"))); | |
| 6139 } | |
| 6140 buildCounterPricingSchedule--; | |
| 6141 } | |
| 6142 | |
| 6143 core.int buildCounterPricingSchedulePricingPeriod = 0; | |
| 6144 buildPricingSchedulePricingPeriod() { | |
| 6145 var o = new api.PricingSchedulePricingPeriod(); | |
| 6146 buildCounterPricingSchedulePricingPeriod++; | |
| 6147 if (buildCounterPricingSchedulePricingPeriod < 3) { | |
| 6148 o.endDate = core.DateTime.parse("2002-02-27T14:01:02Z"); | |
| 6149 o.pricingComment = "foo"; | |
| 6150 o.rateOrCostNanos = "foo"; | |
| 6151 o.startDate = core.DateTime.parse("2002-02-27T14:01:02Z"); | |
| 6152 o.units = "foo"; | |
| 6153 } | |
| 6154 buildCounterPricingSchedulePricingPeriod--; | |
| 6155 return o; | |
| 6156 } | |
| 6157 | |
| 6158 checkPricingSchedulePricingPeriod(api.PricingSchedulePricingPeriod o) { | |
| 6159 buildCounterPricingSchedulePricingPeriod++; | |
| 6160 if (buildCounterPricingSchedulePricingPeriod < 3) { | |
| 6161 unittest.expect(o.endDate, unittest.equals(core.DateTime.parse("2002-02-27T0
0:00:00"))); | |
| 6162 unittest.expect(o.pricingComment, unittest.equals('foo')); | |
| 6163 unittest.expect(o.rateOrCostNanos, unittest.equals('foo')); | |
| 6164 unittest.expect(o.startDate, unittest.equals(core.DateTime.parse("2002-02-27
T00:00:00"))); | |
| 6165 unittest.expect(o.units, unittest.equals('foo')); | |
| 6166 } | |
| 6167 buildCounterPricingSchedulePricingPeriod--; | |
| 6168 } | |
| 6169 | |
| 6170 core.int buildCounterProject = 0; | |
| 6171 buildProject() { | |
| 6172 var o = new api.Project(); | |
| 6173 buildCounterProject++; | |
| 6174 if (buildCounterProject < 3) { | |
| 6175 o.accountId = "foo"; | |
| 6176 o.advertiserId = "foo"; | |
| 6177 o.audienceAgeGroup = "foo"; | |
| 6178 o.audienceGender = "foo"; | |
| 6179 o.budget = "foo"; | |
| 6180 o.clientBillingCode = "foo"; | |
| 6181 o.clientName = "foo"; | |
| 6182 o.endDate = core.DateTime.parse("2002-02-27T14:01:02Z"); | |
| 6183 o.id = "foo"; | |
| 6184 o.kind = "foo"; | |
| 6185 o.lastModifiedInfo = buildLastModifiedInfo(); | |
| 6186 o.name = "foo"; | |
| 6187 o.overview = "foo"; | |
| 6188 o.startDate = core.DateTime.parse("2002-02-27T14:01:02Z"); | |
| 6189 o.subaccountId = "foo"; | |
| 6190 o.targetClicks = "foo"; | |
| 6191 o.targetConversions = "foo"; | |
| 6192 o.targetCpaNanos = "foo"; | |
| 6193 o.targetCpcNanos = "foo"; | |
| 6194 o.targetCpmNanos = "foo"; | |
| 6195 o.targetImpressions = "foo"; | |
| 6196 } | |
| 6197 buildCounterProject--; | |
| 6198 return o; | |
| 6199 } | |
| 6200 | |
| 6201 checkProject(api.Project o) { | |
| 6202 buildCounterProject++; | |
| 6203 if (buildCounterProject < 3) { | |
| 6204 unittest.expect(o.accountId, unittest.equals('foo')); | |
| 6205 unittest.expect(o.advertiserId, unittest.equals('foo')); | |
| 6206 unittest.expect(o.audienceAgeGroup, unittest.equals('foo')); | |
| 6207 unittest.expect(o.audienceGender, unittest.equals('foo')); | |
| 6208 unittest.expect(o.budget, unittest.equals('foo')); | |
| 6209 unittest.expect(o.clientBillingCode, unittest.equals('foo')); | |
| 6210 unittest.expect(o.clientName, unittest.equals('foo')); | |
| 6211 unittest.expect(o.endDate, unittest.equals(core.DateTime.parse("2002-02-27T0
0:00:00"))); | |
| 6212 unittest.expect(o.id, unittest.equals('foo')); | |
| 6213 unittest.expect(o.kind, unittest.equals('foo')); | |
| 6214 checkLastModifiedInfo(o.lastModifiedInfo); | |
| 6215 unittest.expect(o.name, unittest.equals('foo')); | |
| 6216 unittest.expect(o.overview, unittest.equals('foo')); | |
| 6217 unittest.expect(o.startDate, unittest.equals(core.DateTime.parse("2002-02-27
T00:00:00"))); | |
| 6218 unittest.expect(o.subaccountId, unittest.equals('foo')); | |
| 6219 unittest.expect(o.targetClicks, unittest.equals('foo')); | |
| 6220 unittest.expect(o.targetConversions, unittest.equals('foo')); | |
| 6221 unittest.expect(o.targetCpaNanos, unittest.equals('foo')); | |
| 6222 unittest.expect(o.targetCpcNanos, unittest.equals('foo')); | |
| 6223 unittest.expect(o.targetCpmNanos, unittest.equals('foo')); | |
| 6224 unittest.expect(o.targetImpressions, unittest.equals('foo')); | |
| 6225 } | |
| 6226 buildCounterProject--; | |
| 6227 } | |
| 6228 | |
| 6229 buildUnnamed1434() { | |
| 6230 var o = new core.List<api.Project>(); | |
| 6231 o.add(buildProject()); | |
| 6232 o.add(buildProject()); | |
| 6233 return o; | |
| 6234 } | |
| 6235 | |
| 6236 checkUnnamed1434(core.List<api.Project> o) { | |
| 6237 unittest.expect(o, unittest.hasLength(2)); | |
| 6238 checkProject(o[0]); | |
| 6239 checkProject(o[1]); | |
| 6240 } | |
| 6241 | |
| 6242 core.int buildCounterProjectsListResponse = 0; | |
| 6243 buildProjectsListResponse() { | |
| 6244 var o = new api.ProjectsListResponse(); | |
| 6245 buildCounterProjectsListResponse++; | |
| 6246 if (buildCounterProjectsListResponse < 3) { | |
| 6247 o.kind = "foo"; | |
| 6248 o.nextPageToken = "foo"; | |
| 6249 o.projects = buildUnnamed1434(); | |
| 6250 } | |
| 6251 buildCounterProjectsListResponse--; | |
| 6252 return o; | |
| 6253 } | |
| 6254 | |
| 6255 checkProjectsListResponse(api.ProjectsListResponse o) { | |
| 6256 buildCounterProjectsListResponse++; | |
| 6257 if (buildCounterProjectsListResponse < 3) { | |
| 6258 unittest.expect(o.kind, unittest.equals('foo')); | |
| 6259 unittest.expect(o.nextPageToken, unittest.equals('foo')); | |
| 6260 checkUnnamed1434(o.projects); | |
| 6261 } | |
| 6262 buildCounterProjectsListResponse--; | |
| 6263 } | |
| 6264 | |
| 6265 buildUnnamed1435() { | |
| 6266 var o = new core.List<api.Dimension>(); | |
| 6267 o.add(buildDimension()); | |
| 6268 o.add(buildDimension()); | |
| 6269 return o; | |
| 6270 } | |
| 6271 | |
| 6272 checkUnnamed1435(core.List<api.Dimension> o) { | |
| 6273 unittest.expect(o, unittest.hasLength(2)); | |
| 6274 checkDimension(o[0]); | |
| 6275 checkDimension(o[1]); | |
| 6276 } | |
| 6277 | |
| 6278 buildUnnamed1436() { | |
| 6279 var o = new core.List<api.Dimension>(); | |
| 6280 o.add(buildDimension()); | |
| 6281 o.add(buildDimension()); | |
| 6282 return o; | |
| 6283 } | |
| 6284 | |
| 6285 checkUnnamed1436(core.List<api.Dimension> o) { | |
| 6286 unittest.expect(o, unittest.hasLength(2)); | |
| 6287 checkDimension(o[0]); | |
| 6288 checkDimension(o[1]); | |
| 6289 } | |
| 6290 | |
| 6291 buildUnnamed1437() { | |
| 6292 var o = new core.List<api.Metric>(); | |
| 6293 o.add(buildMetric()); | |
| 6294 o.add(buildMetric()); | |
| 6295 return o; | |
| 6296 } | |
| 6297 | |
| 6298 checkUnnamed1437(core.List<api.Metric> o) { | |
| 6299 unittest.expect(o, unittest.hasLength(2)); | |
| 6300 checkMetric(o[0]); | |
| 6301 checkMetric(o[1]); | |
| 6302 } | |
| 6303 | |
| 6304 buildUnnamed1438() { | |
| 6305 var o = new core.List<api.Metric>(); | |
| 6306 o.add(buildMetric()); | |
| 6307 o.add(buildMetric()); | |
| 6308 return o; | |
| 6309 } | |
| 6310 | |
| 6311 checkUnnamed1438(core.List<api.Metric> o) { | |
| 6312 unittest.expect(o, unittest.hasLength(2)); | |
| 6313 checkMetric(o[0]); | |
| 6314 checkMetric(o[1]); | |
| 6315 } | |
| 6316 | |
| 6317 buildUnnamed1439() { | |
| 6318 var o = new core.List<api.Metric>(); | |
| 6319 o.add(buildMetric()); | |
| 6320 o.add(buildMetric()); | |
| 6321 return o; | |
| 6322 } | |
| 6323 | |
| 6324 checkUnnamed1439(core.List<api.Metric> o) { | |
| 6325 unittest.expect(o, unittest.hasLength(2)); | |
| 6326 checkMetric(o[0]); | |
| 6327 checkMetric(o[1]); | |
| 6328 } | |
| 6329 | |
| 6330 core.int buildCounterReachReportCompatibleFields = 0; | |
| 6331 buildReachReportCompatibleFields() { | |
| 6332 var o = new api.ReachReportCompatibleFields(); | |
| 6333 buildCounterReachReportCompatibleFields++; | |
| 6334 if (buildCounterReachReportCompatibleFields < 3) { | |
| 6335 o.dimensionFilters = buildUnnamed1435(); | |
| 6336 o.dimensions = buildUnnamed1436(); | |
| 6337 o.kind = "foo"; | |
| 6338 o.metrics = buildUnnamed1437(); | |
| 6339 o.pivotedActivityMetrics = buildUnnamed1438(); | |
| 6340 o.reachByFrequencyMetrics = buildUnnamed1439(); | |
| 6341 } | |
| 6342 buildCounterReachReportCompatibleFields--; | |
| 6343 return o; | |
| 6344 } | |
| 6345 | |
| 6346 checkReachReportCompatibleFields(api.ReachReportCompatibleFields o) { | |
| 6347 buildCounterReachReportCompatibleFields++; | |
| 6348 if (buildCounterReachReportCompatibleFields < 3) { | |
| 6349 checkUnnamed1435(o.dimensionFilters); | |
| 6350 checkUnnamed1436(o.dimensions); | |
| 6351 unittest.expect(o.kind, unittest.equals('foo')); | |
| 6352 checkUnnamed1437(o.metrics); | |
| 6353 checkUnnamed1438(o.pivotedActivityMetrics); | |
| 6354 checkUnnamed1439(o.reachByFrequencyMetrics); | |
| 6355 } | |
| 6356 buildCounterReachReportCompatibleFields--; | |
| 6357 } | |
| 6358 | |
| 6359 core.int buildCounterRecipient = 0; | |
| 6360 buildRecipient() { | |
| 6361 var o = new api.Recipient(); | |
| 6362 buildCounterRecipient++; | |
| 6363 if (buildCounterRecipient < 3) { | |
| 6364 o.deliveryType = "foo"; | |
| 6365 o.email = "foo"; | |
| 6366 o.kind = "foo"; | |
| 6367 } | |
| 6368 buildCounterRecipient--; | |
| 6369 return o; | |
| 6370 } | |
| 6371 | |
| 6372 checkRecipient(api.Recipient o) { | |
| 6373 buildCounterRecipient++; | |
| 6374 if (buildCounterRecipient < 3) { | |
| 6375 unittest.expect(o.deliveryType, unittest.equals('foo')); | |
| 6376 unittest.expect(o.email, unittest.equals('foo')); | |
| 6377 unittest.expect(o.kind, unittest.equals('foo')); | |
| 6378 } | |
| 6379 buildCounterRecipient--; | |
| 6380 } | |
| 6381 | |
| 6382 core.int buildCounterRegion = 0; | |
| 6383 buildRegion() { | |
| 6384 var o = new api.Region(); | |
| 6385 buildCounterRegion++; | |
| 6386 if (buildCounterRegion < 3) { | |
| 6387 o.countryCode = "foo"; | |
| 6388 o.countryDartId = "foo"; | |
| 6389 o.dartId = "foo"; | |
| 6390 o.kind = "foo"; | |
| 6391 o.name = "foo"; | |
| 6392 o.regionCode = "foo"; | |
| 6393 } | |
| 6394 buildCounterRegion--; | |
| 6395 return o; | |
| 6396 } | |
| 6397 | |
| 6398 checkRegion(api.Region o) { | |
| 6399 buildCounterRegion++; | |
| 6400 if (buildCounterRegion < 3) { | |
| 6401 unittest.expect(o.countryCode, unittest.equals('foo')); | |
| 6402 unittest.expect(o.countryDartId, unittest.equals('foo')); | |
| 6403 unittest.expect(o.dartId, unittest.equals('foo')); | |
| 6404 unittest.expect(o.kind, unittest.equals('foo')); | |
| 6405 unittest.expect(o.name, unittest.equals('foo')); | |
| 6406 unittest.expect(o.regionCode, unittest.equals('foo')); | |
| 6407 } | |
| 6408 buildCounterRegion--; | |
| 6409 } | |
| 6410 | |
| 6411 buildUnnamed1440() { | |
| 6412 var o = new core.List<api.Region>(); | |
| 6413 o.add(buildRegion()); | |
| 6414 o.add(buildRegion()); | |
| 6415 return o; | |
| 6416 } | |
| 6417 | |
| 6418 checkUnnamed1440(core.List<api.Region> o) { | |
| 6419 unittest.expect(o, unittest.hasLength(2)); | |
| 6420 checkRegion(o[0]); | |
| 6421 checkRegion(o[1]); | |
| 6422 } | |
| 6423 | |
| 6424 core.int buildCounterRegionsListResponse = 0; | |
| 6425 buildRegionsListResponse() { | |
| 6426 var o = new api.RegionsListResponse(); | |
| 6427 buildCounterRegionsListResponse++; | |
| 6428 if (buildCounterRegionsListResponse < 3) { | |
| 6429 o.kind = "foo"; | |
| 6430 o.regions = buildUnnamed1440(); | |
| 6431 } | |
| 6432 buildCounterRegionsListResponse--; | |
| 6433 return o; | |
| 6434 } | |
| 6435 | |
| 6436 checkRegionsListResponse(api.RegionsListResponse o) { | |
| 6437 buildCounterRegionsListResponse++; | |
| 6438 if (buildCounterRegionsListResponse < 3) { | |
| 6439 unittest.expect(o.kind, unittest.equals('foo')); | |
| 6440 checkUnnamed1440(o.regions); | |
| 6441 } | |
| 6442 buildCounterRegionsListResponse--; | |
| 6443 } | |
| 6444 | |
| 6445 core.int buildCounterRemarketingList = 0; | |
| 6446 buildRemarketingList() { | |
| 6447 var o = new api.RemarketingList(); | |
| 6448 buildCounterRemarketingList++; | |
| 6449 if (buildCounterRemarketingList < 3) { | |
| 6450 o.accountId = "foo"; | |
| 6451 o.active = true; | |
| 6452 o.advertiserId = "foo"; | |
| 6453 o.advertiserIdDimensionValue = buildDimensionValue(); | |
| 6454 o.description = "foo"; | |
| 6455 o.id = "foo"; | |
| 6456 o.kind = "foo"; | |
| 6457 o.lifeSpan = "foo"; | |
| 6458 o.listPopulationRule = buildListPopulationRule(); | |
| 6459 o.listSize = "foo"; | |
| 6460 o.listSource = "foo"; | |
| 6461 o.name = "foo"; | |
| 6462 o.subaccountId = "foo"; | |
| 6463 } | |
| 6464 buildCounterRemarketingList--; | |
| 6465 return o; | |
| 6466 } | |
| 6467 | |
| 6468 checkRemarketingList(api.RemarketingList o) { | |
| 6469 buildCounterRemarketingList++; | |
| 6470 if (buildCounterRemarketingList < 3) { | |
| 6471 unittest.expect(o.accountId, unittest.equals('foo')); | |
| 6472 unittest.expect(o.active, unittest.isTrue); | |
| 6473 unittest.expect(o.advertiserId, unittest.equals('foo')); | |
| 6474 checkDimensionValue(o.advertiserIdDimensionValue); | |
| 6475 unittest.expect(o.description, unittest.equals('foo')); | |
| 6476 unittest.expect(o.id, unittest.equals('foo')); | |
| 6477 unittest.expect(o.kind, unittest.equals('foo')); | |
| 6478 unittest.expect(o.lifeSpan, unittest.equals('foo')); | |
| 6479 checkListPopulationRule(o.listPopulationRule); | |
| 6480 unittest.expect(o.listSize, unittest.equals('foo')); | |
| 6481 unittest.expect(o.listSource, unittest.equals('foo')); | |
| 6482 unittest.expect(o.name, unittest.equals('foo')); | |
| 6483 unittest.expect(o.subaccountId, unittest.equals('foo')); | |
| 6484 } | |
| 6485 buildCounterRemarketingList--; | |
| 6486 } | |
| 6487 | |
| 6488 buildUnnamed1441() { | |
| 6489 var o = new core.List<core.String>(); | |
| 6490 o.add("foo"); | |
| 6491 o.add("foo"); | |
| 6492 return o; | |
| 6493 } | |
| 6494 | |
| 6495 checkUnnamed1441(core.List<core.String> o) { | |
| 6496 unittest.expect(o, unittest.hasLength(2)); | |
| 6497 unittest.expect(o[0], unittest.equals('foo')); | |
| 6498 unittest.expect(o[1], unittest.equals('foo')); | |
| 6499 } | |
| 6500 | |
| 6501 buildUnnamed1442() { | |
| 6502 var o = new core.List<core.String>(); | |
| 6503 o.add("foo"); | |
| 6504 o.add("foo"); | |
| 6505 return o; | |
| 6506 } | |
| 6507 | |
| 6508 checkUnnamed1442(core.List<core.String> o) { | |
| 6509 unittest.expect(o, unittest.hasLength(2)); | |
| 6510 unittest.expect(o[0], unittest.equals('foo')); | |
| 6511 unittest.expect(o[1], unittest.equals('foo')); | |
| 6512 } | |
| 6513 | |
| 6514 core.int buildCounterRemarketingListShare = 0; | |
| 6515 buildRemarketingListShare() { | |
| 6516 var o = new api.RemarketingListShare(); | |
| 6517 buildCounterRemarketingListShare++; | |
| 6518 if (buildCounterRemarketingListShare < 3) { | |
| 6519 o.kind = "foo"; | |
| 6520 o.remarketingListId = "foo"; | |
| 6521 o.sharedAccountIds = buildUnnamed1441(); | |
| 6522 o.sharedAdvertiserIds = buildUnnamed1442(); | |
| 6523 } | |
| 6524 buildCounterRemarketingListShare--; | |
| 6525 return o; | |
| 6526 } | |
| 6527 | |
| 6528 checkRemarketingListShare(api.RemarketingListShare o) { | |
| 6529 buildCounterRemarketingListShare++; | |
| 6530 if (buildCounterRemarketingListShare < 3) { | |
| 6531 unittest.expect(o.kind, unittest.equals('foo')); | |
| 6532 unittest.expect(o.remarketingListId, unittest.equals('foo')); | |
| 6533 checkUnnamed1441(o.sharedAccountIds); | |
| 6534 checkUnnamed1442(o.sharedAdvertiserIds); | |
| 6535 } | |
| 6536 buildCounterRemarketingListShare--; | |
| 6537 } | |
| 6538 | |
| 6539 buildUnnamed1443() { | |
| 6540 var o = new core.List<api.RemarketingList>(); | |
| 6541 o.add(buildRemarketingList()); | |
| 6542 o.add(buildRemarketingList()); | |
| 6543 return o; | |
| 6544 } | |
| 6545 | |
| 6546 checkUnnamed1443(core.List<api.RemarketingList> o) { | |
| 6547 unittest.expect(o, unittest.hasLength(2)); | |
| 6548 checkRemarketingList(o[0]); | |
| 6549 checkRemarketingList(o[1]); | |
| 6550 } | |
| 6551 | |
| 6552 core.int buildCounterRemarketingListsListResponse = 0; | |
| 6553 buildRemarketingListsListResponse() { | |
| 6554 var o = new api.RemarketingListsListResponse(); | |
| 6555 buildCounterRemarketingListsListResponse++; | |
| 6556 if (buildCounterRemarketingListsListResponse < 3) { | |
| 6557 o.kind = "foo"; | |
| 6558 o.nextPageToken = "foo"; | |
| 6559 o.remarketingLists = buildUnnamed1443(); | |
| 6560 } | |
| 6561 buildCounterRemarketingListsListResponse--; | |
| 6562 return o; | |
| 6563 } | |
| 6564 | |
| 6565 checkRemarketingListsListResponse(api.RemarketingListsListResponse o) { | |
| 6566 buildCounterRemarketingListsListResponse++; | |
| 6567 if (buildCounterRemarketingListsListResponse < 3) { | |
| 6568 unittest.expect(o.kind, unittest.equals('foo')); | |
| 6569 unittest.expect(o.nextPageToken, unittest.equals('foo')); | |
| 6570 checkUnnamed1443(o.remarketingLists); | |
| 6571 } | |
| 6572 buildCounterRemarketingListsListResponse--; | |
| 6573 } | |
| 6574 | |
| 6575 buildUnnamed1444() { | |
| 6576 var o = new core.List<api.DimensionValue>(); | |
| 6577 o.add(buildDimensionValue()); | |
| 6578 o.add(buildDimensionValue()); | |
| 6579 return o; | |
| 6580 } | |
| 6581 | |
| 6582 checkUnnamed1444(core.List<api.DimensionValue> o) { | |
| 6583 unittest.expect(o, unittest.hasLength(2)); | |
| 6584 checkDimensionValue(o[0]); | |
| 6585 checkDimensionValue(o[1]); | |
| 6586 } | |
| 6587 | |
| 6588 buildUnnamed1445() { | |
| 6589 var o = new core.List<api.SortedDimension>(); | |
| 6590 o.add(buildSortedDimension()); | |
| 6591 o.add(buildSortedDimension()); | |
| 6592 return o; | |
| 6593 } | |
| 6594 | |
| 6595 checkUnnamed1445(core.List<api.SortedDimension> o) { | |
| 6596 unittest.expect(o, unittest.hasLength(2)); | |
| 6597 checkSortedDimension(o[0]); | |
| 6598 checkSortedDimension(o[1]); | |
| 6599 } | |
| 6600 | |
| 6601 buildUnnamed1446() { | |
| 6602 var o = new core.List<core.String>(); | |
| 6603 o.add("foo"); | |
| 6604 o.add("foo"); | |
| 6605 return o; | |
| 6606 } | |
| 6607 | |
| 6608 checkUnnamed1446(core.List<core.String> o) { | |
| 6609 unittest.expect(o, unittest.hasLength(2)); | |
| 6610 unittest.expect(o[0], unittest.equals('foo')); | |
| 6611 unittest.expect(o[1], unittest.equals('foo')); | |
| 6612 } | |
| 6613 | |
| 6614 core.int buildCounterReportCriteria = 0; | |
| 6615 buildReportCriteria() { | |
| 6616 var o = new api.ReportCriteria(); | |
| 6617 buildCounterReportCriteria++; | |
| 6618 if (buildCounterReportCriteria < 3) { | |
| 6619 o.activities = buildActivities(); | |
| 6620 o.customRichMediaEvents = buildCustomRichMediaEvents(); | |
| 6621 o.dateRange = buildDateRange(); | |
| 6622 o.dimensionFilters = buildUnnamed1444(); | |
| 6623 o.dimensions = buildUnnamed1445(); | |
| 6624 o.metricNames = buildUnnamed1446(); | |
| 6625 } | |
| 6626 buildCounterReportCriteria--; | |
| 6627 return o; | |
| 6628 } | |
| 6629 | |
| 6630 checkReportCriteria(api.ReportCriteria o) { | |
| 6631 buildCounterReportCriteria++; | |
| 6632 if (buildCounterReportCriteria < 3) { | |
| 6633 checkActivities(o.activities); | |
| 6634 checkCustomRichMediaEvents(o.customRichMediaEvents); | |
| 6635 checkDateRange(o.dateRange); | |
| 6636 checkUnnamed1444(o.dimensionFilters); | |
| 6637 checkUnnamed1445(o.dimensions); | |
| 6638 checkUnnamed1446(o.metricNames); | |
| 6639 } | |
| 6640 buildCounterReportCriteria--; | |
| 6641 } | |
| 6642 | |
| 6643 buildUnnamed1447() { | |
| 6644 var o = new core.List<api.SortedDimension>(); | |
| 6645 o.add(buildSortedDimension()); | |
| 6646 o.add(buildSortedDimension()); | |
| 6647 return o; | |
| 6648 } | |
| 6649 | |
| 6650 checkUnnamed1447(core.List<api.SortedDimension> o) { | |
| 6651 unittest.expect(o, unittest.hasLength(2)); | |
| 6652 checkSortedDimension(o[0]); | |
| 6653 checkSortedDimension(o[1]); | |
| 6654 } | |
| 6655 | |
| 6656 buildUnnamed1448() { | |
| 6657 var o = new core.List<api.DimensionValue>(); | |
| 6658 o.add(buildDimensionValue()); | |
| 6659 o.add(buildDimensionValue()); | |
| 6660 return o; | |
| 6661 } | |
| 6662 | |
| 6663 checkUnnamed1448(core.List<api.DimensionValue> o) { | |
| 6664 unittest.expect(o, unittest.hasLength(2)); | |
| 6665 checkDimensionValue(o[0]); | |
| 6666 checkDimensionValue(o[1]); | |
| 6667 } | |
| 6668 | |
| 6669 buildUnnamed1449() { | |
| 6670 var o = new core.List<core.String>(); | |
| 6671 o.add("foo"); | |
| 6672 o.add("foo"); | |
| 6673 return o; | |
| 6674 } | |
| 6675 | |
| 6676 checkUnnamed1449(core.List<core.String> o) { | |
| 6677 unittest.expect(o, unittest.hasLength(2)); | |
| 6678 unittest.expect(o[0], unittest.equals('foo')); | |
| 6679 unittest.expect(o[1], unittest.equals('foo')); | |
| 6680 } | |
| 6681 | |
| 6682 buildUnnamed1450() { | |
| 6683 var o = new core.List<core.String>(); | |
| 6684 o.add("foo"); | |
| 6685 o.add("foo"); | |
| 6686 return o; | |
| 6687 } | |
| 6688 | |
| 6689 checkUnnamed1450(core.List<core.String> o) { | |
| 6690 unittest.expect(o, unittest.hasLength(2)); | |
| 6691 unittest.expect(o[0], unittest.equals('foo')); | |
| 6692 unittest.expect(o[1], unittest.equals('foo')); | |
| 6693 } | |
| 6694 | |
| 6695 core.int buildCounterReportCrossDimensionReachCriteria = 0; | |
| 6696 buildReportCrossDimensionReachCriteria() { | |
| 6697 var o = new api.ReportCrossDimensionReachCriteria(); | |
| 6698 buildCounterReportCrossDimensionReachCriteria++; | |
| 6699 if (buildCounterReportCrossDimensionReachCriteria < 3) { | |
| 6700 o.breakdown = buildUnnamed1447(); | |
| 6701 o.dateRange = buildDateRange(); | |
| 6702 o.dimension = "foo"; | |
| 6703 o.dimensionFilters = buildUnnamed1448(); | |
| 6704 o.metricNames = buildUnnamed1449(); | |
| 6705 o.overlapMetricNames = buildUnnamed1450(); | |
| 6706 o.pivoted = true; | |
| 6707 } | |
| 6708 buildCounterReportCrossDimensionReachCriteria--; | |
| 6709 return o; | |
| 6710 } | |
| 6711 | |
| 6712 checkReportCrossDimensionReachCriteria(api.ReportCrossDimensionReachCriteria o)
{ | |
| 6713 buildCounterReportCrossDimensionReachCriteria++; | |
| 6714 if (buildCounterReportCrossDimensionReachCriteria < 3) { | |
| 6715 checkUnnamed1447(o.breakdown); | |
| 6716 checkDateRange(o.dateRange); | |
| 6717 unittest.expect(o.dimension, unittest.equals('foo')); | |
| 6718 checkUnnamed1448(o.dimensionFilters); | |
| 6719 checkUnnamed1449(o.metricNames); | |
| 6720 checkUnnamed1450(o.overlapMetricNames); | |
| 6721 unittest.expect(o.pivoted, unittest.isTrue); | |
| 6722 } | |
| 6723 buildCounterReportCrossDimensionReachCriteria--; | |
| 6724 } | |
| 6725 | |
| 6726 buildUnnamed1451() { | |
| 6727 var o = new core.List<api.Recipient>(); | |
| 6728 o.add(buildRecipient()); | |
| 6729 o.add(buildRecipient()); | |
| 6730 return o; | |
| 6731 } | |
| 6732 | |
| 6733 checkUnnamed1451(core.List<api.Recipient> o) { | |
| 6734 unittest.expect(o, unittest.hasLength(2)); | |
| 6735 checkRecipient(o[0]); | |
| 6736 checkRecipient(o[1]); | |
| 6737 } | |
| 6738 | |
| 6739 core.int buildCounterReportDelivery = 0; | |
| 6740 buildReportDelivery() { | |
| 6741 var o = new api.ReportDelivery(); | |
| 6742 buildCounterReportDelivery++; | |
| 6743 if (buildCounterReportDelivery < 3) { | |
| 6744 o.emailOwner = true; | |
| 6745 o.emailOwnerDeliveryType = "foo"; | |
| 6746 o.message = "foo"; | |
| 6747 o.recipients = buildUnnamed1451(); | |
| 6748 } | |
| 6749 buildCounterReportDelivery--; | |
| 6750 return o; | |
| 6751 } | |
| 6752 | |
| 6753 checkReportDelivery(api.ReportDelivery o) { | |
| 6754 buildCounterReportDelivery++; | |
| 6755 if (buildCounterReportDelivery < 3) { | |
| 6756 unittest.expect(o.emailOwner, unittest.isTrue); | |
| 6757 unittest.expect(o.emailOwnerDeliveryType, unittest.equals('foo')); | |
| 6758 unittest.expect(o.message, unittest.equals('foo')); | |
| 6759 checkUnnamed1451(o.recipients); | |
| 6760 } | |
| 6761 buildCounterReportDelivery--; | |
| 6762 } | |
| 6763 | |
| 6764 buildUnnamed1452() { | |
| 6765 var o = new core.List<api.DimensionValue>(); | |
| 6766 o.add(buildDimensionValue()); | |
| 6767 o.add(buildDimensionValue()); | |
| 6768 return o; | |
| 6769 } | |
| 6770 | |
| 6771 checkUnnamed1452(core.List<api.DimensionValue> o) { | |
| 6772 unittest.expect(o, unittest.hasLength(2)); | |
| 6773 checkDimensionValue(o[0]); | |
| 6774 checkDimensionValue(o[1]); | |
| 6775 } | |
| 6776 | |
| 6777 buildUnnamed1453() { | |
| 6778 var o = new core.List<api.DimensionValue>(); | |
| 6779 o.add(buildDimensionValue()); | |
| 6780 o.add(buildDimensionValue()); | |
| 6781 return o; | |
| 6782 } | |
| 6783 | |
| 6784 checkUnnamed1453(core.List<api.DimensionValue> o) { | |
| 6785 unittest.expect(o, unittest.hasLength(2)); | |
| 6786 checkDimensionValue(o[0]); | |
| 6787 checkDimensionValue(o[1]); | |
| 6788 } | |
| 6789 | |
| 6790 buildUnnamed1454() { | |
| 6791 var o = new core.List<api.SortedDimension>(); | |
| 6792 o.add(buildSortedDimension()); | |
| 6793 o.add(buildSortedDimension()); | |
| 6794 return o; | |
| 6795 } | |
| 6796 | |
| 6797 checkUnnamed1454(core.List<api.SortedDimension> o) { | |
| 6798 unittest.expect(o, unittest.hasLength(2)); | |
| 6799 checkSortedDimension(o[0]); | |
| 6800 checkSortedDimension(o[1]); | |
| 6801 } | |
| 6802 | |
| 6803 buildUnnamed1455() { | |
| 6804 var o = new core.List<core.String>(); | |
| 6805 o.add("foo"); | |
| 6806 o.add("foo"); | |
| 6807 return o; | |
| 6808 } | |
| 6809 | |
| 6810 checkUnnamed1455(core.List<core.String> o) { | |
| 6811 unittest.expect(o, unittest.hasLength(2)); | |
| 6812 unittest.expect(o[0], unittest.equals('foo')); | |
| 6813 unittest.expect(o[1], unittest.equals('foo')); | |
| 6814 } | |
| 6815 | |
| 6816 core.int buildCounterReportFloodlightCriteriaReportProperties = 0; | |
| 6817 buildReportFloodlightCriteriaReportProperties() { | |
| 6818 var o = new api.ReportFloodlightCriteriaReportProperties(); | |
| 6819 buildCounterReportFloodlightCriteriaReportProperties++; | |
| 6820 if (buildCounterReportFloodlightCriteriaReportProperties < 3) { | |
| 6821 o.includeAttributedIPConversions = true; | |
| 6822 o.includeUnattributedCookieConversions = true; | |
| 6823 o.includeUnattributedIPConversions = true; | |
| 6824 } | |
| 6825 buildCounterReportFloodlightCriteriaReportProperties--; | |
| 6826 return o; | |
| 6827 } | |
| 6828 | |
| 6829 checkReportFloodlightCriteriaReportProperties(api.ReportFloodlightCriteriaReport
Properties o) { | |
| 6830 buildCounterReportFloodlightCriteriaReportProperties++; | |
| 6831 if (buildCounterReportFloodlightCriteriaReportProperties < 3) { | |
| 6832 unittest.expect(o.includeAttributedIPConversions, unittest.isTrue); | |
| 6833 unittest.expect(o.includeUnattributedCookieConversions, unittest.isTrue); | |
| 6834 unittest.expect(o.includeUnattributedIPConversions, unittest.isTrue); | |
| 6835 } | |
| 6836 buildCounterReportFloodlightCriteriaReportProperties--; | |
| 6837 } | |
| 6838 | |
| 6839 core.int buildCounterReportFloodlightCriteria = 0; | |
| 6840 buildReportFloodlightCriteria() { | |
| 6841 var o = new api.ReportFloodlightCriteria(); | |
| 6842 buildCounterReportFloodlightCriteria++; | |
| 6843 if (buildCounterReportFloodlightCriteria < 3) { | |
| 6844 o.customRichMediaEvents = buildUnnamed1452(); | |
| 6845 o.dateRange = buildDateRange(); | |
| 6846 o.dimensionFilters = buildUnnamed1453(); | |
| 6847 o.dimensions = buildUnnamed1454(); | |
| 6848 o.floodlightConfigId = buildDimensionValue(); | |
| 6849 o.metricNames = buildUnnamed1455(); | |
| 6850 o.reportProperties = buildReportFloodlightCriteriaReportProperties(); | |
| 6851 } | |
| 6852 buildCounterReportFloodlightCriteria--; | |
| 6853 return o; | |
| 6854 } | |
| 6855 | |
| 6856 checkReportFloodlightCriteria(api.ReportFloodlightCriteria o) { | |
| 6857 buildCounterReportFloodlightCriteria++; | |
| 6858 if (buildCounterReportFloodlightCriteria < 3) { | |
| 6859 checkUnnamed1452(o.customRichMediaEvents); | |
| 6860 checkDateRange(o.dateRange); | |
| 6861 checkUnnamed1453(o.dimensionFilters); | |
| 6862 checkUnnamed1454(o.dimensions); | |
| 6863 checkDimensionValue(o.floodlightConfigId); | |
| 6864 checkUnnamed1455(o.metricNames); | |
| 6865 checkReportFloodlightCriteriaReportProperties(o.reportProperties); | |
| 6866 } | |
| 6867 buildCounterReportFloodlightCriteria--; | |
| 6868 } | |
| 6869 | |
| 6870 buildUnnamed1456() { | |
| 6871 var o = new core.List<api.DimensionValue>(); | |
| 6872 o.add(buildDimensionValue()); | |
| 6873 o.add(buildDimensionValue()); | |
| 6874 return o; | |
| 6875 } | |
| 6876 | |
| 6877 checkUnnamed1456(core.List<api.DimensionValue> o) { | |
| 6878 unittest.expect(o, unittest.hasLength(2)); | |
| 6879 checkDimensionValue(o[0]); | |
| 6880 checkDimensionValue(o[1]); | |
| 6881 } | |
| 6882 | |
| 6883 buildUnnamed1457() { | |
| 6884 var o = new core.List<api.SortedDimension>(); | |
| 6885 o.add(buildSortedDimension()); | |
| 6886 o.add(buildSortedDimension()); | |
| 6887 return o; | |
| 6888 } | |
| 6889 | |
| 6890 checkUnnamed1457(core.List<api.SortedDimension> o) { | |
| 6891 unittest.expect(o, unittest.hasLength(2)); | |
| 6892 checkSortedDimension(o[0]); | |
| 6893 checkSortedDimension(o[1]); | |
| 6894 } | |
| 6895 | |
| 6896 buildUnnamed1458() { | |
| 6897 var o = new core.List<api.SortedDimension>(); | |
| 6898 o.add(buildSortedDimension()); | |
| 6899 o.add(buildSortedDimension()); | |
| 6900 return o; | |
| 6901 } | |
| 6902 | |
| 6903 checkUnnamed1458(core.List<api.SortedDimension> o) { | |
| 6904 unittest.expect(o, unittest.hasLength(2)); | |
| 6905 checkSortedDimension(o[0]); | |
| 6906 checkSortedDimension(o[1]); | |
| 6907 } | |
| 6908 | |
| 6909 buildUnnamed1459() { | |
| 6910 var o = new core.List<api.DimensionValue>(); | |
| 6911 o.add(buildDimensionValue()); | |
| 6912 o.add(buildDimensionValue()); | |
| 6913 return o; | |
| 6914 } | |
| 6915 | |
| 6916 checkUnnamed1459(core.List<api.DimensionValue> o) { | |
| 6917 unittest.expect(o, unittest.hasLength(2)); | |
| 6918 checkDimensionValue(o[0]); | |
| 6919 checkDimensionValue(o[1]); | |
| 6920 } | |
| 6921 | |
| 6922 buildUnnamed1460() { | |
| 6923 var o = new core.List<core.String>(); | |
| 6924 o.add("foo"); | |
| 6925 o.add("foo"); | |
| 6926 return o; | |
| 6927 } | |
| 6928 | |
| 6929 checkUnnamed1460(core.List<core.String> o) { | |
| 6930 unittest.expect(o, unittest.hasLength(2)); | |
| 6931 unittest.expect(o[0], unittest.equals('foo')); | |
| 6932 unittest.expect(o[1], unittest.equals('foo')); | |
| 6933 } | |
| 6934 | |
| 6935 buildUnnamed1461() { | |
| 6936 var o = new core.List<api.SortedDimension>(); | |
| 6937 o.add(buildSortedDimension()); | |
| 6938 o.add(buildSortedDimension()); | |
| 6939 return o; | |
| 6940 } | |
| 6941 | |
| 6942 checkUnnamed1461(core.List<api.SortedDimension> o) { | |
| 6943 unittest.expect(o, unittest.hasLength(2)); | |
| 6944 checkSortedDimension(o[0]); | |
| 6945 checkSortedDimension(o[1]); | |
| 6946 } | |
| 6947 | |
| 6948 core.int buildCounterReportPathToConversionCriteriaReportProperties = 0; | |
| 6949 buildReportPathToConversionCriteriaReportProperties() { | |
| 6950 var o = new api.ReportPathToConversionCriteriaReportProperties(); | |
| 6951 buildCounterReportPathToConversionCriteriaReportProperties++; | |
| 6952 if (buildCounterReportPathToConversionCriteriaReportProperties < 3) { | |
| 6953 o.clicksLookbackWindow = 42; | |
| 6954 o.impressionsLookbackWindow = 42; | |
| 6955 o.includeAttributedIPConversions = true; | |
| 6956 o.includeUnattributedCookieConversions = true; | |
| 6957 o.includeUnattributedIPConversions = true; | |
| 6958 o.maximumClickInteractions = 42; | |
| 6959 o.maximumImpressionInteractions = 42; | |
| 6960 o.maximumInteractionGap = 42; | |
| 6961 o.pivotOnInteractionPath = true; | |
| 6962 } | |
| 6963 buildCounterReportPathToConversionCriteriaReportProperties--; | |
| 6964 return o; | |
| 6965 } | |
| 6966 | |
| 6967 checkReportPathToConversionCriteriaReportProperties(api.ReportPathToConversionCr
iteriaReportProperties o) { | |
| 6968 buildCounterReportPathToConversionCriteriaReportProperties++; | |
| 6969 if (buildCounterReportPathToConversionCriteriaReportProperties < 3) { | |
| 6970 unittest.expect(o.clicksLookbackWindow, unittest.equals(42)); | |
| 6971 unittest.expect(o.impressionsLookbackWindow, unittest.equals(42)); | |
| 6972 unittest.expect(o.includeAttributedIPConversions, unittest.isTrue); | |
| 6973 unittest.expect(o.includeUnattributedCookieConversions, unittest.isTrue); | |
| 6974 unittest.expect(o.includeUnattributedIPConversions, unittest.isTrue); | |
| 6975 unittest.expect(o.maximumClickInteractions, unittest.equals(42)); | |
| 6976 unittest.expect(o.maximumImpressionInteractions, unittest.equals(42)); | |
| 6977 unittest.expect(o.maximumInteractionGap, unittest.equals(42)); | |
| 6978 unittest.expect(o.pivotOnInteractionPath, unittest.isTrue); | |
| 6979 } | |
| 6980 buildCounterReportPathToConversionCriteriaReportProperties--; | |
| 6981 } | |
| 6982 | |
| 6983 core.int buildCounterReportPathToConversionCriteria = 0; | |
| 6984 buildReportPathToConversionCriteria() { | |
| 6985 var o = new api.ReportPathToConversionCriteria(); | |
| 6986 buildCounterReportPathToConversionCriteria++; | |
| 6987 if (buildCounterReportPathToConversionCriteria < 3) { | |
| 6988 o.activityFilters = buildUnnamed1456(); | |
| 6989 o.conversionDimensions = buildUnnamed1457(); | |
| 6990 o.customFloodlightVariables = buildUnnamed1458(); | |
| 6991 o.customRichMediaEvents = buildUnnamed1459(); | |
| 6992 o.dateRange = buildDateRange(); | |
| 6993 o.floodlightConfigId = buildDimensionValue(); | |
| 6994 o.metricNames = buildUnnamed1460(); | |
| 6995 o.perInteractionDimensions = buildUnnamed1461(); | |
| 6996 o.reportProperties = buildReportPathToConversionCriteriaReportProperties(); | |
| 6997 } | |
| 6998 buildCounterReportPathToConversionCriteria--; | |
| 6999 return o; | |
| 7000 } | |
| 7001 | |
| 7002 checkReportPathToConversionCriteria(api.ReportPathToConversionCriteria o) { | |
| 7003 buildCounterReportPathToConversionCriteria++; | |
| 7004 if (buildCounterReportPathToConversionCriteria < 3) { | |
| 7005 checkUnnamed1456(o.activityFilters); | |
| 7006 checkUnnamed1457(o.conversionDimensions); | |
| 7007 checkUnnamed1458(o.customFloodlightVariables); | |
| 7008 checkUnnamed1459(o.customRichMediaEvents); | |
| 7009 checkDateRange(o.dateRange); | |
| 7010 checkDimensionValue(o.floodlightConfigId); | |
| 7011 checkUnnamed1460(o.metricNames); | |
| 7012 checkUnnamed1461(o.perInteractionDimensions); | |
| 7013 checkReportPathToConversionCriteriaReportProperties(o.reportProperties); | |
| 7014 } | |
| 7015 buildCounterReportPathToConversionCriteria--; | |
| 7016 } | |
| 7017 | |
| 7018 buildUnnamed1462() { | |
| 7019 var o = new core.List<api.DimensionValue>(); | |
| 7020 o.add(buildDimensionValue()); | |
| 7021 o.add(buildDimensionValue()); | |
| 7022 return o; | |
| 7023 } | |
| 7024 | |
| 7025 checkUnnamed1462(core.List<api.DimensionValue> o) { | |
| 7026 unittest.expect(o, unittest.hasLength(2)); | |
| 7027 checkDimensionValue(o[0]); | |
| 7028 checkDimensionValue(o[1]); | |
| 7029 } | |
| 7030 | |
| 7031 buildUnnamed1463() { | |
| 7032 var o = new core.List<api.SortedDimension>(); | |
| 7033 o.add(buildSortedDimension()); | |
| 7034 o.add(buildSortedDimension()); | |
| 7035 return o; | |
| 7036 } | |
| 7037 | |
| 7038 checkUnnamed1463(core.List<api.SortedDimension> o) { | |
| 7039 unittest.expect(o, unittest.hasLength(2)); | |
| 7040 checkSortedDimension(o[0]); | |
| 7041 checkSortedDimension(o[1]); | |
| 7042 } | |
| 7043 | |
| 7044 buildUnnamed1464() { | |
| 7045 var o = new core.List<core.String>(); | |
| 7046 o.add("foo"); | |
| 7047 o.add("foo"); | |
| 7048 return o; | |
| 7049 } | |
| 7050 | |
| 7051 checkUnnamed1464(core.List<core.String> o) { | |
| 7052 unittest.expect(o, unittest.hasLength(2)); | |
| 7053 unittest.expect(o[0], unittest.equals('foo')); | |
| 7054 unittest.expect(o[1], unittest.equals('foo')); | |
| 7055 } | |
| 7056 | |
| 7057 buildUnnamed1465() { | |
| 7058 var o = new core.List<core.String>(); | |
| 7059 o.add("foo"); | |
| 7060 o.add("foo"); | |
| 7061 return o; | |
| 7062 } | |
| 7063 | |
| 7064 checkUnnamed1465(core.List<core.String> o) { | |
| 7065 unittest.expect(o, unittest.hasLength(2)); | |
| 7066 unittest.expect(o[0], unittest.equals('foo')); | |
| 7067 unittest.expect(o[1], unittest.equals('foo')); | |
| 7068 } | |
| 7069 | |
| 7070 core.int buildCounterReportReachCriteria = 0; | |
| 7071 buildReportReachCriteria() { | |
| 7072 var o = new api.ReportReachCriteria(); | |
| 7073 buildCounterReportReachCriteria++; | |
| 7074 if (buildCounterReportReachCriteria < 3) { | |
| 7075 o.activities = buildActivities(); | |
| 7076 o.customRichMediaEvents = buildCustomRichMediaEvents(); | |
| 7077 o.dateRange = buildDateRange(); | |
| 7078 o.dimensionFilters = buildUnnamed1462(); | |
| 7079 o.dimensions = buildUnnamed1463(); | |
| 7080 o.enableAllDimensionCombinations = true; | |
| 7081 o.metricNames = buildUnnamed1464(); | |
| 7082 o.reachByFrequencyMetricNames = buildUnnamed1465(); | |
| 7083 } | |
| 7084 buildCounterReportReachCriteria--; | |
| 7085 return o; | |
| 7086 } | |
| 7087 | |
| 7088 checkReportReachCriteria(api.ReportReachCriteria o) { | |
| 7089 buildCounterReportReachCriteria++; | |
| 7090 if (buildCounterReportReachCriteria < 3) { | |
| 7091 checkActivities(o.activities); | |
| 7092 checkCustomRichMediaEvents(o.customRichMediaEvents); | |
| 7093 checkDateRange(o.dateRange); | |
| 7094 checkUnnamed1462(o.dimensionFilters); | |
| 7095 checkUnnamed1463(o.dimensions); | |
| 7096 unittest.expect(o.enableAllDimensionCombinations, unittest.isTrue); | |
| 7097 checkUnnamed1464(o.metricNames); | |
| 7098 checkUnnamed1465(o.reachByFrequencyMetricNames); | |
| 7099 } | |
| 7100 buildCounterReportReachCriteria--; | |
| 7101 } | |
| 7102 | |
| 7103 buildUnnamed1466() { | |
| 7104 var o = new core.List<core.String>(); | |
| 7105 o.add("foo"); | |
| 7106 o.add("foo"); | |
| 7107 return o; | |
| 7108 } | |
| 7109 | |
| 7110 checkUnnamed1466(core.List<core.String> o) { | |
| 7111 unittest.expect(o, unittest.hasLength(2)); | |
| 7112 unittest.expect(o[0], unittest.equals('foo')); | |
| 7113 unittest.expect(o[1], unittest.equals('foo')); | |
| 7114 } | |
| 7115 | |
| 7116 core.int buildCounterReportSchedule = 0; | |
| 7117 buildReportSchedule() { | |
| 7118 var o = new api.ReportSchedule(); | |
| 7119 buildCounterReportSchedule++; | |
| 7120 if (buildCounterReportSchedule < 3) { | |
| 7121 o.active = true; | |
| 7122 o.every = 42; | |
| 7123 o.expirationDate = core.DateTime.parse("2002-02-27T14:01:02Z"); | |
| 7124 o.repeats = "foo"; | |
| 7125 o.repeatsOnWeekDays = buildUnnamed1466(); | |
| 7126 o.runsOnDayOfMonth = "foo"; | |
| 7127 o.startDate = core.DateTime.parse("2002-02-27T14:01:02Z"); | |
| 7128 } | |
| 7129 buildCounterReportSchedule--; | |
| 7130 return o; | |
| 7131 } | |
| 7132 | |
| 7133 checkReportSchedule(api.ReportSchedule o) { | |
| 7134 buildCounterReportSchedule++; | |
| 7135 if (buildCounterReportSchedule < 3) { | |
| 7136 unittest.expect(o.active, unittest.isTrue); | |
| 7137 unittest.expect(o.every, unittest.equals(42)); | |
| 7138 unittest.expect(o.expirationDate, unittest.equals(core.DateTime.parse("2002-
02-27T00:00:00"))); | |
| 7139 unittest.expect(o.repeats, unittest.equals('foo')); | |
| 7140 checkUnnamed1466(o.repeatsOnWeekDays); | |
| 7141 unittest.expect(o.runsOnDayOfMonth, unittest.equals('foo')); | |
| 7142 unittest.expect(o.startDate, unittest.equals(core.DateTime.parse("2002-02-27
T00:00:00"))); | |
| 7143 } | |
| 7144 buildCounterReportSchedule--; | |
| 7145 } | |
| 7146 | |
| 7147 core.int buildCounterReport = 0; | |
| 7148 buildReport() { | |
| 7149 var o = new api.Report(); | |
| 7150 buildCounterReport++; | |
| 7151 if (buildCounterReport < 3) { | |
| 7152 o.accountId = "foo"; | |
| 7153 o.criteria = buildReportCriteria(); | |
| 7154 o.crossDimensionReachCriteria = buildReportCrossDimensionReachCriteria(); | |
| 7155 o.delivery = buildReportDelivery(); | |
| 7156 o.etag = "foo"; | |
| 7157 o.fileName = "foo"; | |
| 7158 o.floodlightCriteria = buildReportFloodlightCriteria(); | |
| 7159 o.format = "foo"; | |
| 7160 o.id = "foo"; | |
| 7161 o.kind = "foo"; | |
| 7162 o.lastModifiedTime = "foo"; | |
| 7163 o.name = "foo"; | |
| 7164 o.ownerProfileId = "foo"; | |
| 7165 o.pathToConversionCriteria = buildReportPathToConversionCriteria(); | |
| 7166 o.reachCriteria = buildReportReachCriteria(); | |
| 7167 o.schedule = buildReportSchedule(); | |
| 7168 o.subAccountId = "foo"; | |
| 7169 o.type = "foo"; | |
| 7170 } | |
| 7171 buildCounterReport--; | |
| 7172 return o; | |
| 7173 } | |
| 7174 | |
| 7175 checkReport(api.Report o) { | |
| 7176 buildCounterReport++; | |
| 7177 if (buildCounterReport < 3) { | |
| 7178 unittest.expect(o.accountId, unittest.equals('foo')); | |
| 7179 checkReportCriteria(o.criteria); | |
| 7180 checkReportCrossDimensionReachCriteria(o.crossDimensionReachCriteria); | |
| 7181 checkReportDelivery(o.delivery); | |
| 7182 unittest.expect(o.etag, unittest.equals('foo')); | |
| 7183 unittest.expect(o.fileName, unittest.equals('foo')); | |
| 7184 checkReportFloodlightCriteria(o.floodlightCriteria); | |
| 7185 unittest.expect(o.format, unittest.equals('foo')); | |
| 7186 unittest.expect(o.id, unittest.equals('foo')); | |
| 7187 unittest.expect(o.kind, unittest.equals('foo')); | |
| 7188 unittest.expect(o.lastModifiedTime, unittest.equals('foo')); | |
| 7189 unittest.expect(o.name, unittest.equals('foo')); | |
| 7190 unittest.expect(o.ownerProfileId, unittest.equals('foo')); | |
| 7191 checkReportPathToConversionCriteria(o.pathToConversionCriteria); | |
| 7192 checkReportReachCriteria(o.reachCriteria); | |
| 7193 checkReportSchedule(o.schedule); | |
| 7194 unittest.expect(o.subAccountId, unittest.equals('foo')); | |
| 7195 unittest.expect(o.type, unittest.equals('foo')); | |
| 7196 } | |
| 7197 buildCounterReport--; | |
| 7198 } | |
| 7199 | |
| 7200 buildUnnamed1467() { | |
| 7201 var o = new core.List<api.Dimension>(); | |
| 7202 o.add(buildDimension()); | |
| 7203 o.add(buildDimension()); | |
| 7204 return o; | |
| 7205 } | |
| 7206 | |
| 7207 checkUnnamed1467(core.List<api.Dimension> o) { | |
| 7208 unittest.expect(o, unittest.hasLength(2)); | |
| 7209 checkDimension(o[0]); | |
| 7210 checkDimension(o[1]); | |
| 7211 } | |
| 7212 | |
| 7213 buildUnnamed1468() { | |
| 7214 var o = new core.List<api.Dimension>(); | |
| 7215 o.add(buildDimension()); | |
| 7216 o.add(buildDimension()); | |
| 7217 return o; | |
| 7218 } | |
| 7219 | |
| 7220 checkUnnamed1468(core.List<api.Dimension> o) { | |
| 7221 unittest.expect(o, unittest.hasLength(2)); | |
| 7222 checkDimension(o[0]); | |
| 7223 checkDimension(o[1]); | |
| 7224 } | |
| 7225 | |
| 7226 buildUnnamed1469() { | |
| 7227 var o = new core.List<api.Metric>(); | |
| 7228 o.add(buildMetric()); | |
| 7229 o.add(buildMetric()); | |
| 7230 return o; | |
| 7231 } | |
| 7232 | |
| 7233 checkUnnamed1469(core.List<api.Metric> o) { | |
| 7234 unittest.expect(o, unittest.hasLength(2)); | |
| 7235 checkMetric(o[0]); | |
| 7236 checkMetric(o[1]); | |
| 7237 } | |
| 7238 | |
| 7239 buildUnnamed1470() { | |
| 7240 var o = new core.List<api.Metric>(); | |
| 7241 o.add(buildMetric()); | |
| 7242 o.add(buildMetric()); | |
| 7243 return o; | |
| 7244 } | |
| 7245 | |
| 7246 checkUnnamed1470(core.List<api.Metric> o) { | |
| 7247 unittest.expect(o, unittest.hasLength(2)); | |
| 7248 checkMetric(o[0]); | |
| 7249 checkMetric(o[1]); | |
| 7250 } | |
| 7251 | |
| 7252 core.int buildCounterReportCompatibleFields = 0; | |
| 7253 buildReportCompatibleFields() { | |
| 7254 var o = new api.ReportCompatibleFields(); | |
| 7255 buildCounterReportCompatibleFields++; | |
| 7256 if (buildCounterReportCompatibleFields < 3) { | |
| 7257 o.dimensionFilters = buildUnnamed1467(); | |
| 7258 o.dimensions = buildUnnamed1468(); | |
| 7259 o.kind = "foo"; | |
| 7260 o.metrics = buildUnnamed1469(); | |
| 7261 o.pivotedActivityMetrics = buildUnnamed1470(); | |
| 7262 } | |
| 7263 buildCounterReportCompatibleFields--; | |
| 7264 return o; | |
| 7265 } | |
| 7266 | |
| 7267 checkReportCompatibleFields(api.ReportCompatibleFields o) { | |
| 7268 buildCounterReportCompatibleFields++; | |
| 7269 if (buildCounterReportCompatibleFields < 3) { | |
| 7270 checkUnnamed1467(o.dimensionFilters); | |
| 7271 checkUnnamed1468(o.dimensions); | |
| 7272 unittest.expect(o.kind, unittest.equals('foo')); | |
| 7273 checkUnnamed1469(o.metrics); | |
| 7274 checkUnnamed1470(o.pivotedActivityMetrics); | |
| 7275 } | |
| 7276 buildCounterReportCompatibleFields--; | |
| 7277 } | |
| 7278 | |
| 7279 buildUnnamed1471() { | |
| 7280 var o = new core.List<api.Report>(); | |
| 7281 o.add(buildReport()); | |
| 7282 o.add(buildReport()); | |
| 7283 return o; | |
| 7284 } | |
| 7285 | |
| 7286 checkUnnamed1471(core.List<api.Report> o) { | |
| 7287 unittest.expect(o, unittest.hasLength(2)); | |
| 7288 checkReport(o[0]); | |
| 7289 checkReport(o[1]); | |
| 7290 } | |
| 7291 | |
| 7292 core.int buildCounterReportList = 0; | |
| 7293 buildReportList() { | |
| 7294 var o = new api.ReportList(); | |
| 7295 buildCounterReportList++; | |
| 7296 if (buildCounterReportList < 3) { | |
| 7297 o.etag = "foo"; | |
| 7298 o.items = buildUnnamed1471(); | |
| 7299 o.kind = "foo"; | |
| 7300 o.nextPageToken = "foo"; | |
| 7301 } | |
| 7302 buildCounterReportList--; | |
| 7303 return o; | |
| 7304 } | |
| 7305 | |
| 7306 checkReportList(api.ReportList o) { | |
| 7307 buildCounterReportList++; | |
| 7308 if (buildCounterReportList < 3) { | |
| 7309 unittest.expect(o.etag, unittest.equals('foo')); | |
| 7310 checkUnnamed1471(o.items); | |
| 7311 unittest.expect(o.kind, unittest.equals('foo')); | |
| 7312 unittest.expect(o.nextPageToken, unittest.equals('foo')); | |
| 7313 } | |
| 7314 buildCounterReportList--; | |
| 7315 } | |
| 7316 | |
| 7317 core.int buildCounterReportsConfiguration = 0; | |
| 7318 buildReportsConfiguration() { | |
| 7319 var o = new api.ReportsConfiguration(); | |
| 7320 buildCounterReportsConfiguration++; | |
| 7321 if (buildCounterReportsConfiguration < 3) { | |
| 7322 o.exposureToConversionEnabled = true; | |
| 7323 o.lookbackConfiguration = buildLookbackConfiguration(); | |
| 7324 o.reportGenerationTimeZoneId = "foo"; | |
| 7325 } | |
| 7326 buildCounterReportsConfiguration--; | |
| 7327 return o; | |
| 7328 } | |
| 7329 | |
| 7330 checkReportsConfiguration(api.ReportsConfiguration o) { | |
| 7331 buildCounterReportsConfiguration++; | |
| 7332 if (buildCounterReportsConfiguration < 3) { | |
| 7333 unittest.expect(o.exposureToConversionEnabled, unittest.isTrue); | |
| 7334 checkLookbackConfiguration(o.lookbackConfiguration); | |
| 7335 unittest.expect(o.reportGenerationTimeZoneId, unittest.equals('foo')); | |
| 7336 } | |
| 7337 buildCounterReportsConfiguration--; | |
| 7338 } | |
| 7339 | |
| 7340 core.int buildCounterRichMediaExitOverride = 0; | |
| 7341 buildRichMediaExitOverride() { | |
| 7342 var o = new api.RichMediaExitOverride(); | |
| 7343 buildCounterRichMediaExitOverride++; | |
| 7344 if (buildCounterRichMediaExitOverride < 3) { | |
| 7345 o.customExitUrl = "foo"; | |
| 7346 o.exitId = "foo"; | |
| 7347 o.useCustomExitUrl = true; | |
| 7348 } | |
| 7349 buildCounterRichMediaExitOverride--; | |
| 7350 return o; | |
| 7351 } | |
| 7352 | |
| 7353 checkRichMediaExitOverride(api.RichMediaExitOverride o) { | |
| 7354 buildCounterRichMediaExitOverride++; | |
| 7355 if (buildCounterRichMediaExitOverride < 3) { | |
| 7356 unittest.expect(o.customExitUrl, unittest.equals('foo')); | |
| 7357 unittest.expect(o.exitId, unittest.equals('foo')); | |
| 7358 unittest.expect(o.useCustomExitUrl, unittest.isTrue); | |
| 7359 } | |
| 7360 buildCounterRichMediaExitOverride--; | |
| 7361 } | |
| 7362 | |
| 7363 buildUnnamed1472() { | |
| 7364 var o = new core.List<api.SiteContact>(); | |
| 7365 o.add(buildSiteContact()); | |
| 7366 o.add(buildSiteContact()); | |
| 7367 return o; | |
| 7368 } | |
| 7369 | |
| 7370 checkUnnamed1472(core.List<api.SiteContact> o) { | |
| 7371 unittest.expect(o, unittest.hasLength(2)); | |
| 7372 checkSiteContact(o[0]); | |
| 7373 checkSiteContact(o[1]); | |
| 7374 } | |
| 7375 | |
| 7376 core.int buildCounterSite = 0; | |
| 7377 buildSite() { | |
| 7378 var o = new api.Site(); | |
| 7379 buildCounterSite++; | |
| 7380 if (buildCounterSite < 3) { | |
| 7381 o.accountId = "foo"; | |
| 7382 o.approved = true; | |
| 7383 o.directorySiteId = "foo"; | |
| 7384 o.directorySiteIdDimensionValue = buildDimensionValue(); | |
| 7385 o.id = "foo"; | |
| 7386 o.idDimensionValue = buildDimensionValue(); | |
| 7387 o.keyName = "foo"; | |
| 7388 o.kind = "foo"; | |
| 7389 o.name = "foo"; | |
| 7390 o.siteContacts = buildUnnamed1472(); | |
| 7391 o.siteSettings = buildSiteSettings(); | |
| 7392 o.subaccountId = "foo"; | |
| 7393 } | |
| 7394 buildCounterSite--; | |
| 7395 return o; | |
| 7396 } | |
| 7397 | |
| 7398 checkSite(api.Site o) { | |
| 7399 buildCounterSite++; | |
| 7400 if (buildCounterSite < 3) { | |
| 7401 unittest.expect(o.accountId, unittest.equals('foo')); | |
| 7402 unittest.expect(o.approved, unittest.isTrue); | |
| 7403 unittest.expect(o.directorySiteId, unittest.equals('foo')); | |
| 7404 checkDimensionValue(o.directorySiteIdDimensionValue); | |
| 7405 unittest.expect(o.id, unittest.equals('foo')); | |
| 7406 checkDimensionValue(o.idDimensionValue); | |
| 7407 unittest.expect(o.keyName, unittest.equals('foo')); | |
| 7408 unittest.expect(o.kind, unittest.equals('foo')); | |
| 7409 unittest.expect(o.name, unittest.equals('foo')); | |
| 7410 checkUnnamed1472(o.siteContacts); | |
| 7411 checkSiteSettings(o.siteSettings); | |
| 7412 unittest.expect(o.subaccountId, unittest.equals('foo')); | |
| 7413 } | |
| 7414 buildCounterSite--; | |
| 7415 } | |
| 7416 | |
| 7417 core.int buildCounterSiteContact = 0; | |
| 7418 buildSiteContact() { | |
| 7419 var o = new api.SiteContact(); | |
| 7420 buildCounterSiteContact++; | |
| 7421 if (buildCounterSiteContact < 3) { | |
| 7422 o.address = "foo"; | |
| 7423 o.contactType = "foo"; | |
| 7424 o.email = "foo"; | |
| 7425 o.firstName = "foo"; | |
| 7426 o.id = "foo"; | |
| 7427 o.lastName = "foo"; | |
| 7428 o.phone = "foo"; | |
| 7429 o.title = "foo"; | |
| 7430 } | |
| 7431 buildCounterSiteContact--; | |
| 7432 return o; | |
| 7433 } | |
| 7434 | |
| 7435 checkSiteContact(api.SiteContact o) { | |
| 7436 buildCounterSiteContact++; | |
| 7437 if (buildCounterSiteContact < 3) { | |
| 7438 unittest.expect(o.address, unittest.equals('foo')); | |
| 7439 unittest.expect(o.contactType, unittest.equals('foo')); | |
| 7440 unittest.expect(o.email, unittest.equals('foo')); | |
| 7441 unittest.expect(o.firstName, unittest.equals('foo')); | |
| 7442 unittest.expect(o.id, unittest.equals('foo')); | |
| 7443 unittest.expect(o.lastName, unittest.equals('foo')); | |
| 7444 unittest.expect(o.phone, unittest.equals('foo')); | |
| 7445 unittest.expect(o.title, unittest.equals('foo')); | |
| 7446 } | |
| 7447 buildCounterSiteContact--; | |
| 7448 } | |
| 7449 | |
| 7450 core.int buildCounterSiteSettings = 0; | |
| 7451 buildSiteSettings() { | |
| 7452 var o = new api.SiteSettings(); | |
| 7453 buildCounterSiteSettings++; | |
| 7454 if (buildCounterSiteSettings < 3) { | |
| 7455 o.activeViewOptOut = true; | |
| 7456 o.creativeSettings = buildCreativeSettings(); | |
| 7457 o.disableBrandSafeAds = true; | |
| 7458 o.disableNewCookie = true; | |
| 7459 o.lookbackConfiguration = buildLookbackConfiguration(); | |
| 7460 o.tagSetting = buildTagSetting(); | |
| 7461 o.videoActiveViewOptOut = true; | |
| 7462 } | |
| 7463 buildCounterSiteSettings--; | |
| 7464 return o; | |
| 7465 } | |
| 7466 | |
| 7467 checkSiteSettings(api.SiteSettings o) { | |
| 7468 buildCounterSiteSettings++; | |
| 7469 if (buildCounterSiteSettings < 3) { | |
| 7470 unittest.expect(o.activeViewOptOut, unittest.isTrue); | |
| 7471 checkCreativeSettings(o.creativeSettings); | |
| 7472 unittest.expect(o.disableBrandSafeAds, unittest.isTrue); | |
| 7473 unittest.expect(o.disableNewCookie, unittest.isTrue); | |
| 7474 checkLookbackConfiguration(o.lookbackConfiguration); | |
| 7475 checkTagSetting(o.tagSetting); | |
| 7476 unittest.expect(o.videoActiveViewOptOut, unittest.isTrue); | |
| 7477 } | |
| 7478 buildCounterSiteSettings--; | |
| 7479 } | |
| 7480 | |
| 7481 buildUnnamed1473() { | |
| 7482 var o = new core.List<api.Site>(); | |
| 7483 o.add(buildSite()); | |
| 7484 o.add(buildSite()); | |
| 7485 return o; | |
| 7486 } | |
| 7487 | |
| 7488 checkUnnamed1473(core.List<api.Site> o) { | |
| 7489 unittest.expect(o, unittest.hasLength(2)); | |
| 7490 checkSite(o[0]); | |
| 7491 checkSite(o[1]); | |
| 7492 } | |
| 7493 | |
| 7494 core.int buildCounterSitesListResponse = 0; | |
| 7495 buildSitesListResponse() { | |
| 7496 var o = new api.SitesListResponse(); | |
| 7497 buildCounterSitesListResponse++; | |
| 7498 if (buildCounterSitesListResponse < 3) { | |
| 7499 o.kind = "foo"; | |
| 7500 o.nextPageToken = "foo"; | |
| 7501 o.sites = buildUnnamed1473(); | |
| 7502 } | |
| 7503 buildCounterSitesListResponse--; | |
| 7504 return o; | |
| 7505 } | |
| 7506 | |
| 7507 checkSitesListResponse(api.SitesListResponse o) { | |
| 7508 buildCounterSitesListResponse++; | |
| 7509 if (buildCounterSitesListResponse < 3) { | |
| 7510 unittest.expect(o.kind, unittest.equals('foo')); | |
| 7511 unittest.expect(o.nextPageToken, unittest.equals('foo')); | |
| 7512 checkUnnamed1473(o.sites); | |
| 7513 } | |
| 7514 buildCounterSitesListResponse--; | |
| 7515 } | |
| 7516 | |
| 7517 core.int buildCounterSize = 0; | |
| 7518 buildSize() { | |
| 7519 var o = new api.Size(); | |
| 7520 buildCounterSize++; | |
| 7521 if (buildCounterSize < 3) { | |
| 7522 o.height = 42; | |
| 7523 o.iab = true; | |
| 7524 o.id = "foo"; | |
| 7525 o.kind = "foo"; | |
| 7526 o.width = 42; | |
| 7527 } | |
| 7528 buildCounterSize--; | |
| 7529 return o; | |
| 7530 } | |
| 7531 | |
| 7532 checkSize(api.Size o) { | |
| 7533 buildCounterSize++; | |
| 7534 if (buildCounterSize < 3) { | |
| 7535 unittest.expect(o.height, unittest.equals(42)); | |
| 7536 unittest.expect(o.iab, unittest.isTrue); | |
| 7537 unittest.expect(o.id, unittest.equals('foo')); | |
| 7538 unittest.expect(o.kind, unittest.equals('foo')); | |
| 7539 unittest.expect(o.width, unittest.equals(42)); | |
| 7540 } | |
| 7541 buildCounterSize--; | |
| 7542 } | |
| 7543 | |
| 7544 buildUnnamed1474() { | |
| 7545 var o = new core.List<api.Size>(); | |
| 7546 o.add(buildSize()); | |
| 7547 o.add(buildSize()); | |
| 7548 return o; | |
| 7549 } | |
| 7550 | |
| 7551 checkUnnamed1474(core.List<api.Size> o) { | |
| 7552 unittest.expect(o, unittest.hasLength(2)); | |
| 7553 checkSize(o[0]); | |
| 7554 checkSize(o[1]); | |
| 7555 } | |
| 7556 | |
| 7557 core.int buildCounterSizesListResponse = 0; | |
| 7558 buildSizesListResponse() { | |
| 7559 var o = new api.SizesListResponse(); | |
| 7560 buildCounterSizesListResponse++; | |
| 7561 if (buildCounterSizesListResponse < 3) { | |
| 7562 o.kind = "foo"; | |
| 7563 o.sizes = buildUnnamed1474(); | |
| 7564 } | |
| 7565 buildCounterSizesListResponse--; | |
| 7566 return o; | |
| 7567 } | |
| 7568 | |
| 7569 checkSizesListResponse(api.SizesListResponse o) { | |
| 7570 buildCounterSizesListResponse++; | |
| 7571 if (buildCounterSizesListResponse < 3) { | |
| 7572 unittest.expect(o.kind, unittest.equals('foo')); | |
| 7573 checkUnnamed1474(o.sizes); | |
| 7574 } | |
| 7575 buildCounterSizesListResponse--; | |
| 7576 } | |
| 7577 | |
| 7578 core.int buildCounterSortedDimension = 0; | |
| 7579 buildSortedDimension() { | |
| 7580 var o = new api.SortedDimension(); | |
| 7581 buildCounterSortedDimension++; | |
| 7582 if (buildCounterSortedDimension < 3) { | |
| 7583 o.kind = "foo"; | |
| 7584 o.name = "foo"; | |
| 7585 o.sortOrder = "foo"; | |
| 7586 } | |
| 7587 buildCounterSortedDimension--; | |
| 7588 return o; | |
| 7589 } | |
| 7590 | |
| 7591 checkSortedDimension(api.SortedDimension o) { | |
| 7592 buildCounterSortedDimension++; | |
| 7593 if (buildCounterSortedDimension < 3) { | |
| 7594 unittest.expect(o.kind, unittest.equals('foo')); | |
| 7595 unittest.expect(o.name, unittest.equals('foo')); | |
| 7596 unittest.expect(o.sortOrder, unittest.equals('foo')); | |
| 7597 } | |
| 7598 buildCounterSortedDimension--; | |
| 7599 } | |
| 7600 | |
| 7601 buildUnnamed1475() { | |
| 7602 var o = new core.List<core.String>(); | |
| 7603 o.add("foo"); | |
| 7604 o.add("foo"); | |
| 7605 return o; | |
| 7606 } | |
| 7607 | |
| 7608 checkUnnamed1475(core.List<core.String> o) { | |
| 7609 unittest.expect(o, unittest.hasLength(2)); | |
| 7610 unittest.expect(o[0], unittest.equals('foo')); | |
| 7611 unittest.expect(o[1], unittest.equals('foo')); | |
| 7612 } | |
| 7613 | |
| 7614 core.int buildCounterSubaccount = 0; | |
| 7615 buildSubaccount() { | |
| 7616 var o = new api.Subaccount(); | |
| 7617 buildCounterSubaccount++; | |
| 7618 if (buildCounterSubaccount < 3) { | |
| 7619 o.accountId = "foo"; | |
| 7620 o.availablePermissionIds = buildUnnamed1475(); | |
| 7621 o.id = "foo"; | |
| 7622 o.kind = "foo"; | |
| 7623 o.name = "foo"; | |
| 7624 } | |
| 7625 buildCounterSubaccount--; | |
| 7626 return o; | |
| 7627 } | |
| 7628 | |
| 7629 checkSubaccount(api.Subaccount o) { | |
| 7630 buildCounterSubaccount++; | |
| 7631 if (buildCounterSubaccount < 3) { | |
| 7632 unittest.expect(o.accountId, unittest.equals('foo')); | |
| 7633 checkUnnamed1475(o.availablePermissionIds); | |
| 7634 unittest.expect(o.id, unittest.equals('foo')); | |
| 7635 unittest.expect(o.kind, unittest.equals('foo')); | |
| 7636 unittest.expect(o.name, unittest.equals('foo')); | |
| 7637 } | |
| 7638 buildCounterSubaccount--; | |
| 7639 } | |
| 7640 | |
| 7641 buildUnnamed1476() { | |
| 7642 var o = new core.List<api.Subaccount>(); | |
| 7643 o.add(buildSubaccount()); | |
| 7644 o.add(buildSubaccount()); | |
| 7645 return o; | |
| 7646 } | |
| 7647 | |
| 7648 checkUnnamed1476(core.List<api.Subaccount> o) { | |
| 7649 unittest.expect(o, unittest.hasLength(2)); | |
| 7650 checkSubaccount(o[0]); | |
| 7651 checkSubaccount(o[1]); | |
| 7652 } | |
| 7653 | |
| 7654 core.int buildCounterSubaccountsListResponse = 0; | |
| 7655 buildSubaccountsListResponse() { | |
| 7656 var o = new api.SubaccountsListResponse(); | |
| 7657 buildCounterSubaccountsListResponse++; | |
| 7658 if (buildCounterSubaccountsListResponse < 3) { | |
| 7659 o.kind = "foo"; | |
| 7660 o.nextPageToken = "foo"; | |
| 7661 o.subaccounts = buildUnnamed1476(); | |
| 7662 } | |
| 7663 buildCounterSubaccountsListResponse--; | |
| 7664 return o; | |
| 7665 } | |
| 7666 | |
| 7667 checkSubaccountsListResponse(api.SubaccountsListResponse o) { | |
| 7668 buildCounterSubaccountsListResponse++; | |
| 7669 if (buildCounterSubaccountsListResponse < 3) { | |
| 7670 unittest.expect(o.kind, unittest.equals('foo')); | |
| 7671 unittest.expect(o.nextPageToken, unittest.equals('foo')); | |
| 7672 checkUnnamed1476(o.subaccounts); | |
| 7673 } | |
| 7674 buildCounterSubaccountsListResponse--; | |
| 7675 } | |
| 7676 | |
| 7677 core.int buildCounterTagData = 0; | |
| 7678 buildTagData() { | |
| 7679 var o = new api.TagData(); | |
| 7680 buildCounterTagData++; | |
| 7681 if (buildCounterTagData < 3) { | |
| 7682 o.adId = "foo"; | |
| 7683 o.clickTag = "foo"; | |
| 7684 o.creativeId = "foo"; | |
| 7685 o.format = "foo"; | |
| 7686 o.impressionTag = "foo"; | |
| 7687 } | |
| 7688 buildCounterTagData--; | |
| 7689 return o; | |
| 7690 } | |
| 7691 | |
| 7692 checkTagData(api.TagData o) { | |
| 7693 buildCounterTagData++; | |
| 7694 if (buildCounterTagData < 3) { | |
| 7695 unittest.expect(o.adId, unittest.equals('foo')); | |
| 7696 unittest.expect(o.clickTag, unittest.equals('foo')); | |
| 7697 unittest.expect(o.creativeId, unittest.equals('foo')); | |
| 7698 unittest.expect(o.format, unittest.equals('foo')); | |
| 7699 unittest.expect(o.impressionTag, unittest.equals('foo')); | |
| 7700 } | |
| 7701 buildCounterTagData--; | |
| 7702 } | |
| 7703 | |
| 7704 core.int buildCounterTagSetting = 0; | |
| 7705 buildTagSetting() { | |
| 7706 var o = new api.TagSetting(); | |
| 7707 buildCounterTagSetting++; | |
| 7708 if (buildCounterTagSetting < 3) { | |
| 7709 o.additionalKeyValues = "foo"; | |
| 7710 o.includeClickThroughUrls = true; | |
| 7711 o.includeClickTracking = true; | |
| 7712 o.keywordOption = "foo"; | |
| 7713 } | |
| 7714 buildCounterTagSetting--; | |
| 7715 return o; | |
| 7716 } | |
| 7717 | |
| 7718 checkTagSetting(api.TagSetting o) { | |
| 7719 buildCounterTagSetting++; | |
| 7720 if (buildCounterTagSetting < 3) { | |
| 7721 unittest.expect(o.additionalKeyValues, unittest.equals('foo')); | |
| 7722 unittest.expect(o.includeClickThroughUrls, unittest.isTrue); | |
| 7723 unittest.expect(o.includeClickTracking, unittest.isTrue); | |
| 7724 unittest.expect(o.keywordOption, unittest.equals('foo')); | |
| 7725 } | |
| 7726 buildCounterTagSetting--; | |
| 7727 } | |
| 7728 | |
| 7729 core.int buildCounterTagSettings = 0; | |
| 7730 buildTagSettings() { | |
| 7731 var o = new api.TagSettings(); | |
| 7732 buildCounterTagSettings++; | |
| 7733 if (buildCounterTagSettings < 3) { | |
| 7734 o.dynamicTagEnabled = true; | |
| 7735 o.imageTagEnabled = true; | |
| 7736 } | |
| 7737 buildCounterTagSettings--; | |
| 7738 return o; | |
| 7739 } | |
| 7740 | |
| 7741 checkTagSettings(api.TagSettings o) { | |
| 7742 buildCounterTagSettings++; | |
| 7743 if (buildCounterTagSettings < 3) { | |
| 7744 unittest.expect(o.dynamicTagEnabled, unittest.isTrue); | |
| 7745 unittest.expect(o.imageTagEnabled, unittest.isTrue); | |
| 7746 } | |
| 7747 buildCounterTagSettings--; | |
| 7748 } | |
| 7749 | |
| 7750 core.int buildCounterTargetWindow = 0; | |
| 7751 buildTargetWindow() { | |
| 7752 var o = new api.TargetWindow(); | |
| 7753 buildCounterTargetWindow++; | |
| 7754 if (buildCounterTargetWindow < 3) { | |
| 7755 o.customHtml = "foo"; | |
| 7756 o.targetWindowOption = "foo"; | |
| 7757 } | |
| 7758 buildCounterTargetWindow--; | |
| 7759 return o; | |
| 7760 } | |
| 7761 | |
| 7762 checkTargetWindow(api.TargetWindow o) { | |
| 7763 buildCounterTargetWindow++; | |
| 7764 if (buildCounterTargetWindow < 3) { | |
| 7765 unittest.expect(o.customHtml, unittest.equals('foo')); | |
| 7766 unittest.expect(o.targetWindowOption, unittest.equals('foo')); | |
| 7767 } | |
| 7768 buildCounterTargetWindow--; | |
| 7769 } | |
| 7770 | |
| 7771 core.int buildCounterTargetableRemarketingList = 0; | |
| 7772 buildTargetableRemarketingList() { | |
| 7773 var o = new api.TargetableRemarketingList(); | |
| 7774 buildCounterTargetableRemarketingList++; | |
| 7775 if (buildCounterTargetableRemarketingList < 3) { | |
| 7776 o.accountId = "foo"; | |
| 7777 o.active = true; | |
| 7778 o.advertiserId = "foo"; | |
| 7779 o.advertiserIdDimensionValue = buildDimensionValue(); | |
| 7780 o.description = "foo"; | |
| 7781 o.id = "foo"; | |
| 7782 o.kind = "foo"; | |
| 7783 o.lifeSpan = "foo"; | |
| 7784 o.listSize = "foo"; | |
| 7785 o.listSource = "foo"; | |
| 7786 o.name = "foo"; | |
| 7787 o.subaccountId = "foo"; | |
| 7788 } | |
| 7789 buildCounterTargetableRemarketingList--; | |
| 7790 return o; | |
| 7791 } | |
| 7792 | |
| 7793 checkTargetableRemarketingList(api.TargetableRemarketingList o) { | |
| 7794 buildCounterTargetableRemarketingList++; | |
| 7795 if (buildCounterTargetableRemarketingList < 3) { | |
| 7796 unittest.expect(o.accountId, unittest.equals('foo')); | |
| 7797 unittest.expect(o.active, unittest.isTrue); | |
| 7798 unittest.expect(o.advertiserId, unittest.equals('foo')); | |
| 7799 checkDimensionValue(o.advertiserIdDimensionValue); | |
| 7800 unittest.expect(o.description, unittest.equals('foo')); | |
| 7801 unittest.expect(o.id, unittest.equals('foo')); | |
| 7802 unittest.expect(o.kind, unittest.equals('foo')); | |
| 7803 unittest.expect(o.lifeSpan, unittest.equals('foo')); | |
| 7804 unittest.expect(o.listSize, unittest.equals('foo')); | |
| 7805 unittest.expect(o.listSource, unittest.equals('foo')); | |
| 7806 unittest.expect(o.name, unittest.equals('foo')); | |
| 7807 unittest.expect(o.subaccountId, unittest.equals('foo')); | |
| 7808 } | |
| 7809 buildCounterTargetableRemarketingList--; | |
| 7810 } | |
| 7811 | |
| 7812 buildUnnamed1477() { | |
| 7813 var o = new core.List<api.TargetableRemarketingList>(); | |
| 7814 o.add(buildTargetableRemarketingList()); | |
| 7815 o.add(buildTargetableRemarketingList()); | |
| 7816 return o; | |
| 7817 } | |
| 7818 | |
| 7819 checkUnnamed1477(core.List<api.TargetableRemarketingList> o) { | |
| 7820 unittest.expect(o, unittest.hasLength(2)); | |
| 7821 checkTargetableRemarketingList(o[0]); | |
| 7822 checkTargetableRemarketingList(o[1]); | |
| 7823 } | |
| 7824 | |
| 7825 core.int buildCounterTargetableRemarketingListsListResponse = 0; | |
| 7826 buildTargetableRemarketingListsListResponse() { | |
| 7827 var o = new api.TargetableRemarketingListsListResponse(); | |
| 7828 buildCounterTargetableRemarketingListsListResponse++; | |
| 7829 if (buildCounterTargetableRemarketingListsListResponse < 3) { | |
| 7830 o.kind = "foo"; | |
| 7831 o.nextPageToken = "foo"; | |
| 7832 o.targetableRemarketingLists = buildUnnamed1477(); | |
| 7833 } | |
| 7834 buildCounterTargetableRemarketingListsListResponse--; | |
| 7835 return o; | |
| 7836 } | |
| 7837 | |
| 7838 checkTargetableRemarketingListsListResponse(api.TargetableRemarketingListsListRe
sponse o) { | |
| 7839 buildCounterTargetableRemarketingListsListResponse++; | |
| 7840 if (buildCounterTargetableRemarketingListsListResponse < 3) { | |
| 7841 unittest.expect(o.kind, unittest.equals('foo')); | |
| 7842 unittest.expect(o.nextPageToken, unittest.equals('foo')); | |
| 7843 checkUnnamed1477(o.targetableRemarketingLists); | |
| 7844 } | |
| 7845 buildCounterTargetableRemarketingListsListResponse--; | |
| 7846 } | |
| 7847 | |
| 7848 buildUnnamed1478() { | |
| 7849 var o = new core.List<api.Browser>(); | |
| 7850 o.add(buildBrowser()); | |
| 7851 o.add(buildBrowser()); | |
| 7852 return o; | |
| 7853 } | |
| 7854 | |
| 7855 checkUnnamed1478(core.List<api.Browser> o) { | |
| 7856 unittest.expect(o, unittest.hasLength(2)); | |
| 7857 checkBrowser(o[0]); | |
| 7858 checkBrowser(o[1]); | |
| 7859 } | |
| 7860 | |
| 7861 buildUnnamed1479() { | |
| 7862 var o = new core.List<api.ConnectionType>(); | |
| 7863 o.add(buildConnectionType()); | |
| 7864 o.add(buildConnectionType()); | |
| 7865 return o; | |
| 7866 } | |
| 7867 | |
| 7868 checkUnnamed1479(core.List<api.ConnectionType> o) { | |
| 7869 unittest.expect(o, unittest.hasLength(2)); | |
| 7870 checkConnectionType(o[0]); | |
| 7871 checkConnectionType(o[1]); | |
| 7872 } | |
| 7873 | |
| 7874 buildUnnamed1480() { | |
| 7875 var o = new core.List<api.MobileCarrier>(); | |
| 7876 o.add(buildMobileCarrier()); | |
| 7877 o.add(buildMobileCarrier()); | |
| 7878 return o; | |
| 7879 } | |
| 7880 | |
| 7881 checkUnnamed1480(core.List<api.MobileCarrier> o) { | |
| 7882 unittest.expect(o, unittest.hasLength(2)); | |
| 7883 checkMobileCarrier(o[0]); | |
| 7884 checkMobileCarrier(o[1]); | |
| 7885 } | |
| 7886 | |
| 7887 buildUnnamed1481() { | |
| 7888 var o = new core.List<api.OperatingSystemVersion>(); | |
| 7889 o.add(buildOperatingSystemVersion()); | |
| 7890 o.add(buildOperatingSystemVersion()); | |
| 7891 return o; | |
| 7892 } | |
| 7893 | |
| 7894 checkUnnamed1481(core.List<api.OperatingSystemVersion> o) { | |
| 7895 unittest.expect(o, unittest.hasLength(2)); | |
| 7896 checkOperatingSystemVersion(o[0]); | |
| 7897 checkOperatingSystemVersion(o[1]); | |
| 7898 } | |
| 7899 | |
| 7900 buildUnnamed1482() { | |
| 7901 var o = new core.List<api.OperatingSystem>(); | |
| 7902 o.add(buildOperatingSystem()); | |
| 7903 o.add(buildOperatingSystem()); | |
| 7904 return o; | |
| 7905 } | |
| 7906 | |
| 7907 checkUnnamed1482(core.List<api.OperatingSystem> o) { | |
| 7908 unittest.expect(o, unittest.hasLength(2)); | |
| 7909 checkOperatingSystem(o[0]); | |
| 7910 checkOperatingSystem(o[1]); | |
| 7911 } | |
| 7912 | |
| 7913 buildUnnamed1483() { | |
| 7914 var o = new core.List<api.PlatformType>(); | |
| 7915 o.add(buildPlatformType()); | |
| 7916 o.add(buildPlatformType()); | |
| 7917 return o; | |
| 7918 } | |
| 7919 | |
| 7920 checkUnnamed1483(core.List<api.PlatformType> o) { | |
| 7921 unittest.expect(o, unittest.hasLength(2)); | |
| 7922 checkPlatformType(o[0]); | |
| 7923 checkPlatformType(o[1]); | |
| 7924 } | |
| 7925 | |
| 7926 core.int buildCounterTechnologyTargeting = 0; | |
| 7927 buildTechnologyTargeting() { | |
| 7928 var o = new api.TechnologyTargeting(); | |
| 7929 buildCounterTechnologyTargeting++; | |
| 7930 if (buildCounterTechnologyTargeting < 3) { | |
| 7931 o.browsers = buildUnnamed1478(); | |
| 7932 o.connectionTypes = buildUnnamed1479(); | |
| 7933 o.mobileCarriers = buildUnnamed1480(); | |
| 7934 o.operatingSystemVersions = buildUnnamed1481(); | |
| 7935 o.operatingSystems = buildUnnamed1482(); | |
| 7936 o.platformTypes = buildUnnamed1483(); | |
| 7937 } | |
| 7938 buildCounterTechnologyTargeting--; | |
| 7939 return o; | |
| 7940 } | |
| 7941 | |
| 7942 checkTechnologyTargeting(api.TechnologyTargeting o) { | |
| 7943 buildCounterTechnologyTargeting++; | |
| 7944 if (buildCounterTechnologyTargeting < 3) { | |
| 7945 checkUnnamed1478(o.browsers); | |
| 7946 checkUnnamed1479(o.connectionTypes); | |
| 7947 checkUnnamed1480(o.mobileCarriers); | |
| 7948 checkUnnamed1481(o.operatingSystemVersions); | |
| 7949 checkUnnamed1482(o.operatingSystems); | |
| 7950 checkUnnamed1483(o.platformTypes); | |
| 7951 } | |
| 7952 buildCounterTechnologyTargeting--; | |
| 7953 } | |
| 7954 | |
| 7955 core.int buildCounterThirdPartyAuthenticationToken = 0; | |
| 7956 buildThirdPartyAuthenticationToken() { | |
| 7957 var o = new api.ThirdPartyAuthenticationToken(); | |
| 7958 buildCounterThirdPartyAuthenticationToken++; | |
| 7959 if (buildCounterThirdPartyAuthenticationToken < 3) { | |
| 7960 o.name = "foo"; | |
| 7961 o.value = "foo"; | |
| 7962 } | |
| 7963 buildCounterThirdPartyAuthenticationToken--; | |
| 7964 return o; | |
| 7965 } | |
| 7966 | |
| 7967 checkThirdPartyAuthenticationToken(api.ThirdPartyAuthenticationToken o) { | |
| 7968 buildCounterThirdPartyAuthenticationToken++; | |
| 7969 if (buildCounterThirdPartyAuthenticationToken < 3) { | |
| 7970 unittest.expect(o.name, unittest.equals('foo')); | |
| 7971 unittest.expect(o.value, unittest.equals('foo')); | |
| 7972 } | |
| 7973 buildCounterThirdPartyAuthenticationToken--; | |
| 7974 } | |
| 7975 | |
| 7976 core.int buildCounterThirdPartyTrackingUrl = 0; | |
| 7977 buildThirdPartyTrackingUrl() { | |
| 7978 var o = new api.ThirdPartyTrackingUrl(); | |
| 7979 buildCounterThirdPartyTrackingUrl++; | |
| 7980 if (buildCounterThirdPartyTrackingUrl < 3) { | |
| 7981 o.thirdPartyUrlType = "foo"; | |
| 7982 o.url = "foo"; | |
| 7983 } | |
| 7984 buildCounterThirdPartyTrackingUrl--; | |
| 7985 return o; | |
| 7986 } | |
| 7987 | |
| 7988 checkThirdPartyTrackingUrl(api.ThirdPartyTrackingUrl o) { | |
| 7989 buildCounterThirdPartyTrackingUrl++; | |
| 7990 if (buildCounterThirdPartyTrackingUrl < 3) { | |
| 7991 unittest.expect(o.thirdPartyUrlType, unittest.equals('foo')); | |
| 7992 unittest.expect(o.url, unittest.equals('foo')); | |
| 7993 } | |
| 7994 buildCounterThirdPartyTrackingUrl--; | |
| 7995 } | |
| 7996 | |
| 7997 core.int buildCounterUserDefinedVariableConfiguration = 0; | |
| 7998 buildUserDefinedVariableConfiguration() { | |
| 7999 var o = new api.UserDefinedVariableConfiguration(); | |
| 8000 buildCounterUserDefinedVariableConfiguration++; | |
| 8001 if (buildCounterUserDefinedVariableConfiguration < 3) { | |
| 8002 o.dataType = "foo"; | |
| 8003 o.reportName = "foo"; | |
| 8004 o.variableType = "foo"; | |
| 8005 } | |
| 8006 buildCounterUserDefinedVariableConfiguration--; | |
| 8007 return o; | |
| 8008 } | |
| 8009 | |
| 8010 checkUserDefinedVariableConfiguration(api.UserDefinedVariableConfiguration o) { | |
| 8011 buildCounterUserDefinedVariableConfiguration++; | |
| 8012 if (buildCounterUserDefinedVariableConfiguration < 3) { | |
| 8013 unittest.expect(o.dataType, unittest.equals('foo')); | |
| 8014 unittest.expect(o.reportName, unittest.equals('foo')); | |
| 8015 unittest.expect(o.variableType, unittest.equals('foo')); | |
| 8016 } | |
| 8017 buildCounterUserDefinedVariableConfiguration--; | |
| 8018 } | |
| 8019 | |
| 8020 core.int buildCounterUserProfile = 0; | |
| 8021 buildUserProfile() { | |
| 8022 var o = new api.UserProfile(); | |
| 8023 buildCounterUserProfile++; | |
| 8024 if (buildCounterUserProfile < 3) { | |
| 8025 o.accountId = "foo"; | |
| 8026 o.accountName = "foo"; | |
| 8027 o.etag = "foo"; | |
| 8028 o.kind = "foo"; | |
| 8029 o.profileId = "foo"; | |
| 8030 o.subAccountId = "foo"; | |
| 8031 o.subAccountName = "foo"; | |
| 8032 o.userName = "foo"; | |
| 8033 } | |
| 8034 buildCounterUserProfile--; | |
| 8035 return o; | |
| 8036 } | |
| 8037 | |
| 8038 checkUserProfile(api.UserProfile o) { | |
| 8039 buildCounterUserProfile++; | |
| 8040 if (buildCounterUserProfile < 3) { | |
| 8041 unittest.expect(o.accountId, unittest.equals('foo')); | |
| 8042 unittest.expect(o.accountName, unittest.equals('foo')); | |
| 8043 unittest.expect(o.etag, unittest.equals('foo')); | |
| 8044 unittest.expect(o.kind, unittest.equals('foo')); | |
| 8045 unittest.expect(o.profileId, unittest.equals('foo')); | |
| 8046 unittest.expect(o.subAccountId, unittest.equals('foo')); | |
| 8047 unittest.expect(o.subAccountName, unittest.equals('foo')); | |
| 8048 unittest.expect(o.userName, unittest.equals('foo')); | |
| 8049 } | |
| 8050 buildCounterUserProfile--; | |
| 8051 } | |
| 8052 | |
| 8053 buildUnnamed1484() { | |
| 8054 var o = new core.List<api.UserProfile>(); | |
| 8055 o.add(buildUserProfile()); | |
| 8056 o.add(buildUserProfile()); | |
| 8057 return o; | |
| 8058 } | |
| 8059 | |
| 8060 checkUnnamed1484(core.List<api.UserProfile> o) { | |
| 8061 unittest.expect(o, unittest.hasLength(2)); | |
| 8062 checkUserProfile(o[0]); | |
| 8063 checkUserProfile(o[1]); | |
| 8064 } | |
| 8065 | |
| 8066 core.int buildCounterUserProfileList = 0; | |
| 8067 buildUserProfileList() { | |
| 8068 var o = new api.UserProfileList(); | |
| 8069 buildCounterUserProfileList++; | |
| 8070 if (buildCounterUserProfileList < 3) { | |
| 8071 o.etag = "foo"; | |
| 8072 o.items = buildUnnamed1484(); | |
| 8073 o.kind = "foo"; | |
| 8074 } | |
| 8075 buildCounterUserProfileList--; | |
| 8076 return o; | |
| 8077 } | |
| 8078 | |
| 8079 checkUserProfileList(api.UserProfileList o) { | |
| 8080 buildCounterUserProfileList++; | |
| 8081 if (buildCounterUserProfileList < 3) { | |
| 8082 unittest.expect(o.etag, unittest.equals('foo')); | |
| 8083 checkUnnamed1484(o.items); | |
| 8084 unittest.expect(o.kind, unittest.equals('foo')); | |
| 8085 } | |
| 8086 buildCounterUserProfileList--; | |
| 8087 } | |
| 8088 | |
| 8089 buildUnnamed1485() { | |
| 8090 var o = new core.List<api.UserRolePermission>(); | |
| 8091 o.add(buildUserRolePermission()); | |
| 8092 o.add(buildUserRolePermission()); | |
| 8093 return o; | |
| 8094 } | |
| 8095 | |
| 8096 checkUnnamed1485(core.List<api.UserRolePermission> o) { | |
| 8097 unittest.expect(o, unittest.hasLength(2)); | |
| 8098 checkUserRolePermission(o[0]); | |
| 8099 checkUserRolePermission(o[1]); | |
| 8100 } | |
| 8101 | |
| 8102 core.int buildCounterUserRole = 0; | |
| 8103 buildUserRole() { | |
| 8104 var o = new api.UserRole(); | |
| 8105 buildCounterUserRole++; | |
| 8106 if (buildCounterUserRole < 3) { | |
| 8107 o.accountId = "foo"; | |
| 8108 o.defaultUserRole = true; | |
| 8109 o.id = "foo"; | |
| 8110 o.kind = "foo"; | |
| 8111 o.name = "foo"; | |
| 8112 o.parentUserRoleId = "foo"; | |
| 8113 o.permissions = buildUnnamed1485(); | |
| 8114 o.subaccountId = "foo"; | |
| 8115 } | |
| 8116 buildCounterUserRole--; | |
| 8117 return o; | |
| 8118 } | |
| 8119 | |
| 8120 checkUserRole(api.UserRole o) { | |
| 8121 buildCounterUserRole++; | |
| 8122 if (buildCounterUserRole < 3) { | |
| 8123 unittest.expect(o.accountId, unittest.equals('foo')); | |
| 8124 unittest.expect(o.defaultUserRole, unittest.isTrue); | |
| 8125 unittest.expect(o.id, unittest.equals('foo')); | |
| 8126 unittest.expect(o.kind, unittest.equals('foo')); | |
| 8127 unittest.expect(o.name, unittest.equals('foo')); | |
| 8128 unittest.expect(o.parentUserRoleId, unittest.equals('foo')); | |
| 8129 checkUnnamed1485(o.permissions); | |
| 8130 unittest.expect(o.subaccountId, unittest.equals('foo')); | |
| 8131 } | |
| 8132 buildCounterUserRole--; | |
| 8133 } | |
| 8134 | |
| 8135 core.int buildCounterUserRolePermission = 0; | |
| 8136 buildUserRolePermission() { | |
| 8137 var o = new api.UserRolePermission(); | |
| 8138 buildCounterUserRolePermission++; | |
| 8139 if (buildCounterUserRolePermission < 3) { | |
| 8140 o.availability = "foo"; | |
| 8141 o.id = "foo"; | |
| 8142 o.kind = "foo"; | |
| 8143 o.name = "foo"; | |
| 8144 o.permissionGroupId = "foo"; | |
| 8145 } | |
| 8146 buildCounterUserRolePermission--; | |
| 8147 return o; | |
| 8148 } | |
| 8149 | |
| 8150 checkUserRolePermission(api.UserRolePermission o) { | |
| 8151 buildCounterUserRolePermission++; | |
| 8152 if (buildCounterUserRolePermission < 3) { | |
| 8153 unittest.expect(o.availability, unittest.equals('foo')); | |
| 8154 unittest.expect(o.id, unittest.equals('foo')); | |
| 8155 unittest.expect(o.kind, unittest.equals('foo')); | |
| 8156 unittest.expect(o.name, unittest.equals('foo')); | |
| 8157 unittest.expect(o.permissionGroupId, unittest.equals('foo')); | |
| 8158 } | |
| 8159 buildCounterUserRolePermission--; | |
| 8160 } | |
| 8161 | |
| 8162 core.int buildCounterUserRolePermissionGroup = 0; | |
| 8163 buildUserRolePermissionGroup() { | |
| 8164 var o = new api.UserRolePermissionGroup(); | |
| 8165 buildCounterUserRolePermissionGroup++; | |
| 8166 if (buildCounterUserRolePermissionGroup < 3) { | |
| 8167 o.id = "foo"; | |
| 8168 o.kind = "foo"; | |
| 8169 o.name = "foo"; | |
| 8170 } | |
| 8171 buildCounterUserRolePermissionGroup--; | |
| 8172 return o; | |
| 8173 } | |
| 8174 | |
| 8175 checkUserRolePermissionGroup(api.UserRolePermissionGroup o) { | |
| 8176 buildCounterUserRolePermissionGroup++; | |
| 8177 if (buildCounterUserRolePermissionGroup < 3) { | |
| 8178 unittest.expect(o.id, unittest.equals('foo')); | |
| 8179 unittest.expect(o.kind, unittest.equals('foo')); | |
| 8180 unittest.expect(o.name, unittest.equals('foo')); | |
| 8181 } | |
| 8182 buildCounterUserRolePermissionGroup--; | |
| 8183 } | |
| 8184 | |
| 8185 buildUnnamed1486() { | |
| 8186 var o = new core.List<api.UserRolePermissionGroup>(); | |
| 8187 o.add(buildUserRolePermissionGroup()); | |
| 8188 o.add(buildUserRolePermissionGroup()); | |
| 8189 return o; | |
| 8190 } | |
| 8191 | |
| 8192 checkUnnamed1486(core.List<api.UserRolePermissionGroup> o) { | |
| 8193 unittest.expect(o, unittest.hasLength(2)); | |
| 8194 checkUserRolePermissionGroup(o[0]); | |
| 8195 checkUserRolePermissionGroup(o[1]); | |
| 8196 } | |
| 8197 | |
| 8198 core.int buildCounterUserRolePermissionGroupsListResponse = 0; | |
| 8199 buildUserRolePermissionGroupsListResponse() { | |
| 8200 var o = new api.UserRolePermissionGroupsListResponse(); | |
| 8201 buildCounterUserRolePermissionGroupsListResponse++; | |
| 8202 if (buildCounterUserRolePermissionGroupsListResponse < 3) { | |
| 8203 o.kind = "foo"; | |
| 8204 o.userRolePermissionGroups = buildUnnamed1486(); | |
| 8205 } | |
| 8206 buildCounterUserRolePermissionGroupsListResponse--; | |
| 8207 return o; | |
| 8208 } | |
| 8209 | |
| 8210 checkUserRolePermissionGroupsListResponse(api.UserRolePermissionGroupsListRespon
se o) { | |
| 8211 buildCounterUserRolePermissionGroupsListResponse++; | |
| 8212 if (buildCounterUserRolePermissionGroupsListResponse < 3) { | |
| 8213 unittest.expect(o.kind, unittest.equals('foo')); | |
| 8214 checkUnnamed1486(o.userRolePermissionGroups); | |
| 8215 } | |
| 8216 buildCounterUserRolePermissionGroupsListResponse--; | |
| 8217 } | |
| 8218 | |
| 8219 buildUnnamed1487() { | |
| 8220 var o = new core.List<api.UserRolePermission>(); | |
| 8221 o.add(buildUserRolePermission()); | |
| 8222 o.add(buildUserRolePermission()); | |
| 8223 return o; | |
| 8224 } | |
| 8225 | |
| 8226 checkUnnamed1487(core.List<api.UserRolePermission> o) { | |
| 8227 unittest.expect(o, unittest.hasLength(2)); | |
| 8228 checkUserRolePermission(o[0]); | |
| 8229 checkUserRolePermission(o[1]); | |
| 8230 } | |
| 8231 | |
| 8232 core.int buildCounterUserRolePermissionsListResponse = 0; | |
| 8233 buildUserRolePermissionsListResponse() { | |
| 8234 var o = new api.UserRolePermissionsListResponse(); | |
| 8235 buildCounterUserRolePermissionsListResponse++; | |
| 8236 if (buildCounterUserRolePermissionsListResponse < 3) { | |
| 8237 o.kind = "foo"; | |
| 8238 o.userRolePermissions = buildUnnamed1487(); | |
| 8239 } | |
| 8240 buildCounterUserRolePermissionsListResponse--; | |
| 8241 return o; | |
| 8242 } | |
| 8243 | |
| 8244 checkUserRolePermissionsListResponse(api.UserRolePermissionsListResponse o) { | |
| 8245 buildCounterUserRolePermissionsListResponse++; | |
| 8246 if (buildCounterUserRolePermissionsListResponse < 3) { | |
| 8247 unittest.expect(o.kind, unittest.equals('foo')); | |
| 8248 checkUnnamed1487(o.userRolePermissions); | |
| 8249 } | |
| 8250 buildCounterUserRolePermissionsListResponse--; | |
| 8251 } | |
| 8252 | |
| 8253 buildUnnamed1488() { | |
| 8254 var o = new core.List<api.UserRole>(); | |
| 8255 o.add(buildUserRole()); | |
| 8256 o.add(buildUserRole()); | |
| 8257 return o; | |
| 8258 } | |
| 8259 | |
| 8260 checkUnnamed1488(core.List<api.UserRole> o) { | |
| 8261 unittest.expect(o, unittest.hasLength(2)); | |
| 8262 checkUserRole(o[0]); | |
| 8263 checkUserRole(o[1]); | |
| 8264 } | |
| 8265 | |
| 8266 core.int buildCounterUserRolesListResponse = 0; | |
| 8267 buildUserRolesListResponse() { | |
| 8268 var o = new api.UserRolesListResponse(); | |
| 8269 buildCounterUserRolesListResponse++; | |
| 8270 if (buildCounterUserRolesListResponse < 3) { | |
| 8271 o.kind = "foo"; | |
| 8272 o.nextPageToken = "foo"; | |
| 8273 o.userRoles = buildUnnamed1488(); | |
| 8274 } | |
| 8275 buildCounterUserRolesListResponse--; | |
| 8276 return o; | |
| 8277 } | |
| 8278 | |
| 8279 checkUserRolesListResponse(api.UserRolesListResponse o) { | |
| 8280 buildCounterUserRolesListResponse++; | |
| 8281 if (buildCounterUserRolesListResponse < 3) { | |
| 8282 unittest.expect(o.kind, unittest.equals('foo')); | |
| 8283 unittest.expect(o.nextPageToken, unittest.equals('foo')); | |
| 8284 checkUnnamed1488(o.userRoles); | |
| 8285 } | |
| 8286 buildCounterUserRolesListResponse--; | |
| 8287 } | |
| 8288 | |
| 8289 buildUnnamed1489() { | |
| 8290 var o = new core.List<core.String>(); | |
| 8291 o.add("foo"); | |
| 8292 o.add("foo"); | |
| 8293 return o; | |
| 8294 } | |
| 8295 | |
| 8296 checkUnnamed1489(core.List<core.String> o) { | |
| 8297 unittest.expect(o, unittest.hasLength(2)); | |
| 8298 unittest.expect(o[0], unittest.equals('foo')); | |
| 8299 unittest.expect(o[1], unittest.equals('foo')); | |
| 8300 } | |
| 8301 | |
| 8302 buildUnnamed1490() { | |
| 8303 var o = new core.List<core.String>(); | |
| 8304 o.add("foo"); | |
| 8305 o.add("foo"); | |
| 8306 return o; | |
| 8307 } | |
| 8308 | |
| 8309 checkUnnamed1490(core.List<core.String> o) { | |
| 8310 unittest.expect(o, unittest.hasLength(2)); | |
| 8311 unittest.expect(o[0], unittest.equals('foo')); | |
| 8312 unittest.expect(o[1], unittest.equals('foo')); | |
| 8313 } | |
| 8314 | |
| 8315 buildUnnamed1491() { | |
| 8316 var o = new core.List<core.String>(); | |
| 8317 o.add("foo"); | |
| 8318 o.add("foo"); | |
| 8319 return o; | |
| 8320 } | |
| 8321 | |
| 8322 checkUnnamed1491(core.List<core.String> o) { | |
| 8323 unittest.expect(o, unittest.hasLength(2)); | |
| 8324 unittest.expect(o[0], unittest.equals('foo')); | |
| 8325 unittest.expect(o[1], unittest.equals('foo')); | |
| 8326 } | |
| 8327 | |
| 8328 buildUnnamed1492() { | |
| 8329 var o = new core.List<core.String>(); | |
| 8330 o.add("foo"); | |
| 8331 o.add("foo"); | |
| 8332 return o; | |
| 8333 } | |
| 8334 | |
| 8335 checkUnnamed1492(core.List<core.String> o) { | |
| 8336 unittest.expect(o, unittest.hasLength(2)); | |
| 8337 unittest.expect(o[0], unittest.equals('foo')); | |
| 8338 unittest.expect(o[1], unittest.equals('foo')); | |
| 8339 } | |
| 8340 | |
| 8341 buildUnnamed1493() { | |
| 8342 var o = new core.List<core.String>(); | |
| 8343 o.add("foo"); | |
| 8344 o.add("foo"); | |
| 8345 return o; | |
| 8346 } | |
| 8347 | |
| 8348 checkUnnamed1493(core.List<core.String> o) { | |
| 8349 unittest.expect(o, unittest.hasLength(2)); | |
| 8350 unittest.expect(o[0], unittest.equals('foo')); | |
| 8351 unittest.expect(o[1], unittest.equals('foo')); | |
| 8352 } | |
| 8353 | |
| 8354 buildUnnamed1494() { | |
| 8355 var o = new core.List<core.String>(); | |
| 8356 o.add("foo"); | |
| 8357 o.add("foo"); | |
| 8358 return o; | |
| 8359 } | |
| 8360 | |
| 8361 checkUnnamed1494(core.List<core.String> o) { | |
| 8362 unittest.expect(o, unittest.hasLength(2)); | |
| 8363 unittest.expect(o[0], unittest.equals('foo')); | |
| 8364 unittest.expect(o[1], unittest.equals('foo')); | |
| 8365 } | |
| 8366 | |
| 8367 buildUnnamed1495() { | |
| 8368 var o = new core.List<core.String>(); | |
| 8369 o.add("foo"); | |
| 8370 o.add("foo"); | |
| 8371 return o; | |
| 8372 } | |
| 8373 | |
| 8374 checkUnnamed1495(core.List<core.String> o) { | |
| 8375 unittest.expect(o, unittest.hasLength(2)); | |
| 8376 unittest.expect(o[0], unittest.equals('foo')); | |
| 8377 unittest.expect(o[1], unittest.equals('foo')); | |
| 8378 } | |
| 8379 | |
| 8380 buildUnnamed1496() { | |
| 8381 var o = new core.List<core.String>(); | |
| 8382 o.add("foo"); | |
| 8383 o.add("foo"); | |
| 8384 return o; | |
| 8385 } | |
| 8386 | |
| 8387 checkUnnamed1496(core.List<core.String> o) { | |
| 8388 unittest.expect(o, unittest.hasLength(2)); | |
| 8389 unittest.expect(o[0], unittest.equals('foo')); | |
| 8390 unittest.expect(o[1], unittest.equals('foo')); | |
| 8391 } | |
| 8392 | |
| 8393 buildUnnamed1497() { | |
| 8394 var o = new core.List<core.String>(); | |
| 8395 o.add("foo"); | |
| 8396 o.add("foo"); | |
| 8397 return o; | |
| 8398 } | |
| 8399 | |
| 8400 checkUnnamed1497(core.List<core.String> o) { | |
| 8401 unittest.expect(o, unittest.hasLength(2)); | |
| 8402 unittest.expect(o[0], unittest.equals('foo')); | |
| 8403 unittest.expect(o[1], unittest.equals('foo')); | |
| 8404 } | |
| 8405 | |
| 8406 buildUnnamed1498() { | |
| 8407 var o = new core.List<core.String>(); | |
| 8408 o.add("foo"); | |
| 8409 o.add("foo"); | |
| 8410 return o; | |
| 8411 } | |
| 8412 | |
| 8413 checkUnnamed1498(core.List<core.String> o) { | |
| 8414 unittest.expect(o, unittest.hasLength(2)); | |
| 8415 unittest.expect(o[0], unittest.equals('foo')); | |
| 8416 unittest.expect(o[1], unittest.equals('foo')); | |
| 8417 } | |
| 8418 | |
| 8419 buildUnnamed1499() { | |
| 8420 var o = new core.List<core.String>(); | |
| 8421 o.add("foo"); | |
| 8422 o.add("foo"); | |
| 8423 return o; | |
| 8424 } | |
| 8425 | |
| 8426 checkUnnamed1499(core.List<core.String> o) { | |
| 8427 unittest.expect(o, unittest.hasLength(2)); | |
| 8428 unittest.expect(o[0], unittest.equals('foo')); | |
| 8429 unittest.expect(o[1], unittest.equals('foo')); | |
| 8430 } | |
| 8431 | |
| 8432 buildUnnamed1500() { | |
| 8433 var o = new core.List<core.String>(); | |
| 8434 o.add("foo"); | |
| 8435 o.add("foo"); | |
| 8436 return o; | |
| 8437 } | |
| 8438 | |
| 8439 checkUnnamed1500(core.List<core.String> o) { | |
| 8440 unittest.expect(o, unittest.hasLength(2)); | |
| 8441 unittest.expect(o[0], unittest.equals('foo')); | |
| 8442 unittest.expect(o[1], unittest.equals('foo')); | |
| 8443 } | |
| 8444 | |
| 8445 buildUnnamed1501() { | |
| 8446 var o = new core.List<core.String>(); | |
| 8447 o.add("foo"); | |
| 8448 o.add("foo"); | |
| 8449 return o; | |
| 8450 } | |
| 8451 | |
| 8452 checkUnnamed1501(core.List<core.String> o) { | |
| 8453 unittest.expect(o, unittest.hasLength(2)); | |
| 8454 unittest.expect(o[0], unittest.equals('foo')); | |
| 8455 unittest.expect(o[1], unittest.equals('foo')); | |
| 8456 } | |
| 8457 | |
| 8458 buildUnnamed1502() { | |
| 8459 var o = new core.List<core.String>(); | |
| 8460 o.add("foo"); | |
| 8461 o.add("foo"); | |
| 8462 return o; | |
| 8463 } | |
| 8464 | |
| 8465 checkUnnamed1502(core.List<core.String> o) { | |
| 8466 unittest.expect(o, unittest.hasLength(2)); | |
| 8467 unittest.expect(o[0], unittest.equals('foo')); | |
| 8468 unittest.expect(o[1], unittest.equals('foo')); | |
| 8469 } | |
| 8470 | |
| 8471 buildUnnamed1503() { | |
| 8472 var o = new core.List<core.String>(); | |
| 8473 o.add("foo"); | |
| 8474 o.add("foo"); | |
| 8475 return o; | |
| 8476 } | |
| 8477 | |
| 8478 checkUnnamed1503(core.List<core.String> o) { | |
| 8479 unittest.expect(o, unittest.hasLength(2)); | |
| 8480 unittest.expect(o[0], unittest.equals('foo')); | |
| 8481 unittest.expect(o[1], unittest.equals('foo')); | |
| 8482 } | |
| 8483 | |
| 8484 buildUnnamed1504() { | |
| 8485 var o = new core.List<core.String>(); | |
| 8486 o.add("foo"); | |
| 8487 o.add("foo"); | |
| 8488 return o; | |
| 8489 } | |
| 8490 | |
| 8491 checkUnnamed1504(core.List<core.String> o) { | |
| 8492 unittest.expect(o, unittest.hasLength(2)); | |
| 8493 unittest.expect(o[0], unittest.equals('foo')); | |
| 8494 unittest.expect(o[1], unittest.equals('foo')); | |
| 8495 } | |
| 8496 | |
| 8497 buildUnnamed1505() { | |
| 8498 var o = new core.List<core.String>(); | |
| 8499 o.add("foo"); | |
| 8500 o.add("foo"); | |
| 8501 return o; | |
| 8502 } | |
| 8503 | |
| 8504 checkUnnamed1505(core.List<core.String> o) { | |
| 8505 unittest.expect(o, unittest.hasLength(2)); | |
| 8506 unittest.expect(o[0], unittest.equals('foo')); | |
| 8507 unittest.expect(o[1], unittest.equals('foo')); | |
| 8508 } | |
| 8509 | |
| 8510 buildUnnamed1506() { | |
| 8511 var o = new core.List<core.String>(); | |
| 8512 o.add("foo"); | |
| 8513 o.add("foo"); | |
| 8514 return o; | |
| 8515 } | |
| 8516 | |
| 8517 checkUnnamed1506(core.List<core.String> o) { | |
| 8518 unittest.expect(o, unittest.hasLength(2)); | |
| 8519 unittest.expect(o[0], unittest.equals('foo')); | |
| 8520 unittest.expect(o[1], unittest.equals('foo')); | |
| 8521 } | |
| 8522 | |
| 8523 buildUnnamed1507() { | |
| 8524 var o = new core.List<core.String>(); | |
| 8525 o.add("foo"); | |
| 8526 o.add("foo"); | |
| 8527 return o; | |
| 8528 } | |
| 8529 | |
| 8530 checkUnnamed1507(core.List<core.String> o) { | |
| 8531 unittest.expect(o, unittest.hasLength(2)); | |
| 8532 unittest.expect(o[0], unittest.equals('foo')); | |
| 8533 unittest.expect(o[1], unittest.equals('foo')); | |
| 8534 } | |
| 8535 | |
| 8536 buildUnnamed1508() { | |
| 8537 var o = new core.List<core.String>(); | |
| 8538 o.add("foo"); | |
| 8539 o.add("foo"); | |
| 8540 return o; | |
| 8541 } | |
| 8542 | |
| 8543 checkUnnamed1508(core.List<core.String> o) { | |
| 8544 unittest.expect(o, unittest.hasLength(2)); | |
| 8545 unittest.expect(o[0], unittest.equals('foo')); | |
| 8546 unittest.expect(o[1], unittest.equals('foo')); | |
| 8547 } | |
| 8548 | |
| 8549 buildUnnamed1509() { | |
| 8550 var o = new core.List<core.String>(); | |
| 8551 o.add("foo"); | |
| 8552 o.add("foo"); | |
| 8553 return o; | |
| 8554 } | |
| 8555 | |
| 8556 checkUnnamed1509(core.List<core.String> o) { | |
| 8557 unittest.expect(o, unittest.hasLength(2)); | |
| 8558 unittest.expect(o[0], unittest.equals('foo')); | |
| 8559 unittest.expect(o[1], unittest.equals('foo')); | |
| 8560 } | |
| 8561 | |
| 8562 buildUnnamed1510() { | |
| 8563 var o = new core.List<core.String>(); | |
| 8564 o.add("foo"); | |
| 8565 o.add("foo"); | |
| 8566 return o; | |
| 8567 } | |
| 8568 | |
| 8569 checkUnnamed1510(core.List<core.String> o) { | |
| 8570 unittest.expect(o, unittest.hasLength(2)); | |
| 8571 unittest.expect(o[0], unittest.equals('foo')); | |
| 8572 unittest.expect(o[1], unittest.equals('foo')); | |
| 8573 } | |
| 8574 | |
| 8575 buildUnnamed1511() { | |
| 8576 var o = new core.List<core.String>(); | |
| 8577 o.add("foo"); | |
| 8578 o.add("foo"); | |
| 8579 return o; | |
| 8580 } | |
| 8581 | |
| 8582 checkUnnamed1511(core.List<core.String> o) { | |
| 8583 unittest.expect(o, unittest.hasLength(2)); | |
| 8584 unittest.expect(o[0], unittest.equals('foo')); | |
| 8585 unittest.expect(o[1], unittest.equals('foo')); | |
| 8586 } | |
| 8587 | |
| 8588 buildUnnamed1512() { | |
| 8589 var o = new core.List<core.String>(); | |
| 8590 o.add("foo"); | |
| 8591 o.add("foo"); | |
| 8592 return o; | |
| 8593 } | |
| 8594 | |
| 8595 checkUnnamed1512(core.List<core.String> o) { | |
| 8596 unittest.expect(o, unittest.hasLength(2)); | |
| 8597 unittest.expect(o[0], unittest.equals('foo')); | |
| 8598 unittest.expect(o[1], unittest.equals('foo')); | |
| 8599 } | |
| 8600 | |
| 8601 buildUnnamed1513() { | |
| 8602 var o = new core.List<core.String>(); | |
| 8603 o.add("foo"); | |
| 8604 o.add("foo"); | |
| 8605 return o; | |
| 8606 } | |
| 8607 | |
| 8608 checkUnnamed1513(core.List<core.String> o) { | |
| 8609 unittest.expect(o, unittest.hasLength(2)); | |
| 8610 unittest.expect(o[0], unittest.equals('foo')); | |
| 8611 unittest.expect(o[1], unittest.equals('foo')); | |
| 8612 } | |
| 8613 | |
| 8614 buildUnnamed1514() { | |
| 8615 var o = new core.List<core.String>(); | |
| 8616 o.add("foo"); | |
| 8617 o.add("foo"); | |
| 8618 return o; | |
| 8619 } | |
| 8620 | |
| 8621 checkUnnamed1514(core.List<core.String> o) { | |
| 8622 unittest.expect(o, unittest.hasLength(2)); | |
| 8623 unittest.expect(o[0], unittest.equals('foo')); | |
| 8624 unittest.expect(o[1], unittest.equals('foo')); | |
| 8625 } | |
| 8626 | |
| 8627 buildUnnamed1515() { | |
| 8628 var o = new core.List<core.String>(); | |
| 8629 o.add("foo"); | |
| 8630 o.add("foo"); | |
| 8631 return o; | |
| 8632 } | |
| 8633 | |
| 8634 checkUnnamed1515(core.List<core.String> o) { | |
| 8635 unittest.expect(o, unittest.hasLength(2)); | |
| 8636 unittest.expect(o[0], unittest.equals('foo')); | |
| 8637 unittest.expect(o[1], unittest.equals('foo')); | |
| 8638 } | |
| 8639 | |
| 8640 buildUnnamed1516() { | |
| 8641 var o = new core.List<core.String>(); | |
| 8642 o.add("foo"); | |
| 8643 o.add("foo"); | |
| 8644 return o; | |
| 8645 } | |
| 8646 | |
| 8647 checkUnnamed1516(core.List<core.String> o) { | |
| 8648 unittest.expect(o, unittest.hasLength(2)); | |
| 8649 unittest.expect(o[0], unittest.equals('foo')); | |
| 8650 unittest.expect(o[1], unittest.equals('foo')); | |
| 8651 } | |
| 8652 | |
| 8653 buildUnnamed1517() { | |
| 8654 var o = new core.List<core.String>(); | |
| 8655 o.add("foo"); | |
| 8656 o.add("foo"); | |
| 8657 return o; | |
| 8658 } | |
| 8659 | |
| 8660 checkUnnamed1517(core.List<core.String> o) { | |
| 8661 unittest.expect(o, unittest.hasLength(2)); | |
| 8662 unittest.expect(o[0], unittest.equals('foo')); | |
| 8663 unittest.expect(o[1], unittest.equals('foo')); | |
| 8664 } | |
| 8665 | |
| 8666 buildUnnamed1518() { | |
| 8667 var o = new core.List<core.String>(); | |
| 8668 o.add("foo"); | |
| 8669 o.add("foo"); | |
| 8670 return o; | |
| 8671 } | |
| 8672 | |
| 8673 checkUnnamed1518(core.List<core.String> o) { | |
| 8674 unittest.expect(o, unittest.hasLength(2)); | |
| 8675 unittest.expect(o[0], unittest.equals('foo')); | |
| 8676 unittest.expect(o[1], unittest.equals('foo')); | |
| 8677 } | |
| 8678 | |
| 8679 buildUnnamed1519() { | |
| 8680 var o = new core.List<core.String>(); | |
| 8681 o.add("foo"); | |
| 8682 o.add("foo"); | |
| 8683 return o; | |
| 8684 } | |
| 8685 | |
| 8686 checkUnnamed1519(core.List<core.String> o) { | |
| 8687 unittest.expect(o, unittest.hasLength(2)); | |
| 8688 unittest.expect(o[0], unittest.equals('foo')); | |
| 8689 unittest.expect(o[1], unittest.equals('foo')); | |
| 8690 } | |
| 8691 | |
| 8692 buildUnnamed1520() { | |
| 8693 var o = new core.List<core.String>(); | |
| 8694 o.add("foo"); | |
| 8695 o.add("foo"); | |
| 8696 return o; | |
| 8697 } | |
| 8698 | |
| 8699 checkUnnamed1520(core.List<core.String> o) { | |
| 8700 unittest.expect(o, unittest.hasLength(2)); | |
| 8701 unittest.expect(o[0], unittest.equals('foo')); | |
| 8702 unittest.expect(o[1], unittest.equals('foo')); | |
| 8703 } | |
| 8704 | |
| 8705 buildUnnamed1521() { | |
| 8706 var o = new core.List<core.String>(); | |
| 8707 o.add("foo"); | |
| 8708 o.add("foo"); | |
| 8709 return o; | |
| 8710 } | |
| 8711 | |
| 8712 checkUnnamed1521(core.List<core.String> o) { | |
| 8713 unittest.expect(o, unittest.hasLength(2)); | |
| 8714 unittest.expect(o[0], unittest.equals('foo')); | |
| 8715 unittest.expect(o[1], unittest.equals('foo')); | |
| 8716 } | |
| 8717 | |
| 8718 buildUnnamed1522() { | |
| 8719 var o = new core.List<core.String>(); | |
| 8720 o.add("foo"); | |
| 8721 o.add("foo"); | |
| 8722 return o; | |
| 8723 } | |
| 8724 | |
| 8725 checkUnnamed1522(core.List<core.String> o) { | |
| 8726 unittest.expect(o, unittest.hasLength(2)); | |
| 8727 unittest.expect(o[0], unittest.equals('foo')); | |
| 8728 unittest.expect(o[1], unittest.equals('foo')); | |
| 8729 } | |
| 8730 | |
| 8731 buildUnnamed1523() { | |
| 8732 var o = new core.List<core.String>(); | |
| 8733 o.add("foo"); | |
| 8734 o.add("foo"); | |
| 8735 return o; | |
| 8736 } | |
| 8737 | |
| 8738 checkUnnamed1523(core.List<core.String> o) { | |
| 8739 unittest.expect(o, unittest.hasLength(2)); | |
| 8740 unittest.expect(o[0], unittest.equals('foo')); | |
| 8741 unittest.expect(o[1], unittest.equals('foo')); | |
| 8742 } | |
| 8743 | |
| 8744 buildUnnamed1524() { | |
| 8745 var o = new core.List<core.String>(); | |
| 8746 o.add("foo"); | |
| 8747 o.add("foo"); | |
| 8748 return o; | |
| 8749 } | |
| 8750 | |
| 8751 checkUnnamed1524(core.List<core.String> o) { | |
| 8752 unittest.expect(o, unittest.hasLength(2)); | |
| 8753 unittest.expect(o[0], unittest.equals('foo')); | |
| 8754 unittest.expect(o[1], unittest.equals('foo')); | |
| 8755 } | |
| 8756 | |
| 8757 buildUnnamed1525() { | |
| 8758 var o = new core.List<core.String>(); | |
| 8759 o.add("foo"); | |
| 8760 o.add("foo"); | |
| 8761 return o; | |
| 8762 } | |
| 8763 | |
| 8764 checkUnnamed1525(core.List<core.String> o) { | |
| 8765 unittest.expect(o, unittest.hasLength(2)); | |
| 8766 unittest.expect(o[0], unittest.equals('foo')); | |
| 8767 unittest.expect(o[1], unittest.equals('foo')); | |
| 8768 } | |
| 8769 | |
| 8770 buildUnnamed1526() { | |
| 8771 var o = new core.List<core.String>(); | |
| 8772 o.add("foo"); | |
| 8773 o.add("foo"); | |
| 8774 return o; | |
| 8775 } | |
| 8776 | |
| 8777 checkUnnamed1526(core.List<core.String> o) { | |
| 8778 unittest.expect(o, unittest.hasLength(2)); | |
| 8779 unittest.expect(o[0], unittest.equals('foo')); | |
| 8780 unittest.expect(o[1], unittest.equals('foo')); | |
| 8781 } | |
| 8782 | |
| 8783 buildUnnamed1527() { | |
| 8784 var o = new core.List<core.String>(); | |
| 8785 o.add("foo"); | |
| 8786 o.add("foo"); | |
| 8787 return o; | |
| 8788 } | |
| 8789 | |
| 8790 checkUnnamed1527(core.List<core.String> o) { | |
| 8791 unittest.expect(o, unittest.hasLength(2)); | |
| 8792 unittest.expect(o[0], unittest.equals('foo')); | |
| 8793 unittest.expect(o[1], unittest.equals('foo')); | |
| 8794 } | |
| 8795 | |
| 8796 buildUnnamed1528() { | |
| 8797 var o = new core.List<core.String>(); | |
| 8798 o.add("foo"); | |
| 8799 o.add("foo"); | |
| 8800 return o; | |
| 8801 } | |
| 8802 | |
| 8803 checkUnnamed1528(core.List<core.String> o) { | |
| 8804 unittest.expect(o, unittest.hasLength(2)); | |
| 8805 unittest.expect(o[0], unittest.equals('foo')); | |
| 8806 unittest.expect(o[1], unittest.equals('foo')); | |
| 8807 } | |
| 8808 | |
| 8809 buildUnnamed1529() { | |
| 8810 var o = new core.List<core.String>(); | |
| 8811 o.add("foo"); | |
| 8812 o.add("foo"); | |
| 8813 return o; | |
| 8814 } | |
| 8815 | |
| 8816 checkUnnamed1529(core.List<core.String> o) { | |
| 8817 unittest.expect(o, unittest.hasLength(2)); | |
| 8818 unittest.expect(o[0], unittest.equals('foo')); | |
| 8819 unittest.expect(o[1], unittest.equals('foo')); | |
| 8820 } | |
| 8821 | |
| 8822 buildUnnamed1530() { | |
| 8823 var o = new core.List<core.String>(); | |
| 8824 o.add("foo"); | |
| 8825 o.add("foo"); | |
| 8826 return o; | |
| 8827 } | |
| 8828 | |
| 8829 checkUnnamed1530(core.List<core.String> o) { | |
| 8830 unittest.expect(o, unittest.hasLength(2)); | |
| 8831 unittest.expect(o[0], unittest.equals('foo')); | |
| 8832 unittest.expect(o[1], unittest.equals('foo')); | |
| 8833 } | |
| 8834 | |
| 8835 buildUnnamed1531() { | |
| 8836 var o = new core.List<core.String>(); | |
| 8837 o.add("foo"); | |
| 8838 o.add("foo"); | |
| 8839 return o; | |
| 8840 } | |
| 8841 | |
| 8842 checkUnnamed1531(core.List<core.String> o) { | |
| 8843 unittest.expect(o, unittest.hasLength(2)); | |
| 8844 unittest.expect(o[0], unittest.equals('foo')); | |
| 8845 unittest.expect(o[1], unittest.equals('foo')); | |
| 8846 } | |
| 8847 | |
| 8848 buildUnnamed1532() { | |
| 8849 var o = new core.List<core.String>(); | |
| 8850 o.add("foo"); | |
| 8851 o.add("foo"); | |
| 8852 return o; | |
| 8853 } | |
| 8854 | |
| 8855 checkUnnamed1532(core.List<core.String> o) { | |
| 8856 unittest.expect(o, unittest.hasLength(2)); | |
| 8857 unittest.expect(o[0], unittest.equals('foo')); | |
| 8858 unittest.expect(o[1], unittest.equals('foo')); | |
| 8859 } | |
| 8860 | |
| 8861 buildUnnamed1533() { | |
| 8862 var o = new core.List<core.String>(); | |
| 8863 o.add("foo"); | |
| 8864 o.add("foo"); | |
| 8865 return o; | |
| 8866 } | |
| 8867 | |
| 8868 checkUnnamed1533(core.List<core.String> o) { | |
| 8869 unittest.expect(o, unittest.hasLength(2)); | |
| 8870 unittest.expect(o[0], unittest.equals('foo')); | |
| 8871 unittest.expect(o[1], unittest.equals('foo')); | |
| 8872 } | |
| 8873 | |
| 8874 buildUnnamed1534() { | |
| 8875 var o = new core.List<core.String>(); | |
| 8876 o.add("foo"); | |
| 8877 o.add("foo"); | |
| 8878 return o; | |
| 8879 } | |
| 8880 | |
| 8881 checkUnnamed1534(core.List<core.String> o) { | |
| 8882 unittest.expect(o, unittest.hasLength(2)); | |
| 8883 unittest.expect(o[0], unittest.equals('foo')); | |
| 8884 unittest.expect(o[1], unittest.equals('foo')); | |
| 8885 } | |
| 8886 | |
| 8887 buildUnnamed1535() { | |
| 8888 var o = new core.List<core.String>(); | |
| 8889 o.add("foo"); | |
| 8890 o.add("foo"); | |
| 8891 return o; | |
| 8892 } | |
| 8893 | |
| 8894 checkUnnamed1535(core.List<core.String> o) { | |
| 8895 unittest.expect(o, unittest.hasLength(2)); | |
| 8896 unittest.expect(o[0], unittest.equals('foo')); | |
| 8897 unittest.expect(o[1], unittest.equals('foo')); | |
| 8898 } | |
| 8899 | |
| 8900 buildUnnamed1536() { | |
| 8901 var o = new core.List<core.String>(); | |
| 8902 o.add("foo"); | |
| 8903 o.add("foo"); | |
| 8904 return o; | |
| 8905 } | |
| 8906 | |
| 8907 checkUnnamed1536(core.List<core.String> o) { | |
| 8908 unittest.expect(o, unittest.hasLength(2)); | |
| 8909 unittest.expect(o[0], unittest.equals('foo')); | |
| 8910 unittest.expect(o[1], unittest.equals('foo')); | |
| 8911 } | |
| 8912 | |
| 8913 buildUnnamed1537() { | |
| 8914 var o = new core.List<core.String>(); | |
| 8915 o.add("foo"); | |
| 8916 o.add("foo"); | |
| 8917 return o; | |
| 8918 } | |
| 8919 | |
| 8920 checkUnnamed1537(core.List<core.String> o) { | |
| 8921 unittest.expect(o, unittest.hasLength(2)); | |
| 8922 unittest.expect(o[0], unittest.equals('foo')); | |
| 8923 unittest.expect(o[1], unittest.equals('foo')); | |
| 8924 } | |
| 8925 | |
| 8926 buildUnnamed1538() { | |
| 8927 var o = new core.List<core.String>(); | |
| 8928 o.add("foo"); | |
| 8929 o.add("foo"); | |
| 8930 return o; | |
| 8931 } | |
| 8932 | |
| 8933 checkUnnamed1538(core.List<core.String> o) { | |
| 8934 unittest.expect(o, unittest.hasLength(2)); | |
| 8935 unittest.expect(o[0], unittest.equals('foo')); | |
| 8936 unittest.expect(o[1], unittest.equals('foo')); | |
| 8937 } | |
| 8938 | |
| 8939 buildUnnamed1539() { | |
| 8940 var o = new core.List<core.String>(); | |
| 8941 o.add("foo"); | |
| 8942 o.add("foo"); | |
| 8943 return o; | |
| 8944 } | |
| 8945 | |
| 8946 checkUnnamed1539(core.List<core.String> o) { | |
| 8947 unittest.expect(o, unittest.hasLength(2)); | |
| 8948 unittest.expect(o[0], unittest.equals('foo')); | |
| 8949 unittest.expect(o[1], unittest.equals('foo')); | |
| 8950 } | |
| 8951 | |
| 8952 buildUnnamed1540() { | |
| 8953 var o = new core.List<core.String>(); | |
| 8954 o.add("foo"); | |
| 8955 o.add("foo"); | |
| 8956 return o; | |
| 8957 } | |
| 8958 | |
| 8959 checkUnnamed1540(core.List<core.String> o) { | |
| 8960 unittest.expect(o, unittest.hasLength(2)); | |
| 8961 unittest.expect(o[0], unittest.equals('foo')); | |
| 8962 unittest.expect(o[1], unittest.equals('foo')); | |
| 8963 } | |
| 8964 | |
| 8965 buildUnnamed1541() { | |
| 8966 var o = new core.List<core.String>(); | |
| 8967 o.add("foo"); | |
| 8968 o.add("foo"); | |
| 8969 return o; | |
| 8970 } | |
| 8971 | |
| 8972 checkUnnamed1541(core.List<core.String> o) { | |
| 8973 unittest.expect(o, unittest.hasLength(2)); | |
| 8974 unittest.expect(o[0], unittest.equals('foo')); | |
| 8975 unittest.expect(o[1], unittest.equals('foo')); | |
| 8976 } | |
| 8977 | |
| 8978 buildUnnamed1542() { | |
| 8979 var o = new core.List<core.String>(); | |
| 8980 o.add("foo"); | |
| 8981 o.add("foo"); | |
| 8982 return o; | |
| 8983 } | |
| 8984 | |
| 8985 checkUnnamed1542(core.List<core.String> o) { | |
| 8986 unittest.expect(o, unittest.hasLength(2)); | |
| 8987 unittest.expect(o[0], unittest.equals('foo')); | |
| 8988 unittest.expect(o[1], unittest.equals('foo')); | |
| 8989 } | |
| 8990 | |
| 8991 buildUnnamed1543() { | |
| 8992 var o = new core.List<core.String>(); | |
| 8993 o.add("foo"); | |
| 8994 o.add("foo"); | |
| 8995 return o; | |
| 8996 } | |
| 8997 | |
| 8998 checkUnnamed1543(core.List<core.String> o) { | |
| 8999 unittest.expect(o, unittest.hasLength(2)); | |
| 9000 unittest.expect(o[0], unittest.equals('foo')); | |
| 9001 unittest.expect(o[1], unittest.equals('foo')); | |
| 9002 } | |
| 9003 | |
| 9004 buildUnnamed1544() { | |
| 9005 var o = new core.List<core.String>(); | |
| 9006 o.add("foo"); | |
| 9007 o.add("foo"); | |
| 9008 return o; | |
| 9009 } | |
| 9010 | |
| 9011 checkUnnamed1544(core.List<core.String> o) { | |
| 9012 unittest.expect(o, unittest.hasLength(2)); | |
| 9013 unittest.expect(o[0], unittest.equals('foo')); | |
| 9014 unittest.expect(o[1], unittest.equals('foo')); | |
| 9015 } | |
| 9016 | |
| 9017 buildUnnamed1545() { | |
| 9018 var o = new core.List<core.String>(); | |
| 9019 o.add("foo"); | |
| 9020 o.add("foo"); | |
| 9021 return o; | |
| 9022 } | |
| 9023 | |
| 9024 checkUnnamed1545(core.List<core.String> o) { | |
| 9025 unittest.expect(o, unittest.hasLength(2)); | |
| 9026 unittest.expect(o[0], unittest.equals('foo')); | |
| 9027 unittest.expect(o[1], unittest.equals('foo')); | |
| 9028 } | |
| 9029 | |
| 9030 buildUnnamed1546() { | |
| 9031 var o = new core.List<core.String>(); | |
| 9032 o.add("foo"); | |
| 9033 o.add("foo"); | |
| 9034 return o; | |
| 9035 } | |
| 9036 | |
| 9037 checkUnnamed1546(core.List<core.String> o) { | |
| 9038 unittest.expect(o, unittest.hasLength(2)); | |
| 9039 unittest.expect(o[0], unittest.equals('foo')); | |
| 9040 unittest.expect(o[1], unittest.equals('foo')); | |
| 9041 } | |
| 9042 | |
| 9043 buildUnnamed1547() { | |
| 9044 var o = new core.List<core.String>(); | |
| 9045 o.add("foo"); | |
| 9046 o.add("foo"); | |
| 9047 return o; | |
| 9048 } | |
| 9049 | |
| 9050 checkUnnamed1547(core.List<core.String> o) { | |
| 9051 unittest.expect(o, unittest.hasLength(2)); | |
| 9052 unittest.expect(o[0], unittest.equals('foo')); | |
| 9053 unittest.expect(o[1], unittest.equals('foo')); | |
| 9054 } | |
| 9055 | |
| 9056 buildUnnamed1548() { | |
| 9057 var o = new core.List<core.String>(); | |
| 9058 o.add("foo"); | |
| 9059 o.add("foo"); | |
| 9060 return o; | |
| 9061 } | |
| 9062 | |
| 9063 checkUnnamed1548(core.List<core.String> o) { | |
| 9064 unittest.expect(o, unittest.hasLength(2)); | |
| 9065 unittest.expect(o[0], unittest.equals('foo')); | |
| 9066 unittest.expect(o[1], unittest.equals('foo')); | |
| 9067 } | |
| 9068 | |
| 9069 buildUnnamed1549() { | |
| 9070 var o = new core.List<core.String>(); | |
| 9071 o.add("foo"); | |
| 9072 o.add("foo"); | |
| 9073 return o; | |
| 9074 } | |
| 9075 | |
| 9076 checkUnnamed1549(core.List<core.String> o) { | |
| 9077 unittest.expect(o, unittest.hasLength(2)); | |
| 9078 unittest.expect(o[0], unittest.equals('foo')); | |
| 9079 unittest.expect(o[1], unittest.equals('foo')); | |
| 9080 } | |
| 9081 | |
| 9082 buildUnnamed1550() { | |
| 9083 var o = new core.List<core.String>(); | |
| 9084 o.add("foo"); | |
| 9085 o.add("foo"); | |
| 9086 return o; | |
| 9087 } | |
| 9088 | |
| 9089 checkUnnamed1550(core.List<core.String> o) { | |
| 9090 unittest.expect(o, unittest.hasLength(2)); | |
| 9091 unittest.expect(o[0], unittest.equals('foo')); | |
| 9092 unittest.expect(o[1], unittest.equals('foo')); | |
| 9093 } | |
| 9094 | |
| 9095 buildUnnamed1551() { | |
| 9096 var o = new core.List<core.String>(); | |
| 9097 o.add("foo"); | |
| 9098 o.add("foo"); | |
| 9099 return o; | |
| 9100 } | |
| 9101 | |
| 9102 checkUnnamed1551(core.List<core.String> o) { | |
| 9103 unittest.expect(o, unittest.hasLength(2)); | |
| 9104 unittest.expect(o[0], unittest.equals('foo')); | |
| 9105 unittest.expect(o[1], unittest.equals('foo')); | |
| 9106 } | |
| 9107 | |
| 9108 buildUnnamed1552() { | |
| 9109 var o = new core.List<core.String>(); | |
| 9110 o.add("foo"); | |
| 9111 o.add("foo"); | |
| 9112 return o; | |
| 9113 } | |
| 9114 | |
| 9115 checkUnnamed1552(core.List<core.String> o) { | |
| 9116 unittest.expect(o, unittest.hasLength(2)); | |
| 9117 unittest.expect(o[0], unittest.equals('foo')); | |
| 9118 unittest.expect(o[1], unittest.equals('foo')); | |
| 9119 } | |
| 9120 | |
| 9121 buildUnnamed1553() { | |
| 9122 var o = new core.List<core.String>(); | |
| 9123 o.add("foo"); | |
| 9124 o.add("foo"); | |
| 9125 return o; | |
| 9126 } | |
| 9127 | |
| 9128 checkUnnamed1553(core.List<core.String> o) { | |
| 9129 unittest.expect(o, unittest.hasLength(2)); | |
| 9130 unittest.expect(o[0], unittest.equals('foo')); | |
| 9131 unittest.expect(o[1], unittest.equals('foo')); | |
| 9132 } | |
| 9133 | |
| 9134 buildUnnamed1554() { | |
| 9135 var o = new core.List<core.String>(); | |
| 9136 o.add("foo"); | |
| 9137 o.add("foo"); | |
| 9138 return o; | |
| 9139 } | |
| 9140 | |
| 9141 checkUnnamed1554(core.List<core.String> o) { | |
| 9142 unittest.expect(o, unittest.hasLength(2)); | |
| 9143 unittest.expect(o[0], unittest.equals('foo')); | |
| 9144 unittest.expect(o[1], unittest.equals('foo')); | |
| 9145 } | |
| 9146 | |
| 9147 buildUnnamed1555() { | |
| 9148 var o = new core.List<core.String>(); | |
| 9149 o.add("foo"); | |
| 9150 o.add("foo"); | |
| 9151 return o; | |
| 9152 } | |
| 9153 | |
| 9154 checkUnnamed1555(core.List<core.String> o) { | |
| 9155 unittest.expect(o, unittest.hasLength(2)); | |
| 9156 unittest.expect(o[0], unittest.equals('foo')); | |
| 9157 unittest.expect(o[1], unittest.equals('foo')); | |
| 9158 } | |
| 9159 | |
| 9160 buildUnnamed1556() { | |
| 9161 var o = new core.List<core.String>(); | |
| 9162 o.add("foo"); | |
| 9163 o.add("foo"); | |
| 9164 return o; | |
| 9165 } | |
| 9166 | |
| 9167 checkUnnamed1556(core.List<core.String> o) { | |
| 9168 unittest.expect(o, unittest.hasLength(2)); | |
| 9169 unittest.expect(o[0], unittest.equals('foo')); | |
| 9170 unittest.expect(o[1], unittest.equals('foo')); | |
| 9171 } | |
| 9172 | |
| 9173 buildUnnamed1557() { | |
| 9174 var o = new core.List<core.String>(); | |
| 9175 o.add("foo"); | |
| 9176 o.add("foo"); | |
| 9177 return o; | |
| 9178 } | |
| 9179 | |
| 9180 checkUnnamed1557(core.List<core.String> o) { | |
| 9181 unittest.expect(o, unittest.hasLength(2)); | |
| 9182 unittest.expect(o[0], unittest.equals('foo')); | |
| 9183 unittest.expect(o[1], unittest.equals('foo')); | |
| 9184 } | |
| 9185 | |
| 9186 buildUnnamed1558() { | |
| 9187 var o = new core.List<core.String>(); | |
| 9188 o.add("foo"); | |
| 9189 o.add("foo"); | |
| 9190 return o; | |
| 9191 } | |
| 9192 | |
| 9193 checkUnnamed1558(core.List<core.String> o) { | |
| 9194 unittest.expect(o, unittest.hasLength(2)); | |
| 9195 unittest.expect(o[0], unittest.equals('foo')); | |
| 9196 unittest.expect(o[1], unittest.equals('foo')); | |
| 9197 } | |
| 9198 | |
| 9199 buildUnnamed1559() { | |
| 9200 var o = new core.List<core.String>(); | |
| 9201 o.add("foo"); | |
| 9202 o.add("foo"); | |
| 9203 return o; | |
| 9204 } | |
| 9205 | |
| 9206 checkUnnamed1559(core.List<core.String> o) { | |
| 9207 unittest.expect(o, unittest.hasLength(2)); | |
| 9208 unittest.expect(o[0], unittest.equals('foo')); | |
| 9209 unittest.expect(o[1], unittest.equals('foo')); | |
| 9210 } | |
| 9211 | |
| 9212 buildUnnamed1560() { | |
| 9213 var o = new core.List<core.String>(); | |
| 9214 o.add("foo"); | |
| 9215 o.add("foo"); | |
| 9216 return o; | |
| 9217 } | |
| 9218 | |
| 9219 checkUnnamed1560(core.List<core.String> o) { | |
| 9220 unittest.expect(o, unittest.hasLength(2)); | |
| 9221 unittest.expect(o[0], unittest.equals('foo')); | |
| 9222 unittest.expect(o[1], unittest.equals('foo')); | |
| 9223 } | |
| 9224 | |
| 9225 buildUnnamed1561() { | |
| 9226 var o = new core.List<core.String>(); | |
| 9227 o.add("foo"); | |
| 9228 o.add("foo"); | |
| 9229 return o; | |
| 9230 } | |
| 9231 | |
| 9232 checkUnnamed1561(core.List<core.String> o) { | |
| 9233 unittest.expect(o, unittest.hasLength(2)); | |
| 9234 unittest.expect(o[0], unittest.equals('foo')); | |
| 9235 unittest.expect(o[1], unittest.equals('foo')); | |
| 9236 } | |
| 9237 | |
| 9238 buildUnnamed1562() { | |
| 9239 var o = new core.List<core.String>(); | |
| 9240 o.add("foo"); | |
| 9241 o.add("foo"); | |
| 9242 return o; | |
| 9243 } | |
| 9244 | |
| 9245 checkUnnamed1562(core.List<core.String> o) { | |
| 9246 unittest.expect(o, unittest.hasLength(2)); | |
| 9247 unittest.expect(o[0], unittest.equals('foo')); | |
| 9248 unittest.expect(o[1], unittest.equals('foo')); | |
| 9249 } | |
| 9250 | |
| 9251 buildUnnamed1563() { | |
| 9252 var o = new core.List<core.String>(); | |
| 9253 o.add("foo"); | |
| 9254 o.add("foo"); | |
| 9255 return o; | |
| 9256 } | |
| 9257 | |
| 9258 checkUnnamed1563(core.List<core.String> o) { | |
| 9259 unittest.expect(o, unittest.hasLength(2)); | |
| 9260 unittest.expect(o[0], unittest.equals('foo')); | |
| 9261 unittest.expect(o[1], unittest.equals('foo')); | |
| 9262 } | |
| 9263 | |
| 9264 buildUnnamed1564() { | |
| 9265 var o = new core.List<core.String>(); | |
| 9266 o.add("foo"); | |
| 9267 o.add("foo"); | |
| 9268 return o; | |
| 9269 } | |
| 9270 | |
| 9271 checkUnnamed1564(core.List<core.String> o) { | |
| 9272 unittest.expect(o, unittest.hasLength(2)); | |
| 9273 unittest.expect(o[0], unittest.equals('foo')); | |
| 9274 unittest.expect(o[1], unittest.equals('foo')); | |
| 9275 } | |
| 9276 | |
| 9277 buildUnnamed1565() { | |
| 9278 var o = new core.List<core.String>(); | |
| 9279 o.add("foo"); | |
| 9280 o.add("foo"); | |
| 9281 return o; | |
| 9282 } | |
| 9283 | |
| 9284 checkUnnamed1565(core.List<core.String> o) { | |
| 9285 unittest.expect(o, unittest.hasLength(2)); | |
| 9286 unittest.expect(o[0], unittest.equals('foo')); | |
| 9287 unittest.expect(o[1], unittest.equals('foo')); | |
| 9288 } | |
| 9289 | |
| 9290 buildUnnamed1566() { | |
| 9291 var o = new core.List<core.String>(); | |
| 9292 o.add("foo"); | |
| 9293 o.add("foo"); | |
| 9294 return o; | |
| 9295 } | |
| 9296 | |
| 9297 checkUnnamed1566(core.List<core.String> o) { | |
| 9298 unittest.expect(o, unittest.hasLength(2)); | |
| 9299 unittest.expect(o[0], unittest.equals('foo')); | |
| 9300 unittest.expect(o[1], unittest.equals('foo')); | |
| 9301 } | |
| 9302 | |
| 9303 buildUnnamed1567() { | |
| 9304 var o = new core.List<core.String>(); | |
| 9305 o.add("foo"); | |
| 9306 o.add("foo"); | |
| 9307 return o; | |
| 9308 } | |
| 9309 | |
| 9310 checkUnnamed1567(core.List<core.String> o) { | |
| 9311 unittest.expect(o, unittest.hasLength(2)); | |
| 9312 unittest.expect(o[0], unittest.equals('foo')); | |
| 9313 unittest.expect(o[1], unittest.equals('foo')); | |
| 9314 } | |
| 9315 | |
| 9316 buildUnnamed1568() { | |
| 9317 var o = new core.List<core.String>(); | |
| 9318 o.add("foo"); | |
| 9319 o.add("foo"); | |
| 9320 return o; | |
| 9321 } | |
| 9322 | |
| 9323 checkUnnamed1568(core.List<core.String> o) { | |
| 9324 unittest.expect(o, unittest.hasLength(2)); | |
| 9325 unittest.expect(o[0], unittest.equals('foo')); | |
| 9326 unittest.expect(o[1], unittest.equals('foo')); | |
| 9327 } | |
| 9328 | |
| 9329 buildUnnamed1569() { | |
| 9330 var o = new core.List<core.String>(); | |
| 9331 o.add("foo"); | |
| 9332 o.add("foo"); | |
| 9333 return o; | |
| 9334 } | |
| 9335 | |
| 9336 checkUnnamed1569(core.List<core.String> o) { | |
| 9337 unittest.expect(o, unittest.hasLength(2)); | |
| 9338 unittest.expect(o[0], unittest.equals('foo')); | |
| 9339 unittest.expect(o[1], unittest.equals('foo')); | |
| 9340 } | |
| 9341 | |
| 9342 buildUnnamed1570() { | |
| 9343 var o = new core.List<core.String>(); | |
| 9344 o.add("foo"); | |
| 9345 o.add("foo"); | |
| 9346 return o; | |
| 9347 } | |
| 9348 | |
| 9349 checkUnnamed1570(core.List<core.String> o) { | |
| 9350 unittest.expect(o, unittest.hasLength(2)); | |
| 9351 unittest.expect(o[0], unittest.equals('foo')); | |
| 9352 unittest.expect(o[1], unittest.equals('foo')); | |
| 9353 } | |
| 9354 | |
| 9355 buildUnnamed1571() { | |
| 9356 var o = new core.List<core.String>(); | |
| 9357 o.add("foo"); | |
| 9358 o.add("foo"); | |
| 9359 return o; | |
| 9360 } | |
| 9361 | |
| 9362 checkUnnamed1571(core.List<core.String> o) { | |
| 9363 unittest.expect(o, unittest.hasLength(2)); | |
| 9364 unittest.expect(o[0], unittest.equals('foo')); | |
| 9365 unittest.expect(o[1], unittest.equals('foo')); | |
| 9366 } | |
| 9367 | |
| 9368 buildUnnamed1572() { | |
| 9369 var o = new core.List<core.String>(); | |
| 9370 o.add("foo"); | |
| 9371 o.add("foo"); | |
| 9372 return o; | |
| 9373 } | |
| 9374 | |
| 9375 checkUnnamed1572(core.List<core.String> o) { | |
| 9376 unittest.expect(o, unittest.hasLength(2)); | |
| 9377 unittest.expect(o[0], unittest.equals('foo')); | |
| 9378 unittest.expect(o[1], unittest.equals('foo')); | |
| 9379 } | |
| 9380 | |
| 9381 buildUnnamed1573() { | |
| 9382 var o = new core.List<core.String>(); | |
| 9383 o.add("foo"); | |
| 9384 o.add("foo"); | |
| 9385 return o; | |
| 9386 } | |
| 9387 | |
| 9388 checkUnnamed1573(core.List<core.String> o) { | |
| 9389 unittest.expect(o, unittest.hasLength(2)); | |
| 9390 unittest.expect(o[0], unittest.equals('foo')); | |
| 9391 unittest.expect(o[1], unittest.equals('foo')); | |
| 9392 } | |
| 9393 | |
| 9394 buildUnnamed1574() { | |
| 9395 var o = new core.List<core.String>(); | |
| 9396 o.add("foo"); | |
| 9397 o.add("foo"); | |
| 9398 return o; | |
| 9399 } | |
| 9400 | |
| 9401 checkUnnamed1574(core.List<core.String> o) { | |
| 9402 unittest.expect(o, unittest.hasLength(2)); | |
| 9403 unittest.expect(o[0], unittest.equals('foo')); | |
| 9404 unittest.expect(o[1], unittest.equals('foo')); | |
| 9405 } | |
| 9406 | |
| 9407 buildUnnamed1575() { | |
| 9408 var o = new core.List<core.String>(); | |
| 9409 o.add("foo"); | |
| 9410 o.add("foo"); | |
| 9411 return o; | |
| 9412 } | |
| 9413 | |
| 9414 checkUnnamed1575(core.List<core.String> o) { | |
| 9415 unittest.expect(o, unittest.hasLength(2)); | |
| 9416 unittest.expect(o[0], unittest.equals('foo')); | |
| 9417 unittest.expect(o[1], unittest.equals('foo')); | |
| 9418 } | |
| 9419 | |
| 9420 | |
| 9421 main() { | |
| 9422 unittest.group("obj-schema-Account", () { | |
| 9423 unittest.test("to-json--from-json", () { | |
| 9424 var o = buildAccount(); | |
| 9425 var od = new api.Account.fromJson(o.toJson()); | |
| 9426 checkAccount(od); | |
| 9427 }); | |
| 9428 }); | |
| 9429 | |
| 9430 | |
| 9431 unittest.group("obj-schema-AccountActiveAdSummary", () { | |
| 9432 unittest.test("to-json--from-json", () { | |
| 9433 var o = buildAccountActiveAdSummary(); | |
| 9434 var od = new api.AccountActiveAdSummary.fromJson(o.toJson()); | |
| 9435 checkAccountActiveAdSummary(od); | |
| 9436 }); | |
| 9437 }); | |
| 9438 | |
| 9439 | |
| 9440 unittest.group("obj-schema-AccountPermission", () { | |
| 9441 unittest.test("to-json--from-json", () { | |
| 9442 var o = buildAccountPermission(); | |
| 9443 var od = new api.AccountPermission.fromJson(o.toJson()); | |
| 9444 checkAccountPermission(od); | |
| 9445 }); | |
| 9446 }); | |
| 9447 | |
| 9448 | |
| 9449 unittest.group("obj-schema-AccountPermissionGroup", () { | |
| 9450 unittest.test("to-json--from-json", () { | |
| 9451 var o = buildAccountPermissionGroup(); | |
| 9452 var od = new api.AccountPermissionGroup.fromJson(o.toJson()); | |
| 9453 checkAccountPermissionGroup(od); | |
| 9454 }); | |
| 9455 }); | |
| 9456 | |
| 9457 | |
| 9458 unittest.group("obj-schema-AccountPermissionGroupsListResponse", () { | |
| 9459 unittest.test("to-json--from-json", () { | |
| 9460 var o = buildAccountPermissionGroupsListResponse(); | |
| 9461 var od = new api.AccountPermissionGroupsListResponse.fromJson(o.toJson()); | |
| 9462 checkAccountPermissionGroupsListResponse(od); | |
| 9463 }); | |
| 9464 }); | |
| 9465 | |
| 9466 | |
| 9467 unittest.group("obj-schema-AccountPermissionsListResponse", () { | |
| 9468 unittest.test("to-json--from-json", () { | |
| 9469 var o = buildAccountPermissionsListResponse(); | |
| 9470 var od = new api.AccountPermissionsListResponse.fromJson(o.toJson()); | |
| 9471 checkAccountPermissionsListResponse(od); | |
| 9472 }); | |
| 9473 }); | |
| 9474 | |
| 9475 | |
| 9476 unittest.group("obj-schema-AccountUserProfile", () { | |
| 9477 unittest.test("to-json--from-json", () { | |
| 9478 var o = buildAccountUserProfile(); | |
| 9479 var od = new api.AccountUserProfile.fromJson(o.toJson()); | |
| 9480 checkAccountUserProfile(od); | |
| 9481 }); | |
| 9482 }); | |
| 9483 | |
| 9484 | |
| 9485 unittest.group("obj-schema-AccountUserProfilesListResponse", () { | |
| 9486 unittest.test("to-json--from-json", () { | |
| 9487 var o = buildAccountUserProfilesListResponse(); | |
| 9488 var od = new api.AccountUserProfilesListResponse.fromJson(o.toJson()); | |
| 9489 checkAccountUserProfilesListResponse(od); | |
| 9490 }); | |
| 9491 }); | |
| 9492 | |
| 9493 | |
| 9494 unittest.group("obj-schema-AccountsListResponse", () { | |
| 9495 unittest.test("to-json--from-json", () { | |
| 9496 var o = buildAccountsListResponse(); | |
| 9497 var od = new api.AccountsListResponse.fromJson(o.toJson()); | |
| 9498 checkAccountsListResponse(od); | |
| 9499 }); | |
| 9500 }); | |
| 9501 | |
| 9502 | |
| 9503 unittest.group("obj-schema-Activities", () { | |
| 9504 unittest.test("to-json--from-json", () { | |
| 9505 var o = buildActivities(); | |
| 9506 var od = new api.Activities.fromJson(o.toJson()); | |
| 9507 checkActivities(od); | |
| 9508 }); | |
| 9509 }); | |
| 9510 | |
| 9511 | |
| 9512 unittest.group("obj-schema-Ad", () { | |
| 9513 unittest.test("to-json--from-json", () { | |
| 9514 var o = buildAd(); | |
| 9515 var od = new api.Ad.fromJson(o.toJson()); | |
| 9516 checkAd(od); | |
| 9517 }); | |
| 9518 }); | |
| 9519 | |
| 9520 | |
| 9521 unittest.group("obj-schema-AdSlot", () { | |
| 9522 unittest.test("to-json--from-json", () { | |
| 9523 var o = buildAdSlot(); | |
| 9524 var od = new api.AdSlot.fromJson(o.toJson()); | |
| 9525 checkAdSlot(od); | |
| 9526 }); | |
| 9527 }); | |
| 9528 | |
| 9529 | |
| 9530 unittest.group("obj-schema-AdsListResponse", () { | |
| 9531 unittest.test("to-json--from-json", () { | |
| 9532 var o = buildAdsListResponse(); | |
| 9533 var od = new api.AdsListResponse.fromJson(o.toJson()); | |
| 9534 checkAdsListResponse(od); | |
| 9535 }); | |
| 9536 }); | |
| 9537 | |
| 9538 | |
| 9539 unittest.group("obj-schema-Advertiser", () { | |
| 9540 unittest.test("to-json--from-json", () { | |
| 9541 var o = buildAdvertiser(); | |
| 9542 var od = new api.Advertiser.fromJson(o.toJson()); | |
| 9543 checkAdvertiser(od); | |
| 9544 }); | |
| 9545 }); | |
| 9546 | |
| 9547 | |
| 9548 unittest.group("obj-schema-AdvertiserGroup", () { | |
| 9549 unittest.test("to-json--from-json", () { | |
| 9550 var o = buildAdvertiserGroup(); | |
| 9551 var od = new api.AdvertiserGroup.fromJson(o.toJson()); | |
| 9552 checkAdvertiserGroup(od); | |
| 9553 }); | |
| 9554 }); | |
| 9555 | |
| 9556 | |
| 9557 unittest.group("obj-schema-AdvertiserGroupsListResponse", () { | |
| 9558 unittest.test("to-json--from-json", () { | |
| 9559 var o = buildAdvertiserGroupsListResponse(); | |
| 9560 var od = new api.AdvertiserGroupsListResponse.fromJson(o.toJson()); | |
| 9561 checkAdvertiserGroupsListResponse(od); | |
| 9562 }); | |
| 9563 }); | |
| 9564 | |
| 9565 | |
| 9566 unittest.group("obj-schema-AdvertisersListResponse", () { | |
| 9567 unittest.test("to-json--from-json", () { | |
| 9568 var o = buildAdvertisersListResponse(); | |
| 9569 var od = new api.AdvertisersListResponse.fromJson(o.toJson()); | |
| 9570 checkAdvertisersListResponse(od); | |
| 9571 }); | |
| 9572 }); | |
| 9573 | |
| 9574 | |
| 9575 unittest.group("obj-schema-AudienceSegment", () { | |
| 9576 unittest.test("to-json--from-json", () { | |
| 9577 var o = buildAudienceSegment(); | |
| 9578 var od = new api.AudienceSegment.fromJson(o.toJson()); | |
| 9579 checkAudienceSegment(od); | |
| 9580 }); | |
| 9581 }); | |
| 9582 | |
| 9583 | |
| 9584 unittest.group("obj-schema-AudienceSegmentGroup", () { | |
| 9585 unittest.test("to-json--from-json", () { | |
| 9586 var o = buildAudienceSegmentGroup(); | |
| 9587 var od = new api.AudienceSegmentGroup.fromJson(o.toJson()); | |
| 9588 checkAudienceSegmentGroup(od); | |
| 9589 }); | |
| 9590 }); | |
| 9591 | |
| 9592 | |
| 9593 unittest.group("obj-schema-Browser", () { | |
| 9594 unittest.test("to-json--from-json", () { | |
| 9595 var o = buildBrowser(); | |
| 9596 var od = new api.Browser.fromJson(o.toJson()); | |
| 9597 checkBrowser(od); | |
| 9598 }); | |
| 9599 }); | |
| 9600 | |
| 9601 | |
| 9602 unittest.group("obj-schema-BrowsersListResponse", () { | |
| 9603 unittest.test("to-json--from-json", () { | |
| 9604 var o = buildBrowsersListResponse(); | |
| 9605 var od = new api.BrowsersListResponse.fromJson(o.toJson()); | |
| 9606 checkBrowsersListResponse(od); | |
| 9607 }); | |
| 9608 }); | |
| 9609 | |
| 9610 | |
| 9611 unittest.group("obj-schema-Campaign", () { | |
| 9612 unittest.test("to-json--from-json", () { | |
| 9613 var o = buildCampaign(); | |
| 9614 var od = new api.Campaign.fromJson(o.toJson()); | |
| 9615 checkCampaign(od); | |
| 9616 }); | |
| 9617 }); | |
| 9618 | |
| 9619 | |
| 9620 unittest.group("obj-schema-CampaignCreativeAssociation", () { | |
| 9621 unittest.test("to-json--from-json", () { | |
| 9622 var o = buildCampaignCreativeAssociation(); | |
| 9623 var od = new api.CampaignCreativeAssociation.fromJson(o.toJson()); | |
| 9624 checkCampaignCreativeAssociation(od); | |
| 9625 }); | |
| 9626 }); | |
| 9627 | |
| 9628 | |
| 9629 unittest.group("obj-schema-CampaignCreativeAssociationsListResponse", () { | |
| 9630 unittest.test("to-json--from-json", () { | |
| 9631 var o = buildCampaignCreativeAssociationsListResponse(); | |
| 9632 var od = new api.CampaignCreativeAssociationsListResponse.fromJson(o.toJso
n()); | |
| 9633 checkCampaignCreativeAssociationsListResponse(od); | |
| 9634 }); | |
| 9635 }); | |
| 9636 | |
| 9637 | |
| 9638 unittest.group("obj-schema-CampaignsListResponse", () { | |
| 9639 unittest.test("to-json--from-json", () { | |
| 9640 var o = buildCampaignsListResponse(); | |
| 9641 var od = new api.CampaignsListResponse.fromJson(o.toJson()); | |
| 9642 checkCampaignsListResponse(od); | |
| 9643 }); | |
| 9644 }); | |
| 9645 | |
| 9646 | |
| 9647 unittest.group("obj-schema-ChangeLog", () { | |
| 9648 unittest.test("to-json--from-json", () { | |
| 9649 var o = buildChangeLog(); | |
| 9650 var od = new api.ChangeLog.fromJson(o.toJson()); | |
| 9651 checkChangeLog(od); | |
| 9652 }); | |
| 9653 }); | |
| 9654 | |
| 9655 | |
| 9656 unittest.group("obj-schema-ChangeLogsListResponse", () { | |
| 9657 unittest.test("to-json--from-json", () { | |
| 9658 var o = buildChangeLogsListResponse(); | |
| 9659 var od = new api.ChangeLogsListResponse.fromJson(o.toJson()); | |
| 9660 checkChangeLogsListResponse(od); | |
| 9661 }); | |
| 9662 }); | |
| 9663 | |
| 9664 | |
| 9665 unittest.group("obj-schema-CitiesListResponse", () { | |
| 9666 unittest.test("to-json--from-json", () { | |
| 9667 var o = buildCitiesListResponse(); | |
| 9668 var od = new api.CitiesListResponse.fromJson(o.toJson()); | |
| 9669 checkCitiesListResponse(od); | |
| 9670 }); | |
| 9671 }); | |
| 9672 | |
| 9673 | |
| 9674 unittest.group("obj-schema-City", () { | |
| 9675 unittest.test("to-json--from-json", () { | |
| 9676 var o = buildCity(); | |
| 9677 var od = new api.City.fromJson(o.toJson()); | |
| 9678 checkCity(od); | |
| 9679 }); | |
| 9680 }); | |
| 9681 | |
| 9682 | |
| 9683 unittest.group("obj-schema-ClickTag", () { | |
| 9684 unittest.test("to-json--from-json", () { | |
| 9685 var o = buildClickTag(); | |
| 9686 var od = new api.ClickTag.fromJson(o.toJson()); | |
| 9687 checkClickTag(od); | |
| 9688 }); | |
| 9689 }); | |
| 9690 | |
| 9691 | |
| 9692 unittest.group("obj-schema-ClickThroughUrl", () { | |
| 9693 unittest.test("to-json--from-json", () { | |
| 9694 var o = buildClickThroughUrl(); | |
| 9695 var od = new api.ClickThroughUrl.fromJson(o.toJson()); | |
| 9696 checkClickThroughUrl(od); | |
| 9697 }); | |
| 9698 }); | |
| 9699 | |
| 9700 | |
| 9701 unittest.group("obj-schema-ClickThroughUrlSuffixProperties", () { | |
| 9702 unittest.test("to-json--from-json", () { | |
| 9703 var o = buildClickThroughUrlSuffixProperties(); | |
| 9704 var od = new api.ClickThroughUrlSuffixProperties.fromJson(o.toJson()); | |
| 9705 checkClickThroughUrlSuffixProperties(od); | |
| 9706 }); | |
| 9707 }); | |
| 9708 | |
| 9709 | |
| 9710 unittest.group("obj-schema-CompanionClickThroughOverride", () { | |
| 9711 unittest.test("to-json--from-json", () { | |
| 9712 var o = buildCompanionClickThroughOverride(); | |
| 9713 var od = new api.CompanionClickThroughOverride.fromJson(o.toJson()); | |
| 9714 checkCompanionClickThroughOverride(od); | |
| 9715 }); | |
| 9716 }); | |
| 9717 | |
| 9718 | |
| 9719 unittest.group("obj-schema-CompatibleFields", () { | |
| 9720 unittest.test("to-json--from-json", () { | |
| 9721 var o = buildCompatibleFields(); | |
| 9722 var od = new api.CompatibleFields.fromJson(o.toJson()); | |
| 9723 checkCompatibleFields(od); | |
| 9724 }); | |
| 9725 }); | |
| 9726 | |
| 9727 | |
| 9728 unittest.group("obj-schema-ConnectionType", () { | |
| 9729 unittest.test("to-json--from-json", () { | |
| 9730 var o = buildConnectionType(); | |
| 9731 var od = new api.ConnectionType.fromJson(o.toJson()); | |
| 9732 checkConnectionType(od); | |
| 9733 }); | |
| 9734 }); | |
| 9735 | |
| 9736 | |
| 9737 unittest.group("obj-schema-ConnectionTypesListResponse", () { | |
| 9738 unittest.test("to-json--from-json", () { | |
| 9739 var o = buildConnectionTypesListResponse(); | |
| 9740 var od = new api.ConnectionTypesListResponse.fromJson(o.toJson()); | |
| 9741 checkConnectionTypesListResponse(od); | |
| 9742 }); | |
| 9743 }); | |
| 9744 | |
| 9745 | |
| 9746 unittest.group("obj-schema-ContentCategoriesListResponse", () { | |
| 9747 unittest.test("to-json--from-json", () { | |
| 9748 var o = buildContentCategoriesListResponse(); | |
| 9749 var od = new api.ContentCategoriesListResponse.fromJson(o.toJson()); | |
| 9750 checkContentCategoriesListResponse(od); | |
| 9751 }); | |
| 9752 }); | |
| 9753 | |
| 9754 | |
| 9755 unittest.group("obj-schema-ContentCategory", () { | |
| 9756 unittest.test("to-json--from-json", () { | |
| 9757 var o = buildContentCategory(); | |
| 9758 var od = new api.ContentCategory.fromJson(o.toJson()); | |
| 9759 checkContentCategory(od); | |
| 9760 }); | |
| 9761 }); | |
| 9762 | |
| 9763 | |
| 9764 unittest.group("obj-schema-Conversion", () { | |
| 9765 unittest.test("to-json--from-json", () { | |
| 9766 var o = buildConversion(); | |
| 9767 var od = new api.Conversion.fromJson(o.toJson()); | |
| 9768 checkConversion(od); | |
| 9769 }); | |
| 9770 }); | |
| 9771 | |
| 9772 | |
| 9773 unittest.group("obj-schema-ConversionError", () { | |
| 9774 unittest.test("to-json--from-json", () { | |
| 9775 var o = buildConversionError(); | |
| 9776 var od = new api.ConversionError.fromJson(o.toJson()); | |
| 9777 checkConversionError(od); | |
| 9778 }); | |
| 9779 }); | |
| 9780 | |
| 9781 | |
| 9782 unittest.group("obj-schema-ConversionStatus", () { | |
| 9783 unittest.test("to-json--from-json", () { | |
| 9784 var o = buildConversionStatus(); | |
| 9785 var od = new api.ConversionStatus.fromJson(o.toJson()); | |
| 9786 checkConversionStatus(od); | |
| 9787 }); | |
| 9788 }); | |
| 9789 | |
| 9790 | |
| 9791 unittest.group("obj-schema-ConversionsBatchInsertRequest", () { | |
| 9792 unittest.test("to-json--from-json", () { | |
| 9793 var o = buildConversionsBatchInsertRequest(); | |
| 9794 var od = new api.ConversionsBatchInsertRequest.fromJson(o.toJson()); | |
| 9795 checkConversionsBatchInsertRequest(od); | |
| 9796 }); | |
| 9797 }); | |
| 9798 | |
| 9799 | |
| 9800 unittest.group("obj-schema-ConversionsBatchInsertResponse", () { | |
| 9801 unittest.test("to-json--from-json", () { | |
| 9802 var o = buildConversionsBatchInsertResponse(); | |
| 9803 var od = new api.ConversionsBatchInsertResponse.fromJson(o.toJson()); | |
| 9804 checkConversionsBatchInsertResponse(od); | |
| 9805 }); | |
| 9806 }); | |
| 9807 | |
| 9808 | |
| 9809 unittest.group("obj-schema-CountriesListResponse", () { | |
| 9810 unittest.test("to-json--from-json", () { | |
| 9811 var o = buildCountriesListResponse(); | |
| 9812 var od = new api.CountriesListResponse.fromJson(o.toJson()); | |
| 9813 checkCountriesListResponse(od); | |
| 9814 }); | |
| 9815 }); | |
| 9816 | |
| 9817 | |
| 9818 unittest.group("obj-schema-Country", () { | |
| 9819 unittest.test("to-json--from-json", () { | |
| 9820 var o = buildCountry(); | |
| 9821 var od = new api.Country.fromJson(o.toJson()); | |
| 9822 checkCountry(od); | |
| 9823 }); | |
| 9824 }); | |
| 9825 | |
| 9826 | |
| 9827 unittest.group("obj-schema-Creative", () { | |
| 9828 unittest.test("to-json--from-json", () { | |
| 9829 var o = buildCreative(); | |
| 9830 var od = new api.Creative.fromJson(o.toJson()); | |
| 9831 checkCreative(od); | |
| 9832 }); | |
| 9833 }); | |
| 9834 | |
| 9835 | |
| 9836 unittest.group("obj-schema-CreativeAsset", () { | |
| 9837 unittest.test("to-json--from-json", () { | |
| 9838 var o = buildCreativeAsset(); | |
| 9839 var od = new api.CreativeAsset.fromJson(o.toJson()); | |
| 9840 checkCreativeAsset(od); | |
| 9841 }); | |
| 9842 }); | |
| 9843 | |
| 9844 | |
| 9845 unittest.group("obj-schema-CreativeAssetId", () { | |
| 9846 unittest.test("to-json--from-json", () { | |
| 9847 var o = buildCreativeAssetId(); | |
| 9848 var od = new api.CreativeAssetId.fromJson(o.toJson()); | |
| 9849 checkCreativeAssetId(od); | |
| 9850 }); | |
| 9851 }); | |
| 9852 | |
| 9853 | |
| 9854 unittest.group("obj-schema-CreativeAssetMetadata", () { | |
| 9855 unittest.test("to-json--from-json", () { | |
| 9856 var o = buildCreativeAssetMetadata(); | |
| 9857 var od = new api.CreativeAssetMetadata.fromJson(o.toJson()); | |
| 9858 checkCreativeAssetMetadata(od); | |
| 9859 }); | |
| 9860 }); | |
| 9861 | |
| 9862 | |
| 9863 unittest.group("obj-schema-CreativeAssignment", () { | |
| 9864 unittest.test("to-json--from-json", () { | |
| 9865 var o = buildCreativeAssignment(); | |
| 9866 var od = new api.CreativeAssignment.fromJson(o.toJson()); | |
| 9867 checkCreativeAssignment(od); | |
| 9868 }); | |
| 9869 }); | |
| 9870 | |
| 9871 | |
| 9872 unittest.group("obj-schema-CreativeCustomEvent", () { | |
| 9873 unittest.test("to-json--from-json", () { | |
| 9874 var o = buildCreativeCustomEvent(); | |
| 9875 var od = new api.CreativeCustomEvent.fromJson(o.toJson()); | |
| 9876 checkCreativeCustomEvent(od); | |
| 9877 }); | |
| 9878 }); | |
| 9879 | |
| 9880 | |
| 9881 unittest.group("obj-schema-CreativeField", () { | |
| 9882 unittest.test("to-json--from-json", () { | |
| 9883 var o = buildCreativeField(); | |
| 9884 var od = new api.CreativeField.fromJson(o.toJson()); | |
| 9885 checkCreativeField(od); | |
| 9886 }); | |
| 9887 }); | |
| 9888 | |
| 9889 | |
| 9890 unittest.group("obj-schema-CreativeFieldAssignment", () { | |
| 9891 unittest.test("to-json--from-json", () { | |
| 9892 var o = buildCreativeFieldAssignment(); | |
| 9893 var od = new api.CreativeFieldAssignment.fromJson(o.toJson()); | |
| 9894 checkCreativeFieldAssignment(od); | |
| 9895 }); | |
| 9896 }); | |
| 9897 | |
| 9898 | |
| 9899 unittest.group("obj-schema-CreativeFieldValue", () { | |
| 9900 unittest.test("to-json--from-json", () { | |
| 9901 var o = buildCreativeFieldValue(); | |
| 9902 var od = new api.CreativeFieldValue.fromJson(o.toJson()); | |
| 9903 checkCreativeFieldValue(od); | |
| 9904 }); | |
| 9905 }); | |
| 9906 | |
| 9907 | |
| 9908 unittest.group("obj-schema-CreativeFieldValuesListResponse", () { | |
| 9909 unittest.test("to-json--from-json", () { | |
| 9910 var o = buildCreativeFieldValuesListResponse(); | |
| 9911 var od = new api.CreativeFieldValuesListResponse.fromJson(o.toJson()); | |
| 9912 checkCreativeFieldValuesListResponse(od); | |
| 9913 }); | |
| 9914 }); | |
| 9915 | |
| 9916 | |
| 9917 unittest.group("obj-schema-CreativeFieldsListResponse", () { | |
| 9918 unittest.test("to-json--from-json", () { | |
| 9919 var o = buildCreativeFieldsListResponse(); | |
| 9920 var od = new api.CreativeFieldsListResponse.fromJson(o.toJson()); | |
| 9921 checkCreativeFieldsListResponse(od); | |
| 9922 }); | |
| 9923 }); | |
| 9924 | |
| 9925 | |
| 9926 unittest.group("obj-schema-CreativeGroup", () { | |
| 9927 unittest.test("to-json--from-json", () { | |
| 9928 var o = buildCreativeGroup(); | |
| 9929 var od = new api.CreativeGroup.fromJson(o.toJson()); | |
| 9930 checkCreativeGroup(od); | |
| 9931 }); | |
| 9932 }); | |
| 9933 | |
| 9934 | |
| 9935 unittest.group("obj-schema-CreativeGroupAssignment", () { | |
| 9936 unittest.test("to-json--from-json", () { | |
| 9937 var o = buildCreativeGroupAssignment(); | |
| 9938 var od = new api.CreativeGroupAssignment.fromJson(o.toJson()); | |
| 9939 checkCreativeGroupAssignment(od); | |
| 9940 }); | |
| 9941 }); | |
| 9942 | |
| 9943 | |
| 9944 unittest.group("obj-schema-CreativeGroupsListResponse", () { | |
| 9945 unittest.test("to-json--from-json", () { | |
| 9946 var o = buildCreativeGroupsListResponse(); | |
| 9947 var od = new api.CreativeGroupsListResponse.fromJson(o.toJson()); | |
| 9948 checkCreativeGroupsListResponse(od); | |
| 9949 }); | |
| 9950 }); | |
| 9951 | |
| 9952 | |
| 9953 unittest.group("obj-schema-CreativeOptimizationConfiguration", () { | |
| 9954 unittest.test("to-json--from-json", () { | |
| 9955 var o = buildCreativeOptimizationConfiguration(); | |
| 9956 var od = new api.CreativeOptimizationConfiguration.fromJson(o.toJson()); | |
| 9957 checkCreativeOptimizationConfiguration(od); | |
| 9958 }); | |
| 9959 }); | |
| 9960 | |
| 9961 | |
| 9962 unittest.group("obj-schema-CreativeRotation", () { | |
| 9963 unittest.test("to-json--from-json", () { | |
| 9964 var o = buildCreativeRotation(); | |
| 9965 var od = new api.CreativeRotation.fromJson(o.toJson()); | |
| 9966 checkCreativeRotation(od); | |
| 9967 }); | |
| 9968 }); | |
| 9969 | |
| 9970 | |
| 9971 unittest.group("obj-schema-CreativeSettings", () { | |
| 9972 unittest.test("to-json--from-json", () { | |
| 9973 var o = buildCreativeSettings(); | |
| 9974 var od = new api.CreativeSettings.fromJson(o.toJson()); | |
| 9975 checkCreativeSettings(od); | |
| 9976 }); | |
| 9977 }); | |
| 9978 | |
| 9979 | |
| 9980 unittest.group("obj-schema-CreativesListResponse", () { | |
| 9981 unittest.test("to-json--from-json", () { | |
| 9982 var o = buildCreativesListResponse(); | |
| 9983 var od = new api.CreativesListResponse.fromJson(o.toJson()); | |
| 9984 checkCreativesListResponse(od); | |
| 9985 }); | |
| 9986 }); | |
| 9987 | |
| 9988 | |
| 9989 unittest.group("obj-schema-CrossDimensionReachReportCompatibleFields", () { | |
| 9990 unittest.test("to-json--from-json", () { | |
| 9991 var o = buildCrossDimensionReachReportCompatibleFields(); | |
| 9992 var od = new api.CrossDimensionReachReportCompatibleFields.fromJson(o.toJs
on()); | |
| 9993 checkCrossDimensionReachReportCompatibleFields(od); | |
| 9994 }); | |
| 9995 }); | |
| 9996 | |
| 9997 | |
| 9998 unittest.group("obj-schema-CustomFloodlightVariable", () { | |
| 9999 unittest.test("to-json--from-json", () { | |
| 10000 var o = buildCustomFloodlightVariable(); | |
| 10001 var od = new api.CustomFloodlightVariable.fromJson(o.toJson()); | |
| 10002 checkCustomFloodlightVariable(od); | |
| 10003 }); | |
| 10004 }); | |
| 10005 | |
| 10006 | |
| 10007 unittest.group("obj-schema-CustomRichMediaEvents", () { | |
| 10008 unittest.test("to-json--from-json", () { | |
| 10009 var o = buildCustomRichMediaEvents(); | |
| 10010 var od = new api.CustomRichMediaEvents.fromJson(o.toJson()); | |
| 10011 checkCustomRichMediaEvents(od); | |
| 10012 }); | |
| 10013 }); | |
| 10014 | |
| 10015 | |
| 10016 unittest.group("obj-schema-DateRange", () { | |
| 10017 unittest.test("to-json--from-json", () { | |
| 10018 var o = buildDateRange(); | |
| 10019 var od = new api.DateRange.fromJson(o.toJson()); | |
| 10020 checkDateRange(od); | |
| 10021 }); | |
| 10022 }); | |
| 10023 | |
| 10024 | |
| 10025 unittest.group("obj-schema-DayPartTargeting", () { | |
| 10026 unittest.test("to-json--from-json", () { | |
| 10027 var o = buildDayPartTargeting(); | |
| 10028 var od = new api.DayPartTargeting.fromJson(o.toJson()); | |
| 10029 checkDayPartTargeting(od); | |
| 10030 }); | |
| 10031 }); | |
| 10032 | |
| 10033 | |
| 10034 unittest.group("obj-schema-DefaultClickThroughEventTagProperties", () { | |
| 10035 unittest.test("to-json--from-json", () { | |
| 10036 var o = buildDefaultClickThroughEventTagProperties(); | |
| 10037 var od = new api.DefaultClickThroughEventTagProperties.fromJson(o.toJson()
); | |
| 10038 checkDefaultClickThroughEventTagProperties(od); | |
| 10039 }); | |
| 10040 }); | |
| 10041 | |
| 10042 | |
| 10043 unittest.group("obj-schema-DeliverySchedule", () { | |
| 10044 unittest.test("to-json--from-json", () { | |
| 10045 var o = buildDeliverySchedule(); | |
| 10046 var od = new api.DeliverySchedule.fromJson(o.toJson()); | |
| 10047 checkDeliverySchedule(od); | |
| 10048 }); | |
| 10049 }); | |
| 10050 | |
| 10051 | |
| 10052 unittest.group("obj-schema-DfpSettings", () { | |
| 10053 unittest.test("to-json--from-json", () { | |
| 10054 var o = buildDfpSettings(); | |
| 10055 var od = new api.DfpSettings.fromJson(o.toJson()); | |
| 10056 checkDfpSettings(od); | |
| 10057 }); | |
| 10058 }); | |
| 10059 | |
| 10060 | |
| 10061 unittest.group("obj-schema-Dimension", () { | |
| 10062 unittest.test("to-json--from-json", () { | |
| 10063 var o = buildDimension(); | |
| 10064 var od = new api.Dimension.fromJson(o.toJson()); | |
| 10065 checkDimension(od); | |
| 10066 }); | |
| 10067 }); | |
| 10068 | |
| 10069 | |
| 10070 unittest.group("obj-schema-DimensionFilter", () { | |
| 10071 unittest.test("to-json--from-json", () { | |
| 10072 var o = buildDimensionFilter(); | |
| 10073 var od = new api.DimensionFilter.fromJson(o.toJson()); | |
| 10074 checkDimensionFilter(od); | |
| 10075 }); | |
| 10076 }); | |
| 10077 | |
| 10078 | |
| 10079 unittest.group("obj-schema-DimensionValue", () { | |
| 10080 unittest.test("to-json--from-json", () { | |
| 10081 var o = buildDimensionValue(); | |
| 10082 var od = new api.DimensionValue.fromJson(o.toJson()); | |
| 10083 checkDimensionValue(od); | |
| 10084 }); | |
| 10085 }); | |
| 10086 | |
| 10087 | |
| 10088 unittest.group("obj-schema-DimensionValueList", () { | |
| 10089 unittest.test("to-json--from-json", () { | |
| 10090 var o = buildDimensionValueList(); | |
| 10091 var od = new api.DimensionValueList.fromJson(o.toJson()); | |
| 10092 checkDimensionValueList(od); | |
| 10093 }); | |
| 10094 }); | |
| 10095 | |
| 10096 | |
| 10097 unittest.group("obj-schema-DimensionValueRequest", () { | |
| 10098 unittest.test("to-json--from-json", () { | |
| 10099 var o = buildDimensionValueRequest(); | |
| 10100 var od = new api.DimensionValueRequest.fromJson(o.toJson()); | |
| 10101 checkDimensionValueRequest(od); | |
| 10102 }); | |
| 10103 }); | |
| 10104 | |
| 10105 | |
| 10106 unittest.group("obj-schema-DirectorySite", () { | |
| 10107 unittest.test("to-json--from-json", () { | |
| 10108 var o = buildDirectorySite(); | |
| 10109 var od = new api.DirectorySite.fromJson(o.toJson()); | |
| 10110 checkDirectorySite(od); | |
| 10111 }); | |
| 10112 }); | |
| 10113 | |
| 10114 | |
| 10115 unittest.group("obj-schema-DirectorySiteContact", () { | |
| 10116 unittest.test("to-json--from-json", () { | |
| 10117 var o = buildDirectorySiteContact(); | |
| 10118 var od = new api.DirectorySiteContact.fromJson(o.toJson()); | |
| 10119 checkDirectorySiteContact(od); | |
| 10120 }); | |
| 10121 }); | |
| 10122 | |
| 10123 | |
| 10124 unittest.group("obj-schema-DirectorySiteContactAssignment", () { | |
| 10125 unittest.test("to-json--from-json", () { | |
| 10126 var o = buildDirectorySiteContactAssignment(); | |
| 10127 var od = new api.DirectorySiteContactAssignment.fromJson(o.toJson()); | |
| 10128 checkDirectorySiteContactAssignment(od); | |
| 10129 }); | |
| 10130 }); | |
| 10131 | |
| 10132 | |
| 10133 unittest.group("obj-schema-DirectorySiteContactsListResponse", () { | |
| 10134 unittest.test("to-json--from-json", () { | |
| 10135 var o = buildDirectorySiteContactsListResponse(); | |
| 10136 var od = new api.DirectorySiteContactsListResponse.fromJson(o.toJson()); | |
| 10137 checkDirectorySiteContactsListResponse(od); | |
| 10138 }); | |
| 10139 }); | |
| 10140 | |
| 10141 | |
| 10142 unittest.group("obj-schema-DirectorySiteSettings", () { | |
| 10143 unittest.test("to-json--from-json", () { | |
| 10144 var o = buildDirectorySiteSettings(); | |
| 10145 var od = new api.DirectorySiteSettings.fromJson(o.toJson()); | |
| 10146 checkDirectorySiteSettings(od); | |
| 10147 }); | |
| 10148 }); | |
| 10149 | |
| 10150 | |
| 10151 unittest.group("obj-schema-DirectorySitesListResponse", () { | |
| 10152 unittest.test("to-json--from-json", () { | |
| 10153 var o = buildDirectorySitesListResponse(); | |
| 10154 var od = new api.DirectorySitesListResponse.fromJson(o.toJson()); | |
| 10155 checkDirectorySitesListResponse(od); | |
| 10156 }); | |
| 10157 }); | |
| 10158 | |
| 10159 | |
| 10160 unittest.group("obj-schema-DynamicTargetingKey", () { | |
| 10161 unittest.test("to-json--from-json", () { | |
| 10162 var o = buildDynamicTargetingKey(); | |
| 10163 var od = new api.DynamicTargetingKey.fromJson(o.toJson()); | |
| 10164 checkDynamicTargetingKey(od); | |
| 10165 }); | |
| 10166 }); | |
| 10167 | |
| 10168 | |
| 10169 unittest.group("obj-schema-DynamicTargetingKeysListResponse", () { | |
| 10170 unittest.test("to-json--from-json", () { | |
| 10171 var o = buildDynamicTargetingKeysListResponse(); | |
| 10172 var od = new api.DynamicTargetingKeysListResponse.fromJson(o.toJson()); | |
| 10173 checkDynamicTargetingKeysListResponse(od); | |
| 10174 }); | |
| 10175 }); | |
| 10176 | |
| 10177 | |
| 10178 unittest.group("obj-schema-EncryptionInfo", () { | |
| 10179 unittest.test("to-json--from-json", () { | |
| 10180 var o = buildEncryptionInfo(); | |
| 10181 var od = new api.EncryptionInfo.fromJson(o.toJson()); | |
| 10182 checkEncryptionInfo(od); | |
| 10183 }); | |
| 10184 }); | |
| 10185 | |
| 10186 | |
| 10187 unittest.group("obj-schema-EventTag", () { | |
| 10188 unittest.test("to-json--from-json", () { | |
| 10189 var o = buildEventTag(); | |
| 10190 var od = new api.EventTag.fromJson(o.toJson()); | |
| 10191 checkEventTag(od); | |
| 10192 }); | |
| 10193 }); | |
| 10194 | |
| 10195 | |
| 10196 unittest.group("obj-schema-EventTagOverride", () { | |
| 10197 unittest.test("to-json--from-json", () { | |
| 10198 var o = buildEventTagOverride(); | |
| 10199 var od = new api.EventTagOverride.fromJson(o.toJson()); | |
| 10200 checkEventTagOverride(od); | |
| 10201 }); | |
| 10202 }); | |
| 10203 | |
| 10204 | |
| 10205 unittest.group("obj-schema-EventTagsListResponse", () { | |
| 10206 unittest.test("to-json--from-json", () { | |
| 10207 var o = buildEventTagsListResponse(); | |
| 10208 var od = new api.EventTagsListResponse.fromJson(o.toJson()); | |
| 10209 checkEventTagsListResponse(od); | |
| 10210 }); | |
| 10211 }); | |
| 10212 | |
| 10213 | |
| 10214 unittest.group("obj-schema-FileUrls", () { | |
| 10215 unittest.test("to-json--from-json", () { | |
| 10216 var o = buildFileUrls(); | |
| 10217 var od = new api.FileUrls.fromJson(o.toJson()); | |
| 10218 checkFileUrls(od); | |
| 10219 }); | |
| 10220 }); | |
| 10221 | |
| 10222 | |
| 10223 unittest.group("obj-schema-File", () { | |
| 10224 unittest.test("to-json--from-json", () { | |
| 10225 var o = buildFile(); | |
| 10226 var od = new api.File.fromJson(o.toJson()); | |
| 10227 checkFile(od); | |
| 10228 }); | |
| 10229 }); | |
| 10230 | |
| 10231 | |
| 10232 unittest.group("obj-schema-FileList", () { | |
| 10233 unittest.test("to-json--from-json", () { | |
| 10234 var o = buildFileList(); | |
| 10235 var od = new api.FileList.fromJson(o.toJson()); | |
| 10236 checkFileList(od); | |
| 10237 }); | |
| 10238 }); | |
| 10239 | |
| 10240 | |
| 10241 unittest.group("obj-schema-Flight", () { | |
| 10242 unittest.test("to-json--from-json", () { | |
| 10243 var o = buildFlight(); | |
| 10244 var od = new api.Flight.fromJson(o.toJson()); | |
| 10245 checkFlight(od); | |
| 10246 }); | |
| 10247 }); | |
| 10248 | |
| 10249 | |
| 10250 unittest.group("obj-schema-FloodlightActivitiesGenerateTagResponse", () { | |
| 10251 unittest.test("to-json--from-json", () { | |
| 10252 var o = buildFloodlightActivitiesGenerateTagResponse(); | |
| 10253 var od = new api.FloodlightActivitiesGenerateTagResponse.fromJson(o.toJson
()); | |
| 10254 checkFloodlightActivitiesGenerateTagResponse(od); | |
| 10255 }); | |
| 10256 }); | |
| 10257 | |
| 10258 | |
| 10259 unittest.group("obj-schema-FloodlightActivitiesListResponse", () { | |
| 10260 unittest.test("to-json--from-json", () { | |
| 10261 var o = buildFloodlightActivitiesListResponse(); | |
| 10262 var od = new api.FloodlightActivitiesListResponse.fromJson(o.toJson()); | |
| 10263 checkFloodlightActivitiesListResponse(od); | |
| 10264 }); | |
| 10265 }); | |
| 10266 | |
| 10267 | |
| 10268 unittest.group("obj-schema-FloodlightActivity", () { | |
| 10269 unittest.test("to-json--from-json", () { | |
| 10270 var o = buildFloodlightActivity(); | |
| 10271 var od = new api.FloodlightActivity.fromJson(o.toJson()); | |
| 10272 checkFloodlightActivity(od); | |
| 10273 }); | |
| 10274 }); | |
| 10275 | |
| 10276 | |
| 10277 unittest.group("obj-schema-FloodlightActivityDynamicTag", () { | |
| 10278 unittest.test("to-json--from-json", () { | |
| 10279 var o = buildFloodlightActivityDynamicTag(); | |
| 10280 var od = new api.FloodlightActivityDynamicTag.fromJson(o.toJson()); | |
| 10281 checkFloodlightActivityDynamicTag(od); | |
| 10282 }); | |
| 10283 }); | |
| 10284 | |
| 10285 | |
| 10286 unittest.group("obj-schema-FloodlightActivityGroup", () { | |
| 10287 unittest.test("to-json--from-json", () { | |
| 10288 var o = buildFloodlightActivityGroup(); | |
| 10289 var od = new api.FloodlightActivityGroup.fromJson(o.toJson()); | |
| 10290 checkFloodlightActivityGroup(od); | |
| 10291 }); | |
| 10292 }); | |
| 10293 | |
| 10294 | |
| 10295 unittest.group("obj-schema-FloodlightActivityGroupsListResponse", () { | |
| 10296 unittest.test("to-json--from-json", () { | |
| 10297 var o = buildFloodlightActivityGroupsListResponse(); | |
| 10298 var od = new api.FloodlightActivityGroupsListResponse.fromJson(o.toJson())
; | |
| 10299 checkFloodlightActivityGroupsListResponse(od); | |
| 10300 }); | |
| 10301 }); | |
| 10302 | |
| 10303 | |
| 10304 unittest.group("obj-schema-FloodlightActivityPublisherDynamicTag", () { | |
| 10305 unittest.test("to-json--from-json", () { | |
| 10306 var o = buildFloodlightActivityPublisherDynamicTag(); | |
| 10307 var od = new api.FloodlightActivityPublisherDynamicTag.fromJson(o.toJson()
); | |
| 10308 checkFloodlightActivityPublisherDynamicTag(od); | |
| 10309 }); | |
| 10310 }); | |
| 10311 | |
| 10312 | |
| 10313 unittest.group("obj-schema-FloodlightConfiguration", () { | |
| 10314 unittest.test("to-json--from-json", () { | |
| 10315 var o = buildFloodlightConfiguration(); | |
| 10316 var od = new api.FloodlightConfiguration.fromJson(o.toJson()); | |
| 10317 checkFloodlightConfiguration(od); | |
| 10318 }); | |
| 10319 }); | |
| 10320 | |
| 10321 | |
| 10322 unittest.group("obj-schema-FloodlightConfigurationsListResponse", () { | |
| 10323 unittest.test("to-json--from-json", () { | |
| 10324 var o = buildFloodlightConfigurationsListResponse(); | |
| 10325 var od = new api.FloodlightConfigurationsListResponse.fromJson(o.toJson())
; | |
| 10326 checkFloodlightConfigurationsListResponse(od); | |
| 10327 }); | |
| 10328 }); | |
| 10329 | |
| 10330 | |
| 10331 unittest.group("obj-schema-FloodlightReportCompatibleFields", () { | |
| 10332 unittest.test("to-json--from-json", () { | |
| 10333 var o = buildFloodlightReportCompatibleFields(); | |
| 10334 var od = new api.FloodlightReportCompatibleFields.fromJson(o.toJson()); | |
| 10335 checkFloodlightReportCompatibleFields(od); | |
| 10336 }); | |
| 10337 }); | |
| 10338 | |
| 10339 | |
| 10340 unittest.group("obj-schema-FrequencyCap", () { | |
| 10341 unittest.test("to-json--from-json", () { | |
| 10342 var o = buildFrequencyCap(); | |
| 10343 var od = new api.FrequencyCap.fromJson(o.toJson()); | |
| 10344 checkFrequencyCap(od); | |
| 10345 }); | |
| 10346 }); | |
| 10347 | |
| 10348 | |
| 10349 unittest.group("obj-schema-FsCommand", () { | |
| 10350 unittest.test("to-json--from-json", () { | |
| 10351 var o = buildFsCommand(); | |
| 10352 var od = new api.FsCommand.fromJson(o.toJson()); | |
| 10353 checkFsCommand(od); | |
| 10354 }); | |
| 10355 }); | |
| 10356 | |
| 10357 | |
| 10358 unittest.group("obj-schema-GeoTargeting", () { | |
| 10359 unittest.test("to-json--from-json", () { | |
| 10360 var o = buildGeoTargeting(); | |
| 10361 var od = new api.GeoTargeting.fromJson(o.toJson()); | |
| 10362 checkGeoTargeting(od); | |
| 10363 }); | |
| 10364 }); | |
| 10365 | |
| 10366 | |
| 10367 unittest.group("obj-schema-InventoryItem", () { | |
| 10368 unittest.test("to-json--from-json", () { | |
| 10369 var o = buildInventoryItem(); | |
| 10370 var od = new api.InventoryItem.fromJson(o.toJson()); | |
| 10371 checkInventoryItem(od); | |
| 10372 }); | |
| 10373 }); | |
| 10374 | |
| 10375 | |
| 10376 unittest.group("obj-schema-InventoryItemsListResponse", () { | |
| 10377 unittest.test("to-json--from-json", () { | |
| 10378 var o = buildInventoryItemsListResponse(); | |
| 10379 var od = new api.InventoryItemsListResponse.fromJson(o.toJson()); | |
| 10380 checkInventoryItemsListResponse(od); | |
| 10381 }); | |
| 10382 }); | |
| 10383 | |
| 10384 | |
| 10385 unittest.group("obj-schema-KeyValueTargetingExpression", () { | |
| 10386 unittest.test("to-json--from-json", () { | |
| 10387 var o = buildKeyValueTargetingExpression(); | |
| 10388 var od = new api.KeyValueTargetingExpression.fromJson(o.toJson()); | |
| 10389 checkKeyValueTargetingExpression(od); | |
| 10390 }); | |
| 10391 }); | |
| 10392 | |
| 10393 | |
| 10394 unittest.group("obj-schema-LandingPage", () { | |
| 10395 unittest.test("to-json--from-json", () { | |
| 10396 var o = buildLandingPage(); | |
| 10397 var od = new api.LandingPage.fromJson(o.toJson()); | |
| 10398 checkLandingPage(od); | |
| 10399 }); | |
| 10400 }); | |
| 10401 | |
| 10402 | |
| 10403 unittest.group("obj-schema-LandingPagesListResponse", () { | |
| 10404 unittest.test("to-json--from-json", () { | |
| 10405 var o = buildLandingPagesListResponse(); | |
| 10406 var od = new api.LandingPagesListResponse.fromJson(o.toJson()); | |
| 10407 checkLandingPagesListResponse(od); | |
| 10408 }); | |
| 10409 }); | |
| 10410 | |
| 10411 | |
| 10412 unittest.group("obj-schema-LastModifiedInfo", () { | |
| 10413 unittest.test("to-json--from-json", () { | |
| 10414 var o = buildLastModifiedInfo(); | |
| 10415 var od = new api.LastModifiedInfo.fromJson(o.toJson()); | |
| 10416 checkLastModifiedInfo(od); | |
| 10417 }); | |
| 10418 }); | |
| 10419 | |
| 10420 | |
| 10421 unittest.group("obj-schema-ListPopulationClause", () { | |
| 10422 unittest.test("to-json--from-json", () { | |
| 10423 var o = buildListPopulationClause(); | |
| 10424 var od = new api.ListPopulationClause.fromJson(o.toJson()); | |
| 10425 checkListPopulationClause(od); | |
| 10426 }); | |
| 10427 }); | |
| 10428 | |
| 10429 | |
| 10430 unittest.group("obj-schema-ListPopulationRule", () { | |
| 10431 unittest.test("to-json--from-json", () { | |
| 10432 var o = buildListPopulationRule(); | |
| 10433 var od = new api.ListPopulationRule.fromJson(o.toJson()); | |
| 10434 checkListPopulationRule(od); | |
| 10435 }); | |
| 10436 }); | |
| 10437 | |
| 10438 | |
| 10439 unittest.group("obj-schema-ListPopulationTerm", () { | |
| 10440 unittest.test("to-json--from-json", () { | |
| 10441 var o = buildListPopulationTerm(); | |
| 10442 var od = new api.ListPopulationTerm.fromJson(o.toJson()); | |
| 10443 checkListPopulationTerm(od); | |
| 10444 }); | |
| 10445 }); | |
| 10446 | |
| 10447 | |
| 10448 unittest.group("obj-schema-ListTargetingExpression", () { | |
| 10449 unittest.test("to-json--from-json", () { | |
| 10450 var o = buildListTargetingExpression(); | |
| 10451 var od = new api.ListTargetingExpression.fromJson(o.toJson()); | |
| 10452 checkListTargetingExpression(od); | |
| 10453 }); | |
| 10454 }); | |
| 10455 | |
| 10456 | |
| 10457 unittest.group("obj-schema-LookbackConfiguration", () { | |
| 10458 unittest.test("to-json--from-json", () { | |
| 10459 var o = buildLookbackConfiguration(); | |
| 10460 var od = new api.LookbackConfiguration.fromJson(o.toJson()); | |
| 10461 checkLookbackConfiguration(od); | |
| 10462 }); | |
| 10463 }); | |
| 10464 | |
| 10465 | |
| 10466 unittest.group("obj-schema-Metric", () { | |
| 10467 unittest.test("to-json--from-json", () { | |
| 10468 var o = buildMetric(); | |
| 10469 var od = new api.Metric.fromJson(o.toJson()); | |
| 10470 checkMetric(od); | |
| 10471 }); | |
| 10472 }); | |
| 10473 | |
| 10474 | |
| 10475 unittest.group("obj-schema-Metro", () { | |
| 10476 unittest.test("to-json--from-json", () { | |
| 10477 var o = buildMetro(); | |
| 10478 var od = new api.Metro.fromJson(o.toJson()); | |
| 10479 checkMetro(od); | |
| 10480 }); | |
| 10481 }); | |
| 10482 | |
| 10483 | |
| 10484 unittest.group("obj-schema-MetrosListResponse", () { | |
| 10485 unittest.test("to-json--from-json", () { | |
| 10486 var o = buildMetrosListResponse(); | |
| 10487 var od = new api.MetrosListResponse.fromJson(o.toJson()); | |
| 10488 checkMetrosListResponse(od); | |
| 10489 }); | |
| 10490 }); | |
| 10491 | |
| 10492 | |
| 10493 unittest.group("obj-schema-MobileCarrier", () { | |
| 10494 unittest.test("to-json--from-json", () { | |
| 10495 var o = buildMobileCarrier(); | |
| 10496 var od = new api.MobileCarrier.fromJson(o.toJson()); | |
| 10497 checkMobileCarrier(od); | |
| 10498 }); | |
| 10499 }); | |
| 10500 | |
| 10501 | |
| 10502 unittest.group("obj-schema-MobileCarriersListResponse", () { | |
| 10503 unittest.test("to-json--from-json", () { | |
| 10504 var o = buildMobileCarriersListResponse(); | |
| 10505 var od = new api.MobileCarriersListResponse.fromJson(o.toJson()); | |
| 10506 checkMobileCarriersListResponse(od); | |
| 10507 }); | |
| 10508 }); | |
| 10509 | |
| 10510 | |
| 10511 unittest.group("obj-schema-ObjectFilter", () { | |
| 10512 unittest.test("to-json--from-json", () { | |
| 10513 var o = buildObjectFilter(); | |
| 10514 var od = new api.ObjectFilter.fromJson(o.toJson()); | |
| 10515 checkObjectFilter(od); | |
| 10516 }); | |
| 10517 }); | |
| 10518 | |
| 10519 | |
| 10520 unittest.group("obj-schema-OffsetPosition", () { | |
| 10521 unittest.test("to-json--from-json", () { | |
| 10522 var o = buildOffsetPosition(); | |
| 10523 var od = new api.OffsetPosition.fromJson(o.toJson()); | |
| 10524 checkOffsetPosition(od); | |
| 10525 }); | |
| 10526 }); | |
| 10527 | |
| 10528 | |
| 10529 unittest.group("obj-schema-OmnitureSettings", () { | |
| 10530 unittest.test("to-json--from-json", () { | |
| 10531 var o = buildOmnitureSettings(); | |
| 10532 var od = new api.OmnitureSettings.fromJson(o.toJson()); | |
| 10533 checkOmnitureSettings(od); | |
| 10534 }); | |
| 10535 }); | |
| 10536 | |
| 10537 | |
| 10538 unittest.group("obj-schema-OperatingSystem", () { | |
| 10539 unittest.test("to-json--from-json", () { | |
| 10540 var o = buildOperatingSystem(); | |
| 10541 var od = new api.OperatingSystem.fromJson(o.toJson()); | |
| 10542 checkOperatingSystem(od); | |
| 10543 }); | |
| 10544 }); | |
| 10545 | |
| 10546 | |
| 10547 unittest.group("obj-schema-OperatingSystemVersion", () { | |
| 10548 unittest.test("to-json--from-json", () { | |
| 10549 var o = buildOperatingSystemVersion(); | |
| 10550 var od = new api.OperatingSystemVersion.fromJson(o.toJson()); | |
| 10551 checkOperatingSystemVersion(od); | |
| 10552 }); | |
| 10553 }); | |
| 10554 | |
| 10555 | |
| 10556 unittest.group("obj-schema-OperatingSystemVersionsListResponse", () { | |
| 10557 unittest.test("to-json--from-json", () { | |
| 10558 var o = buildOperatingSystemVersionsListResponse(); | |
| 10559 var od = new api.OperatingSystemVersionsListResponse.fromJson(o.toJson()); | |
| 10560 checkOperatingSystemVersionsListResponse(od); | |
| 10561 }); | |
| 10562 }); | |
| 10563 | |
| 10564 | |
| 10565 unittest.group("obj-schema-OperatingSystemsListResponse", () { | |
| 10566 unittest.test("to-json--from-json", () { | |
| 10567 var o = buildOperatingSystemsListResponse(); | |
| 10568 var od = new api.OperatingSystemsListResponse.fromJson(o.toJson()); | |
| 10569 checkOperatingSystemsListResponse(od); | |
| 10570 }); | |
| 10571 }); | |
| 10572 | |
| 10573 | |
| 10574 unittest.group("obj-schema-OptimizationActivity", () { | |
| 10575 unittest.test("to-json--from-json", () { | |
| 10576 var o = buildOptimizationActivity(); | |
| 10577 var od = new api.OptimizationActivity.fromJson(o.toJson()); | |
| 10578 checkOptimizationActivity(od); | |
| 10579 }); | |
| 10580 }); | |
| 10581 | |
| 10582 | |
| 10583 unittest.group("obj-schema-Order", () { | |
| 10584 unittest.test("to-json--from-json", () { | |
| 10585 var o = buildOrder(); | |
| 10586 var od = new api.Order.fromJson(o.toJson()); | |
| 10587 checkOrder(od); | |
| 10588 }); | |
| 10589 }); | |
| 10590 | |
| 10591 | |
| 10592 unittest.group("obj-schema-OrderContact", () { | |
| 10593 unittest.test("to-json--from-json", () { | |
| 10594 var o = buildOrderContact(); | |
| 10595 var od = new api.OrderContact.fromJson(o.toJson()); | |
| 10596 checkOrderContact(od); | |
| 10597 }); | |
| 10598 }); | |
| 10599 | |
| 10600 | |
| 10601 unittest.group("obj-schema-OrderDocument", () { | |
| 10602 unittest.test("to-json--from-json", () { | |
| 10603 var o = buildOrderDocument(); | |
| 10604 var od = new api.OrderDocument.fromJson(o.toJson()); | |
| 10605 checkOrderDocument(od); | |
| 10606 }); | |
| 10607 }); | |
| 10608 | |
| 10609 | |
| 10610 unittest.group("obj-schema-OrderDocumentsListResponse", () { | |
| 10611 unittest.test("to-json--from-json", () { | |
| 10612 var o = buildOrderDocumentsListResponse(); | |
| 10613 var od = new api.OrderDocumentsListResponse.fromJson(o.toJson()); | |
| 10614 checkOrderDocumentsListResponse(od); | |
| 10615 }); | |
| 10616 }); | |
| 10617 | |
| 10618 | |
| 10619 unittest.group("obj-schema-OrdersListResponse", () { | |
| 10620 unittest.test("to-json--from-json", () { | |
| 10621 var o = buildOrdersListResponse(); | |
| 10622 var od = new api.OrdersListResponse.fromJson(o.toJson()); | |
| 10623 checkOrdersListResponse(od); | |
| 10624 }); | |
| 10625 }); | |
| 10626 | |
| 10627 | |
| 10628 unittest.group("obj-schema-PathToConversionReportCompatibleFields", () { | |
| 10629 unittest.test("to-json--from-json", () { | |
| 10630 var o = buildPathToConversionReportCompatibleFields(); | |
| 10631 var od = new api.PathToConversionReportCompatibleFields.fromJson(o.toJson(
)); | |
| 10632 checkPathToConversionReportCompatibleFields(od); | |
| 10633 }); | |
| 10634 }); | |
| 10635 | |
| 10636 | |
| 10637 unittest.group("obj-schema-Placement", () { | |
| 10638 unittest.test("to-json--from-json", () { | |
| 10639 var o = buildPlacement(); | |
| 10640 var od = new api.Placement.fromJson(o.toJson()); | |
| 10641 checkPlacement(od); | |
| 10642 }); | |
| 10643 }); | |
| 10644 | |
| 10645 | |
| 10646 unittest.group("obj-schema-PlacementAssignment", () { | |
| 10647 unittest.test("to-json--from-json", () { | |
| 10648 var o = buildPlacementAssignment(); | |
| 10649 var od = new api.PlacementAssignment.fromJson(o.toJson()); | |
| 10650 checkPlacementAssignment(od); | |
| 10651 }); | |
| 10652 }); | |
| 10653 | |
| 10654 | |
| 10655 unittest.group("obj-schema-PlacementGroup", () { | |
| 10656 unittest.test("to-json--from-json", () { | |
| 10657 var o = buildPlacementGroup(); | |
| 10658 var od = new api.PlacementGroup.fromJson(o.toJson()); | |
| 10659 checkPlacementGroup(od); | |
| 10660 }); | |
| 10661 }); | |
| 10662 | |
| 10663 | |
| 10664 unittest.group("obj-schema-PlacementGroupsListResponse", () { | |
| 10665 unittest.test("to-json--from-json", () { | |
| 10666 var o = buildPlacementGroupsListResponse(); | |
| 10667 var od = new api.PlacementGroupsListResponse.fromJson(o.toJson()); | |
| 10668 checkPlacementGroupsListResponse(od); | |
| 10669 }); | |
| 10670 }); | |
| 10671 | |
| 10672 | |
| 10673 unittest.group("obj-schema-PlacementStrategiesListResponse", () { | |
| 10674 unittest.test("to-json--from-json", () { | |
| 10675 var o = buildPlacementStrategiesListResponse(); | |
| 10676 var od = new api.PlacementStrategiesListResponse.fromJson(o.toJson()); | |
| 10677 checkPlacementStrategiesListResponse(od); | |
| 10678 }); | |
| 10679 }); | |
| 10680 | |
| 10681 | |
| 10682 unittest.group("obj-schema-PlacementStrategy", () { | |
| 10683 unittest.test("to-json--from-json", () { | |
| 10684 var o = buildPlacementStrategy(); | |
| 10685 var od = new api.PlacementStrategy.fromJson(o.toJson()); | |
| 10686 checkPlacementStrategy(od); | |
| 10687 }); | |
| 10688 }); | |
| 10689 | |
| 10690 | |
| 10691 unittest.group("obj-schema-PlacementTag", () { | |
| 10692 unittest.test("to-json--from-json", () { | |
| 10693 var o = buildPlacementTag(); | |
| 10694 var od = new api.PlacementTag.fromJson(o.toJson()); | |
| 10695 checkPlacementTag(od); | |
| 10696 }); | |
| 10697 }); | |
| 10698 | |
| 10699 | |
| 10700 unittest.group("obj-schema-PlacementsGenerateTagsResponse", () { | |
| 10701 unittest.test("to-json--from-json", () { | |
| 10702 var o = buildPlacementsGenerateTagsResponse(); | |
| 10703 var od = new api.PlacementsGenerateTagsResponse.fromJson(o.toJson()); | |
| 10704 checkPlacementsGenerateTagsResponse(od); | |
| 10705 }); | |
| 10706 }); | |
| 10707 | |
| 10708 | |
| 10709 unittest.group("obj-schema-PlacementsListResponse", () { | |
| 10710 unittest.test("to-json--from-json", () { | |
| 10711 var o = buildPlacementsListResponse(); | |
| 10712 var od = new api.PlacementsListResponse.fromJson(o.toJson()); | |
| 10713 checkPlacementsListResponse(od); | |
| 10714 }); | |
| 10715 }); | |
| 10716 | |
| 10717 | |
| 10718 unittest.group("obj-schema-PlatformType", () { | |
| 10719 unittest.test("to-json--from-json", () { | |
| 10720 var o = buildPlatformType(); | |
| 10721 var od = new api.PlatformType.fromJson(o.toJson()); | |
| 10722 checkPlatformType(od); | |
| 10723 }); | |
| 10724 }); | |
| 10725 | |
| 10726 | |
| 10727 unittest.group("obj-schema-PlatformTypesListResponse", () { | |
| 10728 unittest.test("to-json--from-json", () { | |
| 10729 var o = buildPlatformTypesListResponse(); | |
| 10730 var od = new api.PlatformTypesListResponse.fromJson(o.toJson()); | |
| 10731 checkPlatformTypesListResponse(od); | |
| 10732 }); | |
| 10733 }); | |
| 10734 | |
| 10735 | |
| 10736 unittest.group("obj-schema-PopupWindowProperties", () { | |
| 10737 unittest.test("to-json--from-json", () { | |
| 10738 var o = buildPopupWindowProperties(); | |
| 10739 var od = new api.PopupWindowProperties.fromJson(o.toJson()); | |
| 10740 checkPopupWindowProperties(od); | |
| 10741 }); | |
| 10742 }); | |
| 10743 | |
| 10744 | |
| 10745 unittest.group("obj-schema-PostalCode", () { | |
| 10746 unittest.test("to-json--from-json", () { | |
| 10747 var o = buildPostalCode(); | |
| 10748 var od = new api.PostalCode.fromJson(o.toJson()); | |
| 10749 checkPostalCode(od); | |
| 10750 }); | |
| 10751 }); | |
| 10752 | |
| 10753 | |
| 10754 unittest.group("obj-schema-PostalCodesListResponse", () { | |
| 10755 unittest.test("to-json--from-json", () { | |
| 10756 var o = buildPostalCodesListResponse(); | |
| 10757 var od = new api.PostalCodesListResponse.fromJson(o.toJson()); | |
| 10758 checkPostalCodesListResponse(od); | |
| 10759 }); | |
| 10760 }); | |
| 10761 | |
| 10762 | |
| 10763 unittest.group("obj-schema-Pricing", () { | |
| 10764 unittest.test("to-json--from-json", () { | |
| 10765 var o = buildPricing(); | |
| 10766 var od = new api.Pricing.fromJson(o.toJson()); | |
| 10767 checkPricing(od); | |
| 10768 }); | |
| 10769 }); | |
| 10770 | |
| 10771 | |
| 10772 unittest.group("obj-schema-PricingSchedule", () { | |
| 10773 unittest.test("to-json--from-json", () { | |
| 10774 var o = buildPricingSchedule(); | |
| 10775 var od = new api.PricingSchedule.fromJson(o.toJson()); | |
| 10776 checkPricingSchedule(od); | |
| 10777 }); | |
| 10778 }); | |
| 10779 | |
| 10780 | |
| 10781 unittest.group("obj-schema-PricingSchedulePricingPeriod", () { | |
| 10782 unittest.test("to-json--from-json", () { | |
| 10783 var o = buildPricingSchedulePricingPeriod(); | |
| 10784 var od = new api.PricingSchedulePricingPeriod.fromJson(o.toJson()); | |
| 10785 checkPricingSchedulePricingPeriod(od); | |
| 10786 }); | |
| 10787 }); | |
| 10788 | |
| 10789 | |
| 10790 unittest.group("obj-schema-Project", () { | |
| 10791 unittest.test("to-json--from-json", () { | |
| 10792 var o = buildProject(); | |
| 10793 var od = new api.Project.fromJson(o.toJson()); | |
| 10794 checkProject(od); | |
| 10795 }); | |
| 10796 }); | |
| 10797 | |
| 10798 | |
| 10799 unittest.group("obj-schema-ProjectsListResponse", () { | |
| 10800 unittest.test("to-json--from-json", () { | |
| 10801 var o = buildProjectsListResponse(); | |
| 10802 var od = new api.ProjectsListResponse.fromJson(o.toJson()); | |
| 10803 checkProjectsListResponse(od); | |
| 10804 }); | |
| 10805 }); | |
| 10806 | |
| 10807 | |
| 10808 unittest.group("obj-schema-ReachReportCompatibleFields", () { | |
| 10809 unittest.test("to-json--from-json", () { | |
| 10810 var o = buildReachReportCompatibleFields(); | |
| 10811 var od = new api.ReachReportCompatibleFields.fromJson(o.toJson()); | |
| 10812 checkReachReportCompatibleFields(od); | |
| 10813 }); | |
| 10814 }); | |
| 10815 | |
| 10816 | |
| 10817 unittest.group("obj-schema-Recipient", () { | |
| 10818 unittest.test("to-json--from-json", () { | |
| 10819 var o = buildRecipient(); | |
| 10820 var od = new api.Recipient.fromJson(o.toJson()); | |
| 10821 checkRecipient(od); | |
| 10822 }); | |
| 10823 }); | |
| 10824 | |
| 10825 | |
| 10826 unittest.group("obj-schema-Region", () { | |
| 10827 unittest.test("to-json--from-json", () { | |
| 10828 var o = buildRegion(); | |
| 10829 var od = new api.Region.fromJson(o.toJson()); | |
| 10830 checkRegion(od); | |
| 10831 }); | |
| 10832 }); | |
| 10833 | |
| 10834 | |
| 10835 unittest.group("obj-schema-RegionsListResponse", () { | |
| 10836 unittest.test("to-json--from-json", () { | |
| 10837 var o = buildRegionsListResponse(); | |
| 10838 var od = new api.RegionsListResponse.fromJson(o.toJson()); | |
| 10839 checkRegionsListResponse(od); | |
| 10840 }); | |
| 10841 }); | |
| 10842 | |
| 10843 | |
| 10844 unittest.group("obj-schema-RemarketingList", () { | |
| 10845 unittest.test("to-json--from-json", () { | |
| 10846 var o = buildRemarketingList(); | |
| 10847 var od = new api.RemarketingList.fromJson(o.toJson()); | |
| 10848 checkRemarketingList(od); | |
| 10849 }); | |
| 10850 }); | |
| 10851 | |
| 10852 | |
| 10853 unittest.group("obj-schema-RemarketingListShare", () { | |
| 10854 unittest.test("to-json--from-json", () { | |
| 10855 var o = buildRemarketingListShare(); | |
| 10856 var od = new api.RemarketingListShare.fromJson(o.toJson()); | |
| 10857 checkRemarketingListShare(od); | |
| 10858 }); | |
| 10859 }); | |
| 10860 | |
| 10861 | |
| 10862 unittest.group("obj-schema-RemarketingListsListResponse", () { | |
| 10863 unittest.test("to-json--from-json", () { | |
| 10864 var o = buildRemarketingListsListResponse(); | |
| 10865 var od = new api.RemarketingListsListResponse.fromJson(o.toJson()); | |
| 10866 checkRemarketingListsListResponse(od); | |
| 10867 }); | |
| 10868 }); | |
| 10869 | |
| 10870 | |
| 10871 unittest.group("obj-schema-ReportCriteria", () { | |
| 10872 unittest.test("to-json--from-json", () { | |
| 10873 var o = buildReportCriteria(); | |
| 10874 var od = new api.ReportCriteria.fromJson(o.toJson()); | |
| 10875 checkReportCriteria(od); | |
| 10876 }); | |
| 10877 }); | |
| 10878 | |
| 10879 | |
| 10880 unittest.group("obj-schema-ReportCrossDimensionReachCriteria", () { | |
| 10881 unittest.test("to-json--from-json", () { | |
| 10882 var o = buildReportCrossDimensionReachCriteria(); | |
| 10883 var od = new api.ReportCrossDimensionReachCriteria.fromJson(o.toJson()); | |
| 10884 checkReportCrossDimensionReachCriteria(od); | |
| 10885 }); | |
| 10886 }); | |
| 10887 | |
| 10888 | |
| 10889 unittest.group("obj-schema-ReportDelivery", () { | |
| 10890 unittest.test("to-json--from-json", () { | |
| 10891 var o = buildReportDelivery(); | |
| 10892 var od = new api.ReportDelivery.fromJson(o.toJson()); | |
| 10893 checkReportDelivery(od); | |
| 10894 }); | |
| 10895 }); | |
| 10896 | |
| 10897 | |
| 10898 unittest.group("obj-schema-ReportFloodlightCriteriaReportProperties", () { | |
| 10899 unittest.test("to-json--from-json", () { | |
| 10900 var o = buildReportFloodlightCriteriaReportProperties(); | |
| 10901 var od = new api.ReportFloodlightCriteriaReportProperties.fromJson(o.toJso
n()); | |
| 10902 checkReportFloodlightCriteriaReportProperties(od); | |
| 10903 }); | |
| 10904 }); | |
| 10905 | |
| 10906 | |
| 10907 unittest.group("obj-schema-ReportFloodlightCriteria", () { | |
| 10908 unittest.test("to-json--from-json", () { | |
| 10909 var o = buildReportFloodlightCriteria(); | |
| 10910 var od = new api.ReportFloodlightCriteria.fromJson(o.toJson()); | |
| 10911 checkReportFloodlightCriteria(od); | |
| 10912 }); | |
| 10913 }); | |
| 10914 | |
| 10915 | |
| 10916 unittest.group("obj-schema-ReportPathToConversionCriteriaReportProperties", ()
{ | |
| 10917 unittest.test("to-json--from-json", () { | |
| 10918 var o = buildReportPathToConversionCriteriaReportProperties(); | |
| 10919 var od = new api.ReportPathToConversionCriteriaReportProperties.fromJson(o
.toJson()); | |
| 10920 checkReportPathToConversionCriteriaReportProperties(od); | |
| 10921 }); | |
| 10922 }); | |
| 10923 | |
| 10924 | |
| 10925 unittest.group("obj-schema-ReportPathToConversionCriteria", () { | |
| 10926 unittest.test("to-json--from-json", () { | |
| 10927 var o = buildReportPathToConversionCriteria(); | |
| 10928 var od = new api.ReportPathToConversionCriteria.fromJson(o.toJson()); | |
| 10929 checkReportPathToConversionCriteria(od); | |
| 10930 }); | |
| 10931 }); | |
| 10932 | |
| 10933 | |
| 10934 unittest.group("obj-schema-ReportReachCriteria", () { | |
| 10935 unittest.test("to-json--from-json", () { | |
| 10936 var o = buildReportReachCriteria(); | |
| 10937 var od = new api.ReportReachCriteria.fromJson(o.toJson()); | |
| 10938 checkReportReachCriteria(od); | |
| 10939 }); | |
| 10940 }); | |
| 10941 | |
| 10942 | |
| 10943 unittest.group("obj-schema-ReportSchedule", () { | |
| 10944 unittest.test("to-json--from-json", () { | |
| 10945 var o = buildReportSchedule(); | |
| 10946 var od = new api.ReportSchedule.fromJson(o.toJson()); | |
| 10947 checkReportSchedule(od); | |
| 10948 }); | |
| 10949 }); | |
| 10950 | |
| 10951 | |
| 10952 unittest.group("obj-schema-Report", () { | |
| 10953 unittest.test("to-json--from-json", () { | |
| 10954 var o = buildReport(); | |
| 10955 var od = new api.Report.fromJson(o.toJson()); | |
| 10956 checkReport(od); | |
| 10957 }); | |
| 10958 }); | |
| 10959 | |
| 10960 | |
| 10961 unittest.group("obj-schema-ReportCompatibleFields", () { | |
| 10962 unittest.test("to-json--from-json", () { | |
| 10963 var o = buildReportCompatibleFields(); | |
| 10964 var od = new api.ReportCompatibleFields.fromJson(o.toJson()); | |
| 10965 checkReportCompatibleFields(od); | |
| 10966 }); | |
| 10967 }); | |
| 10968 | |
| 10969 | |
| 10970 unittest.group("obj-schema-ReportList", () { | |
| 10971 unittest.test("to-json--from-json", () { | |
| 10972 var o = buildReportList(); | |
| 10973 var od = new api.ReportList.fromJson(o.toJson()); | |
| 10974 checkReportList(od); | |
| 10975 }); | |
| 10976 }); | |
| 10977 | |
| 10978 | |
| 10979 unittest.group("obj-schema-ReportsConfiguration", () { | |
| 10980 unittest.test("to-json--from-json", () { | |
| 10981 var o = buildReportsConfiguration(); | |
| 10982 var od = new api.ReportsConfiguration.fromJson(o.toJson()); | |
| 10983 checkReportsConfiguration(od); | |
| 10984 }); | |
| 10985 }); | |
| 10986 | |
| 10987 | |
| 10988 unittest.group("obj-schema-RichMediaExitOverride", () { | |
| 10989 unittest.test("to-json--from-json", () { | |
| 10990 var o = buildRichMediaExitOverride(); | |
| 10991 var od = new api.RichMediaExitOverride.fromJson(o.toJson()); | |
| 10992 checkRichMediaExitOverride(od); | |
| 10993 }); | |
| 10994 }); | |
| 10995 | |
| 10996 | |
| 10997 unittest.group("obj-schema-Site", () { | |
| 10998 unittest.test("to-json--from-json", () { | |
| 10999 var o = buildSite(); | |
| 11000 var od = new api.Site.fromJson(o.toJson()); | |
| 11001 checkSite(od); | |
| 11002 }); | |
| 11003 }); | |
| 11004 | |
| 11005 | |
| 11006 unittest.group("obj-schema-SiteContact", () { | |
| 11007 unittest.test("to-json--from-json", () { | |
| 11008 var o = buildSiteContact(); | |
| 11009 var od = new api.SiteContact.fromJson(o.toJson()); | |
| 11010 checkSiteContact(od); | |
| 11011 }); | |
| 11012 }); | |
| 11013 | |
| 11014 | |
| 11015 unittest.group("obj-schema-SiteSettings", () { | |
| 11016 unittest.test("to-json--from-json", () { | |
| 11017 var o = buildSiteSettings(); | |
| 11018 var od = new api.SiteSettings.fromJson(o.toJson()); | |
| 11019 checkSiteSettings(od); | |
| 11020 }); | |
| 11021 }); | |
| 11022 | |
| 11023 | |
| 11024 unittest.group("obj-schema-SitesListResponse", () { | |
| 11025 unittest.test("to-json--from-json", () { | |
| 11026 var o = buildSitesListResponse(); | |
| 11027 var od = new api.SitesListResponse.fromJson(o.toJson()); | |
| 11028 checkSitesListResponse(od); | |
| 11029 }); | |
| 11030 }); | |
| 11031 | |
| 11032 | |
| 11033 unittest.group("obj-schema-Size", () { | |
| 11034 unittest.test("to-json--from-json", () { | |
| 11035 var o = buildSize(); | |
| 11036 var od = new api.Size.fromJson(o.toJson()); | |
| 11037 checkSize(od); | |
| 11038 }); | |
| 11039 }); | |
| 11040 | |
| 11041 | |
| 11042 unittest.group("obj-schema-SizesListResponse", () { | |
| 11043 unittest.test("to-json--from-json", () { | |
| 11044 var o = buildSizesListResponse(); | |
| 11045 var od = new api.SizesListResponse.fromJson(o.toJson()); | |
| 11046 checkSizesListResponse(od); | |
| 11047 }); | |
| 11048 }); | |
| 11049 | |
| 11050 | |
| 11051 unittest.group("obj-schema-SortedDimension", () { | |
| 11052 unittest.test("to-json--from-json", () { | |
| 11053 var o = buildSortedDimension(); | |
| 11054 var od = new api.SortedDimension.fromJson(o.toJson()); | |
| 11055 checkSortedDimension(od); | |
| 11056 }); | |
| 11057 }); | |
| 11058 | |
| 11059 | |
| 11060 unittest.group("obj-schema-Subaccount", () { | |
| 11061 unittest.test("to-json--from-json", () { | |
| 11062 var o = buildSubaccount(); | |
| 11063 var od = new api.Subaccount.fromJson(o.toJson()); | |
| 11064 checkSubaccount(od); | |
| 11065 }); | |
| 11066 }); | |
| 11067 | |
| 11068 | |
| 11069 unittest.group("obj-schema-SubaccountsListResponse", () { | |
| 11070 unittest.test("to-json--from-json", () { | |
| 11071 var o = buildSubaccountsListResponse(); | |
| 11072 var od = new api.SubaccountsListResponse.fromJson(o.toJson()); | |
| 11073 checkSubaccountsListResponse(od); | |
| 11074 }); | |
| 11075 }); | |
| 11076 | |
| 11077 | |
| 11078 unittest.group("obj-schema-TagData", () { | |
| 11079 unittest.test("to-json--from-json", () { | |
| 11080 var o = buildTagData(); | |
| 11081 var od = new api.TagData.fromJson(o.toJson()); | |
| 11082 checkTagData(od); | |
| 11083 }); | |
| 11084 }); | |
| 11085 | |
| 11086 | |
| 11087 unittest.group("obj-schema-TagSetting", () { | |
| 11088 unittest.test("to-json--from-json", () { | |
| 11089 var o = buildTagSetting(); | |
| 11090 var od = new api.TagSetting.fromJson(o.toJson()); | |
| 11091 checkTagSetting(od); | |
| 11092 }); | |
| 11093 }); | |
| 11094 | |
| 11095 | |
| 11096 unittest.group("obj-schema-TagSettings", () { | |
| 11097 unittest.test("to-json--from-json", () { | |
| 11098 var o = buildTagSettings(); | |
| 11099 var od = new api.TagSettings.fromJson(o.toJson()); | |
| 11100 checkTagSettings(od); | |
| 11101 }); | |
| 11102 }); | |
| 11103 | |
| 11104 | |
| 11105 unittest.group("obj-schema-TargetWindow", () { | |
| 11106 unittest.test("to-json--from-json", () { | |
| 11107 var o = buildTargetWindow(); | |
| 11108 var od = new api.TargetWindow.fromJson(o.toJson()); | |
| 11109 checkTargetWindow(od); | |
| 11110 }); | |
| 11111 }); | |
| 11112 | |
| 11113 | |
| 11114 unittest.group("obj-schema-TargetableRemarketingList", () { | |
| 11115 unittest.test("to-json--from-json", () { | |
| 11116 var o = buildTargetableRemarketingList(); | |
| 11117 var od = new api.TargetableRemarketingList.fromJson(o.toJson()); | |
| 11118 checkTargetableRemarketingList(od); | |
| 11119 }); | |
| 11120 }); | |
| 11121 | |
| 11122 | |
| 11123 unittest.group("obj-schema-TargetableRemarketingListsListResponse", () { | |
| 11124 unittest.test("to-json--from-json", () { | |
| 11125 var o = buildTargetableRemarketingListsListResponse(); | |
| 11126 var od = new api.TargetableRemarketingListsListResponse.fromJson(o.toJson(
)); | |
| 11127 checkTargetableRemarketingListsListResponse(od); | |
| 11128 }); | |
| 11129 }); | |
| 11130 | |
| 11131 | |
| 11132 unittest.group("obj-schema-TechnologyTargeting", () { | |
| 11133 unittest.test("to-json--from-json", () { | |
| 11134 var o = buildTechnologyTargeting(); | |
| 11135 var od = new api.TechnologyTargeting.fromJson(o.toJson()); | |
| 11136 checkTechnologyTargeting(od); | |
| 11137 }); | |
| 11138 }); | |
| 11139 | |
| 11140 | |
| 11141 unittest.group("obj-schema-ThirdPartyAuthenticationToken", () { | |
| 11142 unittest.test("to-json--from-json", () { | |
| 11143 var o = buildThirdPartyAuthenticationToken(); | |
| 11144 var od = new api.ThirdPartyAuthenticationToken.fromJson(o.toJson()); | |
| 11145 checkThirdPartyAuthenticationToken(od); | |
| 11146 }); | |
| 11147 }); | |
| 11148 | |
| 11149 | |
| 11150 unittest.group("obj-schema-ThirdPartyTrackingUrl", () { | |
| 11151 unittest.test("to-json--from-json", () { | |
| 11152 var o = buildThirdPartyTrackingUrl(); | |
| 11153 var od = new api.ThirdPartyTrackingUrl.fromJson(o.toJson()); | |
| 11154 checkThirdPartyTrackingUrl(od); | |
| 11155 }); | |
| 11156 }); | |
| 11157 | |
| 11158 | |
| 11159 unittest.group("obj-schema-UserDefinedVariableConfiguration", () { | |
| 11160 unittest.test("to-json--from-json", () { | |
| 11161 var o = buildUserDefinedVariableConfiguration(); | |
| 11162 var od = new api.UserDefinedVariableConfiguration.fromJson(o.toJson()); | |
| 11163 checkUserDefinedVariableConfiguration(od); | |
| 11164 }); | |
| 11165 }); | |
| 11166 | |
| 11167 | |
| 11168 unittest.group("obj-schema-UserProfile", () { | |
| 11169 unittest.test("to-json--from-json", () { | |
| 11170 var o = buildUserProfile(); | |
| 11171 var od = new api.UserProfile.fromJson(o.toJson()); | |
| 11172 checkUserProfile(od); | |
| 11173 }); | |
| 11174 }); | |
| 11175 | |
| 11176 | |
| 11177 unittest.group("obj-schema-UserProfileList", () { | |
| 11178 unittest.test("to-json--from-json", () { | |
| 11179 var o = buildUserProfileList(); | |
| 11180 var od = new api.UserProfileList.fromJson(o.toJson()); | |
| 11181 checkUserProfileList(od); | |
| 11182 }); | |
| 11183 }); | |
| 11184 | |
| 11185 | |
| 11186 unittest.group("obj-schema-UserRole", () { | |
| 11187 unittest.test("to-json--from-json", () { | |
| 11188 var o = buildUserRole(); | |
| 11189 var od = new api.UserRole.fromJson(o.toJson()); | |
| 11190 checkUserRole(od); | |
| 11191 }); | |
| 11192 }); | |
| 11193 | |
| 11194 | |
| 11195 unittest.group("obj-schema-UserRolePermission", () { | |
| 11196 unittest.test("to-json--from-json", () { | |
| 11197 var o = buildUserRolePermission(); | |
| 11198 var od = new api.UserRolePermission.fromJson(o.toJson()); | |
| 11199 checkUserRolePermission(od); | |
| 11200 }); | |
| 11201 }); | |
| 11202 | |
| 11203 | |
| 11204 unittest.group("obj-schema-UserRolePermissionGroup", () { | |
| 11205 unittest.test("to-json--from-json", () { | |
| 11206 var o = buildUserRolePermissionGroup(); | |
| 11207 var od = new api.UserRolePermissionGroup.fromJson(o.toJson()); | |
| 11208 checkUserRolePermissionGroup(od); | |
| 11209 }); | |
| 11210 }); | |
| 11211 | |
| 11212 | |
| 11213 unittest.group("obj-schema-UserRolePermissionGroupsListResponse", () { | |
| 11214 unittest.test("to-json--from-json", () { | |
| 11215 var o = buildUserRolePermissionGroupsListResponse(); | |
| 11216 var od = new api.UserRolePermissionGroupsListResponse.fromJson(o.toJson())
; | |
| 11217 checkUserRolePermissionGroupsListResponse(od); | |
| 11218 }); | |
| 11219 }); | |
| 11220 | |
| 11221 | |
| 11222 unittest.group("obj-schema-UserRolePermissionsListResponse", () { | |
| 11223 unittest.test("to-json--from-json", () { | |
| 11224 var o = buildUserRolePermissionsListResponse(); | |
| 11225 var od = new api.UserRolePermissionsListResponse.fromJson(o.toJson()); | |
| 11226 checkUserRolePermissionsListResponse(od); | |
| 11227 }); | |
| 11228 }); | |
| 11229 | |
| 11230 | |
| 11231 unittest.group("obj-schema-UserRolesListResponse", () { | |
| 11232 unittest.test("to-json--from-json", () { | |
| 11233 var o = buildUserRolesListResponse(); | |
| 11234 var od = new api.UserRolesListResponse.fromJson(o.toJson()); | |
| 11235 checkUserRolesListResponse(od); | |
| 11236 }); | |
| 11237 }); | |
| 11238 | |
| 11239 | |
| 11240 unittest.group("resource-AccountActiveAdSummariesResourceApi", () { | |
| 11241 unittest.test("method--get", () { | |
| 11242 | |
| 11243 var mock = new HttpServerMock(); | |
| 11244 api.AccountActiveAdSummariesResourceApi res = new api.DfareportingApi(mock
).accountActiveAdSummaries; | |
| 11245 var arg_profileId = "foo"; | |
| 11246 var arg_summaryAccountId = "foo"; | |
| 11247 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 11248 var path = (req.url).path; | |
| 11249 var pathOffset = 0; | |
| 11250 var index; | |
| 11251 var subPart; | |
| 11252 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 11253 pathOffset += 1; | |
| 11254 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 11255 pathOffset += 18; | |
| 11256 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 11257 pathOffset += 13; | |
| 11258 index = path.indexOf("/accountActiveAdSummaries/", pathOffset); | |
| 11259 unittest.expect(index >= 0, unittest.isTrue); | |
| 11260 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 11261 pathOffset = index; | |
| 11262 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 11263 unittest.expect(path.substring(pathOffset, pathOffset + 26), unittest.eq
uals("/accountActiveAdSummaries/")); | |
| 11264 pathOffset += 26; | |
| 11265 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 11266 pathOffset = path.length; | |
| 11267 unittest.expect(subPart, unittest.equals("$arg_summaryAccountId")); | |
| 11268 | |
| 11269 var query = (req.url).query; | |
| 11270 var queryOffset = 0; | |
| 11271 var queryMap = {}; | |
| 11272 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 11273 parseBool(n) { | |
| 11274 if (n == "true") return true; | |
| 11275 if (n == "false") return false; | |
| 11276 if (n == null) return null; | |
| 11277 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 11278 } | |
| 11279 if (query.length > 0) { | |
| 11280 for (var part in query.split("&")) { | |
| 11281 var keyvalue = part.split("="); | |
| 11282 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 11283 } | |
| 11284 } | |
| 11285 | |
| 11286 | |
| 11287 var h = { | |
| 11288 "content-type" : "application/json; charset=utf-8", | |
| 11289 }; | |
| 11290 var resp = convert.JSON.encode(buildAccountActiveAdSummary()); | |
| 11291 return new async.Future.value(stringResponse(200, h, resp)); | |
| 11292 }), true); | |
| 11293 res.get(arg_profileId, arg_summaryAccountId).then(unittest.expectAsync(((a
pi.AccountActiveAdSummary response) { | |
| 11294 checkAccountActiveAdSummary(response); | |
| 11295 }))); | |
| 11296 }); | |
| 11297 | |
| 11298 }); | |
| 11299 | |
| 11300 | |
| 11301 unittest.group("resource-AccountPermissionGroupsResourceApi", () { | |
| 11302 unittest.test("method--get", () { | |
| 11303 | |
| 11304 var mock = new HttpServerMock(); | |
| 11305 api.AccountPermissionGroupsResourceApi res = new api.DfareportingApi(mock)
.accountPermissionGroups; | |
| 11306 var arg_profileId = "foo"; | |
| 11307 var arg_id = "foo"; | |
| 11308 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 11309 var path = (req.url).path; | |
| 11310 var pathOffset = 0; | |
| 11311 var index; | |
| 11312 var subPart; | |
| 11313 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 11314 pathOffset += 1; | |
| 11315 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 11316 pathOffset += 18; | |
| 11317 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 11318 pathOffset += 13; | |
| 11319 index = path.indexOf("/accountPermissionGroups/", pathOffset); | |
| 11320 unittest.expect(index >= 0, unittest.isTrue); | |
| 11321 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 11322 pathOffset = index; | |
| 11323 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 11324 unittest.expect(path.substring(pathOffset, pathOffset + 25), unittest.eq
uals("/accountPermissionGroups/")); | |
| 11325 pathOffset += 25; | |
| 11326 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 11327 pathOffset = path.length; | |
| 11328 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 11329 | |
| 11330 var query = (req.url).query; | |
| 11331 var queryOffset = 0; | |
| 11332 var queryMap = {}; | |
| 11333 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 11334 parseBool(n) { | |
| 11335 if (n == "true") return true; | |
| 11336 if (n == "false") return false; | |
| 11337 if (n == null) return null; | |
| 11338 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 11339 } | |
| 11340 if (query.length > 0) { | |
| 11341 for (var part in query.split("&")) { | |
| 11342 var keyvalue = part.split("="); | |
| 11343 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 11344 } | |
| 11345 } | |
| 11346 | |
| 11347 | |
| 11348 var h = { | |
| 11349 "content-type" : "application/json; charset=utf-8", | |
| 11350 }; | |
| 11351 var resp = convert.JSON.encode(buildAccountPermissionGroup()); | |
| 11352 return new async.Future.value(stringResponse(200, h, resp)); | |
| 11353 }), true); | |
| 11354 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.AccountPerm
issionGroup response) { | |
| 11355 checkAccountPermissionGroup(response); | |
| 11356 }))); | |
| 11357 }); | |
| 11358 | |
| 11359 unittest.test("method--list", () { | |
| 11360 | |
| 11361 var mock = new HttpServerMock(); | |
| 11362 api.AccountPermissionGroupsResourceApi res = new api.DfareportingApi(mock)
.accountPermissionGroups; | |
| 11363 var arg_profileId = "foo"; | |
| 11364 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 11365 var path = (req.url).path; | |
| 11366 var pathOffset = 0; | |
| 11367 var index; | |
| 11368 var subPart; | |
| 11369 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 11370 pathOffset += 1; | |
| 11371 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 11372 pathOffset += 18; | |
| 11373 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 11374 pathOffset += 13; | |
| 11375 index = path.indexOf("/accountPermissionGroups", pathOffset); | |
| 11376 unittest.expect(index >= 0, unittest.isTrue); | |
| 11377 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 11378 pathOffset = index; | |
| 11379 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 11380 unittest.expect(path.substring(pathOffset, pathOffset + 24), unittest.eq
uals("/accountPermissionGroups")); | |
| 11381 pathOffset += 24; | |
| 11382 | |
| 11383 var query = (req.url).query; | |
| 11384 var queryOffset = 0; | |
| 11385 var queryMap = {}; | |
| 11386 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 11387 parseBool(n) { | |
| 11388 if (n == "true") return true; | |
| 11389 if (n == "false") return false; | |
| 11390 if (n == null) return null; | |
| 11391 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 11392 } | |
| 11393 if (query.length > 0) { | |
| 11394 for (var part in query.split("&")) { | |
| 11395 var keyvalue = part.split("="); | |
| 11396 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 11397 } | |
| 11398 } | |
| 11399 | |
| 11400 | |
| 11401 var h = { | |
| 11402 "content-type" : "application/json; charset=utf-8", | |
| 11403 }; | |
| 11404 var resp = convert.JSON.encode(buildAccountPermissionGroupsListResponse(
)); | |
| 11405 return new async.Future.value(stringResponse(200, h, resp)); | |
| 11406 }), true); | |
| 11407 res.list(arg_profileId).then(unittest.expectAsync(((api.AccountPermissionG
roupsListResponse response) { | |
| 11408 checkAccountPermissionGroupsListResponse(response); | |
| 11409 }))); | |
| 11410 }); | |
| 11411 | |
| 11412 }); | |
| 11413 | |
| 11414 | |
| 11415 unittest.group("resource-AccountPermissionsResourceApi", () { | |
| 11416 unittest.test("method--get", () { | |
| 11417 | |
| 11418 var mock = new HttpServerMock(); | |
| 11419 api.AccountPermissionsResourceApi res = new api.DfareportingApi(mock).acco
untPermissions; | |
| 11420 var arg_profileId = "foo"; | |
| 11421 var arg_id = "foo"; | |
| 11422 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 11423 var path = (req.url).path; | |
| 11424 var pathOffset = 0; | |
| 11425 var index; | |
| 11426 var subPart; | |
| 11427 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 11428 pathOffset += 1; | |
| 11429 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 11430 pathOffset += 18; | |
| 11431 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 11432 pathOffset += 13; | |
| 11433 index = path.indexOf("/accountPermissions/", pathOffset); | |
| 11434 unittest.expect(index >= 0, unittest.isTrue); | |
| 11435 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 11436 pathOffset = index; | |
| 11437 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 11438 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("/accountPermissions/")); | |
| 11439 pathOffset += 20; | |
| 11440 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 11441 pathOffset = path.length; | |
| 11442 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 11443 | |
| 11444 var query = (req.url).query; | |
| 11445 var queryOffset = 0; | |
| 11446 var queryMap = {}; | |
| 11447 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 11448 parseBool(n) { | |
| 11449 if (n == "true") return true; | |
| 11450 if (n == "false") return false; | |
| 11451 if (n == null) return null; | |
| 11452 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 11453 } | |
| 11454 if (query.length > 0) { | |
| 11455 for (var part in query.split("&")) { | |
| 11456 var keyvalue = part.split("="); | |
| 11457 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 11458 } | |
| 11459 } | |
| 11460 | |
| 11461 | |
| 11462 var h = { | |
| 11463 "content-type" : "application/json; charset=utf-8", | |
| 11464 }; | |
| 11465 var resp = convert.JSON.encode(buildAccountPermission()); | |
| 11466 return new async.Future.value(stringResponse(200, h, resp)); | |
| 11467 }), true); | |
| 11468 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.AccountPerm
ission response) { | |
| 11469 checkAccountPermission(response); | |
| 11470 }))); | |
| 11471 }); | |
| 11472 | |
| 11473 unittest.test("method--list", () { | |
| 11474 | |
| 11475 var mock = new HttpServerMock(); | |
| 11476 api.AccountPermissionsResourceApi res = new api.DfareportingApi(mock).acco
untPermissions; | |
| 11477 var arg_profileId = "foo"; | |
| 11478 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 11479 var path = (req.url).path; | |
| 11480 var pathOffset = 0; | |
| 11481 var index; | |
| 11482 var subPart; | |
| 11483 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 11484 pathOffset += 1; | |
| 11485 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 11486 pathOffset += 18; | |
| 11487 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 11488 pathOffset += 13; | |
| 11489 index = path.indexOf("/accountPermissions", pathOffset); | |
| 11490 unittest.expect(index >= 0, unittest.isTrue); | |
| 11491 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 11492 pathOffset = index; | |
| 11493 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 11494 unittest.expect(path.substring(pathOffset, pathOffset + 19), unittest.eq
uals("/accountPermissions")); | |
| 11495 pathOffset += 19; | |
| 11496 | |
| 11497 var query = (req.url).query; | |
| 11498 var queryOffset = 0; | |
| 11499 var queryMap = {}; | |
| 11500 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 11501 parseBool(n) { | |
| 11502 if (n == "true") return true; | |
| 11503 if (n == "false") return false; | |
| 11504 if (n == null) return null; | |
| 11505 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 11506 } | |
| 11507 if (query.length > 0) { | |
| 11508 for (var part in query.split("&")) { | |
| 11509 var keyvalue = part.split("="); | |
| 11510 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 11511 } | |
| 11512 } | |
| 11513 | |
| 11514 | |
| 11515 var h = { | |
| 11516 "content-type" : "application/json; charset=utf-8", | |
| 11517 }; | |
| 11518 var resp = convert.JSON.encode(buildAccountPermissionsListResponse()); | |
| 11519 return new async.Future.value(stringResponse(200, h, resp)); | |
| 11520 }), true); | |
| 11521 res.list(arg_profileId).then(unittest.expectAsync(((api.AccountPermissions
ListResponse response) { | |
| 11522 checkAccountPermissionsListResponse(response); | |
| 11523 }))); | |
| 11524 }); | |
| 11525 | |
| 11526 }); | |
| 11527 | |
| 11528 | |
| 11529 unittest.group("resource-AccountUserProfilesResourceApi", () { | |
| 11530 unittest.test("method--get", () { | |
| 11531 | |
| 11532 var mock = new HttpServerMock(); | |
| 11533 api.AccountUserProfilesResourceApi res = new api.DfareportingApi(mock).acc
ountUserProfiles; | |
| 11534 var arg_profileId = "foo"; | |
| 11535 var arg_id = "foo"; | |
| 11536 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 11537 var path = (req.url).path; | |
| 11538 var pathOffset = 0; | |
| 11539 var index; | |
| 11540 var subPart; | |
| 11541 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 11542 pathOffset += 1; | |
| 11543 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 11544 pathOffset += 18; | |
| 11545 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 11546 pathOffset += 13; | |
| 11547 index = path.indexOf("/accountUserProfiles/", pathOffset); | |
| 11548 unittest.expect(index >= 0, unittest.isTrue); | |
| 11549 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 11550 pathOffset = index; | |
| 11551 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 11552 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("/accountUserProfiles/")); | |
| 11553 pathOffset += 21; | |
| 11554 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 11555 pathOffset = path.length; | |
| 11556 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 11557 | |
| 11558 var query = (req.url).query; | |
| 11559 var queryOffset = 0; | |
| 11560 var queryMap = {}; | |
| 11561 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 11562 parseBool(n) { | |
| 11563 if (n == "true") return true; | |
| 11564 if (n == "false") return false; | |
| 11565 if (n == null) return null; | |
| 11566 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 11567 } | |
| 11568 if (query.length > 0) { | |
| 11569 for (var part in query.split("&")) { | |
| 11570 var keyvalue = part.split("="); | |
| 11571 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 11572 } | |
| 11573 } | |
| 11574 | |
| 11575 | |
| 11576 var h = { | |
| 11577 "content-type" : "application/json; charset=utf-8", | |
| 11578 }; | |
| 11579 var resp = convert.JSON.encode(buildAccountUserProfile()); | |
| 11580 return new async.Future.value(stringResponse(200, h, resp)); | |
| 11581 }), true); | |
| 11582 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.AccountUser
Profile response) { | |
| 11583 checkAccountUserProfile(response); | |
| 11584 }))); | |
| 11585 }); | |
| 11586 | |
| 11587 unittest.test("method--insert", () { | |
| 11588 | |
| 11589 var mock = new HttpServerMock(); | |
| 11590 api.AccountUserProfilesResourceApi res = new api.DfareportingApi(mock).acc
ountUserProfiles; | |
| 11591 var arg_request = buildAccountUserProfile(); | |
| 11592 var arg_profileId = "foo"; | |
| 11593 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 11594 var obj = new api.AccountUserProfile.fromJson(json); | |
| 11595 checkAccountUserProfile(obj); | |
| 11596 | |
| 11597 var path = (req.url).path; | |
| 11598 var pathOffset = 0; | |
| 11599 var index; | |
| 11600 var subPart; | |
| 11601 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 11602 pathOffset += 1; | |
| 11603 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 11604 pathOffset += 18; | |
| 11605 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 11606 pathOffset += 13; | |
| 11607 index = path.indexOf("/accountUserProfiles", pathOffset); | |
| 11608 unittest.expect(index >= 0, unittest.isTrue); | |
| 11609 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 11610 pathOffset = index; | |
| 11611 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 11612 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("/accountUserProfiles")); | |
| 11613 pathOffset += 20; | |
| 11614 | |
| 11615 var query = (req.url).query; | |
| 11616 var queryOffset = 0; | |
| 11617 var queryMap = {}; | |
| 11618 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 11619 parseBool(n) { | |
| 11620 if (n == "true") return true; | |
| 11621 if (n == "false") return false; | |
| 11622 if (n == null) return null; | |
| 11623 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 11624 } | |
| 11625 if (query.length > 0) { | |
| 11626 for (var part in query.split("&")) { | |
| 11627 var keyvalue = part.split("="); | |
| 11628 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 11629 } | |
| 11630 } | |
| 11631 | |
| 11632 | |
| 11633 var h = { | |
| 11634 "content-type" : "application/json; charset=utf-8", | |
| 11635 }; | |
| 11636 var resp = convert.JSON.encode(buildAccountUserProfile()); | |
| 11637 return new async.Future.value(stringResponse(200, h, resp)); | |
| 11638 }), true); | |
| 11639 res.insert(arg_request, arg_profileId).then(unittest.expectAsync(((api.Acc
ountUserProfile response) { | |
| 11640 checkAccountUserProfile(response); | |
| 11641 }))); | |
| 11642 }); | |
| 11643 | |
| 11644 unittest.test("method--list", () { | |
| 11645 | |
| 11646 var mock = new HttpServerMock(); | |
| 11647 api.AccountUserProfilesResourceApi res = new api.DfareportingApi(mock).acc
ountUserProfiles; | |
| 11648 var arg_profileId = "foo"; | |
| 11649 var arg_active = true; | |
| 11650 var arg_ids = buildUnnamed1489(); | |
| 11651 var arg_maxResults = 42; | |
| 11652 var arg_pageToken = "foo"; | |
| 11653 var arg_searchString = "foo"; | |
| 11654 var arg_sortField = "foo"; | |
| 11655 var arg_sortOrder = "foo"; | |
| 11656 var arg_subaccountId = "foo"; | |
| 11657 var arg_userRoleId = "foo"; | |
| 11658 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 11659 var path = (req.url).path; | |
| 11660 var pathOffset = 0; | |
| 11661 var index; | |
| 11662 var subPart; | |
| 11663 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 11664 pathOffset += 1; | |
| 11665 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 11666 pathOffset += 18; | |
| 11667 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 11668 pathOffset += 13; | |
| 11669 index = path.indexOf("/accountUserProfiles", pathOffset); | |
| 11670 unittest.expect(index >= 0, unittest.isTrue); | |
| 11671 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 11672 pathOffset = index; | |
| 11673 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 11674 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("/accountUserProfiles")); | |
| 11675 pathOffset += 20; | |
| 11676 | |
| 11677 var query = (req.url).query; | |
| 11678 var queryOffset = 0; | |
| 11679 var queryMap = {}; | |
| 11680 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 11681 parseBool(n) { | |
| 11682 if (n == "true") return true; | |
| 11683 if (n == "false") return false; | |
| 11684 if (n == null) return null; | |
| 11685 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 11686 } | |
| 11687 if (query.length > 0) { | |
| 11688 for (var part in query.split("&")) { | |
| 11689 var keyvalue = part.split("="); | |
| 11690 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 11691 } | |
| 11692 } | |
| 11693 unittest.expect(queryMap["active"].first, unittest.equals("$arg_active")
); | |
| 11694 unittest.expect(queryMap["ids"], unittest.equals(arg_ids)); | |
| 11695 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | |
| 11696 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 11697 unittest.expect(queryMap["searchString"].first, unittest.equals(arg_sear
chString)); | |
| 11698 unittest.expect(queryMap["sortField"].first, unittest.equals(arg_sortFie
ld)); | |
| 11699 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | |
| 11700 unittest.expect(queryMap["subaccountId"].first, unittest.equals(arg_suba
ccountId)); | |
| 11701 unittest.expect(queryMap["userRoleId"].first, unittest.equals(arg_userRo
leId)); | |
| 11702 | |
| 11703 | |
| 11704 var h = { | |
| 11705 "content-type" : "application/json; charset=utf-8", | |
| 11706 }; | |
| 11707 var resp = convert.JSON.encode(buildAccountUserProfilesListResponse()); | |
| 11708 return new async.Future.value(stringResponse(200, h, resp)); | |
| 11709 }), true); | |
| 11710 res.list(arg_profileId, active: arg_active, ids: arg_ids, maxResults: arg_
maxResults, pageToken: arg_pageToken, searchString: arg_searchString, sortField:
arg_sortField, sortOrder: arg_sortOrder, subaccountId: arg_subaccountId, userRo
leId: arg_userRoleId).then(unittest.expectAsync(((api.AccountUserProfilesListRes
ponse response) { | |
| 11711 checkAccountUserProfilesListResponse(response); | |
| 11712 }))); | |
| 11713 }); | |
| 11714 | |
| 11715 unittest.test("method--patch", () { | |
| 11716 | |
| 11717 var mock = new HttpServerMock(); | |
| 11718 api.AccountUserProfilesResourceApi res = new api.DfareportingApi(mock).acc
ountUserProfiles; | |
| 11719 var arg_request = buildAccountUserProfile(); | |
| 11720 var arg_profileId = "foo"; | |
| 11721 var arg_id = "foo"; | |
| 11722 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 11723 var obj = new api.AccountUserProfile.fromJson(json); | |
| 11724 checkAccountUserProfile(obj); | |
| 11725 | |
| 11726 var path = (req.url).path; | |
| 11727 var pathOffset = 0; | |
| 11728 var index; | |
| 11729 var subPart; | |
| 11730 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 11731 pathOffset += 1; | |
| 11732 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 11733 pathOffset += 18; | |
| 11734 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 11735 pathOffset += 13; | |
| 11736 index = path.indexOf("/accountUserProfiles", pathOffset); | |
| 11737 unittest.expect(index >= 0, unittest.isTrue); | |
| 11738 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 11739 pathOffset = index; | |
| 11740 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 11741 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("/accountUserProfiles")); | |
| 11742 pathOffset += 20; | |
| 11743 | |
| 11744 var query = (req.url).query; | |
| 11745 var queryOffset = 0; | |
| 11746 var queryMap = {}; | |
| 11747 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 11748 parseBool(n) { | |
| 11749 if (n == "true") return true; | |
| 11750 if (n == "false") return false; | |
| 11751 if (n == null) return null; | |
| 11752 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 11753 } | |
| 11754 if (query.length > 0) { | |
| 11755 for (var part in query.split("&")) { | |
| 11756 var keyvalue = part.split("="); | |
| 11757 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 11758 } | |
| 11759 } | |
| 11760 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); | |
| 11761 | |
| 11762 | |
| 11763 var h = { | |
| 11764 "content-type" : "application/json; charset=utf-8", | |
| 11765 }; | |
| 11766 var resp = convert.JSON.encode(buildAccountUserProfile()); | |
| 11767 return new async.Future.value(stringResponse(200, h, resp)); | |
| 11768 }), true); | |
| 11769 res.patch(arg_request, arg_profileId, arg_id).then(unittest.expectAsync(((
api.AccountUserProfile response) { | |
| 11770 checkAccountUserProfile(response); | |
| 11771 }))); | |
| 11772 }); | |
| 11773 | |
| 11774 unittest.test("method--update", () { | |
| 11775 | |
| 11776 var mock = new HttpServerMock(); | |
| 11777 api.AccountUserProfilesResourceApi res = new api.DfareportingApi(mock).acc
ountUserProfiles; | |
| 11778 var arg_request = buildAccountUserProfile(); | |
| 11779 var arg_profileId = "foo"; | |
| 11780 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 11781 var obj = new api.AccountUserProfile.fromJson(json); | |
| 11782 checkAccountUserProfile(obj); | |
| 11783 | |
| 11784 var path = (req.url).path; | |
| 11785 var pathOffset = 0; | |
| 11786 var index; | |
| 11787 var subPart; | |
| 11788 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 11789 pathOffset += 1; | |
| 11790 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 11791 pathOffset += 18; | |
| 11792 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 11793 pathOffset += 13; | |
| 11794 index = path.indexOf("/accountUserProfiles", pathOffset); | |
| 11795 unittest.expect(index >= 0, unittest.isTrue); | |
| 11796 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 11797 pathOffset = index; | |
| 11798 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 11799 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("/accountUserProfiles")); | |
| 11800 pathOffset += 20; | |
| 11801 | |
| 11802 var query = (req.url).query; | |
| 11803 var queryOffset = 0; | |
| 11804 var queryMap = {}; | |
| 11805 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 11806 parseBool(n) { | |
| 11807 if (n == "true") return true; | |
| 11808 if (n == "false") return false; | |
| 11809 if (n == null) return null; | |
| 11810 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 11811 } | |
| 11812 if (query.length > 0) { | |
| 11813 for (var part in query.split("&")) { | |
| 11814 var keyvalue = part.split("="); | |
| 11815 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 11816 } | |
| 11817 } | |
| 11818 | |
| 11819 | |
| 11820 var h = { | |
| 11821 "content-type" : "application/json; charset=utf-8", | |
| 11822 }; | |
| 11823 var resp = convert.JSON.encode(buildAccountUserProfile()); | |
| 11824 return new async.Future.value(stringResponse(200, h, resp)); | |
| 11825 }), true); | |
| 11826 res.update(arg_request, arg_profileId).then(unittest.expectAsync(((api.Acc
ountUserProfile response) { | |
| 11827 checkAccountUserProfile(response); | |
| 11828 }))); | |
| 11829 }); | |
| 11830 | |
| 11831 }); | |
| 11832 | |
| 11833 | |
| 11834 unittest.group("resource-AccountsResourceApi", () { | |
| 11835 unittest.test("method--get", () { | |
| 11836 | |
| 11837 var mock = new HttpServerMock(); | |
| 11838 api.AccountsResourceApi res = new api.DfareportingApi(mock).accounts; | |
| 11839 var arg_profileId = "foo"; | |
| 11840 var arg_id = "foo"; | |
| 11841 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 11842 var path = (req.url).path; | |
| 11843 var pathOffset = 0; | |
| 11844 var index; | |
| 11845 var subPart; | |
| 11846 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 11847 pathOffset += 1; | |
| 11848 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 11849 pathOffset += 18; | |
| 11850 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 11851 pathOffset += 13; | |
| 11852 index = path.indexOf("/accounts/", pathOffset); | |
| 11853 unittest.expect(index >= 0, unittest.isTrue); | |
| 11854 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 11855 pathOffset = index; | |
| 11856 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 11857 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/accounts/")); | |
| 11858 pathOffset += 10; | |
| 11859 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 11860 pathOffset = path.length; | |
| 11861 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 11862 | |
| 11863 var query = (req.url).query; | |
| 11864 var queryOffset = 0; | |
| 11865 var queryMap = {}; | |
| 11866 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 11867 parseBool(n) { | |
| 11868 if (n == "true") return true; | |
| 11869 if (n == "false") return false; | |
| 11870 if (n == null) return null; | |
| 11871 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 11872 } | |
| 11873 if (query.length > 0) { | |
| 11874 for (var part in query.split("&")) { | |
| 11875 var keyvalue = part.split("="); | |
| 11876 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 11877 } | |
| 11878 } | |
| 11879 | |
| 11880 | |
| 11881 var h = { | |
| 11882 "content-type" : "application/json; charset=utf-8", | |
| 11883 }; | |
| 11884 var resp = convert.JSON.encode(buildAccount()); | |
| 11885 return new async.Future.value(stringResponse(200, h, resp)); | |
| 11886 }), true); | |
| 11887 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.Account res
ponse) { | |
| 11888 checkAccount(response); | |
| 11889 }))); | |
| 11890 }); | |
| 11891 | |
| 11892 unittest.test("method--list", () { | |
| 11893 | |
| 11894 var mock = new HttpServerMock(); | |
| 11895 api.AccountsResourceApi res = new api.DfareportingApi(mock).accounts; | |
| 11896 var arg_profileId = "foo"; | |
| 11897 var arg_active = true; | |
| 11898 var arg_ids = buildUnnamed1490(); | |
| 11899 var arg_maxResults = 42; | |
| 11900 var arg_pageToken = "foo"; | |
| 11901 var arg_searchString = "foo"; | |
| 11902 var arg_sortField = "foo"; | |
| 11903 var arg_sortOrder = "foo"; | |
| 11904 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 11905 var path = (req.url).path; | |
| 11906 var pathOffset = 0; | |
| 11907 var index; | |
| 11908 var subPart; | |
| 11909 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 11910 pathOffset += 1; | |
| 11911 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 11912 pathOffset += 18; | |
| 11913 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 11914 pathOffset += 13; | |
| 11915 index = path.indexOf("/accounts", pathOffset); | |
| 11916 unittest.expect(index >= 0, unittest.isTrue); | |
| 11917 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 11918 pathOffset = index; | |
| 11919 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 11920 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("/accounts")); | |
| 11921 pathOffset += 9; | |
| 11922 | |
| 11923 var query = (req.url).query; | |
| 11924 var queryOffset = 0; | |
| 11925 var queryMap = {}; | |
| 11926 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 11927 parseBool(n) { | |
| 11928 if (n == "true") return true; | |
| 11929 if (n == "false") return false; | |
| 11930 if (n == null) return null; | |
| 11931 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 11932 } | |
| 11933 if (query.length > 0) { | |
| 11934 for (var part in query.split("&")) { | |
| 11935 var keyvalue = part.split("="); | |
| 11936 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 11937 } | |
| 11938 } | |
| 11939 unittest.expect(queryMap["active"].first, unittest.equals("$arg_active")
); | |
| 11940 unittest.expect(queryMap["ids"], unittest.equals(arg_ids)); | |
| 11941 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | |
| 11942 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 11943 unittest.expect(queryMap["searchString"].first, unittest.equals(arg_sear
chString)); | |
| 11944 unittest.expect(queryMap["sortField"].first, unittest.equals(arg_sortFie
ld)); | |
| 11945 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | |
| 11946 | |
| 11947 | |
| 11948 var h = { | |
| 11949 "content-type" : "application/json; charset=utf-8", | |
| 11950 }; | |
| 11951 var resp = convert.JSON.encode(buildAccountsListResponse()); | |
| 11952 return new async.Future.value(stringResponse(200, h, resp)); | |
| 11953 }), true); | |
| 11954 res.list(arg_profileId, active: arg_active, ids: arg_ids, maxResults: arg_
maxResults, pageToken: arg_pageToken, searchString: arg_searchString, sortField:
arg_sortField, sortOrder: arg_sortOrder).then(unittest.expectAsync(((api.Accoun
tsListResponse response) { | |
| 11955 checkAccountsListResponse(response); | |
| 11956 }))); | |
| 11957 }); | |
| 11958 | |
| 11959 unittest.test("method--patch", () { | |
| 11960 | |
| 11961 var mock = new HttpServerMock(); | |
| 11962 api.AccountsResourceApi res = new api.DfareportingApi(mock).accounts; | |
| 11963 var arg_request = buildAccount(); | |
| 11964 var arg_profileId = "foo"; | |
| 11965 var arg_id = "foo"; | |
| 11966 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 11967 var obj = new api.Account.fromJson(json); | |
| 11968 checkAccount(obj); | |
| 11969 | |
| 11970 var path = (req.url).path; | |
| 11971 var pathOffset = 0; | |
| 11972 var index; | |
| 11973 var subPart; | |
| 11974 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 11975 pathOffset += 1; | |
| 11976 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 11977 pathOffset += 18; | |
| 11978 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 11979 pathOffset += 13; | |
| 11980 index = path.indexOf("/accounts", pathOffset); | |
| 11981 unittest.expect(index >= 0, unittest.isTrue); | |
| 11982 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 11983 pathOffset = index; | |
| 11984 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 11985 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("/accounts")); | |
| 11986 pathOffset += 9; | |
| 11987 | |
| 11988 var query = (req.url).query; | |
| 11989 var queryOffset = 0; | |
| 11990 var queryMap = {}; | |
| 11991 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 11992 parseBool(n) { | |
| 11993 if (n == "true") return true; | |
| 11994 if (n == "false") return false; | |
| 11995 if (n == null) return null; | |
| 11996 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 11997 } | |
| 11998 if (query.length > 0) { | |
| 11999 for (var part in query.split("&")) { | |
| 12000 var keyvalue = part.split("="); | |
| 12001 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 12002 } | |
| 12003 } | |
| 12004 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); | |
| 12005 | |
| 12006 | |
| 12007 var h = { | |
| 12008 "content-type" : "application/json; charset=utf-8", | |
| 12009 }; | |
| 12010 var resp = convert.JSON.encode(buildAccount()); | |
| 12011 return new async.Future.value(stringResponse(200, h, resp)); | |
| 12012 }), true); | |
| 12013 res.patch(arg_request, arg_profileId, arg_id).then(unittest.expectAsync(((
api.Account response) { | |
| 12014 checkAccount(response); | |
| 12015 }))); | |
| 12016 }); | |
| 12017 | |
| 12018 unittest.test("method--update", () { | |
| 12019 | |
| 12020 var mock = new HttpServerMock(); | |
| 12021 api.AccountsResourceApi res = new api.DfareportingApi(mock).accounts; | |
| 12022 var arg_request = buildAccount(); | |
| 12023 var arg_profileId = "foo"; | |
| 12024 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 12025 var obj = new api.Account.fromJson(json); | |
| 12026 checkAccount(obj); | |
| 12027 | |
| 12028 var path = (req.url).path; | |
| 12029 var pathOffset = 0; | |
| 12030 var index; | |
| 12031 var subPart; | |
| 12032 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 12033 pathOffset += 1; | |
| 12034 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 12035 pathOffset += 18; | |
| 12036 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 12037 pathOffset += 13; | |
| 12038 index = path.indexOf("/accounts", pathOffset); | |
| 12039 unittest.expect(index >= 0, unittest.isTrue); | |
| 12040 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 12041 pathOffset = index; | |
| 12042 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 12043 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("/accounts")); | |
| 12044 pathOffset += 9; | |
| 12045 | |
| 12046 var query = (req.url).query; | |
| 12047 var queryOffset = 0; | |
| 12048 var queryMap = {}; | |
| 12049 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 12050 parseBool(n) { | |
| 12051 if (n == "true") return true; | |
| 12052 if (n == "false") return false; | |
| 12053 if (n == null) return null; | |
| 12054 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 12055 } | |
| 12056 if (query.length > 0) { | |
| 12057 for (var part in query.split("&")) { | |
| 12058 var keyvalue = part.split("="); | |
| 12059 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 12060 } | |
| 12061 } | |
| 12062 | |
| 12063 | |
| 12064 var h = { | |
| 12065 "content-type" : "application/json; charset=utf-8", | |
| 12066 }; | |
| 12067 var resp = convert.JSON.encode(buildAccount()); | |
| 12068 return new async.Future.value(stringResponse(200, h, resp)); | |
| 12069 }), true); | |
| 12070 res.update(arg_request, arg_profileId).then(unittest.expectAsync(((api.Acc
ount response) { | |
| 12071 checkAccount(response); | |
| 12072 }))); | |
| 12073 }); | |
| 12074 | |
| 12075 }); | |
| 12076 | |
| 12077 | |
| 12078 unittest.group("resource-AdsResourceApi", () { | |
| 12079 unittest.test("method--get", () { | |
| 12080 | |
| 12081 var mock = new HttpServerMock(); | |
| 12082 api.AdsResourceApi res = new api.DfareportingApi(mock).ads; | |
| 12083 var arg_profileId = "foo"; | |
| 12084 var arg_id = "foo"; | |
| 12085 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 12086 var path = (req.url).path; | |
| 12087 var pathOffset = 0; | |
| 12088 var index; | |
| 12089 var subPart; | |
| 12090 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 12091 pathOffset += 1; | |
| 12092 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 12093 pathOffset += 18; | |
| 12094 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 12095 pathOffset += 13; | |
| 12096 index = path.indexOf("/ads/", pathOffset); | |
| 12097 unittest.expect(index >= 0, unittest.isTrue); | |
| 12098 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 12099 pathOffset = index; | |
| 12100 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 12101 unittest.expect(path.substring(pathOffset, pathOffset + 5), unittest.equ
als("/ads/")); | |
| 12102 pathOffset += 5; | |
| 12103 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 12104 pathOffset = path.length; | |
| 12105 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 12106 | |
| 12107 var query = (req.url).query; | |
| 12108 var queryOffset = 0; | |
| 12109 var queryMap = {}; | |
| 12110 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 12111 parseBool(n) { | |
| 12112 if (n == "true") return true; | |
| 12113 if (n == "false") return false; | |
| 12114 if (n == null) return null; | |
| 12115 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 12116 } | |
| 12117 if (query.length > 0) { | |
| 12118 for (var part in query.split("&")) { | |
| 12119 var keyvalue = part.split("="); | |
| 12120 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 12121 } | |
| 12122 } | |
| 12123 | |
| 12124 | |
| 12125 var h = { | |
| 12126 "content-type" : "application/json; charset=utf-8", | |
| 12127 }; | |
| 12128 var resp = convert.JSON.encode(buildAd()); | |
| 12129 return new async.Future.value(stringResponse(200, h, resp)); | |
| 12130 }), true); | |
| 12131 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.Ad response
) { | |
| 12132 checkAd(response); | |
| 12133 }))); | |
| 12134 }); | |
| 12135 | |
| 12136 unittest.test("method--insert", () { | |
| 12137 | |
| 12138 var mock = new HttpServerMock(); | |
| 12139 api.AdsResourceApi res = new api.DfareportingApi(mock).ads; | |
| 12140 var arg_request = buildAd(); | |
| 12141 var arg_profileId = "foo"; | |
| 12142 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 12143 var obj = new api.Ad.fromJson(json); | |
| 12144 checkAd(obj); | |
| 12145 | |
| 12146 var path = (req.url).path; | |
| 12147 var pathOffset = 0; | |
| 12148 var index; | |
| 12149 var subPart; | |
| 12150 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 12151 pathOffset += 1; | |
| 12152 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 12153 pathOffset += 18; | |
| 12154 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 12155 pathOffset += 13; | |
| 12156 index = path.indexOf("/ads", pathOffset); | |
| 12157 unittest.expect(index >= 0, unittest.isTrue); | |
| 12158 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 12159 pathOffset = index; | |
| 12160 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 12161 unittest.expect(path.substring(pathOffset, pathOffset + 4), unittest.equ
als("/ads")); | |
| 12162 pathOffset += 4; | |
| 12163 | |
| 12164 var query = (req.url).query; | |
| 12165 var queryOffset = 0; | |
| 12166 var queryMap = {}; | |
| 12167 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 12168 parseBool(n) { | |
| 12169 if (n == "true") return true; | |
| 12170 if (n == "false") return false; | |
| 12171 if (n == null) return null; | |
| 12172 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 12173 } | |
| 12174 if (query.length > 0) { | |
| 12175 for (var part in query.split("&")) { | |
| 12176 var keyvalue = part.split("="); | |
| 12177 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 12178 } | |
| 12179 } | |
| 12180 | |
| 12181 | |
| 12182 var h = { | |
| 12183 "content-type" : "application/json; charset=utf-8", | |
| 12184 }; | |
| 12185 var resp = convert.JSON.encode(buildAd()); | |
| 12186 return new async.Future.value(stringResponse(200, h, resp)); | |
| 12187 }), true); | |
| 12188 res.insert(arg_request, arg_profileId).then(unittest.expectAsync(((api.Ad
response) { | |
| 12189 checkAd(response); | |
| 12190 }))); | |
| 12191 }); | |
| 12192 | |
| 12193 unittest.test("method--list", () { | |
| 12194 | |
| 12195 var mock = new HttpServerMock(); | |
| 12196 api.AdsResourceApi res = new api.DfareportingApi(mock).ads; | |
| 12197 var arg_profileId = "foo"; | |
| 12198 var arg_active = true; | |
| 12199 var arg_advertiserId = "foo"; | |
| 12200 var arg_archived = true; | |
| 12201 var arg_audienceSegmentIds = buildUnnamed1491(); | |
| 12202 var arg_campaignIds = buildUnnamed1492(); | |
| 12203 var arg_compatibility = "foo"; | |
| 12204 var arg_creativeIds = buildUnnamed1493(); | |
| 12205 var arg_creativeOptimizationConfigurationIds = buildUnnamed1494(); | |
| 12206 var arg_creativeType = "foo"; | |
| 12207 var arg_dynamicClickTracker = true; | |
| 12208 var arg_ids = buildUnnamed1495(); | |
| 12209 var arg_landingPageIds = buildUnnamed1496(); | |
| 12210 var arg_maxResults = 42; | |
| 12211 var arg_overriddenEventTagId = "foo"; | |
| 12212 var arg_pageToken = "foo"; | |
| 12213 var arg_placementIds = buildUnnamed1497(); | |
| 12214 var arg_remarketingListIds = buildUnnamed1498(); | |
| 12215 var arg_searchString = "foo"; | |
| 12216 var arg_sizeIds = buildUnnamed1499(); | |
| 12217 var arg_sortField = "foo"; | |
| 12218 var arg_sortOrder = "foo"; | |
| 12219 var arg_sslCompliant = true; | |
| 12220 var arg_sslRequired = true; | |
| 12221 var arg_type = buildUnnamed1500(); | |
| 12222 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 12223 var path = (req.url).path; | |
| 12224 var pathOffset = 0; | |
| 12225 var index; | |
| 12226 var subPart; | |
| 12227 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 12228 pathOffset += 1; | |
| 12229 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 12230 pathOffset += 18; | |
| 12231 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 12232 pathOffset += 13; | |
| 12233 index = path.indexOf("/ads", pathOffset); | |
| 12234 unittest.expect(index >= 0, unittest.isTrue); | |
| 12235 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 12236 pathOffset = index; | |
| 12237 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 12238 unittest.expect(path.substring(pathOffset, pathOffset + 4), unittest.equ
als("/ads")); | |
| 12239 pathOffset += 4; | |
| 12240 | |
| 12241 var query = (req.url).query; | |
| 12242 var queryOffset = 0; | |
| 12243 var queryMap = {}; | |
| 12244 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 12245 parseBool(n) { | |
| 12246 if (n == "true") return true; | |
| 12247 if (n == "false") return false; | |
| 12248 if (n == null) return null; | |
| 12249 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 12250 } | |
| 12251 if (query.length > 0) { | |
| 12252 for (var part in query.split("&")) { | |
| 12253 var keyvalue = part.split("="); | |
| 12254 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 12255 } | |
| 12256 } | |
| 12257 unittest.expect(queryMap["active"].first, unittest.equals("$arg_active")
); | |
| 12258 unittest.expect(queryMap["advertiserId"].first, unittest.equals(arg_adve
rtiserId)); | |
| 12259 unittest.expect(queryMap["archived"].first, unittest.equals("$arg_archiv
ed")); | |
| 12260 unittest.expect(queryMap["audienceSegmentIds"], unittest.equals(arg_audi
enceSegmentIds)); | |
| 12261 unittest.expect(queryMap["campaignIds"], unittest.equals(arg_campaignIds
)); | |
| 12262 unittest.expect(queryMap["compatibility"].first, unittest.equals(arg_com
patibility)); | |
| 12263 unittest.expect(queryMap["creativeIds"], unittest.equals(arg_creativeIds
)); | |
| 12264 unittest.expect(queryMap["creativeOptimizationConfigurationIds"], unitte
st.equals(arg_creativeOptimizationConfigurationIds)); | |
| 12265 unittest.expect(queryMap["creativeType"].first, unittest.equals(arg_crea
tiveType)); | |
| 12266 unittest.expect(queryMap["dynamicClickTracker"].first, unittest.equals("
$arg_dynamicClickTracker")); | |
| 12267 unittest.expect(queryMap["ids"], unittest.equals(arg_ids)); | |
| 12268 unittest.expect(queryMap["landingPageIds"], unittest.equals(arg_landingP
ageIds)); | |
| 12269 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | |
| 12270 unittest.expect(queryMap["overriddenEventTagId"].first, unittest.equals(
arg_overriddenEventTagId)); | |
| 12271 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 12272 unittest.expect(queryMap["placementIds"], unittest.equals(arg_placementI
ds)); | |
| 12273 unittest.expect(queryMap["remarketingListIds"], unittest.equals(arg_rema
rketingListIds)); | |
| 12274 unittest.expect(queryMap["searchString"].first, unittest.equals(arg_sear
chString)); | |
| 12275 unittest.expect(queryMap["sizeIds"], unittest.equals(arg_sizeIds)); | |
| 12276 unittest.expect(queryMap["sortField"].first, unittest.equals(arg_sortFie
ld)); | |
| 12277 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | |
| 12278 unittest.expect(queryMap["sslCompliant"].first, unittest.equals("$arg_ss
lCompliant")); | |
| 12279 unittest.expect(queryMap["sslRequired"].first, unittest.equals("$arg_ssl
Required")); | |
| 12280 unittest.expect(queryMap["type"], unittest.equals(arg_type)); | |
| 12281 | |
| 12282 | |
| 12283 var h = { | |
| 12284 "content-type" : "application/json; charset=utf-8", | |
| 12285 }; | |
| 12286 var resp = convert.JSON.encode(buildAdsListResponse()); | |
| 12287 return new async.Future.value(stringResponse(200, h, resp)); | |
| 12288 }), true); | |
| 12289 res.list(arg_profileId, active: arg_active, advertiserId: arg_advertiserId
, archived: arg_archived, audienceSegmentIds: arg_audienceSegmentIds, campaignId
s: arg_campaignIds, compatibility: arg_compatibility, creativeIds: arg_creativeI
ds, creativeOptimizationConfigurationIds: arg_creativeOptimizationConfigurationI
ds, creativeType: arg_creativeType, dynamicClickTracker: arg_dynamicClickTracker
, ids: arg_ids, landingPageIds: arg_landingPageIds, maxResults: arg_maxResults,
overriddenEventTagId: arg_overriddenEventTagId, pageToken: arg_pageToken, placem
entIds: arg_placementIds, remarketingListIds: arg_remarketingListIds, searchStri
ng: arg_searchString, sizeIds: arg_sizeIds, sortField: arg_sortField, sortOrder:
arg_sortOrder, sslCompliant: arg_sslCompliant, sslRequired: arg_sslRequired, ty
pe: arg_type).then(unittest.expectAsync(((api.AdsListResponse response) { | |
| 12290 checkAdsListResponse(response); | |
| 12291 }))); | |
| 12292 }); | |
| 12293 | |
| 12294 unittest.test("method--patch", () { | |
| 12295 | |
| 12296 var mock = new HttpServerMock(); | |
| 12297 api.AdsResourceApi res = new api.DfareportingApi(mock).ads; | |
| 12298 var arg_request = buildAd(); | |
| 12299 var arg_profileId = "foo"; | |
| 12300 var arg_id = "foo"; | |
| 12301 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 12302 var obj = new api.Ad.fromJson(json); | |
| 12303 checkAd(obj); | |
| 12304 | |
| 12305 var path = (req.url).path; | |
| 12306 var pathOffset = 0; | |
| 12307 var index; | |
| 12308 var subPart; | |
| 12309 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 12310 pathOffset += 1; | |
| 12311 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 12312 pathOffset += 18; | |
| 12313 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 12314 pathOffset += 13; | |
| 12315 index = path.indexOf("/ads", pathOffset); | |
| 12316 unittest.expect(index >= 0, unittest.isTrue); | |
| 12317 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 12318 pathOffset = index; | |
| 12319 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 12320 unittest.expect(path.substring(pathOffset, pathOffset + 4), unittest.equ
als("/ads")); | |
| 12321 pathOffset += 4; | |
| 12322 | |
| 12323 var query = (req.url).query; | |
| 12324 var queryOffset = 0; | |
| 12325 var queryMap = {}; | |
| 12326 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 12327 parseBool(n) { | |
| 12328 if (n == "true") return true; | |
| 12329 if (n == "false") return false; | |
| 12330 if (n == null) return null; | |
| 12331 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 12332 } | |
| 12333 if (query.length > 0) { | |
| 12334 for (var part in query.split("&")) { | |
| 12335 var keyvalue = part.split("="); | |
| 12336 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 12337 } | |
| 12338 } | |
| 12339 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); | |
| 12340 | |
| 12341 | |
| 12342 var h = { | |
| 12343 "content-type" : "application/json; charset=utf-8", | |
| 12344 }; | |
| 12345 var resp = convert.JSON.encode(buildAd()); | |
| 12346 return new async.Future.value(stringResponse(200, h, resp)); | |
| 12347 }), true); | |
| 12348 res.patch(arg_request, arg_profileId, arg_id).then(unittest.expectAsync(((
api.Ad response) { | |
| 12349 checkAd(response); | |
| 12350 }))); | |
| 12351 }); | |
| 12352 | |
| 12353 unittest.test("method--update", () { | |
| 12354 | |
| 12355 var mock = new HttpServerMock(); | |
| 12356 api.AdsResourceApi res = new api.DfareportingApi(mock).ads; | |
| 12357 var arg_request = buildAd(); | |
| 12358 var arg_profileId = "foo"; | |
| 12359 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 12360 var obj = new api.Ad.fromJson(json); | |
| 12361 checkAd(obj); | |
| 12362 | |
| 12363 var path = (req.url).path; | |
| 12364 var pathOffset = 0; | |
| 12365 var index; | |
| 12366 var subPart; | |
| 12367 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 12368 pathOffset += 1; | |
| 12369 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 12370 pathOffset += 18; | |
| 12371 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 12372 pathOffset += 13; | |
| 12373 index = path.indexOf("/ads", pathOffset); | |
| 12374 unittest.expect(index >= 0, unittest.isTrue); | |
| 12375 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 12376 pathOffset = index; | |
| 12377 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 12378 unittest.expect(path.substring(pathOffset, pathOffset + 4), unittest.equ
als("/ads")); | |
| 12379 pathOffset += 4; | |
| 12380 | |
| 12381 var query = (req.url).query; | |
| 12382 var queryOffset = 0; | |
| 12383 var queryMap = {}; | |
| 12384 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 12385 parseBool(n) { | |
| 12386 if (n == "true") return true; | |
| 12387 if (n == "false") return false; | |
| 12388 if (n == null) return null; | |
| 12389 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 12390 } | |
| 12391 if (query.length > 0) { | |
| 12392 for (var part in query.split("&")) { | |
| 12393 var keyvalue = part.split("="); | |
| 12394 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 12395 } | |
| 12396 } | |
| 12397 | |
| 12398 | |
| 12399 var h = { | |
| 12400 "content-type" : "application/json; charset=utf-8", | |
| 12401 }; | |
| 12402 var resp = convert.JSON.encode(buildAd()); | |
| 12403 return new async.Future.value(stringResponse(200, h, resp)); | |
| 12404 }), true); | |
| 12405 res.update(arg_request, arg_profileId).then(unittest.expectAsync(((api.Ad
response) { | |
| 12406 checkAd(response); | |
| 12407 }))); | |
| 12408 }); | |
| 12409 | |
| 12410 }); | |
| 12411 | |
| 12412 | |
| 12413 unittest.group("resource-AdvertiserGroupsResourceApi", () { | |
| 12414 unittest.test("method--delete", () { | |
| 12415 | |
| 12416 var mock = new HttpServerMock(); | |
| 12417 api.AdvertiserGroupsResourceApi res = new api.DfareportingApi(mock).advert
iserGroups; | |
| 12418 var arg_profileId = "foo"; | |
| 12419 var arg_id = "foo"; | |
| 12420 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 12421 var path = (req.url).path; | |
| 12422 var pathOffset = 0; | |
| 12423 var index; | |
| 12424 var subPart; | |
| 12425 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 12426 pathOffset += 1; | |
| 12427 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 12428 pathOffset += 18; | |
| 12429 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 12430 pathOffset += 13; | |
| 12431 index = path.indexOf("/advertiserGroups/", pathOffset); | |
| 12432 unittest.expect(index >= 0, unittest.isTrue); | |
| 12433 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 12434 pathOffset = index; | |
| 12435 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 12436 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("/advertiserGroups/")); | |
| 12437 pathOffset += 18; | |
| 12438 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 12439 pathOffset = path.length; | |
| 12440 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 12441 | |
| 12442 var query = (req.url).query; | |
| 12443 var queryOffset = 0; | |
| 12444 var queryMap = {}; | |
| 12445 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 12446 parseBool(n) { | |
| 12447 if (n == "true") return true; | |
| 12448 if (n == "false") return false; | |
| 12449 if (n == null) return null; | |
| 12450 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 12451 } | |
| 12452 if (query.length > 0) { | |
| 12453 for (var part in query.split("&")) { | |
| 12454 var keyvalue = part.split("="); | |
| 12455 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 12456 } | |
| 12457 } | |
| 12458 | |
| 12459 | |
| 12460 var h = { | |
| 12461 "content-type" : "application/json; charset=utf-8", | |
| 12462 }; | |
| 12463 var resp = ""; | |
| 12464 return new async.Future.value(stringResponse(200, h, resp)); | |
| 12465 }), true); | |
| 12466 res.delete(arg_profileId, arg_id).then(unittest.expectAsync((_) {})); | |
| 12467 }); | |
| 12468 | |
| 12469 unittest.test("method--get", () { | |
| 12470 | |
| 12471 var mock = new HttpServerMock(); | |
| 12472 api.AdvertiserGroupsResourceApi res = new api.DfareportingApi(mock).advert
iserGroups; | |
| 12473 var arg_profileId = "foo"; | |
| 12474 var arg_id = "foo"; | |
| 12475 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 12476 var path = (req.url).path; | |
| 12477 var pathOffset = 0; | |
| 12478 var index; | |
| 12479 var subPart; | |
| 12480 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 12481 pathOffset += 1; | |
| 12482 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 12483 pathOffset += 18; | |
| 12484 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 12485 pathOffset += 13; | |
| 12486 index = path.indexOf("/advertiserGroups/", pathOffset); | |
| 12487 unittest.expect(index >= 0, unittest.isTrue); | |
| 12488 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 12489 pathOffset = index; | |
| 12490 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 12491 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("/advertiserGroups/")); | |
| 12492 pathOffset += 18; | |
| 12493 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 12494 pathOffset = path.length; | |
| 12495 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 12496 | |
| 12497 var query = (req.url).query; | |
| 12498 var queryOffset = 0; | |
| 12499 var queryMap = {}; | |
| 12500 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 12501 parseBool(n) { | |
| 12502 if (n == "true") return true; | |
| 12503 if (n == "false") return false; | |
| 12504 if (n == null) return null; | |
| 12505 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 12506 } | |
| 12507 if (query.length > 0) { | |
| 12508 for (var part in query.split("&")) { | |
| 12509 var keyvalue = part.split("="); | |
| 12510 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 12511 } | |
| 12512 } | |
| 12513 | |
| 12514 | |
| 12515 var h = { | |
| 12516 "content-type" : "application/json; charset=utf-8", | |
| 12517 }; | |
| 12518 var resp = convert.JSON.encode(buildAdvertiserGroup()); | |
| 12519 return new async.Future.value(stringResponse(200, h, resp)); | |
| 12520 }), true); | |
| 12521 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.AdvertiserG
roup response) { | |
| 12522 checkAdvertiserGroup(response); | |
| 12523 }))); | |
| 12524 }); | |
| 12525 | |
| 12526 unittest.test("method--insert", () { | |
| 12527 | |
| 12528 var mock = new HttpServerMock(); | |
| 12529 api.AdvertiserGroupsResourceApi res = new api.DfareportingApi(mock).advert
iserGroups; | |
| 12530 var arg_request = buildAdvertiserGroup(); | |
| 12531 var arg_profileId = "foo"; | |
| 12532 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 12533 var obj = new api.AdvertiserGroup.fromJson(json); | |
| 12534 checkAdvertiserGroup(obj); | |
| 12535 | |
| 12536 var path = (req.url).path; | |
| 12537 var pathOffset = 0; | |
| 12538 var index; | |
| 12539 var subPart; | |
| 12540 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 12541 pathOffset += 1; | |
| 12542 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 12543 pathOffset += 18; | |
| 12544 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 12545 pathOffset += 13; | |
| 12546 index = path.indexOf("/advertiserGroups", pathOffset); | |
| 12547 unittest.expect(index >= 0, unittest.isTrue); | |
| 12548 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 12549 pathOffset = index; | |
| 12550 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 12551 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("/advertiserGroups")); | |
| 12552 pathOffset += 17; | |
| 12553 | |
| 12554 var query = (req.url).query; | |
| 12555 var queryOffset = 0; | |
| 12556 var queryMap = {}; | |
| 12557 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 12558 parseBool(n) { | |
| 12559 if (n == "true") return true; | |
| 12560 if (n == "false") return false; | |
| 12561 if (n == null) return null; | |
| 12562 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 12563 } | |
| 12564 if (query.length > 0) { | |
| 12565 for (var part in query.split("&")) { | |
| 12566 var keyvalue = part.split("="); | |
| 12567 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 12568 } | |
| 12569 } | |
| 12570 | |
| 12571 | |
| 12572 var h = { | |
| 12573 "content-type" : "application/json; charset=utf-8", | |
| 12574 }; | |
| 12575 var resp = convert.JSON.encode(buildAdvertiserGroup()); | |
| 12576 return new async.Future.value(stringResponse(200, h, resp)); | |
| 12577 }), true); | |
| 12578 res.insert(arg_request, arg_profileId).then(unittest.expectAsync(((api.Adv
ertiserGroup response) { | |
| 12579 checkAdvertiserGroup(response); | |
| 12580 }))); | |
| 12581 }); | |
| 12582 | |
| 12583 unittest.test("method--list", () { | |
| 12584 | |
| 12585 var mock = new HttpServerMock(); | |
| 12586 api.AdvertiserGroupsResourceApi res = new api.DfareportingApi(mock).advert
iserGroups; | |
| 12587 var arg_profileId = "foo"; | |
| 12588 var arg_ids = buildUnnamed1501(); | |
| 12589 var arg_maxResults = 42; | |
| 12590 var arg_pageToken = "foo"; | |
| 12591 var arg_searchString = "foo"; | |
| 12592 var arg_sortField = "foo"; | |
| 12593 var arg_sortOrder = "foo"; | |
| 12594 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 12595 var path = (req.url).path; | |
| 12596 var pathOffset = 0; | |
| 12597 var index; | |
| 12598 var subPart; | |
| 12599 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 12600 pathOffset += 1; | |
| 12601 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 12602 pathOffset += 18; | |
| 12603 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 12604 pathOffset += 13; | |
| 12605 index = path.indexOf("/advertiserGroups", pathOffset); | |
| 12606 unittest.expect(index >= 0, unittest.isTrue); | |
| 12607 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 12608 pathOffset = index; | |
| 12609 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 12610 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("/advertiserGroups")); | |
| 12611 pathOffset += 17; | |
| 12612 | |
| 12613 var query = (req.url).query; | |
| 12614 var queryOffset = 0; | |
| 12615 var queryMap = {}; | |
| 12616 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 12617 parseBool(n) { | |
| 12618 if (n == "true") return true; | |
| 12619 if (n == "false") return false; | |
| 12620 if (n == null) return null; | |
| 12621 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 12622 } | |
| 12623 if (query.length > 0) { | |
| 12624 for (var part in query.split("&")) { | |
| 12625 var keyvalue = part.split("="); | |
| 12626 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 12627 } | |
| 12628 } | |
| 12629 unittest.expect(queryMap["ids"], unittest.equals(arg_ids)); | |
| 12630 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | |
| 12631 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 12632 unittest.expect(queryMap["searchString"].first, unittest.equals(arg_sear
chString)); | |
| 12633 unittest.expect(queryMap["sortField"].first, unittest.equals(arg_sortFie
ld)); | |
| 12634 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | |
| 12635 | |
| 12636 | |
| 12637 var h = { | |
| 12638 "content-type" : "application/json; charset=utf-8", | |
| 12639 }; | |
| 12640 var resp = convert.JSON.encode(buildAdvertiserGroupsListResponse()); | |
| 12641 return new async.Future.value(stringResponse(200, h, resp)); | |
| 12642 }), true); | |
| 12643 res.list(arg_profileId, ids: arg_ids, maxResults: arg_maxResults, pageToke
n: arg_pageToken, searchString: arg_searchString, sortField: arg_sortField, sort
Order: arg_sortOrder).then(unittest.expectAsync(((api.AdvertiserGroupsListRespon
se response) { | |
| 12644 checkAdvertiserGroupsListResponse(response); | |
| 12645 }))); | |
| 12646 }); | |
| 12647 | |
| 12648 unittest.test("method--patch", () { | |
| 12649 | |
| 12650 var mock = new HttpServerMock(); | |
| 12651 api.AdvertiserGroupsResourceApi res = new api.DfareportingApi(mock).advert
iserGroups; | |
| 12652 var arg_request = buildAdvertiserGroup(); | |
| 12653 var arg_profileId = "foo"; | |
| 12654 var arg_id = "foo"; | |
| 12655 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 12656 var obj = new api.AdvertiserGroup.fromJson(json); | |
| 12657 checkAdvertiserGroup(obj); | |
| 12658 | |
| 12659 var path = (req.url).path; | |
| 12660 var pathOffset = 0; | |
| 12661 var index; | |
| 12662 var subPart; | |
| 12663 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 12664 pathOffset += 1; | |
| 12665 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 12666 pathOffset += 18; | |
| 12667 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 12668 pathOffset += 13; | |
| 12669 index = path.indexOf("/advertiserGroups", pathOffset); | |
| 12670 unittest.expect(index >= 0, unittest.isTrue); | |
| 12671 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 12672 pathOffset = index; | |
| 12673 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 12674 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("/advertiserGroups")); | |
| 12675 pathOffset += 17; | |
| 12676 | |
| 12677 var query = (req.url).query; | |
| 12678 var queryOffset = 0; | |
| 12679 var queryMap = {}; | |
| 12680 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 12681 parseBool(n) { | |
| 12682 if (n == "true") return true; | |
| 12683 if (n == "false") return false; | |
| 12684 if (n == null) return null; | |
| 12685 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 12686 } | |
| 12687 if (query.length > 0) { | |
| 12688 for (var part in query.split("&")) { | |
| 12689 var keyvalue = part.split("="); | |
| 12690 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 12691 } | |
| 12692 } | |
| 12693 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); | |
| 12694 | |
| 12695 | |
| 12696 var h = { | |
| 12697 "content-type" : "application/json; charset=utf-8", | |
| 12698 }; | |
| 12699 var resp = convert.JSON.encode(buildAdvertiserGroup()); | |
| 12700 return new async.Future.value(stringResponse(200, h, resp)); | |
| 12701 }), true); | |
| 12702 res.patch(arg_request, arg_profileId, arg_id).then(unittest.expectAsync(((
api.AdvertiserGroup response) { | |
| 12703 checkAdvertiserGroup(response); | |
| 12704 }))); | |
| 12705 }); | |
| 12706 | |
| 12707 unittest.test("method--update", () { | |
| 12708 | |
| 12709 var mock = new HttpServerMock(); | |
| 12710 api.AdvertiserGroupsResourceApi res = new api.DfareportingApi(mock).advert
iserGroups; | |
| 12711 var arg_request = buildAdvertiserGroup(); | |
| 12712 var arg_profileId = "foo"; | |
| 12713 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 12714 var obj = new api.AdvertiserGroup.fromJson(json); | |
| 12715 checkAdvertiserGroup(obj); | |
| 12716 | |
| 12717 var path = (req.url).path; | |
| 12718 var pathOffset = 0; | |
| 12719 var index; | |
| 12720 var subPart; | |
| 12721 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 12722 pathOffset += 1; | |
| 12723 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 12724 pathOffset += 18; | |
| 12725 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 12726 pathOffset += 13; | |
| 12727 index = path.indexOf("/advertiserGroups", pathOffset); | |
| 12728 unittest.expect(index >= 0, unittest.isTrue); | |
| 12729 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 12730 pathOffset = index; | |
| 12731 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 12732 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("/advertiserGroups")); | |
| 12733 pathOffset += 17; | |
| 12734 | |
| 12735 var query = (req.url).query; | |
| 12736 var queryOffset = 0; | |
| 12737 var queryMap = {}; | |
| 12738 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 12739 parseBool(n) { | |
| 12740 if (n == "true") return true; | |
| 12741 if (n == "false") return false; | |
| 12742 if (n == null) return null; | |
| 12743 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 12744 } | |
| 12745 if (query.length > 0) { | |
| 12746 for (var part in query.split("&")) { | |
| 12747 var keyvalue = part.split("="); | |
| 12748 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 12749 } | |
| 12750 } | |
| 12751 | |
| 12752 | |
| 12753 var h = { | |
| 12754 "content-type" : "application/json; charset=utf-8", | |
| 12755 }; | |
| 12756 var resp = convert.JSON.encode(buildAdvertiserGroup()); | |
| 12757 return new async.Future.value(stringResponse(200, h, resp)); | |
| 12758 }), true); | |
| 12759 res.update(arg_request, arg_profileId).then(unittest.expectAsync(((api.Adv
ertiserGroup response) { | |
| 12760 checkAdvertiserGroup(response); | |
| 12761 }))); | |
| 12762 }); | |
| 12763 | |
| 12764 }); | |
| 12765 | |
| 12766 | |
| 12767 unittest.group("resource-AdvertisersResourceApi", () { | |
| 12768 unittest.test("method--get", () { | |
| 12769 | |
| 12770 var mock = new HttpServerMock(); | |
| 12771 api.AdvertisersResourceApi res = new api.DfareportingApi(mock).advertisers
; | |
| 12772 var arg_profileId = "foo"; | |
| 12773 var arg_id = "foo"; | |
| 12774 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 12775 var path = (req.url).path; | |
| 12776 var pathOffset = 0; | |
| 12777 var index; | |
| 12778 var subPart; | |
| 12779 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 12780 pathOffset += 1; | |
| 12781 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 12782 pathOffset += 18; | |
| 12783 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 12784 pathOffset += 13; | |
| 12785 index = path.indexOf("/advertisers/", pathOffset); | |
| 12786 unittest.expect(index >= 0, unittest.isTrue); | |
| 12787 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 12788 pathOffset = index; | |
| 12789 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 12790 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("/advertisers/")); | |
| 12791 pathOffset += 13; | |
| 12792 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 12793 pathOffset = path.length; | |
| 12794 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 12795 | |
| 12796 var query = (req.url).query; | |
| 12797 var queryOffset = 0; | |
| 12798 var queryMap = {}; | |
| 12799 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 12800 parseBool(n) { | |
| 12801 if (n == "true") return true; | |
| 12802 if (n == "false") return false; | |
| 12803 if (n == null) return null; | |
| 12804 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 12805 } | |
| 12806 if (query.length > 0) { | |
| 12807 for (var part in query.split("&")) { | |
| 12808 var keyvalue = part.split("="); | |
| 12809 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 12810 } | |
| 12811 } | |
| 12812 | |
| 12813 | |
| 12814 var h = { | |
| 12815 "content-type" : "application/json; charset=utf-8", | |
| 12816 }; | |
| 12817 var resp = convert.JSON.encode(buildAdvertiser()); | |
| 12818 return new async.Future.value(stringResponse(200, h, resp)); | |
| 12819 }), true); | |
| 12820 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.Advertiser
response) { | |
| 12821 checkAdvertiser(response); | |
| 12822 }))); | |
| 12823 }); | |
| 12824 | |
| 12825 unittest.test("method--insert", () { | |
| 12826 | |
| 12827 var mock = new HttpServerMock(); | |
| 12828 api.AdvertisersResourceApi res = new api.DfareportingApi(mock).advertisers
; | |
| 12829 var arg_request = buildAdvertiser(); | |
| 12830 var arg_profileId = "foo"; | |
| 12831 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 12832 var obj = new api.Advertiser.fromJson(json); | |
| 12833 checkAdvertiser(obj); | |
| 12834 | |
| 12835 var path = (req.url).path; | |
| 12836 var pathOffset = 0; | |
| 12837 var index; | |
| 12838 var subPart; | |
| 12839 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 12840 pathOffset += 1; | |
| 12841 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 12842 pathOffset += 18; | |
| 12843 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 12844 pathOffset += 13; | |
| 12845 index = path.indexOf("/advertisers", pathOffset); | |
| 12846 unittest.expect(index >= 0, unittest.isTrue); | |
| 12847 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 12848 pathOffset = index; | |
| 12849 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 12850 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("/advertisers")); | |
| 12851 pathOffset += 12; | |
| 12852 | |
| 12853 var query = (req.url).query; | |
| 12854 var queryOffset = 0; | |
| 12855 var queryMap = {}; | |
| 12856 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 12857 parseBool(n) { | |
| 12858 if (n == "true") return true; | |
| 12859 if (n == "false") return false; | |
| 12860 if (n == null) return null; | |
| 12861 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 12862 } | |
| 12863 if (query.length > 0) { | |
| 12864 for (var part in query.split("&")) { | |
| 12865 var keyvalue = part.split("="); | |
| 12866 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 12867 } | |
| 12868 } | |
| 12869 | |
| 12870 | |
| 12871 var h = { | |
| 12872 "content-type" : "application/json; charset=utf-8", | |
| 12873 }; | |
| 12874 var resp = convert.JSON.encode(buildAdvertiser()); | |
| 12875 return new async.Future.value(stringResponse(200, h, resp)); | |
| 12876 }), true); | |
| 12877 res.insert(arg_request, arg_profileId).then(unittest.expectAsync(((api.Adv
ertiser response) { | |
| 12878 checkAdvertiser(response); | |
| 12879 }))); | |
| 12880 }); | |
| 12881 | |
| 12882 unittest.test("method--list", () { | |
| 12883 | |
| 12884 var mock = new HttpServerMock(); | |
| 12885 api.AdvertisersResourceApi res = new api.DfareportingApi(mock).advertisers
; | |
| 12886 var arg_profileId = "foo"; | |
| 12887 var arg_advertiserGroupIds = buildUnnamed1502(); | |
| 12888 var arg_floodlightConfigurationIds = buildUnnamed1503(); | |
| 12889 var arg_ids = buildUnnamed1504(); | |
| 12890 var arg_includeAdvertisersWithoutGroupsOnly = true; | |
| 12891 var arg_maxResults = 42; | |
| 12892 var arg_onlyParent = true; | |
| 12893 var arg_pageToken = "foo"; | |
| 12894 var arg_searchString = "foo"; | |
| 12895 var arg_sortField = "foo"; | |
| 12896 var arg_sortOrder = "foo"; | |
| 12897 var arg_status = "foo"; | |
| 12898 var arg_subaccountId = "foo"; | |
| 12899 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 12900 var path = (req.url).path; | |
| 12901 var pathOffset = 0; | |
| 12902 var index; | |
| 12903 var subPart; | |
| 12904 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 12905 pathOffset += 1; | |
| 12906 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 12907 pathOffset += 18; | |
| 12908 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 12909 pathOffset += 13; | |
| 12910 index = path.indexOf("/advertisers", pathOffset); | |
| 12911 unittest.expect(index >= 0, unittest.isTrue); | |
| 12912 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 12913 pathOffset = index; | |
| 12914 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 12915 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("/advertisers")); | |
| 12916 pathOffset += 12; | |
| 12917 | |
| 12918 var query = (req.url).query; | |
| 12919 var queryOffset = 0; | |
| 12920 var queryMap = {}; | |
| 12921 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 12922 parseBool(n) { | |
| 12923 if (n == "true") return true; | |
| 12924 if (n == "false") return false; | |
| 12925 if (n == null) return null; | |
| 12926 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 12927 } | |
| 12928 if (query.length > 0) { | |
| 12929 for (var part in query.split("&")) { | |
| 12930 var keyvalue = part.split("="); | |
| 12931 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 12932 } | |
| 12933 } | |
| 12934 unittest.expect(queryMap["advertiserGroupIds"], unittest.equals(arg_adve
rtiserGroupIds)); | |
| 12935 unittest.expect(queryMap["floodlightConfigurationIds"], unittest.equals(
arg_floodlightConfigurationIds)); | |
| 12936 unittest.expect(queryMap["ids"], unittest.equals(arg_ids)); | |
| 12937 unittest.expect(queryMap["includeAdvertisersWithoutGroupsOnly"].first, u
nittest.equals("$arg_includeAdvertisersWithoutGroupsOnly")); | |
| 12938 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | |
| 12939 unittest.expect(queryMap["onlyParent"].first, unittest.equals("$arg_only
Parent")); | |
| 12940 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 12941 unittest.expect(queryMap["searchString"].first, unittest.equals(arg_sear
chString)); | |
| 12942 unittest.expect(queryMap["sortField"].first, unittest.equals(arg_sortFie
ld)); | |
| 12943 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | |
| 12944 unittest.expect(queryMap["status"].first, unittest.equals(arg_status)); | |
| 12945 unittest.expect(queryMap["subaccountId"].first, unittest.equals(arg_suba
ccountId)); | |
| 12946 | |
| 12947 | |
| 12948 var h = { | |
| 12949 "content-type" : "application/json; charset=utf-8", | |
| 12950 }; | |
| 12951 var resp = convert.JSON.encode(buildAdvertisersListResponse()); | |
| 12952 return new async.Future.value(stringResponse(200, h, resp)); | |
| 12953 }), true); | |
| 12954 res.list(arg_profileId, advertiserGroupIds: arg_advertiserGroupIds, floodl
ightConfigurationIds: arg_floodlightConfigurationIds, ids: arg_ids, includeAdver
tisersWithoutGroupsOnly: arg_includeAdvertisersWithoutGroupsOnly, maxResults: ar
g_maxResults, onlyParent: arg_onlyParent, pageToken: arg_pageToken, searchString
: arg_searchString, sortField: arg_sortField, sortOrder: arg_sortOrder, status:
arg_status, subaccountId: arg_subaccountId).then(unittest.expectAsync(((api.Adve
rtisersListResponse response) { | |
| 12955 checkAdvertisersListResponse(response); | |
| 12956 }))); | |
| 12957 }); | |
| 12958 | |
| 12959 unittest.test("method--patch", () { | |
| 12960 | |
| 12961 var mock = new HttpServerMock(); | |
| 12962 api.AdvertisersResourceApi res = new api.DfareportingApi(mock).advertisers
; | |
| 12963 var arg_request = buildAdvertiser(); | |
| 12964 var arg_profileId = "foo"; | |
| 12965 var arg_id = "foo"; | |
| 12966 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 12967 var obj = new api.Advertiser.fromJson(json); | |
| 12968 checkAdvertiser(obj); | |
| 12969 | |
| 12970 var path = (req.url).path; | |
| 12971 var pathOffset = 0; | |
| 12972 var index; | |
| 12973 var subPart; | |
| 12974 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 12975 pathOffset += 1; | |
| 12976 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 12977 pathOffset += 18; | |
| 12978 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 12979 pathOffset += 13; | |
| 12980 index = path.indexOf("/advertisers", pathOffset); | |
| 12981 unittest.expect(index >= 0, unittest.isTrue); | |
| 12982 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 12983 pathOffset = index; | |
| 12984 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 12985 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("/advertisers")); | |
| 12986 pathOffset += 12; | |
| 12987 | |
| 12988 var query = (req.url).query; | |
| 12989 var queryOffset = 0; | |
| 12990 var queryMap = {}; | |
| 12991 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 12992 parseBool(n) { | |
| 12993 if (n == "true") return true; | |
| 12994 if (n == "false") return false; | |
| 12995 if (n == null) return null; | |
| 12996 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 12997 } | |
| 12998 if (query.length > 0) { | |
| 12999 for (var part in query.split("&")) { | |
| 13000 var keyvalue = part.split("="); | |
| 13001 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 13002 } | |
| 13003 } | |
| 13004 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); | |
| 13005 | |
| 13006 | |
| 13007 var h = { | |
| 13008 "content-type" : "application/json; charset=utf-8", | |
| 13009 }; | |
| 13010 var resp = convert.JSON.encode(buildAdvertiser()); | |
| 13011 return new async.Future.value(stringResponse(200, h, resp)); | |
| 13012 }), true); | |
| 13013 res.patch(arg_request, arg_profileId, arg_id).then(unittest.expectAsync(((
api.Advertiser response) { | |
| 13014 checkAdvertiser(response); | |
| 13015 }))); | |
| 13016 }); | |
| 13017 | |
| 13018 unittest.test("method--update", () { | |
| 13019 | |
| 13020 var mock = new HttpServerMock(); | |
| 13021 api.AdvertisersResourceApi res = new api.DfareportingApi(mock).advertisers
; | |
| 13022 var arg_request = buildAdvertiser(); | |
| 13023 var arg_profileId = "foo"; | |
| 13024 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 13025 var obj = new api.Advertiser.fromJson(json); | |
| 13026 checkAdvertiser(obj); | |
| 13027 | |
| 13028 var path = (req.url).path; | |
| 13029 var pathOffset = 0; | |
| 13030 var index; | |
| 13031 var subPart; | |
| 13032 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 13033 pathOffset += 1; | |
| 13034 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 13035 pathOffset += 18; | |
| 13036 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 13037 pathOffset += 13; | |
| 13038 index = path.indexOf("/advertisers", pathOffset); | |
| 13039 unittest.expect(index >= 0, unittest.isTrue); | |
| 13040 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 13041 pathOffset = index; | |
| 13042 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 13043 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("/advertisers")); | |
| 13044 pathOffset += 12; | |
| 13045 | |
| 13046 var query = (req.url).query; | |
| 13047 var queryOffset = 0; | |
| 13048 var queryMap = {}; | |
| 13049 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 13050 parseBool(n) { | |
| 13051 if (n == "true") return true; | |
| 13052 if (n == "false") return false; | |
| 13053 if (n == null) return null; | |
| 13054 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 13055 } | |
| 13056 if (query.length > 0) { | |
| 13057 for (var part in query.split("&")) { | |
| 13058 var keyvalue = part.split("="); | |
| 13059 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 13060 } | |
| 13061 } | |
| 13062 | |
| 13063 | |
| 13064 var h = { | |
| 13065 "content-type" : "application/json; charset=utf-8", | |
| 13066 }; | |
| 13067 var resp = convert.JSON.encode(buildAdvertiser()); | |
| 13068 return new async.Future.value(stringResponse(200, h, resp)); | |
| 13069 }), true); | |
| 13070 res.update(arg_request, arg_profileId).then(unittest.expectAsync(((api.Adv
ertiser response) { | |
| 13071 checkAdvertiser(response); | |
| 13072 }))); | |
| 13073 }); | |
| 13074 | |
| 13075 }); | |
| 13076 | |
| 13077 | |
| 13078 unittest.group("resource-BrowsersResourceApi", () { | |
| 13079 unittest.test("method--list", () { | |
| 13080 | |
| 13081 var mock = new HttpServerMock(); | |
| 13082 api.BrowsersResourceApi res = new api.DfareportingApi(mock).browsers; | |
| 13083 var arg_profileId = "foo"; | |
| 13084 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 13085 var path = (req.url).path; | |
| 13086 var pathOffset = 0; | |
| 13087 var index; | |
| 13088 var subPart; | |
| 13089 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 13090 pathOffset += 1; | |
| 13091 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 13092 pathOffset += 18; | |
| 13093 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 13094 pathOffset += 13; | |
| 13095 index = path.indexOf("/browsers", pathOffset); | |
| 13096 unittest.expect(index >= 0, unittest.isTrue); | |
| 13097 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 13098 pathOffset = index; | |
| 13099 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 13100 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("/browsers")); | |
| 13101 pathOffset += 9; | |
| 13102 | |
| 13103 var query = (req.url).query; | |
| 13104 var queryOffset = 0; | |
| 13105 var queryMap = {}; | |
| 13106 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 13107 parseBool(n) { | |
| 13108 if (n == "true") return true; | |
| 13109 if (n == "false") return false; | |
| 13110 if (n == null) return null; | |
| 13111 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 13112 } | |
| 13113 if (query.length > 0) { | |
| 13114 for (var part in query.split("&")) { | |
| 13115 var keyvalue = part.split("="); | |
| 13116 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 13117 } | |
| 13118 } | |
| 13119 | |
| 13120 | |
| 13121 var h = { | |
| 13122 "content-type" : "application/json; charset=utf-8", | |
| 13123 }; | |
| 13124 var resp = convert.JSON.encode(buildBrowsersListResponse()); | |
| 13125 return new async.Future.value(stringResponse(200, h, resp)); | |
| 13126 }), true); | |
| 13127 res.list(arg_profileId).then(unittest.expectAsync(((api.BrowsersListRespon
se response) { | |
| 13128 checkBrowsersListResponse(response); | |
| 13129 }))); | |
| 13130 }); | |
| 13131 | |
| 13132 }); | |
| 13133 | |
| 13134 | |
| 13135 unittest.group("resource-CampaignCreativeAssociationsResourceApi", () { | |
| 13136 unittest.test("method--insert", () { | |
| 13137 | |
| 13138 var mock = new HttpServerMock(); | |
| 13139 api.CampaignCreativeAssociationsResourceApi res = new api.DfareportingApi(
mock).campaignCreativeAssociations; | |
| 13140 var arg_request = buildCampaignCreativeAssociation(); | |
| 13141 var arg_profileId = "foo"; | |
| 13142 var arg_campaignId = "foo"; | |
| 13143 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 13144 var obj = new api.CampaignCreativeAssociation.fromJson(json); | |
| 13145 checkCampaignCreativeAssociation(obj); | |
| 13146 | |
| 13147 var path = (req.url).path; | |
| 13148 var pathOffset = 0; | |
| 13149 var index; | |
| 13150 var subPart; | |
| 13151 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 13152 pathOffset += 1; | |
| 13153 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 13154 pathOffset += 18; | |
| 13155 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 13156 pathOffset += 13; | |
| 13157 index = path.indexOf("/campaigns/", pathOffset); | |
| 13158 unittest.expect(index >= 0, unittest.isTrue); | |
| 13159 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 13160 pathOffset = index; | |
| 13161 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 13162 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("/campaigns/")); | |
| 13163 pathOffset += 11; | |
| 13164 index = path.indexOf("/campaignCreativeAssociations", pathOffset); | |
| 13165 unittest.expect(index >= 0, unittest.isTrue); | |
| 13166 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 13167 pathOffset = index; | |
| 13168 unittest.expect(subPart, unittest.equals("$arg_campaignId")); | |
| 13169 unittest.expect(path.substring(pathOffset, pathOffset + 29), unittest.eq
uals("/campaignCreativeAssociations")); | |
| 13170 pathOffset += 29; | |
| 13171 | |
| 13172 var query = (req.url).query; | |
| 13173 var queryOffset = 0; | |
| 13174 var queryMap = {}; | |
| 13175 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 13176 parseBool(n) { | |
| 13177 if (n == "true") return true; | |
| 13178 if (n == "false") return false; | |
| 13179 if (n == null) return null; | |
| 13180 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 13181 } | |
| 13182 if (query.length > 0) { | |
| 13183 for (var part in query.split("&")) { | |
| 13184 var keyvalue = part.split("="); | |
| 13185 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 13186 } | |
| 13187 } | |
| 13188 | |
| 13189 | |
| 13190 var h = { | |
| 13191 "content-type" : "application/json; charset=utf-8", | |
| 13192 }; | |
| 13193 var resp = convert.JSON.encode(buildCampaignCreativeAssociation()); | |
| 13194 return new async.Future.value(stringResponse(200, h, resp)); | |
| 13195 }), true); | |
| 13196 res.insert(arg_request, arg_profileId, arg_campaignId).then(unittest.expec
tAsync(((api.CampaignCreativeAssociation response) { | |
| 13197 checkCampaignCreativeAssociation(response); | |
| 13198 }))); | |
| 13199 }); | |
| 13200 | |
| 13201 unittest.test("method--list", () { | |
| 13202 | |
| 13203 var mock = new HttpServerMock(); | |
| 13204 api.CampaignCreativeAssociationsResourceApi res = new api.DfareportingApi(
mock).campaignCreativeAssociations; | |
| 13205 var arg_profileId = "foo"; | |
| 13206 var arg_campaignId = "foo"; | |
| 13207 var arg_maxResults = 42; | |
| 13208 var arg_pageToken = "foo"; | |
| 13209 var arg_sortOrder = "foo"; | |
| 13210 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 13211 var path = (req.url).path; | |
| 13212 var pathOffset = 0; | |
| 13213 var index; | |
| 13214 var subPart; | |
| 13215 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 13216 pathOffset += 1; | |
| 13217 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 13218 pathOffset += 18; | |
| 13219 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 13220 pathOffset += 13; | |
| 13221 index = path.indexOf("/campaigns/", pathOffset); | |
| 13222 unittest.expect(index >= 0, unittest.isTrue); | |
| 13223 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 13224 pathOffset = index; | |
| 13225 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 13226 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("/campaigns/")); | |
| 13227 pathOffset += 11; | |
| 13228 index = path.indexOf("/campaignCreativeAssociations", pathOffset); | |
| 13229 unittest.expect(index >= 0, unittest.isTrue); | |
| 13230 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 13231 pathOffset = index; | |
| 13232 unittest.expect(subPart, unittest.equals("$arg_campaignId")); | |
| 13233 unittest.expect(path.substring(pathOffset, pathOffset + 29), unittest.eq
uals("/campaignCreativeAssociations")); | |
| 13234 pathOffset += 29; | |
| 13235 | |
| 13236 var query = (req.url).query; | |
| 13237 var queryOffset = 0; | |
| 13238 var queryMap = {}; | |
| 13239 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 13240 parseBool(n) { | |
| 13241 if (n == "true") return true; | |
| 13242 if (n == "false") return false; | |
| 13243 if (n == null) return null; | |
| 13244 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 13245 } | |
| 13246 if (query.length > 0) { | |
| 13247 for (var part in query.split("&")) { | |
| 13248 var keyvalue = part.split("="); | |
| 13249 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 13250 } | |
| 13251 } | |
| 13252 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | |
| 13253 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 13254 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | |
| 13255 | |
| 13256 | |
| 13257 var h = { | |
| 13258 "content-type" : "application/json; charset=utf-8", | |
| 13259 }; | |
| 13260 var resp = convert.JSON.encode(buildCampaignCreativeAssociationsListResp
onse()); | |
| 13261 return new async.Future.value(stringResponse(200, h, resp)); | |
| 13262 }), true); | |
| 13263 res.list(arg_profileId, arg_campaignId, maxResults: arg_maxResults, pageTo
ken: arg_pageToken, sortOrder: arg_sortOrder).then(unittest.expectAsync(((api.Ca
mpaignCreativeAssociationsListResponse response) { | |
| 13264 checkCampaignCreativeAssociationsListResponse(response); | |
| 13265 }))); | |
| 13266 }); | |
| 13267 | |
| 13268 }); | |
| 13269 | |
| 13270 | |
| 13271 unittest.group("resource-CampaignsResourceApi", () { | |
| 13272 unittest.test("method--get", () { | |
| 13273 | |
| 13274 var mock = new HttpServerMock(); | |
| 13275 api.CampaignsResourceApi res = new api.DfareportingApi(mock).campaigns; | |
| 13276 var arg_profileId = "foo"; | |
| 13277 var arg_id = "foo"; | |
| 13278 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 13279 var path = (req.url).path; | |
| 13280 var pathOffset = 0; | |
| 13281 var index; | |
| 13282 var subPart; | |
| 13283 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 13284 pathOffset += 1; | |
| 13285 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 13286 pathOffset += 18; | |
| 13287 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 13288 pathOffset += 13; | |
| 13289 index = path.indexOf("/campaigns/", pathOffset); | |
| 13290 unittest.expect(index >= 0, unittest.isTrue); | |
| 13291 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 13292 pathOffset = index; | |
| 13293 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 13294 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("/campaigns/")); | |
| 13295 pathOffset += 11; | |
| 13296 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 13297 pathOffset = path.length; | |
| 13298 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 13299 | |
| 13300 var query = (req.url).query; | |
| 13301 var queryOffset = 0; | |
| 13302 var queryMap = {}; | |
| 13303 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 13304 parseBool(n) { | |
| 13305 if (n == "true") return true; | |
| 13306 if (n == "false") return false; | |
| 13307 if (n == null) return null; | |
| 13308 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 13309 } | |
| 13310 if (query.length > 0) { | |
| 13311 for (var part in query.split("&")) { | |
| 13312 var keyvalue = part.split("="); | |
| 13313 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 13314 } | |
| 13315 } | |
| 13316 | |
| 13317 | |
| 13318 var h = { | |
| 13319 "content-type" : "application/json; charset=utf-8", | |
| 13320 }; | |
| 13321 var resp = convert.JSON.encode(buildCampaign()); | |
| 13322 return new async.Future.value(stringResponse(200, h, resp)); | |
| 13323 }), true); | |
| 13324 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.Campaign re
sponse) { | |
| 13325 checkCampaign(response); | |
| 13326 }))); | |
| 13327 }); | |
| 13328 | |
| 13329 unittest.test("method--insert", () { | |
| 13330 | |
| 13331 var mock = new HttpServerMock(); | |
| 13332 api.CampaignsResourceApi res = new api.DfareportingApi(mock).campaigns; | |
| 13333 var arg_request = buildCampaign(); | |
| 13334 var arg_profileId = "foo"; | |
| 13335 var arg_defaultLandingPageName = "foo"; | |
| 13336 var arg_defaultLandingPageUrl = "foo"; | |
| 13337 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 13338 var obj = new api.Campaign.fromJson(json); | |
| 13339 checkCampaign(obj); | |
| 13340 | |
| 13341 var path = (req.url).path; | |
| 13342 var pathOffset = 0; | |
| 13343 var index; | |
| 13344 var subPart; | |
| 13345 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 13346 pathOffset += 1; | |
| 13347 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 13348 pathOffset += 18; | |
| 13349 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 13350 pathOffset += 13; | |
| 13351 index = path.indexOf("/campaigns", pathOffset); | |
| 13352 unittest.expect(index >= 0, unittest.isTrue); | |
| 13353 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 13354 pathOffset = index; | |
| 13355 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 13356 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/campaigns")); | |
| 13357 pathOffset += 10; | |
| 13358 | |
| 13359 var query = (req.url).query; | |
| 13360 var queryOffset = 0; | |
| 13361 var queryMap = {}; | |
| 13362 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 13363 parseBool(n) { | |
| 13364 if (n == "true") return true; | |
| 13365 if (n == "false") return false; | |
| 13366 if (n == null) return null; | |
| 13367 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 13368 } | |
| 13369 if (query.length > 0) { | |
| 13370 for (var part in query.split("&")) { | |
| 13371 var keyvalue = part.split("="); | |
| 13372 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 13373 } | |
| 13374 } | |
| 13375 unittest.expect(queryMap["defaultLandingPageName"].first, unittest.equal
s(arg_defaultLandingPageName)); | |
| 13376 unittest.expect(queryMap["defaultLandingPageUrl"].first, unittest.equals
(arg_defaultLandingPageUrl)); | |
| 13377 | |
| 13378 | |
| 13379 var h = { | |
| 13380 "content-type" : "application/json; charset=utf-8", | |
| 13381 }; | |
| 13382 var resp = convert.JSON.encode(buildCampaign()); | |
| 13383 return new async.Future.value(stringResponse(200, h, resp)); | |
| 13384 }), true); | |
| 13385 res.insert(arg_request, arg_profileId, arg_defaultLandingPageName, arg_def
aultLandingPageUrl).then(unittest.expectAsync(((api.Campaign response) { | |
| 13386 checkCampaign(response); | |
| 13387 }))); | |
| 13388 }); | |
| 13389 | |
| 13390 unittest.test("method--list", () { | |
| 13391 | |
| 13392 var mock = new HttpServerMock(); | |
| 13393 api.CampaignsResourceApi res = new api.DfareportingApi(mock).campaigns; | |
| 13394 var arg_profileId = "foo"; | |
| 13395 var arg_advertiserGroupIds = buildUnnamed1505(); | |
| 13396 var arg_advertiserIds = buildUnnamed1506(); | |
| 13397 var arg_archived = true; | |
| 13398 var arg_atLeastOneOptimizationActivity = true; | |
| 13399 var arg_excludedIds = buildUnnamed1507(); | |
| 13400 var arg_ids = buildUnnamed1508(); | |
| 13401 var arg_maxResults = 42; | |
| 13402 var arg_overriddenEventTagId = "foo"; | |
| 13403 var arg_pageToken = "foo"; | |
| 13404 var arg_searchString = "foo"; | |
| 13405 var arg_sortField = "foo"; | |
| 13406 var arg_sortOrder = "foo"; | |
| 13407 var arg_subaccountId = "foo"; | |
| 13408 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 13409 var path = (req.url).path; | |
| 13410 var pathOffset = 0; | |
| 13411 var index; | |
| 13412 var subPart; | |
| 13413 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 13414 pathOffset += 1; | |
| 13415 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 13416 pathOffset += 18; | |
| 13417 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 13418 pathOffset += 13; | |
| 13419 index = path.indexOf("/campaigns", pathOffset); | |
| 13420 unittest.expect(index >= 0, unittest.isTrue); | |
| 13421 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 13422 pathOffset = index; | |
| 13423 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 13424 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/campaigns")); | |
| 13425 pathOffset += 10; | |
| 13426 | |
| 13427 var query = (req.url).query; | |
| 13428 var queryOffset = 0; | |
| 13429 var queryMap = {}; | |
| 13430 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 13431 parseBool(n) { | |
| 13432 if (n == "true") return true; | |
| 13433 if (n == "false") return false; | |
| 13434 if (n == null) return null; | |
| 13435 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 13436 } | |
| 13437 if (query.length > 0) { | |
| 13438 for (var part in query.split("&")) { | |
| 13439 var keyvalue = part.split("="); | |
| 13440 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 13441 } | |
| 13442 } | |
| 13443 unittest.expect(queryMap["advertiserGroupIds"], unittest.equals(arg_adve
rtiserGroupIds)); | |
| 13444 unittest.expect(queryMap["advertiserIds"], unittest.equals(arg_advertise
rIds)); | |
| 13445 unittest.expect(queryMap["archived"].first, unittest.equals("$arg_archiv
ed")); | |
| 13446 unittest.expect(queryMap["atLeastOneOptimizationActivity"].first, unitte
st.equals("$arg_atLeastOneOptimizationActivity")); | |
| 13447 unittest.expect(queryMap["excludedIds"], unittest.equals(arg_excludedIds
)); | |
| 13448 unittest.expect(queryMap["ids"], unittest.equals(arg_ids)); | |
| 13449 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | |
| 13450 unittest.expect(queryMap["overriddenEventTagId"].first, unittest.equals(
arg_overriddenEventTagId)); | |
| 13451 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 13452 unittest.expect(queryMap["searchString"].first, unittest.equals(arg_sear
chString)); | |
| 13453 unittest.expect(queryMap["sortField"].first, unittest.equals(arg_sortFie
ld)); | |
| 13454 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | |
| 13455 unittest.expect(queryMap["subaccountId"].first, unittest.equals(arg_suba
ccountId)); | |
| 13456 | |
| 13457 | |
| 13458 var h = { | |
| 13459 "content-type" : "application/json; charset=utf-8", | |
| 13460 }; | |
| 13461 var resp = convert.JSON.encode(buildCampaignsListResponse()); | |
| 13462 return new async.Future.value(stringResponse(200, h, resp)); | |
| 13463 }), true); | |
| 13464 res.list(arg_profileId, advertiserGroupIds: arg_advertiserGroupIds, advert
iserIds: arg_advertiserIds, archived: arg_archived, atLeastOneOptimizationActivi
ty: arg_atLeastOneOptimizationActivity, excludedIds: arg_excludedIds, ids: arg_i
ds, maxResults: arg_maxResults, overriddenEventTagId: arg_overriddenEventTagId,
pageToken: arg_pageToken, searchString: arg_searchString, sortField: arg_sortFie
ld, sortOrder: arg_sortOrder, subaccountId: arg_subaccountId).then(unittest.expe
ctAsync(((api.CampaignsListResponse response) { | |
| 13465 checkCampaignsListResponse(response); | |
| 13466 }))); | |
| 13467 }); | |
| 13468 | |
| 13469 unittest.test("method--patch", () { | |
| 13470 | |
| 13471 var mock = new HttpServerMock(); | |
| 13472 api.CampaignsResourceApi res = new api.DfareportingApi(mock).campaigns; | |
| 13473 var arg_request = buildCampaign(); | |
| 13474 var arg_profileId = "foo"; | |
| 13475 var arg_id = "foo"; | |
| 13476 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 13477 var obj = new api.Campaign.fromJson(json); | |
| 13478 checkCampaign(obj); | |
| 13479 | |
| 13480 var path = (req.url).path; | |
| 13481 var pathOffset = 0; | |
| 13482 var index; | |
| 13483 var subPart; | |
| 13484 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 13485 pathOffset += 1; | |
| 13486 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 13487 pathOffset += 18; | |
| 13488 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 13489 pathOffset += 13; | |
| 13490 index = path.indexOf("/campaigns", pathOffset); | |
| 13491 unittest.expect(index >= 0, unittest.isTrue); | |
| 13492 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 13493 pathOffset = index; | |
| 13494 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 13495 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/campaigns")); | |
| 13496 pathOffset += 10; | |
| 13497 | |
| 13498 var query = (req.url).query; | |
| 13499 var queryOffset = 0; | |
| 13500 var queryMap = {}; | |
| 13501 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 13502 parseBool(n) { | |
| 13503 if (n == "true") return true; | |
| 13504 if (n == "false") return false; | |
| 13505 if (n == null) return null; | |
| 13506 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 13507 } | |
| 13508 if (query.length > 0) { | |
| 13509 for (var part in query.split("&")) { | |
| 13510 var keyvalue = part.split("="); | |
| 13511 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 13512 } | |
| 13513 } | |
| 13514 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); | |
| 13515 | |
| 13516 | |
| 13517 var h = { | |
| 13518 "content-type" : "application/json; charset=utf-8", | |
| 13519 }; | |
| 13520 var resp = convert.JSON.encode(buildCampaign()); | |
| 13521 return new async.Future.value(stringResponse(200, h, resp)); | |
| 13522 }), true); | |
| 13523 res.patch(arg_request, arg_profileId, arg_id).then(unittest.expectAsync(((
api.Campaign response) { | |
| 13524 checkCampaign(response); | |
| 13525 }))); | |
| 13526 }); | |
| 13527 | |
| 13528 unittest.test("method--update", () { | |
| 13529 | |
| 13530 var mock = new HttpServerMock(); | |
| 13531 api.CampaignsResourceApi res = new api.DfareportingApi(mock).campaigns; | |
| 13532 var arg_request = buildCampaign(); | |
| 13533 var arg_profileId = "foo"; | |
| 13534 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 13535 var obj = new api.Campaign.fromJson(json); | |
| 13536 checkCampaign(obj); | |
| 13537 | |
| 13538 var path = (req.url).path; | |
| 13539 var pathOffset = 0; | |
| 13540 var index; | |
| 13541 var subPart; | |
| 13542 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 13543 pathOffset += 1; | |
| 13544 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 13545 pathOffset += 18; | |
| 13546 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 13547 pathOffset += 13; | |
| 13548 index = path.indexOf("/campaigns", pathOffset); | |
| 13549 unittest.expect(index >= 0, unittest.isTrue); | |
| 13550 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 13551 pathOffset = index; | |
| 13552 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 13553 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/campaigns")); | |
| 13554 pathOffset += 10; | |
| 13555 | |
| 13556 var query = (req.url).query; | |
| 13557 var queryOffset = 0; | |
| 13558 var queryMap = {}; | |
| 13559 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 13560 parseBool(n) { | |
| 13561 if (n == "true") return true; | |
| 13562 if (n == "false") return false; | |
| 13563 if (n == null) return null; | |
| 13564 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 13565 } | |
| 13566 if (query.length > 0) { | |
| 13567 for (var part in query.split("&")) { | |
| 13568 var keyvalue = part.split("="); | |
| 13569 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 13570 } | |
| 13571 } | |
| 13572 | |
| 13573 | |
| 13574 var h = { | |
| 13575 "content-type" : "application/json; charset=utf-8", | |
| 13576 }; | |
| 13577 var resp = convert.JSON.encode(buildCampaign()); | |
| 13578 return new async.Future.value(stringResponse(200, h, resp)); | |
| 13579 }), true); | |
| 13580 res.update(arg_request, arg_profileId).then(unittest.expectAsync(((api.Cam
paign response) { | |
| 13581 checkCampaign(response); | |
| 13582 }))); | |
| 13583 }); | |
| 13584 | |
| 13585 }); | |
| 13586 | |
| 13587 | |
| 13588 unittest.group("resource-ChangeLogsResourceApi", () { | |
| 13589 unittest.test("method--get", () { | |
| 13590 | |
| 13591 var mock = new HttpServerMock(); | |
| 13592 api.ChangeLogsResourceApi res = new api.DfareportingApi(mock).changeLogs; | |
| 13593 var arg_profileId = "foo"; | |
| 13594 var arg_id = "foo"; | |
| 13595 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 13596 var path = (req.url).path; | |
| 13597 var pathOffset = 0; | |
| 13598 var index; | |
| 13599 var subPart; | |
| 13600 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 13601 pathOffset += 1; | |
| 13602 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 13603 pathOffset += 18; | |
| 13604 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 13605 pathOffset += 13; | |
| 13606 index = path.indexOf("/changeLogs/", pathOffset); | |
| 13607 unittest.expect(index >= 0, unittest.isTrue); | |
| 13608 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 13609 pathOffset = index; | |
| 13610 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 13611 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("/changeLogs/")); | |
| 13612 pathOffset += 12; | |
| 13613 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 13614 pathOffset = path.length; | |
| 13615 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 13616 | |
| 13617 var query = (req.url).query; | |
| 13618 var queryOffset = 0; | |
| 13619 var queryMap = {}; | |
| 13620 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 13621 parseBool(n) { | |
| 13622 if (n == "true") return true; | |
| 13623 if (n == "false") return false; | |
| 13624 if (n == null) return null; | |
| 13625 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 13626 } | |
| 13627 if (query.length > 0) { | |
| 13628 for (var part in query.split("&")) { | |
| 13629 var keyvalue = part.split("="); | |
| 13630 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 13631 } | |
| 13632 } | |
| 13633 | |
| 13634 | |
| 13635 var h = { | |
| 13636 "content-type" : "application/json; charset=utf-8", | |
| 13637 }; | |
| 13638 var resp = convert.JSON.encode(buildChangeLog()); | |
| 13639 return new async.Future.value(stringResponse(200, h, resp)); | |
| 13640 }), true); | |
| 13641 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.ChangeLog r
esponse) { | |
| 13642 checkChangeLog(response); | |
| 13643 }))); | |
| 13644 }); | |
| 13645 | |
| 13646 unittest.test("method--list", () { | |
| 13647 | |
| 13648 var mock = new HttpServerMock(); | |
| 13649 api.ChangeLogsResourceApi res = new api.DfareportingApi(mock).changeLogs; | |
| 13650 var arg_profileId = "foo"; | |
| 13651 var arg_action = "foo"; | |
| 13652 var arg_ids = buildUnnamed1509(); | |
| 13653 var arg_maxChangeTime = "foo"; | |
| 13654 var arg_maxResults = 42; | |
| 13655 var arg_minChangeTime = "foo"; | |
| 13656 var arg_objectIds = buildUnnamed1510(); | |
| 13657 var arg_objectType = "foo"; | |
| 13658 var arg_pageToken = "foo"; | |
| 13659 var arg_searchString = "foo"; | |
| 13660 var arg_userProfileIds = buildUnnamed1511(); | |
| 13661 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 13662 var path = (req.url).path; | |
| 13663 var pathOffset = 0; | |
| 13664 var index; | |
| 13665 var subPart; | |
| 13666 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 13667 pathOffset += 1; | |
| 13668 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 13669 pathOffset += 18; | |
| 13670 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 13671 pathOffset += 13; | |
| 13672 index = path.indexOf("/changeLogs", pathOffset); | |
| 13673 unittest.expect(index >= 0, unittest.isTrue); | |
| 13674 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 13675 pathOffset = index; | |
| 13676 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 13677 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("/changeLogs")); | |
| 13678 pathOffset += 11; | |
| 13679 | |
| 13680 var query = (req.url).query; | |
| 13681 var queryOffset = 0; | |
| 13682 var queryMap = {}; | |
| 13683 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 13684 parseBool(n) { | |
| 13685 if (n == "true") return true; | |
| 13686 if (n == "false") return false; | |
| 13687 if (n == null) return null; | |
| 13688 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 13689 } | |
| 13690 if (query.length > 0) { | |
| 13691 for (var part in query.split("&")) { | |
| 13692 var keyvalue = part.split("="); | |
| 13693 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 13694 } | |
| 13695 } | |
| 13696 unittest.expect(queryMap["action"].first, unittest.equals(arg_action)); | |
| 13697 unittest.expect(queryMap["ids"], unittest.equals(arg_ids)); | |
| 13698 unittest.expect(queryMap["maxChangeTime"].first, unittest.equals(arg_max
ChangeTime)); | |
| 13699 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | |
| 13700 unittest.expect(queryMap["minChangeTime"].first, unittest.equals(arg_min
ChangeTime)); | |
| 13701 unittest.expect(queryMap["objectIds"], unittest.equals(arg_objectIds)); | |
| 13702 unittest.expect(queryMap["objectType"].first, unittest.equals(arg_object
Type)); | |
| 13703 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 13704 unittest.expect(queryMap["searchString"].first, unittest.equals(arg_sear
chString)); | |
| 13705 unittest.expect(queryMap["userProfileIds"], unittest.equals(arg_userProf
ileIds)); | |
| 13706 | |
| 13707 | |
| 13708 var h = { | |
| 13709 "content-type" : "application/json; charset=utf-8", | |
| 13710 }; | |
| 13711 var resp = convert.JSON.encode(buildChangeLogsListResponse()); | |
| 13712 return new async.Future.value(stringResponse(200, h, resp)); | |
| 13713 }), true); | |
| 13714 res.list(arg_profileId, action: arg_action, ids: arg_ids, maxChangeTime: a
rg_maxChangeTime, maxResults: arg_maxResults, minChangeTime: arg_minChangeTime,
objectIds: arg_objectIds, objectType: arg_objectType, pageToken: arg_pageToken,
searchString: arg_searchString, userProfileIds: arg_userProfileIds).then(unittes
t.expectAsync(((api.ChangeLogsListResponse response) { | |
| 13715 checkChangeLogsListResponse(response); | |
| 13716 }))); | |
| 13717 }); | |
| 13718 | |
| 13719 }); | |
| 13720 | |
| 13721 | |
| 13722 unittest.group("resource-CitiesResourceApi", () { | |
| 13723 unittest.test("method--list", () { | |
| 13724 | |
| 13725 var mock = new HttpServerMock(); | |
| 13726 api.CitiesResourceApi res = new api.DfareportingApi(mock).cities; | |
| 13727 var arg_profileId = "foo"; | |
| 13728 var arg_countryDartIds = buildUnnamed1512(); | |
| 13729 var arg_dartIds = buildUnnamed1513(); | |
| 13730 var arg_namePrefix = "foo"; | |
| 13731 var arg_regionDartIds = buildUnnamed1514(); | |
| 13732 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 13733 var path = (req.url).path; | |
| 13734 var pathOffset = 0; | |
| 13735 var index; | |
| 13736 var subPart; | |
| 13737 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 13738 pathOffset += 1; | |
| 13739 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 13740 pathOffset += 18; | |
| 13741 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 13742 pathOffset += 13; | |
| 13743 index = path.indexOf("/cities", pathOffset); | |
| 13744 unittest.expect(index >= 0, unittest.isTrue); | |
| 13745 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 13746 pathOffset = index; | |
| 13747 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 13748 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ
als("/cities")); | |
| 13749 pathOffset += 7; | |
| 13750 | |
| 13751 var query = (req.url).query; | |
| 13752 var queryOffset = 0; | |
| 13753 var queryMap = {}; | |
| 13754 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 13755 parseBool(n) { | |
| 13756 if (n == "true") return true; | |
| 13757 if (n == "false") return false; | |
| 13758 if (n == null) return null; | |
| 13759 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 13760 } | |
| 13761 if (query.length > 0) { | |
| 13762 for (var part in query.split("&")) { | |
| 13763 var keyvalue = part.split("="); | |
| 13764 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 13765 } | |
| 13766 } | |
| 13767 unittest.expect(queryMap["countryDartIds"], unittest.equals(arg_countryD
artIds)); | |
| 13768 unittest.expect(queryMap["dartIds"], unittest.equals(arg_dartIds)); | |
| 13769 unittest.expect(queryMap["namePrefix"].first, unittest.equals(arg_namePr
efix)); | |
| 13770 unittest.expect(queryMap["regionDartIds"], unittest.equals(arg_regionDar
tIds)); | |
| 13771 | |
| 13772 | |
| 13773 var h = { | |
| 13774 "content-type" : "application/json; charset=utf-8", | |
| 13775 }; | |
| 13776 var resp = convert.JSON.encode(buildCitiesListResponse()); | |
| 13777 return new async.Future.value(stringResponse(200, h, resp)); | |
| 13778 }), true); | |
| 13779 res.list(arg_profileId, countryDartIds: arg_countryDartIds, dartIds: arg_d
artIds, namePrefix: arg_namePrefix, regionDartIds: arg_regionDartIds).then(unitt
est.expectAsync(((api.CitiesListResponse response) { | |
| 13780 checkCitiesListResponse(response); | |
| 13781 }))); | |
| 13782 }); | |
| 13783 | |
| 13784 }); | |
| 13785 | |
| 13786 | |
| 13787 unittest.group("resource-ConnectionTypesResourceApi", () { | |
| 13788 unittest.test("method--get", () { | |
| 13789 | |
| 13790 var mock = new HttpServerMock(); | |
| 13791 api.ConnectionTypesResourceApi res = new api.DfareportingApi(mock).connect
ionTypes; | |
| 13792 var arg_profileId = "foo"; | |
| 13793 var arg_id = "foo"; | |
| 13794 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 13795 var path = (req.url).path; | |
| 13796 var pathOffset = 0; | |
| 13797 var index; | |
| 13798 var subPart; | |
| 13799 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 13800 pathOffset += 1; | |
| 13801 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 13802 pathOffset += 18; | |
| 13803 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 13804 pathOffset += 13; | |
| 13805 index = path.indexOf("/connectionTypes/", pathOffset); | |
| 13806 unittest.expect(index >= 0, unittest.isTrue); | |
| 13807 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 13808 pathOffset = index; | |
| 13809 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 13810 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("/connectionTypes/")); | |
| 13811 pathOffset += 17; | |
| 13812 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 13813 pathOffset = path.length; | |
| 13814 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 13815 | |
| 13816 var query = (req.url).query; | |
| 13817 var queryOffset = 0; | |
| 13818 var queryMap = {}; | |
| 13819 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 13820 parseBool(n) { | |
| 13821 if (n == "true") return true; | |
| 13822 if (n == "false") return false; | |
| 13823 if (n == null) return null; | |
| 13824 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 13825 } | |
| 13826 if (query.length > 0) { | |
| 13827 for (var part in query.split("&")) { | |
| 13828 var keyvalue = part.split("="); | |
| 13829 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 13830 } | |
| 13831 } | |
| 13832 | |
| 13833 | |
| 13834 var h = { | |
| 13835 "content-type" : "application/json; charset=utf-8", | |
| 13836 }; | |
| 13837 var resp = convert.JSON.encode(buildConnectionType()); | |
| 13838 return new async.Future.value(stringResponse(200, h, resp)); | |
| 13839 }), true); | |
| 13840 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.ConnectionT
ype response) { | |
| 13841 checkConnectionType(response); | |
| 13842 }))); | |
| 13843 }); | |
| 13844 | |
| 13845 unittest.test("method--list", () { | |
| 13846 | |
| 13847 var mock = new HttpServerMock(); | |
| 13848 api.ConnectionTypesResourceApi res = new api.DfareportingApi(mock).connect
ionTypes; | |
| 13849 var arg_profileId = "foo"; | |
| 13850 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 13851 var path = (req.url).path; | |
| 13852 var pathOffset = 0; | |
| 13853 var index; | |
| 13854 var subPart; | |
| 13855 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 13856 pathOffset += 1; | |
| 13857 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 13858 pathOffset += 18; | |
| 13859 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 13860 pathOffset += 13; | |
| 13861 index = path.indexOf("/connectionTypes", pathOffset); | |
| 13862 unittest.expect(index >= 0, unittest.isTrue); | |
| 13863 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 13864 pathOffset = index; | |
| 13865 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 13866 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq
uals("/connectionTypes")); | |
| 13867 pathOffset += 16; | |
| 13868 | |
| 13869 var query = (req.url).query; | |
| 13870 var queryOffset = 0; | |
| 13871 var queryMap = {}; | |
| 13872 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 13873 parseBool(n) { | |
| 13874 if (n == "true") return true; | |
| 13875 if (n == "false") return false; | |
| 13876 if (n == null) return null; | |
| 13877 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 13878 } | |
| 13879 if (query.length > 0) { | |
| 13880 for (var part in query.split("&")) { | |
| 13881 var keyvalue = part.split("="); | |
| 13882 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 13883 } | |
| 13884 } | |
| 13885 | |
| 13886 | |
| 13887 var h = { | |
| 13888 "content-type" : "application/json; charset=utf-8", | |
| 13889 }; | |
| 13890 var resp = convert.JSON.encode(buildConnectionTypesListResponse()); | |
| 13891 return new async.Future.value(stringResponse(200, h, resp)); | |
| 13892 }), true); | |
| 13893 res.list(arg_profileId).then(unittest.expectAsync(((api.ConnectionTypesLis
tResponse response) { | |
| 13894 checkConnectionTypesListResponse(response); | |
| 13895 }))); | |
| 13896 }); | |
| 13897 | |
| 13898 }); | |
| 13899 | |
| 13900 | |
| 13901 unittest.group("resource-ContentCategoriesResourceApi", () { | |
| 13902 unittest.test("method--delete", () { | |
| 13903 | |
| 13904 var mock = new HttpServerMock(); | |
| 13905 api.ContentCategoriesResourceApi res = new api.DfareportingApi(mock).conte
ntCategories; | |
| 13906 var arg_profileId = "foo"; | |
| 13907 var arg_id = "foo"; | |
| 13908 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 13909 var path = (req.url).path; | |
| 13910 var pathOffset = 0; | |
| 13911 var index; | |
| 13912 var subPart; | |
| 13913 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 13914 pathOffset += 1; | |
| 13915 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 13916 pathOffset += 18; | |
| 13917 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 13918 pathOffset += 13; | |
| 13919 index = path.indexOf("/contentCategories/", pathOffset); | |
| 13920 unittest.expect(index >= 0, unittest.isTrue); | |
| 13921 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 13922 pathOffset = index; | |
| 13923 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 13924 unittest.expect(path.substring(pathOffset, pathOffset + 19), unittest.eq
uals("/contentCategories/")); | |
| 13925 pathOffset += 19; | |
| 13926 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 13927 pathOffset = path.length; | |
| 13928 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 13929 | |
| 13930 var query = (req.url).query; | |
| 13931 var queryOffset = 0; | |
| 13932 var queryMap = {}; | |
| 13933 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 13934 parseBool(n) { | |
| 13935 if (n == "true") return true; | |
| 13936 if (n == "false") return false; | |
| 13937 if (n == null) return null; | |
| 13938 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 13939 } | |
| 13940 if (query.length > 0) { | |
| 13941 for (var part in query.split("&")) { | |
| 13942 var keyvalue = part.split("="); | |
| 13943 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 13944 } | |
| 13945 } | |
| 13946 | |
| 13947 | |
| 13948 var h = { | |
| 13949 "content-type" : "application/json; charset=utf-8", | |
| 13950 }; | |
| 13951 var resp = ""; | |
| 13952 return new async.Future.value(stringResponse(200, h, resp)); | |
| 13953 }), true); | |
| 13954 res.delete(arg_profileId, arg_id).then(unittest.expectAsync((_) {})); | |
| 13955 }); | |
| 13956 | |
| 13957 unittest.test("method--get", () { | |
| 13958 | |
| 13959 var mock = new HttpServerMock(); | |
| 13960 api.ContentCategoriesResourceApi res = new api.DfareportingApi(mock).conte
ntCategories; | |
| 13961 var arg_profileId = "foo"; | |
| 13962 var arg_id = "foo"; | |
| 13963 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 13964 var path = (req.url).path; | |
| 13965 var pathOffset = 0; | |
| 13966 var index; | |
| 13967 var subPart; | |
| 13968 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 13969 pathOffset += 1; | |
| 13970 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 13971 pathOffset += 18; | |
| 13972 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 13973 pathOffset += 13; | |
| 13974 index = path.indexOf("/contentCategories/", pathOffset); | |
| 13975 unittest.expect(index >= 0, unittest.isTrue); | |
| 13976 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 13977 pathOffset = index; | |
| 13978 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 13979 unittest.expect(path.substring(pathOffset, pathOffset + 19), unittest.eq
uals("/contentCategories/")); | |
| 13980 pathOffset += 19; | |
| 13981 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 13982 pathOffset = path.length; | |
| 13983 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 13984 | |
| 13985 var query = (req.url).query; | |
| 13986 var queryOffset = 0; | |
| 13987 var queryMap = {}; | |
| 13988 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 13989 parseBool(n) { | |
| 13990 if (n == "true") return true; | |
| 13991 if (n == "false") return false; | |
| 13992 if (n == null) return null; | |
| 13993 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 13994 } | |
| 13995 if (query.length > 0) { | |
| 13996 for (var part in query.split("&")) { | |
| 13997 var keyvalue = part.split("="); | |
| 13998 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 13999 } | |
| 14000 } | |
| 14001 | |
| 14002 | |
| 14003 var h = { | |
| 14004 "content-type" : "application/json; charset=utf-8", | |
| 14005 }; | |
| 14006 var resp = convert.JSON.encode(buildContentCategory()); | |
| 14007 return new async.Future.value(stringResponse(200, h, resp)); | |
| 14008 }), true); | |
| 14009 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.ContentCate
gory response) { | |
| 14010 checkContentCategory(response); | |
| 14011 }))); | |
| 14012 }); | |
| 14013 | |
| 14014 unittest.test("method--insert", () { | |
| 14015 | |
| 14016 var mock = new HttpServerMock(); | |
| 14017 api.ContentCategoriesResourceApi res = new api.DfareportingApi(mock).conte
ntCategories; | |
| 14018 var arg_request = buildContentCategory(); | |
| 14019 var arg_profileId = "foo"; | |
| 14020 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 14021 var obj = new api.ContentCategory.fromJson(json); | |
| 14022 checkContentCategory(obj); | |
| 14023 | |
| 14024 var path = (req.url).path; | |
| 14025 var pathOffset = 0; | |
| 14026 var index; | |
| 14027 var subPart; | |
| 14028 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 14029 pathOffset += 1; | |
| 14030 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 14031 pathOffset += 18; | |
| 14032 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 14033 pathOffset += 13; | |
| 14034 index = path.indexOf("/contentCategories", pathOffset); | |
| 14035 unittest.expect(index >= 0, unittest.isTrue); | |
| 14036 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 14037 pathOffset = index; | |
| 14038 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 14039 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("/contentCategories")); | |
| 14040 pathOffset += 18; | |
| 14041 | |
| 14042 var query = (req.url).query; | |
| 14043 var queryOffset = 0; | |
| 14044 var queryMap = {}; | |
| 14045 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 14046 parseBool(n) { | |
| 14047 if (n == "true") return true; | |
| 14048 if (n == "false") return false; | |
| 14049 if (n == null) return null; | |
| 14050 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 14051 } | |
| 14052 if (query.length > 0) { | |
| 14053 for (var part in query.split("&")) { | |
| 14054 var keyvalue = part.split("="); | |
| 14055 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 14056 } | |
| 14057 } | |
| 14058 | |
| 14059 | |
| 14060 var h = { | |
| 14061 "content-type" : "application/json; charset=utf-8", | |
| 14062 }; | |
| 14063 var resp = convert.JSON.encode(buildContentCategory()); | |
| 14064 return new async.Future.value(stringResponse(200, h, resp)); | |
| 14065 }), true); | |
| 14066 res.insert(arg_request, arg_profileId).then(unittest.expectAsync(((api.Con
tentCategory response) { | |
| 14067 checkContentCategory(response); | |
| 14068 }))); | |
| 14069 }); | |
| 14070 | |
| 14071 unittest.test("method--list", () { | |
| 14072 | |
| 14073 var mock = new HttpServerMock(); | |
| 14074 api.ContentCategoriesResourceApi res = new api.DfareportingApi(mock).conte
ntCategories; | |
| 14075 var arg_profileId = "foo"; | |
| 14076 var arg_ids = buildUnnamed1515(); | |
| 14077 var arg_maxResults = 42; | |
| 14078 var arg_pageToken = "foo"; | |
| 14079 var arg_searchString = "foo"; | |
| 14080 var arg_sortField = "foo"; | |
| 14081 var arg_sortOrder = "foo"; | |
| 14082 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 14083 var path = (req.url).path; | |
| 14084 var pathOffset = 0; | |
| 14085 var index; | |
| 14086 var subPart; | |
| 14087 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 14088 pathOffset += 1; | |
| 14089 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 14090 pathOffset += 18; | |
| 14091 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 14092 pathOffset += 13; | |
| 14093 index = path.indexOf("/contentCategories", pathOffset); | |
| 14094 unittest.expect(index >= 0, unittest.isTrue); | |
| 14095 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 14096 pathOffset = index; | |
| 14097 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 14098 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("/contentCategories")); | |
| 14099 pathOffset += 18; | |
| 14100 | |
| 14101 var query = (req.url).query; | |
| 14102 var queryOffset = 0; | |
| 14103 var queryMap = {}; | |
| 14104 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 14105 parseBool(n) { | |
| 14106 if (n == "true") return true; | |
| 14107 if (n == "false") return false; | |
| 14108 if (n == null) return null; | |
| 14109 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 14110 } | |
| 14111 if (query.length > 0) { | |
| 14112 for (var part in query.split("&")) { | |
| 14113 var keyvalue = part.split("="); | |
| 14114 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 14115 } | |
| 14116 } | |
| 14117 unittest.expect(queryMap["ids"], unittest.equals(arg_ids)); | |
| 14118 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | |
| 14119 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 14120 unittest.expect(queryMap["searchString"].first, unittest.equals(arg_sear
chString)); | |
| 14121 unittest.expect(queryMap["sortField"].first, unittest.equals(arg_sortFie
ld)); | |
| 14122 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | |
| 14123 | |
| 14124 | |
| 14125 var h = { | |
| 14126 "content-type" : "application/json; charset=utf-8", | |
| 14127 }; | |
| 14128 var resp = convert.JSON.encode(buildContentCategoriesListResponse()); | |
| 14129 return new async.Future.value(stringResponse(200, h, resp)); | |
| 14130 }), true); | |
| 14131 res.list(arg_profileId, ids: arg_ids, maxResults: arg_maxResults, pageToke
n: arg_pageToken, searchString: arg_searchString, sortField: arg_sortField, sort
Order: arg_sortOrder).then(unittest.expectAsync(((api.ContentCategoriesListRespo
nse response) { | |
| 14132 checkContentCategoriesListResponse(response); | |
| 14133 }))); | |
| 14134 }); | |
| 14135 | |
| 14136 unittest.test("method--patch", () { | |
| 14137 | |
| 14138 var mock = new HttpServerMock(); | |
| 14139 api.ContentCategoriesResourceApi res = new api.DfareportingApi(mock).conte
ntCategories; | |
| 14140 var arg_request = buildContentCategory(); | |
| 14141 var arg_profileId = "foo"; | |
| 14142 var arg_id = "foo"; | |
| 14143 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 14144 var obj = new api.ContentCategory.fromJson(json); | |
| 14145 checkContentCategory(obj); | |
| 14146 | |
| 14147 var path = (req.url).path; | |
| 14148 var pathOffset = 0; | |
| 14149 var index; | |
| 14150 var subPart; | |
| 14151 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 14152 pathOffset += 1; | |
| 14153 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 14154 pathOffset += 18; | |
| 14155 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 14156 pathOffset += 13; | |
| 14157 index = path.indexOf("/contentCategories", pathOffset); | |
| 14158 unittest.expect(index >= 0, unittest.isTrue); | |
| 14159 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 14160 pathOffset = index; | |
| 14161 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 14162 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("/contentCategories")); | |
| 14163 pathOffset += 18; | |
| 14164 | |
| 14165 var query = (req.url).query; | |
| 14166 var queryOffset = 0; | |
| 14167 var queryMap = {}; | |
| 14168 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 14169 parseBool(n) { | |
| 14170 if (n == "true") return true; | |
| 14171 if (n == "false") return false; | |
| 14172 if (n == null) return null; | |
| 14173 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 14174 } | |
| 14175 if (query.length > 0) { | |
| 14176 for (var part in query.split("&")) { | |
| 14177 var keyvalue = part.split("="); | |
| 14178 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 14179 } | |
| 14180 } | |
| 14181 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); | |
| 14182 | |
| 14183 | |
| 14184 var h = { | |
| 14185 "content-type" : "application/json; charset=utf-8", | |
| 14186 }; | |
| 14187 var resp = convert.JSON.encode(buildContentCategory()); | |
| 14188 return new async.Future.value(stringResponse(200, h, resp)); | |
| 14189 }), true); | |
| 14190 res.patch(arg_request, arg_profileId, arg_id).then(unittest.expectAsync(((
api.ContentCategory response) { | |
| 14191 checkContentCategory(response); | |
| 14192 }))); | |
| 14193 }); | |
| 14194 | |
| 14195 unittest.test("method--update", () { | |
| 14196 | |
| 14197 var mock = new HttpServerMock(); | |
| 14198 api.ContentCategoriesResourceApi res = new api.DfareportingApi(mock).conte
ntCategories; | |
| 14199 var arg_request = buildContentCategory(); | |
| 14200 var arg_profileId = "foo"; | |
| 14201 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 14202 var obj = new api.ContentCategory.fromJson(json); | |
| 14203 checkContentCategory(obj); | |
| 14204 | |
| 14205 var path = (req.url).path; | |
| 14206 var pathOffset = 0; | |
| 14207 var index; | |
| 14208 var subPart; | |
| 14209 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 14210 pathOffset += 1; | |
| 14211 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 14212 pathOffset += 18; | |
| 14213 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 14214 pathOffset += 13; | |
| 14215 index = path.indexOf("/contentCategories", pathOffset); | |
| 14216 unittest.expect(index >= 0, unittest.isTrue); | |
| 14217 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 14218 pathOffset = index; | |
| 14219 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 14220 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("/contentCategories")); | |
| 14221 pathOffset += 18; | |
| 14222 | |
| 14223 var query = (req.url).query; | |
| 14224 var queryOffset = 0; | |
| 14225 var queryMap = {}; | |
| 14226 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 14227 parseBool(n) { | |
| 14228 if (n == "true") return true; | |
| 14229 if (n == "false") return false; | |
| 14230 if (n == null) return null; | |
| 14231 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 14232 } | |
| 14233 if (query.length > 0) { | |
| 14234 for (var part in query.split("&")) { | |
| 14235 var keyvalue = part.split("="); | |
| 14236 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 14237 } | |
| 14238 } | |
| 14239 | |
| 14240 | |
| 14241 var h = { | |
| 14242 "content-type" : "application/json; charset=utf-8", | |
| 14243 }; | |
| 14244 var resp = convert.JSON.encode(buildContentCategory()); | |
| 14245 return new async.Future.value(stringResponse(200, h, resp)); | |
| 14246 }), true); | |
| 14247 res.update(arg_request, arg_profileId).then(unittest.expectAsync(((api.Con
tentCategory response) { | |
| 14248 checkContentCategory(response); | |
| 14249 }))); | |
| 14250 }); | |
| 14251 | |
| 14252 }); | |
| 14253 | |
| 14254 | |
| 14255 unittest.group("resource-ConversionsResourceApi", () { | |
| 14256 unittest.test("method--batchinsert", () { | |
| 14257 | |
| 14258 var mock = new HttpServerMock(); | |
| 14259 api.ConversionsResourceApi res = new api.DfareportingApi(mock).conversions
; | |
| 14260 var arg_request = buildConversionsBatchInsertRequest(); | |
| 14261 var arg_profileId = "foo"; | |
| 14262 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 14263 var obj = new api.ConversionsBatchInsertRequest.fromJson(json); | |
| 14264 checkConversionsBatchInsertRequest(obj); | |
| 14265 | |
| 14266 var path = (req.url).path; | |
| 14267 var pathOffset = 0; | |
| 14268 var index; | |
| 14269 var subPart; | |
| 14270 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 14271 pathOffset += 1; | |
| 14272 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 14273 pathOffset += 18; | |
| 14274 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 14275 pathOffset += 13; | |
| 14276 index = path.indexOf("/conversions/batchinsert", pathOffset); | |
| 14277 unittest.expect(index >= 0, unittest.isTrue); | |
| 14278 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 14279 pathOffset = index; | |
| 14280 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 14281 unittest.expect(path.substring(pathOffset, pathOffset + 24), unittest.eq
uals("/conversions/batchinsert")); | |
| 14282 pathOffset += 24; | |
| 14283 | |
| 14284 var query = (req.url).query; | |
| 14285 var queryOffset = 0; | |
| 14286 var queryMap = {}; | |
| 14287 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 14288 parseBool(n) { | |
| 14289 if (n == "true") return true; | |
| 14290 if (n == "false") return false; | |
| 14291 if (n == null) return null; | |
| 14292 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 14293 } | |
| 14294 if (query.length > 0) { | |
| 14295 for (var part in query.split("&")) { | |
| 14296 var keyvalue = part.split("="); | |
| 14297 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 14298 } | |
| 14299 } | |
| 14300 | |
| 14301 | |
| 14302 var h = { | |
| 14303 "content-type" : "application/json; charset=utf-8", | |
| 14304 }; | |
| 14305 var resp = convert.JSON.encode(buildConversionsBatchInsertResponse()); | |
| 14306 return new async.Future.value(stringResponse(200, h, resp)); | |
| 14307 }), true); | |
| 14308 res.batchinsert(arg_request, arg_profileId).then(unittest.expectAsync(((ap
i.ConversionsBatchInsertResponse response) { | |
| 14309 checkConversionsBatchInsertResponse(response); | |
| 14310 }))); | |
| 14311 }); | |
| 14312 | |
| 14313 }); | |
| 14314 | |
| 14315 | |
| 14316 unittest.group("resource-CountriesResourceApi", () { | |
| 14317 unittest.test("method--get", () { | |
| 14318 | |
| 14319 var mock = new HttpServerMock(); | |
| 14320 api.CountriesResourceApi res = new api.DfareportingApi(mock).countries; | |
| 14321 var arg_profileId = "foo"; | |
| 14322 var arg_dartId = "foo"; | |
| 14323 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 14324 var path = (req.url).path; | |
| 14325 var pathOffset = 0; | |
| 14326 var index; | |
| 14327 var subPart; | |
| 14328 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 14329 pathOffset += 1; | |
| 14330 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 14331 pathOffset += 18; | |
| 14332 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 14333 pathOffset += 13; | |
| 14334 index = path.indexOf("/countries/", pathOffset); | |
| 14335 unittest.expect(index >= 0, unittest.isTrue); | |
| 14336 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 14337 pathOffset = index; | |
| 14338 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 14339 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("/countries/")); | |
| 14340 pathOffset += 11; | |
| 14341 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 14342 pathOffset = path.length; | |
| 14343 unittest.expect(subPart, unittest.equals("$arg_dartId")); | |
| 14344 | |
| 14345 var query = (req.url).query; | |
| 14346 var queryOffset = 0; | |
| 14347 var queryMap = {}; | |
| 14348 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 14349 parseBool(n) { | |
| 14350 if (n == "true") return true; | |
| 14351 if (n == "false") return false; | |
| 14352 if (n == null) return null; | |
| 14353 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 14354 } | |
| 14355 if (query.length > 0) { | |
| 14356 for (var part in query.split("&")) { | |
| 14357 var keyvalue = part.split("="); | |
| 14358 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 14359 } | |
| 14360 } | |
| 14361 | |
| 14362 | |
| 14363 var h = { | |
| 14364 "content-type" : "application/json; charset=utf-8", | |
| 14365 }; | |
| 14366 var resp = convert.JSON.encode(buildCountry()); | |
| 14367 return new async.Future.value(stringResponse(200, h, resp)); | |
| 14368 }), true); | |
| 14369 res.get(arg_profileId, arg_dartId).then(unittest.expectAsync(((api.Country
response) { | |
| 14370 checkCountry(response); | |
| 14371 }))); | |
| 14372 }); | |
| 14373 | |
| 14374 unittest.test("method--list", () { | |
| 14375 | |
| 14376 var mock = new HttpServerMock(); | |
| 14377 api.CountriesResourceApi res = new api.DfareportingApi(mock).countries; | |
| 14378 var arg_profileId = "foo"; | |
| 14379 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 14380 var path = (req.url).path; | |
| 14381 var pathOffset = 0; | |
| 14382 var index; | |
| 14383 var subPart; | |
| 14384 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 14385 pathOffset += 1; | |
| 14386 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 14387 pathOffset += 18; | |
| 14388 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 14389 pathOffset += 13; | |
| 14390 index = path.indexOf("/countries", pathOffset); | |
| 14391 unittest.expect(index >= 0, unittest.isTrue); | |
| 14392 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 14393 pathOffset = index; | |
| 14394 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 14395 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/countries")); | |
| 14396 pathOffset += 10; | |
| 14397 | |
| 14398 var query = (req.url).query; | |
| 14399 var queryOffset = 0; | |
| 14400 var queryMap = {}; | |
| 14401 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 14402 parseBool(n) { | |
| 14403 if (n == "true") return true; | |
| 14404 if (n == "false") return false; | |
| 14405 if (n == null) return null; | |
| 14406 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 14407 } | |
| 14408 if (query.length > 0) { | |
| 14409 for (var part in query.split("&")) { | |
| 14410 var keyvalue = part.split("="); | |
| 14411 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 14412 } | |
| 14413 } | |
| 14414 | |
| 14415 | |
| 14416 var h = { | |
| 14417 "content-type" : "application/json; charset=utf-8", | |
| 14418 }; | |
| 14419 var resp = convert.JSON.encode(buildCountriesListResponse()); | |
| 14420 return new async.Future.value(stringResponse(200, h, resp)); | |
| 14421 }), true); | |
| 14422 res.list(arg_profileId).then(unittest.expectAsync(((api.CountriesListRespo
nse response) { | |
| 14423 checkCountriesListResponse(response); | |
| 14424 }))); | |
| 14425 }); | |
| 14426 | |
| 14427 }); | |
| 14428 | |
| 14429 | |
| 14430 unittest.group("resource-CreativeAssetsResourceApi", () { | |
| 14431 unittest.test("method--insert", () { | |
| 14432 // TODO: Implement tests for media upload; | |
| 14433 // TODO: Implement tests for media download; | |
| 14434 | |
| 14435 var mock = new HttpServerMock(); | |
| 14436 api.CreativeAssetsResourceApi res = new api.DfareportingApi(mock).creative
Assets; | |
| 14437 var arg_request = buildCreativeAssetMetadata(); | |
| 14438 var arg_profileId = "foo"; | |
| 14439 var arg_advertiserId = "foo"; | |
| 14440 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 14441 var obj = new api.CreativeAssetMetadata.fromJson(json); | |
| 14442 checkCreativeAssetMetadata(obj); | |
| 14443 | |
| 14444 var path = (req.url).path; | |
| 14445 var pathOffset = 0; | |
| 14446 var index; | |
| 14447 var subPart; | |
| 14448 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 14449 pathOffset += 1; | |
| 14450 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 14451 pathOffset += 18; | |
| 14452 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 14453 pathOffset += 13; | |
| 14454 index = path.indexOf("/creativeAssets/", pathOffset); | |
| 14455 unittest.expect(index >= 0, unittest.isTrue); | |
| 14456 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 14457 pathOffset = index; | |
| 14458 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 14459 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq
uals("/creativeAssets/")); | |
| 14460 pathOffset += 16; | |
| 14461 index = path.indexOf("/creativeAssets", pathOffset); | |
| 14462 unittest.expect(index >= 0, unittest.isTrue); | |
| 14463 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 14464 pathOffset = index; | |
| 14465 unittest.expect(subPart, unittest.equals("$arg_advertiserId")); | |
| 14466 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/creativeAssets")); | |
| 14467 pathOffset += 15; | |
| 14468 | |
| 14469 var query = (req.url).query; | |
| 14470 var queryOffset = 0; | |
| 14471 var queryMap = {}; | |
| 14472 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 14473 parseBool(n) { | |
| 14474 if (n == "true") return true; | |
| 14475 if (n == "false") return false; | |
| 14476 if (n == null) return null; | |
| 14477 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 14478 } | |
| 14479 if (query.length > 0) { | |
| 14480 for (var part in query.split("&")) { | |
| 14481 var keyvalue = part.split("="); | |
| 14482 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 14483 } | |
| 14484 } | |
| 14485 | |
| 14486 | |
| 14487 var h = { | |
| 14488 "content-type" : "application/json; charset=utf-8", | |
| 14489 }; | |
| 14490 var resp = convert.JSON.encode(buildCreativeAssetMetadata()); | |
| 14491 return new async.Future.value(stringResponse(200, h, resp)); | |
| 14492 }), true); | |
| 14493 res.insert(arg_request, arg_profileId, arg_advertiserId).then(unittest.exp
ectAsync(((api.CreativeAssetMetadata response) { | |
| 14494 checkCreativeAssetMetadata(response); | |
| 14495 }))); | |
| 14496 }); | |
| 14497 | |
| 14498 }); | |
| 14499 | |
| 14500 | |
| 14501 unittest.group("resource-CreativeFieldValuesResourceApi", () { | |
| 14502 unittest.test("method--delete", () { | |
| 14503 | |
| 14504 var mock = new HttpServerMock(); | |
| 14505 api.CreativeFieldValuesResourceApi res = new api.DfareportingApi(mock).cre
ativeFieldValues; | |
| 14506 var arg_profileId = "foo"; | |
| 14507 var arg_creativeFieldId = "foo"; | |
| 14508 var arg_id = "foo"; | |
| 14509 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 14510 var path = (req.url).path; | |
| 14511 var pathOffset = 0; | |
| 14512 var index; | |
| 14513 var subPart; | |
| 14514 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 14515 pathOffset += 1; | |
| 14516 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 14517 pathOffset += 18; | |
| 14518 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 14519 pathOffset += 13; | |
| 14520 index = path.indexOf("/creativeFields/", pathOffset); | |
| 14521 unittest.expect(index >= 0, unittest.isTrue); | |
| 14522 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 14523 pathOffset = index; | |
| 14524 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 14525 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq
uals("/creativeFields/")); | |
| 14526 pathOffset += 16; | |
| 14527 index = path.indexOf("/creativeFieldValues/", pathOffset); | |
| 14528 unittest.expect(index >= 0, unittest.isTrue); | |
| 14529 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 14530 pathOffset = index; | |
| 14531 unittest.expect(subPart, unittest.equals("$arg_creativeFieldId")); | |
| 14532 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("/creativeFieldValues/")); | |
| 14533 pathOffset += 21; | |
| 14534 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 14535 pathOffset = path.length; | |
| 14536 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 14537 | |
| 14538 var query = (req.url).query; | |
| 14539 var queryOffset = 0; | |
| 14540 var queryMap = {}; | |
| 14541 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 14542 parseBool(n) { | |
| 14543 if (n == "true") return true; | |
| 14544 if (n == "false") return false; | |
| 14545 if (n == null) return null; | |
| 14546 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 14547 } | |
| 14548 if (query.length > 0) { | |
| 14549 for (var part in query.split("&")) { | |
| 14550 var keyvalue = part.split("="); | |
| 14551 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 14552 } | |
| 14553 } | |
| 14554 | |
| 14555 | |
| 14556 var h = { | |
| 14557 "content-type" : "application/json; charset=utf-8", | |
| 14558 }; | |
| 14559 var resp = ""; | |
| 14560 return new async.Future.value(stringResponse(200, h, resp)); | |
| 14561 }), true); | |
| 14562 res.delete(arg_profileId, arg_creativeFieldId, arg_id).then(unittest.expec
tAsync((_) {})); | |
| 14563 }); | |
| 14564 | |
| 14565 unittest.test("method--get", () { | |
| 14566 | |
| 14567 var mock = new HttpServerMock(); | |
| 14568 api.CreativeFieldValuesResourceApi res = new api.DfareportingApi(mock).cre
ativeFieldValues; | |
| 14569 var arg_profileId = "foo"; | |
| 14570 var arg_creativeFieldId = "foo"; | |
| 14571 var arg_id = "foo"; | |
| 14572 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 14573 var path = (req.url).path; | |
| 14574 var pathOffset = 0; | |
| 14575 var index; | |
| 14576 var subPart; | |
| 14577 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 14578 pathOffset += 1; | |
| 14579 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 14580 pathOffset += 18; | |
| 14581 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 14582 pathOffset += 13; | |
| 14583 index = path.indexOf("/creativeFields/", pathOffset); | |
| 14584 unittest.expect(index >= 0, unittest.isTrue); | |
| 14585 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 14586 pathOffset = index; | |
| 14587 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 14588 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq
uals("/creativeFields/")); | |
| 14589 pathOffset += 16; | |
| 14590 index = path.indexOf("/creativeFieldValues/", pathOffset); | |
| 14591 unittest.expect(index >= 0, unittest.isTrue); | |
| 14592 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 14593 pathOffset = index; | |
| 14594 unittest.expect(subPart, unittest.equals("$arg_creativeFieldId")); | |
| 14595 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("/creativeFieldValues/")); | |
| 14596 pathOffset += 21; | |
| 14597 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 14598 pathOffset = path.length; | |
| 14599 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 14600 | |
| 14601 var query = (req.url).query; | |
| 14602 var queryOffset = 0; | |
| 14603 var queryMap = {}; | |
| 14604 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 14605 parseBool(n) { | |
| 14606 if (n == "true") return true; | |
| 14607 if (n == "false") return false; | |
| 14608 if (n == null) return null; | |
| 14609 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 14610 } | |
| 14611 if (query.length > 0) { | |
| 14612 for (var part in query.split("&")) { | |
| 14613 var keyvalue = part.split("="); | |
| 14614 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 14615 } | |
| 14616 } | |
| 14617 | |
| 14618 | |
| 14619 var h = { | |
| 14620 "content-type" : "application/json; charset=utf-8", | |
| 14621 }; | |
| 14622 var resp = convert.JSON.encode(buildCreativeFieldValue()); | |
| 14623 return new async.Future.value(stringResponse(200, h, resp)); | |
| 14624 }), true); | |
| 14625 res.get(arg_profileId, arg_creativeFieldId, arg_id).then(unittest.expectAs
ync(((api.CreativeFieldValue response) { | |
| 14626 checkCreativeFieldValue(response); | |
| 14627 }))); | |
| 14628 }); | |
| 14629 | |
| 14630 unittest.test("method--insert", () { | |
| 14631 | |
| 14632 var mock = new HttpServerMock(); | |
| 14633 api.CreativeFieldValuesResourceApi res = new api.DfareportingApi(mock).cre
ativeFieldValues; | |
| 14634 var arg_request = buildCreativeFieldValue(); | |
| 14635 var arg_profileId = "foo"; | |
| 14636 var arg_creativeFieldId = "foo"; | |
| 14637 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 14638 var obj = new api.CreativeFieldValue.fromJson(json); | |
| 14639 checkCreativeFieldValue(obj); | |
| 14640 | |
| 14641 var path = (req.url).path; | |
| 14642 var pathOffset = 0; | |
| 14643 var index; | |
| 14644 var subPart; | |
| 14645 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 14646 pathOffset += 1; | |
| 14647 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 14648 pathOffset += 18; | |
| 14649 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 14650 pathOffset += 13; | |
| 14651 index = path.indexOf("/creativeFields/", pathOffset); | |
| 14652 unittest.expect(index >= 0, unittest.isTrue); | |
| 14653 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 14654 pathOffset = index; | |
| 14655 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 14656 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq
uals("/creativeFields/")); | |
| 14657 pathOffset += 16; | |
| 14658 index = path.indexOf("/creativeFieldValues", pathOffset); | |
| 14659 unittest.expect(index >= 0, unittest.isTrue); | |
| 14660 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 14661 pathOffset = index; | |
| 14662 unittest.expect(subPart, unittest.equals("$arg_creativeFieldId")); | |
| 14663 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("/creativeFieldValues")); | |
| 14664 pathOffset += 20; | |
| 14665 | |
| 14666 var query = (req.url).query; | |
| 14667 var queryOffset = 0; | |
| 14668 var queryMap = {}; | |
| 14669 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 14670 parseBool(n) { | |
| 14671 if (n == "true") return true; | |
| 14672 if (n == "false") return false; | |
| 14673 if (n == null) return null; | |
| 14674 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 14675 } | |
| 14676 if (query.length > 0) { | |
| 14677 for (var part in query.split("&")) { | |
| 14678 var keyvalue = part.split("="); | |
| 14679 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 14680 } | |
| 14681 } | |
| 14682 | |
| 14683 | |
| 14684 var h = { | |
| 14685 "content-type" : "application/json; charset=utf-8", | |
| 14686 }; | |
| 14687 var resp = convert.JSON.encode(buildCreativeFieldValue()); | |
| 14688 return new async.Future.value(stringResponse(200, h, resp)); | |
| 14689 }), true); | |
| 14690 res.insert(arg_request, arg_profileId, arg_creativeFieldId).then(unittest.
expectAsync(((api.CreativeFieldValue response) { | |
| 14691 checkCreativeFieldValue(response); | |
| 14692 }))); | |
| 14693 }); | |
| 14694 | |
| 14695 unittest.test("method--list", () { | |
| 14696 | |
| 14697 var mock = new HttpServerMock(); | |
| 14698 api.CreativeFieldValuesResourceApi res = new api.DfareportingApi(mock).cre
ativeFieldValues; | |
| 14699 var arg_profileId = "foo"; | |
| 14700 var arg_creativeFieldId = "foo"; | |
| 14701 var arg_ids = buildUnnamed1516(); | |
| 14702 var arg_maxResults = 42; | |
| 14703 var arg_pageToken = "foo"; | |
| 14704 var arg_searchString = "foo"; | |
| 14705 var arg_sortField = "foo"; | |
| 14706 var arg_sortOrder = "foo"; | |
| 14707 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 14708 var path = (req.url).path; | |
| 14709 var pathOffset = 0; | |
| 14710 var index; | |
| 14711 var subPart; | |
| 14712 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 14713 pathOffset += 1; | |
| 14714 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 14715 pathOffset += 18; | |
| 14716 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 14717 pathOffset += 13; | |
| 14718 index = path.indexOf("/creativeFields/", pathOffset); | |
| 14719 unittest.expect(index >= 0, unittest.isTrue); | |
| 14720 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 14721 pathOffset = index; | |
| 14722 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 14723 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq
uals("/creativeFields/")); | |
| 14724 pathOffset += 16; | |
| 14725 index = path.indexOf("/creativeFieldValues", pathOffset); | |
| 14726 unittest.expect(index >= 0, unittest.isTrue); | |
| 14727 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 14728 pathOffset = index; | |
| 14729 unittest.expect(subPart, unittest.equals("$arg_creativeFieldId")); | |
| 14730 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("/creativeFieldValues")); | |
| 14731 pathOffset += 20; | |
| 14732 | |
| 14733 var query = (req.url).query; | |
| 14734 var queryOffset = 0; | |
| 14735 var queryMap = {}; | |
| 14736 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 14737 parseBool(n) { | |
| 14738 if (n == "true") return true; | |
| 14739 if (n == "false") return false; | |
| 14740 if (n == null) return null; | |
| 14741 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 14742 } | |
| 14743 if (query.length > 0) { | |
| 14744 for (var part in query.split("&")) { | |
| 14745 var keyvalue = part.split("="); | |
| 14746 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 14747 } | |
| 14748 } | |
| 14749 unittest.expect(queryMap["ids"], unittest.equals(arg_ids)); | |
| 14750 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | |
| 14751 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 14752 unittest.expect(queryMap["searchString"].first, unittest.equals(arg_sear
chString)); | |
| 14753 unittest.expect(queryMap["sortField"].first, unittest.equals(arg_sortFie
ld)); | |
| 14754 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | |
| 14755 | |
| 14756 | |
| 14757 var h = { | |
| 14758 "content-type" : "application/json; charset=utf-8", | |
| 14759 }; | |
| 14760 var resp = convert.JSON.encode(buildCreativeFieldValuesListResponse()); | |
| 14761 return new async.Future.value(stringResponse(200, h, resp)); | |
| 14762 }), true); | |
| 14763 res.list(arg_profileId, arg_creativeFieldId, ids: arg_ids, maxResults: arg
_maxResults, pageToken: arg_pageToken, searchString: arg_searchString, sortField
: arg_sortField, sortOrder: arg_sortOrder).then(unittest.expectAsync(((api.Creat
iveFieldValuesListResponse response) { | |
| 14764 checkCreativeFieldValuesListResponse(response); | |
| 14765 }))); | |
| 14766 }); | |
| 14767 | |
| 14768 unittest.test("method--patch", () { | |
| 14769 | |
| 14770 var mock = new HttpServerMock(); | |
| 14771 api.CreativeFieldValuesResourceApi res = new api.DfareportingApi(mock).cre
ativeFieldValues; | |
| 14772 var arg_request = buildCreativeFieldValue(); | |
| 14773 var arg_profileId = "foo"; | |
| 14774 var arg_creativeFieldId = "foo"; | |
| 14775 var arg_id = "foo"; | |
| 14776 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 14777 var obj = new api.CreativeFieldValue.fromJson(json); | |
| 14778 checkCreativeFieldValue(obj); | |
| 14779 | |
| 14780 var path = (req.url).path; | |
| 14781 var pathOffset = 0; | |
| 14782 var index; | |
| 14783 var subPart; | |
| 14784 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 14785 pathOffset += 1; | |
| 14786 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 14787 pathOffset += 18; | |
| 14788 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 14789 pathOffset += 13; | |
| 14790 index = path.indexOf("/creativeFields/", pathOffset); | |
| 14791 unittest.expect(index >= 0, unittest.isTrue); | |
| 14792 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 14793 pathOffset = index; | |
| 14794 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 14795 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq
uals("/creativeFields/")); | |
| 14796 pathOffset += 16; | |
| 14797 index = path.indexOf("/creativeFieldValues", pathOffset); | |
| 14798 unittest.expect(index >= 0, unittest.isTrue); | |
| 14799 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 14800 pathOffset = index; | |
| 14801 unittest.expect(subPart, unittest.equals("$arg_creativeFieldId")); | |
| 14802 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("/creativeFieldValues")); | |
| 14803 pathOffset += 20; | |
| 14804 | |
| 14805 var query = (req.url).query; | |
| 14806 var queryOffset = 0; | |
| 14807 var queryMap = {}; | |
| 14808 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 14809 parseBool(n) { | |
| 14810 if (n == "true") return true; | |
| 14811 if (n == "false") return false; | |
| 14812 if (n == null) return null; | |
| 14813 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 14814 } | |
| 14815 if (query.length > 0) { | |
| 14816 for (var part in query.split("&")) { | |
| 14817 var keyvalue = part.split("="); | |
| 14818 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 14819 } | |
| 14820 } | |
| 14821 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); | |
| 14822 | |
| 14823 | |
| 14824 var h = { | |
| 14825 "content-type" : "application/json; charset=utf-8", | |
| 14826 }; | |
| 14827 var resp = convert.JSON.encode(buildCreativeFieldValue()); | |
| 14828 return new async.Future.value(stringResponse(200, h, resp)); | |
| 14829 }), true); | |
| 14830 res.patch(arg_request, arg_profileId, arg_creativeFieldId, arg_id).then(un
ittest.expectAsync(((api.CreativeFieldValue response) { | |
| 14831 checkCreativeFieldValue(response); | |
| 14832 }))); | |
| 14833 }); | |
| 14834 | |
| 14835 unittest.test("method--update", () { | |
| 14836 | |
| 14837 var mock = new HttpServerMock(); | |
| 14838 api.CreativeFieldValuesResourceApi res = new api.DfareportingApi(mock).cre
ativeFieldValues; | |
| 14839 var arg_request = buildCreativeFieldValue(); | |
| 14840 var arg_profileId = "foo"; | |
| 14841 var arg_creativeFieldId = "foo"; | |
| 14842 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 14843 var obj = new api.CreativeFieldValue.fromJson(json); | |
| 14844 checkCreativeFieldValue(obj); | |
| 14845 | |
| 14846 var path = (req.url).path; | |
| 14847 var pathOffset = 0; | |
| 14848 var index; | |
| 14849 var subPart; | |
| 14850 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 14851 pathOffset += 1; | |
| 14852 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 14853 pathOffset += 18; | |
| 14854 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 14855 pathOffset += 13; | |
| 14856 index = path.indexOf("/creativeFields/", pathOffset); | |
| 14857 unittest.expect(index >= 0, unittest.isTrue); | |
| 14858 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 14859 pathOffset = index; | |
| 14860 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 14861 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq
uals("/creativeFields/")); | |
| 14862 pathOffset += 16; | |
| 14863 index = path.indexOf("/creativeFieldValues", pathOffset); | |
| 14864 unittest.expect(index >= 0, unittest.isTrue); | |
| 14865 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 14866 pathOffset = index; | |
| 14867 unittest.expect(subPart, unittest.equals("$arg_creativeFieldId")); | |
| 14868 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("/creativeFieldValues")); | |
| 14869 pathOffset += 20; | |
| 14870 | |
| 14871 var query = (req.url).query; | |
| 14872 var queryOffset = 0; | |
| 14873 var queryMap = {}; | |
| 14874 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 14875 parseBool(n) { | |
| 14876 if (n == "true") return true; | |
| 14877 if (n == "false") return false; | |
| 14878 if (n == null) return null; | |
| 14879 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 14880 } | |
| 14881 if (query.length > 0) { | |
| 14882 for (var part in query.split("&")) { | |
| 14883 var keyvalue = part.split("="); | |
| 14884 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 14885 } | |
| 14886 } | |
| 14887 | |
| 14888 | |
| 14889 var h = { | |
| 14890 "content-type" : "application/json; charset=utf-8", | |
| 14891 }; | |
| 14892 var resp = convert.JSON.encode(buildCreativeFieldValue()); | |
| 14893 return new async.Future.value(stringResponse(200, h, resp)); | |
| 14894 }), true); | |
| 14895 res.update(arg_request, arg_profileId, arg_creativeFieldId).then(unittest.
expectAsync(((api.CreativeFieldValue response) { | |
| 14896 checkCreativeFieldValue(response); | |
| 14897 }))); | |
| 14898 }); | |
| 14899 | |
| 14900 }); | |
| 14901 | |
| 14902 | |
| 14903 unittest.group("resource-CreativeFieldsResourceApi", () { | |
| 14904 unittest.test("method--delete", () { | |
| 14905 | |
| 14906 var mock = new HttpServerMock(); | |
| 14907 api.CreativeFieldsResourceApi res = new api.DfareportingApi(mock).creative
Fields; | |
| 14908 var arg_profileId = "foo"; | |
| 14909 var arg_id = "foo"; | |
| 14910 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 14911 var path = (req.url).path; | |
| 14912 var pathOffset = 0; | |
| 14913 var index; | |
| 14914 var subPart; | |
| 14915 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 14916 pathOffset += 1; | |
| 14917 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 14918 pathOffset += 18; | |
| 14919 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 14920 pathOffset += 13; | |
| 14921 index = path.indexOf("/creativeFields/", pathOffset); | |
| 14922 unittest.expect(index >= 0, unittest.isTrue); | |
| 14923 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 14924 pathOffset = index; | |
| 14925 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 14926 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq
uals("/creativeFields/")); | |
| 14927 pathOffset += 16; | |
| 14928 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 14929 pathOffset = path.length; | |
| 14930 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 14931 | |
| 14932 var query = (req.url).query; | |
| 14933 var queryOffset = 0; | |
| 14934 var queryMap = {}; | |
| 14935 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 14936 parseBool(n) { | |
| 14937 if (n == "true") return true; | |
| 14938 if (n == "false") return false; | |
| 14939 if (n == null) return null; | |
| 14940 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 14941 } | |
| 14942 if (query.length > 0) { | |
| 14943 for (var part in query.split("&")) { | |
| 14944 var keyvalue = part.split("="); | |
| 14945 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 14946 } | |
| 14947 } | |
| 14948 | |
| 14949 | |
| 14950 var h = { | |
| 14951 "content-type" : "application/json; charset=utf-8", | |
| 14952 }; | |
| 14953 var resp = ""; | |
| 14954 return new async.Future.value(stringResponse(200, h, resp)); | |
| 14955 }), true); | |
| 14956 res.delete(arg_profileId, arg_id).then(unittest.expectAsync((_) {})); | |
| 14957 }); | |
| 14958 | |
| 14959 unittest.test("method--get", () { | |
| 14960 | |
| 14961 var mock = new HttpServerMock(); | |
| 14962 api.CreativeFieldsResourceApi res = new api.DfareportingApi(mock).creative
Fields; | |
| 14963 var arg_profileId = "foo"; | |
| 14964 var arg_id = "foo"; | |
| 14965 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 14966 var path = (req.url).path; | |
| 14967 var pathOffset = 0; | |
| 14968 var index; | |
| 14969 var subPart; | |
| 14970 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 14971 pathOffset += 1; | |
| 14972 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 14973 pathOffset += 18; | |
| 14974 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 14975 pathOffset += 13; | |
| 14976 index = path.indexOf("/creativeFields/", pathOffset); | |
| 14977 unittest.expect(index >= 0, unittest.isTrue); | |
| 14978 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 14979 pathOffset = index; | |
| 14980 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 14981 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq
uals("/creativeFields/")); | |
| 14982 pathOffset += 16; | |
| 14983 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 14984 pathOffset = path.length; | |
| 14985 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 14986 | |
| 14987 var query = (req.url).query; | |
| 14988 var queryOffset = 0; | |
| 14989 var queryMap = {}; | |
| 14990 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 14991 parseBool(n) { | |
| 14992 if (n == "true") return true; | |
| 14993 if (n == "false") return false; | |
| 14994 if (n == null) return null; | |
| 14995 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 14996 } | |
| 14997 if (query.length > 0) { | |
| 14998 for (var part in query.split("&")) { | |
| 14999 var keyvalue = part.split("="); | |
| 15000 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 15001 } | |
| 15002 } | |
| 15003 | |
| 15004 | |
| 15005 var h = { | |
| 15006 "content-type" : "application/json; charset=utf-8", | |
| 15007 }; | |
| 15008 var resp = convert.JSON.encode(buildCreativeField()); | |
| 15009 return new async.Future.value(stringResponse(200, h, resp)); | |
| 15010 }), true); | |
| 15011 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.CreativeFie
ld response) { | |
| 15012 checkCreativeField(response); | |
| 15013 }))); | |
| 15014 }); | |
| 15015 | |
| 15016 unittest.test("method--insert", () { | |
| 15017 | |
| 15018 var mock = new HttpServerMock(); | |
| 15019 api.CreativeFieldsResourceApi res = new api.DfareportingApi(mock).creative
Fields; | |
| 15020 var arg_request = buildCreativeField(); | |
| 15021 var arg_profileId = "foo"; | |
| 15022 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 15023 var obj = new api.CreativeField.fromJson(json); | |
| 15024 checkCreativeField(obj); | |
| 15025 | |
| 15026 var path = (req.url).path; | |
| 15027 var pathOffset = 0; | |
| 15028 var index; | |
| 15029 var subPart; | |
| 15030 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 15031 pathOffset += 1; | |
| 15032 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 15033 pathOffset += 18; | |
| 15034 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 15035 pathOffset += 13; | |
| 15036 index = path.indexOf("/creativeFields", pathOffset); | |
| 15037 unittest.expect(index >= 0, unittest.isTrue); | |
| 15038 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 15039 pathOffset = index; | |
| 15040 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 15041 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/creativeFields")); | |
| 15042 pathOffset += 15; | |
| 15043 | |
| 15044 var query = (req.url).query; | |
| 15045 var queryOffset = 0; | |
| 15046 var queryMap = {}; | |
| 15047 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 15048 parseBool(n) { | |
| 15049 if (n == "true") return true; | |
| 15050 if (n == "false") return false; | |
| 15051 if (n == null) return null; | |
| 15052 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 15053 } | |
| 15054 if (query.length > 0) { | |
| 15055 for (var part in query.split("&")) { | |
| 15056 var keyvalue = part.split("="); | |
| 15057 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 15058 } | |
| 15059 } | |
| 15060 | |
| 15061 | |
| 15062 var h = { | |
| 15063 "content-type" : "application/json; charset=utf-8", | |
| 15064 }; | |
| 15065 var resp = convert.JSON.encode(buildCreativeField()); | |
| 15066 return new async.Future.value(stringResponse(200, h, resp)); | |
| 15067 }), true); | |
| 15068 res.insert(arg_request, arg_profileId).then(unittest.expectAsync(((api.Cre
ativeField response) { | |
| 15069 checkCreativeField(response); | |
| 15070 }))); | |
| 15071 }); | |
| 15072 | |
| 15073 unittest.test("method--list", () { | |
| 15074 | |
| 15075 var mock = new HttpServerMock(); | |
| 15076 api.CreativeFieldsResourceApi res = new api.DfareportingApi(mock).creative
Fields; | |
| 15077 var arg_profileId = "foo"; | |
| 15078 var arg_advertiserIds = buildUnnamed1517(); | |
| 15079 var arg_ids = buildUnnamed1518(); | |
| 15080 var arg_maxResults = 42; | |
| 15081 var arg_pageToken = "foo"; | |
| 15082 var arg_searchString = "foo"; | |
| 15083 var arg_sortField = "foo"; | |
| 15084 var arg_sortOrder = "foo"; | |
| 15085 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 15086 var path = (req.url).path; | |
| 15087 var pathOffset = 0; | |
| 15088 var index; | |
| 15089 var subPart; | |
| 15090 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 15091 pathOffset += 1; | |
| 15092 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 15093 pathOffset += 18; | |
| 15094 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 15095 pathOffset += 13; | |
| 15096 index = path.indexOf("/creativeFields", pathOffset); | |
| 15097 unittest.expect(index >= 0, unittest.isTrue); | |
| 15098 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 15099 pathOffset = index; | |
| 15100 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 15101 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/creativeFields")); | |
| 15102 pathOffset += 15; | |
| 15103 | |
| 15104 var query = (req.url).query; | |
| 15105 var queryOffset = 0; | |
| 15106 var queryMap = {}; | |
| 15107 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 15108 parseBool(n) { | |
| 15109 if (n == "true") return true; | |
| 15110 if (n == "false") return false; | |
| 15111 if (n == null) return null; | |
| 15112 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 15113 } | |
| 15114 if (query.length > 0) { | |
| 15115 for (var part in query.split("&")) { | |
| 15116 var keyvalue = part.split("="); | |
| 15117 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 15118 } | |
| 15119 } | |
| 15120 unittest.expect(queryMap["advertiserIds"], unittest.equals(arg_advertise
rIds)); | |
| 15121 unittest.expect(queryMap["ids"], unittest.equals(arg_ids)); | |
| 15122 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | |
| 15123 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 15124 unittest.expect(queryMap["searchString"].first, unittest.equals(arg_sear
chString)); | |
| 15125 unittest.expect(queryMap["sortField"].first, unittest.equals(arg_sortFie
ld)); | |
| 15126 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | |
| 15127 | |
| 15128 | |
| 15129 var h = { | |
| 15130 "content-type" : "application/json; charset=utf-8", | |
| 15131 }; | |
| 15132 var resp = convert.JSON.encode(buildCreativeFieldsListResponse()); | |
| 15133 return new async.Future.value(stringResponse(200, h, resp)); | |
| 15134 }), true); | |
| 15135 res.list(arg_profileId, advertiserIds: arg_advertiserIds, ids: arg_ids, ma
xResults: arg_maxResults, pageToken: arg_pageToken, searchString: arg_searchStri
ng, sortField: arg_sortField, sortOrder: arg_sortOrder).then(unittest.expectAsyn
c(((api.CreativeFieldsListResponse response) { | |
| 15136 checkCreativeFieldsListResponse(response); | |
| 15137 }))); | |
| 15138 }); | |
| 15139 | |
| 15140 unittest.test("method--patch", () { | |
| 15141 | |
| 15142 var mock = new HttpServerMock(); | |
| 15143 api.CreativeFieldsResourceApi res = new api.DfareportingApi(mock).creative
Fields; | |
| 15144 var arg_request = buildCreativeField(); | |
| 15145 var arg_profileId = "foo"; | |
| 15146 var arg_id = "foo"; | |
| 15147 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 15148 var obj = new api.CreativeField.fromJson(json); | |
| 15149 checkCreativeField(obj); | |
| 15150 | |
| 15151 var path = (req.url).path; | |
| 15152 var pathOffset = 0; | |
| 15153 var index; | |
| 15154 var subPart; | |
| 15155 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 15156 pathOffset += 1; | |
| 15157 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 15158 pathOffset += 18; | |
| 15159 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 15160 pathOffset += 13; | |
| 15161 index = path.indexOf("/creativeFields", pathOffset); | |
| 15162 unittest.expect(index >= 0, unittest.isTrue); | |
| 15163 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 15164 pathOffset = index; | |
| 15165 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 15166 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/creativeFields")); | |
| 15167 pathOffset += 15; | |
| 15168 | |
| 15169 var query = (req.url).query; | |
| 15170 var queryOffset = 0; | |
| 15171 var queryMap = {}; | |
| 15172 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 15173 parseBool(n) { | |
| 15174 if (n == "true") return true; | |
| 15175 if (n == "false") return false; | |
| 15176 if (n == null) return null; | |
| 15177 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 15178 } | |
| 15179 if (query.length > 0) { | |
| 15180 for (var part in query.split("&")) { | |
| 15181 var keyvalue = part.split("="); | |
| 15182 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 15183 } | |
| 15184 } | |
| 15185 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); | |
| 15186 | |
| 15187 | |
| 15188 var h = { | |
| 15189 "content-type" : "application/json; charset=utf-8", | |
| 15190 }; | |
| 15191 var resp = convert.JSON.encode(buildCreativeField()); | |
| 15192 return new async.Future.value(stringResponse(200, h, resp)); | |
| 15193 }), true); | |
| 15194 res.patch(arg_request, arg_profileId, arg_id).then(unittest.expectAsync(((
api.CreativeField response) { | |
| 15195 checkCreativeField(response); | |
| 15196 }))); | |
| 15197 }); | |
| 15198 | |
| 15199 unittest.test("method--update", () { | |
| 15200 | |
| 15201 var mock = new HttpServerMock(); | |
| 15202 api.CreativeFieldsResourceApi res = new api.DfareportingApi(mock).creative
Fields; | |
| 15203 var arg_request = buildCreativeField(); | |
| 15204 var arg_profileId = "foo"; | |
| 15205 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 15206 var obj = new api.CreativeField.fromJson(json); | |
| 15207 checkCreativeField(obj); | |
| 15208 | |
| 15209 var path = (req.url).path; | |
| 15210 var pathOffset = 0; | |
| 15211 var index; | |
| 15212 var subPart; | |
| 15213 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 15214 pathOffset += 1; | |
| 15215 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 15216 pathOffset += 18; | |
| 15217 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 15218 pathOffset += 13; | |
| 15219 index = path.indexOf("/creativeFields", pathOffset); | |
| 15220 unittest.expect(index >= 0, unittest.isTrue); | |
| 15221 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 15222 pathOffset = index; | |
| 15223 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 15224 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/creativeFields")); | |
| 15225 pathOffset += 15; | |
| 15226 | |
| 15227 var query = (req.url).query; | |
| 15228 var queryOffset = 0; | |
| 15229 var queryMap = {}; | |
| 15230 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 15231 parseBool(n) { | |
| 15232 if (n == "true") return true; | |
| 15233 if (n == "false") return false; | |
| 15234 if (n == null) return null; | |
| 15235 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 15236 } | |
| 15237 if (query.length > 0) { | |
| 15238 for (var part in query.split("&")) { | |
| 15239 var keyvalue = part.split("="); | |
| 15240 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 15241 } | |
| 15242 } | |
| 15243 | |
| 15244 | |
| 15245 var h = { | |
| 15246 "content-type" : "application/json; charset=utf-8", | |
| 15247 }; | |
| 15248 var resp = convert.JSON.encode(buildCreativeField()); | |
| 15249 return new async.Future.value(stringResponse(200, h, resp)); | |
| 15250 }), true); | |
| 15251 res.update(arg_request, arg_profileId).then(unittest.expectAsync(((api.Cre
ativeField response) { | |
| 15252 checkCreativeField(response); | |
| 15253 }))); | |
| 15254 }); | |
| 15255 | |
| 15256 }); | |
| 15257 | |
| 15258 | |
| 15259 unittest.group("resource-CreativeGroupsResourceApi", () { | |
| 15260 unittest.test("method--get", () { | |
| 15261 | |
| 15262 var mock = new HttpServerMock(); | |
| 15263 api.CreativeGroupsResourceApi res = new api.DfareportingApi(mock).creative
Groups; | |
| 15264 var arg_profileId = "foo"; | |
| 15265 var arg_id = "foo"; | |
| 15266 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 15267 var path = (req.url).path; | |
| 15268 var pathOffset = 0; | |
| 15269 var index; | |
| 15270 var subPart; | |
| 15271 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 15272 pathOffset += 1; | |
| 15273 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 15274 pathOffset += 18; | |
| 15275 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 15276 pathOffset += 13; | |
| 15277 index = path.indexOf("/creativeGroups/", pathOffset); | |
| 15278 unittest.expect(index >= 0, unittest.isTrue); | |
| 15279 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 15280 pathOffset = index; | |
| 15281 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 15282 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq
uals("/creativeGroups/")); | |
| 15283 pathOffset += 16; | |
| 15284 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 15285 pathOffset = path.length; | |
| 15286 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 15287 | |
| 15288 var query = (req.url).query; | |
| 15289 var queryOffset = 0; | |
| 15290 var queryMap = {}; | |
| 15291 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 15292 parseBool(n) { | |
| 15293 if (n == "true") return true; | |
| 15294 if (n == "false") return false; | |
| 15295 if (n == null) return null; | |
| 15296 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 15297 } | |
| 15298 if (query.length > 0) { | |
| 15299 for (var part in query.split("&")) { | |
| 15300 var keyvalue = part.split("="); | |
| 15301 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 15302 } | |
| 15303 } | |
| 15304 | |
| 15305 | |
| 15306 var h = { | |
| 15307 "content-type" : "application/json; charset=utf-8", | |
| 15308 }; | |
| 15309 var resp = convert.JSON.encode(buildCreativeGroup()); | |
| 15310 return new async.Future.value(stringResponse(200, h, resp)); | |
| 15311 }), true); | |
| 15312 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.CreativeGro
up response) { | |
| 15313 checkCreativeGroup(response); | |
| 15314 }))); | |
| 15315 }); | |
| 15316 | |
| 15317 unittest.test("method--insert", () { | |
| 15318 | |
| 15319 var mock = new HttpServerMock(); | |
| 15320 api.CreativeGroupsResourceApi res = new api.DfareportingApi(mock).creative
Groups; | |
| 15321 var arg_request = buildCreativeGroup(); | |
| 15322 var arg_profileId = "foo"; | |
| 15323 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 15324 var obj = new api.CreativeGroup.fromJson(json); | |
| 15325 checkCreativeGroup(obj); | |
| 15326 | |
| 15327 var path = (req.url).path; | |
| 15328 var pathOffset = 0; | |
| 15329 var index; | |
| 15330 var subPart; | |
| 15331 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 15332 pathOffset += 1; | |
| 15333 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 15334 pathOffset += 18; | |
| 15335 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 15336 pathOffset += 13; | |
| 15337 index = path.indexOf("/creativeGroups", pathOffset); | |
| 15338 unittest.expect(index >= 0, unittest.isTrue); | |
| 15339 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 15340 pathOffset = index; | |
| 15341 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 15342 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/creativeGroups")); | |
| 15343 pathOffset += 15; | |
| 15344 | |
| 15345 var query = (req.url).query; | |
| 15346 var queryOffset = 0; | |
| 15347 var queryMap = {}; | |
| 15348 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 15349 parseBool(n) { | |
| 15350 if (n == "true") return true; | |
| 15351 if (n == "false") return false; | |
| 15352 if (n == null) return null; | |
| 15353 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 15354 } | |
| 15355 if (query.length > 0) { | |
| 15356 for (var part in query.split("&")) { | |
| 15357 var keyvalue = part.split("="); | |
| 15358 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 15359 } | |
| 15360 } | |
| 15361 | |
| 15362 | |
| 15363 var h = { | |
| 15364 "content-type" : "application/json; charset=utf-8", | |
| 15365 }; | |
| 15366 var resp = convert.JSON.encode(buildCreativeGroup()); | |
| 15367 return new async.Future.value(stringResponse(200, h, resp)); | |
| 15368 }), true); | |
| 15369 res.insert(arg_request, arg_profileId).then(unittest.expectAsync(((api.Cre
ativeGroup response) { | |
| 15370 checkCreativeGroup(response); | |
| 15371 }))); | |
| 15372 }); | |
| 15373 | |
| 15374 unittest.test("method--list", () { | |
| 15375 | |
| 15376 var mock = new HttpServerMock(); | |
| 15377 api.CreativeGroupsResourceApi res = new api.DfareportingApi(mock).creative
Groups; | |
| 15378 var arg_profileId = "foo"; | |
| 15379 var arg_advertiserIds = buildUnnamed1519(); | |
| 15380 var arg_groupNumber = 42; | |
| 15381 var arg_ids = buildUnnamed1520(); | |
| 15382 var arg_maxResults = 42; | |
| 15383 var arg_pageToken = "foo"; | |
| 15384 var arg_searchString = "foo"; | |
| 15385 var arg_sortField = "foo"; | |
| 15386 var arg_sortOrder = "foo"; | |
| 15387 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 15388 var path = (req.url).path; | |
| 15389 var pathOffset = 0; | |
| 15390 var index; | |
| 15391 var subPart; | |
| 15392 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 15393 pathOffset += 1; | |
| 15394 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 15395 pathOffset += 18; | |
| 15396 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 15397 pathOffset += 13; | |
| 15398 index = path.indexOf("/creativeGroups", pathOffset); | |
| 15399 unittest.expect(index >= 0, unittest.isTrue); | |
| 15400 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 15401 pathOffset = index; | |
| 15402 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 15403 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/creativeGroups")); | |
| 15404 pathOffset += 15; | |
| 15405 | |
| 15406 var query = (req.url).query; | |
| 15407 var queryOffset = 0; | |
| 15408 var queryMap = {}; | |
| 15409 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 15410 parseBool(n) { | |
| 15411 if (n == "true") return true; | |
| 15412 if (n == "false") return false; | |
| 15413 if (n == null) return null; | |
| 15414 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 15415 } | |
| 15416 if (query.length > 0) { | |
| 15417 for (var part in query.split("&")) { | |
| 15418 var keyvalue = part.split("="); | |
| 15419 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 15420 } | |
| 15421 } | |
| 15422 unittest.expect(queryMap["advertiserIds"], unittest.equals(arg_advertise
rIds)); | |
| 15423 unittest.expect(core.int.parse(queryMap["groupNumber"].first), unittest.
equals(arg_groupNumber)); | |
| 15424 unittest.expect(queryMap["ids"], unittest.equals(arg_ids)); | |
| 15425 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | |
| 15426 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 15427 unittest.expect(queryMap["searchString"].first, unittest.equals(arg_sear
chString)); | |
| 15428 unittest.expect(queryMap["sortField"].first, unittest.equals(arg_sortFie
ld)); | |
| 15429 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | |
| 15430 | |
| 15431 | |
| 15432 var h = { | |
| 15433 "content-type" : "application/json; charset=utf-8", | |
| 15434 }; | |
| 15435 var resp = convert.JSON.encode(buildCreativeGroupsListResponse()); | |
| 15436 return new async.Future.value(stringResponse(200, h, resp)); | |
| 15437 }), true); | |
| 15438 res.list(arg_profileId, advertiserIds: arg_advertiserIds, groupNumber: arg
_groupNumber, ids: arg_ids, maxResults: arg_maxResults, pageToken: arg_pageToken
, searchString: arg_searchString, sortField: arg_sortField, sortOrder: arg_sortO
rder).then(unittest.expectAsync(((api.CreativeGroupsListResponse response) { | |
| 15439 checkCreativeGroupsListResponse(response); | |
| 15440 }))); | |
| 15441 }); | |
| 15442 | |
| 15443 unittest.test("method--patch", () { | |
| 15444 | |
| 15445 var mock = new HttpServerMock(); | |
| 15446 api.CreativeGroupsResourceApi res = new api.DfareportingApi(mock).creative
Groups; | |
| 15447 var arg_request = buildCreativeGroup(); | |
| 15448 var arg_profileId = "foo"; | |
| 15449 var arg_id = "foo"; | |
| 15450 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 15451 var obj = new api.CreativeGroup.fromJson(json); | |
| 15452 checkCreativeGroup(obj); | |
| 15453 | |
| 15454 var path = (req.url).path; | |
| 15455 var pathOffset = 0; | |
| 15456 var index; | |
| 15457 var subPart; | |
| 15458 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 15459 pathOffset += 1; | |
| 15460 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 15461 pathOffset += 18; | |
| 15462 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 15463 pathOffset += 13; | |
| 15464 index = path.indexOf("/creativeGroups", pathOffset); | |
| 15465 unittest.expect(index >= 0, unittest.isTrue); | |
| 15466 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 15467 pathOffset = index; | |
| 15468 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 15469 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/creativeGroups")); | |
| 15470 pathOffset += 15; | |
| 15471 | |
| 15472 var query = (req.url).query; | |
| 15473 var queryOffset = 0; | |
| 15474 var queryMap = {}; | |
| 15475 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 15476 parseBool(n) { | |
| 15477 if (n == "true") return true; | |
| 15478 if (n == "false") return false; | |
| 15479 if (n == null) return null; | |
| 15480 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 15481 } | |
| 15482 if (query.length > 0) { | |
| 15483 for (var part in query.split("&")) { | |
| 15484 var keyvalue = part.split("="); | |
| 15485 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 15486 } | |
| 15487 } | |
| 15488 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); | |
| 15489 | |
| 15490 | |
| 15491 var h = { | |
| 15492 "content-type" : "application/json; charset=utf-8", | |
| 15493 }; | |
| 15494 var resp = convert.JSON.encode(buildCreativeGroup()); | |
| 15495 return new async.Future.value(stringResponse(200, h, resp)); | |
| 15496 }), true); | |
| 15497 res.patch(arg_request, arg_profileId, arg_id).then(unittest.expectAsync(((
api.CreativeGroup response) { | |
| 15498 checkCreativeGroup(response); | |
| 15499 }))); | |
| 15500 }); | |
| 15501 | |
| 15502 unittest.test("method--update", () { | |
| 15503 | |
| 15504 var mock = new HttpServerMock(); | |
| 15505 api.CreativeGroupsResourceApi res = new api.DfareportingApi(mock).creative
Groups; | |
| 15506 var arg_request = buildCreativeGroup(); | |
| 15507 var arg_profileId = "foo"; | |
| 15508 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 15509 var obj = new api.CreativeGroup.fromJson(json); | |
| 15510 checkCreativeGroup(obj); | |
| 15511 | |
| 15512 var path = (req.url).path; | |
| 15513 var pathOffset = 0; | |
| 15514 var index; | |
| 15515 var subPart; | |
| 15516 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 15517 pathOffset += 1; | |
| 15518 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 15519 pathOffset += 18; | |
| 15520 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 15521 pathOffset += 13; | |
| 15522 index = path.indexOf("/creativeGroups", pathOffset); | |
| 15523 unittest.expect(index >= 0, unittest.isTrue); | |
| 15524 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 15525 pathOffset = index; | |
| 15526 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 15527 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/creativeGroups")); | |
| 15528 pathOffset += 15; | |
| 15529 | |
| 15530 var query = (req.url).query; | |
| 15531 var queryOffset = 0; | |
| 15532 var queryMap = {}; | |
| 15533 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 15534 parseBool(n) { | |
| 15535 if (n == "true") return true; | |
| 15536 if (n == "false") return false; | |
| 15537 if (n == null) return null; | |
| 15538 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 15539 } | |
| 15540 if (query.length > 0) { | |
| 15541 for (var part in query.split("&")) { | |
| 15542 var keyvalue = part.split("="); | |
| 15543 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 15544 } | |
| 15545 } | |
| 15546 | |
| 15547 | |
| 15548 var h = { | |
| 15549 "content-type" : "application/json; charset=utf-8", | |
| 15550 }; | |
| 15551 var resp = convert.JSON.encode(buildCreativeGroup()); | |
| 15552 return new async.Future.value(stringResponse(200, h, resp)); | |
| 15553 }), true); | |
| 15554 res.update(arg_request, arg_profileId).then(unittest.expectAsync(((api.Cre
ativeGroup response) { | |
| 15555 checkCreativeGroup(response); | |
| 15556 }))); | |
| 15557 }); | |
| 15558 | |
| 15559 }); | |
| 15560 | |
| 15561 | |
| 15562 unittest.group("resource-CreativesResourceApi", () { | |
| 15563 unittest.test("method--get", () { | |
| 15564 | |
| 15565 var mock = new HttpServerMock(); | |
| 15566 api.CreativesResourceApi res = new api.DfareportingApi(mock).creatives; | |
| 15567 var arg_profileId = "foo"; | |
| 15568 var arg_id = "foo"; | |
| 15569 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 15570 var path = (req.url).path; | |
| 15571 var pathOffset = 0; | |
| 15572 var index; | |
| 15573 var subPart; | |
| 15574 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 15575 pathOffset += 1; | |
| 15576 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 15577 pathOffset += 18; | |
| 15578 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 15579 pathOffset += 13; | |
| 15580 index = path.indexOf("/creatives/", pathOffset); | |
| 15581 unittest.expect(index >= 0, unittest.isTrue); | |
| 15582 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 15583 pathOffset = index; | |
| 15584 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 15585 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("/creatives/")); | |
| 15586 pathOffset += 11; | |
| 15587 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 15588 pathOffset = path.length; | |
| 15589 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 15590 | |
| 15591 var query = (req.url).query; | |
| 15592 var queryOffset = 0; | |
| 15593 var queryMap = {}; | |
| 15594 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 15595 parseBool(n) { | |
| 15596 if (n == "true") return true; | |
| 15597 if (n == "false") return false; | |
| 15598 if (n == null) return null; | |
| 15599 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 15600 } | |
| 15601 if (query.length > 0) { | |
| 15602 for (var part in query.split("&")) { | |
| 15603 var keyvalue = part.split("="); | |
| 15604 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 15605 } | |
| 15606 } | |
| 15607 | |
| 15608 | |
| 15609 var h = { | |
| 15610 "content-type" : "application/json; charset=utf-8", | |
| 15611 }; | |
| 15612 var resp = convert.JSON.encode(buildCreative()); | |
| 15613 return new async.Future.value(stringResponse(200, h, resp)); | |
| 15614 }), true); | |
| 15615 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.Creative re
sponse) { | |
| 15616 checkCreative(response); | |
| 15617 }))); | |
| 15618 }); | |
| 15619 | |
| 15620 unittest.test("method--insert", () { | |
| 15621 | |
| 15622 var mock = new HttpServerMock(); | |
| 15623 api.CreativesResourceApi res = new api.DfareportingApi(mock).creatives; | |
| 15624 var arg_request = buildCreative(); | |
| 15625 var arg_profileId = "foo"; | |
| 15626 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 15627 var obj = new api.Creative.fromJson(json); | |
| 15628 checkCreative(obj); | |
| 15629 | |
| 15630 var path = (req.url).path; | |
| 15631 var pathOffset = 0; | |
| 15632 var index; | |
| 15633 var subPart; | |
| 15634 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 15635 pathOffset += 1; | |
| 15636 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 15637 pathOffset += 18; | |
| 15638 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 15639 pathOffset += 13; | |
| 15640 index = path.indexOf("/creatives", pathOffset); | |
| 15641 unittest.expect(index >= 0, unittest.isTrue); | |
| 15642 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 15643 pathOffset = index; | |
| 15644 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 15645 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/creatives")); | |
| 15646 pathOffset += 10; | |
| 15647 | |
| 15648 var query = (req.url).query; | |
| 15649 var queryOffset = 0; | |
| 15650 var queryMap = {}; | |
| 15651 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 15652 parseBool(n) { | |
| 15653 if (n == "true") return true; | |
| 15654 if (n == "false") return false; | |
| 15655 if (n == null) return null; | |
| 15656 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 15657 } | |
| 15658 if (query.length > 0) { | |
| 15659 for (var part in query.split("&")) { | |
| 15660 var keyvalue = part.split("="); | |
| 15661 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 15662 } | |
| 15663 } | |
| 15664 | |
| 15665 | |
| 15666 var h = { | |
| 15667 "content-type" : "application/json; charset=utf-8", | |
| 15668 }; | |
| 15669 var resp = convert.JSON.encode(buildCreative()); | |
| 15670 return new async.Future.value(stringResponse(200, h, resp)); | |
| 15671 }), true); | |
| 15672 res.insert(arg_request, arg_profileId).then(unittest.expectAsync(((api.Cre
ative response) { | |
| 15673 checkCreative(response); | |
| 15674 }))); | |
| 15675 }); | |
| 15676 | |
| 15677 unittest.test("method--list", () { | |
| 15678 | |
| 15679 var mock = new HttpServerMock(); | |
| 15680 api.CreativesResourceApi res = new api.DfareportingApi(mock).creatives; | |
| 15681 var arg_profileId = "foo"; | |
| 15682 var arg_active = true; | |
| 15683 var arg_advertiserId = "foo"; | |
| 15684 var arg_archived = true; | |
| 15685 var arg_campaignId = "foo"; | |
| 15686 var arg_companionCreativeIds = buildUnnamed1521(); | |
| 15687 var arg_creativeFieldIds = buildUnnamed1522(); | |
| 15688 var arg_ids = buildUnnamed1523(); | |
| 15689 var arg_maxResults = 42; | |
| 15690 var arg_pageToken = "foo"; | |
| 15691 var arg_renderingIds = buildUnnamed1524(); | |
| 15692 var arg_searchString = "foo"; | |
| 15693 var arg_sizeIds = buildUnnamed1525(); | |
| 15694 var arg_sortField = "foo"; | |
| 15695 var arg_sortOrder = "foo"; | |
| 15696 var arg_studioCreativeId = "foo"; | |
| 15697 var arg_types = buildUnnamed1526(); | |
| 15698 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 15699 var path = (req.url).path; | |
| 15700 var pathOffset = 0; | |
| 15701 var index; | |
| 15702 var subPart; | |
| 15703 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 15704 pathOffset += 1; | |
| 15705 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 15706 pathOffset += 18; | |
| 15707 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 15708 pathOffset += 13; | |
| 15709 index = path.indexOf("/creatives", pathOffset); | |
| 15710 unittest.expect(index >= 0, unittest.isTrue); | |
| 15711 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 15712 pathOffset = index; | |
| 15713 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 15714 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/creatives")); | |
| 15715 pathOffset += 10; | |
| 15716 | |
| 15717 var query = (req.url).query; | |
| 15718 var queryOffset = 0; | |
| 15719 var queryMap = {}; | |
| 15720 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 15721 parseBool(n) { | |
| 15722 if (n == "true") return true; | |
| 15723 if (n == "false") return false; | |
| 15724 if (n == null) return null; | |
| 15725 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 15726 } | |
| 15727 if (query.length > 0) { | |
| 15728 for (var part in query.split("&")) { | |
| 15729 var keyvalue = part.split("="); | |
| 15730 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 15731 } | |
| 15732 } | |
| 15733 unittest.expect(queryMap["active"].first, unittest.equals("$arg_active")
); | |
| 15734 unittest.expect(queryMap["advertiserId"].first, unittest.equals(arg_adve
rtiserId)); | |
| 15735 unittest.expect(queryMap["archived"].first, unittest.equals("$arg_archiv
ed")); | |
| 15736 unittest.expect(queryMap["campaignId"].first, unittest.equals(arg_campai
gnId)); | |
| 15737 unittest.expect(queryMap["companionCreativeIds"], unittest.equals(arg_co
mpanionCreativeIds)); | |
| 15738 unittest.expect(queryMap["creativeFieldIds"], unittest.equals(arg_creati
veFieldIds)); | |
| 15739 unittest.expect(queryMap["ids"], unittest.equals(arg_ids)); | |
| 15740 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | |
| 15741 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 15742 unittest.expect(queryMap["renderingIds"], unittest.equals(arg_renderingI
ds)); | |
| 15743 unittest.expect(queryMap["searchString"].first, unittest.equals(arg_sear
chString)); | |
| 15744 unittest.expect(queryMap["sizeIds"], unittest.equals(arg_sizeIds)); | |
| 15745 unittest.expect(queryMap["sortField"].first, unittest.equals(arg_sortFie
ld)); | |
| 15746 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | |
| 15747 unittest.expect(queryMap["studioCreativeId"].first, unittest.equals(arg_
studioCreativeId)); | |
| 15748 unittest.expect(queryMap["types"], unittest.equals(arg_types)); | |
| 15749 | |
| 15750 | |
| 15751 var h = { | |
| 15752 "content-type" : "application/json; charset=utf-8", | |
| 15753 }; | |
| 15754 var resp = convert.JSON.encode(buildCreativesListResponse()); | |
| 15755 return new async.Future.value(stringResponse(200, h, resp)); | |
| 15756 }), true); | |
| 15757 res.list(arg_profileId, active: arg_active, advertiserId: arg_advertiserId
, archived: arg_archived, campaignId: arg_campaignId, companionCreativeIds: arg_
companionCreativeIds, creativeFieldIds: arg_creativeFieldIds, ids: arg_ids, maxR
esults: arg_maxResults, pageToken: arg_pageToken, renderingIds: arg_renderingIds
, searchString: arg_searchString, sizeIds: arg_sizeIds, sortField: arg_sortField
, sortOrder: arg_sortOrder, studioCreativeId: arg_studioCreativeId, types: arg_t
ypes).then(unittest.expectAsync(((api.CreativesListResponse response) { | |
| 15758 checkCreativesListResponse(response); | |
| 15759 }))); | |
| 15760 }); | |
| 15761 | |
| 15762 unittest.test("method--patch", () { | |
| 15763 | |
| 15764 var mock = new HttpServerMock(); | |
| 15765 api.CreativesResourceApi res = new api.DfareportingApi(mock).creatives; | |
| 15766 var arg_request = buildCreative(); | |
| 15767 var arg_profileId = "foo"; | |
| 15768 var arg_id = "foo"; | |
| 15769 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 15770 var obj = new api.Creative.fromJson(json); | |
| 15771 checkCreative(obj); | |
| 15772 | |
| 15773 var path = (req.url).path; | |
| 15774 var pathOffset = 0; | |
| 15775 var index; | |
| 15776 var subPart; | |
| 15777 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 15778 pathOffset += 1; | |
| 15779 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 15780 pathOffset += 18; | |
| 15781 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 15782 pathOffset += 13; | |
| 15783 index = path.indexOf("/creatives", pathOffset); | |
| 15784 unittest.expect(index >= 0, unittest.isTrue); | |
| 15785 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 15786 pathOffset = index; | |
| 15787 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 15788 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/creatives")); | |
| 15789 pathOffset += 10; | |
| 15790 | |
| 15791 var query = (req.url).query; | |
| 15792 var queryOffset = 0; | |
| 15793 var queryMap = {}; | |
| 15794 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 15795 parseBool(n) { | |
| 15796 if (n == "true") return true; | |
| 15797 if (n == "false") return false; | |
| 15798 if (n == null) return null; | |
| 15799 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 15800 } | |
| 15801 if (query.length > 0) { | |
| 15802 for (var part in query.split("&")) { | |
| 15803 var keyvalue = part.split("="); | |
| 15804 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 15805 } | |
| 15806 } | |
| 15807 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); | |
| 15808 | |
| 15809 | |
| 15810 var h = { | |
| 15811 "content-type" : "application/json; charset=utf-8", | |
| 15812 }; | |
| 15813 var resp = convert.JSON.encode(buildCreative()); | |
| 15814 return new async.Future.value(stringResponse(200, h, resp)); | |
| 15815 }), true); | |
| 15816 res.patch(arg_request, arg_profileId, arg_id).then(unittest.expectAsync(((
api.Creative response) { | |
| 15817 checkCreative(response); | |
| 15818 }))); | |
| 15819 }); | |
| 15820 | |
| 15821 unittest.test("method--update", () { | |
| 15822 | |
| 15823 var mock = new HttpServerMock(); | |
| 15824 api.CreativesResourceApi res = new api.DfareportingApi(mock).creatives; | |
| 15825 var arg_request = buildCreative(); | |
| 15826 var arg_profileId = "foo"; | |
| 15827 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 15828 var obj = new api.Creative.fromJson(json); | |
| 15829 checkCreative(obj); | |
| 15830 | |
| 15831 var path = (req.url).path; | |
| 15832 var pathOffset = 0; | |
| 15833 var index; | |
| 15834 var subPart; | |
| 15835 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 15836 pathOffset += 1; | |
| 15837 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 15838 pathOffset += 18; | |
| 15839 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 15840 pathOffset += 13; | |
| 15841 index = path.indexOf("/creatives", pathOffset); | |
| 15842 unittest.expect(index >= 0, unittest.isTrue); | |
| 15843 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 15844 pathOffset = index; | |
| 15845 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 15846 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/creatives")); | |
| 15847 pathOffset += 10; | |
| 15848 | |
| 15849 var query = (req.url).query; | |
| 15850 var queryOffset = 0; | |
| 15851 var queryMap = {}; | |
| 15852 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 15853 parseBool(n) { | |
| 15854 if (n == "true") return true; | |
| 15855 if (n == "false") return false; | |
| 15856 if (n == null) return null; | |
| 15857 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 15858 } | |
| 15859 if (query.length > 0) { | |
| 15860 for (var part in query.split("&")) { | |
| 15861 var keyvalue = part.split("="); | |
| 15862 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 15863 } | |
| 15864 } | |
| 15865 | |
| 15866 | |
| 15867 var h = { | |
| 15868 "content-type" : "application/json; charset=utf-8", | |
| 15869 }; | |
| 15870 var resp = convert.JSON.encode(buildCreative()); | |
| 15871 return new async.Future.value(stringResponse(200, h, resp)); | |
| 15872 }), true); | |
| 15873 res.update(arg_request, arg_profileId).then(unittest.expectAsync(((api.Cre
ative response) { | |
| 15874 checkCreative(response); | |
| 15875 }))); | |
| 15876 }); | |
| 15877 | |
| 15878 }); | |
| 15879 | |
| 15880 | |
| 15881 unittest.group("resource-DimensionValuesResourceApi", () { | |
| 15882 unittest.test("method--query", () { | |
| 15883 | |
| 15884 var mock = new HttpServerMock(); | |
| 15885 api.DimensionValuesResourceApi res = new api.DfareportingApi(mock).dimensi
onValues; | |
| 15886 var arg_request = buildDimensionValueRequest(); | |
| 15887 var arg_profileId = "foo"; | |
| 15888 var arg_maxResults = 42; | |
| 15889 var arg_pageToken = "foo"; | |
| 15890 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 15891 var obj = new api.DimensionValueRequest.fromJson(json); | |
| 15892 checkDimensionValueRequest(obj); | |
| 15893 | |
| 15894 var path = (req.url).path; | |
| 15895 var pathOffset = 0; | |
| 15896 var index; | |
| 15897 var subPart; | |
| 15898 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 15899 pathOffset += 1; | |
| 15900 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 15901 pathOffset += 18; | |
| 15902 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 15903 pathOffset += 13; | |
| 15904 index = path.indexOf("/dimensionvalues/query", pathOffset); | |
| 15905 unittest.expect(index >= 0, unittest.isTrue); | |
| 15906 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 15907 pathOffset = index; | |
| 15908 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 15909 unittest.expect(path.substring(pathOffset, pathOffset + 22), unittest.eq
uals("/dimensionvalues/query")); | |
| 15910 pathOffset += 22; | |
| 15911 | |
| 15912 var query = (req.url).query; | |
| 15913 var queryOffset = 0; | |
| 15914 var queryMap = {}; | |
| 15915 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 15916 parseBool(n) { | |
| 15917 if (n == "true") return true; | |
| 15918 if (n == "false") return false; | |
| 15919 if (n == null) return null; | |
| 15920 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 15921 } | |
| 15922 if (query.length > 0) { | |
| 15923 for (var part in query.split("&")) { | |
| 15924 var keyvalue = part.split("="); | |
| 15925 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 15926 } | |
| 15927 } | |
| 15928 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | |
| 15929 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 15930 | |
| 15931 | |
| 15932 var h = { | |
| 15933 "content-type" : "application/json; charset=utf-8", | |
| 15934 }; | |
| 15935 var resp = convert.JSON.encode(buildDimensionValueList()); | |
| 15936 return new async.Future.value(stringResponse(200, h, resp)); | |
| 15937 }), true); | |
| 15938 res.query(arg_request, arg_profileId, maxResults: arg_maxResults, pageToke
n: arg_pageToken).then(unittest.expectAsync(((api.DimensionValueList response) { | |
| 15939 checkDimensionValueList(response); | |
| 15940 }))); | |
| 15941 }); | |
| 15942 | |
| 15943 }); | |
| 15944 | |
| 15945 | |
| 15946 unittest.group("resource-DirectorySiteContactsResourceApi", () { | |
| 15947 unittest.test("method--get", () { | |
| 15948 | |
| 15949 var mock = new HttpServerMock(); | |
| 15950 api.DirectorySiteContactsResourceApi res = new api.DfareportingApi(mock).d
irectorySiteContacts; | |
| 15951 var arg_profileId = "foo"; | |
| 15952 var arg_id = "foo"; | |
| 15953 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 15954 var path = (req.url).path; | |
| 15955 var pathOffset = 0; | |
| 15956 var index; | |
| 15957 var subPart; | |
| 15958 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 15959 pathOffset += 1; | |
| 15960 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 15961 pathOffset += 18; | |
| 15962 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 15963 pathOffset += 13; | |
| 15964 index = path.indexOf("/directorySiteContacts/", pathOffset); | |
| 15965 unittest.expect(index >= 0, unittest.isTrue); | |
| 15966 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 15967 pathOffset = index; | |
| 15968 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 15969 unittest.expect(path.substring(pathOffset, pathOffset + 23), unittest.eq
uals("/directorySiteContacts/")); | |
| 15970 pathOffset += 23; | |
| 15971 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 15972 pathOffset = path.length; | |
| 15973 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 15974 | |
| 15975 var query = (req.url).query; | |
| 15976 var queryOffset = 0; | |
| 15977 var queryMap = {}; | |
| 15978 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 15979 parseBool(n) { | |
| 15980 if (n == "true") return true; | |
| 15981 if (n == "false") return false; | |
| 15982 if (n == null) return null; | |
| 15983 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 15984 } | |
| 15985 if (query.length > 0) { | |
| 15986 for (var part in query.split("&")) { | |
| 15987 var keyvalue = part.split("="); | |
| 15988 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 15989 } | |
| 15990 } | |
| 15991 | |
| 15992 | |
| 15993 var h = { | |
| 15994 "content-type" : "application/json; charset=utf-8", | |
| 15995 }; | |
| 15996 var resp = convert.JSON.encode(buildDirectorySiteContact()); | |
| 15997 return new async.Future.value(stringResponse(200, h, resp)); | |
| 15998 }), true); | |
| 15999 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.DirectorySi
teContact response) { | |
| 16000 checkDirectorySiteContact(response); | |
| 16001 }))); | |
| 16002 }); | |
| 16003 | |
| 16004 unittest.test("method--list", () { | |
| 16005 | |
| 16006 var mock = new HttpServerMock(); | |
| 16007 api.DirectorySiteContactsResourceApi res = new api.DfareportingApi(mock).d
irectorySiteContacts; | |
| 16008 var arg_profileId = "foo"; | |
| 16009 var arg_directorySiteIds = buildUnnamed1527(); | |
| 16010 var arg_ids = buildUnnamed1528(); | |
| 16011 var arg_maxResults = 42; | |
| 16012 var arg_pageToken = "foo"; | |
| 16013 var arg_searchString = "foo"; | |
| 16014 var arg_sortField = "foo"; | |
| 16015 var arg_sortOrder = "foo"; | |
| 16016 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 16017 var path = (req.url).path; | |
| 16018 var pathOffset = 0; | |
| 16019 var index; | |
| 16020 var subPart; | |
| 16021 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 16022 pathOffset += 1; | |
| 16023 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 16024 pathOffset += 18; | |
| 16025 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 16026 pathOffset += 13; | |
| 16027 index = path.indexOf("/directorySiteContacts", pathOffset); | |
| 16028 unittest.expect(index >= 0, unittest.isTrue); | |
| 16029 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 16030 pathOffset = index; | |
| 16031 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 16032 unittest.expect(path.substring(pathOffset, pathOffset + 22), unittest.eq
uals("/directorySiteContacts")); | |
| 16033 pathOffset += 22; | |
| 16034 | |
| 16035 var query = (req.url).query; | |
| 16036 var queryOffset = 0; | |
| 16037 var queryMap = {}; | |
| 16038 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 16039 parseBool(n) { | |
| 16040 if (n == "true") return true; | |
| 16041 if (n == "false") return false; | |
| 16042 if (n == null) return null; | |
| 16043 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 16044 } | |
| 16045 if (query.length > 0) { | |
| 16046 for (var part in query.split("&")) { | |
| 16047 var keyvalue = part.split("="); | |
| 16048 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 16049 } | |
| 16050 } | |
| 16051 unittest.expect(queryMap["directorySiteIds"], unittest.equals(arg_direct
orySiteIds)); | |
| 16052 unittest.expect(queryMap["ids"], unittest.equals(arg_ids)); | |
| 16053 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | |
| 16054 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 16055 unittest.expect(queryMap["searchString"].first, unittest.equals(arg_sear
chString)); | |
| 16056 unittest.expect(queryMap["sortField"].first, unittest.equals(arg_sortFie
ld)); | |
| 16057 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | |
| 16058 | |
| 16059 | |
| 16060 var h = { | |
| 16061 "content-type" : "application/json; charset=utf-8", | |
| 16062 }; | |
| 16063 var resp = convert.JSON.encode(buildDirectorySiteContactsListResponse())
; | |
| 16064 return new async.Future.value(stringResponse(200, h, resp)); | |
| 16065 }), true); | |
| 16066 res.list(arg_profileId, directorySiteIds: arg_directorySiteIds, ids: arg_i
ds, maxResults: arg_maxResults, pageToken: arg_pageToken, searchString: arg_sear
chString, sortField: arg_sortField, sortOrder: arg_sortOrder).then(unittest.expe
ctAsync(((api.DirectorySiteContactsListResponse response) { | |
| 16067 checkDirectorySiteContactsListResponse(response); | |
| 16068 }))); | |
| 16069 }); | |
| 16070 | |
| 16071 }); | |
| 16072 | |
| 16073 | |
| 16074 unittest.group("resource-DirectorySitesResourceApi", () { | |
| 16075 unittest.test("method--get", () { | |
| 16076 | |
| 16077 var mock = new HttpServerMock(); | |
| 16078 api.DirectorySitesResourceApi res = new api.DfareportingApi(mock).director
ySites; | |
| 16079 var arg_profileId = "foo"; | |
| 16080 var arg_id = "foo"; | |
| 16081 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 16082 var path = (req.url).path; | |
| 16083 var pathOffset = 0; | |
| 16084 var index; | |
| 16085 var subPart; | |
| 16086 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 16087 pathOffset += 1; | |
| 16088 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 16089 pathOffset += 18; | |
| 16090 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 16091 pathOffset += 13; | |
| 16092 index = path.indexOf("/directorySites/", pathOffset); | |
| 16093 unittest.expect(index >= 0, unittest.isTrue); | |
| 16094 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 16095 pathOffset = index; | |
| 16096 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 16097 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq
uals("/directorySites/")); | |
| 16098 pathOffset += 16; | |
| 16099 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 16100 pathOffset = path.length; | |
| 16101 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 16102 | |
| 16103 var query = (req.url).query; | |
| 16104 var queryOffset = 0; | |
| 16105 var queryMap = {}; | |
| 16106 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 16107 parseBool(n) { | |
| 16108 if (n == "true") return true; | |
| 16109 if (n == "false") return false; | |
| 16110 if (n == null) return null; | |
| 16111 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 16112 } | |
| 16113 if (query.length > 0) { | |
| 16114 for (var part in query.split("&")) { | |
| 16115 var keyvalue = part.split("="); | |
| 16116 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 16117 } | |
| 16118 } | |
| 16119 | |
| 16120 | |
| 16121 var h = { | |
| 16122 "content-type" : "application/json; charset=utf-8", | |
| 16123 }; | |
| 16124 var resp = convert.JSON.encode(buildDirectorySite()); | |
| 16125 return new async.Future.value(stringResponse(200, h, resp)); | |
| 16126 }), true); | |
| 16127 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.DirectorySi
te response) { | |
| 16128 checkDirectorySite(response); | |
| 16129 }))); | |
| 16130 }); | |
| 16131 | |
| 16132 unittest.test("method--insert", () { | |
| 16133 | |
| 16134 var mock = new HttpServerMock(); | |
| 16135 api.DirectorySitesResourceApi res = new api.DfareportingApi(mock).director
ySites; | |
| 16136 var arg_request = buildDirectorySite(); | |
| 16137 var arg_profileId = "foo"; | |
| 16138 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 16139 var obj = new api.DirectorySite.fromJson(json); | |
| 16140 checkDirectorySite(obj); | |
| 16141 | |
| 16142 var path = (req.url).path; | |
| 16143 var pathOffset = 0; | |
| 16144 var index; | |
| 16145 var subPart; | |
| 16146 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 16147 pathOffset += 1; | |
| 16148 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 16149 pathOffset += 18; | |
| 16150 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 16151 pathOffset += 13; | |
| 16152 index = path.indexOf("/directorySites", pathOffset); | |
| 16153 unittest.expect(index >= 0, unittest.isTrue); | |
| 16154 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 16155 pathOffset = index; | |
| 16156 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 16157 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/directorySites")); | |
| 16158 pathOffset += 15; | |
| 16159 | |
| 16160 var query = (req.url).query; | |
| 16161 var queryOffset = 0; | |
| 16162 var queryMap = {}; | |
| 16163 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 16164 parseBool(n) { | |
| 16165 if (n == "true") return true; | |
| 16166 if (n == "false") return false; | |
| 16167 if (n == null) return null; | |
| 16168 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 16169 } | |
| 16170 if (query.length > 0) { | |
| 16171 for (var part in query.split("&")) { | |
| 16172 var keyvalue = part.split("="); | |
| 16173 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 16174 } | |
| 16175 } | |
| 16176 | |
| 16177 | |
| 16178 var h = { | |
| 16179 "content-type" : "application/json; charset=utf-8", | |
| 16180 }; | |
| 16181 var resp = convert.JSON.encode(buildDirectorySite()); | |
| 16182 return new async.Future.value(stringResponse(200, h, resp)); | |
| 16183 }), true); | |
| 16184 res.insert(arg_request, arg_profileId).then(unittest.expectAsync(((api.Dir
ectorySite response) { | |
| 16185 checkDirectorySite(response); | |
| 16186 }))); | |
| 16187 }); | |
| 16188 | |
| 16189 unittest.test("method--list", () { | |
| 16190 | |
| 16191 var mock = new HttpServerMock(); | |
| 16192 api.DirectorySitesResourceApi res = new api.DfareportingApi(mock).director
ySites; | |
| 16193 var arg_profileId = "foo"; | |
| 16194 var arg_acceptsInStreamVideoPlacements = true; | |
| 16195 var arg_acceptsInterstitialPlacements = true; | |
| 16196 var arg_acceptsPublisherPaidPlacements = true; | |
| 16197 var arg_active = true; | |
| 16198 var arg_countryId = "foo"; | |
| 16199 var arg_dfpNetworkCode = "foo"; | |
| 16200 var arg_ids = buildUnnamed1529(); | |
| 16201 var arg_maxResults = 42; | |
| 16202 var arg_pageToken = "foo"; | |
| 16203 var arg_parentId = "foo"; | |
| 16204 var arg_searchString = "foo"; | |
| 16205 var arg_sortField = "foo"; | |
| 16206 var arg_sortOrder = "foo"; | |
| 16207 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 16208 var path = (req.url).path; | |
| 16209 var pathOffset = 0; | |
| 16210 var index; | |
| 16211 var subPart; | |
| 16212 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 16213 pathOffset += 1; | |
| 16214 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 16215 pathOffset += 18; | |
| 16216 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 16217 pathOffset += 13; | |
| 16218 index = path.indexOf("/directorySites", pathOffset); | |
| 16219 unittest.expect(index >= 0, unittest.isTrue); | |
| 16220 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 16221 pathOffset = index; | |
| 16222 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 16223 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/directorySites")); | |
| 16224 pathOffset += 15; | |
| 16225 | |
| 16226 var query = (req.url).query; | |
| 16227 var queryOffset = 0; | |
| 16228 var queryMap = {}; | |
| 16229 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 16230 parseBool(n) { | |
| 16231 if (n == "true") return true; | |
| 16232 if (n == "false") return false; | |
| 16233 if (n == null) return null; | |
| 16234 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 16235 } | |
| 16236 if (query.length > 0) { | |
| 16237 for (var part in query.split("&")) { | |
| 16238 var keyvalue = part.split("="); | |
| 16239 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 16240 } | |
| 16241 } | |
| 16242 unittest.expect(queryMap["acceptsInStreamVideoPlacements"].first, unitte
st.equals("$arg_acceptsInStreamVideoPlacements")); | |
| 16243 unittest.expect(queryMap["acceptsInterstitialPlacements"].first, unittes
t.equals("$arg_acceptsInterstitialPlacements")); | |
| 16244 unittest.expect(queryMap["acceptsPublisherPaidPlacements"].first, unitte
st.equals("$arg_acceptsPublisherPaidPlacements")); | |
| 16245 unittest.expect(queryMap["active"].first, unittest.equals("$arg_active")
); | |
| 16246 unittest.expect(queryMap["countryId"].first, unittest.equals(arg_country
Id)); | |
| 16247 unittest.expect(queryMap["dfp_network_code"].first, unittest.equals(arg_
dfpNetworkCode)); | |
| 16248 unittest.expect(queryMap["ids"], unittest.equals(arg_ids)); | |
| 16249 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | |
| 16250 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 16251 unittest.expect(queryMap["parentId"].first, unittest.equals(arg_parentId
)); | |
| 16252 unittest.expect(queryMap["searchString"].first, unittest.equals(arg_sear
chString)); | |
| 16253 unittest.expect(queryMap["sortField"].first, unittest.equals(arg_sortFie
ld)); | |
| 16254 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | |
| 16255 | |
| 16256 | |
| 16257 var h = { | |
| 16258 "content-type" : "application/json; charset=utf-8", | |
| 16259 }; | |
| 16260 var resp = convert.JSON.encode(buildDirectorySitesListResponse()); | |
| 16261 return new async.Future.value(stringResponse(200, h, resp)); | |
| 16262 }), true); | |
| 16263 res.list(arg_profileId, acceptsInStreamVideoPlacements: arg_acceptsInStrea
mVideoPlacements, acceptsInterstitialPlacements: arg_acceptsInterstitialPlacemen
ts, acceptsPublisherPaidPlacements: arg_acceptsPublisherPaidPlacements, active:
arg_active, countryId: arg_countryId, dfpNetworkCode: arg_dfpNetworkCode, ids: a
rg_ids, maxResults: arg_maxResults, pageToken: arg_pageToken, parentId: arg_pare
ntId, searchString: arg_searchString, sortField: arg_sortField, sortOrder: arg_s
ortOrder).then(unittest.expectAsync(((api.DirectorySitesListResponse response) { | |
| 16264 checkDirectorySitesListResponse(response); | |
| 16265 }))); | |
| 16266 }); | |
| 16267 | |
| 16268 }); | |
| 16269 | |
| 16270 | |
| 16271 unittest.group("resource-DynamicTargetingKeysResourceApi", () { | |
| 16272 unittest.test("method--delete", () { | |
| 16273 | |
| 16274 var mock = new HttpServerMock(); | |
| 16275 api.DynamicTargetingKeysResourceApi res = new api.DfareportingApi(mock).dy
namicTargetingKeys; | |
| 16276 var arg_profileId = "foo"; | |
| 16277 var arg_objectId = "foo"; | |
| 16278 var arg_name = "foo"; | |
| 16279 var arg_objectType = "foo"; | |
| 16280 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 16281 var path = (req.url).path; | |
| 16282 var pathOffset = 0; | |
| 16283 var index; | |
| 16284 var subPart; | |
| 16285 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 16286 pathOffset += 1; | |
| 16287 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 16288 pathOffset += 18; | |
| 16289 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 16290 pathOffset += 13; | |
| 16291 index = path.indexOf("/dynamicTargetingKeys/", pathOffset); | |
| 16292 unittest.expect(index >= 0, unittest.isTrue); | |
| 16293 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 16294 pathOffset = index; | |
| 16295 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 16296 unittest.expect(path.substring(pathOffset, pathOffset + 22), unittest.eq
uals("/dynamicTargetingKeys/")); | |
| 16297 pathOffset += 22; | |
| 16298 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 16299 pathOffset = path.length; | |
| 16300 unittest.expect(subPart, unittest.equals("$arg_objectId")); | |
| 16301 | |
| 16302 var query = (req.url).query; | |
| 16303 var queryOffset = 0; | |
| 16304 var queryMap = {}; | |
| 16305 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 16306 parseBool(n) { | |
| 16307 if (n == "true") return true; | |
| 16308 if (n == "false") return false; | |
| 16309 if (n == null) return null; | |
| 16310 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 16311 } | |
| 16312 if (query.length > 0) { | |
| 16313 for (var part in query.split("&")) { | |
| 16314 var keyvalue = part.split("="); | |
| 16315 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 16316 } | |
| 16317 } | |
| 16318 unittest.expect(queryMap["name"].first, unittest.equals(arg_name)); | |
| 16319 unittest.expect(queryMap["objectType"].first, unittest.equals(arg_object
Type)); | |
| 16320 | |
| 16321 | |
| 16322 var h = { | |
| 16323 "content-type" : "application/json; charset=utf-8", | |
| 16324 }; | |
| 16325 var resp = ""; | |
| 16326 return new async.Future.value(stringResponse(200, h, resp)); | |
| 16327 }), true); | |
| 16328 res.delete(arg_profileId, arg_objectId, arg_name, arg_objectType).then(uni
ttest.expectAsync((_) {})); | |
| 16329 }); | |
| 16330 | |
| 16331 unittest.test("method--insert", () { | |
| 16332 | |
| 16333 var mock = new HttpServerMock(); | |
| 16334 api.DynamicTargetingKeysResourceApi res = new api.DfareportingApi(mock).dy
namicTargetingKeys; | |
| 16335 var arg_request = buildDynamicTargetingKey(); | |
| 16336 var arg_profileId = "foo"; | |
| 16337 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 16338 var obj = new api.DynamicTargetingKey.fromJson(json); | |
| 16339 checkDynamicTargetingKey(obj); | |
| 16340 | |
| 16341 var path = (req.url).path; | |
| 16342 var pathOffset = 0; | |
| 16343 var index; | |
| 16344 var subPart; | |
| 16345 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 16346 pathOffset += 1; | |
| 16347 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 16348 pathOffset += 18; | |
| 16349 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 16350 pathOffset += 13; | |
| 16351 index = path.indexOf("/dynamicTargetingKeys", pathOffset); | |
| 16352 unittest.expect(index >= 0, unittest.isTrue); | |
| 16353 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 16354 pathOffset = index; | |
| 16355 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 16356 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("/dynamicTargetingKeys")); | |
| 16357 pathOffset += 21; | |
| 16358 | |
| 16359 var query = (req.url).query; | |
| 16360 var queryOffset = 0; | |
| 16361 var queryMap = {}; | |
| 16362 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 16363 parseBool(n) { | |
| 16364 if (n == "true") return true; | |
| 16365 if (n == "false") return false; | |
| 16366 if (n == null) return null; | |
| 16367 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 16368 } | |
| 16369 if (query.length > 0) { | |
| 16370 for (var part in query.split("&")) { | |
| 16371 var keyvalue = part.split("="); | |
| 16372 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 16373 } | |
| 16374 } | |
| 16375 | |
| 16376 | |
| 16377 var h = { | |
| 16378 "content-type" : "application/json; charset=utf-8", | |
| 16379 }; | |
| 16380 var resp = convert.JSON.encode(buildDynamicTargetingKey()); | |
| 16381 return new async.Future.value(stringResponse(200, h, resp)); | |
| 16382 }), true); | |
| 16383 res.insert(arg_request, arg_profileId).then(unittest.expectAsync(((api.Dyn
amicTargetingKey response) { | |
| 16384 checkDynamicTargetingKey(response); | |
| 16385 }))); | |
| 16386 }); | |
| 16387 | |
| 16388 unittest.test("method--list", () { | |
| 16389 | |
| 16390 var mock = new HttpServerMock(); | |
| 16391 api.DynamicTargetingKeysResourceApi res = new api.DfareportingApi(mock).dy
namicTargetingKeys; | |
| 16392 var arg_profileId = "foo"; | |
| 16393 var arg_advertiserId = "foo"; | |
| 16394 var arg_names = buildUnnamed1530(); | |
| 16395 var arg_objectId = "foo"; | |
| 16396 var arg_objectType = "foo"; | |
| 16397 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 16398 var path = (req.url).path; | |
| 16399 var pathOffset = 0; | |
| 16400 var index; | |
| 16401 var subPart; | |
| 16402 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 16403 pathOffset += 1; | |
| 16404 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 16405 pathOffset += 18; | |
| 16406 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 16407 pathOffset += 13; | |
| 16408 index = path.indexOf("/dynamicTargetingKeys", pathOffset); | |
| 16409 unittest.expect(index >= 0, unittest.isTrue); | |
| 16410 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 16411 pathOffset = index; | |
| 16412 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 16413 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("/dynamicTargetingKeys")); | |
| 16414 pathOffset += 21; | |
| 16415 | |
| 16416 var query = (req.url).query; | |
| 16417 var queryOffset = 0; | |
| 16418 var queryMap = {}; | |
| 16419 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 16420 parseBool(n) { | |
| 16421 if (n == "true") return true; | |
| 16422 if (n == "false") return false; | |
| 16423 if (n == null) return null; | |
| 16424 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 16425 } | |
| 16426 if (query.length > 0) { | |
| 16427 for (var part in query.split("&")) { | |
| 16428 var keyvalue = part.split("="); | |
| 16429 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 16430 } | |
| 16431 } | |
| 16432 unittest.expect(queryMap["advertiserId"].first, unittest.equals(arg_adve
rtiserId)); | |
| 16433 unittest.expect(queryMap["names"], unittest.equals(arg_names)); | |
| 16434 unittest.expect(queryMap["objectId"].first, unittest.equals(arg_objectId
)); | |
| 16435 unittest.expect(queryMap["objectType"].first, unittest.equals(arg_object
Type)); | |
| 16436 | |
| 16437 | |
| 16438 var h = { | |
| 16439 "content-type" : "application/json; charset=utf-8", | |
| 16440 }; | |
| 16441 var resp = convert.JSON.encode(buildDynamicTargetingKeysListResponse()); | |
| 16442 return new async.Future.value(stringResponse(200, h, resp)); | |
| 16443 }), true); | |
| 16444 res.list(arg_profileId, advertiserId: arg_advertiserId, names: arg_names,
objectId: arg_objectId, objectType: arg_objectType).then(unittest.expectAsync(((
api.DynamicTargetingKeysListResponse response) { | |
| 16445 checkDynamicTargetingKeysListResponse(response); | |
| 16446 }))); | |
| 16447 }); | |
| 16448 | |
| 16449 }); | |
| 16450 | |
| 16451 | |
| 16452 unittest.group("resource-EventTagsResourceApi", () { | |
| 16453 unittest.test("method--delete", () { | |
| 16454 | |
| 16455 var mock = new HttpServerMock(); | |
| 16456 api.EventTagsResourceApi res = new api.DfareportingApi(mock).eventTags; | |
| 16457 var arg_profileId = "foo"; | |
| 16458 var arg_id = "foo"; | |
| 16459 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 16460 var path = (req.url).path; | |
| 16461 var pathOffset = 0; | |
| 16462 var index; | |
| 16463 var subPart; | |
| 16464 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 16465 pathOffset += 1; | |
| 16466 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 16467 pathOffset += 18; | |
| 16468 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 16469 pathOffset += 13; | |
| 16470 index = path.indexOf("/eventTags/", pathOffset); | |
| 16471 unittest.expect(index >= 0, unittest.isTrue); | |
| 16472 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 16473 pathOffset = index; | |
| 16474 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 16475 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("/eventTags/")); | |
| 16476 pathOffset += 11; | |
| 16477 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 16478 pathOffset = path.length; | |
| 16479 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 16480 | |
| 16481 var query = (req.url).query; | |
| 16482 var queryOffset = 0; | |
| 16483 var queryMap = {}; | |
| 16484 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 16485 parseBool(n) { | |
| 16486 if (n == "true") return true; | |
| 16487 if (n == "false") return false; | |
| 16488 if (n == null) return null; | |
| 16489 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 16490 } | |
| 16491 if (query.length > 0) { | |
| 16492 for (var part in query.split("&")) { | |
| 16493 var keyvalue = part.split("="); | |
| 16494 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 16495 } | |
| 16496 } | |
| 16497 | |
| 16498 | |
| 16499 var h = { | |
| 16500 "content-type" : "application/json; charset=utf-8", | |
| 16501 }; | |
| 16502 var resp = ""; | |
| 16503 return new async.Future.value(stringResponse(200, h, resp)); | |
| 16504 }), true); | |
| 16505 res.delete(arg_profileId, arg_id).then(unittest.expectAsync((_) {})); | |
| 16506 }); | |
| 16507 | |
| 16508 unittest.test("method--get", () { | |
| 16509 | |
| 16510 var mock = new HttpServerMock(); | |
| 16511 api.EventTagsResourceApi res = new api.DfareportingApi(mock).eventTags; | |
| 16512 var arg_profileId = "foo"; | |
| 16513 var arg_id = "foo"; | |
| 16514 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 16515 var path = (req.url).path; | |
| 16516 var pathOffset = 0; | |
| 16517 var index; | |
| 16518 var subPart; | |
| 16519 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 16520 pathOffset += 1; | |
| 16521 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 16522 pathOffset += 18; | |
| 16523 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 16524 pathOffset += 13; | |
| 16525 index = path.indexOf("/eventTags/", pathOffset); | |
| 16526 unittest.expect(index >= 0, unittest.isTrue); | |
| 16527 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 16528 pathOffset = index; | |
| 16529 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 16530 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("/eventTags/")); | |
| 16531 pathOffset += 11; | |
| 16532 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 16533 pathOffset = path.length; | |
| 16534 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 16535 | |
| 16536 var query = (req.url).query; | |
| 16537 var queryOffset = 0; | |
| 16538 var queryMap = {}; | |
| 16539 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 16540 parseBool(n) { | |
| 16541 if (n == "true") return true; | |
| 16542 if (n == "false") return false; | |
| 16543 if (n == null) return null; | |
| 16544 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 16545 } | |
| 16546 if (query.length > 0) { | |
| 16547 for (var part in query.split("&")) { | |
| 16548 var keyvalue = part.split("="); | |
| 16549 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 16550 } | |
| 16551 } | |
| 16552 | |
| 16553 | |
| 16554 var h = { | |
| 16555 "content-type" : "application/json; charset=utf-8", | |
| 16556 }; | |
| 16557 var resp = convert.JSON.encode(buildEventTag()); | |
| 16558 return new async.Future.value(stringResponse(200, h, resp)); | |
| 16559 }), true); | |
| 16560 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.EventTag re
sponse) { | |
| 16561 checkEventTag(response); | |
| 16562 }))); | |
| 16563 }); | |
| 16564 | |
| 16565 unittest.test("method--insert", () { | |
| 16566 | |
| 16567 var mock = new HttpServerMock(); | |
| 16568 api.EventTagsResourceApi res = new api.DfareportingApi(mock).eventTags; | |
| 16569 var arg_request = buildEventTag(); | |
| 16570 var arg_profileId = "foo"; | |
| 16571 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 16572 var obj = new api.EventTag.fromJson(json); | |
| 16573 checkEventTag(obj); | |
| 16574 | |
| 16575 var path = (req.url).path; | |
| 16576 var pathOffset = 0; | |
| 16577 var index; | |
| 16578 var subPart; | |
| 16579 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 16580 pathOffset += 1; | |
| 16581 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 16582 pathOffset += 18; | |
| 16583 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 16584 pathOffset += 13; | |
| 16585 index = path.indexOf("/eventTags", pathOffset); | |
| 16586 unittest.expect(index >= 0, unittest.isTrue); | |
| 16587 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 16588 pathOffset = index; | |
| 16589 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 16590 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/eventTags")); | |
| 16591 pathOffset += 10; | |
| 16592 | |
| 16593 var query = (req.url).query; | |
| 16594 var queryOffset = 0; | |
| 16595 var queryMap = {}; | |
| 16596 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 16597 parseBool(n) { | |
| 16598 if (n == "true") return true; | |
| 16599 if (n == "false") return false; | |
| 16600 if (n == null) return null; | |
| 16601 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 16602 } | |
| 16603 if (query.length > 0) { | |
| 16604 for (var part in query.split("&")) { | |
| 16605 var keyvalue = part.split("="); | |
| 16606 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 16607 } | |
| 16608 } | |
| 16609 | |
| 16610 | |
| 16611 var h = { | |
| 16612 "content-type" : "application/json; charset=utf-8", | |
| 16613 }; | |
| 16614 var resp = convert.JSON.encode(buildEventTag()); | |
| 16615 return new async.Future.value(stringResponse(200, h, resp)); | |
| 16616 }), true); | |
| 16617 res.insert(arg_request, arg_profileId).then(unittest.expectAsync(((api.Eve
ntTag response) { | |
| 16618 checkEventTag(response); | |
| 16619 }))); | |
| 16620 }); | |
| 16621 | |
| 16622 unittest.test("method--list", () { | |
| 16623 | |
| 16624 var mock = new HttpServerMock(); | |
| 16625 api.EventTagsResourceApi res = new api.DfareportingApi(mock).eventTags; | |
| 16626 var arg_profileId = "foo"; | |
| 16627 var arg_adId = "foo"; | |
| 16628 var arg_advertiserId = "foo"; | |
| 16629 var arg_campaignId = "foo"; | |
| 16630 var arg_definitionsOnly = true; | |
| 16631 var arg_enabled = true; | |
| 16632 var arg_eventTagTypes = buildUnnamed1531(); | |
| 16633 var arg_ids = buildUnnamed1532(); | |
| 16634 var arg_searchString = "foo"; | |
| 16635 var arg_sortField = "foo"; | |
| 16636 var arg_sortOrder = "foo"; | |
| 16637 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 16638 var path = (req.url).path; | |
| 16639 var pathOffset = 0; | |
| 16640 var index; | |
| 16641 var subPart; | |
| 16642 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 16643 pathOffset += 1; | |
| 16644 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 16645 pathOffset += 18; | |
| 16646 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 16647 pathOffset += 13; | |
| 16648 index = path.indexOf("/eventTags", pathOffset); | |
| 16649 unittest.expect(index >= 0, unittest.isTrue); | |
| 16650 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 16651 pathOffset = index; | |
| 16652 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 16653 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/eventTags")); | |
| 16654 pathOffset += 10; | |
| 16655 | |
| 16656 var query = (req.url).query; | |
| 16657 var queryOffset = 0; | |
| 16658 var queryMap = {}; | |
| 16659 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 16660 parseBool(n) { | |
| 16661 if (n == "true") return true; | |
| 16662 if (n == "false") return false; | |
| 16663 if (n == null) return null; | |
| 16664 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 16665 } | |
| 16666 if (query.length > 0) { | |
| 16667 for (var part in query.split("&")) { | |
| 16668 var keyvalue = part.split("="); | |
| 16669 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 16670 } | |
| 16671 } | |
| 16672 unittest.expect(queryMap["adId"].first, unittest.equals(arg_adId)); | |
| 16673 unittest.expect(queryMap["advertiserId"].first, unittest.equals(arg_adve
rtiserId)); | |
| 16674 unittest.expect(queryMap["campaignId"].first, unittest.equals(arg_campai
gnId)); | |
| 16675 unittest.expect(queryMap["definitionsOnly"].first, unittest.equals("$arg
_definitionsOnly")); | |
| 16676 unittest.expect(queryMap["enabled"].first, unittest.equals("$arg_enabled
")); | |
| 16677 unittest.expect(queryMap["eventTagTypes"], unittest.equals(arg_eventTagT
ypes)); | |
| 16678 unittest.expect(queryMap["ids"], unittest.equals(arg_ids)); | |
| 16679 unittest.expect(queryMap["searchString"].first, unittest.equals(arg_sear
chString)); | |
| 16680 unittest.expect(queryMap["sortField"].first, unittest.equals(arg_sortFie
ld)); | |
| 16681 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | |
| 16682 | |
| 16683 | |
| 16684 var h = { | |
| 16685 "content-type" : "application/json; charset=utf-8", | |
| 16686 }; | |
| 16687 var resp = convert.JSON.encode(buildEventTagsListResponse()); | |
| 16688 return new async.Future.value(stringResponse(200, h, resp)); | |
| 16689 }), true); | |
| 16690 res.list(arg_profileId, adId: arg_adId, advertiserId: arg_advertiserId, ca
mpaignId: arg_campaignId, definitionsOnly: arg_definitionsOnly, enabled: arg_ena
bled, eventTagTypes: arg_eventTagTypes, ids: arg_ids, searchString: arg_searchSt
ring, sortField: arg_sortField, sortOrder: arg_sortOrder).then(unittest.expectAs
ync(((api.EventTagsListResponse response) { | |
| 16691 checkEventTagsListResponse(response); | |
| 16692 }))); | |
| 16693 }); | |
| 16694 | |
| 16695 unittest.test("method--patch", () { | |
| 16696 | |
| 16697 var mock = new HttpServerMock(); | |
| 16698 api.EventTagsResourceApi res = new api.DfareportingApi(mock).eventTags; | |
| 16699 var arg_request = buildEventTag(); | |
| 16700 var arg_profileId = "foo"; | |
| 16701 var arg_id = "foo"; | |
| 16702 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 16703 var obj = new api.EventTag.fromJson(json); | |
| 16704 checkEventTag(obj); | |
| 16705 | |
| 16706 var path = (req.url).path; | |
| 16707 var pathOffset = 0; | |
| 16708 var index; | |
| 16709 var subPart; | |
| 16710 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 16711 pathOffset += 1; | |
| 16712 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 16713 pathOffset += 18; | |
| 16714 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 16715 pathOffset += 13; | |
| 16716 index = path.indexOf("/eventTags", pathOffset); | |
| 16717 unittest.expect(index >= 0, unittest.isTrue); | |
| 16718 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 16719 pathOffset = index; | |
| 16720 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 16721 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/eventTags")); | |
| 16722 pathOffset += 10; | |
| 16723 | |
| 16724 var query = (req.url).query; | |
| 16725 var queryOffset = 0; | |
| 16726 var queryMap = {}; | |
| 16727 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 16728 parseBool(n) { | |
| 16729 if (n == "true") return true; | |
| 16730 if (n == "false") return false; | |
| 16731 if (n == null) return null; | |
| 16732 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 16733 } | |
| 16734 if (query.length > 0) { | |
| 16735 for (var part in query.split("&")) { | |
| 16736 var keyvalue = part.split("="); | |
| 16737 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 16738 } | |
| 16739 } | |
| 16740 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); | |
| 16741 | |
| 16742 | |
| 16743 var h = { | |
| 16744 "content-type" : "application/json; charset=utf-8", | |
| 16745 }; | |
| 16746 var resp = convert.JSON.encode(buildEventTag()); | |
| 16747 return new async.Future.value(stringResponse(200, h, resp)); | |
| 16748 }), true); | |
| 16749 res.patch(arg_request, arg_profileId, arg_id).then(unittest.expectAsync(((
api.EventTag response) { | |
| 16750 checkEventTag(response); | |
| 16751 }))); | |
| 16752 }); | |
| 16753 | |
| 16754 unittest.test("method--update", () { | |
| 16755 | |
| 16756 var mock = new HttpServerMock(); | |
| 16757 api.EventTagsResourceApi res = new api.DfareportingApi(mock).eventTags; | |
| 16758 var arg_request = buildEventTag(); | |
| 16759 var arg_profileId = "foo"; | |
| 16760 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 16761 var obj = new api.EventTag.fromJson(json); | |
| 16762 checkEventTag(obj); | |
| 16763 | |
| 16764 var path = (req.url).path; | |
| 16765 var pathOffset = 0; | |
| 16766 var index; | |
| 16767 var subPart; | |
| 16768 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 16769 pathOffset += 1; | |
| 16770 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 16771 pathOffset += 18; | |
| 16772 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 16773 pathOffset += 13; | |
| 16774 index = path.indexOf("/eventTags", pathOffset); | |
| 16775 unittest.expect(index >= 0, unittest.isTrue); | |
| 16776 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 16777 pathOffset = index; | |
| 16778 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 16779 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/eventTags")); | |
| 16780 pathOffset += 10; | |
| 16781 | |
| 16782 var query = (req.url).query; | |
| 16783 var queryOffset = 0; | |
| 16784 var queryMap = {}; | |
| 16785 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 16786 parseBool(n) { | |
| 16787 if (n == "true") return true; | |
| 16788 if (n == "false") return false; | |
| 16789 if (n == null) return null; | |
| 16790 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 16791 } | |
| 16792 if (query.length > 0) { | |
| 16793 for (var part in query.split("&")) { | |
| 16794 var keyvalue = part.split("="); | |
| 16795 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 16796 } | |
| 16797 } | |
| 16798 | |
| 16799 | |
| 16800 var h = { | |
| 16801 "content-type" : "application/json; charset=utf-8", | |
| 16802 }; | |
| 16803 var resp = convert.JSON.encode(buildEventTag()); | |
| 16804 return new async.Future.value(stringResponse(200, h, resp)); | |
| 16805 }), true); | |
| 16806 res.update(arg_request, arg_profileId).then(unittest.expectAsync(((api.Eve
ntTag response) { | |
| 16807 checkEventTag(response); | |
| 16808 }))); | |
| 16809 }); | |
| 16810 | |
| 16811 }); | |
| 16812 | |
| 16813 | |
| 16814 unittest.group("resource-FilesResourceApi", () { | |
| 16815 unittest.test("method--get", () { | |
| 16816 // TODO: Implement tests for media upload; | |
| 16817 // TODO: Implement tests for media download; | |
| 16818 | |
| 16819 var mock = new HttpServerMock(); | |
| 16820 api.FilesResourceApi res = new api.DfareportingApi(mock).files; | |
| 16821 var arg_reportId = "foo"; | |
| 16822 var arg_fileId = "foo"; | |
| 16823 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 16824 var path = (req.url).path; | |
| 16825 var pathOffset = 0; | |
| 16826 var index; | |
| 16827 var subPart; | |
| 16828 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 16829 pathOffset += 1; | |
| 16830 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 16831 pathOffset += 18; | |
| 16832 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("reports/")); | |
| 16833 pathOffset += 8; | |
| 16834 index = path.indexOf("/files/", pathOffset); | |
| 16835 unittest.expect(index >= 0, unittest.isTrue); | |
| 16836 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 16837 pathOffset = index; | |
| 16838 unittest.expect(subPart, unittest.equals("$arg_reportId")); | |
| 16839 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ
als("/files/")); | |
| 16840 pathOffset += 7; | |
| 16841 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 16842 pathOffset = path.length; | |
| 16843 unittest.expect(subPart, unittest.equals("$arg_fileId")); | |
| 16844 | |
| 16845 var query = (req.url).query; | |
| 16846 var queryOffset = 0; | |
| 16847 var queryMap = {}; | |
| 16848 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 16849 parseBool(n) { | |
| 16850 if (n == "true") return true; | |
| 16851 if (n == "false") return false; | |
| 16852 if (n == null) return null; | |
| 16853 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 16854 } | |
| 16855 if (query.length > 0) { | |
| 16856 for (var part in query.split("&")) { | |
| 16857 var keyvalue = part.split("="); | |
| 16858 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 16859 } | |
| 16860 } | |
| 16861 | |
| 16862 | |
| 16863 var h = { | |
| 16864 "content-type" : "application/json; charset=utf-8", | |
| 16865 }; | |
| 16866 var resp = convert.JSON.encode(buildFile()); | |
| 16867 return new async.Future.value(stringResponse(200, h, resp)); | |
| 16868 }), true); | |
| 16869 res.get(arg_reportId, arg_fileId).then(unittest.expectAsync(((api.File res
ponse) { | |
| 16870 checkFile(response); | |
| 16871 }))); | |
| 16872 }); | |
| 16873 | |
| 16874 unittest.test("method--list", () { | |
| 16875 | |
| 16876 var mock = new HttpServerMock(); | |
| 16877 api.FilesResourceApi res = new api.DfareportingApi(mock).files; | |
| 16878 var arg_profileId = "foo"; | |
| 16879 var arg_maxResults = 42; | |
| 16880 var arg_pageToken = "foo"; | |
| 16881 var arg_scope = "foo"; | |
| 16882 var arg_sortField = "foo"; | |
| 16883 var arg_sortOrder = "foo"; | |
| 16884 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 16885 var path = (req.url).path; | |
| 16886 var pathOffset = 0; | |
| 16887 var index; | |
| 16888 var subPart; | |
| 16889 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 16890 pathOffset += 1; | |
| 16891 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 16892 pathOffset += 18; | |
| 16893 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 16894 pathOffset += 13; | |
| 16895 index = path.indexOf("/files", pathOffset); | |
| 16896 unittest.expect(index >= 0, unittest.isTrue); | |
| 16897 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 16898 pathOffset = index; | |
| 16899 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 16900 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ
als("/files")); | |
| 16901 pathOffset += 6; | |
| 16902 | |
| 16903 var query = (req.url).query; | |
| 16904 var queryOffset = 0; | |
| 16905 var queryMap = {}; | |
| 16906 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 16907 parseBool(n) { | |
| 16908 if (n == "true") return true; | |
| 16909 if (n == "false") return false; | |
| 16910 if (n == null) return null; | |
| 16911 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 16912 } | |
| 16913 if (query.length > 0) { | |
| 16914 for (var part in query.split("&")) { | |
| 16915 var keyvalue = part.split("="); | |
| 16916 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 16917 } | |
| 16918 } | |
| 16919 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | |
| 16920 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 16921 unittest.expect(queryMap["scope"].first, unittest.equals(arg_scope)); | |
| 16922 unittest.expect(queryMap["sortField"].first, unittest.equals(arg_sortFie
ld)); | |
| 16923 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | |
| 16924 | |
| 16925 | |
| 16926 var h = { | |
| 16927 "content-type" : "application/json; charset=utf-8", | |
| 16928 }; | |
| 16929 var resp = convert.JSON.encode(buildFileList()); | |
| 16930 return new async.Future.value(stringResponse(200, h, resp)); | |
| 16931 }), true); | |
| 16932 res.list(arg_profileId, maxResults: arg_maxResults, pageToken: arg_pageTok
en, scope: arg_scope, sortField: arg_sortField, sortOrder: arg_sortOrder).then(u
nittest.expectAsync(((api.FileList response) { | |
| 16933 checkFileList(response); | |
| 16934 }))); | |
| 16935 }); | |
| 16936 | |
| 16937 }); | |
| 16938 | |
| 16939 | |
| 16940 unittest.group("resource-FloodlightActivitiesResourceApi", () { | |
| 16941 unittest.test("method--delete", () { | |
| 16942 | |
| 16943 var mock = new HttpServerMock(); | |
| 16944 api.FloodlightActivitiesResourceApi res = new api.DfareportingApi(mock).fl
oodlightActivities; | |
| 16945 var arg_profileId = "foo"; | |
| 16946 var arg_id = "foo"; | |
| 16947 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 16948 var path = (req.url).path; | |
| 16949 var pathOffset = 0; | |
| 16950 var index; | |
| 16951 var subPart; | |
| 16952 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 16953 pathOffset += 1; | |
| 16954 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 16955 pathOffset += 18; | |
| 16956 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 16957 pathOffset += 13; | |
| 16958 index = path.indexOf("/floodlightActivities/", pathOffset); | |
| 16959 unittest.expect(index >= 0, unittest.isTrue); | |
| 16960 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 16961 pathOffset = index; | |
| 16962 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 16963 unittest.expect(path.substring(pathOffset, pathOffset + 22), unittest.eq
uals("/floodlightActivities/")); | |
| 16964 pathOffset += 22; | |
| 16965 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 16966 pathOffset = path.length; | |
| 16967 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 16968 | |
| 16969 var query = (req.url).query; | |
| 16970 var queryOffset = 0; | |
| 16971 var queryMap = {}; | |
| 16972 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 16973 parseBool(n) { | |
| 16974 if (n == "true") return true; | |
| 16975 if (n == "false") return false; | |
| 16976 if (n == null) return null; | |
| 16977 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 16978 } | |
| 16979 if (query.length > 0) { | |
| 16980 for (var part in query.split("&")) { | |
| 16981 var keyvalue = part.split("="); | |
| 16982 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 16983 } | |
| 16984 } | |
| 16985 | |
| 16986 | |
| 16987 var h = { | |
| 16988 "content-type" : "application/json; charset=utf-8", | |
| 16989 }; | |
| 16990 var resp = ""; | |
| 16991 return new async.Future.value(stringResponse(200, h, resp)); | |
| 16992 }), true); | |
| 16993 res.delete(arg_profileId, arg_id).then(unittest.expectAsync((_) {})); | |
| 16994 }); | |
| 16995 | |
| 16996 unittest.test("method--generatetag", () { | |
| 16997 | |
| 16998 var mock = new HttpServerMock(); | |
| 16999 api.FloodlightActivitiesResourceApi res = new api.DfareportingApi(mock).fl
oodlightActivities; | |
| 17000 var arg_profileId = "foo"; | |
| 17001 var arg_floodlightActivityId = "foo"; | |
| 17002 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 17003 var path = (req.url).path; | |
| 17004 var pathOffset = 0; | |
| 17005 var index; | |
| 17006 var subPart; | |
| 17007 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 17008 pathOffset += 1; | |
| 17009 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 17010 pathOffset += 18; | |
| 17011 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 17012 pathOffset += 13; | |
| 17013 index = path.indexOf("/floodlightActivities/generatetag", pathOffset); | |
| 17014 unittest.expect(index >= 0, unittest.isTrue); | |
| 17015 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 17016 pathOffset = index; | |
| 17017 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 17018 unittest.expect(path.substring(pathOffset, pathOffset + 33), unittest.eq
uals("/floodlightActivities/generatetag")); | |
| 17019 pathOffset += 33; | |
| 17020 | |
| 17021 var query = (req.url).query; | |
| 17022 var queryOffset = 0; | |
| 17023 var queryMap = {}; | |
| 17024 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 17025 parseBool(n) { | |
| 17026 if (n == "true") return true; | |
| 17027 if (n == "false") return false; | |
| 17028 if (n == null) return null; | |
| 17029 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 17030 } | |
| 17031 if (query.length > 0) { | |
| 17032 for (var part in query.split("&")) { | |
| 17033 var keyvalue = part.split("="); | |
| 17034 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 17035 } | |
| 17036 } | |
| 17037 unittest.expect(queryMap["floodlightActivityId"].first, unittest.equals(
arg_floodlightActivityId)); | |
| 17038 | |
| 17039 | |
| 17040 var h = { | |
| 17041 "content-type" : "application/json; charset=utf-8", | |
| 17042 }; | |
| 17043 var resp = convert.JSON.encode(buildFloodlightActivitiesGenerateTagRespo
nse()); | |
| 17044 return new async.Future.value(stringResponse(200, h, resp)); | |
| 17045 }), true); | |
| 17046 res.generatetag(arg_profileId, floodlightActivityId: arg_floodlightActivit
yId).then(unittest.expectAsync(((api.FloodlightActivitiesGenerateTagResponse res
ponse) { | |
| 17047 checkFloodlightActivitiesGenerateTagResponse(response); | |
| 17048 }))); | |
| 17049 }); | |
| 17050 | |
| 17051 unittest.test("method--get", () { | |
| 17052 | |
| 17053 var mock = new HttpServerMock(); | |
| 17054 api.FloodlightActivitiesResourceApi res = new api.DfareportingApi(mock).fl
oodlightActivities; | |
| 17055 var arg_profileId = "foo"; | |
| 17056 var arg_id = "foo"; | |
| 17057 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 17058 var path = (req.url).path; | |
| 17059 var pathOffset = 0; | |
| 17060 var index; | |
| 17061 var subPart; | |
| 17062 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 17063 pathOffset += 1; | |
| 17064 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 17065 pathOffset += 18; | |
| 17066 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 17067 pathOffset += 13; | |
| 17068 index = path.indexOf("/floodlightActivities/", pathOffset); | |
| 17069 unittest.expect(index >= 0, unittest.isTrue); | |
| 17070 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 17071 pathOffset = index; | |
| 17072 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 17073 unittest.expect(path.substring(pathOffset, pathOffset + 22), unittest.eq
uals("/floodlightActivities/")); | |
| 17074 pathOffset += 22; | |
| 17075 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 17076 pathOffset = path.length; | |
| 17077 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 17078 | |
| 17079 var query = (req.url).query; | |
| 17080 var queryOffset = 0; | |
| 17081 var queryMap = {}; | |
| 17082 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 17083 parseBool(n) { | |
| 17084 if (n == "true") return true; | |
| 17085 if (n == "false") return false; | |
| 17086 if (n == null) return null; | |
| 17087 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 17088 } | |
| 17089 if (query.length > 0) { | |
| 17090 for (var part in query.split("&")) { | |
| 17091 var keyvalue = part.split("="); | |
| 17092 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 17093 } | |
| 17094 } | |
| 17095 | |
| 17096 | |
| 17097 var h = { | |
| 17098 "content-type" : "application/json; charset=utf-8", | |
| 17099 }; | |
| 17100 var resp = convert.JSON.encode(buildFloodlightActivity()); | |
| 17101 return new async.Future.value(stringResponse(200, h, resp)); | |
| 17102 }), true); | |
| 17103 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.FloodlightA
ctivity response) { | |
| 17104 checkFloodlightActivity(response); | |
| 17105 }))); | |
| 17106 }); | |
| 17107 | |
| 17108 unittest.test("method--insert", () { | |
| 17109 | |
| 17110 var mock = new HttpServerMock(); | |
| 17111 api.FloodlightActivitiesResourceApi res = new api.DfareportingApi(mock).fl
oodlightActivities; | |
| 17112 var arg_request = buildFloodlightActivity(); | |
| 17113 var arg_profileId = "foo"; | |
| 17114 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 17115 var obj = new api.FloodlightActivity.fromJson(json); | |
| 17116 checkFloodlightActivity(obj); | |
| 17117 | |
| 17118 var path = (req.url).path; | |
| 17119 var pathOffset = 0; | |
| 17120 var index; | |
| 17121 var subPart; | |
| 17122 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 17123 pathOffset += 1; | |
| 17124 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 17125 pathOffset += 18; | |
| 17126 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 17127 pathOffset += 13; | |
| 17128 index = path.indexOf("/floodlightActivities", pathOffset); | |
| 17129 unittest.expect(index >= 0, unittest.isTrue); | |
| 17130 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 17131 pathOffset = index; | |
| 17132 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 17133 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("/floodlightActivities")); | |
| 17134 pathOffset += 21; | |
| 17135 | |
| 17136 var query = (req.url).query; | |
| 17137 var queryOffset = 0; | |
| 17138 var queryMap = {}; | |
| 17139 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 17140 parseBool(n) { | |
| 17141 if (n == "true") return true; | |
| 17142 if (n == "false") return false; | |
| 17143 if (n == null) return null; | |
| 17144 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 17145 } | |
| 17146 if (query.length > 0) { | |
| 17147 for (var part in query.split("&")) { | |
| 17148 var keyvalue = part.split("="); | |
| 17149 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 17150 } | |
| 17151 } | |
| 17152 | |
| 17153 | |
| 17154 var h = { | |
| 17155 "content-type" : "application/json; charset=utf-8", | |
| 17156 }; | |
| 17157 var resp = convert.JSON.encode(buildFloodlightActivity()); | |
| 17158 return new async.Future.value(stringResponse(200, h, resp)); | |
| 17159 }), true); | |
| 17160 res.insert(arg_request, arg_profileId).then(unittest.expectAsync(((api.Flo
odlightActivity response) { | |
| 17161 checkFloodlightActivity(response); | |
| 17162 }))); | |
| 17163 }); | |
| 17164 | |
| 17165 unittest.test("method--list", () { | |
| 17166 | |
| 17167 var mock = new HttpServerMock(); | |
| 17168 api.FloodlightActivitiesResourceApi res = new api.DfareportingApi(mock).fl
oodlightActivities; | |
| 17169 var arg_profileId = "foo"; | |
| 17170 var arg_advertiserId = "foo"; | |
| 17171 var arg_floodlightActivityGroupIds = buildUnnamed1533(); | |
| 17172 var arg_floodlightActivityGroupName = "foo"; | |
| 17173 var arg_floodlightActivityGroupTagString = "foo"; | |
| 17174 var arg_floodlightActivityGroupType = "foo"; | |
| 17175 var arg_floodlightConfigurationId = "foo"; | |
| 17176 var arg_ids = buildUnnamed1534(); | |
| 17177 var arg_maxResults = 42; | |
| 17178 var arg_pageToken = "foo"; | |
| 17179 var arg_searchString = "foo"; | |
| 17180 var arg_sortField = "foo"; | |
| 17181 var arg_sortOrder = "foo"; | |
| 17182 var arg_tagString = "foo"; | |
| 17183 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 17184 var path = (req.url).path; | |
| 17185 var pathOffset = 0; | |
| 17186 var index; | |
| 17187 var subPart; | |
| 17188 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 17189 pathOffset += 1; | |
| 17190 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 17191 pathOffset += 18; | |
| 17192 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 17193 pathOffset += 13; | |
| 17194 index = path.indexOf("/floodlightActivities", pathOffset); | |
| 17195 unittest.expect(index >= 0, unittest.isTrue); | |
| 17196 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 17197 pathOffset = index; | |
| 17198 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 17199 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("/floodlightActivities")); | |
| 17200 pathOffset += 21; | |
| 17201 | |
| 17202 var query = (req.url).query; | |
| 17203 var queryOffset = 0; | |
| 17204 var queryMap = {}; | |
| 17205 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 17206 parseBool(n) { | |
| 17207 if (n == "true") return true; | |
| 17208 if (n == "false") return false; | |
| 17209 if (n == null) return null; | |
| 17210 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 17211 } | |
| 17212 if (query.length > 0) { | |
| 17213 for (var part in query.split("&")) { | |
| 17214 var keyvalue = part.split("="); | |
| 17215 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 17216 } | |
| 17217 } | |
| 17218 unittest.expect(queryMap["advertiserId"].first, unittest.equals(arg_adve
rtiserId)); | |
| 17219 unittest.expect(queryMap["floodlightActivityGroupIds"], unittest.equals(
arg_floodlightActivityGroupIds)); | |
| 17220 unittest.expect(queryMap["floodlightActivityGroupName"].first, unittest.
equals(arg_floodlightActivityGroupName)); | |
| 17221 unittest.expect(queryMap["floodlightActivityGroupTagString"].first, unit
test.equals(arg_floodlightActivityGroupTagString)); | |
| 17222 unittest.expect(queryMap["floodlightActivityGroupType"].first, unittest.
equals(arg_floodlightActivityGroupType)); | |
| 17223 unittest.expect(queryMap["floodlightConfigurationId"].first, unittest.eq
uals(arg_floodlightConfigurationId)); | |
| 17224 unittest.expect(queryMap["ids"], unittest.equals(arg_ids)); | |
| 17225 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | |
| 17226 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 17227 unittest.expect(queryMap["searchString"].first, unittest.equals(arg_sear
chString)); | |
| 17228 unittest.expect(queryMap["sortField"].first, unittest.equals(arg_sortFie
ld)); | |
| 17229 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | |
| 17230 unittest.expect(queryMap["tagString"].first, unittest.equals(arg_tagStri
ng)); | |
| 17231 | |
| 17232 | |
| 17233 var h = { | |
| 17234 "content-type" : "application/json; charset=utf-8", | |
| 17235 }; | |
| 17236 var resp = convert.JSON.encode(buildFloodlightActivitiesListResponse()); | |
| 17237 return new async.Future.value(stringResponse(200, h, resp)); | |
| 17238 }), true); | |
| 17239 res.list(arg_profileId, advertiserId: arg_advertiserId, floodlightActivity
GroupIds: arg_floodlightActivityGroupIds, floodlightActivityGroupName: arg_flood
lightActivityGroupName, floodlightActivityGroupTagString: arg_floodlightActivity
GroupTagString, floodlightActivityGroupType: arg_floodlightActivityGroupType, fl
oodlightConfigurationId: arg_floodlightConfigurationId, ids: arg_ids, maxResults
: arg_maxResults, pageToken: arg_pageToken, searchString: arg_searchString, sort
Field: arg_sortField, sortOrder: arg_sortOrder, tagString: arg_tagString).then(u
nittest.expectAsync(((api.FloodlightActivitiesListResponse response) { | |
| 17240 checkFloodlightActivitiesListResponse(response); | |
| 17241 }))); | |
| 17242 }); | |
| 17243 | |
| 17244 unittest.test("method--patch", () { | |
| 17245 | |
| 17246 var mock = new HttpServerMock(); | |
| 17247 api.FloodlightActivitiesResourceApi res = new api.DfareportingApi(mock).fl
oodlightActivities; | |
| 17248 var arg_request = buildFloodlightActivity(); | |
| 17249 var arg_profileId = "foo"; | |
| 17250 var arg_id = "foo"; | |
| 17251 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 17252 var obj = new api.FloodlightActivity.fromJson(json); | |
| 17253 checkFloodlightActivity(obj); | |
| 17254 | |
| 17255 var path = (req.url).path; | |
| 17256 var pathOffset = 0; | |
| 17257 var index; | |
| 17258 var subPart; | |
| 17259 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 17260 pathOffset += 1; | |
| 17261 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 17262 pathOffset += 18; | |
| 17263 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 17264 pathOffset += 13; | |
| 17265 index = path.indexOf("/floodlightActivities", pathOffset); | |
| 17266 unittest.expect(index >= 0, unittest.isTrue); | |
| 17267 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 17268 pathOffset = index; | |
| 17269 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 17270 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("/floodlightActivities")); | |
| 17271 pathOffset += 21; | |
| 17272 | |
| 17273 var query = (req.url).query; | |
| 17274 var queryOffset = 0; | |
| 17275 var queryMap = {}; | |
| 17276 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 17277 parseBool(n) { | |
| 17278 if (n == "true") return true; | |
| 17279 if (n == "false") return false; | |
| 17280 if (n == null) return null; | |
| 17281 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 17282 } | |
| 17283 if (query.length > 0) { | |
| 17284 for (var part in query.split("&")) { | |
| 17285 var keyvalue = part.split("="); | |
| 17286 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 17287 } | |
| 17288 } | |
| 17289 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); | |
| 17290 | |
| 17291 | |
| 17292 var h = { | |
| 17293 "content-type" : "application/json; charset=utf-8", | |
| 17294 }; | |
| 17295 var resp = convert.JSON.encode(buildFloodlightActivity()); | |
| 17296 return new async.Future.value(stringResponse(200, h, resp)); | |
| 17297 }), true); | |
| 17298 res.patch(arg_request, arg_profileId, arg_id).then(unittest.expectAsync(((
api.FloodlightActivity response) { | |
| 17299 checkFloodlightActivity(response); | |
| 17300 }))); | |
| 17301 }); | |
| 17302 | |
| 17303 unittest.test("method--update", () { | |
| 17304 | |
| 17305 var mock = new HttpServerMock(); | |
| 17306 api.FloodlightActivitiesResourceApi res = new api.DfareportingApi(mock).fl
oodlightActivities; | |
| 17307 var arg_request = buildFloodlightActivity(); | |
| 17308 var arg_profileId = "foo"; | |
| 17309 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 17310 var obj = new api.FloodlightActivity.fromJson(json); | |
| 17311 checkFloodlightActivity(obj); | |
| 17312 | |
| 17313 var path = (req.url).path; | |
| 17314 var pathOffset = 0; | |
| 17315 var index; | |
| 17316 var subPart; | |
| 17317 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 17318 pathOffset += 1; | |
| 17319 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 17320 pathOffset += 18; | |
| 17321 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 17322 pathOffset += 13; | |
| 17323 index = path.indexOf("/floodlightActivities", pathOffset); | |
| 17324 unittest.expect(index >= 0, unittest.isTrue); | |
| 17325 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 17326 pathOffset = index; | |
| 17327 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 17328 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("/floodlightActivities")); | |
| 17329 pathOffset += 21; | |
| 17330 | |
| 17331 var query = (req.url).query; | |
| 17332 var queryOffset = 0; | |
| 17333 var queryMap = {}; | |
| 17334 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 17335 parseBool(n) { | |
| 17336 if (n == "true") return true; | |
| 17337 if (n == "false") return false; | |
| 17338 if (n == null) return null; | |
| 17339 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 17340 } | |
| 17341 if (query.length > 0) { | |
| 17342 for (var part in query.split("&")) { | |
| 17343 var keyvalue = part.split("="); | |
| 17344 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 17345 } | |
| 17346 } | |
| 17347 | |
| 17348 | |
| 17349 var h = { | |
| 17350 "content-type" : "application/json; charset=utf-8", | |
| 17351 }; | |
| 17352 var resp = convert.JSON.encode(buildFloodlightActivity()); | |
| 17353 return new async.Future.value(stringResponse(200, h, resp)); | |
| 17354 }), true); | |
| 17355 res.update(arg_request, arg_profileId).then(unittest.expectAsync(((api.Flo
odlightActivity response) { | |
| 17356 checkFloodlightActivity(response); | |
| 17357 }))); | |
| 17358 }); | |
| 17359 | |
| 17360 }); | |
| 17361 | |
| 17362 | |
| 17363 unittest.group("resource-FloodlightActivityGroupsResourceApi", () { | |
| 17364 unittest.test("method--get", () { | |
| 17365 | |
| 17366 var mock = new HttpServerMock(); | |
| 17367 api.FloodlightActivityGroupsResourceApi res = new api.DfareportingApi(mock
).floodlightActivityGroups; | |
| 17368 var arg_profileId = "foo"; | |
| 17369 var arg_id = "foo"; | |
| 17370 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 17371 var path = (req.url).path; | |
| 17372 var pathOffset = 0; | |
| 17373 var index; | |
| 17374 var subPart; | |
| 17375 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 17376 pathOffset += 1; | |
| 17377 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 17378 pathOffset += 18; | |
| 17379 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 17380 pathOffset += 13; | |
| 17381 index = path.indexOf("/floodlightActivityGroups/", pathOffset); | |
| 17382 unittest.expect(index >= 0, unittest.isTrue); | |
| 17383 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 17384 pathOffset = index; | |
| 17385 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 17386 unittest.expect(path.substring(pathOffset, pathOffset + 26), unittest.eq
uals("/floodlightActivityGroups/")); | |
| 17387 pathOffset += 26; | |
| 17388 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 17389 pathOffset = path.length; | |
| 17390 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 17391 | |
| 17392 var query = (req.url).query; | |
| 17393 var queryOffset = 0; | |
| 17394 var queryMap = {}; | |
| 17395 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 17396 parseBool(n) { | |
| 17397 if (n == "true") return true; | |
| 17398 if (n == "false") return false; | |
| 17399 if (n == null) return null; | |
| 17400 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 17401 } | |
| 17402 if (query.length > 0) { | |
| 17403 for (var part in query.split("&")) { | |
| 17404 var keyvalue = part.split("="); | |
| 17405 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 17406 } | |
| 17407 } | |
| 17408 | |
| 17409 | |
| 17410 var h = { | |
| 17411 "content-type" : "application/json; charset=utf-8", | |
| 17412 }; | |
| 17413 var resp = convert.JSON.encode(buildFloodlightActivityGroup()); | |
| 17414 return new async.Future.value(stringResponse(200, h, resp)); | |
| 17415 }), true); | |
| 17416 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.FloodlightA
ctivityGroup response) { | |
| 17417 checkFloodlightActivityGroup(response); | |
| 17418 }))); | |
| 17419 }); | |
| 17420 | |
| 17421 unittest.test("method--insert", () { | |
| 17422 | |
| 17423 var mock = new HttpServerMock(); | |
| 17424 api.FloodlightActivityGroupsResourceApi res = new api.DfareportingApi(mock
).floodlightActivityGroups; | |
| 17425 var arg_request = buildFloodlightActivityGroup(); | |
| 17426 var arg_profileId = "foo"; | |
| 17427 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 17428 var obj = new api.FloodlightActivityGroup.fromJson(json); | |
| 17429 checkFloodlightActivityGroup(obj); | |
| 17430 | |
| 17431 var path = (req.url).path; | |
| 17432 var pathOffset = 0; | |
| 17433 var index; | |
| 17434 var subPart; | |
| 17435 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 17436 pathOffset += 1; | |
| 17437 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 17438 pathOffset += 18; | |
| 17439 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 17440 pathOffset += 13; | |
| 17441 index = path.indexOf("/floodlightActivityGroups", pathOffset); | |
| 17442 unittest.expect(index >= 0, unittest.isTrue); | |
| 17443 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 17444 pathOffset = index; | |
| 17445 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 17446 unittest.expect(path.substring(pathOffset, pathOffset + 25), unittest.eq
uals("/floodlightActivityGroups")); | |
| 17447 pathOffset += 25; | |
| 17448 | |
| 17449 var query = (req.url).query; | |
| 17450 var queryOffset = 0; | |
| 17451 var queryMap = {}; | |
| 17452 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 17453 parseBool(n) { | |
| 17454 if (n == "true") return true; | |
| 17455 if (n == "false") return false; | |
| 17456 if (n == null) return null; | |
| 17457 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 17458 } | |
| 17459 if (query.length > 0) { | |
| 17460 for (var part in query.split("&")) { | |
| 17461 var keyvalue = part.split("="); | |
| 17462 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 17463 } | |
| 17464 } | |
| 17465 | |
| 17466 | |
| 17467 var h = { | |
| 17468 "content-type" : "application/json; charset=utf-8", | |
| 17469 }; | |
| 17470 var resp = convert.JSON.encode(buildFloodlightActivityGroup()); | |
| 17471 return new async.Future.value(stringResponse(200, h, resp)); | |
| 17472 }), true); | |
| 17473 res.insert(arg_request, arg_profileId).then(unittest.expectAsync(((api.Flo
odlightActivityGroup response) { | |
| 17474 checkFloodlightActivityGroup(response); | |
| 17475 }))); | |
| 17476 }); | |
| 17477 | |
| 17478 unittest.test("method--list", () { | |
| 17479 | |
| 17480 var mock = new HttpServerMock(); | |
| 17481 api.FloodlightActivityGroupsResourceApi res = new api.DfareportingApi(mock
).floodlightActivityGroups; | |
| 17482 var arg_profileId = "foo"; | |
| 17483 var arg_advertiserId = "foo"; | |
| 17484 var arg_floodlightConfigurationId = "foo"; | |
| 17485 var arg_ids = buildUnnamed1535(); | |
| 17486 var arg_maxResults = 42; | |
| 17487 var arg_pageToken = "foo"; | |
| 17488 var arg_searchString = "foo"; | |
| 17489 var arg_sortField = "foo"; | |
| 17490 var arg_sortOrder = "foo"; | |
| 17491 var arg_type = "foo"; | |
| 17492 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 17493 var path = (req.url).path; | |
| 17494 var pathOffset = 0; | |
| 17495 var index; | |
| 17496 var subPart; | |
| 17497 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 17498 pathOffset += 1; | |
| 17499 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 17500 pathOffset += 18; | |
| 17501 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 17502 pathOffset += 13; | |
| 17503 index = path.indexOf("/floodlightActivityGroups", pathOffset); | |
| 17504 unittest.expect(index >= 0, unittest.isTrue); | |
| 17505 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 17506 pathOffset = index; | |
| 17507 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 17508 unittest.expect(path.substring(pathOffset, pathOffset + 25), unittest.eq
uals("/floodlightActivityGroups")); | |
| 17509 pathOffset += 25; | |
| 17510 | |
| 17511 var query = (req.url).query; | |
| 17512 var queryOffset = 0; | |
| 17513 var queryMap = {}; | |
| 17514 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 17515 parseBool(n) { | |
| 17516 if (n == "true") return true; | |
| 17517 if (n == "false") return false; | |
| 17518 if (n == null) return null; | |
| 17519 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 17520 } | |
| 17521 if (query.length > 0) { | |
| 17522 for (var part in query.split("&")) { | |
| 17523 var keyvalue = part.split("="); | |
| 17524 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 17525 } | |
| 17526 } | |
| 17527 unittest.expect(queryMap["advertiserId"].first, unittest.equals(arg_adve
rtiserId)); | |
| 17528 unittest.expect(queryMap["floodlightConfigurationId"].first, unittest.eq
uals(arg_floodlightConfigurationId)); | |
| 17529 unittest.expect(queryMap["ids"], unittest.equals(arg_ids)); | |
| 17530 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | |
| 17531 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 17532 unittest.expect(queryMap["searchString"].first, unittest.equals(arg_sear
chString)); | |
| 17533 unittest.expect(queryMap["sortField"].first, unittest.equals(arg_sortFie
ld)); | |
| 17534 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | |
| 17535 unittest.expect(queryMap["type"].first, unittest.equals(arg_type)); | |
| 17536 | |
| 17537 | |
| 17538 var h = { | |
| 17539 "content-type" : "application/json; charset=utf-8", | |
| 17540 }; | |
| 17541 var resp = convert.JSON.encode(buildFloodlightActivityGroupsListResponse
()); | |
| 17542 return new async.Future.value(stringResponse(200, h, resp)); | |
| 17543 }), true); | |
| 17544 res.list(arg_profileId, advertiserId: arg_advertiserId, floodlightConfigur
ationId: arg_floodlightConfigurationId, ids: arg_ids, maxResults: arg_maxResults
, pageToken: arg_pageToken, searchString: arg_searchString, sortField: arg_sortF
ield, sortOrder: arg_sortOrder, type: arg_type).then(unittest.expectAsync(((api.
FloodlightActivityGroupsListResponse response) { | |
| 17545 checkFloodlightActivityGroupsListResponse(response); | |
| 17546 }))); | |
| 17547 }); | |
| 17548 | |
| 17549 unittest.test("method--patch", () { | |
| 17550 | |
| 17551 var mock = new HttpServerMock(); | |
| 17552 api.FloodlightActivityGroupsResourceApi res = new api.DfareportingApi(mock
).floodlightActivityGroups; | |
| 17553 var arg_request = buildFloodlightActivityGroup(); | |
| 17554 var arg_profileId = "foo"; | |
| 17555 var arg_id = "foo"; | |
| 17556 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 17557 var obj = new api.FloodlightActivityGroup.fromJson(json); | |
| 17558 checkFloodlightActivityGroup(obj); | |
| 17559 | |
| 17560 var path = (req.url).path; | |
| 17561 var pathOffset = 0; | |
| 17562 var index; | |
| 17563 var subPart; | |
| 17564 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 17565 pathOffset += 1; | |
| 17566 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 17567 pathOffset += 18; | |
| 17568 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 17569 pathOffset += 13; | |
| 17570 index = path.indexOf("/floodlightActivityGroups", pathOffset); | |
| 17571 unittest.expect(index >= 0, unittest.isTrue); | |
| 17572 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 17573 pathOffset = index; | |
| 17574 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 17575 unittest.expect(path.substring(pathOffset, pathOffset + 25), unittest.eq
uals("/floodlightActivityGroups")); | |
| 17576 pathOffset += 25; | |
| 17577 | |
| 17578 var query = (req.url).query; | |
| 17579 var queryOffset = 0; | |
| 17580 var queryMap = {}; | |
| 17581 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 17582 parseBool(n) { | |
| 17583 if (n == "true") return true; | |
| 17584 if (n == "false") return false; | |
| 17585 if (n == null) return null; | |
| 17586 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 17587 } | |
| 17588 if (query.length > 0) { | |
| 17589 for (var part in query.split("&")) { | |
| 17590 var keyvalue = part.split("="); | |
| 17591 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 17592 } | |
| 17593 } | |
| 17594 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); | |
| 17595 | |
| 17596 | |
| 17597 var h = { | |
| 17598 "content-type" : "application/json; charset=utf-8", | |
| 17599 }; | |
| 17600 var resp = convert.JSON.encode(buildFloodlightActivityGroup()); | |
| 17601 return new async.Future.value(stringResponse(200, h, resp)); | |
| 17602 }), true); | |
| 17603 res.patch(arg_request, arg_profileId, arg_id).then(unittest.expectAsync(((
api.FloodlightActivityGroup response) { | |
| 17604 checkFloodlightActivityGroup(response); | |
| 17605 }))); | |
| 17606 }); | |
| 17607 | |
| 17608 unittest.test("method--update", () { | |
| 17609 | |
| 17610 var mock = new HttpServerMock(); | |
| 17611 api.FloodlightActivityGroupsResourceApi res = new api.DfareportingApi(mock
).floodlightActivityGroups; | |
| 17612 var arg_request = buildFloodlightActivityGroup(); | |
| 17613 var arg_profileId = "foo"; | |
| 17614 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 17615 var obj = new api.FloodlightActivityGroup.fromJson(json); | |
| 17616 checkFloodlightActivityGroup(obj); | |
| 17617 | |
| 17618 var path = (req.url).path; | |
| 17619 var pathOffset = 0; | |
| 17620 var index; | |
| 17621 var subPart; | |
| 17622 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 17623 pathOffset += 1; | |
| 17624 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 17625 pathOffset += 18; | |
| 17626 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 17627 pathOffset += 13; | |
| 17628 index = path.indexOf("/floodlightActivityGroups", pathOffset); | |
| 17629 unittest.expect(index >= 0, unittest.isTrue); | |
| 17630 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 17631 pathOffset = index; | |
| 17632 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 17633 unittest.expect(path.substring(pathOffset, pathOffset + 25), unittest.eq
uals("/floodlightActivityGroups")); | |
| 17634 pathOffset += 25; | |
| 17635 | |
| 17636 var query = (req.url).query; | |
| 17637 var queryOffset = 0; | |
| 17638 var queryMap = {}; | |
| 17639 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 17640 parseBool(n) { | |
| 17641 if (n == "true") return true; | |
| 17642 if (n == "false") return false; | |
| 17643 if (n == null) return null; | |
| 17644 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 17645 } | |
| 17646 if (query.length > 0) { | |
| 17647 for (var part in query.split("&")) { | |
| 17648 var keyvalue = part.split("="); | |
| 17649 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 17650 } | |
| 17651 } | |
| 17652 | |
| 17653 | |
| 17654 var h = { | |
| 17655 "content-type" : "application/json; charset=utf-8", | |
| 17656 }; | |
| 17657 var resp = convert.JSON.encode(buildFloodlightActivityGroup()); | |
| 17658 return new async.Future.value(stringResponse(200, h, resp)); | |
| 17659 }), true); | |
| 17660 res.update(arg_request, arg_profileId).then(unittest.expectAsync(((api.Flo
odlightActivityGroup response) { | |
| 17661 checkFloodlightActivityGroup(response); | |
| 17662 }))); | |
| 17663 }); | |
| 17664 | |
| 17665 }); | |
| 17666 | |
| 17667 | |
| 17668 unittest.group("resource-FloodlightConfigurationsResourceApi", () { | |
| 17669 unittest.test("method--get", () { | |
| 17670 | |
| 17671 var mock = new HttpServerMock(); | |
| 17672 api.FloodlightConfigurationsResourceApi res = new api.DfareportingApi(mock
).floodlightConfigurations; | |
| 17673 var arg_profileId = "foo"; | |
| 17674 var arg_id = "foo"; | |
| 17675 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 17676 var path = (req.url).path; | |
| 17677 var pathOffset = 0; | |
| 17678 var index; | |
| 17679 var subPart; | |
| 17680 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 17681 pathOffset += 1; | |
| 17682 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 17683 pathOffset += 18; | |
| 17684 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 17685 pathOffset += 13; | |
| 17686 index = path.indexOf("/floodlightConfigurations/", pathOffset); | |
| 17687 unittest.expect(index >= 0, unittest.isTrue); | |
| 17688 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 17689 pathOffset = index; | |
| 17690 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 17691 unittest.expect(path.substring(pathOffset, pathOffset + 26), unittest.eq
uals("/floodlightConfigurations/")); | |
| 17692 pathOffset += 26; | |
| 17693 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 17694 pathOffset = path.length; | |
| 17695 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 17696 | |
| 17697 var query = (req.url).query; | |
| 17698 var queryOffset = 0; | |
| 17699 var queryMap = {}; | |
| 17700 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 17701 parseBool(n) { | |
| 17702 if (n == "true") return true; | |
| 17703 if (n == "false") return false; | |
| 17704 if (n == null) return null; | |
| 17705 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 17706 } | |
| 17707 if (query.length > 0) { | |
| 17708 for (var part in query.split("&")) { | |
| 17709 var keyvalue = part.split("="); | |
| 17710 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 17711 } | |
| 17712 } | |
| 17713 | |
| 17714 | |
| 17715 var h = { | |
| 17716 "content-type" : "application/json; charset=utf-8", | |
| 17717 }; | |
| 17718 var resp = convert.JSON.encode(buildFloodlightConfiguration()); | |
| 17719 return new async.Future.value(stringResponse(200, h, resp)); | |
| 17720 }), true); | |
| 17721 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.FloodlightC
onfiguration response) { | |
| 17722 checkFloodlightConfiguration(response); | |
| 17723 }))); | |
| 17724 }); | |
| 17725 | |
| 17726 unittest.test("method--list", () { | |
| 17727 | |
| 17728 var mock = new HttpServerMock(); | |
| 17729 api.FloodlightConfigurationsResourceApi res = new api.DfareportingApi(mock
).floodlightConfigurations; | |
| 17730 var arg_profileId = "foo"; | |
| 17731 var arg_ids = buildUnnamed1536(); | |
| 17732 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 17733 var path = (req.url).path; | |
| 17734 var pathOffset = 0; | |
| 17735 var index; | |
| 17736 var subPart; | |
| 17737 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 17738 pathOffset += 1; | |
| 17739 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 17740 pathOffset += 18; | |
| 17741 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 17742 pathOffset += 13; | |
| 17743 index = path.indexOf("/floodlightConfigurations", pathOffset); | |
| 17744 unittest.expect(index >= 0, unittest.isTrue); | |
| 17745 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 17746 pathOffset = index; | |
| 17747 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 17748 unittest.expect(path.substring(pathOffset, pathOffset + 25), unittest.eq
uals("/floodlightConfigurations")); | |
| 17749 pathOffset += 25; | |
| 17750 | |
| 17751 var query = (req.url).query; | |
| 17752 var queryOffset = 0; | |
| 17753 var queryMap = {}; | |
| 17754 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 17755 parseBool(n) { | |
| 17756 if (n == "true") return true; | |
| 17757 if (n == "false") return false; | |
| 17758 if (n == null) return null; | |
| 17759 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 17760 } | |
| 17761 if (query.length > 0) { | |
| 17762 for (var part in query.split("&")) { | |
| 17763 var keyvalue = part.split("="); | |
| 17764 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 17765 } | |
| 17766 } | |
| 17767 unittest.expect(queryMap["ids"], unittest.equals(arg_ids)); | |
| 17768 | |
| 17769 | |
| 17770 var h = { | |
| 17771 "content-type" : "application/json; charset=utf-8", | |
| 17772 }; | |
| 17773 var resp = convert.JSON.encode(buildFloodlightConfigurationsListResponse
()); | |
| 17774 return new async.Future.value(stringResponse(200, h, resp)); | |
| 17775 }), true); | |
| 17776 res.list(arg_profileId, ids: arg_ids).then(unittest.expectAsync(((api.Floo
dlightConfigurationsListResponse response) { | |
| 17777 checkFloodlightConfigurationsListResponse(response); | |
| 17778 }))); | |
| 17779 }); | |
| 17780 | |
| 17781 unittest.test("method--patch", () { | |
| 17782 | |
| 17783 var mock = new HttpServerMock(); | |
| 17784 api.FloodlightConfigurationsResourceApi res = new api.DfareportingApi(mock
).floodlightConfigurations; | |
| 17785 var arg_request = buildFloodlightConfiguration(); | |
| 17786 var arg_profileId = "foo"; | |
| 17787 var arg_id = "foo"; | |
| 17788 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 17789 var obj = new api.FloodlightConfiguration.fromJson(json); | |
| 17790 checkFloodlightConfiguration(obj); | |
| 17791 | |
| 17792 var path = (req.url).path; | |
| 17793 var pathOffset = 0; | |
| 17794 var index; | |
| 17795 var subPart; | |
| 17796 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 17797 pathOffset += 1; | |
| 17798 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 17799 pathOffset += 18; | |
| 17800 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 17801 pathOffset += 13; | |
| 17802 index = path.indexOf("/floodlightConfigurations", pathOffset); | |
| 17803 unittest.expect(index >= 0, unittest.isTrue); | |
| 17804 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 17805 pathOffset = index; | |
| 17806 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 17807 unittest.expect(path.substring(pathOffset, pathOffset + 25), unittest.eq
uals("/floodlightConfigurations")); | |
| 17808 pathOffset += 25; | |
| 17809 | |
| 17810 var query = (req.url).query; | |
| 17811 var queryOffset = 0; | |
| 17812 var queryMap = {}; | |
| 17813 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 17814 parseBool(n) { | |
| 17815 if (n == "true") return true; | |
| 17816 if (n == "false") return false; | |
| 17817 if (n == null) return null; | |
| 17818 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 17819 } | |
| 17820 if (query.length > 0) { | |
| 17821 for (var part in query.split("&")) { | |
| 17822 var keyvalue = part.split("="); | |
| 17823 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 17824 } | |
| 17825 } | |
| 17826 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); | |
| 17827 | |
| 17828 | |
| 17829 var h = { | |
| 17830 "content-type" : "application/json; charset=utf-8", | |
| 17831 }; | |
| 17832 var resp = convert.JSON.encode(buildFloodlightConfiguration()); | |
| 17833 return new async.Future.value(stringResponse(200, h, resp)); | |
| 17834 }), true); | |
| 17835 res.patch(arg_request, arg_profileId, arg_id).then(unittest.expectAsync(((
api.FloodlightConfiguration response) { | |
| 17836 checkFloodlightConfiguration(response); | |
| 17837 }))); | |
| 17838 }); | |
| 17839 | |
| 17840 unittest.test("method--update", () { | |
| 17841 | |
| 17842 var mock = new HttpServerMock(); | |
| 17843 api.FloodlightConfigurationsResourceApi res = new api.DfareportingApi(mock
).floodlightConfigurations; | |
| 17844 var arg_request = buildFloodlightConfiguration(); | |
| 17845 var arg_profileId = "foo"; | |
| 17846 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 17847 var obj = new api.FloodlightConfiguration.fromJson(json); | |
| 17848 checkFloodlightConfiguration(obj); | |
| 17849 | |
| 17850 var path = (req.url).path; | |
| 17851 var pathOffset = 0; | |
| 17852 var index; | |
| 17853 var subPart; | |
| 17854 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 17855 pathOffset += 1; | |
| 17856 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 17857 pathOffset += 18; | |
| 17858 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 17859 pathOffset += 13; | |
| 17860 index = path.indexOf("/floodlightConfigurations", pathOffset); | |
| 17861 unittest.expect(index >= 0, unittest.isTrue); | |
| 17862 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 17863 pathOffset = index; | |
| 17864 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 17865 unittest.expect(path.substring(pathOffset, pathOffset + 25), unittest.eq
uals("/floodlightConfigurations")); | |
| 17866 pathOffset += 25; | |
| 17867 | |
| 17868 var query = (req.url).query; | |
| 17869 var queryOffset = 0; | |
| 17870 var queryMap = {}; | |
| 17871 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 17872 parseBool(n) { | |
| 17873 if (n == "true") return true; | |
| 17874 if (n == "false") return false; | |
| 17875 if (n == null) return null; | |
| 17876 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 17877 } | |
| 17878 if (query.length > 0) { | |
| 17879 for (var part in query.split("&")) { | |
| 17880 var keyvalue = part.split("="); | |
| 17881 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 17882 } | |
| 17883 } | |
| 17884 | |
| 17885 | |
| 17886 var h = { | |
| 17887 "content-type" : "application/json; charset=utf-8", | |
| 17888 }; | |
| 17889 var resp = convert.JSON.encode(buildFloodlightConfiguration()); | |
| 17890 return new async.Future.value(stringResponse(200, h, resp)); | |
| 17891 }), true); | |
| 17892 res.update(arg_request, arg_profileId).then(unittest.expectAsync(((api.Flo
odlightConfiguration response) { | |
| 17893 checkFloodlightConfiguration(response); | |
| 17894 }))); | |
| 17895 }); | |
| 17896 | |
| 17897 }); | |
| 17898 | |
| 17899 | |
| 17900 unittest.group("resource-InventoryItemsResourceApi", () { | |
| 17901 unittest.test("method--get", () { | |
| 17902 | |
| 17903 var mock = new HttpServerMock(); | |
| 17904 api.InventoryItemsResourceApi res = new api.DfareportingApi(mock).inventor
yItems; | |
| 17905 var arg_profileId = "foo"; | |
| 17906 var arg_projectId = "foo"; | |
| 17907 var arg_id = "foo"; | |
| 17908 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 17909 var path = (req.url).path; | |
| 17910 var pathOffset = 0; | |
| 17911 var index; | |
| 17912 var subPart; | |
| 17913 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 17914 pathOffset += 1; | |
| 17915 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 17916 pathOffset += 18; | |
| 17917 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 17918 pathOffset += 13; | |
| 17919 index = path.indexOf("/projects/", pathOffset); | |
| 17920 unittest.expect(index >= 0, unittest.isTrue); | |
| 17921 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 17922 pathOffset = index; | |
| 17923 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 17924 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/projects/")); | |
| 17925 pathOffset += 10; | |
| 17926 index = path.indexOf("/inventoryItems/", pathOffset); | |
| 17927 unittest.expect(index >= 0, unittest.isTrue); | |
| 17928 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 17929 pathOffset = index; | |
| 17930 unittest.expect(subPart, unittest.equals("$arg_projectId")); | |
| 17931 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq
uals("/inventoryItems/")); | |
| 17932 pathOffset += 16; | |
| 17933 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 17934 pathOffset = path.length; | |
| 17935 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 17936 | |
| 17937 var query = (req.url).query; | |
| 17938 var queryOffset = 0; | |
| 17939 var queryMap = {}; | |
| 17940 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 17941 parseBool(n) { | |
| 17942 if (n == "true") return true; | |
| 17943 if (n == "false") return false; | |
| 17944 if (n == null) return null; | |
| 17945 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 17946 } | |
| 17947 if (query.length > 0) { | |
| 17948 for (var part in query.split("&")) { | |
| 17949 var keyvalue = part.split("="); | |
| 17950 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 17951 } | |
| 17952 } | |
| 17953 | |
| 17954 | |
| 17955 var h = { | |
| 17956 "content-type" : "application/json; charset=utf-8", | |
| 17957 }; | |
| 17958 var resp = convert.JSON.encode(buildInventoryItem()); | |
| 17959 return new async.Future.value(stringResponse(200, h, resp)); | |
| 17960 }), true); | |
| 17961 res.get(arg_profileId, arg_projectId, arg_id).then(unittest.expectAsync(((
api.InventoryItem response) { | |
| 17962 checkInventoryItem(response); | |
| 17963 }))); | |
| 17964 }); | |
| 17965 | |
| 17966 unittest.test("method--list", () { | |
| 17967 | |
| 17968 var mock = new HttpServerMock(); | |
| 17969 api.InventoryItemsResourceApi res = new api.DfareportingApi(mock).inventor
yItems; | |
| 17970 var arg_profileId = "foo"; | |
| 17971 var arg_projectId = "foo"; | |
| 17972 var arg_ids = buildUnnamed1537(); | |
| 17973 var arg_inPlan = true; | |
| 17974 var arg_maxResults = 42; | |
| 17975 var arg_orderId = buildUnnamed1538(); | |
| 17976 var arg_pageToken = "foo"; | |
| 17977 var arg_siteId = buildUnnamed1539(); | |
| 17978 var arg_sortField = "foo"; | |
| 17979 var arg_sortOrder = "foo"; | |
| 17980 var arg_type = "foo"; | |
| 17981 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 17982 var path = (req.url).path; | |
| 17983 var pathOffset = 0; | |
| 17984 var index; | |
| 17985 var subPart; | |
| 17986 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 17987 pathOffset += 1; | |
| 17988 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 17989 pathOffset += 18; | |
| 17990 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 17991 pathOffset += 13; | |
| 17992 index = path.indexOf("/projects/", pathOffset); | |
| 17993 unittest.expect(index >= 0, unittest.isTrue); | |
| 17994 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 17995 pathOffset = index; | |
| 17996 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 17997 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/projects/")); | |
| 17998 pathOffset += 10; | |
| 17999 index = path.indexOf("/inventoryItems", pathOffset); | |
| 18000 unittest.expect(index >= 0, unittest.isTrue); | |
| 18001 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 18002 pathOffset = index; | |
| 18003 unittest.expect(subPart, unittest.equals("$arg_projectId")); | |
| 18004 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/inventoryItems")); | |
| 18005 pathOffset += 15; | |
| 18006 | |
| 18007 var query = (req.url).query; | |
| 18008 var queryOffset = 0; | |
| 18009 var queryMap = {}; | |
| 18010 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 18011 parseBool(n) { | |
| 18012 if (n == "true") return true; | |
| 18013 if (n == "false") return false; | |
| 18014 if (n == null) return null; | |
| 18015 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 18016 } | |
| 18017 if (query.length > 0) { | |
| 18018 for (var part in query.split("&")) { | |
| 18019 var keyvalue = part.split("="); | |
| 18020 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 18021 } | |
| 18022 } | |
| 18023 unittest.expect(queryMap["ids"], unittest.equals(arg_ids)); | |
| 18024 unittest.expect(queryMap["inPlan"].first, unittest.equals("$arg_inPlan")
); | |
| 18025 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | |
| 18026 unittest.expect(queryMap["orderId"], unittest.equals(arg_orderId)); | |
| 18027 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 18028 unittest.expect(queryMap["siteId"], unittest.equals(arg_siteId)); | |
| 18029 unittest.expect(queryMap["sortField"].first, unittest.equals(arg_sortFie
ld)); | |
| 18030 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | |
| 18031 unittest.expect(queryMap["type"].first, unittest.equals(arg_type)); | |
| 18032 | |
| 18033 | |
| 18034 var h = { | |
| 18035 "content-type" : "application/json; charset=utf-8", | |
| 18036 }; | |
| 18037 var resp = convert.JSON.encode(buildInventoryItemsListResponse()); | |
| 18038 return new async.Future.value(stringResponse(200, h, resp)); | |
| 18039 }), true); | |
| 18040 res.list(arg_profileId, arg_projectId, ids: arg_ids, inPlan: arg_inPlan, m
axResults: arg_maxResults, orderId: arg_orderId, pageToken: arg_pageToken, siteI
d: arg_siteId, sortField: arg_sortField, sortOrder: arg_sortOrder, type: arg_typ
e).then(unittest.expectAsync(((api.InventoryItemsListResponse response) { | |
| 18041 checkInventoryItemsListResponse(response); | |
| 18042 }))); | |
| 18043 }); | |
| 18044 | |
| 18045 }); | |
| 18046 | |
| 18047 | |
| 18048 unittest.group("resource-LandingPagesResourceApi", () { | |
| 18049 unittest.test("method--delete", () { | |
| 18050 | |
| 18051 var mock = new HttpServerMock(); | |
| 18052 api.LandingPagesResourceApi res = new api.DfareportingApi(mock).landingPag
es; | |
| 18053 var arg_profileId = "foo"; | |
| 18054 var arg_campaignId = "foo"; | |
| 18055 var arg_id = "foo"; | |
| 18056 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 18057 var path = (req.url).path; | |
| 18058 var pathOffset = 0; | |
| 18059 var index; | |
| 18060 var subPart; | |
| 18061 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 18062 pathOffset += 1; | |
| 18063 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 18064 pathOffset += 18; | |
| 18065 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 18066 pathOffset += 13; | |
| 18067 index = path.indexOf("/campaigns/", pathOffset); | |
| 18068 unittest.expect(index >= 0, unittest.isTrue); | |
| 18069 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 18070 pathOffset = index; | |
| 18071 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 18072 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("/campaigns/")); | |
| 18073 pathOffset += 11; | |
| 18074 index = path.indexOf("/landingPages/", pathOffset); | |
| 18075 unittest.expect(index >= 0, unittest.isTrue); | |
| 18076 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 18077 pathOffset = index; | |
| 18078 unittest.expect(subPart, unittest.equals("$arg_campaignId")); | |
| 18079 unittest.expect(path.substring(pathOffset, pathOffset + 14), unittest.eq
uals("/landingPages/")); | |
| 18080 pathOffset += 14; | |
| 18081 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 18082 pathOffset = path.length; | |
| 18083 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 18084 | |
| 18085 var query = (req.url).query; | |
| 18086 var queryOffset = 0; | |
| 18087 var queryMap = {}; | |
| 18088 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 18089 parseBool(n) { | |
| 18090 if (n == "true") return true; | |
| 18091 if (n == "false") return false; | |
| 18092 if (n == null) return null; | |
| 18093 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 18094 } | |
| 18095 if (query.length > 0) { | |
| 18096 for (var part in query.split("&")) { | |
| 18097 var keyvalue = part.split("="); | |
| 18098 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 18099 } | |
| 18100 } | |
| 18101 | |
| 18102 | |
| 18103 var h = { | |
| 18104 "content-type" : "application/json; charset=utf-8", | |
| 18105 }; | |
| 18106 var resp = ""; | |
| 18107 return new async.Future.value(stringResponse(200, h, resp)); | |
| 18108 }), true); | |
| 18109 res.delete(arg_profileId, arg_campaignId, arg_id).then(unittest.expectAsyn
c((_) {})); | |
| 18110 }); | |
| 18111 | |
| 18112 unittest.test("method--get", () { | |
| 18113 | |
| 18114 var mock = new HttpServerMock(); | |
| 18115 api.LandingPagesResourceApi res = new api.DfareportingApi(mock).landingPag
es; | |
| 18116 var arg_profileId = "foo"; | |
| 18117 var arg_campaignId = "foo"; | |
| 18118 var arg_id = "foo"; | |
| 18119 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 18120 var path = (req.url).path; | |
| 18121 var pathOffset = 0; | |
| 18122 var index; | |
| 18123 var subPart; | |
| 18124 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 18125 pathOffset += 1; | |
| 18126 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 18127 pathOffset += 18; | |
| 18128 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 18129 pathOffset += 13; | |
| 18130 index = path.indexOf("/campaigns/", pathOffset); | |
| 18131 unittest.expect(index >= 0, unittest.isTrue); | |
| 18132 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 18133 pathOffset = index; | |
| 18134 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 18135 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("/campaigns/")); | |
| 18136 pathOffset += 11; | |
| 18137 index = path.indexOf("/landingPages/", pathOffset); | |
| 18138 unittest.expect(index >= 0, unittest.isTrue); | |
| 18139 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 18140 pathOffset = index; | |
| 18141 unittest.expect(subPart, unittest.equals("$arg_campaignId")); | |
| 18142 unittest.expect(path.substring(pathOffset, pathOffset + 14), unittest.eq
uals("/landingPages/")); | |
| 18143 pathOffset += 14; | |
| 18144 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 18145 pathOffset = path.length; | |
| 18146 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 18147 | |
| 18148 var query = (req.url).query; | |
| 18149 var queryOffset = 0; | |
| 18150 var queryMap = {}; | |
| 18151 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 18152 parseBool(n) { | |
| 18153 if (n == "true") return true; | |
| 18154 if (n == "false") return false; | |
| 18155 if (n == null) return null; | |
| 18156 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 18157 } | |
| 18158 if (query.length > 0) { | |
| 18159 for (var part in query.split("&")) { | |
| 18160 var keyvalue = part.split("="); | |
| 18161 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 18162 } | |
| 18163 } | |
| 18164 | |
| 18165 | |
| 18166 var h = { | |
| 18167 "content-type" : "application/json; charset=utf-8", | |
| 18168 }; | |
| 18169 var resp = convert.JSON.encode(buildLandingPage()); | |
| 18170 return new async.Future.value(stringResponse(200, h, resp)); | |
| 18171 }), true); | |
| 18172 res.get(arg_profileId, arg_campaignId, arg_id).then(unittest.expectAsync((
(api.LandingPage response) { | |
| 18173 checkLandingPage(response); | |
| 18174 }))); | |
| 18175 }); | |
| 18176 | |
| 18177 unittest.test("method--insert", () { | |
| 18178 | |
| 18179 var mock = new HttpServerMock(); | |
| 18180 api.LandingPagesResourceApi res = new api.DfareportingApi(mock).landingPag
es; | |
| 18181 var arg_request = buildLandingPage(); | |
| 18182 var arg_profileId = "foo"; | |
| 18183 var arg_campaignId = "foo"; | |
| 18184 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 18185 var obj = new api.LandingPage.fromJson(json); | |
| 18186 checkLandingPage(obj); | |
| 18187 | |
| 18188 var path = (req.url).path; | |
| 18189 var pathOffset = 0; | |
| 18190 var index; | |
| 18191 var subPart; | |
| 18192 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 18193 pathOffset += 1; | |
| 18194 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 18195 pathOffset += 18; | |
| 18196 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 18197 pathOffset += 13; | |
| 18198 index = path.indexOf("/campaigns/", pathOffset); | |
| 18199 unittest.expect(index >= 0, unittest.isTrue); | |
| 18200 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 18201 pathOffset = index; | |
| 18202 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 18203 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("/campaigns/")); | |
| 18204 pathOffset += 11; | |
| 18205 index = path.indexOf("/landingPages", pathOffset); | |
| 18206 unittest.expect(index >= 0, unittest.isTrue); | |
| 18207 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 18208 pathOffset = index; | |
| 18209 unittest.expect(subPart, unittest.equals("$arg_campaignId")); | |
| 18210 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("/landingPages")); | |
| 18211 pathOffset += 13; | |
| 18212 | |
| 18213 var query = (req.url).query; | |
| 18214 var queryOffset = 0; | |
| 18215 var queryMap = {}; | |
| 18216 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 18217 parseBool(n) { | |
| 18218 if (n == "true") return true; | |
| 18219 if (n == "false") return false; | |
| 18220 if (n == null) return null; | |
| 18221 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 18222 } | |
| 18223 if (query.length > 0) { | |
| 18224 for (var part in query.split("&")) { | |
| 18225 var keyvalue = part.split("="); | |
| 18226 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 18227 } | |
| 18228 } | |
| 18229 | |
| 18230 | |
| 18231 var h = { | |
| 18232 "content-type" : "application/json; charset=utf-8", | |
| 18233 }; | |
| 18234 var resp = convert.JSON.encode(buildLandingPage()); | |
| 18235 return new async.Future.value(stringResponse(200, h, resp)); | |
| 18236 }), true); | |
| 18237 res.insert(arg_request, arg_profileId, arg_campaignId).then(unittest.expec
tAsync(((api.LandingPage response) { | |
| 18238 checkLandingPage(response); | |
| 18239 }))); | |
| 18240 }); | |
| 18241 | |
| 18242 unittest.test("method--list", () { | |
| 18243 | |
| 18244 var mock = new HttpServerMock(); | |
| 18245 api.LandingPagesResourceApi res = new api.DfareportingApi(mock).landingPag
es; | |
| 18246 var arg_profileId = "foo"; | |
| 18247 var arg_campaignId = "foo"; | |
| 18248 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 18249 var path = (req.url).path; | |
| 18250 var pathOffset = 0; | |
| 18251 var index; | |
| 18252 var subPart; | |
| 18253 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 18254 pathOffset += 1; | |
| 18255 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 18256 pathOffset += 18; | |
| 18257 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 18258 pathOffset += 13; | |
| 18259 index = path.indexOf("/campaigns/", pathOffset); | |
| 18260 unittest.expect(index >= 0, unittest.isTrue); | |
| 18261 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 18262 pathOffset = index; | |
| 18263 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 18264 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("/campaigns/")); | |
| 18265 pathOffset += 11; | |
| 18266 index = path.indexOf("/landingPages", pathOffset); | |
| 18267 unittest.expect(index >= 0, unittest.isTrue); | |
| 18268 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 18269 pathOffset = index; | |
| 18270 unittest.expect(subPart, unittest.equals("$arg_campaignId")); | |
| 18271 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("/landingPages")); | |
| 18272 pathOffset += 13; | |
| 18273 | |
| 18274 var query = (req.url).query; | |
| 18275 var queryOffset = 0; | |
| 18276 var queryMap = {}; | |
| 18277 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 18278 parseBool(n) { | |
| 18279 if (n == "true") return true; | |
| 18280 if (n == "false") return false; | |
| 18281 if (n == null) return null; | |
| 18282 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 18283 } | |
| 18284 if (query.length > 0) { | |
| 18285 for (var part in query.split("&")) { | |
| 18286 var keyvalue = part.split("="); | |
| 18287 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 18288 } | |
| 18289 } | |
| 18290 | |
| 18291 | |
| 18292 var h = { | |
| 18293 "content-type" : "application/json; charset=utf-8", | |
| 18294 }; | |
| 18295 var resp = convert.JSON.encode(buildLandingPagesListResponse()); | |
| 18296 return new async.Future.value(stringResponse(200, h, resp)); | |
| 18297 }), true); | |
| 18298 res.list(arg_profileId, arg_campaignId).then(unittest.expectAsync(((api.La
ndingPagesListResponse response) { | |
| 18299 checkLandingPagesListResponse(response); | |
| 18300 }))); | |
| 18301 }); | |
| 18302 | |
| 18303 unittest.test("method--patch", () { | |
| 18304 | |
| 18305 var mock = new HttpServerMock(); | |
| 18306 api.LandingPagesResourceApi res = new api.DfareportingApi(mock).landingPag
es; | |
| 18307 var arg_request = buildLandingPage(); | |
| 18308 var arg_profileId = "foo"; | |
| 18309 var arg_campaignId = "foo"; | |
| 18310 var arg_id = "foo"; | |
| 18311 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 18312 var obj = new api.LandingPage.fromJson(json); | |
| 18313 checkLandingPage(obj); | |
| 18314 | |
| 18315 var path = (req.url).path; | |
| 18316 var pathOffset = 0; | |
| 18317 var index; | |
| 18318 var subPart; | |
| 18319 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 18320 pathOffset += 1; | |
| 18321 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 18322 pathOffset += 18; | |
| 18323 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 18324 pathOffset += 13; | |
| 18325 index = path.indexOf("/campaigns/", pathOffset); | |
| 18326 unittest.expect(index >= 0, unittest.isTrue); | |
| 18327 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 18328 pathOffset = index; | |
| 18329 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 18330 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("/campaigns/")); | |
| 18331 pathOffset += 11; | |
| 18332 index = path.indexOf("/landingPages", pathOffset); | |
| 18333 unittest.expect(index >= 0, unittest.isTrue); | |
| 18334 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 18335 pathOffset = index; | |
| 18336 unittest.expect(subPart, unittest.equals("$arg_campaignId")); | |
| 18337 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("/landingPages")); | |
| 18338 pathOffset += 13; | |
| 18339 | |
| 18340 var query = (req.url).query; | |
| 18341 var queryOffset = 0; | |
| 18342 var queryMap = {}; | |
| 18343 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 18344 parseBool(n) { | |
| 18345 if (n == "true") return true; | |
| 18346 if (n == "false") return false; | |
| 18347 if (n == null) return null; | |
| 18348 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 18349 } | |
| 18350 if (query.length > 0) { | |
| 18351 for (var part in query.split("&")) { | |
| 18352 var keyvalue = part.split("="); | |
| 18353 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 18354 } | |
| 18355 } | |
| 18356 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); | |
| 18357 | |
| 18358 | |
| 18359 var h = { | |
| 18360 "content-type" : "application/json; charset=utf-8", | |
| 18361 }; | |
| 18362 var resp = convert.JSON.encode(buildLandingPage()); | |
| 18363 return new async.Future.value(stringResponse(200, h, resp)); | |
| 18364 }), true); | |
| 18365 res.patch(arg_request, arg_profileId, arg_campaignId, arg_id).then(unittes
t.expectAsync(((api.LandingPage response) { | |
| 18366 checkLandingPage(response); | |
| 18367 }))); | |
| 18368 }); | |
| 18369 | |
| 18370 unittest.test("method--update", () { | |
| 18371 | |
| 18372 var mock = new HttpServerMock(); | |
| 18373 api.LandingPagesResourceApi res = new api.DfareportingApi(mock).landingPag
es; | |
| 18374 var arg_request = buildLandingPage(); | |
| 18375 var arg_profileId = "foo"; | |
| 18376 var arg_campaignId = "foo"; | |
| 18377 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 18378 var obj = new api.LandingPage.fromJson(json); | |
| 18379 checkLandingPage(obj); | |
| 18380 | |
| 18381 var path = (req.url).path; | |
| 18382 var pathOffset = 0; | |
| 18383 var index; | |
| 18384 var subPart; | |
| 18385 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 18386 pathOffset += 1; | |
| 18387 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 18388 pathOffset += 18; | |
| 18389 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 18390 pathOffset += 13; | |
| 18391 index = path.indexOf("/campaigns/", pathOffset); | |
| 18392 unittest.expect(index >= 0, unittest.isTrue); | |
| 18393 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 18394 pathOffset = index; | |
| 18395 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 18396 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("/campaigns/")); | |
| 18397 pathOffset += 11; | |
| 18398 index = path.indexOf("/landingPages", pathOffset); | |
| 18399 unittest.expect(index >= 0, unittest.isTrue); | |
| 18400 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 18401 pathOffset = index; | |
| 18402 unittest.expect(subPart, unittest.equals("$arg_campaignId")); | |
| 18403 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("/landingPages")); | |
| 18404 pathOffset += 13; | |
| 18405 | |
| 18406 var query = (req.url).query; | |
| 18407 var queryOffset = 0; | |
| 18408 var queryMap = {}; | |
| 18409 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 18410 parseBool(n) { | |
| 18411 if (n == "true") return true; | |
| 18412 if (n == "false") return false; | |
| 18413 if (n == null) return null; | |
| 18414 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 18415 } | |
| 18416 if (query.length > 0) { | |
| 18417 for (var part in query.split("&")) { | |
| 18418 var keyvalue = part.split("="); | |
| 18419 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 18420 } | |
| 18421 } | |
| 18422 | |
| 18423 | |
| 18424 var h = { | |
| 18425 "content-type" : "application/json; charset=utf-8", | |
| 18426 }; | |
| 18427 var resp = convert.JSON.encode(buildLandingPage()); | |
| 18428 return new async.Future.value(stringResponse(200, h, resp)); | |
| 18429 }), true); | |
| 18430 res.update(arg_request, arg_profileId, arg_campaignId).then(unittest.expec
tAsync(((api.LandingPage response) { | |
| 18431 checkLandingPage(response); | |
| 18432 }))); | |
| 18433 }); | |
| 18434 | |
| 18435 }); | |
| 18436 | |
| 18437 | |
| 18438 unittest.group("resource-MetrosResourceApi", () { | |
| 18439 unittest.test("method--list", () { | |
| 18440 | |
| 18441 var mock = new HttpServerMock(); | |
| 18442 api.MetrosResourceApi res = new api.DfareportingApi(mock).metros; | |
| 18443 var arg_profileId = "foo"; | |
| 18444 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 18445 var path = (req.url).path; | |
| 18446 var pathOffset = 0; | |
| 18447 var index; | |
| 18448 var subPart; | |
| 18449 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 18450 pathOffset += 1; | |
| 18451 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 18452 pathOffset += 18; | |
| 18453 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 18454 pathOffset += 13; | |
| 18455 index = path.indexOf("/metros", pathOffset); | |
| 18456 unittest.expect(index >= 0, unittest.isTrue); | |
| 18457 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 18458 pathOffset = index; | |
| 18459 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 18460 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ
als("/metros")); | |
| 18461 pathOffset += 7; | |
| 18462 | |
| 18463 var query = (req.url).query; | |
| 18464 var queryOffset = 0; | |
| 18465 var queryMap = {}; | |
| 18466 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 18467 parseBool(n) { | |
| 18468 if (n == "true") return true; | |
| 18469 if (n == "false") return false; | |
| 18470 if (n == null) return null; | |
| 18471 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 18472 } | |
| 18473 if (query.length > 0) { | |
| 18474 for (var part in query.split("&")) { | |
| 18475 var keyvalue = part.split("="); | |
| 18476 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 18477 } | |
| 18478 } | |
| 18479 | |
| 18480 | |
| 18481 var h = { | |
| 18482 "content-type" : "application/json; charset=utf-8", | |
| 18483 }; | |
| 18484 var resp = convert.JSON.encode(buildMetrosListResponse()); | |
| 18485 return new async.Future.value(stringResponse(200, h, resp)); | |
| 18486 }), true); | |
| 18487 res.list(arg_profileId).then(unittest.expectAsync(((api.MetrosListResponse
response) { | |
| 18488 checkMetrosListResponse(response); | |
| 18489 }))); | |
| 18490 }); | |
| 18491 | |
| 18492 }); | |
| 18493 | |
| 18494 | |
| 18495 unittest.group("resource-MobileCarriersResourceApi", () { | |
| 18496 unittest.test("method--get", () { | |
| 18497 | |
| 18498 var mock = new HttpServerMock(); | |
| 18499 api.MobileCarriersResourceApi res = new api.DfareportingApi(mock).mobileCa
rriers; | |
| 18500 var arg_profileId = "foo"; | |
| 18501 var arg_id = "foo"; | |
| 18502 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 18503 var path = (req.url).path; | |
| 18504 var pathOffset = 0; | |
| 18505 var index; | |
| 18506 var subPart; | |
| 18507 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 18508 pathOffset += 1; | |
| 18509 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 18510 pathOffset += 18; | |
| 18511 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 18512 pathOffset += 13; | |
| 18513 index = path.indexOf("/mobileCarriers/", pathOffset); | |
| 18514 unittest.expect(index >= 0, unittest.isTrue); | |
| 18515 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 18516 pathOffset = index; | |
| 18517 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 18518 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq
uals("/mobileCarriers/")); | |
| 18519 pathOffset += 16; | |
| 18520 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 18521 pathOffset = path.length; | |
| 18522 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 18523 | |
| 18524 var query = (req.url).query; | |
| 18525 var queryOffset = 0; | |
| 18526 var queryMap = {}; | |
| 18527 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 18528 parseBool(n) { | |
| 18529 if (n == "true") return true; | |
| 18530 if (n == "false") return false; | |
| 18531 if (n == null) return null; | |
| 18532 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 18533 } | |
| 18534 if (query.length > 0) { | |
| 18535 for (var part in query.split("&")) { | |
| 18536 var keyvalue = part.split("="); | |
| 18537 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 18538 } | |
| 18539 } | |
| 18540 | |
| 18541 | |
| 18542 var h = { | |
| 18543 "content-type" : "application/json; charset=utf-8", | |
| 18544 }; | |
| 18545 var resp = convert.JSON.encode(buildMobileCarrier()); | |
| 18546 return new async.Future.value(stringResponse(200, h, resp)); | |
| 18547 }), true); | |
| 18548 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.MobileCarri
er response) { | |
| 18549 checkMobileCarrier(response); | |
| 18550 }))); | |
| 18551 }); | |
| 18552 | |
| 18553 unittest.test("method--list", () { | |
| 18554 | |
| 18555 var mock = new HttpServerMock(); | |
| 18556 api.MobileCarriersResourceApi res = new api.DfareportingApi(mock).mobileCa
rriers; | |
| 18557 var arg_profileId = "foo"; | |
| 18558 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 18559 var path = (req.url).path; | |
| 18560 var pathOffset = 0; | |
| 18561 var index; | |
| 18562 var subPart; | |
| 18563 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 18564 pathOffset += 1; | |
| 18565 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 18566 pathOffset += 18; | |
| 18567 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 18568 pathOffset += 13; | |
| 18569 index = path.indexOf("/mobileCarriers", pathOffset); | |
| 18570 unittest.expect(index >= 0, unittest.isTrue); | |
| 18571 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 18572 pathOffset = index; | |
| 18573 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 18574 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/mobileCarriers")); | |
| 18575 pathOffset += 15; | |
| 18576 | |
| 18577 var query = (req.url).query; | |
| 18578 var queryOffset = 0; | |
| 18579 var queryMap = {}; | |
| 18580 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 18581 parseBool(n) { | |
| 18582 if (n == "true") return true; | |
| 18583 if (n == "false") return false; | |
| 18584 if (n == null) return null; | |
| 18585 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 18586 } | |
| 18587 if (query.length > 0) { | |
| 18588 for (var part in query.split("&")) { | |
| 18589 var keyvalue = part.split("="); | |
| 18590 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 18591 } | |
| 18592 } | |
| 18593 | |
| 18594 | |
| 18595 var h = { | |
| 18596 "content-type" : "application/json; charset=utf-8", | |
| 18597 }; | |
| 18598 var resp = convert.JSON.encode(buildMobileCarriersListResponse()); | |
| 18599 return new async.Future.value(stringResponse(200, h, resp)); | |
| 18600 }), true); | |
| 18601 res.list(arg_profileId).then(unittest.expectAsync(((api.MobileCarriersList
Response response) { | |
| 18602 checkMobileCarriersListResponse(response); | |
| 18603 }))); | |
| 18604 }); | |
| 18605 | |
| 18606 }); | |
| 18607 | |
| 18608 | |
| 18609 unittest.group("resource-OperatingSystemVersionsResourceApi", () { | |
| 18610 unittest.test("method--get", () { | |
| 18611 | |
| 18612 var mock = new HttpServerMock(); | |
| 18613 api.OperatingSystemVersionsResourceApi res = new api.DfareportingApi(mock)
.operatingSystemVersions; | |
| 18614 var arg_profileId = "foo"; | |
| 18615 var arg_id = "foo"; | |
| 18616 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 18617 var path = (req.url).path; | |
| 18618 var pathOffset = 0; | |
| 18619 var index; | |
| 18620 var subPart; | |
| 18621 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 18622 pathOffset += 1; | |
| 18623 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 18624 pathOffset += 18; | |
| 18625 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 18626 pathOffset += 13; | |
| 18627 index = path.indexOf("/operatingSystemVersions/", pathOffset); | |
| 18628 unittest.expect(index >= 0, unittest.isTrue); | |
| 18629 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 18630 pathOffset = index; | |
| 18631 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 18632 unittest.expect(path.substring(pathOffset, pathOffset + 25), unittest.eq
uals("/operatingSystemVersions/")); | |
| 18633 pathOffset += 25; | |
| 18634 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 18635 pathOffset = path.length; | |
| 18636 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 18637 | |
| 18638 var query = (req.url).query; | |
| 18639 var queryOffset = 0; | |
| 18640 var queryMap = {}; | |
| 18641 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 18642 parseBool(n) { | |
| 18643 if (n == "true") return true; | |
| 18644 if (n == "false") return false; | |
| 18645 if (n == null) return null; | |
| 18646 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 18647 } | |
| 18648 if (query.length > 0) { | |
| 18649 for (var part in query.split("&")) { | |
| 18650 var keyvalue = part.split("="); | |
| 18651 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 18652 } | |
| 18653 } | |
| 18654 | |
| 18655 | |
| 18656 var h = { | |
| 18657 "content-type" : "application/json; charset=utf-8", | |
| 18658 }; | |
| 18659 var resp = convert.JSON.encode(buildOperatingSystemVersion()); | |
| 18660 return new async.Future.value(stringResponse(200, h, resp)); | |
| 18661 }), true); | |
| 18662 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.OperatingSy
stemVersion response) { | |
| 18663 checkOperatingSystemVersion(response); | |
| 18664 }))); | |
| 18665 }); | |
| 18666 | |
| 18667 unittest.test("method--list", () { | |
| 18668 | |
| 18669 var mock = new HttpServerMock(); | |
| 18670 api.OperatingSystemVersionsResourceApi res = new api.DfareportingApi(mock)
.operatingSystemVersions; | |
| 18671 var arg_profileId = "foo"; | |
| 18672 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 18673 var path = (req.url).path; | |
| 18674 var pathOffset = 0; | |
| 18675 var index; | |
| 18676 var subPart; | |
| 18677 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 18678 pathOffset += 1; | |
| 18679 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 18680 pathOffset += 18; | |
| 18681 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 18682 pathOffset += 13; | |
| 18683 index = path.indexOf("/operatingSystemVersions", pathOffset); | |
| 18684 unittest.expect(index >= 0, unittest.isTrue); | |
| 18685 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 18686 pathOffset = index; | |
| 18687 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 18688 unittest.expect(path.substring(pathOffset, pathOffset + 24), unittest.eq
uals("/operatingSystemVersions")); | |
| 18689 pathOffset += 24; | |
| 18690 | |
| 18691 var query = (req.url).query; | |
| 18692 var queryOffset = 0; | |
| 18693 var queryMap = {}; | |
| 18694 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 18695 parseBool(n) { | |
| 18696 if (n == "true") return true; | |
| 18697 if (n == "false") return false; | |
| 18698 if (n == null) return null; | |
| 18699 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 18700 } | |
| 18701 if (query.length > 0) { | |
| 18702 for (var part in query.split("&")) { | |
| 18703 var keyvalue = part.split("="); | |
| 18704 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 18705 } | |
| 18706 } | |
| 18707 | |
| 18708 | |
| 18709 var h = { | |
| 18710 "content-type" : "application/json; charset=utf-8", | |
| 18711 }; | |
| 18712 var resp = convert.JSON.encode(buildOperatingSystemVersionsListResponse(
)); | |
| 18713 return new async.Future.value(stringResponse(200, h, resp)); | |
| 18714 }), true); | |
| 18715 res.list(arg_profileId).then(unittest.expectAsync(((api.OperatingSystemVer
sionsListResponse response) { | |
| 18716 checkOperatingSystemVersionsListResponse(response); | |
| 18717 }))); | |
| 18718 }); | |
| 18719 | |
| 18720 }); | |
| 18721 | |
| 18722 | |
| 18723 unittest.group("resource-OperatingSystemsResourceApi", () { | |
| 18724 unittest.test("method--get", () { | |
| 18725 | |
| 18726 var mock = new HttpServerMock(); | |
| 18727 api.OperatingSystemsResourceApi res = new api.DfareportingApi(mock).operat
ingSystems; | |
| 18728 var arg_profileId = "foo"; | |
| 18729 var arg_dartId = "foo"; | |
| 18730 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 18731 var path = (req.url).path; | |
| 18732 var pathOffset = 0; | |
| 18733 var index; | |
| 18734 var subPart; | |
| 18735 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 18736 pathOffset += 1; | |
| 18737 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 18738 pathOffset += 18; | |
| 18739 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 18740 pathOffset += 13; | |
| 18741 index = path.indexOf("/operatingSystems/", pathOffset); | |
| 18742 unittest.expect(index >= 0, unittest.isTrue); | |
| 18743 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 18744 pathOffset = index; | |
| 18745 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 18746 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("/operatingSystems/")); | |
| 18747 pathOffset += 18; | |
| 18748 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 18749 pathOffset = path.length; | |
| 18750 unittest.expect(subPart, unittest.equals("$arg_dartId")); | |
| 18751 | |
| 18752 var query = (req.url).query; | |
| 18753 var queryOffset = 0; | |
| 18754 var queryMap = {}; | |
| 18755 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 18756 parseBool(n) { | |
| 18757 if (n == "true") return true; | |
| 18758 if (n == "false") return false; | |
| 18759 if (n == null) return null; | |
| 18760 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 18761 } | |
| 18762 if (query.length > 0) { | |
| 18763 for (var part in query.split("&")) { | |
| 18764 var keyvalue = part.split("="); | |
| 18765 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 18766 } | |
| 18767 } | |
| 18768 | |
| 18769 | |
| 18770 var h = { | |
| 18771 "content-type" : "application/json; charset=utf-8", | |
| 18772 }; | |
| 18773 var resp = convert.JSON.encode(buildOperatingSystem()); | |
| 18774 return new async.Future.value(stringResponse(200, h, resp)); | |
| 18775 }), true); | |
| 18776 res.get(arg_profileId, arg_dartId).then(unittest.expectAsync(((api.Operati
ngSystem response) { | |
| 18777 checkOperatingSystem(response); | |
| 18778 }))); | |
| 18779 }); | |
| 18780 | |
| 18781 unittest.test("method--list", () { | |
| 18782 | |
| 18783 var mock = new HttpServerMock(); | |
| 18784 api.OperatingSystemsResourceApi res = new api.DfareportingApi(mock).operat
ingSystems; | |
| 18785 var arg_profileId = "foo"; | |
| 18786 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 18787 var path = (req.url).path; | |
| 18788 var pathOffset = 0; | |
| 18789 var index; | |
| 18790 var subPart; | |
| 18791 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 18792 pathOffset += 1; | |
| 18793 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 18794 pathOffset += 18; | |
| 18795 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 18796 pathOffset += 13; | |
| 18797 index = path.indexOf("/operatingSystems", pathOffset); | |
| 18798 unittest.expect(index >= 0, unittest.isTrue); | |
| 18799 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 18800 pathOffset = index; | |
| 18801 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 18802 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("/operatingSystems")); | |
| 18803 pathOffset += 17; | |
| 18804 | |
| 18805 var query = (req.url).query; | |
| 18806 var queryOffset = 0; | |
| 18807 var queryMap = {}; | |
| 18808 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 18809 parseBool(n) { | |
| 18810 if (n == "true") return true; | |
| 18811 if (n == "false") return false; | |
| 18812 if (n == null) return null; | |
| 18813 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 18814 } | |
| 18815 if (query.length > 0) { | |
| 18816 for (var part in query.split("&")) { | |
| 18817 var keyvalue = part.split("="); | |
| 18818 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 18819 } | |
| 18820 } | |
| 18821 | |
| 18822 | |
| 18823 var h = { | |
| 18824 "content-type" : "application/json; charset=utf-8", | |
| 18825 }; | |
| 18826 var resp = convert.JSON.encode(buildOperatingSystemsListResponse()); | |
| 18827 return new async.Future.value(stringResponse(200, h, resp)); | |
| 18828 }), true); | |
| 18829 res.list(arg_profileId).then(unittest.expectAsync(((api.OperatingSystemsLi
stResponse response) { | |
| 18830 checkOperatingSystemsListResponse(response); | |
| 18831 }))); | |
| 18832 }); | |
| 18833 | |
| 18834 }); | |
| 18835 | |
| 18836 | |
| 18837 unittest.group("resource-OrderDocumentsResourceApi", () { | |
| 18838 unittest.test("method--get", () { | |
| 18839 | |
| 18840 var mock = new HttpServerMock(); | |
| 18841 api.OrderDocumentsResourceApi res = new api.DfareportingApi(mock).orderDoc
uments; | |
| 18842 var arg_profileId = "foo"; | |
| 18843 var arg_projectId = "foo"; | |
| 18844 var arg_id = "foo"; | |
| 18845 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 18846 var path = (req.url).path; | |
| 18847 var pathOffset = 0; | |
| 18848 var index; | |
| 18849 var subPart; | |
| 18850 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 18851 pathOffset += 1; | |
| 18852 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 18853 pathOffset += 18; | |
| 18854 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 18855 pathOffset += 13; | |
| 18856 index = path.indexOf("/projects/", pathOffset); | |
| 18857 unittest.expect(index >= 0, unittest.isTrue); | |
| 18858 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 18859 pathOffset = index; | |
| 18860 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 18861 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/projects/")); | |
| 18862 pathOffset += 10; | |
| 18863 index = path.indexOf("/orderDocuments/", pathOffset); | |
| 18864 unittest.expect(index >= 0, unittest.isTrue); | |
| 18865 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 18866 pathOffset = index; | |
| 18867 unittest.expect(subPart, unittest.equals("$arg_projectId")); | |
| 18868 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq
uals("/orderDocuments/")); | |
| 18869 pathOffset += 16; | |
| 18870 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 18871 pathOffset = path.length; | |
| 18872 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 18873 | |
| 18874 var query = (req.url).query; | |
| 18875 var queryOffset = 0; | |
| 18876 var queryMap = {}; | |
| 18877 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 18878 parseBool(n) { | |
| 18879 if (n == "true") return true; | |
| 18880 if (n == "false") return false; | |
| 18881 if (n == null) return null; | |
| 18882 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 18883 } | |
| 18884 if (query.length > 0) { | |
| 18885 for (var part in query.split("&")) { | |
| 18886 var keyvalue = part.split("="); | |
| 18887 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 18888 } | |
| 18889 } | |
| 18890 | |
| 18891 | |
| 18892 var h = { | |
| 18893 "content-type" : "application/json; charset=utf-8", | |
| 18894 }; | |
| 18895 var resp = convert.JSON.encode(buildOrderDocument()); | |
| 18896 return new async.Future.value(stringResponse(200, h, resp)); | |
| 18897 }), true); | |
| 18898 res.get(arg_profileId, arg_projectId, arg_id).then(unittest.expectAsync(((
api.OrderDocument response) { | |
| 18899 checkOrderDocument(response); | |
| 18900 }))); | |
| 18901 }); | |
| 18902 | |
| 18903 unittest.test("method--list", () { | |
| 18904 | |
| 18905 var mock = new HttpServerMock(); | |
| 18906 api.OrderDocumentsResourceApi res = new api.DfareportingApi(mock).orderDoc
uments; | |
| 18907 var arg_profileId = "foo"; | |
| 18908 var arg_projectId = "foo"; | |
| 18909 var arg_approved = true; | |
| 18910 var arg_ids = buildUnnamed1540(); | |
| 18911 var arg_maxResults = 42; | |
| 18912 var arg_orderId = buildUnnamed1541(); | |
| 18913 var arg_pageToken = "foo"; | |
| 18914 var arg_searchString = "foo"; | |
| 18915 var arg_siteId = buildUnnamed1542(); | |
| 18916 var arg_sortField = "foo"; | |
| 18917 var arg_sortOrder = "foo"; | |
| 18918 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 18919 var path = (req.url).path; | |
| 18920 var pathOffset = 0; | |
| 18921 var index; | |
| 18922 var subPart; | |
| 18923 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 18924 pathOffset += 1; | |
| 18925 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 18926 pathOffset += 18; | |
| 18927 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 18928 pathOffset += 13; | |
| 18929 index = path.indexOf("/projects/", pathOffset); | |
| 18930 unittest.expect(index >= 0, unittest.isTrue); | |
| 18931 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 18932 pathOffset = index; | |
| 18933 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 18934 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/projects/")); | |
| 18935 pathOffset += 10; | |
| 18936 index = path.indexOf("/orderDocuments", pathOffset); | |
| 18937 unittest.expect(index >= 0, unittest.isTrue); | |
| 18938 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 18939 pathOffset = index; | |
| 18940 unittest.expect(subPart, unittest.equals("$arg_projectId")); | |
| 18941 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/orderDocuments")); | |
| 18942 pathOffset += 15; | |
| 18943 | |
| 18944 var query = (req.url).query; | |
| 18945 var queryOffset = 0; | |
| 18946 var queryMap = {}; | |
| 18947 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 18948 parseBool(n) { | |
| 18949 if (n == "true") return true; | |
| 18950 if (n == "false") return false; | |
| 18951 if (n == null) return null; | |
| 18952 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 18953 } | |
| 18954 if (query.length > 0) { | |
| 18955 for (var part in query.split("&")) { | |
| 18956 var keyvalue = part.split("="); | |
| 18957 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 18958 } | |
| 18959 } | |
| 18960 unittest.expect(queryMap["approved"].first, unittest.equals("$arg_approv
ed")); | |
| 18961 unittest.expect(queryMap["ids"], unittest.equals(arg_ids)); | |
| 18962 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | |
| 18963 unittest.expect(queryMap["orderId"], unittest.equals(arg_orderId)); | |
| 18964 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 18965 unittest.expect(queryMap["searchString"].first, unittest.equals(arg_sear
chString)); | |
| 18966 unittest.expect(queryMap["siteId"], unittest.equals(arg_siteId)); | |
| 18967 unittest.expect(queryMap["sortField"].first, unittest.equals(arg_sortFie
ld)); | |
| 18968 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | |
| 18969 | |
| 18970 | |
| 18971 var h = { | |
| 18972 "content-type" : "application/json; charset=utf-8", | |
| 18973 }; | |
| 18974 var resp = convert.JSON.encode(buildOrderDocumentsListResponse()); | |
| 18975 return new async.Future.value(stringResponse(200, h, resp)); | |
| 18976 }), true); | |
| 18977 res.list(arg_profileId, arg_projectId, approved: arg_approved, ids: arg_id
s, maxResults: arg_maxResults, orderId: arg_orderId, pageToken: arg_pageToken, s
earchString: arg_searchString, siteId: arg_siteId, sortField: arg_sortField, sor
tOrder: arg_sortOrder).then(unittest.expectAsync(((api.OrderDocumentsListRespons
e response) { | |
| 18978 checkOrderDocumentsListResponse(response); | |
| 18979 }))); | |
| 18980 }); | |
| 18981 | |
| 18982 }); | |
| 18983 | |
| 18984 | |
| 18985 unittest.group("resource-OrdersResourceApi", () { | |
| 18986 unittest.test("method--get", () { | |
| 18987 | |
| 18988 var mock = new HttpServerMock(); | |
| 18989 api.OrdersResourceApi res = new api.DfareportingApi(mock).orders; | |
| 18990 var arg_profileId = "foo"; | |
| 18991 var arg_projectId = "foo"; | |
| 18992 var arg_id = "foo"; | |
| 18993 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 18994 var path = (req.url).path; | |
| 18995 var pathOffset = 0; | |
| 18996 var index; | |
| 18997 var subPart; | |
| 18998 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 18999 pathOffset += 1; | |
| 19000 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 19001 pathOffset += 18; | |
| 19002 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 19003 pathOffset += 13; | |
| 19004 index = path.indexOf("/projects/", pathOffset); | |
| 19005 unittest.expect(index >= 0, unittest.isTrue); | |
| 19006 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 19007 pathOffset = index; | |
| 19008 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 19009 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/projects/")); | |
| 19010 pathOffset += 10; | |
| 19011 index = path.indexOf("/orders/", pathOffset); | |
| 19012 unittest.expect(index >= 0, unittest.isTrue); | |
| 19013 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 19014 pathOffset = index; | |
| 19015 unittest.expect(subPart, unittest.equals("$arg_projectId")); | |
| 19016 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("/orders/")); | |
| 19017 pathOffset += 8; | |
| 19018 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 19019 pathOffset = path.length; | |
| 19020 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 19021 | |
| 19022 var query = (req.url).query; | |
| 19023 var queryOffset = 0; | |
| 19024 var queryMap = {}; | |
| 19025 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 19026 parseBool(n) { | |
| 19027 if (n == "true") return true; | |
| 19028 if (n == "false") return false; | |
| 19029 if (n == null) return null; | |
| 19030 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 19031 } | |
| 19032 if (query.length > 0) { | |
| 19033 for (var part in query.split("&")) { | |
| 19034 var keyvalue = part.split("="); | |
| 19035 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 19036 } | |
| 19037 } | |
| 19038 | |
| 19039 | |
| 19040 var h = { | |
| 19041 "content-type" : "application/json; charset=utf-8", | |
| 19042 }; | |
| 19043 var resp = convert.JSON.encode(buildOrder()); | |
| 19044 return new async.Future.value(stringResponse(200, h, resp)); | |
| 19045 }), true); | |
| 19046 res.get(arg_profileId, arg_projectId, arg_id).then(unittest.expectAsync(((
api.Order response) { | |
| 19047 checkOrder(response); | |
| 19048 }))); | |
| 19049 }); | |
| 19050 | |
| 19051 unittest.test("method--list", () { | |
| 19052 | |
| 19053 var mock = new HttpServerMock(); | |
| 19054 api.OrdersResourceApi res = new api.DfareportingApi(mock).orders; | |
| 19055 var arg_profileId = "foo"; | |
| 19056 var arg_projectId = "foo"; | |
| 19057 var arg_ids = buildUnnamed1543(); | |
| 19058 var arg_maxResults = 42; | |
| 19059 var arg_pageToken = "foo"; | |
| 19060 var arg_searchString = "foo"; | |
| 19061 var arg_siteId = buildUnnamed1544(); | |
| 19062 var arg_sortField = "foo"; | |
| 19063 var arg_sortOrder = "foo"; | |
| 19064 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 19065 var path = (req.url).path; | |
| 19066 var pathOffset = 0; | |
| 19067 var index; | |
| 19068 var subPart; | |
| 19069 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 19070 pathOffset += 1; | |
| 19071 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 19072 pathOffset += 18; | |
| 19073 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 19074 pathOffset += 13; | |
| 19075 index = path.indexOf("/projects/", pathOffset); | |
| 19076 unittest.expect(index >= 0, unittest.isTrue); | |
| 19077 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 19078 pathOffset = index; | |
| 19079 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 19080 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/projects/")); | |
| 19081 pathOffset += 10; | |
| 19082 index = path.indexOf("/orders", pathOffset); | |
| 19083 unittest.expect(index >= 0, unittest.isTrue); | |
| 19084 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 19085 pathOffset = index; | |
| 19086 unittest.expect(subPart, unittest.equals("$arg_projectId")); | |
| 19087 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ
als("/orders")); | |
| 19088 pathOffset += 7; | |
| 19089 | |
| 19090 var query = (req.url).query; | |
| 19091 var queryOffset = 0; | |
| 19092 var queryMap = {}; | |
| 19093 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 19094 parseBool(n) { | |
| 19095 if (n == "true") return true; | |
| 19096 if (n == "false") return false; | |
| 19097 if (n == null) return null; | |
| 19098 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 19099 } | |
| 19100 if (query.length > 0) { | |
| 19101 for (var part in query.split("&")) { | |
| 19102 var keyvalue = part.split("="); | |
| 19103 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 19104 } | |
| 19105 } | |
| 19106 unittest.expect(queryMap["ids"], unittest.equals(arg_ids)); | |
| 19107 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | |
| 19108 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 19109 unittest.expect(queryMap["searchString"].first, unittest.equals(arg_sear
chString)); | |
| 19110 unittest.expect(queryMap["siteId"], unittest.equals(arg_siteId)); | |
| 19111 unittest.expect(queryMap["sortField"].first, unittest.equals(arg_sortFie
ld)); | |
| 19112 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | |
| 19113 | |
| 19114 | |
| 19115 var h = { | |
| 19116 "content-type" : "application/json; charset=utf-8", | |
| 19117 }; | |
| 19118 var resp = convert.JSON.encode(buildOrdersListResponse()); | |
| 19119 return new async.Future.value(stringResponse(200, h, resp)); | |
| 19120 }), true); | |
| 19121 res.list(arg_profileId, arg_projectId, ids: arg_ids, maxResults: arg_maxRe
sults, pageToken: arg_pageToken, searchString: arg_searchString, siteId: arg_sit
eId, sortField: arg_sortField, sortOrder: arg_sortOrder).then(unittest.expectAsy
nc(((api.OrdersListResponse response) { | |
| 19122 checkOrdersListResponse(response); | |
| 19123 }))); | |
| 19124 }); | |
| 19125 | |
| 19126 }); | |
| 19127 | |
| 19128 | |
| 19129 unittest.group("resource-PlacementGroupsResourceApi", () { | |
| 19130 unittest.test("method--get", () { | |
| 19131 | |
| 19132 var mock = new HttpServerMock(); | |
| 19133 api.PlacementGroupsResourceApi res = new api.DfareportingApi(mock).placeme
ntGroups; | |
| 19134 var arg_profileId = "foo"; | |
| 19135 var arg_id = "foo"; | |
| 19136 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 19137 var path = (req.url).path; | |
| 19138 var pathOffset = 0; | |
| 19139 var index; | |
| 19140 var subPart; | |
| 19141 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 19142 pathOffset += 1; | |
| 19143 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 19144 pathOffset += 18; | |
| 19145 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 19146 pathOffset += 13; | |
| 19147 index = path.indexOf("/placementGroups/", pathOffset); | |
| 19148 unittest.expect(index >= 0, unittest.isTrue); | |
| 19149 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 19150 pathOffset = index; | |
| 19151 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 19152 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("/placementGroups/")); | |
| 19153 pathOffset += 17; | |
| 19154 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 19155 pathOffset = path.length; | |
| 19156 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 19157 | |
| 19158 var query = (req.url).query; | |
| 19159 var queryOffset = 0; | |
| 19160 var queryMap = {}; | |
| 19161 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 19162 parseBool(n) { | |
| 19163 if (n == "true") return true; | |
| 19164 if (n == "false") return false; | |
| 19165 if (n == null) return null; | |
| 19166 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 19167 } | |
| 19168 if (query.length > 0) { | |
| 19169 for (var part in query.split("&")) { | |
| 19170 var keyvalue = part.split("="); | |
| 19171 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 19172 } | |
| 19173 } | |
| 19174 | |
| 19175 | |
| 19176 var h = { | |
| 19177 "content-type" : "application/json; charset=utf-8", | |
| 19178 }; | |
| 19179 var resp = convert.JSON.encode(buildPlacementGroup()); | |
| 19180 return new async.Future.value(stringResponse(200, h, resp)); | |
| 19181 }), true); | |
| 19182 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.PlacementGr
oup response) { | |
| 19183 checkPlacementGroup(response); | |
| 19184 }))); | |
| 19185 }); | |
| 19186 | |
| 19187 unittest.test("method--insert", () { | |
| 19188 | |
| 19189 var mock = new HttpServerMock(); | |
| 19190 api.PlacementGroupsResourceApi res = new api.DfareportingApi(mock).placeme
ntGroups; | |
| 19191 var arg_request = buildPlacementGroup(); | |
| 19192 var arg_profileId = "foo"; | |
| 19193 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 19194 var obj = new api.PlacementGroup.fromJson(json); | |
| 19195 checkPlacementGroup(obj); | |
| 19196 | |
| 19197 var path = (req.url).path; | |
| 19198 var pathOffset = 0; | |
| 19199 var index; | |
| 19200 var subPart; | |
| 19201 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 19202 pathOffset += 1; | |
| 19203 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 19204 pathOffset += 18; | |
| 19205 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 19206 pathOffset += 13; | |
| 19207 index = path.indexOf("/placementGroups", pathOffset); | |
| 19208 unittest.expect(index >= 0, unittest.isTrue); | |
| 19209 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 19210 pathOffset = index; | |
| 19211 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 19212 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq
uals("/placementGroups")); | |
| 19213 pathOffset += 16; | |
| 19214 | |
| 19215 var query = (req.url).query; | |
| 19216 var queryOffset = 0; | |
| 19217 var queryMap = {}; | |
| 19218 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 19219 parseBool(n) { | |
| 19220 if (n == "true") return true; | |
| 19221 if (n == "false") return false; | |
| 19222 if (n == null) return null; | |
| 19223 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 19224 } | |
| 19225 if (query.length > 0) { | |
| 19226 for (var part in query.split("&")) { | |
| 19227 var keyvalue = part.split("="); | |
| 19228 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 19229 } | |
| 19230 } | |
| 19231 | |
| 19232 | |
| 19233 var h = { | |
| 19234 "content-type" : "application/json; charset=utf-8", | |
| 19235 }; | |
| 19236 var resp = convert.JSON.encode(buildPlacementGroup()); | |
| 19237 return new async.Future.value(stringResponse(200, h, resp)); | |
| 19238 }), true); | |
| 19239 res.insert(arg_request, arg_profileId).then(unittest.expectAsync(((api.Pla
cementGroup response) { | |
| 19240 checkPlacementGroup(response); | |
| 19241 }))); | |
| 19242 }); | |
| 19243 | |
| 19244 unittest.test("method--list", () { | |
| 19245 | |
| 19246 var mock = new HttpServerMock(); | |
| 19247 api.PlacementGroupsResourceApi res = new api.DfareportingApi(mock).placeme
ntGroups; | |
| 19248 var arg_profileId = "foo"; | |
| 19249 var arg_advertiserIds = buildUnnamed1545(); | |
| 19250 var arg_archived = true; | |
| 19251 var arg_campaignIds = buildUnnamed1546(); | |
| 19252 var arg_contentCategoryIds = buildUnnamed1547(); | |
| 19253 var arg_directorySiteIds = buildUnnamed1548(); | |
| 19254 var arg_ids = buildUnnamed1549(); | |
| 19255 var arg_maxEndDate = "foo"; | |
| 19256 var arg_maxResults = 42; | |
| 19257 var arg_maxStartDate = "foo"; | |
| 19258 var arg_minEndDate = "foo"; | |
| 19259 var arg_minStartDate = "foo"; | |
| 19260 var arg_pageToken = "foo"; | |
| 19261 var arg_placementGroupType = "foo"; | |
| 19262 var arg_placementStrategyIds = buildUnnamed1550(); | |
| 19263 var arg_pricingTypes = buildUnnamed1551(); | |
| 19264 var arg_searchString = "foo"; | |
| 19265 var arg_siteIds = buildUnnamed1552(); | |
| 19266 var arg_sortField = "foo"; | |
| 19267 var arg_sortOrder = "foo"; | |
| 19268 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 19269 var path = (req.url).path; | |
| 19270 var pathOffset = 0; | |
| 19271 var index; | |
| 19272 var subPart; | |
| 19273 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 19274 pathOffset += 1; | |
| 19275 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 19276 pathOffset += 18; | |
| 19277 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 19278 pathOffset += 13; | |
| 19279 index = path.indexOf("/placementGroups", pathOffset); | |
| 19280 unittest.expect(index >= 0, unittest.isTrue); | |
| 19281 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 19282 pathOffset = index; | |
| 19283 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 19284 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq
uals("/placementGroups")); | |
| 19285 pathOffset += 16; | |
| 19286 | |
| 19287 var query = (req.url).query; | |
| 19288 var queryOffset = 0; | |
| 19289 var queryMap = {}; | |
| 19290 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 19291 parseBool(n) { | |
| 19292 if (n == "true") return true; | |
| 19293 if (n == "false") return false; | |
| 19294 if (n == null) return null; | |
| 19295 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 19296 } | |
| 19297 if (query.length > 0) { | |
| 19298 for (var part in query.split("&")) { | |
| 19299 var keyvalue = part.split("="); | |
| 19300 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 19301 } | |
| 19302 } | |
| 19303 unittest.expect(queryMap["advertiserIds"], unittest.equals(arg_advertise
rIds)); | |
| 19304 unittest.expect(queryMap["archived"].first, unittest.equals("$arg_archiv
ed")); | |
| 19305 unittest.expect(queryMap["campaignIds"], unittest.equals(arg_campaignIds
)); | |
| 19306 unittest.expect(queryMap["contentCategoryIds"], unittest.equals(arg_cont
entCategoryIds)); | |
| 19307 unittest.expect(queryMap["directorySiteIds"], unittest.equals(arg_direct
orySiteIds)); | |
| 19308 unittest.expect(queryMap["ids"], unittest.equals(arg_ids)); | |
| 19309 unittest.expect(queryMap["maxEndDate"].first, unittest.equals(arg_maxEnd
Date)); | |
| 19310 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | |
| 19311 unittest.expect(queryMap["maxStartDate"].first, unittest.equals(arg_maxS
tartDate)); | |
| 19312 unittest.expect(queryMap["minEndDate"].first, unittest.equals(arg_minEnd
Date)); | |
| 19313 unittest.expect(queryMap["minStartDate"].first, unittest.equals(arg_minS
tartDate)); | |
| 19314 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 19315 unittest.expect(queryMap["placementGroupType"].first, unittest.equals(ar
g_placementGroupType)); | |
| 19316 unittest.expect(queryMap["placementStrategyIds"], unittest.equals(arg_pl
acementStrategyIds)); | |
| 19317 unittest.expect(queryMap["pricingTypes"], unittest.equals(arg_pricingTyp
es)); | |
| 19318 unittest.expect(queryMap["searchString"].first, unittest.equals(arg_sear
chString)); | |
| 19319 unittest.expect(queryMap["siteIds"], unittest.equals(arg_siteIds)); | |
| 19320 unittest.expect(queryMap["sortField"].first, unittest.equals(arg_sortFie
ld)); | |
| 19321 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | |
| 19322 | |
| 19323 | |
| 19324 var h = { | |
| 19325 "content-type" : "application/json; charset=utf-8", | |
| 19326 }; | |
| 19327 var resp = convert.JSON.encode(buildPlacementGroupsListResponse()); | |
| 19328 return new async.Future.value(stringResponse(200, h, resp)); | |
| 19329 }), true); | |
| 19330 res.list(arg_profileId, advertiserIds: arg_advertiserIds, archived: arg_ar
chived, campaignIds: arg_campaignIds, contentCategoryIds: arg_contentCategoryIds
, directorySiteIds: arg_directorySiteIds, ids: arg_ids, maxEndDate: arg_maxEndDa
te, maxResults: arg_maxResults, maxStartDate: arg_maxStartDate, minEndDate: arg_
minEndDate, minStartDate: arg_minStartDate, pageToken: arg_pageToken, placementG
roupType: arg_placementGroupType, placementStrategyIds: arg_placementStrategyIds
, pricingTypes: arg_pricingTypes, searchString: arg_searchString, siteIds: arg_s
iteIds, sortField: arg_sortField, sortOrder: arg_sortOrder).then(unittest.expect
Async(((api.PlacementGroupsListResponse response) { | |
| 19331 checkPlacementGroupsListResponse(response); | |
| 19332 }))); | |
| 19333 }); | |
| 19334 | |
| 19335 unittest.test("method--patch", () { | |
| 19336 | |
| 19337 var mock = new HttpServerMock(); | |
| 19338 api.PlacementGroupsResourceApi res = new api.DfareportingApi(mock).placeme
ntGroups; | |
| 19339 var arg_request = buildPlacementGroup(); | |
| 19340 var arg_profileId = "foo"; | |
| 19341 var arg_id = "foo"; | |
| 19342 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 19343 var obj = new api.PlacementGroup.fromJson(json); | |
| 19344 checkPlacementGroup(obj); | |
| 19345 | |
| 19346 var path = (req.url).path; | |
| 19347 var pathOffset = 0; | |
| 19348 var index; | |
| 19349 var subPart; | |
| 19350 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 19351 pathOffset += 1; | |
| 19352 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 19353 pathOffset += 18; | |
| 19354 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 19355 pathOffset += 13; | |
| 19356 index = path.indexOf("/placementGroups", pathOffset); | |
| 19357 unittest.expect(index >= 0, unittest.isTrue); | |
| 19358 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 19359 pathOffset = index; | |
| 19360 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 19361 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq
uals("/placementGroups")); | |
| 19362 pathOffset += 16; | |
| 19363 | |
| 19364 var query = (req.url).query; | |
| 19365 var queryOffset = 0; | |
| 19366 var queryMap = {}; | |
| 19367 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 19368 parseBool(n) { | |
| 19369 if (n == "true") return true; | |
| 19370 if (n == "false") return false; | |
| 19371 if (n == null) return null; | |
| 19372 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 19373 } | |
| 19374 if (query.length > 0) { | |
| 19375 for (var part in query.split("&")) { | |
| 19376 var keyvalue = part.split("="); | |
| 19377 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 19378 } | |
| 19379 } | |
| 19380 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); | |
| 19381 | |
| 19382 | |
| 19383 var h = { | |
| 19384 "content-type" : "application/json; charset=utf-8", | |
| 19385 }; | |
| 19386 var resp = convert.JSON.encode(buildPlacementGroup()); | |
| 19387 return new async.Future.value(stringResponse(200, h, resp)); | |
| 19388 }), true); | |
| 19389 res.patch(arg_request, arg_profileId, arg_id).then(unittest.expectAsync(((
api.PlacementGroup response) { | |
| 19390 checkPlacementGroup(response); | |
| 19391 }))); | |
| 19392 }); | |
| 19393 | |
| 19394 unittest.test("method--update", () { | |
| 19395 | |
| 19396 var mock = new HttpServerMock(); | |
| 19397 api.PlacementGroupsResourceApi res = new api.DfareportingApi(mock).placeme
ntGroups; | |
| 19398 var arg_request = buildPlacementGroup(); | |
| 19399 var arg_profileId = "foo"; | |
| 19400 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 19401 var obj = new api.PlacementGroup.fromJson(json); | |
| 19402 checkPlacementGroup(obj); | |
| 19403 | |
| 19404 var path = (req.url).path; | |
| 19405 var pathOffset = 0; | |
| 19406 var index; | |
| 19407 var subPart; | |
| 19408 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 19409 pathOffset += 1; | |
| 19410 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 19411 pathOffset += 18; | |
| 19412 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 19413 pathOffset += 13; | |
| 19414 index = path.indexOf("/placementGroups", pathOffset); | |
| 19415 unittest.expect(index >= 0, unittest.isTrue); | |
| 19416 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 19417 pathOffset = index; | |
| 19418 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 19419 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq
uals("/placementGroups")); | |
| 19420 pathOffset += 16; | |
| 19421 | |
| 19422 var query = (req.url).query; | |
| 19423 var queryOffset = 0; | |
| 19424 var queryMap = {}; | |
| 19425 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 19426 parseBool(n) { | |
| 19427 if (n == "true") return true; | |
| 19428 if (n == "false") return false; | |
| 19429 if (n == null) return null; | |
| 19430 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 19431 } | |
| 19432 if (query.length > 0) { | |
| 19433 for (var part in query.split("&")) { | |
| 19434 var keyvalue = part.split("="); | |
| 19435 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 19436 } | |
| 19437 } | |
| 19438 | |
| 19439 | |
| 19440 var h = { | |
| 19441 "content-type" : "application/json; charset=utf-8", | |
| 19442 }; | |
| 19443 var resp = convert.JSON.encode(buildPlacementGroup()); | |
| 19444 return new async.Future.value(stringResponse(200, h, resp)); | |
| 19445 }), true); | |
| 19446 res.update(arg_request, arg_profileId).then(unittest.expectAsync(((api.Pla
cementGroup response) { | |
| 19447 checkPlacementGroup(response); | |
| 19448 }))); | |
| 19449 }); | |
| 19450 | |
| 19451 }); | |
| 19452 | |
| 19453 | |
| 19454 unittest.group("resource-PlacementStrategiesResourceApi", () { | |
| 19455 unittest.test("method--delete", () { | |
| 19456 | |
| 19457 var mock = new HttpServerMock(); | |
| 19458 api.PlacementStrategiesResourceApi res = new api.DfareportingApi(mock).pla
cementStrategies; | |
| 19459 var arg_profileId = "foo"; | |
| 19460 var arg_id = "foo"; | |
| 19461 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 19462 var path = (req.url).path; | |
| 19463 var pathOffset = 0; | |
| 19464 var index; | |
| 19465 var subPart; | |
| 19466 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 19467 pathOffset += 1; | |
| 19468 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 19469 pathOffset += 18; | |
| 19470 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 19471 pathOffset += 13; | |
| 19472 index = path.indexOf("/placementStrategies/", pathOffset); | |
| 19473 unittest.expect(index >= 0, unittest.isTrue); | |
| 19474 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 19475 pathOffset = index; | |
| 19476 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 19477 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("/placementStrategies/")); | |
| 19478 pathOffset += 21; | |
| 19479 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 19480 pathOffset = path.length; | |
| 19481 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 19482 | |
| 19483 var query = (req.url).query; | |
| 19484 var queryOffset = 0; | |
| 19485 var queryMap = {}; | |
| 19486 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 19487 parseBool(n) { | |
| 19488 if (n == "true") return true; | |
| 19489 if (n == "false") return false; | |
| 19490 if (n == null) return null; | |
| 19491 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 19492 } | |
| 19493 if (query.length > 0) { | |
| 19494 for (var part in query.split("&")) { | |
| 19495 var keyvalue = part.split("="); | |
| 19496 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 19497 } | |
| 19498 } | |
| 19499 | |
| 19500 | |
| 19501 var h = { | |
| 19502 "content-type" : "application/json; charset=utf-8", | |
| 19503 }; | |
| 19504 var resp = ""; | |
| 19505 return new async.Future.value(stringResponse(200, h, resp)); | |
| 19506 }), true); | |
| 19507 res.delete(arg_profileId, arg_id).then(unittest.expectAsync((_) {})); | |
| 19508 }); | |
| 19509 | |
| 19510 unittest.test("method--get", () { | |
| 19511 | |
| 19512 var mock = new HttpServerMock(); | |
| 19513 api.PlacementStrategiesResourceApi res = new api.DfareportingApi(mock).pla
cementStrategies; | |
| 19514 var arg_profileId = "foo"; | |
| 19515 var arg_id = "foo"; | |
| 19516 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 19517 var path = (req.url).path; | |
| 19518 var pathOffset = 0; | |
| 19519 var index; | |
| 19520 var subPart; | |
| 19521 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 19522 pathOffset += 1; | |
| 19523 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 19524 pathOffset += 18; | |
| 19525 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 19526 pathOffset += 13; | |
| 19527 index = path.indexOf("/placementStrategies/", pathOffset); | |
| 19528 unittest.expect(index >= 0, unittest.isTrue); | |
| 19529 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 19530 pathOffset = index; | |
| 19531 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 19532 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("/placementStrategies/")); | |
| 19533 pathOffset += 21; | |
| 19534 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 19535 pathOffset = path.length; | |
| 19536 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 19537 | |
| 19538 var query = (req.url).query; | |
| 19539 var queryOffset = 0; | |
| 19540 var queryMap = {}; | |
| 19541 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 19542 parseBool(n) { | |
| 19543 if (n == "true") return true; | |
| 19544 if (n == "false") return false; | |
| 19545 if (n == null) return null; | |
| 19546 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 19547 } | |
| 19548 if (query.length > 0) { | |
| 19549 for (var part in query.split("&")) { | |
| 19550 var keyvalue = part.split("="); | |
| 19551 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 19552 } | |
| 19553 } | |
| 19554 | |
| 19555 | |
| 19556 var h = { | |
| 19557 "content-type" : "application/json; charset=utf-8", | |
| 19558 }; | |
| 19559 var resp = convert.JSON.encode(buildPlacementStrategy()); | |
| 19560 return new async.Future.value(stringResponse(200, h, resp)); | |
| 19561 }), true); | |
| 19562 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.PlacementSt
rategy response) { | |
| 19563 checkPlacementStrategy(response); | |
| 19564 }))); | |
| 19565 }); | |
| 19566 | |
| 19567 unittest.test("method--insert", () { | |
| 19568 | |
| 19569 var mock = new HttpServerMock(); | |
| 19570 api.PlacementStrategiesResourceApi res = new api.DfareportingApi(mock).pla
cementStrategies; | |
| 19571 var arg_request = buildPlacementStrategy(); | |
| 19572 var arg_profileId = "foo"; | |
| 19573 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 19574 var obj = new api.PlacementStrategy.fromJson(json); | |
| 19575 checkPlacementStrategy(obj); | |
| 19576 | |
| 19577 var path = (req.url).path; | |
| 19578 var pathOffset = 0; | |
| 19579 var index; | |
| 19580 var subPart; | |
| 19581 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 19582 pathOffset += 1; | |
| 19583 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 19584 pathOffset += 18; | |
| 19585 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 19586 pathOffset += 13; | |
| 19587 index = path.indexOf("/placementStrategies", pathOffset); | |
| 19588 unittest.expect(index >= 0, unittest.isTrue); | |
| 19589 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 19590 pathOffset = index; | |
| 19591 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 19592 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("/placementStrategies")); | |
| 19593 pathOffset += 20; | |
| 19594 | |
| 19595 var query = (req.url).query; | |
| 19596 var queryOffset = 0; | |
| 19597 var queryMap = {}; | |
| 19598 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 19599 parseBool(n) { | |
| 19600 if (n == "true") return true; | |
| 19601 if (n == "false") return false; | |
| 19602 if (n == null) return null; | |
| 19603 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 19604 } | |
| 19605 if (query.length > 0) { | |
| 19606 for (var part in query.split("&")) { | |
| 19607 var keyvalue = part.split("="); | |
| 19608 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 19609 } | |
| 19610 } | |
| 19611 | |
| 19612 | |
| 19613 var h = { | |
| 19614 "content-type" : "application/json; charset=utf-8", | |
| 19615 }; | |
| 19616 var resp = convert.JSON.encode(buildPlacementStrategy()); | |
| 19617 return new async.Future.value(stringResponse(200, h, resp)); | |
| 19618 }), true); | |
| 19619 res.insert(arg_request, arg_profileId).then(unittest.expectAsync(((api.Pla
cementStrategy response) { | |
| 19620 checkPlacementStrategy(response); | |
| 19621 }))); | |
| 19622 }); | |
| 19623 | |
| 19624 unittest.test("method--list", () { | |
| 19625 | |
| 19626 var mock = new HttpServerMock(); | |
| 19627 api.PlacementStrategiesResourceApi res = new api.DfareportingApi(mock).pla
cementStrategies; | |
| 19628 var arg_profileId = "foo"; | |
| 19629 var arg_ids = buildUnnamed1553(); | |
| 19630 var arg_maxResults = 42; | |
| 19631 var arg_pageToken = "foo"; | |
| 19632 var arg_searchString = "foo"; | |
| 19633 var arg_sortField = "foo"; | |
| 19634 var arg_sortOrder = "foo"; | |
| 19635 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 19636 var path = (req.url).path; | |
| 19637 var pathOffset = 0; | |
| 19638 var index; | |
| 19639 var subPart; | |
| 19640 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 19641 pathOffset += 1; | |
| 19642 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 19643 pathOffset += 18; | |
| 19644 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 19645 pathOffset += 13; | |
| 19646 index = path.indexOf("/placementStrategies", pathOffset); | |
| 19647 unittest.expect(index >= 0, unittest.isTrue); | |
| 19648 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 19649 pathOffset = index; | |
| 19650 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 19651 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("/placementStrategies")); | |
| 19652 pathOffset += 20; | |
| 19653 | |
| 19654 var query = (req.url).query; | |
| 19655 var queryOffset = 0; | |
| 19656 var queryMap = {}; | |
| 19657 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 19658 parseBool(n) { | |
| 19659 if (n == "true") return true; | |
| 19660 if (n == "false") return false; | |
| 19661 if (n == null) return null; | |
| 19662 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 19663 } | |
| 19664 if (query.length > 0) { | |
| 19665 for (var part in query.split("&")) { | |
| 19666 var keyvalue = part.split("="); | |
| 19667 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 19668 } | |
| 19669 } | |
| 19670 unittest.expect(queryMap["ids"], unittest.equals(arg_ids)); | |
| 19671 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | |
| 19672 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 19673 unittest.expect(queryMap["searchString"].first, unittest.equals(arg_sear
chString)); | |
| 19674 unittest.expect(queryMap["sortField"].first, unittest.equals(arg_sortFie
ld)); | |
| 19675 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | |
| 19676 | |
| 19677 | |
| 19678 var h = { | |
| 19679 "content-type" : "application/json; charset=utf-8", | |
| 19680 }; | |
| 19681 var resp = convert.JSON.encode(buildPlacementStrategiesListResponse()); | |
| 19682 return new async.Future.value(stringResponse(200, h, resp)); | |
| 19683 }), true); | |
| 19684 res.list(arg_profileId, ids: arg_ids, maxResults: arg_maxResults, pageToke
n: arg_pageToken, searchString: arg_searchString, sortField: arg_sortField, sort
Order: arg_sortOrder).then(unittest.expectAsync(((api.PlacementStrategiesListRes
ponse response) { | |
| 19685 checkPlacementStrategiesListResponse(response); | |
| 19686 }))); | |
| 19687 }); | |
| 19688 | |
| 19689 unittest.test("method--patch", () { | |
| 19690 | |
| 19691 var mock = new HttpServerMock(); | |
| 19692 api.PlacementStrategiesResourceApi res = new api.DfareportingApi(mock).pla
cementStrategies; | |
| 19693 var arg_request = buildPlacementStrategy(); | |
| 19694 var arg_profileId = "foo"; | |
| 19695 var arg_id = "foo"; | |
| 19696 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 19697 var obj = new api.PlacementStrategy.fromJson(json); | |
| 19698 checkPlacementStrategy(obj); | |
| 19699 | |
| 19700 var path = (req.url).path; | |
| 19701 var pathOffset = 0; | |
| 19702 var index; | |
| 19703 var subPart; | |
| 19704 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 19705 pathOffset += 1; | |
| 19706 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 19707 pathOffset += 18; | |
| 19708 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 19709 pathOffset += 13; | |
| 19710 index = path.indexOf("/placementStrategies", pathOffset); | |
| 19711 unittest.expect(index >= 0, unittest.isTrue); | |
| 19712 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 19713 pathOffset = index; | |
| 19714 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 19715 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("/placementStrategies")); | |
| 19716 pathOffset += 20; | |
| 19717 | |
| 19718 var query = (req.url).query; | |
| 19719 var queryOffset = 0; | |
| 19720 var queryMap = {}; | |
| 19721 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 19722 parseBool(n) { | |
| 19723 if (n == "true") return true; | |
| 19724 if (n == "false") return false; | |
| 19725 if (n == null) return null; | |
| 19726 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 19727 } | |
| 19728 if (query.length > 0) { | |
| 19729 for (var part in query.split("&")) { | |
| 19730 var keyvalue = part.split("="); | |
| 19731 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 19732 } | |
| 19733 } | |
| 19734 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); | |
| 19735 | |
| 19736 | |
| 19737 var h = { | |
| 19738 "content-type" : "application/json; charset=utf-8", | |
| 19739 }; | |
| 19740 var resp = convert.JSON.encode(buildPlacementStrategy()); | |
| 19741 return new async.Future.value(stringResponse(200, h, resp)); | |
| 19742 }), true); | |
| 19743 res.patch(arg_request, arg_profileId, arg_id).then(unittest.expectAsync(((
api.PlacementStrategy response) { | |
| 19744 checkPlacementStrategy(response); | |
| 19745 }))); | |
| 19746 }); | |
| 19747 | |
| 19748 unittest.test("method--update", () { | |
| 19749 | |
| 19750 var mock = new HttpServerMock(); | |
| 19751 api.PlacementStrategiesResourceApi res = new api.DfareportingApi(mock).pla
cementStrategies; | |
| 19752 var arg_request = buildPlacementStrategy(); | |
| 19753 var arg_profileId = "foo"; | |
| 19754 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 19755 var obj = new api.PlacementStrategy.fromJson(json); | |
| 19756 checkPlacementStrategy(obj); | |
| 19757 | |
| 19758 var path = (req.url).path; | |
| 19759 var pathOffset = 0; | |
| 19760 var index; | |
| 19761 var subPart; | |
| 19762 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 19763 pathOffset += 1; | |
| 19764 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 19765 pathOffset += 18; | |
| 19766 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 19767 pathOffset += 13; | |
| 19768 index = path.indexOf("/placementStrategies", pathOffset); | |
| 19769 unittest.expect(index >= 0, unittest.isTrue); | |
| 19770 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 19771 pathOffset = index; | |
| 19772 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 19773 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("/placementStrategies")); | |
| 19774 pathOffset += 20; | |
| 19775 | |
| 19776 var query = (req.url).query; | |
| 19777 var queryOffset = 0; | |
| 19778 var queryMap = {}; | |
| 19779 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 19780 parseBool(n) { | |
| 19781 if (n == "true") return true; | |
| 19782 if (n == "false") return false; | |
| 19783 if (n == null) return null; | |
| 19784 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 19785 } | |
| 19786 if (query.length > 0) { | |
| 19787 for (var part in query.split("&")) { | |
| 19788 var keyvalue = part.split("="); | |
| 19789 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 19790 } | |
| 19791 } | |
| 19792 | |
| 19793 | |
| 19794 var h = { | |
| 19795 "content-type" : "application/json; charset=utf-8", | |
| 19796 }; | |
| 19797 var resp = convert.JSON.encode(buildPlacementStrategy()); | |
| 19798 return new async.Future.value(stringResponse(200, h, resp)); | |
| 19799 }), true); | |
| 19800 res.update(arg_request, arg_profileId).then(unittest.expectAsync(((api.Pla
cementStrategy response) { | |
| 19801 checkPlacementStrategy(response); | |
| 19802 }))); | |
| 19803 }); | |
| 19804 | |
| 19805 }); | |
| 19806 | |
| 19807 | |
| 19808 unittest.group("resource-PlacementsResourceApi", () { | |
| 19809 unittest.test("method--generatetags", () { | |
| 19810 | |
| 19811 var mock = new HttpServerMock(); | |
| 19812 api.PlacementsResourceApi res = new api.DfareportingApi(mock).placements; | |
| 19813 var arg_profileId = "foo"; | |
| 19814 var arg_campaignId = "foo"; | |
| 19815 var arg_placementIds = buildUnnamed1554(); | |
| 19816 var arg_tagFormats = buildUnnamed1555(); | |
| 19817 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 19818 var path = (req.url).path; | |
| 19819 var pathOffset = 0; | |
| 19820 var index; | |
| 19821 var subPart; | |
| 19822 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 19823 pathOffset += 1; | |
| 19824 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 19825 pathOffset += 18; | |
| 19826 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 19827 pathOffset += 13; | |
| 19828 index = path.indexOf("/placements/generatetags", pathOffset); | |
| 19829 unittest.expect(index >= 0, unittest.isTrue); | |
| 19830 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 19831 pathOffset = index; | |
| 19832 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 19833 unittest.expect(path.substring(pathOffset, pathOffset + 24), unittest.eq
uals("/placements/generatetags")); | |
| 19834 pathOffset += 24; | |
| 19835 | |
| 19836 var query = (req.url).query; | |
| 19837 var queryOffset = 0; | |
| 19838 var queryMap = {}; | |
| 19839 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 19840 parseBool(n) { | |
| 19841 if (n == "true") return true; | |
| 19842 if (n == "false") return false; | |
| 19843 if (n == null) return null; | |
| 19844 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 19845 } | |
| 19846 if (query.length > 0) { | |
| 19847 for (var part in query.split("&")) { | |
| 19848 var keyvalue = part.split("="); | |
| 19849 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 19850 } | |
| 19851 } | |
| 19852 unittest.expect(queryMap["campaignId"].first, unittest.equals(arg_campai
gnId)); | |
| 19853 unittest.expect(queryMap["placementIds"], unittest.equals(arg_placementI
ds)); | |
| 19854 unittest.expect(queryMap["tagFormats"], unittest.equals(arg_tagFormats))
; | |
| 19855 | |
| 19856 | |
| 19857 var h = { | |
| 19858 "content-type" : "application/json; charset=utf-8", | |
| 19859 }; | |
| 19860 var resp = convert.JSON.encode(buildPlacementsGenerateTagsResponse()); | |
| 19861 return new async.Future.value(stringResponse(200, h, resp)); | |
| 19862 }), true); | |
| 19863 res.generatetags(arg_profileId, campaignId: arg_campaignId, placementIds:
arg_placementIds, tagFormats: arg_tagFormats).then(unittest.expectAsync(((api.Pl
acementsGenerateTagsResponse response) { | |
| 19864 checkPlacementsGenerateTagsResponse(response); | |
| 19865 }))); | |
| 19866 }); | |
| 19867 | |
| 19868 unittest.test("method--get", () { | |
| 19869 | |
| 19870 var mock = new HttpServerMock(); | |
| 19871 api.PlacementsResourceApi res = new api.DfareportingApi(mock).placements; | |
| 19872 var arg_profileId = "foo"; | |
| 19873 var arg_id = "foo"; | |
| 19874 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 19875 var path = (req.url).path; | |
| 19876 var pathOffset = 0; | |
| 19877 var index; | |
| 19878 var subPart; | |
| 19879 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 19880 pathOffset += 1; | |
| 19881 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 19882 pathOffset += 18; | |
| 19883 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 19884 pathOffset += 13; | |
| 19885 index = path.indexOf("/placements/", pathOffset); | |
| 19886 unittest.expect(index >= 0, unittest.isTrue); | |
| 19887 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 19888 pathOffset = index; | |
| 19889 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 19890 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("/placements/")); | |
| 19891 pathOffset += 12; | |
| 19892 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 19893 pathOffset = path.length; | |
| 19894 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 19895 | |
| 19896 var query = (req.url).query; | |
| 19897 var queryOffset = 0; | |
| 19898 var queryMap = {}; | |
| 19899 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 19900 parseBool(n) { | |
| 19901 if (n == "true") return true; | |
| 19902 if (n == "false") return false; | |
| 19903 if (n == null) return null; | |
| 19904 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 19905 } | |
| 19906 if (query.length > 0) { | |
| 19907 for (var part in query.split("&")) { | |
| 19908 var keyvalue = part.split("="); | |
| 19909 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 19910 } | |
| 19911 } | |
| 19912 | |
| 19913 | |
| 19914 var h = { | |
| 19915 "content-type" : "application/json; charset=utf-8", | |
| 19916 }; | |
| 19917 var resp = convert.JSON.encode(buildPlacement()); | |
| 19918 return new async.Future.value(stringResponse(200, h, resp)); | |
| 19919 }), true); | |
| 19920 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.Placement r
esponse) { | |
| 19921 checkPlacement(response); | |
| 19922 }))); | |
| 19923 }); | |
| 19924 | |
| 19925 unittest.test("method--insert", () { | |
| 19926 | |
| 19927 var mock = new HttpServerMock(); | |
| 19928 api.PlacementsResourceApi res = new api.DfareportingApi(mock).placements; | |
| 19929 var arg_request = buildPlacement(); | |
| 19930 var arg_profileId = "foo"; | |
| 19931 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 19932 var obj = new api.Placement.fromJson(json); | |
| 19933 checkPlacement(obj); | |
| 19934 | |
| 19935 var path = (req.url).path; | |
| 19936 var pathOffset = 0; | |
| 19937 var index; | |
| 19938 var subPart; | |
| 19939 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 19940 pathOffset += 1; | |
| 19941 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 19942 pathOffset += 18; | |
| 19943 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 19944 pathOffset += 13; | |
| 19945 index = path.indexOf("/placements", pathOffset); | |
| 19946 unittest.expect(index >= 0, unittest.isTrue); | |
| 19947 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 19948 pathOffset = index; | |
| 19949 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 19950 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("/placements")); | |
| 19951 pathOffset += 11; | |
| 19952 | |
| 19953 var query = (req.url).query; | |
| 19954 var queryOffset = 0; | |
| 19955 var queryMap = {}; | |
| 19956 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 19957 parseBool(n) { | |
| 19958 if (n == "true") return true; | |
| 19959 if (n == "false") return false; | |
| 19960 if (n == null) return null; | |
| 19961 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 19962 } | |
| 19963 if (query.length > 0) { | |
| 19964 for (var part in query.split("&")) { | |
| 19965 var keyvalue = part.split("="); | |
| 19966 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 19967 } | |
| 19968 } | |
| 19969 | |
| 19970 | |
| 19971 var h = { | |
| 19972 "content-type" : "application/json; charset=utf-8", | |
| 19973 }; | |
| 19974 var resp = convert.JSON.encode(buildPlacement()); | |
| 19975 return new async.Future.value(stringResponse(200, h, resp)); | |
| 19976 }), true); | |
| 19977 res.insert(arg_request, arg_profileId).then(unittest.expectAsync(((api.Pla
cement response) { | |
| 19978 checkPlacement(response); | |
| 19979 }))); | |
| 19980 }); | |
| 19981 | |
| 19982 unittest.test("method--list", () { | |
| 19983 | |
| 19984 var mock = new HttpServerMock(); | |
| 19985 api.PlacementsResourceApi res = new api.DfareportingApi(mock).placements; | |
| 19986 var arg_profileId = "foo"; | |
| 19987 var arg_advertiserIds = buildUnnamed1556(); | |
| 19988 var arg_archived = true; | |
| 19989 var arg_campaignIds = buildUnnamed1557(); | |
| 19990 var arg_compatibilities = buildUnnamed1558(); | |
| 19991 var arg_contentCategoryIds = buildUnnamed1559(); | |
| 19992 var arg_directorySiteIds = buildUnnamed1560(); | |
| 19993 var arg_groupIds = buildUnnamed1561(); | |
| 19994 var arg_ids = buildUnnamed1562(); | |
| 19995 var arg_maxEndDate = "foo"; | |
| 19996 var arg_maxResults = 42; | |
| 19997 var arg_maxStartDate = "foo"; | |
| 19998 var arg_minEndDate = "foo"; | |
| 19999 var arg_minStartDate = "foo"; | |
| 20000 var arg_pageToken = "foo"; | |
| 20001 var arg_paymentSource = "foo"; | |
| 20002 var arg_placementStrategyIds = buildUnnamed1563(); | |
| 20003 var arg_pricingTypes = buildUnnamed1564(); | |
| 20004 var arg_searchString = "foo"; | |
| 20005 var arg_siteIds = buildUnnamed1565(); | |
| 20006 var arg_sizeIds = buildUnnamed1566(); | |
| 20007 var arg_sortField = "foo"; | |
| 20008 var arg_sortOrder = "foo"; | |
| 20009 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 20010 var path = (req.url).path; | |
| 20011 var pathOffset = 0; | |
| 20012 var index; | |
| 20013 var subPart; | |
| 20014 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 20015 pathOffset += 1; | |
| 20016 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 20017 pathOffset += 18; | |
| 20018 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 20019 pathOffset += 13; | |
| 20020 index = path.indexOf("/placements", pathOffset); | |
| 20021 unittest.expect(index >= 0, unittest.isTrue); | |
| 20022 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 20023 pathOffset = index; | |
| 20024 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 20025 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("/placements")); | |
| 20026 pathOffset += 11; | |
| 20027 | |
| 20028 var query = (req.url).query; | |
| 20029 var queryOffset = 0; | |
| 20030 var queryMap = {}; | |
| 20031 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 20032 parseBool(n) { | |
| 20033 if (n == "true") return true; | |
| 20034 if (n == "false") return false; | |
| 20035 if (n == null) return null; | |
| 20036 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 20037 } | |
| 20038 if (query.length > 0) { | |
| 20039 for (var part in query.split("&")) { | |
| 20040 var keyvalue = part.split("="); | |
| 20041 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 20042 } | |
| 20043 } | |
| 20044 unittest.expect(queryMap["advertiserIds"], unittest.equals(arg_advertise
rIds)); | |
| 20045 unittest.expect(queryMap["archived"].first, unittest.equals("$arg_archiv
ed")); | |
| 20046 unittest.expect(queryMap["campaignIds"], unittest.equals(arg_campaignIds
)); | |
| 20047 unittest.expect(queryMap["compatibilities"], unittest.equals(arg_compati
bilities)); | |
| 20048 unittest.expect(queryMap["contentCategoryIds"], unittest.equals(arg_cont
entCategoryIds)); | |
| 20049 unittest.expect(queryMap["directorySiteIds"], unittest.equals(arg_direct
orySiteIds)); | |
| 20050 unittest.expect(queryMap["groupIds"], unittest.equals(arg_groupIds)); | |
| 20051 unittest.expect(queryMap["ids"], unittest.equals(arg_ids)); | |
| 20052 unittest.expect(queryMap["maxEndDate"].first, unittest.equals(arg_maxEnd
Date)); | |
| 20053 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | |
| 20054 unittest.expect(queryMap["maxStartDate"].first, unittest.equals(arg_maxS
tartDate)); | |
| 20055 unittest.expect(queryMap["minEndDate"].first, unittest.equals(arg_minEnd
Date)); | |
| 20056 unittest.expect(queryMap["minStartDate"].first, unittest.equals(arg_minS
tartDate)); | |
| 20057 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 20058 unittest.expect(queryMap["paymentSource"].first, unittest.equals(arg_pay
mentSource)); | |
| 20059 unittest.expect(queryMap["placementStrategyIds"], unittest.equals(arg_pl
acementStrategyIds)); | |
| 20060 unittest.expect(queryMap["pricingTypes"], unittest.equals(arg_pricingTyp
es)); | |
| 20061 unittest.expect(queryMap["searchString"].first, unittest.equals(arg_sear
chString)); | |
| 20062 unittest.expect(queryMap["siteIds"], unittest.equals(arg_siteIds)); | |
| 20063 unittest.expect(queryMap["sizeIds"], unittest.equals(arg_sizeIds)); | |
| 20064 unittest.expect(queryMap["sortField"].first, unittest.equals(arg_sortFie
ld)); | |
| 20065 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | |
| 20066 | |
| 20067 | |
| 20068 var h = { | |
| 20069 "content-type" : "application/json; charset=utf-8", | |
| 20070 }; | |
| 20071 var resp = convert.JSON.encode(buildPlacementsListResponse()); | |
| 20072 return new async.Future.value(stringResponse(200, h, resp)); | |
| 20073 }), true); | |
| 20074 res.list(arg_profileId, advertiserIds: arg_advertiserIds, archived: arg_ar
chived, campaignIds: arg_campaignIds, compatibilities: arg_compatibilities, cont
entCategoryIds: arg_contentCategoryIds, directorySiteIds: arg_directorySiteIds,
groupIds: arg_groupIds, ids: arg_ids, maxEndDate: arg_maxEndDate, maxResults: ar
g_maxResults, maxStartDate: arg_maxStartDate, minEndDate: arg_minEndDate, minSta
rtDate: arg_minStartDate, pageToken: arg_pageToken, paymentSource: arg_paymentSo
urce, placementStrategyIds: arg_placementStrategyIds, pricingTypes: arg_pricingT
ypes, searchString: arg_searchString, siteIds: arg_siteIds, sizeIds: arg_sizeIds
, sortField: arg_sortField, sortOrder: arg_sortOrder).then(unittest.expectAsync(
((api.PlacementsListResponse response) { | |
| 20075 checkPlacementsListResponse(response); | |
| 20076 }))); | |
| 20077 }); | |
| 20078 | |
| 20079 unittest.test("method--patch", () { | |
| 20080 | |
| 20081 var mock = new HttpServerMock(); | |
| 20082 api.PlacementsResourceApi res = new api.DfareportingApi(mock).placements; | |
| 20083 var arg_request = buildPlacement(); | |
| 20084 var arg_profileId = "foo"; | |
| 20085 var arg_id = "foo"; | |
| 20086 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 20087 var obj = new api.Placement.fromJson(json); | |
| 20088 checkPlacement(obj); | |
| 20089 | |
| 20090 var path = (req.url).path; | |
| 20091 var pathOffset = 0; | |
| 20092 var index; | |
| 20093 var subPart; | |
| 20094 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 20095 pathOffset += 1; | |
| 20096 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 20097 pathOffset += 18; | |
| 20098 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 20099 pathOffset += 13; | |
| 20100 index = path.indexOf("/placements", pathOffset); | |
| 20101 unittest.expect(index >= 0, unittest.isTrue); | |
| 20102 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 20103 pathOffset = index; | |
| 20104 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 20105 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("/placements")); | |
| 20106 pathOffset += 11; | |
| 20107 | |
| 20108 var query = (req.url).query; | |
| 20109 var queryOffset = 0; | |
| 20110 var queryMap = {}; | |
| 20111 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 20112 parseBool(n) { | |
| 20113 if (n == "true") return true; | |
| 20114 if (n == "false") return false; | |
| 20115 if (n == null) return null; | |
| 20116 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 20117 } | |
| 20118 if (query.length > 0) { | |
| 20119 for (var part in query.split("&")) { | |
| 20120 var keyvalue = part.split("="); | |
| 20121 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 20122 } | |
| 20123 } | |
| 20124 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); | |
| 20125 | |
| 20126 | |
| 20127 var h = { | |
| 20128 "content-type" : "application/json; charset=utf-8", | |
| 20129 }; | |
| 20130 var resp = convert.JSON.encode(buildPlacement()); | |
| 20131 return new async.Future.value(stringResponse(200, h, resp)); | |
| 20132 }), true); | |
| 20133 res.patch(arg_request, arg_profileId, arg_id).then(unittest.expectAsync(((
api.Placement response) { | |
| 20134 checkPlacement(response); | |
| 20135 }))); | |
| 20136 }); | |
| 20137 | |
| 20138 unittest.test("method--update", () { | |
| 20139 | |
| 20140 var mock = new HttpServerMock(); | |
| 20141 api.PlacementsResourceApi res = new api.DfareportingApi(mock).placements; | |
| 20142 var arg_request = buildPlacement(); | |
| 20143 var arg_profileId = "foo"; | |
| 20144 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 20145 var obj = new api.Placement.fromJson(json); | |
| 20146 checkPlacement(obj); | |
| 20147 | |
| 20148 var path = (req.url).path; | |
| 20149 var pathOffset = 0; | |
| 20150 var index; | |
| 20151 var subPart; | |
| 20152 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 20153 pathOffset += 1; | |
| 20154 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 20155 pathOffset += 18; | |
| 20156 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 20157 pathOffset += 13; | |
| 20158 index = path.indexOf("/placements", pathOffset); | |
| 20159 unittest.expect(index >= 0, unittest.isTrue); | |
| 20160 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 20161 pathOffset = index; | |
| 20162 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 20163 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("/placements")); | |
| 20164 pathOffset += 11; | |
| 20165 | |
| 20166 var query = (req.url).query; | |
| 20167 var queryOffset = 0; | |
| 20168 var queryMap = {}; | |
| 20169 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 20170 parseBool(n) { | |
| 20171 if (n == "true") return true; | |
| 20172 if (n == "false") return false; | |
| 20173 if (n == null) return null; | |
| 20174 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 20175 } | |
| 20176 if (query.length > 0) { | |
| 20177 for (var part in query.split("&")) { | |
| 20178 var keyvalue = part.split("="); | |
| 20179 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 20180 } | |
| 20181 } | |
| 20182 | |
| 20183 | |
| 20184 var h = { | |
| 20185 "content-type" : "application/json; charset=utf-8", | |
| 20186 }; | |
| 20187 var resp = convert.JSON.encode(buildPlacement()); | |
| 20188 return new async.Future.value(stringResponse(200, h, resp)); | |
| 20189 }), true); | |
| 20190 res.update(arg_request, arg_profileId).then(unittest.expectAsync(((api.Pla
cement response) { | |
| 20191 checkPlacement(response); | |
| 20192 }))); | |
| 20193 }); | |
| 20194 | |
| 20195 }); | |
| 20196 | |
| 20197 | |
| 20198 unittest.group("resource-PlatformTypesResourceApi", () { | |
| 20199 unittest.test("method--get", () { | |
| 20200 | |
| 20201 var mock = new HttpServerMock(); | |
| 20202 api.PlatformTypesResourceApi res = new api.DfareportingApi(mock).platformT
ypes; | |
| 20203 var arg_profileId = "foo"; | |
| 20204 var arg_id = "foo"; | |
| 20205 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 20206 var path = (req.url).path; | |
| 20207 var pathOffset = 0; | |
| 20208 var index; | |
| 20209 var subPart; | |
| 20210 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 20211 pathOffset += 1; | |
| 20212 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 20213 pathOffset += 18; | |
| 20214 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 20215 pathOffset += 13; | |
| 20216 index = path.indexOf("/platformTypes/", pathOffset); | |
| 20217 unittest.expect(index >= 0, unittest.isTrue); | |
| 20218 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 20219 pathOffset = index; | |
| 20220 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 20221 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/platformTypes/")); | |
| 20222 pathOffset += 15; | |
| 20223 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 20224 pathOffset = path.length; | |
| 20225 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 20226 | |
| 20227 var query = (req.url).query; | |
| 20228 var queryOffset = 0; | |
| 20229 var queryMap = {}; | |
| 20230 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 20231 parseBool(n) { | |
| 20232 if (n == "true") return true; | |
| 20233 if (n == "false") return false; | |
| 20234 if (n == null) return null; | |
| 20235 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 20236 } | |
| 20237 if (query.length > 0) { | |
| 20238 for (var part in query.split("&")) { | |
| 20239 var keyvalue = part.split("="); | |
| 20240 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 20241 } | |
| 20242 } | |
| 20243 | |
| 20244 | |
| 20245 var h = { | |
| 20246 "content-type" : "application/json; charset=utf-8", | |
| 20247 }; | |
| 20248 var resp = convert.JSON.encode(buildPlatformType()); | |
| 20249 return new async.Future.value(stringResponse(200, h, resp)); | |
| 20250 }), true); | |
| 20251 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.PlatformTyp
e response) { | |
| 20252 checkPlatformType(response); | |
| 20253 }))); | |
| 20254 }); | |
| 20255 | |
| 20256 unittest.test("method--list", () { | |
| 20257 | |
| 20258 var mock = new HttpServerMock(); | |
| 20259 api.PlatformTypesResourceApi res = new api.DfareportingApi(mock).platformT
ypes; | |
| 20260 var arg_profileId = "foo"; | |
| 20261 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 20262 var path = (req.url).path; | |
| 20263 var pathOffset = 0; | |
| 20264 var index; | |
| 20265 var subPart; | |
| 20266 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 20267 pathOffset += 1; | |
| 20268 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 20269 pathOffset += 18; | |
| 20270 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 20271 pathOffset += 13; | |
| 20272 index = path.indexOf("/platformTypes", pathOffset); | |
| 20273 unittest.expect(index >= 0, unittest.isTrue); | |
| 20274 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 20275 pathOffset = index; | |
| 20276 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 20277 unittest.expect(path.substring(pathOffset, pathOffset + 14), unittest.eq
uals("/platformTypes")); | |
| 20278 pathOffset += 14; | |
| 20279 | |
| 20280 var query = (req.url).query; | |
| 20281 var queryOffset = 0; | |
| 20282 var queryMap = {}; | |
| 20283 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 20284 parseBool(n) { | |
| 20285 if (n == "true") return true; | |
| 20286 if (n == "false") return false; | |
| 20287 if (n == null) return null; | |
| 20288 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 20289 } | |
| 20290 if (query.length > 0) { | |
| 20291 for (var part in query.split("&")) { | |
| 20292 var keyvalue = part.split("="); | |
| 20293 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 20294 } | |
| 20295 } | |
| 20296 | |
| 20297 | |
| 20298 var h = { | |
| 20299 "content-type" : "application/json; charset=utf-8", | |
| 20300 }; | |
| 20301 var resp = convert.JSON.encode(buildPlatformTypesListResponse()); | |
| 20302 return new async.Future.value(stringResponse(200, h, resp)); | |
| 20303 }), true); | |
| 20304 res.list(arg_profileId).then(unittest.expectAsync(((api.PlatformTypesListR
esponse response) { | |
| 20305 checkPlatformTypesListResponse(response); | |
| 20306 }))); | |
| 20307 }); | |
| 20308 | |
| 20309 }); | |
| 20310 | |
| 20311 | |
| 20312 unittest.group("resource-PostalCodesResourceApi", () { | |
| 20313 unittest.test("method--get", () { | |
| 20314 | |
| 20315 var mock = new HttpServerMock(); | |
| 20316 api.PostalCodesResourceApi res = new api.DfareportingApi(mock).postalCodes
; | |
| 20317 var arg_profileId = "foo"; | |
| 20318 var arg_code = "foo"; | |
| 20319 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 20320 var path = (req.url).path; | |
| 20321 var pathOffset = 0; | |
| 20322 var index; | |
| 20323 var subPart; | |
| 20324 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 20325 pathOffset += 1; | |
| 20326 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 20327 pathOffset += 18; | |
| 20328 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 20329 pathOffset += 13; | |
| 20330 index = path.indexOf("/postalCodes/", pathOffset); | |
| 20331 unittest.expect(index >= 0, unittest.isTrue); | |
| 20332 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 20333 pathOffset = index; | |
| 20334 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 20335 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("/postalCodes/")); | |
| 20336 pathOffset += 13; | |
| 20337 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 20338 pathOffset = path.length; | |
| 20339 unittest.expect(subPart, unittest.equals("$arg_code")); | |
| 20340 | |
| 20341 var query = (req.url).query; | |
| 20342 var queryOffset = 0; | |
| 20343 var queryMap = {}; | |
| 20344 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 20345 parseBool(n) { | |
| 20346 if (n == "true") return true; | |
| 20347 if (n == "false") return false; | |
| 20348 if (n == null) return null; | |
| 20349 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 20350 } | |
| 20351 if (query.length > 0) { | |
| 20352 for (var part in query.split("&")) { | |
| 20353 var keyvalue = part.split("="); | |
| 20354 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 20355 } | |
| 20356 } | |
| 20357 | |
| 20358 | |
| 20359 var h = { | |
| 20360 "content-type" : "application/json; charset=utf-8", | |
| 20361 }; | |
| 20362 var resp = convert.JSON.encode(buildPostalCode()); | |
| 20363 return new async.Future.value(stringResponse(200, h, resp)); | |
| 20364 }), true); | |
| 20365 res.get(arg_profileId, arg_code).then(unittest.expectAsync(((api.PostalCod
e response) { | |
| 20366 checkPostalCode(response); | |
| 20367 }))); | |
| 20368 }); | |
| 20369 | |
| 20370 unittest.test("method--list", () { | |
| 20371 | |
| 20372 var mock = new HttpServerMock(); | |
| 20373 api.PostalCodesResourceApi res = new api.DfareportingApi(mock).postalCodes
; | |
| 20374 var arg_profileId = "foo"; | |
| 20375 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 20376 var path = (req.url).path; | |
| 20377 var pathOffset = 0; | |
| 20378 var index; | |
| 20379 var subPart; | |
| 20380 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 20381 pathOffset += 1; | |
| 20382 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 20383 pathOffset += 18; | |
| 20384 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 20385 pathOffset += 13; | |
| 20386 index = path.indexOf("/postalCodes", pathOffset); | |
| 20387 unittest.expect(index >= 0, unittest.isTrue); | |
| 20388 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 20389 pathOffset = index; | |
| 20390 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 20391 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("/postalCodes")); | |
| 20392 pathOffset += 12; | |
| 20393 | |
| 20394 var query = (req.url).query; | |
| 20395 var queryOffset = 0; | |
| 20396 var queryMap = {}; | |
| 20397 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 20398 parseBool(n) { | |
| 20399 if (n == "true") return true; | |
| 20400 if (n == "false") return false; | |
| 20401 if (n == null) return null; | |
| 20402 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 20403 } | |
| 20404 if (query.length > 0) { | |
| 20405 for (var part in query.split("&")) { | |
| 20406 var keyvalue = part.split("="); | |
| 20407 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 20408 } | |
| 20409 } | |
| 20410 | |
| 20411 | |
| 20412 var h = { | |
| 20413 "content-type" : "application/json; charset=utf-8", | |
| 20414 }; | |
| 20415 var resp = convert.JSON.encode(buildPostalCodesListResponse()); | |
| 20416 return new async.Future.value(stringResponse(200, h, resp)); | |
| 20417 }), true); | |
| 20418 res.list(arg_profileId).then(unittest.expectAsync(((api.PostalCodesListRes
ponse response) { | |
| 20419 checkPostalCodesListResponse(response); | |
| 20420 }))); | |
| 20421 }); | |
| 20422 | |
| 20423 }); | |
| 20424 | |
| 20425 | |
| 20426 unittest.group("resource-ProjectsResourceApi", () { | |
| 20427 unittest.test("method--get", () { | |
| 20428 | |
| 20429 var mock = new HttpServerMock(); | |
| 20430 api.ProjectsResourceApi res = new api.DfareportingApi(mock).projects; | |
| 20431 var arg_profileId = "foo"; | |
| 20432 var arg_id = "foo"; | |
| 20433 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 20434 var path = (req.url).path; | |
| 20435 var pathOffset = 0; | |
| 20436 var index; | |
| 20437 var subPart; | |
| 20438 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 20439 pathOffset += 1; | |
| 20440 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 20441 pathOffset += 18; | |
| 20442 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 20443 pathOffset += 13; | |
| 20444 index = path.indexOf("/projects/", pathOffset); | |
| 20445 unittest.expect(index >= 0, unittest.isTrue); | |
| 20446 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 20447 pathOffset = index; | |
| 20448 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 20449 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/projects/")); | |
| 20450 pathOffset += 10; | |
| 20451 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 20452 pathOffset = path.length; | |
| 20453 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 20454 | |
| 20455 var query = (req.url).query; | |
| 20456 var queryOffset = 0; | |
| 20457 var queryMap = {}; | |
| 20458 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 20459 parseBool(n) { | |
| 20460 if (n == "true") return true; | |
| 20461 if (n == "false") return false; | |
| 20462 if (n == null) return null; | |
| 20463 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 20464 } | |
| 20465 if (query.length > 0) { | |
| 20466 for (var part in query.split("&")) { | |
| 20467 var keyvalue = part.split("="); | |
| 20468 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 20469 } | |
| 20470 } | |
| 20471 | |
| 20472 | |
| 20473 var h = { | |
| 20474 "content-type" : "application/json; charset=utf-8", | |
| 20475 }; | |
| 20476 var resp = convert.JSON.encode(buildProject()); | |
| 20477 return new async.Future.value(stringResponse(200, h, resp)); | |
| 20478 }), true); | |
| 20479 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.Project res
ponse) { | |
| 20480 checkProject(response); | |
| 20481 }))); | |
| 20482 }); | |
| 20483 | |
| 20484 unittest.test("method--list", () { | |
| 20485 | |
| 20486 var mock = new HttpServerMock(); | |
| 20487 api.ProjectsResourceApi res = new api.DfareportingApi(mock).projects; | |
| 20488 var arg_profileId = "foo"; | |
| 20489 var arg_advertiserIds = buildUnnamed1567(); | |
| 20490 var arg_ids = buildUnnamed1568(); | |
| 20491 var arg_maxResults = 42; | |
| 20492 var arg_pageToken = "foo"; | |
| 20493 var arg_searchString = "foo"; | |
| 20494 var arg_sortField = "foo"; | |
| 20495 var arg_sortOrder = "foo"; | |
| 20496 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 20497 var path = (req.url).path; | |
| 20498 var pathOffset = 0; | |
| 20499 var index; | |
| 20500 var subPart; | |
| 20501 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 20502 pathOffset += 1; | |
| 20503 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 20504 pathOffset += 18; | |
| 20505 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 20506 pathOffset += 13; | |
| 20507 index = path.indexOf("/projects", pathOffset); | |
| 20508 unittest.expect(index >= 0, unittest.isTrue); | |
| 20509 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 20510 pathOffset = index; | |
| 20511 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 20512 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("/projects")); | |
| 20513 pathOffset += 9; | |
| 20514 | |
| 20515 var query = (req.url).query; | |
| 20516 var queryOffset = 0; | |
| 20517 var queryMap = {}; | |
| 20518 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 20519 parseBool(n) { | |
| 20520 if (n == "true") return true; | |
| 20521 if (n == "false") return false; | |
| 20522 if (n == null) return null; | |
| 20523 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 20524 } | |
| 20525 if (query.length > 0) { | |
| 20526 for (var part in query.split("&")) { | |
| 20527 var keyvalue = part.split("="); | |
| 20528 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 20529 } | |
| 20530 } | |
| 20531 unittest.expect(queryMap["advertiserIds"], unittest.equals(arg_advertise
rIds)); | |
| 20532 unittest.expect(queryMap["ids"], unittest.equals(arg_ids)); | |
| 20533 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | |
| 20534 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 20535 unittest.expect(queryMap["searchString"].first, unittest.equals(arg_sear
chString)); | |
| 20536 unittest.expect(queryMap["sortField"].first, unittest.equals(arg_sortFie
ld)); | |
| 20537 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | |
| 20538 | |
| 20539 | |
| 20540 var h = { | |
| 20541 "content-type" : "application/json; charset=utf-8", | |
| 20542 }; | |
| 20543 var resp = convert.JSON.encode(buildProjectsListResponse()); | |
| 20544 return new async.Future.value(stringResponse(200, h, resp)); | |
| 20545 }), true); | |
| 20546 res.list(arg_profileId, advertiserIds: arg_advertiserIds, ids: arg_ids, ma
xResults: arg_maxResults, pageToken: arg_pageToken, searchString: arg_searchStri
ng, sortField: arg_sortField, sortOrder: arg_sortOrder).then(unittest.expectAsyn
c(((api.ProjectsListResponse response) { | |
| 20547 checkProjectsListResponse(response); | |
| 20548 }))); | |
| 20549 }); | |
| 20550 | |
| 20551 }); | |
| 20552 | |
| 20553 | |
| 20554 unittest.group("resource-RegionsResourceApi", () { | |
| 20555 unittest.test("method--list", () { | |
| 20556 | |
| 20557 var mock = new HttpServerMock(); | |
| 20558 api.RegionsResourceApi res = new api.DfareportingApi(mock).regions; | |
| 20559 var arg_profileId = "foo"; | |
| 20560 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 20561 var path = (req.url).path; | |
| 20562 var pathOffset = 0; | |
| 20563 var index; | |
| 20564 var subPart; | |
| 20565 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 20566 pathOffset += 1; | |
| 20567 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 20568 pathOffset += 18; | |
| 20569 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 20570 pathOffset += 13; | |
| 20571 index = path.indexOf("/regions", pathOffset); | |
| 20572 unittest.expect(index >= 0, unittest.isTrue); | |
| 20573 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 20574 pathOffset = index; | |
| 20575 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 20576 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("/regions")); | |
| 20577 pathOffset += 8; | |
| 20578 | |
| 20579 var query = (req.url).query; | |
| 20580 var queryOffset = 0; | |
| 20581 var queryMap = {}; | |
| 20582 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 20583 parseBool(n) { | |
| 20584 if (n == "true") return true; | |
| 20585 if (n == "false") return false; | |
| 20586 if (n == null) return null; | |
| 20587 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 20588 } | |
| 20589 if (query.length > 0) { | |
| 20590 for (var part in query.split("&")) { | |
| 20591 var keyvalue = part.split("="); | |
| 20592 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 20593 } | |
| 20594 } | |
| 20595 | |
| 20596 | |
| 20597 var h = { | |
| 20598 "content-type" : "application/json; charset=utf-8", | |
| 20599 }; | |
| 20600 var resp = convert.JSON.encode(buildRegionsListResponse()); | |
| 20601 return new async.Future.value(stringResponse(200, h, resp)); | |
| 20602 }), true); | |
| 20603 res.list(arg_profileId).then(unittest.expectAsync(((api.RegionsListRespons
e response) { | |
| 20604 checkRegionsListResponse(response); | |
| 20605 }))); | |
| 20606 }); | |
| 20607 | |
| 20608 }); | |
| 20609 | |
| 20610 | |
| 20611 unittest.group("resource-RemarketingListSharesResourceApi", () { | |
| 20612 unittest.test("method--get", () { | |
| 20613 | |
| 20614 var mock = new HttpServerMock(); | |
| 20615 api.RemarketingListSharesResourceApi res = new api.DfareportingApi(mock).r
emarketingListShares; | |
| 20616 var arg_profileId = "foo"; | |
| 20617 var arg_remarketingListId = "foo"; | |
| 20618 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 20619 var path = (req.url).path; | |
| 20620 var pathOffset = 0; | |
| 20621 var index; | |
| 20622 var subPart; | |
| 20623 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 20624 pathOffset += 1; | |
| 20625 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 20626 pathOffset += 18; | |
| 20627 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 20628 pathOffset += 13; | |
| 20629 index = path.indexOf("/remarketingListShares/", pathOffset); | |
| 20630 unittest.expect(index >= 0, unittest.isTrue); | |
| 20631 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 20632 pathOffset = index; | |
| 20633 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 20634 unittest.expect(path.substring(pathOffset, pathOffset + 23), unittest.eq
uals("/remarketingListShares/")); | |
| 20635 pathOffset += 23; | |
| 20636 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 20637 pathOffset = path.length; | |
| 20638 unittest.expect(subPart, unittest.equals("$arg_remarketingListId")); | |
| 20639 | |
| 20640 var query = (req.url).query; | |
| 20641 var queryOffset = 0; | |
| 20642 var queryMap = {}; | |
| 20643 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 20644 parseBool(n) { | |
| 20645 if (n == "true") return true; | |
| 20646 if (n == "false") return false; | |
| 20647 if (n == null) return null; | |
| 20648 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 20649 } | |
| 20650 if (query.length > 0) { | |
| 20651 for (var part in query.split("&")) { | |
| 20652 var keyvalue = part.split("="); | |
| 20653 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 20654 } | |
| 20655 } | |
| 20656 | |
| 20657 | |
| 20658 var h = { | |
| 20659 "content-type" : "application/json; charset=utf-8", | |
| 20660 }; | |
| 20661 var resp = convert.JSON.encode(buildRemarketingListShare()); | |
| 20662 return new async.Future.value(stringResponse(200, h, resp)); | |
| 20663 }), true); | |
| 20664 res.get(arg_profileId, arg_remarketingListId).then(unittest.expectAsync(((
api.RemarketingListShare response) { | |
| 20665 checkRemarketingListShare(response); | |
| 20666 }))); | |
| 20667 }); | |
| 20668 | |
| 20669 unittest.test("method--patch", () { | |
| 20670 | |
| 20671 var mock = new HttpServerMock(); | |
| 20672 api.RemarketingListSharesResourceApi res = new api.DfareportingApi(mock).r
emarketingListShares; | |
| 20673 var arg_request = buildRemarketingListShare(); | |
| 20674 var arg_profileId = "foo"; | |
| 20675 var arg_remarketingListId = "foo"; | |
| 20676 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 20677 var obj = new api.RemarketingListShare.fromJson(json); | |
| 20678 checkRemarketingListShare(obj); | |
| 20679 | |
| 20680 var path = (req.url).path; | |
| 20681 var pathOffset = 0; | |
| 20682 var index; | |
| 20683 var subPart; | |
| 20684 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 20685 pathOffset += 1; | |
| 20686 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 20687 pathOffset += 18; | |
| 20688 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 20689 pathOffset += 13; | |
| 20690 index = path.indexOf("/remarketingListShares", pathOffset); | |
| 20691 unittest.expect(index >= 0, unittest.isTrue); | |
| 20692 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 20693 pathOffset = index; | |
| 20694 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 20695 unittest.expect(path.substring(pathOffset, pathOffset + 22), unittest.eq
uals("/remarketingListShares")); | |
| 20696 pathOffset += 22; | |
| 20697 | |
| 20698 var query = (req.url).query; | |
| 20699 var queryOffset = 0; | |
| 20700 var queryMap = {}; | |
| 20701 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 20702 parseBool(n) { | |
| 20703 if (n == "true") return true; | |
| 20704 if (n == "false") return false; | |
| 20705 if (n == null) return null; | |
| 20706 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 20707 } | |
| 20708 if (query.length > 0) { | |
| 20709 for (var part in query.split("&")) { | |
| 20710 var keyvalue = part.split("="); | |
| 20711 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 20712 } | |
| 20713 } | |
| 20714 unittest.expect(queryMap["remarketingListId"].first, unittest.equals(arg
_remarketingListId)); | |
| 20715 | |
| 20716 | |
| 20717 var h = { | |
| 20718 "content-type" : "application/json; charset=utf-8", | |
| 20719 }; | |
| 20720 var resp = convert.JSON.encode(buildRemarketingListShare()); | |
| 20721 return new async.Future.value(stringResponse(200, h, resp)); | |
| 20722 }), true); | |
| 20723 res.patch(arg_request, arg_profileId, arg_remarketingListId).then(unittest
.expectAsync(((api.RemarketingListShare response) { | |
| 20724 checkRemarketingListShare(response); | |
| 20725 }))); | |
| 20726 }); | |
| 20727 | |
| 20728 unittest.test("method--update", () { | |
| 20729 | |
| 20730 var mock = new HttpServerMock(); | |
| 20731 api.RemarketingListSharesResourceApi res = new api.DfareportingApi(mock).r
emarketingListShares; | |
| 20732 var arg_request = buildRemarketingListShare(); | |
| 20733 var arg_profileId = "foo"; | |
| 20734 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 20735 var obj = new api.RemarketingListShare.fromJson(json); | |
| 20736 checkRemarketingListShare(obj); | |
| 20737 | |
| 20738 var path = (req.url).path; | |
| 20739 var pathOffset = 0; | |
| 20740 var index; | |
| 20741 var subPart; | |
| 20742 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 20743 pathOffset += 1; | |
| 20744 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 20745 pathOffset += 18; | |
| 20746 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 20747 pathOffset += 13; | |
| 20748 index = path.indexOf("/remarketingListShares", pathOffset); | |
| 20749 unittest.expect(index >= 0, unittest.isTrue); | |
| 20750 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 20751 pathOffset = index; | |
| 20752 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 20753 unittest.expect(path.substring(pathOffset, pathOffset + 22), unittest.eq
uals("/remarketingListShares")); | |
| 20754 pathOffset += 22; | |
| 20755 | |
| 20756 var query = (req.url).query; | |
| 20757 var queryOffset = 0; | |
| 20758 var queryMap = {}; | |
| 20759 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 20760 parseBool(n) { | |
| 20761 if (n == "true") return true; | |
| 20762 if (n == "false") return false; | |
| 20763 if (n == null) return null; | |
| 20764 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 20765 } | |
| 20766 if (query.length > 0) { | |
| 20767 for (var part in query.split("&")) { | |
| 20768 var keyvalue = part.split("="); | |
| 20769 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 20770 } | |
| 20771 } | |
| 20772 | |
| 20773 | |
| 20774 var h = { | |
| 20775 "content-type" : "application/json; charset=utf-8", | |
| 20776 }; | |
| 20777 var resp = convert.JSON.encode(buildRemarketingListShare()); | |
| 20778 return new async.Future.value(stringResponse(200, h, resp)); | |
| 20779 }), true); | |
| 20780 res.update(arg_request, arg_profileId).then(unittest.expectAsync(((api.Rem
arketingListShare response) { | |
| 20781 checkRemarketingListShare(response); | |
| 20782 }))); | |
| 20783 }); | |
| 20784 | |
| 20785 }); | |
| 20786 | |
| 20787 | |
| 20788 unittest.group("resource-RemarketingListsResourceApi", () { | |
| 20789 unittest.test("method--get", () { | |
| 20790 | |
| 20791 var mock = new HttpServerMock(); | |
| 20792 api.RemarketingListsResourceApi res = new api.DfareportingApi(mock).remark
etingLists; | |
| 20793 var arg_profileId = "foo"; | |
| 20794 var arg_id = "foo"; | |
| 20795 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 20796 var path = (req.url).path; | |
| 20797 var pathOffset = 0; | |
| 20798 var index; | |
| 20799 var subPart; | |
| 20800 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 20801 pathOffset += 1; | |
| 20802 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 20803 pathOffset += 18; | |
| 20804 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 20805 pathOffset += 13; | |
| 20806 index = path.indexOf("/remarketingLists/", pathOffset); | |
| 20807 unittest.expect(index >= 0, unittest.isTrue); | |
| 20808 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 20809 pathOffset = index; | |
| 20810 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 20811 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("/remarketingLists/")); | |
| 20812 pathOffset += 18; | |
| 20813 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 20814 pathOffset = path.length; | |
| 20815 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 20816 | |
| 20817 var query = (req.url).query; | |
| 20818 var queryOffset = 0; | |
| 20819 var queryMap = {}; | |
| 20820 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 20821 parseBool(n) { | |
| 20822 if (n == "true") return true; | |
| 20823 if (n == "false") return false; | |
| 20824 if (n == null) return null; | |
| 20825 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 20826 } | |
| 20827 if (query.length > 0) { | |
| 20828 for (var part in query.split("&")) { | |
| 20829 var keyvalue = part.split("="); | |
| 20830 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 20831 } | |
| 20832 } | |
| 20833 | |
| 20834 | |
| 20835 var h = { | |
| 20836 "content-type" : "application/json; charset=utf-8", | |
| 20837 }; | |
| 20838 var resp = convert.JSON.encode(buildRemarketingList()); | |
| 20839 return new async.Future.value(stringResponse(200, h, resp)); | |
| 20840 }), true); | |
| 20841 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.Remarketing
List response) { | |
| 20842 checkRemarketingList(response); | |
| 20843 }))); | |
| 20844 }); | |
| 20845 | |
| 20846 unittest.test("method--insert", () { | |
| 20847 | |
| 20848 var mock = new HttpServerMock(); | |
| 20849 api.RemarketingListsResourceApi res = new api.DfareportingApi(mock).remark
etingLists; | |
| 20850 var arg_request = buildRemarketingList(); | |
| 20851 var arg_profileId = "foo"; | |
| 20852 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 20853 var obj = new api.RemarketingList.fromJson(json); | |
| 20854 checkRemarketingList(obj); | |
| 20855 | |
| 20856 var path = (req.url).path; | |
| 20857 var pathOffset = 0; | |
| 20858 var index; | |
| 20859 var subPart; | |
| 20860 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 20861 pathOffset += 1; | |
| 20862 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 20863 pathOffset += 18; | |
| 20864 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 20865 pathOffset += 13; | |
| 20866 index = path.indexOf("/remarketingLists", pathOffset); | |
| 20867 unittest.expect(index >= 0, unittest.isTrue); | |
| 20868 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 20869 pathOffset = index; | |
| 20870 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 20871 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("/remarketingLists")); | |
| 20872 pathOffset += 17; | |
| 20873 | |
| 20874 var query = (req.url).query; | |
| 20875 var queryOffset = 0; | |
| 20876 var queryMap = {}; | |
| 20877 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 20878 parseBool(n) { | |
| 20879 if (n == "true") return true; | |
| 20880 if (n == "false") return false; | |
| 20881 if (n == null) return null; | |
| 20882 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 20883 } | |
| 20884 if (query.length > 0) { | |
| 20885 for (var part in query.split("&")) { | |
| 20886 var keyvalue = part.split("="); | |
| 20887 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 20888 } | |
| 20889 } | |
| 20890 | |
| 20891 | |
| 20892 var h = { | |
| 20893 "content-type" : "application/json; charset=utf-8", | |
| 20894 }; | |
| 20895 var resp = convert.JSON.encode(buildRemarketingList()); | |
| 20896 return new async.Future.value(stringResponse(200, h, resp)); | |
| 20897 }), true); | |
| 20898 res.insert(arg_request, arg_profileId).then(unittest.expectAsync(((api.Rem
arketingList response) { | |
| 20899 checkRemarketingList(response); | |
| 20900 }))); | |
| 20901 }); | |
| 20902 | |
| 20903 unittest.test("method--list", () { | |
| 20904 | |
| 20905 var mock = new HttpServerMock(); | |
| 20906 api.RemarketingListsResourceApi res = new api.DfareportingApi(mock).remark
etingLists; | |
| 20907 var arg_profileId = "foo"; | |
| 20908 var arg_advertiserId = "foo"; | |
| 20909 var arg_active = true; | |
| 20910 var arg_floodlightActivityId = "foo"; | |
| 20911 var arg_maxResults = 42; | |
| 20912 var arg_name = "foo"; | |
| 20913 var arg_pageToken = "foo"; | |
| 20914 var arg_sortField = "foo"; | |
| 20915 var arg_sortOrder = "foo"; | |
| 20916 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 20917 var path = (req.url).path; | |
| 20918 var pathOffset = 0; | |
| 20919 var index; | |
| 20920 var subPart; | |
| 20921 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 20922 pathOffset += 1; | |
| 20923 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 20924 pathOffset += 18; | |
| 20925 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 20926 pathOffset += 13; | |
| 20927 index = path.indexOf("/remarketingLists", pathOffset); | |
| 20928 unittest.expect(index >= 0, unittest.isTrue); | |
| 20929 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 20930 pathOffset = index; | |
| 20931 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 20932 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("/remarketingLists")); | |
| 20933 pathOffset += 17; | |
| 20934 | |
| 20935 var query = (req.url).query; | |
| 20936 var queryOffset = 0; | |
| 20937 var queryMap = {}; | |
| 20938 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 20939 parseBool(n) { | |
| 20940 if (n == "true") return true; | |
| 20941 if (n == "false") return false; | |
| 20942 if (n == null) return null; | |
| 20943 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 20944 } | |
| 20945 if (query.length > 0) { | |
| 20946 for (var part in query.split("&")) { | |
| 20947 var keyvalue = part.split("="); | |
| 20948 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 20949 } | |
| 20950 } | |
| 20951 unittest.expect(queryMap["advertiserId"].first, unittest.equals(arg_adve
rtiserId)); | |
| 20952 unittest.expect(queryMap["active"].first, unittest.equals("$arg_active")
); | |
| 20953 unittest.expect(queryMap["floodlightActivityId"].first, unittest.equals(
arg_floodlightActivityId)); | |
| 20954 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | |
| 20955 unittest.expect(queryMap["name"].first, unittest.equals(arg_name)); | |
| 20956 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 20957 unittest.expect(queryMap["sortField"].first, unittest.equals(arg_sortFie
ld)); | |
| 20958 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | |
| 20959 | |
| 20960 | |
| 20961 var h = { | |
| 20962 "content-type" : "application/json; charset=utf-8", | |
| 20963 }; | |
| 20964 var resp = convert.JSON.encode(buildRemarketingListsListResponse()); | |
| 20965 return new async.Future.value(stringResponse(200, h, resp)); | |
| 20966 }), true); | |
| 20967 res.list(arg_profileId, arg_advertiserId, active: arg_active, floodlightAc
tivityId: arg_floodlightActivityId, maxResults: arg_maxResults, name: arg_name,
pageToken: arg_pageToken, sortField: arg_sortField, sortOrder: arg_sortOrder).th
en(unittest.expectAsync(((api.RemarketingListsListResponse response) { | |
| 20968 checkRemarketingListsListResponse(response); | |
| 20969 }))); | |
| 20970 }); | |
| 20971 | |
| 20972 unittest.test("method--patch", () { | |
| 20973 | |
| 20974 var mock = new HttpServerMock(); | |
| 20975 api.RemarketingListsResourceApi res = new api.DfareportingApi(mock).remark
etingLists; | |
| 20976 var arg_request = buildRemarketingList(); | |
| 20977 var arg_profileId = "foo"; | |
| 20978 var arg_id = "foo"; | |
| 20979 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 20980 var obj = new api.RemarketingList.fromJson(json); | |
| 20981 checkRemarketingList(obj); | |
| 20982 | |
| 20983 var path = (req.url).path; | |
| 20984 var pathOffset = 0; | |
| 20985 var index; | |
| 20986 var subPart; | |
| 20987 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 20988 pathOffset += 1; | |
| 20989 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 20990 pathOffset += 18; | |
| 20991 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 20992 pathOffset += 13; | |
| 20993 index = path.indexOf("/remarketingLists", pathOffset); | |
| 20994 unittest.expect(index >= 0, unittest.isTrue); | |
| 20995 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 20996 pathOffset = index; | |
| 20997 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 20998 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("/remarketingLists")); | |
| 20999 pathOffset += 17; | |
| 21000 | |
| 21001 var query = (req.url).query; | |
| 21002 var queryOffset = 0; | |
| 21003 var queryMap = {}; | |
| 21004 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 21005 parseBool(n) { | |
| 21006 if (n == "true") return true; | |
| 21007 if (n == "false") return false; | |
| 21008 if (n == null) return null; | |
| 21009 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 21010 } | |
| 21011 if (query.length > 0) { | |
| 21012 for (var part in query.split("&")) { | |
| 21013 var keyvalue = part.split("="); | |
| 21014 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 21015 } | |
| 21016 } | |
| 21017 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); | |
| 21018 | |
| 21019 | |
| 21020 var h = { | |
| 21021 "content-type" : "application/json; charset=utf-8", | |
| 21022 }; | |
| 21023 var resp = convert.JSON.encode(buildRemarketingList()); | |
| 21024 return new async.Future.value(stringResponse(200, h, resp)); | |
| 21025 }), true); | |
| 21026 res.patch(arg_request, arg_profileId, arg_id).then(unittest.expectAsync(((
api.RemarketingList response) { | |
| 21027 checkRemarketingList(response); | |
| 21028 }))); | |
| 21029 }); | |
| 21030 | |
| 21031 unittest.test("method--update", () { | |
| 21032 | |
| 21033 var mock = new HttpServerMock(); | |
| 21034 api.RemarketingListsResourceApi res = new api.DfareportingApi(mock).remark
etingLists; | |
| 21035 var arg_request = buildRemarketingList(); | |
| 21036 var arg_profileId = "foo"; | |
| 21037 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 21038 var obj = new api.RemarketingList.fromJson(json); | |
| 21039 checkRemarketingList(obj); | |
| 21040 | |
| 21041 var path = (req.url).path; | |
| 21042 var pathOffset = 0; | |
| 21043 var index; | |
| 21044 var subPart; | |
| 21045 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 21046 pathOffset += 1; | |
| 21047 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 21048 pathOffset += 18; | |
| 21049 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 21050 pathOffset += 13; | |
| 21051 index = path.indexOf("/remarketingLists", pathOffset); | |
| 21052 unittest.expect(index >= 0, unittest.isTrue); | |
| 21053 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 21054 pathOffset = index; | |
| 21055 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 21056 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("/remarketingLists")); | |
| 21057 pathOffset += 17; | |
| 21058 | |
| 21059 var query = (req.url).query; | |
| 21060 var queryOffset = 0; | |
| 21061 var queryMap = {}; | |
| 21062 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 21063 parseBool(n) { | |
| 21064 if (n == "true") return true; | |
| 21065 if (n == "false") return false; | |
| 21066 if (n == null) return null; | |
| 21067 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 21068 } | |
| 21069 if (query.length > 0) { | |
| 21070 for (var part in query.split("&")) { | |
| 21071 var keyvalue = part.split("="); | |
| 21072 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 21073 } | |
| 21074 } | |
| 21075 | |
| 21076 | |
| 21077 var h = { | |
| 21078 "content-type" : "application/json; charset=utf-8", | |
| 21079 }; | |
| 21080 var resp = convert.JSON.encode(buildRemarketingList()); | |
| 21081 return new async.Future.value(stringResponse(200, h, resp)); | |
| 21082 }), true); | |
| 21083 res.update(arg_request, arg_profileId).then(unittest.expectAsync(((api.Rem
arketingList response) { | |
| 21084 checkRemarketingList(response); | |
| 21085 }))); | |
| 21086 }); | |
| 21087 | |
| 21088 }); | |
| 21089 | |
| 21090 | |
| 21091 unittest.group("resource-ReportsResourceApi", () { | |
| 21092 unittest.test("method--delete", () { | |
| 21093 | |
| 21094 var mock = new HttpServerMock(); | |
| 21095 api.ReportsResourceApi res = new api.DfareportingApi(mock).reports; | |
| 21096 var arg_profileId = "foo"; | |
| 21097 var arg_reportId = "foo"; | |
| 21098 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 21099 var path = (req.url).path; | |
| 21100 var pathOffset = 0; | |
| 21101 var index; | |
| 21102 var subPart; | |
| 21103 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 21104 pathOffset += 1; | |
| 21105 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 21106 pathOffset += 18; | |
| 21107 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 21108 pathOffset += 13; | |
| 21109 index = path.indexOf("/reports/", pathOffset); | |
| 21110 unittest.expect(index >= 0, unittest.isTrue); | |
| 21111 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 21112 pathOffset = index; | |
| 21113 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 21114 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("/reports/")); | |
| 21115 pathOffset += 9; | |
| 21116 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 21117 pathOffset = path.length; | |
| 21118 unittest.expect(subPart, unittest.equals("$arg_reportId")); | |
| 21119 | |
| 21120 var query = (req.url).query; | |
| 21121 var queryOffset = 0; | |
| 21122 var queryMap = {}; | |
| 21123 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 21124 parseBool(n) { | |
| 21125 if (n == "true") return true; | |
| 21126 if (n == "false") return false; | |
| 21127 if (n == null) return null; | |
| 21128 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 21129 } | |
| 21130 if (query.length > 0) { | |
| 21131 for (var part in query.split("&")) { | |
| 21132 var keyvalue = part.split("="); | |
| 21133 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 21134 } | |
| 21135 } | |
| 21136 | |
| 21137 | |
| 21138 var h = { | |
| 21139 "content-type" : "application/json; charset=utf-8", | |
| 21140 }; | |
| 21141 var resp = ""; | |
| 21142 return new async.Future.value(stringResponse(200, h, resp)); | |
| 21143 }), true); | |
| 21144 res.delete(arg_profileId, arg_reportId).then(unittest.expectAsync((_) {}))
; | |
| 21145 }); | |
| 21146 | |
| 21147 unittest.test("method--get", () { | |
| 21148 | |
| 21149 var mock = new HttpServerMock(); | |
| 21150 api.ReportsResourceApi res = new api.DfareportingApi(mock).reports; | |
| 21151 var arg_profileId = "foo"; | |
| 21152 var arg_reportId = "foo"; | |
| 21153 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 21154 var path = (req.url).path; | |
| 21155 var pathOffset = 0; | |
| 21156 var index; | |
| 21157 var subPart; | |
| 21158 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 21159 pathOffset += 1; | |
| 21160 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 21161 pathOffset += 18; | |
| 21162 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 21163 pathOffset += 13; | |
| 21164 index = path.indexOf("/reports/", pathOffset); | |
| 21165 unittest.expect(index >= 0, unittest.isTrue); | |
| 21166 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 21167 pathOffset = index; | |
| 21168 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 21169 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("/reports/")); | |
| 21170 pathOffset += 9; | |
| 21171 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 21172 pathOffset = path.length; | |
| 21173 unittest.expect(subPart, unittest.equals("$arg_reportId")); | |
| 21174 | |
| 21175 var query = (req.url).query; | |
| 21176 var queryOffset = 0; | |
| 21177 var queryMap = {}; | |
| 21178 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 21179 parseBool(n) { | |
| 21180 if (n == "true") return true; | |
| 21181 if (n == "false") return false; | |
| 21182 if (n == null) return null; | |
| 21183 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 21184 } | |
| 21185 if (query.length > 0) { | |
| 21186 for (var part in query.split("&")) { | |
| 21187 var keyvalue = part.split("="); | |
| 21188 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 21189 } | |
| 21190 } | |
| 21191 | |
| 21192 | |
| 21193 var h = { | |
| 21194 "content-type" : "application/json; charset=utf-8", | |
| 21195 }; | |
| 21196 var resp = convert.JSON.encode(buildReport()); | |
| 21197 return new async.Future.value(stringResponse(200, h, resp)); | |
| 21198 }), true); | |
| 21199 res.get(arg_profileId, arg_reportId).then(unittest.expectAsync(((api.Repor
t response) { | |
| 21200 checkReport(response); | |
| 21201 }))); | |
| 21202 }); | |
| 21203 | |
| 21204 unittest.test("method--insert", () { | |
| 21205 | |
| 21206 var mock = new HttpServerMock(); | |
| 21207 api.ReportsResourceApi res = new api.DfareportingApi(mock).reports; | |
| 21208 var arg_request = buildReport(); | |
| 21209 var arg_profileId = "foo"; | |
| 21210 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 21211 var obj = new api.Report.fromJson(json); | |
| 21212 checkReport(obj); | |
| 21213 | |
| 21214 var path = (req.url).path; | |
| 21215 var pathOffset = 0; | |
| 21216 var index; | |
| 21217 var subPart; | |
| 21218 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 21219 pathOffset += 1; | |
| 21220 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 21221 pathOffset += 18; | |
| 21222 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 21223 pathOffset += 13; | |
| 21224 index = path.indexOf("/reports", pathOffset); | |
| 21225 unittest.expect(index >= 0, unittest.isTrue); | |
| 21226 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 21227 pathOffset = index; | |
| 21228 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 21229 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("/reports")); | |
| 21230 pathOffset += 8; | |
| 21231 | |
| 21232 var query = (req.url).query; | |
| 21233 var queryOffset = 0; | |
| 21234 var queryMap = {}; | |
| 21235 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 21236 parseBool(n) { | |
| 21237 if (n == "true") return true; | |
| 21238 if (n == "false") return false; | |
| 21239 if (n == null) return null; | |
| 21240 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 21241 } | |
| 21242 if (query.length > 0) { | |
| 21243 for (var part in query.split("&")) { | |
| 21244 var keyvalue = part.split("="); | |
| 21245 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 21246 } | |
| 21247 } | |
| 21248 | |
| 21249 | |
| 21250 var h = { | |
| 21251 "content-type" : "application/json; charset=utf-8", | |
| 21252 }; | |
| 21253 var resp = convert.JSON.encode(buildReport()); | |
| 21254 return new async.Future.value(stringResponse(200, h, resp)); | |
| 21255 }), true); | |
| 21256 res.insert(arg_request, arg_profileId).then(unittest.expectAsync(((api.Rep
ort response) { | |
| 21257 checkReport(response); | |
| 21258 }))); | |
| 21259 }); | |
| 21260 | |
| 21261 unittest.test("method--list", () { | |
| 21262 | |
| 21263 var mock = new HttpServerMock(); | |
| 21264 api.ReportsResourceApi res = new api.DfareportingApi(mock).reports; | |
| 21265 var arg_profileId = "foo"; | |
| 21266 var arg_maxResults = 42; | |
| 21267 var arg_pageToken = "foo"; | |
| 21268 var arg_scope = "foo"; | |
| 21269 var arg_sortField = "foo"; | |
| 21270 var arg_sortOrder = "foo"; | |
| 21271 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 21272 var path = (req.url).path; | |
| 21273 var pathOffset = 0; | |
| 21274 var index; | |
| 21275 var subPart; | |
| 21276 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 21277 pathOffset += 1; | |
| 21278 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 21279 pathOffset += 18; | |
| 21280 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 21281 pathOffset += 13; | |
| 21282 index = path.indexOf("/reports", pathOffset); | |
| 21283 unittest.expect(index >= 0, unittest.isTrue); | |
| 21284 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 21285 pathOffset = index; | |
| 21286 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 21287 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("/reports")); | |
| 21288 pathOffset += 8; | |
| 21289 | |
| 21290 var query = (req.url).query; | |
| 21291 var queryOffset = 0; | |
| 21292 var queryMap = {}; | |
| 21293 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 21294 parseBool(n) { | |
| 21295 if (n == "true") return true; | |
| 21296 if (n == "false") return false; | |
| 21297 if (n == null) return null; | |
| 21298 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 21299 } | |
| 21300 if (query.length > 0) { | |
| 21301 for (var part in query.split("&")) { | |
| 21302 var keyvalue = part.split("="); | |
| 21303 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 21304 } | |
| 21305 } | |
| 21306 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | |
| 21307 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 21308 unittest.expect(queryMap["scope"].first, unittest.equals(arg_scope)); | |
| 21309 unittest.expect(queryMap["sortField"].first, unittest.equals(arg_sortFie
ld)); | |
| 21310 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | |
| 21311 | |
| 21312 | |
| 21313 var h = { | |
| 21314 "content-type" : "application/json; charset=utf-8", | |
| 21315 }; | |
| 21316 var resp = convert.JSON.encode(buildReportList()); | |
| 21317 return new async.Future.value(stringResponse(200, h, resp)); | |
| 21318 }), true); | |
| 21319 res.list(arg_profileId, maxResults: arg_maxResults, pageToken: arg_pageTok
en, scope: arg_scope, sortField: arg_sortField, sortOrder: arg_sortOrder).then(u
nittest.expectAsync(((api.ReportList response) { | |
| 21320 checkReportList(response); | |
| 21321 }))); | |
| 21322 }); | |
| 21323 | |
| 21324 unittest.test("method--patch", () { | |
| 21325 | |
| 21326 var mock = new HttpServerMock(); | |
| 21327 api.ReportsResourceApi res = new api.DfareportingApi(mock).reports; | |
| 21328 var arg_request = buildReport(); | |
| 21329 var arg_profileId = "foo"; | |
| 21330 var arg_reportId = "foo"; | |
| 21331 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 21332 var obj = new api.Report.fromJson(json); | |
| 21333 checkReport(obj); | |
| 21334 | |
| 21335 var path = (req.url).path; | |
| 21336 var pathOffset = 0; | |
| 21337 var index; | |
| 21338 var subPart; | |
| 21339 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 21340 pathOffset += 1; | |
| 21341 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 21342 pathOffset += 18; | |
| 21343 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 21344 pathOffset += 13; | |
| 21345 index = path.indexOf("/reports/", pathOffset); | |
| 21346 unittest.expect(index >= 0, unittest.isTrue); | |
| 21347 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 21348 pathOffset = index; | |
| 21349 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 21350 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("/reports/")); | |
| 21351 pathOffset += 9; | |
| 21352 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 21353 pathOffset = path.length; | |
| 21354 unittest.expect(subPart, unittest.equals("$arg_reportId")); | |
| 21355 | |
| 21356 var query = (req.url).query; | |
| 21357 var queryOffset = 0; | |
| 21358 var queryMap = {}; | |
| 21359 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 21360 parseBool(n) { | |
| 21361 if (n == "true") return true; | |
| 21362 if (n == "false") return false; | |
| 21363 if (n == null) return null; | |
| 21364 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 21365 } | |
| 21366 if (query.length > 0) { | |
| 21367 for (var part in query.split("&")) { | |
| 21368 var keyvalue = part.split("="); | |
| 21369 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 21370 } | |
| 21371 } | |
| 21372 | |
| 21373 | |
| 21374 var h = { | |
| 21375 "content-type" : "application/json; charset=utf-8", | |
| 21376 }; | |
| 21377 var resp = convert.JSON.encode(buildReport()); | |
| 21378 return new async.Future.value(stringResponse(200, h, resp)); | |
| 21379 }), true); | |
| 21380 res.patch(arg_request, arg_profileId, arg_reportId).then(unittest.expectAs
ync(((api.Report response) { | |
| 21381 checkReport(response); | |
| 21382 }))); | |
| 21383 }); | |
| 21384 | |
| 21385 unittest.test("method--run", () { | |
| 21386 | |
| 21387 var mock = new HttpServerMock(); | |
| 21388 api.ReportsResourceApi res = new api.DfareportingApi(mock).reports; | |
| 21389 var arg_profileId = "foo"; | |
| 21390 var arg_reportId = "foo"; | |
| 21391 var arg_synchronous = true; | |
| 21392 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 21393 var path = (req.url).path; | |
| 21394 var pathOffset = 0; | |
| 21395 var index; | |
| 21396 var subPart; | |
| 21397 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 21398 pathOffset += 1; | |
| 21399 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 21400 pathOffset += 18; | |
| 21401 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 21402 pathOffset += 13; | |
| 21403 index = path.indexOf("/reports/", pathOffset); | |
| 21404 unittest.expect(index >= 0, unittest.isTrue); | |
| 21405 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 21406 pathOffset = index; | |
| 21407 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 21408 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("/reports/")); | |
| 21409 pathOffset += 9; | |
| 21410 index = path.indexOf("/run", pathOffset); | |
| 21411 unittest.expect(index >= 0, unittest.isTrue); | |
| 21412 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 21413 pathOffset = index; | |
| 21414 unittest.expect(subPart, unittest.equals("$arg_reportId")); | |
| 21415 unittest.expect(path.substring(pathOffset, pathOffset + 4), unittest.equ
als("/run")); | |
| 21416 pathOffset += 4; | |
| 21417 | |
| 21418 var query = (req.url).query; | |
| 21419 var queryOffset = 0; | |
| 21420 var queryMap = {}; | |
| 21421 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 21422 parseBool(n) { | |
| 21423 if (n == "true") return true; | |
| 21424 if (n == "false") return false; | |
| 21425 if (n == null) return null; | |
| 21426 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 21427 } | |
| 21428 if (query.length > 0) { | |
| 21429 for (var part in query.split("&")) { | |
| 21430 var keyvalue = part.split("="); | |
| 21431 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 21432 } | |
| 21433 } | |
| 21434 unittest.expect(queryMap["synchronous"].first, unittest.equals("$arg_syn
chronous")); | |
| 21435 | |
| 21436 | |
| 21437 var h = { | |
| 21438 "content-type" : "application/json; charset=utf-8", | |
| 21439 }; | |
| 21440 var resp = convert.JSON.encode(buildFile()); | |
| 21441 return new async.Future.value(stringResponse(200, h, resp)); | |
| 21442 }), true); | |
| 21443 res.run(arg_profileId, arg_reportId, synchronous: arg_synchronous).then(un
ittest.expectAsync(((api.File response) { | |
| 21444 checkFile(response); | |
| 21445 }))); | |
| 21446 }); | |
| 21447 | |
| 21448 unittest.test("method--update", () { | |
| 21449 | |
| 21450 var mock = new HttpServerMock(); | |
| 21451 api.ReportsResourceApi res = new api.DfareportingApi(mock).reports; | |
| 21452 var arg_request = buildReport(); | |
| 21453 var arg_profileId = "foo"; | |
| 21454 var arg_reportId = "foo"; | |
| 21455 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 21456 var obj = new api.Report.fromJson(json); | |
| 21457 checkReport(obj); | |
| 21458 | |
| 21459 var path = (req.url).path; | |
| 21460 var pathOffset = 0; | |
| 21461 var index; | |
| 21462 var subPart; | |
| 21463 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 21464 pathOffset += 1; | |
| 21465 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 21466 pathOffset += 18; | |
| 21467 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 21468 pathOffset += 13; | |
| 21469 index = path.indexOf("/reports/", pathOffset); | |
| 21470 unittest.expect(index >= 0, unittest.isTrue); | |
| 21471 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 21472 pathOffset = index; | |
| 21473 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 21474 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("/reports/")); | |
| 21475 pathOffset += 9; | |
| 21476 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 21477 pathOffset = path.length; | |
| 21478 unittest.expect(subPart, unittest.equals("$arg_reportId")); | |
| 21479 | |
| 21480 var query = (req.url).query; | |
| 21481 var queryOffset = 0; | |
| 21482 var queryMap = {}; | |
| 21483 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 21484 parseBool(n) { | |
| 21485 if (n == "true") return true; | |
| 21486 if (n == "false") return false; | |
| 21487 if (n == null) return null; | |
| 21488 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 21489 } | |
| 21490 if (query.length > 0) { | |
| 21491 for (var part in query.split("&")) { | |
| 21492 var keyvalue = part.split("="); | |
| 21493 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 21494 } | |
| 21495 } | |
| 21496 | |
| 21497 | |
| 21498 var h = { | |
| 21499 "content-type" : "application/json; charset=utf-8", | |
| 21500 }; | |
| 21501 var resp = convert.JSON.encode(buildReport()); | |
| 21502 return new async.Future.value(stringResponse(200, h, resp)); | |
| 21503 }), true); | |
| 21504 res.update(arg_request, arg_profileId, arg_reportId).then(unittest.expectA
sync(((api.Report response) { | |
| 21505 checkReport(response); | |
| 21506 }))); | |
| 21507 }); | |
| 21508 | |
| 21509 }); | |
| 21510 | |
| 21511 | |
| 21512 unittest.group("resource-ReportsCompatibleFieldsResourceApi", () { | |
| 21513 unittest.test("method--query", () { | |
| 21514 | |
| 21515 var mock = new HttpServerMock(); | |
| 21516 api.ReportsCompatibleFieldsResourceApi res = new api.DfareportingApi(mock)
.reports.compatibleFields; | |
| 21517 var arg_request = buildReport(); | |
| 21518 var arg_profileId = "foo"; | |
| 21519 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 21520 var obj = new api.Report.fromJson(json); | |
| 21521 checkReport(obj); | |
| 21522 | |
| 21523 var path = (req.url).path; | |
| 21524 var pathOffset = 0; | |
| 21525 var index; | |
| 21526 var subPart; | |
| 21527 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 21528 pathOffset += 1; | |
| 21529 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 21530 pathOffset += 18; | |
| 21531 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 21532 pathOffset += 13; | |
| 21533 index = path.indexOf("/reports/compatiblefields/query", pathOffset); | |
| 21534 unittest.expect(index >= 0, unittest.isTrue); | |
| 21535 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 21536 pathOffset = index; | |
| 21537 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 21538 unittest.expect(path.substring(pathOffset, pathOffset + 31), unittest.eq
uals("/reports/compatiblefields/query")); | |
| 21539 pathOffset += 31; | |
| 21540 | |
| 21541 var query = (req.url).query; | |
| 21542 var queryOffset = 0; | |
| 21543 var queryMap = {}; | |
| 21544 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 21545 parseBool(n) { | |
| 21546 if (n == "true") return true; | |
| 21547 if (n == "false") return false; | |
| 21548 if (n == null) return null; | |
| 21549 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 21550 } | |
| 21551 if (query.length > 0) { | |
| 21552 for (var part in query.split("&")) { | |
| 21553 var keyvalue = part.split("="); | |
| 21554 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 21555 } | |
| 21556 } | |
| 21557 | |
| 21558 | |
| 21559 var h = { | |
| 21560 "content-type" : "application/json; charset=utf-8", | |
| 21561 }; | |
| 21562 var resp = convert.JSON.encode(buildCompatibleFields()); | |
| 21563 return new async.Future.value(stringResponse(200, h, resp)); | |
| 21564 }), true); | |
| 21565 res.query(arg_request, arg_profileId).then(unittest.expectAsync(((api.Comp
atibleFields response) { | |
| 21566 checkCompatibleFields(response); | |
| 21567 }))); | |
| 21568 }); | |
| 21569 | |
| 21570 }); | |
| 21571 | |
| 21572 | |
| 21573 unittest.group("resource-ReportsFilesResourceApi", () { | |
| 21574 unittest.test("method--get", () { | |
| 21575 // TODO: Implement tests for media upload; | |
| 21576 // TODO: Implement tests for media download; | |
| 21577 | |
| 21578 var mock = new HttpServerMock(); | |
| 21579 api.ReportsFilesResourceApi res = new api.DfareportingApi(mock).reports.fi
les; | |
| 21580 var arg_profileId = "foo"; | |
| 21581 var arg_reportId = "foo"; | |
| 21582 var arg_fileId = "foo"; | |
| 21583 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 21584 var path = (req.url).path; | |
| 21585 var pathOffset = 0; | |
| 21586 var index; | |
| 21587 var subPart; | |
| 21588 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 21589 pathOffset += 1; | |
| 21590 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 21591 pathOffset += 18; | |
| 21592 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 21593 pathOffset += 13; | |
| 21594 index = path.indexOf("/reports/", pathOffset); | |
| 21595 unittest.expect(index >= 0, unittest.isTrue); | |
| 21596 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 21597 pathOffset = index; | |
| 21598 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 21599 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("/reports/")); | |
| 21600 pathOffset += 9; | |
| 21601 index = path.indexOf("/files/", pathOffset); | |
| 21602 unittest.expect(index >= 0, unittest.isTrue); | |
| 21603 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 21604 pathOffset = index; | |
| 21605 unittest.expect(subPart, unittest.equals("$arg_reportId")); | |
| 21606 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ
als("/files/")); | |
| 21607 pathOffset += 7; | |
| 21608 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 21609 pathOffset = path.length; | |
| 21610 unittest.expect(subPart, unittest.equals("$arg_fileId")); | |
| 21611 | |
| 21612 var query = (req.url).query; | |
| 21613 var queryOffset = 0; | |
| 21614 var queryMap = {}; | |
| 21615 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 21616 parseBool(n) { | |
| 21617 if (n == "true") return true; | |
| 21618 if (n == "false") return false; | |
| 21619 if (n == null) return null; | |
| 21620 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 21621 } | |
| 21622 if (query.length > 0) { | |
| 21623 for (var part in query.split("&")) { | |
| 21624 var keyvalue = part.split("="); | |
| 21625 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 21626 } | |
| 21627 } | |
| 21628 | |
| 21629 | |
| 21630 var h = { | |
| 21631 "content-type" : "application/json; charset=utf-8", | |
| 21632 }; | |
| 21633 var resp = convert.JSON.encode(buildFile()); | |
| 21634 return new async.Future.value(stringResponse(200, h, resp)); | |
| 21635 }), true); | |
| 21636 res.get(arg_profileId, arg_reportId, arg_fileId).then(unittest.expectAsync
(((api.File response) { | |
| 21637 checkFile(response); | |
| 21638 }))); | |
| 21639 }); | |
| 21640 | |
| 21641 unittest.test("method--list", () { | |
| 21642 | |
| 21643 var mock = new HttpServerMock(); | |
| 21644 api.ReportsFilesResourceApi res = new api.DfareportingApi(mock).reports.fi
les; | |
| 21645 var arg_profileId = "foo"; | |
| 21646 var arg_reportId = "foo"; | |
| 21647 var arg_maxResults = 42; | |
| 21648 var arg_pageToken = "foo"; | |
| 21649 var arg_sortField = "foo"; | |
| 21650 var arg_sortOrder = "foo"; | |
| 21651 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 21652 var path = (req.url).path; | |
| 21653 var pathOffset = 0; | |
| 21654 var index; | |
| 21655 var subPart; | |
| 21656 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 21657 pathOffset += 1; | |
| 21658 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 21659 pathOffset += 18; | |
| 21660 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 21661 pathOffset += 13; | |
| 21662 index = path.indexOf("/reports/", pathOffset); | |
| 21663 unittest.expect(index >= 0, unittest.isTrue); | |
| 21664 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 21665 pathOffset = index; | |
| 21666 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 21667 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("/reports/")); | |
| 21668 pathOffset += 9; | |
| 21669 index = path.indexOf("/files", pathOffset); | |
| 21670 unittest.expect(index >= 0, unittest.isTrue); | |
| 21671 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 21672 pathOffset = index; | |
| 21673 unittest.expect(subPart, unittest.equals("$arg_reportId")); | |
| 21674 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ
als("/files")); | |
| 21675 pathOffset += 6; | |
| 21676 | |
| 21677 var query = (req.url).query; | |
| 21678 var queryOffset = 0; | |
| 21679 var queryMap = {}; | |
| 21680 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 21681 parseBool(n) { | |
| 21682 if (n == "true") return true; | |
| 21683 if (n == "false") return false; | |
| 21684 if (n == null) return null; | |
| 21685 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 21686 } | |
| 21687 if (query.length > 0) { | |
| 21688 for (var part in query.split("&")) { | |
| 21689 var keyvalue = part.split("="); | |
| 21690 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 21691 } | |
| 21692 } | |
| 21693 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | |
| 21694 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 21695 unittest.expect(queryMap["sortField"].first, unittest.equals(arg_sortFie
ld)); | |
| 21696 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | |
| 21697 | |
| 21698 | |
| 21699 var h = { | |
| 21700 "content-type" : "application/json; charset=utf-8", | |
| 21701 }; | |
| 21702 var resp = convert.JSON.encode(buildFileList()); | |
| 21703 return new async.Future.value(stringResponse(200, h, resp)); | |
| 21704 }), true); | |
| 21705 res.list(arg_profileId, arg_reportId, maxResults: arg_maxResults, pageToke
n: arg_pageToken, sortField: arg_sortField, sortOrder: arg_sortOrder).then(unitt
est.expectAsync(((api.FileList response) { | |
| 21706 checkFileList(response); | |
| 21707 }))); | |
| 21708 }); | |
| 21709 | |
| 21710 }); | |
| 21711 | |
| 21712 | |
| 21713 unittest.group("resource-SitesResourceApi", () { | |
| 21714 unittest.test("method--get", () { | |
| 21715 | |
| 21716 var mock = new HttpServerMock(); | |
| 21717 api.SitesResourceApi res = new api.DfareportingApi(mock).sites; | |
| 21718 var arg_profileId = "foo"; | |
| 21719 var arg_id = "foo"; | |
| 21720 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 21721 var path = (req.url).path; | |
| 21722 var pathOffset = 0; | |
| 21723 var index; | |
| 21724 var subPart; | |
| 21725 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 21726 pathOffset += 1; | |
| 21727 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 21728 pathOffset += 18; | |
| 21729 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 21730 pathOffset += 13; | |
| 21731 index = path.indexOf("/sites/", pathOffset); | |
| 21732 unittest.expect(index >= 0, unittest.isTrue); | |
| 21733 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 21734 pathOffset = index; | |
| 21735 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 21736 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ
als("/sites/")); | |
| 21737 pathOffset += 7; | |
| 21738 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 21739 pathOffset = path.length; | |
| 21740 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 21741 | |
| 21742 var query = (req.url).query; | |
| 21743 var queryOffset = 0; | |
| 21744 var queryMap = {}; | |
| 21745 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 21746 parseBool(n) { | |
| 21747 if (n == "true") return true; | |
| 21748 if (n == "false") return false; | |
| 21749 if (n == null) return null; | |
| 21750 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 21751 } | |
| 21752 if (query.length > 0) { | |
| 21753 for (var part in query.split("&")) { | |
| 21754 var keyvalue = part.split("="); | |
| 21755 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 21756 } | |
| 21757 } | |
| 21758 | |
| 21759 | |
| 21760 var h = { | |
| 21761 "content-type" : "application/json; charset=utf-8", | |
| 21762 }; | |
| 21763 var resp = convert.JSON.encode(buildSite()); | |
| 21764 return new async.Future.value(stringResponse(200, h, resp)); | |
| 21765 }), true); | |
| 21766 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.Site respon
se) { | |
| 21767 checkSite(response); | |
| 21768 }))); | |
| 21769 }); | |
| 21770 | |
| 21771 unittest.test("method--insert", () { | |
| 21772 | |
| 21773 var mock = new HttpServerMock(); | |
| 21774 api.SitesResourceApi res = new api.DfareportingApi(mock).sites; | |
| 21775 var arg_request = buildSite(); | |
| 21776 var arg_profileId = "foo"; | |
| 21777 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 21778 var obj = new api.Site.fromJson(json); | |
| 21779 checkSite(obj); | |
| 21780 | |
| 21781 var path = (req.url).path; | |
| 21782 var pathOffset = 0; | |
| 21783 var index; | |
| 21784 var subPart; | |
| 21785 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 21786 pathOffset += 1; | |
| 21787 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 21788 pathOffset += 18; | |
| 21789 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 21790 pathOffset += 13; | |
| 21791 index = path.indexOf("/sites", pathOffset); | |
| 21792 unittest.expect(index >= 0, unittest.isTrue); | |
| 21793 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 21794 pathOffset = index; | |
| 21795 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 21796 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ
als("/sites")); | |
| 21797 pathOffset += 6; | |
| 21798 | |
| 21799 var query = (req.url).query; | |
| 21800 var queryOffset = 0; | |
| 21801 var queryMap = {}; | |
| 21802 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 21803 parseBool(n) { | |
| 21804 if (n == "true") return true; | |
| 21805 if (n == "false") return false; | |
| 21806 if (n == null) return null; | |
| 21807 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 21808 } | |
| 21809 if (query.length > 0) { | |
| 21810 for (var part in query.split("&")) { | |
| 21811 var keyvalue = part.split("="); | |
| 21812 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 21813 } | |
| 21814 } | |
| 21815 | |
| 21816 | |
| 21817 var h = { | |
| 21818 "content-type" : "application/json; charset=utf-8", | |
| 21819 }; | |
| 21820 var resp = convert.JSON.encode(buildSite()); | |
| 21821 return new async.Future.value(stringResponse(200, h, resp)); | |
| 21822 }), true); | |
| 21823 res.insert(arg_request, arg_profileId).then(unittest.expectAsync(((api.Sit
e response) { | |
| 21824 checkSite(response); | |
| 21825 }))); | |
| 21826 }); | |
| 21827 | |
| 21828 unittest.test("method--list", () { | |
| 21829 | |
| 21830 var mock = new HttpServerMock(); | |
| 21831 api.SitesResourceApi res = new api.DfareportingApi(mock).sites; | |
| 21832 var arg_profileId = "foo"; | |
| 21833 var arg_acceptsInStreamVideoPlacements = true; | |
| 21834 var arg_acceptsInterstitialPlacements = true; | |
| 21835 var arg_acceptsPublisherPaidPlacements = true; | |
| 21836 var arg_adWordsSite = true; | |
| 21837 var arg_approved = true; | |
| 21838 var arg_campaignIds = buildUnnamed1569(); | |
| 21839 var arg_directorySiteIds = buildUnnamed1570(); | |
| 21840 var arg_ids = buildUnnamed1571(); | |
| 21841 var arg_maxResults = 42; | |
| 21842 var arg_pageToken = "foo"; | |
| 21843 var arg_searchString = "foo"; | |
| 21844 var arg_sortField = "foo"; | |
| 21845 var arg_sortOrder = "foo"; | |
| 21846 var arg_subaccountId = "foo"; | |
| 21847 var arg_unmappedSite = true; | |
| 21848 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 21849 var path = (req.url).path; | |
| 21850 var pathOffset = 0; | |
| 21851 var index; | |
| 21852 var subPart; | |
| 21853 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 21854 pathOffset += 1; | |
| 21855 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 21856 pathOffset += 18; | |
| 21857 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 21858 pathOffset += 13; | |
| 21859 index = path.indexOf("/sites", pathOffset); | |
| 21860 unittest.expect(index >= 0, unittest.isTrue); | |
| 21861 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 21862 pathOffset = index; | |
| 21863 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 21864 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ
als("/sites")); | |
| 21865 pathOffset += 6; | |
| 21866 | |
| 21867 var query = (req.url).query; | |
| 21868 var queryOffset = 0; | |
| 21869 var queryMap = {}; | |
| 21870 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 21871 parseBool(n) { | |
| 21872 if (n == "true") return true; | |
| 21873 if (n == "false") return false; | |
| 21874 if (n == null) return null; | |
| 21875 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 21876 } | |
| 21877 if (query.length > 0) { | |
| 21878 for (var part in query.split("&")) { | |
| 21879 var keyvalue = part.split("="); | |
| 21880 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 21881 } | |
| 21882 } | |
| 21883 unittest.expect(queryMap["acceptsInStreamVideoPlacements"].first, unitte
st.equals("$arg_acceptsInStreamVideoPlacements")); | |
| 21884 unittest.expect(queryMap["acceptsInterstitialPlacements"].first, unittes
t.equals("$arg_acceptsInterstitialPlacements")); | |
| 21885 unittest.expect(queryMap["acceptsPublisherPaidPlacements"].first, unitte
st.equals("$arg_acceptsPublisherPaidPlacements")); | |
| 21886 unittest.expect(queryMap["adWordsSite"].first, unittest.equals("$arg_adW
ordsSite")); | |
| 21887 unittest.expect(queryMap["approved"].first, unittest.equals("$arg_approv
ed")); | |
| 21888 unittest.expect(queryMap["campaignIds"], unittest.equals(arg_campaignIds
)); | |
| 21889 unittest.expect(queryMap["directorySiteIds"], unittest.equals(arg_direct
orySiteIds)); | |
| 21890 unittest.expect(queryMap["ids"], unittest.equals(arg_ids)); | |
| 21891 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | |
| 21892 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 21893 unittest.expect(queryMap["searchString"].first, unittest.equals(arg_sear
chString)); | |
| 21894 unittest.expect(queryMap["sortField"].first, unittest.equals(arg_sortFie
ld)); | |
| 21895 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | |
| 21896 unittest.expect(queryMap["subaccountId"].first, unittest.equals(arg_suba
ccountId)); | |
| 21897 unittest.expect(queryMap["unmappedSite"].first, unittest.equals("$arg_un
mappedSite")); | |
| 21898 | |
| 21899 | |
| 21900 var h = { | |
| 21901 "content-type" : "application/json; charset=utf-8", | |
| 21902 }; | |
| 21903 var resp = convert.JSON.encode(buildSitesListResponse()); | |
| 21904 return new async.Future.value(stringResponse(200, h, resp)); | |
| 21905 }), true); | |
| 21906 res.list(arg_profileId, acceptsInStreamVideoPlacements: arg_acceptsInStrea
mVideoPlacements, acceptsInterstitialPlacements: arg_acceptsInterstitialPlacemen
ts, acceptsPublisherPaidPlacements: arg_acceptsPublisherPaidPlacements, adWordsS
ite: arg_adWordsSite, approved: arg_approved, campaignIds: arg_campaignIds, dire
ctorySiteIds: arg_directorySiteIds, ids: arg_ids, maxResults: arg_maxResults, pa
geToken: arg_pageToken, searchString: arg_searchString, sortField: arg_sortField
, sortOrder: arg_sortOrder, subaccountId: arg_subaccountId, unmappedSite: arg_un
mappedSite).then(unittest.expectAsync(((api.SitesListResponse response) { | |
| 21907 checkSitesListResponse(response); | |
| 21908 }))); | |
| 21909 }); | |
| 21910 | |
| 21911 unittest.test("method--patch", () { | |
| 21912 | |
| 21913 var mock = new HttpServerMock(); | |
| 21914 api.SitesResourceApi res = new api.DfareportingApi(mock).sites; | |
| 21915 var arg_request = buildSite(); | |
| 21916 var arg_profileId = "foo"; | |
| 21917 var arg_id = "foo"; | |
| 21918 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 21919 var obj = new api.Site.fromJson(json); | |
| 21920 checkSite(obj); | |
| 21921 | |
| 21922 var path = (req.url).path; | |
| 21923 var pathOffset = 0; | |
| 21924 var index; | |
| 21925 var subPart; | |
| 21926 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 21927 pathOffset += 1; | |
| 21928 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 21929 pathOffset += 18; | |
| 21930 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 21931 pathOffset += 13; | |
| 21932 index = path.indexOf("/sites", pathOffset); | |
| 21933 unittest.expect(index >= 0, unittest.isTrue); | |
| 21934 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 21935 pathOffset = index; | |
| 21936 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 21937 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ
als("/sites")); | |
| 21938 pathOffset += 6; | |
| 21939 | |
| 21940 var query = (req.url).query; | |
| 21941 var queryOffset = 0; | |
| 21942 var queryMap = {}; | |
| 21943 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 21944 parseBool(n) { | |
| 21945 if (n == "true") return true; | |
| 21946 if (n == "false") return false; | |
| 21947 if (n == null) return null; | |
| 21948 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 21949 } | |
| 21950 if (query.length > 0) { | |
| 21951 for (var part in query.split("&")) { | |
| 21952 var keyvalue = part.split("="); | |
| 21953 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 21954 } | |
| 21955 } | |
| 21956 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); | |
| 21957 | |
| 21958 | |
| 21959 var h = { | |
| 21960 "content-type" : "application/json; charset=utf-8", | |
| 21961 }; | |
| 21962 var resp = convert.JSON.encode(buildSite()); | |
| 21963 return new async.Future.value(stringResponse(200, h, resp)); | |
| 21964 }), true); | |
| 21965 res.patch(arg_request, arg_profileId, arg_id).then(unittest.expectAsync(((
api.Site response) { | |
| 21966 checkSite(response); | |
| 21967 }))); | |
| 21968 }); | |
| 21969 | |
| 21970 unittest.test("method--update", () { | |
| 21971 | |
| 21972 var mock = new HttpServerMock(); | |
| 21973 api.SitesResourceApi res = new api.DfareportingApi(mock).sites; | |
| 21974 var arg_request = buildSite(); | |
| 21975 var arg_profileId = "foo"; | |
| 21976 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 21977 var obj = new api.Site.fromJson(json); | |
| 21978 checkSite(obj); | |
| 21979 | |
| 21980 var path = (req.url).path; | |
| 21981 var pathOffset = 0; | |
| 21982 var index; | |
| 21983 var subPart; | |
| 21984 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 21985 pathOffset += 1; | |
| 21986 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 21987 pathOffset += 18; | |
| 21988 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 21989 pathOffset += 13; | |
| 21990 index = path.indexOf("/sites", pathOffset); | |
| 21991 unittest.expect(index >= 0, unittest.isTrue); | |
| 21992 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 21993 pathOffset = index; | |
| 21994 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 21995 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ
als("/sites")); | |
| 21996 pathOffset += 6; | |
| 21997 | |
| 21998 var query = (req.url).query; | |
| 21999 var queryOffset = 0; | |
| 22000 var queryMap = {}; | |
| 22001 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 22002 parseBool(n) { | |
| 22003 if (n == "true") return true; | |
| 22004 if (n == "false") return false; | |
| 22005 if (n == null) return null; | |
| 22006 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 22007 } | |
| 22008 if (query.length > 0) { | |
| 22009 for (var part in query.split("&")) { | |
| 22010 var keyvalue = part.split("="); | |
| 22011 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 22012 } | |
| 22013 } | |
| 22014 | |
| 22015 | |
| 22016 var h = { | |
| 22017 "content-type" : "application/json; charset=utf-8", | |
| 22018 }; | |
| 22019 var resp = convert.JSON.encode(buildSite()); | |
| 22020 return new async.Future.value(stringResponse(200, h, resp)); | |
| 22021 }), true); | |
| 22022 res.update(arg_request, arg_profileId).then(unittest.expectAsync(((api.Sit
e response) { | |
| 22023 checkSite(response); | |
| 22024 }))); | |
| 22025 }); | |
| 22026 | |
| 22027 }); | |
| 22028 | |
| 22029 | |
| 22030 unittest.group("resource-SizesResourceApi", () { | |
| 22031 unittest.test("method--get", () { | |
| 22032 | |
| 22033 var mock = new HttpServerMock(); | |
| 22034 api.SizesResourceApi res = new api.DfareportingApi(mock).sizes; | |
| 22035 var arg_profileId = "foo"; | |
| 22036 var arg_id = "foo"; | |
| 22037 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 22038 var path = (req.url).path; | |
| 22039 var pathOffset = 0; | |
| 22040 var index; | |
| 22041 var subPart; | |
| 22042 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 22043 pathOffset += 1; | |
| 22044 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 22045 pathOffset += 18; | |
| 22046 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 22047 pathOffset += 13; | |
| 22048 index = path.indexOf("/sizes/", pathOffset); | |
| 22049 unittest.expect(index >= 0, unittest.isTrue); | |
| 22050 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 22051 pathOffset = index; | |
| 22052 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 22053 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ
als("/sizes/")); | |
| 22054 pathOffset += 7; | |
| 22055 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 22056 pathOffset = path.length; | |
| 22057 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 22058 | |
| 22059 var query = (req.url).query; | |
| 22060 var queryOffset = 0; | |
| 22061 var queryMap = {}; | |
| 22062 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 22063 parseBool(n) { | |
| 22064 if (n == "true") return true; | |
| 22065 if (n == "false") return false; | |
| 22066 if (n == null) return null; | |
| 22067 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 22068 } | |
| 22069 if (query.length > 0) { | |
| 22070 for (var part in query.split("&")) { | |
| 22071 var keyvalue = part.split("="); | |
| 22072 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 22073 } | |
| 22074 } | |
| 22075 | |
| 22076 | |
| 22077 var h = { | |
| 22078 "content-type" : "application/json; charset=utf-8", | |
| 22079 }; | |
| 22080 var resp = convert.JSON.encode(buildSize()); | |
| 22081 return new async.Future.value(stringResponse(200, h, resp)); | |
| 22082 }), true); | |
| 22083 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.Size respon
se) { | |
| 22084 checkSize(response); | |
| 22085 }))); | |
| 22086 }); | |
| 22087 | |
| 22088 unittest.test("method--insert", () { | |
| 22089 | |
| 22090 var mock = new HttpServerMock(); | |
| 22091 api.SizesResourceApi res = new api.DfareportingApi(mock).sizes; | |
| 22092 var arg_request = buildSize(); | |
| 22093 var arg_profileId = "foo"; | |
| 22094 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 22095 var obj = new api.Size.fromJson(json); | |
| 22096 checkSize(obj); | |
| 22097 | |
| 22098 var path = (req.url).path; | |
| 22099 var pathOffset = 0; | |
| 22100 var index; | |
| 22101 var subPart; | |
| 22102 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 22103 pathOffset += 1; | |
| 22104 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 22105 pathOffset += 18; | |
| 22106 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 22107 pathOffset += 13; | |
| 22108 index = path.indexOf("/sizes", pathOffset); | |
| 22109 unittest.expect(index >= 0, unittest.isTrue); | |
| 22110 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 22111 pathOffset = index; | |
| 22112 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 22113 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ
als("/sizes")); | |
| 22114 pathOffset += 6; | |
| 22115 | |
| 22116 var query = (req.url).query; | |
| 22117 var queryOffset = 0; | |
| 22118 var queryMap = {}; | |
| 22119 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 22120 parseBool(n) { | |
| 22121 if (n == "true") return true; | |
| 22122 if (n == "false") return false; | |
| 22123 if (n == null) return null; | |
| 22124 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 22125 } | |
| 22126 if (query.length > 0) { | |
| 22127 for (var part in query.split("&")) { | |
| 22128 var keyvalue = part.split("="); | |
| 22129 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 22130 } | |
| 22131 } | |
| 22132 | |
| 22133 | |
| 22134 var h = { | |
| 22135 "content-type" : "application/json; charset=utf-8", | |
| 22136 }; | |
| 22137 var resp = convert.JSON.encode(buildSize()); | |
| 22138 return new async.Future.value(stringResponse(200, h, resp)); | |
| 22139 }), true); | |
| 22140 res.insert(arg_request, arg_profileId).then(unittest.expectAsync(((api.Siz
e response) { | |
| 22141 checkSize(response); | |
| 22142 }))); | |
| 22143 }); | |
| 22144 | |
| 22145 unittest.test("method--list", () { | |
| 22146 | |
| 22147 var mock = new HttpServerMock(); | |
| 22148 api.SizesResourceApi res = new api.DfareportingApi(mock).sizes; | |
| 22149 var arg_profileId = "foo"; | |
| 22150 var arg_height = 42; | |
| 22151 var arg_iabStandard = true; | |
| 22152 var arg_ids = buildUnnamed1572(); | |
| 22153 var arg_width = 42; | |
| 22154 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 22155 var path = (req.url).path; | |
| 22156 var pathOffset = 0; | |
| 22157 var index; | |
| 22158 var subPart; | |
| 22159 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 22160 pathOffset += 1; | |
| 22161 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 22162 pathOffset += 18; | |
| 22163 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 22164 pathOffset += 13; | |
| 22165 index = path.indexOf("/sizes", pathOffset); | |
| 22166 unittest.expect(index >= 0, unittest.isTrue); | |
| 22167 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 22168 pathOffset = index; | |
| 22169 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 22170 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ
als("/sizes")); | |
| 22171 pathOffset += 6; | |
| 22172 | |
| 22173 var query = (req.url).query; | |
| 22174 var queryOffset = 0; | |
| 22175 var queryMap = {}; | |
| 22176 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 22177 parseBool(n) { | |
| 22178 if (n == "true") return true; | |
| 22179 if (n == "false") return false; | |
| 22180 if (n == null) return null; | |
| 22181 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 22182 } | |
| 22183 if (query.length > 0) { | |
| 22184 for (var part in query.split("&")) { | |
| 22185 var keyvalue = part.split("="); | |
| 22186 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 22187 } | |
| 22188 } | |
| 22189 unittest.expect(core.int.parse(queryMap["height"].first), unittest.equal
s(arg_height)); | |
| 22190 unittest.expect(queryMap["iabStandard"].first, unittest.equals("$arg_iab
Standard")); | |
| 22191 unittest.expect(queryMap["ids"], unittest.equals(arg_ids)); | |
| 22192 unittest.expect(core.int.parse(queryMap["width"].first), unittest.equals
(arg_width)); | |
| 22193 | |
| 22194 | |
| 22195 var h = { | |
| 22196 "content-type" : "application/json; charset=utf-8", | |
| 22197 }; | |
| 22198 var resp = convert.JSON.encode(buildSizesListResponse()); | |
| 22199 return new async.Future.value(stringResponse(200, h, resp)); | |
| 22200 }), true); | |
| 22201 res.list(arg_profileId, height: arg_height, iabStandard: arg_iabStandard,
ids: arg_ids, width: arg_width).then(unittest.expectAsync(((api.SizesListRespons
e response) { | |
| 22202 checkSizesListResponse(response); | |
| 22203 }))); | |
| 22204 }); | |
| 22205 | |
| 22206 }); | |
| 22207 | |
| 22208 | |
| 22209 unittest.group("resource-SubaccountsResourceApi", () { | |
| 22210 unittest.test("method--get", () { | |
| 22211 | |
| 22212 var mock = new HttpServerMock(); | |
| 22213 api.SubaccountsResourceApi res = new api.DfareportingApi(mock).subaccounts
; | |
| 22214 var arg_profileId = "foo"; | |
| 22215 var arg_id = "foo"; | |
| 22216 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 22217 var path = (req.url).path; | |
| 22218 var pathOffset = 0; | |
| 22219 var index; | |
| 22220 var subPart; | |
| 22221 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 22222 pathOffset += 1; | |
| 22223 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 22224 pathOffset += 18; | |
| 22225 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 22226 pathOffset += 13; | |
| 22227 index = path.indexOf("/subaccounts/", pathOffset); | |
| 22228 unittest.expect(index >= 0, unittest.isTrue); | |
| 22229 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 22230 pathOffset = index; | |
| 22231 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 22232 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("/subaccounts/")); | |
| 22233 pathOffset += 13; | |
| 22234 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 22235 pathOffset = path.length; | |
| 22236 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 22237 | |
| 22238 var query = (req.url).query; | |
| 22239 var queryOffset = 0; | |
| 22240 var queryMap = {}; | |
| 22241 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 22242 parseBool(n) { | |
| 22243 if (n == "true") return true; | |
| 22244 if (n == "false") return false; | |
| 22245 if (n == null) return null; | |
| 22246 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 22247 } | |
| 22248 if (query.length > 0) { | |
| 22249 for (var part in query.split("&")) { | |
| 22250 var keyvalue = part.split("="); | |
| 22251 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 22252 } | |
| 22253 } | |
| 22254 | |
| 22255 | |
| 22256 var h = { | |
| 22257 "content-type" : "application/json; charset=utf-8", | |
| 22258 }; | |
| 22259 var resp = convert.JSON.encode(buildSubaccount()); | |
| 22260 return new async.Future.value(stringResponse(200, h, resp)); | |
| 22261 }), true); | |
| 22262 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.Subaccount
response) { | |
| 22263 checkSubaccount(response); | |
| 22264 }))); | |
| 22265 }); | |
| 22266 | |
| 22267 unittest.test("method--insert", () { | |
| 22268 | |
| 22269 var mock = new HttpServerMock(); | |
| 22270 api.SubaccountsResourceApi res = new api.DfareportingApi(mock).subaccounts
; | |
| 22271 var arg_request = buildSubaccount(); | |
| 22272 var arg_profileId = "foo"; | |
| 22273 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 22274 var obj = new api.Subaccount.fromJson(json); | |
| 22275 checkSubaccount(obj); | |
| 22276 | |
| 22277 var path = (req.url).path; | |
| 22278 var pathOffset = 0; | |
| 22279 var index; | |
| 22280 var subPart; | |
| 22281 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 22282 pathOffset += 1; | |
| 22283 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 22284 pathOffset += 18; | |
| 22285 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 22286 pathOffset += 13; | |
| 22287 index = path.indexOf("/subaccounts", pathOffset); | |
| 22288 unittest.expect(index >= 0, unittest.isTrue); | |
| 22289 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 22290 pathOffset = index; | |
| 22291 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 22292 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("/subaccounts")); | |
| 22293 pathOffset += 12; | |
| 22294 | |
| 22295 var query = (req.url).query; | |
| 22296 var queryOffset = 0; | |
| 22297 var queryMap = {}; | |
| 22298 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 22299 parseBool(n) { | |
| 22300 if (n == "true") return true; | |
| 22301 if (n == "false") return false; | |
| 22302 if (n == null) return null; | |
| 22303 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 22304 } | |
| 22305 if (query.length > 0) { | |
| 22306 for (var part in query.split("&")) { | |
| 22307 var keyvalue = part.split("="); | |
| 22308 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 22309 } | |
| 22310 } | |
| 22311 | |
| 22312 | |
| 22313 var h = { | |
| 22314 "content-type" : "application/json; charset=utf-8", | |
| 22315 }; | |
| 22316 var resp = convert.JSON.encode(buildSubaccount()); | |
| 22317 return new async.Future.value(stringResponse(200, h, resp)); | |
| 22318 }), true); | |
| 22319 res.insert(arg_request, arg_profileId).then(unittest.expectAsync(((api.Sub
account response) { | |
| 22320 checkSubaccount(response); | |
| 22321 }))); | |
| 22322 }); | |
| 22323 | |
| 22324 unittest.test("method--list", () { | |
| 22325 | |
| 22326 var mock = new HttpServerMock(); | |
| 22327 api.SubaccountsResourceApi res = new api.DfareportingApi(mock).subaccounts
; | |
| 22328 var arg_profileId = "foo"; | |
| 22329 var arg_ids = buildUnnamed1573(); | |
| 22330 var arg_maxResults = 42; | |
| 22331 var arg_pageToken = "foo"; | |
| 22332 var arg_searchString = "foo"; | |
| 22333 var arg_sortField = "foo"; | |
| 22334 var arg_sortOrder = "foo"; | |
| 22335 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 22336 var path = (req.url).path; | |
| 22337 var pathOffset = 0; | |
| 22338 var index; | |
| 22339 var subPart; | |
| 22340 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 22341 pathOffset += 1; | |
| 22342 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 22343 pathOffset += 18; | |
| 22344 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 22345 pathOffset += 13; | |
| 22346 index = path.indexOf("/subaccounts", pathOffset); | |
| 22347 unittest.expect(index >= 0, unittest.isTrue); | |
| 22348 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 22349 pathOffset = index; | |
| 22350 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 22351 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("/subaccounts")); | |
| 22352 pathOffset += 12; | |
| 22353 | |
| 22354 var query = (req.url).query; | |
| 22355 var queryOffset = 0; | |
| 22356 var queryMap = {}; | |
| 22357 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 22358 parseBool(n) { | |
| 22359 if (n == "true") return true; | |
| 22360 if (n == "false") return false; | |
| 22361 if (n == null) return null; | |
| 22362 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 22363 } | |
| 22364 if (query.length > 0) { | |
| 22365 for (var part in query.split("&")) { | |
| 22366 var keyvalue = part.split("="); | |
| 22367 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 22368 } | |
| 22369 } | |
| 22370 unittest.expect(queryMap["ids"], unittest.equals(arg_ids)); | |
| 22371 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | |
| 22372 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 22373 unittest.expect(queryMap["searchString"].first, unittest.equals(arg_sear
chString)); | |
| 22374 unittest.expect(queryMap["sortField"].first, unittest.equals(arg_sortFie
ld)); | |
| 22375 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | |
| 22376 | |
| 22377 | |
| 22378 var h = { | |
| 22379 "content-type" : "application/json; charset=utf-8", | |
| 22380 }; | |
| 22381 var resp = convert.JSON.encode(buildSubaccountsListResponse()); | |
| 22382 return new async.Future.value(stringResponse(200, h, resp)); | |
| 22383 }), true); | |
| 22384 res.list(arg_profileId, ids: arg_ids, maxResults: arg_maxResults, pageToke
n: arg_pageToken, searchString: arg_searchString, sortField: arg_sortField, sort
Order: arg_sortOrder).then(unittest.expectAsync(((api.SubaccountsListResponse re
sponse) { | |
| 22385 checkSubaccountsListResponse(response); | |
| 22386 }))); | |
| 22387 }); | |
| 22388 | |
| 22389 unittest.test("method--patch", () { | |
| 22390 | |
| 22391 var mock = new HttpServerMock(); | |
| 22392 api.SubaccountsResourceApi res = new api.DfareportingApi(mock).subaccounts
; | |
| 22393 var arg_request = buildSubaccount(); | |
| 22394 var arg_profileId = "foo"; | |
| 22395 var arg_id = "foo"; | |
| 22396 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 22397 var obj = new api.Subaccount.fromJson(json); | |
| 22398 checkSubaccount(obj); | |
| 22399 | |
| 22400 var path = (req.url).path; | |
| 22401 var pathOffset = 0; | |
| 22402 var index; | |
| 22403 var subPart; | |
| 22404 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 22405 pathOffset += 1; | |
| 22406 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 22407 pathOffset += 18; | |
| 22408 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 22409 pathOffset += 13; | |
| 22410 index = path.indexOf("/subaccounts", pathOffset); | |
| 22411 unittest.expect(index >= 0, unittest.isTrue); | |
| 22412 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 22413 pathOffset = index; | |
| 22414 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 22415 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("/subaccounts")); | |
| 22416 pathOffset += 12; | |
| 22417 | |
| 22418 var query = (req.url).query; | |
| 22419 var queryOffset = 0; | |
| 22420 var queryMap = {}; | |
| 22421 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 22422 parseBool(n) { | |
| 22423 if (n == "true") return true; | |
| 22424 if (n == "false") return false; | |
| 22425 if (n == null) return null; | |
| 22426 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 22427 } | |
| 22428 if (query.length > 0) { | |
| 22429 for (var part in query.split("&")) { | |
| 22430 var keyvalue = part.split("="); | |
| 22431 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 22432 } | |
| 22433 } | |
| 22434 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); | |
| 22435 | |
| 22436 | |
| 22437 var h = { | |
| 22438 "content-type" : "application/json; charset=utf-8", | |
| 22439 }; | |
| 22440 var resp = convert.JSON.encode(buildSubaccount()); | |
| 22441 return new async.Future.value(stringResponse(200, h, resp)); | |
| 22442 }), true); | |
| 22443 res.patch(arg_request, arg_profileId, arg_id).then(unittest.expectAsync(((
api.Subaccount response) { | |
| 22444 checkSubaccount(response); | |
| 22445 }))); | |
| 22446 }); | |
| 22447 | |
| 22448 unittest.test("method--update", () { | |
| 22449 | |
| 22450 var mock = new HttpServerMock(); | |
| 22451 api.SubaccountsResourceApi res = new api.DfareportingApi(mock).subaccounts
; | |
| 22452 var arg_request = buildSubaccount(); | |
| 22453 var arg_profileId = "foo"; | |
| 22454 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 22455 var obj = new api.Subaccount.fromJson(json); | |
| 22456 checkSubaccount(obj); | |
| 22457 | |
| 22458 var path = (req.url).path; | |
| 22459 var pathOffset = 0; | |
| 22460 var index; | |
| 22461 var subPart; | |
| 22462 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 22463 pathOffset += 1; | |
| 22464 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 22465 pathOffset += 18; | |
| 22466 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 22467 pathOffset += 13; | |
| 22468 index = path.indexOf("/subaccounts", pathOffset); | |
| 22469 unittest.expect(index >= 0, unittest.isTrue); | |
| 22470 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 22471 pathOffset = index; | |
| 22472 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 22473 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("/subaccounts")); | |
| 22474 pathOffset += 12; | |
| 22475 | |
| 22476 var query = (req.url).query; | |
| 22477 var queryOffset = 0; | |
| 22478 var queryMap = {}; | |
| 22479 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 22480 parseBool(n) { | |
| 22481 if (n == "true") return true; | |
| 22482 if (n == "false") return false; | |
| 22483 if (n == null) return null; | |
| 22484 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 22485 } | |
| 22486 if (query.length > 0) { | |
| 22487 for (var part in query.split("&")) { | |
| 22488 var keyvalue = part.split("="); | |
| 22489 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 22490 } | |
| 22491 } | |
| 22492 | |
| 22493 | |
| 22494 var h = { | |
| 22495 "content-type" : "application/json; charset=utf-8", | |
| 22496 }; | |
| 22497 var resp = convert.JSON.encode(buildSubaccount()); | |
| 22498 return new async.Future.value(stringResponse(200, h, resp)); | |
| 22499 }), true); | |
| 22500 res.update(arg_request, arg_profileId).then(unittest.expectAsync(((api.Sub
account response) { | |
| 22501 checkSubaccount(response); | |
| 22502 }))); | |
| 22503 }); | |
| 22504 | |
| 22505 }); | |
| 22506 | |
| 22507 | |
| 22508 unittest.group("resource-TargetableRemarketingListsResourceApi", () { | |
| 22509 unittest.test("method--get", () { | |
| 22510 | |
| 22511 var mock = new HttpServerMock(); | |
| 22512 api.TargetableRemarketingListsResourceApi res = new api.DfareportingApi(mo
ck).targetableRemarketingLists; | |
| 22513 var arg_profileId = "foo"; | |
| 22514 var arg_id = "foo"; | |
| 22515 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 22516 var path = (req.url).path; | |
| 22517 var pathOffset = 0; | |
| 22518 var index; | |
| 22519 var subPart; | |
| 22520 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 22521 pathOffset += 1; | |
| 22522 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 22523 pathOffset += 18; | |
| 22524 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 22525 pathOffset += 13; | |
| 22526 index = path.indexOf("/targetableRemarketingLists/", pathOffset); | |
| 22527 unittest.expect(index >= 0, unittest.isTrue); | |
| 22528 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 22529 pathOffset = index; | |
| 22530 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 22531 unittest.expect(path.substring(pathOffset, pathOffset + 28), unittest.eq
uals("/targetableRemarketingLists/")); | |
| 22532 pathOffset += 28; | |
| 22533 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 22534 pathOffset = path.length; | |
| 22535 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 22536 | |
| 22537 var query = (req.url).query; | |
| 22538 var queryOffset = 0; | |
| 22539 var queryMap = {}; | |
| 22540 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 22541 parseBool(n) { | |
| 22542 if (n == "true") return true; | |
| 22543 if (n == "false") return false; | |
| 22544 if (n == null) return null; | |
| 22545 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 22546 } | |
| 22547 if (query.length > 0) { | |
| 22548 for (var part in query.split("&")) { | |
| 22549 var keyvalue = part.split("="); | |
| 22550 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 22551 } | |
| 22552 } | |
| 22553 | |
| 22554 | |
| 22555 var h = { | |
| 22556 "content-type" : "application/json; charset=utf-8", | |
| 22557 }; | |
| 22558 var resp = convert.JSON.encode(buildTargetableRemarketingList()); | |
| 22559 return new async.Future.value(stringResponse(200, h, resp)); | |
| 22560 }), true); | |
| 22561 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.TargetableR
emarketingList response) { | |
| 22562 checkTargetableRemarketingList(response); | |
| 22563 }))); | |
| 22564 }); | |
| 22565 | |
| 22566 unittest.test("method--list", () { | |
| 22567 | |
| 22568 var mock = new HttpServerMock(); | |
| 22569 api.TargetableRemarketingListsResourceApi res = new api.DfareportingApi(mo
ck).targetableRemarketingLists; | |
| 22570 var arg_profileId = "foo"; | |
| 22571 var arg_advertiserId = "foo"; | |
| 22572 var arg_active = true; | |
| 22573 var arg_maxResults = 42; | |
| 22574 var arg_name = "foo"; | |
| 22575 var arg_pageToken = "foo"; | |
| 22576 var arg_sortField = "foo"; | |
| 22577 var arg_sortOrder = "foo"; | |
| 22578 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 22579 var path = (req.url).path; | |
| 22580 var pathOffset = 0; | |
| 22581 var index; | |
| 22582 var subPart; | |
| 22583 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 22584 pathOffset += 1; | |
| 22585 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 22586 pathOffset += 18; | |
| 22587 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 22588 pathOffset += 13; | |
| 22589 index = path.indexOf("/targetableRemarketingLists", pathOffset); | |
| 22590 unittest.expect(index >= 0, unittest.isTrue); | |
| 22591 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 22592 pathOffset = index; | |
| 22593 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 22594 unittest.expect(path.substring(pathOffset, pathOffset + 27), unittest.eq
uals("/targetableRemarketingLists")); | |
| 22595 pathOffset += 27; | |
| 22596 | |
| 22597 var query = (req.url).query; | |
| 22598 var queryOffset = 0; | |
| 22599 var queryMap = {}; | |
| 22600 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 22601 parseBool(n) { | |
| 22602 if (n == "true") return true; | |
| 22603 if (n == "false") return false; | |
| 22604 if (n == null) return null; | |
| 22605 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 22606 } | |
| 22607 if (query.length > 0) { | |
| 22608 for (var part in query.split("&")) { | |
| 22609 var keyvalue = part.split("="); | |
| 22610 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 22611 } | |
| 22612 } | |
| 22613 unittest.expect(queryMap["advertiserId"].first, unittest.equals(arg_adve
rtiserId)); | |
| 22614 unittest.expect(queryMap["active"].first, unittest.equals("$arg_active")
); | |
| 22615 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | |
| 22616 unittest.expect(queryMap["name"].first, unittest.equals(arg_name)); | |
| 22617 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 22618 unittest.expect(queryMap["sortField"].first, unittest.equals(arg_sortFie
ld)); | |
| 22619 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | |
| 22620 | |
| 22621 | |
| 22622 var h = { | |
| 22623 "content-type" : "application/json; charset=utf-8", | |
| 22624 }; | |
| 22625 var resp = convert.JSON.encode(buildTargetableRemarketingListsListRespon
se()); | |
| 22626 return new async.Future.value(stringResponse(200, h, resp)); | |
| 22627 }), true); | |
| 22628 res.list(arg_profileId, arg_advertiserId, active: arg_active, maxResults:
arg_maxResults, name: arg_name, pageToken: arg_pageToken, sortField: arg_sortFie
ld, sortOrder: arg_sortOrder).then(unittest.expectAsync(((api.TargetableRemarket
ingListsListResponse response) { | |
| 22629 checkTargetableRemarketingListsListResponse(response); | |
| 22630 }))); | |
| 22631 }); | |
| 22632 | |
| 22633 }); | |
| 22634 | |
| 22635 | |
| 22636 unittest.group("resource-UserProfilesResourceApi", () { | |
| 22637 unittest.test("method--get", () { | |
| 22638 | |
| 22639 var mock = new HttpServerMock(); | |
| 22640 api.UserProfilesResourceApi res = new api.DfareportingApi(mock).userProfil
es; | |
| 22641 var arg_profileId = "foo"; | |
| 22642 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 22643 var path = (req.url).path; | |
| 22644 var pathOffset = 0; | |
| 22645 var index; | |
| 22646 var subPart; | |
| 22647 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 22648 pathOffset += 1; | |
| 22649 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 22650 pathOffset += 18; | |
| 22651 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 22652 pathOffset += 13; | |
| 22653 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 22654 pathOffset = path.length; | |
| 22655 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 22656 | |
| 22657 var query = (req.url).query; | |
| 22658 var queryOffset = 0; | |
| 22659 var queryMap = {}; | |
| 22660 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 22661 parseBool(n) { | |
| 22662 if (n == "true") return true; | |
| 22663 if (n == "false") return false; | |
| 22664 if (n == null) return null; | |
| 22665 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 22666 } | |
| 22667 if (query.length > 0) { | |
| 22668 for (var part in query.split("&")) { | |
| 22669 var keyvalue = part.split("="); | |
| 22670 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 22671 } | |
| 22672 } | |
| 22673 | |
| 22674 | |
| 22675 var h = { | |
| 22676 "content-type" : "application/json; charset=utf-8", | |
| 22677 }; | |
| 22678 var resp = convert.JSON.encode(buildUserProfile()); | |
| 22679 return new async.Future.value(stringResponse(200, h, resp)); | |
| 22680 }), true); | |
| 22681 res.get(arg_profileId).then(unittest.expectAsync(((api.UserProfile respons
e) { | |
| 22682 checkUserProfile(response); | |
| 22683 }))); | |
| 22684 }); | |
| 22685 | |
| 22686 unittest.test("method--list", () { | |
| 22687 | |
| 22688 var mock = new HttpServerMock(); | |
| 22689 api.UserProfilesResourceApi res = new api.DfareportingApi(mock).userProfil
es; | |
| 22690 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 22691 var path = (req.url).path; | |
| 22692 var pathOffset = 0; | |
| 22693 var index; | |
| 22694 var subPart; | |
| 22695 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 22696 pathOffset += 1; | |
| 22697 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 22698 pathOffset += 18; | |
| 22699 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("userprofiles")); | |
| 22700 pathOffset += 12; | |
| 22701 | |
| 22702 var query = (req.url).query; | |
| 22703 var queryOffset = 0; | |
| 22704 var queryMap = {}; | |
| 22705 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 22706 parseBool(n) { | |
| 22707 if (n == "true") return true; | |
| 22708 if (n == "false") return false; | |
| 22709 if (n == null) return null; | |
| 22710 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 22711 } | |
| 22712 if (query.length > 0) { | |
| 22713 for (var part in query.split("&")) { | |
| 22714 var keyvalue = part.split("="); | |
| 22715 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 22716 } | |
| 22717 } | |
| 22718 | |
| 22719 | |
| 22720 var h = { | |
| 22721 "content-type" : "application/json; charset=utf-8", | |
| 22722 }; | |
| 22723 var resp = convert.JSON.encode(buildUserProfileList()); | |
| 22724 return new async.Future.value(stringResponse(200, h, resp)); | |
| 22725 }), true); | |
| 22726 res.list().then(unittest.expectAsync(((api.UserProfileList response) { | |
| 22727 checkUserProfileList(response); | |
| 22728 }))); | |
| 22729 }); | |
| 22730 | |
| 22731 }); | |
| 22732 | |
| 22733 | |
| 22734 unittest.group("resource-UserRolePermissionGroupsResourceApi", () { | |
| 22735 unittest.test("method--get", () { | |
| 22736 | |
| 22737 var mock = new HttpServerMock(); | |
| 22738 api.UserRolePermissionGroupsResourceApi res = new api.DfareportingApi(mock
).userRolePermissionGroups; | |
| 22739 var arg_profileId = "foo"; | |
| 22740 var arg_id = "foo"; | |
| 22741 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 22742 var path = (req.url).path; | |
| 22743 var pathOffset = 0; | |
| 22744 var index; | |
| 22745 var subPart; | |
| 22746 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 22747 pathOffset += 1; | |
| 22748 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 22749 pathOffset += 18; | |
| 22750 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 22751 pathOffset += 13; | |
| 22752 index = path.indexOf("/userRolePermissionGroups/", pathOffset); | |
| 22753 unittest.expect(index >= 0, unittest.isTrue); | |
| 22754 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 22755 pathOffset = index; | |
| 22756 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 22757 unittest.expect(path.substring(pathOffset, pathOffset + 26), unittest.eq
uals("/userRolePermissionGroups/")); | |
| 22758 pathOffset += 26; | |
| 22759 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 22760 pathOffset = path.length; | |
| 22761 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 22762 | |
| 22763 var query = (req.url).query; | |
| 22764 var queryOffset = 0; | |
| 22765 var queryMap = {}; | |
| 22766 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 22767 parseBool(n) { | |
| 22768 if (n == "true") return true; | |
| 22769 if (n == "false") return false; | |
| 22770 if (n == null) return null; | |
| 22771 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 22772 } | |
| 22773 if (query.length > 0) { | |
| 22774 for (var part in query.split("&")) { | |
| 22775 var keyvalue = part.split("="); | |
| 22776 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 22777 } | |
| 22778 } | |
| 22779 | |
| 22780 | |
| 22781 var h = { | |
| 22782 "content-type" : "application/json; charset=utf-8", | |
| 22783 }; | |
| 22784 var resp = convert.JSON.encode(buildUserRolePermissionGroup()); | |
| 22785 return new async.Future.value(stringResponse(200, h, resp)); | |
| 22786 }), true); | |
| 22787 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.UserRolePer
missionGroup response) { | |
| 22788 checkUserRolePermissionGroup(response); | |
| 22789 }))); | |
| 22790 }); | |
| 22791 | |
| 22792 unittest.test("method--list", () { | |
| 22793 | |
| 22794 var mock = new HttpServerMock(); | |
| 22795 api.UserRolePermissionGroupsResourceApi res = new api.DfareportingApi(mock
).userRolePermissionGroups; | |
| 22796 var arg_profileId = "foo"; | |
| 22797 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 22798 var path = (req.url).path; | |
| 22799 var pathOffset = 0; | |
| 22800 var index; | |
| 22801 var subPart; | |
| 22802 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 22803 pathOffset += 1; | |
| 22804 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 22805 pathOffset += 18; | |
| 22806 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 22807 pathOffset += 13; | |
| 22808 index = path.indexOf("/userRolePermissionGroups", pathOffset); | |
| 22809 unittest.expect(index >= 0, unittest.isTrue); | |
| 22810 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 22811 pathOffset = index; | |
| 22812 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 22813 unittest.expect(path.substring(pathOffset, pathOffset + 25), unittest.eq
uals("/userRolePermissionGroups")); | |
| 22814 pathOffset += 25; | |
| 22815 | |
| 22816 var query = (req.url).query; | |
| 22817 var queryOffset = 0; | |
| 22818 var queryMap = {}; | |
| 22819 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 22820 parseBool(n) { | |
| 22821 if (n == "true") return true; | |
| 22822 if (n == "false") return false; | |
| 22823 if (n == null) return null; | |
| 22824 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 22825 } | |
| 22826 if (query.length > 0) { | |
| 22827 for (var part in query.split("&")) { | |
| 22828 var keyvalue = part.split("="); | |
| 22829 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 22830 } | |
| 22831 } | |
| 22832 | |
| 22833 | |
| 22834 var h = { | |
| 22835 "content-type" : "application/json; charset=utf-8", | |
| 22836 }; | |
| 22837 var resp = convert.JSON.encode(buildUserRolePermissionGroupsListResponse
()); | |
| 22838 return new async.Future.value(stringResponse(200, h, resp)); | |
| 22839 }), true); | |
| 22840 res.list(arg_profileId).then(unittest.expectAsync(((api.UserRolePermission
GroupsListResponse response) { | |
| 22841 checkUserRolePermissionGroupsListResponse(response); | |
| 22842 }))); | |
| 22843 }); | |
| 22844 | |
| 22845 }); | |
| 22846 | |
| 22847 | |
| 22848 unittest.group("resource-UserRolePermissionsResourceApi", () { | |
| 22849 unittest.test("method--get", () { | |
| 22850 | |
| 22851 var mock = new HttpServerMock(); | |
| 22852 api.UserRolePermissionsResourceApi res = new api.DfareportingApi(mock).use
rRolePermissions; | |
| 22853 var arg_profileId = "foo"; | |
| 22854 var arg_id = "foo"; | |
| 22855 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 22856 var path = (req.url).path; | |
| 22857 var pathOffset = 0; | |
| 22858 var index; | |
| 22859 var subPart; | |
| 22860 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 22861 pathOffset += 1; | |
| 22862 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 22863 pathOffset += 18; | |
| 22864 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 22865 pathOffset += 13; | |
| 22866 index = path.indexOf("/userRolePermissions/", pathOffset); | |
| 22867 unittest.expect(index >= 0, unittest.isTrue); | |
| 22868 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 22869 pathOffset = index; | |
| 22870 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 22871 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("/userRolePermissions/")); | |
| 22872 pathOffset += 21; | |
| 22873 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 22874 pathOffset = path.length; | |
| 22875 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 22876 | |
| 22877 var query = (req.url).query; | |
| 22878 var queryOffset = 0; | |
| 22879 var queryMap = {}; | |
| 22880 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 22881 parseBool(n) { | |
| 22882 if (n == "true") return true; | |
| 22883 if (n == "false") return false; | |
| 22884 if (n == null) return null; | |
| 22885 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 22886 } | |
| 22887 if (query.length > 0) { | |
| 22888 for (var part in query.split("&")) { | |
| 22889 var keyvalue = part.split("="); | |
| 22890 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 22891 } | |
| 22892 } | |
| 22893 | |
| 22894 | |
| 22895 var h = { | |
| 22896 "content-type" : "application/json; charset=utf-8", | |
| 22897 }; | |
| 22898 var resp = convert.JSON.encode(buildUserRolePermission()); | |
| 22899 return new async.Future.value(stringResponse(200, h, resp)); | |
| 22900 }), true); | |
| 22901 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.UserRolePer
mission response) { | |
| 22902 checkUserRolePermission(response); | |
| 22903 }))); | |
| 22904 }); | |
| 22905 | |
| 22906 unittest.test("method--list", () { | |
| 22907 | |
| 22908 var mock = new HttpServerMock(); | |
| 22909 api.UserRolePermissionsResourceApi res = new api.DfareportingApi(mock).use
rRolePermissions; | |
| 22910 var arg_profileId = "foo"; | |
| 22911 var arg_ids = buildUnnamed1574(); | |
| 22912 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 22913 var path = (req.url).path; | |
| 22914 var pathOffset = 0; | |
| 22915 var index; | |
| 22916 var subPart; | |
| 22917 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 22918 pathOffset += 1; | |
| 22919 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 22920 pathOffset += 18; | |
| 22921 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 22922 pathOffset += 13; | |
| 22923 index = path.indexOf("/userRolePermissions", pathOffset); | |
| 22924 unittest.expect(index >= 0, unittest.isTrue); | |
| 22925 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 22926 pathOffset = index; | |
| 22927 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 22928 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("/userRolePermissions")); | |
| 22929 pathOffset += 20; | |
| 22930 | |
| 22931 var query = (req.url).query; | |
| 22932 var queryOffset = 0; | |
| 22933 var queryMap = {}; | |
| 22934 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 22935 parseBool(n) { | |
| 22936 if (n == "true") return true; | |
| 22937 if (n == "false") return false; | |
| 22938 if (n == null) return null; | |
| 22939 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 22940 } | |
| 22941 if (query.length > 0) { | |
| 22942 for (var part in query.split("&")) { | |
| 22943 var keyvalue = part.split("="); | |
| 22944 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 22945 } | |
| 22946 } | |
| 22947 unittest.expect(queryMap["ids"], unittest.equals(arg_ids)); | |
| 22948 | |
| 22949 | |
| 22950 var h = { | |
| 22951 "content-type" : "application/json; charset=utf-8", | |
| 22952 }; | |
| 22953 var resp = convert.JSON.encode(buildUserRolePermissionsListResponse()); | |
| 22954 return new async.Future.value(stringResponse(200, h, resp)); | |
| 22955 }), true); | |
| 22956 res.list(arg_profileId, ids: arg_ids).then(unittest.expectAsync(((api.User
RolePermissionsListResponse response) { | |
| 22957 checkUserRolePermissionsListResponse(response); | |
| 22958 }))); | |
| 22959 }); | |
| 22960 | |
| 22961 }); | |
| 22962 | |
| 22963 | |
| 22964 unittest.group("resource-UserRolesResourceApi", () { | |
| 22965 unittest.test("method--delete", () { | |
| 22966 | |
| 22967 var mock = new HttpServerMock(); | |
| 22968 api.UserRolesResourceApi res = new api.DfareportingApi(mock).userRoles; | |
| 22969 var arg_profileId = "foo"; | |
| 22970 var arg_id = "foo"; | |
| 22971 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 22972 var path = (req.url).path; | |
| 22973 var pathOffset = 0; | |
| 22974 var index; | |
| 22975 var subPart; | |
| 22976 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 22977 pathOffset += 1; | |
| 22978 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 22979 pathOffset += 18; | |
| 22980 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 22981 pathOffset += 13; | |
| 22982 index = path.indexOf("/userRoles/", pathOffset); | |
| 22983 unittest.expect(index >= 0, unittest.isTrue); | |
| 22984 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 22985 pathOffset = index; | |
| 22986 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 22987 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("/userRoles/")); | |
| 22988 pathOffset += 11; | |
| 22989 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 22990 pathOffset = path.length; | |
| 22991 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 22992 | |
| 22993 var query = (req.url).query; | |
| 22994 var queryOffset = 0; | |
| 22995 var queryMap = {}; | |
| 22996 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 22997 parseBool(n) { | |
| 22998 if (n == "true") return true; | |
| 22999 if (n == "false") return false; | |
| 23000 if (n == null) return null; | |
| 23001 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 23002 } | |
| 23003 if (query.length > 0) { | |
| 23004 for (var part in query.split("&")) { | |
| 23005 var keyvalue = part.split("="); | |
| 23006 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 23007 } | |
| 23008 } | |
| 23009 | |
| 23010 | |
| 23011 var h = { | |
| 23012 "content-type" : "application/json; charset=utf-8", | |
| 23013 }; | |
| 23014 var resp = ""; | |
| 23015 return new async.Future.value(stringResponse(200, h, resp)); | |
| 23016 }), true); | |
| 23017 res.delete(arg_profileId, arg_id).then(unittest.expectAsync((_) {})); | |
| 23018 }); | |
| 23019 | |
| 23020 unittest.test("method--get", () { | |
| 23021 | |
| 23022 var mock = new HttpServerMock(); | |
| 23023 api.UserRolesResourceApi res = new api.DfareportingApi(mock).userRoles; | |
| 23024 var arg_profileId = "foo"; | |
| 23025 var arg_id = "foo"; | |
| 23026 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 23027 var path = (req.url).path; | |
| 23028 var pathOffset = 0; | |
| 23029 var index; | |
| 23030 var subPart; | |
| 23031 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 23032 pathOffset += 1; | |
| 23033 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 23034 pathOffset += 18; | |
| 23035 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 23036 pathOffset += 13; | |
| 23037 index = path.indexOf("/userRoles/", pathOffset); | |
| 23038 unittest.expect(index >= 0, unittest.isTrue); | |
| 23039 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 23040 pathOffset = index; | |
| 23041 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 23042 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("/userRoles/")); | |
| 23043 pathOffset += 11; | |
| 23044 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 23045 pathOffset = path.length; | |
| 23046 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 23047 | |
| 23048 var query = (req.url).query; | |
| 23049 var queryOffset = 0; | |
| 23050 var queryMap = {}; | |
| 23051 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 23052 parseBool(n) { | |
| 23053 if (n == "true") return true; | |
| 23054 if (n == "false") return false; | |
| 23055 if (n == null) return null; | |
| 23056 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 23057 } | |
| 23058 if (query.length > 0) { | |
| 23059 for (var part in query.split("&")) { | |
| 23060 var keyvalue = part.split("="); | |
| 23061 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 23062 } | |
| 23063 } | |
| 23064 | |
| 23065 | |
| 23066 var h = { | |
| 23067 "content-type" : "application/json; charset=utf-8", | |
| 23068 }; | |
| 23069 var resp = convert.JSON.encode(buildUserRole()); | |
| 23070 return new async.Future.value(stringResponse(200, h, resp)); | |
| 23071 }), true); | |
| 23072 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.UserRole re
sponse) { | |
| 23073 checkUserRole(response); | |
| 23074 }))); | |
| 23075 }); | |
| 23076 | |
| 23077 unittest.test("method--insert", () { | |
| 23078 | |
| 23079 var mock = new HttpServerMock(); | |
| 23080 api.UserRolesResourceApi res = new api.DfareportingApi(mock).userRoles; | |
| 23081 var arg_request = buildUserRole(); | |
| 23082 var arg_profileId = "foo"; | |
| 23083 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 23084 var obj = new api.UserRole.fromJson(json); | |
| 23085 checkUserRole(obj); | |
| 23086 | |
| 23087 var path = (req.url).path; | |
| 23088 var pathOffset = 0; | |
| 23089 var index; | |
| 23090 var subPart; | |
| 23091 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 23092 pathOffset += 1; | |
| 23093 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 23094 pathOffset += 18; | |
| 23095 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 23096 pathOffset += 13; | |
| 23097 index = path.indexOf("/userRoles", pathOffset); | |
| 23098 unittest.expect(index >= 0, unittest.isTrue); | |
| 23099 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 23100 pathOffset = index; | |
| 23101 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 23102 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/userRoles")); | |
| 23103 pathOffset += 10; | |
| 23104 | |
| 23105 var query = (req.url).query; | |
| 23106 var queryOffset = 0; | |
| 23107 var queryMap = {}; | |
| 23108 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 23109 parseBool(n) { | |
| 23110 if (n == "true") return true; | |
| 23111 if (n == "false") return false; | |
| 23112 if (n == null) return null; | |
| 23113 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 23114 } | |
| 23115 if (query.length > 0) { | |
| 23116 for (var part in query.split("&")) { | |
| 23117 var keyvalue = part.split("="); | |
| 23118 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 23119 } | |
| 23120 } | |
| 23121 | |
| 23122 | |
| 23123 var h = { | |
| 23124 "content-type" : "application/json; charset=utf-8", | |
| 23125 }; | |
| 23126 var resp = convert.JSON.encode(buildUserRole()); | |
| 23127 return new async.Future.value(stringResponse(200, h, resp)); | |
| 23128 }), true); | |
| 23129 res.insert(arg_request, arg_profileId).then(unittest.expectAsync(((api.Use
rRole response) { | |
| 23130 checkUserRole(response); | |
| 23131 }))); | |
| 23132 }); | |
| 23133 | |
| 23134 unittest.test("method--list", () { | |
| 23135 | |
| 23136 var mock = new HttpServerMock(); | |
| 23137 api.UserRolesResourceApi res = new api.DfareportingApi(mock).userRoles; | |
| 23138 var arg_profileId = "foo"; | |
| 23139 var arg_accountUserRoleOnly = true; | |
| 23140 var arg_ids = buildUnnamed1575(); | |
| 23141 var arg_maxResults = 42; | |
| 23142 var arg_pageToken = "foo"; | |
| 23143 var arg_searchString = "foo"; | |
| 23144 var arg_sortField = "foo"; | |
| 23145 var arg_sortOrder = "foo"; | |
| 23146 var arg_subaccountId = "foo"; | |
| 23147 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 23148 var path = (req.url).path; | |
| 23149 var pathOffset = 0; | |
| 23150 var index; | |
| 23151 var subPart; | |
| 23152 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 23153 pathOffset += 1; | |
| 23154 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 23155 pathOffset += 18; | |
| 23156 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 23157 pathOffset += 13; | |
| 23158 index = path.indexOf("/userRoles", pathOffset); | |
| 23159 unittest.expect(index >= 0, unittest.isTrue); | |
| 23160 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 23161 pathOffset = index; | |
| 23162 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 23163 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/userRoles")); | |
| 23164 pathOffset += 10; | |
| 23165 | |
| 23166 var query = (req.url).query; | |
| 23167 var queryOffset = 0; | |
| 23168 var queryMap = {}; | |
| 23169 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 23170 parseBool(n) { | |
| 23171 if (n == "true") return true; | |
| 23172 if (n == "false") return false; | |
| 23173 if (n == null) return null; | |
| 23174 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 23175 } | |
| 23176 if (query.length > 0) { | |
| 23177 for (var part in query.split("&")) { | |
| 23178 var keyvalue = part.split("="); | |
| 23179 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 23180 } | |
| 23181 } | |
| 23182 unittest.expect(queryMap["accountUserRoleOnly"].first, unittest.equals("
$arg_accountUserRoleOnly")); | |
| 23183 unittest.expect(queryMap["ids"], unittest.equals(arg_ids)); | |
| 23184 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | |
| 23185 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 23186 unittest.expect(queryMap["searchString"].first, unittest.equals(arg_sear
chString)); | |
| 23187 unittest.expect(queryMap["sortField"].first, unittest.equals(arg_sortFie
ld)); | |
| 23188 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | |
| 23189 unittest.expect(queryMap["subaccountId"].first, unittest.equals(arg_suba
ccountId)); | |
| 23190 | |
| 23191 | |
| 23192 var h = { | |
| 23193 "content-type" : "application/json; charset=utf-8", | |
| 23194 }; | |
| 23195 var resp = convert.JSON.encode(buildUserRolesListResponse()); | |
| 23196 return new async.Future.value(stringResponse(200, h, resp)); | |
| 23197 }), true); | |
| 23198 res.list(arg_profileId, accountUserRoleOnly: arg_accountUserRoleOnly, ids:
arg_ids, maxResults: arg_maxResults, pageToken: arg_pageToken, searchString: ar
g_searchString, sortField: arg_sortField, sortOrder: arg_sortOrder, subaccountId
: arg_subaccountId).then(unittest.expectAsync(((api.UserRolesListResponse respon
se) { | |
| 23199 checkUserRolesListResponse(response); | |
| 23200 }))); | |
| 23201 }); | |
| 23202 | |
| 23203 unittest.test("method--patch", () { | |
| 23204 | |
| 23205 var mock = new HttpServerMock(); | |
| 23206 api.UserRolesResourceApi res = new api.DfareportingApi(mock).userRoles; | |
| 23207 var arg_request = buildUserRole(); | |
| 23208 var arg_profileId = "foo"; | |
| 23209 var arg_id = "foo"; | |
| 23210 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 23211 var obj = new api.UserRole.fromJson(json); | |
| 23212 checkUserRole(obj); | |
| 23213 | |
| 23214 var path = (req.url).path; | |
| 23215 var pathOffset = 0; | |
| 23216 var index; | |
| 23217 var subPart; | |
| 23218 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 23219 pathOffset += 1; | |
| 23220 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 23221 pathOffset += 18; | |
| 23222 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 23223 pathOffset += 13; | |
| 23224 index = path.indexOf("/userRoles", pathOffset); | |
| 23225 unittest.expect(index >= 0, unittest.isTrue); | |
| 23226 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 23227 pathOffset = index; | |
| 23228 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 23229 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/userRoles")); | |
| 23230 pathOffset += 10; | |
| 23231 | |
| 23232 var query = (req.url).query; | |
| 23233 var queryOffset = 0; | |
| 23234 var queryMap = {}; | |
| 23235 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 23236 parseBool(n) { | |
| 23237 if (n == "true") return true; | |
| 23238 if (n == "false") return false; | |
| 23239 if (n == null) return null; | |
| 23240 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 23241 } | |
| 23242 if (query.length > 0) { | |
| 23243 for (var part in query.split("&")) { | |
| 23244 var keyvalue = part.split("="); | |
| 23245 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 23246 } | |
| 23247 } | |
| 23248 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); | |
| 23249 | |
| 23250 | |
| 23251 var h = { | |
| 23252 "content-type" : "application/json; charset=utf-8", | |
| 23253 }; | |
| 23254 var resp = convert.JSON.encode(buildUserRole()); | |
| 23255 return new async.Future.value(stringResponse(200, h, resp)); | |
| 23256 }), true); | |
| 23257 res.patch(arg_request, arg_profileId, arg_id).then(unittest.expectAsync(((
api.UserRole response) { | |
| 23258 checkUserRole(response); | |
| 23259 }))); | |
| 23260 }); | |
| 23261 | |
| 23262 unittest.test("method--update", () { | |
| 23263 | |
| 23264 var mock = new HttpServerMock(); | |
| 23265 api.UserRolesResourceApi res = new api.DfareportingApi(mock).userRoles; | |
| 23266 var arg_request = buildUserRole(); | |
| 23267 var arg_profileId = "foo"; | |
| 23268 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 23269 var obj = new api.UserRole.fromJson(json); | |
| 23270 checkUserRole(obj); | |
| 23271 | |
| 23272 var path = (req.url).path; | |
| 23273 var pathOffset = 0; | |
| 23274 var index; | |
| 23275 var subPart; | |
| 23276 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 23277 pathOffset += 1; | |
| 23278 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.5/")); | |
| 23279 pathOffset += 18; | |
| 23280 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 23281 pathOffset += 13; | |
| 23282 index = path.indexOf("/userRoles", pathOffset); | |
| 23283 unittest.expect(index >= 0, unittest.isTrue); | |
| 23284 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 23285 pathOffset = index; | |
| 23286 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 23287 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/userRoles")); | |
| 23288 pathOffset += 10; | |
| 23289 | |
| 23290 var query = (req.url).query; | |
| 23291 var queryOffset = 0; | |
| 23292 var queryMap = {}; | |
| 23293 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 23294 parseBool(n) { | |
| 23295 if (n == "true") return true; | |
| 23296 if (n == "false") return false; | |
| 23297 if (n == null) return null; | |
| 23298 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 23299 } | |
| 23300 if (query.length > 0) { | |
| 23301 for (var part in query.split("&")) { | |
| 23302 var keyvalue = part.split("="); | |
| 23303 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 23304 } | |
| 23305 } | |
| 23306 | |
| 23307 | |
| 23308 var h = { | |
| 23309 "content-type" : "application/json; charset=utf-8", | |
| 23310 }; | |
| 23311 var resp = convert.JSON.encode(buildUserRole()); | |
| 23312 return new async.Future.value(stringResponse(200, h, resp)); | |
| 23313 }), true); | |
| 23314 res.update(arg_request, arg_profileId).then(unittest.expectAsync(((api.Use
rRole response) { | |
| 23315 checkUserRole(response); | |
| 23316 }))); | |
| 23317 }); | |
| 23318 | |
| 23319 }); | |
| 23320 | |
| 23321 | |
| 23322 } | |
| 23323 | |
| OLD | NEW |