| OLD | NEW |
| (Empty) |
| 1 library googleapis.dfareporting.v2_4.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_4.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 buildUnnamed197() { | |
| 55 var o = new core.List<core.String>(); | |
| 56 o.add("foo"); | |
| 57 o.add("foo"); | |
| 58 return o; | |
| 59 } | |
| 60 | |
| 61 checkUnnamed197(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 buildUnnamed198() { | |
| 68 var o = new core.List<core.String>(); | |
| 69 o.add("foo"); | |
| 70 o.add("foo"); | |
| 71 return o; | |
| 72 } | |
| 73 | |
| 74 checkUnnamed198(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 = buildUnnamed197(); | |
| 86 o.accountProfile = "foo"; | |
| 87 o.active = true; | |
| 88 o.activeAdsLimitTier = "foo"; | |
| 89 o.activeViewOptOut = true; | |
| 90 o.availablePermissionIds = buildUnnamed198(); | |
| 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 checkUnnamed197(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 checkUnnamed198(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 buildUnnamed199() { | |
| 163 var o = new core.List<core.String>(); | |
| 164 o.add("foo"); | |
| 165 o.add("foo"); | |
| 166 return o; | |
| 167 } | |
| 168 | |
| 169 checkUnnamed199(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 = buildUnnamed199(); | |
| 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 checkUnnamed199(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 buildUnnamed200() { | |
| 228 var o = new core.List<api.AccountPermissionGroup>(); | |
| 229 o.add(buildAccountPermissionGroup()); | |
| 230 o.add(buildAccountPermissionGroup()); | |
| 231 return o; | |
| 232 } | |
| 233 | |
| 234 checkUnnamed200(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 = buildUnnamed200(); | |
| 246 o.kind = "foo"; | |
| 247 } | |
| 248 buildCounterAccountPermissionGroupsListResponse--; | |
| 249 return o; | |
| 250 } | |
| 251 | |
| 252 checkAccountPermissionGroupsListResponse(api.AccountPermissionGroupsListResponse
o) { | |
| 253 buildCounterAccountPermissionGroupsListResponse++; | |
| 254 if (buildCounterAccountPermissionGroupsListResponse < 3) { | |
| 255 checkUnnamed200(o.accountPermissionGroups); | |
| 256 unittest.expect(o.kind, unittest.equals('foo')); | |
| 257 } | |
| 258 buildCounterAccountPermissionGroupsListResponse--; | |
| 259 } | |
| 260 | |
| 261 buildUnnamed201() { | |
| 262 var o = new core.List<api.AccountPermission>(); | |
| 263 o.add(buildAccountPermission()); | |
| 264 o.add(buildAccountPermission()); | |
| 265 return o; | |
| 266 } | |
| 267 | |
| 268 checkUnnamed201(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 = buildUnnamed201(); | |
| 280 o.kind = "foo"; | |
| 281 } | |
| 282 buildCounterAccountPermissionsListResponse--; | |
| 283 return o; | |
| 284 } | |
| 285 | |
| 286 checkAccountPermissionsListResponse(api.AccountPermissionsListResponse o) { | |
| 287 buildCounterAccountPermissionsListResponse++; | |
| 288 if (buildCounterAccountPermissionsListResponse < 3) { | |
| 289 checkUnnamed201(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 buildUnnamed202() { | |
| 345 var o = new core.List<api.AccountUserProfile>(); | |
| 346 o.add(buildAccountUserProfile()); | |
| 347 o.add(buildAccountUserProfile()); | |
| 348 return o; | |
| 349 } | |
| 350 | |
| 351 checkUnnamed202(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 = buildUnnamed202(); | |
| 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 checkUnnamed202(o.accountUserProfiles); | |
| 374 unittest.expect(o.kind, unittest.equals('foo')); | |
| 375 unittest.expect(o.nextPageToken, unittest.equals('foo')); | |
| 376 } | |
| 377 buildCounterAccountUserProfilesListResponse--; | |
| 378 } | |
| 379 | |
| 380 buildUnnamed203() { | |
| 381 var o = new core.List<api.Account>(); | |
| 382 o.add(buildAccount()); | |
| 383 o.add(buildAccount()); | |
| 384 return o; | |
| 385 } | |
| 386 | |
| 387 checkUnnamed203(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 = buildUnnamed203(); | |
| 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 checkUnnamed203(o.accounts); | |
| 410 unittest.expect(o.kind, unittest.equals('foo')); | |
| 411 unittest.expect(o.nextPageToken, unittest.equals('foo')); | |
| 412 } | |
| 413 buildCounterAccountsListResponse--; | |
| 414 } | |
| 415 | |
| 416 buildUnnamed204() { | |
| 417 var o = new core.List<api.DimensionValue>(); | |
| 418 o.add(buildDimensionValue()); | |
| 419 o.add(buildDimensionValue()); | |
| 420 return o; | |
| 421 } | |
| 422 | |
| 423 checkUnnamed204(core.List<api.DimensionValue> o) { | |
| 424 unittest.expect(o, unittest.hasLength(2)); | |
| 425 checkDimensionValue(o[0]); | |
| 426 checkDimensionValue(o[1]); | |
| 427 } | |
| 428 | |
| 429 buildUnnamed205() { | |
| 430 var o = new core.List<core.String>(); | |
| 431 o.add("foo"); | |
| 432 o.add("foo"); | |
| 433 return o; | |
| 434 } | |
| 435 | |
| 436 checkUnnamed205(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 = buildUnnamed204(); | |
| 448 o.kind = "foo"; | |
| 449 o.metricNames = buildUnnamed205(); | |
| 450 } | |
| 451 buildCounterActivities--; | |
| 452 return o; | |
| 453 } | |
| 454 | |
| 455 checkActivities(api.Activities o) { | |
| 456 buildCounterActivities++; | |
| 457 if (buildCounterActivities < 3) { | |
| 458 checkUnnamed204(o.filters); | |
| 459 unittest.expect(o.kind, unittest.equals('foo')); | |
| 460 checkUnnamed205(o.metricNames); | |
| 461 } | |
| 462 buildCounterActivities--; | |
| 463 } | |
| 464 | |
| 465 buildUnnamed206() { | |
| 466 var o = new core.List<api.CreativeGroupAssignment>(); | |
| 467 o.add(buildCreativeGroupAssignment()); | |
| 468 o.add(buildCreativeGroupAssignment()); | |
| 469 return o; | |
| 470 } | |
| 471 | |
| 472 checkUnnamed206(core.List<api.CreativeGroupAssignment> o) { | |
| 473 unittest.expect(o, unittest.hasLength(2)); | |
| 474 checkCreativeGroupAssignment(o[0]); | |
| 475 checkCreativeGroupAssignment(o[1]); | |
| 476 } | |
| 477 | |
| 478 buildUnnamed207() { | |
| 479 var o = new core.List<api.EventTagOverride>(); | |
| 480 o.add(buildEventTagOverride()); | |
| 481 o.add(buildEventTagOverride()); | |
| 482 return o; | |
| 483 } | |
| 484 | |
| 485 checkUnnamed207(core.List<api.EventTagOverride> o) { | |
| 486 unittest.expect(o, unittest.hasLength(2)); | |
| 487 checkEventTagOverride(o[0]); | |
| 488 checkEventTagOverride(o[1]); | |
| 489 } | |
| 490 | |
| 491 buildUnnamed208() { | |
| 492 var o = new core.List<api.PlacementAssignment>(); | |
| 493 o.add(buildPlacementAssignment()); | |
| 494 o.add(buildPlacementAssignment()); | |
| 495 return o; | |
| 496 } | |
| 497 | |
| 498 checkUnnamed208(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 = buildUnnamed206(); | |
| 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 = buildUnnamed207(); | |
| 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 = buildUnnamed208(); | |
| 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 checkUnnamed206(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 checkUnnamed207(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 checkUnnamed208(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 buildUnnamed209() { | |
| 629 var o = new core.List<api.Ad>(); | |
| 630 o.add(buildAd()); | |
| 631 o.add(buildAd()); | |
| 632 return o; | |
| 633 } | |
| 634 | |
| 635 checkUnnamed209(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 = buildUnnamed209(); | |
| 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 checkUnnamed209(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 buildUnnamed210() { | |
| 737 var o = new core.List<api.AdvertiserGroup>(); | |
| 738 o.add(buildAdvertiserGroup()); | |
| 739 o.add(buildAdvertiserGroup()); | |
| 740 return o; | |
| 741 } | |
| 742 | |
| 743 checkUnnamed210(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 = buildUnnamed210(); | |
| 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 checkUnnamed210(o.advertiserGroups); | |
| 766 unittest.expect(o.kind, unittest.equals('foo')); | |
| 767 unittest.expect(o.nextPageToken, unittest.equals('foo')); | |
| 768 } | |
| 769 buildCounterAdvertiserGroupsListResponse--; | |
| 770 } | |
| 771 | |
| 772 buildUnnamed211() { | |
| 773 var o = new core.List<api.Advertiser>(); | |
| 774 o.add(buildAdvertiser()); | |
| 775 o.add(buildAdvertiser()); | |
| 776 return o; | |
| 777 } | |
| 778 | |
| 779 checkUnnamed211(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 = buildUnnamed211(); | |
| 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 checkUnnamed211(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 buildUnnamed212() { | |
| 832 var o = new core.List<api.AudienceSegment>(); | |
| 833 o.add(buildAudienceSegment()); | |
| 834 o.add(buildAudienceSegment()); | |
| 835 return o; | |
| 836 } | |
| 837 | |
| 838 checkUnnamed212(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 = buildUnnamed212(); | |
| 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 checkUnnamed212(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 buildUnnamed213() { | |
| 897 var o = new core.List<api.Browser>(); | |
| 898 o.add(buildBrowser()); | |
| 899 o.add(buildBrowser()); | |
| 900 return o; | |
| 901 } | |
| 902 | |
| 903 checkUnnamed213(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 = buildUnnamed213(); | |
| 915 o.kind = "foo"; | |
| 916 } | |
| 917 buildCounterBrowsersListResponse--; | |
| 918 return o; | |
| 919 } | |
| 920 | |
| 921 checkBrowsersListResponse(api.BrowsersListResponse o) { | |
| 922 buildCounterBrowsersListResponse++; | |
| 923 if (buildCounterBrowsersListResponse < 3) { | |
| 924 checkUnnamed213(o.browsers); | |
| 925 unittest.expect(o.kind, unittest.equals('foo')); | |
| 926 } | |
| 927 buildCounterBrowsersListResponse--; | |
| 928 } | |
| 929 | |
| 930 buildUnnamed214() { | |
| 931 var o = new core.List<api.CreativeOptimizationConfiguration>(); | |
| 932 o.add(buildCreativeOptimizationConfiguration()); | |
| 933 o.add(buildCreativeOptimizationConfiguration()); | |
| 934 return o; | |
| 935 } | |
| 936 | |
| 937 checkUnnamed214(core.List<api.CreativeOptimizationConfiguration> o) { | |
| 938 unittest.expect(o, unittest.hasLength(2)); | |
| 939 checkCreativeOptimizationConfiguration(o[0]); | |
| 940 checkCreativeOptimizationConfiguration(o[1]); | |
| 941 } | |
| 942 | |
| 943 buildUnnamed215() { | |
| 944 var o = new core.List<api.AudienceSegmentGroup>(); | |
| 945 o.add(buildAudienceSegmentGroup()); | |
| 946 o.add(buildAudienceSegmentGroup()); | |
| 947 return o; | |
| 948 } | |
| 949 | |
| 950 checkUnnamed215(core.List<api.AudienceSegmentGroup> o) { | |
| 951 unittest.expect(o, unittest.hasLength(2)); | |
| 952 checkAudienceSegmentGroup(o[0]); | |
| 953 checkAudienceSegmentGroup(o[1]); | |
| 954 } | |
| 955 | |
| 956 buildUnnamed216() { | |
| 957 var o = new core.List<core.String>(); | |
| 958 o.add("foo"); | |
| 959 o.add("foo"); | |
| 960 return o; | |
| 961 } | |
| 962 | |
| 963 checkUnnamed216(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 buildUnnamed217() { | |
| 970 var o = new core.List<api.EventTagOverride>(); | |
| 971 o.add(buildEventTagOverride()); | |
| 972 o.add(buildEventTagOverride()); | |
| 973 return o; | |
| 974 } | |
| 975 | |
| 976 checkUnnamed217(core.List<api.EventTagOverride> o) { | |
| 977 unittest.expect(o, unittest.hasLength(2)); | |
| 978 checkEventTagOverride(o[0]); | |
| 979 checkEventTagOverride(o[1]); | |
| 980 } | |
| 981 | |
| 982 buildUnnamed218() { | |
| 983 var o = new core.List<core.String>(); | |
| 984 o.add("foo"); | |
| 985 o.add("foo"); | |
| 986 return o; | |
| 987 } | |
| 988 | |
| 989 checkUnnamed218(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 = buildUnnamed214(); | |
| 1002 o.advertiserGroupId = "foo"; | |
| 1003 o.advertiserId = "foo"; | |
| 1004 o.advertiserIdDimensionValue = buildDimensionValue(); | |
| 1005 o.archived = true; | |
| 1006 o.audienceSegmentGroups = buildUnnamed215(); | |
| 1007 o.billingInvoiceCode = "foo"; | |
| 1008 o.clickThroughUrlSuffixProperties = buildClickThroughUrlSuffixProperties(); | |
| 1009 o.comment = "foo"; | |
| 1010 o.comscoreVceEnabled = true; | |
| 1011 o.createInfo = buildLastModifiedInfo(); | |
| 1012 o.creativeGroupIds = buildUnnamed216(); | |
| 1013 o.creativeOptimizationConfiguration = buildCreativeOptimizationConfiguration
(); | |
| 1014 o.defaultClickThroughEventTagProperties = buildDefaultClickThroughEventTagPr
operties(); | |
| 1015 o.endDate = core.DateTime.parse("2002-02-27T14:01:02Z"); | |
| 1016 o.eventTagOverrides = buildUnnamed217(); | |
| 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 = buildUnnamed218(); | |
| 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 checkUnnamed214(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 checkUnnamed215(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 checkUnnamed216(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 checkUnnamed217(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 checkUnnamed218(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 buildUnnamed219() { | |
| 1090 var o = new core.List<api.CampaignCreativeAssociation>(); | |
| 1091 o.add(buildCampaignCreativeAssociation()); | |
| 1092 o.add(buildCampaignCreativeAssociation()); | |
| 1093 return o; | |
| 1094 } | |
| 1095 | |
| 1096 checkUnnamed219(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 = buildUnnamed219(); | |
| 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 checkUnnamed219(o.campaignCreativeAssociations); | |
| 1119 unittest.expect(o.kind, unittest.equals('foo')); | |
| 1120 unittest.expect(o.nextPageToken, unittest.equals('foo')); | |
| 1121 } | |
| 1122 buildCounterCampaignCreativeAssociationsListResponse--; | |
| 1123 } | |
| 1124 | |
| 1125 buildUnnamed220() { | |
| 1126 var o = new core.List<api.Campaign>(); | |
| 1127 o.add(buildCampaign()); | |
| 1128 o.add(buildCampaign()); | |
| 1129 return o; | |
| 1130 } | |
| 1131 | |
| 1132 checkUnnamed220(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 = buildUnnamed220(); | |
| 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 checkUnnamed220(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 buildUnnamed221() { | |
| 1207 var o = new core.List<api.ChangeLog>(); | |
| 1208 o.add(buildChangeLog()); | |
| 1209 o.add(buildChangeLog()); | |
| 1210 return o; | |
| 1211 } | |
| 1212 | |
| 1213 checkUnnamed221(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 = buildUnnamed221(); | |
| 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 checkUnnamed221(o.changeLogs); | |
| 1236 unittest.expect(o.kind, unittest.equals('foo')); | |
| 1237 unittest.expect(o.nextPageToken, unittest.equals('foo')); | |
| 1238 } | |
| 1239 buildCounterChangeLogsListResponse--; | |
| 1240 } | |
| 1241 | |
| 1242 buildUnnamed222() { | |
| 1243 var o = new core.List<api.City>(); | |
| 1244 o.add(buildCity()); | |
| 1245 o.add(buildCity()); | |
| 1246 return o; | |
| 1247 } | |
| 1248 | |
| 1249 checkUnnamed222(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 = buildUnnamed222(); | |
| 1261 o.kind = "foo"; | |
| 1262 } | |
| 1263 buildCounterCitiesListResponse--; | |
| 1264 return o; | |
| 1265 } | |
| 1266 | |
| 1267 checkCitiesListResponse(api.CitiesListResponse o) { | |
| 1268 buildCounterCitiesListResponse++; | |
| 1269 if (buildCounterCitiesListResponse < 3) { | |
| 1270 checkUnnamed222(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 buildUnnamed223() { | |
| 1454 var o = new core.List<api.ConnectionType>(); | |
| 1455 o.add(buildConnectionType()); | |
| 1456 o.add(buildConnectionType()); | |
| 1457 return o; | |
| 1458 } | |
| 1459 | |
| 1460 checkUnnamed223(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 = buildUnnamed223(); | |
| 1472 o.kind = "foo"; | |
| 1473 } | |
| 1474 buildCounterConnectionTypesListResponse--; | |
| 1475 return o; | |
| 1476 } | |
| 1477 | |
| 1478 checkConnectionTypesListResponse(api.ConnectionTypesListResponse o) { | |
| 1479 buildCounterConnectionTypesListResponse++; | |
| 1480 if (buildCounterConnectionTypesListResponse < 3) { | |
| 1481 checkUnnamed223(o.connectionTypes); | |
| 1482 unittest.expect(o.kind, unittest.equals('foo')); | |
| 1483 } | |
| 1484 buildCounterConnectionTypesListResponse--; | |
| 1485 } | |
| 1486 | |
| 1487 buildUnnamed224() { | |
| 1488 var o = new core.List<api.ContentCategory>(); | |
| 1489 o.add(buildContentCategory()); | |
| 1490 o.add(buildContentCategory()); | |
| 1491 return o; | |
| 1492 } | |
| 1493 | |
| 1494 checkUnnamed224(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 = buildUnnamed224(); | |
| 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 checkUnnamed224(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 buildUnnamed225() { | |
| 1549 var o = new core.List<api.Country>(); | |
| 1550 o.add(buildCountry()); | |
| 1551 o.add(buildCountry()); | |
| 1552 return o; | |
| 1553 } | |
| 1554 | |
| 1555 checkUnnamed225(core.List<api.Country> o) { | |
| 1556 unittest.expect(o, unittest.hasLength(2)); | |
| 1557 checkCountry(o[0]); | |
| 1558 checkCountry(o[1]); | |
| 1559 } | |
| 1560 | |
| 1561 core.int buildCounterCountriesListResponse = 0; | |
| 1562 buildCountriesListResponse() { | |
| 1563 var o = new api.CountriesListResponse(); | |
| 1564 buildCounterCountriesListResponse++; | |
| 1565 if (buildCounterCountriesListResponse < 3) { | |
| 1566 o.countries = buildUnnamed225(); | |
| 1567 o.kind = "foo"; | |
| 1568 } | |
| 1569 buildCounterCountriesListResponse--; | |
| 1570 return o; | |
| 1571 } | |
| 1572 | |
| 1573 checkCountriesListResponse(api.CountriesListResponse o) { | |
| 1574 buildCounterCountriesListResponse++; | |
| 1575 if (buildCounterCountriesListResponse < 3) { | |
| 1576 checkUnnamed225(o.countries); | |
| 1577 unittest.expect(o.kind, unittest.equals('foo')); | |
| 1578 } | |
| 1579 buildCounterCountriesListResponse--; | |
| 1580 } | |
| 1581 | |
| 1582 core.int buildCounterCountry = 0; | |
| 1583 buildCountry() { | |
| 1584 var o = new api.Country(); | |
| 1585 buildCounterCountry++; | |
| 1586 if (buildCounterCountry < 3) { | |
| 1587 o.countryCode = "foo"; | |
| 1588 o.dartId = "foo"; | |
| 1589 o.kind = "foo"; | |
| 1590 o.name = "foo"; | |
| 1591 o.sslEnabled = true; | |
| 1592 } | |
| 1593 buildCounterCountry--; | |
| 1594 return o; | |
| 1595 } | |
| 1596 | |
| 1597 checkCountry(api.Country o) { | |
| 1598 buildCounterCountry++; | |
| 1599 if (buildCounterCountry < 3) { | |
| 1600 unittest.expect(o.countryCode, unittest.equals('foo')); | |
| 1601 unittest.expect(o.dartId, unittest.equals('foo')); | |
| 1602 unittest.expect(o.kind, unittest.equals('foo')); | |
| 1603 unittest.expect(o.name, unittest.equals('foo')); | |
| 1604 unittest.expect(o.sslEnabled, unittest.isTrue); | |
| 1605 } | |
| 1606 buildCounterCountry--; | |
| 1607 } | |
| 1608 | |
| 1609 buildUnnamed226() { | |
| 1610 var o = new core.List<core.String>(); | |
| 1611 o.add("foo"); | |
| 1612 o.add("foo"); | |
| 1613 return o; | |
| 1614 } | |
| 1615 | |
| 1616 checkUnnamed226(core.List<core.String> o) { | |
| 1617 unittest.expect(o, unittest.hasLength(2)); | |
| 1618 unittest.expect(o[0], unittest.equals('foo')); | |
| 1619 unittest.expect(o[1], unittest.equals('foo')); | |
| 1620 } | |
| 1621 | |
| 1622 buildUnnamed227() { | |
| 1623 var o = new core.List<core.String>(); | |
| 1624 o.add("foo"); | |
| 1625 o.add("foo"); | |
| 1626 return o; | |
| 1627 } | |
| 1628 | |
| 1629 checkUnnamed227(core.List<core.String> o) { | |
| 1630 unittest.expect(o, unittest.hasLength(2)); | |
| 1631 unittest.expect(o[0], unittest.equals('foo')); | |
| 1632 unittest.expect(o[1], unittest.equals('foo')); | |
| 1633 } | |
| 1634 | |
| 1635 buildUnnamed228() { | |
| 1636 var o = new core.List<api.ClickTag>(); | |
| 1637 o.add(buildClickTag()); | |
| 1638 o.add(buildClickTag()); | |
| 1639 return o; | |
| 1640 } | |
| 1641 | |
| 1642 checkUnnamed228(core.List<api.ClickTag> o) { | |
| 1643 unittest.expect(o, unittest.hasLength(2)); | |
| 1644 checkClickTag(o[0]); | |
| 1645 checkClickTag(o[1]); | |
| 1646 } | |
| 1647 | |
| 1648 buildUnnamed229() { | |
| 1649 var o = new core.List<core.String>(); | |
| 1650 o.add("foo"); | |
| 1651 o.add("foo"); | |
| 1652 return o; | |
| 1653 } | |
| 1654 | |
| 1655 checkUnnamed229(core.List<core.String> o) { | |
| 1656 unittest.expect(o, unittest.hasLength(2)); | |
| 1657 unittest.expect(o[0], unittest.equals('foo')); | |
| 1658 unittest.expect(o[1], unittest.equals('foo')); | |
| 1659 } | |
| 1660 | |
| 1661 buildUnnamed230() { | |
| 1662 var o = new core.List<core.String>(); | |
| 1663 o.add("foo"); | |
| 1664 o.add("foo"); | |
| 1665 return o; | |
| 1666 } | |
| 1667 | |
| 1668 checkUnnamed230(core.List<core.String> o) { | |
| 1669 unittest.expect(o, unittest.hasLength(2)); | |
| 1670 unittest.expect(o[0], unittest.equals('foo')); | |
| 1671 unittest.expect(o[1], unittest.equals('foo')); | |
| 1672 } | |
| 1673 | |
| 1674 buildUnnamed231() { | |
| 1675 var o = new core.List<api.CreativeCustomEvent>(); | |
| 1676 o.add(buildCreativeCustomEvent()); | |
| 1677 o.add(buildCreativeCustomEvent()); | |
| 1678 return o; | |
| 1679 } | |
| 1680 | |
| 1681 checkUnnamed231(core.List<api.CreativeCustomEvent> o) { | |
| 1682 unittest.expect(o, unittest.hasLength(2)); | |
| 1683 checkCreativeCustomEvent(o[0]); | |
| 1684 checkCreativeCustomEvent(o[1]); | |
| 1685 } | |
| 1686 | |
| 1687 buildUnnamed232() { | |
| 1688 var o = new core.List<api.CreativeAsset>(); | |
| 1689 o.add(buildCreativeAsset()); | |
| 1690 o.add(buildCreativeAsset()); | |
| 1691 return o; | |
| 1692 } | |
| 1693 | |
| 1694 checkUnnamed232(core.List<api.CreativeAsset> o) { | |
| 1695 unittest.expect(o, unittest.hasLength(2)); | |
| 1696 checkCreativeAsset(o[0]); | |
| 1697 checkCreativeAsset(o[1]); | |
| 1698 } | |
| 1699 | |
| 1700 buildUnnamed233() { | |
| 1701 var o = new core.List<api.CreativeFieldAssignment>(); | |
| 1702 o.add(buildCreativeFieldAssignment()); | |
| 1703 o.add(buildCreativeFieldAssignment()); | |
| 1704 return o; | |
| 1705 } | |
| 1706 | |
| 1707 checkUnnamed233(core.List<api.CreativeFieldAssignment> o) { | |
| 1708 unittest.expect(o, unittest.hasLength(2)); | |
| 1709 checkCreativeFieldAssignment(o[0]); | |
| 1710 checkCreativeFieldAssignment(o[1]); | |
| 1711 } | |
| 1712 | |
| 1713 buildUnnamed234() { | |
| 1714 var o = new core.List<core.String>(); | |
| 1715 o.add("foo"); | |
| 1716 o.add("foo"); | |
| 1717 return o; | |
| 1718 } | |
| 1719 | |
| 1720 checkUnnamed234(core.List<core.String> o) { | |
| 1721 unittest.expect(o, unittest.hasLength(2)); | |
| 1722 unittest.expect(o[0], unittest.equals('foo')); | |
| 1723 unittest.expect(o[1], unittest.equals('foo')); | |
| 1724 } | |
| 1725 | |
| 1726 buildUnnamed235() { | |
| 1727 var o = new core.List<api.CreativeCustomEvent>(); | |
| 1728 o.add(buildCreativeCustomEvent()); | |
| 1729 o.add(buildCreativeCustomEvent()); | |
| 1730 return o; | |
| 1731 } | |
| 1732 | |
| 1733 checkUnnamed235(core.List<api.CreativeCustomEvent> o) { | |
| 1734 unittest.expect(o, unittest.hasLength(2)); | |
| 1735 checkCreativeCustomEvent(o[0]); | |
| 1736 checkCreativeCustomEvent(o[1]); | |
| 1737 } | |
| 1738 | |
| 1739 buildUnnamed236() { | |
| 1740 var o = new core.List<api.ThirdPartyTrackingUrl>(); | |
| 1741 o.add(buildThirdPartyTrackingUrl()); | |
| 1742 o.add(buildThirdPartyTrackingUrl()); | |
| 1743 return o; | |
| 1744 } | |
| 1745 | |
| 1746 checkUnnamed236(core.List<api.ThirdPartyTrackingUrl> o) { | |
| 1747 unittest.expect(o, unittest.hasLength(2)); | |
| 1748 checkThirdPartyTrackingUrl(o[0]); | |
| 1749 checkThirdPartyTrackingUrl(o[1]); | |
| 1750 } | |
| 1751 | |
| 1752 buildUnnamed237() { | |
| 1753 var o = new core.List<api.CreativeCustomEvent>(); | |
| 1754 o.add(buildCreativeCustomEvent()); | |
| 1755 o.add(buildCreativeCustomEvent()); | |
| 1756 return o; | |
| 1757 } | |
| 1758 | |
| 1759 checkUnnamed237(core.List<api.CreativeCustomEvent> o) { | |
| 1760 unittest.expect(o, unittest.hasLength(2)); | |
| 1761 checkCreativeCustomEvent(o[0]); | |
| 1762 checkCreativeCustomEvent(o[1]); | |
| 1763 } | |
| 1764 | |
| 1765 core.int buildCounterCreative = 0; | |
| 1766 buildCreative() { | |
| 1767 var o = new api.Creative(); | |
| 1768 buildCounterCreative++; | |
| 1769 if (buildCounterCreative < 3) { | |
| 1770 o.accountId = "foo"; | |
| 1771 o.active = true; | |
| 1772 o.adParameters = "foo"; | |
| 1773 o.adTagKeys = buildUnnamed226(); | |
| 1774 o.advertiserId = "foo"; | |
| 1775 o.allowScriptAccess = true; | |
| 1776 o.archived = true; | |
| 1777 o.artworkType = "foo"; | |
| 1778 o.authoringSource = "foo"; | |
| 1779 o.authoringTool = "foo"; | |
| 1780 o.autoAdvanceImages = true; | |
| 1781 o.backgroundColor = "foo"; | |
| 1782 o.backupImageClickThroughUrl = "foo"; | |
| 1783 o.backupImageFeatures = buildUnnamed227(); | |
| 1784 o.backupImageReportingLabel = "foo"; | |
| 1785 o.backupImageTargetWindow = buildTargetWindow(); | |
| 1786 o.clickTags = buildUnnamed228(); | |
| 1787 o.commercialId = "foo"; | |
| 1788 o.companionCreatives = buildUnnamed229(); | |
| 1789 o.compatibility = buildUnnamed230(); | |
| 1790 o.convertFlashToHtml5 = true; | |
| 1791 o.counterCustomEvents = buildUnnamed231(); | |
| 1792 o.creativeAssets = buildUnnamed232(); | |
| 1793 o.creativeFieldAssignments = buildUnnamed233(); | |
| 1794 o.customKeyValues = buildUnnamed234(); | |
| 1795 o.exitCustomEvents = buildUnnamed235(); | |
| 1796 o.fsCommand = buildFsCommand(); | |
| 1797 o.htmlCode = "foo"; | |
| 1798 o.htmlCodeLocked = true; | |
| 1799 o.id = "foo"; | |
| 1800 o.idDimensionValue = buildDimensionValue(); | |
| 1801 o.kind = "foo"; | |
| 1802 o.lastModifiedInfo = buildLastModifiedInfo(); | |
| 1803 o.latestTraffickedCreativeId = "foo"; | |
| 1804 o.name = "foo"; | |
| 1805 o.overrideCss = "foo"; | |
| 1806 o.redirectUrl = "foo"; | |
| 1807 o.renderingId = "foo"; | |
| 1808 o.renderingIdDimensionValue = buildDimensionValue(); | |
| 1809 o.requiredFlashPluginVersion = "foo"; | |
| 1810 o.requiredFlashVersion = 42; | |
| 1811 o.size = buildSize(); | |
| 1812 o.skippable = true; | |
| 1813 o.sslCompliant = true; | |
| 1814 o.sslOverride = true; | |
| 1815 o.studioAdvertiserId = "foo"; | |
| 1816 o.studioCreativeId = "foo"; | |
| 1817 o.studioTraffickedCreativeId = "foo"; | |
| 1818 o.subaccountId = "foo"; | |
| 1819 o.thirdPartyBackupImageImpressionsUrl = "foo"; | |
| 1820 o.thirdPartyRichMediaImpressionsUrl = "foo"; | |
| 1821 o.thirdPartyUrls = buildUnnamed236(); | |
| 1822 o.timerCustomEvents = buildUnnamed237(); | |
| 1823 o.totalFileSize = "foo"; | |
| 1824 o.type = "foo"; | |
| 1825 o.version = 42; | |
| 1826 o.videoDescription = "foo"; | |
| 1827 o.videoDuration = 42.0; | |
| 1828 } | |
| 1829 buildCounterCreative--; | |
| 1830 return o; | |
| 1831 } | |
| 1832 | |
| 1833 checkCreative(api.Creative o) { | |
| 1834 buildCounterCreative++; | |
| 1835 if (buildCounterCreative < 3) { | |
| 1836 unittest.expect(o.accountId, unittest.equals('foo')); | |
| 1837 unittest.expect(o.active, unittest.isTrue); | |
| 1838 unittest.expect(o.adParameters, unittest.equals('foo')); | |
| 1839 checkUnnamed226(o.adTagKeys); | |
| 1840 unittest.expect(o.advertiserId, unittest.equals('foo')); | |
| 1841 unittest.expect(o.allowScriptAccess, unittest.isTrue); | |
| 1842 unittest.expect(o.archived, unittest.isTrue); | |
| 1843 unittest.expect(o.artworkType, unittest.equals('foo')); | |
| 1844 unittest.expect(o.authoringSource, unittest.equals('foo')); | |
| 1845 unittest.expect(o.authoringTool, unittest.equals('foo')); | |
| 1846 unittest.expect(o.autoAdvanceImages, unittest.isTrue); | |
| 1847 unittest.expect(o.backgroundColor, unittest.equals('foo')); | |
| 1848 unittest.expect(o.backupImageClickThroughUrl, unittest.equals('foo')); | |
| 1849 checkUnnamed227(o.backupImageFeatures); | |
| 1850 unittest.expect(o.backupImageReportingLabel, unittest.equals('foo')); | |
| 1851 checkTargetWindow(o.backupImageTargetWindow); | |
| 1852 checkUnnamed228(o.clickTags); | |
| 1853 unittest.expect(o.commercialId, unittest.equals('foo')); | |
| 1854 checkUnnamed229(o.companionCreatives); | |
| 1855 checkUnnamed230(o.compatibility); | |
| 1856 unittest.expect(o.convertFlashToHtml5, unittest.isTrue); | |
| 1857 checkUnnamed231(o.counterCustomEvents); | |
| 1858 checkUnnamed232(o.creativeAssets); | |
| 1859 checkUnnamed233(o.creativeFieldAssignments); | |
| 1860 checkUnnamed234(o.customKeyValues); | |
| 1861 checkUnnamed235(o.exitCustomEvents); | |
| 1862 checkFsCommand(o.fsCommand); | |
| 1863 unittest.expect(o.htmlCode, unittest.equals('foo')); | |
| 1864 unittest.expect(o.htmlCodeLocked, unittest.isTrue); | |
| 1865 unittest.expect(o.id, unittest.equals('foo')); | |
| 1866 checkDimensionValue(o.idDimensionValue); | |
| 1867 unittest.expect(o.kind, unittest.equals('foo')); | |
| 1868 checkLastModifiedInfo(o.lastModifiedInfo); | |
| 1869 unittest.expect(o.latestTraffickedCreativeId, unittest.equals('foo')); | |
| 1870 unittest.expect(o.name, unittest.equals('foo')); | |
| 1871 unittest.expect(o.overrideCss, unittest.equals('foo')); | |
| 1872 unittest.expect(o.redirectUrl, unittest.equals('foo')); | |
| 1873 unittest.expect(o.renderingId, unittest.equals('foo')); | |
| 1874 checkDimensionValue(o.renderingIdDimensionValue); | |
| 1875 unittest.expect(o.requiredFlashPluginVersion, unittest.equals('foo')); | |
| 1876 unittest.expect(o.requiredFlashVersion, unittest.equals(42)); | |
| 1877 checkSize(o.size); | |
| 1878 unittest.expect(o.skippable, unittest.isTrue); | |
| 1879 unittest.expect(o.sslCompliant, unittest.isTrue); | |
| 1880 unittest.expect(o.sslOverride, unittest.isTrue); | |
| 1881 unittest.expect(o.studioAdvertiserId, unittest.equals('foo')); | |
| 1882 unittest.expect(o.studioCreativeId, unittest.equals('foo')); | |
| 1883 unittest.expect(o.studioTraffickedCreativeId, unittest.equals('foo')); | |
| 1884 unittest.expect(o.subaccountId, unittest.equals('foo')); | |
| 1885 unittest.expect(o.thirdPartyBackupImageImpressionsUrl, unittest.equals('foo'
)); | |
| 1886 unittest.expect(o.thirdPartyRichMediaImpressionsUrl, unittest.equals('foo'))
; | |
| 1887 checkUnnamed236(o.thirdPartyUrls); | |
| 1888 checkUnnamed237(o.timerCustomEvents); | |
| 1889 unittest.expect(o.totalFileSize, unittest.equals('foo')); | |
| 1890 unittest.expect(o.type, unittest.equals('foo')); | |
| 1891 unittest.expect(o.version, unittest.equals(42)); | |
| 1892 unittest.expect(o.videoDescription, unittest.equals('foo')); | |
| 1893 unittest.expect(o.videoDuration, unittest.equals(42.0)); | |
| 1894 } | |
| 1895 buildCounterCreative--; | |
| 1896 } | |
| 1897 | |
| 1898 buildUnnamed238() { | |
| 1899 var o = new core.List<core.String>(); | |
| 1900 o.add("foo"); | |
| 1901 o.add("foo"); | |
| 1902 return o; | |
| 1903 } | |
| 1904 | |
| 1905 checkUnnamed238(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 core.int buildCounterCreativeAsset = 0; | |
| 1912 buildCreativeAsset() { | |
| 1913 var o = new api.CreativeAsset(); | |
| 1914 buildCounterCreativeAsset++; | |
| 1915 if (buildCounterCreativeAsset < 3) { | |
| 1916 o.actionScript3 = true; | |
| 1917 o.active = true; | |
| 1918 o.alignment = "foo"; | |
| 1919 o.artworkType = "foo"; | |
| 1920 o.assetIdentifier = buildCreativeAssetId(); | |
| 1921 o.backupImageExit = buildCreativeCustomEvent(); | |
| 1922 o.bitRate = 42; | |
| 1923 o.childAssetType = "foo"; | |
| 1924 o.collapsedSize = buildSize(); | |
| 1925 o.customStartTimeValue = 42; | |
| 1926 o.detectedFeatures = buildUnnamed238(); | |
| 1927 o.displayType = "foo"; | |
| 1928 o.duration = 42; | |
| 1929 o.durationType = "foo"; | |
| 1930 o.expandedDimension = buildSize(); | |
| 1931 o.fileSize = "foo"; | |
| 1932 o.flashVersion = 42; | |
| 1933 o.hideFlashObjects = true; | |
| 1934 o.hideSelectionBoxes = true; | |
| 1935 o.horizontallyLocked = true; | |
| 1936 o.id = "foo"; | |
| 1937 o.mimeType = "foo"; | |
| 1938 o.offset = buildOffsetPosition(); | |
| 1939 o.originalBackup = true; | |
| 1940 o.position = buildOffsetPosition(); | |
| 1941 o.positionLeftUnit = "foo"; | |
| 1942 o.positionTopUnit = "foo"; | |
| 1943 o.progressiveServingUrl = "foo"; | |
| 1944 o.pushdown = true; | |
| 1945 o.pushdownDuration = 42.0; | |
| 1946 o.role = "foo"; | |
| 1947 o.size = buildSize(); | |
| 1948 o.sslCompliant = true; | |
| 1949 o.startTimeType = "foo"; | |
| 1950 o.streamingServingUrl = "foo"; | |
| 1951 o.transparency = true; | |
| 1952 o.verticallyLocked = true; | |
| 1953 o.videoDuration = 42.0; | |
| 1954 o.windowMode = "foo"; | |
| 1955 o.zIndex = 42; | |
| 1956 o.zipFilename = "foo"; | |
| 1957 o.zipFilesize = "foo"; | |
| 1958 } | |
| 1959 buildCounterCreativeAsset--; | |
| 1960 return o; | |
| 1961 } | |
| 1962 | |
| 1963 checkCreativeAsset(api.CreativeAsset o) { | |
| 1964 buildCounterCreativeAsset++; | |
| 1965 if (buildCounterCreativeAsset < 3) { | |
| 1966 unittest.expect(o.actionScript3, unittest.isTrue); | |
| 1967 unittest.expect(o.active, unittest.isTrue); | |
| 1968 unittest.expect(o.alignment, unittest.equals('foo')); | |
| 1969 unittest.expect(o.artworkType, unittest.equals('foo')); | |
| 1970 checkCreativeAssetId(o.assetIdentifier); | |
| 1971 checkCreativeCustomEvent(o.backupImageExit); | |
| 1972 unittest.expect(o.bitRate, unittest.equals(42)); | |
| 1973 unittest.expect(o.childAssetType, unittest.equals('foo')); | |
| 1974 checkSize(o.collapsedSize); | |
| 1975 unittest.expect(o.customStartTimeValue, unittest.equals(42)); | |
| 1976 checkUnnamed238(o.detectedFeatures); | |
| 1977 unittest.expect(o.displayType, unittest.equals('foo')); | |
| 1978 unittest.expect(o.duration, unittest.equals(42)); | |
| 1979 unittest.expect(o.durationType, unittest.equals('foo')); | |
| 1980 checkSize(o.expandedDimension); | |
| 1981 unittest.expect(o.fileSize, unittest.equals('foo')); | |
| 1982 unittest.expect(o.flashVersion, unittest.equals(42)); | |
| 1983 unittest.expect(o.hideFlashObjects, unittest.isTrue); | |
| 1984 unittest.expect(o.hideSelectionBoxes, unittest.isTrue); | |
| 1985 unittest.expect(o.horizontallyLocked, unittest.isTrue); | |
| 1986 unittest.expect(o.id, unittest.equals('foo')); | |
| 1987 unittest.expect(o.mimeType, unittest.equals('foo')); | |
| 1988 checkOffsetPosition(o.offset); | |
| 1989 unittest.expect(o.originalBackup, unittest.isTrue); | |
| 1990 checkOffsetPosition(o.position); | |
| 1991 unittest.expect(o.positionLeftUnit, unittest.equals('foo')); | |
| 1992 unittest.expect(o.positionTopUnit, unittest.equals('foo')); | |
| 1993 unittest.expect(o.progressiveServingUrl, unittest.equals('foo')); | |
| 1994 unittest.expect(o.pushdown, unittest.isTrue); | |
| 1995 unittest.expect(o.pushdownDuration, unittest.equals(42.0)); | |
| 1996 unittest.expect(o.role, unittest.equals('foo')); | |
| 1997 checkSize(o.size); | |
| 1998 unittest.expect(o.sslCompliant, unittest.isTrue); | |
| 1999 unittest.expect(o.startTimeType, unittest.equals('foo')); | |
| 2000 unittest.expect(o.streamingServingUrl, unittest.equals('foo')); | |
| 2001 unittest.expect(o.transparency, unittest.isTrue); | |
| 2002 unittest.expect(o.verticallyLocked, unittest.isTrue); | |
| 2003 unittest.expect(o.videoDuration, unittest.equals(42.0)); | |
| 2004 unittest.expect(o.windowMode, unittest.equals('foo')); | |
| 2005 unittest.expect(o.zIndex, unittest.equals(42)); | |
| 2006 unittest.expect(o.zipFilename, unittest.equals('foo')); | |
| 2007 unittest.expect(o.zipFilesize, unittest.equals('foo')); | |
| 2008 } | |
| 2009 buildCounterCreativeAsset--; | |
| 2010 } | |
| 2011 | |
| 2012 core.int buildCounterCreativeAssetId = 0; | |
| 2013 buildCreativeAssetId() { | |
| 2014 var o = new api.CreativeAssetId(); | |
| 2015 buildCounterCreativeAssetId++; | |
| 2016 if (buildCounterCreativeAssetId < 3) { | |
| 2017 o.name = "foo"; | |
| 2018 o.type = "foo"; | |
| 2019 } | |
| 2020 buildCounterCreativeAssetId--; | |
| 2021 return o; | |
| 2022 } | |
| 2023 | |
| 2024 checkCreativeAssetId(api.CreativeAssetId o) { | |
| 2025 buildCounterCreativeAssetId++; | |
| 2026 if (buildCounterCreativeAssetId < 3) { | |
| 2027 unittest.expect(o.name, unittest.equals('foo')); | |
| 2028 unittest.expect(o.type, unittest.equals('foo')); | |
| 2029 } | |
| 2030 buildCounterCreativeAssetId--; | |
| 2031 } | |
| 2032 | |
| 2033 buildUnnamed239() { | |
| 2034 var o = new core.List<api.ClickTag>(); | |
| 2035 o.add(buildClickTag()); | |
| 2036 o.add(buildClickTag()); | |
| 2037 return o; | |
| 2038 } | |
| 2039 | |
| 2040 checkUnnamed239(core.List<api.ClickTag> o) { | |
| 2041 unittest.expect(o, unittest.hasLength(2)); | |
| 2042 checkClickTag(o[0]); | |
| 2043 checkClickTag(o[1]); | |
| 2044 } | |
| 2045 | |
| 2046 buildUnnamed240() { | |
| 2047 var o = new core.List<core.String>(); | |
| 2048 o.add("foo"); | |
| 2049 o.add("foo"); | |
| 2050 return o; | |
| 2051 } | |
| 2052 | |
| 2053 checkUnnamed240(core.List<core.String> o) { | |
| 2054 unittest.expect(o, unittest.hasLength(2)); | |
| 2055 unittest.expect(o[0], unittest.equals('foo')); | |
| 2056 unittest.expect(o[1], unittest.equals('foo')); | |
| 2057 } | |
| 2058 | |
| 2059 buildUnnamed241() { | |
| 2060 var o = new core.List<core.String>(); | |
| 2061 o.add("foo"); | |
| 2062 o.add("foo"); | |
| 2063 return o; | |
| 2064 } | |
| 2065 | |
| 2066 checkUnnamed241(core.List<core.String> o) { | |
| 2067 unittest.expect(o, unittest.hasLength(2)); | |
| 2068 unittest.expect(o[0], unittest.equals('foo')); | |
| 2069 unittest.expect(o[1], unittest.equals('foo')); | |
| 2070 } | |
| 2071 | |
| 2072 core.int buildCounterCreativeAssetMetadata = 0; | |
| 2073 buildCreativeAssetMetadata() { | |
| 2074 var o = new api.CreativeAssetMetadata(); | |
| 2075 buildCounterCreativeAssetMetadata++; | |
| 2076 if (buildCounterCreativeAssetMetadata < 3) { | |
| 2077 o.assetIdentifier = buildCreativeAssetId(); | |
| 2078 o.clickTags = buildUnnamed239(); | |
| 2079 o.detectedFeatures = buildUnnamed240(); | |
| 2080 o.kind = "foo"; | |
| 2081 o.warnedValidationRules = buildUnnamed241(); | |
| 2082 } | |
| 2083 buildCounterCreativeAssetMetadata--; | |
| 2084 return o; | |
| 2085 } | |
| 2086 | |
| 2087 checkCreativeAssetMetadata(api.CreativeAssetMetadata o) { | |
| 2088 buildCounterCreativeAssetMetadata++; | |
| 2089 if (buildCounterCreativeAssetMetadata < 3) { | |
| 2090 checkCreativeAssetId(o.assetIdentifier); | |
| 2091 checkUnnamed239(o.clickTags); | |
| 2092 checkUnnamed240(o.detectedFeatures); | |
| 2093 unittest.expect(o.kind, unittest.equals('foo')); | |
| 2094 checkUnnamed241(o.warnedValidationRules); | |
| 2095 } | |
| 2096 buildCounterCreativeAssetMetadata--; | |
| 2097 } | |
| 2098 | |
| 2099 buildUnnamed242() { | |
| 2100 var o = new core.List<api.CompanionClickThroughOverride>(); | |
| 2101 o.add(buildCompanionClickThroughOverride()); | |
| 2102 o.add(buildCompanionClickThroughOverride()); | |
| 2103 return o; | |
| 2104 } | |
| 2105 | |
| 2106 checkUnnamed242(core.List<api.CompanionClickThroughOverride> o) { | |
| 2107 unittest.expect(o, unittest.hasLength(2)); | |
| 2108 checkCompanionClickThroughOverride(o[0]); | |
| 2109 checkCompanionClickThroughOverride(o[1]); | |
| 2110 } | |
| 2111 | |
| 2112 buildUnnamed243() { | |
| 2113 var o = new core.List<api.CreativeGroupAssignment>(); | |
| 2114 o.add(buildCreativeGroupAssignment()); | |
| 2115 o.add(buildCreativeGroupAssignment()); | |
| 2116 return o; | |
| 2117 } | |
| 2118 | |
| 2119 checkUnnamed243(core.List<api.CreativeGroupAssignment> o) { | |
| 2120 unittest.expect(o, unittest.hasLength(2)); | |
| 2121 checkCreativeGroupAssignment(o[0]); | |
| 2122 checkCreativeGroupAssignment(o[1]); | |
| 2123 } | |
| 2124 | |
| 2125 buildUnnamed244() { | |
| 2126 var o = new core.List<api.RichMediaExitOverride>(); | |
| 2127 o.add(buildRichMediaExitOverride()); | |
| 2128 o.add(buildRichMediaExitOverride()); | |
| 2129 return o; | |
| 2130 } | |
| 2131 | |
| 2132 checkUnnamed244(core.List<api.RichMediaExitOverride> o) { | |
| 2133 unittest.expect(o, unittest.hasLength(2)); | |
| 2134 checkRichMediaExitOverride(o[0]); | |
| 2135 checkRichMediaExitOverride(o[1]); | |
| 2136 } | |
| 2137 | |
| 2138 core.int buildCounterCreativeAssignment = 0; | |
| 2139 buildCreativeAssignment() { | |
| 2140 var o = new api.CreativeAssignment(); | |
| 2141 buildCounterCreativeAssignment++; | |
| 2142 if (buildCounterCreativeAssignment < 3) { | |
| 2143 o.active = true; | |
| 2144 o.applyEventTags = true; | |
| 2145 o.clickThroughUrl = buildClickThroughUrl(); | |
| 2146 o.companionCreativeOverrides = buildUnnamed242(); | |
| 2147 o.creativeGroupAssignments = buildUnnamed243(); | |
| 2148 o.creativeId = "foo"; | |
| 2149 o.creativeIdDimensionValue = buildDimensionValue(); | |
| 2150 o.endTime = core.DateTime.parse("2002-02-27T14:01:02"); | |
| 2151 o.richMediaExitOverrides = buildUnnamed244(); | |
| 2152 o.sequence = 42; | |
| 2153 o.sslCompliant = true; | |
| 2154 o.startTime = core.DateTime.parse("2002-02-27T14:01:02"); | |
| 2155 o.weight = 42; | |
| 2156 } | |
| 2157 buildCounterCreativeAssignment--; | |
| 2158 return o; | |
| 2159 } | |
| 2160 | |
| 2161 checkCreativeAssignment(api.CreativeAssignment o) { | |
| 2162 buildCounterCreativeAssignment++; | |
| 2163 if (buildCounterCreativeAssignment < 3) { | |
| 2164 unittest.expect(o.active, unittest.isTrue); | |
| 2165 unittest.expect(o.applyEventTags, unittest.isTrue); | |
| 2166 checkClickThroughUrl(o.clickThroughUrl); | |
| 2167 checkUnnamed242(o.companionCreativeOverrides); | |
| 2168 checkUnnamed243(o.creativeGroupAssignments); | |
| 2169 unittest.expect(o.creativeId, unittest.equals('foo')); | |
| 2170 checkDimensionValue(o.creativeIdDimensionValue); | |
| 2171 unittest.expect(o.endTime, unittest.equals(core.DateTime.parse("2002-02-27T1
4:01:02"))); | |
| 2172 checkUnnamed244(o.richMediaExitOverrides); | |
| 2173 unittest.expect(o.sequence, unittest.equals(42)); | |
| 2174 unittest.expect(o.sslCompliant, unittest.isTrue); | |
| 2175 unittest.expect(o.startTime, unittest.equals(core.DateTime.parse("2002-02-27
T14:01:02"))); | |
| 2176 unittest.expect(o.weight, unittest.equals(42)); | |
| 2177 } | |
| 2178 buildCounterCreativeAssignment--; | |
| 2179 } | |
| 2180 | |
| 2181 core.int buildCounterCreativeCustomEvent = 0; | |
| 2182 buildCreativeCustomEvent() { | |
| 2183 var o = new api.CreativeCustomEvent(); | |
| 2184 buildCounterCreativeCustomEvent++; | |
| 2185 if (buildCounterCreativeCustomEvent < 3) { | |
| 2186 o.advertiserCustomEventId = "foo"; | |
| 2187 o.advertiserCustomEventName = "foo"; | |
| 2188 o.advertiserCustomEventType = "foo"; | |
| 2189 o.artworkLabel = "foo"; | |
| 2190 o.artworkType = "foo"; | |
| 2191 o.exitUrl = "foo"; | |
| 2192 o.id = "foo"; | |
| 2193 o.popupWindowProperties = buildPopupWindowProperties(); | |
| 2194 o.targetType = "foo"; | |
| 2195 o.videoReportingId = "foo"; | |
| 2196 } | |
| 2197 buildCounterCreativeCustomEvent--; | |
| 2198 return o; | |
| 2199 } | |
| 2200 | |
| 2201 checkCreativeCustomEvent(api.CreativeCustomEvent o) { | |
| 2202 buildCounterCreativeCustomEvent++; | |
| 2203 if (buildCounterCreativeCustomEvent < 3) { | |
| 2204 unittest.expect(o.advertiserCustomEventId, unittest.equals('foo')); | |
| 2205 unittest.expect(o.advertiserCustomEventName, unittest.equals('foo')); | |
| 2206 unittest.expect(o.advertiserCustomEventType, unittest.equals('foo')); | |
| 2207 unittest.expect(o.artworkLabel, unittest.equals('foo')); | |
| 2208 unittest.expect(o.artworkType, unittest.equals('foo')); | |
| 2209 unittest.expect(o.exitUrl, unittest.equals('foo')); | |
| 2210 unittest.expect(o.id, unittest.equals('foo')); | |
| 2211 checkPopupWindowProperties(o.popupWindowProperties); | |
| 2212 unittest.expect(o.targetType, unittest.equals('foo')); | |
| 2213 unittest.expect(o.videoReportingId, unittest.equals('foo')); | |
| 2214 } | |
| 2215 buildCounterCreativeCustomEvent--; | |
| 2216 } | |
| 2217 | |
| 2218 core.int buildCounterCreativeField = 0; | |
| 2219 buildCreativeField() { | |
| 2220 var o = new api.CreativeField(); | |
| 2221 buildCounterCreativeField++; | |
| 2222 if (buildCounterCreativeField < 3) { | |
| 2223 o.accountId = "foo"; | |
| 2224 o.advertiserId = "foo"; | |
| 2225 o.advertiserIdDimensionValue = buildDimensionValue(); | |
| 2226 o.id = "foo"; | |
| 2227 o.kind = "foo"; | |
| 2228 o.name = "foo"; | |
| 2229 o.subaccountId = "foo"; | |
| 2230 } | |
| 2231 buildCounterCreativeField--; | |
| 2232 return o; | |
| 2233 } | |
| 2234 | |
| 2235 checkCreativeField(api.CreativeField o) { | |
| 2236 buildCounterCreativeField++; | |
| 2237 if (buildCounterCreativeField < 3) { | |
| 2238 unittest.expect(o.accountId, unittest.equals('foo')); | |
| 2239 unittest.expect(o.advertiserId, unittest.equals('foo')); | |
| 2240 checkDimensionValue(o.advertiserIdDimensionValue); | |
| 2241 unittest.expect(o.id, unittest.equals('foo')); | |
| 2242 unittest.expect(o.kind, unittest.equals('foo')); | |
| 2243 unittest.expect(o.name, unittest.equals('foo')); | |
| 2244 unittest.expect(o.subaccountId, unittest.equals('foo')); | |
| 2245 } | |
| 2246 buildCounterCreativeField--; | |
| 2247 } | |
| 2248 | |
| 2249 core.int buildCounterCreativeFieldAssignment = 0; | |
| 2250 buildCreativeFieldAssignment() { | |
| 2251 var o = new api.CreativeFieldAssignment(); | |
| 2252 buildCounterCreativeFieldAssignment++; | |
| 2253 if (buildCounterCreativeFieldAssignment < 3) { | |
| 2254 o.creativeFieldId = "foo"; | |
| 2255 o.creativeFieldValueId = "foo"; | |
| 2256 } | |
| 2257 buildCounterCreativeFieldAssignment--; | |
| 2258 return o; | |
| 2259 } | |
| 2260 | |
| 2261 checkCreativeFieldAssignment(api.CreativeFieldAssignment o) { | |
| 2262 buildCounterCreativeFieldAssignment++; | |
| 2263 if (buildCounterCreativeFieldAssignment < 3) { | |
| 2264 unittest.expect(o.creativeFieldId, unittest.equals('foo')); | |
| 2265 unittest.expect(o.creativeFieldValueId, unittest.equals('foo')); | |
| 2266 } | |
| 2267 buildCounterCreativeFieldAssignment--; | |
| 2268 } | |
| 2269 | |
| 2270 core.int buildCounterCreativeFieldValue = 0; | |
| 2271 buildCreativeFieldValue() { | |
| 2272 var o = new api.CreativeFieldValue(); | |
| 2273 buildCounterCreativeFieldValue++; | |
| 2274 if (buildCounterCreativeFieldValue < 3) { | |
| 2275 o.id = "foo"; | |
| 2276 o.kind = "foo"; | |
| 2277 o.value = "foo"; | |
| 2278 } | |
| 2279 buildCounterCreativeFieldValue--; | |
| 2280 return o; | |
| 2281 } | |
| 2282 | |
| 2283 checkCreativeFieldValue(api.CreativeFieldValue o) { | |
| 2284 buildCounterCreativeFieldValue++; | |
| 2285 if (buildCounterCreativeFieldValue < 3) { | |
| 2286 unittest.expect(o.id, unittest.equals('foo')); | |
| 2287 unittest.expect(o.kind, unittest.equals('foo')); | |
| 2288 unittest.expect(o.value, unittest.equals('foo')); | |
| 2289 } | |
| 2290 buildCounterCreativeFieldValue--; | |
| 2291 } | |
| 2292 | |
| 2293 buildUnnamed245() { | |
| 2294 var o = new core.List<api.CreativeFieldValue>(); | |
| 2295 o.add(buildCreativeFieldValue()); | |
| 2296 o.add(buildCreativeFieldValue()); | |
| 2297 return o; | |
| 2298 } | |
| 2299 | |
| 2300 checkUnnamed245(core.List<api.CreativeFieldValue> o) { | |
| 2301 unittest.expect(o, unittest.hasLength(2)); | |
| 2302 checkCreativeFieldValue(o[0]); | |
| 2303 checkCreativeFieldValue(o[1]); | |
| 2304 } | |
| 2305 | |
| 2306 core.int buildCounterCreativeFieldValuesListResponse = 0; | |
| 2307 buildCreativeFieldValuesListResponse() { | |
| 2308 var o = new api.CreativeFieldValuesListResponse(); | |
| 2309 buildCounterCreativeFieldValuesListResponse++; | |
| 2310 if (buildCounterCreativeFieldValuesListResponse < 3) { | |
| 2311 o.creativeFieldValues = buildUnnamed245(); | |
| 2312 o.kind = "foo"; | |
| 2313 o.nextPageToken = "foo"; | |
| 2314 } | |
| 2315 buildCounterCreativeFieldValuesListResponse--; | |
| 2316 return o; | |
| 2317 } | |
| 2318 | |
| 2319 checkCreativeFieldValuesListResponse(api.CreativeFieldValuesListResponse o) { | |
| 2320 buildCounterCreativeFieldValuesListResponse++; | |
| 2321 if (buildCounterCreativeFieldValuesListResponse < 3) { | |
| 2322 checkUnnamed245(o.creativeFieldValues); | |
| 2323 unittest.expect(o.kind, unittest.equals('foo')); | |
| 2324 unittest.expect(o.nextPageToken, unittest.equals('foo')); | |
| 2325 } | |
| 2326 buildCounterCreativeFieldValuesListResponse--; | |
| 2327 } | |
| 2328 | |
| 2329 buildUnnamed246() { | |
| 2330 var o = new core.List<api.CreativeField>(); | |
| 2331 o.add(buildCreativeField()); | |
| 2332 o.add(buildCreativeField()); | |
| 2333 return o; | |
| 2334 } | |
| 2335 | |
| 2336 checkUnnamed246(core.List<api.CreativeField> o) { | |
| 2337 unittest.expect(o, unittest.hasLength(2)); | |
| 2338 checkCreativeField(o[0]); | |
| 2339 checkCreativeField(o[1]); | |
| 2340 } | |
| 2341 | |
| 2342 core.int buildCounterCreativeFieldsListResponse = 0; | |
| 2343 buildCreativeFieldsListResponse() { | |
| 2344 var o = new api.CreativeFieldsListResponse(); | |
| 2345 buildCounterCreativeFieldsListResponse++; | |
| 2346 if (buildCounterCreativeFieldsListResponse < 3) { | |
| 2347 o.creativeFields = buildUnnamed246(); | |
| 2348 o.kind = "foo"; | |
| 2349 o.nextPageToken = "foo"; | |
| 2350 } | |
| 2351 buildCounterCreativeFieldsListResponse--; | |
| 2352 return o; | |
| 2353 } | |
| 2354 | |
| 2355 checkCreativeFieldsListResponse(api.CreativeFieldsListResponse o) { | |
| 2356 buildCounterCreativeFieldsListResponse++; | |
| 2357 if (buildCounterCreativeFieldsListResponse < 3) { | |
| 2358 checkUnnamed246(o.creativeFields); | |
| 2359 unittest.expect(o.kind, unittest.equals('foo')); | |
| 2360 unittest.expect(o.nextPageToken, unittest.equals('foo')); | |
| 2361 } | |
| 2362 buildCounterCreativeFieldsListResponse--; | |
| 2363 } | |
| 2364 | |
| 2365 core.int buildCounterCreativeGroup = 0; | |
| 2366 buildCreativeGroup() { | |
| 2367 var o = new api.CreativeGroup(); | |
| 2368 buildCounterCreativeGroup++; | |
| 2369 if (buildCounterCreativeGroup < 3) { | |
| 2370 o.accountId = "foo"; | |
| 2371 o.advertiserId = "foo"; | |
| 2372 o.advertiserIdDimensionValue = buildDimensionValue(); | |
| 2373 o.groupNumber = 42; | |
| 2374 o.id = "foo"; | |
| 2375 o.kind = "foo"; | |
| 2376 o.name = "foo"; | |
| 2377 o.subaccountId = "foo"; | |
| 2378 } | |
| 2379 buildCounterCreativeGroup--; | |
| 2380 return o; | |
| 2381 } | |
| 2382 | |
| 2383 checkCreativeGroup(api.CreativeGroup o) { | |
| 2384 buildCounterCreativeGroup++; | |
| 2385 if (buildCounterCreativeGroup < 3) { | |
| 2386 unittest.expect(o.accountId, unittest.equals('foo')); | |
| 2387 unittest.expect(o.advertiserId, unittest.equals('foo')); | |
| 2388 checkDimensionValue(o.advertiserIdDimensionValue); | |
| 2389 unittest.expect(o.groupNumber, unittest.equals(42)); | |
| 2390 unittest.expect(o.id, unittest.equals('foo')); | |
| 2391 unittest.expect(o.kind, unittest.equals('foo')); | |
| 2392 unittest.expect(o.name, unittest.equals('foo')); | |
| 2393 unittest.expect(o.subaccountId, unittest.equals('foo')); | |
| 2394 } | |
| 2395 buildCounterCreativeGroup--; | |
| 2396 } | |
| 2397 | |
| 2398 core.int buildCounterCreativeGroupAssignment = 0; | |
| 2399 buildCreativeGroupAssignment() { | |
| 2400 var o = new api.CreativeGroupAssignment(); | |
| 2401 buildCounterCreativeGroupAssignment++; | |
| 2402 if (buildCounterCreativeGroupAssignment < 3) { | |
| 2403 o.creativeGroupId = "foo"; | |
| 2404 o.creativeGroupNumber = "foo"; | |
| 2405 } | |
| 2406 buildCounterCreativeGroupAssignment--; | |
| 2407 return o; | |
| 2408 } | |
| 2409 | |
| 2410 checkCreativeGroupAssignment(api.CreativeGroupAssignment o) { | |
| 2411 buildCounterCreativeGroupAssignment++; | |
| 2412 if (buildCounterCreativeGroupAssignment < 3) { | |
| 2413 unittest.expect(o.creativeGroupId, unittest.equals('foo')); | |
| 2414 unittest.expect(o.creativeGroupNumber, unittest.equals('foo')); | |
| 2415 } | |
| 2416 buildCounterCreativeGroupAssignment--; | |
| 2417 } | |
| 2418 | |
| 2419 buildUnnamed247() { | |
| 2420 var o = new core.List<api.CreativeGroup>(); | |
| 2421 o.add(buildCreativeGroup()); | |
| 2422 o.add(buildCreativeGroup()); | |
| 2423 return o; | |
| 2424 } | |
| 2425 | |
| 2426 checkUnnamed247(core.List<api.CreativeGroup> o) { | |
| 2427 unittest.expect(o, unittest.hasLength(2)); | |
| 2428 checkCreativeGroup(o[0]); | |
| 2429 checkCreativeGroup(o[1]); | |
| 2430 } | |
| 2431 | |
| 2432 core.int buildCounterCreativeGroupsListResponse = 0; | |
| 2433 buildCreativeGroupsListResponse() { | |
| 2434 var o = new api.CreativeGroupsListResponse(); | |
| 2435 buildCounterCreativeGroupsListResponse++; | |
| 2436 if (buildCounterCreativeGroupsListResponse < 3) { | |
| 2437 o.creativeGroups = buildUnnamed247(); | |
| 2438 o.kind = "foo"; | |
| 2439 o.nextPageToken = "foo"; | |
| 2440 } | |
| 2441 buildCounterCreativeGroupsListResponse--; | |
| 2442 return o; | |
| 2443 } | |
| 2444 | |
| 2445 checkCreativeGroupsListResponse(api.CreativeGroupsListResponse o) { | |
| 2446 buildCounterCreativeGroupsListResponse++; | |
| 2447 if (buildCounterCreativeGroupsListResponse < 3) { | |
| 2448 checkUnnamed247(o.creativeGroups); | |
| 2449 unittest.expect(o.kind, unittest.equals('foo')); | |
| 2450 unittest.expect(o.nextPageToken, unittest.equals('foo')); | |
| 2451 } | |
| 2452 buildCounterCreativeGroupsListResponse--; | |
| 2453 } | |
| 2454 | |
| 2455 buildUnnamed248() { | |
| 2456 var o = new core.List<api.OptimizationActivity>(); | |
| 2457 o.add(buildOptimizationActivity()); | |
| 2458 o.add(buildOptimizationActivity()); | |
| 2459 return o; | |
| 2460 } | |
| 2461 | |
| 2462 checkUnnamed248(core.List<api.OptimizationActivity> o) { | |
| 2463 unittest.expect(o, unittest.hasLength(2)); | |
| 2464 checkOptimizationActivity(o[0]); | |
| 2465 checkOptimizationActivity(o[1]); | |
| 2466 } | |
| 2467 | |
| 2468 core.int buildCounterCreativeOptimizationConfiguration = 0; | |
| 2469 buildCreativeOptimizationConfiguration() { | |
| 2470 var o = new api.CreativeOptimizationConfiguration(); | |
| 2471 buildCounterCreativeOptimizationConfiguration++; | |
| 2472 if (buildCounterCreativeOptimizationConfiguration < 3) { | |
| 2473 o.id = "foo"; | |
| 2474 o.name = "foo"; | |
| 2475 o.optimizationActivitys = buildUnnamed248(); | |
| 2476 o.optimizationModel = "foo"; | |
| 2477 } | |
| 2478 buildCounterCreativeOptimizationConfiguration--; | |
| 2479 return o; | |
| 2480 } | |
| 2481 | |
| 2482 checkCreativeOptimizationConfiguration(api.CreativeOptimizationConfiguration o)
{ | |
| 2483 buildCounterCreativeOptimizationConfiguration++; | |
| 2484 if (buildCounterCreativeOptimizationConfiguration < 3) { | |
| 2485 unittest.expect(o.id, unittest.equals('foo')); | |
| 2486 unittest.expect(o.name, unittest.equals('foo')); | |
| 2487 checkUnnamed248(o.optimizationActivitys); | |
| 2488 unittest.expect(o.optimizationModel, unittest.equals('foo')); | |
| 2489 } | |
| 2490 buildCounterCreativeOptimizationConfiguration--; | |
| 2491 } | |
| 2492 | |
| 2493 buildUnnamed249() { | |
| 2494 var o = new core.List<api.CreativeAssignment>(); | |
| 2495 o.add(buildCreativeAssignment()); | |
| 2496 o.add(buildCreativeAssignment()); | |
| 2497 return o; | |
| 2498 } | |
| 2499 | |
| 2500 checkUnnamed249(core.List<api.CreativeAssignment> o) { | |
| 2501 unittest.expect(o, unittest.hasLength(2)); | |
| 2502 checkCreativeAssignment(o[0]); | |
| 2503 checkCreativeAssignment(o[1]); | |
| 2504 } | |
| 2505 | |
| 2506 core.int buildCounterCreativeRotation = 0; | |
| 2507 buildCreativeRotation() { | |
| 2508 var o = new api.CreativeRotation(); | |
| 2509 buildCounterCreativeRotation++; | |
| 2510 if (buildCounterCreativeRotation < 3) { | |
| 2511 o.creativeAssignments = buildUnnamed249(); | |
| 2512 o.creativeOptimizationConfigurationId = "foo"; | |
| 2513 o.type = "foo"; | |
| 2514 o.weightCalculationStrategy = "foo"; | |
| 2515 } | |
| 2516 buildCounterCreativeRotation--; | |
| 2517 return o; | |
| 2518 } | |
| 2519 | |
| 2520 checkCreativeRotation(api.CreativeRotation o) { | |
| 2521 buildCounterCreativeRotation++; | |
| 2522 if (buildCounterCreativeRotation < 3) { | |
| 2523 checkUnnamed249(o.creativeAssignments); | |
| 2524 unittest.expect(o.creativeOptimizationConfigurationId, unittest.equals('foo'
)); | |
| 2525 unittest.expect(o.type, unittest.equals('foo')); | |
| 2526 unittest.expect(o.weightCalculationStrategy, unittest.equals('foo')); | |
| 2527 } | |
| 2528 buildCounterCreativeRotation--; | |
| 2529 } | |
| 2530 | |
| 2531 core.int buildCounterCreativeSettings = 0; | |
| 2532 buildCreativeSettings() { | |
| 2533 var o = new api.CreativeSettings(); | |
| 2534 buildCounterCreativeSettings++; | |
| 2535 if (buildCounterCreativeSettings < 3) { | |
| 2536 o.iFrameFooter = "foo"; | |
| 2537 o.iFrameHeader = "foo"; | |
| 2538 } | |
| 2539 buildCounterCreativeSettings--; | |
| 2540 return o; | |
| 2541 } | |
| 2542 | |
| 2543 checkCreativeSettings(api.CreativeSettings o) { | |
| 2544 buildCounterCreativeSettings++; | |
| 2545 if (buildCounterCreativeSettings < 3) { | |
| 2546 unittest.expect(o.iFrameFooter, unittest.equals('foo')); | |
| 2547 unittest.expect(o.iFrameHeader, unittest.equals('foo')); | |
| 2548 } | |
| 2549 buildCounterCreativeSettings--; | |
| 2550 } | |
| 2551 | |
| 2552 buildUnnamed250() { | |
| 2553 var o = new core.List<api.Creative>(); | |
| 2554 o.add(buildCreative()); | |
| 2555 o.add(buildCreative()); | |
| 2556 return o; | |
| 2557 } | |
| 2558 | |
| 2559 checkUnnamed250(core.List<api.Creative> o) { | |
| 2560 unittest.expect(o, unittest.hasLength(2)); | |
| 2561 checkCreative(o[0]); | |
| 2562 checkCreative(o[1]); | |
| 2563 } | |
| 2564 | |
| 2565 core.int buildCounterCreativesListResponse = 0; | |
| 2566 buildCreativesListResponse() { | |
| 2567 var o = new api.CreativesListResponse(); | |
| 2568 buildCounterCreativesListResponse++; | |
| 2569 if (buildCounterCreativesListResponse < 3) { | |
| 2570 o.creatives = buildUnnamed250(); | |
| 2571 o.kind = "foo"; | |
| 2572 o.nextPageToken = "foo"; | |
| 2573 } | |
| 2574 buildCounterCreativesListResponse--; | |
| 2575 return o; | |
| 2576 } | |
| 2577 | |
| 2578 checkCreativesListResponse(api.CreativesListResponse o) { | |
| 2579 buildCounterCreativesListResponse++; | |
| 2580 if (buildCounterCreativesListResponse < 3) { | |
| 2581 checkUnnamed250(o.creatives); | |
| 2582 unittest.expect(o.kind, unittest.equals('foo')); | |
| 2583 unittest.expect(o.nextPageToken, unittest.equals('foo')); | |
| 2584 } | |
| 2585 buildCounterCreativesListResponse--; | |
| 2586 } | |
| 2587 | |
| 2588 buildUnnamed251() { | |
| 2589 var o = new core.List<api.Dimension>(); | |
| 2590 o.add(buildDimension()); | |
| 2591 o.add(buildDimension()); | |
| 2592 return o; | |
| 2593 } | |
| 2594 | |
| 2595 checkUnnamed251(core.List<api.Dimension> o) { | |
| 2596 unittest.expect(o, unittest.hasLength(2)); | |
| 2597 checkDimension(o[0]); | |
| 2598 checkDimension(o[1]); | |
| 2599 } | |
| 2600 | |
| 2601 buildUnnamed252() { | |
| 2602 var o = new core.List<api.Dimension>(); | |
| 2603 o.add(buildDimension()); | |
| 2604 o.add(buildDimension()); | |
| 2605 return o; | |
| 2606 } | |
| 2607 | |
| 2608 checkUnnamed252(core.List<api.Dimension> o) { | |
| 2609 unittest.expect(o, unittest.hasLength(2)); | |
| 2610 checkDimension(o[0]); | |
| 2611 checkDimension(o[1]); | |
| 2612 } | |
| 2613 | |
| 2614 buildUnnamed253() { | |
| 2615 var o = new core.List<api.Metric>(); | |
| 2616 o.add(buildMetric()); | |
| 2617 o.add(buildMetric()); | |
| 2618 return o; | |
| 2619 } | |
| 2620 | |
| 2621 checkUnnamed253(core.List<api.Metric> o) { | |
| 2622 unittest.expect(o, unittest.hasLength(2)); | |
| 2623 checkMetric(o[0]); | |
| 2624 checkMetric(o[1]); | |
| 2625 } | |
| 2626 | |
| 2627 buildUnnamed254() { | |
| 2628 var o = new core.List<api.Metric>(); | |
| 2629 o.add(buildMetric()); | |
| 2630 o.add(buildMetric()); | |
| 2631 return o; | |
| 2632 } | |
| 2633 | |
| 2634 checkUnnamed254(core.List<api.Metric> o) { | |
| 2635 unittest.expect(o, unittest.hasLength(2)); | |
| 2636 checkMetric(o[0]); | |
| 2637 checkMetric(o[1]); | |
| 2638 } | |
| 2639 | |
| 2640 core.int buildCounterCrossDimensionReachReportCompatibleFields = 0; | |
| 2641 buildCrossDimensionReachReportCompatibleFields() { | |
| 2642 var o = new api.CrossDimensionReachReportCompatibleFields(); | |
| 2643 buildCounterCrossDimensionReachReportCompatibleFields++; | |
| 2644 if (buildCounterCrossDimensionReachReportCompatibleFields < 3) { | |
| 2645 o.breakdown = buildUnnamed251(); | |
| 2646 o.dimensionFilters = buildUnnamed252(); | |
| 2647 o.kind = "foo"; | |
| 2648 o.metrics = buildUnnamed253(); | |
| 2649 o.overlapMetrics = buildUnnamed254(); | |
| 2650 } | |
| 2651 buildCounterCrossDimensionReachReportCompatibleFields--; | |
| 2652 return o; | |
| 2653 } | |
| 2654 | |
| 2655 checkCrossDimensionReachReportCompatibleFields(api.CrossDimensionReachReportComp
atibleFields o) { | |
| 2656 buildCounterCrossDimensionReachReportCompatibleFields++; | |
| 2657 if (buildCounterCrossDimensionReachReportCompatibleFields < 3) { | |
| 2658 checkUnnamed251(o.breakdown); | |
| 2659 checkUnnamed252(o.dimensionFilters); | |
| 2660 unittest.expect(o.kind, unittest.equals('foo')); | |
| 2661 checkUnnamed253(o.metrics); | |
| 2662 checkUnnamed254(o.overlapMetrics); | |
| 2663 } | |
| 2664 buildCounterCrossDimensionReachReportCompatibleFields--; | |
| 2665 } | |
| 2666 | |
| 2667 buildUnnamed255() { | |
| 2668 var o = new core.List<api.DimensionValue>(); | |
| 2669 o.add(buildDimensionValue()); | |
| 2670 o.add(buildDimensionValue()); | |
| 2671 return o; | |
| 2672 } | |
| 2673 | |
| 2674 checkUnnamed255(core.List<api.DimensionValue> o) { | |
| 2675 unittest.expect(o, unittest.hasLength(2)); | |
| 2676 checkDimensionValue(o[0]); | |
| 2677 checkDimensionValue(o[1]); | |
| 2678 } | |
| 2679 | |
| 2680 core.int buildCounterCustomRichMediaEvents = 0; | |
| 2681 buildCustomRichMediaEvents() { | |
| 2682 var o = new api.CustomRichMediaEvents(); | |
| 2683 buildCounterCustomRichMediaEvents++; | |
| 2684 if (buildCounterCustomRichMediaEvents < 3) { | |
| 2685 o.filteredEventIds = buildUnnamed255(); | |
| 2686 o.kind = "foo"; | |
| 2687 } | |
| 2688 buildCounterCustomRichMediaEvents--; | |
| 2689 return o; | |
| 2690 } | |
| 2691 | |
| 2692 checkCustomRichMediaEvents(api.CustomRichMediaEvents o) { | |
| 2693 buildCounterCustomRichMediaEvents++; | |
| 2694 if (buildCounterCustomRichMediaEvents < 3) { | |
| 2695 checkUnnamed255(o.filteredEventIds); | |
| 2696 unittest.expect(o.kind, unittest.equals('foo')); | |
| 2697 } | |
| 2698 buildCounterCustomRichMediaEvents--; | |
| 2699 } | |
| 2700 | |
| 2701 core.int buildCounterDateRange = 0; | |
| 2702 buildDateRange() { | |
| 2703 var o = new api.DateRange(); | |
| 2704 buildCounterDateRange++; | |
| 2705 if (buildCounterDateRange < 3) { | |
| 2706 o.endDate = core.DateTime.parse("2002-02-27T14:01:02Z"); | |
| 2707 o.kind = "foo"; | |
| 2708 o.relativeDateRange = "foo"; | |
| 2709 o.startDate = core.DateTime.parse("2002-02-27T14:01:02Z"); | |
| 2710 } | |
| 2711 buildCounterDateRange--; | |
| 2712 return o; | |
| 2713 } | |
| 2714 | |
| 2715 checkDateRange(api.DateRange o) { | |
| 2716 buildCounterDateRange++; | |
| 2717 if (buildCounterDateRange < 3) { | |
| 2718 unittest.expect(o.endDate, unittest.equals(core.DateTime.parse("2002-02-27T0
0:00:00"))); | |
| 2719 unittest.expect(o.kind, unittest.equals('foo')); | |
| 2720 unittest.expect(o.relativeDateRange, unittest.equals('foo')); | |
| 2721 unittest.expect(o.startDate, unittest.equals(core.DateTime.parse("2002-02-27
T00:00:00"))); | |
| 2722 } | |
| 2723 buildCounterDateRange--; | |
| 2724 } | |
| 2725 | |
| 2726 buildUnnamed256() { | |
| 2727 var o = new core.List<core.String>(); | |
| 2728 o.add("foo"); | |
| 2729 o.add("foo"); | |
| 2730 return o; | |
| 2731 } | |
| 2732 | |
| 2733 checkUnnamed256(core.List<core.String> o) { | |
| 2734 unittest.expect(o, unittest.hasLength(2)); | |
| 2735 unittest.expect(o[0], unittest.equals('foo')); | |
| 2736 unittest.expect(o[1], unittest.equals('foo')); | |
| 2737 } | |
| 2738 | |
| 2739 buildUnnamed257() { | |
| 2740 var o = new core.List<core.int>(); | |
| 2741 o.add(42); | |
| 2742 o.add(42); | |
| 2743 return o; | |
| 2744 } | |
| 2745 | |
| 2746 checkUnnamed257(core.List<core.int> o) { | |
| 2747 unittest.expect(o, unittest.hasLength(2)); | |
| 2748 unittest.expect(o[0], unittest.equals(42)); | |
| 2749 unittest.expect(o[1], unittest.equals(42)); | |
| 2750 } | |
| 2751 | |
| 2752 core.int buildCounterDayPartTargeting = 0; | |
| 2753 buildDayPartTargeting() { | |
| 2754 var o = new api.DayPartTargeting(); | |
| 2755 buildCounterDayPartTargeting++; | |
| 2756 if (buildCounterDayPartTargeting < 3) { | |
| 2757 o.daysOfWeek = buildUnnamed256(); | |
| 2758 o.hoursOfDay = buildUnnamed257(); | |
| 2759 o.userLocalTime = true; | |
| 2760 } | |
| 2761 buildCounterDayPartTargeting--; | |
| 2762 return o; | |
| 2763 } | |
| 2764 | |
| 2765 checkDayPartTargeting(api.DayPartTargeting o) { | |
| 2766 buildCounterDayPartTargeting++; | |
| 2767 if (buildCounterDayPartTargeting < 3) { | |
| 2768 checkUnnamed256(o.daysOfWeek); | |
| 2769 checkUnnamed257(o.hoursOfDay); | |
| 2770 unittest.expect(o.userLocalTime, unittest.isTrue); | |
| 2771 } | |
| 2772 buildCounterDayPartTargeting--; | |
| 2773 } | |
| 2774 | |
| 2775 core.int buildCounterDefaultClickThroughEventTagProperties = 0; | |
| 2776 buildDefaultClickThroughEventTagProperties() { | |
| 2777 var o = new api.DefaultClickThroughEventTagProperties(); | |
| 2778 buildCounterDefaultClickThroughEventTagProperties++; | |
| 2779 if (buildCounterDefaultClickThroughEventTagProperties < 3) { | |
| 2780 o.defaultClickThroughEventTagId = "foo"; | |
| 2781 o.overrideInheritedEventTag = true; | |
| 2782 } | |
| 2783 buildCounterDefaultClickThroughEventTagProperties--; | |
| 2784 return o; | |
| 2785 } | |
| 2786 | |
| 2787 checkDefaultClickThroughEventTagProperties(api.DefaultClickThroughEventTagProper
ties o) { | |
| 2788 buildCounterDefaultClickThroughEventTagProperties++; | |
| 2789 if (buildCounterDefaultClickThroughEventTagProperties < 3) { | |
| 2790 unittest.expect(o.defaultClickThroughEventTagId, unittest.equals('foo')); | |
| 2791 unittest.expect(o.overrideInheritedEventTag, unittest.isTrue); | |
| 2792 } | |
| 2793 buildCounterDefaultClickThroughEventTagProperties--; | |
| 2794 } | |
| 2795 | |
| 2796 core.int buildCounterDeliverySchedule = 0; | |
| 2797 buildDeliverySchedule() { | |
| 2798 var o = new api.DeliverySchedule(); | |
| 2799 buildCounterDeliverySchedule++; | |
| 2800 if (buildCounterDeliverySchedule < 3) { | |
| 2801 o.frequencyCap = buildFrequencyCap(); | |
| 2802 o.hardCutoff = true; | |
| 2803 o.impressionRatio = "foo"; | |
| 2804 o.priority = "foo"; | |
| 2805 } | |
| 2806 buildCounterDeliverySchedule--; | |
| 2807 return o; | |
| 2808 } | |
| 2809 | |
| 2810 checkDeliverySchedule(api.DeliverySchedule o) { | |
| 2811 buildCounterDeliverySchedule++; | |
| 2812 if (buildCounterDeliverySchedule < 3) { | |
| 2813 checkFrequencyCap(o.frequencyCap); | |
| 2814 unittest.expect(o.hardCutoff, unittest.isTrue); | |
| 2815 unittest.expect(o.impressionRatio, unittest.equals('foo')); | |
| 2816 unittest.expect(o.priority, unittest.equals('foo')); | |
| 2817 } | |
| 2818 buildCounterDeliverySchedule--; | |
| 2819 } | |
| 2820 | |
| 2821 core.int buildCounterDfpSettings = 0; | |
| 2822 buildDfpSettings() { | |
| 2823 var o = new api.DfpSettings(); | |
| 2824 buildCounterDfpSettings++; | |
| 2825 if (buildCounterDfpSettings < 3) { | |
| 2826 o.dfpNetworkCode = "foo"; | |
| 2827 o.dfpNetworkName = "foo"; | |
| 2828 o.programmaticPlacementAccepted = true; | |
| 2829 o.pubPaidPlacementAccepted = true; | |
| 2830 o.publisherPortalOnly = true; | |
| 2831 } | |
| 2832 buildCounterDfpSettings--; | |
| 2833 return o; | |
| 2834 } | |
| 2835 | |
| 2836 checkDfpSettings(api.DfpSettings o) { | |
| 2837 buildCounterDfpSettings++; | |
| 2838 if (buildCounterDfpSettings < 3) { | |
| 2839 unittest.expect(o.dfpNetworkCode, unittest.equals('foo')); | |
| 2840 unittest.expect(o.dfpNetworkName, unittest.equals('foo')); | |
| 2841 unittest.expect(o.programmaticPlacementAccepted, unittest.isTrue); | |
| 2842 unittest.expect(o.pubPaidPlacementAccepted, unittest.isTrue); | |
| 2843 unittest.expect(o.publisherPortalOnly, unittest.isTrue); | |
| 2844 } | |
| 2845 buildCounterDfpSettings--; | |
| 2846 } | |
| 2847 | |
| 2848 core.int buildCounterDimension = 0; | |
| 2849 buildDimension() { | |
| 2850 var o = new api.Dimension(); | |
| 2851 buildCounterDimension++; | |
| 2852 if (buildCounterDimension < 3) { | |
| 2853 o.kind = "foo"; | |
| 2854 o.name = "foo"; | |
| 2855 } | |
| 2856 buildCounterDimension--; | |
| 2857 return o; | |
| 2858 } | |
| 2859 | |
| 2860 checkDimension(api.Dimension o) { | |
| 2861 buildCounterDimension++; | |
| 2862 if (buildCounterDimension < 3) { | |
| 2863 unittest.expect(o.kind, unittest.equals('foo')); | |
| 2864 unittest.expect(o.name, unittest.equals('foo')); | |
| 2865 } | |
| 2866 buildCounterDimension--; | |
| 2867 } | |
| 2868 | |
| 2869 core.int buildCounterDimensionFilter = 0; | |
| 2870 buildDimensionFilter() { | |
| 2871 var o = new api.DimensionFilter(); | |
| 2872 buildCounterDimensionFilter++; | |
| 2873 if (buildCounterDimensionFilter < 3) { | |
| 2874 o.dimensionName = "foo"; | |
| 2875 o.kind = "foo"; | |
| 2876 o.value = "foo"; | |
| 2877 } | |
| 2878 buildCounterDimensionFilter--; | |
| 2879 return o; | |
| 2880 } | |
| 2881 | |
| 2882 checkDimensionFilter(api.DimensionFilter o) { | |
| 2883 buildCounterDimensionFilter++; | |
| 2884 if (buildCounterDimensionFilter < 3) { | |
| 2885 unittest.expect(o.dimensionName, unittest.equals('foo')); | |
| 2886 unittest.expect(o.kind, unittest.equals('foo')); | |
| 2887 unittest.expect(o.value, unittest.equals('foo')); | |
| 2888 } | |
| 2889 buildCounterDimensionFilter--; | |
| 2890 } | |
| 2891 | |
| 2892 core.int buildCounterDimensionValue = 0; | |
| 2893 buildDimensionValue() { | |
| 2894 var o = new api.DimensionValue(); | |
| 2895 buildCounterDimensionValue++; | |
| 2896 if (buildCounterDimensionValue < 3) { | |
| 2897 o.dimensionName = "foo"; | |
| 2898 o.etag = "foo"; | |
| 2899 o.id = "foo"; | |
| 2900 o.kind = "foo"; | |
| 2901 o.matchType = "foo"; | |
| 2902 o.value = "foo"; | |
| 2903 } | |
| 2904 buildCounterDimensionValue--; | |
| 2905 return o; | |
| 2906 } | |
| 2907 | |
| 2908 checkDimensionValue(api.DimensionValue o) { | |
| 2909 buildCounterDimensionValue++; | |
| 2910 if (buildCounterDimensionValue < 3) { | |
| 2911 unittest.expect(o.dimensionName, unittest.equals('foo')); | |
| 2912 unittest.expect(o.etag, unittest.equals('foo')); | |
| 2913 unittest.expect(o.id, unittest.equals('foo')); | |
| 2914 unittest.expect(o.kind, unittest.equals('foo')); | |
| 2915 unittest.expect(o.matchType, unittest.equals('foo')); | |
| 2916 unittest.expect(o.value, unittest.equals('foo')); | |
| 2917 } | |
| 2918 buildCounterDimensionValue--; | |
| 2919 } | |
| 2920 | |
| 2921 buildUnnamed258() { | |
| 2922 var o = new core.List<api.DimensionValue>(); | |
| 2923 o.add(buildDimensionValue()); | |
| 2924 o.add(buildDimensionValue()); | |
| 2925 return o; | |
| 2926 } | |
| 2927 | |
| 2928 checkUnnamed258(core.List<api.DimensionValue> o) { | |
| 2929 unittest.expect(o, unittest.hasLength(2)); | |
| 2930 checkDimensionValue(o[0]); | |
| 2931 checkDimensionValue(o[1]); | |
| 2932 } | |
| 2933 | |
| 2934 core.int buildCounterDimensionValueList = 0; | |
| 2935 buildDimensionValueList() { | |
| 2936 var o = new api.DimensionValueList(); | |
| 2937 buildCounterDimensionValueList++; | |
| 2938 if (buildCounterDimensionValueList < 3) { | |
| 2939 o.etag = "foo"; | |
| 2940 o.items = buildUnnamed258(); | |
| 2941 o.kind = "foo"; | |
| 2942 o.nextPageToken = "foo"; | |
| 2943 } | |
| 2944 buildCounterDimensionValueList--; | |
| 2945 return o; | |
| 2946 } | |
| 2947 | |
| 2948 checkDimensionValueList(api.DimensionValueList o) { | |
| 2949 buildCounterDimensionValueList++; | |
| 2950 if (buildCounterDimensionValueList < 3) { | |
| 2951 unittest.expect(o.etag, unittest.equals('foo')); | |
| 2952 checkUnnamed258(o.items); | |
| 2953 unittest.expect(o.kind, unittest.equals('foo')); | |
| 2954 unittest.expect(o.nextPageToken, unittest.equals('foo')); | |
| 2955 } | |
| 2956 buildCounterDimensionValueList--; | |
| 2957 } | |
| 2958 | |
| 2959 buildUnnamed259() { | |
| 2960 var o = new core.List<api.DimensionFilter>(); | |
| 2961 o.add(buildDimensionFilter()); | |
| 2962 o.add(buildDimensionFilter()); | |
| 2963 return o; | |
| 2964 } | |
| 2965 | |
| 2966 checkUnnamed259(core.List<api.DimensionFilter> o) { | |
| 2967 unittest.expect(o, unittest.hasLength(2)); | |
| 2968 checkDimensionFilter(o[0]); | |
| 2969 checkDimensionFilter(o[1]); | |
| 2970 } | |
| 2971 | |
| 2972 core.int buildCounterDimensionValueRequest = 0; | |
| 2973 buildDimensionValueRequest() { | |
| 2974 var o = new api.DimensionValueRequest(); | |
| 2975 buildCounterDimensionValueRequest++; | |
| 2976 if (buildCounterDimensionValueRequest < 3) { | |
| 2977 o.dimensionName = "foo"; | |
| 2978 o.endDate = core.DateTime.parse("2002-02-27T14:01:02Z"); | |
| 2979 o.filters = buildUnnamed259(); | |
| 2980 o.kind = "foo"; | |
| 2981 o.startDate = core.DateTime.parse("2002-02-27T14:01:02Z"); | |
| 2982 } | |
| 2983 buildCounterDimensionValueRequest--; | |
| 2984 return o; | |
| 2985 } | |
| 2986 | |
| 2987 checkDimensionValueRequest(api.DimensionValueRequest o) { | |
| 2988 buildCounterDimensionValueRequest++; | |
| 2989 if (buildCounterDimensionValueRequest < 3) { | |
| 2990 unittest.expect(o.dimensionName, unittest.equals('foo')); | |
| 2991 unittest.expect(o.endDate, unittest.equals(core.DateTime.parse("2002-02-27T0
0:00:00"))); | |
| 2992 checkUnnamed259(o.filters); | |
| 2993 unittest.expect(o.kind, unittest.equals('foo')); | |
| 2994 unittest.expect(o.startDate, unittest.equals(core.DateTime.parse("2002-02-27
T00:00:00"))); | |
| 2995 } | |
| 2996 buildCounterDimensionValueRequest--; | |
| 2997 } | |
| 2998 | |
| 2999 buildUnnamed260() { | |
| 3000 var o = new core.List<api.DirectorySiteContactAssignment>(); | |
| 3001 o.add(buildDirectorySiteContactAssignment()); | |
| 3002 o.add(buildDirectorySiteContactAssignment()); | |
| 3003 return o; | |
| 3004 } | |
| 3005 | |
| 3006 checkUnnamed260(core.List<api.DirectorySiteContactAssignment> o) { | |
| 3007 unittest.expect(o, unittest.hasLength(2)); | |
| 3008 checkDirectorySiteContactAssignment(o[0]); | |
| 3009 checkDirectorySiteContactAssignment(o[1]); | |
| 3010 } | |
| 3011 | |
| 3012 buildUnnamed261() { | |
| 3013 var o = new core.List<core.String>(); | |
| 3014 o.add("foo"); | |
| 3015 o.add("foo"); | |
| 3016 return o; | |
| 3017 } | |
| 3018 | |
| 3019 checkUnnamed261(core.List<core.String> o) { | |
| 3020 unittest.expect(o, unittest.hasLength(2)); | |
| 3021 unittest.expect(o[0], unittest.equals('foo')); | |
| 3022 unittest.expect(o[1], unittest.equals('foo')); | |
| 3023 } | |
| 3024 | |
| 3025 buildUnnamed262() { | |
| 3026 var o = new core.List<core.String>(); | |
| 3027 o.add("foo"); | |
| 3028 o.add("foo"); | |
| 3029 return o; | |
| 3030 } | |
| 3031 | |
| 3032 checkUnnamed262(core.List<core.String> o) { | |
| 3033 unittest.expect(o, unittest.hasLength(2)); | |
| 3034 unittest.expect(o[0], unittest.equals('foo')); | |
| 3035 unittest.expect(o[1], unittest.equals('foo')); | |
| 3036 } | |
| 3037 | |
| 3038 core.int buildCounterDirectorySite = 0; | |
| 3039 buildDirectorySite() { | |
| 3040 var o = new api.DirectorySite(); | |
| 3041 buildCounterDirectorySite++; | |
| 3042 if (buildCounterDirectorySite < 3) { | |
| 3043 o.active = true; | |
| 3044 o.contactAssignments = buildUnnamed260(); | |
| 3045 o.countryId = "foo"; | |
| 3046 o.currencyId = "foo"; | |
| 3047 o.description = "foo"; | |
| 3048 o.id = "foo"; | |
| 3049 o.idDimensionValue = buildDimensionValue(); | |
| 3050 o.inpageTagFormats = buildUnnamed261(); | |
| 3051 o.interstitialTagFormats = buildUnnamed262(); | |
| 3052 o.kind = "foo"; | |
| 3053 o.name = "foo"; | |
| 3054 o.parentId = "foo"; | |
| 3055 o.settings = buildDirectorySiteSettings(); | |
| 3056 o.url = "foo"; | |
| 3057 } | |
| 3058 buildCounterDirectorySite--; | |
| 3059 return o; | |
| 3060 } | |
| 3061 | |
| 3062 checkDirectorySite(api.DirectorySite o) { | |
| 3063 buildCounterDirectorySite++; | |
| 3064 if (buildCounterDirectorySite < 3) { | |
| 3065 unittest.expect(o.active, unittest.isTrue); | |
| 3066 checkUnnamed260(o.contactAssignments); | |
| 3067 unittest.expect(o.countryId, unittest.equals('foo')); | |
| 3068 unittest.expect(o.currencyId, unittest.equals('foo')); | |
| 3069 unittest.expect(o.description, unittest.equals('foo')); | |
| 3070 unittest.expect(o.id, unittest.equals('foo')); | |
| 3071 checkDimensionValue(o.idDimensionValue); | |
| 3072 checkUnnamed261(o.inpageTagFormats); | |
| 3073 checkUnnamed262(o.interstitialTagFormats); | |
| 3074 unittest.expect(o.kind, unittest.equals('foo')); | |
| 3075 unittest.expect(o.name, unittest.equals('foo')); | |
| 3076 unittest.expect(o.parentId, unittest.equals('foo')); | |
| 3077 checkDirectorySiteSettings(o.settings); | |
| 3078 unittest.expect(o.url, unittest.equals('foo')); | |
| 3079 } | |
| 3080 buildCounterDirectorySite--; | |
| 3081 } | |
| 3082 | |
| 3083 core.int buildCounterDirectorySiteContact = 0; | |
| 3084 buildDirectorySiteContact() { | |
| 3085 var o = new api.DirectorySiteContact(); | |
| 3086 buildCounterDirectorySiteContact++; | |
| 3087 if (buildCounterDirectorySiteContact < 3) { | |
| 3088 o.address = "foo"; | |
| 3089 o.email = "foo"; | |
| 3090 o.firstName = "foo"; | |
| 3091 o.id = "foo"; | |
| 3092 o.kind = "foo"; | |
| 3093 o.lastName = "foo"; | |
| 3094 o.phone = "foo"; | |
| 3095 o.role = "foo"; | |
| 3096 o.title = "foo"; | |
| 3097 o.type = "foo"; | |
| 3098 } | |
| 3099 buildCounterDirectorySiteContact--; | |
| 3100 return o; | |
| 3101 } | |
| 3102 | |
| 3103 checkDirectorySiteContact(api.DirectorySiteContact o) { | |
| 3104 buildCounterDirectorySiteContact++; | |
| 3105 if (buildCounterDirectorySiteContact < 3) { | |
| 3106 unittest.expect(o.address, unittest.equals('foo')); | |
| 3107 unittest.expect(o.email, unittest.equals('foo')); | |
| 3108 unittest.expect(o.firstName, unittest.equals('foo')); | |
| 3109 unittest.expect(o.id, unittest.equals('foo')); | |
| 3110 unittest.expect(o.kind, unittest.equals('foo')); | |
| 3111 unittest.expect(o.lastName, unittest.equals('foo')); | |
| 3112 unittest.expect(o.phone, unittest.equals('foo')); | |
| 3113 unittest.expect(o.role, unittest.equals('foo')); | |
| 3114 unittest.expect(o.title, unittest.equals('foo')); | |
| 3115 unittest.expect(o.type, unittest.equals('foo')); | |
| 3116 } | |
| 3117 buildCounterDirectorySiteContact--; | |
| 3118 } | |
| 3119 | |
| 3120 core.int buildCounterDirectorySiteContactAssignment = 0; | |
| 3121 buildDirectorySiteContactAssignment() { | |
| 3122 var o = new api.DirectorySiteContactAssignment(); | |
| 3123 buildCounterDirectorySiteContactAssignment++; | |
| 3124 if (buildCounterDirectorySiteContactAssignment < 3) { | |
| 3125 o.contactId = "foo"; | |
| 3126 o.visibility = "foo"; | |
| 3127 } | |
| 3128 buildCounterDirectorySiteContactAssignment--; | |
| 3129 return o; | |
| 3130 } | |
| 3131 | |
| 3132 checkDirectorySiteContactAssignment(api.DirectorySiteContactAssignment o) { | |
| 3133 buildCounterDirectorySiteContactAssignment++; | |
| 3134 if (buildCounterDirectorySiteContactAssignment < 3) { | |
| 3135 unittest.expect(o.contactId, unittest.equals('foo')); | |
| 3136 unittest.expect(o.visibility, unittest.equals('foo')); | |
| 3137 } | |
| 3138 buildCounterDirectorySiteContactAssignment--; | |
| 3139 } | |
| 3140 | |
| 3141 buildUnnamed263() { | |
| 3142 var o = new core.List<api.DirectorySiteContact>(); | |
| 3143 o.add(buildDirectorySiteContact()); | |
| 3144 o.add(buildDirectorySiteContact()); | |
| 3145 return o; | |
| 3146 } | |
| 3147 | |
| 3148 checkUnnamed263(core.List<api.DirectorySiteContact> o) { | |
| 3149 unittest.expect(o, unittest.hasLength(2)); | |
| 3150 checkDirectorySiteContact(o[0]); | |
| 3151 checkDirectorySiteContact(o[1]); | |
| 3152 } | |
| 3153 | |
| 3154 core.int buildCounterDirectorySiteContactsListResponse = 0; | |
| 3155 buildDirectorySiteContactsListResponse() { | |
| 3156 var o = new api.DirectorySiteContactsListResponse(); | |
| 3157 buildCounterDirectorySiteContactsListResponse++; | |
| 3158 if (buildCounterDirectorySiteContactsListResponse < 3) { | |
| 3159 o.directorySiteContacts = buildUnnamed263(); | |
| 3160 o.kind = "foo"; | |
| 3161 o.nextPageToken = "foo"; | |
| 3162 } | |
| 3163 buildCounterDirectorySiteContactsListResponse--; | |
| 3164 return o; | |
| 3165 } | |
| 3166 | |
| 3167 checkDirectorySiteContactsListResponse(api.DirectorySiteContactsListResponse o)
{ | |
| 3168 buildCounterDirectorySiteContactsListResponse++; | |
| 3169 if (buildCounterDirectorySiteContactsListResponse < 3) { | |
| 3170 checkUnnamed263(o.directorySiteContacts); | |
| 3171 unittest.expect(o.kind, unittest.equals('foo')); | |
| 3172 unittest.expect(o.nextPageToken, unittest.equals('foo')); | |
| 3173 } | |
| 3174 buildCounterDirectorySiteContactsListResponse--; | |
| 3175 } | |
| 3176 | |
| 3177 core.int buildCounterDirectorySiteSettings = 0; | |
| 3178 buildDirectorySiteSettings() { | |
| 3179 var o = new api.DirectorySiteSettings(); | |
| 3180 buildCounterDirectorySiteSettings++; | |
| 3181 if (buildCounterDirectorySiteSettings < 3) { | |
| 3182 o.activeViewOptOut = true; | |
| 3183 o.dfpSettings = buildDfpSettings(); | |
| 3184 o.instreamVideoPlacementAccepted = true; | |
| 3185 o.interstitialPlacementAccepted = true; | |
| 3186 o.nielsenOcrOptOut = true; | |
| 3187 o.verificationTagOptOut = true; | |
| 3188 o.videoActiveViewOptOut = true; | |
| 3189 } | |
| 3190 buildCounterDirectorySiteSettings--; | |
| 3191 return o; | |
| 3192 } | |
| 3193 | |
| 3194 checkDirectorySiteSettings(api.DirectorySiteSettings o) { | |
| 3195 buildCounterDirectorySiteSettings++; | |
| 3196 if (buildCounterDirectorySiteSettings < 3) { | |
| 3197 unittest.expect(o.activeViewOptOut, unittest.isTrue); | |
| 3198 checkDfpSettings(o.dfpSettings); | |
| 3199 unittest.expect(o.instreamVideoPlacementAccepted, unittest.isTrue); | |
| 3200 unittest.expect(o.interstitialPlacementAccepted, unittest.isTrue); | |
| 3201 unittest.expect(o.nielsenOcrOptOut, unittest.isTrue); | |
| 3202 unittest.expect(o.verificationTagOptOut, unittest.isTrue); | |
| 3203 unittest.expect(o.videoActiveViewOptOut, unittest.isTrue); | |
| 3204 } | |
| 3205 buildCounterDirectorySiteSettings--; | |
| 3206 } | |
| 3207 | |
| 3208 buildUnnamed264() { | |
| 3209 var o = new core.List<api.DirectorySite>(); | |
| 3210 o.add(buildDirectorySite()); | |
| 3211 o.add(buildDirectorySite()); | |
| 3212 return o; | |
| 3213 } | |
| 3214 | |
| 3215 checkUnnamed264(core.List<api.DirectorySite> o) { | |
| 3216 unittest.expect(o, unittest.hasLength(2)); | |
| 3217 checkDirectorySite(o[0]); | |
| 3218 checkDirectorySite(o[1]); | |
| 3219 } | |
| 3220 | |
| 3221 core.int buildCounterDirectorySitesListResponse = 0; | |
| 3222 buildDirectorySitesListResponse() { | |
| 3223 var o = new api.DirectorySitesListResponse(); | |
| 3224 buildCounterDirectorySitesListResponse++; | |
| 3225 if (buildCounterDirectorySitesListResponse < 3) { | |
| 3226 o.directorySites = buildUnnamed264(); | |
| 3227 o.kind = "foo"; | |
| 3228 o.nextPageToken = "foo"; | |
| 3229 } | |
| 3230 buildCounterDirectorySitesListResponse--; | |
| 3231 return o; | |
| 3232 } | |
| 3233 | |
| 3234 checkDirectorySitesListResponse(api.DirectorySitesListResponse o) { | |
| 3235 buildCounterDirectorySitesListResponse++; | |
| 3236 if (buildCounterDirectorySitesListResponse < 3) { | |
| 3237 checkUnnamed264(o.directorySites); | |
| 3238 unittest.expect(o.kind, unittest.equals('foo')); | |
| 3239 unittest.expect(o.nextPageToken, unittest.equals('foo')); | |
| 3240 } | |
| 3241 buildCounterDirectorySitesListResponse--; | |
| 3242 } | |
| 3243 | |
| 3244 buildUnnamed265() { | |
| 3245 var o = new core.List<core.String>(); | |
| 3246 o.add("foo"); | |
| 3247 o.add("foo"); | |
| 3248 return o; | |
| 3249 } | |
| 3250 | |
| 3251 checkUnnamed265(core.List<core.String> o) { | |
| 3252 unittest.expect(o, unittest.hasLength(2)); | |
| 3253 unittest.expect(o[0], unittest.equals('foo')); | |
| 3254 unittest.expect(o[1], unittest.equals('foo')); | |
| 3255 } | |
| 3256 | |
| 3257 core.int buildCounterEventTag = 0; | |
| 3258 buildEventTag() { | |
| 3259 var o = new api.EventTag(); | |
| 3260 buildCounterEventTag++; | |
| 3261 if (buildCounterEventTag < 3) { | |
| 3262 o.accountId = "foo"; | |
| 3263 o.advertiserId = "foo"; | |
| 3264 o.advertiserIdDimensionValue = buildDimensionValue(); | |
| 3265 o.campaignId = "foo"; | |
| 3266 o.campaignIdDimensionValue = buildDimensionValue(); | |
| 3267 o.enabledByDefault = true; | |
| 3268 o.excludeFromAdxRequests = true; | |
| 3269 o.id = "foo"; | |
| 3270 o.kind = "foo"; | |
| 3271 o.name = "foo"; | |
| 3272 o.siteFilterType = "foo"; | |
| 3273 o.siteIds = buildUnnamed265(); | |
| 3274 o.sslCompliant = true; | |
| 3275 o.status = "foo"; | |
| 3276 o.subaccountId = "foo"; | |
| 3277 o.type = "foo"; | |
| 3278 o.url = "foo"; | |
| 3279 o.urlEscapeLevels = 42; | |
| 3280 } | |
| 3281 buildCounterEventTag--; | |
| 3282 return o; | |
| 3283 } | |
| 3284 | |
| 3285 checkEventTag(api.EventTag o) { | |
| 3286 buildCounterEventTag++; | |
| 3287 if (buildCounterEventTag < 3) { | |
| 3288 unittest.expect(o.accountId, unittest.equals('foo')); | |
| 3289 unittest.expect(o.advertiserId, unittest.equals('foo')); | |
| 3290 checkDimensionValue(o.advertiserIdDimensionValue); | |
| 3291 unittest.expect(o.campaignId, unittest.equals('foo')); | |
| 3292 checkDimensionValue(o.campaignIdDimensionValue); | |
| 3293 unittest.expect(o.enabledByDefault, unittest.isTrue); | |
| 3294 unittest.expect(o.excludeFromAdxRequests, unittest.isTrue); | |
| 3295 unittest.expect(o.id, unittest.equals('foo')); | |
| 3296 unittest.expect(o.kind, unittest.equals('foo')); | |
| 3297 unittest.expect(o.name, unittest.equals('foo')); | |
| 3298 unittest.expect(o.siteFilterType, unittest.equals('foo')); | |
| 3299 checkUnnamed265(o.siteIds); | |
| 3300 unittest.expect(o.sslCompliant, unittest.isTrue); | |
| 3301 unittest.expect(o.status, unittest.equals('foo')); | |
| 3302 unittest.expect(o.subaccountId, unittest.equals('foo')); | |
| 3303 unittest.expect(o.type, unittest.equals('foo')); | |
| 3304 unittest.expect(o.url, unittest.equals('foo')); | |
| 3305 unittest.expect(o.urlEscapeLevels, unittest.equals(42)); | |
| 3306 } | |
| 3307 buildCounterEventTag--; | |
| 3308 } | |
| 3309 | |
| 3310 core.int buildCounterEventTagOverride = 0; | |
| 3311 buildEventTagOverride() { | |
| 3312 var o = new api.EventTagOverride(); | |
| 3313 buildCounterEventTagOverride++; | |
| 3314 if (buildCounterEventTagOverride < 3) { | |
| 3315 o.enabled = true; | |
| 3316 o.id = "foo"; | |
| 3317 } | |
| 3318 buildCounterEventTagOverride--; | |
| 3319 return o; | |
| 3320 } | |
| 3321 | |
| 3322 checkEventTagOverride(api.EventTagOverride o) { | |
| 3323 buildCounterEventTagOverride++; | |
| 3324 if (buildCounterEventTagOverride < 3) { | |
| 3325 unittest.expect(o.enabled, unittest.isTrue); | |
| 3326 unittest.expect(o.id, unittest.equals('foo')); | |
| 3327 } | |
| 3328 buildCounterEventTagOverride--; | |
| 3329 } | |
| 3330 | |
| 3331 buildUnnamed266() { | |
| 3332 var o = new core.List<api.EventTag>(); | |
| 3333 o.add(buildEventTag()); | |
| 3334 o.add(buildEventTag()); | |
| 3335 return o; | |
| 3336 } | |
| 3337 | |
| 3338 checkUnnamed266(core.List<api.EventTag> o) { | |
| 3339 unittest.expect(o, unittest.hasLength(2)); | |
| 3340 checkEventTag(o[0]); | |
| 3341 checkEventTag(o[1]); | |
| 3342 } | |
| 3343 | |
| 3344 core.int buildCounterEventTagsListResponse = 0; | |
| 3345 buildEventTagsListResponse() { | |
| 3346 var o = new api.EventTagsListResponse(); | |
| 3347 buildCounterEventTagsListResponse++; | |
| 3348 if (buildCounterEventTagsListResponse < 3) { | |
| 3349 o.eventTags = buildUnnamed266(); | |
| 3350 o.kind = "foo"; | |
| 3351 } | |
| 3352 buildCounterEventTagsListResponse--; | |
| 3353 return o; | |
| 3354 } | |
| 3355 | |
| 3356 checkEventTagsListResponse(api.EventTagsListResponse o) { | |
| 3357 buildCounterEventTagsListResponse++; | |
| 3358 if (buildCounterEventTagsListResponse < 3) { | |
| 3359 checkUnnamed266(o.eventTags); | |
| 3360 unittest.expect(o.kind, unittest.equals('foo')); | |
| 3361 } | |
| 3362 buildCounterEventTagsListResponse--; | |
| 3363 } | |
| 3364 | |
| 3365 core.int buildCounterFileUrls = 0; | |
| 3366 buildFileUrls() { | |
| 3367 var o = new api.FileUrls(); | |
| 3368 buildCounterFileUrls++; | |
| 3369 if (buildCounterFileUrls < 3) { | |
| 3370 o.apiUrl = "foo"; | |
| 3371 o.browserUrl = "foo"; | |
| 3372 } | |
| 3373 buildCounterFileUrls--; | |
| 3374 return o; | |
| 3375 } | |
| 3376 | |
| 3377 checkFileUrls(api.FileUrls o) { | |
| 3378 buildCounterFileUrls++; | |
| 3379 if (buildCounterFileUrls < 3) { | |
| 3380 unittest.expect(o.apiUrl, unittest.equals('foo')); | |
| 3381 unittest.expect(o.browserUrl, unittest.equals('foo')); | |
| 3382 } | |
| 3383 buildCounterFileUrls--; | |
| 3384 } | |
| 3385 | |
| 3386 core.int buildCounterFile = 0; | |
| 3387 buildFile() { | |
| 3388 var o = new api.File(); | |
| 3389 buildCounterFile++; | |
| 3390 if (buildCounterFile < 3) { | |
| 3391 o.dateRange = buildDateRange(); | |
| 3392 o.etag = "foo"; | |
| 3393 o.fileName = "foo"; | |
| 3394 o.format = "foo"; | |
| 3395 o.id = "foo"; | |
| 3396 o.kind = "foo"; | |
| 3397 o.lastModifiedTime = "foo"; | |
| 3398 o.reportId = "foo"; | |
| 3399 o.status = "foo"; | |
| 3400 o.urls = buildFileUrls(); | |
| 3401 } | |
| 3402 buildCounterFile--; | |
| 3403 return o; | |
| 3404 } | |
| 3405 | |
| 3406 checkFile(api.File o) { | |
| 3407 buildCounterFile++; | |
| 3408 if (buildCounterFile < 3) { | |
| 3409 checkDateRange(o.dateRange); | |
| 3410 unittest.expect(o.etag, unittest.equals('foo')); | |
| 3411 unittest.expect(o.fileName, unittest.equals('foo')); | |
| 3412 unittest.expect(o.format, unittest.equals('foo')); | |
| 3413 unittest.expect(o.id, unittest.equals('foo')); | |
| 3414 unittest.expect(o.kind, unittest.equals('foo')); | |
| 3415 unittest.expect(o.lastModifiedTime, unittest.equals('foo')); | |
| 3416 unittest.expect(o.reportId, unittest.equals('foo')); | |
| 3417 unittest.expect(o.status, unittest.equals('foo')); | |
| 3418 checkFileUrls(o.urls); | |
| 3419 } | |
| 3420 buildCounterFile--; | |
| 3421 } | |
| 3422 | |
| 3423 buildUnnamed267() { | |
| 3424 var o = new core.List<api.File>(); | |
| 3425 o.add(buildFile()); | |
| 3426 o.add(buildFile()); | |
| 3427 return o; | |
| 3428 } | |
| 3429 | |
| 3430 checkUnnamed267(core.List<api.File> o) { | |
| 3431 unittest.expect(o, unittest.hasLength(2)); | |
| 3432 checkFile(o[0]); | |
| 3433 checkFile(o[1]); | |
| 3434 } | |
| 3435 | |
| 3436 core.int buildCounterFileList = 0; | |
| 3437 buildFileList() { | |
| 3438 var o = new api.FileList(); | |
| 3439 buildCounterFileList++; | |
| 3440 if (buildCounterFileList < 3) { | |
| 3441 o.etag = "foo"; | |
| 3442 o.items = buildUnnamed267(); | |
| 3443 o.kind = "foo"; | |
| 3444 o.nextPageToken = "foo"; | |
| 3445 } | |
| 3446 buildCounterFileList--; | |
| 3447 return o; | |
| 3448 } | |
| 3449 | |
| 3450 checkFileList(api.FileList o) { | |
| 3451 buildCounterFileList++; | |
| 3452 if (buildCounterFileList < 3) { | |
| 3453 unittest.expect(o.etag, unittest.equals('foo')); | |
| 3454 checkUnnamed267(o.items); | |
| 3455 unittest.expect(o.kind, unittest.equals('foo')); | |
| 3456 unittest.expect(o.nextPageToken, unittest.equals('foo')); | |
| 3457 } | |
| 3458 buildCounterFileList--; | |
| 3459 } | |
| 3460 | |
| 3461 core.int buildCounterFlight = 0; | |
| 3462 buildFlight() { | |
| 3463 var o = new api.Flight(); | |
| 3464 buildCounterFlight++; | |
| 3465 if (buildCounterFlight < 3) { | |
| 3466 o.endDate = core.DateTime.parse("2002-02-27T14:01:02Z"); | |
| 3467 o.rateOrCost = "foo"; | |
| 3468 o.startDate = core.DateTime.parse("2002-02-27T14:01:02Z"); | |
| 3469 o.units = "foo"; | |
| 3470 } | |
| 3471 buildCounterFlight--; | |
| 3472 return o; | |
| 3473 } | |
| 3474 | |
| 3475 checkFlight(api.Flight o) { | |
| 3476 buildCounterFlight++; | |
| 3477 if (buildCounterFlight < 3) { | |
| 3478 unittest.expect(o.endDate, unittest.equals(core.DateTime.parse("2002-02-27T0
0:00:00"))); | |
| 3479 unittest.expect(o.rateOrCost, unittest.equals('foo')); | |
| 3480 unittest.expect(o.startDate, unittest.equals(core.DateTime.parse("2002-02-27
T00:00:00"))); | |
| 3481 unittest.expect(o.units, unittest.equals('foo')); | |
| 3482 } | |
| 3483 buildCounterFlight--; | |
| 3484 } | |
| 3485 | |
| 3486 core.int buildCounterFloodlightActivitiesGenerateTagResponse = 0; | |
| 3487 buildFloodlightActivitiesGenerateTagResponse() { | |
| 3488 var o = new api.FloodlightActivitiesGenerateTagResponse(); | |
| 3489 buildCounterFloodlightActivitiesGenerateTagResponse++; | |
| 3490 if (buildCounterFloodlightActivitiesGenerateTagResponse < 3) { | |
| 3491 o.floodlightActivityTag = "foo"; | |
| 3492 o.kind = "foo"; | |
| 3493 } | |
| 3494 buildCounterFloodlightActivitiesGenerateTagResponse--; | |
| 3495 return o; | |
| 3496 } | |
| 3497 | |
| 3498 checkFloodlightActivitiesGenerateTagResponse(api.FloodlightActivitiesGenerateTag
Response o) { | |
| 3499 buildCounterFloodlightActivitiesGenerateTagResponse++; | |
| 3500 if (buildCounterFloodlightActivitiesGenerateTagResponse < 3) { | |
| 3501 unittest.expect(o.floodlightActivityTag, unittest.equals('foo')); | |
| 3502 unittest.expect(o.kind, unittest.equals('foo')); | |
| 3503 } | |
| 3504 buildCounterFloodlightActivitiesGenerateTagResponse--; | |
| 3505 } | |
| 3506 | |
| 3507 buildUnnamed268() { | |
| 3508 var o = new core.List<api.FloodlightActivity>(); | |
| 3509 o.add(buildFloodlightActivity()); | |
| 3510 o.add(buildFloodlightActivity()); | |
| 3511 return o; | |
| 3512 } | |
| 3513 | |
| 3514 checkUnnamed268(core.List<api.FloodlightActivity> o) { | |
| 3515 unittest.expect(o, unittest.hasLength(2)); | |
| 3516 checkFloodlightActivity(o[0]); | |
| 3517 checkFloodlightActivity(o[1]); | |
| 3518 } | |
| 3519 | |
| 3520 core.int buildCounterFloodlightActivitiesListResponse = 0; | |
| 3521 buildFloodlightActivitiesListResponse() { | |
| 3522 var o = new api.FloodlightActivitiesListResponse(); | |
| 3523 buildCounterFloodlightActivitiesListResponse++; | |
| 3524 if (buildCounterFloodlightActivitiesListResponse < 3) { | |
| 3525 o.floodlightActivities = buildUnnamed268(); | |
| 3526 o.kind = "foo"; | |
| 3527 o.nextPageToken = "foo"; | |
| 3528 } | |
| 3529 buildCounterFloodlightActivitiesListResponse--; | |
| 3530 return o; | |
| 3531 } | |
| 3532 | |
| 3533 checkFloodlightActivitiesListResponse(api.FloodlightActivitiesListResponse o) { | |
| 3534 buildCounterFloodlightActivitiesListResponse++; | |
| 3535 if (buildCounterFloodlightActivitiesListResponse < 3) { | |
| 3536 checkUnnamed268(o.floodlightActivities); | |
| 3537 unittest.expect(o.kind, unittest.equals('foo')); | |
| 3538 unittest.expect(o.nextPageToken, unittest.equals('foo')); | |
| 3539 } | |
| 3540 buildCounterFloodlightActivitiesListResponse--; | |
| 3541 } | |
| 3542 | |
| 3543 buildUnnamed269() { | |
| 3544 var o = new core.List<api.FloodlightActivityDynamicTag>(); | |
| 3545 o.add(buildFloodlightActivityDynamicTag()); | |
| 3546 o.add(buildFloodlightActivityDynamicTag()); | |
| 3547 return o; | |
| 3548 } | |
| 3549 | |
| 3550 checkUnnamed269(core.List<api.FloodlightActivityDynamicTag> o) { | |
| 3551 unittest.expect(o, unittest.hasLength(2)); | |
| 3552 checkFloodlightActivityDynamicTag(o[0]); | |
| 3553 checkFloodlightActivityDynamicTag(o[1]); | |
| 3554 } | |
| 3555 | |
| 3556 buildUnnamed270() { | |
| 3557 var o = new core.List<api.FloodlightActivityPublisherDynamicTag>(); | |
| 3558 o.add(buildFloodlightActivityPublisherDynamicTag()); | |
| 3559 o.add(buildFloodlightActivityPublisherDynamicTag()); | |
| 3560 return o; | |
| 3561 } | |
| 3562 | |
| 3563 checkUnnamed270(core.List<api.FloodlightActivityPublisherDynamicTag> o) { | |
| 3564 unittest.expect(o, unittest.hasLength(2)); | |
| 3565 checkFloodlightActivityPublisherDynamicTag(o[0]); | |
| 3566 checkFloodlightActivityPublisherDynamicTag(o[1]); | |
| 3567 } | |
| 3568 | |
| 3569 buildUnnamed271() { | |
| 3570 var o = new core.List<core.String>(); | |
| 3571 o.add("foo"); | |
| 3572 o.add("foo"); | |
| 3573 return o; | |
| 3574 } | |
| 3575 | |
| 3576 checkUnnamed271(core.List<core.String> o) { | |
| 3577 unittest.expect(o, unittest.hasLength(2)); | |
| 3578 unittest.expect(o[0], unittest.equals('foo')); | |
| 3579 unittest.expect(o[1], unittest.equals('foo')); | |
| 3580 } | |
| 3581 | |
| 3582 core.int buildCounterFloodlightActivity = 0; | |
| 3583 buildFloodlightActivity() { | |
| 3584 var o = new api.FloodlightActivity(); | |
| 3585 buildCounterFloodlightActivity++; | |
| 3586 if (buildCounterFloodlightActivity < 3) { | |
| 3587 o.accountId = "foo"; | |
| 3588 o.advertiserId = "foo"; | |
| 3589 o.advertiserIdDimensionValue = buildDimensionValue(); | |
| 3590 o.cacheBustingType = "foo"; | |
| 3591 o.countingMethod = "foo"; | |
| 3592 o.defaultTags = buildUnnamed269(); | |
| 3593 o.expectedUrl = "foo"; | |
| 3594 o.floodlightActivityGroupId = "foo"; | |
| 3595 o.floodlightActivityGroupName = "foo"; | |
| 3596 o.floodlightActivityGroupTagString = "foo"; | |
| 3597 o.floodlightActivityGroupType = "foo"; | |
| 3598 o.floodlightConfigurationId = "foo"; | |
| 3599 o.floodlightConfigurationIdDimensionValue = buildDimensionValue(); | |
| 3600 o.hidden = true; | |
| 3601 o.id = "foo"; | |
| 3602 o.idDimensionValue = buildDimensionValue(); | |
| 3603 o.imageTagEnabled = true; | |
| 3604 o.kind = "foo"; | |
| 3605 o.name = "foo"; | |
| 3606 o.notes = "foo"; | |
| 3607 o.publisherTags = buildUnnamed270(); | |
| 3608 o.secure = true; | |
| 3609 o.sslCompliant = true; | |
| 3610 o.sslRequired = true; | |
| 3611 o.subaccountId = "foo"; | |
| 3612 o.tagFormat = "foo"; | |
| 3613 o.tagString = "foo"; | |
| 3614 o.userDefinedVariableTypes = buildUnnamed271(); | |
| 3615 } | |
| 3616 buildCounterFloodlightActivity--; | |
| 3617 return o; | |
| 3618 } | |
| 3619 | |
| 3620 checkFloodlightActivity(api.FloodlightActivity o) { | |
| 3621 buildCounterFloodlightActivity++; | |
| 3622 if (buildCounterFloodlightActivity < 3) { | |
| 3623 unittest.expect(o.accountId, unittest.equals('foo')); | |
| 3624 unittest.expect(o.advertiserId, unittest.equals('foo')); | |
| 3625 checkDimensionValue(o.advertiserIdDimensionValue); | |
| 3626 unittest.expect(o.cacheBustingType, unittest.equals('foo')); | |
| 3627 unittest.expect(o.countingMethod, unittest.equals('foo')); | |
| 3628 checkUnnamed269(o.defaultTags); | |
| 3629 unittest.expect(o.expectedUrl, unittest.equals('foo')); | |
| 3630 unittest.expect(o.floodlightActivityGroupId, unittest.equals('foo')); | |
| 3631 unittest.expect(o.floodlightActivityGroupName, unittest.equals('foo')); | |
| 3632 unittest.expect(o.floodlightActivityGroupTagString, unittest.equals('foo')); | |
| 3633 unittest.expect(o.floodlightActivityGroupType, unittest.equals('foo')); | |
| 3634 unittest.expect(o.floodlightConfigurationId, unittest.equals('foo')); | |
| 3635 checkDimensionValue(o.floodlightConfigurationIdDimensionValue); | |
| 3636 unittest.expect(o.hidden, unittest.isTrue); | |
| 3637 unittest.expect(o.id, unittest.equals('foo')); | |
| 3638 checkDimensionValue(o.idDimensionValue); | |
| 3639 unittest.expect(o.imageTagEnabled, unittest.isTrue); | |
| 3640 unittest.expect(o.kind, unittest.equals('foo')); | |
| 3641 unittest.expect(o.name, unittest.equals('foo')); | |
| 3642 unittest.expect(o.notes, unittest.equals('foo')); | |
| 3643 checkUnnamed270(o.publisherTags); | |
| 3644 unittest.expect(o.secure, unittest.isTrue); | |
| 3645 unittest.expect(o.sslCompliant, unittest.isTrue); | |
| 3646 unittest.expect(o.sslRequired, unittest.isTrue); | |
| 3647 unittest.expect(o.subaccountId, unittest.equals('foo')); | |
| 3648 unittest.expect(o.tagFormat, unittest.equals('foo')); | |
| 3649 unittest.expect(o.tagString, unittest.equals('foo')); | |
| 3650 checkUnnamed271(o.userDefinedVariableTypes); | |
| 3651 } | |
| 3652 buildCounterFloodlightActivity--; | |
| 3653 } | |
| 3654 | |
| 3655 core.int buildCounterFloodlightActivityDynamicTag = 0; | |
| 3656 buildFloodlightActivityDynamicTag() { | |
| 3657 var o = new api.FloodlightActivityDynamicTag(); | |
| 3658 buildCounterFloodlightActivityDynamicTag++; | |
| 3659 if (buildCounterFloodlightActivityDynamicTag < 3) { | |
| 3660 o.id = "foo"; | |
| 3661 o.name = "foo"; | |
| 3662 o.tag = "foo"; | |
| 3663 } | |
| 3664 buildCounterFloodlightActivityDynamicTag--; | |
| 3665 return o; | |
| 3666 } | |
| 3667 | |
| 3668 checkFloodlightActivityDynamicTag(api.FloodlightActivityDynamicTag o) { | |
| 3669 buildCounterFloodlightActivityDynamicTag++; | |
| 3670 if (buildCounterFloodlightActivityDynamicTag < 3) { | |
| 3671 unittest.expect(o.id, unittest.equals('foo')); | |
| 3672 unittest.expect(o.name, unittest.equals('foo')); | |
| 3673 unittest.expect(o.tag, unittest.equals('foo')); | |
| 3674 } | |
| 3675 buildCounterFloodlightActivityDynamicTag--; | |
| 3676 } | |
| 3677 | |
| 3678 core.int buildCounterFloodlightActivityGroup = 0; | |
| 3679 buildFloodlightActivityGroup() { | |
| 3680 var o = new api.FloodlightActivityGroup(); | |
| 3681 buildCounterFloodlightActivityGroup++; | |
| 3682 if (buildCounterFloodlightActivityGroup < 3) { | |
| 3683 o.accountId = "foo"; | |
| 3684 o.advertiserId = "foo"; | |
| 3685 o.advertiserIdDimensionValue = buildDimensionValue(); | |
| 3686 o.floodlightConfigurationId = "foo"; | |
| 3687 o.floodlightConfigurationIdDimensionValue = buildDimensionValue(); | |
| 3688 o.id = "foo"; | |
| 3689 o.idDimensionValue = buildDimensionValue(); | |
| 3690 o.kind = "foo"; | |
| 3691 o.name = "foo"; | |
| 3692 o.subaccountId = "foo"; | |
| 3693 o.tagString = "foo"; | |
| 3694 o.type = "foo"; | |
| 3695 } | |
| 3696 buildCounterFloodlightActivityGroup--; | |
| 3697 return o; | |
| 3698 } | |
| 3699 | |
| 3700 checkFloodlightActivityGroup(api.FloodlightActivityGroup o) { | |
| 3701 buildCounterFloodlightActivityGroup++; | |
| 3702 if (buildCounterFloodlightActivityGroup < 3) { | |
| 3703 unittest.expect(o.accountId, unittest.equals('foo')); | |
| 3704 unittest.expect(o.advertiserId, unittest.equals('foo')); | |
| 3705 checkDimensionValue(o.advertiserIdDimensionValue); | |
| 3706 unittest.expect(o.floodlightConfigurationId, unittest.equals('foo')); | |
| 3707 checkDimensionValue(o.floodlightConfigurationIdDimensionValue); | |
| 3708 unittest.expect(o.id, unittest.equals('foo')); | |
| 3709 checkDimensionValue(o.idDimensionValue); | |
| 3710 unittest.expect(o.kind, unittest.equals('foo')); | |
| 3711 unittest.expect(o.name, unittest.equals('foo')); | |
| 3712 unittest.expect(o.subaccountId, unittest.equals('foo')); | |
| 3713 unittest.expect(o.tagString, unittest.equals('foo')); | |
| 3714 unittest.expect(o.type, unittest.equals('foo')); | |
| 3715 } | |
| 3716 buildCounterFloodlightActivityGroup--; | |
| 3717 } | |
| 3718 | |
| 3719 buildUnnamed272() { | |
| 3720 var o = new core.List<api.FloodlightActivityGroup>(); | |
| 3721 o.add(buildFloodlightActivityGroup()); | |
| 3722 o.add(buildFloodlightActivityGroup()); | |
| 3723 return o; | |
| 3724 } | |
| 3725 | |
| 3726 checkUnnamed272(core.List<api.FloodlightActivityGroup> o) { | |
| 3727 unittest.expect(o, unittest.hasLength(2)); | |
| 3728 checkFloodlightActivityGroup(o[0]); | |
| 3729 checkFloodlightActivityGroup(o[1]); | |
| 3730 } | |
| 3731 | |
| 3732 core.int buildCounterFloodlightActivityGroupsListResponse = 0; | |
| 3733 buildFloodlightActivityGroupsListResponse() { | |
| 3734 var o = new api.FloodlightActivityGroupsListResponse(); | |
| 3735 buildCounterFloodlightActivityGroupsListResponse++; | |
| 3736 if (buildCounterFloodlightActivityGroupsListResponse < 3) { | |
| 3737 o.floodlightActivityGroups = buildUnnamed272(); | |
| 3738 o.kind = "foo"; | |
| 3739 o.nextPageToken = "foo"; | |
| 3740 } | |
| 3741 buildCounterFloodlightActivityGroupsListResponse--; | |
| 3742 return o; | |
| 3743 } | |
| 3744 | |
| 3745 checkFloodlightActivityGroupsListResponse(api.FloodlightActivityGroupsListRespon
se o) { | |
| 3746 buildCounterFloodlightActivityGroupsListResponse++; | |
| 3747 if (buildCounterFloodlightActivityGroupsListResponse < 3) { | |
| 3748 checkUnnamed272(o.floodlightActivityGroups); | |
| 3749 unittest.expect(o.kind, unittest.equals('foo')); | |
| 3750 unittest.expect(o.nextPageToken, unittest.equals('foo')); | |
| 3751 } | |
| 3752 buildCounterFloodlightActivityGroupsListResponse--; | |
| 3753 } | |
| 3754 | |
| 3755 core.int buildCounterFloodlightActivityPublisherDynamicTag = 0; | |
| 3756 buildFloodlightActivityPublisherDynamicTag() { | |
| 3757 var o = new api.FloodlightActivityPublisherDynamicTag(); | |
| 3758 buildCounterFloodlightActivityPublisherDynamicTag++; | |
| 3759 if (buildCounterFloodlightActivityPublisherDynamicTag < 3) { | |
| 3760 o.clickThrough = true; | |
| 3761 o.directorySiteId = "foo"; | |
| 3762 o.dynamicTag = buildFloodlightActivityDynamicTag(); | |
| 3763 o.siteId = "foo"; | |
| 3764 o.siteIdDimensionValue = buildDimensionValue(); | |
| 3765 o.viewThrough = true; | |
| 3766 } | |
| 3767 buildCounterFloodlightActivityPublisherDynamicTag--; | |
| 3768 return o; | |
| 3769 } | |
| 3770 | |
| 3771 checkFloodlightActivityPublisherDynamicTag(api.FloodlightActivityPublisherDynami
cTag o) { | |
| 3772 buildCounterFloodlightActivityPublisherDynamicTag++; | |
| 3773 if (buildCounterFloodlightActivityPublisherDynamicTag < 3) { | |
| 3774 unittest.expect(o.clickThrough, unittest.isTrue); | |
| 3775 unittest.expect(o.directorySiteId, unittest.equals('foo')); | |
| 3776 checkFloodlightActivityDynamicTag(o.dynamicTag); | |
| 3777 unittest.expect(o.siteId, unittest.equals('foo')); | |
| 3778 checkDimensionValue(o.siteIdDimensionValue); | |
| 3779 unittest.expect(o.viewThrough, unittest.isTrue); | |
| 3780 } | |
| 3781 buildCounterFloodlightActivityPublisherDynamicTag--; | |
| 3782 } | |
| 3783 | |
| 3784 buildUnnamed273() { | |
| 3785 var o = new core.List<core.String>(); | |
| 3786 o.add("foo"); | |
| 3787 o.add("foo"); | |
| 3788 return o; | |
| 3789 } | |
| 3790 | |
| 3791 checkUnnamed273(core.List<core.String> o) { | |
| 3792 unittest.expect(o, unittest.hasLength(2)); | |
| 3793 unittest.expect(o[0], unittest.equals('foo')); | |
| 3794 unittest.expect(o[1], unittest.equals('foo')); | |
| 3795 } | |
| 3796 | |
| 3797 buildUnnamed274() { | |
| 3798 var o = new core.List<api.ThirdPartyAuthenticationToken>(); | |
| 3799 o.add(buildThirdPartyAuthenticationToken()); | |
| 3800 o.add(buildThirdPartyAuthenticationToken()); | |
| 3801 return o; | |
| 3802 } | |
| 3803 | |
| 3804 checkUnnamed274(core.List<api.ThirdPartyAuthenticationToken> o) { | |
| 3805 unittest.expect(o, unittest.hasLength(2)); | |
| 3806 checkThirdPartyAuthenticationToken(o[0]); | |
| 3807 checkThirdPartyAuthenticationToken(o[1]); | |
| 3808 } | |
| 3809 | |
| 3810 buildUnnamed275() { | |
| 3811 var o = new core.List<api.UserDefinedVariableConfiguration>(); | |
| 3812 o.add(buildUserDefinedVariableConfiguration()); | |
| 3813 o.add(buildUserDefinedVariableConfiguration()); | |
| 3814 return o; | |
| 3815 } | |
| 3816 | |
| 3817 checkUnnamed275(core.List<api.UserDefinedVariableConfiguration> o) { | |
| 3818 unittest.expect(o, unittest.hasLength(2)); | |
| 3819 checkUserDefinedVariableConfiguration(o[0]); | |
| 3820 checkUserDefinedVariableConfiguration(o[1]); | |
| 3821 } | |
| 3822 | |
| 3823 core.int buildCounterFloodlightConfiguration = 0; | |
| 3824 buildFloodlightConfiguration() { | |
| 3825 var o = new api.FloodlightConfiguration(); | |
| 3826 buildCounterFloodlightConfiguration++; | |
| 3827 if (buildCounterFloodlightConfiguration < 3) { | |
| 3828 o.accountId = "foo"; | |
| 3829 o.advertiserId = "foo"; | |
| 3830 o.advertiserIdDimensionValue = buildDimensionValue(); | |
| 3831 o.analyticsDataSharingEnabled = true; | |
| 3832 o.exposureToConversionEnabled = true; | |
| 3833 o.firstDayOfWeek = "foo"; | |
| 3834 o.id = "foo"; | |
| 3835 o.idDimensionValue = buildDimensionValue(); | |
| 3836 o.inAppAttributionTrackingEnabled = true; | |
| 3837 o.kind = "foo"; | |
| 3838 o.lookbackConfiguration = buildLookbackConfiguration(); | |
| 3839 o.naturalSearchConversionAttributionOption = "foo"; | |
| 3840 o.omnitureSettings = buildOmnitureSettings(); | |
| 3841 o.standardVariableTypes = buildUnnamed273(); | |
| 3842 o.subaccountId = "foo"; | |
| 3843 o.tagSettings = buildTagSettings(); | |
| 3844 o.thirdPartyAuthenticationTokens = buildUnnamed274(); | |
| 3845 o.userDefinedVariableConfigurations = buildUnnamed275(); | |
| 3846 } | |
| 3847 buildCounterFloodlightConfiguration--; | |
| 3848 return o; | |
| 3849 } | |
| 3850 | |
| 3851 checkFloodlightConfiguration(api.FloodlightConfiguration o) { | |
| 3852 buildCounterFloodlightConfiguration++; | |
| 3853 if (buildCounterFloodlightConfiguration < 3) { | |
| 3854 unittest.expect(o.accountId, unittest.equals('foo')); | |
| 3855 unittest.expect(o.advertiserId, unittest.equals('foo')); | |
| 3856 checkDimensionValue(o.advertiserIdDimensionValue); | |
| 3857 unittest.expect(o.analyticsDataSharingEnabled, unittest.isTrue); | |
| 3858 unittest.expect(o.exposureToConversionEnabled, unittest.isTrue); | |
| 3859 unittest.expect(o.firstDayOfWeek, unittest.equals('foo')); | |
| 3860 unittest.expect(o.id, unittest.equals('foo')); | |
| 3861 checkDimensionValue(o.idDimensionValue); | |
| 3862 unittest.expect(o.inAppAttributionTrackingEnabled, unittest.isTrue); | |
| 3863 unittest.expect(o.kind, unittest.equals('foo')); | |
| 3864 checkLookbackConfiguration(o.lookbackConfiguration); | |
| 3865 unittest.expect(o.naturalSearchConversionAttributionOption, unittest.equals(
'foo')); | |
| 3866 checkOmnitureSettings(o.omnitureSettings); | |
| 3867 checkUnnamed273(o.standardVariableTypes); | |
| 3868 unittest.expect(o.subaccountId, unittest.equals('foo')); | |
| 3869 checkTagSettings(o.tagSettings); | |
| 3870 checkUnnamed274(o.thirdPartyAuthenticationTokens); | |
| 3871 checkUnnamed275(o.userDefinedVariableConfigurations); | |
| 3872 } | |
| 3873 buildCounterFloodlightConfiguration--; | |
| 3874 } | |
| 3875 | |
| 3876 buildUnnamed276() { | |
| 3877 var o = new core.List<api.FloodlightConfiguration>(); | |
| 3878 o.add(buildFloodlightConfiguration()); | |
| 3879 o.add(buildFloodlightConfiguration()); | |
| 3880 return o; | |
| 3881 } | |
| 3882 | |
| 3883 checkUnnamed276(core.List<api.FloodlightConfiguration> o) { | |
| 3884 unittest.expect(o, unittest.hasLength(2)); | |
| 3885 checkFloodlightConfiguration(o[0]); | |
| 3886 checkFloodlightConfiguration(o[1]); | |
| 3887 } | |
| 3888 | |
| 3889 core.int buildCounterFloodlightConfigurationsListResponse = 0; | |
| 3890 buildFloodlightConfigurationsListResponse() { | |
| 3891 var o = new api.FloodlightConfigurationsListResponse(); | |
| 3892 buildCounterFloodlightConfigurationsListResponse++; | |
| 3893 if (buildCounterFloodlightConfigurationsListResponse < 3) { | |
| 3894 o.floodlightConfigurations = buildUnnamed276(); | |
| 3895 o.kind = "foo"; | |
| 3896 } | |
| 3897 buildCounterFloodlightConfigurationsListResponse--; | |
| 3898 return o; | |
| 3899 } | |
| 3900 | |
| 3901 checkFloodlightConfigurationsListResponse(api.FloodlightConfigurationsListRespon
se o) { | |
| 3902 buildCounterFloodlightConfigurationsListResponse++; | |
| 3903 if (buildCounterFloodlightConfigurationsListResponse < 3) { | |
| 3904 checkUnnamed276(o.floodlightConfigurations); | |
| 3905 unittest.expect(o.kind, unittest.equals('foo')); | |
| 3906 } | |
| 3907 buildCounterFloodlightConfigurationsListResponse--; | |
| 3908 } | |
| 3909 | |
| 3910 buildUnnamed277() { | |
| 3911 var o = new core.List<api.Dimension>(); | |
| 3912 o.add(buildDimension()); | |
| 3913 o.add(buildDimension()); | |
| 3914 return o; | |
| 3915 } | |
| 3916 | |
| 3917 checkUnnamed277(core.List<api.Dimension> o) { | |
| 3918 unittest.expect(o, unittest.hasLength(2)); | |
| 3919 checkDimension(o[0]); | |
| 3920 checkDimension(o[1]); | |
| 3921 } | |
| 3922 | |
| 3923 buildUnnamed278() { | |
| 3924 var o = new core.List<api.Dimension>(); | |
| 3925 o.add(buildDimension()); | |
| 3926 o.add(buildDimension()); | |
| 3927 return o; | |
| 3928 } | |
| 3929 | |
| 3930 checkUnnamed278(core.List<api.Dimension> o) { | |
| 3931 unittest.expect(o, unittest.hasLength(2)); | |
| 3932 checkDimension(o[0]); | |
| 3933 checkDimension(o[1]); | |
| 3934 } | |
| 3935 | |
| 3936 buildUnnamed279() { | |
| 3937 var o = new core.List<api.Metric>(); | |
| 3938 o.add(buildMetric()); | |
| 3939 o.add(buildMetric()); | |
| 3940 return o; | |
| 3941 } | |
| 3942 | |
| 3943 checkUnnamed279(core.List<api.Metric> o) { | |
| 3944 unittest.expect(o, unittest.hasLength(2)); | |
| 3945 checkMetric(o[0]); | |
| 3946 checkMetric(o[1]); | |
| 3947 } | |
| 3948 | |
| 3949 core.int buildCounterFloodlightReportCompatibleFields = 0; | |
| 3950 buildFloodlightReportCompatibleFields() { | |
| 3951 var o = new api.FloodlightReportCompatibleFields(); | |
| 3952 buildCounterFloodlightReportCompatibleFields++; | |
| 3953 if (buildCounterFloodlightReportCompatibleFields < 3) { | |
| 3954 o.dimensionFilters = buildUnnamed277(); | |
| 3955 o.dimensions = buildUnnamed278(); | |
| 3956 o.kind = "foo"; | |
| 3957 o.metrics = buildUnnamed279(); | |
| 3958 } | |
| 3959 buildCounterFloodlightReportCompatibleFields--; | |
| 3960 return o; | |
| 3961 } | |
| 3962 | |
| 3963 checkFloodlightReportCompatibleFields(api.FloodlightReportCompatibleFields o) { | |
| 3964 buildCounterFloodlightReportCompatibleFields++; | |
| 3965 if (buildCounterFloodlightReportCompatibleFields < 3) { | |
| 3966 checkUnnamed277(o.dimensionFilters); | |
| 3967 checkUnnamed278(o.dimensions); | |
| 3968 unittest.expect(o.kind, unittest.equals('foo')); | |
| 3969 checkUnnamed279(o.metrics); | |
| 3970 } | |
| 3971 buildCounterFloodlightReportCompatibleFields--; | |
| 3972 } | |
| 3973 | |
| 3974 core.int buildCounterFrequencyCap = 0; | |
| 3975 buildFrequencyCap() { | |
| 3976 var o = new api.FrequencyCap(); | |
| 3977 buildCounterFrequencyCap++; | |
| 3978 if (buildCounterFrequencyCap < 3) { | |
| 3979 o.duration = "foo"; | |
| 3980 o.impressions = "foo"; | |
| 3981 } | |
| 3982 buildCounterFrequencyCap--; | |
| 3983 return o; | |
| 3984 } | |
| 3985 | |
| 3986 checkFrequencyCap(api.FrequencyCap o) { | |
| 3987 buildCounterFrequencyCap++; | |
| 3988 if (buildCounterFrequencyCap < 3) { | |
| 3989 unittest.expect(o.duration, unittest.equals('foo')); | |
| 3990 unittest.expect(o.impressions, unittest.equals('foo')); | |
| 3991 } | |
| 3992 buildCounterFrequencyCap--; | |
| 3993 } | |
| 3994 | |
| 3995 core.int buildCounterFsCommand = 0; | |
| 3996 buildFsCommand() { | |
| 3997 var o = new api.FsCommand(); | |
| 3998 buildCounterFsCommand++; | |
| 3999 if (buildCounterFsCommand < 3) { | |
| 4000 o.left = 42; | |
| 4001 o.positionOption = "foo"; | |
| 4002 o.top = 42; | |
| 4003 o.windowHeight = 42; | |
| 4004 o.windowWidth = 42; | |
| 4005 } | |
| 4006 buildCounterFsCommand--; | |
| 4007 return o; | |
| 4008 } | |
| 4009 | |
| 4010 checkFsCommand(api.FsCommand o) { | |
| 4011 buildCounterFsCommand++; | |
| 4012 if (buildCounterFsCommand < 3) { | |
| 4013 unittest.expect(o.left, unittest.equals(42)); | |
| 4014 unittest.expect(o.positionOption, unittest.equals('foo')); | |
| 4015 unittest.expect(o.top, unittest.equals(42)); | |
| 4016 unittest.expect(o.windowHeight, unittest.equals(42)); | |
| 4017 unittest.expect(o.windowWidth, unittest.equals(42)); | |
| 4018 } | |
| 4019 buildCounterFsCommand--; | |
| 4020 } | |
| 4021 | |
| 4022 buildUnnamed280() { | |
| 4023 var o = new core.List<api.City>(); | |
| 4024 o.add(buildCity()); | |
| 4025 o.add(buildCity()); | |
| 4026 return o; | |
| 4027 } | |
| 4028 | |
| 4029 checkUnnamed280(core.List<api.City> o) { | |
| 4030 unittest.expect(o, unittest.hasLength(2)); | |
| 4031 checkCity(o[0]); | |
| 4032 checkCity(o[1]); | |
| 4033 } | |
| 4034 | |
| 4035 buildUnnamed281() { | |
| 4036 var o = new core.List<api.Country>(); | |
| 4037 o.add(buildCountry()); | |
| 4038 o.add(buildCountry()); | |
| 4039 return o; | |
| 4040 } | |
| 4041 | |
| 4042 checkUnnamed281(core.List<api.Country> o) { | |
| 4043 unittest.expect(o, unittest.hasLength(2)); | |
| 4044 checkCountry(o[0]); | |
| 4045 checkCountry(o[1]); | |
| 4046 } | |
| 4047 | |
| 4048 buildUnnamed282() { | |
| 4049 var o = new core.List<api.Metro>(); | |
| 4050 o.add(buildMetro()); | |
| 4051 o.add(buildMetro()); | |
| 4052 return o; | |
| 4053 } | |
| 4054 | |
| 4055 checkUnnamed282(core.List<api.Metro> o) { | |
| 4056 unittest.expect(o, unittest.hasLength(2)); | |
| 4057 checkMetro(o[0]); | |
| 4058 checkMetro(o[1]); | |
| 4059 } | |
| 4060 | |
| 4061 buildUnnamed283() { | |
| 4062 var o = new core.List<api.PostalCode>(); | |
| 4063 o.add(buildPostalCode()); | |
| 4064 o.add(buildPostalCode()); | |
| 4065 return o; | |
| 4066 } | |
| 4067 | |
| 4068 checkUnnamed283(core.List<api.PostalCode> o) { | |
| 4069 unittest.expect(o, unittest.hasLength(2)); | |
| 4070 checkPostalCode(o[0]); | |
| 4071 checkPostalCode(o[1]); | |
| 4072 } | |
| 4073 | |
| 4074 buildUnnamed284() { | |
| 4075 var o = new core.List<api.Region>(); | |
| 4076 o.add(buildRegion()); | |
| 4077 o.add(buildRegion()); | |
| 4078 return o; | |
| 4079 } | |
| 4080 | |
| 4081 checkUnnamed284(core.List<api.Region> o) { | |
| 4082 unittest.expect(o, unittest.hasLength(2)); | |
| 4083 checkRegion(o[0]); | |
| 4084 checkRegion(o[1]); | |
| 4085 } | |
| 4086 | |
| 4087 core.int buildCounterGeoTargeting = 0; | |
| 4088 buildGeoTargeting() { | |
| 4089 var o = new api.GeoTargeting(); | |
| 4090 buildCounterGeoTargeting++; | |
| 4091 if (buildCounterGeoTargeting < 3) { | |
| 4092 o.cities = buildUnnamed280(); | |
| 4093 o.countries = buildUnnamed281(); | |
| 4094 o.excludeCountries = true; | |
| 4095 o.metros = buildUnnamed282(); | |
| 4096 o.postalCodes = buildUnnamed283(); | |
| 4097 o.regions = buildUnnamed284(); | |
| 4098 } | |
| 4099 buildCounterGeoTargeting--; | |
| 4100 return o; | |
| 4101 } | |
| 4102 | |
| 4103 checkGeoTargeting(api.GeoTargeting o) { | |
| 4104 buildCounterGeoTargeting++; | |
| 4105 if (buildCounterGeoTargeting < 3) { | |
| 4106 checkUnnamed280(o.cities); | |
| 4107 checkUnnamed281(o.countries); | |
| 4108 unittest.expect(o.excludeCountries, unittest.isTrue); | |
| 4109 checkUnnamed282(o.metros); | |
| 4110 checkUnnamed283(o.postalCodes); | |
| 4111 checkUnnamed284(o.regions); | |
| 4112 } | |
| 4113 buildCounterGeoTargeting--; | |
| 4114 } | |
| 4115 | |
| 4116 buildUnnamed285() { | |
| 4117 var o = new core.List<api.AdSlot>(); | |
| 4118 o.add(buildAdSlot()); | |
| 4119 o.add(buildAdSlot()); | |
| 4120 return o; | |
| 4121 } | |
| 4122 | |
| 4123 checkUnnamed285(core.List<api.AdSlot> o) { | |
| 4124 unittest.expect(o, unittest.hasLength(2)); | |
| 4125 checkAdSlot(o[0]); | |
| 4126 checkAdSlot(o[1]); | |
| 4127 } | |
| 4128 | |
| 4129 core.int buildCounterInventoryItem = 0; | |
| 4130 buildInventoryItem() { | |
| 4131 var o = new api.InventoryItem(); | |
| 4132 buildCounterInventoryItem++; | |
| 4133 if (buildCounterInventoryItem < 3) { | |
| 4134 o.accountId = "foo"; | |
| 4135 o.adSlots = buildUnnamed285(); | |
| 4136 o.advertiserId = "foo"; | |
| 4137 o.contentCategoryId = "foo"; | |
| 4138 o.estimatedClickThroughRate = "foo"; | |
| 4139 o.estimatedConversionRate = "foo"; | |
| 4140 o.id = "foo"; | |
| 4141 o.inPlan = true; | |
| 4142 o.kind = "foo"; | |
| 4143 o.lastModifiedInfo = buildLastModifiedInfo(); | |
| 4144 o.name = "foo"; | |
| 4145 o.negotiationChannelId = "foo"; | |
| 4146 o.orderId = "foo"; | |
| 4147 o.placementStrategyId = "foo"; | |
| 4148 o.pricing = buildPricing(); | |
| 4149 o.projectId = "foo"; | |
| 4150 o.rfpId = "foo"; | |
| 4151 o.siteId = "foo"; | |
| 4152 o.subaccountId = "foo"; | |
| 4153 o.type = "foo"; | |
| 4154 } | |
| 4155 buildCounterInventoryItem--; | |
| 4156 return o; | |
| 4157 } | |
| 4158 | |
| 4159 checkInventoryItem(api.InventoryItem o) { | |
| 4160 buildCounterInventoryItem++; | |
| 4161 if (buildCounterInventoryItem < 3) { | |
| 4162 unittest.expect(o.accountId, unittest.equals('foo')); | |
| 4163 checkUnnamed285(o.adSlots); | |
| 4164 unittest.expect(o.advertiserId, unittest.equals('foo')); | |
| 4165 unittest.expect(o.contentCategoryId, unittest.equals('foo')); | |
| 4166 unittest.expect(o.estimatedClickThroughRate, unittest.equals('foo')); | |
| 4167 unittest.expect(o.estimatedConversionRate, unittest.equals('foo')); | |
| 4168 unittest.expect(o.id, unittest.equals('foo')); | |
| 4169 unittest.expect(o.inPlan, unittest.isTrue); | |
| 4170 unittest.expect(o.kind, unittest.equals('foo')); | |
| 4171 checkLastModifiedInfo(o.lastModifiedInfo); | |
| 4172 unittest.expect(o.name, unittest.equals('foo')); | |
| 4173 unittest.expect(o.negotiationChannelId, unittest.equals('foo')); | |
| 4174 unittest.expect(o.orderId, unittest.equals('foo')); | |
| 4175 unittest.expect(o.placementStrategyId, unittest.equals('foo')); | |
| 4176 checkPricing(o.pricing); | |
| 4177 unittest.expect(o.projectId, unittest.equals('foo')); | |
| 4178 unittest.expect(o.rfpId, unittest.equals('foo')); | |
| 4179 unittest.expect(o.siteId, unittest.equals('foo')); | |
| 4180 unittest.expect(o.subaccountId, unittest.equals('foo')); | |
| 4181 unittest.expect(o.type, unittest.equals('foo')); | |
| 4182 } | |
| 4183 buildCounterInventoryItem--; | |
| 4184 } | |
| 4185 | |
| 4186 buildUnnamed286() { | |
| 4187 var o = new core.List<api.InventoryItem>(); | |
| 4188 o.add(buildInventoryItem()); | |
| 4189 o.add(buildInventoryItem()); | |
| 4190 return o; | |
| 4191 } | |
| 4192 | |
| 4193 checkUnnamed286(core.List<api.InventoryItem> o) { | |
| 4194 unittest.expect(o, unittest.hasLength(2)); | |
| 4195 checkInventoryItem(o[0]); | |
| 4196 checkInventoryItem(o[1]); | |
| 4197 } | |
| 4198 | |
| 4199 core.int buildCounterInventoryItemsListResponse = 0; | |
| 4200 buildInventoryItemsListResponse() { | |
| 4201 var o = new api.InventoryItemsListResponse(); | |
| 4202 buildCounterInventoryItemsListResponse++; | |
| 4203 if (buildCounterInventoryItemsListResponse < 3) { | |
| 4204 o.inventoryItems = buildUnnamed286(); | |
| 4205 o.kind = "foo"; | |
| 4206 o.nextPageToken = "foo"; | |
| 4207 } | |
| 4208 buildCounterInventoryItemsListResponse--; | |
| 4209 return o; | |
| 4210 } | |
| 4211 | |
| 4212 checkInventoryItemsListResponse(api.InventoryItemsListResponse o) { | |
| 4213 buildCounterInventoryItemsListResponse++; | |
| 4214 if (buildCounterInventoryItemsListResponse < 3) { | |
| 4215 checkUnnamed286(o.inventoryItems); | |
| 4216 unittest.expect(o.kind, unittest.equals('foo')); | |
| 4217 unittest.expect(o.nextPageToken, unittest.equals('foo')); | |
| 4218 } | |
| 4219 buildCounterInventoryItemsListResponse--; | |
| 4220 } | |
| 4221 | |
| 4222 core.int buildCounterKeyValueTargetingExpression = 0; | |
| 4223 buildKeyValueTargetingExpression() { | |
| 4224 var o = new api.KeyValueTargetingExpression(); | |
| 4225 buildCounterKeyValueTargetingExpression++; | |
| 4226 if (buildCounterKeyValueTargetingExpression < 3) { | |
| 4227 o.expression = "foo"; | |
| 4228 } | |
| 4229 buildCounterKeyValueTargetingExpression--; | |
| 4230 return o; | |
| 4231 } | |
| 4232 | |
| 4233 checkKeyValueTargetingExpression(api.KeyValueTargetingExpression o) { | |
| 4234 buildCounterKeyValueTargetingExpression++; | |
| 4235 if (buildCounterKeyValueTargetingExpression < 3) { | |
| 4236 unittest.expect(o.expression, unittest.equals('foo')); | |
| 4237 } | |
| 4238 buildCounterKeyValueTargetingExpression--; | |
| 4239 } | |
| 4240 | |
| 4241 core.int buildCounterLandingPage = 0; | |
| 4242 buildLandingPage() { | |
| 4243 var o = new api.LandingPage(); | |
| 4244 buildCounterLandingPage++; | |
| 4245 if (buildCounterLandingPage < 3) { | |
| 4246 o.default_ = true; | |
| 4247 o.id = "foo"; | |
| 4248 o.kind = "foo"; | |
| 4249 o.name = "foo"; | |
| 4250 o.url = "foo"; | |
| 4251 } | |
| 4252 buildCounterLandingPage--; | |
| 4253 return o; | |
| 4254 } | |
| 4255 | |
| 4256 checkLandingPage(api.LandingPage o) { | |
| 4257 buildCounterLandingPage++; | |
| 4258 if (buildCounterLandingPage < 3) { | |
| 4259 unittest.expect(o.default_, unittest.isTrue); | |
| 4260 unittest.expect(o.id, unittest.equals('foo')); | |
| 4261 unittest.expect(o.kind, unittest.equals('foo')); | |
| 4262 unittest.expect(o.name, unittest.equals('foo')); | |
| 4263 unittest.expect(o.url, unittest.equals('foo')); | |
| 4264 } | |
| 4265 buildCounterLandingPage--; | |
| 4266 } | |
| 4267 | |
| 4268 buildUnnamed287() { | |
| 4269 var o = new core.List<api.LandingPage>(); | |
| 4270 o.add(buildLandingPage()); | |
| 4271 o.add(buildLandingPage()); | |
| 4272 return o; | |
| 4273 } | |
| 4274 | |
| 4275 checkUnnamed287(core.List<api.LandingPage> o) { | |
| 4276 unittest.expect(o, unittest.hasLength(2)); | |
| 4277 checkLandingPage(o[0]); | |
| 4278 checkLandingPage(o[1]); | |
| 4279 } | |
| 4280 | |
| 4281 core.int buildCounterLandingPagesListResponse = 0; | |
| 4282 buildLandingPagesListResponse() { | |
| 4283 var o = new api.LandingPagesListResponse(); | |
| 4284 buildCounterLandingPagesListResponse++; | |
| 4285 if (buildCounterLandingPagesListResponse < 3) { | |
| 4286 o.kind = "foo"; | |
| 4287 o.landingPages = buildUnnamed287(); | |
| 4288 } | |
| 4289 buildCounterLandingPagesListResponse--; | |
| 4290 return o; | |
| 4291 } | |
| 4292 | |
| 4293 checkLandingPagesListResponse(api.LandingPagesListResponse o) { | |
| 4294 buildCounterLandingPagesListResponse++; | |
| 4295 if (buildCounterLandingPagesListResponse < 3) { | |
| 4296 unittest.expect(o.kind, unittest.equals('foo')); | |
| 4297 checkUnnamed287(o.landingPages); | |
| 4298 } | |
| 4299 buildCounterLandingPagesListResponse--; | |
| 4300 } | |
| 4301 | |
| 4302 core.int buildCounterLastModifiedInfo = 0; | |
| 4303 buildLastModifiedInfo() { | |
| 4304 var o = new api.LastModifiedInfo(); | |
| 4305 buildCounterLastModifiedInfo++; | |
| 4306 if (buildCounterLastModifiedInfo < 3) { | |
| 4307 o.time = "foo"; | |
| 4308 } | |
| 4309 buildCounterLastModifiedInfo--; | |
| 4310 return o; | |
| 4311 } | |
| 4312 | |
| 4313 checkLastModifiedInfo(api.LastModifiedInfo o) { | |
| 4314 buildCounterLastModifiedInfo++; | |
| 4315 if (buildCounterLastModifiedInfo < 3) { | |
| 4316 unittest.expect(o.time, unittest.equals('foo')); | |
| 4317 } | |
| 4318 buildCounterLastModifiedInfo--; | |
| 4319 } | |
| 4320 | |
| 4321 buildUnnamed288() { | |
| 4322 var o = new core.List<api.ListPopulationTerm>(); | |
| 4323 o.add(buildListPopulationTerm()); | |
| 4324 o.add(buildListPopulationTerm()); | |
| 4325 return o; | |
| 4326 } | |
| 4327 | |
| 4328 checkUnnamed288(core.List<api.ListPopulationTerm> o) { | |
| 4329 unittest.expect(o, unittest.hasLength(2)); | |
| 4330 checkListPopulationTerm(o[0]); | |
| 4331 checkListPopulationTerm(o[1]); | |
| 4332 } | |
| 4333 | |
| 4334 core.int buildCounterListPopulationClause = 0; | |
| 4335 buildListPopulationClause() { | |
| 4336 var o = new api.ListPopulationClause(); | |
| 4337 buildCounterListPopulationClause++; | |
| 4338 if (buildCounterListPopulationClause < 3) { | |
| 4339 o.terms = buildUnnamed288(); | |
| 4340 } | |
| 4341 buildCounterListPopulationClause--; | |
| 4342 return o; | |
| 4343 } | |
| 4344 | |
| 4345 checkListPopulationClause(api.ListPopulationClause o) { | |
| 4346 buildCounterListPopulationClause++; | |
| 4347 if (buildCounterListPopulationClause < 3) { | |
| 4348 checkUnnamed288(o.terms); | |
| 4349 } | |
| 4350 buildCounterListPopulationClause--; | |
| 4351 } | |
| 4352 | |
| 4353 buildUnnamed289() { | |
| 4354 var o = new core.List<api.ListPopulationClause>(); | |
| 4355 o.add(buildListPopulationClause()); | |
| 4356 o.add(buildListPopulationClause()); | |
| 4357 return o; | |
| 4358 } | |
| 4359 | |
| 4360 checkUnnamed289(core.List<api.ListPopulationClause> o) { | |
| 4361 unittest.expect(o, unittest.hasLength(2)); | |
| 4362 checkListPopulationClause(o[0]); | |
| 4363 checkListPopulationClause(o[1]); | |
| 4364 } | |
| 4365 | |
| 4366 core.int buildCounterListPopulationRule = 0; | |
| 4367 buildListPopulationRule() { | |
| 4368 var o = new api.ListPopulationRule(); | |
| 4369 buildCounterListPopulationRule++; | |
| 4370 if (buildCounterListPopulationRule < 3) { | |
| 4371 o.floodlightActivityId = "foo"; | |
| 4372 o.floodlightActivityName = "foo"; | |
| 4373 o.listPopulationClauses = buildUnnamed289(); | |
| 4374 } | |
| 4375 buildCounterListPopulationRule--; | |
| 4376 return o; | |
| 4377 } | |
| 4378 | |
| 4379 checkListPopulationRule(api.ListPopulationRule o) { | |
| 4380 buildCounterListPopulationRule++; | |
| 4381 if (buildCounterListPopulationRule < 3) { | |
| 4382 unittest.expect(o.floodlightActivityId, unittest.equals('foo')); | |
| 4383 unittest.expect(o.floodlightActivityName, unittest.equals('foo')); | |
| 4384 checkUnnamed289(o.listPopulationClauses); | |
| 4385 } | |
| 4386 buildCounterListPopulationRule--; | |
| 4387 } | |
| 4388 | |
| 4389 core.int buildCounterListPopulationTerm = 0; | |
| 4390 buildListPopulationTerm() { | |
| 4391 var o = new api.ListPopulationTerm(); | |
| 4392 buildCounterListPopulationTerm++; | |
| 4393 if (buildCounterListPopulationTerm < 3) { | |
| 4394 o.contains = true; | |
| 4395 o.negation = true; | |
| 4396 o.operator = "foo"; | |
| 4397 o.remarketingListId = "foo"; | |
| 4398 o.type = "foo"; | |
| 4399 o.value = "foo"; | |
| 4400 o.variableFriendlyName = "foo"; | |
| 4401 o.variableName = "foo"; | |
| 4402 } | |
| 4403 buildCounterListPopulationTerm--; | |
| 4404 return o; | |
| 4405 } | |
| 4406 | |
| 4407 checkListPopulationTerm(api.ListPopulationTerm o) { | |
| 4408 buildCounterListPopulationTerm++; | |
| 4409 if (buildCounterListPopulationTerm < 3) { | |
| 4410 unittest.expect(o.contains, unittest.isTrue); | |
| 4411 unittest.expect(o.negation, unittest.isTrue); | |
| 4412 unittest.expect(o.operator, unittest.equals('foo')); | |
| 4413 unittest.expect(o.remarketingListId, unittest.equals('foo')); | |
| 4414 unittest.expect(o.type, unittest.equals('foo')); | |
| 4415 unittest.expect(o.value, unittest.equals('foo')); | |
| 4416 unittest.expect(o.variableFriendlyName, unittest.equals('foo')); | |
| 4417 unittest.expect(o.variableName, unittest.equals('foo')); | |
| 4418 } | |
| 4419 buildCounterListPopulationTerm--; | |
| 4420 } | |
| 4421 | |
| 4422 core.int buildCounterListTargetingExpression = 0; | |
| 4423 buildListTargetingExpression() { | |
| 4424 var o = new api.ListTargetingExpression(); | |
| 4425 buildCounterListTargetingExpression++; | |
| 4426 if (buildCounterListTargetingExpression < 3) { | |
| 4427 o.expression = "foo"; | |
| 4428 } | |
| 4429 buildCounterListTargetingExpression--; | |
| 4430 return o; | |
| 4431 } | |
| 4432 | |
| 4433 checkListTargetingExpression(api.ListTargetingExpression o) { | |
| 4434 buildCounterListTargetingExpression++; | |
| 4435 if (buildCounterListTargetingExpression < 3) { | |
| 4436 unittest.expect(o.expression, unittest.equals('foo')); | |
| 4437 } | |
| 4438 buildCounterListTargetingExpression--; | |
| 4439 } | |
| 4440 | |
| 4441 core.int buildCounterLookbackConfiguration = 0; | |
| 4442 buildLookbackConfiguration() { | |
| 4443 var o = new api.LookbackConfiguration(); | |
| 4444 buildCounterLookbackConfiguration++; | |
| 4445 if (buildCounterLookbackConfiguration < 3) { | |
| 4446 o.clickDuration = 42; | |
| 4447 o.postImpressionActivitiesDuration = 42; | |
| 4448 } | |
| 4449 buildCounterLookbackConfiguration--; | |
| 4450 return o; | |
| 4451 } | |
| 4452 | |
| 4453 checkLookbackConfiguration(api.LookbackConfiguration o) { | |
| 4454 buildCounterLookbackConfiguration++; | |
| 4455 if (buildCounterLookbackConfiguration < 3) { | |
| 4456 unittest.expect(o.clickDuration, unittest.equals(42)); | |
| 4457 unittest.expect(o.postImpressionActivitiesDuration, unittest.equals(42)); | |
| 4458 } | |
| 4459 buildCounterLookbackConfiguration--; | |
| 4460 } | |
| 4461 | |
| 4462 core.int buildCounterMetric = 0; | |
| 4463 buildMetric() { | |
| 4464 var o = new api.Metric(); | |
| 4465 buildCounterMetric++; | |
| 4466 if (buildCounterMetric < 3) { | |
| 4467 o.kind = "foo"; | |
| 4468 o.name = "foo"; | |
| 4469 } | |
| 4470 buildCounterMetric--; | |
| 4471 return o; | |
| 4472 } | |
| 4473 | |
| 4474 checkMetric(api.Metric o) { | |
| 4475 buildCounterMetric++; | |
| 4476 if (buildCounterMetric < 3) { | |
| 4477 unittest.expect(o.kind, unittest.equals('foo')); | |
| 4478 unittest.expect(o.name, unittest.equals('foo')); | |
| 4479 } | |
| 4480 buildCounterMetric--; | |
| 4481 } | |
| 4482 | |
| 4483 core.int buildCounterMetro = 0; | |
| 4484 buildMetro() { | |
| 4485 var o = new api.Metro(); | |
| 4486 buildCounterMetro++; | |
| 4487 if (buildCounterMetro < 3) { | |
| 4488 o.countryCode = "foo"; | |
| 4489 o.countryDartId = "foo"; | |
| 4490 o.dartId = "foo"; | |
| 4491 o.dmaId = "foo"; | |
| 4492 o.kind = "foo"; | |
| 4493 o.metroCode = "foo"; | |
| 4494 o.name = "foo"; | |
| 4495 } | |
| 4496 buildCounterMetro--; | |
| 4497 return o; | |
| 4498 } | |
| 4499 | |
| 4500 checkMetro(api.Metro o) { | |
| 4501 buildCounterMetro++; | |
| 4502 if (buildCounterMetro < 3) { | |
| 4503 unittest.expect(o.countryCode, unittest.equals('foo')); | |
| 4504 unittest.expect(o.countryDartId, unittest.equals('foo')); | |
| 4505 unittest.expect(o.dartId, unittest.equals('foo')); | |
| 4506 unittest.expect(o.dmaId, unittest.equals('foo')); | |
| 4507 unittest.expect(o.kind, unittest.equals('foo')); | |
| 4508 unittest.expect(o.metroCode, unittest.equals('foo')); | |
| 4509 unittest.expect(o.name, unittest.equals('foo')); | |
| 4510 } | |
| 4511 buildCounterMetro--; | |
| 4512 } | |
| 4513 | |
| 4514 buildUnnamed290() { | |
| 4515 var o = new core.List<api.Metro>(); | |
| 4516 o.add(buildMetro()); | |
| 4517 o.add(buildMetro()); | |
| 4518 return o; | |
| 4519 } | |
| 4520 | |
| 4521 checkUnnamed290(core.List<api.Metro> o) { | |
| 4522 unittest.expect(o, unittest.hasLength(2)); | |
| 4523 checkMetro(o[0]); | |
| 4524 checkMetro(o[1]); | |
| 4525 } | |
| 4526 | |
| 4527 core.int buildCounterMetrosListResponse = 0; | |
| 4528 buildMetrosListResponse() { | |
| 4529 var o = new api.MetrosListResponse(); | |
| 4530 buildCounterMetrosListResponse++; | |
| 4531 if (buildCounterMetrosListResponse < 3) { | |
| 4532 o.kind = "foo"; | |
| 4533 o.metros = buildUnnamed290(); | |
| 4534 } | |
| 4535 buildCounterMetrosListResponse--; | |
| 4536 return o; | |
| 4537 } | |
| 4538 | |
| 4539 checkMetrosListResponse(api.MetrosListResponse o) { | |
| 4540 buildCounterMetrosListResponse++; | |
| 4541 if (buildCounterMetrosListResponse < 3) { | |
| 4542 unittest.expect(o.kind, unittest.equals('foo')); | |
| 4543 checkUnnamed290(o.metros); | |
| 4544 } | |
| 4545 buildCounterMetrosListResponse--; | |
| 4546 } | |
| 4547 | |
| 4548 core.int buildCounterMobileCarrier = 0; | |
| 4549 buildMobileCarrier() { | |
| 4550 var o = new api.MobileCarrier(); | |
| 4551 buildCounterMobileCarrier++; | |
| 4552 if (buildCounterMobileCarrier < 3) { | |
| 4553 o.countryCode = "foo"; | |
| 4554 o.countryDartId = "foo"; | |
| 4555 o.id = "foo"; | |
| 4556 o.kind = "foo"; | |
| 4557 o.name = "foo"; | |
| 4558 } | |
| 4559 buildCounterMobileCarrier--; | |
| 4560 return o; | |
| 4561 } | |
| 4562 | |
| 4563 checkMobileCarrier(api.MobileCarrier o) { | |
| 4564 buildCounterMobileCarrier++; | |
| 4565 if (buildCounterMobileCarrier < 3) { | |
| 4566 unittest.expect(o.countryCode, unittest.equals('foo')); | |
| 4567 unittest.expect(o.countryDartId, unittest.equals('foo')); | |
| 4568 unittest.expect(o.id, unittest.equals('foo')); | |
| 4569 unittest.expect(o.kind, unittest.equals('foo')); | |
| 4570 unittest.expect(o.name, unittest.equals('foo')); | |
| 4571 } | |
| 4572 buildCounterMobileCarrier--; | |
| 4573 } | |
| 4574 | |
| 4575 buildUnnamed291() { | |
| 4576 var o = new core.List<api.MobileCarrier>(); | |
| 4577 o.add(buildMobileCarrier()); | |
| 4578 o.add(buildMobileCarrier()); | |
| 4579 return o; | |
| 4580 } | |
| 4581 | |
| 4582 checkUnnamed291(core.List<api.MobileCarrier> o) { | |
| 4583 unittest.expect(o, unittest.hasLength(2)); | |
| 4584 checkMobileCarrier(o[0]); | |
| 4585 checkMobileCarrier(o[1]); | |
| 4586 } | |
| 4587 | |
| 4588 core.int buildCounterMobileCarriersListResponse = 0; | |
| 4589 buildMobileCarriersListResponse() { | |
| 4590 var o = new api.MobileCarriersListResponse(); | |
| 4591 buildCounterMobileCarriersListResponse++; | |
| 4592 if (buildCounterMobileCarriersListResponse < 3) { | |
| 4593 o.kind = "foo"; | |
| 4594 o.mobileCarriers = buildUnnamed291(); | |
| 4595 } | |
| 4596 buildCounterMobileCarriersListResponse--; | |
| 4597 return o; | |
| 4598 } | |
| 4599 | |
| 4600 checkMobileCarriersListResponse(api.MobileCarriersListResponse o) { | |
| 4601 buildCounterMobileCarriersListResponse++; | |
| 4602 if (buildCounterMobileCarriersListResponse < 3) { | |
| 4603 unittest.expect(o.kind, unittest.equals('foo')); | |
| 4604 checkUnnamed291(o.mobileCarriers); | |
| 4605 } | |
| 4606 buildCounterMobileCarriersListResponse--; | |
| 4607 } | |
| 4608 | |
| 4609 buildUnnamed292() { | |
| 4610 var o = new core.List<core.String>(); | |
| 4611 o.add("foo"); | |
| 4612 o.add("foo"); | |
| 4613 return o; | |
| 4614 } | |
| 4615 | |
| 4616 checkUnnamed292(core.List<core.String> o) { | |
| 4617 unittest.expect(o, unittest.hasLength(2)); | |
| 4618 unittest.expect(o[0], unittest.equals('foo')); | |
| 4619 unittest.expect(o[1], unittest.equals('foo')); | |
| 4620 } | |
| 4621 | |
| 4622 core.int buildCounterObjectFilter = 0; | |
| 4623 buildObjectFilter() { | |
| 4624 var o = new api.ObjectFilter(); | |
| 4625 buildCounterObjectFilter++; | |
| 4626 if (buildCounterObjectFilter < 3) { | |
| 4627 o.kind = "foo"; | |
| 4628 o.objectIds = buildUnnamed292(); | |
| 4629 o.status = "foo"; | |
| 4630 } | |
| 4631 buildCounterObjectFilter--; | |
| 4632 return o; | |
| 4633 } | |
| 4634 | |
| 4635 checkObjectFilter(api.ObjectFilter o) { | |
| 4636 buildCounterObjectFilter++; | |
| 4637 if (buildCounterObjectFilter < 3) { | |
| 4638 unittest.expect(o.kind, unittest.equals('foo')); | |
| 4639 checkUnnamed292(o.objectIds); | |
| 4640 unittest.expect(o.status, unittest.equals('foo')); | |
| 4641 } | |
| 4642 buildCounterObjectFilter--; | |
| 4643 } | |
| 4644 | |
| 4645 core.int buildCounterOffsetPosition = 0; | |
| 4646 buildOffsetPosition() { | |
| 4647 var o = new api.OffsetPosition(); | |
| 4648 buildCounterOffsetPosition++; | |
| 4649 if (buildCounterOffsetPosition < 3) { | |
| 4650 o.left = 42; | |
| 4651 o.top = 42; | |
| 4652 } | |
| 4653 buildCounterOffsetPosition--; | |
| 4654 return o; | |
| 4655 } | |
| 4656 | |
| 4657 checkOffsetPosition(api.OffsetPosition o) { | |
| 4658 buildCounterOffsetPosition++; | |
| 4659 if (buildCounterOffsetPosition < 3) { | |
| 4660 unittest.expect(o.left, unittest.equals(42)); | |
| 4661 unittest.expect(o.top, unittest.equals(42)); | |
| 4662 } | |
| 4663 buildCounterOffsetPosition--; | |
| 4664 } | |
| 4665 | |
| 4666 core.int buildCounterOmnitureSettings = 0; | |
| 4667 buildOmnitureSettings() { | |
| 4668 var o = new api.OmnitureSettings(); | |
| 4669 buildCounterOmnitureSettings++; | |
| 4670 if (buildCounterOmnitureSettings < 3) { | |
| 4671 o.omnitureCostDataEnabled = true; | |
| 4672 o.omnitureIntegrationEnabled = true; | |
| 4673 } | |
| 4674 buildCounterOmnitureSettings--; | |
| 4675 return o; | |
| 4676 } | |
| 4677 | |
| 4678 checkOmnitureSettings(api.OmnitureSettings o) { | |
| 4679 buildCounterOmnitureSettings++; | |
| 4680 if (buildCounterOmnitureSettings < 3) { | |
| 4681 unittest.expect(o.omnitureCostDataEnabled, unittest.isTrue); | |
| 4682 unittest.expect(o.omnitureIntegrationEnabled, unittest.isTrue); | |
| 4683 } | |
| 4684 buildCounterOmnitureSettings--; | |
| 4685 } | |
| 4686 | |
| 4687 core.int buildCounterOperatingSystem = 0; | |
| 4688 buildOperatingSystem() { | |
| 4689 var o = new api.OperatingSystem(); | |
| 4690 buildCounterOperatingSystem++; | |
| 4691 if (buildCounterOperatingSystem < 3) { | |
| 4692 o.dartId = "foo"; | |
| 4693 o.desktop = true; | |
| 4694 o.kind = "foo"; | |
| 4695 o.mobile = true; | |
| 4696 o.name = "foo"; | |
| 4697 } | |
| 4698 buildCounterOperatingSystem--; | |
| 4699 return o; | |
| 4700 } | |
| 4701 | |
| 4702 checkOperatingSystem(api.OperatingSystem o) { | |
| 4703 buildCounterOperatingSystem++; | |
| 4704 if (buildCounterOperatingSystem < 3) { | |
| 4705 unittest.expect(o.dartId, unittest.equals('foo')); | |
| 4706 unittest.expect(o.desktop, unittest.isTrue); | |
| 4707 unittest.expect(o.kind, unittest.equals('foo')); | |
| 4708 unittest.expect(o.mobile, unittest.isTrue); | |
| 4709 unittest.expect(o.name, unittest.equals('foo')); | |
| 4710 } | |
| 4711 buildCounterOperatingSystem--; | |
| 4712 } | |
| 4713 | |
| 4714 core.int buildCounterOperatingSystemVersion = 0; | |
| 4715 buildOperatingSystemVersion() { | |
| 4716 var o = new api.OperatingSystemVersion(); | |
| 4717 buildCounterOperatingSystemVersion++; | |
| 4718 if (buildCounterOperatingSystemVersion < 3) { | |
| 4719 o.id = "foo"; | |
| 4720 o.kind = "foo"; | |
| 4721 o.majorVersion = "foo"; | |
| 4722 o.minorVersion = "foo"; | |
| 4723 o.name = "foo"; | |
| 4724 o.operatingSystem = buildOperatingSystem(); | |
| 4725 } | |
| 4726 buildCounterOperatingSystemVersion--; | |
| 4727 return o; | |
| 4728 } | |
| 4729 | |
| 4730 checkOperatingSystemVersion(api.OperatingSystemVersion o) { | |
| 4731 buildCounterOperatingSystemVersion++; | |
| 4732 if (buildCounterOperatingSystemVersion < 3) { | |
| 4733 unittest.expect(o.id, unittest.equals('foo')); | |
| 4734 unittest.expect(o.kind, unittest.equals('foo')); | |
| 4735 unittest.expect(o.majorVersion, unittest.equals('foo')); | |
| 4736 unittest.expect(o.minorVersion, unittest.equals('foo')); | |
| 4737 unittest.expect(o.name, unittest.equals('foo')); | |
| 4738 checkOperatingSystem(o.operatingSystem); | |
| 4739 } | |
| 4740 buildCounterOperatingSystemVersion--; | |
| 4741 } | |
| 4742 | |
| 4743 buildUnnamed293() { | |
| 4744 var o = new core.List<api.OperatingSystemVersion>(); | |
| 4745 o.add(buildOperatingSystemVersion()); | |
| 4746 o.add(buildOperatingSystemVersion()); | |
| 4747 return o; | |
| 4748 } | |
| 4749 | |
| 4750 checkUnnamed293(core.List<api.OperatingSystemVersion> o) { | |
| 4751 unittest.expect(o, unittest.hasLength(2)); | |
| 4752 checkOperatingSystemVersion(o[0]); | |
| 4753 checkOperatingSystemVersion(o[1]); | |
| 4754 } | |
| 4755 | |
| 4756 core.int buildCounterOperatingSystemVersionsListResponse = 0; | |
| 4757 buildOperatingSystemVersionsListResponse() { | |
| 4758 var o = new api.OperatingSystemVersionsListResponse(); | |
| 4759 buildCounterOperatingSystemVersionsListResponse++; | |
| 4760 if (buildCounterOperatingSystemVersionsListResponse < 3) { | |
| 4761 o.kind = "foo"; | |
| 4762 o.operatingSystemVersions = buildUnnamed293(); | |
| 4763 } | |
| 4764 buildCounterOperatingSystemVersionsListResponse--; | |
| 4765 return o; | |
| 4766 } | |
| 4767 | |
| 4768 checkOperatingSystemVersionsListResponse(api.OperatingSystemVersionsListResponse
o) { | |
| 4769 buildCounterOperatingSystemVersionsListResponse++; | |
| 4770 if (buildCounterOperatingSystemVersionsListResponse < 3) { | |
| 4771 unittest.expect(o.kind, unittest.equals('foo')); | |
| 4772 checkUnnamed293(o.operatingSystemVersions); | |
| 4773 } | |
| 4774 buildCounterOperatingSystemVersionsListResponse--; | |
| 4775 } | |
| 4776 | |
| 4777 buildUnnamed294() { | |
| 4778 var o = new core.List<api.OperatingSystem>(); | |
| 4779 o.add(buildOperatingSystem()); | |
| 4780 o.add(buildOperatingSystem()); | |
| 4781 return o; | |
| 4782 } | |
| 4783 | |
| 4784 checkUnnamed294(core.List<api.OperatingSystem> o) { | |
| 4785 unittest.expect(o, unittest.hasLength(2)); | |
| 4786 checkOperatingSystem(o[0]); | |
| 4787 checkOperatingSystem(o[1]); | |
| 4788 } | |
| 4789 | |
| 4790 core.int buildCounterOperatingSystemsListResponse = 0; | |
| 4791 buildOperatingSystemsListResponse() { | |
| 4792 var o = new api.OperatingSystemsListResponse(); | |
| 4793 buildCounterOperatingSystemsListResponse++; | |
| 4794 if (buildCounterOperatingSystemsListResponse < 3) { | |
| 4795 o.kind = "foo"; | |
| 4796 o.operatingSystems = buildUnnamed294(); | |
| 4797 } | |
| 4798 buildCounterOperatingSystemsListResponse--; | |
| 4799 return o; | |
| 4800 } | |
| 4801 | |
| 4802 checkOperatingSystemsListResponse(api.OperatingSystemsListResponse o) { | |
| 4803 buildCounterOperatingSystemsListResponse++; | |
| 4804 if (buildCounterOperatingSystemsListResponse < 3) { | |
| 4805 unittest.expect(o.kind, unittest.equals('foo')); | |
| 4806 checkUnnamed294(o.operatingSystems); | |
| 4807 } | |
| 4808 buildCounterOperatingSystemsListResponse--; | |
| 4809 } | |
| 4810 | |
| 4811 core.int buildCounterOptimizationActivity = 0; | |
| 4812 buildOptimizationActivity() { | |
| 4813 var o = new api.OptimizationActivity(); | |
| 4814 buildCounterOptimizationActivity++; | |
| 4815 if (buildCounterOptimizationActivity < 3) { | |
| 4816 o.floodlightActivityId = "foo"; | |
| 4817 o.floodlightActivityIdDimensionValue = buildDimensionValue(); | |
| 4818 o.weight = 42; | |
| 4819 } | |
| 4820 buildCounterOptimizationActivity--; | |
| 4821 return o; | |
| 4822 } | |
| 4823 | |
| 4824 checkOptimizationActivity(api.OptimizationActivity o) { | |
| 4825 buildCounterOptimizationActivity++; | |
| 4826 if (buildCounterOptimizationActivity < 3) { | |
| 4827 unittest.expect(o.floodlightActivityId, unittest.equals('foo')); | |
| 4828 checkDimensionValue(o.floodlightActivityIdDimensionValue); | |
| 4829 unittest.expect(o.weight, unittest.equals(42)); | |
| 4830 } | |
| 4831 buildCounterOptimizationActivity--; | |
| 4832 } | |
| 4833 | |
| 4834 buildUnnamed295() { | |
| 4835 var o = new core.List<core.String>(); | |
| 4836 o.add("foo"); | |
| 4837 o.add("foo"); | |
| 4838 return o; | |
| 4839 } | |
| 4840 | |
| 4841 checkUnnamed295(core.List<core.String> o) { | |
| 4842 unittest.expect(o, unittest.hasLength(2)); | |
| 4843 unittest.expect(o[0], unittest.equals('foo')); | |
| 4844 unittest.expect(o[1], unittest.equals('foo')); | |
| 4845 } | |
| 4846 | |
| 4847 buildUnnamed296() { | |
| 4848 var o = new core.List<api.OrderContact>(); | |
| 4849 o.add(buildOrderContact()); | |
| 4850 o.add(buildOrderContact()); | |
| 4851 return o; | |
| 4852 } | |
| 4853 | |
| 4854 checkUnnamed296(core.List<api.OrderContact> o) { | |
| 4855 unittest.expect(o, unittest.hasLength(2)); | |
| 4856 checkOrderContact(o[0]); | |
| 4857 checkOrderContact(o[1]); | |
| 4858 } | |
| 4859 | |
| 4860 buildUnnamed297() { | |
| 4861 var o = new core.List<core.String>(); | |
| 4862 o.add("foo"); | |
| 4863 o.add("foo"); | |
| 4864 return o; | |
| 4865 } | |
| 4866 | |
| 4867 checkUnnamed297(core.List<core.String> o) { | |
| 4868 unittest.expect(o, unittest.hasLength(2)); | |
| 4869 unittest.expect(o[0], unittest.equals('foo')); | |
| 4870 unittest.expect(o[1], unittest.equals('foo')); | |
| 4871 } | |
| 4872 | |
| 4873 buildUnnamed298() { | |
| 4874 var o = new core.List<core.String>(); | |
| 4875 o.add("foo"); | |
| 4876 o.add("foo"); | |
| 4877 return o; | |
| 4878 } | |
| 4879 | |
| 4880 checkUnnamed298(core.List<core.String> o) { | |
| 4881 unittest.expect(o, unittest.hasLength(2)); | |
| 4882 unittest.expect(o[0], unittest.equals('foo')); | |
| 4883 unittest.expect(o[1], unittest.equals('foo')); | |
| 4884 } | |
| 4885 | |
| 4886 core.int buildCounterOrder = 0; | |
| 4887 buildOrder() { | |
| 4888 var o = new api.Order(); | |
| 4889 buildCounterOrder++; | |
| 4890 if (buildCounterOrder < 3) { | |
| 4891 o.accountId = "foo"; | |
| 4892 o.advertiserId = "foo"; | |
| 4893 o.approverUserProfileIds = buildUnnamed295(); | |
| 4894 o.buyerInvoiceId = "foo"; | |
| 4895 o.buyerOrganizationName = "foo"; | |
| 4896 o.comments = "foo"; | |
| 4897 o.contacts = buildUnnamed296(); | |
| 4898 o.id = "foo"; | |
| 4899 o.kind = "foo"; | |
| 4900 o.lastModifiedInfo = buildLastModifiedInfo(); | |
| 4901 o.name = "foo"; | |
| 4902 o.notes = "foo"; | |
| 4903 o.planningTermId = "foo"; | |
| 4904 o.projectId = "foo"; | |
| 4905 o.sellerOrderId = "foo"; | |
| 4906 o.sellerOrganizationName = "foo"; | |
| 4907 o.siteId = buildUnnamed297(); | |
| 4908 o.siteNames = buildUnnamed298(); | |
| 4909 o.subaccountId = "foo"; | |
| 4910 o.termsAndConditions = "foo"; | |
| 4911 } | |
| 4912 buildCounterOrder--; | |
| 4913 return o; | |
| 4914 } | |
| 4915 | |
| 4916 checkOrder(api.Order o) { | |
| 4917 buildCounterOrder++; | |
| 4918 if (buildCounterOrder < 3) { | |
| 4919 unittest.expect(o.accountId, unittest.equals('foo')); | |
| 4920 unittest.expect(o.advertiserId, unittest.equals('foo')); | |
| 4921 checkUnnamed295(o.approverUserProfileIds); | |
| 4922 unittest.expect(o.buyerInvoiceId, unittest.equals('foo')); | |
| 4923 unittest.expect(o.buyerOrganizationName, unittest.equals('foo')); | |
| 4924 unittest.expect(o.comments, unittest.equals('foo')); | |
| 4925 checkUnnamed296(o.contacts); | |
| 4926 unittest.expect(o.id, unittest.equals('foo')); | |
| 4927 unittest.expect(o.kind, unittest.equals('foo')); | |
| 4928 checkLastModifiedInfo(o.lastModifiedInfo); | |
| 4929 unittest.expect(o.name, unittest.equals('foo')); | |
| 4930 unittest.expect(o.notes, unittest.equals('foo')); | |
| 4931 unittest.expect(o.planningTermId, unittest.equals('foo')); | |
| 4932 unittest.expect(o.projectId, unittest.equals('foo')); | |
| 4933 unittest.expect(o.sellerOrderId, unittest.equals('foo')); | |
| 4934 unittest.expect(o.sellerOrganizationName, unittest.equals('foo')); | |
| 4935 checkUnnamed297(o.siteId); | |
| 4936 checkUnnamed298(o.siteNames); | |
| 4937 unittest.expect(o.subaccountId, unittest.equals('foo')); | |
| 4938 unittest.expect(o.termsAndConditions, unittest.equals('foo')); | |
| 4939 } | |
| 4940 buildCounterOrder--; | |
| 4941 } | |
| 4942 | |
| 4943 core.int buildCounterOrderContact = 0; | |
| 4944 buildOrderContact() { | |
| 4945 var o = new api.OrderContact(); | |
| 4946 buildCounterOrderContact++; | |
| 4947 if (buildCounterOrderContact < 3) { | |
| 4948 o.contactInfo = "foo"; | |
| 4949 o.contactName = "foo"; | |
| 4950 o.contactTitle = "foo"; | |
| 4951 o.contactType = "foo"; | |
| 4952 o.signatureUserProfileId = "foo"; | |
| 4953 } | |
| 4954 buildCounterOrderContact--; | |
| 4955 return o; | |
| 4956 } | |
| 4957 | |
| 4958 checkOrderContact(api.OrderContact o) { | |
| 4959 buildCounterOrderContact++; | |
| 4960 if (buildCounterOrderContact < 3) { | |
| 4961 unittest.expect(o.contactInfo, unittest.equals('foo')); | |
| 4962 unittest.expect(o.contactName, unittest.equals('foo')); | |
| 4963 unittest.expect(o.contactTitle, unittest.equals('foo')); | |
| 4964 unittest.expect(o.contactType, unittest.equals('foo')); | |
| 4965 unittest.expect(o.signatureUserProfileId, unittest.equals('foo')); | |
| 4966 } | |
| 4967 buildCounterOrderContact--; | |
| 4968 } | |
| 4969 | |
| 4970 buildUnnamed299() { | |
| 4971 var o = new core.List<core.String>(); | |
| 4972 o.add("foo"); | |
| 4973 o.add("foo"); | |
| 4974 return o; | |
| 4975 } | |
| 4976 | |
| 4977 checkUnnamed299(core.List<core.String> o) { | |
| 4978 unittest.expect(o, unittest.hasLength(2)); | |
| 4979 unittest.expect(o[0], unittest.equals('foo')); | |
| 4980 unittest.expect(o[1], unittest.equals('foo')); | |
| 4981 } | |
| 4982 | |
| 4983 buildUnnamed300() { | |
| 4984 var o = new core.List<core.String>(); | |
| 4985 o.add("foo"); | |
| 4986 o.add("foo"); | |
| 4987 return o; | |
| 4988 } | |
| 4989 | |
| 4990 checkUnnamed300(core.List<core.String> o) { | |
| 4991 unittest.expect(o, unittest.hasLength(2)); | |
| 4992 unittest.expect(o[0], unittest.equals('foo')); | |
| 4993 unittest.expect(o[1], unittest.equals('foo')); | |
| 4994 } | |
| 4995 | |
| 4996 core.int buildCounterOrderDocument = 0; | |
| 4997 buildOrderDocument() { | |
| 4998 var o = new api.OrderDocument(); | |
| 4999 buildCounterOrderDocument++; | |
| 5000 if (buildCounterOrderDocument < 3) { | |
| 5001 o.accountId = "foo"; | |
| 5002 o.advertiserId = "foo"; | |
| 5003 o.amendedOrderDocumentId = "foo"; | |
| 5004 o.approvedByUserProfileIds = buildUnnamed299(); | |
| 5005 o.cancelled = true; | |
| 5006 o.createdInfo = buildLastModifiedInfo(); | |
| 5007 o.effectiveDate = core.DateTime.parse("2002-02-27T14:01:02Z"); | |
| 5008 o.id = "foo"; | |
| 5009 o.kind = "foo"; | |
| 5010 o.lastSentRecipients = buildUnnamed300(); | |
| 5011 o.lastSentTime = core.DateTime.parse("2002-02-27T14:01:02"); | |
| 5012 o.orderId = "foo"; | |
| 5013 o.projectId = "foo"; | |
| 5014 o.signed = true; | |
| 5015 o.subaccountId = "foo"; | |
| 5016 o.title = "foo"; | |
| 5017 o.type = "foo"; | |
| 5018 } | |
| 5019 buildCounterOrderDocument--; | |
| 5020 return o; | |
| 5021 } | |
| 5022 | |
| 5023 checkOrderDocument(api.OrderDocument o) { | |
| 5024 buildCounterOrderDocument++; | |
| 5025 if (buildCounterOrderDocument < 3) { | |
| 5026 unittest.expect(o.accountId, unittest.equals('foo')); | |
| 5027 unittest.expect(o.advertiserId, unittest.equals('foo')); | |
| 5028 unittest.expect(o.amendedOrderDocumentId, unittest.equals('foo')); | |
| 5029 checkUnnamed299(o.approvedByUserProfileIds); | |
| 5030 unittest.expect(o.cancelled, unittest.isTrue); | |
| 5031 checkLastModifiedInfo(o.createdInfo); | |
| 5032 unittest.expect(o.effectiveDate, unittest.equals(core.DateTime.parse("2002-0
2-27T00:00:00"))); | |
| 5033 unittest.expect(o.id, unittest.equals('foo')); | |
| 5034 unittest.expect(o.kind, unittest.equals('foo')); | |
| 5035 checkUnnamed300(o.lastSentRecipients); | |
| 5036 unittest.expect(o.lastSentTime, unittest.equals(core.DateTime.parse("2002-02
-27T14:01:02"))); | |
| 5037 unittest.expect(o.orderId, unittest.equals('foo')); | |
| 5038 unittest.expect(o.projectId, unittest.equals('foo')); | |
| 5039 unittest.expect(o.signed, unittest.isTrue); | |
| 5040 unittest.expect(o.subaccountId, unittest.equals('foo')); | |
| 5041 unittest.expect(o.title, unittest.equals('foo')); | |
| 5042 unittest.expect(o.type, unittest.equals('foo')); | |
| 5043 } | |
| 5044 buildCounterOrderDocument--; | |
| 5045 } | |
| 5046 | |
| 5047 buildUnnamed301() { | |
| 5048 var o = new core.List<api.OrderDocument>(); | |
| 5049 o.add(buildOrderDocument()); | |
| 5050 o.add(buildOrderDocument()); | |
| 5051 return o; | |
| 5052 } | |
| 5053 | |
| 5054 checkUnnamed301(core.List<api.OrderDocument> o) { | |
| 5055 unittest.expect(o, unittest.hasLength(2)); | |
| 5056 checkOrderDocument(o[0]); | |
| 5057 checkOrderDocument(o[1]); | |
| 5058 } | |
| 5059 | |
| 5060 core.int buildCounterOrderDocumentsListResponse = 0; | |
| 5061 buildOrderDocumentsListResponse() { | |
| 5062 var o = new api.OrderDocumentsListResponse(); | |
| 5063 buildCounterOrderDocumentsListResponse++; | |
| 5064 if (buildCounterOrderDocumentsListResponse < 3) { | |
| 5065 o.kind = "foo"; | |
| 5066 o.nextPageToken = "foo"; | |
| 5067 o.orderDocuments = buildUnnamed301(); | |
| 5068 } | |
| 5069 buildCounterOrderDocumentsListResponse--; | |
| 5070 return o; | |
| 5071 } | |
| 5072 | |
| 5073 checkOrderDocumentsListResponse(api.OrderDocumentsListResponse o) { | |
| 5074 buildCounterOrderDocumentsListResponse++; | |
| 5075 if (buildCounterOrderDocumentsListResponse < 3) { | |
| 5076 unittest.expect(o.kind, unittest.equals('foo')); | |
| 5077 unittest.expect(o.nextPageToken, unittest.equals('foo')); | |
| 5078 checkUnnamed301(o.orderDocuments); | |
| 5079 } | |
| 5080 buildCounterOrderDocumentsListResponse--; | |
| 5081 } | |
| 5082 | |
| 5083 buildUnnamed302() { | |
| 5084 var o = new core.List<api.Order>(); | |
| 5085 o.add(buildOrder()); | |
| 5086 o.add(buildOrder()); | |
| 5087 return o; | |
| 5088 } | |
| 5089 | |
| 5090 checkUnnamed302(core.List<api.Order> o) { | |
| 5091 unittest.expect(o, unittest.hasLength(2)); | |
| 5092 checkOrder(o[0]); | |
| 5093 checkOrder(o[1]); | |
| 5094 } | |
| 5095 | |
| 5096 core.int buildCounterOrdersListResponse = 0; | |
| 5097 buildOrdersListResponse() { | |
| 5098 var o = new api.OrdersListResponse(); | |
| 5099 buildCounterOrdersListResponse++; | |
| 5100 if (buildCounterOrdersListResponse < 3) { | |
| 5101 o.kind = "foo"; | |
| 5102 o.nextPageToken = "foo"; | |
| 5103 o.orders = buildUnnamed302(); | |
| 5104 } | |
| 5105 buildCounterOrdersListResponse--; | |
| 5106 return o; | |
| 5107 } | |
| 5108 | |
| 5109 checkOrdersListResponse(api.OrdersListResponse o) { | |
| 5110 buildCounterOrdersListResponse++; | |
| 5111 if (buildCounterOrdersListResponse < 3) { | |
| 5112 unittest.expect(o.kind, unittest.equals('foo')); | |
| 5113 unittest.expect(o.nextPageToken, unittest.equals('foo')); | |
| 5114 checkUnnamed302(o.orders); | |
| 5115 } | |
| 5116 buildCounterOrdersListResponse--; | |
| 5117 } | |
| 5118 | |
| 5119 buildUnnamed303() { | |
| 5120 var o = new core.List<api.Dimension>(); | |
| 5121 o.add(buildDimension()); | |
| 5122 o.add(buildDimension()); | |
| 5123 return o; | |
| 5124 } | |
| 5125 | |
| 5126 checkUnnamed303(core.List<api.Dimension> o) { | |
| 5127 unittest.expect(o, unittest.hasLength(2)); | |
| 5128 checkDimension(o[0]); | |
| 5129 checkDimension(o[1]); | |
| 5130 } | |
| 5131 | |
| 5132 buildUnnamed304() { | |
| 5133 var o = new core.List<api.Dimension>(); | |
| 5134 o.add(buildDimension()); | |
| 5135 o.add(buildDimension()); | |
| 5136 return o; | |
| 5137 } | |
| 5138 | |
| 5139 checkUnnamed304(core.List<api.Dimension> o) { | |
| 5140 unittest.expect(o, unittest.hasLength(2)); | |
| 5141 checkDimension(o[0]); | |
| 5142 checkDimension(o[1]); | |
| 5143 } | |
| 5144 | |
| 5145 buildUnnamed305() { | |
| 5146 var o = new core.List<api.Metric>(); | |
| 5147 o.add(buildMetric()); | |
| 5148 o.add(buildMetric()); | |
| 5149 return o; | |
| 5150 } | |
| 5151 | |
| 5152 checkUnnamed305(core.List<api.Metric> o) { | |
| 5153 unittest.expect(o, unittest.hasLength(2)); | |
| 5154 checkMetric(o[0]); | |
| 5155 checkMetric(o[1]); | |
| 5156 } | |
| 5157 | |
| 5158 buildUnnamed306() { | |
| 5159 var o = new core.List<api.Dimension>(); | |
| 5160 o.add(buildDimension()); | |
| 5161 o.add(buildDimension()); | |
| 5162 return o; | |
| 5163 } | |
| 5164 | |
| 5165 checkUnnamed306(core.List<api.Dimension> o) { | |
| 5166 unittest.expect(o, unittest.hasLength(2)); | |
| 5167 checkDimension(o[0]); | |
| 5168 checkDimension(o[1]); | |
| 5169 } | |
| 5170 | |
| 5171 core.int buildCounterPathToConversionReportCompatibleFields = 0; | |
| 5172 buildPathToConversionReportCompatibleFields() { | |
| 5173 var o = new api.PathToConversionReportCompatibleFields(); | |
| 5174 buildCounterPathToConversionReportCompatibleFields++; | |
| 5175 if (buildCounterPathToConversionReportCompatibleFields < 3) { | |
| 5176 o.conversionDimensions = buildUnnamed303(); | |
| 5177 o.customFloodlightVariables = buildUnnamed304(); | |
| 5178 o.kind = "foo"; | |
| 5179 o.metrics = buildUnnamed305(); | |
| 5180 o.perInteractionDimensions = buildUnnamed306(); | |
| 5181 } | |
| 5182 buildCounterPathToConversionReportCompatibleFields--; | |
| 5183 return o; | |
| 5184 } | |
| 5185 | |
| 5186 checkPathToConversionReportCompatibleFields(api.PathToConversionReportCompatible
Fields o) { | |
| 5187 buildCounterPathToConversionReportCompatibleFields++; | |
| 5188 if (buildCounterPathToConversionReportCompatibleFields < 3) { | |
| 5189 checkUnnamed303(o.conversionDimensions); | |
| 5190 checkUnnamed304(o.customFloodlightVariables); | |
| 5191 unittest.expect(o.kind, unittest.equals('foo')); | |
| 5192 checkUnnamed305(o.metrics); | |
| 5193 checkUnnamed306(o.perInteractionDimensions); | |
| 5194 } | |
| 5195 buildCounterPathToConversionReportCompatibleFields--; | |
| 5196 } | |
| 5197 | |
| 5198 buildUnnamed307() { | |
| 5199 var o = new core.List<core.String>(); | |
| 5200 o.add("foo"); | |
| 5201 o.add("foo"); | |
| 5202 return o; | |
| 5203 } | |
| 5204 | |
| 5205 checkUnnamed307(core.List<core.String> o) { | |
| 5206 unittest.expect(o, unittest.hasLength(2)); | |
| 5207 unittest.expect(o[0], unittest.equals('foo')); | |
| 5208 unittest.expect(o[1], unittest.equals('foo')); | |
| 5209 } | |
| 5210 | |
| 5211 core.int buildCounterPlacement = 0; | |
| 5212 buildPlacement() { | |
| 5213 var o = new api.Placement(); | |
| 5214 buildCounterPlacement++; | |
| 5215 if (buildCounterPlacement < 3) { | |
| 5216 o.accountId = "foo"; | |
| 5217 o.advertiserId = "foo"; | |
| 5218 o.advertiserIdDimensionValue = buildDimensionValue(); | |
| 5219 o.archived = true; | |
| 5220 o.campaignId = "foo"; | |
| 5221 o.campaignIdDimensionValue = buildDimensionValue(); | |
| 5222 o.comment = "foo"; | |
| 5223 o.compatibility = "foo"; | |
| 5224 o.contentCategoryId = "foo"; | |
| 5225 o.createInfo = buildLastModifiedInfo(); | |
| 5226 o.directorySiteId = "foo"; | |
| 5227 o.directorySiteIdDimensionValue = buildDimensionValue(); | |
| 5228 o.externalId = "foo"; | |
| 5229 o.id = "foo"; | |
| 5230 o.idDimensionValue = buildDimensionValue(); | |
| 5231 o.keyName = "foo"; | |
| 5232 o.kind = "foo"; | |
| 5233 o.lastModifiedInfo = buildLastModifiedInfo(); | |
| 5234 o.lookbackConfiguration = buildLookbackConfiguration(); | |
| 5235 o.name = "foo"; | |
| 5236 o.paymentApproved = true; | |
| 5237 o.paymentSource = "foo"; | |
| 5238 o.placementGroupId = "foo"; | |
| 5239 o.placementGroupIdDimensionValue = buildDimensionValue(); | |
| 5240 o.placementStrategyId = "foo"; | |
| 5241 o.pricingSchedule = buildPricingSchedule(); | |
| 5242 o.primary = true; | |
| 5243 o.publisherUpdateInfo = buildLastModifiedInfo(); | |
| 5244 o.siteId = "foo"; | |
| 5245 o.siteIdDimensionValue = buildDimensionValue(); | |
| 5246 o.size = buildSize(); | |
| 5247 o.sslRequired = true; | |
| 5248 o.status = "foo"; | |
| 5249 o.subaccountId = "foo"; | |
| 5250 o.tagFormats = buildUnnamed307(); | |
| 5251 o.tagSetting = buildTagSetting(); | |
| 5252 } | |
| 5253 buildCounterPlacement--; | |
| 5254 return o; | |
| 5255 } | |
| 5256 | |
| 5257 checkPlacement(api.Placement o) { | |
| 5258 buildCounterPlacement++; | |
| 5259 if (buildCounterPlacement < 3) { | |
| 5260 unittest.expect(o.accountId, unittest.equals('foo')); | |
| 5261 unittest.expect(o.advertiserId, unittest.equals('foo')); | |
| 5262 checkDimensionValue(o.advertiserIdDimensionValue); | |
| 5263 unittest.expect(o.archived, unittest.isTrue); | |
| 5264 unittest.expect(o.campaignId, unittest.equals('foo')); | |
| 5265 checkDimensionValue(o.campaignIdDimensionValue); | |
| 5266 unittest.expect(o.comment, unittest.equals('foo')); | |
| 5267 unittest.expect(o.compatibility, unittest.equals('foo')); | |
| 5268 unittest.expect(o.contentCategoryId, unittest.equals('foo')); | |
| 5269 checkLastModifiedInfo(o.createInfo); | |
| 5270 unittest.expect(o.directorySiteId, unittest.equals('foo')); | |
| 5271 checkDimensionValue(o.directorySiteIdDimensionValue); | |
| 5272 unittest.expect(o.externalId, unittest.equals('foo')); | |
| 5273 unittest.expect(o.id, unittest.equals('foo')); | |
| 5274 checkDimensionValue(o.idDimensionValue); | |
| 5275 unittest.expect(o.keyName, unittest.equals('foo')); | |
| 5276 unittest.expect(o.kind, unittest.equals('foo')); | |
| 5277 checkLastModifiedInfo(o.lastModifiedInfo); | |
| 5278 checkLookbackConfiguration(o.lookbackConfiguration); | |
| 5279 unittest.expect(o.name, unittest.equals('foo')); | |
| 5280 unittest.expect(o.paymentApproved, unittest.isTrue); | |
| 5281 unittest.expect(o.paymentSource, unittest.equals('foo')); | |
| 5282 unittest.expect(o.placementGroupId, unittest.equals('foo')); | |
| 5283 checkDimensionValue(o.placementGroupIdDimensionValue); | |
| 5284 unittest.expect(o.placementStrategyId, unittest.equals('foo')); | |
| 5285 checkPricingSchedule(o.pricingSchedule); | |
| 5286 unittest.expect(o.primary, unittest.isTrue); | |
| 5287 checkLastModifiedInfo(o.publisherUpdateInfo); | |
| 5288 unittest.expect(o.siteId, unittest.equals('foo')); | |
| 5289 checkDimensionValue(o.siteIdDimensionValue); | |
| 5290 checkSize(o.size); | |
| 5291 unittest.expect(o.sslRequired, unittest.isTrue); | |
| 5292 unittest.expect(o.status, unittest.equals('foo')); | |
| 5293 unittest.expect(o.subaccountId, unittest.equals('foo')); | |
| 5294 checkUnnamed307(o.tagFormats); | |
| 5295 checkTagSetting(o.tagSetting); | |
| 5296 } | |
| 5297 buildCounterPlacement--; | |
| 5298 } | |
| 5299 | |
| 5300 core.int buildCounterPlacementAssignment = 0; | |
| 5301 buildPlacementAssignment() { | |
| 5302 var o = new api.PlacementAssignment(); | |
| 5303 buildCounterPlacementAssignment++; | |
| 5304 if (buildCounterPlacementAssignment < 3) { | |
| 5305 o.active = true; | |
| 5306 o.placementId = "foo"; | |
| 5307 o.placementIdDimensionValue = buildDimensionValue(); | |
| 5308 o.sslRequired = true; | |
| 5309 } | |
| 5310 buildCounterPlacementAssignment--; | |
| 5311 return o; | |
| 5312 } | |
| 5313 | |
| 5314 checkPlacementAssignment(api.PlacementAssignment o) { | |
| 5315 buildCounterPlacementAssignment++; | |
| 5316 if (buildCounterPlacementAssignment < 3) { | |
| 5317 unittest.expect(o.active, unittest.isTrue); | |
| 5318 unittest.expect(o.placementId, unittest.equals('foo')); | |
| 5319 checkDimensionValue(o.placementIdDimensionValue); | |
| 5320 unittest.expect(o.sslRequired, unittest.isTrue); | |
| 5321 } | |
| 5322 buildCounterPlacementAssignment--; | |
| 5323 } | |
| 5324 | |
| 5325 buildUnnamed308() { | |
| 5326 var o = new core.List<core.String>(); | |
| 5327 o.add("foo"); | |
| 5328 o.add("foo"); | |
| 5329 return o; | |
| 5330 } | |
| 5331 | |
| 5332 checkUnnamed308(core.List<core.String> o) { | |
| 5333 unittest.expect(o, unittest.hasLength(2)); | |
| 5334 unittest.expect(o[0], unittest.equals('foo')); | |
| 5335 unittest.expect(o[1], unittest.equals('foo')); | |
| 5336 } | |
| 5337 | |
| 5338 core.int buildCounterPlacementGroup = 0; | |
| 5339 buildPlacementGroup() { | |
| 5340 var o = new api.PlacementGroup(); | |
| 5341 buildCounterPlacementGroup++; | |
| 5342 if (buildCounterPlacementGroup < 3) { | |
| 5343 o.accountId = "foo"; | |
| 5344 o.advertiserId = "foo"; | |
| 5345 o.advertiserIdDimensionValue = buildDimensionValue(); | |
| 5346 o.archived = true; | |
| 5347 o.campaignId = "foo"; | |
| 5348 o.campaignIdDimensionValue = buildDimensionValue(); | |
| 5349 o.childPlacementIds = buildUnnamed308(); | |
| 5350 o.comment = "foo"; | |
| 5351 o.contentCategoryId = "foo"; | |
| 5352 o.createInfo = buildLastModifiedInfo(); | |
| 5353 o.directorySiteId = "foo"; | |
| 5354 o.directorySiteIdDimensionValue = buildDimensionValue(); | |
| 5355 o.externalId = "foo"; | |
| 5356 o.id = "foo"; | |
| 5357 o.idDimensionValue = buildDimensionValue(); | |
| 5358 o.kind = "foo"; | |
| 5359 o.lastModifiedInfo = buildLastModifiedInfo(); | |
| 5360 o.name = "foo"; | |
| 5361 o.placementGroupType = "foo"; | |
| 5362 o.placementStrategyId = "foo"; | |
| 5363 o.pricingSchedule = buildPricingSchedule(); | |
| 5364 o.primaryPlacementId = "foo"; | |
| 5365 o.primaryPlacementIdDimensionValue = buildDimensionValue(); | |
| 5366 o.siteId = "foo"; | |
| 5367 o.siteIdDimensionValue = buildDimensionValue(); | |
| 5368 o.subaccountId = "foo"; | |
| 5369 } | |
| 5370 buildCounterPlacementGroup--; | |
| 5371 return o; | |
| 5372 } | |
| 5373 | |
| 5374 checkPlacementGroup(api.PlacementGroup o) { | |
| 5375 buildCounterPlacementGroup++; | |
| 5376 if (buildCounterPlacementGroup < 3) { | |
| 5377 unittest.expect(o.accountId, unittest.equals('foo')); | |
| 5378 unittest.expect(o.advertiserId, unittest.equals('foo')); | |
| 5379 checkDimensionValue(o.advertiserIdDimensionValue); | |
| 5380 unittest.expect(o.archived, unittest.isTrue); | |
| 5381 unittest.expect(o.campaignId, unittest.equals('foo')); | |
| 5382 checkDimensionValue(o.campaignIdDimensionValue); | |
| 5383 checkUnnamed308(o.childPlacementIds); | |
| 5384 unittest.expect(o.comment, unittest.equals('foo')); | |
| 5385 unittest.expect(o.contentCategoryId, unittest.equals('foo')); | |
| 5386 checkLastModifiedInfo(o.createInfo); | |
| 5387 unittest.expect(o.directorySiteId, unittest.equals('foo')); | |
| 5388 checkDimensionValue(o.directorySiteIdDimensionValue); | |
| 5389 unittest.expect(o.externalId, unittest.equals('foo')); | |
| 5390 unittest.expect(o.id, unittest.equals('foo')); | |
| 5391 checkDimensionValue(o.idDimensionValue); | |
| 5392 unittest.expect(o.kind, unittest.equals('foo')); | |
| 5393 checkLastModifiedInfo(o.lastModifiedInfo); | |
| 5394 unittest.expect(o.name, unittest.equals('foo')); | |
| 5395 unittest.expect(o.placementGroupType, unittest.equals('foo')); | |
| 5396 unittest.expect(o.placementStrategyId, unittest.equals('foo')); | |
| 5397 checkPricingSchedule(o.pricingSchedule); | |
| 5398 unittest.expect(o.primaryPlacementId, unittest.equals('foo')); | |
| 5399 checkDimensionValue(o.primaryPlacementIdDimensionValue); | |
| 5400 unittest.expect(o.siteId, unittest.equals('foo')); | |
| 5401 checkDimensionValue(o.siteIdDimensionValue); | |
| 5402 unittest.expect(o.subaccountId, unittest.equals('foo')); | |
| 5403 } | |
| 5404 buildCounterPlacementGroup--; | |
| 5405 } | |
| 5406 | |
| 5407 buildUnnamed309() { | |
| 5408 var o = new core.List<api.PlacementGroup>(); | |
| 5409 o.add(buildPlacementGroup()); | |
| 5410 o.add(buildPlacementGroup()); | |
| 5411 return o; | |
| 5412 } | |
| 5413 | |
| 5414 checkUnnamed309(core.List<api.PlacementGroup> o) { | |
| 5415 unittest.expect(o, unittest.hasLength(2)); | |
| 5416 checkPlacementGroup(o[0]); | |
| 5417 checkPlacementGroup(o[1]); | |
| 5418 } | |
| 5419 | |
| 5420 core.int buildCounterPlacementGroupsListResponse = 0; | |
| 5421 buildPlacementGroupsListResponse() { | |
| 5422 var o = new api.PlacementGroupsListResponse(); | |
| 5423 buildCounterPlacementGroupsListResponse++; | |
| 5424 if (buildCounterPlacementGroupsListResponse < 3) { | |
| 5425 o.kind = "foo"; | |
| 5426 o.nextPageToken = "foo"; | |
| 5427 o.placementGroups = buildUnnamed309(); | |
| 5428 } | |
| 5429 buildCounterPlacementGroupsListResponse--; | |
| 5430 return o; | |
| 5431 } | |
| 5432 | |
| 5433 checkPlacementGroupsListResponse(api.PlacementGroupsListResponse o) { | |
| 5434 buildCounterPlacementGroupsListResponse++; | |
| 5435 if (buildCounterPlacementGroupsListResponse < 3) { | |
| 5436 unittest.expect(o.kind, unittest.equals('foo')); | |
| 5437 unittest.expect(o.nextPageToken, unittest.equals('foo')); | |
| 5438 checkUnnamed309(o.placementGroups); | |
| 5439 } | |
| 5440 buildCounterPlacementGroupsListResponse--; | |
| 5441 } | |
| 5442 | |
| 5443 buildUnnamed310() { | |
| 5444 var o = new core.List<api.PlacementStrategy>(); | |
| 5445 o.add(buildPlacementStrategy()); | |
| 5446 o.add(buildPlacementStrategy()); | |
| 5447 return o; | |
| 5448 } | |
| 5449 | |
| 5450 checkUnnamed310(core.List<api.PlacementStrategy> o) { | |
| 5451 unittest.expect(o, unittest.hasLength(2)); | |
| 5452 checkPlacementStrategy(o[0]); | |
| 5453 checkPlacementStrategy(o[1]); | |
| 5454 } | |
| 5455 | |
| 5456 core.int buildCounterPlacementStrategiesListResponse = 0; | |
| 5457 buildPlacementStrategiesListResponse() { | |
| 5458 var o = new api.PlacementStrategiesListResponse(); | |
| 5459 buildCounterPlacementStrategiesListResponse++; | |
| 5460 if (buildCounterPlacementStrategiesListResponse < 3) { | |
| 5461 o.kind = "foo"; | |
| 5462 o.nextPageToken = "foo"; | |
| 5463 o.placementStrategies = buildUnnamed310(); | |
| 5464 } | |
| 5465 buildCounterPlacementStrategiesListResponse--; | |
| 5466 return o; | |
| 5467 } | |
| 5468 | |
| 5469 checkPlacementStrategiesListResponse(api.PlacementStrategiesListResponse o) { | |
| 5470 buildCounterPlacementStrategiesListResponse++; | |
| 5471 if (buildCounterPlacementStrategiesListResponse < 3) { | |
| 5472 unittest.expect(o.kind, unittest.equals('foo')); | |
| 5473 unittest.expect(o.nextPageToken, unittest.equals('foo')); | |
| 5474 checkUnnamed310(o.placementStrategies); | |
| 5475 } | |
| 5476 buildCounterPlacementStrategiesListResponse--; | |
| 5477 } | |
| 5478 | |
| 5479 core.int buildCounterPlacementStrategy = 0; | |
| 5480 buildPlacementStrategy() { | |
| 5481 var o = new api.PlacementStrategy(); | |
| 5482 buildCounterPlacementStrategy++; | |
| 5483 if (buildCounterPlacementStrategy < 3) { | |
| 5484 o.accountId = "foo"; | |
| 5485 o.id = "foo"; | |
| 5486 o.kind = "foo"; | |
| 5487 o.name = "foo"; | |
| 5488 } | |
| 5489 buildCounterPlacementStrategy--; | |
| 5490 return o; | |
| 5491 } | |
| 5492 | |
| 5493 checkPlacementStrategy(api.PlacementStrategy o) { | |
| 5494 buildCounterPlacementStrategy++; | |
| 5495 if (buildCounterPlacementStrategy < 3) { | |
| 5496 unittest.expect(o.accountId, unittest.equals('foo')); | |
| 5497 unittest.expect(o.id, unittest.equals('foo')); | |
| 5498 unittest.expect(o.kind, unittest.equals('foo')); | |
| 5499 unittest.expect(o.name, unittest.equals('foo')); | |
| 5500 } | |
| 5501 buildCounterPlacementStrategy--; | |
| 5502 } | |
| 5503 | |
| 5504 buildUnnamed311() { | |
| 5505 var o = new core.List<api.TagData>(); | |
| 5506 o.add(buildTagData()); | |
| 5507 o.add(buildTagData()); | |
| 5508 return o; | |
| 5509 } | |
| 5510 | |
| 5511 checkUnnamed311(core.List<api.TagData> o) { | |
| 5512 unittest.expect(o, unittest.hasLength(2)); | |
| 5513 checkTagData(o[0]); | |
| 5514 checkTagData(o[1]); | |
| 5515 } | |
| 5516 | |
| 5517 core.int buildCounterPlacementTag = 0; | |
| 5518 buildPlacementTag() { | |
| 5519 var o = new api.PlacementTag(); | |
| 5520 buildCounterPlacementTag++; | |
| 5521 if (buildCounterPlacementTag < 3) { | |
| 5522 o.placementId = "foo"; | |
| 5523 o.tagDatas = buildUnnamed311(); | |
| 5524 } | |
| 5525 buildCounterPlacementTag--; | |
| 5526 return o; | |
| 5527 } | |
| 5528 | |
| 5529 checkPlacementTag(api.PlacementTag o) { | |
| 5530 buildCounterPlacementTag++; | |
| 5531 if (buildCounterPlacementTag < 3) { | |
| 5532 unittest.expect(o.placementId, unittest.equals('foo')); | |
| 5533 checkUnnamed311(o.tagDatas); | |
| 5534 } | |
| 5535 buildCounterPlacementTag--; | |
| 5536 } | |
| 5537 | |
| 5538 buildUnnamed312() { | |
| 5539 var o = new core.List<api.PlacementTag>(); | |
| 5540 o.add(buildPlacementTag()); | |
| 5541 o.add(buildPlacementTag()); | |
| 5542 return o; | |
| 5543 } | |
| 5544 | |
| 5545 checkUnnamed312(core.List<api.PlacementTag> o) { | |
| 5546 unittest.expect(o, unittest.hasLength(2)); | |
| 5547 checkPlacementTag(o[0]); | |
| 5548 checkPlacementTag(o[1]); | |
| 5549 } | |
| 5550 | |
| 5551 core.int buildCounterPlacementsGenerateTagsResponse = 0; | |
| 5552 buildPlacementsGenerateTagsResponse() { | |
| 5553 var o = new api.PlacementsGenerateTagsResponse(); | |
| 5554 buildCounterPlacementsGenerateTagsResponse++; | |
| 5555 if (buildCounterPlacementsGenerateTagsResponse < 3) { | |
| 5556 o.kind = "foo"; | |
| 5557 o.placementTags = buildUnnamed312(); | |
| 5558 } | |
| 5559 buildCounterPlacementsGenerateTagsResponse--; | |
| 5560 return o; | |
| 5561 } | |
| 5562 | |
| 5563 checkPlacementsGenerateTagsResponse(api.PlacementsGenerateTagsResponse o) { | |
| 5564 buildCounterPlacementsGenerateTagsResponse++; | |
| 5565 if (buildCounterPlacementsGenerateTagsResponse < 3) { | |
| 5566 unittest.expect(o.kind, unittest.equals('foo')); | |
| 5567 checkUnnamed312(o.placementTags); | |
| 5568 } | |
| 5569 buildCounterPlacementsGenerateTagsResponse--; | |
| 5570 } | |
| 5571 | |
| 5572 buildUnnamed313() { | |
| 5573 var o = new core.List<api.Placement>(); | |
| 5574 o.add(buildPlacement()); | |
| 5575 o.add(buildPlacement()); | |
| 5576 return o; | |
| 5577 } | |
| 5578 | |
| 5579 checkUnnamed313(core.List<api.Placement> o) { | |
| 5580 unittest.expect(o, unittest.hasLength(2)); | |
| 5581 checkPlacement(o[0]); | |
| 5582 checkPlacement(o[1]); | |
| 5583 } | |
| 5584 | |
| 5585 core.int buildCounterPlacementsListResponse = 0; | |
| 5586 buildPlacementsListResponse() { | |
| 5587 var o = new api.PlacementsListResponse(); | |
| 5588 buildCounterPlacementsListResponse++; | |
| 5589 if (buildCounterPlacementsListResponse < 3) { | |
| 5590 o.kind = "foo"; | |
| 5591 o.nextPageToken = "foo"; | |
| 5592 o.placements = buildUnnamed313(); | |
| 5593 } | |
| 5594 buildCounterPlacementsListResponse--; | |
| 5595 return o; | |
| 5596 } | |
| 5597 | |
| 5598 checkPlacementsListResponse(api.PlacementsListResponse o) { | |
| 5599 buildCounterPlacementsListResponse++; | |
| 5600 if (buildCounterPlacementsListResponse < 3) { | |
| 5601 unittest.expect(o.kind, unittest.equals('foo')); | |
| 5602 unittest.expect(o.nextPageToken, unittest.equals('foo')); | |
| 5603 checkUnnamed313(o.placements); | |
| 5604 } | |
| 5605 buildCounterPlacementsListResponse--; | |
| 5606 } | |
| 5607 | |
| 5608 core.int buildCounterPlatformType = 0; | |
| 5609 buildPlatformType() { | |
| 5610 var o = new api.PlatformType(); | |
| 5611 buildCounterPlatformType++; | |
| 5612 if (buildCounterPlatformType < 3) { | |
| 5613 o.id = "foo"; | |
| 5614 o.kind = "foo"; | |
| 5615 o.name = "foo"; | |
| 5616 } | |
| 5617 buildCounterPlatformType--; | |
| 5618 return o; | |
| 5619 } | |
| 5620 | |
| 5621 checkPlatformType(api.PlatformType o) { | |
| 5622 buildCounterPlatformType++; | |
| 5623 if (buildCounterPlatformType < 3) { | |
| 5624 unittest.expect(o.id, unittest.equals('foo')); | |
| 5625 unittest.expect(o.kind, unittest.equals('foo')); | |
| 5626 unittest.expect(o.name, unittest.equals('foo')); | |
| 5627 } | |
| 5628 buildCounterPlatformType--; | |
| 5629 } | |
| 5630 | |
| 5631 buildUnnamed314() { | |
| 5632 var o = new core.List<api.PlatformType>(); | |
| 5633 o.add(buildPlatformType()); | |
| 5634 o.add(buildPlatformType()); | |
| 5635 return o; | |
| 5636 } | |
| 5637 | |
| 5638 checkUnnamed314(core.List<api.PlatformType> o) { | |
| 5639 unittest.expect(o, unittest.hasLength(2)); | |
| 5640 checkPlatformType(o[0]); | |
| 5641 checkPlatformType(o[1]); | |
| 5642 } | |
| 5643 | |
| 5644 core.int buildCounterPlatformTypesListResponse = 0; | |
| 5645 buildPlatformTypesListResponse() { | |
| 5646 var o = new api.PlatformTypesListResponse(); | |
| 5647 buildCounterPlatformTypesListResponse++; | |
| 5648 if (buildCounterPlatformTypesListResponse < 3) { | |
| 5649 o.kind = "foo"; | |
| 5650 o.platformTypes = buildUnnamed314(); | |
| 5651 } | |
| 5652 buildCounterPlatformTypesListResponse--; | |
| 5653 return o; | |
| 5654 } | |
| 5655 | |
| 5656 checkPlatformTypesListResponse(api.PlatformTypesListResponse o) { | |
| 5657 buildCounterPlatformTypesListResponse++; | |
| 5658 if (buildCounterPlatformTypesListResponse < 3) { | |
| 5659 unittest.expect(o.kind, unittest.equals('foo')); | |
| 5660 checkUnnamed314(o.platformTypes); | |
| 5661 } | |
| 5662 buildCounterPlatformTypesListResponse--; | |
| 5663 } | |
| 5664 | |
| 5665 core.int buildCounterPopupWindowProperties = 0; | |
| 5666 buildPopupWindowProperties() { | |
| 5667 var o = new api.PopupWindowProperties(); | |
| 5668 buildCounterPopupWindowProperties++; | |
| 5669 if (buildCounterPopupWindowProperties < 3) { | |
| 5670 o.dimension = buildSize(); | |
| 5671 o.offset = buildOffsetPosition(); | |
| 5672 o.positionType = "foo"; | |
| 5673 o.showAddressBar = true; | |
| 5674 o.showMenuBar = true; | |
| 5675 o.showScrollBar = true; | |
| 5676 o.showStatusBar = true; | |
| 5677 o.showToolBar = true; | |
| 5678 o.title = "foo"; | |
| 5679 } | |
| 5680 buildCounterPopupWindowProperties--; | |
| 5681 return o; | |
| 5682 } | |
| 5683 | |
| 5684 checkPopupWindowProperties(api.PopupWindowProperties o) { | |
| 5685 buildCounterPopupWindowProperties++; | |
| 5686 if (buildCounterPopupWindowProperties < 3) { | |
| 5687 checkSize(o.dimension); | |
| 5688 checkOffsetPosition(o.offset); | |
| 5689 unittest.expect(o.positionType, unittest.equals('foo')); | |
| 5690 unittest.expect(o.showAddressBar, unittest.isTrue); | |
| 5691 unittest.expect(o.showMenuBar, unittest.isTrue); | |
| 5692 unittest.expect(o.showScrollBar, unittest.isTrue); | |
| 5693 unittest.expect(o.showStatusBar, unittest.isTrue); | |
| 5694 unittest.expect(o.showToolBar, unittest.isTrue); | |
| 5695 unittest.expect(o.title, unittest.equals('foo')); | |
| 5696 } | |
| 5697 buildCounterPopupWindowProperties--; | |
| 5698 } | |
| 5699 | |
| 5700 core.int buildCounterPostalCode = 0; | |
| 5701 buildPostalCode() { | |
| 5702 var o = new api.PostalCode(); | |
| 5703 buildCounterPostalCode++; | |
| 5704 if (buildCounterPostalCode < 3) { | |
| 5705 o.code = "foo"; | |
| 5706 o.countryCode = "foo"; | |
| 5707 o.countryDartId = "foo"; | |
| 5708 o.id = "foo"; | |
| 5709 o.kind = "foo"; | |
| 5710 } | |
| 5711 buildCounterPostalCode--; | |
| 5712 return o; | |
| 5713 } | |
| 5714 | |
| 5715 checkPostalCode(api.PostalCode o) { | |
| 5716 buildCounterPostalCode++; | |
| 5717 if (buildCounterPostalCode < 3) { | |
| 5718 unittest.expect(o.code, unittest.equals('foo')); | |
| 5719 unittest.expect(o.countryCode, unittest.equals('foo')); | |
| 5720 unittest.expect(o.countryDartId, unittest.equals('foo')); | |
| 5721 unittest.expect(o.id, unittest.equals('foo')); | |
| 5722 unittest.expect(o.kind, unittest.equals('foo')); | |
| 5723 } | |
| 5724 buildCounterPostalCode--; | |
| 5725 } | |
| 5726 | |
| 5727 buildUnnamed315() { | |
| 5728 var o = new core.List<api.PostalCode>(); | |
| 5729 o.add(buildPostalCode()); | |
| 5730 o.add(buildPostalCode()); | |
| 5731 return o; | |
| 5732 } | |
| 5733 | |
| 5734 checkUnnamed315(core.List<api.PostalCode> o) { | |
| 5735 unittest.expect(o, unittest.hasLength(2)); | |
| 5736 checkPostalCode(o[0]); | |
| 5737 checkPostalCode(o[1]); | |
| 5738 } | |
| 5739 | |
| 5740 core.int buildCounterPostalCodesListResponse = 0; | |
| 5741 buildPostalCodesListResponse() { | |
| 5742 var o = new api.PostalCodesListResponse(); | |
| 5743 buildCounterPostalCodesListResponse++; | |
| 5744 if (buildCounterPostalCodesListResponse < 3) { | |
| 5745 o.kind = "foo"; | |
| 5746 o.postalCodes = buildUnnamed315(); | |
| 5747 } | |
| 5748 buildCounterPostalCodesListResponse--; | |
| 5749 return o; | |
| 5750 } | |
| 5751 | |
| 5752 checkPostalCodesListResponse(api.PostalCodesListResponse o) { | |
| 5753 buildCounterPostalCodesListResponse++; | |
| 5754 if (buildCounterPostalCodesListResponse < 3) { | |
| 5755 unittest.expect(o.kind, unittest.equals('foo')); | |
| 5756 checkUnnamed315(o.postalCodes); | |
| 5757 } | |
| 5758 buildCounterPostalCodesListResponse--; | |
| 5759 } | |
| 5760 | |
| 5761 buildUnnamed316() { | |
| 5762 var o = new core.List<api.Flight>(); | |
| 5763 o.add(buildFlight()); | |
| 5764 o.add(buildFlight()); | |
| 5765 return o; | |
| 5766 } | |
| 5767 | |
| 5768 checkUnnamed316(core.List<api.Flight> o) { | |
| 5769 unittest.expect(o, unittest.hasLength(2)); | |
| 5770 checkFlight(o[0]); | |
| 5771 checkFlight(o[1]); | |
| 5772 } | |
| 5773 | |
| 5774 core.int buildCounterPricing = 0; | |
| 5775 buildPricing() { | |
| 5776 var o = new api.Pricing(); | |
| 5777 buildCounterPricing++; | |
| 5778 if (buildCounterPricing < 3) { | |
| 5779 o.capCostType = "foo"; | |
| 5780 o.endDate = core.DateTime.parse("2002-02-27T14:01:02Z"); | |
| 5781 o.flights = buildUnnamed316(); | |
| 5782 o.groupType = "foo"; | |
| 5783 o.pricingType = "foo"; | |
| 5784 o.startDate = core.DateTime.parse("2002-02-27T14:01:02Z"); | |
| 5785 } | |
| 5786 buildCounterPricing--; | |
| 5787 return o; | |
| 5788 } | |
| 5789 | |
| 5790 checkPricing(api.Pricing o) { | |
| 5791 buildCounterPricing++; | |
| 5792 if (buildCounterPricing < 3) { | |
| 5793 unittest.expect(o.capCostType, unittest.equals('foo')); | |
| 5794 unittest.expect(o.endDate, unittest.equals(core.DateTime.parse("2002-02-27T0
0:00:00"))); | |
| 5795 checkUnnamed316(o.flights); | |
| 5796 unittest.expect(o.groupType, unittest.equals('foo')); | |
| 5797 unittest.expect(o.pricingType, unittest.equals('foo')); | |
| 5798 unittest.expect(o.startDate, unittest.equals(core.DateTime.parse("2002-02-27
T00:00:00"))); | |
| 5799 } | |
| 5800 buildCounterPricing--; | |
| 5801 } | |
| 5802 | |
| 5803 buildUnnamed317() { | |
| 5804 var o = new core.List<api.PricingSchedulePricingPeriod>(); | |
| 5805 o.add(buildPricingSchedulePricingPeriod()); | |
| 5806 o.add(buildPricingSchedulePricingPeriod()); | |
| 5807 return o; | |
| 5808 } | |
| 5809 | |
| 5810 checkUnnamed317(core.List<api.PricingSchedulePricingPeriod> o) { | |
| 5811 unittest.expect(o, unittest.hasLength(2)); | |
| 5812 checkPricingSchedulePricingPeriod(o[0]); | |
| 5813 checkPricingSchedulePricingPeriod(o[1]); | |
| 5814 } | |
| 5815 | |
| 5816 core.int buildCounterPricingSchedule = 0; | |
| 5817 buildPricingSchedule() { | |
| 5818 var o = new api.PricingSchedule(); | |
| 5819 buildCounterPricingSchedule++; | |
| 5820 if (buildCounterPricingSchedule < 3) { | |
| 5821 o.capCostOption = "foo"; | |
| 5822 o.disregardOverdelivery = true; | |
| 5823 o.endDate = core.DateTime.parse("2002-02-27T14:01:02Z"); | |
| 5824 o.flighted = true; | |
| 5825 o.floodlightActivityId = "foo"; | |
| 5826 o.pricingPeriods = buildUnnamed317(); | |
| 5827 o.pricingType = "foo"; | |
| 5828 o.startDate = core.DateTime.parse("2002-02-27T14:01:02Z"); | |
| 5829 o.testingStartDate = core.DateTime.parse("2002-02-27T14:01:02Z"); | |
| 5830 } | |
| 5831 buildCounterPricingSchedule--; | |
| 5832 return o; | |
| 5833 } | |
| 5834 | |
| 5835 checkPricingSchedule(api.PricingSchedule o) { | |
| 5836 buildCounterPricingSchedule++; | |
| 5837 if (buildCounterPricingSchedule < 3) { | |
| 5838 unittest.expect(o.capCostOption, unittest.equals('foo')); | |
| 5839 unittest.expect(o.disregardOverdelivery, unittest.isTrue); | |
| 5840 unittest.expect(o.endDate, unittest.equals(core.DateTime.parse("2002-02-27T0
0:00:00"))); | |
| 5841 unittest.expect(o.flighted, unittest.isTrue); | |
| 5842 unittest.expect(o.floodlightActivityId, unittest.equals('foo')); | |
| 5843 checkUnnamed317(o.pricingPeriods); | |
| 5844 unittest.expect(o.pricingType, unittest.equals('foo')); | |
| 5845 unittest.expect(o.startDate, unittest.equals(core.DateTime.parse("2002-02-27
T00:00:00"))); | |
| 5846 unittest.expect(o.testingStartDate, unittest.equals(core.DateTime.parse("200
2-02-27T00:00:00"))); | |
| 5847 } | |
| 5848 buildCounterPricingSchedule--; | |
| 5849 } | |
| 5850 | |
| 5851 core.int buildCounterPricingSchedulePricingPeriod = 0; | |
| 5852 buildPricingSchedulePricingPeriod() { | |
| 5853 var o = new api.PricingSchedulePricingPeriod(); | |
| 5854 buildCounterPricingSchedulePricingPeriod++; | |
| 5855 if (buildCounterPricingSchedulePricingPeriod < 3) { | |
| 5856 o.endDate = core.DateTime.parse("2002-02-27T14:01:02Z"); | |
| 5857 o.pricingComment = "foo"; | |
| 5858 o.rateOrCostNanos = "foo"; | |
| 5859 o.startDate = core.DateTime.parse("2002-02-27T14:01:02Z"); | |
| 5860 o.units = "foo"; | |
| 5861 } | |
| 5862 buildCounterPricingSchedulePricingPeriod--; | |
| 5863 return o; | |
| 5864 } | |
| 5865 | |
| 5866 checkPricingSchedulePricingPeriod(api.PricingSchedulePricingPeriod o) { | |
| 5867 buildCounterPricingSchedulePricingPeriod++; | |
| 5868 if (buildCounterPricingSchedulePricingPeriod < 3) { | |
| 5869 unittest.expect(o.endDate, unittest.equals(core.DateTime.parse("2002-02-27T0
0:00:00"))); | |
| 5870 unittest.expect(o.pricingComment, unittest.equals('foo')); | |
| 5871 unittest.expect(o.rateOrCostNanos, unittest.equals('foo')); | |
| 5872 unittest.expect(o.startDate, unittest.equals(core.DateTime.parse("2002-02-27
T00:00:00"))); | |
| 5873 unittest.expect(o.units, unittest.equals('foo')); | |
| 5874 } | |
| 5875 buildCounterPricingSchedulePricingPeriod--; | |
| 5876 } | |
| 5877 | |
| 5878 core.int buildCounterProject = 0; | |
| 5879 buildProject() { | |
| 5880 var o = new api.Project(); | |
| 5881 buildCounterProject++; | |
| 5882 if (buildCounterProject < 3) { | |
| 5883 o.accountId = "foo"; | |
| 5884 o.advertiserId = "foo"; | |
| 5885 o.audienceAgeGroup = "foo"; | |
| 5886 o.audienceGender = "foo"; | |
| 5887 o.budget = "foo"; | |
| 5888 o.clientBillingCode = "foo"; | |
| 5889 o.clientName = "foo"; | |
| 5890 o.endDate = core.DateTime.parse("2002-02-27T14:01:02Z"); | |
| 5891 o.id = "foo"; | |
| 5892 o.kind = "foo"; | |
| 5893 o.lastModifiedInfo = buildLastModifiedInfo(); | |
| 5894 o.name = "foo"; | |
| 5895 o.overview = "foo"; | |
| 5896 o.startDate = core.DateTime.parse("2002-02-27T14:01:02Z"); | |
| 5897 o.subaccountId = "foo"; | |
| 5898 o.targetClicks = "foo"; | |
| 5899 o.targetConversions = "foo"; | |
| 5900 o.targetCpaNanos = "foo"; | |
| 5901 o.targetCpcNanos = "foo"; | |
| 5902 o.targetCpmNanos = "foo"; | |
| 5903 o.targetImpressions = "foo"; | |
| 5904 } | |
| 5905 buildCounterProject--; | |
| 5906 return o; | |
| 5907 } | |
| 5908 | |
| 5909 checkProject(api.Project o) { | |
| 5910 buildCounterProject++; | |
| 5911 if (buildCounterProject < 3) { | |
| 5912 unittest.expect(o.accountId, unittest.equals('foo')); | |
| 5913 unittest.expect(o.advertiserId, unittest.equals('foo')); | |
| 5914 unittest.expect(o.audienceAgeGroup, unittest.equals('foo')); | |
| 5915 unittest.expect(o.audienceGender, unittest.equals('foo')); | |
| 5916 unittest.expect(o.budget, unittest.equals('foo')); | |
| 5917 unittest.expect(o.clientBillingCode, unittest.equals('foo')); | |
| 5918 unittest.expect(o.clientName, unittest.equals('foo')); | |
| 5919 unittest.expect(o.endDate, unittest.equals(core.DateTime.parse("2002-02-27T0
0:00:00"))); | |
| 5920 unittest.expect(o.id, unittest.equals('foo')); | |
| 5921 unittest.expect(o.kind, unittest.equals('foo')); | |
| 5922 checkLastModifiedInfo(o.lastModifiedInfo); | |
| 5923 unittest.expect(o.name, unittest.equals('foo')); | |
| 5924 unittest.expect(o.overview, unittest.equals('foo')); | |
| 5925 unittest.expect(o.startDate, unittest.equals(core.DateTime.parse("2002-02-27
T00:00:00"))); | |
| 5926 unittest.expect(o.subaccountId, unittest.equals('foo')); | |
| 5927 unittest.expect(o.targetClicks, unittest.equals('foo')); | |
| 5928 unittest.expect(o.targetConversions, unittest.equals('foo')); | |
| 5929 unittest.expect(o.targetCpaNanos, unittest.equals('foo')); | |
| 5930 unittest.expect(o.targetCpcNanos, unittest.equals('foo')); | |
| 5931 unittest.expect(o.targetCpmNanos, unittest.equals('foo')); | |
| 5932 unittest.expect(o.targetImpressions, unittest.equals('foo')); | |
| 5933 } | |
| 5934 buildCounterProject--; | |
| 5935 } | |
| 5936 | |
| 5937 buildUnnamed318() { | |
| 5938 var o = new core.List<api.Project>(); | |
| 5939 o.add(buildProject()); | |
| 5940 o.add(buildProject()); | |
| 5941 return o; | |
| 5942 } | |
| 5943 | |
| 5944 checkUnnamed318(core.List<api.Project> o) { | |
| 5945 unittest.expect(o, unittest.hasLength(2)); | |
| 5946 checkProject(o[0]); | |
| 5947 checkProject(o[1]); | |
| 5948 } | |
| 5949 | |
| 5950 core.int buildCounterProjectsListResponse = 0; | |
| 5951 buildProjectsListResponse() { | |
| 5952 var o = new api.ProjectsListResponse(); | |
| 5953 buildCounterProjectsListResponse++; | |
| 5954 if (buildCounterProjectsListResponse < 3) { | |
| 5955 o.kind = "foo"; | |
| 5956 o.nextPageToken = "foo"; | |
| 5957 o.projects = buildUnnamed318(); | |
| 5958 } | |
| 5959 buildCounterProjectsListResponse--; | |
| 5960 return o; | |
| 5961 } | |
| 5962 | |
| 5963 checkProjectsListResponse(api.ProjectsListResponse o) { | |
| 5964 buildCounterProjectsListResponse++; | |
| 5965 if (buildCounterProjectsListResponse < 3) { | |
| 5966 unittest.expect(o.kind, unittest.equals('foo')); | |
| 5967 unittest.expect(o.nextPageToken, unittest.equals('foo')); | |
| 5968 checkUnnamed318(o.projects); | |
| 5969 } | |
| 5970 buildCounterProjectsListResponse--; | |
| 5971 } | |
| 5972 | |
| 5973 buildUnnamed319() { | |
| 5974 var o = new core.List<api.Dimension>(); | |
| 5975 o.add(buildDimension()); | |
| 5976 o.add(buildDimension()); | |
| 5977 return o; | |
| 5978 } | |
| 5979 | |
| 5980 checkUnnamed319(core.List<api.Dimension> o) { | |
| 5981 unittest.expect(o, unittest.hasLength(2)); | |
| 5982 checkDimension(o[0]); | |
| 5983 checkDimension(o[1]); | |
| 5984 } | |
| 5985 | |
| 5986 buildUnnamed320() { | |
| 5987 var o = new core.List<api.Dimension>(); | |
| 5988 o.add(buildDimension()); | |
| 5989 o.add(buildDimension()); | |
| 5990 return o; | |
| 5991 } | |
| 5992 | |
| 5993 checkUnnamed320(core.List<api.Dimension> o) { | |
| 5994 unittest.expect(o, unittest.hasLength(2)); | |
| 5995 checkDimension(o[0]); | |
| 5996 checkDimension(o[1]); | |
| 5997 } | |
| 5998 | |
| 5999 buildUnnamed321() { | |
| 6000 var o = new core.List<api.Metric>(); | |
| 6001 o.add(buildMetric()); | |
| 6002 o.add(buildMetric()); | |
| 6003 return o; | |
| 6004 } | |
| 6005 | |
| 6006 checkUnnamed321(core.List<api.Metric> o) { | |
| 6007 unittest.expect(o, unittest.hasLength(2)); | |
| 6008 checkMetric(o[0]); | |
| 6009 checkMetric(o[1]); | |
| 6010 } | |
| 6011 | |
| 6012 buildUnnamed322() { | |
| 6013 var o = new core.List<api.Metric>(); | |
| 6014 o.add(buildMetric()); | |
| 6015 o.add(buildMetric()); | |
| 6016 return o; | |
| 6017 } | |
| 6018 | |
| 6019 checkUnnamed322(core.List<api.Metric> o) { | |
| 6020 unittest.expect(o, unittest.hasLength(2)); | |
| 6021 checkMetric(o[0]); | |
| 6022 checkMetric(o[1]); | |
| 6023 } | |
| 6024 | |
| 6025 buildUnnamed323() { | |
| 6026 var o = new core.List<api.Metric>(); | |
| 6027 o.add(buildMetric()); | |
| 6028 o.add(buildMetric()); | |
| 6029 return o; | |
| 6030 } | |
| 6031 | |
| 6032 checkUnnamed323(core.List<api.Metric> o) { | |
| 6033 unittest.expect(o, unittest.hasLength(2)); | |
| 6034 checkMetric(o[0]); | |
| 6035 checkMetric(o[1]); | |
| 6036 } | |
| 6037 | |
| 6038 core.int buildCounterReachReportCompatibleFields = 0; | |
| 6039 buildReachReportCompatibleFields() { | |
| 6040 var o = new api.ReachReportCompatibleFields(); | |
| 6041 buildCounterReachReportCompatibleFields++; | |
| 6042 if (buildCounterReachReportCompatibleFields < 3) { | |
| 6043 o.dimensionFilters = buildUnnamed319(); | |
| 6044 o.dimensions = buildUnnamed320(); | |
| 6045 o.kind = "foo"; | |
| 6046 o.metrics = buildUnnamed321(); | |
| 6047 o.pivotedActivityMetrics = buildUnnamed322(); | |
| 6048 o.reachByFrequencyMetrics = buildUnnamed323(); | |
| 6049 } | |
| 6050 buildCounterReachReportCompatibleFields--; | |
| 6051 return o; | |
| 6052 } | |
| 6053 | |
| 6054 checkReachReportCompatibleFields(api.ReachReportCompatibleFields o) { | |
| 6055 buildCounterReachReportCompatibleFields++; | |
| 6056 if (buildCounterReachReportCompatibleFields < 3) { | |
| 6057 checkUnnamed319(o.dimensionFilters); | |
| 6058 checkUnnamed320(o.dimensions); | |
| 6059 unittest.expect(o.kind, unittest.equals('foo')); | |
| 6060 checkUnnamed321(o.metrics); | |
| 6061 checkUnnamed322(o.pivotedActivityMetrics); | |
| 6062 checkUnnamed323(o.reachByFrequencyMetrics); | |
| 6063 } | |
| 6064 buildCounterReachReportCompatibleFields--; | |
| 6065 } | |
| 6066 | |
| 6067 core.int buildCounterRecipient = 0; | |
| 6068 buildRecipient() { | |
| 6069 var o = new api.Recipient(); | |
| 6070 buildCounterRecipient++; | |
| 6071 if (buildCounterRecipient < 3) { | |
| 6072 o.deliveryType = "foo"; | |
| 6073 o.email = "foo"; | |
| 6074 o.kind = "foo"; | |
| 6075 } | |
| 6076 buildCounterRecipient--; | |
| 6077 return o; | |
| 6078 } | |
| 6079 | |
| 6080 checkRecipient(api.Recipient o) { | |
| 6081 buildCounterRecipient++; | |
| 6082 if (buildCounterRecipient < 3) { | |
| 6083 unittest.expect(o.deliveryType, unittest.equals('foo')); | |
| 6084 unittest.expect(o.email, unittest.equals('foo')); | |
| 6085 unittest.expect(o.kind, unittest.equals('foo')); | |
| 6086 } | |
| 6087 buildCounterRecipient--; | |
| 6088 } | |
| 6089 | |
| 6090 core.int buildCounterRegion = 0; | |
| 6091 buildRegion() { | |
| 6092 var o = new api.Region(); | |
| 6093 buildCounterRegion++; | |
| 6094 if (buildCounterRegion < 3) { | |
| 6095 o.countryCode = "foo"; | |
| 6096 o.countryDartId = "foo"; | |
| 6097 o.dartId = "foo"; | |
| 6098 o.kind = "foo"; | |
| 6099 o.name = "foo"; | |
| 6100 o.regionCode = "foo"; | |
| 6101 } | |
| 6102 buildCounterRegion--; | |
| 6103 return o; | |
| 6104 } | |
| 6105 | |
| 6106 checkRegion(api.Region o) { | |
| 6107 buildCounterRegion++; | |
| 6108 if (buildCounterRegion < 3) { | |
| 6109 unittest.expect(o.countryCode, unittest.equals('foo')); | |
| 6110 unittest.expect(o.countryDartId, unittest.equals('foo')); | |
| 6111 unittest.expect(o.dartId, unittest.equals('foo')); | |
| 6112 unittest.expect(o.kind, unittest.equals('foo')); | |
| 6113 unittest.expect(o.name, unittest.equals('foo')); | |
| 6114 unittest.expect(o.regionCode, unittest.equals('foo')); | |
| 6115 } | |
| 6116 buildCounterRegion--; | |
| 6117 } | |
| 6118 | |
| 6119 buildUnnamed324() { | |
| 6120 var o = new core.List<api.Region>(); | |
| 6121 o.add(buildRegion()); | |
| 6122 o.add(buildRegion()); | |
| 6123 return o; | |
| 6124 } | |
| 6125 | |
| 6126 checkUnnamed324(core.List<api.Region> o) { | |
| 6127 unittest.expect(o, unittest.hasLength(2)); | |
| 6128 checkRegion(o[0]); | |
| 6129 checkRegion(o[1]); | |
| 6130 } | |
| 6131 | |
| 6132 core.int buildCounterRegionsListResponse = 0; | |
| 6133 buildRegionsListResponse() { | |
| 6134 var o = new api.RegionsListResponse(); | |
| 6135 buildCounterRegionsListResponse++; | |
| 6136 if (buildCounterRegionsListResponse < 3) { | |
| 6137 o.kind = "foo"; | |
| 6138 o.regions = buildUnnamed324(); | |
| 6139 } | |
| 6140 buildCounterRegionsListResponse--; | |
| 6141 return o; | |
| 6142 } | |
| 6143 | |
| 6144 checkRegionsListResponse(api.RegionsListResponse o) { | |
| 6145 buildCounterRegionsListResponse++; | |
| 6146 if (buildCounterRegionsListResponse < 3) { | |
| 6147 unittest.expect(o.kind, unittest.equals('foo')); | |
| 6148 checkUnnamed324(o.regions); | |
| 6149 } | |
| 6150 buildCounterRegionsListResponse--; | |
| 6151 } | |
| 6152 | |
| 6153 core.int buildCounterRemarketingList = 0; | |
| 6154 buildRemarketingList() { | |
| 6155 var o = new api.RemarketingList(); | |
| 6156 buildCounterRemarketingList++; | |
| 6157 if (buildCounterRemarketingList < 3) { | |
| 6158 o.accountId = "foo"; | |
| 6159 o.active = true; | |
| 6160 o.advertiserId = "foo"; | |
| 6161 o.advertiserIdDimensionValue = buildDimensionValue(); | |
| 6162 o.description = "foo"; | |
| 6163 o.id = "foo"; | |
| 6164 o.kind = "foo"; | |
| 6165 o.lifeSpan = "foo"; | |
| 6166 o.listPopulationRule = buildListPopulationRule(); | |
| 6167 o.listSize = "foo"; | |
| 6168 o.listSource = "foo"; | |
| 6169 o.name = "foo"; | |
| 6170 o.subaccountId = "foo"; | |
| 6171 } | |
| 6172 buildCounterRemarketingList--; | |
| 6173 return o; | |
| 6174 } | |
| 6175 | |
| 6176 checkRemarketingList(api.RemarketingList o) { | |
| 6177 buildCounterRemarketingList++; | |
| 6178 if (buildCounterRemarketingList < 3) { | |
| 6179 unittest.expect(o.accountId, unittest.equals('foo')); | |
| 6180 unittest.expect(o.active, unittest.isTrue); | |
| 6181 unittest.expect(o.advertiserId, unittest.equals('foo')); | |
| 6182 checkDimensionValue(o.advertiserIdDimensionValue); | |
| 6183 unittest.expect(o.description, unittest.equals('foo')); | |
| 6184 unittest.expect(o.id, unittest.equals('foo')); | |
| 6185 unittest.expect(o.kind, unittest.equals('foo')); | |
| 6186 unittest.expect(o.lifeSpan, unittest.equals('foo')); | |
| 6187 checkListPopulationRule(o.listPopulationRule); | |
| 6188 unittest.expect(o.listSize, unittest.equals('foo')); | |
| 6189 unittest.expect(o.listSource, unittest.equals('foo')); | |
| 6190 unittest.expect(o.name, unittest.equals('foo')); | |
| 6191 unittest.expect(o.subaccountId, unittest.equals('foo')); | |
| 6192 } | |
| 6193 buildCounterRemarketingList--; | |
| 6194 } | |
| 6195 | |
| 6196 buildUnnamed325() { | |
| 6197 var o = new core.List<core.String>(); | |
| 6198 o.add("foo"); | |
| 6199 o.add("foo"); | |
| 6200 return o; | |
| 6201 } | |
| 6202 | |
| 6203 checkUnnamed325(core.List<core.String> o) { | |
| 6204 unittest.expect(o, unittest.hasLength(2)); | |
| 6205 unittest.expect(o[0], unittest.equals('foo')); | |
| 6206 unittest.expect(o[1], unittest.equals('foo')); | |
| 6207 } | |
| 6208 | |
| 6209 buildUnnamed326() { | |
| 6210 var o = new core.List<core.String>(); | |
| 6211 o.add("foo"); | |
| 6212 o.add("foo"); | |
| 6213 return o; | |
| 6214 } | |
| 6215 | |
| 6216 checkUnnamed326(core.List<core.String> o) { | |
| 6217 unittest.expect(o, unittest.hasLength(2)); | |
| 6218 unittest.expect(o[0], unittest.equals('foo')); | |
| 6219 unittest.expect(o[1], unittest.equals('foo')); | |
| 6220 } | |
| 6221 | |
| 6222 core.int buildCounterRemarketingListShare = 0; | |
| 6223 buildRemarketingListShare() { | |
| 6224 var o = new api.RemarketingListShare(); | |
| 6225 buildCounterRemarketingListShare++; | |
| 6226 if (buildCounterRemarketingListShare < 3) { | |
| 6227 o.kind = "foo"; | |
| 6228 o.remarketingListId = "foo"; | |
| 6229 o.sharedAccountIds = buildUnnamed325(); | |
| 6230 o.sharedAdvertiserIds = buildUnnamed326(); | |
| 6231 } | |
| 6232 buildCounterRemarketingListShare--; | |
| 6233 return o; | |
| 6234 } | |
| 6235 | |
| 6236 checkRemarketingListShare(api.RemarketingListShare o) { | |
| 6237 buildCounterRemarketingListShare++; | |
| 6238 if (buildCounterRemarketingListShare < 3) { | |
| 6239 unittest.expect(o.kind, unittest.equals('foo')); | |
| 6240 unittest.expect(o.remarketingListId, unittest.equals('foo')); | |
| 6241 checkUnnamed325(o.sharedAccountIds); | |
| 6242 checkUnnamed326(o.sharedAdvertiserIds); | |
| 6243 } | |
| 6244 buildCounterRemarketingListShare--; | |
| 6245 } | |
| 6246 | |
| 6247 buildUnnamed327() { | |
| 6248 var o = new core.List<api.RemarketingList>(); | |
| 6249 o.add(buildRemarketingList()); | |
| 6250 o.add(buildRemarketingList()); | |
| 6251 return o; | |
| 6252 } | |
| 6253 | |
| 6254 checkUnnamed327(core.List<api.RemarketingList> o) { | |
| 6255 unittest.expect(o, unittest.hasLength(2)); | |
| 6256 checkRemarketingList(o[0]); | |
| 6257 checkRemarketingList(o[1]); | |
| 6258 } | |
| 6259 | |
| 6260 core.int buildCounterRemarketingListsListResponse = 0; | |
| 6261 buildRemarketingListsListResponse() { | |
| 6262 var o = new api.RemarketingListsListResponse(); | |
| 6263 buildCounterRemarketingListsListResponse++; | |
| 6264 if (buildCounterRemarketingListsListResponse < 3) { | |
| 6265 o.kind = "foo"; | |
| 6266 o.nextPageToken = "foo"; | |
| 6267 o.remarketingLists = buildUnnamed327(); | |
| 6268 } | |
| 6269 buildCounterRemarketingListsListResponse--; | |
| 6270 return o; | |
| 6271 } | |
| 6272 | |
| 6273 checkRemarketingListsListResponse(api.RemarketingListsListResponse o) { | |
| 6274 buildCounterRemarketingListsListResponse++; | |
| 6275 if (buildCounterRemarketingListsListResponse < 3) { | |
| 6276 unittest.expect(o.kind, unittest.equals('foo')); | |
| 6277 unittest.expect(o.nextPageToken, unittest.equals('foo')); | |
| 6278 checkUnnamed327(o.remarketingLists); | |
| 6279 } | |
| 6280 buildCounterRemarketingListsListResponse--; | |
| 6281 } | |
| 6282 | |
| 6283 buildUnnamed328() { | |
| 6284 var o = new core.List<api.DimensionValue>(); | |
| 6285 o.add(buildDimensionValue()); | |
| 6286 o.add(buildDimensionValue()); | |
| 6287 return o; | |
| 6288 } | |
| 6289 | |
| 6290 checkUnnamed328(core.List<api.DimensionValue> o) { | |
| 6291 unittest.expect(o, unittest.hasLength(2)); | |
| 6292 checkDimensionValue(o[0]); | |
| 6293 checkDimensionValue(o[1]); | |
| 6294 } | |
| 6295 | |
| 6296 buildUnnamed329() { | |
| 6297 var o = new core.List<api.SortedDimension>(); | |
| 6298 o.add(buildSortedDimension()); | |
| 6299 o.add(buildSortedDimension()); | |
| 6300 return o; | |
| 6301 } | |
| 6302 | |
| 6303 checkUnnamed329(core.List<api.SortedDimension> o) { | |
| 6304 unittest.expect(o, unittest.hasLength(2)); | |
| 6305 checkSortedDimension(o[0]); | |
| 6306 checkSortedDimension(o[1]); | |
| 6307 } | |
| 6308 | |
| 6309 buildUnnamed330() { | |
| 6310 var o = new core.List<core.String>(); | |
| 6311 o.add("foo"); | |
| 6312 o.add("foo"); | |
| 6313 return o; | |
| 6314 } | |
| 6315 | |
| 6316 checkUnnamed330(core.List<core.String> o) { | |
| 6317 unittest.expect(o, unittest.hasLength(2)); | |
| 6318 unittest.expect(o[0], unittest.equals('foo')); | |
| 6319 unittest.expect(o[1], unittest.equals('foo')); | |
| 6320 } | |
| 6321 | |
| 6322 core.int buildCounterReportCriteria = 0; | |
| 6323 buildReportCriteria() { | |
| 6324 var o = new api.ReportCriteria(); | |
| 6325 buildCounterReportCriteria++; | |
| 6326 if (buildCounterReportCriteria < 3) { | |
| 6327 o.activities = buildActivities(); | |
| 6328 o.customRichMediaEvents = buildCustomRichMediaEvents(); | |
| 6329 o.dateRange = buildDateRange(); | |
| 6330 o.dimensionFilters = buildUnnamed328(); | |
| 6331 o.dimensions = buildUnnamed329(); | |
| 6332 o.metricNames = buildUnnamed330(); | |
| 6333 } | |
| 6334 buildCounterReportCriteria--; | |
| 6335 return o; | |
| 6336 } | |
| 6337 | |
| 6338 checkReportCriteria(api.ReportCriteria o) { | |
| 6339 buildCounterReportCriteria++; | |
| 6340 if (buildCounterReportCriteria < 3) { | |
| 6341 checkActivities(o.activities); | |
| 6342 checkCustomRichMediaEvents(o.customRichMediaEvents); | |
| 6343 checkDateRange(o.dateRange); | |
| 6344 checkUnnamed328(o.dimensionFilters); | |
| 6345 checkUnnamed329(o.dimensions); | |
| 6346 checkUnnamed330(o.metricNames); | |
| 6347 } | |
| 6348 buildCounterReportCriteria--; | |
| 6349 } | |
| 6350 | |
| 6351 buildUnnamed331() { | |
| 6352 var o = new core.List<api.SortedDimension>(); | |
| 6353 o.add(buildSortedDimension()); | |
| 6354 o.add(buildSortedDimension()); | |
| 6355 return o; | |
| 6356 } | |
| 6357 | |
| 6358 checkUnnamed331(core.List<api.SortedDimension> o) { | |
| 6359 unittest.expect(o, unittest.hasLength(2)); | |
| 6360 checkSortedDimension(o[0]); | |
| 6361 checkSortedDimension(o[1]); | |
| 6362 } | |
| 6363 | |
| 6364 buildUnnamed332() { | |
| 6365 var o = new core.List<api.DimensionValue>(); | |
| 6366 o.add(buildDimensionValue()); | |
| 6367 o.add(buildDimensionValue()); | |
| 6368 return o; | |
| 6369 } | |
| 6370 | |
| 6371 checkUnnamed332(core.List<api.DimensionValue> o) { | |
| 6372 unittest.expect(o, unittest.hasLength(2)); | |
| 6373 checkDimensionValue(o[0]); | |
| 6374 checkDimensionValue(o[1]); | |
| 6375 } | |
| 6376 | |
| 6377 buildUnnamed333() { | |
| 6378 var o = new core.List<core.String>(); | |
| 6379 o.add("foo"); | |
| 6380 o.add("foo"); | |
| 6381 return o; | |
| 6382 } | |
| 6383 | |
| 6384 checkUnnamed333(core.List<core.String> o) { | |
| 6385 unittest.expect(o, unittest.hasLength(2)); | |
| 6386 unittest.expect(o[0], unittest.equals('foo')); | |
| 6387 unittest.expect(o[1], unittest.equals('foo')); | |
| 6388 } | |
| 6389 | |
| 6390 buildUnnamed334() { | |
| 6391 var o = new core.List<core.String>(); | |
| 6392 o.add("foo"); | |
| 6393 o.add("foo"); | |
| 6394 return o; | |
| 6395 } | |
| 6396 | |
| 6397 checkUnnamed334(core.List<core.String> o) { | |
| 6398 unittest.expect(o, unittest.hasLength(2)); | |
| 6399 unittest.expect(o[0], unittest.equals('foo')); | |
| 6400 unittest.expect(o[1], unittest.equals('foo')); | |
| 6401 } | |
| 6402 | |
| 6403 core.int buildCounterReportCrossDimensionReachCriteria = 0; | |
| 6404 buildReportCrossDimensionReachCriteria() { | |
| 6405 var o = new api.ReportCrossDimensionReachCriteria(); | |
| 6406 buildCounterReportCrossDimensionReachCriteria++; | |
| 6407 if (buildCounterReportCrossDimensionReachCriteria < 3) { | |
| 6408 o.breakdown = buildUnnamed331(); | |
| 6409 o.dateRange = buildDateRange(); | |
| 6410 o.dimension = "foo"; | |
| 6411 o.dimensionFilters = buildUnnamed332(); | |
| 6412 o.metricNames = buildUnnamed333(); | |
| 6413 o.overlapMetricNames = buildUnnamed334(); | |
| 6414 o.pivoted = true; | |
| 6415 } | |
| 6416 buildCounterReportCrossDimensionReachCriteria--; | |
| 6417 return o; | |
| 6418 } | |
| 6419 | |
| 6420 checkReportCrossDimensionReachCriteria(api.ReportCrossDimensionReachCriteria o)
{ | |
| 6421 buildCounterReportCrossDimensionReachCriteria++; | |
| 6422 if (buildCounterReportCrossDimensionReachCriteria < 3) { | |
| 6423 checkUnnamed331(o.breakdown); | |
| 6424 checkDateRange(o.dateRange); | |
| 6425 unittest.expect(o.dimension, unittest.equals('foo')); | |
| 6426 checkUnnamed332(o.dimensionFilters); | |
| 6427 checkUnnamed333(o.metricNames); | |
| 6428 checkUnnamed334(o.overlapMetricNames); | |
| 6429 unittest.expect(o.pivoted, unittest.isTrue); | |
| 6430 } | |
| 6431 buildCounterReportCrossDimensionReachCriteria--; | |
| 6432 } | |
| 6433 | |
| 6434 buildUnnamed335() { | |
| 6435 var o = new core.List<api.Recipient>(); | |
| 6436 o.add(buildRecipient()); | |
| 6437 o.add(buildRecipient()); | |
| 6438 return o; | |
| 6439 } | |
| 6440 | |
| 6441 checkUnnamed335(core.List<api.Recipient> o) { | |
| 6442 unittest.expect(o, unittest.hasLength(2)); | |
| 6443 checkRecipient(o[0]); | |
| 6444 checkRecipient(o[1]); | |
| 6445 } | |
| 6446 | |
| 6447 core.int buildCounterReportDelivery = 0; | |
| 6448 buildReportDelivery() { | |
| 6449 var o = new api.ReportDelivery(); | |
| 6450 buildCounterReportDelivery++; | |
| 6451 if (buildCounterReportDelivery < 3) { | |
| 6452 o.emailOwner = true; | |
| 6453 o.emailOwnerDeliveryType = "foo"; | |
| 6454 o.message = "foo"; | |
| 6455 o.recipients = buildUnnamed335(); | |
| 6456 } | |
| 6457 buildCounterReportDelivery--; | |
| 6458 return o; | |
| 6459 } | |
| 6460 | |
| 6461 checkReportDelivery(api.ReportDelivery o) { | |
| 6462 buildCounterReportDelivery++; | |
| 6463 if (buildCounterReportDelivery < 3) { | |
| 6464 unittest.expect(o.emailOwner, unittest.isTrue); | |
| 6465 unittest.expect(o.emailOwnerDeliveryType, unittest.equals('foo')); | |
| 6466 unittest.expect(o.message, unittest.equals('foo')); | |
| 6467 checkUnnamed335(o.recipients); | |
| 6468 } | |
| 6469 buildCounterReportDelivery--; | |
| 6470 } | |
| 6471 | |
| 6472 buildUnnamed336() { | |
| 6473 var o = new core.List<api.DimensionValue>(); | |
| 6474 o.add(buildDimensionValue()); | |
| 6475 o.add(buildDimensionValue()); | |
| 6476 return o; | |
| 6477 } | |
| 6478 | |
| 6479 checkUnnamed336(core.List<api.DimensionValue> o) { | |
| 6480 unittest.expect(o, unittest.hasLength(2)); | |
| 6481 checkDimensionValue(o[0]); | |
| 6482 checkDimensionValue(o[1]); | |
| 6483 } | |
| 6484 | |
| 6485 buildUnnamed337() { | |
| 6486 var o = new core.List<api.DimensionValue>(); | |
| 6487 o.add(buildDimensionValue()); | |
| 6488 o.add(buildDimensionValue()); | |
| 6489 return o; | |
| 6490 } | |
| 6491 | |
| 6492 checkUnnamed337(core.List<api.DimensionValue> o) { | |
| 6493 unittest.expect(o, unittest.hasLength(2)); | |
| 6494 checkDimensionValue(o[0]); | |
| 6495 checkDimensionValue(o[1]); | |
| 6496 } | |
| 6497 | |
| 6498 buildUnnamed338() { | |
| 6499 var o = new core.List<api.SortedDimension>(); | |
| 6500 o.add(buildSortedDimension()); | |
| 6501 o.add(buildSortedDimension()); | |
| 6502 return o; | |
| 6503 } | |
| 6504 | |
| 6505 checkUnnamed338(core.List<api.SortedDimension> o) { | |
| 6506 unittest.expect(o, unittest.hasLength(2)); | |
| 6507 checkSortedDimension(o[0]); | |
| 6508 checkSortedDimension(o[1]); | |
| 6509 } | |
| 6510 | |
| 6511 buildUnnamed339() { | |
| 6512 var o = new core.List<core.String>(); | |
| 6513 o.add("foo"); | |
| 6514 o.add("foo"); | |
| 6515 return o; | |
| 6516 } | |
| 6517 | |
| 6518 checkUnnamed339(core.List<core.String> o) { | |
| 6519 unittest.expect(o, unittest.hasLength(2)); | |
| 6520 unittest.expect(o[0], unittest.equals('foo')); | |
| 6521 unittest.expect(o[1], unittest.equals('foo')); | |
| 6522 } | |
| 6523 | |
| 6524 core.int buildCounterReportFloodlightCriteriaReportProperties = 0; | |
| 6525 buildReportFloodlightCriteriaReportProperties() { | |
| 6526 var o = new api.ReportFloodlightCriteriaReportProperties(); | |
| 6527 buildCounterReportFloodlightCriteriaReportProperties++; | |
| 6528 if (buildCounterReportFloodlightCriteriaReportProperties < 3) { | |
| 6529 o.includeAttributedIPConversions = true; | |
| 6530 o.includeUnattributedCookieConversions = true; | |
| 6531 o.includeUnattributedIPConversions = true; | |
| 6532 } | |
| 6533 buildCounterReportFloodlightCriteriaReportProperties--; | |
| 6534 return o; | |
| 6535 } | |
| 6536 | |
| 6537 checkReportFloodlightCriteriaReportProperties(api.ReportFloodlightCriteriaReport
Properties o) { | |
| 6538 buildCounterReportFloodlightCriteriaReportProperties++; | |
| 6539 if (buildCounterReportFloodlightCriteriaReportProperties < 3) { | |
| 6540 unittest.expect(o.includeAttributedIPConversions, unittest.isTrue); | |
| 6541 unittest.expect(o.includeUnattributedCookieConversions, unittest.isTrue); | |
| 6542 unittest.expect(o.includeUnattributedIPConversions, unittest.isTrue); | |
| 6543 } | |
| 6544 buildCounterReportFloodlightCriteriaReportProperties--; | |
| 6545 } | |
| 6546 | |
| 6547 core.int buildCounterReportFloodlightCriteria = 0; | |
| 6548 buildReportFloodlightCriteria() { | |
| 6549 var o = new api.ReportFloodlightCriteria(); | |
| 6550 buildCounterReportFloodlightCriteria++; | |
| 6551 if (buildCounterReportFloodlightCriteria < 3) { | |
| 6552 o.customRichMediaEvents = buildUnnamed336(); | |
| 6553 o.dateRange = buildDateRange(); | |
| 6554 o.dimensionFilters = buildUnnamed337(); | |
| 6555 o.dimensions = buildUnnamed338(); | |
| 6556 o.floodlightConfigId = buildDimensionValue(); | |
| 6557 o.metricNames = buildUnnamed339(); | |
| 6558 o.reportProperties = buildReportFloodlightCriteriaReportProperties(); | |
| 6559 } | |
| 6560 buildCounterReportFloodlightCriteria--; | |
| 6561 return o; | |
| 6562 } | |
| 6563 | |
| 6564 checkReportFloodlightCriteria(api.ReportFloodlightCriteria o) { | |
| 6565 buildCounterReportFloodlightCriteria++; | |
| 6566 if (buildCounterReportFloodlightCriteria < 3) { | |
| 6567 checkUnnamed336(o.customRichMediaEvents); | |
| 6568 checkDateRange(o.dateRange); | |
| 6569 checkUnnamed337(o.dimensionFilters); | |
| 6570 checkUnnamed338(o.dimensions); | |
| 6571 checkDimensionValue(o.floodlightConfigId); | |
| 6572 checkUnnamed339(o.metricNames); | |
| 6573 checkReportFloodlightCriteriaReportProperties(o.reportProperties); | |
| 6574 } | |
| 6575 buildCounterReportFloodlightCriteria--; | |
| 6576 } | |
| 6577 | |
| 6578 buildUnnamed340() { | |
| 6579 var o = new core.List<api.DimensionValue>(); | |
| 6580 o.add(buildDimensionValue()); | |
| 6581 o.add(buildDimensionValue()); | |
| 6582 return o; | |
| 6583 } | |
| 6584 | |
| 6585 checkUnnamed340(core.List<api.DimensionValue> o) { | |
| 6586 unittest.expect(o, unittest.hasLength(2)); | |
| 6587 checkDimensionValue(o[0]); | |
| 6588 checkDimensionValue(o[1]); | |
| 6589 } | |
| 6590 | |
| 6591 buildUnnamed341() { | |
| 6592 var o = new core.List<api.SortedDimension>(); | |
| 6593 o.add(buildSortedDimension()); | |
| 6594 o.add(buildSortedDimension()); | |
| 6595 return o; | |
| 6596 } | |
| 6597 | |
| 6598 checkUnnamed341(core.List<api.SortedDimension> o) { | |
| 6599 unittest.expect(o, unittest.hasLength(2)); | |
| 6600 checkSortedDimension(o[0]); | |
| 6601 checkSortedDimension(o[1]); | |
| 6602 } | |
| 6603 | |
| 6604 buildUnnamed342() { | |
| 6605 var o = new core.List<api.SortedDimension>(); | |
| 6606 o.add(buildSortedDimension()); | |
| 6607 o.add(buildSortedDimension()); | |
| 6608 return o; | |
| 6609 } | |
| 6610 | |
| 6611 checkUnnamed342(core.List<api.SortedDimension> o) { | |
| 6612 unittest.expect(o, unittest.hasLength(2)); | |
| 6613 checkSortedDimension(o[0]); | |
| 6614 checkSortedDimension(o[1]); | |
| 6615 } | |
| 6616 | |
| 6617 buildUnnamed343() { | |
| 6618 var o = new core.List<api.DimensionValue>(); | |
| 6619 o.add(buildDimensionValue()); | |
| 6620 o.add(buildDimensionValue()); | |
| 6621 return o; | |
| 6622 } | |
| 6623 | |
| 6624 checkUnnamed343(core.List<api.DimensionValue> o) { | |
| 6625 unittest.expect(o, unittest.hasLength(2)); | |
| 6626 checkDimensionValue(o[0]); | |
| 6627 checkDimensionValue(o[1]); | |
| 6628 } | |
| 6629 | |
| 6630 buildUnnamed344() { | |
| 6631 var o = new core.List<core.String>(); | |
| 6632 o.add("foo"); | |
| 6633 o.add("foo"); | |
| 6634 return o; | |
| 6635 } | |
| 6636 | |
| 6637 checkUnnamed344(core.List<core.String> o) { | |
| 6638 unittest.expect(o, unittest.hasLength(2)); | |
| 6639 unittest.expect(o[0], unittest.equals('foo')); | |
| 6640 unittest.expect(o[1], unittest.equals('foo')); | |
| 6641 } | |
| 6642 | |
| 6643 buildUnnamed345() { | |
| 6644 var o = new core.List<api.SortedDimension>(); | |
| 6645 o.add(buildSortedDimension()); | |
| 6646 o.add(buildSortedDimension()); | |
| 6647 return o; | |
| 6648 } | |
| 6649 | |
| 6650 checkUnnamed345(core.List<api.SortedDimension> o) { | |
| 6651 unittest.expect(o, unittest.hasLength(2)); | |
| 6652 checkSortedDimension(o[0]); | |
| 6653 checkSortedDimension(o[1]); | |
| 6654 } | |
| 6655 | |
| 6656 core.int buildCounterReportPathToConversionCriteriaReportProperties = 0; | |
| 6657 buildReportPathToConversionCriteriaReportProperties() { | |
| 6658 var o = new api.ReportPathToConversionCriteriaReportProperties(); | |
| 6659 buildCounterReportPathToConversionCriteriaReportProperties++; | |
| 6660 if (buildCounterReportPathToConversionCriteriaReportProperties < 3) { | |
| 6661 o.clicksLookbackWindow = 42; | |
| 6662 o.impressionsLookbackWindow = 42; | |
| 6663 o.includeAttributedIPConversions = true; | |
| 6664 o.includeUnattributedCookieConversions = true; | |
| 6665 o.includeUnattributedIPConversions = true; | |
| 6666 o.maximumClickInteractions = 42; | |
| 6667 o.maximumImpressionInteractions = 42; | |
| 6668 o.maximumInteractionGap = 42; | |
| 6669 o.pivotOnInteractionPath = true; | |
| 6670 } | |
| 6671 buildCounterReportPathToConversionCriteriaReportProperties--; | |
| 6672 return o; | |
| 6673 } | |
| 6674 | |
| 6675 checkReportPathToConversionCriteriaReportProperties(api.ReportPathToConversionCr
iteriaReportProperties o) { | |
| 6676 buildCounterReportPathToConversionCriteriaReportProperties++; | |
| 6677 if (buildCounterReportPathToConversionCriteriaReportProperties < 3) { | |
| 6678 unittest.expect(o.clicksLookbackWindow, unittest.equals(42)); | |
| 6679 unittest.expect(o.impressionsLookbackWindow, unittest.equals(42)); | |
| 6680 unittest.expect(o.includeAttributedIPConversions, unittest.isTrue); | |
| 6681 unittest.expect(o.includeUnattributedCookieConversions, unittest.isTrue); | |
| 6682 unittest.expect(o.includeUnattributedIPConversions, unittest.isTrue); | |
| 6683 unittest.expect(o.maximumClickInteractions, unittest.equals(42)); | |
| 6684 unittest.expect(o.maximumImpressionInteractions, unittest.equals(42)); | |
| 6685 unittest.expect(o.maximumInteractionGap, unittest.equals(42)); | |
| 6686 unittest.expect(o.pivotOnInteractionPath, unittest.isTrue); | |
| 6687 } | |
| 6688 buildCounterReportPathToConversionCriteriaReportProperties--; | |
| 6689 } | |
| 6690 | |
| 6691 core.int buildCounterReportPathToConversionCriteria = 0; | |
| 6692 buildReportPathToConversionCriteria() { | |
| 6693 var o = new api.ReportPathToConversionCriteria(); | |
| 6694 buildCounterReportPathToConversionCriteria++; | |
| 6695 if (buildCounterReportPathToConversionCriteria < 3) { | |
| 6696 o.activityFilters = buildUnnamed340(); | |
| 6697 o.conversionDimensions = buildUnnamed341(); | |
| 6698 o.customFloodlightVariables = buildUnnamed342(); | |
| 6699 o.customRichMediaEvents = buildUnnamed343(); | |
| 6700 o.dateRange = buildDateRange(); | |
| 6701 o.floodlightConfigId = buildDimensionValue(); | |
| 6702 o.metricNames = buildUnnamed344(); | |
| 6703 o.perInteractionDimensions = buildUnnamed345(); | |
| 6704 o.reportProperties = buildReportPathToConversionCriteriaReportProperties(); | |
| 6705 } | |
| 6706 buildCounterReportPathToConversionCriteria--; | |
| 6707 return o; | |
| 6708 } | |
| 6709 | |
| 6710 checkReportPathToConversionCriteria(api.ReportPathToConversionCriteria o) { | |
| 6711 buildCounterReportPathToConversionCriteria++; | |
| 6712 if (buildCounterReportPathToConversionCriteria < 3) { | |
| 6713 checkUnnamed340(o.activityFilters); | |
| 6714 checkUnnamed341(o.conversionDimensions); | |
| 6715 checkUnnamed342(o.customFloodlightVariables); | |
| 6716 checkUnnamed343(o.customRichMediaEvents); | |
| 6717 checkDateRange(o.dateRange); | |
| 6718 checkDimensionValue(o.floodlightConfigId); | |
| 6719 checkUnnamed344(o.metricNames); | |
| 6720 checkUnnamed345(o.perInteractionDimensions); | |
| 6721 checkReportPathToConversionCriteriaReportProperties(o.reportProperties); | |
| 6722 } | |
| 6723 buildCounterReportPathToConversionCriteria--; | |
| 6724 } | |
| 6725 | |
| 6726 buildUnnamed346() { | |
| 6727 var o = new core.List<api.DimensionValue>(); | |
| 6728 o.add(buildDimensionValue()); | |
| 6729 o.add(buildDimensionValue()); | |
| 6730 return o; | |
| 6731 } | |
| 6732 | |
| 6733 checkUnnamed346(core.List<api.DimensionValue> o) { | |
| 6734 unittest.expect(o, unittest.hasLength(2)); | |
| 6735 checkDimensionValue(o[0]); | |
| 6736 checkDimensionValue(o[1]); | |
| 6737 } | |
| 6738 | |
| 6739 buildUnnamed347() { | |
| 6740 var o = new core.List<api.SortedDimension>(); | |
| 6741 o.add(buildSortedDimension()); | |
| 6742 o.add(buildSortedDimension()); | |
| 6743 return o; | |
| 6744 } | |
| 6745 | |
| 6746 checkUnnamed347(core.List<api.SortedDimension> o) { | |
| 6747 unittest.expect(o, unittest.hasLength(2)); | |
| 6748 checkSortedDimension(o[0]); | |
| 6749 checkSortedDimension(o[1]); | |
| 6750 } | |
| 6751 | |
| 6752 buildUnnamed348() { | |
| 6753 var o = new core.List<core.String>(); | |
| 6754 o.add("foo"); | |
| 6755 o.add("foo"); | |
| 6756 return o; | |
| 6757 } | |
| 6758 | |
| 6759 checkUnnamed348(core.List<core.String> o) { | |
| 6760 unittest.expect(o, unittest.hasLength(2)); | |
| 6761 unittest.expect(o[0], unittest.equals('foo')); | |
| 6762 unittest.expect(o[1], unittest.equals('foo')); | |
| 6763 } | |
| 6764 | |
| 6765 buildUnnamed349() { | |
| 6766 var o = new core.List<core.String>(); | |
| 6767 o.add("foo"); | |
| 6768 o.add("foo"); | |
| 6769 return o; | |
| 6770 } | |
| 6771 | |
| 6772 checkUnnamed349(core.List<core.String> o) { | |
| 6773 unittest.expect(o, unittest.hasLength(2)); | |
| 6774 unittest.expect(o[0], unittest.equals('foo')); | |
| 6775 unittest.expect(o[1], unittest.equals('foo')); | |
| 6776 } | |
| 6777 | |
| 6778 core.int buildCounterReportReachCriteria = 0; | |
| 6779 buildReportReachCriteria() { | |
| 6780 var o = new api.ReportReachCriteria(); | |
| 6781 buildCounterReportReachCriteria++; | |
| 6782 if (buildCounterReportReachCriteria < 3) { | |
| 6783 o.activities = buildActivities(); | |
| 6784 o.customRichMediaEvents = buildCustomRichMediaEvents(); | |
| 6785 o.dateRange = buildDateRange(); | |
| 6786 o.dimensionFilters = buildUnnamed346(); | |
| 6787 o.dimensions = buildUnnamed347(); | |
| 6788 o.enableAllDimensionCombinations = true; | |
| 6789 o.metricNames = buildUnnamed348(); | |
| 6790 o.reachByFrequencyMetricNames = buildUnnamed349(); | |
| 6791 } | |
| 6792 buildCounterReportReachCriteria--; | |
| 6793 return o; | |
| 6794 } | |
| 6795 | |
| 6796 checkReportReachCriteria(api.ReportReachCriteria o) { | |
| 6797 buildCounterReportReachCriteria++; | |
| 6798 if (buildCounterReportReachCriteria < 3) { | |
| 6799 checkActivities(o.activities); | |
| 6800 checkCustomRichMediaEvents(o.customRichMediaEvents); | |
| 6801 checkDateRange(o.dateRange); | |
| 6802 checkUnnamed346(o.dimensionFilters); | |
| 6803 checkUnnamed347(o.dimensions); | |
| 6804 unittest.expect(o.enableAllDimensionCombinations, unittest.isTrue); | |
| 6805 checkUnnamed348(o.metricNames); | |
| 6806 checkUnnamed349(o.reachByFrequencyMetricNames); | |
| 6807 } | |
| 6808 buildCounterReportReachCriteria--; | |
| 6809 } | |
| 6810 | |
| 6811 buildUnnamed350() { | |
| 6812 var o = new core.List<core.String>(); | |
| 6813 o.add("foo"); | |
| 6814 o.add("foo"); | |
| 6815 return o; | |
| 6816 } | |
| 6817 | |
| 6818 checkUnnamed350(core.List<core.String> o) { | |
| 6819 unittest.expect(o, unittest.hasLength(2)); | |
| 6820 unittest.expect(o[0], unittest.equals('foo')); | |
| 6821 unittest.expect(o[1], unittest.equals('foo')); | |
| 6822 } | |
| 6823 | |
| 6824 core.int buildCounterReportSchedule = 0; | |
| 6825 buildReportSchedule() { | |
| 6826 var o = new api.ReportSchedule(); | |
| 6827 buildCounterReportSchedule++; | |
| 6828 if (buildCounterReportSchedule < 3) { | |
| 6829 o.active = true; | |
| 6830 o.every = 42; | |
| 6831 o.expirationDate = core.DateTime.parse("2002-02-27T14:01:02Z"); | |
| 6832 o.repeats = "foo"; | |
| 6833 o.repeatsOnWeekDays = buildUnnamed350(); | |
| 6834 o.runsOnDayOfMonth = "foo"; | |
| 6835 o.startDate = core.DateTime.parse("2002-02-27T14:01:02Z"); | |
| 6836 } | |
| 6837 buildCounterReportSchedule--; | |
| 6838 return o; | |
| 6839 } | |
| 6840 | |
| 6841 checkReportSchedule(api.ReportSchedule o) { | |
| 6842 buildCounterReportSchedule++; | |
| 6843 if (buildCounterReportSchedule < 3) { | |
| 6844 unittest.expect(o.active, unittest.isTrue); | |
| 6845 unittest.expect(o.every, unittest.equals(42)); | |
| 6846 unittest.expect(o.expirationDate, unittest.equals(core.DateTime.parse("2002-
02-27T00:00:00"))); | |
| 6847 unittest.expect(o.repeats, unittest.equals('foo')); | |
| 6848 checkUnnamed350(o.repeatsOnWeekDays); | |
| 6849 unittest.expect(o.runsOnDayOfMonth, unittest.equals('foo')); | |
| 6850 unittest.expect(o.startDate, unittest.equals(core.DateTime.parse("2002-02-27
T00:00:00"))); | |
| 6851 } | |
| 6852 buildCounterReportSchedule--; | |
| 6853 } | |
| 6854 | |
| 6855 core.int buildCounterReport = 0; | |
| 6856 buildReport() { | |
| 6857 var o = new api.Report(); | |
| 6858 buildCounterReport++; | |
| 6859 if (buildCounterReport < 3) { | |
| 6860 o.accountId = "foo"; | |
| 6861 o.criteria = buildReportCriteria(); | |
| 6862 o.crossDimensionReachCriteria = buildReportCrossDimensionReachCriteria(); | |
| 6863 o.delivery = buildReportDelivery(); | |
| 6864 o.etag = "foo"; | |
| 6865 o.fileName = "foo"; | |
| 6866 o.floodlightCriteria = buildReportFloodlightCriteria(); | |
| 6867 o.format = "foo"; | |
| 6868 o.id = "foo"; | |
| 6869 o.kind = "foo"; | |
| 6870 o.lastModifiedTime = "foo"; | |
| 6871 o.name = "foo"; | |
| 6872 o.ownerProfileId = "foo"; | |
| 6873 o.pathToConversionCriteria = buildReportPathToConversionCriteria(); | |
| 6874 o.reachCriteria = buildReportReachCriteria(); | |
| 6875 o.schedule = buildReportSchedule(); | |
| 6876 o.subAccountId = "foo"; | |
| 6877 o.type = "foo"; | |
| 6878 } | |
| 6879 buildCounterReport--; | |
| 6880 return o; | |
| 6881 } | |
| 6882 | |
| 6883 checkReport(api.Report o) { | |
| 6884 buildCounterReport++; | |
| 6885 if (buildCounterReport < 3) { | |
| 6886 unittest.expect(o.accountId, unittest.equals('foo')); | |
| 6887 checkReportCriteria(o.criteria); | |
| 6888 checkReportCrossDimensionReachCriteria(o.crossDimensionReachCriteria); | |
| 6889 checkReportDelivery(o.delivery); | |
| 6890 unittest.expect(o.etag, unittest.equals('foo')); | |
| 6891 unittest.expect(o.fileName, unittest.equals('foo')); | |
| 6892 checkReportFloodlightCriteria(o.floodlightCriteria); | |
| 6893 unittest.expect(o.format, unittest.equals('foo')); | |
| 6894 unittest.expect(o.id, unittest.equals('foo')); | |
| 6895 unittest.expect(o.kind, unittest.equals('foo')); | |
| 6896 unittest.expect(o.lastModifiedTime, unittest.equals('foo')); | |
| 6897 unittest.expect(o.name, unittest.equals('foo')); | |
| 6898 unittest.expect(o.ownerProfileId, unittest.equals('foo')); | |
| 6899 checkReportPathToConversionCriteria(o.pathToConversionCriteria); | |
| 6900 checkReportReachCriteria(o.reachCriteria); | |
| 6901 checkReportSchedule(o.schedule); | |
| 6902 unittest.expect(o.subAccountId, unittest.equals('foo')); | |
| 6903 unittest.expect(o.type, unittest.equals('foo')); | |
| 6904 } | |
| 6905 buildCounterReport--; | |
| 6906 } | |
| 6907 | |
| 6908 buildUnnamed351() { | |
| 6909 var o = new core.List<api.Dimension>(); | |
| 6910 o.add(buildDimension()); | |
| 6911 o.add(buildDimension()); | |
| 6912 return o; | |
| 6913 } | |
| 6914 | |
| 6915 checkUnnamed351(core.List<api.Dimension> o) { | |
| 6916 unittest.expect(o, unittest.hasLength(2)); | |
| 6917 checkDimension(o[0]); | |
| 6918 checkDimension(o[1]); | |
| 6919 } | |
| 6920 | |
| 6921 buildUnnamed352() { | |
| 6922 var o = new core.List<api.Dimension>(); | |
| 6923 o.add(buildDimension()); | |
| 6924 o.add(buildDimension()); | |
| 6925 return o; | |
| 6926 } | |
| 6927 | |
| 6928 checkUnnamed352(core.List<api.Dimension> o) { | |
| 6929 unittest.expect(o, unittest.hasLength(2)); | |
| 6930 checkDimension(o[0]); | |
| 6931 checkDimension(o[1]); | |
| 6932 } | |
| 6933 | |
| 6934 buildUnnamed353() { | |
| 6935 var o = new core.List<api.Metric>(); | |
| 6936 o.add(buildMetric()); | |
| 6937 o.add(buildMetric()); | |
| 6938 return o; | |
| 6939 } | |
| 6940 | |
| 6941 checkUnnamed353(core.List<api.Metric> o) { | |
| 6942 unittest.expect(o, unittest.hasLength(2)); | |
| 6943 checkMetric(o[0]); | |
| 6944 checkMetric(o[1]); | |
| 6945 } | |
| 6946 | |
| 6947 buildUnnamed354() { | |
| 6948 var o = new core.List<api.Metric>(); | |
| 6949 o.add(buildMetric()); | |
| 6950 o.add(buildMetric()); | |
| 6951 return o; | |
| 6952 } | |
| 6953 | |
| 6954 checkUnnamed354(core.List<api.Metric> o) { | |
| 6955 unittest.expect(o, unittest.hasLength(2)); | |
| 6956 checkMetric(o[0]); | |
| 6957 checkMetric(o[1]); | |
| 6958 } | |
| 6959 | |
| 6960 core.int buildCounterReportCompatibleFields = 0; | |
| 6961 buildReportCompatibleFields() { | |
| 6962 var o = new api.ReportCompatibleFields(); | |
| 6963 buildCounterReportCompatibleFields++; | |
| 6964 if (buildCounterReportCompatibleFields < 3) { | |
| 6965 o.dimensionFilters = buildUnnamed351(); | |
| 6966 o.dimensions = buildUnnamed352(); | |
| 6967 o.kind = "foo"; | |
| 6968 o.metrics = buildUnnamed353(); | |
| 6969 o.pivotedActivityMetrics = buildUnnamed354(); | |
| 6970 } | |
| 6971 buildCounterReportCompatibleFields--; | |
| 6972 return o; | |
| 6973 } | |
| 6974 | |
| 6975 checkReportCompatibleFields(api.ReportCompatibleFields o) { | |
| 6976 buildCounterReportCompatibleFields++; | |
| 6977 if (buildCounterReportCompatibleFields < 3) { | |
| 6978 checkUnnamed351(o.dimensionFilters); | |
| 6979 checkUnnamed352(o.dimensions); | |
| 6980 unittest.expect(o.kind, unittest.equals('foo')); | |
| 6981 checkUnnamed353(o.metrics); | |
| 6982 checkUnnamed354(o.pivotedActivityMetrics); | |
| 6983 } | |
| 6984 buildCounterReportCompatibleFields--; | |
| 6985 } | |
| 6986 | |
| 6987 buildUnnamed355() { | |
| 6988 var o = new core.List<api.Report>(); | |
| 6989 o.add(buildReport()); | |
| 6990 o.add(buildReport()); | |
| 6991 return o; | |
| 6992 } | |
| 6993 | |
| 6994 checkUnnamed355(core.List<api.Report> o) { | |
| 6995 unittest.expect(o, unittest.hasLength(2)); | |
| 6996 checkReport(o[0]); | |
| 6997 checkReport(o[1]); | |
| 6998 } | |
| 6999 | |
| 7000 core.int buildCounterReportList = 0; | |
| 7001 buildReportList() { | |
| 7002 var o = new api.ReportList(); | |
| 7003 buildCounterReportList++; | |
| 7004 if (buildCounterReportList < 3) { | |
| 7005 o.etag = "foo"; | |
| 7006 o.items = buildUnnamed355(); | |
| 7007 o.kind = "foo"; | |
| 7008 o.nextPageToken = "foo"; | |
| 7009 } | |
| 7010 buildCounterReportList--; | |
| 7011 return o; | |
| 7012 } | |
| 7013 | |
| 7014 checkReportList(api.ReportList o) { | |
| 7015 buildCounterReportList++; | |
| 7016 if (buildCounterReportList < 3) { | |
| 7017 unittest.expect(o.etag, unittest.equals('foo')); | |
| 7018 checkUnnamed355(o.items); | |
| 7019 unittest.expect(o.kind, unittest.equals('foo')); | |
| 7020 unittest.expect(o.nextPageToken, unittest.equals('foo')); | |
| 7021 } | |
| 7022 buildCounterReportList--; | |
| 7023 } | |
| 7024 | |
| 7025 core.int buildCounterReportsConfiguration = 0; | |
| 7026 buildReportsConfiguration() { | |
| 7027 var o = new api.ReportsConfiguration(); | |
| 7028 buildCounterReportsConfiguration++; | |
| 7029 if (buildCounterReportsConfiguration < 3) { | |
| 7030 o.exposureToConversionEnabled = true; | |
| 7031 o.lookbackConfiguration = buildLookbackConfiguration(); | |
| 7032 o.reportGenerationTimeZoneId = "foo"; | |
| 7033 } | |
| 7034 buildCounterReportsConfiguration--; | |
| 7035 return o; | |
| 7036 } | |
| 7037 | |
| 7038 checkReportsConfiguration(api.ReportsConfiguration o) { | |
| 7039 buildCounterReportsConfiguration++; | |
| 7040 if (buildCounterReportsConfiguration < 3) { | |
| 7041 unittest.expect(o.exposureToConversionEnabled, unittest.isTrue); | |
| 7042 checkLookbackConfiguration(o.lookbackConfiguration); | |
| 7043 unittest.expect(o.reportGenerationTimeZoneId, unittest.equals('foo')); | |
| 7044 } | |
| 7045 buildCounterReportsConfiguration--; | |
| 7046 } | |
| 7047 | |
| 7048 core.int buildCounterRichMediaExitOverride = 0; | |
| 7049 buildRichMediaExitOverride() { | |
| 7050 var o = new api.RichMediaExitOverride(); | |
| 7051 buildCounterRichMediaExitOverride++; | |
| 7052 if (buildCounterRichMediaExitOverride < 3) { | |
| 7053 o.customExitUrl = "foo"; | |
| 7054 o.exitId = "foo"; | |
| 7055 o.useCustomExitUrl = true; | |
| 7056 } | |
| 7057 buildCounterRichMediaExitOverride--; | |
| 7058 return o; | |
| 7059 } | |
| 7060 | |
| 7061 checkRichMediaExitOverride(api.RichMediaExitOverride o) { | |
| 7062 buildCounterRichMediaExitOverride++; | |
| 7063 if (buildCounterRichMediaExitOverride < 3) { | |
| 7064 unittest.expect(o.customExitUrl, unittest.equals('foo')); | |
| 7065 unittest.expect(o.exitId, unittest.equals('foo')); | |
| 7066 unittest.expect(o.useCustomExitUrl, unittest.isTrue); | |
| 7067 } | |
| 7068 buildCounterRichMediaExitOverride--; | |
| 7069 } | |
| 7070 | |
| 7071 buildUnnamed356() { | |
| 7072 var o = new core.List<api.SiteContact>(); | |
| 7073 o.add(buildSiteContact()); | |
| 7074 o.add(buildSiteContact()); | |
| 7075 return o; | |
| 7076 } | |
| 7077 | |
| 7078 checkUnnamed356(core.List<api.SiteContact> o) { | |
| 7079 unittest.expect(o, unittest.hasLength(2)); | |
| 7080 checkSiteContact(o[0]); | |
| 7081 checkSiteContact(o[1]); | |
| 7082 } | |
| 7083 | |
| 7084 core.int buildCounterSite = 0; | |
| 7085 buildSite() { | |
| 7086 var o = new api.Site(); | |
| 7087 buildCounterSite++; | |
| 7088 if (buildCounterSite < 3) { | |
| 7089 o.accountId = "foo"; | |
| 7090 o.approved = true; | |
| 7091 o.directorySiteId = "foo"; | |
| 7092 o.directorySiteIdDimensionValue = buildDimensionValue(); | |
| 7093 o.id = "foo"; | |
| 7094 o.idDimensionValue = buildDimensionValue(); | |
| 7095 o.keyName = "foo"; | |
| 7096 o.kind = "foo"; | |
| 7097 o.name = "foo"; | |
| 7098 o.siteContacts = buildUnnamed356(); | |
| 7099 o.siteSettings = buildSiteSettings(); | |
| 7100 o.subaccountId = "foo"; | |
| 7101 } | |
| 7102 buildCounterSite--; | |
| 7103 return o; | |
| 7104 } | |
| 7105 | |
| 7106 checkSite(api.Site o) { | |
| 7107 buildCounterSite++; | |
| 7108 if (buildCounterSite < 3) { | |
| 7109 unittest.expect(o.accountId, unittest.equals('foo')); | |
| 7110 unittest.expect(o.approved, unittest.isTrue); | |
| 7111 unittest.expect(o.directorySiteId, unittest.equals('foo')); | |
| 7112 checkDimensionValue(o.directorySiteIdDimensionValue); | |
| 7113 unittest.expect(o.id, unittest.equals('foo')); | |
| 7114 checkDimensionValue(o.idDimensionValue); | |
| 7115 unittest.expect(o.keyName, unittest.equals('foo')); | |
| 7116 unittest.expect(o.kind, unittest.equals('foo')); | |
| 7117 unittest.expect(o.name, unittest.equals('foo')); | |
| 7118 checkUnnamed356(o.siteContacts); | |
| 7119 checkSiteSettings(o.siteSettings); | |
| 7120 unittest.expect(o.subaccountId, unittest.equals('foo')); | |
| 7121 } | |
| 7122 buildCounterSite--; | |
| 7123 } | |
| 7124 | |
| 7125 core.int buildCounterSiteContact = 0; | |
| 7126 buildSiteContact() { | |
| 7127 var o = new api.SiteContact(); | |
| 7128 buildCounterSiteContact++; | |
| 7129 if (buildCounterSiteContact < 3) { | |
| 7130 o.address = "foo"; | |
| 7131 o.contactType = "foo"; | |
| 7132 o.email = "foo"; | |
| 7133 o.firstName = "foo"; | |
| 7134 o.id = "foo"; | |
| 7135 o.lastName = "foo"; | |
| 7136 o.phone = "foo"; | |
| 7137 o.title = "foo"; | |
| 7138 } | |
| 7139 buildCounterSiteContact--; | |
| 7140 return o; | |
| 7141 } | |
| 7142 | |
| 7143 checkSiteContact(api.SiteContact o) { | |
| 7144 buildCounterSiteContact++; | |
| 7145 if (buildCounterSiteContact < 3) { | |
| 7146 unittest.expect(o.address, unittest.equals('foo')); | |
| 7147 unittest.expect(o.contactType, unittest.equals('foo')); | |
| 7148 unittest.expect(o.email, unittest.equals('foo')); | |
| 7149 unittest.expect(o.firstName, unittest.equals('foo')); | |
| 7150 unittest.expect(o.id, unittest.equals('foo')); | |
| 7151 unittest.expect(o.lastName, unittest.equals('foo')); | |
| 7152 unittest.expect(o.phone, unittest.equals('foo')); | |
| 7153 unittest.expect(o.title, unittest.equals('foo')); | |
| 7154 } | |
| 7155 buildCounterSiteContact--; | |
| 7156 } | |
| 7157 | |
| 7158 core.int buildCounterSiteSettings = 0; | |
| 7159 buildSiteSettings() { | |
| 7160 var o = new api.SiteSettings(); | |
| 7161 buildCounterSiteSettings++; | |
| 7162 if (buildCounterSiteSettings < 3) { | |
| 7163 o.activeViewOptOut = true; | |
| 7164 o.creativeSettings = buildCreativeSettings(); | |
| 7165 o.disableBrandSafeAds = true; | |
| 7166 o.disableNewCookie = true; | |
| 7167 o.lookbackConfiguration = buildLookbackConfiguration(); | |
| 7168 o.tagSetting = buildTagSetting(); | |
| 7169 o.videoActiveViewOptOut = true; | |
| 7170 } | |
| 7171 buildCounterSiteSettings--; | |
| 7172 return o; | |
| 7173 } | |
| 7174 | |
| 7175 checkSiteSettings(api.SiteSettings o) { | |
| 7176 buildCounterSiteSettings++; | |
| 7177 if (buildCounterSiteSettings < 3) { | |
| 7178 unittest.expect(o.activeViewOptOut, unittest.isTrue); | |
| 7179 checkCreativeSettings(o.creativeSettings); | |
| 7180 unittest.expect(o.disableBrandSafeAds, unittest.isTrue); | |
| 7181 unittest.expect(o.disableNewCookie, unittest.isTrue); | |
| 7182 checkLookbackConfiguration(o.lookbackConfiguration); | |
| 7183 checkTagSetting(o.tagSetting); | |
| 7184 unittest.expect(o.videoActiveViewOptOut, unittest.isTrue); | |
| 7185 } | |
| 7186 buildCounterSiteSettings--; | |
| 7187 } | |
| 7188 | |
| 7189 buildUnnamed357() { | |
| 7190 var o = new core.List<api.Site>(); | |
| 7191 o.add(buildSite()); | |
| 7192 o.add(buildSite()); | |
| 7193 return o; | |
| 7194 } | |
| 7195 | |
| 7196 checkUnnamed357(core.List<api.Site> o) { | |
| 7197 unittest.expect(o, unittest.hasLength(2)); | |
| 7198 checkSite(o[0]); | |
| 7199 checkSite(o[1]); | |
| 7200 } | |
| 7201 | |
| 7202 core.int buildCounterSitesListResponse = 0; | |
| 7203 buildSitesListResponse() { | |
| 7204 var o = new api.SitesListResponse(); | |
| 7205 buildCounterSitesListResponse++; | |
| 7206 if (buildCounterSitesListResponse < 3) { | |
| 7207 o.kind = "foo"; | |
| 7208 o.nextPageToken = "foo"; | |
| 7209 o.sites = buildUnnamed357(); | |
| 7210 } | |
| 7211 buildCounterSitesListResponse--; | |
| 7212 return o; | |
| 7213 } | |
| 7214 | |
| 7215 checkSitesListResponse(api.SitesListResponse o) { | |
| 7216 buildCounterSitesListResponse++; | |
| 7217 if (buildCounterSitesListResponse < 3) { | |
| 7218 unittest.expect(o.kind, unittest.equals('foo')); | |
| 7219 unittest.expect(o.nextPageToken, unittest.equals('foo')); | |
| 7220 checkUnnamed357(o.sites); | |
| 7221 } | |
| 7222 buildCounterSitesListResponse--; | |
| 7223 } | |
| 7224 | |
| 7225 core.int buildCounterSize = 0; | |
| 7226 buildSize() { | |
| 7227 var o = new api.Size(); | |
| 7228 buildCounterSize++; | |
| 7229 if (buildCounterSize < 3) { | |
| 7230 o.height = 42; | |
| 7231 o.iab = true; | |
| 7232 o.id = "foo"; | |
| 7233 o.kind = "foo"; | |
| 7234 o.width = 42; | |
| 7235 } | |
| 7236 buildCounterSize--; | |
| 7237 return o; | |
| 7238 } | |
| 7239 | |
| 7240 checkSize(api.Size o) { | |
| 7241 buildCounterSize++; | |
| 7242 if (buildCounterSize < 3) { | |
| 7243 unittest.expect(o.height, unittest.equals(42)); | |
| 7244 unittest.expect(o.iab, unittest.isTrue); | |
| 7245 unittest.expect(o.id, unittest.equals('foo')); | |
| 7246 unittest.expect(o.kind, unittest.equals('foo')); | |
| 7247 unittest.expect(o.width, unittest.equals(42)); | |
| 7248 } | |
| 7249 buildCounterSize--; | |
| 7250 } | |
| 7251 | |
| 7252 buildUnnamed358() { | |
| 7253 var o = new core.List<api.Size>(); | |
| 7254 o.add(buildSize()); | |
| 7255 o.add(buildSize()); | |
| 7256 return o; | |
| 7257 } | |
| 7258 | |
| 7259 checkUnnamed358(core.List<api.Size> o) { | |
| 7260 unittest.expect(o, unittest.hasLength(2)); | |
| 7261 checkSize(o[0]); | |
| 7262 checkSize(o[1]); | |
| 7263 } | |
| 7264 | |
| 7265 core.int buildCounterSizesListResponse = 0; | |
| 7266 buildSizesListResponse() { | |
| 7267 var o = new api.SizesListResponse(); | |
| 7268 buildCounterSizesListResponse++; | |
| 7269 if (buildCounterSizesListResponse < 3) { | |
| 7270 o.kind = "foo"; | |
| 7271 o.sizes = buildUnnamed358(); | |
| 7272 } | |
| 7273 buildCounterSizesListResponse--; | |
| 7274 return o; | |
| 7275 } | |
| 7276 | |
| 7277 checkSizesListResponse(api.SizesListResponse o) { | |
| 7278 buildCounterSizesListResponse++; | |
| 7279 if (buildCounterSizesListResponse < 3) { | |
| 7280 unittest.expect(o.kind, unittest.equals('foo')); | |
| 7281 checkUnnamed358(o.sizes); | |
| 7282 } | |
| 7283 buildCounterSizesListResponse--; | |
| 7284 } | |
| 7285 | |
| 7286 core.int buildCounterSortedDimension = 0; | |
| 7287 buildSortedDimension() { | |
| 7288 var o = new api.SortedDimension(); | |
| 7289 buildCounterSortedDimension++; | |
| 7290 if (buildCounterSortedDimension < 3) { | |
| 7291 o.kind = "foo"; | |
| 7292 o.name = "foo"; | |
| 7293 o.sortOrder = "foo"; | |
| 7294 } | |
| 7295 buildCounterSortedDimension--; | |
| 7296 return o; | |
| 7297 } | |
| 7298 | |
| 7299 checkSortedDimension(api.SortedDimension o) { | |
| 7300 buildCounterSortedDimension++; | |
| 7301 if (buildCounterSortedDimension < 3) { | |
| 7302 unittest.expect(o.kind, unittest.equals('foo')); | |
| 7303 unittest.expect(o.name, unittest.equals('foo')); | |
| 7304 unittest.expect(o.sortOrder, unittest.equals('foo')); | |
| 7305 } | |
| 7306 buildCounterSortedDimension--; | |
| 7307 } | |
| 7308 | |
| 7309 buildUnnamed359() { | |
| 7310 var o = new core.List<core.String>(); | |
| 7311 o.add("foo"); | |
| 7312 o.add("foo"); | |
| 7313 return o; | |
| 7314 } | |
| 7315 | |
| 7316 checkUnnamed359(core.List<core.String> o) { | |
| 7317 unittest.expect(o, unittest.hasLength(2)); | |
| 7318 unittest.expect(o[0], unittest.equals('foo')); | |
| 7319 unittest.expect(o[1], unittest.equals('foo')); | |
| 7320 } | |
| 7321 | |
| 7322 core.int buildCounterSubaccount = 0; | |
| 7323 buildSubaccount() { | |
| 7324 var o = new api.Subaccount(); | |
| 7325 buildCounterSubaccount++; | |
| 7326 if (buildCounterSubaccount < 3) { | |
| 7327 o.accountId = "foo"; | |
| 7328 o.availablePermissionIds = buildUnnamed359(); | |
| 7329 o.id = "foo"; | |
| 7330 o.kind = "foo"; | |
| 7331 o.name = "foo"; | |
| 7332 } | |
| 7333 buildCounterSubaccount--; | |
| 7334 return o; | |
| 7335 } | |
| 7336 | |
| 7337 checkSubaccount(api.Subaccount o) { | |
| 7338 buildCounterSubaccount++; | |
| 7339 if (buildCounterSubaccount < 3) { | |
| 7340 unittest.expect(o.accountId, unittest.equals('foo')); | |
| 7341 checkUnnamed359(o.availablePermissionIds); | |
| 7342 unittest.expect(o.id, unittest.equals('foo')); | |
| 7343 unittest.expect(o.kind, unittest.equals('foo')); | |
| 7344 unittest.expect(o.name, unittest.equals('foo')); | |
| 7345 } | |
| 7346 buildCounterSubaccount--; | |
| 7347 } | |
| 7348 | |
| 7349 buildUnnamed360() { | |
| 7350 var o = new core.List<api.Subaccount>(); | |
| 7351 o.add(buildSubaccount()); | |
| 7352 o.add(buildSubaccount()); | |
| 7353 return o; | |
| 7354 } | |
| 7355 | |
| 7356 checkUnnamed360(core.List<api.Subaccount> o) { | |
| 7357 unittest.expect(o, unittest.hasLength(2)); | |
| 7358 checkSubaccount(o[0]); | |
| 7359 checkSubaccount(o[1]); | |
| 7360 } | |
| 7361 | |
| 7362 core.int buildCounterSubaccountsListResponse = 0; | |
| 7363 buildSubaccountsListResponse() { | |
| 7364 var o = new api.SubaccountsListResponse(); | |
| 7365 buildCounterSubaccountsListResponse++; | |
| 7366 if (buildCounterSubaccountsListResponse < 3) { | |
| 7367 o.kind = "foo"; | |
| 7368 o.nextPageToken = "foo"; | |
| 7369 o.subaccounts = buildUnnamed360(); | |
| 7370 } | |
| 7371 buildCounterSubaccountsListResponse--; | |
| 7372 return o; | |
| 7373 } | |
| 7374 | |
| 7375 checkSubaccountsListResponse(api.SubaccountsListResponse o) { | |
| 7376 buildCounterSubaccountsListResponse++; | |
| 7377 if (buildCounterSubaccountsListResponse < 3) { | |
| 7378 unittest.expect(o.kind, unittest.equals('foo')); | |
| 7379 unittest.expect(o.nextPageToken, unittest.equals('foo')); | |
| 7380 checkUnnamed360(o.subaccounts); | |
| 7381 } | |
| 7382 buildCounterSubaccountsListResponse--; | |
| 7383 } | |
| 7384 | |
| 7385 core.int buildCounterTagData = 0; | |
| 7386 buildTagData() { | |
| 7387 var o = new api.TagData(); | |
| 7388 buildCounterTagData++; | |
| 7389 if (buildCounterTagData < 3) { | |
| 7390 o.adId = "foo"; | |
| 7391 o.clickTag = "foo"; | |
| 7392 o.creativeId = "foo"; | |
| 7393 o.format = "foo"; | |
| 7394 o.impressionTag = "foo"; | |
| 7395 } | |
| 7396 buildCounterTagData--; | |
| 7397 return o; | |
| 7398 } | |
| 7399 | |
| 7400 checkTagData(api.TagData o) { | |
| 7401 buildCounterTagData++; | |
| 7402 if (buildCounterTagData < 3) { | |
| 7403 unittest.expect(o.adId, unittest.equals('foo')); | |
| 7404 unittest.expect(o.clickTag, unittest.equals('foo')); | |
| 7405 unittest.expect(o.creativeId, unittest.equals('foo')); | |
| 7406 unittest.expect(o.format, unittest.equals('foo')); | |
| 7407 unittest.expect(o.impressionTag, unittest.equals('foo')); | |
| 7408 } | |
| 7409 buildCounterTagData--; | |
| 7410 } | |
| 7411 | |
| 7412 core.int buildCounterTagSetting = 0; | |
| 7413 buildTagSetting() { | |
| 7414 var o = new api.TagSetting(); | |
| 7415 buildCounterTagSetting++; | |
| 7416 if (buildCounterTagSetting < 3) { | |
| 7417 o.additionalKeyValues = "foo"; | |
| 7418 o.includeClickThroughUrls = true; | |
| 7419 o.includeClickTracking = true; | |
| 7420 o.keywordOption = "foo"; | |
| 7421 } | |
| 7422 buildCounterTagSetting--; | |
| 7423 return o; | |
| 7424 } | |
| 7425 | |
| 7426 checkTagSetting(api.TagSetting o) { | |
| 7427 buildCounterTagSetting++; | |
| 7428 if (buildCounterTagSetting < 3) { | |
| 7429 unittest.expect(o.additionalKeyValues, unittest.equals('foo')); | |
| 7430 unittest.expect(o.includeClickThroughUrls, unittest.isTrue); | |
| 7431 unittest.expect(o.includeClickTracking, unittest.isTrue); | |
| 7432 unittest.expect(o.keywordOption, unittest.equals('foo')); | |
| 7433 } | |
| 7434 buildCounterTagSetting--; | |
| 7435 } | |
| 7436 | |
| 7437 core.int buildCounterTagSettings = 0; | |
| 7438 buildTagSettings() { | |
| 7439 var o = new api.TagSettings(); | |
| 7440 buildCounterTagSettings++; | |
| 7441 if (buildCounterTagSettings < 3) { | |
| 7442 o.dynamicTagEnabled = true; | |
| 7443 o.imageTagEnabled = true; | |
| 7444 } | |
| 7445 buildCounterTagSettings--; | |
| 7446 return o; | |
| 7447 } | |
| 7448 | |
| 7449 checkTagSettings(api.TagSettings o) { | |
| 7450 buildCounterTagSettings++; | |
| 7451 if (buildCounterTagSettings < 3) { | |
| 7452 unittest.expect(o.dynamicTagEnabled, unittest.isTrue); | |
| 7453 unittest.expect(o.imageTagEnabled, unittest.isTrue); | |
| 7454 } | |
| 7455 buildCounterTagSettings--; | |
| 7456 } | |
| 7457 | |
| 7458 core.int buildCounterTargetWindow = 0; | |
| 7459 buildTargetWindow() { | |
| 7460 var o = new api.TargetWindow(); | |
| 7461 buildCounterTargetWindow++; | |
| 7462 if (buildCounterTargetWindow < 3) { | |
| 7463 o.customHtml = "foo"; | |
| 7464 o.targetWindowOption = "foo"; | |
| 7465 } | |
| 7466 buildCounterTargetWindow--; | |
| 7467 return o; | |
| 7468 } | |
| 7469 | |
| 7470 checkTargetWindow(api.TargetWindow o) { | |
| 7471 buildCounterTargetWindow++; | |
| 7472 if (buildCounterTargetWindow < 3) { | |
| 7473 unittest.expect(o.customHtml, unittest.equals('foo')); | |
| 7474 unittest.expect(o.targetWindowOption, unittest.equals('foo')); | |
| 7475 } | |
| 7476 buildCounterTargetWindow--; | |
| 7477 } | |
| 7478 | |
| 7479 core.int buildCounterTargetableRemarketingList = 0; | |
| 7480 buildTargetableRemarketingList() { | |
| 7481 var o = new api.TargetableRemarketingList(); | |
| 7482 buildCounterTargetableRemarketingList++; | |
| 7483 if (buildCounterTargetableRemarketingList < 3) { | |
| 7484 o.accountId = "foo"; | |
| 7485 o.active = true; | |
| 7486 o.advertiserId = "foo"; | |
| 7487 o.advertiserIdDimensionValue = buildDimensionValue(); | |
| 7488 o.description = "foo"; | |
| 7489 o.id = "foo"; | |
| 7490 o.kind = "foo"; | |
| 7491 o.lifeSpan = "foo"; | |
| 7492 o.listSize = "foo"; | |
| 7493 o.listSource = "foo"; | |
| 7494 o.name = "foo"; | |
| 7495 o.subaccountId = "foo"; | |
| 7496 } | |
| 7497 buildCounterTargetableRemarketingList--; | |
| 7498 return o; | |
| 7499 } | |
| 7500 | |
| 7501 checkTargetableRemarketingList(api.TargetableRemarketingList o) { | |
| 7502 buildCounterTargetableRemarketingList++; | |
| 7503 if (buildCounterTargetableRemarketingList < 3) { | |
| 7504 unittest.expect(o.accountId, unittest.equals('foo')); | |
| 7505 unittest.expect(o.active, unittest.isTrue); | |
| 7506 unittest.expect(o.advertiserId, unittest.equals('foo')); | |
| 7507 checkDimensionValue(o.advertiserIdDimensionValue); | |
| 7508 unittest.expect(o.description, unittest.equals('foo')); | |
| 7509 unittest.expect(o.id, unittest.equals('foo')); | |
| 7510 unittest.expect(o.kind, unittest.equals('foo')); | |
| 7511 unittest.expect(o.lifeSpan, unittest.equals('foo')); | |
| 7512 unittest.expect(o.listSize, unittest.equals('foo')); | |
| 7513 unittest.expect(o.listSource, unittest.equals('foo')); | |
| 7514 unittest.expect(o.name, unittest.equals('foo')); | |
| 7515 unittest.expect(o.subaccountId, unittest.equals('foo')); | |
| 7516 } | |
| 7517 buildCounterTargetableRemarketingList--; | |
| 7518 } | |
| 7519 | |
| 7520 buildUnnamed361() { | |
| 7521 var o = new core.List<api.TargetableRemarketingList>(); | |
| 7522 o.add(buildTargetableRemarketingList()); | |
| 7523 o.add(buildTargetableRemarketingList()); | |
| 7524 return o; | |
| 7525 } | |
| 7526 | |
| 7527 checkUnnamed361(core.List<api.TargetableRemarketingList> o) { | |
| 7528 unittest.expect(o, unittest.hasLength(2)); | |
| 7529 checkTargetableRemarketingList(o[0]); | |
| 7530 checkTargetableRemarketingList(o[1]); | |
| 7531 } | |
| 7532 | |
| 7533 core.int buildCounterTargetableRemarketingListsListResponse = 0; | |
| 7534 buildTargetableRemarketingListsListResponse() { | |
| 7535 var o = new api.TargetableRemarketingListsListResponse(); | |
| 7536 buildCounterTargetableRemarketingListsListResponse++; | |
| 7537 if (buildCounterTargetableRemarketingListsListResponse < 3) { | |
| 7538 o.kind = "foo"; | |
| 7539 o.nextPageToken = "foo"; | |
| 7540 o.targetableRemarketingLists = buildUnnamed361(); | |
| 7541 } | |
| 7542 buildCounterTargetableRemarketingListsListResponse--; | |
| 7543 return o; | |
| 7544 } | |
| 7545 | |
| 7546 checkTargetableRemarketingListsListResponse(api.TargetableRemarketingListsListRe
sponse o) { | |
| 7547 buildCounterTargetableRemarketingListsListResponse++; | |
| 7548 if (buildCounterTargetableRemarketingListsListResponse < 3) { | |
| 7549 unittest.expect(o.kind, unittest.equals('foo')); | |
| 7550 unittest.expect(o.nextPageToken, unittest.equals('foo')); | |
| 7551 checkUnnamed361(o.targetableRemarketingLists); | |
| 7552 } | |
| 7553 buildCounterTargetableRemarketingListsListResponse--; | |
| 7554 } | |
| 7555 | |
| 7556 buildUnnamed362() { | |
| 7557 var o = new core.List<api.Browser>(); | |
| 7558 o.add(buildBrowser()); | |
| 7559 o.add(buildBrowser()); | |
| 7560 return o; | |
| 7561 } | |
| 7562 | |
| 7563 checkUnnamed362(core.List<api.Browser> o) { | |
| 7564 unittest.expect(o, unittest.hasLength(2)); | |
| 7565 checkBrowser(o[0]); | |
| 7566 checkBrowser(o[1]); | |
| 7567 } | |
| 7568 | |
| 7569 buildUnnamed363() { | |
| 7570 var o = new core.List<api.ConnectionType>(); | |
| 7571 o.add(buildConnectionType()); | |
| 7572 o.add(buildConnectionType()); | |
| 7573 return o; | |
| 7574 } | |
| 7575 | |
| 7576 checkUnnamed363(core.List<api.ConnectionType> o) { | |
| 7577 unittest.expect(o, unittest.hasLength(2)); | |
| 7578 checkConnectionType(o[0]); | |
| 7579 checkConnectionType(o[1]); | |
| 7580 } | |
| 7581 | |
| 7582 buildUnnamed364() { | |
| 7583 var o = new core.List<api.MobileCarrier>(); | |
| 7584 o.add(buildMobileCarrier()); | |
| 7585 o.add(buildMobileCarrier()); | |
| 7586 return o; | |
| 7587 } | |
| 7588 | |
| 7589 checkUnnamed364(core.List<api.MobileCarrier> o) { | |
| 7590 unittest.expect(o, unittest.hasLength(2)); | |
| 7591 checkMobileCarrier(o[0]); | |
| 7592 checkMobileCarrier(o[1]); | |
| 7593 } | |
| 7594 | |
| 7595 buildUnnamed365() { | |
| 7596 var o = new core.List<api.OperatingSystemVersion>(); | |
| 7597 o.add(buildOperatingSystemVersion()); | |
| 7598 o.add(buildOperatingSystemVersion()); | |
| 7599 return o; | |
| 7600 } | |
| 7601 | |
| 7602 checkUnnamed365(core.List<api.OperatingSystemVersion> o) { | |
| 7603 unittest.expect(o, unittest.hasLength(2)); | |
| 7604 checkOperatingSystemVersion(o[0]); | |
| 7605 checkOperatingSystemVersion(o[1]); | |
| 7606 } | |
| 7607 | |
| 7608 buildUnnamed366() { | |
| 7609 var o = new core.List<api.OperatingSystem>(); | |
| 7610 o.add(buildOperatingSystem()); | |
| 7611 o.add(buildOperatingSystem()); | |
| 7612 return o; | |
| 7613 } | |
| 7614 | |
| 7615 checkUnnamed366(core.List<api.OperatingSystem> o) { | |
| 7616 unittest.expect(o, unittest.hasLength(2)); | |
| 7617 checkOperatingSystem(o[0]); | |
| 7618 checkOperatingSystem(o[1]); | |
| 7619 } | |
| 7620 | |
| 7621 buildUnnamed367() { | |
| 7622 var o = new core.List<api.PlatformType>(); | |
| 7623 o.add(buildPlatformType()); | |
| 7624 o.add(buildPlatformType()); | |
| 7625 return o; | |
| 7626 } | |
| 7627 | |
| 7628 checkUnnamed367(core.List<api.PlatformType> o) { | |
| 7629 unittest.expect(o, unittest.hasLength(2)); | |
| 7630 checkPlatformType(o[0]); | |
| 7631 checkPlatformType(o[1]); | |
| 7632 } | |
| 7633 | |
| 7634 core.int buildCounterTechnologyTargeting = 0; | |
| 7635 buildTechnologyTargeting() { | |
| 7636 var o = new api.TechnologyTargeting(); | |
| 7637 buildCounterTechnologyTargeting++; | |
| 7638 if (buildCounterTechnologyTargeting < 3) { | |
| 7639 o.browsers = buildUnnamed362(); | |
| 7640 o.connectionTypes = buildUnnamed363(); | |
| 7641 o.mobileCarriers = buildUnnamed364(); | |
| 7642 o.operatingSystemVersions = buildUnnamed365(); | |
| 7643 o.operatingSystems = buildUnnamed366(); | |
| 7644 o.platformTypes = buildUnnamed367(); | |
| 7645 } | |
| 7646 buildCounterTechnologyTargeting--; | |
| 7647 return o; | |
| 7648 } | |
| 7649 | |
| 7650 checkTechnologyTargeting(api.TechnologyTargeting o) { | |
| 7651 buildCounterTechnologyTargeting++; | |
| 7652 if (buildCounterTechnologyTargeting < 3) { | |
| 7653 checkUnnamed362(o.browsers); | |
| 7654 checkUnnamed363(o.connectionTypes); | |
| 7655 checkUnnamed364(o.mobileCarriers); | |
| 7656 checkUnnamed365(o.operatingSystemVersions); | |
| 7657 checkUnnamed366(o.operatingSystems); | |
| 7658 checkUnnamed367(o.platformTypes); | |
| 7659 } | |
| 7660 buildCounterTechnologyTargeting--; | |
| 7661 } | |
| 7662 | |
| 7663 core.int buildCounterThirdPartyAuthenticationToken = 0; | |
| 7664 buildThirdPartyAuthenticationToken() { | |
| 7665 var o = new api.ThirdPartyAuthenticationToken(); | |
| 7666 buildCounterThirdPartyAuthenticationToken++; | |
| 7667 if (buildCounterThirdPartyAuthenticationToken < 3) { | |
| 7668 o.name = "foo"; | |
| 7669 o.value = "foo"; | |
| 7670 } | |
| 7671 buildCounterThirdPartyAuthenticationToken--; | |
| 7672 return o; | |
| 7673 } | |
| 7674 | |
| 7675 checkThirdPartyAuthenticationToken(api.ThirdPartyAuthenticationToken o) { | |
| 7676 buildCounterThirdPartyAuthenticationToken++; | |
| 7677 if (buildCounterThirdPartyAuthenticationToken < 3) { | |
| 7678 unittest.expect(o.name, unittest.equals('foo')); | |
| 7679 unittest.expect(o.value, unittest.equals('foo')); | |
| 7680 } | |
| 7681 buildCounterThirdPartyAuthenticationToken--; | |
| 7682 } | |
| 7683 | |
| 7684 core.int buildCounterThirdPartyTrackingUrl = 0; | |
| 7685 buildThirdPartyTrackingUrl() { | |
| 7686 var o = new api.ThirdPartyTrackingUrl(); | |
| 7687 buildCounterThirdPartyTrackingUrl++; | |
| 7688 if (buildCounterThirdPartyTrackingUrl < 3) { | |
| 7689 o.thirdPartyUrlType = "foo"; | |
| 7690 o.url = "foo"; | |
| 7691 } | |
| 7692 buildCounterThirdPartyTrackingUrl--; | |
| 7693 return o; | |
| 7694 } | |
| 7695 | |
| 7696 checkThirdPartyTrackingUrl(api.ThirdPartyTrackingUrl o) { | |
| 7697 buildCounterThirdPartyTrackingUrl++; | |
| 7698 if (buildCounterThirdPartyTrackingUrl < 3) { | |
| 7699 unittest.expect(o.thirdPartyUrlType, unittest.equals('foo')); | |
| 7700 unittest.expect(o.url, unittest.equals('foo')); | |
| 7701 } | |
| 7702 buildCounterThirdPartyTrackingUrl--; | |
| 7703 } | |
| 7704 | |
| 7705 core.int buildCounterUserDefinedVariableConfiguration = 0; | |
| 7706 buildUserDefinedVariableConfiguration() { | |
| 7707 var o = new api.UserDefinedVariableConfiguration(); | |
| 7708 buildCounterUserDefinedVariableConfiguration++; | |
| 7709 if (buildCounterUserDefinedVariableConfiguration < 3) { | |
| 7710 o.dataType = "foo"; | |
| 7711 o.reportName = "foo"; | |
| 7712 o.variableType = "foo"; | |
| 7713 } | |
| 7714 buildCounterUserDefinedVariableConfiguration--; | |
| 7715 return o; | |
| 7716 } | |
| 7717 | |
| 7718 checkUserDefinedVariableConfiguration(api.UserDefinedVariableConfiguration o) { | |
| 7719 buildCounterUserDefinedVariableConfiguration++; | |
| 7720 if (buildCounterUserDefinedVariableConfiguration < 3) { | |
| 7721 unittest.expect(o.dataType, unittest.equals('foo')); | |
| 7722 unittest.expect(o.reportName, unittest.equals('foo')); | |
| 7723 unittest.expect(o.variableType, unittest.equals('foo')); | |
| 7724 } | |
| 7725 buildCounterUserDefinedVariableConfiguration--; | |
| 7726 } | |
| 7727 | |
| 7728 core.int buildCounterUserProfile = 0; | |
| 7729 buildUserProfile() { | |
| 7730 var o = new api.UserProfile(); | |
| 7731 buildCounterUserProfile++; | |
| 7732 if (buildCounterUserProfile < 3) { | |
| 7733 o.accountId = "foo"; | |
| 7734 o.accountName = "foo"; | |
| 7735 o.etag = "foo"; | |
| 7736 o.kind = "foo"; | |
| 7737 o.profileId = "foo"; | |
| 7738 o.subAccountId = "foo"; | |
| 7739 o.subAccountName = "foo"; | |
| 7740 o.userName = "foo"; | |
| 7741 } | |
| 7742 buildCounterUserProfile--; | |
| 7743 return o; | |
| 7744 } | |
| 7745 | |
| 7746 checkUserProfile(api.UserProfile o) { | |
| 7747 buildCounterUserProfile++; | |
| 7748 if (buildCounterUserProfile < 3) { | |
| 7749 unittest.expect(o.accountId, unittest.equals('foo')); | |
| 7750 unittest.expect(o.accountName, unittest.equals('foo')); | |
| 7751 unittest.expect(o.etag, unittest.equals('foo')); | |
| 7752 unittest.expect(o.kind, unittest.equals('foo')); | |
| 7753 unittest.expect(o.profileId, unittest.equals('foo')); | |
| 7754 unittest.expect(o.subAccountId, unittest.equals('foo')); | |
| 7755 unittest.expect(o.subAccountName, unittest.equals('foo')); | |
| 7756 unittest.expect(o.userName, unittest.equals('foo')); | |
| 7757 } | |
| 7758 buildCounterUserProfile--; | |
| 7759 } | |
| 7760 | |
| 7761 buildUnnamed368() { | |
| 7762 var o = new core.List<api.UserProfile>(); | |
| 7763 o.add(buildUserProfile()); | |
| 7764 o.add(buildUserProfile()); | |
| 7765 return o; | |
| 7766 } | |
| 7767 | |
| 7768 checkUnnamed368(core.List<api.UserProfile> o) { | |
| 7769 unittest.expect(o, unittest.hasLength(2)); | |
| 7770 checkUserProfile(o[0]); | |
| 7771 checkUserProfile(o[1]); | |
| 7772 } | |
| 7773 | |
| 7774 core.int buildCounterUserProfileList = 0; | |
| 7775 buildUserProfileList() { | |
| 7776 var o = new api.UserProfileList(); | |
| 7777 buildCounterUserProfileList++; | |
| 7778 if (buildCounterUserProfileList < 3) { | |
| 7779 o.etag = "foo"; | |
| 7780 o.items = buildUnnamed368(); | |
| 7781 o.kind = "foo"; | |
| 7782 } | |
| 7783 buildCounterUserProfileList--; | |
| 7784 return o; | |
| 7785 } | |
| 7786 | |
| 7787 checkUserProfileList(api.UserProfileList o) { | |
| 7788 buildCounterUserProfileList++; | |
| 7789 if (buildCounterUserProfileList < 3) { | |
| 7790 unittest.expect(o.etag, unittest.equals('foo')); | |
| 7791 checkUnnamed368(o.items); | |
| 7792 unittest.expect(o.kind, unittest.equals('foo')); | |
| 7793 } | |
| 7794 buildCounterUserProfileList--; | |
| 7795 } | |
| 7796 | |
| 7797 buildUnnamed369() { | |
| 7798 var o = new core.List<api.UserRolePermission>(); | |
| 7799 o.add(buildUserRolePermission()); | |
| 7800 o.add(buildUserRolePermission()); | |
| 7801 return o; | |
| 7802 } | |
| 7803 | |
| 7804 checkUnnamed369(core.List<api.UserRolePermission> o) { | |
| 7805 unittest.expect(o, unittest.hasLength(2)); | |
| 7806 checkUserRolePermission(o[0]); | |
| 7807 checkUserRolePermission(o[1]); | |
| 7808 } | |
| 7809 | |
| 7810 core.int buildCounterUserRole = 0; | |
| 7811 buildUserRole() { | |
| 7812 var o = new api.UserRole(); | |
| 7813 buildCounterUserRole++; | |
| 7814 if (buildCounterUserRole < 3) { | |
| 7815 o.accountId = "foo"; | |
| 7816 o.defaultUserRole = true; | |
| 7817 o.id = "foo"; | |
| 7818 o.kind = "foo"; | |
| 7819 o.name = "foo"; | |
| 7820 o.parentUserRoleId = "foo"; | |
| 7821 o.permissions = buildUnnamed369(); | |
| 7822 o.subaccountId = "foo"; | |
| 7823 } | |
| 7824 buildCounterUserRole--; | |
| 7825 return o; | |
| 7826 } | |
| 7827 | |
| 7828 checkUserRole(api.UserRole o) { | |
| 7829 buildCounterUserRole++; | |
| 7830 if (buildCounterUserRole < 3) { | |
| 7831 unittest.expect(o.accountId, unittest.equals('foo')); | |
| 7832 unittest.expect(o.defaultUserRole, unittest.isTrue); | |
| 7833 unittest.expect(o.id, unittest.equals('foo')); | |
| 7834 unittest.expect(o.kind, unittest.equals('foo')); | |
| 7835 unittest.expect(o.name, unittest.equals('foo')); | |
| 7836 unittest.expect(o.parentUserRoleId, unittest.equals('foo')); | |
| 7837 checkUnnamed369(o.permissions); | |
| 7838 unittest.expect(o.subaccountId, unittest.equals('foo')); | |
| 7839 } | |
| 7840 buildCounterUserRole--; | |
| 7841 } | |
| 7842 | |
| 7843 core.int buildCounterUserRolePermission = 0; | |
| 7844 buildUserRolePermission() { | |
| 7845 var o = new api.UserRolePermission(); | |
| 7846 buildCounterUserRolePermission++; | |
| 7847 if (buildCounterUserRolePermission < 3) { | |
| 7848 o.availability = "foo"; | |
| 7849 o.id = "foo"; | |
| 7850 o.kind = "foo"; | |
| 7851 o.name = "foo"; | |
| 7852 o.permissionGroupId = "foo"; | |
| 7853 } | |
| 7854 buildCounterUserRolePermission--; | |
| 7855 return o; | |
| 7856 } | |
| 7857 | |
| 7858 checkUserRolePermission(api.UserRolePermission o) { | |
| 7859 buildCounterUserRolePermission++; | |
| 7860 if (buildCounterUserRolePermission < 3) { | |
| 7861 unittest.expect(o.availability, unittest.equals('foo')); | |
| 7862 unittest.expect(o.id, unittest.equals('foo')); | |
| 7863 unittest.expect(o.kind, unittest.equals('foo')); | |
| 7864 unittest.expect(o.name, unittest.equals('foo')); | |
| 7865 unittest.expect(o.permissionGroupId, unittest.equals('foo')); | |
| 7866 } | |
| 7867 buildCounterUserRolePermission--; | |
| 7868 } | |
| 7869 | |
| 7870 core.int buildCounterUserRolePermissionGroup = 0; | |
| 7871 buildUserRolePermissionGroup() { | |
| 7872 var o = new api.UserRolePermissionGroup(); | |
| 7873 buildCounterUserRolePermissionGroup++; | |
| 7874 if (buildCounterUserRolePermissionGroup < 3) { | |
| 7875 o.id = "foo"; | |
| 7876 o.kind = "foo"; | |
| 7877 o.name = "foo"; | |
| 7878 } | |
| 7879 buildCounterUserRolePermissionGroup--; | |
| 7880 return o; | |
| 7881 } | |
| 7882 | |
| 7883 checkUserRolePermissionGroup(api.UserRolePermissionGroup o) { | |
| 7884 buildCounterUserRolePermissionGroup++; | |
| 7885 if (buildCounterUserRolePermissionGroup < 3) { | |
| 7886 unittest.expect(o.id, unittest.equals('foo')); | |
| 7887 unittest.expect(o.kind, unittest.equals('foo')); | |
| 7888 unittest.expect(o.name, unittest.equals('foo')); | |
| 7889 } | |
| 7890 buildCounterUserRolePermissionGroup--; | |
| 7891 } | |
| 7892 | |
| 7893 buildUnnamed370() { | |
| 7894 var o = new core.List<api.UserRolePermissionGroup>(); | |
| 7895 o.add(buildUserRolePermissionGroup()); | |
| 7896 o.add(buildUserRolePermissionGroup()); | |
| 7897 return o; | |
| 7898 } | |
| 7899 | |
| 7900 checkUnnamed370(core.List<api.UserRolePermissionGroup> o) { | |
| 7901 unittest.expect(o, unittest.hasLength(2)); | |
| 7902 checkUserRolePermissionGroup(o[0]); | |
| 7903 checkUserRolePermissionGroup(o[1]); | |
| 7904 } | |
| 7905 | |
| 7906 core.int buildCounterUserRolePermissionGroupsListResponse = 0; | |
| 7907 buildUserRolePermissionGroupsListResponse() { | |
| 7908 var o = new api.UserRolePermissionGroupsListResponse(); | |
| 7909 buildCounterUserRolePermissionGroupsListResponse++; | |
| 7910 if (buildCounterUserRolePermissionGroupsListResponse < 3) { | |
| 7911 o.kind = "foo"; | |
| 7912 o.userRolePermissionGroups = buildUnnamed370(); | |
| 7913 } | |
| 7914 buildCounterUserRolePermissionGroupsListResponse--; | |
| 7915 return o; | |
| 7916 } | |
| 7917 | |
| 7918 checkUserRolePermissionGroupsListResponse(api.UserRolePermissionGroupsListRespon
se o) { | |
| 7919 buildCounterUserRolePermissionGroupsListResponse++; | |
| 7920 if (buildCounterUserRolePermissionGroupsListResponse < 3) { | |
| 7921 unittest.expect(o.kind, unittest.equals('foo')); | |
| 7922 checkUnnamed370(o.userRolePermissionGroups); | |
| 7923 } | |
| 7924 buildCounterUserRolePermissionGroupsListResponse--; | |
| 7925 } | |
| 7926 | |
| 7927 buildUnnamed371() { | |
| 7928 var o = new core.List<api.UserRolePermission>(); | |
| 7929 o.add(buildUserRolePermission()); | |
| 7930 o.add(buildUserRolePermission()); | |
| 7931 return o; | |
| 7932 } | |
| 7933 | |
| 7934 checkUnnamed371(core.List<api.UserRolePermission> o) { | |
| 7935 unittest.expect(o, unittest.hasLength(2)); | |
| 7936 checkUserRolePermission(o[0]); | |
| 7937 checkUserRolePermission(o[1]); | |
| 7938 } | |
| 7939 | |
| 7940 core.int buildCounterUserRolePermissionsListResponse = 0; | |
| 7941 buildUserRolePermissionsListResponse() { | |
| 7942 var o = new api.UserRolePermissionsListResponse(); | |
| 7943 buildCounterUserRolePermissionsListResponse++; | |
| 7944 if (buildCounterUserRolePermissionsListResponse < 3) { | |
| 7945 o.kind = "foo"; | |
| 7946 o.userRolePermissions = buildUnnamed371(); | |
| 7947 } | |
| 7948 buildCounterUserRolePermissionsListResponse--; | |
| 7949 return o; | |
| 7950 } | |
| 7951 | |
| 7952 checkUserRolePermissionsListResponse(api.UserRolePermissionsListResponse o) { | |
| 7953 buildCounterUserRolePermissionsListResponse++; | |
| 7954 if (buildCounterUserRolePermissionsListResponse < 3) { | |
| 7955 unittest.expect(o.kind, unittest.equals('foo')); | |
| 7956 checkUnnamed371(o.userRolePermissions); | |
| 7957 } | |
| 7958 buildCounterUserRolePermissionsListResponse--; | |
| 7959 } | |
| 7960 | |
| 7961 buildUnnamed372() { | |
| 7962 var o = new core.List<api.UserRole>(); | |
| 7963 o.add(buildUserRole()); | |
| 7964 o.add(buildUserRole()); | |
| 7965 return o; | |
| 7966 } | |
| 7967 | |
| 7968 checkUnnamed372(core.List<api.UserRole> o) { | |
| 7969 unittest.expect(o, unittest.hasLength(2)); | |
| 7970 checkUserRole(o[0]); | |
| 7971 checkUserRole(o[1]); | |
| 7972 } | |
| 7973 | |
| 7974 core.int buildCounterUserRolesListResponse = 0; | |
| 7975 buildUserRolesListResponse() { | |
| 7976 var o = new api.UserRolesListResponse(); | |
| 7977 buildCounterUserRolesListResponse++; | |
| 7978 if (buildCounterUserRolesListResponse < 3) { | |
| 7979 o.kind = "foo"; | |
| 7980 o.nextPageToken = "foo"; | |
| 7981 o.userRoles = buildUnnamed372(); | |
| 7982 } | |
| 7983 buildCounterUserRolesListResponse--; | |
| 7984 return o; | |
| 7985 } | |
| 7986 | |
| 7987 checkUserRolesListResponse(api.UserRolesListResponse o) { | |
| 7988 buildCounterUserRolesListResponse++; | |
| 7989 if (buildCounterUserRolesListResponse < 3) { | |
| 7990 unittest.expect(o.kind, unittest.equals('foo')); | |
| 7991 unittest.expect(o.nextPageToken, unittest.equals('foo')); | |
| 7992 checkUnnamed372(o.userRoles); | |
| 7993 } | |
| 7994 buildCounterUserRolesListResponse--; | |
| 7995 } | |
| 7996 | |
| 7997 buildUnnamed373() { | |
| 7998 var o = new core.List<core.String>(); | |
| 7999 o.add("foo"); | |
| 8000 o.add("foo"); | |
| 8001 return o; | |
| 8002 } | |
| 8003 | |
| 8004 checkUnnamed373(core.List<core.String> o) { | |
| 8005 unittest.expect(o, unittest.hasLength(2)); | |
| 8006 unittest.expect(o[0], unittest.equals('foo')); | |
| 8007 unittest.expect(o[1], unittest.equals('foo')); | |
| 8008 } | |
| 8009 | |
| 8010 buildUnnamed374() { | |
| 8011 var o = new core.List<core.String>(); | |
| 8012 o.add("foo"); | |
| 8013 o.add("foo"); | |
| 8014 return o; | |
| 8015 } | |
| 8016 | |
| 8017 checkUnnamed374(core.List<core.String> o) { | |
| 8018 unittest.expect(o, unittest.hasLength(2)); | |
| 8019 unittest.expect(o[0], unittest.equals('foo')); | |
| 8020 unittest.expect(o[1], unittest.equals('foo')); | |
| 8021 } | |
| 8022 | |
| 8023 buildUnnamed375() { | |
| 8024 var o = new core.List<core.String>(); | |
| 8025 o.add("foo"); | |
| 8026 o.add("foo"); | |
| 8027 return o; | |
| 8028 } | |
| 8029 | |
| 8030 checkUnnamed375(core.List<core.String> o) { | |
| 8031 unittest.expect(o, unittest.hasLength(2)); | |
| 8032 unittest.expect(o[0], unittest.equals('foo')); | |
| 8033 unittest.expect(o[1], unittest.equals('foo')); | |
| 8034 } | |
| 8035 | |
| 8036 buildUnnamed376() { | |
| 8037 var o = new core.List<core.String>(); | |
| 8038 o.add("foo"); | |
| 8039 o.add("foo"); | |
| 8040 return o; | |
| 8041 } | |
| 8042 | |
| 8043 checkUnnamed376(core.List<core.String> o) { | |
| 8044 unittest.expect(o, unittest.hasLength(2)); | |
| 8045 unittest.expect(o[0], unittest.equals('foo')); | |
| 8046 unittest.expect(o[1], unittest.equals('foo')); | |
| 8047 } | |
| 8048 | |
| 8049 buildUnnamed377() { | |
| 8050 var o = new core.List<core.String>(); | |
| 8051 o.add("foo"); | |
| 8052 o.add("foo"); | |
| 8053 return o; | |
| 8054 } | |
| 8055 | |
| 8056 checkUnnamed377(core.List<core.String> o) { | |
| 8057 unittest.expect(o, unittest.hasLength(2)); | |
| 8058 unittest.expect(o[0], unittest.equals('foo')); | |
| 8059 unittest.expect(o[1], unittest.equals('foo')); | |
| 8060 } | |
| 8061 | |
| 8062 buildUnnamed378() { | |
| 8063 var o = new core.List<core.String>(); | |
| 8064 o.add("foo"); | |
| 8065 o.add("foo"); | |
| 8066 return o; | |
| 8067 } | |
| 8068 | |
| 8069 checkUnnamed378(core.List<core.String> o) { | |
| 8070 unittest.expect(o, unittest.hasLength(2)); | |
| 8071 unittest.expect(o[0], unittest.equals('foo')); | |
| 8072 unittest.expect(o[1], unittest.equals('foo')); | |
| 8073 } | |
| 8074 | |
| 8075 buildUnnamed379() { | |
| 8076 var o = new core.List<core.String>(); | |
| 8077 o.add("foo"); | |
| 8078 o.add("foo"); | |
| 8079 return o; | |
| 8080 } | |
| 8081 | |
| 8082 checkUnnamed379(core.List<core.String> o) { | |
| 8083 unittest.expect(o, unittest.hasLength(2)); | |
| 8084 unittest.expect(o[0], unittest.equals('foo')); | |
| 8085 unittest.expect(o[1], unittest.equals('foo')); | |
| 8086 } | |
| 8087 | |
| 8088 buildUnnamed380() { | |
| 8089 var o = new core.List<core.String>(); | |
| 8090 o.add("foo"); | |
| 8091 o.add("foo"); | |
| 8092 return o; | |
| 8093 } | |
| 8094 | |
| 8095 checkUnnamed380(core.List<core.String> o) { | |
| 8096 unittest.expect(o, unittest.hasLength(2)); | |
| 8097 unittest.expect(o[0], unittest.equals('foo')); | |
| 8098 unittest.expect(o[1], unittest.equals('foo')); | |
| 8099 } | |
| 8100 | |
| 8101 buildUnnamed381() { | |
| 8102 var o = new core.List<core.String>(); | |
| 8103 o.add("foo"); | |
| 8104 o.add("foo"); | |
| 8105 return o; | |
| 8106 } | |
| 8107 | |
| 8108 checkUnnamed381(core.List<core.String> o) { | |
| 8109 unittest.expect(o, unittest.hasLength(2)); | |
| 8110 unittest.expect(o[0], unittest.equals('foo')); | |
| 8111 unittest.expect(o[1], unittest.equals('foo')); | |
| 8112 } | |
| 8113 | |
| 8114 buildUnnamed382() { | |
| 8115 var o = new core.List<core.String>(); | |
| 8116 o.add("foo"); | |
| 8117 o.add("foo"); | |
| 8118 return o; | |
| 8119 } | |
| 8120 | |
| 8121 checkUnnamed382(core.List<core.String> o) { | |
| 8122 unittest.expect(o, unittest.hasLength(2)); | |
| 8123 unittest.expect(o[0], unittest.equals('foo')); | |
| 8124 unittest.expect(o[1], unittest.equals('foo')); | |
| 8125 } | |
| 8126 | |
| 8127 buildUnnamed383() { | |
| 8128 var o = new core.List<core.String>(); | |
| 8129 o.add("foo"); | |
| 8130 o.add("foo"); | |
| 8131 return o; | |
| 8132 } | |
| 8133 | |
| 8134 checkUnnamed383(core.List<core.String> o) { | |
| 8135 unittest.expect(o, unittest.hasLength(2)); | |
| 8136 unittest.expect(o[0], unittest.equals('foo')); | |
| 8137 unittest.expect(o[1], unittest.equals('foo')); | |
| 8138 } | |
| 8139 | |
| 8140 buildUnnamed384() { | |
| 8141 var o = new core.List<core.String>(); | |
| 8142 o.add("foo"); | |
| 8143 o.add("foo"); | |
| 8144 return o; | |
| 8145 } | |
| 8146 | |
| 8147 checkUnnamed384(core.List<core.String> o) { | |
| 8148 unittest.expect(o, unittest.hasLength(2)); | |
| 8149 unittest.expect(o[0], unittest.equals('foo')); | |
| 8150 unittest.expect(o[1], unittest.equals('foo')); | |
| 8151 } | |
| 8152 | |
| 8153 buildUnnamed385() { | |
| 8154 var o = new core.List<core.String>(); | |
| 8155 o.add("foo"); | |
| 8156 o.add("foo"); | |
| 8157 return o; | |
| 8158 } | |
| 8159 | |
| 8160 checkUnnamed385(core.List<core.String> o) { | |
| 8161 unittest.expect(o, unittest.hasLength(2)); | |
| 8162 unittest.expect(o[0], unittest.equals('foo')); | |
| 8163 unittest.expect(o[1], unittest.equals('foo')); | |
| 8164 } | |
| 8165 | |
| 8166 buildUnnamed386() { | |
| 8167 var o = new core.List<core.String>(); | |
| 8168 o.add("foo"); | |
| 8169 o.add("foo"); | |
| 8170 return o; | |
| 8171 } | |
| 8172 | |
| 8173 checkUnnamed386(core.List<core.String> o) { | |
| 8174 unittest.expect(o, unittest.hasLength(2)); | |
| 8175 unittest.expect(o[0], unittest.equals('foo')); | |
| 8176 unittest.expect(o[1], unittest.equals('foo')); | |
| 8177 } | |
| 8178 | |
| 8179 buildUnnamed387() { | |
| 8180 var o = new core.List<core.String>(); | |
| 8181 o.add("foo"); | |
| 8182 o.add("foo"); | |
| 8183 return o; | |
| 8184 } | |
| 8185 | |
| 8186 checkUnnamed387(core.List<core.String> o) { | |
| 8187 unittest.expect(o, unittest.hasLength(2)); | |
| 8188 unittest.expect(o[0], unittest.equals('foo')); | |
| 8189 unittest.expect(o[1], unittest.equals('foo')); | |
| 8190 } | |
| 8191 | |
| 8192 buildUnnamed388() { | |
| 8193 var o = new core.List<core.String>(); | |
| 8194 o.add("foo"); | |
| 8195 o.add("foo"); | |
| 8196 return o; | |
| 8197 } | |
| 8198 | |
| 8199 checkUnnamed388(core.List<core.String> o) { | |
| 8200 unittest.expect(o, unittest.hasLength(2)); | |
| 8201 unittest.expect(o[0], unittest.equals('foo')); | |
| 8202 unittest.expect(o[1], unittest.equals('foo')); | |
| 8203 } | |
| 8204 | |
| 8205 buildUnnamed389() { | |
| 8206 var o = new core.List<core.String>(); | |
| 8207 o.add("foo"); | |
| 8208 o.add("foo"); | |
| 8209 return o; | |
| 8210 } | |
| 8211 | |
| 8212 checkUnnamed389(core.List<core.String> o) { | |
| 8213 unittest.expect(o, unittest.hasLength(2)); | |
| 8214 unittest.expect(o[0], unittest.equals('foo')); | |
| 8215 unittest.expect(o[1], unittest.equals('foo')); | |
| 8216 } | |
| 8217 | |
| 8218 buildUnnamed390() { | |
| 8219 var o = new core.List<core.String>(); | |
| 8220 o.add("foo"); | |
| 8221 o.add("foo"); | |
| 8222 return o; | |
| 8223 } | |
| 8224 | |
| 8225 checkUnnamed390(core.List<core.String> o) { | |
| 8226 unittest.expect(o, unittest.hasLength(2)); | |
| 8227 unittest.expect(o[0], unittest.equals('foo')); | |
| 8228 unittest.expect(o[1], unittest.equals('foo')); | |
| 8229 } | |
| 8230 | |
| 8231 buildUnnamed391() { | |
| 8232 var o = new core.List<core.String>(); | |
| 8233 o.add("foo"); | |
| 8234 o.add("foo"); | |
| 8235 return o; | |
| 8236 } | |
| 8237 | |
| 8238 checkUnnamed391(core.List<core.String> o) { | |
| 8239 unittest.expect(o, unittest.hasLength(2)); | |
| 8240 unittest.expect(o[0], unittest.equals('foo')); | |
| 8241 unittest.expect(o[1], unittest.equals('foo')); | |
| 8242 } | |
| 8243 | |
| 8244 buildUnnamed392() { | |
| 8245 var o = new core.List<core.String>(); | |
| 8246 o.add("foo"); | |
| 8247 o.add("foo"); | |
| 8248 return o; | |
| 8249 } | |
| 8250 | |
| 8251 checkUnnamed392(core.List<core.String> o) { | |
| 8252 unittest.expect(o, unittest.hasLength(2)); | |
| 8253 unittest.expect(o[0], unittest.equals('foo')); | |
| 8254 unittest.expect(o[1], unittest.equals('foo')); | |
| 8255 } | |
| 8256 | |
| 8257 buildUnnamed393() { | |
| 8258 var o = new core.List<core.String>(); | |
| 8259 o.add("foo"); | |
| 8260 o.add("foo"); | |
| 8261 return o; | |
| 8262 } | |
| 8263 | |
| 8264 checkUnnamed393(core.List<core.String> o) { | |
| 8265 unittest.expect(o, unittest.hasLength(2)); | |
| 8266 unittest.expect(o[0], unittest.equals('foo')); | |
| 8267 unittest.expect(o[1], unittest.equals('foo')); | |
| 8268 } | |
| 8269 | |
| 8270 buildUnnamed394() { | |
| 8271 var o = new core.List<core.String>(); | |
| 8272 o.add("foo"); | |
| 8273 o.add("foo"); | |
| 8274 return o; | |
| 8275 } | |
| 8276 | |
| 8277 checkUnnamed394(core.List<core.String> o) { | |
| 8278 unittest.expect(o, unittest.hasLength(2)); | |
| 8279 unittest.expect(o[0], unittest.equals('foo')); | |
| 8280 unittest.expect(o[1], unittest.equals('foo')); | |
| 8281 } | |
| 8282 | |
| 8283 buildUnnamed395() { | |
| 8284 var o = new core.List<core.String>(); | |
| 8285 o.add("foo"); | |
| 8286 o.add("foo"); | |
| 8287 return o; | |
| 8288 } | |
| 8289 | |
| 8290 checkUnnamed395(core.List<core.String> o) { | |
| 8291 unittest.expect(o, unittest.hasLength(2)); | |
| 8292 unittest.expect(o[0], unittest.equals('foo')); | |
| 8293 unittest.expect(o[1], unittest.equals('foo')); | |
| 8294 } | |
| 8295 | |
| 8296 buildUnnamed396() { | |
| 8297 var o = new core.List<core.String>(); | |
| 8298 o.add("foo"); | |
| 8299 o.add("foo"); | |
| 8300 return o; | |
| 8301 } | |
| 8302 | |
| 8303 checkUnnamed396(core.List<core.String> o) { | |
| 8304 unittest.expect(o, unittest.hasLength(2)); | |
| 8305 unittest.expect(o[0], unittest.equals('foo')); | |
| 8306 unittest.expect(o[1], unittest.equals('foo')); | |
| 8307 } | |
| 8308 | |
| 8309 buildUnnamed397() { | |
| 8310 var o = new core.List<core.String>(); | |
| 8311 o.add("foo"); | |
| 8312 o.add("foo"); | |
| 8313 return o; | |
| 8314 } | |
| 8315 | |
| 8316 checkUnnamed397(core.List<core.String> o) { | |
| 8317 unittest.expect(o, unittest.hasLength(2)); | |
| 8318 unittest.expect(o[0], unittest.equals('foo')); | |
| 8319 unittest.expect(o[1], unittest.equals('foo')); | |
| 8320 } | |
| 8321 | |
| 8322 buildUnnamed398() { | |
| 8323 var o = new core.List<core.String>(); | |
| 8324 o.add("foo"); | |
| 8325 o.add("foo"); | |
| 8326 return o; | |
| 8327 } | |
| 8328 | |
| 8329 checkUnnamed398(core.List<core.String> o) { | |
| 8330 unittest.expect(o, unittest.hasLength(2)); | |
| 8331 unittest.expect(o[0], unittest.equals('foo')); | |
| 8332 unittest.expect(o[1], unittest.equals('foo')); | |
| 8333 } | |
| 8334 | |
| 8335 buildUnnamed399() { | |
| 8336 var o = new core.List<core.String>(); | |
| 8337 o.add("foo"); | |
| 8338 o.add("foo"); | |
| 8339 return o; | |
| 8340 } | |
| 8341 | |
| 8342 checkUnnamed399(core.List<core.String> o) { | |
| 8343 unittest.expect(o, unittest.hasLength(2)); | |
| 8344 unittest.expect(o[0], unittest.equals('foo')); | |
| 8345 unittest.expect(o[1], unittest.equals('foo')); | |
| 8346 } | |
| 8347 | |
| 8348 buildUnnamed400() { | |
| 8349 var o = new core.List<core.String>(); | |
| 8350 o.add("foo"); | |
| 8351 o.add("foo"); | |
| 8352 return o; | |
| 8353 } | |
| 8354 | |
| 8355 checkUnnamed400(core.List<core.String> o) { | |
| 8356 unittest.expect(o, unittest.hasLength(2)); | |
| 8357 unittest.expect(o[0], unittest.equals('foo')); | |
| 8358 unittest.expect(o[1], unittest.equals('foo')); | |
| 8359 } | |
| 8360 | |
| 8361 buildUnnamed401() { | |
| 8362 var o = new core.List<core.String>(); | |
| 8363 o.add("foo"); | |
| 8364 o.add("foo"); | |
| 8365 return o; | |
| 8366 } | |
| 8367 | |
| 8368 checkUnnamed401(core.List<core.String> o) { | |
| 8369 unittest.expect(o, unittest.hasLength(2)); | |
| 8370 unittest.expect(o[0], unittest.equals('foo')); | |
| 8371 unittest.expect(o[1], unittest.equals('foo')); | |
| 8372 } | |
| 8373 | |
| 8374 buildUnnamed402() { | |
| 8375 var o = new core.List<core.String>(); | |
| 8376 o.add("foo"); | |
| 8377 o.add("foo"); | |
| 8378 return o; | |
| 8379 } | |
| 8380 | |
| 8381 checkUnnamed402(core.List<core.String> o) { | |
| 8382 unittest.expect(o, unittest.hasLength(2)); | |
| 8383 unittest.expect(o[0], unittest.equals('foo')); | |
| 8384 unittest.expect(o[1], unittest.equals('foo')); | |
| 8385 } | |
| 8386 | |
| 8387 buildUnnamed403() { | |
| 8388 var o = new core.List<core.String>(); | |
| 8389 o.add("foo"); | |
| 8390 o.add("foo"); | |
| 8391 return o; | |
| 8392 } | |
| 8393 | |
| 8394 checkUnnamed403(core.List<core.String> o) { | |
| 8395 unittest.expect(o, unittest.hasLength(2)); | |
| 8396 unittest.expect(o[0], unittest.equals('foo')); | |
| 8397 unittest.expect(o[1], unittest.equals('foo')); | |
| 8398 } | |
| 8399 | |
| 8400 buildUnnamed404() { | |
| 8401 var o = new core.List<core.String>(); | |
| 8402 o.add("foo"); | |
| 8403 o.add("foo"); | |
| 8404 return o; | |
| 8405 } | |
| 8406 | |
| 8407 checkUnnamed404(core.List<core.String> o) { | |
| 8408 unittest.expect(o, unittest.hasLength(2)); | |
| 8409 unittest.expect(o[0], unittest.equals('foo')); | |
| 8410 unittest.expect(o[1], unittest.equals('foo')); | |
| 8411 } | |
| 8412 | |
| 8413 buildUnnamed405() { | |
| 8414 var o = new core.List<core.String>(); | |
| 8415 o.add("foo"); | |
| 8416 o.add("foo"); | |
| 8417 return o; | |
| 8418 } | |
| 8419 | |
| 8420 checkUnnamed405(core.List<core.String> o) { | |
| 8421 unittest.expect(o, unittest.hasLength(2)); | |
| 8422 unittest.expect(o[0], unittest.equals('foo')); | |
| 8423 unittest.expect(o[1], unittest.equals('foo')); | |
| 8424 } | |
| 8425 | |
| 8426 buildUnnamed406() { | |
| 8427 var o = new core.List<core.String>(); | |
| 8428 o.add("foo"); | |
| 8429 o.add("foo"); | |
| 8430 return o; | |
| 8431 } | |
| 8432 | |
| 8433 checkUnnamed406(core.List<core.String> o) { | |
| 8434 unittest.expect(o, unittest.hasLength(2)); | |
| 8435 unittest.expect(o[0], unittest.equals('foo')); | |
| 8436 unittest.expect(o[1], unittest.equals('foo')); | |
| 8437 } | |
| 8438 | |
| 8439 buildUnnamed407() { | |
| 8440 var o = new core.List<core.String>(); | |
| 8441 o.add("foo"); | |
| 8442 o.add("foo"); | |
| 8443 return o; | |
| 8444 } | |
| 8445 | |
| 8446 checkUnnamed407(core.List<core.String> o) { | |
| 8447 unittest.expect(o, unittest.hasLength(2)); | |
| 8448 unittest.expect(o[0], unittest.equals('foo')); | |
| 8449 unittest.expect(o[1], unittest.equals('foo')); | |
| 8450 } | |
| 8451 | |
| 8452 buildUnnamed408() { | |
| 8453 var o = new core.List<core.String>(); | |
| 8454 o.add("foo"); | |
| 8455 o.add("foo"); | |
| 8456 return o; | |
| 8457 } | |
| 8458 | |
| 8459 checkUnnamed408(core.List<core.String> o) { | |
| 8460 unittest.expect(o, unittest.hasLength(2)); | |
| 8461 unittest.expect(o[0], unittest.equals('foo')); | |
| 8462 unittest.expect(o[1], unittest.equals('foo')); | |
| 8463 } | |
| 8464 | |
| 8465 buildUnnamed409() { | |
| 8466 var o = new core.List<core.String>(); | |
| 8467 o.add("foo"); | |
| 8468 o.add("foo"); | |
| 8469 return o; | |
| 8470 } | |
| 8471 | |
| 8472 checkUnnamed409(core.List<core.String> o) { | |
| 8473 unittest.expect(o, unittest.hasLength(2)); | |
| 8474 unittest.expect(o[0], unittest.equals('foo')); | |
| 8475 unittest.expect(o[1], unittest.equals('foo')); | |
| 8476 } | |
| 8477 | |
| 8478 buildUnnamed410() { | |
| 8479 var o = new core.List<core.String>(); | |
| 8480 o.add("foo"); | |
| 8481 o.add("foo"); | |
| 8482 return o; | |
| 8483 } | |
| 8484 | |
| 8485 checkUnnamed410(core.List<core.String> o) { | |
| 8486 unittest.expect(o, unittest.hasLength(2)); | |
| 8487 unittest.expect(o[0], unittest.equals('foo')); | |
| 8488 unittest.expect(o[1], unittest.equals('foo')); | |
| 8489 } | |
| 8490 | |
| 8491 buildUnnamed411() { | |
| 8492 var o = new core.List<core.String>(); | |
| 8493 o.add("foo"); | |
| 8494 o.add("foo"); | |
| 8495 return o; | |
| 8496 } | |
| 8497 | |
| 8498 checkUnnamed411(core.List<core.String> o) { | |
| 8499 unittest.expect(o, unittest.hasLength(2)); | |
| 8500 unittest.expect(o[0], unittest.equals('foo')); | |
| 8501 unittest.expect(o[1], unittest.equals('foo')); | |
| 8502 } | |
| 8503 | |
| 8504 buildUnnamed412() { | |
| 8505 var o = new core.List<core.String>(); | |
| 8506 o.add("foo"); | |
| 8507 o.add("foo"); | |
| 8508 return o; | |
| 8509 } | |
| 8510 | |
| 8511 checkUnnamed412(core.List<core.String> o) { | |
| 8512 unittest.expect(o, unittest.hasLength(2)); | |
| 8513 unittest.expect(o[0], unittest.equals('foo')); | |
| 8514 unittest.expect(o[1], unittest.equals('foo')); | |
| 8515 } | |
| 8516 | |
| 8517 buildUnnamed413() { | |
| 8518 var o = new core.List<core.String>(); | |
| 8519 o.add("foo"); | |
| 8520 o.add("foo"); | |
| 8521 return o; | |
| 8522 } | |
| 8523 | |
| 8524 checkUnnamed413(core.List<core.String> o) { | |
| 8525 unittest.expect(o, unittest.hasLength(2)); | |
| 8526 unittest.expect(o[0], unittest.equals('foo')); | |
| 8527 unittest.expect(o[1], unittest.equals('foo')); | |
| 8528 } | |
| 8529 | |
| 8530 buildUnnamed414() { | |
| 8531 var o = new core.List<core.String>(); | |
| 8532 o.add("foo"); | |
| 8533 o.add("foo"); | |
| 8534 return o; | |
| 8535 } | |
| 8536 | |
| 8537 checkUnnamed414(core.List<core.String> o) { | |
| 8538 unittest.expect(o, unittest.hasLength(2)); | |
| 8539 unittest.expect(o[0], unittest.equals('foo')); | |
| 8540 unittest.expect(o[1], unittest.equals('foo')); | |
| 8541 } | |
| 8542 | |
| 8543 buildUnnamed415() { | |
| 8544 var o = new core.List<core.String>(); | |
| 8545 o.add("foo"); | |
| 8546 o.add("foo"); | |
| 8547 return o; | |
| 8548 } | |
| 8549 | |
| 8550 checkUnnamed415(core.List<core.String> o) { | |
| 8551 unittest.expect(o, unittest.hasLength(2)); | |
| 8552 unittest.expect(o[0], unittest.equals('foo')); | |
| 8553 unittest.expect(o[1], unittest.equals('foo')); | |
| 8554 } | |
| 8555 | |
| 8556 buildUnnamed416() { | |
| 8557 var o = new core.List<core.String>(); | |
| 8558 o.add("foo"); | |
| 8559 o.add("foo"); | |
| 8560 return o; | |
| 8561 } | |
| 8562 | |
| 8563 checkUnnamed416(core.List<core.String> o) { | |
| 8564 unittest.expect(o, unittest.hasLength(2)); | |
| 8565 unittest.expect(o[0], unittest.equals('foo')); | |
| 8566 unittest.expect(o[1], unittest.equals('foo')); | |
| 8567 } | |
| 8568 | |
| 8569 buildUnnamed417() { | |
| 8570 var o = new core.List<core.String>(); | |
| 8571 o.add("foo"); | |
| 8572 o.add("foo"); | |
| 8573 return o; | |
| 8574 } | |
| 8575 | |
| 8576 checkUnnamed417(core.List<core.String> o) { | |
| 8577 unittest.expect(o, unittest.hasLength(2)); | |
| 8578 unittest.expect(o[0], unittest.equals('foo')); | |
| 8579 unittest.expect(o[1], unittest.equals('foo')); | |
| 8580 } | |
| 8581 | |
| 8582 buildUnnamed418() { | |
| 8583 var o = new core.List<core.String>(); | |
| 8584 o.add("foo"); | |
| 8585 o.add("foo"); | |
| 8586 return o; | |
| 8587 } | |
| 8588 | |
| 8589 checkUnnamed418(core.List<core.String> o) { | |
| 8590 unittest.expect(o, unittest.hasLength(2)); | |
| 8591 unittest.expect(o[0], unittest.equals('foo')); | |
| 8592 unittest.expect(o[1], unittest.equals('foo')); | |
| 8593 } | |
| 8594 | |
| 8595 buildUnnamed419() { | |
| 8596 var o = new core.List<core.String>(); | |
| 8597 o.add("foo"); | |
| 8598 o.add("foo"); | |
| 8599 return o; | |
| 8600 } | |
| 8601 | |
| 8602 checkUnnamed419(core.List<core.String> o) { | |
| 8603 unittest.expect(o, unittest.hasLength(2)); | |
| 8604 unittest.expect(o[0], unittest.equals('foo')); | |
| 8605 unittest.expect(o[1], unittest.equals('foo')); | |
| 8606 } | |
| 8607 | |
| 8608 buildUnnamed420() { | |
| 8609 var o = new core.List<core.String>(); | |
| 8610 o.add("foo"); | |
| 8611 o.add("foo"); | |
| 8612 return o; | |
| 8613 } | |
| 8614 | |
| 8615 checkUnnamed420(core.List<core.String> o) { | |
| 8616 unittest.expect(o, unittest.hasLength(2)); | |
| 8617 unittest.expect(o[0], unittest.equals('foo')); | |
| 8618 unittest.expect(o[1], unittest.equals('foo')); | |
| 8619 } | |
| 8620 | |
| 8621 buildUnnamed421() { | |
| 8622 var o = new core.List<core.String>(); | |
| 8623 o.add("foo"); | |
| 8624 o.add("foo"); | |
| 8625 return o; | |
| 8626 } | |
| 8627 | |
| 8628 checkUnnamed421(core.List<core.String> o) { | |
| 8629 unittest.expect(o, unittest.hasLength(2)); | |
| 8630 unittest.expect(o[0], unittest.equals('foo')); | |
| 8631 unittest.expect(o[1], unittest.equals('foo')); | |
| 8632 } | |
| 8633 | |
| 8634 buildUnnamed422() { | |
| 8635 var o = new core.List<core.String>(); | |
| 8636 o.add("foo"); | |
| 8637 o.add("foo"); | |
| 8638 return o; | |
| 8639 } | |
| 8640 | |
| 8641 checkUnnamed422(core.List<core.String> o) { | |
| 8642 unittest.expect(o, unittest.hasLength(2)); | |
| 8643 unittest.expect(o[0], unittest.equals('foo')); | |
| 8644 unittest.expect(o[1], unittest.equals('foo')); | |
| 8645 } | |
| 8646 | |
| 8647 buildUnnamed423() { | |
| 8648 var o = new core.List<core.String>(); | |
| 8649 o.add("foo"); | |
| 8650 o.add("foo"); | |
| 8651 return o; | |
| 8652 } | |
| 8653 | |
| 8654 checkUnnamed423(core.List<core.String> o) { | |
| 8655 unittest.expect(o, unittest.hasLength(2)); | |
| 8656 unittest.expect(o[0], unittest.equals('foo')); | |
| 8657 unittest.expect(o[1], unittest.equals('foo')); | |
| 8658 } | |
| 8659 | |
| 8660 buildUnnamed424() { | |
| 8661 var o = new core.List<core.String>(); | |
| 8662 o.add("foo"); | |
| 8663 o.add("foo"); | |
| 8664 return o; | |
| 8665 } | |
| 8666 | |
| 8667 checkUnnamed424(core.List<core.String> o) { | |
| 8668 unittest.expect(o, unittest.hasLength(2)); | |
| 8669 unittest.expect(o[0], unittest.equals('foo')); | |
| 8670 unittest.expect(o[1], unittest.equals('foo')); | |
| 8671 } | |
| 8672 | |
| 8673 buildUnnamed425() { | |
| 8674 var o = new core.List<core.String>(); | |
| 8675 o.add("foo"); | |
| 8676 o.add("foo"); | |
| 8677 return o; | |
| 8678 } | |
| 8679 | |
| 8680 checkUnnamed425(core.List<core.String> o) { | |
| 8681 unittest.expect(o, unittest.hasLength(2)); | |
| 8682 unittest.expect(o[0], unittest.equals('foo')); | |
| 8683 unittest.expect(o[1], unittest.equals('foo')); | |
| 8684 } | |
| 8685 | |
| 8686 buildUnnamed426() { | |
| 8687 var o = new core.List<core.String>(); | |
| 8688 o.add("foo"); | |
| 8689 o.add("foo"); | |
| 8690 return o; | |
| 8691 } | |
| 8692 | |
| 8693 checkUnnamed426(core.List<core.String> o) { | |
| 8694 unittest.expect(o, unittest.hasLength(2)); | |
| 8695 unittest.expect(o[0], unittest.equals('foo')); | |
| 8696 unittest.expect(o[1], unittest.equals('foo')); | |
| 8697 } | |
| 8698 | |
| 8699 buildUnnamed427() { | |
| 8700 var o = new core.List<core.String>(); | |
| 8701 o.add("foo"); | |
| 8702 o.add("foo"); | |
| 8703 return o; | |
| 8704 } | |
| 8705 | |
| 8706 checkUnnamed427(core.List<core.String> o) { | |
| 8707 unittest.expect(o, unittest.hasLength(2)); | |
| 8708 unittest.expect(o[0], unittest.equals('foo')); | |
| 8709 unittest.expect(o[1], unittest.equals('foo')); | |
| 8710 } | |
| 8711 | |
| 8712 buildUnnamed428() { | |
| 8713 var o = new core.List<core.String>(); | |
| 8714 o.add("foo"); | |
| 8715 o.add("foo"); | |
| 8716 return o; | |
| 8717 } | |
| 8718 | |
| 8719 checkUnnamed428(core.List<core.String> o) { | |
| 8720 unittest.expect(o, unittest.hasLength(2)); | |
| 8721 unittest.expect(o[0], unittest.equals('foo')); | |
| 8722 unittest.expect(o[1], unittest.equals('foo')); | |
| 8723 } | |
| 8724 | |
| 8725 buildUnnamed429() { | |
| 8726 var o = new core.List<core.String>(); | |
| 8727 o.add("foo"); | |
| 8728 o.add("foo"); | |
| 8729 return o; | |
| 8730 } | |
| 8731 | |
| 8732 checkUnnamed429(core.List<core.String> o) { | |
| 8733 unittest.expect(o, unittest.hasLength(2)); | |
| 8734 unittest.expect(o[0], unittest.equals('foo')); | |
| 8735 unittest.expect(o[1], unittest.equals('foo')); | |
| 8736 } | |
| 8737 | |
| 8738 buildUnnamed430() { | |
| 8739 var o = new core.List<core.String>(); | |
| 8740 o.add("foo"); | |
| 8741 o.add("foo"); | |
| 8742 return o; | |
| 8743 } | |
| 8744 | |
| 8745 checkUnnamed430(core.List<core.String> o) { | |
| 8746 unittest.expect(o, unittest.hasLength(2)); | |
| 8747 unittest.expect(o[0], unittest.equals('foo')); | |
| 8748 unittest.expect(o[1], unittest.equals('foo')); | |
| 8749 } | |
| 8750 | |
| 8751 buildUnnamed431() { | |
| 8752 var o = new core.List<core.String>(); | |
| 8753 o.add("foo"); | |
| 8754 o.add("foo"); | |
| 8755 return o; | |
| 8756 } | |
| 8757 | |
| 8758 checkUnnamed431(core.List<core.String> o) { | |
| 8759 unittest.expect(o, unittest.hasLength(2)); | |
| 8760 unittest.expect(o[0], unittest.equals('foo')); | |
| 8761 unittest.expect(o[1], unittest.equals('foo')); | |
| 8762 } | |
| 8763 | |
| 8764 buildUnnamed432() { | |
| 8765 var o = new core.List<core.String>(); | |
| 8766 o.add("foo"); | |
| 8767 o.add("foo"); | |
| 8768 return o; | |
| 8769 } | |
| 8770 | |
| 8771 checkUnnamed432(core.List<core.String> o) { | |
| 8772 unittest.expect(o, unittest.hasLength(2)); | |
| 8773 unittest.expect(o[0], unittest.equals('foo')); | |
| 8774 unittest.expect(o[1], unittest.equals('foo')); | |
| 8775 } | |
| 8776 | |
| 8777 buildUnnamed433() { | |
| 8778 var o = new core.List<core.String>(); | |
| 8779 o.add("foo"); | |
| 8780 o.add("foo"); | |
| 8781 return o; | |
| 8782 } | |
| 8783 | |
| 8784 checkUnnamed433(core.List<core.String> o) { | |
| 8785 unittest.expect(o, unittest.hasLength(2)); | |
| 8786 unittest.expect(o[0], unittest.equals('foo')); | |
| 8787 unittest.expect(o[1], unittest.equals('foo')); | |
| 8788 } | |
| 8789 | |
| 8790 buildUnnamed434() { | |
| 8791 var o = new core.List<core.String>(); | |
| 8792 o.add("foo"); | |
| 8793 o.add("foo"); | |
| 8794 return o; | |
| 8795 } | |
| 8796 | |
| 8797 checkUnnamed434(core.List<core.String> o) { | |
| 8798 unittest.expect(o, unittest.hasLength(2)); | |
| 8799 unittest.expect(o[0], unittest.equals('foo')); | |
| 8800 unittest.expect(o[1], unittest.equals('foo')); | |
| 8801 } | |
| 8802 | |
| 8803 buildUnnamed435() { | |
| 8804 var o = new core.List<core.String>(); | |
| 8805 o.add("foo"); | |
| 8806 o.add("foo"); | |
| 8807 return o; | |
| 8808 } | |
| 8809 | |
| 8810 checkUnnamed435(core.List<core.String> o) { | |
| 8811 unittest.expect(o, unittest.hasLength(2)); | |
| 8812 unittest.expect(o[0], unittest.equals('foo')); | |
| 8813 unittest.expect(o[1], unittest.equals('foo')); | |
| 8814 } | |
| 8815 | |
| 8816 buildUnnamed436() { | |
| 8817 var o = new core.List<core.String>(); | |
| 8818 o.add("foo"); | |
| 8819 o.add("foo"); | |
| 8820 return o; | |
| 8821 } | |
| 8822 | |
| 8823 checkUnnamed436(core.List<core.String> o) { | |
| 8824 unittest.expect(o, unittest.hasLength(2)); | |
| 8825 unittest.expect(o[0], unittest.equals('foo')); | |
| 8826 unittest.expect(o[1], unittest.equals('foo')); | |
| 8827 } | |
| 8828 | |
| 8829 buildUnnamed437() { | |
| 8830 var o = new core.List<core.String>(); | |
| 8831 o.add("foo"); | |
| 8832 o.add("foo"); | |
| 8833 return o; | |
| 8834 } | |
| 8835 | |
| 8836 checkUnnamed437(core.List<core.String> o) { | |
| 8837 unittest.expect(o, unittest.hasLength(2)); | |
| 8838 unittest.expect(o[0], unittest.equals('foo')); | |
| 8839 unittest.expect(o[1], unittest.equals('foo')); | |
| 8840 } | |
| 8841 | |
| 8842 buildUnnamed438() { | |
| 8843 var o = new core.List<core.String>(); | |
| 8844 o.add("foo"); | |
| 8845 o.add("foo"); | |
| 8846 return o; | |
| 8847 } | |
| 8848 | |
| 8849 checkUnnamed438(core.List<core.String> o) { | |
| 8850 unittest.expect(o, unittest.hasLength(2)); | |
| 8851 unittest.expect(o[0], unittest.equals('foo')); | |
| 8852 unittest.expect(o[1], unittest.equals('foo')); | |
| 8853 } | |
| 8854 | |
| 8855 buildUnnamed439() { | |
| 8856 var o = new core.List<core.String>(); | |
| 8857 o.add("foo"); | |
| 8858 o.add("foo"); | |
| 8859 return o; | |
| 8860 } | |
| 8861 | |
| 8862 checkUnnamed439(core.List<core.String> o) { | |
| 8863 unittest.expect(o, unittest.hasLength(2)); | |
| 8864 unittest.expect(o[0], unittest.equals('foo')); | |
| 8865 unittest.expect(o[1], unittest.equals('foo')); | |
| 8866 } | |
| 8867 | |
| 8868 buildUnnamed440() { | |
| 8869 var o = new core.List<core.String>(); | |
| 8870 o.add("foo"); | |
| 8871 o.add("foo"); | |
| 8872 return o; | |
| 8873 } | |
| 8874 | |
| 8875 checkUnnamed440(core.List<core.String> o) { | |
| 8876 unittest.expect(o, unittest.hasLength(2)); | |
| 8877 unittest.expect(o[0], unittest.equals('foo')); | |
| 8878 unittest.expect(o[1], unittest.equals('foo')); | |
| 8879 } | |
| 8880 | |
| 8881 buildUnnamed441() { | |
| 8882 var o = new core.List<core.String>(); | |
| 8883 o.add("foo"); | |
| 8884 o.add("foo"); | |
| 8885 return o; | |
| 8886 } | |
| 8887 | |
| 8888 checkUnnamed441(core.List<core.String> o) { | |
| 8889 unittest.expect(o, unittest.hasLength(2)); | |
| 8890 unittest.expect(o[0], unittest.equals('foo')); | |
| 8891 unittest.expect(o[1], unittest.equals('foo')); | |
| 8892 } | |
| 8893 | |
| 8894 buildUnnamed442() { | |
| 8895 var o = new core.List<core.String>(); | |
| 8896 o.add("foo"); | |
| 8897 o.add("foo"); | |
| 8898 return o; | |
| 8899 } | |
| 8900 | |
| 8901 checkUnnamed442(core.List<core.String> o) { | |
| 8902 unittest.expect(o, unittest.hasLength(2)); | |
| 8903 unittest.expect(o[0], unittest.equals('foo')); | |
| 8904 unittest.expect(o[1], unittest.equals('foo')); | |
| 8905 } | |
| 8906 | |
| 8907 buildUnnamed443() { | |
| 8908 var o = new core.List<core.String>(); | |
| 8909 o.add("foo"); | |
| 8910 o.add("foo"); | |
| 8911 return o; | |
| 8912 } | |
| 8913 | |
| 8914 checkUnnamed443(core.List<core.String> o) { | |
| 8915 unittest.expect(o, unittest.hasLength(2)); | |
| 8916 unittest.expect(o[0], unittest.equals('foo')); | |
| 8917 unittest.expect(o[1], unittest.equals('foo')); | |
| 8918 } | |
| 8919 | |
| 8920 buildUnnamed444() { | |
| 8921 var o = new core.List<core.String>(); | |
| 8922 o.add("foo"); | |
| 8923 o.add("foo"); | |
| 8924 return o; | |
| 8925 } | |
| 8926 | |
| 8927 checkUnnamed444(core.List<core.String> o) { | |
| 8928 unittest.expect(o, unittest.hasLength(2)); | |
| 8929 unittest.expect(o[0], unittest.equals('foo')); | |
| 8930 unittest.expect(o[1], unittest.equals('foo')); | |
| 8931 } | |
| 8932 | |
| 8933 buildUnnamed445() { | |
| 8934 var o = new core.List<core.String>(); | |
| 8935 o.add("foo"); | |
| 8936 o.add("foo"); | |
| 8937 return o; | |
| 8938 } | |
| 8939 | |
| 8940 checkUnnamed445(core.List<core.String> o) { | |
| 8941 unittest.expect(o, unittest.hasLength(2)); | |
| 8942 unittest.expect(o[0], unittest.equals('foo')); | |
| 8943 unittest.expect(o[1], unittest.equals('foo')); | |
| 8944 } | |
| 8945 | |
| 8946 buildUnnamed446() { | |
| 8947 var o = new core.List<core.String>(); | |
| 8948 o.add("foo"); | |
| 8949 o.add("foo"); | |
| 8950 return o; | |
| 8951 } | |
| 8952 | |
| 8953 checkUnnamed446(core.List<core.String> o) { | |
| 8954 unittest.expect(o, unittest.hasLength(2)); | |
| 8955 unittest.expect(o[0], unittest.equals('foo')); | |
| 8956 unittest.expect(o[1], unittest.equals('foo')); | |
| 8957 } | |
| 8958 | |
| 8959 buildUnnamed447() { | |
| 8960 var o = new core.List<core.String>(); | |
| 8961 o.add("foo"); | |
| 8962 o.add("foo"); | |
| 8963 return o; | |
| 8964 } | |
| 8965 | |
| 8966 checkUnnamed447(core.List<core.String> o) { | |
| 8967 unittest.expect(o, unittest.hasLength(2)); | |
| 8968 unittest.expect(o[0], unittest.equals('foo')); | |
| 8969 unittest.expect(o[1], unittest.equals('foo')); | |
| 8970 } | |
| 8971 | |
| 8972 buildUnnamed448() { | |
| 8973 var o = new core.List<core.String>(); | |
| 8974 o.add("foo"); | |
| 8975 o.add("foo"); | |
| 8976 return o; | |
| 8977 } | |
| 8978 | |
| 8979 checkUnnamed448(core.List<core.String> o) { | |
| 8980 unittest.expect(o, unittest.hasLength(2)); | |
| 8981 unittest.expect(o[0], unittest.equals('foo')); | |
| 8982 unittest.expect(o[1], unittest.equals('foo')); | |
| 8983 } | |
| 8984 | |
| 8985 buildUnnamed449() { | |
| 8986 var o = new core.List<core.String>(); | |
| 8987 o.add("foo"); | |
| 8988 o.add("foo"); | |
| 8989 return o; | |
| 8990 } | |
| 8991 | |
| 8992 checkUnnamed449(core.List<core.String> o) { | |
| 8993 unittest.expect(o, unittest.hasLength(2)); | |
| 8994 unittest.expect(o[0], unittest.equals('foo')); | |
| 8995 unittest.expect(o[1], unittest.equals('foo')); | |
| 8996 } | |
| 8997 | |
| 8998 buildUnnamed450() { | |
| 8999 var o = new core.List<core.String>(); | |
| 9000 o.add("foo"); | |
| 9001 o.add("foo"); | |
| 9002 return o; | |
| 9003 } | |
| 9004 | |
| 9005 checkUnnamed450(core.List<core.String> o) { | |
| 9006 unittest.expect(o, unittest.hasLength(2)); | |
| 9007 unittest.expect(o[0], unittest.equals('foo')); | |
| 9008 unittest.expect(o[1], unittest.equals('foo')); | |
| 9009 } | |
| 9010 | |
| 9011 buildUnnamed451() { | |
| 9012 var o = new core.List<core.String>(); | |
| 9013 o.add("foo"); | |
| 9014 o.add("foo"); | |
| 9015 return o; | |
| 9016 } | |
| 9017 | |
| 9018 checkUnnamed451(core.List<core.String> o) { | |
| 9019 unittest.expect(o, unittest.hasLength(2)); | |
| 9020 unittest.expect(o[0], unittest.equals('foo')); | |
| 9021 unittest.expect(o[1], unittest.equals('foo')); | |
| 9022 } | |
| 9023 | |
| 9024 buildUnnamed452() { | |
| 9025 var o = new core.List<core.String>(); | |
| 9026 o.add("foo"); | |
| 9027 o.add("foo"); | |
| 9028 return o; | |
| 9029 } | |
| 9030 | |
| 9031 checkUnnamed452(core.List<core.String> o) { | |
| 9032 unittest.expect(o, unittest.hasLength(2)); | |
| 9033 unittest.expect(o[0], unittest.equals('foo')); | |
| 9034 unittest.expect(o[1], unittest.equals('foo')); | |
| 9035 } | |
| 9036 | |
| 9037 buildUnnamed453() { | |
| 9038 var o = new core.List<core.String>(); | |
| 9039 o.add("foo"); | |
| 9040 o.add("foo"); | |
| 9041 return o; | |
| 9042 } | |
| 9043 | |
| 9044 checkUnnamed453(core.List<core.String> o) { | |
| 9045 unittest.expect(o, unittest.hasLength(2)); | |
| 9046 unittest.expect(o[0], unittest.equals('foo')); | |
| 9047 unittest.expect(o[1], unittest.equals('foo')); | |
| 9048 } | |
| 9049 | |
| 9050 buildUnnamed454() { | |
| 9051 var o = new core.List<core.String>(); | |
| 9052 o.add("foo"); | |
| 9053 o.add("foo"); | |
| 9054 return o; | |
| 9055 } | |
| 9056 | |
| 9057 checkUnnamed454(core.List<core.String> o) { | |
| 9058 unittest.expect(o, unittest.hasLength(2)); | |
| 9059 unittest.expect(o[0], unittest.equals('foo')); | |
| 9060 unittest.expect(o[1], unittest.equals('foo')); | |
| 9061 } | |
| 9062 | |
| 9063 buildUnnamed455() { | |
| 9064 var o = new core.List<core.String>(); | |
| 9065 o.add("foo"); | |
| 9066 o.add("foo"); | |
| 9067 return o; | |
| 9068 } | |
| 9069 | |
| 9070 checkUnnamed455(core.List<core.String> o) { | |
| 9071 unittest.expect(o, unittest.hasLength(2)); | |
| 9072 unittest.expect(o[0], unittest.equals('foo')); | |
| 9073 unittest.expect(o[1], unittest.equals('foo')); | |
| 9074 } | |
| 9075 | |
| 9076 buildUnnamed456() { | |
| 9077 var o = new core.List<core.String>(); | |
| 9078 o.add("foo"); | |
| 9079 o.add("foo"); | |
| 9080 return o; | |
| 9081 } | |
| 9082 | |
| 9083 checkUnnamed456(core.List<core.String> o) { | |
| 9084 unittest.expect(o, unittest.hasLength(2)); | |
| 9085 unittest.expect(o[0], unittest.equals('foo')); | |
| 9086 unittest.expect(o[1], unittest.equals('foo')); | |
| 9087 } | |
| 9088 | |
| 9089 buildUnnamed457() { | |
| 9090 var o = new core.List<core.String>(); | |
| 9091 o.add("foo"); | |
| 9092 o.add("foo"); | |
| 9093 return o; | |
| 9094 } | |
| 9095 | |
| 9096 checkUnnamed457(core.List<core.String> o) { | |
| 9097 unittest.expect(o, unittest.hasLength(2)); | |
| 9098 unittest.expect(o[0], unittest.equals('foo')); | |
| 9099 unittest.expect(o[1], unittest.equals('foo')); | |
| 9100 } | |
| 9101 | |
| 9102 buildUnnamed458() { | |
| 9103 var o = new core.List<core.String>(); | |
| 9104 o.add("foo"); | |
| 9105 o.add("foo"); | |
| 9106 return o; | |
| 9107 } | |
| 9108 | |
| 9109 checkUnnamed458(core.List<core.String> o) { | |
| 9110 unittest.expect(o, unittest.hasLength(2)); | |
| 9111 unittest.expect(o[0], unittest.equals('foo')); | |
| 9112 unittest.expect(o[1], unittest.equals('foo')); | |
| 9113 } | |
| 9114 | |
| 9115 | |
| 9116 main() { | |
| 9117 unittest.group("obj-schema-Account", () { | |
| 9118 unittest.test("to-json--from-json", () { | |
| 9119 var o = buildAccount(); | |
| 9120 var od = new api.Account.fromJson(o.toJson()); | |
| 9121 checkAccount(od); | |
| 9122 }); | |
| 9123 }); | |
| 9124 | |
| 9125 | |
| 9126 unittest.group("obj-schema-AccountActiveAdSummary", () { | |
| 9127 unittest.test("to-json--from-json", () { | |
| 9128 var o = buildAccountActiveAdSummary(); | |
| 9129 var od = new api.AccountActiveAdSummary.fromJson(o.toJson()); | |
| 9130 checkAccountActiveAdSummary(od); | |
| 9131 }); | |
| 9132 }); | |
| 9133 | |
| 9134 | |
| 9135 unittest.group("obj-schema-AccountPermission", () { | |
| 9136 unittest.test("to-json--from-json", () { | |
| 9137 var o = buildAccountPermission(); | |
| 9138 var od = new api.AccountPermission.fromJson(o.toJson()); | |
| 9139 checkAccountPermission(od); | |
| 9140 }); | |
| 9141 }); | |
| 9142 | |
| 9143 | |
| 9144 unittest.group("obj-schema-AccountPermissionGroup", () { | |
| 9145 unittest.test("to-json--from-json", () { | |
| 9146 var o = buildAccountPermissionGroup(); | |
| 9147 var od = new api.AccountPermissionGroup.fromJson(o.toJson()); | |
| 9148 checkAccountPermissionGroup(od); | |
| 9149 }); | |
| 9150 }); | |
| 9151 | |
| 9152 | |
| 9153 unittest.group("obj-schema-AccountPermissionGroupsListResponse", () { | |
| 9154 unittest.test("to-json--from-json", () { | |
| 9155 var o = buildAccountPermissionGroupsListResponse(); | |
| 9156 var od = new api.AccountPermissionGroupsListResponse.fromJson(o.toJson()); | |
| 9157 checkAccountPermissionGroupsListResponse(od); | |
| 9158 }); | |
| 9159 }); | |
| 9160 | |
| 9161 | |
| 9162 unittest.group("obj-schema-AccountPermissionsListResponse", () { | |
| 9163 unittest.test("to-json--from-json", () { | |
| 9164 var o = buildAccountPermissionsListResponse(); | |
| 9165 var od = new api.AccountPermissionsListResponse.fromJson(o.toJson()); | |
| 9166 checkAccountPermissionsListResponse(od); | |
| 9167 }); | |
| 9168 }); | |
| 9169 | |
| 9170 | |
| 9171 unittest.group("obj-schema-AccountUserProfile", () { | |
| 9172 unittest.test("to-json--from-json", () { | |
| 9173 var o = buildAccountUserProfile(); | |
| 9174 var od = new api.AccountUserProfile.fromJson(o.toJson()); | |
| 9175 checkAccountUserProfile(od); | |
| 9176 }); | |
| 9177 }); | |
| 9178 | |
| 9179 | |
| 9180 unittest.group("obj-schema-AccountUserProfilesListResponse", () { | |
| 9181 unittest.test("to-json--from-json", () { | |
| 9182 var o = buildAccountUserProfilesListResponse(); | |
| 9183 var od = new api.AccountUserProfilesListResponse.fromJson(o.toJson()); | |
| 9184 checkAccountUserProfilesListResponse(od); | |
| 9185 }); | |
| 9186 }); | |
| 9187 | |
| 9188 | |
| 9189 unittest.group("obj-schema-AccountsListResponse", () { | |
| 9190 unittest.test("to-json--from-json", () { | |
| 9191 var o = buildAccountsListResponse(); | |
| 9192 var od = new api.AccountsListResponse.fromJson(o.toJson()); | |
| 9193 checkAccountsListResponse(od); | |
| 9194 }); | |
| 9195 }); | |
| 9196 | |
| 9197 | |
| 9198 unittest.group("obj-schema-Activities", () { | |
| 9199 unittest.test("to-json--from-json", () { | |
| 9200 var o = buildActivities(); | |
| 9201 var od = new api.Activities.fromJson(o.toJson()); | |
| 9202 checkActivities(od); | |
| 9203 }); | |
| 9204 }); | |
| 9205 | |
| 9206 | |
| 9207 unittest.group("obj-schema-Ad", () { | |
| 9208 unittest.test("to-json--from-json", () { | |
| 9209 var o = buildAd(); | |
| 9210 var od = new api.Ad.fromJson(o.toJson()); | |
| 9211 checkAd(od); | |
| 9212 }); | |
| 9213 }); | |
| 9214 | |
| 9215 | |
| 9216 unittest.group("obj-schema-AdSlot", () { | |
| 9217 unittest.test("to-json--from-json", () { | |
| 9218 var o = buildAdSlot(); | |
| 9219 var od = new api.AdSlot.fromJson(o.toJson()); | |
| 9220 checkAdSlot(od); | |
| 9221 }); | |
| 9222 }); | |
| 9223 | |
| 9224 | |
| 9225 unittest.group("obj-schema-AdsListResponse", () { | |
| 9226 unittest.test("to-json--from-json", () { | |
| 9227 var o = buildAdsListResponse(); | |
| 9228 var od = new api.AdsListResponse.fromJson(o.toJson()); | |
| 9229 checkAdsListResponse(od); | |
| 9230 }); | |
| 9231 }); | |
| 9232 | |
| 9233 | |
| 9234 unittest.group("obj-schema-Advertiser", () { | |
| 9235 unittest.test("to-json--from-json", () { | |
| 9236 var o = buildAdvertiser(); | |
| 9237 var od = new api.Advertiser.fromJson(o.toJson()); | |
| 9238 checkAdvertiser(od); | |
| 9239 }); | |
| 9240 }); | |
| 9241 | |
| 9242 | |
| 9243 unittest.group("obj-schema-AdvertiserGroup", () { | |
| 9244 unittest.test("to-json--from-json", () { | |
| 9245 var o = buildAdvertiserGroup(); | |
| 9246 var od = new api.AdvertiserGroup.fromJson(o.toJson()); | |
| 9247 checkAdvertiserGroup(od); | |
| 9248 }); | |
| 9249 }); | |
| 9250 | |
| 9251 | |
| 9252 unittest.group("obj-schema-AdvertiserGroupsListResponse", () { | |
| 9253 unittest.test("to-json--from-json", () { | |
| 9254 var o = buildAdvertiserGroupsListResponse(); | |
| 9255 var od = new api.AdvertiserGroupsListResponse.fromJson(o.toJson()); | |
| 9256 checkAdvertiserGroupsListResponse(od); | |
| 9257 }); | |
| 9258 }); | |
| 9259 | |
| 9260 | |
| 9261 unittest.group("obj-schema-AdvertisersListResponse", () { | |
| 9262 unittest.test("to-json--from-json", () { | |
| 9263 var o = buildAdvertisersListResponse(); | |
| 9264 var od = new api.AdvertisersListResponse.fromJson(o.toJson()); | |
| 9265 checkAdvertisersListResponse(od); | |
| 9266 }); | |
| 9267 }); | |
| 9268 | |
| 9269 | |
| 9270 unittest.group("obj-schema-AudienceSegment", () { | |
| 9271 unittest.test("to-json--from-json", () { | |
| 9272 var o = buildAudienceSegment(); | |
| 9273 var od = new api.AudienceSegment.fromJson(o.toJson()); | |
| 9274 checkAudienceSegment(od); | |
| 9275 }); | |
| 9276 }); | |
| 9277 | |
| 9278 | |
| 9279 unittest.group("obj-schema-AudienceSegmentGroup", () { | |
| 9280 unittest.test("to-json--from-json", () { | |
| 9281 var o = buildAudienceSegmentGroup(); | |
| 9282 var od = new api.AudienceSegmentGroup.fromJson(o.toJson()); | |
| 9283 checkAudienceSegmentGroup(od); | |
| 9284 }); | |
| 9285 }); | |
| 9286 | |
| 9287 | |
| 9288 unittest.group("obj-schema-Browser", () { | |
| 9289 unittest.test("to-json--from-json", () { | |
| 9290 var o = buildBrowser(); | |
| 9291 var od = new api.Browser.fromJson(o.toJson()); | |
| 9292 checkBrowser(od); | |
| 9293 }); | |
| 9294 }); | |
| 9295 | |
| 9296 | |
| 9297 unittest.group("obj-schema-BrowsersListResponse", () { | |
| 9298 unittest.test("to-json--from-json", () { | |
| 9299 var o = buildBrowsersListResponse(); | |
| 9300 var od = new api.BrowsersListResponse.fromJson(o.toJson()); | |
| 9301 checkBrowsersListResponse(od); | |
| 9302 }); | |
| 9303 }); | |
| 9304 | |
| 9305 | |
| 9306 unittest.group("obj-schema-Campaign", () { | |
| 9307 unittest.test("to-json--from-json", () { | |
| 9308 var o = buildCampaign(); | |
| 9309 var od = new api.Campaign.fromJson(o.toJson()); | |
| 9310 checkCampaign(od); | |
| 9311 }); | |
| 9312 }); | |
| 9313 | |
| 9314 | |
| 9315 unittest.group("obj-schema-CampaignCreativeAssociation", () { | |
| 9316 unittest.test("to-json--from-json", () { | |
| 9317 var o = buildCampaignCreativeAssociation(); | |
| 9318 var od = new api.CampaignCreativeAssociation.fromJson(o.toJson()); | |
| 9319 checkCampaignCreativeAssociation(od); | |
| 9320 }); | |
| 9321 }); | |
| 9322 | |
| 9323 | |
| 9324 unittest.group("obj-schema-CampaignCreativeAssociationsListResponse", () { | |
| 9325 unittest.test("to-json--from-json", () { | |
| 9326 var o = buildCampaignCreativeAssociationsListResponse(); | |
| 9327 var od = new api.CampaignCreativeAssociationsListResponse.fromJson(o.toJso
n()); | |
| 9328 checkCampaignCreativeAssociationsListResponse(od); | |
| 9329 }); | |
| 9330 }); | |
| 9331 | |
| 9332 | |
| 9333 unittest.group("obj-schema-CampaignsListResponse", () { | |
| 9334 unittest.test("to-json--from-json", () { | |
| 9335 var o = buildCampaignsListResponse(); | |
| 9336 var od = new api.CampaignsListResponse.fromJson(o.toJson()); | |
| 9337 checkCampaignsListResponse(od); | |
| 9338 }); | |
| 9339 }); | |
| 9340 | |
| 9341 | |
| 9342 unittest.group("obj-schema-ChangeLog", () { | |
| 9343 unittest.test("to-json--from-json", () { | |
| 9344 var o = buildChangeLog(); | |
| 9345 var od = new api.ChangeLog.fromJson(o.toJson()); | |
| 9346 checkChangeLog(od); | |
| 9347 }); | |
| 9348 }); | |
| 9349 | |
| 9350 | |
| 9351 unittest.group("obj-schema-ChangeLogsListResponse", () { | |
| 9352 unittest.test("to-json--from-json", () { | |
| 9353 var o = buildChangeLogsListResponse(); | |
| 9354 var od = new api.ChangeLogsListResponse.fromJson(o.toJson()); | |
| 9355 checkChangeLogsListResponse(od); | |
| 9356 }); | |
| 9357 }); | |
| 9358 | |
| 9359 | |
| 9360 unittest.group("obj-schema-CitiesListResponse", () { | |
| 9361 unittest.test("to-json--from-json", () { | |
| 9362 var o = buildCitiesListResponse(); | |
| 9363 var od = new api.CitiesListResponse.fromJson(o.toJson()); | |
| 9364 checkCitiesListResponse(od); | |
| 9365 }); | |
| 9366 }); | |
| 9367 | |
| 9368 | |
| 9369 unittest.group("obj-schema-City", () { | |
| 9370 unittest.test("to-json--from-json", () { | |
| 9371 var o = buildCity(); | |
| 9372 var od = new api.City.fromJson(o.toJson()); | |
| 9373 checkCity(od); | |
| 9374 }); | |
| 9375 }); | |
| 9376 | |
| 9377 | |
| 9378 unittest.group("obj-schema-ClickTag", () { | |
| 9379 unittest.test("to-json--from-json", () { | |
| 9380 var o = buildClickTag(); | |
| 9381 var od = new api.ClickTag.fromJson(o.toJson()); | |
| 9382 checkClickTag(od); | |
| 9383 }); | |
| 9384 }); | |
| 9385 | |
| 9386 | |
| 9387 unittest.group("obj-schema-ClickThroughUrl", () { | |
| 9388 unittest.test("to-json--from-json", () { | |
| 9389 var o = buildClickThroughUrl(); | |
| 9390 var od = new api.ClickThroughUrl.fromJson(o.toJson()); | |
| 9391 checkClickThroughUrl(od); | |
| 9392 }); | |
| 9393 }); | |
| 9394 | |
| 9395 | |
| 9396 unittest.group("obj-schema-ClickThroughUrlSuffixProperties", () { | |
| 9397 unittest.test("to-json--from-json", () { | |
| 9398 var o = buildClickThroughUrlSuffixProperties(); | |
| 9399 var od = new api.ClickThroughUrlSuffixProperties.fromJson(o.toJson()); | |
| 9400 checkClickThroughUrlSuffixProperties(od); | |
| 9401 }); | |
| 9402 }); | |
| 9403 | |
| 9404 | |
| 9405 unittest.group("obj-schema-CompanionClickThroughOverride", () { | |
| 9406 unittest.test("to-json--from-json", () { | |
| 9407 var o = buildCompanionClickThroughOverride(); | |
| 9408 var od = new api.CompanionClickThroughOverride.fromJson(o.toJson()); | |
| 9409 checkCompanionClickThroughOverride(od); | |
| 9410 }); | |
| 9411 }); | |
| 9412 | |
| 9413 | |
| 9414 unittest.group("obj-schema-CompatibleFields", () { | |
| 9415 unittest.test("to-json--from-json", () { | |
| 9416 var o = buildCompatibleFields(); | |
| 9417 var od = new api.CompatibleFields.fromJson(o.toJson()); | |
| 9418 checkCompatibleFields(od); | |
| 9419 }); | |
| 9420 }); | |
| 9421 | |
| 9422 | |
| 9423 unittest.group("obj-schema-ConnectionType", () { | |
| 9424 unittest.test("to-json--from-json", () { | |
| 9425 var o = buildConnectionType(); | |
| 9426 var od = new api.ConnectionType.fromJson(o.toJson()); | |
| 9427 checkConnectionType(od); | |
| 9428 }); | |
| 9429 }); | |
| 9430 | |
| 9431 | |
| 9432 unittest.group("obj-schema-ConnectionTypesListResponse", () { | |
| 9433 unittest.test("to-json--from-json", () { | |
| 9434 var o = buildConnectionTypesListResponse(); | |
| 9435 var od = new api.ConnectionTypesListResponse.fromJson(o.toJson()); | |
| 9436 checkConnectionTypesListResponse(od); | |
| 9437 }); | |
| 9438 }); | |
| 9439 | |
| 9440 | |
| 9441 unittest.group("obj-schema-ContentCategoriesListResponse", () { | |
| 9442 unittest.test("to-json--from-json", () { | |
| 9443 var o = buildContentCategoriesListResponse(); | |
| 9444 var od = new api.ContentCategoriesListResponse.fromJson(o.toJson()); | |
| 9445 checkContentCategoriesListResponse(od); | |
| 9446 }); | |
| 9447 }); | |
| 9448 | |
| 9449 | |
| 9450 unittest.group("obj-schema-ContentCategory", () { | |
| 9451 unittest.test("to-json--from-json", () { | |
| 9452 var o = buildContentCategory(); | |
| 9453 var od = new api.ContentCategory.fromJson(o.toJson()); | |
| 9454 checkContentCategory(od); | |
| 9455 }); | |
| 9456 }); | |
| 9457 | |
| 9458 | |
| 9459 unittest.group("obj-schema-CountriesListResponse", () { | |
| 9460 unittest.test("to-json--from-json", () { | |
| 9461 var o = buildCountriesListResponse(); | |
| 9462 var od = new api.CountriesListResponse.fromJson(o.toJson()); | |
| 9463 checkCountriesListResponse(od); | |
| 9464 }); | |
| 9465 }); | |
| 9466 | |
| 9467 | |
| 9468 unittest.group("obj-schema-Country", () { | |
| 9469 unittest.test("to-json--from-json", () { | |
| 9470 var o = buildCountry(); | |
| 9471 var od = new api.Country.fromJson(o.toJson()); | |
| 9472 checkCountry(od); | |
| 9473 }); | |
| 9474 }); | |
| 9475 | |
| 9476 | |
| 9477 unittest.group("obj-schema-Creative", () { | |
| 9478 unittest.test("to-json--from-json", () { | |
| 9479 var o = buildCreative(); | |
| 9480 var od = new api.Creative.fromJson(o.toJson()); | |
| 9481 checkCreative(od); | |
| 9482 }); | |
| 9483 }); | |
| 9484 | |
| 9485 | |
| 9486 unittest.group("obj-schema-CreativeAsset", () { | |
| 9487 unittest.test("to-json--from-json", () { | |
| 9488 var o = buildCreativeAsset(); | |
| 9489 var od = new api.CreativeAsset.fromJson(o.toJson()); | |
| 9490 checkCreativeAsset(od); | |
| 9491 }); | |
| 9492 }); | |
| 9493 | |
| 9494 | |
| 9495 unittest.group("obj-schema-CreativeAssetId", () { | |
| 9496 unittest.test("to-json--from-json", () { | |
| 9497 var o = buildCreativeAssetId(); | |
| 9498 var od = new api.CreativeAssetId.fromJson(o.toJson()); | |
| 9499 checkCreativeAssetId(od); | |
| 9500 }); | |
| 9501 }); | |
| 9502 | |
| 9503 | |
| 9504 unittest.group("obj-schema-CreativeAssetMetadata", () { | |
| 9505 unittest.test("to-json--from-json", () { | |
| 9506 var o = buildCreativeAssetMetadata(); | |
| 9507 var od = new api.CreativeAssetMetadata.fromJson(o.toJson()); | |
| 9508 checkCreativeAssetMetadata(od); | |
| 9509 }); | |
| 9510 }); | |
| 9511 | |
| 9512 | |
| 9513 unittest.group("obj-schema-CreativeAssignment", () { | |
| 9514 unittest.test("to-json--from-json", () { | |
| 9515 var o = buildCreativeAssignment(); | |
| 9516 var od = new api.CreativeAssignment.fromJson(o.toJson()); | |
| 9517 checkCreativeAssignment(od); | |
| 9518 }); | |
| 9519 }); | |
| 9520 | |
| 9521 | |
| 9522 unittest.group("obj-schema-CreativeCustomEvent", () { | |
| 9523 unittest.test("to-json--from-json", () { | |
| 9524 var o = buildCreativeCustomEvent(); | |
| 9525 var od = new api.CreativeCustomEvent.fromJson(o.toJson()); | |
| 9526 checkCreativeCustomEvent(od); | |
| 9527 }); | |
| 9528 }); | |
| 9529 | |
| 9530 | |
| 9531 unittest.group("obj-schema-CreativeField", () { | |
| 9532 unittest.test("to-json--from-json", () { | |
| 9533 var o = buildCreativeField(); | |
| 9534 var od = new api.CreativeField.fromJson(o.toJson()); | |
| 9535 checkCreativeField(od); | |
| 9536 }); | |
| 9537 }); | |
| 9538 | |
| 9539 | |
| 9540 unittest.group("obj-schema-CreativeFieldAssignment", () { | |
| 9541 unittest.test("to-json--from-json", () { | |
| 9542 var o = buildCreativeFieldAssignment(); | |
| 9543 var od = new api.CreativeFieldAssignment.fromJson(o.toJson()); | |
| 9544 checkCreativeFieldAssignment(od); | |
| 9545 }); | |
| 9546 }); | |
| 9547 | |
| 9548 | |
| 9549 unittest.group("obj-schema-CreativeFieldValue", () { | |
| 9550 unittest.test("to-json--from-json", () { | |
| 9551 var o = buildCreativeFieldValue(); | |
| 9552 var od = new api.CreativeFieldValue.fromJson(o.toJson()); | |
| 9553 checkCreativeFieldValue(od); | |
| 9554 }); | |
| 9555 }); | |
| 9556 | |
| 9557 | |
| 9558 unittest.group("obj-schema-CreativeFieldValuesListResponse", () { | |
| 9559 unittest.test("to-json--from-json", () { | |
| 9560 var o = buildCreativeFieldValuesListResponse(); | |
| 9561 var od = new api.CreativeFieldValuesListResponse.fromJson(o.toJson()); | |
| 9562 checkCreativeFieldValuesListResponse(od); | |
| 9563 }); | |
| 9564 }); | |
| 9565 | |
| 9566 | |
| 9567 unittest.group("obj-schema-CreativeFieldsListResponse", () { | |
| 9568 unittest.test("to-json--from-json", () { | |
| 9569 var o = buildCreativeFieldsListResponse(); | |
| 9570 var od = new api.CreativeFieldsListResponse.fromJson(o.toJson()); | |
| 9571 checkCreativeFieldsListResponse(od); | |
| 9572 }); | |
| 9573 }); | |
| 9574 | |
| 9575 | |
| 9576 unittest.group("obj-schema-CreativeGroup", () { | |
| 9577 unittest.test("to-json--from-json", () { | |
| 9578 var o = buildCreativeGroup(); | |
| 9579 var od = new api.CreativeGroup.fromJson(o.toJson()); | |
| 9580 checkCreativeGroup(od); | |
| 9581 }); | |
| 9582 }); | |
| 9583 | |
| 9584 | |
| 9585 unittest.group("obj-schema-CreativeGroupAssignment", () { | |
| 9586 unittest.test("to-json--from-json", () { | |
| 9587 var o = buildCreativeGroupAssignment(); | |
| 9588 var od = new api.CreativeGroupAssignment.fromJson(o.toJson()); | |
| 9589 checkCreativeGroupAssignment(od); | |
| 9590 }); | |
| 9591 }); | |
| 9592 | |
| 9593 | |
| 9594 unittest.group("obj-schema-CreativeGroupsListResponse", () { | |
| 9595 unittest.test("to-json--from-json", () { | |
| 9596 var o = buildCreativeGroupsListResponse(); | |
| 9597 var od = new api.CreativeGroupsListResponse.fromJson(o.toJson()); | |
| 9598 checkCreativeGroupsListResponse(od); | |
| 9599 }); | |
| 9600 }); | |
| 9601 | |
| 9602 | |
| 9603 unittest.group("obj-schema-CreativeOptimizationConfiguration", () { | |
| 9604 unittest.test("to-json--from-json", () { | |
| 9605 var o = buildCreativeOptimizationConfiguration(); | |
| 9606 var od = new api.CreativeOptimizationConfiguration.fromJson(o.toJson()); | |
| 9607 checkCreativeOptimizationConfiguration(od); | |
| 9608 }); | |
| 9609 }); | |
| 9610 | |
| 9611 | |
| 9612 unittest.group("obj-schema-CreativeRotation", () { | |
| 9613 unittest.test("to-json--from-json", () { | |
| 9614 var o = buildCreativeRotation(); | |
| 9615 var od = new api.CreativeRotation.fromJson(o.toJson()); | |
| 9616 checkCreativeRotation(od); | |
| 9617 }); | |
| 9618 }); | |
| 9619 | |
| 9620 | |
| 9621 unittest.group("obj-schema-CreativeSettings", () { | |
| 9622 unittest.test("to-json--from-json", () { | |
| 9623 var o = buildCreativeSettings(); | |
| 9624 var od = new api.CreativeSettings.fromJson(o.toJson()); | |
| 9625 checkCreativeSettings(od); | |
| 9626 }); | |
| 9627 }); | |
| 9628 | |
| 9629 | |
| 9630 unittest.group("obj-schema-CreativesListResponse", () { | |
| 9631 unittest.test("to-json--from-json", () { | |
| 9632 var o = buildCreativesListResponse(); | |
| 9633 var od = new api.CreativesListResponse.fromJson(o.toJson()); | |
| 9634 checkCreativesListResponse(od); | |
| 9635 }); | |
| 9636 }); | |
| 9637 | |
| 9638 | |
| 9639 unittest.group("obj-schema-CrossDimensionReachReportCompatibleFields", () { | |
| 9640 unittest.test("to-json--from-json", () { | |
| 9641 var o = buildCrossDimensionReachReportCompatibleFields(); | |
| 9642 var od = new api.CrossDimensionReachReportCompatibleFields.fromJson(o.toJs
on()); | |
| 9643 checkCrossDimensionReachReportCompatibleFields(od); | |
| 9644 }); | |
| 9645 }); | |
| 9646 | |
| 9647 | |
| 9648 unittest.group("obj-schema-CustomRichMediaEvents", () { | |
| 9649 unittest.test("to-json--from-json", () { | |
| 9650 var o = buildCustomRichMediaEvents(); | |
| 9651 var od = new api.CustomRichMediaEvents.fromJson(o.toJson()); | |
| 9652 checkCustomRichMediaEvents(od); | |
| 9653 }); | |
| 9654 }); | |
| 9655 | |
| 9656 | |
| 9657 unittest.group("obj-schema-DateRange", () { | |
| 9658 unittest.test("to-json--from-json", () { | |
| 9659 var o = buildDateRange(); | |
| 9660 var od = new api.DateRange.fromJson(o.toJson()); | |
| 9661 checkDateRange(od); | |
| 9662 }); | |
| 9663 }); | |
| 9664 | |
| 9665 | |
| 9666 unittest.group("obj-schema-DayPartTargeting", () { | |
| 9667 unittest.test("to-json--from-json", () { | |
| 9668 var o = buildDayPartTargeting(); | |
| 9669 var od = new api.DayPartTargeting.fromJson(o.toJson()); | |
| 9670 checkDayPartTargeting(od); | |
| 9671 }); | |
| 9672 }); | |
| 9673 | |
| 9674 | |
| 9675 unittest.group("obj-schema-DefaultClickThroughEventTagProperties", () { | |
| 9676 unittest.test("to-json--from-json", () { | |
| 9677 var o = buildDefaultClickThroughEventTagProperties(); | |
| 9678 var od = new api.DefaultClickThroughEventTagProperties.fromJson(o.toJson()
); | |
| 9679 checkDefaultClickThroughEventTagProperties(od); | |
| 9680 }); | |
| 9681 }); | |
| 9682 | |
| 9683 | |
| 9684 unittest.group("obj-schema-DeliverySchedule", () { | |
| 9685 unittest.test("to-json--from-json", () { | |
| 9686 var o = buildDeliverySchedule(); | |
| 9687 var od = new api.DeliverySchedule.fromJson(o.toJson()); | |
| 9688 checkDeliverySchedule(od); | |
| 9689 }); | |
| 9690 }); | |
| 9691 | |
| 9692 | |
| 9693 unittest.group("obj-schema-DfpSettings", () { | |
| 9694 unittest.test("to-json--from-json", () { | |
| 9695 var o = buildDfpSettings(); | |
| 9696 var od = new api.DfpSettings.fromJson(o.toJson()); | |
| 9697 checkDfpSettings(od); | |
| 9698 }); | |
| 9699 }); | |
| 9700 | |
| 9701 | |
| 9702 unittest.group("obj-schema-Dimension", () { | |
| 9703 unittest.test("to-json--from-json", () { | |
| 9704 var o = buildDimension(); | |
| 9705 var od = new api.Dimension.fromJson(o.toJson()); | |
| 9706 checkDimension(od); | |
| 9707 }); | |
| 9708 }); | |
| 9709 | |
| 9710 | |
| 9711 unittest.group("obj-schema-DimensionFilter", () { | |
| 9712 unittest.test("to-json--from-json", () { | |
| 9713 var o = buildDimensionFilter(); | |
| 9714 var od = new api.DimensionFilter.fromJson(o.toJson()); | |
| 9715 checkDimensionFilter(od); | |
| 9716 }); | |
| 9717 }); | |
| 9718 | |
| 9719 | |
| 9720 unittest.group("obj-schema-DimensionValue", () { | |
| 9721 unittest.test("to-json--from-json", () { | |
| 9722 var o = buildDimensionValue(); | |
| 9723 var od = new api.DimensionValue.fromJson(o.toJson()); | |
| 9724 checkDimensionValue(od); | |
| 9725 }); | |
| 9726 }); | |
| 9727 | |
| 9728 | |
| 9729 unittest.group("obj-schema-DimensionValueList", () { | |
| 9730 unittest.test("to-json--from-json", () { | |
| 9731 var o = buildDimensionValueList(); | |
| 9732 var od = new api.DimensionValueList.fromJson(o.toJson()); | |
| 9733 checkDimensionValueList(od); | |
| 9734 }); | |
| 9735 }); | |
| 9736 | |
| 9737 | |
| 9738 unittest.group("obj-schema-DimensionValueRequest", () { | |
| 9739 unittest.test("to-json--from-json", () { | |
| 9740 var o = buildDimensionValueRequest(); | |
| 9741 var od = new api.DimensionValueRequest.fromJson(o.toJson()); | |
| 9742 checkDimensionValueRequest(od); | |
| 9743 }); | |
| 9744 }); | |
| 9745 | |
| 9746 | |
| 9747 unittest.group("obj-schema-DirectorySite", () { | |
| 9748 unittest.test("to-json--from-json", () { | |
| 9749 var o = buildDirectorySite(); | |
| 9750 var od = new api.DirectorySite.fromJson(o.toJson()); | |
| 9751 checkDirectorySite(od); | |
| 9752 }); | |
| 9753 }); | |
| 9754 | |
| 9755 | |
| 9756 unittest.group("obj-schema-DirectorySiteContact", () { | |
| 9757 unittest.test("to-json--from-json", () { | |
| 9758 var o = buildDirectorySiteContact(); | |
| 9759 var od = new api.DirectorySiteContact.fromJson(o.toJson()); | |
| 9760 checkDirectorySiteContact(od); | |
| 9761 }); | |
| 9762 }); | |
| 9763 | |
| 9764 | |
| 9765 unittest.group("obj-schema-DirectorySiteContactAssignment", () { | |
| 9766 unittest.test("to-json--from-json", () { | |
| 9767 var o = buildDirectorySiteContactAssignment(); | |
| 9768 var od = new api.DirectorySiteContactAssignment.fromJson(o.toJson()); | |
| 9769 checkDirectorySiteContactAssignment(od); | |
| 9770 }); | |
| 9771 }); | |
| 9772 | |
| 9773 | |
| 9774 unittest.group("obj-schema-DirectorySiteContactsListResponse", () { | |
| 9775 unittest.test("to-json--from-json", () { | |
| 9776 var o = buildDirectorySiteContactsListResponse(); | |
| 9777 var od = new api.DirectorySiteContactsListResponse.fromJson(o.toJson()); | |
| 9778 checkDirectorySiteContactsListResponse(od); | |
| 9779 }); | |
| 9780 }); | |
| 9781 | |
| 9782 | |
| 9783 unittest.group("obj-schema-DirectorySiteSettings", () { | |
| 9784 unittest.test("to-json--from-json", () { | |
| 9785 var o = buildDirectorySiteSettings(); | |
| 9786 var od = new api.DirectorySiteSettings.fromJson(o.toJson()); | |
| 9787 checkDirectorySiteSettings(od); | |
| 9788 }); | |
| 9789 }); | |
| 9790 | |
| 9791 | |
| 9792 unittest.group("obj-schema-DirectorySitesListResponse", () { | |
| 9793 unittest.test("to-json--from-json", () { | |
| 9794 var o = buildDirectorySitesListResponse(); | |
| 9795 var od = new api.DirectorySitesListResponse.fromJson(o.toJson()); | |
| 9796 checkDirectorySitesListResponse(od); | |
| 9797 }); | |
| 9798 }); | |
| 9799 | |
| 9800 | |
| 9801 unittest.group("obj-schema-EventTag", () { | |
| 9802 unittest.test("to-json--from-json", () { | |
| 9803 var o = buildEventTag(); | |
| 9804 var od = new api.EventTag.fromJson(o.toJson()); | |
| 9805 checkEventTag(od); | |
| 9806 }); | |
| 9807 }); | |
| 9808 | |
| 9809 | |
| 9810 unittest.group("obj-schema-EventTagOverride", () { | |
| 9811 unittest.test("to-json--from-json", () { | |
| 9812 var o = buildEventTagOverride(); | |
| 9813 var od = new api.EventTagOverride.fromJson(o.toJson()); | |
| 9814 checkEventTagOverride(od); | |
| 9815 }); | |
| 9816 }); | |
| 9817 | |
| 9818 | |
| 9819 unittest.group("obj-schema-EventTagsListResponse", () { | |
| 9820 unittest.test("to-json--from-json", () { | |
| 9821 var o = buildEventTagsListResponse(); | |
| 9822 var od = new api.EventTagsListResponse.fromJson(o.toJson()); | |
| 9823 checkEventTagsListResponse(od); | |
| 9824 }); | |
| 9825 }); | |
| 9826 | |
| 9827 | |
| 9828 unittest.group("obj-schema-FileUrls", () { | |
| 9829 unittest.test("to-json--from-json", () { | |
| 9830 var o = buildFileUrls(); | |
| 9831 var od = new api.FileUrls.fromJson(o.toJson()); | |
| 9832 checkFileUrls(od); | |
| 9833 }); | |
| 9834 }); | |
| 9835 | |
| 9836 | |
| 9837 unittest.group("obj-schema-File", () { | |
| 9838 unittest.test("to-json--from-json", () { | |
| 9839 var o = buildFile(); | |
| 9840 var od = new api.File.fromJson(o.toJson()); | |
| 9841 checkFile(od); | |
| 9842 }); | |
| 9843 }); | |
| 9844 | |
| 9845 | |
| 9846 unittest.group("obj-schema-FileList", () { | |
| 9847 unittest.test("to-json--from-json", () { | |
| 9848 var o = buildFileList(); | |
| 9849 var od = new api.FileList.fromJson(o.toJson()); | |
| 9850 checkFileList(od); | |
| 9851 }); | |
| 9852 }); | |
| 9853 | |
| 9854 | |
| 9855 unittest.group("obj-schema-Flight", () { | |
| 9856 unittest.test("to-json--from-json", () { | |
| 9857 var o = buildFlight(); | |
| 9858 var od = new api.Flight.fromJson(o.toJson()); | |
| 9859 checkFlight(od); | |
| 9860 }); | |
| 9861 }); | |
| 9862 | |
| 9863 | |
| 9864 unittest.group("obj-schema-FloodlightActivitiesGenerateTagResponse", () { | |
| 9865 unittest.test("to-json--from-json", () { | |
| 9866 var o = buildFloodlightActivitiesGenerateTagResponse(); | |
| 9867 var od = new api.FloodlightActivitiesGenerateTagResponse.fromJson(o.toJson
()); | |
| 9868 checkFloodlightActivitiesGenerateTagResponse(od); | |
| 9869 }); | |
| 9870 }); | |
| 9871 | |
| 9872 | |
| 9873 unittest.group("obj-schema-FloodlightActivitiesListResponse", () { | |
| 9874 unittest.test("to-json--from-json", () { | |
| 9875 var o = buildFloodlightActivitiesListResponse(); | |
| 9876 var od = new api.FloodlightActivitiesListResponse.fromJson(o.toJson()); | |
| 9877 checkFloodlightActivitiesListResponse(od); | |
| 9878 }); | |
| 9879 }); | |
| 9880 | |
| 9881 | |
| 9882 unittest.group("obj-schema-FloodlightActivity", () { | |
| 9883 unittest.test("to-json--from-json", () { | |
| 9884 var o = buildFloodlightActivity(); | |
| 9885 var od = new api.FloodlightActivity.fromJson(o.toJson()); | |
| 9886 checkFloodlightActivity(od); | |
| 9887 }); | |
| 9888 }); | |
| 9889 | |
| 9890 | |
| 9891 unittest.group("obj-schema-FloodlightActivityDynamicTag", () { | |
| 9892 unittest.test("to-json--from-json", () { | |
| 9893 var o = buildFloodlightActivityDynamicTag(); | |
| 9894 var od = new api.FloodlightActivityDynamicTag.fromJson(o.toJson()); | |
| 9895 checkFloodlightActivityDynamicTag(od); | |
| 9896 }); | |
| 9897 }); | |
| 9898 | |
| 9899 | |
| 9900 unittest.group("obj-schema-FloodlightActivityGroup", () { | |
| 9901 unittest.test("to-json--from-json", () { | |
| 9902 var o = buildFloodlightActivityGroup(); | |
| 9903 var od = new api.FloodlightActivityGroup.fromJson(o.toJson()); | |
| 9904 checkFloodlightActivityGroup(od); | |
| 9905 }); | |
| 9906 }); | |
| 9907 | |
| 9908 | |
| 9909 unittest.group("obj-schema-FloodlightActivityGroupsListResponse", () { | |
| 9910 unittest.test("to-json--from-json", () { | |
| 9911 var o = buildFloodlightActivityGroupsListResponse(); | |
| 9912 var od = new api.FloodlightActivityGroupsListResponse.fromJson(o.toJson())
; | |
| 9913 checkFloodlightActivityGroupsListResponse(od); | |
| 9914 }); | |
| 9915 }); | |
| 9916 | |
| 9917 | |
| 9918 unittest.group("obj-schema-FloodlightActivityPublisherDynamicTag", () { | |
| 9919 unittest.test("to-json--from-json", () { | |
| 9920 var o = buildFloodlightActivityPublisherDynamicTag(); | |
| 9921 var od = new api.FloodlightActivityPublisherDynamicTag.fromJson(o.toJson()
); | |
| 9922 checkFloodlightActivityPublisherDynamicTag(od); | |
| 9923 }); | |
| 9924 }); | |
| 9925 | |
| 9926 | |
| 9927 unittest.group("obj-schema-FloodlightConfiguration", () { | |
| 9928 unittest.test("to-json--from-json", () { | |
| 9929 var o = buildFloodlightConfiguration(); | |
| 9930 var od = new api.FloodlightConfiguration.fromJson(o.toJson()); | |
| 9931 checkFloodlightConfiguration(od); | |
| 9932 }); | |
| 9933 }); | |
| 9934 | |
| 9935 | |
| 9936 unittest.group("obj-schema-FloodlightConfigurationsListResponse", () { | |
| 9937 unittest.test("to-json--from-json", () { | |
| 9938 var o = buildFloodlightConfigurationsListResponse(); | |
| 9939 var od = new api.FloodlightConfigurationsListResponse.fromJson(o.toJson())
; | |
| 9940 checkFloodlightConfigurationsListResponse(od); | |
| 9941 }); | |
| 9942 }); | |
| 9943 | |
| 9944 | |
| 9945 unittest.group("obj-schema-FloodlightReportCompatibleFields", () { | |
| 9946 unittest.test("to-json--from-json", () { | |
| 9947 var o = buildFloodlightReportCompatibleFields(); | |
| 9948 var od = new api.FloodlightReportCompatibleFields.fromJson(o.toJson()); | |
| 9949 checkFloodlightReportCompatibleFields(od); | |
| 9950 }); | |
| 9951 }); | |
| 9952 | |
| 9953 | |
| 9954 unittest.group("obj-schema-FrequencyCap", () { | |
| 9955 unittest.test("to-json--from-json", () { | |
| 9956 var o = buildFrequencyCap(); | |
| 9957 var od = new api.FrequencyCap.fromJson(o.toJson()); | |
| 9958 checkFrequencyCap(od); | |
| 9959 }); | |
| 9960 }); | |
| 9961 | |
| 9962 | |
| 9963 unittest.group("obj-schema-FsCommand", () { | |
| 9964 unittest.test("to-json--from-json", () { | |
| 9965 var o = buildFsCommand(); | |
| 9966 var od = new api.FsCommand.fromJson(o.toJson()); | |
| 9967 checkFsCommand(od); | |
| 9968 }); | |
| 9969 }); | |
| 9970 | |
| 9971 | |
| 9972 unittest.group("obj-schema-GeoTargeting", () { | |
| 9973 unittest.test("to-json--from-json", () { | |
| 9974 var o = buildGeoTargeting(); | |
| 9975 var od = new api.GeoTargeting.fromJson(o.toJson()); | |
| 9976 checkGeoTargeting(od); | |
| 9977 }); | |
| 9978 }); | |
| 9979 | |
| 9980 | |
| 9981 unittest.group("obj-schema-InventoryItem", () { | |
| 9982 unittest.test("to-json--from-json", () { | |
| 9983 var o = buildInventoryItem(); | |
| 9984 var od = new api.InventoryItem.fromJson(o.toJson()); | |
| 9985 checkInventoryItem(od); | |
| 9986 }); | |
| 9987 }); | |
| 9988 | |
| 9989 | |
| 9990 unittest.group("obj-schema-InventoryItemsListResponse", () { | |
| 9991 unittest.test("to-json--from-json", () { | |
| 9992 var o = buildInventoryItemsListResponse(); | |
| 9993 var od = new api.InventoryItemsListResponse.fromJson(o.toJson()); | |
| 9994 checkInventoryItemsListResponse(od); | |
| 9995 }); | |
| 9996 }); | |
| 9997 | |
| 9998 | |
| 9999 unittest.group("obj-schema-KeyValueTargetingExpression", () { | |
| 10000 unittest.test("to-json--from-json", () { | |
| 10001 var o = buildKeyValueTargetingExpression(); | |
| 10002 var od = new api.KeyValueTargetingExpression.fromJson(o.toJson()); | |
| 10003 checkKeyValueTargetingExpression(od); | |
| 10004 }); | |
| 10005 }); | |
| 10006 | |
| 10007 | |
| 10008 unittest.group("obj-schema-LandingPage", () { | |
| 10009 unittest.test("to-json--from-json", () { | |
| 10010 var o = buildLandingPage(); | |
| 10011 var od = new api.LandingPage.fromJson(o.toJson()); | |
| 10012 checkLandingPage(od); | |
| 10013 }); | |
| 10014 }); | |
| 10015 | |
| 10016 | |
| 10017 unittest.group("obj-schema-LandingPagesListResponse", () { | |
| 10018 unittest.test("to-json--from-json", () { | |
| 10019 var o = buildLandingPagesListResponse(); | |
| 10020 var od = new api.LandingPagesListResponse.fromJson(o.toJson()); | |
| 10021 checkLandingPagesListResponse(od); | |
| 10022 }); | |
| 10023 }); | |
| 10024 | |
| 10025 | |
| 10026 unittest.group("obj-schema-LastModifiedInfo", () { | |
| 10027 unittest.test("to-json--from-json", () { | |
| 10028 var o = buildLastModifiedInfo(); | |
| 10029 var od = new api.LastModifiedInfo.fromJson(o.toJson()); | |
| 10030 checkLastModifiedInfo(od); | |
| 10031 }); | |
| 10032 }); | |
| 10033 | |
| 10034 | |
| 10035 unittest.group("obj-schema-ListPopulationClause", () { | |
| 10036 unittest.test("to-json--from-json", () { | |
| 10037 var o = buildListPopulationClause(); | |
| 10038 var od = new api.ListPopulationClause.fromJson(o.toJson()); | |
| 10039 checkListPopulationClause(od); | |
| 10040 }); | |
| 10041 }); | |
| 10042 | |
| 10043 | |
| 10044 unittest.group("obj-schema-ListPopulationRule", () { | |
| 10045 unittest.test("to-json--from-json", () { | |
| 10046 var o = buildListPopulationRule(); | |
| 10047 var od = new api.ListPopulationRule.fromJson(o.toJson()); | |
| 10048 checkListPopulationRule(od); | |
| 10049 }); | |
| 10050 }); | |
| 10051 | |
| 10052 | |
| 10053 unittest.group("obj-schema-ListPopulationTerm", () { | |
| 10054 unittest.test("to-json--from-json", () { | |
| 10055 var o = buildListPopulationTerm(); | |
| 10056 var od = new api.ListPopulationTerm.fromJson(o.toJson()); | |
| 10057 checkListPopulationTerm(od); | |
| 10058 }); | |
| 10059 }); | |
| 10060 | |
| 10061 | |
| 10062 unittest.group("obj-schema-ListTargetingExpression", () { | |
| 10063 unittest.test("to-json--from-json", () { | |
| 10064 var o = buildListTargetingExpression(); | |
| 10065 var od = new api.ListTargetingExpression.fromJson(o.toJson()); | |
| 10066 checkListTargetingExpression(od); | |
| 10067 }); | |
| 10068 }); | |
| 10069 | |
| 10070 | |
| 10071 unittest.group("obj-schema-LookbackConfiguration", () { | |
| 10072 unittest.test("to-json--from-json", () { | |
| 10073 var o = buildLookbackConfiguration(); | |
| 10074 var od = new api.LookbackConfiguration.fromJson(o.toJson()); | |
| 10075 checkLookbackConfiguration(od); | |
| 10076 }); | |
| 10077 }); | |
| 10078 | |
| 10079 | |
| 10080 unittest.group("obj-schema-Metric", () { | |
| 10081 unittest.test("to-json--from-json", () { | |
| 10082 var o = buildMetric(); | |
| 10083 var od = new api.Metric.fromJson(o.toJson()); | |
| 10084 checkMetric(od); | |
| 10085 }); | |
| 10086 }); | |
| 10087 | |
| 10088 | |
| 10089 unittest.group("obj-schema-Metro", () { | |
| 10090 unittest.test("to-json--from-json", () { | |
| 10091 var o = buildMetro(); | |
| 10092 var od = new api.Metro.fromJson(o.toJson()); | |
| 10093 checkMetro(od); | |
| 10094 }); | |
| 10095 }); | |
| 10096 | |
| 10097 | |
| 10098 unittest.group("obj-schema-MetrosListResponse", () { | |
| 10099 unittest.test("to-json--from-json", () { | |
| 10100 var o = buildMetrosListResponse(); | |
| 10101 var od = new api.MetrosListResponse.fromJson(o.toJson()); | |
| 10102 checkMetrosListResponse(od); | |
| 10103 }); | |
| 10104 }); | |
| 10105 | |
| 10106 | |
| 10107 unittest.group("obj-schema-MobileCarrier", () { | |
| 10108 unittest.test("to-json--from-json", () { | |
| 10109 var o = buildMobileCarrier(); | |
| 10110 var od = new api.MobileCarrier.fromJson(o.toJson()); | |
| 10111 checkMobileCarrier(od); | |
| 10112 }); | |
| 10113 }); | |
| 10114 | |
| 10115 | |
| 10116 unittest.group("obj-schema-MobileCarriersListResponse", () { | |
| 10117 unittest.test("to-json--from-json", () { | |
| 10118 var o = buildMobileCarriersListResponse(); | |
| 10119 var od = new api.MobileCarriersListResponse.fromJson(o.toJson()); | |
| 10120 checkMobileCarriersListResponse(od); | |
| 10121 }); | |
| 10122 }); | |
| 10123 | |
| 10124 | |
| 10125 unittest.group("obj-schema-ObjectFilter", () { | |
| 10126 unittest.test("to-json--from-json", () { | |
| 10127 var o = buildObjectFilter(); | |
| 10128 var od = new api.ObjectFilter.fromJson(o.toJson()); | |
| 10129 checkObjectFilter(od); | |
| 10130 }); | |
| 10131 }); | |
| 10132 | |
| 10133 | |
| 10134 unittest.group("obj-schema-OffsetPosition", () { | |
| 10135 unittest.test("to-json--from-json", () { | |
| 10136 var o = buildOffsetPosition(); | |
| 10137 var od = new api.OffsetPosition.fromJson(o.toJson()); | |
| 10138 checkOffsetPosition(od); | |
| 10139 }); | |
| 10140 }); | |
| 10141 | |
| 10142 | |
| 10143 unittest.group("obj-schema-OmnitureSettings", () { | |
| 10144 unittest.test("to-json--from-json", () { | |
| 10145 var o = buildOmnitureSettings(); | |
| 10146 var od = new api.OmnitureSettings.fromJson(o.toJson()); | |
| 10147 checkOmnitureSettings(od); | |
| 10148 }); | |
| 10149 }); | |
| 10150 | |
| 10151 | |
| 10152 unittest.group("obj-schema-OperatingSystem", () { | |
| 10153 unittest.test("to-json--from-json", () { | |
| 10154 var o = buildOperatingSystem(); | |
| 10155 var od = new api.OperatingSystem.fromJson(o.toJson()); | |
| 10156 checkOperatingSystem(od); | |
| 10157 }); | |
| 10158 }); | |
| 10159 | |
| 10160 | |
| 10161 unittest.group("obj-schema-OperatingSystemVersion", () { | |
| 10162 unittest.test("to-json--from-json", () { | |
| 10163 var o = buildOperatingSystemVersion(); | |
| 10164 var od = new api.OperatingSystemVersion.fromJson(o.toJson()); | |
| 10165 checkOperatingSystemVersion(od); | |
| 10166 }); | |
| 10167 }); | |
| 10168 | |
| 10169 | |
| 10170 unittest.group("obj-schema-OperatingSystemVersionsListResponse", () { | |
| 10171 unittest.test("to-json--from-json", () { | |
| 10172 var o = buildOperatingSystemVersionsListResponse(); | |
| 10173 var od = new api.OperatingSystemVersionsListResponse.fromJson(o.toJson()); | |
| 10174 checkOperatingSystemVersionsListResponse(od); | |
| 10175 }); | |
| 10176 }); | |
| 10177 | |
| 10178 | |
| 10179 unittest.group("obj-schema-OperatingSystemsListResponse", () { | |
| 10180 unittest.test("to-json--from-json", () { | |
| 10181 var o = buildOperatingSystemsListResponse(); | |
| 10182 var od = new api.OperatingSystemsListResponse.fromJson(o.toJson()); | |
| 10183 checkOperatingSystemsListResponse(od); | |
| 10184 }); | |
| 10185 }); | |
| 10186 | |
| 10187 | |
| 10188 unittest.group("obj-schema-OptimizationActivity", () { | |
| 10189 unittest.test("to-json--from-json", () { | |
| 10190 var o = buildOptimizationActivity(); | |
| 10191 var od = new api.OptimizationActivity.fromJson(o.toJson()); | |
| 10192 checkOptimizationActivity(od); | |
| 10193 }); | |
| 10194 }); | |
| 10195 | |
| 10196 | |
| 10197 unittest.group("obj-schema-Order", () { | |
| 10198 unittest.test("to-json--from-json", () { | |
| 10199 var o = buildOrder(); | |
| 10200 var od = new api.Order.fromJson(o.toJson()); | |
| 10201 checkOrder(od); | |
| 10202 }); | |
| 10203 }); | |
| 10204 | |
| 10205 | |
| 10206 unittest.group("obj-schema-OrderContact", () { | |
| 10207 unittest.test("to-json--from-json", () { | |
| 10208 var o = buildOrderContact(); | |
| 10209 var od = new api.OrderContact.fromJson(o.toJson()); | |
| 10210 checkOrderContact(od); | |
| 10211 }); | |
| 10212 }); | |
| 10213 | |
| 10214 | |
| 10215 unittest.group("obj-schema-OrderDocument", () { | |
| 10216 unittest.test("to-json--from-json", () { | |
| 10217 var o = buildOrderDocument(); | |
| 10218 var od = new api.OrderDocument.fromJson(o.toJson()); | |
| 10219 checkOrderDocument(od); | |
| 10220 }); | |
| 10221 }); | |
| 10222 | |
| 10223 | |
| 10224 unittest.group("obj-schema-OrderDocumentsListResponse", () { | |
| 10225 unittest.test("to-json--from-json", () { | |
| 10226 var o = buildOrderDocumentsListResponse(); | |
| 10227 var od = new api.OrderDocumentsListResponse.fromJson(o.toJson()); | |
| 10228 checkOrderDocumentsListResponse(od); | |
| 10229 }); | |
| 10230 }); | |
| 10231 | |
| 10232 | |
| 10233 unittest.group("obj-schema-OrdersListResponse", () { | |
| 10234 unittest.test("to-json--from-json", () { | |
| 10235 var o = buildOrdersListResponse(); | |
| 10236 var od = new api.OrdersListResponse.fromJson(o.toJson()); | |
| 10237 checkOrdersListResponse(od); | |
| 10238 }); | |
| 10239 }); | |
| 10240 | |
| 10241 | |
| 10242 unittest.group("obj-schema-PathToConversionReportCompatibleFields", () { | |
| 10243 unittest.test("to-json--from-json", () { | |
| 10244 var o = buildPathToConversionReportCompatibleFields(); | |
| 10245 var od = new api.PathToConversionReportCompatibleFields.fromJson(o.toJson(
)); | |
| 10246 checkPathToConversionReportCompatibleFields(od); | |
| 10247 }); | |
| 10248 }); | |
| 10249 | |
| 10250 | |
| 10251 unittest.group("obj-schema-Placement", () { | |
| 10252 unittest.test("to-json--from-json", () { | |
| 10253 var o = buildPlacement(); | |
| 10254 var od = new api.Placement.fromJson(o.toJson()); | |
| 10255 checkPlacement(od); | |
| 10256 }); | |
| 10257 }); | |
| 10258 | |
| 10259 | |
| 10260 unittest.group("obj-schema-PlacementAssignment", () { | |
| 10261 unittest.test("to-json--from-json", () { | |
| 10262 var o = buildPlacementAssignment(); | |
| 10263 var od = new api.PlacementAssignment.fromJson(o.toJson()); | |
| 10264 checkPlacementAssignment(od); | |
| 10265 }); | |
| 10266 }); | |
| 10267 | |
| 10268 | |
| 10269 unittest.group("obj-schema-PlacementGroup", () { | |
| 10270 unittest.test("to-json--from-json", () { | |
| 10271 var o = buildPlacementGroup(); | |
| 10272 var od = new api.PlacementGroup.fromJson(o.toJson()); | |
| 10273 checkPlacementGroup(od); | |
| 10274 }); | |
| 10275 }); | |
| 10276 | |
| 10277 | |
| 10278 unittest.group("obj-schema-PlacementGroupsListResponse", () { | |
| 10279 unittest.test("to-json--from-json", () { | |
| 10280 var o = buildPlacementGroupsListResponse(); | |
| 10281 var od = new api.PlacementGroupsListResponse.fromJson(o.toJson()); | |
| 10282 checkPlacementGroupsListResponse(od); | |
| 10283 }); | |
| 10284 }); | |
| 10285 | |
| 10286 | |
| 10287 unittest.group("obj-schema-PlacementStrategiesListResponse", () { | |
| 10288 unittest.test("to-json--from-json", () { | |
| 10289 var o = buildPlacementStrategiesListResponse(); | |
| 10290 var od = new api.PlacementStrategiesListResponse.fromJson(o.toJson()); | |
| 10291 checkPlacementStrategiesListResponse(od); | |
| 10292 }); | |
| 10293 }); | |
| 10294 | |
| 10295 | |
| 10296 unittest.group("obj-schema-PlacementStrategy", () { | |
| 10297 unittest.test("to-json--from-json", () { | |
| 10298 var o = buildPlacementStrategy(); | |
| 10299 var od = new api.PlacementStrategy.fromJson(o.toJson()); | |
| 10300 checkPlacementStrategy(od); | |
| 10301 }); | |
| 10302 }); | |
| 10303 | |
| 10304 | |
| 10305 unittest.group("obj-schema-PlacementTag", () { | |
| 10306 unittest.test("to-json--from-json", () { | |
| 10307 var o = buildPlacementTag(); | |
| 10308 var od = new api.PlacementTag.fromJson(o.toJson()); | |
| 10309 checkPlacementTag(od); | |
| 10310 }); | |
| 10311 }); | |
| 10312 | |
| 10313 | |
| 10314 unittest.group("obj-schema-PlacementsGenerateTagsResponse", () { | |
| 10315 unittest.test("to-json--from-json", () { | |
| 10316 var o = buildPlacementsGenerateTagsResponse(); | |
| 10317 var od = new api.PlacementsGenerateTagsResponse.fromJson(o.toJson()); | |
| 10318 checkPlacementsGenerateTagsResponse(od); | |
| 10319 }); | |
| 10320 }); | |
| 10321 | |
| 10322 | |
| 10323 unittest.group("obj-schema-PlacementsListResponse", () { | |
| 10324 unittest.test("to-json--from-json", () { | |
| 10325 var o = buildPlacementsListResponse(); | |
| 10326 var od = new api.PlacementsListResponse.fromJson(o.toJson()); | |
| 10327 checkPlacementsListResponse(od); | |
| 10328 }); | |
| 10329 }); | |
| 10330 | |
| 10331 | |
| 10332 unittest.group("obj-schema-PlatformType", () { | |
| 10333 unittest.test("to-json--from-json", () { | |
| 10334 var o = buildPlatformType(); | |
| 10335 var od = new api.PlatformType.fromJson(o.toJson()); | |
| 10336 checkPlatformType(od); | |
| 10337 }); | |
| 10338 }); | |
| 10339 | |
| 10340 | |
| 10341 unittest.group("obj-schema-PlatformTypesListResponse", () { | |
| 10342 unittest.test("to-json--from-json", () { | |
| 10343 var o = buildPlatformTypesListResponse(); | |
| 10344 var od = new api.PlatformTypesListResponse.fromJson(o.toJson()); | |
| 10345 checkPlatformTypesListResponse(od); | |
| 10346 }); | |
| 10347 }); | |
| 10348 | |
| 10349 | |
| 10350 unittest.group("obj-schema-PopupWindowProperties", () { | |
| 10351 unittest.test("to-json--from-json", () { | |
| 10352 var o = buildPopupWindowProperties(); | |
| 10353 var od = new api.PopupWindowProperties.fromJson(o.toJson()); | |
| 10354 checkPopupWindowProperties(od); | |
| 10355 }); | |
| 10356 }); | |
| 10357 | |
| 10358 | |
| 10359 unittest.group("obj-schema-PostalCode", () { | |
| 10360 unittest.test("to-json--from-json", () { | |
| 10361 var o = buildPostalCode(); | |
| 10362 var od = new api.PostalCode.fromJson(o.toJson()); | |
| 10363 checkPostalCode(od); | |
| 10364 }); | |
| 10365 }); | |
| 10366 | |
| 10367 | |
| 10368 unittest.group("obj-schema-PostalCodesListResponse", () { | |
| 10369 unittest.test("to-json--from-json", () { | |
| 10370 var o = buildPostalCodesListResponse(); | |
| 10371 var od = new api.PostalCodesListResponse.fromJson(o.toJson()); | |
| 10372 checkPostalCodesListResponse(od); | |
| 10373 }); | |
| 10374 }); | |
| 10375 | |
| 10376 | |
| 10377 unittest.group("obj-schema-Pricing", () { | |
| 10378 unittest.test("to-json--from-json", () { | |
| 10379 var o = buildPricing(); | |
| 10380 var od = new api.Pricing.fromJson(o.toJson()); | |
| 10381 checkPricing(od); | |
| 10382 }); | |
| 10383 }); | |
| 10384 | |
| 10385 | |
| 10386 unittest.group("obj-schema-PricingSchedule", () { | |
| 10387 unittest.test("to-json--from-json", () { | |
| 10388 var o = buildPricingSchedule(); | |
| 10389 var od = new api.PricingSchedule.fromJson(o.toJson()); | |
| 10390 checkPricingSchedule(od); | |
| 10391 }); | |
| 10392 }); | |
| 10393 | |
| 10394 | |
| 10395 unittest.group("obj-schema-PricingSchedulePricingPeriod", () { | |
| 10396 unittest.test("to-json--from-json", () { | |
| 10397 var o = buildPricingSchedulePricingPeriod(); | |
| 10398 var od = new api.PricingSchedulePricingPeriod.fromJson(o.toJson()); | |
| 10399 checkPricingSchedulePricingPeriod(od); | |
| 10400 }); | |
| 10401 }); | |
| 10402 | |
| 10403 | |
| 10404 unittest.group("obj-schema-Project", () { | |
| 10405 unittest.test("to-json--from-json", () { | |
| 10406 var o = buildProject(); | |
| 10407 var od = new api.Project.fromJson(o.toJson()); | |
| 10408 checkProject(od); | |
| 10409 }); | |
| 10410 }); | |
| 10411 | |
| 10412 | |
| 10413 unittest.group("obj-schema-ProjectsListResponse", () { | |
| 10414 unittest.test("to-json--from-json", () { | |
| 10415 var o = buildProjectsListResponse(); | |
| 10416 var od = new api.ProjectsListResponse.fromJson(o.toJson()); | |
| 10417 checkProjectsListResponse(od); | |
| 10418 }); | |
| 10419 }); | |
| 10420 | |
| 10421 | |
| 10422 unittest.group("obj-schema-ReachReportCompatibleFields", () { | |
| 10423 unittest.test("to-json--from-json", () { | |
| 10424 var o = buildReachReportCompatibleFields(); | |
| 10425 var od = new api.ReachReportCompatibleFields.fromJson(o.toJson()); | |
| 10426 checkReachReportCompatibleFields(od); | |
| 10427 }); | |
| 10428 }); | |
| 10429 | |
| 10430 | |
| 10431 unittest.group("obj-schema-Recipient", () { | |
| 10432 unittest.test("to-json--from-json", () { | |
| 10433 var o = buildRecipient(); | |
| 10434 var od = new api.Recipient.fromJson(o.toJson()); | |
| 10435 checkRecipient(od); | |
| 10436 }); | |
| 10437 }); | |
| 10438 | |
| 10439 | |
| 10440 unittest.group("obj-schema-Region", () { | |
| 10441 unittest.test("to-json--from-json", () { | |
| 10442 var o = buildRegion(); | |
| 10443 var od = new api.Region.fromJson(o.toJson()); | |
| 10444 checkRegion(od); | |
| 10445 }); | |
| 10446 }); | |
| 10447 | |
| 10448 | |
| 10449 unittest.group("obj-schema-RegionsListResponse", () { | |
| 10450 unittest.test("to-json--from-json", () { | |
| 10451 var o = buildRegionsListResponse(); | |
| 10452 var od = new api.RegionsListResponse.fromJson(o.toJson()); | |
| 10453 checkRegionsListResponse(od); | |
| 10454 }); | |
| 10455 }); | |
| 10456 | |
| 10457 | |
| 10458 unittest.group("obj-schema-RemarketingList", () { | |
| 10459 unittest.test("to-json--from-json", () { | |
| 10460 var o = buildRemarketingList(); | |
| 10461 var od = new api.RemarketingList.fromJson(o.toJson()); | |
| 10462 checkRemarketingList(od); | |
| 10463 }); | |
| 10464 }); | |
| 10465 | |
| 10466 | |
| 10467 unittest.group("obj-schema-RemarketingListShare", () { | |
| 10468 unittest.test("to-json--from-json", () { | |
| 10469 var o = buildRemarketingListShare(); | |
| 10470 var od = new api.RemarketingListShare.fromJson(o.toJson()); | |
| 10471 checkRemarketingListShare(od); | |
| 10472 }); | |
| 10473 }); | |
| 10474 | |
| 10475 | |
| 10476 unittest.group("obj-schema-RemarketingListsListResponse", () { | |
| 10477 unittest.test("to-json--from-json", () { | |
| 10478 var o = buildRemarketingListsListResponse(); | |
| 10479 var od = new api.RemarketingListsListResponse.fromJson(o.toJson()); | |
| 10480 checkRemarketingListsListResponse(od); | |
| 10481 }); | |
| 10482 }); | |
| 10483 | |
| 10484 | |
| 10485 unittest.group("obj-schema-ReportCriteria", () { | |
| 10486 unittest.test("to-json--from-json", () { | |
| 10487 var o = buildReportCriteria(); | |
| 10488 var od = new api.ReportCriteria.fromJson(o.toJson()); | |
| 10489 checkReportCriteria(od); | |
| 10490 }); | |
| 10491 }); | |
| 10492 | |
| 10493 | |
| 10494 unittest.group("obj-schema-ReportCrossDimensionReachCriteria", () { | |
| 10495 unittest.test("to-json--from-json", () { | |
| 10496 var o = buildReportCrossDimensionReachCriteria(); | |
| 10497 var od = new api.ReportCrossDimensionReachCriteria.fromJson(o.toJson()); | |
| 10498 checkReportCrossDimensionReachCriteria(od); | |
| 10499 }); | |
| 10500 }); | |
| 10501 | |
| 10502 | |
| 10503 unittest.group("obj-schema-ReportDelivery", () { | |
| 10504 unittest.test("to-json--from-json", () { | |
| 10505 var o = buildReportDelivery(); | |
| 10506 var od = new api.ReportDelivery.fromJson(o.toJson()); | |
| 10507 checkReportDelivery(od); | |
| 10508 }); | |
| 10509 }); | |
| 10510 | |
| 10511 | |
| 10512 unittest.group("obj-schema-ReportFloodlightCriteriaReportProperties", () { | |
| 10513 unittest.test("to-json--from-json", () { | |
| 10514 var o = buildReportFloodlightCriteriaReportProperties(); | |
| 10515 var od = new api.ReportFloodlightCriteriaReportProperties.fromJson(o.toJso
n()); | |
| 10516 checkReportFloodlightCriteriaReportProperties(od); | |
| 10517 }); | |
| 10518 }); | |
| 10519 | |
| 10520 | |
| 10521 unittest.group("obj-schema-ReportFloodlightCriteria", () { | |
| 10522 unittest.test("to-json--from-json", () { | |
| 10523 var o = buildReportFloodlightCriteria(); | |
| 10524 var od = new api.ReportFloodlightCriteria.fromJson(o.toJson()); | |
| 10525 checkReportFloodlightCriteria(od); | |
| 10526 }); | |
| 10527 }); | |
| 10528 | |
| 10529 | |
| 10530 unittest.group("obj-schema-ReportPathToConversionCriteriaReportProperties", ()
{ | |
| 10531 unittest.test("to-json--from-json", () { | |
| 10532 var o = buildReportPathToConversionCriteriaReportProperties(); | |
| 10533 var od = new api.ReportPathToConversionCriteriaReportProperties.fromJson(o
.toJson()); | |
| 10534 checkReportPathToConversionCriteriaReportProperties(od); | |
| 10535 }); | |
| 10536 }); | |
| 10537 | |
| 10538 | |
| 10539 unittest.group("obj-schema-ReportPathToConversionCriteria", () { | |
| 10540 unittest.test("to-json--from-json", () { | |
| 10541 var o = buildReportPathToConversionCriteria(); | |
| 10542 var od = new api.ReportPathToConversionCriteria.fromJson(o.toJson()); | |
| 10543 checkReportPathToConversionCriteria(od); | |
| 10544 }); | |
| 10545 }); | |
| 10546 | |
| 10547 | |
| 10548 unittest.group("obj-schema-ReportReachCriteria", () { | |
| 10549 unittest.test("to-json--from-json", () { | |
| 10550 var o = buildReportReachCriteria(); | |
| 10551 var od = new api.ReportReachCriteria.fromJson(o.toJson()); | |
| 10552 checkReportReachCriteria(od); | |
| 10553 }); | |
| 10554 }); | |
| 10555 | |
| 10556 | |
| 10557 unittest.group("obj-schema-ReportSchedule", () { | |
| 10558 unittest.test("to-json--from-json", () { | |
| 10559 var o = buildReportSchedule(); | |
| 10560 var od = new api.ReportSchedule.fromJson(o.toJson()); | |
| 10561 checkReportSchedule(od); | |
| 10562 }); | |
| 10563 }); | |
| 10564 | |
| 10565 | |
| 10566 unittest.group("obj-schema-Report", () { | |
| 10567 unittest.test("to-json--from-json", () { | |
| 10568 var o = buildReport(); | |
| 10569 var od = new api.Report.fromJson(o.toJson()); | |
| 10570 checkReport(od); | |
| 10571 }); | |
| 10572 }); | |
| 10573 | |
| 10574 | |
| 10575 unittest.group("obj-schema-ReportCompatibleFields", () { | |
| 10576 unittest.test("to-json--from-json", () { | |
| 10577 var o = buildReportCompatibleFields(); | |
| 10578 var od = new api.ReportCompatibleFields.fromJson(o.toJson()); | |
| 10579 checkReportCompatibleFields(od); | |
| 10580 }); | |
| 10581 }); | |
| 10582 | |
| 10583 | |
| 10584 unittest.group("obj-schema-ReportList", () { | |
| 10585 unittest.test("to-json--from-json", () { | |
| 10586 var o = buildReportList(); | |
| 10587 var od = new api.ReportList.fromJson(o.toJson()); | |
| 10588 checkReportList(od); | |
| 10589 }); | |
| 10590 }); | |
| 10591 | |
| 10592 | |
| 10593 unittest.group("obj-schema-ReportsConfiguration", () { | |
| 10594 unittest.test("to-json--from-json", () { | |
| 10595 var o = buildReportsConfiguration(); | |
| 10596 var od = new api.ReportsConfiguration.fromJson(o.toJson()); | |
| 10597 checkReportsConfiguration(od); | |
| 10598 }); | |
| 10599 }); | |
| 10600 | |
| 10601 | |
| 10602 unittest.group("obj-schema-RichMediaExitOverride", () { | |
| 10603 unittest.test("to-json--from-json", () { | |
| 10604 var o = buildRichMediaExitOverride(); | |
| 10605 var od = new api.RichMediaExitOverride.fromJson(o.toJson()); | |
| 10606 checkRichMediaExitOverride(od); | |
| 10607 }); | |
| 10608 }); | |
| 10609 | |
| 10610 | |
| 10611 unittest.group("obj-schema-Site", () { | |
| 10612 unittest.test("to-json--from-json", () { | |
| 10613 var o = buildSite(); | |
| 10614 var od = new api.Site.fromJson(o.toJson()); | |
| 10615 checkSite(od); | |
| 10616 }); | |
| 10617 }); | |
| 10618 | |
| 10619 | |
| 10620 unittest.group("obj-schema-SiteContact", () { | |
| 10621 unittest.test("to-json--from-json", () { | |
| 10622 var o = buildSiteContact(); | |
| 10623 var od = new api.SiteContact.fromJson(o.toJson()); | |
| 10624 checkSiteContact(od); | |
| 10625 }); | |
| 10626 }); | |
| 10627 | |
| 10628 | |
| 10629 unittest.group("obj-schema-SiteSettings", () { | |
| 10630 unittest.test("to-json--from-json", () { | |
| 10631 var o = buildSiteSettings(); | |
| 10632 var od = new api.SiteSettings.fromJson(o.toJson()); | |
| 10633 checkSiteSettings(od); | |
| 10634 }); | |
| 10635 }); | |
| 10636 | |
| 10637 | |
| 10638 unittest.group("obj-schema-SitesListResponse", () { | |
| 10639 unittest.test("to-json--from-json", () { | |
| 10640 var o = buildSitesListResponse(); | |
| 10641 var od = new api.SitesListResponse.fromJson(o.toJson()); | |
| 10642 checkSitesListResponse(od); | |
| 10643 }); | |
| 10644 }); | |
| 10645 | |
| 10646 | |
| 10647 unittest.group("obj-schema-Size", () { | |
| 10648 unittest.test("to-json--from-json", () { | |
| 10649 var o = buildSize(); | |
| 10650 var od = new api.Size.fromJson(o.toJson()); | |
| 10651 checkSize(od); | |
| 10652 }); | |
| 10653 }); | |
| 10654 | |
| 10655 | |
| 10656 unittest.group("obj-schema-SizesListResponse", () { | |
| 10657 unittest.test("to-json--from-json", () { | |
| 10658 var o = buildSizesListResponse(); | |
| 10659 var od = new api.SizesListResponse.fromJson(o.toJson()); | |
| 10660 checkSizesListResponse(od); | |
| 10661 }); | |
| 10662 }); | |
| 10663 | |
| 10664 | |
| 10665 unittest.group("obj-schema-SortedDimension", () { | |
| 10666 unittest.test("to-json--from-json", () { | |
| 10667 var o = buildSortedDimension(); | |
| 10668 var od = new api.SortedDimension.fromJson(o.toJson()); | |
| 10669 checkSortedDimension(od); | |
| 10670 }); | |
| 10671 }); | |
| 10672 | |
| 10673 | |
| 10674 unittest.group("obj-schema-Subaccount", () { | |
| 10675 unittest.test("to-json--from-json", () { | |
| 10676 var o = buildSubaccount(); | |
| 10677 var od = new api.Subaccount.fromJson(o.toJson()); | |
| 10678 checkSubaccount(od); | |
| 10679 }); | |
| 10680 }); | |
| 10681 | |
| 10682 | |
| 10683 unittest.group("obj-schema-SubaccountsListResponse", () { | |
| 10684 unittest.test("to-json--from-json", () { | |
| 10685 var o = buildSubaccountsListResponse(); | |
| 10686 var od = new api.SubaccountsListResponse.fromJson(o.toJson()); | |
| 10687 checkSubaccountsListResponse(od); | |
| 10688 }); | |
| 10689 }); | |
| 10690 | |
| 10691 | |
| 10692 unittest.group("obj-schema-TagData", () { | |
| 10693 unittest.test("to-json--from-json", () { | |
| 10694 var o = buildTagData(); | |
| 10695 var od = new api.TagData.fromJson(o.toJson()); | |
| 10696 checkTagData(od); | |
| 10697 }); | |
| 10698 }); | |
| 10699 | |
| 10700 | |
| 10701 unittest.group("obj-schema-TagSetting", () { | |
| 10702 unittest.test("to-json--from-json", () { | |
| 10703 var o = buildTagSetting(); | |
| 10704 var od = new api.TagSetting.fromJson(o.toJson()); | |
| 10705 checkTagSetting(od); | |
| 10706 }); | |
| 10707 }); | |
| 10708 | |
| 10709 | |
| 10710 unittest.group("obj-schema-TagSettings", () { | |
| 10711 unittest.test("to-json--from-json", () { | |
| 10712 var o = buildTagSettings(); | |
| 10713 var od = new api.TagSettings.fromJson(o.toJson()); | |
| 10714 checkTagSettings(od); | |
| 10715 }); | |
| 10716 }); | |
| 10717 | |
| 10718 | |
| 10719 unittest.group("obj-schema-TargetWindow", () { | |
| 10720 unittest.test("to-json--from-json", () { | |
| 10721 var o = buildTargetWindow(); | |
| 10722 var od = new api.TargetWindow.fromJson(o.toJson()); | |
| 10723 checkTargetWindow(od); | |
| 10724 }); | |
| 10725 }); | |
| 10726 | |
| 10727 | |
| 10728 unittest.group("obj-schema-TargetableRemarketingList", () { | |
| 10729 unittest.test("to-json--from-json", () { | |
| 10730 var o = buildTargetableRemarketingList(); | |
| 10731 var od = new api.TargetableRemarketingList.fromJson(o.toJson()); | |
| 10732 checkTargetableRemarketingList(od); | |
| 10733 }); | |
| 10734 }); | |
| 10735 | |
| 10736 | |
| 10737 unittest.group("obj-schema-TargetableRemarketingListsListResponse", () { | |
| 10738 unittest.test("to-json--from-json", () { | |
| 10739 var o = buildTargetableRemarketingListsListResponse(); | |
| 10740 var od = new api.TargetableRemarketingListsListResponse.fromJson(o.toJson(
)); | |
| 10741 checkTargetableRemarketingListsListResponse(od); | |
| 10742 }); | |
| 10743 }); | |
| 10744 | |
| 10745 | |
| 10746 unittest.group("obj-schema-TechnologyTargeting", () { | |
| 10747 unittest.test("to-json--from-json", () { | |
| 10748 var o = buildTechnologyTargeting(); | |
| 10749 var od = new api.TechnologyTargeting.fromJson(o.toJson()); | |
| 10750 checkTechnologyTargeting(od); | |
| 10751 }); | |
| 10752 }); | |
| 10753 | |
| 10754 | |
| 10755 unittest.group("obj-schema-ThirdPartyAuthenticationToken", () { | |
| 10756 unittest.test("to-json--from-json", () { | |
| 10757 var o = buildThirdPartyAuthenticationToken(); | |
| 10758 var od = new api.ThirdPartyAuthenticationToken.fromJson(o.toJson()); | |
| 10759 checkThirdPartyAuthenticationToken(od); | |
| 10760 }); | |
| 10761 }); | |
| 10762 | |
| 10763 | |
| 10764 unittest.group("obj-schema-ThirdPartyTrackingUrl", () { | |
| 10765 unittest.test("to-json--from-json", () { | |
| 10766 var o = buildThirdPartyTrackingUrl(); | |
| 10767 var od = new api.ThirdPartyTrackingUrl.fromJson(o.toJson()); | |
| 10768 checkThirdPartyTrackingUrl(od); | |
| 10769 }); | |
| 10770 }); | |
| 10771 | |
| 10772 | |
| 10773 unittest.group("obj-schema-UserDefinedVariableConfiguration", () { | |
| 10774 unittest.test("to-json--from-json", () { | |
| 10775 var o = buildUserDefinedVariableConfiguration(); | |
| 10776 var od = new api.UserDefinedVariableConfiguration.fromJson(o.toJson()); | |
| 10777 checkUserDefinedVariableConfiguration(od); | |
| 10778 }); | |
| 10779 }); | |
| 10780 | |
| 10781 | |
| 10782 unittest.group("obj-schema-UserProfile", () { | |
| 10783 unittest.test("to-json--from-json", () { | |
| 10784 var o = buildUserProfile(); | |
| 10785 var od = new api.UserProfile.fromJson(o.toJson()); | |
| 10786 checkUserProfile(od); | |
| 10787 }); | |
| 10788 }); | |
| 10789 | |
| 10790 | |
| 10791 unittest.group("obj-schema-UserProfileList", () { | |
| 10792 unittest.test("to-json--from-json", () { | |
| 10793 var o = buildUserProfileList(); | |
| 10794 var od = new api.UserProfileList.fromJson(o.toJson()); | |
| 10795 checkUserProfileList(od); | |
| 10796 }); | |
| 10797 }); | |
| 10798 | |
| 10799 | |
| 10800 unittest.group("obj-schema-UserRole", () { | |
| 10801 unittest.test("to-json--from-json", () { | |
| 10802 var o = buildUserRole(); | |
| 10803 var od = new api.UserRole.fromJson(o.toJson()); | |
| 10804 checkUserRole(od); | |
| 10805 }); | |
| 10806 }); | |
| 10807 | |
| 10808 | |
| 10809 unittest.group("obj-schema-UserRolePermission", () { | |
| 10810 unittest.test("to-json--from-json", () { | |
| 10811 var o = buildUserRolePermission(); | |
| 10812 var od = new api.UserRolePermission.fromJson(o.toJson()); | |
| 10813 checkUserRolePermission(od); | |
| 10814 }); | |
| 10815 }); | |
| 10816 | |
| 10817 | |
| 10818 unittest.group("obj-schema-UserRolePermissionGroup", () { | |
| 10819 unittest.test("to-json--from-json", () { | |
| 10820 var o = buildUserRolePermissionGroup(); | |
| 10821 var od = new api.UserRolePermissionGroup.fromJson(o.toJson()); | |
| 10822 checkUserRolePermissionGroup(od); | |
| 10823 }); | |
| 10824 }); | |
| 10825 | |
| 10826 | |
| 10827 unittest.group("obj-schema-UserRolePermissionGroupsListResponse", () { | |
| 10828 unittest.test("to-json--from-json", () { | |
| 10829 var o = buildUserRolePermissionGroupsListResponse(); | |
| 10830 var od = new api.UserRolePermissionGroupsListResponse.fromJson(o.toJson())
; | |
| 10831 checkUserRolePermissionGroupsListResponse(od); | |
| 10832 }); | |
| 10833 }); | |
| 10834 | |
| 10835 | |
| 10836 unittest.group("obj-schema-UserRolePermissionsListResponse", () { | |
| 10837 unittest.test("to-json--from-json", () { | |
| 10838 var o = buildUserRolePermissionsListResponse(); | |
| 10839 var od = new api.UserRolePermissionsListResponse.fromJson(o.toJson()); | |
| 10840 checkUserRolePermissionsListResponse(od); | |
| 10841 }); | |
| 10842 }); | |
| 10843 | |
| 10844 | |
| 10845 unittest.group("obj-schema-UserRolesListResponse", () { | |
| 10846 unittest.test("to-json--from-json", () { | |
| 10847 var o = buildUserRolesListResponse(); | |
| 10848 var od = new api.UserRolesListResponse.fromJson(o.toJson()); | |
| 10849 checkUserRolesListResponse(od); | |
| 10850 }); | |
| 10851 }); | |
| 10852 | |
| 10853 | |
| 10854 unittest.group("resource-AccountActiveAdSummariesResourceApi", () { | |
| 10855 unittest.test("method--get", () { | |
| 10856 | |
| 10857 var mock = new HttpServerMock(); | |
| 10858 api.AccountActiveAdSummariesResourceApi res = new api.DfareportingApi(mock
).accountActiveAdSummaries; | |
| 10859 var arg_profileId = "foo"; | |
| 10860 var arg_summaryAccountId = "foo"; | |
| 10861 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 10862 var path = (req.url).path; | |
| 10863 var pathOffset = 0; | |
| 10864 var index; | |
| 10865 var subPart; | |
| 10866 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 10867 pathOffset += 1; | |
| 10868 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 10869 pathOffset += 18; | |
| 10870 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 10871 pathOffset += 13; | |
| 10872 index = path.indexOf("/accountActiveAdSummaries/", pathOffset); | |
| 10873 unittest.expect(index >= 0, unittest.isTrue); | |
| 10874 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 10875 pathOffset = index; | |
| 10876 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 10877 unittest.expect(path.substring(pathOffset, pathOffset + 26), unittest.eq
uals("/accountActiveAdSummaries/")); | |
| 10878 pathOffset += 26; | |
| 10879 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 10880 pathOffset = path.length; | |
| 10881 unittest.expect(subPart, unittest.equals("$arg_summaryAccountId")); | |
| 10882 | |
| 10883 var query = (req.url).query; | |
| 10884 var queryOffset = 0; | |
| 10885 var queryMap = {}; | |
| 10886 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 10887 parseBool(n) { | |
| 10888 if (n == "true") return true; | |
| 10889 if (n == "false") return false; | |
| 10890 if (n == null) return null; | |
| 10891 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 10892 } | |
| 10893 if (query.length > 0) { | |
| 10894 for (var part in query.split("&")) { | |
| 10895 var keyvalue = part.split("="); | |
| 10896 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 10897 } | |
| 10898 } | |
| 10899 | |
| 10900 | |
| 10901 var h = { | |
| 10902 "content-type" : "application/json; charset=utf-8", | |
| 10903 }; | |
| 10904 var resp = convert.JSON.encode(buildAccountActiveAdSummary()); | |
| 10905 return new async.Future.value(stringResponse(200, h, resp)); | |
| 10906 }), true); | |
| 10907 res.get(arg_profileId, arg_summaryAccountId).then(unittest.expectAsync(((a
pi.AccountActiveAdSummary response) { | |
| 10908 checkAccountActiveAdSummary(response); | |
| 10909 }))); | |
| 10910 }); | |
| 10911 | |
| 10912 }); | |
| 10913 | |
| 10914 | |
| 10915 unittest.group("resource-AccountPermissionGroupsResourceApi", () { | |
| 10916 unittest.test("method--get", () { | |
| 10917 | |
| 10918 var mock = new HttpServerMock(); | |
| 10919 api.AccountPermissionGroupsResourceApi res = new api.DfareportingApi(mock)
.accountPermissionGroups; | |
| 10920 var arg_profileId = "foo"; | |
| 10921 var arg_id = "foo"; | |
| 10922 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 10923 var path = (req.url).path; | |
| 10924 var pathOffset = 0; | |
| 10925 var index; | |
| 10926 var subPart; | |
| 10927 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 10928 pathOffset += 1; | |
| 10929 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 10930 pathOffset += 18; | |
| 10931 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 10932 pathOffset += 13; | |
| 10933 index = path.indexOf("/accountPermissionGroups/", pathOffset); | |
| 10934 unittest.expect(index >= 0, unittest.isTrue); | |
| 10935 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 10936 pathOffset = index; | |
| 10937 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 10938 unittest.expect(path.substring(pathOffset, pathOffset + 25), unittest.eq
uals("/accountPermissionGroups/")); | |
| 10939 pathOffset += 25; | |
| 10940 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 10941 pathOffset = path.length; | |
| 10942 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 10943 | |
| 10944 var query = (req.url).query; | |
| 10945 var queryOffset = 0; | |
| 10946 var queryMap = {}; | |
| 10947 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 10948 parseBool(n) { | |
| 10949 if (n == "true") return true; | |
| 10950 if (n == "false") return false; | |
| 10951 if (n == null) return null; | |
| 10952 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 10953 } | |
| 10954 if (query.length > 0) { | |
| 10955 for (var part in query.split("&")) { | |
| 10956 var keyvalue = part.split("="); | |
| 10957 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 10958 } | |
| 10959 } | |
| 10960 | |
| 10961 | |
| 10962 var h = { | |
| 10963 "content-type" : "application/json; charset=utf-8", | |
| 10964 }; | |
| 10965 var resp = convert.JSON.encode(buildAccountPermissionGroup()); | |
| 10966 return new async.Future.value(stringResponse(200, h, resp)); | |
| 10967 }), true); | |
| 10968 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.AccountPerm
issionGroup response) { | |
| 10969 checkAccountPermissionGroup(response); | |
| 10970 }))); | |
| 10971 }); | |
| 10972 | |
| 10973 unittest.test("method--list", () { | |
| 10974 | |
| 10975 var mock = new HttpServerMock(); | |
| 10976 api.AccountPermissionGroupsResourceApi res = new api.DfareportingApi(mock)
.accountPermissionGroups; | |
| 10977 var arg_profileId = "foo"; | |
| 10978 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 10979 var path = (req.url).path; | |
| 10980 var pathOffset = 0; | |
| 10981 var index; | |
| 10982 var subPart; | |
| 10983 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 10984 pathOffset += 1; | |
| 10985 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 10986 pathOffset += 18; | |
| 10987 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 10988 pathOffset += 13; | |
| 10989 index = path.indexOf("/accountPermissionGroups", pathOffset); | |
| 10990 unittest.expect(index >= 0, unittest.isTrue); | |
| 10991 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 10992 pathOffset = index; | |
| 10993 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 10994 unittest.expect(path.substring(pathOffset, pathOffset + 24), unittest.eq
uals("/accountPermissionGroups")); | |
| 10995 pathOffset += 24; | |
| 10996 | |
| 10997 var query = (req.url).query; | |
| 10998 var queryOffset = 0; | |
| 10999 var queryMap = {}; | |
| 11000 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 11001 parseBool(n) { | |
| 11002 if (n == "true") return true; | |
| 11003 if (n == "false") return false; | |
| 11004 if (n == null) return null; | |
| 11005 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 11006 } | |
| 11007 if (query.length > 0) { | |
| 11008 for (var part in query.split("&")) { | |
| 11009 var keyvalue = part.split("="); | |
| 11010 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 11011 } | |
| 11012 } | |
| 11013 | |
| 11014 | |
| 11015 var h = { | |
| 11016 "content-type" : "application/json; charset=utf-8", | |
| 11017 }; | |
| 11018 var resp = convert.JSON.encode(buildAccountPermissionGroupsListResponse(
)); | |
| 11019 return new async.Future.value(stringResponse(200, h, resp)); | |
| 11020 }), true); | |
| 11021 res.list(arg_profileId).then(unittest.expectAsync(((api.AccountPermissionG
roupsListResponse response) { | |
| 11022 checkAccountPermissionGroupsListResponse(response); | |
| 11023 }))); | |
| 11024 }); | |
| 11025 | |
| 11026 }); | |
| 11027 | |
| 11028 | |
| 11029 unittest.group("resource-AccountPermissionsResourceApi", () { | |
| 11030 unittest.test("method--get", () { | |
| 11031 | |
| 11032 var mock = new HttpServerMock(); | |
| 11033 api.AccountPermissionsResourceApi res = new api.DfareportingApi(mock).acco
untPermissions; | |
| 11034 var arg_profileId = "foo"; | |
| 11035 var arg_id = "foo"; | |
| 11036 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 11037 var path = (req.url).path; | |
| 11038 var pathOffset = 0; | |
| 11039 var index; | |
| 11040 var subPart; | |
| 11041 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 11042 pathOffset += 1; | |
| 11043 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 11044 pathOffset += 18; | |
| 11045 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 11046 pathOffset += 13; | |
| 11047 index = path.indexOf("/accountPermissions/", pathOffset); | |
| 11048 unittest.expect(index >= 0, unittest.isTrue); | |
| 11049 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 11050 pathOffset = index; | |
| 11051 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 11052 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("/accountPermissions/")); | |
| 11053 pathOffset += 20; | |
| 11054 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 11055 pathOffset = path.length; | |
| 11056 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 11057 | |
| 11058 var query = (req.url).query; | |
| 11059 var queryOffset = 0; | |
| 11060 var queryMap = {}; | |
| 11061 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 11062 parseBool(n) { | |
| 11063 if (n == "true") return true; | |
| 11064 if (n == "false") return false; | |
| 11065 if (n == null) return null; | |
| 11066 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 11067 } | |
| 11068 if (query.length > 0) { | |
| 11069 for (var part in query.split("&")) { | |
| 11070 var keyvalue = part.split("="); | |
| 11071 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 11072 } | |
| 11073 } | |
| 11074 | |
| 11075 | |
| 11076 var h = { | |
| 11077 "content-type" : "application/json; charset=utf-8", | |
| 11078 }; | |
| 11079 var resp = convert.JSON.encode(buildAccountPermission()); | |
| 11080 return new async.Future.value(stringResponse(200, h, resp)); | |
| 11081 }), true); | |
| 11082 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.AccountPerm
ission response) { | |
| 11083 checkAccountPermission(response); | |
| 11084 }))); | |
| 11085 }); | |
| 11086 | |
| 11087 unittest.test("method--list", () { | |
| 11088 | |
| 11089 var mock = new HttpServerMock(); | |
| 11090 api.AccountPermissionsResourceApi res = new api.DfareportingApi(mock).acco
untPermissions; | |
| 11091 var arg_profileId = "foo"; | |
| 11092 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 11093 var path = (req.url).path; | |
| 11094 var pathOffset = 0; | |
| 11095 var index; | |
| 11096 var subPart; | |
| 11097 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 11098 pathOffset += 1; | |
| 11099 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 11100 pathOffset += 18; | |
| 11101 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 11102 pathOffset += 13; | |
| 11103 index = path.indexOf("/accountPermissions", pathOffset); | |
| 11104 unittest.expect(index >= 0, unittest.isTrue); | |
| 11105 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 11106 pathOffset = index; | |
| 11107 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 11108 unittest.expect(path.substring(pathOffset, pathOffset + 19), unittest.eq
uals("/accountPermissions")); | |
| 11109 pathOffset += 19; | |
| 11110 | |
| 11111 var query = (req.url).query; | |
| 11112 var queryOffset = 0; | |
| 11113 var queryMap = {}; | |
| 11114 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 11115 parseBool(n) { | |
| 11116 if (n == "true") return true; | |
| 11117 if (n == "false") return false; | |
| 11118 if (n == null) return null; | |
| 11119 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 11120 } | |
| 11121 if (query.length > 0) { | |
| 11122 for (var part in query.split("&")) { | |
| 11123 var keyvalue = part.split("="); | |
| 11124 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 11125 } | |
| 11126 } | |
| 11127 | |
| 11128 | |
| 11129 var h = { | |
| 11130 "content-type" : "application/json; charset=utf-8", | |
| 11131 }; | |
| 11132 var resp = convert.JSON.encode(buildAccountPermissionsListResponse()); | |
| 11133 return new async.Future.value(stringResponse(200, h, resp)); | |
| 11134 }), true); | |
| 11135 res.list(arg_profileId).then(unittest.expectAsync(((api.AccountPermissions
ListResponse response) { | |
| 11136 checkAccountPermissionsListResponse(response); | |
| 11137 }))); | |
| 11138 }); | |
| 11139 | |
| 11140 }); | |
| 11141 | |
| 11142 | |
| 11143 unittest.group("resource-AccountUserProfilesResourceApi", () { | |
| 11144 unittest.test("method--get", () { | |
| 11145 | |
| 11146 var mock = new HttpServerMock(); | |
| 11147 api.AccountUserProfilesResourceApi res = new api.DfareportingApi(mock).acc
ountUserProfiles; | |
| 11148 var arg_profileId = "foo"; | |
| 11149 var arg_id = "foo"; | |
| 11150 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 11151 var path = (req.url).path; | |
| 11152 var pathOffset = 0; | |
| 11153 var index; | |
| 11154 var subPart; | |
| 11155 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 11156 pathOffset += 1; | |
| 11157 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 11158 pathOffset += 18; | |
| 11159 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 11160 pathOffset += 13; | |
| 11161 index = path.indexOf("/accountUserProfiles/", pathOffset); | |
| 11162 unittest.expect(index >= 0, unittest.isTrue); | |
| 11163 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 11164 pathOffset = index; | |
| 11165 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 11166 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("/accountUserProfiles/")); | |
| 11167 pathOffset += 21; | |
| 11168 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 11169 pathOffset = path.length; | |
| 11170 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 11171 | |
| 11172 var query = (req.url).query; | |
| 11173 var queryOffset = 0; | |
| 11174 var queryMap = {}; | |
| 11175 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 11176 parseBool(n) { | |
| 11177 if (n == "true") return true; | |
| 11178 if (n == "false") return false; | |
| 11179 if (n == null) return null; | |
| 11180 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 11181 } | |
| 11182 if (query.length > 0) { | |
| 11183 for (var part in query.split("&")) { | |
| 11184 var keyvalue = part.split("="); | |
| 11185 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 11186 } | |
| 11187 } | |
| 11188 | |
| 11189 | |
| 11190 var h = { | |
| 11191 "content-type" : "application/json; charset=utf-8", | |
| 11192 }; | |
| 11193 var resp = convert.JSON.encode(buildAccountUserProfile()); | |
| 11194 return new async.Future.value(stringResponse(200, h, resp)); | |
| 11195 }), true); | |
| 11196 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.AccountUser
Profile response) { | |
| 11197 checkAccountUserProfile(response); | |
| 11198 }))); | |
| 11199 }); | |
| 11200 | |
| 11201 unittest.test("method--insert", () { | |
| 11202 | |
| 11203 var mock = new HttpServerMock(); | |
| 11204 api.AccountUserProfilesResourceApi res = new api.DfareportingApi(mock).acc
ountUserProfiles; | |
| 11205 var arg_request = buildAccountUserProfile(); | |
| 11206 var arg_profileId = "foo"; | |
| 11207 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 11208 var obj = new api.AccountUserProfile.fromJson(json); | |
| 11209 checkAccountUserProfile(obj); | |
| 11210 | |
| 11211 var path = (req.url).path; | |
| 11212 var pathOffset = 0; | |
| 11213 var index; | |
| 11214 var subPart; | |
| 11215 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 11216 pathOffset += 1; | |
| 11217 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 11218 pathOffset += 18; | |
| 11219 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 11220 pathOffset += 13; | |
| 11221 index = path.indexOf("/accountUserProfiles", pathOffset); | |
| 11222 unittest.expect(index >= 0, unittest.isTrue); | |
| 11223 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 11224 pathOffset = index; | |
| 11225 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 11226 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("/accountUserProfiles")); | |
| 11227 pathOffset += 20; | |
| 11228 | |
| 11229 var query = (req.url).query; | |
| 11230 var queryOffset = 0; | |
| 11231 var queryMap = {}; | |
| 11232 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 11233 parseBool(n) { | |
| 11234 if (n == "true") return true; | |
| 11235 if (n == "false") return false; | |
| 11236 if (n == null) return null; | |
| 11237 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 11238 } | |
| 11239 if (query.length > 0) { | |
| 11240 for (var part in query.split("&")) { | |
| 11241 var keyvalue = part.split("="); | |
| 11242 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 11243 } | |
| 11244 } | |
| 11245 | |
| 11246 | |
| 11247 var h = { | |
| 11248 "content-type" : "application/json; charset=utf-8", | |
| 11249 }; | |
| 11250 var resp = convert.JSON.encode(buildAccountUserProfile()); | |
| 11251 return new async.Future.value(stringResponse(200, h, resp)); | |
| 11252 }), true); | |
| 11253 res.insert(arg_request, arg_profileId).then(unittest.expectAsync(((api.Acc
ountUserProfile response) { | |
| 11254 checkAccountUserProfile(response); | |
| 11255 }))); | |
| 11256 }); | |
| 11257 | |
| 11258 unittest.test("method--list", () { | |
| 11259 | |
| 11260 var mock = new HttpServerMock(); | |
| 11261 api.AccountUserProfilesResourceApi res = new api.DfareportingApi(mock).acc
ountUserProfiles; | |
| 11262 var arg_profileId = "foo"; | |
| 11263 var arg_active = true; | |
| 11264 var arg_ids = buildUnnamed373(); | |
| 11265 var arg_maxResults = 42; | |
| 11266 var arg_pageToken = "foo"; | |
| 11267 var arg_searchString = "foo"; | |
| 11268 var arg_sortField = "foo"; | |
| 11269 var arg_sortOrder = "foo"; | |
| 11270 var arg_subaccountId = "foo"; | |
| 11271 var arg_userRoleId = "foo"; | |
| 11272 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 11273 var path = (req.url).path; | |
| 11274 var pathOffset = 0; | |
| 11275 var index; | |
| 11276 var subPart; | |
| 11277 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 11278 pathOffset += 1; | |
| 11279 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 11280 pathOffset += 18; | |
| 11281 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 11282 pathOffset += 13; | |
| 11283 index = path.indexOf("/accountUserProfiles", pathOffset); | |
| 11284 unittest.expect(index >= 0, unittest.isTrue); | |
| 11285 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 11286 pathOffset = index; | |
| 11287 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 11288 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("/accountUserProfiles")); | |
| 11289 pathOffset += 20; | |
| 11290 | |
| 11291 var query = (req.url).query; | |
| 11292 var queryOffset = 0; | |
| 11293 var queryMap = {}; | |
| 11294 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 11295 parseBool(n) { | |
| 11296 if (n == "true") return true; | |
| 11297 if (n == "false") return false; | |
| 11298 if (n == null) return null; | |
| 11299 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 11300 } | |
| 11301 if (query.length > 0) { | |
| 11302 for (var part in query.split("&")) { | |
| 11303 var keyvalue = part.split("="); | |
| 11304 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 11305 } | |
| 11306 } | |
| 11307 unittest.expect(queryMap["active"].first, unittest.equals("$arg_active")
); | |
| 11308 unittest.expect(queryMap["ids"], unittest.equals(arg_ids)); | |
| 11309 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | |
| 11310 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 11311 unittest.expect(queryMap["searchString"].first, unittest.equals(arg_sear
chString)); | |
| 11312 unittest.expect(queryMap["sortField"].first, unittest.equals(arg_sortFie
ld)); | |
| 11313 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | |
| 11314 unittest.expect(queryMap["subaccountId"].first, unittest.equals(arg_suba
ccountId)); | |
| 11315 unittest.expect(queryMap["userRoleId"].first, unittest.equals(arg_userRo
leId)); | |
| 11316 | |
| 11317 | |
| 11318 var h = { | |
| 11319 "content-type" : "application/json; charset=utf-8", | |
| 11320 }; | |
| 11321 var resp = convert.JSON.encode(buildAccountUserProfilesListResponse()); | |
| 11322 return new async.Future.value(stringResponse(200, h, resp)); | |
| 11323 }), true); | |
| 11324 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) { | |
| 11325 checkAccountUserProfilesListResponse(response); | |
| 11326 }))); | |
| 11327 }); | |
| 11328 | |
| 11329 unittest.test("method--patch", () { | |
| 11330 | |
| 11331 var mock = new HttpServerMock(); | |
| 11332 api.AccountUserProfilesResourceApi res = new api.DfareportingApi(mock).acc
ountUserProfiles; | |
| 11333 var arg_request = buildAccountUserProfile(); | |
| 11334 var arg_profileId = "foo"; | |
| 11335 var arg_id = "foo"; | |
| 11336 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 11337 var obj = new api.AccountUserProfile.fromJson(json); | |
| 11338 checkAccountUserProfile(obj); | |
| 11339 | |
| 11340 var path = (req.url).path; | |
| 11341 var pathOffset = 0; | |
| 11342 var index; | |
| 11343 var subPart; | |
| 11344 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 11345 pathOffset += 1; | |
| 11346 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 11347 pathOffset += 18; | |
| 11348 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 11349 pathOffset += 13; | |
| 11350 index = path.indexOf("/accountUserProfiles", pathOffset); | |
| 11351 unittest.expect(index >= 0, unittest.isTrue); | |
| 11352 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 11353 pathOffset = index; | |
| 11354 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 11355 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("/accountUserProfiles")); | |
| 11356 pathOffset += 20; | |
| 11357 | |
| 11358 var query = (req.url).query; | |
| 11359 var queryOffset = 0; | |
| 11360 var queryMap = {}; | |
| 11361 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 11362 parseBool(n) { | |
| 11363 if (n == "true") return true; | |
| 11364 if (n == "false") return false; | |
| 11365 if (n == null) return null; | |
| 11366 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 11367 } | |
| 11368 if (query.length > 0) { | |
| 11369 for (var part in query.split("&")) { | |
| 11370 var keyvalue = part.split("="); | |
| 11371 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 11372 } | |
| 11373 } | |
| 11374 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); | |
| 11375 | |
| 11376 | |
| 11377 var h = { | |
| 11378 "content-type" : "application/json; charset=utf-8", | |
| 11379 }; | |
| 11380 var resp = convert.JSON.encode(buildAccountUserProfile()); | |
| 11381 return new async.Future.value(stringResponse(200, h, resp)); | |
| 11382 }), true); | |
| 11383 res.patch(arg_request, arg_profileId, arg_id).then(unittest.expectAsync(((
api.AccountUserProfile response) { | |
| 11384 checkAccountUserProfile(response); | |
| 11385 }))); | |
| 11386 }); | |
| 11387 | |
| 11388 unittest.test("method--update", () { | |
| 11389 | |
| 11390 var mock = new HttpServerMock(); | |
| 11391 api.AccountUserProfilesResourceApi res = new api.DfareportingApi(mock).acc
ountUserProfiles; | |
| 11392 var arg_request = buildAccountUserProfile(); | |
| 11393 var arg_profileId = "foo"; | |
| 11394 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 11395 var obj = new api.AccountUserProfile.fromJson(json); | |
| 11396 checkAccountUserProfile(obj); | |
| 11397 | |
| 11398 var path = (req.url).path; | |
| 11399 var pathOffset = 0; | |
| 11400 var index; | |
| 11401 var subPart; | |
| 11402 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 11403 pathOffset += 1; | |
| 11404 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 11405 pathOffset += 18; | |
| 11406 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 11407 pathOffset += 13; | |
| 11408 index = path.indexOf("/accountUserProfiles", pathOffset); | |
| 11409 unittest.expect(index >= 0, unittest.isTrue); | |
| 11410 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 11411 pathOffset = index; | |
| 11412 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 11413 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("/accountUserProfiles")); | |
| 11414 pathOffset += 20; | |
| 11415 | |
| 11416 var query = (req.url).query; | |
| 11417 var queryOffset = 0; | |
| 11418 var queryMap = {}; | |
| 11419 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 11420 parseBool(n) { | |
| 11421 if (n == "true") return true; | |
| 11422 if (n == "false") return false; | |
| 11423 if (n == null) return null; | |
| 11424 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 11425 } | |
| 11426 if (query.length > 0) { | |
| 11427 for (var part in query.split("&")) { | |
| 11428 var keyvalue = part.split("="); | |
| 11429 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 11430 } | |
| 11431 } | |
| 11432 | |
| 11433 | |
| 11434 var h = { | |
| 11435 "content-type" : "application/json; charset=utf-8", | |
| 11436 }; | |
| 11437 var resp = convert.JSON.encode(buildAccountUserProfile()); | |
| 11438 return new async.Future.value(stringResponse(200, h, resp)); | |
| 11439 }), true); | |
| 11440 res.update(arg_request, arg_profileId).then(unittest.expectAsync(((api.Acc
ountUserProfile response) { | |
| 11441 checkAccountUserProfile(response); | |
| 11442 }))); | |
| 11443 }); | |
| 11444 | |
| 11445 }); | |
| 11446 | |
| 11447 | |
| 11448 unittest.group("resource-AccountsResourceApi", () { | |
| 11449 unittest.test("method--get", () { | |
| 11450 | |
| 11451 var mock = new HttpServerMock(); | |
| 11452 api.AccountsResourceApi res = new api.DfareportingApi(mock).accounts; | |
| 11453 var arg_profileId = "foo"; | |
| 11454 var arg_id = "foo"; | |
| 11455 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 11456 var path = (req.url).path; | |
| 11457 var pathOffset = 0; | |
| 11458 var index; | |
| 11459 var subPart; | |
| 11460 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 11461 pathOffset += 1; | |
| 11462 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 11463 pathOffset += 18; | |
| 11464 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 11465 pathOffset += 13; | |
| 11466 index = path.indexOf("/accounts/", pathOffset); | |
| 11467 unittest.expect(index >= 0, unittest.isTrue); | |
| 11468 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 11469 pathOffset = index; | |
| 11470 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 11471 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/accounts/")); | |
| 11472 pathOffset += 10; | |
| 11473 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 11474 pathOffset = path.length; | |
| 11475 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 11476 | |
| 11477 var query = (req.url).query; | |
| 11478 var queryOffset = 0; | |
| 11479 var queryMap = {}; | |
| 11480 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 11481 parseBool(n) { | |
| 11482 if (n == "true") return true; | |
| 11483 if (n == "false") return false; | |
| 11484 if (n == null) return null; | |
| 11485 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 11486 } | |
| 11487 if (query.length > 0) { | |
| 11488 for (var part in query.split("&")) { | |
| 11489 var keyvalue = part.split("="); | |
| 11490 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 11491 } | |
| 11492 } | |
| 11493 | |
| 11494 | |
| 11495 var h = { | |
| 11496 "content-type" : "application/json; charset=utf-8", | |
| 11497 }; | |
| 11498 var resp = convert.JSON.encode(buildAccount()); | |
| 11499 return new async.Future.value(stringResponse(200, h, resp)); | |
| 11500 }), true); | |
| 11501 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.Account res
ponse) { | |
| 11502 checkAccount(response); | |
| 11503 }))); | |
| 11504 }); | |
| 11505 | |
| 11506 unittest.test("method--list", () { | |
| 11507 | |
| 11508 var mock = new HttpServerMock(); | |
| 11509 api.AccountsResourceApi res = new api.DfareportingApi(mock).accounts; | |
| 11510 var arg_profileId = "foo"; | |
| 11511 var arg_active = true; | |
| 11512 var arg_ids = buildUnnamed374(); | |
| 11513 var arg_maxResults = 42; | |
| 11514 var arg_pageToken = "foo"; | |
| 11515 var arg_searchString = "foo"; | |
| 11516 var arg_sortField = "foo"; | |
| 11517 var arg_sortOrder = "foo"; | |
| 11518 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 11519 var path = (req.url).path; | |
| 11520 var pathOffset = 0; | |
| 11521 var index; | |
| 11522 var subPart; | |
| 11523 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 11524 pathOffset += 1; | |
| 11525 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 11526 pathOffset += 18; | |
| 11527 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 11528 pathOffset += 13; | |
| 11529 index = path.indexOf("/accounts", pathOffset); | |
| 11530 unittest.expect(index >= 0, unittest.isTrue); | |
| 11531 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 11532 pathOffset = index; | |
| 11533 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 11534 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("/accounts")); | |
| 11535 pathOffset += 9; | |
| 11536 | |
| 11537 var query = (req.url).query; | |
| 11538 var queryOffset = 0; | |
| 11539 var queryMap = {}; | |
| 11540 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 11541 parseBool(n) { | |
| 11542 if (n == "true") return true; | |
| 11543 if (n == "false") return false; | |
| 11544 if (n == null) return null; | |
| 11545 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 11546 } | |
| 11547 if (query.length > 0) { | |
| 11548 for (var part in query.split("&")) { | |
| 11549 var keyvalue = part.split("="); | |
| 11550 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 11551 } | |
| 11552 } | |
| 11553 unittest.expect(queryMap["active"].first, unittest.equals("$arg_active")
); | |
| 11554 unittest.expect(queryMap["ids"], unittest.equals(arg_ids)); | |
| 11555 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | |
| 11556 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 11557 unittest.expect(queryMap["searchString"].first, unittest.equals(arg_sear
chString)); | |
| 11558 unittest.expect(queryMap["sortField"].first, unittest.equals(arg_sortFie
ld)); | |
| 11559 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | |
| 11560 | |
| 11561 | |
| 11562 var h = { | |
| 11563 "content-type" : "application/json; charset=utf-8", | |
| 11564 }; | |
| 11565 var resp = convert.JSON.encode(buildAccountsListResponse()); | |
| 11566 return new async.Future.value(stringResponse(200, h, resp)); | |
| 11567 }), true); | |
| 11568 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) { | |
| 11569 checkAccountsListResponse(response); | |
| 11570 }))); | |
| 11571 }); | |
| 11572 | |
| 11573 unittest.test("method--patch", () { | |
| 11574 | |
| 11575 var mock = new HttpServerMock(); | |
| 11576 api.AccountsResourceApi res = new api.DfareportingApi(mock).accounts; | |
| 11577 var arg_request = buildAccount(); | |
| 11578 var arg_profileId = "foo"; | |
| 11579 var arg_id = "foo"; | |
| 11580 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 11581 var obj = new api.Account.fromJson(json); | |
| 11582 checkAccount(obj); | |
| 11583 | |
| 11584 var path = (req.url).path; | |
| 11585 var pathOffset = 0; | |
| 11586 var index; | |
| 11587 var subPart; | |
| 11588 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 11589 pathOffset += 1; | |
| 11590 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 11591 pathOffset += 18; | |
| 11592 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 11593 pathOffset += 13; | |
| 11594 index = path.indexOf("/accounts", pathOffset); | |
| 11595 unittest.expect(index >= 0, unittest.isTrue); | |
| 11596 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 11597 pathOffset = index; | |
| 11598 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 11599 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("/accounts")); | |
| 11600 pathOffset += 9; | |
| 11601 | |
| 11602 var query = (req.url).query; | |
| 11603 var queryOffset = 0; | |
| 11604 var queryMap = {}; | |
| 11605 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 11606 parseBool(n) { | |
| 11607 if (n == "true") return true; | |
| 11608 if (n == "false") return false; | |
| 11609 if (n == null) return null; | |
| 11610 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 11611 } | |
| 11612 if (query.length > 0) { | |
| 11613 for (var part in query.split("&")) { | |
| 11614 var keyvalue = part.split("="); | |
| 11615 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 11616 } | |
| 11617 } | |
| 11618 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); | |
| 11619 | |
| 11620 | |
| 11621 var h = { | |
| 11622 "content-type" : "application/json; charset=utf-8", | |
| 11623 }; | |
| 11624 var resp = convert.JSON.encode(buildAccount()); | |
| 11625 return new async.Future.value(stringResponse(200, h, resp)); | |
| 11626 }), true); | |
| 11627 res.patch(arg_request, arg_profileId, arg_id).then(unittest.expectAsync(((
api.Account response) { | |
| 11628 checkAccount(response); | |
| 11629 }))); | |
| 11630 }); | |
| 11631 | |
| 11632 unittest.test("method--update", () { | |
| 11633 | |
| 11634 var mock = new HttpServerMock(); | |
| 11635 api.AccountsResourceApi res = new api.DfareportingApi(mock).accounts; | |
| 11636 var arg_request = buildAccount(); | |
| 11637 var arg_profileId = "foo"; | |
| 11638 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 11639 var obj = new api.Account.fromJson(json); | |
| 11640 checkAccount(obj); | |
| 11641 | |
| 11642 var path = (req.url).path; | |
| 11643 var pathOffset = 0; | |
| 11644 var index; | |
| 11645 var subPart; | |
| 11646 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 11647 pathOffset += 1; | |
| 11648 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 11649 pathOffset += 18; | |
| 11650 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 11651 pathOffset += 13; | |
| 11652 index = path.indexOf("/accounts", pathOffset); | |
| 11653 unittest.expect(index >= 0, unittest.isTrue); | |
| 11654 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 11655 pathOffset = index; | |
| 11656 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 11657 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("/accounts")); | |
| 11658 pathOffset += 9; | |
| 11659 | |
| 11660 var query = (req.url).query; | |
| 11661 var queryOffset = 0; | |
| 11662 var queryMap = {}; | |
| 11663 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 11664 parseBool(n) { | |
| 11665 if (n == "true") return true; | |
| 11666 if (n == "false") return false; | |
| 11667 if (n == null) return null; | |
| 11668 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 11669 } | |
| 11670 if (query.length > 0) { | |
| 11671 for (var part in query.split("&")) { | |
| 11672 var keyvalue = part.split("="); | |
| 11673 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 11674 } | |
| 11675 } | |
| 11676 | |
| 11677 | |
| 11678 var h = { | |
| 11679 "content-type" : "application/json; charset=utf-8", | |
| 11680 }; | |
| 11681 var resp = convert.JSON.encode(buildAccount()); | |
| 11682 return new async.Future.value(stringResponse(200, h, resp)); | |
| 11683 }), true); | |
| 11684 res.update(arg_request, arg_profileId).then(unittest.expectAsync(((api.Acc
ount response) { | |
| 11685 checkAccount(response); | |
| 11686 }))); | |
| 11687 }); | |
| 11688 | |
| 11689 }); | |
| 11690 | |
| 11691 | |
| 11692 unittest.group("resource-AdsResourceApi", () { | |
| 11693 unittest.test("method--get", () { | |
| 11694 | |
| 11695 var mock = new HttpServerMock(); | |
| 11696 api.AdsResourceApi res = new api.DfareportingApi(mock).ads; | |
| 11697 var arg_profileId = "foo"; | |
| 11698 var arg_id = "foo"; | |
| 11699 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 11700 var path = (req.url).path; | |
| 11701 var pathOffset = 0; | |
| 11702 var index; | |
| 11703 var subPart; | |
| 11704 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 11705 pathOffset += 1; | |
| 11706 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 11707 pathOffset += 18; | |
| 11708 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 11709 pathOffset += 13; | |
| 11710 index = path.indexOf("/ads/", pathOffset); | |
| 11711 unittest.expect(index >= 0, unittest.isTrue); | |
| 11712 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 11713 pathOffset = index; | |
| 11714 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 11715 unittest.expect(path.substring(pathOffset, pathOffset + 5), unittest.equ
als("/ads/")); | |
| 11716 pathOffset += 5; | |
| 11717 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 11718 pathOffset = path.length; | |
| 11719 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 11720 | |
| 11721 var query = (req.url).query; | |
| 11722 var queryOffset = 0; | |
| 11723 var queryMap = {}; | |
| 11724 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 11725 parseBool(n) { | |
| 11726 if (n == "true") return true; | |
| 11727 if (n == "false") return false; | |
| 11728 if (n == null) return null; | |
| 11729 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 11730 } | |
| 11731 if (query.length > 0) { | |
| 11732 for (var part in query.split("&")) { | |
| 11733 var keyvalue = part.split("="); | |
| 11734 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 11735 } | |
| 11736 } | |
| 11737 | |
| 11738 | |
| 11739 var h = { | |
| 11740 "content-type" : "application/json; charset=utf-8", | |
| 11741 }; | |
| 11742 var resp = convert.JSON.encode(buildAd()); | |
| 11743 return new async.Future.value(stringResponse(200, h, resp)); | |
| 11744 }), true); | |
| 11745 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.Ad response
) { | |
| 11746 checkAd(response); | |
| 11747 }))); | |
| 11748 }); | |
| 11749 | |
| 11750 unittest.test("method--insert", () { | |
| 11751 | |
| 11752 var mock = new HttpServerMock(); | |
| 11753 api.AdsResourceApi res = new api.DfareportingApi(mock).ads; | |
| 11754 var arg_request = buildAd(); | |
| 11755 var arg_profileId = "foo"; | |
| 11756 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 11757 var obj = new api.Ad.fromJson(json); | |
| 11758 checkAd(obj); | |
| 11759 | |
| 11760 var path = (req.url).path; | |
| 11761 var pathOffset = 0; | |
| 11762 var index; | |
| 11763 var subPart; | |
| 11764 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 11765 pathOffset += 1; | |
| 11766 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 11767 pathOffset += 18; | |
| 11768 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 11769 pathOffset += 13; | |
| 11770 index = path.indexOf("/ads", pathOffset); | |
| 11771 unittest.expect(index >= 0, unittest.isTrue); | |
| 11772 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 11773 pathOffset = index; | |
| 11774 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 11775 unittest.expect(path.substring(pathOffset, pathOffset + 4), unittest.equ
als("/ads")); | |
| 11776 pathOffset += 4; | |
| 11777 | |
| 11778 var query = (req.url).query; | |
| 11779 var queryOffset = 0; | |
| 11780 var queryMap = {}; | |
| 11781 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 11782 parseBool(n) { | |
| 11783 if (n == "true") return true; | |
| 11784 if (n == "false") return false; | |
| 11785 if (n == null) return null; | |
| 11786 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 11787 } | |
| 11788 if (query.length > 0) { | |
| 11789 for (var part in query.split("&")) { | |
| 11790 var keyvalue = part.split("="); | |
| 11791 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 11792 } | |
| 11793 } | |
| 11794 | |
| 11795 | |
| 11796 var h = { | |
| 11797 "content-type" : "application/json; charset=utf-8", | |
| 11798 }; | |
| 11799 var resp = convert.JSON.encode(buildAd()); | |
| 11800 return new async.Future.value(stringResponse(200, h, resp)); | |
| 11801 }), true); | |
| 11802 res.insert(arg_request, arg_profileId).then(unittest.expectAsync(((api.Ad
response) { | |
| 11803 checkAd(response); | |
| 11804 }))); | |
| 11805 }); | |
| 11806 | |
| 11807 unittest.test("method--list", () { | |
| 11808 | |
| 11809 var mock = new HttpServerMock(); | |
| 11810 api.AdsResourceApi res = new api.DfareportingApi(mock).ads; | |
| 11811 var arg_profileId = "foo"; | |
| 11812 var arg_active = true; | |
| 11813 var arg_advertiserId = "foo"; | |
| 11814 var arg_archived = true; | |
| 11815 var arg_audienceSegmentIds = buildUnnamed375(); | |
| 11816 var arg_campaignIds = buildUnnamed376(); | |
| 11817 var arg_compatibility = "foo"; | |
| 11818 var arg_creativeIds = buildUnnamed377(); | |
| 11819 var arg_creativeOptimizationConfigurationIds = buildUnnamed378(); | |
| 11820 var arg_creativeType = "foo"; | |
| 11821 var arg_dynamicClickTracker = true; | |
| 11822 var arg_ids = buildUnnamed379(); | |
| 11823 var arg_landingPageIds = buildUnnamed380(); | |
| 11824 var arg_maxResults = 42; | |
| 11825 var arg_overriddenEventTagId = "foo"; | |
| 11826 var arg_pageToken = "foo"; | |
| 11827 var arg_placementIds = buildUnnamed381(); | |
| 11828 var arg_remarketingListIds = buildUnnamed382(); | |
| 11829 var arg_searchString = "foo"; | |
| 11830 var arg_sizeIds = buildUnnamed383(); | |
| 11831 var arg_sortField = "foo"; | |
| 11832 var arg_sortOrder = "foo"; | |
| 11833 var arg_sslCompliant = true; | |
| 11834 var arg_sslRequired = true; | |
| 11835 var arg_type = buildUnnamed384(); | |
| 11836 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 11837 var path = (req.url).path; | |
| 11838 var pathOffset = 0; | |
| 11839 var index; | |
| 11840 var subPart; | |
| 11841 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 11842 pathOffset += 1; | |
| 11843 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 11844 pathOffset += 18; | |
| 11845 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 11846 pathOffset += 13; | |
| 11847 index = path.indexOf("/ads", pathOffset); | |
| 11848 unittest.expect(index >= 0, unittest.isTrue); | |
| 11849 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 11850 pathOffset = index; | |
| 11851 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 11852 unittest.expect(path.substring(pathOffset, pathOffset + 4), unittest.equ
als("/ads")); | |
| 11853 pathOffset += 4; | |
| 11854 | |
| 11855 var query = (req.url).query; | |
| 11856 var queryOffset = 0; | |
| 11857 var queryMap = {}; | |
| 11858 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 11859 parseBool(n) { | |
| 11860 if (n == "true") return true; | |
| 11861 if (n == "false") return false; | |
| 11862 if (n == null) return null; | |
| 11863 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 11864 } | |
| 11865 if (query.length > 0) { | |
| 11866 for (var part in query.split("&")) { | |
| 11867 var keyvalue = part.split("="); | |
| 11868 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 11869 } | |
| 11870 } | |
| 11871 unittest.expect(queryMap["active"].first, unittest.equals("$arg_active")
); | |
| 11872 unittest.expect(queryMap["advertiserId"].first, unittest.equals(arg_adve
rtiserId)); | |
| 11873 unittest.expect(queryMap["archived"].first, unittest.equals("$arg_archiv
ed")); | |
| 11874 unittest.expect(queryMap["audienceSegmentIds"], unittest.equals(arg_audi
enceSegmentIds)); | |
| 11875 unittest.expect(queryMap["campaignIds"], unittest.equals(arg_campaignIds
)); | |
| 11876 unittest.expect(queryMap["compatibility"].first, unittest.equals(arg_com
patibility)); | |
| 11877 unittest.expect(queryMap["creativeIds"], unittest.equals(arg_creativeIds
)); | |
| 11878 unittest.expect(queryMap["creativeOptimizationConfigurationIds"], unitte
st.equals(arg_creativeOptimizationConfigurationIds)); | |
| 11879 unittest.expect(queryMap["creativeType"].first, unittest.equals(arg_crea
tiveType)); | |
| 11880 unittest.expect(queryMap["dynamicClickTracker"].first, unittest.equals("
$arg_dynamicClickTracker")); | |
| 11881 unittest.expect(queryMap["ids"], unittest.equals(arg_ids)); | |
| 11882 unittest.expect(queryMap["landingPageIds"], unittest.equals(arg_landingP
ageIds)); | |
| 11883 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | |
| 11884 unittest.expect(queryMap["overriddenEventTagId"].first, unittest.equals(
arg_overriddenEventTagId)); | |
| 11885 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 11886 unittest.expect(queryMap["placementIds"], unittest.equals(arg_placementI
ds)); | |
| 11887 unittest.expect(queryMap["remarketingListIds"], unittest.equals(arg_rema
rketingListIds)); | |
| 11888 unittest.expect(queryMap["searchString"].first, unittest.equals(arg_sear
chString)); | |
| 11889 unittest.expect(queryMap["sizeIds"], unittest.equals(arg_sizeIds)); | |
| 11890 unittest.expect(queryMap["sortField"].first, unittest.equals(arg_sortFie
ld)); | |
| 11891 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | |
| 11892 unittest.expect(queryMap["sslCompliant"].first, unittest.equals("$arg_ss
lCompliant")); | |
| 11893 unittest.expect(queryMap["sslRequired"].first, unittest.equals("$arg_ssl
Required")); | |
| 11894 unittest.expect(queryMap["type"], unittest.equals(arg_type)); | |
| 11895 | |
| 11896 | |
| 11897 var h = { | |
| 11898 "content-type" : "application/json; charset=utf-8", | |
| 11899 }; | |
| 11900 var resp = convert.JSON.encode(buildAdsListResponse()); | |
| 11901 return new async.Future.value(stringResponse(200, h, resp)); | |
| 11902 }), true); | |
| 11903 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) { | |
| 11904 checkAdsListResponse(response); | |
| 11905 }))); | |
| 11906 }); | |
| 11907 | |
| 11908 unittest.test("method--patch", () { | |
| 11909 | |
| 11910 var mock = new HttpServerMock(); | |
| 11911 api.AdsResourceApi res = new api.DfareportingApi(mock).ads; | |
| 11912 var arg_request = buildAd(); | |
| 11913 var arg_profileId = "foo"; | |
| 11914 var arg_id = "foo"; | |
| 11915 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 11916 var obj = new api.Ad.fromJson(json); | |
| 11917 checkAd(obj); | |
| 11918 | |
| 11919 var path = (req.url).path; | |
| 11920 var pathOffset = 0; | |
| 11921 var index; | |
| 11922 var subPart; | |
| 11923 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 11924 pathOffset += 1; | |
| 11925 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 11926 pathOffset += 18; | |
| 11927 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 11928 pathOffset += 13; | |
| 11929 index = path.indexOf("/ads", pathOffset); | |
| 11930 unittest.expect(index >= 0, unittest.isTrue); | |
| 11931 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 11932 pathOffset = index; | |
| 11933 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 11934 unittest.expect(path.substring(pathOffset, pathOffset + 4), unittest.equ
als("/ads")); | |
| 11935 pathOffset += 4; | |
| 11936 | |
| 11937 var query = (req.url).query; | |
| 11938 var queryOffset = 0; | |
| 11939 var queryMap = {}; | |
| 11940 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 11941 parseBool(n) { | |
| 11942 if (n == "true") return true; | |
| 11943 if (n == "false") return false; | |
| 11944 if (n == null) return null; | |
| 11945 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 11946 } | |
| 11947 if (query.length > 0) { | |
| 11948 for (var part in query.split("&")) { | |
| 11949 var keyvalue = part.split("="); | |
| 11950 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 11951 } | |
| 11952 } | |
| 11953 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); | |
| 11954 | |
| 11955 | |
| 11956 var h = { | |
| 11957 "content-type" : "application/json; charset=utf-8", | |
| 11958 }; | |
| 11959 var resp = convert.JSON.encode(buildAd()); | |
| 11960 return new async.Future.value(stringResponse(200, h, resp)); | |
| 11961 }), true); | |
| 11962 res.patch(arg_request, arg_profileId, arg_id).then(unittest.expectAsync(((
api.Ad response) { | |
| 11963 checkAd(response); | |
| 11964 }))); | |
| 11965 }); | |
| 11966 | |
| 11967 unittest.test("method--update", () { | |
| 11968 | |
| 11969 var mock = new HttpServerMock(); | |
| 11970 api.AdsResourceApi res = new api.DfareportingApi(mock).ads; | |
| 11971 var arg_request = buildAd(); | |
| 11972 var arg_profileId = "foo"; | |
| 11973 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 11974 var obj = new api.Ad.fromJson(json); | |
| 11975 checkAd(obj); | |
| 11976 | |
| 11977 var path = (req.url).path; | |
| 11978 var pathOffset = 0; | |
| 11979 var index; | |
| 11980 var subPart; | |
| 11981 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 11982 pathOffset += 1; | |
| 11983 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 11984 pathOffset += 18; | |
| 11985 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 11986 pathOffset += 13; | |
| 11987 index = path.indexOf("/ads", pathOffset); | |
| 11988 unittest.expect(index >= 0, unittest.isTrue); | |
| 11989 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 11990 pathOffset = index; | |
| 11991 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 11992 unittest.expect(path.substring(pathOffset, pathOffset + 4), unittest.equ
als("/ads")); | |
| 11993 pathOffset += 4; | |
| 11994 | |
| 11995 var query = (req.url).query; | |
| 11996 var queryOffset = 0; | |
| 11997 var queryMap = {}; | |
| 11998 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 11999 parseBool(n) { | |
| 12000 if (n == "true") return true; | |
| 12001 if (n == "false") return false; | |
| 12002 if (n == null) return null; | |
| 12003 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 12004 } | |
| 12005 if (query.length > 0) { | |
| 12006 for (var part in query.split("&")) { | |
| 12007 var keyvalue = part.split("="); | |
| 12008 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 12009 } | |
| 12010 } | |
| 12011 | |
| 12012 | |
| 12013 var h = { | |
| 12014 "content-type" : "application/json; charset=utf-8", | |
| 12015 }; | |
| 12016 var resp = convert.JSON.encode(buildAd()); | |
| 12017 return new async.Future.value(stringResponse(200, h, resp)); | |
| 12018 }), true); | |
| 12019 res.update(arg_request, arg_profileId).then(unittest.expectAsync(((api.Ad
response) { | |
| 12020 checkAd(response); | |
| 12021 }))); | |
| 12022 }); | |
| 12023 | |
| 12024 }); | |
| 12025 | |
| 12026 | |
| 12027 unittest.group("resource-AdvertiserGroupsResourceApi", () { | |
| 12028 unittest.test("method--delete", () { | |
| 12029 | |
| 12030 var mock = new HttpServerMock(); | |
| 12031 api.AdvertiserGroupsResourceApi res = new api.DfareportingApi(mock).advert
iserGroups; | |
| 12032 var arg_profileId = "foo"; | |
| 12033 var arg_id = "foo"; | |
| 12034 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 12035 var path = (req.url).path; | |
| 12036 var pathOffset = 0; | |
| 12037 var index; | |
| 12038 var subPart; | |
| 12039 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 12040 pathOffset += 1; | |
| 12041 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 12042 pathOffset += 18; | |
| 12043 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 12044 pathOffset += 13; | |
| 12045 index = path.indexOf("/advertiserGroups/", pathOffset); | |
| 12046 unittest.expect(index >= 0, unittest.isTrue); | |
| 12047 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 12048 pathOffset = index; | |
| 12049 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 12050 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("/advertiserGroups/")); | |
| 12051 pathOffset += 18; | |
| 12052 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 12053 pathOffset = path.length; | |
| 12054 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 12055 | |
| 12056 var query = (req.url).query; | |
| 12057 var queryOffset = 0; | |
| 12058 var queryMap = {}; | |
| 12059 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 12060 parseBool(n) { | |
| 12061 if (n == "true") return true; | |
| 12062 if (n == "false") return false; | |
| 12063 if (n == null) return null; | |
| 12064 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 12065 } | |
| 12066 if (query.length > 0) { | |
| 12067 for (var part in query.split("&")) { | |
| 12068 var keyvalue = part.split("="); | |
| 12069 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 12070 } | |
| 12071 } | |
| 12072 | |
| 12073 | |
| 12074 var h = { | |
| 12075 "content-type" : "application/json; charset=utf-8", | |
| 12076 }; | |
| 12077 var resp = ""; | |
| 12078 return new async.Future.value(stringResponse(200, h, resp)); | |
| 12079 }), true); | |
| 12080 res.delete(arg_profileId, arg_id).then(unittest.expectAsync((_) {})); | |
| 12081 }); | |
| 12082 | |
| 12083 unittest.test("method--get", () { | |
| 12084 | |
| 12085 var mock = new HttpServerMock(); | |
| 12086 api.AdvertiserGroupsResourceApi res = new api.DfareportingApi(mock).advert
iserGroups; | |
| 12087 var arg_profileId = "foo"; | |
| 12088 var arg_id = "foo"; | |
| 12089 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 12090 var path = (req.url).path; | |
| 12091 var pathOffset = 0; | |
| 12092 var index; | |
| 12093 var subPart; | |
| 12094 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 12095 pathOffset += 1; | |
| 12096 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 12097 pathOffset += 18; | |
| 12098 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 12099 pathOffset += 13; | |
| 12100 index = path.indexOf("/advertiserGroups/", pathOffset); | |
| 12101 unittest.expect(index >= 0, unittest.isTrue); | |
| 12102 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 12103 pathOffset = index; | |
| 12104 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 12105 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("/advertiserGroups/")); | |
| 12106 pathOffset += 18; | |
| 12107 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 12108 pathOffset = path.length; | |
| 12109 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 12110 | |
| 12111 var query = (req.url).query; | |
| 12112 var queryOffset = 0; | |
| 12113 var queryMap = {}; | |
| 12114 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 12115 parseBool(n) { | |
| 12116 if (n == "true") return true; | |
| 12117 if (n == "false") return false; | |
| 12118 if (n == null) return null; | |
| 12119 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 12120 } | |
| 12121 if (query.length > 0) { | |
| 12122 for (var part in query.split("&")) { | |
| 12123 var keyvalue = part.split("="); | |
| 12124 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 12125 } | |
| 12126 } | |
| 12127 | |
| 12128 | |
| 12129 var h = { | |
| 12130 "content-type" : "application/json; charset=utf-8", | |
| 12131 }; | |
| 12132 var resp = convert.JSON.encode(buildAdvertiserGroup()); | |
| 12133 return new async.Future.value(stringResponse(200, h, resp)); | |
| 12134 }), true); | |
| 12135 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.AdvertiserG
roup response) { | |
| 12136 checkAdvertiserGroup(response); | |
| 12137 }))); | |
| 12138 }); | |
| 12139 | |
| 12140 unittest.test("method--insert", () { | |
| 12141 | |
| 12142 var mock = new HttpServerMock(); | |
| 12143 api.AdvertiserGroupsResourceApi res = new api.DfareportingApi(mock).advert
iserGroups; | |
| 12144 var arg_request = buildAdvertiserGroup(); | |
| 12145 var arg_profileId = "foo"; | |
| 12146 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 12147 var obj = new api.AdvertiserGroup.fromJson(json); | |
| 12148 checkAdvertiserGroup(obj); | |
| 12149 | |
| 12150 var path = (req.url).path; | |
| 12151 var pathOffset = 0; | |
| 12152 var index; | |
| 12153 var subPart; | |
| 12154 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 12155 pathOffset += 1; | |
| 12156 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 12157 pathOffset += 18; | |
| 12158 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 12159 pathOffset += 13; | |
| 12160 index = path.indexOf("/advertiserGroups", pathOffset); | |
| 12161 unittest.expect(index >= 0, unittest.isTrue); | |
| 12162 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 12163 pathOffset = index; | |
| 12164 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 12165 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("/advertiserGroups")); | |
| 12166 pathOffset += 17; | |
| 12167 | |
| 12168 var query = (req.url).query; | |
| 12169 var queryOffset = 0; | |
| 12170 var queryMap = {}; | |
| 12171 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 12172 parseBool(n) { | |
| 12173 if (n == "true") return true; | |
| 12174 if (n == "false") return false; | |
| 12175 if (n == null) return null; | |
| 12176 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 12177 } | |
| 12178 if (query.length > 0) { | |
| 12179 for (var part in query.split("&")) { | |
| 12180 var keyvalue = part.split("="); | |
| 12181 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 12182 } | |
| 12183 } | |
| 12184 | |
| 12185 | |
| 12186 var h = { | |
| 12187 "content-type" : "application/json; charset=utf-8", | |
| 12188 }; | |
| 12189 var resp = convert.JSON.encode(buildAdvertiserGroup()); | |
| 12190 return new async.Future.value(stringResponse(200, h, resp)); | |
| 12191 }), true); | |
| 12192 res.insert(arg_request, arg_profileId).then(unittest.expectAsync(((api.Adv
ertiserGroup response) { | |
| 12193 checkAdvertiserGroup(response); | |
| 12194 }))); | |
| 12195 }); | |
| 12196 | |
| 12197 unittest.test("method--list", () { | |
| 12198 | |
| 12199 var mock = new HttpServerMock(); | |
| 12200 api.AdvertiserGroupsResourceApi res = new api.DfareportingApi(mock).advert
iserGroups; | |
| 12201 var arg_profileId = "foo"; | |
| 12202 var arg_ids = buildUnnamed385(); | |
| 12203 var arg_maxResults = 42; | |
| 12204 var arg_pageToken = "foo"; | |
| 12205 var arg_searchString = "foo"; | |
| 12206 var arg_sortField = "foo"; | |
| 12207 var arg_sortOrder = "foo"; | |
| 12208 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 12209 var path = (req.url).path; | |
| 12210 var pathOffset = 0; | |
| 12211 var index; | |
| 12212 var subPart; | |
| 12213 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 12214 pathOffset += 1; | |
| 12215 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 12216 pathOffset += 18; | |
| 12217 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 12218 pathOffset += 13; | |
| 12219 index = path.indexOf("/advertiserGroups", pathOffset); | |
| 12220 unittest.expect(index >= 0, unittest.isTrue); | |
| 12221 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 12222 pathOffset = index; | |
| 12223 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 12224 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("/advertiserGroups")); | |
| 12225 pathOffset += 17; | |
| 12226 | |
| 12227 var query = (req.url).query; | |
| 12228 var queryOffset = 0; | |
| 12229 var queryMap = {}; | |
| 12230 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 12231 parseBool(n) { | |
| 12232 if (n == "true") return true; | |
| 12233 if (n == "false") return false; | |
| 12234 if (n == null) return null; | |
| 12235 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 12236 } | |
| 12237 if (query.length > 0) { | |
| 12238 for (var part in query.split("&")) { | |
| 12239 var keyvalue = part.split("="); | |
| 12240 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 12241 } | |
| 12242 } | |
| 12243 unittest.expect(queryMap["ids"], unittest.equals(arg_ids)); | |
| 12244 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | |
| 12245 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 12246 unittest.expect(queryMap["searchString"].first, unittest.equals(arg_sear
chString)); | |
| 12247 unittest.expect(queryMap["sortField"].first, unittest.equals(arg_sortFie
ld)); | |
| 12248 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | |
| 12249 | |
| 12250 | |
| 12251 var h = { | |
| 12252 "content-type" : "application/json; charset=utf-8", | |
| 12253 }; | |
| 12254 var resp = convert.JSON.encode(buildAdvertiserGroupsListResponse()); | |
| 12255 return new async.Future.value(stringResponse(200, h, resp)); | |
| 12256 }), true); | |
| 12257 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) { | |
| 12258 checkAdvertiserGroupsListResponse(response); | |
| 12259 }))); | |
| 12260 }); | |
| 12261 | |
| 12262 unittest.test("method--patch", () { | |
| 12263 | |
| 12264 var mock = new HttpServerMock(); | |
| 12265 api.AdvertiserGroupsResourceApi res = new api.DfareportingApi(mock).advert
iserGroups; | |
| 12266 var arg_request = buildAdvertiserGroup(); | |
| 12267 var arg_profileId = "foo"; | |
| 12268 var arg_id = "foo"; | |
| 12269 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 12270 var obj = new api.AdvertiserGroup.fromJson(json); | |
| 12271 checkAdvertiserGroup(obj); | |
| 12272 | |
| 12273 var path = (req.url).path; | |
| 12274 var pathOffset = 0; | |
| 12275 var index; | |
| 12276 var subPart; | |
| 12277 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 12278 pathOffset += 1; | |
| 12279 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 12280 pathOffset += 18; | |
| 12281 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 12282 pathOffset += 13; | |
| 12283 index = path.indexOf("/advertiserGroups", pathOffset); | |
| 12284 unittest.expect(index >= 0, unittest.isTrue); | |
| 12285 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 12286 pathOffset = index; | |
| 12287 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 12288 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("/advertiserGroups")); | |
| 12289 pathOffset += 17; | |
| 12290 | |
| 12291 var query = (req.url).query; | |
| 12292 var queryOffset = 0; | |
| 12293 var queryMap = {}; | |
| 12294 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 12295 parseBool(n) { | |
| 12296 if (n == "true") return true; | |
| 12297 if (n == "false") return false; | |
| 12298 if (n == null) return null; | |
| 12299 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 12300 } | |
| 12301 if (query.length > 0) { | |
| 12302 for (var part in query.split("&")) { | |
| 12303 var keyvalue = part.split("="); | |
| 12304 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 12305 } | |
| 12306 } | |
| 12307 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); | |
| 12308 | |
| 12309 | |
| 12310 var h = { | |
| 12311 "content-type" : "application/json; charset=utf-8", | |
| 12312 }; | |
| 12313 var resp = convert.JSON.encode(buildAdvertiserGroup()); | |
| 12314 return new async.Future.value(stringResponse(200, h, resp)); | |
| 12315 }), true); | |
| 12316 res.patch(arg_request, arg_profileId, arg_id).then(unittest.expectAsync(((
api.AdvertiserGroup response) { | |
| 12317 checkAdvertiserGroup(response); | |
| 12318 }))); | |
| 12319 }); | |
| 12320 | |
| 12321 unittest.test("method--update", () { | |
| 12322 | |
| 12323 var mock = new HttpServerMock(); | |
| 12324 api.AdvertiserGroupsResourceApi res = new api.DfareportingApi(mock).advert
iserGroups; | |
| 12325 var arg_request = buildAdvertiserGroup(); | |
| 12326 var arg_profileId = "foo"; | |
| 12327 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 12328 var obj = new api.AdvertiserGroup.fromJson(json); | |
| 12329 checkAdvertiserGroup(obj); | |
| 12330 | |
| 12331 var path = (req.url).path; | |
| 12332 var pathOffset = 0; | |
| 12333 var index; | |
| 12334 var subPart; | |
| 12335 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 12336 pathOffset += 1; | |
| 12337 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 12338 pathOffset += 18; | |
| 12339 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 12340 pathOffset += 13; | |
| 12341 index = path.indexOf("/advertiserGroups", pathOffset); | |
| 12342 unittest.expect(index >= 0, unittest.isTrue); | |
| 12343 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 12344 pathOffset = index; | |
| 12345 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 12346 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("/advertiserGroups")); | |
| 12347 pathOffset += 17; | |
| 12348 | |
| 12349 var query = (req.url).query; | |
| 12350 var queryOffset = 0; | |
| 12351 var queryMap = {}; | |
| 12352 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 12353 parseBool(n) { | |
| 12354 if (n == "true") return true; | |
| 12355 if (n == "false") return false; | |
| 12356 if (n == null) return null; | |
| 12357 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 12358 } | |
| 12359 if (query.length > 0) { | |
| 12360 for (var part in query.split("&")) { | |
| 12361 var keyvalue = part.split("="); | |
| 12362 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 12363 } | |
| 12364 } | |
| 12365 | |
| 12366 | |
| 12367 var h = { | |
| 12368 "content-type" : "application/json; charset=utf-8", | |
| 12369 }; | |
| 12370 var resp = convert.JSON.encode(buildAdvertiserGroup()); | |
| 12371 return new async.Future.value(stringResponse(200, h, resp)); | |
| 12372 }), true); | |
| 12373 res.update(arg_request, arg_profileId).then(unittest.expectAsync(((api.Adv
ertiserGroup response) { | |
| 12374 checkAdvertiserGroup(response); | |
| 12375 }))); | |
| 12376 }); | |
| 12377 | |
| 12378 }); | |
| 12379 | |
| 12380 | |
| 12381 unittest.group("resource-AdvertisersResourceApi", () { | |
| 12382 unittest.test("method--get", () { | |
| 12383 | |
| 12384 var mock = new HttpServerMock(); | |
| 12385 api.AdvertisersResourceApi res = new api.DfareportingApi(mock).advertisers
; | |
| 12386 var arg_profileId = "foo"; | |
| 12387 var arg_id = "foo"; | |
| 12388 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 12389 var path = (req.url).path; | |
| 12390 var pathOffset = 0; | |
| 12391 var index; | |
| 12392 var subPart; | |
| 12393 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 12394 pathOffset += 1; | |
| 12395 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 12396 pathOffset += 18; | |
| 12397 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 12398 pathOffset += 13; | |
| 12399 index = path.indexOf("/advertisers/", pathOffset); | |
| 12400 unittest.expect(index >= 0, unittest.isTrue); | |
| 12401 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 12402 pathOffset = index; | |
| 12403 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 12404 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("/advertisers/")); | |
| 12405 pathOffset += 13; | |
| 12406 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 12407 pathOffset = path.length; | |
| 12408 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 12409 | |
| 12410 var query = (req.url).query; | |
| 12411 var queryOffset = 0; | |
| 12412 var queryMap = {}; | |
| 12413 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 12414 parseBool(n) { | |
| 12415 if (n == "true") return true; | |
| 12416 if (n == "false") return false; | |
| 12417 if (n == null) return null; | |
| 12418 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 12419 } | |
| 12420 if (query.length > 0) { | |
| 12421 for (var part in query.split("&")) { | |
| 12422 var keyvalue = part.split("="); | |
| 12423 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 12424 } | |
| 12425 } | |
| 12426 | |
| 12427 | |
| 12428 var h = { | |
| 12429 "content-type" : "application/json; charset=utf-8", | |
| 12430 }; | |
| 12431 var resp = convert.JSON.encode(buildAdvertiser()); | |
| 12432 return new async.Future.value(stringResponse(200, h, resp)); | |
| 12433 }), true); | |
| 12434 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.Advertiser
response) { | |
| 12435 checkAdvertiser(response); | |
| 12436 }))); | |
| 12437 }); | |
| 12438 | |
| 12439 unittest.test("method--insert", () { | |
| 12440 | |
| 12441 var mock = new HttpServerMock(); | |
| 12442 api.AdvertisersResourceApi res = new api.DfareportingApi(mock).advertisers
; | |
| 12443 var arg_request = buildAdvertiser(); | |
| 12444 var arg_profileId = "foo"; | |
| 12445 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 12446 var obj = new api.Advertiser.fromJson(json); | |
| 12447 checkAdvertiser(obj); | |
| 12448 | |
| 12449 var path = (req.url).path; | |
| 12450 var pathOffset = 0; | |
| 12451 var index; | |
| 12452 var subPart; | |
| 12453 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 12454 pathOffset += 1; | |
| 12455 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 12456 pathOffset += 18; | |
| 12457 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 12458 pathOffset += 13; | |
| 12459 index = path.indexOf("/advertisers", pathOffset); | |
| 12460 unittest.expect(index >= 0, unittest.isTrue); | |
| 12461 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 12462 pathOffset = index; | |
| 12463 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 12464 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("/advertisers")); | |
| 12465 pathOffset += 12; | |
| 12466 | |
| 12467 var query = (req.url).query; | |
| 12468 var queryOffset = 0; | |
| 12469 var queryMap = {}; | |
| 12470 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 12471 parseBool(n) { | |
| 12472 if (n == "true") return true; | |
| 12473 if (n == "false") return false; | |
| 12474 if (n == null) return null; | |
| 12475 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 12476 } | |
| 12477 if (query.length > 0) { | |
| 12478 for (var part in query.split("&")) { | |
| 12479 var keyvalue = part.split("="); | |
| 12480 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 12481 } | |
| 12482 } | |
| 12483 | |
| 12484 | |
| 12485 var h = { | |
| 12486 "content-type" : "application/json; charset=utf-8", | |
| 12487 }; | |
| 12488 var resp = convert.JSON.encode(buildAdvertiser()); | |
| 12489 return new async.Future.value(stringResponse(200, h, resp)); | |
| 12490 }), true); | |
| 12491 res.insert(arg_request, arg_profileId).then(unittest.expectAsync(((api.Adv
ertiser response) { | |
| 12492 checkAdvertiser(response); | |
| 12493 }))); | |
| 12494 }); | |
| 12495 | |
| 12496 unittest.test("method--list", () { | |
| 12497 | |
| 12498 var mock = new HttpServerMock(); | |
| 12499 api.AdvertisersResourceApi res = new api.DfareportingApi(mock).advertisers
; | |
| 12500 var arg_profileId = "foo"; | |
| 12501 var arg_advertiserGroupIds = buildUnnamed386(); | |
| 12502 var arg_floodlightConfigurationIds = buildUnnamed387(); | |
| 12503 var arg_ids = buildUnnamed388(); | |
| 12504 var arg_includeAdvertisersWithoutGroupsOnly = true; | |
| 12505 var arg_maxResults = 42; | |
| 12506 var arg_onlyParent = true; | |
| 12507 var arg_pageToken = "foo"; | |
| 12508 var arg_searchString = "foo"; | |
| 12509 var arg_sortField = "foo"; | |
| 12510 var arg_sortOrder = "foo"; | |
| 12511 var arg_status = "foo"; | |
| 12512 var arg_subaccountId = "foo"; | |
| 12513 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 12514 var path = (req.url).path; | |
| 12515 var pathOffset = 0; | |
| 12516 var index; | |
| 12517 var subPart; | |
| 12518 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 12519 pathOffset += 1; | |
| 12520 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 12521 pathOffset += 18; | |
| 12522 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 12523 pathOffset += 13; | |
| 12524 index = path.indexOf("/advertisers", pathOffset); | |
| 12525 unittest.expect(index >= 0, unittest.isTrue); | |
| 12526 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 12527 pathOffset = index; | |
| 12528 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 12529 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("/advertisers")); | |
| 12530 pathOffset += 12; | |
| 12531 | |
| 12532 var query = (req.url).query; | |
| 12533 var queryOffset = 0; | |
| 12534 var queryMap = {}; | |
| 12535 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 12536 parseBool(n) { | |
| 12537 if (n == "true") return true; | |
| 12538 if (n == "false") return false; | |
| 12539 if (n == null) return null; | |
| 12540 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 12541 } | |
| 12542 if (query.length > 0) { | |
| 12543 for (var part in query.split("&")) { | |
| 12544 var keyvalue = part.split("="); | |
| 12545 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 12546 } | |
| 12547 } | |
| 12548 unittest.expect(queryMap["advertiserGroupIds"], unittest.equals(arg_adve
rtiserGroupIds)); | |
| 12549 unittest.expect(queryMap["floodlightConfigurationIds"], unittest.equals(
arg_floodlightConfigurationIds)); | |
| 12550 unittest.expect(queryMap["ids"], unittest.equals(arg_ids)); | |
| 12551 unittest.expect(queryMap["includeAdvertisersWithoutGroupsOnly"].first, u
nittest.equals("$arg_includeAdvertisersWithoutGroupsOnly")); | |
| 12552 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | |
| 12553 unittest.expect(queryMap["onlyParent"].first, unittest.equals("$arg_only
Parent")); | |
| 12554 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 12555 unittest.expect(queryMap["searchString"].first, unittest.equals(arg_sear
chString)); | |
| 12556 unittest.expect(queryMap["sortField"].first, unittest.equals(arg_sortFie
ld)); | |
| 12557 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | |
| 12558 unittest.expect(queryMap["status"].first, unittest.equals(arg_status)); | |
| 12559 unittest.expect(queryMap["subaccountId"].first, unittest.equals(arg_suba
ccountId)); | |
| 12560 | |
| 12561 | |
| 12562 var h = { | |
| 12563 "content-type" : "application/json; charset=utf-8", | |
| 12564 }; | |
| 12565 var resp = convert.JSON.encode(buildAdvertisersListResponse()); | |
| 12566 return new async.Future.value(stringResponse(200, h, resp)); | |
| 12567 }), true); | |
| 12568 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) { | |
| 12569 checkAdvertisersListResponse(response); | |
| 12570 }))); | |
| 12571 }); | |
| 12572 | |
| 12573 unittest.test("method--patch", () { | |
| 12574 | |
| 12575 var mock = new HttpServerMock(); | |
| 12576 api.AdvertisersResourceApi res = new api.DfareportingApi(mock).advertisers
; | |
| 12577 var arg_request = buildAdvertiser(); | |
| 12578 var arg_profileId = "foo"; | |
| 12579 var arg_id = "foo"; | |
| 12580 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 12581 var obj = new api.Advertiser.fromJson(json); | |
| 12582 checkAdvertiser(obj); | |
| 12583 | |
| 12584 var path = (req.url).path; | |
| 12585 var pathOffset = 0; | |
| 12586 var index; | |
| 12587 var subPart; | |
| 12588 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 12589 pathOffset += 1; | |
| 12590 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 12591 pathOffset += 18; | |
| 12592 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 12593 pathOffset += 13; | |
| 12594 index = path.indexOf("/advertisers", pathOffset); | |
| 12595 unittest.expect(index >= 0, unittest.isTrue); | |
| 12596 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 12597 pathOffset = index; | |
| 12598 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 12599 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("/advertisers")); | |
| 12600 pathOffset += 12; | |
| 12601 | |
| 12602 var query = (req.url).query; | |
| 12603 var queryOffset = 0; | |
| 12604 var queryMap = {}; | |
| 12605 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 12606 parseBool(n) { | |
| 12607 if (n == "true") return true; | |
| 12608 if (n == "false") return false; | |
| 12609 if (n == null) return null; | |
| 12610 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 12611 } | |
| 12612 if (query.length > 0) { | |
| 12613 for (var part in query.split("&")) { | |
| 12614 var keyvalue = part.split("="); | |
| 12615 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 12616 } | |
| 12617 } | |
| 12618 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); | |
| 12619 | |
| 12620 | |
| 12621 var h = { | |
| 12622 "content-type" : "application/json; charset=utf-8", | |
| 12623 }; | |
| 12624 var resp = convert.JSON.encode(buildAdvertiser()); | |
| 12625 return new async.Future.value(stringResponse(200, h, resp)); | |
| 12626 }), true); | |
| 12627 res.patch(arg_request, arg_profileId, arg_id).then(unittest.expectAsync(((
api.Advertiser response) { | |
| 12628 checkAdvertiser(response); | |
| 12629 }))); | |
| 12630 }); | |
| 12631 | |
| 12632 unittest.test("method--update", () { | |
| 12633 | |
| 12634 var mock = new HttpServerMock(); | |
| 12635 api.AdvertisersResourceApi res = new api.DfareportingApi(mock).advertisers
; | |
| 12636 var arg_request = buildAdvertiser(); | |
| 12637 var arg_profileId = "foo"; | |
| 12638 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 12639 var obj = new api.Advertiser.fromJson(json); | |
| 12640 checkAdvertiser(obj); | |
| 12641 | |
| 12642 var path = (req.url).path; | |
| 12643 var pathOffset = 0; | |
| 12644 var index; | |
| 12645 var subPart; | |
| 12646 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 12647 pathOffset += 1; | |
| 12648 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 12649 pathOffset += 18; | |
| 12650 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 12651 pathOffset += 13; | |
| 12652 index = path.indexOf("/advertisers", pathOffset); | |
| 12653 unittest.expect(index >= 0, unittest.isTrue); | |
| 12654 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 12655 pathOffset = index; | |
| 12656 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 12657 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("/advertisers")); | |
| 12658 pathOffset += 12; | |
| 12659 | |
| 12660 var query = (req.url).query; | |
| 12661 var queryOffset = 0; | |
| 12662 var queryMap = {}; | |
| 12663 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 12664 parseBool(n) { | |
| 12665 if (n == "true") return true; | |
| 12666 if (n == "false") return false; | |
| 12667 if (n == null) return null; | |
| 12668 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 12669 } | |
| 12670 if (query.length > 0) { | |
| 12671 for (var part in query.split("&")) { | |
| 12672 var keyvalue = part.split("="); | |
| 12673 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 12674 } | |
| 12675 } | |
| 12676 | |
| 12677 | |
| 12678 var h = { | |
| 12679 "content-type" : "application/json; charset=utf-8", | |
| 12680 }; | |
| 12681 var resp = convert.JSON.encode(buildAdvertiser()); | |
| 12682 return new async.Future.value(stringResponse(200, h, resp)); | |
| 12683 }), true); | |
| 12684 res.update(arg_request, arg_profileId).then(unittest.expectAsync(((api.Adv
ertiser response) { | |
| 12685 checkAdvertiser(response); | |
| 12686 }))); | |
| 12687 }); | |
| 12688 | |
| 12689 }); | |
| 12690 | |
| 12691 | |
| 12692 unittest.group("resource-BrowsersResourceApi", () { | |
| 12693 unittest.test("method--list", () { | |
| 12694 | |
| 12695 var mock = new HttpServerMock(); | |
| 12696 api.BrowsersResourceApi res = new api.DfareportingApi(mock).browsers; | |
| 12697 var arg_profileId = "foo"; | |
| 12698 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 12699 var path = (req.url).path; | |
| 12700 var pathOffset = 0; | |
| 12701 var index; | |
| 12702 var subPart; | |
| 12703 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 12704 pathOffset += 1; | |
| 12705 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 12706 pathOffset += 18; | |
| 12707 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 12708 pathOffset += 13; | |
| 12709 index = path.indexOf("/browsers", pathOffset); | |
| 12710 unittest.expect(index >= 0, unittest.isTrue); | |
| 12711 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 12712 pathOffset = index; | |
| 12713 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 12714 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("/browsers")); | |
| 12715 pathOffset += 9; | |
| 12716 | |
| 12717 var query = (req.url).query; | |
| 12718 var queryOffset = 0; | |
| 12719 var queryMap = {}; | |
| 12720 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 12721 parseBool(n) { | |
| 12722 if (n == "true") return true; | |
| 12723 if (n == "false") return false; | |
| 12724 if (n == null) return null; | |
| 12725 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 12726 } | |
| 12727 if (query.length > 0) { | |
| 12728 for (var part in query.split("&")) { | |
| 12729 var keyvalue = part.split("="); | |
| 12730 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 12731 } | |
| 12732 } | |
| 12733 | |
| 12734 | |
| 12735 var h = { | |
| 12736 "content-type" : "application/json; charset=utf-8", | |
| 12737 }; | |
| 12738 var resp = convert.JSON.encode(buildBrowsersListResponse()); | |
| 12739 return new async.Future.value(stringResponse(200, h, resp)); | |
| 12740 }), true); | |
| 12741 res.list(arg_profileId).then(unittest.expectAsync(((api.BrowsersListRespon
se response) { | |
| 12742 checkBrowsersListResponse(response); | |
| 12743 }))); | |
| 12744 }); | |
| 12745 | |
| 12746 }); | |
| 12747 | |
| 12748 | |
| 12749 unittest.group("resource-CampaignCreativeAssociationsResourceApi", () { | |
| 12750 unittest.test("method--insert", () { | |
| 12751 | |
| 12752 var mock = new HttpServerMock(); | |
| 12753 api.CampaignCreativeAssociationsResourceApi res = new api.DfareportingApi(
mock).campaignCreativeAssociations; | |
| 12754 var arg_request = buildCampaignCreativeAssociation(); | |
| 12755 var arg_profileId = "foo"; | |
| 12756 var arg_campaignId = "foo"; | |
| 12757 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 12758 var obj = new api.CampaignCreativeAssociation.fromJson(json); | |
| 12759 checkCampaignCreativeAssociation(obj); | |
| 12760 | |
| 12761 var path = (req.url).path; | |
| 12762 var pathOffset = 0; | |
| 12763 var index; | |
| 12764 var subPart; | |
| 12765 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 12766 pathOffset += 1; | |
| 12767 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 12768 pathOffset += 18; | |
| 12769 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 12770 pathOffset += 13; | |
| 12771 index = path.indexOf("/campaigns/", pathOffset); | |
| 12772 unittest.expect(index >= 0, unittest.isTrue); | |
| 12773 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 12774 pathOffset = index; | |
| 12775 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 12776 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("/campaigns/")); | |
| 12777 pathOffset += 11; | |
| 12778 index = path.indexOf("/campaignCreativeAssociations", pathOffset); | |
| 12779 unittest.expect(index >= 0, unittest.isTrue); | |
| 12780 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 12781 pathOffset = index; | |
| 12782 unittest.expect(subPart, unittest.equals("$arg_campaignId")); | |
| 12783 unittest.expect(path.substring(pathOffset, pathOffset + 29), unittest.eq
uals("/campaignCreativeAssociations")); | |
| 12784 pathOffset += 29; | |
| 12785 | |
| 12786 var query = (req.url).query; | |
| 12787 var queryOffset = 0; | |
| 12788 var queryMap = {}; | |
| 12789 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 12790 parseBool(n) { | |
| 12791 if (n == "true") return true; | |
| 12792 if (n == "false") return false; | |
| 12793 if (n == null) return null; | |
| 12794 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 12795 } | |
| 12796 if (query.length > 0) { | |
| 12797 for (var part in query.split("&")) { | |
| 12798 var keyvalue = part.split("="); | |
| 12799 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 12800 } | |
| 12801 } | |
| 12802 | |
| 12803 | |
| 12804 var h = { | |
| 12805 "content-type" : "application/json; charset=utf-8", | |
| 12806 }; | |
| 12807 var resp = convert.JSON.encode(buildCampaignCreativeAssociation()); | |
| 12808 return new async.Future.value(stringResponse(200, h, resp)); | |
| 12809 }), true); | |
| 12810 res.insert(arg_request, arg_profileId, arg_campaignId).then(unittest.expec
tAsync(((api.CampaignCreativeAssociation response) { | |
| 12811 checkCampaignCreativeAssociation(response); | |
| 12812 }))); | |
| 12813 }); | |
| 12814 | |
| 12815 unittest.test("method--list", () { | |
| 12816 | |
| 12817 var mock = new HttpServerMock(); | |
| 12818 api.CampaignCreativeAssociationsResourceApi res = new api.DfareportingApi(
mock).campaignCreativeAssociations; | |
| 12819 var arg_profileId = "foo"; | |
| 12820 var arg_campaignId = "foo"; | |
| 12821 var arg_maxResults = 42; | |
| 12822 var arg_pageToken = "foo"; | |
| 12823 var arg_sortOrder = "foo"; | |
| 12824 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 12825 var path = (req.url).path; | |
| 12826 var pathOffset = 0; | |
| 12827 var index; | |
| 12828 var subPart; | |
| 12829 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 12830 pathOffset += 1; | |
| 12831 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 12832 pathOffset += 18; | |
| 12833 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 12834 pathOffset += 13; | |
| 12835 index = path.indexOf("/campaigns/", pathOffset); | |
| 12836 unittest.expect(index >= 0, unittest.isTrue); | |
| 12837 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 12838 pathOffset = index; | |
| 12839 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 12840 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("/campaigns/")); | |
| 12841 pathOffset += 11; | |
| 12842 index = path.indexOf("/campaignCreativeAssociations", pathOffset); | |
| 12843 unittest.expect(index >= 0, unittest.isTrue); | |
| 12844 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 12845 pathOffset = index; | |
| 12846 unittest.expect(subPart, unittest.equals("$arg_campaignId")); | |
| 12847 unittest.expect(path.substring(pathOffset, pathOffset + 29), unittest.eq
uals("/campaignCreativeAssociations")); | |
| 12848 pathOffset += 29; | |
| 12849 | |
| 12850 var query = (req.url).query; | |
| 12851 var queryOffset = 0; | |
| 12852 var queryMap = {}; | |
| 12853 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 12854 parseBool(n) { | |
| 12855 if (n == "true") return true; | |
| 12856 if (n == "false") return false; | |
| 12857 if (n == null) return null; | |
| 12858 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 12859 } | |
| 12860 if (query.length > 0) { | |
| 12861 for (var part in query.split("&")) { | |
| 12862 var keyvalue = part.split("="); | |
| 12863 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 12864 } | |
| 12865 } | |
| 12866 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | |
| 12867 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 12868 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | |
| 12869 | |
| 12870 | |
| 12871 var h = { | |
| 12872 "content-type" : "application/json; charset=utf-8", | |
| 12873 }; | |
| 12874 var resp = convert.JSON.encode(buildCampaignCreativeAssociationsListResp
onse()); | |
| 12875 return new async.Future.value(stringResponse(200, h, resp)); | |
| 12876 }), true); | |
| 12877 res.list(arg_profileId, arg_campaignId, maxResults: arg_maxResults, pageTo
ken: arg_pageToken, sortOrder: arg_sortOrder).then(unittest.expectAsync(((api.Ca
mpaignCreativeAssociationsListResponse response) { | |
| 12878 checkCampaignCreativeAssociationsListResponse(response); | |
| 12879 }))); | |
| 12880 }); | |
| 12881 | |
| 12882 }); | |
| 12883 | |
| 12884 | |
| 12885 unittest.group("resource-CampaignsResourceApi", () { | |
| 12886 unittest.test("method--get", () { | |
| 12887 | |
| 12888 var mock = new HttpServerMock(); | |
| 12889 api.CampaignsResourceApi res = new api.DfareportingApi(mock).campaigns; | |
| 12890 var arg_profileId = "foo"; | |
| 12891 var arg_id = "foo"; | |
| 12892 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 12893 var path = (req.url).path; | |
| 12894 var pathOffset = 0; | |
| 12895 var index; | |
| 12896 var subPart; | |
| 12897 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 12898 pathOffset += 1; | |
| 12899 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 12900 pathOffset += 18; | |
| 12901 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 12902 pathOffset += 13; | |
| 12903 index = path.indexOf("/campaigns/", pathOffset); | |
| 12904 unittest.expect(index >= 0, unittest.isTrue); | |
| 12905 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 12906 pathOffset = index; | |
| 12907 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 12908 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("/campaigns/")); | |
| 12909 pathOffset += 11; | |
| 12910 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 12911 pathOffset = path.length; | |
| 12912 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 12913 | |
| 12914 var query = (req.url).query; | |
| 12915 var queryOffset = 0; | |
| 12916 var queryMap = {}; | |
| 12917 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 12918 parseBool(n) { | |
| 12919 if (n == "true") return true; | |
| 12920 if (n == "false") return false; | |
| 12921 if (n == null) return null; | |
| 12922 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 12923 } | |
| 12924 if (query.length > 0) { | |
| 12925 for (var part in query.split("&")) { | |
| 12926 var keyvalue = part.split("="); | |
| 12927 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 12928 } | |
| 12929 } | |
| 12930 | |
| 12931 | |
| 12932 var h = { | |
| 12933 "content-type" : "application/json; charset=utf-8", | |
| 12934 }; | |
| 12935 var resp = convert.JSON.encode(buildCampaign()); | |
| 12936 return new async.Future.value(stringResponse(200, h, resp)); | |
| 12937 }), true); | |
| 12938 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.Campaign re
sponse) { | |
| 12939 checkCampaign(response); | |
| 12940 }))); | |
| 12941 }); | |
| 12942 | |
| 12943 unittest.test("method--insert", () { | |
| 12944 | |
| 12945 var mock = new HttpServerMock(); | |
| 12946 api.CampaignsResourceApi res = new api.DfareportingApi(mock).campaigns; | |
| 12947 var arg_request = buildCampaign(); | |
| 12948 var arg_profileId = "foo"; | |
| 12949 var arg_defaultLandingPageName = "foo"; | |
| 12950 var arg_defaultLandingPageUrl = "foo"; | |
| 12951 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 12952 var obj = new api.Campaign.fromJson(json); | |
| 12953 checkCampaign(obj); | |
| 12954 | |
| 12955 var path = (req.url).path; | |
| 12956 var pathOffset = 0; | |
| 12957 var index; | |
| 12958 var subPart; | |
| 12959 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 12960 pathOffset += 1; | |
| 12961 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 12962 pathOffset += 18; | |
| 12963 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 12964 pathOffset += 13; | |
| 12965 index = path.indexOf("/campaigns", pathOffset); | |
| 12966 unittest.expect(index >= 0, unittest.isTrue); | |
| 12967 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 12968 pathOffset = index; | |
| 12969 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 12970 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/campaigns")); | |
| 12971 pathOffset += 10; | |
| 12972 | |
| 12973 var query = (req.url).query; | |
| 12974 var queryOffset = 0; | |
| 12975 var queryMap = {}; | |
| 12976 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 12977 parseBool(n) { | |
| 12978 if (n == "true") return true; | |
| 12979 if (n == "false") return false; | |
| 12980 if (n == null) return null; | |
| 12981 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 12982 } | |
| 12983 if (query.length > 0) { | |
| 12984 for (var part in query.split("&")) { | |
| 12985 var keyvalue = part.split("="); | |
| 12986 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 12987 } | |
| 12988 } | |
| 12989 unittest.expect(queryMap["defaultLandingPageName"].first, unittest.equal
s(arg_defaultLandingPageName)); | |
| 12990 unittest.expect(queryMap["defaultLandingPageUrl"].first, unittest.equals
(arg_defaultLandingPageUrl)); | |
| 12991 | |
| 12992 | |
| 12993 var h = { | |
| 12994 "content-type" : "application/json; charset=utf-8", | |
| 12995 }; | |
| 12996 var resp = convert.JSON.encode(buildCampaign()); | |
| 12997 return new async.Future.value(stringResponse(200, h, resp)); | |
| 12998 }), true); | |
| 12999 res.insert(arg_request, arg_profileId, arg_defaultLandingPageName, arg_def
aultLandingPageUrl).then(unittest.expectAsync(((api.Campaign response) { | |
| 13000 checkCampaign(response); | |
| 13001 }))); | |
| 13002 }); | |
| 13003 | |
| 13004 unittest.test("method--list", () { | |
| 13005 | |
| 13006 var mock = new HttpServerMock(); | |
| 13007 api.CampaignsResourceApi res = new api.DfareportingApi(mock).campaigns; | |
| 13008 var arg_profileId = "foo"; | |
| 13009 var arg_advertiserGroupIds = buildUnnamed389(); | |
| 13010 var arg_advertiserIds = buildUnnamed390(); | |
| 13011 var arg_archived = true; | |
| 13012 var arg_atLeastOneOptimizationActivity = true; | |
| 13013 var arg_excludedIds = buildUnnamed391(); | |
| 13014 var arg_ids = buildUnnamed392(); | |
| 13015 var arg_maxResults = 42; | |
| 13016 var arg_overriddenEventTagId = "foo"; | |
| 13017 var arg_pageToken = "foo"; | |
| 13018 var arg_searchString = "foo"; | |
| 13019 var arg_sortField = "foo"; | |
| 13020 var arg_sortOrder = "foo"; | |
| 13021 var arg_subaccountId = "foo"; | |
| 13022 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 13023 var path = (req.url).path; | |
| 13024 var pathOffset = 0; | |
| 13025 var index; | |
| 13026 var subPart; | |
| 13027 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 13028 pathOffset += 1; | |
| 13029 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 13030 pathOffset += 18; | |
| 13031 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 13032 pathOffset += 13; | |
| 13033 index = path.indexOf("/campaigns", pathOffset); | |
| 13034 unittest.expect(index >= 0, unittest.isTrue); | |
| 13035 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 13036 pathOffset = index; | |
| 13037 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 13038 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/campaigns")); | |
| 13039 pathOffset += 10; | |
| 13040 | |
| 13041 var query = (req.url).query; | |
| 13042 var queryOffset = 0; | |
| 13043 var queryMap = {}; | |
| 13044 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 13045 parseBool(n) { | |
| 13046 if (n == "true") return true; | |
| 13047 if (n == "false") return false; | |
| 13048 if (n == null) return null; | |
| 13049 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 13050 } | |
| 13051 if (query.length > 0) { | |
| 13052 for (var part in query.split("&")) { | |
| 13053 var keyvalue = part.split("="); | |
| 13054 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 13055 } | |
| 13056 } | |
| 13057 unittest.expect(queryMap["advertiserGroupIds"], unittest.equals(arg_adve
rtiserGroupIds)); | |
| 13058 unittest.expect(queryMap["advertiserIds"], unittest.equals(arg_advertise
rIds)); | |
| 13059 unittest.expect(queryMap["archived"].first, unittest.equals("$arg_archiv
ed")); | |
| 13060 unittest.expect(queryMap["atLeastOneOptimizationActivity"].first, unitte
st.equals("$arg_atLeastOneOptimizationActivity")); | |
| 13061 unittest.expect(queryMap["excludedIds"], unittest.equals(arg_excludedIds
)); | |
| 13062 unittest.expect(queryMap["ids"], unittest.equals(arg_ids)); | |
| 13063 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | |
| 13064 unittest.expect(queryMap["overriddenEventTagId"].first, unittest.equals(
arg_overriddenEventTagId)); | |
| 13065 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 13066 unittest.expect(queryMap["searchString"].first, unittest.equals(arg_sear
chString)); | |
| 13067 unittest.expect(queryMap["sortField"].first, unittest.equals(arg_sortFie
ld)); | |
| 13068 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | |
| 13069 unittest.expect(queryMap["subaccountId"].first, unittest.equals(arg_suba
ccountId)); | |
| 13070 | |
| 13071 | |
| 13072 var h = { | |
| 13073 "content-type" : "application/json; charset=utf-8", | |
| 13074 }; | |
| 13075 var resp = convert.JSON.encode(buildCampaignsListResponse()); | |
| 13076 return new async.Future.value(stringResponse(200, h, resp)); | |
| 13077 }), true); | |
| 13078 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) { | |
| 13079 checkCampaignsListResponse(response); | |
| 13080 }))); | |
| 13081 }); | |
| 13082 | |
| 13083 unittest.test("method--patch", () { | |
| 13084 | |
| 13085 var mock = new HttpServerMock(); | |
| 13086 api.CampaignsResourceApi res = new api.DfareportingApi(mock).campaigns; | |
| 13087 var arg_request = buildCampaign(); | |
| 13088 var arg_profileId = "foo"; | |
| 13089 var arg_id = "foo"; | |
| 13090 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 13091 var obj = new api.Campaign.fromJson(json); | |
| 13092 checkCampaign(obj); | |
| 13093 | |
| 13094 var path = (req.url).path; | |
| 13095 var pathOffset = 0; | |
| 13096 var index; | |
| 13097 var subPart; | |
| 13098 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 13099 pathOffset += 1; | |
| 13100 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 13101 pathOffset += 18; | |
| 13102 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 13103 pathOffset += 13; | |
| 13104 index = path.indexOf("/campaigns", pathOffset); | |
| 13105 unittest.expect(index >= 0, unittest.isTrue); | |
| 13106 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 13107 pathOffset = index; | |
| 13108 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 13109 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/campaigns")); | |
| 13110 pathOffset += 10; | |
| 13111 | |
| 13112 var query = (req.url).query; | |
| 13113 var queryOffset = 0; | |
| 13114 var queryMap = {}; | |
| 13115 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 13116 parseBool(n) { | |
| 13117 if (n == "true") return true; | |
| 13118 if (n == "false") return false; | |
| 13119 if (n == null) return null; | |
| 13120 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 13121 } | |
| 13122 if (query.length > 0) { | |
| 13123 for (var part in query.split("&")) { | |
| 13124 var keyvalue = part.split("="); | |
| 13125 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 13126 } | |
| 13127 } | |
| 13128 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); | |
| 13129 | |
| 13130 | |
| 13131 var h = { | |
| 13132 "content-type" : "application/json; charset=utf-8", | |
| 13133 }; | |
| 13134 var resp = convert.JSON.encode(buildCampaign()); | |
| 13135 return new async.Future.value(stringResponse(200, h, resp)); | |
| 13136 }), true); | |
| 13137 res.patch(arg_request, arg_profileId, arg_id).then(unittest.expectAsync(((
api.Campaign response) { | |
| 13138 checkCampaign(response); | |
| 13139 }))); | |
| 13140 }); | |
| 13141 | |
| 13142 unittest.test("method--update", () { | |
| 13143 | |
| 13144 var mock = new HttpServerMock(); | |
| 13145 api.CampaignsResourceApi res = new api.DfareportingApi(mock).campaigns; | |
| 13146 var arg_request = buildCampaign(); | |
| 13147 var arg_profileId = "foo"; | |
| 13148 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 13149 var obj = new api.Campaign.fromJson(json); | |
| 13150 checkCampaign(obj); | |
| 13151 | |
| 13152 var path = (req.url).path; | |
| 13153 var pathOffset = 0; | |
| 13154 var index; | |
| 13155 var subPart; | |
| 13156 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 13157 pathOffset += 1; | |
| 13158 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 13159 pathOffset += 18; | |
| 13160 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 13161 pathOffset += 13; | |
| 13162 index = path.indexOf("/campaigns", pathOffset); | |
| 13163 unittest.expect(index >= 0, unittest.isTrue); | |
| 13164 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 13165 pathOffset = index; | |
| 13166 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 13167 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/campaigns")); | |
| 13168 pathOffset += 10; | |
| 13169 | |
| 13170 var query = (req.url).query; | |
| 13171 var queryOffset = 0; | |
| 13172 var queryMap = {}; | |
| 13173 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 13174 parseBool(n) { | |
| 13175 if (n == "true") return true; | |
| 13176 if (n == "false") return false; | |
| 13177 if (n == null) return null; | |
| 13178 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 13179 } | |
| 13180 if (query.length > 0) { | |
| 13181 for (var part in query.split("&")) { | |
| 13182 var keyvalue = part.split("="); | |
| 13183 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 13184 } | |
| 13185 } | |
| 13186 | |
| 13187 | |
| 13188 var h = { | |
| 13189 "content-type" : "application/json; charset=utf-8", | |
| 13190 }; | |
| 13191 var resp = convert.JSON.encode(buildCampaign()); | |
| 13192 return new async.Future.value(stringResponse(200, h, resp)); | |
| 13193 }), true); | |
| 13194 res.update(arg_request, arg_profileId).then(unittest.expectAsync(((api.Cam
paign response) { | |
| 13195 checkCampaign(response); | |
| 13196 }))); | |
| 13197 }); | |
| 13198 | |
| 13199 }); | |
| 13200 | |
| 13201 | |
| 13202 unittest.group("resource-ChangeLogsResourceApi", () { | |
| 13203 unittest.test("method--get", () { | |
| 13204 | |
| 13205 var mock = new HttpServerMock(); | |
| 13206 api.ChangeLogsResourceApi res = new api.DfareportingApi(mock).changeLogs; | |
| 13207 var arg_profileId = "foo"; | |
| 13208 var arg_id = "foo"; | |
| 13209 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 13210 var path = (req.url).path; | |
| 13211 var pathOffset = 0; | |
| 13212 var index; | |
| 13213 var subPart; | |
| 13214 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 13215 pathOffset += 1; | |
| 13216 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 13217 pathOffset += 18; | |
| 13218 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 13219 pathOffset += 13; | |
| 13220 index = path.indexOf("/changeLogs/", pathOffset); | |
| 13221 unittest.expect(index >= 0, unittest.isTrue); | |
| 13222 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 13223 pathOffset = index; | |
| 13224 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 13225 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("/changeLogs/")); | |
| 13226 pathOffset += 12; | |
| 13227 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 13228 pathOffset = path.length; | |
| 13229 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 13230 | |
| 13231 var query = (req.url).query; | |
| 13232 var queryOffset = 0; | |
| 13233 var queryMap = {}; | |
| 13234 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 13235 parseBool(n) { | |
| 13236 if (n == "true") return true; | |
| 13237 if (n == "false") return false; | |
| 13238 if (n == null) return null; | |
| 13239 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 13240 } | |
| 13241 if (query.length > 0) { | |
| 13242 for (var part in query.split("&")) { | |
| 13243 var keyvalue = part.split("="); | |
| 13244 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 13245 } | |
| 13246 } | |
| 13247 | |
| 13248 | |
| 13249 var h = { | |
| 13250 "content-type" : "application/json; charset=utf-8", | |
| 13251 }; | |
| 13252 var resp = convert.JSON.encode(buildChangeLog()); | |
| 13253 return new async.Future.value(stringResponse(200, h, resp)); | |
| 13254 }), true); | |
| 13255 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.ChangeLog r
esponse) { | |
| 13256 checkChangeLog(response); | |
| 13257 }))); | |
| 13258 }); | |
| 13259 | |
| 13260 unittest.test("method--list", () { | |
| 13261 | |
| 13262 var mock = new HttpServerMock(); | |
| 13263 api.ChangeLogsResourceApi res = new api.DfareportingApi(mock).changeLogs; | |
| 13264 var arg_profileId = "foo"; | |
| 13265 var arg_action = "foo"; | |
| 13266 var arg_ids = buildUnnamed393(); | |
| 13267 var arg_maxChangeTime = "foo"; | |
| 13268 var arg_maxResults = 42; | |
| 13269 var arg_minChangeTime = "foo"; | |
| 13270 var arg_objectIds = buildUnnamed394(); | |
| 13271 var arg_objectType = "foo"; | |
| 13272 var arg_pageToken = "foo"; | |
| 13273 var arg_searchString = "foo"; | |
| 13274 var arg_userProfileIds = buildUnnamed395(); | |
| 13275 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 13276 var path = (req.url).path; | |
| 13277 var pathOffset = 0; | |
| 13278 var index; | |
| 13279 var subPart; | |
| 13280 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 13281 pathOffset += 1; | |
| 13282 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 13283 pathOffset += 18; | |
| 13284 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 13285 pathOffset += 13; | |
| 13286 index = path.indexOf("/changeLogs", pathOffset); | |
| 13287 unittest.expect(index >= 0, unittest.isTrue); | |
| 13288 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 13289 pathOffset = index; | |
| 13290 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 13291 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("/changeLogs")); | |
| 13292 pathOffset += 11; | |
| 13293 | |
| 13294 var query = (req.url).query; | |
| 13295 var queryOffset = 0; | |
| 13296 var queryMap = {}; | |
| 13297 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 13298 parseBool(n) { | |
| 13299 if (n == "true") return true; | |
| 13300 if (n == "false") return false; | |
| 13301 if (n == null) return null; | |
| 13302 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 13303 } | |
| 13304 if (query.length > 0) { | |
| 13305 for (var part in query.split("&")) { | |
| 13306 var keyvalue = part.split("="); | |
| 13307 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 13308 } | |
| 13309 } | |
| 13310 unittest.expect(queryMap["action"].first, unittest.equals(arg_action)); | |
| 13311 unittest.expect(queryMap["ids"], unittest.equals(arg_ids)); | |
| 13312 unittest.expect(queryMap["maxChangeTime"].first, unittest.equals(arg_max
ChangeTime)); | |
| 13313 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | |
| 13314 unittest.expect(queryMap["minChangeTime"].first, unittest.equals(arg_min
ChangeTime)); | |
| 13315 unittest.expect(queryMap["objectIds"], unittest.equals(arg_objectIds)); | |
| 13316 unittest.expect(queryMap["objectType"].first, unittest.equals(arg_object
Type)); | |
| 13317 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 13318 unittest.expect(queryMap["searchString"].first, unittest.equals(arg_sear
chString)); | |
| 13319 unittest.expect(queryMap["userProfileIds"], unittest.equals(arg_userProf
ileIds)); | |
| 13320 | |
| 13321 | |
| 13322 var h = { | |
| 13323 "content-type" : "application/json; charset=utf-8", | |
| 13324 }; | |
| 13325 var resp = convert.JSON.encode(buildChangeLogsListResponse()); | |
| 13326 return new async.Future.value(stringResponse(200, h, resp)); | |
| 13327 }), true); | |
| 13328 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) { | |
| 13329 checkChangeLogsListResponse(response); | |
| 13330 }))); | |
| 13331 }); | |
| 13332 | |
| 13333 }); | |
| 13334 | |
| 13335 | |
| 13336 unittest.group("resource-CitiesResourceApi", () { | |
| 13337 unittest.test("method--list", () { | |
| 13338 | |
| 13339 var mock = new HttpServerMock(); | |
| 13340 api.CitiesResourceApi res = new api.DfareportingApi(mock).cities; | |
| 13341 var arg_profileId = "foo"; | |
| 13342 var arg_countryDartIds = buildUnnamed396(); | |
| 13343 var arg_dartIds = buildUnnamed397(); | |
| 13344 var arg_namePrefix = "foo"; | |
| 13345 var arg_regionDartIds = buildUnnamed398(); | |
| 13346 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 13347 var path = (req.url).path; | |
| 13348 var pathOffset = 0; | |
| 13349 var index; | |
| 13350 var subPart; | |
| 13351 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 13352 pathOffset += 1; | |
| 13353 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 13354 pathOffset += 18; | |
| 13355 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 13356 pathOffset += 13; | |
| 13357 index = path.indexOf("/cities", pathOffset); | |
| 13358 unittest.expect(index >= 0, unittest.isTrue); | |
| 13359 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 13360 pathOffset = index; | |
| 13361 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 13362 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ
als("/cities")); | |
| 13363 pathOffset += 7; | |
| 13364 | |
| 13365 var query = (req.url).query; | |
| 13366 var queryOffset = 0; | |
| 13367 var queryMap = {}; | |
| 13368 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 13369 parseBool(n) { | |
| 13370 if (n == "true") return true; | |
| 13371 if (n == "false") return false; | |
| 13372 if (n == null) return null; | |
| 13373 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 13374 } | |
| 13375 if (query.length > 0) { | |
| 13376 for (var part in query.split("&")) { | |
| 13377 var keyvalue = part.split("="); | |
| 13378 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 13379 } | |
| 13380 } | |
| 13381 unittest.expect(queryMap["countryDartIds"], unittest.equals(arg_countryD
artIds)); | |
| 13382 unittest.expect(queryMap["dartIds"], unittest.equals(arg_dartIds)); | |
| 13383 unittest.expect(queryMap["namePrefix"].first, unittest.equals(arg_namePr
efix)); | |
| 13384 unittest.expect(queryMap["regionDartIds"], unittest.equals(arg_regionDar
tIds)); | |
| 13385 | |
| 13386 | |
| 13387 var h = { | |
| 13388 "content-type" : "application/json; charset=utf-8", | |
| 13389 }; | |
| 13390 var resp = convert.JSON.encode(buildCitiesListResponse()); | |
| 13391 return new async.Future.value(stringResponse(200, h, resp)); | |
| 13392 }), true); | |
| 13393 res.list(arg_profileId, countryDartIds: arg_countryDartIds, dartIds: arg_d
artIds, namePrefix: arg_namePrefix, regionDartIds: arg_regionDartIds).then(unitt
est.expectAsync(((api.CitiesListResponse response) { | |
| 13394 checkCitiesListResponse(response); | |
| 13395 }))); | |
| 13396 }); | |
| 13397 | |
| 13398 }); | |
| 13399 | |
| 13400 | |
| 13401 unittest.group("resource-ConnectionTypesResourceApi", () { | |
| 13402 unittest.test("method--get", () { | |
| 13403 | |
| 13404 var mock = new HttpServerMock(); | |
| 13405 api.ConnectionTypesResourceApi res = new api.DfareportingApi(mock).connect
ionTypes; | |
| 13406 var arg_profileId = "foo"; | |
| 13407 var arg_id = "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.4/")); | |
| 13416 pathOffset += 18; | |
| 13417 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 13418 pathOffset += 13; | |
| 13419 index = path.indexOf("/connectionTypes/", 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 + 17), unittest.eq
uals("/connectionTypes/")); | |
| 13425 pathOffset += 17; | |
| 13426 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 13427 pathOffset = path.length; | |
| 13428 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 13429 | |
| 13430 var query = (req.url).query; | |
| 13431 var queryOffset = 0; | |
| 13432 var queryMap = {}; | |
| 13433 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 13434 parseBool(n) { | |
| 13435 if (n == "true") return true; | |
| 13436 if (n == "false") return false; | |
| 13437 if (n == null) return null; | |
| 13438 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 13439 } | |
| 13440 if (query.length > 0) { | |
| 13441 for (var part in query.split("&")) { | |
| 13442 var keyvalue = part.split("="); | |
| 13443 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 13444 } | |
| 13445 } | |
| 13446 | |
| 13447 | |
| 13448 var h = { | |
| 13449 "content-type" : "application/json; charset=utf-8", | |
| 13450 }; | |
| 13451 var resp = convert.JSON.encode(buildConnectionType()); | |
| 13452 return new async.Future.value(stringResponse(200, h, resp)); | |
| 13453 }), true); | |
| 13454 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.ConnectionT
ype response) { | |
| 13455 checkConnectionType(response); | |
| 13456 }))); | |
| 13457 }); | |
| 13458 | |
| 13459 unittest.test("method--list", () { | |
| 13460 | |
| 13461 var mock = new HttpServerMock(); | |
| 13462 api.ConnectionTypesResourceApi res = new api.DfareportingApi(mock).connect
ionTypes; | |
| 13463 var arg_profileId = "foo"; | |
| 13464 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 13465 var path = (req.url).path; | |
| 13466 var pathOffset = 0; | |
| 13467 var index; | |
| 13468 var subPart; | |
| 13469 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 13470 pathOffset += 1; | |
| 13471 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 13472 pathOffset += 18; | |
| 13473 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 13474 pathOffset += 13; | |
| 13475 index = path.indexOf("/connectionTypes", pathOffset); | |
| 13476 unittest.expect(index >= 0, unittest.isTrue); | |
| 13477 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 13478 pathOffset = index; | |
| 13479 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 13480 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq
uals("/connectionTypes")); | |
| 13481 pathOffset += 16; | |
| 13482 | |
| 13483 var query = (req.url).query; | |
| 13484 var queryOffset = 0; | |
| 13485 var queryMap = {}; | |
| 13486 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 13487 parseBool(n) { | |
| 13488 if (n == "true") return true; | |
| 13489 if (n == "false") return false; | |
| 13490 if (n == null) return null; | |
| 13491 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 13492 } | |
| 13493 if (query.length > 0) { | |
| 13494 for (var part in query.split("&")) { | |
| 13495 var keyvalue = part.split("="); | |
| 13496 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 13497 } | |
| 13498 } | |
| 13499 | |
| 13500 | |
| 13501 var h = { | |
| 13502 "content-type" : "application/json; charset=utf-8", | |
| 13503 }; | |
| 13504 var resp = convert.JSON.encode(buildConnectionTypesListResponse()); | |
| 13505 return new async.Future.value(stringResponse(200, h, resp)); | |
| 13506 }), true); | |
| 13507 res.list(arg_profileId).then(unittest.expectAsync(((api.ConnectionTypesLis
tResponse response) { | |
| 13508 checkConnectionTypesListResponse(response); | |
| 13509 }))); | |
| 13510 }); | |
| 13511 | |
| 13512 }); | |
| 13513 | |
| 13514 | |
| 13515 unittest.group("resource-ContentCategoriesResourceApi", () { | |
| 13516 unittest.test("method--delete", () { | |
| 13517 | |
| 13518 var mock = new HttpServerMock(); | |
| 13519 api.ContentCategoriesResourceApi res = new api.DfareportingApi(mock).conte
ntCategories; | |
| 13520 var arg_profileId = "foo"; | |
| 13521 var arg_id = "foo"; | |
| 13522 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 13523 var path = (req.url).path; | |
| 13524 var pathOffset = 0; | |
| 13525 var index; | |
| 13526 var subPart; | |
| 13527 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 13528 pathOffset += 1; | |
| 13529 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 13530 pathOffset += 18; | |
| 13531 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 13532 pathOffset += 13; | |
| 13533 index = path.indexOf("/contentCategories/", pathOffset); | |
| 13534 unittest.expect(index >= 0, unittest.isTrue); | |
| 13535 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 13536 pathOffset = index; | |
| 13537 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 13538 unittest.expect(path.substring(pathOffset, pathOffset + 19), unittest.eq
uals("/contentCategories/")); | |
| 13539 pathOffset += 19; | |
| 13540 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 13541 pathOffset = path.length; | |
| 13542 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 13543 | |
| 13544 var query = (req.url).query; | |
| 13545 var queryOffset = 0; | |
| 13546 var queryMap = {}; | |
| 13547 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 13548 parseBool(n) { | |
| 13549 if (n == "true") return true; | |
| 13550 if (n == "false") return false; | |
| 13551 if (n == null) return null; | |
| 13552 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 13553 } | |
| 13554 if (query.length > 0) { | |
| 13555 for (var part in query.split("&")) { | |
| 13556 var keyvalue = part.split("="); | |
| 13557 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 13558 } | |
| 13559 } | |
| 13560 | |
| 13561 | |
| 13562 var h = { | |
| 13563 "content-type" : "application/json; charset=utf-8", | |
| 13564 }; | |
| 13565 var resp = ""; | |
| 13566 return new async.Future.value(stringResponse(200, h, resp)); | |
| 13567 }), true); | |
| 13568 res.delete(arg_profileId, arg_id).then(unittest.expectAsync((_) {})); | |
| 13569 }); | |
| 13570 | |
| 13571 unittest.test("method--get", () { | |
| 13572 | |
| 13573 var mock = new HttpServerMock(); | |
| 13574 api.ContentCategoriesResourceApi res = new api.DfareportingApi(mock).conte
ntCategories; | |
| 13575 var arg_profileId = "foo"; | |
| 13576 var arg_id = "foo"; | |
| 13577 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 13578 var path = (req.url).path; | |
| 13579 var pathOffset = 0; | |
| 13580 var index; | |
| 13581 var subPart; | |
| 13582 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 13583 pathOffset += 1; | |
| 13584 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 13585 pathOffset += 18; | |
| 13586 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 13587 pathOffset += 13; | |
| 13588 index = path.indexOf("/contentCategories/", pathOffset); | |
| 13589 unittest.expect(index >= 0, unittest.isTrue); | |
| 13590 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 13591 pathOffset = index; | |
| 13592 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 13593 unittest.expect(path.substring(pathOffset, pathOffset + 19), unittest.eq
uals("/contentCategories/")); | |
| 13594 pathOffset += 19; | |
| 13595 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 13596 pathOffset = path.length; | |
| 13597 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 13598 | |
| 13599 var query = (req.url).query; | |
| 13600 var queryOffset = 0; | |
| 13601 var queryMap = {}; | |
| 13602 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 13603 parseBool(n) { | |
| 13604 if (n == "true") return true; | |
| 13605 if (n == "false") return false; | |
| 13606 if (n == null) return null; | |
| 13607 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 13608 } | |
| 13609 if (query.length > 0) { | |
| 13610 for (var part in query.split("&")) { | |
| 13611 var keyvalue = part.split("="); | |
| 13612 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 13613 } | |
| 13614 } | |
| 13615 | |
| 13616 | |
| 13617 var h = { | |
| 13618 "content-type" : "application/json; charset=utf-8", | |
| 13619 }; | |
| 13620 var resp = convert.JSON.encode(buildContentCategory()); | |
| 13621 return new async.Future.value(stringResponse(200, h, resp)); | |
| 13622 }), true); | |
| 13623 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.ContentCate
gory response) { | |
| 13624 checkContentCategory(response); | |
| 13625 }))); | |
| 13626 }); | |
| 13627 | |
| 13628 unittest.test("method--insert", () { | |
| 13629 | |
| 13630 var mock = new HttpServerMock(); | |
| 13631 api.ContentCategoriesResourceApi res = new api.DfareportingApi(mock).conte
ntCategories; | |
| 13632 var arg_request = buildContentCategory(); | |
| 13633 var arg_profileId = "foo"; | |
| 13634 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 13635 var obj = new api.ContentCategory.fromJson(json); | |
| 13636 checkContentCategory(obj); | |
| 13637 | |
| 13638 var path = (req.url).path; | |
| 13639 var pathOffset = 0; | |
| 13640 var index; | |
| 13641 var subPart; | |
| 13642 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 13643 pathOffset += 1; | |
| 13644 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 13645 pathOffset += 18; | |
| 13646 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 13647 pathOffset += 13; | |
| 13648 index = path.indexOf("/contentCategories", pathOffset); | |
| 13649 unittest.expect(index >= 0, unittest.isTrue); | |
| 13650 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 13651 pathOffset = index; | |
| 13652 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 13653 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("/contentCategories")); | |
| 13654 pathOffset += 18; | |
| 13655 | |
| 13656 var query = (req.url).query; | |
| 13657 var queryOffset = 0; | |
| 13658 var queryMap = {}; | |
| 13659 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 13660 parseBool(n) { | |
| 13661 if (n == "true") return true; | |
| 13662 if (n == "false") return false; | |
| 13663 if (n == null) return null; | |
| 13664 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 13665 } | |
| 13666 if (query.length > 0) { | |
| 13667 for (var part in query.split("&")) { | |
| 13668 var keyvalue = part.split("="); | |
| 13669 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 13670 } | |
| 13671 } | |
| 13672 | |
| 13673 | |
| 13674 var h = { | |
| 13675 "content-type" : "application/json; charset=utf-8", | |
| 13676 }; | |
| 13677 var resp = convert.JSON.encode(buildContentCategory()); | |
| 13678 return new async.Future.value(stringResponse(200, h, resp)); | |
| 13679 }), true); | |
| 13680 res.insert(arg_request, arg_profileId).then(unittest.expectAsync(((api.Con
tentCategory response) { | |
| 13681 checkContentCategory(response); | |
| 13682 }))); | |
| 13683 }); | |
| 13684 | |
| 13685 unittest.test("method--list", () { | |
| 13686 | |
| 13687 var mock = new HttpServerMock(); | |
| 13688 api.ContentCategoriesResourceApi res = new api.DfareportingApi(mock).conte
ntCategories; | |
| 13689 var arg_profileId = "foo"; | |
| 13690 var arg_ids = buildUnnamed399(); | |
| 13691 var arg_maxResults = 42; | |
| 13692 var arg_pageToken = "foo"; | |
| 13693 var arg_searchString = "foo"; | |
| 13694 var arg_sortField = "foo"; | |
| 13695 var arg_sortOrder = "foo"; | |
| 13696 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 13697 var path = (req.url).path; | |
| 13698 var pathOffset = 0; | |
| 13699 var index; | |
| 13700 var subPart; | |
| 13701 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 13702 pathOffset += 1; | |
| 13703 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 13704 pathOffset += 18; | |
| 13705 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 13706 pathOffset += 13; | |
| 13707 index = path.indexOf("/contentCategories", pathOffset); | |
| 13708 unittest.expect(index >= 0, unittest.isTrue); | |
| 13709 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 13710 pathOffset = index; | |
| 13711 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 13712 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("/contentCategories")); | |
| 13713 pathOffset += 18; | |
| 13714 | |
| 13715 var query = (req.url).query; | |
| 13716 var queryOffset = 0; | |
| 13717 var queryMap = {}; | |
| 13718 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 13719 parseBool(n) { | |
| 13720 if (n == "true") return true; | |
| 13721 if (n == "false") return false; | |
| 13722 if (n == null) return null; | |
| 13723 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 13724 } | |
| 13725 if (query.length > 0) { | |
| 13726 for (var part in query.split("&")) { | |
| 13727 var keyvalue = part.split("="); | |
| 13728 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 13729 } | |
| 13730 } | |
| 13731 unittest.expect(queryMap["ids"], unittest.equals(arg_ids)); | |
| 13732 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | |
| 13733 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 13734 unittest.expect(queryMap["searchString"].first, unittest.equals(arg_sear
chString)); | |
| 13735 unittest.expect(queryMap["sortField"].first, unittest.equals(arg_sortFie
ld)); | |
| 13736 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | |
| 13737 | |
| 13738 | |
| 13739 var h = { | |
| 13740 "content-type" : "application/json; charset=utf-8", | |
| 13741 }; | |
| 13742 var resp = convert.JSON.encode(buildContentCategoriesListResponse()); | |
| 13743 return new async.Future.value(stringResponse(200, h, resp)); | |
| 13744 }), true); | |
| 13745 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) { | |
| 13746 checkContentCategoriesListResponse(response); | |
| 13747 }))); | |
| 13748 }); | |
| 13749 | |
| 13750 unittest.test("method--patch", () { | |
| 13751 | |
| 13752 var mock = new HttpServerMock(); | |
| 13753 api.ContentCategoriesResourceApi res = new api.DfareportingApi(mock).conte
ntCategories; | |
| 13754 var arg_request = buildContentCategory(); | |
| 13755 var arg_profileId = "foo"; | |
| 13756 var arg_id = "foo"; | |
| 13757 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 13758 var obj = new api.ContentCategory.fromJson(json); | |
| 13759 checkContentCategory(obj); | |
| 13760 | |
| 13761 var path = (req.url).path; | |
| 13762 var pathOffset = 0; | |
| 13763 var index; | |
| 13764 var subPart; | |
| 13765 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 13766 pathOffset += 1; | |
| 13767 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 13768 pathOffset += 18; | |
| 13769 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 13770 pathOffset += 13; | |
| 13771 index = path.indexOf("/contentCategories", pathOffset); | |
| 13772 unittest.expect(index >= 0, unittest.isTrue); | |
| 13773 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 13774 pathOffset = index; | |
| 13775 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 13776 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("/contentCategories")); | |
| 13777 pathOffset += 18; | |
| 13778 | |
| 13779 var query = (req.url).query; | |
| 13780 var queryOffset = 0; | |
| 13781 var queryMap = {}; | |
| 13782 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 13783 parseBool(n) { | |
| 13784 if (n == "true") return true; | |
| 13785 if (n == "false") return false; | |
| 13786 if (n == null) return null; | |
| 13787 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 13788 } | |
| 13789 if (query.length > 0) { | |
| 13790 for (var part in query.split("&")) { | |
| 13791 var keyvalue = part.split("="); | |
| 13792 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 13793 } | |
| 13794 } | |
| 13795 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); | |
| 13796 | |
| 13797 | |
| 13798 var h = { | |
| 13799 "content-type" : "application/json; charset=utf-8", | |
| 13800 }; | |
| 13801 var resp = convert.JSON.encode(buildContentCategory()); | |
| 13802 return new async.Future.value(stringResponse(200, h, resp)); | |
| 13803 }), true); | |
| 13804 res.patch(arg_request, arg_profileId, arg_id).then(unittest.expectAsync(((
api.ContentCategory response) { | |
| 13805 checkContentCategory(response); | |
| 13806 }))); | |
| 13807 }); | |
| 13808 | |
| 13809 unittest.test("method--update", () { | |
| 13810 | |
| 13811 var mock = new HttpServerMock(); | |
| 13812 api.ContentCategoriesResourceApi res = new api.DfareportingApi(mock).conte
ntCategories; | |
| 13813 var arg_request = buildContentCategory(); | |
| 13814 var arg_profileId = "foo"; | |
| 13815 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 13816 var obj = new api.ContentCategory.fromJson(json); | |
| 13817 checkContentCategory(obj); | |
| 13818 | |
| 13819 var path = (req.url).path; | |
| 13820 var pathOffset = 0; | |
| 13821 var index; | |
| 13822 var subPart; | |
| 13823 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 13824 pathOffset += 1; | |
| 13825 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 13826 pathOffset += 18; | |
| 13827 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 13828 pathOffset += 13; | |
| 13829 index = path.indexOf("/contentCategories", pathOffset); | |
| 13830 unittest.expect(index >= 0, unittest.isTrue); | |
| 13831 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 13832 pathOffset = index; | |
| 13833 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 13834 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("/contentCategories")); | |
| 13835 pathOffset += 18; | |
| 13836 | |
| 13837 var query = (req.url).query; | |
| 13838 var queryOffset = 0; | |
| 13839 var queryMap = {}; | |
| 13840 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 13841 parseBool(n) { | |
| 13842 if (n == "true") return true; | |
| 13843 if (n == "false") return false; | |
| 13844 if (n == null) return null; | |
| 13845 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 13846 } | |
| 13847 if (query.length > 0) { | |
| 13848 for (var part in query.split("&")) { | |
| 13849 var keyvalue = part.split("="); | |
| 13850 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 13851 } | |
| 13852 } | |
| 13853 | |
| 13854 | |
| 13855 var h = { | |
| 13856 "content-type" : "application/json; charset=utf-8", | |
| 13857 }; | |
| 13858 var resp = convert.JSON.encode(buildContentCategory()); | |
| 13859 return new async.Future.value(stringResponse(200, h, resp)); | |
| 13860 }), true); | |
| 13861 res.update(arg_request, arg_profileId).then(unittest.expectAsync(((api.Con
tentCategory response) { | |
| 13862 checkContentCategory(response); | |
| 13863 }))); | |
| 13864 }); | |
| 13865 | |
| 13866 }); | |
| 13867 | |
| 13868 | |
| 13869 unittest.group("resource-CountriesResourceApi", () { | |
| 13870 unittest.test("method--get", () { | |
| 13871 | |
| 13872 var mock = new HttpServerMock(); | |
| 13873 api.CountriesResourceApi res = new api.DfareportingApi(mock).countries; | |
| 13874 var arg_profileId = "foo"; | |
| 13875 var arg_dartId = "foo"; | |
| 13876 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 13877 var path = (req.url).path; | |
| 13878 var pathOffset = 0; | |
| 13879 var index; | |
| 13880 var subPart; | |
| 13881 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 13882 pathOffset += 1; | |
| 13883 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 13884 pathOffset += 18; | |
| 13885 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 13886 pathOffset += 13; | |
| 13887 index = path.indexOf("/countries/", pathOffset); | |
| 13888 unittest.expect(index >= 0, unittest.isTrue); | |
| 13889 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 13890 pathOffset = index; | |
| 13891 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 13892 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("/countries/")); | |
| 13893 pathOffset += 11; | |
| 13894 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 13895 pathOffset = path.length; | |
| 13896 unittest.expect(subPart, unittest.equals("$arg_dartId")); | |
| 13897 | |
| 13898 var query = (req.url).query; | |
| 13899 var queryOffset = 0; | |
| 13900 var queryMap = {}; | |
| 13901 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 13902 parseBool(n) { | |
| 13903 if (n == "true") return true; | |
| 13904 if (n == "false") return false; | |
| 13905 if (n == null) return null; | |
| 13906 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 13907 } | |
| 13908 if (query.length > 0) { | |
| 13909 for (var part in query.split("&")) { | |
| 13910 var keyvalue = part.split("="); | |
| 13911 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 13912 } | |
| 13913 } | |
| 13914 | |
| 13915 | |
| 13916 var h = { | |
| 13917 "content-type" : "application/json; charset=utf-8", | |
| 13918 }; | |
| 13919 var resp = convert.JSON.encode(buildCountry()); | |
| 13920 return new async.Future.value(stringResponse(200, h, resp)); | |
| 13921 }), true); | |
| 13922 res.get(arg_profileId, arg_dartId).then(unittest.expectAsync(((api.Country
response) { | |
| 13923 checkCountry(response); | |
| 13924 }))); | |
| 13925 }); | |
| 13926 | |
| 13927 unittest.test("method--list", () { | |
| 13928 | |
| 13929 var mock = new HttpServerMock(); | |
| 13930 api.CountriesResourceApi res = new api.DfareportingApi(mock).countries; | |
| 13931 var arg_profileId = "foo"; | |
| 13932 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 13933 var path = (req.url).path; | |
| 13934 var pathOffset = 0; | |
| 13935 var index; | |
| 13936 var subPart; | |
| 13937 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 13938 pathOffset += 1; | |
| 13939 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 13940 pathOffset += 18; | |
| 13941 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 13942 pathOffset += 13; | |
| 13943 index = path.indexOf("/countries", pathOffset); | |
| 13944 unittest.expect(index >= 0, unittest.isTrue); | |
| 13945 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 13946 pathOffset = index; | |
| 13947 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 13948 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/countries")); | |
| 13949 pathOffset += 10; | |
| 13950 | |
| 13951 var query = (req.url).query; | |
| 13952 var queryOffset = 0; | |
| 13953 var queryMap = {}; | |
| 13954 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 13955 parseBool(n) { | |
| 13956 if (n == "true") return true; | |
| 13957 if (n == "false") return false; | |
| 13958 if (n == null) return null; | |
| 13959 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 13960 } | |
| 13961 if (query.length > 0) { | |
| 13962 for (var part in query.split("&")) { | |
| 13963 var keyvalue = part.split("="); | |
| 13964 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 13965 } | |
| 13966 } | |
| 13967 | |
| 13968 | |
| 13969 var h = { | |
| 13970 "content-type" : "application/json; charset=utf-8", | |
| 13971 }; | |
| 13972 var resp = convert.JSON.encode(buildCountriesListResponse()); | |
| 13973 return new async.Future.value(stringResponse(200, h, resp)); | |
| 13974 }), true); | |
| 13975 res.list(arg_profileId).then(unittest.expectAsync(((api.CountriesListRespo
nse response) { | |
| 13976 checkCountriesListResponse(response); | |
| 13977 }))); | |
| 13978 }); | |
| 13979 | |
| 13980 }); | |
| 13981 | |
| 13982 | |
| 13983 unittest.group("resource-CreativeAssetsResourceApi", () { | |
| 13984 unittest.test("method--insert", () { | |
| 13985 // TODO: Implement tests for media upload; | |
| 13986 // TODO: Implement tests for media download; | |
| 13987 | |
| 13988 var mock = new HttpServerMock(); | |
| 13989 api.CreativeAssetsResourceApi res = new api.DfareportingApi(mock).creative
Assets; | |
| 13990 var arg_request = buildCreativeAssetMetadata(); | |
| 13991 var arg_profileId = "foo"; | |
| 13992 var arg_advertiserId = "foo"; | |
| 13993 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 13994 var obj = new api.CreativeAssetMetadata.fromJson(json); | |
| 13995 checkCreativeAssetMetadata(obj); | |
| 13996 | |
| 13997 var path = (req.url).path; | |
| 13998 var pathOffset = 0; | |
| 13999 var index; | |
| 14000 var subPart; | |
| 14001 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 14002 pathOffset += 1; | |
| 14003 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 14004 pathOffset += 18; | |
| 14005 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 14006 pathOffset += 13; | |
| 14007 index = path.indexOf("/creativeAssets/", pathOffset); | |
| 14008 unittest.expect(index >= 0, unittest.isTrue); | |
| 14009 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 14010 pathOffset = index; | |
| 14011 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 14012 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq
uals("/creativeAssets/")); | |
| 14013 pathOffset += 16; | |
| 14014 index = path.indexOf("/creativeAssets", pathOffset); | |
| 14015 unittest.expect(index >= 0, unittest.isTrue); | |
| 14016 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 14017 pathOffset = index; | |
| 14018 unittest.expect(subPart, unittest.equals("$arg_advertiserId")); | |
| 14019 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/creativeAssets")); | |
| 14020 pathOffset += 15; | |
| 14021 | |
| 14022 var query = (req.url).query; | |
| 14023 var queryOffset = 0; | |
| 14024 var queryMap = {}; | |
| 14025 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 14026 parseBool(n) { | |
| 14027 if (n == "true") return true; | |
| 14028 if (n == "false") return false; | |
| 14029 if (n == null) return null; | |
| 14030 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 14031 } | |
| 14032 if (query.length > 0) { | |
| 14033 for (var part in query.split("&")) { | |
| 14034 var keyvalue = part.split("="); | |
| 14035 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 14036 } | |
| 14037 } | |
| 14038 | |
| 14039 | |
| 14040 var h = { | |
| 14041 "content-type" : "application/json; charset=utf-8", | |
| 14042 }; | |
| 14043 var resp = convert.JSON.encode(buildCreativeAssetMetadata()); | |
| 14044 return new async.Future.value(stringResponse(200, h, resp)); | |
| 14045 }), true); | |
| 14046 res.insert(arg_request, arg_profileId, arg_advertiserId).then(unittest.exp
ectAsync(((api.CreativeAssetMetadata response) { | |
| 14047 checkCreativeAssetMetadata(response); | |
| 14048 }))); | |
| 14049 }); | |
| 14050 | |
| 14051 }); | |
| 14052 | |
| 14053 | |
| 14054 unittest.group("resource-CreativeFieldValuesResourceApi", () { | |
| 14055 unittest.test("method--delete", () { | |
| 14056 | |
| 14057 var mock = new HttpServerMock(); | |
| 14058 api.CreativeFieldValuesResourceApi res = new api.DfareportingApi(mock).cre
ativeFieldValues; | |
| 14059 var arg_profileId = "foo"; | |
| 14060 var arg_creativeFieldId = "foo"; | |
| 14061 var arg_id = "foo"; | |
| 14062 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 14063 var path = (req.url).path; | |
| 14064 var pathOffset = 0; | |
| 14065 var index; | |
| 14066 var subPart; | |
| 14067 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 14068 pathOffset += 1; | |
| 14069 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 14070 pathOffset += 18; | |
| 14071 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 14072 pathOffset += 13; | |
| 14073 index = path.indexOf("/creativeFields/", pathOffset); | |
| 14074 unittest.expect(index >= 0, unittest.isTrue); | |
| 14075 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 14076 pathOffset = index; | |
| 14077 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 14078 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq
uals("/creativeFields/")); | |
| 14079 pathOffset += 16; | |
| 14080 index = path.indexOf("/creativeFieldValues/", pathOffset); | |
| 14081 unittest.expect(index >= 0, unittest.isTrue); | |
| 14082 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 14083 pathOffset = index; | |
| 14084 unittest.expect(subPart, unittest.equals("$arg_creativeFieldId")); | |
| 14085 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("/creativeFieldValues/")); | |
| 14086 pathOffset += 21; | |
| 14087 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 14088 pathOffset = path.length; | |
| 14089 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 14090 | |
| 14091 var query = (req.url).query; | |
| 14092 var queryOffset = 0; | |
| 14093 var queryMap = {}; | |
| 14094 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 14095 parseBool(n) { | |
| 14096 if (n == "true") return true; | |
| 14097 if (n == "false") return false; | |
| 14098 if (n == null) return null; | |
| 14099 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 14100 } | |
| 14101 if (query.length > 0) { | |
| 14102 for (var part in query.split("&")) { | |
| 14103 var keyvalue = part.split("="); | |
| 14104 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 14105 } | |
| 14106 } | |
| 14107 | |
| 14108 | |
| 14109 var h = { | |
| 14110 "content-type" : "application/json; charset=utf-8", | |
| 14111 }; | |
| 14112 var resp = ""; | |
| 14113 return new async.Future.value(stringResponse(200, h, resp)); | |
| 14114 }), true); | |
| 14115 res.delete(arg_profileId, arg_creativeFieldId, arg_id).then(unittest.expec
tAsync((_) {})); | |
| 14116 }); | |
| 14117 | |
| 14118 unittest.test("method--get", () { | |
| 14119 | |
| 14120 var mock = new HttpServerMock(); | |
| 14121 api.CreativeFieldValuesResourceApi res = new api.DfareportingApi(mock).cre
ativeFieldValues; | |
| 14122 var arg_profileId = "foo"; | |
| 14123 var arg_creativeFieldId = "foo"; | |
| 14124 var arg_id = "foo"; | |
| 14125 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 14126 var path = (req.url).path; | |
| 14127 var pathOffset = 0; | |
| 14128 var index; | |
| 14129 var subPart; | |
| 14130 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 14131 pathOffset += 1; | |
| 14132 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 14133 pathOffset += 18; | |
| 14134 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 14135 pathOffset += 13; | |
| 14136 index = path.indexOf("/creativeFields/", pathOffset); | |
| 14137 unittest.expect(index >= 0, unittest.isTrue); | |
| 14138 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 14139 pathOffset = index; | |
| 14140 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 14141 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq
uals("/creativeFields/")); | |
| 14142 pathOffset += 16; | |
| 14143 index = path.indexOf("/creativeFieldValues/", pathOffset); | |
| 14144 unittest.expect(index >= 0, unittest.isTrue); | |
| 14145 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 14146 pathOffset = index; | |
| 14147 unittest.expect(subPart, unittest.equals("$arg_creativeFieldId")); | |
| 14148 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("/creativeFieldValues/")); | |
| 14149 pathOffset += 21; | |
| 14150 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 14151 pathOffset = path.length; | |
| 14152 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 14153 | |
| 14154 var query = (req.url).query; | |
| 14155 var queryOffset = 0; | |
| 14156 var queryMap = {}; | |
| 14157 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 14158 parseBool(n) { | |
| 14159 if (n == "true") return true; | |
| 14160 if (n == "false") return false; | |
| 14161 if (n == null) return null; | |
| 14162 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 14163 } | |
| 14164 if (query.length > 0) { | |
| 14165 for (var part in query.split("&")) { | |
| 14166 var keyvalue = part.split("="); | |
| 14167 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 14168 } | |
| 14169 } | |
| 14170 | |
| 14171 | |
| 14172 var h = { | |
| 14173 "content-type" : "application/json; charset=utf-8", | |
| 14174 }; | |
| 14175 var resp = convert.JSON.encode(buildCreativeFieldValue()); | |
| 14176 return new async.Future.value(stringResponse(200, h, resp)); | |
| 14177 }), true); | |
| 14178 res.get(arg_profileId, arg_creativeFieldId, arg_id).then(unittest.expectAs
ync(((api.CreativeFieldValue response) { | |
| 14179 checkCreativeFieldValue(response); | |
| 14180 }))); | |
| 14181 }); | |
| 14182 | |
| 14183 unittest.test("method--insert", () { | |
| 14184 | |
| 14185 var mock = new HttpServerMock(); | |
| 14186 api.CreativeFieldValuesResourceApi res = new api.DfareportingApi(mock).cre
ativeFieldValues; | |
| 14187 var arg_request = buildCreativeFieldValue(); | |
| 14188 var arg_profileId = "foo"; | |
| 14189 var arg_creativeFieldId = "foo"; | |
| 14190 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 14191 var obj = new api.CreativeFieldValue.fromJson(json); | |
| 14192 checkCreativeFieldValue(obj); | |
| 14193 | |
| 14194 var path = (req.url).path; | |
| 14195 var pathOffset = 0; | |
| 14196 var index; | |
| 14197 var subPart; | |
| 14198 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 14199 pathOffset += 1; | |
| 14200 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 14201 pathOffset += 18; | |
| 14202 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 14203 pathOffset += 13; | |
| 14204 index = path.indexOf("/creativeFields/", pathOffset); | |
| 14205 unittest.expect(index >= 0, unittest.isTrue); | |
| 14206 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 14207 pathOffset = index; | |
| 14208 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 14209 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq
uals("/creativeFields/")); | |
| 14210 pathOffset += 16; | |
| 14211 index = path.indexOf("/creativeFieldValues", pathOffset); | |
| 14212 unittest.expect(index >= 0, unittest.isTrue); | |
| 14213 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 14214 pathOffset = index; | |
| 14215 unittest.expect(subPart, unittest.equals("$arg_creativeFieldId")); | |
| 14216 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("/creativeFieldValues")); | |
| 14217 pathOffset += 20; | |
| 14218 | |
| 14219 var query = (req.url).query; | |
| 14220 var queryOffset = 0; | |
| 14221 var queryMap = {}; | |
| 14222 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 14223 parseBool(n) { | |
| 14224 if (n == "true") return true; | |
| 14225 if (n == "false") return false; | |
| 14226 if (n == null) return null; | |
| 14227 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 14228 } | |
| 14229 if (query.length > 0) { | |
| 14230 for (var part in query.split("&")) { | |
| 14231 var keyvalue = part.split("="); | |
| 14232 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 14233 } | |
| 14234 } | |
| 14235 | |
| 14236 | |
| 14237 var h = { | |
| 14238 "content-type" : "application/json; charset=utf-8", | |
| 14239 }; | |
| 14240 var resp = convert.JSON.encode(buildCreativeFieldValue()); | |
| 14241 return new async.Future.value(stringResponse(200, h, resp)); | |
| 14242 }), true); | |
| 14243 res.insert(arg_request, arg_profileId, arg_creativeFieldId).then(unittest.
expectAsync(((api.CreativeFieldValue response) { | |
| 14244 checkCreativeFieldValue(response); | |
| 14245 }))); | |
| 14246 }); | |
| 14247 | |
| 14248 unittest.test("method--list", () { | |
| 14249 | |
| 14250 var mock = new HttpServerMock(); | |
| 14251 api.CreativeFieldValuesResourceApi res = new api.DfareportingApi(mock).cre
ativeFieldValues; | |
| 14252 var arg_profileId = "foo"; | |
| 14253 var arg_creativeFieldId = "foo"; | |
| 14254 var arg_ids = buildUnnamed400(); | |
| 14255 var arg_maxResults = 42; | |
| 14256 var arg_pageToken = "foo"; | |
| 14257 var arg_searchString = "foo"; | |
| 14258 var arg_sortField = "foo"; | |
| 14259 var arg_sortOrder = "foo"; | |
| 14260 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 14261 var path = (req.url).path; | |
| 14262 var pathOffset = 0; | |
| 14263 var index; | |
| 14264 var subPart; | |
| 14265 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 14266 pathOffset += 1; | |
| 14267 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 14268 pathOffset += 18; | |
| 14269 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 14270 pathOffset += 13; | |
| 14271 index = path.indexOf("/creativeFields/", pathOffset); | |
| 14272 unittest.expect(index >= 0, unittest.isTrue); | |
| 14273 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 14274 pathOffset = index; | |
| 14275 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 14276 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq
uals("/creativeFields/")); | |
| 14277 pathOffset += 16; | |
| 14278 index = path.indexOf("/creativeFieldValues", pathOffset); | |
| 14279 unittest.expect(index >= 0, unittest.isTrue); | |
| 14280 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 14281 pathOffset = index; | |
| 14282 unittest.expect(subPart, unittest.equals("$arg_creativeFieldId")); | |
| 14283 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("/creativeFieldValues")); | |
| 14284 pathOffset += 20; | |
| 14285 | |
| 14286 var query = (req.url).query; | |
| 14287 var queryOffset = 0; | |
| 14288 var queryMap = {}; | |
| 14289 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 14290 parseBool(n) { | |
| 14291 if (n == "true") return true; | |
| 14292 if (n == "false") return false; | |
| 14293 if (n == null) return null; | |
| 14294 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 14295 } | |
| 14296 if (query.length > 0) { | |
| 14297 for (var part in query.split("&")) { | |
| 14298 var keyvalue = part.split("="); | |
| 14299 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 14300 } | |
| 14301 } | |
| 14302 unittest.expect(queryMap["ids"], unittest.equals(arg_ids)); | |
| 14303 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | |
| 14304 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 14305 unittest.expect(queryMap["searchString"].first, unittest.equals(arg_sear
chString)); | |
| 14306 unittest.expect(queryMap["sortField"].first, unittest.equals(arg_sortFie
ld)); | |
| 14307 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | |
| 14308 | |
| 14309 | |
| 14310 var h = { | |
| 14311 "content-type" : "application/json; charset=utf-8", | |
| 14312 }; | |
| 14313 var resp = convert.JSON.encode(buildCreativeFieldValuesListResponse()); | |
| 14314 return new async.Future.value(stringResponse(200, h, resp)); | |
| 14315 }), true); | |
| 14316 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) { | |
| 14317 checkCreativeFieldValuesListResponse(response); | |
| 14318 }))); | |
| 14319 }); | |
| 14320 | |
| 14321 unittest.test("method--patch", () { | |
| 14322 | |
| 14323 var mock = new HttpServerMock(); | |
| 14324 api.CreativeFieldValuesResourceApi res = new api.DfareportingApi(mock).cre
ativeFieldValues; | |
| 14325 var arg_request = buildCreativeFieldValue(); | |
| 14326 var arg_profileId = "foo"; | |
| 14327 var arg_creativeFieldId = "foo"; | |
| 14328 var arg_id = "foo"; | |
| 14329 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 14330 var obj = new api.CreativeFieldValue.fromJson(json); | |
| 14331 checkCreativeFieldValue(obj); | |
| 14332 | |
| 14333 var path = (req.url).path; | |
| 14334 var pathOffset = 0; | |
| 14335 var index; | |
| 14336 var subPart; | |
| 14337 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 14338 pathOffset += 1; | |
| 14339 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 14340 pathOffset += 18; | |
| 14341 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 14342 pathOffset += 13; | |
| 14343 index = path.indexOf("/creativeFields/", pathOffset); | |
| 14344 unittest.expect(index >= 0, unittest.isTrue); | |
| 14345 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 14346 pathOffset = index; | |
| 14347 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 14348 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq
uals("/creativeFields/")); | |
| 14349 pathOffset += 16; | |
| 14350 index = path.indexOf("/creativeFieldValues", pathOffset); | |
| 14351 unittest.expect(index >= 0, unittest.isTrue); | |
| 14352 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 14353 pathOffset = index; | |
| 14354 unittest.expect(subPart, unittest.equals("$arg_creativeFieldId")); | |
| 14355 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("/creativeFieldValues")); | |
| 14356 pathOffset += 20; | |
| 14357 | |
| 14358 var query = (req.url).query; | |
| 14359 var queryOffset = 0; | |
| 14360 var queryMap = {}; | |
| 14361 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 14362 parseBool(n) { | |
| 14363 if (n == "true") return true; | |
| 14364 if (n == "false") return false; | |
| 14365 if (n == null) return null; | |
| 14366 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 14367 } | |
| 14368 if (query.length > 0) { | |
| 14369 for (var part in query.split("&")) { | |
| 14370 var keyvalue = part.split("="); | |
| 14371 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 14372 } | |
| 14373 } | |
| 14374 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); | |
| 14375 | |
| 14376 | |
| 14377 var h = { | |
| 14378 "content-type" : "application/json; charset=utf-8", | |
| 14379 }; | |
| 14380 var resp = convert.JSON.encode(buildCreativeFieldValue()); | |
| 14381 return new async.Future.value(stringResponse(200, h, resp)); | |
| 14382 }), true); | |
| 14383 res.patch(arg_request, arg_profileId, arg_creativeFieldId, arg_id).then(un
ittest.expectAsync(((api.CreativeFieldValue response) { | |
| 14384 checkCreativeFieldValue(response); | |
| 14385 }))); | |
| 14386 }); | |
| 14387 | |
| 14388 unittest.test("method--update", () { | |
| 14389 | |
| 14390 var mock = new HttpServerMock(); | |
| 14391 api.CreativeFieldValuesResourceApi res = new api.DfareportingApi(mock).cre
ativeFieldValues; | |
| 14392 var arg_request = buildCreativeFieldValue(); | |
| 14393 var arg_profileId = "foo"; | |
| 14394 var arg_creativeFieldId = "foo"; | |
| 14395 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 14396 var obj = new api.CreativeFieldValue.fromJson(json); | |
| 14397 checkCreativeFieldValue(obj); | |
| 14398 | |
| 14399 var path = (req.url).path; | |
| 14400 var pathOffset = 0; | |
| 14401 var index; | |
| 14402 var subPart; | |
| 14403 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 14404 pathOffset += 1; | |
| 14405 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 14406 pathOffset += 18; | |
| 14407 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 14408 pathOffset += 13; | |
| 14409 index = path.indexOf("/creativeFields/", pathOffset); | |
| 14410 unittest.expect(index >= 0, unittest.isTrue); | |
| 14411 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 14412 pathOffset = index; | |
| 14413 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 14414 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq
uals("/creativeFields/")); | |
| 14415 pathOffset += 16; | |
| 14416 index = path.indexOf("/creativeFieldValues", pathOffset); | |
| 14417 unittest.expect(index >= 0, unittest.isTrue); | |
| 14418 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 14419 pathOffset = index; | |
| 14420 unittest.expect(subPart, unittest.equals("$arg_creativeFieldId")); | |
| 14421 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("/creativeFieldValues")); | |
| 14422 pathOffset += 20; | |
| 14423 | |
| 14424 var query = (req.url).query; | |
| 14425 var queryOffset = 0; | |
| 14426 var queryMap = {}; | |
| 14427 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 14428 parseBool(n) { | |
| 14429 if (n == "true") return true; | |
| 14430 if (n == "false") return false; | |
| 14431 if (n == null) return null; | |
| 14432 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 14433 } | |
| 14434 if (query.length > 0) { | |
| 14435 for (var part in query.split("&")) { | |
| 14436 var keyvalue = part.split("="); | |
| 14437 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 14438 } | |
| 14439 } | |
| 14440 | |
| 14441 | |
| 14442 var h = { | |
| 14443 "content-type" : "application/json; charset=utf-8", | |
| 14444 }; | |
| 14445 var resp = convert.JSON.encode(buildCreativeFieldValue()); | |
| 14446 return new async.Future.value(stringResponse(200, h, resp)); | |
| 14447 }), true); | |
| 14448 res.update(arg_request, arg_profileId, arg_creativeFieldId).then(unittest.
expectAsync(((api.CreativeFieldValue response) { | |
| 14449 checkCreativeFieldValue(response); | |
| 14450 }))); | |
| 14451 }); | |
| 14452 | |
| 14453 }); | |
| 14454 | |
| 14455 | |
| 14456 unittest.group("resource-CreativeFieldsResourceApi", () { | |
| 14457 unittest.test("method--delete", () { | |
| 14458 | |
| 14459 var mock = new HttpServerMock(); | |
| 14460 api.CreativeFieldsResourceApi res = new api.DfareportingApi(mock).creative
Fields; | |
| 14461 var arg_profileId = "foo"; | |
| 14462 var arg_id = "foo"; | |
| 14463 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 14464 var path = (req.url).path; | |
| 14465 var pathOffset = 0; | |
| 14466 var index; | |
| 14467 var subPart; | |
| 14468 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 14469 pathOffset += 1; | |
| 14470 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 14471 pathOffset += 18; | |
| 14472 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 14473 pathOffset += 13; | |
| 14474 index = path.indexOf("/creativeFields/", pathOffset); | |
| 14475 unittest.expect(index >= 0, unittest.isTrue); | |
| 14476 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 14477 pathOffset = index; | |
| 14478 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 14479 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq
uals("/creativeFields/")); | |
| 14480 pathOffset += 16; | |
| 14481 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 14482 pathOffset = path.length; | |
| 14483 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 14484 | |
| 14485 var query = (req.url).query; | |
| 14486 var queryOffset = 0; | |
| 14487 var queryMap = {}; | |
| 14488 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 14489 parseBool(n) { | |
| 14490 if (n == "true") return true; | |
| 14491 if (n == "false") return false; | |
| 14492 if (n == null) return null; | |
| 14493 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 14494 } | |
| 14495 if (query.length > 0) { | |
| 14496 for (var part in query.split("&")) { | |
| 14497 var keyvalue = part.split("="); | |
| 14498 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 14499 } | |
| 14500 } | |
| 14501 | |
| 14502 | |
| 14503 var h = { | |
| 14504 "content-type" : "application/json; charset=utf-8", | |
| 14505 }; | |
| 14506 var resp = ""; | |
| 14507 return new async.Future.value(stringResponse(200, h, resp)); | |
| 14508 }), true); | |
| 14509 res.delete(arg_profileId, arg_id).then(unittest.expectAsync((_) {})); | |
| 14510 }); | |
| 14511 | |
| 14512 unittest.test("method--get", () { | |
| 14513 | |
| 14514 var mock = new HttpServerMock(); | |
| 14515 api.CreativeFieldsResourceApi res = new api.DfareportingApi(mock).creative
Fields; | |
| 14516 var arg_profileId = "foo"; | |
| 14517 var arg_id = "foo"; | |
| 14518 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 14519 var path = (req.url).path; | |
| 14520 var pathOffset = 0; | |
| 14521 var index; | |
| 14522 var subPart; | |
| 14523 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 14524 pathOffset += 1; | |
| 14525 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 14526 pathOffset += 18; | |
| 14527 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 14528 pathOffset += 13; | |
| 14529 index = path.indexOf("/creativeFields/", pathOffset); | |
| 14530 unittest.expect(index >= 0, unittest.isTrue); | |
| 14531 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 14532 pathOffset = index; | |
| 14533 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 14534 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq
uals("/creativeFields/")); | |
| 14535 pathOffset += 16; | |
| 14536 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 14537 pathOffset = path.length; | |
| 14538 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 14539 | |
| 14540 var query = (req.url).query; | |
| 14541 var queryOffset = 0; | |
| 14542 var queryMap = {}; | |
| 14543 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 14544 parseBool(n) { | |
| 14545 if (n == "true") return true; | |
| 14546 if (n == "false") return false; | |
| 14547 if (n == null) return null; | |
| 14548 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 14549 } | |
| 14550 if (query.length > 0) { | |
| 14551 for (var part in query.split("&")) { | |
| 14552 var keyvalue = part.split("="); | |
| 14553 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 14554 } | |
| 14555 } | |
| 14556 | |
| 14557 | |
| 14558 var h = { | |
| 14559 "content-type" : "application/json; charset=utf-8", | |
| 14560 }; | |
| 14561 var resp = convert.JSON.encode(buildCreativeField()); | |
| 14562 return new async.Future.value(stringResponse(200, h, resp)); | |
| 14563 }), true); | |
| 14564 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.CreativeFie
ld response) { | |
| 14565 checkCreativeField(response); | |
| 14566 }))); | |
| 14567 }); | |
| 14568 | |
| 14569 unittest.test("method--insert", () { | |
| 14570 | |
| 14571 var mock = new HttpServerMock(); | |
| 14572 api.CreativeFieldsResourceApi res = new api.DfareportingApi(mock).creative
Fields; | |
| 14573 var arg_request = buildCreativeField(); | |
| 14574 var arg_profileId = "foo"; | |
| 14575 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 14576 var obj = new api.CreativeField.fromJson(json); | |
| 14577 checkCreativeField(obj); | |
| 14578 | |
| 14579 var path = (req.url).path; | |
| 14580 var pathOffset = 0; | |
| 14581 var index; | |
| 14582 var subPart; | |
| 14583 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 14584 pathOffset += 1; | |
| 14585 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 14586 pathOffset += 18; | |
| 14587 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 14588 pathOffset += 13; | |
| 14589 index = path.indexOf("/creativeFields", pathOffset); | |
| 14590 unittest.expect(index >= 0, unittest.isTrue); | |
| 14591 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 14592 pathOffset = index; | |
| 14593 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 14594 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/creativeFields")); | |
| 14595 pathOffset += 15; | |
| 14596 | |
| 14597 var query = (req.url).query; | |
| 14598 var queryOffset = 0; | |
| 14599 var queryMap = {}; | |
| 14600 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 14601 parseBool(n) { | |
| 14602 if (n == "true") return true; | |
| 14603 if (n == "false") return false; | |
| 14604 if (n == null) return null; | |
| 14605 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 14606 } | |
| 14607 if (query.length > 0) { | |
| 14608 for (var part in query.split("&")) { | |
| 14609 var keyvalue = part.split("="); | |
| 14610 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 14611 } | |
| 14612 } | |
| 14613 | |
| 14614 | |
| 14615 var h = { | |
| 14616 "content-type" : "application/json; charset=utf-8", | |
| 14617 }; | |
| 14618 var resp = convert.JSON.encode(buildCreativeField()); | |
| 14619 return new async.Future.value(stringResponse(200, h, resp)); | |
| 14620 }), true); | |
| 14621 res.insert(arg_request, arg_profileId).then(unittest.expectAsync(((api.Cre
ativeField response) { | |
| 14622 checkCreativeField(response); | |
| 14623 }))); | |
| 14624 }); | |
| 14625 | |
| 14626 unittest.test("method--list", () { | |
| 14627 | |
| 14628 var mock = new HttpServerMock(); | |
| 14629 api.CreativeFieldsResourceApi res = new api.DfareportingApi(mock).creative
Fields; | |
| 14630 var arg_profileId = "foo"; | |
| 14631 var arg_advertiserIds = buildUnnamed401(); | |
| 14632 var arg_ids = buildUnnamed402(); | |
| 14633 var arg_maxResults = 42; | |
| 14634 var arg_pageToken = "foo"; | |
| 14635 var arg_searchString = "foo"; | |
| 14636 var arg_sortField = "foo"; | |
| 14637 var arg_sortOrder = "foo"; | |
| 14638 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 14639 var path = (req.url).path; | |
| 14640 var pathOffset = 0; | |
| 14641 var index; | |
| 14642 var subPart; | |
| 14643 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 14644 pathOffset += 1; | |
| 14645 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 14646 pathOffset += 18; | |
| 14647 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 14648 pathOffset += 13; | |
| 14649 index = path.indexOf("/creativeFields", pathOffset); | |
| 14650 unittest.expect(index >= 0, unittest.isTrue); | |
| 14651 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 14652 pathOffset = index; | |
| 14653 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 14654 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/creativeFields")); | |
| 14655 pathOffset += 15; | |
| 14656 | |
| 14657 var query = (req.url).query; | |
| 14658 var queryOffset = 0; | |
| 14659 var queryMap = {}; | |
| 14660 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 14661 parseBool(n) { | |
| 14662 if (n == "true") return true; | |
| 14663 if (n == "false") return false; | |
| 14664 if (n == null) return null; | |
| 14665 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 14666 } | |
| 14667 if (query.length > 0) { | |
| 14668 for (var part in query.split("&")) { | |
| 14669 var keyvalue = part.split("="); | |
| 14670 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 14671 } | |
| 14672 } | |
| 14673 unittest.expect(queryMap["advertiserIds"], unittest.equals(arg_advertise
rIds)); | |
| 14674 unittest.expect(queryMap["ids"], unittest.equals(arg_ids)); | |
| 14675 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | |
| 14676 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 14677 unittest.expect(queryMap["searchString"].first, unittest.equals(arg_sear
chString)); | |
| 14678 unittest.expect(queryMap["sortField"].first, unittest.equals(arg_sortFie
ld)); | |
| 14679 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | |
| 14680 | |
| 14681 | |
| 14682 var h = { | |
| 14683 "content-type" : "application/json; charset=utf-8", | |
| 14684 }; | |
| 14685 var resp = convert.JSON.encode(buildCreativeFieldsListResponse()); | |
| 14686 return new async.Future.value(stringResponse(200, h, resp)); | |
| 14687 }), true); | |
| 14688 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) { | |
| 14689 checkCreativeFieldsListResponse(response); | |
| 14690 }))); | |
| 14691 }); | |
| 14692 | |
| 14693 unittest.test("method--patch", () { | |
| 14694 | |
| 14695 var mock = new HttpServerMock(); | |
| 14696 api.CreativeFieldsResourceApi res = new api.DfareportingApi(mock).creative
Fields; | |
| 14697 var arg_request = buildCreativeField(); | |
| 14698 var arg_profileId = "foo"; | |
| 14699 var arg_id = "foo"; | |
| 14700 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 14701 var obj = new api.CreativeField.fromJson(json); | |
| 14702 checkCreativeField(obj); | |
| 14703 | |
| 14704 var path = (req.url).path; | |
| 14705 var pathOffset = 0; | |
| 14706 var index; | |
| 14707 var subPart; | |
| 14708 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 14709 pathOffset += 1; | |
| 14710 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 14711 pathOffset += 18; | |
| 14712 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 14713 pathOffset += 13; | |
| 14714 index = path.indexOf("/creativeFields", pathOffset); | |
| 14715 unittest.expect(index >= 0, unittest.isTrue); | |
| 14716 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 14717 pathOffset = index; | |
| 14718 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 14719 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/creativeFields")); | |
| 14720 pathOffset += 15; | |
| 14721 | |
| 14722 var query = (req.url).query; | |
| 14723 var queryOffset = 0; | |
| 14724 var queryMap = {}; | |
| 14725 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 14726 parseBool(n) { | |
| 14727 if (n == "true") return true; | |
| 14728 if (n == "false") return false; | |
| 14729 if (n == null) return null; | |
| 14730 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 14731 } | |
| 14732 if (query.length > 0) { | |
| 14733 for (var part in query.split("&")) { | |
| 14734 var keyvalue = part.split("="); | |
| 14735 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 14736 } | |
| 14737 } | |
| 14738 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); | |
| 14739 | |
| 14740 | |
| 14741 var h = { | |
| 14742 "content-type" : "application/json; charset=utf-8", | |
| 14743 }; | |
| 14744 var resp = convert.JSON.encode(buildCreativeField()); | |
| 14745 return new async.Future.value(stringResponse(200, h, resp)); | |
| 14746 }), true); | |
| 14747 res.patch(arg_request, arg_profileId, arg_id).then(unittest.expectAsync(((
api.CreativeField response) { | |
| 14748 checkCreativeField(response); | |
| 14749 }))); | |
| 14750 }); | |
| 14751 | |
| 14752 unittest.test("method--update", () { | |
| 14753 | |
| 14754 var mock = new HttpServerMock(); | |
| 14755 api.CreativeFieldsResourceApi res = new api.DfareportingApi(mock).creative
Fields; | |
| 14756 var arg_request = buildCreativeField(); | |
| 14757 var arg_profileId = "foo"; | |
| 14758 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 14759 var obj = new api.CreativeField.fromJson(json); | |
| 14760 checkCreativeField(obj); | |
| 14761 | |
| 14762 var path = (req.url).path; | |
| 14763 var pathOffset = 0; | |
| 14764 var index; | |
| 14765 var subPart; | |
| 14766 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 14767 pathOffset += 1; | |
| 14768 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 14769 pathOffset += 18; | |
| 14770 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 14771 pathOffset += 13; | |
| 14772 index = path.indexOf("/creativeFields", pathOffset); | |
| 14773 unittest.expect(index >= 0, unittest.isTrue); | |
| 14774 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 14775 pathOffset = index; | |
| 14776 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 14777 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/creativeFields")); | |
| 14778 pathOffset += 15; | |
| 14779 | |
| 14780 var query = (req.url).query; | |
| 14781 var queryOffset = 0; | |
| 14782 var queryMap = {}; | |
| 14783 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 14784 parseBool(n) { | |
| 14785 if (n == "true") return true; | |
| 14786 if (n == "false") return false; | |
| 14787 if (n == null) return null; | |
| 14788 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 14789 } | |
| 14790 if (query.length > 0) { | |
| 14791 for (var part in query.split("&")) { | |
| 14792 var keyvalue = part.split("="); | |
| 14793 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 14794 } | |
| 14795 } | |
| 14796 | |
| 14797 | |
| 14798 var h = { | |
| 14799 "content-type" : "application/json; charset=utf-8", | |
| 14800 }; | |
| 14801 var resp = convert.JSON.encode(buildCreativeField()); | |
| 14802 return new async.Future.value(stringResponse(200, h, resp)); | |
| 14803 }), true); | |
| 14804 res.update(arg_request, arg_profileId).then(unittest.expectAsync(((api.Cre
ativeField response) { | |
| 14805 checkCreativeField(response); | |
| 14806 }))); | |
| 14807 }); | |
| 14808 | |
| 14809 }); | |
| 14810 | |
| 14811 | |
| 14812 unittest.group("resource-CreativeGroupsResourceApi", () { | |
| 14813 unittest.test("method--get", () { | |
| 14814 | |
| 14815 var mock = new HttpServerMock(); | |
| 14816 api.CreativeGroupsResourceApi res = new api.DfareportingApi(mock).creative
Groups; | |
| 14817 var arg_profileId = "foo"; | |
| 14818 var arg_id = "foo"; | |
| 14819 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 14820 var path = (req.url).path; | |
| 14821 var pathOffset = 0; | |
| 14822 var index; | |
| 14823 var subPart; | |
| 14824 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 14825 pathOffset += 1; | |
| 14826 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 14827 pathOffset += 18; | |
| 14828 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 14829 pathOffset += 13; | |
| 14830 index = path.indexOf("/creativeGroups/", pathOffset); | |
| 14831 unittest.expect(index >= 0, unittest.isTrue); | |
| 14832 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 14833 pathOffset = index; | |
| 14834 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 14835 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq
uals("/creativeGroups/")); | |
| 14836 pathOffset += 16; | |
| 14837 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 14838 pathOffset = path.length; | |
| 14839 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 14840 | |
| 14841 var query = (req.url).query; | |
| 14842 var queryOffset = 0; | |
| 14843 var queryMap = {}; | |
| 14844 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 14845 parseBool(n) { | |
| 14846 if (n == "true") return true; | |
| 14847 if (n == "false") return false; | |
| 14848 if (n == null) return null; | |
| 14849 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 14850 } | |
| 14851 if (query.length > 0) { | |
| 14852 for (var part in query.split("&")) { | |
| 14853 var keyvalue = part.split("="); | |
| 14854 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 14855 } | |
| 14856 } | |
| 14857 | |
| 14858 | |
| 14859 var h = { | |
| 14860 "content-type" : "application/json; charset=utf-8", | |
| 14861 }; | |
| 14862 var resp = convert.JSON.encode(buildCreativeGroup()); | |
| 14863 return new async.Future.value(stringResponse(200, h, resp)); | |
| 14864 }), true); | |
| 14865 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.CreativeGro
up response) { | |
| 14866 checkCreativeGroup(response); | |
| 14867 }))); | |
| 14868 }); | |
| 14869 | |
| 14870 unittest.test("method--insert", () { | |
| 14871 | |
| 14872 var mock = new HttpServerMock(); | |
| 14873 api.CreativeGroupsResourceApi res = new api.DfareportingApi(mock).creative
Groups; | |
| 14874 var arg_request = buildCreativeGroup(); | |
| 14875 var arg_profileId = "foo"; | |
| 14876 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 14877 var obj = new api.CreativeGroup.fromJson(json); | |
| 14878 checkCreativeGroup(obj); | |
| 14879 | |
| 14880 var path = (req.url).path; | |
| 14881 var pathOffset = 0; | |
| 14882 var index; | |
| 14883 var subPart; | |
| 14884 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 14885 pathOffset += 1; | |
| 14886 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 14887 pathOffset += 18; | |
| 14888 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 14889 pathOffset += 13; | |
| 14890 index = path.indexOf("/creativeGroups", pathOffset); | |
| 14891 unittest.expect(index >= 0, unittest.isTrue); | |
| 14892 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 14893 pathOffset = index; | |
| 14894 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 14895 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/creativeGroups")); | |
| 14896 pathOffset += 15; | |
| 14897 | |
| 14898 var query = (req.url).query; | |
| 14899 var queryOffset = 0; | |
| 14900 var queryMap = {}; | |
| 14901 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 14902 parseBool(n) { | |
| 14903 if (n == "true") return true; | |
| 14904 if (n == "false") return false; | |
| 14905 if (n == null) return null; | |
| 14906 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 14907 } | |
| 14908 if (query.length > 0) { | |
| 14909 for (var part in query.split("&")) { | |
| 14910 var keyvalue = part.split("="); | |
| 14911 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 14912 } | |
| 14913 } | |
| 14914 | |
| 14915 | |
| 14916 var h = { | |
| 14917 "content-type" : "application/json; charset=utf-8", | |
| 14918 }; | |
| 14919 var resp = convert.JSON.encode(buildCreativeGroup()); | |
| 14920 return new async.Future.value(stringResponse(200, h, resp)); | |
| 14921 }), true); | |
| 14922 res.insert(arg_request, arg_profileId).then(unittest.expectAsync(((api.Cre
ativeGroup response) { | |
| 14923 checkCreativeGroup(response); | |
| 14924 }))); | |
| 14925 }); | |
| 14926 | |
| 14927 unittest.test("method--list", () { | |
| 14928 | |
| 14929 var mock = new HttpServerMock(); | |
| 14930 api.CreativeGroupsResourceApi res = new api.DfareportingApi(mock).creative
Groups; | |
| 14931 var arg_profileId = "foo"; | |
| 14932 var arg_advertiserIds = buildUnnamed403(); | |
| 14933 var arg_groupNumber = 42; | |
| 14934 var arg_ids = buildUnnamed404(); | |
| 14935 var arg_maxResults = 42; | |
| 14936 var arg_pageToken = "foo"; | |
| 14937 var arg_searchString = "foo"; | |
| 14938 var arg_sortField = "foo"; | |
| 14939 var arg_sortOrder = "foo"; | |
| 14940 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 14941 var path = (req.url).path; | |
| 14942 var pathOffset = 0; | |
| 14943 var index; | |
| 14944 var subPart; | |
| 14945 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 14946 pathOffset += 1; | |
| 14947 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 14948 pathOffset += 18; | |
| 14949 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 14950 pathOffset += 13; | |
| 14951 index = path.indexOf("/creativeGroups", pathOffset); | |
| 14952 unittest.expect(index >= 0, unittest.isTrue); | |
| 14953 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 14954 pathOffset = index; | |
| 14955 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 14956 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/creativeGroups")); | |
| 14957 pathOffset += 15; | |
| 14958 | |
| 14959 var query = (req.url).query; | |
| 14960 var queryOffset = 0; | |
| 14961 var queryMap = {}; | |
| 14962 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 14963 parseBool(n) { | |
| 14964 if (n == "true") return true; | |
| 14965 if (n == "false") return false; | |
| 14966 if (n == null) return null; | |
| 14967 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 14968 } | |
| 14969 if (query.length > 0) { | |
| 14970 for (var part in query.split("&")) { | |
| 14971 var keyvalue = part.split("="); | |
| 14972 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 14973 } | |
| 14974 } | |
| 14975 unittest.expect(queryMap["advertiserIds"], unittest.equals(arg_advertise
rIds)); | |
| 14976 unittest.expect(core.int.parse(queryMap["groupNumber"].first), unittest.
equals(arg_groupNumber)); | |
| 14977 unittest.expect(queryMap["ids"], unittest.equals(arg_ids)); | |
| 14978 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | |
| 14979 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 14980 unittest.expect(queryMap["searchString"].first, unittest.equals(arg_sear
chString)); | |
| 14981 unittest.expect(queryMap["sortField"].first, unittest.equals(arg_sortFie
ld)); | |
| 14982 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | |
| 14983 | |
| 14984 | |
| 14985 var h = { | |
| 14986 "content-type" : "application/json; charset=utf-8", | |
| 14987 }; | |
| 14988 var resp = convert.JSON.encode(buildCreativeGroupsListResponse()); | |
| 14989 return new async.Future.value(stringResponse(200, h, resp)); | |
| 14990 }), true); | |
| 14991 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) { | |
| 14992 checkCreativeGroupsListResponse(response); | |
| 14993 }))); | |
| 14994 }); | |
| 14995 | |
| 14996 unittest.test("method--patch", () { | |
| 14997 | |
| 14998 var mock = new HttpServerMock(); | |
| 14999 api.CreativeGroupsResourceApi res = new api.DfareportingApi(mock).creative
Groups; | |
| 15000 var arg_request = buildCreativeGroup(); | |
| 15001 var arg_profileId = "foo"; | |
| 15002 var arg_id = "foo"; | |
| 15003 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 15004 var obj = new api.CreativeGroup.fromJson(json); | |
| 15005 checkCreativeGroup(obj); | |
| 15006 | |
| 15007 var path = (req.url).path; | |
| 15008 var pathOffset = 0; | |
| 15009 var index; | |
| 15010 var subPart; | |
| 15011 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 15012 pathOffset += 1; | |
| 15013 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 15014 pathOffset += 18; | |
| 15015 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 15016 pathOffset += 13; | |
| 15017 index = path.indexOf("/creativeGroups", pathOffset); | |
| 15018 unittest.expect(index >= 0, unittest.isTrue); | |
| 15019 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 15020 pathOffset = index; | |
| 15021 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 15022 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/creativeGroups")); | |
| 15023 pathOffset += 15; | |
| 15024 | |
| 15025 var query = (req.url).query; | |
| 15026 var queryOffset = 0; | |
| 15027 var queryMap = {}; | |
| 15028 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 15029 parseBool(n) { | |
| 15030 if (n == "true") return true; | |
| 15031 if (n == "false") return false; | |
| 15032 if (n == null) return null; | |
| 15033 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 15034 } | |
| 15035 if (query.length > 0) { | |
| 15036 for (var part in query.split("&")) { | |
| 15037 var keyvalue = part.split("="); | |
| 15038 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 15039 } | |
| 15040 } | |
| 15041 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); | |
| 15042 | |
| 15043 | |
| 15044 var h = { | |
| 15045 "content-type" : "application/json; charset=utf-8", | |
| 15046 }; | |
| 15047 var resp = convert.JSON.encode(buildCreativeGroup()); | |
| 15048 return new async.Future.value(stringResponse(200, h, resp)); | |
| 15049 }), true); | |
| 15050 res.patch(arg_request, arg_profileId, arg_id).then(unittest.expectAsync(((
api.CreativeGroup response) { | |
| 15051 checkCreativeGroup(response); | |
| 15052 }))); | |
| 15053 }); | |
| 15054 | |
| 15055 unittest.test("method--update", () { | |
| 15056 | |
| 15057 var mock = new HttpServerMock(); | |
| 15058 api.CreativeGroupsResourceApi res = new api.DfareportingApi(mock).creative
Groups; | |
| 15059 var arg_request = buildCreativeGroup(); | |
| 15060 var arg_profileId = "foo"; | |
| 15061 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 15062 var obj = new api.CreativeGroup.fromJson(json); | |
| 15063 checkCreativeGroup(obj); | |
| 15064 | |
| 15065 var path = (req.url).path; | |
| 15066 var pathOffset = 0; | |
| 15067 var index; | |
| 15068 var subPart; | |
| 15069 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 15070 pathOffset += 1; | |
| 15071 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 15072 pathOffset += 18; | |
| 15073 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 15074 pathOffset += 13; | |
| 15075 index = path.indexOf("/creativeGroups", pathOffset); | |
| 15076 unittest.expect(index >= 0, unittest.isTrue); | |
| 15077 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 15078 pathOffset = index; | |
| 15079 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 15080 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/creativeGroups")); | |
| 15081 pathOffset += 15; | |
| 15082 | |
| 15083 var query = (req.url).query; | |
| 15084 var queryOffset = 0; | |
| 15085 var queryMap = {}; | |
| 15086 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 15087 parseBool(n) { | |
| 15088 if (n == "true") return true; | |
| 15089 if (n == "false") return false; | |
| 15090 if (n == null) return null; | |
| 15091 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 15092 } | |
| 15093 if (query.length > 0) { | |
| 15094 for (var part in query.split("&")) { | |
| 15095 var keyvalue = part.split("="); | |
| 15096 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 15097 } | |
| 15098 } | |
| 15099 | |
| 15100 | |
| 15101 var h = { | |
| 15102 "content-type" : "application/json; charset=utf-8", | |
| 15103 }; | |
| 15104 var resp = convert.JSON.encode(buildCreativeGroup()); | |
| 15105 return new async.Future.value(stringResponse(200, h, resp)); | |
| 15106 }), true); | |
| 15107 res.update(arg_request, arg_profileId).then(unittest.expectAsync(((api.Cre
ativeGroup response) { | |
| 15108 checkCreativeGroup(response); | |
| 15109 }))); | |
| 15110 }); | |
| 15111 | |
| 15112 }); | |
| 15113 | |
| 15114 | |
| 15115 unittest.group("resource-CreativesResourceApi", () { | |
| 15116 unittest.test("method--get", () { | |
| 15117 | |
| 15118 var mock = new HttpServerMock(); | |
| 15119 api.CreativesResourceApi res = new api.DfareportingApi(mock).creatives; | |
| 15120 var arg_profileId = "foo"; | |
| 15121 var arg_id = "foo"; | |
| 15122 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 15123 var path = (req.url).path; | |
| 15124 var pathOffset = 0; | |
| 15125 var index; | |
| 15126 var subPart; | |
| 15127 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 15128 pathOffset += 1; | |
| 15129 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 15130 pathOffset += 18; | |
| 15131 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 15132 pathOffset += 13; | |
| 15133 index = path.indexOf("/creatives/", pathOffset); | |
| 15134 unittest.expect(index >= 0, unittest.isTrue); | |
| 15135 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 15136 pathOffset = index; | |
| 15137 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 15138 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("/creatives/")); | |
| 15139 pathOffset += 11; | |
| 15140 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 15141 pathOffset = path.length; | |
| 15142 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 15143 | |
| 15144 var query = (req.url).query; | |
| 15145 var queryOffset = 0; | |
| 15146 var queryMap = {}; | |
| 15147 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 15148 parseBool(n) { | |
| 15149 if (n == "true") return true; | |
| 15150 if (n == "false") return false; | |
| 15151 if (n == null) return null; | |
| 15152 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 15153 } | |
| 15154 if (query.length > 0) { | |
| 15155 for (var part in query.split("&")) { | |
| 15156 var keyvalue = part.split("="); | |
| 15157 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 15158 } | |
| 15159 } | |
| 15160 | |
| 15161 | |
| 15162 var h = { | |
| 15163 "content-type" : "application/json; charset=utf-8", | |
| 15164 }; | |
| 15165 var resp = convert.JSON.encode(buildCreative()); | |
| 15166 return new async.Future.value(stringResponse(200, h, resp)); | |
| 15167 }), true); | |
| 15168 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.Creative re
sponse) { | |
| 15169 checkCreative(response); | |
| 15170 }))); | |
| 15171 }); | |
| 15172 | |
| 15173 unittest.test("method--insert", () { | |
| 15174 | |
| 15175 var mock = new HttpServerMock(); | |
| 15176 api.CreativesResourceApi res = new api.DfareportingApi(mock).creatives; | |
| 15177 var arg_request = buildCreative(); | |
| 15178 var arg_profileId = "foo"; | |
| 15179 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 15180 var obj = new api.Creative.fromJson(json); | |
| 15181 checkCreative(obj); | |
| 15182 | |
| 15183 var path = (req.url).path; | |
| 15184 var pathOffset = 0; | |
| 15185 var index; | |
| 15186 var subPart; | |
| 15187 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 15188 pathOffset += 1; | |
| 15189 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 15190 pathOffset += 18; | |
| 15191 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 15192 pathOffset += 13; | |
| 15193 index = path.indexOf("/creatives", pathOffset); | |
| 15194 unittest.expect(index >= 0, unittest.isTrue); | |
| 15195 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 15196 pathOffset = index; | |
| 15197 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 15198 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/creatives")); | |
| 15199 pathOffset += 10; | |
| 15200 | |
| 15201 var query = (req.url).query; | |
| 15202 var queryOffset = 0; | |
| 15203 var queryMap = {}; | |
| 15204 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 15205 parseBool(n) { | |
| 15206 if (n == "true") return true; | |
| 15207 if (n == "false") return false; | |
| 15208 if (n == null) return null; | |
| 15209 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 15210 } | |
| 15211 if (query.length > 0) { | |
| 15212 for (var part in query.split("&")) { | |
| 15213 var keyvalue = part.split("="); | |
| 15214 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 15215 } | |
| 15216 } | |
| 15217 | |
| 15218 | |
| 15219 var h = { | |
| 15220 "content-type" : "application/json; charset=utf-8", | |
| 15221 }; | |
| 15222 var resp = convert.JSON.encode(buildCreative()); | |
| 15223 return new async.Future.value(stringResponse(200, h, resp)); | |
| 15224 }), true); | |
| 15225 res.insert(arg_request, arg_profileId).then(unittest.expectAsync(((api.Cre
ative response) { | |
| 15226 checkCreative(response); | |
| 15227 }))); | |
| 15228 }); | |
| 15229 | |
| 15230 unittest.test("method--list", () { | |
| 15231 | |
| 15232 var mock = new HttpServerMock(); | |
| 15233 api.CreativesResourceApi res = new api.DfareportingApi(mock).creatives; | |
| 15234 var arg_profileId = "foo"; | |
| 15235 var arg_active = true; | |
| 15236 var arg_advertiserId = "foo"; | |
| 15237 var arg_archived = true; | |
| 15238 var arg_campaignId = "foo"; | |
| 15239 var arg_companionCreativeIds = buildUnnamed405(); | |
| 15240 var arg_creativeFieldIds = buildUnnamed406(); | |
| 15241 var arg_ids = buildUnnamed407(); | |
| 15242 var arg_maxResults = 42; | |
| 15243 var arg_pageToken = "foo"; | |
| 15244 var arg_renderingIds = buildUnnamed408(); | |
| 15245 var arg_searchString = "foo"; | |
| 15246 var arg_sizeIds = buildUnnamed409(); | |
| 15247 var arg_sortField = "foo"; | |
| 15248 var arg_sortOrder = "foo"; | |
| 15249 var arg_studioCreativeId = "foo"; | |
| 15250 var arg_types = buildUnnamed410(); | |
| 15251 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 15252 var path = (req.url).path; | |
| 15253 var pathOffset = 0; | |
| 15254 var index; | |
| 15255 var subPart; | |
| 15256 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 15257 pathOffset += 1; | |
| 15258 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 15259 pathOffset += 18; | |
| 15260 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 15261 pathOffset += 13; | |
| 15262 index = path.indexOf("/creatives", pathOffset); | |
| 15263 unittest.expect(index >= 0, unittest.isTrue); | |
| 15264 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 15265 pathOffset = index; | |
| 15266 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 15267 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/creatives")); | |
| 15268 pathOffset += 10; | |
| 15269 | |
| 15270 var query = (req.url).query; | |
| 15271 var queryOffset = 0; | |
| 15272 var queryMap = {}; | |
| 15273 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 15274 parseBool(n) { | |
| 15275 if (n == "true") return true; | |
| 15276 if (n == "false") return false; | |
| 15277 if (n == null) return null; | |
| 15278 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 15279 } | |
| 15280 if (query.length > 0) { | |
| 15281 for (var part in query.split("&")) { | |
| 15282 var keyvalue = part.split("="); | |
| 15283 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 15284 } | |
| 15285 } | |
| 15286 unittest.expect(queryMap["active"].first, unittest.equals("$arg_active")
); | |
| 15287 unittest.expect(queryMap["advertiserId"].first, unittest.equals(arg_adve
rtiserId)); | |
| 15288 unittest.expect(queryMap["archived"].first, unittest.equals("$arg_archiv
ed")); | |
| 15289 unittest.expect(queryMap["campaignId"].first, unittest.equals(arg_campai
gnId)); | |
| 15290 unittest.expect(queryMap["companionCreativeIds"], unittest.equals(arg_co
mpanionCreativeIds)); | |
| 15291 unittest.expect(queryMap["creativeFieldIds"], unittest.equals(arg_creati
veFieldIds)); | |
| 15292 unittest.expect(queryMap["ids"], unittest.equals(arg_ids)); | |
| 15293 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | |
| 15294 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 15295 unittest.expect(queryMap["renderingIds"], unittest.equals(arg_renderingI
ds)); | |
| 15296 unittest.expect(queryMap["searchString"].first, unittest.equals(arg_sear
chString)); | |
| 15297 unittest.expect(queryMap["sizeIds"], unittest.equals(arg_sizeIds)); | |
| 15298 unittest.expect(queryMap["sortField"].first, unittest.equals(arg_sortFie
ld)); | |
| 15299 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | |
| 15300 unittest.expect(queryMap["studioCreativeId"].first, unittest.equals(arg_
studioCreativeId)); | |
| 15301 unittest.expect(queryMap["types"], unittest.equals(arg_types)); | |
| 15302 | |
| 15303 | |
| 15304 var h = { | |
| 15305 "content-type" : "application/json; charset=utf-8", | |
| 15306 }; | |
| 15307 var resp = convert.JSON.encode(buildCreativesListResponse()); | |
| 15308 return new async.Future.value(stringResponse(200, h, resp)); | |
| 15309 }), true); | |
| 15310 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) { | |
| 15311 checkCreativesListResponse(response); | |
| 15312 }))); | |
| 15313 }); | |
| 15314 | |
| 15315 unittest.test("method--patch", () { | |
| 15316 | |
| 15317 var mock = new HttpServerMock(); | |
| 15318 api.CreativesResourceApi res = new api.DfareportingApi(mock).creatives; | |
| 15319 var arg_request = buildCreative(); | |
| 15320 var arg_profileId = "foo"; | |
| 15321 var arg_id = "foo"; | |
| 15322 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 15323 var obj = new api.Creative.fromJson(json); | |
| 15324 checkCreative(obj); | |
| 15325 | |
| 15326 var path = (req.url).path; | |
| 15327 var pathOffset = 0; | |
| 15328 var index; | |
| 15329 var subPart; | |
| 15330 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 15331 pathOffset += 1; | |
| 15332 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 15333 pathOffset += 18; | |
| 15334 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 15335 pathOffset += 13; | |
| 15336 index = path.indexOf("/creatives", pathOffset); | |
| 15337 unittest.expect(index >= 0, unittest.isTrue); | |
| 15338 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 15339 pathOffset = index; | |
| 15340 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 15341 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/creatives")); | |
| 15342 pathOffset += 10; | |
| 15343 | |
| 15344 var query = (req.url).query; | |
| 15345 var queryOffset = 0; | |
| 15346 var queryMap = {}; | |
| 15347 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 15348 parseBool(n) { | |
| 15349 if (n == "true") return true; | |
| 15350 if (n == "false") return false; | |
| 15351 if (n == null) return null; | |
| 15352 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 15353 } | |
| 15354 if (query.length > 0) { | |
| 15355 for (var part in query.split("&")) { | |
| 15356 var keyvalue = part.split("="); | |
| 15357 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 15358 } | |
| 15359 } | |
| 15360 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); | |
| 15361 | |
| 15362 | |
| 15363 var h = { | |
| 15364 "content-type" : "application/json; charset=utf-8", | |
| 15365 }; | |
| 15366 var resp = convert.JSON.encode(buildCreative()); | |
| 15367 return new async.Future.value(stringResponse(200, h, resp)); | |
| 15368 }), true); | |
| 15369 res.patch(arg_request, arg_profileId, arg_id).then(unittest.expectAsync(((
api.Creative response) { | |
| 15370 checkCreative(response); | |
| 15371 }))); | |
| 15372 }); | |
| 15373 | |
| 15374 unittest.test("method--update", () { | |
| 15375 | |
| 15376 var mock = new HttpServerMock(); | |
| 15377 api.CreativesResourceApi res = new api.DfareportingApi(mock).creatives; | |
| 15378 var arg_request = buildCreative(); | |
| 15379 var arg_profileId = "foo"; | |
| 15380 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 15381 var obj = new api.Creative.fromJson(json); | |
| 15382 checkCreative(obj); | |
| 15383 | |
| 15384 var path = (req.url).path; | |
| 15385 var pathOffset = 0; | |
| 15386 var index; | |
| 15387 var subPart; | |
| 15388 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 15389 pathOffset += 1; | |
| 15390 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 15391 pathOffset += 18; | |
| 15392 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 15393 pathOffset += 13; | |
| 15394 index = path.indexOf("/creatives", pathOffset); | |
| 15395 unittest.expect(index >= 0, unittest.isTrue); | |
| 15396 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 15397 pathOffset = index; | |
| 15398 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 15399 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/creatives")); | |
| 15400 pathOffset += 10; | |
| 15401 | |
| 15402 var query = (req.url).query; | |
| 15403 var queryOffset = 0; | |
| 15404 var queryMap = {}; | |
| 15405 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 15406 parseBool(n) { | |
| 15407 if (n == "true") return true; | |
| 15408 if (n == "false") return false; | |
| 15409 if (n == null) return null; | |
| 15410 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 15411 } | |
| 15412 if (query.length > 0) { | |
| 15413 for (var part in query.split("&")) { | |
| 15414 var keyvalue = part.split("="); | |
| 15415 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 15416 } | |
| 15417 } | |
| 15418 | |
| 15419 | |
| 15420 var h = { | |
| 15421 "content-type" : "application/json; charset=utf-8", | |
| 15422 }; | |
| 15423 var resp = convert.JSON.encode(buildCreative()); | |
| 15424 return new async.Future.value(stringResponse(200, h, resp)); | |
| 15425 }), true); | |
| 15426 res.update(arg_request, arg_profileId).then(unittest.expectAsync(((api.Cre
ative response) { | |
| 15427 checkCreative(response); | |
| 15428 }))); | |
| 15429 }); | |
| 15430 | |
| 15431 }); | |
| 15432 | |
| 15433 | |
| 15434 unittest.group("resource-DimensionValuesResourceApi", () { | |
| 15435 unittest.test("method--query", () { | |
| 15436 | |
| 15437 var mock = new HttpServerMock(); | |
| 15438 api.DimensionValuesResourceApi res = new api.DfareportingApi(mock).dimensi
onValues; | |
| 15439 var arg_request = buildDimensionValueRequest(); | |
| 15440 var arg_profileId = "foo"; | |
| 15441 var arg_maxResults = 42; | |
| 15442 var arg_pageToken = "foo"; | |
| 15443 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 15444 var obj = new api.DimensionValueRequest.fromJson(json); | |
| 15445 checkDimensionValueRequest(obj); | |
| 15446 | |
| 15447 var path = (req.url).path; | |
| 15448 var pathOffset = 0; | |
| 15449 var index; | |
| 15450 var subPart; | |
| 15451 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 15452 pathOffset += 1; | |
| 15453 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 15454 pathOffset += 18; | |
| 15455 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 15456 pathOffset += 13; | |
| 15457 index = path.indexOf("/dimensionvalues/query", pathOffset); | |
| 15458 unittest.expect(index >= 0, unittest.isTrue); | |
| 15459 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 15460 pathOffset = index; | |
| 15461 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 15462 unittest.expect(path.substring(pathOffset, pathOffset + 22), unittest.eq
uals("/dimensionvalues/query")); | |
| 15463 pathOffset += 22; | |
| 15464 | |
| 15465 var query = (req.url).query; | |
| 15466 var queryOffset = 0; | |
| 15467 var queryMap = {}; | |
| 15468 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 15469 parseBool(n) { | |
| 15470 if (n == "true") return true; | |
| 15471 if (n == "false") return false; | |
| 15472 if (n == null) return null; | |
| 15473 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 15474 } | |
| 15475 if (query.length > 0) { | |
| 15476 for (var part in query.split("&")) { | |
| 15477 var keyvalue = part.split("="); | |
| 15478 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 15479 } | |
| 15480 } | |
| 15481 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | |
| 15482 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 15483 | |
| 15484 | |
| 15485 var h = { | |
| 15486 "content-type" : "application/json; charset=utf-8", | |
| 15487 }; | |
| 15488 var resp = convert.JSON.encode(buildDimensionValueList()); | |
| 15489 return new async.Future.value(stringResponse(200, h, resp)); | |
| 15490 }), true); | |
| 15491 res.query(arg_request, arg_profileId, maxResults: arg_maxResults, pageToke
n: arg_pageToken).then(unittest.expectAsync(((api.DimensionValueList response) { | |
| 15492 checkDimensionValueList(response); | |
| 15493 }))); | |
| 15494 }); | |
| 15495 | |
| 15496 }); | |
| 15497 | |
| 15498 | |
| 15499 unittest.group("resource-DirectorySiteContactsResourceApi", () { | |
| 15500 unittest.test("method--get", () { | |
| 15501 | |
| 15502 var mock = new HttpServerMock(); | |
| 15503 api.DirectorySiteContactsResourceApi res = new api.DfareportingApi(mock).d
irectorySiteContacts; | |
| 15504 var arg_profileId = "foo"; | |
| 15505 var arg_id = "foo"; | |
| 15506 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 15507 var path = (req.url).path; | |
| 15508 var pathOffset = 0; | |
| 15509 var index; | |
| 15510 var subPart; | |
| 15511 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 15512 pathOffset += 1; | |
| 15513 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 15514 pathOffset += 18; | |
| 15515 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 15516 pathOffset += 13; | |
| 15517 index = path.indexOf("/directorySiteContacts/", pathOffset); | |
| 15518 unittest.expect(index >= 0, unittest.isTrue); | |
| 15519 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 15520 pathOffset = index; | |
| 15521 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 15522 unittest.expect(path.substring(pathOffset, pathOffset + 23), unittest.eq
uals("/directorySiteContacts/")); | |
| 15523 pathOffset += 23; | |
| 15524 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 15525 pathOffset = path.length; | |
| 15526 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 15527 | |
| 15528 var query = (req.url).query; | |
| 15529 var queryOffset = 0; | |
| 15530 var queryMap = {}; | |
| 15531 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 15532 parseBool(n) { | |
| 15533 if (n == "true") return true; | |
| 15534 if (n == "false") return false; | |
| 15535 if (n == null) return null; | |
| 15536 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 15537 } | |
| 15538 if (query.length > 0) { | |
| 15539 for (var part in query.split("&")) { | |
| 15540 var keyvalue = part.split("="); | |
| 15541 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 15542 } | |
| 15543 } | |
| 15544 | |
| 15545 | |
| 15546 var h = { | |
| 15547 "content-type" : "application/json; charset=utf-8", | |
| 15548 }; | |
| 15549 var resp = convert.JSON.encode(buildDirectorySiteContact()); | |
| 15550 return new async.Future.value(stringResponse(200, h, resp)); | |
| 15551 }), true); | |
| 15552 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.DirectorySi
teContact response) { | |
| 15553 checkDirectorySiteContact(response); | |
| 15554 }))); | |
| 15555 }); | |
| 15556 | |
| 15557 unittest.test("method--list", () { | |
| 15558 | |
| 15559 var mock = new HttpServerMock(); | |
| 15560 api.DirectorySiteContactsResourceApi res = new api.DfareportingApi(mock).d
irectorySiteContacts; | |
| 15561 var arg_profileId = "foo"; | |
| 15562 var arg_directorySiteIds = buildUnnamed411(); | |
| 15563 var arg_ids = buildUnnamed412(); | |
| 15564 var arg_maxResults = 42; | |
| 15565 var arg_pageToken = "foo"; | |
| 15566 var arg_searchString = "foo"; | |
| 15567 var arg_sortField = "foo"; | |
| 15568 var arg_sortOrder = "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.4/")); | |
| 15577 pathOffset += 18; | |
| 15578 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 15579 pathOffset += 13; | |
| 15580 index = path.indexOf("/directorySiteContacts", 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 + 22), unittest.eq
uals("/directorySiteContacts")); | |
| 15586 pathOffset += 22; | |
| 15587 | |
| 15588 var query = (req.url).query; | |
| 15589 var queryOffset = 0; | |
| 15590 var queryMap = {}; | |
| 15591 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 15592 parseBool(n) { | |
| 15593 if (n == "true") return true; | |
| 15594 if (n == "false") return false; | |
| 15595 if (n == null) return null; | |
| 15596 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 15597 } | |
| 15598 if (query.length > 0) { | |
| 15599 for (var part in query.split("&")) { | |
| 15600 var keyvalue = part.split("="); | |
| 15601 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 15602 } | |
| 15603 } | |
| 15604 unittest.expect(queryMap["directorySiteIds"], unittest.equals(arg_direct
orySiteIds)); | |
| 15605 unittest.expect(queryMap["ids"], unittest.equals(arg_ids)); | |
| 15606 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | |
| 15607 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 15608 unittest.expect(queryMap["searchString"].first, unittest.equals(arg_sear
chString)); | |
| 15609 unittest.expect(queryMap["sortField"].first, unittest.equals(arg_sortFie
ld)); | |
| 15610 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | |
| 15611 | |
| 15612 | |
| 15613 var h = { | |
| 15614 "content-type" : "application/json; charset=utf-8", | |
| 15615 }; | |
| 15616 var resp = convert.JSON.encode(buildDirectorySiteContactsListResponse())
; | |
| 15617 return new async.Future.value(stringResponse(200, h, resp)); | |
| 15618 }), true); | |
| 15619 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) { | |
| 15620 checkDirectorySiteContactsListResponse(response); | |
| 15621 }))); | |
| 15622 }); | |
| 15623 | |
| 15624 }); | |
| 15625 | |
| 15626 | |
| 15627 unittest.group("resource-DirectorySitesResourceApi", () { | |
| 15628 unittest.test("method--get", () { | |
| 15629 | |
| 15630 var mock = new HttpServerMock(); | |
| 15631 api.DirectorySitesResourceApi res = new api.DfareportingApi(mock).director
ySites; | |
| 15632 var arg_profileId = "foo"; | |
| 15633 var arg_id = "foo"; | |
| 15634 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 15635 var path = (req.url).path; | |
| 15636 var pathOffset = 0; | |
| 15637 var index; | |
| 15638 var subPart; | |
| 15639 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 15640 pathOffset += 1; | |
| 15641 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 15642 pathOffset += 18; | |
| 15643 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 15644 pathOffset += 13; | |
| 15645 index = path.indexOf("/directorySites/", pathOffset); | |
| 15646 unittest.expect(index >= 0, unittest.isTrue); | |
| 15647 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 15648 pathOffset = index; | |
| 15649 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 15650 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq
uals("/directorySites/")); | |
| 15651 pathOffset += 16; | |
| 15652 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 15653 pathOffset = path.length; | |
| 15654 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 15655 | |
| 15656 var query = (req.url).query; | |
| 15657 var queryOffset = 0; | |
| 15658 var queryMap = {}; | |
| 15659 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 15660 parseBool(n) { | |
| 15661 if (n == "true") return true; | |
| 15662 if (n == "false") return false; | |
| 15663 if (n == null) return null; | |
| 15664 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 15665 } | |
| 15666 if (query.length > 0) { | |
| 15667 for (var part in query.split("&")) { | |
| 15668 var keyvalue = part.split("="); | |
| 15669 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 15670 } | |
| 15671 } | |
| 15672 | |
| 15673 | |
| 15674 var h = { | |
| 15675 "content-type" : "application/json; charset=utf-8", | |
| 15676 }; | |
| 15677 var resp = convert.JSON.encode(buildDirectorySite()); | |
| 15678 return new async.Future.value(stringResponse(200, h, resp)); | |
| 15679 }), true); | |
| 15680 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.DirectorySi
te response) { | |
| 15681 checkDirectorySite(response); | |
| 15682 }))); | |
| 15683 }); | |
| 15684 | |
| 15685 unittest.test("method--insert", () { | |
| 15686 | |
| 15687 var mock = new HttpServerMock(); | |
| 15688 api.DirectorySitesResourceApi res = new api.DfareportingApi(mock).director
ySites; | |
| 15689 var arg_request = buildDirectorySite(); | |
| 15690 var arg_profileId = "foo"; | |
| 15691 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 15692 var obj = new api.DirectorySite.fromJson(json); | |
| 15693 checkDirectorySite(obj); | |
| 15694 | |
| 15695 var path = (req.url).path; | |
| 15696 var pathOffset = 0; | |
| 15697 var index; | |
| 15698 var subPart; | |
| 15699 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 15700 pathOffset += 1; | |
| 15701 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 15702 pathOffset += 18; | |
| 15703 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 15704 pathOffset += 13; | |
| 15705 index = path.indexOf("/directorySites", pathOffset); | |
| 15706 unittest.expect(index >= 0, unittest.isTrue); | |
| 15707 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 15708 pathOffset = index; | |
| 15709 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 15710 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/directorySites")); | |
| 15711 pathOffset += 15; | |
| 15712 | |
| 15713 var query = (req.url).query; | |
| 15714 var queryOffset = 0; | |
| 15715 var queryMap = {}; | |
| 15716 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 15717 parseBool(n) { | |
| 15718 if (n == "true") return true; | |
| 15719 if (n == "false") return false; | |
| 15720 if (n == null) return null; | |
| 15721 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 15722 } | |
| 15723 if (query.length > 0) { | |
| 15724 for (var part in query.split("&")) { | |
| 15725 var keyvalue = part.split("="); | |
| 15726 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 15727 } | |
| 15728 } | |
| 15729 | |
| 15730 | |
| 15731 var h = { | |
| 15732 "content-type" : "application/json; charset=utf-8", | |
| 15733 }; | |
| 15734 var resp = convert.JSON.encode(buildDirectorySite()); | |
| 15735 return new async.Future.value(stringResponse(200, h, resp)); | |
| 15736 }), true); | |
| 15737 res.insert(arg_request, arg_profileId).then(unittest.expectAsync(((api.Dir
ectorySite response) { | |
| 15738 checkDirectorySite(response); | |
| 15739 }))); | |
| 15740 }); | |
| 15741 | |
| 15742 unittest.test("method--list", () { | |
| 15743 | |
| 15744 var mock = new HttpServerMock(); | |
| 15745 api.DirectorySitesResourceApi res = new api.DfareportingApi(mock).director
ySites; | |
| 15746 var arg_profileId = "foo"; | |
| 15747 var arg_acceptsInStreamVideoPlacements = true; | |
| 15748 var arg_acceptsInterstitialPlacements = true; | |
| 15749 var arg_acceptsPublisherPaidPlacements = true; | |
| 15750 var arg_active = true; | |
| 15751 var arg_countryId = "foo"; | |
| 15752 var arg_dfpNetworkCode = "foo"; | |
| 15753 var arg_ids = buildUnnamed413(); | |
| 15754 var arg_maxResults = 42; | |
| 15755 var arg_pageToken = "foo"; | |
| 15756 var arg_parentId = "foo"; | |
| 15757 var arg_searchString = "foo"; | |
| 15758 var arg_sortField = "foo"; | |
| 15759 var arg_sortOrder = "foo"; | |
| 15760 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 15761 var path = (req.url).path; | |
| 15762 var pathOffset = 0; | |
| 15763 var index; | |
| 15764 var subPart; | |
| 15765 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 15766 pathOffset += 1; | |
| 15767 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 15768 pathOffset += 18; | |
| 15769 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 15770 pathOffset += 13; | |
| 15771 index = path.indexOf("/directorySites", pathOffset); | |
| 15772 unittest.expect(index >= 0, unittest.isTrue); | |
| 15773 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 15774 pathOffset = index; | |
| 15775 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 15776 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/directorySites")); | |
| 15777 pathOffset += 15; | |
| 15778 | |
| 15779 var query = (req.url).query; | |
| 15780 var queryOffset = 0; | |
| 15781 var queryMap = {}; | |
| 15782 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 15783 parseBool(n) { | |
| 15784 if (n == "true") return true; | |
| 15785 if (n == "false") return false; | |
| 15786 if (n == null) return null; | |
| 15787 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 15788 } | |
| 15789 if (query.length > 0) { | |
| 15790 for (var part in query.split("&")) { | |
| 15791 var keyvalue = part.split("="); | |
| 15792 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 15793 } | |
| 15794 } | |
| 15795 unittest.expect(queryMap["acceptsInStreamVideoPlacements"].first, unitte
st.equals("$arg_acceptsInStreamVideoPlacements")); | |
| 15796 unittest.expect(queryMap["acceptsInterstitialPlacements"].first, unittes
t.equals("$arg_acceptsInterstitialPlacements")); | |
| 15797 unittest.expect(queryMap["acceptsPublisherPaidPlacements"].first, unitte
st.equals("$arg_acceptsPublisherPaidPlacements")); | |
| 15798 unittest.expect(queryMap["active"].first, unittest.equals("$arg_active")
); | |
| 15799 unittest.expect(queryMap["countryId"].first, unittest.equals(arg_country
Id)); | |
| 15800 unittest.expect(queryMap["dfp_network_code"].first, unittest.equals(arg_
dfpNetworkCode)); | |
| 15801 unittest.expect(queryMap["ids"], unittest.equals(arg_ids)); | |
| 15802 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | |
| 15803 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 15804 unittest.expect(queryMap["parentId"].first, unittest.equals(arg_parentId
)); | |
| 15805 unittest.expect(queryMap["searchString"].first, unittest.equals(arg_sear
chString)); | |
| 15806 unittest.expect(queryMap["sortField"].first, unittest.equals(arg_sortFie
ld)); | |
| 15807 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | |
| 15808 | |
| 15809 | |
| 15810 var h = { | |
| 15811 "content-type" : "application/json; charset=utf-8", | |
| 15812 }; | |
| 15813 var resp = convert.JSON.encode(buildDirectorySitesListResponse()); | |
| 15814 return new async.Future.value(stringResponse(200, h, resp)); | |
| 15815 }), true); | |
| 15816 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) { | |
| 15817 checkDirectorySitesListResponse(response); | |
| 15818 }))); | |
| 15819 }); | |
| 15820 | |
| 15821 }); | |
| 15822 | |
| 15823 | |
| 15824 unittest.group("resource-EventTagsResourceApi", () { | |
| 15825 unittest.test("method--delete", () { | |
| 15826 | |
| 15827 var mock = new HttpServerMock(); | |
| 15828 api.EventTagsResourceApi res = new api.DfareportingApi(mock).eventTags; | |
| 15829 var arg_profileId = "foo"; | |
| 15830 var arg_id = "foo"; | |
| 15831 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 15832 var path = (req.url).path; | |
| 15833 var pathOffset = 0; | |
| 15834 var index; | |
| 15835 var subPart; | |
| 15836 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 15837 pathOffset += 1; | |
| 15838 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 15839 pathOffset += 18; | |
| 15840 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 15841 pathOffset += 13; | |
| 15842 index = path.indexOf("/eventTags/", pathOffset); | |
| 15843 unittest.expect(index >= 0, unittest.isTrue); | |
| 15844 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 15845 pathOffset = index; | |
| 15846 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 15847 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("/eventTags/")); | |
| 15848 pathOffset += 11; | |
| 15849 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 15850 pathOffset = path.length; | |
| 15851 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 15852 | |
| 15853 var query = (req.url).query; | |
| 15854 var queryOffset = 0; | |
| 15855 var queryMap = {}; | |
| 15856 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 15857 parseBool(n) { | |
| 15858 if (n == "true") return true; | |
| 15859 if (n == "false") return false; | |
| 15860 if (n == null) return null; | |
| 15861 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 15862 } | |
| 15863 if (query.length > 0) { | |
| 15864 for (var part in query.split("&")) { | |
| 15865 var keyvalue = part.split("="); | |
| 15866 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 15867 } | |
| 15868 } | |
| 15869 | |
| 15870 | |
| 15871 var h = { | |
| 15872 "content-type" : "application/json; charset=utf-8", | |
| 15873 }; | |
| 15874 var resp = ""; | |
| 15875 return new async.Future.value(stringResponse(200, h, resp)); | |
| 15876 }), true); | |
| 15877 res.delete(arg_profileId, arg_id).then(unittest.expectAsync((_) {})); | |
| 15878 }); | |
| 15879 | |
| 15880 unittest.test("method--get", () { | |
| 15881 | |
| 15882 var mock = new HttpServerMock(); | |
| 15883 api.EventTagsResourceApi res = new api.DfareportingApi(mock).eventTags; | |
| 15884 var arg_profileId = "foo"; | |
| 15885 var arg_id = "foo"; | |
| 15886 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 15887 var path = (req.url).path; | |
| 15888 var pathOffset = 0; | |
| 15889 var index; | |
| 15890 var subPart; | |
| 15891 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 15892 pathOffset += 1; | |
| 15893 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 15894 pathOffset += 18; | |
| 15895 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 15896 pathOffset += 13; | |
| 15897 index = path.indexOf("/eventTags/", pathOffset); | |
| 15898 unittest.expect(index >= 0, unittest.isTrue); | |
| 15899 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 15900 pathOffset = index; | |
| 15901 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 15902 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("/eventTags/")); | |
| 15903 pathOffset += 11; | |
| 15904 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 15905 pathOffset = path.length; | |
| 15906 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 15907 | |
| 15908 var query = (req.url).query; | |
| 15909 var queryOffset = 0; | |
| 15910 var queryMap = {}; | |
| 15911 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 15912 parseBool(n) { | |
| 15913 if (n == "true") return true; | |
| 15914 if (n == "false") return false; | |
| 15915 if (n == null) return null; | |
| 15916 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 15917 } | |
| 15918 if (query.length > 0) { | |
| 15919 for (var part in query.split("&")) { | |
| 15920 var keyvalue = part.split("="); | |
| 15921 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 15922 } | |
| 15923 } | |
| 15924 | |
| 15925 | |
| 15926 var h = { | |
| 15927 "content-type" : "application/json; charset=utf-8", | |
| 15928 }; | |
| 15929 var resp = convert.JSON.encode(buildEventTag()); | |
| 15930 return new async.Future.value(stringResponse(200, h, resp)); | |
| 15931 }), true); | |
| 15932 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.EventTag re
sponse) { | |
| 15933 checkEventTag(response); | |
| 15934 }))); | |
| 15935 }); | |
| 15936 | |
| 15937 unittest.test("method--insert", () { | |
| 15938 | |
| 15939 var mock = new HttpServerMock(); | |
| 15940 api.EventTagsResourceApi res = new api.DfareportingApi(mock).eventTags; | |
| 15941 var arg_request = buildEventTag(); | |
| 15942 var arg_profileId = "foo"; | |
| 15943 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 15944 var obj = new api.EventTag.fromJson(json); | |
| 15945 checkEventTag(obj); | |
| 15946 | |
| 15947 var path = (req.url).path; | |
| 15948 var pathOffset = 0; | |
| 15949 var index; | |
| 15950 var subPart; | |
| 15951 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 15952 pathOffset += 1; | |
| 15953 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 15954 pathOffset += 18; | |
| 15955 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 15956 pathOffset += 13; | |
| 15957 index = path.indexOf("/eventTags", pathOffset); | |
| 15958 unittest.expect(index >= 0, unittest.isTrue); | |
| 15959 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 15960 pathOffset = index; | |
| 15961 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 15962 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/eventTags")); | |
| 15963 pathOffset += 10; | |
| 15964 | |
| 15965 var query = (req.url).query; | |
| 15966 var queryOffset = 0; | |
| 15967 var queryMap = {}; | |
| 15968 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 15969 parseBool(n) { | |
| 15970 if (n == "true") return true; | |
| 15971 if (n == "false") return false; | |
| 15972 if (n == null) return null; | |
| 15973 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 15974 } | |
| 15975 if (query.length > 0) { | |
| 15976 for (var part in query.split("&")) { | |
| 15977 var keyvalue = part.split("="); | |
| 15978 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 15979 } | |
| 15980 } | |
| 15981 | |
| 15982 | |
| 15983 var h = { | |
| 15984 "content-type" : "application/json; charset=utf-8", | |
| 15985 }; | |
| 15986 var resp = convert.JSON.encode(buildEventTag()); | |
| 15987 return new async.Future.value(stringResponse(200, h, resp)); | |
| 15988 }), true); | |
| 15989 res.insert(arg_request, arg_profileId).then(unittest.expectAsync(((api.Eve
ntTag response) { | |
| 15990 checkEventTag(response); | |
| 15991 }))); | |
| 15992 }); | |
| 15993 | |
| 15994 unittest.test("method--list", () { | |
| 15995 | |
| 15996 var mock = new HttpServerMock(); | |
| 15997 api.EventTagsResourceApi res = new api.DfareportingApi(mock).eventTags; | |
| 15998 var arg_profileId = "foo"; | |
| 15999 var arg_adId = "foo"; | |
| 16000 var arg_advertiserId = "foo"; | |
| 16001 var arg_campaignId = "foo"; | |
| 16002 var arg_definitionsOnly = true; | |
| 16003 var arg_enabled = true; | |
| 16004 var arg_eventTagTypes = buildUnnamed414(); | |
| 16005 var arg_ids = buildUnnamed415(); | |
| 16006 var arg_searchString = "foo"; | |
| 16007 var arg_sortField = "foo"; | |
| 16008 var arg_sortOrder = "foo"; | |
| 16009 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 16010 var path = (req.url).path; | |
| 16011 var pathOffset = 0; | |
| 16012 var index; | |
| 16013 var subPart; | |
| 16014 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 16015 pathOffset += 1; | |
| 16016 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 16017 pathOffset += 18; | |
| 16018 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 16019 pathOffset += 13; | |
| 16020 index = path.indexOf("/eventTags", pathOffset); | |
| 16021 unittest.expect(index >= 0, unittest.isTrue); | |
| 16022 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 16023 pathOffset = index; | |
| 16024 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 16025 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/eventTags")); | |
| 16026 pathOffset += 10; | |
| 16027 | |
| 16028 var query = (req.url).query; | |
| 16029 var queryOffset = 0; | |
| 16030 var queryMap = {}; | |
| 16031 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 16032 parseBool(n) { | |
| 16033 if (n == "true") return true; | |
| 16034 if (n == "false") return false; | |
| 16035 if (n == null) return null; | |
| 16036 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 16037 } | |
| 16038 if (query.length > 0) { | |
| 16039 for (var part in query.split("&")) { | |
| 16040 var keyvalue = part.split("="); | |
| 16041 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 16042 } | |
| 16043 } | |
| 16044 unittest.expect(queryMap["adId"].first, unittest.equals(arg_adId)); | |
| 16045 unittest.expect(queryMap["advertiserId"].first, unittest.equals(arg_adve
rtiserId)); | |
| 16046 unittest.expect(queryMap["campaignId"].first, unittest.equals(arg_campai
gnId)); | |
| 16047 unittest.expect(queryMap["definitionsOnly"].first, unittest.equals("$arg
_definitionsOnly")); | |
| 16048 unittest.expect(queryMap["enabled"].first, unittest.equals("$arg_enabled
")); | |
| 16049 unittest.expect(queryMap["eventTagTypes"], unittest.equals(arg_eventTagT
ypes)); | |
| 16050 unittest.expect(queryMap["ids"], unittest.equals(arg_ids)); | |
| 16051 unittest.expect(queryMap["searchString"].first, unittest.equals(arg_sear
chString)); | |
| 16052 unittest.expect(queryMap["sortField"].first, unittest.equals(arg_sortFie
ld)); | |
| 16053 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | |
| 16054 | |
| 16055 | |
| 16056 var h = { | |
| 16057 "content-type" : "application/json; charset=utf-8", | |
| 16058 }; | |
| 16059 var resp = convert.JSON.encode(buildEventTagsListResponse()); | |
| 16060 return new async.Future.value(stringResponse(200, h, resp)); | |
| 16061 }), true); | |
| 16062 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) { | |
| 16063 checkEventTagsListResponse(response); | |
| 16064 }))); | |
| 16065 }); | |
| 16066 | |
| 16067 unittest.test("method--patch", () { | |
| 16068 | |
| 16069 var mock = new HttpServerMock(); | |
| 16070 api.EventTagsResourceApi res = new api.DfareportingApi(mock).eventTags; | |
| 16071 var arg_request = buildEventTag(); | |
| 16072 var arg_profileId = "foo"; | |
| 16073 var arg_id = "foo"; | |
| 16074 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 16075 var obj = new api.EventTag.fromJson(json); | |
| 16076 checkEventTag(obj); | |
| 16077 | |
| 16078 var path = (req.url).path; | |
| 16079 var pathOffset = 0; | |
| 16080 var index; | |
| 16081 var subPart; | |
| 16082 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 16083 pathOffset += 1; | |
| 16084 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 16085 pathOffset += 18; | |
| 16086 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 16087 pathOffset += 13; | |
| 16088 index = path.indexOf("/eventTags", pathOffset); | |
| 16089 unittest.expect(index >= 0, unittest.isTrue); | |
| 16090 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 16091 pathOffset = index; | |
| 16092 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 16093 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/eventTags")); | |
| 16094 pathOffset += 10; | |
| 16095 | |
| 16096 var query = (req.url).query; | |
| 16097 var queryOffset = 0; | |
| 16098 var queryMap = {}; | |
| 16099 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 16100 parseBool(n) { | |
| 16101 if (n == "true") return true; | |
| 16102 if (n == "false") return false; | |
| 16103 if (n == null) return null; | |
| 16104 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 16105 } | |
| 16106 if (query.length > 0) { | |
| 16107 for (var part in query.split("&")) { | |
| 16108 var keyvalue = part.split("="); | |
| 16109 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 16110 } | |
| 16111 } | |
| 16112 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); | |
| 16113 | |
| 16114 | |
| 16115 var h = { | |
| 16116 "content-type" : "application/json; charset=utf-8", | |
| 16117 }; | |
| 16118 var resp = convert.JSON.encode(buildEventTag()); | |
| 16119 return new async.Future.value(stringResponse(200, h, resp)); | |
| 16120 }), true); | |
| 16121 res.patch(arg_request, arg_profileId, arg_id).then(unittest.expectAsync(((
api.EventTag response) { | |
| 16122 checkEventTag(response); | |
| 16123 }))); | |
| 16124 }); | |
| 16125 | |
| 16126 unittest.test("method--update", () { | |
| 16127 | |
| 16128 var mock = new HttpServerMock(); | |
| 16129 api.EventTagsResourceApi res = new api.DfareportingApi(mock).eventTags; | |
| 16130 var arg_request = buildEventTag(); | |
| 16131 var arg_profileId = "foo"; | |
| 16132 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 16133 var obj = new api.EventTag.fromJson(json); | |
| 16134 checkEventTag(obj); | |
| 16135 | |
| 16136 var path = (req.url).path; | |
| 16137 var pathOffset = 0; | |
| 16138 var index; | |
| 16139 var subPart; | |
| 16140 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 16141 pathOffset += 1; | |
| 16142 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 16143 pathOffset += 18; | |
| 16144 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 16145 pathOffset += 13; | |
| 16146 index = path.indexOf("/eventTags", pathOffset); | |
| 16147 unittest.expect(index >= 0, unittest.isTrue); | |
| 16148 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 16149 pathOffset = index; | |
| 16150 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 16151 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/eventTags")); | |
| 16152 pathOffset += 10; | |
| 16153 | |
| 16154 var query = (req.url).query; | |
| 16155 var queryOffset = 0; | |
| 16156 var queryMap = {}; | |
| 16157 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 16158 parseBool(n) { | |
| 16159 if (n == "true") return true; | |
| 16160 if (n == "false") return false; | |
| 16161 if (n == null) return null; | |
| 16162 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 16163 } | |
| 16164 if (query.length > 0) { | |
| 16165 for (var part in query.split("&")) { | |
| 16166 var keyvalue = part.split("="); | |
| 16167 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 16168 } | |
| 16169 } | |
| 16170 | |
| 16171 | |
| 16172 var h = { | |
| 16173 "content-type" : "application/json; charset=utf-8", | |
| 16174 }; | |
| 16175 var resp = convert.JSON.encode(buildEventTag()); | |
| 16176 return new async.Future.value(stringResponse(200, h, resp)); | |
| 16177 }), true); | |
| 16178 res.update(arg_request, arg_profileId).then(unittest.expectAsync(((api.Eve
ntTag response) { | |
| 16179 checkEventTag(response); | |
| 16180 }))); | |
| 16181 }); | |
| 16182 | |
| 16183 }); | |
| 16184 | |
| 16185 | |
| 16186 unittest.group("resource-FilesResourceApi", () { | |
| 16187 unittest.test("method--get", () { | |
| 16188 // TODO: Implement tests for media upload; | |
| 16189 // TODO: Implement tests for media download; | |
| 16190 | |
| 16191 var mock = new HttpServerMock(); | |
| 16192 api.FilesResourceApi res = new api.DfareportingApi(mock).files; | |
| 16193 var arg_reportId = "foo"; | |
| 16194 var arg_fileId = "foo"; | |
| 16195 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 16196 var path = (req.url).path; | |
| 16197 var pathOffset = 0; | |
| 16198 var index; | |
| 16199 var subPart; | |
| 16200 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 16201 pathOffset += 1; | |
| 16202 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 16203 pathOffset += 18; | |
| 16204 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("reports/")); | |
| 16205 pathOffset += 8; | |
| 16206 index = path.indexOf("/files/", pathOffset); | |
| 16207 unittest.expect(index >= 0, unittest.isTrue); | |
| 16208 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 16209 pathOffset = index; | |
| 16210 unittest.expect(subPart, unittest.equals("$arg_reportId")); | |
| 16211 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ
als("/files/")); | |
| 16212 pathOffset += 7; | |
| 16213 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 16214 pathOffset = path.length; | |
| 16215 unittest.expect(subPart, unittest.equals("$arg_fileId")); | |
| 16216 | |
| 16217 var query = (req.url).query; | |
| 16218 var queryOffset = 0; | |
| 16219 var queryMap = {}; | |
| 16220 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 16221 parseBool(n) { | |
| 16222 if (n == "true") return true; | |
| 16223 if (n == "false") return false; | |
| 16224 if (n == null) return null; | |
| 16225 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 16226 } | |
| 16227 if (query.length > 0) { | |
| 16228 for (var part in query.split("&")) { | |
| 16229 var keyvalue = part.split("="); | |
| 16230 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 16231 } | |
| 16232 } | |
| 16233 | |
| 16234 | |
| 16235 var h = { | |
| 16236 "content-type" : "application/json; charset=utf-8", | |
| 16237 }; | |
| 16238 var resp = convert.JSON.encode(buildFile()); | |
| 16239 return new async.Future.value(stringResponse(200, h, resp)); | |
| 16240 }), true); | |
| 16241 res.get(arg_reportId, arg_fileId).then(unittest.expectAsync(((api.File res
ponse) { | |
| 16242 checkFile(response); | |
| 16243 }))); | |
| 16244 }); | |
| 16245 | |
| 16246 unittest.test("method--list", () { | |
| 16247 | |
| 16248 var mock = new HttpServerMock(); | |
| 16249 api.FilesResourceApi res = new api.DfareportingApi(mock).files; | |
| 16250 var arg_profileId = "foo"; | |
| 16251 var arg_maxResults = 42; | |
| 16252 var arg_pageToken = "foo"; | |
| 16253 var arg_scope = "foo"; | |
| 16254 var arg_sortField = "foo"; | |
| 16255 var arg_sortOrder = "foo"; | |
| 16256 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 16257 var path = (req.url).path; | |
| 16258 var pathOffset = 0; | |
| 16259 var index; | |
| 16260 var subPart; | |
| 16261 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 16262 pathOffset += 1; | |
| 16263 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 16264 pathOffset += 18; | |
| 16265 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 16266 pathOffset += 13; | |
| 16267 index = path.indexOf("/files", pathOffset); | |
| 16268 unittest.expect(index >= 0, unittest.isTrue); | |
| 16269 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 16270 pathOffset = index; | |
| 16271 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 16272 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ
als("/files")); | |
| 16273 pathOffset += 6; | |
| 16274 | |
| 16275 var query = (req.url).query; | |
| 16276 var queryOffset = 0; | |
| 16277 var queryMap = {}; | |
| 16278 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 16279 parseBool(n) { | |
| 16280 if (n == "true") return true; | |
| 16281 if (n == "false") return false; | |
| 16282 if (n == null) return null; | |
| 16283 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 16284 } | |
| 16285 if (query.length > 0) { | |
| 16286 for (var part in query.split("&")) { | |
| 16287 var keyvalue = part.split("="); | |
| 16288 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 16289 } | |
| 16290 } | |
| 16291 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | |
| 16292 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 16293 unittest.expect(queryMap["scope"].first, unittest.equals(arg_scope)); | |
| 16294 unittest.expect(queryMap["sortField"].first, unittest.equals(arg_sortFie
ld)); | |
| 16295 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | |
| 16296 | |
| 16297 | |
| 16298 var h = { | |
| 16299 "content-type" : "application/json; charset=utf-8", | |
| 16300 }; | |
| 16301 var resp = convert.JSON.encode(buildFileList()); | |
| 16302 return new async.Future.value(stringResponse(200, h, resp)); | |
| 16303 }), true); | |
| 16304 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) { | |
| 16305 checkFileList(response); | |
| 16306 }))); | |
| 16307 }); | |
| 16308 | |
| 16309 }); | |
| 16310 | |
| 16311 | |
| 16312 unittest.group("resource-FloodlightActivitiesResourceApi", () { | |
| 16313 unittest.test("method--delete", () { | |
| 16314 | |
| 16315 var mock = new HttpServerMock(); | |
| 16316 api.FloodlightActivitiesResourceApi res = new api.DfareportingApi(mock).fl
oodlightActivities; | |
| 16317 var arg_profileId = "foo"; | |
| 16318 var arg_id = "foo"; | |
| 16319 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 16320 var path = (req.url).path; | |
| 16321 var pathOffset = 0; | |
| 16322 var index; | |
| 16323 var subPart; | |
| 16324 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 16325 pathOffset += 1; | |
| 16326 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 16327 pathOffset += 18; | |
| 16328 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 16329 pathOffset += 13; | |
| 16330 index = path.indexOf("/floodlightActivities/", pathOffset); | |
| 16331 unittest.expect(index >= 0, unittest.isTrue); | |
| 16332 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 16333 pathOffset = index; | |
| 16334 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 16335 unittest.expect(path.substring(pathOffset, pathOffset + 22), unittest.eq
uals("/floodlightActivities/")); | |
| 16336 pathOffset += 22; | |
| 16337 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 16338 pathOffset = path.length; | |
| 16339 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 16340 | |
| 16341 var query = (req.url).query; | |
| 16342 var queryOffset = 0; | |
| 16343 var queryMap = {}; | |
| 16344 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 16345 parseBool(n) { | |
| 16346 if (n == "true") return true; | |
| 16347 if (n == "false") return false; | |
| 16348 if (n == null) return null; | |
| 16349 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 16350 } | |
| 16351 if (query.length > 0) { | |
| 16352 for (var part in query.split("&")) { | |
| 16353 var keyvalue = part.split("="); | |
| 16354 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 16355 } | |
| 16356 } | |
| 16357 | |
| 16358 | |
| 16359 var h = { | |
| 16360 "content-type" : "application/json; charset=utf-8", | |
| 16361 }; | |
| 16362 var resp = ""; | |
| 16363 return new async.Future.value(stringResponse(200, h, resp)); | |
| 16364 }), true); | |
| 16365 res.delete(arg_profileId, arg_id).then(unittest.expectAsync((_) {})); | |
| 16366 }); | |
| 16367 | |
| 16368 unittest.test("method--generatetag", () { | |
| 16369 | |
| 16370 var mock = new HttpServerMock(); | |
| 16371 api.FloodlightActivitiesResourceApi res = new api.DfareportingApi(mock).fl
oodlightActivities; | |
| 16372 var arg_profileId = "foo"; | |
| 16373 var arg_floodlightActivityId = "foo"; | |
| 16374 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 16375 var path = (req.url).path; | |
| 16376 var pathOffset = 0; | |
| 16377 var index; | |
| 16378 var subPart; | |
| 16379 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 16380 pathOffset += 1; | |
| 16381 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 16382 pathOffset += 18; | |
| 16383 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 16384 pathOffset += 13; | |
| 16385 index = path.indexOf("/floodlightActivities/generatetag", pathOffset); | |
| 16386 unittest.expect(index >= 0, unittest.isTrue); | |
| 16387 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 16388 pathOffset = index; | |
| 16389 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 16390 unittest.expect(path.substring(pathOffset, pathOffset + 33), unittest.eq
uals("/floodlightActivities/generatetag")); | |
| 16391 pathOffset += 33; | |
| 16392 | |
| 16393 var query = (req.url).query; | |
| 16394 var queryOffset = 0; | |
| 16395 var queryMap = {}; | |
| 16396 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 16397 parseBool(n) { | |
| 16398 if (n == "true") return true; | |
| 16399 if (n == "false") return false; | |
| 16400 if (n == null) return null; | |
| 16401 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 16402 } | |
| 16403 if (query.length > 0) { | |
| 16404 for (var part in query.split("&")) { | |
| 16405 var keyvalue = part.split("="); | |
| 16406 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 16407 } | |
| 16408 } | |
| 16409 unittest.expect(queryMap["floodlightActivityId"].first, unittest.equals(
arg_floodlightActivityId)); | |
| 16410 | |
| 16411 | |
| 16412 var h = { | |
| 16413 "content-type" : "application/json; charset=utf-8", | |
| 16414 }; | |
| 16415 var resp = convert.JSON.encode(buildFloodlightActivitiesGenerateTagRespo
nse()); | |
| 16416 return new async.Future.value(stringResponse(200, h, resp)); | |
| 16417 }), true); | |
| 16418 res.generatetag(arg_profileId, floodlightActivityId: arg_floodlightActivit
yId).then(unittest.expectAsync(((api.FloodlightActivitiesGenerateTagResponse res
ponse) { | |
| 16419 checkFloodlightActivitiesGenerateTagResponse(response); | |
| 16420 }))); | |
| 16421 }); | |
| 16422 | |
| 16423 unittest.test("method--get", () { | |
| 16424 | |
| 16425 var mock = new HttpServerMock(); | |
| 16426 api.FloodlightActivitiesResourceApi res = new api.DfareportingApi(mock).fl
oodlightActivities; | |
| 16427 var arg_profileId = "foo"; | |
| 16428 var arg_id = "foo"; | |
| 16429 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 16430 var path = (req.url).path; | |
| 16431 var pathOffset = 0; | |
| 16432 var index; | |
| 16433 var subPart; | |
| 16434 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 16435 pathOffset += 1; | |
| 16436 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 16437 pathOffset += 18; | |
| 16438 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 16439 pathOffset += 13; | |
| 16440 index = path.indexOf("/floodlightActivities/", pathOffset); | |
| 16441 unittest.expect(index >= 0, unittest.isTrue); | |
| 16442 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 16443 pathOffset = index; | |
| 16444 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 16445 unittest.expect(path.substring(pathOffset, pathOffset + 22), unittest.eq
uals("/floodlightActivities/")); | |
| 16446 pathOffset += 22; | |
| 16447 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 16448 pathOffset = path.length; | |
| 16449 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 16450 | |
| 16451 var query = (req.url).query; | |
| 16452 var queryOffset = 0; | |
| 16453 var queryMap = {}; | |
| 16454 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 16455 parseBool(n) { | |
| 16456 if (n == "true") return true; | |
| 16457 if (n == "false") return false; | |
| 16458 if (n == null) return null; | |
| 16459 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 16460 } | |
| 16461 if (query.length > 0) { | |
| 16462 for (var part in query.split("&")) { | |
| 16463 var keyvalue = part.split("="); | |
| 16464 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 16465 } | |
| 16466 } | |
| 16467 | |
| 16468 | |
| 16469 var h = { | |
| 16470 "content-type" : "application/json; charset=utf-8", | |
| 16471 }; | |
| 16472 var resp = convert.JSON.encode(buildFloodlightActivity()); | |
| 16473 return new async.Future.value(stringResponse(200, h, resp)); | |
| 16474 }), true); | |
| 16475 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.FloodlightA
ctivity response) { | |
| 16476 checkFloodlightActivity(response); | |
| 16477 }))); | |
| 16478 }); | |
| 16479 | |
| 16480 unittest.test("method--insert", () { | |
| 16481 | |
| 16482 var mock = new HttpServerMock(); | |
| 16483 api.FloodlightActivitiesResourceApi res = new api.DfareportingApi(mock).fl
oodlightActivities; | |
| 16484 var arg_request = buildFloodlightActivity(); | |
| 16485 var arg_profileId = "foo"; | |
| 16486 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 16487 var obj = new api.FloodlightActivity.fromJson(json); | |
| 16488 checkFloodlightActivity(obj); | |
| 16489 | |
| 16490 var path = (req.url).path; | |
| 16491 var pathOffset = 0; | |
| 16492 var index; | |
| 16493 var subPart; | |
| 16494 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 16495 pathOffset += 1; | |
| 16496 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 16497 pathOffset += 18; | |
| 16498 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 16499 pathOffset += 13; | |
| 16500 index = path.indexOf("/floodlightActivities", pathOffset); | |
| 16501 unittest.expect(index >= 0, unittest.isTrue); | |
| 16502 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 16503 pathOffset = index; | |
| 16504 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 16505 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("/floodlightActivities")); | |
| 16506 pathOffset += 21; | |
| 16507 | |
| 16508 var query = (req.url).query; | |
| 16509 var queryOffset = 0; | |
| 16510 var queryMap = {}; | |
| 16511 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 16512 parseBool(n) { | |
| 16513 if (n == "true") return true; | |
| 16514 if (n == "false") return false; | |
| 16515 if (n == null) return null; | |
| 16516 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 16517 } | |
| 16518 if (query.length > 0) { | |
| 16519 for (var part in query.split("&")) { | |
| 16520 var keyvalue = part.split("="); | |
| 16521 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 16522 } | |
| 16523 } | |
| 16524 | |
| 16525 | |
| 16526 var h = { | |
| 16527 "content-type" : "application/json; charset=utf-8", | |
| 16528 }; | |
| 16529 var resp = convert.JSON.encode(buildFloodlightActivity()); | |
| 16530 return new async.Future.value(stringResponse(200, h, resp)); | |
| 16531 }), true); | |
| 16532 res.insert(arg_request, arg_profileId).then(unittest.expectAsync(((api.Flo
odlightActivity response) { | |
| 16533 checkFloodlightActivity(response); | |
| 16534 }))); | |
| 16535 }); | |
| 16536 | |
| 16537 unittest.test("method--list", () { | |
| 16538 | |
| 16539 var mock = new HttpServerMock(); | |
| 16540 api.FloodlightActivitiesResourceApi res = new api.DfareportingApi(mock).fl
oodlightActivities; | |
| 16541 var arg_profileId = "foo"; | |
| 16542 var arg_advertiserId = "foo"; | |
| 16543 var arg_floodlightActivityGroupIds = buildUnnamed416(); | |
| 16544 var arg_floodlightActivityGroupName = "foo"; | |
| 16545 var arg_floodlightActivityGroupTagString = "foo"; | |
| 16546 var arg_floodlightActivityGroupType = "foo"; | |
| 16547 var arg_floodlightConfigurationId = "foo"; | |
| 16548 var arg_ids = buildUnnamed417(); | |
| 16549 var arg_maxResults = 42; | |
| 16550 var arg_pageToken = "foo"; | |
| 16551 var arg_searchString = "foo"; | |
| 16552 var arg_sortField = "foo"; | |
| 16553 var arg_sortOrder = "foo"; | |
| 16554 var arg_tagString = "foo"; | |
| 16555 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 16556 var path = (req.url).path; | |
| 16557 var pathOffset = 0; | |
| 16558 var index; | |
| 16559 var subPart; | |
| 16560 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 16561 pathOffset += 1; | |
| 16562 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 16563 pathOffset += 18; | |
| 16564 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 16565 pathOffset += 13; | |
| 16566 index = path.indexOf("/floodlightActivities", pathOffset); | |
| 16567 unittest.expect(index >= 0, unittest.isTrue); | |
| 16568 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 16569 pathOffset = index; | |
| 16570 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 16571 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("/floodlightActivities")); | |
| 16572 pathOffset += 21; | |
| 16573 | |
| 16574 var query = (req.url).query; | |
| 16575 var queryOffset = 0; | |
| 16576 var queryMap = {}; | |
| 16577 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 16578 parseBool(n) { | |
| 16579 if (n == "true") return true; | |
| 16580 if (n == "false") return false; | |
| 16581 if (n == null) return null; | |
| 16582 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 16583 } | |
| 16584 if (query.length > 0) { | |
| 16585 for (var part in query.split("&")) { | |
| 16586 var keyvalue = part.split("="); | |
| 16587 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 16588 } | |
| 16589 } | |
| 16590 unittest.expect(queryMap["advertiserId"].first, unittest.equals(arg_adve
rtiserId)); | |
| 16591 unittest.expect(queryMap["floodlightActivityGroupIds"], unittest.equals(
arg_floodlightActivityGroupIds)); | |
| 16592 unittest.expect(queryMap["floodlightActivityGroupName"].first, unittest.
equals(arg_floodlightActivityGroupName)); | |
| 16593 unittest.expect(queryMap["floodlightActivityGroupTagString"].first, unit
test.equals(arg_floodlightActivityGroupTagString)); | |
| 16594 unittest.expect(queryMap["floodlightActivityGroupType"].first, unittest.
equals(arg_floodlightActivityGroupType)); | |
| 16595 unittest.expect(queryMap["floodlightConfigurationId"].first, unittest.eq
uals(arg_floodlightConfigurationId)); | |
| 16596 unittest.expect(queryMap["ids"], unittest.equals(arg_ids)); | |
| 16597 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | |
| 16598 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 16599 unittest.expect(queryMap["searchString"].first, unittest.equals(arg_sear
chString)); | |
| 16600 unittest.expect(queryMap["sortField"].first, unittest.equals(arg_sortFie
ld)); | |
| 16601 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | |
| 16602 unittest.expect(queryMap["tagString"].first, unittest.equals(arg_tagStri
ng)); | |
| 16603 | |
| 16604 | |
| 16605 var h = { | |
| 16606 "content-type" : "application/json; charset=utf-8", | |
| 16607 }; | |
| 16608 var resp = convert.JSON.encode(buildFloodlightActivitiesListResponse()); | |
| 16609 return new async.Future.value(stringResponse(200, h, resp)); | |
| 16610 }), true); | |
| 16611 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) { | |
| 16612 checkFloodlightActivitiesListResponse(response); | |
| 16613 }))); | |
| 16614 }); | |
| 16615 | |
| 16616 unittest.test("method--patch", () { | |
| 16617 | |
| 16618 var mock = new HttpServerMock(); | |
| 16619 api.FloodlightActivitiesResourceApi res = new api.DfareportingApi(mock).fl
oodlightActivities; | |
| 16620 var arg_request = buildFloodlightActivity(); | |
| 16621 var arg_profileId = "foo"; | |
| 16622 var arg_id = "foo"; | |
| 16623 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 16624 var obj = new api.FloodlightActivity.fromJson(json); | |
| 16625 checkFloodlightActivity(obj); | |
| 16626 | |
| 16627 var path = (req.url).path; | |
| 16628 var pathOffset = 0; | |
| 16629 var index; | |
| 16630 var subPart; | |
| 16631 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 16632 pathOffset += 1; | |
| 16633 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 16634 pathOffset += 18; | |
| 16635 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 16636 pathOffset += 13; | |
| 16637 index = path.indexOf("/floodlightActivities", pathOffset); | |
| 16638 unittest.expect(index >= 0, unittest.isTrue); | |
| 16639 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 16640 pathOffset = index; | |
| 16641 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 16642 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("/floodlightActivities")); | |
| 16643 pathOffset += 21; | |
| 16644 | |
| 16645 var query = (req.url).query; | |
| 16646 var queryOffset = 0; | |
| 16647 var queryMap = {}; | |
| 16648 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 16649 parseBool(n) { | |
| 16650 if (n == "true") return true; | |
| 16651 if (n == "false") return false; | |
| 16652 if (n == null) return null; | |
| 16653 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 16654 } | |
| 16655 if (query.length > 0) { | |
| 16656 for (var part in query.split("&")) { | |
| 16657 var keyvalue = part.split("="); | |
| 16658 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 16659 } | |
| 16660 } | |
| 16661 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); | |
| 16662 | |
| 16663 | |
| 16664 var h = { | |
| 16665 "content-type" : "application/json; charset=utf-8", | |
| 16666 }; | |
| 16667 var resp = convert.JSON.encode(buildFloodlightActivity()); | |
| 16668 return new async.Future.value(stringResponse(200, h, resp)); | |
| 16669 }), true); | |
| 16670 res.patch(arg_request, arg_profileId, arg_id).then(unittest.expectAsync(((
api.FloodlightActivity response) { | |
| 16671 checkFloodlightActivity(response); | |
| 16672 }))); | |
| 16673 }); | |
| 16674 | |
| 16675 unittest.test("method--update", () { | |
| 16676 | |
| 16677 var mock = new HttpServerMock(); | |
| 16678 api.FloodlightActivitiesResourceApi res = new api.DfareportingApi(mock).fl
oodlightActivities; | |
| 16679 var arg_request = buildFloodlightActivity(); | |
| 16680 var arg_profileId = "foo"; | |
| 16681 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 16682 var obj = new api.FloodlightActivity.fromJson(json); | |
| 16683 checkFloodlightActivity(obj); | |
| 16684 | |
| 16685 var path = (req.url).path; | |
| 16686 var pathOffset = 0; | |
| 16687 var index; | |
| 16688 var subPart; | |
| 16689 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 16690 pathOffset += 1; | |
| 16691 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 16692 pathOffset += 18; | |
| 16693 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 16694 pathOffset += 13; | |
| 16695 index = path.indexOf("/floodlightActivities", pathOffset); | |
| 16696 unittest.expect(index >= 0, unittest.isTrue); | |
| 16697 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 16698 pathOffset = index; | |
| 16699 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 16700 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("/floodlightActivities")); | |
| 16701 pathOffset += 21; | |
| 16702 | |
| 16703 var query = (req.url).query; | |
| 16704 var queryOffset = 0; | |
| 16705 var queryMap = {}; | |
| 16706 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 16707 parseBool(n) { | |
| 16708 if (n == "true") return true; | |
| 16709 if (n == "false") return false; | |
| 16710 if (n == null) return null; | |
| 16711 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 16712 } | |
| 16713 if (query.length > 0) { | |
| 16714 for (var part in query.split("&")) { | |
| 16715 var keyvalue = part.split("="); | |
| 16716 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 16717 } | |
| 16718 } | |
| 16719 | |
| 16720 | |
| 16721 var h = { | |
| 16722 "content-type" : "application/json; charset=utf-8", | |
| 16723 }; | |
| 16724 var resp = convert.JSON.encode(buildFloodlightActivity()); | |
| 16725 return new async.Future.value(stringResponse(200, h, resp)); | |
| 16726 }), true); | |
| 16727 res.update(arg_request, arg_profileId).then(unittest.expectAsync(((api.Flo
odlightActivity response) { | |
| 16728 checkFloodlightActivity(response); | |
| 16729 }))); | |
| 16730 }); | |
| 16731 | |
| 16732 }); | |
| 16733 | |
| 16734 | |
| 16735 unittest.group("resource-FloodlightActivityGroupsResourceApi", () { | |
| 16736 unittest.test("method--get", () { | |
| 16737 | |
| 16738 var mock = new HttpServerMock(); | |
| 16739 api.FloodlightActivityGroupsResourceApi res = new api.DfareportingApi(mock
).floodlightActivityGroups; | |
| 16740 var arg_profileId = "foo"; | |
| 16741 var arg_id = "foo"; | |
| 16742 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 16743 var path = (req.url).path; | |
| 16744 var pathOffset = 0; | |
| 16745 var index; | |
| 16746 var subPart; | |
| 16747 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 16748 pathOffset += 1; | |
| 16749 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 16750 pathOffset += 18; | |
| 16751 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 16752 pathOffset += 13; | |
| 16753 index = path.indexOf("/floodlightActivityGroups/", pathOffset); | |
| 16754 unittest.expect(index >= 0, unittest.isTrue); | |
| 16755 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 16756 pathOffset = index; | |
| 16757 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 16758 unittest.expect(path.substring(pathOffset, pathOffset + 26), unittest.eq
uals("/floodlightActivityGroups/")); | |
| 16759 pathOffset += 26; | |
| 16760 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 16761 pathOffset = path.length; | |
| 16762 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 16763 | |
| 16764 var query = (req.url).query; | |
| 16765 var queryOffset = 0; | |
| 16766 var queryMap = {}; | |
| 16767 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 16768 parseBool(n) { | |
| 16769 if (n == "true") return true; | |
| 16770 if (n == "false") return false; | |
| 16771 if (n == null) return null; | |
| 16772 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 16773 } | |
| 16774 if (query.length > 0) { | |
| 16775 for (var part in query.split("&")) { | |
| 16776 var keyvalue = part.split("="); | |
| 16777 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 16778 } | |
| 16779 } | |
| 16780 | |
| 16781 | |
| 16782 var h = { | |
| 16783 "content-type" : "application/json; charset=utf-8", | |
| 16784 }; | |
| 16785 var resp = convert.JSON.encode(buildFloodlightActivityGroup()); | |
| 16786 return new async.Future.value(stringResponse(200, h, resp)); | |
| 16787 }), true); | |
| 16788 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.FloodlightA
ctivityGroup response) { | |
| 16789 checkFloodlightActivityGroup(response); | |
| 16790 }))); | |
| 16791 }); | |
| 16792 | |
| 16793 unittest.test("method--insert", () { | |
| 16794 | |
| 16795 var mock = new HttpServerMock(); | |
| 16796 api.FloodlightActivityGroupsResourceApi res = new api.DfareportingApi(mock
).floodlightActivityGroups; | |
| 16797 var arg_request = buildFloodlightActivityGroup(); | |
| 16798 var arg_profileId = "foo"; | |
| 16799 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 16800 var obj = new api.FloodlightActivityGroup.fromJson(json); | |
| 16801 checkFloodlightActivityGroup(obj); | |
| 16802 | |
| 16803 var path = (req.url).path; | |
| 16804 var pathOffset = 0; | |
| 16805 var index; | |
| 16806 var subPart; | |
| 16807 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 16808 pathOffset += 1; | |
| 16809 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 16810 pathOffset += 18; | |
| 16811 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 16812 pathOffset += 13; | |
| 16813 index = path.indexOf("/floodlightActivityGroups", pathOffset); | |
| 16814 unittest.expect(index >= 0, unittest.isTrue); | |
| 16815 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 16816 pathOffset = index; | |
| 16817 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 16818 unittest.expect(path.substring(pathOffset, pathOffset + 25), unittest.eq
uals("/floodlightActivityGroups")); | |
| 16819 pathOffset += 25; | |
| 16820 | |
| 16821 var query = (req.url).query; | |
| 16822 var queryOffset = 0; | |
| 16823 var queryMap = {}; | |
| 16824 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 16825 parseBool(n) { | |
| 16826 if (n == "true") return true; | |
| 16827 if (n == "false") return false; | |
| 16828 if (n == null) return null; | |
| 16829 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 16830 } | |
| 16831 if (query.length > 0) { | |
| 16832 for (var part in query.split("&")) { | |
| 16833 var keyvalue = part.split("="); | |
| 16834 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 16835 } | |
| 16836 } | |
| 16837 | |
| 16838 | |
| 16839 var h = { | |
| 16840 "content-type" : "application/json; charset=utf-8", | |
| 16841 }; | |
| 16842 var resp = convert.JSON.encode(buildFloodlightActivityGroup()); | |
| 16843 return new async.Future.value(stringResponse(200, h, resp)); | |
| 16844 }), true); | |
| 16845 res.insert(arg_request, arg_profileId).then(unittest.expectAsync(((api.Flo
odlightActivityGroup response) { | |
| 16846 checkFloodlightActivityGroup(response); | |
| 16847 }))); | |
| 16848 }); | |
| 16849 | |
| 16850 unittest.test("method--list", () { | |
| 16851 | |
| 16852 var mock = new HttpServerMock(); | |
| 16853 api.FloodlightActivityGroupsResourceApi res = new api.DfareportingApi(mock
).floodlightActivityGroups; | |
| 16854 var arg_profileId = "foo"; | |
| 16855 var arg_advertiserId = "foo"; | |
| 16856 var arg_floodlightConfigurationId = "foo"; | |
| 16857 var arg_ids = buildUnnamed418(); | |
| 16858 var arg_maxResults = 42; | |
| 16859 var arg_pageToken = "foo"; | |
| 16860 var arg_searchString = "foo"; | |
| 16861 var arg_sortField = "foo"; | |
| 16862 var arg_sortOrder = "foo"; | |
| 16863 var arg_type = "foo"; | |
| 16864 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 16865 var path = (req.url).path; | |
| 16866 var pathOffset = 0; | |
| 16867 var index; | |
| 16868 var subPart; | |
| 16869 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 16870 pathOffset += 1; | |
| 16871 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 16872 pathOffset += 18; | |
| 16873 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 16874 pathOffset += 13; | |
| 16875 index = path.indexOf("/floodlightActivityGroups", pathOffset); | |
| 16876 unittest.expect(index >= 0, unittest.isTrue); | |
| 16877 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 16878 pathOffset = index; | |
| 16879 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 16880 unittest.expect(path.substring(pathOffset, pathOffset + 25), unittest.eq
uals("/floodlightActivityGroups")); | |
| 16881 pathOffset += 25; | |
| 16882 | |
| 16883 var query = (req.url).query; | |
| 16884 var queryOffset = 0; | |
| 16885 var queryMap = {}; | |
| 16886 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 16887 parseBool(n) { | |
| 16888 if (n == "true") return true; | |
| 16889 if (n == "false") return false; | |
| 16890 if (n == null) return null; | |
| 16891 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 16892 } | |
| 16893 if (query.length > 0) { | |
| 16894 for (var part in query.split("&")) { | |
| 16895 var keyvalue = part.split("="); | |
| 16896 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 16897 } | |
| 16898 } | |
| 16899 unittest.expect(queryMap["advertiserId"].first, unittest.equals(arg_adve
rtiserId)); | |
| 16900 unittest.expect(queryMap["floodlightConfigurationId"].first, unittest.eq
uals(arg_floodlightConfigurationId)); | |
| 16901 unittest.expect(queryMap["ids"], unittest.equals(arg_ids)); | |
| 16902 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | |
| 16903 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 16904 unittest.expect(queryMap["searchString"].first, unittest.equals(arg_sear
chString)); | |
| 16905 unittest.expect(queryMap["sortField"].first, unittest.equals(arg_sortFie
ld)); | |
| 16906 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | |
| 16907 unittest.expect(queryMap["type"].first, unittest.equals(arg_type)); | |
| 16908 | |
| 16909 | |
| 16910 var h = { | |
| 16911 "content-type" : "application/json; charset=utf-8", | |
| 16912 }; | |
| 16913 var resp = convert.JSON.encode(buildFloodlightActivityGroupsListResponse
()); | |
| 16914 return new async.Future.value(stringResponse(200, h, resp)); | |
| 16915 }), true); | |
| 16916 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) { | |
| 16917 checkFloodlightActivityGroupsListResponse(response); | |
| 16918 }))); | |
| 16919 }); | |
| 16920 | |
| 16921 unittest.test("method--patch", () { | |
| 16922 | |
| 16923 var mock = new HttpServerMock(); | |
| 16924 api.FloodlightActivityGroupsResourceApi res = new api.DfareportingApi(mock
).floodlightActivityGroups; | |
| 16925 var arg_request = buildFloodlightActivityGroup(); | |
| 16926 var arg_profileId = "foo"; | |
| 16927 var arg_id = "foo"; | |
| 16928 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 16929 var obj = new api.FloodlightActivityGroup.fromJson(json); | |
| 16930 checkFloodlightActivityGroup(obj); | |
| 16931 | |
| 16932 var path = (req.url).path; | |
| 16933 var pathOffset = 0; | |
| 16934 var index; | |
| 16935 var subPart; | |
| 16936 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 16937 pathOffset += 1; | |
| 16938 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 16939 pathOffset += 18; | |
| 16940 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 16941 pathOffset += 13; | |
| 16942 index = path.indexOf("/floodlightActivityGroups", pathOffset); | |
| 16943 unittest.expect(index >= 0, unittest.isTrue); | |
| 16944 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 16945 pathOffset = index; | |
| 16946 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 16947 unittest.expect(path.substring(pathOffset, pathOffset + 25), unittest.eq
uals("/floodlightActivityGroups")); | |
| 16948 pathOffset += 25; | |
| 16949 | |
| 16950 var query = (req.url).query; | |
| 16951 var queryOffset = 0; | |
| 16952 var queryMap = {}; | |
| 16953 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 16954 parseBool(n) { | |
| 16955 if (n == "true") return true; | |
| 16956 if (n == "false") return false; | |
| 16957 if (n == null) return null; | |
| 16958 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 16959 } | |
| 16960 if (query.length > 0) { | |
| 16961 for (var part in query.split("&")) { | |
| 16962 var keyvalue = part.split("="); | |
| 16963 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 16964 } | |
| 16965 } | |
| 16966 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); | |
| 16967 | |
| 16968 | |
| 16969 var h = { | |
| 16970 "content-type" : "application/json; charset=utf-8", | |
| 16971 }; | |
| 16972 var resp = convert.JSON.encode(buildFloodlightActivityGroup()); | |
| 16973 return new async.Future.value(stringResponse(200, h, resp)); | |
| 16974 }), true); | |
| 16975 res.patch(arg_request, arg_profileId, arg_id).then(unittest.expectAsync(((
api.FloodlightActivityGroup response) { | |
| 16976 checkFloodlightActivityGroup(response); | |
| 16977 }))); | |
| 16978 }); | |
| 16979 | |
| 16980 unittest.test("method--update", () { | |
| 16981 | |
| 16982 var mock = new HttpServerMock(); | |
| 16983 api.FloodlightActivityGroupsResourceApi res = new api.DfareportingApi(mock
).floodlightActivityGroups; | |
| 16984 var arg_request = buildFloodlightActivityGroup(); | |
| 16985 var arg_profileId = "foo"; | |
| 16986 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 16987 var obj = new api.FloodlightActivityGroup.fromJson(json); | |
| 16988 checkFloodlightActivityGroup(obj); | |
| 16989 | |
| 16990 var path = (req.url).path; | |
| 16991 var pathOffset = 0; | |
| 16992 var index; | |
| 16993 var subPart; | |
| 16994 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 16995 pathOffset += 1; | |
| 16996 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 16997 pathOffset += 18; | |
| 16998 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 16999 pathOffset += 13; | |
| 17000 index = path.indexOf("/floodlightActivityGroups", pathOffset); | |
| 17001 unittest.expect(index >= 0, unittest.isTrue); | |
| 17002 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 17003 pathOffset = index; | |
| 17004 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 17005 unittest.expect(path.substring(pathOffset, pathOffset + 25), unittest.eq
uals("/floodlightActivityGroups")); | |
| 17006 pathOffset += 25; | |
| 17007 | |
| 17008 var query = (req.url).query; | |
| 17009 var queryOffset = 0; | |
| 17010 var queryMap = {}; | |
| 17011 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 17012 parseBool(n) { | |
| 17013 if (n == "true") return true; | |
| 17014 if (n == "false") return false; | |
| 17015 if (n == null) return null; | |
| 17016 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 17017 } | |
| 17018 if (query.length > 0) { | |
| 17019 for (var part in query.split("&")) { | |
| 17020 var keyvalue = part.split("="); | |
| 17021 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 17022 } | |
| 17023 } | |
| 17024 | |
| 17025 | |
| 17026 var h = { | |
| 17027 "content-type" : "application/json; charset=utf-8", | |
| 17028 }; | |
| 17029 var resp = convert.JSON.encode(buildFloodlightActivityGroup()); | |
| 17030 return new async.Future.value(stringResponse(200, h, resp)); | |
| 17031 }), true); | |
| 17032 res.update(arg_request, arg_profileId).then(unittest.expectAsync(((api.Flo
odlightActivityGroup response) { | |
| 17033 checkFloodlightActivityGroup(response); | |
| 17034 }))); | |
| 17035 }); | |
| 17036 | |
| 17037 }); | |
| 17038 | |
| 17039 | |
| 17040 unittest.group("resource-FloodlightConfigurationsResourceApi", () { | |
| 17041 unittest.test("method--get", () { | |
| 17042 | |
| 17043 var mock = new HttpServerMock(); | |
| 17044 api.FloodlightConfigurationsResourceApi res = new api.DfareportingApi(mock
).floodlightConfigurations; | |
| 17045 var arg_profileId = "foo"; | |
| 17046 var arg_id = "foo"; | |
| 17047 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 17048 var path = (req.url).path; | |
| 17049 var pathOffset = 0; | |
| 17050 var index; | |
| 17051 var subPart; | |
| 17052 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 17053 pathOffset += 1; | |
| 17054 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 17055 pathOffset += 18; | |
| 17056 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 17057 pathOffset += 13; | |
| 17058 index = path.indexOf("/floodlightConfigurations/", pathOffset); | |
| 17059 unittest.expect(index >= 0, unittest.isTrue); | |
| 17060 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 17061 pathOffset = index; | |
| 17062 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 17063 unittest.expect(path.substring(pathOffset, pathOffset + 26), unittest.eq
uals("/floodlightConfigurations/")); | |
| 17064 pathOffset += 26; | |
| 17065 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 17066 pathOffset = path.length; | |
| 17067 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 17068 | |
| 17069 var query = (req.url).query; | |
| 17070 var queryOffset = 0; | |
| 17071 var queryMap = {}; | |
| 17072 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 17073 parseBool(n) { | |
| 17074 if (n == "true") return true; | |
| 17075 if (n == "false") return false; | |
| 17076 if (n == null) return null; | |
| 17077 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 17078 } | |
| 17079 if (query.length > 0) { | |
| 17080 for (var part in query.split("&")) { | |
| 17081 var keyvalue = part.split("="); | |
| 17082 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 17083 } | |
| 17084 } | |
| 17085 | |
| 17086 | |
| 17087 var h = { | |
| 17088 "content-type" : "application/json; charset=utf-8", | |
| 17089 }; | |
| 17090 var resp = convert.JSON.encode(buildFloodlightConfiguration()); | |
| 17091 return new async.Future.value(stringResponse(200, h, resp)); | |
| 17092 }), true); | |
| 17093 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.FloodlightC
onfiguration response) { | |
| 17094 checkFloodlightConfiguration(response); | |
| 17095 }))); | |
| 17096 }); | |
| 17097 | |
| 17098 unittest.test("method--list", () { | |
| 17099 | |
| 17100 var mock = new HttpServerMock(); | |
| 17101 api.FloodlightConfigurationsResourceApi res = new api.DfareportingApi(mock
).floodlightConfigurations; | |
| 17102 var arg_profileId = "foo"; | |
| 17103 var arg_ids = buildUnnamed419(); | |
| 17104 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 17105 var path = (req.url).path; | |
| 17106 var pathOffset = 0; | |
| 17107 var index; | |
| 17108 var subPart; | |
| 17109 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 17110 pathOffset += 1; | |
| 17111 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 17112 pathOffset += 18; | |
| 17113 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 17114 pathOffset += 13; | |
| 17115 index = path.indexOf("/floodlightConfigurations", pathOffset); | |
| 17116 unittest.expect(index >= 0, unittest.isTrue); | |
| 17117 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 17118 pathOffset = index; | |
| 17119 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 17120 unittest.expect(path.substring(pathOffset, pathOffset + 25), unittest.eq
uals("/floodlightConfigurations")); | |
| 17121 pathOffset += 25; | |
| 17122 | |
| 17123 var query = (req.url).query; | |
| 17124 var queryOffset = 0; | |
| 17125 var queryMap = {}; | |
| 17126 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 17127 parseBool(n) { | |
| 17128 if (n == "true") return true; | |
| 17129 if (n == "false") return false; | |
| 17130 if (n == null) return null; | |
| 17131 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 17132 } | |
| 17133 if (query.length > 0) { | |
| 17134 for (var part in query.split("&")) { | |
| 17135 var keyvalue = part.split("="); | |
| 17136 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 17137 } | |
| 17138 } | |
| 17139 unittest.expect(queryMap["ids"], unittest.equals(arg_ids)); | |
| 17140 | |
| 17141 | |
| 17142 var h = { | |
| 17143 "content-type" : "application/json; charset=utf-8", | |
| 17144 }; | |
| 17145 var resp = convert.JSON.encode(buildFloodlightConfigurationsListResponse
()); | |
| 17146 return new async.Future.value(stringResponse(200, h, resp)); | |
| 17147 }), true); | |
| 17148 res.list(arg_profileId, ids: arg_ids).then(unittest.expectAsync(((api.Floo
dlightConfigurationsListResponse response) { | |
| 17149 checkFloodlightConfigurationsListResponse(response); | |
| 17150 }))); | |
| 17151 }); | |
| 17152 | |
| 17153 unittest.test("method--patch", () { | |
| 17154 | |
| 17155 var mock = new HttpServerMock(); | |
| 17156 api.FloodlightConfigurationsResourceApi res = new api.DfareportingApi(mock
).floodlightConfigurations; | |
| 17157 var arg_request = buildFloodlightConfiguration(); | |
| 17158 var arg_profileId = "foo"; | |
| 17159 var arg_id = "foo"; | |
| 17160 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 17161 var obj = new api.FloodlightConfiguration.fromJson(json); | |
| 17162 checkFloodlightConfiguration(obj); | |
| 17163 | |
| 17164 var path = (req.url).path; | |
| 17165 var pathOffset = 0; | |
| 17166 var index; | |
| 17167 var subPart; | |
| 17168 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 17169 pathOffset += 1; | |
| 17170 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 17171 pathOffset += 18; | |
| 17172 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 17173 pathOffset += 13; | |
| 17174 index = path.indexOf("/floodlightConfigurations", pathOffset); | |
| 17175 unittest.expect(index >= 0, unittest.isTrue); | |
| 17176 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 17177 pathOffset = index; | |
| 17178 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 17179 unittest.expect(path.substring(pathOffset, pathOffset + 25), unittest.eq
uals("/floodlightConfigurations")); | |
| 17180 pathOffset += 25; | |
| 17181 | |
| 17182 var query = (req.url).query; | |
| 17183 var queryOffset = 0; | |
| 17184 var queryMap = {}; | |
| 17185 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 17186 parseBool(n) { | |
| 17187 if (n == "true") return true; | |
| 17188 if (n == "false") return false; | |
| 17189 if (n == null) return null; | |
| 17190 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 17191 } | |
| 17192 if (query.length > 0) { | |
| 17193 for (var part in query.split("&")) { | |
| 17194 var keyvalue = part.split("="); | |
| 17195 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 17196 } | |
| 17197 } | |
| 17198 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); | |
| 17199 | |
| 17200 | |
| 17201 var h = { | |
| 17202 "content-type" : "application/json; charset=utf-8", | |
| 17203 }; | |
| 17204 var resp = convert.JSON.encode(buildFloodlightConfiguration()); | |
| 17205 return new async.Future.value(stringResponse(200, h, resp)); | |
| 17206 }), true); | |
| 17207 res.patch(arg_request, arg_profileId, arg_id).then(unittest.expectAsync(((
api.FloodlightConfiguration response) { | |
| 17208 checkFloodlightConfiguration(response); | |
| 17209 }))); | |
| 17210 }); | |
| 17211 | |
| 17212 unittest.test("method--update", () { | |
| 17213 | |
| 17214 var mock = new HttpServerMock(); | |
| 17215 api.FloodlightConfigurationsResourceApi res = new api.DfareportingApi(mock
).floodlightConfigurations; | |
| 17216 var arg_request = buildFloodlightConfiguration(); | |
| 17217 var arg_profileId = "foo"; | |
| 17218 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 17219 var obj = new api.FloodlightConfiguration.fromJson(json); | |
| 17220 checkFloodlightConfiguration(obj); | |
| 17221 | |
| 17222 var path = (req.url).path; | |
| 17223 var pathOffset = 0; | |
| 17224 var index; | |
| 17225 var subPart; | |
| 17226 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 17227 pathOffset += 1; | |
| 17228 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 17229 pathOffset += 18; | |
| 17230 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 17231 pathOffset += 13; | |
| 17232 index = path.indexOf("/floodlightConfigurations", pathOffset); | |
| 17233 unittest.expect(index >= 0, unittest.isTrue); | |
| 17234 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 17235 pathOffset = index; | |
| 17236 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 17237 unittest.expect(path.substring(pathOffset, pathOffset + 25), unittest.eq
uals("/floodlightConfigurations")); | |
| 17238 pathOffset += 25; | |
| 17239 | |
| 17240 var query = (req.url).query; | |
| 17241 var queryOffset = 0; | |
| 17242 var queryMap = {}; | |
| 17243 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 17244 parseBool(n) { | |
| 17245 if (n == "true") return true; | |
| 17246 if (n == "false") return false; | |
| 17247 if (n == null) return null; | |
| 17248 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 17249 } | |
| 17250 if (query.length > 0) { | |
| 17251 for (var part in query.split("&")) { | |
| 17252 var keyvalue = part.split("="); | |
| 17253 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 17254 } | |
| 17255 } | |
| 17256 | |
| 17257 | |
| 17258 var h = { | |
| 17259 "content-type" : "application/json; charset=utf-8", | |
| 17260 }; | |
| 17261 var resp = convert.JSON.encode(buildFloodlightConfiguration()); | |
| 17262 return new async.Future.value(stringResponse(200, h, resp)); | |
| 17263 }), true); | |
| 17264 res.update(arg_request, arg_profileId).then(unittest.expectAsync(((api.Flo
odlightConfiguration response) { | |
| 17265 checkFloodlightConfiguration(response); | |
| 17266 }))); | |
| 17267 }); | |
| 17268 | |
| 17269 }); | |
| 17270 | |
| 17271 | |
| 17272 unittest.group("resource-InventoryItemsResourceApi", () { | |
| 17273 unittest.test("method--get", () { | |
| 17274 | |
| 17275 var mock = new HttpServerMock(); | |
| 17276 api.InventoryItemsResourceApi res = new api.DfareportingApi(mock).inventor
yItems; | |
| 17277 var arg_profileId = "foo"; | |
| 17278 var arg_projectId = "foo"; | |
| 17279 var arg_id = "foo"; | |
| 17280 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 17281 var path = (req.url).path; | |
| 17282 var pathOffset = 0; | |
| 17283 var index; | |
| 17284 var subPart; | |
| 17285 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 17286 pathOffset += 1; | |
| 17287 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 17288 pathOffset += 18; | |
| 17289 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 17290 pathOffset += 13; | |
| 17291 index = path.indexOf("/projects/", pathOffset); | |
| 17292 unittest.expect(index >= 0, unittest.isTrue); | |
| 17293 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 17294 pathOffset = index; | |
| 17295 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 17296 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/projects/")); | |
| 17297 pathOffset += 10; | |
| 17298 index = path.indexOf("/inventoryItems/", pathOffset); | |
| 17299 unittest.expect(index >= 0, unittest.isTrue); | |
| 17300 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 17301 pathOffset = index; | |
| 17302 unittest.expect(subPart, unittest.equals("$arg_projectId")); | |
| 17303 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq
uals("/inventoryItems/")); | |
| 17304 pathOffset += 16; | |
| 17305 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 17306 pathOffset = path.length; | |
| 17307 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 17308 | |
| 17309 var query = (req.url).query; | |
| 17310 var queryOffset = 0; | |
| 17311 var queryMap = {}; | |
| 17312 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 17313 parseBool(n) { | |
| 17314 if (n == "true") return true; | |
| 17315 if (n == "false") return false; | |
| 17316 if (n == null) return null; | |
| 17317 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 17318 } | |
| 17319 if (query.length > 0) { | |
| 17320 for (var part in query.split("&")) { | |
| 17321 var keyvalue = part.split("="); | |
| 17322 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 17323 } | |
| 17324 } | |
| 17325 | |
| 17326 | |
| 17327 var h = { | |
| 17328 "content-type" : "application/json; charset=utf-8", | |
| 17329 }; | |
| 17330 var resp = convert.JSON.encode(buildInventoryItem()); | |
| 17331 return new async.Future.value(stringResponse(200, h, resp)); | |
| 17332 }), true); | |
| 17333 res.get(arg_profileId, arg_projectId, arg_id).then(unittest.expectAsync(((
api.InventoryItem response) { | |
| 17334 checkInventoryItem(response); | |
| 17335 }))); | |
| 17336 }); | |
| 17337 | |
| 17338 unittest.test("method--list", () { | |
| 17339 | |
| 17340 var mock = new HttpServerMock(); | |
| 17341 api.InventoryItemsResourceApi res = new api.DfareportingApi(mock).inventor
yItems; | |
| 17342 var arg_profileId = "foo"; | |
| 17343 var arg_projectId = "foo"; | |
| 17344 var arg_ids = buildUnnamed420(); | |
| 17345 var arg_inPlan = true; | |
| 17346 var arg_maxResults = 42; | |
| 17347 var arg_orderId = buildUnnamed421(); | |
| 17348 var arg_pageToken = "foo"; | |
| 17349 var arg_siteId = buildUnnamed422(); | |
| 17350 var arg_sortField = "foo"; | |
| 17351 var arg_sortOrder = "foo"; | |
| 17352 var arg_type = "foo"; | |
| 17353 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 17354 var path = (req.url).path; | |
| 17355 var pathOffset = 0; | |
| 17356 var index; | |
| 17357 var subPart; | |
| 17358 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 17359 pathOffset += 1; | |
| 17360 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 17361 pathOffset += 18; | |
| 17362 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 17363 pathOffset += 13; | |
| 17364 index = path.indexOf("/projects/", pathOffset); | |
| 17365 unittest.expect(index >= 0, unittest.isTrue); | |
| 17366 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 17367 pathOffset = index; | |
| 17368 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 17369 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/projects/")); | |
| 17370 pathOffset += 10; | |
| 17371 index = path.indexOf("/inventoryItems", pathOffset); | |
| 17372 unittest.expect(index >= 0, unittest.isTrue); | |
| 17373 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 17374 pathOffset = index; | |
| 17375 unittest.expect(subPart, unittest.equals("$arg_projectId")); | |
| 17376 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/inventoryItems")); | |
| 17377 pathOffset += 15; | |
| 17378 | |
| 17379 var query = (req.url).query; | |
| 17380 var queryOffset = 0; | |
| 17381 var queryMap = {}; | |
| 17382 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 17383 parseBool(n) { | |
| 17384 if (n == "true") return true; | |
| 17385 if (n == "false") return false; | |
| 17386 if (n == null) return null; | |
| 17387 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 17388 } | |
| 17389 if (query.length > 0) { | |
| 17390 for (var part in query.split("&")) { | |
| 17391 var keyvalue = part.split("="); | |
| 17392 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 17393 } | |
| 17394 } | |
| 17395 unittest.expect(queryMap["ids"], unittest.equals(arg_ids)); | |
| 17396 unittest.expect(queryMap["inPlan"].first, unittest.equals("$arg_inPlan")
); | |
| 17397 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | |
| 17398 unittest.expect(queryMap["orderId"], unittest.equals(arg_orderId)); | |
| 17399 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 17400 unittest.expect(queryMap["siteId"], unittest.equals(arg_siteId)); | |
| 17401 unittest.expect(queryMap["sortField"].first, unittest.equals(arg_sortFie
ld)); | |
| 17402 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | |
| 17403 unittest.expect(queryMap["type"].first, unittest.equals(arg_type)); | |
| 17404 | |
| 17405 | |
| 17406 var h = { | |
| 17407 "content-type" : "application/json; charset=utf-8", | |
| 17408 }; | |
| 17409 var resp = convert.JSON.encode(buildInventoryItemsListResponse()); | |
| 17410 return new async.Future.value(stringResponse(200, h, resp)); | |
| 17411 }), true); | |
| 17412 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) { | |
| 17413 checkInventoryItemsListResponse(response); | |
| 17414 }))); | |
| 17415 }); | |
| 17416 | |
| 17417 }); | |
| 17418 | |
| 17419 | |
| 17420 unittest.group("resource-LandingPagesResourceApi", () { | |
| 17421 unittest.test("method--delete", () { | |
| 17422 | |
| 17423 var mock = new HttpServerMock(); | |
| 17424 api.LandingPagesResourceApi res = new api.DfareportingApi(mock).landingPag
es; | |
| 17425 var arg_profileId = "foo"; | |
| 17426 var arg_campaignId = "foo"; | |
| 17427 var arg_id = "foo"; | |
| 17428 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 17429 var path = (req.url).path; | |
| 17430 var pathOffset = 0; | |
| 17431 var index; | |
| 17432 var subPart; | |
| 17433 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 17434 pathOffset += 1; | |
| 17435 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 17436 pathOffset += 18; | |
| 17437 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 17438 pathOffset += 13; | |
| 17439 index = path.indexOf("/campaigns/", pathOffset); | |
| 17440 unittest.expect(index >= 0, unittest.isTrue); | |
| 17441 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 17442 pathOffset = index; | |
| 17443 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 17444 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("/campaigns/")); | |
| 17445 pathOffset += 11; | |
| 17446 index = path.indexOf("/landingPages/", pathOffset); | |
| 17447 unittest.expect(index >= 0, unittest.isTrue); | |
| 17448 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 17449 pathOffset = index; | |
| 17450 unittest.expect(subPart, unittest.equals("$arg_campaignId")); | |
| 17451 unittest.expect(path.substring(pathOffset, pathOffset + 14), unittest.eq
uals("/landingPages/")); | |
| 17452 pathOffset += 14; | |
| 17453 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 17454 pathOffset = path.length; | |
| 17455 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 17456 | |
| 17457 var query = (req.url).query; | |
| 17458 var queryOffset = 0; | |
| 17459 var queryMap = {}; | |
| 17460 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 17461 parseBool(n) { | |
| 17462 if (n == "true") return true; | |
| 17463 if (n == "false") return false; | |
| 17464 if (n == null) return null; | |
| 17465 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 17466 } | |
| 17467 if (query.length > 0) { | |
| 17468 for (var part in query.split("&")) { | |
| 17469 var keyvalue = part.split("="); | |
| 17470 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 17471 } | |
| 17472 } | |
| 17473 | |
| 17474 | |
| 17475 var h = { | |
| 17476 "content-type" : "application/json; charset=utf-8", | |
| 17477 }; | |
| 17478 var resp = ""; | |
| 17479 return new async.Future.value(stringResponse(200, h, resp)); | |
| 17480 }), true); | |
| 17481 res.delete(arg_profileId, arg_campaignId, arg_id).then(unittest.expectAsyn
c((_) {})); | |
| 17482 }); | |
| 17483 | |
| 17484 unittest.test("method--get", () { | |
| 17485 | |
| 17486 var mock = new HttpServerMock(); | |
| 17487 api.LandingPagesResourceApi res = new api.DfareportingApi(mock).landingPag
es; | |
| 17488 var arg_profileId = "foo"; | |
| 17489 var arg_campaignId = "foo"; | |
| 17490 var arg_id = "foo"; | |
| 17491 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 17492 var path = (req.url).path; | |
| 17493 var pathOffset = 0; | |
| 17494 var index; | |
| 17495 var subPart; | |
| 17496 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 17497 pathOffset += 1; | |
| 17498 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 17499 pathOffset += 18; | |
| 17500 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 17501 pathOffset += 13; | |
| 17502 index = path.indexOf("/campaigns/", pathOffset); | |
| 17503 unittest.expect(index >= 0, unittest.isTrue); | |
| 17504 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 17505 pathOffset = index; | |
| 17506 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 17507 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("/campaigns/")); | |
| 17508 pathOffset += 11; | |
| 17509 index = path.indexOf("/landingPages/", pathOffset); | |
| 17510 unittest.expect(index >= 0, unittest.isTrue); | |
| 17511 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 17512 pathOffset = index; | |
| 17513 unittest.expect(subPart, unittest.equals("$arg_campaignId")); | |
| 17514 unittest.expect(path.substring(pathOffset, pathOffset + 14), unittest.eq
uals("/landingPages/")); | |
| 17515 pathOffset += 14; | |
| 17516 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 17517 pathOffset = path.length; | |
| 17518 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 17519 | |
| 17520 var query = (req.url).query; | |
| 17521 var queryOffset = 0; | |
| 17522 var queryMap = {}; | |
| 17523 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 17524 parseBool(n) { | |
| 17525 if (n == "true") return true; | |
| 17526 if (n == "false") return false; | |
| 17527 if (n == null) return null; | |
| 17528 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 17529 } | |
| 17530 if (query.length > 0) { | |
| 17531 for (var part in query.split("&")) { | |
| 17532 var keyvalue = part.split("="); | |
| 17533 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 17534 } | |
| 17535 } | |
| 17536 | |
| 17537 | |
| 17538 var h = { | |
| 17539 "content-type" : "application/json; charset=utf-8", | |
| 17540 }; | |
| 17541 var resp = convert.JSON.encode(buildLandingPage()); | |
| 17542 return new async.Future.value(stringResponse(200, h, resp)); | |
| 17543 }), true); | |
| 17544 res.get(arg_profileId, arg_campaignId, arg_id).then(unittest.expectAsync((
(api.LandingPage response) { | |
| 17545 checkLandingPage(response); | |
| 17546 }))); | |
| 17547 }); | |
| 17548 | |
| 17549 unittest.test("method--insert", () { | |
| 17550 | |
| 17551 var mock = new HttpServerMock(); | |
| 17552 api.LandingPagesResourceApi res = new api.DfareportingApi(mock).landingPag
es; | |
| 17553 var arg_request = buildLandingPage(); | |
| 17554 var arg_profileId = "foo"; | |
| 17555 var arg_campaignId = "foo"; | |
| 17556 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 17557 var obj = new api.LandingPage.fromJson(json); | |
| 17558 checkLandingPage(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.4/")); | |
| 17567 pathOffset += 18; | |
| 17568 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 17569 pathOffset += 13; | |
| 17570 index = path.indexOf("/campaigns/", 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 + 11), unittest.eq
uals("/campaigns/")); | |
| 17576 pathOffset += 11; | |
| 17577 index = path.indexOf("/landingPages", pathOffset); | |
| 17578 unittest.expect(index >= 0, unittest.isTrue); | |
| 17579 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 17580 pathOffset = index; | |
| 17581 unittest.expect(subPart, unittest.equals("$arg_campaignId")); | |
| 17582 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("/landingPages")); | |
| 17583 pathOffset += 13; | |
| 17584 | |
| 17585 var query = (req.url).query; | |
| 17586 var queryOffset = 0; | |
| 17587 var queryMap = {}; | |
| 17588 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 17589 parseBool(n) { | |
| 17590 if (n == "true") return true; | |
| 17591 if (n == "false") return false; | |
| 17592 if (n == null) return null; | |
| 17593 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 17594 } | |
| 17595 if (query.length > 0) { | |
| 17596 for (var part in query.split("&")) { | |
| 17597 var keyvalue = part.split("="); | |
| 17598 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 17599 } | |
| 17600 } | |
| 17601 | |
| 17602 | |
| 17603 var h = { | |
| 17604 "content-type" : "application/json; charset=utf-8", | |
| 17605 }; | |
| 17606 var resp = convert.JSON.encode(buildLandingPage()); | |
| 17607 return new async.Future.value(stringResponse(200, h, resp)); | |
| 17608 }), true); | |
| 17609 res.insert(arg_request, arg_profileId, arg_campaignId).then(unittest.expec
tAsync(((api.LandingPage response) { | |
| 17610 checkLandingPage(response); | |
| 17611 }))); | |
| 17612 }); | |
| 17613 | |
| 17614 unittest.test("method--list", () { | |
| 17615 | |
| 17616 var mock = new HttpServerMock(); | |
| 17617 api.LandingPagesResourceApi res = new api.DfareportingApi(mock).landingPag
es; | |
| 17618 var arg_profileId = "foo"; | |
| 17619 var arg_campaignId = "foo"; | |
| 17620 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 17621 var path = (req.url).path; | |
| 17622 var pathOffset = 0; | |
| 17623 var index; | |
| 17624 var subPart; | |
| 17625 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 17626 pathOffset += 1; | |
| 17627 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 17628 pathOffset += 18; | |
| 17629 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 17630 pathOffset += 13; | |
| 17631 index = path.indexOf("/campaigns/", pathOffset); | |
| 17632 unittest.expect(index >= 0, unittest.isTrue); | |
| 17633 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 17634 pathOffset = index; | |
| 17635 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 17636 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("/campaigns/")); | |
| 17637 pathOffset += 11; | |
| 17638 index = path.indexOf("/landingPages", pathOffset); | |
| 17639 unittest.expect(index >= 0, unittest.isTrue); | |
| 17640 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 17641 pathOffset = index; | |
| 17642 unittest.expect(subPart, unittest.equals("$arg_campaignId")); | |
| 17643 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("/landingPages")); | |
| 17644 pathOffset += 13; | |
| 17645 | |
| 17646 var query = (req.url).query; | |
| 17647 var queryOffset = 0; | |
| 17648 var queryMap = {}; | |
| 17649 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 17650 parseBool(n) { | |
| 17651 if (n == "true") return true; | |
| 17652 if (n == "false") return false; | |
| 17653 if (n == null) return null; | |
| 17654 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 17655 } | |
| 17656 if (query.length > 0) { | |
| 17657 for (var part in query.split("&")) { | |
| 17658 var keyvalue = part.split("="); | |
| 17659 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 17660 } | |
| 17661 } | |
| 17662 | |
| 17663 | |
| 17664 var h = { | |
| 17665 "content-type" : "application/json; charset=utf-8", | |
| 17666 }; | |
| 17667 var resp = convert.JSON.encode(buildLandingPagesListResponse()); | |
| 17668 return new async.Future.value(stringResponse(200, h, resp)); | |
| 17669 }), true); | |
| 17670 res.list(arg_profileId, arg_campaignId).then(unittest.expectAsync(((api.La
ndingPagesListResponse response) { | |
| 17671 checkLandingPagesListResponse(response); | |
| 17672 }))); | |
| 17673 }); | |
| 17674 | |
| 17675 unittest.test("method--patch", () { | |
| 17676 | |
| 17677 var mock = new HttpServerMock(); | |
| 17678 api.LandingPagesResourceApi res = new api.DfareportingApi(mock).landingPag
es; | |
| 17679 var arg_request = buildLandingPage(); | |
| 17680 var arg_profileId = "foo"; | |
| 17681 var arg_campaignId = "foo"; | |
| 17682 var arg_id = "foo"; | |
| 17683 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 17684 var obj = new api.LandingPage.fromJson(json); | |
| 17685 checkLandingPage(obj); | |
| 17686 | |
| 17687 var path = (req.url).path; | |
| 17688 var pathOffset = 0; | |
| 17689 var index; | |
| 17690 var subPart; | |
| 17691 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 17692 pathOffset += 1; | |
| 17693 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 17694 pathOffset += 18; | |
| 17695 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 17696 pathOffset += 13; | |
| 17697 index = path.indexOf("/campaigns/", pathOffset); | |
| 17698 unittest.expect(index >= 0, unittest.isTrue); | |
| 17699 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 17700 pathOffset = index; | |
| 17701 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 17702 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("/campaigns/")); | |
| 17703 pathOffset += 11; | |
| 17704 index = path.indexOf("/landingPages", pathOffset); | |
| 17705 unittest.expect(index >= 0, unittest.isTrue); | |
| 17706 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 17707 pathOffset = index; | |
| 17708 unittest.expect(subPart, unittest.equals("$arg_campaignId")); | |
| 17709 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("/landingPages")); | |
| 17710 pathOffset += 13; | |
| 17711 | |
| 17712 var query = (req.url).query; | |
| 17713 var queryOffset = 0; | |
| 17714 var queryMap = {}; | |
| 17715 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 17716 parseBool(n) { | |
| 17717 if (n == "true") return true; | |
| 17718 if (n == "false") return false; | |
| 17719 if (n == null) return null; | |
| 17720 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 17721 } | |
| 17722 if (query.length > 0) { | |
| 17723 for (var part in query.split("&")) { | |
| 17724 var keyvalue = part.split("="); | |
| 17725 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 17726 } | |
| 17727 } | |
| 17728 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); | |
| 17729 | |
| 17730 | |
| 17731 var h = { | |
| 17732 "content-type" : "application/json; charset=utf-8", | |
| 17733 }; | |
| 17734 var resp = convert.JSON.encode(buildLandingPage()); | |
| 17735 return new async.Future.value(stringResponse(200, h, resp)); | |
| 17736 }), true); | |
| 17737 res.patch(arg_request, arg_profileId, arg_campaignId, arg_id).then(unittes
t.expectAsync(((api.LandingPage response) { | |
| 17738 checkLandingPage(response); | |
| 17739 }))); | |
| 17740 }); | |
| 17741 | |
| 17742 unittest.test("method--update", () { | |
| 17743 | |
| 17744 var mock = new HttpServerMock(); | |
| 17745 api.LandingPagesResourceApi res = new api.DfareportingApi(mock).landingPag
es; | |
| 17746 var arg_request = buildLandingPage(); | |
| 17747 var arg_profileId = "foo"; | |
| 17748 var arg_campaignId = "foo"; | |
| 17749 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 17750 var obj = new api.LandingPage.fromJson(json); | |
| 17751 checkLandingPage(obj); | |
| 17752 | |
| 17753 var path = (req.url).path; | |
| 17754 var pathOffset = 0; | |
| 17755 var index; | |
| 17756 var subPart; | |
| 17757 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 17758 pathOffset += 1; | |
| 17759 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 17760 pathOffset += 18; | |
| 17761 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 17762 pathOffset += 13; | |
| 17763 index = path.indexOf("/campaigns/", pathOffset); | |
| 17764 unittest.expect(index >= 0, unittest.isTrue); | |
| 17765 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 17766 pathOffset = index; | |
| 17767 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 17768 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("/campaigns/")); | |
| 17769 pathOffset += 11; | |
| 17770 index = path.indexOf("/landingPages", pathOffset); | |
| 17771 unittest.expect(index >= 0, unittest.isTrue); | |
| 17772 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 17773 pathOffset = index; | |
| 17774 unittest.expect(subPart, unittest.equals("$arg_campaignId")); | |
| 17775 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("/landingPages")); | |
| 17776 pathOffset += 13; | |
| 17777 | |
| 17778 var query = (req.url).query; | |
| 17779 var queryOffset = 0; | |
| 17780 var queryMap = {}; | |
| 17781 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 17782 parseBool(n) { | |
| 17783 if (n == "true") return true; | |
| 17784 if (n == "false") return false; | |
| 17785 if (n == null) return null; | |
| 17786 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 17787 } | |
| 17788 if (query.length > 0) { | |
| 17789 for (var part in query.split("&")) { | |
| 17790 var keyvalue = part.split("="); | |
| 17791 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 17792 } | |
| 17793 } | |
| 17794 | |
| 17795 | |
| 17796 var h = { | |
| 17797 "content-type" : "application/json; charset=utf-8", | |
| 17798 }; | |
| 17799 var resp = convert.JSON.encode(buildLandingPage()); | |
| 17800 return new async.Future.value(stringResponse(200, h, resp)); | |
| 17801 }), true); | |
| 17802 res.update(arg_request, arg_profileId, arg_campaignId).then(unittest.expec
tAsync(((api.LandingPage response) { | |
| 17803 checkLandingPage(response); | |
| 17804 }))); | |
| 17805 }); | |
| 17806 | |
| 17807 }); | |
| 17808 | |
| 17809 | |
| 17810 unittest.group("resource-MetrosResourceApi", () { | |
| 17811 unittest.test("method--list", () { | |
| 17812 | |
| 17813 var mock = new HttpServerMock(); | |
| 17814 api.MetrosResourceApi res = new api.DfareportingApi(mock).metros; | |
| 17815 var arg_profileId = "foo"; | |
| 17816 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 17817 var path = (req.url).path; | |
| 17818 var pathOffset = 0; | |
| 17819 var index; | |
| 17820 var subPart; | |
| 17821 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 17822 pathOffset += 1; | |
| 17823 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 17824 pathOffset += 18; | |
| 17825 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 17826 pathOffset += 13; | |
| 17827 index = path.indexOf("/metros", pathOffset); | |
| 17828 unittest.expect(index >= 0, unittest.isTrue); | |
| 17829 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 17830 pathOffset = index; | |
| 17831 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 17832 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ
als("/metros")); | |
| 17833 pathOffset += 7; | |
| 17834 | |
| 17835 var query = (req.url).query; | |
| 17836 var queryOffset = 0; | |
| 17837 var queryMap = {}; | |
| 17838 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 17839 parseBool(n) { | |
| 17840 if (n == "true") return true; | |
| 17841 if (n == "false") return false; | |
| 17842 if (n == null) return null; | |
| 17843 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 17844 } | |
| 17845 if (query.length > 0) { | |
| 17846 for (var part in query.split("&")) { | |
| 17847 var keyvalue = part.split("="); | |
| 17848 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 17849 } | |
| 17850 } | |
| 17851 | |
| 17852 | |
| 17853 var h = { | |
| 17854 "content-type" : "application/json; charset=utf-8", | |
| 17855 }; | |
| 17856 var resp = convert.JSON.encode(buildMetrosListResponse()); | |
| 17857 return new async.Future.value(stringResponse(200, h, resp)); | |
| 17858 }), true); | |
| 17859 res.list(arg_profileId).then(unittest.expectAsync(((api.MetrosListResponse
response) { | |
| 17860 checkMetrosListResponse(response); | |
| 17861 }))); | |
| 17862 }); | |
| 17863 | |
| 17864 }); | |
| 17865 | |
| 17866 | |
| 17867 unittest.group("resource-MobileCarriersResourceApi", () { | |
| 17868 unittest.test("method--get", () { | |
| 17869 | |
| 17870 var mock = new HttpServerMock(); | |
| 17871 api.MobileCarriersResourceApi res = new api.DfareportingApi(mock).mobileCa
rriers; | |
| 17872 var arg_profileId = "foo"; | |
| 17873 var arg_id = "foo"; | |
| 17874 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 17875 var path = (req.url).path; | |
| 17876 var pathOffset = 0; | |
| 17877 var index; | |
| 17878 var subPart; | |
| 17879 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 17880 pathOffset += 1; | |
| 17881 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 17882 pathOffset += 18; | |
| 17883 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 17884 pathOffset += 13; | |
| 17885 index = path.indexOf("/mobileCarriers/", pathOffset); | |
| 17886 unittest.expect(index >= 0, unittest.isTrue); | |
| 17887 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 17888 pathOffset = index; | |
| 17889 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 17890 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq
uals("/mobileCarriers/")); | |
| 17891 pathOffset += 16; | |
| 17892 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 17893 pathOffset = path.length; | |
| 17894 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 17895 | |
| 17896 var query = (req.url).query; | |
| 17897 var queryOffset = 0; | |
| 17898 var queryMap = {}; | |
| 17899 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 17900 parseBool(n) { | |
| 17901 if (n == "true") return true; | |
| 17902 if (n == "false") return false; | |
| 17903 if (n == null) return null; | |
| 17904 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 17905 } | |
| 17906 if (query.length > 0) { | |
| 17907 for (var part in query.split("&")) { | |
| 17908 var keyvalue = part.split("="); | |
| 17909 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 17910 } | |
| 17911 } | |
| 17912 | |
| 17913 | |
| 17914 var h = { | |
| 17915 "content-type" : "application/json; charset=utf-8", | |
| 17916 }; | |
| 17917 var resp = convert.JSON.encode(buildMobileCarrier()); | |
| 17918 return new async.Future.value(stringResponse(200, h, resp)); | |
| 17919 }), true); | |
| 17920 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.MobileCarri
er response) { | |
| 17921 checkMobileCarrier(response); | |
| 17922 }))); | |
| 17923 }); | |
| 17924 | |
| 17925 unittest.test("method--list", () { | |
| 17926 | |
| 17927 var mock = new HttpServerMock(); | |
| 17928 api.MobileCarriersResourceApi res = new api.DfareportingApi(mock).mobileCa
rriers; | |
| 17929 var arg_profileId = "foo"; | |
| 17930 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 17931 var path = (req.url).path; | |
| 17932 var pathOffset = 0; | |
| 17933 var index; | |
| 17934 var subPart; | |
| 17935 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 17936 pathOffset += 1; | |
| 17937 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 17938 pathOffset += 18; | |
| 17939 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 17940 pathOffset += 13; | |
| 17941 index = path.indexOf("/mobileCarriers", pathOffset); | |
| 17942 unittest.expect(index >= 0, unittest.isTrue); | |
| 17943 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 17944 pathOffset = index; | |
| 17945 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 17946 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/mobileCarriers")); | |
| 17947 pathOffset += 15; | |
| 17948 | |
| 17949 var query = (req.url).query; | |
| 17950 var queryOffset = 0; | |
| 17951 var queryMap = {}; | |
| 17952 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 17953 parseBool(n) { | |
| 17954 if (n == "true") return true; | |
| 17955 if (n == "false") return false; | |
| 17956 if (n == null) return null; | |
| 17957 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 17958 } | |
| 17959 if (query.length > 0) { | |
| 17960 for (var part in query.split("&")) { | |
| 17961 var keyvalue = part.split("="); | |
| 17962 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 17963 } | |
| 17964 } | |
| 17965 | |
| 17966 | |
| 17967 var h = { | |
| 17968 "content-type" : "application/json; charset=utf-8", | |
| 17969 }; | |
| 17970 var resp = convert.JSON.encode(buildMobileCarriersListResponse()); | |
| 17971 return new async.Future.value(stringResponse(200, h, resp)); | |
| 17972 }), true); | |
| 17973 res.list(arg_profileId).then(unittest.expectAsync(((api.MobileCarriersList
Response response) { | |
| 17974 checkMobileCarriersListResponse(response); | |
| 17975 }))); | |
| 17976 }); | |
| 17977 | |
| 17978 }); | |
| 17979 | |
| 17980 | |
| 17981 unittest.group("resource-OperatingSystemVersionsResourceApi", () { | |
| 17982 unittest.test("method--get", () { | |
| 17983 | |
| 17984 var mock = new HttpServerMock(); | |
| 17985 api.OperatingSystemVersionsResourceApi res = new api.DfareportingApi(mock)
.operatingSystemVersions; | |
| 17986 var arg_profileId = "foo"; | |
| 17987 var arg_id = "foo"; | |
| 17988 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 17989 var path = (req.url).path; | |
| 17990 var pathOffset = 0; | |
| 17991 var index; | |
| 17992 var subPart; | |
| 17993 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 17994 pathOffset += 1; | |
| 17995 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 17996 pathOffset += 18; | |
| 17997 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 17998 pathOffset += 13; | |
| 17999 index = path.indexOf("/operatingSystemVersions/", 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_profileId")); | |
| 18004 unittest.expect(path.substring(pathOffset, pathOffset + 25), unittest.eq
uals("/operatingSystemVersions/")); | |
| 18005 pathOffset += 25; | |
| 18006 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 18007 pathOffset = path.length; | |
| 18008 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 18009 | |
| 18010 var query = (req.url).query; | |
| 18011 var queryOffset = 0; | |
| 18012 var queryMap = {}; | |
| 18013 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 18014 parseBool(n) { | |
| 18015 if (n == "true") return true; | |
| 18016 if (n == "false") return false; | |
| 18017 if (n == null) return null; | |
| 18018 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 18019 } | |
| 18020 if (query.length > 0) { | |
| 18021 for (var part in query.split("&")) { | |
| 18022 var keyvalue = part.split("="); | |
| 18023 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 18024 } | |
| 18025 } | |
| 18026 | |
| 18027 | |
| 18028 var h = { | |
| 18029 "content-type" : "application/json; charset=utf-8", | |
| 18030 }; | |
| 18031 var resp = convert.JSON.encode(buildOperatingSystemVersion()); | |
| 18032 return new async.Future.value(stringResponse(200, h, resp)); | |
| 18033 }), true); | |
| 18034 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.OperatingSy
stemVersion response) { | |
| 18035 checkOperatingSystemVersion(response); | |
| 18036 }))); | |
| 18037 }); | |
| 18038 | |
| 18039 unittest.test("method--list", () { | |
| 18040 | |
| 18041 var mock = new HttpServerMock(); | |
| 18042 api.OperatingSystemVersionsResourceApi res = new api.DfareportingApi(mock)
.operatingSystemVersions; | |
| 18043 var arg_profileId = "foo"; | |
| 18044 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 18045 var path = (req.url).path; | |
| 18046 var pathOffset = 0; | |
| 18047 var index; | |
| 18048 var subPart; | |
| 18049 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 18050 pathOffset += 1; | |
| 18051 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 18052 pathOffset += 18; | |
| 18053 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 18054 pathOffset += 13; | |
| 18055 index = path.indexOf("/operatingSystemVersions", pathOffset); | |
| 18056 unittest.expect(index >= 0, unittest.isTrue); | |
| 18057 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 18058 pathOffset = index; | |
| 18059 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 18060 unittest.expect(path.substring(pathOffset, pathOffset + 24), unittest.eq
uals("/operatingSystemVersions")); | |
| 18061 pathOffset += 24; | |
| 18062 | |
| 18063 var query = (req.url).query; | |
| 18064 var queryOffset = 0; | |
| 18065 var queryMap = {}; | |
| 18066 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 18067 parseBool(n) { | |
| 18068 if (n == "true") return true; | |
| 18069 if (n == "false") return false; | |
| 18070 if (n == null) return null; | |
| 18071 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 18072 } | |
| 18073 if (query.length > 0) { | |
| 18074 for (var part in query.split("&")) { | |
| 18075 var keyvalue = part.split("="); | |
| 18076 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 18077 } | |
| 18078 } | |
| 18079 | |
| 18080 | |
| 18081 var h = { | |
| 18082 "content-type" : "application/json; charset=utf-8", | |
| 18083 }; | |
| 18084 var resp = convert.JSON.encode(buildOperatingSystemVersionsListResponse(
)); | |
| 18085 return new async.Future.value(stringResponse(200, h, resp)); | |
| 18086 }), true); | |
| 18087 res.list(arg_profileId).then(unittest.expectAsync(((api.OperatingSystemVer
sionsListResponse response) { | |
| 18088 checkOperatingSystemVersionsListResponse(response); | |
| 18089 }))); | |
| 18090 }); | |
| 18091 | |
| 18092 }); | |
| 18093 | |
| 18094 | |
| 18095 unittest.group("resource-OperatingSystemsResourceApi", () { | |
| 18096 unittest.test("method--get", () { | |
| 18097 | |
| 18098 var mock = new HttpServerMock(); | |
| 18099 api.OperatingSystemsResourceApi res = new api.DfareportingApi(mock).operat
ingSystems; | |
| 18100 var arg_profileId = "foo"; | |
| 18101 var arg_dartId = "foo"; | |
| 18102 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 18103 var path = (req.url).path; | |
| 18104 var pathOffset = 0; | |
| 18105 var index; | |
| 18106 var subPart; | |
| 18107 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 18108 pathOffset += 1; | |
| 18109 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 18110 pathOffset += 18; | |
| 18111 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 18112 pathOffset += 13; | |
| 18113 index = path.indexOf("/operatingSystems/", pathOffset); | |
| 18114 unittest.expect(index >= 0, unittest.isTrue); | |
| 18115 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 18116 pathOffset = index; | |
| 18117 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 18118 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("/operatingSystems/")); | |
| 18119 pathOffset += 18; | |
| 18120 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 18121 pathOffset = path.length; | |
| 18122 unittest.expect(subPart, unittest.equals("$arg_dartId")); | |
| 18123 | |
| 18124 var query = (req.url).query; | |
| 18125 var queryOffset = 0; | |
| 18126 var queryMap = {}; | |
| 18127 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 18128 parseBool(n) { | |
| 18129 if (n == "true") return true; | |
| 18130 if (n == "false") return false; | |
| 18131 if (n == null) return null; | |
| 18132 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 18133 } | |
| 18134 if (query.length > 0) { | |
| 18135 for (var part in query.split("&")) { | |
| 18136 var keyvalue = part.split("="); | |
| 18137 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 18138 } | |
| 18139 } | |
| 18140 | |
| 18141 | |
| 18142 var h = { | |
| 18143 "content-type" : "application/json; charset=utf-8", | |
| 18144 }; | |
| 18145 var resp = convert.JSON.encode(buildOperatingSystem()); | |
| 18146 return new async.Future.value(stringResponse(200, h, resp)); | |
| 18147 }), true); | |
| 18148 res.get(arg_profileId, arg_dartId).then(unittest.expectAsync(((api.Operati
ngSystem response) { | |
| 18149 checkOperatingSystem(response); | |
| 18150 }))); | |
| 18151 }); | |
| 18152 | |
| 18153 unittest.test("method--list", () { | |
| 18154 | |
| 18155 var mock = new HttpServerMock(); | |
| 18156 api.OperatingSystemsResourceApi res = new api.DfareportingApi(mock).operat
ingSystems; | |
| 18157 var arg_profileId = "foo"; | |
| 18158 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 18159 var path = (req.url).path; | |
| 18160 var pathOffset = 0; | |
| 18161 var index; | |
| 18162 var subPart; | |
| 18163 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 18164 pathOffset += 1; | |
| 18165 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 18166 pathOffset += 18; | |
| 18167 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 18168 pathOffset += 13; | |
| 18169 index = path.indexOf("/operatingSystems", pathOffset); | |
| 18170 unittest.expect(index >= 0, unittest.isTrue); | |
| 18171 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 18172 pathOffset = index; | |
| 18173 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 18174 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("/operatingSystems")); | |
| 18175 pathOffset += 17; | |
| 18176 | |
| 18177 var query = (req.url).query; | |
| 18178 var queryOffset = 0; | |
| 18179 var queryMap = {}; | |
| 18180 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 18181 parseBool(n) { | |
| 18182 if (n == "true") return true; | |
| 18183 if (n == "false") return false; | |
| 18184 if (n == null) return null; | |
| 18185 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 18186 } | |
| 18187 if (query.length > 0) { | |
| 18188 for (var part in query.split("&")) { | |
| 18189 var keyvalue = part.split("="); | |
| 18190 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 18191 } | |
| 18192 } | |
| 18193 | |
| 18194 | |
| 18195 var h = { | |
| 18196 "content-type" : "application/json; charset=utf-8", | |
| 18197 }; | |
| 18198 var resp = convert.JSON.encode(buildOperatingSystemsListResponse()); | |
| 18199 return new async.Future.value(stringResponse(200, h, resp)); | |
| 18200 }), true); | |
| 18201 res.list(arg_profileId).then(unittest.expectAsync(((api.OperatingSystemsLi
stResponse response) { | |
| 18202 checkOperatingSystemsListResponse(response); | |
| 18203 }))); | |
| 18204 }); | |
| 18205 | |
| 18206 }); | |
| 18207 | |
| 18208 | |
| 18209 unittest.group("resource-OrderDocumentsResourceApi", () { | |
| 18210 unittest.test("method--get", () { | |
| 18211 | |
| 18212 var mock = new HttpServerMock(); | |
| 18213 api.OrderDocumentsResourceApi res = new api.DfareportingApi(mock).orderDoc
uments; | |
| 18214 var arg_profileId = "foo"; | |
| 18215 var arg_projectId = "foo"; | |
| 18216 var arg_id = "foo"; | |
| 18217 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 18218 var path = (req.url).path; | |
| 18219 var pathOffset = 0; | |
| 18220 var index; | |
| 18221 var subPart; | |
| 18222 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 18223 pathOffset += 1; | |
| 18224 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 18225 pathOffset += 18; | |
| 18226 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 18227 pathOffset += 13; | |
| 18228 index = path.indexOf("/projects/", pathOffset); | |
| 18229 unittest.expect(index >= 0, unittest.isTrue); | |
| 18230 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 18231 pathOffset = index; | |
| 18232 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 18233 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/projects/")); | |
| 18234 pathOffset += 10; | |
| 18235 index = path.indexOf("/orderDocuments/", pathOffset); | |
| 18236 unittest.expect(index >= 0, unittest.isTrue); | |
| 18237 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 18238 pathOffset = index; | |
| 18239 unittest.expect(subPart, unittest.equals("$arg_projectId")); | |
| 18240 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq
uals("/orderDocuments/")); | |
| 18241 pathOffset += 16; | |
| 18242 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 18243 pathOffset = path.length; | |
| 18244 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 18245 | |
| 18246 var query = (req.url).query; | |
| 18247 var queryOffset = 0; | |
| 18248 var queryMap = {}; | |
| 18249 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 18250 parseBool(n) { | |
| 18251 if (n == "true") return true; | |
| 18252 if (n == "false") return false; | |
| 18253 if (n == null) return null; | |
| 18254 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 18255 } | |
| 18256 if (query.length > 0) { | |
| 18257 for (var part in query.split("&")) { | |
| 18258 var keyvalue = part.split("="); | |
| 18259 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 18260 } | |
| 18261 } | |
| 18262 | |
| 18263 | |
| 18264 var h = { | |
| 18265 "content-type" : "application/json; charset=utf-8", | |
| 18266 }; | |
| 18267 var resp = convert.JSON.encode(buildOrderDocument()); | |
| 18268 return new async.Future.value(stringResponse(200, h, resp)); | |
| 18269 }), true); | |
| 18270 res.get(arg_profileId, arg_projectId, arg_id).then(unittest.expectAsync(((
api.OrderDocument response) { | |
| 18271 checkOrderDocument(response); | |
| 18272 }))); | |
| 18273 }); | |
| 18274 | |
| 18275 unittest.test("method--list", () { | |
| 18276 | |
| 18277 var mock = new HttpServerMock(); | |
| 18278 api.OrderDocumentsResourceApi res = new api.DfareportingApi(mock).orderDoc
uments; | |
| 18279 var arg_profileId = "foo"; | |
| 18280 var arg_projectId = "foo"; | |
| 18281 var arg_approved = true; | |
| 18282 var arg_ids = buildUnnamed423(); | |
| 18283 var arg_maxResults = 42; | |
| 18284 var arg_orderId = buildUnnamed424(); | |
| 18285 var arg_pageToken = "foo"; | |
| 18286 var arg_searchString = "foo"; | |
| 18287 var arg_siteId = buildUnnamed425(); | |
| 18288 var arg_sortField = "foo"; | |
| 18289 var arg_sortOrder = "foo"; | |
| 18290 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 18291 var path = (req.url).path; | |
| 18292 var pathOffset = 0; | |
| 18293 var index; | |
| 18294 var subPart; | |
| 18295 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 18296 pathOffset += 1; | |
| 18297 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 18298 pathOffset += 18; | |
| 18299 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 18300 pathOffset += 13; | |
| 18301 index = path.indexOf("/projects/", pathOffset); | |
| 18302 unittest.expect(index >= 0, unittest.isTrue); | |
| 18303 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 18304 pathOffset = index; | |
| 18305 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 18306 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/projects/")); | |
| 18307 pathOffset += 10; | |
| 18308 index = path.indexOf("/orderDocuments", pathOffset); | |
| 18309 unittest.expect(index >= 0, unittest.isTrue); | |
| 18310 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 18311 pathOffset = index; | |
| 18312 unittest.expect(subPart, unittest.equals("$arg_projectId")); | |
| 18313 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/orderDocuments")); | |
| 18314 pathOffset += 15; | |
| 18315 | |
| 18316 var query = (req.url).query; | |
| 18317 var queryOffset = 0; | |
| 18318 var queryMap = {}; | |
| 18319 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 18320 parseBool(n) { | |
| 18321 if (n == "true") return true; | |
| 18322 if (n == "false") return false; | |
| 18323 if (n == null) return null; | |
| 18324 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 18325 } | |
| 18326 if (query.length > 0) { | |
| 18327 for (var part in query.split("&")) { | |
| 18328 var keyvalue = part.split("="); | |
| 18329 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 18330 } | |
| 18331 } | |
| 18332 unittest.expect(queryMap["approved"].first, unittest.equals("$arg_approv
ed")); | |
| 18333 unittest.expect(queryMap["ids"], unittest.equals(arg_ids)); | |
| 18334 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | |
| 18335 unittest.expect(queryMap["orderId"], unittest.equals(arg_orderId)); | |
| 18336 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 18337 unittest.expect(queryMap["searchString"].first, unittest.equals(arg_sear
chString)); | |
| 18338 unittest.expect(queryMap["siteId"], unittest.equals(arg_siteId)); | |
| 18339 unittest.expect(queryMap["sortField"].first, unittest.equals(arg_sortFie
ld)); | |
| 18340 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | |
| 18341 | |
| 18342 | |
| 18343 var h = { | |
| 18344 "content-type" : "application/json; charset=utf-8", | |
| 18345 }; | |
| 18346 var resp = convert.JSON.encode(buildOrderDocumentsListResponse()); | |
| 18347 return new async.Future.value(stringResponse(200, h, resp)); | |
| 18348 }), true); | |
| 18349 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) { | |
| 18350 checkOrderDocumentsListResponse(response); | |
| 18351 }))); | |
| 18352 }); | |
| 18353 | |
| 18354 }); | |
| 18355 | |
| 18356 | |
| 18357 unittest.group("resource-OrdersResourceApi", () { | |
| 18358 unittest.test("method--get", () { | |
| 18359 | |
| 18360 var mock = new HttpServerMock(); | |
| 18361 api.OrdersResourceApi res = new api.DfareportingApi(mock).orders; | |
| 18362 var arg_profileId = "foo"; | |
| 18363 var arg_projectId = "foo"; | |
| 18364 var arg_id = "foo"; | |
| 18365 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 18366 var path = (req.url).path; | |
| 18367 var pathOffset = 0; | |
| 18368 var index; | |
| 18369 var subPart; | |
| 18370 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 18371 pathOffset += 1; | |
| 18372 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 18373 pathOffset += 18; | |
| 18374 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 18375 pathOffset += 13; | |
| 18376 index = path.indexOf("/projects/", pathOffset); | |
| 18377 unittest.expect(index >= 0, unittest.isTrue); | |
| 18378 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 18379 pathOffset = index; | |
| 18380 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 18381 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/projects/")); | |
| 18382 pathOffset += 10; | |
| 18383 index = path.indexOf("/orders/", pathOffset); | |
| 18384 unittest.expect(index >= 0, unittest.isTrue); | |
| 18385 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 18386 pathOffset = index; | |
| 18387 unittest.expect(subPart, unittest.equals("$arg_projectId")); | |
| 18388 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("/orders/")); | |
| 18389 pathOffset += 8; | |
| 18390 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 18391 pathOffset = path.length; | |
| 18392 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 18393 | |
| 18394 var query = (req.url).query; | |
| 18395 var queryOffset = 0; | |
| 18396 var queryMap = {}; | |
| 18397 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 18398 parseBool(n) { | |
| 18399 if (n == "true") return true; | |
| 18400 if (n == "false") return false; | |
| 18401 if (n == null) return null; | |
| 18402 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 18403 } | |
| 18404 if (query.length > 0) { | |
| 18405 for (var part in query.split("&")) { | |
| 18406 var keyvalue = part.split("="); | |
| 18407 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 18408 } | |
| 18409 } | |
| 18410 | |
| 18411 | |
| 18412 var h = { | |
| 18413 "content-type" : "application/json; charset=utf-8", | |
| 18414 }; | |
| 18415 var resp = convert.JSON.encode(buildOrder()); | |
| 18416 return new async.Future.value(stringResponse(200, h, resp)); | |
| 18417 }), true); | |
| 18418 res.get(arg_profileId, arg_projectId, arg_id).then(unittest.expectAsync(((
api.Order response) { | |
| 18419 checkOrder(response); | |
| 18420 }))); | |
| 18421 }); | |
| 18422 | |
| 18423 unittest.test("method--list", () { | |
| 18424 | |
| 18425 var mock = new HttpServerMock(); | |
| 18426 api.OrdersResourceApi res = new api.DfareportingApi(mock).orders; | |
| 18427 var arg_profileId = "foo"; | |
| 18428 var arg_projectId = "foo"; | |
| 18429 var arg_ids = buildUnnamed426(); | |
| 18430 var arg_maxResults = 42; | |
| 18431 var arg_pageToken = "foo"; | |
| 18432 var arg_searchString = "foo"; | |
| 18433 var arg_siteId = buildUnnamed427(); | |
| 18434 var arg_sortField = "foo"; | |
| 18435 var arg_sortOrder = "foo"; | |
| 18436 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 18437 var path = (req.url).path; | |
| 18438 var pathOffset = 0; | |
| 18439 var index; | |
| 18440 var subPart; | |
| 18441 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 18442 pathOffset += 1; | |
| 18443 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 18444 pathOffset += 18; | |
| 18445 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 18446 pathOffset += 13; | |
| 18447 index = path.indexOf("/projects/", pathOffset); | |
| 18448 unittest.expect(index >= 0, unittest.isTrue); | |
| 18449 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 18450 pathOffset = index; | |
| 18451 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 18452 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/projects/")); | |
| 18453 pathOffset += 10; | |
| 18454 index = path.indexOf("/orders", pathOffset); | |
| 18455 unittest.expect(index >= 0, unittest.isTrue); | |
| 18456 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 18457 pathOffset = index; | |
| 18458 unittest.expect(subPart, unittest.equals("$arg_projectId")); | |
| 18459 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ
als("/orders")); | |
| 18460 pathOffset += 7; | |
| 18461 | |
| 18462 var query = (req.url).query; | |
| 18463 var queryOffset = 0; | |
| 18464 var queryMap = {}; | |
| 18465 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 18466 parseBool(n) { | |
| 18467 if (n == "true") return true; | |
| 18468 if (n == "false") return false; | |
| 18469 if (n == null) return null; | |
| 18470 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 18471 } | |
| 18472 if (query.length > 0) { | |
| 18473 for (var part in query.split("&")) { | |
| 18474 var keyvalue = part.split("="); | |
| 18475 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 18476 } | |
| 18477 } | |
| 18478 unittest.expect(queryMap["ids"], unittest.equals(arg_ids)); | |
| 18479 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | |
| 18480 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 18481 unittest.expect(queryMap["searchString"].first, unittest.equals(arg_sear
chString)); | |
| 18482 unittest.expect(queryMap["siteId"], unittest.equals(arg_siteId)); | |
| 18483 unittest.expect(queryMap["sortField"].first, unittest.equals(arg_sortFie
ld)); | |
| 18484 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | |
| 18485 | |
| 18486 | |
| 18487 var h = { | |
| 18488 "content-type" : "application/json; charset=utf-8", | |
| 18489 }; | |
| 18490 var resp = convert.JSON.encode(buildOrdersListResponse()); | |
| 18491 return new async.Future.value(stringResponse(200, h, resp)); | |
| 18492 }), true); | |
| 18493 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) { | |
| 18494 checkOrdersListResponse(response); | |
| 18495 }))); | |
| 18496 }); | |
| 18497 | |
| 18498 }); | |
| 18499 | |
| 18500 | |
| 18501 unittest.group("resource-PlacementGroupsResourceApi", () { | |
| 18502 unittest.test("method--get", () { | |
| 18503 | |
| 18504 var mock = new HttpServerMock(); | |
| 18505 api.PlacementGroupsResourceApi res = new api.DfareportingApi(mock).placeme
ntGroups; | |
| 18506 var arg_profileId = "foo"; | |
| 18507 var arg_id = "foo"; | |
| 18508 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 18509 var path = (req.url).path; | |
| 18510 var pathOffset = 0; | |
| 18511 var index; | |
| 18512 var subPart; | |
| 18513 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 18514 pathOffset += 1; | |
| 18515 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 18516 pathOffset += 18; | |
| 18517 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 18518 pathOffset += 13; | |
| 18519 index = path.indexOf("/placementGroups/", pathOffset); | |
| 18520 unittest.expect(index >= 0, unittest.isTrue); | |
| 18521 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 18522 pathOffset = index; | |
| 18523 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 18524 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("/placementGroups/")); | |
| 18525 pathOffset += 17; | |
| 18526 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 18527 pathOffset = path.length; | |
| 18528 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 18529 | |
| 18530 var query = (req.url).query; | |
| 18531 var queryOffset = 0; | |
| 18532 var queryMap = {}; | |
| 18533 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 18534 parseBool(n) { | |
| 18535 if (n == "true") return true; | |
| 18536 if (n == "false") return false; | |
| 18537 if (n == null) return null; | |
| 18538 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 18539 } | |
| 18540 if (query.length > 0) { | |
| 18541 for (var part in query.split("&")) { | |
| 18542 var keyvalue = part.split("="); | |
| 18543 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 18544 } | |
| 18545 } | |
| 18546 | |
| 18547 | |
| 18548 var h = { | |
| 18549 "content-type" : "application/json; charset=utf-8", | |
| 18550 }; | |
| 18551 var resp = convert.JSON.encode(buildPlacementGroup()); | |
| 18552 return new async.Future.value(stringResponse(200, h, resp)); | |
| 18553 }), true); | |
| 18554 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.PlacementGr
oup response) { | |
| 18555 checkPlacementGroup(response); | |
| 18556 }))); | |
| 18557 }); | |
| 18558 | |
| 18559 unittest.test("method--insert", () { | |
| 18560 | |
| 18561 var mock = new HttpServerMock(); | |
| 18562 api.PlacementGroupsResourceApi res = new api.DfareportingApi(mock).placeme
ntGroups; | |
| 18563 var arg_request = buildPlacementGroup(); | |
| 18564 var arg_profileId = "foo"; | |
| 18565 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 18566 var obj = new api.PlacementGroup.fromJson(json); | |
| 18567 checkPlacementGroup(obj); | |
| 18568 | |
| 18569 var path = (req.url).path; | |
| 18570 var pathOffset = 0; | |
| 18571 var index; | |
| 18572 var subPart; | |
| 18573 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 18574 pathOffset += 1; | |
| 18575 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 18576 pathOffset += 18; | |
| 18577 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 18578 pathOffset += 13; | |
| 18579 index = path.indexOf("/placementGroups", pathOffset); | |
| 18580 unittest.expect(index >= 0, unittest.isTrue); | |
| 18581 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 18582 pathOffset = index; | |
| 18583 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 18584 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq
uals("/placementGroups")); | |
| 18585 pathOffset += 16; | |
| 18586 | |
| 18587 var query = (req.url).query; | |
| 18588 var queryOffset = 0; | |
| 18589 var queryMap = {}; | |
| 18590 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 18591 parseBool(n) { | |
| 18592 if (n == "true") return true; | |
| 18593 if (n == "false") return false; | |
| 18594 if (n == null) return null; | |
| 18595 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 18596 } | |
| 18597 if (query.length > 0) { | |
| 18598 for (var part in query.split("&")) { | |
| 18599 var keyvalue = part.split("="); | |
| 18600 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 18601 } | |
| 18602 } | |
| 18603 | |
| 18604 | |
| 18605 var h = { | |
| 18606 "content-type" : "application/json; charset=utf-8", | |
| 18607 }; | |
| 18608 var resp = convert.JSON.encode(buildPlacementGroup()); | |
| 18609 return new async.Future.value(stringResponse(200, h, resp)); | |
| 18610 }), true); | |
| 18611 res.insert(arg_request, arg_profileId).then(unittest.expectAsync(((api.Pla
cementGroup response) { | |
| 18612 checkPlacementGroup(response); | |
| 18613 }))); | |
| 18614 }); | |
| 18615 | |
| 18616 unittest.test("method--list", () { | |
| 18617 | |
| 18618 var mock = new HttpServerMock(); | |
| 18619 api.PlacementGroupsResourceApi res = new api.DfareportingApi(mock).placeme
ntGroups; | |
| 18620 var arg_profileId = "foo"; | |
| 18621 var arg_advertiserIds = buildUnnamed428(); | |
| 18622 var arg_archived = true; | |
| 18623 var arg_campaignIds = buildUnnamed429(); | |
| 18624 var arg_contentCategoryIds = buildUnnamed430(); | |
| 18625 var arg_directorySiteIds = buildUnnamed431(); | |
| 18626 var arg_ids = buildUnnamed432(); | |
| 18627 var arg_maxEndDate = "foo"; | |
| 18628 var arg_maxResults = 42; | |
| 18629 var arg_maxStartDate = "foo"; | |
| 18630 var arg_minEndDate = "foo"; | |
| 18631 var arg_minStartDate = "foo"; | |
| 18632 var arg_pageToken = "foo"; | |
| 18633 var arg_placementGroupType = "foo"; | |
| 18634 var arg_placementStrategyIds = buildUnnamed433(); | |
| 18635 var arg_pricingTypes = buildUnnamed434(); | |
| 18636 var arg_searchString = "foo"; | |
| 18637 var arg_siteIds = buildUnnamed435(); | |
| 18638 var arg_sortField = "foo"; | |
| 18639 var arg_sortOrder = "foo"; | |
| 18640 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 18641 var path = (req.url).path; | |
| 18642 var pathOffset = 0; | |
| 18643 var index; | |
| 18644 var subPart; | |
| 18645 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 18646 pathOffset += 1; | |
| 18647 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 18648 pathOffset += 18; | |
| 18649 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 18650 pathOffset += 13; | |
| 18651 index = path.indexOf("/placementGroups", pathOffset); | |
| 18652 unittest.expect(index >= 0, unittest.isTrue); | |
| 18653 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 18654 pathOffset = index; | |
| 18655 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 18656 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq
uals("/placementGroups")); | |
| 18657 pathOffset += 16; | |
| 18658 | |
| 18659 var query = (req.url).query; | |
| 18660 var queryOffset = 0; | |
| 18661 var queryMap = {}; | |
| 18662 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 18663 parseBool(n) { | |
| 18664 if (n == "true") return true; | |
| 18665 if (n == "false") return false; | |
| 18666 if (n == null) return null; | |
| 18667 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 18668 } | |
| 18669 if (query.length > 0) { | |
| 18670 for (var part in query.split("&")) { | |
| 18671 var keyvalue = part.split("="); | |
| 18672 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 18673 } | |
| 18674 } | |
| 18675 unittest.expect(queryMap["advertiserIds"], unittest.equals(arg_advertise
rIds)); | |
| 18676 unittest.expect(queryMap["archived"].first, unittest.equals("$arg_archiv
ed")); | |
| 18677 unittest.expect(queryMap["campaignIds"], unittest.equals(arg_campaignIds
)); | |
| 18678 unittest.expect(queryMap["contentCategoryIds"], unittest.equals(arg_cont
entCategoryIds)); | |
| 18679 unittest.expect(queryMap["directorySiteIds"], unittest.equals(arg_direct
orySiteIds)); | |
| 18680 unittest.expect(queryMap["ids"], unittest.equals(arg_ids)); | |
| 18681 unittest.expect(queryMap["maxEndDate"].first, unittest.equals(arg_maxEnd
Date)); | |
| 18682 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | |
| 18683 unittest.expect(queryMap["maxStartDate"].first, unittest.equals(arg_maxS
tartDate)); | |
| 18684 unittest.expect(queryMap["minEndDate"].first, unittest.equals(arg_minEnd
Date)); | |
| 18685 unittest.expect(queryMap["minStartDate"].first, unittest.equals(arg_minS
tartDate)); | |
| 18686 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 18687 unittest.expect(queryMap["placementGroupType"].first, unittest.equals(ar
g_placementGroupType)); | |
| 18688 unittest.expect(queryMap["placementStrategyIds"], unittest.equals(arg_pl
acementStrategyIds)); | |
| 18689 unittest.expect(queryMap["pricingTypes"], unittest.equals(arg_pricingTyp
es)); | |
| 18690 unittest.expect(queryMap["searchString"].first, unittest.equals(arg_sear
chString)); | |
| 18691 unittest.expect(queryMap["siteIds"], unittest.equals(arg_siteIds)); | |
| 18692 unittest.expect(queryMap["sortField"].first, unittest.equals(arg_sortFie
ld)); | |
| 18693 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | |
| 18694 | |
| 18695 | |
| 18696 var h = { | |
| 18697 "content-type" : "application/json; charset=utf-8", | |
| 18698 }; | |
| 18699 var resp = convert.JSON.encode(buildPlacementGroupsListResponse()); | |
| 18700 return new async.Future.value(stringResponse(200, h, resp)); | |
| 18701 }), true); | |
| 18702 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) { | |
| 18703 checkPlacementGroupsListResponse(response); | |
| 18704 }))); | |
| 18705 }); | |
| 18706 | |
| 18707 unittest.test("method--patch", () { | |
| 18708 | |
| 18709 var mock = new HttpServerMock(); | |
| 18710 api.PlacementGroupsResourceApi res = new api.DfareportingApi(mock).placeme
ntGroups; | |
| 18711 var arg_request = buildPlacementGroup(); | |
| 18712 var arg_profileId = "foo"; | |
| 18713 var arg_id = "foo"; | |
| 18714 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 18715 var obj = new api.PlacementGroup.fromJson(json); | |
| 18716 checkPlacementGroup(obj); | |
| 18717 | |
| 18718 var path = (req.url).path; | |
| 18719 var pathOffset = 0; | |
| 18720 var index; | |
| 18721 var subPart; | |
| 18722 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 18723 pathOffset += 1; | |
| 18724 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 18725 pathOffset += 18; | |
| 18726 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 18727 pathOffset += 13; | |
| 18728 index = path.indexOf("/placementGroups", pathOffset); | |
| 18729 unittest.expect(index >= 0, unittest.isTrue); | |
| 18730 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 18731 pathOffset = index; | |
| 18732 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 18733 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq
uals("/placementGroups")); | |
| 18734 pathOffset += 16; | |
| 18735 | |
| 18736 var query = (req.url).query; | |
| 18737 var queryOffset = 0; | |
| 18738 var queryMap = {}; | |
| 18739 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 18740 parseBool(n) { | |
| 18741 if (n == "true") return true; | |
| 18742 if (n == "false") return false; | |
| 18743 if (n == null) return null; | |
| 18744 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 18745 } | |
| 18746 if (query.length > 0) { | |
| 18747 for (var part in query.split("&")) { | |
| 18748 var keyvalue = part.split("="); | |
| 18749 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 18750 } | |
| 18751 } | |
| 18752 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); | |
| 18753 | |
| 18754 | |
| 18755 var h = { | |
| 18756 "content-type" : "application/json; charset=utf-8", | |
| 18757 }; | |
| 18758 var resp = convert.JSON.encode(buildPlacementGroup()); | |
| 18759 return new async.Future.value(stringResponse(200, h, resp)); | |
| 18760 }), true); | |
| 18761 res.patch(arg_request, arg_profileId, arg_id).then(unittest.expectAsync(((
api.PlacementGroup response) { | |
| 18762 checkPlacementGroup(response); | |
| 18763 }))); | |
| 18764 }); | |
| 18765 | |
| 18766 unittest.test("method--update", () { | |
| 18767 | |
| 18768 var mock = new HttpServerMock(); | |
| 18769 api.PlacementGroupsResourceApi res = new api.DfareportingApi(mock).placeme
ntGroups; | |
| 18770 var arg_request = buildPlacementGroup(); | |
| 18771 var arg_profileId = "foo"; | |
| 18772 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 18773 var obj = new api.PlacementGroup.fromJson(json); | |
| 18774 checkPlacementGroup(obj); | |
| 18775 | |
| 18776 var path = (req.url).path; | |
| 18777 var pathOffset = 0; | |
| 18778 var index; | |
| 18779 var subPart; | |
| 18780 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 18781 pathOffset += 1; | |
| 18782 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 18783 pathOffset += 18; | |
| 18784 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 18785 pathOffset += 13; | |
| 18786 index = path.indexOf("/placementGroups", pathOffset); | |
| 18787 unittest.expect(index >= 0, unittest.isTrue); | |
| 18788 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 18789 pathOffset = index; | |
| 18790 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 18791 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq
uals("/placementGroups")); | |
| 18792 pathOffset += 16; | |
| 18793 | |
| 18794 var query = (req.url).query; | |
| 18795 var queryOffset = 0; | |
| 18796 var queryMap = {}; | |
| 18797 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 18798 parseBool(n) { | |
| 18799 if (n == "true") return true; | |
| 18800 if (n == "false") return false; | |
| 18801 if (n == null) return null; | |
| 18802 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 18803 } | |
| 18804 if (query.length > 0) { | |
| 18805 for (var part in query.split("&")) { | |
| 18806 var keyvalue = part.split("="); | |
| 18807 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 18808 } | |
| 18809 } | |
| 18810 | |
| 18811 | |
| 18812 var h = { | |
| 18813 "content-type" : "application/json; charset=utf-8", | |
| 18814 }; | |
| 18815 var resp = convert.JSON.encode(buildPlacementGroup()); | |
| 18816 return new async.Future.value(stringResponse(200, h, resp)); | |
| 18817 }), true); | |
| 18818 res.update(arg_request, arg_profileId).then(unittest.expectAsync(((api.Pla
cementGroup response) { | |
| 18819 checkPlacementGroup(response); | |
| 18820 }))); | |
| 18821 }); | |
| 18822 | |
| 18823 }); | |
| 18824 | |
| 18825 | |
| 18826 unittest.group("resource-PlacementStrategiesResourceApi", () { | |
| 18827 unittest.test("method--delete", () { | |
| 18828 | |
| 18829 var mock = new HttpServerMock(); | |
| 18830 api.PlacementStrategiesResourceApi res = new api.DfareportingApi(mock).pla
cementStrategies; | |
| 18831 var arg_profileId = "foo"; | |
| 18832 var arg_id = "foo"; | |
| 18833 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 18834 var path = (req.url).path; | |
| 18835 var pathOffset = 0; | |
| 18836 var index; | |
| 18837 var subPart; | |
| 18838 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 18839 pathOffset += 1; | |
| 18840 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 18841 pathOffset += 18; | |
| 18842 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 18843 pathOffset += 13; | |
| 18844 index = path.indexOf("/placementStrategies/", pathOffset); | |
| 18845 unittest.expect(index >= 0, unittest.isTrue); | |
| 18846 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 18847 pathOffset = index; | |
| 18848 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 18849 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("/placementStrategies/")); | |
| 18850 pathOffset += 21; | |
| 18851 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 18852 pathOffset = path.length; | |
| 18853 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 18854 | |
| 18855 var query = (req.url).query; | |
| 18856 var queryOffset = 0; | |
| 18857 var queryMap = {}; | |
| 18858 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 18859 parseBool(n) { | |
| 18860 if (n == "true") return true; | |
| 18861 if (n == "false") return false; | |
| 18862 if (n == null) return null; | |
| 18863 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 18864 } | |
| 18865 if (query.length > 0) { | |
| 18866 for (var part in query.split("&")) { | |
| 18867 var keyvalue = part.split("="); | |
| 18868 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 18869 } | |
| 18870 } | |
| 18871 | |
| 18872 | |
| 18873 var h = { | |
| 18874 "content-type" : "application/json; charset=utf-8", | |
| 18875 }; | |
| 18876 var resp = ""; | |
| 18877 return new async.Future.value(stringResponse(200, h, resp)); | |
| 18878 }), true); | |
| 18879 res.delete(arg_profileId, arg_id).then(unittest.expectAsync((_) {})); | |
| 18880 }); | |
| 18881 | |
| 18882 unittest.test("method--get", () { | |
| 18883 | |
| 18884 var mock = new HttpServerMock(); | |
| 18885 api.PlacementStrategiesResourceApi res = new api.DfareportingApi(mock).pla
cementStrategies; | |
| 18886 var arg_profileId = "foo"; | |
| 18887 var arg_id = "foo"; | |
| 18888 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 18889 var path = (req.url).path; | |
| 18890 var pathOffset = 0; | |
| 18891 var index; | |
| 18892 var subPart; | |
| 18893 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 18894 pathOffset += 1; | |
| 18895 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 18896 pathOffset += 18; | |
| 18897 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 18898 pathOffset += 13; | |
| 18899 index = path.indexOf("/placementStrategies/", pathOffset); | |
| 18900 unittest.expect(index >= 0, unittest.isTrue); | |
| 18901 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 18902 pathOffset = index; | |
| 18903 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 18904 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("/placementStrategies/")); | |
| 18905 pathOffset += 21; | |
| 18906 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 18907 pathOffset = path.length; | |
| 18908 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 18909 | |
| 18910 var query = (req.url).query; | |
| 18911 var queryOffset = 0; | |
| 18912 var queryMap = {}; | |
| 18913 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 18914 parseBool(n) { | |
| 18915 if (n == "true") return true; | |
| 18916 if (n == "false") return false; | |
| 18917 if (n == null) return null; | |
| 18918 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 18919 } | |
| 18920 if (query.length > 0) { | |
| 18921 for (var part in query.split("&")) { | |
| 18922 var keyvalue = part.split("="); | |
| 18923 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 18924 } | |
| 18925 } | |
| 18926 | |
| 18927 | |
| 18928 var h = { | |
| 18929 "content-type" : "application/json; charset=utf-8", | |
| 18930 }; | |
| 18931 var resp = convert.JSON.encode(buildPlacementStrategy()); | |
| 18932 return new async.Future.value(stringResponse(200, h, resp)); | |
| 18933 }), true); | |
| 18934 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.PlacementSt
rategy response) { | |
| 18935 checkPlacementStrategy(response); | |
| 18936 }))); | |
| 18937 }); | |
| 18938 | |
| 18939 unittest.test("method--insert", () { | |
| 18940 | |
| 18941 var mock = new HttpServerMock(); | |
| 18942 api.PlacementStrategiesResourceApi res = new api.DfareportingApi(mock).pla
cementStrategies; | |
| 18943 var arg_request = buildPlacementStrategy(); | |
| 18944 var arg_profileId = "foo"; | |
| 18945 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 18946 var obj = new api.PlacementStrategy.fromJson(json); | |
| 18947 checkPlacementStrategy(obj); | |
| 18948 | |
| 18949 var path = (req.url).path; | |
| 18950 var pathOffset = 0; | |
| 18951 var index; | |
| 18952 var subPart; | |
| 18953 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 18954 pathOffset += 1; | |
| 18955 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 18956 pathOffset += 18; | |
| 18957 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 18958 pathOffset += 13; | |
| 18959 index = path.indexOf("/placementStrategies", pathOffset); | |
| 18960 unittest.expect(index >= 0, unittest.isTrue); | |
| 18961 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 18962 pathOffset = index; | |
| 18963 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 18964 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("/placementStrategies")); | |
| 18965 pathOffset += 20; | |
| 18966 | |
| 18967 var query = (req.url).query; | |
| 18968 var queryOffset = 0; | |
| 18969 var queryMap = {}; | |
| 18970 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 18971 parseBool(n) { | |
| 18972 if (n == "true") return true; | |
| 18973 if (n == "false") return false; | |
| 18974 if (n == null) return null; | |
| 18975 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 18976 } | |
| 18977 if (query.length > 0) { | |
| 18978 for (var part in query.split("&")) { | |
| 18979 var keyvalue = part.split("="); | |
| 18980 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 18981 } | |
| 18982 } | |
| 18983 | |
| 18984 | |
| 18985 var h = { | |
| 18986 "content-type" : "application/json; charset=utf-8", | |
| 18987 }; | |
| 18988 var resp = convert.JSON.encode(buildPlacementStrategy()); | |
| 18989 return new async.Future.value(stringResponse(200, h, resp)); | |
| 18990 }), true); | |
| 18991 res.insert(arg_request, arg_profileId).then(unittest.expectAsync(((api.Pla
cementStrategy response) { | |
| 18992 checkPlacementStrategy(response); | |
| 18993 }))); | |
| 18994 }); | |
| 18995 | |
| 18996 unittest.test("method--list", () { | |
| 18997 | |
| 18998 var mock = new HttpServerMock(); | |
| 18999 api.PlacementStrategiesResourceApi res = new api.DfareportingApi(mock).pla
cementStrategies; | |
| 19000 var arg_profileId = "foo"; | |
| 19001 var arg_ids = buildUnnamed436(); | |
| 19002 var arg_maxResults = 42; | |
| 19003 var arg_pageToken = "foo"; | |
| 19004 var arg_searchString = "foo"; | |
| 19005 var arg_sortField = "foo"; | |
| 19006 var arg_sortOrder = "foo"; | |
| 19007 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 19008 var path = (req.url).path; | |
| 19009 var pathOffset = 0; | |
| 19010 var index; | |
| 19011 var subPart; | |
| 19012 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 19013 pathOffset += 1; | |
| 19014 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 19015 pathOffset += 18; | |
| 19016 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 19017 pathOffset += 13; | |
| 19018 index = path.indexOf("/placementStrategies", pathOffset); | |
| 19019 unittest.expect(index >= 0, unittest.isTrue); | |
| 19020 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 19021 pathOffset = index; | |
| 19022 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 19023 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("/placementStrategies")); | |
| 19024 pathOffset += 20; | |
| 19025 | |
| 19026 var query = (req.url).query; | |
| 19027 var queryOffset = 0; | |
| 19028 var queryMap = {}; | |
| 19029 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 19030 parseBool(n) { | |
| 19031 if (n == "true") return true; | |
| 19032 if (n == "false") return false; | |
| 19033 if (n == null) return null; | |
| 19034 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 19035 } | |
| 19036 if (query.length > 0) { | |
| 19037 for (var part in query.split("&")) { | |
| 19038 var keyvalue = part.split("="); | |
| 19039 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 19040 } | |
| 19041 } | |
| 19042 unittest.expect(queryMap["ids"], unittest.equals(arg_ids)); | |
| 19043 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | |
| 19044 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 19045 unittest.expect(queryMap["searchString"].first, unittest.equals(arg_sear
chString)); | |
| 19046 unittest.expect(queryMap["sortField"].first, unittest.equals(arg_sortFie
ld)); | |
| 19047 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | |
| 19048 | |
| 19049 | |
| 19050 var h = { | |
| 19051 "content-type" : "application/json; charset=utf-8", | |
| 19052 }; | |
| 19053 var resp = convert.JSON.encode(buildPlacementStrategiesListResponse()); | |
| 19054 return new async.Future.value(stringResponse(200, h, resp)); | |
| 19055 }), true); | |
| 19056 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) { | |
| 19057 checkPlacementStrategiesListResponse(response); | |
| 19058 }))); | |
| 19059 }); | |
| 19060 | |
| 19061 unittest.test("method--patch", () { | |
| 19062 | |
| 19063 var mock = new HttpServerMock(); | |
| 19064 api.PlacementStrategiesResourceApi res = new api.DfareportingApi(mock).pla
cementStrategies; | |
| 19065 var arg_request = buildPlacementStrategy(); | |
| 19066 var arg_profileId = "foo"; | |
| 19067 var arg_id = "foo"; | |
| 19068 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 19069 var obj = new api.PlacementStrategy.fromJson(json); | |
| 19070 checkPlacementStrategy(obj); | |
| 19071 | |
| 19072 var path = (req.url).path; | |
| 19073 var pathOffset = 0; | |
| 19074 var index; | |
| 19075 var subPart; | |
| 19076 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 19077 pathOffset += 1; | |
| 19078 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 19079 pathOffset += 18; | |
| 19080 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 19081 pathOffset += 13; | |
| 19082 index = path.indexOf("/placementStrategies", 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_profileId")); | |
| 19087 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("/placementStrategies")); | |
| 19088 pathOffset += 20; | |
| 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["id"].first, unittest.equals(arg_id)); | |
| 19107 | |
| 19108 | |
| 19109 var h = { | |
| 19110 "content-type" : "application/json; charset=utf-8", | |
| 19111 }; | |
| 19112 var resp = convert.JSON.encode(buildPlacementStrategy()); | |
| 19113 return new async.Future.value(stringResponse(200, h, resp)); | |
| 19114 }), true); | |
| 19115 res.patch(arg_request, arg_profileId, arg_id).then(unittest.expectAsync(((
api.PlacementStrategy response) { | |
| 19116 checkPlacementStrategy(response); | |
| 19117 }))); | |
| 19118 }); | |
| 19119 | |
| 19120 unittest.test("method--update", () { | |
| 19121 | |
| 19122 var mock = new HttpServerMock(); | |
| 19123 api.PlacementStrategiesResourceApi res = new api.DfareportingApi(mock).pla
cementStrategies; | |
| 19124 var arg_request = buildPlacementStrategy(); | |
| 19125 var arg_profileId = "foo"; | |
| 19126 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 19127 var obj = new api.PlacementStrategy.fromJson(json); | |
| 19128 checkPlacementStrategy(obj); | |
| 19129 | |
| 19130 var path = (req.url).path; | |
| 19131 var pathOffset = 0; | |
| 19132 var index; | |
| 19133 var subPart; | |
| 19134 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 19135 pathOffset += 1; | |
| 19136 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 19137 pathOffset += 18; | |
| 19138 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 19139 pathOffset += 13; | |
| 19140 index = path.indexOf("/placementStrategies", pathOffset); | |
| 19141 unittest.expect(index >= 0, unittest.isTrue); | |
| 19142 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 19143 pathOffset = index; | |
| 19144 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 19145 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("/placementStrategies")); | |
| 19146 pathOffset += 20; | |
| 19147 | |
| 19148 var query = (req.url).query; | |
| 19149 var queryOffset = 0; | |
| 19150 var queryMap = {}; | |
| 19151 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 19152 parseBool(n) { | |
| 19153 if (n == "true") return true; | |
| 19154 if (n == "false") return false; | |
| 19155 if (n == null) return null; | |
| 19156 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 19157 } | |
| 19158 if (query.length > 0) { | |
| 19159 for (var part in query.split("&")) { | |
| 19160 var keyvalue = part.split("="); | |
| 19161 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 19162 } | |
| 19163 } | |
| 19164 | |
| 19165 | |
| 19166 var h = { | |
| 19167 "content-type" : "application/json; charset=utf-8", | |
| 19168 }; | |
| 19169 var resp = convert.JSON.encode(buildPlacementStrategy()); | |
| 19170 return new async.Future.value(stringResponse(200, h, resp)); | |
| 19171 }), true); | |
| 19172 res.update(arg_request, arg_profileId).then(unittest.expectAsync(((api.Pla
cementStrategy response) { | |
| 19173 checkPlacementStrategy(response); | |
| 19174 }))); | |
| 19175 }); | |
| 19176 | |
| 19177 }); | |
| 19178 | |
| 19179 | |
| 19180 unittest.group("resource-PlacementsResourceApi", () { | |
| 19181 unittest.test("method--generatetags", () { | |
| 19182 | |
| 19183 var mock = new HttpServerMock(); | |
| 19184 api.PlacementsResourceApi res = new api.DfareportingApi(mock).placements; | |
| 19185 var arg_profileId = "foo"; | |
| 19186 var arg_campaignId = "foo"; | |
| 19187 var arg_placementIds = buildUnnamed437(); | |
| 19188 var arg_tagFormats = buildUnnamed438(); | |
| 19189 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 19190 var path = (req.url).path; | |
| 19191 var pathOffset = 0; | |
| 19192 var index; | |
| 19193 var subPart; | |
| 19194 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 19195 pathOffset += 1; | |
| 19196 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 19197 pathOffset += 18; | |
| 19198 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 19199 pathOffset += 13; | |
| 19200 index = path.indexOf("/placements/generatetags", pathOffset); | |
| 19201 unittest.expect(index >= 0, unittest.isTrue); | |
| 19202 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 19203 pathOffset = index; | |
| 19204 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 19205 unittest.expect(path.substring(pathOffset, pathOffset + 24), unittest.eq
uals("/placements/generatetags")); | |
| 19206 pathOffset += 24; | |
| 19207 | |
| 19208 var query = (req.url).query; | |
| 19209 var queryOffset = 0; | |
| 19210 var queryMap = {}; | |
| 19211 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 19212 parseBool(n) { | |
| 19213 if (n == "true") return true; | |
| 19214 if (n == "false") return false; | |
| 19215 if (n == null) return null; | |
| 19216 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 19217 } | |
| 19218 if (query.length > 0) { | |
| 19219 for (var part in query.split("&")) { | |
| 19220 var keyvalue = part.split("="); | |
| 19221 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 19222 } | |
| 19223 } | |
| 19224 unittest.expect(queryMap["campaignId"].first, unittest.equals(arg_campai
gnId)); | |
| 19225 unittest.expect(queryMap["placementIds"], unittest.equals(arg_placementI
ds)); | |
| 19226 unittest.expect(queryMap["tagFormats"], unittest.equals(arg_tagFormats))
; | |
| 19227 | |
| 19228 | |
| 19229 var h = { | |
| 19230 "content-type" : "application/json; charset=utf-8", | |
| 19231 }; | |
| 19232 var resp = convert.JSON.encode(buildPlacementsGenerateTagsResponse()); | |
| 19233 return new async.Future.value(stringResponse(200, h, resp)); | |
| 19234 }), true); | |
| 19235 res.generatetags(arg_profileId, campaignId: arg_campaignId, placementIds:
arg_placementIds, tagFormats: arg_tagFormats).then(unittest.expectAsync(((api.Pl
acementsGenerateTagsResponse response) { | |
| 19236 checkPlacementsGenerateTagsResponse(response); | |
| 19237 }))); | |
| 19238 }); | |
| 19239 | |
| 19240 unittest.test("method--get", () { | |
| 19241 | |
| 19242 var mock = new HttpServerMock(); | |
| 19243 api.PlacementsResourceApi res = new api.DfareportingApi(mock).placements; | |
| 19244 var arg_profileId = "foo"; | |
| 19245 var arg_id = "foo"; | |
| 19246 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 19247 var path = (req.url).path; | |
| 19248 var pathOffset = 0; | |
| 19249 var index; | |
| 19250 var subPart; | |
| 19251 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 19252 pathOffset += 1; | |
| 19253 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 19254 pathOffset += 18; | |
| 19255 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 19256 pathOffset += 13; | |
| 19257 index = path.indexOf("/placements/", pathOffset); | |
| 19258 unittest.expect(index >= 0, unittest.isTrue); | |
| 19259 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 19260 pathOffset = index; | |
| 19261 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 19262 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("/placements/")); | |
| 19263 pathOffset += 12; | |
| 19264 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 19265 pathOffset = path.length; | |
| 19266 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 19267 | |
| 19268 var query = (req.url).query; | |
| 19269 var queryOffset = 0; | |
| 19270 var queryMap = {}; | |
| 19271 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 19272 parseBool(n) { | |
| 19273 if (n == "true") return true; | |
| 19274 if (n == "false") return false; | |
| 19275 if (n == null) return null; | |
| 19276 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 19277 } | |
| 19278 if (query.length > 0) { | |
| 19279 for (var part in query.split("&")) { | |
| 19280 var keyvalue = part.split("="); | |
| 19281 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 19282 } | |
| 19283 } | |
| 19284 | |
| 19285 | |
| 19286 var h = { | |
| 19287 "content-type" : "application/json; charset=utf-8", | |
| 19288 }; | |
| 19289 var resp = convert.JSON.encode(buildPlacement()); | |
| 19290 return new async.Future.value(stringResponse(200, h, resp)); | |
| 19291 }), true); | |
| 19292 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.Placement r
esponse) { | |
| 19293 checkPlacement(response); | |
| 19294 }))); | |
| 19295 }); | |
| 19296 | |
| 19297 unittest.test("method--insert", () { | |
| 19298 | |
| 19299 var mock = new HttpServerMock(); | |
| 19300 api.PlacementsResourceApi res = new api.DfareportingApi(mock).placements; | |
| 19301 var arg_request = buildPlacement(); | |
| 19302 var arg_profileId = "foo"; | |
| 19303 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 19304 var obj = new api.Placement.fromJson(json); | |
| 19305 checkPlacement(obj); | |
| 19306 | |
| 19307 var path = (req.url).path; | |
| 19308 var pathOffset = 0; | |
| 19309 var index; | |
| 19310 var subPart; | |
| 19311 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 19312 pathOffset += 1; | |
| 19313 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 19314 pathOffset += 18; | |
| 19315 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 19316 pathOffset += 13; | |
| 19317 index = path.indexOf("/placements", pathOffset); | |
| 19318 unittest.expect(index >= 0, unittest.isTrue); | |
| 19319 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 19320 pathOffset = index; | |
| 19321 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 19322 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("/placements")); | |
| 19323 pathOffset += 11; | |
| 19324 | |
| 19325 var query = (req.url).query; | |
| 19326 var queryOffset = 0; | |
| 19327 var queryMap = {}; | |
| 19328 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 19329 parseBool(n) { | |
| 19330 if (n == "true") return true; | |
| 19331 if (n == "false") return false; | |
| 19332 if (n == null) return null; | |
| 19333 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 19334 } | |
| 19335 if (query.length > 0) { | |
| 19336 for (var part in query.split("&")) { | |
| 19337 var keyvalue = part.split("="); | |
| 19338 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 19339 } | |
| 19340 } | |
| 19341 | |
| 19342 | |
| 19343 var h = { | |
| 19344 "content-type" : "application/json; charset=utf-8", | |
| 19345 }; | |
| 19346 var resp = convert.JSON.encode(buildPlacement()); | |
| 19347 return new async.Future.value(stringResponse(200, h, resp)); | |
| 19348 }), true); | |
| 19349 res.insert(arg_request, arg_profileId).then(unittest.expectAsync(((api.Pla
cement response) { | |
| 19350 checkPlacement(response); | |
| 19351 }))); | |
| 19352 }); | |
| 19353 | |
| 19354 unittest.test("method--list", () { | |
| 19355 | |
| 19356 var mock = new HttpServerMock(); | |
| 19357 api.PlacementsResourceApi res = new api.DfareportingApi(mock).placements; | |
| 19358 var arg_profileId = "foo"; | |
| 19359 var arg_advertiserIds = buildUnnamed439(); | |
| 19360 var arg_archived = true; | |
| 19361 var arg_campaignIds = buildUnnamed440(); | |
| 19362 var arg_compatibilities = buildUnnamed441(); | |
| 19363 var arg_contentCategoryIds = buildUnnamed442(); | |
| 19364 var arg_directorySiteIds = buildUnnamed443(); | |
| 19365 var arg_groupIds = buildUnnamed444(); | |
| 19366 var arg_ids = buildUnnamed445(); | |
| 19367 var arg_maxEndDate = "foo"; | |
| 19368 var arg_maxResults = 42; | |
| 19369 var arg_maxStartDate = "foo"; | |
| 19370 var arg_minEndDate = "foo"; | |
| 19371 var arg_minStartDate = "foo"; | |
| 19372 var arg_pageToken = "foo"; | |
| 19373 var arg_paymentSource = "foo"; | |
| 19374 var arg_placementStrategyIds = buildUnnamed446(); | |
| 19375 var arg_pricingTypes = buildUnnamed447(); | |
| 19376 var arg_searchString = "foo"; | |
| 19377 var arg_siteIds = buildUnnamed448(); | |
| 19378 var arg_sizeIds = buildUnnamed449(); | |
| 19379 var arg_sortField = "foo"; | |
| 19380 var arg_sortOrder = "foo"; | |
| 19381 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 19382 var path = (req.url).path; | |
| 19383 var pathOffset = 0; | |
| 19384 var index; | |
| 19385 var subPart; | |
| 19386 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 19387 pathOffset += 1; | |
| 19388 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 19389 pathOffset += 18; | |
| 19390 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 19391 pathOffset += 13; | |
| 19392 index = path.indexOf("/placements", pathOffset); | |
| 19393 unittest.expect(index >= 0, unittest.isTrue); | |
| 19394 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 19395 pathOffset = index; | |
| 19396 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 19397 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("/placements")); | |
| 19398 pathOffset += 11; | |
| 19399 | |
| 19400 var query = (req.url).query; | |
| 19401 var queryOffset = 0; | |
| 19402 var queryMap = {}; | |
| 19403 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 19404 parseBool(n) { | |
| 19405 if (n == "true") return true; | |
| 19406 if (n == "false") return false; | |
| 19407 if (n == null) return null; | |
| 19408 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 19409 } | |
| 19410 if (query.length > 0) { | |
| 19411 for (var part in query.split("&")) { | |
| 19412 var keyvalue = part.split("="); | |
| 19413 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 19414 } | |
| 19415 } | |
| 19416 unittest.expect(queryMap["advertiserIds"], unittest.equals(arg_advertise
rIds)); | |
| 19417 unittest.expect(queryMap["archived"].first, unittest.equals("$arg_archiv
ed")); | |
| 19418 unittest.expect(queryMap["campaignIds"], unittest.equals(arg_campaignIds
)); | |
| 19419 unittest.expect(queryMap["compatibilities"], unittest.equals(arg_compati
bilities)); | |
| 19420 unittest.expect(queryMap["contentCategoryIds"], unittest.equals(arg_cont
entCategoryIds)); | |
| 19421 unittest.expect(queryMap["directorySiteIds"], unittest.equals(arg_direct
orySiteIds)); | |
| 19422 unittest.expect(queryMap["groupIds"], unittest.equals(arg_groupIds)); | |
| 19423 unittest.expect(queryMap["ids"], unittest.equals(arg_ids)); | |
| 19424 unittest.expect(queryMap["maxEndDate"].first, unittest.equals(arg_maxEnd
Date)); | |
| 19425 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | |
| 19426 unittest.expect(queryMap["maxStartDate"].first, unittest.equals(arg_maxS
tartDate)); | |
| 19427 unittest.expect(queryMap["minEndDate"].first, unittest.equals(arg_minEnd
Date)); | |
| 19428 unittest.expect(queryMap["minStartDate"].first, unittest.equals(arg_minS
tartDate)); | |
| 19429 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 19430 unittest.expect(queryMap["paymentSource"].first, unittest.equals(arg_pay
mentSource)); | |
| 19431 unittest.expect(queryMap["placementStrategyIds"], unittest.equals(arg_pl
acementStrategyIds)); | |
| 19432 unittest.expect(queryMap["pricingTypes"], unittest.equals(arg_pricingTyp
es)); | |
| 19433 unittest.expect(queryMap["searchString"].first, unittest.equals(arg_sear
chString)); | |
| 19434 unittest.expect(queryMap["siteIds"], unittest.equals(arg_siteIds)); | |
| 19435 unittest.expect(queryMap["sizeIds"], unittest.equals(arg_sizeIds)); | |
| 19436 unittest.expect(queryMap["sortField"].first, unittest.equals(arg_sortFie
ld)); | |
| 19437 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | |
| 19438 | |
| 19439 | |
| 19440 var h = { | |
| 19441 "content-type" : "application/json; charset=utf-8", | |
| 19442 }; | |
| 19443 var resp = convert.JSON.encode(buildPlacementsListResponse()); | |
| 19444 return new async.Future.value(stringResponse(200, h, resp)); | |
| 19445 }), true); | |
| 19446 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) { | |
| 19447 checkPlacementsListResponse(response); | |
| 19448 }))); | |
| 19449 }); | |
| 19450 | |
| 19451 unittest.test("method--patch", () { | |
| 19452 | |
| 19453 var mock = new HttpServerMock(); | |
| 19454 api.PlacementsResourceApi res = new api.DfareportingApi(mock).placements; | |
| 19455 var arg_request = buildPlacement(); | |
| 19456 var arg_profileId = "foo"; | |
| 19457 var arg_id = "foo"; | |
| 19458 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 19459 var obj = new api.Placement.fromJson(json); | |
| 19460 checkPlacement(obj); | |
| 19461 | |
| 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.4/")); | |
| 19469 pathOffset += 18; | |
| 19470 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 19471 pathOffset += 13; | |
| 19472 index = path.indexOf("/placements", 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 + 11), unittest.eq
uals("/placements")); | |
| 19478 pathOffset += 11; | |
| 19479 | |
| 19480 var query = (req.url).query; | |
| 19481 var queryOffset = 0; | |
| 19482 var queryMap = {}; | |
| 19483 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 19484 parseBool(n) { | |
| 19485 if (n == "true") return true; | |
| 19486 if (n == "false") return false; | |
| 19487 if (n == null) return null; | |
| 19488 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 19489 } | |
| 19490 if (query.length > 0) { | |
| 19491 for (var part in query.split("&")) { | |
| 19492 var keyvalue = part.split("="); | |
| 19493 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 19494 } | |
| 19495 } | |
| 19496 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); | |
| 19497 | |
| 19498 | |
| 19499 var h = { | |
| 19500 "content-type" : "application/json; charset=utf-8", | |
| 19501 }; | |
| 19502 var resp = convert.JSON.encode(buildPlacement()); | |
| 19503 return new async.Future.value(stringResponse(200, h, resp)); | |
| 19504 }), true); | |
| 19505 res.patch(arg_request, arg_profileId, arg_id).then(unittest.expectAsync(((
api.Placement response) { | |
| 19506 checkPlacement(response); | |
| 19507 }))); | |
| 19508 }); | |
| 19509 | |
| 19510 unittest.test("method--update", () { | |
| 19511 | |
| 19512 var mock = new HttpServerMock(); | |
| 19513 api.PlacementsResourceApi res = new api.DfareportingApi(mock).placements; | |
| 19514 var arg_request = buildPlacement(); | |
| 19515 var arg_profileId = "foo"; | |
| 19516 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 19517 var obj = new api.Placement.fromJson(json); | |
| 19518 checkPlacement(obj); | |
| 19519 | |
| 19520 var path = (req.url).path; | |
| 19521 var pathOffset = 0; | |
| 19522 var index; | |
| 19523 var subPart; | |
| 19524 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 19525 pathOffset += 1; | |
| 19526 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 19527 pathOffset += 18; | |
| 19528 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 19529 pathOffset += 13; | |
| 19530 index = path.indexOf("/placements", pathOffset); | |
| 19531 unittest.expect(index >= 0, unittest.isTrue); | |
| 19532 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 19533 pathOffset = index; | |
| 19534 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 19535 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("/placements")); | |
| 19536 pathOffset += 11; | |
| 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(buildPlacement()); | |
| 19560 return new async.Future.value(stringResponse(200, h, resp)); | |
| 19561 }), true); | |
| 19562 res.update(arg_request, arg_profileId).then(unittest.expectAsync(((api.Pla
cement response) { | |
| 19563 checkPlacement(response); | |
| 19564 }))); | |
| 19565 }); | |
| 19566 | |
| 19567 }); | |
| 19568 | |
| 19569 | |
| 19570 unittest.group("resource-PlatformTypesResourceApi", () { | |
| 19571 unittest.test("method--get", () { | |
| 19572 | |
| 19573 var mock = new HttpServerMock(); | |
| 19574 api.PlatformTypesResourceApi res = new api.DfareportingApi(mock).platformT
ypes; | |
| 19575 var arg_profileId = "foo"; | |
| 19576 var arg_id = "foo"; | |
| 19577 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 19578 var path = (req.url).path; | |
| 19579 var pathOffset = 0; | |
| 19580 var index; | |
| 19581 var subPart; | |
| 19582 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 19583 pathOffset += 1; | |
| 19584 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 19585 pathOffset += 18; | |
| 19586 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 19587 pathOffset += 13; | |
| 19588 index = path.indexOf("/platformTypes/", pathOffset); | |
| 19589 unittest.expect(index >= 0, unittest.isTrue); | |
| 19590 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 19591 pathOffset = index; | |
| 19592 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 19593 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq
uals("/platformTypes/")); | |
| 19594 pathOffset += 15; | |
| 19595 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 19596 pathOffset = path.length; | |
| 19597 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 19598 | |
| 19599 var query = (req.url).query; | |
| 19600 var queryOffset = 0; | |
| 19601 var queryMap = {}; | |
| 19602 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 19603 parseBool(n) { | |
| 19604 if (n == "true") return true; | |
| 19605 if (n == "false") return false; | |
| 19606 if (n == null) return null; | |
| 19607 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 19608 } | |
| 19609 if (query.length > 0) { | |
| 19610 for (var part in query.split("&")) { | |
| 19611 var keyvalue = part.split("="); | |
| 19612 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 19613 } | |
| 19614 } | |
| 19615 | |
| 19616 | |
| 19617 var h = { | |
| 19618 "content-type" : "application/json; charset=utf-8", | |
| 19619 }; | |
| 19620 var resp = convert.JSON.encode(buildPlatformType()); | |
| 19621 return new async.Future.value(stringResponse(200, h, resp)); | |
| 19622 }), true); | |
| 19623 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.PlatformTyp
e response) { | |
| 19624 checkPlatformType(response); | |
| 19625 }))); | |
| 19626 }); | |
| 19627 | |
| 19628 unittest.test("method--list", () { | |
| 19629 | |
| 19630 var mock = new HttpServerMock(); | |
| 19631 api.PlatformTypesResourceApi res = new api.DfareportingApi(mock).platformT
ypes; | |
| 19632 var arg_profileId = "foo"; | |
| 19633 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 19634 var path = (req.url).path; | |
| 19635 var pathOffset = 0; | |
| 19636 var index; | |
| 19637 var subPart; | |
| 19638 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 19639 pathOffset += 1; | |
| 19640 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 19641 pathOffset += 18; | |
| 19642 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 19643 pathOffset += 13; | |
| 19644 index = path.indexOf("/platformTypes", pathOffset); | |
| 19645 unittest.expect(index >= 0, unittest.isTrue); | |
| 19646 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 19647 pathOffset = index; | |
| 19648 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 19649 unittest.expect(path.substring(pathOffset, pathOffset + 14), unittest.eq
uals("/platformTypes")); | |
| 19650 pathOffset += 14; | |
| 19651 | |
| 19652 var query = (req.url).query; | |
| 19653 var queryOffset = 0; | |
| 19654 var queryMap = {}; | |
| 19655 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 19656 parseBool(n) { | |
| 19657 if (n == "true") return true; | |
| 19658 if (n == "false") return false; | |
| 19659 if (n == null) return null; | |
| 19660 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 19661 } | |
| 19662 if (query.length > 0) { | |
| 19663 for (var part in query.split("&")) { | |
| 19664 var keyvalue = part.split("="); | |
| 19665 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 19666 } | |
| 19667 } | |
| 19668 | |
| 19669 | |
| 19670 var h = { | |
| 19671 "content-type" : "application/json; charset=utf-8", | |
| 19672 }; | |
| 19673 var resp = convert.JSON.encode(buildPlatformTypesListResponse()); | |
| 19674 return new async.Future.value(stringResponse(200, h, resp)); | |
| 19675 }), true); | |
| 19676 res.list(arg_profileId).then(unittest.expectAsync(((api.PlatformTypesListR
esponse response) { | |
| 19677 checkPlatformTypesListResponse(response); | |
| 19678 }))); | |
| 19679 }); | |
| 19680 | |
| 19681 }); | |
| 19682 | |
| 19683 | |
| 19684 unittest.group("resource-PostalCodesResourceApi", () { | |
| 19685 unittest.test("method--get", () { | |
| 19686 | |
| 19687 var mock = new HttpServerMock(); | |
| 19688 api.PostalCodesResourceApi res = new api.DfareportingApi(mock).postalCodes
; | |
| 19689 var arg_profileId = "foo"; | |
| 19690 var arg_code = "foo"; | |
| 19691 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 19692 var path = (req.url).path; | |
| 19693 var pathOffset = 0; | |
| 19694 var index; | |
| 19695 var subPart; | |
| 19696 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 19697 pathOffset += 1; | |
| 19698 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 19699 pathOffset += 18; | |
| 19700 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 19701 pathOffset += 13; | |
| 19702 index = path.indexOf("/postalCodes/", pathOffset); | |
| 19703 unittest.expect(index >= 0, unittest.isTrue); | |
| 19704 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 19705 pathOffset = index; | |
| 19706 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 19707 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("/postalCodes/")); | |
| 19708 pathOffset += 13; | |
| 19709 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 19710 pathOffset = path.length; | |
| 19711 unittest.expect(subPart, unittest.equals("$arg_code")); | |
| 19712 | |
| 19713 var query = (req.url).query; | |
| 19714 var queryOffset = 0; | |
| 19715 var queryMap = {}; | |
| 19716 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 19717 parseBool(n) { | |
| 19718 if (n == "true") return true; | |
| 19719 if (n == "false") return false; | |
| 19720 if (n == null) return null; | |
| 19721 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 19722 } | |
| 19723 if (query.length > 0) { | |
| 19724 for (var part in query.split("&")) { | |
| 19725 var keyvalue = part.split("="); | |
| 19726 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 19727 } | |
| 19728 } | |
| 19729 | |
| 19730 | |
| 19731 var h = { | |
| 19732 "content-type" : "application/json; charset=utf-8", | |
| 19733 }; | |
| 19734 var resp = convert.JSON.encode(buildPostalCode()); | |
| 19735 return new async.Future.value(stringResponse(200, h, resp)); | |
| 19736 }), true); | |
| 19737 res.get(arg_profileId, arg_code).then(unittest.expectAsync(((api.PostalCod
e response) { | |
| 19738 checkPostalCode(response); | |
| 19739 }))); | |
| 19740 }); | |
| 19741 | |
| 19742 unittest.test("method--list", () { | |
| 19743 | |
| 19744 var mock = new HttpServerMock(); | |
| 19745 api.PostalCodesResourceApi res = new api.DfareportingApi(mock).postalCodes
; | |
| 19746 var arg_profileId = "foo"; | |
| 19747 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 19748 var path = (req.url).path; | |
| 19749 var pathOffset = 0; | |
| 19750 var index; | |
| 19751 var subPart; | |
| 19752 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 19753 pathOffset += 1; | |
| 19754 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 19755 pathOffset += 18; | |
| 19756 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 19757 pathOffset += 13; | |
| 19758 index = path.indexOf("/postalCodes", pathOffset); | |
| 19759 unittest.expect(index >= 0, unittest.isTrue); | |
| 19760 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 19761 pathOffset = index; | |
| 19762 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 19763 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("/postalCodes")); | |
| 19764 pathOffset += 12; | |
| 19765 | |
| 19766 var query = (req.url).query; | |
| 19767 var queryOffset = 0; | |
| 19768 var queryMap = {}; | |
| 19769 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 19770 parseBool(n) { | |
| 19771 if (n == "true") return true; | |
| 19772 if (n == "false") return false; | |
| 19773 if (n == null) return null; | |
| 19774 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 19775 } | |
| 19776 if (query.length > 0) { | |
| 19777 for (var part in query.split("&")) { | |
| 19778 var keyvalue = part.split("="); | |
| 19779 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 19780 } | |
| 19781 } | |
| 19782 | |
| 19783 | |
| 19784 var h = { | |
| 19785 "content-type" : "application/json; charset=utf-8", | |
| 19786 }; | |
| 19787 var resp = convert.JSON.encode(buildPostalCodesListResponse()); | |
| 19788 return new async.Future.value(stringResponse(200, h, resp)); | |
| 19789 }), true); | |
| 19790 res.list(arg_profileId).then(unittest.expectAsync(((api.PostalCodesListRes
ponse response) { | |
| 19791 checkPostalCodesListResponse(response); | |
| 19792 }))); | |
| 19793 }); | |
| 19794 | |
| 19795 }); | |
| 19796 | |
| 19797 | |
| 19798 unittest.group("resource-ProjectsResourceApi", () { | |
| 19799 unittest.test("method--get", () { | |
| 19800 | |
| 19801 var mock = new HttpServerMock(); | |
| 19802 api.ProjectsResourceApi res = new api.DfareportingApi(mock).projects; | |
| 19803 var arg_profileId = "foo"; | |
| 19804 var arg_id = "foo"; | |
| 19805 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 19806 var path = (req.url).path; | |
| 19807 var pathOffset = 0; | |
| 19808 var index; | |
| 19809 var subPart; | |
| 19810 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 19811 pathOffset += 1; | |
| 19812 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 19813 pathOffset += 18; | |
| 19814 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 19815 pathOffset += 13; | |
| 19816 index = path.indexOf("/projects/", pathOffset); | |
| 19817 unittest.expect(index >= 0, unittest.isTrue); | |
| 19818 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 19819 pathOffset = index; | |
| 19820 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 19821 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/projects/")); | |
| 19822 pathOffset += 10; | |
| 19823 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 19824 pathOffset = path.length; | |
| 19825 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 19826 | |
| 19827 var query = (req.url).query; | |
| 19828 var queryOffset = 0; | |
| 19829 var queryMap = {}; | |
| 19830 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 19831 parseBool(n) { | |
| 19832 if (n == "true") return true; | |
| 19833 if (n == "false") return false; | |
| 19834 if (n == null) return null; | |
| 19835 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 19836 } | |
| 19837 if (query.length > 0) { | |
| 19838 for (var part in query.split("&")) { | |
| 19839 var keyvalue = part.split("="); | |
| 19840 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 19841 } | |
| 19842 } | |
| 19843 | |
| 19844 | |
| 19845 var h = { | |
| 19846 "content-type" : "application/json; charset=utf-8", | |
| 19847 }; | |
| 19848 var resp = convert.JSON.encode(buildProject()); | |
| 19849 return new async.Future.value(stringResponse(200, h, resp)); | |
| 19850 }), true); | |
| 19851 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.Project res
ponse) { | |
| 19852 checkProject(response); | |
| 19853 }))); | |
| 19854 }); | |
| 19855 | |
| 19856 unittest.test("method--list", () { | |
| 19857 | |
| 19858 var mock = new HttpServerMock(); | |
| 19859 api.ProjectsResourceApi res = new api.DfareportingApi(mock).projects; | |
| 19860 var arg_profileId = "foo"; | |
| 19861 var arg_advertiserIds = buildUnnamed450(); | |
| 19862 var arg_ids = buildUnnamed451(); | |
| 19863 var arg_maxResults = 42; | |
| 19864 var arg_pageToken = "foo"; | |
| 19865 var arg_searchString = "foo"; | |
| 19866 var arg_sortField = "foo"; | |
| 19867 var arg_sortOrder = "foo"; | |
| 19868 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 19869 var path = (req.url).path; | |
| 19870 var pathOffset = 0; | |
| 19871 var index; | |
| 19872 var subPart; | |
| 19873 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 19874 pathOffset += 1; | |
| 19875 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 19876 pathOffset += 18; | |
| 19877 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 19878 pathOffset += 13; | |
| 19879 index = path.indexOf("/projects", pathOffset); | |
| 19880 unittest.expect(index >= 0, unittest.isTrue); | |
| 19881 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 19882 pathOffset = index; | |
| 19883 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 19884 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("/projects")); | |
| 19885 pathOffset += 9; | |
| 19886 | |
| 19887 var query = (req.url).query; | |
| 19888 var queryOffset = 0; | |
| 19889 var queryMap = {}; | |
| 19890 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 19891 parseBool(n) { | |
| 19892 if (n == "true") return true; | |
| 19893 if (n == "false") return false; | |
| 19894 if (n == null) return null; | |
| 19895 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 19896 } | |
| 19897 if (query.length > 0) { | |
| 19898 for (var part in query.split("&")) { | |
| 19899 var keyvalue = part.split("="); | |
| 19900 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 19901 } | |
| 19902 } | |
| 19903 unittest.expect(queryMap["advertiserIds"], unittest.equals(arg_advertise
rIds)); | |
| 19904 unittest.expect(queryMap["ids"], unittest.equals(arg_ids)); | |
| 19905 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | |
| 19906 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 19907 unittest.expect(queryMap["searchString"].first, unittest.equals(arg_sear
chString)); | |
| 19908 unittest.expect(queryMap["sortField"].first, unittest.equals(arg_sortFie
ld)); | |
| 19909 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | |
| 19910 | |
| 19911 | |
| 19912 var h = { | |
| 19913 "content-type" : "application/json; charset=utf-8", | |
| 19914 }; | |
| 19915 var resp = convert.JSON.encode(buildProjectsListResponse()); | |
| 19916 return new async.Future.value(stringResponse(200, h, resp)); | |
| 19917 }), true); | |
| 19918 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) { | |
| 19919 checkProjectsListResponse(response); | |
| 19920 }))); | |
| 19921 }); | |
| 19922 | |
| 19923 }); | |
| 19924 | |
| 19925 | |
| 19926 unittest.group("resource-RegionsResourceApi", () { | |
| 19927 unittest.test("method--list", () { | |
| 19928 | |
| 19929 var mock = new HttpServerMock(); | |
| 19930 api.RegionsResourceApi res = new api.DfareportingApi(mock).regions; | |
| 19931 var arg_profileId = "foo"; | |
| 19932 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 19933 var path = (req.url).path; | |
| 19934 var pathOffset = 0; | |
| 19935 var index; | |
| 19936 var subPart; | |
| 19937 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 19938 pathOffset += 1; | |
| 19939 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 19940 pathOffset += 18; | |
| 19941 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 19942 pathOffset += 13; | |
| 19943 index = path.indexOf("/regions", pathOffset); | |
| 19944 unittest.expect(index >= 0, unittest.isTrue); | |
| 19945 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 19946 pathOffset = index; | |
| 19947 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 19948 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("/regions")); | |
| 19949 pathOffset += 8; | |
| 19950 | |
| 19951 var query = (req.url).query; | |
| 19952 var queryOffset = 0; | |
| 19953 var queryMap = {}; | |
| 19954 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 19955 parseBool(n) { | |
| 19956 if (n == "true") return true; | |
| 19957 if (n == "false") return false; | |
| 19958 if (n == null) return null; | |
| 19959 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 19960 } | |
| 19961 if (query.length > 0) { | |
| 19962 for (var part in query.split("&")) { | |
| 19963 var keyvalue = part.split("="); | |
| 19964 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 19965 } | |
| 19966 } | |
| 19967 | |
| 19968 | |
| 19969 var h = { | |
| 19970 "content-type" : "application/json; charset=utf-8", | |
| 19971 }; | |
| 19972 var resp = convert.JSON.encode(buildRegionsListResponse()); | |
| 19973 return new async.Future.value(stringResponse(200, h, resp)); | |
| 19974 }), true); | |
| 19975 res.list(arg_profileId).then(unittest.expectAsync(((api.RegionsListRespons
e response) { | |
| 19976 checkRegionsListResponse(response); | |
| 19977 }))); | |
| 19978 }); | |
| 19979 | |
| 19980 }); | |
| 19981 | |
| 19982 | |
| 19983 unittest.group("resource-RemarketingListSharesResourceApi", () { | |
| 19984 unittest.test("method--get", () { | |
| 19985 | |
| 19986 var mock = new HttpServerMock(); | |
| 19987 api.RemarketingListSharesResourceApi res = new api.DfareportingApi(mock).r
emarketingListShares; | |
| 19988 var arg_profileId = "foo"; | |
| 19989 var arg_remarketingListId = "foo"; | |
| 19990 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 19991 var path = (req.url).path; | |
| 19992 var pathOffset = 0; | |
| 19993 var index; | |
| 19994 var subPart; | |
| 19995 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 19996 pathOffset += 1; | |
| 19997 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 19998 pathOffset += 18; | |
| 19999 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 20000 pathOffset += 13; | |
| 20001 index = path.indexOf("/remarketingListShares/", pathOffset); | |
| 20002 unittest.expect(index >= 0, unittest.isTrue); | |
| 20003 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 20004 pathOffset = index; | |
| 20005 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 20006 unittest.expect(path.substring(pathOffset, pathOffset + 23), unittest.eq
uals("/remarketingListShares/")); | |
| 20007 pathOffset += 23; | |
| 20008 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 20009 pathOffset = path.length; | |
| 20010 unittest.expect(subPart, unittest.equals("$arg_remarketingListId")); | |
| 20011 | |
| 20012 var query = (req.url).query; | |
| 20013 var queryOffset = 0; | |
| 20014 var queryMap = {}; | |
| 20015 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 20016 parseBool(n) { | |
| 20017 if (n == "true") return true; | |
| 20018 if (n == "false") return false; | |
| 20019 if (n == null) return null; | |
| 20020 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 20021 } | |
| 20022 if (query.length > 0) { | |
| 20023 for (var part in query.split("&")) { | |
| 20024 var keyvalue = part.split("="); | |
| 20025 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 20026 } | |
| 20027 } | |
| 20028 | |
| 20029 | |
| 20030 var h = { | |
| 20031 "content-type" : "application/json; charset=utf-8", | |
| 20032 }; | |
| 20033 var resp = convert.JSON.encode(buildRemarketingListShare()); | |
| 20034 return new async.Future.value(stringResponse(200, h, resp)); | |
| 20035 }), true); | |
| 20036 res.get(arg_profileId, arg_remarketingListId).then(unittest.expectAsync(((
api.RemarketingListShare response) { | |
| 20037 checkRemarketingListShare(response); | |
| 20038 }))); | |
| 20039 }); | |
| 20040 | |
| 20041 unittest.test("method--patch", () { | |
| 20042 | |
| 20043 var mock = new HttpServerMock(); | |
| 20044 api.RemarketingListSharesResourceApi res = new api.DfareportingApi(mock).r
emarketingListShares; | |
| 20045 var arg_request = buildRemarketingListShare(); | |
| 20046 var arg_profileId = "foo"; | |
| 20047 var arg_remarketingListId = "foo"; | |
| 20048 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 20049 var obj = new api.RemarketingListShare.fromJson(json); | |
| 20050 checkRemarketingListShare(obj); | |
| 20051 | |
| 20052 var path = (req.url).path; | |
| 20053 var pathOffset = 0; | |
| 20054 var index; | |
| 20055 var subPart; | |
| 20056 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 20057 pathOffset += 1; | |
| 20058 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 20059 pathOffset += 18; | |
| 20060 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 20061 pathOffset += 13; | |
| 20062 index = path.indexOf("/remarketingListShares", pathOffset); | |
| 20063 unittest.expect(index >= 0, unittest.isTrue); | |
| 20064 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 20065 pathOffset = index; | |
| 20066 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 20067 unittest.expect(path.substring(pathOffset, pathOffset + 22), unittest.eq
uals("/remarketingListShares")); | |
| 20068 pathOffset += 22; | |
| 20069 | |
| 20070 var query = (req.url).query; | |
| 20071 var queryOffset = 0; | |
| 20072 var queryMap = {}; | |
| 20073 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 20074 parseBool(n) { | |
| 20075 if (n == "true") return true; | |
| 20076 if (n == "false") return false; | |
| 20077 if (n == null) return null; | |
| 20078 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 20079 } | |
| 20080 if (query.length > 0) { | |
| 20081 for (var part in query.split("&")) { | |
| 20082 var keyvalue = part.split("="); | |
| 20083 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 20084 } | |
| 20085 } | |
| 20086 unittest.expect(queryMap["remarketingListId"].first, unittest.equals(arg
_remarketingListId)); | |
| 20087 | |
| 20088 | |
| 20089 var h = { | |
| 20090 "content-type" : "application/json; charset=utf-8", | |
| 20091 }; | |
| 20092 var resp = convert.JSON.encode(buildRemarketingListShare()); | |
| 20093 return new async.Future.value(stringResponse(200, h, resp)); | |
| 20094 }), true); | |
| 20095 res.patch(arg_request, arg_profileId, arg_remarketingListId).then(unittest
.expectAsync(((api.RemarketingListShare response) { | |
| 20096 checkRemarketingListShare(response); | |
| 20097 }))); | |
| 20098 }); | |
| 20099 | |
| 20100 unittest.test("method--update", () { | |
| 20101 | |
| 20102 var mock = new HttpServerMock(); | |
| 20103 api.RemarketingListSharesResourceApi res = new api.DfareportingApi(mock).r
emarketingListShares; | |
| 20104 var arg_request = buildRemarketingListShare(); | |
| 20105 var arg_profileId = "foo"; | |
| 20106 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 20107 var obj = new api.RemarketingListShare.fromJson(json); | |
| 20108 checkRemarketingListShare(obj); | |
| 20109 | |
| 20110 var path = (req.url).path; | |
| 20111 var pathOffset = 0; | |
| 20112 var index; | |
| 20113 var subPart; | |
| 20114 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 20115 pathOffset += 1; | |
| 20116 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 20117 pathOffset += 18; | |
| 20118 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 20119 pathOffset += 13; | |
| 20120 index = path.indexOf("/remarketingListShares", pathOffset); | |
| 20121 unittest.expect(index >= 0, unittest.isTrue); | |
| 20122 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 20123 pathOffset = index; | |
| 20124 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 20125 unittest.expect(path.substring(pathOffset, pathOffset + 22), unittest.eq
uals("/remarketingListShares")); | |
| 20126 pathOffset += 22; | |
| 20127 | |
| 20128 var query = (req.url).query; | |
| 20129 var queryOffset = 0; | |
| 20130 var queryMap = {}; | |
| 20131 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 20132 parseBool(n) { | |
| 20133 if (n == "true") return true; | |
| 20134 if (n == "false") return false; | |
| 20135 if (n == null) return null; | |
| 20136 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 20137 } | |
| 20138 if (query.length > 0) { | |
| 20139 for (var part in query.split("&")) { | |
| 20140 var keyvalue = part.split("="); | |
| 20141 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 20142 } | |
| 20143 } | |
| 20144 | |
| 20145 | |
| 20146 var h = { | |
| 20147 "content-type" : "application/json; charset=utf-8", | |
| 20148 }; | |
| 20149 var resp = convert.JSON.encode(buildRemarketingListShare()); | |
| 20150 return new async.Future.value(stringResponse(200, h, resp)); | |
| 20151 }), true); | |
| 20152 res.update(arg_request, arg_profileId).then(unittest.expectAsync(((api.Rem
arketingListShare response) { | |
| 20153 checkRemarketingListShare(response); | |
| 20154 }))); | |
| 20155 }); | |
| 20156 | |
| 20157 }); | |
| 20158 | |
| 20159 | |
| 20160 unittest.group("resource-RemarketingListsResourceApi", () { | |
| 20161 unittest.test("method--get", () { | |
| 20162 | |
| 20163 var mock = new HttpServerMock(); | |
| 20164 api.RemarketingListsResourceApi res = new api.DfareportingApi(mock).remark
etingLists; | |
| 20165 var arg_profileId = "foo"; | |
| 20166 var arg_id = "foo"; | |
| 20167 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 20168 var path = (req.url).path; | |
| 20169 var pathOffset = 0; | |
| 20170 var index; | |
| 20171 var subPart; | |
| 20172 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 20173 pathOffset += 1; | |
| 20174 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 20175 pathOffset += 18; | |
| 20176 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 20177 pathOffset += 13; | |
| 20178 index = path.indexOf("/remarketingLists/", pathOffset); | |
| 20179 unittest.expect(index >= 0, unittest.isTrue); | |
| 20180 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 20181 pathOffset = index; | |
| 20182 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 20183 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("/remarketingLists/")); | |
| 20184 pathOffset += 18; | |
| 20185 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 20186 pathOffset = path.length; | |
| 20187 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 20188 | |
| 20189 var query = (req.url).query; | |
| 20190 var queryOffset = 0; | |
| 20191 var queryMap = {}; | |
| 20192 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 20193 parseBool(n) { | |
| 20194 if (n == "true") return true; | |
| 20195 if (n == "false") return false; | |
| 20196 if (n == null) return null; | |
| 20197 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 20198 } | |
| 20199 if (query.length > 0) { | |
| 20200 for (var part in query.split("&")) { | |
| 20201 var keyvalue = part.split("="); | |
| 20202 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 20203 } | |
| 20204 } | |
| 20205 | |
| 20206 | |
| 20207 var h = { | |
| 20208 "content-type" : "application/json; charset=utf-8", | |
| 20209 }; | |
| 20210 var resp = convert.JSON.encode(buildRemarketingList()); | |
| 20211 return new async.Future.value(stringResponse(200, h, resp)); | |
| 20212 }), true); | |
| 20213 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.Remarketing
List response) { | |
| 20214 checkRemarketingList(response); | |
| 20215 }))); | |
| 20216 }); | |
| 20217 | |
| 20218 unittest.test("method--insert", () { | |
| 20219 | |
| 20220 var mock = new HttpServerMock(); | |
| 20221 api.RemarketingListsResourceApi res = new api.DfareportingApi(mock).remark
etingLists; | |
| 20222 var arg_request = buildRemarketingList(); | |
| 20223 var arg_profileId = "foo"; | |
| 20224 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 20225 var obj = new api.RemarketingList.fromJson(json); | |
| 20226 checkRemarketingList(obj); | |
| 20227 | |
| 20228 var path = (req.url).path; | |
| 20229 var pathOffset = 0; | |
| 20230 var index; | |
| 20231 var subPart; | |
| 20232 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 20233 pathOffset += 1; | |
| 20234 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 20235 pathOffset += 18; | |
| 20236 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 20237 pathOffset += 13; | |
| 20238 index = path.indexOf("/remarketingLists", pathOffset); | |
| 20239 unittest.expect(index >= 0, unittest.isTrue); | |
| 20240 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 20241 pathOffset = index; | |
| 20242 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 20243 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("/remarketingLists")); | |
| 20244 pathOffset += 17; | |
| 20245 | |
| 20246 var query = (req.url).query; | |
| 20247 var queryOffset = 0; | |
| 20248 var queryMap = {}; | |
| 20249 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 20250 parseBool(n) { | |
| 20251 if (n == "true") return true; | |
| 20252 if (n == "false") return false; | |
| 20253 if (n == null) return null; | |
| 20254 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 20255 } | |
| 20256 if (query.length > 0) { | |
| 20257 for (var part in query.split("&")) { | |
| 20258 var keyvalue = part.split("="); | |
| 20259 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 20260 } | |
| 20261 } | |
| 20262 | |
| 20263 | |
| 20264 var h = { | |
| 20265 "content-type" : "application/json; charset=utf-8", | |
| 20266 }; | |
| 20267 var resp = convert.JSON.encode(buildRemarketingList()); | |
| 20268 return new async.Future.value(stringResponse(200, h, resp)); | |
| 20269 }), true); | |
| 20270 res.insert(arg_request, arg_profileId).then(unittest.expectAsync(((api.Rem
arketingList response) { | |
| 20271 checkRemarketingList(response); | |
| 20272 }))); | |
| 20273 }); | |
| 20274 | |
| 20275 unittest.test("method--list", () { | |
| 20276 | |
| 20277 var mock = new HttpServerMock(); | |
| 20278 api.RemarketingListsResourceApi res = new api.DfareportingApi(mock).remark
etingLists; | |
| 20279 var arg_profileId = "foo"; | |
| 20280 var arg_advertiserId = "foo"; | |
| 20281 var arg_active = true; | |
| 20282 var arg_floodlightActivityId = "foo"; | |
| 20283 var arg_maxResults = 42; | |
| 20284 var arg_name = "foo"; | |
| 20285 var arg_pageToken = "foo"; | |
| 20286 var arg_sortField = "foo"; | |
| 20287 var arg_sortOrder = "foo"; | |
| 20288 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 20289 var path = (req.url).path; | |
| 20290 var pathOffset = 0; | |
| 20291 var index; | |
| 20292 var subPart; | |
| 20293 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 20294 pathOffset += 1; | |
| 20295 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 20296 pathOffset += 18; | |
| 20297 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 20298 pathOffset += 13; | |
| 20299 index = path.indexOf("/remarketingLists", pathOffset); | |
| 20300 unittest.expect(index >= 0, unittest.isTrue); | |
| 20301 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 20302 pathOffset = index; | |
| 20303 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 20304 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("/remarketingLists")); | |
| 20305 pathOffset += 17; | |
| 20306 | |
| 20307 var query = (req.url).query; | |
| 20308 var queryOffset = 0; | |
| 20309 var queryMap = {}; | |
| 20310 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 20311 parseBool(n) { | |
| 20312 if (n == "true") return true; | |
| 20313 if (n == "false") return false; | |
| 20314 if (n == null) return null; | |
| 20315 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 20316 } | |
| 20317 if (query.length > 0) { | |
| 20318 for (var part in query.split("&")) { | |
| 20319 var keyvalue = part.split("="); | |
| 20320 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 20321 } | |
| 20322 } | |
| 20323 unittest.expect(queryMap["advertiserId"].first, unittest.equals(arg_adve
rtiserId)); | |
| 20324 unittest.expect(queryMap["active"].first, unittest.equals("$arg_active")
); | |
| 20325 unittest.expect(queryMap["floodlightActivityId"].first, unittest.equals(
arg_floodlightActivityId)); | |
| 20326 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | |
| 20327 unittest.expect(queryMap["name"].first, unittest.equals(arg_name)); | |
| 20328 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 20329 unittest.expect(queryMap["sortField"].first, unittest.equals(arg_sortFie
ld)); | |
| 20330 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | |
| 20331 | |
| 20332 | |
| 20333 var h = { | |
| 20334 "content-type" : "application/json; charset=utf-8", | |
| 20335 }; | |
| 20336 var resp = convert.JSON.encode(buildRemarketingListsListResponse()); | |
| 20337 return new async.Future.value(stringResponse(200, h, resp)); | |
| 20338 }), true); | |
| 20339 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) { | |
| 20340 checkRemarketingListsListResponse(response); | |
| 20341 }))); | |
| 20342 }); | |
| 20343 | |
| 20344 unittest.test("method--patch", () { | |
| 20345 | |
| 20346 var mock = new HttpServerMock(); | |
| 20347 api.RemarketingListsResourceApi res = new api.DfareportingApi(mock).remark
etingLists; | |
| 20348 var arg_request = buildRemarketingList(); | |
| 20349 var arg_profileId = "foo"; | |
| 20350 var arg_id = "foo"; | |
| 20351 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 20352 var obj = new api.RemarketingList.fromJson(json); | |
| 20353 checkRemarketingList(obj); | |
| 20354 | |
| 20355 var path = (req.url).path; | |
| 20356 var pathOffset = 0; | |
| 20357 var index; | |
| 20358 var subPart; | |
| 20359 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 20360 pathOffset += 1; | |
| 20361 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 20362 pathOffset += 18; | |
| 20363 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 20364 pathOffset += 13; | |
| 20365 index = path.indexOf("/remarketingLists", pathOffset); | |
| 20366 unittest.expect(index >= 0, unittest.isTrue); | |
| 20367 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 20368 pathOffset = index; | |
| 20369 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 20370 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("/remarketingLists")); | |
| 20371 pathOffset += 17; | |
| 20372 | |
| 20373 var query = (req.url).query; | |
| 20374 var queryOffset = 0; | |
| 20375 var queryMap = {}; | |
| 20376 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 20377 parseBool(n) { | |
| 20378 if (n == "true") return true; | |
| 20379 if (n == "false") return false; | |
| 20380 if (n == null) return null; | |
| 20381 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 20382 } | |
| 20383 if (query.length > 0) { | |
| 20384 for (var part in query.split("&")) { | |
| 20385 var keyvalue = part.split("="); | |
| 20386 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 20387 } | |
| 20388 } | |
| 20389 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); | |
| 20390 | |
| 20391 | |
| 20392 var h = { | |
| 20393 "content-type" : "application/json; charset=utf-8", | |
| 20394 }; | |
| 20395 var resp = convert.JSON.encode(buildRemarketingList()); | |
| 20396 return new async.Future.value(stringResponse(200, h, resp)); | |
| 20397 }), true); | |
| 20398 res.patch(arg_request, arg_profileId, arg_id).then(unittest.expectAsync(((
api.RemarketingList response) { | |
| 20399 checkRemarketingList(response); | |
| 20400 }))); | |
| 20401 }); | |
| 20402 | |
| 20403 unittest.test("method--update", () { | |
| 20404 | |
| 20405 var mock = new HttpServerMock(); | |
| 20406 api.RemarketingListsResourceApi res = new api.DfareportingApi(mock).remark
etingLists; | |
| 20407 var arg_request = buildRemarketingList(); | |
| 20408 var arg_profileId = "foo"; | |
| 20409 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 20410 var obj = new api.RemarketingList.fromJson(json); | |
| 20411 checkRemarketingList(obj); | |
| 20412 | |
| 20413 var path = (req.url).path; | |
| 20414 var pathOffset = 0; | |
| 20415 var index; | |
| 20416 var subPart; | |
| 20417 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 20418 pathOffset += 1; | |
| 20419 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 20420 pathOffset += 18; | |
| 20421 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 20422 pathOffset += 13; | |
| 20423 index = path.indexOf("/remarketingLists", pathOffset); | |
| 20424 unittest.expect(index >= 0, unittest.isTrue); | |
| 20425 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 20426 pathOffset = index; | |
| 20427 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 20428 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq
uals("/remarketingLists")); | |
| 20429 pathOffset += 17; | |
| 20430 | |
| 20431 var query = (req.url).query; | |
| 20432 var queryOffset = 0; | |
| 20433 var queryMap = {}; | |
| 20434 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 20435 parseBool(n) { | |
| 20436 if (n == "true") return true; | |
| 20437 if (n == "false") return false; | |
| 20438 if (n == null) return null; | |
| 20439 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 20440 } | |
| 20441 if (query.length > 0) { | |
| 20442 for (var part in query.split("&")) { | |
| 20443 var keyvalue = part.split("="); | |
| 20444 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 20445 } | |
| 20446 } | |
| 20447 | |
| 20448 | |
| 20449 var h = { | |
| 20450 "content-type" : "application/json; charset=utf-8", | |
| 20451 }; | |
| 20452 var resp = convert.JSON.encode(buildRemarketingList()); | |
| 20453 return new async.Future.value(stringResponse(200, h, resp)); | |
| 20454 }), true); | |
| 20455 res.update(arg_request, arg_profileId).then(unittest.expectAsync(((api.Rem
arketingList response) { | |
| 20456 checkRemarketingList(response); | |
| 20457 }))); | |
| 20458 }); | |
| 20459 | |
| 20460 }); | |
| 20461 | |
| 20462 | |
| 20463 unittest.group("resource-ReportsResourceApi", () { | |
| 20464 unittest.test("method--delete", () { | |
| 20465 | |
| 20466 var mock = new HttpServerMock(); | |
| 20467 api.ReportsResourceApi res = new api.DfareportingApi(mock).reports; | |
| 20468 var arg_profileId = "foo"; | |
| 20469 var arg_reportId = "foo"; | |
| 20470 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 20471 var path = (req.url).path; | |
| 20472 var pathOffset = 0; | |
| 20473 var index; | |
| 20474 var subPart; | |
| 20475 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 20476 pathOffset += 1; | |
| 20477 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 20478 pathOffset += 18; | |
| 20479 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 20480 pathOffset += 13; | |
| 20481 index = path.indexOf("/reports/", pathOffset); | |
| 20482 unittest.expect(index >= 0, unittest.isTrue); | |
| 20483 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 20484 pathOffset = index; | |
| 20485 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 20486 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("/reports/")); | |
| 20487 pathOffset += 9; | |
| 20488 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 20489 pathOffset = path.length; | |
| 20490 unittest.expect(subPart, unittest.equals("$arg_reportId")); | |
| 20491 | |
| 20492 var query = (req.url).query; | |
| 20493 var queryOffset = 0; | |
| 20494 var queryMap = {}; | |
| 20495 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 20496 parseBool(n) { | |
| 20497 if (n == "true") return true; | |
| 20498 if (n == "false") return false; | |
| 20499 if (n == null) return null; | |
| 20500 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 20501 } | |
| 20502 if (query.length > 0) { | |
| 20503 for (var part in query.split("&")) { | |
| 20504 var keyvalue = part.split("="); | |
| 20505 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 20506 } | |
| 20507 } | |
| 20508 | |
| 20509 | |
| 20510 var h = { | |
| 20511 "content-type" : "application/json; charset=utf-8", | |
| 20512 }; | |
| 20513 var resp = ""; | |
| 20514 return new async.Future.value(stringResponse(200, h, resp)); | |
| 20515 }), true); | |
| 20516 res.delete(arg_profileId, arg_reportId).then(unittest.expectAsync((_) {}))
; | |
| 20517 }); | |
| 20518 | |
| 20519 unittest.test("method--get", () { | |
| 20520 | |
| 20521 var mock = new HttpServerMock(); | |
| 20522 api.ReportsResourceApi res = new api.DfareportingApi(mock).reports; | |
| 20523 var arg_profileId = "foo"; | |
| 20524 var arg_reportId = "foo"; | |
| 20525 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 20526 var path = (req.url).path; | |
| 20527 var pathOffset = 0; | |
| 20528 var index; | |
| 20529 var subPart; | |
| 20530 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 20531 pathOffset += 1; | |
| 20532 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 20533 pathOffset += 18; | |
| 20534 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 20535 pathOffset += 13; | |
| 20536 index = path.indexOf("/reports/", pathOffset); | |
| 20537 unittest.expect(index >= 0, unittest.isTrue); | |
| 20538 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 20539 pathOffset = index; | |
| 20540 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 20541 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("/reports/")); | |
| 20542 pathOffset += 9; | |
| 20543 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 20544 pathOffset = path.length; | |
| 20545 unittest.expect(subPart, unittest.equals("$arg_reportId")); | |
| 20546 | |
| 20547 var query = (req.url).query; | |
| 20548 var queryOffset = 0; | |
| 20549 var queryMap = {}; | |
| 20550 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 20551 parseBool(n) { | |
| 20552 if (n == "true") return true; | |
| 20553 if (n == "false") return false; | |
| 20554 if (n == null) return null; | |
| 20555 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 20556 } | |
| 20557 if (query.length > 0) { | |
| 20558 for (var part in query.split("&")) { | |
| 20559 var keyvalue = part.split("="); | |
| 20560 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 20561 } | |
| 20562 } | |
| 20563 | |
| 20564 | |
| 20565 var h = { | |
| 20566 "content-type" : "application/json; charset=utf-8", | |
| 20567 }; | |
| 20568 var resp = convert.JSON.encode(buildReport()); | |
| 20569 return new async.Future.value(stringResponse(200, h, resp)); | |
| 20570 }), true); | |
| 20571 res.get(arg_profileId, arg_reportId).then(unittest.expectAsync(((api.Repor
t response) { | |
| 20572 checkReport(response); | |
| 20573 }))); | |
| 20574 }); | |
| 20575 | |
| 20576 unittest.test("method--insert", () { | |
| 20577 | |
| 20578 var mock = new HttpServerMock(); | |
| 20579 api.ReportsResourceApi res = new api.DfareportingApi(mock).reports; | |
| 20580 var arg_request = buildReport(); | |
| 20581 var arg_profileId = "foo"; | |
| 20582 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 20583 var obj = new api.Report.fromJson(json); | |
| 20584 checkReport(obj); | |
| 20585 | |
| 20586 var path = (req.url).path; | |
| 20587 var pathOffset = 0; | |
| 20588 var index; | |
| 20589 var subPart; | |
| 20590 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 20591 pathOffset += 1; | |
| 20592 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 20593 pathOffset += 18; | |
| 20594 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 20595 pathOffset += 13; | |
| 20596 index = path.indexOf("/reports", pathOffset); | |
| 20597 unittest.expect(index >= 0, unittest.isTrue); | |
| 20598 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 20599 pathOffset = index; | |
| 20600 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 20601 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("/reports")); | |
| 20602 pathOffset += 8; | |
| 20603 | |
| 20604 var query = (req.url).query; | |
| 20605 var queryOffset = 0; | |
| 20606 var queryMap = {}; | |
| 20607 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 20608 parseBool(n) { | |
| 20609 if (n == "true") return true; | |
| 20610 if (n == "false") return false; | |
| 20611 if (n == null) return null; | |
| 20612 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 20613 } | |
| 20614 if (query.length > 0) { | |
| 20615 for (var part in query.split("&")) { | |
| 20616 var keyvalue = part.split("="); | |
| 20617 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 20618 } | |
| 20619 } | |
| 20620 | |
| 20621 | |
| 20622 var h = { | |
| 20623 "content-type" : "application/json; charset=utf-8", | |
| 20624 }; | |
| 20625 var resp = convert.JSON.encode(buildReport()); | |
| 20626 return new async.Future.value(stringResponse(200, h, resp)); | |
| 20627 }), true); | |
| 20628 res.insert(arg_request, arg_profileId).then(unittest.expectAsync(((api.Rep
ort response) { | |
| 20629 checkReport(response); | |
| 20630 }))); | |
| 20631 }); | |
| 20632 | |
| 20633 unittest.test("method--list", () { | |
| 20634 | |
| 20635 var mock = new HttpServerMock(); | |
| 20636 api.ReportsResourceApi res = new api.DfareportingApi(mock).reports; | |
| 20637 var arg_profileId = "foo"; | |
| 20638 var arg_maxResults = 42; | |
| 20639 var arg_pageToken = "foo"; | |
| 20640 var arg_scope = "foo"; | |
| 20641 var arg_sortField = "foo"; | |
| 20642 var arg_sortOrder = "foo"; | |
| 20643 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 20644 var path = (req.url).path; | |
| 20645 var pathOffset = 0; | |
| 20646 var index; | |
| 20647 var subPart; | |
| 20648 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 20649 pathOffset += 1; | |
| 20650 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 20651 pathOffset += 18; | |
| 20652 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 20653 pathOffset += 13; | |
| 20654 index = path.indexOf("/reports", pathOffset); | |
| 20655 unittest.expect(index >= 0, unittest.isTrue); | |
| 20656 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 20657 pathOffset = index; | |
| 20658 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 20659 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ
als("/reports")); | |
| 20660 pathOffset += 8; | |
| 20661 | |
| 20662 var query = (req.url).query; | |
| 20663 var queryOffset = 0; | |
| 20664 var queryMap = {}; | |
| 20665 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 20666 parseBool(n) { | |
| 20667 if (n == "true") return true; | |
| 20668 if (n == "false") return false; | |
| 20669 if (n == null) return null; | |
| 20670 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 20671 } | |
| 20672 if (query.length > 0) { | |
| 20673 for (var part in query.split("&")) { | |
| 20674 var keyvalue = part.split("="); | |
| 20675 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 20676 } | |
| 20677 } | |
| 20678 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | |
| 20679 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 20680 unittest.expect(queryMap["scope"].first, unittest.equals(arg_scope)); | |
| 20681 unittest.expect(queryMap["sortField"].first, unittest.equals(arg_sortFie
ld)); | |
| 20682 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | |
| 20683 | |
| 20684 | |
| 20685 var h = { | |
| 20686 "content-type" : "application/json; charset=utf-8", | |
| 20687 }; | |
| 20688 var resp = convert.JSON.encode(buildReportList()); | |
| 20689 return new async.Future.value(stringResponse(200, h, resp)); | |
| 20690 }), true); | |
| 20691 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) { | |
| 20692 checkReportList(response); | |
| 20693 }))); | |
| 20694 }); | |
| 20695 | |
| 20696 unittest.test("method--patch", () { | |
| 20697 | |
| 20698 var mock = new HttpServerMock(); | |
| 20699 api.ReportsResourceApi res = new api.DfareportingApi(mock).reports; | |
| 20700 var arg_request = buildReport(); | |
| 20701 var arg_profileId = "foo"; | |
| 20702 var arg_reportId = "foo"; | |
| 20703 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 20704 var obj = new api.Report.fromJson(json); | |
| 20705 checkReport(obj); | |
| 20706 | |
| 20707 var path = (req.url).path; | |
| 20708 var pathOffset = 0; | |
| 20709 var index; | |
| 20710 var subPart; | |
| 20711 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 20712 pathOffset += 1; | |
| 20713 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 20714 pathOffset += 18; | |
| 20715 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 20716 pathOffset += 13; | |
| 20717 index = path.indexOf("/reports/", pathOffset); | |
| 20718 unittest.expect(index >= 0, unittest.isTrue); | |
| 20719 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 20720 pathOffset = index; | |
| 20721 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 20722 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("/reports/")); | |
| 20723 pathOffset += 9; | |
| 20724 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 20725 pathOffset = path.length; | |
| 20726 unittest.expect(subPart, unittest.equals("$arg_reportId")); | |
| 20727 | |
| 20728 var query = (req.url).query; | |
| 20729 var queryOffset = 0; | |
| 20730 var queryMap = {}; | |
| 20731 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 20732 parseBool(n) { | |
| 20733 if (n == "true") return true; | |
| 20734 if (n == "false") return false; | |
| 20735 if (n == null) return null; | |
| 20736 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 20737 } | |
| 20738 if (query.length > 0) { | |
| 20739 for (var part in query.split("&")) { | |
| 20740 var keyvalue = part.split("="); | |
| 20741 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 20742 } | |
| 20743 } | |
| 20744 | |
| 20745 | |
| 20746 var h = { | |
| 20747 "content-type" : "application/json; charset=utf-8", | |
| 20748 }; | |
| 20749 var resp = convert.JSON.encode(buildReport()); | |
| 20750 return new async.Future.value(stringResponse(200, h, resp)); | |
| 20751 }), true); | |
| 20752 res.patch(arg_request, arg_profileId, arg_reportId).then(unittest.expectAs
ync(((api.Report response) { | |
| 20753 checkReport(response); | |
| 20754 }))); | |
| 20755 }); | |
| 20756 | |
| 20757 unittest.test("method--run", () { | |
| 20758 | |
| 20759 var mock = new HttpServerMock(); | |
| 20760 api.ReportsResourceApi res = new api.DfareportingApi(mock).reports; | |
| 20761 var arg_profileId = "foo"; | |
| 20762 var arg_reportId = "foo"; | |
| 20763 var arg_synchronous = true; | |
| 20764 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 20765 var path = (req.url).path; | |
| 20766 var pathOffset = 0; | |
| 20767 var index; | |
| 20768 var subPart; | |
| 20769 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 20770 pathOffset += 1; | |
| 20771 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 20772 pathOffset += 18; | |
| 20773 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 20774 pathOffset += 13; | |
| 20775 index = path.indexOf("/reports/", pathOffset); | |
| 20776 unittest.expect(index >= 0, unittest.isTrue); | |
| 20777 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 20778 pathOffset = index; | |
| 20779 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 20780 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("/reports/")); | |
| 20781 pathOffset += 9; | |
| 20782 index = path.indexOf("/run", pathOffset); | |
| 20783 unittest.expect(index >= 0, unittest.isTrue); | |
| 20784 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 20785 pathOffset = index; | |
| 20786 unittest.expect(subPart, unittest.equals("$arg_reportId")); | |
| 20787 unittest.expect(path.substring(pathOffset, pathOffset + 4), unittest.equ
als("/run")); | |
| 20788 pathOffset += 4; | |
| 20789 | |
| 20790 var query = (req.url).query; | |
| 20791 var queryOffset = 0; | |
| 20792 var queryMap = {}; | |
| 20793 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 20794 parseBool(n) { | |
| 20795 if (n == "true") return true; | |
| 20796 if (n == "false") return false; | |
| 20797 if (n == null) return null; | |
| 20798 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 20799 } | |
| 20800 if (query.length > 0) { | |
| 20801 for (var part in query.split("&")) { | |
| 20802 var keyvalue = part.split("="); | |
| 20803 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 20804 } | |
| 20805 } | |
| 20806 unittest.expect(queryMap["synchronous"].first, unittest.equals("$arg_syn
chronous")); | |
| 20807 | |
| 20808 | |
| 20809 var h = { | |
| 20810 "content-type" : "application/json; charset=utf-8", | |
| 20811 }; | |
| 20812 var resp = convert.JSON.encode(buildFile()); | |
| 20813 return new async.Future.value(stringResponse(200, h, resp)); | |
| 20814 }), true); | |
| 20815 res.run(arg_profileId, arg_reportId, synchronous: arg_synchronous).then(un
ittest.expectAsync(((api.File response) { | |
| 20816 checkFile(response); | |
| 20817 }))); | |
| 20818 }); | |
| 20819 | |
| 20820 unittest.test("method--update", () { | |
| 20821 | |
| 20822 var mock = new HttpServerMock(); | |
| 20823 api.ReportsResourceApi res = new api.DfareportingApi(mock).reports; | |
| 20824 var arg_request = buildReport(); | |
| 20825 var arg_profileId = "foo"; | |
| 20826 var arg_reportId = "foo"; | |
| 20827 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 20828 var obj = new api.Report.fromJson(json); | |
| 20829 checkReport(obj); | |
| 20830 | |
| 20831 var path = (req.url).path; | |
| 20832 var pathOffset = 0; | |
| 20833 var index; | |
| 20834 var subPart; | |
| 20835 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 20836 pathOffset += 1; | |
| 20837 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 20838 pathOffset += 18; | |
| 20839 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 20840 pathOffset += 13; | |
| 20841 index = path.indexOf("/reports/", pathOffset); | |
| 20842 unittest.expect(index >= 0, unittest.isTrue); | |
| 20843 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 20844 pathOffset = index; | |
| 20845 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 20846 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("/reports/")); | |
| 20847 pathOffset += 9; | |
| 20848 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 20849 pathOffset = path.length; | |
| 20850 unittest.expect(subPart, unittest.equals("$arg_reportId")); | |
| 20851 | |
| 20852 var query = (req.url).query; | |
| 20853 var queryOffset = 0; | |
| 20854 var queryMap = {}; | |
| 20855 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 20856 parseBool(n) { | |
| 20857 if (n == "true") return true; | |
| 20858 if (n == "false") return false; | |
| 20859 if (n == null) return null; | |
| 20860 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 20861 } | |
| 20862 if (query.length > 0) { | |
| 20863 for (var part in query.split("&")) { | |
| 20864 var keyvalue = part.split("="); | |
| 20865 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 20866 } | |
| 20867 } | |
| 20868 | |
| 20869 | |
| 20870 var h = { | |
| 20871 "content-type" : "application/json; charset=utf-8", | |
| 20872 }; | |
| 20873 var resp = convert.JSON.encode(buildReport()); | |
| 20874 return new async.Future.value(stringResponse(200, h, resp)); | |
| 20875 }), true); | |
| 20876 res.update(arg_request, arg_profileId, arg_reportId).then(unittest.expectA
sync(((api.Report response) { | |
| 20877 checkReport(response); | |
| 20878 }))); | |
| 20879 }); | |
| 20880 | |
| 20881 }); | |
| 20882 | |
| 20883 | |
| 20884 unittest.group("resource-ReportsCompatibleFieldsResourceApi", () { | |
| 20885 unittest.test("method--query", () { | |
| 20886 | |
| 20887 var mock = new HttpServerMock(); | |
| 20888 api.ReportsCompatibleFieldsResourceApi res = new api.DfareportingApi(mock)
.reports.compatibleFields; | |
| 20889 var arg_request = buildReport(); | |
| 20890 var arg_profileId = "foo"; | |
| 20891 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 20892 var obj = new api.Report.fromJson(json); | |
| 20893 checkReport(obj); | |
| 20894 | |
| 20895 var path = (req.url).path; | |
| 20896 var pathOffset = 0; | |
| 20897 var index; | |
| 20898 var subPart; | |
| 20899 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 20900 pathOffset += 1; | |
| 20901 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 20902 pathOffset += 18; | |
| 20903 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 20904 pathOffset += 13; | |
| 20905 index = path.indexOf("/reports/compatiblefields/query", pathOffset); | |
| 20906 unittest.expect(index >= 0, unittest.isTrue); | |
| 20907 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 20908 pathOffset = index; | |
| 20909 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 20910 unittest.expect(path.substring(pathOffset, pathOffset + 31), unittest.eq
uals("/reports/compatiblefields/query")); | |
| 20911 pathOffset += 31; | |
| 20912 | |
| 20913 var query = (req.url).query; | |
| 20914 var queryOffset = 0; | |
| 20915 var queryMap = {}; | |
| 20916 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 20917 parseBool(n) { | |
| 20918 if (n == "true") return true; | |
| 20919 if (n == "false") return false; | |
| 20920 if (n == null) return null; | |
| 20921 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 20922 } | |
| 20923 if (query.length > 0) { | |
| 20924 for (var part in query.split("&")) { | |
| 20925 var keyvalue = part.split("="); | |
| 20926 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 20927 } | |
| 20928 } | |
| 20929 | |
| 20930 | |
| 20931 var h = { | |
| 20932 "content-type" : "application/json; charset=utf-8", | |
| 20933 }; | |
| 20934 var resp = convert.JSON.encode(buildCompatibleFields()); | |
| 20935 return new async.Future.value(stringResponse(200, h, resp)); | |
| 20936 }), true); | |
| 20937 res.query(arg_request, arg_profileId).then(unittest.expectAsync(((api.Comp
atibleFields response) { | |
| 20938 checkCompatibleFields(response); | |
| 20939 }))); | |
| 20940 }); | |
| 20941 | |
| 20942 }); | |
| 20943 | |
| 20944 | |
| 20945 unittest.group("resource-ReportsFilesResourceApi", () { | |
| 20946 unittest.test("method--get", () { | |
| 20947 // TODO: Implement tests for media upload; | |
| 20948 // TODO: Implement tests for media download; | |
| 20949 | |
| 20950 var mock = new HttpServerMock(); | |
| 20951 api.ReportsFilesResourceApi res = new api.DfareportingApi(mock).reports.fi
les; | |
| 20952 var arg_profileId = "foo"; | |
| 20953 var arg_reportId = "foo"; | |
| 20954 var arg_fileId = "foo"; | |
| 20955 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 20956 var path = (req.url).path; | |
| 20957 var pathOffset = 0; | |
| 20958 var index; | |
| 20959 var subPart; | |
| 20960 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 20961 pathOffset += 1; | |
| 20962 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 20963 pathOffset += 18; | |
| 20964 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 20965 pathOffset += 13; | |
| 20966 index = path.indexOf("/reports/", pathOffset); | |
| 20967 unittest.expect(index >= 0, unittest.isTrue); | |
| 20968 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 20969 pathOffset = index; | |
| 20970 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 20971 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("/reports/")); | |
| 20972 pathOffset += 9; | |
| 20973 index = path.indexOf("/files/", pathOffset); | |
| 20974 unittest.expect(index >= 0, unittest.isTrue); | |
| 20975 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 20976 pathOffset = index; | |
| 20977 unittest.expect(subPart, unittest.equals("$arg_reportId")); | |
| 20978 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ
als("/files/")); | |
| 20979 pathOffset += 7; | |
| 20980 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 20981 pathOffset = path.length; | |
| 20982 unittest.expect(subPart, unittest.equals("$arg_fileId")); | |
| 20983 | |
| 20984 var query = (req.url).query; | |
| 20985 var queryOffset = 0; | |
| 20986 var queryMap = {}; | |
| 20987 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 20988 parseBool(n) { | |
| 20989 if (n == "true") return true; | |
| 20990 if (n == "false") return false; | |
| 20991 if (n == null) return null; | |
| 20992 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 20993 } | |
| 20994 if (query.length > 0) { | |
| 20995 for (var part in query.split("&")) { | |
| 20996 var keyvalue = part.split("="); | |
| 20997 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 20998 } | |
| 20999 } | |
| 21000 | |
| 21001 | |
| 21002 var h = { | |
| 21003 "content-type" : "application/json; charset=utf-8", | |
| 21004 }; | |
| 21005 var resp = convert.JSON.encode(buildFile()); | |
| 21006 return new async.Future.value(stringResponse(200, h, resp)); | |
| 21007 }), true); | |
| 21008 res.get(arg_profileId, arg_reportId, arg_fileId).then(unittest.expectAsync
(((api.File response) { | |
| 21009 checkFile(response); | |
| 21010 }))); | |
| 21011 }); | |
| 21012 | |
| 21013 unittest.test("method--list", () { | |
| 21014 | |
| 21015 var mock = new HttpServerMock(); | |
| 21016 api.ReportsFilesResourceApi res = new api.DfareportingApi(mock).reports.fi
les; | |
| 21017 var arg_profileId = "foo"; | |
| 21018 var arg_reportId = "foo"; | |
| 21019 var arg_maxResults = 42; | |
| 21020 var arg_pageToken = "foo"; | |
| 21021 var arg_sortField = "foo"; | |
| 21022 var arg_sortOrder = "foo"; | |
| 21023 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 21024 var path = (req.url).path; | |
| 21025 var pathOffset = 0; | |
| 21026 var index; | |
| 21027 var subPart; | |
| 21028 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 21029 pathOffset += 1; | |
| 21030 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 21031 pathOffset += 18; | |
| 21032 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 21033 pathOffset += 13; | |
| 21034 index = path.indexOf("/reports/", pathOffset); | |
| 21035 unittest.expect(index >= 0, unittest.isTrue); | |
| 21036 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 21037 pathOffset = index; | |
| 21038 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 21039 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ
als("/reports/")); | |
| 21040 pathOffset += 9; | |
| 21041 index = path.indexOf("/files", pathOffset); | |
| 21042 unittest.expect(index >= 0, unittest.isTrue); | |
| 21043 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 21044 pathOffset = index; | |
| 21045 unittest.expect(subPart, unittest.equals("$arg_reportId")); | |
| 21046 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ
als("/files")); | |
| 21047 pathOffset += 6; | |
| 21048 | |
| 21049 var query = (req.url).query; | |
| 21050 var queryOffset = 0; | |
| 21051 var queryMap = {}; | |
| 21052 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 21053 parseBool(n) { | |
| 21054 if (n == "true") return true; | |
| 21055 if (n == "false") return false; | |
| 21056 if (n == null) return null; | |
| 21057 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 21058 } | |
| 21059 if (query.length > 0) { | |
| 21060 for (var part in query.split("&")) { | |
| 21061 var keyvalue = part.split("="); | |
| 21062 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 21063 } | |
| 21064 } | |
| 21065 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | |
| 21066 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 21067 unittest.expect(queryMap["sortField"].first, unittest.equals(arg_sortFie
ld)); | |
| 21068 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | |
| 21069 | |
| 21070 | |
| 21071 var h = { | |
| 21072 "content-type" : "application/json; charset=utf-8", | |
| 21073 }; | |
| 21074 var resp = convert.JSON.encode(buildFileList()); | |
| 21075 return new async.Future.value(stringResponse(200, h, resp)); | |
| 21076 }), true); | |
| 21077 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) { | |
| 21078 checkFileList(response); | |
| 21079 }))); | |
| 21080 }); | |
| 21081 | |
| 21082 }); | |
| 21083 | |
| 21084 | |
| 21085 unittest.group("resource-SitesResourceApi", () { | |
| 21086 unittest.test("method--get", () { | |
| 21087 | |
| 21088 var mock = new HttpServerMock(); | |
| 21089 api.SitesResourceApi res = new api.DfareportingApi(mock).sites; | |
| 21090 var arg_profileId = "foo"; | |
| 21091 var arg_id = "foo"; | |
| 21092 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 21093 var path = (req.url).path; | |
| 21094 var pathOffset = 0; | |
| 21095 var index; | |
| 21096 var subPart; | |
| 21097 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 21098 pathOffset += 1; | |
| 21099 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 21100 pathOffset += 18; | |
| 21101 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 21102 pathOffset += 13; | |
| 21103 index = path.indexOf("/sites/", pathOffset); | |
| 21104 unittest.expect(index >= 0, unittest.isTrue); | |
| 21105 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 21106 pathOffset = index; | |
| 21107 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 21108 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ
als("/sites/")); | |
| 21109 pathOffset += 7; | |
| 21110 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 21111 pathOffset = path.length; | |
| 21112 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 21113 | |
| 21114 var query = (req.url).query; | |
| 21115 var queryOffset = 0; | |
| 21116 var queryMap = {}; | |
| 21117 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 21118 parseBool(n) { | |
| 21119 if (n == "true") return true; | |
| 21120 if (n == "false") return false; | |
| 21121 if (n == null) return null; | |
| 21122 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 21123 } | |
| 21124 if (query.length > 0) { | |
| 21125 for (var part in query.split("&")) { | |
| 21126 var keyvalue = part.split("="); | |
| 21127 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 21128 } | |
| 21129 } | |
| 21130 | |
| 21131 | |
| 21132 var h = { | |
| 21133 "content-type" : "application/json; charset=utf-8", | |
| 21134 }; | |
| 21135 var resp = convert.JSON.encode(buildSite()); | |
| 21136 return new async.Future.value(stringResponse(200, h, resp)); | |
| 21137 }), true); | |
| 21138 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.Site respon
se) { | |
| 21139 checkSite(response); | |
| 21140 }))); | |
| 21141 }); | |
| 21142 | |
| 21143 unittest.test("method--insert", () { | |
| 21144 | |
| 21145 var mock = new HttpServerMock(); | |
| 21146 api.SitesResourceApi res = new api.DfareportingApi(mock).sites; | |
| 21147 var arg_request = buildSite(); | |
| 21148 var arg_profileId = "foo"; | |
| 21149 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 21150 var obj = new api.Site.fromJson(json); | |
| 21151 checkSite(obj); | |
| 21152 | |
| 21153 var path = (req.url).path; | |
| 21154 var pathOffset = 0; | |
| 21155 var index; | |
| 21156 var subPart; | |
| 21157 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 21158 pathOffset += 1; | |
| 21159 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 21160 pathOffset += 18; | |
| 21161 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 21162 pathOffset += 13; | |
| 21163 index = path.indexOf("/sites", pathOffset); | |
| 21164 unittest.expect(index >= 0, unittest.isTrue); | |
| 21165 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 21166 pathOffset = index; | |
| 21167 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 21168 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ
als("/sites")); | |
| 21169 pathOffset += 6; | |
| 21170 | |
| 21171 var query = (req.url).query; | |
| 21172 var queryOffset = 0; | |
| 21173 var queryMap = {}; | |
| 21174 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 21175 parseBool(n) { | |
| 21176 if (n == "true") return true; | |
| 21177 if (n == "false") return false; | |
| 21178 if (n == null) return null; | |
| 21179 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 21180 } | |
| 21181 if (query.length > 0) { | |
| 21182 for (var part in query.split("&")) { | |
| 21183 var keyvalue = part.split("="); | |
| 21184 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 21185 } | |
| 21186 } | |
| 21187 | |
| 21188 | |
| 21189 var h = { | |
| 21190 "content-type" : "application/json; charset=utf-8", | |
| 21191 }; | |
| 21192 var resp = convert.JSON.encode(buildSite()); | |
| 21193 return new async.Future.value(stringResponse(200, h, resp)); | |
| 21194 }), true); | |
| 21195 res.insert(arg_request, arg_profileId).then(unittest.expectAsync(((api.Sit
e response) { | |
| 21196 checkSite(response); | |
| 21197 }))); | |
| 21198 }); | |
| 21199 | |
| 21200 unittest.test("method--list", () { | |
| 21201 | |
| 21202 var mock = new HttpServerMock(); | |
| 21203 api.SitesResourceApi res = new api.DfareportingApi(mock).sites; | |
| 21204 var arg_profileId = "foo"; | |
| 21205 var arg_acceptsInStreamVideoPlacements = true; | |
| 21206 var arg_acceptsInterstitialPlacements = true; | |
| 21207 var arg_acceptsPublisherPaidPlacements = true; | |
| 21208 var arg_adWordsSite = true; | |
| 21209 var arg_approved = true; | |
| 21210 var arg_campaignIds = buildUnnamed452(); | |
| 21211 var arg_directorySiteIds = buildUnnamed453(); | |
| 21212 var arg_ids = buildUnnamed454(); | |
| 21213 var arg_maxResults = 42; | |
| 21214 var arg_pageToken = "foo"; | |
| 21215 var arg_searchString = "foo"; | |
| 21216 var arg_sortField = "foo"; | |
| 21217 var arg_sortOrder = "foo"; | |
| 21218 var arg_subaccountId = "foo"; | |
| 21219 var arg_unmappedSite = true; | |
| 21220 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 21221 var path = (req.url).path; | |
| 21222 var pathOffset = 0; | |
| 21223 var index; | |
| 21224 var subPart; | |
| 21225 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 21226 pathOffset += 1; | |
| 21227 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 21228 pathOffset += 18; | |
| 21229 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 21230 pathOffset += 13; | |
| 21231 index = path.indexOf("/sites", pathOffset); | |
| 21232 unittest.expect(index >= 0, unittest.isTrue); | |
| 21233 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 21234 pathOffset = index; | |
| 21235 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 21236 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ
als("/sites")); | |
| 21237 pathOffset += 6; | |
| 21238 | |
| 21239 var query = (req.url).query; | |
| 21240 var queryOffset = 0; | |
| 21241 var queryMap = {}; | |
| 21242 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 21243 parseBool(n) { | |
| 21244 if (n == "true") return true; | |
| 21245 if (n == "false") return false; | |
| 21246 if (n == null) return null; | |
| 21247 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 21248 } | |
| 21249 if (query.length > 0) { | |
| 21250 for (var part in query.split("&")) { | |
| 21251 var keyvalue = part.split("="); | |
| 21252 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 21253 } | |
| 21254 } | |
| 21255 unittest.expect(queryMap["acceptsInStreamVideoPlacements"].first, unitte
st.equals("$arg_acceptsInStreamVideoPlacements")); | |
| 21256 unittest.expect(queryMap["acceptsInterstitialPlacements"].first, unittes
t.equals("$arg_acceptsInterstitialPlacements")); | |
| 21257 unittest.expect(queryMap["acceptsPublisherPaidPlacements"].first, unitte
st.equals("$arg_acceptsPublisherPaidPlacements")); | |
| 21258 unittest.expect(queryMap["adWordsSite"].first, unittest.equals("$arg_adW
ordsSite")); | |
| 21259 unittest.expect(queryMap["approved"].first, unittest.equals("$arg_approv
ed")); | |
| 21260 unittest.expect(queryMap["campaignIds"], unittest.equals(arg_campaignIds
)); | |
| 21261 unittest.expect(queryMap["directorySiteIds"], unittest.equals(arg_direct
orySiteIds)); | |
| 21262 unittest.expect(queryMap["ids"], unittest.equals(arg_ids)); | |
| 21263 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | |
| 21264 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 21265 unittest.expect(queryMap["searchString"].first, unittest.equals(arg_sear
chString)); | |
| 21266 unittest.expect(queryMap["sortField"].first, unittest.equals(arg_sortFie
ld)); | |
| 21267 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | |
| 21268 unittest.expect(queryMap["subaccountId"].first, unittest.equals(arg_suba
ccountId)); | |
| 21269 unittest.expect(queryMap["unmappedSite"].first, unittest.equals("$arg_un
mappedSite")); | |
| 21270 | |
| 21271 | |
| 21272 var h = { | |
| 21273 "content-type" : "application/json; charset=utf-8", | |
| 21274 }; | |
| 21275 var resp = convert.JSON.encode(buildSitesListResponse()); | |
| 21276 return new async.Future.value(stringResponse(200, h, resp)); | |
| 21277 }), true); | |
| 21278 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) { | |
| 21279 checkSitesListResponse(response); | |
| 21280 }))); | |
| 21281 }); | |
| 21282 | |
| 21283 unittest.test("method--patch", () { | |
| 21284 | |
| 21285 var mock = new HttpServerMock(); | |
| 21286 api.SitesResourceApi res = new api.DfareportingApi(mock).sites; | |
| 21287 var arg_request = buildSite(); | |
| 21288 var arg_profileId = "foo"; | |
| 21289 var arg_id = "foo"; | |
| 21290 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 21291 var obj = new api.Site.fromJson(json); | |
| 21292 checkSite(obj); | |
| 21293 | |
| 21294 var path = (req.url).path; | |
| 21295 var pathOffset = 0; | |
| 21296 var index; | |
| 21297 var subPart; | |
| 21298 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 21299 pathOffset += 1; | |
| 21300 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 21301 pathOffset += 18; | |
| 21302 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 21303 pathOffset += 13; | |
| 21304 index = path.indexOf("/sites", pathOffset); | |
| 21305 unittest.expect(index >= 0, unittest.isTrue); | |
| 21306 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 21307 pathOffset = index; | |
| 21308 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 21309 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ
als("/sites")); | |
| 21310 pathOffset += 6; | |
| 21311 | |
| 21312 var query = (req.url).query; | |
| 21313 var queryOffset = 0; | |
| 21314 var queryMap = {}; | |
| 21315 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 21316 parseBool(n) { | |
| 21317 if (n == "true") return true; | |
| 21318 if (n == "false") return false; | |
| 21319 if (n == null) return null; | |
| 21320 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 21321 } | |
| 21322 if (query.length > 0) { | |
| 21323 for (var part in query.split("&")) { | |
| 21324 var keyvalue = part.split("="); | |
| 21325 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 21326 } | |
| 21327 } | |
| 21328 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); | |
| 21329 | |
| 21330 | |
| 21331 var h = { | |
| 21332 "content-type" : "application/json; charset=utf-8", | |
| 21333 }; | |
| 21334 var resp = convert.JSON.encode(buildSite()); | |
| 21335 return new async.Future.value(stringResponse(200, h, resp)); | |
| 21336 }), true); | |
| 21337 res.patch(arg_request, arg_profileId, arg_id).then(unittest.expectAsync(((
api.Site response) { | |
| 21338 checkSite(response); | |
| 21339 }))); | |
| 21340 }); | |
| 21341 | |
| 21342 unittest.test("method--update", () { | |
| 21343 | |
| 21344 var mock = new HttpServerMock(); | |
| 21345 api.SitesResourceApi res = new api.DfareportingApi(mock).sites; | |
| 21346 var arg_request = buildSite(); | |
| 21347 var arg_profileId = "foo"; | |
| 21348 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 21349 var obj = new api.Site.fromJson(json); | |
| 21350 checkSite(obj); | |
| 21351 | |
| 21352 var path = (req.url).path; | |
| 21353 var pathOffset = 0; | |
| 21354 var index; | |
| 21355 var subPart; | |
| 21356 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 21357 pathOffset += 1; | |
| 21358 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 21359 pathOffset += 18; | |
| 21360 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 21361 pathOffset += 13; | |
| 21362 index = path.indexOf("/sites", pathOffset); | |
| 21363 unittest.expect(index >= 0, unittest.isTrue); | |
| 21364 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 21365 pathOffset = index; | |
| 21366 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 21367 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ
als("/sites")); | |
| 21368 pathOffset += 6; | |
| 21369 | |
| 21370 var query = (req.url).query; | |
| 21371 var queryOffset = 0; | |
| 21372 var queryMap = {}; | |
| 21373 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 21374 parseBool(n) { | |
| 21375 if (n == "true") return true; | |
| 21376 if (n == "false") return false; | |
| 21377 if (n == null) return null; | |
| 21378 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 21379 } | |
| 21380 if (query.length > 0) { | |
| 21381 for (var part in query.split("&")) { | |
| 21382 var keyvalue = part.split("="); | |
| 21383 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 21384 } | |
| 21385 } | |
| 21386 | |
| 21387 | |
| 21388 var h = { | |
| 21389 "content-type" : "application/json; charset=utf-8", | |
| 21390 }; | |
| 21391 var resp = convert.JSON.encode(buildSite()); | |
| 21392 return new async.Future.value(stringResponse(200, h, resp)); | |
| 21393 }), true); | |
| 21394 res.update(arg_request, arg_profileId).then(unittest.expectAsync(((api.Sit
e response) { | |
| 21395 checkSite(response); | |
| 21396 }))); | |
| 21397 }); | |
| 21398 | |
| 21399 }); | |
| 21400 | |
| 21401 | |
| 21402 unittest.group("resource-SizesResourceApi", () { | |
| 21403 unittest.test("method--get", () { | |
| 21404 | |
| 21405 var mock = new HttpServerMock(); | |
| 21406 api.SizesResourceApi res = new api.DfareportingApi(mock).sizes; | |
| 21407 var arg_profileId = "foo"; | |
| 21408 var arg_id = "foo"; | |
| 21409 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 21410 var path = (req.url).path; | |
| 21411 var pathOffset = 0; | |
| 21412 var index; | |
| 21413 var subPart; | |
| 21414 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 21415 pathOffset += 1; | |
| 21416 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 21417 pathOffset += 18; | |
| 21418 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 21419 pathOffset += 13; | |
| 21420 index = path.indexOf("/sizes/", pathOffset); | |
| 21421 unittest.expect(index >= 0, unittest.isTrue); | |
| 21422 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 21423 pathOffset = index; | |
| 21424 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 21425 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ
als("/sizes/")); | |
| 21426 pathOffset += 7; | |
| 21427 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 21428 pathOffset = path.length; | |
| 21429 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 21430 | |
| 21431 var query = (req.url).query; | |
| 21432 var queryOffset = 0; | |
| 21433 var queryMap = {}; | |
| 21434 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 21435 parseBool(n) { | |
| 21436 if (n == "true") return true; | |
| 21437 if (n == "false") return false; | |
| 21438 if (n == null) return null; | |
| 21439 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 21440 } | |
| 21441 if (query.length > 0) { | |
| 21442 for (var part in query.split("&")) { | |
| 21443 var keyvalue = part.split("="); | |
| 21444 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 21445 } | |
| 21446 } | |
| 21447 | |
| 21448 | |
| 21449 var h = { | |
| 21450 "content-type" : "application/json; charset=utf-8", | |
| 21451 }; | |
| 21452 var resp = convert.JSON.encode(buildSize()); | |
| 21453 return new async.Future.value(stringResponse(200, h, resp)); | |
| 21454 }), true); | |
| 21455 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.Size respon
se) { | |
| 21456 checkSize(response); | |
| 21457 }))); | |
| 21458 }); | |
| 21459 | |
| 21460 unittest.test("method--insert", () { | |
| 21461 | |
| 21462 var mock = new HttpServerMock(); | |
| 21463 api.SizesResourceApi res = new api.DfareportingApi(mock).sizes; | |
| 21464 var arg_request = buildSize(); | |
| 21465 var arg_profileId = "foo"; | |
| 21466 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 21467 var obj = new api.Size.fromJson(json); | |
| 21468 checkSize(obj); | |
| 21469 | |
| 21470 var path = (req.url).path; | |
| 21471 var pathOffset = 0; | |
| 21472 var index; | |
| 21473 var subPart; | |
| 21474 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 21475 pathOffset += 1; | |
| 21476 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 21477 pathOffset += 18; | |
| 21478 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 21479 pathOffset += 13; | |
| 21480 index = path.indexOf("/sizes", pathOffset); | |
| 21481 unittest.expect(index >= 0, unittest.isTrue); | |
| 21482 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 21483 pathOffset = index; | |
| 21484 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 21485 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ
als("/sizes")); | |
| 21486 pathOffset += 6; | |
| 21487 | |
| 21488 var query = (req.url).query; | |
| 21489 var queryOffset = 0; | |
| 21490 var queryMap = {}; | |
| 21491 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 21492 parseBool(n) { | |
| 21493 if (n == "true") return true; | |
| 21494 if (n == "false") return false; | |
| 21495 if (n == null) return null; | |
| 21496 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 21497 } | |
| 21498 if (query.length > 0) { | |
| 21499 for (var part in query.split("&")) { | |
| 21500 var keyvalue = part.split("="); | |
| 21501 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 21502 } | |
| 21503 } | |
| 21504 | |
| 21505 | |
| 21506 var h = { | |
| 21507 "content-type" : "application/json; charset=utf-8", | |
| 21508 }; | |
| 21509 var resp = convert.JSON.encode(buildSize()); | |
| 21510 return new async.Future.value(stringResponse(200, h, resp)); | |
| 21511 }), true); | |
| 21512 res.insert(arg_request, arg_profileId).then(unittest.expectAsync(((api.Siz
e response) { | |
| 21513 checkSize(response); | |
| 21514 }))); | |
| 21515 }); | |
| 21516 | |
| 21517 unittest.test("method--list", () { | |
| 21518 | |
| 21519 var mock = new HttpServerMock(); | |
| 21520 api.SizesResourceApi res = new api.DfareportingApi(mock).sizes; | |
| 21521 var arg_profileId = "foo"; | |
| 21522 var arg_height = 42; | |
| 21523 var arg_iabStandard = true; | |
| 21524 var arg_ids = buildUnnamed455(); | |
| 21525 var arg_width = 42; | |
| 21526 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 21527 var path = (req.url).path; | |
| 21528 var pathOffset = 0; | |
| 21529 var index; | |
| 21530 var subPart; | |
| 21531 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 21532 pathOffset += 1; | |
| 21533 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 21534 pathOffset += 18; | |
| 21535 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 21536 pathOffset += 13; | |
| 21537 index = path.indexOf("/sizes", pathOffset); | |
| 21538 unittest.expect(index >= 0, unittest.isTrue); | |
| 21539 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 21540 pathOffset = index; | |
| 21541 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 21542 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ
als("/sizes")); | |
| 21543 pathOffset += 6; | |
| 21544 | |
| 21545 var query = (req.url).query; | |
| 21546 var queryOffset = 0; | |
| 21547 var queryMap = {}; | |
| 21548 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 21549 parseBool(n) { | |
| 21550 if (n == "true") return true; | |
| 21551 if (n == "false") return false; | |
| 21552 if (n == null) return null; | |
| 21553 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 21554 } | |
| 21555 if (query.length > 0) { | |
| 21556 for (var part in query.split("&")) { | |
| 21557 var keyvalue = part.split("="); | |
| 21558 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 21559 } | |
| 21560 } | |
| 21561 unittest.expect(core.int.parse(queryMap["height"].first), unittest.equal
s(arg_height)); | |
| 21562 unittest.expect(queryMap["iabStandard"].first, unittest.equals("$arg_iab
Standard")); | |
| 21563 unittest.expect(queryMap["ids"], unittest.equals(arg_ids)); | |
| 21564 unittest.expect(core.int.parse(queryMap["width"].first), unittest.equals
(arg_width)); | |
| 21565 | |
| 21566 | |
| 21567 var h = { | |
| 21568 "content-type" : "application/json; charset=utf-8", | |
| 21569 }; | |
| 21570 var resp = convert.JSON.encode(buildSizesListResponse()); | |
| 21571 return new async.Future.value(stringResponse(200, h, resp)); | |
| 21572 }), true); | |
| 21573 res.list(arg_profileId, height: arg_height, iabStandard: arg_iabStandard,
ids: arg_ids, width: arg_width).then(unittest.expectAsync(((api.SizesListRespons
e response) { | |
| 21574 checkSizesListResponse(response); | |
| 21575 }))); | |
| 21576 }); | |
| 21577 | |
| 21578 }); | |
| 21579 | |
| 21580 | |
| 21581 unittest.group("resource-SubaccountsResourceApi", () { | |
| 21582 unittest.test("method--get", () { | |
| 21583 | |
| 21584 var mock = new HttpServerMock(); | |
| 21585 api.SubaccountsResourceApi res = new api.DfareportingApi(mock).subaccounts
; | |
| 21586 var arg_profileId = "foo"; | |
| 21587 var arg_id = "foo"; | |
| 21588 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 21589 var path = (req.url).path; | |
| 21590 var pathOffset = 0; | |
| 21591 var index; | |
| 21592 var subPart; | |
| 21593 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 21594 pathOffset += 1; | |
| 21595 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 21596 pathOffset += 18; | |
| 21597 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 21598 pathOffset += 13; | |
| 21599 index = path.indexOf("/subaccounts/", pathOffset); | |
| 21600 unittest.expect(index >= 0, unittest.isTrue); | |
| 21601 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 21602 pathOffset = index; | |
| 21603 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 21604 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("/subaccounts/")); | |
| 21605 pathOffset += 13; | |
| 21606 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 21607 pathOffset = path.length; | |
| 21608 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 21609 | |
| 21610 var query = (req.url).query; | |
| 21611 var queryOffset = 0; | |
| 21612 var queryMap = {}; | |
| 21613 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 21614 parseBool(n) { | |
| 21615 if (n == "true") return true; | |
| 21616 if (n == "false") return false; | |
| 21617 if (n == null) return null; | |
| 21618 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 21619 } | |
| 21620 if (query.length > 0) { | |
| 21621 for (var part in query.split("&")) { | |
| 21622 var keyvalue = part.split("="); | |
| 21623 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 21624 } | |
| 21625 } | |
| 21626 | |
| 21627 | |
| 21628 var h = { | |
| 21629 "content-type" : "application/json; charset=utf-8", | |
| 21630 }; | |
| 21631 var resp = convert.JSON.encode(buildSubaccount()); | |
| 21632 return new async.Future.value(stringResponse(200, h, resp)); | |
| 21633 }), true); | |
| 21634 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.Subaccount
response) { | |
| 21635 checkSubaccount(response); | |
| 21636 }))); | |
| 21637 }); | |
| 21638 | |
| 21639 unittest.test("method--insert", () { | |
| 21640 | |
| 21641 var mock = new HttpServerMock(); | |
| 21642 api.SubaccountsResourceApi res = new api.DfareportingApi(mock).subaccounts
; | |
| 21643 var arg_request = buildSubaccount(); | |
| 21644 var arg_profileId = "foo"; | |
| 21645 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 21646 var obj = new api.Subaccount.fromJson(json); | |
| 21647 checkSubaccount(obj); | |
| 21648 | |
| 21649 var path = (req.url).path; | |
| 21650 var pathOffset = 0; | |
| 21651 var index; | |
| 21652 var subPart; | |
| 21653 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 21654 pathOffset += 1; | |
| 21655 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 21656 pathOffset += 18; | |
| 21657 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 21658 pathOffset += 13; | |
| 21659 index = path.indexOf("/subaccounts", pathOffset); | |
| 21660 unittest.expect(index >= 0, unittest.isTrue); | |
| 21661 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 21662 pathOffset = index; | |
| 21663 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 21664 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("/subaccounts")); | |
| 21665 pathOffset += 12; | |
| 21666 | |
| 21667 var query = (req.url).query; | |
| 21668 var queryOffset = 0; | |
| 21669 var queryMap = {}; | |
| 21670 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 21671 parseBool(n) { | |
| 21672 if (n == "true") return true; | |
| 21673 if (n == "false") return false; | |
| 21674 if (n == null) return null; | |
| 21675 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 21676 } | |
| 21677 if (query.length > 0) { | |
| 21678 for (var part in query.split("&")) { | |
| 21679 var keyvalue = part.split("="); | |
| 21680 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 21681 } | |
| 21682 } | |
| 21683 | |
| 21684 | |
| 21685 var h = { | |
| 21686 "content-type" : "application/json; charset=utf-8", | |
| 21687 }; | |
| 21688 var resp = convert.JSON.encode(buildSubaccount()); | |
| 21689 return new async.Future.value(stringResponse(200, h, resp)); | |
| 21690 }), true); | |
| 21691 res.insert(arg_request, arg_profileId).then(unittest.expectAsync(((api.Sub
account response) { | |
| 21692 checkSubaccount(response); | |
| 21693 }))); | |
| 21694 }); | |
| 21695 | |
| 21696 unittest.test("method--list", () { | |
| 21697 | |
| 21698 var mock = new HttpServerMock(); | |
| 21699 api.SubaccountsResourceApi res = new api.DfareportingApi(mock).subaccounts
; | |
| 21700 var arg_profileId = "foo"; | |
| 21701 var arg_ids = buildUnnamed456(); | |
| 21702 var arg_maxResults = 42; | |
| 21703 var arg_pageToken = "foo"; | |
| 21704 var arg_searchString = "foo"; | |
| 21705 var arg_sortField = "foo"; | |
| 21706 var arg_sortOrder = "foo"; | |
| 21707 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 21708 var path = (req.url).path; | |
| 21709 var pathOffset = 0; | |
| 21710 var index; | |
| 21711 var subPart; | |
| 21712 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 21713 pathOffset += 1; | |
| 21714 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 21715 pathOffset += 18; | |
| 21716 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 21717 pathOffset += 13; | |
| 21718 index = path.indexOf("/subaccounts", pathOffset); | |
| 21719 unittest.expect(index >= 0, unittest.isTrue); | |
| 21720 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 21721 pathOffset = index; | |
| 21722 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 21723 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("/subaccounts")); | |
| 21724 pathOffset += 12; | |
| 21725 | |
| 21726 var query = (req.url).query; | |
| 21727 var queryOffset = 0; | |
| 21728 var queryMap = {}; | |
| 21729 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 21730 parseBool(n) { | |
| 21731 if (n == "true") return true; | |
| 21732 if (n == "false") return false; | |
| 21733 if (n == null) return null; | |
| 21734 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 21735 } | |
| 21736 if (query.length > 0) { | |
| 21737 for (var part in query.split("&")) { | |
| 21738 var keyvalue = part.split("="); | |
| 21739 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 21740 } | |
| 21741 } | |
| 21742 unittest.expect(queryMap["ids"], unittest.equals(arg_ids)); | |
| 21743 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | |
| 21744 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 21745 unittest.expect(queryMap["searchString"].first, unittest.equals(arg_sear
chString)); | |
| 21746 unittest.expect(queryMap["sortField"].first, unittest.equals(arg_sortFie
ld)); | |
| 21747 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | |
| 21748 | |
| 21749 | |
| 21750 var h = { | |
| 21751 "content-type" : "application/json; charset=utf-8", | |
| 21752 }; | |
| 21753 var resp = convert.JSON.encode(buildSubaccountsListResponse()); | |
| 21754 return new async.Future.value(stringResponse(200, h, resp)); | |
| 21755 }), true); | |
| 21756 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) { | |
| 21757 checkSubaccountsListResponse(response); | |
| 21758 }))); | |
| 21759 }); | |
| 21760 | |
| 21761 unittest.test("method--patch", () { | |
| 21762 | |
| 21763 var mock = new HttpServerMock(); | |
| 21764 api.SubaccountsResourceApi res = new api.DfareportingApi(mock).subaccounts
; | |
| 21765 var arg_request = buildSubaccount(); | |
| 21766 var arg_profileId = "foo"; | |
| 21767 var arg_id = "foo"; | |
| 21768 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 21769 var obj = new api.Subaccount.fromJson(json); | |
| 21770 checkSubaccount(obj); | |
| 21771 | |
| 21772 var path = (req.url).path; | |
| 21773 var pathOffset = 0; | |
| 21774 var index; | |
| 21775 var subPart; | |
| 21776 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 21777 pathOffset += 1; | |
| 21778 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 21779 pathOffset += 18; | |
| 21780 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 21781 pathOffset += 13; | |
| 21782 index = path.indexOf("/subaccounts", pathOffset); | |
| 21783 unittest.expect(index >= 0, unittest.isTrue); | |
| 21784 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 21785 pathOffset = index; | |
| 21786 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 21787 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("/subaccounts")); | |
| 21788 pathOffset += 12; | |
| 21789 | |
| 21790 var query = (req.url).query; | |
| 21791 var queryOffset = 0; | |
| 21792 var queryMap = {}; | |
| 21793 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 21794 parseBool(n) { | |
| 21795 if (n == "true") return true; | |
| 21796 if (n == "false") return false; | |
| 21797 if (n == null) return null; | |
| 21798 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 21799 } | |
| 21800 if (query.length > 0) { | |
| 21801 for (var part in query.split("&")) { | |
| 21802 var keyvalue = part.split("="); | |
| 21803 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 21804 } | |
| 21805 } | |
| 21806 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); | |
| 21807 | |
| 21808 | |
| 21809 var h = { | |
| 21810 "content-type" : "application/json; charset=utf-8", | |
| 21811 }; | |
| 21812 var resp = convert.JSON.encode(buildSubaccount()); | |
| 21813 return new async.Future.value(stringResponse(200, h, resp)); | |
| 21814 }), true); | |
| 21815 res.patch(arg_request, arg_profileId, arg_id).then(unittest.expectAsync(((
api.Subaccount response) { | |
| 21816 checkSubaccount(response); | |
| 21817 }))); | |
| 21818 }); | |
| 21819 | |
| 21820 unittest.test("method--update", () { | |
| 21821 | |
| 21822 var mock = new HttpServerMock(); | |
| 21823 api.SubaccountsResourceApi res = new api.DfareportingApi(mock).subaccounts
; | |
| 21824 var arg_request = buildSubaccount(); | |
| 21825 var arg_profileId = "foo"; | |
| 21826 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 21827 var obj = new api.Subaccount.fromJson(json); | |
| 21828 checkSubaccount(obj); | |
| 21829 | |
| 21830 var path = (req.url).path; | |
| 21831 var pathOffset = 0; | |
| 21832 var index; | |
| 21833 var subPart; | |
| 21834 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 21835 pathOffset += 1; | |
| 21836 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 21837 pathOffset += 18; | |
| 21838 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 21839 pathOffset += 13; | |
| 21840 index = path.indexOf("/subaccounts", pathOffset); | |
| 21841 unittest.expect(index >= 0, unittest.isTrue); | |
| 21842 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 21843 pathOffset = index; | |
| 21844 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 21845 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("/subaccounts")); | |
| 21846 pathOffset += 12; | |
| 21847 | |
| 21848 var query = (req.url).query; | |
| 21849 var queryOffset = 0; | |
| 21850 var queryMap = {}; | |
| 21851 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 21852 parseBool(n) { | |
| 21853 if (n == "true") return true; | |
| 21854 if (n == "false") return false; | |
| 21855 if (n == null) return null; | |
| 21856 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 21857 } | |
| 21858 if (query.length > 0) { | |
| 21859 for (var part in query.split("&")) { | |
| 21860 var keyvalue = part.split("="); | |
| 21861 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 21862 } | |
| 21863 } | |
| 21864 | |
| 21865 | |
| 21866 var h = { | |
| 21867 "content-type" : "application/json; charset=utf-8", | |
| 21868 }; | |
| 21869 var resp = convert.JSON.encode(buildSubaccount()); | |
| 21870 return new async.Future.value(stringResponse(200, h, resp)); | |
| 21871 }), true); | |
| 21872 res.update(arg_request, arg_profileId).then(unittest.expectAsync(((api.Sub
account response) { | |
| 21873 checkSubaccount(response); | |
| 21874 }))); | |
| 21875 }); | |
| 21876 | |
| 21877 }); | |
| 21878 | |
| 21879 | |
| 21880 unittest.group("resource-TargetableRemarketingListsResourceApi", () { | |
| 21881 unittest.test("method--get", () { | |
| 21882 | |
| 21883 var mock = new HttpServerMock(); | |
| 21884 api.TargetableRemarketingListsResourceApi res = new api.DfareportingApi(mo
ck).targetableRemarketingLists; | |
| 21885 var arg_profileId = "foo"; | |
| 21886 var arg_id = "foo"; | |
| 21887 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 21888 var path = (req.url).path; | |
| 21889 var pathOffset = 0; | |
| 21890 var index; | |
| 21891 var subPart; | |
| 21892 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 21893 pathOffset += 1; | |
| 21894 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 21895 pathOffset += 18; | |
| 21896 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 21897 pathOffset += 13; | |
| 21898 index = path.indexOf("/targetableRemarketingLists/", pathOffset); | |
| 21899 unittest.expect(index >= 0, unittest.isTrue); | |
| 21900 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 21901 pathOffset = index; | |
| 21902 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 21903 unittest.expect(path.substring(pathOffset, pathOffset + 28), unittest.eq
uals("/targetableRemarketingLists/")); | |
| 21904 pathOffset += 28; | |
| 21905 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 21906 pathOffset = path.length; | |
| 21907 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 21908 | |
| 21909 var query = (req.url).query; | |
| 21910 var queryOffset = 0; | |
| 21911 var queryMap = {}; | |
| 21912 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 21913 parseBool(n) { | |
| 21914 if (n == "true") return true; | |
| 21915 if (n == "false") return false; | |
| 21916 if (n == null) return null; | |
| 21917 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 21918 } | |
| 21919 if (query.length > 0) { | |
| 21920 for (var part in query.split("&")) { | |
| 21921 var keyvalue = part.split("="); | |
| 21922 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 21923 } | |
| 21924 } | |
| 21925 | |
| 21926 | |
| 21927 var h = { | |
| 21928 "content-type" : "application/json; charset=utf-8", | |
| 21929 }; | |
| 21930 var resp = convert.JSON.encode(buildTargetableRemarketingList()); | |
| 21931 return new async.Future.value(stringResponse(200, h, resp)); | |
| 21932 }), true); | |
| 21933 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.TargetableR
emarketingList response) { | |
| 21934 checkTargetableRemarketingList(response); | |
| 21935 }))); | |
| 21936 }); | |
| 21937 | |
| 21938 unittest.test("method--list", () { | |
| 21939 | |
| 21940 var mock = new HttpServerMock(); | |
| 21941 api.TargetableRemarketingListsResourceApi res = new api.DfareportingApi(mo
ck).targetableRemarketingLists; | |
| 21942 var arg_profileId = "foo"; | |
| 21943 var arg_advertiserId = "foo"; | |
| 21944 var arg_active = true; | |
| 21945 var arg_maxResults = 42; | |
| 21946 var arg_name = "foo"; | |
| 21947 var arg_pageToken = "foo"; | |
| 21948 var arg_sortField = "foo"; | |
| 21949 var arg_sortOrder = "foo"; | |
| 21950 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 21951 var path = (req.url).path; | |
| 21952 var pathOffset = 0; | |
| 21953 var index; | |
| 21954 var subPart; | |
| 21955 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 21956 pathOffset += 1; | |
| 21957 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 21958 pathOffset += 18; | |
| 21959 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 21960 pathOffset += 13; | |
| 21961 index = path.indexOf("/targetableRemarketingLists", pathOffset); | |
| 21962 unittest.expect(index >= 0, unittest.isTrue); | |
| 21963 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 21964 pathOffset = index; | |
| 21965 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 21966 unittest.expect(path.substring(pathOffset, pathOffset + 27), unittest.eq
uals("/targetableRemarketingLists")); | |
| 21967 pathOffset += 27; | |
| 21968 | |
| 21969 var query = (req.url).query; | |
| 21970 var queryOffset = 0; | |
| 21971 var queryMap = {}; | |
| 21972 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 21973 parseBool(n) { | |
| 21974 if (n == "true") return true; | |
| 21975 if (n == "false") return false; | |
| 21976 if (n == null) return null; | |
| 21977 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 21978 } | |
| 21979 if (query.length > 0) { | |
| 21980 for (var part in query.split("&")) { | |
| 21981 var keyvalue = part.split("="); | |
| 21982 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 21983 } | |
| 21984 } | |
| 21985 unittest.expect(queryMap["advertiserId"].first, unittest.equals(arg_adve
rtiserId)); | |
| 21986 unittest.expect(queryMap["active"].first, unittest.equals("$arg_active")
); | |
| 21987 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | |
| 21988 unittest.expect(queryMap["name"].first, unittest.equals(arg_name)); | |
| 21989 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 21990 unittest.expect(queryMap["sortField"].first, unittest.equals(arg_sortFie
ld)); | |
| 21991 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | |
| 21992 | |
| 21993 | |
| 21994 var h = { | |
| 21995 "content-type" : "application/json; charset=utf-8", | |
| 21996 }; | |
| 21997 var resp = convert.JSON.encode(buildTargetableRemarketingListsListRespon
se()); | |
| 21998 return new async.Future.value(stringResponse(200, h, resp)); | |
| 21999 }), true); | |
| 22000 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) { | |
| 22001 checkTargetableRemarketingListsListResponse(response); | |
| 22002 }))); | |
| 22003 }); | |
| 22004 | |
| 22005 }); | |
| 22006 | |
| 22007 | |
| 22008 unittest.group("resource-UserProfilesResourceApi", () { | |
| 22009 unittest.test("method--get", () { | |
| 22010 | |
| 22011 var mock = new HttpServerMock(); | |
| 22012 api.UserProfilesResourceApi res = new api.DfareportingApi(mock).userProfil
es; | |
| 22013 var arg_profileId = "foo"; | |
| 22014 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 22015 var path = (req.url).path; | |
| 22016 var pathOffset = 0; | |
| 22017 var index; | |
| 22018 var subPart; | |
| 22019 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 22020 pathOffset += 1; | |
| 22021 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 22022 pathOffset += 18; | |
| 22023 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 22024 pathOffset += 13; | |
| 22025 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 22026 pathOffset = path.length; | |
| 22027 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 22028 | |
| 22029 var query = (req.url).query; | |
| 22030 var queryOffset = 0; | |
| 22031 var queryMap = {}; | |
| 22032 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 22033 parseBool(n) { | |
| 22034 if (n == "true") return true; | |
| 22035 if (n == "false") return false; | |
| 22036 if (n == null) return null; | |
| 22037 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 22038 } | |
| 22039 if (query.length > 0) { | |
| 22040 for (var part in query.split("&")) { | |
| 22041 var keyvalue = part.split("="); | |
| 22042 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 22043 } | |
| 22044 } | |
| 22045 | |
| 22046 | |
| 22047 var h = { | |
| 22048 "content-type" : "application/json; charset=utf-8", | |
| 22049 }; | |
| 22050 var resp = convert.JSON.encode(buildUserProfile()); | |
| 22051 return new async.Future.value(stringResponse(200, h, resp)); | |
| 22052 }), true); | |
| 22053 res.get(arg_profileId).then(unittest.expectAsync(((api.UserProfile respons
e) { | |
| 22054 checkUserProfile(response); | |
| 22055 }))); | |
| 22056 }); | |
| 22057 | |
| 22058 unittest.test("method--list", () { | |
| 22059 | |
| 22060 var mock = new HttpServerMock(); | |
| 22061 api.UserProfilesResourceApi res = new api.DfareportingApi(mock).userProfil
es; | |
| 22062 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 22063 var path = (req.url).path; | |
| 22064 var pathOffset = 0; | |
| 22065 var index; | |
| 22066 var subPart; | |
| 22067 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 22068 pathOffset += 1; | |
| 22069 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 22070 pathOffset += 18; | |
| 22071 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq
uals("userprofiles")); | |
| 22072 pathOffset += 12; | |
| 22073 | |
| 22074 var query = (req.url).query; | |
| 22075 var queryOffset = 0; | |
| 22076 var queryMap = {}; | |
| 22077 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 22078 parseBool(n) { | |
| 22079 if (n == "true") return true; | |
| 22080 if (n == "false") return false; | |
| 22081 if (n == null) return null; | |
| 22082 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 22083 } | |
| 22084 if (query.length > 0) { | |
| 22085 for (var part in query.split("&")) { | |
| 22086 var keyvalue = part.split("="); | |
| 22087 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 22088 } | |
| 22089 } | |
| 22090 | |
| 22091 | |
| 22092 var h = { | |
| 22093 "content-type" : "application/json; charset=utf-8", | |
| 22094 }; | |
| 22095 var resp = convert.JSON.encode(buildUserProfileList()); | |
| 22096 return new async.Future.value(stringResponse(200, h, resp)); | |
| 22097 }), true); | |
| 22098 res.list().then(unittest.expectAsync(((api.UserProfileList response) { | |
| 22099 checkUserProfileList(response); | |
| 22100 }))); | |
| 22101 }); | |
| 22102 | |
| 22103 }); | |
| 22104 | |
| 22105 | |
| 22106 unittest.group("resource-UserRolePermissionGroupsResourceApi", () { | |
| 22107 unittest.test("method--get", () { | |
| 22108 | |
| 22109 var mock = new HttpServerMock(); | |
| 22110 api.UserRolePermissionGroupsResourceApi res = new api.DfareportingApi(mock
).userRolePermissionGroups; | |
| 22111 var arg_profileId = "foo"; | |
| 22112 var arg_id = "foo"; | |
| 22113 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 22114 var path = (req.url).path; | |
| 22115 var pathOffset = 0; | |
| 22116 var index; | |
| 22117 var subPart; | |
| 22118 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 22119 pathOffset += 1; | |
| 22120 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 22121 pathOffset += 18; | |
| 22122 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 22123 pathOffset += 13; | |
| 22124 index = path.indexOf("/userRolePermissionGroups/", pathOffset); | |
| 22125 unittest.expect(index >= 0, unittest.isTrue); | |
| 22126 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 22127 pathOffset = index; | |
| 22128 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 22129 unittest.expect(path.substring(pathOffset, pathOffset + 26), unittest.eq
uals("/userRolePermissionGroups/")); | |
| 22130 pathOffset += 26; | |
| 22131 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 22132 pathOffset = path.length; | |
| 22133 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 22134 | |
| 22135 var query = (req.url).query; | |
| 22136 var queryOffset = 0; | |
| 22137 var queryMap = {}; | |
| 22138 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 22139 parseBool(n) { | |
| 22140 if (n == "true") return true; | |
| 22141 if (n == "false") return false; | |
| 22142 if (n == null) return null; | |
| 22143 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 22144 } | |
| 22145 if (query.length > 0) { | |
| 22146 for (var part in query.split("&")) { | |
| 22147 var keyvalue = part.split("="); | |
| 22148 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 22149 } | |
| 22150 } | |
| 22151 | |
| 22152 | |
| 22153 var h = { | |
| 22154 "content-type" : "application/json; charset=utf-8", | |
| 22155 }; | |
| 22156 var resp = convert.JSON.encode(buildUserRolePermissionGroup()); | |
| 22157 return new async.Future.value(stringResponse(200, h, resp)); | |
| 22158 }), true); | |
| 22159 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.UserRolePer
missionGroup response) { | |
| 22160 checkUserRolePermissionGroup(response); | |
| 22161 }))); | |
| 22162 }); | |
| 22163 | |
| 22164 unittest.test("method--list", () { | |
| 22165 | |
| 22166 var mock = new HttpServerMock(); | |
| 22167 api.UserRolePermissionGroupsResourceApi res = new api.DfareportingApi(mock
).userRolePermissionGroups; | |
| 22168 var arg_profileId = "foo"; | |
| 22169 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 22170 var path = (req.url).path; | |
| 22171 var pathOffset = 0; | |
| 22172 var index; | |
| 22173 var subPart; | |
| 22174 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 22175 pathOffset += 1; | |
| 22176 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 22177 pathOffset += 18; | |
| 22178 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 22179 pathOffset += 13; | |
| 22180 index = path.indexOf("/userRolePermissionGroups", pathOffset); | |
| 22181 unittest.expect(index >= 0, unittest.isTrue); | |
| 22182 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 22183 pathOffset = index; | |
| 22184 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 22185 unittest.expect(path.substring(pathOffset, pathOffset + 25), unittest.eq
uals("/userRolePermissionGroups")); | |
| 22186 pathOffset += 25; | |
| 22187 | |
| 22188 var query = (req.url).query; | |
| 22189 var queryOffset = 0; | |
| 22190 var queryMap = {}; | |
| 22191 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 22192 parseBool(n) { | |
| 22193 if (n == "true") return true; | |
| 22194 if (n == "false") return false; | |
| 22195 if (n == null) return null; | |
| 22196 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 22197 } | |
| 22198 if (query.length > 0) { | |
| 22199 for (var part in query.split("&")) { | |
| 22200 var keyvalue = part.split("="); | |
| 22201 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 22202 } | |
| 22203 } | |
| 22204 | |
| 22205 | |
| 22206 var h = { | |
| 22207 "content-type" : "application/json; charset=utf-8", | |
| 22208 }; | |
| 22209 var resp = convert.JSON.encode(buildUserRolePermissionGroupsListResponse
()); | |
| 22210 return new async.Future.value(stringResponse(200, h, resp)); | |
| 22211 }), true); | |
| 22212 res.list(arg_profileId).then(unittest.expectAsync(((api.UserRolePermission
GroupsListResponse response) { | |
| 22213 checkUserRolePermissionGroupsListResponse(response); | |
| 22214 }))); | |
| 22215 }); | |
| 22216 | |
| 22217 }); | |
| 22218 | |
| 22219 | |
| 22220 unittest.group("resource-UserRolePermissionsResourceApi", () { | |
| 22221 unittest.test("method--get", () { | |
| 22222 | |
| 22223 var mock = new HttpServerMock(); | |
| 22224 api.UserRolePermissionsResourceApi res = new api.DfareportingApi(mock).use
rRolePermissions; | |
| 22225 var arg_profileId = "foo"; | |
| 22226 var arg_id = "foo"; | |
| 22227 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 22228 var path = (req.url).path; | |
| 22229 var pathOffset = 0; | |
| 22230 var index; | |
| 22231 var subPart; | |
| 22232 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 22233 pathOffset += 1; | |
| 22234 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 22235 pathOffset += 18; | |
| 22236 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 22237 pathOffset += 13; | |
| 22238 index = path.indexOf("/userRolePermissions/", pathOffset); | |
| 22239 unittest.expect(index >= 0, unittest.isTrue); | |
| 22240 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 22241 pathOffset = index; | |
| 22242 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 22243 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq
uals("/userRolePermissions/")); | |
| 22244 pathOffset += 21; | |
| 22245 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 22246 pathOffset = path.length; | |
| 22247 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 22248 | |
| 22249 var query = (req.url).query; | |
| 22250 var queryOffset = 0; | |
| 22251 var queryMap = {}; | |
| 22252 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 22253 parseBool(n) { | |
| 22254 if (n == "true") return true; | |
| 22255 if (n == "false") return false; | |
| 22256 if (n == null) return null; | |
| 22257 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 22258 } | |
| 22259 if (query.length > 0) { | |
| 22260 for (var part in query.split("&")) { | |
| 22261 var keyvalue = part.split("="); | |
| 22262 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 22263 } | |
| 22264 } | |
| 22265 | |
| 22266 | |
| 22267 var h = { | |
| 22268 "content-type" : "application/json; charset=utf-8", | |
| 22269 }; | |
| 22270 var resp = convert.JSON.encode(buildUserRolePermission()); | |
| 22271 return new async.Future.value(stringResponse(200, h, resp)); | |
| 22272 }), true); | |
| 22273 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.UserRolePer
mission response) { | |
| 22274 checkUserRolePermission(response); | |
| 22275 }))); | |
| 22276 }); | |
| 22277 | |
| 22278 unittest.test("method--list", () { | |
| 22279 | |
| 22280 var mock = new HttpServerMock(); | |
| 22281 api.UserRolePermissionsResourceApi res = new api.DfareportingApi(mock).use
rRolePermissions; | |
| 22282 var arg_profileId = "foo"; | |
| 22283 var arg_ids = buildUnnamed457(); | |
| 22284 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 22285 var path = (req.url).path; | |
| 22286 var pathOffset = 0; | |
| 22287 var index; | |
| 22288 var subPart; | |
| 22289 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 22290 pathOffset += 1; | |
| 22291 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 22292 pathOffset += 18; | |
| 22293 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 22294 pathOffset += 13; | |
| 22295 index = path.indexOf("/userRolePermissions", pathOffset); | |
| 22296 unittest.expect(index >= 0, unittest.isTrue); | |
| 22297 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 22298 pathOffset = index; | |
| 22299 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 22300 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq
uals("/userRolePermissions")); | |
| 22301 pathOffset += 20; | |
| 22302 | |
| 22303 var query = (req.url).query; | |
| 22304 var queryOffset = 0; | |
| 22305 var queryMap = {}; | |
| 22306 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 22307 parseBool(n) { | |
| 22308 if (n == "true") return true; | |
| 22309 if (n == "false") return false; | |
| 22310 if (n == null) return null; | |
| 22311 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 22312 } | |
| 22313 if (query.length > 0) { | |
| 22314 for (var part in query.split("&")) { | |
| 22315 var keyvalue = part.split("="); | |
| 22316 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 22317 } | |
| 22318 } | |
| 22319 unittest.expect(queryMap["ids"], unittest.equals(arg_ids)); | |
| 22320 | |
| 22321 | |
| 22322 var h = { | |
| 22323 "content-type" : "application/json; charset=utf-8", | |
| 22324 }; | |
| 22325 var resp = convert.JSON.encode(buildUserRolePermissionsListResponse()); | |
| 22326 return new async.Future.value(stringResponse(200, h, resp)); | |
| 22327 }), true); | |
| 22328 res.list(arg_profileId, ids: arg_ids).then(unittest.expectAsync(((api.User
RolePermissionsListResponse response) { | |
| 22329 checkUserRolePermissionsListResponse(response); | |
| 22330 }))); | |
| 22331 }); | |
| 22332 | |
| 22333 }); | |
| 22334 | |
| 22335 | |
| 22336 unittest.group("resource-UserRolesResourceApi", () { | |
| 22337 unittest.test("method--delete", () { | |
| 22338 | |
| 22339 var mock = new HttpServerMock(); | |
| 22340 api.UserRolesResourceApi res = new api.DfareportingApi(mock).userRoles; | |
| 22341 var arg_profileId = "foo"; | |
| 22342 var arg_id = "foo"; | |
| 22343 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 22344 var path = (req.url).path; | |
| 22345 var pathOffset = 0; | |
| 22346 var index; | |
| 22347 var subPart; | |
| 22348 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 22349 pathOffset += 1; | |
| 22350 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 22351 pathOffset += 18; | |
| 22352 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 22353 pathOffset += 13; | |
| 22354 index = path.indexOf("/userRoles/", pathOffset); | |
| 22355 unittest.expect(index >= 0, unittest.isTrue); | |
| 22356 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 22357 pathOffset = index; | |
| 22358 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 22359 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("/userRoles/")); | |
| 22360 pathOffset += 11; | |
| 22361 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 22362 pathOffset = path.length; | |
| 22363 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 22364 | |
| 22365 var query = (req.url).query; | |
| 22366 var queryOffset = 0; | |
| 22367 var queryMap = {}; | |
| 22368 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 22369 parseBool(n) { | |
| 22370 if (n == "true") return true; | |
| 22371 if (n == "false") return false; | |
| 22372 if (n == null) return null; | |
| 22373 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 22374 } | |
| 22375 if (query.length > 0) { | |
| 22376 for (var part in query.split("&")) { | |
| 22377 var keyvalue = part.split("="); | |
| 22378 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 22379 } | |
| 22380 } | |
| 22381 | |
| 22382 | |
| 22383 var h = { | |
| 22384 "content-type" : "application/json; charset=utf-8", | |
| 22385 }; | |
| 22386 var resp = ""; | |
| 22387 return new async.Future.value(stringResponse(200, h, resp)); | |
| 22388 }), true); | |
| 22389 res.delete(arg_profileId, arg_id).then(unittest.expectAsync((_) {})); | |
| 22390 }); | |
| 22391 | |
| 22392 unittest.test("method--get", () { | |
| 22393 | |
| 22394 var mock = new HttpServerMock(); | |
| 22395 api.UserRolesResourceApi res = new api.DfareportingApi(mock).userRoles; | |
| 22396 var arg_profileId = "foo"; | |
| 22397 var arg_id = "foo"; | |
| 22398 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 22399 var path = (req.url).path; | |
| 22400 var pathOffset = 0; | |
| 22401 var index; | |
| 22402 var subPart; | |
| 22403 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 22404 pathOffset += 1; | |
| 22405 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 22406 pathOffset += 18; | |
| 22407 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 22408 pathOffset += 13; | |
| 22409 index = path.indexOf("/userRoles/", pathOffset); | |
| 22410 unittest.expect(index >= 0, unittest.isTrue); | |
| 22411 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 22412 pathOffset = index; | |
| 22413 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 22414 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq
uals("/userRoles/")); | |
| 22415 pathOffset += 11; | |
| 22416 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); | |
| 22417 pathOffset = path.length; | |
| 22418 unittest.expect(subPart, unittest.equals("$arg_id")); | |
| 22419 | |
| 22420 var query = (req.url).query; | |
| 22421 var queryOffset = 0; | |
| 22422 var queryMap = {}; | |
| 22423 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 22424 parseBool(n) { | |
| 22425 if (n == "true") return true; | |
| 22426 if (n == "false") return false; | |
| 22427 if (n == null) return null; | |
| 22428 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 22429 } | |
| 22430 if (query.length > 0) { | |
| 22431 for (var part in query.split("&")) { | |
| 22432 var keyvalue = part.split("="); | |
| 22433 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 22434 } | |
| 22435 } | |
| 22436 | |
| 22437 | |
| 22438 var h = { | |
| 22439 "content-type" : "application/json; charset=utf-8", | |
| 22440 }; | |
| 22441 var resp = convert.JSON.encode(buildUserRole()); | |
| 22442 return new async.Future.value(stringResponse(200, h, resp)); | |
| 22443 }), true); | |
| 22444 res.get(arg_profileId, arg_id).then(unittest.expectAsync(((api.UserRole re
sponse) { | |
| 22445 checkUserRole(response); | |
| 22446 }))); | |
| 22447 }); | |
| 22448 | |
| 22449 unittest.test("method--insert", () { | |
| 22450 | |
| 22451 var mock = new HttpServerMock(); | |
| 22452 api.UserRolesResourceApi res = new api.DfareportingApi(mock).userRoles; | |
| 22453 var arg_request = buildUserRole(); | |
| 22454 var arg_profileId = "foo"; | |
| 22455 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 22456 var obj = new api.UserRole.fromJson(json); | |
| 22457 checkUserRole(obj); | |
| 22458 | |
| 22459 var path = (req.url).path; | |
| 22460 var pathOffset = 0; | |
| 22461 var index; | |
| 22462 var subPart; | |
| 22463 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 22464 pathOffset += 1; | |
| 22465 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 22466 pathOffset += 18; | |
| 22467 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 22468 pathOffset += 13; | |
| 22469 index = path.indexOf("/userRoles", pathOffset); | |
| 22470 unittest.expect(index >= 0, unittest.isTrue); | |
| 22471 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 22472 pathOffset = index; | |
| 22473 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 22474 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/userRoles")); | |
| 22475 pathOffset += 10; | |
| 22476 | |
| 22477 var query = (req.url).query; | |
| 22478 var queryOffset = 0; | |
| 22479 var queryMap = {}; | |
| 22480 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 22481 parseBool(n) { | |
| 22482 if (n == "true") return true; | |
| 22483 if (n == "false") return false; | |
| 22484 if (n == null) return null; | |
| 22485 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 22486 } | |
| 22487 if (query.length > 0) { | |
| 22488 for (var part in query.split("&")) { | |
| 22489 var keyvalue = part.split("="); | |
| 22490 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 22491 } | |
| 22492 } | |
| 22493 | |
| 22494 | |
| 22495 var h = { | |
| 22496 "content-type" : "application/json; charset=utf-8", | |
| 22497 }; | |
| 22498 var resp = convert.JSON.encode(buildUserRole()); | |
| 22499 return new async.Future.value(stringResponse(200, h, resp)); | |
| 22500 }), true); | |
| 22501 res.insert(arg_request, arg_profileId).then(unittest.expectAsync(((api.Use
rRole response) { | |
| 22502 checkUserRole(response); | |
| 22503 }))); | |
| 22504 }); | |
| 22505 | |
| 22506 unittest.test("method--list", () { | |
| 22507 | |
| 22508 var mock = new HttpServerMock(); | |
| 22509 api.UserRolesResourceApi res = new api.DfareportingApi(mock).userRoles; | |
| 22510 var arg_profileId = "foo"; | |
| 22511 var arg_accountUserRoleOnly = true; | |
| 22512 var arg_ids = buildUnnamed458(); | |
| 22513 var arg_maxResults = 42; | |
| 22514 var arg_pageToken = "foo"; | |
| 22515 var arg_searchString = "foo"; | |
| 22516 var arg_sortField = "foo"; | |
| 22517 var arg_sortOrder = "foo"; | |
| 22518 var arg_subaccountId = "foo"; | |
| 22519 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 22520 var path = (req.url).path; | |
| 22521 var pathOffset = 0; | |
| 22522 var index; | |
| 22523 var subPart; | |
| 22524 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 22525 pathOffset += 1; | |
| 22526 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 22527 pathOffset += 18; | |
| 22528 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 22529 pathOffset += 13; | |
| 22530 index = path.indexOf("/userRoles", pathOffset); | |
| 22531 unittest.expect(index >= 0, unittest.isTrue); | |
| 22532 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 22533 pathOffset = index; | |
| 22534 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 22535 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/userRoles")); | |
| 22536 pathOffset += 10; | |
| 22537 | |
| 22538 var query = (req.url).query; | |
| 22539 var queryOffset = 0; | |
| 22540 var queryMap = {}; | |
| 22541 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 22542 parseBool(n) { | |
| 22543 if (n == "true") return true; | |
| 22544 if (n == "false") return false; | |
| 22545 if (n == null) return null; | |
| 22546 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 22547 } | |
| 22548 if (query.length > 0) { | |
| 22549 for (var part in query.split("&")) { | |
| 22550 var keyvalue = part.split("="); | |
| 22551 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 22552 } | |
| 22553 } | |
| 22554 unittest.expect(queryMap["accountUserRoleOnly"].first, unittest.equals("
$arg_accountUserRoleOnly")); | |
| 22555 unittest.expect(queryMap["ids"], unittest.equals(arg_ids)); | |
| 22556 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | |
| 22557 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 22558 unittest.expect(queryMap["searchString"].first, unittest.equals(arg_sear
chString)); | |
| 22559 unittest.expect(queryMap["sortField"].first, unittest.equals(arg_sortFie
ld)); | |
| 22560 unittest.expect(queryMap["sortOrder"].first, unittest.equals(arg_sortOrd
er)); | |
| 22561 unittest.expect(queryMap["subaccountId"].first, unittest.equals(arg_suba
ccountId)); | |
| 22562 | |
| 22563 | |
| 22564 var h = { | |
| 22565 "content-type" : "application/json; charset=utf-8", | |
| 22566 }; | |
| 22567 var resp = convert.JSON.encode(buildUserRolesListResponse()); | |
| 22568 return new async.Future.value(stringResponse(200, h, resp)); | |
| 22569 }), true); | |
| 22570 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) { | |
| 22571 checkUserRolesListResponse(response); | |
| 22572 }))); | |
| 22573 }); | |
| 22574 | |
| 22575 unittest.test("method--patch", () { | |
| 22576 | |
| 22577 var mock = new HttpServerMock(); | |
| 22578 api.UserRolesResourceApi res = new api.DfareportingApi(mock).userRoles; | |
| 22579 var arg_request = buildUserRole(); | |
| 22580 var arg_profileId = "foo"; | |
| 22581 var arg_id = "foo"; | |
| 22582 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 22583 var obj = new api.UserRole.fromJson(json); | |
| 22584 checkUserRole(obj); | |
| 22585 | |
| 22586 var path = (req.url).path; | |
| 22587 var pathOffset = 0; | |
| 22588 var index; | |
| 22589 var subPart; | |
| 22590 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 22591 pathOffset += 1; | |
| 22592 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 22593 pathOffset += 18; | |
| 22594 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 22595 pathOffset += 13; | |
| 22596 index = path.indexOf("/userRoles", pathOffset); | |
| 22597 unittest.expect(index >= 0, unittest.isTrue); | |
| 22598 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 22599 pathOffset = index; | |
| 22600 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 22601 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/userRoles")); | |
| 22602 pathOffset += 10; | |
| 22603 | |
| 22604 var query = (req.url).query; | |
| 22605 var queryOffset = 0; | |
| 22606 var queryMap = {}; | |
| 22607 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 22608 parseBool(n) { | |
| 22609 if (n == "true") return true; | |
| 22610 if (n == "false") return false; | |
| 22611 if (n == null) return null; | |
| 22612 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 22613 } | |
| 22614 if (query.length > 0) { | |
| 22615 for (var part in query.split("&")) { | |
| 22616 var keyvalue = part.split("="); | |
| 22617 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 22618 } | |
| 22619 } | |
| 22620 unittest.expect(queryMap["id"].first, unittest.equals(arg_id)); | |
| 22621 | |
| 22622 | |
| 22623 var h = { | |
| 22624 "content-type" : "application/json; charset=utf-8", | |
| 22625 }; | |
| 22626 var resp = convert.JSON.encode(buildUserRole()); | |
| 22627 return new async.Future.value(stringResponse(200, h, resp)); | |
| 22628 }), true); | |
| 22629 res.patch(arg_request, arg_profileId, arg_id).then(unittest.expectAsync(((
api.UserRole response) { | |
| 22630 checkUserRole(response); | |
| 22631 }))); | |
| 22632 }); | |
| 22633 | |
| 22634 unittest.test("method--update", () { | |
| 22635 | |
| 22636 var mock = new HttpServerMock(); | |
| 22637 api.UserRolesResourceApi res = new api.DfareportingApi(mock).userRoles; | |
| 22638 var arg_request = buildUserRole(); | |
| 22639 var arg_profileId = "foo"; | |
| 22640 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | |
| 22641 var obj = new api.UserRole.fromJson(json); | |
| 22642 checkUserRole(obj); | |
| 22643 | |
| 22644 var path = (req.url).path; | |
| 22645 var pathOffset = 0; | |
| 22646 var index; | |
| 22647 var subPart; | |
| 22648 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | |
| 22649 pathOffset += 1; | |
| 22650 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("dfareporting/v2.4/")); | |
| 22651 pathOffset += 18; | |
| 22652 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq
uals("userprofiles/")); | |
| 22653 pathOffset += 13; | |
| 22654 index = path.indexOf("/userRoles", pathOffset); | |
| 22655 unittest.expect(index >= 0, unittest.isTrue); | |
| 22656 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index
)); | |
| 22657 pathOffset = index; | |
| 22658 unittest.expect(subPart, unittest.equals("$arg_profileId")); | |
| 22659 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq
uals("/userRoles")); | |
| 22660 pathOffset += 10; | |
| 22661 | |
| 22662 var query = (req.url).query; | |
| 22663 var queryOffset = 0; | |
| 22664 var queryMap = {}; | |
| 22665 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | |
| 22666 parseBool(n) { | |
| 22667 if (n == "true") return true; | |
| 22668 if (n == "false") return false; | |
| 22669 if (n == null) return null; | |
| 22670 throw new core.ArgumentError("Invalid boolean: $n"); | |
| 22671 } | |
| 22672 if (query.length > 0) { | |
| 22673 for (var part in query.split("&")) { | |
| 22674 var keyvalue = part.split("="); | |
| 22675 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | |
| 22676 } | |
| 22677 } | |
| 22678 | |
| 22679 | |
| 22680 var h = { | |
| 22681 "content-type" : "application/json; charset=utf-8", | |
| 22682 }; | |
| 22683 var resp = convert.JSON.encode(buildUserRole()); | |
| 22684 return new async.Future.value(stringResponse(200, h, resp)); | |
| 22685 }), true); | |
| 22686 res.update(arg_request, arg_profileId).then(unittest.expectAsync(((api.Use
rRole response) { | |
| 22687 checkUserRole(response); | |
| 22688 }))); | |
| 22689 }); | |
| 22690 | |
| 22691 }); | |
| 22692 | |
| 22693 | |
| 22694 } | |
| 22695 | |
| OLD | NEW |